  The Linux 3Dfx HOWTO
  Bernd Kreimeier (bk@gamers.org)
  v1.16, 6 February 1998

  This document describes 3Dfx graphics accelerator chip support for
  Linux. It lists some supported hardware, describes how to configure
  the drivers, and answers frequently asked questions.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Contributors and Contacts
     1.2 Acknowledgments
     1.3 Revision History
     1.4 New versions of this document
     1.5 Feedback
     1.6 Distribution Policy

  2. Graphics Accelerator Technology

     2.1 Basics
     2.2 Hardware configuration
     2.3 A bit of Voodoo Graphics (tm) architecture

  3. Installation

     3.1 Installing the board
        3.1.1 Troubleshooting the hardware installation
        3.1.2 Configuring the kernel
        3.1.3 Configuring devices
     3.2 Setting up the Displays
        3.2.1 Single screen display solution
        3.2.2 Single screen dual cable setup
        3.2.3 Dual screen display solution
     3.3 Installing the Glide distribution
        3.3.1 Using the detect program
        3.3.2 Using the test programs

  4. Answers To Frequently Asked Questions

  5. FAQ: Requirements?

     5.1 What are the system requirements?
     5.2 Does it work with Linux-Alpha?
     5.3 Which 3Dfx chipsets are supported?
     5.4 Is the Voodoo Rush (tm) supported?
     5.5 Which boards are supported?
     5.6 How do boards differ?
     5.7 What about AGP?

  6. FAQ: Voodoo Graphics (tm)? 3Dfx?

     6.1 Who is 3Dfx?
     6.2 Who is Quantum3D?
     6.3 What is the Voodoo Graphics (tm)?
     6.4 What is the Voodoo Rush (tm)?
     6.5 What is the Voodoo 2 (tm)?
     6.6 What is VGA pass-though?
     6.7 What is Texelfx or TMU?
     6.8 What is a Pixelfx unit?
     6.9 What is SLI mode?
     6.10 Is there a single board SLI setup?
     6.11 How much memory? How many buffers?
     6.12 Does the Voodoo Graphics (tm) do 24 or 32 bit color?
     6.13 Does the Voodoo Graphics (tm) store 24 or 32 bit z-buffer per pixel?
     6.14 What resolutions does the Voodoo Graphics (tm) support?
     6.15 What texture sizes are supported?
     6.16 Does the Voodoo Graphics (tm) support paletted textures?
     6.17 What about overclocking?
     6.18 Where could I get additional info on Voodoo Graphics (tm)?

  7. FAQ: Glide? TexUS?

     7.1 What is Glide anyway?
     7.2 What is TexUS?
     7.3 Is Glide freeware?
     7.4 Where do I get Glide?
     7.5 Is the Glide source available?
     7.6 Is Linux Glide supported?
     7.7 Where could I post Glide questions?
     7.8 Where to send bug reports?
     7.9 Who is maintaining it?
     7.10 How can I contribute to Linux Glide?
     7.11 Do I have to use Glide?
     7.12 Should I program using the Glide API?
     7.13 What is the Glide current version?
     7.14 Does it support multiple Texelfx already?
     7.15 Is Linux Glide identical to DOS/Windows Glide?
     7.16 Where to I get information on Glide?
     7.17 Where to get some Glide demos?
     7.18 What is ATB?

  8. FAQ: Glide and XFree86?

     8.1 Does it run with XFree86?
     8.2 Does it only run full screen?
     8.3 What is the problem with AT3D/Voodoo Rush (tm) boards?
     8.4 What about GLX for XFree86?
     8.5 Glide and commerical X Servers?
     8.6 Glide and SVGA?
     8.7 Glide and GGI?

  9. FAQ: OpenGL/Mesa?

     9.1 What is OpenGL?
     9.2 Where to get additional information on OpenGL?
     9.3 Is Glide an OpenGL implementation?
     9.4 Is there an OpenGL driver from 3Dfx?
     9.5 Is there a commercial OpenGL for Linux and 3Dfx?
     9.6 What is Mesa?
     9.7 Does Mesa work with 3Dfx?
     9.8 How portable is Mesa with Glide?
     9.9 Where to get info on Mesa?
     9.10 Where to get information on Mesa Voodoo?
     9.11 Does Mesa support multitexturing?
     9.12 Does Mesa support single pass trilinear mipmapping?
     9.13 What is the Mesa "Window Hack"?
     9.14 How about GLUT?

  10. FAQ: But Quake?

     10.1 What about that 3Dfx GL driver for Quake?
     10.2 Is there a 3Dfx based glQuake for Linux?
     10.3 Does glQuake run in an XFree86 window?
     10.4 Known Linux Quake problems?
     10.5 Know Linux Quake security problems?
     10.6 Does LinuxQuake use multitexturing?
     10.7 Where can I get current information on Linux glQuake?

  11. FAQ: Troubleshooting?

     11.1 Has this hardware been tested?
     11.2 Failed to change I/O privilege?
     11.3 Does it work without root privilege?
     11.4 Displayed images looks awful (single screen)?
     11.5 The last frame is still there (single or dual screen)?
     11.6 Powersave kicks in (dual screen)?
     11.7 My machine seem to lock (X11, single screen)?
     11.8 My machine locks (single or dual screen)?
     11.9 My machine locks (used with S3 VGA board)?
     11.10 No address conflict, but locks anyway?
     11.11 Mesa runs, but does not access the board?
     11.12 Resetting dual board SLI?
     11.13 Resetting single board SLI?


  ______________________________________________________________________



  1.  Introduction

  This is the Linux 3Dfx HOWTO document. It is intended as a quick
  reference covering everything you need to know to install and
  configure 3Dfx support under Linux. Frequently asked questions
  regarding the 3Dfx support are answered, and references are given to
  some other sources of information on a variety of topics related to
  computer generated, hardware accelerated 3D graphics.

  This information is only valid for Linux on the Intel platform.  Some
  information may be applicable to other processor architectures, but I
  have no first hand experience or information on this. It is only
  applicable to boards based on 3Dfx technology, any other graphics
  accelerator hardware is beyond the scope of this document.



  1.1.  Contributors and Contacts

  This document would not have been possible without all the information
  contributed by other people - those involved in the Linux Glide port
  and the beta testing process, in the development of Mesa and the Mesa
  Voodoo drivers, or rewieving the document on behalf of 3Dfx and
  Quantum3D.  Some of them contributed entire sections to this document.

  Daryll Strauss daryll@harlot.rb.ca.us did the port, Paul J. Metzger
  pjm@rbd.com modified the Mesa Voodoo driver (written by David
  Bucciarelli tech.hmw@plus.it) for Linux, Brian Paul brianp@RA.AVID.COM
  integrated it with his famous Mesa library. With respect to Voodoo
  Graphics (tm) accelerated Mesa, additional thanks has to go to Henri
  Fousse, Gary McTaggart, and the maintainer of the 3Dfx Mesa for DOS,
  Charlie Wallace Charlie.Wallace@unistudios.com.  The folks at 3Dfx,
  notably Gary Sanders, Rod Hughes, and Marty Franz, provided valuable
  input, as did Ross Q. Smith of Quantum3D. The pages on the Voodoo
  Extreme and Operation 3Dfx websites provided useful info as well, and
  in some case I relied on the 3Dfx local Newsgroups. The Linux glQuake2
  port that uses Linux Glide and Mesa is maintained by Dave Kirsch
  zoid@idsoftware.com.  Thanks to all those who sent e-mail regarding
  corrections and updates, and special thanks to Mark Atkinson for
  reminding me of the dual cable setup.

  Thanks to the SGML-Tools package (formerly known as Linuxdoc-SGML),
  this HOWTO is available in several formats, all generated from a
  common source file. For information on SGML-Tools see its homepage at
  pobox.com/~cg/sgmltools.



  1.2.  Acknowledgments

  3Dfx, the 3Dfx Interactive logo, Voodoo Graphics (tm), and Voodoo Rush
  (tm) are registered trademarks of 3Dfx Interactive, Inc.  Glide,
  TexUS, Pixelfx and Texelfx are trademarks of 3Dfx Interactive, Inc.
  OpenGL is a registered trademark of Silicon Graphics. Obsidian is a
  trademark of Quantum3D.  Other product names are trademarks of the
  respective holders, and are hereby considered properly acknowledged.


  1.3.  Revision History


     Version 1.03
        First version for public release.

     Version 1.16
        Current version v1.16 6 February 1998.



  1.4.  New versions of this document

  You will find the most recent version of this document at
  www.gamers.org/dEngine/xf3D/.

  New versions of this document will be periodically posted to the
  comp.os.linux.answers newsgroup. They will also be uploaded to various
  anonymous ftp sites that archive such information including
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/.

  Hypertext versions of this and other Linux HOWTOs are available on
  many World-Wide-Web sites, including sunsite.unc.edu/LDP/. Most Linux
  CD-ROM distributions include the HOWTOs, often under the
  /usr/doc/directory, and you can also buy printed copies from several
  vendors.

  If you make a translation of this document into another language, let
  me know and I'll include a reference to it here.



  1.5.  Feedback

  I rely on you, the reader, to make this HOWTO useful. If you have any
  suggestions, corrections, or comments, please send them to me (
  bk@gamers.org), and I will try to incorporate them in the next
  revision.  Please add HOWTO 3Dfx to the Subject-line of the mail, so
  procmail will dump it in the appropriate folder.

  Before sending bug reports or questions, please read all of the
  information in this HOWTO, and send detailed information about the
  problem.

  If you publish this document on a CD-ROM or in hardcopy form, a
  complimentary copy would be appreciated. Mail me for my postal
  address. Also consider making a donation to the Linux Documentation
  Project to help support free documentation for Linux. Contact the
  Linux HOWTO coordinator, Tim Bynum (linux-howto@sunsite.unc.edu), for
  more information.



  1.6.  Distribution Policy

  Copyright (c) 1997, 1998 by Bernd Kreimeier.  This document may be
  distributed under the terms set forth in the LDP license at
  sunsite.unc.edu/LDP/COPYRIGHT.html.

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the LDP license.  This document is
  distributed in the hope that it will be useful, but without any
  warranty; without even the implied warranty of merchantability or
  fitness for a particular purpose.  See the LDP license for more
  details.



  2.  Graphics Accelerator Technology

  2.1.  Basics

  This section gives a very cursory overview of computer graphics
  accelerator technology, in order to help you understand the concepts
  used later in the document. You should consult e.g.  a book on OpenGL
  in order to learn more.


  2.2.  Hardware configuration

  Graphics accelerators come in different flavors: either as a separate
  PCI board that is able to pass through the video signal of a (possibly
  2D or video accelerated) VGA board, or as a PCI board that does both
  VGA and 3D graphics (effectively replacing older VGA controllers).
  The 3Dfx boards based on the Voodoo Graphics (tm) belong to the former
  category. We will get into this again later.


  If there is no address conflict, any 3D accelerator board could be
  present under Linux without interfering, but in order to access the
  accelerator, you will need a driver. A combined 2D/3D accelerator
  might behave differently.


  2.3.  A bit of Voodoo Graphics (tm) architecture

  Usually, accessing texture memory and frame/depth buffer is a major
  bottleneck. For each pixel on the screen, there are at least one
  (nearest), four (bi-linear), or eight (tri-linear mipmapped) read
  accesses to texture memory, plus a read/write to the depth buffer, and
  a read/write to frame buffer memory.

  The Voodoo Graphics (tm) architecture separates texture memory from
  frame/depth buffer memory by introducing two separate rendering
  stages, with two corresponding units (Pixelfx and Texelfx), each
  having a separate memory interface to dedicated memory. This gives an
  above-average fill rate, paid for restrictions in memory management
  (e.g. unused framebuffer memory can not be used for texture caching).

  Moreover, a Voodoo Graphics (tm) could use two TMU's (texture
  management or texelfx units), and finally, two Voodoo Graphics (tm)
  could be combined with a mechanism called Scan-Line Interleaving
  (SLI). SLI essentially means that each Pixelfx unit effectively
  provides only every other scanline, which decreases bandwidth impact
  on each Pixelfx' framebuffer memory.



  3.  Installation

  Configuring Linux to support 3Dfx accelerators involves the following
  steps:

  1. Installing the board.

  2. Installing the Glide distribution.

  3. Compiling, linking and/or running the application.

  The next sections will cover each of these steps in detail.


  3.1.  Installing the board

  Follow the manufacturer's instructions for installing the hardware or
  have your dealer perform the installation.  It should not be necessary
  to select settings for IRQ, DMA channel, either Plug&Pray (tm) or
  factory defaults should work. The add-on boards described here are
  memory mapped devices and do not use IRQ's. The only kind of conflict
  to avoid is memory overlap with other devices.

  As 3Dfx does not develop or sell any boards, do not contact them on
  any problems.


  3.1.1.  Troubleshooting the hardware installation

  To check the installation and the memory mapping, do cat /proc/pci.
  The output should contain something like

  ______________________________________________________________________
    Bus  0, device  12, function  0:
      VGA compatible controller: S3 Inc. Vision 968 (rev 0).
        Medium devsel.  IRQ 11.
        Non-prefetchable 32 bit memory at 0xf4000000.

    Bus  0, device   9, function  0:
      Multimedia video controller: Unknown vendor Unknown device (rev 2).
        Vendor id=121a. Device id=1.
        Fast devsel.  Fast back-to-back capable.
        Prefetchable 32 bit memory at 0xfb000000.
  ______________________________________________________________________


  for a Diamond Monster 3D used with a Diamond Stealth-64. Additionally
  a cat /proc/cpuinfo /proc/meminfo might be helpfull for tracking down
  conflicts and/or submitting a bug report.

  With current kernels, you will probably get a boot warning like

  ______________________________________________________________________
  Jun 12 12:31:52 hal kernel: Warning : Unknown PCI device (121a:1).
  Please read include/linux/pci.h
  ______________________________________________________________________


  which could be safely ignored. If you happen to have a board not very
  common, or have encountered a new revision, you should take the time
  to follow the advice in /usr/include/linux/pci.h and send all neces-
  sary information to linux-pcisupport@cao-vlsi.ibp.fr.

  If you experience any problems with the board, you should try to
  verify that DOS and/or Win95 or NT support works. You will probably
  not receive any useful response from a board manufacturer on a bug
  report or request regarding Linux. Having dealt with the Diamond
  support e-mail system, I would not expect useful responses for other
  operating systems either.


  3.1.2.  Configuring the kernel

  There is no kernel configuration necessary, as long as PCI support is
  enabled.  The Linux Kernel HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html> should be
  consulted for the details of building a kernel.



  3.1.3.  Configuring devices

  The current drivers do not (yet) require any special devices.  This is
  different from other driver developments (e.g. the sound drivers,
  where you will find a /dev/dsp and /dev/audio). The driver uses the
  /dev/mem device which should always be available. In consequence, you
  need to use setuid or root privileges to access the accelerator board.


  3.2.  Setting up the Displays

  There are two possible setups with add-on boards. You could either
  pass-through the video signal from your regular VGA board via the
  accelerator board to the display, or you could use two displays at the
  same time.  Rely to the manual provided by the board manufacturer for
  details. Both configurations have been tried with the Monster 3D
  board.


  3.2.1.  Single screen display solution

  This configuration allows you to check basic operations of the
  accelerator board - if the video signal is not transmitted to the
  display, hardware failure is possible.

  Beware that the video output signal might deteoriate significantly if
  passed through the video board. To a degree, this is inevitable.
  However, reviews have complained about below-average of the cables
  provided e.g. with the Monster 3D, and judging from the one I tested,
  this has not changed.

  There are other pitfalls in single screen configurations.  Switching
  from the VGA display mode to the accelerated display mode will change
  resolution and refresh rate as well, even if you are using 640x480
  e.g. with X11, too.  Moreover, if you are running X11, your
  application is responsible for demanding all keyboard and mouse
  events, or you might get stuck because of changed scope and exposure
  on the X11 display (that is effectively invisible when the accelerated
  mode is used) You could use SVGA console mode instead of X11.

  If you are going to use a single screen configuration and switch modes
  often, remember that your monitor hardware might not enjoy this kind
  of use.



  3.2.2.  Single screen dual cable setup

  Some high end monitors (e.g. the EIZO F-784-T) come with two
  connectors, one with 5 BNC connectors for RGB, HSync, VSync, the other
  e.g. a regular VGA or a 13W3 Sub-D VGA.  These displays usually also
  feature a front panel input selector to safely switch from one to the
  other. It is thus possible to use e.g. a VGA-to-BNC cable with your
  high end 2D card, and a VGA-to-13W3 Sub-D cable with your 3Dfx, and
  effectively run dual screen on one display.


  3.2.3.  Dual screen display solution

  The accelerator board does not need the VGA input signal.  Instead of
  routing the common video output through the accelerator board, you
  could attach a second monitor to its output, and use both at the same
  time. This solution is more expensive, but gives best results, as your
  main display will still be hires and without the signal quality losses
  involved in a pass-through solution. In addition, you could use X11
  and the accelerated full screen display in parallel, for development
  and debugging.

  A common problem is that the accelerator board will not provide any
  video signal when not used. In consequence, each time the graphics
  application terminates, the hardware screensave/powersave might kick
  in depending on your monitors configuration. Again, your hardware
  might not enjoy being treated like this. You should use

  ______________________________________________________________________
  setenv SST_DUALSCREEN 1
  ______________________________________________________________________


  to force continued video output in this setup.


  3.3.  Installing the Glide distribution

  The Glide driver and library are provided as a single compressed
  archive. Use tar and gzip to unpack, and follow the instructions in
  the README and INSTALL accompanying the distribution.  Read the
  install script and run it. Installation puts everything in
  /usr/local/glide/include,lib,bin and sets the ld.conf to look there.
  Where it installs and setting ld.conf are independent actions. If you
  skip the ld.conf step then you need the LD_LIBRARY_PATH.

  You will need to install the header files in a location available at
  compile time, if you want to compile your own graphics applications.
  If you do not want to use the installation as above (i.e. you insist
  on a different location), make sure that any application could access
  the shared libary at runtime, or you will get a response like can't
  load library 'libglide.so'.



  3.3.1.  Using the detect program

  There is a bin/detect program in the distribution (the source is not
  available). You have to run it as root, and you will get something
  like

  ______________________________________________________________________
  slot  vendorId   devId   baseAddr0  command  description
  ----  --------  ------  ----------  -------  -----------
    00    0x8086  0x122d  0x00000000   0x0006  Intel:430FX (Triton)
    07    0x8086  0x122e  0x00000000   0x0007  Intel:ISA bridge
    09    0x121a  0x0001  0xfb000008   0x0002  3Dfx:video multimedia adapter
    10    0x1000  0x0001  0x0000e401   0x0007  ???:SCSI bus controller
    11    0x9004  0x8178  0x0000e001   0x0017  Adaptec:SCSI bus controller
    12    0x5333  0x88f0  0xf4000000   0x0083  S3:VGA-compatible display co
  ______________________________________________________________________


  as a result. If you do not have root privileges, the program will bail
  out with

  ______________________________________________________________________
  Permission denied: Failed to change I/O privilege. Are you root?
  ______________________________________________________________________


  output might come handy for a bug report as well.



  3.3.2.  Using the test programs

  Within the Glide distribution, you will find a folder with test
  programs. Note that these test programs are under 3Dfx copyright, and
  are legally available for use only if you have purchased a board with
  a 3Dfx chipset. See the LICENSE file in the distribution, or their web
  site www.3dfx.com for details.

  It is recommend to compile and link the test programs even if there
  happen to be binaries in the distribution. Note that some of the
  programs will requires some files like alpha.3df from the distribution
  to be available in the same folder.  All test programs use the 640x480
  screen resolution. Some will request a veriety of single character
  inputs, others will just state Press A Key To Begin Test. Beware of
  loss of input scope if running X11 on the same screen at the same
  time.

  See the README.test for a list of programs, and other details.



  4.  Answers To Frequently Asked Questions

  The following section answers some of the questions that (will) have
  been asked on the Usenet news groups and mailing lists. The FAQ has
  been subdivided into several parts for convenience, namely

  o  FAQ: Requirements?

  o  FAQ: Voodoo Graphics (tm)? 3Dfx?

  o  FAQ: Glide?

  o  FAQ: Glide and SVGA?

  o  FAQ: Glide and XFree86?

  o  FAQ: Glide versus OpenGL/Mesa?

  o  FAQ: But Quake?

  o  FAQ: Troubleshooting?

     Each section lists several questions and answers, which will
     hopefully address most problems.



  5.  FAQ: Requirements?



  5.1.  What are the system requirements?

  A Linux PC, PCI 2.1 compliant, a monitor capable of 640x480, and a 3D
  accelerator board based on the 3Dfx Voodoo Graphics (tm). It will work
  on a P5 or P6, with or without MMX. The current version does not use
  MMX, but it has some optimized code paths for P6.

  At one point, some 3Dfx statements seemed to imply that using Linux
  Glide required using a RedHat distribution. Note that while Linux
  Glide has originally been ported in a RedHat 4.1 environment, it has
  been used and tested with many other Linux distributions, including
  homebrew, Slackware, and Debian 1.3.1.


  5.2.  Does it work with Linux-Alpha?

  There is currently no Linux Glide distribution available for any
  platform besides i586. As the Glide sources are not available for
  distribution, you will have to wait for the binary. Quantum3D has DEC
  Alpha support announced for 2H97. Please contact Daryll Strauss if you
  are interested in supporting this.

  There is also the issue of porting the the assembly modules. While
  there are alternative C paths in the code, the assembly module in
  Glide (essentially triangle setup) offered significant performance
  gains depending on the P5 CPU used.



  5.3.  Which 3Dfx chipsets are supported?

  Currently, the  3Dfx Voodoo Graphics (tm) chipset is supported under
  Linux. The Voodoo Rush (tm) chipset is not yet supported.


  5.4.  Is the Voodoo Rush (tm) supported?

  The current port of Glide to Linux does not support the Voodoo Rush
  (tm). An update is in the works.

  The problem is that at one point the Voodoo Rush (tm) driver code in
  Glide depended on Direct Draw. There was an SST96 based DOS portion in
  the library that could theoretically be used for Linux, as soon as all
  portions residing in the 2D/Direct Draw/D3D combo driver are replaced.

  Thus Voodoo Rush (tm) based boards like the Hercules Stingray 128/3D
  or Intergraph Intense Rush are not supported yet.



  5.5.  Which boards are supported?

  There are no officially supported boards, as 3Dfx does not sell any
  boards. This section does not attempt to list all boards, it will just
  give an overview, and will list only boards that have been found to
  cause trouble.

  It is important to recognize that Linux support for a given board does
  not only require a driver for the 3D accelerator component. If a board
  features its own VGA core as well, support by either Linux SVGA or
  XFree86 is required as well (see section about Voodoo Rush (tm)
  chipset).  Currently, an add-on solution is recommended, as it allows
  you to choose a regular graphics board well supported for Linux. There
  are other aspects discussed below.


  All Quantum3D Obsidian boards, independend of texture memory, frame
  buffer memory, number of Pixelfx and Texelfx units, and SLI should
  work. Same for all other Voodoo Graphics (tm) based boards, like
  Orchid Righteous 3D, Canopus Pure 3D, Flash 3D, and Diamond Monster
  3D.  Voodoo Rush (tm) based boards are not yet supported.

  Boards that are not based on 3Dfx chipsets (e.g. manufactured by S3,
  Matrox, 3Dlabs, Videologic) do not work with the 3Dfx drivers and are
  beyond the scope of this document.



  5.6.  How do boards differ?

  As the board manufacturers are using the same chipset, any differences
  are due to board design. Examples are quality of the pass-through
  cable and connectors (reportedly, Orchid provided better quality than
  Diamond), availability of a TV-compliant video signal output (Canopus
  Pure 3D), and, most notably, memory size on board.

  Most common were boards for games with 2MB texture cache and 2 MB
  framebuffer memory, however, the Canopus Pure3D comes with a maximal 4
  MB texture cache, which is an advantage e.g.  with games using
  dynamically changed textures, and/or illumation textures (Quake, most
  notably).  The memory architecture of a typical Voodoo Graphics (tm)
  board is described below, in a separate section.

  Quantum 3D offers the widest selection of 3Dfx-based boards, and is
  probably the place to go if you are looking for a high end Voodoo
  Graphics (tm) based board configuration.  Quantum 3D is addressing the
  visual simulation market, while most of the other vendors are only
  targetting the consumer-level PC-game market.



  5.7.  What about AGP?

  There is no Voodoo Graphics (tm) or Voodoo Rush (tm) AGP board that I
  am aware of. I am not aware of AGP support under Linux, and I do not
  know whether upcmong AGP boards using 3Dfx technology might possibly
  be supported with Linux.



  6.  FAQ: Voodoo Graphics (tm)? 3Dfx?

  6.1.  Who is 3Dfx?

  3Dfx is a San Jose based manufacturer of 3D graphics accelerator
  hardware for arcade games, game consoles, and PC boards.  Their
  official website is www.3dfx.com. 3Dfx does not sell any boards, but
  other companies do, e.g. Quantum3D.



  6.2.  Who is Quantum3D?

  Quantum3D started as a 3Dfx spin-off, manufacturing high end
  accelerator boards based on 3Dfx chip technology for consumer and
  business market, and supplying arcade game technology. See their home
  page at www.quantum3d.com for additional information. For general
  inquiries regarding Quantum3D, please send mail to info@quantum3d.


  6.3.  What is the Voodoo Graphics (tm)?

  The Voodoo Graphics (tm) is a chipset manufactured by 3Dfx. It is used
  in hardware acceleration boards for the PC.  See the HOWTO section on
  supported hardware.


  6.4.  What is the Voodoo Rush (tm)?

  The Voodoo Rush (tm) is a derivate of the Voodoo Graphics (tm) that
  has an interface to cooperate with a 2D VGA video accelerator,
  effectively supporting accelerated graphics in windows. This combo is
  currently not supported with Linux.


  6.5.  What is the Voodoo 2 (tm)?

  The Voodoo 2 (tm) is the successor of the Voodoo Graphics (tm)
  chipset, featuring several improvements. It is announced for late
  March 1998, and annoucements of Voodoo 2 (tm) based boards have been
  published e.g. by Quantum 3D, by Creative Labs, Orchid Technologies,
  and Diamond Multimedia.

  The Voodoo 2 (tm) is supposed to be backwards compatible.  However, a
  new version of Glide will have to be ported to Linux.



  6.6.  What is VGA pass-though?

  The Voodoo Graphics (tm) (but not the Voodoo Rush (tm)) boards are
  add-on boards, meant to be used with a regular 2D VGA video
  accelerator board. In short, the video output of your regular VGA
  board is used as input for the Voodoo Graphics (tm) based add-on
  board, which by default passes it through to the display also
  connected to the Voodoo Graphics (tm) board. If the Voodoo Graphics
  (tm) is used (e.g. by a game), it will disconnect the VGA input
  signal, switch the display to a 640x480 fullscreen mode with the
  refresh rate configured by SST variables and the application/driver,
  and generate the video signal itself. The VGA doesn't need to be aware
  of this, and won't be.

  This setup has several advantages: free choice of 2D VGA board, which
  is an issue with Linux, as XFree86 drivers aren't available for all
  chipsets and revisions, and a cost effective migration path to
  accelerated 3D graphics. It also has several disadvantages: an
  application using the Voodoo Graphics (tm) might not re-enable video
  output when crashing, and regular VGA video signal deteoriates in the
  the pass-through process.


  6.7.  What is Texelfx or TMU?

  Voodoo Graphics (tm) chipsets have two units. The first one interfaces
  the texture memory on the board, does the texture mapping, and
  ultimately generates the input for the second unit that interfaces the
  framebuffer. This one is called Texelfx, aka Texture Management Unit,
  aka TMU. The neat thing about this is that a board can use two Texelfx
  instead of only one, like some of the Quantum3D Obsidian boards did,
  effectively doubling the processing power in some cases, depending on
  the application.

  As each Texelfx can address 4MB texture memory, a dual Texelfx setup
  has an effective texture cache of up to 8MB.  This can be true even if
  only one Texelfx is actually needed by a particular application, as
  textures can be distributed to both Texelfx, which are used depending
  on the requested texture. Both Texelfx are used together to perform
  certain operations as trilinear filtering and illumination
  texture/lightmap passes (e.g. in glQuake) in a single pass instead of
  the two passes that are required with only one Texelfx. To actually
  exploit the theoretically available speedup and cache size increase, a
  Glide application has to use both Texelfx properly.

  The two Texelfx can not be used separately to each draw a textured
  triangle at the same time. A triangle is always drawn using whatever
  the current setup is, which can be to use both Texelfx for a single
  pass operation combining two textures, or one Texelfx for only a
  single texture. Each Texelfx can only access its own memory.



  6.8.  What is a Pixelfx unit?

  Voodoo Graphics (tm) chipsets have two units. The second one
  interfaces the framebuffer and ultimately generates the depth buffer
  and pixel color updates. This one is called Pixelfx. The neat thing
  here is that two Pixelfx units can cooperate in SLI mode, like with
  some of the Quantum3D Obsidian boards, effectively doubling the frame
  rate.



  6.9.  What is SLI mode?

  SLI means "Scanline Interleave". In this mode, two Pixelfx are
  connected and render in alternate turns, one handling odd, the other
  handling even scanlines of the actual output.  Inthis mode, each
  Pixelfx stores only half of the image and half of the depth buffer
  data in its own local framebuffer, effectively doubling the number of
  pixels.

  The Pixelfx in question can be on the same board, or on two boards
  properly connected. Some Quantum3D Obsidian boards support SLI with
  Voodoo Graphics (tm).

  As two cards can decode the same PCI addresses and receive the same
  data, there is not necessarily additional bus bandwidth required by
  SLI. On the other hand, texture data will have to be replicated on
  both boards, thus the amount of texture memory effectively stays the
  same.



  6.10.  Is there a single board SLI setup?

  There are now two types of Quantum3D SLI boards.  The intial setup
  used two boards, two PCI slots, and an interconnect (e.g. the Obsidian
  100-4440).  The later revision which performs identically is contained
  on one full-length PCI board (e.g.  Obsidian 100-4440SB). Thus a
  single board SLI solution is possible, and has been done.



  6.11.  How much memory? How many buffers?

  The most essential difference between different boards using the
  Voodoo Graphics (tm) chipset is the amount and organization of memory.
  Quantum3D used a three digit scheme to descibe boards. Here is a
  slightly modifed one (anticipating Voodoo 2 (tm)). Note that if you
  use more than one Texelfx, they need the same amount of texture cache
  memory each, and if you combine two Pixelfx, each needs the same
  amount of frame buffer memory.
  ______________________________________________________________________
      "SLI / Pixelfx / Texelfx1 / Texelfx2 "
  ______________________________________________________________________


  It means that a common 2MB+2MB board would be a 1/2/2/0 solution, with
  the minimally required total 4Mb of memory. A Canopus Pure 3D would be
  1/2/4/0, or 6MB. An Obsidian-2220 board with two Texelfx would be
  1/2/2/2, and an Obsidian SLI-2440 board would be 2/2/4/4.  A fully
  featured dual board solution (2 Pixelfx, each with 2 Texelfx and 4MB
  frame buffer, each Texelfx 4 MB texture cache) would be 2/4/4/4, and
  the total amount of memory would be SLI*(Pixelfx+Texelfx1+Texelfx2),
  or 24 MB.

  So there.


  6.12.  Does the Voodoo Graphics (tm) do 24 or 32 bit color?

  No. The Voodoo Graphics (tm) architecture uses 16bpp internally.  This
  is true for  Voodoo Graphics (tm), Voodoo Rush (tm) and Voodoo 2 (tm)
  alike. Quantum3D claims to implement 22-bpp effective color depth with
  an enhanced 16-bpp frame buffer, though.


  6.13.  Does the Voodoo Graphics (tm) store 24 or 32 bit z-buffer per
  pixel?

  No. The Voodoo Graphics (tm) architecture uses 16bpp internally for
  the depth buffer, too. This again is true for  Voodoo Graphics (tm),
  Voodoo Rush (tm) and Voodoo 2 (tm) alike. Again, Quantum3D claims that
  using the floating point 16-bits per pixel (bpp) depth buffering
  provides 22-bpp effective Z-buffer precision.


  6.14.  What resolutions does the Voodoo Graphics (tm) support?

  The Voodoo Graphics (tm) chipset supports up to 4 MB frame buffer
  memory. Presuming double buffering and a depth buffer, a 2MB
  framebuffer will support a resolution of 640x480.  With 4 MB frame
  buffer, 800x600 is possible.

  Unfortunately 960x720 is not supported. The Voodoo Graphics (tm)
  chipset requires that the amount of memory for a particular resolution
  must be such that the vertical and horizontal resolutions must be
  evenly divisible by 32. The video refresh controller, though can
  output any particular resolution, but the "virtual" size required for
  the memory footprint must be in dimensions evenly divisible by 32.
  So, 960x720 actually requires 960x736 amount of memory, and
  960x736x2x3 = 4.04MBytes.

  However, using two boards with SLI, or a dual Pixelfx SLI board means
  that each framebuffer will only have to store half of the image. Thus
  2 times 4 MB in SLI mode are good up to 1024x768, which is the maximum
  because of the overall hardware design. You will be able to do
  1024x768 tripled buffered with Z, but you will not be able to do e.g.
  1280x960 with double buffering.

  Note that triple buffering (no VSync synchonization required by the
  application), stereo buffering (for interfacing LCD shutters) and
  other more demanding setups will severely decrease the available
  resolution.



  6.15.  What texture sizes are supported?

  The maximum texture size for the Voodoo Graphics (tm) chipset is
  256x256, and you have to use powers of two. Note that for really small
  textures (e.g. 16x16) you are better off merging them into a large
  texture, and adjusting your effective texture coordinates
  appropriately.


  6.16.  Does the Voodoo Graphics (tm) support paletted textures?

  The Voodoo Graphics (tm) hardware and Glide support the palette
  extension to OpenGL. The most recent version of Mesa does support the
  GL_EXT_paletted_texture and GL_EXT_shared_texture_palette extensions.



  6.17.  What about overclocking?

  If you want to put aside considerations about warranty and
  overheating, and want to do overclocking to boost up performance even
  further, there is related info out on the web. The basic mechanism is
  to use Glide environment variables to adjust the clock.

  Note that the actual recommended clock is board dependend. While the
  default clock speed is 50 Mhz, the Diamond Monster 3D property sheet
  lets you set up a clock of 57 MHz. It all comes down to the design of
  a specific board, and which components are used with the Voodoo
  Graphics (tm) chipset - most notably access speed of the RAM in
  question. If you exceed the limits of your hardware, rendering
  artifacts will occur to say the least. Reportedly, 57 MHz usually
  works, while 60 MHz or more is already pushing it.

  Increasing the clock frequency also means increasing the waste heat
  disposed in the chips, in a nonlinear dependency (10% increase in
  frequency means a lot larger increase in heating). In consequence, for
  permanent overclocking you might want to educate yourself about ways
  to  add cooling fans to the board in a way that does not affect
  warranty. A very recommendable source is the "3Dfx Voodoo Heat Report"
  by Eric van Ballegoie, available on the web.



  6.18.  Where could I get additional info on Voodoo Graphics (tm)?

  There is a FAQ by 3Dfx, which should be available at their web site.
  You will find retail information at the following locations:
  www.3dfx.com and www.quantum3d.com.

  Inofficial sites that have good info are "Voodoo Extreme" at
  www.ve3d.com, and "Operation 3Dfx" at www.ve3d.com.



  7.  FAQ: Glide? TexUS?

  7.1.  What is Glide anyway?

  Glide is a proprietary API plus drivers to access 3D graphics
  accelerator hardware based on chipsets manufactured by 3Dfx. Glide has
  been developed and implemented for DOS, Windows, and Macintosh, and
  has been ported to Linux by Daryll Strauss.



  7.2.  What is TexUS?

  In the distribution is a libtexus.so, which is the 3Dfx Interactive
  Texture Utility Software.  It is an image processing libary and
  utility program for preparing images for use with the 3Dfx Interactive
  Glide library. Features of TexUS include file format conversion,
  MIPmap creation, and support for 3Dfx Interactive Narrow Channel
  Compression textures.

  The TexUS utility program texus reads images in several popular
  formats (TGA, PPM, RGT), generates MIPmaps, and writes the images as
  3Dfx Interactive textures files (see e.g. alpha.3df, as found in the
  distribution) or as an image file for inspection. For details on the
  parameters for texus, and the API, see the TexUS documentation.



  7.3.  Is Glide freeware?

  Nope. Glide is neither GPL'ed nor subject to any other public license.
  See LICENSE in the distribution for any details. Effectively, by
  downloading and using it, you agree to the End User License Agreement
  (EULA) on the 3Dfx web site. Glide is provided as binary only, and you
  should neither use nor distribute any files but the ones released to
  the public, if you have not signed an NDA. The Glide distribution
  including the test program sources are copyrighted by 3Dfx.

  The same is true for all the sources in the Glide distribution. In the
  words of 3Dfx: These are not public domain, but they can be freely
  distributed to owners of 3Dfx products only.  No card, No code!


  7.4.  Where do I get Glide?

  The entire 3Dfx SDK is available for download off their public web-
  site located at www.3dfx.com/software/download_glide.html. Anything
  else 3Dfx publicly released by 3Dfx is nearby on their website, too.

  There is also an FTP site, ftp.3dfx.com. The FTP has a longer timeout,
  and some of the larger files have been broken into 3 files (approx.
  3MB each).



  7.5.  Is the Glide source available?

  Nope. The Glide source is made available only based on a special
  agreement and NDA with 3Dfx.


  7.6.  Is Linux Glide supported?

  Currently, Linux Glide is unsupported. Basically, it is provided under
  the same disclaimers as the 3Dfx GL DLL (see below).

  However, 3Dfx definitely wants to provide as much support as possible,
  and is in the process of setting up some prerequisites. For the time
  being, you will have to rely on the 3Dfx newsgroup (see below).

  In addition, the Quantum3D web page claims that Linux support (for
  Obsidian) is planned for both Intel and AXP architecture systems in
  2H97.



  7.7.  Where could I post Glide questions?

  There are newsgroups currently available only on the NNTP server
  news.3dfx.com run by 3Dfx.  This USENET groups are dedicated to 3Dfx
  and Glide in general, and will mainly provide assistance for DOS,
  Win95, and NT. The current list includes:

  ______________________________________________________________________
  3dfx.events
  3dfx.games.glquake
  3dfx.glide
  3dfx.glide.linux
  3dfx.products
  3dfx.test
  ______________________________________________________________________


  and the 3dfx.oem.products.* group for specific boards, eg.
  3dfx.oem.products.quantum3d.obsidian.  Please use
  news.3dfx.com/3dfx.glide.linux for all Lnux Glide related questions.

  A mailing list dedicated to Linux Glide is in preparation for 1Q98.
  Send mail to majordomo@gamers.org, no subject, body of the message
  info linux-3dfx to get information about the posting guidelines, the
  hypermail archive and how to subscribe to the list or the digest.



  7.8.  Where to send bug reports?

  Currently, you should rely on the newsgroup (see above), that is
  news.3dfx.com/3dfx.glide.linux.  There is no official support e-mail
  set up yet.  For questions not specific to Linux Glide, make sure to
  use the other newsgroups.


  7.9.  Who is maintaining it?

  3Dfx will appoint an official maintainer soon.  Currently, inofficial
  maintainer of the Linux Glide port is Daryll Strauss. Please post bug
  reports in the newsgroup (above). If you are confident that you found
  a bug not previously reported, please mail to Daryll at
  daryll@harlot.rb.ca.us


  7.10.  How can I contribute to Linux Glide?

  You could submit precise bug reports. Providing sample programs to be
  included in the distribution is another possibility. A major
  contribution would be adding code to the Glide based Mesa Voodoo
  driver source.  See section on Mesa Voodoo below.



  7.11.  Do I have to use Glide?

  Yes. As of now, there is no other Voodoo Graphics (tm) driver
  available for Linux. At the lowest level, Glide is the only interface
  that talks directly to the hardware. However, you can write OpenGL
  code without knowing anything about Glide, and use Mesa with the Glide
  based Mesa Voodoo driver.  It helps to be aware of the involvement of
  Glide for recognizing driver limitations and bugs, though.



  7.12.  Should I program using the Glide API?

  That depends on the application you are heading for.  Glide is a
  proprietary API that is partly similar to OpenGL or Mesa, partly
  contains features only available as EXTensions to some OpenGL
  implementations, and partly contains features not available anywhere
  but within Glide.

  If you want to use the OpenGL API, you will need Mesa (see below).
  Mesa, namely the Mesa Voodoo driver, offers an API resembling the well
  documented and widely used OpenGL API. However, the Mesa Voodoo driver
  is in early alpha, and you will have to accept performance losses and
  lack of support for some features.

  In summary, the decision is up to you - if you are heading for maximum
  performance while accepting potential problems with porting to
  non-3Dfx hardware, Glide is not a bad choice. If you care about
  maintenance, OpenGL might be the best bet in the long run.



  7.13.  What is the Glide current version?

  The current version of Linux Glide is 2.4.  The next version will
  probably be identical to the current version for DOS/Windows, which is
  2.4.3, which comes in two distributions. Right now, various parts of
  Glide are different for Voodoo Rush (tm) (VR) and Voodoo Graphics (tm)
  (VG) boards. Thus you have to pick up separate distributions (under
  Windows) for VR and VG.  The same will be true for Linux. There will
  possibly be another chunk of code and another distribution for Voodoo
  2 (tm) (V2) boards.

  There is also a Glide 3.0 in preparation that will extend the API for
  use of triangle fans and triangle strips, and provide better state
  change optimization. Support for fans and strips will in some
  situations significantly reduce the amount of data sent ber triangle,
  and the Mesa driver will benefit from this, as the OpenGL API has
  separate modes for this. For a detailed explanation on this see e.g.
  the OpenGL documentation.



  7.14.  Does it support multiple Texelfx already?

  Multiple Texelfx/TMU's can be used for single pass trilinear
  mipmapping for improvement image quality without performance penalty
  in current Linux Glide already. You will need a board with two Texelfx
  (that is, one of the appropriate Quantum3D Obsidian boards). The
  application needs to specify the use of both Texelfx accordingly, it
  does not happen automatically.

  Note that because most applications are implemented for consumer
  boards with a single Texelfx, they might not query the presence of a
  second Texelfx, and thus not use it. This is not a flaw of Glide but
  of the application.



  7.15.  Is Linux Glide identical to DOS/Windows Glide?

  The publicly available version of Linux Glide should be identical to
  the respective DOS/Windows versions.  Delays in releasing the Linux
  port of newer DOS/Windows releases are possible.


  7.16.  Where to I get information on Glide?

  There is exhaustive information available from 3Dfx. You could
  download it from their home page at
  www.3dfx.com/software/download_glide.html.  These are for free,
  presuming you bought a 3Dfx hardware based board. Please read the
  licensing regulations.

  Basically, you should look for some of the following:

  o  Glide Release Notes

  o  Glide Programming Guide

  o  Glide Reference Manual

  o  Glide Porting Guide

  o  TexUs Texture Utility Software

  o  ATB Release Notes

  o  Installing and Using the Obsidian

     These are available as Microsoft Word documents, and part of the
     Windows Glide distribution, i.e.  the self-extracting archive file.
     Postscript copies for separate download should be available at
     www.3dfx.com as well. Note that the release numbers are not always
     in sync with those of Glide.



  7.17.  Where to get some Glide demos?

  You will find demo sources for Glide within the distribution (test
  programs), and on the 3Dfx home page. The problem with the latter is
  that some require ATB. To port these demos to Linux, the event
  handling has to be completely rewritten.

  In addition, you might find useful some of the OpenGL demo sources
  accompanying Mesa and GLUT. While the Glide API is different from the
  OpenGL API, they target the same hardware rendering pipeline.



  7.18.  What is ATB?

  Some of the 3Dfx demo programs for Glide depend not only on Glide but
  also on 3Dfx's proprietary Arcade Toolbox (ATB), which is available
  for DOS and Win32, but has not been ported for Linux. If you are a
  devleoper, the sources are available within the Total Immersion
  program, so porting ATB to Linux would be possible.



  8.  FAQ: Glide and XFree86?


  8.1.  Does it run with XFree86?

  Basically, the Voodoo Graphics (tm) hardware does not care about X.
  The X server will not even notice that the video signal generated by
  the VGA hardware does not reach the display in single screen
  configurations. If your application is not written X aware, Glide
  switching to full screen mode might cause problems (see
  troubleshooting section). If you do not want the overhead of writing
  an X11-aware application, you might want to use SVGA console mode
  instead.

  So yes, it does run with XFree86, but no, it is not cooperating if you
  don't write your application accordingly. You can use the Mesa "window
  hack", which will be significantly slower than fullscreen, but still a
  lot faster than software rendering (see section below).



  8.2.  Does it only run full screen?

  See above. The Voodoo Graphics (tm) hardware is not window environment
  aware, neither is Linux Glide. Again, the experimental Mesa "window
  hack" covered below will allow for pasting the Voodoo Graphics (tm)
  board framebuffer's content into an X11 window.



  8.3.  What is the problem with AT3D/Voodoo Rush (tm) boards?

  There is an inherent problem when using Voodoo Rush (tm) boards with
  Linux: Basically, these boards are meant to be VGA 2D/3D accelerator
  boards, either as a single board solution, or with a Voodoo Rush (tm)
  based daughterboard used transparently. The VGA component tied to the
  Voodoo Rush (tm) is a Alliance Semiconductor's ProMotion-AT3D
  multimedia accelerator.  To use this e.g. with XFree86 at all, you
  need a driver for the AT3D chipset.

  There is a mailing list on this, and a web site with FAQ at
  www.frozenwave.com/linux-stingray128.  Look there for most current
  info.  There is a SuSE maintained driver at
  ftp.suse.com/suse_update/special/xat3d.tgz.  Reportedly, the XFree86
  SVGA server also works, supporting 8, 16 and 32 bpp.  Official support
  will probably be in XFree86 4.0.  XFree86 decided to prepare an
  intermediate XFree86 3.3.2 release as well, which might already
  address the issues.

  The following XF86Config settings reportedly work.

  ______________________________________________________________________
  # device section settings
  Chipset "AT24"
  Videoram 4032

  # videomodes tested by Oliver Schaertel
  #  25.18  28.32  for 640 x 480   (70hz)
  #  61.60         for 1024 x 786  (60hz)
  #  120           for 1280 x 1024 (66hz)
  ______________________________________________________________________


  In summary, there is nothing prohibiting this except for the fact that
  the drivers in XFree86 are not yet finished.

  If you want a more technical explanation: Voodoo Rush (tm) support
  requires X server changes to support grabbing a buffer area in the
  video memory on the AT3D board, as the Voodoo Rush (tm) based boards
  need to store their back buffer and z buffer there. This  memory
  allocation and locking requirement is not a 3Dfx specific problem, it
  is also needed e.g. for support of TV capture cards, and is thus under
  active development for XFree86. This means changes at the device
  dependend X level (thus XAA), which are currently implemented as an
  extension to XFree86 DGA (Direct Graphics Access, an X11 extension
  proposal implemented in different ways by Sun and XFree86, that is not
  part of the final X11R6.1 standard and thus not portable). It might be
  part of an XFree86 GLX implementation later on. The currently
  distributed X servers assume they have full control of the
  framebuffer, and use anything that is not used by the visual region of
  the framebuffer as pixmap cache, e.g. for caching fonts.



  8.4.  What about GLX for XFree86?

  There are a couple of problems.

  The currently supported Voodoo Graphics (tm) hardware and the
  available revision of Linux Glide are full screen only, and not set up
  to share a framebuffer with a window environment. Thus GLX or other
  integration with X11 is not yet possible.

  The Voodoo Rush (tm) might be capable of cooperating with XFree86
  (that is, an SVGA compliant board will work with the XFree86 SVGA
  server), but it is not yet supported by Linux Glide, nor do S3 or
  other XFree86 servers support these boards yet.

  In addition, GLX is tied to OpenGL or, in the Linux case, to Mesa.
  The XFree86 team is currently working on integrating Mesa with their X
  Server. GLX is in beta, XFree86 3.3 has the hooks for GLX.  See Steve
  Parker's GLX pages at www.cs.utah.edu/~sparker/xfree86-3d/ for the
  most recent information.  Moreover, there is a joint effort by XFree86
  and SuSe, which includes a GLX, see www.suse.de/~sim/.  Currently,
  Mesa still uses its GLX emulation with Linux.



  8.5.  Glide and commerical X Servers?

  I have not received any mail regarding use of Glide and/or Mesa with
  commercial X Servers.  I would be interested to get confirmation on
  this, especially on Mesa and Glide with a commercial X Server that has
  GLX support.



  8.6.  Glide and SVGA?

  You should have no problems running Glide based applications either
  single or dual screen using VGA modes. It might be a good idea to set
  up the 640x480 resolution in the SVGA modes, too, if you are using a
  single screen setup.


  8.7.  Glide and GGI?

  A GGI driver for Glide is under development by Jon M. Taylor, but has
  not officially been released and was put on hold till completion of
  GGI 0.0.9. For information about GGI see synergy.caltech.edu/~ggi/.
  If you are adventurous, you might find the combination of XGGI (a GGI
  based X Server for XFree86) and GGI for Glide an interesting prospect.
  There is also a GGI driver interfacing the OpenGL API; tested with
  unaccelerated Mesa. Essentially, this means X11R6 running on a Voodoo
  Graphics (tm), using either Mesa or Glide directly.



  9.  FAQ: OpenGL/Mesa?



  9.1.  What is OpenGL?

  OpenGL is an immediate mode graphics programming API originally
  developed by SGI based on their previous proprietary Iris GL, and
  became in industry standard several years ago. It is defined and
  maintained by the Architectural Revision Board (ARB), an organization
  that includes members as SGI, IBM, and DEC, and Microsoft.

  OpenGL provides a complete feature set for 2D and 3D graphics
  operations in a pipelined hardware accelerated architecture for
  triangle and polygon rendering. In a broader sense, OpenGL is a
  powerful and generic toolset for hardware assisted computer graphics.



  9.2.  Where to get additional information on OpenGL?

  The official site for OpenGL maintained by the members of the ARB, is
  www.opengl.org,

  A most recommended site is Mark Kilgard's Gateway to OpenGL Info at
  reality.sgi.com/mjk_asd/opengl-links.html: it provides pointers to
  book, online manual pages, GLUT, GLE, Mesa, ports to several OS, tons
  of demos and tools.

  If you are interested in game programming using OpenGL, there is the
  OpenGL-GameDev-L@fatcity.com at Listserv@fatcity.com. Be warned, this
  is a high traffic list with very technical content, and you will
  probably prefer to use procmail to handle the 100 messages per day
  coming in. You cut down bandwidth using the SET OpenGL-GameDev-L
  DIGEST command. It is also not appropriate if you are looking for
  introductions.  The archive is handled by the ListServ software, use
  the INDEX OpenGL-GameDev-L and GET OpenGL-GameDev-L "filename"
  commands to get a preview before subscribing.



  9.3.  Is Glide an OpenGL implementation?

  No, Glide is a proprietary 3Dfx API which several features specific to
  the Voodoo Graphics (tm) and Voodoo Rush (tm). A 3Dfx OpenGL is in
  preparation (see below). Several Glide features would require
  EXTensions to OpenGL, some of which already found in other
  implementations (e.g. paletted textures).

  The closest thing to a hardware accelerated Linux OpenGL you could
  currently get is Brian Paul's Mesa along with David Bucciarelli's Mesa
  Voodoo driver (see below).



  9.4.  Is there an OpenGL driver from 3Dfx?

  Both the 3Dfx website and the Quantum3D website announced OpenGL for
  Voodoo Graphics (tm) to be available 4Q97.  The driver is currently in
  Beta, and accessible only to registered deverloper's under written
  Beta test agreement.

  A linux port has not been announced yet.



  9.5.  Is there a commercial OpenGL for Linux and 3Dfx?

  I am not aware of any third party commercial OpenGL that supports the
  Voodoo Graphics (tm). Last time I paid attention, neither MetroX nor
  XInside OpenGL did.



  9.6.  What is Mesa?

  Mesa is a free implementation of the OpenGL API, designed and written
  by Brian Paul, with contributions from many others. Its performance is
  competitive, and while it is not officially certified, it is an almost
  fully compliant OpenGL implementation conforming to the ARB
  specifications - more complete than some commercial products out,
  actually.



  9.7.  Does Mesa work with 3Dfx?

  The latest Mesa MesaVer; release works with Linux Glide 2.4. In fact,
  support was included in earlier versions, however, this driver is
  still under development, so be prepared for bugs and less than optimal
  performance. It is steadily improving, though, and bugs are usually
  fixed very fast.

  You will need to get the Mesa library archive from the
  iris.ssec.wisc.edu FTP site.  It is recommended to subscribe to the
  mailing list as well, especially when trying to track down bugs,
  hardware, or driver limitations. Make sure to get the most recent
  distribution. A Mesa-3.0 is in preparation.



  9.8.  How portable is Mesa with Glide?

  It is available for Linux and Win32, and any application based on Mesa
  will only have the usual system specific code, which should usually
  mean XWindows vs. Windows, or GLX vs. WGL. If you use e.g. GLUT or Qt,
  you should get away with any system specifics at all for virtually
  most applications. There are only a few issues (like sampling relative
  mouse movement) that are not adressed by the available portable GUI
  toolkits.

  Mesa/Glide is also available for DOS. The port which is 32bit DOS is
  maintained by Charlie Wallace and kept up to date with the main Mesa
  base. See www.geocities.com/~charlie_x/.for the most current releases.



  9.9.  Where to get info on Mesa?

  The Mesa home page is at www.ssec.wisc.edu/~brianp/Mesa.html.  There
  is an archive of the Mesa mailing list.  at www.iqm.unicamp.br/mesa/.
  This list is not specific to 3Dfx and Glide, but if you are interested
  in using 3Dfx hardware to accelerate Mesa, it is a good place to
  start.


  9.10.  Where to get information on Mesa Voodoo?

  For latest information on the Mesa Voodoo driver maintained by David
  Bucciarelli tech.hmw@plus.it see the home page at www-
  hmw.caribel.pisa.it/fxmesa/.

  9.11.  Does Mesa support multitexturing?

  Not yet (as of Mesa 2.6), but it is on the list.  In Mesa you will
  probably have to use the OpenGL EXT_multitexture extension once it is
  available. There is no final specification for multitextures in
  OpenGL, which is supposed to be part of the upcoming OpenGL 1.2
  revision. There might be a Glide driver specific implementation of the
  extension in upcoming Mesa releases, but as long as only certain
  Quantum3D Obsidian boards come with multiple TMU's, it is not a top
  priority. This will surely change once Voodoo 2 (tm) based boards are
  in widespread use.



  9.12.  Does Mesa support single pass trilinear mipmapping?

  Multiple TMU's should be used for single pass trilinear mipmapping for
  improvement image quality without performance penalty in current Linux
  Glide already. Mesa support is not yet done (as of Mesa 2.6), but is
  in preparation.



  9.13.  What is the Mesa "Window Hack"?

  The most recent revisions of Mesa contain an experimental feature for
  Linux XFree86. Basically, the GLX emulation used by Mesa copies the
  contents of the Voodoo Graphics (tm) board's most recently finished
  framebuffer content into video memory on each glXSwapBuffers call.
  This feature is also available with Mesa for Windows.

  This obviously puts some drain on the PCI, doubled by the fact that
  this uses X11 MIT SHM, not XFree86 DGA to access the video memory. The
  same approach could theoretically be used with e.g. SVGA. The major
  benefit is that you could use a Voodoo Graphics (tm) board for
  accelerated rendering into a window, and that you don't have to use
  the VGA passthrough mode (video output of the VGA board deteoriates in
  passing through, which is very visible with high end monitors like
  e.g. EIZO F784-T).

  Note that this experimental feature is NOT Voodoo Rush (tm) support by
  any means. It applies only to the Voodoo Graphics (tm) based boards.
  Moreover, you need to use a modified GLUT, as interfacing the window
  management system and handling the events appropriately has to be done
  by the application, it is not handled in the driver.

  Make really sure that you have enabled the following environment
  variables:

  ______________________________________________________________________
  export SST_VGA_PASS=1          # to stop video signal switching
  export SST_NOSHUTDOWN=1        # to stop video signal switching
  export MESA_GLX_FX="window"    # to initiate Mesa window mode
  ______________________________________________________________________


  If you manage to forget one of the SST variables, your VGA board will
  be shut off, and you will loose the display (but not the actual X). It
  is pretty hard to get that back being effectively blind.

  Finally, note that the libMesaGL.a (or .so) library can contain
  multiple client interfaces.  I.e. the GLX, OSMesa, and fxMesa (and
  even SVGAMesa) interfaces call all be compiled into the same
  libMesaGL.a. The client program can use any of them freely, even
  simultaneously if it's careful.



  9.14.  How about GLUT?

  Mark Kilgard's GLUT distribution is a very good place to get sample
  applications plus a lot of useful utilities.  You will find it at
  reality.sgi.com/mjk_asd/glut3/, and you should get it anyway. The
  current release is GLUT 3.6, and discussion on a GLUT 3.7 (aka
  GameGLUT) has begun. Note that Mark Kilgard has left SGI recently, so
  the archive might move some time this year - for the time being it
  will be kept at SGI.

  There is also a GLUT mailing list, glut@perp.com. Send mail to
  majordomo@perp.com, with the (on of the) following in the body of your
  email message:

  ______________________________________________________________________
     help
     info glut
     subscribe glut
     end
  ______________________________________________________________________



  As GLUT handles double buffers, windows, events, and other operations
  closely tied to hardware and operating system, using GLUT with Voodoo
  Graphics (tm) requires support, which is currently in development
  within GLX for Mesa. It already works for most cases.



  10.  FAQ: But Quake?

  10.1.  What about that 3Dfx GL driver for Quake?

  The 3Dfx Quake GL, aka mini-driver, aka miniport, aka Game GL, aka
  3Dfx GL alpha, implemented only a Quake-specific subset of OpenGL (see
  http://www.cs.unc.edu/~martin/3dfx.html for an inofficial list of
  supported code paths). It is not supported, and not updated anymore.
  It was a Win32 DLL (opengl32.dll) released by 3Dfx and was available
  for Windows only. This DLL is not, and will not be ported to Linux.


  10.2.  Is there a 3Dfx based glQuake for Linux?

  Yes. A Quake linuxquake v0.97 binary has been released based on Mesa
  with Glide. The Quake2 q2test binary for Linux and Voodoo Graphics
  (tm) has been made available as well.  A full Quake2 for Linux was
  released in January 1998, with linuxquake2-3.10. Dave "Zoid" Kirsch is
  the official maintainer of all Linux ports of Quake, Quakeworld, and
  Quake2, including all the recent Mesa based ports. Note that all Linux
  ports, including the Mesa based ones, are not officially supported by
  id Software.

  See ftp.idsoftware.com/idstuff/quake/unix/ for the latest releases.



  10.3.  Does glQuake run in an XFree86 window?

  A revision of Mesa and the Mesa-based Linux glQuake is in preparation.
  Mesa already does support this by GLX, but Linux glQuake does not use
  GLX.



  10.4.  Known Linux Quake problems?

  Here is an excerpt, as of January 7th, 1998. I omitted most stuff not
  specific to &3Dfx; hardware.

  o  You really should run Quake2 as root when using the SVGALib and/or
     GL renders. You don't have to run as root for the X11 refresh, but
     the modes on the mouse and sound devices must be read/writable by
     whatever user you run it as. Dedicated server requires no special
     permissions.

  o  X11 has some garbage on the screen when 'loading'. This is normal
     in 16bit color mode. X11 doesn't work in 24bit (TrueColor). It
     would be very slow in any case.

  o  Some people are experiencing crashes with the GL renderer. Make
     sure you install the libMesa that comes with Quake2! Older versions
     of libMesa don't work properly.

  o  If you are experience video 'lag' in the GL renderer (the frame
     rate feels like it's lagging behind your mouse movement) type
     "gl_finish 1" in the console. This forces update on a per frame
     basis.

  o  When running the GL renderer, make sure you have killed selection
     and/or gpm or the mouse won't work as they won't "release" it while
     Quake2 is running in GL mode.


  10.5.  Know Linux Quake security problems?

  As Dave Kirsch posted on January 28th, 1998: an exploit for Quake2
  under Linux has been published. Quake2 is using shared libraries.
  While the READMRE so far does not specifically mention it, note that
  Quake2 should not be setuid.

  If you want to use the ref_soft and ref_gl renderers, you should run
  Quake2  as root. Do not make the binary setuid. You can only run both
  those renderers at the console only, so being root is not that much of
  an issue.

  The X11 render does not need any root permissions (if /dev/dsp is
  writable by others for sound).  The dedicated server mode does not
  need to be root either, obviously.

  Problems such as root requirements for games has been sort of a sore
  spot in Linux for a number of years now. This is one of the goals that
  e.g. GGI is targetting to fix.  A ref_ggi might be supported in the
  near future.


  10.6.  Does LinuxQuake use multitexturing?

  To my understadnding, glQuake will use a multitexture EXTension if the
  OpenGL driver in question offers it.  The current Mesa implementation
  and the Glide driver for Linux do not yet support this extension, so
  for the time being the answer is no. See section on Mesa and
  multitexturing for details.
  10.7.  Where can I get current information on Linux glQuake?

  Try some of these sites: the "The Linux Quake Resource" at
  linuxquake.telefragged.com, or the "Linux Quake Page" at
  www.planetquake.com/threewave/linux/.  Alternatively, you could look
  for Linux Quake sites in the "SlipgateCentral" database at
  www.slipgatecentral.com.



  11.  FAQ: Troubleshooting?

  11.1.  Has this hardware been tested?

  See hardware requirements list above. I currently do not maintain a
  conclusive list of vendors and boards, as no particular board specific
  problems have been verified.  Currently, only 3Dfx and Quantum3D
  provide boards for testing to the developers, so Quantum3D consumer
  boards are a safe bet. Every other Voodoo Graphics (tm) based board
  should work, too. I have reports regarding the Orchid Righteous 3D,
  Guillemot Maxi 3D Gamer, and Diamond Monster 3D.

  If you are a board manufacturer who wants to make sure his Voodoo
  Graphics (tm), Voodoo Rush (tm) or Voodoo 2 (tm) boards work with
  upcoming releases of Linux, Xfree86, Linux Glide and/or Mesa, please
  contact me, and I will happily forward your request to the persons
  maintaining the drivers in question. If you are interested in support
  for Linux Glide on other then the PC platfrom, e.g. DEC Alpha, please
  contact the maintainer of Linux Glide Daryll Strauss, at
  daryll@harlot.rb.ca.us



  11.2.  Failed to change I/O privilege?

  You need to be root, or setuid your application to run a Glide based
  application.  For DMA, the driver accesses /dev/mem, which is not
  writeable for anybody but root, with good reasons. See the README in
  the Glide distribution for Linux.



  11.3.  Does it work without root privilege?

  There are compelling case where the setuid requirement is a problem,
  obviously. There are currently solutions in preparation, which require
  changes to the library internals itself.



  11.4.  Displayed images looks awful (single screen)?

  If you are using the analog pass through configuration, the common
  SVGA or X11 display might look pretty bad.  You could try to get a
  better connector cable than the one provided with the accelerator
  board (the ones delivered with the Diamond Monster 3D are reportedly
  worse then the one accompanying the Orchid Righteous 3D), but up to a
  degree there will inevitably be signal loss with an additional
  transmission added.

  If the 640x480 full screen image created by the accelerator board does
  look awful, this might indicate a real hardware problem. You will have
  to contact the board manufacturer, not 3Dfx for details, as the
  quality of the video signal has nothing to do with the accelerator -
  the board manufacturer chooses the RAMDAC, output drivers, and other
  components responsible.



  11.5.  The last frame is still there (single or dual screen)?

  You terminated your application with Ctrl-C, or it did not exit
  normally. The accelerator board will dutifully provide the current
  content of the framebuffer as a video signal unless told otherwise.



  11.6.  Powersave kicks in (dual screen)?

  When you application terminates in dual screen setups, the accelerator
  board does not provide video output any longer. Thus powersave kicks
  each time. To avoid this, use

  ______________________________________________________________________
  setenv SST_DUALSCREEN 1
  ______________________________________________________________________



  11.7.  My machine seem to lock (X11, single screen)?

  If you are running X when calling a Glide application, you probably
  moved the mouse out of the window, and the keyboard inputs do not
  reach the application anymore.

  If you application is supposed to run concurrently with X11, it is
  recommend to expose a full screen window, or use the XGrabPointer and
  XGrabServer functions to redirect all inputs to the application while
  the X server cannot access the display. Note that grabbing all input
  with XGrabPointer and XGrabServer does not qualify as well-behaved
  application, and that your program might block the entire system.

  If you experience this problem without running X, be sure that there
  is no hardware conflict (see below).


  11.8.  My machine locks (single or dual screen)?

  If the system definitely does not respond to any inputs (you are
  running two displays and know about the loss of focus), you might
  experience a more or less subtle hardware conflict.  See installation
  troubleshooting section for details.

  If there is no obvious address conflict, there might still be other
  problems (below). If you are writing your own code the most common
  reason for locking is that you didn't snap your vertices. See the
  section on snapping in the Glide documentation.


  11.9.  My machine locks (used with S3 VGA board)?

  It is possible you have a problem with memory region overlap specific
  to S3. There is some info and a patch to the so-called S3 problem in
  the 3Dfx web site, but these apply to Windows only. To my
  understanding, the cause of the problem is that some S3 boards (older
  revisions of Diamond Stealth S3 968) reserve more memory space than
  actually used, thus the Voodoo Graphics (tm) has to be mapped to a
  different location. However, this has not been reported as a problem
  with Linux, and might be Windows-specific.
  11.10.  No address conflict, but locks anyway?

  If you happen to use a motherboard with non-standard or incomplete PCI
  support, you could try to shuffle the boards a bit. I am running an
  ASUS TP4XE that has that non-standard modified "Media Slot", i.e. PCI
  slot4 with additional connector for ASUS-manufactured SCSI/Sound combo
  boards, and I experienced severe problems while running a Diamond
  Monster 3D in that slot. The system operates flawlessly since I put
  the board in one of the regular slots.



  11.11.  Mesa runs, but does not access the board?

  Be sure that you recompiled all the libraries (including the toolkits
  the demo programs use - remember that GLUT does not yet support Voodoo
  Graphics (tm)), and that you removed the older libraries, run
  ldconfig, and/or set your LD_LIBRARY_PATH properly.  Mesa supports
  several drivers in parallel (you could use X11 SHM, off screen
  rendering, and Mesa Voodoo at the same time), and you might have to
  create and switch contexts explicitely (see MakeCurrent function) if
  the Voodoo Graphics (tm) isn't chosen by default.



  11.12.  Resetting dual board SLI?

  If a Quantum 3D Obsidian board using in an SLI setup exits abruptly
  (i.e., the application crashes, or is aborted by user), the boards are
  left in an undefined state.  With the dual-board set, you can run a
  program called resetsli to reset them. Until you run the resetsli
  program, you will not be able to re-initialize the Obsidian board.



  11.13.  Resetting single board SLI?

  The resetsli program mentioned above does not yet work with a single
  board Obsidian SLI (e.g. the Obsidian 100-4440SB). You will have to
  reboot your system by reset in order to reset the board.



  4mb Laptop HOWTO
  Bruce Richardson <brichardson@lineone.net>

  25 March 2000

  How to put a "grown-up" Linux on a small-spec (4mb RAM, <=200mb hard
  disk) laptop.

  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Why this document was written.
     1.2 What use is a small laptop?
     1.3 Why not just upgrade the laptop?
     1.4 What about 4mb desktop machines?
     1.5 What this document doesn't do.
     1.6 Where to find this document.
     1.7 Copyright

  2. The Laptops

     2.1 Basic Specifications
        2.1.1 Compaq Contura Aero
        2.1.2 Toshiba T1910
     2.2 The Problem
     2.3 The Solution

  3. Choices Made

     3.1 What to use to create the initial root partition?
     3.2 The Distribution
           3.2..1 But I don't like Slackware!
     3.3 Which installation method to use?
     3.4 Partition Layout
        3.4.1 Basic Requirement
        3.4.2 How complex a layout?
     3.5 Which components to install?

  4. The Pre-installation Procedure

     4.1 muLinux Preparation
     4.2 Prepare the installation root files.
     4.3 Create the partitions.
        4.3.1 Mini-Linuces and ext2 file-systems - an important note.
        4.3.2 Procedure

  5. The Installation

     5.1 Boot the machine
     5.2 Floppy/Parport CD-ROM Install
     5.3 Network/PCMCIA Install
        5.3.1 PCMCIA install on the Aero
     5.4 Set-up
        5.4.1 AddSwap
        5.4.2 Target
        5.4.3 Select
        5.4.4 Install
        5.4.5 Configure
        5.4.6 Exit
     5.5 Pre-reboot Configuration
     5.6 Post-reboot Configuration.
        5.6.1 Re-use the temporary root.
        5.6.2 Other configuration tweaks.

  6. Conclusion

  7. Appendix A:

     7.1 A - Base Linux System
           7.1..1 Packages considered for omission:
           7.1..2 Packages installed:
     7.2 AP - Non-X Applications
           7.2..1 Packages considered for inclusion:
           7.2..2 Packages installed:
     7.3 D - Development Tools
           7.3..1 Packages installed:
     7.4 E - Emacs
           7.4..1 Packages installed:
     7.5 F - FAQs and HOWTOs
           7.5..1 Packages installed:
     7.6 K - Kernel Source
           7.6..1 Packages Installed:
     7.7 N - Networking Tools and Apps
           7.7..1 Packages installed:
     7.8 Tetex
           7.8..1 Packages installed:
     7.9 Y - BSD Games Collection
           7.9..1 Packages installed:
     7.10 End result

  8. Appendix B: Resources relevant to this HOWTO



  ______________________________________________________________________

  1.  Introduction

  1.1.  Why this document was written.

  I got my hands on two elderly laptops, both with just 4mb RAM and
  small (<=200mb) hard drives. I wanted to install Linux on them. The
  documentation for this kind of laptop all recommends installing either
  a mini-Linux or an old (and therefor compact) version of one of the
  professional distributions.  I wanted to install an up-to-date
  professional distribution.

  1.2.  What use is a small laptop?

  Plenty. It isn't going to run X or be a development box (see ``Which
  components to install?'') but if you are happy at the console you have
  a machine that can do e-mail, networking, writing etc. Laptops also
  make excellent diagnostic/repair tools and the utilities for that will
  easily fit onto small laptops.

  1.3.  Why not just upgrade the laptop?

  Upgrading old laptops is not much cheaper than upgrading new ones.
  That's a lot to spend on an old machine, especially considering that
  the manufacturer isn't supporting it any more and spare parts are hard
  to find.

  1.4.  What about 4mb desktop machines?

  The procedure described in this document will work perfectly well on a
  desktop PC. On the other hand, upgrading a desktop machine is far
  easier and cheaper than upgrading a laptop. Even if you don't upgrade
  it, there are still simpler options. You could take out the hard disk,
  put it in a more powerful machine, install Linux, trim it to fit and
  then put the disk back in the old machine.

  1.5.  What this document doesn't do.

  This document is not a general HOWTO about installing Linux on laptops
  or even a specific HOWTO for either of the two machines mentioned
  here. It simply describes a way of squeezing a large Linux into a very
  small space, citing two specific machines as examples.



  1.6.  Where to find this document.

  The latest copy of this document can be found in several formats at
  http://website.lineone.net/~brichardson/linux/4mb_laptops/.

  1.7.  Copyright

  This document is copyright (c) Bruce Richardson 2000. It may be
  distributed under the terms set forth in the LDP license at
  sunsite.unc.edu/LDP/COPYRIGHT.html.

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the LDP license. This document is
  distributed in the hope that it will be useful, but without any
  warranty; without even the implied warranty of merchantability or
  fitness for a particular purpose. See the LDP license for more
  details.

  Toshiba and T1910 are trademarks of Toshiba Corporation. Compaq and
  Contura Aero are trademarks of Compaq Computer Corporation.

  2.  The Laptops

  This section describes the laptops that I have used this procedure on,
  the problems faced when installing Linux on them and the solutions to
  those problems (in outline).

  2.1.  Basic Specifications

  2.1.1.  Compaq Contura Aero


    25MHz 486SX CPU

    4mb RAM

    170mb Hard Disk

    1 PCMCIA Type II slot

    External PCMCIA 3.5" Floppy drive   (-- The PCMCIA floppy drive has
     a proprietary interface which is partly handled by the Aero's
     unique BIOS. The Linux PCMCIA drivers can't work with it. According
     to the PCMCIA-HOWTO, if the drive is connected when the laptop
     boots it will work as a standard drive and Card Services will
     ignore the socket but it is not hot-swappable. However, I found
     that the drive becomes inaccessible as soon as Card Services start
     unless there is a mounted disk in the drive. This has implications
     for the installation process - these are covered at the relevant
     points.  --)


  2.1.2.  Toshiba T1910


    33MHz 486SX CPU

    4mb RAM

    200 mb Hard Disk

    Internal 3.5" Floppy drive

    1 PCMCIA Type II/III slot


  2.2.  The Problem

  The small hard disks and the lack of an internal floppy on the Aero
  make the installation more tricky than normal but the real problem is
  the RAM. None of the current distributions has an installation disk
  that will boot in 4mb, not even if the whole hard disk is a swap
  partition.

  The standard installation uses a boot disk to uncompress a root-
  partition image (either from a second floppy or from CD-ROM) into a
  ram-disk. The root-image is around 4mb in size. That's all the RAM
  available in this scenario. Try it and it freezes while unpacking the
  root-image.

  2.3.  The Solution

  The answer is to eliminate the ram-disk. If you can mount root on a
  physical partition you will have enough memory to do the install.
  Since the uncompressed ram-disk is too big to fit on a floppy, the
  only place left is on the hard disk of the laptop. The steps are:


  1. Find something that will boot in 4mb ram and which can also create
     ext2 partitions.

  2. Use it to create a swap partition and a small ext2 partition on the
     laptop's hard disk.

  3. Uncompress the installation root-image and copy it onto the ext2
     partition.

  4. Boot the laptop from the installation boot-disk, pointing it at the
     ext2 partition on the hard disk.

  5. The installation should go more or less as normal from here.

  The only question was whether a distribution that wouldn't install
  (under normal circumstances) on the laptops would run on them. The
  short answer is "Yes".

  If you're an old Linux hand then that's all you need to know. If not,
  read on - some of the steps listed above aren't as simple as they
  look.

  3.  Choices Made

  This section describes the choices available, which options are
  practical, which ones I decided on and why.

  3.1.  What to use to create the initial root partition?

  The best tool for this is a mini-Linux. There's a wide selection of
  small Linuces available on the net, but most of them won't boot in 4mb
  RAM. I found two that will:


     SmallLinux  http://smalllinux.netpedia.net/
        SmallLinux will boot in as little as 2mb RAM but its root disk
        can't be taken out of the drive, which is a shame since
        otherwise it has everything we need (i.e. fdisk, mkswap and
        mkfs.ext2). SmallLinux can create the needed partitions but
        can't be used to copy the root partition.

     muLinux  http://sunsite.auc.dk/mulinux/
        muLinux will boot in 4mb but only in a limited single-user mode.
        In this mode fdisk and mkswap are available but mkfs.ext2 and
        the libraries needed to run it are on the /usr partition which
        is not available in maintenance mode. To use muLinux to do the
        whole pre-installation procedure the files needed to create ext2
        file-systems must be extracted from the usr disk image and
        copied onto a floppy.

  This gives the option of either using SmallLinux to create the
  partitions and muLinux to copy the root partition or using muLinux to
  do the whole job.  Since I had two laptops I tried both.

  3.2.  The Distribution

  It didn't take much time to choose Slackware. Apart from the fact that
  I like it but haven't used it much and want to learn more, I
  considered the following points:


    Slackware has possibly the most low-tech DIY install of all the
     major distributions.  It is also one of the most flexible, coming
     with a wide range of boot-disk kernels to suit many different
     machines. This makes it well suited to the kind of hacking about
     required in this scenario.

    Slackware supports all the methods listed in ``Which Installation
     method to use?''.

    Slackware is a distribution designed by one person. I'm sure
     Patrick Volkerding won't object if I say this means its
     configuration tools are simpler and more streamlined. In my opinion
     this makes the job of trimming the installation to fit cramped
     conditions easier.

  Version 7.0 was the latest version when I tried this so that's what I
  used.

  3.2.0.1.  But I don't like Slackware!

  You don't have to use it. I can't answer for all the distributions but
  I know that Debian, Red Hat and SuSE offer a range of installation
  methods and have an "expert" installation procedure   (-- Does Debian
  do any other kind?  --)

  which can be used here. Most of the steps in this document would apply
  to any of the distributions without change.

  If you haven't used the expert method with your preferred distribution
  before, do a trial run on a simple desktop machine to get the feel of
  it and to explore the options it offers.

  3.3.  Which installation method to use?


     Floppy Install
        This means churning out 15 floppies - which only gives you an
        absolute minimal install and requires a second stage to get the
        apps you want on. It's also very slow on such low-spec machines.
        This is a last resort if you can't make the others work.

     Parallel-port Install
        Where the parallel port has an IDE device, parallel cable or
        pocket ethernet adaptor   (-- A pocket lan adaptor installation
        onto these machines will be very slow.  --)

        attached. This would be a good choice for the Aero, leaving the
        PCMCIA slot free to run the floppy drive.

     PCMCIA Install
        As above, this could be a CD-ROM or network install.  This would
        be the best method for the T1910 - on the Aero it's a bit more
        awkward.

     ISA/PCI Ethernet Install
        Not an option for the laptops, obviously, but included in case
        your target machine is a desktop PC.


       The tools I had to hand dictated a PCMCIA network install. I
       will point out where steps differ for the other methods.
       Whichever method you choose, you need to have a higher-spec
       machine available - even if only to create the disks for a
       floppy install.


  3.4.  Partition Layout

  3.4.1.  Basic Requirement

  This procedure requires at least two Linux Native partitions in
  addition to a Swap partition. Since one of the ext2 partitions will be
  in use as temporary root during the installation it will not be
  available as a target partition and so should be small - though no
  smaller than 5mb. It makes sense to create for this a partition that
  you will re-use as /home after installation is complete.  Another
  option would be to re-create it as a DOS partition to give you a dual
  boot laptop.

  3.4.2.  How complex a layout?

  There isn't room to get too clever here. There is an argument for
  having a single ext2 partition and using a swap file to avoid wasting
  space but I would strongly urge creating a separate partition for
  /usr. If you have only one partition and something goes wrong with it
  you may well be faced with a complete re-installation. Separating /usr
  and having a small partition for / makes disaster recovery a more
  likely prospect. On both machines I created 4 partitions in total:


  1. A swap partition -- 16mb on the T1910, 20 on the Aero (I'm more
     likely to upgrade the memory on the Aero).

  2. /home (temporary root during installation) -- 10mb

  3. / -- 40mb on the T1910, 30mb on the Aero.

  4. /usr -- All the remainder.

  In addition, the Aero uses hda3 for a 2mb DOS partition containing
  configuration utilities. See the Aero FAQs for details.

  3.5.  Which components to install?

  The full glibc libraries alone would nearly fill the hard disks so
  there's no question of building a development machine. It looks as if
  a minimal X installation can be squeezed in but I'm sure it would
  crawl and I don't want it anyway.  I decide to install the following
  (for a full listing see ``Appendix A''):


    The core Linux utilities

    Assorted text apps from the ap1 file set:

    Info/FAQ/HOWTO documentation

    Basic networking utilities

    The BSD games

  This selection matches the kind of machine described in ``What use is
  a small laptop?''.

  4.  The Pre-installation Procedure

  This section covers creating a swap partition and a temporary root
  partition on the laptop's hard disk. Nothing here is Slackware-
  specific.

  4.1.  muLinux Preparation

  If you are going to use only muLinux to for this procedure then you
  need to prepare a disk with mkfs.ext2 and supporting libraries on it.
  From the muLinux setup files uncompress USR.bz2 and mount it as a loop
  file-system. If you are in the same directory as the USR file and you
  want to mount it as /tmpusr then the sequence for this is:


  ______________________________________________________________________
  losetup /dev/loop0 USR
  mount -t ext2 /dev/loop0 /tmpusr

  ______________________________________________________________________



  >From there copy mkfs.ext2, libext2fs.so.2, libcomerr.so.2 and
  libuuid.so.1 onto a floppy.

  4.2.  Prepare the installation root files.

  Select the root disk you want - I used the color one with no problems
  but the text one would be slightly faster in these low memory
  conditions. Uncompress the image and mount it as a loop device. The
  procedure is the same as in the above section but the root disk image
  is a minix file-system.

  Next you need 3 1722 floppies or 4 1440 floppies with ext2 file-
  systems - it's better with 1722 disks as you don't need to split the
  /lib directory.  Give one floppy twice the default number of inodes so
  it can take the /dev directory. That's 432 nodes for a 1722 disk or
  368 for a 1440. If you specify /dev/fd0H1722 or /dev/fd0H1440 then you
  don't have to give any other parameters so for a 1722 disk do


  ______________________________________________________________________
  mke2fs -N 432 /dev/fd0H1722

  ______________________________________________________________________



  If you have mounted the root image as /tmproot and the destination
  floppy as /floppy then cd to /tmproot. To copy the dev directory the
  command is



  ______________________________________________________________________
  cp -dpPR dev/* /floppy/

  ______________________________________________________________________



  For the other directories with files in (bin, etc, lib, mnt, sbin,
  usr, var) it's


  ______________________________________________________________________
  cp -dpPr directoryname/* /floppy/

  ______________________________________________________________________



  Don't bother with the empty ones (floppy, proc, root, tag, tmp)
  because you can simply create them on the laptop. boot and cdrom are
  soft links pointing to /mnt/boot and /var/log/mount respectively - you
  can also create them on the laptop.

  4.3.  Create the partitions.

  4.3.1.  Mini-Linuces and ext2 file-systems - an important note.

  To save space, small-Linux designers sometimes use older libc5
  librariesand where they do use up-to-date libc6 they leave out may of
  the options compiled into full distributions, including some optional
  features of the ext2 file-system.  This has two consequences:


    Trying to mount ext2 disks formatted using a modern Linux system
     can generate error messages if you mount them read-write. Be sure
     to use the -r option when mounting floppies on the laptops.

    It is not wise to use the mkfs.ext2 that comes with the mini-Linux
     to create file-systems on the partitions into which SlackWare will
     be installed. It should only be used to create the file-system on
     the temporary root partition. Once installation is complete this
     partition can be reformatted and re-used.

  4.3.2.  Procedure

  If installing on an Aero, make sure the floppy drive is inserted
  before switching on and do not remove it.


  1. Boot from the mini-Linux   (-- With muLinux, wait until the boot-
     process complains about the small memory space and offers the
     option of dropping into a shell - take that option and work in the
     limited single-user mode it gives you.  --)



  2. Use fdisk to create the partitions.

  3. Reboot on leaving fdisk (with muLinux you may simply have to turn
     off and on again at this point).

  4. Use mkswap on the swap partition and then activate it (this will
     make muLinux much happier).

  5. If using muLinux then mount the extra floppy created in ``muLinux
     Preparation'', copy mkfs.ext2 into /bin and the libraries into
     /lib.

  6. Use mkfs.ext2 to create the file-system on the temporary root
     partition.

  7. If you have been using SmallLinux, shut down and reboot using
     muLinux.  Don't forget to activate the swap partition again.

  8. muLinux will have mounted the boot floppy on /startup - unmount it
     to free the floppy drive.

  9. Now mount the temporary root partition and copy onto it the
     contents of the disks you created in ``Prepare the installation
     root files''. Do not be alarmed by the error messages: if, for
     example, you copy usr from the floppy to the temporary root
     partition by typing "cp -dpPr usr/* /tmproot/" then you'll get the
     error message "cp: sr: no such file or directory". Ignore this,
     nothing is wrong.

  10.
     cd to the temporary root partition and create the empty folders
     (floppy, proc, root, tag, tmp) and the soft links boot (pointing to
     mnt/boot) and cdrom (to var/log/mount).

  11.
     Unmount the temporary root partition - this syncs the disk.

  12.
     You can simply turn off the machine now.

  5.  The Installation

  This section does not give much detail on the Slackware installation
  process.  In fact, it assumes you are familiar with it. Instead, this
  section concentrates on those areas where special care or unusual
  steps are required.

  5.1.  Boot the machine

  Make a boot-disk from one of the images. I recommend you use bareapm.i
  on a laptop and bare.i on a desktop - unless you have a parallel-port
  IDE device (pportide.i). Boot the laptop from it. When the boot:
  prompt appears, type "mount root=/dev/hdax" where x is the temporary
  root partition. Log in as root.  Then activate the swap partition.

  5.2.  Floppy/Parport CD-ROM Install

  In both these cases, no extra work should be necessary to access the
  installation media. Simply run setup.

  5.3.  Network/PCMCIA Install

  Slackware has supplementary disks with tools for these and
  instructions for their use greet you when you log in. Use the network
  disk on a desktop PC with ethernet card or a laptop with pocket
  ethernet adaptor. Use the PCMCIA disk for PCMCIA install. Once your
  network adapter/PCMCIA socket has been identified, run setup.

  5.3.1.  PCMCIA install on the Aero

  The Slackware installation process runs the PCMCIA drivers from the
  supplementary floppy. Because the Aero has a PCMCIA floppy drive, this
  means you can't remove the floppy drive to insert the PCMCIA CD-
  ROM/ethernet card. The solution is simple: the Slackware PCMCIA setup
  routine creates /pcmcia and mounts the supplementary disk there, so

  1. Create the /pcmcia directory yourself

  2. Mount the supplementary disk to /mnt. Be sure to specify the type
     as vfat - if you don't, it'll be incorrectly identified as UMSDOS
     and long filenames will be mis-copied.

  3. cd /mnt;cp -dpPr ./* /pcmcia/

  4. Unmount the floppy.

  5. Run pcmcia. When the script complains that there is no disk in the
     drive simply hit Enter: Card Sevices will start. Connect your
     PCMCIA device and hit Enter.

  6. Run setup

  5.4.  Set-up

  The Slackware set-up program is straightforward. Start with the Keymap
  section and it'll take you forward step by step.

  5.4.1.  AddSwap

  You do need to do this step so it can put the correct entry in fstab
  but make sure it doesn't run mkswap - you're already using the
  partition.

  5.4.2.  Target

  In this section Slackware asks which partitions will be mounted as
  what and then formats them if you want.

  The safest bet here is to leave your temporary root partition out
  altogether and just edit fstab later once you know you don't need it
  for it's temporary purpose anymore. If you're going to reuse it as
  /home then it is OK to designate it as /home - obviously, don't format
  it now! If you intend to re-use it as a part of the directory
  structure that will have files placed in it during installation (/var,
  for example) then you absolutely must ignore it in this step: after
  the installation is complete you can move the files across.

  5.4.3.  Select

  Here you choose which general categories of software to install. I
  chose as follows:


    A - Base Linux System

    AP -Non-X applications

    F - FAQs and HOWTOs

    N - Networking tools and apps

    Y - BSD games collection

  I wouldn't recommend adding to this - if anything, prune it back to A,
  AP and N. That gives you a core Linux setup to which you can add
  according to your needs.

  5.4.4.  Install

  Choose the Expert installation method. This allows you to
  select/reject for installation individual packages from the categories
  you chose in the Selection step. ``Appendix A'' goes through the
  precise choices I made .

  This part takes about 3 hours for a PCMCIA network install. You are
  prompted to select individual packages before the installation of each
  category, so you can't just walk away and leave it to run through.

  5.4.5.  Configure

  Once the packages are all installed, you are prompted to do final
  configuration for your machine. This covers areas like networking,
  Lilo, selecting a kernel etc. Some points to look out for:


    If you did a PCMCIA install, don't accept the offer to configure
     your network with netconfig. This will ruin your pcmcia networking.
     Wait until you've rebooted and then edit /etc/pcmcia/network.opts

    This is the point where you should install a kernel. For a laptop
     the bareapm kernel is best, for a desktop simply the bare one.

  5.4.6.  Exit

  The set-up process is finished but you are not. Do not reboot yet!
  There is another vital step to complete.

  5.5.  Pre-reboot Configuration

  On a normal machine you would simply reboot once the installation is
  complete.  If you do that here you may have to wait 6 or 8 hours for a
  login prompt to appear and another half hour to get to the command
  prompt. Before rebooting you need to change or remove the elements
  that cause this slowdown. This involves editing config files so you
  need to be familiar with vi, ed or sed.

  At this stage your future root partition is still mounted as /mnt so
  remember to at that to the paths given here.


     /etc/passwd
        Edit this to change root's login shell to ash. ash really is the
        only practical login shell for 4mb RAM.

     /etc/rc.d/rc.modules
        Comment out the line 'depmod -a'. You only need to update module
        dependencies if you have changed your module configuration
        (recompiled or added new ones, for example). On a standard
        system it only takes a second or two and so it doesn't matter
        that it's needlessly performed each time. On a 4mb laptop it can
        take as much as 8 hours.  When you do change your module set-up
        you can simply uncomment this line and reboot. Alternatively,
        change this part of the script so that it will only run if you
        pass a parameter at the boot-prompt. For example:

        ________________________________________________________________
        if [ "NEWMODULES" == "1" ] ; then
            depmod -a
        fi

        ________________________________________________________________



     /etc/rc.d/rc.inet2
        This script starts network services like nfs.  You probably
        don't need these and certainly not at start-up. Rename this
        script to something like RC.inet2 - that will stop it from being
        run at boot and you can run it manually when you need it.

     /etc/rc.d/rc.pcmcia
        On the Aero you should also rename this script, otherwise you'll
        lose the use of your floppy drive on start-up. It's worth
        considering for any other small laptop as well - you can always
        run it manually before inserting a card.

  Once these changes have been made, you are ready to reboot.

  5.6.  Post-reboot Configuration.

  If you made the changes recommended in section ``Pre-reboot
  configuration'' then the boot process will only take a few minutes, as
  opposed to several hours. Login as root and check that everything is
  functioning properly.

  5.6.1.  Re-use the temporary root.

  Once you are sure the installation is solid you can reclaim the
  partition you used as the temporary root. Don't just delete the
  contents, reformat the filesystem. Remember, the mke2fs that came with
  the mini-Linux is out of date.

  If you intend to re-use this partition as /home, remember not to
  create any user accounts until you have completed this step.

  5.6.2.  Other configuration tweaks.

  In such a small RAM space, every little helps. Go through SlackWare's
  BSD-style init scripts in /etc/rc.d/ and comment out anything you
  don't need. Have a look at Todd Burgess' Small Memory mini-HOWTO
  http://eddie.cis.uoguelph.ca/~tburgess/ for more ideas.

  6.  Conclusion

  That's it all done. You now have a laptop with the core utilities in
  place and 50 to 70mb spare for whichever extras you need. Don't mess
  it up because it's a lot easier to modify an existing installation on
  such cramped old machines than it is to start from scratch again.

  7.  Appendix A:

  This appendix lists which packages (if any) from each category might
  be included in the installation and gives my reasons for including or
  omitting them. I made no attempt to install X so those categories are
  ignored.

  Although this appendix refers specifically to the Slackware
  distribution it can be used as a guide with any of the major
  distributions.

  7.1.  A - Base Linux System

  Most of the packages in this category are essential, even those that
  aren't listed as required by the Slackware set-up program. Because of
  this, I've listed those packages that I felt could reasonably be left
  out rather than all the non-compulsory packages that I installed.

  7.1.0.1.  Packages considered for omission:


     kernels (ide, scsi etc.)
        There's no need to install any of these, you get a chance to
        select a kernel at the very end of the installation process.

     aoutlibs
        This is only needed if you intend to run executables compiled in
        the old a.out format. Omitting it saves a lot of space. Omitted.

     bash1
        Bash2 (simply called bash in the Slackware package list) is
        required for the Slackware configuration scripts but there are a
        lot of scripts that need bash1. I included it.

     getty
        agetty is Slackware's default getty, this package contains getty
        and uugetty as alternatives. Only include it if you need their
        extra functionality. Omitted.

     gpm
        Personally, I find this very useful at the console (and the
        Aero's trackball is very handy) but it's not essential.
        Included.

     icbs2
        Not needed. Omitted.

     isapnp
        No use here. Omitted.

     loadlin
        Not needed with the setup described here - unless your old
        laptop has some peculiarity that requires a DOS driver to
        initialise some of its devices. Omitted.

     lpr
        You could argue that you can do your printing from whichever
        desktop is nearest but I always find it useful to be have
        printing capabilities on a laptop. Included.

     minicom
        Not a compulsory include but I want the laptop to do dial-up
        connection. Very handy. Included.

     pciutils
        Not needed on these old laptops. Omitted.

     quota
        Not vital but it can be used to set limits that stop you from
        overflowing the limited space available in these laptops.
        Included.

     tcsh
        I recommend using ash as your login shell. Only include this if
        you need it for scripts. Omitted.

     umsprogs
        You can leave this out and still be able to access UMSDOS
        floppies. Omitted.

     scsimods
        No use on these laptops. Omitted.

     sysklogd
        This can interfere with apmd but it does provide essential
        information. Included.

  7.1.0.2.  Packages installed:

  aaa_base, bash, bash1, bin, bzip2, cpio, cxxlibs, devs, e2fsprog,
  elflibs, elvis, etc, fileutils, find, floppy, fsmods, glibcso, gpm,
  grep, gzip, hdsetup, infozip, kbd, ldso, less, lilo, man, modules,
  modutils, pcmcia, sh_utils, shadow, sudo, sysklogd, sysvinit, tar,
  txtutils, util, zoneinfo

  Combined size: 33.4

  7.2.  AP - Non-X Applications

  None of these packages are, strictly speaking, essential - although
  ash is really required for sensible operation in 4mb. Leaving them all
  out could save the vital space for you to squeeze in your favourite
  app. I selected a minimal set of tools that I don't like to do
  without.

  7.2.0.1.  Packages considered for inclusion:


     apsfilter
        Not much point having printing if you can only print text files.
        Included.

     ash
        This is the shell for low-memory machines, only taking up 60k.
        Use it as the default login shell unless you like waiting 10
        seconds for the command prompt to reappear each time. Included.

     editors (jed, joe jove vim)
        elvis is the default Slackware editor and a required part of the
        installation. If, like me, you are a vi fan then that's all you
        need: installing vim would be wasteful duplication given the
        space restrictions. If you can't stand vi and need a more DOS-
        style editor then joe is small. Emacs fans with some self-
        discipline might consider jed or jove rather than pigging out on
        the full-size beast. Omitted.

     enscript
        If you already have apsfilter you don't really need this.
        Omitted.

     ghostscript
        Including the fonts this comes to about 7.5mb. One to leave
        until after the core installation, then consider if you need it.
        Omitted.

     groff
        Needed for the man pages. Included.

     ispell
        Not an essential butvery useful to the overenthusiastic touch-
        typist.  included.

     manpages
        Included!

     mc Slackware offers a lightweight compilation of mc but I'm happier
        at the command prompt. Omitted.

     quota
        Not necessary on what is not a multi-user machine but you
        may,like me, find it handy to stop you from forgetfully wasting
        the little space you have. Included.

     rpm
        Don't bother. If you do have an rpm that you would like to
        squeeze in, use rpm2tgz on a desktop machine to turn it into a
        tgz package - then you can use the standard Slackware
        installation tools. Omitted.

     sc A useful little spreadsheet packed very small. Included.

     sudo
        Not essential but I find it useful here: it's a cramped
        environment and an awkward reinstall if you mess things up -
        sudo helps create user profiles with the power to do the things
        you need without carelessly wiping your disk.  Included.

     texinfo
        Info documentation. Included.

     zsh
        Leave this out unless you're addicted to it or have scripts that
        must use it. Omitted.

  7.2.0.2.  Packages installed:

  apsfilter,ash, diff, groff, ispell, manpages, quota, sc, sudo, texinfo

  Combined size: 8.1 mb

  7.3.  D - Development Tools

  You could fit C or C++ into this space but the glibc library package
  is too big, so some pruning would be needed. Do the main installation
  first and then try it.

  There is room for Perl and Python.

  7.3.0.1.  Packages installed:

  None

  7.4.  E - Emacs

  I don't use Emacs and so saved myself some space. On the other hand,
  if you are an Emacs fan then you probably use it for e-mail, news and
  coding so you'll claim some of that space back by omitting other
  packages.

  If you do want Emacs it might be an idea to leave this out while doing
  the core installation. Once the laptop is up you can try fitting in
  what you want/need at your leisure.

  7.4.0.1.  Packages installed:

  None.

  7.5.  F - FAQs and HOWTOs

  If you know it all you don't need these. I installed the lot.

  7.5.0.1.  Packages installed:

  howto, manyfaqs, mini

  Combined size: 12.4 mb

  7.6.  K - Kernel Source

  You can just squeeze it in. If all you want to do is read the source,
  go ahead.


  7.6.0.1.  Packages Installed:

  None

  7.7.  N - Networking Tools and Apps

  These packages were selected to provide core networking tools, dial-up
  capability, e-mail, web and news.

  7.7.0.1.  Packages installed:

  dip, elm, fetchmail, mailx, lynx, netmods, netpipes, ppp, procmail,
  trn, tcpip1, tcpip2, uucp, wget

  Combined size: 15.1 mb

  7.8.  Tetex

  Another set that will barely squeeze in. I can't say how it would run
  in the space available.

  7.8.0.1.  Packages installed:

  None

  7.9.  Y - BSD Games Collection

  I'm addicted to several of these. If I really need that last 5mb they
  can go.

  7.9.0.1.  Packages installed:

  bsdgames

  Combined size: 5.4 mb

  7.10.  End result

  In total the installed packages plus kernel took up about 75mb of disk
  space of which 19.5mb was in the root partition and 55.5 in /usr. On
  the Aero that left 39mb in /usr, 74mb on the T1910.

  8.  Appendix B: Resources relevant to this HOWTO


     Linux Laptop HOWTO
        http://www.snafu.de/~wehe/Laptop-HOWTO.html

     Small Memory mini-HOWTO
        http://eddie.cis.uoguelph.ca/~tburgess/

     Linux on Laptops
        http://www.cs.utexas.edu/users/kharker/linux-laptop/ HOWTOs and
        installation FAQs for a wide range of machines.

     Linux T1910 FAQ
        http://members.tripod.com/~Cyberpvnk/linux.htm

     Linux Contura Aero FAQ
        http://domen.uninett.no/~hta/linux/aero-faq.html

     Contura Aero FAQ
        http://www.reed.edu/~pwilk/aero/aero.faq Comprehensive FAQ on
        all aspects of the Contura Aero compiled by the moderators of
        the Aero mailing list. Good Linux section .



  GNU/Linux AI & Alife HOWTO
  by John Eikenberry
  v1.4, 23 June 2000

  This howto mainly contains information about, and links to, various AI
  related software libraries, applications, etc. that work on the
  GNU/Linux platform. All of it is (at least) free for personal use. The
  new master page for this document is http://zhar.net/gnu-linux/howto/
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Purpose
     1.2 Where to find this software
     1.3 Updates and comments
     1.4 Copyright/License

  2. Traditional Artificial Intelligence

     2.1 AI class/code libraries
     2.2 AI software kits, applications, etc.

  3. Connectionism

     3.1 Connectionist class/code libraries
     3.2 Connectionist software kits/applications

  4. Evolutionary Computing

     4.1 EC class/code libraries
     4.2 EC software kits/applications

  5. Alife & Complex Systems

     5.1 Alife & CS class/code libraries
     5.2 Alife & CS software kits, applications, etc.

  6. Autonomous Agents

  7. Programming languages



  ______________________________________________________________________

  1.  Introduction



  1.1.  Purpose


  The GNU/Linux OS has evolved from its origins in hackerdom to a full
  blown UNIX, capable of rivaling any commercial UNIX.  It now provides
  an inexpensive base to build a great workstation.  It has shed its
  hardware dependencies, having been ported to DEC Alphas, Sparcs,
  PowerPCs, and many others.  This potential speed boost along with its
  networking support will make it great for workstation clusters.  As a
  workstation it allows for all sorts of research and development,
  including artificial intelligence and artificial life.



  The purpose of this Mini-Howto is to provide a source to find out
  about various software packages, code libraries, and anything else
  that will help someone get started working with (and find resources
  for) artificial intelligence, artificial life, etc.  All done with
  GNU/Linux specifically in mind.



  1.2.  Where to find this software


  All this software should be available via the net (ftp || http).  The
  links to where to find it will be provided in the description of each
  package.  There will also be plenty of software not covered on these
  pages (which is usually platform independent) located on one of the
  resources listed on the links section of the Master Site (given
  above).



  1.3.  Updates and comments



  If you find any mistakes, know of updates to one of the items below,
  or have problems compiling and of the applications, please mail me at:
  jae@NOSPAM-zhar.net and I'll see what I can do.


  If you know of any AI/Alife applications, class libraries, etc. Please
  email me about them. Include your name, ftp and/or http sites where
  they can be found, plus a brief overview/commentary on the software
  (this info would make things a lot easier on me... but don't feel
  obligated ;).


  I know that keeping this list up to date and expanding it will take
  quite a bit of work. So please be patient (I do have other projects).
  I hope you will find this document helpful.


  1.4.  Copyright/License

  Copyright (c) 1996-2000 John A. Eikenberry

  LICENSE

  This document may be reproduced and distributed in whole or in part,
  in any medium physical or electronic, provided that this license
  notice is displayed in the reproduction. Commercial redistribution is
  permitted and encouraged. Thirty days advance notice, via email to the
  author, of redistribution is appreciated, to give the authors time to
  provide updated documents.

  A. REQUIREMENTS OF MODIFIED WORKS

  All modified documents, including translations, anthologies, and
  partial documents, must meet the following requirements:



    The modified version must be labeled as such.

    The person making the modifications must be identified.


    Acknowledgement of the original author must be retained.

    The location of the original unmodified document be identified.

    The original author's name(s) may not be used to assert or imply
     endorsement of the resulting document without the original author's
     permission.

  In addition it is requested (not required) that:


    The modifications (including deletions) be noted.

    The author be notified by email of the modification in advance of
     redistribution, if an email address is provided in the document.

  As a special exception, anthologies of LDP documents may include a
  single copy of these license terms in a conspicuous location within
  the anthology and replace other copies of this license with a
  reference to the single copy of the license without the document being
  considered "modified" for the purposes of this section.

  Mere aggregation of LDP documents with other documents or programs on
  the same media shall not cause this license to apply to those other
  works.

  All translations, derivative documents, or modified documents that
  incorporate this document may not have more restrictive license terms
  than these, except that you may require distributors to make the
  resulting document available in source format.



  2.

  Traditional Artificial Intelligence

  Traditional AI is based around the ideas of logic, rule systems,
  linguistics, and the concept of rationality.  At its roots are
  programming languages such as Lisp and Prolog.  Expert systems are the
  largest successful example of this paradigm.  An expert system
  consists of a detailed knowledge base and a complex rule system to
  utilize it.  Such systems have been used for such things as medical
  diagnosis support and credit checking systems.



  2.1.  AI class/code libraries


  These are libraries of code or classes for use in programming within
  the artificial intelligence field.  They are not meant as stand alone
  applications, but rather as tools for building your own applications.



     ACL2

       Web site: www.telent.net/cliki/ACL2

        ACL2 (A Computational Logic for Applicative Common Lisp) is a
        theorem prover for industrial applications. It is both a
        mathematical logic and a system of tools for constructing proofs
        in the logic.  ACL2 works with GCL (GNU Common Lisp).
     AI Search II

       WEB site: www.bell-labs.com/topic/books/ooai-book/

        Submitted by: Peter M. Bouthoorn


        Basically, the library offers the programmer a set of search
        algorithms that may be used to solve all kind of different
        problems. The idea is that when developing problem solving
        software the programmer should be able to concentrate on the
        representation of the problem to be solved and should not need
        to bother with the implementation of the search algorithm that
        will be used to actually conduct the search. This idea has been
        realized by the implementation of a set of search classes that
        may be incorporated in other software through C++'s features of
        derivation and inheritance.  The following search algorithms
        have been implemented:


        - depth-first tree and graph search.  - breadth-first tree and
        graph search.  - uniform-cost tree and graph search.  - best-
        first search.  - bidirectional depth-first tree and graph
        search.  - bidirectional breadth-first tree and graph search.  -
        AND/OR depth tree search.  - AND/OR breadth tree search.


        This library has a corresponding book, "Object-Oriented
        Artificial Instelligence, Using C++".



     Chess In Lisp (CIL)

       FTP site: chess.onenet.net/pub/chess/uploads/projects/


        The CIL (Chess In Lisp) foundation is a Common Lisp
        implementaion of all the core functions needed for development
        of chess applications.  The main purpose of the CIL project is
        to get AI researchers interested in using Lisp to work in the
        chess domain.



     DAI

       Web site: starship.skyport.net/crew/gandalf/DNET/AI


        A library for the Python programming language that provides an
        object oriented interface to the CLIPS expert system tool. It
        includes an interface to COOL (CLIPS Object Oriented Language)
        that allows:

       Investigate COOL classes

       Create and manipulate with COOL instances

       Manipulate with COOL message-handler's

       Manipulate with Modules

     Nyquist

       Web site:
        www.cs.cmu.edu/afs/cs.cmu.edu/project/music/web/music.html


        The Computer Music Project at CMU is developing computer music
        and interactive performance technology to enhance human musical
        experience and creativity. This interdisciplinary effort draws
        on Music Theory, Cognitive Science, Artificial Intelligence and
        Machine Learning, Human Computer Interaction, Real-Time Systems,
        Computer Graphics and Animation, Multimedia, Programming
        Languages, and Signal Processing. A paradigmatic example of
        these interdisciplinary efforts is the creation of interactive
        performances that couple human musical improvisation with
        intelligent computer agents in real-time.



     PDKB

       Web site: lynx.eaze.net/~pdkb/web/

       SourceForge site: sourceforge.net/project/?group_id=1449

        Public Domain Knowledge Bank (PDKB) is an Artificial
        Intelligence Knowledge Bank of common sense rules and facts. It
        is based on the Cyc Upper Ontology and the MELD language.



     Python Fuzzy Logic Module

       FTP site: ftp://ftp.csh.rit.edu/pub/members/retrev/

        A simple python module for fuzzy logic. The file is 'fuz.tar.gz'
        in this directory. The author plans to also write a simple
        genetic algorithm and a neural net library as well. Check the
        00_index file in this directory for release info.



     Screamer

       Web site: www.cis.upenn.edu/~screamer-tools/home.html


        Screamer is an extension of Common Lisp that adds support for
        nondeterministic programming. Screamer consists of two levels.
        The basic nondeterministic level adds support for backtracking
        and undoable side effects.  On top of this nondeterministic
        substrate, Screamer provides a comprehensive constraint
        programming language in which one can formulate and solve mixed
        systems of numeric and symbolic constraints. Together, these two
        levels augment Common Lisp with practically all of the
        functionality of both Prolog and constraint logic programming
        languages such as CHiP and CLP(R).  Furthermore, Screamer is
        fully integrated with Common Lisp. Screamer programs can coexist
        and interoperate with other extensions to Common Lisp such as
        CLOS, CLIM and Iterate.



     ThoughtTreasure

       Web site: www.signiform.com/tt/htm/tt.htm

        ThoughtTreasure is a project to create a database of commonsense
        rules for use in any application. It consists of a database of a
        little over 100K rules and a C API to integrate it with your
        applications. Python, Perl, Java and TCL wrappers are already
        available.



  2.2.

  AI software kits, applications, etc.


  These are various applications, software kits, etc. meant for research
  in the field of artificial intelligence. Their ease of use will vary,
  as they were designed to meet some particular research interest more
  than as an easy to use commercial package.



     ASA - Adaptive Simulated Annealing

       Web site: www.ingber.com/#ASA-CODE

       FTP site: ftp.ingber.com/


        ASA (Adaptive Simulated Annealing) is a powerful global
        optimization C-code algorithm especially useful for nonlinear
        and/or stochastic systems.


        ASA is developed to statistically find the best global fit of a
        nonlinear non-convex cost-function over a D-dimensional space.
        This algorithm permits an annealing schedule for 'temperature' T
        decreasing exponentially in annealing-time k, T = T_0 exp(-c
        k^1/D).  The introduction of re-annealing also permits
        adaptation to changing sensitivities in the multi-dimensional
        parameter-space. This annealing schedule is faster than fast
        Cauchy annealing, where T = T_0/k, and much faster than
        Boltzmann annealing, where T = T_0/ln k.



     Babylon

       FTP site: ftp.gmd.de/gmd/ai-research/Software/Babylon/


        BABYLON is a modular, configurable, hybrid environment for
        developing expert systems. Its features include objects, rules
        with forward and backward chaining, logic (Prolog) and
        constraints. BABYLON is implemented and embedded in Common Lisp.

     CLEARS

       Web site: www.coli.uni-sb.de/~clears/


        The CLEARS system is an interactive graphical environment for
        computational semantics. The tool allows exploration and
        comparison of different semantic formalisms, and their
        interaction with syntax. This enables the user to get an idea of
        the range of possibilities of semantic construction, and also
        where there is real convergence between theories.



     CLIG

       Web site: www.ags.uni-sb.de/~konrad/clig.html


        CLIG is an interactive, extendible grapher for visualizing
        linguistic data structures like trees, feature structures,
        Discourse Representation Structures (DRS), logical formulas etc.
        All of these can be freely mixed and embedded into each other.
        The grapher has been designed both to be stand-alone and to be
        used as an add-on for linguistic applications which display
        their output in a graphical manner.



     CLIPS

       Web site: www.jsc.nasa.gov/~clips/CLIPS.html

       FTP site: cs.cmu.edu/afs/cs.cmu.edu/project/ai-
        repository/ai/areas/expert/systems/clips



        CLIPS is a productive development and delivery expert system
        tool which provides a complete environment for the construction
        of rule and/or object based expert systems.


        CLIPS provides a cohesive tool for handling a wide variety of
        knowledge with support for three different programming
        paradigms: rule-based, object-oriented and procedural.  Rule-
        based programming allows knowledge to be represented as
        heuristics, or "rules of thumb," which specify a set of actions
        to be performed for a given situation. Object-oriented
        programming allows complex systems to be modeled as modular
        components (which can be easily reused to model other systems or
        to create new components).  The procedural programming
        capabilities provided by CLIPS are similar to capabilities found
        in languages such as C, Pascal, Ada, and LISP.



     EMA-XPS - A Hybrid Graphic Expert System Shell

       Web site: wmwap1.math.uni-wuppertal.de:80/EMA-XPS/


        EMA-XPS is a hybrid graphic expert system shell based on the
        ASCII-oriented shell Babylon 2.3 of the German National Research
        Center for Computer Sciences (GMD). In addition to Babylon's AI-
        power (object oriented data representation, forward and backward
        chained rules - collectible into sets, horn clauses, and
        constraint networks) a graphic interface based on the X11 Window
        System and the OSF/Motif Widget Library has been provided.



     FOOL & FOX

       FTP site: ntia.its.bldrdoc.gov/pub/fuzzy/prog/


        FOOL stands for the Fuzzy Organizer OLdenburg. It is a result
        from a project at the University of Oldenburg. FOOL is a
        graphical user interface to develop fuzzy rulebases.  FOOL will
        help you to invent and maintain a database that specifies the
        behavior of a fuzzy-controller or something like that.


        FOX is a small but powerful fuzzy engine which reads this
        database, reads some input values and calculates the new control
        value.



     FUF and SURGE

       Web site: www.dfki.de/lt/registry/generation/fuf.html

       FTP site: ftp.cs.columbia.edu/pub/fuf/

        FUF is an extended implementation of the formalism of functional
        unification grammars (FUGs) introduced by Martin Kay specialized
        to the task of natural language generation. It adds the
        following features to the base formalism:

       Types and inheritance.

       Extended control facilities (goal freezing, intelligent
        backtracking).

       Modular syntax.

        These extensions allow the development of large grammars which
        can be processed efficiently and can be maintained and
        understood more easily.  SURGE is a large syntactic realization
        grammar of English written in FUF. SURGE is developed to serve
        as a black box syntactic generation component in a larger
        generation system that encapsulates a rich knowledge of English
        syntax. SURGE can also be used as a platform for exploration of
        grammar writing with a generation perspective.



     The Grammar Workbench

       Web site: www.cs.kun.nl/agfl/GWB.html



        The Grammar Workbench, or GWB for short, is an environment for
        the comfortable development of Affix Grammars in the AGFL-
        formalism. Its purposes are:


       to allow the user to input, inspect and modify a grammar;

       to perform consistency checks on the grammar;

       to compute grammar properties;

       to generate example sentences;

       to assist in performing grammar transformations.



     GSM Suite

       Web site: www.slip.net/~andrewm/gsm/


        The GSM Suite is a set of programs for using Finite State
        Machines in a graphical fashion. The suite consists of programs
        that edit, compile, and print state machines. Included in the
        suite is an editor program, gsmedit, a compiler, gsm2cc, that
        produces a C++ implementation of a state machine, a PostScript
        generator, gsm2ps, and two other minor programs. GSM is licensed
        under the GNU Public License and so is free for your use under
        the terms of that license.



     Illuminator

       Web site:
        documents.cfar.umd.edu/resources/source/illuminator.html


        Illuminator is a toolset for developing OCR and Image
        Understanding applications.  Illuminator has two major parts: a
        library for representing, storing and retrieving OCR
        information, heretofore called dafslib, and an X-Windows "DAFS"
        file viewer, called illum. Illuminator and DAFS lib were
        designed to supplant existing OCR formats and become a standard
        in the industry. They particularly are extensible to handle more
        than just English.

        The features of this release:

       5 magnification levels for images

       flagged characters and words

       unicode support -- American, British, French, German, Greek,
        Italian, MICR, Norwegian, Russian, Spanish, Swedish, keyboards

       reads DAFS, TIFF's, PDA's (image only)

       save to DAFS, ASCII/UTF or Unicode

       Entity Viewer - shows properties, character choices, bounding
        boxes image fragment for a selected entity, change type, change
        content, hierarchy mode



     Jess, the Java Expert System Shell


       Web site: herzberg.ca.sandia.gov/jess/


        Jess is a clone of the popular CLIPS expert system shell written
        entirely in Java. With Jess, you can conveniently give your
        applets the ability to 'reason'. Jess is compatible with all
        versions of Java starting with version 1.0.2. Jess implements
        the following constructs from CLIPS: defrules, deffunctions,
        defglobals, deffacts, and deftemplates.



     learn

       FTP site: sunsite.unc.edu/pub/Linux/apps/cai/


        Learn is a vocable learning program with memory model.



     Otter: An Automated Deduction System

       Web site: www-unix.mcs.anl.gov/AR/otter/


        Our current automated deduction system  Otter is designed to
        prove theorems stated in first-order logic with equality.
        Otter's inference rules are based on resolution and
        paramodulation, and it includes facilities for term rewriting,
        term orderings, Knuth-Bendix completion, weighting, and
        strategies for directing and restricting searches for proofs.
        Otter can also be used as a symbolic calculator and has an
        embedded equational programming system.



     NICOLE

       Web site: nicole.sourceforge.net

        It is an attempt to simulate a conversation by learning how
        words are related to other words. A Human communicates with
        NICOLE via the keyboard and NICOLE responds back with its own
        sentences which are automatically generated, based on what
        NICOLE has stored in it's database.  Each new sentence that has
        been typed in, and NICOLE doesn't know about it, it is included
        into NICOLE's database, thus extending the knowledge base of
        NICOLE.



     PVS

       Web site: pvs.csl.sri.com/

        PVS is a verification system: that is, a specification language
        integrated with support tools and a theorem prover. It is
        intended to capture the state-of-the-art in mechanized formal
        methods and to be sufficiently rugged that it can be used for
        significant applications. PVS is a research prototype: it
        evolves and improves as we develop or apply new capabilities,
        and as the stress of real use exposes new requirements.

     RIPPER

       Web site: www.research.att.com/~wcohen/ripperd.html


        Ripper is a system for fast effective rule induction. Given a
        set of data, Ripper will learn a set of rules that will predict
        the patterns in the data. Ripper is written in ASCI C and comes
        with documentation and some sample problems.



     SNePS

       Web site: www.cs.buffalo.edu/pub/sneps/WWW/

       FTP site: ftp.cs.buffalo.edu/pub/sneps/

        The long-term goal of The SNePS Research Group is the design and
        construction of a natural-language-using computerized cognitive
        agent, and carrying out the research in artificial intelligence,
        computational linguistics, and cognitive science necessary for
        that endeavor. The three-part focus of the group is on knowledge
        representation, reasoning, and natural-language understanding
        and generation. The group is widely known for its development of
        the SNePS knowledge representation/reasoning system, and Cassie,
        its computerized cognitive agent.



     Soar

       Web site: bigfoot.eecs.umich.edu/~soar/

       FTP site: cs.cmu.edu/afs/cs/project/soar/public/Soar6/


        Soar has been developed to be a general cognitive architecture.
        We intend ultimately to enable the Soar architecture to:

       work on the full range of tasks expected of an intelligent
        agent, from highly routine to extremely difficult, open-ended
        problems

       represent and use appropriate forms of knowledge, such as
        procedural, declarative, episodic, and possibly iconic

       employ the full range of problem solving methods

       interact with the outside world and

       learn about all aspects of the tasks and its performance on
        them.

        In other words, our intention is for Soar to support all the
        capabilities required of a general intelligent agent.
        http://wwwis.cs.utwente.nl:8080/ tcm/index.html



     TCM


       Web site: wwwis.cs.utwente.nl:8080/~tcm/index.html

       FTP site: ftp.cs.vu.nl/pub/tcm/


        TCM (Toolkit for Conceptual Modeling) is our suite of graphical
        editors. TCM contains graphical editors for Entity-Relationship
        diagrams, Class-Relationship diagrams, Data and Event Flow
        diagrams, State Transition diagrams, Jackson Process Structure
        diagrams and System Network diagrams, Function Refinement trees
        and various table editors, such as a Function-Entity table
        editor and a Function Decomposition table editor.  TCM is easy
        to use and performs numerous consistency checks, some of them
        immediately, some of them upon request.



     WEKA

       Web site: lucy.cs.waikato.ac.nz/~ml/


        WEKA (Waikato Environment for Knowledge Analysis) is an state-
        of-the-art facility for applying machine learning techniques to
        practical problems. It is a comprehensive software "workbench"
        that allows people to analyse real-world data. It integrates
        different machine learning tools within a common framework and a
        uniform user interface. It is designed to support a "simplicity-
        first" methodology, which allows users to experiment
        interactively with simple machine learning tools before looking
        for more complex solutions.



  3.  Connectionism

  Connectionism is a technical term for a group of related techniques.
  These techniques include areas such as Artificial Neural Networks,
  Semantic Networks and a few other similar ideas. My present focus is
  on neural networks (though I am looking for resources on the other
  techniques). Neural networks are programs designed to simulate the
  workings of the brain. They consist of a network of small
  mathematical-based nodes, which work together to form patterns of
  information.  They have tremendous potential and currently seem to be
  having a great deal of success with image processing and robot
  control.



  3.1.  Connectionist class/code libraries


  These are libraries of code or classes for use in programming within
  the Connectionist field.  They are not meant as stand alone
  applications, but rather as tools for building your own applications.



     ANSI-C Neural Networks

       Web site: www.geocities.com/CapeCanaveral/1624/

        This site contains ANSC-C source code for 8 types of neural
        nets, including:

       Adaline Network

       Backpropagation

       Hopfield Model

       (BAM) Bidirectional Associative Memory

       Boltzmann Machine

       Counterpropagation

       (SOM) Self-Organizing Map

       (ART1) Adaptive Resonance Theory

        They were designed to help turn the theory of a particular
        network model into the design for a simulator implementation ,
        and to help with embeding an actual application into a
        particular network model.



     BELIEF

       Web site: www.cs.cmu.edu/afs/cs/project/ai-
        repository/ai/areas/reasonng/probabl/belief/


        BELIEF is a Common Lisp implementation of the Dempster and Kong
        fusion and propagation algorithm for Graphical Belief Function
        Models and the Lauritzen and Spiegelhalter algorithm for
        Graphical Probabilistic Models. It includes code for
        manipulating graphical belief models such as Bayes Nets and
        Relevance Diagrams (a subset of Influence Diagrams) using both
        belief functions and probabilities as basic representations of
        uncertainty. It uses the Shenoy and Shafer version of the
        algorithm, so one of its unique features is that it supports
        both probability distributions and belief functions.  It also
        has limited support for second order models (probability
        distributions on parameters).


     bpnn.py

       Web site: www.enme.ucalgary.ca/~nascheme/python/

        A simple back-propogation ANN in Python.



     CONICAL

       Web site: strout.net/conical/

        CONICAL is a C++ class library for building simulations common
        in computational neuroscience. Currently its focus is on
        compartmental modeling, with capabilities similar to GENESIS and
        NEURON. A model neuron is built out of compartments, usually
        with a cylindrical shape. When small enough, these open-ended
        cylinders can approximate nearly any geometry. Future classes
        may support reaction-diffusion kinetics and more. A key feature
        of CONICAL is its cross-platform compatibility; it has been
        fully co-developed and tested under Unix, DOS, and Mac OS.



     IDEAL

       Web site: www.rpal.rockwell.com/ideal.html



        IDEAL is a test bed for work in influence diagrams and Bayesian
        networks. It contains various inference algorithms for belief
        networks and evaluation algorithms for influence diagrams. It
        contains facilities for creating and editing influence diagrams
        and belief networks.


        IDEAL is written in pure Common Lisp and so it will run in
        Common Lisp on any platform. The emphasis in writing IDEAL has
        been on code clarity and providing high level programming
        abstractions. It thus is very suitable for experimental
        implementations which need or extend belief network technology.


        At the highest level, IDEAL can be used as a subroutine library
        which provides belief network inference and influence diagram
        evaluation as a package. The code is documented in a detailed
        manual and so it is also possible to work at a lower level on
        extensions of belief network methods.


        IDEAL comes with an optional graphic interface written in CLIM.
        If your Common Lisp also has CLIM, you can run the graphic
        interface.



     Matrix Class

       FTP site: ftp.cs.ucla.edu/pub/


        A simple, fast, efficient C++ Matrix class designed for
        scientists and engineers. The Matrix class is well suited for
        applications with complex math algorithms. As an demonstration
        of the Matrix class, it was used to implement the backward error
        propagation algorithm for a multi-layer feed-forward artificial
        neural network.



     nunu

       Web site: ruby.ddiworld.com/jreed/web/software/nn.html


        nunu is a multi-layered, scriptable, back-propagation neural
        network.  It is build to be used for intensive computation
        problems scripted in shell scripts. It is written in C++ using
        the STL. nn is based on material from the "Introduction to the
        Theory of Neural Computation" by John Hertz, Anders Krogh, and
        Richard G. Palmer, chapter 6.
     Pulcinella

       Web site: iridia.ulb.ac.be/pulcinella/Welcome.html


        Pulcinella is written in CommonLisp, and appears as a library of
        Lisp functions for creating, modifying and evaluating valuation
        systems. Alternatively, the user can choose to interact with
        Pulcinella via a graphical interface (only available in Allegro
        CL). Pulcinella provides primitives to build and evaluate
        uncertainty models according to several uncertainty calculi,
        including probability theory, possibility theory, and Dempster-
        Shafer's theory of belief functions; and the possibility theory
        by Zadeh, Dubois and Prade's. A User's Manual is available on
        request.



     S-ElimBel

       Web site (???): www.spaces.uci.edu/thiery/elimbel/


        S-ElimBel is an algorithm that computes the belief in a Bayesian
        network, implemented in MIT-Scheme. This algorithm has the
        particularity of being rather easy to understand. Moreover, one
        can apply it to any kind of Bayesian network - it being singly
        connected or muliply connected. It is, however, less powerful
        than the standard algorithm of belief propagation.  Indeed, the
        computation has to be reconducted entirely for each new evidence
        added to the network. Also, one needs to run the algorithm as
        many times as one has nodes for which the belief is wanted.



     Software for Flexible Bayesian Modeling

       Web site: www.cs.utoronto.ca/~radford/fbm.software.html


        This software implements flexible Bayesian models for regression
        and classification applications that are based on multilayer
        perceptron neural networks or on Gaussian processes.  The
        implementation uses Markov chain Monte Carlo methods.  Software
        modules that support Markov chain sampling are included in the
        distribution, and may be useful in other applications.



     Spiderweb2

       Web site: www.cs.nyu.edu/~klap7794/spiderweb2.html


        A C++ artificial neual net library.  Spiderweb2 is a complete
        rewrite of the original Spiderweb library, it has grown into a
        much more flexible and object-oriented system. The biggest
        change is that each neuron object is responsible for its own
        activations and updates, with the network providing only the
        scheduling aspect. This is a very powerful change, and it allows
        easy modification and experimentation with various network
        architectures and neuron types.
     Symbolic Probabilistic Inference (SPI)

       FTP site: ftp.engr.orst.edu/pub/dambrosi/spi/

       Paper (ijar-94.ps): ftp.engr.orst.edu/pub/dambrosi/


        Contains Common Lisp function libraries to implement SPI type
        baysean nets.  Documentation is very limited.  Features:

       Probabilities, Local Expression Language Utilities, Explanation,
        Dynamic Models, and a TCL/TK based GUI.



     TresBel

       FTP site: iridia.ulb.ac.be/pub/hongxu/software/


        Libraries containing (Allegro) Common Lisp code for Belief
        Functions (aka. Dempster-Shafer evidential reasoning) as a
        representation of uncertainty. Very little documentation. Has a
        limited GUI.



     Various (C++) Neural Networks

       Web site: www.dontveter.com/nnsoft/nnsoft.html


        Example neural net codes from the book, The       Pattern
        Recognition Basics of AI.  These are simple example codes of
        these various neural nets. They work well as a good starting
        point for simple experimentation and for learning what the code
        is like behind the simulators. The types of networks available
        on this site are: (implemented in C++)



       The Backprop Package

       The Nearest Neighbor Algorithms

       The Interactive Activation Algorithm

       The Hopfield and Boltzman machine Algorithms

       The Linear Pattern Classifier

       ART I

       Bi-Directional Associative Memory

       The Feedforward Counter-Propagation Network



  3.2.

  Connectionist software kits/applications


  These are various applications, software kits, etc. meant for research
  in the field of Connectionism. Their ease of use will vary, as they
  were designed to meet some particular research interest more than as
  an easy to use commercial package.



     Aspirin - MIGRAINES
        (am6.tar.Z on ftp site)

       FTP site: sunsite.unc.edu/pub/academic/computer-science/neural-
        networks/programs/Aspirin/


        The software that we are releasing now is for creating, and
        evaluating, feed-forward networks such as those used with the
        backpropagation learning algorithm. The software is aimed both
        at the expert programmer/neural network researcher who may wish
        to tailor significant portions of the system to his/her precise
        needs, as well as at casual users who will wish to use the
        system with an absolute minimum of effort.



     DDLab

       Web site: www.santafe.edu/~wuensch/ddlab.html

       FTP site: ftp.santafe.edu/pub/wuensch/

        DDLab is an interactive graphics program for research into the
        dynamics of finite binary networks, relevant to the study of
        complexity, emergent phenomena, neural networks, and aspects of
        theoretical biology such as gene regulatory networks. A network
        can be set up with any architecture between regular CA (1d or
        2d) and "random Boolean networks" (networks with arbitrary
        connections and heterogeneous rules). The network may also have
        heterogeneous neighborhood sizes.



     GENESIS

       Web site: www.bbb.caltech.edu/GENESIS/

       FTP site: genesis.bbb.caltech.edu/pub/genesis/


        GENESIS (short for GEneral NEural SImulation System) is a
        general purpose simulation platform which was developed to
        support the simulation of neural systems ranging from complex
        models of single neurons to simulations of large networks made
        up of more abstract neuronal components. GENESIS has provided
        the basis for laboratory courses in neural simulation at both
        Caltech and the Marine Biological Laboratory in Woods Hole, MA,
        as well as several other institutions. Most current GENESIS
        applications involve realistic simulations of biological neural
        systems. Although the software can also model more abstract
        networks, other simulators are more suitable for backpropagation
        and similar connectionist modeling.
     JavaBayes

       Web site: www.cs.cmu.edu/People/javabayes/index.html/


        The JavaBayes system is a set of tools, containing a graphical
        editor, a core inference engine and a parser.  JavaBayes can
        produce:

       the marginal distribution for any variable in a network.

       the expectations for univariate functions (for example, expected
        value for variables).

       configurations with maximum a posteriori probability.

       configurations with maximum a posteriori expectation for
        univariate functions.



     Jbpe

       Web site: cs.felk.cvut.cz/~koutnij/studium/jbpe.html


        Jbpe is a back-propagation neural network editor/simulator.

        Features

       Standart back-propagation networks creation.

       Saving network as a text file, which can be edited and loaded
        back.

       Saving/loading binary file

       Learning from a text file (with structure specified below),
        number of learning periods / desired network energy can be
        specified as a criterion.

       Network recall



     Neural Network Generator

       Web site: www.idsia.ch/~rafal/research.html

       FTP site:  >ftp.idsia.ch/pub/rafal


        The Neural Network Generator is a genetic algorithm for the
        topological optimization of feedforward neural networks. It
        implements the Semantic Changing Genetic Algorithm and the Unit-
        Cluster Model. The Semantic Changing Genetic Algorithm is an
        extended genetic algorithm that allows fast dynamic adaptation
        of the genetic coding through population analysis. The Unit-
        Cluster Model is an approach to the construction of modular
        feedforward networks with a ''backbone'' structure.


        NOTE: To compile this on Linux requires one change in the
        Makefiles.  You will need to change '-ltermlib' to '-ltermcap'.
     Neureka ANS (nn/xnn)

       Web site: www.bgif.no/neureka/

       FTP site: ftp.ii.uib.no/pub/neureka/



        nn is a high-level neural network specification language. The
        current version is best suited for feed-forward nets, but
        recurrent models can and have been implemented, e.g. Hopfield
        nets, Jordan/Elman nets, etc.  In nn, it is easy to change
        network dynamics. The nn compiler can generate C code or
        executable programs (so there must be a C compiler available),
        with a powerful command line interface (but everything may also
        be controlled via the graphical interface, xnn). It is possible
        for the user to write C routines that can be called from inside
        the nn specification, and to use the nn specification as a
        function that is called from a C program. Please note that no
        programming is necessary in order to use the network models that
        come with the system (`netpack').


        xnn is a graphical front end to networks generated by the nn
        compiler, and to the compiler itself. The xnn graphical
        interface is intuitive and easy to use for beginners, yet
        powerful, with many possibilities for visualizing network data.


        NOTE: You have to run the install program that comes with this
        to get the license key installed. It gets put (by default) in
        /usr/lib. If you (like myself) want to install the package
        somewhere other than in the /usr directory structure (the
        install program gives you this option) you will have to set up
        some environmental variables (NNLIBDIR & NNINCLUDEDIR are
        required). You can read about these (and a few other optional
        variables) in appendix A of the documentation (pg 113).



     NEURON

       Web site: www.neuron.yale.edu/neuron.html

       FTP site: ftp.neuron.yale.edu/neuron/unix/

        NEURON is an extensible nerve modeling and simulation program.
        It allows you to create complex nerve models by connecting
        multiple one-dimensional sections together to form arbitrary
        cell morphologies, and allows you to insert multiple membrane
        properties into these sections (including channels, synapses,
        ionic concentrations, and counters). The interface was designed
        to present the neural modeler with a intuitive environment and
        hide the details of the numerical methods used in the
        simulation.



     PDP++

       Web site: www.cnbc.cmu.edu/PDP++/

       FTP site (US): cnbc.cmu.edu/pub/pdp++/

       FTP site (Europe): unix.hensa.ac.uk/mirrors/pdp++/


        As the field of Connectionist modeling has grown, so has the
        need for a comprehensive simulation environment for the
        development and testing of Connectionist models. Our goal in
        developing PDP++ has been to integrate several powerful software
        development and user interface tools into a general purpose
        simulation environment that is both user friendly and user
        extensible. The simulator is built in the C++ programming
        language, and incorporates a state of the art script interpreter
        with the full expressive power of C++. The graphical user
        interface is built with the Interviews toolkit, and allows full
        access to the data structures and processing modules out of
        which the simulator is built. We have constructed several useful
        graphical modules for easy interaction with the structure and
        the contents of neural networks, and we've made it possible to
        change and adapt many things. At the programming level, we have
        set things up in such a way as to make user extensions as
        painless as possible. The programmer creates new C++ objects,
        which might be new kinds of units or new kinds of processes;
        once compiled and linked into the simulator, these new objects
        can then be accessed and used like any other.



     RNS

       Web site: www.cs.cmu.edu/afs/cs/project/ai-
        repository/ai/areas/neural/systems/rns/

        RNS (Recurrent Network Simulator) is a simulator for recurrent
        neural networks. Regular neural networks are also supported. The
        program uses a derivative of the back-propagation algorithm, but
        also includes other (not that well tested) algorithms.

        Features include

       freely choosable connections, no restrictions besides memory or
        CPU constraints

       delayed links for recurrent networks

       fixed values or thresholds can be specified for weights

       (recurrent) back-propagation, Hebb, differential Hebb, simulated
        annealing and more

       patterns can be specified with bits, floats, characters,
        numbers, and random bit patterns with Hamming distances can be
        chosen for you

       user definable error functions

       output results can be used without modification as input



     Simple Neural Net (in Python)

       Web site: starship.python.net/crew/amk/unmaintained/


        Simple neural network code, which implements a class for 3-level
        networks (input, hidden, and output layers). The only learning
        rule implemented is simple backpropagation. No documentation (or
        even comments) at all, because this is simply code that I use to
        experiment with. Includes modules containing sample datasets
        from Carl G. Looney's NN book. Requires the Numeric extensions.



     SCNN

       Web site: apx00.physik.uni-frankfurt.de/e_ag_rt/SCNN/


        SCNN is an universal simulating system for Cellular Neural
        Networks (CNN).  CNN are analog processing neural networks with
        regular and local interconnections, governed by a set of
        nonlinear ordinary differential equations. Due to their local
        connectivity, CNN are realized as VLSI chips, which operates at
        very high speed.



     Semantic Networks in Python

       Web site: strout.net/info/coding/python/ai/index.html


        The semnet.py module defines several simple classes for building
        and using semantic networks.  A semantic network is a way of
        representing knowledge, and it enables the program to do simple
        reasoning with very little effort on the part of the programmer.


        The following classes are defined:

       Entity: This class represents a noun; it is something which can
        be related to other things, and about which you can store facts.

       Relation: A Relation is a type of relationship which may exist
        between two entities.  One special relation, "IS_A", is
        predefined because it has special meaning (a sort of logical
        inheritance).

       Fact: A Fact is an assertion that a relationship exists between
        two entities.


        With these three object types, you can very quickly define
        knowledge about a set of objects, and query them for logical
        conclusions.



     SNNS

       Web site: www.informatik.uni-stuttgart.de/ipvr/bv/projekte/snns/

       FTP site: ftp.informatik.uni-stuttgart.de/pub/SNNS/

        Stuttgart Neural Net Simulator (version 4.1).  An awesome neural
        net simulator. Better than any commercial simulator I've seen.
        The simulator kernel is written in C (it's fast!). It supports
        over 20 different network architectures, has 2D and 3D X-based
        graphical representations, the 2D GUI has an integrated network
        editor, and can generate a separate NN program in C. SNNS is
        very powerful, though a bit difficult to learn at first. To help
        with this it comes with example networks and tutorials for many
        of the architectures.  ENZO, a supplementary system allows you
        to evolve your networks with genetic algorithms.


        There is a debian package of SNNS available. So just get it (and
        use alien to convert it to RPM if you need to).



     SPRLIB/ANNLIB

       Web site: www.ph.tn.tudelft.nl/~sprlib/


        SPRLIB (Statistical Pattern Recognition Library) was developed
        to support the easy construction and simulation of pattern
        classifiers. It consist of a library of functions (written in C)
        that can be called from your own program. Most of the well-known
        classifiers are present (k-nn, Fisher, Parzen, ....), as well as
        error estimation and dataset generation routines.


        ANNLIB (Artificial Neural Networks Library) is a neural network
        simulation library based on the data architecture laid down by
        SPRLIB. The library contains numerous functions for creating,
        training and testing feed-forward networks.  Training algorithms
        include back-propagation, pseudo-Newton, Levenberg-Marquardt,
        conjugate gradient descent, BFGS.... Furthermore, it is possible
        - due to the datastructures' general applicability - to build
        Kohonen maps and other more exotic network architectures using
        the same data types.



     TOOLDIAG

       Web site: www.inf.ufes.br/~thomas/www/home/tooldiag.html

       FTP site: ftp.inf.ufes.br/pub/tooldiag/

        TOOLDIAG is a collection of methods for statistical pattern
        recognition. The main area of application is classification. The
        application area is limited to multidimensional continuous
        features, without any missing values. No symbolic features
        (attributes) are allowed. The program in implemented in the 'C'
        programming language and was tested in several computing
        environments.



  4.

  Evolutionary Computing

  Evolutionary computing is actually a broad term for a vast array of
  programming techniques, including genetic algorithms, complex adaptive
  systems, evolutionary programming, etc.  The main thrust of all these
  techniques is the idea of evolution. The idea that a program can be
  written that will evolve toward a certain goal.  This goal can be
  anything from solving some engineering problem to winning a game.



  4.1.

  EC class/code libraries


  These are libraries of code or classes for use in programming within
  the evolutionary computation field.  They are not meant as stand alone
  applications, but rather as tools for building your own applications.



     daga

       Web site: GARAGe.cps.msu.edu/software/software-index.html


        daga is an experimental release of a 2-level genetic algorithm
        compatible with the GALOPPS GA software. It is a meta-GA which
        dynamically evolves a population of GAs to solve a problem
        presented to the lower-level GAs. When multiple GAs (with
        different operators, parameter settings, etc.) are
        simultaneously applied to the same problem, the ones showing
        better performance have a higher probability of surviving and
        "breeding" to the next macro-generation (i.e., spawning new
        "daughter"-GAs with characteristics inherited from the parental
        GA or GAs.  In this way, we try to encourage good problem-
        solving strategies to spread to the whole population of GAs.



     EO

       Web site: geneura.ugr.es/~jmerelo/EO.html

        EO is a templates-based, ANSI-C++ compliant evolutionary
        computation library. It contains classes for any kind of
        evolutionary computation (specially genetic algorithms) you
        might come up to. It is component-based, so that if you don't
        find the class you need in it, it is very easy to subclass
        existing abstract or concrete class.



     FORTRAN GA

       Web site: www.staff.uiuc.edu/~carroll/ga.html


        This program is a FORTRAN version of a genetic algorithm driver.
        This code initializes a random sample of individuals with
        different parameters to be optimized using the genetic algorithm
        approach, i.e.  evolution via survival of the fittest.  The
        selection scheme used is tournament selection with a shuffling
        technique for choosing random pairs for mating.  The routine
        includes binary coding for the individuals, jump mutation, creep
        mutation, and the option for single-point or uniform crossover.
        Niching (sharing) and an option for the number of children per
        pair of parents has been added.  More recently, an option for
        the use of a micro-GA has been added.



     GAGS

       Web site: kal-el.ugr.es/gags.html

       FTP site: kal-el.ugr.es/GAGS/


        Genetic Algorithm  application generator and class library
        written mainly in C++.  As a class library, and among other
        thing, GAGS includes:

       A chromosome hierarchy with variable length chromosomes.
        Genetic operators: 2-point crossover, uniform crossover, bit-
        flip mutation, transposition (gene interchange between 2 parts
        of the chromosome), and variable-length operators: duplication,
        elimination, and random addition.

       Population level operators include steady state, roulette wheel
        and tournament selection.

       Gnuplot wrapper: turns gnuplot into a iostreams-like class.

       Easy sample file loading and configuration file parsing.

        As an application generator (written in PERL), you only need to
        supply it with an ANSI-C or C++ fitness function, and it creates
        a C++ program that uses the above library to 90% capacity,
        compiles it, and runs it, saving results and presenting fitness
        thru gnuplot.



     GAlib: Matthew's Genetic Algorithms Library

       Web Site: lancet.mit.edu/ga/

       FTP site: lancet.mit.edu/pub/ga/

       Register GAlib at: lancet.mit.edu/ga/Register.html


        GAlib contains a set of C++ genetic algorithm objects.  The
        library includes tools for using genetic algorithms to do
        optimization in any C++ program using any representation and
        genetic operators.  The documentation includes an extensive
        overview of how to implement a genetic algorithm as well as
        examples illustrating customizations to the GAlib classes.



     GALOPPS

       Web site: GARAGe.cps.msu.edu/software/software-index.html

       FTP site: garage.cps.msu.edu/pub/GA/galopps/


        GALOPPS is a flexible, generic GA, in 'C'.  It was based upon
        Goldberg's Simple Genetic Algorithm (SGA) architecture, in order
        to make it easier for users to learn to use and extend.


        GALOPPS extends the SGA capabilities several fold:

       (optional) A new Graphical User Interface, based on TCL/TK, for
        Unix users, allowing easy running of GALOPPS 3.2 (single or
        multiple subpopulations) on one or more processors.  GUI
        writes/reads "standard" GALOPPS input and master files, and
        displays graphical output (during or after run) of user-selected
        variables.

       5 selection methods: roulette wheel, stochastic remainder
        sampling, tournament selection, stochastic universal sampling,
        linear-ranking-then-SUS.

       Random or superuniform initialization of "ordinary" (non-
        permutation) binary or non-binary chromosomes; random
        initialization of permutation-based chromosomes; or user-
        supplied initialization of arbitrary types of chromosomes.

       Binary or non-binary alphabetic fields on value-based
        chromosomes, including different user-definable field sizes.

       3 crossovers for value-based representations: 1-pt, 2-pt, and
        uniform, all of which operate at field boundaries if a non-
        binary alphabet is used.

       4 crossovers for order-based reps: PMX, order-based, uniform
        order-based, and cycle.

       4 mutations: fast bitwise, multiple-field, swap and random
        sublist scramble.

       Fitness scaling: linear scaling, Boltzmann scaling, sigma
        truncation, window scaling, ranking.

       Plus a whole lot more....



     GAS

       Web site: starship.skyport.net/crew/gandalf

       FTP site: ftp.coe.uga.edu/users/jae/ai


        GAS means "Genetic Algorithms Stuff".

        GAS is freeware.

        Purpose of GAS is to explore and exploit artificial evolutions.
        Primary implementation language of GAS is Python.  The GAS
        software package is meant to be a Python framework for applying
        genetic algorithms. It contains an example application where it
        is tried to breed Python program strings.  This special problem
        falls into the category of Genetic Programming (GP), and/or
        Automatic Programming.  Nevertheless, GAS tries to be useful for
        other applications of Genetic Algorithms as well.



     GECO

       FTP site: ftp://ftp.aic.nrl.navy.mil/pub/galist/src/


        GECO (Genetic Evolution through Combination of Objects), an
        extendible object-oriented tool-box for constructing genetic
        algorithms (in Lisp).  It provides a set of extensible classes
        and methods designed for generality. Some simple examples are
        also provided to illustrate the intended use.



     GPdata

       FTP site: ftp.cs.bham.ac.uk/pub/authors/W.B.Langdon/gp-code/

       Documentation (GPdata-icga-95.ps): cs.ucl.ac.uk/genetic/papers/


        GPdata-3.0.tar.gz (C++) contains a version of Andy Singleton's
        GP-Quick version 2.1 which has been extensively altered to
        support:

       Indexed memory operation (cf. teller)

       multi tree programs

       Adfs

       parameter changes without recompilation

       populations partitioned into demes

       (A version of) pareto fitness

        This ftp site also contains a small C++ program (ntrees.cc) to
        calculate the number of different there are of a given length
        and given function and terminal set.



     gpjpp Genetic Programming in Java

       [Dead Link] Web site: http://www.turbopower.com/~kimk/gpjpp.asp

       Anyone who knows where to find gpjpp, please let me know.


        gpjpp is a Java package I wrote for doing research in genetic
        programming. It is a port of the gpc++ kernel written by Adam
        Fraser and Thomas Weinbrenner. Included in the package are four
        of Koza's standard examples: the artificial ant, the hopping
        lawnmower, symbolic regression, and the boolean multiplexer.
        Here is a partial list of its features:

       graphic output of expression trees

       efficient diversity checking

       Koza's greedy over-selection option for large populations

       extensible GPRun class that encapsulates most details of a
        genetic programming test

       more robust and efficient streaming code, with automatic
        checkpoint and restart built into the GPRun class
       an explicit complexity limit that can be set on each GP

       additional configuration variables to allow more testing without
        recompilation

       support for automatically defined functions (ADFs)

       tournament and fitness proportionate selection

       demetic grouping

       optional steady state population

       subtree crossover

       swap and shrink mutation



     GP Kernel

       Web site (???): www.emk.e-technik.th-
        darmstadt.de/~thomasw/gp.html

        The GP kernel is a C++ class library that can be used to apply
        genetic programming techniques to all kinds of problems. The
        library defines a class hierarchy. An integral component is the
        ability to produce automatically defined functions as found in
        Koza's "Genetic Programming II". Technical documentation
        (postscript format) is included. There is also a short
        introduction into genetic programming.


        Functionality includes; Automatically defined functions (ADFs),
        tournament and fitness proportionate selection, demetic
        grouping, optional steady state genetic programming kernel,
        subtree crossover, swap and shrink mutation, a way of changing
        every parameter of the system without recompilation, capacity
        for multiple populations, loading and saving of populations and
        genetic programs, standard random number generator, internal
        parameter checks.



     lil-gp

       Web site: GARAGe.cps.msu.edu/software/software-index.html#lilgp

       FTP site: garage.cps.msu.edu/pub/GA/lilgp/


     patched lil-gp *

       Web site: www.cs.umd.edu/users/seanl/gp/


        lil-gp is a generic 'C' genetic programming tool. It was written
        with a number of goals in mind: speed, ease of use and support
        for a number of options including:

       Generic 'C' program that runs on UNIX workstations

       Support for multiple population experiments, using arbitrary and
        user settable topologies for exchange, for a single processor
        (i.e., you can do multiple population gp experiments on your
        PC).

       lil-gp manipulates trees of function pointers which are
        allocated in single, large memory blocks for speed and to avoid
        swapping.

        * The patched lil-gp kernel is strongly-typed, with
        modifications on multithreading, coevolution, and other tweaks
        and features.



     PGAPack
        Parallel Genetic Algorithm Library

       Web site: www.mcs.anl.gov/~levine/PGAPACK/

       FTP site: ftp.mcs.anl.gov/pub/pgapack/


        PGAPack is a general-purpose, data-structure-neutral, parallel
        genetic algorithm library. It is intended to provide most
        capabilities desired in a genetic algorithm library, in an
        integrated, seamless, and portable manner. Key features are in
        PGAPack V1.0 include:

       Callable from Fortran or C.

       Runs on uniprocessors, parallel computers, and workstation
        networks.

       Binary-, integer-, real-, and character-valued native data
        types.

       Full extensibility to support custom operators and new data
        types.

       Easy-to-use interface for novice and application users.

       Multiple levels of access for expert users.

       Parameterized population replacement.

       Multiple crossover, mutation, and selection operators.

       Easy integration of hill-climbing heuristics.

       Extensive debugging facilities.

       Large set of example problems.

       Detailed users guide.



     PIPE

       Web site: www.idsia.ch/~rafal/research.html

       FTP site: ftp.idsia.ch/pub/rafal

        Probabilistic Incremental Program Evolution (PIPE) is a novel
        technique for automatic program synthesis. The software is
        written in C. It
       is easy to install (comes with an automatic installation tool).

       is easy to use: setting up PIPE_V1.0 for different problems
        requires a minimal amount of programming. User-written,
        application- independent program parts can easily be reused.

       is efficient: PIPE_V1.0 has been tuned to speed up performance.

       is portable: comes with source code (optimized for SunOS 5.5.1).

       is extensively documented(!) and contains three example
        applications.

       supports statistical evaluations: it facilitates running
        multiple experiments and collecting results in output files.

       includes testing tool for testing generalization of evolved
        programs.

       supports floating point and integer arithmetic.

       has extensive output features.

       For lil-gp users: Problems  set up for lil-gp 1.0 can be easily
        ported to PIPE_v1.0.  The  testing tool can also be used to
        process programs evolved by lil-gp 1.0.



     Sugal

       Web site: www.trajan-software.demon.co.uk/sugal.htm

        Sugal [soo-gall] is the SUnderland Genetic ALgorithm system. The
        aim of Sugal is to support research and implementation in
        Genetic Algorithms on a common software platform. As such, Sugal
        supports a large number of variants of Genetic Algorithms, and
        has extensive features to support customization and extension.



  4.2.

  EC software kits/applications


  These are various applications, software kits, etc. meant for research
  in the field of evolutionary computing. Their ease of use will vary,
  as they were designed to meet some particular research interest more
  than as an easy to use commercial package.



     ADATE

       Web site: www-ia.hiof.no/~rolando/adate_intro.html


        ADATE (Automatic Design of Algorithms Through Evolution) is a
        system for automatic programming i.e., inductive inference of
        algorithms, which may be the best way to develop artificial and
        general intelligence.


        The ADATE system can automatically generate non-trivial and
        novel algorithms. Algorithms are generated through large scale
        combinatorial search that employs sophisticated program
        transformations and heuristics. The ADATE system is particularly
        good at synthesizing symbolic, functional programs and has
        several unique qualities.



     esep & xesep

       Web site(esep): www.iit.edu/~linjinl/esep.html

       Web site(xesep): www.iit.edu/~linjinl/xesep.html


        This is a new scheduler, called Evolution Scheduler, based on
        Genetic Algorithms and Evolutionary Programming. It lives with
        original Linux priority scheduler.This means you don't have to
        reboot to change the scheduling policy. You may simply use the
        manager program esep to switch between them at any time, and
        esep itself is an all-in-one for scheduling status, commands,
        and administration. We didn't intend to remove the original
        priority scheduler; instead, at least, esep provides you with
        another choice to use a more intelligent scheduler, which
        carries out natural competition in an easy and effective way.


        Xesep is a graphical user interface to the esep (Evolution
        Scheduling and Evolving Processes). It's intended to show users
        how to start, play, and feel the Evolution Scheduling and
        Evolving Processes, including sub-programs to display system
        status, evolving process status, queue status, and evolution
        scheduling status periodically in as small as one mini-second.



     Corewars

       Web site: corewars.sourceforge.net/

       SourceForge site: sourceforge.net/project/?group_id=3054

        Corewars is a game which simulates a virtual machine with a
        number of programs. Each program tries to crash the others. The
        program that lasts the longest time wins. A number of sample
        programs are provided and new programs can be written by the
        player. Screenshots are available at the Corewars homepage.



     Corewar VM

       Web site: www.jedi.claranet.fr/


        This is a virtual machine written in Java (so it is a virtual
        machine for another virtual machine !) for a Corewar game.



     FSM-Evolver

       Web site (???): pages.prodigy.net/czarneckid


        A Java (jdk-v1.0.2+) code library that is used to evolve finite
        state machines. The problem included in the package is the
        Artificial Ant problem. You should be able to compile the .java
        files and then run: java ArtificialAnt.



     GPsys

       Web site: www.cs.ucl.ac.uk/staff/A.Qureshi/gpsys.html


        GPsys (pronounced gipsys) is a Java (requires Java 1.1 or later)
        based Genetic Programming system developed by Adil Qureshi.  The
        software includes documentation, source and executables.


        Feature Summary:

       Steady State engine

       ADF support

       Strongly Typed

        1. supports generic functions and terminals

        2. has many built-in primitives

        3. includes indexed memory

       Save/Load feature

        1. can save/load current generation to/from a file

        2. data stored in GZIP compression format to minimise disk
           requirements

        3. uses serialisable objects for efficiency

       Fully Documented

       Example Problems

        1. Lawnmower (including GUI viewer)

        2. Symbolic Regression

       Totally Parameterised

       Fully Object Oriented and Extensible

       High Performance

       Memory Efficient



     JGProg

       Web site: www.linuxstart.com/~groovyjava/JGProg/

        Genetic Programming (JGProg) is an open-source Java
        implementation of a strongly-typed Genetic Programming
        experimentation platform. Two example "worlds" are provided, in
        which a population evolves and solves the problem.



  5.

  Alife & Complex Systems



  Alife takes yet another approach to exploring the mysteries of
  intelligence.  It has many aspects similar to EC and Connectionism,
  but takes these ideas and gives them a meta-level twist. Alife
  emphasizes the development of intelligence through emergent behavior
  of complex adaptive systems.  Alife stresses the social or group based
  aspects of intelligence. It seeks to understand life and survival. By
  studying the behaviors of groups of 'beings' Alife seeks to discover
  the way intelligence or higher order activity emerges from seemingly
  simple individuals. Cellular Automata and Conway's Game of Life are
  probably the most commonly known applications of this field. Complex
  Systems (abbreviated CS) are very similar to alife in the way the are
  approached, just more general in definition (ie.  alife is a type of
  complex system).  Usually complex system software takes the form of a
  simulator.



  5.1.

  Alife & CS class/code libraries



  These are libraries of code or classes for use in programming within
  the artificial life field.  They are not meant as stand alone
  applications, but rather as tools for building your own applications.



     CASE

       Web site: www.iu.hioslo.no/~cell/

       FTP site: ftp.iu.hioslo.no/pub/

        CASE (Cellular Automaton Simulation Environment) is a C++
        toolkit for visualizing discrete models in two dimensions: so-
        called cellular automata. The aim of this project is to create
        an integrated framework for creating generalized cellular
        automata using the best, standardized technology of the day.



     John von Neumann Universal Constructor

       Web site: alife.santafe.edu/alife/software/jvn.html

       FTP site: alife.santafe.edu/pub/SOFTWARE/jvn/


        The universal constructor of John von Neumann is an extension of
        the logical concept of universal computing machine.  In the
        cellular environment proposed by von Neumann both computing and
        constructive universality can be achieved.  Von Neumann proved
        that in his cellular lattice both a Turing machine and a machine
        capable of producing any other cell assembly, when fed with a
        suitable program, can be embedded. He called the latter machine
        a ''universal constructor'' and showed that, when provided with
        a program containing its own description, this is capable of
        self-reproducing.



     Swarm

       Web site:  www.santafe.edu/projects/swarm

       FTP site:  ftp.santafe.edu/pub/swarm


        The swarm Alife simulation kit. Swarm is a simulation
        environment which facilitates development and experimentation
        with simulations involving a large number of agents behaving and
        interacting within a dynamic environment.  It consists of a
        collection of classes and libraries written in Objective-C and
        allows great flexibility in creating simulations and analyzing
        their results.  It comes with three demos and good
        documentation.


        Swarm 1.0 is out. It requires libtclobjc and BLT 2.1 (both
        available at the swarm site).



  5.2.

  Alife & CS software kits, applications, etc.


  These are various applications, software kits, etc. meant for research
  in the field of artificial life. Their ease of use will vary, as they
  were designed to meet some particular research interest more than as
  an easy to use commercial package.



     Avida

       Web site: http://www.krl.caltech.edu/avida/home/software.html

       Web site: www.krl.caltech.edu/avida/pubs/nature99/

        The computer program avida is an auto-adaptive genetic system
        designed primarily for use as a platform in Artificial Life
        research. The avida system is based on concepts similar to those
        employed by the tierra program, that is to say it is a
        population of self-reproducing strings with a Turing-complete
        genetic basis subjected to Poisson-random mutations. The
        population adapts to the combination of an intrinsic fitness
        landscape (self-reproduction) and an externally imposed
        (extrinsic) fitness function provided by the researcher. By
        studying this system, one can examine evolutionary adaptation,
        general traits of living systems (such as self-organization),
        and other issues pertaining to theoretical or evolutionary
        biology and dynamic systems.



     BugsX

       FTP site: ftp.de.uu.net/pub/research/ci/Alife/packages/bugsx/


        Display and evolve biomorphs. It is a program which draws the
        biomorphs based on parametric plots of Fourier sine and cosine
        series and let's you play with them using the genetic algorithm.



     The Cellular Automata Simulation System

       Web site: www.cs.runet.edu/~dana/ca/cellular.html


        The system consists of a compiler for the Cellang cellular
        automata programming language, along with the corresponding
        documentation, viewer, and various tools. Cellang has been
        undergoing refinement for the last several years (1991-1995),
        with corresponding upgrades to the compiler.  Postscript
        versions of the tutorial and language reference manual are
        available for those wanting more detailed information. The most
        important distinguishing features of Cellang, include support
        for:

       any number of dimensions;

       compile time specification of each dimensions size; cell
        neighborhoods of any size (though bounded at compile time) and
        shape;

       positional and time dependent neighborhoods;

       associating multiple values (fields), including arrays, with
        each cell;

       associating a potentially unbounded number of mobile agents [
        Agents are mobile entities based on a mechanism of the same name
        in the Creatures system, developed by Ian Stephenson
        (ian@ohm.york.ac.uk).] with each cell; and

       local interactions only, since it is impossible to construct
        automata that contain any global control or references to global
        variables.



     Cyphesis

       Web site: www.worldforge.org/website/servers/cyphesis/

        Cyphesis will be the AI Engine, or more plainly, the
        intelligence behind Worldforge (WF).  Cyphesis will aims to
        achieve 'live' virtual worlds. Animals will have young, prey on
        each other and eventually die. Plants grow, flower, bear fruit
        and even die just as they do in real life. When completed, NPCs
        in Cyphesis will do all sorts of interesting things like attempt
        to acomplish ever-changing goals that NPCs set for themselves,
        gossip to PCs and other NPCs, live, die and raise children.
        Cyphesis aims to make NPCs act just like you and me.



     dblife & dblifelib

       FTP site: ftp.cc.gatech.edu/ac121/linux/games/amusements/life/


        dblife: Sources for a fancy Game of Life program for X11 (and
        curses).  It is not meant to be incredibly fast (use xlife for
        that:-).  But it IS meant to allow the easy editing and viewing
        of Life objects and has some powerful features.  The related
        dblifelib package is a library of Life objects to use with the
        program.


        dblifelib: This is a library of interesting Life objects,
        including oscillators, spaceships, puffers, and other weird
        things.  The related dblife package contains a Life program
        which can read the objects in the Library.



     Drone

       Web site: pscs.physics.lsa.umich.edu/Software/Drone/


        Drone is a tool for automatically running batch jobs of a
        simulation program. It allows sweeps over arbitrary sets of
        parameters, as well as multiple runs for each parameter set,
        with a separate random seed for each run. The runs may be
        executed either on a single computer or over the Internet on a
        set of remote hosts. Drone is written in Expect (an extension to
        the Tcl scripting language) and runs under Unix. It was
        originally designed for use with the Swarm agent-based
        simulation framework, but Drone can be used with any simulation
        program that reads parameters from the command line or from an
        input file.


     EBISS

       Web site: www.ebiss.org/english/

        EBISS is a multi-disciplinary, open, collaborative project aimed
        at investigating social problems by means of computational
        modeling and social simulations. During the past four years we
        have been developing SARA, a multi-agent gaming simulation
        platform providing for easy construction of simulations and
        gamings.

        We believe that in order to have a break-through in the
        difficult task of understanding real-world complex social
        problems, we need to gather researchers and experts with
        different backgrounds not only in discussion forums, but in a
        tighter cooperative task of building and sharing common
        experimental platforms.



     EcoLab

       Web site: parallel.acsu.unsw.edu.au/rks/ecolab.html


        EcoLab is a system that implements an abstract ecology model. It
        is written as a set of Tcl/Tk commands so that the model
        parameters can easily be changed on the fly by means of editing
        a script. The model itself is written in C++.



     Game Of Life (GOL)

       Web site: www.arrakeen.demon.co.uk/downloads.html

       FTP site: metalab.unc.edu/pub/Linux/science/ai/life


        GOL is a simulator for conway's game of life (a simple cellular
        automata), and other simple rule sets. The emphasis here is on
        speed and scale, in other words you can setup large and fast
        simulations.



     gLife

       Web site: glife.sourceforge.net

       SourceForge site: sourceforge.net/project/?group_id=748

        This program is similiar to "Conway's Game of Life" but yet it
        is very different. It takes "Conway's Game of Life" and applies
        it to a society (human society). This means there is a very
        different (and much larger) ruleset than in the original game.
        Things need to be taken into account such as the terrain, age,
        sex, culture, movement, etc



     Grany-3

       Web site: altern.org/gcottenc/html/grany.html

        Grany-3 is a full-featured cellular automaton simulator, made in
        C++ with Gtk--, flex++/bison++, doxygen and gettext, useful to
        granular media physicists.



     Langton's Ant

       Web site: theory.org/software/ant/

        Langton's Ant is an example of a finite-state cellular automata.
        The ant (or ants) start out on a grid. Each cell is either black
        or white.  If the ant is on a black square, it turns right 90
        and moves forward one unit. If the ant is on a white square, it
        turns left 90 and moves forward one unit.  And when the ant
        leaves a square, it inverts the color. The neat thing about
        Langton's Ant is that no matter what pattern field you start it
        out on, it eventually builds a "road," which is a series of 117
        steps that repeat indefinitely, each time leaving the ant
        displaced one pixel vertically and horizontally.



     LEE

       Web site: dollar.biz.uiowa.edu/~fil/LEE/

       FTP site: dollar.biz.uiowa.edu/pub/fil/LEE/


        LEE (Latent Energy Environments) is both an Alife model and a
        software tool to be used for simulations within the framework of
        that model. We hope that LEE will help understand a broad range
        of issues in theoretical, behavioral, and evolutionary biology.
        The LEE tool described here consists of approximately 7,000
        lines of C code and runs in both Unix and Macintosh platforms.



     Net-Life & ZooLife

       FTP site: ftp.coe.uga.edu/users/jae/alife/

        *(netlife-2.0.tar.gz contains both Net-Life and ZooLife)


        Net-Life is a simulation of artificial-life, with neural
        "brains" generated via slightly random techniques. Net-Life uses
        artificial neural nets and evolutionary algorithms to breed
        artificial organisms that are similar to single cell organisms.
        Net-life uses asexual reproduction of its fittest individuals
        with a chance of mutation after each round to eventually evolve
        successful life-forms.


        ZooLife is a simulation of artificial-life. ZooLife uses
        probabilistic methods and evolutionary algorithms to breed
        artificial organisms that are similar to plant/animal zoo
        organisms.  ZooLife uses asexual reproduction with a chance of
        mutation.



     POSES++

       Web site: www.tu-chemnitz.de/ftp-
        home/pub/Local/simulation/poses++/www/index.html

        The POSES++ software tool supports the development and
        simulation of models.  Regarding the simulation technique models
        are suitable reproductions of real or planned systems for their
        simulative investigation.

        In all industrial sectors or branches POSES++ can model and
        simulate any arbitrary system which is based on a discrete and
        discontinuous behaviour. Also continuous systems can mostly be
        handled like discrete systems e.g., by quantity discretion and
        batch processing.



     Primordial Soup

       Web site: alife.santafe.edu/alife/software/psoup.html


        Primordial Soup is an artificial life program. Organisms in the
        form of computer software loops live in a shared memory space
        (the "soup") and self-reproduce. The organisms mutate and
        evolve, behaving in accordance with the principles of Darwinian
        evolution.


        The program may be started with one or more organisms seeding
        the soup. Alternatively, the system may be started "sterile",
        with no organisms present. Spontaneous generation of self-
        reproducing organisms has been observed after runs as short as
        15 minutes.



     Tierra

       Web site: www.hip.atr.co.jp/~ray/tierra/tierra.html

       FTP site: alife.santafe.edu/pub/SOFTWARE/Tierra/

       Alternate

       FTP site: ftp.cc.gatech.edu/ac121/linux/science/biology/


        Tierra's written in the C programming language. This source code
        creates a virtual computer and its operating system, whose
        architecture has been designed in such a way that the executable
        machine codes are evolvable. This means that the machine code
        can be mutated (by flipping bits at random) or recombined (by
        swapping segments of code between algorithms), and the resulting
        code remains functional enough of the time for natural (or
        presumably artificial) selection to be able to improve the code
        over time.



     TIN

       FTP site: ftp.coe.uga.edu/users/jae/alife/


        This program simulates primitive life-forms, equipped with some
        basic instincts and abilities, in a 2D environment consisting of
        cells.  By mutation new generations can prove their success, and
        thus passing on "good family values".


        The brain of a TIN can be seen as a collection of processes,
        each representing drives or impulses to behave a certain way,
        depending on the state/perception of the environment ( e.g.
        presence of food, walls, neighbors, scent traces) These behavior
        process currently are : eating, moving, mating, relaxing,
        tracing others, gathering food and killing. The process with the
        highest impulse value takes control, or in other words: the tin
        will act according to its most urgent need.



     XLIFE

       FTP site: ftp.cc.gatech.edu/ac121/linux/games/amusements/life/


        This program will evolve patterns for John Horton Conway's game
        of Life.  It will also handle general cellular automata with the
        orthogonal neighborhood and up to 8 states (it's possible to
        recompile for more states, but very expensive in memory).
        Transition rules and sample patterns are provided for the
        8-state automaton of E. F. Codd, the Wireworld automaton, and a
        whole class of `Prisoner's Dilemma' games.



     Xtoys

       Web site: penguin.phy.bnl.gov/www/xtoys.html

        xtoys contains a set of cellular automata simulators for X
        windows.  Programs included are:

       xising --- a two dimensional Ising model simulator,

       xpotts --- the two dimensional Potts model,

       xautomalab ---  a totalistic cellular automaton simulator,

       xsand --- for the Bak, Tang, Wiesenfeld sandpile model,

       xwaves --- demonstrates three different wave equations,

       schrodinger --- play with the Scrodinger equation in an
        adjustable potential.



  6.

  Autonomous Agents


  Also known as intelligent software agents or just agents, this area of
  AI research deals with simple applications of small programs that aid
  the user in his/her work. They can be mobile (able to stop their
  execution on one machine and resume it on another) or static (live in
  one machine). They are usually specific to the task (and therefore
  fairly simple) and meant to help the user much as an assistant would.
  The most popular (ie. widely known) use of this type of application to
  date are the web robots that many of the indexing engines (eg.
  webcrawler) use.
     AgentK

       FTP site: ftp.csd.abdn.ac.uk/pub/wdavies/agentk


        This package synthesizes two well-known agent paradigms: Agent-
        Oriented Programming, Shoham (1990), and the Knowledge Query &
        Manipulation Language, Finin (1993). The initial implementation
        of AOP, Agent-0, is a simple language for specifying agent
        behaviour. KQML provides a standard language for inter-agent
        communication. Our integration (which we have called Agent-K)
        demonstrates that Agent-0 and KQML are highly compatible. Agent-
        K provides the possibility of inter-operable (or open) software
        agents, that can communicate via KQML and which are programmed
        using the AOP approach.



     Agent

       FTP site: www.cpan.org/modules/by-
        category/23_Miscellaneous_Modules/Agent/


        The Agent is a prototype for an Information Agent system. It is
        both platform and language independent, as it stores contained
        information in simple packed strings. It can be packed and
        shipped across any network with any format, as it freezes itself
        in its current state.



     D'Agent (was AGENT TCL)

       Web site: agent.cs.dartmouth.edu/software/agent2.0/

       FTP site: ftp.cs.dartmouth.edu/pub/agents/


        A transportable agent is a program that can migrate from machine
        to machine in a heterogeneous network.  The program chooses when
        and where to migrate.  It can suspend its execution at an
        arbitrary point, transport to another machine and resume
        execution on the new machine.  For example, an agent carrying a
        mail message migrates first to a router and then to the
        recipient's mailbox.  The agent can perform arbitrarily complex
        processing at each machine in order to ensure that the message
        reaches the intended recipient.



     Aglets Workbench

       Web site: www.trl.ibm.co.jp/aglets/


        An aglet is a Java object that can move from one host on the
        Internet to another.  That is, an aglet that executes on one
        host can suddenly halt execution, dispatch to a remote host, and
        resume execution there. When the aglet moves, it takes along its
        program code as well as its state (data). A built-in security
        mechanism makes it safe for a computer to host untrusted aglets.
        The Java Aglet API (J-AAPI) is a proposed public standard for
        interfacing aglets and their environment. J-AAPI contains
        methods for initializing an aglet, message handling, and
        dispatching, retracting, deactivating/activating, cloning, and
        disposing of the aglet. J-AAPI is simple, flexible, and stable.
        Application developers can write platform-independent aglets and
        expect them to run on any host that supports J-AAPI.



     A.L.I.C.E.

       Web site: www.alicebot.org

        The ALICE software implements AIML (Artificial Intelligence
        Markup Language), a non-standard evolving markup language for
        creating chat robots. The primary design feature of AIML is
        minimalism. Compared with other chat robot languages, AIML is
        perhaps the simplest. The pattern matching language is very
        simple, for example permitting only one wild-card ('*') match
        character per pattern. AIML is an XML language, implying that it
        obeys certain grammatical meta-rules. The choice of XML syntax
        permits integration with other tools such as XML editors.
        Another motivation for XML is its familiar look and feel,
        especially to people with HTML experience.



     Ara

       Web site: www.uni-kl.de/AG-Nehmer/Projekte/Ara/index_e.html


        Ara is a platform for the portable and secure execution of
        mobile agents in heterogeneous networks. Mobile agents in this
        sense are programs with the ability to change their host machine
        during execution while preserving their internal state. This
        enables them to handle interactions locally which otherwise had
        to be performed remotely. Ara's specific aim in comparison to
        similar platforms is to provide full mobile agent functionality
        while retaining as much as possible of established programming
        models and languages.



     Bee-gent

       Web site: www2.toshiba.co.jp/beegent/index.htm

        Bee-gent is a new type of development framework in that it is a
        100% pure agent system. As opposed to other systems which make
        only some use of agents, Bee-gent completely "Agentifies" the
        communication that takes place between software applications.
        The applications become agents, and all messages are carried by
        agents. Thus, Bee-gent allows developers to build flexible open
        distributed systems that make optimal use of existing
        applications.


     Bots

       Web site: utenti.tripod.it/Claudio1977/bots.html

        Another AI-robot battle simulation.  Utilizing probablistic
        logic as a machine learning technique.  Written in C++ (with C++
        bots).

     Cadaver

       Web site: www.erikyyy.de/cadaver/

        Cadaver is a simulated world of cyborgs and nature in realtime.
        The battlefield consists of forests, grain, water, grass,
        carcass (of course) and lots of other things. The game server
        manages the game and the rules.  You start a server and connect
        some clients.  The clients communicate with the server using a
        very primitive protocol.  They can order cyborgs to harvest
        grain, attack enemies or cut forest.  The game is not intended
        to be played by humans!  There is too much to control.  Only for
        die-hards: Just telnet to the server and you can enter commands
        by hand.  Instead the idea is that you write artificial
        intelligence clients to beat the other artificial intelligences.
        You can choose a language (and operating system) of your choice
        to do that task.  It is enough to write a program that
        communicates on standard input and standard output channels.
        Then you can use programs like "socket" to connect your clients
        to the server.  It is NOT needed to write TCP/IP code, although
        i did so :) The battle shall not be boring, and so there is the
        so called spyboss client that displays the action graphically on
        screen.



     Dunce

       Web site: www.boswa.com/boswabits/

        Dunce is a simple chatterbot (conversational AI) and a language
        for programming such chatterbots. It uses a basic regex pattern
        matching and a semi-neural rule/response firing mechanism (with
        excitement/decay cycles).

        Dunce is listed about halfway down the page.



     FishMarket

       Web site: www.iiia.csic.es/Projects/fishmarket/

        FM - The FishMarket project conducted at the Artificial
        Intelligence Research Institute (IIIA-CSIC) attempts to
        contribute in that direction by developing FM, an agent-mediated
        electronic auction house which has been evolved into a test-bed
        for electronic auction markets. The framework, conceived and
        implemented as an extension of FM96.5 (a Java-based version of
        the Fishmarket auction house), allows to define trading
        scenarios based on fish market auctions (Dutch auctions). FM
        provides the framework wherein agent designers can perform
        controlled experimentation in such a way that a multitude of
        experimental market scenarios--that we regard as tournament
        scenarios due to the competitive nature of the domain-- of
        varying degrees of realism and complexity can be specified,
        activated, and recorded; and trading (buyer and seller)
        heterogeneous (human and software) agents compared, tuned and
        evaluated.



     Hive

       Web site: www.hivecell.net/

        Hive is a Java software platform for creating distributed
        applications.  Using Hive, programmers can easily create systems
        that connect and use data from all over the Internet. At its
        heart, Hive is an environment for distributed agents to live,
        communicating and moving to fulfill applications. We are trying
        to make the Internet alive.



     Jade

       Web site: sharon.cselt.it/projects/jade/

        JADE (Java Agent DEvelopment Framework) is a software framework
        fully implemented in Java language. It simplifies the
        implementation of multi-agent systems through a middle-ware that
        claims to comply with the FIPA specifications and through a set
        of tools that supports the debugging and deployment phase. The
        agent platform can be distributed across machines (which not
        even need to share the same OS) and the configuration can be
        controlled via a remote GUI. The configuration can be even
        changed at run-time by moving agents from one machine to another
        one, as and when required.



     JAFMAS

       Web site: www.ececs.uc.edu/~abaker/JAFMAS


        JAFMAS provides a framework to guide the coherent development of
        multiagent systems along with a set of classes for agent
        deployment in Java. The framework is intended to help beginning
        and expert developers structure their ideas into concrete agent
        applications. It directs development from a speech-act
        perspective and supports multicast and directed communication,
        KQML or other speech-act performatives and analysis of
        multiagent system coherency and consistency.


        Only four of the provided Java classes must be extended for any
        application. Provided examples of the N-Queens and Supply Chain
        Integration use only 567 and 1276 lines of additional code
        respectively for implementation.



     JAM Agent

       Web site: members.home.net/marcush/IRS/

        JAM supports both top-down, goal-based reasoning and bottom-up
        data-driven reasoning. JAM selects goals and plans based on
        maximal priority if metalevel reasoning is not used, or user-
        developed metalevel reasoning plans if they exist. JAM's
        conceptualization of goals and goal achievement is more
        classically defined (UMPRS is more behavioral performance-based
        than truly goal-based) and makes the distinction between plans
        to achieve goals and plans that simply encode behaviors. Goal-
        types implemented include achievement (attain a specified world
        state), maintenance (re-attain a specified world state), and
        performance. Execution of multiple simultaneous goals are
        supported, with suspension and resumption capabilities for each
        goal (i.e., intention) thread. JAM plans have explicit
        precondition and runtime attributes that restrict their
        applicability, a postcondition attribute, and a plan attributes
        section for specifying plan/domain-specific plan features.
        Available plan constructs include: sequencing, iteration,
        subgoaling, atomic (i.e., non-interruptable) plan segments, n-
        branch deterministic and non-deterministic conditional
        execution, parallel execution of multiple plan segments, goal-
        based or world state-based synchronization, an explicit failure-
        handling section, and Java primitive function definition through
        building it into JAM as well as the invocation of predefined
        (i.e., legacy) class members via Java's reflection capabilities
        without having to build it into JAM.



     JATLite

       Web site: java.stanford.edu/java_agent/html/


        JATLite is providing a set of java packages which makes easy to
        build multi-agent systems using Java. JATLite provides only
        light-weight, small set of packages so that the developers can
        handle all the packages with little efforts. For flexibility
        JATLite provides four different layers from abstract to Router
        implementation. A user can access any layer we are providing.
        Each layer has a different set of assumptions. The user can
        choose an appropriate layer according to the assumptions on the
        layer and user's application. The introduction page contains
        JATLite features and the set of assumptions for each layer.



     JATLiteBeans

       Web site: waitaki.otago.ac.nz/JATLiteBean/


       Improved, easier-to-use interface to JATLite features including
        KQML message parsing, receiving, and sending.


       Extensible architecture for message handling and agent "thread
        of control" management


       Useful functions for parsing of simple KQML message content


       JATLiteBean supports automatic advertising of agent capabilities
        to facilitator agents


       Automatic, optional, handling of the "forward" performative


       Generic configuration file parser



       KQML syntax checker



     Java(tm) Agent Template

       Web site: cdr.stanford.edu/ABE/JavaAgent.html


        The JAT provides a fully functional template, written entirely
        in the Java language, for constructing software agents which
        communicate peer-to-peer with a community of other agents
        distributed over the Internet. Although portions of the code
        which define each agent are portable, JAT agents are not
        migratory but rather have a static existence on a single host.
        This behavior is in contrast to many other "agent" technologies.
        (However, using the Java RMI, JAT agents could dynamically
        migrate to a foreign host via an agent resident on that host).
        Currently, all agent messages use KQML as a top-level protocol
        or message wrapper. The JAT includes functionality for
        dynamically exchanging "Resources", which can include Java
        classes (e.g. new languages and interpreters, remote services,
        etc.), data files and information inlined into the KQML
        messages.



     Java-To-Go

       Web site: ptolemy.eecs.berkeley.edu/dgm/javatools/java-to-go/


        Java-To-Go is an experimental infrastructure that assists in the
        development and experimentation of mobile agents and agent-based
        applications for itinerative computing (itinerative computing:
        the set of applications that requires site-to-site computations.
        The main emphasis here is on a easy-to-setup environment that
        promotes quick experimentation on mobile agents.



     Kafka

       Web site: www.fujitsu.co.jp/hypertext/free/kafka/


        Kafka is yet another agent library designed for constructing
        multi-agent based distributed applications. Kafka is a flexible,
        extendable, and easy-to-use java class library for programmers
        who are familiar with distributed programming. It is based on
        Java's RMI and has the following added features:

       Runtime Reflection: Agents can modify their behaviour (program
        codes) at runtime. The behaviour of the agent is represented by
        an abstract class Action. It is useful for remote maintenance or
        installation services.

       Remote Evaluation: Agents can receive and evaluate program codes
        (classes) with or without the serialized object. Remote
        evaluation is a fundamental function of a mobile agent and is
        thought to be a push model of service delivery.

       Distributed Name Service: Agents have any number of logical
        names that don't contain the host name. These names can be
        managed by the distributed directories.

       Customizable security policy: a very flexible, customizable,
        3-layered security model is implemented in Kafka.

       100% Java and RMI compatible: Kafka is written completely in
        Java. Agent is a Java RMI server object itself. So, agents can
        directly communicate with other RMI objects.



     Khepera Simulator

       Web site: diwww.epfl.ch/lami/team/michel/khep-sim/


        Khepera Simulator is a public domain software package written by
        Olivier MICHEL during the preparation of his Ph.D. thesis, at
        the Laboratoire I3S, URA 1376 of CNRS and University of Nice-
        Sophia Antipolis, France. It allows to write your own controller
        for the mobile robot Khepera using C or C++ languages, to test
        them in a simulated environment and features a nice colorful X11
        graphical interface. Moreover, if you own a Khepera robot, it
        can drive the real robot using the same control algorithm. It is
        mainly oriented toward to researchers studying autonomous
        agents.


     lyntin

       Web site: lyntin.sourceforge.net/

        Lyntin is an extensible Mud client and framework for the
        creation of autonomous agents, or bots, as well as mudding in
        general. Lyntin is centered around Python, a dynamic, object-
        oriented, and fun programming language and based on TinTin++ a
        lovely mud client.



     Mole

       Web site: mole.informatik.uni-stuttgart.de/


        Mole is an agent system supporting mobile agents programmed in
        Java.  Mole's agents consist of a cluster of objects, which have
        no references to the outside, and as a whole work on tasks given
        by the user or another agent. They have the ability to roam a
        network of "locations" autonomously. These "locations" are an
        abstraction of real, existing nodes in the underlying network.
        They can use location-specific resources by communicating with
        dedicated agents representing these services. Agents are able to
        use services provided by other agents and to provide services as
        well.



     Penguin!

       FTP site: www.perl.org/CPAN/modules/by-
        category/23_Miscellaneous_Modules/Penguin/FSG/
        Penguin is a Perl 5 module. It provides you with a set of
        functions which allow you to:

       send encrypted, digitally signed Perl code to a remote machine
        to be executed.

       receive code and, depending on who signed it, execute it in an
        arbitrarily secure, limited compartment.

        The combination of these functions enable direct Perl coding of
        algorithms to handle safe internet commerce, mobile information-
        gathering agents, "live content" web browser helper apps,
        distributed load-balanced computation, remote software update,
        distance machine administration, content-based information
        propagation, Internet-wide shared-data applications, network
        application builders, and so on.



     RealTimeBattle

       Web site: www.lysator.liu.se/realtimebattle/

        RealTimeBattle is a programming game, in which robots controlled
        by programs are fighting each other. The goal is to destroy the
        enemies, using the radar to examine the environment and the
        cannon to shoot.


       Game progresses in real time, with the robot programs running as
        child processes to RealTimeBattle.

       The robots communicate with the main program using the standard
        input and output.

       Robots can be constructed in almost any programming language.

       Maximum number of robots can compete simultaneously.

       A simple messaging language is used for communication, which
        makes it easy to start constructing robots.

       Robots behave like real physical object.

       You can create your own arenas.

       Highly configurable.



     Remembrance Agents

       Web site: rhodes.www.media.mit.edu/people/rhodes/RA/

        Remembrance Agents are a set of applications that watch over a
        user's shoulder and suggest information relevant to the current
        situation.  While query-based memory aids help with direct
        recall, remembrance agents are an augmented associative memory.
        For example, the word-processor version of the RA continuously
        updates a list of documents relevant to what's being typed or
        read in an emacs buffer.  These suggested documents can be any
        text files that might be relevant to what you are currently
        writing or reading.  They might be old emails related to the
        mail you are currently reading, or abstracts from papers and
        newspaper articles that discuss the topic of your writing.
     SimRobot

       Web site: www.informatik.uni-bremen.de/~simrobot/

       FTP site: ftp.uni-bremen.de/pub/ZKW/INFORM/simrobot/


        SimRobot is a program for simulation of sensor based robots in a
        3D environment. It is written in C++, runs under UNIX and X11
        and needs the graphics toolkit XView.

       Simulation of robot kinematics

       Hierarchically built scene definition via a simple definition
        language

       Various sensors built in: camera, facette eye, distance
        measurement, light sensor, etc.

       Objects defined as polyeders

       Emitter abstractly defined; can be interpreted e.g. as light or
        sound

       Camera images computed according to the raytracing or Z-buffer
        algorithms known from computer graphics

       Specific sensor/motor software interface for communicating with
        the simulation

       Texture mapping onto the object surfaces: bitmaps in various
        formats

       Comprehensive visualization of the scene: wire frame w/o hidden
        lines, sensor and actor values

       Interactive as well as batch driven control of the agents and
        operation in the environment

       Collision detection

       Extendability with user defined object types

       Possible socket communication to e.g. the Khoros image
        processing software



     Sulawesi

       Web site: wearables.essex.ac.uk/sulawesi/

        A framework called Sulawesi has been designed and implemented to
        tackle what has been considered to be important challenges in a
        wearable user interface. The ability to accept input from any
        number of modalities, and perform if necessary a translation to
        any number of modal outputs. It does this primarily through a
        set of proactive agents to act on the input.



     TclRobots


       FTP site: ftp.neosoft.com/pub/tcl/sorted/games/tclrobots-2.0/

       Redhat Patch: ftp.coe.uga.edu/users/jae/ai/tclrobots-
        redhat.patch

       RPMs (search at): http://rufus.w3.org/


        TclRobots is a programming game, similar to 'Core War'.  To play
        TclRobots, you must write a Tcl program that controls a robot.
        The robot's mission is to survive a battle with other robots.
        Two, three, or four robots compete during a battle, each running
        different programs (or possibly the same program in different
        robots.)  Each robot is equipped with a scanner, cannon, drive
        mechanism.  A single match continues until one robot is left
        running.  Robots may compete individually, or combine in a team
        oriented battle.  A tournament can be run with any number of
        robot programs, each robot playing every other in a round-robin
        fashion, one-on-one.  A battle simulator is available to help
        debug robot programs.


        The TclRobots program provides a physical environment, imposing
        certain game parameters to which all robots must adhere.
        TclRobots also provides a view on a battle, and a controlling
        user interface.  TclRobots requirements: a wish interpreter
        built from Tcl 7.4 and Tk 4.0.



     TKQML

       Web site: www.csee.umbc.edu/tkqml/

        TKQML is a KQML application/addition to Tcl/Tk, which allows Tcl
        based systems to communicate easily with a powerful agent
        communication language.



     The Tocoma Project

       Web site: www.tacoma.cs.uit.no/


        An agent is a process that may migrate through a computer
        network in order to satisfy requests made by clients. Agents are
        an attractive way to describe network-wide computations.


        The TACOMA project focuses on operating system support for
        agents and how agents can be used to solve problems
        traditionally addressed by operating systems. We have
        implemented a series of prototype systems to support agents.


        TACOMA Version 1.2 is based on UNIX and TCP. The system supports
        agents written in C, Tcl/Tk, Perl, Python, and Scheme (Elk). It
        is implemented in C. This TACOMA version has been in public
        domain since April 1996.


        We are currently focusing on heterogeneity, fault-tolerance,
        security and management issues. Also, several TACOMA
        applications are under construction. We implemented StormCast
        4.0, a wide-area network weather monitoring system accessible
        over the internet, using TACOMA and Java. We are now in the
        process of evaluating this application, and plan to build a new
        StormCast version to be completed by June 1997.



     UMPRS Agent

       Web site: members.home.net/marcush/IRS/

        UMPRS supports top-down, goal-based reasoning and selects goals
        and plans based on maximal priority. Execution of multiple
        simultaneous goals are supported, with suspension and resumption
        capabilities for each goal (i.e., intention) thread. UMPRS plans
        have an integrated precondition/runtime attribute that constrain
        their applicability.  Available plan constructs include:
        sequencing, iteration, subgoaling, atomic (i.e., non-
        interruptable) blocks, n-branch deterministic conditional
        execution, explicit failure-handling section, and C++ primitive
        function definition.



     Virtual Secretary Project (ViSe)
        (Tcl/Tk)

       Web site: www.cs.uit.no/DOS/Virt_Sec


        The motivation of the Virtual Secretary project is to construct
        user-model-based intelligent software agents, which could in
        most cases replace human for secretarial tasks, based on modern
        mobile computing and computer network. The project includes two
        different phases: the first phase (ViSe1) focuses on information
        filtering and process migration, its goal is to create a secure
        environment for software agents using the concept of user
        models; the second phase (ViSe2) concentrates on agents'
        intelligent and efficient cooperation in a distributed
        environment, its goal is to construct cooperative agents for
        achieving high intelligence. (Implemented in Tcl/TclX/Tix/Tk)



     VWORLD

       Web site: zhar.net/gnu-linux/projects/vworld/


        Vworld is a simulated environment for research with autonomous
        agents written in prolog. It is currently in something of an
        beta stage. It works well with SWI-prolog, but should work with
        Quitnus-prolog with only a few changes.  It is being designed to
        serve as an educational tool for class projects dealing with
        prolog and autonomous agents. It comes with three demo worlds or
        environments, along with sample agents for them. There are two
        versions now. One written for SWI-prolog and one written for
        LPA-prolog. Documentation is roughly done (with a
        student/professor framework in mind), and a graphical interface
        is planned.

     WebMate

       Web site: www.cs.cmu.edu/~softagents/webmate/


        WebMate is a personal agent for World-Wide Web browsing and
        searching. It accompanies you when you travel on the internet
        and provides you what you want.

        Features include:

       Searching enhancement, including parallel search, searching
        keywords refinement using our relevant keywords extraction
        technology, relevant feedback, etc.

       Browsing assistant, including learning your current interesting,
        recommending you new URLs according to your profile and selected
        resources, monitoring bookmarks of Netscape or IE, sending the
        current browsing page to your friends, etc.

       Offline browsing, including downloading the following pages from
        the current page for offline browsing.

       Filtering HTTP header, including recording http header and all
        the transactions between your browser and WWW servers, etc.

       Checking the HTML page to find the errors or dead links,  etc.

       Programming in Java, independent of operating system, runing in
        multi-thread.



     Zeus

       Web site: www.labs.bt.com/projects/agents/zeus/

        The construction of multi-agent systems involves long
        development times and requires solutions to some considerable
        technical difficulties. This has motivated the development of
        the ZEUS toolkit, which provides a library of software
        components and tools that facilitate the rapid design,
        development and deployment of agent system



  7.

  Programming languages


  While any programming language can be used for artificial
  intelligence/life research, these are programming languages which are
  used extensively for, if not specifically made for, artificial
  intelligence programming.



     Allegro CL


       Web site: www.franz.com

        Franz Inc's free linux version of their lisp development
        environment. You can download it or they will mail you a CD free
        (you don't even have to pay for shipping). It is generally
        considered to be one of the better lisp platforms.



     APRIL

       Web site: sourceforge.net/project/?group_id=3173

        APRIL is a symbolic programming language that is designed for
        writing mobile, distributed and agent-based systems especially
        in an Internet environment. It has advanced features such as a
        macro sub-language, asynchronous message sending and receiving,
        code mobility, pattern matching, higher-order functions and
        strong typing. The language is compiled to byte-code which is
        then interpreted by the APRIL runtime-engine.  APRIL now
        requires the InterAgent Communications Model (ICM) to be
        installed before it can be installed. [Ed. ICM can be found at
        the same web site]



     B-Prolog

       Web site: www.sci.brooklyn.cuny.edu/~zhou/bprolog.html

       Web site: www.cad.mse.kyutech.ac.jp/people/zhou/bprolog.html

        B-Prolog is a compact and complete CLP system that runs Prolog
        and CLP(FD) programs. An emulator-based system, B-Prolog has a
        performance comparable with SICStus-Prolog.


       In addition to Edinburgh-style programs, B-Prolog accepts
        canonical-form programs that can be compiled into more compact
        and faster code than standard Prolog programs.

       B-Prolog includes an interpreter and provides an interactive
        interface through which users can consult, list, compile, load,
        debug and run programs. The command editor facilitates reuse old
        commands.

       B-Prolog provides a bi-directional interface with C and Java.>
        resources in C and Java such as Graphics and sockets, and also
        makes it possible for a Prolog program to be embadded in a C and
        Java applications.

       B-Prolog supports most of the built-ins in ISO Prolog.

       B-Prolog supports the delaying (co-routining) mechanism, which
        can be used to implement concurrency, test-and-generate search
        algorithms, and most importantly constraint propagation
        algorithms.

       B-Prolog has an efficient constraint compiler for constraints>
        over finite-domains and Booleans.

       B-Prolog supports the tabling mechanism, which has proven
        effective for applications including parsing, problem solving,
        theorem proving, and deductive databases.


     DHARMI

       Web site: http://megazone.bigpanda.com/~wolf/DHARMI/

        DHARMI is a high level spatial, tinker-toy like language who's
        components are transparently administered by a background
        process called the Habitat. As the name suggests, the language
        was designed to make modelling prototypes and handle living
        data. Programs can be modified while running. This is
        accomplished by blurring the distinction between source code,
        program, and data.



     ECoLisp

       Web site (???): www.di.unipi.it/~attardi/software.html


        ECoLisp (Embeddable Common Lisp) is an implementation of Common
        Lisp designed for being embeddable into C based applications.
        ECL uses standard C calling conventions for Lisp compiled
        functions, which allows C programs to easily call Lisp functions
        and viceversa. No foreign function interface is required: data
        can be exchanged between C and Lisp with no need for conversion.
        ECL is based on a Common Runtime Support (CRS) which provides
        basic facilities for memory managment, dynamic loading and
        dumping of binary images, support for multiple threads of
        execution. The CRS is built into a library that can be linked
        with the code of the application. ECL is modular: main modules
        are the program development tools (top level, debugger, trace,
        stepper), the compiler, and CLOS. A native implementation of
        CLOS is available in ECL: one can configure ECL with or without
        CLOS. A runtime version of ECL can be built with just the
        modules which are required by the application. The ECL compiler
        compiles from Lisp to C, and then invokes the GCC compiler to
        produce binaries.



     ESTEREL

       Web site: www-sop.inria.fr/meije/esterel/

        Esterel is both a programming language, dedicated to programming
        reactive systems, and a compiler which translates Esterel
        programs into finite-state machines. It is particularly well-
        suited to programming reactive systems, including real-time
        systems and control automata.

        Only the binary is available for the language compiler. :P



     Gdel

       Web page: www.cs.bris.ac.uk/~bowers/goedel.html

        Gdel is a declarative, general-purpose programming language in
        the family of logic programming languages.  It is a strongly
        typed language, the type system being based on many-sorted logic
        with parametric polymorphism.  It has a module system.  Gdel
        supports infinite precision integers, infinite precision
        rationals, and also floating-point numbers.  It can solve
        constraints over finite domains of integers and also linear
        rational constraints. It supports processing of finite sets.  It
        also has a flexible computation rule and a pruning operator
        which generalizes the commit of the concurrent logic programming
        languages.  Considerable emphasis is placed on Gdel's meta-
        logical facilities which provide significant support for meta-
        programs that do analysis, transformation, compilation,
        verification, debugging, and so on.



     LIFE

       Web page: www.isg.sfu.ca/life

        LIFE (Logic, Inheritance, Functions, and Equations) is an
        experimental programming language proposing to integrate three
        orthogonal programming paradigms proven useful for symbolic
        computation.  From the programmer's standpoint, it may be
        perceived as a language taking after logic programming,
        functional programming, and object-oriented programming.  From a
        formal perspective, it may be seen as an instance (or rather, a
        composition of three instances) of a Constraint Logic
        Programming scheme due to Hoehfeld and Smolka refining that of
        Jaffar and Lassez.



     CLisp (Lisp)

       Web page: clisp.sourceforge.net

       FTP site: clisp.cons.org/pub/lisp/clisp/source

        CLISP is a Common Lisp implementation by Bruno Haible and
        Michael Stoll.  It mostly supports the Lisp described by Common
        LISP: The Language (2nd edition) and the ANSI Common Lisp
        standard.  CLISP includes an interpreter, a byte-compiler, a
        large subset of CLOS (Object-Oriented Lisp) , a foreign language
        interface and, for some machines, a screen editor.


        The user interface language (English, German, French) is chosen
        at run time.  Major packages that run in CLISP include CLX &
        Garnet.  CLISP needs only 2 MB of memory.



     CMU Common Lisp

       Web page: www.cons.org/cmucl/

       Old Web page: www.mv.com/users/pw/lisp/index.html

       FTP site: ftp2.cons.org/pub/languages/lisp/cmucl/release/

       Linux Installation: www.telent.net/lisp/howto.html


        CMU Common Lisp is a public domain "industrial strength" Common
        Lisp programming environment. Many of the X3j13 changes have
        been incorporated into CMU CL. Wherever possible, this has been
        done so as to transparently allow the use of either CLtL1 or
        proposed ANSI CL. Probably the new features most interesting to
        users are SETF functions, LOOP and the WITH-COMPILATION-UNIT
        macro.



     GCL (Lisp)

       FTP site: ftp.ma.utexas.edu/pub/gcl/


        GNU Common Lisp (GCL) has a compiler and interpreter for Common
        Lisp.  It used to be known as Kyoto Common Lisp.  It is very
        portable and extremely efficient on a wide class of
        applications.  It compares favorably in performance with
        commercial Lisps on several large theorem-prover and symbolic
        algebra systems. It supports the CLtL1 specification but is
        moving towards the proposed ANSI definition.  GCL compiles to C
        and then uses the native optimizing C compilers (e.g., GCC).  A
        function with a fixed number of args and one value turns into a
        C function of the same number of args, returning one value, so
        GCL is maximally efficient on such calls.  It has a conservative
        garbage collector which allows great freedom for the C compiler
        to put Lisp values in arbitrary registers.


        It has a source level Lisp debugger for interpreted code, with
        display of source code in an Emacs window.  Its profiling tools
        (based on the C profiling tools) count function calls and the
        time spent in each function.



     GNU Prolog

       Web site: pauillac.inria.fr/~diaz/gnu-prolog/

       Web site: www.gnu.org/software/prolog/prolog.html


        GNU Prolog is a free Prolog compiler with constraint solving
        over finite domains developed by Daniel Diaz.

        GNU Prolog accepts Prolog+constraint programs and produces
        native binaries (like gcc does from a C source). The obtained
        executable is then stand-alone. The size of this executable can
        be quite small since GNU Prolog can avoid to link the code of
        most unused built-in predicates. The performances of GNU Prolog
        are very encouraging (comparable to commercial systems).

        Beside the native-code compilation, GNU Prolog offers a
        classical interactive interpreter (top-level) with a debugger.

        The Prolog part conforms to the ISO standard for Prolog with
        many extensions very useful in practice (global variables, OS
        interface, sockets,...).

        GNU Prolog also includes an efficient constraint solver over
        Finite Domains (FD). This opens contraint logic pogramming to
        the user combining the power of constraint programming to the
        declarativity of logic programming.


     Mercury

       Web page: www.cs.mu.oz.au/research/mercury/


        Mercury is a new, purely declarative logic programming language.
        Like Prolog and other existing logic programming languages, it
        is a very high-level language that allows programmers to
        concentrate on the problem rather than the low-level details
        such as memory management.  Unlike Prolog, which is oriented
        towards exploratory programming, Mercury is designed for the
        construction of large, reliable, efficient software systems by
        teams of programmers. As a consequence, programming in Mercury
        has a different flavor than programming in Prolog.



     Mozart

       Web page: www.mozart-oz.org/


        The Mozart system provides state-of-the-art support in two
        areas: open distributed computing and constraint-based
        inference. Mozart implements Oz, a concurrent object-oriented
        language with dataflow synchronization.  Oz combines concurrent
        and distributed programming with logical constraint-based
        inference, making it a unique choice for developing multi-agent
        systems. Mozart is an ideal platform for both general-purpose
        distributed applications as well as for hard problems requiring
        sophisticated optimization and inferencing abilities. We have
        developed applications in scheduling and time-tabling, in
        placement and configuration, in natural language and knowledge
        representation, multi-agent systems and sophisticated
        collaborative tools.



     SWI Prolog

       Web page: www.swi.psy.uva.nl/projects/SWI-Prolog/

       FTP site: swi.psy.uva.nl/pub/SWI-Prolog/


        SWI is a free version of prolog in the Edinburgh Prolog family
        (thus making it very similar to Quintus and many other
        versions).  With: a large library of built in predicates, a
        module system, garbage collection, a two-way interface with the
        C language, plus many other features. It is meant as a
        educational language, so it's compiled code isn't the fastest.
        Although it similarity to Quintus allows for easy porting.


        XPCE is freely available in binary form for the Linux version of
        SWI-prolog.  XPCE is an object oriented X-windows GUI
        development package/environment.



     Kali Scheme


       Web site: www.neci.nj.nec.com/PLS/Kali.html


        Kali Scheme is a distributed implementation of Scheme that
        permits efficient transmission of higher-order objects such as
        closures and continuations. The integration of distributed
        communication facilities within a higher-order programming
        language engenders a number of new abstractions and paradigms
        for distributed computing. Among these are user-specified load-
        balancing and migration policies for threads, incrementally-
        linked distributed computations, agents, and parameterized
        client-server applications. Kali Scheme supports concurrency and
        communication using first-class procedures and continuations. It
        integrates procedures and continuations into a message-based
        distributed framework that allows any Scheme object (including
        code vectors) to be sent and received in a message.



     RScheme

       Web site:www.rscheme.org

       FTP site: ftp.rscheme.org/pub/rscheme/


        RScheme is an object-oriented, extended version of the Scheme
        dialect of Lisp. RScheme is freely redistributable, and offers
        reasonable performance despite being extraordinarily portable.
        RScheme can be compiled to C, and the C can then compiled with a
        normal C compiler to generate machine code. By default, however,
        RScheme compiles to bytecodes which are interpreted by a
        (runtime) virtual machine. This ensures that compilation is fast
        and keeps code size down. In general, we recommend using the
        (default) bytecode code generation system, and only compiling
        your time-critical code to machine code. This allows a nice
        adjustment of space/time tradeoffs.  (see web site for details)



     Scheme 48

       Web site: www.neci.nj.nec.com/homepages/kelsey/


        Scheme 48 is a Scheme implementation based on a virtual machine
        architecture. Scheme 48 is designed to be straightforward,
        flexible, reliable, and fast. It should be easily portable to
        32-bit byte-addressed machines that have POSIX and ANSI C
        support.  In addition to the usual Scheme built-in procedures
        and a development environment, library software includes support
        for hygienic macros (as described in the Revised^4 Scheme
        report), multitasking, records, exception handling, hash tables,
        arrays, weak pointers, and FORMAT.  Scheme 48 implements and
        exploits an experimental module system loosely derived from
        Standard ML and Scheme Xerox.  The development environment
        supports interactive changes to modules and interfaces.



     SCM (Scheme)

       Web site: www-swiss.ai.mit.edu/~jaffer/SCM.html

       FTP site: swiss-ftp.ai.mit.edu:/archive/scm/


        SCM conforms to the Revised^4 Report on the Algorithmic Language
        Scheme and the IEEE P1178 specification. Scm is written in C. It
        uses the following utilities (all available at the ftp site).

       SLIB (Standard Scheme Library) is a portable Scheme library
        which is intended to provide compatibility and utility functions
        for all standard Scheme implementations, including SCM, Chez,
        Elk, Gambit, MacScheme, MITScheme, scheme->C, Scheme48, T3.1,
        and VSCM, and is available as the file slib2c0.tar.gz. Written
        by Aubrey Jaffer.

       JACAL is a symbolic math system written in Scheme, and is
        available as the file jacal1a7.tar.gz.

       Interfaces to standard libraries including REGEX string regular
        expression matching and the CURSES screen management package.

       Available add-on packages including an interactive debugger,
        database, X-window graphics, BGI graphics, Motif, and Open-
        Windows packages.

       A compiler (HOBBIT, available separately) and dynamic linking of
        compiled modules.



     Shift

       Web site: www.path.berkeley.edu/shift/

        Shift is a programming language for describing dynamic networks
        of hybrid automata.  Such systems consist of components which
        can be created, interconnected and destroyed as the system
        evolves. Components exhibit hybrid behavior, consisting of
        continuous-time phases separated by discrete-event transitions.
        Components may evolve independently, or they may interact
        through their inputs, outputs and exported events. The
        interaction network itself may evolve.



     YAP Prolog

       Web site: www.ncc.up.pt/~vsc/Yap/

        YAP is a high-performance Prolog compiler developed at
        LIACC/Universidade do Porto. Its Prolog engine is based in the
        WAM (Warren Abstract Machine), with several optimizations for
        better performance. YAP follows the Edinburgh tradition, and is
        largely compatible with DEC-10 Prolog, Quintus Prolog, and
        especially with C-Prolog. Work on the more recent version of YAP
        strives at several goals:


       Portability: The whole system is now written in C. YAP compiles
        in popular 32 bit machines, such as Suns and Linux PCs, and in a
        64 bit machines, the Alphas running OSF Unix and Linux.
       Performance: We have optimised the emulator to obtain
        performance comparable to or better than well-known Prolog
        systems. In fact, the current version of YAP performs better
        than the original one, written in assembly language.

       Robustness: We have tested the system with a large array of
        Prolog applications.

       Extensibility: YAP was designed internally from the beginning to
        encapsulate manipulation of terms. These principles were used,
        for example, to implement a simple and powerful C-interface. The
        new version of YAP extends these principles to accomodate
        extensions to the unification algorithm, that we believe will be
        useful to implement extensions such as constraint programming.

       Completeness: YAP has for a long time provided most builtins
        expected from a Edinburgh Prolog implementation.  These include
        I/O functionality, data-base operations, and modules. Work on
        YAP aims now at being compatible with the Prolog standard.

       Openess: We would like to make new development of YAP open to
        the user community.

       Research: YAP has been a vehicle for research within and outside
        our group. Currently research is going on on parallelisation and
        tabulation, and we have started work to support constraint
        handling.



  Linux AX25-HOWTO, Amateur Radio.
  Terry Dawson, VK2KTJ, terry@perf.no.itg.telstra.com.au
  v1.5, 17 October 1997

  The Linux Operating System is perhaps the only operating system in the
  world that can boast native and standard support for the AX.25 packet
  radio protocol utilised by Amateur Radio Operators worldwide. This
  document aims to describe how to install and configure this support.
  ______________________________________________________________________

  Table of Contents



  1. Introduction.

     1.1 Changes from the previous version
     1.2 Where to obtain new versions of this document.
     1.3 Other related documentation.

  2. The Packet Radio Protocols and Linux.

     2.1 How it all fits together.

  3. The AX.25/NetRom/Rose software components.

     3.1 Finding the kernel, tools and utility packages.
        3.1.1 The kernel source:
        3.1.2 The network tools:
        3.1.3 The AX25 utilities:

  4. Installing the AX.25/NetRom/Rose software.

     4.1 Compiling the kernel.
        4.1.1 A word about Kernel modules
        4.1.2 What's new in 2.0.*+ModuleXX or 2.1.* Kernels ?
     4.2 The network configuration tools.
        4.2.1 A patch kit that adds Rose support and fixes some bugs.
        4.2.2 Building the standard net-tools release.
     4.3 The AX.25 user and utility programs.

  5. A note on callsigns, addresses and things before we start.

     5.1 What are all those T1, T2, N2 and things ?
     5.2 Run time configurable parameters

  6. Configuring an AX.25 port.

     6.1 Creating the AX.25 network device.
        6.1.1 Creating a KISS device.
           6.1.1.1 Configuring for Dual Port TNC's
        6.1.2 Creating a Baycom device.
        6.1.3 Configuring the AX.25 channel access parameters.
           6.1.3.1 Configuring the Kernel AX.25 to use the BayCom device
        6.1.4 Creating a SoundModem device.
           6.1.4.1 Configuring the sound card.
           6.1.4.2 Configuring the SoundModem driver.
           6.1.4.3 Configuring the AX.25 channel access parameters.
           6.1.4.4 Setting the audio levels and tuning the driver.
           6.1.4.5 Configuring the Kernel AX.25 to use the SoundModem
        6.1.5 Creating a PI card device.
        6.1.6 Creating a PacketTwin device.
        6.1.7 Creating a generic SCC device.
           6.1.7.1 Obtaining and building the configuration tool package.
           6.1.7.2 Configuring the driver for your card.
              6.1.7.2.1 Configuration of the hardware parameters.
           6.1.7.3 Channel Configuration
           6.1.7.4 Using the driver.
           6.1.7.5 The
        6.1.8 Creating a BPQ ethernet device.
        6.1.9 Configuring the BPQ Node to talk to the Linux AX.25 support.
     6.2 Creating the
     6.3 Configuring AX.25 routing.

  7. Configuring an AX.25 interface for TCP/IP.

  8. Configuring a NetRom port.

     8.1 Configuring
     8.2 Configuring
     8.3 Creating the NetRom Network device
     8.4 Starting the NetRom daemon
     8.5 Configuring NetRom routing.

  9. Configuring a NetRom interface for TCP/IP.

  10. Configuring a Rose port.

     10.1 Configuring
     10.2 Creating the Rose Network device.
     10.3 Configuring Rose Routing

  11. Making AX.25/NetRom/Rose calls.

  12. Configuring Linux to accept Packet connections.

     12.1 Creating the
     12.2 A simple example
     12.3 Starting

  13. Configuring the

     13.1 Creating the
     13.2 Creating the
     13.3 Configuring
     13.4 Configuring

  14. Configuring

     14.1 Creating the

  15. Configuring the

     15.1 Create the
     15.2 Create the
     15.3 Associate AX.25 callsigns with system users.
     15.4 Add the PMS to the
     15.5 Test the PMS.

  16. Configuring the

  17. Configuring the Rose Uplink and Downlink commands

     17.1 Configuring a Rose downlink
     17.2 Configuring a Rose uplink

  18. Associating AX.25 callsigns with Linux users.

  19. The

  20. AX.25, NetRom, Rose network programming.

     20.1 The address families.
     20.2 The header files.
     20.3 Callsign mangling and examples.

  21. Some sample configurations.

     21.1 Small Ethernet LAN with Linux as a router to Radio LAN
     21.2 IPIP encapsulated gateway configuration.
     21.3 AXIP encapsulated gateway configuration
        21.3.1 AXIP configuration options.
        21.3.2 A typical
        21.3.3 Running
        21.3.4 Some notes about the routes and route flags
     21.4 Linking NOS and Linux using a pipe device
  22. Where do I find more information about .... ?

     22.1 Packet Radio
     22.2 Protocol Documentation
     22.3 Hardware Documentation

  23. Discussion relating to Amateur Radio and Linux.

  24. Acknowledgements.

  25. Copyright.



  ______________________________________________________________________

  1.  Introduction.

  This document was originally an appendix to the HAM-HOWTO, but grew
  too large to be reasonably managed in that fashion. This document
  describes how to install and configure the native AX.25, NetRom and
  Rose support for Linux. A few typical configurations are described
  that could be used as models to work from.

  The Linux implementation of the amateur radio protocols is very
  flexible.  To people relatively unfamiliar with the Linux operating
  system the configuration process may look daunting and complicated. It
  will take you a little time to come to understand how the whole thing
  fits together. You will find configuration very difficult if you have
  not properly prepared yourself by learning about Linux in general. You
  cannot expect to switch from some other environment to Linux without
  learning about Linux itself.


  1.1.  Changes from the previous version


  Additions:
          Joerg Reuters Web Page
          "More Information" section
          ax25ipd configuration.

  Corrections/Updates:
          Changed pty's to a safer range to prevent possible conflicts
          Updated module and ax25-utils versions.

  ToDo:
          Fix up the SCC section, this is probably wrong.
          Expand on the programming section.



  1.2.  Where to obtain new versions of this document.

  The best place to obtain the latest version of this document is from a
  Linux Documentation Project archive. The Linux Documentation Project
  runs a Web Server and this document appears there as the AX25-HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/AX25-HOWTO.html>. This document is
  also available in various formats from the sunsite.unc.edu ftp archive
  <ftp://sunsite.unc.edu/pub/Linux/docs/howto/>.

  You can always contact me, but I pass new versions of the document
  directly to the LDP HOWTO coordinator, so if it isn't there then
  chances are I haven't finished it.
  1.3.  Other related documentation.

  There is a lot of related documentation. There are many documents that
  relate to Linux networking in more general ways and I strongly
  recommend you also read these as they will assist you in your efforts
  and provide you with stronger insight into other possible
  configurations.

  They are:

  The HAM-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/HAM-HOWTO.html>,

  the NET-3-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/NET-3-HOWTO.html>,

  the Ethernet-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/Ethernet-
  HOWTO.html>,

  and:

  the Firewall-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/Firewall-
  HOWTO.html>

  More general Linux information may be found by reference to other
  Linux HOWTO <http://sunsite.unc.edu/LDP/HOWTO/> documents.


  2.  The Packet Radio Protocols and Linux.

  The AX.25 protocol offers both connected and connectionless modes of
  operation, and is used either by itself for point-point links, or to
  carry other protocols such as TCP/IP and NetRom.

  It is similar to X.25 level 2 in structure, with some extensions to
  make it more useful in the amateur radio environment.

  The NetRom protocol is an attempt at a full network protocol and uses
  AX.25 at its lowest layer as a datalink protocol. It provides a
  network layer that is an adapted form of AX.25. The NetRom protocol
  features dynamic routing and node aliases.

  The Rose protocol was conceived and first implemented by Tom Moulton
  W2VY and is an implementation of the X.25 packet layer protocol and is
  designed to operate with AX.25 as its datalink layer protocol. It too
  provides a network layer. Rose addresses take the form of 10 digit
  numbers. The first four digits are called the Data Network
  Identification Code (DNIC) and are taken from Appendix B of the CCITT
  X.121 recommendation. More information on the Rose protocol may be
  ontained from the RATS Web server <http://www.rats.org/>.

  Alan Cox developed some early kernel based AX.25 software support for
  Linux.  Jonathon Naylor <g4klx@g4klx.demon.co.uk> has taken up ongoing
  development of the code, has added NetRom and Rose support and is now
  the developer of the AX.25 related kernel code. DAMA support was
  developed by Joerg, DL1BKE, jreuter@poboxes.com. Baycom and SoundModem
  support were added by Thomas Sailer, <sailer@ife.ee.ethz.ch>. The
  AX.25 utility software is now maintained by me.

  The Linux code supports KISS based TNC's (Terminal Node Controllers),
  the Ottawa PI card, the Gracilis PacketTwin card and other Z8530 SCC
  based cards with the generic SCC driver and both the Parallel and
  Serial port Baycom modems. Thomas's new soundmodem driver supports
  Soundblaster and soundcards based on the Crystal chipset.

  The User programs contain a simple PMS (Personal Message System), a
  beacon facility, a line mode connect program, `listen' an example of
  how to capture all AX.25 frames at raw interface level and programs to
  configure the NetRom protocol. Included also are an AX.25 server style
  program to handle and despatch incoming AX.25 connections and a NetRom
  daemon which does most of the hard work for NetRom support.


  2.1.  How it all fits together.

  The Linux AX.25 implementation is a brand new implementation. While in
  many ways it may looks similar to NOS, or BPQ or other AX.25
  implementations, it is none of these and is not identical to any of
  them. The Linux AX.25 implementation is capable of being configured to
  behave almost identically to other implementations, but the
  configuration process is very different.

  To assist you in understanding how you need to think when configuring
  this section describes some of the structural features of the AX.25
  implementation and how it fits into the context of the overall Linux
  structure.

  Simplified Protocol Layering Diagram


       -----------------------------------------------
       | AF_AX25 | AF_NETROM |  AF_INET    | AF_ROSE |
       |=========|===========|=============|=========|
       |         |           |             |         |
       |         |           |    TCP/IP   |         |
       |         |           ----------    |         |
       |         |   NetRom           |    | Rose    |
       |         -------------------------------------
       |            AX.25                            |
       -----------------------------------------------



  This diagram simply illustrates that NetRom, Rose and TCP/IP all run
  directly on top of AX.25, but that each of these protocols is treated
  as a seperate protocol at the programming interface. The `AF_' names
  are simply the names given to the `Address Family' of each of these
  protocols when writing programs to use them. The important thing to
  note here is the implicit dependence on the configuration of your
  AX.25 devices before you can configure your NetRom, Rose or TCP/IP
  devices.


  Software module diagram of Linux Network Implementation

  ----------------------------------------------------------------------------
   User    | Programs  |   call        node    ||  Daemons | ax25d  mheardd
           |           |   pms         mheard  ||          | inetd  netromd
  ----------------------------------------------------------------------------
           | Sockets   | open(), close(), listen(), read(), write(), connect()
           |           |------------------------------------------------------
           |           |    AF_AX25   |  AF_NETROM  |   AF_ROSE   |  AF_INET
           |------------------------------------------------------------------
  Kernel   | Protocols |    AX.25     |   NetRom    |     Rose    | IP/TCP/UDP
           |------------------------------------------------------------------
           | Devices   |    ax0,ax1   |  nr0,nr1    | rose0,rose1 | eth0,ppp0
           |------------------------------------------------------------------
           | Drivers   |  Kiss   PI2   PacketTwin   SCC   BPQ     | slip ppp
           |           |      Soundmodem      Baycom              | ethernet
  ----------------------------------------------------------------------------
  Hardware | PI2 Card, PacketTwin Card, SCC card, Serial port, Ethernet Card
  ----------------------------------------------------------------------------

  This diagram is a little more general than the first. This diagram
  attempts to show the relationship between user applications, the ker-
  nel and the hardware.  It also shows the relationship between the
  Socket application programming interface, the actual protocol modules,
  the kernel networking devices and the device drivers. Anything in this
  diagram is dependent on anything underneath it, and in general you
  must configure from the bottom of the diagram upwards.  So for exam-
  ple, if you want to run the call program you must also configure the
  Hardware, then ensure that the kernel has the appropriate device
  driver, that you create the appropriate network device, that the ker-
  nel includes the desired protocol that presents a programming inter-
  face that the call program can use. I have attempted to lay out this
  document in roughly that order.


  3.  The AX.25/NetRom/Rose software components.

  The AX.25 software is comprised of three components, the kernel
  source, the network configuration tools and the utility programs.

  The version 2.0.xx Linux kernels include the AX.25, NetRom, Z8530 SCC,
  PI card and PacketTwin drivers by default. These have been
  significantly enhanced in the 2.1.* kernels. Unfortunately, the rest
  of the 2.1.*  kernels makes them fairly unstable at the moment and not
  a good choice for a production system. To solve this problem Jonathon
  Naylor has prepared a patch kit which will bring the amateur radio
  protocol support in a 2.0.28 kernel up to the standard of the 2.1.*
  kernels. This is very simple to apply, and provides a range of
  facilities not present in the standard kernel such as Rose support.


  3.1.  Finding the kernel, tools and utility packages.



  3.1.1.  The kernel source:

  The kernel source can be found in its usual place at: ftp.kernel.org


       /pub/linux/kernel/v2.0/linux-2.0.31.tar.gz



  The current version of the AX25 upgrade patch is available at:
  ftp.pspt.fi


       /pub/linux/ham/ax25/ax25-module-14e.tar.gz



  3.1.2.  The network tools:

  The latest alpha release of the standard Linux network tools support
  AX.25 and NetRom and can be found at: ftp.inka.de


       /pub/comp/Linux/networking/net-tools/net-tools-1.33.tar.gz



  The latest ipfwadm package can be found at: ftp.xos.nl


       /pub/linux/ipfwadm/



  3.1.3.  The AX25 utilities:

  There are two different families of AX25-utilities. One is for the
  2.0.* kernels and the other will work with either the 2.1.*  kernels
  or the 2.0.*+moduleXX kernels. The ax25-utils version number indicates
  the oldest version of kernel that they will work with. Please choose a
  version of the ax25-utils appropriate to your kernel. The following
  are working combinations. You must use one of the following
  combinations, any other combination will not work, or will not work
  well.



       Linux Kernel             AX25 Utility set
       ----------------------   -------------------------
       linux-2.0.29             ax25-utils-2.0.12c.tar.gz **
       linux-2.0.28+module12    ax25-utils-2.1.22b.tar.gz **
       linux-2.0.30+module14c   ax25-utils-2.1.42a.tar.gz
       linux-2.0.31+module14d   ax25-utils-2.1.42a.tar.gz
       linux-2.1.22 ++          ax25-utils-2.1.22b.tar.gz
       linux-2.1.42 ++          ax25-utils-2.1.42a.tar.gz



  Note: the ax25-utils-2.0.* series (marked above with the '**' symbol)
  is now obsolete and is no longer supported. This document covers
  configuration using the versions of software recommended above the
  table. While there are differences between the releases, most of the
  information will be relevant to earlier releases of code.

  The AX.25 utility programs can be found at: ftp.pspt.fi
  <ftp://ftp.pspt.fi/pub/linux/ham/ax25/>

  or at: sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>


  4.  Installing the AX.25/NetRom/Rose software.

  To successfully install AX.25 support on your linux system you must
  configure and install an appropriate kernel and then install the AX.25
  utilities.


  4.1.  Compiling the kernel.

  If you are already familiar with the process of compiling the Linux
  Kernel then you can skip this section, just be sure to select the
  appropriate options when compiling the kernel. If you are not, then
  read on.

  The normal place for the kernel source to be unpacked to is the
  /usr/src directory into a subdirectory called linux.  To do this you
  should be logged in as root and execute a series of commands similar
  to the following:


       # mv linux linux.old
       # cd /usr/src
       # tar xvfz linux-2.0.31.tar.gz
       # tar xvfz /pub/net/ax25/ax25-module-14e.tar.gz
       # patch -p0 </usr/src/ax25-module-14/ax25-2.0.31-2.1.47-2.diff
       # cd linux



  After you have unpacked the kernel source and applied the upgrade, you
  need to run the configuration script and choose the options that suit
  your hardware configuration and the options that you wish built into
  your kernel.  You do this by using the command:



       # make menuconfig



  You might also try:



       # make config



  I'm going to describe the full screen method (menuconfig) because it
  is easier to move around, but you use whichever you are most
  comfortable with.

  In either case you will be offered a range of options at which you
  must answer `Y' or `N'. (Note you may also answer `M' if you are using
  modules.  For the sake of simplicity I will assume you are not, please
  make appropriate modifications if you are).

  The options most relevant to an AX.25 configuration are:



  Code maturity level options  --->
      ...
      [*] Prompt for development and/or incomplete code/drivers
      ...
  General setup  --->
      ...
      [*] Networking support
      ...
  Networking options  --->
      ...
      [*] TCP/IP networking
      [?] IP: forwarding/gatewaying
      ...
      [?] IP: tunneling
      ...
      [?] IP: Allow large windows (not recommended if <16Mb of memory)
      ...
      [*] Amateur Radio AX.25 Level 2
      [?] Amateur Radio NET/ROM
      [?] Amateur Radio X.25 PLP (Rose)
      ...
  Network device support  --->
      [*] Network device support
      ...
      [*] Radio network interfaces
      [?] BAYCOM ser12 and par96 driver for AX.25
      [?] Soundcard modem driver for AX.25
      [?] Soundmodem support for Soundblaster and compatible cards
      [?] Soundmodem support for WSS and Crystal cards
      [?] Soundmodem support for 1200 baud AFSK modulation
      [?] Soundmodem support for 4800 baud HAPN-1 modulation
      [?] Soundmodem support for 9600 baud FSK G3RUH modulation
      [?] Serial port KISS driver for AX.25
      [?] BPQ Ethernet driver for AX.25
      [?] Gracilis PackeTwin support for AX.25
      [?] Ottawa PI and PI/2 support for AX.25
      [?] Z8530 SCC KISS emulation driver for AX.25
      ...



  The options I have flagged with a `*' are those that you must must
  answer `Y' to. The rest are dependent on what hardware you have and
  what other options you want to include. Some of these options are
  described in more detail later on, so if you don't know what you want
  yet, then read ahead and come back to this step later.

  After you have completed the kernel configuration you should be able
  to cleanly compile your new kernel:



       # make dep
       # make clean
       # make zImage



  maake sure you move your arch/i386/boot/zImage file wherever you want
  it and then edit your /etc/lilo.conf file and rerun lilo to ensure
  that you actually boot from it.



  4.1.1.  A word about Kernel modules

  I recommend that you don't compile any of the drivers as modules. In
  nearly all installations you gain nothing but additional complexity.
  Many people have problems trying to get the modularised components
  working, not because the software is faulty but because modules are
  more complicated to install and configure.

  If you've chosen to compile any of the components as modules, then
  you'll also need to use:



       # make modules
       # make modules_install



  to install your modules in the appropriate location.

  You will also need to add some entries into your /etc/conf.modules
  file that will ensure that the kerneld program knows how to handle the
  kernel modules. You should add/modify the following:



       alias net-pf-3     ax25
       alias net-pf-6     netrom
       alias net-pf-11    rose
       alias tty-ldisc-1  slip
       alias tty-ldisc-3  ppp
       alias tty-ldisc-5  mkiss
       alias bc0          baycom
       alias nr0          netrom
       alias pi0a         pi2
       alias pt0a         pt
       alias scc0         optoscc    (or one of the other scc drivers)
       alias sm0          soundmodem
       alias tunl0        newtunnel
       alias char-major-4 serial
       alias char-major-5 serial
       alias char-major-6 lp



  4.1.2.  What's new in 2.0.*+ModuleXX or 2.1.* Kernels ?

  The 2.1.* kernels have enhanced versions of nearly all of the
  protocols and drivers. The most significant of the enhancements are:

     modularised
        the protocols and drivers have all been modularised so that you
        can insmod and rmmod them whenever you wish. This reduces the
        kernel memory requirements for infrequently used modules and
        makes development and bug hunting much simpler. That being said,
        it also makes configuration slightly more difficult.

     All drivers are now network drivers
        all of the network devices such as Baycom, SCC, PI, Packettwin
        etc now present a normal network interface, that is they now
        look like the ethernet driver does, they no longer look like
        KISS TNC's. A new utility called net2kiss allows you to build a
        kiss interface to these devices if you wish.
     bug fixed
        there have been many bug fixes and new features added to the
        drivers and protocols. The Rose protocol is one important
        addition.


  4.2.  The network configuration tools.

  Now that you have compiled the kernel you should compile the new
  network configuration tools. These tools allow you to modify the
  configuration of network devices and to add routes to the routing
  table.

  The new alpha release of the standard net-tools package includes
  support for AX.25 and NetRom support. I've tested this and it seems to
  work well for me.


  4.2.1.  A patch kit that adds Rose support and fixes some bugs.

  The standard net-tools-1.33.tar.gz package has some small bugs that
  affect the AX.25 and NetRom support. I've made a small patch kit that
  corrects these and adds Rose support to the tools as well.

  You can get the patch from: zone.pspt.fi
  <ftp://zone.pspt.fi/pub/linux/ham/ax25/net-
  tools-1.33.rose.tjd.diff.gz>.



  4.2.2.  Building the standard net-tools release.

  Don't forget to read the Release file and follow any instructions
  there. The steps I used to compile the tools were:



       # cd /usr/src
       # tar xvfz net-tools-1.33.tar.gz
       # zcat net-tools-1.33.rose.tjd.diff.gz | patch -p0
       # cd net-tools-1.33
       # make config



  At this stage you will be presented with a series of configuration
  questions, similar to the kernel configuration questions. Be sure to
  include support for all of the protocols and network devices types
  that you intend to use. If you do not know how to answer a particular
  question then answer `Y'.

  When the compilation is complete, you should use the:



       # make install



  command to install the programs in their proper place.


  If you wish to use the IP firewall facilities then you will need the
  latest firewall administration tool ipfwadm. This tool replaces the
  older ipfw tool which will not work with new kernels.

  I compiled the ipfwadm utility with the following commands:


       # cd /usr/src
       # tar xvfz ipfwadm-2.0beta2.tar.gz
       # cd ipfwadm-2.0beta2
       # make install
       # cp ipfwadm.8 /usr/man/man8
       # cp ipfw.4 /usr/man/man4



  4.3.  The AX.25 user and utility programs.

  After you have successfully compiled and booted your new kernel, you
  need to compile the user programs. To compile and install the user
  programs you should use a series of commands similar to the following:



       # cd /usr/src
       # tax xvfz ax25-utils-2.1.42a.tar.gz
       # cd ax25-utils-2.1.42a
       # make config
       # make
       # make install



  The files will be installed under the /usr directory by default in
  subdirectories: bin, sbin, etc and man.

  If this is a first time installation, that is you've never installed
  any ax25 utilities on your machine before you should also use the:


       # make installconf



  command to install some sample configuration files into the /etc/ax25/
  directory from which to work.


  If you get messages something like:

  gcc -Wall -Wstrict-prototypes -O2 -I../lib -c call.c
  call.c: In function `statline':
  call.c:268: warning: implicit declaration of function `attron'
  call.c:268: `A_REVERSE' undeclared (first use this function)
  call.c:268: (Each undeclared identifier is reported only once
  call.c:268: for each function it appears in.)



  then you should double check that you have the ncurses package
  properly installed on your system. The configuration script attempts
  to locate your ncurses packages in the common locations, but some
  installations have ncurses badly installed and it is unable to locate
  them.
  5.  A note on callsigns, addresses and things before we start.

  Each AX.25 and NetRom port on your system must have a callsign/ssid
  allocated to it. These are configured in the configuration files that
  will be described in detail later on.

  Some AX.25 implementations such as NOS and BPQ will allow you to
  configure the same callsign/ssid on each AX.25 and NetRom port. For
  somewhat complicated technical reasons Linux does not allow this. This
  isn't as big a problem in practise as it might seem.

  This means that there are things you should be aware of and take into
  consideration when doing your configurations.


  1. Each AX.25 and NetRom port must be configured with a unique
     callsign/ssid.

  2. TCP/IP will use the callsign/ssid of the AX.25 port it is being
     transmitted or received by, ie the one you configured for the AX.25
     interface in point 1.

  3. NetRom will use the callsign/ssid specified for it in its
     configuration file, but this callsign is only used when your NetRom
     is speaking to another NetRom, this is not the callsign/ssid that
     AX.25 users who wish to use your NetRom `node' will use. More on
     this later.

  4. Rose will, by default, use the callsign/ssid of the AX.25 port,
     unless the Rose callsign has been specifically set using the
     `rsparms' command.  If you set a callsign/ssid using the `rsparms'
     command then Rose will use this callsign/ssid on all ports.

  5. Other programs, such as the `ax25d' program can listen using any
     callsign/ssid that they wish and these may be duplicated across
     different ports.

  6. If you are careful with routing you can configure the same IP
     address on all ports if you wish.


  5.1.  What are all those T1, T2, N2 and things ?

  Not every AX.25 implementation is a TNC2. Linux uses nomenclature that
  differs in some respects from that you will be used to if your sole
  experience with packet is a TNC. The following table should help you
  interpret what each of the configurable items are, so that when you
  come across them later in this text you'll understand what they mean.



  -------------------------------------------------------------------
  Linux  | TAPR TNC | Description
  -------------------------------------------------------------------
  T1     | FRACK    | How long to wait before retransmitting an
         |          | unacknowledged frame.
  -------------------------------------------------------------------
  T2     | RESPTIME | The minimum amount of time to wait for another
         |          | frame to be received before transmitting
         |          | an acknowledgement.
  -------------------------------------------------------------------
  T3     | CHECK    | The period of time we wait between sending
         |          | a check that the link is still active.
  -------------------------------------------------------------------
  N2     | RETRY    | How many times to retransmit a frame before
         |          | assuming the connection has failed.
  -------------------------------------------------------------------
  Idle   |          | The period of time a connection can be idle
         |          | before we close it down.
  -------------------------------------------------------------------
  Window | MAXFRAME | The maximum number of unacknowledged
         |          | transmitted frames.
  -------------------------------------------------------------------



  5.2.  Run time configurable parameters

  The 2.1.* and 2.0.* +moduleXX kernels have a new feature that allows
  you to change many previously unchangable parameters at run time. If
  you take a careful look at the /proc/sys/net/ directory structure you
  will see many files with useful names that describe various parameters
  for the network configuration. The files in the /proc/sys/net/ax25/
  directory each represents one configured AX.25 port. The name of the
  file relates to the name of the port.

  The structure of the files in /proc/sys/net/ax25/<portname>/ is as
  follows:

  FileName              Meaning              Values                  Default
  ip_default_mode       IP Default Mode      0=DG 1=VC               0
  ax25_default_mode     AX.25 Default Mode   0=Normal 1=Extended     0
  backoff_type          Backoff              0=Linear 1=Exponential  1
  connect_mode          Connected Mode       0=No 1=Yes              1
  standard_window_size  Standard Window      1  <= N <= 7            2
  extended_window_size  Extended Window      1  <= N <= 63           32
  t1_timeout            T1 Timeout           1s <= N <= 30s          10s
  t2_timeout            T2 Timeout           1s <= N <= 20s          3s
  t3_timeout            T3 Timeout           0s <= N <= 3600s        300s
  idle_timeout          Idle Timeout         0m <= N                 20m
  maximum_retry_count   N2                   1  <= N <= 31           10
  maximum_packet_length AX.25 Frame Length   1  <= N <= 512          256


  In the table T1, T2 and T3 are given in seconds, and the Idle Timeout
  is given in minutes. But please note that the values used in the
  sysctl interface are given in internal units where the time in seconds
  is multiplied by 10, this allows resolution down to 1/10 of a second.
  With timers that are allowed to be zero, eg T3 and Idle, a zero value
  indicates that the timer is disabled.


  The structure of the files in /proc/sys/net/netrom/ is as follows:


  FileName                       Values                  Default
  default_path_quality                                   10
  link_fails_count                                       2
  network_ttl_initialiser                                16
  obsolescence_count_initialiser                         6
  routing_control                                        1
  transport_acknowledge_delay                            50
  transport_busy_delay                                   1800
  transport_maximum_tries                                3
  transport_requested_window_size                        4
  transport_timeout                                      1200



  The structure of the files in /proc/sys/net/rose/ is as follows:

  FileName                       Values                  Default
  acknowledge_hold_back_timeout                          50
  call_request_timeout                                   2000
  clear_request_timeout                                  1800
  link_fail_timeout                                      1200
  maximum_virtual_circuits                               50
  reset_request_timeout                                  1800
  restart_request_timeout                                1800
  routing_control                                        1
  window_size                                            3



  To set a parameter all you need to do is write the desired value to
  the file itself, for example to check and set the Rose window size
  you'd use something like:


       # cat /proc/sys/net/rose/window_size
       3
       # echo 4 >/proc/sys/net/rose/window_size
       # cat /proc/sys/net/rose/window_size
       4



  6.  Configuring an AX.25 port.

  Each of the AX.25 applications read a particular configuration file to
  obtain the parameters for the various AX.25 ports configured on your
  Linux machine.  For AX.25 ports the file that is read is the
  /etc/ax25/axport file.  You must have an entry in this file for each
  AX.25 port you want on your system.


  6.1.  Creating the AX.25 network device.

  The network device is what is listed when you use the `ifconfig'
  command. This is the object that the Linux kernel sends and receives
  network data from. Nearly always the network device has a physical
  port associated with it, but there are occasions where this isn't
  necessary. The network device does relate directly to a device driver.

  In the Linux AX.25 code there are a number of device drivers. The most
  common is probably the KISS driver, but others are the SCC driver(s),
  the Baycom driver and the SoundModem driver.
  Each of these device drivers will create a network device when it is
  started.


  6.1.1.  Creating a KISS device.

  Kernel Compile Options:


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Serial port KISS driver for AX.25



  Probably the most common configuration will be for a KISS TNC on a
  serial port.  You will need to have the TNC preconfigured and
  connected to your serial port.  You can use a communications program
  like minicom or seyon to configure the TNC into kiss mode.

  To create a KISS device you use the kissattach program. In it simplest
  form you can use the kissattach program as follows:



       # /usr/sbin/kissattach /dev/ttyS0 radio
       # kissparms -p radio -t 100 -s 100 -r 25



  The kissattach command will create a KISS network device. These
  devices are called `ax[0-9]'. The first time you use the kissattach
  command it creates `ax0', the second time it creates `ax1' etc. Each
  KISS device has an associated serial port.

  The kissparms command allows you to set various KISS parameters on a
  KISS device.

  Specifically the example presented would create a KISS network device
  using the serial device `/dev/ttyS0' and the entry from the
  /etc/ax25/axports with a port name of `radio'. It then configures it
  with a txdelay and slottime of 100 milliseconds and a ppersist value
  of 25.

  Please refer to the man pages for more information.


  6.1.1.1.  Configuring for Dual Port TNC's

  The mkiss utility included in the ax25-utils distribution allows you
  to make use of both modems on a dual port TNC. Configuration is fairly
  simple. It works by taking a single serial device connected to a
  single multiport TNC and making it look like a number of devices each
  connected to a single port TNC. You do this before you do any of the
  AX.25 configuration. The devices that you then do the AX.25
  configuration on are pseudo-TTY interfaces, (/dev/ttyq*), and not the
  actual serial device. Pseudo-TTY devices create a kind of pipe through
  which programs designed to talk to tty devices can talk to other
  programs designed to talk to tty devices. Each pipe has a master and a
  slave end. The master end is generally called `/dev/ptyq*' and the
  slave ends are called `/dev/ttyq*'. There is a one to one relationship
  between masters and slaves, so /dev/ptyq0 is the master end of a pipe
  with /dev/ttyq0 as its slave. You must open the master end of a pipe
  before opening the slave end. mkiss exploits this mechanism to split a
  single serial device into seperate devices.


  Example: if you have a dual port tnc and it is connected to your
  /dev/ttyS0 serial device at 9600 bps, the command:



       # /usr/sbin/mkiss -s 9600 /dev/ttyS0 /dev/ptyq0 /dev/ptyq1
       # /usr/sbin/kissattach /dev/ttyq0 port1
       # /usr/sbin/kissattach /dev/ttyq1 port2



  would create two pseudo-tty devices that each look like a normal
  single port TNC. You would then treat /dev/ttyq0 and /dev/ttyq1 just
  as you would a conventional serial device with TNC connected. This
  means you'd then use the kissattach command as described above, on
  each of those, in the example for AX.25 ports called port1 and port2.
  You shouldn't use kissattach on the actual serial device as the mkiss
  program uses it.

  The mkiss command has a number of optional arguments that you may wish
  to use. They are summarised as follows:

     -c enables the addition of a one byte checksum to each KISS frame.
        This is not supported by most KISS implementation, it is
        supported by the G8BPG KISS rom.

     -s <speed>
        sets the speed of the serial port.

     -h enables hardware handshaking on the serial port, it is off by
        default. Most KISS implementation do not support this, but some
        do.

     -l enables logging of information to the syslog logfile.


  6.1.2.  Creating a Baycom device.

  Kernel Compile Options:


       Code maturity level options  --->
           [*] Prompt for development and/or incomplete code/drivers
       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] BAYCOM ser12 and par96 driver for AX.25



  Thomas Sailer, <sailer@ife.ee.ethz.ch>, despite the popularly held
  belief that it would not work very well, has developed Linux support
  for Baycom modems. His driver supports the Ser12 serial port, Par96
  and the enhanced PicPar parallel port modems.  Further information
  about the modems themselves may be obtained from the Baycom Web site
  <http://www.baycom.de/>.

  Your first step should be to determine the i/o and addresses of the
  serial or parallel port(s) you have Baycom modem(s) connected to.
  When you have these you must configure the Baycom driver with them.

  The BayCom driver creates network devices called: bc0, bc1, bc2 etc.
  when it is configured.

  The sethdlc utility allows you to configure the driver with these
  parameters, or, if you have only one Baycom modem installed you may
  specify the parameters on the insmod commmand line when you load the
  Baycom module.

  For example, a simple configuration.  Disable the serial driver for
  COM1: then configure the Baycom driver for a Ser12 serial port modem
  on COM1: with the software DCD option enabled:


       # setserial /dev/ttyS0 uart none
       # insmod hdlcdrv
       # insmod baycom mode="ser12*" iobase=0x3f8 irq=4



  Par96 parallel port type modem on LPT1: using hardware DCD detection:


       # insmod hdlcdrv
       # insmod baycom mode="par96" iobase=0x378 irq=7 options=0



  This is not really the preferred way to do it. The sethdlc utility
  works just as easily with one device as with many.

  The sethdlc man page has the full details, but a couple of examples
  will illustrate the most important aspects of this configuration. The
  following examples assume you have already loaded the Baycom module
  using:


       # insmod hdlcdrv
       # insmod baycom



  or that you compiled the kernel with the driver inbuilt.

  Configure the bc0 device driver as a Parallel port Baycom modem on
  LPT1: with software DCD:


       # sethdlc -p -i bc0 mode par96 io 0x378 irq 7



  Configure the bc1 device driver as a Serial port Baycom modem on COM1:



  # sethdlc -p -i bc1 mode "ser12*" io 0x3f8 irq 4



  6.1.3.  Configuring the AX.25 channel access parameters.

  The AX.25 channel access parameters are the equivalent of the KISS
  ppersist, txdelay and slottime type parameters. Again you use the
  sethdlc utility for this.

  Again the sethdlc man page is the source of the most complete
  information but another example of two won't hurt:

  Configure the bc0 device with TxDelay of 200 mS, SlotTime of 100 mS,
  PPersist of 40 and half duplex:


       # sethdlc -i bc0 -a txd 200 slot 100 ppersist 40 half



  Note that the timing values are in milliseconds.


  6.1.3.1.  Configuring the Kernel AX.25 to use the BayCom device

  The BayCom driver creates standard network devices that the AX.25
  Kernel code can use. Configuration is much the same as that for a PI
  or PacketTwin card.

  The first step is to configure the device with an AX.25 callsign. The
  ifconfig utility may be used to perform this.


       # /sbin/ifconfig bc0 hw ax25 VK2KTJ-15 up



  will assign the BayCom device bc0 the AX.25 callsign VK2KTJ-15.
  Alternatively you can use the axparms command, you'll still need to
  use the ifconfig command to bring the device up though:


       # ifconfig bc0 up
       # axparms -setcall bc0 vk2ktj-15



  The next step is to create an entry in the /etc/ax25/axports file as
  you would for any other device. The entry in the axports file is
  associated with the network device you've configured by the callsign
  you configure. The entry in the axports file that has the callsign
  that you configured the BayCom device with is the one that will be
  used to refer to it.

  You may then treat the new AX.25 device as you would any other. You
  can configure it for TCP/IP, add it to ax25d and run NetRom or Rose
  over it as you please.



  6.1.4.  Creating a SoundModem device.

  Kernel Compile Options:


       Code maturity level options  --->
           [*] Prompt for development and/or incomplete code/drivers
       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Soundcard modem driver for AX.25
           [?] Soundmodem support for Soundblaster and compatible cards
           [?] Soundmodem support for WSS and Crystal cards
           [?] Soundmodem support for 1200 baud AFSK modulation
           [?] Soundmodem support for 4800 baud HAPN-1 modulation
           [?] Soundmodem support for 9600 baud FSK G3RUH modulation



  Thomas Sailer has built a new driver for the kernel that allows you to
  use your soundcard as a modem. Connect your radio directly to your
  soundcard to play packet! Thomas recommends at least a 486DX2/66 if
  you want to use this software as all of the digital signal processing
  is done by the main CPU.

  The driver currently emulates 1200 bps AFSK, 4800 HAPN and 9600 FSK
  (G3RUH compatible) modem types. The only sound cards currently
  supported are SoundBlaster and WindowsSoundSystem Compatible models.
  The sound cards require some circuitry to help them drive the Push-To-
  Talk circuitry, and information on this is available from Thomas's
  SoundModem PTT circuit web page
  <http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html>. There are
  quite a few possible options, they are: detect the sound output from
  the soundcard, or use output from a parallel port, serial port or midi
  port. Circuit examples for each of these are on Thomas's site.

  The SoundModem driver creates network devices called: sm0, sm1, sm2
  etc when it is configured.

  Note: the SoundModem driver competes for the same resources as the
  Linux sound driver. So if you wish to use the SoundModem driver you
  must ensure that the Linux sound driver is not installed. You can of
  course compile them both as modules and insert and remove them as you
  wish.


  6.1.4.1.  Configuring the sound card.

  The SoundModem driver does not initialise the sound card. The
  ax25-utils package includes a utility to do this called `setcrystal'
  that may be used for SoundCards based on the Crystal chipset. If you
  have some other card then you will have to use some other software to
  initialise it.  Its syntax is fairly straightforward:


       setcrystal [-w wssio] [-s sbio] [-f synthio] [-i irq] [-d dma] [-c dma2]



  So, for example, if you wished to configure a soundblaster card at i/o
  base address 0x388, irq 10 and DMA 1 you would use:
       # setcrystal -s 0x388 -i 10 -d 1



  To configure a WindowSoundSystem card at i/o base address 0x534, irq
  5, DMA 3 you would use:


       # setcrystal -w 0x534 -i 5 -d 3



  The [-f synthio] parameter is the set the synthesiser address, and the
  [-c dma2] parameter is to set the second DMA channel to allow full
  duplex operation.


  6.1.4.2.  Configuring the SoundModem driver.

  When you have configured the soundcard you need to configure the
  driver telling it where the sound card is located and what sort of
  modem you wish it to emulate.

  The sethdlc utility allows you to configure the driver with these
  parameters, or, if you have only one soundcard installed you may
  specify the parameters on the insmod commmand line when you load the
  SoundModem module.

  For example, a simple configuration, with one SoundBlaster soundcard
  configured as described above emulating a 1200 bps modem:


       # insmod hdlcdrv
       # insmod soundmodem mode="sbc:afsk1200" iobase=0x220 irq=5 dma=1



  This is not really the preferred way to do it. The sethdlc utility
  works just as easily with one device as with many.

  The sethdlc man page has the full details, but a couple of examples
  will illustrate the most important aspects of this configuration. The
  following examples assume you have already loaded the SoundModem
  modules using:


       # insmod hdlcdrv
       # insmod soundmodem



  or that you compiled the kernel with the driver inbuilt.

  Configure the driver to support the WindowsSoundSystem card we
  configured above to emulate a G3RUH 9600 compatible modem as device
  sm0 using a parallel port at 0x378 to key the Push-To-Talk:


       # sethdlc -p -i sm0 mode wss:fsk9600 io 0x534 irq 5 dma 3 pario 0x378



  Configure the driver to support the SoundBlaster card we configured
  above to emulate a 4800 bps HAPN modem as device sm1 using the serial
  port located at 0x2f8 to key the Push-To-Talk:


       # sethdlc -p -i sm1 mode sbc:hapn4800 io 0x388 irq 10 dma 1 serio 0x2f8



  Configure the driver to support the SoundBlaster card we configured
  above to emulate a 1200 bps AFSK modem as device sm1 using the serial
  port located at 0x2f8 to key the Push-To-Talk:


       # sethdlc -p -i sm1 mode sbc:afsk1200 io 0x388 irq 10 dma 1 serio 0x2f8



  6.1.4.3.  Configuring the AX.25 channel access parameters.

  The AX.25 channel access parameters are the equivalent of the KISS
  ppersist, txdelay and slottime type parameters. You use the sethdlc
  utility for this as well.

  Again the sethdlc man page is the source of the most complete
  information but another example of two won't hurt:

  Configure the sm0 device with TxDelay of 100 mS, SlotTime of 50mS,
  PPersist of 128 and full duplex:


       # sethdlc -i sm0 -a txd 100 slot 50 ppersist 128 full



  Note that the timing values are in milliseconds.


  6.1.4.4.  Setting the audio levels and tuning the driver.

  It is very important that the audio levels be set correctly for any
  radio based modem to work. This is equally true of the SoundModem.
  Thomas has developed some utility programs that make this task easier.
  They are called smdiag and smmixer.


     smdiag
        provides two types of display, either an oscilloscope type
        display or an eye pattern type display.

     smmixer
        allows you to actually adjust the transmit and receive audio
        levels.

  To start the smdiag utility in 'eye' mode for the SoundModem device
  sm0 you would use:


       # smdiag -i sm0 -e



  To start the smmixer utility for the SoundModem device sm0 you would
  use:


       # smmixer -i sm0



  6.1.4.5.  Configuring the Kernel AX.25 to use the SoundModem

  The SoundModem driver creates standard network devices that the AX.25
  Kernel code can use. Configuration is much the same as that for a PI
  or PacketTwin card.

  The first step is to configure the device with an AX.25 callsign.  The
  ifconfig utility may be used to perform this.


       # /sbin/ifconfig sm0 hw ax25 VK2KTJ-15 up



  will assign the SoundModem device sm0 the AX.25 callsign VK2KTJ-15.
  Alternatively you can use the axparms command, but you still need the
  ifconfig utility to bring the device up:


       # ifconfig sm0 up
       # axparms -setcall sm0 vk2ktj-15



  The next step is to create an entry in the /etc/ax25/axports file as
  you would for any other device. The entry in the axports file is
  associated with the network device you've configured by the callsign
  you configure. The entry in the axports file that has the callsign
  that you configured the SoundModem device with is the one that will be
  used to refer to it.

  You may then treat the new AX.25 device as you would any other. You
  can configure it for TCP/IP, add it to ax25d and run NetRom or Rose
  over it as you please.


  6.1.5.  Creating a PI card device.

  Kernel Compile Options:


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Ottawa PI and PI/2 support for AX.25



  The PI card device driver creates devices named `pi[0-9][ab]'. The
  first PI card detected will be allocated `pi0', the second `pi1' etc.
  The `a' and `b' refer to the first and second physical interface on
  the PI card. If you have built your kernel to include the PI card
  driver, and the card has been properly detected then you can use the
  following command to configure the network device:



       # /sbin/ifconfig pi0a hw ax25 VK2KTJ-15 up



  This command would configure the first port on the first PI card
  detected with the callsign VK2KTJ-15 and make it active. To use the
  device all you now need to do is to configure an entry into your
  /etc/ax25/axports file with a matching callsign/ssid and you will be
  ready to continue on.


  The PI card driver was written by David Perry, <dp@hydra.carleton.edu>


  6.1.6.  Creating a PacketTwin device.

  Kernel Compile Options:


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Gracilis PackeTwin support for AX.25



  The PacketTwin card device driver creates devices named `pt[0-9][ab]'.
  The first PacketTwin card detected will be allocated `pt0', the second
  `pt1' etc. The `a' and `b' refer to the first and second physical
  interface on the PacketTwin card. If you have built your kernel to
  include the PacketTwin card driver, and the card has been properly
  detected then you can use the following command to configure the
  network device:



       # /sbin/ifconfig pt0a hw ax25 VK2KTJ-15 up



  This command would configure the first port on the first PacketTwin
  card detected with the callsign VK2KTJ-15 and make it active. To use
  the device all you now need to do is to configure an entry into your
  /etc/ax25/axports file with a matching callsign/ssid and you will be
  ready to continue on.

  The PacketTwin card driver was written by Craig Small VK2XLZ,
  <csmall@triode.apana.org.au>.



  6.1.7.  Creating a generic SCC device.

  Kernel Compile Options:


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Z8530 SCC KISS emulation driver for AX.25



  Joerg Reuter, DL1BKE, jreuter@poboxes.com has developed generic
  support for Z8530 SCC based cards. His driver is configurable to
  support a range of different types of cards and present an interface
  that looks like a KISS TNC so you can treat it as though it were a
  KISS TNC.


  6.1.7.1.  Obtaining and building the configuration tool package.

  While the kernel driver is included in the standard kernel
  distribution, Joerg distributes more recent versions of his driver
  with the suite of configuration tools that you will need to obtain as
  well.

  You can obtain the configuration tools package from:

  Joerg's web page <http://www.rat.de/jr/>

  or:

  db0bm.automation.fh-aachen.de


       /incoming/dl1bke/



  or:

  insl1.etec.uni-karlsruhe.de


       /pub/hamradio/linux/z8530/



  or:

  ftp.ucsd.edu


       /hamradio/packet/tcpip/linux
       /hamradio/packet/tcpip/incoming/



  You will find multiple versions, choose the one that best suits the
  kernel you intend to use:


  z8530drv-2.4a.dl1bke.tar.gz   2.0.*
  z8530drv-utils-3.0.tar.gz    2.1.6 or greater



  The following commands were what I used to compile and install the
  package for kernel version 2.0.30:


       # cd /usr/src
       # gzip -dc z8530drv-2.4a.dl1bke.tar.gz | tar xvpofz -
       # cd z8530drv
       # make clean
       # make dep
       # make module         # If you want to build the driver as a module
       # make for_kernel     # If you want the driver to built into your kernel
       # make install



  After the above is complete you should have three new programs
  installed in your /sbin directory: gencfg, sccinit and sccstat. It is
  these programs that you will use to configure the driver for your
  card.

  You will also have a group of new special device files created in your
  /dev called scc0-scc7. These will be used later and will be the `KISS'
  devices you will end up using.

  If you chose to 'make for_kernel' then you will need to recompile your
  kernel. To ensure that you include support for the z8530 driver you
  must be sure to answer `Y' to: `Z8530 SCC kiss emulation driver for
  AX.25' when asked during a kernel `make config'.

  If you chose to 'make module' then the new scc.o will have been
  installed in the appropriate /lib/modules directory and you do not
  need to recompile your kernel. Remember to use the insmod command to
  load the module before your try and configure it.


  6.1.7.2.  Configuring the driver for your card.

  The z8530 SCC driver has been designed to be as flexible as possible
  so as to support as many different types of cards as possible. With
  this flexibility has come some cost in configuration.

  There is more comprehensive documentation in the package and you
  should read this if you have any problems. You should particularly
  look at doc/scc_eng.doc or doc/scc_ger.doc for more detailed
  information. I've paraphrased the important details, but as a result
  there is a lot of lower level detail that I have not included.

  The main configuration file is read by the sccinit program and is
  called /etc/z8530drv.conf. This file is broken into two main stages:
  Configuration of the hardware parameters and channel configuration.
  After you have configured this file you need only add:



  # sccinit



  into the rc file that configures your network and the driver will be
  initialised according to the contents of the configuration file. You
  must do this before you attempt to use the driver.



  6.1.7.2.1.  Configuration of the hardware parameters.

  The first section is broken into stanzas, each stanza representing an
  8530 chip. Each stanza is a list of keywords with arguments. You may
  specify up to four SCC chips in this file by default. The #define
  MAXSCC 4 in scc.c can be increased if you require support for more.

  The allowable keywords and arguments are:


     chip
        the chip keyword is used to separate stanzas. It will take
        anything as an argument. The arguments are not used.

     data_a
        this keyword is used to specify the address of the data port for
        the z8530 channel `A'. The argument is a hexadecimal number e.g.
        0x300

     ctrl_a
        this keyword is used to specify the address of the control port
        for the z8530 channel `A'. The arguments is a hexadecimal number
        e.g. 0x304

     data_b
        this keyword is used to specify the address of the data port for
        the z8530 channel `B'. The argument is a hexadecimal number e.g.
        0x301

     ctrl_b
        this keyword is used to specify the address of the control port
        for the z8530 channel `B'. The arguments is a hexadecimal number
        e.g. 0x305

     irq
        this keyword is used to specify the IRQ used by the 8530 SCC
        described in this stanza. The argument is an integer e.g. 5

     pclock
        this keyword is used to specify the frequency of the clock at
        the PCLK pin of the 8530. The argument is an integer frequency
        in Hz which defaults to 4915200 if the keyword is not supplied.

     board
        the type of board supporting this 8530 SCC. The argument is a
        character string. The allowed values are:

        PA0HZP
           the PA0HZP SCC Card

        EAGLE
           the Eagle card

        PC100
           the DRSI PC100 SCC card
        PRIMUS
           the PRIMUS-PC (DG9BL) card

        BAYCOM
           BayCom (U)SCC card

     escc
        this keyword is optional and is used to enable support for the
        Extended SCC chips (ESCC) such as the 8580, 85180, or the 85280.
        The argument is a character string with allowed values of `yes'
        or `no'. The default is `no'.

     vector
        this keyword is optional and specifies the address of the vector
        latch (also known as "intack port") for PA0HZP cards. There can
        be only one vector latch for all chips. The default is 0.

     special
        this keyword is optional and specifies the address of the
        special function register on several cards. The default is 0.

     option
        this keyword is optional and defaults to 0.

  Some example configurations for the more popular cards are as follows:


     BayCom USCC


          chip    1
          data_a  0x300
          ctrl_a  0x304
          data_b  0x301
          ctrl_b  0x305
          irq     5
          board   BAYCOM
          #
          # SCC chip 2
          #
          chip    2
          data_a  0x302
          ctrl_a  0x306
          data_b  0x303
          ctrl_b  0x307
          board   BAYCOM



     PA0HZP SCC card



     chip 1
     data_a 0x153
     data_b 0x151
     ctrl_a 0x152
     ctrl_b 0x150
     irq 9
     pclock 4915200
     board PA0HZP
     vector 0x168
     escc no
     #
     #
     #
     chip 2
     data_a 0x157
     data_b 0x155
     ctrl_a 0x156
     ctrl_b 0x154
     irq 9
     pclock 4915200
     board PA0HZP
     vector 0x168
     escc no



     DRSI SCC card


          chip 1
          data_a 0x303
          data_b 0x301
          ctrl_a 0x302
          ctrl_b 0x300
          irq 7
          pclock 4915200
          board DRSI
          escc no



  If you already have a working configuration for your card under NOS,
  then you can use the gencfg command to convert the PE1CHL NOS driver
  commands into a form suitable for use in the z8530 driver
  configuration file.

  To use gencfg you simply invoke it with the same parameters as you
  used for the PE1CHL driver in NET/NOS. For example:


       # gencfg 2 0x150 4 2 0 1 0x168 9 4915200



  will generate a skeleton configuration for the OptoSCC card.


  6.1.7.3.  Channel Configuration

  The Channel Configuration section is where you specify all of the
  other parameters associated with the port you are configuring. Again
  this section is broken into stanzas. One stanza represents one logical
  port, and therefore there would be two of these for each one of the
  hardware parameters stanzas as each 8530 SCC supports two ports.

  These keywords and arguments are also written to the
  /etc/z8530drv.conf file and must appear after the hardware parameters
  section.

  Sequence is very important in this section, but if you stick with the
  suggested sequence it should work ok. The keywords and arguments are:

     device
        this keyword must be the first line of a port definition and
        specifies the name of the special device file that the rest of
        the configuration applies to. e.g. /dev/scc0

     speed
        this keyword specifies the speed in bits per second of the
        interface. The argument is an integer: e.g. 1200

     clock
        this keyword specifies where the clock for the data will be
        sourced. Allowable values are:

        dpll
           normal halfduplex operation

        external
           MODEM supplies its own Rx/Tx clock

        divider
           use fullduplex divider if installed.

     mode
        this keyword specifies the data coding to be used. Allowable
        arguments are: nrzi or nrz

     rxbuffers
        this keyword specifies the number of receive buffers to allocate
        memory for. The argument is an integer, e.g. 8.

     txbuffers
        this keyword specifies the number of transmit buffers to
        allocate memory for. The argument is an integer, e.g. 8.

     bufsize
        this keyword specifies the size of the receive and transmit
        buffers. The arguments is in bytes and represents the total
        length of the frame, so it must also take into account the AX.25
        headers and not just the length of the data field. This keyword
        is optional and default to 384

     txdelay
        the KISS transmit delay value, the argument is an integer in mS.

     persist
        the KISS persist value, the argument is an integer.

     slot
        the KISS slot time value, the argument is an integer in mS.

     tail
        the KISS transmit tail value, the argument is an integer in mS.

     fulldup
        the KISS full duplex flag, the argument is an integer.  1==Full
        Duplex, 0==Half Duplex.

     wait
        the KISS wait value, the argument is an integer in mS.

     min
        the KISS min value, the argument is an integer in S.

     maxkey
        the KISS maximum keyup time, the argument is an integer in S.

     idle
        the KISS idle timer value, the argument is an integer in S.

     maxdef
        the KISS maxdef value, the argument is an integer.

     group
        the KISS group value, the argument is an integer.

     txoff
        the KISS txoff value, the argument is an integer in mS.

     softdcd
        the KISS softdcd value, the argument is an integer.

     slip
        the KISS slip flag, the argument is an integer.


  6.1.7.4.  Using the driver.

  To use the driver you simply treat the /dev/scc* devices just as you
  would a serial tty device with a KISS TNC connected to it. For
  example, to configure Linux Kernel networking to use your SCC card you
  could use something like:


       # kissattach -s 4800 /dev/scc0 VK2KTJ



  You can also use NOS to attach to it in precisely the same way. From
  JNOS for example you would use something like:



       attach asy scc0 0 ax25 scc0 256 256 4800



  6.1.7.5.  The sccstat  and sccparam  tools.

  To assist in the diagnosis of problems you can use the sccstat program
  to display the current configuration of an SCC device. To use it try:



       # sccstat /dev/scc0



  you will displayed a very large amount of information relating to the
  configuration and health of the /dev/scc0 SCC port.
  The sccparam command allows you to change or modify a configuration
  after you have booted. Its syntax is very similar to the NOS param
  command, so to set the txtail setting of a device to 100mS you would
  use:



       # sccparam /dev/scc0 txtail 0x8



  6.1.8.  Creating a BPQ ethernet device.

  Kernel Compile Options:



       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] BPQ Ethernet driver for AX.25



  Linux supports BPQ Ethernet compatibility. This enables you to run the
  AX.25 protocol over your Ethernet LAN and to interwork your linux
  machine with other BPQ machines on the LAN.

  The BPQ network devices are named `bpq[0-9]'. The `bpq0' device is
  associated with the `eth0' device, the `bpq1' device with the `eth1'
  device etc.

  Configuration is quite straightforward. You firstly must have
  configured a standard Ethernet device. This means you will have
  compiled your kernel to support your Ethernet card and tested that
  this works. Refer to the Ethernet-HOWTO <Ethernet-HOWTO.html> for more
  information on how to do this.

  To configure the BPQ support you need to configure the Ethernet device
  with an AX.25 callsign. The following command will do this for you:



       # /sbin/ifconfig bpq0 hw ax25 vk2ktj-14 up



  Again, remember that the callsign you specify should match the entry
  in the /etc/ax25/axports file that you wish to use for this port.


  6.1.9.  Configuring the BPQ Node to talk to the Linux AX.25 support.

  BPQ Ethernet normally uses a multicast address. The Linux
  implementation does not, and instead it uses the normal Ethernet
  broadcast address. The NET.CFG file for the BPQ ODI driver should
  therefore be modifified to look similar to this:

       LINK SUPPORT

               MAX STACKS 1
               MAX BOARDS 1

       LINK DRIVER E2000                    ; or other MLID to suit your card

               INT 10                       ;
               PORT 300                     ; to suit your card

               FRAME ETHERNET_II

               PROTOCOL BPQ 8FF ETHERNET_II ; required for BPQ - can change PID

       BPQPARAMS                            ; optional - only needed if you want
                                            ; to override the default target addr

               ETH_ADDR  FF:FF:FF:FF:FF:FF  ; Target address



  6.2.  Creating the /etc/ax25/axports  file.

  The /etc/ax25/axports is a simple text file that you create with a
  text editor. The format of the /etc/ax25/axports file is as follows:



       portname  callsign  baudrate  paclen  window  description



  where:


     portname
        is a text name that you will refer to the port by.

     callsign
        is the AX.25 callsign you want to assign to the port.

     baudrate
        is the speed at which you wish the port to communicate with your
        TNC.

     paclen
        is the maximum packet length you want to configure the port to
        use for AX.25 connected mode connections.

     window
        is the AX.25 window (K) parameter. This is the same as the
        MAXFRAME setting of many tnc's.

     description
        is a textual description of the port.

  In my case, mine looks like:



       radio    VK2KTJ-15       4800        256     2       4800bps 144.800 MHz
       ether    VK2KTJ-14       10000000    256     2       BPQ/ethernet device

  Remember, you must assign unique callsign/ssid to each AX.25 port you
  create.  Create one entry for each AX.25 device you want to use, this
  includes KISS, Baycom, SCC, PI, PT and SoundModem ports. Each entry
  here will describe exactly one AX.25 network device. The entries in
  this file are associated with the network devices by the
  callsign/ssid. This is at least one good reason for requiring unique
  callsign/ssid.


  6.3.  Configuring AX.25 routing.

  You may wish to configure default digipeaters paths for specific
  hosts.  This is useful for both normal AX.25 connections and also IP
  based connections.  The axparms command enables you to do this. Again,
  the man page offers a complete description, but a simple example might
  be:


       # /usr/sbin/axparms -route add radio VK2XLZ VK2SUT



  This command would set a digipeater entry for VK2XLZ via VK2SUT on the
  AX.25 port named radio.


  7.  Configuring an AX.25 interface for TCP/IP.

  It is very simple to configure an AX.25 port to carry TCP/IP.  If you
  have KISS interfaces then there are two methods for configuring an IP
  address. The kissattach command has an option that allows you to do
  specify an IP address. The more conventional method using the ifconfig
  command will work on all interface types.

  So, modifying the previous KISS example:


       # /usr/sbin/kissattach -i 44.136.8.5 -m 512 /dev/ttyS0 radio
       # /sbin/route add -net 44.136.8.0 netmask 255.255.255.0 ax0
       # /sbin/route add default ax0



  to create the AX.25 interface with an IP address of 44.136.8.5 and an
  MTU of 512 bytes. You should still use the ifconfig to configure the
  other parameters if necessary.

  If you have any other interface type then you use the ifconfig program
  to configure the ip address and netmask details for the port and add a
  route via the port, just as you would for any other TCP/IP interface.
  The following example is for a PI card device, but would work equally
  well for any other AX.25 network device:



       # /sbin/ifconfig pi0a 44.136.8.5 netmask 255.255.255.0 up
       # /sbin/ifconfig pi0a broadcast 44.136.8.255 mtu 512
       # /sbin/route add -net 44.136.8.0 netmask 255.255.255.0 pi0a
       # /sbin/route add default pi0a



  The commands listed above are typical of the sort of configuration
  many of you would be familiar with if you have used NOS or any of its
  derivatives or any other TCP/IP software. Note that the default route
  might not be required in your configuration if you have some other
  network device configured.

  To test it out, try a ping or a telnet to a local host.



       # ping -i 5 44.136.8.58



  Note the use of the `-i 5' arguments to ping to tell it to send pings
  every 5 seconds instead of its default of 1 second.


  8.  Configuring a NetRom port.

  The NetRom protocol relies on, and uses the AX.25 ports you have
  created.  The NetRom protocol rides on top of the AX.25 protocol. To
  configure NetRom on an AX.25 interface you must configure two files.
  One file describes the Netrom interfaces, and the other file describes
  which of the AX.25 ports will carry NetRom. You can configure multiple
  NetRom ports, each with its own callsign and alias, the same procedure
  applies for each.


  8.1.  Configuring /etc/ax25/nrports

  The first is the /etc/ax25/nrports file. This file describes the
  NetRom ports in much the same way as the /etc/ax25/axports file
  describes the AX.25 ports. Each NetRom device you wish to create must
  have an entry in the /etc/ax25/nrports file. Normally a Linux machine
  would have only one NetRom device configured that would use a number
  of the AX.25 ports defined. In some situations you might wish a
  special service such as a BBS to have a seperate NetRom alias and so
  you would create more than one.

  This file is formatted as follows:



       name callsign  alias  paclen   description



  Where:

     name
        is the text name that you wish to refer to the port by.

     callsign
        is the callsign that the NetRom traffic from this port will use.
        Note, this is not that address that users should connect to to
        get access to a node style interface. (The node program is
        covered later). This callsign/ssid should be unique and should
        not appear elsewhere in either of the /etc/ax25/axports or the
        /etc/ax25/nrports files.

     alias
        is the NetRom alias this port will have assigned to it.

     paclen
        is the maximum size of NetRom frames transmitted by this port.

     description
        is a free text description of the port.

  An example would look something like the following:



       netrom  VK2KTJ-9        LINUX   236     Linux Switch Port



  This example creates a NetRom port known to the rest of the NetRom
  network as `LINUX:VK2KTJ-9'.

  This file is used by programs such as the call program.


  8.2.  Configuring /etc/ax25/nrbroadcast

  The second file is the /etc/ax25/nrbroadcast file. This file may
  contain a number of entries. There would normally be one entry for
  each AX.25 port that you wish to allow NetRom traffic on.

  This file is formatted as follows:



       axport min_obs def_qual worst_qual verbose



  Where:

     axport
        is the port name obtained from the /etc/ax25/axports file. If
        you do not have an entry in /etc/ax25/nrbroadcasts for a port
        then this means that no NetRom routing will occur and any
        received NetRom broadcasts will be ignored for that port.

     min_obs
        is the minimum obselesence value for the port.

     def_qual
        is the default quality for the port.

     worst_qual
        is the worst quality value for the port, any routes under this
        quality will be ignored.

     verbose
        is a flag determining whether full NetRom routing broadcasts
        will occur from this port or only a routing broadcast
        advertising the node itself.

  An example would look something like the following:



       radio    1       200      100         1


  8.3.  Creating the NetRom Network device

  When you have the two configuration files completed you must create
  the NetRom device in much the same way as you did for the AX.25
  devices.  This time you use the nrattach command. The nrattach works
  in just the same way as the axattach command except that it creates
  NetRom network devices called `nr[0-9]'. Again, the first time you use
  the nrattach command it creates the `nr0' device, the second time it
  creates the `nr1' network devices etc. To create the network device
  for the NetRom port we've defined we would use:



       # nrattach netrom



  This command would start the NetRom device (nr0) named netrom
  configured with the details specified in the /etc/ax25/nrports file.


  8.4.  Starting the NetRom daemon

  The Linux kernel does all of the NetRom protocol and switching, but
  does not manage some functions. The NetRom daemon manages the NetRom
  routing tables and generates the NetRom routing broadcasts. You start
  NetRom daemon with the command:



       # /usr/sbin/netromd -i



  You should soon see the /proc/net/nr_neigh file filling up with
  information about your NetRom neighbours.

  Remember to put the /usr/sbin/netromd command in your rc files so that
  it is started automatically each time you reboot.


  8.5.  Configuring NetRom routing.


  You may wish to configure static NetRom routes for specific hosts.
  The nrparms command enables you to do this. Again, the man page offers
  a complete description, but a simple example might be:


       # /usr/sbin/nrparms -nodes VK2XLZ-10 + #MINTO 120 5 radio VK2SUT-9



  This command would set a NetRom route to #MINTO:VK2XLZ-10 via a
  neighbour VK2SUT-9 on my AX.25 port called `radio'.


  You can manually create entries for new neighbours using the nrparms
  command as well. For example:



  # /usr/sbin/nrparms -routes radio VK2SUT-9 + 120



  This command would create VK2SUT-9 as a NetRom neighbour with a
  quality of 120 and this will be locked and will not be deleted
  automatically.


  9.  Configuring a NetRom interface for TCP/IP.

  Configuring a NetRom interface for TCP/IP is almost identical to
  configuring an AX.25 interface for TCP/IP.

  Again you can either specify the ip address and mtu on the nrattach
  command line, or use the ifconfig and route commands, but you need to
  manually add arp entries for hosts you wish to route to because there
  is no mechanism available for your machine to learn what NetRom
  address it should use to reach a particular IP host.

  So, to create an nr0 device with an IP address of 44.136.8.5, an mtu
  of 512 and configured with the details from the /etc/ax25/nrports file
  for a NetRom port named netrom you would use:



       # /usr/sbin/nrattach -i 44.136.8.5 -m 512 netrom
       # route add 44.136.8.5 nr0



  or you could use something like the following commands manually:



       # /usr/sbin/nrattach netrom
       # ifconfig nr0 44.136.8.5 netmask 255.255.255.0 hw netrom VK2KTJ-9
       # route add 44.136.8.5 nr0



  Then for each IP host you wish to reach via NetRom you need to set
  route and arp entries. To reach a destination host with an IP address
  of 44.136.80.4 at NetRom address BBS:VK3BBS via a NetRom neighbour
  with callsign VK2SUT-0 you would use commands as follows:



       # route add 44.136.80.4 nr0
       # arp -t netrom -s 44.136.80.4 vk2sut-0
       # nrparms -nodes vk3bbs + BBS 120 6 sl0 vk2sut-0



  The `120' and `6' arguments to the nrparms command are the NetRom
  quality and obsolescence count values for the route.


  10.  Configuring a Rose port.

  The Rose packet layer protocol is similar to layer three of the X.25
  specification. The kernel based Rose support is a modified version of
  the FPAC Rose implementation
  <http://fpac.lmi.ecp.fr/f1oat/f1oat.html>.

  The Rose packet layer protocol protocol relies on, and uses the AX.25
  ports you have created. The Rose protocol rides on top of the AX.25
  protocol.  To configure Rose you must create a configuration file that
  describes the Rose ports you want. You can create multiple Rose ports
  if you wish, the same procedure applies for each.


  10.1.  Configuring /etc/ax25/rsports


  The file where you configure your Rose interfaces is the
  /etc/ax25/rsports file. This file describes the Rose port in much the
  same way as the /etc/ax25/axports file describes the AX.25 ports.

  This file is formatted as follows:



       name  addresss  description



  Where:

     name
        is the text name that you wish to refer to the port by.

     address
        is the 10 digit Rose address you wish to assign to this port.

     description
        is a free text description of the port.

  An example would look something like the following:



       rose  5050294760  Rose Port



  Note that Rose will use the default callsign/ssid configured on each
  AX.25 port unless you specify otherwise.

  To configure a seperate callsign/ssid for Rose to use on each port you
  use the rsparms command as follows:



       # /usr/sbin/rsprams -call VK2KTJ-10



  This example would make Linux listen for and use the callsign/ssid
  VK2KTJ-10 on all of the configured AX.25 ports for Rose calls.



  10.2.  Creating the Rose Network device.

  When you have created the /etc/ax25/rsports file you may create the
  Rose device in much the same way as you did for the AX.25 devices.
  This time you use the rsattach command. The rsattach command creates
  network devices named `rose[0-5]'. The first time you use the rsattach
  command it create the `rose0' device, the second time it creates the
  `rose1' device etc. For example:



       # rsattach rose



  This command would start the Rose device (rose0) configured with the
  details specified in the /etc/ax25/rsports file for the entry named
  `rose'.


  10.3.  Configuring Rose Routing

  The Rose protocol currently supports only static routing. The rsparms
  utility allows you to configure your Rose routing table under Linux.

  For example:


       # rsparms -nodes add 5050295502 radio vk2xlz



  would add a route to Rose node 5050295502 via an AX.25 port named
  `radio' in your /etc/ax25/axports file to a neighbour with the call-
  sign VK2XLZ.

  You may specify a route with a mask to capture a number of Rose
  destinations into a single routing entry. The syntax looks like:


       # rsparms -nodes add 5050295502/4 radio vk2xlz



  which would be identical to the previous example except that it would
  match any destination address that matched the first four digits sup-
  plied, in this case any address commencing with the digits 5050. An
  alternate form for this command is:


       # rsparms -nodes add 5050/4 radio vk2xlz



  which is probably the less ambiguous form.


  11.  Making AX.25/NetRom/Rose calls.

  Now that you have all of your AX.25, NetRom and Rose interfaces
  configured and active, you should be able to make test calls.

  The AX25 Utilities package includes a program called `call' which is a
  splitscreen terminal program for AX.25, NetRom and Rose.

  A simple AX.25 call would look like:


       /usr/bin/call radio VK2DAY via VK2SUT



  A simple NetRom call to a node with an alias of SUNBBS would look
  like:


       /usr/bin/call netrom SUNBBS



  A simple Rose call to HEARD at node 5050882960 would look like:


       /usr/bin/call rose HEARD 5050882960



  Note: you must tell call which port you wish to make the call on, as
  the same destination node might be reachable on any of the ports you
  have configured.

  The call program is a linemode terminal program for making AX.25
  calls. It recognises lines that start with `~' as command lines.  The
  `~.' command will close the connection.

  Please refer to the man page in /usr/man for more information.


  12.  Configuring Linux to accept Packet connections.

  Linux is a powerful operating system and offers a great deal of
  flexibility in how it is configured. With this flexibility comes a
  cost in configuring it to do what you want. When configuring your
  Linux machine to accept incoming AX.25, NetRom or Rose connections
  there are a number of questions you need to ask yourself. The most
  important of which is: "What do I want users to see when they
  connect?". People are developing neat little applications that may be
  used to provide services to callers, a simple example is the pms
  program included in the AX25 utilities, a more complex example is the
  node program also included in the AX25 utilities. Alternatively you
  might want to give users a login prompt so that they can make use of a
  shell account, or you might even have written your own program, such
  as a customised database or a game, that you want people to connect
  to. Whatever you choose, you must tell the AX.25 software about this
  so that it knows what software to run when it accepts an incoming
  AX.25 connection.

  The ax25d program is similar to the inetd program commonly used to
  accept incoming TCP/IP connections on unix machines. It sits and
  listens for incoming connections, when it detects one it goes away and
  checks a configuration file to determine what program to run and
  connect to that connection. Since this the standard tool for accepting
  incoming AX.25, NetRom and Rose connections I'll describe how to
  configure it.

  12.1.  Creating the /etc/ax25/ax25d.conf  file.

  This file is the configuration file for the ax25d AX.25 daemon which
  handles incoming AX.25, NetRom and Rose connections.

  The file is a little cryptic looking at first, but you'll soon
  discover it is very simple in practice, with a small trap for you to
  be wary of.

  The general format of the ax25d.conf file is as follows:



       # This is a comment and is ignored by the ax25d program.
       [port_name] || <port_name> || {port_name}
       <peer1>    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name> <arguments>
       <peer2>    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name> <arguments>
       parameters window T1 T2 T3 idle N2 <mode>
       <peer3>    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name> <arguments>
          ...
       default    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name> <arguments>



  Where:

     #  at the start of a line marks a comment and is completely ignored
        by the ax25d program.

     <port_name>
        is the name of the AX.25, NetRom or Rose port as specified in
        the /etc/ax25/axports, /etc/ax25/nrports and /etc/ax25/rsports
        files. The name of the port is surrounded by the `[]' brackets
        if it is an AX.25 port, the `<>' brackets if it is a NetRom
        port, or the `{}' brackets if it is a Rose port.  There is an
        alternate form for this field, and that is use prefix the port
        name with `callsign/ssid via' to indicate that you wish accept
        calls to the callsign/ssid via this interface. The example
        should more clearly illustrate this.

     <peer>
        is the callsign of the peer node that this particular
        configuration applies to. If you don't specify an SSID here then
        any SSID will match.

     window
        is the AX.25 Window parameter (K) or MAXFRAME parameter for this
        configuration.

     T1 is the Frame retransmission (T1) timer in half second units.

     T2 is the amount of time the AX.25 software will wait for another
        incoming frame before preparing a response in 1 second units.

     T3 is the amount of time of inactivity before the AX.25 software
        will disconnect the session in 1 second units.

     idle
        is the idle timer value in seconds.

     N2 is the number of consecutive retransmissions that will occur
        before the connection is closed.

     <mode>
        provides a mechanism for determining certain types of general
        permissions. The modes are enabled or disabled by supplying a
        combination of characters, each representing a permission. The
        characters may be in either upper or lower case and must be in a
        single block with no spaces.

        u/U
           UTMP                   - currently unsupported.

        v/V
           Validate call          - currently unsupported.

        q/Q
           Quiet                  - Don't log connection

        n/N
           check NetRom Neighbour - currently unsupported.

        d/D
           Disallow Digipeaters   - Connections must be direct, not
           digipeated.

        l/L
           Lockout                - Don't allow connection.

        */0
           marker                 - place marker, no mode set.

     <uid>
        is the userid that the program to be run to support the
        connection should be run as.

     <cmd>
        is the full pathname of the command to be run, with no arguments
        specified.

     <cmd-name>
        is the text that should appear in a ps as the command name
        running (normally the same as <cmd> except without the directory
        path information.

     <arguments>
        are the command line argument to be passed to the <:cmd> when it
        is run. You pass useful information into these arguments by use
        of the following tokens:

        %d Name of the port the connection was received on.

        %U AX.25 callsign of the connected party without the SSID, in
           uppercase.

        %u AX.25 callsign of the connected party without the SSID, in
           lowercase.

        %S AX.25 callsign of the connected party with the SSID, in
           uppercase.

        %s AX.25 callsign of the connected party with the SSID, in
           lowercase.

        %P AX.25 callsign of the remote node that the connection came in
           from without the SSID, in uppercase.

        %p AX.25 callsign of the remote node that the connection came in
           from without the SSID, in lowercase.


        %R AX.25 callsign of the remote node that the connection came in
           from with the SSID, in uppercase.

        %r AX.25 callsign of the remote node that the connection came in
           from with the SSID, in lowercase.

  You need one section in the above format for each AX.25, NetRom or
  Rose interface you want to accept incoming AX.25, NetRom or Rose
  connections on.

  There are two special lines in the paragraph, one starts with the
  string `parameters' and the other starts with the string `default'
  (yes there is a difference). These lines serve special functions.

  The `default' lines purpose should be obvious, this line acts as a
  catch-all, so that any incoming connection on the <interface_call>
  interface that doesn't have a specific rule will match the `default'
  rule. If you don't have a `default' rule, then any connections not
  matching any specific rule will be disconnected immediately without
  notice.

  The `parameters' line is a little more subtle, and here is the trap I
  mentioned earlier. In any of the fields for any definition for a peer
  you can use the `*' character to say `use the default value'. The
  `parameters' line is what sets those default values. The kernel
  software itself has some defaults which will be used if you don't
  specify any using the `parameters' entry. The trap is that the these
  defaults apply only to those rules below the `parameters' line, not to
  those above. You may have more than one `parameters' rule per
  interface definition, and in this way you may create groups of default
  configurations. It is important to note that the `parameters' rule
  does not allow you to set the `uid' or `command' fields.


  12.2.  A simple example ax25d.conf  file.

  Ok, an illustrative example:



  # ax25d.conf for VK2KTJ - 02/03/97
  # This configuration uses the AX.25 port defined earlier.

  # <peer> Win T1  T2  T3  idl N2 <mode> <uid> <exec> <argv[0]>[<args....>]

  [VK2KTJ-0 via radio]
  parameters 1    10  *  *  *   *   *
  VK2XLZ     *     *  *  *  *   *   *    root  /usr/sbin/axspawn axspawn %u +
  VK2DAY     *     *  *  *  *   *   *    root  /usr/sbin/axspawn axspawn %u +
  NOCALL     *     *  *  *  *   *   L
  default    1    10  5 100 180 5   *    root  /usr/sbin/pms pms -a -o vk2ktj

  [VK2KTJ-1 via radio]
  default    *     *    *   *   *   0    root /usr/sbin/node node

  <netrom>
  parameters 1    10  *  *  *   *   *
  NOCALL     *     *  *  *  *   *   L
  default    *     *  *  *  *   *   0        root /usr/sbin/node node

  {VK2KTJ-0 via rose}
  parameters 1    10  *  *  *   *   *
  VK2XLZ     *     *  *  *  *   *   *    root  /usr/sbin/axspawn axspawn %u +
  VK2DAY     *     *  *  *  *   *   *    root  /usr/sbin/axspawn axspawn %u +
  NOCALL     *     *  *  *  *   *   L
  default    1    10  5 100 180 5   *    root  /usr/sbin/pms pms -a -o vk2ktj

  {VK2KTJ-1 via rose}
  default    *     *    *   *   *   0    root /usr/sbin/node node radio



  This example says that anybody attempting to connect to the callsign
  `VK2KTJ-0' heard on the AX.25 port called `radio' will have the
  following rules applied:

  Anyone whose callsign is set to `NOCALL' should be locked out, note
  the use of mode `L'.

  The parameters line changes two parameters from the kernel defaults
  (Window and T1) and will run the /usr/sbin/axspawn program for them.
  Any copies of /usr/sbin/axspawn run this way will appear as axspawn in
  a ps listing for convenience. The next two lines provide definitions
  for two stations who will receive those permissions.

  The last line in the paragraph is the `catch all' definition that
  everybody else will get (including VK2XLZ and VK2DAY using any other
  SSID other than -1).  This definition sets all of the parameters
  implicitly and will cause the pms program to be run with a command
  line argument indicating that it is being run for an AX.25 connection,
  and that the owner callsign is VK2KTJ. (See the `Configuring the PMS'
  section below for more details).

  The next configuration accepts calls to VK2KTJ-1 via the radio port.
  It runs the node program for everybody that connects to it.

  The next configuration is a NetRom configuration, note the use of the
  greater-then and less-than braces instead of the square brackets.
  These denote a NetRom configuration. This configuration is simpler, it
  simply says that anyone connecting to our NetRom port called `netrom'
  will have the node program run for them, unless they have a callsign
  of `NOCALL' in which case they will be locked out.

  The last two configurations are for incoming Rose connections. The
  first for people who have placed calls to `vk2ktj-0' and the second
  for `VK2KTJ-1 at the our Rose node address. These work precisely the
  same way. Not the use of the curly braces to distinguish the port as a
  Rose port.

  This example is a contrived one but I think it illustrates clearly the
  important features of the syntax of the configuration file. The
  configuration file is explained fully in the ax25d.conf man page. A
  more detailed example is included in the ax25-utils package that might
  be useful to you too.


  12.3.  Starting ax25d

  When you have the two configuration files completed you start ax25d
  with the command:



       # /usr/sbin/ax25d



  When this is run people should be able to make AX.25 connections to
  your Linux machine. Remember to put the ax25d command in your rc files
  so that it is started automatically when you reboot each time.


  13.  Configuring the node  software.

  The node software was developed by Tomi Manninen
  <tomi.manninen@hut.fi> and was based on the original PMS program.  It
  provides a fairly complete and flexible node capability that is easily
  configured. It allows users once they are connected to make Telnet,
  NetRom, Rose, and AX.25 connections out and to obtain various sorts of
  information such as Finger, Nodes and Heard lists etc. You can
  configure the node to execute any Linux command you wish fairly
  simply.

  The node would normally be invoked from the ax25d program although it
  is also capable of being invoked from the TCP/IP inetd program to
  allow users to telnet to your machine and obtain access to it, or by
  running it from the command line.


  13.1.  Creating the /etc/ax25/node.conf  file.

  The node.conf file is where the main configuration of the node takes
  place. It is a simple text file and its format is as follows:



  # /etc/ax25/node.conf
  # configuration file for the node(8) program.
  #
  # Lines beginning with '#' are comments and are ignored.

  # Hostname
  # Specifies the hostname of the node machine
  hostname        radio.gw.vk2ktj.ampr.org

  # Local Network
  # allows you to specify what is consider 'local' for the
  # purposes of permission checking using nodes.perms.
  localnet        44.136.8.96/29

  # Hide Ports
  # If specified allows you to make ports invisible to users. The
  # listed ports will not be listed by the (P)orts command.
  hiddenports     rose netrom

  # Node Identification.
  # this will appear in the node prompt
  NodeId          LINUX:VK2KTJ-9

  # NetRom port
  # This is the name of the netrom port that will be used for
  # outgoing NetRom connections from the node.
  NrPort          netrom

  # Node Idle Timeout
  # Specifies the idle time for connections to this node in seconds.
  idletimout      1800

  # Connection Idle Timeout
  # Specifies the idle timer for connections made via this node in
  # seconds.
  conntimeout     1800

  # Reconnect
  # Specifies whether users should be reconnected to the node
  # when their remote connections disconnect, or whether they
  # should be disconnected complete.
  reconnect       on

  # Command Aliases
  # Provide a way of making complex node commands simple.
  alias           CONV    "telnet vk1xwt.ampr.org 3600"
  alias           BBS     "connect radio vk2xsb"

  # Externam Command Aliases
  # Provide a means of executing external commands under the node.
  # extcmd <cmdname> <flag> <userid> <command>
  # Flag == 1 is the only implemented function.
  # <command> is formatted as per ax25d.conf
  extcmd          PMS     1       root    /usr/sbin/pms pms -u %U -o VK2KTJ

  # Logging
  # Set logging to the system log. 3 is the noisiest, 0 is disabled.
  loglevel        3

  # The escape character
  # 20 = (Control-T)
  EscapeChar      20



  13.2.  Creating the /etc/ax25/node.perms  file.

  The node allows you to assign permissions to users. These permissions
  allow you to determine which users should be allowed to make use of
  options such as the (T)elnet, and (C)onnect commands, for example, and
  which shouldn't. The node.perms file is where this information is
  stored and contains five key fields. For all fields an asterisk `*'
  character matches anything. This is useful for building default rules.


     user
        The first field is the callsign or user to which the permissions
        should apply.  Any SSID value is ignored, so you should just
        place the base callsign here.

     method
        Each protocol or access method is also given permissions. For
        example you might allow users who have connected via AX.25 or
        NetRom to use the (C)onnect option, but prevent others, such as
        those who are telnet connected from a non-local node from having
        access to it. The second field therefore allows you to select
        which access method this permissions rule should apply to.  The
        access methods allowed are:


          method  description
          ------  -----------------------------------------------------------
          ampr    User is telnet connected from an amprnet address (44.0.0.0)
          ax25    User connected by AX.25
          host    User started node from command line
          inet    user is telnet connected from a non-loca, non-ampr address.
          local   User is telnet connected from a 'local' host
          netrom  User connected by NetRom
          rose    User connected by Rose
          *       User connected by any means.



     port
        For AX.25 users you can control permissions on a port by port
        basis too if you choose. This allows you to determine what AX.25
        are allowed to do based on which of your ports they have
        connected to. The third field contains the port name if you are
        using this facility. This is useful only for AX.25 connections.

     password
        You may optionally configure the node so that it prompts users
        to enter a password when they connect. This might be useful to
        help protect specially configured users who have high authority
        levels. If the fourth field is set then its value will be the
        password that will be accepted.

     permissions
        The permissions field is the final field in each entry in the
        file.  The permissions field is coded as a bit field, with each
        facility having a bit value which if set allows the option to be
        used and if not set prevents the facility being used. The list
        of controllable facilities and their corresponding bit values
        are:



     value   description
     -----   -------------------------------------------------
      1      Login allowed.
      2      AX25 (C)onnects allowed.
      4      NetRom (C)onnects allowed.
      8      (T)elnet to local hosts allowed.
      16     (T)elnet to amprnet (44.0.0.0) hosts allowed.
      32     (T)elnet to non-local, non-amprnet hosts allowed.
      64     Hidden ports allowed for AX.25 (C)onnects.
      128    Rose (C)onnects allowed.



     To code the permissions value for a rule, simply take each of the
     permissions you want that user to have and add their values
     together. The resulting number is what you place in field five.

  A sample nodes.perms might look like:



       # /etc/ax25/node.perms
       #
       # The node operator is VK2KTJ, has a password of 'secret' and
       # is allowed all permissions by all connection methods
       vk2ktj  *       *       secret  255

       # The following users are banned from connecting
       NOCALL  *       *       *       0
       PK232   *       *       *       0
       PMS     *       *       *       0

       # INET users are banned from connecting.
       *       inet    *       *       0

       # AX.25, NetRom, Local, Host and AMPR users may (C)onnect and (T)elnet
       # to local and ampr hosts but not to other IP addresses.
       *       ax25    *       *       159
       *       netrom  *       *       159
       *       local   *       *       159
       *       host    *       *       159
       *       ampr    *       *       159



  13.3.  Configuring node  to run from ax25d

  The node program would normally be run by the ax25d program.  To do
  this you need to add appropriate rules to the /etc/ax25/ax25d.conf
  file. In my configuration I wanted users to have a choice of either
  connecting to the node or connecting to other services. ax25d allows
  you to do this by cleverly creating creating port aliases. For
  example, given the ax25d configuration presented above, I want to
  configure node so that all users who connect to VK2KTJ-1 are given the
  node. To do this I add the following to my /etc/ax25/ax25d.conf file:


       [vk2ktj-1 via radio]
       default    *     *    *   *   *   0    root /usr/sbin/node node



  This says that the Linux kernel code will answer any connection
  requests for the callsign `VK2KTJ-1' heard on the AX.25 port named
  `radio', and will cause the node program to be run.


  13.4.  Configuring node  to run from inetd

  If you want users to be able to telnet a port on your machine and
  obtain access to the node you can go this fairly easily. The first
  thing to decide is what port users should connect to. In this example
  I've arbitrarily chosen port 4000, though Tomi gives details on how
  you could replace the normal telnet daemon with the node in his
  documentation.

  You need to modify two files.

  To /etc/services you should add:


       node    3694/tcp        #OH2BNS's node software



  and to /etc/inetd.conf you should add:


       node    stream  tcp     nowait  root    /usr/sbin/node node



  When this is done, and you have restarted the inetd program any user
  who telnet connects to port 3694 of your machine will be prompted to
  login and if configured, their password and then they will be con-
  nected to the node.


  14.  Configuring axspawn .

  The axspawn program is a simple program that allows AX.25 stations who
  connect to be logged in to your machine. It may be invoked from the
  ax25d program as described above in a manner similar to the node
  program. To allow a user to log in to your machine you should add a
  line similar to the following into your /etc/ax25/ax25d.conf file:


       default * * * * * 1 root /usr/sbin/axspawn axspawn %u



  If the line ends in the + character then the connecting user must hit
  return before they will be allowed to login. The default is to not
  wait.  Any individual host configurations that follow this line will
  have the axspawn program run when they connect. When axspawn is run it
  first checks that the command line argument it is supplied is a legal
  callsign, strips the SSID, then it checks that /etc/passwd file to see
  if that user has an account configured. If there is an account, and
  the password is either "" (null) or + then the user is logged in, if
  there is anything in the password field the user is prompted to enter
  a password. If there is not an existing account in the /etc/passwd
  file then axspawn may be configured to automatically create one.



  14.1.  Creating the /etc/ax25/axspawn.conf  file.

  You can alter the behaviour of axspawn in various ways by use of the
  /etc/ax25/axspawn.conf file. This file is formatted as follows:


       # /etc/ax25/axspawn.conf
       #
       # allow automatic creation of user accounts
       create    yes
       #
       # guest user if above is 'no' or everything else fails. Disable with "no"
       guest     no
       #
       # group id or name for autoaccount
       group     ax25
       #
       # first user id to use
       first_uid 2001
       #
       # maximum user id
       max_uid   3000
       #
       # where to add the home directory for the new users
       home      /home/ax25
       #
       # user shell
       shell     /bin/bash
       #
       # bind user id to callsign for outgoing connects.
       associate yes



  The eight configurable characteristics of axspawn are as follows:


     #  indicates a comment.

     create
        if this field is set to yes then axspawn will attempt to
        automatically create a user account for any user who connects
        and does not already have an entry in the /etc/passwd file.

     guest
        this field names the login name of the account that will be used
        for people who connect who do not already have accounts if
        create is set to no. This is usually ax25 or guest.

     group
        this field names the group name that will be used for any users
        who connect and do not already have an entry in the /etc/passwd
        file.

     first_uid
        this is the number of the first userid that will be
        automatically created for new users.

     max_uid
        this is the maximum number that will be used for the userid of
        new users.

     home
        this is the home (login) directory of new users.

     shell
        this is the login shell of any new users.

     associate
        this flag indicates whether outgoing AX.25 connections made by
        this user after they login will use their own callsign, or your
        stations callsign.


  15.  Configuring the pms

  The pms program is an implementation of a simple personal message
  system. It was originally written by Alan Cox. Dave Brown, N2RJT,
  <dcb@vectorbd.com> has taken on further development of it.  At present
  it is still very simple, supporting only the ability to send mail to
  the owner of the system and to obtain some limited system information
  but Dave is working to expand its capability to make it more useful.

  After that is done there are a couple of simple files that you should
  create that give users some information about the system and then you
  need to add appropriate entries into the ax25d.conf file so that
  connected users are presented with the PMS.



  15.1.  Create the /etc/ax25/pms.motd  file.

  The /etc/ax25/pms.motd file contains the `message of the day' that
  users will be presented with after they connect and receive the usual
  BBS id header. The file is a simple text file, any text you include in
  this file will be sent to users.


  15.2.  Create the /etc/ax25/pms.info  file.

  The /etc/ax25/pms.info file is also a simple text file in which you
  would put more detailed information about your station or
  configuration.  This file is presented to users in response to their
  issuing of the Info command from the PMS> prompt.


  15.3.  Associate AX.25 callsigns with system users.

  When a connected user sends mail to an AX.25 callsign, the pms expects
  that callsign to be mapped, or associated with a real system user on
  your machine. This is described in a section of its own.


  15.4.  Add the PMS to the /etc/ax25/ax25d.conf  file.

  Adding the pms to your ax25d.conf file is very simple.  There is one
  small thing you need to think about though. Dave has added command
  line arguments to the PMS to allow it to handle a number of different
  text end-of-line conventions. AX.25 and NetRom by convention expect
  the end-of-line to be carriage return, linefeed while the standard
  unix end-of-line is just newline. So, for example, if you wanted to
  add an entry that meant that the default action for a connection
  received on an AX.25 port is to start the PMS then you would add a
  line that looked something like:



       default  1  10 5 100 5   0    root  /usr/sbin/pms pms -a -o vk2ktj



  This simply runs the pms program, telling it that it is an AX.25
  connection it is connected to and that the PMS owner is vk2ktj.  Check
  the man page for what you should specify for other connection methods.


  15.5.  Test the PMS.

  To test the PMS, you can try the following command from the command
  line:

  # /usr/sbin/pms -u vk2ktj -o vk2ktj


  Substitute your own callsign for mine and this will run the pms,
  telling it that it is to use the unix end-of-line convention, and that
  user logging in is vk2ktj. You can do all the things connected users
  can.

  Additionally you might try getting some other node to connect to you
  to confirm that your ax25d.conf configuration works.


  16.  Configuring the user_call  programs.

  The `user_call' programs are really called: ax25_call and netrom_call.
  They are very simple programs designed to be called from ax25d to
  automate network connections to remote hosts. They may of course be
  called from a number of other places such as shell scripts or other
  daemons such as the node program.

  They are like a very simple call program. They don't do any meddling
  with the data at all, so the end of line handling you'll have to worry
  about yourself.

  Let's start with an example of how you might use them. Imagine you
  have a small network at home and that you have one linux machine
  acting as your Linux radio gateway and another machine, lets say a BPQ
  node connected to it via an ethernet connection.

  Normally if you wanted radio users to be able to connect to the BPQ
  node they would either have to digipeat through your linux node, or
  connect to the node program on your linux node and then connect from
  it.  The ax25_call program can simplify this if it is called from the
  ax25d program.

  Imagine the BPQ node has the callsign VK2KTJ-9 and that the linux
  machine has the AX.25/ethernet port named `bpq'. Let us also imagine
  the Linux gateway machine has a radio port called `radio'.

  An entry in the /etc/ax25/ax25d.conf that looked like:


       [VK2KTJ-1 via radio]
       default    * * * *   *   *  *
                       root /usr/sbin/ax25_call ax25_call bpq %u vk2ktj-9



  would enable users to connect direct to `VK2KTJ-1' which would actu-
  ally be the Linux ax25d daemon and then be automatically switched to
  an AX.25 connection to `VK2KTJ-9' via the `bpq' interface.

  There are all sorts of other possible configurations that you might
  try.  The `netrom_call' and `rose_call' utilities work in similar
  ways. One amateur has used this utility to make connections to a
  remote BBS easier. Normally the users would have to manually enter a
  long connection string to make the call so he created an entry that
  made the BBS appear as though it were on the local network by having
  his ax25d proxy the connection to the remote machine.


  17.  Configuring the Rose Uplink and Downlink commands

  If you are familiar with the ROM based Rose implementation you will be
  familiar with the method by which AX.25 users make calls across a Rose
  network. If a users local Rose node has the callsign VK2KTJ-5 and the
  AX.25 user wants to connect to VK5XXX at remote Rose node 5050882960
  then they would issue the command:



       c vk5xxx v vk2ktj-5 5050 882960



  At the remote node, VK5XXX would see an incoming connection with the
  local AX.25 users callsign and being digipeated via the remote Rose
  nodes callsign.

  The Linux Rose implementation does not support this capability in the
  kernel, but there are two application programs called rsuplnk and
  rsdwnlnk which perform this function.


  17.1.  Configuring a Rose downlink

  To configure your Linux machine to accept a Rose connection and
  establish an AX.25 connection to any destination callsign that is not
  being listened for on your machine you need to add an entry to your
  /etc/ax25/ax25d.conf file. Normally you would configure this entry to
  be the default behaviour for incoming Rose connections. For example
  you might have Rose listeners operating for destinations like NODE-0
  or HEARD-0 that you wish to handle locally, but for all other
  destination calls you may want to pass them to the rsdwnlink command
  and assume they are AX.25 users.

  A typical configuration would look like:



       #
       {* via rose}
       NOCALL   * * * * * *  L
       default  * * * * * *  - root  /usr/sbin/rsdwnlnk rsdwnlnk 4800 vk2ktj-5
       #



  With this configuration any user who established a Rose connection to
  your Linux nodes address with a destination call of something that you
  were not specifically listening for would be converted into an AX.25
  connection on the AX.25 port named 4800 with a digipeater path of
  VK2KTJ-5.


  17.2.  Configuring a Rose uplink

  To configure your Linux machine to accept AX.25 connections in the
  same way that a ROM Rose node would you must add an entry into your
  /etc/ax25/ax25d.conf file that looks similar to the following:



       #
       [VK2KTJ-5* via 4800]
       NOCALL   * * * * * *  L
       default  * * * * * *  - root  /usr/sbin/rsuplnk rsuplnk rose
       #



  Note the special syntax for the local callsign. The `*' character
  indicates that the application should be invoked if the callsign is
  heard in the digipeater path of a connection.

  This configuration would allow an AX.25 user to establish Rose calls
  using the example connect sequence presented in the introduction.
  Anybody attempting to digipeat via VK2KTJ-5 on the AX.25 port named
  4800 would be handled by the rsuplnk command.


  18.  Associating AX.25 callsigns with Linux users.

  There are a number of situations where it is highly desirable to
  associate a callsign with a linux user account. One example might be
  where a number of amateur radio operators share the same linux machine
  and wish to use their own callsign when making calls. Another is the
  case of PMS users wanting to talk to a particular user on your
  machine.

  The AX.25 software provides a means of managing this association of
  linux user account names with callsigns. We've mentioned it once
  already in the PMS section, but I'm spelling it out here to be sure
  you don't miss it.

  You make the association with the axparms command. An example looks
  like:


       # axparms -assoc vk2ktj terry



  This command associates that AX.25 callsign vk2ktj with the user terry
  on the machine. So, for example, any mail for vk2ktj on the pms will
  be sent to Linux account terry.

  Remember to put these associations into your rc file so that they are
  available each time your reboot.

  Note you should never associate a callsign with the root account as
  this can cause configuration problems in other programs.


  19.  The /proc/  file system entries.

  The /proc filesystem contains a number of files specifically related
  to the AX25 and NetRom kernel software. These files are normally used
  by the AX52 utilities, but they are plainly formatted so you may be
  interested in reading them. The format is fairly easily understood so
  I don't think much explanation will be necessary.


     /proc/net/arp
        contains the list of Address Resolution Protocol mappings of IP
        addresses to MAC layer protocol addresses. These can can AX.25,
        ethernet or some other MAC layer protocol.

     /proc/net/ax25
        contains a list of AX.25 sockets opened. These might be
        listening for a connection, or active sessions.

     /proc/net/ax25_bpqether
        contains the AX25 over ethernet BPQ style callsign mappings.

     /proc/net/ax25_calls
        contains the linux userid to callsign mappings set my the
        axparms -assoc command.

     /proc/net/ax25_route
        contains AX.25 digipeater path information.

     /proc/net/nr
        contains a list of NetRom sockets opened. These might be
        listening for a connection, or active sessions.

     /proc/net/nr_neigh
        contains information about the NetRom neighbours known to the
        NetRom software.

     /proc/net/nr_nodes
        contains information about the NetRom nodes known to the NetRom
        software.

     /proc/net/rose
        contains a list of Rose sockets opened. These might be listening
        for a connection, or active sessions.

     /proc/net/rose_nodes
        contains a mapping of Rose destinations to Rose neighbours.

     /proc/net/rose_neigh
        contains a list of known Rose neighbours.

     /proc/net/rose_routes
        contains a list of all established Rose connections.


  20.  AX.25, NetRom, Rose network programming.

  Probably the biggest advantage of using the kernel based
  implementations of the amateur packet radio protocols is the ease with
  which you can develop applications and programs to use them.

  While the subject of Unix Network Programming is outside the scope of
  this document I will describe the elementary details of how you can
  make use of the AX.25, NetRom and Rose protocols within your software.


  20.1.  The address families.

  Network programming for AX.25, NetRom and Rose is quite similar to
  programming for TCP/IP under Linux. The major differences being the
  address families used, and the address structures that need to be
  mangled into place.

  The address family names for AX.25, NetRom and Rose are AF_AX25,
  AF_NETROM and AF_ROSE respectively.

  20.2.  The header files.

  You must always include the `ax25.h' header file, and also the
  `netrom.h' or `rose.h' header files if you are dealing with those
  protocols. Simple top level skeletons would look something like the
  following:

  For AX.25:


       #include <ax25.h>
       int s, addrlen = sizeof(struct full_sockaddr_ax25);
       struct full_sockaddr_ax25 sockaddr;
       sockaddr.fsa_ax25.sax25_family = AF_AX25



  For NetRom:


       #include <ax25.h>
       #include <netrom.h>
       int s, addrlen = sizeof(struct full_sockaddr_ax25);
       struct full_sockaddr_ax25 sockaddr;
       sockaddr.fsa_ax25.sax25_family = AF_NETROM;



  For Rose:


       #include <ax25.h>
       #include <rose.h>
       int s, addrlen = sizeof(struct sockaddr_rose);
       struct sockaddr_rose sockaddr;
       sockaddr.srose_family = AF_ROSE;



  20.3.  Callsign mangling and examples.

  There are routines within the lib/ax25.a library built in the AX25
  utilities package that manage the callsign conversions for you. You
  can write your own of course if you wish.

  The user_call utilities are excellent examples from which to work. The
  source code for them is included in the AX25 utilities package.  If
  you spend a little time working with those you will soon see that
  ninety percent of the work is involved in just getting ready to open
  the socket. Actually making the connection is easy, the preparation
  takes time.

  The example are simple enough to not be very confusing. If you have
  any questions, you should feel to direct them to the linux-hams
  mailing list and someone there will be sure to help you.


  21.  Some sample configurations.

  Following are examples of the most common types of configurations.
  These are guides only as there are as many ways of configuring your
  network as there are networks to configure, but they may give you a
  start.


  21.1.  Small Ethernet LAN with Linux as a router to Radio LAN

  Many of you may have small local area networks at home and want to
  connect the machines on that network to your local radio LAN. This is
  the type of configuration I use at home. I arranged to have a suitable
  block of addresses allocated to me that I could capture in a single
  route for convenience and I use these on my Ethernet LAN. Your local
  IP coordinator will assist you in doing this if you want to try it as
  well. The addresses for the Ethernet LAN form a subset of the radio
  LAN addresses. The following configuration is the actual one for my
  linux router on my network at home:



                                                 .      .   .    .    . .
         ---                                .
          | Network       /---------\     .    Network
          | 44.136.8.96/29|         |    .     44.136.8/24        \ | /
          |               | Linux   |   .                          \|/
          |               |         |  .                            |
          |          eth0 | Router  |  .  /-----\    /----------\   |
          |---------------|         |-----| TNC |----| Radio    |---/
          |   44.136.8.97 |  and    |  .  \-----/    \----------/
          |               |         | sl0
          |               | Server  | 44.136.8.5
          |               |         |    .
          |               |         |     .
          |               \_________/       .
         ---                                     .      .   .    .    . .



  #!/bin/sh
  # /etc/rc.net
  # This configuration provides one KISS based AX.25 port and one
  # Ethernet device.

  echo "/etc/rc.net"
  echo "  Configuring:"

  echo -n "    loopback:"
  /sbin/ifconfig lo 127.0.0.1
  /sbin/route add 127.0.0.1
  echo " done."

  echo -n "    ethernet:"
  /sbin/ifconfig eth0 44.136.8.97 netmask 255.255.255.248 \
                  broadcast 44.136.8.103 up
  /sbin/route add 44.136.8.97 eth0
  /sbin/route add -net 44.136.8.96 netmask 255.255.255.248 eth0
  echo " done."

  echo -n "    AX.25: "
  kissattach -i 44.136.8.5 -m 512 /dev/ttyS1 4800
  ifconfig sl0 netmask 255.255.255.0 broadcast 44.136.8.255
  route add -host 44.136.8.5 sl0
  route add -net 44.136.8.0 window 1024 sl0

  echo -n "    Netrom: "
  nrattach -i 44.136.8.5 netrom

  echo "  Routing:"
  /sbin/route add default gw 44.136.8.68 window 1024 sl0
  echo "    default route."
  echo done.

  # end



  /etc/ax25/axports


       # name  callsign        speed   paclen  window  description
       4800    VK2KTJ-0        4800    256     2       144.800 MHz



  /etc/ax25/nrports


       # name  callsign        alias   paclen  description
       netrom  VK2KTJ-9        LINUX   235     Linux Switch Port



  /etc/ax25/nrbroadcast


       # ax25_name     min_obs def_qual        worst_qual      verbose
       4800            1       120             10              1



  o  You must have IP_FORWARDING enabled in your kernel.

  o  The AX.25 configuration files are pretty much those used as
     examples in the earlier sections, refer to those where necessary.

  o  I've chosen to use an IP address for my radio port that is not
     within my home network block. I needn't have done so, I could have
     easily used 44.136.8.97 for that port too.

  o  44.136.8.68 is my local IPIP encapsulated gateway and hence is
     where I point my default route.

  o  Each of the machines on my Ethernet network have a route:


       route add -net 44.0.0.0 netmask 255.0.0.0 \
               gw 44.136.8.97 window 512 mss 512 eth0



  The use of the mss and window parameters means that I can get optimum
  performance from both local Ethernet and radio based connections.

  o  I also run my smail, http, ftp and other daemons on the router
     machine so that it needs to be the only machine to provide others
     with facilities.

  o  The router machine is a lowly 386DX20 with a 20Mb harddrive and a
     very minimal linux configuration.


  21.2.  IPIP encapsulated gateway configuration.

  Linux is now very commonly used for TCP/IP encapsulated gateways
  around the world. The new tunnel driver supports multiple encapsulated
  routes and makes the older ipip daemon obsolete.

  A typical configuration would look similar to the following.



                                                 .      .   .    .    . .
         ---                                .
          | Network       /---------\     .    Network
          | 154.27.3/24   |         |    .     44.136.16/24       \ | /
          |               | Linux   |   .                          \|/
          |               |         |  .                            |
          |          eth0 | IPIP    |  .  /-----\    /----------\   |
       ---|---------------|         |-----| TNC |----| Radio    |---/
          |   154.27.3.20 | Gateway |  .  \-----/    \----------/
          |               |         | sl0
          |               |         | 44.136.16.1
          |               |         |    .
          |               |         |     .
          |               \_________/       .
         ---                                     .      .   .    .    . .



  The configuration files of interest are:



  # /etc/rc.net
  # This file is a simple configuration that provides one KISS AX.25
  # radio port, one Ethernet device, and utilises the kernel tunnel driver
  # to perform the IPIP encapsulation/decapsulation
  #
  echo "/etc/rc.net"
  echo "  Configuring:"
  #
  echo -n "    loopback:"
  /sbin/ifconfig lo 127.0.0.1
  /sbin/route add 127.0.0.1
  echo " done."
  #
  echo -n "    ethernet:"
  /sbin/ifconfig eth0 154.27.3.20 netmask 255.255.255.0 \
                  broadcast 154.27.3.255 up
  /sbin/route add 154.27.3.20 eth0
  /sbin/route add -net 154.27.3.0 netmask 255.255.255.0 eth0
  echo " done."
  #
  echo -n "    AX.25: "
  kissattach -i 44.136.16.1 -m 512 /dev/ttyS1 4800
  /sbin/ifconfig sl0 netmask 255.255.255.0 broadcast 44.136.16.255
  /sbin/route add -host 44.136.16.1 sl0
  /sbin/route add -net 44.136.16.0 netmask 255.255.255.0 window 1024 sl0
  #
  echo -n "    tunnel:"
  /sbin/ifconfig tunl0 44.136.16.1 mtu 512 up
  #
  echo done.
  #
  echo -n "Routing ... "
  source /etc/ipip.routes
  echo done.
  #
  # end.



  and:



       # /etc/ipip.routes
       # This file is generated using the munge script
       #
       /sbin/route add -net 44.134.8.0 netmask 255.255.255.0 tunl0 gw 134.43.26.1
       /sbin/route add -net 44.34.9.0 netmask 255.255.255.0 tunl0 gw 174.84.6.17
       /sbin/route add -net 44.13.28.0 netmask 255.255.255.0 tunl0 gw 212.37.126.3
          ...
          ...
          ...



  /etc/ax25/axports


       # name  callsign        speed   paclen  window  description
       4800    VK2KTJ-0        4800    256     2       144.800 MHz



  Some points to note here are:


  o  The new tunnel driver uses the gw field in the routing table in
     place of the pointopoint parameter to specify the address of the
     remote IPIP gateway. This is why it now supports multiple routes
     per interface.

  o  You can configure two network devices with the same address.  In
     this example both the sl0 and the tunl0 devices have been
     configured with the IP address of the radio port. This is done so
     that the remote gateway sees the correct address from your gateway
     in encapsulated datagrams sent to it.

  o  The route commands used to specify the encapsulated routes can be
     automatically generated by a modified version of the munge script.
     This is included below. The route commands would then be written to
     a separate file and read in using the bash source /etc/ipip.routes
     command (assuming you called the file with the routing commands
     /etc/ipip.routes) as illustrated. The source file must be in the
     NOS route command format.

  o  Note the use of the window argument on the route command. Setting
     this parameter to an appropriate value improves the performance of
     your radio link.


  The new tunnel-munge script:



  #!/bin/sh
  #
  # From: Ron Atkinson <n8fow@hamgate.cc.wayne.edu>
  #
  #  This script is basically the 'munge' script written by Bdale N3EUA
  #  for the IPIP daemon and is modified by Ron Atkinson N8FOW. It's
  #  purpose is to convert a KA9Q NOS format gateways route file
  #  (usually called 'encap.txt') into a Linux routing table format
  #  for the IP tunnel driver.
  #
  #        Usage: Gateway file on stdin, Linux route format file on stdout.
  #               eg.  tunnel-munge < encap.txt > ampr-routes
  #
  # NOTE: Before you use this script be sure to check or change the
  #       following items:
  #
  #     1) Change the 'Local routes' and 'Misc user routes' sections
  #        to routes that apply to your own area (remove mine please!)
  #     2) On the fgrep line be sure to change the IP address to YOUR
  #        gateway Internet address. Failure to do so will cause serious
  #        routing loops.
  #     3) The default interface name is 'tunl0'. Make sure this is
  #        correct for your system.

  echo "#"
  echo "# IP tunnel route table built by $LOGNAME on `date`"
  echo "# by tunnel-munge script v960307."
  echo "#"
  echo "# Local routes"
  echo "route add -net 44.xxx.xxx.xxx netmask 255.mmm.mmm.mmm dev sl0"
  echo "#"
  echo "# Misc user routes"
  echo "#"
  echo "# remote routes"

  fgrep encap | grep "^route" | grep -v " XXX.XXX.XXX.XXX" | \
  awk '{
          split($3, s, "/")
          split(s[1], n,".")
          if      (n[1] == "")        n[1]="0"
          if      (n[2] == "")        n[2]="0"
          if      (n[3] == "")        n[3]="0"
          if      (n[4] == "")        n[4]="0"
          if      (s[2] == "1")       mask="128.0.0.0"
          else if (s[2] == "2")       mask="192.0.0.0"
          else if (s[2] == "3")       mask="224.0.0.0"
          else if (s[2] == "4")       mask="240.0.0.0"
          else if (s[2] == "5")       mask="248.0.0.0"
          else if (s[2] == "6")       mask="252.0.0.0"
          else if (s[2] == "7")       mask="254.0.0.0"
          else if (s[2] == "8")       mask="255.0.0.0"
          else if (s[2] == "9")       mask="255.128.0.0"
          else if (s[2] == "10")      mask="255.192.0.0"
          else if (s[2] == "11")      mask="255.224.0.0"
          else if (s[2] == "12")      mask="255.240.0.0"
          else if (s[2] == "13")      mask="255.248.0.0"
          else if (s[2] == "14")      mask="255.252.0.0"
          else if (s[2] == "15")      mask="255.254.0.0"
          else if (s[2] == "16")      mask="255.255.0.0"
          else if (s[2] == "17")      mask="255.255.128.0"
          else if (s[2] == "18")      mask="255.255.192.0"
          else if (s[2] == "19")      mask="255.255.224.0"
          else if (s[2] == "20")      mask="255.255.240.0"
          else if (s[2] == "21")      mask="255.255.248.0"
          else if (s[2] == "22")      mask="255.255.252.0"
          else if (s[2] == "23")      mask="255.255.254.0"
          else if (s[2] == "24")      mask="255.255.255.0"
          else if (s[2] == "25")      mask="255.255.255.128"
          else if (s[2] == "26")      mask="255.255.255.192"
          else if (s[2] == "27")      mask="255.255.255.224"
          else if (s[2] == "28")      mask="255.255.255.240"
          else if (s[2] == "29")      mask="255.255.255.248"
          else if (s[2] == "30")      mask="255.255.255.252"
          else if (s[2] == "31")      mask="255.255.255.254"
          else                    mask="255.255.255.255"

  if (mask == "255.255.255.255")
          printf "route add -host %s.%s.%s.%s gw %s dev tunl0\n"\
                  ,n[1],n[2],n[3],n[4],$5
  else
          printf "route add -net %s.%s.%s.%s gw %s netmask %s dev tunl0\n"\
                  ,n[1],n[2],n[3],n[4],$5,mask
   }'

  echo "#"
  echo "# default the rest of amprnet via mirrorshades.ucsd.edu"
  echo "route add -net 44.0.0.0 gw 128.54.16.18 netmask 255.0.0.0 dev tunl0"
  echo "#"
  echo "# the end"



  21.3.  AXIP encapsulated gateway configuration

  Many Amateur Radio Internet gateways encapsulate AX.25, NetRom and
  Rose in addition to tcp/ip. Encapsulation of AX.25 frames within IP
  datagrams is described in RFC-1226 by Brian Kantor. Mike Westerhof
  wrote an implementation of an AX.25 encapsulation daemon for unix in
  1991. The ax25-utils package includes a marginally enhanced version of
  it for Linux.

  An AXIP encapsulation program accepts AX.25 frames at one end, looks
  at the destination AX.25 address to determine what IP address to send
  them to, encapsulates them in a tcp/ip datagram and then transmits
  them to the appropriate remote destination. It also accepts tcp/ip
  datagrams that contain AX.25 frames, unwraps them and processes them
  as if it had received them directly from an AX.25 port. To distinguish
  IP datagrams containing AX.25 frames from other IP datagrams which
  don't, AXIP datagrams are coded with a protocol id of 4 (or 94 which
  is now deprecated). This process is described in RFC-1226.

  The ax25ipd program included in the ax25-utils package presents itself
  as a program supporting a KISS interface across which you pass AX.25
  frames, and an interface into the tcp/ip protocols. It is configured
  with a single configuration file called /etc/ax25/ax25ipd.conf.


  21.3.1.  AXIP configuration options.

  The ax25ipd program has two major modes of operation. "digipeater"
  mode and "tnc" mode. In "tnc" mode the daemon is treated as though it
  were a kiss TNC, you pass KISS encapsulated frames to it and it will
  transmit them, this is the usual configuration. In "digipeater" mode,
  you treat the daemon as though it were an AX.25 digipeater. There are
  subtle differences between these modes.

  In the configuration file you configure "routes" or mappings between
  destination AX.25 callsigns and the IP addresses of the hosts that you
  want to send the AX.25 packets too. Each route has options which will
  be explained later.
  Other options that are configured here are

  the tty that the ax25ipd daemon will open and its speed (usually one
  end of a pipe)

  what callsign you want to use in "digipeater" mode

  beacon interval and text

  whether you want to encapsulate the AX.25 frames in IP datagrams or in
  UDP/IP datagrams. Nearly all AXIP gateways use IP encapsulation, but
  some gateways are behind firewalls that will not allow IP with the
  AXIP protocol id to pass and are forced to use UDP/IP. Whatever you
  choose must match what the tcp/ip host at the other end of the link is
  using.


  21.3.2.  A typical /etc/ax25/ax25ipd.conf  file.



  #
  # ax25ipd configuration file for station floyd.vk5xxx.ampr.org
  #
  # Select axip transport. 'ip' is what you want for compatibility
  # with most other gateways.
  #
  socket ip
  #
  # Set ax25ipd mode of operation. (digi or tnc)
  #
  mode tnc
  #
  # If you selected digi, you must define a callsign.  If you selected
  # tnc mode, the callsign is currently optional, but this may change
  # in the future! (2 calls if using dual port kiss)
  #
  #mycall vk5xxx-4
  #mycall2 vk5xxx-5
  #
  # In digi mode, you may use an alias. (2 for dual port)
  #
  #myalias svwdns
  #myalias2 svwdn2
  #
  # Send an ident every 540 seconds ...
  #
  #beacon after 540
  #btext ax25ip -- tncmode rob/vk5xxx -- Experimental AXIP gateway
  #
  # Serial port, or pipe connected to a kissattach in my case
  #
  device /dev/ttyq0
  #
  # Set the device speed
  #
  speed 9600
  #
  # loglevel 0 - no output
  # loglevel 1 - config info only
  # loglevel 2 - major events and errors
  # loglevel 3 - major events, errors, and AX25 frame trace
  # loglevel 4 - all events
  # log 0 for the moment, syslog not working yet ...
  #
  loglevel 2
  #
  # If we are in digi mode, we might have a real tnc here, so use param to
  # set the tnc parameters ...
  #
  #param 1 20
  #
  # Broadcast Address definition. Any of the addresses listed will be forwarded
  # to any of the routes flagged as broadcast capable routes.
  #
  broadcast QST-0 NODES-0
  #
  # ax.25 route definition, define as many as you need.
  # format is route (call/wildcard) (ip host at destination)
  # ssid of 0 routes all ssid's
  #
  # route <destcall> <destaddr> [flags]
  #
  # Valid flags are:
  #         b  - allow broadcasts to be transmitted via this route
  #         d  - this route is the default route
  #
  route vk2sut-0 44.136.8.68 b
  route vk5xxx 44.136.188.221 b
  route vk2abc 44.1.1.1
  #
  #



  21.3.3.  Running ax25ipd


     Create your /etc/ax25/axports entry:


          # /etc/ax25/axports
          #
          axip    VK2KTJ-13       9600    256     AXIP port
          #



     Run the kissattach command to create that port:


          /usr/sbin/kissattach /dev/ptyq0 axip



     Run the ax25ipd program:


          /usr/sbin/ax25ipd &



     Test the AXIP link:


          call axip vk5xxx



  21.3.4.  Some notes about the routes and route flags

  The "route" command is where you specify where you want your AX.25
  packets encapsulated and sent to. When the ax25ipd daemon receives a
  packet from its interface, it compares the destination callsign with
  each of the callsigns in its routing table. If if finds a match then
  the ax.25 packet is encapsulated in an IP datagram and then
  transmitted to the host at the specified IP address.

  There are two flags you can add to any of the route commands in the
  ax25ipd.conf file. The two flags are:

     b  traffic with a destination address matching any of those on the
        list defined by the "broadcast" keyword should be transmitted
        via this route.

     d  any packets not matching any route should be transmitted via
        this route.

  The broadcast flag is very useful, as it enables informations that is
  normally destined for all stations to a number of AXIP destinations.
  Normally axip routes are point-to-point and unable to handle
  'broadcast' packets.


  21.4.  Linking NOS and Linux using a pipe device

  Many people like to run some version of NOS under Linux because it has
  all of the features and facilities they are used to. Most of those
  people would also like to have the NOS running on their machine
  capable of talking to the Linux kernel so that they can offer some of
  the linux capabilities to radio users via NOS.

  Brandon S. Allbery, KF8NH, contributed the following information to
  explain how to interconnect the NOS running on a Linux machine with
  the kernel code using the Linux pipe device.

  Since both Linux and NOS support the slip protocol it is possible to
  link the two together by creating a slip link. You could do this by
  using two serial ports with a loopback cable between them, but this
  would be slow and costly. Linux provides a feature that many other
  Unix-like operating systems provide called `pipes'. These are special
  pseudo devices that look like a standard tty device to software but in
  fact loopback to another pipe device. To use these pipes the first
  program must open the master end of the pipe, and the open then the
  second program can open the slave end of the pipe. When both ends are
  open the programs can communicate with each other simply by writing
  characters to the pipes in the way they would if they were terminal
  devices.

  To use this feature to connect the Linux Kernel and a copy of NOS, or
  some other program you first must choose a pipe device to use. You can
  find one by looking in your /dev directory. The master end of the
  pipes are named: ptyq[1-f] and the slave end of the pipes are known
  as: ttyq[1-f]. Remember they come in pairs, so if you select
  /dev/ptyqf as your master end then you must use /dev/ttyqf as the
  slave end.

  Once you have chosen a pipe device pair to use you should allocate the
  master end to you linux kernel and the slave end to the NOS program,
  as the Linux kernel starts first and the master end of the pipe must
  be opened first.  You must also remember that your Linux kernel must
  have a different IP address to your NOS, so you will need to allocate
  a unique address for it if you haven't already.

  You configure the pipe just as if it were a serial device, so to
  create the slip link from your linux kernel you can use commands
  similar to the following:



       # /sbin/slattach -s 38400 -p slip /dev/ptyqf &
       # /sbin/ifconfig sl0 broadcast 44.255.255.255 pointopoint 44.70.248.67 /
               mtu 1536 44.70.4.88
       # /sbin/route add 44.70.248.67 sl0
       # /sbin/route add -net 44.0.0.0 netmask 255.0.0.0 gw 44.70.248.67



  In this example the Linux kernel has been given IP address 44.70.4.88
  and the NOS program is using IP address 44.70.248.67. The route
  command in the last line simply tells your linux kernel to route all
  datagrams for the amprnet via the slip link created by the slattach
  command. Normally you would put these commands into your
  /etc/rc.d/rc.inet2 file after all your other network configuration is
  complete so that the slip link is created automatically when you
  reboot.  Note: there is no advantage in using cslip instead of slip as
  it actually reduces performance because the link is only a virtual one
  and occurs fast enough that having to compress the headers first takes
  longer than transmitting the uncompressed datagram.

  To configure the NOS end of the link you could try the following:



       # you can call the interface anything you want; I use "linux" for convenience.
       attach asy ttyqf - slip linux 1024 1024 38400
       route addprivate 44.70.4.88 linux



  These commands will create a slip port named `linux' via the slave end
  of the pipe device pair to your linux kernel, and a route to it to
  make it work. When you have started NOS you should be able to ping and
  telnet to your NOS from your Linux machine and vice versa. If not,
  double check that you have made no mistakes especially that you have
  the addresses configured properly and have the pipe devices around the
  right way.



  22.  Where do I find more information about .... ?

  Since this document assumes you already have some experience with
  packet radio and that this might not be the case I've collected a set
  of references to other information that you might find useful.



  22.1.  Packet Radio

  You can get general information about Packet Radio from these sites:

  American Radio Relay League <http://www.arrl.org/>,

  Radio Amateur Teleprinter Society <http://www.rats.org/>

  Tucson Amateur Packet Radio Group <http://www.tapr.org/>



  22.2.  Protocol Documentation


  AX.25, NetRom - Jonathon Naylor has collated a variety of documents
  that relate to the packet radio protocols themselves. This
  documentation has been packaged up into ax25-doc-1.0.tar.gz
  <ftp://ftp.pspt.fi/pub/ham/linux/ax25/ax25-doc-1.0.tar.gz>



  22.3.  Hardware Documentation


  Information on the PI2 Card is provided by the Ottawa Packet Radio
  Group <http://hydra.carleton.ca/>.

  Information on Baycom hardware is available at the Baycom Web Page
  <http://www.baycom.de/>.


  23.  Discussion relating to Amateur Radio and Linux.

  There are various places that discussion relating to Amateur Radio and
  Linux take place. They take place in the comp.os.linux.* newsgroups,
  they also take place on the HAMS list on vger.rutgers.edu. Other
  places where they are held include the tcp-group mailing list at
  ucsd.edu (the home of amateur radio TCP/IP discussions), and you might
  also try the #linpeople channel on the linuxnet irc network.

  To join the Linux linux-hams channel on the mail list server, send
  mail to:


       Majordomo@vger.rutgers.edu



  with the line:


       subscribe linux-hams



  in the message body. The subject line is ignored.

  The linux-hams mailing list is archived at:

  zone.pspt.fi <http://zone.pspt.fi/archive/linux-hams/> and
  zone.oh7rba.ampr.org <http://zone.oh7rba.ampr.org/archive/linux-
  hams/>.  Please use the archives when you are first starting, because
  many common questions are answered there.


  To join the tcp-group send mail to:


       listserver@ucsd.edu



  with the line:


       subscribe tcp-group



  in the body of the text.

  Note: Please remember that the tcp-group is primarily for discussion
  of the use of advanced protocols, of which TCP/IP is one, in Amateur
  Radio. Linux specific questions should not ordinarily go there.


  24.  Acknowledgements.

  The following people have contributed to this document in one way or
  another, knowingly or unknowingly. In no particular order (as I find
  them): Jonathon Naylor, Thomas Sailer, Joerg Reuter, Ron Atkinson,
  Alan Cox, Craig Small, John Tanner, Brandon Allbery, Hans Alblas,
  Klaus Kudielka, Carl Makin.


  25.  Copyright.

  The AX25-HOWTO, information on how to install and configure some of
  the more important packages providing AX25 support for Linux.
  Copyright (c) 1996 Terry Dawson.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the:

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.



  Linux Access HOWTO
  Michael De La Rue,  <access-howto@ed.ac.uk>
  v2.11, 28 March 1997

  The Linux Access HOWTO covers the use of adaptive technology with
  Linux, In particular, using adaptive technology to make Linux accessi-
  ble to those who could not use it otherwise.  It also covers areas
  where Linux can be used within more general adaptive technology solu-
  tions.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Distribution Policy

  2. Comparing Linux with other Operating Systems

     2.1 General Comparison
     2.2 Availability of Adaptive Technology
     2.3 Inherent Usability

  3. Visually Impaired

     3.1 Seeing the Screen with Low Vision
        3.1.1 SVGATextMode
        3.1.2 X Window System
           3.1.2.1 Different Screen Resolutions
           3.1.2.2 Screen Magnification
           3.1.2.3 Change Screen Font
           3.1.2.4 Cross Hair Cursors etc..
        3.1.3 Audio
        3.1.4 Producing Large Print
           3.1.4.1 LaTeX / TeX
        3.1.5 Outputting Large Text
     3.2 Aids for Those Who Can't Use Visual Output
        3.2.1 Braille Terminals
        3.2.2 Speech Synthesis
        3.2.3 Handling Console Output
        3.2.4 Optical Character Recognition
     3.3 Beginning to Learn Linux
     3.4 Braille Embossing

  4. Hearing Problems

     4.1 Visual Bells

  5. Physical Problems

     5.1 Unable to Use a Mouse/Pointer
        5.1.1 Unable to Use a Keyboard
           5.1.1.1 Other Input Hardware (X Windows System only)
        5.1.2 Controlling Physical Hardware From Linux
     5.2 Speech Recognition
     5.3 Making the Keyboard Behave
        5.3.1 X Window System.
        5.3.2 Getting Rid of Auto Repeat
        5.3.3 Macros / Much input, few key presses
        5.3.4 Sticky Keys

  6. General Programming Issues

     6.1 Try to Make it Easy to Provide Multiple Interfaces
     6.2 Make software configurable.
     6.3 Test the Software on Users.
     6.4 Make Output Distinct
     6.5 Licenses

  7. Other Information

     7.1 Linux Documentation
        7.1.1 The Linux Info Sheet
        7.1.2 The Linux Meta FAQ
        7.1.3 The Linux Software Map
        7.1.4 The Linux HOWTO documents
        7.1.5 The Linux FAQ
     7.2 Mailing Lists
        7.2.1 The Linux Access List
        7.2.2 The Linux Blind List
     7.3 WWW References
     7.4 Suppliers
     7.5 Manufacturers
        7.5.1 Alphavision
           7.5.1.1 Linux Supported Alphavision AT Products
        7.5.2 Blazie Engineering
           7.5.2.1 Blazie AT Products
        7.5.3 Digital Equipment Corporation
           7.5.3.1 Linux Supported DEC AT Products
        7.5.4 Kommunikations-Technik Stolper GmbH
           7.5.4.1 Linux Supported KTG AT Products

  8. Software Packages

     8.1 Emacspeak
     8.2 BRLTTY
     8.3 Screen
     8.4 Rsynth
     8.5 xocr
     8.6 xzoom
     8.7 NFBtrans
        8.7.1 Compiling NFBtrans on Linux
     8.8 UnWindows
        8.8.1 dynamag
        8.8.2 coloreyes
        8.8.3 border
        8.8.4 un-twm

  9. Hardware

     9.1 Braille terminals driven from Screen Memory
        9.1.1 Braillex
        9.1.2 Brailloterm
        9.1.3 Patching the Kernel for Braillex and Brailloterm
     9.2 Software Driven Braille Terminals
        9.2.1 Tieman B.V.
           9.2.1.1 CombiBraille
        9.2.2 Alva B.V.
        9.2.3 Telesensory Systems Inc. displays
           9.2.3.1 Powerbraille
           9.2.3.2 Navigator
        9.2.4 Braille Lite
     9.3 Speech Synthesisers
        9.3.1 DECTalk Express
        9.3.2 Accent SA
        9.3.3 SPO256-AL2 Speak and Spell chip.

  10. Acknowledgements



  ______________________________________________________________________

  1.  Introduction

  The aim of this document is to serve as an introduction to the
  technologies which are available to make Linux usable by people who,
  through some disability would otherwise have problems with it.  In
  other words the target groups of the technologies are, the blind, the
  partially sighted, deaf and the physically disabled.  As any other
  technologies or pieces of information are discovered they will be
  added.



  The information here not just for these people (although that is
  probably the main aim) but also to allow developers of Linux to become
  aware of the difficulties involved here.  Possibly the biggest problem
  is that, right now, very few of the developers of Linux are aware of
  the issues and various simple ways to make life simpler for
  implementors of these systems.  This has, however, changed noticeably
  since the introduction of this document, and at least to a small
  extent because of this document, but also to a large extent due to the
  work of some dedicated developers, many of whom are mentioned in the
  document's Acknowledgements.


  Please send any comments or extra information or offers of assistance
  to <access-howto@ed.ac.uk> This address might become a mailing list in
  future, or be automatically handed over to a future maintainer of the
  HOWTO, so please don't use it for personal email.

  I don't have time to follow developments in all areas.  I probably
  won't even read a mail until I have time to update this document.
  It's still gratefully received.  If a mail is sent to the blind-list
  or the access-list, I will eventually read it and put any useful
  information into the document.  Otherwise, please send a copy of
  anything interesting to the above email address.


  Normal mail can be sent to



       Linux Access HOWTO
       23 Kingsborough Gardens
       Glasgow G12 9NH
       Scotland
       U.K.



  And will gradually make its way round the world to me.  Email will be
  faster by weeks.



  I can be personally contacted using <miked@ed.ac.uk>.  Since I use
  mail filtering on all mail I receive, please use the other address
  except for personal email.  This is most likely to lead to an
  appropriate response.


  1.1.  Distribution Policy


       The ACCESS-HOWTO is copyrighted (c) 1996 Michael De La Rue



       The ACCESS-HOWTO may be distributed, at your choice, under either the
       terms of the GNU Public License version 2 or later or the standard
       Linux Documentation project terms.  These licenses should be available
       from where you got this document.  Please note that since the LDP
       terms don't allow modification (other than translation), modified ver-
       sions can be assumed to be distributed under the GPL.



  2.  Comparing Linux with other Operating Systems

  2.1.  General Comparison

  The best place to find out about this is in such documents as the
  `Linux Info Sheet', `Linux Meta FAQ' and `Linux FAQ' (see ``Linux
  Documentation'').  Major reasons for a visually impaired person to use
  Linux would include it's inbuilt networking which gives full access to
  the Internet.  More generally, users are attracted by the full
  development environment included.  Also, unlike most other modern GUI
  environments, the graphical front end to Linux (X Windows) is clearly
  separated from the underlying environment and there is a complete set
  of modern programs such as World Wide Web browsers and fax software
  which work directly in the non graphical environment.  This opens up
  the way to provide alternative access paths to the systems
  functionality; Emacspeak is a good example.

  For other users, the comparison is probably less favourable and less
  clear.  People with very specific and complex needs will find that the
  full development system included allows properly customised solutions.
  However, much of the software which exists on other systems is only
  just beginning to become available.  More development is being done
  however in almost all directions.


  2.2.  Availability of Adaptive Technology

  There is almost nothing commercial available specifically for Linux.
  There is a noticeable amount of free software which would be helpful
  in adaptation, for example, a free speech synthesiser and some free
  voice control software.  There are also a number of free packages
  which provide good support for certain Braille terminals, for example.


  2.3.  Inherent Usability

  Linux has the vast advantage over Windows that most of it's software
  is command line oriented.  This is now changing and almost everything
  is now available with a graphical front end.  However, because it is
  in origin a programmers operating system, line oriented programs are
  still being written covering almost all new areas of interest.  For
  the physically disabled, this means that it is easy to build custom
  programs to suit their needs.  For the visually impaired, this should
  make use with a speech synthesiser or Braille terminal easy and useful
  for the foreseeable future.


  Linux's multiple virtual consoles system make it practical to use as a
  multi-tasking operating system by a visually impaired person working
  directly through Braille.


  The windowing system used by Linux (X11) comes with many programming
  tools, and should be adaptable.  However, in practice, the adaptive
  programs available up till now have been more primitive than those on
  the Macintosh or Windows.  They are, however, completely free (as
  opposed to hundreds of pounds) and the quality is definitely
  improving.


  In principle it should be possible to put together a complete, usable
  Linux system for a visually impaired person for about $500 (cheap &
  nasty PC + sound card).  This compares with many thousands of dollars
  for other operating systems (screen reader software/ speech
  synthesiser hardware).  I have yet to see this.  I doubt it would work
  in practice because the software speech synthesisers available for
  Linux aren't yet sufficiently good.  For a physically disabled person,
  the limitation will still be the expense of input hardware.


  3.  Visually Impaired

  I'll use two general categories here.  People who are partially
  sighted and need help seeing / deciphering / following the text and
  those who are unable to use any visual interface whatsoever.


  3.1.  Seeing the Screen with Low Vision

  There are many different problems here.  Often magnification can be
  helpful, but that's not the full story.  Sometimes people can't track
  motion, sometimes people can't find the cursor unless it moves.  This
  calls for a range of techniques, the majority of which are only just
  being added to X.


  3.1.1.  SVGATextMode

  This program is useful for improving the visibility of the normal text
  screen that Linux provides.  The normal screen that Linux provides
  shows 80 characters across by 25 vertically.  This can be changed (and
  the quality of those characters improved) using SVGATextMode.  The
  program allows full access to the possible modes of an SVGA graphics
  card.  For example, the text can be made larger so that only 50 by 15
  characters appear on the screen.  There isn't any easy way to zoom in
  on sections of a screen, but you can resize when needed.


  3.1.2.  X Window System

  For people who can see the screen there are a large number of ways of
  improving X.  They don't add up to a coherent set of features yet, but
  if set up correctly could solve many problems.


  3.1.2.1.  Different Screen Resolutions

  The X server can be set up with many different resolutions.  A single
  key press can then change between them allowing difficult to read text
  to be seen.

  In the file /etc/XF86Config, you have an entry in the Screen section
  with a line beginning with modes.  If, for example, you set this to


       Modes       "1280x1024" "1024x768" "800x600" "640x480" "320x240"



  with each mode set up correctly (which requires a reasonably good mon-
  itor for the highest resolution mode), you will be able to have four
  times screen magnification, switching between the different levels
  using

  Ctrl+Alt+Keypad-Plus and Ctrl+Alt+Keypad-Minus


  Moving the mouse around the screen will scroll you to different parts
  of the screen.  For more details on how to set this up you should see
  the documentation which comes with the XFree86 X server.

  3.1.2.2.  Screen Magnification

  There are several known screen magnification programs, xmag which will
  magnify a portion of the screen as much as needed but is very
  primitive.  Another one is xzoom.  Previously I said that there had to
  be something better than xmag, well this is it.  See section
  ``xzoom''.

  Another program which is available is puff.  This is specifically
  oriented towards visually impaired users.  It provides such features
  as a box around the pointer which makes it easier to locate.  Other
  interesting features of puff are that, if correctly set up, it is able
  to select and magnify portions of the screen as they are updated.
  However, there seem to be interacations between xpuff and the window
  manager which could make it difficult to use.  When used with my fvwm
  setup, it didn't respond at all to key presses.  However using twm
  improved the situation.

  The final program which I have seen working is dynamag.  This again
  has some specific advantages such as the ability to select a specific
  area of the screen and monitor it, refreshing the magnified display at
  regular intervals between a few tenths of a second at twenty seconds.
  dynamag is part of the UnWindows distribution.  See ``UnWindows'' for
  more details.



  3.1.2.3.  Change Screen Font

  The screen fonts all properly written X software should be changeable.
  You can simply make it big enough for you to read.  This is generally
  accomplished by putting a line the file .Xdefaults which should be in
  your home directory.  By putting the correct lines in this you can
  change the fonts of your programs, for example


  Emacs.font: -sony-fixed-medium-r-normal--16-150-75-75-c-80-iso8859-*



  To see what fonts are available, use the program xfontsel under X.

  There should be some way of changing things at a more fundamental
  level so that everything comes out with a magnified font.  This could
  be done by renaming fonts, and by telling telling font generating
  programs to use a different level of scaling.  If someone gets this to
  work properly, please send me the details of how you did it.


  3.1.2.4.  Cross Hair Cursors etc..

  For people that have problems following cursors there are many things
  which can help;


  o  cross-hair cursors (horizontal and vertical lines from the edge of
     the screen)

  o  flashing cursors (flashes when you press a key)


  No software I know of specifically provides a cross hair cursor.
  puff, mentioned in the previous section does however provide a
  flashing box around the cursor which can make it considerably easier
  to locate.

  For now the best that can be done is to change the cursor bitmap.
  Make a bitmap file as you want it, and another one which is the same
  size, but completely black.  Convert them to the XBM format and run


          xsetroot -cursor cursorfile.xbm black-file.xbm



  actually, if you understand masks, then the black-file doesn't have to
  be completely black, but start with it like that.  The .Xdefaults file
  controls cursors used by actual applications.  For much more
  information, please see the X Big Cursor mini-HOWTO, by Joerg
  Schneider <schneid@ira.uka.de>.


  3.1.3.  Audio

  Provided that the user can hear, audio input can be very useful for
  making a more friendly and communicative computing environment.  For a
  person with low vision, audio clues can be used to help locate the
  pointer (see ``UnWindows'').  For a console mode user using Emacspeak
  (see ``Emacspeak''), the audio icons available will provide very many
  useful facilities.

  Setting up Linux audio is covered in the Linux Sound HOWTO (see
  ``Linux Documentation'').  Once sound is set up, sounds can be played
  with the play command which is included with most versions of Linux.
  This is the way to use my version of UnWindows.


  3.1.4.  Producing Large Print

  Using large print with Linux is quite easy.  There are several
  techniques.


  3.1.4.1.  LaTeX / TeX

  LaTeX is an extremely powerful document preparation system.  It may be
  used to produce large print documents of almost any nature.  Though
  somewhat complicated to learn, many documents are produced using LaTeX
  or the underlying typesetting program, TeX.



  this will produce some reasonably large text



       \font\magnifiedtenrm=cmr10 at 20pt  % setup a big font
       \magnifiedtenrm
       this is some large text
       \bye



  For more details, see the LaTeX book which is available in any
  computer book shop.  There are also a large number of introductions
  available on the internet.



  3.1.5.  Outputting Large Text

  Almost all Linux printing uses postscript, and Linux can drive almost
  any printer using it.  I output large text teaching materials using a
  standard Epson dot matrix printer.

  For users of X, there are various tools available which can produce
  large Text.  These include LyX, and many commercial word processors.


  3.2.  Aids for Those Who Can't Use Visual Output

  For someone who is completely unable to use a normal screen there are
  two alternatives Braille and Speech.  Obviously for people who also
  have hearing loss, speech isn't always useful, so Braille will always
  be important.

  If you can choose, which should you choose?  This is a matter of
  `vigorous' debate.  Speech is rapid to use, reasonably cheap and
  especially good for textual applications (e.g. reading a long document
  like this one).  Problems include needing a quiet environment,
  possibly needing headphones to work without disturbing others and
  avoid being listened in on by them (not available for all speech
  synthesisers).

  Braille is better for applications where precise layout is important
  (e.g. spreadsheets).  Also can be somewhat more convenient if you want
  to check the beginning of a sentence when you get to the end.  Braille
  is, however, much more expensive and slower for reading text.
  Obviously, the more you use Braille, the faster you get.  Grade II
  Braille is difficult to learn, but is almost certainly worth it since
  it is much faster.  This means that if you don't use Braille for a
  fair while you can never discover its full potential and decide for
  yourself. Anyway, enough said on this somewhat controversial topic.

  based on original by James Bowden <jrbowden@bcs.org.uk>


  3.2.1.  Braille Terminals

  Braille terminals are normally a line or two of Braille.  Since these
  are at most 80 characters wide and normally 40 wide, they are somewhat
  limited.  I know of two kinds


  o  Hardware driven Braille terminals.

  o  Software driven Braille terminals.


  The first kind works only when the computer is in text mode and reads
  the screen memory directly. See section ``hardware driven Braille
  terminals''.


  The second kind of Braille terminal is similar, in many ways, to a
  normal terminal screen of the kind Linux supports automatically.
  Unfortunately, they need special software to make them usable.


  There are two packages which help with these.  The first, BRLTTY,
  works with several Braille display types and the authors are keen to
  support more as information becomes available.  Currently BRLTTY
  supports Tieman B.V.'s CombiBraille series, Alva B.V.'s ABT3 series
  and Telesensory Systems Inc.'s PowerBraille and Navigator series
  displays.  The use of Blazie Engineering's Braille Lite as a Braille
  display is discouraged, but support may be renewed on demand.  See
  section ``Software Braille Terminals''.


  The other package I am aware of is Braille Enhanced Screen.  This is
  designed to work on other UNIX systems as well as Linux.  This should
  allow user access to a Braille terminal with many useful features such
  as the ability to run different programs in different `virtual
  terminals' at the same time.


  3.2.2.  Speech Synthesis

  Speech Synthesisers take (normally) ASCII text and convert it into
  actual spoken output.  It is possible to have these implemented as
  either hardware or software.  Unfortunately, the free Linux speech
  synthesisers are, reportedly, not good enough to use as a sole means
  of output.


  Hardware speech synthesisers are the alternative.  The main one that I
  know of that works is DECtalk from Digital, driven by emacspeak.
  However, at this time (March 1997) a driver for the Doubletalk
  synthesiser has been announced.  Using emacspeak full access to all of
  the facilities of Linux is fairly easy.  This includes the normal use
  of the shell, a world wide web browser and many other similar
  features, such as email.  Although, it only acts as a plain text
  reader (similar to IBM's one for the PC) when controling programs it
  doesn't understand, with those that it does, it can provide much more
  sophisticated control.  See section ``Emacspeak'' for more information
  about emacspeak.


  3.2.3.  Handling Console Output

  When it starts up, Linux at present puts all of its messages straight
  to the normal (visual) screen.  This could be changed if anyone with a
  basic level of kernel programming ability wants to do it.  This means
  that it is impossible for most Braille devices to get information
  about what Linux is doing before the operating system is completely
  working.


  It is only at that stage that you can start the program that you need
  for access.  If the BRLTTY program is used and run very early in the
  boot process, then from this stage on the messages on the screen can
  be read.  Most hardware and software will still have to wait until the
  system is completely ready.  This makes administering a Linux system
  difficult, but not impossible for a visually impaired person.  Once
  the system is ready however, you can scroll back by pressing (on the
  default keyboard layout) Shift-PageUP.


  There is one Braille system that can use the console directly, called
  the Braillex.  This is designed to read directly from the screen
  memory.  Unfortunately the normal scrolling of the terminal gets in
  the way of this.  If you are using a Kernel newer than 1.3.75, just
  type linux no-scroll at the LILO prompt or configure LILO to do this
  automatically. If you have an earlier version of Linux, see section
  ``Screen Memory Braille Terminals''


  The other known useful thing to do is to use sounds to say when each
  stage of the boot process has been reached. (T.V. Raman suggestion)


  3.2.4.  Optical Character Recognition

  There is a free Optical Character Recognition (OCR) program for Linux
  called xocr.  In principle, if it is good enough, this program would
  allow visually impaired people to read normal books to some extent
  (accuracy of OCR is never high enough..).  However, according to the
  documentation, this program needs training to recognise the particular
  font that it is going to use and I have no idea how good it is since I
  don't have the hardware to test it.


  3.3.  Beginning to Learn Linux

  Beginning to learn Linux can seem difficult and daunting for someone
  who is either coming from no computing background or from a pure DOS
  background.  Doing the following things may help:


  o  Learn to use Linux (or UNIX) on someone else's system before
     setting up your own.

  o  Initially control Linux from your own known speaking/Braille
     terminal.  If you plan to use speech, you may want to learn emacs
     now.  You can learn it as you go along though.  See below

  o  If you come from an MS-DOS background, read the DOS2Linux Mini
     HOWTO for help with converting (see ``The Linux HOWTO Documents'').

  The Emacspeak HOWTO written by Jim Van Zandt (<jrv@vanzandt.mv.com>)
  covers this in much more detail (see ``The Linux HOWTO Documents'').


  If you are planning to use Emacspeak, you should know that Emacspeak
  does not attempt to teach Emacs, so in this sense, prior knowledge of
  Emacs would always be useful.  This said, you certainly do not need to
  know much about Emacs to start using Emacspeak.  In fact, once
  Emacspeak is installed and running, it provides a fluent interface to
  the rich set of online documentation including the info pages, and
  makes learning what you need a lot easier.

  "In summary: starting to use Emacspeak takes little learning.  Getting
  the full mileage out of Emacs and Emacspeak, especially if you intend
  using it as a replacement for X Windows as I do does involve
  eventually becoming familiar with a lot of the Emacs extensions; but
  this is an incremental process and does not need to be done in a day."
  - T.V.Raman

  One other option which may be interesting are the RNIB training tapes
  which include one covering UNIX.  These can be got from



       RNIB
       Customer Services
       PO Box 173
       Peterborough
       Cambridgeshire PE2 6WS
       Tel: 01345 023153 (probably only works in UK)



  3.4.  Braille Embossing

  Linux should be the perfect platform to drive a Braille embosser from.
  There are many formatting tools which are aimed specifically at the
  fixed width device.  A Braille embosser can just be connected to the
  serial port using the standard Linux printing mechanisms.  For more
  info see the Linux Printing HOWTO.


  There is a free software package which acts as a multi-lingual grade
  two translator available for Linux from the American ``National
  Federation for the Blind''.  This is called NFBtrans.  See section
  ``NFB translator'' for more details.


  4.  Hearing Problems

  For the most part there is little problem using a computer for people
  with hearing problems.  Almost all of the output is visual.  There are
  some situations where sound output is used though.  For these, the
  problem can sometimes be worked round by using visual output instead.


  4.1.  Visual Bells

  By tradition, computers go `beep' when some program sends them a
  special code.  This is generally used to get attention to the program
  and for little else.  Most of the time, it's possible to replace this
  by making the entire screen (or terminal emulator) flash.  How to do
  this is very variable though.



     xterm (under X)
        for xterm, you can either change the setting by pressing the
        middle mouse button while holding down the control key, or by
        putting a line with just `XTerm*visualBell: true' (not the
        quotes of course) in the file .Xdefaults in your home directory.


     the console (otherwise)
        The console is slightly more complex.  Please see Alessandro
        Rubini's Visual Bell mini HOWTO for details on this.  Available
        along with all the other Linux documentation (see section
        ``other Linux documents'').  Mostly the configuration has to be
        done on a per application basis, or by changing the Linux Kernel
        its self.



  5.  Physical Problems

  Many of these problems have to be handled individually.  The needs of
  the individual, the ways that they can generate input and other
  factors vary so much that all that this HOWTO can provide is a general
  set of pointers to useful software and expertise.


  5.1.  Unable to Use a Mouse/Pointer

  Limited mobility can make it difficult to use a mouse.  For some
  people a tracker ball can be a very good solution, but for others the
  only possible input device is a keyboard (or even something which
  simulates a keyboard).  For normal use of Linux this shouldn't be a
  problem (but see the section ``Making the keyboard behave''), but for
  users of X, this may cause major problems under some circumstances.
  Fortunately, the fvwm window manager has been designed for use without
  a pointer and most things can be done using this.  I actually do this
  myself when I lose my mouse (don't ask) or want to just keep typing.
  fvwm is included with all distributions of Linux that I know of.
  Actually using other programs will depend on their ability to accept
  key presses.  Many X programs do this for all functions.  Many don't.
  I sticky mouse keys, which are supposedly present in the current
  release of X should make this easier.


  5.1.1.  Unable to Use a Keyboard

  People who are unable to use a keyboard normally can sometimes use one
  through a headstick or a mouthstick.  This calls for special setup of
  the keyboard.  Please see also the section ``Making the keyboard
  behave''.


  5.1.1.1.  Other Input Hardware (X Windows System only)

  For others, the keyboard cannot be used at all and only pointing
  devices are available.  In this case, no solution is available under
  the standard Linux Console and X will have to be used.  If the X-Input
  extension can be taught to use the device and the correct software for
  converting pointer input to characters can be found (I haven't seen it
  yet) then any pointing should be usable without a keyboard.

  There are a number of devices worth considering for such input such as
  touch screens and eye pointers.  Many of these will need a `device
  driver' written for them.  This is not terribly difficult if the
  documentation is available, but requires someone with good C
  programming skills.  Please see the Linux Kernel Hackers guide and
  other kernel reference materials for more information.  Once this is
  set up, it should be possible to use these devices like a normal
  mouse.


  5.1.2.  Controlling Physical Hardware From Linux

  The main group of interest here are the Linux Lab Project.  Generally,
  much GPIB (a standard interface to scientific equipment, also known as
  the IEEE bus) hardware can be controlled.  This potentially gives much
  potential for very ambitious accessibility projects.  As far as I know
  none have yet been attempted.



  5.2.  Speech Recognition

  Speech recognition is a very powerful tool for enabling computer use.
  There are two recognition systems that I know of for Linux, the first
  is ears which is described as ``recognition is not optimal.  But it is
  fine for playing and will be improved'', the second is AbbotDemo ``A
  speaker independent continuous speech recognition system'' which may
  well be more interesting, though isn't available for commercial use
  without prior arrangement.  See the Linux software map for details
  (see section ``other Linux documents'').


  5.3.  Making the Keyboard Behave

  5.3.1.  X Window System.

  The latest X server which comes with Linux can include many features
  which assist in input.  This includes such features as StickKeys,
  MouseKeys, RepeatKeys, BounceKeys, SlowKeys, and TimeOut.  These allow
  customisation of the keyboard to the needs of the user.  These are
  provided as part of the XKB> extension in versions of X after version
  6.1.  To find out your version and see whether you have the extension
  installed, you can try.


  xdpyinfo -queryExtensions



  5.3.2.  Getting Rid of Auto Repeat

  To turn off key repeat on the Linux console run this command (I think
  it has to be run once per console; a good place to run it would be in
  your login files, .profile or .login in your home directory).


  setterm -repeat off



  To get rid of auto repeat on any X server, you can use the command


  xset -r



  which you could put into the file which get runs when you start using
  X (often .xsession or .xinit under some setups)


  Both of these commands are worth looking at for more ways of changing
  behaviour of the console.


  5.3.3.  Macros / Much input, few key presses

  Often in situations such as this, the biggest problem is speed of
  input.  Here the most important thing to aim for is the most number of
  commands with the fewest key presses.  For users of the shell (bash /
  tcsh) you should look at the manual page, in particular command and
  filename completion (press the tab key and bash tries to guess what
  should come next).  For information on macros which provide sequences
  of commands for just one key press, have a look at the Keystroke
  HOWTO.


  5.3.4.  Sticky Keys

  Sticky keys are a feature that allow someone who can only reliably
  press one button at a time to use a keyboard with all of the various
  modifier keys such as shift and control.  These keys, instead of
  having to be held on at the same time as the other key instead become
  like the caps lock key and stay on while the other key is pressed.
  They may then either switch off or stay on for the next key depending
  on what is needed.  For information about how to set this up please
  see the Linux Keyboard HOWTO, especially section `I can use only one
  finger to type with' (section 15 in the version I have) for more
  information on this.  - Information from Toby Reed.



  6.  General Programming Issues

  Many of the issues worth taking into account are the same when writing
  software which is designed to be helpful for access as when trying to
  follow good design.


  6.1.  Try to Make it Easy to Provide Multiple Interfaces

  If your software is only usable through a graphical interface then it
  can be very hard to make it usable for someone who can't see.  If it's
  only usable through a line oriented interface, then someone who can't
  type will have difficulties.

  Provide keyboard shortcuts as well as the use of the normal X pointer
  (generally the mouse).  You can almost certainly rely on the user
  being able to generate key presses to your application.


  6.2.  Make software configurable.

  If it's easy to change fonts then people will be able to change to one
  they can read.  If the colour scheme can be changed then people who
  are colour blind will be more likely to be able to use it.  If fonts
  can be changed easily then the visually impaired will find your
  software more useful.


  6.3.  Test the Software on Users.

  If you have a number of people use your software, each with different
  access problems then they will be more likely to point up specific
  problems.  Obviously, this won't be practical for everybody, but you
  can always ask for feedback.


  6.4.  Make Output Distinct

  Where possible, make it clear what different parts of your program are
  what.  Format error messages in a specific way to identify them.
  Under X, make sure each pane of your window has a name so that any
  screen reader software can identify it.


  6.5.  Licenses

  Some software for Linux (though none of the key programs) has license
  like `not for commercial use'.  This could be quite bad for a person
  who starts using the software for their personal work and then
  possibly begins to be able to do work they otherwise couldn't with it.
  This could be something which frees them from financial and other
  dependence on others people.  Even if the author of the software is
  willing to make exceptions, it makes the user vulnerable both to
  changes of commercial conditions (some company buys up the rights) and
  to refusal from people they could work for (many companies are overly
  paranoid about licenses).  It is much better to avoid this kind of
  licensing where possible.  Protection from commercial abuse of
  software can be obtained through more specific licenses like the GNU
  Public License or Artistic License where needed.


  7.  Other Information



  7.1.  Linux Documentation

  The Linux documentation is critical to the use of Linux and most of
  the documents mentioned here should be included in recent versions of
  Linux, from any source I know of.

  If you want to get the documentation on the Internet, here are some
  example sites.  These should be mirrored at most of the major FTP
  sites in the world.


  o  ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/

  o  tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/

  o  sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/


  7.1.1.  The Linux Info Sheet

  A simple and effective explanation of what Linux is.  This is one of
  the things that you should hand over when you want to explain why you
  want Linux and what it is good for.

  The Linux Info Sheet is available on the World Wide Web from
  <http://sunsite.unc.edu/mdw/HOWTO/INFO-SHEET.html> and other mirrors.



  7.1.2.  The Linux Meta FAQ

  A list of other information resources, much more complete than this
  one.  The meta FAQ is available on the World Wide Web from
  <http://sunsite.unc.edu/mdw/HOWTO/META-FAQ.html> and other mirrors


  7.1.3.  The Linux Software Map

  The list of software available for Linux on the Internet.  Many of the
  packages listed here were found through this.  The LSM is available in
  a searchable form from <http://www.boutell.com/lsm/>.  It is also
  available in a single text file in all of the FTP sites mentioned in
  section ``Linux Documentation''.


  7.1.4.  The Linux HOWTO documents

  The HOWTO documents are the main documentation of Linux.  This Access
  HOWTO is an example of one.

  The home site for the Linux Documentation Project which produces this
  information is  <http://sunsite.unc.edu/mdw/linux.html>.  There are
  also many companies producing these in book form.  Contact a local
  Linux supplier for more details.

  The Linux HOWTO documents will be in the directory HOWTO in all of the
  FTP sites mentioned in section ``Linux Documentation''.


  7.1.5.  The Linux FAQ

  A list of `Frequently Asked Questions' with answers which should solve
  many common questions.  The FAQ list is available from
  <http://www.cl.cam.ac.uk/users/iwj10/linux-faq/> as well as all of the
  FTP sites mentioned in section ``Linux Documentation''.

  7.2.  Mailing Lists

  There are two lists that I know of covering these issues specifically
  for Linux.  There are also others which it is worth researching which
  cover computer use more generally.  Incidentally, if a mail is sent to
  these lists I will read it eventually and include any important
  information in the Access-HOWTO, so you don't need to send me a
  separate copy unless it's urgent in some way.


  7.2.1.  The Linux Access List

  This is a general list covering Linux access issues.  It is designed
  `to service the needs of users and developers of the Linux OS and
  software who are either disabled or want to help make Linux more
  accessible'.  To subscribe send email to
  <majordomo@ssv1.union.utah.edu> and in the BODY (not the subject) of
  the email message put:



       subscribe linux-access <your-email-address>



  7.2.2.  The Linux Blind List

  This is a mailing list covering Linux use for blind users.  There is
  also a list of important and useful software being gathered in the
  list's archive.  To subscribe send mail to <blinux-list-
  request@redhat.com> with the subject: help.  This list is now
  moderated.


  7.3.  WWW References

  The World Wide Web is, by it's nature, very rapidly changing.  If you
  are reading this document in an old version then some of these are
  likely to be out of date.  The original version that I maintain on the
  WWW shouldn't go more than a month or two out of date, so refer to
  that please.

  Linux Documentation is available from
  <http://sunsite.unc.edu/mdw/linux.html>

  Linux Access On the Web <http://www.tardis.ed.ac.uk/~mikedlr/access/>
  with all of the versions of the HOWTO in
  <http://www.tardis.ed.ac.uk/~mikedlr/access/HOWTO/>.  Preferably,
  however, download from one of the main Linux FTP sites.  If I get a
  vast amount of traffic I'll have to close down these pages and move
  them elsewhere.

  The BLINUX Documentation and Development Project
  <http://leb.net/blinux/>.  "The purpose of The BLINUX Documentation
  and Development Project is to serve as a catalyst which will both spur
  and speed the development of software and documentation which will
  enable the blind user to run his or her own Linux workstation."

  Emacspeak WWW page
  <http://cs.cornell.edu/home/raman/emacspeak/emacspeak.html>

  BRLTTY unofficial WWW page
  <http://www.sf.co.kr/t.linux/new/brltty.html>

  Yahoo (one of the most major Internet catalogues)
  <http://www.yahoo.com/Society_and_Culture/Disabilities/Adaptive_Technology/>

  The Linux Lab Project  <http://www.fu-berlin.de/~clausi/>.

  The BLYNX pages: Lynx Support Files Tailored For Blind and Visually
  Handicapped Users  <http://leb.net/blinux/blynx/>.


  7.4.  Suppliers

  This is a UK supplier for the Braillex.


  Alphavision Limited



  7.5.  Manufacturers

  7.5.1.  Alphavision

  I think that they are a manufacturer?  RNIB only lists them as a
  supplier, but others say they make the Braillex.


  Alphavision Ltd
  Seymour House
  Copyground Lane
  High Wycombe
  Bucks HP12 3HE
  England
  U.K.



     Phone
        +44 1494-530 555


  7.5.1.1.  Linux Supported Alphavision AT Products


  o  Braillex


  7.5.2.  Blazie Engineering

  The Braille Lite was supported in the original version of BRLTTY.
  That support has now been discontinued.  If you have one and want to
  use it with Linux then that may be possible by using this version of
  the software.


  Blazie Engineering
  105 East Jarrettsville Rd.
  Forest Hill, MD 21050
  U.S.A.



     Phone
        +1 (410) 893-9333

     FAX
        +1 (410) 836-5040

     BBS
        +1 (410) 893-8944

     E-Mail
        <info@blazie.com>

     WWW
        <http://www.blazie.com/>



  7.5.2.1.  Blazie AT Products


  o  Braille Lite (support discontinued)



  7.5.3.  Digital Equipment Corporation


  Digital Equipment Corporation
  P.O. Box CS2008
  Nashua
  NH 03061-2008
  U.S.A



     Order
        +1 800-722-9332

     Tech info
        +1 800-722-9332

     FAX
        +1 603-884-5597

     WWW
        <http://www.digital.com/>


  7.5.3.1.  Linux Supported DEC AT Products


  o  DECTalk Express


  7.5.4.  Kommunikations-Technik Stolper GmbH


  KTS Stolper GmbH
  Herzenhaldenweg 10
  73095 Albershausen
  Germany



     Phone
        +49 7161 37023

     Fax
        +49 7161 32632


  7.5.4.1.  Linux Supported KTG AT Products


  o  Brailloterm


  8.  Software Packages

  References in this section are taken directly from the Linux Software
  map which can be found in all standard places for Linux documentation
  and which lists almost all of the software available for Linux.


  8.1.  Emacspeak

  Emacspeak is the software side of a speech interface to Linux.  Any
  other character based program, such as a WWW browser, or telnet or
  another editor can potentially be used within emacspeak.  The main
  difference between it and normal screen reader software for such
  operating systems as DOS is that it also has a load more extra
  features.  It is based in the emacs text editor.

  A text editor is generally just a program which allows you to change
  the contents of a file, for example, adding new information to a
  letter.  Emacs is in fact far beyond a normal text editor, and so this
  package is much more useful than you might imagine.  You can run any
  other program from within emacs, getting any output it generates to
  appear in the emacs terminal emulator.

  The reason that emacs is a better environment for Emacspeak is that it
  can can understand the layout of the screen and can intelligently
  interpret the meaning of, for example, a calendar, which would just be
  a messy array of numbers otherwise.  The originator of the package
  manages to look after his own Linux machine entirely, doing all of the
  administration from within emacs.  He also uses it to control a wide
  variety of other machines and software directly from that machine.

  Emacspeak is included within the Debian Linux distribution and is
  included as contributed software within the Slakware distribution.
  This means that it is available on many of the CDROM distributions of
  Linux.  By the time this is published, the version included should be
  5 or better, but at present I only have version 4 available for
  examination.



  Begin3
  Title:          emacspeak - a speech output interface to Emacs
  Version:        4.0
  Entered-date:   30MAY96
  Description:    Emacspeak is the first full-fledged speech output
                  system that will allow someone who cannot see to work
                  directly on a UNIX system. (Until now, the only option
                  available to visually impaired users has been to use a
                  talking PC as a terminal.) Emacspeak is built on top
                  of Emacs. Once you start emacs with emacspeak loaded,
                  you get spoken feedback for everything you do. Your
                  mileage will vary depending on how well you can use
                  Emacs.  There is nothing that you cannot do inside
                  Emacs:-)
  Keywords:       handicap access visually impaired blind speech emacs
  Author:         raman@adobe.com (T. V. Raman)
  Maintained-by:  jrv@vanzandt.mv.com (Jim Van Zandt)
  Primary-site:   sunsite.unc.edu apps/sound/speech
                  124kB   emacspeak-4.0.tgz
  Alternate-site:
  Original-site:  http://www.cs.cornell.edu /pub/raman/emacspeak
                  123kB   emacspeak.tar.gz/Info/People/raman/emacspeak/emacspeak.tar.gz
  Platforms:      DECtalk Express or DEC Multivoice speech synthesizer,
                  GNU FSF Emacs 19 (version 19.23 or later) and TCLX
                  7.3B (Extended TCL).
  Copying-policy: GPL
  End



  8.2.  BRLTTY

  This is a program for running a serial port Braille terminal.  It has
  been widely tested and used, and supports a number of different kinds
  of hardware (see the Linux Software Map entry below).

  The maintainer is, Nikhil Nair <nn201@cus.cam.ac.uk>.  The other
  people working on it are Nicolas Pitre <nico@cam.org> and Stephane
  Doyon <doyons@jsp.umontreal.ca>.  Send any comments to all of them.

  The authors seem keen to get support in for more different devices, so
  if you have one you should consider contacting them.  They will almost
  certainly need programming information for the device, so if you can
  contact your manufacturer and get that they are much more likely to be
  able to help you.

  A brief feature list (from their README file) to get you interested


  o  Full implementation of the standard screen review facilities.

  o  A wide range of additional optional features, including blinking
     cursor and capital letters, screen freezing for leisurely review,
     attribute display to locate highlighted text, hypertext links, etc.

  o  `Intelligent' cursor routing.  This allows easy movement of the
     cursor in text editors etc. without moving the hands from the
     Braille display.

  o  A cut & paste function.  This is particularly useful for copying
     long filenames, complicated commands etc.

  o  An on-line help facility.

  o  Support for multiple Braille codes.

  o  Modular design allows relatively easy addition of drivers for other
     Braille displays, or even (hopefully) porting to other Unix-like
     platforms.



       Begin3
       Title:          BRLTTY - Access software for Unix for a blind person
                                using a soft Braille terminal
       Version:        1.0.2, 17SEP96
       Entered-date:   17SEP96
       Description:    BRLTTY is a daemon which provides access to a Unix console
                       for a blind person using a soft Braille display (see the
                       README file for a full explanation).

                       BRLTTY only works with text-mode applications.

                       We hope that this system will be expanded to support
                       other soft Braille displays, and possibly even other
                       Unix-like platforms.
       Keywords:       Braille console access visually impaired blind
       Author:         nn201@cus.cam.ac.uk (Nikhil Nair)
                       nico@cam.org (Nicolas Pitre)
                       doyons@jsp.umontreal.ca (Stephane Doyon)
                       jrbowden@bcs.org.uk (James Bowden)
       Maintained-by:  nn201@cus.cam.ac.uk (Nikhil Nair)
       Primary-site:   sunsite.unc.edu /pub/Linux/system/Access
                       110kb brltty-1.0.2.tar.gz (includes the README file)
                         6kb brltty-1.0.2.README
                         1kb brltty-1.0.2.lsm
       Platforms:      Linux (kernel 1.1.92 or later) running on a PC or DEC Alpha.
                       Not X/graphics.
                       Supported Braille displays (serial communication only):
                         - Tieman B.V.: CombiBraille 25/45/85;
                         - Alva B.V.: ABT3xx series;
                         - Telesensory Systems Inc.: PowerBraille 40 (not 65/80),
                           Navigator 20/40/80 (latest firmware version only?).
       Copying-policy: GPL
       End



  8.3.  Screen

  Screen is a standard piece of software to allow many different
  programs to run at the same time on one terminal.  It has been
  enhanced to support some Braille terminals (those from Telesensory)
  directly.


  8.4.  Rsynth

  This is a speech synthesiser listed in the Linux Software Map.  It
  doesn't apparently work well enough for use by a visually impaired
  person.  Use hardware instead, or improve it.. a free speech
  synthesiser would be really really useful.


  8.5.  xocr

  xocr is a package which implements optical character recognition for
  Linux.  As with Rsynth, I don't think that this will be acceptable as
  a package for use as a sole means of input by a visually impaired
  person.  I suspect that the algorithm used means that it will need to
  be watched over by someone who can check that it is reading correctly.
  I would love to be proved wrong.


  8.6.  xzoom

  xzoom is a screen magnifier, in the same vein as xmag, but
  sufficiently better to be very useful to a visually impaired person.
  The main disadvantages of xzoom are that it can't magnify under
  itself, that some of the key controls aren't compatible with fvwm, the
  normal Linux window manager and that it's default configuration
  doesn't run over a network (this can be fixed at some expense to
  speed).  Apart from that though, it's excellent.  It does continuous
  magnification which allows you to, for example, scroll a document up
  and down, whilst keeping the section you are reading magnified.
  Alternatively, you can move a little box around the screen, magnifying
  the contents and letting you search for the area you want to see.
  xzoom is also available as an rpm from the normal RedHat sites, making
  it very easy to install for people using the rpm system (such as
  Redhat users).



       Begin3
       Title:          xzoom
       Version:        0.1
       Entered-date:   Mar 30 1996
       Description:    xzoom can magnify (by integer value) rotate
                       (by a multiple if 90 degrees) and mirror about
                       the X or Y axes areas on X11 screen
                       and display them in it's window.
       Keywords:       X11 zoom magnify xmag
       Author:         Itai Nahshon <nahshon@best.com>
       Maintained-by:  Itai Nahshon <nahshon@best.com>
       Primary-site:   sunsite.unc.edu
                       probably in /pub/Linux/X11/xutils/xzoom-0.1.tgz
       Platforms:      Linux+11. Support only for 8-bit depth.
                       Tested only in Linux 1.3.* with the XSVGA 3.1.2
       driver.
                                       Needs the XSHM extension.
       Copying-policy: Free
       End



  8.7.  NFBtrans

  nfbtrans is a multi-grade Braille translation program distributed by
  the National Federation for the Blind in the U.S.A.  It is released
  for free in the hope that someone will improve it.  Languages covered
  are USA English, UK English, Spanish, Russian, Esperanto, German,
  Biblical Hebrew and Biblical Greek, though others could be added just
  by writing a translation table.  Also covered are some computer and
  math forms.  I have managed to get it to compile under Linux, though,
  not having a Braille embosser available at the present moment I have
  not been able to test it.

  NFBtrans is available from <ftp://nfb.org/ftp/nfb/braille/nfbtrans/>.
  After downloading it, you will have to compile it.



  8.7.1.  Compiling NFBtrans on Linux

  I have returned this patch to the maintainer of NFBtrans and he says
  that he has included it, so if you get a version later than 740, you
  probably won't have to do anything special.  Just follow the
  instructions included in the package.



          unzip -L NFBTR740.ZIP   #or whatever filename you have
          mv makefile Makefile



  Next save the following to a file (e.g. patch-file)



       *** nfbpatch.c.orig     Tue Mar 12 11:37:28 1996
       --- nfbpatch.c  Tue Mar 12 11:37:06 1996
       ***************
       *** 185,190 ****
       --- 185,193 ----
           return (finfo.st_size);
         }                /* filelength */

       + #ifndef linux
       + /* pretty safe to assume all linux has usleep I think ?? this should be
       + done properly anyway */
         #ifdef SYSVR4
         void usleep(usec)
           int usec;
       ***************
       *** 195,200 ****
       --- 198,204 ----
       UKP  }                /* usleep */

         #endif
       + #endif

         void beep(count)
           int count;



  and run



       patch < patch-file



  then type



       make



  and the program should compile.


  8.8.  UnWindows

  UnWindows is a package of access utilities for X which provides many
  useful facilities for the visually impaired (not blind).  It includes
  a screen magnifier and other customised utilities to help locate the
  pointer.  UnWindows can be downloaded from
  <ftp://ftp.cs.rpi.edu/pub/unwindows>.

  As it comes by default, the package will not work on Linux because it
  relies on special features of Suns.  However, some of the utilities do
  work and I have managed to port most of the rest so this package may
  be interesting to some people.  My port will either be incorporated
  back into the original or will be available in the BLINUX archives
  (see ``WWW references'').  The remaining utility which doesn't yet
  work is the configuration utility.

  In my version the programs, instead of generating sounds themselves,
  just call another program.  The other program could for example be



       play /usr/lib/games/xboing/sounds/ouch.au



  Which would make the xboing ouch noise, for example it could do this
  as the pointer hit the left edge of the screen.


  8.8.1.  dynamag

  dynamag is a screen magnification program.  please see the section on
  Screen magnification (``magnification'').  This program worked in the
  default distribution.


  8.8.2.  coloreyes

  coloreyes makes it easy to find the pointer (mouse) location.  It
  consists of a pair of eyes which always look in the direction of the
  pointer (like xeyes) and change color depending on how far away the
  mouse is (unlike xeyes).  This doesn't work in the default
  distribution, but the test version, at the same location, seems to
  work.


  8.8.3.  border

  border is a program which detects when the pointer (mouse) has moved
  to the edge of the screen and makes a sound according to which edge of
  the screen has been approached.  The version which is available uses a
  SUN specific sound system.  I have now changed this so that instead of
  that, it just runs a command, which could be any Linux sound program.


  8.8.4.  un-twm

  The window manager is a special program which controls the location of
  all of the other windows (programs) displayed on the X screen.  un-twm
  is a special version which will make a sound as the pointer enters
  different windows.  The sound will depend on what window has been
  entered.  The distributed version doesn't work on linux because, like
  border it relies on SUN audio facilities.  Again I already have a
  special version which will be avaliable by the time you read this.


  9.  Hardware

  9.1.  Braille terminals driven from Screen Memory

  These are Braille terminals that can read the screen memory directly
  in a normal text mode.  It is possible to use it to work with Linux
  for almost all of the things that a seeing user can do on the console,
  including installation.  However, it has a problem with the scrolling
  of the normal Linux kernel, so a kernel patch needs to be applied.
  See ``Patching the Kernel for Braillex and Brailloterm''.


  9.1.1.  Braillex

  The Braillex is a terminal which is designed to read directly from the
  Screen memory, thus getting round any problems with MS-DOS programs
  which don't behave strangely.  If you could see it on screen, then
  this terminal should be able to display it in Braille.  In Linux,
  unfortunately, screen handling is done differently from MS-DOS, so
  this has to be changed somewhat.

  To get this terminal to work, you have to apply the patch given below
  in section ``Patching the Kernel''.  Once this is done, the Braillex
  becomes one of the most convenient ways to use Linux as it allows all
  of the information normally available to a seeing person to be read.
  Other terminals don't start working until the operating system has
  completely booted.

  The Braillex is available with two arrangements of Braille cells (80x1
  or 40x2) and there is a model, called the IB 2-D which also has a
  vertical bar to show information about all of the lines of the screen
  (using 4 programmable dots per screen line)


  Price: 8,995  (pounds sterling) or 11495 UKP for 2-D
  Manufacturer: Alphavision Limited (UK)
  Suppliers: ????



  9.1.2.  Brailloterm

  ``What is Brailloterm?


  It's a refreshable display Braille, made by KTS Kommunikations-Technik
  Stolper GmbH.  It has 80 Braille cells in an unique line. Each cell
  has 8 dots that are combined (up/down) to represent a character. By
  default, Brailloterm shows me the line in which the screen cursor is.
  I can use some functions in Brailloterm to see any line in the
  screen.'' - Jose Vilmar Estacio de Souza <jvilmar@embratel.net.br>


  Jose then goes on to say that the terminal can also use the serial
  port under DOS but that it needs a special program.  I don't know if
  any of the ones for Linux would work.


  As with Braillex, this needs a special patch to the kernel work
  properly.  See section ``Patching the Kernel''.

  Price: about 23.000,- DM /  $ 15.000,
  Manufacturer: Kommunikations-Technik Stolper GmbH
  Suppliers: ????



  9.1.3.  Patching the Kernel for Braillex and Brailloterm

  This probably also applies to any other terminals which read directly
  from screen memory to work under MS-DOS.  Mail me to confirm any
  terminals that you find work.  This does not apply and will actually
  lose some features for terminals driven using the BRLTTY software.


  I am told this patch applies to all Kernels version 1.2.X.  It should
  also work on all Kernel versions from 1.1.X to 1.3.72, with just a
  warning from patch (I've tested that the patch applies to 1.3.68 at
  least).  From 1.3.75 the patch is no longer needed because the Kernel
  can be configured not to scroll using `linux no-scroll' at the LILO
  prompt.  See the Boot Prompt HOWTO for more details.



       *** drivers/char/console.c~     Fri Mar 17 07:31:40 1995
       --- drivers/char/console.c      Tue Mar  5 04:34:47 1996
       ***************
       *** 601,605 ****
         static void scrup(int currcons, unsigned int t, unsigned int b)
         {
       !       int hardscroll = 1;

               if (b > video_num_lines || t >= b)
       --- 601,605 ----
         static void scrup(int currcons, unsigned int t, unsigned int b)
         {
       !       int hardscroll = 0;

               if (b > video_num_lines || t >= b)



  To apply it:


  1. Save the above text to a file (say patch-file)

  2. change to the drivers/char directory of your kernel sources

  3. run


                       patch < patch-file



  4. Compile your kernel as normal


  Apply those patches and you should be able to use the Braille terminal
  as normal to read the Linux Console.
  Put in words, the patch just means `change the 1 to a 0 in the first
  line of the function scrup which should be near line 603 in the file
  drivers/char/console.c'.  The main thing about patch is that program
  understands this, and that it knows how to guess what to do when the
  Linux developers change things in that file.


  If you want to use a more modern kernel with completely disabled
  scrolling, (instead of the boot prompt solution I already mentioned),
  please use the following patch.  This does not apply to kernels
  earlier than 1.3.75.



       *** console.c~  Fri Mar 15 04:01:45 1996
       --- console.c   Thu Apr  4 13:29:48 1996
       ***************
       *** 516,520 ****
         unsigned char has_wrapped;          /* all of videomem is data of fg_console */
         static unsigned char hardscroll_enabled;
       ! static unsigned char hardscroll_disabled_by_init = 0;

         void no_scroll(char *str, int *ints)
       --- 516,520 ----
         unsigned char has_wrapped;          /* all of videomem is data of fg_console */
         static unsigned char hardscroll_enabled;
       ! static unsigned char hardscroll_disabled_by_init = 1;

         void no_scroll(char *str, int *ints)



  9.2.  Software Driven Braille Terminals

  The principle of operation of these terminal is very close to that of
  a CRT terminal such as the vt100.  They connect to the serial port and
  the computer has to run a program which sends them output.  At present
  there are two known programs for Linux.  BRLTTY, see section
  ``BRLTTY'') and Braille enhanced screen.


  9.2.1.  Tieman B.V.

  9.2.1.1.  CombiBraille

  This Braille terminal is supported by the BRLTTY software.  It comes
  in three versions with 25, 45 or 85 Braille cells.  The extra five
  cells over a standard display are used for status information.


  Price: around 4600 UKP for the 45 cell model ...
  Manufacturer: Tieman B.V.
  Suppliers: Concept Systems, Nottingham, England (voice +44 115 925 5988)



  9.2.2.  Alva B.V.

  The ABT3xx series is supported in BRLTTY.  Only the ABT340 has been
  confirmed to work at this time.  Please pass back information to the
  BRLTTY authors on other models.


  Price: 20 cell - 2200 UKP; 40 cell 4500 UKP; 80 cell 8000 UKP
  Manufacturer: Alva
  Suppliers: Professional Vision Services LTD, Hertshire, England
             (+44 1462 677331)



  9.2.3.  Telesensory Systems Inc. displays

  Because they have provided programming information to the developers,
  the Telesensory displays are supported both by BRLTTY and screen.


  9.2.3.1.  Powerbraille

  There are three models the 40, the 65 and the 80.  Only the 40 is
  known to be supported by BRLTTY.


  Price: 20 cell - 2200 UKP; 40 cell 4500 UKP; 80 cell 8000 UKP
  Manufacturer: Alva
  Suppliers: Professional Vision Services LTD, Hertshire, England
             (+44 1462 677331)



  9.2.3.2.  Navigator

  Again there are three models the 20, the 60 and the 80.  Recent
  versions are all known to work with BRLTTY but whether earlier ones
  (with earlier firmware) also work has not been confirmed.


  Price: 80 cell 7800 UKP
  Manufacturer: Alva
  Suppliers: Professional Vision Services LTD, Hertshire, England
             (+44 1462 677331)



  9.2.4.  Braille Lite

  This is more a portable computer than a terminal.  It could, however,
  be used with BRLTTY version 0.22 (but not newer versions) as if it was
  a normal Braille terminal.  Unfortunately, many of the features
  available with the CombiBraille cannot be used with the Braille Lite.
  This means that it should be avoided for Linux use where possible.


  Price: $3,395.00
  Manufacturer: Blazie Engineering



  9.3.  Speech Synthesisers

  Speech synthesisers normally connect to the serial port of a PC.
  Useful features include

  o  Braille labels on parts

  o  Many voices to allow different parts of document to be spoken
     differently

  o  Use with headphones (not available on all models)

  The critical problem is that the quality of the speech.  This is much
  more important to someone who is using the speech synthesiser as their
  main source of information than to someone who is just getting neat
  sounds out of a game.  For this reason T.V. Raman seems to only
  recommend the DECTalk.  Acceptable alternatives would be good.


  9.3.1.  DECTalk Express

  This is a hardware speech synthesiser.  It is recommended for use with
  Emacspeak and in fact the DECTalk range are the only speech
  synthesisers which work with that package at present.  This
  synthesiser has every useful feature that I know about.  The only
  disadvantage that I know of at present is price.


  Price: $1195.00
  Manufacturer: Digital Equipment Corporation

  Suppliers: Many.  I'd like details of those with Specific Linux
          support / delivering international or otherwise of note only
          please.  Otherwise refer to local organisations.
          Digital themselves or the Emacspeak WWW pages.



  9.3.2.  Accent SA

  This is a synthesiser made by Aicom Corporation.  An effort has begun
  to write a driver for it however help is needed.  Please see
  <http://www.cyberspc.mb.ca/~astrope/speak.html> if you think you can
  help.



  9.3.3.  SPO256-AL2 Speak and Spell chip.

  Some interest has been expressed in using this chip in self built
  talking circuits.  I'd be interested to know if anyone has found this
  useful.  A software package speak-0.2pl1.tar.gz was produced by David
  Sugar <dyfet@tycho.com>.  My suspicion, though, is that the quality of
  the output wouldn't be good enough for regular use.


  10.  Acknowledgements

  Much of this document was created from various information sources on
  the Internet, many found from Yahoo and DEC's Alta Vista Search
  engine.  Included in this was the documentation of most of the
  software packages mentioned in the text.  Some information was also
  gleaned from the Royal National Institute for the Blind's helpsheets.

  T.V. Raman, the author of Emacspeak has reliably contributed comments,
  information and text as well as putting me in touch with other people
  who he knew on the Internet.


  Kenneth Albanowski <kjahds@kjahds.com> provided the patch needed for
  the Brailloterm and information about it.

  Roland Dyroff of S.u.S.E. GmbH (Linux distributors and makers of
  S.u.S.E. Linux (English/German)) looked up KTS Stolper GmbH at my
  request and got some hardware details and information on the
  Brailloterm.

  The most major and careful checks over of this document were done by
  James Bowden, <jrbowden@bcs.org.uk> and Nikhil Nair
  <nn201@cus.cam.ac.uk>, the BRLTTY authors who suggested a large number
  of corrections as well as extra information for some topics.

  The contributors to the blinux and linux-access mailing lists have
  contributed to this document by providng information for me to read.

  Mark E. Novak of the Trace R&D centre <http://trace.wisc.edu/> pointed
  me in the direction of several packages of software and information
  which I had not seen before.  He also made some comments on the
  structure of the document which I have partially taken into account
  and should probably do more about.

  Other contributors include Nicolas Pitrie and Stephane Doyon.

  A number of other people have contributed comments and information.
  Specific contributions are acknowledged within the document.

  This version was specifically produced for RedHat's Dr. Linux book.
  This is because they provided warning of it's impending release to
  myself and other LDP authors.  Their doing this is strongly
  appreciated since wrong or old information sits around much longer in
  a book than on the Internet.

  No doubt you made a contribution and I haven't mentioned it.  Don't
  worry, it was an accident.  I'm sorry.  Just tell me and I will add
  you to the next version.



  Linux 2.4 Advanced Routing HOWTO
  Netherlabs BV (bert hubert <bert.hubert@netherlabs.nl>)
  Gregory Maxwell <greg@linuxpower.cx>
  Remco van Mook <remco@virtu.nl>
  Martijn van Oosterhout <kleptog@cupid.suninternet.com>
  Paul B Schroeder  <paulsch@us.ibm.com>
  howto@ds9a.nl
  v0.1.0 $Date: 2000/05/26 15:42:43 $

  A very hands-on approach to iproute2, traffic shaping and a bit of
  netfilter
  ______________________________________________________________________

  Table of Contents



  1. Dedication

  2. Introduction

     2.1 Disclaimer & License
     2.2 Prior knowledge
     2.3 What Linux can do for you
     2.4 Housekeeping notes
     2.5 Access, CVS & submitting updates
     2.6 Layout of this document

  3. Introduction to iproute2

     3.1 Why iproute2?
     3.2 Iproute2 tour
     3.3 Prerequisites
     3.4 Exploring your current configuration
        3.4.1 (TT
        3.4.2 (TT
        3.4.3 (TT
     3.5 ARP

  4. Rules - routing policy database

     4.1 Simple source routing

  5. GRE and other tunnels

     5.1 A few general remarks about tunnels:
     5.2 IP in IP tunneling
     5.3 GRE tunneling
        5.3.1 IPv4 Tunneling
        5.3.2 IPv6 Tunneling
     5.4 Userland tunnels

  6. IPsec: secure IP over the internet

  7. Multicast routing

  8. Using Class Based Queueing for bandwidth management

     8.1 What is queueing?
     8.2 First attempt at bandwidth division
     8.3 What to do with excess bandwidth
     8.4 Class subdivisions
     8.5 Loadsharing over multiple interfaces

  9. More queueing disciplines

     9.1 pfifo_fast
     9.2 Stochastic Fairness Queueing
     9.3 Token Bucket Filter
     9.4 Random Early Detect
     9.5 Ingress policer qdisc

  10. Netfilter & iproute - marking packets

  11. More classifiers

     11.1 The "fw" classifier
     11.2 The "u32" classifier
        11.2.1 U32 selector
        11.2.2 General selectors
        11.2.3 Specific selectors
     11.3 The "route" classifier
     11.4 The "rsvp" classifier
     11.5 The "tcindex" classifier

  12. Kernel network parameters

     12.1 Reverse Path Filtering
     12.2 Obscure settings
        12.2.1 Generic ipv4
        12.2.2 Per device settings
        12.2.3 Neighbor pollicy
        12.2.4 Routing settings

  13. Backbone applications of traffic control

     13.1 Router queues

  14. Shaping Cookbook

     14.1 Running multiple sites with different SLAs
     14.2 Protecting your host from SYN floods
     14.3 Ratelimit ICMP to prevent dDoS
     14.4 Prioritising interactive traffic

  15. Advanced Linux Routing

     15.1 How does packet queueing really work?
     15.2 Advanced uses of the packet queueing system
     15.3 Other packet shaping systems

  16. Dynamic routing - OSPF and BGP

  17. Further reading

  18. Acknowledgements



  ______________________________________________________________________

  1.  Dedication

  This document is dedicated to lots of people, and is my attempt to do
  something back. To list but a few:


    Rusty Russel

    Alexey N. Kuznetsov

    The good folks from Google

    The staff of Casema Internet



  2.  Introduction

  Welcome, gentle reader.

  This document hopes to enlighten you on how to do more with Linux
  2.2/2.4 routing. Unbeknownst to most users, you already run tools
  which allow you to do spectacular things. Commands like 'route' and
  'ifconfig' are actually very thin wrappers for the very powerful
  iproute2 infrastructure

  I hope that this HOWTO will become as readable as the ones by Rusty
  Russel of (amongst other things) netfilter fame.
  You can always reach us by writing the HOWTO team
  <mailto:HOWTO@ds9a.nl>.

  2.1.  Disclaimer & License

  This document is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  In short, if your STM-64 backbone breaks down and distributes
  pornography to your most esteemed customers - it's never our fault.
  Sorry.

  Copyright (c) 2000 by bert hubert, Gregory Maxwell and Martijn van
  Oosterhout

  Please freely copy and distribute (sell or give away) this document in
  any format. It's requested that corrections and/or comments be
  fowarded to the document maintainer. You may create a derivative work
  and distribute it provided that you:


  1. Send your derivative work (in the most suitable format such as
     sgml) to the LDP (Linux Documentation Project) or the like for
     posting on the Internet.  If not the LDP, then let the LDP know
     where it is available.

  2. License the derivative work with this same license or use GPL.
     Include a copyright notice and at least a pointer to the license
     used.

  3. Give due credit to previous authors and major contributors.

     If you're considering making a derived work other than a
     translation, it's requested that you discuss your plans with the
     current maintainer.

  It is also requested that if you publish this HOWTO in hardcopy that
  you send the authors some samples for 'review purposes' :-)



  2.2.  Prior knowledge

  As the title implies, this is the 'Advanced' HOWTO. While by no means
  rocket science, some prior knowledge is assumed. This document is
  meant as a sequel to the Linux 2.4 Networking HOWTO
  <http://www.ds9a.nl/2.4Networking/> by the same authors. You should
  probably read that first.

  Here are some orther references which might help learn you more:

     Rusty Russels networking-concepts-HOWTO <http://netfilter.kernel
        notes.org/unreliable-guides/networking-concepts-HOWTO.html>
        Very nice introduction, explaining what a network is, and how it
        is connected to other networks

     Linux Networking-HOWTO (Previously the Net-3 HOWTO)
        Great stuff, although very verbose. It learns you a lot of stuff
        that's already configured if you are able to connect to the
        internet.  Should be located in /usr/doc/HOWTO/NET3-4-HOWTO.txt
        but can be also be found online
        <http://www.linuxports.com/howto/networking>



  2.3.  What Linux can do for you

  A small list of things that are possible:


    Throttle bandwidth for certain computers

    Throttle bandwidth to certain computers

    Help you to fairly share your bandwidth

    Protect your network from DoS attacks

    Protect the internet from your customers

    Multiplex several servers as one, for load balancing or enhanced
     availability

    Restrict access to your computers

    Limit access of your users to other hosts

    Do routing based on user id (yes!), MAC address, source IP address,
     port, type of service, time of day or content

  Currently not many people are using these advanced features. This has
  several reasons. While the provided documentation is verbose, it is
  not very hands on. Traffic control is almost undocumented.

  2.4.  Housekeeping notes

  There are several things which should be noted about this document.
  While I wrote most of it, I really don't want it to stay that way. I
  am a strong believer in Open Source, so I encourage you to send
  feedback, updates, patches etcetera. Do not hesitate to inform me of
  typos or plain old errors.  If my English sounds somewhat wooden,
  please realise that I'm not a native speaker. Feel free to send
  suggestions.

  If you feel to you are better qualified to maintain a section, or
  think that you can author and maintain new sections, you are welcome
  to do so. The SGML of this HOWTO is available via CVS, I very much
  envision more people working on it.

  In aid of this, you will find lots of FIXME notices. Patches are
  always welcome! Wherever you find a FIXME, you should know that you
  are treading unknown territory. This is not to say that there are no
  errors elsewhere, but be extra careful. If you have validated
  something, please let us know so we can remove the FIXME notice.

  About this HOWTO, I will take some liberties along the road. For
  example, I postulate a 10Mbit internet connection, while I know full
  well that those are not very common.

  2.5.  Access, CVS & submitting updates

  The canonical location for the HOWTO is here
  <http://www.ds9a.nl/2.4Routing>.

  We now have anonymous CVS access available for the world at large.
  This is good in several ways. You can easily upgrade to newer versions
  of this HOWTO and submitting patches is no work at all.

  Furthermore, it allows the authors to work on the source
  independently, which is good too.

       $ export CVSROOT=:pserver:anon@outpost.ds9a.nl:/var/cvsroot
       $ cvs login
       CVS password: [enter 'cvs' (without 's)]
       $ cvs co 2.4routing
       cvs server: Updating 2.4routing
       U 2.4routing/2.4routing.sgml



  If you spot an error, or want to add something, just fix it locally,
  and run cvs diff -u, and send the result off to us.

  A Makefile is supplied which should help you create postscript, dvi,
  pdf, html and plain text. You may need to install sgml-tools,
  ghostscript and tetex to get all formats.


  2.6.  Layout of this document

  We will be doing interesting stuff almost immediately, which also
  means that there will initially be parts that are explained
  incompletely or are not perfect. Please gloss over these parts and
  assume that all will become clear.

  Routing and filtering are two distinct things. Filtering is documented
  very well by Rusty's HOWTOs, available here:


    Rusty's Remarkably Unreliable Guides
     <http://netfilter.kernelnotes.org/unreliable-guides/>

  We will be focusing mostly on what is possible by combining netfilter
  and iproute2.

  3.  Introduction to iproute2

  3.1.  Why iproute2?

  Most Linux distributions, and most UNIX's, currently use the venerable
  'arp', 'ifconfig' and 'route' commands. While these tools work, they
  show some unexpected behaviour under Linux 2.2 and up. For example,
  GRE tunnels are an integral part of routing these days, but require
  completely different tools.

  With iproute2, tunnels are an integral part of the tool set

  The 2.2 and above Linux kernels include a completely redesigned
  network subsystem. This new networking code brings Linux performance
  and a feature set with little competition in the general OS arena. In
  fact, the new routing filtering, and classifying code is more
  featureful then that provided by many dedicated routers and firewalls
  and traffic shaping products.

  As new networking concepts have been invented, people have found ways
  to plaster them on top of the existing framework in existing OSes.
  This constant layering of cruft has lead to networking code that is
  filled with strange behaviour, much like most human languages. In the
  past, Linux emulated SunOS's handling of many of these things, which
  was not ideal.

  This new framework has made it possible to clearly express features
  previously not possible.



  3.2.  Iproute2 tour

  Linux has a sophisticated system for bandwidth provisioning called
  Traffic Control. This system supports various method for classifying,
  prioritising, sharing, and limiting both inbound and outbound traffic.


  We'll start off with a tiny tour of iproute2 possibilities.

  3.3.  Prerequisites

  You should make sure that you have the userland tools installed. This
  package is called 'iproute' on both RedHat and Debian, and may
  otherwise be found at ftp://ftp.inr.ac.ru/ip-
  routing/iproute2-2.2.4-now-ss??????.tar.gz".  Some parts of iproute
  require you to have certain kernel options enabled.

  FIXME: We should mention  <ftp://ftp.inr.ac.ru/ip-
  routing/iproute2-current.tar.gz> is always the latest


  3.4.  Exploring your current configuration

  This may come as a surprise, but iproute2 is already configured! The
  current commands ifconfig and route are already using the advanced
  syscalls, but mostly with very default (ie, boring) settings.

  The ip tool is central, and we'll ask it do display our interfaces for
  us.

  3.4.1.  ip  shows us our links



       [ahu@home ahu]$ ip link list
       1: lo: <LOOPBACK,UP> mtu 3924 qdisc noqueue
           link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
       2: dummy: <BROADCAST,NOARP> mtu 1500 qdisc noop
           link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
       3: eth0: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1400 qdisc pfifo_fast qlen 100
           link/ether 48:54:e8:2a:47:16 brd ff:ff:ff:ff:ff:ff
       4: eth1: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 100
           link/ether 00:e0:4c:39:24:78 brd ff:ff:ff:ff:ff:ff
       3764: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1492 qdisc pfifo_fast qlen 10
           link/ppp



  Your mileage may vary, but this is what it shows on my NAT router at
  home. I'll only explain part of the output as not everything is
  directly relevant.

  We first see the loopback interface. While your computer may function
  somewhat without one, I'd advise against it. The mtu size (maximum
  transfer unit) is 3924 octects, and it is not supposed to queue. Which
  makes sense because the loopback interface is a figment of your
  kernels imagination.

  I'll skip the dummy interface for now, and it may not be present on
  your computer. Then there are my two network interfaces, one at the
  side of my cable modem, the other serves my home ethernet segment.
  Furthermore, we see a ppp0 interface.

  Note the absence of IP addresses. Iproute disconnects the concept of
  'links' and 'IP addresses'. With IP aliasing, the concept of 'the' IP
  address had become quite irrelevant anyhow.

  It does show us the MAC addresses though, the hardware identifier of
  our ethernet interfaces.

  3.4.2.  ip  shows us our IP addresses



       [ahu@home ahu]$ ip address show
       1: lo: <LOOPBACK,UP> mtu 3924 qdisc noqueue
           link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
           inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       2: dummy: <BROADCAST,NOARP> mtu 1500 qdisc noop
           link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
       3: eth0: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1400 qdisc pfifo_fast qlen 100
           link/ether 48:54:e8:2a:47:16 brd ff:ff:ff:ff:ff:ff
           inet 10.0.0.1/8 brd 10.255.255.255 scope global eth0
       4: eth1: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 100
           link/ether 00:e0:4c:39:24:78 brd ff:ff:ff:ff:ff:ff
       3764: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1492 qdisc pfifo_fast qlen 10
           link/ppp
           inet 212.64.94.251 peer 212.64.94.1/32 scope global ppp0



  This contains more information. It shows all our addresses, and to
  which cards they belong. 'inet' stands for Internet. There are lots of
  other address families, but these don't concern us right now.

  Lets examine eth0 somewhat closer. It says that it is related to the
  inet address '10.0.0.1/8'. What does this mean? The /8 stands for the
  number of bits that are in the Network Address. There are 32 bits, so
  we have 24 bits left that are part of our network. The first 8 bits of
  10.0.0.1 correspond to 10.0.0.0, our Network Address, and our netmask
  is 255.0.0.0.

  The other bits are connected to this interface, so 10.250.3.13 is
  directly available on eth0, as is 10.0.0.1 for example.

  With ppp0, the same concept goes, though the numbers are different.
  It's address is 212.64.94.251, without a subnet mask. This means that
  we have a point-to-point connection and that every address, with the
  exception of 212.64.94.251, is remote. There is more information
  however, it tells us that on the other side of the link is yet again
  only one address, 212.64.94.1. The /32 tells us that there are no
  'network bits'.

  It is absolutely vital that you grasp these concepts. Refer to the
  documentation mentioned at the beginning of this HOWTO if you have
  trouble.

  You may also note 'qdisc', which stands for Queueing Discipline. This
  will become vital later on.


  3.4.3.  ip  shows us our routes

  Well, we now know how to find 10.x.y.z addresses, and we are able to
  reach 212.64.94.1. This is not enough however, so we need instructions
  on how to reach the world. The internet is available via our ppp
  connection, and it appears that 212.64.94.1 is willing to spread our
  packets around the world, and deliver results back to us.


       [ahu@home ahu]$ ip route show
       212.64.94.1 dev ppp0  proto kernel  scope link  src 212.64.94.251
       10.0.0.0/8 dev eth0  proto kernel  scope link  src 10.0.0.1
       127.0.0.0/8 dev lo  scope link
       default via 212.64.94.1 dev ppp0



  This is pretty much self explanatory. The first 4 lines of output
  explicitly state what was already implied by ip address show, the last
  line tells us that the rest of the world can be found via 212.64.94.1,
  our default gateway. We can see that it is a gateway because of the
  word via, which tells us that we need to send packets to 212.64.94.1,
  and that it will take care of things.

  For reference, this is what the old 'route' utility shows us:


       [ahu@home ahu]$ route -n
       Kernel IP routing table
       Destination     Gateway         Genmask         Flags Metric Ref    Use
       Iface
       212.64.94.1     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
       10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 eth0
       127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
       0.0.0.0         212.64.94.1     0.0.0.0         UG    0      0        0 ppp0



  3.5.  ARP

  ARP is the Address Resolution Protocol as described in RFC 826
  <http://www.faqs.org/rfcs/rfc826.html>.  ARP is used by a networked
  machine to resolve the hardware location/address of another machine on
  the same local network.  Machines on the Internet are generally known
  by their names which resolve to IP addresses.  This is how a machine
  on the foo.com network is able to communicate with another machine
  which is on the bar.net network.  An IP address, though, cannot tell
  you the physical location of a machine.  This is where ARP comes into
  the picture.

  Let's take a very simple example.  Suppose I have a network composed
  of several machines.  Two of the machines which are currently on my
  network are foo with an IP address of 10.0.0.1 and bar with an IP
  address of 10.0.0.2.  Now foo wants to ping bar to see that he is
  alive, but alas, foo has no idea where bar is.  So when foo decides to
  ping bar he will need to send out an ARP request.  This ARP request is
  akin to foo shouting out on the network "Bar (10.0.0.2)!  Where are
  you?"  As a result of this every machine on the network will hear foo
  shouting, but only bar (10.0.0.2) will respond.  Bar will then send an
  ARP reply directly back to foo which is akin bar saying, "Foo
  (10.0.0.1) I am here at 00:60:94:E9:08:12."  After this simple
  transaction used to locate his friend on the network foo is able to
  communicate with bar until he (his arp cache) forgets where bar is.

  Now let's see how this works.  You can view your machines current
  arp/neighbor cache/table like so:


       [root@espa041 /home/src/iputils]# ip neigh show
       9.3.76.42 dev eth0 lladdr 00:60:08:3f:e9:f9 nud reachable
       9.3.76.1 dev eth0 lladdr 00:06:29:21:73:c8 nud reachable

  As you can see my machine espa041 (9.3.76.41) knows where to find
  espa042 (9.3.76.42) and espagate (9.3.76.1).  Now let's add another
  machine to the arp cache.



       [root@espa041 /home/paulsch/.gnome-desktop]# ping -c 1 espa043
       PING espa043.austin.ibm.com (9.3.76.43) from 9.3.76.41 : 56(84) bytes of data.
       64 bytes from 9.3.76.43: icmp_seq=0 ttl=255 time=0.9 ms

       --- espa043.austin.ibm.com ping statistics ---
       1 packets transmitted, 1 packets received, 0% packet loss
       round-trip min/avg/max = 0.9/0.9/0.9 ms

       [root@espa041 /home/src/iputils]# ip neigh show
       9.3.76.43 dev eth0 lladdr 00:06:29:21:80:20 nud reachable
       9.3.76.42 dev eth0 lladdr 00:60:08:3f:e9:f9 nud reachable
       9.3.76.1 dev eth0 lladdr 00:06:29:21:73:c8 nud reachable



  As a result of espa041 trying to contact espa043, espa043's hardware
  address/location has now been added to the arp/nieghbor cache.  So
  until the entry for espa043 times out (as a result of no communication
  between the two) espa041 knows where to find espa043 and has no need
  to send an ARP request.

  Now let's delete espa043 from our arp cache:



       [root@espa041 /home/src/iputils]# ip neigh delete 9.3.76.43 dev eth0
       [root@espa041 /home/src/iputils]# ip neigh show
       9.3.76.43 dev eth0  nud failed
       9.3.76.42 dev eth0 lladdr 00:60:08:3f:e9:f9 nud reachable
       9.3.76.1 dev eth0 lladdr 00:06:29:21:73:c8 nud stale



  Now espa041 has again forgotten where to find espa043 and will need to
  send another ARP request the next time he needs to communicate with
  espa043.  You can also see from the above output that espagate
  (9.3.76.1) has been changed to the "stale" state.  This means that the
  location shown is still valid, but it will have to be confirmed at the
  first transaction to that machine.


  4.  Rules - routing policy database

  If you have a large router, you may well cater for the needs of
  different people, who should be served differently. The routing policy
  database allows you to do this by having multiple sets of routing
  tables.

  If you want to use this feature, make sure that your kernel is
  compiled with the "IP: policy routing" feature.

  When the kernel needs to make a routing decision, it finds out which
  table needs to be consulted. By default, there are three tables. The
  old 'route' tool modifies the main and local tables, as does the ip
  tool (by default).

  The default rules:

  [ahu@home ahu]$ ip rule list
  0:      from all lookup local
  32766:  from all lookup main
  32767:  from all lookup default



  This lists the priority of all rules. We see that all rules apply to
  all packets ('from all'). We've seen the 'main' table before, it's
  output by ip route ls, but the 'local' and 'default' table are new.

  If we want to do fancy things, we generate rules which point to
  different tables which allow us to override system wide routing rules.

  For the exact semantics on what the kernel does when there are more
  matching rules, see Alexey's ip-cfref documentation.


  4.1.  Simple source routing

  Let's take a real example once again, I have 2 (actually 3, about time
  I returned them) cable modems, connected to a Linux NAT
  ('masquerading') router. People living here pay me to use the
  internet. Suppose one of my house mates only visits hotmail and wants
  to pay less. This is fine with me, but you'll end up using the low-end
  cable modem.

  The 'fast' cable modem is known as 212.64.94.251 and is an PPP link to
  212.64.94.1. The 'slow' cable modem is known by various ip addresses,
  212.64.78.148 in this example and is a link to 195.96.98.253.

  The local table:


       [ahu@home ahu]$ ip route list table local
       broadcast 127.255.255.255 dev lo  proto kernel  scope link  src 127.0.0.1
       local 10.0.0.1 dev eth0  proto kernel  scope host  src 10.0.0.1
       broadcast 10.0.0.0 dev eth0  proto kernel  scope link  src 10.0.0.1
       local 212.64.94.251 dev ppp0  proto kernel  scope host  src 212.64.94.251
       broadcast 10.255.255.255 dev eth0  proto kernel  scope link  src 10.0.0.1
       broadcast 127.0.0.0 dev lo  proto kernel  scope link  src 127.0.0.1
       local 212.64.78.148 dev ppp2  proto kernel  scope host  src 212.64.78.148
       local 127.0.0.1 dev lo  proto kernel  scope host  src 127.0.0.1
       local 127.0.0.0/8 dev lo  proto kernel  scope host  src 127.0.0.1



  Lots of obvious things, but things that need to specified somewhere.
  Well, here they are. The default table is empty.

  Let's view the 'main' table:


       [ahu@home ahu]$ ip route list table main
       195.96.98.253 dev ppp2  proto kernel  scope link  src 212.64.78.148
       212.64.94.1 dev ppp0  proto kernel  scope link  src 212.64.94.251
       10.0.0.0/8 dev eth0  proto kernel  scope link  src 10.0.0.1
       127.0.0.0/8 dev lo  scope link
       default via 212.64.94.1 dev ppp0



  We now generate a new rule which we call 'John', for our hypothetical
  house mate. Although we can work with pure numbers, it's far easier if
  we add our tables to /etc/iproute2/rt_tables.



       # echo 200 John >> /etc/iproute2/rt_tables
       # ip rule add from 10.0.0.10 table John
       # ip rule ls
       0:      from all lookup local
       32765:  from 10.0.0.10 lookup John
       32766:  from all lookup main
       32767:  from all lookup default



  Now all that is left is to generate Johns table, and flush the route
  cache:


       # ip route add default via 195.96.98.253 dev ppp2 table John
       # ip route flush cache



  And we are done. It is left as an exercise for the reader to implement
  this in ip-up.

  5.  GRE and other tunnels

  There are 3 kinds of tunnels in Linux. There's IP in IP tunneling, GRE
  tunneling and tunnels that live outside the kernel (like, for example
  PPTP).

  5.1.  A few general remarks about tunnels:

  Tunnels can be used to do some very unusual and very cool stuff. They
  can also make things go horribly wrong when you don't configure them
  right. Don't point your default route to a tunnel device unless you
  know _exactly_ what you are doing :-). Furthermore, tunneling
  increases overhead, because it needs an extra set of IP headers.
  Typically this is 20 bytes per packet, so if the normal packet size
  (MTU) on a network is 1500 bytes, a packet that is sent through a
  tunnel can only be 1480 bytes big. This is not necessarily a problem,
  but be sure to read up on IP packet fragmentation/reassembly when you
  plan to connect large networks with tunnels. Oh, and of course, the
  fastest way to dig a tunnel is to dig at both sides.


  5.2.  IP in IP tunneling

  This kind of tunneling has been available in Linux for a long time. It
  requires 2 kernel modules, ipip.o and new_tunnel.o.

  Let's say you have 3 networks: Internal networks A and B, and
  intermediate network C (or let's say, Internet).  So we have network
  A:



       network 10.0.1.0
       netmask 255.255.255.0
       router  10.0.1.1

  The router has address 172.16.17.18 on network C.

  and network B:


       network 10.0.2.0
       netmask 255.255.255.0
       router  10.0.2.1



  The router has address 172.19.20.21 on network C.

  As far as network C is concerned, we assume that it will pass any
  packet sent from A to B and vice versa. You might even use the
  Internet for this.

  Here's what you do:

  First, make sure the modules are installed:



       insmod ipip.o
       insmod new_tunnel.o



  Then, on the router of network A, you do the following:


       ifconfig tunl0 10.0.1.1 pointopoint 172.19.20.21
       route add -net 10.0.2.0 netmask 255.255.255.0 dev tunl0



  And on the router of network B:


       ifconfig tunl0 10.0.2.1 pointopoint 172.16.17.18
       route add -net 10.0.1.0 netmask 255.255.255.0 dev tunl0



  And if you're finished with your tunnel:


       ifconfig tunl0 down



  Presto, you're done. You can't forward broadcast or IPv6 traffic
  through an IP-in-IP tunnel, though. You just connect 2 IPv4 networks
  that normally wouldn't be able to talk to each other, that's all. As
  far as compatibility goes, this code has been around a long time, so
  it's compatible all the way back to 1.3 kernels. Linux IP-in-IP tun
  neling doesn't work with other Operating Systems or routers, as far as
  I know. It's simple, it works. Use it if you have to, otherwise use
  GRE.


  5.3.  GRE tunneling

  GRE is a tunneling protocol that was originally developed by Cisco,
  and it can do a few more things than IP-in-IP tunneling. For example,
  you can also transport multicast traffic and IPv6 through a GRE
  tunnel.

  In Linux, you'll need the ip_gre module.


  5.3.1.  IPv4 Tunneling

  Let's do IPv4 tunneling first:

  Let's say you have 3 networks: Internal networks A and B, and
  intermediate network C (or let's say, Internet).

  So we have network A:


       network 10.0.1.0
       netmask 255.255.255.0
       router  10.0.1.1



  The router has address 172.16.17.18 on network C.  Let's call this
  network neta (ok, hardly original)

  and network B:


       network 10.0.2.0
       netmask 255.255.255.0
       router  10.0.2.1



  The router has address 172.19.20.21 on network C.  Let's call this
  network netb (still not original)

  As far as network C is concerned, we assume that it will pass any
  packet sent from A to B and vice versa. How and why, we do not care.

  On the router of network A, you do the following:


       ip tunnel add netb mode gre remote 172.19.20.21 local 172.16.17.18 ttl 255
       ip addr add 10.0.1.1 dev netb
       ip route add 10.0.2.0/24 dev netb



  Let's discuss this for a bit. In line 1, we added a tunnel device, and
  called it netb (which is kind of obvious because that's where we want
  it to go). Furthermore we told it to use the GRE protocol (mode gre),
  that the remote address is 172.19.20.21 (the router at the other end),
  that our tunneling packets should originate from 172.16.17.18 (which
  allows your router to have several IP addresses on network C and let
  you decide which one to use for tunneling) and that the TTL field of
  the packet should be set to 255 (ttl 255).


  In the second line we gave the newly born interface netb the address
  10.0.1.1. This is OK for smaller networks, but when you're starting up
  a mining expedition (LOTS of tunnels), you might want to consider
  using another IP range for tunneling interfaces (in this example, you
  could use 10.0.3.0).


  In the third line we set the route for network B. Note the different
  notation for the netmask. If you're not familiar with this notation,
  here's how it works: you write out the netmask in binary form, and you
  count all the ones. If you don't know how to do that, just remember
  that 255.0.0.0 is /8, 255.255.0.0 is /16 and 255.255.255.0 is /24. Oh,
  and 255.255.254.0 is /23, in case you were wondering.

  But enough about this, let's go on with the router of network B.


       ip tunnel add neta mode gre remote 172.16.17.18 local 172.19.20.21 ttl 255
       ip addr add 10.0.2.1 dev neta
       ip route add 10.0.1.0/24 dev neta



  And when you want to remove the tunnelon router A:


       ip link set netb down
       ip tunnel del netb



  Of course, you can replace netb with neta for router B.


  5.3.2.  IPv6 Tunneling


  BIG FAT WARNING !!

  The following is untested and might therefore be completely and utter
  BOLLOCKS. Proceed at your own risk. Don't say I didn't warn you.

  FIXME: check & try all this


  A short bit about IPv6 addresses:

  IPv6 addresses are, compared to IPv4 addresses, monstrously big. An
  example:

  3ffe:2502:200:40:281:48fe:dcfe:d9bc


  So, to make writing them down easier, there are a few rules:

    Don't use leading zeroes. Same as in IPv4.

    Use colons to separate every 16 bits or two bytes.

    When you have lots of consecutive zeroes, you can write this down
     as ::. You can only do this once in an address and only for
     quantities of 16 bits, though.

     Using these rules, the address
     3ffe:0000:0000:0000:0000:0020:34A1:F32C can be written down as
     3ffe::20:34A1:F32C, which is a lot shorter.

  On with the tunnels.

  Let's assume that you have the following IPv6 network, and you want to
  connect it to 6bone, or a friend.



       Network 3ffe:406:5:1:5:a:2:1/96



  Your IPv4 address is 172.16.17.18, and the 6bone router has IPv4
  address 172.22.23.24.



       ip tunnel add sixbone mode sit remote 172.22.23.24 local 172.16.17.18 ttl 255
       ip link set sixbone up
       ip addr add 3ffe:406:5:1:5:a:2:1/96 dev sixbone
       ip route add 3ffe::/15 dev sixbone



  Let's discuss this. In the first line, we created a tunnel device
  called sixbone. We gave it mode sit (which is IPv6 in IPv4 tunneling)
  and told it where to go to (remote) and where to come from (local).
  TTL is set to maximum, 255. Next, we made the device active (up).
  After that, we added our own network address, and set a route for
  3ffe::/15 (which is currently all of 6bone) through the tunnel.

  GRE tunnels are currently the preferred type of tunneling. It's a
  standard that's also widely adopted outside the Linux community and
  therefore a Good Thing.


  5.4.  Userland tunnels

  There are literally dozens of implementations of tunneling outside the
  kernel. Best known are of course PPP and PPTP, but there are lots more
  (some proprietary, some secure, some that don't even use IP) and that
  is really beyond the scope of this HOWTO.


  6.  IPsec: secure IP over the internet

  FIXME: Waiting for our feature editor Stefan to finish his stuf


  7.  Multicast routing

  FIXME: Editor Vacancy!

  8.  Using Class Based Queueing for bandwidth management

  Now, when I discovered this, it *really* blew me away. Linux 2.2 comes
  with everything to manage bandwidth in ways comparable to high-end
  dedicated bandwidth management systems.

  Linux even goes far beyond what Frame and ATM provide.


  The two basic units of Traffic Control are filters and queues. Filters
  place traffic into queues, and queues gather traffic and decide what
  to send first, send later, or drop. There are several flavours of
  filters and queues.

  The most common filters are fwmark and u32, the first lets you use the
  Linux netfilter code to select traffic, and the second allows you to
  select traffic based on ANY header. The most notable queue is Class
  Based Queue. CBQ is a super-queue, in that it contains other queues
  (even other CBQs).

  It may not be immediately clear what queueing has to do with bandwidth
  management, but it really does work.

  For our frame of reference, I have modelled this section on an ISP
  where I learned the ropes, so to speak, Casema Internet in The
  Netherlands. Casema, which is actually a cable company, has internet
  needs both for their customers and for their own office. Most
  corporate computers there have access to the internet. In reality,
  they have lots of money to spend and do not use Linux for bandwidth
  management.

  We will explore how our ISP could have used Linux to manage their
  bandwidth.


  8.1.  What is queueing?

  With queueing we determine the order in which data is *sent*. It it
  important to realise this, we can only shape data that we transmit.
  How this changing the order determine the speed of transmission?
  Imagine a cash register which is able to process 3 customers per
  minute.

  People wishing to pay go stand in line at the 'tail end' of the queue.
  This is 'fifo queueing'. Let's suppose however that we let certain
  people always join in the middle of the queue, in stead of at the end.
  These people spend a lot less time in the queue and are therefore able
  to shop faster.

  With the way the internet works, we have no direct control of what
  people send us. It's a bit like your (physical!) mailbox at home.
  There is no way you can influence the world to modify the amount of
  mail they send you, short of contacting everybody.

  However, the internet is mostly based on TCP/IP which has a few
  features that help us. TCP/IP has no way of knowing the capacity of
  the network between two hosts, so it just starts sending data faster
  and faster ('slow start') and when packets start getting lost, because
  there is no room to send them, it will slow down.

  This is the equivalent of not reading half of your mail, and hoping
  that people will stop sending it to you. With the difference that it
  works for the Internet :-)

  FIXME: explain that normally, ACKs are used to determine speed



       [The Internet] ---<E3, T3, whatever>--- [Linux router] --- [Office+ISP]
                                             eth1          eth0



  Now, our Linux router has two interfaces which I shall dub eth0 and
  eth1.  Eth1 is connected to our router which moves packets from to and
  from our fibre link.

  Eth0 is connected to a subnet which contains both the corporate
  firewall and our network head ends, through which we can connect to
  our customers.

  Because we can only limit what we send, we need two separate but
  possibly very similar sets of rules. By modifying queueing on eth0, we
  determine how fast data gets sent to our customers, and therefor how
  much downstream bandwidth is available for them. Their 'download
  speed' in short.

  On eth1, we determine how fast we send data to The Internet, how fast
  our users, both corporate and commercial can upload data.


  8.2.  First attempt at bandwidth division

  CBQ enables us to generate several classes, and even classes within
  classes.  The larger devisions might be called 'agencies'. Within
  these classes may be things like 'bulk' or 'interactive'.

  For example, we may have a 10 megabit internet connection to 'the
  internet' which is to be shared by our customers, and our corporate
  needs. We should not allow a few people at the office to steal away
  large amounts of bandwidth which we should sell to our customers.

  On the other hand, or customers should not be able to drown out the
  traffic from our field offices to the customer database.

  Previously, one way to solve this was either to use Frame relay/ATM
  and create virtual circuits. This works, but frame is not very fine
  grained, ATM is terribly inefficient at carrying IP traffic, and
  neither have standardised ways to segregate different types of traffic
  into different VCs.

  Hover, if you do use ATM, Linux can also happily perform deft acts of
  fancy traffic classification for you too. Another way is to order
  separate connections, but this is not very practical and also not very
  elegant, and still does not solve all your problems.

  CBQ to the rescue!

  Clearly we have two main classes, 'ISP' and 'Office'. Initially, we
  really don't care what the divisions do with their bandwidth, so we
  don't further subdivide their classes.

  We decide that the customers should always be guaranteed 8 megabits of
  downstream traffic, and our office 2 megabits.

  Setting up traffic control is done with the iproute2 tool tc.


       # tc qdisc add dev eth0 root handle 10: cbq bandwidth 10Mbit avpkt 1000



  Ok, lots of numbers here. What has happened? We have configured the
  'queueing discipline' of eth0. With 'root' we denote that this is the
  root discipline. We have given it the handle '10:'. We want to do CBQ,
  so we mention that on the command line as well. We tell the kernel
  that it can allocate 10Mbit and that the average packet size is
  somewhere around 1000 octets.
  FIXME: Double check with Alexey the the built in cell calculation is
  sufficient.

  FIXME: With a 1500 mtu, the default cell is calculated same as the old
  example.

  FIXME: I checked the sources (userspace and kernel), so we should be
  safe omitting it.

  Now we need to generate our root class, from which all others descend:


       # tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate \
         10Mbit allot 1514 weight 1Mbit prio 8 maxburst 20 avpkt 1000



  Even more numbers to worry about - the Linux CBQ implementation is
  very generic. With 'parent 10:0' we indicate that this class descends
  from the root of qdisc handle '10:' we generated earlier. With
  'classid 10:1' we name this class.

  We really don't tell the kernel a lot more, we just generate a class
  that completely fills the available device. We also specify that the
  MTU (plus some overhead) is 1514 octets. We also 'weigh' this class
  with 1Mbit - a tuning parameter.

  We now generate our ISP class:


       # tc class add dev eth0 parent 10:1 classid 10:100 cbq bandwidth 10Mbit rate \
         8Mbit allot 1514 weight 800Kbit prio 5 maxburst 20 avpkt 1000 \
         bounded



  We allocate 8Mbit, and indicate that this class must not exceed this
  by adding the 'bounded' parameter. Otherwise this class would have
  started borrowing bandwidth from other classes, something we will
  discuss later on.

  To top it off, we generate the root Office class:


       # tc class add dev eth0 parent 10:1 classid 10:200 cbq bandwidth 10Mbit rate \
         2Mbit allot 1514 weight 200Kbit prio 5 maxburst 20 avpkt 1000 \
         bounded



  To make this a bit clearer, a diagram which shows our classes:



  +-------------[10: 10Mbit]----------------------+
  |+-------------[10:1 root 10Mbit]--------------+|
  ||                                             ||
  || +-[10:100 8Mbit]-+ +--[10:200 2Mbit]-----+  ||
  || |                | |                     |  ||
  || | ISP            | |  Office             |  ||
  || |                | |                     |  ||
  || +----------------+ +---------------------+  ||
  ||                                             ||
  |+---------------------------------------------+|
  +-----------------------------------------------+



  Ok, now we have told the kernel what our classes are, but not yet how
  to manage the queues. We do this presently, in one fell swoop for both
  classes.



       # tc qdisc add dev eth0 parent 10:100 sfq quantum 1514b perturb 15
       # tc qdisc add dev eth0 parent 10:200 sfq quantum 1514b perturb 15



  In this case we install the Stochastic Fairness Queueing discipline
  (sfq), which is not quite fair, but works well up to high bandwidths
  without burning up CPU cycles. There are other queueing disciplines
  available which are better, but need more CPU. The Token Bucket Filter
  is often used.

  Now there is only one thing left to do and that is to explain to the
  kernel which packets belong to which class. Initially we will do this
  natively with iproute2, but more interesting applications are possible
  in combination with netfilter.



       # tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip dst \
         150.151.23.24 flowid 10:200

       # tc filter add dev eth0 parent 10:0 protocol ip prio 25 u32 match ip dst \
         150.151.0.0/16 flowid 10:100



  Here is is assumed that our office hides behind a firewall with IP
  address 150.151.23.24 and that all our other IP addresses should be
  considered to be part of the ISP.

  The u32 match is a very simple one - more sophisticated matching rules
  are possible when using netfilter to mark our packets, which we can
  than match on in tc.

  Now we have fairly divided the downstream bandwidth, we need to do the
  same for the upstream. For brevity's sake, all in one go:



  # tc qdisc add dev eth1 root handle 20: cbq bandwidth 10Mbit avpkt 1000

  # tc class add dev eth1 parent 20:0 classid 20:1 cbq bandwidth 10Mbit rate \
    10Mbit allot 1514 weight 1Mbit prio 8 maxburst 20 avpkt 1000

  # tc class add dev eth1 parent 20:1 classid 20:100 cbq bandwidth 10Mbit rate \
    8Mbit allot 1514 weight 800Kbit prio 5 maxburst 20 avpkt 1000 \
    bounded

  # tc class add dev eth1 parent 20:1 classid 20:200 cbq bandwidth 10Mbit rate \
    2Mbit allot 1514 weight 200Kbit prio 5 maxburst 20 avpkt 1000 \
    bounded

  # tc qdisc add dev eth1 parent 20:100 sfq quantum 1514b perturb 15
  # tc qdisc add dev eth1 parent 20:200 sfq quantum 1514b perturb 15

  # tc filter add dev eth1 parent 20:0 protocol ip prio 100 u32 match ip src \
    150.151.23.24 flowid 20:200

  # tc filter add dev eth1 parent 20:0 protocol ip prio 25 u32 match ip src \
    150.151.0.0/16 flowid 20:100



  8.3.  What to do with excess bandwidth

  In our hypothetical case, we will find that even when the ISP
  customers are mostly offline (say, at 8AM), our office still gets only
  2Mbit, which is rather wasteful.

  By removing the 'bounded' statements, classes will be able to borrow
  bandwidth from each other.

  Some classes may not wish to borrow their bandwidth to other classes.
  Two rival ISPs on a single link may not want to offer each other
  freebees. In such a case, you can add the keyword 'isolated' at the
  end of your 'tc class add' lines.


  8.4.  Class subdivisions

  FIXME: completely untested suppositions! Try this!

  We can go further than this. Should the employees at the office decide
  to all fire up their 'napster' clients, it is still possible that our
  database runs out of bandwidth. Therefore, we create two subclasses,
  'Human' and 'Database'.

  Our database always needs 500Kbit, so we have 1.5Mbit left for Human
  consumption.

  We now need to create two new classes, within our Office class:


       # tc class add dev eth0 parent 10:200 classid 10:250 cbq bandwidth 10Mbit rate \
         500Kbit allot 1514 weight 50Kbit prio 5 maxburst 20 avpkt 1000 \
         bounded

       # tc class add dev eth0 parent 10:200 classid 10:251 cbq bandwidth 10Mbit rate \
         1500Kbit allot 1514 weight 150Kbit prio 5 maxburst 20 avpkt 1000 \
         bounded



  FIXME: Finish this example!


  8.5.  Loadsharing over multiple interfaces

  FIXME: document TEQL


  9.  More queueing disciplines

  The Linux kernel offers us lots of queueing disciplines. By far the
  most widely used is the pfifo_fast queue - this is the default. This
  also explains why these advanced features are so robust. They are
  nothing more than 'just another queue'.

  Each of these queues has specific strengths and weaknesses. Not all of
  them may be as well tested.

  9.1.  pfifo_fast

  This queue is, as the name says, First In, First Out, which means that
  no packet receives special treatment. At least, not quite. This queue
  has 3 so called 'bands'. Within each band, FIFO rules apply. However,
  as long as there are packets waiting in band 0, band 1 won't be
  processed. Same goes for band 1 and band 2.

  9.2.  Stochastic Fairness Queueing

  SFQ, as said earlier, is not quite deterministic, but works (on
  average).  Its main benefits are that it requires little CPU and
  memory. 'Real' fair queueing requires that the kernel keep track of
  all running sessions.

  Stochastic Fairness Queueing (SFQ) is a simple implementation of fair
  queueing algorithms family. It's less accurate than others, but it
  also requires less calculations while being almost perfectly fair.

  The key word in SFQ is conversation (or flow), being a sequence of
  data packets having enough common parameters to distinguish it from
  other conversations. The parameters used in case of IP packets are
  source and destination address, and the protocol number.

  SFQ consists of dynamically allocated number of FIFO queues, one queue
  for one conversation. The discipline runs in round-robin, sending one
  packet from each FIFO in one turn, and this is why it's called fair.
  The main advantage of SFQ is that it allows fair sharing the link
  between several applications and prevent bandwidth take-over by one
  client. SFQ however cannot determine interactive flows from bulk ones
  -- one usually needs to do the selection with CBQ before, and then
  direct the bulk traffic into SFQ.



  9.3.  Token Bucket Filter

  The Token Bucket Filter (TBF) is a simple queue, that only passes
  packets arriving at rate in bounds of some administratively set limit,
  with possibility to buffer short bursts.

  The TBF implementation consists of a buffer (bucket), constatly filled
  by some virtual pieces of information called tokens, at specific rate
  (token rate). The most important parameter of the bucket is its size,
  that is number of tokens it can store.

  Each arriving token lets one incoming data packet of out the queue and
  is then deleted from the bucket. Associating this algorithm with the
  two flows -- token and data, gives us three possible scenarios:


    The data arrives into TBF at rate equal the rate of incoming
     tokens. In this case each incoming packet has its matching token
     and passes the queue without delay.

    The data arrives into TBF at rate smaller than the token rate.
     Only some tokens are deleted at output of each data packet sent out
     the queue, so the tokens accumulate, up to the bucket size. The
     saved tokens can be then used to send data over the token rate, if
     short data burst occurs.

    The data arrives into TBF at rate bigger than the token rate. In
     this case filter overrun occurs -- incoming data can be only sent
     out without loss until all accumulated tokens are used. After that,
     overlimit packets are dropped.


  The last scenario is very important, because it allows to
  administratively shape the bandwidth available to data, passing the
  filter.  The accumulation of tokens allows short burst of overlimit
  data to be still passed without loss, but any lasting overload will
  cause packets to be constantly dropped.

  The Linux kernel seems to go beyond this specification, and also
  allows us to limit the speed of the burst transmission. However,
  Alexey warns us:


       Note that the peak rate TBF is much more tough: with MTU 1500 P_crit =
       150Kbytes/sec. So, if you need greater peak rates, use alpha with
       HZ=1000 :-)


  FIXME: is this still true with TSC (pentium+)? Well sort of

  FIXME: if not, add section on raising HZ


  9.4.  Random Early Detect

  RED has some extra smartness built in. When a TCP/IP session starts,
  neither end knows the amount of bandwidth available. So TCP/IP starts
  to transmit slowly and goes faster and faster, though limited by the
  latency at which ACKs return.

  Once a link is filling up, RED starts dropping packets, which indicate
  to TCP/IP that the link is congested, and that it should slow down.
  The smart bit is that RED simulates real congestion, and starts to
  drop some packets some time before the link is entirely filled up.
  Once the link is completely saturated, it behaves like a normal
  policer.

  For more information on this, see the Backbone chapter.


  9.5.  Ingress policer qdisc



  The Ingress qdisc comes in handy if you need to ratelimit a host
  without help from routers or other Linux boxes. You can police
  incoming bandwidth and drop packets when this bandwidth exceeds your
  desired rate. This can save your host from a SYN flood, for example,
  and also works to slow down TCP/IP, which responds to dropped packets
  by reducing speed.

  FIXME: instead of dropping, can we also assign it to a real queue?

  FIXME: shaping by dropping packets seems less desirable than using,
  for example, a token bucket filter. Not sure though, Cisco CAR works
  this way, and people appear happy with it.

  See the reference to ``IOS Committed Access Rate'' at the end of this
  document.


  In short: you can use this to limit how fast your computer downloads
  files, thus leaving more of the available bandwidth for others.

  See the section on protecting your host from SYN floods for an example
  on how this works.

  10.  Netfilter & iproute - marking packets

  So far we've seen how iproute works, and netfilter was mentioned a few
  times. This would be a good time to browse through Rusty's Remarkably
  Unreliable guides <http://netfilter.kernelnotes.org/unreliable-
  guides/>. Netfilter itself can be found here
  <http://antarctica.penguincomputing.com/~netfilter/>.

  Netfilter allows us to filter packets, or mangle their headers. One
  special feature is that we can mark a packet with a number. This is
  done with the --set-mark facility.

  As an example, this command marks all packets destined for port 25,
  outgoing mail:



       # iptables -A PREROUTING -i eth0 -t mangle -p tcp --dport 25 \
        -j MARK --set-mark 1



  Let's say that we have multiple connections, one that is fast (and
  expensive, per megabyte) and one that is slower, but flat fee. We
  would most certainly like outgoing mail to go via the cheap route.

  We've already marked the packets with a '1', we now instruct the
  routing policy database to act on this:



       # echo 201 mail.out >> /etc/iproute2/rt_tables
       # ip rule add fwmark 1 table mail.out
       # ip rule ls
       0:      from all lookup local
       32764:  from all fwmark        1 lookup mail.out
       32766:  from all lookup main
       32767:  from all lookup default



  Now we generate the mail.out table with a route to the slow but cheap
  link:



  # /sbin/ip route add default via 195.96.98.253 dev ppp0 table mail.out



  And we are done. Should we want to make exceptions, there are lots of
  ways to achieve this. We can modify the netfilter statement to exclude
  certain hosts, or we can insert a rule with a lower priority that
  points to the main table for our excepted hosts.

  We can also use this feature to honour TOS bits by marking packets
  with a different type of service with different numbers, and creating
  rules to act on that. This way you can even dedicate, say, an ISDN
  line to interactive sessions.

  Needless to say, this also works fine on a host that's doing NAT
  ('masquerading').

  Note: for this to work, you need to have some options enabled in your
  kernel:



       IP: advanced router (CONFIG_IP_ADVANCED_ROUTER) [Y/n/?]
        IP: policy routing (CONFIG_IP_MULTIPLE_TABLES) [Y/n/?]
         IP: use netfilter MARK value as routing key (CONFIG_IP_ROUTE_FWMARK) [Y/n/?]



  11.  More classifiers


  Classifiers are the way by which the kernel decides which queue a
  packet should be placed into. There are various different classifiers,
  each of which can be used for different purposes.


     fw Bases the decision on how the firewall has marked the packet.


     u32
        Bases the decision on fields within the packet (i.e. source IP
        address, etc)


     route
        Bases the decision on which route the packet will be routed by.


     rsvp, rsvp6
        Bases the decision on the target (destination,protocol) and
        optionally the source as well. (I think)


     tcindex
        FIXME: Fill me in

  Note that in general there are many ways in which you can classify
  packet and that it generally comes down to preference as to which
  system you wish to use.

  Classifiers in general accept a few arguments in common. They are
  listed here for convenience:

     protocol
        The protocol this classifier will accept. Generally you will
        only be accepting only IP traffic. Required.


     parent
        The handle this classifier is to be attached to. This handle
        must be an already existing class. Required.


     prio
        The priority of this classifier. Higher numbers get tested
        first.


     handle
        This handle means different things to different filters.

        FIXME: Add more

  All the following sections will assume you are trying to shape the
  traffic going to HostA. They will assume that the root class has been
  configured on 1: and that the class you want to send the selected
  traffic to is 1:1.


  11.1.  The "fw" classifier

  The "fw" classifier relies on the firewall tagging the packets to be
  shaped. So, first we will setup the firewall to tag them:



       # iptables -I PREROUTING -t mangle -p tcp -d HostA \
        -j MARK --set-mark 1



  Now all packets to that machine are tagged with the mark 1. Now we
  build the packet shaping rules to actually shape the packets.  Now we
  just need to indicate that we want the packets that are tagged with
  the mark 1 to go to class 1:1. This is accomplished with the command:



       # tc filter add dev eth1 protocol ip parent 1:0 prio 1 handle 1 fw classid 1:1



  This should be fairly self-explanatory. Attach to the 1:0 class a
  filter with priority 1 to filter all packet marked with 1 in the
  firewall to class 1:1. Note how the handle here is used to indicate
  what the mark should be.

  That's all there is to it! This is the (IMHO) easy way, the other ways
  are I think harder to understand. Note that you can apply the full
  power of the firewalling code with this classifier, including matching
  MAC addresses, user IDs and anything else the firewall can match.


  11.2.  The "u32" classifier

  The U32 filter is the most advanced filter available in the current
  implementation. It entirely based on hashing tables, which make it
  robust when there are many filter rules.

  In its simplest form the U32 filter is a list of records, each
  consisting of two fields: a selector and an action. The selectors,
  described below, are compared with the currently processed IP packet
  until the first match and the associated action is performed. The
  simplest type of action would be directing the packet into defined CBQ
  class.

  The commandline of tc filter program, used to configure the filter,
  consists of three parts: filter specification, a selector and an
  action.  The filter specification can be defined as:



       tc filter add dev IF [ protocol PROTO ]
                            [ (preference|priority) PRIO ]
                            [ parent CBQ ]



  The protocol field describes protocol that the filter will be applied
  to. We will only discuss case of ip protocol. The preference field
  (priority can be used alternatively) sets the priority of currently
  defined filter. This is important, since you can have several filters
  (lists of rules) with different priorities.  Each list will be passed
  in the order the rules were added, then list with lower priority
  (higher preference number) will be processed. The parent field defines
  the CBQ tree top (e.g. 1:0), the filter should be attached to.

  The options decribed apply to all filters, not only U32.


  11.2.1.  U32 selector

  The U32 selector contains definition of the pattern, that will be
  matched to the currently processed packet. Precisely, it defines which
  bits are to be matched in the packet header and nothing more, but this
  simple method is very powerful. Let's take a look at the following
  examplesm taken directly from a pretty complex, real-world filter:



       # filter parent 1: protocol ip pref 10 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:3 \
         match 00100000/00ff0000 at 0



  For now, leave the first line alone - all these parameters describe
  the filter's hash tables. Focus on the selector line, containing match
  keyword. This selector will match to IP headers, whose second byte
  will be 0x10 (0010). As you can guess, the 00ff number is the match
  mask, telling the filter exactly which bits to match. Here it's 0xff,
  so the byte will match if it's exactly 0x10. The at keyword means that
  the match is to be started at specified offset (in bytes) -- in this
  case it's beginning of the packet.  Translating all that to human
  language, the packet will match if its Type of Service field will have
  ,,low delay'' bits set. Let's analyze another rule:



  # filter parent 1: protocol ip pref 10 u32 fh 800::803 order 2051 key ht 800 bkt 0 flowid 1:3 \
    match 00000016/0000ffff at nexthdr+0



  The nexthdr option means next header encapsulated in the IP packet,
  i.e. header of upper-layer protocol. The match will also start here at
  the beginning of the next header. The match should occur in the
  second, 32-bit word of the header. In TCP and UDP protocols this field
  contains packet's destination port. The number is given in big-endian
  format, i.e. older bits first, so we simply read 0x0016 as 22 decimal,
  which stands for SSH service if this was TCP. As you guess, this match
  is ambigous without a context, and we will discuss this later.


  Having understood all the above, we will find the following selector
  quite easy to read: match c0a80100/ffffff00 at 16. What we got here is
  a three byte match at 17-th byte, counting from the IP header start.
  This will match for packets with destination address anywhere in
  192.168.1/24 network. After analyzing the examples, we can summarize
  what we have learnt.


  11.2.2.  General selectors

  General selectors define the pattern, mask and offset the pattern will
  be matched to the packet contents. Using the general selectors you can
  match virtually any single bit in the IP (or upper layer) header. They
  are more difficult to write and read, though, than specific selectors
  that described below. The general selector syntax is:



       match [ u32 | u16 | u8 ] PATTERN MASK [ at OFFSET | nexthdr+OFFSET]



  One of the keywords u32, u16 or u8 specifies length of the pattern in
  bits. PATTERN and MASK should follow, of length defined by the
  previous keyword. The OFFSET parameter is the offset, in bytes, to
  start matching. If nexthdr+ keyword is given, the offset is relative
  to start of the upper layer header.


  Some examples:



       # tc filter add dev ppp14 parent 1:0 prio 10 u32 \
            match u8 64 0xff at 8 \
            flowid 1:4



  Packet will match to this rule, if its time to live (TTL) is 64.  TTL
  is the field starting just after 8-th byte of the IP header.



  # tc filter add dev ppp14 parent 1:0 prio 10 u32 \
       match u8 0x10 0xff at nexthdr+13 \
       protocol tcp \
       flowid 1:3 \



  This rule will only match TCP packets with ACK bit set. Here we can
  see an example of using two selectors, the final result will be
  logical AND of their results. If we take a look at TCP header diagram,
  we can see that the ACK bit is second older bit (0x10) in the 14-th
  byte of the TCP header (at nexthdr+13).  As for the second selector,
  if we'd like to make our life harder, we could write match u8 0x06
  0xff at 9 instead if using the specific selector protocol tcp, because
  6 is the number of TCP protocol, present in 10-th byte of the IP
  header.  On the other hand, in this example we couldn't use any
  specific selector for the first match - simply because there's no
  specific selector to match TCP ACK bits.


  11.2.3.  Specific selectors

  The following table contains a list of all specific selectors the
  author of this section has found in the tc program source code. They
  simply make your life easier and increase readability of your filter's
  configuration.

  FIXME: table placeholder - the table is in separate file
  ,,selector.html''

  FIXME: it's also still in Polish :-(

  FIXME: must be sgml'ized

  Some examples:



       # tc filter add dev ppp0 parent 1:0 prio 10 u32 \
            match ip tos 0x10 0xff \
            flowid 1:4



  The above rule will match packets, which have the TOS field set to
  0x10.  The TOS field starts at second byte of the packet and is one
  byte big, so we coul write an equivalent general selector: match u8
  0x10 0xff at 1. This gives us hint to the internals of U32 filter --
  the specific rules are always translated to general ones, and in this
  form they are stored in the kernel memory. This leads to another
  conclusion -- the tcp and udp selectors are exactly the same and this
  is why you can't use single match tcp dst 53 0xffff selector to match
  TCP packets sent to given port -- they will also match UDP packets
  sent to this port. You must remember to also specify the protocol and
  end up with the following rule:



       # tc filter add dev ppp0 parent 1:0 prio 10 u32 \
               match tcp dst 53 0xffff \
               match ip protocol 0x6 0xff \
               flowid 1:2

  11.3.  The "route" classifier


  This classifier filters based on the results of the routing tables.
  When a packet that is traversing through the classes reaches one that
  is marked with the "route" filter, it splits the packets up based on
  information in the routing table.



       # tc filter add dev eth1 parent 1:0 protocol ip prio 100 route



  Here we add a route classifier onto the parent node 1:0 with priority
  100.  When a packet reaches this node (which, since it is the root,
  will happen immediately) it will consult the routing table and if one
  matches will send it to the given class and give it a priority of 100.
  Then, to finally kick it into action, you add the appropriate routing
  entry:

  The trick here is to define 'realm' based on either destination or
  source.  The way to do it is like this:



       # ip route add Host/Network via Gateway dev Device realm RealmNumber



  For instance, we can define our destination network 192.168.10.0 with
  a realm number 10:



       # ip route add 192.168.10.0/24 via 192.168.10.1 dev eth1 realm 10



  When adding route filters, we can use realm numbers to represent the
  networks or hosts and specify how the routes match the filters.



       # tc filter add dev eth1 parent 1:0 protocol ip prio 100 \
         route to 10 classid 1:10



  The above rule says packets going to the network 192.168.10.0 match
  class id 1:10.

  Route filter can also be used to match source routes. For example,
  there is a subnetwork attached to the Linux router on eth2.



  # ip route add 192.168.2.0/24 dev eth2 realm 2
  # tc filter add dev eth1 parent 1:0 protocol ip prio 100 \
    route from 2 classid 1:2



  Here the filter specifies that packets from the subnetwork 192.168.2.0
  (realm 2) will match class id 1:2.



  11.4.  The "rsvp" classifier

  FIXME: Fill me in


  11.5.  The "tcindex" classifier

  FIXME: Fill me in


  12.  Kernel network parameters

  The kernel has lots of parameters which can be tuned for different
  circumstances. While, as usual, the default parameters serve 99% of
  installations very well, we don't call this the Advanced HOWTO for the
  fun of it!

  The interesting bits are in /proc/sys/net, take a look there. Not
  everything will be documented here initially, but we're working on it.

  12.1.  Reverse Path Filtering

  By default, routers route everything, even packets which 'obviously'
  don't belong on your network. A common example is private IP space
  escaping onto the internet. If you have an interface with a route of
  195.96.96.0/24 to it, you do not expect packets from 212.64.94.1 to
  arrive there.

  Lots of people will want to turn this feature off, so the kernel
  hackers have made it easy. There are files in /proc where you can tell
  the kernel to do this for you. The method is called "Reverse Path
  Filtering". Basically, if the reply to this packet wouldn't go out the
  interface this packet came in, then this is a bogus packet and should
  be ignored.

  The following fragment will turn this on for all current and future
  interfaces.



       # for i in /proc/sys/net/ipv4/conf/*/rp_filter ; do
       >  echo 2 > $i
       > done



  Going by the example above, if a packet arrived on the Linux router on
  eth1 claiming to come from the Office+ISP subnet, it would be dropped.
  Similarly, if a packet came from the Office subnet, claiming to be
  from somewhere outside your firewall, it would be dropped also.

  The above is full reverse path filtering. The default is to only
  filter based on IPs that are on directly connected networks. This is
  because the full filtering breaks in the case of asymmetric routing
  (where packets come in one way and go out another, like satellite
  traffic, or if you have dynamic (bgp, ospf, rip) routes in your
  network. The data comes down through the satellite dish and replies go
  back through normal land-lines).

  If this exception applies to you (and you'll probably know if it does)
  you can simply turn off the rp_filter on the interface where the
  satellite data comes in. If you want to see if any packets are being
  dropped, the log_martians file in the same directory will tell the
  kernel to log them to your syslog.



       # echo 1 >/proc/sys/net/ipv4/conf/<interfacename>/log_martians



  FIXME: is setting the conf/{default,all}/* files enough? - martijn


  12.2.  Obscure settings

  Ok, there are a lot of parameters which can be modified. We try to
  list them all. Also documented (partly) in Documentation/ip-
  sysctl.txt.

  Some of these settings have different defaults based on wether you
  answered 'Yes' to 'Configure as router and not host' while compiling
  your kernel.


  12.2.1.  Generic ipv4

  As a generic note, most rate limiting features don't work on loopback,
  so don't test them locally.

     /proc/sys/net/ipv4/icmp_destunreach_rate
        FIXME: fill this in

     /proc/sys/net/ipv4/icmp_echo_ignore_all
        FIXME: fill this in

     /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts [Useful]
        If you ping the broadcast address of a network, all hosts are
        supposed to respond. This makes for a dandy denial-of-service
        tool. Set this to 1 to ignore these broadcast messages.

     /proc/sys/net/ipv4/icmp_echoreply_rate
        FIXME: fill this in

     /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
        FIXME: fill this in

     /proc/sys/net/ipv4/icmp_paramprob_rate
        FIXME: fill this in

     /proc/sys/net/ipv4/icmp_timeexceed_rate
        This the famous cause of the 'Solaris middle star' in
        traceroutes. Limits number of ICMP Time Exceeded messages sent.
        FIXME: Units of these rates - either I'm stupid, or this just
        doesn't work

     /proc/sys/net/ipv4/igmp_max_memberships
        FIXME: fill this in

     /proc/sys/net/ipv4/inet_peer_gc_maxtime
        FIXME: fill this in

     /proc/sys/net/ipv4/inet_peer_gc_mintime
        FIXME: fill this in

     /proc/sys/net/ipv4/inet_peer_maxttl
        FIXME: fill this in

     /proc/sys/net/ipv4/inet_peer_minttl
        FIXME: fill this in

     /proc/sys/net/ipv4/inet_peer_threshold
        FIXME: fill this in

     /proc/sys/net/ipv4/ip_autoconfig
        FIXME: fill this in

     /proc/sys/net/ipv4/ip_default_ttl
        Time To Live of packets. Set to a safe 64. Raise it if you have
        a huge network. Don't do so for fun - routing loops cause much
        more damage that way. You might even consider lowering it in
        some circumstances.

     /proc/sys/net/ipv4/ip_dynaddr
        You need to set this if you use dial-on-demand with a dynamic
        interface address. Once your demand interface comes up, any
        queued packets will be rebranded to have the right address. This
        solves the problem that the connection that brings up your
        interface itself does not work, but the second try does.

     /proc/sys/net/ipv4/ip_forward
        If the kernel should attempt to forward packets. Off by default
        for hosts, on by default when configured as a router.

     /proc/sys/net/ipv4/ip_local_port_range
        Range of local ports for outgoing connections. Actually quite
        small by default, 1024 to 4999.

     /proc/sys/net/ipv4/ip_no_pmtu_disc
        Set this if you want to disable Path MTU discovery - a technique
        to determince the largest Maximum Transfer Unit possible on you
        path.

     /proc/sys/net/ipv4/ipfrag_high_thresh
        FIXME: fill this in

     /proc/sys/net/ipv4/ipfrag_low_thresh
        FIXME: fill this in

     /proc/sys/net/ipv4/ipfrag_time
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_abort_on_overflow
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_fin_timeout
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_keepalive_intvl
        FIXME: fill this in


     /proc/sys/net/ipv4/tcp_keepalive_probes
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_keepalive_time
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_max_orphans
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_max_syn_backlog
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_max_tw_buckets
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_orphan_retries
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_retrans_collapse
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_retries1
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_retries2
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_rfc1337
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_sack
        Use Selective ACK which can be used to signify that only a
        single packet is missing - therefore helping fast recovery.

     /proc/sys/net/ipv4/tcp_stdurg
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_syn_retries
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_synack_retries
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_timestamps
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_tw_recycle
        FIXME: fill this in

     /proc/sys/net/ipv4/tcp_window_scaling
        TCP/IP normally allows windows up to 65535 bytes big. For really
        fast networks, this may not be enough. The window scaling
        options allows for almost gigabyte windows, which is good for
        high bandwidth*delay products.


  12.2.2.  Per device settings

  DEV can either stand for a real interface, or for 'all' or 'default'.
  Default also changes settings for interfaces yet to be created.

     /proc/sys/net/ipv4/conf/DEV/accept_redirects
        If a router decides that you are using it for a wrong purpose
        (ie, it needs to resend your packet on the same interface), it
        will send us a ICMP Redirect. This is a slight security risk
        however, so you may want to turn it off, or use secure
        redirects.

     /proc/sys/net/ipv4/conf/DEV/accept_source_route
        Not used very much anymore. You used to be able to give a packet
        a list of IP addresses it should visit on its way. Linux can be
        made to honor this IP option.

     /proc/sys/net/ipv4/conf/DEV/bootp_relay
        FIXME: fill this in

     /proc/sys/net/ipv4/conf/DEV/forwarding
        FIXME:

     /proc/sys/net/ipv4/conf/DEV/log_martians
        See the section on reverse path filters.

     /proc/sys/net/ipv4/conf/DEV/mc_forwarding
        If we do multicast forwarding on this interface

     /proc/sys/net/ipv4/conf/DEV/proxy_arp
        FIXME: fill this in

     /proc/sys/net/ipv4/conf/DEV/rp_filter
        See the section on reverse path filters.

     /proc/sys/net/ipv4/conf/DEV/secure_redirects
        FIXME: fill this in

     /proc/sys/net/ipv4/conf/DEV/send_redirects
        If we send the above mentioned redirects.

     /proc/sys/net/ipv4/conf/DEV/shared_media
        FIXME: fill this in

     /proc/sys/net/ipv4/conf/DEV/tag
        FIXME: fill this in



  12.2.3.  Neighbor pollicy

  Dev can either stand for a real interface, or for 'all' or 'default'.
  Default also changes settings for interfaces yet to be created.

     /proc/sys/net/ipv4/neigh/DEV/anycast_delay
        FIXME: fill this in

     /proc/sys/net/ipv4/neigh/DEV/app_solicit
        FIXME: fill this in

     /proc/sys/net/ipv4/neigh/DEV/base_reachable_time
        FIXME: fill this in

     /proc/sys/net/ipv4/neigh/DEV/delay_first_probe_time
        FIXME: fill this in

     /proc/sys/net/ipv4/neigh/DEV/gc_stale_time
        FIXME: fill this in

     /proc/sys/net/ipv4/neigh/DEV/locktime
        FIXME: fill this in

     /proc/sys/net/ipv4/neigh/DEV/mcast_solicit
        FIXME: fill this in


     /proc/sys/net/ipv4/neigh/DEV/proxy_delay
        FIXME: fill this in

     /proc/sys/net/ipv4/neigh/DEV/proxy_qlen
        FIXME: fill this in

     /proc/sys/net/ipv4/neigh/DEV/retrans_time
        FIXME: fill this in

     /proc/sys/net/ipv4/neigh/DEV/ucast_solicit
        FIXME: fill this in

     /proc/sys/net/ipv4/neigh/DEV/unres_qlen
        FIXME: fill this in



  12.2.4.  Routing settings


     /proc/sys/net/ipv4/route/error_burst
        FIXME: fill this in

     /proc/sys/net/ipv4/route/error_cost
        FIXME: fill this in

     /proc/sys/net/ipv4/route/flush
        FIXME: fill this in

     /proc/sys/net/ipv4/route/gc_elasticity
        FIXME: fill this in

     /proc/sys/net/ipv4/route/gc_interval
        FIXME: fill this in

     /proc/sys/net/ipv4/route/gc_min_interval
        FIXME: fill this in

     /proc/sys/net/ipv4/route/gc_thresh
        FIXME: fill this in

     /proc/sys/net/ipv4/route/gc_timeout
        FIXME: fill this in

     /proc/sys/net/ipv4/route/max_delay
        FIXME: fill this in

     /proc/sys/net/ipv4/route/max_size
        FIXME: fill this in

     /proc/sys/net/ipv4/route/min_adv_mss
        FIXME: fill this in

     /proc/sys/net/ipv4/route/min_delay
        FIXME: fill this in

     /proc/sys/net/ipv4/route/min_pmtu
        FIXME: fill this in

     /proc/sys/net/ipv4/route/mtu_expires
        FIXME: fill this in

     /proc/sys/net/ipv4/route/redirect_load
        FIXME: fill this in


     /proc/sys/net/ipv4/route/redirect_number
        FIXME: fill this in

     /proc/sys/net/ipv4/route/redirect_silence
        FIXME: fill this in



  13.  Backbone applications of traffic control

  This chapter is meant as an introduction to backbone routing, which
  often involves >100 megabit bandwidths, which requires a different
  approach then your ADSL modem at home.


  13.1.  Router queues

  The normal behaviour of router queues on the Internet is called tail-
  drop.  Tail-drop works by queueing up to a certain amount, then
  dropping all traffic that 'spills over'. This is very unfair, and also
  leads to retransmit synchronisation. When retransmit synchronisation
  occurs, the sudden burst of drops from a router that has reached its
  fill will cause a delayed burst of retransmits, which will over fill
  the congested router again.

  In order to cope with transient congestion on links, backbone routers
  will often implement large queues. Unfortunately, while these queues
  are good for throughput, they can substantially increase latency and
  cause TCP connections to behave very bursty during congestion.

  These issues with tail-drop are becoming increasingly troublesome on
  the Internet because the use of network unfriendly applications is
  increasing.  The Linux kernel offers us RED, short for Random Early
  Detect.

  RED isn't a cure-all for this, applications which inappropriately fail
  to implement exponential backoff still get an unfair share of the
  bandwidth, however, with RED they do not cause as much harm to the
  throughput and latency of other connections.

  RED statistically drops packets from flows before it reaches its hard
  limit. This causes a congested backbone link to slow more gracefully,
  and prevents retransmit synchronisation. This also helps TCP find its
  'fair' speed faster by allowing some packets to get dropped sooner
  keeping queue sizes low and latency under control. The probability of
  a packet being dropped from a particular connection is proportional to
  its bandwidth usage rather then the number of packets it transmits.

  RED is a good queue for backbones, where you can't afford the
  complexity of per-session state tracking needed by fairness queueing.

  In order to use RED, you must decide on three parameters: Min, Max,
  and burst. Min sets the minimum queue size in bytes before dropping
  will begin, Max is a soft maximum that the algorithm will attempt to
  stay under, and burst sets the maximum number of packets that can
  'burst through'.

  You should set the min by calculating that highest acceptable base
  queueing latency you wish, and multiply it by your bandwidth. For
  instance, on my 64kbit/s ISDN link, I might want a base queueing
  latency of 200ms so I set min to 1600 bytes. Setting min too small
  will degrade throughput and too large will degrade latency. Setting a
  small min is not a replacement for reducing the MTU on a slow link to
  improve interactive response.


  You should make max at least twice min to prevent synchronisation. On
  slow links with small min's it might be wise to make max perhaps four
  or more times large then min.

  Burst controls how the RED algorithm responds to bursts. Burst must be
  set large then min/avpkt. Experimentally, I've found
  (min+min+max)/(3*avpkt) to work okay.

  Additionally, you need to set limit and avpkt. Limit is a safety
  value, after there are limit bytes in the queue, RED 'turns into'
  tail-drop. I typical set limit to eight times max. Avpkt should be
  your average packet size. 1000 works okay on high speed Internet links
  with a 1500byte MTU.

  Read the paper on RED queueing
  <http://www.aciri.org/floyd/papers/red/red.html> by Sally Floyd and
  Van Jacobson for technical information.

  FIXME: more needed. This means *you* greg :-) - ahu



  14.  Shaping Cookbook

  This section contains 'cookbook' entries which may help you solve
  problems.  A cookbook is no replacement for understanding however, so
  try and comprehend what is going on.


  14.1.  Running multiple sites with different SLAs

  You can do this in several ways. Apache has some support for this with
  a module, but we'll show how Linux can do this for you, and do so for
  other services as well. These commands are stolen from a presentation
  by Jamal Hadi that's referenced below.

  Let's say we have two customers, with http, ftp and streaming audio,
  and we want to sell them a limited amount of bandwidth. We do so on
  the server itself.

  Customer A should have at most 2 megabits, cusomer B has paid for 5
  megabits. We separate our customers by creating virtual IP addresses
  on our server.



       # ip address add 188.177.166.1 dev eth0
       # ip address add 188.177.166.2 dev eth0



  It is up to you to attach the different servers to the right IP
  address. All popular daemons have support for this.

  We first attach a CBQ qdisc to eth0:


       # tc qdisc add dev eth0 root handle 1: bandwidth 10Mbit cell 8 avpkt 1000 \
         mpu 64



  We then create classes for our customers:

       # tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate \
         2MBit avpkt 1000 prio 5 bounded isolated allot 1514 weight 1 maxburst 21
       # tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 10Mbit rate \
         5Mbit avpkt 1000 prio 5 bounded isolated allot 1514 weight 1 maxburst 21



  Then we add filters for our two classes:


       ##FIXME: Why this line, what does it do?, what is a divisor?:
       ##FIXME: A divisor has something to do with a hash table, and the number of
       ##       buckets - ahu
       # tc filter add dev eth0 parent 1:0 protocol ip prio 5 handle 1: u32 divisor 1
       # tc filter add dev eth0 parent 1:0 prio 5 u32 match ip src 188.177.166.1
         flowid 1:1
       # tc filter add dev eth0 parent 1:0 prio 5 u32 match ip src 188.177.166.2
         flowid 1:2



  And we're done.

  FIXME: why no token bucket filter? is there a default pfifo_fast
  fallback somewhere?


  14.2.  Protecting your host from SYN floods

  From Alexeys iproute documentation, adapted to netfilter and with more
  plausible paths. If you use this, take care to adjust the numbers to
  reasonable values for your system.

  If you want to protect an entire network, skip this script, which is
  best suited for a single host.



  #! /bin/sh -x
  #
  # sample script on using the ingress capabilities
  # this script shows how one can rate limit incoming SYNs
  # Useful for TCP-SYN attack protection. You can use
  # IPchains to have more powerful additions to the SYN (eg
  # in addition the subnet)
  #
  #path to various utilities;
  #change to reflect yours.
  #
  TC=/sbin/tc
  IP=/sbin/ip
  IPTABLES=/sbin/iptables
  INDEV=eth2
  #
  # tag all incoming SYN packets through $INDEV as mark value 1
  ############################################################
  $iptables -A PREROUTING -i $INDEV -t mangle -p tcp --syn \
    -j MARK --set-mark 1
  ############################################################
  #
  # install the ingress qdisc on the ingress interface
  ############################################################
  $TC qdisc add dev $INDEV handle ffff: ingress
  ############################################################

  #
  #
  # SYN packets are 40 bytes (320 bits) so three SYNs equals
  # 960 bits (approximately 1kbit); so we rate limit below
  # the incoming SYNs to 3/sec (not very sueful really; but
  #serves to show the point - JHS
  ############################################################
  $TC filter add dev $INDEV parent ffff: protocol ip prio 50 handle 1 fw \
  police rate 1kbit burst 40 mtu 9k drop flowid :1
  ############################################################


  #
  echo "---- qdisc parameters Ingress  ----------"
  $TC qdisc ls dev $INDEV
  echo "---- Class parameters Ingress  ----------"
  $TC class ls dev $INDEV
  echo "---- filter parameters Ingress ----------"
  $TC filter ls dev $INDEV parent ffff:

  #deleting the ingress qdisc
  #$TC qdisc del $INDEV ingress



  14.3.  Ratelimit ICMP to prevent dDoS

  Recently, distributed denial of service attacks have become a major
  nuisance on the internet. By properly filtering and ratelimiting your
  network, you can both prevent becoming a casualty or the cause of
  these attacks.

  You should filter your networks so that you do not allow non-local IP
  source addressed packets to leave your network. This stops people from
  anonymously sending junk to the internet.



  Rate limiting goes much as shown earlier. To refresh your memory, our
  ASCIIgram again:



       [The Internet] ---<E3, T3, whatever>--- [Linux router] --- [Office+ISP]
                                             eth1          eth0



  We first set up the prerequisite parts:



       # tc qdisc add dev eth0 root handle 10: cbq bandwidth 10Mbit avpkt 1000
       # tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate \
         10Mbit allot 1514 prio 5 maxburst 20 avpkt 1000



  If you have 100Mbit, or more, interfaces, adjust these numbers. Now
  you need to determine how much ICMP traffic you want to allow. You can
  perform measurements with tcpdump, by having it write to a file for a
  while, and seeing how much ICMP passes your network. Do not forget to
  raise the snapshot length!

  If measurement is impractical, you might want to choose 5% of your
  available bandwidth. Let's set up our class:


       # tc class add dev eth0 parent 10:1 classid 10:100 cbq bandwidth 10Mbit rate \
         100Kbit allot 1514 weight 800Kbit prio 5 maxburst 20 avpkt 250 \
         bounded



  This limits at 100Kbit. Now we need a filter to assign ICMP traffic to
  this class:


       # tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip
         protocol 1 0xFF flowid 10:100



  14.4.  Prioritising interactive traffic

  If lots of data is coming down your link, or going up for that matter,
  and you are trying to do some maintenance via telnet or ssh, this may
  not go too well. Other packets are blocking your keystrokes. Wouldn't
  it be great if there were a way for your interactive packets to sneak
  past the bulk traffic? Linux can do this for you!

  As before, we need to handle traffic going both ways. Evidently, this
  works best if there are Linux boxes on both ends of your link,
  although other UNIX's are able to do this. Consult your local
  Solaris/BSD guru for this.

  The standard pfifo_fast scheduler has 3 different 'bands'. Traffic in
  band 0 is transmitted first, after which traffic in band 1 and 2 gets
  considered.  It is vital that our interactive traffic be in band 0!
  We blatantly adapt from the (soon to be obsolete) ipchains HOWTO:

  There are four seldom-used bits in the IP header, called the Type of
  Service (TOS) bits. They effect the way packets are treated; the four
  bits are "Minimum Delay", "Maximum Throughput", "Maximum Reliability"
  and "Minimum Cost". Only one of these bits is allowed to be set. Rob
  van Nieuwkerk, the author of the ipchains TOS-mangling code, puts it
  as follows:


       Especially the "Minimum Delay" is important for me. I switch it on for
       "interactive" packets in my upstream (Linux) router. I'm behind a 33k6
       modem link. Linux prioritises packets in 3 queues. This way I get
       acceptable interactive performance while doing bulk downloads at the
       same time.


  The most common use is to set telnet & ftp control connections to
  "Minimum Delay" and FTP data to "Maximum Throughput". This would be
  done as follows, on your upstream router:



       # iptables -A PREROUTING -t mangle -p tcp --sport telnet \
         -j TOS --set-tos Minimize-Delay
       # iptables -A PREROUTING -t mangle -p tcp --sport ftp \
         -j TOS --set-tos Minimize-Delay
       # iptables -A PREROUTING -t mangle -p tcp --sport ftp-data \
         -j TOS --set-tos Maximize-Throughput



  Now, this only works for data going from your telnet foreign host to
  your local computer. The other way around appears to be done for you,
  ie, telnet, ssh & friends all set the TOS field on outgoing packets
  automatically.

  Should you have a client that does not do this, you can always do it
  with netfilter. On your local box:



       # iptables -A OUTPUT -t mangle -p tcp --dport telnet \
         -j TOS --set-tos Minimize-Delay
       # iptables -A OUTPUT -t mangle -p tcp --dport ftp \
         -j TOS --set-tos Minimize-Delay
       # iptables -A OUTPUT -t mangle -p tcp --dport ftp-data \
         -j TOS --set-tos Maximize-Throughput



  15.  Advanced Linux Routing

  This section is for all you people who either want to understand why
  the whole system works or have a configuration that's so bizarre that
  you need the low down to make it work.

  This section is completely optional. It's quite possible that this
  section will be quite complex and really not intended for normal
  users. You have been warned.

  FIXME: Decide what really need to go in here.

  15.1.  How does packet queueing really work?

  This is the low-down on how the packet queueing system really works.

  Lists the steps the kernel takes to classify a packet, etc...

  FIXME: Write this.


  15.2.  Advanced uses of the packet queueing system

  Go through Alexeys extremely tricky example involving the unused bits
  in the TOS field.

  FIXME: Write this.


  15.3.  Other packet shaping systems

  I'd like to include a brief description of other packet shaping
  systems in other operating systems and how they compare to the Linux
  one. Since Linux is one of the few OSes that has a completely original
  (non-BSD derived) TCP/IP stack, I think it would be useful to see how
  other people do it.

  Unfortunately I have no experiene with other systems so cannot write
  this.

  FIXME: Anyone? - Martijn


  16.  Dynamic routing - OSPF and BGP

  Once your network starts to get really big, or you start to consider
  'the internet' as your network, you need tools which dynamically route
  your data.  Sites are often connected to each other with multiple
  links, and more are popping up all the time.

  The Internet has mostly standardised on OSPF and BGP4 (rfc1771). Linux
  supports both, by way of gated and zebra

  While currently not within the scope of this document, we would like
  to point you to the definitive works:

  Overview:

  Cisco Systems Designing large-scale IP internetworks
  <http://www.cisco.com/univercd/cc/td/doc/cisintwk/idg4/nd2003.htm>



  For OSPF:

  Moy, John T.  "OSPF.  The anatomy of an Internet routing protocol"
  Addison Wesley. Reading, MA. 1998.

  Halabi has also written a good guide to OSPF routing design, but this
  appears to have been dropped from the Cisco web site.


  For BGP:

  Halabi, Bassam "Internet routing architectures" Cisco Press (New
  Riders Publishing). Indianapolis, IN. 1997.


  also

  Cisco Systems

  Using the Border Gateway Protocol for interdomain routing
  <http://www.cisco.com/univercd/cc/td/doc/cisintwk/ics/icsbgp4.htm>


  Although the examples are Cisco-specific, they are remarkably similar
  to the configuration language in Zebra :-)

  17.  Further reading


     http://snafu.freedom.org/linux2.2/iproute-notes.html
        <http://snafu.freedom.org/linux2.2/iproute-notes.html>
        Contains lots of technical information, comments from the kernel

     http://www.davin.ottawa.on.ca/ols/
        <http://www.davin.ottawa.on.ca/ols/>
        Slides by Jamal Hadi, one of the authors of Linux traffic
        control

     http://defiant.coinet.com/iproute2/ip-cref/ <http://defi
        ant.coinet.com/iproute2/ip-cref/>
        HTML version of Alexeys LaTeX documentation - explains part of
        iproute2 in great detail

     http://www.aciri.org/floyd/cbq.html
        <http://www.aciri.org/floyd/cbq.html>
        Sally Floyd has a good page on CBQ, including her original
        papers. None of it is Linux specific, but it does a fair job
        discussing the theory and uses of CBQ.  Very technical stuff,
        but good reading for those so inclined.


     http://ceti.pl/%7ekravietz/cbq/NET4_tc.html
        <http://ceti.pl/%7ekravietz/cbq/NET4_tc.html>
        Yet another HOWTO, this time in Polish! You can copy/paste
        command lines however, they work just the same in every
        language. The author is cooperating with us and may soon author
        sections of this HOWTO.


     Differentiated Services on Linux <http://snafu.free
        dom.org/linux2.2/docs/draft-almesberger-wajhak-diffserv-
        linux-00.txt>
        Discussion on how to use Linux in a diffserv compliant
        environment. Pretty far removed from your everyday routing
        needs, but very interesting none the less. We may include a
        section on this at a later date.


     IOS Committed Access Rate <http://www.cisco.com/uni
        vercd/cc/td/doc/product/software/ios111/cc111/car.htm>

        >From the helpful folks of Cisco who have the laudable habit of
        putting their documentation online. Cisco syntax is different
        but the concepts are the same, except that we can do more and do
        it without routers the price of cars :-)


     TCP/IP Illustrated, volume 1, W. Richard Stevens, ISBN
        0-201-63346-9
        Required reading if you truly want to understand TCP/IP.
        Entertaining as well.
  18.  Acknowledgements


  It is our goal to list everybody who has contributed to this HOWTO, or
  helped us demistify how things work. While there are currently no
  plans for a Netfilter type scoreboard, we do like to recognise the
  people who are helping.


    Jamal Hadi <hadi%cyberus.ca>

    Nadeem Hasan <nhasan@usa.net>

    Jason Lunz <j@cc.gatech.edu>

    Alexey Mahotkin <alexm@formulabez.ru>

    Pawel Krawczyk <kravietz%alfa.ceti.pl>

    Wim van der Most

    Glen Turner <glen.turner%aarnet.edu.au>

    Song Wang <wsong@ece.uci.edu>



  Brief Introduction to Alpha Systems and Processors
  Neal Crook, Digital Equipment (Editor: David Mosberger
  <mailto:davidm@azstarnet.com>)
  V0.11, 6 June 1997

  This document is a brief overview of existing Alpha CPUs, chipsets and
  systems. It has something of a hardware bias, reflecting my own area
  of expertese. Although I am an employee of Digital Equipment Corpora-
  tion, this is not an official statement by Digital and any opinions
  expressed are mine and not Digital's.
  ______________________________________________________________________

  Table of Contents


  1. What is Alpha

  2. What is Digital Semiconductor

  3. Alpha CPUs

  4. 21064 performance vs 21066 performance

  5. A Few Notes On Clocking

  6. The chip-sets

  7. The Systems

  8. Bytes and all that stuff

  9. PALcode and all that stuff

  10. Porting

  11. More Information

  12. References



  ______________________________________________________________________

  1.  What is Alpha

  "Alpha" is the name given to Digital's 64-bit RISC architecture. The
  Alpha project in Digital began in mid-1989, with the goal of providing
  a high-performance migration path for VAX customers. This was not the
  first RISC architecture to be produced by Digital, but it was the
  first to reach the market. When Digital announced Alpha, in March
  1992, it made the decision to enter the merchant semicondutor market
  by selling Alpha microprocessors.


  Alpha is also sometimes referred to as Alpha AXP, for obscure and
  arcane reasons that aren't worth persuing. Suffice it to say that they
  are one and the same.


  2.  What is Digital Semiconductor

  Digital Semiconductor <http://www.digital.com/info/semiconductor/>
  (DS) is the business unit within Digital Equipment Corporation
  (Digital - we don't like the name DEC) that sells semiconductors on
  the merchant market. Digital's products include CPUs, support
  chipsets, PCI-PCI bridges and PCI peripheral chips for comms and
  multimedia.


  3.  Alpha CPUs

  There are currently 2 generations of CPU core that implement the Alpha
  architecture:


  o  EV4

  o  EV5


  Opinions differ as to what "EV" stands for (Editor's note: the true
  answer is of course "Electro Vlassic" ``[1]''), but the number
  represents the first generation of Digital's CMOS technology that the
  core was implemented in. So, the EV4 was originally implemented in
  CMOS4. As time goes by, a CPU tends to get a mid-life performance kick
  by being optically shrunk into the next generation of CMOS process.
  EV45, then, is the EV4 core implemented in CMOS5 process. There is a
  big difference between shrinking a design into a particular technology
  and implementing it from scratch in that technology (but I don't want
  to go into that now). There are a few other wildcards in here: there
  is also a CMOS4S (optical shrink in CMOS4) and a CMOS5L.


  True technophiles will be interested to know that CMOS4 is a 0.75
  micron process, CMOS5 is a 0.5 micron process and CMOS6 is a 0.35
  micron process.


  To map these CPU cores to chips we get:


     21064-150,166
        EV4 (originally), EV4S (now)

     21064-200
        EV4S

     21064A-233,275,300
        EV45

     21066
        LCA4S (EV4 core, with EV4 FPU)

     21066A-233
        LCA45 (EV4 core, but with EV45 FPU)

     21164-233,300,333
        EV5

     21164A-417
        EV56

     21264
        EV6 <http://www.mdronline.com/report/articles/21264/21264.html>



  The EV4 core is a dual-issue (it can issue 2 instructions per CPU
  clock) superpipelined core with integer unit, floating point unit and
  branch prediction. It is fully bypassed and has 64-bit internal data
  paths and tightly coupled 8Kbyte caches, one each for Instruction and
  Data. The caches are write-through (they never get dirty).
  The EV45 core has a couple of tweaks to the EV4 core: it has a
  slightly improved floating point unit, and 16KB caches, one each for
  Instruction and Data (it also has cache parity).  (Editor's note: Neal
  Crook indicated in a separate mail that the changes to the floating
  point unit (FPU) improve the performance of the divider.  The EV4 FPU
  divider takes 34 cycles for a single-precision divide and 63 cycles
  for a double-precision divide (non data-dependent).  In constrast, the
  EV45 divider takes typically 19 cycles (34 cycles max) for single-
  precision and typically 29 cycles (63 cycles max) for a double-
  precision division (data-dependent).)


  The EV5 core is a quad-issue core, also superpipelined, fully bypassed
  etc etc. It has tightly-coupled 8Kbyte caches, one each for I and D.
  These caches are write-through. It also has a tightly-coupled 96Kbyte
  on-chip second-level cache (the Scache) which is 3-way set associative
  and write-back (it can be dirty). The EV4->EV5 performance increase is
  better than just the increase achieved by clock speed improvements. As
  well as the bigger caches and quad issue, there are microarchitectural
  improvements to reduce producer/consumer latencies in some paths.


  The EV56 core is fundamentally the same microarchitecture as the EV5,
  but it adds some new instructions for 8 and 16-bit loads and stores
  (see Section ``Bytes and all that stuff''). These are primarily
  intended for use by device drivers. The EV56 core is implemented in
  CMOS6, which is a 2.0V process.


  The 21064 was anounced in March 1992. It uses the EV4 core, with a
  128-bit bus interface. The bus interface supports the 'easy'
  connection of an external second-level cache, with a block size of
  256-bits (2 data beats on the bus). The Bcache timing is completely
  software configurable. The 21064 can also be configured to use a
  64-bit external bus, (but I'm not sure if any shipping system uses
  this mode). The 21064 does not impose any policy on the Bcache, but it
  is usually configured as a write-back cache. The 21064 does contain
  hooks to allow external hardware to maintain cache coherence with the
  Bcache and internal caches, but this is hairy.


  The 21066 uses the EV4 core and integrates a memory controller and PCI
  host bridge. To save pins, the memory controller has a 64-bit data bus
  (but the internal caches have a block size of 256 bits, just like the
  21064, therefore a block fill takes 4 beats on the bus). The memory
  controller supports an external Bcache and external DRAMs. The timing
  of the Bcache and DRAMs is completely software configurable, and can
  be controlled to the resolution of the CPU clock period. Having a
  4-beat process to fill a cache block isn't as bad as it sounds because
  the DRAM access is done in page mode. Unfortunately, the memory
  controller doesn't support any of the new esoteric DRAMs (SDRAM, EDO
  or BEDO) or synchronous cache RAMs. The PCI bus interface is fully
  rev2.0 compliant and runs at upto 33MHz.


  The 21164 has a 128-bit data bus and supports split reads, with upto 2
  reads outstanding at any time (this allows 100% data bus utilisation
  under best-case dream-on conditions, i.e., you can theoretically
  transfer 128-bits of data on every bus clock). The 21164 supports easy
  connection of an external 3-rd level cache (Bcache) and has all the
  hooks to allow external systems to maintain full cache coherence with
  all caches. Therefore, symmetric multiprocessor designs are 'easy'.


  The 21164A was announced in October, 1995. It uses the EV56 core. It
  is nominally pin-compatible with the 21164, but requires split power
  rails; all of the power pins that were +3.3V power on the 21164 have
  now been split into two groups; one group provided 2.0V power to the
  CPU core, the other group supplies 3.3V to the I/O cells. Unlike older
  implementations, the 21164 pins are not 5V-tolerant. The end result of
  this change is that 21164 systems are, in general, not upgradeable to
  the 21164A (though note that it would be relatively straightforward to
  design a 21164A system that could also accommodate a 21164). The
  21164A also has a couple of new pins to support the new 8 and 16-bit
  loads and stores. It also improves the 21164 support for using
  synchronus SRAMs to implement the external Bcache.



  4.  21064 performance vs 21066 performance

  The 21064 and the 21066 have the same (EV4) CPU core. If the same
  program is run on a 21064 and a 21066, at the same CPU speed, then the
  difference in performance comes only as a result of system
  Bcache/memory bandwidth. Any code thread that has a high hit-rate on
  the internal caches will perform the same. There are 2 big performance
  killers:


  1. Code that is write-intensive. Even though the 21064 and the 21066
     have write buffers to swallow some of the delays, code that is
     write-intensive will be throttled by write bandwidth at the system
     bus. This arises because the on-chip caches are write-through.

  2. Code that wants to treat floats as integers. The Alpha architecture
     does not allow register-register transfers from integer registers
     to floating point registers. Such a conversion has to be done via
     memory (And therefore, because the on-chip caches are write-
     through, via the Bcache).  (Editor's note: it seems that both the
     EV4 and EV45 can perform the conversion through the primary data
     cache (Dcache), provided that the memory is cached already.  In
     such a case, the store in the conversion sequence will update the
     Dcache and the subsequent load is, under certain circumstances,
     able to read the updated d-cache value, thus avoiding a costly
     roundtrip to the Bcache.  In particular, it seems best to execute
     the stq/ldt or stt/ldq instructions back-to-back, which is somewhat
     counter-intuitive.)


  If you make the same comparison between a 21064A and a 21066A, there
  is an additional factor due to the different Icache and Dcache sizes
  between the two chips.


  Now, the 21164 solves both these problems: it achieve much higher
  system bus bandwidths (despite having the same number of signal pins -
  yes, I know it's got about twice as many pins as a 21064, but all
  those extra ones are power and ground! (yes, really!!))  and it has
  write-back caches. The only remaining problem is the answer to the
  question "how much does it cost?"



  5.  A Few Notes On Clocking

  All of the current Alpha CPUs use high-speed clocks, because their
  microarchitectures have been designed as so-called short-tick designs.
  None of the sytem busses have to run at horrendous speeds as a result
  though:


  o  on the 21066(A), 21064(A), 21164 the off-chip cache (Bcache) timing
     is completely programmable, to the resolution of the CPU clock. For
     example, on a 275MHz CPU, the Bcache read access time can be
     controller with a resolution of 3.6ns

  o  on the 21066(A), the DRAM timing is completely programmable, to the
     resolution of the CPU clock (not the PCI clock, the CPU clock).

  o  on the 21064(A), 21164(A), the system bus frequency is a sub-
     multiple of the CPU clock frequency. Most of the 21064 motherboards
     use a 33MHz system bus clock.

  o  Systems that use the 21066 can run the PCI at any frequency
     relative to the CPU. Generally, the PCI runs at 33MHz.

  o  Systems that use the APECs chipset (see Section ``'') always have
     their CPU system bus equal to their PCI bus frequency. This means
     that both busses tends to run at either 25MHz or 33MHz (since these
     are the frequencies that scale up to match the CPU frequencies). On
     APECs systems, the DRAM controller timings are software
     programmable in terms of the CPU system bus frequency

  Aside: someone suggested that they were getting bad performance on a
  21066 because the 21066 memory controller was only running at 33MHz.
  Actually, it's the superfast 21064A systems that have memory
  controllers that 'only' run at 33MHz.



  6.  The chip-sets

  DS sells two CPU support chipsets. The 2107x chipset (aka APECS) is a
  21064(A) support chiset. The 2117x chipset (aka ALCOR) is a 21164
  support chipset. There will also be 2117xA chipset (aka ALCOR 2) as a
  21164A support chipset.


  Both chipsets provide memory controllers and PCI host bridges for
  their CPU. APECS provides a 32-bit PCI host bridge, ALCOR provides a
  64-bit PCI host bridge which (in accordance with the requirements of
  the PCI spec) can support both 32-bit and 64-bit PCI devices.


  APECS consists of 6, 208-pin chips (4, 32-bit data slices (DECADE), 1
  system controller (COMANCHE), 1 PCI controller (EPIC)). It provides a
  DRAM controller (128-bit memory bus) and a PCI interface. It also does
  all the work to maintain memory coherence when a PCI device DMAs into
  (or out of) memory.


  ALCOR consists of 5 chips (4, 64-bit data slices (Data Switch, DSW) -
  208-pin PQFP and 1 control (Control, I/O Address, CIA) - a 383 pin
  plastic PGA).  It provides a DRAM controller (256-bit memory bus) and
  a PCI interface. It also does all the work required to support an
  external Bcache and to maintain memory coherence when a PCI device
  DMAs into (or out of) memory.


  There is no support chipset for the 21066, since the memory controller
  and PCI host bridge functionality are integrated onto the chip.


  7.  The Systems

  The applications engineering group in DS produces example designs
  using the CPUs and support chipsets. These are typically PC-AT size
  motherboards, with all the functionality that you'd typically find on
  a high-end Pentium motherboard. Originally, these example designs were
  intended to be used as starting points for third-parties to produce
  motherboard designs from. These first-generation designs were called
  Evaluation Boards (EBs). As the amount of engineering required to
  build a motherboard has increased (due to higher-speed clocks and the
  need to meet RF emission and susceptibility regulations) the emphasis
  has shifted towards providing motherboards that are suitable for
  volume manufacture.


  Digital's system groups have produced several generations of machines
  using Alpha processors. Some of these systems use support logic that
  is designed by the systems groups, and some use commodity chipsets
  from DS. In some cases, systems use a combination of both.


  Various third-parties build systems using Alpha processors. Some of
  these companies design systems from scratch, and others use DS support
  chipsets, clone/modify DS example designs or simply package systems
  using build and tested boards from DS.


  The EB64: Obsolete design using 21064 with memory controller
  implemented using programmable logic. I/O provided by using
  programmable logic to interface a 486<->ISA bridge chip. On-board
  Ethernet, SuperI/O (2S, 1P, FD), Ethernet and ISA. PC-AT size. Runs
  from standard PC power supply.


  The EB64+: Uses 21064 or 21064A and APECs. Has ISA and PCI expansion
  (3 ISA, 2 PCI, one pair are on a shared slot). Supports 36-bit DRAM
  SIMs. ISA bus generated by Intel SaturnI/O PCI-ISA bridge. On-board
  SCSI (NCR 810 on PCI) Ethernet (Digital 21040), KBD, MOUSE (PS2
  style), SuperI/O (2S, 1P, FD), RTC/NVRAM. Boot ROM is EPROM. PC-AT
  size. Runs from standard PC power supply.


  The EB66: Uses 21066 or 21066A. I/O sub-system is identical to EB64+.
  Baby PC-AT size. Runs from standard PC power supply. The EB66
  schematic was published as a marketing poster advertising the 21066 as
  "the first microprocessor in the world with embedded PCI" (for trivia
  fans: there are actually 2 versions of this poster - I drew the
  circuits and wrote the spiel for the first version, and some Americans
  mauled the spiel for the second version)


  The EB164: Uses 21164 and ALCOR. Has ISA and PCI expansion (3 ISA
  slots, 2 64-bit PCI slots (one is shared with an ISA slot) and 2
  32-bit PCI slots.  Uses plus-in Bcache SIMMs. I/O sub-system provides
  SuperI/O (2S, 1P, FD), KBD, MOUSE (PS2 style), RTC/NVRAM. Boot ROM is
  Flash. PC-AT-sized motherboard.  Requires power supply with 3.3V
  output.


  The AlphaPC64 (aka Cabriolet): derived from EB64+ but now baby-AT with
  Flash boot ROM, no on-board SCSI or Ethernet. 3 ISA slots, 4 PCI slots
  (one pair are on a shared slot), uses plug-in Bcache SIMMs.  Requires
  power supply with 3.3V output.


  The AXPpci33 (aka NoName), is based on the EB66. This design is
  produced by Digital's Technical OEM (TOEM) group. It uses the 21066
  processor running at 166MHz or 233MHz. It is a baby-AT size, and runs
  from a standard PC power supply. It has 5 ISA slots and 3 PCI slots
  (one pair are a shared slot). There are 2 versions, with either PS/2
  or large DIN connectors for the keyboard.


  Other 21066-based motherboards: most if not all other 21066-based
  motherboards on the market are also based on EB66 - there's really not
  many system options when designing a 21066 system, because all the
  control is done on-chip.


  Multia (aka the Universal Desktop Box): This is a very compact
  pedestal desktop system based on the 21066. It includes 2 PCMCIA
  sockets, 21030 (TGA) graphics, 21040 Ethernet and NCR 810 SCSI disk
  along with floppy, 2 serial ports and a parallel port. It has limited
  expansion capability (one PCI slot) due to its compact size. (There is
  some restriction on when you can use the PCI slot, can't remember
  what) (Note that 21066A-based and Pentium-based Multia's are also
  available).


  DEC PC 150 AXP (aka Jensen): This is a very old Digital system - one
  of the first-generation Alpha systems. It is only mentioned here
  because a number of these systems seem to be available on the second-
  hand market. The Jensen is a floor-standing tower system which used a
  150MHz 21064 (later versions used faster CPUs but I'm not sure what
  speeds). It used programmable logic to interface a 486 EISA I/O bridge
  to the CPU.


  Other 21064(A) systems: There are 3 or 4 motherboard designs around
  (I'm not including Digital systems here) and all the ones I know of
  are derived from the EB64+ design. These include:


  o  EB64+ (some vendors package the board and sell it unmodified); AT
     form-factor.

  o  Aspen Systems motherboard: EB64+ derivative; baby-AT form-factor.

  o  Aspen Systems server board: many PCI slots (includes PCI bridge).

  o  AlphaPC64 (aka Cabriolet), baby AT form-factor.


  Other 21164(A) systems: The only one I'm aware of that isn't simply an
  EB164 clone is a system made by DeskStation. That system is
  implemented using a memory and I/O controller proprietary to Desk
  Station. I don't know what their attitude towards Linux is.



  8.  Bytes and all that stuff

  When the Alpha architecture was introduced, it was unique amongst RISC
  architectures for eschewing 8-bit and 16-bit loads and stores. It
  supported 32-bit and 64-bit loads and stores (longword and quadword,
  in Digital's nomenclature). The co-architects (Dick Sites, Rich Witek)
  justified this decision by citing the advantages:


  1. Byte support in the cache and memory sub-system tends to slow down
     accesses for 32-bit and 64-bit quantities.

  2. Byte support makes it hard to build high-speed error-correction
     circuitry into the cache/memory sub-system.


  Alpha compensates by providing powerful instructions for manipulating
  bytes and byte groups within 64-bit registers. Standard benchmarks for
  string operations (e.g., some of the Byte benchmarks) show that Alpha
  performs very well on byte manipulation.


  The absence of byte loads and stores impacts some software semaphores
  and impacts the design of I/O sub-systems. Digital's solution to the
  I/O problem is to use some low-order address lines to specify the data
  size during I/O transfers, and to decode these as byte enables. This
  so-called Sparse Addressing wastes address space and has the
  consequence that I/O space is non-contiguous (more on the intricacies
  of Sparse Addressing when I get around to writing it). Note that I/O
  space, in this context, refers to all system resources present on the
  PCI and therefore includes both PCI memory space and PCI I/O space.


  With the 21164A introduction, the Alpha archtecture was ECO'd to
  include byte addressing. Executing these new instructions on an
  earlier CPU will cause an OPCDEC PALcode exception, so that the
  PALcode will handle the access. This will have a performance impact.
  The ramifications of this are that use of these new instructions (IMO)
  should be restricted to device drivers rather than applications code.


  These new byte load and stores mean that future support chipsets will
  be able to support contiguous I/O space.



  9.  PALcode and all that stuff

  This is a placeholder for a section explaining PALcode. I will write
  it if there is sufficient interest.


  10.  Porting

  The ability of any Alpha-based machine to run Linux is really only
  limited by your ability to get information on the gory details of its
  innards. Since there are Linux ports for the E66, EB64+ and EB164
  boards, all systems based on the 21066, 21064/APECS or 21164/ALCOR
  should run Linux with little or no modification. The major thing that
  is different between any of these motherboards is the way that they
  route interrupts. There are three sources of interrupts:


  o  on-board devices

  o  PCI devices

  o  ISA devices


  All the systems use an Intel System I/O bridge (SIO) to act as a
  bridge between PCI and ISA (the main I/O bus is PCI, the ISA bus is a
  secondary bus used to support slow-speed and 'legacy' I/O devices).
  The SIO contains the traditional pair of daisy-chained 8259s.


  Some systems (e.g., the Noname) route all of their interrupts through
  the SIO and thence to the CPU. Some systems have a separate interrupt
  controller and route all PCI interrupts plus the SIO interrupt (8259
  output) through that, and all ISA interrupts through the SIO.


  Other differences between the systems include:


  o  how many slots they have

  o  what on-board PCI devices they have

  o  whether they have Flash or EPROM


  11.  More Information

  All of the DS evaluation boards and motherboard designs are license-
  free and the whole documentation kit for a design costs about \$50.
  That includes all the schematics, programmable parts sources, data
  sheets for CPU and support chipset. The doc kits are available from
  Digital Semiconductor distributors. I'm not suggesting that many
  people will want to rush out and buy this, but I do want to point out
  that the information is available.



  Hope that was helpful. Comments/updates/suggestions for expansion to
  Neal Crook <mailto:neal.crook@reo.mts.digital.com>.


  12.  References

  [1]
  <http://www.research.digital.com/wrl/publications/abstracts/TN-13.html>
  Bill Hamburgen, Jeff Mogul, Brian Reid, Alan Eustace, Richard Swan,
  Mary Jo Doherty, and Joel Bartlett.  Characterization of Organic
  Illumination Systems.  DEC WRL, Technical Note 13, April 1989.



  Linux Assembly HOWTO
  Konstantin Boldyshev <mailto:konst@linuxassembly.org> and
  Francois-Rene Rideau <mailto:fare@tunes.org>
  v0.5k, July 11, 2000

  This is the Linux Assembly HOWTO.  This document describes how to pro
  gram in assembly language using FREE programming tools, focusing on
  development for or from the Linux Operating System, mostly on IA-32
  (i386) platform.  Included material may or may not be applicable to
  other hardware and/or software platforms.  Contributions about them
  are gladly accepted.  Keywords: assembly, assembler, asm, inline asm,
  macroprocessor, preprocessor, 32-bit, IA-32, i386, x86, nasm, gas,
  as86, OS, kernel, system, libc, system call, interrupt, small, fast,
  embedded, hardware, port
  ______________________________________________________________________

  Table of Contents



  1. INTRODUCTION

     1.1 Legal Blurb
     1.2 Foreword
     1.3 Contributions
     1.4 Credits
     1.5 History

  2. DO YOU NEED ASSEMBLY?

     2.1 Pros and Cons
        2.1.1 The advantages of Assembly
        2.1.2 The disadvantages of Assembly
        2.1.3 Assessment
     2.2 How to NOT use Assembly
        2.2.1 General procedure to achieve efficient code
        2.2.2 Languages with optimizing compilers
        2.2.3 General procedure to speed your code up
        2.2.4 Inspecting compiler-generated code
     2.3 Linux and assembly

  3. ASSEMBLERS

     3.1 GCC Inline Assembly
        3.1.1 Where to find GCC
        3.1.2 Where to find docs for GCC Inline Asm
        3.1.3 Invoking GCC to build proper inline assembly code
     3.2 GAS
        3.2.1 Where to find it
        3.2.2 What is this AT&T syntax
        3.2.3 16-bit mode
        3.2.4 GASP
     3.3 NASM
        3.3.1 Where to find NASM
        3.3.2 What it does
     3.4 AS86
        3.4.1 Where to get AS86
        3.4.2 How to invoke the assembler?
        3.4.3 Where to find docs
        3.4.4 What if I can't compile Linux anymore with this new version ?
     3.5 OTHER ASSEMBLERS
        3.5.1 Win32Forth assembler
        3.5.2 Terse
        3.5.3 HLA
        3.5.4 TALC
        3.5.5 Non-free and/or Non-32bit x86 assemblers.

  4. METAPROGRAMMING/MACROPROCESSING

     4.1 What's integrated into the above
        4.1.1 GCC
        4.1.2 GAS
        4.1.3 GASP
        4.1.4 NASM
        4.1.5 AS86
        4.1.6 OTHER ASSEMBLERS
     4.2 External Filters
        4.2.1 CPP
        4.2.2 M4
        4.2.3 Macroprocessing with your own filter
        4.2.4 Metaprogramming
           4.2.4.1 Backends from compilers
           4.2.4.2 The New-Jersey Machine-Code Toolkit
           4.2.4.3 TUNES

  5. CALLING CONVENTIONS
     5.1 Linux
        5.1.1 Linking to GCC
        5.1.2 ELF vs a.out problems
        5.1.3 Direct Linux syscalls
        5.1.4 Hardware I/O under Linux
        5.1.5 Accessing 16-bit drivers from Linux/i386
     5.2 DOS
     5.3 Windows and Co.
     5.4 Your own OS

  6. QUICK START

     6.1 Tools you need
     6.2 Hello, world!
        6.2.1 NASM (hello.asm)
        6.2.2 GAS (hello.S)
     6.3 Producing object code
     6.4 Producing executable

  7. RESOURCES

     7.1 Mailing list
     7.2 Frequently asked questions (with answers)
        7.2.1 How do I do graphics programming in Linux?
        7.2.2 How do I debug pure assembly code under Linux?
        7.2.3 Any other useful debugging tools?
        7.2.4 How do I access BIOS functions from Linux (BSD, BeOS, etc)?


  ______________________________________________________________________

  1.  INTRODUCTION


  You can skip this section if you are familiar with HOWTOs, or just
  hate to read all this assembly-nonrelated crap.


  1.1.  Legal Blurb

  Copyright  1999-2000 Konstantin Boldyshev.

  Copyright  1996-1999 Francois-Rene Rideau.

  This document may be distributed only subject to the terms and
  conditions set forth in the LDP License
  <http://linuxdoc.org/COPYRIGHT.html>.  It may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  provided that this license notice is displayed in the reproduction.
  Commercial redistribution is permitted and encouraged.

  All modified documents, including translations, anthologies, and
  partial documents, must meet the following requirements:


    The modified version must be labeled as such

    The person making the modifications must be identified

    Acknowledgement of the original author must be retained

    The location of the original unmodified document be identified

    The original author's (or authors') name(s) may not be used to
     assert or imply endorsement of the resulting document without the
     original author's (or authors') permission
  The most recent official version of this document is available from
  Linux Assembly <http://linuxassembly.org> and LDP
  <http://linuxdoc.org> sites.  If you are reading a few-months-old
  copy, consider checking urls above for a new version.


  1.2.  Foreword

  This document aims answering questions of those who program or want to
  program 32-bit x86 assembly using free software
  <http://www.gnu.org/philosophy/>, particularly under the Linux
  operating system.  At many places, Universal Resource Locators (URL)
  are given for some software or documentation repository.  This
  document also points to other documents about non-free, non-x86, or
  non-32-bit assemblers, although this is not its primary goal.  Also
  note that there are FAQs and docs about programming on your favorite
  platform (whatever it is), which you should consult for platform-
  specific issues, not related directly to assembly programming.

  Because the main interest of assembly programming is to build the guts
  of operating systems, interpreters, compilers, and games, where C
  compiler fails to provide the needed expressiveness (performance is
  more and more seldom as issue), we are focusing on development of such
  kind of software.

  If you don't know what free software is, please do read carefully the
  GNU General Public License, which is used in a lot of free software,
  and is the model for most of their licenses.  It generally comes in a
  file named COPYING (or COPYING.LIB).  Literature from the FSF
  <http://www.fsf.org> (free software foundation) might help you, too.
  Particularly, the interesting feature of free software is that it
  comes with sources that you can consult and correct, or sometimes even
  borrow from.  Read your particular license carefully and do comply to
  it.


  1.3.  Contributions

  This is an interactively evolving document: you are especially invited
  to ask questions, to answer questions, to correct given answers, to
  give pointers to new software, to point the current maintainer to bugs
  or deficiencies in the pages.  In one word, contribute!

  To contribute, please contact the Assembly-HOWTO maintainer.  At the
  time of this writing, it is Konstantin Boldyshev
  <mailto:konst@linuxassembly.org> and no more Francois-Rene Rideau
  <mailto:fare@tunes.org>.  I (Fare) had been looking for some time for
  a serious hacker to replace me as maintainer of this document, and am
  pleased to announce Konstantin as my worthy successor.


  1.4.  Credits

  I would like to thank following persons, by order of appearance:

    Linus Torvalds <mailto:buried.alive@in.mail> for Linux

    Bruce Evans <mailto:bde@zeta.org.au> for bcc from which as86 is
     extracted

    Simon Tatham <mailto:anakin@pobox.com> and Julian Hall
     <mailto:jules@earthcorp.com> for NASM

    Greg Hankins <mailto:gregh@metalab.unc.edu> and now Tim Bynum
     <mailto:linux-howto@metalab.unc.edu> for maintaining HOWTOs

    Raymond Moon <mailto:raymoon@moonware.dgsys.com> for his FAQ

    Eric Dumas <mailto:dumas@linux.eu.org> for his translation of the
     mini-HOWTO into French (sad thing for the original author to be
     French and write in English)

    Paul Anderson <mailto:paul@geeky1.ebtech.net> and Rahim Azizarab
     <mailto:rahim@megsinet.net> for helping me, if not for taking over
     the HOWTO.

    Marc Lehman <mailto:pcg@goof.com> for his insight on GCC
     invocation.

    Abhijit Menon-Sen <mailto:ams@wiw.org> for helping me figure out
     the argument passing convention

    All the people who have contributed ideas, answers, remarks, and
     moral support.


  1.5.  History

  Each version includes a few fixes and minor corrections, that need not
  to be repeatedly mentioned every time.

     Version 0.5k    11 Jul 2000
        Few additions to FAQ


     Version 0.5j    14 Jun 2000
        Complete rearrangement of INTRODUCTION and RESOURCES; FAQ added
        to RESOURCES, misc cleanups and additions (and more to come)


     Version 0.5i    04 May 2000
        Added HLA, TALC; rearrangements in RESOURCES, QUICK START,
        ASSEMBLERS; few new pointers


     Version 0.5h    09 Apr 2000
        finally managed to state LDP license on document, new resources
        added, misc fixes


     Version 0.5g    26 Mar 2000
        new resources on different CPUs


     Version 0.5f    02 Mar 2000
        new resources, misc corrections


     Version 0.5e    10 Feb 2000
        url updates, changes in GAS example


     Version 0.5d    01 Feb 2000
        RESOURCES (former POINTERS) section completely redone, various
        url updates.


     Version 0.5c    05 Dec 1999
        New pointers, updates and some rearrangements.  Rewrite of sgml
        source.


     Version 0.5b    19 Sep 1999
        Discussion about libc or not libc continues.  New web pointers
        and and overall updates.


     Version 0.5a    01 Aug 1999
        "QUICK START" section rearranged, added GAS example.  Several
        new web pointers.


     Version 0.5     25 July 1999
        GAS has 16-bit mode.  New maintainer (at last): Konstantin
        Boldyshev.  Discussion about libc or not libc.  Added section
        "QUICK START" with examples of using assembly.


     Version 0.4q    22 June 1999
        process argument passing (argc,argv,environ) in assembly.  This
        is yet another "last release by Fare before new maintainer takes
        over".  Nobody knows who might be the new maintainer.


     Version 0.4p    6 June 1999
        clean up and updates.


     Version 0.4o    1 December 1998
        *


     Version 0.4m    23 March 1998
        corrections about gcc invocation


     Version 0.4l    16 November 1997
        release for LSL 6th edition.


     Version 0.4k    19 October 1997
        *


     Version 0.4j    7 September 1997
        *


     Version 0.4i    17 July 1997
        info on 16-bit mode access from Linux.


     Version 0.4h    19 Jun 1997
        still more on "how not to use assembly"; updates on NASM, GAS.


     Version 0.4g    30 Mar 1997
        *


     Version 0.4f    20 Mar 1997
        *


     Version 0.4e    13 Mar 1997
        Release for DrLinux


     Version 0.4d    28 Feb 1997
        Vapor announce of a new Assembly-HOWTO maintainer.


     Version 0.4c    9 Feb 1997
        Added section "DO YOU NEED ASSEMBLY?"


     Version 0.4b    3 Feb 1997
        NASM moved: now is before AS86


     Version 0.4a    20 Jan 1997
        CREDITS section added


     Version 0.4     20 Jan 1997
        first release of the HOWTO as such.


     Version 0.4pre1 13 Jan 1997
        text mini-HOWTO transformed into a full linuxdoc-sgml HOWTO, to
        see what the SGML tools are like.


     Version 0.3l    11 Jan 1997
        *


     Version 0.3k    19 Dec 1996
        What? I had forgotten to point to terse???


     Version 0.3j    24 Nov 1996
        point to French translated version


     Version 0.3i    16 Nov 1996
        NASM is getting pretty slick


     Version 0.3h    6 Nov 1996
        more about cross-compiling -- See on sunsite: devel/msdos/


     Version 0.3g    2 Nov 1996
        Created the History. Added pointers in cross-compiling section.
        Added section about I/O programming under Linux (particularly
        video).


     Version 0.3f    17 Oct 1996
        *


     Version 0.3c    15 Jun 1996
        *


     Version 0.2     04 May 1996
        *


     Version 0.1     23 Apr 1996
        Francois-Rene "Fare" Rideau <fare@tunes.org> creates and
        publishes the first mini-HOWTO, because "I'm sick of answering
        ever the same questions on comp.lang.asm.x86"



  2.  DO YOU NEED ASSEMBLY?

  Well, I wouldn't want to interfere with what you're doing, but here is
  some advice from hard-earned experience.



  2.1.  Pros and Cons



  2.1.1.  The advantages of Assembly

  Assembly can express very low-level things:

    you can access machine-dependent registers and I/O.

    you can control the exact behavior of code in critical sections
     that might otherwise involve deadlock between multiple software
     threads or hardware devices.

    you can break the conventions of your usual compiler, which might
     allow some optimizations (like temporarily breaking rules about
     memory allocation, threading, calling conventions, etc).

    you can build interfaces between code fragments using incompatible
     such conventions (e.g. produced by different compilers, or
     separated by a low-level interface).

    you can get access to unusual programming modes of your processor
     (e.g. 16 bit mode to interface startup, firmware, or legacy code on
     Intel PCs)

    you can produce reasonably fast code for tight loops to cope with a
     bad non-optimizing compiler (but then, there are free optimizing
     compilers available!)

    you can produce hand-optimized code perfectly tuned for your
     particular hardware setup, though not to anyone else's.

    you can write some code for your new language's optimizing compiler
     (that's something few will ever do, and even they, not often).



  2.1.2.  The disadvantages of Assembly

  Assembly is a very low-level language (the lowest above hand-coding
  the binary instruction patterns).  This means

    it's long and tedious to write initially,

    it's quite bug-prone,

    your bugs can be very difficult to chase,

    it's very difficult to understand and modify, i.e. to maintain.

    the result is very non-portable to other architectures, existing or
     future,

    your code will be optimized only for a certain implementation of a
     same architecture: for instance, among Intel-compatible platforms,
     each CPU design and its variations (relative latency, throughput,
     and capacity, of processing units, caches, RAM, bus, disks,
     presence of FPU, MMX, 3DNOW, SIMD extensions, etc) implies
     potentially completely different optimization techniques.  CPU
     designs already include: Intel 386, 486, Pentium, PPro, Pentium II,
     Pentium III; Cyrix 5x86, 6x86; AMD K5, K6 (K6-2, K6-III), K7
     (Athlon).  New designs keep popping up, so don't expect either this
     listing or your code to be up-to-date.

    you spend more time on a few details, and can't focus on small and
     large algorithmic design, that are known to bring the largest part
     of the speed up.  [e.g. you might spend some time building very
     fast list/array manipulation primitives in assembly; only a hash
     table would have sped up your program much more; or, in another
     context, a binary tree; or some high-level structure distributed
     over a cluster of CPUs]

    a small change in algorithmic design might completely invalidate
     all your existing assembly code.  So that either you're ready (and
     able) to rewrite it all, or you're tied to a particular algorithmic
     design;

    On code that ain't too far from what's in standard benchmarks,
     commercial optimizing compilers outperform hand-coded assembly
     (well, that's less true on the x86 architecture than on RISC
     architectures, and perhaps less true for widely available/free
     compilers; anyway, for typical C code, GCC is fairly good);

    And in any case, as says moderator John Levine on comp.compilers
     <news:comp.compilers>, "compilers make it a lot easier to use
     complex        data structures, and compilers don't get bored
     halfway through and generate reliably pretty good code." They will
     also correctly propagate code transformations throughout the whole
     (huge) program when optimizing code between procedures and module
     boundaries.



  2.1.3.  Assessment

  All in all, you might find that though using assembly is sometimes
  needed, and might even be useful in a few cases where it is not,
  you'll want to:

    minimize the use of assembly code,

    encapsulate this code in well-defined interfaces

    have your assembly code automatically generated from patterns
     expressed in a higher-level language than assembly (e.g. GCC inline
     assembly macros).

    have automatic tools translate these programs into assembly code

    have this code be optimized if possible

    All of the above, i.e. write (an extension to) an optimizing
     compiler back-end.

  Even in cases when assembly is needed (e.g. OS development), you'll
  find that not so much of it is, and that the above principles hold.
  See the Linux kernel sources concerning this: as little assembly as
  needed, resulting in a fast, reliable, portable, maintainable OS.
  Even a successful game like DOOM was almost massively written in C,
  with a tiny part only being written in assembly for speed up.



  2.2.  How to NOT use Assembly



  2.2.1.  General procedure to achieve efficient code

  As says Charles Fiterman on comp.compilers <news:comp.compilers> about
  human vs computer-generated assembly code,

  " The human should always win and here is why.

    First the human writes the whole thing in a high level language.

    Second he profiles it to find the hot spots where it spends its
     time.

    Third he has the compiler produce assembly for those small sections
     of code.

    Fourth he hand tunes them looking for tiny improvements over the
     machine generated code.

     The human wins because he can use the machine.  "



  2.2.2.  Languages with optimizing compilers

  Languages like ObjectiveCAML, SML, CommonLISP, Scheme, ADA, Pascal, C,
  C++, among others, all have free optimizing compilers that will
  optimize the bulk of your programs, and often do better than hand-
  coded assembly even for tight loops, while allowing you to focus on
  higher-level details, and without forbidding you to grab a few percent
  of extra performance in the above-mentioned way, once you've reached a
  stable design.  Of course, there are also commercial optimizing
  compilers for most of these languages, too!

  Some languages have compilers that produce C code, which can be
  further optimized by a C compiler: LISP, Scheme, Perl, and many other.
  Speed is fairly good.


  2.2.3.  General procedure to speed your code up

  As for speeding code up, you should do it only for parts of a program
  that a profiling tool has consistently identified as being a
  performance bottleneck.

  Hence, if you identify some code portion as being too slow, you should

    first try to use a better algorithm;

    then try to compile it rather than interpret it;

    then try to enable and tweak optimization from your compiler;

    then give the compiler hints about how to optimize (typing
     information in LISP; register usage with GCC; lots of options in
     most compilers, etc).
    then possibly fallback to assembly programming

  Finally, before you end up writing assembly, you should inspect
  generated code, to check that the problem really is with bad code
  generation, as this might really not be the case: compiler-generated
  code might be better than what you'd have written, particularly on
  modern multi-pipelined architectures!  Slow parts of a program might
  be intrinsically so.  Biggest problems on modern architectures with
  fast processors are due to delays from memory access, cache-misses,
  TLB-misses, and page-faults; register optimization becomes useless,
  and you'll more profitably re-think data structures and threading to
  achieve better locality in memory access.  Perhaps a completely
  different approach to the problem might help, then.



  2.2.4.  Inspecting compiler-generated code

  There are many reasons to inspect compiler-generated assembly code.
  Here are what you'll do with such code:

    check whether generated code can be obviously enhanced with hand-
     coded assembly (or by tweaking compiler switches)

    when that's the case, start from generated code and modify it
     instead of starting from scratch

    more generally, use generated code as stubs to modify, which at
     least gets right the way your assembly routines interface to the
     external world

    track down bugs in your compiler (hopefully rarer)

  The standard way to have assembly code be generated is to invoke your
  compiler with the -S flag.  This works with most Unix compilers,
  including the GNU C Compiler (GCC), but YMMV.  As for GCC, it will
  produce more understandable assembly code with the -fverbose-asm
  command-line option.  Of course, if you want to get good assembly
  code, don't forget your usual optimization options and hints!



  2.3.  Linux and assembly

  In general case you don't need to use assembly language in Linux
  programming.  Unlike DOS, you do not have to write Linux drivers in
  assembly (well, actually you can do it if you really want).  And with
  modern optimizing compilers, if you care of speed optimization for
  different CPU's, it's much simpler to write in C.  However, if you're
  reading this, you might have some reason to use assembly instead of
  C/C++.

  You may need to use assembly, or you may want to use assembly.
  Shortly, main practical reasons why you may need to get into Linux
  assembly are small code and libc independence.  Non-practical (and
  most often) reason is being just an old crazy hacker, who has twenty
  years old habit of doing everything in assembly language.

  Also, if you're porting Linux to some embedded hardware you can be
  quite short at size of whole system: you need to fit kernel, libc and
  all that stuff of (file|find|text|sh|etc.) utils into several hundreds
  of kilobytes, and every kilobyte costs much.  So, one of the ways
  you've got is to rewrite some (or all) parts of system in assembly,
  and this will really save you a lot of space.  For instance, a simple
  httpd written in assembly can take less than 600 bytes; you can fit a
  webserver, consisting of kernel and httpd, in 400 KB or less... Think
  about it.


  3.  ASSEMBLERS



  3.1.  GCC Inline Assembly

  The well-known GNU C/C++ Compiler (GCC), an optimizing 32-bit compiler
  at the heart of the GNU project, supports the x86 architecture quite
  well, and includes the ability to insert assembly code in C programs,
  in such a way that register allocation can be either specified or left
  to GCC.  GCC works on most available platforms, notably Linux, *BSD,
  VSTa, OS/2, *DOS, Win*, etc.


  3.1.1.  Where to find GCC

  The original GCC site is the GNU FTP site
  <ftp://prep.ai.mit.edu/pub/gnu/gcc/> together with all released
  application software from the GNU project.  Linux-configured and
  precompiled versions can be found in
  <ftp://metalab.unc.edu/pub/Linux/GCC/> There are a lot of FTP mirrors
  of both sites, everywhere around the world, as well as CD-ROM copies.

  GCC development has split into two branches some time ago (GCC 2.8 and
  EGCS), but they merged back, and current GCC webpage is
  <http://gcc.gnu.org>.

  Sources adapted to your favorite OS and precompiled binaries should be
  found at your usual FTP sites.

  For most popular DOS port of GCC is named DJGPP, and can be found in
  directories of such name in FTP sites.  See
  <http://www.delorie.com/djgpp/>.

  There are two Win32 GCC ports: cygwin
  <http://sourceware.cygnus.com/cygwin/> and mingw
  <http://www.mingw.org>

  There is also a port of GCC to OS/2 named EMX, that also works under
  DOS, and includes lots of unix-emulation library routines.  See around
  the following site: <ftp://ftp-os2.cdrom.com/pub/os2/emx09c/>.



  3.1.2.  Where to find docs for GCC Inline Asm

  The documentation of GCC includes documentation files in TeXinfo
  format.  You can compile them with TeX and print then result, or
  convert them to .info, and browse them with emacs, or convert them to
  .html, or nearly whatever you like; convert (with the right tools) to
  whatever you like, or just read as is.  The .info files are generally
  found on any good installation for GCC.

  The right section to look for is C Extensions::Extended Asm::

  Section Invoking GCC::Submodel Options::i386 Options:: might help too.
  Particularly, it gives the i386 specific constraint names for
  registers: abcdSDB correspond to %eax, %ebx, %ecx, %edx, %esi, %edi
  and %ebp respectively (no letter for %esp).

  The DJGPP Games resource (not only for game hackers) had page
  specifically about assembly, but it's down.  Its data have nonetheless
  been recovered on the DJGPP site <http://www.delorie.com/djgpp/>, that
  contains a mine of other useful information:
  <http://www.delorie.com/djgpp/doc/brennan/>, and in the DJGPP Quick
  ASM Programming Guide <http://www.castle.net/~avly/djasm.html>.


  GCC depends on GAS for assembling, and follow its syntax (see below);
  do mind that inline asm needs percent characters to be quoted so they
  be passed to GAS.  See the section about GAS below.

  Find lots of useful examples in the linux/include/asm-i386/
  subdirectory of the sources for the Linux kernel.



  3.1.3.  Invoking GCC to build proper inline assembly code

  Because assembly routines from the kernel headers (and most likely
  your own headers, if you try making your assembly programming as clean
  as it is in the linux kernel) are embedded in extern inline functions,
  GCC must be invoked with the -O flag (or -O2, -O3, etc), for these
  routines to be available.  If not, your code may compile, but not link
  properly, since it will be looking for non-inlined extern functions in
  the libraries against which your program is being linked!  Another way
  is to link against libraries that include fallback versions of the
  routines.

  Inline assembly can be disabled with -fno-asm, which will have the
  compiler die when using extended inline asm syntax, or else generate
  calls to an external function named asm() that the linker can't
  resolve.  To counter such flag, -fasm restores treatment of the asm
  keyword.

  More generally, good compile flags for GCC on the x86 platform are

  ______________________________________________________________________
          gcc -O2 -fomit-frame-pointer -W -Wall
  ______________________________________________________________________



  -O2 is the good optimization level in most cases.  Optimizing besides
  it takes longer, and yields code that is a lot larger, but only a bit
  faster; such overoptimization might be useful for tight loops only (if
  any), which you may be doing in assembly anyway.  In cases when you
  need really strong compiler optimization for a few files, do consider
  using up to -O6.

  -fomit-frame-pointer allows generated code to skip the stupid frame
  pointer maintenance, which makes code smaller and faster, and frees a
  register for further optimizations.  It precludes the easy use of
  debugging tools (gdb), but when you use these, you just don't care
  about size and speed anymore anyway.

  -W -Wall enables all warnings and helps you catch obvious stupid
  errors.

  You can add some CPU-specific -m486 or such flag so that GCC will
  produce code that is more adapted to your precise computer.  Note that
  modern GCC has -mpentium and such flags (and PGCC
  <http://goof.com/pcg/> has even more), whereas GCC 2.7.x and older
  versions do not.  A good choice of CPU-specific flags should be in the
  Linux kernel.  Check the TeXinfo documentation of your current GCC
  installation for more.


  -m386 will help optimize for size, hence also for speed on computers
  whose memory is tight and/or loaded, since big programs cause swap,
  which more than counters any "optimization" intended by the larger
  code.  In such settings, it might be useful to stop using C, and use
  instead a language that favors code factorization, such as a
  functional language and/or FORTH, and use a bytecode- or wordcode-
  based implementation.

  Note that you can vary code generation flags from file to file, so
  performance-critical files will use maximum optimization, whereas
  other files will be optimized for size.

  To optimize even more, option -mregparm=2 and/or corresponding
  function attribute might help, but might pose lots of problems when
  linking to foreign code, including libc.  There are ways to correctly
  declare foreign functions so the right call sequences be generated, or
  you might want to recompile the foreign libraries to use the same
  register-based calling convention...

  Note that you can add make these flags the default by editing file
  /usr/lib/gcc-lib/i486-linux/2.7.2.3/specs or wherever that is on your
  system (better not add -W -Wall there, though).  The exact location of
  the GCC specs files on your system can be found by asking gcc -v.



  3.2.  GAS

  GAS is the GNU Assembler, that GCC relies upon.



  3.2.1.  Where to find it

  Find it at the same place where you found GCC, in a package named
  binutils.

  The latest version is available from HJLu at
  <ftp://ftp.varesearch.com/pub/support/hjl/binutils/>.



  3.2.2.  What is this AT&T syntax

  Because GAS was invented to support a 32-bit unix compiler, it uses
  standard AT&T syntax, which resembles a lot the syntax for standard
  m68k assemblers, and is standard in the UNIX world.  This syntax is no
  worse, no better than the Intel syntax.  It's just different.  When
  you get used to it, you find it much more regular than the Intel
  syntax, though a bit boring.

  Here are the major caveats about GAS syntax:

    Register names are prefixed with %, so that registers are %eax, %dl
     and so on, instead of just eax, dl, etc.  This makes it possible to
     include external C symbols directly in assembly source, without any
     risk of confusion, or any need for ugly underscore prefixes.

    The order of operands is source(s) first, and destination last, as
     opposed to the Intel convention of destination first and sources
     last.  Hence, what in Intel syntax is mov ax,dx (move contents of
     register dx into register ax) will be in GAS syntax mov %dx, %ax.

    The operand length is specified as a suffix to the instruction
     name.  The suffix is b for (8-bit) byte, w for (16-bit) word, and l
     for (32-bit) long.  For instance, the correct syntax for the above
     instruction would have been movw %dx,%ax.  However, gas does not
     require strict AT&T syntax, so the suffix is optional when length
     can be guessed from register operands, and else defaults to 32-bit
     (with a warning).

    Immediate operands are marked with a $ prefix, as in addl $5,%eax
     (add immediate long value 5 to register %eax).

    No prefix to an operand indicates it is a memory-address; hence
     movl $foo,%eax puts the address of variable foo in register %eax,
     but movl foo,%eax puts the contents of variable foo in register
     %eax.

    Indexing or indirection is done by enclosing the index register or
     indirection memory cell address in parentheses, as in testb
     $0x80,17(%ebp) (test the high bit of the byte value at offset 17
     from the cell pointed to by %ebp).


  A program exists to help you convert programs from TASM syntax to AT&T
  syntax. See
  <ftp://x2ftp.oulu.fi/pub/msdos/programming/convert/ta2asv08.zip>.
  (Since the original x2ftp site is closing (no more?), use a mirror
  site <ftp://ftp.lip6.fr/pub/pc/x2ftp/README.mirror_sites>).  There
  also exists a program for the reverse conversion:
  <http://www.multimania.com/placr/a2i.html>.


  GAS has comprehensive documentation in TeXinfo format, which comes at
  least with the source distribution.  Browse extracted .info pages with
  Emacs or whatever.  There used to be a file named gas.doc or as.doc
  around the GAS source package, but it was merged into the TeXinfo
  docs.  Of course, in case of doubt, the ultimate documentation is the
  sources themselves!  A section that will particularly interest you is
  Machine Dependencies::i386-Dependent::


  Again, the sources for Linux (the OS kernel) come in as excellent
  examples; see under linux/arch/i386/ the following files: kernel/*.S,
  boot/compressed/*.S, mathemu/*.S.

  If you are writing kind of a language, a thread package, etc., you
  might as well see how other languages (OCaml <http://para.inria.fr/>,
  Gforth <http://www.jwdt.com/~paysan/gforth.html>, etc.), or thread
  packages (QuickThreads, MIT pthreads, LinuxThreads, etc), or whatever,
  do it.

  Finally, just compiling a C program to assembly might show you the
  syntax for the kind of instructions you want.  See section ``Do you
  need Assembly?'' above.



  3.2.3.  16-bit mode

  The current stable release of binutils (2.9.1.0.25) now fully supports
  16-bit mode (registers and addressing) on i386 PCs.  Still with its
  peculiar AT&T syntax, of course.  Use .code16 and .code32 to switch
  between assembly modes.

  Also, a neat trick used by some (including the oskit authors) is to
  have GCC produce code for 16-bit real mode, using an inline assembly
  statement asm(".code16\n").  GCC will still emit only 32-bit
  addressing modes, but GAS will insert proper 32-bit prefixes for them.


  3.2.4.  GASP

  GASP is the GAS Preprocessor.  It adds macros and some nice syntax to
  GAS.  GASP comes together with GAS in the GNU binutils archive.  It
  works as a filter, much like cpp and the like.  I have no idea on
  details, but it comes with its own texinfo documentation, so just
  browse them (in .info), print them, grok them.  GAS with GASP looks
  like a regular macro-assembler to me.



  3.3.  NASM

  The Netwide Assembler project provides cool i386 assembler, written in
  C, that should be modular enough to eventually support all known
  syntaxes and object formats.


  3.3.1.  Where to find NASM

  <http://www.cryogen.com/Nasm/>

  Binary release on your usual metalab mirror in devel/lang/asm/.
  Should also be available as .rpm or .deb in your usual RedHat/Debian
  distributions' contrib.

  At the time of writing current version of NASM is 0.98.

  Note: there's also an extended NASM version available at
  <ftp://ftp.linuxgames.com/crystal/nasm/> know as 0.98e. It introduces
  several serious bugfixes and improvements, so you may want to use it
  instead of "official" version.


  3.3.2.  What it does

  The syntax is Intel-style.  Fairly good macroprocessing support is
  integrated.

  Supported object file formats are bin, aout, coff, elf, as86, (DOS)
  obj, win32, (their own format) rdf.

  NASM can be used as a backend for the free LCC compiler (support files
  included).

  Unless you're using BCC as a 16-bit compiler (which is out of scope of
  this 32-bit HOWTO), you should definitely use NASM instead of say AS86
  or MASM, because it is actively supported online, and runs on all
  platforms.

  Note: NASM also comes with a disassembler, NDISASM.

  Its hand-written parser makes it much faster than GAS, though of
  course, it doesn't support three bazillion different architectures.
  If you like Intel-style syntax, as opposed to GAS syntax, then it
  should be the assembler of choice...

  Note: There are ``converters between GAS AT&T and Intel assembler
  syntax'', which perform conversion in both directions.


  3.4.  AS86

  AS86 is a 80x86 assembler, both 16-bit and 32-bit, part of Bruce
  Evans' C Compiler (BCC).  It has mostly Intel-syntax, though it
  differs slightly as for addressing modes.
  3.4.1.  Where to get AS86

  A completely outdated version of AS86 is distributed by HJLu just to
  compile the Linux kernel, in a package named bin86 (current version
  0.4), available in any Linux GCC repository.  But I advise no one to
  use it for anything else but compiling Linux.  This version supports
  only a hacked minix object file format, which is not supported by the
  GNU binutils or anything, and it has a few bugs in 32-bit mode, so you
  really should better keep it only for compiling Linux.

  The most recent versions by Bruce Evans (bde@zeta.org.au) are
  published together with the FreeBSD distribution.  Well, they were: I
  could not find the sources from distribution 2.1 on :( Hence, I put
  the sources at my place:
  <http://www.tunes.org/~fare/files/asm/bcc-95.3.12.src.tgz>

  The Linux/8086 (aka ELKS) project is somehow maintaining bcc (though I
  don't think they included the 32-bit patches).  See around
  <http://www.linux.org.uk/ELKS-Home/> (or
  <http://www.elks.ecs.soton.ac.uk>) and
  <ftp://linux.mit.edu/pub/linux/ELKS/>.  I haven't followed these
  developments, and would appreciate a reader contributing on this
  topic.

  Among other things, these more recent versions, unlike HJLu's,
  supports Linux GNU a.out format, so you can link you code to Linux
  programs, and/or use the usual tools from the GNU binutils package to
  manipulate your data.  This version can co-exist without any harm with
  the previous one (see according question below).

  BCC from 12 march 1995 and earlier version has a misfeature that makes
  all segment pushing/popping 16-bit, which is quite annoying when
  programming in 32-bit mode.  I wrote a patch at a time when the TUNES
  Project used as86:
  <http://www.tunes.org/~fare/files/asm/as86.bcc.patch.gz>.  Bruce Evans
  accepted this patch, but since as far as I know he hasn't published a
  new release of bcc, the ones to ask about integrating it (if not done
  yet) are the ELKS developers.



  3.4.2.  How to invoke the assembler?

  Here's the GNU Makefile entry for using bcc to transform .s asm into
  both GNU a.out .o object and .l listing:


  ______________________________________________________________________
  %.o %.l:        %.s
          bcc -3 -G -c -A-d -A-l -A$*.l -o $*.o $<
  ______________________________________________________________________



  Remove the %.l, -A-l, and -A$*.l, if you don't want any listing.  If
  you want something else than GNU a.out, you can see the docs of bcc
  about the other supported formats, and/or use the objcopy utility from
  the GNU binutils package.



  3.4.3.  Where to find docs

  The docs are what is included in the bcc package.  I salvaged the man
  pages that used to be available from the FreeBSD site at
  <http://www.tunes.org/~fare/files/asm/bcc-95.3.12.src.tgz>.  Maybe
  ELKS developers know better.  When in doubt, the sources themselves
  are often a good docs: it's not very well commented, but the
  programming style is straightforward.  You might try to see how as86
  is used in ELKS or Tunes 0.0.0.25...



  3.4.4.  What if I can't compile Linux anymore with this new version ?

  Linus is buried alive in mail, and since HJLu (official bin86
  maintainer) chose to write hacks around an obsolete version of as86
  instead of building clean code around the latest version, I don't
  think my patch for compiling Linux with a modern as86 has any chance
  to be accepted if resubmitted.  Now, this shouldn't matter: just keep
  your as86 from the bin86 package in /usr/bin/, and let bcc install the
  good as86 as /usr/local/libexec/i386/bcc/as where it should be. You
  never need explicitly call this "good" as86, because bcc does
  everything right, including conversion to Linux a.out, when invoked
  with the right options; so assemble files exclusively with bcc as a
  frontend, not directly with as86.

  Since GAS now supports 16-bit code, and since H. Peter Anvin, well-
  known linux hacker, works on NASM, maybe Linux will get rid of AS86,
  anyway? Who knows!



  3.5.  OTHER ASSEMBLERS

  These are other non-regular options, in case the previous didn't
  satisfy you (why?), that I don't recommend in the usual (?) case, but
  that could be quite useful if the assembler must be integrated in the
  software you're designing (i.e. an OS or development environment).


  3.5.1.  Win32Forth assembler

  Win32Forth is a free 32-bit ANS FORTH system that successfully runs
  under Win32s, Win95, Win/NT.  It includes a free 32-bit assembler
  (either prefix or postfix syntax) integrated into the reflective FORTH
  language.  Macro processing is done with the full power of the
  reflective language FORTH; however, the only supported input and
  output contexts is Win32For itself (no dumping of .obj file, but you
  could add that feature yourself, of course).  Find it at
  <ftp://ftp.forth.org/pub/Forth/Compilers/native/windows/Win32For/>.


  3.5.2.  Terse

  Terse <http://www.terse.com> is a programming tool that provides THE
  most compact assembler syntax for the x86 family!  However, it is evil
  proprietary software.  It is said that there was a project for a free
  clone somewhere, that was abandoned after worthless pretenses that the
  syntax would be owned by the original author.  Thus, if you're looking
  for a nifty programming project related to assembly hacking, I invite
  you to develop a terse-syntax frontend to NASM, if you like that
  syntax.

  As an interesting historic remark, on comp.compilers
  <news:comp.compilers>, 1999/07/11 19:36:51, the moderator wrote:
  "There's no reason that assemblers have to have awful syntax.  About
  30 years ago I used Niklaus Wirth's PL360, which was basically a S/360
  assembler with Algol syntax and a a little syntactic sugar like while
  loops that turned into the obvious branches.  It really was an
  assembler, e.g., you had to write out your expressions with explicit
  assignments of values to registers, but it was nice.  Wirth used it to
  write Algol W, a small fast Algol subset, which was a predecessor to
  Pascal.  As is so often the case, Algol W was a significant
  improvement over many of its successors. -John"



  3.5.3.  HLA

  HLA <http://webster.cs.ucr.edu> is a High Level Assembly language.  It
  uses a high level language like syntax (similar to Pascal, C/C++, and
  other HLLs) for variable declarations, procedure declarations, and
  procedure calls. It uses a modified assembly language syntax for the
  standard machine instructions.  It also provides several high level
  language style control structures (if, while, repeat..until, etc.)
  that help you write much more readable code.

  HLA is free, but runs only under Win32.  You need MASM and a 32-bit
  version of MS-link, because HLA produces MASM code and uses MASM for
  final assembling and linking. However it comes with m2t (MASM to TASM)
  post-processor program that converts the HLA MASM output to a form
  that will compile under TASM. Unfortunately, NASM is not supported.



  3.5.4.  TALC

  TALC <http://www.cs.cornell.edu/talc/> is another free MASM/Win32
  based compiler (however it supports ELF output, does it?).

  TAL stands for Typed Assembly Language.  It extends traditional
  untyped assembly languages with typing annotations, memory management
  primitives, and a sound set of typing rules, to guarantee the memory
  safety, control flow safety,and type safety of TAL programs.
  Moreover, the typing constructs are expressive enough to encode most
  source language programming features including records and structures,
  arrays, higher-order and polymorphic functions, exceptions, abstract
  data types, subtyping, and modules.  Just as importantly, TAL is
  flexible enough to admit many low-level compiler optimizations.
  Consequently, TAL is an ideal target platform for type-directed
  compilers that want to produce verifiably safe code for use in secure
  mobile code applications or extensible operating system kernels.


  3.5.5.  Non-free and/or Non-32bit x86 assemblers.

  You may find more about them, together with the basics of x86 assembly
  programming, in ``Raymond Moon's x86 assembly FAQ''.

  Note that all DOS-based assemblers should work inside the Linux DOS
  Emulator, as well as other similar emulators, so that if you already
  own one, you can still use it inside a real OS.  Recent DOS-based
  assemblers also support COFF and/or other object file formats that are
  supported by the GNU BFD library, so that you can use them together
  with your free 32-bit tools, perhaps using GNU objcopy (part of the
  binutils) as a conversion filter.



  4.  METAPROGRAMMING/MACROPROCESSING

  Assembly programming is a bore, but for critical parts of programs.

  You should use the appropriate tool for the right task, so don't
  choose assembly when it's not fit; C, OCaml, perl, Scheme, might be a
  better choice for most of your programming.
  However, there are cases when these tools do not give a fine enough
  control on the machine, and assembly is useful or needed.  In those
  case, you'll appreciate a system of macroprocessing and
  metaprogramming that'll allow recurring patterns to be factored each
  into a one indefinitely reusable definition, which allows safer
  programming, automatic propagation of pattern modification, etc.
  Plain assembler often is not enough, even when one is doing only small
  routines to link with C.



  4.1.  What's integrated into the above


  Yes I know this section does not contain much useful up-to-date
  information.  Feel free to contribute what you discover the hard
  way...



  4.1.1.  GCC

  GCC allows (and requires) you to specify register constraints in your
  inline assembly code, so the optimizer always know about it; thus,
  inline assembly code is really made of patterns, not forcibly exact
  code.

  Thus, you can make put your assembly into CPP macros, and inline C
  functions, so anyone can use it in as any C function/macro.  Inline
  functions resemble macros very much, but are sometimes cleaner to use.
  Beware that in all those cases, code will be duplicated, so only local
  labels (of 1: style) should be defined in that asm code.  However, a
  macro would allow the name for a non local defined label to be passed
  as a parameter (or else, you should use additional meta-programming
  methods).  Also, note that propagating inline asm code will spread
  potential bugs in them; so watch out doubly for register constraints
  in such inline asm code.

  Lastly, the C language itself may be considered as a good abstraction
  to assembly programming, which relieves you from most of the trouble
  of assembling.



  4.1.2.  GAS

  GAS has some macro capability included, as detailed in the texinfo
  docs.  Moreover, while GCC recognizes .s files as raw assembly to send
  to GAS, it also recognizes .S files as files to pipe through CPP
  before to feed them to GAS.  Again and again, see Linux sources for
  examples.



  4.1.3.  GASP

  It adds all the usual macroassembly tricks to GAS.  See its texinfo
  docs.



  4.1.4.  NASM

  NASM has comprehensive macro support, too.  See according docs.  If
  you have some bright idea, you might wanna contact the authors, as
  they are actively developing it.  Meanwhile, see about external
  filters below.



  4.1.5.  AS86

  It has some simple macro support, but I couldn't find docs.  Now the
  sources are very straightforward, so if you're interested, you should
  understand them easily.  If you need more than the basics, you should
  use an external filter (see below).



  4.1.6.  OTHER ASSEMBLERS


    Win32FORTH: CODE and END-CODE are normal that do not switch from
     interpretation mode to compilation mode, so you have access to the
     full power of FORTH while assembling.

    TUNES: it doesn't work yet, but the Scheme language is a real high-
     level language that allows arbitrary meta-programming.



  4.2.  External Filters

  Whatever is the macro support from your assembler, or whatever
  language you use (even C !), if the language is not expressive enough
  to you, you can have files passed through an external filter with a
  Makefile rule like that:


  ______________________________________________________________________
  %.s:    %.S other_dependencies
          $(FILTER) $(FILTER_OPTIONS) < $< > $@
  ______________________________________________________________________



  4.2.1.  CPP

  CPP is truly not very expressive, but it's enough for easy things,
  it's standard, and called transparently by GCC.

  As an example of its limitations, you can't declare objects so that
  destructors are automatically called at the end of the declaring
  block; you don't have diversions or scoping, etc.

  CPP comes with any C compiler.  However, considering how mediocre it
  is, stay away from it if by chance you can make it without C,



  4.2.2.  M4

  M4 gives you the full power of macroprocessing, with a Turing
  equivalent language, recursion, regular expressions, etc.  You can do
  with it everything that CPP cannot.

  See macro4th (this4th)
  <ftp://ftp.forth.org/pub/Forth/Compilers/native/unix/this4th.tar.gz>
  or the Tunes 0.0.0.25 sources
  <ftp://ftp.tunes.org/pub/tunes/obsolete/dist/tunes.0.0.0/tunes.0.0.0.25.src.zip>
  as examples of advanced macroprogramming using m4.

  However, its disfunctional quoting and unquoting semantics force you
  to use explicit continuation-passing tail-recursive macro style if you
  want to do advanced macro programming (which is remindful of TeX --
  BTW, has anyone tried to use TeX as a macroprocessor for anything else
  than typesetting ?).  This is NOT worse than CPP that does not allow
  quoting and recursion anyway.

  The right version of m4 to get is GNU m4 1.4 (or later if exists),
  which has the most features and the least bugs or limitations of all.
  m4 is designed to be slow for anything but the simplest uses, which
  might still be ok for most assembly programming (you're not writing
  million-lines assembly programs, are you?).



  4.2.3.  Macroprocessing with your own filter

  You can write your own simple macro-expansion filter with the usual
  tools: perl, awk, sed, etc.  That's quick to do, and you control
  everything.  But of course, any power in macroprocessing must be
  earned the hard way.



  4.2.4.  Metaprogramming

  Instead of using an external filter that expands macros, one way to do
  things is to write programs that write part or all of other programs.

  For instance, you could use a program outputting source code

    to generate sine/cosine/whatever lookup tables,

    to extract a source-form representation of a binary file,

    to compile your bitmaps into fast display routines,

    to extract documentation, initialization/finalization code,
     description tables, as well as normal code from the same source
     files,

    to have customized assembly code, generated from a
     perl/shell/scheme script that does arbitrary processing,

    to propagate data defined at one point only into several cross-
     referencing tables and code chunks.

    etc.

  Think about it!



  4.2.4.1.  Backends from compilers

  Compilers like GCC, SML/NJ, Objective CAML, MIT-Scheme, CMUCL, etc, do
  have their own generic assembler backend, which you might choose to
  use, if you intend to generate code semi-automatically from the
  according languages, or from a language you hack: rather than write
  great assembly code, you may instead modify a compiler so that it
  dumps great assembly code!



  4.2.4.2.  The New-Jersey Machine-Code Toolkit

  There is a project, using the programming language Icon (with an
  experimental ML version), to build a basis for producing assembly-
  manipulating code.  See around
  <http://www.eecs.harvard.edu/~nr/toolkit/>



  4.2.4.3.  TUNES


  The TUNES Project <http://www.tunes.org> for a Free Reflective
  Computing System is developing its own assembler as an extension to
  the Scheme language, as part of its development process.  It doesn't
  run at all yet, though help is welcome.

  The assembler manipulates abstract syntax trees, so it could equally
  serve as the basis for a assembly syntax translator, a disassembler, a
  common assembler/compiler back-end, etc.  Also, the full power of a
  real language, Scheme, make it unchallenged as for
  macroprocessing/metaprogramming.



  5.  CALLING CONVENTIONS



  5.1.  Linux



  5.1.1.  Linking to GCC

  This is the preferred way if you are developing mixed C-asm project.
  Check GCC docs and examples from Linux kernel .S files that go through
  gas (not those that go through as86).

  32-bit arguments are pushed down stack in reverse syntactic order
  (hence accessed/popped in the right order), above the 32-bit near
  return address.  %ebp, %esi, %edi, %ebx are callee-saved, other
  registers are caller-saved; %eax is to hold the result, or %edx:%eax
  for 64-bit results.

  FP stack: I'm not sure, but I think it's result in st(0), whole stack
  caller-saved.

  Note that GCC has options to modify the calling conventions by
  reserving registers, having arguments in registers, not assuming the
  FPU, etc. Check the i386 .info pages.

  Beware that you must then declare the cdecl or regparm(0) attribute
  for a function that will follow standard GCC calling conventions.  See
  in the GCC info pages the section: C Extensions::Extended Asm::.  See
  also how Linux defines its asmlinkage macro...



  5.1.2.  ELF vs a.out problems

  Some C compilers prepend an underscore before every symbol, while
  others do not.

  Particularly, Linux a.out GCC does such prepending, while Linux ELF
  GCC does not.

  If you need cope with both behaviors at once, see how existing
  packages do.  For instance, get an old Linux source tree, the Elk,
  qthreads, or OCaml...

  You can also override the implicit C->asm renaming by inserting
  statements like

  ______________________________________________________________________
          void foo asm("bar") (void);
  ______________________________________________________________________


  to be sure that the C function foo will be called really bar in assem
  bly.

  Note that the utility objcopy, from the binutils package, should allow
  you to transform your a.out objects into ELF objects, and perhaps the
  contrary too, in some cases.  More generally, it will do lots of file
  format conversions.



  5.1.3.  Direct Linux syscalls

  Often you will be told that using libc is the only way, and direct
  system calls are bad. This is true. To some extent.  So, you must know
  that libc is not sacred, and in most cases libc only does some checks,
  then calls kernel, and then sets errno.  You can easily do this in
  your program as well (if you need to), and your program will be dozen
  times smaller, and this will also result in improved performance, just
  because you're not using shared libraries (static binaries are
  faster).  Using or not using libc in assembly programming is more a
  question of taste/belief than something practical.  Remember, Linux is
  aiming to be POSIX compliant, so does libc. This means that syntax of
  almost all libc "system calls" exactly matches syntax of real kernel
  system calls (and vice versa). Besides, modern libc becomes slower and
  slower, and eats more and more memory, and so, cases of using direct
  system calls become quite usual.  But.. main drawback of throwing libc
  away is that possibly you will need to implement several libc specific
  functions (that are not just syscall wrappers) on your own (printf and
  Co.).. and you are ready for that, aren't you? :)


  Here is summary of direct system calls pros and cons.

  Pros:

    smallest possible size; squeezing the last byte out of the system.

    highest possible speed; squeezing cycles out of your favorite
     benchmark.

    full control: you can adapt your program/library to your specific
     language or memory requirements or whatever

    no pollution by libc cruft.

    no pollution by C calling conventions (if you're developing your
     own language or environment).

    static binaries make you independent from libc upgrades or crashes,
     or from dangling #! path to a interpreter (and are faster).

    just for the fun out of it (don't you get a kick out of assembly
     programming?)

  Cons:

    If any other program on your computer uses the libc, then
     duplicating the libc code will actually waste memory, not save it.

    Services redundantly implemented in many static binaries are a
     waste of memory.  But you can make your libc replacement a shared
     library.

    Size is much better saved by having some kind of bytecode,
     wordcode, or structure interpreter than by writing everything in
     assembly.  (the interpreter itself could be written either in C or
     assembly.)  The best way to keep multiple binaries small is to not
     have multiple binaries, but instead to have an interpreter process
     files with #! prefix.  This is how OCaml works when used in
     wordcode mode (as opposed to optimized native code mode), and it is
     compatible with using the libc.  This is also how Tom
     Christiansen's Perl PowerTools <http://language.perl.com/ppt/>
     reimplementation of unix utilities works.  Finally, one last way to
     keep things small, that doesn't depend on an external file with a
     hardcoded path, be it library or interpreter, is to have only one
     binary, and have multiply-named hard or soft links to it: the same
     binary will provide everything you need in an optimal space, with
     no redundancy of subroutines or useless binary headers; it will
     dispatch its specific behavior according to its argv[0]; in case it
     isn't called with a recognized name, it might default to a shell,
     and be possibly thus also usable as an interpreter!

    You cannot benefit from the many functionalities that libc provides
     besides mere linux syscalls: that is, functionality described in
     section 3 of the manual pages, as opposed to section 2, such as
     malloc, threads, locale, password, high-level network management,
     etc.

    Consequently, you might have to reimplement large parts of libc,
     from printf to malloc and gethostbyname.  It's redundant with the
     libc effort, and can be quite boring sometimes.  Note that some
     people have already reimplemented "light" replacements for parts of
     the libc -- check them out!  (Redhat's minilibc, Rick Hohensee's
     libsys <ftp://linux01.gwdg.de/pub/cLIeNUX/interim/libsys.tgz>,
     Felix von Leitner's dietlibc <http://www.fefe.de/dietlibc/>,
     Christian Fowelin's ``libASM'', ``asmutils'' project is working on
     pure assembly libc)

    Static libraries prevent your benefitting from libc upgrades as
     well as from libc add-ons such as the zlibc package, that does on-
     the-fly transparent decompression of gzip-compressed files.

    The few instructions added by the libc are a ridiculously small
     speed overhead as compared to the cost of a system call.  If speed
     is a concern, your main problem is in your usage of system calls,
     not in their wrapper's implementation.

    Using the standard assembly API for system calls is much slower
     than using the libc API when running in micro-kernel versions of
     Linux such as L4Linux, that have their own faster calling
     convention, and pay high convention-translation overhead when using
     the standard one (L4Linux comes with libc recompiled with their
     syscall API; of course, you could recompile your code with their
     API, too).

    See previous discussion for general speed optimization issue.

    If syscalls are too slow to you, you might want to hack the kernel
     sources (in C) instead of staying in userland.

  If you've pondered the above pros and cons, and still want to use
  direct syscalls (as documented in section 2 of the manual pages), then
  here is some advice.


    You can easily define your system calling functions in a portable
     way in C (as opposed to unportable using assembly), by including
     <asm/unistd.h>, and using provided macros.

    Since you're trying to replace it, go get the sources for the libc,
     and grok them.  (And if you think you can do better, then send
     feedback to the authors!)

    As an example of pure assembly code that does everything you want,
     examine ``Linux Assembly resources''.

  Basically, you issue an int 0x80, with the __NR_syscallname number
  (from asm/unistd.h) in eax, and parameters (up to five) in ebx, ecx,
  edx, esi, edi respectively.  Result is returned in eax, with a
  negative result being an error, whose opposite is what libc would put
  in errno.  The user-stack is not touched, so you needn't have a valid
  one when doing a syscall.

  As for the invocation arguments passed to a process upon startup, the
  general principle is that the stack originally contains the number of
  arguments argc, then the list of pointers that constitute *argv, then
  a null-terminated sequence of null-terminated variable=value strings
  for the environment.  For more details, do examine ``Linux assembly
  resources'', read the sources of C startup code from your libc (crt0.S
  or crt1.S), or those from the Linux kernel (exec.c and binfmt_*.c in
  linux/fs/).



  5.1.4.  Hardware I/O under Linux

  If you want to do direct I/O under Linux, either it's something very
  simple that needn't OS arbitration, and you should see the IO-Port-
  Programming mini-HOWTO; or it needs a kernel device driver, and you
  should try to learn more about kernel hacking, device driver
  development, kernel modules, etc, for which there are other excellent
  HOWTOs and documents from the LDP.

  Particularly, if what you want is Graphics programming, then do join
  one of the GGI <http://www.ggi-project.org/> or      XFree86
  <http://www.XFree86.org/> projects.

  Some people have even done better, writing small and robust XFree86
  drivers in an interpreted domain-specific language, GAL
  <http://www.irisa.fr/compose/gal/>, and achieving the efficiency of
  hand C-written drivers through partial evaluation (drivers not only
  not in asm, but not even in C!).  The problem is that the partial
  evaluator they used to achieve efficiency is not free software.  Any
  taker for a replacement?

  Anyway, in all these cases, you'll be better when using GCC inline
  assembly with the macros from linux/asm/*.h than writing full assembly
  source files.



  5.1.5.  Accessing 16-bit drivers from Linux/i386

  Such thing is theoretically possible (proof: see how DOSEMU
  <http://www.dosemu.org> can selectively grant hardware port access to
  programs), and I've heard rumors that someone somewhere did actually
  do it (in the PCI driver? Some VESA access stuff? ISA PnP? dunno).  If
  you have some more precise information on that, you'll be most
  welcome.  Anyway, good places to look for more information are the
  Linux kernel sources, DOSEMU sources (and other programs in the DOSEMU
  repository <ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/>), and
  sources for various low-level programs under Linux...  (perhaps GGI if
  it supports VESA).

  Basically, you must either use 16-bit protected mode or vm86 mode.

  The first is simpler to setup, but only works with well-behaved code
  that won't do any kind of segment arithmetics or absolute segment
  addressing (particularly addressing segment 0), unless by chance it
  happens that all segments used can be setup in advance in the LDT.

  The later allows for more "compatibility" with vanilla 16-bit
  environments, but requires more complicated handling.

  In both cases, before you can jump to 16-bit code, you must

    mmap any absolute address used in the 16-bit code (such as ROM,
     video buffers, DMA targets, and memory-mapped I/O) from /dev/mem to
     your process' address space,

    setup the LDT and/or vm86 mode monitor.

    grab proper I/O permissions from the kernel (see the above section)

  Again, carefully read the source for the stuff contributed to the
  DOSEMU project, particularly these mini-emulators for running ELKS
  and/or simple .COM programs under Linux/i386.



  5.2.  DOS

  Most DOS extenders come with some interface to DOS services.  Read
  their docs about that, but often, they just simulate int 0x21 and
  such, so you do "as if" you are in real mode (I doubt they have more
  than stubs and extend things to work with 32-bit operands; they most
  likely will just reflect the interrupt into the real-mode or vm86
  handler).

  Docs about DPMI (and much more) can be found on
  <ftp://x2ftp.oulu.fi/pub/msdos/programming/> (again, the original
  x2ftp site is closing (no more?), so use a mirror site
  <ftp://ftp.lip6.fr/pub/pc/x2ftp/README.mirror_sites>).

  DJGPP comes with its own (limited) glibc
  derivative/subset/replacement, too.

  It is possible to cross-compile from Linux to DOS, see the
  devel/msdos/ directory of your local FTP mirror for metalab.unc.edu
  Also see the MOSS dos-extender from the Flux project
  <http://www.cs.utah.edu/projects/flux/> from university of Utah.


  Other documents and FAQs are more DOS-centered.  We do not recommend
  DOS development.



  5.3.  Windows and Co.

  This HOWTO is not about Windows programming, you can find lots of
  documents about it everywhere..  The thing you should know is that
  Cygnus Solutions <http://www.cygnus.com> developed the cygwin32.dll
  library <http://sourceware.cygnus.com/cygwin/>, for GNU programs to
  run on Win32 platform; thus, you can use GCC, GAS, all the GNU tools,
  and many other Unix applications.


  5.4.  Your own OS

  Control is what attracts many OS developers to assembly, often is what
  leads to or stems from assembly hacking.  Note that any system that
  allows self-development could be qualified an "OS", though it can run
  "on the top" of an underlying system (much like Linux over Mach or
  OpenGenera over Unix).

  Hence, for easier debugging purpose, you might like to develop your
  "OS" first as a process running on top of Linux (despite the
  slowness), then use the Flux OS kit
  <http://www.cs.utah.edu/projects/flux/oskit/> (which grants use of
  Linux and BSD drivers in your own OS) to make it standalone.  When
  your OS is stable, it is time to write your own hardware drivers if
  you really love that.

  This HOWTO will not cover topics such as Boot loader code & getting
  into 32-bit mode, Handling Interrupts, The basics about Intel
  protected mode or V86/R86 braindeadness, defining your object format
  and calling conventions.

  The main place where to find reliable information about that all, is
  source code of existing OSes and bootloaders.  Lots of pointers are on
  the following webpage: <http://www.tunes.org/Review/OSes.html>



  6.  QUICK START

  Finally, if you still want to try this crazy idea and write something
  in assembly (if you've reached this section -- you're real assembly
  fan), I'll herein provide what you will need to get started.

  As you've read before, you can write for Linux in different ways; I'll
  show example of using pure system calls.  This means that we will not
  use libc at all, the only thing required for our program to run is
  kernel.  Our code will not be linked to any library, will not use ELF
  interpreter -- it will communicate directly with kernel.

  I will show the same sample program in two assemblers, nasm and gas,
  thus showing Intel and AT&T syntax.

  You may also want to read Introduction to UNIX assembly programming
  <http://linuxassembly.org/intro.html> tutorial, it contains sample
  code for other UNIX-like OSes.


  6.1.  Tools you need

  First of all you need assembler (compiler): nasm or gas.  Second, you
  need linker: ld, assembler produces only object code.  Almost all
  distributions include gas and ld, in binutils package.  As for nasm,
  you may have to download and install binary packages for Linux and
  docs from the ``nasm webpage''; however, several distributions
  (Stampede, Debian, SuSe) already include it, check first.

  If you are going to dig in, you should also install kernel source.  I
  assume that you are using at least Linux 2.0 and ELF.


  6.2.  Hello, world!

  Linux is 32bit and has flat memory model.  A program can be divided
  into sections.  Main sections are .text for your code, .data for your
  data, .bss for undefined data.  Program must have at least .text
  section.

  Now we will write our first program. Here is sample code:


  6.2.1.  NASM (hello.asm)



       ______________________________________________________________________
       section .data                           ;section declaration

       msg     db      "Hello, world!",0xa ;our dear string
       len     equ     $ - msg                 ;length of our dear string

       section .text                           ;section declaration

                               ;we must export the entry point to the ELF linker or
           global _start       ;loader. They conventionally recognize _start as their
                               ;entry point. Use ld -e foo to override the default.

       _start:

       ;write our string to stdout

               mov     edx,len ;third argument: message length
               mov     ecx,msg ;second argument: pointer to message to write
               mov     ebx,1   ;first argument: file handle (stdout)
               mov     eax,4   ;system call number (sys_write)
               int     0x80    ;call kernel

       ;and exit

               mov     ebx,0   ;first syscall argument: exit code
               mov     eax,1   ;system call number (sys_exit)
               int     0x80    ;call kernel
       ______________________________________________________________________



  6.2.2.  GAS (hello.S)



  ______________________________________________________________________
  .data                                 # section declaration

  msg:
          .string       "Hello, world!\n"  # our dear string
          len = . - msg                   # length of our dear string

  .text                                 # section declaration

                          # we must export the entry point to the ELF linker or
      .global _start      # loader. They conventionally recognize _start as their
                          # entry point. Use ld -e foo to override the default.

  _start:

  # write our string to stdout

          movl    $len,%edx       # third argument: message length
          movl    $msg,%ecx       # second argument: pointer to message to write
          movl    $1,%ebx         # first argument: file handle (stdout)
          movl    $4,%eax         # system call number (sys_write)
          int     $0x80           # call kernel

  # and exit

          movl    $0,%ebx         # first argument: exit code
          movl    $1,%eax         # system call number (sys_exit)
          int     $0x80           # call kernel
  ______________________________________________________________________



  6.3.  Producing object code

  First step of building binary is producing object file from source by
  invoking assembler; we must issue the following:

  For nasm example:

  $ nasm -f elf hello.asm

  For gas example:

  $ as -o hello.o hello.S

  This will produce hello.o object file.



  6.4.  Producing executable

  Second step is producing executable file itself from object file by
  invoking linker:

  $ ld -s -o hello hello.o

  This will finally build hello executable.

  Hey, try to run it... Works? That's it. Pretty simple.



  7.  RESOURCES


  You main resource for Linux/UNIX assembly programming material is
  Linux Assembly resources page
  <http://linuxassembly.org/resources.html>.  Do visit it, and get
  plenty of pointers to assembly projects, tools, tutorials,
  documentation, guides, etc, concerning different UNIX operating
  systems and CPUs.  Because it evolves quickly, I will no longer
  duplicate it in this HOWTO.

  If you are new to assembly in general, here are few starting pointers:



    The Art Of Assembly
     <http://webster.cs.ucr.edu/Page_asm/ArtOfAsm.html>

    x86 assembly FAQ <http://www2.dgsys.com/~raymoon/faq/>

    ftp.luth.se <ftp://ftp.luth.se/pub/msdos/> mirrors the hornet and
     x2ftp former archives of msdos assembly coding stuff

    CoreWars <http://www.koth.org>, a fun way to learn assembly in
     general

    Usenet: comp.lang.asm.x86 <news://comp.lang.asm.x86>; alt.lang.asm
     <news://alt.lang.asm>



  7.1.  Mailing list

  If you're are interested in Linux/UNIX assembly programming (or have
  questions, or are just curious) I especially invite you to join Linux
  assembly programming mailing list.

  This is an open discussion of assembly programming under Linux,
  FreeBSD, BeOS, or any other UNIX/POSIX like OS; also it is not limited
  to x86 assembly (Alpha, Sparc, PPC and other hackers are welcome
  too!).

  List address is  <mailto:linux-assembly@egroups.com>.

  To subscribe send a blank message to  <mailto:linux-
  assembly@egroups.com>.

  List archives are available at  <http://www.egroups.com/list/linux-
  assembly/>.



  7.2.  Frequently asked questions (with answers)

  Here are frequently asked questions. Answers are taken from the
  ``linux-assembly mailing list''.


  7.2.1.  How do I do graphics programming in Linux?

  An answer from Paul Furber <mailto:paulf@icom.co.za>:



  Ok you have a number of options to graphics in Linux. Which one you use
  depends on what you want to do. There isn't one Web site with all the
  information but here are some tips:

  SVGALib: This is a C library for console SVGA access.
  Pros: very easy to learn, good coding examples, not all that different
  from equivalent gfx libraries for DOS, all the effects you know from DOS
  can be converted with little difficulty.
  Cons: programs need superuser rights to run since they write directly to
  the hardware, doesn't work with all chipsets, can't run under X-Windows.
  Search for svgalib-1.4.x on http://ftp.is.co.za

  Framebuffer: do it yourself graphics at SVGA res
  Pros: fast, linear mapped video access, ASM can be used if you want :)
  Cons: has to be compiled into the kernel, chipset-specific issues, must
  switch out of X to run, relies on good knowledge of linux system calls
  and kernel, tough to debug
  Examples: asmutils (http://www.linuxassembly.org) and the leaves example
  and my own site for some framebuffer code and tips in asm
  (http://ma.verick.co.za/linux4k/)

  Xlib: the application and development libraries for XFree86.
  Pros: Complete control over your X application
  Cons: Difficult to learn, horrible to work with and requires quite a bit
  of knowledge as to how X works at the low level.
  Not recommended but if you're really masochistic go for it. All the
  include and lib files are probably installed already so you have what
  you need.

  Low-level APIs: include PTC, SDL, GGI and Clanlib
  Pros: very flexible, run under X or the console, generally abstract away
  the video hardware a little so you can draw to a linear surface, lots of
  good coding examples, can link to other APIs like OpenGL and sound libs,
  Windows DirectX versions for free
  Cons: Not as fast as doing it yourself, often in development so versions
  can (and do) change frequently.
  Examples: PTC and GGI have excellent demos, SDL is used in sdlQuake,
  Myth II, Civ CTP and Clanlib has been used for games as well.

  High-level APIs: OpenGL - any others?
  Pros: clean api, tons of functionality and examples, industry standard
  so you can learn from SGI demos for example
  Cons: hardware acceleration is normally a must, some quirks between
  versions and platforms
  Examples: loads - check out www.mesa3d.org under the links section.

  To get going try looking at the svgalib examples and also install SDL
  and get it working. After that, the sky's the limit.



  7.2.2.  How do I debug pure assembly code under Linux?


  If you're using gas, you should consult Linux assembly Tutorial
  <http://www.cs.pdx.edu/~bjorn/CS200/linux_tutorial/> by Bjorn
  Chambless.

  With nasm situation is a bit different, since it doesnot support gdb
  specific debugging extensions.  Although gdb is source-level debugger,
  it can be used to debug pure assembly code, and with some trickery you
  can make gdb to do what you need.  Here's an answer from Dmitry
  Bakhvalov <mailto:dl@gazeta.ru>:


  Personally, I use gdb for debugging asmutils. Try this:

  1) Use the following stuff to compile:
     $nasm -f elf -g smth.asm
     $ld -o smth smth.o

  2) Fire up gdb:
     $gdb smth

  3) In gdb:
     (gdb) disassemble _start
     Place a breakpoint at <_start+1> (If placed at _start the breakpoint
     wouldnt work, dunno why)
     (gdb) b *0x8048075

     To step thru the code I use the following macro:
     (gdb)define n
     >ni
     >printf "eax=%x ebx=%x ...etc...",$eax,$ebx,...etc...
     >disassemble $pc $pc+15
     >end

     Then start the program with r command and debug with n.

     Hope this helps.



  An additional note from ???:


      I have such a macro in my .gdbinit for quite some time now, and it
      for sure makes life easier. A small difference : I use "x /8i $pc",
      which guarantee a fixed number of disassembled instructions. Then,
      with a well chosen size for my xterm, gdb output looks like it is
      refreshed, and not scrolling.



  If you want to set breakpoints across your code, you can just use int
  3 instruction as breakpoint (instead of entering address manually in
  gdb).


  7.2.3.  Any other useful debugging tools?

  Definitely strace can help a lot (ktrace and kdump on FreeBSD), it is
  used to trace system calls and signals.  Read its manual page (man
  strace) and strace --help output for details.



  7.2.4.  How do I access BIOS functions from Linux (BSD, BeOS, etc)?

  Noway. This is protected mode, use OS services instead.  Again, you
  can't use int 0x10, int 0x13, etc.  Fortunately almost everything can
  be implemented through system calls or library functions.  In the
  worst case you may go through direct port access, or make a kernel
  patch to implement needed functionality.

  That's all for now, folks.

  $Id: Assembly-HOWTO.sgml,v 1.16 2000/07/11 10:38:10 konst Exp $



  Linux Astronomy HOWTO
  Elwood Downey and John Huggins howto@astronomy.net
  $Revision: 1.6 $, $Date: 2000/05/03 22:01:25 $

  This document shares tips and resources to utilize Linux solutions in
  the pursuit of Astronomy.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Knowledge Required
     1.2 Scope
     1.3 Version
     1.4 Copyright

  2. Software

     2.1 Collections
     2.2 Planetarium Programs
     2.3 Libraries
     2.4 Other

  3. Astronomical Images over the web

     3.1 List

  4. Organizations

  5. Hardware Control

     5.1 Telescope Control
     5.2 CCD Camera Control

  6. Installation Help



  ______________________________________________________________________

  1.  Introduction

  1.1.  Knowledge Required


  With all the help from major Linux distributions such as SuSE, Redhat,
  Caldera and many others, Linux based systems are becoming easier to
  use.  However, there is still some need of understanding of basic UNIX
  skills to make the most of Linux.  Thus, this HOWTO will assume that
  the reader has at least a basic knowledge of using a UNIX system
  including the ability to compile and install programs.

  A few resources we have found useful over the years include:



    "A Practical Guide to the UNIX System", Mark G. Sobel

    "Advanced Programming in the UNIX Environment", the late W. Richard
     Stevens

    "Running LINUX", Matt Welsh et al.

    "LINUX Device Drivers", Alessandro Rubini



  Similarly, this is not a tutorial or reference for astronomy
  principles or

  astronomical instrumentation. Astronomy is perhaps the grandest of all

  sciences, employing widely disparate disciplines in a bold attempt to

  understand nothing less than the universe itself. Your interests will
  lead

  in many directions. A few references we have used include:



    "Astronomy with your Personal Computer", Peter Duffett-Smith

    "Astronomy on the Personal Computer", Oliver Montenbruck et al

    "Textbook on Spherical Astronomy", W. M. Smart

    "The Astronomy and Astrophysics Encyclopedia", Stephen P. Maran,
     ed.



  1.2.  Scope


  The authors define the scope of this HOWTO as primarily an index

  to Linux tools applicable in some fashion to the pursuit of Astronomy.
  It

  is *not* our intention to list WWW astronomy references in general.
  Our

  own interests tend more towards the technology than the pure science
  and so

  we welcome contributions from others who have found Linux tools which

  contribute in other ways to Astronomy. Please contact us at the
  address

  above.


  1.3.  Version


  $Revision: 1.6 $



  $Date: 2000/05/03 22:01:25 $



  The latest version of this document is always available on the
  Astronomy Net at Astronomy HOWTO.
  We eagerly accept suggestions from you.  Send them to Astronomy HOWTO
  Editors.



  1.4.  Copyright


  Copyright 2000 by Elwood Downey and John Huggins. This document may be
  distributed only subject to the terms and conditions set forth in the
  LDP License except that this document must not be distributed in
  modified form without the author's consent.



  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author. Translations
  are similarly permitted without express permission if it includes a
  notice on who translated it.  Commercial redistribution is allowed and
  encouraged; however please notify authors of any such distributions.



  Excerpts from the document may be used without prior consent provided
  that the derivative work contains the verbatim copy or a pointer to a
  verbatim copy.



  Permission is granted to make and distribute verbatim copies of this
  document provided the copyright notice and this permission notice are
  preserved on all copies.



  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we wish to retain copyright on
  this HOWTO document, and would like to be notified of any plans to
  redistribute this HOWTO.



  2.  Software



  2.1.  Collections


  Here are some links to collections and other indexes of Linux
  astronomy

  software.


    The Linux for Astronomy CDROM

    Scientific Applications on Linux (SAL), Physics and Astronomy

    Linux Applications and Utilities Page, Science and Math



  2.2.  Planetarium Programs


  Here is discussion of whole programs for use in finding objects,
  natural and

  man-made, in the sky which run on Linux.



    XEphem

     has been the pet project of one of us (Downey) for the past

     15-odd years. It has grown to become one of the more capable

     interactive tools for the computation of astronomical ephemerides.



    XSky

     is by Terry R. Friedrichsen, terry@venus.sunquest.com. XSky is

     essentially an interactive sky atlas.



     Skymap

     is an astronomical mapping program written in Fortran and C for
     unix workstations by Doug Mink of the Smithsonian Astrophysical
     Observatory Telescope Data Center.



     Xplns

     reproduces real starry sky on your display of X Window System.



     AstrHorloge

     is a small astronomy software that shows a sky map, give you the
     coordinates of

     stars and planets.



  2.3.  Libraries


  This section discusses bits and pieces of software that can be used to
  form the

  basis for specialized projects.



    SLALIB, part of the

     Starlink Project, is a

     complete library of subroutines for astrometric computations.



    Astrophysics Source Code Library

     is a collection of links to numerical astrophysical process models.



    Astronomy and numerical software source codes is a collection of C
     codes related to astronomy.



    How to compute planetary positions.



  2.4.  Other


  Every list needs a miscellaneous section, and this is it for Software.



    IRAF is a gigantic

     but exceptionally capable astronomical analysis system,

     shepherded over the past 20-odd years by Doug Tody of NOAO.

     It has accumulated innumerable authoritative contributions from
     leading

     astronomers in all areas of astronomical data analysis. If you have
     a serious

     interest in astronomical data reduction and significant time to
     invest, this

     system will reward you mightily.



    Nightfall Eclipsing Binary Star Program



  3.  Astronomical Images over the web


  Much effort exists to allow access to Astronomical image file type
  such as FITS from any web browser.  Here are some pointers.



  3.1.  List


  The folks at harvard have a list of Image Servers and Image Browsers.



    Astronomical Images Over the Web



  4.  Organizations



    The yearly Astronomical Data Analysis Software and Systems, ADAAS,

     Conference Series provides a forum for scientists and computer
     specialists

     concerned with algorithms, software and operating systems in the
     acquisition,

     reduction and analysis of astronomical data.  The program includes
     invited

     talks, contributed papers and poster sessions as well as user group
     meetings

     and special interest meetings ("BOFs'').  All these activities aim
     to

     encourage communication between software specialists and users, and
     also to

     stimulate further development of astronomical software and systems.



     The linuxastro mailing list, linuxastro@majordomo.cv.nrao.edu, is
     for

     people who are interested in porting astronomical software to
     linux. For

     more information, see

     linuxastro.



  5.  Hardware Control


  More folks are using Linux to control equipment.  Users range from
  amateur astronomers in the field to professional observatories.



  5.1.  Telescope Control



     OCAAS is a

     complete Observatory Control and Astronomical Analysis System for
     Linux.



    XEphem

     has the capability to communicate with a telescope control daemon
     process.



  5.2.  CCD Camera Control



     Apogee Instruments Inc supports their line of professional CCD
     cameras under Linux.



     SBIG offers some assistance with operating their ST7 and ST8 CCD
     cameras under Linux.



  6.  Installation Help


  You need to know what you're doing with Linux and installing programs,
  but help is available for some programs.  Here are some ways to make
  life easier.



     AstroMake

     is is a utility intended to make installations of some common
     astronomical packages (in binary form) easy.



     XEphem requires several elements to exist on your machine.  Life
     is much

     simpler with the CDROM version of the program as it contains an
     installation

     script which loads the appropriate precompiled binary for most
     systems and

     places all auxiliary files to the correct spots. See

     XEphem CDROM




Linux BRIDGE-STP-HOWTO

Uwe Bhme

             Johann-Heinrich-Abt-Strae 7
             95213
             Mnchberg
             Germany
             +49/9251 960877
             +49/9251 960878
             uwe@bnhof.de
   
Lennert Buytenhenk

   bridge code maintainer and developer
   gnu.org
   
             buytenh@gnu.org
   
   Still draft
   
   Copyright  2000 by Uwe Bhme
   Revision History
   Revision v0.00 01 June 2000 Revised by: U.B.
   Initial Release.
   Revision v1.01 07 June 2000 Revised by: U.B.
   Applied patch from Lennert. Corrected some syntactical errors.
   Completed some brctl commands. Added test output and description.
   Revision v1.02 08 June 2000 Revised by: U.B.
   More typo and grammar corrections.
   Revision v1.03 09 June 2000 Revised by: U.B.
   The usual typo. Applied Lennert's explanations about the message logs
   of the pull-the-plug-test.
   Revision v1.04 11 June 2000 Revised by: U.B.
   The usual typo. Applied ultimate test dumps.
   Revision v1.05 17 June 2000 Revised by: U.B.
   System freeze remark. Modified style sheet.
   Revision v0.01 25 June 2000 Revised by: U.B.
   Changes name from BRIDGE-HOWTO to BRIDGE-STP-HOWTO (avoid interference
   with BRIDGE-HOWTO by Christopher Cole) and restart Version numbering
   (we where already too far). Lennert Buytenhenk announced as coauthor.
     _________________________________________________________________
   
   Table of Contents
   1. [1]License
   2. [2]What Is A Bridge?
   3. [3]Rules On Bridging
   4. [4]Preparing The Bridge
          
        4.1. [5]Get The Files
        4.2. [6]Apply The Patches
        4.3. [7]Configure The Kernel
        4.4. [8]Compile The Kernel
        4.5. [9]Compile The Bridge Utilities
                
   5. [10]Set Up The Bridge
          
        5.1. [11]brctl Command Synopsis
        5.2. [12]Basic Setup
                
   6. [13]Advanced Bridge Features
          
        6.1. [14]Spanning Tree Protocol
        6.2. [15]Bridge And The IP-Chains
                
   7. [16]A Practical Setup Example
          
        7.1. [17]Hardware-setup
        7.2. [18]Software-setup
        7.3. [19]See It Work
        7.4. [20]Bridge Tests
                
   Appendix A. [21]Network Interface Cards
   Appendix B. [22]Recommended Reading
   Appendix C. [23]FAQ
          
   About The Linux Modular Bridge And STP
   
   This document describes how to setup a bridge with the recent kernel
   patches and brctl utility by Lennert Buytenhek. With developer kernel
   2.3.47 the new bridging code is part of the mainstream. On 20.06.2000
   there are patches for stable kernels 2.2.14 and 2.2.15. What happend
   if a penguin crosses a bridge?
     _________________________________________________________________
   
1. License

   Copyright (c) 2000 by Uwe Bhme. This document may be distributed only
   subject to the terms and conditions set forth in the [24]LDP License
   available at [25]http://sunsite.unc.edu/LDP/LICENSE.html
     _________________________________________________________________
   
2. What Is A Bridge?

   A bridge is a device that separates two or more network segments
   within one logical network (e.g. IP-subnet).
   
   A bridge is usually placed between two separate groups of computers
   that talk with each other, but not that much with the computers in the
   other group. A good example of this is to consider a cluster of
   Macintoshes and a cluster of Unix machines. Both of these groups of
   machines tend to be quite chatty amongst themselves, and the traffic
   they produce on the network causes collisions for the other machines
   who are trying to speak to one another.
   
   The job of the bridge is to examine the destination of the data
   packets one at a time and decide whether or not to pass the packets to
   the other side of the Ethernet segment. The result is a faster,
   quieter network with less collisions.
   
   The bridging code decides whether to bridge data or to drop it not by
   looking at the protocol type (IP, IPX, NetBEUI), but by looking at the
   MAC-address unique to each NIC.
   
   Important
   
   It's vital to understand that a bridge is neither a router nor a
   fire-wall. Spoken in simple term a bridge behaves like a network
   switch (i.e. Layer 2 Switch), making it a transparent network
   component (which is not absolutely true, bat nearly). Read more about
   this at [26]Section 3.
   
   In addition, you can overcome hardware incompatibilities with a
   bridge, without leaving the address-range of your IP-net or subnet.
   E.g. it's possible to bridge between different physical media like 10
   Base T and 100 Base TX.
   
   My personal reason for starting to set up a bridge was that in my work
   I had to connect Fast Ethernet components to a existing HP Voice Grade
   network, which is a proprietary networking standard.
   
   Features Above Pure Bridging
   
   STP
          The Spanning Tree Protocol is a nifty method of keeping
          Ethernet devices connected in multiple paths working. The
          participating switches negotiate the shortest available path by
          STP. This feature will be discussed in [27]Section 6.1.
          
   Multiple Bridge Instances
          Multiple bridge instances allow you to have more than one
          bridge on your box up and running, and to control each instance
          separately.
          
   Fire-walling
          There is a patch to the bridging code which allows you to use
          IP chains on the interface inside a bridge. More info about
          this you'll find at [28]Section 6.2.
     _________________________________________________________________
   
3. Rules On Bridging

   There is a number of rules you are not allowed to break (otherwise
   your bridge does).
   
     * A port can only be a member of one bridge.
     * A bridge knows nothing about routes.
     * A bridge knows nothing about higher protocols than ARP. That's the
       reason why it can bridge any possible protocol possibly running on
       your Ethernet.
     * No matter how many ports you have in your logical bridge, it's
       covered by only one logical interface
     * As soon as a port (e.g. a NIC) is added to a bridge you have no
       more direct control about it.
       
   Warning
   
   If one of the points mentioned above is not clear to you now, don't
   continue reading. Read the documents listed in [29]Appendix Appendix B
   first.
   
   If you ever tried to ping an unmanaged switch, you will know that it
   doesn't work, because you don't have a IP-address for it. To switch
   datagrams it doesn't need one. The other thing is if you want to
   manage the switch. It's too much strain, to take a dumb terminal, walk
   to the place you installed it (normally a dark, dusty and warm room,
   with a lot of green and red Christmas lights), to connect the terminal
   and to change the settings.
   
   What you want is remote management, usually by SNMP, telnet, rlogin or
   (best) ssh. For all this services you will need a IP. That's the
   exception to the transparency. The new code allows you without any
   problem to assign a IP address to the virtual interface formed by the
   bridge-instance you will create in [30]Section 5.2. All NIC's (or
   other interfaces) in your bridge will happily listen and respond to
   datagrams destined to this IP.
   
   All other data will not interfere with the bridge. The bridge just
   acts like a switch.
     _________________________________________________________________
   
4. Preparing The Bridge

   This section describes what you need and how you do to prepare your
   bridge.
     _________________________________________________________________
   
4.1. Get The Files

   Here you can find a list of the files and down-loads you will need for
   the setup of the bridge. If you have one of the mentioned files or
   packages on your distribution, of course there is no need to create
   network load.
   
   I'll only mention the files for the 2.2.14 kernel. If you want to try
   a different one (e.g. 2.2.15 or the recent development kernel) just
   replace the kernel version number and look whether you find it.
   
   File and package list
   
   Unpatched kernel-sources
          E.g. linux-2.2.14.tar.bz2 available from your local kernel.org
          mirror. Please check first if you find it in your distribution
          (take unpatched kernel-sources). If you don't, please check
          [31]The Linux Kernel Archive Mirror System for a close by
          mirror and down-load it from there.
          
   Bridge patches
          
   Note
   
   If your kernel is later than 2.3.47 you don't need this. The bridging
   is part of the mainstream from that version.
   
          Get the bridge kernel patches for your kernel version from
          [32]http://www.openrock.net/bridge/. Identify the file by the
          kernel number.
          
   Note
   
   There are also patches allowing to work with IP chains. I never tried
   it, for I don't see the need to fire-wall inside my LAN, and
   absolutely no need to bridge against the outer world. Feel free to
   contribute about that issue.
   
   Kernel patches for the stable 2.2 kernel. 
          + [33]bridge-0.0.5-against-2.2.14.diff
          + [34]bridge-0.0.5-against-2.2.15.diff
            
   Bridge configuration utilities
          You also will need the bridge configuration utilities to set up
          the bridge [35]Section 5. You can also download them from
          [36]http://www.openrock.net/bridge/. The current one (as of
          this writing) is bridge-utils-0.9.1.tar.gz.
          [37]bridge-utils-0.9.1.tar.gz.
     _________________________________________________________________
   
4.2. Apply The Patches

   Note
   
   If your kernel is later than 2.3.47 you don't need this. The bridging
   is part of the mainstream from that version.
   
   Apply the bridging patch your kernel. If you don`t know how to do that
   read the Kernel-HOWTO which can be found in your distribution or at
   [38]http://sunsite.unc.edu/LDP/HOWTO/HOWTO-INDEX.html 
   
   Example 1. Applying a kernel patch
root@mbb-1:~ # cd /usr/src/linux-2.2.14
root@mbb-1:/usr/src/linux-2.2.14 # patch -p1 < \
    bridge-0.0.5-against-2.2.14.diff
.
.
     _________________________________________________________________
   
4.3. Configure The Kernel

   Now it's time we configure our freshly patched kernel to create the
   ability to bridge.
   
   Run make config, make menuconfig or the click-o-rama make xconfig.
   Select bridging in the networking option section to be compiled as a
   module. AFAIK there is no strong reason why not to compile it as a
   kernel module, whereas I heard rumors about problems with compiling
   the bridging code directly into the kernel.
   
root@mbb-1:~ # cd /usr/src/linux-2.2.14
root@mbb-1:/usr/src/linux-2.2.14 # make menuconfig
.
     _________________________________________________________________
   
4.4. Compile The Kernel

   Compile your kernel [39]Example 2. Make the new compiled kernel-image
   to be loaded. I don't know if the kernel patches only apply to the
   bridging-module or also modify some interfaces inside vmlinuz. So it
   might not be a error to give a reboot after you updated the
   kernel-image.
   
   Example 2. Commands To Compile Your Kernel
root@mbb-1:/usr/src/linux-2.2.14 # make dep clean zImage modules modules_instal
l zlilo
...
     _________________________________________________________________
   
4.5. Compile The Bridge Utilities

   There is no magic about it. Just unzip the utilities-tarball, cd into
   the newly created directory and give a make.
   
   Example 3. Commands To Compile Your Bridge-Utilities
root@mbb-1:/usr/src/linux-2.2.14 # cd /usr/local/src
root@mbb-1:/usr/local/src/ # tar xzvf bridge-utils-0.9.1.tar.gz
.....
....
root@mbb-1:/usr/local/src # cd bridge
root@mbb-1:/usr/local/src/bridge # make
.....
....

   After the compilation shown in [40]Example 3 have worked properly, you
   can copy the executables to let's say /usr/sbin/ (at least I did). So
   the commands you have to give should be clear, but to be complete see
   [41]Example 4
   
   Example 4. Copy The Binaries Of The Utilities
root@mbb-1:/usr/local/src/bridge # cd brctl
root@mbb-1:/usr/local/src/bridge/brctl # cp brctl /usr/bin/local
root@mbb-1:/usr/local/src/bridge/brctl # chmod 700 /usr/bin/local/brctl
root@mbb-1:/usr/local/src/bridge/brctl # cp brctld /usr/bin/local
root@mbb-1:/usr/local/src/bridge/brctl # chmod 700 /usr/bin/local/brctld

   Also now you can copy the new man-page to a decent place, as shown in
   [42]Example 5.
   
   Example 5. Copy The Man-page Of brctl
root@mbb-1:/usr/local/src/bridge # cd doc
root@mbb-1:/usr/local/src/bridge/doc #  gzip -c brctl.8 > /usr/local/man/man8/b
rctl.8.gz
     _________________________________________________________________
   
5. Set Up The Bridge

   Make sure all your network cards are working nicely and are
   accessible. If so, ifconfig will show you the hardware layout of the
   network-interface. If you have problems making your cards work please
   read the Ethernet-HOWTO at
   [43]http://sunsite.unc.edu/LDP/HOWTO/HOWTO-INDEX.html . Don't mess
   around with IP-addresses or net-masks. You will not need it, until you
   bridge fully operational an up.
   
   After you did the steps mentioned above a modprobe -v bridge should
   show no errors. Also for each of the network cards you want to use in
   the bridge the ifconfig whateverNameYourInterfaceHas should give you
   some information about the interface.
   
   If your bridge-utilities have been correctly built and your kernel and
   bridge-module are OK, then issuing a brctl should show a small command
   synopsis.
     _________________________________________________________________
   
5.1. brctl Command Synopsis

root@mbb-1:~ # brctl
commands:
    addbr           <bridge>                add bridge                       (1
)
    addif           <bridge> <device>       add interface to bridge          (2
)
    delbr           <bridge>                delete bridge                    (3
)
    delif           <bridge> <device>       delete interface from bridge     (4
)
    show                                    show a list of bridges           (5
)
    showbr          <bridge>                show bridge info                 (6
)
    showmacs        <bridge>                show a list of mac addrs         (7
)

    setageing       <bridge> <time>         set ageing time                  (8
)
    setbridgeprio   <bridge> <prio>         set bridge priority              (9
)
    setfd           <bridge> <time>         set bridge forward delay         (1
0)
    setgcint        <bridge> <time>         set garbage collection interval  (1
1)
    sethello        <bridge> <time>         set hello time                   (1
2)
    setmaxage       <bridge> <time>         set max message age              (1
3)
    setpathcost     <bridge> <port> <cost>  set path cost                    (1
4)
    setportprio     <bridge> <port> <prio>  set port priority                (1
5)
    stp             <bridge> <state>        {dis,en}able stp                 (1
6)

   [44](1) [45](3) 
          The brctl addbr bridgename command creates a logical bridge
          instance with the name bridgename. You will need at least one
          logical instance to do any bridging at all. You can interpret
          the logical bridge being a container for the interfaces taking
          part in the bridging. Each bridging instance is represented by
          a new network interface.
          
   Example 6. Creating A Instance
root@mbb-1:~ # brctl addbr mybridge1


          The corresponding "shutdown" command is brctl delbr bridgename.
          
   Caution
   
   brctl delbr bridgename will only work, if there are no more interfaces
   added to the instance you want to delete.
   [46](2) [47](4) 
          The brctl addif bridgename device command enslaves the network
          device device to take part in the bridging of bridgename. As a
          simple explanation, each interface enslaved into a instance is
          bridged to the other interfaces of the instance.
          The corresponding command to tale a interface out of the bridge
          would be brctl delif bridgename device
   [48](5) 
          The brctl show command gives you a summary about the overall
          bridge status, and the instances running as shown in
          [49]Example 7. If you are interested in detailed information
          about a instance and it's interfaces you will have to check
          [50](6) .
          
   Example 7. Output Of brctl show
root@mbb-1:~ # brctl show
bridge name     bridge id               stp enabled
mybridge1       0000.0800062815f6       yes


   [51](6) 
          The brctl showbr bridgename command gives you a summary about a
          bridge instance and it's enslaved interfaces.
          
   Example 8. Output Of brctl showbr bridgename
root@mbb-1:~ # brctl showbr mybridge1
mybridge1
 bridge id              0000.0800062815f6
 designated root        0000.0800062815f6
 root port                 0                    path cost                  0
 max age                   4.00                 bridge max age             4.00
 hello time                1.00                 bridge hello time          1.00
 forward delay             4.00                 bridge forward delay       4.00
 ageing time             300.00                 gc interval                4.00
 hello timer               0.84                 tcn timer                  0.00
 topology change timer     0.00                 gc timer                   1.84
 flags


eth0 (1)
 port id                8001                    state                   forward
ing
 designated root        0000.0800062815f6       path cost                100
 designated bridge      0000.0800062815f6       message age timer          0.00
 designated port        8001                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.84
 flags

eth1 (2)
 port id                8002                    state                   forward
ing
 designated root        0000.0800062815f6       path cost                100
 designated bridge      0000.0800062815f6       message age timer          0.00
 designated port        8002                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.84
 flags


   [52](7) 
          The brctl showmacs bridgename command gives you a list of
          MAC-addresses of the interfaces which are enslaved in
          bridgename.
          
   Example 9. Output Of brctl showmacs bridgename
root@mbb-1:~ # brctl showmacs mybridge1
port no mac addr                is local?       ageing timer
  1     00:10:4b:b6:c6:e4       no               119.25
  1     00:50:04:43:82:85       no                 0.00
  1     00:50:da:45:45:b1       no                76.75
  1     00:a0:24:d0:4c:d6       yes                0.00
  1     00:a0:24:f0:22:71       no                 5.81
  1     08:00:09:b5:dc:41       no                22.22
  1     08:00:09:fb:39:a1       no                27.24
  1     08:00:09:fc:92:2c       no                53.13
  4     08:00:09:fc:d2:11       yes                0.00
  1     08:00:09:fd:23:88       no               230.42
  1     08:00:09:fe:0d:6f       no               144.55


   [53](8) 
          Sets the aging time. The aging time is the number of seconds a
          MAC-address will be kept in the forwarding database after
          having received a packet from this MAC address. The entries in
          the forwarding database are periodically timed out to ensure
          they won't stay around forever. Normally there should be no
          need to modify this parameter.
   [54](9) 
          Sets the bridge's relative priority. The bridge with the lowest
          priority will be elected as the root bridge. The root bridge is
          the "central" bridge in the spanning tree. More information
          about STP you find at [55]Section 6.1.
   [56](10) 
          Sets the forwarding delay time. The forwarding delay time is
          the time spent in each of the Listening and Learning states
          before the Forwarding state is entered.
   [57](11) 
          Sets the garbage collection interval. Every (this number)
          seconds, the entire forwarding database is checked for
          timed-out entries. The timed-out entries are removed.
   [58](12) 
          Sets the hello time. Every (this number) seconds, a hello
          packet is sent out by the Root Bridge and the Designated
          Bridges. Hello packets are used to communicate information
          about the topology throughout the entire Bridged Local Area
          Network. More information about STP you find at [59]Section
          6.1.
   [60](13) 
          Sets the maximum message age. If the last seen (received) hello
          packet is more than this number of seconds old, the bridge in
          question will start the takeover procedure in attempt to become
          the Root Bridge itself. More information about STP you find at
          [61]Section 6.1.
   [62](14) 
          Sets the cost of receiving (or sending, I'm not sure) a packet
          on this interface. Faster interfaces should have lower path
          costs. These values are used in the computation of the minimal
          spanning tree. More information about STP you find at
          [63]Section 6.1. Paths with lower costs are likelier to be used
          in the spanning tree than high-cost paths (As an example, think
          of a gigabit line with a 100Mbit or 10Mbit line as a backup
          line. You don't want the 10/100Mbit line to become the primary
          line there.)
          The Linux implementation currently sets the path cost of all
          eth* interfaces to 100, the nominal cost for a 10Mbit
          connection. There is unfortunately no easy way to discern
          10Mbit from 100Mbit from 1Gbit Ethernet cards, so the bridge
          cannot use the real interface speed.
   [64](16) 
          With this parameter you can enable or disable the Spanning Tree
          Protocol.
   [65](9) [66](12) [67](14) [68](16) 
          This parameters are only of interest, if you have more than one
          bridge in your LAN and stp enabled. Before modifying them you
          should read [69]Section 6.1.
     _________________________________________________________________
   
5.2. Basic Setup

   The standard configuration should consist of:
   
    1. Create the bridge interface.
       
root@mbb-1:~ # brctl addbr mybridge


    2. Add interfaces to the bridge.
       
root@mbb-1:~ # brctl addif mybridge eth0
root@mbb-1:~ # brctl addif mybridge eth1


    3. Zero IP the interfaces.
       
root@mbb-1:~ # ifconfig eth0 0.0.0.0
root@mbb-1:~ # ifconfig eth1 0.0.0.0


    4. Optionally you can configure the virtual interface mybridge to
       take part in your network. It behaves like one interface (like a
       normal network card). Exactly that way you configure it.
       
root@mbb-1:~ # ifconfig mybridge 192.168.100.5 netmask 255.255.255.0 up


   A more sophisticated setup script you will find at [70]Example 16.
   
   Important
   
   If you get the terrible experience of a frozen system or some nasty
   behavior of your nicely shaped linux box at
root@mbb-1:~ # ifconfig ethn 0 0.0.0.0

   please try (after the reboot of the system if necessary) before
   starting any bridge stuff at all a
root@mbb-1:~ # ifconfig ethn promisc up

   If again your system is frozen it's you NIC's driver you have to
   blame, not the bridging code.
     _________________________________________________________________
   
6. Advanced Bridge Features

   Here we will cover some advanced features of the new bridge code.
     _________________________________________________________________
   
6.1. Spanning Tree Protocol

   Tell me... 
   
     * You are a networkadmin...?
     * You have a switch on top of your ethernet tree...?
     * You have nightmares of a switch emmiting smoke...?
     * Your company is not extremely rich and con provide another
       redundant switch just waiting for you to plug the patchwires..?
     * You don't feel like placing your bed close to your main network
       node to plug the wires...?
       
   Don't wait until you're just another nervous wreck. Join linux bridge
   community and enjoy the relaxment a stp-enabled inhouse scenario is
   offering to you.
   
   Ok, let's leave that commercial and get back linux and the bridge.
   Take a look on this small thread from the linux-bridge mailing list.
   
STP Thread from bridge@openrock.net

   [71]Could you give me some hints about multi-bridge scenarios. 
   [72]Does the STP "heartbeat" mechanism also work with bridges with
          more than two cards? 
          
   [73]How fast does it get up, and what can I do about it? 
          
   Could you give me some hints about multi-bridge scenarios.
   
   You can just set up two "mirrored" bridges. You have two network
   interfaces in your bridge? Set up the mirror bridge so that it has two
   network interfaces as well, and connect each of the interfaces to one
   subnet. This will work without the need of configuration.
   
   Note
   
   Be sure that you have the spanning tree protocol enabled. If you
   didn't use brctl, this should be fine, because in Linux, it is on by
   default. To check, you could check whether the bridge sends a packet
   to 0180c2000000 every 2 seconds. If it does, the STP is on. The STP is
   needed so that only one bridge will be active at any given time.
   
   The "master" bridge will send out STP packets every 2 seconds by
   default. The "slave" bridge will receive these packets, and will
   notice that the master is still up. If the slave hasn't received a
   packet in 20 seconds (max. message age parameter), it will start the
   takeover procedure. From the moment the takeover procedure starts, it
   will take about 30 seconds (twice the forward delay parameter) for the
   bridge to become fully operational.
   
   Does the STP "heartbeat" mechanism also work with bridges with more
   than two cards?
   
   Yes, it works with any number of interfaces. You can invent bizarre
   topologies to your heart's desire. You can use multiple (redundant)
   bridge-bridge connects, you can insert loops, whatever. The STP code
   will always find the minimal spanning tree. The bridge code will even
   deal with the loss of any number of interfaces. If there are two
   redundant bridges with identical connections, the loss of an interface
   on one of the bridges will cause the other bridge to take over
   forwarding to that specific interface. Now isn't that great? :)
   
   How fast does it get up, and what can I do about it?
   
   If you think 50 seconds is too much -- and I guess you should; alas,
   the IEEE specs gives us these default values -- you can tweak these
   parameters. If you set the hello time (the STP packet interval) from 2
   to 1 second, you can safely set the message age parameter to 4
   seconds. Then you can set the forward delay to 4 seconds, and this
   will in total give you a takeover time of ~12 seconds.
   
   The great thing which is made possible by STP is a redundant parallel
   bridging scenario, with automated take over features. Within a network
   basing on stp the bridges always try to send a datagram the (by path
   cost) shortest path. Only on that path the bridges are forwarding, all
   other paths between this shortest way are blocked. If there is a
   broken path, the bridges agree about the next shortest. So doubled
   paths don't break the net, but are bringing more security... For a
   example setup of a fail secured connection see [74]Section 7.
     _________________________________________________________________
   
6.2. Bridge And The IP-Chains

   The normal idea about a bridge would not allow anything like
   firewalling, but since several people have asked Lennert for ipchains
   firewalling on bridge forwarding he implemented it.
   
   Important
   
   If you want to do this, you will need to apply the special
   ip-chain-bridge-patch (also available at [75]the bridge homepage).
   
   As soon you have everything up correctly, the bridging code will check
   each to-be-forwarded packet against the ipchains chain which has the
   same name as the bridge.
   
   So.. if a packet on eth0 is to be forwarded to eth1, and those
   interfaces are both part of the bridge group br0, the bridging code
   will check the packet against the chain called 'br0'.
   
   Warning
   
   If the chain does not exist, the packet will be forwarded. So if you
   want to do firewalling, you'll have to create the chain yourself.
   
   Example 10. A Simple Bridge Firewall Setup
Example:
# brctl addbr br0                                    (1)
# brctl addif br0 eth0                               (2)
# brctl addif br0 eth1                               (3)
# ifconfig br0 10.0.0.254                            (4)
# ipchains -N br0                                    (5)
# ipchains -A br0 -s 10.0.0.1/8 -i eth0 -j DENY      (6)

   [76](1) 
          Creating a bridge interface named br0
   [77](2) [78](3) 
          Placing eth0 and eth1 into the bridge.
   [79](4) 
          Assigning a regular IP address to the bridge. The IP is taken
          from private network 10.X.X.X (Class A).
   [80](5) 
          Creating a ip-chain named br0
   [81](1) [82](5) 
          
   Caution
   
   It's vital to have the same name here (br0 or whatever you have
   selected, as long as you have the same in all places).
   [83](6) 
          Denying all trafic with source 10.X.X.X on eth0.
     _________________________________________________________________
   
7. A Practical Setup Example

   This is a real-world example which is currently working in our
   network. Even if it's for sure not a very common situation it might be
   useful.
   
   I had to solve a small hardware incompatibility. HP-VG (Voice Grade)
   100Mbit network is not fast Ethernet compatible. Having neither the
   money nor the will to replace the stuff and having the need to expand
   the system I had to find a solution which was a) stable and b) cheap.
   
   For sure buying a HP modular switch was not meeting condition b). So I
   remembered I heard about Linux-bridging which automatically fulfilled
   condition a) and b).
   
   So quite some time ago I successfully set up a bridge between the two
   incompatible networks. Its first hardware-layout is shown in
   [84]Figure 1.
   
   Figure 1. Hardware setup Of The Old Bridge Scenario
   
   [old-hardware-setup.png]
   
   The old setup of my previous linux bridge
   
   It was configured as a transparent network component, meaning it
   didn't take a part in the network, but only bridged it. Originally it
   was set up on kernel 2.0.35 from a SuSE 5.3 distribution.
   
   The next problem showed up at once. A single bridge connecting the big
   segments might be c) a bottleneck and d) a reason to kill the
   netadmin, if it blows up. So I tried to find some solution for that
   problem.
   
   What happened next was that I discovered some hints that a new
   maintainer took over the bridging code. A few mails on the
   bridge-mailing list later as shown in [85]Section 6.1 I was more
   clever. The new modular bridging code fulfilled exactly what I was
   looking for.
   
   The new maintainer: Lennert Buytenhek . His project page can be found
   at [86]http://openrock.net/bridge IMHO he's doing a great job. Thanks
   a lot.
     _________________________________________________________________
   
7.1. Hardware-setup

   The ideas and hints I got from the mailing list discussion shown in
   [87]Section 6.1 lead to a new hardware-setup shown in [88]Figure 2.
   The setup is intended to provide a default machine (guess which one).
   The bridge has 3 HP cards of which each is connected to a HP VG15 hub.
   The 3com card is connected to a 3com Superstack Fast Ethernet switch.
   
   Figure 2. Hardware Setup Of The Multi bridge Scenario
   
   [hardware-setup.png]
   
   The practically working setup of my local linux Ethernet multi bridge
   
   This setup is not only fail proof to any one of the bridge's
   interfaces being down, but also to complete blackout of one of the
   bridges. Additional advantage to the old-setup [89]Figure 1 that the
   single HUBS are switched. This means that a datagram being sent from
   one port on the VG15 HUB blocks 30 ports by maximum and 15 ports by
   minimum, instead of blocking all 45 ports. Also, the breakdown of the
   HUB, to the old bridge was connected, would have caused the whole
   HP-segment to break down. With the new code only the machines
   connected to the broken HUB will get no more data.
     _________________________________________________________________
   
7.2. Software-setup

   For both bridges the setup is exactly the same (with the exception of
   bridge priority which will be discussed later on). The machine was
   setup by the SuSE 6.4 distribution with the original unpatched kernel
   sources installed. At this point only the minimal configuration and no
   additional hardware or network setup.
   
   The basic setup is according the descriptions in the beginning of this
   document. The thing I did in addition was bringing up the unpatched
   2.2.14 sources of the SuSE 6.4 distribution to version 2.2.15 as in
   [90]Example 11.
   
   Example 11. Upgrading The Kernel From 2.2.14 To 2.2.15
root@mbb-1:~ # cd /usr/src/linux-2.2.14
root@mbb-1:/usr/src/linux-2.2.14 # patch -p1 \
    /usr/local/download/kernel/patch-2.2.15
patching file ........................
patching file ...................
...
..
root@mbb-1:/usr/src/linux-2.2.14 # cd ..
root@mbb-1:/usr/src # mv linux-2.2.14 linux-2.2.15
root@mbb-1:/usr/src # rm linux
root@mbb-1:/usr/src # ln -s linux-2.2.15 linux

   Next step was to apply the bridge-patch as shown in [91]Example 12.
   
   Example 12. Applying The Kernel Patch
root@mbb-1:/usr/src # cd /usr/src/linux-2.2.15
root@mbb-1:/usr/src/linux-2.2.15 # patch -p1 < \
    bridge-0.0.5-against-2.2.15.diff
patching file ........................
patching file ...................
...
..

   After that I selected the bridging code to be compiled as a module as
   shown in [92]Example 13.
   
   Example 13. Configuring The Kernel
root@mbb-1:/usr/src/linux-2.2.15 # make config

..

*
* Code maturity level options
*
Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL)
[N/y/?] Y

..


802.1d Ethernet Bridging (CONFIG_BRIDGE) [N/y/m/?] (NEW) m

..

   By the way I also selected the drivers of my NIC's to be compiled as
   modules which resulted to 3c95x.o and hp100.o.
   
root@mbb-1:/usr/src/linux-2.2.15 # make dep clean zImage \
  modules modules_install zlilo

..

root@mbb-1:/usr/src/linux-2.2.15 # init 6

   After the reboot happening I started at runlevel 1 leaving all the
   networking out of the running system. That gave me the chance to check
   the setup step by step.
   
   The command modprobe -v bridge worked without any warnings, so that
   one was OK. Next I edited my /etc/modules.conf by aliasing my network
   card drivers as shown in [93]Example 14 and [94]Example 15. I didn't
   need to make use of the options, all cards where realized proper as I
   checked by cat /proc/modules, cat /proc/interrupts and cat
   /proc/ioports.
   
   Example 14. /etc/modules.conf of mbb-1
# Aliases - specify your hardware
alias eth0             3c59x
alias eth1             hp100
alias eth2             hp100
alias eth3             hp100

   Example 15. /etc/modules.conf of mbb-2
# Aliases - specify your hardware
alias eth0             3c509
alias eth1             hp100
alias eth2             hp100
alias eth3             hp100

   So next thing would have been a step by step setup of the bridge and
   it's interfaces. Because I'm lazy I just show the init script I
   prepared for the setup.
   
   Important
   
   Of course you'll have do adapt the script to your system, if you want
   to use it. Please remember I'm writing this for the setup of a SuSE
   distribution.
   
   Example 16. Bridge Init Script
   
#! /bin/bash
# Copyright (c) 2000 Uwe Bhme.  All rights reserved.
#
# Author: Uwe Bhme <uwe@bnhof.de>, 2000
#
#
# /sbin/init.d/bridge
#

. /etc/rc.config

return=$rc_done
case "$1" in
    start)
        echo "Starting service bridge mueb"
        brctl addbr mueb  ||  return=$rc_failed           (1)
        brctl setbridgeprio mueb 0 || return=$rc_failed   (2)
        brctl addif mueb eth0  ||  return=$rc_failed      (3)
        brctl addif mueb eth1  ||  return=$rc_failed      (4)
        brctl addif mueb eth2  ||  return=$rc_failed      (5)
        brctl addif mueb eth3  ||  return=$rc_failed      (6)
        ifconfig eth0 0.0.0.0  ||  return=$rc_failed      (7)
        ifconfig eth1 0.0.0.0  ||  return=$rc_failed      (8)
        ifconfig eth2 0.0.0.0  ||  return=$rc_failed      (9)
        ifconfig eth3 0.0.0.0  ||  return=$rc_failed      (10)
        brctl sethello mueb 1  ||  return=$rc_failed      (11)
        brctl setmaxage mueb 4  ||  return=$rc_failed     (12)
        brctl setfd mueb 4  ||  return=$rc_failed         (13)
        
        echo -e "$return"
        ;;
    stop)
        echo "Shutting down service bridge mueb"
        brctl delif mueb eth3  ||  return=$rc_failed      (14)
        brctl delif mueb eth2  ||  return=$rc_failed      (15)
        brctl delif mueb eth1  ||  return=$rc_failed      (16)
        brctl delif mueb eth0  ||  return=$rc_failed      (17)
        brctl delbr mueb  ||  return=$rc_failed           (18)
        rmmod bridge || return=$rc_failed                 (19)

        echo -e "$return"
        ;;
    status)
        ifconfig mueb
        brctl showbr mueb

        ;;
    restart)
        $0 stop && $0 start || return=$rc_failed
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
esac

test "$return" = "$rc_done" || exit 1
exit 0

   [95](1) 
          This command creates a new virtual interface (bridge instance)
          with the name mueb and also brings up the bridge module.
          
   Note
   
   At least my system it does. Maybe you have to enable the kernel module
   loader.
   [96](2) 
          Here the script sets the bridge's priority (relative to other
          bridges in the net) to 0. This is indicating that this bridge
          will become the root bridge as long as there is no other bridge
          with a lower priority level available.
          
   Important
   
   In the init script of the backup bridge this line in missing, leaving
   it with the default priority of 100.
   [97](3) [98](4) [99](5) [100](6) 
          Enslaves the Ethernet interface to become a port in the bridge.
   [101](7) [102](8) [103](9) [104](10) 
          Takes away any possibly disturbing IP-address and brings the
          interface up.
   [105](11) 
          Setting the hello time of the bridge to one second makes it
          possible to reduce the maxage value of the bridges inside the
          network.
   [106](12) 
          Setting the time the a bridge is waiting before starting the
          takeover process to a shorter period.
   [107](13) 
          Forcing the bridge to forward earlier than the default time.
   [108](14) [109](15) [110](16) [111](17) 
          Take the Ethernet out of the bridging instance.
   [112](18) 
          Destroy the bridge instance.
   [113](19) 
          Remove the bridge module.
          
   To polish your setup and to be able to reach the bridge from remote
   you now can configure your bridge instance as if it would be a
   physical existing network interface. You can give it a nice IP with a
   suitable net-mask. It doesn't matter from which segment in you net,
   you will reach the bridge with this IP-address.
     _________________________________________________________________
   
7.3. See It Work

   Here I want to show and explain about how the running bridge shows up.
   The output [114]Example 17 of bridge@mbb-1 is the output of the
   primary bridge, while you see in [115]Example 18 the output of the
   backup bridge waiting to take over.
   
   Example 17. Status Output Of mbb-1 Fully Up
mueb
 bridge id              0000.0800062815f6
 designated root        0000.0800062815f6
 root port                 0                    path cost                  0
 max age                   4.00                 bridge max age             4.00
 hello time                1.00                 bridge hello time          1.00
 forward delay             4.00                 bridge forward delay       4.00
 ageing time             300.00                 gc interval                4.00
 hello timer               0.80                 tcn timer                  0.00
 topology change timer     0.00                 gc timer                   3.80
 flags


eth0 (1)
 port id                8001                    state                   forward
ing
 designated root        0000.0800062815f6       path cost                100
 designated bridge      0000.0800062815f6       message age timer          0.00
 designated port        8001                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.80
 flags

eth1 (2)
 port id                8002                    state                   forward
ing
 designated root        0000.0800062815f6       path cost                100
 designated bridge      0000.0800062815f6       message age timer          0.00
 designated port        8002                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.80
 flags

eth2 (3)
 port id                8003                    state                   forward
ing
 designated root        0000.0800062815f6       path cost                100
 designated bridge      0000.0800062815f6       message age timer          0.00
 designated port        8003                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.80
 flags

eth3 (4)
 port id                8004                    state                   forward
ing
 designated root        0000.0800062815f6       path cost                100
 designated bridge      0000.0800062815f6       message age timer          0.00
 designated port        8004                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.80
 flags

   Example 18. Status Output Of mbb-2 Fully Up
mueb
 bridge id              0064.00a024d04cd6
 designated root        0000.0800062815f6
 root port                 1                    path cost                100
 max age                   4.00                 bridge max age             4.00
 hello time                1.00                 bridge hello time          1.00
 forward delay             4.00                 bridge forward delay       4.00
 ageing time             300.00                 gc interval                4.00
 hello timer               0.00                 tcn timer                  0.00
 topology change timer     0.00                 gc timer                   2.39
 flags


eth0 (1)
 port id                8001                    state                   forward
ing
 designated root        0000.0800062815f6       path cost                100
 designated bridge      0000.0800062815f6       message age timer          0.42
 designated port        8001                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.00
 flags

eth1 (2)
 port id                8002                    state                   blockin
g
 designated root        0000.0800062815f6       path cost                100
 designated bridge      0000.0800062815f6       message age timer          0.42
 designated port        8002                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.00
 flags

eth2 (3)
 port id                8003                    state                   blockin
g
 designated root        0000.0800062815f6       path cost                100
 designated bridge      0000.0800062815f6       message age timer          0.42
 designated port        8003                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.00
 flags

eth3 (4)
 port id                8004                    state                   blockin
g
 designated root        0000.0800062815f6       path cost                100
 designated bridge      0000.0800062815f6       message age timer          0.42
 designated port        8004                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.00
 flags

   If you take a glance into /var/log/messages as shown in [116]Example
   19 and in [117]Example 20 you can see how the bridges are coming up
   and deciding how to do their duty. mbb-1 has a lower value for
   bridge-priority (see [118](9) 
   ), telling it to try to become the root bridge. As you can see mbb-1
   forwards all ports, while mbb-2 blocks all ports with the exception of
   eth0.
   
   Example 19. mbb-1 Messages From init 2
May 25 16:46:04 mbb-1 init: Switching to runlevel: 2
May 25 16:46:04 mbb-1 kernel: NET4: Ethernet Bridge 008 for NET4.0
May 25 16:46:04 mbb-1 kernel: device eth0 entered promiscuous mode
May 25 16:46:04 mbb-1 kernel: device eth1 entered promiscuous mode
May 25 16:46:04 mbb-1 kernel: device eth2 entered promiscuous mode
May 25 16:46:04 mbb-1 kernel: device eth3 entered promiscuous mode
May 25 16:46:04 mbb-1 kernel: mueb: port 4(eth3) entering listening state
May 25 16:46:04 mbb-1 kernel: mueb: port 3(eth2) entering listening state
May 25 16:46:04 mbb-1 kernel: mueb: port 2(eth1) entering listening state
May 25 16:46:04 mbb-1 kernel: mueb: port 1(eth0) entering listening state
May 25 16:46:08 mbb-1 kernel: mueb: port 4(eth3) entering learning state
May 25 16:46:08 mbb-1 kernel: mueb: port 3(eth2) entering learning state
May 25 16:46:08 mbb-1 kernel: mueb: port 2(eth1) entering learning state
May 25 16:46:08 mbb-1 kernel: mueb: port 1(eth0) entering learning state
May 25 16:46:12 mbb-1 kernel: mueb: port 4(eth3) entering forwarding state
May 25 16:46:12 mbb-1 kernel: mueb: topology change detected, propagating
May 25 16:46:12 mbb-1 kernel: mueb: port 3(eth2) entering forwarding state
May 25 16:46:12 mbb-1 kernel: mueb: topology change detected, propagating
May 25 16:46:12 mbb-1 kernel: mueb: port 2(eth1) entering forwarding state
May 25 16:46:12 mbb-1 kernel: mueb: topology change detected, propagating
May 25 16:46:12 mbb-1 kernel: mueb: port 1(eth0) entering forwarding state
May 25 16:46:12 mbb-1 kernel: mueb: topology change detected, propagating

   Example 20. mbb-2 Messages From init 2
Jun  8 06:06:16 mbb-2 init: Switching to runlevel: 2
Jun  8 06:06:17 mbb-2 kernel: NET4: Ethernet Bridge 008 for NET4.0
Jun  8 06:06:17 mbb-2 kernel: device eth0 entered promiscuous mode
Jun  8 06:06:17 mbb-2 kernel: device eth1 entered promiscuous mode
Jun  8 06:06:17 mbb-2 kernel: device eth2 entered promiscuous mode
Jun  8 06:06:17 mbb-2 kernel: device eth3 entered promiscuous mode
Jun  8 06:06:17 mbb-2 kernel: mueb: port 4(eth3) entering listening state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 3(eth2) entering listening state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 2(eth1) entering listening state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 1(eth0) entering listening state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 2(eth1) entering blocking state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 3(eth2) entering blocking state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 4(eth3) entering blocking state
Jun  8 06:06:21 mbb-2 kernel: mueb: port 1(eth0) entering learning state
Jun  8 06:06:25 mbb-2 kernel: mueb: port 1(eth0) entering forwarding state
     _________________________________________________________________
   
7.4. Bridge Tests

   To check if really all the promised features are working, I did some
   crude test. The message logs are shown here in.
     _________________________________________________________________
   
7.4.1. Tear The Patch Wire Test

   I think just taking a patch wire out of a bridge port is a really good
   real survival test. So I pulled the plugs one by one out of the
   sockets and looked what happened. To give you not too much tension let
   me summarize first: It's really working. All the takeovers happened
   within less then 12 seconds.
   
   The really interesting messages you can find at mbb-2. To see how
   everything comes up, I stopped network services first. In [119]Example
   21 you will see the messages caused by a init 2 followed by a "take
   out the plug, wait what happens, then place it back" in the order
   eth3, eth2, eth1, eth0 .
   
   Note
   
   The thing I did, was making the tests, and publishing the dump. The
   one writing the nice explanations was Lennert again.
   
   Example 21. mbb-2 Message Output Of Bridge Test
Jun  8 06:06:16 mbb-2 init: Switching to runlevel: 2
Jun  8 06:06:17 mbb-2 kernel: NET4: Ethernet Bridge 008 for NET4.0
Jun  8 06:06:17 mbb-2 kernel: device eth0 entered promiscuous mode
Jun  8 06:06:17 mbb-2 kernel: device eth1 entered promiscuous mode
Jun  8 06:06:17 mbb-2 kernel: device eth2 entered promiscuous mode
Jun  8 06:06:17 mbb-2 kernel: device eth3 entered promiscuous mode
Jun  8 06:06:17 mbb-2 kernel: mueb: port 4(eth3) entering listening state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 3(eth2) entering listening state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 2(eth1) entering listening state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 1(eth0) entering listening state
            (1)
Jun  8 06:06:17 mbb-2 kernel: mueb: port 2(eth1) entering blocking state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 3(eth2) entering blocking state
Jun  8 06:06:17 mbb-2 kernel: mueb: port 4(eth3) entering blocking state
Jun  8 06:06:21 mbb-2 kernel: mueb: port 1(eth0) entering learning state
Jun  8 06:06:25 mbb-2 kernel: mueb: port 1(eth0) entering forwarding state
            (2)
Jun  8 06:07:15 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 4(eth3)  (3)
Jun  8 06:07:15 mbb-2 kernel: mueb: port 4(eth3) entering listening state
            (4)
Jun  8 06:07:19 mbb-2 kernel: mueb: port 4(eth3) entering learning state
            (5)
Jun  8 06:07:23 mbb-2 kernel: mueb: port 4(eth3) entering forwarding state
            (6)
Jun  8 06:07:23 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
            (7)
Jun  8 06:08:51 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
            (8)
Jun  8 06:08:51 mbb-2 kernel: mueb: port 4(eth3) entering blocking state
            (9)
Jun  8 06:09:22 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 3(eth2)  (10)
Jun  8 06:09:22 mbb-2 kernel: mueb: port 3(eth2) entering listening state
Jun  8 06:09:26 mbb-2 kernel: mueb: port 3(eth2) entering learning state
Jun  8 06:09:30 mbb-2 kernel: mueb: port 3(eth2) entering forwarding state
Jun  8 06:09:30 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
Jun  8 06:10:09 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
Jun  8 06:10:09 mbb-2 kernel: mueb: port 3(eth2) entering blocking state
Jun  8 06:10:10 mbb-2 kernel: mueb: retransmitting tcn bpdu
            (11)
Jun  8 06:10:41 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 2(eth1)  (12)
Jun  8 06:10:41 mbb-2 kernel: mueb: port 2(eth1) entering listening state
Jun  8 06:10:45 mbb-2 kernel: mueb: port 2(eth1) entering learning state
Jun  8 06:10:49 mbb-2 kernel: mueb: port 2(eth1) entering forwarding state
Jun  8 06:10:49 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
Jun  8 06:11:06 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
Jun  8 06:11:06 mbb-2 kernel: mueb: port 2(eth1) entering blocking state
Jun  8 06:11:33 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 1(eth0)  (13)
Jun  8 06:11:33 mbb-2 kernel: mueb: port 2(eth1) entering listening state
Jun  8 06:11:37 mbb-2 kernel: mueb: port 2(eth1) entering learning state
Jun  8 06:11:41 mbb-2 kernel: mueb: port 2(eth1) entering forwarding state
Jun  8 06:11:41 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
Jun  8 06:14:18 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
Jun  8 06:14:18 mbb-2 kernel: mueb: port 2(eth1) entering blocking state
Jun  8 06:14:19 mbb-2 kernel: mueb: retransmitting tcn bpdu

   4What Lennert Told About This
   [120](1) 
          The kernel sees that there are already bridges (actually, only
          one of them, but Hello packets are coming in on all 4 of the
          ports) on eth[0123].
   [121](2) 
          To maintain connectivity with the rest of the network, the
          bridge decides to keep port 1 (eth0) active (i.e. in the
          "forwarding" state), and to temporarily disable ports 2-4.
   [122](3) 
          The plug on eth3 was pulled. Here you can see that the message
          age timer expired ([123] (13) ). The last Hello packet was seen
          more than X seconds ago. The bridge concludes that the
          connection to the bridge that was there has died. Therefore, it
          is going to try to enable this port, to provide network
          connectivity to the now-cutoff segment.
   [124](4) 
          It enters the listening state. It waits to see whether the old
          bridge might come back, or whether another bridge is going to
          claim takeover.
   [125](5) 
          Okay, no other bridge was seen. We're going to try to provide
          network connectivity to this segment ourselves. Which means:
          we're going to try and become "designated bridge" for this
          segment. We now enter the learning state. In this state, we
          only learn MAC addresses and we do not forward yet. This is
          because if we see an unknown destination address, we send the
          datagram to all ports, and this "flooding" will happen
          unnecessarily often if we have a empty MAC table. Therefore,
          we're going to fill up our MAC table with useful entries first,
          and this is what happens during the learning state.
   [126](6) 
          Okay, here we go. Pray for us.
   [127](7) 
          Because we took over for this segment, all communication
          towards this segment now goes through this bridge. This means
          that the topology has changed. If the topology changes, we must
          let all bridges now, so that they can time out stale MAC
          address location data quickly. This is why we send Topology
          Change Notification Bridge Protocol Data Units (tcn bpdus).
          Apparently the root bridge immediately acknowledges this tcn
          bpdu in the next Hello message it sends (the protocol requires
          for the root bridge to acknowledge it), because this is the
          only such message we see.
          
   Note
   
   In situations where you see loads of these messages, it means that the
   root bridge cannot acknowledge them, which probably means your root
   bridge has a twisted STP implementation.
   [128](8) 
          Hey, something happened again!
   [129](9) 
          Yup... eth3 came back online. The root bridge will provide
          connectivity for this segment again, so that we can disable
          this port.
   [130](10) [131](12) [132](13) 
          Same story for eth2, eth1 and eth0.
   [133](11) 
          This means the tcn bpdu wasn't acknowledged quick enough. That
          is why it is retransmitted.
          
   The root bridge mbb-1 was not so chatty. It only reported some
   topology changes and propagated them as you can see in [134]Example
   22. If somebody can offer a explanation why the root bridge is so
   quiet in messaging please [135]tell me.
   
   Example 22. mbb-2 Message Output Of Bridge Test
Jun  8 06:06:52 mbb-1 kernel: mueb: received tcn bpdu on port 1(eth0)
Jun  8 06:06:52 mbb-1 kernel: mueb: topology change detected, propagating
Jun  8 06:07:31 mbb-1 kernel: mueb: received tcn bpdu on port 1(eth0)
Jun  8 06:07:31 mbb-1 kernel: mueb: topology change detected, propagating
Jun  8 06:07:32 mbb-1 kernel: mueb: received tcn bpdu on port 1(eth0)
Jun  8 06:07:32 mbb-1 kernel: mueb: topology change detected, propagating
Jun  8 06:08:11 mbb-1 kernel: mueb: received tcn bpdu on port 1(eth0)
Jun  8 06:08:11 mbb-1 kernel: mueb: topology change detected, propagating
Jun  8 06:08:29 mbb-1 kernel: mueb: received tcn bpdu on port 1(eth0)
Jun  8 06:08:29 mbb-1 kernel: mueb: topology change detected, propagating
Jun  8 06:09:03 mbb-1 kernel: mueb: received tcn bpdu on port 2(eth1)
Jun  8 06:09:03 mbb-1 kernel: mueb: topology change detected, propagating
Jun  8 06:11:40 mbb-1 kernel: mueb: received tcn bpdu on port 1(eth0)
Jun  8 06:11:40 mbb-1 kernel: mueb: topology change detected, propagating
Jun  8 06:11:41 mbb-1 kernel: mueb: received tcn bpdu on port 1(eth0)
Jun  8 06:11:41 mbb-1 kernel: mueb: topology change detected, propagating

   One of the other bridges tells us that the topology of the LAN has
   changed (see [136]Example 21). Well, okay. We will set lower timeouts
   on our MACC table for a short period of time, and we will propagate
   this topology change throughout the network.
     _________________________________________________________________
   
7.4.2. Kill The Root Bridge Test

   The ultimate test is of course a total blocking, breakdown or
   something similar to the root bridge. I did this by shooting down the
   root bridge by init 1. Next I brought it up again with init 2. Last I
   pulled all plugs out of the root bridge and waited for some time
   before I placed them again. In [137]Example 23 you will see the
   messages from the master-bridge mbb-1, and in [138]Example 24 you see
   what happened the same time at the backup-bridge mbb-2.
   
   Example 23. Test Messages Of Master Bridge mbb-1
Jun 12 13:35:15 mbb-1 init: Switching to runlevel: 1
Jun 12 13:35:20 mbb-1 kernel: mueb: port 4(eth3) entering disabled state
Jun 12 13:35:20 mbb-1 kernel: mueb: port 3(eth2) entering disabled state
Jun 12 13:35:20 mbb-1 kernel: mueb: port 2(eth1) entering disabled state
Jun 12 13:35:20 mbb-1 kernel: mueb: port 1(eth0) entering disabled state
Jun 12 13:35:20 mbb-1 kernel: mueb: port 2(eth1) entering disabled state
Jun 12 13:35:20 mbb-1 kernel: device eth1 left promiscuous mode
Jun 12 13:35:20 mbb-1 kernel: mueb: port 1(eth0) entering disabled state
Jun 12 13:35:20 mbb-1 kernel: device eth0 left promiscuous mode
Jun 12 13:35:20 mbb-1 kernel: mueb: port 4(eth3) entering disabled state
Jun 12 13:35:20 mbb-1 kernel: device eth3 left promiscuous mode
Jun 12 13:35:20 mbb-1 kernel: mueb: port 3(eth2) entering disabled state
Jun 12 13:35:20 mbb-1 kernel: device eth2 left promiscuous mode
Jun 12 13:35:50 mbb-1 init: Switching to runlevel: 2
Jun 12 13:35:50 mbb-1 kernel: NET4: Ethernet Bridge 008 for NET4.0
Jun 12 13:35:51 mbb-1 kernel: device eth0 entered promiscuous mode
Jun 12 13:35:51 mbb-1 kernel: device eth1 entered promiscuous mode
Jun 12 13:35:51 mbb-1 kernel: device eth2 entered promiscuous mode
Jun 12 13:35:51 mbb-1 kernel: device eth3 entered promiscuous mode
Jun 12 13:35:51 mbb-1 kernel: mueb: port 4(eth3) entering listening state
Jun 12 13:35:51 mbb-1 kernel: mueb: port 3(eth2) entering listening state
Jun 12 13:35:51 mbb-1 kernel: mueb: port 2(eth1) entering listening state
Jun 12 13:35:51 mbb-1 kernel: mueb: port 1(eth0) entering listening state
Jun 12 13:35:51 mbb-1 kernel: mueb: received tcn bpdu on port 2(eth1)
Jun 12 13:35:51 mbb-1 kernel: mueb: topology change detected, propagating
Jun 12 13:35:52 mbb-1 kernel: mueb: received tcn bpdu on port 1(eth0)
Jun 12 13:35:52 mbb-1 kernel: mueb: topology change detected, propagating
Jun 12 13:35:55 mbb-1 kernel: mueb: port 4(eth3) entering learning state
Jun 12 13:35:55 mbb-1 kernel: mueb: port 3(eth2) entering learning state
Jun 12 13:35:55 mbb-1 kernel: mueb: port 2(eth1) entering learning state
Jun 12 13:35:55 mbb-1 kernel: mueb: port 1(eth0) entering learning state
Jun 12 13:35:59 mbb-1 kernel: mueb: port 4(eth3) entering forwarding state
Jun 12 13:35:59 mbb-1 kernel: mueb: topology change detected, propagating
Jun 12 13:35:59 mbb-1 kernel: mueb: port 3(eth2) entering forwarding state
Jun 12 13:35:59 mbb-1 kernel: mueb: topology change detected, propagating
Jun 12 13:35:59 mbb-1 kernel: mueb: port 2(eth1) entering forwarding state
Jun 12 13:35:59 mbb-1 kernel: mueb: topology change detected, propagating
Jun 12 13:35:59 mbb-1 kernel: mueb: port 1(eth0) entering forwarding state
Jun 12 13:35:59 mbb-1 kernel: mueb: topology change detected, propagating
Jun 12 13:39:03 mbb-1 kernel: mueb: received tcn bpdu on port 1(eth0)
Jun 12 13:39:03 mbb-1 kernel: mueb: topology change detected, propagating
Jun 12 13:39:05 mbb-1 kernel: mueb: received tcn bpdu on port 1(eth0)
Jun 12 13:39:05 mbb-1 kernel: mueb: topology change detected, propagating

   Example 24. Test Messages Of Backup Bridge mbb-2
Jun 12 13:35:21 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 4(eth3)
Jun 12 13:35:21 mbb-2 kernel: mueb: port 4(eth3) entering listening state
Jun 12 13:35:21 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 3(eth2)
Jun 12 13:35:21 mbb-2 kernel: mueb: port 3(eth2) entering listening state
Jun 12 13:35:21 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 2(eth1)
Jun 12 13:35:21 mbb-2 kernel: mueb: port 2(eth1) entering listening state
Jun 12 13:35:21 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 1(eth0)
Jun 12 13:35:21 mbb-2 kernel: mueb: topology change detected, propagating
Jun 12 13:35:25 mbb-2 kernel: mueb: port 4(eth3) entering learning state
Jun 12 13:35:25 mbb-2 kernel: mueb: port 3(eth2) entering learning state
Jun 12 13:35:25 mbb-2 kernel: mueb: port 2(eth1) entering learning state
Jun 12 13:35:29 mbb-2 kernel: mueb: port 4(eth3) entering forwarding state
Jun 12 13:35:29 mbb-2 kernel: mueb: topology change detected, propagating
Jun 12 13:35:29 mbb-2 kernel: mueb: port 3(eth2) entering forwarding state
Jun 12 13:35:29 mbb-2 kernel: mueb: topology change detected, propagating
Jun 12 13:35:29 mbb-2 kernel: mueb: port 2(eth1) entering forwarding state
Jun 12 13:35:29 mbb-2 kernel: mueb: topology change detected, propagating
Jun 12 13:35:49 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
Jun 12 13:35:49 mbb-2 kernel: mueb: port 3(eth2) entering blocking state
Jun 12 13:35:49 mbb-2 kernel: mueb: topology change detected, \
                              <6>mueb: port 4(eth3) entering blocking state
Jun 12 13:35:49 mbb-2 kernel: mueb: topology change detected, \
                              <6>mueb: port 2(eth1) entering blocking state
Jun 12 13:35:50 mbb-2 kernel: mueb: retransmitting tcn bpdu
Jun 12 13:38:26 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 2(eth1)
Jun 12 13:38:26 mbb-2 kernel: mueb: port 2(eth1) entering listening state
Jun 12 13:38:27 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 3(eth2)
Jun 12 13:38:27 mbb-2 kernel: mueb: port 3(eth2) entering listening state
Jun 12 13:38:28 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 4(eth3)
Jun 12 13:38:28 mbb-2 kernel: mueb: port 4(eth3) entering listening state
Jun 12 13:38:30 mbb-2 kernel: mueb: port 2(eth1) entering learning state
Jun 12 13:38:30 mbb-2 kernel: mueb: neighbour 0000.08:00:06:28:15:f6 lost on po
rt 1(eth0)
Jun 12 13:38:30 mbb-2 kernel: mueb: topology change detected, propagating
Jun 12 13:38:31 mbb-2 kernel: mueb: port 3(eth2) entering learning state
Jun 12 13:38:32 mbb-2 kernel: mueb: port 4(eth3) entering learning state
Jun 12 13:38:34 mbb-2 kernel: mueb: port 2(eth1) entering forwarding state
Jun 12 13:38:34 mbb-2 kernel: mueb: topology change detected, propagating
Jun 12 13:38:35 mbb-2 kernel: mueb: port 3(eth2) entering forwarding state
Jun 12 13:38:35 mbb-2 kernel: mueb: topology change detected, propagating
Jun 12 13:38:36 mbb-2 kernel: mueb: port 4(eth3) entering forwarding state
Jun 12 13:38:36 mbb-2 kernel: mueb: topology change detected, propagating
Jun 12 13:39:01 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
Jun 12 13:39:01 mbb-2 kernel: mueb: port 3(eth2) entering blocking state
Jun 12 13:39:01 mbb-2 kernel: mueb: topology change detected, \
                              <6>mueb: port 4(eth3) entering blocking state
Jun 12 13:39:02 mbb-2 kernel: mueb: topology change detected, sending tcn bpdu
Jun 12 13:39:02 mbb-2 kernel: mueb: port 2(eth1) entering blocking state
     _________________________________________________________________
   
Appendix A. Network Interface Cards

   In this section you will find a (for now) very incomplete list of
   NIC's which are known to work or known to cause problem. For I neither
   have the money to buy a lot of different NIC's, nor I have any
   connections to hardware vendors, I depend on your feedback to keep the
   list accurate. So feel free to mail about success or failure to
   [139]Uwe Bhme.
   
   Table Appendix A-1. NIC Information
   Name Value Comment
   3c509b Etherlink III ++
   3c905b +++ Never heard about any problem
   3c905c ++ Never heard about any problem
   HP J2585A - - System hang-up after ifconfig
   HP J2585B ++
   
   Table Appendix A-2. Valuing Of NIC Information
   Value Meaning
   - - - Cards I tried and are also reported not to work by other people
   - - Cards I tried or are reported not to work by other people
   - Cards reported not to work by other people
   * Cards without any report or experience
   + Cards reported to work by other people
   ++ Cards I tried or are reported to work by other people
   +++ Cards I tried and are also reported to work by other people
     _________________________________________________________________
   
Appendix B. Recommended Reading

   Here you will some recommendations which documents you should read
   before you start to setup a bridge.
   
   [140]The bridge home-page
          Will give you recent information about the bridging code and
          the bridge utilities.
          
   [141]NET3-4-HOWTO
          Describes how to install and configure the Linux networking
          software and associated tools.
          
   [142]Ethernet-HOWTO
          Information about which Ethernet devices can be used for Linux,
          and how to set them up (focused on the hardware and low level
          driver aspect of the Ethernet cards).
     _________________________________________________________________
   
Appendix C. FAQ

   Here you will find some of the frequently asked questions connected to
   bridging.
   
FAQ

   1. [143]Hardware
          
        [144]What hardware do I need to run a bridge with 2-n NICs. 
        [145]Can you please recommend some tools to measure a 2-port
                linux bridge throughput. 
                
   2. [146]Software
          
        [147]I'm running with kernel x.x.x. Is a patch out there, to give
                me chance to use this stuff? 
                
1. Hardware

   What hardware do I need to run a bridge with 2-n NICs.
   
   I think a fat 486 or a modest Pentium should be able to keep up with
   2x100Mbit pretty well, but I have never tested this. I don't think RAM
   will matter much (8 or 16MB and all should be fine). CPU will not
   matter a whole lot either (486/Pentium and all should be fine). I
   think the primary contributor is the type of bus (ISA, PCI) and the
   type of network cards (some network cards require less "work" than
   others). Big switches usually have immensely fat internal buses (3 or
   4 gigabits is not uncommon). Standard PCI, for example, can't keep up
   with a gigabit ethernet cards.
   
   Can you please recommend some tools to measure a 2-port linux bridge
   throughput.
   
   Well, first question is: does it have 100mbit interfaces? If it hasn't
   (10mbit only), it shouldn't have problems with keeping up, almost
   regardless of the processor speed. If it does have 100mbit interfaces
   and you're not sure it will keep up, you can run a flood ping with big
   packets across it (ping -f -s 1450 ipaddress) and see whether it keeps
   up.
   
2. Software

   I'm running with kernel x.x.x. Is a patch out there, to give me chance
   to use this stuff?
   
   There are patches for and 2.2.14, 2.2.15. Since 2.3.47 it's in the
   mainstream kernel, so you don't need to patch. If you're talking about
   others, you will have to upgrade, if you need to bridge.

References

   Visible links
   1. bridge-stp-howto/BRIDGE-STP-HOWTO.html#LICENSE
   2. bridge-stp-howto/BRIDGE-STP-HOWTO.html#WHAT-IS-A-BRIDGE
   3. bridge-stp-howto/BRIDGE-STP-HOWTO.html#RULES-ON-BRIDGING
   4. bridge-stp-howto/BRIDGE-STP-HOWTO.html#PREPARING-THE-BRIDGE
   5. bridge-stp-howto/BRIDGE-STP-HOWTO.html#GET-THE-FILES
   6. bridge-stp-howto/BRIDGE-STP-HOWTO.html#APPLY-THE-PATCHES
   7. bridge-stp-howto/BRIDGE-STP-HOWTO.html#CONFIGURE-THE-KERNEL
   8. bridge-stp-howto/BRIDGE-STP-HOWTO.html#COMPILE-THE-KERNEL
   9. bridge-stp-howto/BRIDGE-STP-HOWTO.html#COMPILE-THE-UTILS
  10. bridge-stp-howto/BRIDGE-STP-HOWTO.html#SET-UP-THE-BRIDGE
  11. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SYNOPSIS
  12. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BASIC-SETUP
  13. bridge-stp-howto/BRIDGE-STP-HOWTO.html#ADVANCED-BRIDGE
  14. bridge-stp-howto/BRIDGE-STP-HOWTO.html#STP
  15. bridge-stp-howto/BRIDGE-STP-HOWTO.html#IPCHAINS
  16. bridge-stp-howto/BRIDGE-STP-HOWTO.html#PRACTICAL-EXAMPLE
  17. bridge-stp-howto/BRIDGE-STP-HOWTO.html#AEN510
  18. bridge-stp-howto/BRIDGE-STP-HOWTO.html#AEN529
  19. bridge-stp-howto/BRIDGE-STP-HOWTO.html#SEE-IT-WORK
  20. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRIDGE-TESTS
  21. bridge-stp-howto/BRIDGE-STP-HOWTO.html#NIC-INFO
  22. bridge-stp-howto/BRIDGE-STP-HOWTO.html#RECOMMENDED-READING
  23. bridge-stp-howto/BRIDGE-STP-HOWTO.html#FAX
  24. COPYRIGHT.html
  25. http://sunsite.unc.edu/LDP/LICENSE.html
  26. bridge-stp-howto/BRIDGE-STP-HOWTO.html#RULES-ON-BRIDGING
  27. bridge-stp-howto/BRIDGE-STP-HOWTO.html#STP
  28. bridge-stp-howto/BRIDGE-STP-HOWTO.html#IPCHAINS
  29. bridge-stp-howto/BRIDGE-STP-HOWTO.html#RECOMMENDED-READING
  30. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BASIC-SETUP
  31. http://www.kernel.org/mirrors/
  32. http://www.openrock.net/bridge/
  33. ftp://openrock.net/bridge/patches/bridge-0.0.5-against-2.2.14.diff
  34. ftp://openrock.net/bridge/patches/bridge-0.0.5-against-2.2.15.diff
  35. bridge-stp-howto/BRIDGE-STP-HOWTO.html#SET-UP-THE-BRIDGE
  36. http://www.openrock.net/bridge/
  37. ftp://openrock.net/bridge/bridge-utils/bridge-utils-0.9.1.tar.gz
  38. http://sunsite.unc.edu/LDP/HOWTO/HOWTO-INDEX.html
  39. bridge-stp-howto/BRIDGE-STP-HOWTO.html#KERNEL-COMPILE-COMMANDS
  40. bridge-stp-howto/BRIDGE-STP-HOWTO.html#UTILS-COMPILE-COMMANDS
  41. bridge-stp-howto/BRIDGE-STP-HOWTO.html#UTILS-COPY-BINARIES
  42. bridge-stp-howto/BRIDGE-STP-HOWTO.html#UTILS-COPY-MANPAGE
  43. http://sunsite.unc.edu/LDP/HOWTO/HOWTO-INDEX.html
  44. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-ADDBR
  45. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-DELBR
  46. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-ADDIF
  47. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-DELIF
  48. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SHOW
  49. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SHOW-OUTPUT
  50. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SHOWBR
  51. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SHOWBR
  52. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SHOWMACS
  53. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETAGEING
  54. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETBRIDGEPRIO
  55. bridge-stp-howto/BRIDGE-STP-HOWTO.html#STP
  56. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETFD
  57. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETGCINT
  58. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETHELLO
  59. bridge-stp-howto/BRIDGE-STP-HOWTO.html#STP
  60. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETMAXAGE
  61. bridge-stp-howto/BRIDGE-STP-HOWTO.html#STP
  62. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETPATHCOST
  63. bridge-stp-howto/BRIDGE-STP-HOWTO.html#STP
  64. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-STP
  65. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETBRIDGEPRIO
  66. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETHELLO
  67. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETPATHCOST
  68. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-STP
  69. bridge-stp-howto/BRIDGE-STP-HOWTO.html#STP
  70. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRIDGE-INIT-SCRIPT
  71. bridge-stp-howto/BRIDGE-STP-HOWTO.html#AEN409
  72. bridge-stp-howto/BRIDGE-STP-HOWTO.html#AEN426
  73. bridge-stp-howto/BRIDGE-STP-HOWTO.html#AEN435
  74. bridge-stp-howto/BRIDGE-STP-HOWTO.html#PRACTICAL-EXAMPLE
  75. http://openrock.net/bridge/
  76. bridge-stp-howto/BRIDGE-STP-HOWTO.html#IPCH-ADDBR
  77. bridge-stp-howto/BRIDGE-STP-HOWTO.html#IPCH-ADDIF-ETH0
  78. bridge-stp-howto/BRIDGE-STP-HOWTO.html#IPCH-ADDIF-ETH1
  79. bridge-stp-howto/BRIDGE-STP-HOWTO.html#IPCH-IFCONFIG
  80. bridge-stp-howto/BRIDGE-STP-HOWTO.html#IPCH-ADDCHAIN
  81. bridge-stp-howto/BRIDGE-STP-HOWTO.html#IPCH-ADDBR
  82. bridge-stp-howto/BRIDGE-STP-HOWTO.html#IPCH-ADDCHAIN
  83. bridge-stp-howto/BRIDGE-STP-HOWTO.html#IPCH-DEN-ETH0
  84. bridge-stp-howto/BRIDGE-STP-HOWTO.html#OLD-BRIDGE-HARDWARE-SETUP
  85. bridge-stp-howto/BRIDGE-STP-HOWTO.html#STP
  86. http://openrock.net/bridge
  87. bridge-stp-howto/BRIDGE-STP-HOWTO.html#STP
  88. bridge-stp-howto/BRIDGE-STP-HOWTO.html#MULTI-BRIDGE-HARDWARE-SETUP
  89. bridge-stp-howto/BRIDGE-STP-HOWTO.html#OLD-BRIDGE-HARDWARE-SETUP
  90. bridge-stp-howto/BRIDGE-STP-HOWTO.html#APPLY-KERNEL-PATCH
  91. bridge-stp-howto/BRIDGE-STP-HOWTO.html#APPLY-BRIDGE-PATCH
  92. bridge-stp-howto/BRIDGE-STP-HOWTO.html#MENUCONFIG-BRIDGE-MODULE-SELECTION
  93. bridge-stp-howto/BRIDGE-STP-HOWTO.html#MODULES-CONF-NIC-SAMPLE-MBB1
  94. bridge-stp-howto/BRIDGE-STP-HOWTO.html#MODULES-CONF-NIC-SAMPLE-MBB2
  95. bridge-stp-howto/BRIDGE-STP-HOWTO.html#CREATE-BRIDGE
  96. bridge-stp-howto/BRIDGE-STP-HOWTO.html#SET-ROOT-BRIDGE
  97. bridge-stp-howto/BRIDGE-STP-HOWTO.html#ADDIF-ETH0
  98. bridge-stp-howto/BRIDGE-STP-HOWTO.html#ADDIF-ETH1
  99. bridge-stp-howto/BRIDGE-STP-HOWTO.html#ADDIF-ETH2
 100. bridge-stp-howto/BRIDGE-STP-HOWTO.html#ADDIF-ETH3
 101. bridge-stp-howto/BRIDGE-STP-HOWTO.html#UP-ETH0
 102. bridge-stp-howto/BRIDGE-STP-HOWTO.html#UP-ETH1
 103. bridge-stp-howto/BRIDGE-STP-HOWTO.html#UP-ETH2
 104. bridge-stp-howto/BRIDGE-STP-HOWTO.html#UP-ETH3
 105. bridge-stp-howto/BRIDGE-STP-HOWTO.html#HELLO-1
 106. bridge-stp-howto/BRIDGE-STP-HOWTO.html#MAXAGE-4
 107. bridge-stp-howto/BRIDGE-STP-HOWTO.html#FORWARDDELAY-4
 108. bridge-stp-howto/BRIDGE-STP-HOWTO.html#DELIF-ETH3
 109. bridge-stp-howto/BRIDGE-STP-HOWTO.html#DELIF-ETH2
 110. bridge-stp-howto/BRIDGE-STP-HOWTO.html#DELIF-ETH1
 111. bridge-stp-howto/BRIDGE-STP-HOWTO.html#DELIF-ETH0
 112. bridge-stp-howto/BRIDGE-STP-HOWTO.html#DESTROY-BRIDGE
 113. bridge-stp-howto/BRIDGE-STP-HOWTO.html#REMOVE-MODULE
 114. bridge-stp-howto/BRIDGE-STP-HOWTO.html#SAMPLE-BRIDGE-STATUS-MBB1
 115. bridge-stp-howto/BRIDGE-STP-HOWTO.html#SAMPLE-BRIDGE-STATUS-MBB2
 116. bridge-stp-howto/BRIDGE-STP-HOWTO.html#MESSAGES-FROM-INIT-2-AT-MBB-1
 117. bridge-stp-howto/BRIDGE-STP-HOWTO.html#MESSAGES-FROM-INIT-2-AT-MBB-2
 118. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETBRIDGEPRIO
 119. bridge-stp-howto/BRIDGE-STP-HOWTO.html#MBB-2-MESSAGES-OF-BRIDGE-TEST
 120. bridge-stp-howto/BRIDGE-STP-HOWTO.html#SEE-OTHER-BRIDGE
 121. bridge-stp-howto/BRIDGE-STP-HOWTO.html#KEEP-ONE-INTERFACE
 122. bridge-stp-howto/BRIDGE-STP-HOWTO.html#PULL-PLUG-ETH3
 123. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETMAXAGE
 124. bridge-stp-howto/BRIDGE-STP-HOWTO.html#ENTER-LISTEN-STATE
 125. bridge-stp-howto/BRIDGE-STP-HOWTO.html#ENTER-LEARN-STATE
 126. bridge-stp-howto/BRIDGE-STP-HOWTO.html#ENTER-FORWARD-STATE
 127. bridge-stp-howto/BRIDGE-STP-HOWTO.html#TOPOLOGY-CHANGE-DETECT
 128. bridge-stp-howto/BRIDGE-STP-HOWTO.html#TOPOLOGY-CHANGED-AGAIN
 129. bridge-stp-howto/BRIDGE-STP-HOWTO.html#ROOT-IS-BACK
 130. bridge-stp-howto/BRIDGE-STP-HOWTO.html#FROM-PULL-TO-BACK-ETH2
 131. bridge-stp-howto/BRIDGE-STP-HOWTO.html#FROM-PULL-TO-BACK-ETH1
 132. bridge-stp-howto/BRIDGE-STP-HOWTO.html#FROM-PULL-TO-BACK-ETH0
 133. bridge-stp-howto/BRIDGE-STP-HOWTO.html#RETRANSMIT-TCN-BPDU
 134. bridge-stp-howto/BRIDGE-STP-HOWTO.html#MBB-1-MESSAGES-OF-BRIDGE-TEST
 135. mailto:uwe@bnhof
 136. bridge-stp-howto/BRIDGE-STP-HOWTO.html#MBB-2-MESSAGES-OF-BRIDGE-TEST
 137. bridge-stp-howto/BRIDGE-STP-HOWTO.html#TEST-MESSAGES-OF-MASTER-BRIDGE
 138. bridge-stp-howto/BRIDGE-STP-HOWTO.html#TEST-MESSAGES-OF-BACKUP-BRIDGE
 139. mailto:uwe@bnhof.de
 140. http://openrock.net/bridge/
 141. http://www.linuxdoc.org/HOWTO/NET3-4-HOWTO.html
 142. http://www.linuxdoc.org/HOWTO/Ethernet-HOWTO.html
 143. bridge-stp-howto/BRIDGE-STP-HOWTO.html#AEN842
 144. bridge-stp-howto/BRIDGE-STP-HOWTO.html#AEN845
 145. bridge-stp-howto/BRIDGE-STP-HOWTO.html#AEN852
 146. bridge-stp-howto/BRIDGE-STP-HOWTO.html#AEN858
 147. bridge-stp-howto/BRIDGE-STP-HOWTO.html#AEN861

   Hidden links:
 148. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SHOWBR
 149. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETBRIDGEPRIO
 150. bridge-stp-howto/BRIDGE-STP-HOWTO.html#BRCTL-SETMAXAGE
  BASH Programming - Introduction HOW-TO
  by Mike G mikkey@dynamo.com.ar
  27 June 2000

  This article intends to help you to start programming     basic-inter
  mediate shell scripts. It does not intend to be an     advanced docu
  ment (see the title). I am NOT an expert nor guru     shell program
  mer. I decided to write this because I'll learn a     lot and it might
  be useful to other people. Any feedback will be apreciated,     spe
  cially in the patch form :)
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Getting the latest version
     1.2 Requisites
     1.3 Uses of this document

  2. Very simple Scripts

     2.1 Traditional hello world script
     2.2 A very simple backup script

  3. All about redirection

     3.1 Theory and quick reference
     3.2 Sample: stdout 2 file
     3.3 Sample: stderr 2 file
     3.4 Sample: stdout 2 stderr
     3.5 Sample: stderr 2 stdout
     3.6 Sample: stderr and stdout 2 file

  4. Pipes

     4.1 What they are and why you'll want to use them
     4.2 Sample: simple pipe with sed
     4.3 Sample: an alternative to ls -l *.txt

  5. Variables

     5.1 Sample: Hello World! using variables
     5.2 Sample: A very simple backup script (little bit better)
     5.3 Local variables

  6. Conditionals

     6.1 Dry Theory
     6.2 Sample: Basic conditional example if .. then
     6.3 Sample: Basic conditional example if .. then ... else
     6.4 Sample: Conditionals with variables

  7. Loops for, while and until

     7.1 For sample
     7.2 C-like for
     7.3 While sample
     7.4 Until sample

  8. Functions

     8.1 Functions sample
     8.2 Functions with parameters sample

  9. User interfaces

     9.1 Using select to make simple menus
     9.2 Using the command line

  10. Misc

     10.1 Reading user input with read
     10.2 Arithmetic evaluation
     10.3 Finding bash
     10.4 Getting the return value of a program
     10.5 Capturing a commands output
     10.6 Multiple source files

  11. Tables
     11.1 String comparison operators
     11.2 String comparison examples
     11.3 Arithmetic operators
     11.4 Arithmetic relational operators
     11.5 Useful commands

  12. More Scripts

     12.1 Applying a command to all files in a directory.
     12.2 Sample: A very simple backup script (little bit better)
     12.3 File re-namer
     12.4 File renamer (simple)

  13. When something goes wrong (debugging)

     13.1 Ways Calling BASH

  14. About the document

     14.1 (no) warranty
     14.2 Thanks to
     14.3 History
     14.4 More resources


  ______________________________________________________________________

  1.  Introduction

  1.1.  Getting the latest version

  http://www.linuxdoc.org/HOWTO/Bash-Prog-Intro-HOWTO.html



  1.2.

  Requisites

  Familiarity with GNU/Linux command lines, and familiarity with basic
  programming concepts is helpful. While this is not a programming
  introduction, it explains (or at least tries) many basic concepts.



  1.3.

  Uses of this document

  This document tries to be useful in the following situations

    You have an idea about programming and you want to start coding
     some shell scripts.

    You have a vague idea about shell programming and want some sort of
     reference.

    You want to see some shell scripts and some comments to start
     writing your own

    You are migrating from DOS/Windows (or already did) and want to
     make "batch" processes.

    You are a complete nerd and read every how-to available


  2.

  Very simple Scripts

  This HOW-TO will try to give you some hints about shell script
  programming strongly based on examples.

  In this section you'll find some little scripts which will hopefully
  help you to understand some techniques.


  2.1.


  Traditional hello world script



                 #!/bin/bash
                 echo Hello World



  This script has only two lines.  The first indicates the system which
  program to use to run the file.

  The second line is the only action performed by this script, which
  prints 'Hello World' on the terminal.

  If you get something like ./hello.sh: Command not found.  Probably the
  first line '#!/bin/bash' is wrong, issue whereis bash or see

  2.2.

  A very simple backup script



               #!/bin/bash
               tar -cZf /var/my-backup.tgz /home/me/



  In this script, instead of printing a message on the terminal, we
  create a tar-ball of a user's home directory. This is NOT intended to
  be used, a more useful backup script is presented later in this
  document.

  3.

  All about redirection

  3.1.

  Theory and quick reference

  There are 3 file descriptors, stdin, stdout and stderr (std=standard).



  Basically you can:

  1. redirect stdout to a file

  2. redirect stderr to a file

  3. redirect stdout to a stderr

  4. redirect stderr to a stdout

  5. redirect stderr and stdout to a file

  6. redirect stderr and stdout to stdout

  7. redirect stderr and stdout to stderr

     1 'represents' stdout and 2 stderr.

  A little note for seeing this things: with the less command you can
  view both stdout (which will remain on the buffer) and the stderr that
  will be printed on the screen, but erased as you try to 'browse' the
  buffer.

  3.2.  Sample: stdout 2 file

  This will cause the ouput of a program to be written to a file.


               ls -l > ls-l.txt



  Here, a file called 'ls-l.txt' will be created and it will contain
  what you would see on the screen if you type the command 'ls -l' and
  execute it.

  3.3.  Sample: stderr 2 file

  This will cause the stderr ouput of a program to be written to a file.


               grep da * 2> grep-errors.txt



  Here, a file called 'grep-errors.txt' will be created and it will con
  tain what you would see the stderr portion of the output of the 'grep
  da *' command.

  3.4.

  Sample: stdout 2 stderr

  This will cause the stderr ouput of a program to be written to the
  same filedescriptor than stdout.


               grep da * 1>&2



  Here, the stdout portion of the command is sent to stderr, you may
  notice that in differen ways.

  3.5.  Sample: stderr 2 stdout

  This will cause the stderr ouput of a program to be written to the
  same filedescriptor than stdout.


               grep * 2>&1



  Here, the stderr portion of the command is sent to stdout, if you pipe
  to less, you'll see that lines that normally 'dissapear' (as they are
  written to stderr) are being kept now (because they're on stdout).

  3.6.  Sample: stderr and stdout 2 file

  This will place every output of a program to a file. This is suitable
  sometimes for cron entries, if you want a command to pass in absolute
  silence.


               rm -f $(find / -name core) &> /dev/null



  This (thinking on the cron entry) will delete every file called 'core'
  in any directory. Notice that you should be pretty sure of what a com
  mand is doing if you are going to wipe it's output.

  4.

  Pipes

  This section explains in a very simple and practical way how to use
  pipes, nd why you may want it.


  4.1.

  What they are and why you'll want to use them

  Pipes let you use (very simple, I insist) the output of a program as
  the input of another one

  4.2.  Sample: simple pipe with sed

  This is very simple way to use pipes.


               ls -l | sed -e "s/[aeio]/u/g"



  Here, the following happens: first the command ls -l is executed, and
  it's output, instead of being printed, is sent (piped) to the sed pro
  gram, which in turn, prints what it has to.

  4.3.  Sample: an alternative to ls -l *.txt

  Probably, this is a more difficult way to do ls -l *.txt, but it is
  here for illustrating pipes, not for solving such listing dilema.


               ls -l | grep "\.txt$"



  Here, the output of the program ls -l is sent to the grep program,
  which, in turn, will print lines which match the regex "\.txt$".

  5.


  Variables

  You can use variables as in any programming languages.  There are no
  data types. A variable in bash can contain a number, a character, a
  string of characters.

  You have no need to declare a variable, just assigning a value to its
  reference will create it.



  5.1.

  Sample: Hello World! using variables



                   #!/bin/bash
                   STR="Hello World!"
                   echo $STR



  Line 2 creates a variable called STR and assigns the string "Hello
  World!" to it. Then the VALUE of this variable is retrieved by putting
  the '$' in at the beginning. Please notice (try it!)  that if you
  don't use the '$' sign, the output of the program will be different,
  and probably not what you want it to be.

  5.2.

  Sample: A very simple backup script (little bit better)



                  #!/bin/bash
                  OF=/var/my-backup-$(date +%Y%m%d).tgz
                  tar -cZf $OF /home/me/



  This script introduces another thing. First of all, you should be
  familiarized with the variable creation and assignation on line 2.
  Notice the expression If you run the script you'll notice that it runs
  the command inside the parenthesis, capturing its output.


  Notice that in this script, the output filename will be different
  every day, due to the format switch to the date command(+%Y%m%d).  You
  can change this by specifying a different format.

  Some more examples:

  echo ls

  echo $(ls)

  5.3.

  Local variables

  Local variables can be created by using the keyword local.



                       #!/bin/bash
                       HELLO=Hello
                       function hello {
                               local HELLO=World
                               echo $HELLO
                       }
                       echo $HELLO
                       hello
                       echo $HELLO



  This example should be enought to show how to use a local variable.

  6.

  Conditionals

  Conditionals let you decide whether to perform an action or not, this
  decision is taken by evaluating an expression.


  6.1.

  Dry Theory

  Conditionals have many forms. The most basic form is: if expression
  then statement where 'statement' is only executed if 'expression'
  evaluates to true.  evaluates to true.xs

  Conditionals have other forms such as: if expression then statement1
  else statement2.  Here 'statement1' is executed  if 'expression' is
  true,otherwise

  Yet another form of conditionals is: if expression1 then statement1
  else if expression2 then statement2 else statement3.  In this form
  there's added only the "ELSE IF 'expression2' THEN 'statement2'" which
  makes statement2 being executed if expression2 evaluates to true. The
  rest is as you may imagine (see previous forms).

  A word about syntax:

  The base for the 'if' constructions in bash is this:

  if [expression];

  then

  code if 'expression' is true.

  fi

  6.2.

  Sample: Basic conditional example if .. then



                   #!/bin/bash
                   if [ "foo" = "foo" ]; then
                      echo expression evaluated as true
                   fi



  The code to be executed if the expression within braces is true can be
  found after the 'then' word and before 'fi' which indicates the end of
  the conditionally executed code.

  6.3.

  Sample: Basic conditional example if .. then ... else



                   #!/bin/bash
                   if [ "foo" = "foo" ]; then
                      echo expression evaluated as true
                   else
                      echo expression evaluated as false
                   fi



  6.4.

  Sample: Conditionals with variables



                   #!/bin/bash
                   T1="foo"
                   T2="bar"
                   if [ "$T1" = "$T2" ]; then
                       echo expression evaluated as true
                   else
                       echo expression evaluated as false
                   fi


  7.


  Loops for, while and until

  In this section you'll find for, while and until loops.

  The for loop is a little bit different from other programming
  languages. Basically, it let's you iterate over a series of

  The while executes a piece of code if the control expression is true,
  and only stops when it is false (or a explicit break is found within
  the executed code.

  The until loop is almost equal to the while loop, except that the code
  is executed while the control expression evaluates to false.

  If you suspect that while and until are very similar you are right.


  7.1.

  For sample



               #!/bin/bash
               for i in $( ls ); do
                   echo item: $i
               done



  On the second line, we declare i to be the variable that will take the
  different values contained in $( ls ).

  The third line could be longer if needed, or there could be more lines
  before the done (4).

  finished and $i can take a new value.

  This script has very little sense, but a more useful way to use the
  for loop would be to use it to match only certain files on the
  previous example


  7.2.

  C-like for

  fiesh suggested adding this form of looping. It's a for loop more
  similar to C/perl... for.


               #!/bin/bash
               for i in `seq 1 10`;
               do
                       echo $i
               done


  7.3.

  While sample



                #!/bin/bash
                COUNTER=0
                while [  $COUNTER -lt 10 ]; do
                    echo The counter is $COUNTER
                    let COUNTER=COUNTER+1
                done



  This script 'emulates' the well known (C, Pascal, perl, etc) 'for'
  structure

  7.4.

  Until sample



                #!/bin/bash
                COUNTER=20
                until [  $COUNTER -lt 10 ]; do
                    echo COUNTER $COUNTER
                    let COUNTER-=1
                done



  8.

  Functions

  As in almost any programming language, you can use functions to group
  pieces of code in a more logical way or practice the divine art of
  recursion.

  Declaring a function is just a matter of writing function my_func {
  my_code }.

  Calling a function is just like calling another program, you just
  write its name.


  8.1.

  Functions sample



             #!/bin/bash
             function quit {
                 exit
             }
             function hello {
                 echo Hello!
             }
             hello
             quit
             echo foo



  Lines 2-4 contain the 'quit' function. Lines 5-7 contain the 'hello'
  function If you are not absolutely sure about what this script does,
  please try it!.

  Notice that a functions don't need to be declared in any specific
  order.

  When running the script you'll notice that first: the function 'hello'
  is called, second the 'quit' function, and the program never reaches
  line 10.

  8.2.

  Functions with parameters sample



                       #!/bin/bash
                       function quit {
                          exit
                       }
                       function e {
                           echo $1
                       }
                       e Hello
                       e World
                       quit
                       echo foo



  This script is almos identically to the previous one. The main
  difference is the funcion 'e'. This function, prints the first
  argument it receives.  Arguments, within funtions, are treated in the
  same manner as arguments given to the script.

  9.


  User interfaces

  9.1.

  Using select to make simple menus



             #!/bin/bash
             OPTIONS="Hello Quit"
             select opt in $OPTIONS; do
                 if [ "$opt" = "Quit" ]; then
                  echo done
                  exit
                 elif [ "$opt" = "Hello" ]; then
                  echo Hello World
                 else
                  clear
                  echo bad option
                 fi
             done



  If you run this script you'll see that it is a programmer's dream for
  text based menus. You'll probably notice that it's very similar to the
  'for' construction, only rather than looping for each 'word' in
  $OPTIONS, it prompts the user.


  9.2.  Using the command line



                 #!/bin/bash
                 if [ -z "$1" ]; then
                     echo usage: $0 directory
                     exit
                 fi
                 SRCD=$1
                 TGTD="/var/backups/"
                 OF=home-$(date +%Y%m%d).tgz
                 tar -cZf $TGTD$OF $SRCD



  What this script does should be clear to you. The expression in the
  first conditional tests if the program has received an argument ($1)
  and quits if it didn't, showing the user a little usage message.  The
  rest of the script should be clear at this point.

  10.

  Misc

  10.1.

  Reading user input with read

  In many ocations you may want to prompt the user for some input, and
  there are several ways to achive this. This is one of those ways:



                  #!/bin/bash
                  echo Please, enter your name
                  read NAME
                  echo "Hi $NAME!"



  As a variant, you can get multiple values with read, this example may
  clarify this.


                       #!/bin/bash
                       echo Please, enter your firstname and lastname
                       read FN LN
                       echo "Hi! $LN, $FN !"



  10.2.

  Arithmetic evaluation

  On the command line (or a shell) try this:

  echo 1 + 1

  If you expected to see '2' you'll be disappointed. What if you want
  BASH to evaluate some numbers you have? The solution is this:

  echo $((1+1))

  This will produce a more 'logical' output. This is to evaluate an
  arithmetic expression. You can achieve this also like this:

  echo $[1+1]


  If you need to use fractions, or more math or you just want it, you
  can use bc to evaluate arithmetic expressions.

  if i ran "echo $[3/4]" at the command prompt, it would return 0
  because bash  only uses integers when answering. If you  ran "echo
  3/4|bc -l", it would properly return 0.75.

  10.3.  Finding bash

  From a message from mike (see Thanks to)

  you always use #!/bin/bash .. you might was to give an example of

  how to find where bash is located.



  Suggested locations to check:

  ls -l /bin/bash

  ls -l /sbin/bash


  ls -l /usr/local/bin/bash

  ls -l /usr/bin/bash

  ls -l /usr/sbin/bash

  ls -l /usr/local/sbin/bash

  (can't think of any other dirs offhand...  i've found it in

  most of these places before on different system).

  You may try also 'wich bash'.

  10.4.

  Getting the return value of a program

  In bash, the return value of a program is stored in a special variable
  called $?.

  This illustrates how to capture the return value of a program, I
  assume that the directory dada does not exist. (This was also
  suggested by mike)


               #!/bin/bash
               cd /dada &> /dev/null
               echo rv: $?
               cd $(pwd) &> /dev/null
               echo rv: $?



  10.5.  Capturing a commands output

  This little scripts show all tables from all databases (assuming you
  got MySQL installed).  Also, consider changing the 'mysql' command to
  use a valid username and password.


               #!/bin/bash
               DBS=`mysql -uroot  -e"show databases"`
               for b in $DBS ;
               do
                       mysql -uroot -e"show tables from $b"
               done



  10.6.

  Multiple source files

  You can use multiple files with the command source.

  __TO-DO__

  11.


  Tables
  11.1.

  String comparison operators

  (1) s1 = s2

  (2) s1 != s2

  (3) s1 < s2

  (4) s1 > s2

  (5) -n s1

  (6) -z s1



  (1) s1 matches s2

  (2) s1 does not match s2

  (3) __TO-DO__

  (4) __TO-DO__

  (5) s1 is not null (contains one or more characters)

  (6) s1 is null

  11.2.

  String comparison examples

  Comparing two strings.


               #!/bin/bash
               S1='string'
               S2='String'
               if [ $S1=$S2 ];
               then
                       echo "S1('$S1') is not equal to S2('$S2')"
               fi
               if [ $S1=$S1 ];
               then
                       echo "S1('$S1') is equal to S1('$S1')"
               fi



  I quote here a note from a mail, sent buy Andreas Beck, refering to
  use if [ $1 = $2 ].

  This is not quite a good idea, as if either $S1 or $S2 is empty, you
  will get a parse error. x$1=x$2 or "$1"="$2" is better.


  11.3.

  Arithmetic operators

  +

  -

  *

  /

  % (remainder)

  11.4.

  Arithmetic relational operators

  -lt (<)

  -gt (>)

  -le (<=)

  -ge (>=)

  -eq (==)

  -ne (!=)

  C programmer's should simple map the operator to its corresponding
  parenthesis.

  11.5.

  Useful commands

  This section was re-written by Kees (see thank to...)

  Some of these command's almost contain complete programming languages.
  From those commands only the basics will be explained. For a more
  detailed description, have a closer look at the man pages of each
  command.

  sed (stream editor)


  Sed is a non-interactive editor. Instead of altering a file by moving
  the cursor on the screen, you use a script of editing instructions to
  sed, plus the name of the file to edit. You can also describe sed as a
  filter. Let's have a look at some examples:



               $sed 's/to_be_replaced/replaced/g' /tmp/dummy



  Sed replaces the string 'to_be_replaced' with the string 'replaced'
  and reads from the /tmp/dummy file. The result will be sent to stdout
  (normally the console) but you can also add '> capture' to the end of
  the line above so that sed sends the output to the file 'capture'.



               $sed 12, 18d /tmp/dummy



  Sed shows all lines except lines 12 to 18. The original file is not
  altered by this command.

  awk (manipulation of datafiles, text retrieval and processing)


  Many implementations of the AWK programming language exist (most known
  interpreters are GNU's gawk and 'new awk' mawk.) The principle is
  simple: AWK scans for a pattern, and for every matching pattern a
  action will be performed.

  Again, I've created a dummy file containing the following lines:

  "test123

  test

  tteesstt"



               $awk '/test/ {print}' /tmp/dummy



  test123


  test


  The pattern AWK looks for is 'test' and the action it performs when it
  found a line in the file /tmp/dummy with the string 'test' is 'print'.



               $awk '/test/ {i=i+1} END {print i}' /tmp/dummy



  3


  When you're searching for many patterns, you should replace the text
  between the quotes with '-f file.awk' so you can put all patterns and
  actions in 'file.awk'.

  grep (print lines matching a search pattern)


  We've already seen quite a few grep commands in the previous chapters,
  that display the lines matching a pattern. But grep can do more.


               $grep "look for this" /var/log/messages -c



  12

  The string "look for this" has been found 12 times in the file
  /var/log/messages.


  [ok, this example was a fake, the /var/log/messages was tweaked :-)]

  wc (counts lines, words and bytes)


  In the following example, we see that the output is not what we
  expected. The dummy file, as used in this example, contains the
  following text: "bash introduction
   howto test file"



               $wc --words --lines --bytes /tmp/dummy



  2 5 34 /tmp/dummy


  Wc doesn't care about the parameter order. Wc always prints them in a
  standard order, which is, as you can see: .

  sort (sort lines of text files)


  This time the dummy file contains the following text:

  "b

  c

  a"


               $sort /tmp/dummy



  This is what the output looks like:


  a

  b

  c


  Commands shouldn't be that easy :-) bc (a calculator programming
  language)


  Bc is accepting calculations from command line (input from file. not
  from redirector or pipe), but also from a user interface. The
  following demonstration shows some of the commands. Note that

  I start bc using the -q parameter to avoid a welcome message.



          $bc -q



  1 == 5

  0

  0.05 == 0.05

  1

  5 != 5

  0

  2 ^ 8

  256

  sqrt(9)

  3

  while (i != 9) {

  i = i + 1;

  print i

  }

  123456789

  quit

  tput (initialize a terminal or query terminfo database)


  A little demonstration of tput's capabilities:


               $tput cup 10 4



  The prompt appears at (y10,x4).


               $tput reset



  Clears screen and prompt appears at (y1,x1). Note that (y0,x0) is the
  upper left corner.


               $tput cols



  80

  Shows the number of characters possible in x direction.

  It it higly recommended to be familiarized with these programs (at
  least). There are tons of little programs that will let you do real
  magic on the command line.

  [some samples are taken from man pages or FAQs]

  12.

  More Scripts

  12.1.  Applying a command to all files in a directory.



  12.2.

  Sample: A very simple backup script (little bit better)



                   #!/bin/bash
                   SRCD="/home/"
                   TGTD="/var/backups/"
                   OF=home-$(date +%Y%m%d).tgz
                   tar -cZf $TGTD$OF $SRCD



  12.3.

  File re-namer



               #!/bin/sh
               # renna: rename multiple files according to several rules
               # written by felix hudson Jan - 2000

               #first check for the various 'modes' that this program has
               #if the first ($1) condition matches then we execute that portion of the
               #program and then exit

               # check for the prefix condition
               if [ $1 = p ]; then

               #we now get rid of the mode ($1) variable and prefix ($2)
                 prefix=$2 ; shift ; shift

               # a quick check to see if any files were given
               # if none then its better not to do anything than rename some non-existent
               # files!!

                 if [$1 = ]; then
                    echo "no files given"
                    exit 0
                 fi

               # this for loop iterates through all of the files that we gave the program
               # it does one rename per file given
                 for file in $*
                   do
                   mv ${file} $prefix$file
                 done

               #we now exit the program
                 exit 0
               fi

               # check for a suffix rename
               # the rest of this part is virtually identical to the previous section
               # please see those notes
               if [ $1 = s ]; then
                 suffix=$2 ; shift ; shift

                  if [$1 = ]; then
                   echo "no files given"
                  exit 0
                  fi

                for file in $*
                 do
                  mv ${file} $file$suffix
                done

                exit 0
               fi

               # check for the replacement rename
               if [ $1 = r ]; then

                 shift

               # i included this bit as to not damage any files if the user does not specify
               # anything to be done
               # just a safety measure

                 if [ $# -lt 3 ] ; then
                   echo "usage: renna r [expression] [replacement] files... "
                   exit 0
                 fi
               # remove other information
                 OLD=$1 ; NEW=$2 ; shift ; shift

               # this for loop iterates through all of the files that we give the program
               # it does one rename per file given using the program 'sed'
               # this is a sinple command line program that parses standard input and
               # replaces a set expression with a give string
               # here we pass it the file name ( as standard input) and replace the nessesary
               # text

                 for file in $*
                 do
                   new=`echo ${file} | sed s/${OLD}/${NEW}/g`
                   mv ${file} $new
                 done
               exit 0
               fi

               # if we have reached here then nothing proper was passed to the program
               # so we tell the user how to use it
               echo "usage;"
               echo " renna p [prefix] files.."
               echo " renna s [suffix] files.."
               echo " renna r [expression] [replacement] files.."
               exit 0

               # done!



  12.4.

  File renamer (simple)



            #!/bin/bash
            # renames.sh
            # basic file renamer

            criteria=$1
            re_match=$2
            replace=$3

            for i in $( ls *$criteria* );
            do
                src=$i
                tgt=$(echo $i | sed -e "s/$re_match/$replace/")
                mv $src $tgt
            done



  13.

  When something goes wrong (debugging)

  13.1.  Ways Calling BASH

  A nice thing to do is to add on the first line

            #!/bin/bash -x



  This will produce some intresting output information

  14.

  About the document

  Feel free to make suggestions/corrections, or whatever you think it
  would be interesting to see in this document. I'll try to update it as
  soon as I can.

  14.1.

  (no) warranty

  This documents comes with no warranty of any kind.  and all that

  14.2.

  Thanks to


    Nathan Hurst for sending a lot of corrections.

    Jon Abbott for sending comments about evaluating arithmetic
     expressions.

    Laurent Martelli for  translating this document to French (soon
     here the URL)

    Felix Hudson for writing the renna script

    Kees van den Broek (for sending many corrections, re-writting
     usefull comands section)

    Mike (pink) made some suggestions about locating bash and testing
     files

    Fiesh make a nice suggestion for the loops section.

    Lion suggested to mention a common error (./hello.sh: Command not
     found.)

    Andreas Beck made several corrections and coments.

  14.3.

  History

  Added the section usefull commands re-writen by Kess.

  More corrections and suggestions incorporated.

  Samples added on string comparison.

  v0.8 droped the versioning, I guess the date is enought.

  v0.7 More corrections and some old TO-DO sections written.

  v0.6 Minor corrections.

  v0.5 Added the redirection section.

  v0.4 disapperd from its location due to my ex-boss and thid doc found
  it's new place at the proper url: www.linuxdoc.org.

  prior:  I don't rememeber and I didn't use rcs nor cvs :(

  14.4.

  More resources


  Introduction to bash (under BE)
  http://org.laol.net/lamug/beforever/bashtut.htm

  Bourne Shell Programming http://207.213.123.70/book/



  Bash Prompt HOWTO
  Giles Orr, giles@interlog.com
  v0.76 31 December 1999

  Creating and controlling terminal and xterm prompts is discussed,
  including incorporating standard escape sequences to give username,
  current working directory, time, etc.  Further suggestions are made on
  how to modify xterm title bars, use external functions to provide
  prompt information, and how to use ANSI colours.
  ______________________________________________________________________

  Table of Contents



  1. Introduction and Administrivia

     1.1 Requirements
     1.2 How To Use This Document
     1.3 Translations
     1.4 Problems
     1.5 Send Me Comments and Suggestions
     1.6 Credits
     1.7 Copyright and Disclaimer

  2. Bash and Bash Prompts

     2.1 What is Bash?
     2.2 What Can Tweaking Your Bash Prompt Do For You?
     2.3 Why Bother?
     2.4 The First Step
     2.5 Bash Prompt Escape Sequences
     2.6 Setting the PS? Strings Permanently

  3. Bash Programming and Shell Scripts

     3.1 Variables
     3.2 Quotes and Special Characters
     3.3 Command Substitution
     3.4 Non-Printing Characters in Prompts
     3.5 Sourcing a File
     3.6 Functions, Aliases, and the Environment

  4. External Commands

     4.1 PROMPT_COMMAND
     4.2 External Commands in the Prompt
     4.3 What to Put in Your Prompt

  5. Xterm Title Bar Manipulations

  6. ANSI Escape Sequences: Colours and Cursor Movement

     6.1 Colours
     6.2 Cursor Movement
     6.3 Moving the Cursor With tput

  7. Special Characters: Octal Escape Sequences

  8. The Bash Prompt Package

     8.1 Availability
     8.2 Xterm Fonts
     8.3 Changing the Xterm Font

  9. Loading a Different Prompt

     9.1 Loading a Different Prompt, Later
     9.2 Loading a Different Prompt, Immediately

  10. Loading Prompt Colours Dynamically

     10.1 A "Proof of Concept" Example

  11. Prompt Code Snippets

     11.1 Built-in Escape Sequences
     11.2 Date and Time
     11.3 Counting Files in the Current Directory
     11.4 Total Bytes in the Current Directory
     11.5 Checking the Current TTY
     11.6 Suspended Job Count
     11.7 Uptime and Load
     11.8 Number of Processes
     11.9 Controlling the Width of $PWD
     11.10 Laptop Power
     11.11 Having the Prompt Ignored on Cut and Paste
     11.12 Setting the Window Title and Icon Title Separately

  12. Example Prompts

     12.1 Examples on the Web Over time, many people have e-mailed me excellent examples, and I've written some interesting ones myself.  There are far too many to include here, so I have put all of the examples together into some web pages which can be seen at
     12.2 A "Lightweight" Prompt
     12.3 Elite from Bashprompt Themes
     12.4 A "Power User" Prompt
     12.5 Prompt Depending on Connection Type
     12.6 A Prompt the Width of Your Term
     12.7 The Elegant Useless Clock Prompt


  ______________________________________________________________________

  1.  Introduction and Administrivia

  1.1.  Requirements

  You will need Bash.  The default version for most distributions is
  either 1.14.7, or 2.0.x.  1.14.7 was the standard for years, but is
  slowly being replaced.  I've been using Bash 2.0.x for quite a while
  now, but almost all code presented here should work under 1.14.7.  If
  I'm aware of a problem, I'll mention it.  You can check your Bash
  version by typing echo $BASH_VERSION at the prompt.  On my machine, it
  responds with 2.03.6(1)-release.


  Shell programming experience would be good, but isn't essential: the
  more you know, the more complex the prompts you'll be able to create.
  I assume a basic knowledge of shell programming and Unix utilities as
  I go through this tutorial.  However, my own shell programming skills
  are limited, so I give a lot of examples and explanation that may
  appear unnecessary to an experienced shell programmer.


  1.2.  How To Use This Document

  I include a lot of examples and explanatory text.  Different parts
  will be of varying usefulness to different people.  This has grown
  long enough that reading it straight through would be difficult - just
  read the sections you need, backtrack as necessary.


  1.3.  Translations

  Japanese: http://www.jf.linux.or.jp/JF/JF-ftp/other-formats/Bash-
  Prompt/Bash-Prompt-HOWTO.html, provided by Akira Endo,
  akendo@t3.rim.or.jp.


  German: translation is in progress by Thomas Keil, thomas@h-
  preissler.de.


  Italian: by Daniel Dui, ddui@iee.org, available at
  http://www.crs4.it/~dui/linux.html.



  Portugese: translation is in progress by Mrio Gamito,
  mario.gamito@mail.telepac.pt.



  Spanish: translation by Iosu Santurtn iosu@bigfoot.com at
  http://mipagina.euskaltel.es/iosus/linux/Bash-Prompt-HOWTO.html.


  Dutch: translation is in progress by Ellen Bokhorst elboh@gironet.nl,
  and it will be available at http://www.nl.linux.org/doc/HOWTO.


  Chinese: translation in progress by Allen Huang
  lancelot@tomail.com.tw.  I will include a URL when I have it.


  Many thanks to all of them!  URLs will be included as they're
  available.


  If you are working on a translation, please notify me - especially if
  it's available at a linkable URL.  Thanks.


  1.4.  Problems

  This is a list of problems I've noticed while programming prompts.
  Don't start reading here, and don't let this list discourage you -
  these are mostly quite minor details.  Just check back if you run into
  anything odd.


  o  Many Bash features (such as math within $(()) among others) are
     compile time options.  If you're using a binary distribution such
     as comes with a standard Linux distribution, all such features
     should be compiled in.  But if you're working on someone else's
     system, this is worth keeping in mind if something you expected to
     work doesn't.  Some notes about this in Learning the Bash Shell,
     p.260-262.

  o  The terminal screen manager "screen" doesn't always get along with
     ANSI colours.  I'm not a screen expert, unfortunately.  My current
     version of screen (3.7.6-1, an RPM package) seems to work well in
     all cases, but I've seen occasions where screen reduced all prompt
     colours to the standard foreground colour in X terminals.  This
     doesn't appear to be a problem on the console.

  o  Xdefaults files can override colours.  Look in ~/.Xdefaults for
     lines referring to XTerm*background and XTerm*foreground (or
     possibly XTerm*Background and XTerm*Foreground).

  o  One of the prompts mentioned in this document uses the output of
     "jobs" - as discussed at that time, "jobs" output to a pipe is
     broken in Bash 2.02.

  o  ANSI cursor movement escape sequences aren't all implemented in all
     X terminals.  That's discussed in its own section.

  o  Some nice looking pseudo-graphics can be created by using a VGA
     font rather than standard Linux fonts.  Unfortunately, these
     effects look awful if you don't use a VGA font, and there's no way
     to detect within a term what kind of font it's using.

  o  Bash 2.0+ is out, and it incorporates some new features, and
     changes some behaviour.  Things that work under 1.14.7 don't
     necessarily work the same under 2.0+, or vice versa.


  1.5.  Send Me Comments and Suggestions

  This is a learning experience for me.  I've come to know a fair bit
  about what can be done to create interesting and useful Bash Prompts,
  but I need your input to correct and improve this document.  I've
  tried to check suggestions I make against different versions of Bash
  (2.0x and 1.14.7), but let me know of any incompatibilities you find.


  The latest version of this document should always be available at
  http://www.interlog.com/~giles/bashprompt/.  Please check this out,
  and feel free to e-mail me at giles@interlog.com with suggestions.


  I use the Linux Documentation Project HOWTOs almost exclusively in the
  HTML format, so when I convert this from SGML (its native format),
  HTML is the only format I check thoroughly.  If there are problems
  with other formats, I may not know about them, and I'd appreciate a
  note about them.


  1.6.  Credits

  In producing this document, I have borrowed heavily from the work of
  the Bashprompt project at http://bash.current.nu/.  Other sources used
  include the xterm Title mini-HOWTO by Ric Lister, available at
  http://sunsite.unc.edu/LDP/HOWTO/mini/Xterm-Title.html, Ansi Prompts
  by Keebler, available at http://www.ncal.verio.com/~keebler/ansi.html,
  How to make a Bash Prompt Theme by Stephen Webb, available at
  http://bash.current.nu/bash/HOWTO.html, and X ANSI Fonts by Stumpy,
  available at http://home.earthlink.net/~us5zahns/enl/ansifont.html.


  Also of immense help were several conversations and e-mails from Dan,
  an ex-co-worker at Georgia College & State University, whose knowledge
  of Unix far exceeds mine.  He's given me several excellent
  suggestions, and ideas of his have led to some interesting prompts.


  Three books that have been very useful while programming prompts are
  Linux in a Nutshell by Jessica Heckman Perry (O'Reilly, 1997),
  Learning the Bash Shell by Cameron Newham and Bill Rosenblatt
  (O'Reilly, 2nd. ed., 1998) and Unix Shell Programming by Lowell Jay
  Arthur (Wiley, 1986.  This is the first edition, the fourth came out
  in 1997).


  1.7.  Copyright and Disclaimer

  This document is copyright 1998-1999 by Giles Orr.  You are encouraged
  to redistribute it.  You may not modify this document (see the section
  on contacting me: I incorporate most changes recommended by readers).
  Please contact me if you're interested in doing a translation.


  This document is available for free, and, while I have done the best I
  can to make it accurate and up to date, I take no responsibility for
  any problems you may encounter resulting from the use of this
  document.



  2.  Bash and Bash Prompts

  2.1.  What is Bash?

  Descended from the Bourne Shell, Bash is a GNU product, the "Bourne
  Again SHell."  It's the standard command line interface on most Linux
  machines.  It excels at interactivity, supporting command line
  editing, completion, and recall.  It also supports configurable
  prompts - most people realize this, but don't know how much can be
  done.


  2.2.  What Can Tweaking Your Bash Prompt Do For You?

  Most Linux systems have a default prompt in one colour (usually gray)
  that tells you your user name, the name of the machine you're working
  on, and some indication of your current working directory.  This is
  all useful information, but you can do much more with the prompt: all
  sorts of information can be displayed (tty number, time, date, load,
  number of users, uptime ...) and the prompt can use ANSI colours,
  either to make it look interesting, or to make certain information
  stand out.  You can also manipulate the title bar of an Xterm to
  reflect some of this information.


  2.3.  Why Bother?

  Beyond looking cool, it's often useful to keep track of system
  information.  One idea that I know appeals to some people is that it
  makes it possible to put prompts on different machines in different
  colours.  If you have several Xterms open on several different
  machines, or if you tend to forget what machine you're working on and
  delete the wrong files (or shut down the server instead of the
  workstation), you'll find this a great way to remember what machine
  you're on.


  For myself, I like the utility of having information about my machine
  and work environment available all the time.  And I like the challenge
  of trying to figure out how to put the maximum amount of information
  into the smallest possible space while maintaining readability.



  2.4.  The First Step

  The appearance of the prompt is governed by the shell variable PS1.
  Command continuations are indicated by the PS2 string, which can be
  modified in exactly the same ways discussed here - since controlling
  it is exactly the same, and it isn't as "interesting," I'll mostly be
  modifying the PS1 string.  (There are also PS3 and PS4 strings.  These
  are never seen by the average user - see the Bash man page if you're
  interested in their purpose.)  To change the way the prompt looks, you
  change the PS1 variable.  For experimentation purposes, you can enter
  the PS1 strings directly at the prompt, and see the results
  immediately (this only affects your current session, and the changes
  go away when you log out).  If you want to make a change to the prompt
  permanent, look at the section below ``Setting the PS? Strings
  Permanently''.


  Before we get started, it's important to remember that the PS1 string
  is stored in the environment like any other environment variable.  If
  you modify it at the command line, your prompt will change.  Before
  you make any changes, you can save your current prompt to another
  environment variable:
       [giles@nikola giles]$ SAVE=$PS1
       [giles@nikola giles]$



  The simplest prompt would be a single character, such as:



       [giles@nikola giles]$ PS1=$
       $ls
       bin   mail
       $



  This demonstrates the best way to experiment with basic prompts,
  entering them at the command line.  Notice that the text entered by
  the user appears immediately after the prompt: I prefer to use



       $PS1="$ "
       $ ls
       bin   mail
       $



  which forces a space after the prompt, making it more readable.  To
  restore your original prompt, just call up the variable you stored:



       $ PS1=$SAVE
       [giles@nikola giles]$



  2.5.  Bash Prompt Escape Sequences

  There are a lot of escape sequences offered by the Bash shell for
  insertion in the prompt.  From the Bash 2.02 man page:



  When executing interactively, bash  displays  the  primary
  prompt  PS1  when  it  is ready to read a command, and the
  secondary prompt PS2 when it needs more input to  complete
  a  command.   Bash  allows these prompt strings to be cus-
  tomized by inserting a number of backslash-escaped special
  characters that are decoded as follows:
         \a     an ASCII bell character (07)
         \d     the  date  in  "Weekday  Month  Date" format
                (e.g., "Tue May 26")
         \e     an ASCII escape character (033)
         \h     the hostname up to the first `.'
         \H     the hostname
         \n     newline
         \r     carriage return
         \s     the name of the shell, the  basename  of  $0
                (the portion following the final slash)
         \t     the current time in 24-hour HH:MM:SS format
         \T     the current time in 12-hour HH:MM:SS format
         \@     the current time in 12-hour am/pm format
         \u     the username of the current user
         \v     the version of bash (e.g., 2.00)
         \V     the  release  of  bash, version + patchlevel
                (e.g., 2.00.0)
         \w     the current working directory
         \W     the basename of the current  working  direc-
                tory
         \!     the history number of this command
         \#     the command number of this command
         \$     if  the effective UID is 0, a #, otherwise a
                $
         \nnn   the character  corresponding  to  the  octal
                number nnn
         \\     a backslash
         \[     begin a sequence of non-printing characters,
                which could be used to embed a terminal con-
                trol sequence into the prompt
         \]     end a sequence of non-printing characters



  Continuing where we left off:



       [giles@nikola giles]$ PS1="\u@\h \W> "
       giles@nikola giles> ls
       bin   mail
       giles@nikola giles>



  This is similar to the default on most Linux distributions.  I wanted
  a slightly different appearance, so I changed this to:



       giles@nikola giles> PS1="[\t][\u@\h:\w]\$ "
       [21:52:01][giles@nikola:~]$ ls
       bin   mail
       [21:52:15][giles@nikola:~]$


  2.6.  Setting the PS? Strings Permanently

  Various people and distributions set their PS? strings in different
  places.  The most common places are /etc/profile, /etc/bashrc,
  ~/.bash_profile, and ~/.bashrc .  Johan Kullstam (johan19@idt.net)
  writes:



       the PS1 string should be set in .bashrc.  this is because
       non-interactive bashes go out of their way to unset PS1.
       the bash man page tells how the presence or absence of PS1
       is a good way of knowing whether one is in an interactive vs
       non-interactive (ie script) bash session.


       the way i realized this is that startx is a bash script.
       what this means is, startx will wipe out your prompt.  when
       you set PS1 in .profile (or .bash_profile), login at
       console, fire up X via startx, your PS1 gets nuked in the
       process leaving you with the default prompt.


       one workaround is to launch xterms and rxvts with the -ls
       option to force them to read .profile.  but any time a shell
       is called via a non-interactive shell-script middleman PS1
       is lost.  system(3) uses sh -c which if sh is bash will kill
       PS1.  a better way is to place the PS1 definition in
       .bashrc.  this is read every time bash starts and is where
       interactive things - eg PS1 should go.


       therefore it should be stressed that PS1=..blah.. should be
       in .bashrc and not .profile.



  I tried to duplicate the problem he explains, and encountered a
  different one: my PROMPT_COMMAND variable (which will be introduced
  later) was blown away.  My knowledge in this area is somewhat shaky,
  so I'm going to go with what Johan says.



  3.  Bash Programming and Shell Scripts

  3.1.  Variables

  I'm not going to try to explain all the details of Bash scripting in a
  section of this HOWTO, just the details pertaining to prompts.  If you
  want to know more about shell programming and Bash in general, I
  highly recommend Learning the Bash Shell by Cameron Newham and Bill
  Rosenblatt (O'Reilly, 1998).  Oddly, my copy of this book is quite
  frayed.  Again, I'm going to assume that you know a fair bit about
  Bash already.  You can skip this section if you're only looking for
  the basics, but remember it and refer back if you proceed much
  farther.


  Variables in Bash are assigned much as they are in any programming
  language:



  testvar=5
  foo=zen
  bar="bash prompt"



  Quotes are only needed in an assignment if a space (or special
  character, discussed shortly) is a part of the variable.


  Variables are referenced slightly differently than they are assigned:



       > echo $testvar
       5
       > echo $foo
       zen
       > echo ${bar}
       bash prompt
       > echo $NotAssigned

       >



  A variable can be referred to as $bar or ${bar}.  The braces are
  useful when it is unclear what is being referenced: if I write $barley
  do I mean ${bar}ley or ${barley}?  Note also that referencing a value
  that hasn't been assigned doesn't generate an error, instead returning
  nothing.


  3.2.  Quotes and Special Characters

  If you wish to include a special character in a variable, you will
  have to quote it differently:



       > newvar=$testvar
       > echo $newvar
       5
       > newvar="$testvar"
       > echo $newvar
       5
       > newvar='$testvar'
       > echo $newvar
       $testvar
       > newvar=\$testvar
       > echo $newvar
       $testvar
       >



  The dollar sign isn't the only character that's special to the Bash
  shell, but it's a simple example.  An interesting step we can take to
  make use of assigning a variable name to another variable name is to
  use eval to dereference the stored variable name:



  > echo $testvar
  5
  > echo $newvar
  $testvar
  > eval echo $newvar
  5
  >



  Normally, the shell does only one round of substitutions on the
  expression it is evaluating: if you say echo $newvar the shell will
  only go so far as to determine that $newvar is equal to the text
  string $testvar, it won't evaluate what $testvar is equal to.  eval
  forces that evaluation.


  3.3.  Command Substitution

  In almost all cases in this document, I use the $(<command>)
  convention for command substitution: that is,



       $(date +%H%M)



  means "substitute the output from the date +%H%M command here." This
  works in Bash 2.0+.  In some older versions of Bash, prior to 1.14.7,
  you may need to use backquotes (`date +%H%M`).  Backquotes can be used
  in Bash 2.0+, but are being phased out in favor of $(), which nests
  better.  If you're using an earlier version of Bash, you can usually
  substitute backquotes where you see $().  If the command substitution
  is escaped (ie.  \$(command) ), then use backslashes to escape BOTH
  your backquotes (ie.  \'command\' ).


  3.4.  Non-Printing Characters in Prompts

  Many of the changes that can be made to Bash prompts that are
  discussed in this HOWTO use non-printing characters.  Changing the
  colour of the prompt text, changing an Xterm title bar, and moving the
  cursor position all require non-printing characters.


  If I want a very simple prompt consisting of a greater-than sign and a
  space:



       [giles@nikola giles]$ PS1='> '
       >



  This is just a two character prompt.  If I modify it so that it's a
  bright yellow greater-than sign (colours are discussed in their own
  section):



  > PS1='\033[1;33m>\033[0m '
  >



  This works fine - until you type in a large command line.  Because the
  prompt still only consists of two printing characters (a greater-than
  sign and a space) but the shell thinks that this prompt is eleven
  characters long (I think it counts '\033' , '[1' and '[0' as one
  character each).  You can see this by typing a really long command
  line - you will find that the shell wraps the text before it gets to
  the edge of the terminal, and in most cases wraps it badly.  This is
  because it's confused about the actual length of the prompt.


  So use this instead:



       > PS1='\[\033[1;33m\]>\[\033[0m\] '



  This is more complex, but it works.  Command lines wrap properly.
  What's been done is to enclose the '\033[1;33m' that starts the yellow
  colour in square brackets, including the brackets themselves, is a
  non-printing character."  The same is done with the '\033[0m' that
  ends the colour.


  3.5.  Sourcing a File

  When a file is sourced (by typing either source filename or .
  filename at the command line), the lines of code in the file are
  executed as if they were printed at the command line.  This is
  particularly useful with complex prompts, to allow them to be stored
  in files and called up by sourcing the file they are in.


  In examples, you will find that I often include #!/bin/bash at the
  beginning of files including functions.  This is not necessary if you
  are sourcing a file, just as it isn't necessary to chmod +x a file
  that is going to be sourced.  I do this because it makes Vim (my
  editor of choice, no flames please - you use what you like) think I'm
  editing a shell script and turn on colour syntax highlighting.


  3.6.  Functions, Aliases, and the Environment

  As mentioned earlier, PS1, PS2, PS3, PS4, and PROMPT_COMMAND are all
  stored in the Bash environment.  For those of us coming from a DOS
  background, the idea of tossing big hunks of code into the environment
  is horrifying, because that DOS environment was small, and didn't
  exactly grow well.  There are probably practical limits to what you
  can and should put in the environment, but I don't know what they are,
  and we're probably talking a couple of orders of magnitude larger than
  what DOS users are used to.  As Dan put it:


  "In my interactive shell I have 62 aliases and 25 functions.  My rule
  of thumb is that if I need something solely for interactive use and
  can handily write it in bash I make it a shell function (assuming it
  can't be easily expressed as an alias).  If these people are worried
  about memory they don't need to be using bash.  Bash is one of the
  largest programs I run on my linux box (outside of Oracle).  Run top
  sometime and press 'M' to sort by memory - see how close bash is to
  the top of the list.  Heck, it's bigger than sendmail!  Tell 'em to go
  get ash or something."


  I guess he was using console only the day he tried that: running X and
  X apps, I have a lot of stuff larger than Bash.  But the idea is the
  same: the environment is something to be used, and don't worry about
  overfilling it.


  I risk censure by Unix gurus when I say this (for the crime of over-
  simplification), but functions are basically small shell scripts that
  are loaded into the environment for the purpose of efficiency.
  Quoting Dan again: "Shell functions are about as efficient as they can
  be.  It is the approximate equivalent of sourcing a bash/bourne shell
  script save that no file I/O need be done as the function is already
  in memory.  The shell functions are typically loaded from [.bashrc or
  .bash_profile] depending on whether you want them only in the initial
  shell or in subshells as well.  Contrast this with running a shell
  script: Your shell forks, the child does an exec, potentially the path
  is searched, the kernel opens the file and examines enough bytes to
  determine how to run the file, in the case of a shell script a shell
  must be started with the name of the script as its argument, the shell
  then opens the file, reads it and executes the statements.  Compared
  to a shell function, everything other than executing the statements
  can be considered unnecessary overhead."


  Aliases are simple to create:



       alias d="ls --color=tty --classify"
       alias v="d --format=long"
       alias rm="rm -i"



  Any arguments you pass to the alias are passed to the command line of
  the aliased command (ls in the first two cases).  Note that aliases
  can be nested, and they can be used to make a normal unix command
  behave in a different way.  (I agree with the argument that you
  shouldn't use the latter kind of aliases - if you get in the habit of
  relying on "rm *" to ask you if you're sure, you may lose important
  files on a system that doesn't use your alias.)


  Functions are used for more complex program structures.  As a general
  rule, use an alias for anything that can be done in one line.
  Functions differ from shell scripts in that they are loaded into the
  environment so that they work more quickly.  As a general rule again,
  you would want to keep functions relatively small, and any shell
  script that gets relatively large should remain a shell script rather
  than turning it into a function.  Your decision to load something as a
  function is also going to depend on how often you use it.  If you use
  a small shell script infrequently, leave it as a shell script.  If you
  use it often, turn it into a function.


  To modify the behaviour of ls, you could do something like the
  following:


       function lf
       {
           ls --color=tty --classify $*
           echo "$(ls -l $* | wc -l) files"
       }



  This could readily be set as an alias, but for the sake of example,
  we'll make it a function.  If you type the text shown into a text file
  and then source that file, the function will be in your environment,
  and be immediately available at the command line without the overhead
  of a shell script mentioned previously.  The usefulness of this
  becomes more obvious if you consider adding more functionality to the
  above function, such as using an if statement to execute some special
  code when links are found in the listing.



  4.  External Commands

  4.1.  PROMPT_COMMAND

  Bash provides another environment variable called PROMPT_COMMAND.  The
  contents of this variable are executed as a regular Bash command just
  before Bash displays a prompt.



       [21:55:01][giles@nikola:~] PS1="[\u@\h:\w]\$ "
       [giles@nikola:~] PROMPT_COMMAND="date +%H%M"
       2155
       [giles@nikola:~] d
       bin   mail
       2156
       [giles@nikola:~]



  What happened above was that I changed PS1 to no longer include the \t
  escape sequence, so the time was no longer a part of the prompt.  Then
  I used date +%H%M to display the time in a format I like better.  But
  it appears on a different line than the prompt.  Tidying this up using
  echo -n ... as shown below works with Bash 2.0+, but appears not to
  work with Bash 1.14.7: apparently the prompt is drawn in a different
  way, and the following method results in overlapping text.



       2156
       [giles@nikola:~] PROMPT_COMMAND="echo -n [$(date +%H%M)]"
       [2156][giles@nikola:~]$
       [2156][giles@nikola:~]$ d
       bin   mail
       [2157][giles@nikola:~]$ unset PROMPT_COMMAND
       [giles@nikola:~]



  echo -n ... controls the output of the date command and supresses the
  trailing newline, allowing the prompt to appear all on one line.  At
  the end, I used the unset command to remove the PROMPT_COMMAND
  environment variable.



  4.2.  External Commands in the Prompt

  You can use the output of regular Linux commands directly in the
  prompt as well.  Obviously, you don't want to insert a lot of
  material, or it will create a large prompt.  You also want to use a
  fast command, because it's going to be executed every time your prompt
  appears on the screen, and delays in the appearance of your prompt
  while you're working can be very annoying.  (Unlike the previous
  example that this closely resembles, this does work with Bash 1.14.7.)



       [21:58:33][giles@nikola:~]$ PS1="[\$(date +%H%M)][\u@\h:\w]\$ "
       [2159][giles@nikola:~]$ ls
       bin   mail
       [2200][giles@nikola:~]$



  It's important to notice the backslash before the dollar sign of the
  command substitution.  Without it, the external command is executed
  exactly once: when the PS1 string is read into the environment.  For
  this prompt, that would mean that it would display the same time no
  matter how long the prompt was used.  The backslash protects the
  contents of $() from immediate shell interpretation, so "date" is
  called every time a prompt is generated.


  Linux comes with a lot of small utility programs like date, grep, or
  wc that allow you to manipulate data.  If you find yourself trying to
  create complex combinations of these programs within a prompt, it may
  be easier to make an alias, function, or shell script of your own, and
  call it from the prompt.  Escape sequences are often required in bash
  shell scripts to ensure that shell variables are expanded at the
  correct time (as seen above with the date command): this is raised to
  another level within the prompt PS1 line, and avoiding it by creating
  functions is a good idea.


  An example of a small shell script used within a prompt is given
  below:


  ______________________________________________________________________
  #!/bin/bash
  #     lsbytesum - sum the number of bytes in a directory listing
  TotalBytes=0
  for Bytes in $(ls -l | grep "^-" | cut -c30-41)
  do
      let TotalBytes=$TotalBytes+$Bytes
  done
  TotalMeg=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc)
  echo -n "$TotalMeg"
  ______________________________________________________________________



  I have at times kept this both as a function, or as a shell script in
  my ~/bin directory, which is on my path.  Used in a prompt:



       [2158][giles@nikola:~]$ PS1="[\u@\h:\w (\$(lsbytesum) Mb)]\$ "
       [giles@nikola:~ (0 Mb)]$ cd /bin
       [giles@nikola:/bin (4.498 Mb)]$



  4.3.  What to Put in Your Prompt

  You'll find I put username, machine name, time, and current directory
  name in most of my prompts.  With the exception of the time, these are
  very standard items to find in a prompt, and time is probably the next
  most common addition.  But what you include is entirely a matter of
  personal taste.  Here are examples from people I know to help give you
  ideas.


  Dan's prompt is minimal but very effective, particularly for the way
  he works.



       [giles@nikola:~]$ cur_tty=$(tty | sed -e "s/.*tty\(.*\)/\1/")
       [giles@nikola:~]$ echo $cur_tty
       p4
       [giles@nikola:~]$ PS1="\!,$cur_tty,\$?\$ "
       1095,p4,0$



  Dan doesn't like that having the current working directory can resize
  the prompt drastically as you move through the directory tree, so he
  keeps track of that in his head (or types "pwd").  He learned Unix
  with csh and tcsh, so he uses his command history extensively
  (something many of us weened on Bash do not do), so the first item in
  the prompt is the history number.  The second item is the significant
  characters of the tty (the output of "tty" is cropped with sed), an
  item that can be useful to "screen" users.  The third item is the exit
  value of the last command/pipeline (note that this is rendered useless
  by any command executed within the prompt - you could work around that
  by capturing it to a variable and playing it back, though).  Finally,
  the "\$" is a dollar sign for a regular user, and switches to a hash
  mark ("#") if the user is root.


  Torben Fjerdingstad (tfj@fjerdingstad.dk) wrote to tell me that he
  often suspends jobs and then forgets about them.  He uses his prompt
  to remind himself of suspended jobs:



  [giles@nikola:~]$ function jobcount {
  > jobs|wc -l| awk '{print $1}'
  > }
  [giles@nikola:~]$ export PS1='\W[`jobcount`]# '
  giles[0]# man ls &
  [1] 4150

  [1]+  Stopped (tty output)    man ls
  giles[1]#



  Torben uses awk to trim the whitespace from the output of wc, while I
  would have used sed or tr - not because they're better, but because
  I'm more familiar with them.  There are probably other ways as well.
  Torben also surrounds his PS1 string in single quotes, which prevent
  Bash from immediately interpreting the backquotes, so he doesn't have
  to escape them as I have mentioned.


  NOTE: There is a known bug in Bash 2.02 that causes the jobs command
  (a shell builtin) to return nothing to a pipe.  If you try the above
  under Bash 2.02, you will always get a "0" back regardless of how many
  jobs you have suspended.  This problem is fixed in 2.03.



  5.  Xterm Title Bar Manipulations

  Non-printing escape sequences can be used to produce interesting
  effects in prompts.  To use these escape sequences, you need to
  enclose them in \[ and \] (as discussed in ``Non-Printing Characters
  in Prompts''), telling Bash to ignore this material while calculating
  the size of the prompt.  Failing to include these delimiters results
  in line editing code placing the cursor incorrectly because it doesn't
  know the actual size of the prompt.  Escape sequences must also be
  preceded by \033[ in Bash prior to version 2, or by either \033[ or
  \e[ in later versions.


  If you try to change the title bar of your Xterm with your prompt when
  you're at the console, you'll produce garbage in your prompt.  To
  avoid this, test the TERM environment variable to tell if your prompt
  is going to be in an Xterm.



  ______________________________________________________________________
  function proml
  {
  case $TERM in
      xterm*)
          local TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          local TITLEBAR=''
          ;;
  esac

  PS1="${TITLEBAR}\
  [\$(date +%H%M)]\
  [\u@\h:\w]\
  \$ "
  PS2='> '
  PS4='+ '
  }
  ______________________________________________________________________



  This is a function that can be incorporated into ~/.bashrc.  The
  function name could then be called to execute the function.  The
  function, like the PS1 string, is stored in the environment.  Once the
  PS1 string is set by the function, you can remove the function from
  the environment with unset proml.  Since the prompt can't change from
  being in an Xterm to being at the console, the TERM variable isn't
  tested every time the prompt is generated.  I used continuation
  markers (backslashes) in the definition of the prompt, to allow it to
  be continued on multiple lines.  This improves readability, making it
  easier to modify and debug.


  I define this as a function because this is how the Bashprompt package
  (discussed later in this document: ``The Bash Prompt Package'') deals
  with prompts: it's not the only way to do it, but it works well.  As
  the prompts you use become more complex, it becomes more and more
  cumbersome to type them in at the prompt, and more practical to make
  them into some sort of text file.  In this case, to test this at the
  prompt, save the above as a text file called "proml".  You can work
  with it as follows:



       [giles@nikola:/bin (4.498 Mb)]$ cd          -> Go where you want to save the prompt
       [giles@nikola:~ (0 Mb)]$ vi proml           -> Edit the prompt file
       ...                                         -> Enter the text given above
       [giles@nikola:~ (0 Mb)]$ source proml       -> Read the prompt function
       [giles@nikola:~ (0 Mb)]$ proml              -> Execute the prompt function



  The first step in creating this prompt is to test if the shell we're
  starting is an xterm or not: if it is, the shell variable
  (${TITLEBAR}) is defined.  It consists of the appropriate escape
  sequences, and \u@\h:\w, which puts <user>@<machine>:<working
  directory> in the Xterm title bar.  This is particularly useful with
  minimized Xterms, making them more rapidly identifiable.  The other
  material in this prompt should be familiar from previous prompts we've
  created.

  The only drawback to manipulating the Xterm title bar like this occurs
  when you log into a system on which you haven't set up the title bar
  hack: the Xterm will continue to show the information from the
  previous system that had the title bar hack in place.



  6.  ANSI Escape Sequences: Colours and Cursor Movement

  6.1.  Colours

  As mentioned before, non-printing escape sequences have to be enclosed
  in \[\033[ and \].  For colour escape sequences, they should also be
  followed by a lowercase m.


  If you try out the following prompts in an xterm and find that you
  aren't seeing the colours named, check out your ~/.Xdefaults file (and
  possibly its bretheren) for lines like "XTerm*Foreground:
  BlanchedAlmond".  This can be commented out by placing an exclamation
  mark ("!") in front of it.  Of course, this will also be dependent on
  what terminal emulator you're using.  This is the likeliest place that
  your term foreground colours would be overridden.


  To include blue text in the prompt:



       PS1="\[\033[34m\][\$(date +%H%M)][\u@\h:\w]$ "



  The problem with this prompt is that the blue colour that starts with
  the 34 colour code is never switched back to the regular colour, so
  any text you type after the prompt is still in the colour of the
  prompt.  This is also a dark shade of blue, so combining it with the
  bold code might help:



       PS1="\[\033[1;34m\][\$(date +%H%M)][\u@\h:\w]$\[\033[0m\] "



  The prompt is now in light blue, and it ends by switching the colour
  back to nothing (whatever foreground colour you had previously).


  Here are the rest of the colour equivalences:



       Black       0;30     Dark Gray     1;30
       Blue        0;34     Light Blue    1;34
       Green       0;32     Light Green   1;32
       Cyan        0;36     Light Cyan    1;36
       Red         0;31     Light Red     1;31
       Purple      0;35     Light Purple  1;35
       Brown       0;33     Yellow        1;33
       Light Gray  0;37     White         1;37

  Daniel Dui (ddui@iee.org) points out that to be strictly accurate, we
  must mention that the list above is for colours at the console.  In an
  xterm, the code 1;31 isn't "Light Red," but "Bold Red."  This is true
  of all the colours.


  You can also set background colours by using 44 for Blue background,
  41 for a Red background, etc.  There are no bold background colours.
  Combinations can be used, like Light Red text on a Blue background:
  \[\033[44;1;31m\], although setting the colours separately seems to
  work better (ie. \[\033[44m\]\[\033[1;31m\]).  Other codes available
  include 4: Underscore, 5: Blink, 7: Inverse, and 8: Concealed.


  Aside: Many people (myself included) object strongly to the "blink"
  attribute.  Fortunately, it doesn't work in any terminal emulators
  that I'm aware of - but it will still work on the console.  And, if
  you were wondering (as I did) "What use is a 'Concealed' attribute?!"
  - I saw it used in an example shell script (not a prompt) to allow
  someone to type in a password without it being echoed to the screen.


  Based on a prompt called "elite2" in the Bashprompt package (which I
  have modified to work better on a standard console, rather than with
  the special xterm fonts required to view the original properly), this
  is a prompt I've used a lot:


  ______________________________________________________________________

  function elite
  {

  local GRAY="\[\033[1;30m\]"
  local LIGHT_GRAY="\[\033[0;37m\]"
  local CYAN="\[\033[0;36m\]"
  local LIGHT_CYAN="\[\033[1;36m\]"

  case $TERM in
      xterm*)
          local TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          local TITLEBAR=""
          ;;
  esac

  local GRAD1=$(tty|cut -d/ -f3)
  PS1="$TITLEBAR\
  $GRAY-$CYAN-$LIGHT_CYAN(\
  $CYAN\u$GRAY@$CYAN\h\
  $LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
  $CYAN\#$GRAY/$CYAN$GRAD1\
  $LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
  $CYAN\$(date +%H%M)$GRAY/$CYAN\$(date +%d-%b-%y)\
  $LIGHT_CYAN)$CYAN-$GRAY-\
  $LIGHT_GRAY\n\
  $GRAY-$CYAN-$LIGHT_CYAN(\
  $CYAN\$$GRAY:$CYAN\w\
  $LIGHT_CYAN)$CYAN-$GRAY-$LIGHT_GRAY "
  PS2="$LIGHT_CYAN-$CYAN-$GRAY-$LIGHT_GRAY "
  }
  ______________________________________________________________________



  I define the colours as temporary shell variables in the name of
  readability.  It's easier to work with.  The "GRAD1" variable is a
  check to determine what terminal you're on.  Like the test to
  determine if you're working in an Xterm, it only needs to be done
  once.  The prompt you see look like this, except in colour:



       --(giles@nikola)-(75/ttyp7)-(1908/12-Oct-98)--
       --($:~/tmp)--



  To help myself remember what colours are available, I wrote the
  following script which echoes all the colours to screen:



  ______________________________________________________________________
  #!/bin/bash
  #
  #   This file echoes a bunch of colour codes to the terminal to demonstrate
  #   what's available.  Each line is one colour on black and gray
  #   backgrounds, with the code in the middle.  Verified to work on white,
  #   black, and green BGs (2 Dec 98).
  #
  echo "  On Light Gray:        On Black:"
  echo -e "\033[47m\033[1;37m  White        \033[0m\
   1;37m \
  \033[40m\033[1;37m  White        \033[0m"
  echo -e "\033[47m\033[37m  Light Gray   \033[0m\
     37m \
  \033[40m\033[37m  Light Gray   \033[0m"
  echo -e "\033[47m\033[1;30m  Gray         \033[0m\
   1;30m \
  \033[40m\033[1;30m  Gray         \033[0m"
  echo -e "\033[47m\033[30m  Black        \033[0m\
     30m \
  \033[40m\033[30m  Black        \033[0m"
  echo -e "\033[47m\033[31m  Red          \033[0m\
     31m \
  \033[40m\033[31m  Red          \033[0m"
  echo -e "\033[47m\033[1;31m  Light Red    \033[0m\
   1;31m \
  \033[40m\033[1;31m  Light Red    \033[0m"
  echo -e "\033[47m\033[32m  Green        \033[0m\
     32m \
  \033[40m\033[32m  Green        \033[0m"
  echo -e "\033[47m\033[1;32m  Light Green  \033[0m\
   1;32m \
  \033[40m\033[1;32m  Light Green  \033[0m"
  echo -e "\033[47m\033[33m  Brown        \033[0m\
     33m \
  \033[40m\033[33m  Brown        \033[0m"
  echo -e "\033[47m\033[1;33m  Yellow       \033[0m\
   1;33m \
  \033[40m\033[1;33m  Yellow       \033[0m"
  echo -e "\033[47m\033[34m  Blue         \033[0m\
     34m \
  \033[40m\033[34m  Blue         \033[0m"
  echo -e "\033[47m\033[1;34m  Light Blue   \033[0m\
   1;34m \
  \033[40m\033[1;34m  Light Blue   \033[0m"
  echo -e "\033[47m\033[35m  Purple       \033[0m\
     35m \
  \033[40m\033[35m  Purple       \033[0m"
  echo -e "\033[47m\033[1;35m  Pink         \033[0m\
   1;35m \
  \033[40m\033[1;35m  Pink         \033[0m"
  echo -e "\033[47m\033[36m  Cyan         \033[0m\
     36m \
  \033[40m\033[36m  Cyan         \033[0m"
  echo -e "\033[47m\033[1;36m  Light Cyan   \033[0m\
   1;36m \
  \033[40m\033[1;36m  Light Cyan   \033[0m"
  ______________________________________________________________________



  6.2.  Cursor Movement

  ANSI escape sequences allow you to move the cursor around the screen
  at will.  This is more useful for full screen user interfaces
  generated by shell scripts, but can also be used in prompts.  The
  movement escape sequences are as follows:



       - Position the Cursor:
         \033[<L>;<C>H
            Or
         \033[<L>;<C>f
         puts the cursor at line L and column C.
       - Move the cursor up N lines:
         \033[<N>A
       - Move the cursor down N lines:
         \033[<N>B
       - Move the cursor forward N columns:
         \033[<N>C
       - Move the cursor backward N columns:
         \033[<N>D

       - Clear the screen, move to (0,0):
         \033[2J
       - Erase to end of line:
         \033[K

       - Save cursor position:
         \033[s
       - Restore cursor position:
         \033[u



  The latter two codes are NOT honoured by many terminal emulators.  The
  only ones that I'm aware of that do are xterm and nxterm - even though
  the majority of terminal emulators are based on xterm code.  As far as
  I can tell, rxvt, kvt, xiterm, and Eterm do not support them.  They
  are supported on the console.


  Try putting in the following line of code at the prompt (it's a little
  clearer what it does if the prompt is several lines down the terminal
  when you put this in): echo -en "\033[7A\033[1;35m BASH
  \033[7B\033[6D" This should move the cursor seven lines up screen,
  print the word " BASH ", and then return to where it started to
  produce a normal prompt.  This isn't a prompt: it's just a
  demonstration of moving the cursor on screen, using colour to
  emphasize what has been done.


  Save this in a file called "clock":



  ______________________________________________________________________
  #!/bin/bash

  function prompt_command {
  let prompt_x=$COLUMNS-5
  }

  PROMPT_COMMAND=prompt_command

  function clock {
  local       BLUE="\[\033[0;34m\]"
  local        RED="\[\033[0;31m\]"
  local  LIGHT_RED="\[\033[1;31m\]"
  local      WHITE="\[\033[1;37m\]"
  local  NO_COLOUR="\[\033[0m\]"
  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

  PS1="${TITLEBAR}\
  \[\033[s\033[1;\$(echo -n \${prompt_x})H\]\
  $BLUE[$LIGHT_RED\$(date +%H%M)$BLUE]\[\033[u\033[1A\]
  $BLUE[$LIGHT_RED\u@\h:\w$BLUE]\
  $WHITE\$$NO_COLOUR "
  PS2='> '
  PS4='+ '
  }
  ______________________________________________________________________



  This prompt is fairly plain, except that it keeps a 24 hour clock in
  the upper right corner of the terminal (even if the terminal is
  resized).  This will NOT work on the terminal emulators that I
  mentioned that don't accept the save and restore cursor position
  codes.  If you try to run this prompt in any of those terminal
  emulators, the clock will appear correctly, but the prompt will be
  trapped on the second line of the terminal.


  See also ``The Elegant Useless Clock Prompt'' for a more extensive use
  of these codes.


  6.3.  Moving the Cursor With tput

  As with so many things in Unix, there is more than one way to achieve
  the same ends.  A utility called "tput" can also be used to move the
  cursor around the screen, or get back information about the status of
  the terminal.  "tput" for cursor positioning is less flexible than
  ANSI escape sequences: you can only move the cursor to an absolute
  position, you can't move it relative to its current position.  I don't
  use "tput," so I'm not going to explain it in detail.  Type "man tput"
  and you'll know as much as I do.



  7.  Special Characters: Octal Escape Sequences

  Outside of the characters that you can type on your keyboard, there
  are a lot of other characters you can print on your screen.  I've
  created a script to allow you to check out what the font you're using
  has available for you.  The main command you need to use to utilise
  these characters is "echo -e".  The "-e" switch tells echo to enable
  interpretation of backslash-escaped characters.  What you see when you
  look at octal 200-400 will be very different with a VGA font from what
  you will see with a standard Linux font.  Be warned that some of these
  escape sequences have odd effects on your terminal, and I haven't
  tried to prevent them from doing whatever they do.  The linedraw and
  block characters (which many of us became familiar with with Word
  Perfect) that are used heavily by the Bashprompt project are between
  octal 260 and 337.



  ______________________________________________________________________
  #!/bin/bash

  #   Script: escgen

  function usage {
     echo -e "\033[1;34mescgen\033[0m <lower_octal_value> [<higher_octal_value>]"
     echo "   Octal escape sequence generator: print all octal escape sequences"
     echo "   between the lower value and the upper value.  If a second value"
     echo "   isn't supplied, print eight characters."
     echo "   1998 - Giles Orr, no warranty."
     exit 1
  }

  if [ "$#" -eq "0" ]
  then
     echo -e "\033[1;31mPlease supply one or two values.\033[0m"
     usage
  fi
  let lower_val=${1}
  if [ "$#" -eq "1" ]
  then
     #   If they don't supply a closing value, give them eight characters.
     upper_val=$(echo -e "obase=8 \n ibase=8 \n $lower_val+10 \n quit" | bc)
  else
     let upper_val=${2}
  fi
  if [ "$#" -gt "2" ]
  then
     echo -e "\033[1;31mPlease supply two values.\033[0m"
     echo
     usage
  fi
  if [ "${lower_val}" -gt "${upper_val}" ]
  then
     echo -e "\033[1;31m${lower_val} is larger than ${upper_val}."
     echo
     usage
  fi
  if [ "${upper_val}" -gt "777" ]
     then
     echo -e "\033[1;31mValues cannot exceed 777.\033[0m"
     echo
     usage
  fi

  let i=$lower_val
  let line_count=1
  let limit=$upper_val
  while [ "$i" -lt "$limit" ]
  do
     octal_escape="\\$i"
     echo -en "$i:'$octal_escape' "
     if [ "$line_count" -gt "7" ]
     then
        echo
        #   Put a hard return in.
        let line_count=0
     fi
     let i=$(echo -e "obase=8 \n ibase=8 \n $i+1 \n quit" | bc)
     let line_count=$line_count+1
  done
  echo
  ______________________________________________________________________


  You can also use xfd to display all the characters in an X font, with
  the command "xfd -fn <fontname>".  Clicking on any given character
  will give you lots of information about that character, including its
  octal value.  The script given above will be useful on the console,
  and if you aren't sure of the current font name.



  8.  The Bash Prompt Package

  8.1.  Availability

  The Bash Prompt package is available at http://bash.current.nu, and is
  the work of several people, co-ordinated by Rob Current (aka
  BadLandZ).  The package is an early beta, but offers a simple way of
  using multiple prompts (or themes), allowing you to set prompts for
  login shells, and for subshells (ie. putting PS1 strings in
  ~/.bash_profile and ~/.bashrc).  Most of the themes use the extended
  VGA character set, so they look bad unless they're used with VGA fonts
  (which aren't the default on most systems).


  8.2.  Xterm Fonts

  To use some of the most attractive prompts in the Bash Prompt package,
  you need to get and install fonts that support the character sets
  expected by the prompts.  These are "VGA Fonts," which support
  different character sets than regular Xterm fonts.  Standard Xterm
  fonts support an extended alphabet, including a lot of letters with
  accents.  In VGA fonts, this material is replaced by graphical
  characters - blocks, dots, lines.  I asked for an explanation of this
  difference, and Srgio Vale e Pace (space@gold.com.br) wrote me:



       I love computer history so here goes:


       When IBM designed the first PC they needed some character
       codes to use, so they got the ASCII character table (128
       numbers, letters, and some punctuation) and to fill a byte
       addressed table they added 128 more characters.  Since the
       PC was designed to be a home computer, they fill the
       remaining 128 characters with dots, lines, points, etc, to
       be able to do borders, and grayscale effects (remember that
       we are talking about 2 color graphics).


       Time passes, PCs become a standard, IBM creates more
       powerful systems and the VGA standard is born, along with
       256 colour graphics, and IBM continues to include their IBM-
       ASCII characters table.


       More time passes, IBM has lost their leadership in the PC
       market, and the OS authors dicover that there are other
       languages in the world that use non-english characters, so
       they add international alphabet support in their systems.
       Since we now have bright and colorful screens, we can trash
       the dots, lines, etc. and use their space for accented
       characters and some greek letters, which you'll see in
       Linux.



  8.3.  Changing the Xterm Font

  Getting and installing these fonts is a somewhat involved process.
  First, retrieve the font(s).  Next, ensure they're .pcf or .pcf.gz
  files.  If they're .bdf files, investigate the "bdftopcf" command (ie.
  read the man page).  Drop the .pcf or .pcf.gz files into the
  /usr/X11R6/lib/X11/fonts/misc dir (this is the correct directory for
  RedHat 5.1 and Slackware 3.4, it may be different on other
  distributions).  "cd" to that directory, and run the "mkfontdir"
  command.  Then run "xset fp rehash".  Sometimes it's a good idea to go
  into the fonts.alias file in the same directory, and create shorter
  alias names for the fonts.


  To use the new fonts, you start your Xterm program of choice with the
  appropriate command to your Xterm, which can be found either in the
  man page or by using the "--help" parameter on the command line.
  Popular terms would be used as follows:



       xterm -font <fontname>



  OR


       xterm -fn <fontname> -fb <fontname-bold>
       Eterm -F <fontname>
       rxvt -fn <fontname>



  VGA fonts are available from Stumpy's ANSI Fonts page at
  http://home.earthlink.net/~us5zahns/enl/ansifont.html (which I have
  borrowed from extensively while writing this).



  9.  Loading a Different Prompt

  9.1.  Loading a Different Prompt, Later

  The explanations in this HOWTO have shown how to make PS1 environment
  variables, or how to incorporate those PS1 and PS2 strings into
  functions that could be called by ~/.bashrc or as a theme by the
  bashprompt package.


  Using the bashprompt package, you would type bashprompt -i to see a
  list of available themes.  To set the prompt in future login shells
  (primarily the console, but also telnet and Xterms, depending on how
  your Xterms are set up), you would type bashprompt -l themename.
  bashprompt then modifies your ~/.bash_profile to call the requested
  theme when it starts.  To set the prompt in future subshells (usually
  Xterms, rxvt, etc.), you type bashprompt -s themename, and bashprompt
  modifies your ~/.bashrc file to call the appropriate theme at startup.


  See also ``Setting the PS? Strings Permanently'' for Johan Kullstam's
  note regarding the importance of putting the PS?  strings in ~/.bashrc
  .


  9.2.  Loading a Different Prompt, Immediately

  You can change the prompt in your current terminal (using the example
  "elite" function above) by typing "source elite" followed by "elite"
  (assuming that the elite function file is the working directory).
  This is somewhat cumbersome, and leaves you with an extra function
  (elite) in your environment space - if you want to clean up the
  environment, you would have to type "unset elite" as well.  This would
  seem like an ideal candidate for a small shell script, but a script
  doesn't work here because the script cannot change the environment of
  your current shell: it can only change the environment of the subshell
  it runs in.  As soon as the script stops, the subshell goes away, and
  the changes the script made to the environment are gone.  What can
  change environment variables of your current shell are environment
  functions.  The bashprompt package puts a function called
  "callbashprompt" into your environment, and, while they don't document
  it, it can be called to load any bashprompt theme on the fly.  It
  looks in the theme directory it installed (the theme you're calling
  has to be there), sources the function you asked for, loads the
  function, and then unsets the function, thus keeping your environment
  uncluttered.  "callbashprompt" wasn't intended to be used this way,
  and has no error checking, but if you keep that in mind, it works
  quite well.



  10.  Loading Prompt Colours Dynamically

  10.1.  A "Proof of Concept" Example

  This is a "proof of concept" more than an attractive prompt: changing
  colours within the prompt dynamically.  In this example, the colour of
  the host name changes depending on the load (as a warning).



  ______________________________________________________________________
  #!/bin/bash
  #   "hostloadcolour" - 17 October 98, by Giles
  #
  #   The idea here is to change the colour of the host name in the prompt,
  #   depending on a threshold load value.

  # THRESHOLD_LOAD is the value of the one minute load (multiplied
  # by one hundred) at which you want
  # the prompt to change from COLOUR_LOW to COLOUR_HIGH
  THRESHOLD_LOAD=200
  COLOUR_LOW='1;34'
            # light blue
  COLOUR_HIGH='1;31'
             # light red

  function prompt_command {
  ONE=$(uptime | sed -e "s/.*load average: \(.*\...\), \(.*\...\), \(.*\...\)/\1/" -e "s/ //g")
  #   Apparently, "scale" in bc doesn't apply to multiplication, but does
  #   apply to division.
  ONEHUNDRED=$(echo -e "scale=0 \n $ONE/0.01 \nquit \n" | bc)
  if [ $ONEHUNDRED -gt $THRESHOLD_LOAD ]
  then
      HOST_COLOUR=$COLOUR_HIGH
          # Light Red
  else
      HOST_COLOUR=$COLOUR_LOW
          # Light Blue
  fi
  }

  function hostloadcolour {

  PROMPT_COMMAND=prompt_command
  PS1="[$(date +%H%M)][\u@\[\033[\$(echo -n \$HOST_COLOUR)m\]\h\[\033[0m\]:\w]$ "
  }
  ______________________________________________________________________



  Using your favorite editor, save this to a file named
  "hostloadcolour".  If you have the Bashprompt package installed, this
  will work as a theme.  If you don't, type source hostloadcolour and
  then hostloadcolour.  Either way, "prompt_command" becomes a function
  in your environment.  If you examine the code, you will notice that
  the colours ($COLOUR_HIGH and $COLOUR_LOW) are set using only a
  partial colour code, ie. "1;34" instead of "\[\033[1;34m\]", which I
  would have preferred.  I have been unable to get it to work with the
  complete code.  Please let me know if you manage this.



  11.  Prompt Code Snippets

  This section shows how to put various pieces of information into the
  Bash prompt.  There are an infinite number of things that could be put
  in your prompt.  Feel free to send me examples, I will try to include
  what I think will be most widely used.  If you have an alternate way
  to retrieve a piece of information here, and feel your method is more
  efficient, please contact me.  It's easy to write bad code, I do it
  often, but it's great to write elegant code, and a pleasure to read
  it.  I manage it every once in a while, and would love to have more of
  it to put in here.

  To incorporate shell code in prompts, it has to be escaped.  Usually,
  this will mean putting it inside \$(<command>) so that the output of
  command is substituted each time the prompt is generated.


  11.1.  Built-in Escape Sequences

  See ``Bash Prompt Escape Sequences'' for a complete list of built-in
  escape sequences.  This list is taken directly from the Bash man page,
  so you can also look there.


  11.2.  Date and Time

  If you don't like the built-ins for date and time, extracting the same
  information from the date command is relatively easy.  Examples
  already seen in this HOWTO include date +%H%M, which will put in the
  hour in 24 hour format, and the minute.  date "+%A, %d %B %Y" will
  give something like "Sunday, 06 June 1999".  For a full list of the
  interpreted sequences, type date --help or man date.


  11.3.  Counting Files in the Current Directory

  To determine how many files there are in the current directory, put in
  ls -l | wc -l.  This uses wc wordcount to do a count of the number of
  lines (-l) in the output of ls -l.  It doesn't count dotfiles.  If you
  want to count only files and NOT include symbolic links (just an
  example of what else you could do), you could use ls -l | grep -v ^l |
  wc -l.  Here, grep checks for any line beginning with "l" (indicating
  a link), and discards that line (-v).


  11.4.  Total Bytes in the Current Directory

  If you want to know how much space the contents of the current
  directory take up, you can use something like the following:



  ______________________________________________________________________
  # The sed command replaces all the spaces with only one space.
  # cut -d" " -f5 : -d determines a delimiter, which means that (in
  # this case) a space begins a new column.
  # -f says to take out a certain column, in this case the fifth one

  let TotalBytes=0

  for Bytes in $(ls -l | grep "^-" | sed -e "s/ \+/ /g" | cut -d" " -f5)
  do
     let TotalBytes=$TotalBytes+$Bytes
  done

  # The if...fi's give a more specific output in byte, kilobyte, megabyte,
  # and gigabyte

  if [ $TotalBytes -lt 1024 ]; then
     TotalSize=$(echo -e "scale=3 \n$TotalBytes \nquit" | bc)
  else if [ $TotalBytes -lt 1048576 ]; then
     TotalSize=$(echo -e "scale=3 \n$TotalBytes/1024 \nquit" | bc)
  else if [ $TotalBytes -lt 1073741824 ]; then
     TotalSize=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc)
  else
     TotalSize=$(echo -e "scale=3 \n$TotalBytes/1073741824 \nquit" | bc)
  fi
  fi
  fi
  ______________________________________________________________________



  Code courtesy of Sam Schmit (id@pt.lu) and his uncle Jean-Paul, who
  ironed out a fairly major bug in my original code, and just generally
  cleaned it up.


  11.5.  Checking the Current TTY

  The tty command returns the filename of the terminal connected to
  standard input.  This comes in two formats on the Linux systems I have
  used, either "/dev/tty4" or "/dev/pts/2".  I have taken to using a
  more general solution to this: tty | sed -e "s:/dev/::", which removes
  the leading "/dev/".  Older systems (in my experience, RedHat through
  5.2) returned only filenames in the "/dev/tty4" format, so I used tty
  | sed -e "s/.*tty\(.*\)/\1/".


  An alternative method: ps aux | grep $$ | awk '{ print $7 }'.


  11.6.  Suspended Job Count

  To find out how many suspended jobs you have, use jobs | wc -l | awk
  otherwise include blank spaces that waste space in a prompt.  If you
  start netscape from an xterm, this will also be counted.  If you want
  to avoid that, and only count stopped jobs, use jobs -s instead.  Type
  help jobs for more info on jobs.  jobs will always return nothing to a
  pipe in version 2.02 of Bash: this problem is not present in any other
  version.


  11.7.  Uptime and Load

  Current load is taken from the uptime command.  What I use at the
  moment is uptime | sed -e "s/.*load average: \(.*\...\), .*\...,
  .*\.../\1/" -e "s/ //g" which is clunky in the extreme, but works.
  Replacements welcome.  uptime can also be used in a very similar
  manner to find out how long the machine has been up (obviously) or how
  many users are logged in, and the data could be massaged with sed to
  look the way you want it to.


  11.8.  Number of Processes

  ps ax | wc -l | tr -d " " OR ps ax | wc -l | awk each case, tr or awk
  or sed is used to remove the undesirable whitespace.


  11.9.  Controlling the Width of $PWD

  Unix allows long file names, which can lead to the value of $PWD being
  very long.  Some people (notably the default RedHat prompt) choose to
  use the basename of the current working directory (ie. "giles" if
  $PWD="/home/giles").  I like more info than that, but it's often
  desirable to limit the length of the directory name, and it makes the
  most sense to truncate on the left.


  ______________________________________________________________________
  #   How many characters of the $PWD should be kept
  local pwd_length=30
  if [ $(echo -n $PWD | wc -c | tr -d " ") -gt $pwd_length ]
  then
     newPWD="...$(echo -n $PWD | sed -e "s/.*\(.\{$pwd_length\}\)/\1/")"
  else
     newPWD="$(echo -n $PWD)"
  fi
  ______________________________________________________________________



  The above code can be executed as part of PROMPT_COMMAND, and the
  environment variable generated (newPWD) can then be included in the
  prompt.


  11.10.  Laptop Power

  Again, this isn't elegant, but it works (most of the time).  If you
  have a laptop with APM installed, try power=$(apm | sed -e "s/.*:
  \([1-9][0-9]*\)%/\1/" | tr -d " ") executed from PROMPT_COMMAND to
  create an environment variable you can add to your prompt.  This will
  indicate percentage power remaining.


  11.11.  Having the Prompt Ignored on Cut and Paste


  This one is weird but cool.  Rory Toma (rory@corp.webtv.net) wrote to
  suggest a prompt like this: : rory@demon ; .  How is this useful?
  Well, if you type a command after the prompt (odd idea, that), you can
  triple click on that line (in Linux, anyway) to highlight the whole
  line, then paste that line in front of another prompt, and the stuff
  between the ":" and the """ is ignored, like so:



  ______________________________________________________________________
  : rory@demon ; uptime
    5:15pm  up 6 days, 23:04,  2 users,  load average: 0.00, 0.00, 0.00
  : rory@demon ; : rory@demon ; uptime
    5:15pm  up 6 days, 23:04,  2 users,  load average: 0.00, 0.00, 0.00
  ______________________________________________________________________



  The prompt is a no-op, and if your PS2 is set to a space, multiple
  lines can be cut and pasted as well.


  11.12.  Setting the Window Title and Icon Title Separately

  A suggestion from Charles Lepple (clepple@negativezero.org) on setting
  the window title of the Xterm and the title of the corresponding icon
  separately (first check out the earlier section ``Xterm Title Bar
  Manipulations'').  He uses this under WindowMaker because the title
  that's appropriate for an Xterm is usually too long for a 64x64 icon.
  "\[\e]1;icon-title\007\e]2;main-title\007\]".  He says to set this in
  the prompt command because "I tried putting the string in PS1, but it
  causes flickering under some window managers because it results in
  setting the prompt multiple times when you are editing a multi-line
  command (at least under bash 1.4.x -- and I was too lazy to fully
  explore the reasons behind it)."  I had no trouble with it in the PS1
  string, but didn't use any multi-line commands.  He also points out
  that it works under xterm, xwsh, and dtterm, but not gnome-terminal
  (which uses only the main title).  I also found it to work with rxvt,
  but not kterm.



  12.  Example Prompts

  12.1.  Over time, many people have e-mailed me excellent examples, and
  I've written some interesting ones myself.  There are far too many to
  include here, so I have put all of the examples together into some web
  pages which can be seen athttp://www.interlog.com/~giles/bash-
  prompt/prompts.  Web pages also allow me to include pictures, which I
  can't include in a standard HOWTO.  All of the examples given here
  except Bradley Alexander's "Prompts Depending on Connection Types" can
  also be seen on the web.  Examples on the Web

  12.2.  A "Lightweight" Prompt



  ______________________________________________________________________

  function proml {
  local BLUE="\[\033[0;34m\]"
  local RED="\[\033[0;31m\]"
  local LIGHT_RED="\[\033[1;31m\]"
  local WHITE="\[\033[1;37m\]"
  local NO_COLOUR="\[\033[0m\]"
  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

  PS1="${TITLEBAR}\
  $BLUE[$RED\$(date +%H%M)$BLUE]\
  $BLUE[$LIGHT_RED\u@\h:\w$BLUE]\
  $WHITE\$$NO_COLOUR "
  PS2='> '
  PS4='+ '
  }
  ______________________________________________________________________



  12.3.  Elite from Bashprompt Themes

  Note that this requires a VGA font.


  ______________________________________________________________________

  # Created by KrON from windowmaker on IRC
  # Changed by Spidey 08/06
  function elite {
  PS1="\[\033[31m\]\332\304\[\033[34m\](\[\033[31m\]\u\[\033[34m\]@\[\033[31m\]\h\
  \[\033[34m\])\[\033[31m\]-\[\033[34m\](\[\033[31m\]\$(date +%I:%M%P)\
  \[\033[34m\]-:-\[\033[31m\]\$(date +%m)\[\033[34m\033[31m\]/\$(date +%d)\
  \[\033[34m\])\[\033[31m\]\304-\[\033[34m]\\371\[\033[31m\]-\371\371\
  \[\033[34m\]\372\n\[\033[31m\]\300\304\[\033[34m\](\[\033[31m\]\W\[\033[34m\])\
  \[\033[31m\]\304\371\[\033[34m\]\372\[\033[00m\]"
  PS2="> "
  }
  ______________________________________________________________________



  12.4.  A "Power User" Prompt

  I actually do use this prompt, but it results in noticeable delays in
  the appearance of the prompt on a single-user PII-400, so I wouldn't
  recommend using it on a multi-user P-100 or anything ...  Look at it
  for ideas, rather than as a practical prompt.



  ______________________________________________________________________

  #!/bin/bash
  #----------------------------------------------------------------------
  #       POWER USER PROMPT "pprom2"
  #----------------------------------------------------------------------
  #
  #   Created August 98, Last Modified 9 November 98 by Giles
  #
  #   Problem: when load is going down, it says "1.35down-.08", get rid
  #   of the negative

  function prompt_command
  {
  #   Create TotalMeg variable: sum of visible file sizes in current directory
  local TotalBytes=0
  for Bytes in $(ls -l | grep "^-" | cut -c30-41)
  do
      let TotalBytes=$TotalBytes+$Bytes
  done
  TotalMeg=$(echo -e "scale=3 \nx=$TotalBytes/1048576\n if (x<1) {print \"0\"} \n print x \nquit" | bc)

  #      This is used to calculate the differential in load values
  #      provided by the "uptime" command.  "uptime" gives load
  #      averages at 1, 5, and 15 minute marks.
  #
  local one=$(uptime | sed -e "s/.*load average: \(.*\...\), \(.*\...\), \(.*\...\)/\1/" -e "s/ //g")
  local five=$(uptime | sed -e "s/.*load average: \(.*\...\), \(.*\...\), \(.*\...\).*/\2/" -e "s/ //g")
  local diff1_5=$(echo -e "scale = scale ($one) \nx=$one - $five\n if (x>0) {print \"up\"} else {print \"down\"}\n print x \nquit \n" | bc)
  loaddiff="$(echo -n "${one}${diff1_5}")"

  #   Count visible files:
  let files=$(ls -l | grep "^-" | wc -l | tr -d " ")
  let hiddenfiles=$(ls -l -d .* | grep "^-" | wc -l | tr -d " ")
  let executables=$(ls -l | grep ^-..x | wc -l | tr -d " ")
  let directories=$(ls -l | grep "^d" | wc -l | tr -d " ")
  let hiddendirectories=$(ls -l -d .* | grep "^d" | wc -l | tr -d " ")-2
  let linktemp=$(ls -l | grep "^l" | wc -l | tr -d " ")
  if [ "$linktemp" -eq "0" ]
  then
      links=""
  else
      links=" ${linktemp}l"
  fi
  unset linktemp
  let devicetemp=$(ls -l | grep "^[bc]" | wc -l | tr -d " ")
  if [ "$devicetemp" -eq "0" ]
  then
      devices=""
  else
      devices=" ${devicetemp}bc"
  fi
  unset devicetemp

  }

  PROMPT_COMMAND=prompt_command

  function pprom2 {

  local        BLUE="\[\033[0;34m\]"
  local  LIGHT_GRAY="\[\033[0;37m\]"
  local LIGHT_GREEN="\[\033[1;32m\]"
  local  LIGHT_BLUE="\[\033[1;34m\]"
  local  LIGHT_CYAN="\[\033[1;36m\]"
  local      YELLOW="\[\033[1;33m\]"
  local       WHITE="\[\033[1;37m\]"
  local         RED="\[\033[0;31m\]"
  local   NO_COLOUR="\[\033[0m\]"

  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

  PS1="$TITLEBAR\
  $BLUE[$RED\$(date +%H%M)$BLUE]\
  $BLUE[$RED\u@\h$BLUE]\
  $BLUE[\
  $LIGHT_GRAY\${files}.\${hiddenfiles}-\
  $LIGHT_GREEN\${executables}x \
  $LIGHT_GRAY(\${TotalMeg}Mb) \
  $LIGHT_BLUE\${directories}.\
  \${hiddendirectories}d\
  $LIGHT_CYAN\${links}\
  $YELLOW\${devices}\
  $BLUE]\
  $BLUE[${WHITE}\${loaddiff}$BLUE]\
  $BLUE[\
  $WHITE\$(ps ax | wc -l | sed -e \"s: ::g\")proc\
  $BLUE]\
  \n\
  $BLUE[$RED\$PWD$BLUE]\
  $WHITE\$\
  \
  $NO_COLOUR "
  PS2='> '
  PS4='+ '
  }
  ______________________________________________________________________



  12.5.  Prompt Depending on Connection Type

  Bradley M Alexander (storm@tux.org) had the excellent idea of
  reminding his users what kind of connection they were using to his
  machine(s), so he colour-codes prompts dependent on connection type.
  Here's the bashrc he supplied to me:



  ______________________________________________________________________

  # /etc/bashrc

  # System wide functions and aliases
  # Environment stuff goes in /etc/profile

  # For some unknown reason bash refuses to inherit
  # PS1 in some circumstances that I can't figure out.
  # Putting PS1 here ensures that it gets loaded every time.

  # Set up prompts. Color code them for logins. Red for root, white for
  # user logins, green for ssh sessions, cyan for telnet,
  # magenta with red "(ssh)" for ssh + su, magenta for telnet.
  THIS_TTY=tty`ps aux | grep $$ | grep bash | awk '{ print $7 }'`
  SESS_SRC=`who | grep $THIS_TTY | awk '{ print $6 }'`

  SSH_FLAG=0
  SSH_IP=`echo $SSH_CLIENT | awk '{ print $1 }'`
  if [ $SSH_IP ] ; then
    SSH_FLAG=1
  fi
  SSH2_IP=`echo $SSH2_CLIENT | awk '{ print $1 }'`
  if [ $SSH2_IP ] ; then
    SSH_FLAG=1
  fi
  if [ $SSH_FLAG -eq 1 ] ; then
    CONN=ssh
  elif [ -z $SESS_SRC ] ; then
    CONN=lcl
  elif [ $SESS_SRC = "(:0.0)" -o $SESS_SRC = "" ] ; then
    CONN=lcl
  else
    CONN=tel
  fi

  # Okay...Now who we be?
  if [ `/usr/bin/whoami` = "root" ] ; then
    USR=priv
  else
    USR=nopriv
  fi

  #Set some prompts...
  if [ $CONN = lcl -a $USR = nopriv ] ; then
    PS1="[\u \W]\\$ "
  elif [ $CONN = lcl -a $USR = priv ] ; then
    PS1="\[\033[01;31m\][\w]\\$\[\033[00m\] "
  elif [ $CONN = tel -a $USR = nopriv ] ; then
    PS1="\[\033[01;34m\][\u@\h \W]\\$\[\033[00m\] "
  elif [ $CONN = tel -a $USR = priv ] ; then
    PS1="\[\033[01;30;45m\][\u@\h \W]\\$\[\033[00m\] "
  elif [ $CONN = ssh -a $USR = nopriv ] ; then
    PS1="\[\033[01;32m\][\u@\h \W]\\$\[\033[00m\] "
  elif [ $CONN = ssh -a $USR = priv ] ; then
    PS1="\[\033[01;35m\][\u@\h \W]\\$\[\033[00m\] "
  fi

  # PS1="[\u@\h \W]\\$ "
  export PS1
  alias which="type -path"
  alias dir="ls -lF --color"
  alias dirs="ls -lFS --color"
  alias h=history
  ______________________________________________________________________

  12.6.  A Prompt the Width of Your Term

  A friend complained that he didn't like having a prompt that kept
  changing size because it had $PWD in it, so I wrote this prompt that
  adjusts its size to exactly the width of your term, with the working
  directory on the top line of two.



  ______________________________________________________________________

  #!/bin/bash

  #   termwide prompt
  #      by Giles - created 2 November 98
  #
  #   The idea here is to have the upper line of this two line prompt
  #   always be the width of your term.  Do this by calculating the
  #   width of the text elements, and putting in fill as appropriate
  #   or left-truncating $PWD.
  #

  function prompt_command {

  TERMWIDTH=${COLUMNS}

  #   Calculate the width of the prompt:

  hostnam=$(echo -n $HOSTNAME | sed -e "s/[\.].*//")
  #   "whoami" and "pwd" include a trailing newline
  usernam=$(whoami)
  let usersize=$(echo -n $usernam | wc -c | tr -d " ")
  newPWD="${PWD}"
  let pwdsize=$(echo -n ${newPWD} | wc -c | tr -d " ")
  #   Add all the accessories below ...
  let promptsize=$(echo -n "--(${usernam}@${hostnam})---(${PWD})--" \
                   | wc -c | tr -d " ")
  let fillsize=${TERMWIDTH}-${promptsize}
  fill=""
  while [ "$fillsize" -gt "0" ]
  do
     fill="${fill}-"
     let fillsize=${fillsize}-1
  done

  if [ "$fillsize" -lt "0" ]
  then
     let cut=3-${fillsize}
     newPWD="...$(echo -n $PWD | sed -e "s/\(^.\{$cut\}\)\(.*\)/\2/")"
  fi
  }

  PROMPT_COMMAND=prompt_command

  function termwide {

  local GRAY="\[\033[1;30m\]"
  local LIGHT_GRAY="\[\033[0;37m\]"
  local WHITE="\[\033[1;37m\]"
  local NO_COLOUR="\[\033[0m\]"

  local LIGHT_BLUE="\[\033[1;34m\]"
  local YELLOW="\[\033[1;33m\]"

  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

  PS1="$TITLEBAR\
  $YELLOW-$LIGHT_BLUE-(\
  $YELLOW\${usernam}$LIGHT_BLUE@$YELLOW\${hostnam}\
  ${LIGHT_BLUE})-${YELLOW}-\${fill}${LIGHT_BLUE}-(\
  $YELLOW\${newPWD}\
  $LIGHT_BLUE)-$YELLOW-\
  \n\
  $YELLOW-$LIGHT_BLUE-(\
  $YELLOW\$(date +%H%M)$LIGHT_BLUE:$YELLOW\$(date \"+%a,%d %b %y\")\
  $LIGHT_BLUE:$WHITE\$$LIGHT_BLUE)-\
  $YELLOW-\
  $NO_COLOUR "

  PS2="$LIGHT_BLUE-$YELLOW-$YELLOW-$NO_COLOUR "

  }
  ______________________________________________________________________



  12.7.  The Elegant Useless Clock Prompt

  This is one of the more attractive (and useless) prompts I've made.
  Because many X terminal emulators don't implement cursor position save
  and restore, the alternative when putting a clock in the upper right
  corner is to anchor the cursor at the bottom of the terminal.  This
  builds on the idea of the "termwide" prompt above, drawing a line up
  the right side of the screen from the prompt to the clock.  A VGA font
  is required.


  Note: There is an odd substitution in here, that may not print
  properly being translated from SGML to other formats: I had to
  substitute the screen character for \304 - I would normally have just
  included the sequence "\304", but it was necessary to make this
  substitution in this case.



  ______________________________________________________________________

  #!/bin/bash

  #   This prompt requires a VGA font.  The prompt is anchored at the bottom
  #   of the terminal, fills the width of the terminal, and draws a line up
  #   the right side of the terminal to attach itself to a clock in the upper
  #   right corner of the terminal.

  function prompt_command {
  #   Calculate the width of the prompt:
  hostnam=$(echo -n $HOSTNAME | sed -e "s/[\.].*//")
  #   "whoami" and "pwd" include a trailing newline
  usernam=$(whoami)
  newPWD="${PWD}"
  #   Add all the accessories below ...
  let promptsize=$(echo -n "--(${usernam}@${hostnam})---(${PWD})-----" \
                   | wc -c | tr -d " ")
  #   Figure out how much to add between user@host and PWD (or how much to
  #   remove from PWD)
  let fillsize=${COLUMNS}-${promptsize}
  fill=""
  #   Make the filler if prompt isn't as wide as the terminal:
  while [ "$fillsize" -gt "0" ]
  do
     fill="${fill}"
     # The A with the umlaut over it (it will appear as a long dash if
     # you're using a VGA font) is \304, but I cut and pasted it in
     # because Bash will only do one substitution - which in this case is
     # putting $fill in the prompt.
     let fillsize=${fillsize}-1
  done
  #   Right-truncate PWD if the prompt is going to be wider than the terminal:
  if [ "$fillsize" -lt "0" ]
  then
     let cutt=3-${fillsize}
     newPWD="...$(echo -n $PWD | sed -e "s/\(^.\{$cutt\}\)\(.*\)/\2/")"
  fi
  #
  #   Create the clock and the bar that runs up the right side of the term
  #
  local LIGHT_BLUE="\033[1;34m"
  local     YELLOW="\033[1;33m"
  #   Position the cursor to print the clock:
  echo -en "\033[2;$((${COLUMNS}-9))H"
  echo -en "$LIGHT_BLUE($YELLOW$(date +%H%M)$LIGHT_BLUE)\304$YELLOW\304\304\277"
  local i=${LINES}
  echo -en "\033[2;${COLUMNS}H"
  #   Print vertical dashes down the side of the terminal:
  while [ $i -ge 4 ]
  do
     echo -en "\033[$(($i-1));${COLUMNS}H\263"
     let i=$i-1
  done

  let prompt_line=${LINES}-1
  #   This is needed because doing \${LINES} inside a Bash mathematical
  #   expression (ie. $(())) doesn't seem to work.
  }

  PROMPT_COMMAND=prompt_command

  function clock3 {
  local LIGHT_BLUE="\[\033[1;34m\]"
  local     YELLOW="\[\033[1;33m\]"
  local      WHITE="\[\033[1;37m\]"
  local LIGHT_GRAY="\[\033[0;37m\]"
  local  NO_COLOUR="\[\033[0m\]"

  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

  PS1="$TITLEBAR\
  \[\033[\${prompt_line};0H\]
  $YELLOW\332$LIGHT_BLUE\304(\
  $YELLOW\${usernam}$LIGHT_BLUE@$YELLOW\${hostnam}\
  ${LIGHT_BLUE})\304${YELLOW}\304\${fill}${LIGHT_BLUE}\304(\
  $YELLOW\${newPWD}\
  $LIGHT_BLUE)\304$YELLOW\304\304\304\331\
  \n\
  $YELLOW\300$LIGHT_BLUE\304(\
  $YELLOW\$(date \"+%a,%d %b %y\")\
  $LIGHT_BLUE:$WHITE\$$LIGHT_BLUE)\304\
  $YELLOW\304\
  $LIGHT_GRAY "

  PS2="$LIGHT_BLUE\304$YELLOW\304$YELLOW\304$NO_COLOUR "

  }
  ______________________________________________________________________



  Linux Benchmarking HOWTO
  by Andr D. Balsa, andrewbalsa@usa.net  <mailto:andrew-
  balsa@usa.net>
  v0.12, 15 August 1997

  The Linux Benchmarking HOWTO discusses some issues associated with the
  benchmarking of Linux systems and presents a basic benchmarking
  toolkit, as well as an associated form, which enable one to produce
  significant benchmarking information in a couple of hours. Perhaps it
  will also help diminish the amount of useless articles in
  comp.os.linux.hardware...
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Why is benchmarking so important ?
     1.2 Invalid benchmarking considerations

  2. Benchmarking procedures and interpretation of results

     2.1 Understanding benchmarking choices
        2.1.1 Synthetic vs. applications benchmarks
        2.1.2 High-level vs. low-level benchmarks
     2.2 Standard benchmarks available for Linux
     2.3 Links and references

  3. The Linux Benchmarking Toolkit (LBT)

     3.1 Rationale
     3.2 Benchmark selection
     3.3 Test duration
     3.4 Comments
        3.4.1 Kernel 2.0.0 compilation:
        3.4.2 Whetstone:
        3.4.3 Xbench-0.2:
        3.4.4 UnixBench version 4.01:
        3.4.5 BYTE Magazine's BYTEmark benchmarks:
     3.5 Possible improvements
     3.6 LBT Report Form
     3.7 Network performance tests
     3.8 SMP tests

  4. Example run and results

  5. Pitfalls and caveats of benchmarking

     5.1 Comparing apples and oranges
     5.2 Incomplete information
     5.3 Proprietary hardware/software
     5.4 Relevance

  6. FAQ

  7. Copyright, acknowledgments and miscellaneous

     7.1 How this document was produced
     7.2 Copyright
     7.3 New versions of this document
     7.4 Feedback
     7.5 Acknowledgments
     7.6 Disclaimer
     7.7 Trademarks

  ______________________________________________________________________

  1.  Introduction


  "What we cannot speak about we must pass over in silence."

       Ludwig Wittgenstein (1889-1951), Austrian philosopher


  Benchmarking means measuring the speed with which a computer system
  will execute a computing task, in a way that will allow comparison
  between different hard/software combinations. It does not involve
  user-friendliness, aesthetic or ergonomic considerations or any other
  subjective judgment.

  Benchmarking is a tedious, repetitive task, and takes attention to
  details. Very often the results are not what one would expect, and
  subject to interpretation (which actually may be the most important
  part of a benchmarking procedure).

  Finally, benchmarking deals with facts and figures, not opinion or
  approximation.

  1.1.  Why is benchmarking so important ?


  Apart from the reasons pointed out in the BogoMips Mini-HOWTO (section
  7, paragraph 2), one occasionally is confronted with a limited budget
  and/or minimum performance requirements while putting together a Linux
  box. In other words, when confronted with the following questions:

  o  How do I maximize performance within a given budget ?

  o  How do I minimize costs for a required minimum performance level ?

  o  How do I obtain the best performance/cost ratio (within a given
     budget or given performance requirements)?

  one will have to examine, compare and/or produce benchmarks.
  Minimizing costs with no performance requirements usually involves
  putting together a machine with leftover parts (that old 386SX-16 box
  lying around in the garage will do fine) and does not require
  benchmarks, and maximizing performance with no cost ceiling is not a
  realistic situation (unless one is willing to put a Cray box in
  his/her living room - the leather-covered power supplies around it
  look nice, don't they ?).

  Benchmarking per se is senseless, a waste of time and money; it is
  only meaningful as part of a decision process, i.e. if one has to make
  a choice between two or more alternatives.

  Usually another parameter in the decision process is cost, but it
  could be availability, service, reliability, strategic considerations
  or any other rational, measurable characteristic of a computer system.
  When comparing the performance of different Linux kernel versions, for
  example, stability is almost always more important than speed.

  1.2.  Invalid benchmarking considerations


  Very often read in newsgroups and mailing lists, unfortunately:

  1. Reputation of manufacturer (unmeasurable and meaningless).


  2. Market share of manufacturer (meaningless and irrelevant).

  3. Irrational parameters (for example, superstition or prejudice:
     would you buy a processor labeled 131313ZAP and painted pink ?)

  4. Perceived value (meaningless, unmeasurable and irrational).

  5. Amount of marketing hype: this one is the worst, I guess. I
     personally am fed up with the "XXX inside" or "kkkkkws compatible"
     logos (now the "aaaaaPowered" has joined the band - what next ?).
     IMHO, the billions of dollars spent on such campaigns would be
     better used by research teams on the design of new, faster,
     (cheaper :-) bug-free processors. No amount of marketing hype will
     remove a floating-point bug in the FPU of the brand-new processor
     you just plugged in your motherboard, but an exchange against a
     redesigned processor will.

  6. "You get what you pay for" opinions are just that: opinions. Give
     me the facts, please.

  2.  Benchmarking procedures and interpretation of results


  A few semi-obvious recommendations:

  1. First and foremost, identify your benchmarking goals. What is it
     you are exactly trying to benchmark ? In what way will the
     benchmarking process help later in your decision making ? How much
     time and resources are you willing to put into your benchmarking
     effort ?

  2. Use standard tools. Use a current, stable kernel version, standard,
     current gcc and libc and a standard benchmark. In short, use the
     LBT (see below).

  3. Give a complete description of your setup (see the LBT report form
     below).

  4. Try to isolate a single variable. Comparative benchmarking is more
     informative than "absolute" benchmarking. I cannot stress this
     enough.

  5. Verify your results. Run your benchmarks a few times and verify the
     variations in your results, if any. Unexplained variations will
     invalidate your results.

  6. If you think your benchmarking effort produced meaningful
     information, share it with the Linux community in a precise and
     concise way.

  7. Please forget about BogoMips. I promise myself I shall someday
     implement a very fast ASIC with the BogoMips loop wired in. Then we
     shall see what we shall see !

  2.1.  Understanding benchmarking choices


  2.1.1.  Synthetic vs. applications benchmarks


  Before spending any amount of time on benchmarking chores, a basic
  choice must be made between "synthetic" benchmarks and "applications"
  benchmarks.

  Synthetic benchmarks are specifically designed to measure the
  performance of individual components of a computer system, usually by
  exercising the chosen component to its maximum capacity. An example of
  a well-known synthetic benchmark is the Whetstone suite, originally
  programmed in 1972 by Harold Curnow in FORTRAN (or was that ALGOL ?)
  and still in widespread use nowadays. The Whestone suite will measure
  the floating-point performance of a CPU.

  The main critic that can be made to synthetic benchmarks is that they
  do not represent a computer system's performance in real-life
  situations. Take for example the Whetstone suite: the main loop is
  very short and will easily fit in the primary cache of a CPU, keeping
  the FPU pipeline constantly filled and so exercising the FPU to its
  maximum speed. We cannot really criticize the Whetstone suite if we
  remember it was programmed 25 years ago (its design dates even earlier
  than that !), but we must make sure we interpret its results with
  care, when it comes to benchmarking modern microprocessors.

  Another very important point to note about synthetic benchmarks is
  that, ideally, they should tell us something about a specific aspect
  of the system being tested, independently of all other aspects: a
  synthetic benchmark for Ethernet card I/O throughput should result in
  the same or similar figures whether it is run on a 386SX-16 with 4
  MBytes of RAM or a Pentium 200 MMX with 64 MBytes of RAM. Otherwise,
  the test will be measuring the overall performance of the
  CPU/Motherboard/Bus/Ethernet card/Memory subsystem/DMA combination:
  not very useful since the variation in CPU will cause a greater impact
  than the change in Ethernet network card (this of course assumes we
  are using the same kernel/driver combination, which could cause an
  even greater variation)!

  Finally, a very common mistake is to average various synthetic
  benchmarks and claim that such an average is a good representation of
  real-life performance for any given system.

  Here is a comment on FPU benchmarks quoted with permission from the
  Cyrix Corp. Web site:

       "A Floating Point Unit (FPU) accelerates software designed
       to use floating point mathematics : typically CAD programs,
       spreadsheets, 3D games and design applications. However,
       today's most popular PC applications make use of both float-
       ing point and integer instructions. As a result, Cyrix chose
       to emphasize "parallelism" in the design of the 6x86 proces-
       sor to speed up software that intermixes these two instruc-
       tion types.



       The x86 floating point exception model allows integer
       instructions to issue and complete while a floating point
       instruction is executing. In contrast, a second floating
       point instruction cannot begin execution while a previous
       floating point instruction is executing. To remove the per-
       formance limitation created by the floating point exception
       model, the 6x86 can speculatively issue up to four floating
       point instructions to the on-chip FPU while continuing to
       issue and execute integer instructions. As an example, in a
       code sequence of two floating point instructions (FLTs) fol-
       lowed by six integer instructions (INTs) followed by two
       FLTs, the 6x86 processor can issue all ten instructions to
       the appropriate execution units prior to completion of the
       first FLT. If none of the instructions fault (the typical
       case), execution continues with both the integer and float-
       ing point units completing instructions in parallel. If one
       of the FLTs faults (the atypical case), the speculative exe-
       cution capability of the 6x86 allows the processor state to
       be restored in such a way that it is compatible with the x86
  floating point exception model.



       Examination of benchmark tests reveals that synthetic float-
       ing point benchmarks use a pure floating point-only code
       stream not found in real-world applications. This type of
       benchmark does not take advantage of the speculative execu-
       tion capability of the 6x86 processor. Cyrix believes that
       non-synthetic benchmarks based on real-world applications
       better reflect the actual performance users will achieve.
       Real-world applications contain intermixed integer and
       floating point instructions and therefore benefit from the
       6x86 speculative execution capability."


  So, the recent trend in benchmarking is to choose common applications
  and use them to test the performance of complete computer systems. For
  example, SPEC, the non-profit corporation that designed the well-known
  SPECINT and SPECFP synthetic benchmark suites, has launched a project
  for a new applications benchmark suite. But then again, it is very
  unlikely that such commercial benchmarks will ever include any Linux
  code.

  Summarizing, synthetic benchmarks are valid as long as you understand
  their purposes and limitations. Applications benchmarks will better
  reflect a computer system's performance, but none are available for
  Linux.

  2.1.2.  High-level vs. low-level benchmarks


  Low-level benchmarks will directly measure the performance of the
  hardware: CPU clock, DRAM and cache SRAM cycle times, hard disk
  average access time, latency, track-to-track stepping time, etc...
  This can be useful in case you bought a system and are wondering what
  components it was built with, but a better way to check these figures
  would be to open the case, list whatever part numbers you can find and
  somehow obtain the data sheet for each part (usually on the Web).

  Another use for low-level benchmarks is to check that a kernel driver
  was correctly configured for a specific piece of hardware: if you have
  the data sheet for the component, you can compare the results of the
  low-level benchmarks to the theoretical, printed specs.

  High-level benchmarks are more concerned with the performance of the
  hardware/driver/OS combination for a specific aspect of a
  microcomputer system, for example file I/O performance, or even for a
  specific hardware/driver/OS/application performance, e.g. an Apache
  benchmark on different microcomputer systems.

  Of course, all low-level benchmarks are synthetic. High-level
  benchmarks may be synthetic or applications benchmarks.

  2.2.  Standard benchmarks available for Linux


  IMHO a simple test that anyone can do while upgrading any component in
  his/her Linux box is to launch a kernel compile before and after the
  hard/software upgrade and compare compilation times. If all other
  conditions are kept equal then the test is valid as a measure of
  compilation performance and one can be confident to say that:

       "Changing A to B led to an improvement of x % in the compile
       time of the Linux kernel under such and such conditions".

  No more, no less !

  Since kernel compilation is a very usual task under Linux, and since
  it exercises most functions that get exercised by normal benchmarks
  (except floating-point performance), it constitutes a rather good
  individual test. In most cases, however, results from such a test
  cannot be reproduced by other Linux users because of variations in
  hard/software configurations and so this kind of test cannot be used
  as a "yardstick" to compare dissimilar systems (unless we all agree on
  a standard kernel to compile - see below).

  Unfortunately, there are no Linux-specific benchmarking tools, except
  perhaps the Byte Linux Benchmarks which are a slightly modified
  version of the Byte Unix Benchmarks dating back from May 1991 (Linux
  mods by Jon Tombs, original authors Ben Smith, Rick Grehan and Tom
  Yager).

  There is a central Web site for the Byte Linux Benchmarks.

  An improved, updated version of the Byte Unix Benchmarks was put
  together by David C. Niemi. It is called UnixBench 4.01 to avoid
  confusion with earlier versions. Here is what David wrote about his
  mods:

       "The original and slightly modified BYTE Unix benchmarks are
       broken in quite a number of ways which make them an unusu-
       ally unreliable indicator of system performance. I inten-
       tionally made my "index" values look a lot different to
       avoid confusion with the old benchmarks."


  David has setup a majordomo mailing list for discussion of
  benchmarking on Linux and competing OSs. Join with "subscribe bench"
  sent in the body of a message to majordomo@wauug.erols.com
  <mailto:majordomo@wauug.erols.com>. The Washington Area Unix User
  Group is also in the process of setting up a  Web site for Linux
  benchmarks.

  Also recently, Uwe F. Mayer, mayer@math.vanderbilt.edu
  <mailto:mayer@math.vanderbilt.edu>ported the BYTE Bytemark suite to
  Linux. This is a modern suite carefully put together by Rick Grehan at
  BYTE Magazine to test the CPU, FPU and memory system performance of
  modern microcomputer systems (these are strictly processor-performance
  oriented benchmarks, no I/O or system performance is taken into
  account).

  Uwe has also put together a Web site with a database of test results
  for his version of the Linux BYTEmark benchmarks.

  While searching for synthetic benchmarks for Linux, you will notice
  that sunsite.unc.edu carries few benchmarking tools. To test the
  relative speed of X servers and graphics cards, the xbench-0.2 suite
  by Claus Gittinger is available from sunsite.unc.edu, ftp.x.org and
  other sites. Xfree86.org refuses (wisely) to carry or recommend any
  benchmarks.

  The XFree86-benchmarks Survey is a Web site with a database of x-bench
  results.

  For pure disk I/O throughput, the hdparm program (included with most
  distributions, otherwise available from sunsite.unc.edu) will measure
  transfer rates if called with the -t and -T switches.

  There are many other tools freely available on the Internet to test
  various performance aspects of your Linux box.

  2.3.  Links and references


  The comp.benchmarks.faq by Dave Sill is the standard reference for
  benchmarking. It is not Linux specific, but recommended reading for
  anybody serious about benchmarking. It is available from a number of
  FTP and web sites and lists 56 different benchmarks, with links to FTP
  or Web sites that carry them. Some of the benchmarks listed are
  commercial (SPEC for example), though.

  I will not go through each one of the benchmarks mentionned in the
  comp.benchmarks.faq, but there is at least one low-level suite which I
  would like to comment on: the  lmbench suite, by Larry McVoy. Quoting
  David C. Niemi:

       "Linus and David Miller use this a lot because it does some
       useful low-level measurements and can also measure network
       throughput and latency if you have 2 boxes to test with. But
       it does not attempt to come up with anything like an overall
       "figure of merit"..."


  A rather complete FTP site for freely available benchmarks was put
  together by Alfred Aburto. The Whetstone suite used in the LBT can be
  found at this site.

  There is a multipart FAQ by Eugene Miya that gets posted regularly to
  comp.benchmarks; it is an excellent reference.

  3.  The Linux Benchmarking Toolkit (LBT)


  I will propose a basic benchmarking toolkit for Linux. This is a
  preliminary version of a comprehensive Linux Benchmarking Toolkit, to
  be expanded and improved. Take it for what it's worth, i.e. as a
  proposal. If you don't think it is a valid test suite, feel free to
  email me your critics and I will be glad to make the changes and
  improve it if I can. Before getting into an argument, however, read
  this HOWTO and the mentionned references: informed criticism is
  welcomed, empty criticism is not.

  3.1.  Rationale


  This is just common sense:

  1. It should not take a whole day to run. When it comes to comparative
     benchmarking (various runs), nobody wants to spend days trying to
     figure out the fastest setup for a given system. Ideally, the
     entire benchmark set should take about 15 minutes to complete on an
     average machine.

  2. All source code for the software used must be freely available on
     the Net, for obvious reasons.

  3. Benchmarks should provide simple figures reflecting the measured
     performance.

  4. There should be a mix of synthetic benchmarks and application
     benchmarks (with separate results, of course).

  5. Each synthetic benchmarks should exercise a particular subsystem to
     its maximum capacity.

  6. Results of synthetic benchmarks should not be averaged into a
     single figure of merit (that defeats the whole idea behind
     synthetic benchmarks, with considerable loss of information).

  7. Applications benchmarks should consist of commonly executed tasks
     on Linux systems.

  3.2.  Benchmark selection


  I have selected five different benchmark suites, trying as much as
  possible to avoid overlap in the tests:

  1. Kernel 2.0.0 (default configuration) compilation using gcc.

  2. Whetstone version 10/03/97 (latest version by Roy Longbottom).

  3. xbench-0.2 (with fast execution parameters).

  4. UnixBench benchmarks version 4.01 (partial results).

  5. BYTE Magazine's BYTEmark benchmarks beta release 2 (partial
     results).

  For tests 4 and 5, "(partial results)" means that not all results
  produced by these benchmarks are considered.

  3.3.  Test duration


  1. Kernel 2.0.0 compilation: 5 - 30 minutes, depending on the real
     performance of your system.

  2. Whetstone: 100 seconds.

  3. Xbench-0.2: < 1 hour.

  4. UnixBench benchmarks version 4.01: approx. 15 minutes.

  5. BYTE Magazine's BYTEmark benchmarks: approx. 10 minutes.

  3.4.  Comments


  3.4.1.  Kernel 2.0.0 compilation:


  o  What: it is the only application benchmark in the LBT.

  o  The code is widely available (i.e. I finally found some use for my
     old Linux CD-ROMs).

  o  Most linuxers recompile the kernel quite often, so it is a
     significant measure of overall performance.

  o  The kernel is large and gcc uses a large chunk of memory:
     attenuates L2 cache size bias with small tests.

  o  It does frequent I/O to disk.

  o  Test procedure: get a pristine 2.0.0 source, compile with default
     options (make config, press Enter repeatedly). The reported time
     should be the time spent on compilation i.e. after you type make
     zImage, not including make dep, make clean. Note that the default
     target architecture for the kernel is the i386, so if compiled on
     another architecture, gcc too should be set to cross-compile, with
     i386 as the target architecture.

  o  Results: compilation time in minutes and seconds (please don't
     report fractions of seconds).

  3.4.2.  Whetstone:


  o  What: measures pure floating point performance with a short, tight
     loop. The source (in C) is quite readable and it is very easy to
     see which floating-point operations are involved.

  o  Shortest test in the LBT :-).

  o  It's an "Old Classic" test: comparable figures are available, its
     flaws and shortcomings are well known.

  o  Test procedure: the newest C source should be obtained from
     Aburto's site. Compile and run in double precision mode. Specify
     gcc and -O2 as precompiler and precompiler options, and define
     POSIX 1 to specify machine type.

  o  Results: a floating-point performance figure in MWIPS.

  3.4.3.  Xbench-0.2:


  o  What: measures X server performance.

  o  The xStones measure provided by xbench is a weighted average of
     several tests indexed to an old Sun station with a single-bit-depth
     display. Hmmm... it is questionable as a test of modern X servers,
     but it's still the best tool I have found.

  o  Test procedure: compile with -O2. We specify a few options for a
     shorter run: ./xbench -timegoal 3 >
     results/name_of_your_linux_box.out. To get the xStones rating, we
     must run an awk script; the simplest way is to type make
     summary.ms. Check the summary.ms file: the xStone rating for your
     system is in the last column of the line with your machine name
     specified during the test.

  o  Results: an X performance figure in xStones.

  o  Note: this test, as it stands, is outdated. It should be re-coded.

  3.4.4.  UnixBench version 4.01:


  o  What: measures overall Unix performance. This test will exercice
     the file I/O and kernel multitasking performance.

  o  I have discarded all arithmetic test results, keeping only the
     system-related test results.

  o  Test procedure: make with -O2. Execute with ./Run -1 (run each test
     once). You will find the results in the ./results/report file.
     Calculate the geometric mean of the EXECL THROUGHPUT, FILECOPY 1,
     2, 3, PIPE THROUGHPUT, PIPE-BASED CONTEXT SWITCHING, PROCESS
     CREATION, SHELL SCRIPTS and SYSTEM CALL OVERHEAD indexes.

  o  Results: a system index.

  3.4.5.  BYTE Magazine's BYTEmark benchmarks:


  o  What: provides a good measure of CPU performance. Here is an
     excerpt from the documentation: "These benchmarks are meant to
     expose the theoretical upper limit of the CPU, FPU, and memory
     architecture of a system. They cannot measure video, disk, or
     network throughput (those are the domains of a different set of
     benchmarks). You should, therefore, use the results of these tests
     as part, not all, of any evaluation of a system."

  o  I have discarded the FPU test results since the Whetstone test is
     just as representative of FPU performance.

  o  I have split the integer tests in two groups: those more
     representative of memory-cache-CPU performance and the CPU integer
     tests.

  o  Test procedure: make with -O2. Run the test with ./nbench >
     myresults.dat or similar. Then, from myresults.dat, calculate
     geometric mean of STRING SORT, ASSIGNMENT and BITFIELD test
     indexes; this is the memory index; calculate the geometric mean of
     NUMERIC SORT, IDEA, HUFFMAN and FP EMULATION test indexes; this is
     the integer index.

  o  Results: a memory index and an integer index calculated as
     explained above.

  3.5.  Possible improvements


  The ideal benchmark suite would run in a few minutes, with synthetic
  benchmarks testing every subsystem separately and applications
  benchmarks providing results for different applications. It would also
  automatically generate a complete report and eventually email the
  report to a central database on the Web.

  We are not really interested in portability here, but it should at
  least run on all recent (> 2.0.0) versions and flavours (i386, Alpha,
  Sparc...) of Linux.

  If anybody has any idea about benchmarking network performance in a
  simple, easy and reliable way, with a short (less than 30 minutes to
  setup and run) test, please contact me.

  3.6.  LBT Report Form


  Besides the tests, the benchmarking procedure would not be complete
  without a form describing the setup, so here it is (following the
  guidelines from comp.benchmarks.faq):

  ______________________________________________________________________
  LINUX BENCHMARKING TOOLKIT REPORT FORM
  ______________________________________________________________________



  ______________________________________________________________________
  CPU
  ==
  Vendor:
  Model:
  Core clock:
  Motherboard vendor:
  Mbd. model:
  Mbd. chipset:
  Bus type:
  Bus clock:
  Cache total:
  Cache type/speed:
  SMP (number of processors):
  ______________________________________________________________________



  ______________________________________________________________________
  RAM
  ====
  Total:
  Type:
  Speed:
  ______________________________________________________________________



  ______________________________________________________________________
  Disk
  ====
  Vendor:
  Model:
  Size:
  Interface:
  Driver/Settings:
  ______________________________________________________________________



  ______________________________________________________________________
  Video board
  ===========
  Vendor:
  Model:
  Bus:
  Video RAM type:
  Video RAM total:
  X server vendor:
  X server version:
  X server chipset choice:
  Resolution/vert. refresh rate:
  Color depth:
  ______________________________________________________________________



  ______________________________________________________________________
  Kernel
  =====
  Version:
  Swap size:
  ______________________________________________________________________



  ______________________________________________________________________
  gcc
  ===
  Version:
  Options:
  libc version:
  ______________________________________________________________________



  ______________________________________________________________________
  Test notes
  ==========
  ______________________________________________________________________



  ______________________________________________________________________
  RESULTS
  ========
  Linux kernel 2.0.0 Compilation Time: (minutes and seconds)
  Whetstones: results are in MWIPS.
  Xbench: results are in xstones.
  Unixbench Benchmarks 4.01 system INDEX:
  BYTEmark integer INDEX:
  BYTEmark memory INDEX:
  ______________________________________________________________________



  ______________________________________________________________________
  Comments*
  =========
  * This field is included for possible interpretations of the results, and as
  such, it is optional. It could be the most significant part of your report,
  though, specially if you are doing comparative benchmarking.
  ______________________________________________________________________



  3.7.  Network performance tests


  Testing network performance is a challenging task since it involves at
  least two machines, a server and a client machine, hence twice the
  time to setup and many more variables to control, etc... On an
  ethernet network, I guess your best bet would be the ttcp package. (to
  be expanded)

  3.8.  SMP tests


  SMP tests are another challenge, and any benchmark specifically
  designed for SMP testing will have a hard time proving itself valid in
  real-life settings, since algorithms that can take advantage of SMP
  are hard to come by. It seems later versions of the Linux kernel (>
  2.1.30 or around that) will do "fine-grained" multiprocessing, but I
  have no more information than that for the moment.

  According to David Niemi, " ... shell8 [part of the Unixbench 4.01
  benchmaks]does a good job at comparing similar hardware/OS in SMP and
  UP modes."



  4.  Example run and results


  The LBT was run on my home machine, a Pentium-class Linux box that I
  put together myself and that I used to write this HOWTO. Here is the
  LBT Report Form for this system:

  LINUX BENCHMARKING TOOLKIT REPORT FORM



  CPU



  ==



  Vendor: Cyrix/IBM



  Model: 6x86L P166+



  Core clock: 133 MHz



  Motherboard vendor: Elite Computer Systems (ECS)



  Mbd. model: P5VX-Be



  Mbd. chipset: Intel VX



  Bus type: PCI



  Bus clock: 33 MHz



  Cache total: 256 KB



  Cache type/speed: Pipeline burst 6 ns



  SMP (number of processors): 1



  RAM


  ====



  Total: 32 MB



  Type: EDO SIMMs



  Speed: 60 ns



  Disk



  ====



  Vendor: IBM



  Model: IBM-DAQA-33240



  Size: 3.2 GB



  Interface: EIDE



  Driver/Settings: Bus Master DMA mode 2



  Video board



  ===========



  Vendor: Generic S3



  Model: Trio64-V2



  Bus: PCI



  Video RAM type: EDO DRAM

  Video RAM total: 2 MB



  X server vendor: XFree86



  X server version: 3.3



  X server chipset choice: S3 accelerated



  Resolution/vert. refresh rate: 1152x864 @ 70 Hz



  Color depth: 16 bits



  Kernel



  =====



  Version: 2.0.29



  Swap size: 64 MB



  gcc



  ===



  Version: 2.7.2.1



  Options: -O2



  libc version: 5.4.23



  Test notes



  ==========

  Very light load. The above tests were run with some of the special
  Cyrix/IBM 6x86 features enabled with the setx86 program: fast ADS,
  fast IORT, Enable DTE, fast LOOP, fast Lin. VidMem.



  RESULTS



  ========



  Linux kernel 2.0.0 Compilation Time: 7m12s



  Whetstones: 38.169 MWIPS.



  Xbench: 97243 xStones.



  BYTE Unix Benchmarks 4.01 system INDEX: 58.43



  BYTEmark integer INDEX: 1.50



  BYTEmark memory INDEX: 2.50



  Comments



  =========



  This is a very stable system with homogeneous performance, ideal
  for home use and/or Linux development. I will report results
  with a 6x86MX processor as soon as I can get my hands on one!



  5.  Pitfalls and caveats of benchmarking


  After putting together this HOWTO I began to understand why the words
  "pitfalls" and "caveats" are so often associated with benchmarking...

  5.1.  Comparing apples and oranges


  Or should I say Apples and PCs ? This is so obvious and such an old
  dispute that I won't go into any details. I doubt the time it takes to
  load Word on a Mac compared to an average Pentium is a real measure of
  anything. Likewise booting Linux and Windows NT, etc... Try as much as
  possible to compare identical machines with a single modification.
  5.2.  Incomplete information


  A single example will illustrate this very common mistake. One often
  reads in comp.os.linux.hardware the following or similar statement: "I
  just plugged in processor XYZ running at nnn MHz and now compiling the
  linux kernel only takes i minutes" (adjust XYZ, nnn and i as
  required). This is irritating, because no other information is given,
  i.e. we don't even know the amount of RAM, size of swap, other tasks
  running simultaneously, kernel version, modules selected, hard disk
  type, gcc version, etc... I recommend you use the LBT Report Form,
  which at least provides a standard information framework.

  5.3.  Proprietary hardware/software


  A well-known processor manufacturer once published results of
  benchmarks produced by a special, customized version of gcc. Ethical
  considerations apart, those results were meaningless, since 100% of
  the Linux community would go on using the standard version of gcc. The
  same goes for proprietary hardware. Benchmarking is much more useful
  when it deals with off-the-shelf hardware and free (in the GNU/GPL
  sense) software.

  5.4.  Relevance


  We are talking Linux, right ? So we should forget about benchmarks
  produced on other operating systems (this is a special case of the
  "Comparing apples and oranges" pitfall above). Also, if one is going
  to benchmark Web server performance, do not quote FPU performance and
  other irrelevant information. In such cases, less is more. Also, you
  do not need to mention the age of your cat, your mood while
  benchmarking, etc..

  6.  FAQ


     Q1.
        Is there any single figure of merit for Linux systems ?

     A: No, thankfully nobody has yet come up with a Lhinuxstone (tm)
        measurement. And if there was one, it would not make much sense:
        Linux systems are used for many different tasks, from heavily
        loaded Web servers to graphics workstations for individual use.
        No single figure of merit can describe the performance of a
        Linux system under such different situations.

     Q2.
        Then, how about a dozen figures summarizing the performance of
        diverse Linux systems ?

     A: That would be the ideal situation. I would like to see that come
        true. Anybody volunteers for a Linux Benchmarking Project ? With
        a Web site and an on-line, complete, well-designed reports
        database ?

     Q3.
        ... BogoMips ... ?

     A: BogoMips has nothing to do with the performance of your system.
        Check the BogoMips Mini-HOWTO.

     Q4.
        What is the "best" benchmark for Linux ?

     A: It all depends on which performance aspect of a Linux system one
        wants to measure. There are different benchmarks to measure the
        network (Ethernet sustained transfer rates), file server (NFS),
        disk I/O, FPU, integer, graphics, 3D, processor-memory
        bandwidth, CAD performance, transaction time, SQL performance,
        Web server performance, real-time performance, CD-ROM
        performance, Quake performance (!), etc ... AFAIK no bechmark
        suite exists for Linux that supports all these tests.

     Q5.
        What is the fastest processor under Linux ?

     A: Fastest at what task ? If one is heavily number-crunching
        oriented, a very high clock rate Alpha (600 MHz and going)
        should be faster than anything else, since Alphas have been
        designed for that kind of performance. If, on the other hand,
        one wants to put together a very fast news server, it is
        probable that the choice of a fast hard disk subsystem and lots
        of RAM will result in higher performance improvements than a
        change of processor, for the same amount of $.

     Q6.
        Let me rephrase the last question, then: is there a processor
        that is fastest for general purpose applications ?

     A: This is a tricky question but it takes a very simple answer: NO.
        One can always design a faster system even for general purpose
        applications, independent of the processor. Usually, all other
        things being equal, higher clock rates will result in higher
        performance systems (and more headaches too). Taking out an old
        100 MHz Pentium from an (usually not) upgradable motherboard,
        and plugging in the 200 MHz version, one should feel the extra
        "hummph". Of course, with only 16 MBytes of RAM, the same
        investment would have been more wisely spent on extra SIMMs...

     Q7.
        So clock rates influence the performance of a system ?

     A: For most tasks except for NOP empty loops (BTW these get removed
        by modern optimizing compilers), an increase in clock rate will
        not give you a linear increase in performance. Very small
        processor intensive programs that will fit entirely in the
        primary cache inside the processor (the L1 cache, usually 8 or
        16 K) will have a performance increase equivalent to the clock
        rate increase, but most "true" programs are much larger than
        that, have loops that do not fit in the L1 cache, share the L2
        (external) cache with other processes, depend on external
        components and will give much smaller performance increases.
        This is because the L1 cache runs at the same clock rate as the
        processor, whereas most L2 caches and all other subsystems
        (DRAM, for example) will run asynchronously at lower clock
        rates.

     Q8.
        OK, then, one last question on that matter: which is the
        processor with the best price/performance ratio for general
        purpose Linux use ?

     A: Defining "general purpose Linux use" in not an easy thing ! For
        any particular application, there is always a processor with THE
        BEST price/performance ratio at any given time, but it changes
        rather frequently as manufacturers release new processors, so
        answering Processor XYZ running at n MHz would be a snapshot
        answer. However, the price of the processor is insignificant
        when compared to the price of the whole system one will be
        putting together. So, really, the question should be how can one
        maximize the price/performance ratio for a given system ? And
        the answer to that question depends heavily on the minimum
        performance requirements and/or maximum cost established for the
        configuration being considered. Sometimes, off-the-shelf
        hardware will not meet minimum performance requirements and
        expensive RISC systems will be the only alternative. For home
        use, I recommend a balanced, homogeneous system for overall
        performance (now go figure what I mean by balanced and
        homogeneous :-); the choice of a processor is an important
        decision , but no more than choosing hard disk type and
        capacity, amount of RAM, video card, etc...

     Q9.
        What is a "significant" increase in performance ?

     A: I would say that anything under 1% is not significant (could be
        described as "marginal"). We, humans, will hardly perceive the
        difference between two systems with a 5 % difference in response
        time. Of course some hard-core benchmarkers are not humans and
        will tell you that, when comparing systems with 65.9 and 66.5
        performance indexes, the later is "definitely faster".

     Q10.
        How do I obtain "significant" increases in performance at the
        lowest cost ?

     A: Since most source code is available for Linux, careful
        examination and algorithmic redesign of key subroutines could
        yield order-of-magnitude increases in performance in some cases.
        If one is dealing with a commercial project and does not wish to
        delve deeply in C source code a Linux consultant should be
        called in. See the Consultants-HOWTO.


  7.  Copyright, acknowledgments and miscellaneous


  7.1.  How this document was produced


  The first step was reading section 4 "Writing and submitting a HOWTO"
  of the HOWTO Index by Tim Bynum.

  I knew absolutely nothing about SGML or LaTeX, but was tempted to use
  an automated documentation generation package after reading the
  various comments about SGML-Tools. However, inserting tags manually in
  a document reminds me of the days I hand-assembled a 512 byte monitor
  program for a now defunct 8-bit microprocessor, so I got hold of the
  LyX sources, compiled it, and used its LinuxDoc mode. Highly
  recommended combination: LyX and SGML-Tools.

  7.2.  Copyright


  The Linux Benchmarking HOWTO is copyright (C) 1997 by Andr D. Balsa.
  Linux HOWTO documents may be reproduced and distributed in whole or in
  part, in any medium physical or electronic, as long as this copyright
  notice is retained on all copies. Commercial redistribution is allowed
  and encouraged; however, the author would like to be notified of any
  such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu via email.

  7.3.  New versions of this document


  New versions of the Linux Benchmarking-HOWTO will be placed on
  sunsite.unc.edu and mirror sites. There are other formats, such as a
  Postscript and dvi version in the other-formats directory. The Linux
  Benchmarking-HOWTO is also available for WWW clients such as Grail, a
  Web browser written in Python. It will also be posted regularly to
  comp.os.linux.answers.

  7.4.  Feedback


  Suggestions, corrections, additions wanted. Contributors wanted and
  acknowledged. Flames not wanted.

  I can always be reached at andrewbalsa@usa.net.

  7.5.  Acknowledgments


  David Niemi, the author of the Unixbench suite, has proved to be an
  endless source of information and (valid) criticism.

  I also want to thank Greg Hankins one of the main contributors to the
  SGML-tools package, Linus Torvalds and the entire Linux community.
  This HOWTO is my way of giving back.

  7.6.  Disclaimer


  Your mileage may, and will, vary. Be aware that benchmarking is a
  touchy subject and a great time-and-energy consuming activity.

  7.7.  Trademarks


  Pentium and Windows NT are trademarks of Intel and Microsoft
  Corporations respectively.

  BYTE and BYTEmark are trademarks of McGraw-Hill, Inc.

  Cyrix and 6x86 are trademarks of Cyrix Corporation.

  Linux is not a trademark, hopefully never will be.



  Beowulf HOWTO
  Jacek Radajewski and Douglas Eadline
  v1.1.1, 22 November 1998

  This document introduces the Beowulf Supercomputer architecture and
  provides background information on parallel programming, including
  links to other more specific documents, and web pages.
  ______________________________________________________________________

  Table of Contents



  1. Preamble

     1.1 Disclaimer
     1.2 Copyright
     1.3 About this HOWTO
     1.4 About the authors
     1.5 Acknowledgements

  2. Introduction

     2.1 Who should read this HOWTO ?
     2.2 What is a Beowulf ?
     2.3 Classification

  3. Architecture Overview

     3.1 What does it look like ?
     3.2 How to utilise the other nodes ?
     3.3 How does Beowulf differ from a COW ?

  4. System Design

     4.1 A brief background on parallel computing.
     4.2 The methods of parallel computing
        4.2.1 Why more than one CPU?
        4.2.2 The Parallel Computing Store
           4.2.2.1 Single-tasking Operating System
           4.2.2.2 Multi-tasking Operating System:
           4.2.2.3 Multitasking Operating Systems with Multiple CPUs:
           4.2.2.4 Threads on a Multitasking Operating Systems extra CPUs
           4.2.2.5 Sending Messages on Multitasking Operating Systems with extra CPUs:
     4.3 Architectures for parallel computing
        4.3.1 Hardware Architectures
        4.3.2 Software API Architectures
           4.3.2.1 Messages
           4.3.2.2 Threads
        4.3.3 Application Architecture
     4.4 Suitability
     4.5 Writing and porting parallel software
        4.5.1 Determine concurrent parts of your program
        4.5.2 Estimate parallel efficiency
        4.5.3 Describing the concurrent parts of your program
           4.5.3.1 Explicit Methods
           4.5.3.2 Implicit Methods

  5. Beowulf Resources

     5.1 Starting Points
     5.2 Documentation
     5.3 Papers
     5.4 Software
     5.5 Beowulf Machines
     5.6 Other Interesting Sites
     5.7 History

  6. Source code

     6.1 sum.c
     6.2 sigmasqrt.c
     6.3 prun.sh


  ______________________________________________________________________



  1.  Preamble

  1.1.  Disclaimer

  We will not accept any responsibility for any incorrect information
  within this document, nor for any damage it might cause when applied.


  1.2.  Copyright

  Copyright (C) 1997 - 1998 Jacek Radajewski and Douglas Eadline.
  Permission to distribute and modify this document is granted under the
  GNU General Public Licence.


  1.3.  About this HOWTO

  Jacek Radajewski started work on this document in November 1997 and
  was soon joined by Douglas Eadline.  Over a few months the Beowulf
  HOWTO grew into a large document, and in August 1998 it was split into
  three documents: Beowulf HOWTO, Beowulf Architecture Design HOWTO, and
  the Beowulf Installation and Administration HOWTO.  Version 1.0.0 of
  the Beowulf HOWTO was released to the Linux Documentation Project on
  11 November 1998.  We hope that this is only the beginning of what
  will become a complete Beowulf Documentation Project.


  1.4.  About the authors


  o  Jacek Radajewski works as a Network Manager, and is studying for an
     honors degree in computer science at the University of Southern
     Queensland, Australia.  Jacek's first contact with Linux was in
     1995 and it was love at first sight.  Jacek built his first Beowulf
     cluster in May 1997 and has been playing with the technology ever
     since, always trying to find new and better ways of setting things
     up.  You can contact Jacek by sending e-mail to jacek@usq.edu.au

  o  Douglas Eadline, Ph.D. is President and Principal Scientist at
     Paralogic, Inc., Bethlehem, PA, USA.  Trained as
     Physical/Analytical Chemist, he has been involved with computers
     since 1978 when he built his first single board computer for use
     with chemical instrumentation.  Dr. Eadline's interests now include
     Linux, Beowulf clusters, and parallel algorithms.  Dr. Eadline can
     be contacted by sending email to deadline@plogic.com


  1.5.  Acknowledgements

  The writing of the Beowulf HOWTO was a long proces and is finally
  complete, thanks to many individuals.  I would like to thank the
  following people for their help and contribution to this HOWTO.

  o  Becky for her love, support, and understanding.

  o  Tom Sterling, Don Becker, and other people at NASA who started the
     Beowulf project.

  o  Thanh Tran-Cong and the Faculty of Engineering and Surveying for
     making the topcat Beowulf machine available for experiments.

  o  My supervisor Christopher Vance for many great ideas.

  o  My friend Russell Waldron for great programming ideas, his general
     interest in the project, and support.

  o  My friend David Smith for proof reading this document.

  o  Many other people on the Beowulf mailing list who provided me with
     feedback and ideas.

  o  All the people who are responsible for the Linux operating system
     and all the other free software packages used on topcat and other
     Beowulf machines.


  2.  Introduction


  As the performance of commodity computer and network hardware
  increase, and their prices decrease, it becomes more and more
  practical to build parallel computational systems from off-the-shelf
  components, rather than buying CPU time on very expensive
  Supercomputers.  In fact, the price per performance ratio of a Beowulf
  type machine is between three to ten times better than that for
  traditional supercomputers.  Beowulf architecture scales well, it is
  easy to construct and you only pay for the hardware as most of the
  software is free.


  2.1.  Who should read this HOWTO ?

  This HOWTO is designed for a person with at least some exposure to the
  Linux operating system.  Knowledge of Beowulf technology or
  understanding of more complex operating system and networking concepts
  is not essential, but some exposure to parallel computing would be
  advantageous (after all you must have some reason to read this
  document).  This HOWTO will not answer all possible questions you
  might have about Beowulf, but hopefully will give you ideas and guide
  you in the right direction.  The purpose of this HOWTO is to provide
  background information, links and references to more advanced
  documents.


  2.2.  What is a Beowulf ?

  Famed was this Beowulf: far flew the boast of him, son of Scyld, in
  the Scandian lands.  So becomes it a youth to quit him well with his
  father's friends, by fee and gift, that to aid him, aged, in after
  days, come warriors willing, should war draw nigh, liegemen loyal: by
  lauded deeds shall an earl have honor in every clan. Beowulf is the
  earliest surviving epic poem written in English.  It is a story about
  a hero of great strength and courage who defeted a monster called
  Grendel.  See ``History'' to find out more about the Beowulf hero.

  There are probably as many Beowulf definitions as there are people who
  build or use Beowulf Supercomputer facilities.  Some claim that one
  can call their system Beowulf only if it is built in the same way as
  the NASA's original machine.  Others go to the other extreme and call
  Beowulf any system of workstations running parallel code.  My
  definition of Beowulf fits somewhere between the two views described
  above, and is based on many postings to the Beowulf mailing list:


  Beowulf is a multi computer architecture which can be used for
  parallel computations.  It is a system which usually consists of one
  server node, and one or more client nodes connected together via
  Ethernet or some other network.  It is a system built using commodity
  hardware components, like any PC capable of running Linux, standard
  Ethernet adapters, and switches.  It does not contain any custom
  hardware components and is trivially reproducible.  Beowulf also uses
  commodity software like the Linux operating system, Parallel Virtual
  Machine (PVM) and Message Passing Interface (MPI).  The server node
  controls the whole cluster and serves files to the client nodes.  It
  is also the cluster's console and gateway to the outside world.  Large
  Beowulf machines might have more than one server node, and possibly
  other nodes dedicated to particular tasks, for example consoles or
  monitoring stations.  In most cases client nodes in a Beowulf system
  are dumb, the dumber the better.  Nodes are configured and controlled
  by the server node, and do only what they are told to do.  In a disk-
  less client configuration, client nodes don't even know their IP
  address or name until the server tells them what it is.  One of the
  main differences between Beowulf and a Cluster of Workstations (COW)
  is the fact that Beowulf behaves more like a single machine rather
  than many workstations.  In most cases client nodes do not have
  keyboards or monitors, and are accessed only via remote login or
  possibly serial terminal.  Beowulf nodes can be thought of as a CPU +
  memory package which can be plugged in to the cluster, just like a CPU
  or memory module can be plugged into a motherboard.


  Beowulf is not a special software package, new network topology or the
  latest kernel hack.  Beowulf is a technology of clustering Linux
  computers to form a parallel, virtual supercomputer.  Although there
  are many software packages such as kernel modifications, PVM and MPI
  libraries, and configuration tools which make the Beowulf architecture
  faster, easier to configure, and much more usable, one can build a
  Beowulf class machine using standard Linux distribution without any
  additional software.  If you have two networked Linux computers which
  share at least the /home file system via NFS, and trust each other to
  execute remote shells (rsh), then it could be argued that you have a
  simple, two node Beowulf machine.



  2.3.  Classification

  Beowulf systems have been constructed from a variety of parts.  For
  the sake of performance some non-commodity components (i.e. produced
  by a single manufacturer) have been employed.   In order to account
  for the different types of systems and to make discussions about
  machines a bit easier, we propose the following simple classification
  scheme:

  CLASS I BEOWULF:

  This class of machines built entirely from commodity "off-the-shelf"
  parts.  We shall use the "Computer Shopper" certification test to
  define commodity "off-the-shelf" parts.  (Computer Shopper is a 1 inch
  thick monthly magazine/catalog of PC systems and components.) The test
  is as follows:

  A CLASS I Beowulf is a machine that can be assembled from parts found
  in at least 3 nationally/globally circulated advertising catalogs.

  The advantages of a CLASS I system are:

  o  hardware is available form multiple sources (low prices, easy
     maintenance)

  o  no reliance on a single hardware vendor

  o  driver support from Linux commodity

  o  usually based on standards (SCSI, Ethernet, etc.)

  The disadvantages of a CLASS I system are:

  o  best performance may require CLASS II hardware

  CLASS II BEOWULF

  A CLASS II Beowulf is simply any machine that does not pass the
  Computer Shopper certification test.  This is not a bad thing.
  Indeed, it is merely a classification of the machine.

  The advantages of a CLASS II system are:

  o  Performance can be quite good!

  The disadvantages of a CLASS II system are:

  o  driver support may vary

  o  reliance on single hardware vendor

  o  may be more expensive than CLASS I systems.

  One CLASS is not necessarily better than the other.  It all depends on
  your needs and budget.  This classification system is only intended to
  make discussions about Beowulf systems a bit more succinct.  The
  "System Design" section may help determine what kind of system is best
  suited for your needs.



  3.  Architecture Overview



  3.1.  What does it look like ?

  I think that the best way of describing the Beowulf supercomputer
  architecture is to use an example which is very similar to the actual
  Beowulf, but familiar to most system administrators.  The example that
  is closest to a Beowulf machine is a Unix computer laboratory with a
  server and a number of clients.  To be more specific I'll use the DEC
  Alpha undergraduate computer laboratory at the Faculty of Sciences,
  USQ as the example.  The server computer is called beldin and the
  client machines are called scilab01, scilab02, scilab03, up to
  scilab20.  All clients have a local copy of the Digital Unix 4.0
  operating system installed, but get the user file space (/home) and
  /usr/local from the server via NFS (Network File System).  Each client
  has an entry for the server and all the other clients in its
  /etc/hosts.equiv file, so all clients can execute a remote shell (rsh)
  to all others.  The server machine is a NIS server for the whole
  laboratory, so account information is the same across all the
  machines.  A person can sit at the scilab02 console, login, and have
  the same environment as if he logged onto the server or scilab15.  The
  reason all the clients have the same look and feel is that the
  operating system is installed and configured in the same way on all
  machines, and both the user's /home and /usr/local areas are
  physically on the server and accessed by the clients via NFS.  For
  more information on NIS and NFS please read the NIS and NFS HOWTOs.



  3.2.  How to utilise the other nodes ?


  Now that we have some idea about the system architecture, let us take
  a look at how we can utilise the available CPU cycles of the machines
  in the computer laboratory.  Any person can logon to any of the
  machines, and run a program in their home directory, but they can also
  spawn the same job on a different machine simply by executing remote
  shell.  For example, assume that we want to calculate the sum of the
  square roots of all integers between 1 and 10 inclusive. We write a
  simple program called sigmasqrt (please see ``source code'') which
  does exactly that.  To calculate the sum of the square roots of
  numbers from 1 to 10 we execute :

  [jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 10
  22.468278

  real    0m0.029s
  user    0m0.001s
  sys     0m0.024s


  The time command allows us to check the wall-clock (the elapsed time)
  of running this job.  As we can see, this example took only a small
  fraction of a second (0.029 sec) to execute, but what if I want to add
  the square root of integers from 1 to 1 000 000 000 ?  Let us try
  this, and again calculate the wall-clock time.


  [jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 1000000000
  21081851083600.559000

  real    16m45.937s
  user    16m43.527s
  sys     0m0.108s



  This time, the execution time of the program is considerably longer.
  The obvious question to ask is what can we do to speed up the
  execution time of the job?  How can we change the way the job is
  running to minimize the wall-clock time of running this job?  The
  obvious answer is to split the job into a number of sub-jobs and to
  run these sub-jobs in parallel on all computers.  We could split one
  big addition task into 20 parts, calculating one range of square roots
  and adding them on each node.  When all nodes finish the calculation
  and return their results, the 20 numbers could be added together to
  obtain the final solution.  Before we run this job we will make a
  named pipe which will be used by all processes to write their results.


  [jacek@beldin sigmasqrt]$ mkfifo output
  [jacek@beldin sigmasqrt]$ ./prun.sh & time cat output | ./sum
  [1] 5085
  21081851083600.941000
  [1]+  Done                    ./prun.sh

  real    0m58.539s
  user    0m0.061s
  sys     0m0.206s



  This time we get about 58.5 seconds.  This is the time from starting
  the job until all the nodes have finished their computations and
  written their results into the pipe.  The time does not include the
  final addition of the twenty numbers, but this time is a very small
  fraction of a second and can be ignored.  We can see that there is a
  significant improvement in running this job in parallel.  In fact the
  parallel job ran about 17 times faster, which is very reasonable for a
  20 fold increase in the number of CPUs.  The purpose of the above
  example is to illustrate the simplest method of parallelising
  concurrent code.  In practice such simple examples are rare and
  different techniques (PVM and PMI APIs) are used to achieve the
  parallelism.



  3.3.  How does Beowulf differ from a COW ?

  The computer laboratory described above is a perfect example of a
  Cluster of Workstations (COW).  So what is so special about Beowulf,
  and how is it different from a COW?  The truth is that there is not
  much difference, but Beowulf does have few unique characteristics.
  First of all, in most cases client nodes in a Beowulf cluster do not
  have keyboards, mice, video cards nor monitors.  All access to the
  client nodes is done via remote connections from the server node,
  dedicated console node, or a serial console.  Because there is no need
  for client nodes to access machines outside the cluster, nor for
  machines outside the cluster to access client nodes directly, it is a
  common practice for the client nodes to use private IP addresses like
  the 10.0.0.0/8 or 192.168.0.0/16 address ranges (RFC 1918
  http://www.alternic.net/rfcs/1900/rfc1918.txt.html).  Usually the only
  machine that is also connected to the outside world using a second
  network card is the server node.  The most common ways of using the
  system is to access the server's console directly, or either telnet or
  remote login to the server node from personal workstation.  Once on
  the server node, users can edit and compile their code, and also spawn
  jobs on all nodes in the cluster.  In most cases COWs are used for
  parallel computations at night, and over weekends when people do not
  actually use the workstations for every day work, thus utilising idle
  CPU cycles.  Beowulf on the other hand is a machine usually dedicated
  to parallel computing, and optimised for this purpose.  Beowulf also
  gives better price/performance ratio as it is built from off-the-shelf
  components and runs mainly free software.  Beowulf has also more
  single system image features which help the users to see the Beowulf
  cluster as a single computing workstation.



  4.  System Design

  Before you purchase any hardware, it may be a good idea to consider
  the design of your system.  There are basically two hardware issues
  involved with design of a Beowulf system: the type of nodes or
  computers you are going to use; and way you connect the computer
  nodes.  There is one software issue that may effect your hardware
  decisions; the communication library or API. A more detailed
  discussion of hardware and communication software is provided later in
  this document.

  While the number of choices is not large, there are some important
  design decisions that must be made when constructing a Beowulf
  systems.  Because the science (or art) of "parallel computing" has
  many different interpretations, an introduction is provided below.  If
  you do not like to read background material, you may skip this
  section, but it is advised that you read section  ``Suitability''
  before you make you final hardware decisions.


  4.1.  A brief background on parallel computing.

  This section provides background on parallel computing concepts.  It
  is NOT an exhaustive or complete description of parallel computing
  science and technology. It is a brief description of the issues that
  may be important to a Beowulf designer and user.
  As you design and build your Beowulf, many of these issues described
  below will become important in your decision process. Due to its
  component nature, a Beowulf Supercomputer requires that we consider
  many factors carefully because they are now under our control. In
  general, it is not all that difficult to understand the issues
  involved with parallel computing.  Indeed, once the issues are
  understood, your expectations will be more realistic and success will
  be more likely. Unlike the "sequential world" where processor speed is
  considered the single most important factor, processor speed in the
  "parallel world" is just one of several factors that will determine
  overall system performance and efficiency.



  4.2.  The methods of parallel computing

  Parallel computing can take many forms.  From a user's perspective, it
  is important to consider the advantages and disadvantages of each
  methodology.  The following section attempts to provide some
  perspective on the methods of parallel computing and indicate where
  the Beowulf machine falls on this continuum.


  4.2.1.  Why more than one CPU?

  Answering this question is important.  Using 8 CPUs to run your word
  processor sounds a little like "over-kill" -- and it is.  What about a
  web server, a database, a rendering program, or a project scheduler?
  Maybe extra CPUs would help.  What about a complex simulation, a fluid
  dynamics code, or a data mining application.  Extra CPUs definitely
  help in these situations.  Indeed, multiple CPUs are being used to
  solve more and more problems.

  The next question usually is: "Why do I need two or four CPUs, I will
  just wait for the 986 turbo-hyper chip." There are several reasons:

  1. Due to the use of multi-tasking Operating Systems, it is possible
     to do several things at once.  This is a natural "parallelism" that
     is easily exploited by more than one low cost CPU.

  2. Processor speeds have been doubling every 18 months, but what about
     RAM speeds or hard disk speeds? Unfortunately, these speeds are not
     increasing as fast as the CPU speeds.  Keep in mind most
     applications require "out of cache memory access" and hard disk
     access.  Doing things in parallel is one way to get around some of
     these limitations.

  3. Predictions indicate that processor speeds will not continue to
     double every 18 months after the year 2005. There are some very
     serious obstacles to overcome in order to maintain this trend.

  4. Depending on the application, parallel computing can speed things
     up by any where from 2 to 500 times faster (in some cases even
     faster). Such performance is not available using a single
     processor.  Even supercomputers that at one time used very fast
     custom processors are now built from multiple "commodity- off-the-
     shelf" CPUs.

  If you need speed - either due to a compute bound problem and/or an
  I/O bound problem, parallel is worth considering.  Because parallel
  computing is implemented in a variety of ways, solving your problem in
  parallel will require some very important decisions to be made.  These
  decisions may dramatically effect portability, performance, and cost
  of your application.


  Before we get technical, let's look take a look at a real "parallel
  computing problem" using an example with which we are familiar -
  waiting in long lines at a store.


  4.2.2.  The Parallel Computing Store

  Consider a big store with 8 cash registers grouped together in the
  front of the store.  Assume each cash register/cashier is a CPU and
  each customer is a computer program.  The size of the computer program
  (amount of work) is the size of each customer's order. The following
  analogies can be used to illustrate parallel computing concepts.


  4.2.2.1.  Single-tasking Operating System

  One cash register open (is in use) and must process each customer one
  at a time.

  Computer Example: MS DOS


  4.2.2.2.  Multi-tasking Operating System:

  One cash register open, but now we process only a part of each order
  at a time, move to the next person and process some of their order.
  Everyone "seems" to be moving through the line together, but if no one
  else is in the line, you will get through the line faster.

  Computer Example: UNIX, NT using a single CPU


  4.2.2.3.  Multitasking Operating Systems with Multiple CPUs:

  Now we open several cash registers in the store. Each order can be
  processed by a separate cash register and the line can move much
  faster.  This is called SMP - Symmetric Multi-processing.  Although
  there are extra cash registers open, you will still never get through
  the line any faster than just you and a single cash register.

  Computer Example: UNIX and NT with multiple CPUs



  4.2.2.4.  Threads on a Multitasking Operating Systems extra CPUs

  If you "break-up" the items in your order, you might be able to move
  through the line faster by using several cash registers at one time.
  First, we must assume you have a large amount of goods, because the
  time you invest "breaking up your order" must be regained by using
  multiple cash registers.   In theory, you should be able to move
  through the line "n" times faster than before*; where "n" is the
  number of cash registers.  When the cashiers need to get sub- totals,
  they can exchange information quickly by looking and talking to all
  the other "local" cash registers. They can even snoop around the other
  cash registers to find information they need to work faster. There is
  a limit, however, as to how many cash registers the store can
  effectively locate in any one place.

  Amdals law will also limit the application speed-up to the slowest
  sequential portion of the program.

  Computer Example: UNIX or NT with extra CPU on the same motherboard
  running multi-threaded programs.


  4.2.2.5.  Sending Messages on Multitasking Operating Systems with
  extra CPUs:

  In order to improve performance, the store adds 8 cash registers at
  the back of the store.  Because the new cash registers are far away
  from the front cash registers, the cashiers must call on the phone to
  send their sub-totals to the front of the store. This distance adds
  extra overhead (time) to communication between cashiers, but if
  communication is minimized, it is not a problem.   If you have a
  really big order, one that requires all the cash registers, then as
  before your speed can be improved by using all cash registers at the
  same time, the extra overhead must be considered. In some cases, the
  store may have single cash registers (or islands of cash registers)
  located all over the store - each cash register (or island) must
  communicate by phone.  Since all the cashiers working the cash
  registers can talk to each other by phone, it does not matter too much
  where they are.

  Computer Example: One or several copies of UNIX or NT with extra CPUs
  on the same or different motherboard communicating through messages.

  The above scenarios, although not exact, are a good representation of
  constraints placed on parallel systems.  Unlike a single CPU (or cash
  register) communication is an issue.


  4.3.  Architectures for parallel computing

  The common methods and architectures of parallel computing are
  presented below.  While this description is by no means exhaustive, it
  is enough to understand the basic issues involved with Beowulf design.


  4.3.1.  Hardware Architectures


  There are basically two ways parallel computer hardware is put
  together:


  1. Local memory machines that communicate by messages (Beowulf
     Clusters)

  2. Shared memory machines that communicate through memory (SMP
     machines)

  A typical Beowulf is a collection of single CPU machines connected
  using fast Ethernet and is, therefore, a local memory machine.  A 4
  way SMP box is a shared memory machine and can be used for parallel
  computing - parallel applications communicate using shared memory.
  Just as in the computer store analogy, local memory machines
  (individual cash registers) can be scaled up to large numbers of CPUs,
  while the number of CPUs shared memory machines (the number of cash
  registers you can place in one spot) can have is limited due to memory
  contention.

  It is possible, however, to connect many shared memory machines to
  create a "hybrid" shared memory machine.  These hybrid machines "look"
  like a single large SMP machine to the user and are often called NUMA
  (non uniform memory access) machines because the global memory seen by
  the programmer and shared by all the CPUs can have different
  latencies.  At some level, however, a NUMA machine must "pass
  messages" between local shared memory pools.

  It is also possible to connect SMP machines as local memory compute
  nodes.  Typical CLASS I motherboards have either 2 or 4 CPUs and are
  often used as a means to reduce the overall system cost. The Linux
  internal scheduler determines how these CPUs get shared.  The user
  cannot (at this point) assign a specific task to a specific SMP
  processor.  The user can however, start two independent processes or a
  threaded processes and expect to see a performance increase over a
  single CPU system.


  4.3.2.  Software API Architectures

  There basically two ways to "express" concurrency in a program:

  1. Using Messages sent between processors

  2. Using operating system Threads

  Other methods do exist, but these are the two most widely used. It is
  important to remember that the expression of concurrency is not
  necessary controlled by the underlying hardware.  Both Messages and
  Threads can be implemented on SMP, NUMA-SMP, and clusters - although
  as explained below efficiently and portability are important issues.


  4.3.2.1.  Messages

  Historically, messages passing technology reflected the design of
  early local memory parallel computers. Messages require copying data
  while Threads use data in place.  The latency and speed at which
  messages can be copied are the limiting factor with message passing
  models. A Message is quite simple: some data and a destination
  processor.  Common message passing APIs are PVM or MPI. Message
  passing can be efficiently implemented using Threads and Messages work
  well both on SMP machine and between clusters of machines.  The
  advantage to using messages on an SMP machine, as opposed to Threads,
  is that if you decided to use clusters in the future it is easy to add
  machines or scale your application.


  4.3.2.2.  Threads

  Operating system Threads were developed because shared memory SMP
  (symmetrical multiprocessing) designs allowed very fast shared memory
  communication and synchronization between concurrent parts of a
  program.  Threads work well on SMP systems because communication is
  through shared memory.  For this reason the user must isolate local
  data from global data, otherwise programs will not work properly. In
  contrast to messages, a large amount of copying can be eliminated with
  threads because the data is shared between processes (threads). Linux
  supports POSIX threads. The problem with threads is that it is
  difficult to extend them beyond one SMP machine and because data is
  shared between CPUs, cache coherence issues can contribute to
  overhead. Extending threads beyond the SMP boundary efficiently
  requires NUMA technology which is expensive and not natively supported
  by Linux. Implementing threads on top of messages has been done
  ((http://syntron.com/ptools/ptools_pg.htm)), but Threads are often
  inefficient when implemented using messages.

  The following can be stated about performance:



            SMP machine     cluster of machines  scalability
            performance        performance
            -----------     -------------------  -----------
  messages    good                best              best

  threads     best               poor*              poor*

  * requires expensive NUMA technology.



  4.3.3.  Application Architecture

  In order to run an application in parallel on multiple CPUs, it must
  be explicitly broken in to concurrent parts.  A standard single CPU
  application will run no faster than a single CPU application on
  multiple processors.  There are some tools and compilers that can
  break up programs, but parallelizing codes is not a "plug and play"
  operation.  Depending on the application, parallelizing code can be
  easy, extremely difficult, or in some cases impossible due to
  algorithm dependencies.

  Before the software issues can be addressed the concept of Suitability
  needs to be introduced.


  4.4.  Suitability

  Most questions about parallel computing have the same answer:

  "It all depends upon the application."

  Before we jump into the issues, there is one very important
  distinction that needs to be made - the difference between CONCURRENT
  and PARALLEL.  For the sake of this discussion we will define these
  two concepts as follows:

  CONCURRENT parts of a program are those that can be computed
  independently.

  PARALLEL parts of a program are those CONCURRENT parts that are
  executed on separate processing elements at the same time.

  The distinction is very important, because CONCURRENCY is a property
  of the program and efficient PARALLELISM is a property of the machine.
  Ideally, PARALLEL execution should result in faster performance.  The
  limiting factor in parallel performance is the communication speed and
  latency between compute nodes. (Latency also exists with threaded SMP
  applications due to cache coherency.) Many of the common parallel
  benchmarks are highly parallel and communication and latency are not
  the bottle neck. This type of problem can be called  "obviously
  parallel".  Other applications are not so simple and executing
  CONCURRENT parts of the program in PARALLEL may actually cause the
  program to run slower, thus offsetting any performance gains in other
  CONCURRENT parts of the program.   In simple terms, the cost of
  communication time must pay for the savings in computation time,
  otherwise the PARALLEL execution of the CONCURRENT part is
  inefficient.

  The task of the programmer is to determining what CONCURRENT parts of
  the program SHOULD be executed in PARALLEL and what parts SHOULD NOT.
  The answer to this will determine the EFFICIENCY of application.  The
  following graph summarizes the situation for the programmer:


           | *
           | *
           | *
   % of    | *
   appli-  |  *
   cations |  *
           |  *
           |  *
           |    *
           |     *
           |      *
           |        ****
           |            ****
           |                ********************
           +-----------------------------------
            communication time/processing time



  In a perfect parallel computer, the ratio of communication/processing
  would be equal and anything that is CONCURRENT could be implemented in
  PARALLEL.  Unfortunately, Real parallel computers, including shared
  memory machines, are subject to the effects described in this graph.
  When designing a Beowulf, the user may want to keep this graph in mind
  because parallel efficiency depends upon ratio of communication time
  and processing time for A SPECIFIC PARALLEL COMPUTER.  Applications
  may be portable between parallel computers, but there is no guarantee
  they will be efficient on a different platform.

  IN GENERAL, THERE IS NO SUCH THING AS A PORTABLE AND EFFICIENT
  PARALLEL PROGRAM

  There is yet another consequence to the above graph.  Since efficiency
  depends upon the comm./process. ratio, just changing one component of
  the ratio does not necessary mean a specific application will perform
  faster.  A change in processor speed, while keeping the communication
  speed that same may have non- intuitive effects on your program.   For
  example, doubling or tripling the CPU speed, while keeping the
  communication speed the same, may now make some previously efficient
  PARALLEL portions of your program, more efficient if they were
  executed SEQUENTIALLY.  That is, it may now be faster to run the
  previously PARALLEL parts as SEQUENTIAL.  Furthermore, running
  inefficient parts in parallel will actually keep your application from
  reaching its maximum speed. Thus, by adding faster processor, you may
  actually slowed down your application (you are keeping the new CPU
  from running at its maximum speed for that application)

  UPGRADING TO A FASTER CPU MAY ACTUALLY SLOW DOWN YOUR APPLICATION

  So, in conclusion, to know whether or not you can use a parallel
  hardware environment, you need to have some insight into the
  suitability of a particular machine to your application.  You need to
  look at a lot of issues including CPU speeds, compiler, message
  passing API, network, etc.  Please note, just profiling an
  application, does not give the whole story.  You may identify a
  computationally heavy portion of your program, but you do not know the
  communication cost for this portion.  It may be that for a given
  system, the communication cost as do not make parallelizing this code
  efficient.


  A final note about a common misconception. It is often stated that "a
  program is PARALLELIZED", but in reality only the CONCURRENT parts of
  the program have been located. For all the reasons given above, the
  program is not PARALLELIZED.   Efficient PARALLELIZATION is a property
  of the machine.
  4.5.  Writing and porting parallel software

  Once you decide that you need parallel computing and would like to
  design and build a Beowulf, a few moments considering your application
  with respect to the previous discussion may be a good idea.

  In general there are two things you can do:

  1. Go ahead and construct a CLASS I Beowulf and then "fit" your
     application to it.  Or run existing parallel applications that you
     know work on your Beowulf (but beware of the portability and
     efficiently issues mentioned above)

  2. Look at the applications you need to run on your Beowulf and make
     some estimations as to the type of hardware and software you need.

  In either case, at some point you will need to look at the efficiency
  issues.  In general, there are three things you need to do:

  1. Determine concurrent parts of your program

  2. Estimate parallel efficiently

  3. Describing the concurrent parts of your program

  Let's look at these one at a time.


  4.5.1.  Determine concurrent parts of your program

  This step is often considered "parallelizing your program".
  Parallelization decisions will be made in step 2.  In this step, you
  need to determine data dependencies.

  >From a practical standpoint, applications may exhibit two types of
  concurrency: compute (number crunching) and I/O (database). Although
  in many cases compute and I/O concurrency are orthogonal, there are
  application that require both. There are tools available that can
  perform concurrency analysis on existing applications.  Most of these
  tools are designed for FORTRAN.  There are two reasons FORTRAN is
  used: historically most number crunching applications were written in
  FORTRAN and it is easier to analyze.  If no tools are available, then
  this step can be some what difficult for existing applications.


  4.5.2.  Estimate parallel efficiency

  Without the help of tools, this step may require trial and error tests
  or just a plain old educated guess.  If you have a specific
  application in mind, try to determine if it is CPU limited (compute
  bound) or hard disk limited (I/O bound).  The requirements of your
  Beowulf may be quite different depending upon your needs.  For
  example, a compute bound problem may need a few very fast CPUs and
  high speed low latency network, while an I/O bound problem may work
  better with more slower CPUs and fast Ethernet.

  This recommendation often comes as a surprise to most people because,
  the standard assumption is that faster processor are always better.
  While this is true if your have an unlimited budget, real systems may
  have cost constraints that should be maximized.  For I/O bound
  problems, there is a little known rule (called the Eadline-Dedkov Law)
  that is quite helpful:

  For two given parallel computers with the same cumulative CPU
  performance index, the one which has slower processors (and a probably
  correspondingly slower interprocessor communication network) will have
  better performance for I/O-dominant applications.

  While the proof of this rule is beyond the scope of this document, you
  find it interesting to download the paper Performance Considerations
  for I/O-Dominant Applications on Parallel Computers (Postscript format
  109K ) (ftp://www.plogic.com/pub/papers/exs-pap6.ps)

  Once you have determined what type of concurrency you have in your
  application, you will need to estimate how efficient it will be in
  parallel.  See Section ``Software'' for a description of Software
  tools.

  In the absence of tools, you may try to guess your way through this
  step.  If a compute bound loop measured in minutes and the data can be
  transferred in seconds, then it might be a good candidate for
  parallelization.  But remember, if you take a 16 minute loop and break
  it into 32 parts, and your data transfers require several seconds per
  part, then things are going to get tight.  You will reach a point of
  diminishing returns.


  4.5.3.  Describing the concurrent parts of your program

  There are several ways to describe concurrent parts of your program:

  1. Explicit parallel execution

  2. Implicit parallel execution

  The major difference between the two is that explicit parallelism is
  determined by the user where implicit parallelism is determined by the
  compiler.


  4.5.3.1.  Explicit Methods

  These are basically method where the user must modify source code
  specifically for a parallel computer.  The user must either add
  messages using PVM or MPI or add threads using POSIX threads. (Keep in
  mind however, threads can not move between SMP motherboards).

  Explicit methods tend to be the most difficult to implement and debug.
  Users typically embed explicit function calls in standard FORTRAN 77
  or C/C++ source code.  The MPI library has added some functions to
  make some standard parallel methods easier to implement (i.e.
  scatter/gather functions).  In addition, it is also possible to use
  standard libraries that have been written for parallel computers.
  Keep in mind, however, the portability vs. efficiently trade-off)


  For historical reasons, most number crunching codes are written in
  FORTRAN.  For this reasons, FORTRAN has the largest amount of support
  (tools, libraries, etc.) for parallel computing.  Many programmers now
  use C or re- write existing FORTRAN applications in C with the notion
  the C will allow faster execution.  While this may be true as C is the
  closest thing to a universal machine code, it has some major
  drawbacks.  The use of pointers in C makes determining data
  dependencies extremely difficult.  Automatic analysis of pointers is
  extremely difficult. If you have an existing FORTRAN program and think
  that you might want to parallelize it in the future - DO NOT CONVERT
  IT TO C!



  4.5.3.2.  Implicit Methods

  Implicit methods are those where the user gives up some (or all) of
  the parallelization decisions to the compiler.  Examples are FORTRAN
  90, High Performance FORTRAN (HPF), Bulk Synchronous Parallel (BSP),
  and a whole collection of other methods that are under development.

  Implicit methods require the user to provide some information about
  the concurrent nature of their application, but the compiler will then
  make many decisions about how to execute this concurrency in parallel.
  These methods provide some level of portability and efficiency, but
  there is still no "best way" to describe a concurrent problem for a
  parallel computer.


  5.  Beowulf Resources



  5.1.  Starting Points



  o  Beowulf mailing list.  To subscribe send mail to beowulf-
     request@cesdis.gsfc.nasa.gov with the word subscribe in the message
     body.

  o  Beowulf Homepage http://www.beowulf.org

  o  Extreme Linux http://www.extremelinux.org

  o  Extreme Linux Software from Red Hat http://www.redhat.com/extreme



  5.2.  Documentation



  o  The latest version of the Beowulf HOWTO
     http://www.sci.usq.edu.au/staff/jacek/beowulf.

  o  Building a Beowulf System
     http://www.cacr.caltech.edu/beowulf/tutorial/building.html

  o  Jacek's Beowulf Links
     http://www.sci.usq.edu.au/staff/jacek/beowulf.

  o  Beowulf Installation and Administration HOWTO (DRAFT)
     http://www.sci.usq.edu.au/staff/jacek/beowulf.

  o  Linux Parallel Processing HOWTO
     http://yara.ecn.purdue.edu/~pplinux/PPHOWTO/pphowto.html



  5.3.  Papers



  o  Chance Reschke, Thomas Sterling, Daniel Ridge, Daniel Savarese,
     Donald Becker, and Phillip Merkey A Design Study of Alternative
     Network Topologies for the Beowulf Parallel Workstation.
     Proceedings Fifth IEEE International Symposium on High Performance
     Distributed Computing, 1996.
     http://www.beowulf.org/papers/HPDC96/hpdc96.html
  o  Daniel Ridge, Donald Becker, Phillip Merkey, Thomas Sterling
     Becker, and Phillip Merkey. Harnessing the Power of Parallelism in
     a Pile-of-PCs.  Proceedings, IEEE Aerospace, 1997.
     http://www.beowulf.org/papers/AA97/aa97.ps


  o  Thomas Sterling, Donald J. Becker, Daniel Savarese, Michael R.
     Berry, and Chance Res. Achieving a Balanced Low-Cost Architecture
     for Mass Storage Management through Multiple Fast Ethernet Channels
     on the Beowulf Parallel Workstation.  Proceedings, International
     Parallel Processing Symposium, 1996.
     http://www.beowulf.org/papers/IPPS96/ipps96.html


  o  Donald J. Becker, Thomas Sterling, Daniel Savarese, Bruce Fryxell,
     Kevin Olson. Communication Overhead for Space Science Applications
     on the Beowulf Parallel Workstation.  Proceedings,High Performance
     and Distributed Computing, 1995.
     http://www.beowulf.org/papers/HPDC95/hpdc95.html



  o  Donald J. Becker, Thomas Sterling, Daniel Savarese, John E.
     Dorband, Udaya A. Ranawak, Charles V.  Packer. BEOWULF: A PARALLEL
     WORKSTATION FOR SCIENTIFIC COMPUTATION.  Proceedings, International
     Conference on Parallel Processing, 95.
     http://www.beowulf.org/papers/ICPP95/icpp95.html

  o  Papers at the Beowulf site
     http://www.beowulf.org/papers/papers.html



  5.4.  Software


  o  PVM - Parallel Virtual Machine
     http://www.epm.ornl.gov/pvm/pvm_home.html



  o  LAM/MPI (Local Area Multicomputer / Message Passing Interface
     http://www.mpi.nd.edu/lam

  o  BERT77 - FORTRAN conversion tool http://www.plogic.com/bert.html

  o  Beowulf software from Beowulf Project Page
     http://beowulf.gsfc.nasa.gov/software/software.html

  o  Jacek's Beowulf-utils ftp://ftp.sci.usq.edu.au/pub/jacek/beowulf-
     utils

  o  bWatch - cluster monitoring tool
     http://www.sci.usq.edu.au/staff/jacek/bWatch



  5.5.  Beowulf Machines


  o  Avalon consists of 140 Alpha processors, 36 GB of RAM, and is
     probably the fastest Beowulf machine, cruising at 47.7 Gflops and
     ranking 114th on the Top 500 list.  http://swift.lanl.gov/avalon/

  o  Megalon-A Massively PArallel CompuTer Resource (MPACTR) consists of
     14, quad CPU Pentium Pro 200 nodes, and 14 GB of RAM.
     http://megalon.ca.sandia.gov/description.html

  o  theHIVE - Highly-parallel Integrated Virtual Environment is another
     fast Beowulf Supercomputer.  theHIVE is a 64 node, 128 CPU machine
     with the total of 4 GB RAM.  http://newton.gsfc.nasa.gov/thehive/

  o  Topcat is a much smaller machine and consists of 16 CPUs and 1.2 GB
     RAM.  http://www.sci.usq.edu.au/staff/jacek/topcat

  o  MAGI cluster - this is a very interesting site with many good
     links. http://noel.feld.cvut.cz/magi/



  5.6.  Other Interesting Sites



  o  SMP Linux http://www.linux.org.uk/SMP/title.html

  o  Paralogic - Buy a Beowulf http://www.plogic.com


  5.7.  History


  o  Legends - Beowulf  http://legends.dm.net/beowulf/index.html

  o  The Adventures of Beowulf
     http://www.lnstar.com/literature/beowulf/beowulf.html


  6.  Source code


  6.1.  sum.c


  /* Jacek Radajewski jacek@usq.edu.au */
  /* 21/08/1998 */

  #include <stdio.h>
  #include <math.h>

  int main (void) {

    double result = 0.0;
    double number = 0.0;
    char string[80];


    while (scanf("%s", string) != EOF) {

      number = atof(string);
      result = result + number;
    }

    printf("%lf\n", result);

    return 0;

  }

  6.2.  sigmasqrt.c


  /* Jacek Radajewski jacek@usq.edu.au */
  /* 21/08/1998 */

  #include <stdio.h>
  #include <math.h>

  int main (int argc, char** argv) {

    long number1, number2, counter;
    double result;

    if (argc < 3) {
      printf ("usage : %s number1 number2\n",argv[0]);
      exit(1);
    } else {
      number1 = atol (argv[1]);
      number2 = atol (argv[2]);
      result = 0.0;
    }

    for (counter = number1; counter <= number2; counter++) {
      result = result + sqrt((double)counter);
    }

    printf("%lf\n", result);

    return 0;

  }



  6.3.  prun.sh



  #!/bin/bash
  # Jacek Radajewski jacek@usq.edu.au
  # 21/08/1998

  export SIGMASQRT=/home/staff/jacek/beowulf/HOWTO/example1/sigmasqrt

  # $OUTPUT must be a named pipe
  # mkfifo output

  export OUTPUT=/home/staff/jacek/beowulf/HOWTO/example1/output

  rsh scilab01 $SIGMASQRT         1  50000000 > $OUTPUT < /dev/null&
  rsh scilab02 $SIGMASQRT  50000001 100000000 > $OUTPUT < /dev/null&
  rsh scilab03 $SIGMASQRT 100000001 150000000 > $OUTPUT < /dev/null&
  rsh scilab04 $SIGMASQRT 150000001 200000000 > $OUTPUT < /dev/null&
  rsh scilab05 $SIGMASQRT 200000001 250000000 > $OUTPUT < /dev/null&
  rsh scilab06 $SIGMASQRT 250000001 300000000 > $OUTPUT < /dev/null&
  rsh scilab07 $SIGMASQRT 300000001 350000000 > $OUTPUT < /dev/null&
  rsh scilab08 $SIGMASQRT 350000001 400000000 > $OUTPUT < /dev/null&
  rsh scilab09 $SIGMASQRT 400000001 450000000 > $OUTPUT < /dev/null&
  rsh scilab10 $SIGMASQRT 450000001 500000000 > $OUTPUT < /dev/null&
  rsh scilab11 $SIGMASQRT 500000001 550000000 > $OUTPUT < /dev/null&
  rsh scilab12 $SIGMASQRT 550000001 600000000 > $OUTPUT < /dev/null&
  rsh scilab13 $SIGMASQRT 600000001 650000000 > $OUTPUT < /dev/null&
  rsh scilab14 $SIGMASQRT 650000001 700000000 > $OUTPUT < /dev/null&
  rsh scilab15 $SIGMASQRT 700000001 750000000 > $OUTPUT < /dev/null&
  rsh scilab16 $SIGMASQRT 750000001 800000000 > $OUTPUT < /dev/null&
  rsh scilab17 $SIGMASQRT 800000001 850000000 > $OUTPUT < /dev/null&
  rsh scilab18 $SIGMASQRT 850000001 900000000 > $OUTPUT < /dev/null&
  rsh scilab19 $SIGMASQRT 900000001 950000000 > $OUTPUT < /dev/null&
  rsh scilab20 $SIGMASQRT 950000001 1000000000 > $OUTPUT < /dev/null&



  The Linux BootPrompt-HowTo
  by Paul Gortmaker.
  v1.2, May 1999

  This is the BootPrompt-Howto, which is a compilation of all the possi-
  ble boot time arguments that can be passed to the Linux kernel at boot
  time. This includes all kernel and device parameters.  A discussion of
  how the kernel sorts boot time arguments, along with an overview of
  some of the popular software used to boot Linux kernels is also
  included.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Disclaimer and Copyright
     1.2 Intended Audience and Applicability
     1.3 Related Documentation
     1.4 The Linux Newsgroups
     1.5 New Versions of this Document

  2. Overview of Boot Prompt Arguments

     2.1 LILO (LInux LOader)
     2.2 LoadLin
     2.3 The ``rdev'' utility
     2.4 How the Kernel Sorts the Arguments
     2.5 Setting Environment Variables.
     2.6 Passing Arguments to the `init' program

  3. General Non-Device Specific Boot Args

     3.1 Root Filesystem options
        3.1.1 The `root=' Argument
        3.1.2 The `ro' Argument
        3.1.3 The `rw' Argument
     3.2 Options Relating to RAM Disk Management
        3.2.1 The `ramdisk_start=' Argument
        3.2.2 The `load_ramdisk=' Argument
        3.2.3 The `prompt_ramdisk=' Argument
        3.2.4 The `ramdisk_size=' Argument
        3.2.5 The `ramdisk=' Argument (obsolete)
        3.2.6 The `noinitrd' (initial RAM disk) Argument
     3.3 Boot Arguments Related to Memory Handling
        3.3.1 The `mem=' Argument
        3.3.2 The `swap=' Argument
        3.3.3 The `buff=' Argument
     3.4 Boot Arguments for NFS Root Filesystem
        3.4.1 The `nfsroot=' Argument
        3.4.2 The `nfsaddrs=' Argument
     3.5 Other Misc. Kernel Boot Arguments
        3.5.1 The `debug' Argument
        3.5.2 The `init=' Argument
        3.5.3 The `kbd-reset' Argument
        3.5.4 The `maxcpus=' Argument
        3.5.5 The `mca-pentium' Argument
        3.5.6 The `md=' Argument
        3.5.7 The `no387' Argument
        3.5.8 The `no-hlt' Argument
        3.5.9 The `no-scroll' Argument
        3.5.10 The `noapic' Argument
        3.5.11 The `nosmp' Argument
        3.5.12 The `panic=' Argument
        3.5.13 The `pci=' Argument
        3.5.14 The `pirq=' Argument
        3.5.15 The `profile=' Argument
        3.5.16 The `reboot=' Argument
        3.5.17 The `reserve=' Argument
        3.5.18 The `vga=' Argument

  4. Boot Arguments to Control PCI Bus Behaviour (`pci=')

     4.1 The `pci=bios' and `pci=nobios' Arguments
     4.2 The `pci=conf1' and `pci=conf2' Arguments
     4.3 The `pci=io=' Argument
     4.4 The `pci=nopeer' Argument
     4.5 The `pci=nosort' Argument
     4.6 The `pci=off' Argument
     4.7 The `pci=reverse' Argument
  5. Boot Arguments for Video Frame Buffer Drivers

     5.1 The `video=map:...' Argument
     5.2 The `video=scrollback:...' Argument
     5.3 The `video=vc:...' Argument

  6. Boot Arguments for SCSI Peripherals.

     6.1 Arguments for Mid-level Drivers
        6.1.1 Maximum Probed LUNs (`max_scsi_luns=')
        6.1.2 SCSI Logging (`scsi_logging=')
        6.1.3 Parameters for the SCSI Tape Driver (`st=')
     6.2 Arguments for SCSI Host Adapters
        6.2.1 Adaptec aha151x, aha152x, aic6260, aic6360, SB16-SCSI (`aha152x=')
        6.2.2 Adaptec aha154x (`aha1542=')
        6.2.3 Adaptec aha274x, aha284x, aic7xxx (`aic7xxx=')
        6.2.4 AdvanSys SCSI Host Adaptors (`advansys=')
        6.2.5 Always IN2000 Host Adaptor (`in2000=')
        6.2.6 AMD AM53C974 based hardware (`AM53C974=')
        6.2.7 BusLogic SCSI Hosts with v1.2 kernels (`buslogic=')
        6.2.8 BusLogic SCSI Hosts with v2.x kernels (`BusLogic=')
        6.2.9 EATA SCSI Cards (`eata=')
        6.2.10 Future Domain TMC-8xx, TMC-950 (`tmc8xx=')
        6.2.11 Future Domain TMC-16xx, TMC-3260, AHA-2920 (`fdomain=')
        6.2.12 IOMEGA Parallel Port / ZIP drive (`ppa=')
        6.2.13 NCR5380 based controllers (`ncr5380=')
        6.2.14 NCR53c400 based controllers (`ncr53c400=')
        6.2.15 NCR53c406a based controllers (`ncr53c406a=')
        6.2.16 Pro Audio Spectrum (`pas16=')
        6.2.17 Seagate ST-0x (`st0x=')
        6.2.18 Trantor T128 (`t128=')
        6.2.19 Ultrastor SCSI cards (`u14-34f=')
        6.2.20 Western Digital WD7000 cards (`wd7000=')
     6.3 SCSI Host Adapters that don't Accept Boot Args

  7. Hard Disks

     7.1 IDE Disk/CD-ROM Driver Parameters
     7.2 Standard ST-506 Disk Driver Options (`hd=')
     7.3 XT Disk Driver Options (`xd=')

  8. CD-ROMs (Non-SCSI/ATAPI/IDE)

     8.1 The Aztech Interface (`aztcd=')
     8.2 The CDU-31A and CDU-33A Sony Interface (`cdu31a=')
     8.3 The CDU-535 Sony Interface (`sonycd535=')
     8.4 The GoldStar Interface (`gscd=')
     8.5 The ISP16 Interface (`isp16=')
     8.6 The Mitsumi Standard Interface (`mcd=')
     8.7 The Mitsumi XA/MultiSession Interface (`mcdx=')
     8.8 The Optics Storage Interface (`optcd=')
     8.9 The Phillips CM206 Interface (`cm206=')
     8.10 The Sanyo Interface (`sjcd=')
     8.11 The SoundBlaster Pro Interface (`sbpcd=')

  9. Serial and ISDN Drivers

     9.1 The ICN ISDN driver (`icn=')
     9.2 The PCBIT ISDN driver (`pcbit=')
     9.3 The Teles ISDN driver (`teles=')
     9.4 The DigiBoard Driver (`digi=')
     9.5 The RISCom/8 Multiport Serial Driver (`riscom8=')
     9.6 The Baycom Serial/Parallel Radio Modem (`baycom=')

  10. Other Hardware Devices

     10.1 Ethernet Devices (`ether=')
     10.2 The Floppy Disk Driver (`floppy=')
     10.3 The Sound Driver (`sound=')
     10.4 The Bus Mouse Driver (`bmouse=')
     10.5 The MS Bus Mouse Driver (`msmouse=')
     10.6 The Printer Driver (`lp=')

  11. Copying, Translations, Closing, etc.

     11.1 Copyright and Disclaimer
     11.2 Closing


  ______________________________________________________________________

  1.  Introduction


  The kernel has a limited capability to accept information at boot in
  the form of a `command line', similar to an argument list you would
  give to a program. In general this is used to supply the kernel with
  information about hardware parameters that the kernel would not be
  able to determine on its own, or to avoid/override the values that the
  kernel would otherwise detect.

  However, if you just copy a kernel image directly to a floppy, (e.g.
  cp zImage /dev/fd0) then you are not given a chance to specify any
  arguments to that kernel. So most Linux users will use software like
  LILO or loadlin that takes care of handing these arguments to the
  kernel, and then booting it.

  This present revision covers kernels up to and including v2.2.9.  Some
  features that are unique to development/testing kernels up to v2.3.2
  are also documented.

  The BootPrompt-Howto is by:

       Paul Gortmaker, p_gortmaker@yahoo.com



  1.1.  Disclaimer and Copyright

  This document is Copyright (c) 1995-1999 by Paul Gortmaker.  Please
  see the Disclaimer and Copying information at the end of this document
  (``copyright'') for information about redistribution of this document
  and the usual `we are not responsible for what you manage to break...'
  type legal stuff.


  1.2.  Intended Audience and Applicability

  Most Linux users should never have to even look at this document.
  Linux does an exceptionally good job at detecting most hardware and
  picking reasonable default settings for most parameters.  The
  information in this document is aimed at users who might want to
  change some of the default settings to optimize the kernel to their
  particular machine, or to a user who has `rolled their own' kernel to
  support a not so common piece of hardware for which automatic
  detection is currently not available.

  IMPORTANT NOTE: Driver related boot prompt arguments only apply to
  hardware drivers that are compiled directly into the kernel. They have
  no effect on drivers that are loaded as modules. Most Linux
  distributions come with a basic `bare-bones' kernel, and the drivers
  are small modules that are loaded after the kernel has initialized.
  If you are unsure if you are using modules then look at man depmod and
  man modprobe along with the contents of your /etc/conf.modules.


  1.3.  Related Documentation

  The most up-to-date documentation will always be the kernel source
  itself. Hold on! Don't get scared. You don't need to know any
  programming to read the comments in the source files.  For example, if
  you were looking for what arguments could be passed to the AHA1542
  SCSI driver, then you would go to the linux/drivers/scsi directory,
  and look at the file aha1542.c -- and within the first 100 lines, you
  would find a plain english description of the boot time arguments that
  the 1542 driver accepts.

  The linux directory is usually found in /usr/src/ for most
  distributions.  All references in this document to files that come
  with the kernel will have their pathname abbreviated to start with
  linux - you will have to append the /usr/src/ or whatever is
  appropriate for your system.  (If you can't find the file in question,
  then make use of the find and locate commands.)

  The next best thing will be any documentation files that are
  distributed with the kernel itself. There are now quite a few of
  these, and most of them can be found in the directory
  linux/Documentation and subdirectories from there.  Sometimes there
  will be README.foo files that can be found in the related driver
  directory (e.g. linux/drivers/???/, where examples of ??? could be
  scsi, char, or net).

  If you have figured out what boot-args you intend to use, and now want
  to know how to get that information to the kernel, then look at the
  documentation that comes with the software that you use to boot the
  kernel (e.g. LILO or loadlin). A brief overview is given below, but it
  is no substitute for the documentation that comes with the booting
  software.


  1.4.  The Linux Newsgroups

  If you have questions about passing boot arguments to the kernel,
  please check this document first. If this and the related
  documentation mentioned above does not answer your question(s) then
  you can try the Linux newsgroups.  General questions on how to
  configure your system should be directed to the comp.os.linux.setup
  newsgroup.  We ask that you please respect this general guideline for
  content, and don't cross-post your request to other groups.

  Of course you should try checking the group before blindly posting
  your question, as it may even be a Frequently Asked Question (a FAQ).
  A quick browse of the Linux FAQ before posting is a good idea. You
  should be able to find the FAQ somewhere close to where you found this
  document.  If it is not a FAQ then use newsgroup archives, such as
  those at http://www.dejanews.com to quickly search years worth of
  postings for your topic. Chances are someone else has already asked
  (and another person answered!) the question that you now have.


  1.5.  New Versions of this Document

  New versions of this document can be retrieved via anonymous FTP from
  most Linux FTP sites in the directory /pub/Linux/docs/HOWTO/. Updates
  will be made as new information and/or drivers becomes available. If
  this copy that you are presently reading is more than six months old,
  then you should probably check to see if a newer copy exists.  I would
  recommend viewing this via a WWW browser or in the Postscript/dvi
  format. Both of these contain cross-references that are lost in a
  simple plain text version.

  If you want to get the official copy, here is URL.

  BootPrompt-HOWTO <http://metalab.unc.edu/mdw/HOWTO/BootPrompt-
  HOWTO.html>


  2.  Overview of Boot Prompt Arguments


  This section gives some examples of software that can be used to pass
  kernel boot-time arguments to the kernel itself.  It also gives you an
  idea of how the arguments are processed, what limitations there are on
  the boot args, and how they filter down to each appropriate device
  that they are intended for.

  It is important to note that spaces should not be used in a boot
  argument, but only between separate arguments.  A list of values that
  are for a single argument are to be separated with a comma between the
  values, and again without any spaces. See the following examples
  below.


  ______________________________________________________________________
          ether=9,0x300,0xd0000,0xd4000,eth0  root=/dev/hda1            *RIGHT*
          ether = 9, 0x300, 0xd0000, 0xd4000, eth0  root = /dev/hda1    *WRONG*
  ______________________________________________________________________



  Once the Linux kernel is up and running, one can view the command line
  arguments that were in place at boot by simply typing cat
  /proc/cmdline at a shell prompt.


  2.1.  LILO (LInux LOader)

  The LILO program (LInux LOader) written by Werner Almesberger is the
  most commonly used. It has the ability to boot various kernels, and
  stores the configuration information in a plain text file. Most
  distributions ship with LILO as the default boot-loader. LILO can boot
  DOS, OS/2, Linux, FreeBSD, etc. without any difficulties, and is quite
  flexible.

  A typical configuration will have LILO stop and print LILO: shortly
  after you turn on your computer. It will then wait for a few seconds
  for any optional input from the user, and failing that it will then
  boot the default system. Typical system labels that people use in the
  LILO configuration files are linux and backup and msdos. If you want
  to type in a boot argument, you type it in here, after typing in the
  system label that you want LILO to boot from, as shown in the example
  below.


  ______________________________________________________________________
          LILO: linux root=/dev/hda1
  ______________________________________________________________________



  LILO comes with excellent documentation, and for the purposes of boot
  args discussed here, the LILO append= command is of significant
  importance when one wants to add a boot time argument as a permanent
  addition to the LILO config file.  You simply add something like
  append = "foo=bar" to the /etc/lilo.conf file. It can either be added
  at the top of the config file, making it apply to all sections, or to
  a single system section by adding it inside an image= section.  Please
  see the LILO documentation for a more complete description.


  2.2.  LoadLin

  The other commonly used Linux loader is `LoadLin' which is a DOS
  program that has the capability to launch a Linux kernel from the DOS
  prompt (with boot-args) assuming that certain resources are available.
  This is good for people that use DOS and want to launch into Linux
  from DOS.

  It is also very useful if you have certain hardware which relies on
  the supplied DOS driver to put the hardware into a known state. A
  common example is `SoundBlaster Compatible' sound cards that require
  the DOS driver to set a few proprietary registers to put the card into
  a SB compatible mode. Booting DOS with the supplied driver, and then
  loading Linux from the DOS prompt with LOADLIN.EXE avoids the reset of
  the card that happens if one rebooted instead. Thus the card is left
  in a SB compatible mode and hence is useable under Linux.

  There are also other programs that can be used to boot Linux.  For a
  complete list, please look at the programs available on your local
  Linux ftp mirror, under system/Linux-boot/.


  2.3.  The ``rdev'' utility

  There are a few of the kernel boot parameters that have their default
  values stored in various bytes in the kernel image itself.  There is a
  utility called rdev that is installed on most systems that knows where
  these values are, and how to change them.  It can also change things
  that have no kernel boot argument equivalent, such as the default
  video mode used.

  The rdev utility is usually also aliased to swapdev, ramsize, vidmode
  and rootflags. These are the five things that rdev can change, those
  being the root device, the swap device, the RAM disk parameters, the
  default video mode, and the readonly/readwrite setting of root device.

  More information on rdev can be found by typing rdev -h or by reading
  the supplied man page (man rdev).


  2.4.  How the Kernel Sorts the Arguments

  Most of the boot args take the form of:

  ______________________________________________________________________
          name[=value_1][,value_2]...[,value_11]
  ______________________________________________________________________



  where `name' is a unique keyword that is used to identify what part of
  the kernel the associated values (if any) are to be given to. Multiple
  boot args are just a space separated list of the above format. Note
  the limit of 11 is real, as the present code only handles 11 comma
  separated parameters per keyword. (However, you can re-use the same
  keyword with up to an additional 11 parameters in unusually
  complicated situations, assuming the setup function supports it.)
  Also note that the kernel splits the list into a maximum of ten
  integer arguments, and a following string, so you can't really supply
  11 integers unless you convert the 11th arg from a string to an int in
  the driver itself.

  Most of the sorting goes on in linux/init/main.c.  First, the kernel
  checks to see if the argument is any of the special arguments `root=',
  `ro', `rw', or `debug'.  The meaning of these special arguments is
  described further on in the document.

  Then it walks a list of setup functions (contained in the bootsetups
  array) to see if the specified argument string (such as `foo') has
  been associated with a setup function (foo_setup()) for a particular
  device or part of the kernel. If you passed the kernel the line
  foo=3,4,5,6,bar then the kernel would search the bootsetups array to
  see if `foo' was registered. If it was, then it would call the setup
  function associated with `foo' (foo_setup()) and hand it the integer
  arguments 3, 4, 5 and 6 as given on the kernel command line, and also
  hand it the string argument bar.


  2.5.  Setting Environment Variables.

  Anything of the form `foo=bar' that is not accepted as a setup
  function as described above is then interpreted as an environment
  variable to be set. An example would be to use TERM=vt100 or
  BOOT_IMAGE=vmlinuz.bak as a boot argument.  These environment
  variables are typically tested for in the initialization scripts to
  enable or disable a wide range of things.


  2.6.  Passing Arguments to the `init' program

  Any remaining arguments that were not picked up by the kernel and were
  not interpreted as environment variables are then passed onto process
  one, which is usually the init program. The most common argument that
  is passed to the init process is the word single which instructs init
  to boot the computer in single user mode, and not launch all the usual
  daemons. Check the manual page for the version of init installed on
  your system to see what arguments it accepts.


  3.  General Non-Device Specific Boot Args

  These are the boot arguments that are not related to any specific
  device or peripheral. They are instead related to certain internal
  kernel parameters, such as memory handling, ramdisk handling, root
  file system handling and others.


  3.1.  Root Filesystem options

  The following options all pertain to how the kernel selects and
  handles the root filesystem.


  3.1.1.  The `root=' Argument

  This argument tells the kernel what device is to be used as the root
  filesystem while booting. The default of this setting is the value of
  the root device of the system that the kernel was built on.  For
  example, if the kernel in question was built on a system that used
  `/dev/hda1' as the root partition, then the default root device would
  be `/dev/hda1'.  To override this default value, and select the second
  floppy drive as the root device, one would use `root=/dev/fd1'.

  Valid root devices are any of the following devices:


  (1) /dev/hdaN to /dev/hddN, which is partition N on ST-506 compatible
  disk `a to d'.

  (2) /dev/sdaN to /dev/sdeN, which is partition N on SCSI compatible
  disk `a to e'.

  (3) /dev/xdaN to /dev/xdbN, which is partition N on XT compatible disk
  `a to b'.

  (4) /dev/fdN, which is floppy disk drive number N. Having N=0 would be
  the DOS `A:' drive, and N=1 would be `B:'.

  (5) /dev/nfs, which is not really a device, but rather a flag to tell
  the kernel to get the root fs via the network.

  The more awkward and less portable numeric specification of the above
  possible disk devices in major/minor format is also accepted. (e.g.
  /dev/sda3 is major 8, minor 3, so you could use root=0x803 as an
  alternative.)

  This is one of the few kernel boot arguments that has its default
  stored in the kernel image, and which can thus be altered with the
  rdev utility.



  3.1.2.  The `ro' Argument

  When the kernel boots, it needs a root filesystem to read basic things
  off of. This is the root filesystem that is mounted at boot. However,
  if the root filesystem is mounted with write access, you can not
  reliably check the filesystem integrity with half-written files in
  progress. The `ro' option tells the kernel to mount the root
  filesystem as `readonly' so that any filesystem consistency check
  programs (fsck) can safely assume that there are no half-written files
  in progress while performing the check. No programs or processes can
  write to files on the filesystem in question until it is `remounted'
  as read/write capable.

  This is one of the few kernel boot arguments that has its default
  stored in the kernel image, and which can thus be altered with the
  rdev utility.


  3.1.3.  The `rw' Argument

  This is the exact opposite of the above, in that it tells the kernel
  to mount the root filesystem as read/write. The default is to mount
  the root filesystem as read/write anyway. Do not run any `fsck' type
  programs on a filesystem that is mounted read/write.

  The same value stored in the image file mentioned above is also used
  for this parameter, accessible via rdev.


  3.2.  Options Relating to RAM Disk Management

  The following options all relate to how the kernel handles the RAM
  disk device, which is usually used for bootstrapping machines during
  the install phase, or for machines with modular drivers that need to
  be installed to access the root filesystem.



  3.2.1.  The `ramdisk_start=' Argument

  To allow a kernel image to reside on a floppy disk along with a
  compressed ramdisk image, the `ramdisk_start=<offset>' command was
  added. The kernel can't be included into the compressed ramdisk
  filesystem image, because it needs to be stored starting at block zero
  so that the BIOS can load the bootsector and then the kernel can
  bootstrap itself to get going.

  Note: If you are using an uncompressed ramdisk image, then the kernel
  can be a part of the filesystem image that is being loaded into the
  ramdisk, and the floppy can be booted with LILO, or the two can be
  separate as is done for the compressed images.

  If you are using a two-disk boot/root setup (kernel on disk 1, ramdisk
  image on disk 2) then the ramdisk would start at block zero, and an
  offset of zero would be used. Since this is the default value, you
  would not need to actually use the command at all.


  3.2.2.  The `load_ramdisk=' Argument

  This parameter tells the kernel whether it is to try to load a ramdisk
  image or not. Specifying `load_ramdisk=1' will tell the kernel to load
  a floppy into the ramdisk. The default value is zero, meaning that the
  kernel should not try to load a ramdisk.

  Please see the file linux/Documentation/ramdisk.txt for a complete
  description of the new boot time arguments, and how to use them. A
  description of how this parameter can be set and stored in the kernel
  image via `rdev' is also described.


  3.2.3.  The `prompt_ramdisk=' Argument

  This parameter tells the kernel whether or not to give you a prompt
  asking you to insert the floppy containing the ramdisk image. In a
  single floppy configuration the ramdisk image is on the same floppy as
  the kernel that just finished loading/booting and so a prompt is not
  needed. In this case one can use `prompt_ramdisk=0'. In a two floppy
  configuration, you will need the chance to switch disks, and thus
  `prompt_ramdisk=1' can be used. Since this is the default value, it
  doesn't really need to be specified. ( (Historical note: Sneaky people
  used to use the `vga=ask' LILO option to temporarily pause the boot
  process and allow a chance to switch from boot to root floppy.)

  Please see the file linux/Documentation/ramdisk.txt for a complete
  description of the new boot time arguments, and how to use them. A
  description of how this parameter can be set and stored in the kernel
  image via `rdev' is also described.


  3.2.4.  The `ramdisk_size=' Argument

  While it is true that the ramdisk grows dynamically as required, there
  is an upper bound on its size so that it doesn't consume all available
  RAM and leave you in a mess. The default is 4096 (i.e. 4MB) which
  should be large enough for most needs. You can override the default to
  a bigger or smaller size with this boot argument.

  Please see the file linux/Documentation/ramdisk.txt for a complete
  description of the new boot time arguments, and how to use them. A
  description of how this parameter can be set and stored in the kernel
  image via `rdev' is also described.


  3.2.5.  The `ramdisk=' Argument (obsolete)

  (NOTE: This argument is obsolete, and should not be used except on
  kernels v1.3.47 and older. The commands that should be used for the
  ramdisk device are documented above.)

  This specifies the size in kB of the RAM disk device.  For example, if
  one wished to have a root filesystem on a 1.44MB floppy loaded into
  the RAM disk device, they would use:


  ______________________________________________________________________
          ramdisk=1440
  ______________________________________________________________________



  This is one of the few kernel boot arguments that has its default
  stored in the kernel image, and which can thus be altered with the
  rdev utility.



  3.2.6.  The `noinitrd' (initial RAM disk) Argument

  The v2.x and newer kernels have a feature where the root filesystem
  can be initially a RAM disk, and the kernel executes /linuxrc on that
  RAM image. This feature is typically used to allow loading of modules
  needed to mount the real root filesystem (e.g. load the SCSI driver
  modules stored in the RAM disk image, and then mount the real root
  filesystem on a SCSI disk.)

  The actual `noinitrd' argument determines what happens to the initrd
  data after the kernel has booted.  When specified, instead of
  converting it to a RAM disk, it is accessible via /dev/initrd, which
  can be read once before the RAM is released back to the system. For
  full details on using the initial RAM disk, please consult
  linux/Documentation/initrd.txt. In addition, the most recent versions
  of LILO and LOADLIN should have additional useful information.


  3.3.  Boot Arguments Related to Memory Handling

  The following arguments alter how Linux detects or handles the
  physical and virtual memory of your system.


  3.3.1.  The `mem=' Argument

  This argument has two purposes: The original purpose was to specify
  the amount of installed memory (or a value less than that if you
  wanted to limit the amount of memory available to linux). The second
  (and hardly used) purpose is to specify mem=nopentium which tells the
  Linux kernel to not use the 4MB page table performance feature.

  The original BIOS call defined in the PC specification  that returns
  the amount of installed memory was only designed to be able to report
  up to 64MB. (Yes, another lack of foresight, just like the 1024
  cylinder disks... sigh.) Linux uses this BIOS call at boot to
  determine how much memory is installed.  If you have more than 64MB of
  RAM installed, you can use this boot argument to tell Linux how much
  memory you have.  Here is a quote from Linus on the usage of the mem=
  parameter.

  ``The kernel will accept any `mem=xx' parameter you give it, and if it
  turns out that you lied to it, it will crash horribly sooner or later.
  The parameter indicates the highest addressable RAM address, so
  `mem=0x1000000' means you have 16MB of memory, for example.  For a
  96MB machine this would be `mem=0x6000000'.  If you tell Linux that it
  has more memory than it actually does have, bad things will happen:
  maybe not at once, but surely eventually.''

  Note that the argument does not have to be in hex, and the suffixes
  `k' and `M' (case insensitive) can be used to specify kilobytes and
  Megabytes, respectively. (A `k' will cause a 10 bit shift on your
  value, and a `M' will cause a 20 bit shift.)  A typical example for a
  128MB machine would be "mem=128m".


  3.3.2.  The `swap=' Argument

  This allows the user to tune some of the virtual memory (VM)
  parameters that are related to swapping to disk. It accepts the
  following eight parameters:


  ______________________________________________________________________
          MAX_PAGE_AGE
          PAGE_ADVANCE
          PAGE_DECLINE
          PAGE_INITIAL_AGE
          AGE_CLUSTER_FRACT
          AGE_CLUSTER_MIN
          PAGEOUT_WEIGHT
          BUFFEROUT_WEIGHT
  ______________________________________________________________________



  Interested hackers are advised to have a read of linux/mm/swap.c and
  also make note of the goodies in /proc/sys/vm. Kernels come with some
  useful documentation on this in the linux/Documentation/vm/ directory.


  3.3.3.  The `buff=' Argument

  Similar to the `swap=' argument, this allows the user to tune some of
  the parameters related to buffer memory management.  It accepts the
  following six parameters:


  ______________________________________________________________________
          MAX_BUFF_AGE
          BUFF_ADVANCE
          BUFF_DECLINE
          BUFF_INITIAL_AGE
          BUFFEROUT_WEIGHT
          BUFFERMEM_GRACE
  ______________________________________________________________________



  Interested hackers are advised to have a read of linux/mm/swap.c and
  also make note of the goodies in /proc/sys/vm.  Kernels come with some
  useful documentation on this in the linux/Documentation/vm/ directory.


  3.4.  Boot Arguments for NFS Root Filesystem

  Linux supports systems such as diskless workstations via having their
  root filesystem as NFS (Network FileSystem).  These arguments are used
  to tell the diskless workstation which machine it is to get its system
  from. Also note that the argument root=/dev/nfs is required. Detailed
  information on using an NFS root fs is in the file
  linux/Documentation/nfsroot.txt. You should read that file, as the
  following is only a quick summary taken directly from that file.


  3.4.1.  The `nfsroot=' Argument

  This argument tells the kernel which machine, what directory and what
  NFS options to use for the root filesystem. The form of the argument
  is as follows:


  ______________________________________________________________________
          nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
  ______________________________________________________________________



  If the nfsroot parameter is not given on the command line, the default
  `/tftpboot/%s' will be used. The other options are as follows:

  <server-ip> -- Specifies the IP address of the NFS server. If this
  field is not given, the default address as determined by the nfsaddrs
  variable (see below) is used. One use of this parameter is for example
  to allow using different servers for RARP and NFS. Usually you can
  leave this blank.

  <root-dir> -- Name of the directory on the server to mount as root. If
  there is a `%s' token in the string, the token will be replaced by the
  ASCII-representation of the client's IP address.

  <nfs-options> -- Standard NFS options. All options are separated by
  commas.  If the options field is not given, the following defaults
  will be used:


          port            = as given by server portmap daemon
          rsize           = 1024
          wsize           = 1024
          timeo           = 7
          retrans         = 3
          acregmin        = 3
          acregmax        = 60
          acdirmin        = 30
          acdirmax        = 60
          flags           = hard, nointr, noposix, cto, ac



  3.4.2.  The `nfsaddrs=' Argument

  This boot argument sets up the various network interface addresses
  that are required to communicate over the network. If this argument is
  not given, then the kernel tries to use RARP and/or BOOTP to figure
  out these parameters. The form is as follows:


  ______________________________________________________________________
          nfsaddrs=<my-ip>:<serv-ip>:<gw-ip>:<netmask>:<name>:<dev>:<auto>
  ______________________________________________________________________



  <my-ip> -- IP address of the client. If empty, the address will either
  be determined by RARP or BOOTP. What protocol is used de- pends on
  what has been enabled during kernel configuration and on the <auto>
  parameter. If this parameter is not empty, neither RARP nor BOOTP will
  be used.

  <serv-ip> -- IP address of the NFS server. If RARP is used to
  determine the client address and this parameter is NOT empty only
  replies from the specified server are accepted. To use different RARP
  and NFS server, specify your RARP server here (or leave it blank), and
  specify your NFS server in the nfsroot parameter (see above). If this
  entry is blank the address of the server is used which answered the
  RARP or BOOTP request.

  <gw-ip> -- IP address of a gateway if the server in on a different
  subnet. If this entry is empty no gateway is used and the server is
  assumed to be on the local network, unless a value has been received
  by BOOTP.

  <netmask> -- Netmask for local network interface. If this is empty,
  the netmask is derived from the client IP address, unless a value has
  been received by BOOTP.

  <name> -- Name of the client. If empty, the client IP address is used
  in ASCII-notation, or the value received by BOOTP.

  <dev> -- Name of network device to use. If this is empty, all devices
  are used for RARP requests, and the first one found for BOOTP. For NFS
  the device is used on which either RARP or BOOTP replies have been
  received. If you only have one device you can safely leave this blank.

  <auto> -- Method to use for autoconfiguration. If this is either
  `rarp' or `bootp' the specified protocol is being used.  If the value
  is `both' or empty, both protocols are used so far as they have been
  enabled during kernel configuration Using 'none' means no
  autoconfiguration. In this case you have to specify all necessary
  values in the fields before.

  The <auto> parameter can appear alone as the value to the nfsaddrs
  parameter (without all the `:' characters before) in which case
  autoconfiguration is used. However, the `none' value is not available
  in that case.


  3.5.  Other Misc. Kernel Boot Arguments

  These various boot arguments let the user tune certain internal kernel
  parameters.


  3.5.1.  The `debug' Argument

  The kernel communicates important (and not-so important) messages to
  the operator via the printk() function.  If the message is considered
  important, the printk() function will put a copy on the present
  console as well as handing it off to the klogd() facility so that it
  gets logged to disk. The reason for printing important messages to the
  console as well as logging them to disk is because under unfortunate
  circumstances (e.g. a disk failure) the message won't make it to disk
  and will be lost.

  The threshold for what is and what isn't considered important is set
  by the console_loglevel variable. The default is to log anything more
  important than DEBUG (level 7) to the console. (These levels are
  defined in the include file kernel.h) Specifying debug as a boot
  argument will set the console loglevel to 10, so that all kernel
  messages appear on the console.

  The console loglevel can usually also be set at run time via an option
  to the klogd() program. Check the man page for the version installed
  on your system to see how to do this.


  3.5.2.  The `init=' Argument

  The kernel defaults to starting the `init' program at boot, which then
  takes care of setting up the computer for users via launching getty
  programs, running `rc' scripts and the like.  The kernel first looks
  for /sbin/init, then /etc/init (depreciated), and as a last resort, it
  will try to use /bin/sh (possibly on /etc/rc).  If for example, your
  init program got corrupted and thus stopped you from being able to
  boot, you could simply use the boot prompt init=/bin/sh which would
  drop you directly into a shell at boot, allowing you to replace the
  corrupted program.


  3.5.3.  The `kbd-reset' Argument

  Normally on i386 based machines, the Linux kernel does not reset the
  keyboard controller at boot, since the BIOS is supposed to do this.
  But as usual, not all machines do what they should. Supplying this
  option may help if you are having problems with your keyboard
  behaviour.  It simply forces a reset at initialization time. (Some
  have argued that this should be the default behaviour anyways).


  3.5.4.  The `maxcpus=' Argument

  The number given with this argument limits the maximum number of CPUs
  activated in SMP mode.  Using a value of 0 is equivalent to the nosmp
  option.


  3.5.5.  The `mca-pentium' Argument

  The IBM model 95 Microchannel machines seem to lock up on the test
  that Linux usually does to detect the type of math chip coupling.
  Since all Pentium chips have a built in math processor, this test (and
  the lock up problem) can be avoided by using this boot option.


  3.5.6.  The `md=' Argument

  If your root filesystem is on a Multiple Device then you can use this
  (assuming you compiled in boot support) to tell the kernel the
  multiple device layout. The format (from the file
  linux/Documentation/md.txt) is:

  md=md_device_num,raid_level,chunk_size_factor,fault_level,dev0,dev1,...,devN

  Where md_device_num is the number of the md device, i.e. 0 means md0,
  1 means md1, etc.  For raid_level, use -1 for linear mode and 0 for
  striped mode.  Other modes are currently unsupported.  The
  chunk_size_factor is for  raid-0 and raid-1 only and sets the chunk
  size as PAGE_SIZE shifted left the specified amount.  The fault_level
  is only for raid-1 and sets the maximum fault number to the specified
  number.  (Currently unsupported due to lack of boot support for
  raid1.)  The dev0-devN are a commaseparated list of the devices that
  make up the individual md device: e.g. /dev/hda1,/dev/hdc1,/dev/sda1



  3.5.7.  The `no387' Argument

  Some i387 coprocessor chips have bugs that show up when used in 32 bit
  protected mode. For example, some of the early ULSI-387 chips would
  cause solid lockups while performing floating point calculations,
  apparently due to a bug in the FRSAV/FRRESTOR instructions.  Using the
  `no387' boot argument causes Linux to ignore the math coprocessor even
  if you have one. Of course you must then have your kernel compiled
  with math emulation support! This may also be useful if you have one
  of those really old 386 machines that could use an 80287 FPU, as Linux
  can't use an 80287.


  3.5.8.  The `no-hlt' Argument

  The i386 (and successors thereof) family of CPUs have a `hlt'
  instruction which tells the CPU that nothing is going to happen until
  an external device (keyboard, modem, disk, etc.) calls upon the CPU to
  do a task. This allows the CPU to enter a `low-power' mode where it
  sits like a zombie until an external device wakes it up (usually via
  an interrupt).  Some of the early i486DX-100 chips had a problem  with
  the `hlt' instruction, in that they couldn't reliably return to
  operating mode after this instruction was used. Using the `no-hlt'
  instruction tells Linux to just run an infinite loop when there is
  nothing else to do, and to not halt your CPU when there is no
  activity. This allows people with these broken chips to use Linux,
  although they would be well advised to seek a replacement through a
  warranty where possible.


  3.5.9.  The `no-scroll' Argument

  Using this argument at boot disables scrolling features that make it
  difficult to use Braille terminals.


  3.5.10.  The `noapic' Argument

  Using this option tells a SMP kernel to not use some of the advanced
  features of the interrupt controller on multi processor machines. See
  linux/Documentation/IO-APIC.txt for more information.


  3.5.11.  The `nosmp' Argument

  Use of this option will tell a SMP kernel on a SMP machine to operate
  single processor.  Typically only used for debugging and determining
  if a particular problem is SMP related.


  3.5.12.  The `panic=' Argument

  In the unlikely event of a kernel panic (i.e. an internal error that
  has been detected by the kernel, and which the kernel decides is
  serious enough to moan loudly and then halt everything), the default
  behaviour is to just sit there until someone comes along and notices
  the panic message on the screen and reboots the machine.  However if a
  machine is running unattended in an isolated location it may be
  desirable for it to automatically reset itself so that the machine
  comes back on line. For example, using panic=30 at boot would cause
  the kernel to try and reboot itself 30 seconds after the kernel panic
  happened. A value of zero gives the default behaviour, which is to
  wait forever.

  Note that this timeout value can also be read and set via the
  /proc/sys/kernel/panic sysctl interface.
  3.5.13.  The `pci=' Argument



  3.5.14.  The `pirq=' Argument

  Using this option tells a SMP kernel information on the PCI slot
  versus IRQ settings for SMP motherboards which are unknown (or known
  to be blacklisted).  See linux/Documentation/IO-APIC.txt for more
  information.


  3.5.15.  The `profile=' Argument

  Kernel developers can enable an option that allows them to profile how
  and where the kernel is spending its CPU cycles in an effort to
  maximize efficiency and performance. This option lets you set the
  profile shift count at boot. Typically it is set to two. You can also
  compile your kernel with profiling enabled by default. In either case,
  you need a tool such as readprofile.c that can make use of the
  /proc/profile output.


  3.5.16.  The `reboot=' Argument

  This option controls the type of reboot that Linux will do when it
  resets the computer (typically via /sbin/init handling a Control-Alt-
  Delete). The default as of v2.0 kernels is to do a `cold' reboot (i.e.
  full reset, BIOS does memory check, etc.) instead of a `warm' reboot
  (i.e. no full reset, no memory check). It was changed to be cold by
  default since that tends to work on cheap/broken hardware that fails
  to reboot when a warm reboot is requested. To get the old behaviour
  (i.e. warm reboots) use reboot=w or in fact any word that starts with
  w will work.

  Why would you bother? Some disk controllers with cache memory on board
  can sense a warm reboot, and flush any cached data to disk. Upon a
  cold boot, the card may be reset and the write-back data in your cache
  card's memory is lost. Others have reported systems that take a long
  time to go through the memory check, and/or SCSI BIOSes that take
  longer to initialize on a cold boot as a good reason to use warm
  reboots.


  3.5.17.  The `reserve=' Argument

  This is used to protect I/O port regions from probes.  The form of the
  command is:


       reserve=iobase,extent[,iobase,extent]...


  In some machines it may be necessary to prevent device drivers from
  checking for devices (auto-probing) in a specific region. This may be
  because of poorly designed hardware that causes the boot to freeze
  (such as some ethercards), hardware that is mistakenly identified,
  hardware whose state is changed by an earlier probe, or merely
  hardware you don't want the kernel to initialize.

  The reserve boot-time argument addresses this problem by specifying an
  I/O port region that shouldn't be probed. That region is reserved in
  the kernel's port registration table as if a device has already been
  found in that region (with the name reserved).  Note that this
  mechanism shouldn't be necessary on most machines.  Only when there is
  a problem or special case would it be necessary to use this.
  The I/O ports in the specified region are protected against device
  probes that do a check_region() prior to probing blindly into a region
  of I/O space. This was put in to be used when some driver was hanging
  on a NE2000, or misidentifying some other device as its own.  A
  correct device driver shouldn't probe a reserved region, unless
  another boot argument explicitly specifies that it do so.  This
  implies that reserve will most often be used with some other boot
  argument. Hence if you specify a reserve region to protect a specific
  device, you must generally specify an explicit probe for that device.
  Most drivers ignore the port registration table if they are given an
  explicit address.

  For example, the boot line


  ______________________________________________________________________
          reserve=0x300,32  blah=0x300
  ______________________________________________________________________



  keeps all device drivers except the driver for `blah' from probing
  0x300-0x31f.

  As usual with boot-time specifiers there is an 11 parameter limit,
  thus you can only specify 5 reserved regions per reserve keyword.
  Multiple reserve specifiers will work if you have an unusually
  complicated request.



  3.5.18.  The `vga=' Argument

  Note that this is not really a boot argument. It is an option that is
  interpreted by LILO and not by the kernel like all the other boot
  arguments are. However its use has become so common that it deserves a
  mention here. It can also be set via using rdev -v or equivalently
  vidmode on the vmlinuz file.  This allows the setup code to use the
  video BIOS to change the default display mode before actually booting
  the Linux kernel. Typical modes are 80x50, 132x44 and so on. The best
  way to use this option is to start with vga=ask which will prompt you
  with a list of various modes that you can use with your video adapter
  before booting the kernel. Once you have the number from the above
  list that you want to use, you can later put it in place of the `ask'.
  For more information, please see the file linux/Documentation/svga.txt
  that comes with all recent kernel versions.

  Note that newer kernels (v2.1 and up) have the setup code that changes
  the video mode as an option, listed as Video mode selection support so
  you need to enable this option if you want to use this feature.


  4.  Boot Arguments to Control PCI Bus Behaviour (`pci=')

  The `pci=' argument (not avail. in v2.0 kernels) can be used to change
  the behaviour of PCI bus device probing and device behaviour. Firstly
  the file linux/drivers/pci/pci.c checks for architecture independent
  pci= options.  The remaining allowed arguments are handled in
  linux/arch/???/kernel/bios32.c and are listed below for ???=i386.


  4.1.  The `pci=bios' and `pci=nobios' Arguments

  These are used to set/clear the flag indicating that the PCI probing
  is to take place via the PCI BIOS.  The default is to use the BIOS.

  4.2.  The `pci=conf1' and `pci=conf2' Arguments

  If PCI direct mode is enabled, the use of these enables either
  configuration Type 1 or Type 2.  These implicitly clear the PCI BIOS
  probe flag (i.e. `pci=nobios') too.


  4.3.  The `pci=io=' Argument

  If you get a message like PCI: Unassigned IO space for.../ then you
  may need to supply an I/O value with this option.  From the source:

  ``Several BIOS'es forget to assign addresses to I/O ranges.  We try to
  fix it here, expecting there are free addresses starting with 0x5800.
  Ugly, but until we come with better resource management, it's the only
  simple solution.''


  4.4.  The `pci=nopeer' Argument

  This disables the default peer bridge fixup, which according to the
  source does the following:

  ``In case there are peer host bridges, scan bus behind each of them.
  Although several sources claim that the host bridges should have
  header type 1 and be assigned a bus number as for PCI2PCI bridges, the
  reality doesn't pass this test and the bus number is usually set by
  BIOS to the first free value.''


  4.5.  The `pci=nosort' Argument

  Using this argument instructs the kernel to not sort the PCI devices
  during the probing phase.


  4.6.  The `pci=off' Argument

  Using this option disables all PCI bus probing. Any device drivers
  that make use of PCI functions to find and initialize hardware will
  most likely fail to work.


  4.7.  The `pci=reverse' Argument

  This option will reverse the ordering of the PCI devices on that PCI
  bus.


  5.  Boot Arguments for Video Frame Buffer Drivers

  The `video=' argument (not avail. in v2.0 kernels) is used when the
  frame buffer device abstraction layer is built into the kernel. If
  that sounds complicated, well it isn't really too bad.  It basically
  means that instead of having a different video program (the X11R6
  server) for each brand of video card (e.g. XF86_S3, XF86_SVGA, ...),
  the kernel would have a built in driver available for each video card
  and export a single interface for the video program so that only one
  X11R6 server (XF86_FBDev) would be required.  This is similar to how
  networking is now - the kernel has drivers available for each brand of
  network card and exports a single network interface so that just one
  version of a network program (like Netscape) will work for all
  systems, regardless of the underlying brand of network card.

  The typical format of this argument is video=name:option1,option2,...
  where name is the name of a generic option or of a frame buffer
  driver.  The video= option is passed from linux/init/main.c into
  linux/drivers/video/fbmem.c for further processing.  Here it is
  checked for some generic options before trying to match to a known
  driver name. Once a driver name match is made, the comma separated
  option list is then passed into that particular driver for final
  processing. The list of valid driver names can be found by reading
  down the fb_drivers array in the file fbmem.c mentioned above.

  Information on the options that each driver supports will eventually
  be found in linux/Documentation/fb/ but currently (v2.2) only a few
  are described there.  Unfortunately the number of video drivers and
  the number of options for each one is content for another document
  itself and hence too much to list here.

  If there is no Documentation file for your card, you will have to get
  the option information directly from the driver. Go to
  linux/drivers/video/ and look in the appropriate ???fb.c file (the ???
  will be based on the card name).  In there, search for a function with
  _setup in its name and you should see what options the driver tries to
  match, such as font or mode or...


  5.1.  The `video=map:...' Argument

  This option is used to set/override the console to frame buffer device
  mapping. A comma separated list of numbers sets the mapping, with the
  value of option N taken to be the frame buffer device number for
  console N.


  5.2.  The `video=scrollback:...' Argument

  A number after the colon will set the size of memory allocated for the
  scrollback buffer. (Use Shift and Page Up or Page Down keys to
  scroll.)  A suffix of `k' or `K' after the number will indicate that
  the number is to be interpreted as kilobytes instead of bytes.


  5.3.  The `video=vc:...' Argument


  A number, or a range of numbers (e.g. video=vc:2-5) will specify the
  first, or the first and last frame buffer virtual console(s). The use
  of this option also has the effect of setting the frame buffer console
  to not be the default console.


  6.  Boot Arguments for SCSI Peripherals.

  This section contains the descriptions of the boot args that are used
  for passing information about the installed SCSI host adapters, and
  SCSI devices.


  6.1.  Arguments for Mid-level Drivers

  The mid level drivers handle things like disks, CD-ROMs and tapes
  without getting into host adapter specifics.


  6.1.1.  Maximum Probed LUNs (`max_scsi_luns=')

  Each SCSI device can have a number of `sub-devices' contained within
  itself. The most common example is any of the SCSI CD-ROMs that handle
  more than one disk at a time.  Each CD is addressed as a `Logical Unit
  Number' (LUN) of that particular device. But most devices, such as
  hard disks, tape drives and such are only one device, and will be
  assigned to LUN zero.

  The problem arises with single LUN devices with bad firmware.  Some
  poorly designed SCSI devices (old and unfortunately new) can not
  handle being probed for LUNs not equal to zero. They will respond by
  locking up, and possibly taking the whole SCSI bus down with them.

  The kernel has a configuration option that allows you to set the
  maximum number of probed LUNs. The default is to only probe LUN zero,
  to avoid the problem described above.

  To specify the number of probed LUNs at boot, one enters
  `max_scsi_luns=n' as a boot arg, where n is a number between one and
  eight. To avoid problems as described above, one would use n=1 to
  avoid upsetting such broken devices


  6.1.2.  SCSI Logging (`scsi_logging=')

  Supplying a non-zero value to this boot argument turns on logging of
  all SCSI events (error, scan, mlqueue, mlcomplete, llqueue,
  llcomplete, hlqueue, hlcomplete).  Note that better control of which
  events are logged can be obtained via the /proc/scsi/scsi interface if
  you aren't interested in the events that take place at boot before the
  /proc/ filesystem is accessible.


  6.1.3.  Parameters for the SCSI Tape Driver (`st=')

  Some boot time configuration of the SCSI tape driver can be achieved
  by using the following:


  ______________________________________________________________________
          st=buf_size[,write_threshold[,max_bufs]]
  ______________________________________________________________________



  The first two numbers are specified in units of kB.  The default
  buf_size is 32kB, and the maximum size that can be specified is a
  ridiculous 16384kB.  The write_threshold is the value at which the
  buffer is committed to tape, with a default value of 30kB.  The
  maximum number of buffers varies with the number of drives detected,
  and has a default of two. An example usage would be:


  ______________________________________________________________________
          st=32,30,2
  ______________________________________________________________________



  Full details can be found in the README.st file that is in the scsi
  directory of the kernel source tree.


  6.2.  Arguments for SCSI Host Adapters

  General notation for this section:

  iobase -- the first I/O port that the SCSI host occupies.  These are
  specified in hexidecimal notation, and usually lie in the range from
  0x200 to 0x3ff.

  irq -- the hardware interrupt that the card is configured to use.
  Valid values will be dependent on the card in question, but will
  usually be 5, 7, 9, 10, 11, 12, and 15. The other values are usually
  used for common peripherals like IDE hard disks, floppies, serial
  ports, etc.

  dma -- the DMA (Direct Memory Access) channel that the card uses.
  Typically only applies to bus-mastering cards.  PCI and VLB cards are
  native bus-masters, and do not require and ISA DMA channel.

  scsi-id -- the ID that the host adapter uses to identify itself on the
  SCSI bus. Only some host adapters allow you to change this value, as
  most have it permanently specified internally. The usual default value
  is seven, but the Seagate and Future Domain TMC-950 boards use six.

  parity -- whether the SCSI host adapter expects the attached devices
  to supply a parity value with all information exchanges.  Specifying a
  one indicates parity checking is enabled, and a zero disables parity
  checking. Again, not all adapters will support selection of parity
  behaviour as a boot argument.


  6.2.1.  Adaptec aha151x, aha152x, aic6260, aic6360, SB16-SCSI
  (`aha152x=')

  The aha numbers refer to cards and the aic numbers refer to the actual
  SCSI chip on these type of cards, including the Soundblaster-16 SCSI.

  The probe code for these SCSI hosts looks for an installed BIOS, and
  if none is present, the probe will not find your card. Then you will
  have to use a boot argument of the form:


  ______________________________________________________________________
           aha152x=iobase[,irq[,scsi-id[,reconnect[,parity]]]]
  ______________________________________________________________________



  Note that if the driver was compiled with debugging enabled, a sixth
  value can be specified to set the debug level.

  All the parameters are as described at the top of this section, and
  the reconnect value will allow device disconnect/reconnect if a non-
  zero value is used. An example usage is as follows:


  ______________________________________________________________________
          aha152x=0x340,11,7,1
  ______________________________________________________________________



  Note that the parameters must be specified in order, meaning that if
  you want to specify a parity setting, then you will have to specify an
  iobase, irq, scsi-id and reconnect value as well.


  6.2.2.  Adaptec aha154x (`aha1542=')

  These are the aha154x series cards. The aha1542 series cards have an
  i82077 floppy controller onboard, while the aha1540 series cards do
  not. These are busmastering cards, and have parameters to set the
  ``fairness'' that is used to share the bus with other devices. The
  boot argument looks like the following.

  ______________________________________________________________________
          aha1542=iobase[,buson,busoff[,dmaspeed]]
  ______________________________________________________________________



  Valid iobase values are usually one of: 0x130, 0x134, 0x230, 0x234,
  0x330, 0x334.  Clone cards may permit other values.

  The buson, busoff values refer to the number of microseconds that the
  card dominates the ISA bus. The defaults are 11us on, and 4us off, so
  that other cards (such as an ISA LANCE Ethernet card) have a chance to
  get access to the ISA bus.

  The dmaspeed value refers to the rate (in MB/s) at which the DMA
  (Direct Memory Access) transfers proceed at. The default is 5MB/s.
  Newer revision cards allow you to select this value as part of the
  soft-configuration, older cards use jumpers. You can use values up to
  10MB/s assuming that your motherboard is capable of handling it.
  Experiment with caution if using values over 5MB/s.


  6.2.3.  Adaptec aha274x, aha284x, aic7xxx (`aic7xxx=')

  These boards can accept an argument of the form:


  ______________________________________________________________________
          aic7xxx=extended,no_reset
  ______________________________________________________________________



  The extended value, if non-zero, indicates that extended translation
  for large disks is enabled. The no_reset value, if non-zero, tells the
  driver not to reset the SCSI bus when setting up the host adaptor at
  boot.


  6.2.4.  AdvanSys SCSI Host Adaptors (`advansys=')

  The AdvanSys driver can accept up to four i/o addresses that will be
  probed for an AdvanSys SCSI card. Note that these values (if used) do
  not effect EISA or PCI probing in any way.  They are only used for
  probing ISA and VLB cards.  In addition, if the driver has been
  compiled with debugging enabled, the level of debugging output can be
  set by adding an 0xdeb[0-f] parameter. The 0-f allows setting the
  level of the debugging messages to any of 16 levels of verbosity.


  6.2.5.  Always IN2000 Host Adaptor (`in2000=')

  Unlike other SCSI host boot arguments, the IN2000 driver uses ASCII
  string prefixes for most of its integer arguments. Here is a list of
  the supported arguments:

  ioport:addr -- Where addr is IO address of a (usually ROM-less) card.

  noreset -- No optional args. Prevents SCSI bus reset at boot time.

  nosync:x -- x is a bitmask where the 1st 7 bits correspond with the 7
  possible SCSI devices (bit 0 for device #0, etc).  Set a bit to
  PREVENT sync negotiation on that device.  The driver default is sync
  DISABLED on all devices.


  period:ns -- ns is the minimum # of nanoseconds in a SCSI data
  transfer period. Default is 500; acceptable values are 250 to 1000.

  disconnect:x -- x = 0 to never allow disconnects, 2 to always allow
  them.  x = 1 does 'adaptive' disconnects, which is the default and
  generally the best choice.

  debug:x If `DEBUGGING_ON' is defined, x is a bitmask that causes
  various types of debug output to printed - see the DB_xxx defines in
  in2000.h

  proc:x -- If `PROC_INTERFACE' is defined, x is a bitmask that
  determines how the /proc interface works and what it does - see the
  PR_xxx defines in in2000.h


  Some example usages are listed below:


  ______________________________________________________________________
          in2000=ioport:0x220,noreset
          in2000=period:250,disconnect:2,nosync:0x03
          in2000=debug:0x1e
          in2000=proc:3
  ______________________________________________________________________



  6.2.6.  AMD AM53C974 based hardware (`AM53C974=')

  Unlike other drivers, this one does not use boot parameters to
  communicate i/o, IRQ or DMA channels. (Since the AM53C974 is a PCI
  device, there shouldn't be a need to do so.)  Instead, the parameters
  are used to communicate the transfer modes and rates that are to be
  used between the host and the target device. This is best described
  with an example:


  ______________________________________________________________________
          AM53C974=7,2,8,15
  ______________________________________________________________________



  This would be interpreted as follows: `For communication between the
  controller with SCSI-ID 7 and the device with SCSI-ID 2, a transfer
  rate of 8MHz in synchronous mode with max. 15 bytes offset should be
  negotiated.' More details can be found in the file
  linux/drivers/scsi/README.AM53C974


  6.2.7.  BusLogic SCSI Hosts with v1.2 kernels (`buslogic=')

  In older kernels, the buslogic driver accepts only one parameter, that
  being the I/O base. It expects that to be one of the following valid
  values: 0x130, 0x134, 0x230, 0x234, 0x330, 0x334.


  6.2.8.  BusLogic SCSI Hosts with v2.x kernels (`BusLogic=')

  With v2.x kernels, the BusLogic driver accepts many parameters.  (Note
  the case in the above; upper case B and L!!!).  There are simply too
  many to list here.  A complete description is tucked away in the
  middle of the driver linux/drivers/scsi/BusLogic.c and searching for
  the string BusLogic= will put you right on it.


  6.2.9.  EATA SCSI Cards (`eata=')

  As of late v2.0 kernels, the EATA drivers will accept a boot argument
  to specify the i/o base(s) to be probed. It is of the form:


  ______________________________________________________________________
          eata=iobase1[,iobase2][,iobase3]...[,iobaseN]
  ______________________________________________________________________



  The driver will probe the addresses in the order that they are listed.



  6.2.10.  Future Domain TMC-8xx, TMC-950 (`tmc8xx=')

  The probe code for these SCSI hosts looks for an installed BIOS, and
  if none is present, the probe will not find your card. Or, if the
  signature string of your BIOS is not recognized then it will also not
  be found. In either case, you will then have to use a boot argument of
  the form:


  ______________________________________________________________________
          tmc8xx=mem_base,irq
  ______________________________________________________________________



  The mem_base value is the value of the memory mapped I/O region that
  the card uses. This will usually be one of the following values:
  0xc8000, 0xca000, 0xcc000, 0xce000, 0xdc000, 0xde000.


  6.2.11.  Future Domain TMC-16xx, TMC-3260, AHA-2920 (`fdomain=')

  The driver detects these cards according to a list of known BIOS ROM
  signatures. For a full list of known BIOS revisions, please see
  linux/drivers/scsi/fdomain.c as it has a lot of information at the top
  of that file. If your BIOS is not known to the driver, you can use an
  override of the form:


  ______________________________________________________________________
          fdomain=iobase,irq[,scsi_id]
  ______________________________________________________________________



  6.2.12.  IOMEGA Parallel Port / ZIP drive (`ppa=')

  This driver is for the IOMEGA Parallel Port SCSI adapter which is
  embedded into the IOMEGA ZIP drives. It may also work with the
  original IOMEGA PPA3 device. The boot argument for this driver is of
  the form:



  ______________________________________________________________________
          ppa=iobase,speed_high,speed_low,nybble
  ______________________________________________________________________



  with all but iobase being optionally specified values. If you wish to
  alter any of the three optional parameters, you are advised to read
  linux/drivers/scsi/README.ppa for details of what they control.


  6.2.13.  NCR5380 based controllers (`ncr5380=')

  Depending on your board, the 5380 can be either i/o mapped or memory
  mapped. (An address below 0x400 usually implies i/o mapping, but PCI
  and EISA hardware use i/o addresses above 0x3ff.) In either case, you
  specify the address, the IRQ value and the DMA channel value. An
  example for an i/o mapped card would be: ncr5380=0x350,5,3. If the
  card doesn't use interrupts, then an IRQ value of 255 (0xff) will
  disable interrupts. An IRQ value of 254 means to autoprobe. More
  details can be found in the file linux/drivers/scsi/README.g_NCR5380


  6.2.14.  NCR53c400 based controllers (`ncr53c400=')

  The generic 53c400 support is done with the same driver as the generic
  5380 support mentioned above. The boot argument is identical to the
  above with the exception that no DMA channel is used by the 53c400.


  6.2.15.  NCR53c406a based controllers (`ncr53c406a=')

  This driver uses a boot argument of the form:


  ______________________________________________________________________
          ncr53c406a=PORTBASE,IRQ,FASTPIO
  ______________________________________________________________________



  where the IRQ and FASTPIO parameters are optional. An interrupt value
  of zero disables the use of interrupts. Using a value of one for the
  FASTPIO parameter enables the use of insl and outsl instructions
  instead of the single-byte inb and outb instructions. The driver can
  also use DMA as a compile-time option.


  6.2.16.  Pro Audio Spectrum (`pas16=')

  The PAS16 uses a NCR5380 SCSI chip, and newer models support jumper-
  less configuration. The boot argument is of the form:


  ______________________________________________________________________
          pas16=iobase,irq
  ______________________________________________________________________



  The only difference is that you can specify an IRQ value of 255, which
  will tell the driver to work without using interrupts, albeit at a
  performance loss. The iobase is usually 0x388.



  6.2.17.  Seagate ST-0x (`st0x=')

  The probe code for these SCSI hosts looks for an installed BIOS, and
  if none is present, the probe will not find your card. Or, if the
  signature string of your BIOS is not recognized then it will also not
  be found. In either case, you will then have to use a boot argument of
  the form:


  ______________________________________________________________________
          st0x=mem_base,irq
  ______________________________________________________________________



  The mem_base value is the value of the memory mapped I/O region that
  the card uses. This will usually be one of the following values:
  0xc8000, 0xca000, 0xcc000, 0xce000, 0xdc000, 0xde000.


  6.2.18.  Trantor T128 (`t128=')

  These cards are also based on the NCR5380 chip, and accept the
  following options:


  ______________________________________________________________________
          t128=mem_base,irq
  ______________________________________________________________________



  The valid values for mem_base are as follows: 0xcc000, 0xc8000,
  0xdc000, 0xd8000.


  6.2.19.  Ultrastor SCSI cards (`u14-34f=')

  Note that there appears to be two independent drivers for this card,
  namely CONFIG_SCSI_U14_34F that uses u14-34f.c and
  CONFIG_SCSI_ULTRASTOR that uses ultrastor.c. It is the u14-34f one
  that (as of late v2.0 kernels) accepts a boot argument of the form:


  ______________________________________________________________________
          u14-34f=iobase1[,iobase2][,iobase3]...[,iobaseN]
  ______________________________________________________________________



  The driver will probe the addresses in the order that they are listed.


  6.2.20.  Western Digital WD7000 cards (`wd7000=')

  The driver probe for the wd7000 looks for a known BIOS ROM string and
  knows about a few standard configuration settings.  If it doesn't come
  up with the correct values for your card, or you have an unrecognized
  BIOS version, you can use a boot argument of the form:


  ______________________________________________________________________
          wd7000=irq,dma,iobase
  ______________________________________________________________________


  6.3.  SCSI Host Adapters that don't Accept Boot Args

  At present, the following SCSI cards do not make use of any boot-time
  parameters. In some cases, you can hard-wire values by directly
  editing the driver itself, if required.


          Adaptec aha1740 (EISA probing),
          NCR53c7xx,8xx (PCI, both drivers)
          Qlogic Fast (0x230, 0x330)
          Qlogic ISP (PCI)



  7.  Hard Disks

  This section lists all the boot args associated with standard MFM/RLL,
  ST-506, XT, and IDE disk drive devices.  Note that both the IDE and
  the generic ST-506 HD driver both accept the `hd=' option.


  7.1.  IDE Disk/CD-ROM Driver Parameters

  The IDE driver accepts a number of parameters, which range from disk
  geometry specifications, to support for advanced or broken controller
  chips. The following is a summary of all the possible boot arguments.
  For full details, you really should consult the file ide.txt in the
  linux/Documentation directory, from which this summary was extracted.


  ______________________________________________________________________

   "hdx="  is recognized for all "x" from "a" to "h", such as "hdc".
   "idex=" is recognized for all "x" from "0" to "3", such as "ide1".

   "hdx=noprobe"              : drive may be present, but do not probe for it
   "hdx=none"         : drive is NOT present, ignore cmos and do not probe
   "hdx=nowerr"               : ignore the WRERR_STAT bit on this drive
   "hdx=cdrom"                : drive is present, and is a cdrom drive
   "hdx=cyl,head,sect"        : disk drive is present, with specified geometry
   "hdx=autotune"             : driver will attempt to tune interface speed
                                  to the fastest PIO mode supported,
                                  if possible for this drive only.
                                  Not fully supported by all chipset types,
                                  and quite likely to cause trouble with
                                  older/odd IDE drives.

   "idex=noprobe"             : do not attempt to access/use this interface
   "idex=base"                : probe for an interface at the addr specified,
                                  where "base" is usually 0x1f0 or 0x170
                                  and "ctl" is assumed to be "base"+0x206
   "idex=base,ctl"    : specify both base and ctl
   "idex=base,ctl,irq"        : specify base, ctl, and irq number
   "idex=autotune"    : driver will attempt to tune interface speed
                                  to the fastest PIO mode supported,
                                  for all drives on this interface.
                                  Not fully supported by all chipset types,
                                  and quite likely to cause trouble with
                                  older/odd IDE drives.
   "idex=noautotune"  : driver will NOT attempt to tune interface speed
                                  This is the default for most chipsets,
                                  except the cmd640.
   "idex=serialize"   : do not overlap operations on idex and ide(x^1)
  ______________________________________________________________________

  The following are valid ONLY on ide0, and the defaults for the
  base,ctl ports must not be altered.


  ______________________________________________________________________

   "ide0=dtc2278"             : probe/support DTC2278 interface
   "ide0=ht6560b"             : probe/support HT6560B interface
   "ide0=cmd640_vlb"  : *REQUIRED* for VLB cards with the CMD640 chip
                            (not for PCI -- automatically detected)
   "ide0=qd6580"              : probe/support qd6580 interface
   "ide0=ali14xx"             : probe/support ali14xx chipsets (ALI M1439/M1445)
   "ide0=umc8672"             : probe/support umc8672 chipsets
  ______________________________________________________________________



  Everything else is rejected with a "BAD OPTION" message.


  7.2.  Standard ST-506 Disk Driver Options (`hd=')

  The standard disk driver can accept geometry arguments for the disks
  similar to the IDE driver. Note however that it only expects three
  values (C/H/S) -- any more or any less and it will silently ignore
  you. Also, it only accepts `hd=' as an argument, i.e. `hda=', `hdb='
  and so on are not valid here. The format is as follows:


  ______________________________________________________________________
          hd=cyls,heads,sects
  ______________________________________________________________________



  If there are two disks installed, the above is repeated with the
  geometry parameters of the second disk.


  7.3.  XT Disk Driver Options (`xd=')

  If you are unfortunate enough to be using one of these old 8 bit cards
  that move data at a whopping 125kB/s then here is the scoop.  The
  probe code for these cards looks for an installed BIOS, and if none is
  present, the probe will not find your card. Or, if the signature
  string of your BIOS is not recognized then it will also not be found.
  In either case, you will then have to use a boot argument of the form:


  ______________________________________________________________________
          xd=type,irq,iobase,dma_chan
  ______________________________________________________________________



  The type value specifies the particular manufacturer of the card, and
  are as follows: 0=generic; 1=DTC; 2,3,4=Western Digital,
  5,6,7=Seagate; 8=OMTI. The only difference between multiple types from
  the same manufacturer is the BIOS string used for detection, which is
  not used if the type is specified.

  The xd_setup() function does no checking on the values, and assumes
  that you entered all four values. Don't disappoint it.  Here is an
  example usage for a WD1002 controller with the BIOS disabled/removed,
  using the `default' XT controller parameters:

  ______________________________________________________________________
          xd=2,5,0x320,3
  ______________________________________________________________________



  8.  CD-ROMs (Non-SCSI/ATAPI/IDE)

  This section lists all the possible boot args pertaining to CD-ROM
  devices. Note that this does not include SCSI or IDE/ATAPI CD-ROMs.
  See the appropriate section(s) for those types of CD-ROMs.

  Note that most of these CD-ROMs have documentation files that you
  should read, and they are all in one handy place:
  linux/Documentation/cdrom.


  8.1.  The Aztech Interface (`aztcd=')

  The syntax for this type of card is:


  ______________________________________________________________________
          aztcd=iobase[,magic_number]
  ______________________________________________________________________



  If you set the magic_number to 0x79 then the driver will try and run
  anyway in the event of an unknown firmware version. All other values
  are ignored.


  8.2.  The CDU-31A and CDU-33A Sony Interface (`cdu31a=')

  This CD-ROM interface is found on some of the Pro Audio Spectrum sound
  cards, and other Sony supplied interface cards.  The syntax is as
  follows:


  ______________________________________________________________________
          cdu31a=iobase,[irq[,is_pas_card]]
  ______________________________________________________________________



  Specifying an IRQ value of zero tells the driver that hardware
  interrupts aren't supported (as on some PAS cards). If your card
  supports interrupts, you should use them as it cuts down on the CPU
  usage of the driver.

  The `is_pas_card' should be entered as `PAS' if using a Pro Audio
  Spectrum card, and otherwise it should not be specified at all.


  8.3.  The CDU-535 Sony Interface (`sonycd535=')

  The syntax for this CD-ROM interface is:


  ______________________________________________________________________
          sonycd535=iobase[,irq]
  ______________________________________________________________________


  A zero can be used for the I/O base as a `placeholder' if one wishes
  to specify an IRQ value.


  8.4.  The GoldStar Interface (`gscd=')

  The syntax for this CD-ROM interface is:


  ______________________________________________________________________
          gscd=iobase
  ______________________________________________________________________



  8.5.  The ISP16 Interface (`isp16=')

  The syntax for this CD-ROM interface is:


  ______________________________________________________________________
          isp16=[port[,irq[,dma]]][[,]drive_type]
  ______________________________________________________________________



  Using a zero for irq or dma means that they are not used. The
  allowable values for drive_type are noisp16, Sanyo, Panasonic, Sony,
  and Mitsumi.  Using noisp16 disables the driver altogether.


  8.6.  The Mitsumi Standard Interface (`mcd=')

  The syntax for this CD-ROM interface is:


  ______________________________________________________________________
          mcd=iobase,[irq[,wait_value]]
  ______________________________________________________________________



  The wait_value is used as an internal timeout value for people who are
  having problems with their drive, and may or may not be implemented
  depending on a compile time DEFINE.


  8.7.  The Mitsumi XA/MultiSession Interface (`mcdx=')

  At present this `experimental' driver has a setup function, but no
  parameters are implemented yet (as of 1.3.15).  This is for the same
  hardware as above, but the driver has extended features.


  8.8.  The Optics Storage Interface (`optcd=')

  The syntax for this type of card is:


  ______________________________________________________________________
          optcd=iobase
  ______________________________________________________________________



  8.9.  The Phillips CM206 Interface (`cm206=')

  The syntax for this type of card is:


  ______________________________________________________________________
          cm206=[iobase][,irq]
  ______________________________________________________________________



  The driver assumes numbers between 3 and 11 are IRQ values, and
  numbers between 0x300 and 0x370 are I/O ports, so you can specify one,
  or both numbers, in any order.  It also accepts `cm206=auto' to enable
  autoprobing.


  8.10.  The Sanyo Interface (`sjcd=')

  The syntax for this type of card is:


  ______________________________________________________________________
          sjcd=iobase[,irq[,dma_channel]]
  ______________________________________________________________________



  8.11.  The SoundBlaster Pro Interface (`sbpcd=')

  The syntax for this type of card is:


  ______________________________________________________________________
          sbpcd=iobase,type
  ______________________________________________________________________



  where type is one of the following (case sensitive) strings:
  `SoundBlaster', `LaserMate', or `SPEA'.  The I/O base is that of the
  CD-ROM interface, and not that of the sound portion of the card.


  9.  Serial and ISDN Drivers

  9.1.  The ICN ISDN driver (`icn=')

  This ISDN driver expects a boot argument of the form:


  ______________________________________________________________________
          icn=iobase,membase,icn_id1,icn_id2
  ______________________________________________________________________



  where iobase is the i/o port address of the card, membase is the
  shared memory base address of the card, and the two icn_id are unique
  ASCII string identifiers.



  9.2.  The PCBIT ISDN driver (`pcbit=')

  This boot argument takes integer pair arguments of the form:


  ______________________________________________________________________
          pcbit=membase1,irq1[,membase2,irq2]
  ______________________________________________________________________



  where membaseN is the shared memory base of the N'th card, and irqN is
  the interrupt setting of the N'th card. The default is IRQ 5 and
  membase 0xD0000.


  9.3.  The Teles ISDN driver (`teles=')

  This ISDN driver expects a boot argument of the form:


  ______________________________________________________________________
          teles=iobase,irq,membase,protocol,teles_id
  ______________________________________________________________________



  where iobase is the i/o port address of the card, membase is the
  shared memory base address of the card, irq is the interrupt channel
  the card uses, and teles_id is the unique ASCII string identifier.


  9.4.  The DigiBoard Driver (`digi=')

  The DigiBoard driver accepts a string of six comma separated
  identifiers or integers.  The 6 values in order are:


          Enable/Disable this card
          Type of card: PC/Xi(0), PC/Xe(1), PC/Xeve(2), PC/Xem(3)
          Enable/Disable alternate pin arrangement
          Number of ports on this card
          I/O Port where card is configured (in HEX if using string identifiers)
          Base of memory window (in HEX if using string identifiers)



  An example of a correct boot prompt argument (in both identifier and
  integer form) is:


  ______________________________________________________________________
          digi=E,PC/Xi,D,16,200,D0000
          digi=1,0,0,16,512,851968
  ______________________________________________________________________



  Note that the driver defaults to an i/o of 0x200 and a shared memory
  base of 0xD0000 in the absence of a digi= boot argument.  There is no
  autoprobing performed. More details can be found in the file
  linux/Documentation/digiboard.txt.



  9.5.  The RISCom/8 Multiport Serial Driver (`riscom8=')

  Up to four boards can be supported by supplying four unique i/o port
  values for each individual board installed.  Other details can be
  found in the file linux/Documentation/riscom8.txt.


  9.6.  The Baycom Serial/Parallel Radio Modem (`baycom=')

  The format of the boot argument for these devices is:


  ______________________________________________________________________
          baycom=modem,io,irq,options[,modem,io,irq,options]
  ______________________________________________________________________



  Using modem=1 means you have the ser12 device, modem=2 means you have
  the par96 device. Using options=0 means use hardware DCD, and
  options=1 means use software DCD. The io and irq are the i/o port base
  and interrupt settings as usual.  There is more details in the file
  README.baycom which is currently in the /linux/drivers/char/
  directory.


  10.  Other Hardware Devices

  Any other devices that didn't fit into any of the above categories got
  lumped together here.


  10.1.  Ethernet Devices (`ether=')

  Different drivers make use of different parameters, but they all at
  least share having an IRQ, an I/O port base value, and a name. In its
  most generic form, it looks something like this:


  ______________________________________________________________________
          ether=irq,iobase[,param_1[,param_2,...param_8]]],name
  ______________________________________________________________________



  The first non-numeric argument is taken as the name.  The param_n
  values (if applicable) usually have different meanings for each
  different card/driver.  Typical param_n values are used to specify
  things like shared memory address, interface selection, DMA channel
  and the like.

  The most common use of this parameter is to force probing for a second
  ethercard, as the default is to only probe for one. This can be
  accomplished with a simple:


  ______________________________________________________________________
          ether=0,0,eth1
  ______________________________________________________________________



  Note that the values of zero for the IRQ and I/O base in the above
  example tell the driver(s) to autoprobe.


  IMPORTANT NOTE TO MODULE USERS: The above will not force a probe for a
  second card if you are using the driver(s) as run time loadable
  modules (instead of having them complied into the kernel).  Most Linux
  distributions use a bare bones kernel combined with a large selection
  of modular drivers.  The ether= only applies to drivers compiled
  directly into the kernel.

  The Ethernet-HowTo has complete and extensive documentation on using
  multiple cards and on the card/driver specific implementation of the
  param_n values where used.  Interested readers should refer to the
  section in that document on their particular card for more complete
  information.  Ethernet-HowTo
  <http://metalab.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html>


  10.2.  The Floppy Disk Driver (`floppy=')

  There are many floppy driver options, and they are all listed in
  README.fd in linux/drivers/block.  There are too many options in that
  file to list here. Instead, only those options that may be required to
  get a Linux install to proceed on less than normal hardware are
  reprinted here.

  floppy=0,daring Tells the floppy driver that your floppy controller
  should be used with caution (disables all daring operations).

  floppy=thinkpad Tells the floppy driver that you have a Thinkpad.
  Thinkpads use an inverted convention for the disk change line.

  floppy=nodma Tells the floppy driver not to use DMA for data
  transfers.  This is needed on HP Omnibooks, which don't have a
  workable DMA channel for the floppy driver. This option is also useful
  if you frequently get "Unable to allocate DMA memory" messages.  Use
  of `nodma' is not recommended if you have a FDC without a FIFO (8272A
  or 82072). 82072A and later are OK). The FDC model is reported at
  boot.  You also need at least a 486 to use nodma.

  floppy=nofifo Disables the FIFO entirely. This is needed if you get
  `Bus master arbitration error' messages from your Ethernet card (or
  from other devices) while accessing the floppy.

  floppy=broken_dcl Don't use the disk change line, but assume that the
  disk was changed whenever the device node is reopened. Needed on some
  boxes where the disk change line is broken or unsupported.  This
  should be regarded as a stopgap measure, indeed it makes floppy
  operation less efficient due to unneeded cache flushings, and slightly
  more unreliable. Please verify your cable connection and jumper
  settings if you have any DCL problems. However, some older drives, and
  also some Laptops are known not to have a DCL.

  floppy=debug Print (additional) debugging messages.

  floppy=messages Print informational messages for some operations (disk
  change notifications, warnings about over and underruns, and about
  autodetection).


  10.3.  The Sound Driver (`sound=')

  The sound driver can also accept boot args to override the compiled in
  values. This is not recommended, as it is rather complex and the
  documentation for it in the kernel mysteriously vanished (a hint).
  You are better off to use sound as a module, or compile in your own
  values.


  If you choose to use it regardless, then processing of the argument
  takes place in the file dev_table.c in linux/drivers/sound. It accepts
  a boot arg of the form:


  ______________________________________________________________________
          sound=device1[,device2[,device3...[,device11]]]
  ______________________________________________________________________



  where each deviceN value is of the following format 0xDTaaaId and the
  bytes are used as follows:

  D - second DMA channel (zero if not applicable)

  T - device type: 1=FM, 2=SB, 3=PAS, 4=GUS, 5=MPU401, 6=SB16,
  7=SB16-MIDI,...  The listing of soundcard types up to 26 (don't forget
  to convert back to hex for command line use) are listed in the file
  linux/include/linux/soundcard.h and 27 to 999 (newer models) can be
  found in the file linux/drivers/sound/dev_table.h.

  aaa - I/O address in hex.

  I - interrupt line in hex (i.e 10=a, 11=b, ...)

  d - First DMA channel.

  As you can see it gets pretty messy, and you really are better off to
  use a modular driver or compile in your own personal values as
  recommended. Using a boot arg of `sound=0' will disable the sound
  driver entirely.


  10.4.  The Bus Mouse Driver (`bmouse=')

  The busmouse driver only accepts one parameter, that being the
  hardware IRQ value to be used.


  10.5.  The MS Bus Mouse Driver (`msmouse=')

  The MS mouse driver only accepts one parameter, that being the
  hardware IRQ value to be used.


  10.6.  The Printer Driver (`lp=')

  With this boot argument you can tell the printer driver what ports to
  use and what ports not to use. The latter comes in handy if you don't
  want the printer driver to claim all available parallel ports, so that
  other drivers (e.g. PLIP, PPA) can use them instead.

  The format of the argument is multiple i/o, IRQ pairs. For example,
  lp=0x3bc,0,0x378,7 would use the port at 0x3bc in IRQ-less (polling)
  mode, and use IRQ 7 for the port at 0x378. The port at 0x278 (if any)
  would not be probed, since autoprobing only takes place in the absence
  of a lp= argument. To disable the printer driver entirely, one can use
  lp=0.


  11.  Copying, Translations, Closing, etc.

  Hey, you made it to the end! (Phew...)  Now just the legal stuff.


  11.1.  Copyright and Disclaimer

  This document is Copyright (c) 1995-1999 by Paul Gortmaker.  Copying
  and redistribution is allowed under the conditions as outlined in the
  Linux Documentation Project Copyright, available from where you
  obtained this document, OR as outlined in the GNU General Public
  License, version 2 (see linux/COPYING).

  This document is not gospel. However, it is probably the most up to
  date info that you will be able to find. Nobody is responsible for
  what happens to your hardware but yourself. If your stuff goes up in
  smoke, or anything else bad happens, we take no responsibility. ie.
  THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGES INCURRED DUE TO ACTIONS
  TAKEN BASED ON THE INFORMATION INCLUDED IN THIS DOCUMENT.

  A hint to people considering doing a translation.  First, translate
  the SGML source (available via FTP from the HowTo main site) so that
  you can then generate other output formats.  Be sure to keep a copy of
  the original English SGML source that you translated from! When an
  updated HowTo is released, get the new SGML source for that version,
  and then a simple diff -u old.sgml new.sgml will show you exactly what
  has changed so that you can easily incorporate those changes into your
  translated SMGL source without having to re-read or re-translate
  everything.

  If you are intending to incorporate this document into a published
  work, please make contact (via e-mail) so that you can be supplied
  with the most up to date information available. In the past, out of
  date versions of the Linux HowTo documents have been published, which
  caused the developers undue grief from being plagued with questions
  that were already answered in the up to date versions.


  11.2.  Closing

  If you have found any glaring typos, or outdated info in this
  document, please let me know. It is easy to overlook stuff, as the
  kernel (and the number of drivers) is huge compared to what it was
  when I started this.

  Thanks,

  Paul Gortmaker, p_gortmaker@yahoo.com




The Linux Bootdisk HOWTO

Tom Fawcett

           fawcett+BH@croftj.net
   
   Copyright  1995,1996,1997,1998,1999,2000 by Tom Fawcett and Graham
   Chapman.
   
   v4.0, April 2000
   
   This document describes how to design and build your own boot/root
   diskettes for Linux. These disks can be used as rescue disks or to
   test new system components. You should be reasonably familiar with
   system administration tasks before attempting to build your own
   bootdisk. If you just want a rescue disk to have for emergencies, see
   [1]Appendix A.1.
     _________________________________________________________________
   
   Table of Contents
   [2]Preface
          
        [3]Version notes
        [4]Yet to do
        [5]Feedback and credits
        [6]Distribution policy
                
   [7]Introduction
   [8]Bootdisks and the boot process
          
        [9]The boot process
        [10]Disk types
                
   [11]Building a root filesystem
          
        [12]Overview
        [13]Creating the filesystem
        [14]Populating the filesystem
        [15]Providing for PAM and NSS
        [16]Modules
        [17]Some final details
        [18]Wrapping it up
                
   [19]Choosing a kernel
   [20]Putting them together: Making the diskette(s)
          
        [21]Transferring the kernel with LILO
        [22]Transferring the kernel without LILO
        [23]Setting the ramdisk word
        [24]Transferring the root filesystem
                
   [25]Troubleshooting, or The Agony of Defeat
   [26]Miscellaneous topics
          
        [27]Reducing root filesystem size
        [28]Non-ramdisk root filesystems
        [29]Building a utility disk
                
   [30]How the pros do it
   [31]Frequently Asked Question (FAQ) list
   Appendix A. [32]Resources and pointers
          
        [33]Pre-made Bootdisks
        [34]Rescue packages
        [35]LILO -- the Linux loader
        [36]Linux FAQ and HOWTOs
        [37]Ramdisk usage
        [38]The Linux boot process
                
   Appendix B. [39]LILO boot error codes
   Appendix C. [40]Sample root filesystem listings
   Appendix D. [41]Sample utility disk directory listing
          
Preface

     Important: This document may be outdated. If the date on the title
     page is more than six months ago, please check the
     [42]Bootdisk-HOWTO homepage to see if a more recent version exists.
     
   Although this document should be legible in its text form, it looks
   much better in Postscript, PDF or HTML forms because of the
   typographical conventions used.
     _________________________________________________________________
   
Version notes

   Graham Chapman wrote the original Bootdisk-HOWTO and he supported it
   through version 3.1. Tom Fawcett started as co-author around the time
   kernel v2 was introduced. He is the document's current maintainer.
   
   This information is intended for Linux on the Intel platform. Much of
   this information may be applicable to Linux on other processors, but
   we have no first-hand experience or information about this. If you
   have experience with bootdisks on other platforms, please contact us.
     _________________________________________________________________
   
Yet to do

   Any volunteers?
   
    1. Describe (or link to another document that describes) how to
       create other bootable disk-like things, such as CDROMs, ZIP disks
       and LS110 disks.
    2. Describe how to deal with the huge libc.so shared libraries. The
       options are basically to get older, smaller libraries or to cut
       down existing libraries.
    3. Re-analyze distribution bootdisks and update the "How the Pros do
       it" section.
    4. Delete section that describes how to upgrade existing distribution
       bootdisks. This is usually more trouble than it's worth.
    5. Rewrite/streamline the Troubleshooting section.
     _________________________________________________________________
   
Feedback and credits

   I welcome any feedback, good or bad, on the content of this document.
   I/we have done our best to ensure that the instructions and
   information herein are accurate and reliable. Please let me know if
   you find errors or omissions. When writing, please indicate the
   version number of the document you're referencing.
   
   We thank the many people who assisted with corrections and
   suggestions. Their contributions have made it far better than we could
   ever have done alone.
   
   Send comments, corrections and questions to the author at the email
   address above. I don't mind trying to answer questions, but if you
   have a specific question about why your bootdisk doesn't work, please
   read [43]the section called Troubleshooting, or The Agony of Defeat
   first.
     _________________________________________________________________
   
Distribution policy

   Copyright  1995,1996,1997,1998,1999,2000 by Tom Fawcett and Graham
   Chapman. This document may be distributed under the terms set forth in
   the [44]Linux Documentation Project License. Please contact the
   authors if you are unable to get the license.
   
   This is free documentation. It is distributed in the hope that it will
   be useful, but without any warranty; without even the implied warranty
   of merchantability or fitness for a particular purpose.
     _________________________________________________________________
   
Introduction

   Linux boot disks are useful in a number of situations, such as testing
   a new kernel, recovering from a disk failure (anything from a lost
   boot sector to a disk head crash), fixing a disabled system, or
   upgrading critical system files safely (such as libc.so).
   
   There are several ways of obtaining boot disks:
   
     * Use one from a distribution such as Slackware. This will at least
       allow you to boot.
     * Use a rescue package to set up disks designed to be used as rescue
       disks.
     * Learn what is required for each of the types of disk to operate,
       then build your own.
       
   Some people choose the last option so they can do it themselves. That
   way, if something breaks, they can work out what to do to fix it. Plus
   it's a great way to learn about how a Linux system works.
   
   This document assumes some basic familiarity with Linux system
   administration concepts. For example, you should know about
   directories, filesystems and floppy diskettes. You should know how to
   use mount and df. You should know what /etc/passwd and fstab files are
   for and what they look like. You should know that most of the commands
   in this HOWTO should be run as root.
   
   Constructing your own bootdisk from scratch can be complicated. If you
   haven't read the Linux FAQ and related documents, such as the Linux
   Installation HOWTO and the Linux Installation Guide, you should not be
   trying to build boot diskettes. If you just need a working bootdisk
   for emergencies, it is much easier to download a prefabricated one.
   See [45]Appendix A.1, below, for where to find these.
     _________________________________________________________________
   
Bootdisks and the boot process

   A bootdisk is basically a miniature, self-contained Linux system on a
   floppy diskette. It must perform many of the same functions that a
   complete full-size Linux system performs. Before trying to build one
   you should understand the basic Linux boot process. We present the
   basics here, which are sufficient for understanding the rest of this
   document. Many details and alternative options have been omitted.
     _________________________________________________________________
   
The boot process

   All PC systems start the boot process by executing code in ROM
   (specifically, the BIOS) to load the sector from sector 0, cylinder 0
   of the boot drive. The boot drive is usually the first floppy drive
   (designated A: in DOS and /dev/fd0 in Linux). The BIOS then tries to
   execute this sector. On most bootable disks, sector 0, cylinder 0
   contains either:
   
     * code from a boot loader such as LILO, which locates the kernel,
       loads it and executes it to start the boot proper.
     * the start of an operating system kernel, such as Linux.
       
   If a Linux kernel has been raw-copied to a diskette, the first sector
   of the disk will be the first sector of the Linux kernel itself. This
   first sector will continue the boot process by loading the rest of the
   kernel from the boot device.
   
   Once the kernel is completely loaded, it goes through some basic
   device initialization. It then tries to load and mount a root
   filesystem from some device. A root filesystem is simply a filesystem
   that is mounted as ``/''. The kernel has to be told where to look for
   the root filesystem; if it cannot find a loadable image there, it
   halts.
   
   In some boot situations - often when booting from a diskette - the
   root filesystem is loaded into a ramdisk, which is RAM accessed by the
   system as if it were a disk. There are two reasons why the system
   loads to ramdisk. First, RAM is several orders of magnitude faster
   than a floppy disk, so system operation is fast; and second, the
   kernel can load a compressed filesystem from the floppy and uncompress
   it onto the ramdisk, allowing many more files to be squeezed onto the
   diskette.
   
   Once the root filesystem is loaded and mounted, you see a message
   like:
        VFS: Mounted root (ext2 filesystem) readonly.

   At this point the system finds the init program on the root filesystem
   (in /bin or /sbin) and executes it. init reads its configuration file
   /etc/inittab, looks for a line designated sysinit, and executes the
   named script. The sysinit script is usually something like /etc/rc or
   /etc/init.d/boot. This script is a set of shell commands that set up
   basic system services, such as:
   
     * Running fsck on all the disks,
     * Loading necessary kernel modules,
     * Starting swapping,
     * Initializing the network,
     * Mounting disks mentioned in fstab.
       
   This script often invokes various other scripts to do modular
   initialization. For example, in the common SysVinit structure, the
   directory /etc/rc.d/ contains a complex structure of subdirectories
   whose files specify how to enable and shut down most system services.
   However, on a bootdisk the sysinit script is often very simple.
   
   When the sysinit script finishes control returns to init, which then
   enters the default runlevel, specified in inittab with the initdefault
   keyword. The runlevel line usually specifies a program like getty,
   which is responsible for handling commununications through the console
   and ttys. It is the getty program which prints the familiar ``login:''
   prompt. The getty program in turn invokes the login program to handle
   login validation and to set up user sessions.
     _________________________________________________________________
   
Disk types

   Having reviewed the basic boot process, we can now define various
   kinds of disks involved. We classify disks into four types. The
   discussion here and throughout this document uses the term ``disk'' to
   refer to floppy diskettes unless otherwise specified, though most of
   the discussion could apply equally well to hard disks.
   
   boot
          A disk containing a kernel which can be booted. The disk can be
          used to boot the kernel, which then may load a root file system
          on another disk. The kernel on a bootdisk usually must be told
          where to find its root filesystem.
          
          Often a bootdisk loads a root filesystem from another diskette,
          but it is possible for a bootdisk to be set up to load a hard
          disk's root filesystem instead. This is commonly done when
          testing a new kernel (in fact, ``make zdisk'' will create such
          a bootdisk automatically from the kernel source code).
          
   root
          A disk with a filesystem containing files required to run a
          Linux system. Such a disk does not necessarily contain either a
          kernel or a boot loader.
          
          A root disk can be used to run the system independently of any
          other disks, once the kernel has been booted. Usually the root
          disk is automatically copied to a ramdisk. This makes root disk
          accesses much faster, and frees up the disk drive for a utility
          disk.
          
   boot/root
          A disk which contains both the kernel and a root filesystem. In
          other words, it contains everything necessary to boot and run a
          Linux system without a hard disk. The advantage of this type of
          disk is that is it compact - everything required is on a single
          disk. However, the gradually increasing size of everything
          means that it is increasingly difficult to fit everything on a
          single diskette, even with compression.
          
   utility
          A disk which contains a filesystem, but is not intended to be
          mounted as a root file system. It is an additional data disk.
          You would use this type of disk to carry additional utilities
          where you have too much to fit on your root disk.
          
   In general, when we talk about ``building a bootdisk'' we mean
   creating both the boot (kernel) and root (files) portions. They may be
   either together (a single boot/root disk) or separate (boot + root
   disks). The most flexible approach for rescue diskettes is probably to
   use separate boot and root diskettes, and one or more utility
   diskettes to handle the overflow.
     _________________________________________________________________
   
Building a root filesystem

   Creating the root filesystem involves selecting files necessary for
   the system to run. In this section we describe how to build a
   compressed root filesystem. A less common option is to build an
   uncompressed filesystem on a diskette that is directly mounted as
   root; this alternative is described in [46]the section called
   Non-ramdisk root filesystems.
     _________________________________________________________________
   
Overview

   A root filesystem must contain everything needed to support a full
   Linux system. To be able to do this, the disk must include the minimum
   requirements for a Linux system:
   
     * The basic file system structure,
     * Minimum set of directories: /dev, /proc, /bin, /etc, /lib, /usr,
       /tmp,
     * Basic set of utilities: sh, ls, cp, mv, etc.,
     * Minimum set of config files: rc, inittab, fstab, etc.,
     * Devices: /dev/hd*, /dev/tty*, /dev/fd0, etc.,
     * Runtime library to provide basic functions used by utilities.
       
   Of course, any system only becomes useful when you can run something
   on it, and a root diskette usually only becomes useful when you can do
   something like:
   
     * Check a file system on another drive, for example to check your
       root file system on your hard drive, you need to be able to boot
       Linux from another drive, as you can with a root diskette system.
       Then you can run fsck on your original root drive while it is not
       mounted.
     * Restore all or part of your original root drive from backup using
       archive and compression utilities such as cpio, tar, gzip and
       ftape.
       
   We will describe how to build a compressed filesystem, so called
   because it is compressed on disk and, when booted, is uncompressed
   onto a ramdisk. With a compressed filesystem you can fit many files
   (approximately six megabytes) onto a standard 1440K diskette. Because
   the filesystem is much larger than a diskette, it cannot be built on
   the diskette. We have to build it elsewhere, compress it, then copy it
   to the diskette.
     _________________________________________________________________
   
Creating the filesystem

   In order to build such a root filesystem, you need a spare device that
   is large enough to hold all the files before compression. You will
   need a device capable of holding about four megabytes. There are
   several choices:
   
     * Use a ramdisk (DEVICE = /dev/ram0). In this case, memory is used
       to simulate a disk drive. The ramdisk must be large enough to hold
       a filesystem of the appropriate size. If you use LILO, check your
       configuration file (/etc/lilo.conf) for a line like RAMDISK = nnn
       which determines the maximum RAM that can be allocated to a
       ramdisk. The default is 4096K, which should be sufficient. You
       should probably not try to use such a ramdisk on a machine with
       less than 8MB of RAM. Check to make sure you have a device like
       /dev/ram0, /dev/ram or /dev/ramdisk. If not, create /dev/ram0 with
       mknod (major number 1, minor 0).
     * If you have an unused hard disk partition that is large enough
       (several megabytes), this is acceptable.
     * Use a loopback device, which allows a disk file to be treated as a
       device. Using a loopback device you can create a three megabyte
       file on your hard disk and build the filesystem on it.
       Type man losetup for instructions on using loopback devices. If
       you don't have losetup, you can get it along with compatible
       versions of mount and unmount from the util-linux package in the
       directory [47]ftp://ftp.win.tue.nl/pub/linux/utils/util-linux/.
       If you do not have a loop device (/dev/loop0, /dev/loop1, etc.) on
       your system, you will have to create one with ``mknod /dev/loop0 b
       7 0''. Once you've installed these special mount and umount
       binaries, create a temporary file on a hard disk with enough
       capacity (eg, /tmp/fsfile). You can use a command like:
       
        dd if=/dev/zero of=/tmp/fsfile bs=1k count=nnn

       to create an nnn-block file.
       Use the file name in place of DEVICE below. When you issue a mount
       command you must include the option -o loop to tell mount to use a
       loopback device. For example:
       
        mount -o loop -t ext2 /tmp/fsfile /mnt

       will mount /tmp/fsfile via a loopback device at the mount point
       /mnt. A df will confirm this.
       
   After you've chosen one of these options, prepare the DEVICE with:
        dd if=/dev/zero of=DEVICE bs=1k count=4096

   This command zeroes out the device.
   
     Important: Zeroing the device is critical because the filesystem
     will be compressed later, so all unused portions should be filled
     with zeroes to achieve maximum compression. Keep this fact in mind
     whenever you delete files from your root filesystem. The filesystem
     will correctly de-allocate the blocks, but it will not zero them
     out again. If you do a lot of deletions and copying, your
     compressed filesystem may end up much larger than necessary.
     
   Next, create the filesystem. The Linux kernel recognizes two file
   system types for root disks to be automatically copied to ramdisk.
   These are minix and ext2, of which ext2 is preferred. If using ext2,
   you may find it useful to use the -i option to specify more inodes
   than the default; -i 2000 is suggested so that you don't run out of
   inodes. Alternatively, you can save on inodes by removing lots of
   unnecessary /dev files. mke2fs will by default create 360 inodes on a
   1.44Mb diskette. I find that 120 inodes is ample on my current rescue
   root diskette, but if you include all the devices in the /dev
   directory then you will easily exceed 360. Using a compressed root
   filesystem allows a larger filesystem, and hence more inodes by
   default, but you may still need to either reduce the number of files
   or increase the number of inodes.
   
   So the command you use will look like:
        mke2fs -m 0 -i 2000 DEVICE

   (If you're using a loopback device, the disk file you're using should
   be supplied in place of this DEVICE.)
   
   The mke2fs command will automatically detect the space available and
   configure itself accordingly. The ``-m 0'' parameter prevents it from
   reserving space for root, and hence provides more usable space on the
   disk.
   
   Next, mount the device:
        mount -t ext2 DEVICE /mnt

   (You must create a mount point /mnt if it does not already exist.) In
   the remaining sections, all destination directory names are assumed to
   be relative to /mnt.
     _________________________________________________________________
   
Populating the filesystem

   Here is a reasonable minimum set of directories for your root
   filesystem [48][1]:
   
     * /dev -- Devices, required to perform I/O
     * /proc -- Directory stub required by the proc filesystem
     * /etc -- System configuration files
     * /sbin -- Critical system binaries
     * /bin -- Essential binaries considered part of the system
     * /lib -- Shared libraries to provide run-time support
     * /mnt -- A mount point for maintenance on other disks
     * /usr -- Additional utilities and applications
       
   Three of these directories will be empty on the root filesystem, so
   they only need to be created with mkdir. The /proc directory is
   basically a stub under which the proc filesystem is placed. The
   directories /mnt and /usr are only mount points for use after the
   boot/root system is running. Hence again, these directories only need
   to be created.
   
   The remaining four directories are described in the following
   sections.
     _________________________________________________________________
   
/dev

   A /dev directory containing a special file for all devices to be used
   by the system is mandatory for any Linux system. The directory itself
   is a normal directory, and can be created with mkdir in the normal
   way. The device special files, however, must be created in a special
   way, using the mknod command.
   
   There is a shortcut, though -- copy your existing /dev directory
   contents, and delete the ones you don't want. The only requirement is
   that you copy the device special files using -R option. This will copy
   the directory without attempting to copy the contents of the files. Be
   sure to use an upper case R. The command is:
        cp -dpR /dev /mnt

   assuming that the diskette is mounted at /mnt. The dp switches ensure
   that symbolic links are copied as links, rather than using the target
   file, and that the original file attributes are preserved, thus
   preserving ownership information.
   
   If you want to do it the hard way, use ls -l to display the major and
   minor device numbers for the devices you want, and create them on the
   diskette using mknod.
   
   However the devices are copied, it is worth checking that any special
   devices you need have been placed on the rescue diskette. For example,
   ftape uses tape devices, so you will need to copy all of these if you
   intend to access your floppy tape drive from the bootdisk.
   
   Note that one inode is required for each device special file, and
   inodes can at times be a scarce resource, especially on diskette
   filesystems. It therefore makes sense to remove any device special
   files that you don't need from the diskette /dev directory. For
   example, if you do not have SCSI disks you can safely remove all the
   device files starting with sd. Similarly, if you don't intend to use
   your serial port then all device files starting with cua can go.
   
     Important: Be sure to include the following files from this
     directory: console, kmem, mem, null, ram0 and tty1.
     _________________________________________________________________
   
/etc

   This directory contains important configuration files. On most
   systems, these can be divided into three groups:
   
    1. Required at all times, e.g. rc, fstab, passwd.
    2. May be required, but no one is too sure.
    3. Junk that crept in.
       
   Files which are not essential can usually be identified with the
   command:
        ls -ltru

   This lists files in reverse order of date last accessed, so if any
   files are not being accessed, they can be omitted from a root
   diskette.
   
   On my root diskettes, I have the number of config files down to 15.
   This reduces my work to dealing with three sets of files:
   
    1. The ones I must configure for a boot/root system:
         a. rc.d/* -- system startup and run level change scripts
         b. fstab -- list of file systems to be mounted
         c. inittab -- parameters for the init process, the first process
            started at boot time.
    2. The ones I should tidy up for a boot/root system:
         a. passwd -- Critical list of users, home directories, etc.
         b. group -- user groups.
         c. shadow -- passwords of users. You may not have this.
         d. termcap -- the terminal capability database.
       If security is important, passwd and shadow should be pruned to
       avoid copying user passwords off the system, and so that unwanted
       logins are rejected when you boot from diskette.
       Be sure that passwd contains at least root. If you intend other
       users to login, be sure their home directories and shells exist.
       termcap, the terminal database, is typically several hundred
       kilobytes. The version on your boot/root diskette should be pruned
       down to contain only the terminal(s) you use, which is usually
       just the linux or linux-console entry.
    3. The rest. They work at the moment, so I leave them alone.
       
   Out of this, I only really have to configure two files, and what they
   should contain is surprisingly small.
   
     * rc should contain:
       
        #!/bin/sh
        /bin/mount -av
        /bin/hostname Kangaroo

       Be sure the directories are right. You don't really need to run
       hostname -- it just looks nicer if you do.
     * fstab should contain at least:
       
        /dev/ram0       /               ext2    defaults
        /dev/fd0        /               ext2    defaults
        /proc           /proc           proc    defaults

       You can copy entries from your existing fstab, but you should not
       automatically mount any of your hard disk partitions; use the
       noauto keyword with them. Your hard disk may be damaged or dead
       when the bootdisk is used.
       
   Your inittab should be changed so that its sysinit line runs rc or
   whatever basic boot script will be used. Also, if you want to ensure
   that users on serial ports cannot login, comment out all the entries
   for getty which include a ttys or ttyS device at the end of the line.
   Leave in the tty ports so that you can login at the console.
   
   A minimal inittab file looks like this:
        id:2:initdefault:
        si::sysinit:/etc/rc
        1:2345:respawn:/sbin/getty 9600 tty1
        2:23:respawn:/sbin/getty 9600 tty2

   The inittab file defines what the system will run in various states
   including startup, move to multi-user mode, etc. Check carefully the
   filenames mentioned in inittab; if init cannot find the program
   mentioned the bootdisk will hang, and you may not even get an error
   message.
   
   Note that some programs cannot be moved elsewhere because other
   programs have hardcoded their locations. For example on my system,
   /etc/shutdown has hardcoded in it /etc/reboot. If I move reboot to
   /bin/reboot, and then issue a shutdown command, it will fail because
   it cannot find the reboot file.
   
   For the rest, just copy all the text files in your /etc directory,
   plus all the executables in your /etc directory that you cannot be
   sure you do not need. As a guide, consult the sample listing in
   [49]Appendix Appendix C. Probably it will suffice to copy only those
   files, but systems differ a great deal, so you cannot be sure that the
   same set of files on your system is equivalent to the files in the
   list. The only sure method is to start with inittab and work out what
   is required.
   
   Most systems now use an /etc/rc.d/ directory containing shell scripts
   for different run levels. The minimum is a single rc script, but it
   may be simpler just to copy inittab and the /etc/rc.d directory from
   your existing system, and prune the shell scripts in the rc.d
   directory to remove processing not relevent to a diskette system
   environment.
     _________________________________________________________________
   
/bin and /sbin

   The /bin directory is a convenient place for extra utilities you need
   to perform basic operations, utilities such as ls, mv, cat and dd. See
   [50]Appendix Appendix C for an example list of files that go in a /bin
   and /sbin directories. It does not include any of the utilities
   required to restore from backup, such as cpio, tar and gzip. That is
   because I place these on a separate utility diskette, to save space on
   the boot/root diskette. Once the boot/root diskette is booted, it is
   copied to the ramdisk leaving the diskette drive free to mount another
   diskette, the utility diskette. I usually mount this as /usr.
   
   Creation of a utility diskette is described below in [51]the section
   called Building a utility disk. It is probably desirable to maintain a
   copy of the same version of backup utilities used to write the backups
   so you don't waste time trying to install versions that cannot read
   your backup tapes.
   
     Important: Be sure to include the following programs: init, getty
     or equivalent, login, mount, some shell capable of running your rc
     scripts, a link from sh to the shell.
     _________________________________________________________________
   
/lib

   In /lib you place necessary shared libraries and loaders. If the
   necessary libraries are not found in your /lib directory then the
   system will be unable to boot. If you're lucky you may see an error
   message telling you why.
   
   Nearly every program requires at least the libc library, libc.so.N,
   where N is the current version number. Check your /lib directory. The
   file libc.so.N is usually a symlink to a filename with a complete
   version number:
   
% ls -l /lib/libc*
-rwxr-xr-x   1 root     root      4016683 Apr 16 18:48 libc-2.1.1.so*
lrwxrwxrwx   1 root     root           13 Apr 10 12:25 libc.so.6 -> libc-2.1.1.
so*

   In this case, you want libc-2.1.1.so. To find other libraries you
   should go through all the binaries you plan to include and check their
   dependencies with ldd. For example:
        % ldd /sbin/mke2fs
        libext2fs.so.2 => /lib/libext2fs.so.2 (0x40014000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x40026000)
        libuuid.so.1 => /lib/libuuid.so.1 (0x40028000)
        libc.so.6 => /lib/libc.so.6 (0x4002c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

   Each file on the right-hand side is required. The file may be a
   symbolic link.
   
   Note that some libraries are quite large and will not fit easily on
   your root filesystem. For example, the libc.so listed above is about 4
   meg. You will probably need to strip libraries when copying them to
   your root filesystem. See [52]the section called Reducing root
   filesystem size for instructions.
   
   In /lib you must also include a loader for the libraries. The loader
   will be either ld.so (for A.OUT libraries, which are no longer common)
   or ld-linux.so (for ELF libraries). Newer versions of ldd tell you
   exactly which loader is needed, as in the example above, but older
   versions may not. If you're unsure which you need, run the file
   command on the library. For example:
% file /lib/libc.so.4.7.2 /lib/libc.so.5.4.33 /lib/libc-2.1.1.so
/lib/libc.so.4.7.2: Linux/i386 demand-paged executable (QMAGIC), stripped
/lib/libc.so.5.4.33: ELF 32-bit LSB shared object, Intel 80386, version 1, stri
pped
/lib/libc-2.1.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1, not s
tripped

   The QMAGIC indicates that 4.7.2 is for A.OUT libraries, and ELF
   indicates that 5.4.33 and 2.1.1 are for ELF.
   
   Copy the specific loader(s) you need to the root filesystem you're
   building. Libraries and loaders should be checked carefully against
   the included binaries. If the kernel cannot load a necessary library,
   the kernel may hang with no error message.
     _________________________________________________________________
   
Providing for PAM and NSS

   Your system may require dynamically loaded libraries that are not
   visible to ldd. If you don't provide for these, you may have trouble
   logging in or using your bootdisk.
     _________________________________________________________________
   
PAM (Pluggable Authentication Modules)

   If your system uses PAM (Pluggable Authentication Modules), you must
   make some provision for it on your bootdisk. Briefly, PAM is a
   sophisticated modular method for authenticating users and controlling
   their access to services. An easy way to determine if your system uses
   PAM is run ldd on your login executable; if the output includes
   libpam.so, you need PAM.
   
   Fortunately, security is usually of no concern with bootdisks since
   anyone who has physical access to a machine can usually do anything
   they want anyway. Therefore, you can effectively disable PAM by
   creating a simple /etc/pam.conf file in your root filesystem that
   looks like this:
OTHER   auth       optional     /lib/security/pam_permit.so
OTHER   account    optional     /lib/security/pam_permit.so
OTHER   password   optional     /lib/security/pam_permit.so
OTHER   session    optional     /lib/security/pam_permit.so

   Also copy the file /lib/security/pam_permit.so to your root
   filesystem. This library is only about 8K so it imposes minimal
   overhead.
   
   This configuration allows anyone complete access to the files and
   services on your machine. If you care about security on your bootdisk
   for some reason, you'll have to copy some or all of your hard disk's
   PAM setup to your root filesystem. Be sure to read the PAM
   documentation carefully, and copy any libraries needed in
   /lib/security onto your root filesystem.
   
   You must also include /lib/libpam.so on your bootdisk. But you already
   know this since you ran ldd on /bin/login, which showed this
   dependency.
     _________________________________________________________________
   
NSS (Name Service Switch)

   If you are using glibc (aka libc6), you will have to make provisions
   for name services or you will not be able to login. The file
   /etc/nsswitch.conf controls database lookups for various servies. If
   you don't plan to access services from the network (eg, DNS or NIS
   lookups), you need only prepare a simple nsswitch.conf file that looks
   like this:
     passwd:     files
     shadow:     files
     group:      files
     hosts:      files
     services:   files
     networks:   files
     protocols:  files
     rpc:        files
     ethers:     files
     netmasks:   files
     bootparams: files
     automount:  files
     aliases:    files
     netgroup:   files
     publickey:  files

   This specifies that every service be provided only by local files. You
   will also need to include /lib/libnss_files.so.X, where X is 1 for
   glibc 2.0 and 2 for glibc 2.1. This library will be loaded dynamically
   to handle the file lookups.
   
   If you plan to access the network from your bootdisk, you may want to
   create a more elaborate nsswitch.conf file. See the nsswitch man page
   for details. You must include a file /lib/libnss_service.so.1 for each
   service you specify.
     _________________________________________________________________
   
Modules

   If you have a modular kernel, you must consider which modules you may
   want to load from your bootdisk after booting. You might want to
   include ftape and zftape modules if your backup tapes are on floppy
   tape, modules for SCSI devices if you have them, and possibly modules
   for PPP or SLIP support if you want to access the net in an emergency.
   
   These modules may be placed in /lib/modules. You should also include
   insmod, rmmod and lsmod. Depending on whether you want to load modules
   automatically, you might also include modprobe, depmod and swapout. If
   you use kerneld, include it along with /etc/conf.modules.
   
   However, the main advantage to using modules is that you can move
   non-critical modules to a utility disk and load them when needed, thus
   using less space on your root disk. If you may have to deal with many
   different devices, this approach is preferable to building one huge
   kernel with many drivers built in.
   
     Important: In order to boot a compressed ext2 filesystem, you must
     have ramdisk and ext2 support built-in. They cannot be supplied as
     modules.
     _________________________________________________________________
   
Some final details

   Some system programs, such as login, complain if the file
   /var/run/utmp and the directory /var/log do not exist. So:
        mkdir -p /mnt/var/{log,run{
        touch /mnt/var/run/utmp

   Finally, after you have set up all the libraries you need, run
   ldconfig to remake /etc/ld.so.cache on the root filesystem. The cache
   tells the loader where to find the libraries. To remake ld.so.cache,
   issue the following commands:
        chdir /mnt; chroot /mnt /sbin/ldconfig

   The chroot is necessary because ldconfig always remakes the cache for
   the root filesystem.
     _________________________________________________________________
   
Wrapping it up

   Once you have finished constructing the root filesystem, unmount it,
   copy it to a file and compress it:
        umount /mnt
        dd if=DEVICE bs=1k | gzip -v9 > rootfs.gz

   When this finishes you will have a file rootfs.gz. This is your
   compressed root filesystem. You should check its size to make sure it
   will fit on a diskette; if it doesn't you'll have to go back and
   remove some files. Some suggestions for reducing root filesystem size
   appear in [53]the section called Reducing root filesystem size.
     _________________________________________________________________
   
Choosing a kernel

   At this point you have a complete compressed root filesystem. The next
   step is to build or select a kernel. In most cases it would be
   possible to copy your current kernel and boot the diskette from that.
   However, there may be cases where you wish to build a separate one.
   
   One reason is size. If you are building a single boot/root diskette,
   the kernel will be one of the largest files on the diskette so you
   will have to reduce the size of the kernel as much as possible. To
   reduce kernel size, build it with the minumum set of facilities
   necessary to support the desired system. This means leaving out
   everything you don't need. Networking is a good thing to leave out, as
   well as support for any disk drives and other devices which you don't
   need when running your boot/root system. As stated before, your kernel
   must have ramdisk and ext2 support built into it.
   
   Having worked out a minimum set of facilities to include in a kernel,
   you then need to work out what to add back in. Probably the most
   common uses for a boot/root diskette system would be to examine and
   restore a corrupted root file system, and to do this you may need
   kernel support. For example, if your backups are all held on tape
   using Ftape to access your tape drive, then, if you lose your current
   root drive and drives containing Ftape, then you will not be able to
   restore from your backup tapes. You will have to reinstall Linux,
   download and reinstall ftape, and then try to read your backups.
   
   The point here is that, whatever I/O support you have added to your
   kernel to support backups should also be added into your boot/root
   kernel.
   
   The procedure for actually building the kernel is described in the
   documentation that comes with the kernel. It is quite easy to follow,
   so start by looking in /usr/src/linux. If you have trouble building a
   kernel, you should probably not attempt to build boot/root systems
   anyway. Remember to compress the kernel with ``make zImage''.
     _________________________________________________________________
   
Putting them together: Making the diskette(s)

   At this point you have a kernel and a compressed root filesystem. If
   you are making a boot/root disk, check their sizes to make sure they
   will both fit on one disk. If you are making a two disk boot+root set,
   check the root filesystem to make sure it will fit on a single
   diskette.
   
   You should decide whether to use LILO to boot the bootdisk kernel. The
   alternative is to copy the kernel directly to the diskette and boot
   without LILO. The advantage of using LILO is that it enables you to
   supply some parameters to the kernel which may be necessary to
   initialize your hardware (Check the file /etc/lilo.conf on your
   system. If it exists and has a line like ``append=...'', you probably
   need this feature). The disadvantage of using LILO is that building
   the bootdisk is more complicated and takes slightly more space. You
   will have to set up a small separate filesystem, which we shall call
   the kernel filesystem, where you transfer the kernel and a few other
   files that LILO needs.
   
   If you are going to use LILO, read on; if you are going to transfer
   the kernel directly, skip ahead to [54]the section called Transferring
   the kernel without LILO.
     _________________________________________________________________
   
Transferring the kernel with LILO

   The first thing you must do is create a small configuration file for
   LILO. It should look like this:
        boot      =/dev/fd0
        install   =/boot/boot.b
        map       =/boot/map
        read-write
        backup    =/dev/null
        compact
        image     = KERNEL
        label     = Bootdisk
        root      =/dev/fd0

   For an explanation of these parameters, see LILO's user documentation.
   You will probably also want to add an append=... line to this file
   from your hard disk's /etc/lilo.conf file.
   
   Save this file as bdlilo.conf.
   
   You now have to create a small filesystem, which we shall call a
   kernel filesystem, to distinguish it from the root filesystem.
   
   First, figure out how large the filesystem should be. Take the size of
   your kernel in blocks (the size shown by ``ls -l KERNEL'' divided by
   1024 and rounded up) and add 50. Fifty blocks is approximately the
   space needed for inodes plus other files. You can calculate this
   number exactly if you want to, or just use 50. If you're creating a
   two-disk set, you may as well overestimate the space since the first
   disk is only used for the kernel anyway. Call this number
   KERNEL_BLOCKS.
   
   Put a floppy diskette in the drive (for simplicity we'll assume
   /dev/fd0) and create an ext2 kernel filesystem on it:
        mke2fs -i 8192 -m 0 /dev/fd0 KERNEL_BLOCKS

   The ``-i 8192'' specifies that we want one inode per 8192 bytes. Next,
   mount the filesystem, remove the lost+found directory, and create dev
   and boot directories for LILO:
        mount /dev/fd0 /mnt
        rm -rf /mnt/lost+found
        mkdir /mnt/{boot,dev}

   Next, create devices /dev/null and /dev/fd0. Instead of looking up the
   device numbers, you can just copy them from your hard disk using -R:
        cp -R /dev/{null,fd0} /mnt/dev

   LILO needs a copy of its boot loader, boot.b, which you can take from
   your hard disk. It is usually kept in the /boot directory.
        cp /boot/boot.b /mnt/boot

   Finally, copy in the LILO configuration file you created in the last
   section, along with your kernel. Both can be put in the root
   directory:
        cp bdlilo.conf KERNEL /mnt

   Everything LILO needs is now on the kernel filesystem, so you are
   ready to run it. LILO's -r flag is used for installing the boot loader
   on some other root:
        lilo -v -C bdlilo.conf -r /mnt

   LILO should run without error, after which the kernel filesystem
   should look something like this:
total 361
  1 -rw-r--r--   1 root     root          176 Jan 10 07:22 bdlilo.conf
  1 drwxr-xr-x   2 root     root         1024 Jan 10 07:23 boot/
  1 drwxr-xr-x   2 root     root         1024 Jan 10 07:22 dev/
358 -rw-r--r--   1 root     root       362707 Jan 10 07:23 vmlinuz
boot:
total 8
  4 -rw-r--r--   1 root     root         3708 Jan 10 07:22 boot.b
  4 -rw-------   1 root     root         3584 Jan 10 07:23 map
dev:
total 0
  0 brw-r-----   1 root     root       2,   0 Jan 10 07:22 fd0
  0 crw-r--r--   1 root     root       1,   3 Jan 10 07:22 null

   Do not worry if the file sizes are slightly different from yours.
   
   Now leave the diskette in the drive and go to [55]the section called
   Setting the ramdisk word.
     _________________________________________________________________
   
Transferring the kernel without LILO

   If you are not using LILO, transfer the kernel to the bootdisk with
   dd:
        % dd if=KERNEL of=/dev/fd0 bs=1k
        353+1 records in
        353+1 records out

   In this example, dd wrote 353 complete records + 1 partial record, so
   the kernel occupies the first 354 blocks of the diskette. Call this
   number KERNEL_BLOCKS and remember it for use in the next section.
   
   Finally, set the root device to be the diskette itself, then set the
   root to be loaded read/write:
        rdev /dev/fd0 /dev/fd0
        rdev -R /dev/fd0 0

   Be careful to use a capital -R in the second rdev command.
     _________________________________________________________________
   
Setting the ramdisk word

   Inside the kernel image is the ramdisk word that specifies where the
   root filesystem is to be found, along with other options. The word can
   be accessed and set via the rdev command, and its contents are
   interpreted as follows:
   
   Bit field Description
   0-10 Offset to start of ramdisk, in 1024 byte blocks
   11-13 unused
   14 Flag indicating that ramdisk is to be loaded
   15 Flag indicating to prompt before loading rootfs
   
   If bit 15 is set, on boot-up you will be prompted to place a new
   floppy diskette in the drive. This is necessary for a two-disk boot
   set.
   
   There are two cases, depending on whether you are building a single
   boot/root diskette or a double ``boot+root'' diskette set.
   
    1. If you are building a single disk, the compressed root filesystem
       will be placed right after the kernel, so the offset will be the
       first free block (which should be the same as KERNEL_BLOCKS). Bit
       14 will be set to 1, and bit 15 will be zero. For example, say
       you're building a single disk and the root filesystem will begin
       at block 253 (decimal). The ramdisk word value should be 253
       (decimal) with bit 14 set to 1 and bit 15 set to 0. To calculate
       the value you can simply add the decimal values. 253 + (2^14) =
       253 + 16384 = 16637. If you don't quite understand where this
       number comes from, plug it into a scientific calculator and
       convert it to binary,
    2. If you are building a two-disk set, the root filesystem will begin
       at block zero of the second disk, so the offset will be zero. Bit
       14 will be set to 1 and bit 15 will be 1. The decimal value will
       be 2^14 + 2^15 = 49152 in this case.
       
   After carefully calculating the value for the ramdisk word, set it
   with rdev -r. Be sure to use the decimal value. If you used LILO, the
   argument to rdev here should be the mounted kernel path, e.g.
   /mnt/vmlinuz; if you copied the kernel with dd, instead use the floppy
   device name (e.g., /dev/fd0).
        rdev -r KERNEL_OR_FLOPPY_DRIVE  VALUE

   If you used LILO, unmount the diskette now.
     _________________________________________________________________
   
Transferring the root filesystem

   The last step is to transfer the root filesystem.
   
     * If the root filesystem will be placed on the same disk as the
       kernel, transfer it using dd with the seek option, which specifies
       how many blocks to skip:
       
        dd if=rootfs.gz of=/dev/fd0 bs=1k seek=KERNEL_BLOCKS

     * If the root filesystem will be placed on a second disk, remove the
       first diskette, put the second diskette in the drive, then
       transfer the root filesystem to it:
       
        dd if=rootfs.gz of=/dev/fd0 bs=1k

   Congratulations, you are done!
   
     Important: You should always test a bootdisk before putting it
     aside for an emergency. If it fails to boot, read on.
     _________________________________________________________________
   
Troubleshooting, or The Agony of Defeat

   When building bootdisks, the first few tries often will not boot. The
   general approach to building a root disk is to assemble components
   from your existing system, and try and get the diskette-based system
   to the point where it displays messages on the console. Once it starts
   talking to you, the battle is half over because you can see what it is
   complaining about, and you can fix individual problems until the
   system works smoothly. If the system just hangs with no explanation,
   finding the cause can be difficult. To get a system to boot to the
   stage where it will talk to you requires several components to be
   present and correctly configured. The recommended procedure for
   investigating the problem where the system will not talk to you is as
   follows:
   
     * You may see a message like this:
       
Kernel panic: VFS: Unable to mount root fs on XX:YY

       This is a common problem and it has only a few causes. First,
       check the device XX:YY against the list of device codes; is it the
       correct root device? If not, you probably didn't do an rdev -R, or
       you did it on the wrong image. If the device code is correct, then
       check carefully the device drivers compiled into your kernel. Make
       sure it has floppy disk, ramdisk and ext2 filesystem support
       built-in.
     * If you see many errors like:
       
end_request: I/O error, dev 01:00 (ramdisk), sector NNN

       This is an I/O error being reported by the ramdisk driver,
       probably because the kernel is trying to write beyond the end of
       the device. Your ramdisk is too small to hold your root
       filesystem. Check your bootdisk kernel's initialization messages
       for a line like:
       
        Ramdisk driver initialized : 16 ramdisks of 4096K size

       Check this size against the uncompressed size of the root
       filesystem. If the ramdisks aren't large enough, make them larger.
     * Check that the root disk actually contains the directories you
       think it does. It is easy to copy at the wrong level so that you
       end up with something like /rootdisk/bin instead of /bin on your
       root diskette.
     * Check that there is a /lib/libc.so with the same link that appears
       in your /lib directory on your hard disk.
     * Check that any symbolic links in your /dev directory in your
       existing system also exist on your root diskette filesystem, where
       those links are to devices which you have included in your root
       diskette. In particular, /dev/console links are essential in many
       cases.
     * Check that you have included /dev/tty1, /dev/null, /dev/zero,
       /dev/mem, /dev/ram and /dev/kmem files.
     * Check your kernel configuration -- support for all resources
       required up to login point must be built in, not modules. So
       ramdisk and ext2 support must be built-in.
     * Check that your kernel root device and ramdisk settings are
       correct.
       
   Once these general aspects have been covered, here are some more
   specific files to check:
   
    1. Make sure init is included as /sbin/init or /bin/init. Make sure
       it is executable.
    2. Run ldd init to check init's libraries. Usually this is just
       libc.so, but check anyway. Make sure you included the necessary
       libraries and loaders.
    3. Make sure you have the right loader for your libraries -- ld.so
       for a.out or ld-linux.so for ELF.
    4. Check the /etc/inittab on your bootdisk filesystem for the calls
       to getty (or some getty-like program, such as agetty, mgetty or
       getty_ps). Double-check these against your hard disk inittab.
       Check the man pages of the program you use to make sure these make
       sense. inittab is possibly the trickiest part because its syntax
       and content depend on the init program used and the nature of the
       system. The only way to tackle it is to read the man pages for
       init and inittab and work out exactly what your existing system is
       doing when it boots. Check to make sure /etc/inittab has a system
       initialisation entry. This should contain a command to execute the
       system initialization script, which must exist.
    5. As with init, run ldd on your getty to see what it needs, and make
       sure the necessary library files and loaders were included in your
       root filesystem.
    6. Be sure you have included a shell program (e.g., bash or ash)
       capable of running all of your rc scripts.
    7. If you have a /etc/ld.so.cache file on your rescue disk, remake
       it.
       
   If init starts, but you get a message like:
        Id xxx respawning too fast: disabled for 5 minutes

   it is coming from init, usually indicating that getty or login is
   dying as soon as it starts up. Check the getty and login executables
   and the libraries they depend upon. Make sure the invocations in
   /etc/inittab are correct. If you get strange messages from getty, it
   may mean the calling form in /etc/inittab is wrong.
   
   If you get a login prompt, and you enter a valid login name but the
   system prompts you for another login name immediately, the problem may
   be with PAM or NSS. See [56]the section called Providing for PAM and
   NSS. The problem may also be that you use shadow passwords and didn't
   copy /etc/shadow to your bootdisk.
   
   If you try to run some executable, such as df, which is on your rescue
   disk but you yields a message like: df: not found, check two things:
   (1) Make sure the directory containing the binary is in your PATH, and
   (2) make sure you have libraries (and loaders) the program needs.
     _________________________________________________________________
   
Miscellaneous topics

Reducing root filesystem size

   Sometimes a root filesystem is too large to fit on a diskette even
   after compression. Here are some ways to reduce the filesystem size:
   
    1. Increase the diskette density. By default, floppy diskettes are
       formatted at 1440K, but higher density formats are available.
       fdformat will format disks for the following sizes: 1600, 1680,
       1722, 1743, 1760, 1840, and 1920. Most 1440K drives will support
       1722K, and this is what I always use for bootdisks. See the
       fdformat man page and /usr/src/linux/Documentation/devices.txt.
    2. Replace your shell. Some of the popular shells for Linux, such as
       bash and tcsh, are large and require many libraries. Light-weight
       alternatives exist, such as ash, lsh, kiss and smash, which are
       much smaller and require few (or no) libraries. Most of these
       replacement shells are available from
       [57]http://metalab.unc.edu/pub/Linux/system/shells/. Make sure any
       shell you use is capable of running commands in all the rc files
       you include on your bootdisk.
    3. Strip libraries and binaries. Many libraries and binaries are
       distributed with debugging information. Running file on these
       files will tell you ``not stripped'' if so. When copying binaries
       to your root filesystem, it is good practice to use:
       
      objcopy --strip-all FROM TO

     Important: When copying libraries, be sure to use strip-debug
     instead of strip-all.
     
    4. If you deleted or moved files much when you were creating the root
       filesystem, create it again. See the NOTE ABOVE on the importance
       of not having dirty blocks in the filesystem.
    5. Move non-critical files to a utility disk. If some of your
       binaries are not needed immediately to boot or login, you can move
       them to a utility disk. See [58]the section called Building a
       utility disk for details. You may also consider moving modules to
       a utility disk as well.
     _________________________________________________________________
   
Non-ramdisk root filesystems

   [59]the section called Building a root filesystem gave instructions
   for building a compressed root filesystem which is loaded to ramdisk
   when the system boots. This method has many advantages so it is
   commonly used. However, some systems with little memory cannot afford
   the RAM needed for this, and they must use root filesystems mounted
   directly from the diskette.
   
   Such filesystems are actually easier to build than compressed root
   filesystems because they can be built on a diskette rather than on
   some other device, and they do not have to be compressed. We will
   outline the procedure as it differs from the instructions above. If
   you choose to do this, keep in mind that you will have much less space
   available.
   
    1. Calculate how much space you will have available for root files.
       If you are building a single boot/root disk, you must fit all
       blocks for the kernel plus all blocks for the root filesystem on
       the one disk.
    2. Using mke2fs, create a root filesystem on a diskette of the
       appropriate size.
    3. Populate the filesystem as described above.
    4. When done, unmount the filesystem and transfer it to a disk file
       but do not compress it.
    5. Transfer the kernel to a floppy diskette, as described above. When
       calculating the ramdisk word, set bit 14 to zero, to indicate that
       the root filesystem is not to be loaded to ramdisk. Run the rdev's
       as described.
    6. Transfer the root filesystem as before.
       
   There are several shortcuts you can take. If you are building a
   two-disk set, you can build the complete root filesystem directly on
   the second disk and you need not transfer it to a hard disk file and
   then back. Also, if you are building a single boot/root disk and using
   LILO, you can build a single filesystem on the entire disk, containing
   the kernel, LILO files and root files, and simply run LILO as the last
   step.
     _________________________________________________________________
   
Building a utility disk

   Building a utility disk is relatively easy -- simply create a
   filesystem on a formatted disk and copy files to it. To use it with a
   bootdisk, mount it manually after the system is booted.
   
   In the instructions above, we mentioned that the utility disk could be
   mounted as /usr. In this case, binaries could be placed into a /bin
   directory on your utility disk, so that placing /usr/bin in your path
   will access them. Additional libraries needed by the binaries are
   placed in /lib on the utility disk.
   
   There are several important points to keep in mind when designing a
   utility disk:
   
    1. Do not place critical system binaries or libraries onto the
       utility disk, since it will not be mountable until after the
       system has booted.
    2. You cannot access a floppy diskette and a floppy tape drive
       simultaneously. This means that if you have a floppy tape drive,
       you will not be able to access it while your utility disk is
       mounted.
    3. Access to files on the utility disk will be slow.
       
   [60]Appendix Appendix D shows a sample of files on a utility disk.
   Here are some ideas for files you may find useful: programs for
   examining and manipulating disks (format, fdisk) and filesystems
   (mke2fs, fsck, debugfs, isofs.o), a lightweight text editor (elvis,
   jove), compression and archive utilities (gzip, bzip, tar, cpio,
   afio), tape utilities (mt, ftmt, tob, taper), communications utilities
   (ppp.o, slip.o, minicom) and utilities for devices (setserial, mknod).
     _________________________________________________________________
   
How the pros do it

   You may notice that the bootdisks used by major distributions such as
   Slackware, RedHat or Debian seem more sophisticated than what is
   described in this document. Professional distribution bootdisks are
   based on the same principles outlined here, but employ various tricks
   because their bootdisks have additional requirements. First, they must
   be able to work with a wide variety of hardware, so they must be able
   to interact with the user and load various device drivers. Second,
   they must be prepared to work with many different installation
   options, with varying degrees of automation. Finally, distribution
   bootdisks usually combine installation and rescue capabilities.
   
   Some bootdisks use a feature called initrd (initial ramdisk). This
   feature was introduced around 2.0.x and allows a kernel to boot in two
   phases. When the kernel first boots, it loads an initial ramdisk image
   from the boot disk. This initial ramdisk is a root filesystem
   containing a program that runs before the real root fs is loaded. This
   program usually inspects the environment and/or asks the user to
   select various boot options, such as the device from which to load the
   real rootdisk. It typically loads additional modules not built in to
   the kernel. When this initial program exits, the kernel loads the real
   root image and booting continues normally. For further information on
   initrd, see your local file
   [61]/usr/src/linux/Documentation/initrd.txt and
   [62]ftp://elserv.ffm.fgan.de/pub/linux/loadlin-1.6/initrd-example.tgz
   
   The following are summaries of how each distribution's installation
   disks seem to work, based on inspecting their filesystems and/or
   source code. We do not guarantee that this information is completely
   accurate, or that they have not changed since the versions noted.
   
   Slackware (v.3.1) uses a straightforward LILO boot similar to what is
   described in [63]the section called Transferring the kernel with LILO.
   The Slackware bootdisk prints a bootup message ("Welcome to the
   Slackware Linux bootkernel disk!") using LILO's message parameter.
   This instructs the user to enter a boot parameter line if necessary.
   After booting, a root filesystem is loaded from a second disk. The
   user invokes a setup script which starts the installation. Instead of
   using a modular kernel, Slackware provides many different kernels and
   depends upon the user to select the one matching his or her hardware
   requirements.
   
   RedHat (v.4.0) also uses a LILO boot. It loads a compressed ramdisk on
   the first disk, which runs a custom init program. This program queries
   for drivers then loads additional files from a supplemental disk if
   necessary.
   
   Debian (v.1.3) is probably the most sophisticated of the installation
   disk sets. It uses the SYSLINUX loader to arrange various load
   options, then uses an initrd image to guide the user through
   installation. It appears to use both a customized init and a
   customized shell.
     _________________________________________________________________
   
Frequently Asked Question (FAQ) list

   Q: [64]I boot from my boot/root disks and nothing happens. What do I
          do?
          
   Q: [65]How does the Slackware/Debian/RedHat bootdisk work?
   Q: [66]How can I make a boot disk with a XYZ driver?
   Q: [67]How do I update my root diskette with new files?
   Q: [68]How do I remove LILO so that I can use DOS to boot again?
   Q: [69]How can I boot if I've lost my kernel and my boot disk?
   Q: [70]How can I make extra copies of boot/root diskettes?
   Q: [71]How can I boot without typing in "ahaxxxx=nn,nn,nn" every time?
   Q: [72]At boot time, I get error "A: cannot execute B". Why?
   Q: [73]My kernel has ramdisk support, but initializes ramdisks of 0K.
          Why?
          
   Q: I boot from my boot/root disks and nothing happens. What do I do?
   
   A: See [74]the section called Troubleshooting, or The Agony of Defeat,
   above.
   
   Q: How does the Slackware/Debian/RedHat bootdisk work?
   
   A: See [75]the section called How the pros do it, above.
   
   Q: How can I make a boot disk with a XYZ driver?
   
   A: The easiest way is to obtain a Slackware kernel from your nearest
   Slackware mirror site. Slackware kernels are generic kernels which
   atttempt to include drivers for as many devices as possible, so if you
   have a SCSI or IDE controller, chances are that a driver for it is
   included in the Slackware kernel.
   
   Go to the a1 directory and select either IDE or SCSI kernel depending
   on the type of controller you have. Check the xxxxkern.cfg file for
   the selected kernel to see the drivers which have been included in
   that kernel. If the device you want is in that list, then the
   corresponding kernel should boot your computer. Download the
   xxxxkern.tgz file and copy it to your boot diskette as described above
   in the section on making boot disks.
   
   You must then check the root device in the kernel, using the command
   rdev zImage. If this is not the same as the root device you want, use
   rdev to change it. For example, the kernel I tried was set to
   /dev/sda2, but my root SCSI partition is /dev/sda8. To use a root
   diskette, you would have to use the command rdev zImage /dev/fd0.
   
   If you want to know how to set up a Slackware root disk as well,
   that's outside the scope of this HOWTO, so I suggest you check the
   Linux Install Guide or get the Slackware distribution. See the section
   in this HOWTO titled ``References''.
   
   Q: How do I update my root diskette with new files?
   
   A: The easiest way is to copy the filesystem from the rootdisk back to
   the DEVICE you used (from [76]the section called Creating the
   filesystem, above). Then mount the filesystem and make the changes.
   You have to remember where your root filesystem started and how many
   blocks it occupied:
        dd if=/dev/fd0 bs=1k skip=ROOTBEGIN count=BLOCKS | gunzip > DEVICE
        mount -t ext2 DEVICE /mnt

   After making the changes, proceed as before (in [77]the section called
   Wrapping it up) and transfer the root filesystem back to the disk. You
   should not have to re-transfer the kernel or re-compute the ramdisk
   word if you do not change the starting position of the new root
   filesystem.
   
   Q: How do I remove LILO so that I can use DOS to boot again?
   
   A: This is not really a Bootdisk topic, but it is asked often. Within
   Linux, you can run:
        /sbin/lilo -u

   You can also use the dd command to copy the backup saved by LILO to
   the boot sector. Refer to the LILO documentation if you wish to do
   this.
   
   Within DOS and Windows you can use the DOS command:
        FDISK /MBR

   MBR stands for Master Boot Record. This command replaces the boot
   sector with a clean DOS one, without affecting the partition table.
   Some purists disagree with this, but even the author of LILO, Werner
   Almesberger, suggests it. It is easy, and it works.
   
   Q: How can I boot if I've lost my kernel and my boot disk?
   
   A: If you don't have a boot disk standing by, probably the easiest
   method is to obtain a Slackware kernel for your disk controller type
   (IDE or SCSI) as described above for ``How do I make a boot disk with
   a XXX driver?''. You can then boot your computer using this kernel,
   then repair whatever damage there is.
   
   The kernel you get may not have the root device set to the disk type
   and partition you want. For example, Slackware's generic SCSI kernel
   has the root device set to /dev/sda2, whereas my root Linux partition
   happens to be /dev/sda8. In this case the root device in the kernel
   will have to be changed.
   
   You can still change the root device and ramdisk settings in the
   kernel even if all you have is a kernel, and some other operating
   system, such as DOS.
   
   rdev changes kernel settings by changing the values at fixed offsets
   in the kernel file, so you can do the same if you have a hex editor
   available on whatever systems you do still have running -- for
   example, Norton Utilities Disk Editor under DOS. You then need to
   check and if necessary change the values in the kernel at the
   following offsets:
HEX     DEC  DESCRIPTION
0x01F8  504  Low byte of RAMDISK word
0x01F9  505  High byte of RAMDISK word
0x01FC  508  Root minor device number - see below
0X01FD  509  Root major device number - see below

   The interpretation of the ramdisk word was described in [78]the
   section called Setting the ramdisk word, above.
   
   The major and minor device numbers must be set to the device you want
   to mount your root filesystem on. Some useful values to select from
   are:
DEVICE          MAJOR MINOR
/dev/fd0            2     0   1st floppy drive
/dev/hda1           3     1   partition 1 on 1st IDE drive
/dev/sda1           8     1   partition 1 on 1st SCSI drive
/dev/sda8           8     8   partition 8 on 1st SCSI drive

   Once you have set these values then you can write the file to a
   diskette using either Norton Utilities Disk Editor, or a program
   called rawrite.exe. This program is included in all distributions. It
   is a DOS program which writes a file to the ``raw'' disk, starting at
   the boot sector, instead of writing it to the file system. If you use
   Norton Utilities you must write the file to a physical disk starting
   at the beginning of the disk.
   
   Q: How can I make extra copies of boot/root diskettes?
   
   A: Because magnetic media may deteriorate over time, you should keep
   several copies of your rescue disk, in case the original is
   unreadable.
   
   The easiest way of making copies of any diskettes, including bootable
   and utility diskettes, is to use the dd command to copy the contents
   of the original diskette to a file on your hard drive, and then use
   the same command to copy the file back to a new diskette. Note that
   you do not need to, and should not, mount the diskettes, because dd
   uses the raw device interface.
   
   To copy the original, enter the command:
        dd if=DEVICENAME of=FILENAME

   where DEVICENAME is the device name of the diskette drive and FILENAME
   is the name of the (hard-disk) output file. Omitting the count
   parameter causes dd to copy the whole diskette (2880 blocks if
   high-density).
   
   To copy the resulting file back to a new diskette, insert the new
   diskette and enter the reverse command:
        dd if=FILENAME of=DEVICENAME

   Note that the above discussion assumes that you have only one diskette
   drive. If you have two of the same type, you can copy diskettes using
   a command like:
        dd if=/dev/fd0 of=/dev/fd1

   Q: How can I boot without typing in "ahaxxxx=nn,nn,nn" every time?
   
   A: Where a disk device cannot be autodetected it is necessary to
   supply the kernel with a command device parameter string, such as:
        aha152x=0x340,11,3,1

   This parameter string can be supplied in several ways using LILO:
   
     * By entering it on the command line every time the system is booted
       via LILO. This is boring, though.
     * By using LILO's lock keyword to make it store the command line as
       the default command line, so that LILO will use the same options
       every time it boots.
     * By using the append= statement in the LILO config file. Note that
       the parameter string must be enclosed in quotes.
       
   For example, a sample command line using the above parameter string
   would be:
        zImage  aha152x=0x340,11,3,1 root=/dev/sda1 lock

   This would pass the device parameter string through, and also ask the
   kernel to set the root device to /dev/sda1 and save the whole command
   line and reuse it for all future boots.
   
   A sample APPEND statement is:
        APPEND = "aha152x=0x340,11,3,1"

   Note that the parameter string must not be enclosed in quotes on the
   command line, but it must be enclosed in quotes in the APPEND
   statement.
   
   Note also that for the parameter string to be acted on, the kernel
   must contain the driver for that disk type. If it does not, then there
   is nothing listening for the parameter string, and you will have to
   rebuild the kernel to include the required driver. For details on
   rebuilding the kernel, go to /usr/src/linux and read the README, and
   read the Linux FAQ and Installation HOWTO. Alternatively you could
   obtain a generic kernel for the disk type and install that.
   
   Readers are strongly urged to read the LILO documentation before
   experimenting with LILO installation. Incautious use of the BOOT
   statement can damage partitions.
   
   Q: At boot time, I get error "A: cannot execute B". Why?
   
   A: There are several cases of program names being hardcoded in various
   utilities. These cases do not occur everywhere, but they may explain
   why an executable apparently cannot be found on your system even
   though you can see that it is there. You can find out if a given
   program has the name of another hardcoded by using the strings command
   and piping the output through grep.
   
   Known examples of hardcoding are:
   
     * shutdown in some versions has /etc/reboot hardcoded, so reboot
       must be placed in the /etc directory.
     * init has caused problems for at least one person, with the kernel
       being unable to find init.
       
   To fix these problems, either move the programs to the correct
   directory, or change configuration files (e.g. inittab) to point to
   the correct directory. If in doubt, put programs in the same
   directories as they are on your hard disk, and use the same inittab
   and /etc/rc.d files as they appear on your hard disk.
   
   Q: My kernel has ramdisk support, but initializes ramdisks of 0K. Why?
   
   A: Where this occurs, a kernel message like this will appear as the
   kernel is booting:
        Ramdisk driver initialized : 16 ramdisks of 0K size

   This is probably because the size has been set to 0 by kernel
   parameters at boot time. This could possibly be because of an
   overlooked LILO configuration file parameter:
    ramdisk= 0

   This was included in sample LILO configuration files in some older
   distributions, and was put there to override any previous kernel
   setting. If you have such a line, remove it.
   
   Note that if you attempt to use a ramdisk of 0 size, the behaviour can
   be unpredictable, and can result in kernel panics.
     _________________________________________________________________
   
Appendix A. Resources and pointers

   When retrieving a package, always get the latest version unless you
   have good reasons for not doing so.
     _________________________________________________________________
   
Pre-made Bootdisks

   These are sources for distribution bootdisks. Please use one of the
   mirror sites to reduce the load on these machines.
   
     * [79]Slackware bootdisks, [80]rootdisks and [81]Slackware mirror
       sites
     * [82]RedHat bootdisks and [83]Red Hat mirror sites
     * [84]Debian bootdisks and [85]Debian mirror sites
       
   In addition to the distribution bootdisks, the following rescue disk
   images are available. Unless otherwise specified, these are available
   in the directory
   [86]http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html
   
     * tomsrtbt, by Tom Oehser, is a single-disk boot/root disk based on
       kernel 2.0, with a large set of features and support programs. It
       supports IDE, SCSI, tape, network adaptors, PCMCIA and more. About
       100 utility programs and tools are included for fixing and
       restoring disks. The package also includes scripts for
       disassembling and reconstructing the images so that new material
       can be added if necessary.
     * rescue02, by John Comyns, is a rescue disk based on kernel 1.3.84,
       with support for IDE and Adaptec 1542 and NCR53C7,8xx. It uses ELF
       binaries but it has enough commands so that it can be used on any
       system. There are modules that can be loaded after booting for all
       other SCSI cards. It probably won't work on systems with 4 mb of
       ram since it uses a 3 mb ram disk.
     * resque_disk-2.0.22, by Sergei Viznyuk, is a full-featured
       boot/root disk based on kernel 2.0.22 with built-in support for
       IDE, many difference SCSI controllers, and ELF/AOUT. Also includes
       many modules and useful utilities for repairing and restoring a
       hard disk.
     * [87]cramdisk images, based on the 2.0.23 kernel, available for 4
       meg and 8 meg machines. They include math emulation and networking
       (PPP and dialin script, NE2000, 3C509), or support for the
       parallel port ZIP drive. These diskette images will boot on a 386
       with 4MB RAM. MSDOS support is included so you can download from
       the net to a DOS partition.
     _________________________________________________________________
   
Rescue packages

   Several packages for creating rescue disks are available on
   metalab.unc.edu. With these packages you specify a set of files for
   inclusion and the software automates (to varying degrees) the creation
   of a bootdisk. See
   [88]http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html for
   more information. Check the file dates carefully. Some of these
   packages have not been updated in several years and will not support
   the creation of a compressed root filesystem loaded into ramdisk. To
   the best of our knowledge, [89]Yard is the only package that will.
     _________________________________________________________________
   
LILO -- the Linux loader

   Written by Werner Almesberger. Excellent boot loader, and the
   documentation includes information on the boot sector contents and the
   early stages of the boot process.
   
   Ftp from [90]ftp://tsx-11.mit.edu/pub/linux/packages/lilo/. It is also
   available on Metalab and mirrors.
     _________________________________________________________________
   
Linux FAQ and HOWTOs

   These are available from many sources. Look at the usenet newsgroups
   news.answers and comp.os.linux.announce.
   
   The FAQ is available from [91]http://linuxdoc.org/FAQ/Linux-FAQ.html
   and the HOWTOs from [92]http://linuxdoc.org/HOWTO/HOWTO-INDEX.html.
   Most documentation for Linux may be found at [93]The Linux
   Documentation Project homepage.
     _________________________________________________________________
   
Ramdisk usage

   An excellent description of the how the ramdisk code works may be
   found with the documentation supplied with the Linux kernel. See
   /usr/src/linux/Documentation/ramdisk.txt. It is written by Paul
   Gortmaker and includes a section on creating a compressed ramdisk.
     _________________________________________________________________
   
The Linux boot process

   For more detail on the Linux boot process, here are some pointers:
   
     * The [94]Linux System Administrators' Guide has a section on
       booting.
     * The [95]LILO ``Technical overview'' has the definitive technical,
       low-level description of the boot process, up to where the kernel
       is started.
     * The source code is the ultimate guide. Below are some kernel files
       related to the boot process. If you have the Linux kernel source
       code, you can find these under /usr/src/linux on your machine;
       alternatively, Shigio Yamaguchi (shigio@tamacom.com) has a very
       nice [96]hypertext kernel browser for reading kernel source files.
       Here are some relevant files to look at:
       
        arch/i386/boot/bootsect.S and setup.S
                Contain assembly code for the bootsector itself.
                
        arch/i386/boot/compressed/misc.c
                Contains code for uncompressing the kernel.
                
        arch/i386/kernel/
                Directory containing kernel initialization code. setup.c
                defines the ramdisk word.
                
        drivers/block/rd.c
                Contains the ramdisk driver. The procedures rd_load and
                rd_load_image load blocks from a device into a ramdisk.
                The procedure identify_ramdisk_image determines what kind
                of filesystem is found and whether it is compressed.
     _________________________________________________________________
   
Appendix B. LILO boot error codes

   Questions about these errors are asked so often on Usenet that we
   include them here as a public service. This summary is excerpted from
   Werner Almsberger's [97]LILO User Documentation.
   
   When LILO loads itself, it displays the word LILO. Each letter is
   printed before or after performing some specific action. If LILO fails
   at some point, the letters printed so far can be used to identify the
   problem.
   
   Output Problem
   (nothing) No part of LILO has been loaded. LILO either isn't installed
   or the partition on which its boot sector is located isn't active.
   L The first stage boot loader has been loaded and started, but it
   can't load the second stage boot loader. The two-digit error codes
   indicate the type of problem. (See also section ``Disk error codes''.)
   This condition usually indicates a media failure or a geometry
   mismatch (e.g. bad disk parameters).
   LI The first stage boot loader was able to load the second stage boot
   loader, but has failed to execute it. This can either be caused by a
   geometry mismatch or by moving /boot/boot.b without running the map
   installer.
   LIL The second stage boot loader has been started, but it can't load
   the descriptor table from the map file. This is typically caused by a
   media failure or by a geometry mismatch.
   LIL? The second stage boot loader has been loaded at an incorrect
   address. This is typically caused by a subtle geometry mismatch or by
   moving /boot/boot.b without running the map installer.
   LIL- The descriptor table is corrupt. This can either be caused by a
   geometry mismatch or by moving /boot/map without running the map
   installer.
   LILO All parts of LILO have been successfully loaded.
   
   If the BIOS signals an error when LILO is trying to load a boot image,
   the respective error code is displayed. These codes range from 0x00
   through 0xbb. See the LILO User Guide for an explanation of these.
     _________________________________________________________________
   
Appendix C. Sample root filesystem listings

/:
drwx--x--x   2 root     root         1024 Nov  1 15:39 bin
drwx--x--x   2 root     root         4096 Nov  1 15:39 dev
drwx--x--x   3 root     root         1024 Nov  1 15:39 etc
drwx--x--x   4 root     root         1024 Nov  1 15:39 lib
drwx--x--x   5 root     root         1024 Nov  1 15:39 mnt
drwx--x--x   2 root     root         1024 Nov  1 15:39 proc
drwx--x--x   2 root     root         1024 Nov  1 15:39 root
drwx--x--x   2 root     root         1024 Nov  1 15:39 sbin
drwx--x--x   2 root     root         1024 Nov  1 15:39 tmp
drwx--x--x   7 root     root         1024 Nov  1 15:39 usr
drwx--x--x   5 root     root         1024 Nov  1 15:39 var

/bin:
-rwx--x--x   1 root     root        62660 Nov  1 15:39 ash
-rwx--x--x   1 root     root         9032 Nov  1 15:39 cat
-rwx--x--x   1 root     root        10276 Nov  1 15:39 chmod
-rwx--x--x   1 root     root         9592 Nov  1 15:39 chown
-rwx--x--x   1 root     root        23124 Nov  1 15:39 cp
-rwx--x--x   1 root     root        23028 Nov  1 15:39 date
-rwx--x--x   1 root     root        14052 Nov  1 15:39 dd
-rwx--x--x   1 root     root        14144 Nov  1 15:39 df
-rwx--x--x   1 root     root        69444 Nov  1 15:39 egrep
-rwx--x--x   1 root     root          395 Nov  1 15:39 false
-rwx--x--x   1 root     root        69444 Nov  1 15:39 fgrep
-rwx--x--x   1 root     root        69444 Nov  1 15:39 grep
-rwx--x--x   3 root     root        45436 Nov  1 15:39 gunzip
-rwx--x--x   3 root     root        45436 Nov  1 15:39 gzip
-rwx--x--x   1 root     root         8008 Nov  1 15:39 hostname
-rwx--x--x   1 root     root        12736 Nov  1 15:39 ln
-rws--x--x   1 root     root        15284 Nov  1 15:39 login
-rwx--x--x   1 root     root        29308 Nov  1 15:39 ls
-rwx--x--x   1 root     root         8268 Nov  1 15:39 mkdir
-rwx--x--x   1 root     root         8920 Nov  1 15:39 mknod
-rwx--x--x   1 root     root        24836 Nov  1 15:39 more
-rws--x--x   1 root     root        37640 Nov  1 15:39 mount
-rwx--x--x   1 root     root        12240 Nov  1 15:39 mt
-rwx--x--x   1 root     root        12932 Nov  1 15:39 mv
-r-x--x--x   1 root     root        12324 Nov  1 15:39 ps
-rwx--x--x   1 root     root         5388 Nov  1 15:39 pwd
-rwx--x--x   1 root     root        10092 Nov  1 15:39 rm
lrwxrwxrwx   1 root     root            3 Nov  1 15:39 sh -> ash
-rwx--x--x   1 root     root        25296 Nov  1 15:39 stty
-rws--x--x   1 root     root        12648 Nov  1 15:39 su
-rwx--x--x   1 root     root         4444 Nov  1 15:39 sync
-rwx--x--x   1 root     root       110668 Nov  1 15:39 tar
-rwx--x--x   1 root     root        19712 Nov  1 15:39 touch
-rwx--x--x   1 root     root          395 Nov  1 15:39 true
-rws--x--x   1 root     root        19084 Nov  1 15:39 umount
-rwx--x--x   1 root     root         5368 Nov  1 15:39 uname
-rwx--x--x   3 root     root        45436 Nov  1 15:39 zcat

/dev:
lrwxrwxrwx   1 root     root            6 Nov  1 15:39 cdrom -> cdu31a
brw-rw-r--   1 root     root      15,   0 May  5  1998 cdu31a
crw-------   1 root     root       4,   0 Nov  1 15:29 console
crw-rw-rw-   1 root     uucp       5,  64 Sep  9 19:46 cua0
crw-rw-rw-   1 root     uucp       5,  65 May  5  1998 cua1
crw-rw-rw-   1 root     uucp       5,  66 May  5  1998 cua2
crw-rw-rw-   1 root     uucp       5,  67 May  5  1998 cua3
brw-rw----   1 root     floppy     2,   0 Aug  8 13:54 fd0
brw-rw----   1 root     floppy     2,  36 Aug  8 13:54 fd0CompaQ
brw-rw----   1 root     floppy     2,  84 Aug  8 13:55 fd0D1040
brw-rw----   1 root     floppy     2,  88 Aug  8 13:55 fd0D1120
brw-rw----   1 root     floppy     2,  12 Aug  8 13:54 fd0D360
brw-rw----   1 root     floppy     2,  16 Aug  8 13:54 fd0D720
brw-rw----   1 root     floppy     2, 120 Aug  8 13:55 fd0D800
brw-rw----   1 root     floppy     2,  32 Aug  8 13:54 fd0E2880
brw-rw----   1 root     floppy     2, 104 Aug  8 13:55 fd0E3200
brw-rw----   1 root     floppy     2, 108 Aug  8 13:55 fd0E3520
brw-rw----   1 root     floppy     2, 112 Aug  8 13:55 fd0E3840
brw-rw----   1 root     floppy     2,  28 Aug  8 13:54 fd0H1440
brw-rw----   1 root     floppy     2, 124 Aug  8 13:55 fd0H1600
brw-rw----   1 root     floppy     2,  44 Aug  8 13:55 fd0H1680
brw-rw----   1 root     floppy     2,  60 Aug  8 13:55 fd0H1722
brw-rw----   1 root     floppy     2,  76 Aug  8 13:55 fd0H1743
brw-rw----   1 root     floppy     2,  96 Aug  8 13:55 fd0H1760
brw-rw----   1 root     floppy     2, 116 Aug  8 13:55 fd0H1840
brw-rw----   1 root     floppy     2, 100 Aug  8 13:55 fd0H1920
lrwxrwxrwx   1 root     root            7 Nov  1 15:39 fd0H360 -> fd0D360
lrwxrwxrwx   1 root     root            7 Nov  1 15:39 fd0H720 -> fd0D720
brw-rw----   1 root     floppy     2,  52 Aug  8 13:55 fd0H820
brw-rw----   1 root     floppy     2,  68 Aug  8 13:55 fd0H830
brw-rw----   1 root     floppy     2,   4 Aug  8 13:54 fd0d360
brw-rw----   1 root     floppy     2,   8 Aug  8 13:54 fd0h1200
brw-rw----   1 root     floppy     2,  40 Aug  8 13:54 fd0h1440
brw-rw----   1 root     floppy     2,  56 Aug  8 13:55 fd0h1476
brw-rw----   1 root     floppy     2,  72 Aug  8 13:55 fd0h1494
brw-rw----   1 root     floppy     2,  92 Aug  8 13:55 fd0h1600
brw-rw----   1 root     floppy     2,  20 Aug  8 13:54 fd0h360
brw-rw----   1 root     floppy     2,  48 Aug  8 13:55 fd0h410
brw-rw----   1 root     floppy     2,  64 Aug  8 13:55 fd0h420
brw-rw----   1 root     floppy     2,  24 Aug  8 13:54 fd0h720
brw-rw----   1 root     floppy     2,  80 Aug  8 13:55 fd0h880
brw-rw----   1 root     disk       3,   0 May  5  1998 hda
brw-rw----   1 root     disk       3,   1 May  5  1998 hda1
brw-rw----   1 root     disk       3,   2 May  5  1998 hda2
brw-rw----   1 root     disk       3,   3 May  5  1998 hda3
brw-rw----   1 root     disk       3,   4 May  5  1998 hda4
brw-rw----   1 root     disk       3,   5 May  5  1998 hda5
brw-rw----   1 root     disk       3,   6 May  5  1998 hda6
brw-rw----   1 root     disk       3,  64 May  5  1998 hdb
brw-rw----   1 root     disk       3,  65 May  5  1998 hdb1
brw-rw----   1 root     disk       3,  66 May  5  1998 hdb2
brw-rw----   1 root     disk       3,  67 May  5  1998 hdb3
brw-rw----   1 root     disk       3,  68 May  5  1998 hdb4
brw-rw----   1 root     disk       3,  69 May  5  1998 hdb5
brw-rw----   1 root     disk       3,  70 May  5  1998 hdb6
crw-r-----   1 root     kmem       1,   2 May  5  1998 kmem
crw-r-----   1 root     kmem       1,   1 May  5  1998 mem
lrwxrwxrwx   1 root     root           12 Nov  1 15:39 modem -> ttyS1
lrwxrwxrwx   1 root     root           12 Nov  1 15:39 mouse -> psaux
crw-rw-rw-   1 root     root       1,   3 May  5  1998 null
crwxrwxrwx   1 root     root      10,   1 Oct  5 20:22 psaux
brw-r-----   1 root     disk       1,   1 May  5  1998 ram
brw-rw----   1 root     disk       1,   0 May  5  1998 ram0
brw-rw----   1 root     disk       1,   1 May  5  1998 ram1
brw-rw----   1 root     disk       1,   2 May  5  1998 ram2
brw-rw----   1 root     disk       1,   3 May  5  1998 ram3
brw-rw----   1 root     disk       1,   4 May  5  1998 ram4
brw-rw----   1 root     disk       1,   5 May  5  1998 ram5
brw-rw----   1 root     disk       1,   6 May  5  1998 ram6
brw-rw----   1 root     disk       1,   7 May  5  1998 ram7
brw-rw----   1 root     disk       1,   8 May  5  1998 ram8
brw-rw----   1 root     disk       1,   9 May  5  1998 ram9
lrwxrwxrwx   1 root     root            4 Nov  1 15:39 ramdisk -> ram0
***  I have only included devices for the IDE partitions I use.
***  If you use SCSI, then use the /dev/sdXX devices instead.
crw-------   1 root     root       4,   0 May  5  1998 tty0
crw-w-----   1 root     tty        4,   1 Nov  1 15:39 tty1
crw-------   1 root     root       4,   2 Nov  1 15:29 tty2
crw-------   1 root     root       4,   3 Nov  1 15:29 tty3
crw-------   1 root     root       4,   4 Nov  1 15:29 tty4
crw-------   1 root     root       4,   5 Nov  1 15:29 tty5
crw-------   1 root     root       4,   6 Nov  1 15:29 tty6
crw-------   1 root     root       4,   7 May  5  1998 tty7
crw-------   1 root     tty        4,   8 May  5  1998 tty8
crw-------   1 root     tty        4,   9 May  8 12:57 tty9
crw-rw-rw-   1 root     root       4,  65 Nov  1 12:17 ttyS1
crw-rw-rw-   1 root     root       1,   5 May  5  1998 zero

/etc:
-rw-------   1 root     root          164 Nov  1 15:39 conf.modules
-rw-------   1 root     root          668 Nov  1 15:39 fstab
-rw-------   1 root     root           71 Nov  1 15:39 gettydefs
-rw-------   1 root     root          389 Nov  1 15:39 group
-rw-------   1 root     root          413 Nov  1 15:39 inittab
-rw-------   1 root     root           65 Nov  1 15:39 issue
-rw-r--r--   1 root     root          746 Nov  1 15:39 ld.so.cache
-rw-------   1 root     root           32 Nov  1 15:39 motd
-rw-------   1 root     root          949 Nov  1 15:39 nsswitch.conf
drwx--x--x   2 root     root         1024 Nov  1 15:39 pam.d
-rw-------   1 root     root          139 Nov  1 15:39 passwd
-rw-------   1 root     root          516 Nov  1 15:39 profile
-rwx--x--x   1 root     root          387 Nov  1 15:39 rc
-rw-------   1 root     root           55 Nov  1 15:39 shells
-rw-------   1 root     root          774 Nov  1 15:39 termcap
-rw-------   1 root     root           78 Nov  1 15:39 ttytype
lrwxrwxrwx   1 root     root           15 Nov  1 15:39 utmp -> ../var/run/utmp
lrwxrwxrwx   1 root     root           15 Nov  1 15:39 wtmp -> ../var/log/wtmp

/etc/pam.d:
-rw-------   1 root     root          356 Nov  1 15:39 other

/lib:
-rwxr-xr-x   1 root     root        45415 Nov  1 15:39 ld-2.0.7.so
lrwxrwxrwx   1 root     root           11 Nov  1 15:39 ld-linux.so.2 -> ld-2.0.
7.so
-rwxr-xr-x   1 root     root       731548 Nov  1 15:39 libc-2.0.7.so
lrwxrwxrwx   1 root     root           13 Nov  1 15:39 libc.so.6 -> libc-2.0.7.
so
lrwxrwxrwx   1 root     root           17 Nov  1 15:39 libcom_err.so.2 -> libco
m_err.so.2.0
-rwxr-xr-x   1 root     root         6209 Nov  1 15:39 libcom_err.so.2.0
-rwxr-xr-x   1 root     root       153881 Nov  1 15:39 libcrypt-2.0.7.so
lrwxrwxrwx   1 root     root           17 Nov  1 15:39 libcrypt.so.1 -> libcryp
t-2.0.7.so
-rwxr-xr-x   1 root     root        12962 Nov  1 15:39 libdl-2.0.7.so
lrwxrwxrwx   1 root     root           14 Nov  1 15:39 libdl.so.2 -> libdl-2.0.
7.so
lrwxrwxrwx   1 root     root           16 Nov  1 15:39 libext2fs.so.2 -> libext
2fs.so.2.4
-rwxr-xr-x   1 root     root        81382 Nov  1 15:39 libext2fs.so.2.4
-rwxr-xr-x   1 root     root        25222 Nov  1 15:39 libnsl-2.0.7.so
lrwxrwxrwx   1 root     root           15 Nov  1 15:39 libnsl.so.1 -> libnsl-2.
0.7.so
-rwx--x--x   1 root     root       178336 Nov  1 15:39 libnss_files-2.0.7.so
lrwxrwxrwx   1 root     root           21 Nov  1 15:39 libnss_files.so.1 -> lib
nss_files-2.0.7.so
lrwxrwxrwx   1 root     root           14 Nov  1 15:39 libpam.so.0 -> libpam.so
.0.64
-rwxr-xr-x   1 root     root        26906 Nov  1 15:39 libpam.so.0.64
lrwxrwxrwx   1 root     root           19 Nov  1 15:39 libpam_misc.so.0 -> libp
am_misc.so.0.64
-rwxr-xr-x   1 root     root         7086 Nov  1 15:39 libpam_misc.so.0.64
-r-xr-xr-x   1 root     root        35615 Nov  1 15:39 libproc.so.1.2.6
lrwxrwxrwx   1 root     root           15 Nov  1 15:39 libpwdb.so.0 -> libpwdb.
so.0.54
-rw-r-r---   1 root     root       121899 Nov  1 15:39 libpwdb.so.0.54
lrwxrwxrwx   1 root     root           19 Nov  1 15:39 libtermcap.so.2 -> libte
rmcap.so.2.0.8
-rwxr-xr-x   1 root     root        12041 Nov  1 15:39 libtermcap.so.2.0.8
-rwxr-xr-x   1 root     root        12874 Nov  1 15:39 libutil-2.0.7.so
lrwxrwxrwx   1 root     root           16 Nov  1 15:39 libutil.so.1 -> libutil-
2.0.7.so
lrwxrwxrwx   1 root     root           14 Nov  1 15:39 libuuid.so.1 -> libuuid.
so.1.1
-rwxr-xr-x   1 root     root         8039 Nov  1 15:39 libuuid.so.1.1
drwx--x--x   3 root     root         1024 Nov  1 15:39 modules
drwx--x--x   2 root     root         1024 Nov  1 15:39 security

/lib/modules:
drwx--x--x   4 root     root         1024 Nov  1 15:39 2.0.35

/lib/modules/2.0.35:
drwx--x--x   2 root     root         1024 Nov  1 15:39 block
drwx--x--x   2 root     root         1024 Nov  1 15:39 cdrom

/lib/modules/2.0.35/block:
drwx------   1 root     root         7156 Nov  1 15:39 loop.o

/lib/modules/2.0.35/cdrom:
drwx------   1 root     root        24108 Nov  1 15:39 cdu31a.o

/lib/security:
-rwx--x--x   1 root     root         8771 Nov  1 15:39 pam_permit.so

***  Directory stubs for mounting
/mnt:
drwx--x--x   2 root     root         1024 Nov  1 15:39 cdrom
drwx--x--x   2 root     root         1024 Nov  1 15:39 floppy

/proc:

/root:
-rw-------   1 root     root          176 Nov  1 15:39 .bashrc
-rw-------   1 root     root          182 Nov  1 15:39 .cshrc
-rwx--x--x   1 root     root          455 Nov  1 15:39 .profile
-rw-------   1 root     root         4014 Nov  1 15:39 .tcshrc

/sbin:
-rwx--x--x   1 root     root        23976 Nov  1 15:39 depmod
-rwx--x--x   2 root     root       274600 Nov  1 15:39 e2fsck
-rwx--x--x   1 root     root        41268 Nov  1 15:39 fdisk
-rwx--x--x   1 root     root         9396 Nov  1 15:39 fsck
-rwx--x--x   2 root     root       274600 Nov  1 15:39 fsck.ext2
-rwx--x--x   1 root     root        29556 Nov  1 15:39 getty
-rwx--x--x   1 root     root         6620 Nov  1 15:39 halt
-rwx--x--x   1 root     root        23116 Nov  1 15:39 init
-rwx--x--x   1 root     root        25612 Nov  1 15:39 insmod
-rwx--x--x   1 root     root        10368 Nov  1 15:39 kerneld
-rwx--x--x   1 root     root       110400 Nov  1 15:39 ldconfig
-rwx--x--x   1 root     root         6108 Nov  1 15:39 lsmod
-rwx--x--x   2 root     root        17400 Nov  1 15:39 mke2fs
-rwx--x--x   1 root     root         4072 Nov  1 15:39 mkfs
-rwx--x--x   2 root     root        17400 Nov  1 15:39 mkfs.ext2
-rwx--x--x   1 root     root         5664 Nov  1 15:39 mkswap
-rwx--x--x   1 root     root        22032 Nov  1 15:39 modprobe
lrwxrwxrwx   1 root     root            4 Nov  1 15:39 reboot -> halt
-rwx--x--x   1 root     root         7492 Nov  1 15:39 rmmod
-rwx--x--x   1 root     root        12932 Nov  1 15:39 shutdown
lrwxrwxrwx   1 root     root            6 Nov  1 15:39 swapoff -> swapon
-rwx--x--x   1 root     root         5124 Nov  1 15:39 swapon
lrwxrwxrwx   1 root     root            4 Nov  1 15:39 telinit -> init
-rwx--x--x   1 root     root         6944 Nov  1 15:39 update

/tmp:

/usr:
drwx--x--x   2 root     root         1024 Nov  1 15:39 bin
drwx--x--x   2 root     root         1024 Nov  1 15:39 lib
drwx--x--x   3 root     root         1024 Nov  1 15:39 man
drwx--x--x   2 root     root         1024 Nov  1 15:39 sbin
drwx--x--x   3 root     root         1024 Nov  1 15:39 share
lrwxrwxrwx   1 root     root           10 Nov  1 15:39 tmp -> ../var/tmp

/usr/bin:
-rwx--x--x   1 root     root        37164 Nov  1 15:39 afio
-rwx--x--x   1 root     root         5044 Nov  1 15:39 chroot
-rwx--x--x   1 root     root        10656 Nov  1 15:39 cut
-rwx--x--x   1 root     root        63652 Nov  1 15:39 diff
-rwx--x--x   1 root     root        12972 Nov  1 15:39 du
-rwx--x--x   1 root     root        56552 Nov  1 15:39 find
-r-x--x--x   1 root     root         6280 Nov  1 15:39 free
-rwx--x--x   1 root     root         7680 Nov  1 15:39 head
-rwx--x--x   1 root     root         8504 Nov  1 15:39 id
-r-sr-xr-x   1 root     bin          4200 Nov  1 15:39 passwd
-rwx--x--x   1 root     root        14856 Nov  1 15:39 tail
-rwx--x--x   1 root     root        19008 Nov  1 15:39 tr
-rwx--x--x   1 root     root         7160 Nov  1 15:39 wc
-rwx--x--x   1 root     root         4412 Nov  1 15:39 whoami

/usr/lib:
lrwxrwxrwx   1 root     root           17 Nov  1 15:39 libncurses.so.4 -> libnc
urses.so.4.2
-rw-r-r---   1 root     root       260474 Nov  1 15:39 libncurses.so.4.2

/usr/sbin:
-r-x--x--x   1 root     root        13684 Nov  1 15:39 fuser
-rwx--x--x   1 root     root         3876 Nov  1 15:39 mklost+found

/usr/share:
drwx--x--x   4 root     root         1024 Nov  1 15:39 terminfo

/usr/share/terminfo:
drwx--x--x   2 root     root         1024 Nov  1 15:39 l
drwx--x--x   2 root     root         1024 Nov  1 15:39 v

/usr/share/terminfo/l:
-rw-------   1 root     root         1552 Nov  1 15:39 linux
-rw-------   1 root     root         1516 Nov  1 15:39 linux-m
-rw-------   1 root     root         1583 Nov  1 15:39 linux-nic

/usr/share/terminfo/v:
-rw-------   2 root     root         1143 Nov  1 15:39 vt100
-rw-------   2 root     root         1143 Nov  1 15:39 vt100-am

/var:
drwx--x--x   2 root     root         1024 Nov  1 15:39 log
drwx--x--x   2 root     root         1024 Nov  1 15:39 run
drwx--x--x   2 root     root         1024 Nov  1 15:39 tmp

/var/log:
-rw-------   1 root     root            0 Nov  1 15:39 wtmp

/var/run:
-rw-------   1 root     root            0 Nov  1 15:39 utmp

/var/tmp:
     _________________________________________________________________
   
Appendix D. Sample utility disk directory listing

total 579
-rwxr-xr-x   1 root     root        42333 Jul 28 19:05 cpio
-rwxr-xr-x   1 root     root        32844 Aug 28 19:50 debugfs
-rwxr-xr-x   1 root     root       103560 Jul 29 21:31 elvis
-rwxr-xr-x   1 root     root        29536 Jul 28 19:04 fdisk
-rw-r-r---   1 root     root       128254 Jul 28 19:03 ftape.o
-rwxr-xr-x   1 root     root        17564 Jul 25 03:21 ftmt
-rwxr-xr-x   1 root     root        64161 Jul 29 20:47 grep
-rwxr-xr-x   1 root     root        45309 Jul 29 20:48 gzip
-rwxr-xr-x   1 root     root        23560 Jul 28 19:04 insmod
-rwxr-xr-x   1 root     root          118 Jul 28 19:04 lsmod
lrwxrwxrwx   1 root     root            5 Jul 28 19:04 mt -> mt-st
-rwxr-xr-x   1 root     root         9573 Jul 28 19:03 mt-st
lrwxrwxrwx   1 root     root            6 Jul 28 19:05 rmmod -> insmod
-rwxr-xr-x   1 root     root       104085 Jul 28 19:05 tar
lrwxrwxrwx   1 root     root            5 Jul 29 21:35 vi -> elvis

  Notes
  
   [98][1]
   
   The directory structure presented here is for root diskette use only.
   Real Linux systems have a more complex and disciplined set of
   policies, called the [99]Filesystem Hierarchy Standard, for
   determining where files should go.)

References

   1. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#PREMADE
   2. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN21
   3. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN27
   4. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN36
   5. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN51
   6. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN59
   7. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN67
   8. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN87
   9. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN92
  10. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN168
  11. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#BUILDROOT
  12. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN204
  13. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#CREATINGROOTFS
  14. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN328
  15. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#PAMANDNSS
  16. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN649
  17. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN670
  18. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#WRAPPINGITUP
  19. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN697
  20. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN712
  21. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#TRANSFERRINGWITHLILO
  22. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#TRANSFERRINGWITHOUTLILO
  23. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#SETTINGRAMDISKWORD
  24. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN834
  25. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#TROUBLESHOOTING
  26. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN954
  27. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#SLIMFAST
  28. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#NONRAMDISKROOT
  29. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#UTILITYDISK
  30. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#PROS
  31. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1093
  32. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1277
  33. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#PREMADE
  34. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1316
  35. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1323
  36. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1328
  37. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1337
  38. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1343
  39. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1386
  40. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#LISTINGS
  41. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#UTILITYLIST
  42. http://www.croftj.net/~fawcett/Bootdisk-HOWTO/index.html
  43. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#TROUBLESHOOTING
  44. http://linuxdoc.org/copyright.html
  45. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#PREMADE
  46. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#NONRAMDISKROOT
  47. ftp://ftp.win.tue.nl/pub/linux/utils/util-linux/
  48. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#FTN.AEN331
  49. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#LISTINGS
  50. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#LISTINGS
  51. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#UTILITYDISK
  52. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#SLIMFAST
  53. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#SLIMFAST
  54. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#TRANSFERRINGWITHOUTLILO
  55. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#SETTINGRAMDISKWORD
  56. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#PAMANDNSS
  57. http://metalab.unc.edu/pub/Linux/system/shells/
  58. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#UTILITYDISK
  59. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#BUILDROOT
  60. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#UTILITYLIST
  61. file://localhost/usr/src/linux/Documentation/initrd.txt
  62. ftp://elserv.ffm.fgan.de/pub/linux/loadlin-1.6/initrd-example.tgz
  63. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#TRANSFERRINGWITHLILO
  64. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1097
  65. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1104
  66. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1111
  67. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1128
  68. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1143
  69. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1159
  70. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1182
  71. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1205
  72. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1238
  73. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN1265
  74. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#TROUBLESHOOTING
  75. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#PROS
  76. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#CREATINGROOTFS
  77. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#WRAPPINGITUP
  78. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#SETTINGRAMDISKWORD
  79. http://metalab.unc.edu/pub/Linux/distributions/slackware/bootdsks.144/
  80. http://metalab.unc.edu/pub/Linux/distributions/slackware/rootdsks/
  81. http://www.slackware.com/getslack/
  82. http://metalab.unc.edu/pub/Linux/distributions/redhat/current/i386/images/
  83. http://www.redhat.com/mirrors.html
  84. ftp://ftp.debian.org/pub/debian/dists/stable/main/disks-i386/current/
  85. ftp://ftp.debian.org/pub/debian/README.mirrors.html
  86. http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html
  87. http://metalab.unc.edu/pub/Linux/system/recovery/images
  88. http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html
  89. http://www.croftj.net/~fawcett/yard/index.html
  90. ftp://tsx-11.mit.edu/pub/linux/packages/lilo/
  91. http://linuxdoc.org/FAQ/Linux-FAQ.html
  92. http://linuxdoc.org/HOWTO/HOWTO-INDEX.html
  93. http://linuxdoc.org/
  94. http://linuxdoc.org/LDP/sag/c1596.html
  95. http://metalab.unc.edu/pub/Linux/system/boot/lilo/lilo-t-21.ps.gz
  96. http://www.tamacom.com/tour/linux/index.html
  97. http://metalab.unc.edu/pub/Linux/system/boot/lilo/lilo-u-21.ps.gz
  98. file://localhost/export/sunsite/users/gferg/work/00_Bootdisk-HOWTO.html#AEN331
  99. http://www.pathname.com/fhs/2.0/fhs-toc.html
  The Linux Busmouse HOWTO
  Chris Bagwell, cbagwell@sprynet.com
  v2.0, 14 Feb 2000

  This document describes how to install, configure and use a busmouse
  under Linux.  It lists the supported busmice and attempts to answer
  the most frequently asked questions with regards to busmice.  It also
  contains some pointers for serial mice as well.
  ______________________________________________________________________

  Table of Contents


  1. Introduction.

     1.1 Copyright and Disclaimer.
     1.2 Feedback.
     1.3 Acknowledgements.

  2. Determining your mouse type.

     2.1 Hardware interfaces.
        2.1.1 Inport mice.
        2.1.2 Logitech mice.
        2.1.3 PS/2 mice.
        2.1.4 ATI combo video/mice.
        2.1.5 IBM PC110 palmtop digitizer.
        2.1.6 Apple Desktop Mouse
        2.1.7 Hybrid Mice
     2.2 Mouse protocols.

  3. Getting your mouse working.

     3.1 Setting the mouse interrupt.
        3.1.1 Common IRQ usage. In most cases IRQ4 is used for the first serial port (
        3.1.2 Inport and Logitech mice.
        3.1.3 ATI-XL mice.
        3.1.4 PS/2 mice.
     3.2 Configuring the kernel.
        3.2.1 Compiling the kernel.
        3.2.2 Changing interrupts with newer kernels.
     3.3 The mouse devices.

  4. Using your mouse.

     4.1 Configuring Applications
        4.1.1 Redhat
        4.1.2 Other configurations
     4.2 gpm.
     4.3 XFree86.
     4.4 XFree86 and gpm.

  5. Still can't get your mouse going?

     5.1 Other resources
        5.1.1 3-Button Mouse HOWTO.
        5.1.2 Laptop-HOWTO.
        5.1.3 Wacom Tablet HOWTO The


  ______________________________________________________________________

  1.  Introduction.

  This document is a guide to getting your busmouse working with Linux.
  With the more advanced distributions available today setting up your
  busmouse is generally easy but when you do run into problems this
  document will help give you a better understanding of how to manually
  setup your busmouse hardware and software.

  Busmouse support has been in the kernel for as long as I can remember,
  and hasn't changed much in a long time, so this document should be
  relevant to any version of Linux you're likely to have.


  1.1.  Copyright and Disclaimer.

  This document is Copyright (c) 2000 by Chris Bagwell.  This document
  may be distributed under the terms set forth in the Linux
  Documentation Project License at http://linuxdoc.org/copyright.html.
  Please contact the author if you are unable to get the license.

  The author disclaims all warranties with regard to this document,
  including all implied warranties of merchantability and fitness for a
  certain purpose; in no event shall the author be liable for any
  special, indirect or consequential damages or any damages whatsoever
  resulting from loss of use, data or profits, whether in an action of
  contract, negligence or other tortious action, arising out of or in
  connection with the use of this document.


  1.2.  Feedback.

  If you find any mistakes in this document, have any comments about its
  contents or an update or addition, send them to me at the address
  listed at the top of this howto.


  1.3.  Acknowledgements.

  This howto has been, in the spirit of Linux, a community effort.
  Thanks goes out to Mike Battersby, mib@post.com as he started this
  FAQ.  Any errors are most likely added by me.

  Many thanks go to Johan Myreen for the sections on the PS/2 mice,
  Robert T. Harris for help on the ATI-XL sections and Reuben Sumner for
  miscellaneous info and constructive criticism.

  Thanks also to the multitudes of people who have sent me mouse
  information, fixes or words of encouragement.


  2.  Determining your mouse type.

  There are two separate but important characteristics you will need to
  know about your mouse before you go on: what hardware interface it
  uses and what mouse protocol it uses.


  The hardware interface is the hardware aspect of the mouse, taking
  into account things like which i/o ports it uses and how to check if
  it is installed.  This is the part which the kernel is concerned with
  so that it knows how to read data from the mouse.  For serial mice
  users, this part of the story is easy since their interface is always
  the serial port device drivers.

  The mouse protocol is the software aspect of the mouse.  Applications
  need to know the protocol to interpret the raw mouse data they receive
  from the kernel device driver.



  2.1.  Hardware interfaces.

  The Linux kernel up to the 2.2 series supports four different kinds of
  busmouse hardware interface : Inport (Microsoft), Logitech, PS/2 and
  ATI-XL.

  The 2.4 series of kernel also includes support for several new busmice
  including an IBM PC110 digitizer pad and Apple Desktop mouse.  It also
  contains drivers for USB mice which are sometimes discussed with
  busmice since they fall outside the more common serial driver
  interface.

  There is no sure-fire way of determining your hardware interface.  For
  those that have Windows 9x install, it sometimes helps to go to the
  Systems screen under the control panel and look for devices
  controlling your mouse.  This screen will often tell you the interface
  type and what I/O ports and interrupts this hardware uses.


  2.1.1.  Inport mice.

  Inport mice include most of the old style Microsoft mice which are
  shaped like a bar of dove soap.  Inport mice generally connect to an
  interface card which plugs into the bus on your motherboard.  If the
  plug which connects your mouse cord to the interface card is round,
  has 9 pins, and a notch in one side you likely have an Inport mouse.

  ATI currently claims that all ATI VGA + Busmouse combo cards used the
  Microsoft Inport hardware and thus owners of these cards should first
  attempt using the Microsoft Busmouse driver.

  The ATI-XL VGA+Busmouse card technically is compatible with the
  Microsoft Inport mouse driver but has slightly different provisioning
  for interrupts and therefore has a specific driver for it.  Avoid this
  driver if possible since its not supported very well.


  2.1.2.  Logitech mice.

  Logitech mice in general appear almost exactly the same as Inport
  mice.  They too connect to an interface card via a 9 pin mini-din
  connector.  Hopefully, it will have come in a Logitech box or have
  ``Logitech'' printed on the connector card so that you can tell it
  actually is a Logitech mouse.


  2.1.3.  PS/2 mice.

  The PS/2 mouse interface is not on an expansion card, the mouse is
  connected to the PS/2 port on the keyboard controller.  This is
  sometimes located on the keyboard or more often as a extra port
  somehow connected directly to the computer case.

  A PS/2 port uses a 6-pin mini DIN connector, similar to the keyboard
  connector.  Many laptops also use this kind of interface to their
  trackballs or touchpads; in this case the mouse is internally
  connected to the PS/2 port and needs no connector.


  2.1.4.  ATI combo video/mice.

  ATI-XL mice are a variant of Inport mice, with some slight differences
  in interrupt setup.  They come on the ATI-XL combined video
  adaptor/mouse card.  Unless you know you have an ATI-XL card (and thus
  an ATI-XL mouse), you probably don't have one of these. It is possible
  for ATI-XL mice to use either the ATI-XL or Inport kernel drivers,
  although the ATI-XL driver should give better results.

  There is also an older ATI video adaptor/mouse card called either ATI
  VGA1024 or ATI VGA Wonder.  These cards are setup the same as the ATI-
  XL but use the Logitech mouse protocol.  For these mice the hardware
  drivers are setup the same as for the ATI-XL but you setup the
  software the same as the Logitech mice.


  2.1.5.  IBM PC110 palmtop digitizer.

  The IBM PC110 palmtop contains a digitizer pad that can be used to
  emulate a mouse using the PS/2 mouse protocol.  In this case, you set
  up the hardware interface using the IBM PC110 device driver and setup
  software as you would a PS/2 mouse.


  2.1.6.  Apple Desktop Mouse

  This bus mouse is common on Macintoshes and uses a 4 pin connector.
  The hardware is controled by the kernel but application software will
  need to be aware of its unique mouse protocol.  I am currently unaware
  of what protocols this mouse uses.


  2.1.7.  Hybrid Mice

  The period of time that busmouse were popular, the hardware companies
  were experementing alot and cross-licensing each others designs.
  Therefore, you could have a ATI mouse that uses the Logitech hardware
  interface or a Logitech that uses the Inport interface.  If you know
  you have a busmouse but can't get it working with the standard
  interface/protocol setups, try experementing by using different
  interface device drivers with different mouse protocols.


  2.2.  Mouse protocols.

  The PC world is full of different and conflicting mouse protocols.
  Fortunately, the choice for bus mice is considerable smaller than that
  for serial mice.  Most Inport, Logitech and ATI-XL mice use the
  ``BusMouse'' protocol, although there are some ancient Logitech mice
  which use the ``MouseSystems'' protocol, and some even older Microsoft
  mice which use the ''Logitech'' protocol.  PS/2 mice will always use
  the ``PS/2'' protocol.


  3.  Getting your mouse working.

  Once you have figured out your mouse interface and protocol types,
  you're ready to proceed.


  3.1.  Setting the mouse interrupt.

  Now that you've found out what hardware interface your mouse uses
  you'll need to know which interrupt number your mouse is using, and
  make sure it doesn't conflict with any other peripherals you have
  installed.  That last part deserves to be repeated!  Make sure that it
  does not conflict with any other peripherals you have installed!

  You should make sure that your mouse is not trying to use the same
  interrupt as any of your other devices --- it is not possible for the
  mouse to share an interrupt under Linux, even though it may work fine
  under other operating systems.  Check the documentation for all your
  peripherals to see which interrupt they use.
  Under Linux, busmice don't register which IRQ they are using until
  after they have been opened by an application that makes use of them.
  Plug-n-Play hardware often registers their interrupts during bootup.
  This creates a possibility for a Plug-n-Play peice of hardware to
  steal the IRQ away from your mouse.  Bear in mind that other operating
  systems may be initialzing the P-n-P cards to an IRQ that is not in
  conflict with your busmouse but things may not work out as nicely
  under Linux.  It is up to you to make sure there are no IRQ conflicts
  between all of your equipment.

  3.1.1.  In most cases IRQ4 is used for the first serial port (
  /dev/ttyS0 ), IRQ3 for the second ( /dev/ttyS1 ) (these are assuming
  you actually have such devices --- if you don't you can happily use
  their IRQ's), IRQ5 for some SCSI adaptors, and IRQ12 for some network
  cards.  Having a other card use IRQ12 is a big problem for machines
  with PS/2 ports as you are forced to use IRQ12 only for the PS/2 port.
  For ATI-XL, Inport and Logitech mice the kernel default is to use
  IRQ5, so if you are stuck with a pre-compiled kernel (eg, CD-ROM
  users) you will have to use that.  If you are using an Inport or Log-
  itech mice with a newer kernel you may be able to pass a command line
  option to the kernel to tell it what interrupt to use without recom-
  piling.  Common IRQ usage.

  3.1.2.  Inport and Logitech mice.

  If you open up your computer's case and look at the card which your
  mouse plugs into, you should notice a block of jumpers on the card
  (hopefully labeled ``INTERRUPT'') with positions for interrupt
  (otherwise known as IRQ) numbers 2,3,4 and 5.  To change the interrupt
  simply move the jumper from its current position onto the correct pair
  of pins.



       ***     MAKE SURE YOUR COMPUTER IS TURNED OFF   ***
       ***     BEFORE CHANGING THE JUMPERS AROUND!!    ***



  3.1.3.  ATI-XL mice.

  ATI-XL and a few other ATI busmice have a software selectable IRQ -
  you should have received with your mouse a MS-DOS program (VSETUP.EXE)
  to set the IRQ.  In order to do so you must (temporarily) boot MS-DOS
  and run this program.  Note that the VSETUP program takes an optional
  parameter ``/70'' to increase the vertical refresh rate (which results
  in less flicker).  The VSETUP program also allows you to select either
  the primary or secondary mouse address - you should set this to the
  primary address or the kernel will not be able to detect your mouse.

  Once VSETUP has been run you must perform a hard reset for the new
  configuration to take effect.


  3.1.4.  PS/2 mice.

  The PS/2 mouse always uses IRQ12 -- there is no way of changing this
  (except with a soldering gun.)  In the rare case that some other
  device is using IRQ12, you'll have to rejumper that peripheral to use
  another IRQ number.



  3.2.  Configuring the kernel.

  In order for your busmouse to operate correctly you will need to
  configure your kernel to compile in busmouse support.  If you are
  using a pre-compiled kernel then it often comes with support for all
  three busmouse included.  This may still not be enough.  The kernel
  could be trying to use the wrong interrupt or the detection can get
  confused and treat your mouse as the wrong type.


  In pre-2.4 series kernel there is no support for auto-detection of the
  IRQ that a busmouse is using.  Therefore, if your card is set to
  anything but the kernel default value of IRQ 5 then you will need to
  let the kernel know what IRQ to use instead.  This can be done in one
  of two ways.  The easiest is to pass command line options to the
  kernel during the bootup process.  Please read thru the "Compiling the
  kernel" section for reference but attempt the directions in "Changing
  interrupts with newer kernels" first.  Also of great help in this area
  is the Bootprompt-HOWTO, avaliable at most sites that carry this
  HOWTO.


  3.2.1.  Compiling the kernel.

  Change to your kernel directory (here assumed to be (/usr/src/linux)
  and do a


       make config


  If you are unsure as to your mouse type, the first time you recompile
  the kernel you may wish to enable all of the busmouse options in the
  hope that the kernel will autodetect your mouse properly.  People have
  mixed success with this: it doesn't always work, but on the other hand
  it might save you any further compiles.

  Answer ``y'' or ''m'' to the question pertaining to your type of
  busmouse interface and ``n'' to all the other busmouse questions.  Use
  the ''m'' option if you have your system setup to support loading
  kernel modules if you do not or do not know what that means then it
  will be safe to always answer ''y'' to have the support directly
  compiled into your kernel.

  As an example, if you have an Inport mouse you should answer ``y'' to


       Microsoft busmouse support


  and ``n'' to all other busmouse questions.  Answer the non-mouse
  related questions as you usually would.

  To compile the kernel with PS/2 mouse support answer ``y'' to the
  question.


       PS/2 mouse (aka "auxiliary device") support


  The PS/2 mouse driver actually supports two kinds of devices: the
  standard PS/2 Auxiliary Device controller and a special PS/2 mouse
  interface chip from Chips & Technologies which is used in the Texas
  Instruments Travelmate and Gateway Nomad laptops.  To compile in
  support for the trackballs on these computers, answer ``y'' to the

       C&T 82C710 mouse port support (as on TI Travelmate)


  question.  Note that you will still have to answer ``y'' to the
  question about the standard PS/2 driver to even get a chance to answer
  this question, since the 82C710 driver is actually an add-on to the
  standard PS/2 mouse driver.

  When configured both for a standard PS/2 mouse device and the 82C710
  device, the driver first tries to locate a 82C710 chip at boot time.
  Failing this, the standard driver is used instead, so using a kernel
  configured for both types of interface on a machine with a standard
  PS/2 mouse port should work too.  However, there has been one report
  of a falsely detected 82C710 chip, so to be on the safe side do not
  configure in support for the 82C710 if you don't need it.

  You will now need to tell the kernel what interrupt your mouse uses.
  You can skip this step if your using a PS/2 mouse as it always uses
  IRQ 12.

  If you have a Logitech, Inport mouse, or an ATI mouse that uses the
  Logitech protocol, edit the file
  /usr/src/linux/include/linux/busmouse.h and change the line which says


       #define MOUSE_IRQ               5


  to reflect the interrupt number for your mouse (see the section
  ``Setting the mouse interrupt'' for details on finding your interrupt
  number).

  If you have an ATI-XL mouse, edit the file
  /usr/src/linux/drivers/char/atixlmouse.c and change the line which
  says


       #define ATIXL_MOUSE_IRQ         5


  to reflect your mouse's interrupt number.

  Due to the vagaries of the PC architecture, if you have set your mouse
  to use interrupt 2, you must set the #define to use interrupt 9.

  Examples

  For a mouse on interrupt 3, you should change the line to read


       #define MOUSE_IRQ               3


  For a mouse on interrupt 2, you should change the line to read


       #define MOUSE_IRQ               9


  Next, compile your kernel as per the instructions which come with it,
  and boot from the new kernel.  You should now have the busmouse
  support correctly compiled in.



  3.2.2.  Changing interrupts with newer kernels.

  The steps to compile into the kernel what interrupt it uses works with
  any version of the kernel to date.  Newer kernels (starting somewhere
  in  the 2.x.x's) allow you to pass arguments to the kernel during load
  time using something like LILO or LOADLIN to specify the interrupt
  number for Logitech and Microsoft Inport mice. This can be a real time
  saver as you do not need to recompiler your kernel (or know how to).
  If you've configured your kernel to load the mouse drivers as modules
  then you will need to pass this information when loading the module.

  You can add the following options to your boot line in LILO to change
  interrupt:



       bmouse=3  (Logitech Busmice)
       msmouse=3 (for Microsoft Inport mice)



  Substitute the 3 with your mouse's actual interrupt. An example of
  using this with lilo is:


       LILO:linux msmouse=3


  You can consult your LILO or LOADLIN docs to see how to add this type
  information to their configuration files so that you do not need to
  type it.

  If your system uses kerneld to auto load modules, you can edit your
  /etc/conf.modules or /etc/modules.conf file, which ever your system
  uses, and add one of the following lines.



       options msbusmouse mouse_irq=3
       options busmouse mouse_irq=3



  3.3.  The mouse devices.

  Mice under Linux are accessed via the devices in the /dev directory.
  The following table gives a list of interface types and which device
  you should use.



       INTERFACE        DEVICE        MAJOR    MINOR
       ---------------------------------------------
       Logitech        /dev/logibm      10      0
       PS/2            /dev/psaux       10      1
       Inport          /dev/inportbm    10      2
       ATI-XL          /dev/atibm       10      3



  Note: If you are using your ATI-XL mouse with the Inport driver, you
  should use the inportbm device, not the /dev/atibm device.
  The major and minor entries are the device numbers for that particular
  device.

  If you find that you do not have these devices, you should create them
  first.  To do so, execute the following as root.



       mknod /dev/logimm    c 10 0
       mknod /dev/psaux     c 10 1
       mknod /dev/inportbm  c 10 2
       mknod /dev/atibm     c 10 3



  Note: Some time in the (progressively less) recent history of Linux
  the names for the busmouse devices have changed.  The following device
  names have been superceded by those above and should be removed:
  bmousems, bmouseps2, bmouseatixl, and bmouselogitech..

  Many people like to create a symbolic link from their mouse device to
  /dev/mouse so that they don't have to remember which device they need
  to be using.  If you have one of the current Linux distributions you
  will almost certainly find that you have such a link.  If you have
  such a link, or create one, you should make sure that it is pointing
  to the correct device for your mouse.


  4.  Using your mouse.

  This section deals with the general use of your mouse with various
  applications.


  4.1.  Configuring Applications

  Most Linux Distributions will prompt you for what type of mouse you
  have during installation and then setup both gpm and X windows for
  you.  If you do not select the correct mouse protocol or install new
  mouse hardware you can usually run a command line program that will
  reconfigure both gpm and X windows to use the new protocol.


  4.1.1.  Redhat

  Under RedHat you can run /usr/sbin/mouseconfig.


  4.1.2.  Other configurations

  Consult your installation documents for what to run under other
  distributions.


  4.2.  gpm.

  Gpm is a program which allows you to do mouse based 'cut- and-paste'
  between Linux virtual consoles, much like you can under X, and is a
  good way of testing your mouse out.  The most current version of gpm
  can be found at ftp://ftp.prosa.it/pub/gpm.  Most Linux distributions
  come with a precompiled gpm binary.

  When invoking gpm, use the -t switch to indicate which protocol your
  mouse is using and the -m option to indicate which mouse device you
  are using.  Three protocols useful for most busmice are logi, bm, and
  ps2.  The default for mouse device is to use /dev/mouse, so you can
  omit the -m option if you have the appropriate symbolic link.  An
  example for a Microsoft Inport mouse is:


       gpm -t bm


  or if you use the PS/2 protocol:


       gpm -t ps2


  You should then be able move your mouse and see a block move around
  the screen and also be able to cut and paste text between virtual
  consoles using the mouse buttons.  Read the documentation with gpm, or
  do a ``man gpm'' for more information on how to operate it.


  4.3.  XFree86.

  To use your busmouse under XFree86, you will need to set your mouse
  protocol type in your Xconfig file. If you have a BusMouse protocol
  mouse, your Xconfig should contain (including the quotes)



       Section "Pointer"
         Protocol "Busmouse"
         Device   "/dev/mouse"

         # Any other options such as Emulate3Buttons
       EndSection



  For PS/2 mice change the protocol line to:



         Protocol        "PS/2"



  If you have a two button mouse, it should also contain the line



         Emulate3Buttons



  which will allow you to emulate the use of the middle mouse button by
  pressing both mouse buttons simultaneously.  All other mouse related
  lines, such as ``BaudRate'' and ``SampleRate'' should be commented
  out, as these have no effect on bus mice.


  4.4.  XFree86 and gpm.

  For a long period of the kernel developement, it was not possible to
  share busmice between processes.  Because of this it was hard to run
  both XFree86 and gpm at the same time. If you try to run X with gpm
  running and you get errors like the following then you know you are
  using one of these older kernels.



       Fatal server error:
       Cannot open mouse (Device or resource busy)



  There are two meathods of getting gpm working with XFree86 with these
  kernels.  The first is to kill any copy of gpm you have running before
  you start up XFree86.  The second is to use gpm's "repeater" option
  (it takes mouse data and repeats the information to multiple
  applications).

  I would recommend upgrading your kernel if possible so that you can
  share busmice between processes.  For this document, I will only
  explain the simplest meathod of using XFree86 and gpm together with
  older kernels.  Please see gpm's documentation if you would like to
  use the repeater meathod.

  Gpm allows you to terminate running copies of itself by executing:


       gpm -k


  This should be done before starting up X11.  Take whatever script you
  use to start up your X session, such as startx, and add the above
  command to the top of the script so that gpm is shut down
  automatically.  You may wish to also put a command that restarts gpm
  at the bottom of the script so that it restarts upon exiting your X
  session.


  5.  Still can't get your mouse going?

  So you've read through this howto a dozen times, done everything
  exactly as you think you should have, and your mouse still doesn't
  work?  The best advice I can give you is this: experiment.  Sure, it's
  a pain in the posterior, but in the end the only way to find out what
  is going to work with your mouse is to try all of the alternatives
  until you have success.

  As always, if there is something you don't understand, try reading the
  manual page first and see if that helps.  If you have a specific
  question, or a problem you think I might be able to help with, feel
  free to contact me at the address listed at the top of this howto, and
  I'll see if I can help you out or point you to someone who can.

  The comp.os.linux.setup newsgroup or comp.os.linux.hardware is the
  appropriate forum for discussion and/or questions regarding setup ---
  please don't post questions to other groups, and especially don't
  crosspost questions to two or more of the Linux groups, they are more
  than cluttered enough as it is!  When posting, you will get a much
  better response (and much fewer flames) if you use appropriate
  Subject: and Keywords: lines.  For example:



       Subject: BUSMICE - Gateway 2000 mouse wont work.
       Keywords: mouse busmouse gateway

  5.1.  Other resources

  The following are useful resources for information regarding Linux and
  Mice.


  5.1.1.  3-Button Mouse HOWTO.

  The 3-Button Mouse HOWTO is of great use if you have a combination
  3-Button Serial/PS2 mouse.  It gives pointers on how to get the middle
  button working.


  5.1.2.  Laptop-HOWTO.

  The Linux Laptop-HOWTO gives pointers on getting external mice working
  along with your built in mouse.


  5.1.3.  TheWacom Tablet HOWTO gives pointers on using the Wacom Tabel
  as a mouse.  Wacom Tablet HOWTO



  C++ Programming HOW-TO
  Al Dev (Alavoor Vasudevan)        alavoor@yahoo.com
  v12.0, 10 July 2000

  This document discusses methods to avoid memory problems in C++ and
  also will help you to program properly in C++ language. The informa
  tion in this document applies to all the operating systems that is -
  Linux, MS DOS, BeOS, Apple Macintosh OS, Windows 95/98/NT/2000, OS/2,
  IBM OSes (MVS, AS/400 etc..), VAX VMS, Novell Netware, all flavors of
  Unix like Solaris, HPUX, AIX, SCO, Sinix, BSD, etc.. and to all other
  operating systems which support "C++" compiler (it means almost all
  the operating systems on this planet!).
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Problems facing the current C++ compilers
     1.2 Which one "C", "C++" or Java ?

  2. Download String

  3. Usage of String class

     3.1 Operators
     3.2 Functions
     3.3 Miscellaneous Functions

  4. C++ Zap (Delete) command

  5. Pointers are problems

  6. Usage of my_malloc and my_free

  7. Debug files

  8. C++ Online-Docs

     8.1 C++ Tutorials
     8.2 C++ Coding Standards
     8.3 C++ Quick-Reference
     8.4 C++ Usenet Newsgroups

  9. Memory Tools

  10. Related URLs

  11. Other Formats of this Document

  12. Copyright

  13. Appendix A example_String.cpp

  14. Appendix B String.h

  15. Appendix C String.cpp

  16. Appendix D my_malloc.cpp

  17. Appendix E my_malloc.h

  18. Appendix F debug.h

  19. Appendix G debug.cpp

  20. Appendix H Makefile



  ______________________________________________________________________

  1.  Introduction

  C++ is the most popular language and will be used for a long time in
  the future inspite of emergence of Java. C++ runs extremely fast and
  is in fact  10 to 20 times FASTER than  Java. Java runs very slow
  because it is an byte-code-interpreted language running on top of
  "virtual machine".  Java runs faster with JIT compiler but is still
  slower than C++. And optimized C++ program is about 3 to 4 times
  faster than Java using the JIT (Just-In-Time) compiler!! The memory
  management in Java is automated, so that programmers do not directly
  deal with memory allocations. This document attempts to automate the
  memory management in C++ to make it much more easy to use.  A neat
  feature of Java is that memory allocations are taken care of
  automatically.  This howto will enable "C++" to "compete/imitate" with
  Java language in memory management.

  Because of manual memory allocations, debugging the C++ programs
  consumes a major portion of time. The information in this document
  will give you some better ideas and tips to reduce the debugging time.

  1.1.  Problems facing the current C++ compilers

  Since C++ is super-set of C, it got all the bad features of "C"
  language.

  For example, in "C" programming - memory leaks, memory overflows are
  very common due to usage of features like -

  ______________________________________________________________________
          Datatype  char * and char[]
          String functions like strcpy, strcat, strncpy, strncat, etc..
          Memory functions like malloc, realloc, strdup, etc..
  ______________________________________________________________________



  The usage of char * and strcpy causes horrible memory problems due to
  "overflow", "fence past errors", "step-on-others-toe" (hurting other
  variable's memory locations) or  "memory leaks".  The memory problems
  are extremely hard to debug and are very time consuming to fix and
  trouble-shoot. Memory problems bring down the productivity of
  programmers. This document helps in increasing the productivity of
  programmers via different methods addressed to solve the memory
  defects in "C++".  Memory related bugs are very tough to crack, and
  even experienced programmers take several days, weeks or months to
  debug memory related problems. Many times memory bugs will be "hiding"
  in the code for several months and can cause unexpected program
  crashes!! The usage of char * in C++ is costing USA and Japan $2
  billion every year in time lost in debugging and downtime of programs.
  If you use char * in C++ then it is a very costly affair especially if
  your programs have more than 50,000 lines of code.

  Hence, the following techniques are proposed to overcome the faults of
  "C" language.

  It is proposed that C++ compilers should prevent the programmers from
  using the "char *" , "char[]" datatypes and functions like strcpy,
  strcat, strncpy, strncat.  The datatypes like char *, char[] and
  functions like strcpy, strcat are evil and must be completetly BANNED
  from usage in C++!!  The "char *" is like smallpox virus and it must
  be eradicated from C++ world!!  If you want to use "char *" as in some
  system functions than you should use "C" language. You would put all
  your "C" programs in a separate file and link to "C++" programs using
  the linkage-specification statement extern "C"  -

  ______________________________________________________________________
  extern "C" {
  #include <stdlib.h>
  }

  extern "C" {
          comp();
          some_c_function();
  }
  ______________________________________________________________________

  The extern "C" statement says that everything within the brace-sur
  rounded block - in this case, everything in the header file and
  comp(), some_c_function() is compiled by a C compiler.

  Instead of using char * and char[] all the C++ programmers MUST use
  the which is given in this document and included in the STDLIB.  The
  utilises the constructor and destructor to automate the memory
  management and also provides many functions like ltrim, substring,
  etc..

  See also related in the C++ compiler. The string class is part of the
  standard GNU C++ library and provides lot of string manipulation
  functions. The can remove the need of char * datatype.  Also, C++
  programmers must be encouraged to use 'new', 'delete' features instead
  of using 'malloc' or 'free'.

  The does everything that char * or char [] does. It can completely
  replace char datatype. Plus added benefit is that programmers do not
  have to worry about the memory problems and memory allocation at all!!

  The GNU C++ compiler MUST drop off the support of char *, char[]
  datatypes and in order to compile older programs using char datatype,
  the compiler should provide a additional option called "-fchar-
  datatype" to g++ command.  Over the next 2 years all the C++ programs
  will use and and there will be no char * and char[]. The compiler
  should try to prevent bad programming practices!

  1.2.  Which one "C", "C++" or Java ?

  It is recommended you do programming in object-oriented "C++" for all
  your application programming or general purpose programming. You can
  take full advantage of object oriented facilities of C++. The C++
  compiler is lot more complex than "C" compiler and C++ programs may
  run bit slower than "C" programs. But speed difference between "C" and
  "C++" is very minute - it could be few milli-seconds which may have
  little impact for real-time programming.  Since computer hardware is
  becoming cheaper and faster and memory "C" as time saved in clarity
  and re-usability of C++ code offsets the slow speed.  Compiler
  optimizer options like -O or -O3 can speed up C++/C which is not
  available in Java.

  Nowadays, "C" language is primarily used for "systems programming" to
  develop operating systems, device drivers etc..

  Java is platform independent language more suitable for developing GUI
  running inside web-browsers (Java applets) but runs very slow. Prefer
  to use web-server-side programming "Fast-CGI" with C++ and HTML,
  DHTML, XML to get better performance. Hence, the golden rule is "Web-
  server side programming use C++ and web-client side (browser)
  programming use Java applets". The reason is - the server-side OS
  (Linux) is under your control and never changes and you will never
  know what the client side web-browser OS is. It can be Internet
  appliance device (embedded linux+netscape) or computers running
  Windows 95/98/NT/2000 or Linux, Apple Mac, OS/2, Netware, Solaris
  etc..

  The greatness of Java language is that you can create "Applets (GUI)"
  which can run on any client OS platform!  Java was created to replace
  the Microsoft Windows 95/NT GUI APIs like MS Visual Basic or MS Visual
  C++.  In other words - "Java is the cross-platform Windows-GUI API
  language of next century".  Many web-browsers like Netscape supports
  Java applents and web-browser like Hot Java is written in java itself.
  But the price you pay for cross-platform portability is the
  performance, applications written in Java run very slow.


  Hence, Java runs on "client" and C++ runs on servers!!

  2.  Download String

  All the programs, examples are given in Appendix of this document.
  You can download as a single tar zip, the String class, libraries and
  example programs from

    Go here and click on C++Programming howto.tar.gz file
     <http://www.aldev.8m.com>

    Mirror site :  <http://aldev.webjump.com>

  3.  Usage of String class

  To use String class, you should first refer to a sample program
  "example_String.cpp" given in ``Appendix A'' and the String class
  which is given in ``Appendix B''.

  The is a complete replacement for char and char * datatype.  You can
  use just like char and get much more functionalities.  You should link
  with the library 'libString.a' which you can build from the makefile
  given in ``Appendix H'' and copy the library to /usr/lib or /lib
  directory where all the "C++" libraries are located. To use the
  'libString.a' compile your programs like -

  ______________________________________________________________________
          g++ example.cpp -lString
  ______________________________________________________________________


  See illustration sample code as given below -

  ______________________________________________________________________
          String aa;

          aa = " Washington DC is the capital of USA ";

          // You can use aa.val() like a 'char *' variable in programs !!
          for (unsigned long tmpii = 0; tmpii < aa.length(); tmpii++)
          {
                  //fprintf(stdout, "aa.val()[%ld]=%c ", tmpii, aa.val()[tmpii]);
                  fprintf(stdout, "aa[%ld]=%c ", tmpii, aa[tmpii]);
          }

          // Using pointers on 'char *' val ...
          for (char *tmpcc = aa.val(); *tmpcc != 0; tmpcc++)
          {
                  fprintf(stdout, "aa.val()=%c ", *tmpcc);
          }
  ______________________________________________________________________



  3.1.  Operators

  The provides these operators :-

    Equal to ==

    Not equal to !=

    Assignment =

    Add to itself and Assignment +=

    String concatenation or addition +

     For example to use operators -

     ___________________________________________________________________
             String aa;
             String bb("Bill Clinton");

             aa = "put some value string";  // assignment operator
             aa += "add some more"; // Add to itself and assign operator
             aa = "My name is" + " Alavoor Vasudevan "; // string cat operator

             if (bb == "Bill Clinton")  // boolean equal to operator
                     cout << "bb is eqaul to 'Bill Clinton' " << endl;

             if (bb != "Al Gore")   // boolean 'not equal' to operator
                     cout << "bb is not equal to 'Al Gore'" << endl;
     ___________________________________________________________________



  3.2.  Functions

  The functions provided by String class has the same name as that Java
  language's String class. The function names and the behaviour is
  exactly same as that of Java's string class!! This will facilitate
  portability of code between Java and C++ (you can cut and paste and do
  minimum changes to code).

  The provides these Java like functions :-

    Current string length length()

    char charAt(int where);

    void getChars(int sourceStart, int sourceEnd, char target, int
     targetStart);

    char* toCharArray();

    bool equals(String str2); // See also == operator

    bool equals(char *str2); // See also == operator

    bool equalsIgnoreCase(String str2);

    bool regionMatches(int startIndex, String str2, int str2StartIndex,
     int numChars);

    bool regionMatches(bool ignoreCase, int startIndex, String str2,
     int str2StartIndex, int numChars);

    String toUpperCase();

    String toLowerCase();

    bool startsWith(String str2);

    bool startsWith(char *str2);

    bool endsWith(String str2);

    bool endsWith(char *str2);

    int compareTo(String str2);

    int compareTo(char *str2);

    int compareToIgnoreCase(String str2);

    int compareToIgnoreCase(char *str2);

    int indexOf(char ch, int startIndex = 0);

    int indexOf(char *str2, int startIndex = 0);

    int indexOf(String str2, int startIndex = 0);

    int lastIndexOf(char ch, int startIndex = 0);

    int lastIndexOf(char *str2, int startIndex = 0);

    int lastIndexOf(String str2, int startIndex = 0);

    String substring(int startIndex, int endIndex = 0);

    String replace(char original, char replacement);

    String replace(char *original, char *replacement);

    String trim(); // See also overloaded trim()

    String concat(String str2);  // See also operator +

    String concat(char *str2); // See also operator +

    String append(String str2) {return concat(str2);} // See also
     operator +

    String append(char *str2) {return concat(str2);} // See also
     operator +

    String append(int bb) {return (*this + bb);} // See also operator +

    String append(unsigned long bb) {return (*this + bb);} // See also
     operator +

    String append(float bb) {return (*this + bb);} // See also operator
     +

    String insert(int index, String str2);

    String insert(int index, char ch);

    String reverse(); // See also overloaded reverse()

    String deleteCharAt(int loc);

    String deleteStr(int startIndex, int endIndex); // Java's
     "delete()"

  These are addional functions which are not available in Java.

    Left trim the string. Remove leading white-spaces - newlines, tabs
     ltrim()

    Right trim the string. Remove trailing white-spaces - newlines,
     tabs rtrim()

    Remove trailing and leading white-spaces trim()


    Remove trailing newlines chop()

    Change string to upper case to_upper()

    Change string to lower case to_lower()

    Truncate or round-off the float value roundf(float input_val, short
     precision)

    Truncate or round-off the double value roundd(double input_val,
     short precision)

    Find position, matching substr beginning from start pos(char
     *substr, unsigned long start)

    Explodes the string and returns the list in the list-head pointer
     explodeH explode(char *seperator)

    Implodes the strings in the list-head pointer explodeH and returns
     the String variable implode(char *glue)

    Joins the strings in the list-head pointer explodeH and returns the
     String variable join(char *glue)

    Repeat the input string n times repeat(char *input, unsigned int
     multiplier)

    Replace all occurences of string 'needle' with 'str' in the
     haystack 'val' replace(char *needle, char *str)

    Translate certain chars str_tr(char *from, char *to)

    Center the text string center(int length, char padchar = ' ')

    Formats the original string by placing 'number' of 'padchar'
     characters between each set of blank-delimited words. Leading and
     Trailing blanks are always removed. If 'number' is omitted or is 0,
     then all spaces are in the string are removed. The default number
     is 0 and default padchar ' ' space(int number = 0, char padchar = '
     ')

    The result is string comprised of all characters between and
     including 'start' and 'end' xrange(char start, char end)

    Removes any characters contained in 'list'. The default character
     for 'list' is a blank ' ' compress(char *list)

    Deletes a portion of string of 'length' characters from 'start'
     position.  If start is greater than the string length than string
     is unchanged delstr(int start, int length)

    The 'newstr' in inserted into val beginning at 'start'. The
     'newstr' will be padded or truncated to 'length' characters. The
     default 'length' is string length of newstr insert(char *newstr,
     int start = 0, int length = 0, char padchar = ' ')

    The result is string of 'length' chars madeup of leftmost chars in
     val.  Quick way to left justify a string left(int length = 0, char
     padchar = ' ')

    The result is string of 'length' chars madeup of rightmost chars in
     val.  Quick way to right justify a string right(int length = 0,
     char padchar = ' ')

    The 'newstr' in overlayed into val beginning at 'start'. The
     'newstr' will be padded or truncated to 'length' characters. The
     default 'length' is string length of newstr overlay(char *newstr,
     int start = 0, int length = 0, char padchar = ' ')

    Sub-string, extract a portion of string substr(int start, int
     length = 0)

    matches first match of regx at(char *regx)

    Returns string before regx before(char *regx)

    Returns string after regx after(char *regx)

    Returns true if string is NULL value bool isnull()

    Resets the string to NULL clear()

  3.3.  Miscellaneous Functions

  Some miscellaneous String functions are given here, but DO NOT USE
  these, and instead use operators  like '+', '+=', '==' etc.. These are
  'private' members of the 'String' class.

    Copy string str_cpy(char *bb)

    Long integer converted to string str_cpy(unsigned long bb)

    Integer converted to string str_cpy(int bb)

    Float converted to string str_cpy(float bb)

    String concatenate a char * str_cat(char *bb)

    String concatenate a int str_cat(int bb)

    String concatenate a int str_cat(unsigned long bb)

    String concatenate a float str_cat(float bb)

    Is equal to String ? bool equalto(const String & rhs, bool type =
     false)

    Is equal to char* ? bool equalto(const char *rhs, bool type =
     false)

     For example to convert integer to string do -

     ___________________________________________________________________
             String  aa;

             aa = 34;  // The '=' operator will convert int to string
             cout << "The value of aa is : " << aa.val() << endl;

             aa = 234.878;  // The '=' operator will convert float to string
             cout << "The value of aa is : " << aa.val() << endl;

             aa = 34 + 234.878;
             cout << "The value of aa is : " << aa.val() << endl;
             // The output aa will be '268.878'

             // You must cast String to convert
             aa = (String) 34 + " Honourable President Ronald Reagan " + 234.878;
             cout << "The value of aa is : " << aa.val() << endl;
             // The output aa will be '34 Honourable President Ronald Reagan 234.878'
     ___________________________________________________________________


  4.  C++ Zap (Delete) command

  The delete and new commands in C++ are much better than the malloc and
  free functions of "C".  Consider using new and zap (delete command)
  instead of malloc and free as much as possible.

  To make delete command even more cleaner, make a Zap() command. Define
  a zap() command like this:

  ______________________________________________________________________
  /*
  ** Use do while to make it robust and bullet-proof macro.
  ** For example, if "do-while" is NOT used then results will be
  ** something else just as in -
  ** if (bbint == 4)
  **              aa = 0
  ** else
  **              zap(aptr);  // Problem!! aptr will be always set to NULL
  */

  #define zap(x) do { delete(x); x = NULL; } while (0)
  ______________________________________________________________________



  The zap() command will delete the pointer and set it NULL.  This will
  ensure that even if multiple zap()'s are called on the same deleted
  pointer then the program will not crash. For example -


  ______________________________________________________________________
          zap(pFirstname);
          zap(pFirstname); // no core dumps !! Because pFirstname is NULL now
          zap(pFirstname); // no core dumps !! Because pFirstname is NULL now

          zap(pLastname);
          zap(pJobDescription);
  ______________________________________________________________________



  There is nothing magical about this, it just saves repetative code,
  saves typing time and makes programs more readable. The C++
  programmers often forget to reset the deleted pointer to NULL, and
  this causes annoying problems causing core dumps and crashes. The
  zap() takes care of this automatically.  Do not stick a typecast in
  the zap() command -- if something errors out on the above zap()
  command it likely has another error somewhere.

  Also ``my_malloc()'' , my_realloc() and my_free() should be used
  instead of malloc(), realloc() and free(), as they are much cleaner
  and have additional checks.  For an example, see the file "String.h"
  which is using the ``my_malloc()'' and my_free() functions.

  WARNING : Do not use free() to free memory allocated with 'new' or
  'delete' to free memory allocated with malloc. If you do, then results
  will be unpredictable!!

  5.  Pointers are problems

  Pointers are not required for general purpose programming. In modern
  languages like Java there is no support for pointers!! Pointers make
  the programs messy and programs using pointers are very hard to read.

  Avoid using pointers as much as possible and use references. Pointers
  are really a great pain. It is possible to write a application without
  using pointers.

  A reference is an alias; when you create a reference, you initialize
  it with the name of another object, the target. From the moment on,
  the reference acts as an alternative name of the target, and anything
  you do to the reference is really done to the target.

  Syntax of References: Declare a reference by writing the type,
  followed by the reference operator (&), followed by the reference
  name. References MUST be initialized at the time of creation.  For
  example -

  ______________________________________________________________________
          int             weight;
          int     & rweight = weight;

          DOG             aa;
          DOG & rDogRef = aa;
  ______________________________________________________________________



  Do's of references -

    Do use references to create an alias to an object

    Do initialize all references

    Do use references for high efficiency and performance of program.

    Do use const to protect references and pointers whenever possible.

  Do not's of references -

    IMPORTANT: Don't use references to NULL objects !!!!

    Don't confuse the address of operator & with reference operator !!
     The references are used in the declarations section (see Syntax of
     References above).

    Don't try to reassign a reference

    Don't use pointers if references will work

    Don't return a reference to a local object

    Don't pass by reference if the item referred to may go out of scope


  6.  Usage of my_malloc and my_free

  Try to avoid using malloc and realloc as much as possible and use new
  and ``zap''(delete). But sometimes you may need to use the "C" style
  memory allocations in "C++". Use the functions my_malloc() ,
  my_realloc() and my_free().  These functions do proper allocations and
  initialisations and try to prevent memory problems. Also these
  functions (in DEBUG mode) can keep track of memory allocated and print
  total memory usage before and after the program is run. This tells you
  if there are any memory leaks.

  The my_malloc and my_realloc is defined as below. It allocates little
  more memory (SAFE_MEM = 5) and initializes the space and if it cannot
  allocate it exits the program. The 'call_check(), remove_ptr()'
  functions are active only when DEBUG is defined in makefile and are
  assigned to ((void)0) i.e. NULL for non-debug production release. They
  enable the total-memory used tracing.
  ______________________________________________________________________
  void *local_my_malloc(size_t size, char fname[], int lineno)
  {
          size_t  tmpii = size + SAFE_MEM;
          void *aa = NULL;
          aa = (void *) malloc(tmpii);
          if (aa == NULL)
                  raise_error_exit(MALLOC, VOID_TYPE, fname, lineno);
          memset(aa, 0, tmpii);
          call_check(aa, tmpii, fname, lineno);
          return aa;
  }

  char *local_my_realloc(char *aa, size_t size, char fname[], int lineno)
  {
          remove_ptr(aa, fname, lineno);
          unsigned long tmpjj = 0;
          if (aa) // aa !=  NULL
                  tmpjj = strlen(aa);
          unsigned long tmpqq = size + SAFE_MEM;
          size_t  tmpii = sizeof (char) * (tmpqq);
          aa = (char *) realloc(aa, tmpii);
          if (aa == NULL)
                  raise_error_exit(REALLOC, CHAR_TYPE, fname, lineno);

          // do not memset!! memset(aa, 0, tmpii);
          aa[tmpqq-1] = 0;
          unsigned long kk = tmpjj;
          if (tmpjj > tmpqq)
                  kk = tmpqq;
          for ( ; kk < tmpqq; kk++)
                  aa[kk] = 0;
          call_check(aa, tmpii, fname, lineno);
          return aa;
  }
  ______________________________________________________________________


  See ``my_malloc.cpp''.  and the header file ``my_malloc.h''.  for full
  implementation of the my_malloc program.

  An example on usage of my_malloc and my_free as below:

  ______________________________________________________________________
          char    *aa;
          int     *bb;
          float   *cc;
          aa = (char *) my_malloc(sizeof(char)* 214);
          bb = (int *) my_malloc(sizeof(int) * 10);
          cc = (float *) my_malloc(sizeof(int) * 20);

          aa = my_realloc(aa, sizeof(char) * 34);
          bb = my_realloc(bb, sizeof(int) * 14);
          cc = my_realloc(cc, sizeof(float) * 10);
  ______________________________________________________________________


  Note that in my_realloc you do not need to cast the datatype as the
  variable itself is passed and correct my_realloc is called which
  returns the proper datatype pointer. The my_realloc has overloaded
  functions for char*, int* and float*.

  7.  Debug files

  To debug any C++ or C programs include the file ``debug.h'' and in
  your 'Makefile' define DEBUG to turn on the traces from the debug.h
  functions.  When you remove the '-DDEBUG' then the debug function
  calls are set to ((void)0) i.e. NULL, hence it has no impact on final
  production release version of project. You can generously use the
  debug functions in your programs and it will not increase the size of
  production executable.

  See the file ``debug.cpp'' for implementation of debug routines.  And
  see the file ``my_malloc.cpp'' for sample which uses debug.h and debug
  functions.

  See the sample ``Makefile'' .


  8.  C++ Online-Docs

  Visit the following C++ sites :-

    C++ Crash-proof site
     <http://www.troubleshooters.com/codecorn/crashprf.htm>

    C++ Memory site
     <http://www.troubleshooters.com/codecorn/memleak.htm>

  Internet has vast amounts of documentation on C++. Visit the search
  engines like Yahoo, Lycos, Infoseek, Excite. Type in the keywords .
  You can narrow down the search criteria by clicking on Advanced search
  and select search by exact phrase


    <http://www.yahoo.com>

    <http://www.lycos.com>

    <http://www.infoseek.com>

    <http://www.excite.com>

    <http://www.mamma.com>

  8.1.  C++ Tutorials

  There are many on-line tutorials available on internet. Type 'C++
  tutorials' in the search engine.

  8.2.  C++ Coding Standards

  Visit the C++ Coding Standards URLs

    C++ coding standard
     <http://www.cs.umd.edu/users/cml/cstyle/CppCodingStandard.html>

    Coding standards from Possibility
     <http://www.possibility.com/Cpp/CppCodingStandard.html>

    Coding standards from Ambysoft
     <http://www.ambysoft.com/javaCodingStandards.html>

    Rules and recommendations
     <http://www.cs.umd.edu/users/cml/cstyle/>

    Indent and annotate
     <http://www.cs.umd.edu/users/cml/cstyle/indhill-annot.html>

    Elemental rules  <http://www.cs.umd.edu/users/cml/cstyle/Ellemtel-
     rules.html>

    C++ style doc  <http://www.cs.umd.edu/users/cml/cstyle/Wildfire-
     C++Style.html>

  8.3.  C++ Quick-Reference

  Type 'C++ Reference' in the search engine.

  8.4.  C++ Usenet Newsgroups


    C++ newsgroups :  <comp.lang.c++.announce>

    C++ newsgroups :  <comp.lang.c++.*>

  9.  Memory Tools

  Use the following memory debugging tools

    On linux contrib cdrom see mem_test*.rpm package

    On linux cdrom see ElectricFence*.rpm package

    Purify Tool from Rational Software Corp  <http://www.rational.com>

    Insure++ Tool from Parasoft Corp  <http://www.parasoft.com>

    Linux Tools at  <http://www.xnet.com/~blatura/linapp6.html#tools>

    Search the Internet engines like Yahoo, Lycos, Excite, Mamma.com
     for keyword "Linux memory debugging tools".

  10.  Related URLs

  You MUST use a color editor like 'Vim' (Vi improved) while coding in
  C++. Color editors greatly increase your productivity. Visit the URL
  for Vim howto below.

  Visit following locators which are related to C, C++ -

    Vim color text editor for C++, C
     <http://metalab.unc.edu/LDP/HOWTO/Vim-HOWTO.html>

    C++ Beautifier HOWTO  <http://metalab.unc.edu/LDP/HOWTO/C-
     C++Beautifier-HOWTO.html>

    CVS HOWTO for C++ programs  <http://metalab.unc.edu/LDP/HOWTO/CVS-
     HOWTO.html>

    Linux goodies main site  <http://www.aldev.8m.com>

    Linux goodies mirror site  <http://aldev.webjump.com>

  11.  Other Formats of this Document

  This document is published in 11 different formats namely - DVI,
  Postscript, Latex, Adobe Acrobat PDF, LyX, GNU-info, HTML, RTF(Rich
  Text Format), Plain-text, Unix man pages and SGML.

    You can get this HOWTO document as a single file tar ball in HTML,
     DVI, Postscript or SGML formats from -
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/>

    Plain text format is in:
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO>


    Translations to other languages like French, German, Spanish,
     Chinese, Japanese are in
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> Any help from you to
     translate to other languages is welcome.

     The document is written using a tool called "SGML-Tools" which can
     be got from - <http://www.sgmltools.org> Compiling the source you
     will get the following commands like

    sgml2html C++Programming-HOWTO.sgml     (to generate html file)

    sgml2rtf  C++Programming-HOWTO.sgml     (to generate RTF file)

    sgml2latex C++Programming-HOWTO.sgml    (to generate latex file)

  LaTeX documents may be converted into PDF files simply by producing a
  Postscript output using sgml2latex ( and dvips) and running the output
  through the Acrobat distill ( <http://www.adobe.com>) command as
  follows:

  ______________________________________________________________________
  bash$ man sgml2latex
  bash$ sgml2latex filename.sgml
  bash$ man dvips
  bash$ dvips -o filename.ps filename.dvi
  bash$ distill filename.ps
  bash$ man ghostscript
  bash$ man ps2pdf
  bash$ ps2pdf input.ps output.pdf
  bash$ acroread output.pdf &
  ______________________________________________________________________


  Or you can use Ghostscript command ps2pdf.  ps2pdf is a work-alike for
  nearly all the functionality of Adobe's Acrobat Distiller product: it
  converts PostScript files to Portable Document Format (PDF) files.
  ps2pdf is implemented as a very small command script (batch file) that
  invokes Ghostscript, selecting a special "output device" called
  pdfwrite. In order to use ps2pdf, the pdfwrite device must be included
  in the makefile when Ghostscript was compiled; see the documentation
  on building Ghostscript for details.

  This howto document is located at -

    <http://sunsite.unc.edu/LDP/HOWTO/C++Programming-HOWTO.html>

  Also you can find this document at the following mirrors sites -

    <http://www.caldera.com/LDP/HOWTO/C++Programming-HOWTO.html>

    <http://www.WGS.com/LDP/HOWTO/C++Programming-HOWTO.html>

    <http://www.cc.gatech.edu/linux/LDP/HOWTO/C++Programming-
     HOWTO.html>

    <http://www.redhat.com/linux-info/ldp/HOWTO/C++Programming-
     HOWTO.html>

    Other mirror sites near you (network-address-wise) can be found at
     <http://sunsite.unc.edu/LDP/hmirrors.html> select a site and go to
     directory /LDP/HOWTO/C++Programming-HOWTO.html


  In order to view the document in dvi format, use the xdvi program. The
  xdvi program is located in tetex-xdvi*.rpm package in Redhat Linux
  which can be located through ControlPanel | Applications | Publishing
  | TeX menu buttons.  To read dvi document give the command -


               xdvi -geometry 80x90 howto.dvi
               man xdvi



  And resize the window with mouse.  To navigate use Arrow keys, Page
  Up, Page Down keys, also you can use 'f', 'd', 'u', 'c', 'l', 'r',
  'p', 'n' letter keys to move up, down, center, next page, previous
  page etc.  To turn off expert menu press 'x'.

  You can read postscript file using the program 'gv' (ghostview) or The
  ghostscript program is in ghostscript*.rpm package and gv program is
  in gv*.rpm package in Redhat Linux which can be located through
  ControlPanel | Applications | Graphics menu buttons. The gv program is
  much more user friendly than ghostscript.  Also ghostscript and gv are
  available on other platforms like OS/2, Windows 95 and NT, you view
  this document even on those platforms.


    Get ghostscript for Windows 95, OS/2, and for all OSes from
     <http://www.cs.wisc.edu/~ghost>

  To read postscript document give the command -


                       gv howto.ps
                       ghostscript howto.ps



  You can read HTML format document using Netscape Navigator, Microsoft
  Internet explorer, Redhat Baron Web browser or any of the 10 other web
  browsers.

  You can read the latex, LyX output using LyX a X-Windows front end to
  latex.

  12.  Copyright

  Copyright policy is GNU/GPL as per LDP (Linux Documentation project).
  LDP is a GNU/GPL project.  Additional requests are that you retain the
  author's name, email address and this copyright notice on all the
  copies. If you make any changes or additions to this document then you
  please intimate all the authors of this document.  Brand names
  mentioned in this document are property of their respective owners.

  13.  Appendix A example_String.cpp

  You can download all programs as a single tar.gz file from ``''.  To
  get this file, in the web-browser, save this file as 'Text' type.



  ______________________________________________________________________
  //*****************************************************************
  // Copyright policy is GNU/GPL and it is requested  that
  // you include author's name and email on all copies
  // Author : Al Dev Email: alavoor@yahoo.com
  //*****************************************************************

  // To prevent memory leaks - a char class to manage character variables
  // Always prefer to use  string class
  // instead of char[] or char *
  //

  // To compile and test this program do -
  // Assuming that libString.a is in the current directory
  //              g++ example_String.cpp -L. -lString

  #include <stdlib.h>  // for putenv
  #include "String.h"
  //#include <string>  // This is at /usr/include/g++-2/string
  //#include <cstring>  // This is at /usr/include/g++-2/cstring and includes /usr/inlcude/strings.h
  //
  void java_string_buffer();

  /////////////////////////////////////////////////
  // A example program to demo usage of String
  // Note: In this example, I did not use memory
  // manipulation functions like new, delete, malloc,
  // strdup at all!! The String class takes care of
  // it automatically !!
  /////////////////////////////////////////////////

  int main(int argc, char **argv)
  {
          //java_string_buffer();

          char p_name[1024];
          sprintf(p_name, "PROGRAM_NAME=%s", argv[0]);
          putenv(p_name);
          print_total_memsize(); // in the beginning
          String aa, bb, egg;
          char  tmpaa[100];

          //bb.str_cpy("  bbSTRing  ");
          bb = "   bbSTRing   ";

          // Testing the + operator
          // aa + " rhs "; // You will not get any output here !!!
          // You must directly use in fprintf as in below line -
          fprintf(stdout, "1) aa.val() is :%sEOF\n", (aa + " my rhs " ).val());

          // Testing the = operator
          aa = " lhs " ;
          fprintf(stdout, "2) With operator= aa.val() is :%sEOF\n", aa.val());

          // Testing the + operator
          // " lhs " + aa; // You will not get any output here !!!
          // You must directly use in fprintf as in below line -
          fprintf(stdout, "3) With lsh operator+, aa.val() is :%sEOF\n", (" my lhs " + aa ).val());

          // ***************** Java like functions ********************
          aa = "Some Value 2345";
          fprintf(stdout, "4) aa.charAt() is :%c %sEOF\n", aa.charAt(3), aa.val());

          aa = "Some Value 2345";
          strcpy(tmpaa, "tmpaa value");
          aa.getChars(3, 8, tmpaa, 2);
          fprintf(stdout, "5) aa.getChars() is : %s %sEOF\n", tmpaa, aa.val());

          aa = "Some Value 2345";
          fprintf(stdout, "6) aa.toCharArray() is : %sEOF\n", aa.toCharArray());

          aa = "Some2345";
          if (aa.equals("Some2345"))
                  fprintf(stdout, "7) aa.equals() is true : %sEOF\n", aa.val());
          else
                  fprintf(stdout, "7) aa.equals() is false : %sEOF\n", aa.val());

          aa = "testinglettercase";
          egg = "TestingLetterCase";
          if (aa.equalsIgnoreCase(egg))
                  fprintf(stdout, "8) egg equals aa (case insensitive) aa.val is :%sEOF\n", aa.val());
          else
                  fprintf(stdout, "8) egg not equals aa (case insensitive) aa.val is :%sEOF\n", aa.val());

          aa = "kkktestinglettercase";
          egg = "abtestingLetterCase";
          if (aa.regionMatches(true, 3, egg, 2, 7))
                  fprintf(stdout, "9) regionMatches is true aa.val is :%sEOF\n", aa.val());
          else
                  fprintf(stdout, "9) regionMatches is false aa.val is :%sEOF\n", aa.val());

          //aa.str_cpy(bb.val());
          aa = bb + "Some Value 2345";
          egg = aa.toUpperCase();
          fprintf(stdout, "10) egg.val is :%sEOF\n", egg.val());

          aa = bb + "Some Value 2345";
          egg = aa.toLowerCase();
          fprintf(stdout, "11) egg.val is :%sEOF\n", egg.val());

          aa = "Some Value 2345";
          egg = "Some";
          if (aa.startsWith("Some"))
          //if (aa.startsWith(egg))
                  fprintf(stdout, "12) aa.startsWith() is true :%sEOF\n", aa.val());
          else
                  fprintf(stdout, "12) aa.startsWith() is false :%sEOF\n", aa.val());

          aa = "Some Value 2345";
          egg = " 2345";
          if (aa.endsWith(" 2345"))
          //if (aa.endsWith(egg))
                  fprintf(stdout, "13) aa.endsWith() is true :%sEOF\n", aa.val());
          else
                  fprintf(stdout, "13) aa.endsWith() is false :%sEOF\n", aa.val());

          aa = "bbb Some Value 2345";
          egg = "caabc";
          if (aa.compareTo(egg) == 0)
                  fprintf(stdout, "14) aa.compareTo() is zero :%sEOF\n", aa.val());
          else
          if (aa.compareTo(egg) > 0)
                  fprintf(stdout, "14) aa.compareTo() is greater :%sEOF\n", aa.val());
          else
          if (aa.compareTo(egg) < 0)
                  fprintf(stdout, "14) aa.compareTo() is less than :%sEOF\n", aa.val());

          aa = "bbb Some Value 2345";
          strcpy(tmpaa, "aabbb Some Value 2345");
          if (aa.compareTo(tmpaa) == 0)
                  fprintf(stdout, "15) aa.compareTo() is zero :%sEOF\n", aa.val());
          else
          if (aa.compareTo(tmpaa) > 0)
                  fprintf(stdout, "15) aa.compareTo() is greater :%sEOF\n", aa.val());
          else
          if (aa.compareTo(tmpaa) < 0)
                  fprintf(stdout, "15) aa.compareTo() is less than :%sEOF\n", aa.val());

          aa = "bbb Some Value 2345";
          //egg = "bbb Some Value 2345";
          egg = "CCaabc";  // change values to caabc, aabc
          if (aa.compareToIgnoreCase(egg) == 0)
                  fprintf(stdout, "16) aa.compareToIgnoreCase() is zero :%sEOF\n", aa.val());
          else
          if (aa.compareToIgnoreCase(egg) > 0)
                  fprintf(stdout, "16) aa.compareToIgnoreCase() is greater :%sEOF\n", aa.val());
          else
          if (aa.compareToIgnoreCase(egg) < 0)
                  fprintf(stdout, "16) aa.compareToIgnoreCase() is less than :%sEOF\n", aa.val());

          aa = "bbb Some Value 2345";
          //strcpy(tmpaa, "bbb Some Value 2345");
          strcpy(tmpaa, "CAABbb Some Value 2345"); // change value to caabb, aab
          if (aa.compareToIgnoreCase(tmpaa) == 0)
                  fprintf(stdout, "17) aa.compareToIgnoreCase() is zero :%sEOF\n", aa.val());
          else
          if (aa.compareToIgnoreCase(tmpaa) > 0)
                  fprintf(stdout, "17) aa.compareToIgnoreCase() is greater :%sEOF\n", aa.val());
          else
          if (aa.compareToIgnoreCase(tmpaa) < 0)
                  fprintf(stdout, "17) aa.compareToIgnoreCase() is less than :%sEOF\n", aa.val());

          aa = "bbb Some Value 2345";
          strcpy(tmpaa, "Some");
          egg = "Value";
          fprintf(stdout, "18) aa.indexOf('S') %d :%sEOF\n", aa.indexOf('S'),  aa.val());
          fprintf(stdout, "18) aa.indexOf(tmpaa) %d :%sEOF\n", aa.indexOf(tmpaa),  aa.val());
          fprintf(stdout, "18) aa.indexOf(egg) %d :%sEOF\n", aa.indexOf(egg),  aa.val());

          aa = "bbb Some Value Some 2345";
          strcpy(tmpaa, "Some");
          egg = "Some";
          fprintf(stdout, "19) aa.lastIndexOf('S') %d :%sEOF\n", aa.lastIndexOf('S'),  aa.val());
          fprintf(stdout, "19) aa.lastIndexOf(tmpaa) %d :%sEOF\n", aa.lastIndexOf(tmpaa),  aa.val());
          fprintf(stdout, "19) aa.lastIndexOf(egg) %d :%sEOF\n", aa.lastIndexOf(egg),  aa.val());

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "20) aa.substring(5) %s :%sEOF\n",
                          aa.substring(5).val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          strcpy(tmpaa, "Some");
          egg = "Some";
          fprintf(stdout, "20) aa.replace('S', 'V') %s :%sEOF\n",
                          aa.replace('S', 'V').val(),  aa.val());
          fprintf(stdout, "20) aa.replace(Som, Vzz) %s :%sEOF\n",
                          aa.replace("Som", "Vzz").val(),  aa.val());

          aa = "   bbb Some Value Some 2345   ";
          fprintf(stdout, "21) aa.trim() :%sEOF val() :%sEOF\n",
                          aa.trim().val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "21) aa.concat() %s val :%sEOF\n",
                          aa.concat("add one").val(),  aa.val());

          //aa = "bbb Some Value Some 2345";
          //fprintf(stdout, "21) aa.append() %s val :%sEOF\n",
          //              aa.append("add append").val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          egg = "jjjj";
          fprintf(stdout, "21) aa.insert(5, egg) %s val :%sEOF\n",
                          aa.insert(5, egg).val(),  aa.val());
          fprintf(stdout, "21) aa.insert(5, ch) %s val :%sEOF\n",
                          aa.insert(5, 'M').val(),  aa.val());

          aa = "12345678";
          fprintf(stdout, "46) aa.reverse()=%s aa.val is :%sEOF\n", aa.reverse().val(), aa.val());

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "21) aa.deleteCharAt(4) %s val :%sEOF\n",
                          aa.deleteCharAt(4).val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "22) aa.deleteStr(3,5) %s val :%sEOF\n",
                          aa.deleteStr(3,5).val(),  aa.val());

          // ***************** end Java like functions ********************

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "23) aa.str_tr(bomekk, BOME) %s val :%sEOF\n",
                          aa.tr("bomekk", "BOME").val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          aa = "$1,934 100%.234";
          fprintf(stdout, "24) aa.compress() %s val :%sEOF\n",
                          aa.compress("$,%").val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "25) aa.xrange('a', 'j') %s val :%sEOF\n",
                          aa.xrange('a', 'j').val(),  aa.val());
          fprintf(stdout, "25) aa.xrange('1', '8') %s val :%sEOF\n",
                          aa.xrange('1', '8').val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "26) aa.center(15) %s val :%sEOF\n",
                          aa.center(15).val(),  aa.val());
          fprintf(stdout, "26) aa.center(15, '*') %s val :%sEOF\n",
                          aa.center(15, '*').val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "27) aa.space(3) %s val :%sEOF\n",
                          aa.space(3).val(),  aa.val());

          aa = "      Some Value Some 2345";
          fprintf(stdout, "28) aa.left() %s val :%sEOF\n",
                          aa.left().val(),  aa.val());
          fprintf(stdout, "28) aa.left(18) %s val :%sEOF\n",
                          aa.left(18).val(),  aa.val());

          aa = "  2345    ";
          fprintf(stdout, "29) aa.right():%s val :%sEOF\n",
                          aa.right().val(),  aa.val());
          fprintf(stdout, "29) aa.right(5):%s val :%sEOF\n",
                          aa.right(5).val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "30) aa.overlay(12345678, 4, 10, *):%s val :%sEOF\n",
                          aa.overlay("12345678", 4, 10, '*').val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "31) aa.at(Som) %s :%sEOF\n",
                          aa.at("Som").val(),  aa.val());
          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "32) aa.before(Som) %s :%sEOF\n",
                          aa.before("Skkkom").val(),  aa.val());

          aa = "bbb Some Value Some 2345";
          fprintf(stdout, "33) aa.after(Som) %s :%sEOF\n",
                          aa.after("Som").val(),  aa.val());

          aa = "   bb some value   ";
          aa.ltrim(true);
          fprintf(stdout, "34) aa.val is :%sEOF\n", aa.val());

          aa = "   bb some value   ";
          aa.rtrim(true);
          fprintf(stdout, "35) aa.val() is :%sEOF\n", aa.val());

          aa = "   bb some value   ";
          aa.trim(true);
          fprintf(stdout, "36) aa.val() is :%sEOF\n", aa.val());

          aa = bb;
          aa = aa + " testing newlines \n\n\n\n";
          aa.chopall();
          fprintf(stdout, "37) aa.val() is :%sEOF\n", aa.val());

          aa = bb;
          aa = aa + " rhs ";
          fprintf(stdout, "38) aa.val() is :%sEOF\n", aa.val());

          aa = bb;
          aa = " lhs " + aa;
          fprintf(stdout, "39) aa.val() is :%sEOF\n", aa.val());

          // Sample addition of numbers
          //aa = (String) 9989 + "kkk" + 33 ;
          aa = 9999;
          fprintf(stdout, "40) aa.val() is :%sEOF\n", aa.val());

          aa = bb;
          aa = " lhs " + aa + " rhs " + " 9989 " + " 33 ";
          fprintf(stdout, "41) aa.val() is :%sEOF\n", aa.val());

          aa = " AA value ";
          aa = bb + "alkja " + " 99djd " ;
          fprintf(stdout, "42) aa.val() is :%sEOF\n", aa.val());

          aa = " AA value ";
          aa = (String) "alkja " + " 99djd " ;
          fprintf(stdout, "43) aa.val() is :%sEOF\n", aa.val());

          aa = " AA value ";
          aa += (String) " al dev test kkk... " + " al2 slkj" + " al3333 ";
          fprintf(stdout, "44) aa.val() is :%sEOF\n", aa.val());

          aa = " AA value ";
          aa = aa + " add aa " + aa + aa + aa + " 1111 " + " 2222 " + aa + aa + aa + " 3333 ";
          fprintf(stdout, "45) aa.val() is :%sEOF\n", aa.val());

          aa = "12345678";
          aa.reverse(true);
          fprintf(stdout, "46) aa.val() is :%sEOF\n", aa.val());

          aa = " AA value ";
          aa = aa + " add aa " + aa + 1111 +" "+ 2222 + " " + 3.344 + aa;
          fprintf(stdout, "47) aa.val() is :%sEOF\n", aa.val());

          aa.roundd(123456.0123456789012345, 13);
          fprintf(stdout, "48) double aa.val() is :%sEOF\n", aa.val());

          aa.roundf(123456.0123456789, 13);
          fprintf(stdout, "49) float aa.val() is :%sEOF\n", aa.val());

          // Test equal to operators
          aa = " AA value ";
          String cc(" AA value ");
          if (aa == cc)
                  fprintf(stdout, "50)aa=%s and cc=%s are equal!!\n", aa.val(), cc.val());
          else
                  fprintf(stdout, "51)aa=%s and cc=%s are NOT equal!!\n", aa.val(), cc.val());
          cc = "CC";
          if (aa == cc)
                  fprintf(stdout, "52)aa=%s and cc=%s are equal!!\n", aa.val(), cc.val());
          else
                  fprintf(stdout, "53)aa=%s and cc=%s are NOT equal!!\n", aa.val(), cc.val());
          if (aa == " AA value ")
                  fprintf(stdout, "54)aa=%s and string are equal!!\n", aa.val());
          else
                  fprintf(stdout, "55)aa=%s and string are NOT equal!!\n", aa.val());
          if (aa == " AA valuexxx ")
                  fprintf(stdout, "56)aa=%s and string are equal!!\n", aa.val());
          else
                  fprintf(stdout, "57)aa=%s and string are NOT equal!!\n", aa.val());

          aa = " AA bb value 12345678 ";
          fprintf(stdout, "58) aa.length() is :%ldEOF\n", aa.length());

          aa = " AA bb value 12345678 ";
          fprintf(stdout, "59) aa.repeat(BA, 4).val=%s aa.val() is :%sEOF\n",
                          aa.repeat("BA", 4).val(), aa.val());

          aa = "";
          aa = "aa";
          if (aa.isNull())
                  fprintf(stdout, "60) aa.isNull() result=true%sEOF\n", aa.val());
          else
                  fprintf(stdout, "60) aa.isNull() result=false%sEOF\n", aa.val());

          aa = " some value aa";
          aa.clear();
          fprintf(stdout, "61) aa.clear() %sEOF\n", aa.val());

          aa = "  abcd efg  hijk  lmno     ";
          fprintf(stdout, "62) aa.token():%s val :%sEOF\n",
                          aa.token().val(),  aa.val());
          fprintf(stdout, "62) aa.token():%s val :%sEOF\n",
                          aa.token().val(),  aa.val());
          fprintf(stdout, "62) aa.token():%s val :%sEOF\n",
                          aa.token().val(),  aa.val());
          fprintf(stdout, "62) aa.token():%s val :%sEOF\n",
                          aa.token().val(),  aa.val());
          fprintf(stdout, "62) aa.token():%s val :%sEOF\n",
                          aa.token().val(),  aa.val());

          aa = " 2345 ";
          if (aa.isInteger()) // is true
                  fprintf(stdout, "63) aa is a integer val :%sEOF\n", aa.val());
          else
                  fprintf(stdout, "63) aa is NOT a integer val :%sEOF\n", aa.val());

          aa = " 23.045  ";
          if (aa.isNumeric()) // is true
                  fprintf(stdout, "64) aa is a numeric val :%sEOF\n", aa.val());
          else
                  fprintf(stdout, "64) aa is NOT a numeric val :%sEOF\n", aa.val());

          aa = " 23045  ";
          fprintf(stdout, "65) aa.int_value()=%d val :%sEOF\n",
                          aa.int_value(), aa.val());

          aa = " 230.45  ";
          fprintf(stdout, "66) aa.double_value()=%f val :%sEOF\n",
                          aa.double_value(), aa.val());

          aa = " testing abcdefg";
          aa.chop();
          fprintf(stdout, "68) aa.chop() aa.val is :%sEOF\n", aa.val());

          aa = " str1 str2 string3 abcdefg joe john hardy  ";
          String *strlist;
          int strcount = 0;
          strlist = aa.explode(strcount);
          for (int ii = 0; ii <= strcount; ii++)
          {
                  fprintf(stdout, "69) strlist[%d] is :%sEOF\n",
                                  ii, strlist[ii].val());
          }

          aa = " some aa ";
          cout << "\n\nPlease enter a line and hit return key : ";
          aa.getline();
          fprintf(stdout, "70) aa.getline() is :%sEOF\n", aa.val());

          aa = " some aa ";
          cout << "71) Testing << operator aa is : " << aa << endl;

          aa = " some aa ";
          cout << "\n\n73) Testing >> operator. Enter value for aa : ";
          cin >> aa;
          cout << "73) Testing >> operator aa is : " << aa << endl;

          // You can use aa.val() like a 'char *' variable in programs !!
          aa = " str1 str2 string3 abcdefg joe john hardy  ";
          fprintf(stdout, "\n\n74) Test case using aa.val() as 'char []' variable... ");
          for (unsigned long tmpii = 0; tmpii < aa.length(); tmpii++)
          {
                  //fprintf(stdout, "aa.val()[%ld]=%c ", tmpii, aa.val()[tmpii]);
                  fprintf(stdout, "aa[%ld]=%c ", tmpii, aa[tmpii]);
          }
          fprintf(stdout, "\n");

          // Using pointers on 'char *' ...
          fprintf(stdout, "\n\n75) Test case using aa.val() as 'char *' pointers... ");
          aa = " str1 str2 string3 abcdefg joe john hardy  ";
          for (char *tmpcc = aa.val(); *tmpcc != 0; tmpcc++)
          {
                  fprintf(stdout, "aa.val()=%c ", *tmpcc);
          }
          fprintf(stdout, "\n");

          print_total_memsize(); // in the end

          java_string_buffer();
          exit(0);
  }

  // Sample code to demo imitation of Java's StringBuffer Object
  void java_string_buffer()
  {
          String str1 = "ABCD EFGHI";
          cout << "\nAssigned value to str1 " << endl;
          StringBuffer aa;
          StringBuffer bb(30);
          StringBuffer cc(str1);

          cout << "\n StringBuffer aa.length() : " << aa.length() << endl;
          cout << "\n StringBuffer aa.capacity() : " << aa.capacity() << endl;
          cout << "\n StringBuffer aa.ensureCapacity(28) : " << endl;
          aa.ensureCapacity(28);
          cout << "\n StringBuffer aa.setLength(38) : " << endl;
          aa.setLength(38);

          // In Java, you use new, in C++ remove new
          // StringBuffer dd = new StringBuffer("some value for string buffer");
          StringBuffer dd = StringBuffer("some value for string buffer");
          cout << "\n StringBuffer dd.charAt(3) : " << dd.charAt(3) << endl;

          dd.setCharAt(3, 'K');
          cout << "\n StringBuffer setCharAt(3) : " << dd.charAt(3) << endl;

          char ee[100];
          memset(ee, 0, 100);
          strcpy(ee, "111111111111111111111111111111111111");
          dd.getChars(2, 12, ee, 3);
          cout << "\n StringBuffer getChars(2, 12, ee, 3) : " << ee << endl;

          dd.append(str1);
          cout << "\n StringBuffer append() : " << dd << endl;

          dd.append("12345678");
          cout << "\n StringBuffer append() : " << dd << endl;

          dd.append(9);
          cout << "\n StringBuffer append() : " << dd << endl;

          dd.append(7.876);
          cout << "\n StringBuffer append() : " << dd << endl;

          dd.setLength(1);
          dd.append(" some value for dd");
          dd.insert(4, str1);
          cout << "\n StringBuffer insert() : " << dd << endl;

          dd.reverse();
          cout << "\n StringBuffer reverse() : " << dd << endl;

          dd.setLength(1);
          dd.append(" some value for dd");
          dd.deleteStr(4, 9);  // Java's delete()
          cout << "\n StringBuffer deleteStr(4,9) : " << dd << endl;

          dd.setLength(1);
          dd.append(" some value for dd");
          dd.deleteCharAt(6);
          cout << "\n StringBuffer deleteCharAt() : " << dd << endl;

          dd.setLength(1);
          dd.append(" some value for dd");
          dd.replace(3, 8, str1);
          cout << "\n StringBuffer replace() : " << dd << endl;

          dd.setLength(1);
          dd.append(" some value for dd. A quick brown fox.");
          dd.substring(8);
          cout << "\n StringBuffer substring(8) : " << dd << endl;
          dd.setLength(1);
          dd.append(" some value for dd akjla akja kjk");
          dd.substring(8, 14);
          cout << "\n StringBuffer substring(8) : " << dd << endl;

          exit(0);
  }
  ______________________________________________________________________



  14.  Appendix B String.h

  You can download all programs as a single tar.gz file from ``''.  To
  get this file, in the web-browser, save this file as 'Text' type.



  ______________________________________________________________________
  //*****************************************************************
  // Copyright policy is GNU/GPL and it is requested that
  // you include author's name and email on all copies
  // Author : Al Dev Email: alavoor@yahoo.com
  //*****************************************************************

  // To prevent memory leaks - a char class to manage character variables
  // Always prefer to use String or string class
  // instead of char[] or char *
  //

  #ifndef __STRING_H_
  #define __STRING_H_

  //#include <iostream> // do not use iostream as program becomes bulky..
  //#include <stdlib.h> // for free() amd malloc()
  #include <string.h> // for strcpy()
  #include <ctype.h> // for isspace()
  #include <stdio.h> // for sprintf()
  #include <list.h> // for sprintf()
  #include <math.h> // for modf(), rint()

  #include "my_malloc.h"
  #include "debug.h" // debug_(name, value)  debug2_(name, value, LOG_YES)

  const short INITIAL_SIZE =      50;
  const short NUMBER_LENGTH = 70;
  const int MAX_ISTREAM_SIZE = 2048;

  // a small class with a VERY MINIMUM of functions and variables...
  // This class to be kept small...
  class String
  {
          public:
                  String();
                  String(char bb[]);  // needed by operator+
                  String(int bb);  // needed by operator+
                  String(unsigned long bb);  // needed by operator+
                  String(long bb);  // needed by operator+
                  String(float bb);  // needed by operator+
                  String(double bb);  // needed by operator+
                  String(const String & rhs);  // Copy Constructor needed by operator+
                  String(int bb, bool dummy);  // for StringBuffer class
                  ~String();

                  char *val() {return sval;} // Not safe to make sval public

                  // Functions below imitate Java language's String object
                  unsigned long length() { return strlen(sval); }
                  char charAt(int where);
                  void getChars(int sourceStart, int sourceEnd,
                                  char target[], int targetStart);
                  char* toCharArray();
                  char* getBytes();

                  bool equals(String str2); // See also == operator
                  bool equals(char *str2); // See also == operator
                  bool equalsIgnoreCase(String str2);

                  bool regionMatches(int startIndex, String str2,
                                  int str2StartIndex, int numChars);
                  bool regionMatches(bool ignoreCase, int startIndex,
                                  String str2, int str2StartIndex, int numChars);

                  String toUpperCase();
                  String toLowerCase();

                  bool startsWith(String str2);
                  bool startsWith(char *str2);

                  bool endsWith(String str2);
                  bool endsWith(char *str2);

                  int compareTo(String str2);
                  int compareTo(char *str2);
                  int compareToIgnoreCase(String str2);
                  int compareToIgnoreCase(char *str2);

                  int indexOf(char ch, int startIndex = 0);
                  int indexOf(char *str2, int startIndex = 0);
                  int indexOf(String str2, int startIndex = 0);

                  int lastIndexOf(char ch, int startIndex = 0);
                  int lastIndexOf(char *str2, int startIndex = 0);
                  int lastIndexOf(String str2, int startIndex = 0);

                  String substring(int startIndex, int endIndex = 0);
                  String replace(char original, char replacement);
                  String replace(char *original, char *replacement);

                  String trim(); // See also overloaded trim()

                  String concat(String str2);  // See also operator +
                  String concat(char *str2); // See also operator +

                  String reverse(); // See also overloaded reverse()
                  String deleteCharAt(int loc);
                  String deleteStr(int startIndex, int endIndex); // Java's "delete()"

                  String valueOf(double num) {return String(num);}
                  String valueOf(long num){ return String(num);}
                  String valueOf(char chars[]){ return String(chars);}
                  String valueOf(char chars[], int startIndex, int numChars);

                  void ensureCapacity(int capacity);
                  void setLength(int len);
                  void setCharAt(int where, char ch);
                  // See also StringBuffer class in this file given below

                  // ---- End of Java like String object functions -----

                  //////////////////////////////////////////////////////
                  //              List of additonal functions not in java
                  //////////////////////////////////////////////////////
                  String ltrim();
                  void ltrim(bool dummy); // dummy to get different signature
                  String rtrim();
                  void rtrim(bool dummy); // dummy to get different signature

                  void chopall(char ch='\n'); // removes trailing character 'ch'
                  void chop(); // removes one trailing character

                  void roundf(float input_val, short precision);
                  void decompose_float(long *integral, long *fraction);

                  void roundd(double input_val, short precision);
                  void decompose_double(long *integral, long *fraction);

                  void explode(char *seperator); // see also token() and overloaded explode()
                  String *explode(int & strcount, char seperator = ' '); // see also token()
                  void implode(char *glue);
                  void join(char *glue);
                  String repeat(char *input, unsigned int multiplier);
                  String tr(char *from, char *to); // translate characters
                  String center(int padlength, char padchar = ' ');
                  String space(int number = 0, char padchar = ' ');
                  String xrange(char start, char end);
                  String compress(char *list = " ");
                  String left(int slength = 0, char padchar = ' ');
                  String right(int slength = 0, char padchar = ' ');
                  String overlay(char *newstr, int start = 0, int slength = 0, char padchar = ' ');

                  String at(char *regx); // matches first match of regx
                  String before(char *regx); // returns string before regx
                  String after(char *regx); // returns string after regx
                  String mid(int startIndex = 0, int length = 0);

                  bool isNull();
                  bool isInteger();
                  bool isInteger(int pos);
                  bool isNumeric();
                  bool isNumeric(int pos);
                  bool isEmpty();  // same as length() == 0
                  bool isUpperCase();
                  bool isUpperCase(int pos);
                  bool isLowerCase();
                  bool isLowerCase(int pos);
                  bool isWhiteSpace();
                  bool isWhiteSpace(int pos);
                  bool isBlackSpace();
                  bool isBlackSpace(int pos);
                  bool isAlpha();
                  bool isAlpha(int pos);
                  bool isAlphaNumeric();
                  bool isAlphaNumeric(int pos);
                  bool isPunct();
                  bool isPunct(int pos);
                  bool isPrintable();
                  bool isPrintable(int pos);
                  bool isHexDigit();
                  bool isHexDigit(int pos);
                  bool isCntrl();
                  bool isCntrl(int pos);
                  bool isGraph();
                  bool isGraph(int pos);

                  void clear();
                  int int_value();
                  double double_value();
                  String token(char seperator = ' ');  // see also explode()
                  String crypt(char *original, char *salt);
                  String getline(FILE *infp = stdin); // see also putline()
                  //String getline(fstream *infp = stdin); // see also putline()

                  void putline(FILE *outfp = stdout); // see also getline()
                  //void putline(fstream *outfp = stdout); // see also getline()

                  void swap(String aa, String bb); // swap aa to bb
                  String *sort(String aa[]);  // sorts array of strings
                  String sort(int startIndex = 0, int length = 0);  // sorts characters inside a string
                  int freq(char ch); // returns the number of distinct, nonoverlapping matches
                  void Format(const char *fmt, ...);
                  String replace (int startIndex, int endIndex, String str);

                  void substring(int startIndex, int endIndex, bool dummy);
                  void reverse(bool dummy); // dummy to get different signature
                  String deleteCharAt(int loc, bool dummy);
                  String deleteStr(int startIndex, int endIndex, bool dummy);
                  void trim(bool dummy); // dummy to get different signature
                  String insert(int index, String str2);
                  String insert(int index, String str2, bool dummy);
                  String insert(int index, char ch);
                  String insert(int index, char ch, bool dummy);
                  String insert(char *newstr, int start = 0, int length = 0, char padchar = ' ');

                  ///////////////////////////////////////////////
                  //              List of duplicate function names
                  ///////////////////////////////////////////////
                  // char * c_str() // use val()
                  // bool find();  // Use regionMatches()
                  // bool search();  // Use regionMatches()
                  // bool matches(); // Use regionMatches()
                  // int rindex(String str2, int startIndex = 0); Use lastIndexOf()
                  // String blanks(int slength);  // Use repeat()
                  // String append(String str2); // Use concat() or + operator
                  // String prepend(String str2);  // Use + operator. See also append()
                  // String split(char seperator = ' ');  // Use token()
                  bool contains(char *str2, int startIndex = 0); // use indexOf()
                  // void empty(); Use is_empty()
                  // void vacuum(); Use clear()
                  // void erase(); Use clear()
                  // void zero(); Use clear()
                  // bool is_float(); Use is_numeric();
                  // bool is_decimal(); Use is_numeric();
                  // bool is_Digit(); Use is_numeric();
                  // double float_value(); Use double_value();
                  // double tofloat(); Use double_value();
                  // double numeric_value(); Use double_value();
                  // int tointeger(); Use int_value()
                  // int tonumber(); Use int_value()
                  // String get(); Use substring()
                  // String getFrom(); Use substring()
                  // String head(int len); Use substring(0, len)
                  // String tail(int len); Use substring(length()-len, length())
                  // String cut(); Use deleteCharAt() or deleteStr()
                  // String cutFrom(); Use deleteCharAt() or deleteStr()
                  // String paste(); Use insert()
                  // String fill(); Use replace()
                  // char firstChar(); // Use substring(0, 1);
                  // char lastChar(); // Use substring(length()-1, length());
                  // String findNext(); Use token()

                  // begin();  iterator. Use operator [ii]
                  // end();  iterator. Use operator [ii]
                  // copy();  Use assignment =  operator, String aa = bb;
                  // clone();  Use assignment =  operator, String aa = bb;

                  // All Operators ...
                  String operator+ (const String & rhs);
                  friend String operator+ (const String & lhs, const String & rhs);

                  String& operator+= (const String & rhs); // using reference will be faster
                  String& operator= (const String & rhs); // using reference will be faster
                  bool operator== (const String & rhs); // using reference will be faster
                  bool operator== (const char *rhs);
                  bool operator!= (const String & rhs);
                  bool operator!= (const char *rhs);
                  char operator [] (unsigned long Index) const;
                  char& operator [] (unsigned long Index);
                  friend ostream &  operator<< (ostream & Out, const String & str2);
                  friend istream &  operator>> (istream & In, String & str2);

                  static  list<String>            explodeH;  // list head
          protected:
                  char *sval; // Not safe to make sval public
                  inline void verifyIndex(unsigned long index) const;

          private:
                  // Note: All the private variables and functions begin
                  // with _ (underscore)

                  //static String *_global_String; // for use in add operator
                  //inline void _free_glob(String **aa);
                  void _str_cpy(char bb[]);
                  void _str_cpy(int bb); // itoa
                  void _str_cpy(unsigned long bb);
                  void _str_cpy(float bb); // itof

                  void _str_cat(char bb[]);
                  void _str_cat(int bb);
                  void _str_cat(unsigned long bb);
                  void _str_cat(float bb);

                  bool _equalto(const String & rhs, bool type = false);
                  bool _equalto(const char *rhs, bool type = false);
                  String *_pString;  // temporary pointer for internal use..
                  inline void _allocpString();
                  inline void _reverse();
                  inline void _deleteCharAt(int loc);
                  inline void _deleteStr(int startIndex, int endIndex);
                  inline void _trim();
                  inline void _ltrim();
                  inline void _rtrim();
                  inline void _substring(int startIndex, int endIndex);
  };

  // Imitate Java's StringBuffer object
  // This class is provided so that the Java code is
  // portable to C++, requiring minimum code changes
  // Note: While coding in C++ DO NOT use this class StringBuffer,
  // this is provided only for compiling code written in Java
  // which is cut/pasted inside C++ code.
  class StringBuffer: public String
  {
          public:
                  StringBuffer();
                  StringBuffer(int size);
                  StringBuffer(String str);
                  ~StringBuffer();

                  int capacity() {return strlen(sval);}
                  StringBuffer append(String str2)
                          { *this += str2; return *this;} // See also operator +
                  StringBuffer append(char *str2)
                          { *this += str2; return *this;} // See also operator +
                  StringBuffer append(int bb)
                          { *this += bb; return *this;} // See also operator +
                  StringBuffer append(unsigned long bb)
                          { *this += bb; return *this;} // See also operator +
                  StringBuffer append(float bb)
                          { *this += bb; return *this;} // See also operator +
                  StringBuffer append(double bb)
                          { *this += bb; return *this;} // See also operator +

                  StringBuffer insert(int index, String str2)
                          { return String::insert(index, str2, true);}

                  StringBuffer insert(int index, char ch)
                          { return String::insert(index, ch, true);}
                  StringBuffer reverse()
                          { String::reverse(true); return *this;}

                  // Java's "delete()". Cannot use name delete in C++
                  StringBuffer deleteStr(int startIndex, int endIndex)
                          { String::deleteStr(startIndex, endIndex, true); return *this;}
                  StringBuffer deleteCharAt(int loc)
                          { String::deleteCharAt(loc, true); return *this;}

                  StringBuffer substring(int startIndex, int endIndex = 0)
                          { String::substring(startIndex, endIndex, true); return *this;}
  };

  // Global variables are defined in String.cpp

  #endif // __STRING_H_
  ______________________________________________________________________



  15.  Appendix C String.cpp

  You can download all programs as a single tar.gz file from ``''.  To
  get this file, in the web-browser, save this file as 'Text' type.



  ______________________________________________________________________
  //*****************************************************************
  // Copyright policy is GNU/GPL and it is requested that
  // you include author's name and email on all copies
  // Author : Al Dev Email: alavoor@yahoo.com
  //*****************************************************************

  // To prevent memory leaks - a char class to manage character variables
  // Always prefer to use  string class
  // instead of char[] or char *
  //

  // To compile and test this program do -
  //              g++ String.cpp

  #include "String.h"

  //#include <sys/va_list.h> for Format()
  //#include <sys/varargs.h> for Format()

  // Global variables ....
  //String *String::_global_String = NULL; // global var
  list<String>            String::explodeH;

  String::String()
  {
          debug_("In cstr()", "ok");
          sval = (char *) my_malloc(sizeof(char)* INITIAL_SIZE);

          _pString = NULL;
  }

  String::String(char *bb)
  {
          unsigned long tmpii = strlen(bb);
          sval = (char *) my_malloc(sizeof(char)* tmpii);
          strncpy(sval, bb, tmpii);
          sval[tmpii] = '\0';

          //debug_("In cstr(char *bb) bb", bb);
          debug_("In cstr(char *bb) sval", sval);
          #ifdef DEBUG
                  //fprintf(stderr, "\nAddress of sval=%x\n", & sval);
                  //fprintf(stderr, "\nAddress of this-pointer=%x\n", this);
          #endif // DEBUG

          _pString = NULL;
  }

  String::String(int bb)
  {
          sval = (char *) my_malloc(NUMBER_LENGTH); // integers 70 digits max
          sprintf(sval, "%d", bb);
          debug_("In cstr(int bb) sval", sval);

          _pString = NULL;
  }

  String::String(unsigned long bb)
  {
          sval = (char *) my_malloc(NUMBER_LENGTH); // long 70 digits max
          sprintf(sval, "%lu", bb);
          debug_("In cstr(unsigned long bb) sval", sval);

          _pString = NULL;
  }
  String::String(long bb)
  {
          sval = (char *) my_malloc(NUMBER_LENGTH); // long 70 digits max
          sprintf(sval, "%ld", bb);
          debug_("In cstr(long bb) sval", sval);

          _pString = NULL;
  }

  String::String(float bb)
  {
          sval = (char *) my_malloc(NUMBER_LENGTH); // float 70 digits max
          sprintf(sval, "%f", bb);
          debug_("In cstr(float bb) sval", sval);

          _pString = NULL;
  }

  String::String(double bb)
  {
          sval = (char *) my_malloc(NUMBER_LENGTH); // double 70 digits max
          sprintf(sval, "%f", bb);
          debug_("In cstr(double bb) sval", sval);

          _pString = NULL;
  }

  // Copy Constructor needed by operator +
  String::String(const String & rhs)
  {
          // Do a deep-copy instead of compiler's default shallow copy copy-cstr
          debug_("In copy-cstr()", "ok");
          unsigned long tmpii = strlen(rhs.sval);
          sval = (char *) my_malloc(sizeof(char)* tmpii);
          strncpy(sval, rhs.sval, tmpii);
          sval[tmpii] = '\0';

          _pString = NULL;
  }

  // For use by StringBuffer class. Put a dummy
  // variable for different signature.
  // StringBuffer class imitates Java's StringBuffer object
  String::String(int size, bool dummy)
  {
          sval = (char *) my_malloc(sizeof(char)* size);
          debug_("In cstr(int size, bool dummy) sval", sval);
          #ifdef DEBUG
                  //fprintf(stderr, "\nAddress of sval=%x\n", & sval);
                  //fprintf(stderr, "\nAddress of this-pointer=%x\n", this);
          #endif // DEBUG

          _pString = NULL;
  }

  String::~String()
  {
          debug_("In dstr sval", sval);
          #ifdef DEBUG
                  //fprintf(stderr, "\nAddress of sval=%x\n", & sval);
                  //fprintf(stderr, "\nAddress of this-pointer=%x\n", this);
          #endif // DEBUG
          my_free(sval);
          //delete [] sval;
          sval = NULL;

          delete _pString; _pString = NULL;
  }

  inline void String::_allocpString()
  {
          // _pString will be deleted in destructor
          if (!_pString)  // if (_pString == NULL)
                  _pString = new String(this->sval);
          else
                  *_pString = this->sval;
  }

  // MUST use pointer-to-pointer **aa, otherwise the argument
  // is NOT freed !!
  /*
  inline void String::_free_glob(String **aa)
  {
          debug_("called _free_glob()", "ok" );
          if (*aa != NULL)  // (*aa != NULL)
          {
                  debug_("*aa is not null", "ok");
                  delete *aa;
                  *aa = NULL;
          }
          //else
                  debug_("*aa is null", "ok");

          //if (*aa == NULL)
          debug_("*aa set to null", "ok");
  }
  */

  // Imitating Java's charAt string function...
  char String::charAt(int where)
  {
          verifyIndex(where);
          return (sval[where]);
  }

  // Imitate Java's getChars function...
  // The sourceStart specifies the index of the beginning of the substring
  // and sourceEnd specifies an index that is one past the end of desired
  // substring. Thus the substring contains characters from sourceStart
  // through (sourceEnd - 1). The array that will receive the characters
  // is specified by target. The index within target at which the substring
  // will be copied is passed in targetStart. Care must be taken to assure
  // that the target array is large enough to hold the number of characters
  // in the specified substring.
  // For e.g.  getChars(3, 6, aa, 0) on "ABCDEFGHIJK" gives aa ="DEF"
  void String::getChars(int sourceStart, int sourceEnd, char target[], int targetStart)
  {
          verifyIndex(sourceStart);
          verifyIndex(sourceEnd);

          if (sourceEnd >= sourceStart)
          {
                  strncpy(& target[targetStart], & sval[sourceStart], sourceEnd - sourceStart);
                  target[targetStart + (sourceEnd - sourceStart)] = 0;
          }
          else
          {
                  cerr << "\ngetChars() - SourceEnd is greater than SourceStart!!\n" << endl;
                  exit(1);
          }
  }

  // Imitate Java's getChars string function...
  // Returns array of characters for the entire string
  char* String::toCharArray()
  {
          return (sval);
  }

  // Imitate Java's getBytes string function...
  // Returns array of characters for the entire string
  char* String::getBytes()
  {
          return (sval);
  }

  // Imitate Java's equals string function...
  bool String::equals(String str2)  // See also == operator
  {
          return ( _equalto(str2.sval));
  }

  // Imitate Java's equals string function...
  bool String::equals(char *str2)  // See also == operator
  {
          return ( _equalto(str2));
  }

  // Imitate Java's equalsIgnoreCase string function...
  bool String::equalsIgnoreCase(String str2)
  {
          String  aa, bb;
          aa = this->toLowerCase();
          bb = str2.toLowerCase();
          return ( aa._equalto(bb.sval) );
  }

  // Imitate Java's regionMatches string function...
  // The startIndex specifies the index at which the region begins within
  // the invoking String object. The string being compared is str2. The
  // index at which comparison will start within str2 is specified by
  // str2Index. The length of the substring being compared is numChars.
  bool String::regionMatches(int startIndex, String str2, int str2StartIndex, int numChars)
  {
          verifyIndex(startIndex);
          str2.verifyIndex(str2StartIndex);
          if (strncmp(& this->sval[startIndex], & str2.sval[str2StartIndex], numChars) == 0)
                  return true;
          else
                  return false;
  }

  // Imitate Java's regionMatches string function...
  // This is overloaded function of regionMatches
  // If ignoreCase is true, the case of the characters is ignored, otherwise
  // case is significant (i.e. if ignoreCase is true then ignore the
  // case and compare)
  // The startIndex specifies the index at which the region begins within
  // the invoking String object. The string being compared is str2. The
  // index at which comparison will start within str2 is specified by
  // str2Index. The length of the substring being compared is numChars.
  bool String::regionMatches(bool ignoreCase, int startIndex, String str2, int str2StartIndex, int numChars)
  {
          if (ignoreCase)  // if (ignoreCase == true)
          {
                  verifyIndex(startIndex);
                  str2.verifyIndex(str2StartIndex);
                  String string1, string2;
                  string1 = this->toLowerCase();
                  string2 = str2.toLowerCase();
                  if (strncmp(& string1.sval[startIndex], & string2.sval[str2StartIndex], numChars) == 0)
                          return true;
                  else
                          return false;
          }
          else
          {
                  return regionMatches(startIndex, str2, str2StartIndex, numChars);
          }
  }

  // Imitate Java's toLowerCase string function...
  //       String  ss("sometest");
  //       String  egg = ss.toLowerCase();
  String String::toLowerCase()
  {
          _allocpString();

          for (long tmpii = strlen(_pString->sval); tmpii >= 0; tmpii--)
          {
                  _pString->sval[tmpii] = tolower(_pString->sval[tmpii]);
          }
          return *_pString;  // return the object now
  }

  // Imitate Java's toUpperCase string function...
  //       String  ss("sometest");
  //       String  egg = ss.toUpperCase();
  String String::toUpperCase()
  {
          _allocpString();

          for (long tmpii = strlen(_pString->sval); tmpii >= 0; tmpii--)
          {
                  _pString->sval[tmpii] = toupper(_pString->sval[tmpii]);
          }
          return *_pString;  // return the object now
  }

  // Imitate Java's startsWith string function...
  bool String::startsWith(String str2)
  {
          if (!strncmp(this->sval, str2.sval, strlen(str2.sval) )) // if (strncmp() == 0)
                  return true;
          else
                  return false;
  }

  // Imitate Java's startsWith string function...
  // overloaded function
  bool String::startsWith(char *str2)
  {
          int lenstr2 = strlen(str2);
          if (!strncmp(this->sval, str2, lenstr2)) // if (strncmp() == 0)
                  return true;
          else
                  return false;
  }

  // Imitate Java's endsWith string function...
  bool String::endsWith(String str2)
  {
          // string length of str2 should be less than current string
          if (strlen(str2.sval) > strlen(sval))
                  return false;

          if (!strncmp(& this->sval[strlen(sval) - strlen(str2.sval)], str2.sval, strlen(str2.sval) )) // if (strncmp() == 0)
                  return true;
          else
                  return false;
  }

  // Imitate Java's endsWith string function...
  bool String::endsWith(char *str2)
  {
          // string length of str2 should be less than current string
          if (strlen(str2) > strlen(sval))
                  return false;

          if (!strncmp(& this->sval[strlen(sval) - strlen(str2)], str2, strlen(str2) ) ) // if (strncmp() == 0)
                  return true;
          else
                  return false;
  }

  // Imitate Java's compareTo string function...
  // For sorting applications, you need to know which is less than, equal to
  // or greater than the next.
  // A string is less than another if it comes before the other in dictionary
  // order. A string is greater than another if it comes after the other in
  // dictionary order.
  //  Less than zero  --> The invoking string is less than str2
  //  Greater than zero  --> The invoking string is greater than str2
  //  Zero  --> The two strings are equal.
  int String::compareTo(String str2)
  {
          int  flag = 0;
          // Compare letters in string to each letter in str2
          for (int tmpii = 0, tmpjj = strlen(sval), tmpkk = strlen(str2.sval); tmpii < tmpjj; tmpii++)
          {
                  if (tmpii > tmpkk)
                          break;
                  if (sval[tmpii] == str2.sval[tmpii])
                          flag = 0;
                  else
                  if (sval[tmpii] > str2.sval[tmpii])
                  {
                          flag = 1;
                          break;
                  }
                  else // if (sval[tmpii] < str2.sval[tmpii])
                  {
                          flag = -1;
                          break;
                  }
          }
          return flag;
  }

  // Imitate Java's compareTo string function...
  // Overloaded function of compareTo
  int String::compareTo(char *str2)
  {
          int  flag = 0;
          // Compare letters in string to each letter in str2
          for (int tmpii = 0, tmpjj = strlen(sval), tmpkk = strlen(str2); tmpii < tmpjj; tmpii++)
          {
                  if (tmpii > tmpkk)
                          break;
                  if (sval[tmpii] == str2[tmpii])
                          flag = 0;
                  else
                  if (sval[tmpii] > str2[tmpii])
                  {
                          flag = 1;
                          break;
                  }
                  else // if (sval[tmpii] < str2[tmpii])
                  {
                          flag = -1;
                          break;
                  }
          }
          return flag;
  }

  // Imitate Java's compareToIgnoreCase string function...
  int String::compareToIgnoreCase(String str2)
  {
          String tmpaa = this->toLowerCase(),
          tmpbb = str2.toLowerCase();

          return tmpaa.compareTo(tmpbb);
  }

  // Imitate Java's compareToIgnoreCase string function...
  // Overloaded function
  int String::compareToIgnoreCase(char *str2)
  {
          String tmpaa = this->toLowerCase(),
          tmpcc(str2), tmpbb = tmpcc.toLowerCase();

          return tmpaa.compareTo(tmpbb);
  }

  // Imitate Java's indexOf string function...
  // Searches for the first occurence of a character or string
  // Return the index at which the character or substring was
  // found, or -1 on failure.
  int String::indexOf(char ch, int startIndex = 0)
  {
          verifyIndex(startIndex);
          int ii = startIndex;
          for (; ii < (int) strlen(sval); ii++)
          {
                  if (sval[ii] == ch)
                          break;
          }
          if (ii == (int) strlen(sval))
                  return -1;
          return ii;
  }

  // Imitate Java's indexOf string function...
  // Overloaded function
  int String::indexOf(char *str2, int startIndex = 0)
  {
          verifyIndex(startIndex);
          char * tok;
          long res = -1;

          if ( !isNull() )
          {
                  tok = strstr(sval + startIndex, str2);
                  if (tok == NULL)
                          res = -1;
                  else
                          res = (int) (tok - sval);
          }
          return res;
  }

  // Imitate Java's indexOf string function...
  // Overloaded function
  int String::indexOf(String str2, int startIndex = 0)
  {
          verifyIndex(startIndex);
          char * tok;
          long res = -1;

          if ( !isNull() )
          {
                  tok = strstr(sval + startIndex, str2.sval);
                  if (tok == NULL)
                          res = -1;
                  else
                          res = (int) (tok - sval);
          }
          return res;
  }

  // Imitate Java's lastIndexOf string function...
  // Searches for the last occurence of a character or string
  // Return the index at which the character or substring was
  // found, or -1 on failure.
  int String::lastIndexOf(char ch, int startIndex = 0)
  {
          verifyIndex(startIndex);
          int ii;

          // Begin search from the last character of string
          if (!startIndex) // if (startIndex == 0)
                  ii = strlen(sval);
          else
                  ii = startIndex;
          for (; ii > -1; ii--)
          {
                  if (sval[ii] == ch)
                          break;
          }
          if (!ii && sval[ii] != ch) // if (ii == 0)
                  return -1;
          return ii;
  }

  // Imitate Java's lastIndexOf string function...
  // Overloaded function
  int String::lastIndexOf(char *str2, int startIndex = 0)
  {
          verifyIndex(startIndex);
      char *tok = NULL;
      int res = -1;

      register char *tmpaa = strdup(sval);  // malloc here
      if (!tmpaa) // tmpaa == NULL
      {
          cerr << "\nMemory alloc failed in strdup in lastIndexOf()\n" << endl;
          exit(-1);
      }

      if (!startIndex) // if (startIndex == 0)
          startIndex = strlen(sval);
      else
          tmpaa[startIndex+1] = 0;

      for (int ii = 0; ii <= startIndex; ii++)
      {
          tok = strstr(& tmpaa[ii], str2);
          if (tok == NULL)
              break;
          else
          {
              res = (int) (tok - tmpaa);
                          debug_("res", res);
              ii = res; // jump to where it matched (+1 in for loop)
          }
      }
      free(tmpaa);
          debug_("res", res);
          debug_("indexOf", & sval[res]);

          return res;
  }

  // Imitate Java's lastIndexOf string function...
  // Overloaded function
  int String::lastIndexOf(String str2, int startIndex = 0)
  {
          verifyIndex(startIndex);
      char *tok = NULL;
      int res = -1;

      register char *tmpaa = strdup(sval);  // malloc here
      if (!tmpaa) // tmpaa == NULL
      {
          cerr << "\nMemory alloc failed in strdup in lastIndexOf()\n" << endl;
          exit(-1);
      }

      if (!startIndex) // if (startIndex == 0)
          startIndex = strlen(sval);
      else
          tmpaa[startIndex+1] = 0;

      for (int ii = 0; ii <= startIndex; ii++)
      {
          tok = strstr(& tmpaa[ii], str2.sval);
          if (tok == NULL)
              break;
          else
          {
              res = (int) (tok - tmpaa);
                          debug_("res", res);
              ii = res; // jump to where it matched (+1 in for loop)
          }
      }
      free(tmpaa);
          debug_("res", res);
          debug_("indexOf", & sval[res]);

          return res;
  }

  // Imitate Java's substring string function...
  // The startIndex specifies the beginning index, and endIndex specifies
  // the stopping point. The string returned contains all the characters
  // from the beginning index, up to, but not including, the ending index.
  String String::substring(int startIndex, int endIndex = 0)
  {
          String tmpstr = String(sval);
          tmpstr._substring(startIndex, endIndex);
          return tmpstr;
  }

  // Imitate Java's concat string function...
  String String::concat(String str2)
  {
          return (*this + str2);
  }

  // Imitate Java's concat string function...
  // overloaded function
  String String::concat(char *str2)
  {
          return (*this + str2);
  }

  // Imitate Java's replace string function...
  // Replace all occurences of string 'original' with
  // 'replacement' in 'sval'
  String String::replace(char original, char replacement)
  {
          // For example -
          //              replace('A', 'B') on sval = "some AAA and AAACC"
          //              reurns sval = "some BBB and BBBCC"
          //String *tmpstr = new String(sval); Use default copy cstr
          String tmpstr(sval);
          for (int ii = 0, len = strlen(sval); ii < len; ii++)
          {
                  if (tmpstr.sval[ii] == original)
                          tmpstr.sval[ii] = replacement;
          }
          return tmpstr; // this will use copy constructor to make a default copy
  }

  // Imitate Java's replace string function...
  // overloaded function
  // Replace all occurences of string 'original' with
  // 'replacement' in 'sval'
  String String::replace(char *original, char *replacement)
  {
          char *tok = NULL, *bb;
          register char *aa = strdup(sval);
          int lenrepl = strlen(replacement);

          // Allocate space for bb
          { // local scope
                  int tmpii = 0;
                  for (int ii = 0; ;ii++)
                  {
                          tok = strstr(& aa[ii], original);
                          if (tok == NULL)
                                  break;
                          else
                          {
                                  ii = ii + (int) (tok -aa);
                                  tmpii++;
                          }
                  }
                  if (!tmpii) // tmpii == 0, no match of 'original' found
                          return (String(sval)); // return original string
                  tmpii = strlen(sval) + (tmpii * lenrepl) + 20;
                  debug_("strstr tmpii", tmpii );
                  bb = (char *) malloc(tmpii);
                  memset(bb, 0, tmpii);
          }

          for (int res = -1; ;)
          {
                  debug_("aa", aa);
                  tok = strstr(aa, original);
                  if (tok == NULL)
                  {
                          strcat(bb, aa);
                          break;
                  }
                  else
                  {
                          res = (int) (tok - aa);
                          strncat(bb, aa, res);
                          strcat(bb, replacement);
                          //bb[strlen(bb)] = 0;
                          debug_("res", res );
                          debug_("bb", bb );
                          strcpy(aa, & aa[res+lenrepl]);
                  }
          }
          debug_("bb", bb );
          free(aa);
          String tmpstr(bb);
          free(bb);
          return tmpstr;
  }
  /*
  another method of doing replace function but slow..
  String String::replace(char *original, char *replacement)
  {
          // For example -
          //              replace("AAA", "BB") on sval = "some AAA and AAACC"
          //              reurns sval = "some BB and BBCC"
          String bb(this->before(original).sval);
          if (strlen(bb.sval) == 0)
                  return String(sval); // return original string
          bb += replacement;

          String tmpaa(this->sval), cc, dd;
          for (;;)
          {
                  cc = tmpaa.after(original).sval;
                  debug_("cc", cc.sval );
                  if (!strlen(cc.sval)) // if (strlen(cc.sval) == 0)
                          break;

                  dd = cc.before(original).sval;
                  if (strlen(dd.sval) == 0)
                  {
                          bb += cc;
                          break;
                  }
                  else
                  {
                          bb += dd;
                          bb += replacement;
                  }
                  tmpaa = cc;
          }
          debug_("bb.sval", bb.sval );
          return bb;
  }
  */
  // Imitate Java's replace function -  StringBuffer
  String String::replace (int startIndex, int endIndex, String str)
  {
          verifyIndex(startIndex);
          verifyIndex(endIndex);
          int tmpjj = strlen(str.sval);
          if (tmpjj == 0)
                  return *this;
          int tmpii = endIndex-startIndex-1;
          if (tmpjj < tmpii) // length of str is less than specified indexes.
                  tmpii = tmpjj;
          debug_("sval", sval);
          debug_("str.sval", str.sval);
          strncpy(& sval[startIndex], str.sval, tmpii);
          sval[startIndex+tmpii] = 0;
          debug_("sval", sval);
          return *this;
  }

  // Imitate Java's trim string function...
  String String::trim()
  {
          //String *tmpstr = new String(sval);
          String tmpstr(sval);
          tmpstr._trim();
          debug_("tmpstr.sval", tmpstr.sval);
          return tmpstr; // this will use copy constructor to make a default copy
  }

  // Imitate Java's insert string function...
  String String::insert(int index, String str2)
  {
          String tmpstr(this->insert(str2.sval, index).sval);
          debug_("tmpstr.sval", tmpstr.sval);
          return tmpstr;
  }

  // Imitate Java's insert string function...
  String String::insert(int index, char ch)
  {
          char aa[2];
          aa[0] = ch;
          aa[1] = 0;
          String tmpstr(this->insert(aa, index).sval);
          debug_("tmpstr.sval", tmpstr.sval);
          return tmpstr;
  }

  // Imitate Java's deleteCharAt string function...
  String String::deleteCharAt(int loc)
  {
          String tmpstr(sval);
          tmpstr._deleteCharAt(loc);
          return tmpstr;
  }

  // Imitate Java's delete string function...
  // Note: -->Java name is "delete()", cannot use reserved name delete() in C++
  // The startIndex specifies the index of the first character to remove,
  // and endIndex specifies an index one past the last character to remove.
  // Thus, the substring deleted runs from startIndex to (endIndex - 1)
  String String::deleteStr(int startIndex, int endIndex)
  {
          // For example -
          //      deleteStr(3,3) on val = 'pokemon' returns 'poon'
          String tmpstr(sval);
          tmpstr._deleteStr(startIndex, endIndex);
          return tmpstr;
  }

  // Imitate Java's reverse string function...
  String String::reverse()
  {
          // For example -
          //              reverse() on "12345" returns "54321"
          String tmpstr(sval);
          tmpstr._reverse();
          return tmpstr;
  }

  // Imitate Java's valueOf string function...
  String String::valueOf(char chars[], int startIndex, int numChars)
  {
          verifyIndex(startIndex);
          int ii = strlen(chars);
          if (startIndex > ii)
          {
                  cerr << "\nvalueOf() - startIndex greater than string length of"
                          << "string passed" << endl;
                  exit(0);
          }
          if ( (numChars+startIndex) > ii)
          {
                  cerr << "\nvalueOf() - numChars exceeds the string length of"
                          << "string passed" << endl;
                  exit(0);
          }

          char *aa = strdup(chars);
          aa[startIndex + numChars] = 0;
          String tmpstr(& aa[startIndex]);
          free(aa);
          return tmpstr;
  }

  // Imitate Java's ensureCapacity string function...
  // For use by StringBuffer class.
  // Pre-allocate room for certain number of chars, useful
  // if you know in advance that you will be appending a large
  // number of small strings to StringBuffer
  void String::ensureCapacity(int capacity)
  {
          sval = (char *) my_realloc(sval, capacity);
          sval[0] = '\0';
          debug_("In ensureCapacity(int capacity) sval", sval);
  }

  // Imitate Java's setLength string function...
  // For use by StringBuffer class.
  void String::setLength(int len)
  {
          sval = (char *) my_realloc(sval, len);
          sval[0] = '\0';
          debug_("In ensureCapacity(int len) sval", sval);
  }

  // Imitate Java's setCharAt function -  StringBuffer
  void String::setCharAt(int where, char ch)
  {
          verifyIndex(where);
          sval[where] = ch;
          debug_("in StringBuffer dstr()", "ok");
  }

  // ---- End of Java like String object functions -----

  // overloaded function - directly changes object
  // Variable dummy will give different signature to function
  void String::substring(int startIndex, int endIndex, bool dummy)
  {
          this->_substring(startIndex, endIndex);
  }

  inline void String::_substring(int startIndex, int endIndex)
  {
          verifyIndex(startIndex);
          verifyIndex(endIndex);
          if (!endIndex) // endIndex == 0
                  strcpy(sval, & sval[startIndex] ) ;
          else
          {
                  if (endIndex > startIndex)
                  {
                          strcpy(sval, & sval[startIndex] ) ;
                          sval[endIndex -startIndex] = 0;
                  }
                  else
                  {
                          cerr << "\n_substring() - startIndex is greater than endIndex!!\n"
                                  << endl;
                          exit(-1);
                  }
          }
  }

  // overloaded function - directly changes object
  String String::deleteStr(int startIndex, int endIndex, bool dummy)
  {
          this->_deleteStr(startIndex, endIndex);
          return *this;
  }

  inline void String::_deleteStr(int startIndex, int endIndex)
  {
          verifyIndex(startIndex);
          verifyIndex(endIndex);
          // For example -
          //      deleteStr(3,3) on val = 'pokemon' returns 'poon'
          char *tmpaa = strdup(sval); // malloc here
          strcpy(& tmpaa[startIndex], & tmpaa[endIndex]);
          *this = tmpaa;
          free(tmpaa);
  }

  // overloaded function - directly changes object
  String String::deleteCharAt(int loc, bool dummy)
  {
          this->_deleteCharAt(loc);
          return *this;
  }

  inline void String::_deleteCharAt(int loc)
  {
          char *tmpaa = strdup(sval); // malloc here
          strcpy(& tmpaa[loc], & tmpaa[loc+1]);
          *this = tmpaa;
          free(tmpaa);
  }
  // Returns string before regx. Matches first occurence of regx
  String String::at(char *regx)
  {
          char *tok = NULL;
          tok = strstr(sval, regx);
          if (tok == NULL)
                  return(String(""));
          else
          {
                  int res = (int) (tok - sval);
                  char *lefttok = strdup(sval);
                  memset(lefttok, 0, strlen(sval));
                  strcpy(lefttok, & sval[res]);
                  String tmpstr(lefttok);
                  free(lefttok);
                  return(tmpstr);
          }
  }

  // Returns string before regx. Matches first occurence of regx
  String String::before(char *regx)
  {
          char *tok = NULL;
          tok = strstr(sval, regx);
          if (tok == NULL)
                  return(String(""));
          else
          {
                  int res = (int) (tok - sval);
                  char *lefttok = strdup(sval);
                  lefttok[res] = 0;
                  String tmpstr(lefttok);
                  free(lefttok);
                  return(tmpstr);
          }
  }

  // Returns string after regx. Matches first occurence of regx
  String String::after(char *regx)
  {
          char *tok = NULL;
          tok = strstr(sval, regx);
          if (tok == NULL)
                  return(String(""));
          else
          {
                  int res = (int) (tok - sval);
                  char *lefttok = strdup(sval);
                  memset(lefttok, 0, strlen(sval));
                  strcpy(lefttok, & sval[res + strlen(regx)]);
                  String tmpstr(lefttok);
                  free(lefttok);
                  return(tmpstr);
          }
  }

  // Explodes the string and returns the list in
  // the list-head pointer explodeH
  // See also token()
  void String::explode(char *seperator)
  {
          char *aa = NULL, *bb = NULL;
          aa = (char *) my_malloc(strlen(sval));
          for (bb = strtok(aa, seperator); bb != NULL; bb = strtok(NULL, seperator) )
          {
                  String *tmp = new String(bb);
                  String::explodeH.insert(String::explodeH.end(), *tmp);
          }
          my_free(aa);

          list<String>::iterator iter1; // see file include/g++/stl_list.h
          debug_("Before checking explode..", "ok");
          if (String::explodeH.empty() == true )
          {
                  debug_("List is empty!!", "ok");
          }

          for (iter1 = String::explodeH.begin(); iter1 != String::explodeH.end(); iter1++)
          {
                  if (iter1 == NULL)
                  {
                          debug_("Iterator iter1 is NULL!!", "ok" );
                          break;
                  }
                  debug_("(*iter1).sval", (*iter1).sval);
          }
  }

  // Overloaded function of explode(). This will return an
  // array of strings and total number in strcount reference
  // variable.
  // See also token()
  String *String::explode(int & strcount, char seperator = ' ')
  {
          String aa(sval);
          aa.trim(true);
          strcount = 0;
          for (int ii = 0, jj = strlen(aa.sval); ii < jj; ii++)
          {
                  if (aa.sval[ii] == seperator)
                          strcount++;
          }

          String *tmpstr = new String[strcount+1];
          if (!strcount) // strcount == 0
                  tmpstr[0] = aa.sval;
          else
          {
                  for (int ii = 0; ii <= strcount; ii++)
                          tmpstr[ii] = aa.token();
          }
          return tmpstr;
  }

  // Implodes the strings in the list-head
  // pointer explodeH and returns the String class
  void String::implode(char *glue)
  {
  }

  // Joins the strings in the list-head
  // pointer explodeH and returns the String class
  void String::join(char *glue)
  {
          implode(glue);
  }

  // Repeat the input string n times
  String String::repeat(char *input, unsigned int multiplier)
  {
          // For example -
          // repeat("k", 4) returns "kkkk"
          if (!input) // input == NULL
          {
                  return (String(""));
          }

          char *aa = (char *) my_malloc(strlen(input) * multiplier);
          for (unsigned int tmpii = 0; tmpii < multiplier; tmpii++)
          {
                  strcat(aa, input);
          }
          String tmpstr(aa);
          my_free(aa);
          return tmpstr;
  }

  // Reverse the string
  // Overloaded version of reverse(). This will directly
  // change the object.
  void String::reverse(bool dummy)
  {
          this->_reverse();
  }
  inline void String::_reverse()
  {
          // For example -
          //              reverse() on "12345" returns "54321"
          char aa;
          unsigned long tot_len = strlen(sval);
          unsigned long midpoint = tot_len / 2;
          for (unsigned long tmpjj = 0; tmpjj < midpoint; tmpjj++)
          {
                  aa = sval[tmpjj];  // temporary storage var
                  sval[tmpjj] = sval[tot_len - tmpjj - 1];  // swap the values
                  sval[tot_len - tmpjj - 1] = aa; // swap the values
          }
  }

  // Translate certain chars
  // For e.g ("abcd", "ABC") translates all occurences of each
  // character in 'from' to corresponding character in 'to'
  String String::tr(char *from, char *to)
  {
          int lenfrom = strlen(from), lento = strlen(to);
          if (lento > lenfrom)
                  lento = lenfrom; // set it to least
          else
          if (lento < lenfrom)
                  lenfrom = lento; // set it to least
          debug_("lento", lento);

          register char *aa = strdup(sval);
          for (int ii = 0, jj = strlen(sval); ii < jj; ii++) // for every char in val
          {
                  for (int kk = 0; kk < lento; kk++) // for every char in "from" string
                  {
                          if (aa[ii] == from[kk])
                                  aa[ii] = to[kk];
                  }
          }
          String tmpstr(aa);
          free(aa);
          return tmpstr;
  }

  // Center the text
  String String::center(int padlength, char padchar = ' ')
  {
          // For example -
          //              center(10, '*') on sval="aa" returns "****aa****"
          //              center(10) on sval="aa" returns "    aa    "
          // The result is a string of 'padlength' characters with sval centered in it.
          int tmpii = sizeof(char) * (padlength + strlen(sval) + 10);
          char *aa = (char *) malloc(tmpii);
          memset(aa, 0, tmpii);

          for (int jj = 0, kk = (int) padlength/2; jj < kk; jj++)
          {
                  aa[jj] = padchar;
          }
          strcat(aa, sval);
          for (int jj = strlen(aa), kk = jj + (int) padlength/2; jj < kk; jj++)
          {
                  aa[jj] = padchar;
          }
          String tmpstr(aa);
          free(aa);
          return tmpstr;
  }

  // Formats the original string by placing <number> of <padchar> characters
  // between each set of blank-delimited words. Leading and Trailing blanks
  // are always removed. If <number> is omitted or is 0, then all spaces are
  // in the string are removed. The default number is 0 and
  // default padchar ' '
  String String::space(int number, char padchar = ' ')
  {
          // For example -
          //              space(3) on sval = "I do not know"
          //                              will return "I   do   not   know"
          //              space(1, '_') on sval = "A deep black space"
          //                              will return "A_deep_black_space"
          //              space() on sval = "I   know     this"
          //                              will return "Iknowthis"

          debug_("this->sval", this->sval );
          String tmpstr = this->trim().sval;
          debug_("tmpstr.sval", tmpstr.sval );

          // count spaces
          int spacecount = 0;
          for (int ii = 0, jj = strlen(tmpstr.sval); ii < jj; ii++)
          {
                  if (tmpstr.sval[ii] == ' ')
                          spacecount++;
          }
          debug_("spacecount", spacecount);

          char ee[2];
          ee[0] = padchar;
          ee[1] = 0;
          String bb = tmpstr.repeat(ee, spacecount);

          int tmpii = sizeof(char) * (strlen(tmpstr.sval) + (number * spacecount) + 20);
          char *aa = (char *) malloc(tmpii);
          memset(aa, 0, tmpii);
          for (int ii = 0, jj = strlen(tmpstr.sval); ii < jj; ii++)
          {
                  if (tmpstr.sval[ii] == ' ')
                          strcat(aa, bb.sval);
                  else
                  {
                          ee[0] = sval[ii];
                          strcat(aa, ee);
                  }
          }
          tmpstr = aa;
          free(aa);
          return tmpstr;
  }

  // The result is string comprised of all characters between
  // and including <start> and <end>
  String String::xrange(char start, char end)
  {
          // For example -
          //      xrange('a', 'j') returns val = "abcdefghij"
          //      xrange(1, 8) returns val = "12345678"

          if (end < start)
          {
                  cerr << "\nThe 'end' character is less than 'start' !!" << endl;
                  return String("");
          }

          // Note: The 'end' is greater than 'start'!! And add +1
          int tmpii = sizeof(char) * (end - start + 11);
          char *aa = (char *) malloc(tmpii);
          memset(aa, 0, tmpii);
          debug_("xrange tmpii", tmpii);
          for (int ii = start, jj = 0; ii <= end; ii++, jj++)
          {
                  aa[jj] = ii;
                  debug_("xrange aa[jj]", aa[jj] );
          }
          String tmpstr(aa);
          free(aa);
          return tmpstr;
  }

  // Removes any characters contained in <list>. The default character
  // for <list> is a blank ' '
  String String::compress(char *list = " ")
  {
          // For example -
          //      compress("$,%") on sval = "$1,934" returns "1934"
          //      compress() on sval = "call me alavoor vasudevan" returns "callmealavoorvasudevan"
          int lenlist = strlen(list);
          register char *aa = strdup(sval);
          for (int ii = 0, jj = strlen(sval); ii < jj; ii++) // for every char in sval
          {
                  for (int kk = 0; kk < lenlist; kk++) // for every char in "from" string
                  {
                          if (aa[ii] == list[kk])
                          {
                                  strcpy(& aa[ii], & aa[ii+1]);
                          }
                  }
          }
          String tmpstr(aa);
          free(aa);
          return tmpstr;
  }

  // The <newstr> is inserted into sval beginning at <start>. The <newstr> will
  // be padded or truncated to <length> characters. The default <length> is
  // string length of newstr
  String String::insert(char *newstr, int start = 0, int lengthstr = 0, char padchar = ' ')
  {
          // For example -
          //      insert("something new", 4, 20, '*') on sval = "old thing"
          //              returns "old something new*******thing"
          int tmplen = sizeof(char) * strlen(sval) + strlen(newstr) + lengthstr + 10;
          char *tmpaa = (char *) malloc (tmplen);
          memset(tmpaa, 0, tmplen);
          if (!start) // start == 0
          {
                  strcpy(tmpaa, newstr);
                  strcat(tmpaa, this->sval);
          }
          else
          {
                  strncpy(tmpaa, this->sval, start);
                  strcat(tmpaa, newstr);
                  strcat(tmpaa, & this->sval[start]);
          }

          String tmpstr(tmpaa);
          free(tmpaa);
          return tmpstr;
  }

  // overloaded insert function...
  String String::insert(int index, String str2, bool dummy)
  {
          *this =  this->insert(str2.sval, index).sval;
          //debug_("tmpstr.sval", tmpstr.sval);
          return *this;
  }

  // overloaded insert function...
  String String::insert(int index, char ch, bool dummy)
  {
          char aa[2];
          aa[0] = ch;
          aa[1] = 0;
          *this = this->insert(aa, index).sval;
          //debug_("tmpstr.sval", tmpstr.sval);
          return *this;
  }

  // The result is string of <length> chars madeup of leftmost chars in sval.
  // Quick way to left justify a string.
  String String::left(int slength = 0, char padchar = ' ')
  {
          // For example -
          //      left(15) on sval = "Wig"       returns "Wig            "
          //      left(4) on  sval = "Wighat"    returns "Wigh"
          //      left() on   sval = "   Wighat" returns "Wighat   "
          if (!slength) // slength == 0
                  slength = strlen(sval);
          debug_("left() slength", slength);

          int tmpii = slength + 20;
          char *aa = (char *) malloc(tmpii);
          memset(aa, 0, tmpii);
          debug_("this->ltrim().sval ", this->ltrim().sval);
          strcpy(aa, this->ltrim().sval);
          debug_("left() aa", aa );

          int currlen = strlen(aa);
          if (currlen < slength)
          {
                  // pad the string now
                  char ee[2];
                  ee[0] = padchar;
                  ee[1] = 0;
                  strcat(aa, this->repeat(ee, (unsigned int) (slength-currlen) ).sval);
          }
          else
          {
                  aa[slength] = 0;
          }

          debug_("left() aa", aa );
          String tmpstr(aa);
          free(aa);
          return tmpstr;
  }

  // The result is string of <length> chars madeup of rightmost chars in sval.
  // Quick way to right justify a string.
  String String::right(int slength = 0, char padchar = ' ')
  {
          // For example -
          //      right(10) on sval = "never to saying   " returns " to saying"
          //      right(4) on  sval = "Wighat"             returns "ghat"
          //      right(8) on  sval = "4.50"               returns "    4.50"
          //      right() on   sval = "  4.50     "        returns "       4.50"

          if (!slength) // slength == 0
                  slength = strlen(sval);
          debug_("right() slength", slength);

          int tmpii = slength + 20;
          char *aa = (char *) malloc(tmpii);
          memset(aa, 0, tmpii);

          int currlen = strlen(this->rtrim().sval);
          debug_("right() currlen", currlen );
          if (currlen < slength)
          {
                  // pad the string now
                  char ee[2];
                  ee[0] = padchar;
                  ee[1] = 0;
                  strcpy(aa, this->repeat(ee, (unsigned int) (slength-currlen) ).sval);
                  strcat(aa, this->rtrim().sval);
                  debug_("right() aa", aa );
          }
          else
          {
                  strcpy(aa, this->rtrim().sval);
                  strcpy(aa, & aa[currlen-slength]);
                  aa[slength] = 0;
          }

          debug_("right() aa", aa );
          String tmpstr(aa);
          free(aa);
          return tmpstr;
  }

  // The <newstr> is overlayed into sval beginning at <start>. The <newstr> will
  // be padded or truncated to <length> characters. The default <length> is
  // string length of newstr
  String String::overlay(char *newstr, int start = 0, int slength = 0, char padchar = ' ')
  {
          // For example -
          //      overlay("12345678", 4, 10, '*') on sval = "oldthing is very bad"
          //              returns "old12345678**ery bad"
          //      overlay("12345678", 4, 5, '*') on sval = "oldthing is very bad"
          //              returns "old12345ery bad"
          int len_newstr = strlen(newstr);
          if (!slength) // slength == 0
                  slength = len_newstr;
          char *aa = (char *) malloc(slength + len_newstr + 10);
          aa[0] = 0;
          char ee[2];
          ee[0] = padchar;
          ee[1] = 0;
          if (len_newstr < slength)
          {
                  // pad it now
                  strcpy(aa, newstr);
                  strcat(aa, this->repeat(ee, (slength-len_newstr)).sval );
          }
          else
          {
                  strcpy(aa, newstr);
                  aa[slength] = 0;
          }

          // Now overlay the string.
          String tmpstr(sval);

          debug_("tmpstr.sval", tmpstr.sval);
          for (int ii=start, jj=strlen(tmpstr.sval), kk=start+slength, mm=0;
                                  ii < jj; ii++, mm++)
          {
                  if (ii == kk)
                          break;
                  if (mm == slength)
                          break;
                  tmpstr.sval[ii] = aa[mm];
          }
          free(aa);
          debug_("tmpstr.sval", tmpstr.sval);
          return tmpstr;
  }

  // If string is literrally equal to .. or not equal to
  // If type is false than it is ==
  bool String::_equalto(const String & rhs, bool type = false)
  {
          if (type == false) // test for ==
          {
                  if (strlen(rhs.sval) == strlen(sval))
                  {
                          if (!strncmp(rhs.sval, sval, strlen(sval))) //  == 0
                                  return true;
                          else
                                  return false;
                  }
                  else
                          return false;
          }
          else // test for !=
          {
                  if (strlen(rhs.sval) != strlen(sval))
                  {
                          if (!strncmp(rhs.sval, sval, strlen(sval))) //  == 0
                                  return true;
                          else
                                  return false;
                  }
                  else
                          return false;
          }
  }

  // If string is literrally equal to .. or not equal to
  // If type is false than it is ==
  bool String::_equalto(const char *rhs, bool type = false)
  {
          if (type == false) // test for ==
          {
                  if (strlen(rhs) == strlen(sval))
                  {
                          if (!strncmp(rhs, sval, strlen(sval))) //  == 0
                                  return true;
                          else
                                  return false;
                  }
                  else
                          return false;
          }
          else // test for !=
          {
                  if (strlen(rhs) != strlen(sval))
                  {
                          if (!strncmp(rhs, sval, strlen(sval))) //  == 0
                                  return true;
                          else
                                  return false;
                  }
                  else
                          return false;
          }
  }

  // Synonym function is vacuum()
  void String::clear()
  {
          sval = (char *) my_realloc(sval, 10);
          sval[0] = '\0';
  }

  // Remove trailing ALL given character 'ch' - see also chop()
  // For example :
  //      sval = "abcdef\n\n\n" then chopall() = "abcdef"
  //      sval = "abcdefffff" then chopall('f') = "abcde"
  void String::chopall(char ch='\n')
  {
          unsigned long tmpii = strlen(sval) - 1 ;
          for (; tmpii >= 0; tmpii--)
          {
                  if (sval[tmpii] == ch)
                          sval[tmpii] = 0;
                  else
                          break;
          }
  }

  // Remove trailing character - see also chopall()
  // chop() is often used to remove trailing newline character
  void String::chop()
  {
          sval[strlen(sval)-1] = 0;
  }

  // Overloaded version of trim(). This will directly
  // change the object.
  void String::trim(bool dummy)
  {
          this->_trim();
  }

  inline void String::_trim()
  {
          this->rtrim(true);
          this->ltrim(true);
          debug_("this->sval", this->sval);
  }

  // Overloaded version of ltrim(). This will directly
  // change the object.
  void String::ltrim(bool dummy)
  {
          this->_ltrim();
  }

  inline void String::_ltrim()
  {
          // May cause problems in my_realloc since
          // location of bb will be destroyed !!
          char *bb = sval;

          if (bb == NULL)
                  return;

          while (isspace(*bb))
                  bb++;
          debug_("bb", bb);

          if (bb != NULL && bb != sval)
          {
                  debug_("doing string copy", "done");
                  _str_cpy(bb); // causes problems in my_realloc and bb is getting destroyed!!
          }
          else
                  debug_("Not doing string copy", "done");
  }

  String String::ltrim()
  {
          String tmpstr(sval);
          tmpstr._ltrim();
          return tmpstr;
  }

  // Overloaded version of rtrim(). This will directly
  // change the object.
  void String::rtrim(bool dummy)
  {
          this->_rtrim();
  }

  inline void String::_rtrim()
  {
          for (long tmpii = strlen(sval) - 1 ; tmpii >= 0; tmpii--)
          {
                  if ( isspace(sval[tmpii]) )
                          sval[tmpii] = '\0';
                  else
                          break;
          }
  }

  String String::rtrim()
  {
          String tmpstr(sval);
          tmpstr._rtrim();
          return tmpstr;
  }

  // Use for rounding off fractions digits of floats
  // Rounds-off floats with given precision and then
  // stores the result into String's sval field
  // Also returns the result as a char *
  void String::roundf(float input_val, short precision)
  {
          float   integ_flt, deci_flt;
          const   short MAX_PREC = 4;

          debug_("In roundf", "ok");

          if (precision > MAX_PREC) // this is the max reliable precision
                  precision = MAX_PREC;

          // get the integral and decimal parts of the float value..
          deci_flt = modff(input_val, & integ_flt);

          for (int tmpzz = 0; tmpzz < precision; tmpzz++)
          {
                  debug_("deci_flt", deci_flt);
                  deci_flt *= 10;
          }
          debug_("deci_flt", deci_flt);

          unsigned long deci_int = (unsigned long) ( rint(deci_flt) );

          sval = (char *) my_malloc(NUMBER_LENGTH); // float 70 digits max

          if (deci_int > 999) // (MAX_PREC) digits
                  sprintf(sval, "%lu.%lu", (unsigned long) integ_flt, deci_int);
          else
          if (deci_int > 99) // (MAX_PREC - 1) digits
                  sprintf(sval, "%lu.0%lu", (unsigned long) integ_flt, deci_int);
          else
          if (deci_int > 9) // (MAX_PREC - 2) digits
                  sprintf(sval, "%lu.00%lu", (unsigned long) integ_flt, deci_int);
          else
                  sprintf(sval, "%lu.00000%lu", (unsigned long) integ_flt, deci_int);
  }

  void String::roundd(double input_val, short precision)
  {
          double  integ_flt, deci_flt;
          const   short MAX_PREC = 6;

          if (precision > MAX_PREC) // this is the max reliable precision
                  precision = MAX_PREC;

          debug_("In roundd", "ok");
          // get the integral and decimal parts of the double value..
          deci_flt = modf(input_val, & integ_flt);

          for (int tmpzz = 0; tmpzz < precision; tmpzz++)
          {
                  debug_("deci_flt", deci_flt);
                  deci_flt *= 10;
          }
          debug_("deci_flt", deci_flt);

          sval = (char *) my_malloc(NUMBER_LENGTH); // double 70 digits max

          unsigned long deci_int = (unsigned long) ( rint(deci_flt) );

          if (deci_int > 99999) // (MAX_PREC) digits
                  sprintf(sval, "%lu.%lu", (unsigned long) integ_flt, deci_int);
          else
          if (deci_int > 9999) // (MAX_PREC - 1) digits
                  sprintf(sval, "%lu.0%lu", (unsigned long) integ_flt, deci_int);
          else
          if (deci_int > 999) // (MAX_PREC - 2) digits
                  sprintf(sval, "%lu.00%lu", (unsigned long) integ_flt, deci_int);
          else
          if (deci_int > 99) // (MAX_PREC - 3) digits
                  sprintf(sval, "%lu.000%lu", (unsigned long) integ_flt, deci_int);
          else
          if (deci_int > 9) // (MAX_PREC - 4) digits
                  sprintf(sval, "%lu.0000%lu", (unsigned long) integ_flt, deci_int);
          else // (MAX_PREC - 5) digits
                  sprintf(sval, "%lu.00000%lu", (unsigned long) integ_flt, deci_int);
  }

  // Provided for documentation purpose only
  // You must use the function indexOf()
  bool String::contains(char *str2, int startIndex = 0)
  {
          // For example -
          //              if (indexOf("ohboy") > -1 )
          //                      cout << "\nString contains 'ohboy'" << endl;
          //              if (indexOf("ohboy") < 0 )
          //                      cout << "\nString does NOT contain 'ohboy'" << endl;
          //              if (indexOf("ohboy", 4) > -1 )
          //                      cout << "\nString contains 'ohboy'" << endl;
          //              if (indexOf("ohboy", 4) < 0 )
          //                      cout << "\nString does NOT contain 'ohboy'" << endl;
          cerr << "\nYou must use indexOf() function instead of contains()\n" << endl;
          exit(-1);
  }

  // Synonym function is empty()
  bool String::isNull()
  {
          if (sval[0] == '\0')
                  return true;
          else
          {
                  if (sval == NULL)
                          return true;
                  else
                          return false;
          }
  }

  // Leading, trailing white-spaces of string are ignored
  bool String::isInteger()
  {
          String tmpstr(sval);
          tmpstr.trim(true);
          debug_("tmpstr.sval", tmpstr.sval );
          if ( strspn ( tmpstr.sval, "0123456789" ) != strlen(tmpstr.sval) )
                  return ( false ) ;
          else
                  return ( true ) ;
  }

  // overloaded func
  bool String::isInteger(int pos)
  {
          verifyIndex(pos);
          return (isdigit(sval[pos]));
  }

  // Leading, trailing white-spaces of string are ignored
  bool String::isNumeric()
  {
          String tmpstr(sval);
          tmpstr.trim(true);
          debug_("tmpstr.sval", tmpstr.sval );
          if ( strspn ( tmpstr.sval, "0123456789.+-e" ) != strlen(tmpstr.sval) )
                  return ( false ) ;
          else
                  return ( true ) ;
  }

  // overloaded func
  bool String::isNumeric(int pos)
  {
          verifyIndex(pos);
          return (isdigit(sval[pos]));
  }

  bool String::isEmpty()
  {
          if (strlen(sval) == 0)
                  return true;
          else
                  return false;
  }

  // See also explode()
  //      Warning : The String instance is modified by removing
  //                    the returned token from the string. It is advised
  //                        that you save the original string before calling
  //                        this function like for example :
  //              String savestr = origstr;
  //              String aa, bb, cc;
  //              aa = origstr.token();
  //              bb = origstr.token();
  //              cc = origstr.token();
  //
  //  This routine returns the first non-'seperator' (default
  //  white-space) token string from the String instance
  String String::token(char seperator = ' ')
  {
          char ee[2];
          ee[0] = seperator;
          ee[1] = 0;
          char *res = strtok(sval, ee);
          if (!res) // if res == NULL
          {
                  debug_("token", res);
                  debug_("sval", sval);
                  return(String(sval));
          }
          else
          {
                  String tmpstr(res);

                  // Should take string length of sval and not res
                  // because strtok() had put a NULL ('\0') at the location
                  // and also strtok() ignores the leading blanks of sval
                  strcpy(sval, & sval[strlen(sval)+1]);
                  debug_("token", res);
                  debug_("sval", sval);
                  return tmpstr;
          }
  }

  String String::crypt(char *original, char *salt)
  {
          return String("");
  }

  int String::int_value()
  {
          if ( strlen(sval) == 0 ) {
                  cerr << "Cannot convert a zero length string "
                  << " to a numeric" << endl ;
                  abort() ;
          }

          if ( ! isInteger() ) {
                  cerr << "Cannot convert string [" << sval
                  << "] to an integer numeric string" << endl ;
                  abort() ;
          }

          return ( atoi ( sval ) ) ;
  }

  double String::double_value()
  {
          if ( strlen(sval) == 0 ) {
                  cerr << "Cannot convert a zero length string "
                  << " to a numeric" << endl ;
                  abort() ;
          }

          if ( ! isNumeric() ) {
                  cerr << "Cannot convert string [" << sval
                  << "] to a double numeric string" << endl ;
                  abort() ;
          }

          double d = atof ( sval ) ;

          return ( d ) ;
  }

  String String::getline(FILE *infp = stdin)
  {
          register char ch, *aa = NULL;

          register const short SZ = 100;
          // Initial value of ii > SZ so that aa is alloc'ed memory
          register int jj = 0;
          for (int ii = SZ+1; (ch = getc(infp)) != EOF; ii++, jj++)
          {
                  if (ii > SZ)  // allocate memory in steps of SZ for performance
                  {
                          aa = (char *) realloc(aa, jj + ii + 15);  // +15 is safe mem
                          ii = 0;
                  }
                  if (ch == '\n')  // read untill newline is encountered
                          break;
                  aa[jj] = ch;
          }
          aa[jj] = 0;
          _str_cpy(aa);  // puts the value in string
          free(aa);
          return *this;
  }

  /*
  void String::Format(const char *fmt, ... )
  {
          va_list iterator;
          va_start(iterator, fmt );
          va_end(iterator);
  }
  */

  inline void String::verifyIndex(unsigned long index) const
  {
          if (index < 0 || index >= strlen(sval) )
          {
                  // throw "Index Out Of Bounds Exception";
                  cerr << "Index Out Of Bounds Exception at ["
                                  << index << "] in:\n" << sval << endl;
                  exit(1);
          }
  }

  //////////////////////////////////////////////////////////
  // Private functions start from here .........
  //////////////////////////////////////////////////////////
  void String::_str_cpy(char bb[])
  {
          debug_("In _str_cpy bb", bb);
          if (bb == NULL)
          {
                  sval[0] = '\0';
                  return;
          }

          unsigned long tmpii = strlen(bb);

          if (tmpii == 0)
          {
                  sval[0] = '\0';
                  return;
          }

          debug_("In _str_cpy tmpii", tmpii);
          debug_("In _str_cpy sval", sval);
          sval = (char *) my_realloc(sval, tmpii);
          //sval = new char [tmpii + SAFE_MEM_2];
          debug_("In _str_cpy bb", bb);

          strncpy(sval, bb, tmpii);
          debug_("In _str_cpy sval", sval);
          sval[tmpii] = '\0';
          debug_("In _str_cpy sval", sval);
  }

  void String::_str_cpy(int bb)
  {
          char tmpaa[100];
          sprintf(tmpaa, "%d", bb);
          _str_cpy(tmpaa);
  }

  void String::_str_cpy(unsigned long bb)
  {
          char tmpaa[100];
          sprintf(tmpaa, "%ld", bb);
          _str_cpy(tmpaa);
  }

  void String::_str_cpy(float bb)
  {
          char tmpaa[100];
          sprintf(tmpaa, "%f", bb);
          _str_cpy(tmpaa);
  }

  void String::_str_cat(char bb[])
  {
          unsigned long tmpjj = strlen(bb), tmpii = strlen(sval);
          sval = (char *) my_realloc(sval, tmpii + tmpjj);
          debug_("sval in _str_cat() ", sval);
          strncat(sval, bb, tmpjj);
  }

  void String::_str_cat(int bb)
  {
          char tmpaa[100];
          sprintf(tmpaa, "%d", bb);

          unsigned long tmpjj = strlen(tmpaa), tmpii = strlen(sval);
          sval = (char *) my_realloc(sval, tmpii + tmpjj);
          strncat(sval, tmpaa, tmpjj);
  }

  void String::_str_cat(unsigned long bb)
  {
          char tmpaa[100];
          sprintf(tmpaa, "%ld", bb);

          unsigned long tmpjj = strlen(tmpaa), tmpii = strlen(sval);
          sval = (char *) my_realloc(sval, tmpii + tmpjj);
          strncat(sval, tmpaa, tmpjj);
  }

  void String::_str_cat(float bb)
  {
          char tmpaa[100];
          sprintf(tmpaa, "%f", bb);

          unsigned long tmpjj = strlen(tmpaa), tmpii = strlen(sval);
          sval = (char *) my_realloc(sval, tmpii + tmpjj);
          strncat(sval, tmpaa, tmpjj);
  }

  //////////////////////////////////////////////////////////
  // All operator functions start from here .........
  //////////////////////////////////////////////////////////
  String operator+ (const String & lhs, const String & rhs)
  {
          /*******************************************************/
          // Note : For adding two char strings, first cast String
          // as in -
          //aa = (String) "alkja " + " 99djd " ;
          /*******************************************************/

          String tmp(lhs);
          tmp._str_cat(rhs.sval);
          return(tmp);

          /*
          if (String::_global_String == NULL)
          {
                  String::_global_String = new String;
                  String::_global_String->_str_cpy(lhs.sval);
                  String::_global_String->_str_cat(rhs.sval);
                  //return *String::_global_String;
                  return String(String::_global_String->val);
          }
          */
          /*
          else
          if (String::_global_String1 == NULL)
          {
                  debug_("1)global", "ok" );
                  String::_global_String1 = new String;
                  String::_global_String1->_str_cpy(lhs.sval);
                  String::_global_String1->_str_cat(rhs.sval);
                  return *String::_global_String1;
          }
          */
          /*
          else
          {
                  fprintf(stderr, "\nError: cannot alloc _global_String\n");
                  exit(-1);
          }
          */

          /*
          String *aa = new String;
          aa->_str_cpy(lhs.sval);
          aa->_str_cat(rhs.sval);
          return *aa;
          */
  }

  String String::operator+ (const String & rhs)
  {
          String tmp(*this);
          tmp._str_cat(rhs.sval);
          debug_("rhs.sval in operator+", rhs.sval );
          debug_("tmp.sval in operator+", tmp.sval );
          return (tmp);
  }

  // Using reference will be faster in = operator
  String& String:: operator= ( const String& rhs )
  {
          if (& rhs == this)
          {
                  debug_("Fatal Error: In operator(=). rhs is == to 'this pointer'!!", "ok" );
                  return *this;
          }

          this->_str_cpy(rhs.sval);
          debug_("rhs value", rhs.sval );

          // Free global vars memory
          //_free_glob(& String::_global_String);
          //if (String::_global_String == NULL)
                  //fprintf(stderr, "\n_global_String is freed!\n");

          //return (String(*this));
          return *this;
  }

  // Using reference will be faster in = operator
  String& String::operator+= (const String & rhs)
  {
          /*******************************************************/
          // Note : For adding two char strings, first cast String
          // as in -
          //aa += (String) "cccc" + "dddd";
          /*******************************************************/

          if (& rhs == this)
          {
                  debug_("Fatal error: In operator+= rhs is equals 'this' ptr", "ok");
                  return *this;
          }
          this->_str_cat(rhs.sval);
          return *this;
          //return (String(*this));
  }

  bool String::operator== (const String & rhs)
  {
          return(_equalto(rhs.sval));
  }

  bool String::operator== (const char *rhs)
  {
          return(_equalto(rhs));
  }

  bool String::operator!= (const String & rhs)
  {
          return(_equalto(rhs.sval, true));
  }

  bool String::operator!= (const char *rhs)
  {
          return(_equalto(rhs, true));
  }

  char String::operator[] (unsigned long Index) const
  {
          verifyIndex(Index);
          return sval[Index];
  }

  char & String::operator[] (unsigned long Index)
  {
          verifyIndex(Index);
          return sval[Index];
  }

  istream & operator >> (istream & In, String & str2)
  {
          // allocate max size of 2048 characters
          static char aa[MAX_ISTREAM_SIZE];

          In >> aa;
          str2 = aa; // assign to reference String
          return In; // return istream
  }

  ostream & operator << (ostream & Out, const String & str2)
  {
          Out << str2.sval;
          return Out;
  }
  ////////////////////////////////////////////////////
  //  Imitate Java's StringBuffer Object
  //      StringBuffer class functions
  ////////////////////////////////////////////////////

  // Imitate Java's StringBuffer - the default constructor
  // (the one with no parameters) reserves room for 16
  // characters.
  StringBuffer::StringBuffer()
          :String()   // calls base class cstr no params
  {
          debug_("in StringBuffer cstr()", "ok");
  }

  // Imitate Java's StringBuffer
  StringBuffer::StringBuffer(int size)
          :String(size, true)  // calls base class cstr
  {
          // String(size, true) -- do not call here in body but call
          // in initialization stage which will avoid extra call on
          // default base-class constructor and will be faster
          // and very efficient
          debug_("in StringBuffer cstr(int size)", "ok");
  }

  // Imitate Java's StringBuffer
  // calls base class cstr with string param
  StringBuffer::StringBuffer(String str)
          :String(str.val())  // calls base class cstr
  {
          // String(str.val()) -- do not call here in body but call
          // in initialization stage which will avoid extra call on
          // default base-class constructor and will be faster
          // and very efficient
          debug_("in StringBuffer cstr(String str)", "ok");
  }

  // Imitate Java's StringBuffer
  StringBuffer::~StringBuffer()
  {
          debug_("in StringBuffer dstr()", "ok");
  }

  ______________________________________________________________________



  16.  Appendix D my_malloc.cpp

  You can download all programs as a single tar.gz file from ``''.  To
  get this file, in the web-browser, save this file as 'Text' type.



  ______________________________________________________________________
  //*****************************************************************
  // Copyright policy is GNU/GPL and it is requested that
  // you include author's name and email on all copies
  // Author : Al Dev Email: alavoor@yahoo.com
  //*****************************************************************

  /*
  **      In your main() function put these lines -
                  char p_name[1024];
                  sprintf(p_name, "PROGRAM_NAME=%s", argv[0]);
                  putenv(p_name);
                  print_total_memsize(); // in the beginning
                  ......
                  ......
                  print_total_memsize(); // in the end
  */

  #include <stdio.h>
  #include <alloc.h>  // for c++ -- malloc, alloc etc...
  #include <stdlib.h>  // malloc, alloc..
  #include <time.h>  // strftime, localtime, ...
  #include <list.h>  // strftime, localtime, ...  see file include/g++/stl_list.h
  //#include <debug.h> // debug_("a", a);  debug2_("a", a, true);

  #include "my_malloc.h"

  const short SAFE_MEM = 10;
  const short DATE_MAX_SIZE = 200;

  const short MALLOC = 1;
  const short REALLOC     = 2;

  const short VOID_TYPE =         1;
  const short CHAR_TYPE =         2;
  const short SHORT_TYPE =        3;
  const short INT_TYPE =          4;
  const short LONG_TYPE =         5;
  const short FLOAT_TYPE =        6;
  const short DOUBLE_TYPE =       7;

  const char LOG_FILE[30] = "memory_error.log";

  // Uncomment this line to debug total mem size allocated...
  //#define DEBUG_MEM  "debug_memory_sizes_allocated"

  static void raise_error_exit(short mtype, short datatype, char fname[], int lineno);

  #ifdef DEBUG
  class MemCheck
  {
          public:
                  MemCheck(void *aptr, size_t amem_size, char fname[], int lineno);
                  void    *ptr;
                  size_t  mem_size;
                  static  list<MemCheck>          mcH;  // list head
                  static  unsigned long           total_memsize;  // total memory allocated
  };

  // Global variables ....
  list<MemCheck>          MemCheck::mcH;
  unsigned long           MemCheck::total_memsize = 0;

  MemCheck::MemCheck(void *aptr, size_t amem_size, char fname[], int lineno)
  {
          char func_name[100];
          FILE    *ferr = NULL;
          sprintf(func_name, "MemCheck() - File: %s Line: %d", fname, lineno);

          ferr = fopen(LOG_FILE, "a");
          if (ferr == NULL)
          {
                  fprintf(stdout, "\nWarning: Cannot open file %s\n", LOG_FILE);
                  fprintf(stderr, "\nWarning: Cannot open file %s\n", LOG_FILE);
                  #ifdef DEBUG_MEM
                          exit(-1);
                  #else
                          return;
                  #endif
          }

          // Search if the pointer already exists in the list...
          bool does_exist = false;
          list<MemCheck>::iterator iter1; // see file include/g++/stl_list.h
          //fprintf(ferr, "\n%s Before checking.. !!\n", func_name);
          if (MemCheck::mcH.empty() == true )
          {
                  //fprintf(ferr, "\n%s List is empty!!\n", func_name);
          }
          for (iter1 = MemCheck::mcH.begin(); iter1 != MemCheck::mcH.end(); iter1++)
          {
                  if (iter1 == NULL)
                  {
                          fprintf(ferr, "\n%s Iterator iter1 is NULL!!\n", func_name);
                          break;
                  }
                  if ( ((*iter1).ptr) == aptr)
                  {
                          does_exist = true;
                          fprintf(ferr, "\n%s Already exists!!\n", func_name);
                          fprintf(ferr, "\n%s Fatal Error exiting now ....!!\n", func_name);
                          #ifdef DEBUG_MEM
                                  exit(-1); //------------------------------------------------------------------>>>
                          #else
                                  return;
                          #endif
                          // Now change the mem size to new values...
                          // For total size - Remove old size and add new size
                          //fprintf(ferr, "\n%s total_memsize = %lu\n", func_name, (*iter1).total_memsize);
                          //fprintf(ferr, "\n%s mem_size = %u\n", func_name, (*iter1).mem_size);
                          //fprintf(ferr, "\n%s amem_size = %u\n", func_name, amem_size);
                          (*iter1).total_memsize = (*iter1).total_memsize + amem_size;
                          if ((*iter1).total_memsize > 0 )
                          {
                                  if ((*iter1).total_memsize >= (*iter1).mem_size )
                                          (*iter1).total_memsize = (*iter1).total_memsize - (*iter1).mem_size;
                                  else
                                  {
                                          fprintf(ferr, "\n\n%s total_memsize is less than mem_size!!", func_name);
                                          fprintf(ferr, "\n%s total_memsize = %lu", func_name, (*iter1).total_memsize);
                                          fprintf(ferr, "\n%s mem_size = %u", func_name, (*iter1).mem_size);
                                          fprintf(ferr, "\n%s amem_size = %u\n", func_name, amem_size);
                                  }
                          }
                          (*iter1).mem_size = amem_size;
                  }
          }

          // The pointer aptr does not exist in the list, so append it now...
          if (does_exist == false)
          {
                  //fprintf(ferr, "\n%s aptr Not found\n", func_name);
                  ptr = aptr;
                  mem_size = amem_size;
                  MemCheck::total_memsize += amem_size;
                  MemCheck::mcH.insert(MemCheck::mcH.end(), *this);
          }
          fclose(ferr);
  }

  static inline void call_check(void *aa, size_t tmpii, char fname[], int lineno)
  {
          MemCheck bb(aa, tmpii, fname, lineno);
          if (& bb);  // a dummy statement to avoid compiler warning msg.
  }

  static inline void remove_ptr(void *aa, char fname[], int lineno)
  {
          char    func_name[100];
          if (aa == NULL)
                  return;

          sprintf(func_name, "remove_ptr() - File: %s Line: %d", fname, lineno);
          FILE *ferr = NULL;
          ferr = fopen(LOG_FILE, "a");
          if (ferr == NULL)
          {
                  fprintf(stdout, "\nWarning: Cannot open file %s\n", LOG_FILE);
                  fprintf(stderr, "\nWarning: Cannot open file %s\n", LOG_FILE);
                  #ifdef DEBUG_MEM
                          exit(-1);
                  #else
                          return;
                  #endif
          }

          bool does_exist = false;
          if (MemCheck::mcH.empty() == true)
          {
                  //fprintf(ferr, "\n%s List is empty!!\n", func_name);
                  //fclose(ferr);
                  //return;
          }
          list<MemCheck>::iterator iter1; // see file include/g++/stl_list.h
          for (iter1 = MemCheck::mcH.begin(); iter1 != MemCheck::mcH.end(); iter1++)
          {
                  if (iter1 == NULL)
                  {
                          fprintf(ferr, "\n%s Iterator iter1 is NULL!!\n", func_name);
                          break;
                  }
                  if ( ((*iter1).ptr) == aa)
                  {
                          does_exist = true;
                          // Now change the mem size to new values...
                          // For total size - Remove old size
                          //fprintf(ferr, "\n%s total_memsize = %lu\n", func_name, (*iter1).total_memsize);
                          //fprintf(ferr, "\n%s mem_size = %u\n", func_name, (*iter1).mem_size);
                          if ((*iter1).total_memsize > 0 )
                          {
                                  if ((*iter1).total_memsize >= (*iter1).mem_size )
                                          (*iter1).total_memsize = (*iter1).total_memsize - (*iter1).mem_size;
                                  else
                                  {
                                          fprintf(ferr, "\n\n%s total_memsize is less than mem_size!!", func_name);
                                          fprintf(ferr, "\n%s total_memsize = %lu", func_name, (*iter1).total_memsize);
                                          fprintf(ferr, "\n%s mem_size = %u\n", func_name, (*iter1).mem_size);
                                  }
                          }
                          MemCheck::mcH.erase(iter1);
                          break;  // must break to avoid infinite looping
                  }
          }
          if (does_exist == false)
          {
                  //fprintf(ferr, "\n%s Fatal Error: - You did not allocate memory!! \n", func_name);
                  //fprintf(ferr, "\n%s The value passed is %s\n", func_name, (char *) aa);
          }
          else
                  //fprintf(ferr, "\n%s found\n", func_name);
          fclose(ferr);
  }

  static inline void call_free_check(void *aa, char *fname, int lineno)
  {
          char func_name[100];
          sprintf(func_name, "call_free_check() - File: %s Line: %d", fname, lineno);

          FILE *ferr = NULL;
          ferr = fopen(LOG_FILE, "a");
          if (ferr == NULL)
          {
                  fprintf(stdout, "\nWarning: Cannot open file %s\n", LOG_FILE);
                  fprintf(stderr, "\nWarning: Cannot open file %s\n", LOG_FILE);
                  #ifdef DEBUG_MEM
                          exit(-1);
                  #else
                          return;
                  #endif
          }

          bool does_exist = false;
          list<MemCheck>::iterator iter1; // see file include/g++/stl_list.h
          for (iter1 = MemCheck::mcH.begin(); iter1 != MemCheck::mcH.end(); iter1++)
          {
                  if (iter1 == NULL)
                  {
                          fprintf(ferr, "\n%s Iterator iter1 is NULL!!\n", func_name);
                          break;
                  }
                  if ( ((*iter1).ptr) == aa)
                  {
                          does_exist = true;
                          //fprintf(ferr, "\n%s iter1.mem_size = %u\n", func_name, (*iter1).mem_size);
                          //fprintf(ferr, "\n%s Total memory allocated = %lu\n",  func_name, (*iter1).total_memsize);
                          if ((*iter1).total_memsize > 0 )
                          {
                                  if ((*iter1).total_memsize >= (*iter1).mem_size )
                                          (*iter1).total_memsize = (*iter1).total_memsize - (*iter1).mem_size;
                                  else
                                  {
                                          fprintf(ferr, "\n\n%s total_memsize is less than mem_size!!", func_name);
                                          fprintf(ferr, "\n%s total_memsize = %lu", func_name, (*iter1).total_memsize);
                                          fprintf(ferr, "\n%s mem_size = %u", func_name, (*iter1).mem_size);
                                  }
                          }
                          MemCheck::mcH.erase(iter1);
                          break;  // must break to avoid infinite looping
                  }
          }
          if (does_exist == false)
          {
                  fprintf(ferr, "\n%s Fatal Error: free() - You did not allocate memory!!\n",
                                  func_name);
                  //fprintf(ferr, "\n%s The value passed is %s\n", func_name, (char *) aa);
                  fclose(ferr);
                  #ifdef DEBUG_MEM
                          exit(-1);
                  #else
                          return;
                  #endif
          }
          else
          {
                  //fprintf(ferr, "\n%s found\n", func_name);
          }
          fclose(ferr);
  }

  void local_print_total_memsize(char *fname, int lineno)
  {
          char func_name[100];
          sprintf(func_name, "local_print_total_memsize() - %s Line: %d", fname, lineno);

          FILE *ferr = NULL;
          ferr = fopen(LOG_FILE, "a");
          if (ferr == NULL)
          {
                  fprintf(stdout, "\nWarning: Cannot open file %s\n", LOG_FILE);
                  fprintf(stderr, "\nWarning: Cannot open file %s\n", LOG_FILE);
                  #ifdef DEBUG_MEM
                          exit(-1);
                  #else
                          return;
                  #endif
          }

          fprintf(ferr, "\n%s Total memory MemCheck::total_memsize = %lu\n",  func_name, MemCheck::total_memsize);
          fclose(ferr);
  }
  #else  //------------> DEBUG

  void local_print_total_memsize(char *fname, int lineno)
  {
          // This function is available whether debug or no-debug...
  }

  #endif // DEBUG

  void local_my_free(void *aa, char fname[], int lineno)
  {
          if (aa == NULL)
                  return;
          call_free_check(aa, fname, lineno);
          free(aa);
          aa = NULL;
  }

  // size_t is type-defed unsigned long
  void *local_my_malloc(size_t size, char fname[], int lineno)
  {
          size_t  tmpii = size + SAFE_MEM;
          void *aa = NULL;
          aa = (void *) malloc(tmpii);
          if (aa == NULL)
                  raise_error_exit(MALLOC, VOID_TYPE, fname, lineno);
          memset(aa, 0, tmpii);
          call_check(aa, tmpii, fname, lineno);
          return aa;
  }
  // size_t is type-defed unsigned long
  char *local_my_realloc(char *aa, size_t size, char fname[], int lineno)
  {
          remove_ptr(aa, fname, lineno);
          unsigned long tmpjj = 0;
          if (aa) // aa !=  NULL
                  tmpjj = strlen(aa);
          unsigned long tmpqq = size + SAFE_MEM;
          size_t  tmpii = sizeof (char) * (tmpqq);
          aa = (char *) realloc(aa, tmpii);
          if (aa == NULL)
                  raise_error_exit(REALLOC, CHAR_TYPE, fname, lineno);

          // do not memset!! memset(aa, 0, tmpii);
          aa[tmpqq-1] = 0;
          unsigned long kk = tmpjj;
          if (tmpjj > tmpqq)
                  kk = tmpqq;
          for ( ; kk < tmpqq; kk++)
                  aa[kk] = 0;
          call_check(aa, tmpii, fname, lineno);
          return aa;
  }

  // size_t is type-defed unsigned long
  short *local_my_realloc(short *aa, size_t size, char fname[], int lineno)
  {
          remove_ptr(aa, fname, lineno);
          unsigned long tmpqq = size + SAFE_MEM;
          size_t  tmpii = sizeof (short) * (tmpqq);
          aa = (short *) realloc(aa, tmpii);
          if (aa == NULL)
                  raise_error_exit(REALLOC, CHAR_TYPE, fname, lineno);
          // do not memset!! memset(aa, 0, tmpii);
          // Not for numbers!! aa[tmpqq-1] = 0;
          call_check(aa, tmpii, fname, lineno);
          return aa;
  }

  // size_t is type-defed unsigned long
  int *local_my_realloc(int *aa, size_t size, char fname[], int lineno)
  {
          remove_ptr(aa, fname, lineno);
          unsigned long tmpqq = size + SAFE_MEM;
          size_t  tmpii = sizeof (int) * (tmpqq);
          aa = (int *) realloc(aa, tmpii);
          if (aa == NULL)
                  raise_error_exit(REALLOC, CHAR_TYPE, fname, lineno);
          // do not memset!! memset(aa, 0, tmpii);
          // Not for numbers!! aa[tmpqq-1] = 0;
          call_check(aa, tmpii, fname, lineno);
          return aa;
  }

  // size_t is type-defed unsigned long
  long *local_my_realloc(long *aa, size_t size, char fname[], int lineno)
  {
          remove_ptr(aa, fname, lineno);
          unsigned long tmpqq = size + SAFE_MEM;
          size_t  tmpii = sizeof (long) * (tmpqq);
          aa = (long *) realloc(aa, tmpii);
          if (aa == NULL)
                  raise_error_exit(REALLOC, CHAR_TYPE, fname, lineno);
          // do not memset!! memset(aa, 0, tmpii);
          // Not for numbers!! aa[tmpqq-1] = 0;
          call_check(aa, tmpii, fname, lineno);
          return aa;
  }

  // size_t is type-defed unsigned long
  float *local_my_realloc(float *aa, size_t size, char fname[], int lineno)
  {
          remove_ptr(aa, fname, lineno);
          unsigned long tmpqq = size + SAFE_MEM;
          size_t  tmpii = sizeof (float) * (tmpqq);
          aa = (float *) realloc(aa, tmpii);
          if (aa == NULL)
                  raise_error_exit(REALLOC, CHAR_TYPE, fname, lineno);
          // do not memset!! memset(aa, 0, tmpii);
          // Not for numbers!! aa[tmpqq-1] = 0;
          call_check(aa, tmpii, fname, lineno);
          return aa;
  }

  // size_t is type-defed unsigned long
  double *local_my_realloc(double *aa, size_t size, char fname[], int lineno)
  {
          remove_ptr(aa, fname, lineno);
          unsigned long tmpqq = size + SAFE_MEM;
          size_t  tmpii = sizeof (double) * (tmpqq);
          aa = (double *) realloc(aa, tmpii);
          if (aa == NULL)
                  raise_error_exit(REALLOC, CHAR_TYPE, fname, lineno);
          // do not memset!! memset(aa, 0, tmpii);
          // Not for numbers!! aa[tmpqq-1] = 0;
          call_check(aa, tmpii, fname, lineno);
          return aa;
  }

  static void raise_error_exit(short mtype, short datatype, char fname[], int lineno)
  {
          if (mtype == MALLOC)
          {
                  fprintf(stdout, "\nFatal Error: malloc() failed!!");
                  fprintf(stderr, "\nFatal Error: malloc() failed!!");
          }
          else
          if (mtype == REALLOC)
          {
                  fprintf(stdout, "\nFatal Error: realloc() failed!!");
                  fprintf(stderr, "\nFatal Error: realloc() failed!!");
          }
          else
          {
                  fprintf(stdout, "\nFatal Error: mtype not supplied!!");
                  fprintf(stderr, "\nFatal Error: mtype not supplied!!");
                  exit(-1);
          }

          // Get current date-time and print time stamp in error file...
          char date_str[DATE_MAX_SIZE + SAFE_MEM];
          time_t tt;
          tt = time(NULL);
          struct tm *ct = NULL;
          ct = localtime(& tt); // time() in secs since Epoch 1 Jan 1970
          if (ct == NULL)
          {
                  fprintf(stdout, "\nWarning: Could not find the local time, localtime() failed\n");
                  fprintf(stderr, "\nWarning: Could not find the local time, localtime() failed\n");
          }
          else
                  strftime(date_str, DATE_MAX_SIZE , "%C", ct);
          FILE *ferr = NULL;
          char    filename[100];
          strcpy(filename, LOG_FILE);
          ferr = fopen(filename, "a");
          if (ferr == NULL)
          {
                  fprintf(stdout, "\nWarning: Cannot open file %s\n", filename);
                  fprintf(stderr, "\nWarning: Cannot open file %s\n", filename);
          }
          else
          {
                  // **************************************************
                  // ******* Do putenv in the main() function *********
                  //              char p_name[1024];
                  //              sprintf(p_name, "PROGRAM_NAME=%s", argv[0]);
                  //              putenv(p_name);
                  // **************************************************
                  char    program_name[200+SAFE_MEM];
                  if (getenv("PROGRAM_NAME") == NULL)
                  {
                          fprintf(ferr, "\n%sWarning: You did not putenv() PROGRAM_NAME env variable in main() function\n",
                                          date_str);
                          program_name[0] = 0;
                  }
                  else
                          strncpy(program_name, getenv("PROGRAM_NAME"), 200);

                  if (mtype == MALLOC)
                          fprintf(ferr, "\n%s: %s - Fatal Error - my_malloc() failed.", date_str, program_name);
                  else
                  if (mtype == REALLOC)
                  {
                          fprintf(ferr, "\n%s: %s - Fatal Error - my_realloc() failed.", date_str, program_name);
                          char dtype[50];
                          switch(datatype)
                          {
                                  case VOID_TYPE:
                                          strcpy(dtype, "char*");
                                          break;
                                  case CHAR_TYPE:
                                          strcpy(dtype, "char*");
                                          break;
                                  case SHORT_TYPE:
                                          strcpy(dtype, "char*");
                                          break;
                                  case INT_TYPE:
                                          strcpy(dtype, "char*");
                                          break;
                                  case LONG_TYPE:
                                          strcpy(dtype, "char*");
                                          break;
                                  case FLOAT_TYPE:
                                          strcpy(dtype, "char*");
                                          break;
                                  case DOUBLE_TYPE:
                                          strcpy(dtype, "char*");
                                          break;
                                  default:
                                          strcpy(dtype, "none*");
                                          break;
                          }
                          fprintf(ferr, "\n%s %s - Fatal Error: %s realloc() failed!!", date_str, program_name, dtype);
                  }

                  fprintf(ferr, "\n%s %s - Very severe error condition. Exiting application now....",
                                          date_str, program_name);
                  fclose(ferr);
          }

          exit(-1);
  }
  ______________________________________________________________________



  17.  Appendix E my_malloc.h

  You can download all programs as a single tar.gz file from ``''.  To
  get this file, in the web-browser, save this file as 'Text' type.

  ______________________________________________________________________
  //*****************************************************************
  // Copyright policy is GNU/GPL and it is requested that
  // you include author's name and email on all copies
  // Author : Al Dev Email: alavoor@yahoo.com
  //*****************************************************************

  /*
  **      In your main() function put -
                  char p_name[1024];
                  sprintf(p_name, "PROGRAM_NAME=%s", argv[0]);
                  putenv(p_name);
                  print_total_memsize(); // in the beginning
                  ......
                  ......
                  print_total_memsize(); // in the end
  */

  /* Use zap instead of delete as this will be very clean!!
  ** Use do while to make it robust and bullet-proof macro
  */
  #define zap(x) do { if (x) { delete(x); x = 0; } } while (0)

  void *local_my_malloc(size_t size, char fname[], int lineno);

  char *local_my_realloc(char *aa, size_t size, char fname[], int lineno);
  short *local_my_realloc(short *aa, size_t size, char fname[], int lineno);
  void local_my_free(void *aa, char fname[], int lineno);

  void local_print_total_memsize(char fname[], int lineno);

  #define my_free(NM) (void) (local_my_free(NM, __FILE__, __LINE__))
  #define my_malloc(SZ) (local_my_malloc(SZ, __FILE__, __LINE__))
  #define my_realloc(NM, SZ) (local_my_realloc(NM, SZ, __FILE__, __LINE__))
  #define print_total_memsize() (void) (local_print_total_memsize(__FILE__, __LINE__))

  #ifdef DEBUG  //------------> DEBUG
  #else  //------------> DEBUG
  #define call_check(AA, BB, CC, DD) ((void) 0)
  #define call_free_check(AA, BB, CC) ((void) 0)
  #define remove_ptr(AA, CC, DD) ((void) 0)
  #endif //------------> DEBUG
  ______________________________________________________________________



  18.  Appendix F debug.h

  You can download all programs as a single tar.gz file from ``''.  To
  get this file, in the web-browser, save this file as 'Text' type.


  ______________________________________________________________________
  //*****************************************************************
  // Copyright policy is GNU/GPL and it is requested that
  // you include author's name and email on all copies
  // Author : Al Dev Email: alavoor@yahoo.com
  //*****************************************************************

  /****************************************************************
          Program for debugging C++/C programs
  *****************************************************************/

  #define print_log(AA, BB, CC, DD, EE) ((void) 0)

  #ifdef DEBUG

  #include <iostream>
  #include <string>
  //#include <assert.h>  // assert() macro which is also used for debugging

  const bool LOG_YES = true;  // print output to log file
  const bool LOG_NO = false;  // Do not print output to log file

  // Debugging code
  // Use debug2_ to output result to a log file

  #define debug_(NM, VL) (void) ( local_dbg(NM, VL, __FILE__, __LINE__) )
  #define debug2_(NM, VL, LOG_FILE) (void) ( local_dbg(NM, VL, __FILE__, __LINE__, LOG_FILE) )

  void local_dbg(char name[], char value[], char fname[], int lineno, bool logfile= false);
  void local_dbg(char name[], string value, char fname[], int lineno, bool logfile= false);
  void local_dbg(char name[], int value, char fname[], int lineno, bool logfile= false);
  void local_dbg(char name[], unsigned long value, char fname[], int lineno, bool logfile= false);
  void local_dbg(char name[], float value, char fname[], int lineno, bool logfile= false);
  void local_dbg(char name[], double value, char fname[], int lineno, bool logfile= false);

  #else  //--------> else

  #define debug_(NM, VL) ((void) 0)
  #define debug2_(NM, VL, LOG_FILE) ((void) 0)

  #endif // DEBUG
  ______________________________________________________________________



  19.  Appendix G debug.cpp

  You can download all programs as a single tar.gz file from ``''.  To
  get this file, in the web-browser, save this file as 'Text' type.



  ______________________________________________________________________
  //*****************************************************************
  // Copyright policy is GNU/GPL and it is requested that
  // you include author's name and email on all copies
  // Author : Al Dev Email: alavoor@yahoo.com
  //*****************************************************************

  /****************************************************************
  Program for debugging C++/C programs
  *****************************************************************/


  #ifdef DEBUG  // ONLY if DEBUG is defined than these functions below are needed

  #include "debug.h"
  //#include "log.h"

  // Variable value[] can be char, string, int, unsigned long, float, etc...

  void local_dbg(char name[], char value[], char fname[], int lineno, bool logfile) {
          if (value == NULL)
                  return;
          if (logfile == true)
                  print_log("\nDebug %s : Line: %d %s is = %s\n", fname, lineno, name, value);
          else
                  cout << "\nDebug " << fname << ": Line: " << lineno << " " << name << " is = " << value << endl; }

  void local_dbg(char name[], string value, char fname[], int lineno, bool logfile) {
          if (logfile == true)
                  print_log("\nDebug %s : Line: %d %s is = %s\n", fname, lineno, name, value.c_str());
          else
                  cout << "\nDebug " << fname << ": Line: " << lineno << " " << name << " is = " << value.c_str() << endl; }

  void local_dbg(char name[], int value, char fname[], int lineno, bool logfile) {
          if (logfile == true)
                  print_log("\nDebug %s : Line: %d %s is = %d\n", fname, lineno, name, value);
          else
                  cout << "\nDebug " << fname << ": Line: " << lineno << " " << name << " is = " << value << endl; }

  void local_dbg(char name[], unsigned int value, char fname[], int lineno, bool logfile) {
          if (logfile == true)
                  print_log("\nDebug %s : Line: %d %s is = %u\n", fname, lineno, name, value);
          else
                  cout << "\nDebug " << fname << ": Line: " << lineno << " " << name << " is = " << value << endl; }

  void local_dbg(char name[], long value, char fname[], int lineno, bool logfile) {
          if (logfile == true)
                  print_log("\nDebug %s : Line: %d %s is = %d\n", fname, lineno, name, value);
          else
                  cout << "\nDebug " << fname << ": Line: " << lineno << " " << name << " is = " << value << endl; }

  void local_dbg(char name[], unsigned long value, char fname[], int lineno, bool logfile) {
          if (logfile == true)
                  print_log("\nDebug %s : Line: %d %s is = %u\n", fname, lineno, name, value);
          else
                  cout << "\nDebug " << fname << ": Line: " << lineno << " " << name << " is = " << value << endl; }

  void local_dbg(char name[], short value, char fname[], int lineno, bool logfile) {
          if (logfile == true)
                  print_log("\nDebug %s : Line: %d %s is = %d\n", fname, lineno, name, value);
          else
                  cout << "\nDebug " << fname << ": Line: " << lineno << " " << name << " is = " << value << endl; }

  void local_dbg(char name[], unsigned short value, char fname[], int lineno, bool logfile) {
          if (logfile == true)
                  print_log("\nDebug %s : Line: %d %s is = %u\n", fname, lineno, name, value);
          else
                  cout << "\nDebug " << fname << ": Line: " << lineno << " " << name << " is = " << value << endl; }

  void local_dbg(char name[], float value, char fname[], int lineno, bool logfile) {
          if (logfile == true)
                  print_log("\nDebug %s : Line: %d %s is = %f\n", fname, lineno, name, value);
          else
                  cout << "\nDebug " << fname << ": Line: " << lineno << " " << name << " is = " << value << endl; }

  void local_dbg(char name[], double value, char fname[], int lineno, bool logfile) {
          if (logfile == true)
                  print_log("\nDebug %s : Line: %d %s is = %f\n", fname, lineno, name, value);
          else
                  cout << "\nDebug " << fname << ": Line: " << lineno << " " << name << " is = " << value << endl; }

  // You add many more here - value can be a class, ENUM, datetime, etc...


  #endif // DEBUG
  ______________________________________________________________________



  20.  Appendix H Makefile

  You can download all programs as a single tar.gz file from ``''.  To
  get this file, in the web-browser, save this file as 'Text' type.



  ______________________________________________________________________
  #//*****************************************************************
  #// Copyright policy is GNU/GPL and it is requested that
  #// you include author's name and email on all copies
  #// Author : Al Dev Email: alavoor@yahoo.com
  #//*****************************************************************

  .SUFFIXES: .pc .cpp .c .o

  CC=gcc
  CXX=g++

  MAKEMAKE=mm
  LIBRARY=libString.a
  DEST=/home/myname/lib

  # To build the library, and main test program  uncomment line below :-
  MYCFLAGS=-O -Wall

  # To test without debug trace uncomment line below:-
  #MYCFLAGS=-g3 -Wall

  # To enable 'full debug ' tracing uncomment line below:-
  #MYCFLAGS=-g3 -DDEBUG -Wall

  #PURIFY=purify -best-effort

  SRCS=my_malloc.cpp String.cpp debug.cpp example_String.cpp
  HDR=my_malloc.h  String.h debug.h
  OBJS=my_malloc.o String.o debug.o example_String.o
  EXE=String

  # For generating makefile dependencies..
  SHELL=/bin/sh

  CPPFLAGS=$(MYCFLAGS) $(OS_DEFINES)
  CFLAGS=$(MYCFLAGS) $(OS_DEFINES)

  #
  # If the libString.a is in the current
  # directory then use -L. (dash L dot)
  MYLIBDIR=-L$(MY_DIR)/libmy -L.

  ALLLDFLAGS= $(LDFLAGS)  $(MYLIBDIR)

  COMMONLIBS=-lstdc++ -lm
  MYLIBS=-lString
  LIBS=$(COMMONLIBS)  $(MYLIBS)

  all: $(LIBRARY) $(EXE)

  $(MAKEMAKE):
          @rm -f $(MAKEMAKE)
          $(PURIFY) $(CXX) -M  $(INCLUDE) $(CPPFLAGS) *.cpp > $(MAKEMAKE)

  $(EXE): $(OBJS)
          @echo "Creating a executable "
          $(PURIFY) $(CC) -o $(EXE) $(OBJS) $(ALLLDFLAGS) $(LIBS)

  $(LIBRARY): $(OBJS)
          @echo "\n***********************************************"
          @echo "   Loading $(LIBRARY) ... to $(DEST)"
          @echo "***********************************************"
          @ar cru $(LIBRARY) $(OBJS)
          @echo "\n "

  .cpp.o: $(SRCS) $(HDR)
  #       @echo "Creating a object files from " $*.cpp " files "
          $(PURIFY) $(CXX) -c  $(INCLUDE) $(CPPFLAGS) $*.cpp

  .c.o: $(SRCS) $(HDR)
  #       @echo "Creating a object files from " $*.c " files "
          $(PURIFY) $(CC) -c $(INCLUDE) $(CFLAGS) $*.c

  clean:
          rm -f *.o *.log *~ *.log.old *.pid core err a.out lib*.a afiedt.buf
          rm -f $(EXE)
          rm -f $(MAKEMAKE)

  #%.d: %.c
  #       @echo "Generating the dependency file *.d from *.c"
  #       $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< | sed '\''s/$*.o/& $@/g'\'' > $@'
  #%.d: %.cpp
  #       @echo "Generating the dependency file *.d from *.cpp"
  #       $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< | sed '\''s/$*.o/& $@/g'\'' > $@'

  # Must include all the c flags for -M option
  #$(MAKEMAKE):
  #       @echo "Generating the dependency file *.d from *.cpp"
  #       $(CXX) -M  $(INCLUDE) $(CPPFLAGS) *.cpp > $(MAKEMAKE)

  include $(MAKEMAKE)
  #include $(SRCS:.cpp=.d)
  #include $(SRCS:.c=.d)
  ______________________________________________________________________



  C-C++ Beautifier HOW-TO
  Al Dev (Alavoor Vasudevan)        alavoor@yahoo.com
  v5.0, 10 July 2000

  This document will help you to format (beautify) the C/C++ programs so
  that it is more readable and confirms to your site C/C++ coding stan
  dards.  The information in this document applies to all the operating
  sytems that is - Linux, MS DOS, Windows 95/NT, OS/2, IBM OSes, all
  flavors of Unix like Solaris, HPUX, AIX, SCO, Sinix, BSD, SCO, etc..
  and to all other operating systems which support "C" compiler (it
  means almost all the operating systems on this planet!).
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. How can I trust Beautifier programs??!!

  3. Beautifiers for other Languages

  4. Verification Script

  5. Related URLs

  6. Other Formats of this Document

  7. Copyright



  ______________________________________________________________________

  1.  Introduction

  Coding standards for C/C++ or any language is required in order to
  make the programs more readable/understandable by programmers. There
  are C/C++ beautifiers (formating tools) to accomplish this goal.
  Formatted (beautified) code improves the productivity of programmers
  by 2 times!!

  On Linux/Unixes there is a command called "indent" and "cb" . Refer to
  'man indent' and 'man cb'. Note that indent and cb work for only "C"
  programs. For "C++" programs use "bcpp". Download the beautifier
  program from one of the following

    C++ : BCPP site is at <http://dickey.his.com/bcpp/bcpp.html> or at
     <http://www.clark.net/pub/dickey>

    C++ : BCPP ftp site is at <ftp://dickey.his.com/bcpp/bcpp.tar.gz>

    C++ :  <http://www.consultix-inc.com/c++b.html>

    C :  <http://www.chips.navy.mil/oasys/c/>

     I used BCPP to format the C++ programs and it worked fine for me.
     You may want to check other tools and use the one which you may
     like the most.

  BCPP was written by Steven De Toni at steve@alpha.ocbbs.gen.nz

  2.  How can I trust Beautifier programs??!!

  For 100% assurance you need a SCIENTIFIC way to validate and trust a
  beautifier program. The method described in this section will enable
  the beautifier program to be accepted as "trust-worthy" and reliable.

  In order to verify that beautifier programs like bcpp, indent or cb is
  not damaging or changing the input source-code after formatting, you
  can use the shell script ``verification program'' or use the following
  technique -

  Generate the object code from the original input source code using the
  compiler -

  ______________________________________________________________________
    g++ -c myprogram.cpp
  ______________________________________________________________________


  Here g++ is GNU C++ compiler. This will create object output mypro
  gram.o

  Save this file -

  ______________________________________________________________________
     mv myprogram.o myprogram_orig.o
  ______________________________________________________________________



  Now run bcpp -

  ______________________________________________________________________
     bcpp myprogram.cpp
  ______________________________________________________________________


  This will create the formatted output program file myprogram.cpp and
  move the original file to myprogram.cpp.orig. Compile the new file
  with  -

  ______________________________________________________________________
     g++ -c myprogram.cpp
  ______________________________________________________________________



  Now use the unix 'diff' command to compare the two object files -

  ______________________________________________________________________
     diff myprogram.o myprogram_orig.o
  ______________________________________________________________________


  Both these files MUST BE IDENTICAL. This verifies that bcpp is working
  perfectly. On DOS or Windows 95 you may want to use the free Cygnus
  <http://www.cygnus.com> Cygwin

  Also you can use the assembler output instead of object output in
  compiler. Like -

  ______________________________________________________________________
      g++ -S myprogram.cpp
  ______________________________________________________________________


  This creates myprogram.s. Verify with -



  ______________________________________________________________________
      diff myprogram.s myprogram_orig.s
  ______________________________________________________________________


  This step gives 100% guarantee that your valuable source code is
  intact and bcpp is JUST doing ONLY formatting and is NOT changing or
  damaging your code in any way.  This method gives you 100% quality
  assurance and life term or long term WARRANTY on beautifier programs
  like 'bcpp',

  It is strongly recommended that you do these two steps every time you
  run beautifier programs like bcpp, indent or cb.

  3.  Beautifiers for other Languages

  Visit the following sites to get beautifiers for other languages like
  HTML, SQL, Java, Perl, Fortran.

    HTML :  <http://www.digital-mines.com/htb/>

    HTML :
     <http://www.datacomm.ch/mwoog/software/perl/beautifier.html>

    HTML :  <http://www.watson-net.com/free/perl/s_fhtml.asp>

    SQL :  <http://www.netbula.com/products/sqlb>

    Java :  <http://home.wtal.de/software-
     solutions/jindent/frameset.html>

    Perl :  <http://www.consultix-inc.com/www.consultix-
     inc.com/talk.htm>

    Perl :  <http://www.consultix-inc.com/www.consultix-
     inc.com/perl_beautifier.html>

    Fortran beautifier :
     <http://www.aeem.iastate.edu/Fortran/tools.html>

    C++ : BCPP site is at
     <http://www.clark.net/pub/dickey/bcpp/bcpp.html>

    C++ :  <http://www.consultix-inc.com/www.consultix-
     inc.com/c++b.html>

    C :  <http://www.chips.navy.mil/oasys/c/>


    White paper on beautifier :  <http://www.consultix-
     inc.com/www.consultix-inc.com/talk.htm>

  To create presentation of codes to display using HTML -

    Presentation (C,C++,Java) to html :
     <http://www.perlstudio.de/cbindex.html>

     Also search the search engines like  <http://www.yahoo.com> or
     <http://www.lycos.com> and search for keyword "beautfier".

  4.  Verification Script

  This is a Korn shell script to verify beautifier program. Requires
  "pdksh*.rpm" from Linux 'contrib' cdrom. Save this file as 'text' file
  and chmod a+rx on it. You can re-write this shell script in PERL so
  that you can use it on Window 95/NT or MSDOS. Uncomment the PRGM
  variable to point to bcpp, cb or indent



  ______________________________________________________________________
  #!/bin/ksh

  # Verification program to check C++ Beautifiers 'bcpp', 'indent' or cb
  ############################################################
  # Copyright
  # The copyright policy is GNU/GPL.
  # Author: Al Dev (Alavoor Vasudevan) alavoor@yahoo.com
  ############################################################

  check_beautify_now()
  {
          # Remove all the temp files....
          \rm -f ${TMP_FILE}
          \rm -f ${TMP_CPPFILE}*.*

          FNAME=$1
          if [ ! -f ${FNAME} ]; then
                  print "\nError: The file ${FNAME} does not exist!!. Aborting now ...."
                  exit
          fi
          \cp  -f ${FNAME} ${TMP_CPPFILE}.cpp
          ${COMPILER} -c ${TMP_CPPFILE}.cpp
          if [ ! -f ${TMP_CPPFILE}.o ]; then
                  print "Fatal Error: Failed to compile ${FNAME}. Aborting now... "
                  exit
          fi
          \mv -f ${TMP_CPPFILE}.o ${TMP_CPPFILE}_orig.o

          aa=`basename $PRGM`
          print "\nRunning, verifying $aa on ${FNAME}"
          ${PRGM} ${TMP_CPPFILE}.cpp
          ${COMPILER} -c ${TMP_CPPFILE}.cpp
          \rm -f $TMP_FILE
          diff ${TMP_CPPFILE}.o ${TMP_CPPFILE}_orig.o 1> $TMP_FILE 2>> $TMP_FILE
          result=""
          result=`wc -c $TMP_FILE | awk '{print $1}' `
          if [ "$result" = "0" ]; then
                  print "Success!! Beautifier $aa is working properly!!\n"
          else
                  print "Fatal Error: Something wrong!! Beautifier is not working!!"
                  exit
          fi
  #       ${COMPILER} -S ${TMP_CPPFILE}.cpp
  #       diff ${TMP_CPPFILE}.s ${TMP_CPPFILE}_orig.s

          # Remove all the temp files....
          \rm -f ${TMP_FILE}
          \rm -f ${TMP_CPPFILE}*.*
  }

  ########## Main of program begins here ##################3
  #PRGM=/usr/bin/bcpp
  #PRGM=/usr/bin/cb
  PRGM=/usr/bin/indent
  COMPILER=/usr/bin/g++

  TMP_FILE=beautify.tmp
  TMP_CPPFILE=beautify-tmp_cppfile

  print -n "Enter the C++ file name <default is *.cpp> : "
  read ans
  if [ "$ans" = "" -o "$ans" = " " ]; then
          ans="ALL"
  else
          FILENAME=$ans
  fi

  # Remove all the temp files....
  \rm -f ${TMP_FILE}
  \rm -f ${TMP_CPPFILE}*.*

  if [ "$ans" != "ALL" ]; then
          check_beautify_now ${FILENAME}
  else
          ls *.cpp |
          while read FILENAME
          do
                  check_beautify_now ${FILENAME}
          done
  fi
  ______________________________________________________________________



  5.  Related URLs

  Visit following locators which are related to C, C++ -

    Vim color text editor for C++, C
     <http://metalab.unc.edu/LDP/HOWTO/Vim-HOWTO.html>

    C++ Programming HOWTO
     <http://metalab.unc.edu/LDP/HOWTO/C++Programming-HOWTO.html>

    CVS HOWTO for C++ programs <http://metalab.unc.edu/LDP/HOWTO/CVS-
     HOWTO.html>

    Linux goodies main site  <http://www.aldev.8m.com>

    Linux goodies mirror site  <http://aldev.webjump.com>

  6.  Other Formats of this Document

  This document is published in 11 different formats namely - DVI,
  Postscript, Latex, Adobe Acrobat PDF, LyX, GNU-info, HTML, RTF(Rich
  Text Format), Plain-text, Unix man pages and SGML.

    You can get this HOWTO document as a single file tar ball in HTML,
     DVI, Postscript or SGML formats from -
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/>

    Plain text format is in:
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO>

    Translations to other languages like French, German, Spanish,
     Chinese, Japanese are in
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> Any help from you to
     translate to other languages is welcome.

     The document is written using a tool called "SGML-Tools" which can
     be got from - <http://www.sgmltools.org> Compiling the source you
     will get the following commands like

    sgml2html C-C++Beautifier-HOWTO.sgml     (to generate html file)

    sgml2rtf  C-C++Beautifier-HOWTO.sgml     (to generate RTF file)

    sgml2latex C-C++Beautifier-HOWTO.sgml    (to generate latex file)

  LaTeX documents may be converted into PDF files simply by producing a
  Postscript output using sgml2latex ( and dvips) and running the output
  through the Acrobat distill ( <http://www.adobe.com>) command as
  follows:

  ______________________________________________________________________
  bash$ man sgml2latex
  bash$ sgml2latex filename.sgml
  bash$ man dvips
  bash$ dvips -o filename.ps filename.dvi
  bash$ distill filename.ps
  bash$ man ghostscript
  bash$ man ps2pdf
  bash$ ps2pdf input.ps output.pdf
  bash$ acroread output.pdf &
  ______________________________________________________________________


  Or you can use Ghostscript command ps2pdf.  ps2pdf is a work-alike for
  nearly all the functionality of Adobe's Acrobat Distiller product: it
  converts PostScript files to Portable Document Format (PDF) files.
  ps2pdf is implemented as a very small command script (batch file) that
  invokes Ghostscript, selecting a special "output device" called
  pdfwrite. In order to use ps2pdf, the pdfwrite device must be included
  in the makefile when Ghostscript was compiled; see the documentation
  on building Ghostscript for details.

  This howto document is located at -

    <http://sunsite.unc.edu/LDP/HOWTO/C-C++Beautifier-HOWTO.html>

  Also you can find this document at the following mirrors sites -

    <http://www.caldera.com/LDP/HOWTO/C-C++Beautifier-HOWTO.html>

    <http://www.WGS.com/LDP/HOWTO/C-C++Beautifier-HOWTO.html>

    <http://www.cc.gatech.edu/linux/LDP/HOWTO/C-C++Beautifier-
     HOWTO.html>

    <http://www.redhat.com/linux-info/ldp/HOWTO/C-C++Beautifier-
     HOWTO.html>

    Other mirror sites near you (network-address-wise) can be found at
     <http://sunsite.unc.edu/LDP/hmirrors.html> select a site and go to
     directory /LDP/HOWTO/C-C++Beautifier-HOWTO.html


  In order to view the document in dvi format, use the xdvi program. The
  xdvi program is located in tetex-xdvi*.rpm package in Redhat Linux
  which can be located through ControlPanel | Applications | Publishing
  | TeX menu buttons.  To read dvi document give the command -


               xdvi -geometry 80x90 howto.dvi
               man xdvi



  And resize the window with mouse.  To navigate use Arrow keys, Page
  Up, Page Down keys, also you can use 'f', 'd', 'u', 'c', 'l', 'r',
  'p', 'n' letter keys to move up, down, center, next page, previous
  page etc.  To turn off expert menu press 'x'.

  You can read postscript file using the program 'gv' (ghostview) or The
  ghostscript program is in ghostscript*.rpm package and gv program is
  in gv*.rpm package in Redhat Linux which can be located through
  ControlPanel | Applications | Graphics menu buttons. The gv program is
  much more user friendly than ghostscript.  Also ghostscript and gv are
  available on other platforms like OS/2, Windows 95 and NT, you view
  this document even on those platforms.


    Get ghostscript for Windows 95, OS/2, and for all OSes from
     <http://www.cs.wisc.edu/~ghost>

  To read postscript document give the command -


                       gv howto.ps
                       ghostscript howto.ps



  You can read HTML format document using Netscape Navigator, Microsoft
  Internet explorer, Redhat Baron Web browser or any of the 10 other web
  browsers.

  You can read the latex, LyX output using LyX a X-Windows front end to
  latex.

  7.  Copyright

  Copyright policy is GNU/GPL as per LDP (Linux Documentation project).
  LDP is a GNU/GPL project.  Additional restrictions are - you must
  retain the author's name, email address and this copyright notice on
  all the copies. If you make any changes or additions to this document
  then you should intimate all the authors of this document.



  CD-Writing HOWTO
  Winfried Trmper <winni@xpilot.org>
  v2.9.1, 05 May 2000

  This document explains how to write CD-ROMs under Linux.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Copyright, license and terms of usage
     1.2 Availability
     1.3 Suggested readings
     1.4 Terminology ... lasers at maximum ... fire!
        1.4.1 Adaptor vs. Adapter
     1.5 Supported CD-writers
     1.6 Supported "features"
     1.7 Mailing Lists

  2. Setup the Linux-system for writing CD-ROMs

     2.1 Quickstart
           2.1..1 Special notes about SCSI CD-writers
           2.1..2 Special notes about CD-writers for the parallel port
        2.1.1 Compiling missing kernel modules (optional)
     2.2 Get the user software for burning CD-Rs
        2.2.1 Command line utilities
        2.2.2 Graphical user interfaces (optional)

  3. Burning CD-Rs

     3.1 Writing CD-ROMs (pure data)
        3.1.1 Creating an image of the later CD-ROM
        3.1.2 Test the CD-image
        3.1.3 Write the CD-image to a CD
     3.2 Writing audio CDs
        3.2.1 Writing audio CDs (TAO)
        3.2.2 DAO
     3.3 Mixed mode CD-ROMs

  4. Dear Winfried,...

     4.1 How sensitive is the burning process?
     4.2 Has file fragmentation a bad impact on the throughput?
     4.3 Is it possible to store the CD-image on an UMSDOS-filesystem?
     4.4 Isn't there some way to get around the ISO-9660 limitations?
     4.5 How to read the tracks from audio CDs?
     4.6 How to probe for SCSI devices after boot?
     4.7 Is it possible to make a 1:1 copy of a data CD?
     4.8 Can Linux read Joliet CD-ROMs? (obsolete answer)
     4.9 How do I read/mount CD-ROMs with the CD-writer?
     4.10 How to put even more data on the CD-R?
     4.11 How to make bootable CD-ROMs?
     4.12 How to make CD-ROMs writable like a hard disk?
     4.13 Is it possible to use several writers at once?
     4.14 What about Solaris, *BSD, AIX, HP-UX, etc.? Is my variant of Unix supported?
     4.15 Where to store the local configuration permanently?
     4.16 How can the CD-info be retrieved?
     4.17 What about re-writing
     4.18 How to create a multi-session CD?
     4.19 Should I use the SCSI adapter shipped with the writer?
     4.20 How to burn over the network?
     4.21 I hear a crack or click sound at the end of the each track.
     4.22 How can this be set up so that a user can burn CDs instead of always being root?
     4.23 Where do I get the "Yellow Book" and "Orange Book" standards?
     4.24 I've been searching for information on burning Video-CD under Linux.
     4.25 Which is easier to set up, IDE or SCSI?
     4.26 How can I overburn a CD using {cdrecord,cdrdao}?
     4.27 What will cdrecord do when it stops getting input from the pipe?
     4.28 Is there an equivalent to ignore=hdX for the ide-scsi emulation?
     4.29 How many times can you re-use CD-RW before they become faulty?
     4.30 Which format to choose for a platform independant CD-ROM?
     4.31 Is multi-session for audio tracks possible?

  5. Troubleshooting

     5.1 It doesn't work: under Linux
     5.2 Error-message: No read access for 'dev=0,6,0'.
     5.3 It doesn't work: under DOS and friends
     5.4 SCSI errors during the burning phase
     5.5 Newly written CDs are not readable on some players.

  6. Credits



  ______________________________________________________________________

  1.  Introduction

  Many people use Linux to burn CD-ROMs, because it is reliable and
  easy. No bluescreens while burning and no headaches about getting the
  right combination of hard- and software. It just works once properly
  set up. The CD-writing HOWTO explains the setup,  how to put data on
  the media and gives some interesting applications kindly submitted by
  the readers.



  1.1.  Copyright, license and terms of usage

  Copyright Winfried Trmper 1996-2000. All rights reserved.

  Redistribution and use, with or without modification, are permitted
  provided that the name of the author may not be used to endorse or
  promote products derived from this software without specific prior
  written permission. In this sense, translations are welcome and need
  not to be authorized by me.

  The author disclaims all warranties with regard to this document,
  including all implied warranties of merchantability and fitness for a
  certain purpose; in no event shall the author be liable for any
  special, indirect or consequential damages or any damages whatsoever
  resulting from loss of use, data or profits, whether in an action of
  contract, negligence or other tortious action, arising out of or in
  connection with the use of this document.

  Short: read and use at your own risk. No money-back guarantee.



  1.2.  Availability


  As the editor of this document I mostly sum up what other people
  report to me. I'm not a software developer nor an expert in hardware,
  so for specific problems with hard- or software you may want to ask
  somebody else.  What always makes sense is to report solutions for
  problems not already covered by the HOWTO to me.


  I get several hundred e-mails concerning the CD-Writing HOWTO each
  year.  So please be patient with me, as I cannot always answer within
  hours.  However, I read everything immediately and put you on my CDR-
  queue. Before you ask a question, please make sure you are aware of
  the newest version of this document; it is always available from
  <http://www.guug.de/~winni/linux/>.



  1.3.  Suggested readings


  You may need the handbook for your Linux-distribution to learn about
  installing a new kernel. I'm really clueless about this issue when it
  comes to any other Linux distribution than my own.

  The CD-R FAQ <http://www.fadden.com/cdrfaq/> is a general FAQ about
  compact-disk recordables (CD-R), CD-writers and the required software.
  As most CD-writers can be used to read CD-ROMs, too, you may want to
  read the Linux CD-ROM HOWTO, the Linux SCSI HOWTO and the Linux Kernel
  HOWTO.



  1.4.  Terminology ... lasers at maximum ... fire!


  CD-ROM stands for Compact Disc Read Only Memory, a storage medium
  utilizing an optical laser to sense microscopic pits on a colorful
  shimmering disk. The pits represent the bits of the information and
  are so petite that some billions of them fit on the disc. Thus a CD is
  a mass-storage medium.

  The term CD-R is a short form of CD-ROM recordable and refers to a CD
  that doesn't have those microscopic pits on its surface.  Thus it is
  empty. The CD-R has a special chemical film inside into which pits can
  be burned. This is done by giving the laser which normally just senses
  the pits a little bit more power so it burns the pits. This action can
  only be taken once on a CD-R. You can leave out some areas for later
  writing, creating a so called multi-session CD.

  The CD-ROM rewritable (short: CD-RW) was developed to work around the
  limitation of CD-R media. With a CD-RW burner the laser can do both,
  burn pits into the media and also melt the media back into its
  original state. This is possible, because the laser does not really
  burn holes into the media, which would get lost in a puff of smoke.  A
  decent analogy for the technique is an ice-hockey game: by driving
  over the ice, a players (laser) leave scratches in it. The pattern in
  the ice (media) is a recording of what happened on the ice during one
  round.  In between the periods of the game, the Zamboni cleaning car
  drives over the ice and fills the scratches by melting the very top
  layer of the ice.  (Zamboni is the brand name for cleaning cars in
  ice-hockey stadiums).  This way the pattern on the ice is cleared and
  a new round can begin. The scientific term for evaporating,
  condensing, melting and freezing is "phase change", thus the name
  "phase change devices" for CD-RW-writers.

  This HOWTO deals with the task of writing CD-Rs and CD-RWs.  Welcome
  on board, captain.


  1.4.1.  Adaptor vs. Adapter

  The the most frequent spelling within the kernel sources is adapter
  (adapter: 4283, adaptor: 154). Even more important, the parameters of
  module options and aliases are naturally affected, like in
  "scsi_hostadapter". So in order to achieve a consistent spelling
  throughout configuration examples and document text, I follow that
  convention regardless of the correct spelling.



  1.5.  Supported CD-writers

  USB CD-writers are currently not supported at all. Apart from that you
  can safely assume that most newer IDE/ATAPI- and SCSI-writers work
  under Linux. Newer drives are mostly MMC-compliant and are therefore
  supported. If the SCSI-version of a particular writer works, the
  IDE/ATAPI-version will most likely work and vice versa. However, some
  people want to get a warm and fuzzy feeling by reading the exact model
  of their writer in some sort of compatibility list.  That is the
  reason why I didn't throw the following list out of the HOWTO.  Here
  is a comprehensive summary of drives reported to work with cdrecord:



  Acer:           CDRW 4432A, CDRW 6206A, CD-R/RW 6X4X32, 8432A
  BTC:            BCE 621E (IDE)
  Compro:         CW-7502, CW-7502B
  Creative:       MK 4211, RW 4224E,
  Delta:          OME-W 141
  Dysan:          CRW-1622
  Elite:          Elite b444.41
  Goldstar:       CED-8041B
  Grundig:        CDR 100 IPW
  Guillemot:      Maxi CD-R 4X/8X
  HP:             SureStore 4020i, SureStore 6020i,
                  C4324, C4325
                  CD-writer+ 7100, 7200i, 7500e, 8100i, 8110i, 8200i Plus,
                             8250i, 9100i, 9110i, 9200e, 9210
  Hi-Val:         CDD 2242, CDD-3610,
  Iomega:         ZIPCD 4x650
  JVC:            XR-W 2001, XR-W 2010, XR-W 2040, XR-W 2042, XR-RW 2224,
                  YR 2626
  Kiss:           CDRW (no model given)
  Kodak:          PCD 200, PCD 225, PCD 260, PCD 600
  Matsushita:     matsushita is the japanese name for panasonic, please see there
  Memorex:        CRW-620, CDR-622, CRW-1622, CRW-2224, CDRW-4420
  Microboards:    PlayWrite 2000, PlayWrite 4000 RW, PlayWrite 4001 RW
  MicroNet:       MasterCD Plus 4x4, MasterCD Plus 4x6
  Mitsubishi:     CDRW-226
  Mitsumi:        CR-2401-TS, CR-2600 TE,  CR-2801 TE,
                  CR-4801 TE, CR-4802 TE,  CR-4804 TE
  Nomai:          680.RW
  Olympus:        CDS 615E, CDS 620E
  Optima:         DisKovery 650 CD-R
  OTI:            CDRW 965, CDRW 975 (Socrates 1.0)
  Panasonic:      CW-7502, CW-7503, CW-7582
  Philips:        CDD-521/10, CDD-522
                  CDD-2000, CDD-2600, CDD-3600, CDD-3610, CDD 4201
                  PCA 267cr, PCA 460 RW, PCRW 404,
                  Omniwriter 26, Omniwriter 26A
  Pinnacle:       RCD-100, RCD-1000, RCD-5020, RCD-5040
  Pioneer:        DW-S114X
  Plasmon:        CDR 480, CDR 4220, RF-4100, RF-4102, CDR 4400
  Plextor:        CDR PX-24 CS, PX-412 C, PX-R412 C
                  PX-R 810Ti, PX-R 820T, PX-W 4220Ti, PX-W 8220T, PX-W 8432T
                  Plexwriter RW 4/2/20
  Procom:         PCDR 4
  REC:            820s
  Ricoh:          RO-1420C+, MP 1420C, MP 6200S, MP 6201S, MP 7040A, MP-7060A
  Samsung:        SW-204
  Sanyo:          CRD-R24S
  Smart and
  Friendly:       CD-RW 226, CD-R 1002, CD-R 1002/PRO, CD-R 1004,
                  CD-R 2004, CD-R 2006 PLUS, CD-R 2006 PRO, CD-RW 2224,
                  CD-R 4000, CD-R 4006, CD-R 4012, CD-RW 4424A
                  CD-R 8020, CD-R 8220
  Sony:           CDRX 100E, CDRX 120E, CDRX 140S-RP,
                  CDU 920S, CDU 924, CDU 926S, CDU 928E, CDU 948S
  Taiyo Yuden:    EW-50
  TEAC:           CD-R50S, CD-R55S, CDR-55S, CDR-55K,
                  CDR-56S-400, CD-R56S-600, R56S-614
  Traxdata:       CRW 2260,
                  CDR 4120, CDR 4120 Pro, CDRW 4260, CDRW 4424, CDR 4800
  Turtle Beach:   2040R
  Waitec:         wt 2036, wt 2444ei
  WPI (Wearnes):  CDRW-622, CDR-632P
  Yamaha:         CDR-100, CDR 102, CDR-200, CDR-200t, CDR-200tx
                  CDR-400, CDR-400c, CDR-400t, CDR-400tx, CDR-400Atx
                  CDW-2216E, CRW-2260, CRW-2260t,
                  CRW-4250tx, CRW-4260t, CRW-4260tx, CRW-4261, CRW-4416S,
                  CRW-6416S, CRW-8424E



  The detailed list of models which have been reported to work or not to
  work under various Unix-like operating systems is available online
  from <http://www.guug.de:8080/cgi-bin/winni/lsc-orig.pl>.


  If your hardware isn't supported you can still use Linux to create an
  image of the CD. You may wish to do so because most burning software
  for DOS does not deal with RockRidge-extensions (Unix-like filesystems
  on CD-ROM). In a second step, you can use DOS or Macintosh software to
  write the image to the CD-R.



  1.6.  Supported "features"

  There are two classes of utilities: the hardware drivers and the data-
  formatters. The hardware drivers support the following features:



       Supported Feature   cdwrite-2.1     cdrecord-1.6    cdrdao
       ----------------------------------------------------------
       IDE/ATAPI           no              yes             yes
       Parallel Port       no              yes             yes
       CD-RW               no              yes             yes
       Audio CD            yes             yes             yes
       Data CD-ROM         yes             yes             partial
       Multisession        partial         yes             no
       TAO (track at once) yes             yes             yes
       DAO (disk at once)  no              no              yes
       packet writing      no              no              no



  cdwrite is unmaintained software referenced only for completeness.
  Please use cdrecord instead, as it supports a wider range of hardware
  and has significantly more features. The main benefit of cdrdao is the
  ability to create audio CDs without two seconds of silence between the
  tracks (writing in disk-at-once (DAO) mode).

  The tools classified as "data-formatters" organize the data on the
  media ("put a filesystem on it").



       Feature         mkisofs         mkhybrid        mkvcdfs
       -------------------------------------------------------
       ISO 9660        yes             yes             no
       RockRidge       yes             yes             no
       El Torito       yes             yes             no
       HFS             no              yes             no
       Joliet          yes             yes             no
       Multisession    yes             yes             no
       CD-Extra        yes             yes             no
       Video-CD        no              no              yes



  The most obvious difference between the ISO 9660 filesystem compared
  to the Extended-2 filesystem is: you can't modify files once they are
  written.  Other limitations of the ISO-9660-filesystem include:
    only 8 levels of sub-directories allowed (counted from the top-
     level directory of the CD)

    maximum length for filenames: 32 characters

    650 MB capacity

  RockRidge is an extension to allow longer filenames and a deeper
  directory hierarchy for the ISO-9660 filesystem. When reading a CD-ROM
  with RockRidge extensions under Linux, all the known properties of
  files like owner, group, permissions, symbolic links appear ("feels
  like a Unix filesystem").  These extensions are not available when
  reading the CD-ROM under DOS or the heterogenous Windows-family of
  operating systems.

  El Torito can be used to produce bootable CD-ROMs. In order to use
  this feature, the BIOS of your PC must support it. Roughly speaking,
  the first 1.44 (or 2.88 if supported) Mbytes of the CD-ROM contains a
  floppy-disk image supplied by you. This image is treated like a floppy
  by the BIOS and booted from. (As a consequence, while booting from
  this virtual floppy, your original drive A: (/dev/fd0) may not be
  accessible.)

  HFS lets a Macintosh read the CD-ROM as if it were an HFS volume (the
  native filesystem for MacOS).

  Joliet brings long filenames (among other things) to newer variants of
  Windows (95, 98, NT). However, the author knows of no tool that allows
  long filenames under plain DOS or Windows 3.11.

  Video-CDs can be directly played on DVD-devices.

  Section 2.8 lists the availability of the mentioned software.



  1.7.  Mailing Lists

  If you want to join the development team (with the intention to
  actively help them), send e-mail to cdwrite-request@other.debian.org
  and put the word subscribe in body of the message.



  2.  Setup the Linux-system for writing CD-ROMs


  This section applies to the following types of CD-writers: SCSI,
  IDE/ATAPI and the devices for the parallel port. USB CD-writers are
  not supported as of May 2000. Non-SCSI writers require compatibility
  drivers, which make them appear as if they were real SCSI devices. On
  the one side such a unifying strategy is easy ("everything is SCSI"),
  because on the application level you can share your knowledge with
  other users regardless of their kind of CD-writer. On the other side,
  you have to reconfigure applications like audio CD players or the
  mount utility to reflect the change of the driver name. For example,
  if you accessed your ATAPI CD-writer through the device file /dev/hdc
  before, you will have to access it through /dev/scd0 after activating
  the SCSI compatibility drivers.

  Once you succeed setting up your hardware and the rest of your Linux-
  system, the command cdrecord -scanbus shows you a list of devices on
  your SCSI busses.  The goal of this section is to guide you in setting
  up your Linux-system, so that you finally end up seeing something
  like:

       shell> cdrecord -scanbus
       Cdrecord release 1.7a1 Copyright (C) 1995-1998 Jrg Schilling
       scsibus0:
             0,0,0) 'Quantum ' 'XP34300         ' 'F76D' Disk
             0,1,0) 'SEAGATE ' 'ST11200N        ' '8334' Disk
             0,2,0) *
             0,3,0) 'TOSHIBA ' 'MK537FB/        ' '6258' Disk
             0,4,0) 'WANGTEK ' '5150ES SCSI 36  ' 'ESB6' Removable Tape
             0,5,0) 'EXABYTE ' 'EXB-8500-85QUE  ' '0428' Removable Tape
             0,6,0) 'TOSHIBA ' 'XM-3401TASUNSLCD' '3593' Removable CD-ROM
             0,7,0) *
       scsibus1:
             1,0,0) 'Quantum ' 'XP31070W        ' 'L912' Disk
             1,1,0) *
             1,2,0) *
             1,3,0) 'TEAC    ' 'CD-R55S         ' '1.0H' Removable CD-ROM
             1,4,0) 'MATSHITA' 'CD-R   CW-7502  ' '4.02' Removable CD-ROM
             1,5,0) *
             1,6,0) 'YAMAHA  ' 'CDR400t         ' '1.0d' Removable CD-ROM
             1,7,0) *



  The example was provided by Jrg Schilling and shows a total of four
  CD-writers. Please note that -scanbus also reports other devices, e.g.
  regular CD-ROMs and hard disk drives. The last column gives the SCSI
  description of the device, from which you cannot clearly distinguish
  ordinary CD-ROM drives from those with burning capability. But the
  product identification (middle column) often has hints about the
  feature in form of a R, -R or -RW.



  2.1.  Quickstart

  This section is an attempt to provide an fast and easy description of
  the configuration. Not all possible setups are covered, but please go
  on and try it out anyways. First of all, check the Linux kernel
  version printed by the command "uname -r".  It should be something
  like 2.0.X or 2.2.Y, where X is higher than 36 and Y is higher than
  11. If you run older versions or the so called development kernels,
  you are on your own. Installing a new kernel is as much work as fixing
  an old one, so I have removed all hints you need for buggy kernels.

  The listing below shows a set of commands you could start with. The
  commands create device file entries under /dev unless they already
  exists.



       test `whoami` = 'root' || echo "You must be root to execute the commands."
       cd /dev/
       umask -S u=rwx,g=rwx,o-rwx
       ./MAKEDEV loop || for i in 0 1 2 3 4 5 6 7; do mknod loop$i b 7 $i; done
       ./MAKEDEV sg   || for i in 0 1 2 3 4 5 6 7; do mknod sg$i  c 21 $i; done



  Hardware access is usally implemented through device files under
  Linux.  So before any other thing you make sure those files do exists
  in the directory /dev. Still nobody could give me a compelling reason
  why this has not been automated through techniques like the device
  filesystem (devfs). The devfs is available for years know, brings a
  safer (!) and a far clearer naming of devices and makes the device
  entries appear automatically under /dev. Some prominent people argue
  devfs is not the perfect solution, but they do not come up with
  anything better, not even something comparable and last but least
  nothing available and tested now. Lets start to use devfs, so I can
  remove the above commands from this document. (
  <http://www.atnf.CSIRO.AU/~rgooch/linux/kernel-patches.html>)


  Next thing to ensure is, that the Linux kernel is equiped with the
  necessary drivers. The following commands check various files for the
  presence of drivers in the running Linux kernel. Usally the command
  "cdrecord -scanbus" should trigger an automatic loading of all
  drivers. In case a driver is not present in the kernel afterwards, it
  is reported and the modularized driver (module) is manually loaded
  through insmod.



       test `whoami` = 'root' || echo "You must be root to execute the commands."
       cdrecord -scanbus > /dev/null
       if ! (pidof kerneld || test -f "/proc/sys/kernel/modprobe"); then
           echo "Neither kerneld nor kmod are running to automatically load modules".
       fi
       report_no_autoload() {
           echo "Ensure the module $1 is loaded automatically next time."
       }
       if test ! -f "/proc/scsi/scsi"; then
           report_no_autoload scsi_mod  &&  insmod scsi_mod
       fi
       if ! grep "^........ sg_" /proc/ksyms > /dev/null; then
           report_no_autoload sg  &&  insmod sg
       fi
       if ! grep "^........ sr_" /proc/ksyms > /dev/null; then
           report_no_autoload sr_mod  &&  insmod sr_mod
       fi
       if ! grep "^........ loop_" /proc/ksyms > /dev/null; then
           report_no_autoload loop  &&  insmod loop
       fi
       if ! grep iso9660 /proc/filesystems > /dev/null; then
           report_no_autoload iso9660  &&  insmod iso9660
       fi
       echo "The following is only needed for IDE/ATAPI CD-writers."
       if ! grep ide-scsi /proc/ide/drivers > /dev/null; then
           report_no_autoload ide-scsi  &&  insmod ide-scsi
       fi
       cdrecord -scanbus



  Please read the next chapter if insmod complains about missing module
  files.  If you are in text mode (console), the loading of modules may
  cause some messages to be printed on your screen. If you are in
  graphics mode (X11, KDE, Gnome), you can recall these messages with
  the command dmesg.

  There are several ways to load the modules next time you start up your
  Linux system:



       (1) Put the relevant insmod command into the startup sequence
           (a shell script named rc.local or equivalent).
       (2a) Run kerneld or kmod and
       (2b) configure them in /etc/modules.conf (to be more precise,
            you configure the utility modprobe, which is called by the daemons)

  People with a SCSI-writer can skip the rest of this section, because
  cdrecord will most likely already detect their hardware. If not, then
  please send me an email with some information about your setup, so I
  can improve the section about SCSI-writers.

  Now to the people with CD-writers for IDE/ATAPI.  As written in the
  previous chapter, you have to load the compatibility driver ide-scsi.
  But this driver can only access your CD-Writer if no other driver has
  already done so. In other words, you have to tell the regular IDE
  driver to leave your CD-writer unrecognized, so the ide-scsi driver
  can grab it.



       hda = IDE bus/connector 0 master device
       hdb = IDE bus/connector 0 slave  device
       hdc = IDE bus/connector 1 master device
       hdd = IDE bus/connector 1 slave  device



  The table above shows the relation of device file names and the
  placing of devices on the IDE busses. The device file name
  representing your CD-Writer has to be passed to the driver in the
  Linux kernel. Example: hdb=ide-scsi.  Such a setting should be added
  to lilo.conf or chos.conf if the driver is statically compiled into
  your kernel, which seems to be the most common setup. If you need to
  pass more than one parameter to the kernel, then seperate them with
  spaces (like shown in the chos example). The next two listings show
  example configurations containing more lines than just the relevant
  append-line. Please note the append- and cmdline-entries are image-
  specific (ie. don't add them immediatly at the top).



       image=/boot/zImage-2.2.14
         label=Linux
         read-only
         append="hdb=ide-scsi"



       linux "Linux 2.1.14" {
               image=/boot/zImage-2.0.37
               cmdline= root=/dev/hda5 readonly hdb=ide-scsi
       }



  If the driver for IDE/ATAPI CD-ROMs is loaded as a module, then the
  above won't make any difference to you, but make sure you include the
  options-line from the next listing. The last three lines of that
  listing are generally suggested to further automate the loading of the
  required modules.



  options ide-cd ignore=hdb            # tell the ide-cd module to ignore hdb
  alias scd0 sr_mod                    # load sr_mod upon access of scd0
  #pre-install ide-scsi modprobe imm    # uncomment for some ZIP drives only
  pre-install sg     modprobe ide-scsi # load ide-scsi before sg
  pre-install sr_mod modprobe ide-scsi # load ide-scsi before sr_mod
  pre-install ide-scsi modprobe ide-cd # load ide-cd   before ide-scsi



  If your CD-writer is the only CD-ROM attached to your machine, then
  remember you have to access the CD-ROM in the writer through the
  device file /dev/scd where =0,..,8. You may want to change the
  symbolic name cdrom to point to the new device file name. The listing
  below shows the command to achieve this with the example scd0.



       cd /dev && rm cdrom && ln -s scd0 cdrom



  If your CD-writer and CD-ROM-drive are two different devices, then
  don't change the cdrom symlink.



  2.1.0.1.  Special notes about SCSI CD-writers


  Please make sure that your writer is recognized by the BIOS of your
  computer. It makes no sense to proceed if your computer does not
  accept the hardware (the fact that it doesn't spit it out should not
  be interpreted as a sign of confirmation; a message on the screen is
  required).

  If you plan to connect your SCSI through the parallel port (not to
  confuse with the IDE drives for the parallel port), you need a special
  active cable and a special kernel driver. Read
  <http://www.torque.net/parport/parscsi.html> to learn more about this
  option.


  2.1.0.2.  Special notes about CD-writers for the parallel port


  I have no clue about this, sorry. Please read
  <http://www.torque.net/parport/paride.html> or your local file
  /usr/src/linux/Documentation/paride.txt.



  2.1.1.  Compiling missing kernel modules (optional)


  The Linux kernel can be equipped with drivers for various features.
  You can compile the drivers into the kernel image statically or you
  can compile them as a module for on-demand loading. The last method is
  preferred for drivers not essential for bringing your Linux-system
  into life, because your kernel will be smaller and faster then.
  However, some drivers are essential for the system to come up and you
  shouldn't compile them as a module. Example: if your system lives on
  an IDE hard disk, you must have the driver for IDE hard disks in the
  kernel -- not as a module.

  There are three different types of CD-writers: SCSI, IDE/ATAPI and
  external writers that work through the parallel port. The table shows
  how to configure the Linux kernel for those hardware types. The first
  column of the table is the section of the kernel configuration menu,
  where you can find the setting. The second column is the description
  of the feature (taken from the kernel configuration menu, too). The
  third column gives the name of the resulting module. The columns named
  SCSI, IDE and PP contain the necessary options for the associated
  hardware (PP = parallel port).



       Sect.  Description                 Module   SCSI  IDE   PP
       ------------------------------------------------------------
       BLOCK  Enhanced IDE/MFM/RLL...                     Y
       BLOCK  IDE/ATAPI CDROM             ide-cd          M
       BLOCK  SCSI emulation support      ide-scsi        M
       BLOCK  Loopback device             loop       M    M     M

       PARIDE Parallel port IDE device    paride               Y/M
       PARIDE Parallel port ATAPI CD-ROMs                       M
       PARIDE Parallel port generic ATAPI                       M
       PARIDE (select a low-level driver)                       Y

       SCSI   SCSI support                scsi_mod  Y/M  Y/M
       SCSI   SCSI CD-ROM support         sr_mod    Y/M  Y/M
       SCSI     Enable vendor-specific               Y    Y
       SCSI   SCSI generic support        sg        Y/M  Y/M
       SCSI   (select a low-level driver)            Y

       FS     ISO 9660 CDROM filesystem   iso9660   Y/M  Y/M   Y/M
       FS     Microsoft Joliet cdrom...   joliet     Y    Y     Y



  Y stands for yes and means you should put the beast into the kernel.
  M stands for module and means you should or must compile this feature
  as a module.  Y/M gives you the option to decide between either (order
  indicates choices with less potential problems). Empty settings don't
  need to be modified and not changing them increases the chance that
  the resulting kernel will work for you (if it did before...).
  Especially in environments where SCSI and ATAPI devices are mixed, you
  better build most things as modules.

  Compiling loopback device is optional.  It allows you to test the
  image before writing it to the media. If you want to be able to read
  CD-ROMs, you need support for the ISO 9660 filesystem. This driver
  automatically includes RockRidge Extensions. The Microsoft Joliet CD-
  ROM extensions have to be explicitly added to the ISO 9660 filesystem.
  In any case, you need a low-level driver for your hardware. Low-level
  refers to the driver, which interacts directly with the hardware.  For
  SCSI and the parallel port, there are a lot of low-level drivers
  available.

  Installing the resulting Linux-kernel is beyond the scope of this
  HOWTO. Please consult the documentation of your Linux-distribution.

  Users of RedHat Linux be aware that you have to compile in the
  features "Ramdisk support" and "Initial ramdisk". Furthermore, you
  have to generate a new ramdisk with the new modules by issuing a
  command like "mkintrd --preload ide-cd initrd-2.2.14.img  2.2.14".



  2.2.  Get the user software for burning CD-Rs

  A more detailed survey of tools related to produce CD-ROMs is
  available from
  <http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdb.html>.


  2.2.1.  Command line utilities

  One of the following packages are required to generate images of CD-Rs
  (only required for data CD-ROMs):


       <ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs/> (mkisofs)

       <ftp://ftp.ge.ucl.ac.uk/pub/mkhfs> (mkhybrid)


  To write images to the CD-R, you need one of the following software
  packages:


       <ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/> (cdrecord)

       <http://www.ping.de/sites/daneb/cdrdao.html> (cdrdao)

       <http://www.munich-vision.de/vcd/> (mkvcdfs)


  Don't trust the man page of old versions of mkisofs which state you
  need version 1.5 of cdwrite. Just use cdrecord and you are fine.
  Please note that newer versions of cdrecord ship with an enhanced
  version of mkisofs and some extra tools in the subdirectory misc/
  (readcd, isosize) not found elsewhere.



  2.2.2.  Graphical user interfaces (optional)

  Front-ends are really front-ends under Linux. That means, you still
  have to install the command-line utilities, but you access them in a
  better looking manner.

  X-CD-Roast is a program package dedicated to easy CD creation under
  Linux. It combines command line tools like cdrecord and mkisofs into a
  nice graphical user interface.


       <http://www.fh-muenchen.de/home/ze/rz/services/pro
       jects/xcdroast/e_overview.html>


  BurnIT is a JAVA front-end to cdrecord, mkisofs and cdda2wav-0.95
  making it a complete package for burning CDs on the Unix platform. It
  is available from


       <http://sunsite.auc.dk/BurnIT/>


  CD-Tux is a character based frontend for the programs mkisofs and
  cdrecord. "It creates an easy to use enviroment for doing almost
  anything to a CD in full color through the use of the (in)famous
  NCURSES Library. And it does all this whith an executable of under
  75K."

       <http://www.datadictator.co.za/cdtux/>



  3.  Burning CD-Rs


       "If to smoke you turn I shall not cease to fiddle while you
       burn." (Roman emperor Nero about burning his own classic-
       CDs, AD64. He misunderstood it completely and burned Rome
       down.)



  Writing CD-ROMs consists of two steps under Linux:


    packaging the desired data (files, music or both) into files with
     special formats

    writing the data from the files to the CD-R with the utility
     cdrecord

  This chapter describes the steps for data and audio CDs in greater
  detail.



  3.1.  Writing CD-ROMs (pure data)

  Note that collecting the data to put onto a CD usually takes longer
  than one expects. Consider that missing files cannot be added once the
  CD is written and fixated. This is also true for CD-RW, which can
  currently only be rewritten as a whole. Using the multi-session
  feature is no option for single files, as it consumes much space for a
  new complete table of contents (TOC). UDF is not ready yet for Linux.

  Also keep in mind that a certain amount of the free space of a CD is
  used for storing the information of the ISO-9660-filesystem (usually a
  few MB).  620 MB data will always fit on a 650 MB CD-R.


  3.1.1.  Creating an image of the later CD-ROM

  Before any storage medium (e.g. floppy disk, hard disk or CD) can be
  used, it must get a filesystem (DOS speak: get formatted).  The
  filesystem is responsible for organizing and incorporating the files
  that should be stored on the medium.

  The usual utilities for creating filesystems on hard disk partitions
  write an empty filesystem onto them, which is then mounted and filled
  with files by the users as they need it. A writable CD is only
  writable once so if we wrote an empty filesystem to it, it would get
  formatted and remain completely empty forever. This is also true for
  rewritable media as you cannot change arbitrary sectors yet; you must
  erase their whole content.

  So what we need is a tool that creates the filesystem while copying
  the files to the CD. This tool is called mkisofs.  A sample usage
  looks as follows:



  mkisofs  -r   -o cd_image   private_collection/
                `---------'   `-----------------'
                     |               |
            write output to   take directory as input



  The option '-r' sets the permissions of all files to be public
  readable on the CD and enables RockRidge-extensions. You probably want
  to use this option unless you really know what you're doing (hint:
  without '-r' the mount point gets the permissions of
  private_collection!).

  mkisofs will try to map all filenames to the 8.3 format used by DOS to
  ensure the highest possible compatibility. In case of naming conflicts
  (different files have the same 8.3 name), numbers are used in the
  filenames and information about the chosen filename is printed via
  STDERR (usually the screen). Don't panic: Under Linux you will never
  see these odd 8.3 filenames because Linux makes use of the Rock Ridge
  extensions which contain the original file information (permissions,
  filename, etc.).

  Now you may wonder why the output of mkisofs is not directly sent to
  the writer device. There are three reasons:


    mkisofs knows nothing about driving CD-writers.

    You may want to test the image before burning it.

    On slow machines it would not be reliable (see section 4.).

  There is a method to write a CD-R in one go, which will be described
  below.

  One also could think of creating an extra partition and writing the
  image to that partition instead to a file. I vote against such a
  strategy because if you write to the wrong partition due to a typo,
  you can lose your complete Linux system. Read: that happened to me...
  Furthermore, it is a waste of disk space because the CD-image is
  temporary data that can be deleted after writing the CD. However,
  using raw partitions saves you the time for deleting files of 650 MB
  size.



  3.1.2.  Test the CD-image

  Linux has the ability to mount files as if they were disk partitions.
  This feature is useful to check that the directory layout and file
  access permissions of the CD image matches your wishes. Although media
  is very cheap today, the writing process is still time consuming, and
  you may at least want to save your time by doing a quick test.

  To mount the file cd_image created above on the directory /cdrom, give
  the command



       mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /cdrom



  Now you can inspect the files under /cdrom -- they appear exactly as
  they were on a real CD. To umount the CD-image, just say umount
  /cdrom. (Warning: On Linux kernels prior to 2.0.31 the last file on
  /cdrom may not be fully readable. Please use a more recent kernel like
  2.0.36. The option -pad for cdrecord applies to audio CDs only and the
  option -pad for mkisofs requires a patch, which is as much work to
  apply than to upgrade to a bug-free Linux kernel.)

  Note:

       Some ancient versions of mount are not able to deal with
       loopback devices. If you have such an old version of mount,
       then upgrade your Linux-system.  Several people have already
       suggested putting information about how to get the newest
       mount utilities into this HOWTO. I always refuse this.  If
       your Linux distribution ships with an ancient mount, report
       it as a bug.  If your Linux distribution is not easily
       upgradable, report it as a bug.

       If I include all the information that is necessary to work
       around bugs in badly designed Linux distributions, this
       HOWTO would be a lot bigger and harder to read.



  3.1.3.  Write the CD-image to a CD

  This section only covers writing data CDs in TAO mode, because it is
  the most frequently used mode for data. For more information about the
  differences of TAO and DAO, please see the chapter about audio CD-Rs.
  If you use DAO mode with the tool cdrdao, then remember to add a dummy
  audio track at the end of the TOC file (see the README).

  Not much more left to do. If you haven't already tried, it's a good
  time for the command



       cdrecord -scanbus



  This will tell you to which SCSI device your CD-writer is attached to.
  All other methods of guessing the information printed so nicely by
  cdrecord have been removed from the HOWTO (especially the somewhat
  dangerous naming scheme for generic SCSI devices under Linux).

  Before showing you the last command, let me warn you that CD-writers
  want to be fed with a constant stream of data. So the process of
  writing the CD image to the CD must not be interrupted or a corrupt CD
  will result. It's easy to interrupt the data stream by deleting a very
  large file. Example: if you delete an old CD-image of 650 Mbytes size,
  the kernel must update information about 650,000 blocks on the hard
  disk (assuming you have a block size of 1 Kbyte for your filesystem).
  That takes some time and is very likely to slow down disk activity
  long enough for the data stream to pause for a few seconds.  However,
  reading mail, browsing the web, or even compiling a kernel generally
  will not affect the writing process on modern machines.

  Please note that no writer can re-position its laser and continue at
  the original spot on the CD when it gets disturbed.  Therefore any
  strong vibrations or other mechanical shocks will probably destroy the
  CD you are writing.

  When you are mentally prepared, dress up in a black robe, multiply the
  SCSI-id of the CD-writer with its SCSI-revision and light as many
  candles, speak two verses of the ASR-FAQ (newsgroup
  alt.sysadmin.recovery) and finally type:



       shell> SCSI_BUS=0   # taken from listing 1 "scsibus0:"
       shell> SCSI_ID=6    # taken from listing 1 "TOSHIBA XM-3401"
       shell> SCSI_LUN=0
       shell> cdrecord -v speed=2 dev=$SCSI_BUS,$SCSI_ID,$SCSI_LUN \
                          -data  cd_image

       # same as above, but shorter:
       shell> cdrecord -v speed=2 dev=0,6,0  -data  cd_image



  For better readability, the coordinates of the writer are stored in
  three environment variables with natural names: SCSI_BUS, SCSI_ID,
  SCSI_LUN.  The option -data is not mandatory but is given to make the
  command line comparable to the one used for writing audio CDs.

  If you use cdrecord to overwrite a CD-RW, you must add the option
  "blank=..." to erase the old content.  Please read the man page to
  learn more about the various methods to blank the CD-RW.

  In times where everybody except me owns a 400 Mhz machine, people feed
  the output of mkisofs directly into cdrecord:



       shell> IMG_SIZE=`mkisofs -R -q -print-size private_collection/  2>&1 \
       | sed -e "s/.* = //"`
       shell> echo $IMG_SIZE
       shell> [ "0$IMG_SIZE" -ne 0 ] && mkisofs -r  private_collection/  \
       |cdrecord  speed=2  dev=0,6,0
                   tsize=${IMG_SIZE}s  -data  -
       #       don't forget the s --^         ^-- read data from STDIN



  The first command is an empty run to determine the size of the image
  (you need the mkisofs from the cdrecord distribution for this to
  work). Maybe your writer does not need to know the size of the image
  to be written, so you can leave this dry run out. The printed size
  must be passed as a tsize-parameter to cdrecord (it is stored in the
  environment variable IMG_SIZE). The second command is a sequence of
  mkisofs and cdrecord, coupled via a pipe.



  3.2.  Writing audio CDs

  Writing audio CDs is very similar to the steps described above for
  data CDs. You can choose between two techniques: DAO or TAO.  TAO
  (track at once) is less suitable for music, because you will hear
  clicks between the individual tracks. It is described first anyways,
  because it is a little bit easier to deal with and DAO is not
  available for all drives yet.

  The main difference compared to writing data CD-Rs is the format of
  the images. ISO-9660 (or whatever filesystem you prefer) would not be
  suitable, because no audio CD player is able to deal with filesystems.
  Instead the audio data must be writen as "16 bit stereo samples in PCM
  coding at 44100 samples/second (44.1 kHz)".

  One utility to convert your sound files into the required format is
  sox.  Its usage is straightforward:



       shell> sox  killing-my-software.wav  killing-my-software.cdr



  This command would convert the song killing-my-software from the WAV-
  format into the CDR audio-format. See the man page for sox for more
  details about formats and filename-extensions sox recognizes. Because
  the output of the manual conversion takes up much disk space, it was
  made a built-in feature of cdrecord for the sound formats WAV and AU.
  So as long as your sound files have the extensions .wav or .au (and
  the sample rate "stereo, 16 bit, 44.1 kHz"), you can use them as audio
  tracks without manual conversion into the CDR format. However,
  cdrecord requires the size of the sound data to be a integer multiple
  of 2352 and to be greater than 705,600 bytes, which is not fullfilled
  for some WAV files. For such files the usage of sox is needed to pad
  the audio data up to 2352 bytes.


  3.2.1.  Writing audio CDs (TAO)


  An audio CD consists of audio tracks, which are organized as separate
  images when using TAO mode. So if you want to have ten tracks on your
  CD, you have to make ten images.

  Cdrecord writes CD images as audio tracks if the option -audio is
  specified. The other options are identical to those used for writing
  data-CDs (unless you have very special requirements). These three
  examples all do the same thing, but read the tracks from different
  sound file formats:



       shell> cdrecord -v speed=2 dev=0,6,0  -audio  track1.cdr track2.cdr...
       shell> cdrecord -v speed=2 dev=0,6,0  -audio  track1.wav track2.wav...
       shell> cdrecord -v speed=2 dev=0,6,0  -audio  track1.au  track2.au...



  One notable format not directly readable by cdrecord is MPEG Layer 3.
  To convert files in this format to the CDR-format, you can use the
  command "mpg123 --cdr - track1.mp3 > track1.cdr".  The option --cdr
  ensures the track is encoded in the required format (see above). Older
  versions of mpg123 require -s instead of the plain - to write to
  stdout.  The other direction (converting from WAV to MPEG) can be done
  with LAME for WAV-files (extract the track with cdda2wav from the
  audio CD and encode it into MP3 with the help of LAME).

  To create a CD-R from a whole bunch of MP3-files, you can use the
  following command sequence:



  for I in *.mp3
  do
      mpg123 --cdr - "$I" | cdrecord -audio -pad -swab -nofix -
  done
  cdrecord -fix



  Depending on the speed of your machine, you may want to slow down
  writing to "speed=1" (cdrecord option). If you use "speed=4", your
  machine must be able to play the MP3-file at quadruple speed. mpg123
  consumes much CPU-time! If you are in doubt, try an empty run with
  -dummy (keeps the laser switched off). By doing this, you will produce
  an audio CD which has a 2 seconds of pause between audio tracks.


  3.2.2.  DAO

  If you want to get rid of the pauses between the audio tracks, you
  have to use disk-at-once (DAO) recording versus the (individual)
  track-at-once (TAO) recording described above. Support for DAO is
  currently most advanced in cdrdao. Please see its homepage for
  details.

  If you master the CD in DAO mode, then you use a monolithic image
  (sound file) and control track information with a configuration file.



       CD_DA
       TRACK AUDIO
       FILE "live.wav" 0 5:0:0
       INDEX 3:0:0
       TRACK AUDIO
       FILE "live.wav" 5:0:0 5:0:0
       TRACK AUDIO
       FILE "live.wav" 10:0:0 5:0:0
       INDEX 2:0:0



  3.3.  Mixed mode CD-ROMs


  There is not much to say about this topic. Just indicate the type of
  the (subse quent) images with the options -data and -audio. Example:



       cdrecord  -v dev=0,6,0  -data  cd_image  -audio  track*.cdr



  4.  Dear Winfried,...

  This is the section usually known as "frequently asked questions with
  answers". If you have a problem with your partner, kids or dog, just
  send it in, as long as it is related to writing CD-Rs or is otherwise
  entertaining.


  4.1.  How sensitive is the burning process?

  Test it. Use the option -dummy to do an empty run of cdrecord. Do
  everything you would do otherwise and watch if the burning process
  survives.

  If you feed cdrecord directly from mkisofs, then disk intensive
  processes such as updating the locate database lower the maximum flow
  rate and may corrupt the CD. You better check such processes are not
  started via cron, at or anacron while you burn CD-Rs on older
  machines.


  4.2.  Has file fragmentation a bad impact on the throughput?

  Fragmentation of files is usually so low that its impact isn't
  noticed. However, you can easily construct pathological cases of
  fragmentation, which lower the throughput of your hard disks under 100
  kbytes/second. So don't do that. :-) Yes, files on a hard disk get
  fragmented over the years. The faster, the fuller the filesystem is.
  Always leave 10% or 20% free space, and you should run fine with
  respect to writing CD-Rs.

  If you're uncertain then look at the messages printed while booting.
  The percentage of fragmentation is reported while checking the
  filesystems. You can check for this value with the very dangerous
  command



       shell> e2fsck -n  /dev/sda5        # '-n' is important!
       [stuff deleted -- ignore any errors]
       /dev/sda5: 73/12288 files (12.3% non-contiguous)



  In this example the fragmentation seems to be very high -- but there
  are only 73 very small files on the filesystem. So the value is not
  alarming.

  There is an experimental utility called e2defrag to defragment
  extended-2 filesystems. The current version does not work reliable
  enough to use it even for private environments. If you really want to
  defragment your filesystem, make a backup copy (better: two copies),
  practice restoring the data, then create a new filesystem (that will
  destroy the old) and restore the data. This sketch is currently the
  safest technique.



  4.3.  Is it possible to store the CD-image on an UMSDOS-filesystem?

  Yes. The only filesystem that isn't reliable and fast enough for
  writing CD-ROMs from is the network filesystem (NFS).  I used UMSDOS
  myself to share the disk-space between Linux and DOS/Win on a PC
  (486/66) dedicated for writing CD-ROMs.



  4.4.  Isn't there some way to get around the ISO-9660 limitations?

  Yes. You can put any filesystem you like on the CD. But other
  operating systems than Linux won't be able to deal with this CD.  Here
  goes the recipe:


    Create an empty file of 650MB size.


       dd if=/dev/zero of="empty_file" bs=1024k count=650



    Create an extended-2 filesystem on this file


       shell> /sbin/mke2fs  -b 2048  empty_file
       empty_file is not a block special device.
       Proceed anyway? (y,n) y



    Mount this empty file through the loopback devices (you need a
     reasonable new mount for this; read above).


       mount -t ext2 -o loop=/dev/loop1 empty_file /mnt



    Copy files to /mnt and umount it afterwards.

    Use cdrecord on empty_file (which is no longer empty) as if it were
     an ISO-9660-image.

  If you want to make an entry in /etc/fstab for such a CD, then disable
  the checking of the device file on system startup. For example:



       /dev/cdrom  /cdrom  ext2  defaults,ro  0 0



  The first 0 means "don't include in dumps" (backup), the second
  (=important) one means "don't check for errors on startup" (fsck would
  fail to check the CD for errors).



  4.5.  How to read the tracks from audio CDs?

  There are several software packages available. The newest one is
  "cdpranoia" and can be downloaded from


       <http://www.xiph.org/paranoia/>

  Or you want to try the combination of "cdda2wav" and "sox", available
  from sunsite and its mirrors:


       <ftp://sun
       site.unc.edu/pub/Linux/apps/sound/cdrom/cdda2wav0.71.src.tar.gz>

       <ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/sox-11gamma-
       cb3.tar.gz>


  cdda2wav enables you to get a specific interval (or a whole track)
  from your audio CD and converts it into a .wav-file.  sox converts the
  WAV files back into the (audio CD) cdda-format so it can be written to
  the CD-R using cdrecord. You don't necessarily need sox if you use a
  recent version of cdrecord, because it has built-in support for .au
  and .wav files.



  4.6.  How to probe for SCSI devices after boot?

  The file drivers/scsi/scsi.c contains the information



       /*
        * Usage: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
        * with  "0 1 2 3" replaced by your "Host Channel Id Lun".
        * Consider this feature BETA.
        *     CAUTION: This is not for hot plugging your peripherals. As
        *     SCSI was not designed for this you could damage your
        *     hardware !
        * However perhaps it is legal to switch on an
        * already connected device. It is perhaps not
        * guaranteed this device doesn't corrupt an ongoing data transfer.
        */



  Please note that this should only be used if your add SCSI devices to
  the end of the chain. Inserting new SCSI devices into an existing
  chain disturbs the naming of devices (directory /dev) and may destroy
  the complete content of your hard disk.

  Some kernel versions do not like re-scanning the SCSI bus at all and
  your system may freeze solid when trying out the above. You have been
  warned.


  4.7.  Is it possible to make a 1:1 copy of a data CD?



  Yes. But you should be aware of the fact that any errors while reading
  the original (due to dust or scratches) will result in a defective
  copy.  Please note that both methods will fail on audio CDs! You have
  to use cdrdao or cdda2wav on audio CDs.

  First case: you have a CD-writer and a separate CD-ROM drive. By
  issuing the command



  cdrecord -v dev=0,6,0 speed=2 -isosize /dev/scd0



  you read the data stream from the CD-ROM drive attached as /dev/scd0
  and write it directly to the CD-writer.

  Second case: you don't have a separate CD-ROM drive. In this case you
  have to use the CD-writer to read out the CD-ROM first:



       dd if=/dev/scd0 of=cdimage



  This command reads the content of the CD-ROM from the device /dev/scd0
  and writes it into the file "cdimage". The contents of this file are
  equivalent to what mkisofs produces, so you can proceed as described
  earlier in this document (which is to take the file cdimage as input
  for cdrecord).  If you want to see a progress-meter and other fancy
  stuff, then you can also use Jrg Schillings  sdd.

  In case you run into errors, then install a recent version of
  cdrecord, which ships a tool called "readcd" (found under misc/). It
  gives you the same result as dd, but reads sectors on the CD-ROM
  several times in case of errors.



  4.8.  Can Linux read Joliet CD-ROMs? (obsolete answer)

  Yes. Newer Kernels (2.0.36 and the upcoming 2.2) have built-in support
  for the joliet format. Remember you have to use both options in your
  /etc/fstab: the keywords iso9660 and joliet (later is really an
  extension).  For more details, see  <http://www-
  plateau.cs.berkeley.edu/people/chaffee/joliet.html>.



  4.9.  How do I read/mount CD-ROMs with the CD-writer?

  Just as you do with regular CD-ROM drives. No tricks at all. Note that
  you have to use the scd devices (SCSI CD-ROM) to mount CD-ROMs for
  reading, even if you have an ATAPI CD-ROM (remember you configured
  your ATAPI devices to act like SCSI). Example entry for /etc/fstab:



       /dev/scd0  /cdrom  iso9660  ro,user,noauto  0  0



  4.10.  How to put even more data on the CD-R?

  Use bzip2 instead of any other compressor like gzip or pkzip. It will
  save you up to 30% of disk-space for larger (>100kb) files. You can
  download it from



       <http://www.muraroa.demon.co.uk/>



  Instead of writing a true audio CD, you can optionally convert your
  WAV audio files into MP3 audio files and store them on a ISO-9660
  filesystem as regular files. Usually MPEG III give you a compression
  of 1:10. Of course, most CD-players are not able to read files... this
  is the drawback. On the other hand, why not running the music for your
  next party from hard disk? 18 Gbytes are enough for 3000-4000 titles.
  :-)

  A software MPEG III-encoder is available from

       <http://www.sulaco.org/mp3/>



  A MPEG III-player is available from

       <http://www.mpg123.org/>



  For recorded speech, you may want to try to reduce its size using
  shorten or "GSM lossy speech compression":


       <ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/>


       <http://kbs.cs.tu-berlin.de/~jutta/toast.html>



  4.11.  How to make bootable CD-ROMs?

  You must have an 1.44 MB bootable floppy-disk. Create an exact image
  of this floppy-disk by issuing the command



       dd if=/dev/fd0 of=boot.img bs=18k



  Place this floppy image into the directory holding the collection of
  your files (or into a subdirectory of it, just as you like). Tell
  mkisofs about this file with the option '-b' and also use '-c'. For
  details read the file README.eltorito in the mkisofs-distribution.

  An interesting application for a custom bootable CD is as a virus safe
  DOS- or Windows-system. It saves you the money for the hard disks (if
  you have a network and use samba to put the user-data on a file
  server). The German computer magazine c't has a article about this
  issue in the issue 11/99, page 206 ( <http://www.heise.de/>).

  Some details about the bootable RedHat CD-ROM is available from
  <http://members.bellatlantic.net/~smithrod/rhjol-technical.html>.



  4.12.  How to make CD-ROMs writable like a hard disk?

  There is an overlay filesystem available for Linux, which is mounted
  over the CD-ROM and intercepts all writing operations. New and
  modified files are stored elsewhere, but for the user it looks like
  the CD-ROM is modified. For more information, see
  <http://home.att.net/~artnaseef/ovlfs/ovlfs.html>.

  If that is not enough for your needs: wait for the UDF-filesystem to
  be supported by Linux or help developing it (see
  <http://trylinux.com/projects/udf/>. At the moment only reading of CD-
  media is supported due to a limitation in the CD-ROM drivers of the
  Linux kernel.



  4.13.  Is it possible to use several writers at once?

  Yes. It is reported to work with at least 3 writers at full speed (6x)
  on a PC with 233 Mhz and a single SCSI bus running kernel 2.2.12. You
  need either a recent version of the Linux kernel (2.2.12 or higher).



  4.14.  What about Solaris, *BSD, AIX, HP-UX, etc.? Is my variant of
  Unix supported?

  Only chapter 2 is Linux-specific. You can apply chapter 3 and 4 even
  if you run another family of operating systems than Linux. Please see
  the files README.NetBSD, README.aix, README.hpux, README.next,
  README.solaris, README.sunos, README.vms or README.xxxBSD from the
  cdrecord-distribution.

  Probably yes. Compile cdrecord for your platform and issue the command
  "cdrecord -scanbus". Read the README.* file for your Unix distributed
  with the sources of cdrecord. However, not all variants of Unix can
  read the RockRidge, Joliet or HFS extensions on your newly written CD-
  R.



  4.15.  Where to store the local configuration permanently?


  You have two options. Either you use the built-in configuration file
  for cdrecord, or you use a shell wrapper like the one shown below.
  This shell script reads a configuration file, which lists the options
  and parameters for cdrecord line by line. The names are exactly the
  same as on the command line, but without the leading dash. Comments
  are allowed.  Example:



       # be verbose
       v
       # set the speed of the writer
       speed=2
       # the device-coordinates in the form BUS,ID,LUN
       dev=0,6,0



  The configuration files for the wrapper belong into /etc/cdrecord/ and
  must be referenced on the command line. Example: if you want to refer
  to the configuration /etc/cdrecord/mywriter.cfg, then you can issue
  the command "cdrecord.sh mywriter.cfg -audio track1...".  Everything
  after mywrite.cfg is passed to cdrecord.



       #! /bin/bash

       CFGDIR="/etc/cdrecord"

       CFG="$1"
       shift
       ARGS_LEFT="$@"

       if [ ! -f "$CFGDIR/$CFG" ]
       then
           echo "Configuration file $CFGDIR/$CFG not found. Exiting."
           exit 1
       fi

       while read LINE
       do
           case $LINE in
               \#*|"") continue;;
           esac
           old_IFS="$IFS"
           IFS="$IFS="
           set -- $LINE
           IFS="$old_IFS"
           O_NAME="$1"
           O_VALUE=""
           while shift
           do
               case $1 in
                   "") continue;;
               esac
               O_VALUE="$1"
           done

           if [ -z "$O_VALUE" ]
           then
               O_CDRECORD="$O_CDRECORD -$O_NAME "
               continue
           fi
           O_CDRECORD="$O_CDRECORD $O_NAME=$O_VALUE "

       done < "$CFGDIR/$CFG"

       set -x    #DEBUG
       exec cdrecord $O_CDRECORD $ARGS_LEFT
       echo "Execution of cdrecord failed."



  4.16.  How can the CD-info be retrieved?

  Somewhere behind the first 32 k on the CD, a block with information
  about the CD is located. You can extract the information with the
  following shell script:



  #! /bin/bash

  RD=/dev/cdrom
  for i in 32768,7   32776,32 32808,32 32958,128 33086,128 33214,128 \
           33342,128 33470,32 33581,16 33598,16  33615,16  33632,16
  do
      old_IFS="$IFS"
      IFS=","
      set -- $i
      IFS="$old_IFS"
      OFFSET=$1
      LENGTH=$2
      echo "*`dd if=$RD bs=1 skip=$OFFSET count=$LENGTH   2> /dev/null`#"
  done



  4.17.  What about re-writing

  When overwriting  CD-RW media, specify the parameter blank=fast to
  cdrecord. That's all. See the man page of cdrecord for details about
  this parameter.


  4.18.  How to create a multi-session CD?

  First of all, the image for a multi-session CD must be formatted using
  the ISO-9660 filesystem using RockRidge-extensions. And you must use
  the option -multi for cdrecord as long as you want to add further
  sessions. So at least for the first session, you must specify the
  option -multi.

  The images for the second and subsequent sessions are a little bit
  more complicated to generate. Mkisofs must know where the free space
  on the CD-R begins. That information can be gathered by using the
  option -msinfo on cdrecord (see example below).



       shell> NEXT_TRACK=`cdrecord -msinfo dev=0,6,0`
       shell> echo $NEXT_TRACK
       shell> mkisofs -R -o cd_image2 -C $NEXT_TRACK -M /dev/scd5
                private_collection/ \



  For more information, please read the file README.multi, which is
  distributed with cdrecord.


  4.19.  Should I use the SCSI adapter shipped with the writer?

  Most CD-writer docs say to use a separate SCSI bus if going from a CD-
  ROM to a CD-writer and I have seen this myself in the following
  scenario:

  Adaptec 2940UW SCSI card, a 24x SCSI CD-ROM and a 4x4 SCSI CD-writer.
  When I got the CD-writer, it came with its own ISA SCSI card which
  could only handle one device.  I figured I'd toss this and use my
  better adaptec card for all the stuff. I noticed it was quite prone to
  buffer under-runs when recording at the 4x speed, but as soon as I
  tried hooking up the ISA SCSI card, it had no problems. I know 2 other
  people (both using adaptec 2940 cards), who have experienced exactely
  the same symptoms, usually when writing from a CD-ROM to a CD-
  recorder. Though I've never experienced the problem when going from a
  hard drive to a CD-writer on the same bus.



  4.20.  How to burn over the network?

  Usally a file transfer with FTP is fast enough to feed a CD-recorder
  at quadruple (4x) speed even over a 10 Mbit ethernet. You can couple
  the ftp-client and cdrecord via a fifo. First create a fifo named
  cdimage:



       mkfifo cdimage
       ftp other.host.org
       get cdimg cdimage



  Then treat cdimage like a regular file, i.e. issue the following
  command:



       cdrecord dev=0,1,0 speed=2 cdimage



  Your ftp-client will notice when cdrecord wants to read from the file
  and will start transfering data from the ftp-host.



  4.21.  I hear a crack or click sound at the end of the each track.

  You have to use disk-at-once mode (DAO) to get rid of the cracks.



  4.22.  being root?  How can this be set up so that a user can burn CDs
  instead of always

  You can add the setuid-bit to the cdrecord-executable. However, this
  might be a security risk. Just setting the permissions on the device
  files does not help as cdrecord issues privileged commands via the
  SCSI generic interfaces.



       which cdrecord
       chown root.root /usr/bin/cdrecord
       chmod 4111 /usr/bin/cdrecord



  4.23.  Where do I get the "Yellow Book" and "Orange Book" standards?

  You get the printed specifications from Philips and they are
  expensive.



  4.24.  I've been searching for information on burning Video-CD under
  Linux.


  Here you can find utilities for creation of MPEG videos and Video-CDs:
  <http://www.mainconcept.de/> <http://www.munich-
  vision.de/lavtools/index.html>

  Political correct people mention the Berkeley-tools and other YUV-
  strategies. Their usage is complicated, takes much time and harddisk-
  space and gives you no audio track. I recommend to use conceptually
  higher level applications like the ones mentioned above.



  4.25.  Which is easier to set up, IDE or SCSI?

  SCSI CD-writers are slightly easier to set up with regard to CD-
  writing under Linux. And they are reported to have better error
  recovery. If that outweights the higher price cannot be answered
  generally.



  4.26.  How can I overburn a CD using {cdrecord,cdrdao}?

  Overburning a CD-R is nothing special. It is at your own risk that the
  data fits on the CD-ROM, but thats all. There are no 650 Mbytes-limits
  in the software under Linux.



  4.27.  What will cdrecord do when it stops getting input from the
  pipe?

  It will finish writing. So you can just couple your favourite backup
  tool with cdrecord using a pipe, like in "bru -size=640m -f - |
  cdrecord dev=0,1,0 speed=2 -". You have to take special care within
  the backup utility if the backup spans multiple CD-Rs.



  4.28.  Is there an equivalent to ignore=hdX for the ide-scsi emula
  tion?

  I know of no way, but anybody is welcome to add this feature to the
  Linux kernel sources.



  4.29.  How many times can you re-use CD-RW before they become faulty?

  Good question.



  4.30.  Which format to choose for a platform independant CD-ROM?

  A CD-ROM to be read by all systems can only use the plain ISO 9660
  format. That means stupid 8+3 filenames from old MS-DOS and without
  any HFS (Macintosh), Joliet (Microsoft) or RockRidge (newer Unices)
  extensions.  There is no extension for longer filenames, which could
  be read by all operating systems.



  4.31.  Is multi-session for audio tracks possible?

  Audio CD-players are only able to deal with audio tracks stored in the
  first session. In other words, you cannot add audio tracks using
  subsequent sessions. However, writing data tracks into the second
  session effectively hides them from audio CD-players. This way you
  prevent having an silent track on your mixed mode CD (audio and data
  mixed).



  5.  Troubleshooting

  Always remember, that you can still use corrupt CD-ROMs as coasters.
  :-)


  5.1.  It doesn't work: under Linux

  Please check first, that the writer works under the software it is
  shipped with (=under another operating system). Concretely:


    Does the controller recognize the writer as a SCSI device?

    Does the driver software recognize the writer?

    Is it possible to make a CD using the accompanied software?

  If "it doesn't even work" with the accompanied software you have a
  hardware conflict or defective hardware. If it works and you use
  loadlin to boot Linux, then that is a problem with loadlin. Loadlin
  makes a warm-boot with most of the hardware already initialized and
  that can confuse the Linux kernel.



  5.2.  Error-message: No read access for 'dev=0,6,0'.

  Under Linux, some versions of the C-library are incompatible (buggy),
  so that an application linked against one version will not work with
  another. An example for an error triggered by pre-compiled binaries is
  the following:



       [root@Blue /dev]# cdrecord -eject dev=0,6,0
       cdrecord: No such file or directory. No read access for 'dev=0,6,0'.



  The solution is to install a newer C-library.


  5.3.  It doesn't work: under DOS and friends

  Try to use Linux. Installation and configuration of SCSI drivers for
  DOS is the hell. Linux is too complicated? Ha!



  5.4.  SCSI errors during the burning phase

  Most likely those errors are caused by


    missing dis-/reconnect feature on the SCSI bus

    insufficiently cooled hardware

    defective hardware (should be detected by 5.1.)

  Under various circumstances SCSI devices dis- and reconnect themselves
  (electronically) from the SCSI bus. If this feature is not available
  (check controller and kernel parameters) some writers run into trouble
  during burning or fixating the CD-R.

  Especially the NCR 53c7,8xx SCSI driver has the feature disabled by
  default, so you might want to check it first:



       NCR53c7,8xx SCSI support                  [N/y/m/?] y
          always negotiate synchronous transfers [N/y/?] (NEW) n
          allow FAST-SCSI [10MHz]                [N/y/?] (NEW) y
          allow DISCONNECT                       [N/y/?] (NEW) y



  5.5.  Newly written CDs are not readable on some players.

  Some people reported problems with playing their self-written CDs.
  Very old audio players or car devices can have problems with CD-Rs,
  although this is extremly rare. Quite frequent are problems with CD-
  RWs, because they don't reflect the laserlight as good as CD-Rs and
  factory-pressed "silver" discs.



  6.  Credits


  Many thanks go to the readers of this HOWTO, who contributed actively
  to its contents. As I don't had access to a CD-writer myself for
  several years, reports about real live setups and experience have
  always been of great value to me.


     Doug Alcorn <doug@lathi.net>
        helped to improve the handling of newer kernels


     Kalle Andersson <kalle@sslug.dk>
        How to write audio CDs directly from MP3.



     Alan Brown <alan@manawatu.net.nz>

     Rick Cochran <rick@msc.cornell.edu>
        hint about dis-/reconnect disabled by default in the ncr driver


     Robert Doolittle <bob.doolittle@sun.com>
        good arguments for dropping cdwrite from the HOWTO


     Markus Dickebohm <m.dickebohm@uni-koeln.de>

     Thomas Duffy <tduffy@sgi.com>
        major cleanup of syntax and spelling


     Dave Forrest  <dforrest@virginia.edu>
        fixed adapter spelling problems


     Jos van Geffen <jos@tnj.phys.tue.nl>
        noted the problem in 4.9.


     Bernhard Gubanka <beg@ipp-garching.mpg.de>
        noticed the need of a recent version of mount to utilize the
        loopback device


     Stephen Harris <sweh@mpn.com>
        contributed hint about writing audio CDs


     Janne Himanka <shem@oyt.oulu.fi>
        pointer to kernel patch to read Joliet CD-ROMs


     Stephan Noy <stnoy@mi.uni-koeln.de>
        information and experience about writing audio CDs


     Don H. Olive <don@andromeda.campbellsvil.edu>
        URL of the mkhybrid tool


     Jesper Pedersen <jews@imada.ou.dk>

     Pierre Pfister <pp@uplift.fr>
        helped to develop the recipe on 1:1 copies.


     Daniel A. Quist <dquist@cs.nmt.edu>
        information about IDE CD-R and newer kernel versions


     Martti.Rahkila@hut.fi
        Reported problem with pre-initialized writers when booting via
        loadlin.


     Dale Scheetz <dwarf@polaris.net>

     Joerg Schilling <schilling@fokus.gmd.de>
        information about cdrecord


     Martin Schulze <joey@Infodrom.North.DE>
        gave information about the cdwrite-mailinglist


     Gerald C Snyder <gcsnyd@loop.com>
        tested writing of an ext2 CD-ROM (see 4.4)


     Art Stone <stone@math.ubc.ca>
        had the idea to put non-ISO-9660 filesystems on a CD


     The Sheepy One <kero@escape.com>
        suggested using defective CD-ROMs as coasters for drinks


     Erwin Zoer <ezoer@wxs.nl>

  Futhermore, I would like to thank the following people for reporting
  spelling mistakes: Bartosz Maruszewski
  <B.Maruszewski@zsmeie.torun.pl>, Alessandro Rubini <rubini@prosa.it>,
  Ian Stirling <ian@opus131.com>, Brian H. Toby.

  End of the Linux CD-Writing HOWTO. (You can stop reading here.)



  The Linux CD-ROM HOWTO
  Jeff Tranter, tranter@pobox.com
  v1.14, 24 March 1999

  This document describes how to install, configure, and use CD-ROM
  drives under Linux. It lists the supported hardware and answers a num-
  ber of frequently asked questions. The intent is to bring new users up
  to speed quickly and reduce the amount of traffic in the Usenet news
  groups and mailing lists.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Acknowledgments
     1.2 New Versions Of This Document
     1.3 Feedback
     1.4 Distribution Policy

  2. CD-ROM Technology

  3. Supported Hardware

     3.1 ATAPI CD-ROM Drives
     3.2 SCSI CD-ROM Drives
     3.3 Proprietary CD-ROM Drives
     3.4 Parallel Port Drives
     3.5 Alternate Drivers

  4. Installation

     4.1 Installing the Hardware
     4.2 Configuring and Building the Kernel
     4.3 Creating Device Files and Setting Boot Time Parameters
        4.3.1 Sbpcd Driver
        4.3.2 Sonycdu535 Driver
        4.3.3 Cdu31a Driver
        4.3.4 Aztcd Driver
        4.3.5 Gscd Driver
        4.3.6 Mcd Driver
        4.3.7 Mcdx Driver
        4.3.8 Cm206 Driver
        4.3.9 Optcd Driver
        4.3.10 Sjcd Driver
        4.3.11 Paride Driver
        4.3.12 SCSI Driver
        4.3.13 IDECD Driver
     4.4 Booting the Linux Kernel
     4.5 Mounting, Unmounting, and Ejecting Devices
     4.6 Troubleshooting
        4.6.1 Step 1: Make sure you are really running the kernel you compiled
        4.6.2 Step 2: Make sure the proper kernel drivers are compiled in
        4.6.3 Step 3: Did the kernel detect your drive during booting?
        4.6.4 Step 4: Can you read data from the drive?
        4.6.5 Step 5: Can you mount the drive?
        4.6.6 Debugging Audio Problems
        4.6.7 When All Else Fails

  5. Applications

     5.1 Audio CD Players
     5.2 PhotoCD
     5.3 Mkisofs
     5.4 ISO-9660 Utilities

  6. Answers to Frequently Asked Questions

     6.1 How can a non-root user mount and unmount discs?
     6.2 Why do I get device is busy when unmounting a CD-ROM?
     6.3 How do I export a CD-ROM to other hosts over NFS?
     6.4 Can I boot Linux from a CD-ROM?
     6.5 How can I read digital data from audio CDs?
     6.6 Why doesn't the find command work properly?
     6.7 Does Linux support any recordable CD-ROM drives?
     6.8 Why do I get mount: Read-only file system when mounting a CD-ROM?
     6.9 Why does the disc tray open when I shut down the system?
     6.10 I have a "special" CD that can't be mounted
     6.11 Do multi-platter CD-ROM drives work with Linux?
     6.12 I get "/cdrom: Permission denied" errors
     6.13 How do I interpret IDE CD kernel error messages?
     6.14 How can I tell what speed CD-ROM I have?
     6.15 My CD-ROM stopped working after Linux was installed
     6.16 There are "hidden" files on a CD which I can't read
     6.17 Where is the CD-ROM API documented?
     6.18 Why don't I see long filenames on this Windows CD-ROM?
     6.19 Is Microsoft's Joliet filesystem supported?
     6.20 Does Linux support "enhanced" CDs?
     6.21 Does Linux support DVD-ROM?
     6.22 Does Linux support CD-RW?

  7. References



  ______________________________________________________________________

  1.  Introduction


  This is the Linux CD-ROM HOWTO. It is intended as a quick reference
  covering everything you need to know to install and configure CD-ROM
  hardware under Linux. Frequently asked questions related to CD-ROM are
  answered, and references are given to other sources of information
  related to CD-ROM applications and technology.


  1.1.  Acknowledgments


  Much of this information came from the documentation and source files
  provided with the Linux kernel, the Internet alt.cdrom newsgroup FAQ,
  and input from Linux users.

  Thanks to the SGML Tools package, this HOWTO is available in several
  formats, all generated from a common source file.


  1.2.  New Versions Of This Document


  New versions of this document will be periodically posted to the
  comp.os.linux.answers newsgroup. They will also be uploaded to various
  anonymous ftp sites that archive such information including
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/>.

  Hypertext versions of this and other Linux HOWTOs are available on
  many world-wide web sites, including
  <http://metalab.unc.edu/LDP/HOWTO/>. Most Linux CD-ROM distributions
  include the HOWTOs, often under the /usr/doc directory, and you can
  also buy printed copies from several vendors. Sometimes the HOWTOs
  available from CD-ROM vendors, ftp sites, and printed format are out
  of date. If the date on this HOWTO is more than six months in the
  past, then a newer copy is probably available on the Internet.

  Please note that, due to the dynamic nature of the Internet, all web
  and ftp links listed in this document are subject to change.

  Translations of this document are available in several languages:

  Chinese:  <http://www.linux.org.tw/CLDP/CDROM-HOWTO.html>

  French:  <http://www.freenix.org/unix/linux/HOWTO/>


  Japanese:  <http://jf.linux.or.jp/JF/JF.html/>

  Polish:  <http://www.jtz.org.pl/Html/CDROM-HOWTO.pl.html>

  Spanish:  <ftp://ftp.insflug.org/es>

  Swedish:  <http://www.swe-doc.linux.nu/>

  Most translations of this and other Linux HOWTOs can also be found at
  <http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/> and
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/>. If you
  make a translation of this document into another language, let me know
  and I'll include a reference to it here.


  1.3.  Feedback


  I rely on you, the reader, to make this HOWTO useful. If you have any
  suggestions, corrections, or comments, please send them to me,
  tranter@pobox.com, and I will try to incorporate them in the next
  revision.

  I am also willing to answer general questions on CD-ROM under Linux,
  as best I can. Before doing so, please read all of the information in
  this HOWTO, and then send me detailed information about the problem.
  Please do not ask me about using CD-ROM drives under operating systems
  other than Linux.

  If you publish this document on a CD-ROM or in hardcopy form, a
  complimentary copy would be appreciated; mail me for my postal
  address. Also consider making a donation to the Linux Documentation
  Project to help support free documentation for Linux. Contact the
  Linux HOWTO coordinator, Tim Bynum (linux-howto@metalab.unc.edu), for
  more information.


  1.4.  Distribution Policy


  Copyright (c) 1995-1999 by Jeff Tranter. This document may be
  distributed under the terms set forth in the LDP license at
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.


  2.  CD-ROM Technology



  "CD-ROM is read-only memory, and audio compact disc system is
  available as package-media of digital data for those purpose. For
  playing audio CD, please insert Head-phone jack."
  --- from a CD-ROM instruction manual



  Don't Panic! The world of CD-ROM technology is not as confusing as
  your instruction manual.

  CD-ROM stands for Compact Disc Read-Only Memory, a mass storage medium
  utilizing an optical laser to read microscopic pits on the aluminized
  layer of a polycarbonate disc. The same format is used for audio
  Compact Discs. Because of its high storage capacity, reliability, and
  low cost, CD-ROM has become an increasingly popular storage media.


  The storage capacity of a CD-ROM disc is approximately 650 megabytes,
  equivalent to over 500 high density 3.5" floppy disks or roughly
  250,000 typed pages.

  First generation drives (known as single speed), provided a transfer
  rate of approximately 150 kilobytes per second. Hardware manufacturers
  then introduced double speed (300 kB/sec), quad speed (600 kB/sec),
  and higher. Current drives operate at up to 40 times speed, although
  the maximum rate is only achievable over certain portions of the disc
  surface.

  Most CD-ROM drives use either the Small Computer Systems Interface
  (SCSI), ATAPI enhanced IDE interface, or a vendor proprietary
  interface. They also typically support playing audio CDs via an
  external headphone jack or line level output. Some CDs also allow
  reading the frames of data from audio CDs in digital form.

  CD-ROMs are usually formatted with an ISO-9660 (formerly called High
  Sierra) file system. This format restricts filenames to the MS-DOS
  style (8+3 characters). The Rock Ridge Extensions use undefined fields
  in the ISO-9660 standard to support longer filenames and additional
  Unix style information (e.g. file ownership, symbolic links, etc.).
  Microsoft has defined a proprietary ISO file system extension called
  Joliet which supports long filenames using the 16-bit UNICODE
  character encoding.

  PhotoCD is a standard developed by Kodak for storing photographic
  images as digital data on a CD-ROM. With appropriate software, you can
  view the images on a computer, manipulate them, or send them to a
  printer. Information can be added to a PhotoCD at a later date; this
  is known as multi-session capability.

  CD recorders (CD-R) allow writing onto a special "gold" CD which can
  then be read by any CD-ROM drive. Data can only be written once,
  although using multi-session new data can be appended to a disc. These
  drives are now becoming increasingly affordable.

  CD-RW (read/write) drives support multiple writing of data to CDs.
  They use special discs which cannot be read using standard CD-ROM
  drives, although the CD-RW drives themselves can read standard discs.

  DVD-ROM expands the storage of a CD to as much as 17 gigabytes. They
  are commonly used as a medium for distributing full length motion
  pictures encoded using the MPEG-2 format. The MPEG video decoding is
  usually performed using specialized decoder hardware.


  3.  Supported Hardware


  This section lists the CD-ROM drivers and interfaces that are
  currently supported under Linux. The information here is based on the
  latest stable Linux kernel, which at time of writing was version
  2.2.4.

  This information is only valid for Linux on the Intel platform. Much
  of it is applicable to Linux on other processor architectures as well.


  3.1.  ATAPI CD-ROM Drives


  ATAPI (ATA Packet Interface) is a protocol for controlling mass
  storage devices. It builds on the ATA (AT Attachment) interface, the
  official ANSI standard name for the IDE interface developed for hard
  disk drives. ATAPI is commonly used for hard disks, CD-ROM drives,
  tape drives, and other devices. Currently the most popular type of
  interface, it offers most of the functionality of SCSI, without the
  need for an expensive controller or cables.

  The Linux kernel has a device driver that should work with any ATAPI
  compliant CD-ROM drive. Vendors shipping compatible drives include
  Aztech, Mitsumi, NEC, Sony, Creative Labs, and Vertos. If you have
  recently purchased a CD-ROM drive, especially if it is quad speed or
  faster, it is almost guaranteed to be IDE/ATAPI.

  Linux also has an IDE SCSI emulation kernel driver that makes an
  IDE/ATAPI device appear in software to be a SCSI device, allowing the
  use of a SCSI device driver instead of the native ATAPI driver. This
  is useful if you have an ATAPI device for which no native driver has
  been written (for example, an ATAPI PD-CD or CDR drive); you can then
  use this emulation together with an appropriate SCSI device driver.


  3.2.  SCSI CD-ROM Drives


  SCSI (Small Computer Systems Interface) is a popular format for CD-ROM
  drives. Its chief advantages are a reasonably fast transfer rate,
  multi-device capability, and support on a variety of computer
  platforms. Some disadvantages of SCSI are the need for a relatively
  expensive controller card and cables.

  Any SCSI CD-ROM drive with a block size of 512 or 2048 bytes should
  work under Linux; this includes the vast majority of CD-ROM drives on
  the market.

  You will also need a supported SCSI controller card; see the SCSI
  HOWTO for more information on interface hardware.


  Note that some CD-ROMs include a proprietary controller with a
  modified interface that is not fully SCSI compatible (e.g. it may not
  support adding other SCSI devices on the bus). These will most likely
  not work under Linux.


  3.3.  Proprietary CD-ROM Drives


  Several CD-ROM drives using proprietary interfaces are available; the
  interface is often provided on a sound card. Simple interface cards
  equivalent to that provided on the sound card are also available.
  These drives generally tend to be lower in cost and smaller than SCSI
  drives. Their disadvantages are the lack of standardization and
  expandability.

  Note that proprietary interfaces are sometimes erroneously referred to
  as IDE interfaces, because like IDE hard disks, they use a simple
  interface based on the PC/AT bus. To add to the confusion, some
  vendors, most notably Creative Labs, have shipped many different types
  of CD-ROM drives and have offered proprietary, SCSI, and ATAPI
  interfaces on their sound cards.

  The table below lists the proprietary CD-ROM drives that are known to
  be supported under Linux. Drivers for additional devices may be
  available in the latest development kernels or as kernel patches. The
  latter can most often be found at
  <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cdrom/>. Also check
  the documentation files included with the kernel distribution, usually
  installed in /usr/src/linux/Documentation/cdrom, for the latest
  information.
                  Proprietary CD-ROM Drives

  Vendor          Model           Kernel Driver   Notes
  ------          -----           -------------   --------
  Panasonic       CR-521          sbpcd           Note 1
  Panasonic       CR-522          sbpcd           Note 1
  Panasonic       CR-523          sbpcd           Note 1
  Panasonic       CR-562          sbpcd           Note 1
  Panasonic       CR-563          sbpcd           Note 1
  Creative Labs   CD-200          sbpcd
  IBM             External ISA    sbpcd           Note 2
  Longshine       LCS-7260        sbpcd
  Teac            CD-55A          sbpcd
  Sony            CDU-31A         cdu31a
  Sony            CDU-33A         cdu31a
  Sony            CDU-535         sonycd535       Note 3
  Sony            CDU-531         sonycd535
  Aztech          CDA268-01A      aztcd           Note 4
  Orchid          CDS-3110        aztcd
  Okano/Wearnes   CDD110          aztcd
  Conrad          TXC             aztcd
  CyCDROM         CR520ie         aztcd
  CyCDROM         CR940ie         aztcd
  GoldStar        R420            gscd            Note 5
  Philips/LMS     CM206           cm206           Note 6
  Mitsumi         CRMC LU005S     mcd/mcdx        Note 7, 8
  Mitsumi         FX001           mcd/mcdx        Note 7, 8
  Optics Storage  Dolphin 8000AT  optcd
  Lasermate       CR328A          optcd
  Sanyo           H94A            sjcd
  various         various         isp16           Note 9



  Notes:


  1. These drives may be sold under the names Creative Labs, Panasonic,
     Matsushita, or Kotobuki.

  2. This drive is the same as a Panasonic CR-562.

  3. May also be sold under the Procomm name.

  4. This driver is for the CDA268-01A only. Other models, including the
     CDA268-03I and CDA269-031SE are not proprietary and should use the
     IDECD (ATAPI) kernel driver.

  5. May also be sold as part of a Reveal Multimedia Kit.

  6. The Philips CM205 is not supported by this driver, but there is a
     separate alpha release driver available from ftp://metalab.unc.edu
     in /pub/Linux/kernel/patches/cdrom/lmscd0.4.tar.gz

  7. May also be sold under the Radio Shack name.

  8. There are two drivers available. "mcd" is the original one, and
     "mcdx" is a newer driver with more features (but possibly less
     stable).

  9. This driver works with CD-ROM drives that are attached to the
     interface on an ISP16, MAD16 or Mozart sound card.

  If a drive listed here is not supported by your kernel, you probably
  need to upgrade to a newer version.

  If your drive is not one of the models listed here, particularly if it
  was bought recently and is quad speed or faster, it probably uses the
  IDE/ATAPI interface listed in a previous section. The single most
  common error among Linux CD-ROM users is to assume that any drive
  connected to a SoundBlaster card should use the SBPCD driver. Creative
  Labs and most other vendors are no longer selling proprietary
  interface drives, they are following the standard ATAPI/IDE interface.


  3.4.  Parallel Port Drives


  There are external storage devices, including CD-ROM drives, that
  attach to the parallel port of personal computers. In many cases the
  devices internally use an IDE interface in conjunction with an adaptor
  which interfaces the internal IDE bus to the PC parallel port.

  Linux has a parallel port IDE driver which supports most parallel port
  devices. At the time of writing it supported devices from the
  following vendors (as well as most no-name and clone drives compatible
  with these): ATEN, Avatar, DataStor, Fidelity International
  Technology, Freecom, Hewlett-Packard, Imation, KT Technology, KingByte
  Information Corp., Maxell, MicroSolutions, OnSpec, Shuttle Technology,
  SyQuest, and ValuStore.

  Additional information can be found at
  <http://www.torque.net/parport/>.


  3.5.  Alternate Drivers


  There is an alternate kernel driver available for Panasonic/Matsushita
  CR-56x drives written by Zoltan Vorosbaranyi. It can be found at
  <ftp://ftp.honlap.net/pub/linux/pcd/pcd-0.30.tar.gz>.


  4.  Installation


  Installation of a CD-ROM under Linux consists of these steps:


  1. Installing the hardware.

  2. Configuring and building the Linux kernel.

  3. Creating device files and setting boot time parameters

  4. Booting the Linux kernel.

  5. Mounting the media.

  The next sections will cover each of these steps in detail.


  4.1.  Installing the Hardware


  Follow the manufacturer's instructions for installing the hardware or
  have your dealer perform the installation. The details will vary
  depending on whether the drive is internal or external and on the type
  of interface used. There are no special installation requirements for
  Linux. You may need to set jumpers on the drive and/or interface card
  for correct operation; some of the kernel drivers include
  documentation files that include this information.
  As explained in the file ide-cd, ATAPI CD-ROMS should be jumpered as
  "single" or "master", and not "slave" when only one IDE device is
  attached to an interface (although this restriction is no longer
  enforced with recent kernels).


  4.2.  Configuring and Building the Kernel


  When initially installing Linux from CD-ROM you will likely be using a
  boot and/or root disk provided as part of a Linux distribution. If
  possible, you should choose a boot disk with the kernel driver for
  your CD-ROM device type. If you cannot find a boot disk with the
  necessary CD-ROM driver, you have several options:


  1. Boot directly from CD-ROM (if supported by your computer and Linux
     CD)

  2. Install over a network

  3. Boot DOS, and install the Linux files onto your hard disk

  4. Boot DOS, and create a set of floppies to install Linux

  5. Find someone who can build you a boot disk with the needed CD-ROM
     driver

  The Linux Installation HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/Installation-HOWTO.html> has more
  information on installing Linux. If you purchased Linux on CD-ROM, it
  likely also came with some installation instructions (that little
  booklet inside the jewel case, and/or files on the CD).

  Once Linux has initially been installed, most users will want to
  compile their own kernel, usually for one of these reasons:


  o  to support a CD-ROM drive or other hardware

  o  to upgrade to a newer kernel release

  o  to free up memory resources by minimizing the size of the kernel

  The Linux Kernel HOWTO <http://metalab.unc.edu/LDP/HOWTO/Kernel-
  HOWTO.html> should be consulted for the details of building a kernel.
  I will just mention here some issues that are specific to CD-ROM
  drives.

  Obviously, you need to compile in support for your CD-ROM drive when
  you do a "make config".

  If you have an ATAPI CD-ROM drive, you need to answer yes to the
  questions:



       Enhanced IDE/MFM/RLL disk/cdrom/tape support (CONFIG_BLK_DEV_IDE) [Y/n/?]
       Include IDE/ATAPI CDROM support (CONFIG_BLK_DEV_IDECD) [Y/n/?]



  For SCSI CD-ROM drives, enable these options:


       SCSI support (CONFIG_SCSI) [Y/n/m/?]
       SCSI CDROM support (CONFIG_BLK_DEV_SR) [Y/n/m/?]



  Also enable support for your SCSI host adapter when prompted, e.g.



       Adaptec AHA152X/2825 support (CONFIG_SCSI_AHA152X) [Y/n/m/?]



  For proprietary interface CD-ROM drives, enable the appropriate
  driver. You can use the table listed previously to determine the
  driver to use for your model.

  Virtually all CD-ROMs use the ISO-9660 file system, so you must also
  enable:



       ISO 9660 CDROM filesystem support (CONFIG_ISO9660_FS) [Y/n/m/?]



  Although not needed for CD-ROM operation, if you have a sound card
  that is supported under Linux you might want to enable and configure
  the kernel sound driver at this time as well. The Sound HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/Sound-HOWTO.html> can be a useful
  reference here.

  You should then follow the usual procedure for building the kernel and
  installing it. Don't boot with the new kernel until you create the
  device files and set up any boot time parameters as described in the
  next section.

  The ISO-9660 filesystem and almost all of the CD-ROM drivers can be
  built as loadable kernel modules. This scheme allows the kernel
  drivers to be loaded and unloaded without rebooting the kernel,
  freeing up memory. I recommend you get your CD-ROM installation
  running using compiled-in drivers first. How to use modules is
  described in the modules documentation and the Kernel HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>.

  If a drive type listed here is not supported by your kernel, you
  likely need to upgrade to a newer version.

  It is possible that you need to use a driver that is distributed
  separately from the kernel source code. This usually involves patching
  the kernel. Again, the Kernel HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html> explains how to
  do this.

  Note that there is a menu-based kernel configuration program invoked
  by "make menuconfig" and an X11-based graphical configuration invoked
  as "make xconfig". All three configuration methods offer on-line help.


  4.3.  Creating Device Files and Setting Boot Time Parameters



  The kernel uses device files to identify which device driver to use.
  If you are running a standard Linux distribution you may have created
  the necessary device files during installation. Under Slackware Linux,
  for example, there is a menu-based setup tool that includes CD-ROM
  setup, and most systems have a /dev/MAKEDEV script. If you don't use
  these methods, you can use the more manual procedure listed in this
  section. Even if you use either of these methods, it is recommended
  that you at least verify the device files against the information in
  this section.

  You create the device file by running the shell commands indicated for
  your drive type. This should be done as user root. Note that some
  Linux distributions may use slightly different CD-ROM device names
  from those listed here.

  It is recommended that you also create a symbolic link to the CD-ROM
  device to make it easier to remember. For example, for an IDE CD-ROM
  drive that is the second device on the secondary interface, the link
  would be created using



       # ln -s /dev/hdd /dev/cdrom



  If you want to play audio CDs, you will need to set the protection on
  the device file (the real file, not the symbolic link to it) to allow
  all users to read, e.g.



       # chmod 664 /dev/hdd
       # ls -l /dev/hdd
       brw-rw-r--   1 root     disk      22,  64 Feb  4  1995 /dev/hdd



  When booting Linux, the device drivers attempt to determine whether
  the appropriate devices are present, typically by probing specific
  addresses. Many of the drivers auto-probe at several addresses, but
  because of differences in configuration, possible device conflicts,
  and hardware limitations, the drivers sometimes need help identifying
  the addresses and other parameters. Most drivers support an option on
  the kernel command line to pass this information to the device driver.
  This can be done interactively, or more commonly, configured into your
  boot loader. With LILO, for example, you would add an append command
  such as the following to your /etc/lilo.conf file:



       append = "sbpcd=0x230,SoundBlaster"



  See the LILO documentation for more information.

  In the next section I discuss issues specific to individual device
  drivers, including device files, boot parameters, and the capabilities
  of the different drivers. You probably only need to read the section
  relevant to your drive type. The documentation files are usually found
  in the directory /usr/src/linux/Documentation/cdrom.

  4.3.1.  Sbpcd Driver



         Principal author: Eberhard Moenkeberg (emoenke@gwdg.de)
    Multi-session support: yes (but not all drives)
   Multiple drive support: yes
  Loadable module support: yes
     Reading audio frames: yes (CR-562, CR-563, CD-200 only)
             Auto-probing: yes
              Device file: /dev/sbpcd, major 25
       Configuration file: sbpcd.h
     Kernel config option: Matsushita/Panasonic CDROM support?
       Documentation file: sbpcd



  This driver accepts a kernel command line of the form:



       sbpcd=<io-address>,<interface-type>



  where the first parameter is the base address of the device (e.g.
  0x230), and <interface-type> is one of "SoundBlaster", "LaserMate", or
  "SPEA". See the file sbpcd.h for hints on what interface type to use.
  Using sbpcd=0 disables auto-probing, disabling the driver.

  The device file can be created using:



       # mknod /dev/sbpcd b 25 0



  Up to four drives per controller are supported. The next three drives
  on the first controller would use minor device numbers 1 through 3.
  If you have more than one controller, create devices with major
  numbers 26, 27, and 28, up to a maximum of 4 controllers (this is 16
  CD-ROM drives in total; hopefully enough for most users :-).

  See the file sbpcd for more information on this driver.

  If you recently bought a CD-ROM drive, don't assume that if it
  connects to a SoundBlaster card it should use this kernel driver. Most
  CD-ROM drives being sold by Creative Labs are now EIDE/ATAPI drives.


  4.3.2.  Sonycdu535 Driver



         Principal author: Ken Pizzini (ken@halcyon.com)
    Multi-session support: no
   Multiple drive support: no
  Loadable module support: yes
     Reading audio frames: no
             Auto-probing: no
              Device file: /dev/sonycd535, major 24
       Configuration file: sonycd535.h
     Kernel config option: Sony CDU535 CDROM support?
       Documentation file: sonycd535



  This driver accepts a kernel command line of the form:



       sonycd535=<io-address>



  where <io-address> is the base address of the controller (e.g. 0x320).
  Alternatively you can set the address in the file sonycd535.h and
  compile it in.

  The device file can be created using:



       # mknod /dev/sonycd535 b 24 0



  Some Linux distributions use /dev/sonycd for this device.  Older
  versions of the driver used major device number 21; make sure your
  device file is correct.

  This driver was previously distributed as a patch but is now part of
  the standard kernel. See the file sonycd535 for more information on
  this driver.


  4.3.3.  Cdu31a Driver



         Principal author: Corey Minyard (minyard@-rch.cirr.com)
    Multi-session support: yes
   Multiple drive support: no
  Loadable module support: yes
     Reading audio frames: yes
             Auto-probing: no
              Device file: /dev/cdu31a, major 15
       Configuration file: cdu31a.h
     Kernel config option: Sony CDU31A/CDU33A CDROM support?
       Documentation file: cdu31a



  This driver accepts a kernel command line of the form:



  cdu31a=<io-address>,<interrupt>,PAS



  The first number is the I/O base address of the card (e.g. 0x340). The
  second is the interrupt number to use (0 means to use polled i/o). The
  optional third parameter should be "PAS" if the drive is connected to
  a Pro-Audio Spectrum 16 sound card, otherwise left blank.

  If the driver is loaded as a module, it uses a slightly different
  format. When loading the driver using the modprobe or insmod command,
  the parameters take the form:



       cdu31a_port=<io-address> cdu31a_irq=<interrupt>



  The base io-address is required while the interrupt number is
  optional.

  The device file can be created using:



       # mknod /dev/cdu31a b 15 0



  See the file cdu31a for more information on this driver.

  Also see the web page put together by Jeffrey Oxenreider
  (zureal@infinet.com) that covers a lot of common problems with these
  drives. It can be found at
  <http://lemures.shinma.symix.com/~zureal/cdu31a.html>.


  4.3.4.  Aztcd Driver



         Principal author: Werner Zimmermann (zimmerma@rz.fht-esslingen.de)
    Multi-session support: yes
   Multiple drive support: no
  Loadable module support: yes
     Reading audio frames: no
             Auto-probing: no
              Device file: /dev/aztcd0, major 29
       Configuration file: aztcd.h
     Kernel config option: Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support?
       Documentation file: aztcd



  This driver accepts a kernel command line of the form:



       aztcd=<io-address>



  where the parameter is the I/O base address of the card (e.g. 0x340).

  The device file can be created using:



       # mknod /dev/aztcd0 b 29 0



  Note that this driver is for the CDA268-01A only. Other models,
  including the CDA268-03I and CDA269-031SE are not proprietary and
  should use the IDECD (ATAPI) kernel driver.

  See the file aztcd for more information on this driver.


  4.3.5.  Gscd Driver



         Principal author: Oliver Raupach (raupach@nwfs1.rz.fh-hannover.de)
    Multi-session support: no
   Multiple drive support: no
  Loadable module support: yes
     Reading audio frames: no
             Auto-probing: no
              Device file: /dev/gscd0, major 16
       Configuration file: gscd.h
     Kernel config option: Goldstar R420 CDROM support?
       Documentation file: gscd



  This driver accepts a kernel command line of the form:



       gscd=<io-address>



  specifying the I/O base address of the card (e.g. 0x340).

  The device file can be created using:



       # mknod /dev/gscd0 b 16 0



  See the file gscd and the world-wide web site <http://linux.rz.fh-
  hannover.de/~raupach/> for more information on this driver.


  4.3.6.  Mcd Driver



         Principal author: Martin  (martin@bdsi.com)
      Multi-session support: no
   Multiple drive support: no
  Loadable module support: yes
     Reading audio frames: no
             Auto-probing: no
              Device file: /dev/mcd, major 23
       Configuration file: mcd.h
     Kernel config option: Standard Mitsumi CDROM support?
       Documentation file: mcd



  This is the older driver for Mitsumi drivers that has been available
  for some time. You might want to try the newer mcdx driver, which has
  some new features but is possibly less stable.

  This driver accepts a kernel command line of the form:



       mcd=<io-address>,<irq>



  specifying the I/O base address of the card (e.g. 0x340) and the IRQ
  request number used.

  The device file can be created using:



       # mknod /dev/mcd b 23 0



  See the file mcd for more information on this driver.


  4.3.7.  Mcdx Driver



         Principal author: Heiko Schlittermann
    Multi-session support: yes
   Multiple drive support: yes
  Loadable module support: yes
     Reading audio frames: no (not supported by hardware)
             Auto-probing: no
              Device file: /dev/mcdx0, major 20
       Configuration file: mcdx.h
     Kernel config option: Experimental Mitsumi support?
       Documentation file: mcdx



  This is a newer driver for Mitsumi drivers. The older and possibly
  more stable mcd driver is still available.

  This driver accepts a kernel command line of the form:



  mcdx=<io-address>,<irq>



  specifying the I/O base address of the card (e.g. 0x340) and the IRQ
  request number used.

  The device file can be created using:



       # mknod /dev/mcdx0 b 20 0



  If you recently bought a Mitsumi CD-ROM drive, don't assume that it
  should use this kernel driver. New Mitsumi drives are now EIDE/ATAPI
  compatible and should use the idecd kernel driver instead.

  See the file mcdx for more information on this driver.


  4.3.8.  Cm206 Driver



         Principal author: David A. van Leeuwen (david@tm.tno.)
    Multi-session support: yes
   Multiple drive support: no
  Loadable module support: yes
     Reading audio frames: no
             Auto-probing: yes
              Device file: /dev/cm206cd, major 32
       Configuration file: cm206.h
     Kernel config option: Philips/LMS CM206 CDROM support?
       Documentation file: cm206



  The driver accepts a kernel command line of the form:



       cm206=<io-address>,<interrupt>



  where the first number is the I/O base address of the card (e.g.
  0x340). The second is the interrupt channel.

  The device file can be created using:



       # mknod /dev/cm206cd b 32 0



  See the file cm206 for more information on this driver.



  4.3.9.  Optcd Driver



         Principal author: Leo Spiekman (spiekman@dutette.et.tudelft.nl)
    Multi-session support: yes
   Multiple drive support: no
  Loadable module support: yes
     Reading audio frames: no
             Auto-probing: no
              Device file: /dev/optcd0, major 17
       Configuration file: optcd.h
     Kernel config option: Experimental Optics Storage ... CDROM support?
       Documentation file: optcd



  The driver accepts a kernel command line of the form



       optcd=<io-address>



  to specify the I/O base address of the card (e.g. 0x340).

  The device file can be created using:



       # mknod /dev/optcd0 b 17 0



  See the file optcd for more information on this driver.


  4.3.10.  Sjcd Driver



         Principal author: Vadim V. Model (vadim@rbrf.msk.su)
    Multi-session support: no
   Multiple drive support: no
  Loadable module support: yes
     Reading audio frames: no
             Auto-probing: no
              Device file: /dev/sjcd, major 18
       Configuration file: sjcd.h
     Kernel config option: Experimental Sanyo H94A CDROM support?
       Documentation file: sjcd



  The driver accepts a kernel command line of the form:



       sjcd=<io-address>,<interrupt>,<dma>



  indicating the base address, interrupt, and DMA channel to be used
  (e.g. sjcd=0x340,10,5).

  The device file can be created using:



       # mknod /dev/sjcd b 18 0



  See the file sjcd for more information on this driver.


  4.3.11.  Paride Driver



         Principal author: Grant R. Guenther (grant@torque.net)
    Multi-session support: no
   Multiple drive support: yes
  Loadable module support: yes
     Reading audio frames: no
             Auto-probing: yes
              Device file: /dev/pcd0, major 46
       Configuration file: bpcd.h
     Kernel config option: Parallel port IDE device support?
       Documentation file: paride.txt



  This is the driver for various types of storage devices that attach to
  a parallel port. Normally the driver will auto-detect the parallel
  port device. The documentation describes parameters that can be used
  to specify the device parameters if auto-detection does not work.

  The device file for the first drive can be created using:



       # mknod /dev/pcd0 b 46 0



  See the file /usr/src/linux/Documentation/paride.xt for more
  information on this driver. Note that this replaces the bpcd driver
  that was present in older kernels.


  4.3.12.  SCSI Driver



         Principal author: David Giller
    Multi-session support: yes (depending on drive)
   Multiple drive support: yes
  Loadable module support: yes
     Reading audio frames: no
             Auto-probing: yes
              Device file: /dev/scd0, major 11
       Configuration file: cdrom.h
     Kernel config option: SCSI CDROM support?
       Documentation file: scsi.txt

  There are kernel command line option specific to each type of SCSI
  controller. See the SCSI HOWTO for more information.

  Multiple drives are supported (up to the limit of the maximum number
  of devices on the SCSI bus). Create device files with major number 11
  and minor numbers starting at zero:



       # mknod /dev/scd0 b 11 0
       # mknod /dev/scd1 b 11 1



  While the kernel driver itself does not support reading digital audio
  frames, some SCSI drives have the capability and will work with the
  cdda2wav program (which uses the generic SCSI kernel interface).

  Also see the discussion of the IDE SCSI emulation driver earlier in
  this document.


  4.3.13.  IDECD Driver



         Principal author: Scott Snyder (snyder@fnald0.fnal.gov)
    Multi-session support: yes
   Multiple drive support: yes
  Loadable module support: no
     Reading audio frames: yes (on supported drives)
             Auto-probing: yes
              Device file: /dev/hd{a,b,c,d},  major 22
       Configuration file: cdrom.h
     Kernel config option: Include support for IDE/ATAPI CDROMs?
       Documentation file: ide-cd



  This is the driver for ATAPI CD-ROMS. The driver accepts a kernel
  command line of the form



       hdx=cyls,heads,sects,wpcom,irq
         or
       hdx=cdrom



  where hdx can be any of {hda,hdb,hdc,hdd}, or simply hd, for the
  "next" drive in sequence. Only the first three parameters are required
  (cyls,heads,sects). For example hdc=1050,32,64 hdd=cdrom.

  Getting the IDE driver to recognize your CD-ROM drive can be tricky,
  especially if you have more than 2 devices or more than one IDE
  controller. Usually all that is required is to pass the right command
  line options from LILO. The file
  /usr/src/linux/Documentation/cdrom/ide-cd explains how to do this.
  Read it carefully.

  Recent Linux kernels have better support for multiple IDE devices. If
  you have problems with an older kernel, upgrading may help.

  Some IDE controllers have hardware problems which the kernel driver
  can work around. You may need to pass additional parameters to the
  driver to enable this. See the documentation for details.


  4.4.  Booting the Linux Kernel


  You can now reboot with the new kernel. Watch for a message such as
  the following indicating that the CD-ROM has been found by the device
  driver (the message will vary depending on the drive type):



       hdd: NEC CD-ROM DRIVE:282, ATAPI CDROM drive



  If the bootup messages scroll by too quickly to read, you should be
  able to retrieve them using dmesg or tail /var/log/messages.

  If the drive is not found, then a problem has occurred, See the
  section on troubleshooting.


  4.5.  Mounting, Unmounting, and Ejecting Devices


  To mount a CD-ROM, insert a disc in the drive, and run the mount
  command as root (this assumes you created a symbolic link to your
  device file as recommended above and that an empty directory
  /mnt/cdrom exists):



       # mount -t iso9660 -r /dev/cdrom /mnt/cdrom



  The CD can now be accessed under the directory /mnt/cdrom.

  There are other options to the mount command that you may wish to use;
  see the mount(8) man page for details.

  You can add an entry to /etc/fstab to automatically mount a CD-ROM
  when Linux boots or to specify parameters to use when it is mounted;
  see the fstab(5) man page.

  Note that to play audio CDs you should not try to mount them.

  To unmount a CD-ROM, use the umount command as root:



       # umount /mnt/cdrom



  The disc can only be unmounted if no processes are currently accessing
  the drive (including having their default directory set to the mounted
  drive). You can then eject the disc. Most drives have an eject button;
  there is also a standalone eject program that allows ejecting CD-ROMs
  under software control.
  Note that you should not eject a disc while it is mounted (this may or
  may not be possible depending on the type of drive). Some CD-ROM
  drivers can automatically eject a CD-ROM when it is unmounted and
  insert the CD tray when a disc is mounted (you can turn this feature
  off when compiling the kernel or by using a software command).

  Its possible that after playing an audio CD you may not be able to
  mount a CD-ROM. You need to send a CD audio "stop" command (using a CD
  player program) before trying the mount. This problem only appears to
  occur with the SBPCD driver.

  Recent kernels support a kernel-based automounter which provides
  transparent mounting of removable media including CD-ROM. You can find
  the tools needed to use it at
  <ftp://ftp.kernel.org/pub/linux/daemons/autofs/>.


  4.6.  Troubleshooting


  If you still encounter problems after following the instructions in
  the HOWTO, here are some things to check. The checks are listed in
  increasing order of complexity. If a check fails, solve the problem
  before moving to the next stage.


  4.6.1.  Step 1: Make sure you are really running the kernel you com-
  piled


  You can check the date stamp on the kernel to see if you are running
  the one that you compiled with CD-ROM support. You can do this with
  the uname command:



       % uname -a
       Linux fizzbin 2.2.4 #1 Tue Mar 232 11:23:21 EST 1999 i586 unknown



  or by displaying the file /proc/version:



       % cat /proc/version
       Linux version 2.2.4 (root@fizzbin) (gcc version 2.7.2.3) #1 Tue Mar 23 11:23:21 EST 1999



  If the date stamp doesn't match when you compiled the kernel, then you
  are running an old kernel. Did you remember to reboot? If you use
  LILO, did you re-install it (typically by running /sbin/lilo)? If
  booting from floppy, did you create a new boot floppy and use it when
  booting?


  4.6.2.  Step 2: Make sure the proper kernel drivers are compiled in


  You can see what drivers are compiled in by looking at /proc/devices:



  % cat /proc/devices
  Character devices:
   1 mem
   2 pty
   3 ttyp
   4 ttyS
   5 cua
   7 vcs

  Block devices:
   3 ide0
  22 ide1



  First look for your CD-ROM device driver. These are all block devices,
  in this case we can see that the idecd driver with major number 22 was
  present.

  Also make sure that ISO-9660 filesystem support was compiled in, by
  looking at /proc/filesystems:



       % cat /proc/filesystems
               ext2
       nodev   proc
       nodev   devpts
               vfat
               iso9660



  You can also see what i/o port addresses are being used by a driver
  with the file /proc/ioports:



       howto % cat /proc/ioports
        ...
       0230-0233 : sbpcd
        ...



  If any of the drivers you thought you compiled in are not displayed,
  then something went wrong with the kernel configuration or build.
  Start the installation process again, beginning with configuration and
  building of the kernel.


  4.6.3.  Step 3: Did the kernel detect your drive during booting?


  Make sure that the CD-ROM device was detected when the kernel booted.
  You should have seen a message on bootup. If the messages scrolled off
  the screen, you can usually recall them using the dmesg command:



       % dmesg


  or



       % tail /var/log/messages



  If your drive was not found then something is wrong. Make sure it is
  powered on and all cables are connected. If your drive has hardware
  jumpers for addressing, check that they are set correctly (e.g. drive
  0 if you have only one drive). ATAPI CD-ROMS must be jumpered as
  "single" or "master", and not "slave" when only one IDE device is
  attached to an interface. If the drive works under DOS then you can be
  reasonably confident that the hardware is working.

  Many kernel drivers using auto-probing, but some do not, and in any
  case the probing is not always reliable. Use the kernel command line
  option listed for your kernel driver type. You may want to try several
  different values if you are not sure of the i/o address or other
  parameters. LILO can be (and usually is) configured to allow you to
  enter the parameters manually when booting.

  Another possibility is that you used the wrong kernel driver for your
  CD-ROM driver. Some documentation may refer to proprietary interfaces
  as IDE, leading some to mistakenly believe they are ATAPI drives.

  Another possibility is that your drive (or interface card) is one of
  the "compatible" type that requires initialization by the DOS driver.
  Try booting DOS and loading the vendor supplied DOS device driver.
  Then soft boot Linux using Control-Alt-Delete.

  If your drive is not listed in this document, it is possible that
  there are no drivers for it available under Linux. You can check with
  some of the references listed at the end of this document for
  assistance.


  4.6.4.  Step 4: Can you read data from the drive?


  Try reading from the CD-ROM drive. Typing the following command should
  cause the drive activity light (if present) to come on and no errors
  should be reported. Use whatever device file is appropriate for your
  drive and make sure a CD-ROM is inserted; use Control-C to exit.



       # dd if=/dev/cdrom of=/dev/null bs=2048
       ^C
       124+0 records in
       124+0 records out



  If this works, then the kernel is communicating with the drive and you
  can move on to step 5.

  If not, then a possible cause is the device file. Make sure than the
  device file in the /dev directory has the correct major and minor
  numbers as listed previously for your drive type. Check that the
  permissions on the device file allow reading and writing.


  A remote possibility is a hardware problem. Try testing the drive
  under another operating system, if possible, to determine if this
  could be the case.


  4.6.5.  Step 5: Can you mount the drive?


  If you can read from the drive but cannot mount it, first verify that
  you compiled in ISO-9660 file system support by reading
  /proc/filesystems, as described previously.

  Make sure you are mounting the drive with the "-t iso9660" and "-r"
  options and that a known good ISO-9660 CD-ROM (not Audio CD) is
  inserted in the drive. You normally must mount drives as user root.

  Make sure that the mount point exists and is an empty directory.

  If you are automatically mounting the CD-ROM on bootup, make sure that
  you have correct entries in the /etc/fstab file.

  If you are running the syslog daemon, there may be error messages from
  the kernel that you are not seeing. Try using the "dmesg" command:



       % dmesg
       SBPCD: sbpcd_open: no disk in drive



  There may also be errors logged to files in /var/log, depending on how
  your system is configured.


  4.6.6.  Debugging Audio Problems


  If the drive works with CD-ROMs, but not for playing audio CDs, here
  are some possible solutions.

  You need an application program to play audio CDs. Some applications
  may be broken or may not be compatible with your drive. Try other
  applications and/or try recompiling them yourself. A good place to
  look for software is
  <ftp://metalab.unc.edu/pub/Linux/apps/sound/cdrom/>.

  A few of the CD-ROM drivers do not support playing Audio CDs. Check
  the documentation file or source code to see if that is the case.

  Check if the audio can be played through the headphone jack. If so,
  then the problem is likely related to your sound card. Use a mixer
  program to set the input device and volume levels. Make sure you have
  installed an audio cable from the CD-ROM drive to the sound card. Make
  sure that the kernel sound card driver is installed and working (see
  the Sound HOWTO).


  4.6.7.  When All Else Fails


  If you still have problems, here are some final suggestions for things
  to try:


  o  carefully re-read this HOWTO document

  o  read the references listed at the end of this document, especially
     the relevant kernel source files

  o  post a question to one of the comp.os.linux or other usenet
     newsgroups

  o  send a question to the Linux mailing list

  o  try using the latest Linux kernel

  o  contact your computer dealer

  o  contact the CD-ROM manufacturer

  o  send mail to the maintainer of the relevant kernel driver (look in
     the file /usr/src/linux/MAINTAINERS)

  o  send mail to me

  o  fire up emacs and type Esc-x doctor :-)


  5.  Applications


  This section briefly lists a few of the many applications related to
  CD-ROM that are available under Linux. Check the Linux Software Map
  for the latest versions and archive sites.


  5.1.  Audio CD Players


  Several programs are available for playing audio CDs, either through a
  headphone jack or an attached sound card.


     Workman
        a graphical player running under X11 and supporting a CD
        database and many other features

     WorkBone
        an interactive text-mode player

     xcdplayer
        a simple X11 based player

     cdplayer
        a very simple command line based player

     Xmcd
        an X11/Motif based player

     xmitsumi
        another X11 based player for Mitsumi drives

     xplaycd
        another X11 based player, bundled with sound mixer and VU meter
        programs

     cdtool
        command line tools for playing audio CDs


  Some of these programs are coded to use a specific device file for the
  CD-ROM (e.g. /dev/cdrom). You may be able to pass the correct device
  name as a parameter, or you can create a symbolic link in the /dev
  directory. If sending the CD output to a sound card, you may wish to
  use a mixer program to set volume settings or select the CD-ROM input
  for recording.


  5.2.  PhotoCD


  PhotoCDs use an ISO-9660 file system containing image files in a
  proprietary format. Not all CD-ROM drives support reading PhotoCDs.

  The hpcdtoppm program by Hadmut Danisch converts PhotoCD files to the
  portable pixmap format. It can be obtained from
  <ftp://ftp.gwdg.de/pub/linux/hpcdtoppm> or as part of the PBM
  (portable bit map) utilities, available on many archive sites (look
  for "pbm" or "netpbm").

  The photocd program by Gerd Knorr (kraxel@cs.tu-berlin.de) can convert
  PhotoCD images into Targa or Windows and OS/2 bitmap files.

  The same author has written the program xpcd, an X11-based program for
  handling PhotoCD images. You can select the images with a mouse,
  preview the image in a small window, and load the image with any of
  the five possible resolutions. You can also mark a part of the Image
  and load only the selected part. Look for these packages at
  <ftp://ftp.cs.tu-berlin.de/pub/linux/Local/misc/>.

  The ImageMagick image file manipulation program also supports PhotoCD
  files. It is available from
  <ftp://ftp.x.org/contrib/applications/ImageMagick/>.


  5.3.  Mkisofs


  Eric Youngdale's mkisofs package allows creating an ISO-9660 file
  system on a hard disk partition. This can then be used to assist in
  creating and testing CD-ROM file systems before mastering discs.

  The tools for actually writing data to writable CD-ROM drives tend to
  be vendor specific. They also require writing the data with no
  interruptions, so a multitasking operating system like Linux is not
  particularly well suited.


  5.4.  ISO-9660 Utilities


  These are some utilities for verifying the format of ISO-9660
  formatted discs; you may find them useful for testing suspect CDs. The
  package can be found at
  <ftp://ftp.cdrom.com/pub/unixfreeware/archive/>. They were written by
  Bill Siegmund and Rich Morin.


  6.  Answers to Frequently Asked Questions



  6.1.  How can a non-root user mount and unmount discs?



  Most mount commands support the user option. If you make an entry such
  as the following in /etc/fstab:



       /dev/sbpcd  /mnt/cdrom   iso9660     user,noauto,ro



  then an ordinary user will be allowed to mount and unmount the drive
  using these commands:



       % mount /mnt/cdrom
       % umount /mnt/cdrom



  By default the disc will be mounted with some options that help
  enforce security (e.g. programs cannot executed, device files are
  ignored). If this is too restrictive you can use additional options
  (e.g. the "exec" option will enable execution or programs). See the
  mount(8) man page for details.

  Another method is to get the usermount package which allows non-root
  users to mount and unmount removable devices such as floppies and CD-
  ROMs, but restricts access to other devices (such as hard disk
  partitions). It is available on major archive sites.

  The archive site ftp.cdrom.com has the source file mount.c which
  allows mounting an unmounting of CD-ROMs (only) by normal users. It
  runs as a setuid executable.


  6.2.  Why do I get device is busy when unmounting a CD-ROM?


  The disc cannot be unmounted if any processes are accessing the drive,
  including having their default directory set to the mounted
  filesystem. If you cannot identify the processes using the disc, you
  can use the fuser command, as shown in the following example.



       % umount /cdrom
       umount: /dev/hdd: device is busy
       % fuser -v /cdrom
                            USER       PID ACCESS COMMAND
       /mnt/cdrom           tranter    133 ..c..  bash



  On some systems you may need to be root when running the fuser command
  in order to see the processes of other users.


  6.3.  How do I export a CD-ROM to other hosts over NFS?


  You need to add an entry to the /etc/exports file. Users on other
  machines will then be able to mount the device. See the exports(5) man
  page for details.
  6.4.  Can I boot Linux from a CD-ROM?


  When initially installing Linux the most common method is to use a
  boot floppy. Some distributions allow booting a Linux kernel on CD
  directly from DOS.

  With the right CD-ROM, ROM BIOS, and ATAPI CD-ROM drive it is possible
  to boot directly from CD. The latest version of mkisofs supports
  creating such disks using the El Torito standard for bootable CDs.


  6.5.  How can I read digital data from audio CDs?


  Heiko Eissfeldt (heiko@colossus.escape.de) and Olaf Kindel have
  written a utility that reads audio data and saves it as .wav format
  sound files. The package is called cdda2wav.tar.gz and can be found on
  metalab.unc.edu.

  Another utility to extract digital audio is cdparanoia available from
  <http://www.mit.edu/afs/sipb/user/xiphmont/cdparanoia>.

  Because CD-ROM drives are changing very quickly, it is difficult to
  list which models support reading digital data. You best bet is to get
  the latest cdda2wav or cdparanoia package and read the documentation.

  For more information on this subject, see the web site
  http://www.tardis.ed.ac.uk/~psyche/cdda/ and the alt.cd-rom FAQ listed
  in the references section.


  6.6.  Why doesn't the find command work properly?


  On ISO-9660 formatted discs without the Rock Ridge Extensions, you
  need to add the -noleaf option to the find command.  See the find(1)
  man page for details.

  (In my experience virtually all recent Linux CDs use the Rock Ridge
  extensions, so this problem should occur very rarely.)


  6.7.  Does Linux support any recordable CD-ROM drives?


  The X-CD-Roast package for Linux is a graphical front-end for using CD
  writers. The package can be found at metalab.unc.edu in
  /pub/Linux/utils/disk-management/xcdroast-0.95.tar.gz

  Also see the Linux CD-Writing HOWTO document, found at
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/CD-Writing-HOWTO> or
  <http://metalab.unc.edu/LDP/HOWTO/CD-Writing-HOWTO.html>.


  6.8.  Why do I get mount: Read-only file system when mounting a CD-
  ROM?


  CD-ROM is a read-only media. With some early kernels you could mount a
  CD-ROM for read/write; attempts to write data to the CD would simple
  be ignored. As of kernel version 1.1.33 this was corrected so that CD-
  ROMs must be mounted read only (e.g. using the -r option to mount).



  6.9.  Why does the disc tray open when I shut down the system?


  The sbpcd driver supports automatically ejecting the CD when it is
  unmounted. In some older kernel versions this was the default
  behaviour. If you shut down the system, a mounted CD will be
  unmounted, causing it to eject.

  This feature is for convenience when changing discs. If the tray is
  open when you mount or read a CD, it will also automatically be
  closed.

  I found that this caused problems with a few programs (e.g. cdplay and
  workbone). As of the 1.1.60 kernel you can control this feature under
  software control. A sample program is included in the sbpcd
  documentation file (or use the eject program).  You can also control
  the default behaviour by editing the kernel source file sbpcd.h.


  6.10.  I have a "special" CD that can't be mounted


  The "special" CD is likely an XA disc (like all Photo CDs or "one-
  offs" created using CD-R drives). Most of the Linux kernel CD-ROM
  drivers do not support XA discs, although you may be able to find a
  patch to add support on one of the archive sites.

  The sbpcd driver does support XA. If you are using this driver you can
  determine if the disc is XA using the following procedure: go into the
  file sbpcd.c and enable the display of the "Table of Contents"
  (DBG_TOC). Build and install the new kernel and boot from it. During
  each mount the TOC info will be written (either to the console or to a
  log file). If the first displayed value in the TOC header line is
  "20", then it is an XA disc. That byte is "00" with normal disks. If
  the TOC display shows different tracks, that is also a sign that it is
  an XA disc.

  (thanks to Eberhard Moenkeberg for the above information)

  Other possibilities for unreadable CDs are:


  1. The disc doesn't use an ISO-9660 file system (e.g. some use SunOS
     or HFS)

  2. It is an audio CD

  3. The CD is damaged or defective

  4. You put it in the drive upside down :-)


  6.11.  Do multi-platter CD-ROM drives work with Linux?


  Several users have reported success with SCSI multi-disc CD-ROM
  changers. You probably need to enable the "Probe all LUNs on each SCSI
  device" kernel configuration option (this is not necessary if your CD
  changer is already known to the SCSI-driver. Have a look at
  /usr/src/linux/drivers/scsi.c).

  At least one user also had to increase a SCSI timeout value in the
  kernel driver. A symptom of this is an error message like "wrong fs
  type, bad option, bad superblock on /dev/sr5, or too many mounted file
  systems" when trying to mount a CD for the first time, but a second
  mount immediately afterwards succeeds. To increase the timeout
  increase the value of IOCTL_TIMEOUT at the beginning of
  /usr/src/linux/drivers/scsi/sr_ioctl.c and recompile the kernel. A
  value of 10000 instead of the default 3000 is reported to work with a
  NEC Multispin 4Xc.

  It might be necessary to create additional block special files, so
  that all LUNs can be accessed. A device file is needed for every LUN.
  So for a 7 disc changer /dev/sr0 to /dev/sr6 are needed (more if you
  have additional SCSI CD-ROM drives). To create the block special file
  execute mknod /dev/sr? b 11 ? as root with ? being the required
  number.

  The Nakamichi MBR-7 7 disc changer, NEC Multispin 4Xc and Pioneer 12
  disc changer have been reported to work.

  EIDE/ATAPI multi-disc changers are also available. The kernel has
  support for some drives using the CDROM_SELECT_DISC ioctl function.
  The IDE-CD kernel driver documentation file includes source code for a
  program to select changer slots, or you can use various utilities such
  as the eject program described earlier.


  6.12.  I get "/cdrom: Permission denied" errors


  Some CDs have root directory file permissions that only allow user
  root to read them. This is an error on the part of the CD-ROM vendor
  and is a real inconvenience. A more common occurrence is for certain
  files or directories not to be world readable. Some people have
  patched their kernels to work around the problem.

  Also see the related question on hidden files later in this document.


  6.13.  How do I interpret IDE CD kernel error messages?


  What does it mean when I get a kernel message from the IDE CD-ROM
  driver like "hdxx: code: xx key: x asc: xx ascq: x"?

  This is an status/error message from the IDE CD-ROM drive. By default
  the IDECD driver prints out the raw information instead of wasting
  kernel space with error messages. You can change the default to
  display the actual error messages by going into
  /usr/src/linux/drivers/block/ide-cd.c, changing the value of
  VERBOSE_IDE_CD_ERRORS to 1, and recompiling the kernel.


  6.14.  How can I tell what speed CD-ROM I have?


  Here's one way. This command measures how long is takes to read 1500K
  of data from CD:



       % time -p dd if=/dev/cdrom of=/dev/null bs=1k count=1500
       1500+0 records in
       1500+0 records out
       real 5.24
       user 0.03
       sys 5.07



  The transfer rate of single speed drives is 150 kilobytes per second,
  which should take about 10 seconds. At double speed it would take five
  seconds, quad speed would take 2.5, etc.

  The "real" time above is probably the best number to look at -- in
  this case it indicates a double speed drive. You can increase the
  amount of data transferred to get a more accurate value (in case you
  were wondering, the data does not get cached). You should probably run
  the command a few times and take the average.

  I've also written a small C program that measures and reports CD-ROM
  data transfer rate; I can send it to you on request.


  6.15.  My CD-ROM stopped working after Linux was installed


  The usual symptom is that the boot disk used to initially install
  Linux recognized your CD-ROM drive, but after Linux was installed on
  the hard drive or floppy and rebooted it no longer recognizes the CD-
  ROM.

  The most common reason for this problem is that with some Linux
  distributions the kernel that is installed on your hard drive (or
  floppy) is not necessarily the same one that was on your boot disk.
  You selected a boot disk that matched your CD-ROM hardware, while the
  kernel you installed is a "generic" kernel that is lacking CD-ROM
  support. You can verify this by following the troubleshooting
  guidelines discussed previously in this document (e.g. start by
  checking /proc/devices).

  The solution is to recompile the kernel, ensuring that the drivers for
  your CD-ROM drive and any others that are needed (e.g. SCSI
  controller, ISO-9660 file system) are included. See the Kernel HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html> if you don't know
  how to do this.

  If you passed any command line options to the boot disk (e.g.
  "hdc=cdrom") you need to add these to your boot program configuration
  file (typically /etc/lilo.conf).


  6.16.  There are "hidden" files on a CD which I can't read


  Some CDs have files with the "hidden" bit set on them. Normally these
  files are not visible. If you mount the CD with the "unhide" option
  then the files should be accessible (this doesn't seem to be
  documented anywhere).


  6.17.  Where is the CD-ROM API documented?


  If you want to write your own application, such as an audio CD player
  program, you will need to understand the application programming
  interface (API) provided by Linux.

  Originally the CD-ROM kernel drivers used their own ioctl() functions
  to support features specific to each drive. Header files such as
  /usr/include/linux/sbpcd.h describe these. Because many of the drivers
  were based on other drivers, the interfaces, while not identical, have
  a lot in common.

  More recently there has been an initiative headed by David van Leeuwen
  (david@tm.tno.nl) to standardize the API for CD-ROM drives, putting
  common code in one place and ensuring that all drivers exhibit the
  same behaviour.  This is documented in the file
  /usr/src/linux/Documentation/cdrom/cdrom-standard.tex.  Several kernel
  drivers support this. As of the 2.0 kernel all CD-ROM drivers conform
  to this API.

  My book, Linux Multimedia Guide, goes into quite a bit of detail on
  how to program CD-ROM drives, especially for audio functions. See the
  end of the References section.


  6.18.  Why don't I see long filenames on this Windows CD-ROM?


  If you have a CD-ROM which has long filenames under Windows but not
  under Linux, it may be formatted using Microsoft's proprietary Joliet
  filesystem. See the next question for a solution.


  6.19.  Is Microsoft's Joliet filesystem supported?


  Microsoft has created an extension to the ISO CD-ROM format called
  Joliet. It allows for long filenames encoded using the 16-bit UNICODE
  format.

  Starting with version 2.0.34 the Linux kernel has support for the
  Microsoft Joliet file system extensions. You need to enable support
  for it in the kernel.

  If you want to display filenames with native language characters from
  Joliet CD-ROMs correctly on the screen, you need to enable support in
  the kernel for the appropriate NLS ISO8859 character sets.


  6.20.  Does Linux support "enhanced" CDs?


  Some audio CDs are "enhanced" with additional data. Typically you will
  find that these CDs have the usual audio CD tracks as well as a data
  track which can be mounted as an ISO-9660 file system.

  An enhanced CD I examined had Microsoft Windows and Apple Macintosh
  applications on it (which won't run directly under Linux of course,
  although I had partial success running the Windows application under
  the WINE Windows emulator). There were some GIF images which could be
  viewed using a standard viewer such as xv and some animations in Apple
  QuickTime format which could be viewed using the xanim program. It was
  a multisession disk which some very old CD-ROM drives do not support
  reading. On the disc was a readme.txt file containing an Enhanced CD
  FAQ.


  6.21.  Does Linux support DVD-ROM?


  SCSI and ATAPI compliant DVD-ROM drives should work under Linux for
  reading discs formatted with an ISO-9660 file system. In other words
  they will work as a (possibly large) CD-ROM drive.

  Many DVD-ROM discs use the UDF file system. At the time of writing
  this was still in development. Kernel patches were available from
  <http://trylinux.com/projects/udf/>.

  However, I am not aware of any support for playing MPEG-2 encoded DVD
  videos either in software or in conjunction with DVD decoder hardware.
  Apparently the standard document for the encoding format can only be
  obtained at a high cost and under a non-disclosure agreement. Another
  issue is that MPEG decoding typically uses proprietary hardware for
  which the vendor may not be willing to release programming
  information. These factors may preclude any freely available DVD video
  software being developed for Linux.


  6.22.  Does Linux support CD-RW?


  SCSI and ATAPI compliant CD-RW drives should work under Linux for
  discs formatted with an ISO-9660 file system. This includes the
  ability to write to the disc.

  Many CD-RW discs use the UDF file system. At the time of writing this
  was still in development. Kernel patches were available from
  <http://trylinux.com/projects/udf/>.


  7.  References


  I have already mentioned the documentation files, typically installed
  in /usr/src/linux/Documentation/cdrom. These can be a gold mine of
  useful information.

  The following Usenet FAQs are posted periodically to news.answers and
  archived at Internet FTP sites such as  <ftp://rtfm.mit.edu/>:


  o  alt.cd-rom FAQ

  o  comp.periphs.scsi FAQ

  o  Enhanced IDE/Fast-ATA/ATA-2 FAQ

  Several other Linux HOWTOs have useful information relevant to CD-ROM:


  o  SCSI HOWTO <http://metalab.unc.edu/LDP/HOWTO/unmaintained/SCSI-
     HOWTO.html>

  o  Hardware Compatibility HOWTO
     <http://metalab.unc.edu/LDP/HOWTO/Hardware-HOWTO.html>

  o  Sound HOWTO <http://metalab.unc.edu/LDP/HOWTO/Sound-HOWTO.html>

  o  Kernel HOWTO <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>

  o  Distribution HOWTO <http://metalab.unc.edu/LDP/HOWTO/Distribution-
     HOWTO.html>

  o  CD Writing HOWTO <http://metalab.unc.edu/LDP/HOWTO/CD-Writing.html>

  At least a dozen companies sell Linux distributions on CD-ROM; most of
  them are listed in the Distribution HOWTO.

  The following Usenet news groups cover CD-ROM related topics:


  o  comp.publish.cdrom.hardware

  o  comp.publish.cdrom.multimedia


  o  comp.publish.cdrom.software

  o  comp.sys.ibm.pc.hardware.cd-rom

  o  alt.cd-rom

  o  alt.cd-rom.reviews

  The comp.os.linux newsgroups are also good sources of Linux specific
  information.

  There is a large archive of CD-ROM information and software at
  <ftp://ftp.cdrom.com/pub/cdrom/>.

  A FAQ document on IDE and ATA devices can be found at
  <ftp://rtfm.mit.edu/pub/usenet/news.answers/pc-hardware-faq/enhanced-
  IDE/> and at  <http://www.seagate.com/techsuppt/faq/faqlist.html>.

  Western Digital, the company that started the IDE protocol, has
  information available on the IDE protocol available on their FTP site
  at  <ftp://fission.dt.wdc.com/pub/standards/atapi>.

  A web site dedicated to multimedia can be found at
  <http://viswiz.gmd.de/MultimediaInfo/>. Creative Labs has a web site
  at  <http://www.creaf.com/>.

  The Linux Software Map (LSM) is an invaluable reference for locating
  Linux software. The LSM can be found on various anonymous FTP sites,
  including  <ftp://metalab.unc.edu/pub/Linux/docs/LSM/> (formerly known
  as sunsite). There are also various web sites that maintain databases
  of Linux applications. One such site is  <http://www.freshmeat.net>.

  The Linux mailing list has a number of "channels" dedicated to
  different topics. To find out how to join, send a mail message with
  the word "help" as the message body to majordomo@vger.rutgers.edu

  The Linux Documentation Project has produced several books on Linux,
  including Linux Installation and Getting Started. These are freely
  available by anonymous FTP from major Linux archive sites or can be
  purchased in hardcopy format.

  Finally, a shameless plug: If you want to learn a lot more about
  multimedia under Linux (especially CD-ROM and sound card applications
  and programming), check out my book Linux Multimedia Guide, ISBN
  1-56592-219-0, published by O'Reilly and Associates. As well as the
  original English version, French and Japanese translations are now in
  print. For details, call 800-998-9938 in North America or check the
  web page  <http://www.ora.com/catalog/multilinux/noframes.html> or my
  home page  <http://www.pobox.com/~tranter/>.



Unless otherwise stated, Linux HOWTO documents are copyrighted by their
respective authors. Linux HOWTO documents may be reproduced and distributed 
in whole or in part, in any medium physical or electronic, as long as
this copyright notice is retained on all copies. Commercial redistribution 
is allowed and encouraged; however, the author would like to be notified of 
any such distributions. 

All translations, derivative works, or aggregate works incorporating 
any Linux HOWTO documents must be covered under this copyright notice. 
That is, you may not produce a derivative work from a HOWTO and impose
additional restrictions on its distribution. Exceptions to these rules
may be granted under certain conditions; please contact the Linux HOWTO
coordinator at the address given below.

In short, we wish to promote dissemination of this information through as
many channels as possible. However, we do wish to retain copyright on the
HOWTO documents, and would like to be notified of any plans to redistribute
the HOWTOs. 

If you have questions, please contact Tim Bynum, the Linux HOWTO 
coordinator, at tjbynum@metalab.unc.edu via email.

  CVS-RCS- HOW-TO document for Linux (Source Code Control Sys
  tem)
  Al Dev (Alavoor Vasudevan)        alavoor@yahoo.com
  v11.0, 10 June 2000

  This document is a "practical guide" to very quickly setup CVS/RCS
  source code control system. This document also has custom shell
  scripts which are wrappers on top of CVS. These scripts provide a easy
  user interface for CVS. The information in this document applies to
  Linux and as well as to all other flavors of Unix liks Solaris, HPUX,
  AIX, SCO, Sinix, BSD, SCO, etc..
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Which one is for me? CVS or RCS

  3. Setting up CVS

     3.1 Environment variables
     3.2 Migrate RCS to CVS

  4. Shell Scripts

     4.1 sget
     4.2 sedit
     4.3 scommit
     4.4 supdate
     4.5 sunlock
     4.6 slist
     4.7 sinfo
     4.8 slog
     4.9 sdif
     4.10 sadd
     4.11 sdelete
     4.12 sfreeze
     4.13 saddtree

  5. CVS Documentation

  6. Emacs Editor

  7. Problem Reporting System

  8. Other Formats of this Document

  9. Copyright and License



  ______________________________________________________________________

  1.  Introduction

  Source code control system is a MUST to manage the changes occuring to
  software project during development. Developers need a complete
  history of changes to backtrack to previous versions in case of any
  problems.  Since source code is the most vital component of any
  software project and software development takes a huge amount of time
  and money, it is very important to spend some time in safe-guarding
  the source code by using source code control systems like CVS and RCS.


  CVS (Concurrent Version Control System) is a powerful tool which
  allows concurrent development of software by multiple users. It uses
  RCS underneath and has application layer interface as a wrapper on top
  RCS.

  CVS can record the history of your files (usually, but not always,
  source code). CVS only stores the differences between versions,
  instead of every version of every file you've ever created. CVS also
  keeps a log of who, when and why changes occurred, among other
  aspects.

  CVS is very helpful for managing releases and controlling the
  concurrent editing of source files among multiple authors. Instead of
  providing version control for a collection of files in a single
  directory, CVS provides version control for a hierarchical collection
  of directories consisting of revision controlled files.

  These directories and files can then be combined together to form a
  software release.

  CVS can be used for storing "C", "C++", Java, Perl, HTML and other
  files.

  2.  Which one is for me? CVS or RCS

  CVS actually uses RCS underneath. CVS is a lot more powerful tool and
  can control a complete source code tree.  It is very strongly
  recommended that you use CVS, because you can greatly customize CVS
  with scripting languages like PERL, korn and bash shells.  See the
  sample korn shell scripts at ``''.

  Advantages of CVS

    CVS is de-centralised a user checks out files/directories from the
     repostitory and has his own separate stable source directory tree.

    CVS can "STAMP" releases of entire project source tree.

    CVS can enable concurrent editing of files.

    CVS can be greatly customized to enable strong locking of files or
     enable concurrent editing of files using shell scripts or PERL.

  Disadvantages of CVS

    Needs a little more administration than RCS

    Very highly sophisticated and complex system. It is the "State of
     the Art" technology.

    Has a large number of commands and command options, hence a steeper
     learning curve for beginners. The shell scripts at ``'' can ease
     usage.

  Advantages of RCS

    RCS is very simple to setup, with less administrative work.

    RCS is used in a centralized area where everyone works.

    RCS is useful for simple systems.

    Very strong locking of files - concurrency eliminated.

  Downside of RCS

    Concurrent development by multiple developers is not possible due
     to file locking and being limited to a single working directory.
     Because of the single working directory limitation changes to files
     by multiple developers can cause failure of the 'make' command.

    Cannot stamp releases of an entire software project.

  This document also has shell scripts which provide simple commands to
  check-out, check-in, commit files.  See shell scripts at ``''

  For RCS see the RCS mini-howto on the linux cdrom -

  ______________________________________________________________________
  cd /mnt/cdrom/Redhat/RPMS
  ls -l howto-6.0-*.noarch.rpm
  rpm -qpl howto-6* | grep -i rcs
  ______________________________________________________________________


  or visit  <http://www.LinuxDoc.org/HOWTO/mini/RCS.html>

  3.  Setting up CVS

  First you need to install the CVS package, on Redhat linux use

  ______________________________________________________________________
  cd /mnt/cdrom/Redhat/RPMS
  rpm -i rcs*.rpm
  rpm -i cvs*.rpm
  To see the list of files installed do -
  rpm -qpl cvs*.rpm | less
  ______________________________________________________________________


  and browse output using j,k, CTRL+f, CTRL+D, CTRL+B, CTRL+U or using
  arrow keys, page up/down keys.  See 'man less'.

  On other flavors of unix, you may need to download the RCS and CVS tar
  balls and follow README, INSTALL files to setup CVS.  Visit
  <http://www.cyclic.com> and  <http://www.loria.fr/~molli/cvs-
  index.html>

  3.1.  Environment variables

  The following environment variables need to be setup in /etc/profile -
  default values required for all users.  If not set in /etc/profile,
  than you should add these to your local profile file  /.bash_profile.

  ______________________________________________________________________
  export EDITOR=/bin/vi
  export CVSROOT=/home/cvsroot
  export CVSREAD=yes
  ______________________________________________________________________



  Create a directory to store the source code repository and give read,
  write access to unix group/user.

  ______________________________________________________________________
  export CVSROOT=/home/cvsroot
  mkdir $CVSROOT
  chmod o-rwx $CVSROOT
  chmod ug+rwx $CVSROOT
  ______________________________________________________________________

  To initialize the CVS and to put in source code files do -

  ______________________________________________________________________
  cvs init

  # Change directory is a must
  cd $HOME/my_source_code_dir

  # Must give vendor tag and revision tag
  cvs import my_source_code_dir V1_0 R1_0
  ______________________________________________________________________



  3.2.  Migrate RCS to CVS

  To migrate the existing RCS files to CVS, use the following script.
  Make sure that you installed korn shell package pdksh*.rpm from Linux
  contrib cdrom.

  NOTE : Korn shell /bin/ksh is obtained by installing pdksh*.rpm from
  Linux contrib cdrom



  ______________________________________________________________________
  #!/bin/ksh

  #############################################################
  # Program to Migrate the existing source code in RCS to CVS
  #
  # Needs the korn shell RPM package  pdksh*.rpm from Linux
  # contrib cdrom
  #############################################################

  #
  # rcs2cvs - convert source tree from RCS to CVS
  #

  # project to convert
  PROJECT='project'

  # current RCS root
  RCSROOT="$HOME/rcs"

  if cd "$RCSROOT/$PROJECT"
  then
          cd "$RCSROOT"
  else
          echo >&2 "`basename "$0"`: can't change to RCS directory '$RCSROOT/$PROJECT'."
          exit 1
  fi

  # current CVS root
  CVSROOT="$HOME/cvs"

  # create new CVS directory for project 'project'
  if mkdir "$CVSROOT/$PROJECT"
  then
          :
  else
          echo >&2 "`basename "$0"`: can't create CVS directory '$CVSROOT/$PROJECT'."
          exit 2
  fi

  # create CVS project tree from RCS tree
  find "$PROJECT" -type d -name RCS -print |
  while read RCS
  do
          CVS="`dirname "$RCS"`"
          (if cd "$RCS"
          then
  #               if find . -type f -name '*,v' -print | cpio -pdmv "$CVSROOT/$CVS"
                  if find . -type f -print | cpio -pdmv "$CVSROOT/$CVS"
                  then
                          :
                  else
                          echo >&2 "`basename "$0"`: can't convert RCS subdirectory '$RCSROOT/$RCS' to CVS subdirectory '$CVSROOT/$CVS'."
                  fi
          else
                  echo >&2 "`basename "$0"`: can't change to RCS subdirectory '$RCSROOT/$RCS'."
          fi)
  done
  ______________________________________________________________________


  Now the RCS is migrated to CVS as 'project'. You can start using the
  CVS commands on module 'project'.



  4.  Shell Scripts

  The following are wrappers around the basic CVS commands. The scripts
  are written for Korn shell since korn shell is always available on all
  flavors of unixes, but you can translate to bash or PERL if needed.
  You can customize these scrips to your taste. They are basically CVS
  commands but features are added to make it site specific. For example,
  sedit script provides locking so that users will know some-one is
  editing the file. Of course users can directly use the CVS commands to
  by-pass these scripts. These scripts demonstrate how CVS can be
  customized to a great extent.

  Copy these scripts to /usr/local/bin and this should be in the user's
  PATH environment.

  1. sget [-r revision_number] <file/directory name> To get a file or
     entire directory from CVS in READ ONLY mode.  Click ``''

  2. sedit [-r revision_number] <filename> To edit a file in order to
     make changes to code. This will lock the file so that nobody else
     can checkout. Ofcourse you can change the script to your
     requirement - make no locking, warning message or very strong
     locking.  Click ``''

  3. scommit [-r revision_number] <filename> To commit the changes you
     made to filename or entire directory. Upload your changes to CVS
     Click ``''

  4. supdate  <filename/directory> To update a filename or to update a
     entire directory by getting the latest files from CVS Click ``''

  5. sunlock [-r revision_number] <filename> To unlock the file got by
     sedit. Will release the lock.  Click ``''

  6. slist To see the list of files currently being edited by you.  Does
     'ls -l | grep | ...' command.  Click ``''

  7. sinfo <filename/directory> To get the information of
     changes/revisions to a file Click ``''

  8. slog <filename> To get the history of changes/revisions to a file
     from CVS Click ``''

  9. sdif <filename>

     sdif -r rev1 -r rev2 <filename> To get the diff of your file with
     CVS.  Click ``''

     NOTE: sdif has only one 'f' because there is already another unix
     command called 'sdiff'


  10.
     sadd <filename> To add a new file to CVS repository Click ``''

  11.
     sdelete  <filename> To delete a file from CVS repository Click ``''

  12.
     sfreeze  <revision name> <directory name> To freeze the code, that
     is make release of entire source tree.  Click ``''

  13.
     saddtree <revision name> <directory name> To add a directory tree
     to CVS.  Click ``''

     For example :

     ___________________________________________________________________
             cd $HOME;
             sfreeze REVISION_1_0  srctree
     ___________________________________________________________________


  This will freeze code with tag REVISION_1_0  so that you can later
  checkout the entire tree by using with revision name



                       ******************************************************



  4.1.  sget

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh

  # CVS program sget
  # Program to check out the file from CVS read-only

  cmdname=`basename $0`

  Usage()
  {
          print "\nUsage: $cmdname [-r revision_number/symbolic_tag_name] <file/directory name> "
          print "The options -r are optional "
          print "For example - "
          print "       $cmdname -r 1.1 foo.cpp"
          print "       $cmdname foo.cpp "
          print "       $cmdname some_directory "
          print "Extract by symbolic revision tag like - "
          print "       $cmdname -r REVISION_1 some_directory "
          print " "
          exit
  }

  # Command getopt will not supported in next major release.
  # Use getopts instead.
  while getopts r: ii
  do
          case $ii in
          r) FLAG1=$ii; OARG1="$OPTARG";;
          ?) Usage; exit 2;;
          esac
  done
  shift ` expr $OPTIND - 1 `

  #echo FLAG1 = $FLAG1 , OARG1 = $OARG1

  if [ $# -lt 1 ]; then
          Usage
  fi

  bkextn=sget_bak

  hme=` echo $HOME | cut -f1 -d' '  `
  if [ "$hme" = "" ]; then
          print "\nError: \$HOME is not set!!\n"
          exit
  fi

  # Check if file already exists....
  if [ -f $1 ]; then
          user_perms=" "
          group_perms=" "
          other_perms=" "
          user_perms=`ls -l $1 | awk '{print $1 }' | cut -b3-3 `
          group_perms=`ls -l $1 | awk '{print $1 }' | cut -b6-6 `
          other_perms=`ls -l $1 | awk '{print $1 }' | cut -b9-9 `
          if [ "$user_perms" = "w" -o "$group_perms" = "w"  \
                  -o "$other_perms" = "w" ]; then
                  print "\nError: The file is writable. Aborting $cmdname ......"
                  print "       You should either backup, scommit or delete the file and"
                  print "       try $cmdname again\n"
                  exit
          fi
  fi

  cur_dir=`pwd`
  #echo $cur_dir
  len=${#hme}
  len=$(($len + 2))
  #echo $len

  subdir=` echo $cur_dir | cut -b $len-2000 `
  #echo $subdir

  if [ "$subdir" = "" ]; then
          fdname=$1
  else
          fdname=$subdir"/"$1
  fi

  # Move the file
  touch $1 2>/dev/null
  \mv -f $1 $1.$bkextn

  # Create subshell
  (
  cd $hme
  #echo $fdname

  # Use -A option to clear all sticky flags
  if [ "$FLAG1" = "" ]; then
          cvs -r checkout -A $fdname
  else
          cvs -r checkout -A -$FLAG1 $OARG1 $fdname
  fi
  )
  #pwd

  if [ -f $1 ]; then
          print "\nREAD-ONLY copy of the file $fdname obtained."
          print "Done $cmdname"
          #print "\nTip (Usage): $cmdname <file/directory name> \n"
  fi
  ______________________________________________________________________



  4.2.  sedit

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh
  # CVS program sedit
  # Program to check out the file from CVS read/write mode with locking

  cmdname=`basename $0`

  Usage()
  {
  #       print "\nUsage: $cmdname [-r revision_number] [-F] <filename>"
  #       print "The options -r, -F are optional "
  #       print "The option -F is FORCE edit even if file is "
  #       print "locked by another developer"

          print "\nUsage: $cmdname [-r revision_number] <filename>"
          print "The options -r are optional "

          print "For example - "
          print "       $cmdname -r 1.1 foo.cpp"
          print "       $cmdname foo.cpp "
  #       print "       $cmdname -F foo.cpp "
          print " "
  }

  # Command getopt will not supported in next major release.
  # Use getopts instead.
  #while getopts r:F ii
  while getopts r: ii
  do
          case $ii in
          r) FLAG1=$ii; OARG1="$OPTARG";;
  #       F) FLAG2=$ii; OARG2="$OPTARG";;
          ?) Usage; exit 2;;
          esac
  done
  shift ` expr $OPTIND - 1 `

  #echo FLAG1 = $FLAG1 , OARG1 = $OARG1

  if [ $# -lt 1 ]; then
          Usage
          exit
  fi

  hme=` echo $HOME | cut -f1 -d' '  `
  if [ "$hme" = "" ]; then
          print "\nError: \$HOME is not set!!\n"
          exit
  fi

  bkextn=sedit_bak

  cur_dir=`pwd`
  #echo $cur_dir

  len=${#hme}
  len=$(($len + 2))
  #echo $len

  subdir=` echo $cur_dir | cut -b $len-2000 `
  #echo $subdir

  if [ "$subdir" = "" ]; then
          fdname=$1
  else
          fdname=$subdir"/"$1
  fi

  # If file is already checked out by another developer....
  cvs_root=` echo $CVSROOT | cut -f1 -d' '  `
  if [ "$cvs_root" = "" ]; then
          print "\nError: \$CVSROOT is not set!!\n"
          exit
  fi
  cldir=$CVSROOT/$subdir/Locks
  mkdir $cldir 2>/dev/null
  rcsfile=$CVSROOT/$subdir/$1,v
  #echo $rcsfile

  if [ ! -e $rcsfile ]; then
          print "\nError: File $1 does not exist in CVS repository!!\n"
          exit
  fi

  # Get the tip revision number of the file....
  # Use tmpfile as the arg cannot be set inside the sub-shell
  tmpfile=$hme/sedit-lock.tmp
  \rm -f $tmpfile 2>/dev/null
  if [ "$FLAG1" = "" ]; then
          (
          cd $hme
          cvs log $fdname | head -6 | grep head: | awk '{print $2}' > $tmpfile
          )
          OARG1=`cat $tmpfile`
          \rm -f $tmpfile 2>/dev/null
  fi

  lockfile=$cldir/$1-$OARG1
  #if [ -e $lockfile -a "$FLAG2" = "" ]; then
  if [ -e $lockfile ]; then
          print "\nError: File $1 Revision $OARG1 already locked by another developer !!"
          aa=` ls -l $lockfile | awk '{print "Locking developers unix login name is = " $3}' `
          print $aa
          print "That developer should do scommit OR sunlock to release the lock"
          print " "
  #       print "You can also use -F option to force edit the file even if"
  #       print "the file is locked by another developer. But you must talk to"
  #       print "other developer to work concurrently on this file."
  #       print "For example - this option is useful if you work on a seperate"
  #       print "C++ function in the file which does not interfere with other"
  #       print "developer."
  #       print " "
          exit
  fi

  # Get read-only copy now....
  if [ ! -e $1 ]; then
          (
          cd $hme
          cvs -r checkout $fdname 1>/dev/null
          )
  fi

  # Check if file already exists....
  if [ -f $1 ]; then
          user_perms=" "
          group_perms=" "
          other_perms=" "
          user_perms=`ls -l $1 | awk '{print $1 }' | cut -b3-3 `
          group_perms=`ls -l $1 | awk '{print $1 }' | cut -b6-6 `
          other_perms=`ls -l $1 | awk '{print $1 }' | cut -b9-9 `
          if [ "$user_perms" = "w" -o "$group_perms" = "w"  \
                  -o "$other_perms" = "w" ]; then
                  print "\nError: The file is writable. Aborting $cmdname ......"
                  print "       You must backup, scommit or delete file and"
                  print "       try $cmdname again\n"
                  exit
          fi
          #print "\nNote: The file $1 is read-only."
          #print "Hence I am moving it to $1.$bkextn ....\n"
          \mv -f $1 $1.$bkextn
          chmod 444 $1.$bkextn
  elif [ -d $1 ]; then
          print "\nError: $1 is a directory and NOT a file. Aborting $cmdname ....\n"
          exit
  fi

  # Create subshell
  print "\nNow getting the file $1 from CVS repository ...\n"
  (
  cd $hme
  #echo $fdname
  # Use -A option to clear the sticky tag and to get
  # the HEAD revision version
  if [ "$FLAG1" = "" ]; then
          cvs -w checkout -A $fdname
  else
          cvs -w checkout -A -$FLAG1 $OARG1 $fdname
  fi
  )

  if [ -e $1 ]; then
          touch $lockfile
  fi

  #pwd

  print "\nDone $cmdname"
  #print "\nTip (Usage): $cmdname <filename> \n"
  ______________________________________________________________________



  4.3.  scommit

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh
  # CVS program scommit
  # Program to commit the changes and check in the file into CVS

  cmdname=`basename $0`

  Usage()
  {
          print "\nUsage: $cmdname [-r revision_number] <filename>"
          print "The options -r are optional "
          print "For example - "
          print "       $cmdname -r 1.1 foo.cpp"
          print "       $cmdname foo.cpp "
          print " "
  }

  # Command getopt will not supported in next major release.
  # Use getopts instead.
  while getopts r: ii
  do
          case $ii in
          r) FLAG1=$ii; OARG1="$OPTARG";;
          ?) Usage; exit 2;;
          esac
  done
  shift ` expr $OPTIND - 1 `

  #echo FLAG1 = $FLAG1 , OARG1 = $OARG1

  if [ $# -lt 1 ]; then
          Usage
          exit 2
  fi

  if [ -d $1 ]; then
          Usage
          exit 2
  fi

  hme=` echo $HOME | cut -f1 -d' '  `
  if [ "$hme" = "" ]; then
          print "\nError: \$HOME is not set!!\n"
          exit
  fi

  # Find sub-directory
  cur_dir=`pwd`
  #echo $cur_dir
  len=${#hme}
  len=$(($len + 2))
  #echo $len
  subdir=` echo $cur_dir | cut -b $len-2000 `
  #echo $subdir
  if [ "$subdir" = "" ]; then
          fdname=$1
  else
          fdname=$subdir"/"$1
  fi

  # If file is already checked out by another user....
  cvs_root=` echo $CVSROOT | cut -f1 -d' '  `
  if [ "$cvs_root" = "" ]; then
          print "\nError: \$CVSROOT is not set!!\n"
          exit
  fi
  cldir=$CVSROOT/$subdir/Locks
  mkdir $cldir 2>/dev/null

  # Get the working revision number of the file....
  # Use tmpfile as the arg cannot be set inside the sub-shell
  tmpfile=$hme/sedit-lock.tmp
  \rm -f $tmpfile 2>/dev/null
  if [ "$FLAG1" = "" ]; then
          (
          cd $hme
          cvs status $fdname 2>/dev/null | grep "Working revision:" | awk '{print $3}' >$tmpfile
          )
          OARG1=`cat $tmpfile`
          \rm -f $tmpfile 2>/dev/null
  fi

  if [ "$OARG1" = "" ]; then
          print "The file $fdname is NEW, it is not in the CVS repository"
  else
          lockfile=$cldir/$1-$OARG1
          if [ -e $lockfile ]; then
                  # Check if this revision is owned by you...
                  aa=` ls -l $lockfile | awk '{print $3}' `
                  userid=`id | cut -d'(' -f2 | cut -d')' -f1 `
                  if [ "$aa" != "$userid" ]; then
                          print " "
                          print "The file $fdname is NOT locked by you!!"
                          print "It is locked by unix user name $aa and your login name is $userid"
  #                       print "If you are working concurrently with other developer"
  #                       print "and you used -F option with sedit."
                          print "You need to wait untill other developer does scommit"
                          print "or sunlock"
                          print "Aborting the $cmdname ...."
                          print " "
                          exit 2
                  fi
          else
                  if [ -f $CVSROOT/$subdir/$1,v ]; then
                          print "You did not lock the file $fdname with sedit!!"
                          print "Aborting the $cmdname ...."
                          exit 2
                  else
                          print "\nThe file $fdname does not exist in CVS repository yet!!"
                          print "You should have done sadd on $fdname ...."
                  fi
          fi
  fi

  if [ -d $1 ]; then
          Usage
          exit 2
          # Do not allow directory commits for now ...
          #cvs commit
  else
          cvs commit $1
          exit_status=$?
  fi

  if [ $exit_status -eq 0 ]; then
          print "\nDone $cmdname. $cmdname successful"
          #print "\nTip (Usage): $cmdname <filename/directory name>\n"
  fi
  ______________________________________________________________________



  4.4.  supdate

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh

  # CVS program supdate
  # Program to update the file from CVS read/write mode

  cmdname=`basename $0`

  if [ $# -lt 1 ]; then
          print "\nUsage: $cmdname <filename>"
          exit
  fi

  # Check if file already exists....
  if [ $# -gt 0 -a  -f $1 ]; then
          user_perms=" "
          group_perms=" "
          other_perms=" "
          user_perms=`ls -l $1 | awk '{print $1 }' | cut -b3-3 `
          group_perms=`ls -l $1 | awk '{print $1 }' | cut -b6-6 `
          other_perms=`ls -l $1 | awk '{print $1 }' | cut -b9-9 `
          if [ "$user_perms" = "w" -o "$group_perms" = "w"  \
                  -o "$other_perms" = "w" ]; then
                  while :
                  do
                          print "\n$cmdname will backup your working file "
                          print "$1 to $1.supdate_bak before doing any merges."
                          print "Are you sure you want the merge the changes from"
                          print -n "CVS repository to your working file ? <y/n> [n]: "
                          read ans
                          if [ "$ans" = "y" -o "$ans" = "Y" ]; then
                                  if [ -f $1.supdate_bak ]; then
                                          print "\nWarning : File $1.supdate_bak already exists!!"
                                          print "Please examine the file $1.supdate_bak and delete it"
                                          print "and than re-try this $cmdname "
                                          print "Aborting $cmdname ...."
                                          exit
                                  else
                                          cp $1 $1.supdate_bak
                                          break
                                  fi
                          elif [ "$ans" = "n" -o "$ans" = "N" -o "$ans" = "" -o "$ans" = " " ]; then
                                  exit
                          fi
                  done
          fi
  fi

  if [ -d $1 ]; then
          print "\nDirectory update is disabled as cvs update"
          print "merges the changes from repository to your working directory"
          print "So give the filename to update - as shown below: "
          print "       Usage: $cmdname <filename>"
          exit
  #       cvs update
  else
          cvs update $1
  fi

  print "\nDone $cmdname. $cmdname successful"
  #print "\nTip (Usage): $cmdname <filename/directory name>\n"
  ______________________________________________________________________



  4.5.  sunlock

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh
  # CVS program sunlock
  # Program to unlock the file to release the lock done by sedit

  cmdname=`basename $0`

  Usage()
  {
          print "\nUsage: $cmdname [-r revision_number] <filename>"
          print "       The options -r is optional "
          print "For example - "
          print "       $cmdname -r 1.1 foo.cpp"
          print "       $cmdname foo.cpp "
          print " "
  }

  # Command getopt will not supported in next major release.
  # Use getopts instead.
  while getopts r: ii
  do
          case $ii in
          r) FLAG1=$ii; OARG1="$OPTARG";;
          ?) Usage; exit 2;;
          esac
  done
  shift ` expr $OPTIND - 1 `

  if [ $# -lt 1 ]; then
          Usage
          exit
  fi

  hme=` echo $HOME | cut -f1 -d' '  `
  if [ "$hme" = "" ]; then
          print "\nError: \$HOME is not set!!\n"
          exit
  fi

  cur_dir=`pwd`
  #echo $cur_dir

  len=${#hme}
  len=$(($len + 2))
  #echo $len

  subdir=` echo $cur_dir | cut -b $len-2000 `
  #echo $subdir

  if [ "$subdir" = "" ]; then
          fdname=$1
  else
          fdname=$subdir"/"$1
  fi

  # If file is already checked out by another user....
  cvs_root=` echo $CVSROOT | cut -f1 -d' '  `
  if [ "$cvs_root" = "" ]; then
          print "\nError: \$CVSROOT is not set!!\n"
          exit
  fi
  cldir=$CVSROOT/$subdir/Locks
  rcsfile=$CVSROOT/$subdir/$1,v
  #echo $rcsfile

  if [ ! -e $rcsfile ]; then
          print "\nError: File $1 does not exist in CVS repository!!\n"
          exit
  fi

  # Get the tip revision number of the file....
  # Use tmpfile as the arg cannot be set inside the sub-shell
  tmpfile=$hme/sedit-lock.tmp
  \rm -f $tmpfile 2>/dev/null
  if [ "$FLAG1" = "" ]; then
          (
          cd $hme
          cvs log $fdname | head -6 | grep head: | awk '{print $2}' > $tmpfile
          )
          OARG1=`cat $tmpfile`
          \rm -f $tmpfile 2>/dev/null
  fi

  lockfile=$cldir/$1-$OARG1
  #echo lockfile is : $lockfile
  if [ ! -e $lockfile ]; then
          print "\nFile $1 revision $OARG1 is NOT locked by anyone"
          print " "
          exit
  fi

  ans=""
  while :
  do
          print "\n\n***************************************************"
          print "WARNING: $cmdname will release lock and enable other"
          print "         developers to edit the file. It is advisable"
          print "         to save your changes with scommit command"
          print "***************************************************"
          print -n "\nAre you sure you want to unlock the file <y/n>? [n]: "
          read ans
          if [ "$ans" = "" -o "$ans" = " " -o "$ans" = "n" -o "$ans" = "N" ]; then
                  print "\nAborting $cmdname ...."
                  exit
          fi
          if [ "$ans" = "y" -o "$ans" = "Y" ]; then
                  print "\n\n\n\n\n "
                  print "CAUTION: You may lose all the changes made to file!!"
                  print -n "Do you really want to unlock the file <y/n>? [n]: "
                  read ans
                  if [ "$ans" = "y" -o "$ans" = "Y" ]; then
                          break
                  else
                          exit
                  fi
          else
                  print "\n\nWrong entry. Try again..."
                  sleep 1
          fi
  done

  if [ -e $lockfile ]; then
          \rm -f $lockfile
          print "\nDone $cmdname"
  else
          print "\nFile $1 is NOT locked by anyone"
          print " "
  fi
  ______________________________________________________________________



  4.6.  slist

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh

  # CVS program slist
  # Program to list all edited source files from CVS

  #cmdname=`basename $0`

  #echo "no of params : " $#
  #echo "all args : " $@

  recurse_flag=""

  if [ "$1" = "" ]; then
          dir=.
          recurse_flag=""
  else
          dir=$@
          recurse_flag=" -prune "
  fi

  FOUT=slist_temporary_file.out

  \rm -f $FOUT

  find $dir  $recurse_flag -type f -exec ls -ltr {} \; \
  | grep -v "/CVS/" \
  | grep ^\-rw \
  | grep -v \\.o \
  | grep -v \\.log \
  | grep -v \\.out \
  | grep -v \\.pid \
  | awk '{ if ($NF != "tags") print $0 }' \
  | awk '{ if ($NF != "a.out") print $0 }' \
  | awk '{ if ($NF != "core") print $0 }' \
  | awk '{ print $NF }' > $FOUT

  aa=`cat $FOUT`
  \rm -f $FOUT

  for ii in $aa ; do
          ftype=" "
          ftype=`file $ii | awk '{print $2 }' `

          # find . -type f -exec file {} \;
          # 1)ELF 2)commands 3)[nt]roff, 4)c 5)English  6)executable
          # 7)ascii 8)current 9)empty
          # Binaries are ELF, lib.a are current
          #
          if [ "$ftype" = "ascii" -o "$ftype" = "commands" \
                  -o "$ftype" = "[nt]roff," -o "$ftype" = "c" -o "$ftype" = "data" \
                  -o "$ftype" = "English" -o "$ftype" = "executable" ]; then
                  pcfile=` echo $ii | cut -d'.' -f1`
                  pcfile=${pcfile}".pc"
                  if [ ! -f $pcfile ]; then
                          ls -l $ii
                  else
                          if [ "$ii" = "$pcfile" ]; then
                                  ls -l $ii
                          fi
                  fi
          fi
  done;

  #| grep -v ^\-rwx \

  #ls -l | grep ^\-rw | grep -v \\.o
  #ls -l | grep ^\-rw | grep -v \\.o | awk '{ if ($NF != "tags") print $0 }'
  #ls -l | grep ^\-rw | grep -v ^\-rwx | grep -v \\.o |  awk '{ if ($NF != "tags") print $0 }' | awk '{ if ($NF != "core") print $0 }'

  #print "\nDone $cmdname. $cmdname successful"
  #print "\nTip (Usage): $cmdname <filename>\n"
  ______________________________________________________________________



  4.7.  sinfo

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh

  # CVS program sinfo
  # Program to get the status of files in working directory

  cmdname=`basename $0`

  if [ $# -lt 1 ]; then
          print "\nUsage: $cmdname [file/directory name] "
          print "For example - "
          print "       $cmdname foo.cpp"
          print "       $cmdname some_directory "
          print " "
          exit
  fi

  hme=` echo $HOME | cut -f1 -d' '  `
  if [ "$hme" = "" ]; then
          print "\nError: \$HOME is not set!!\n"
          exit
  fi

  tmpfile=$hme/cvs_sinfo.tmp
  rm -f $tmpfile

  cur_dir=`pwd`
  #echo $cur_dir

  len=${#hme}
  len=$(($len + 2))
  #echo $len

  subdir=` echo $cur_dir | cut -b $len-2000 `
  #echo $subdir

  if [ "$subdir" = "" ]; then
          fdname=$1
  else
          fdname=$subdir"/"$1
  fi

  # Create subshell
  if [ -f $1 ]; then
          (
          cd $hme
          clear
          cvs status $fdname
          )
  elif [ -d $1 ]; then
          (
          cd $hme
          clear
          echo "  " >> $tmpfile
          echo "  ****************************************" >> $tmpfile
          echo "        Overall Status of Directory" >> $tmpfile
          echo "  ****************************************" >> $tmpfile
          cvs release $fdname 1>>$tmpfile 2>>$tmpfile << EOF
  Y
  EOF
          echo "\n   -------------------------------\n" >> $tmpfile

          aa=`cat $tmpfile | grep ^"M " | awk '{print $2}' `
          for ii in $aa
          do
                  jj="(cd $hme; cvs status $subdir/$ii );"
                  echo $jj | /bin/sh  \
                          | grep -v Sticky | awk '{if (NF != 0) print $0}' \
                          1>>$tmpfile 2>>$tmpfile
          done

          cat $tmpfile | grep -v ^? | grep -v "Are you sure you want to release" \
          | less
          rm -f $tmpfile
          )
  else
          print "\nArgument $1 if not a file or directory"
          exit
  fi
  ______________________________________________________________________



  4.8.  slog

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.


  ______________________________________________________________________
  #!/bin/ksh

  # CVS program slog
  # Program to list history of the file in CVS

  cmdname=`basename $0`

  if [ $# -lt 1 ]; then
          print "\nUsage: $cmdname <filename> \n"
          exit
  fi

  # Check if file does not exist....
  if [ ! -f $1 ]; then
          print "\nError: $1 is NOT a file. Aborting $cmdname ......"
          exit
  fi

  cvs log $1 | /usr/local/bin/less

  print "\nDone $cmdname. $cmdname successful"
  #print "\nTip (Usage): $cmdname <filename>\n"
  ______________________________________________________________________



  4.9.  sdif

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh

  # CVS program sdif
  # Program to see difference of the working file with CVS copy

  cmdname=`basename $0`

  Usage()
  {
          print "\nUsage: $cmdname <filename> "
          print "$cmdname -r<rev1> -r<rev2> <filename> \n"
          exit
  }
  FLAG1=""
  FLAG2=""
  OARG1=""
  OARG2=""
  # Command getopt will not supported in next major release.
  # Use getopts instead.
  while getopts r:r: ii
  do
          case $ii in
          r)
                  if [ "$FLAG1" = "" ]; then
                          FLAG1=$ii;
                          OARG1="$OPTARG"
                  else
                          FLAG2=$ii;
                          OARG2="$OPTARG"
                  fi
                  ;;
          ?) Usage; exit 2;;
          esac
  done
  shift ` expr $OPTIND - 1 `

  if [ "$FLAG2" = "" ]; then
          FLAG2=r
          OARG2=HEAD
  fi

  if [ "$FLAG1" = "" ]; then
          cvs diff -r HEAD $1 | less
  else
          cvs diff -$FLAG1 $OARG1 -$FLAG2 $OARG2 $1 | less
  fi
  ______________________________________________________________________



  4.10.  sadd

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh

  # test
  # CVS program sadd
  # Program to add the file to CVS

  cmdname=`basename $0`
  if [ $# -lt 1 ]; then
          print "\nUsage: $cmdname <filename/directory> \n"
          exit
  fi

  # Check if file exists ....
  if [ -f $1 ]; then
          cvs add $1
          exit
  fi

  if [ ! -d $1 ]; then
          print "\nArgument $1 is not a file and not a directory!"
          print "Usage: $cmdname <filename/directory> \n"
          exit
  fi

  # Argument is a directory name .....
  hme=` echo $HOME | cut -f1 -d' '  `
  if [ "$hme" = "" ]; then
          print "\nError: \$HOME is not set!!\n"
          exit
  fi

  cur_dir=`pwd`
  len=${#hme}
  len=$(($len + 2))
  subdir=` echo $cur_dir | cut -b $len-2000 `

  if [ "$subdir" = "" ]; then
          if [ -d $CVSROOT/$1 ]; then
                  print "\nDirectory $1 already exists in CVSROOT"
                  exit
          else
                  # You are adding at root directory $CVSROOT
                  if [ "$2" = "" -o "$3" = "" ]; then
                          print "\nUsage: $cmdname <directory> <vendor tag> <release tag>"
                          print "For example - "
                          print "       $cmdname foo_directory V_1_0 R_1_0"
                          exit
                  else
                          (
                          cd $1;
                          cvs import $1 $2 $3
                          )
                  fi
          fi
  else
          # If current directory exists in CVS...
          if [ -d $CVSROOT/$subdir ]; then
                  if [ -d $CVSROOT/$subdir/$1 ]; then
                          print "\nDirectory $1 already in CVS repository!"
                  else
                          cvs add $1
                  fi
          else
                  print "\nSub-directory $subdir does not exist in CVS"
                  print "You need to first add $subdir to CVS"
                  exit
          fi
  fi
  ______________________________________________________________________



  4.11.  sdelete

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.


  ______________________________________________________________________
  #!/bin/ksh

  # CVS program sdelete
  # Program to delete the file from CVS

  cmdname=`basename $0`

  if [ $# -lt 1 ]; then
          print "\nUsage: $cmdname <filename> \n"
          exit
  fi

  # Check if file does not exist....
  if [ ! -f $1 ]; then
          # Try to get the file from CVS
          sget $1
          if [ ! -f $1 ]; then
                  print "\nError: $1 does NOT exist in CVS repository. Aborting $cmdname ......"
                  exit
          fi
  fi

  bkextn=cvs_sdelete_safety_backup
  \mv -f $1 $1.$bkextn

  cvs remove $1

  print "\nsdelete command removes the file from CVS repository"
  print "and archives the file in CVS Attic directory. In case"
  print "you need this file in future than contact your CVS administrator"
  print " "

  print "\nDone $cmdname. $cmdname successful"
  #print "\nTip (Usage): $cmdname <filename>\n"
  \mv -f $1.$bkextn $1
  ______________________________________________________________________



  4.12.  sfreeze

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh

  # CVS program sfreeze
  # Program to freeze and cut out the release of source tree from CVS

  cmdname=`basename $0`

  Usage()
  {
          print "\nUsage: $cmdname symbolic_tag <directory name> "

          print "\nFor example :- "
          print "   cd \$HOME"
          print "   $cmdname  REVISION_1   mesa"
          print "To see the list of revisons do -"
          print "slog <filename> and see the symbolic name and do -"
          print "cvs history -T"

          print "\nTo create a branch off-shoot from main trunk, use"
          print "the -b and -r options which makes the tag a branch tag. This is"
          print "useful for creating a patch to previously released software"
          print "For example :- "
          print "   cd \$HOME"
          print "   cvs rtag -b -r REVISION_1   REVISION_1_1   mesa"
          print " "

  #       print "\nTag info is located at \$CVSROOT/CVSROOT/taginfo,v"
  #       print "You can do - cd $HOME; sget CVSROOT"
  #       print "to see this file"
          exit
  }

  # Command getopt will not supported in next major release.
  # Use getopts instead.
  #while getopts r: ii
  #do
  #       case $ii in
  #       r) FLAG1=$ii; OARG1="$OPTARG";;
  #       ?) Usage; exit 2;;
  #       esac
  #done
  #shift ` expr $OPTIND - 1 `

  #echo FLAG1 = $FLAG1 , OARG1 = $OARG1

  if [ $# -lt 2 ]; then
          Usage
  fi

  if [ ! -d $2 ]; then
          print "\nError: Second argument $2 is not a directory!"
          print "       Aborting $cmdname...."
          print " "
          exit
  fi

  # cvs rtag symbolic_tag <directory name>
  cvs rtag $1 $2

  print "\nDone $cmdname. $cmdname successful"
  ______________________________________________________________________



  4.13.  saddtree

  NOTE : Korn shell /bin/ksh is got by installing pdksh*.rpm from Linux
  contrib cdrom

  Save this file as text file and chmod a+rx on it.



  ______________________________________________________________________
  #!/bin/ksh

  ################################################################
  # Sample Program to checkin a directory tree (let's say SAMP) into CVS
  # Note that if SAMP directory is not in CVS than you would use sadd
  # command and -
  #       cd SAMP; cvs import SAMP V_1_0 R_1_0
  # After running this program do -
  #       cd $HOME/foo/SAMP
  #       cvs import foo/SAMP V1_0 Rev_1_0
  ################################################################

  hme=` echo $HOME | cut -f1 -d' '  `
  if [ "$hme" = "" ]; then
          print "\nError: \$HOME is not set!!\n"
          exit
  fi
  sampdir=$hme/foo/SAMP

  check_out_files()
  {
          # Now check out the files
          tmp2f=$hme/tmp2.baksamp.sh

          cd $hme
          \rm -rf foo/SAMP
          cvs -w checkout foo/SAMP
          cd $hme/foo
          find SAMP -type f -print > $tmp2f

          cd $hme
          for ii in `cat $tmp2f`
          do
                  iidir=`dirname $ii`
                  iifile=`basename $ii`
                  if [ "$iifile" = "Root" -o "$iifile" = "Repository" -o "$iifile" = "Entries" ]; then
                          continue
                  fi
                  jjdir=` echo $iidir | cut  -d'/' -f2-1000 `

                  cp $hme/foo/SAMP.tobe/$jjdir/$iifile  $hme/foo/$iidir/$iifile
                  echo "cp $hme/foo/SAMP.tobe/$jjdir/$iifile  $hme/foo/$iidir/$iifile "

                  cvs add  foo/$iidir/$iifile
          done

          print
          print "================================================"
          print " Now run cvs commit foo/SAMP"
          print " After commit. Do - "
          print "       cd foo; rm -rf SAMP and "
          print " get fresh copy, sget SAMP"
          print " Verify with slog filename.samp to see new revision"
          print "================================================"
          print
  }

  check_out_files
  ______________________________________________________________________



  5.  CVS Documentation

  At unix prompt type -

  1. cvs --help

  2. cvs --help-options

  3. cvs --help-commands

  4. cvs -H checkout

  5. cvs -H commit

  6. man cvs

  7. man tkcvs

  8. Visit  <http://www.cyclic.com>

  9. Visit  <http://www.loria.fr/~molli/cvs-index.html>

  The tkcvs <http://www.tkcvs.org> is the Tcl/Tk GUI interface to CVS.
  It also has online help.

    cd $HOME/src/foo.cpp

    tkcvs

    Click on foo.cpp

    Click on 'Revision Log Icon' which is located next to 'spectacle'
     icon

    This will display the branch TREE in the window. Now RIGHT Mouse
     button click on the text '1.3' and LEFT Mouse button click on text
     '1.1'. Than click on "Diff" button. This will display 2 pane-
     window!!

    Click on "Next" button to step thru more diffs.  Click on "Center"
     to center the text.

  There is also a Windows 95 client for CVS, and is called WinCVS
  <http://www.wincvs.org> WinCVS can be used along with Samba -
  <http://www.samba.org>

  The essential command are -

    cvs checkout <filename >

    cvs update <filename>

    cvs add <file, ..>

    cvs remove <file, ..>

    cvs commit <file>

    cvs status <filename>

    cvs log <filename>

    cvs diff -r1.4 -r1.5 <filename> This gives diff between version 1.4
     and 1.5 on filename.


  6.  Emacs Editor

  Emacs is a powerful editor and it supports CVS/RCS - especially for
  revision merging and comparing. Emacs main site is at
  <http://www.emacs.org>.

  7.  Problem Reporting System

  Along with CVS, you may want to use Project Tracking system or Problem
  Reporting system. Every software project needs a Problem Reporting
  System where in bugs are tracked and assigned to various developers.
  Visit the site  <http://www.stonekeep.com> for Project tracking
  system.

  8.  Other Formats of this Document

  This document is published in 11 different formats namely - DVI,
  Postscript, Latex, Adobe Acrobat PDF, LyX, GNU-info, HTML, RTF(Rich
  Text Format), Plain-text, Unix man pages and SGML.

    You can get this HOWTO document as a single file tar ball in HTML,
     DVI, Postscript or SGML formats from -
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/>

    Plain text format is in:
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO>

    Translations to other languages like French, German, Spanish,
     Chinese, Japanese are in
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> Any help from you to
     translate to other languages is welcome.

     The document is written using a tool called "SGML-Tools" which can
     be got from - <http://www.sgmltools.org> Compiling the source you
     will get the following commands like

    sgml2html CVS-HOWTO.sgml     (to generate html file)

    sgml2rtf  CVS-HOWTO.sgml     (to generate RTF file)

    sgml2latex CVS-HOWTO.sgml    (to generate latex file)

  LaTeX documents may be converted into PDF files simply by producing a
  Postscript output using sgml2latex ( and dvips) and running the output
  through the Acrobat distill ( <http://www.adobe.com>) command as
  follows:

  ______________________________________________________________________
  bash$ man sgml2latex
  bash$ sgml2latex filename.sgml
  bash$ man dvips
  bash$ dvips -o filename.ps filename.dvi
  bash$ distill filename.ps
  bash$ man ghostscript
  bash$ man ps2pdf
  bash$ ps2pdf input.ps output.pdf
  bash$ acroread output.pdf &
  ______________________________________________________________________


  Or you can use Ghostscript command ps2pdf.  ps2pdf is a work-alike for
  nearly all the functionality of Adobe's Acrobat Distiller product: it
  converts PostScript files to Portable Document Format (PDF) files.
  ps2pdf is implemented as a very small command script (batch file) that
  invokes Ghostscript, selecting a special "output device" called
  pdfwrite. In order to use ps2pdf, the pdfwrite device must be included
  in the makefile when Ghostscript was compiled; see the documentation
  on building Ghostscript for details.

  This howto document is located at -

    <http://sunsite.unc.edu/LDP/HOWTO/CVS-HOWTO.html>

  Also you can find this document at the following mirrors sites -

    <http://www.caldera.com/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.WGS.com/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.cc.gatech.edu/linux/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.redhat.com/linux-info/ldp/HOWTO/CVS-HOWTO.html>

    Other mirror sites near you (network-address-wise) can be found at
     <http://sunsite.unc.edu/LDP/hmirrors.html> select a site and go to
     directory /LDP/HOWTO/CVS-HOWTO.html


  In order to view the document in dvi format, use the xdvi program. The
  xdvi program is located in tetex-xdvi*.rpm package in Redhat Linux
  which can be located through ControlPanel | Applications | Publishing
  | TeX menu buttons.  To read dvi document give the command -


               xdvi -geometry 80x90 howto.dvi
               man xdvi



  And resize the window with mouse.  To navigate use Arrow keys, Page
  Up, Page Down keys, also you can use 'f', 'd', 'u', 'c', 'l', 'r',
  'p', 'n' letter keys to move up, down, center, next page, previous
  page etc.  To turn off expert menu press 'x'.

  You can read postscript file using the program 'gv' (ghostview) or The
  ghostscript program is in ghostscript*.rpm package and gv program is
  in gv*.rpm package in Redhat Linux which can be located through
  ControlPanel | Applications | Graphics menu buttons. The gv program is
  much more user friendly than ghostscript.  Also ghostscript and gv are
  available on other platforms like OS/2, Windows 95 and NT, you view
  this document even on those platforms.


    Get ghostscript for Windows 95, OS/2, and for all OSes from
     <http://www.cs.wisc.edu/~ghost>

  To read postscript document give the command -


                       gv howto.ps
                       ghostscript howto.ps



  You can read HTML format document using Netscape Navigator, Microsoft
  Internet explorer, Redhat Baron Web browser or any of the 10 other web
  browsers.

  You can read the latex, LyX output using LyX a X-Windows front end to
  latex.
  9.  Copyright and License

  Copyright Al Dev (Alavoor Vasudevan) 1998-2000.

  License is GNU GPL, but it is requested that you retain the author's
  name and email on all copies.




Cable Modem Providers HOWTO

Vladimir Vuksan

               vuksan@veus.hr
   
   Revision History
   Revision v4.23 July 10, 2000 Revised by: vv
   Addition of Liwest
   
   This document attempts to answer basic questions on how to connect
   your Linux box to cable modem or cable Internet provider.
     _________________________________________________________________
   
   Table of Contents
   1. [1]Introduction
          
        1.1. [2]New Versions of this Document
        1.2. [3]Feedback
        1.3. [4]Contributors
        1.4. [5]Standard Disclaimer
        1.5. [6]Copyright Information
                
   2. [7]Setting up your Ethernet Card
   3. [8]Regular Cable Modem ISPs
          
        3.1. [9]MediaOne Express
        3.2. [10]@Home
        3.3. [11]RoadRunner
        3.4. [12]Rogers@Home
        3.5. [13]Sunflower Cablevision
        3.6. [14]Jones Intercable
        3.7. [15]GTE Worldwind
        3.8. [16]SpeedChoice, Phoenix, Arizona
        3.9. [17]Cedar Falls Utilities Cybernet, Cedar Falls, Iowa
        3.10. [18]Telstra Big Pond Advance, Australia
        3.11. [19]Fibertel, Buenos Aires, Argentina
        3.12. [20]Videotron (Videon), Canada
        3.13. [21]Telekabel (Teleweb), Austria
        3.14. [22]Tebecai, Netherlands
        3.15. [23]A2000, Netherlands
        3.16. [24]Shaw Cable, Canada
        3.17. [25]Cogeco Cable, Canada
        3.18. [26]Optimum Online, New York and Connecticut
        3.19. [27]Singapore Cable Vision, Singapore
        3.20. [28]Cable Wanadoo, France and Netherlands (formerly Casema)
        3.21. [29]Prime Cable Expressnet, Las Vegas, NV
        3.22. [30]TVD, Belgium
        3.23. [31]Telenet Vlaanderen, Belgium
        3.24. [32]Total-Web, United States
        3.25. [33]CyberCable, Paris, France
        3.26. [34]StjrnTV, Stockholm Sweden
        3.27. [35]GCI.Net, Alaska
        3.28. [36]Saturn Communication NZ Ltd, New Zealand
        3.29. [37]Chello, Netherlands
        3.30. [38]Adelphia Powerlink, USA
        3.31. [39]21st Century Telecom, Chicago, IL, USA
        3.32. [40]HTVi, Helsinki, Finland
        3.33. [41]Garden State Cable, New Jersey
        3.34. [42]Zoom Internet, Butler County, PA
        3.35. [43]Charter Pipeline, St. Louis Metro Area
        3.36. [44]Netcabo, TV Cabo, Portugal
        3.37. [45]Supercable, Spain
        3.38. [46]NTL, United Kingdom
        3.39. [47]Virtua, So Paulo, Brazil
        3.40. [48]Hathway, Bombay, India
        3.41. [49]Siti Cable, Bangalore, India
        3.42. [50]Com Hem, Sweden
        3.43. [51]SwissOnLine HiSpeed Internet, Switzerland
        3.44. [52]Liwest, Austria
                
   4. [53]Hybrid Cable modem ISPs
          
        4.1. [54]Adelphia Powerlink, USA
        4.2. [55]LinkExpress, Brasil
        4.3. [56]ExpressNet, Maryland
        4.4. [57]Charter Pipeline, Riverside, CA
        4.5. [58]Chambers Cable, Chico, CA / Fundy Cable, New Brunswick
        4.6. [59]Smyrna Cable, Atlanta, GA
        4.7. [60]Amnet de Costa Rica, Costa Rica
        4.8. [61]Prime Cable, Chicago, IL
        4.9. [62]Millennium Digital Media, Maryland
                
1. Introduction

   The main goal of this document is to get your system running with your
   cable modem, and cable internet provider. Unfortunately, many ISPs
   that provide cable modem services, give you Windows and Macintosh
   software only.
   
   This document attempts to explain how to setup some cable modems and
   internet providers in Linux, the tricks to get them working correctly,
   and the traps not to fall down. It is hoped that this document will
   assist you, however we make no claims for the validity of the
   information contained within.
     _________________________________________________________________
   
1.1. New Versions of this Document

   The newest version of this HOWTO will always first be made available
   on
   
   [63]http://www.cs.unm.edu/~vuksan/linux/Cable-Modem.html
     _________________________________________________________________
   
1.2. Feedback

   Feedback is most certaintly welcome for this document. Without your
   submissions and input, this document wouldn't exist. So, please send
   your additions, comments and criticisms to
   <[64]vuksan-feedback@veus.hr>.
     _________________________________________________________________
   
1.3. Contributors

   The following people have contributed to this mini-HOWTO.
   
     * Dan Sullivan <[65]dsulli@home.com>
     * Andrew Novick
     * Michael Strates
     _________________________________________________________________
   
1.4. Standard Disclaimer

   No liability for the contents of this documents can be accepted. Use
   the concepts, examples and other content at your own risk. As this is
   a new edition of this document, there may be errors and inaccuracies,
   that may of course be damaging to your system. Proceed with caution,
   and although this is highly unlikely, I don't take any responsibility
   for that.
   
   Also bear in mind that this is NOT official information. Obtaining
   official information is usually an impossibility with many ISPs. Much
   content in this document are assumptions, which appear to work for
   people. Use the information at your own risk.
     _________________________________________________________________
   
1.5. Copyright Information

   This document is copyrighted (c) 1998 Vladimir Vuksan and distributed
   under the terms of the OpenContent License (OPL). Full text of the
   license can be found at [66]http://www.opencontent.org/opl.shtml
     _________________________________________________________________
   
2. Setting up your Ethernet Card

   All of the setups below use ethernet cards (network cards) to connect
   you somehow to the Internet. That is why first we need to check if
   your ethernet card is working and most importantly can be used (read
   is supported) in Linux. There is a comprehensive Ethernet HOWTO at
   [67]http://www.linuxdoc.org/HOWTO/Ethernet-HOWTO.html if you would
   like to read it otherwise try this.
   
   Boot into Linux, During boot up a message like this should appear...
eth0: 3c509 at 0x300 tag 1, 10baseT port, address  00 20 af ee 01 23, IRQ 10.
3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov

   If you missed it type dmesg.
   
   If you see a message like that you are set and you can go to the next
   section. If you can't see a message like this there are two possible
   explanations, your ethernet card is PNP (plug-n-play) and you need to
   use tools such as isapnptools to get it recognized (I am not quite
   sure on this because I don't have a single PNP card so correct me if I
   am wrong). The other explanation is that you need to set up your card.
   
   Most cards today come with DOS programs that are used to setup your
   card. For example to get my 3COM 3c509 to work all I needed to do is
   boot into DOS and use a utility to configure my card. There is usually
   a Auto Configure option. If that does not solve your problem try
   changing the IRQ for the card using the same utility. I find that
   usually IRQs 10,11 and 12 work well. If none of this solves your
   problem please read the Ethernet HOWTO referenced above or post to a
   newsgroup such as comp.os.linux.setup or comp.os.linux.networking.
     _________________________________________________________________
   
3. Regular Cable Modem ISPs

   If you think you have the card recognized you have to now look at the
   entry for your ISP. I have sorted the information according to a
   provider because setups are mostly ISP specific.
     _________________________________________________________________
   
3.1. MediaOne Express

   MediaOne Express is a Internet cable service provided by MediaOne. The
   hardware setup consists of a cable modem produced by LanCity or
   General Instruments which plugs into an ethernet card using a 10BaseT
   (UTP-45) cable. Assignment of IP addresses and other networking
   information is done using DHCP which stands for Dynamic Host
   Configuration Protocol. The only thing you need to do is read the DHCP
   mini-HOWTO and configure your system appropriately. There is no other
   necessary configuration. DHCP mini-HOWTO can be found at
   [68]http://www.oswg.org/oswg-nightly/DHCP.html.
   
   Information about MediaOne Service can be found at
   [69]http://www.mediaone.com.
     _________________________________________________________________
   
3.2. @Home

   @Home uses a similar setup to [70]MediaOne Express. However, there are
   a few fundamental differences, outlined by contributors. Since @Home
   spans different geographic locations you might get assigned different
   kind of equipment and have slightly different kind of setups.
   
   Before you try anything, go to control panel, network, and properties
   for your network card. Write down all of the information. You will
   need it later.
   
   TCI, the company that runs @Home issues a Etherlink III 3c509b NIC for
   all of their customers. What TCI does not tell you is that when they
   install your ethernet card, it is in PnP mode. Now in Slakware, if you
   uncomment the proper line for this card, everything will appear to be
   working fine. There will be no system problems, but the 'PC' light on
   your CyberSURFR modem will never turn on. If you are using Slakware,
   and are having this problem, reboot in DOS and skip the next
   paragraph.
   
   In RedHat 5, your system will have some trouble autodetecting the
   card. If you try to pass the paramaters manually, the system will
   hang. This should be obvious that your card is not setup properly.
   Before wasting anymore time, reboot in DOS (This is a must because as
   of 12/25/97, there is no utility written for Linux to turn off PnP and
   turn on ISA.)
   
   TCI does not give out a utility disk for your ethernet card, so you
   must download the utility from one of 3Com's sites. Here is a link to
   3COM's page for driver download.
   
   [71]http://support.3com.com/infodeli/tools/nic/index.htm
   
   Once you have downloaded your driver files you will need to run them
   and disable the PNP mode of your network card.
   
   What you've now done will make your ethernet card 'broken' in Windows
   95. You'll need to go to Control Panel, Network, and remove the
   network card and the adapter. Reboot your computer, and again go back
   to control panel. Go to add/remove new hardware, and have it
   autodetect. It will automatically setup the correct i/o address for
   you. You will most likely need to reboot again. Now you should be in
   Windows 95, with the 'PC' light on your cable modem on. You will also
   notice that none of your internet applications seem to work, you can't
   ping, and you can't resolve DNS. You now must go back to control
   panels, network, and click on properties for your network card (not
   the adapter). Re-enter all the data you wrote down, and reboot.
   
   With a little luck, your ethernet card should be working in Windows
   95, and ready to rock in Linux.
     _________________________________________________________________
   
3.2.1. Notes from Hampton Roads, VA and Phoenix, AZ by Mark Solomon:

   With the @home service in Hampton Roads, VA, it is absolutly
   neccessary to run dhcpcd-0.70 (or higher) that supports the "-h"
   option to specify the hostname of your computer. Without this switch
   the @home dhcpcd server will not assign addresses.
   
   @Home user from Hampton Roads Scott Stancil <[72]sstancil@home.com>
   has provided an RPM that can be used to easily configure @Home
   connection. Check it out at
   [73]http://www.linuxforum.com/plug/projects.html
   
   More information on setting up dhcpcd-0.70 and @Home service with
   Intel Ether Express cards can be found at
   [74]http://www.monmouth.com/~jay/Linux/
     _________________________________________________________________
   
3.2.2. Notes for Baltimore, MD and Colleyville,TX

   In Baltimore subscribers are issued Intel Ether Express Pro 10 nics
   and a static IP number.
     _________________________________________________________________
   
3.2.3. Notes for Milpitas, CA, USA

   Information provided by Joe Byrne
   
   @Home service assignes 3Com 509b cards. IP addresses assigned
   statically.
     _________________________________________________________________
   
3.2.4. Notes for Salt Lake City, UT, USA

   Information provided by <[75]akaiceman@hotmail.com>.
   
   @home (at least in the Salt Lake City, Utah areas, i'm not sure if
   this is everywhere yet) has started giving out 3com 900B NIC's, unless
   you ask for a ISA card in particular. 3COM 900B are PCI based ethernet
   cards which might require kernel recompilation.
     _________________________________________________________________
   
3.2.5. Notes from Connecticut, USA

   Information provided by <[76]dan@sidhe.org>.
   
   The @Home folks are using Motorola cable modems (I know, I got one) in
   addition to any other brand folks have reported. If it's getting
   hooked into a hub it needs to either get plugged in with a
   twisted-pair cross-over cable or go into the 'to other hubs' port if
   your hub has one. (Which is standard, I expect, for these things, but
   useful to keep in mid if, like me, you're hooking the thing on to an
   existing local network) I have a plain Compaq 10/100 ethernet card (I
   think it's the NC3131, but I'm not 100% sure) in my linux box and it
   worked without a hitch.
   
   Also, they are handing out fixed IP addresses, at least in
   Connecticut, and you can get up to three. (They charge $4.95/mo for
   each extra IP address they allocate) They make no requirements on the
   OSes on these extra machines--I've a Vax running VMS and they didn't
   bat an eye when I signed it up. They did want the initial machine to
   be something they recognized (I booted over to Win98 for the duration)
   but they would've handled a linux-only install if really, *really*
   pressed
     _________________________________________________________________
   
3.2.6. Notes from Dallas, TX or anyone using Motorola CyberSurfr

   If you have a Motorola CyberSurfr cable modem you will need to press
   the reset key on the back of the modem if you switch network cards.
   The ethernet card hardware address is read by the modem and once it is
   setup if the card is switched it must be reset.Just press the reset
   key for 10+ seconds and it will reread.
   
   If you are still not able to get your cable connection going check out
   mini-HOWTO for cable modems and Cox@Home at
   [77]http://www.kernel-panic.com/user_files/cox.at.home.html
   
   Update from James Stormes <[78]jstormes@gtfcu.com>
   
   @Home has been upgrading the cable modem system in Bedford Texas (the
   area around Dallas Texas). I have found that with the new system your
   NIC's MAC address must match what the cable system has. That is the
   Linux system you plug into the cable modem must use the same MAC that
   is programmed into the board you got from @Home. I use two diffrent
   computers on the cable modem (Linux and Windows) so this was a
   problem.
   
   For some NIC drivers you can specify the MAC. For example in n REDHAT
   6.1 in the /etc/sysconfig/network-scripts/ifcfg-eth0 you can add the
   line MACADDR="0F4F3E54A659". Where eth0 is the NIC card attached to
   the cable modem and the 0F4F3E54A659 is the MAC that the cable modem
   system is expecting.
     _________________________________________________________________
   
3.2.7. Notes from Louisville, KY by Devin Bundrent <[79]mrscoobdoo@home.com>

   As of now, @Home/Insight issues Realtek RTL8029(AS) PCI Ethernet NICs,
   and Static IP addresses. In addition, the customers of the service are
   given(by default, others can be bought, and used) the RCA DCM105
   Digital Cable Modem, without utilities disk.
     _________________________________________________________________
   
3.2.8. Notes from Madison, WI and Lakeridge, VA

   I have a cable modem from Bresnan in madison wi, they use the @home
   network for internet trafic and supply there users with the RCA cable
   modems. In the howto it states that the -h flag should be used for the
   host name with dhcpcd. That didn't work for me. They provided me with
   a machine name of cb46597-a.mdsn1.wi.home.com, the cd46597-a obviously
   being my hosts name.... anyway.. the flag I had to use to get dhcpcd
   working was the -I flag for ClientID. ClientID is actually the MAC
   (Ethernet) address of your NIC e.g. 00:00:21:61:7C:F0.
     _________________________________________________________________
   
3.2.9. Notes from Baton Rouge, LA by Van Goodwin
<[80]positron@redstroke.com>

   Here, @Home doesn't seem to have a standard ethernet card. They gave
   me a "SMC EtherEZ" ISA card, but I've seen them install totally
   different cards in other systems. The installer told me they gave
   static IP addresses to people who use Windows NT and dynamic to
   everyone else. Don't ask me why.
     _________________________________________________________________
   
3.2.10. Notes from Richmond, VA and its surroundings by Robert Marshall
<[81]no_robmars_spam@yahoo.com>

   In Chesterfield County, Virginia (a suburb of Richmond), @Home offers
   cable modem service through the local cable provider, Comcast. The
   service runs very well with Linux. As with many @Home locations, IP
   addresses are assigned via dhcp, and they require that all dhcp
   request packets contain the user's @Home-assigned hostname. The dhcpcd
   package works well for this, using the -h parameter. Personal best
   download - 16Mbytes in 54 seconds.
   
   In Henrico County, Hanover County, and the city of Richmond, Virginia,
   MediaOne is offerring their Road Runner service. IP addresses are
   assigned using dhcp, but are exclusively reserved by MAC address. This
   requires that the user call MediaOne support if the MAC address
   attached to the cable modem ever changes. The MediaOne people refused
   to re-register my friend's new MAC address when he told them that he
   had purchased a personal firewall from NetGear. They even tried to
   insist that he purchase commercial service, even though he was only
   going to have one PC connected to the service. Thus, I strongly agree
   with your wording in the HOWTO that MediaOne customers carefully avoid
   mentioning the words "router", "firewall", or "Linux".
     _________________________________________________________________
   
3.2.11. Notes from Mobile, Alabama R. Jason Valentine
<[82]miracle@procyon.com>:

   In Mobile, Comcast cable provides cable modem service through the
   @home network. An RCA cable modem (model DCM205) is issued along with
   a SMC EZ-Card (10/100) if you don't already have a cable modem.
   
   Static IPs are not given, but rather assigned through DHCP. You need
   to make your ethernet card (eth*) use DHCP - linuxconf is the easiest
   way to set that up. Next, you'll need to find the following line in
   /sbin/ifup
-----------------------------------------------------------------
if [ -n "$PUMP" ]; then
     echo -n "Determining IP information for $DEVICE..."
     if /sbin/pump -i $DEVICE; then
         echo " done."
     else
         echo " failed."
         exit 1
     fi
 else ...
-----------------------------------------------------------------

   and change it to
-----------------------------------------------------------------
if [ -n "$PUMP" ]; then
     echo -n "Determining IP information for $DEVICE..."
     if /sbin/pump -i $DEVICE -h hostname; then
         echo " done."
     else
         echo " failed."
         exit 1
     fi
 else ...
-----------------------------------------------------------------

   Where hostname is the computer name (cc123456-a - or whatever yours
   may be.)
     _________________________________________________________________
   
3.2.12. Notes from Auburn, Alabama by Andrew W. Jones
<[83]andywjones@home.com>

   I would like to note that Auburn's @home service supports DHCP. If you
   simply issue `dhcpcd -h hostname` all your network settings are taken
   care of...
     _________________________________________________________________
   
3.2.13. Notes from Santa Barbara, California by Tim Newsome
<[84]nuisance@DELETE_BEFORE_SENDINGcmu.edu>

   My provider (Cox@Home, in Santa Barbara, CA) does the same thing as
   [85]Notes from Hampton Roads, VA and Phoenix, AZ by Mark Solomon:. I'm
   using Debian, with dhclient version 2.0. I added the following line to
   my /etc/dhclient.conf: send host-name "cx803168-a"; Where cx803168-a
   is the hostname I've been assigned. It is listed on the purchase
   order.
   
   Information about @Home Service can be found at
   [86]http://www.home.com/.
     _________________________________________________________________
   
3.3. RoadRunner

   RoadRunner is an Internet cable service provided by Excalibur Group
   (Time Warner). The hardware setup consists of a cable modem produced
   by Motorola and Toshiba which plugs into an ethernet card using a
   10BaseT (UTP-45) cable. From what I can gather RR uses DHCP for IP
   assignment. In order to set up Linux to use DHCP you need to read the
   DHCP mini-HOWTO [87]http://www.oswg.org/oswg-nightly/DHCP.html.
   
   If this doesn't work out for you you should check out
   [88]http://www.math.uakron.edu/RoadRunner/ for Akron, Ohio and
   [89]http://people.qualcomm.com/karn/rr/index.html for San Diego,
   California. It might help solve your problem.
   
   Another good site is [90]http://www.vortech.net/rrlinux/.
   
   One more thing that might be worth mentioning: you will need a Windows
   NT, 95, or 98 or Macintosh PC for the RoadRunner installers to
   configure the modem. It's not technically necessary, but they will
   insist, and will not install on a Linux system. It's also best not to
   mention the IPFW system while they're around.
   
   Additional notes by Phil Baird <[91]pjb@rocsoft.com> from Rochester,
   NY:
   
   About getting hooked up initially. It is true the RR techs don't want
   to talk about Linux. However, they now offer us a "self-install" that
   is half the price ($50). Basically, they come out, run the cable, and
   make sure the signal gets to the modem. You must supply your own nic
   card and do the rest of the setup on your own.
   
   Information about RoadRunner Service can be found at
   [92]http://www.rr.com/.
     _________________________________________________________________
   
3.4. Rogers@Home

   The hardware setup consists of a cable modem produced by LanCity which
   plugs into an ethernet card using a 10BaseT (UTP-45) cable.
   
   When the cable modem is installed by Rogers@Home technicians you are
   assigned a static IP address. They should also provide you with
   information on your subnet mask, router (gateway) numbers and DNS
   numbers.
   
   If above doesn't help you can check out Randal Leavitt's
   <[93]randal.leavitt@home.com> "Connection Notes" for Rogers@Home at
   [94]http://members.home.net/randal.leavitt/CableModemConnectionNotes.h
   tml.
   
   Notes from Greg Jacobs <[95]gregjacobs@home.com>
   
   They now only give out dynamic IP's. The techs says its pretty much
   fixed after first issue, they just want to use DHCP so any network
   changes on their end can just be 'pushed out' so to speak.
   
   Also Make sure any cablemodem uses ensure they don't use a DHCP server
   on their cablemodem interface. The cable company gets very angry and
   often pull the plug then tell you ;).
   
   Other information about Rogers@Home Service can be found at
   [96]http://www.rogers.home.com/.
     _________________________________________________________________
   
3.5. Sunflower Cablevision

   This information is provided by Andrew Novick:
   
   "I recently saw your cable modem howto and I have an addition.
   Sunflower Cable is a company stricly in Lawrence KS, however we have a
   rather large Linux community because of the University of Kansas. On
   our local LUG mailing list, we are starting to get more and more
   questions on how to configure their linux machine for the cable modem.
   It is just regular static addressing, and the modem is made by
   Zenith."
   
   To configure your Linux box make sure you get all the pertinent
   information from the Cablevision tech support or use these.
   
     * IP address: Assigned by SunFlower Cablevision
     * Subnet mask: 255.255.255.0
     * Gateway (router) address: 24.124.11.254
     * Hostname: Assigned by SunFlower Cablevision
     * Domain name: lawrence.ks.us
     * Primary DNS server (nameserver): 24.124.0.1
     * Secondary DNS server (nameserver): 24.124.0.6
       
   Have all those numbers written down before you proceed. To register,
   visit [97]http://www.sunflower.com/.
   
   To register in the lawrence.ks.us domain contact Stephen Spencer at
   <[98]gladiatr@artorius.sunflower.com>.
   
   Under RedHat use Control Panel and Network Configuration to put in
   these numbers. Just say Add Interface, Device type=Ethernet, Device
   name=eth0 (this is zero not O in eth0) then fill out all the fields.
   Then click activate.
   
   In Slackware type netconfig. When you are finished reboot and you
   should be up and running.
   
   If this doesn't work make sure you do network card troubleshooting
   from the beginning of this document.
     _________________________________________________________________
   
3.6. Jones Intercable

   This information is provided by Bob Kimble:
   
   Jones Internet Cable supplies a Hybrid cable modem that connects to
   your machine / network via 10BaseT ethernet. They provide you with a
   static IP address for your machine, and another static IP address for
   the modem. The modem acts as a gateway to their network. Your IP
   address and the modem IP address are on the same network and have the
   same network mask (in my case 255.255.255.0 -- 24 bits). They also
   provide two DNS IP addresses which you enter into your configuration.
   I just entered the numbers when I installed Red Hat Linux 5 and it
   worked like a champ from the beginning. Since then I have configured
   my Linux machine to enable IP masquerading and domain name services,
   and it now acts as a router for my entire private network. My other
   machines are connected via a private network using the addresses
   192.168.0.x. They are running Windows 95, Windows NT (Intel and Alpha)
   and OS/2. My Linux machine has two IP addresses -- the one from the
   cable company and one from the 192.168.0.x private network. Everything
   works like a champ. All six machines can browse the web
   simultaneously. My kids are even able to connect to their favorite
   game site, "The Realm" from Sierra.
     _________________________________________________________________
   
3.7. GTE Worldwind

   This information is provided by Blake R. Swopes (bhodi@bigfoot.com):
   
   GTE WorldWind service is available in only a few areas (parts of
   California and Florida), its home page is located at
   [99]http://www.gtecablemodem.com/.
   
   GTE will send a technician out to hook up the cable modem to the wall,
   but does not do any configuration of your computer. The cable you hook
   up to your computer is the ethernet standard 10baseT (and you'll
   probably need to buy your own, since the one they left with me was
   only about two feet long).
   
   The technician should leave you some information about configuring
   your system (IP address, gateway address, netmask, DNS addresses) and
   the number for GTE's support line (1-800-GTE-VIDEO, since WorldWind is
   attached to GTE's Americast cable service). If you have read the
   Ethernet-HOWTO and the DHCP mini-HOWTO, you should have no trouble
   configuring your system to work with WorldWind.
   
   GTE provides one e-mail address, which they assign to you, but you can
   create aliases to that account and web mail accounts through gte.net.
   
   According to GTE, they block inbound traffic on several ports for
   security purposes and to keep people from running servers that will
   eat into other users' bandwidth (e.g., telnet, DNS, News, and Netbios
   (Good news for Windows users)). In actual practice, I have found that
   I was able to telnet into my system from remote hosts.
   
   GTE does not provide technical support for Linux users, so you will
   pretty much be on your own. My experience was that as soon as I
   mentioned Linux, they tried to get me off the phone, but that might
   have been the particular tech I was speaking to at the time.
   
   GTE also advised me that they do not support users who have IBM
   Aptivas, however I was able to briefly connect an IBM Aptia 2176-C77
   with a SOHOWare PCI 10/100 Ethernet Card to the service with no
   trouble at all.
   
   I regularly test my connection speed through the bandwidth test at MSN
   ( [100]http://computingcentral.msn.com/topics/bandwidth/speedtest.asp
   and regularly find my connection speed to be between 320-390Kbps.
   Depending on the site, I have seen transfers at up to 135K, though the
   average is probably 35-45.
     _________________________________________________________________
   
3.8. SpeedChoice, Phoenix, Arizona

   According to Micah <[101]peenchee@asu.edu>:
   
   Just thought I'd let you know that in my area (Phoenix, AZ, usa) there
   is a company called speedchoice that provides cable modem service. The
   service uses a hybrid cable modem and the set up is almost identical
   to that of Jones intercable described in the howto. See [102]Jones
   Intercable. For any other issues mail Micah.
     _________________________________________________________________
   
3.9. Cedar Falls Utilities Cybernet, Cedar Falls, Iowa

   This information is provided thanks to Joe Breu <[103]breu@cfu.net>
   
   We are an ISP in Cedar Falls, Iowa that uses a mix of Zenith, Lancity,
   and DOCSIS Cable Modems over our own Hybrid Fiber/Coax system. Our
   system uses no proprietary connection software and is straight TCP/IP
   connections. We do use DHCP, but will offer static IP addresses to
   customers with older Macintosh machines or computers unable to use
   DHCP. We will answer basic questions if you want to hook up a Linux
   box to our network but it should be drop and surf.
     _________________________________________________________________
   
3.10. Telstra Big Pond Advance, Australia

   This information is provided by Mike Battersby <[104]mib@post.com>
   
   Linux is not an officially supported platform for Telstra Big Pond
   Advance cable internet. Do not report faults regarding Big Pond
   Advance and Linux to them, as they will not help you.
   
   In order to use Big Pond Advance under Linux, you will need:
   
     * a working NIC
     * a DHCP client, to obtain an IP address
     * a BIDS v2 (Broadband Internet Delivery System) login client
       
   For more information on getting a DHCP client working, see the DHCP
   mini-HOWTO: [105]http://www.oswg.org/oswg-nightly/DHCP.html.
   
   Big Pond Advance user Shane Hyde wrote and maintains an excellent open
   source BIDS v2 login client, BPALogin. The BPALogin web site is:
   [106]http://www.users.bigpond.net.au/bpalogin/. Available at the same
   site is a page of instructions on getting BPALogin to work with Linux:
   [107]http://www.users.bigpond.net.au/bpalogin/tutorial.html.
   
   Basic steps for connecting to Big Pond Advance under Linux are:
   
     * get your Network Interface Card working.
     * get a DHCP client to request an IP address.
     * authenticate with BPALogin
       
   See the tutorial on the BPALogin site
   ([108]http://www.users.bigpond.net.au/bpalogin/tutorial.html) for more
   details.
     _________________________________________________________________
   
3.11. Fibertel, Buenos Aires, Argentina

   This information is provided by Pablo Godel.
   
   My name is Pablo Godel and want report that I'm using the cable
   service of Fibertel in Buenos Aires, Argentina and it works perfectly
   with Linux.
   
   They gave me a static IP. The brand of the cablemodem is COM21 and the
   model is ComPort.
   
   I connect it to the nic properly, configured in Linux and it worked
   perfectly.
   
   More information about Fibertel can be found at
   [109]http://www.fibertel.com.ar.
     _________________________________________________________________
   
3.12. Videotron (Videon), Canada

   I don't have much information about Videotron except the fact that
   they use DHCP for the assignment of IP addresses and other networking
   information. Just read the [110]DHCP mini-HOWTO and configure your
   system appropriately. There is no other necessary configuration. Also
   important thing to note is that the Ethernet card that Videotron
   distributes is a NE2000 compatible PCI card for which you need to use.
   
   ne2k-pci driver
   
   Additional information from Philip Gwyn <[111]gwynp@artware.qc.ca>:
   
   They use Motorola CyberSURFR (sic) modems. This will give you an
   ethernet NIC when you sign up. They gave me a TMC NE2000 PCI clone,
   which Linux recognises as a "RealTek RTL-8029". It couldn't configure
   it propperly however, until I downloaded the manufacturer's driver
   disk and changed the media type to "auto-config".
   
   While they can't guarantee to get it working with Linux, they will do
   a bit of hand holding so it works. Many of the tech-support have
   Linux-clues, as it were, even asking questions like "what kernel are
   you running?" "do you have the latest version of dhcpcd?". When their
   DHCP server broke, they even suggested I delete the cache files in
   /etc/dhcpcd to start over from zero, as it were. This worked.
   
   Additional information from Mihai Petre <[112]mihaip@videotron.ca>:
   
   Yes they are using DHCP for the tcp settings. They have also included
   dhcpcd on their ftp server at [113]ftp://ftp.videotron.ca/pub/linux/.
   You can also try posting your problems on news.powersurfr.com
   newsgroup videon.linux.
   
   As far as running servers using your cable connection according to
   Alex Nuta says that "contract explicitly states that *no* servers of
   any kind are permitted; HTTP, FTP or otherwise".
   
   Additional information from Stasnilav Kogan
   <[114]s_kogan@alcor.concordia.ca>:
   
   The modem they provide is now Samsung InfoRanger (SCM-100R). The ISA
   card they provide is an SMC NE2000 compatible (FCC ID: HED1661EN2). It
   is necessary to configure the card from DOS to NE2000 mode before
   attempting to get it to work under Linux. (Generally, this card is
   horrible. I replaced with a 3Com card as soon as possible).
   
   The technical support in Videotron is absolutely HORRIBLE. (Not to
   mention Linux support). So, whoever signs up with them, should expect
   to work alone. However, aside from the NIC problems, the setup was a
   breeze. They use DHCP, so all the standard procedures apply.
   
   Information about Videotron can be found at
   [115]http://www.videotron.ca.
     _________________________________________________________________
   
3.13. Telekabel (Teleweb), Austria

   There are two approaches to setting up your Telekabel connection.
   First one is the approach used by Andreas Kostyrka:
   
     * You may want to mention, that the Austrian Telekabel (Teleweb) ISP
       works with Linux. It seems quite similiar like MediaOne Express
       (3c509+dhcp, etc.)
     * Second there are 3COM configuration utilities for Linux (But don't
       fool around with them on a busy system, 3c509 may lock the bus if
       touched the wrong way :( ):
          + [116]ftp://ftp.redhat.com/pub/contrib/hurricane/SRPMS/3c5x9ut
            ils-1.0-3.src.rpm
          + [117]ftp://ftp.redhat.com/pub/contrib/readmes/3c5x9utils-1.0-
            1.README
       
   Second approach is provided by Marcel Ebmer
   <[118]marcel.ebmer@chello.at>
   
     * Do NOT bother using dhcpcd or pump!
     * In case you don't know, ask the provider for your IP-address,
       which is static, for the DNSs, the Gateway and use linuxconf to
       configure the network. For Vienna: 960 60 333 is the helpdesk's
       telephone number They officially do not support linux, but you
       need not mention you are running linux.
     * Choose a unique name for your PC....not "localhost"
       
   Information about Telekabel can be found at
   [119]http://www.telekabel.at/.
     _________________________________________________________________
   
3.14. Tebecai, Netherlands

   According to Frodo Looijaard:
   
   Tebecai is yet another provider which uses a LANcity cable modem
   connected to a 10BaseT ethernet card. DHCP is used for configuration
   (see the [120]DHCP mini-HOWTO). A step-by-step guide to install the
   cable modem under Linux can be found at
   [121]http://huizen.dds.nl/~frodol/ (in dutch), but it is really very
   straightforward. You must only remember that your IP-address is not
   visible from the Internet (it is on the private 10.x.y.z subnet), so
   you can not setup a publicly available server.
   
   Information about Tebecai can be found at [122]http://www.tebenet.nl
   (in dutch only).
     _________________________________________________________________
   
3.15. A2000, Netherlands

   This information is provided by Johan List
   <[123]J.A.List@speed.A2000.nl>:
   
   Basically the way to go is the same as with Tebecai. A2000 provides
   cable internet access by means of a LANCity cable modem, connected to
   an 10BaseT ethernet card. This also works well for the
   "Vortex/Boomerang" cards by 3COM (I've got a 3COM Boomerang Fast
   Etherlink XL 10/100Mb TX Ethernet Adapter), providing you compile the
   Vortex/Boomerang drivers. (See the Linux Ethernet-HOWTO)
   
   Setting up access can be done with DHCP (See the DHCP-Mini-HOWTO). A
   Dutch guide to setting up Internet access for A2000 is available at
   [124]http://agvk.a2000.nl/antwoorden/linux/.
   
   Contrary to Tebecai, your IP-number *is* visible from the Internet, so
   take your precautions regarding security and safety when setting up a
   Linux machine using A2000 Internet access!!
   
   Update on January 23rd
   
   Since 1 january 2000, A2000 has become a part of Chello Internet
   (http://www.chello.nl). At least until october 2000 the current
   settings can be used, but a couple of URL's have changed.
   
   Since the old situation is probably going to change permanently this
   year (new domain names for news server, email/POP3 server, FTP server
   and so on) it's probably a wise idea to keep the new settings in mind,
   which can be found at:
   [125]http://noordholland.coax.nl/instellingen.html.
     _________________________________________________________________
   
3.16. Shaw Cable, Canada

   According to Peng F. Mok <[126]pmok@shaw.wave.ca>:
   
   I recently signed up for a cable modem service from Shaw Cable here in
   Canada, which runs under Shaw@Home brand. Shaw has been upgrading
   their cable network for about a year and a half now, and now offer
   cable-modem service to a number of locations across Canada.
   Information about the `Shaw@Home' service can be found at
   [127]http://shaw.home.com General information about Shaw Cable can be
   found at [128]http://www.shaw.ca.
   
   I thought I'd just drop you a line to inform you that your [129]DHCP
   mini-HOWTO, was very useful in helping me set up Linux to work with my
   cable-modem service, and that you might want to add `Shaw@Home' to
   your Cable-Modem mini-HOWTO as another entry. I don't have specific
   information on the `Shaw@Home' service yet, but from conversations
   I've had with Shaw technical support it seems that `Shaw@Home' is a
   partnership with [130]@Home and involves the same features and setup
   procedure as that already described for [131]@Home in the Cable-Modem
   mini-HOWTO document.
   
   In both services Shaw Cable techs will come over and bring you two
   pieces of hardware -- a Motorola CyberSURFR cable-modem and either a
   3Com EtherLink III 16-Bit ISA 3C509B-TPO NIC or an EtherLink XL PCI
   3C900-TPO NIC. You have your choice of either an ISA or a PCI card
   depending on your needs, and these models only have the RJ-45 (UTP)
   connectors. The ISA cards come with PnP-mode enabled by default, so it
   may be necessary to boot into DOS, disable PnP operation, and
   configure the card to some base I/O address and IRQ setting which are
   available. Once this is done Linux should have no problems detecting
   the NIC at boot-time. I'm not sure about what needs to be done in the
   case of a PCI card since I don't currently have a PC which supports
   either PCI or PnP.
   
   Note from another user:
   
   Shaw now also issues SMC PCI ethernet cards. They give these out
   without boxes or manuals. I found out that these are the SMC
   EtherPower PCI RJ45 card (model 8432T). They use the DEC 21041 chip so
   the tulip ethernet driver is needed for it.
   
   If you need to set up your POP3 mailboxes you can do that at following
   URL: [132]https://profile.home.net/Users/menu.htm and you can login
   and setup the POP3 mailboxes that way.
   
   Oh, and for the record, Shaw's technical support is horrendous. The
   best place to go for information is the athome.users-unix newsgroup
   (which is not even mentioned by any of the documentation) or please
   consult [133]http://www.ee.ualberta.ca/~pmok/linux/.
     _________________________________________________________________
   
3.17. Cogeco Cable, Canada

   This information is provided thanks to Sean O'Grady
   <[134]sean@incisive.dhs.org>:
   
   I have a Cable Modem through a company called Cogeco Cable located in
   various parts of Canada. They are part of the "Wave" system which
   includes Rogers Cable and Shaw Cable. The technical setup is different
   for each provider though. They supplied me with a D-Link ethernet card
   (the version of that has changed since then but I believe are still
   using D-Link) and a Zenith modem. The Ip setup is easy since they use
   DHCP so all I did was [135]install the DHCP daemon and that was that.
   If you like you can list my e-mail address <[136]togrady@cgocable.net>
   for anyone with questions.
   
   I contacted you awhile ago with information regarding setting up a
   cable modem under Cogeco (the mail came from togrady@cgocable.net).
   Well I have some updates to give you. Cogeco has now joined the @HOME
   network although I haven't seen anything good come out of yet. The
   modems have changed as well, instead of the old Zenith modems we now
   are using a Samsung InfoRanger SCM-100R modem. The modem changed has
   not affected the ease of setting up Linux with the cable modem. All
   that is still required is a functioning network card and [137]working
   DHCP client and you will be able to get the network functioning
   quickly. Many people send questions to me regarding various cable
   modem/dhcp/networking issues and as a result I have started to put
   together some help pages. The are located at
   [138]http://incisive.dhs.org.
   
   Additional info has been provided Craig Kossowski:
   
   Cogeco seems to be slowly getting themselves sorted out wrt cable
   modems and is now part of the set of Canadian cable companies that
   have cooperated on the @Home network. A network card is provided as
   part of their large (but currently waived) hookup fee; the D-Link
   528CT for PCI capable systems, and, I believe, D-Link 220T for ISA
   systems (and possibly PCI capable computers that will accept the ISA
   card, they tried it in my roommate's system first, only when that
   didn't work did they put in the PCI 528CT). I'd recommend asking for
   the PCI if you have the choice, as I know that setup can work with
   Linux from my experience.
   
   Both of these are NE2000 boards to the best of my knowledge. I got the
   PCI D-Link 528CT which uses the RealTek 8029 chipset, and Linux can
   deal with easily. I just recompiled the kernel, and after a little
   hiccup due to RedHat 5.2's lilo default not looking for the kernel at
   /vmlinuz, I was up and running. DHCP (with a 24 hour lease lifetime)
   is used for IP resolution and everything worked automaticaly (I had
   selected a DHCP config when I installed Linux, others may need to do
   slightly more configuration, but it doesn't require anything
   non-standard). The 528 is supposedly plug & play, but I had no
   problems using it in my Linux box (2.0.34). Note that you need to
   compile in (either built in or module, I used built in) the PCI NE2k
   code, and unlike what is implied in the Ethernet HOWTO, you don't need
   to also include the ISA NE2000 code to use this chipset. I don't have
   experience with the ISA D-Link 220T, but I would assume it's just as
   easy to set up, it's listed as a supported card in the Ethernet HOWTO.
   
   The Cable modem I got was a great heavy thing that looks like a
   heatsink for a small nuclear reactor. Nearly a square foot in desk
   space, made by LANcity, and I believe rated for 10Mbps shared
   bandwidth on the cable subset side of things, it has a reasonably good
   set of LEDs to show you what it's doing once you figure out what each
   one is. While throughput will obviously vary, I see transfer rates
   around 10kB/s (80kbit/s) and up during the day, to 50-60kB/s at night,
   when presumably thinks are quieter on the backbone. Subjectively, it's
   very fast, and beats even fast modems hands down. I haven't had it
   long enough to determine uptime yet, so I can't comment there.
   
   At the time of this writing (Jan 99), Cogeco's service runs $150 for
   installation, including the card, and $39.99 a month for the service.
   They're currently waiving the modem rental fee "until they are
   available for purchase" but the information there is mixed from
   15.04/month as of early 1999 (from the web page) to "not for some
   time" from their phone staff. Included with this is up to five email
   addresses, and 5MB of Web space. They also say there is a 1GB/month
   limit, though I'm told (by their tech support people) that this isn't
   strictly enforced, and is more to discourage ftp sites with high
   traffic bogging down the subnets, and to provide them with an avenue
   to prevent such. Although their literature doesn't say so, additional
   computers are an extra 10.70 a month, though unsupported, and you have
   to provide the hub, wiring and additional ethercards if you do this,
   they're basicly charging the extra for the lease of an additional IP
   as far as I can tell from their information.
     _________________________________________________________________
   
3.18. Optimum Online, New York and Connecticut

   This information is provided by Seth Greenfield
   <[139]islesfan@nassau.cv.net>:
   
   Optimum Online uses DHCP, and rrclientd in Linux, by John Clark. Check
   out [140]http://www.netaxis.com/~wharris/optimum/index.html for
   instructions on how to set up your service with Linux.
   
   Tell people who had private ips who have public ips now to change
   their /etc/resolv.conf to look like this...
domain nassau.cv.net (or optonline.net depenind on the users mood)
nameserver 167.206.112.3
nameserver 167.206.112.4

   Other Than that its the same setup procedure note: the rrclientd
   software will work if you tell it dce-server and you specify the
   domain as optonline.net
     _________________________________________________________________
   
3.19. Singapore Cable Vision, Singapore

   This information is provided by Jieyao <[141]jieyao@letterbox.com>:
   
   SCV provides Motorola Cybersurfer modem connected to the network card
   via UTP cable. The IP setup is easy since they use DHCP so all you
   need to do is [142]install the dhcp daemon. If you can't make access
   the first time, turn the modem off then on again.
     _________________________________________________________________
   
3.20. Cable Wanadoo, France and Netherlands (formerly Casema)

   This information is provided by Jerome Sautret
   <[143]Jerome.Sautret@wanadoo.fr> and it applies to Wanadoo's French
   customers:
   
   I just read your Cable Modem HOWTO. I live in France, and I use Cable
   Wanadoo, the cable service of France Telecom, which is the main
   telecom operator in France. It is available in a few cities in France
   at the moment, like Angers and Metz. This service provides a dynamic
   IP address via DHCP. It uses a COM 21 modem plugged in a 10BaseT
   Ethernet card. The IP setup is easy just read the [144]DHCP mini
   HOWTO.
   
   Information about Netherlands is provided by Costyn van Dongen
   <[145]cvd@casema.net>:
   
   The current Casema cable modems operate via the serial port, acting
   like normal modems, answering AT commands like phone modems. The setup
   is really very easy, because all the chat script needs to do is dial
   ATDT4. (this is in ppp-on-dialer). Hence it uses PPP, which is unusual
   for most cable modems.
   
   Relevant files are included /etc/ppp/ppp-on
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
exec /usr/sbin/pppd -detach /dev/ttyS0 115200 connect $DIALER_SCRIPT &

   /etc/ppp/ppp-on-dialer
exec /usr/sbin/chat -e '' AT '' ATDT4

   /etc/ppp/ppp-off
#!/bin/sh
######################################################################
#
# Determine the device to be terminated.
#

sleep 5

if [ "$1" = "" ]; then
        DEVICE=ppp0
else
        DEVICE=$1
fi
#
######################################################################
#
# If the ppp0 pid file is present then the program is running. Stop it.
if [ -r /var/run/$DEVICE.pid ]; then
        kill -INT `cat /var/run/$DEVICE.pid`
#
# If the kill did not work then there is no process running for this
# pid. It may also mean that the lock file will be left. You may wish
# to delete the lock file at the same time.
        if [ ! "$?" = "0" ]; then
                rm -f /var/run/$DEVICE.pid
                echo "ERROR: Removed stale pid file"
                exit 1
        fi
#
# Success. Let pppd clean up its own junk.
        echo "PPP link to $DEVICE terminated."
        exit 0
fi
#
# The ppp process is not running for ppp0
echo "ERROR: PPP link is not active on $DEVICE"
exit 1

   /etc/ppp/keepalive.sh
#!/bin/sh

# keepalive.sh

# This is a keepalive script for the Casema cable modems. This script was
# lifted from the /usr/doc/HOWTO/unmaintained/mini/Dynamic-IP-Hacks
# document. There should be an entry in your crontab looking like:
# */2 * * * * /etc/ppp/keepalive.sh
# to run this script every 2 minutes to see if your connection is still
# up, if not, gracefully kill the pppd process and remake it.
# Modify paths as necessary.


if [ -f /var/run/ppp0.pid ]; then
 ping -c4 -l3 195.96.96.97 2>&1 | grep "0 packets" > /dev/null && \
 { /etc/ppp/ppp-off > /dev/null 2>&1 ; sleep 2 ; /etc/ppp/ppp-on }
else
 /etc/ppp/ppp-on
fi

   /etc/resolv.conf
search dynip.com
nameserver 195.96.96.97
nameserver 195.96.96.33

   /etc/sysconfig/network (this file applies only to RedHat and Mandrake
   distributions, adapt accordingly for other distributions)
GATEWAYDEV=ppp0
GATEWAY=195.96.96.97

   I've documented some things in the files themselves. The ppp-on script
   is called during boot time from /etc/rc.d/init.d/ppp and the ppp-off
   script during shutdown. The ppp-on-dialer is called from the ppp-on
   script. The keepalive script for keeping the connection alive as long
   as the computer is on (might as well, right?) is called from crontab
   (see the keepalive file for details). The /etc/sysconfig/network file
   specifies the default gateway for routing. The resolv.conf tells the
   computer which IP of casema.net to send DNS queries to (this is pretty
   standard across all unixes, I believe).
   
   I've forgotten to include the /etc/ppp/pap-secrets which should be the
   same as the [146]ExpressNet, Maryland, Maryland. There's also the
   question of the ip-up, ip-down. These however, didn't need to be
   changed. I've also included the options.ttyS0 file, which should be in
   /etc/ppp/ppp-on. It is read by the pppd daemon as it logs on. There
   are a couple options like defaultrouteadd that should be on. ttyS0 is
   the port where you install your modem mine is on COM1 == ttyS0. Change
   accordingly.
   
   /etc/ppp/options.ttyS0
asyncmap 0
crtscts
defaultroute
lock
modem
name cvd

   I received notice from Casema a couple days ago that they will be
   changing their name to [147]wanadoo.nl. So you might, in your
   document, refer to both: "wanadoo.nl (formerly casema.net)" This will
   be happening as of Sept. 20th.
   
   I will be happy to provide you with information and answer any more
   questions. I my explanations aren't Red Hat only. I haven't used other
   systems, so I can't judge. I hope this is useful to you.
     _________________________________________________________________
   
3.21. Prime Cable Expressnet, Las Vegas, NV

   This information is provided by jedi <[148]jedi@penguin.lcvm.com>:
   
   They use the Com21 which can either be connected directly to your
   10baseT input or inserted into the downlink input on your router.
   Static IPs are available for $10 per month and the usual address
   assignment is through DHCP (
   [149]http://www.oswg.org/oswg-nightly/DHCP.html )
   
   More information can be obtained from [150]http://penguin.lvcm.com.
     _________________________________________________________________
   
3.22. TVD, Belgium

   This information is provided by Pierre-Yves Keldermans
   <[151]pykeldermans@usa.net>:
   
   At home, my cable-TV company is "TVD", it is the first company to
   offer internet on the cable in Belgium.
   
     * Hardware : LanCity cable modem & 10-Base-T NIC ( DLink ISA if you
       buy it from TVD )
     * Config : DHCP ( [152]http://www.oswg.org/oswg-nightly/DHCP.html )
     * Prices :
          + Cheap : for home use, real IP address but dynamic, DHCP
            expires every 10 min, 1 user only (theorically ... ), no
            problem with firewall, the web server on my computer is even
            reachable from outside..., full speed FROM internet, small
            speed TO internet.
          + No so cheap : for small office use, same as 1) but not
            limited to 1 user and more speed TO internet.
          + Expensive : for WWW servers & ... , Static IP addresses and
            reserved bandwidth TO internet following price.
     * Speed :
          + From TVD's mirror site : up to 250Kbytes/sec, very nice ( and
            YES, they have some Linux mirrors like redhat ... :-) )
          + From internet : variable but rather good if the remote server
            isn't overloaded.
     * For more info : [153]http://www.tvd.be and
       [154]http://www.tvd.net.
     _________________________________________________________________
   
3.23. Telenet Vlaanderen, Belgium

   This information provided by Karel Goderis
   <[155]karel.goderis@pandora.be>:
   
     * Operator: Telenet Vlaanderen - Operatial in flemish speaking
       (northern) part of Belgium
     * Hardware: Motorola CyberSURFR Wave Cable Modem using an RJ-45
       Ethernet straight cable to a PC
     * Software: Standard config is Windoze + Modified Netscape for
       newbie installations, although Linux i386 support is there under
       the form of mirrored redhat.com software on the internal ftp
       servers. A dedicated linux newsgroup is available for support.
       Most users depend on ipchains/ipfwadm in 2.2.x, or have a "Linux
       Router"-project implementation.
     * IP Setup: [156]DHCP address assignment, single address only.
       Outgoing : all ports accepted, except mandatory use of Netscape
       Proxy on port 8080, and thus port 80 blocked. Incoming : ports
       0-1024 blocked, but re-allocation of ports on Linux works fine.
     * Pricing: one-off installation : BF 10000 (+-$ 250) + BF 3000 ($75)
       deposit for the cable modem (+$25 for Ethernet NIC if not present
       in pc) monthly rental : BF 1500 ($40)
     * Services: redhat.com netscape.com mirrors, quake I and II servers,
       proxy, mail relay and pop account (4 aliases) and the other usual
       stuff you need to survive on the net.
     * Caveats: Telenet states that you can download 300Mbytes/month, but
       this rule is not enforced unless there is a obvious abuse (i.e.
       you download 300Mbytes/*day* ;-) ). This limit is applied on their
       network boundary, not on what you transmit on the internal
       network, so it does not take into account what you download of the
       mirrors.
       
   More info at [157]http://www.pandora.be/ or
   [158]http://www.telenet.be/.
     _________________________________________________________________
   
3.24. Total-Web, United States

   This information is provided by iota <[159]iota@inaxx.net>:
   
   I work for Convergence.com, a cable internet company who provides the
   network monitoring, technical support, and advice to cable providers
   (who, in turn, provide the internet service to their customers). Most
   of our markets are through Cablevision, one of the more popular cable
   providers in the eastern US. The service name that they operate their
   cable internet service under is "Total-Web". Customers are provided
   with a static IP; simply set this up like you would any other ethernet
   device under Linux. The modems we use are LanCity LCP's and COM21
   ComPort's, but these devices should be transparent to your computer.
   
   Total-Web is available in limited areas, including: Miami Beach, FL;
   Gwinnett County and Roswell, GA; Cookeville, Lebanon, and Columbia,
   TN; and many other test markets.
     _________________________________________________________________
   
3.25. CyberCable, Paris, France

   This information is provided by David Monniaux:
   
   CyberCable gives you an ethernet card if you need one. It is a cheap
   NE2000 clone, ISA-Pnp or PCI I think. They only know how to set up the
   stuff for Windows, but reports from other people say that they let you
   use their access with other systems, provided you do the software
   setup yourself.
   
   They use [160]DHCP (DHCPcd) in RedHat and it worked immediately. In
   RedHat's netcfg, this means selecting "DHCP configuration". There are
   still some problems sometimes: DHCP outputs some error messages, but
   things still work afterwards generally (?). This seems related to
   rebooting; it looks like the cable system doesn't reallocate the line
   for one minute after reboot.
   
   CyberCable's web site is at [161]http://www.cybercable.fr/.
     _________________________________________________________________
   
3.26. StjrnTV, Stockholm Sweden

   This information is provided by Fredrik Staxaeng
   <[162]fstx@algorithmica.se>:
   
   StjrnTV sells a Bay Networks Versalar Cable Modem 100, and they
   include a NetGear ethernet card in the initial fee. Just set your
   interface to [163]DHCP. Info about their service is available at
   [164]http://www.starport.se.
     _________________________________________________________________
   
3.27. GCI.Net, Alaska

   This information is provided by GCI Tech Support
   <[165]support@gci.net>:
   
   GCI provides CableModem services in Alaska, currently in Anchorage,
   Juneau, and Fairbanks. GCI uses Com21 which can either be connected
   directly to your 10baseT input or inserted into the downlink input on
   your router. Static IPs are available for $10 per month and the usual
   address assignment is through [166]DHCP. More information can be
   obtained from [167]http://www.gci.net.
     _________________________________________________________________
   
3.28. Saturn Communication NZ Ltd, New Zealand

   This information is provided by Nigel Win <[168]nigelwin@the.net.nz>:
   
   The installation of Saturn Cable Modem connection is simple as
   installation of a NIC. They will only install and support the Windows
   Machines but Linux user will have no problem. They provide a static ip
   address for each connection along with class B Net mask 255.255.0.0 ,
   DNS Servers and Gateway address to use. If you are on a Redhat box,
   open the control-panel and open network configuration and simply enter
   the detail information provided by Saturn. For other linux
   distributions user should read NET-3-HOWTO.
   
   They use Com21 Cable Modem [169]http://www.com21.com and provide free
   D-Link PCI or ISA network card if you require. The monthly fee already
   includes Cable Modem rental and they offer 2 connection speed plans (
   512k/128k and 2Mbps/256K ). But they charge you on how much traffic
   you transfer :). The speed is not bad since I am getting around 90K
   for download speed at peak time.
   
   More info about Saturn is available at [170]http://www.saturn.co.nz.
     _________________________________________________________________
   
3.29. Chello, Netherlands

   This information is provided by Jaco de Groot <[171]jaco@dynasol.com>:
   
   I'm from The Netherlands and use a Terayon cable modem under Red Hat
   6.0. My provider is Chello. I have installation instructions in Dutch
   on my homepage
   [172]http://www.dynasol.nl/~jaco/redhat6.0/install.html. Chello has
   replaced all LAN-City modem in my city with Terayon modems
   (configuration remains the same because it uses the same network
   card).
   
   If you are not using RedHat check out the [173]DHCP mini-HOWTO on
   instructions how you can get your computer to connect to Chello
   network.
   
   Info about Chello can be found at [174]http://www.chello.nl/
     _________________________________________________________________
   
3.30. Adelphia Powerlink, USA

   This information is provided by Kevin Pfohl
   <[175]kspfohl@adelphia.net>:
   
   If you have a Adelphia service with a two way modem connection (e.g.
   you don't need a regular phone modem to dial in) all you have to do is
   install Linux and use [176]DHCP to get your network connection going.
   If you have a one-way modem please read info on [177]Adelphia
   Powerlink, USA.
     _________________________________________________________________
   
3.31. 21st Century Telecom, Chicago, IL, USA

   This information is provided by Jens B. Jorgensen
   <[178]jjorgens@bdsinc.com>:
   
   21st Century uses a "Regular" cable modem, that is up-stream and
   down-stream are both over the cable connection. The equipment is made
   by Zenith. The installer will bring along a NIC with them, (mine was
   an OEM Intel EtherExpress Pro 10/100) which is connected via a
   10-base-T cable (crossover?) directly to the cable modem. All 21st
   Century customers are assigned a static IP address. Just make sure
   your kernel is configured to support this card or insmod the module
   for it a configure the IP. You'll also be provided with a gateway
   address which you'll need to set the default route to. Be mindful of
   the netmask (255.255.0.0 for me) on the ether interface. Also note
   that the cable modem seems to 'learn' the ethernet address of the
   adapter you're provided with and will only work wit that adapter. I
   don't know if reseting the cable modem would cause it to relearn the
   address or not. I didn't feel the need to try the cable modem with
   another adapter.
   
   Additional notes by Mark Howard <[179]mark@xanderbelly.com>
   
   Please note that this service has been changed; they now only use
   Nortel cable modems and everyone is assigned a dynamic IP address now.
   Also, my Nortel cable modem does not seem to care which machine or MAC
   address is connected to it; I have set up multiple machines on it and
   they all worked fine. In fact, if you hang a hub directly off the
   cable modem, you can get multiple valid IP adresses assigned through
   DHCP! I wouldn't recommend this, however, as a long term solution. I
   have a RH box set up as a firewall doing NAT for me on the one
   address, and it works just great. This service is particularly good -
   I consistently get 95-100KBps, or just about a 1Mbps rate. I also live
   in a coach house rental here in Chicago, and although they wanted to
   run new cable in the apartment, I told them to use the old cable
   because it was not my place. They said they could not guarantee that
   the service would work, but of course it does work just fine! So don't
   let them talk you into running new cable if you can avoid it.
   
   Also, if you want to set up your own web server from home, I used a
   great service called [180]EasyDNS.com where you pay them $25 per year
   per domain and you can control your DNS settings (even SOA, TTL,
   etc...) 24/7/265 through a web based (PHP no less) interface. So if I
   ever need to reboot my Linux box (which I never do really) I can go in
   and update the IP address that my web server www.xanderbelly.com and
   mail server
   
   Additional notes:
   
   The terms and conditions of 21st Century cable modem contains the
   following statement:
   
   Distributing unsolicited information in any manner is prohibited on
   21st Century's network and will result in termination of 21st Century
   service. (I.e. junk email, etc...) Any use of a server type
   application or service on a computer system connected to 21st Century
   Cable Modem Service is prohibited and may result in termination of
   21st Century Cable Modem Service (i.e. web, ftp, or game servers,
   etc...). 21st Century Cable Modem Service is for client type
   applications ONLY.
   
   Also, technically, each additional dynamic IP address beyond the first
   one carries a $4.95 monthly charge.
     _________________________________________________________________
   
3.32. HTVi, Helsinki, Finland

   This information is provided by Markku Immonen
   <[181]wired.poet@sci.fi>:
   
   HTV is the local cable TV company. Their Internet product is called
   HTVi. They issue a Motorola CYBERSURFR Wave cable modem for all
   customers. It plugs into an ethernet card using a 10BaseT (RJ-45)
   cable. Customers have two options: [182]DHCP or a static IP address.
   The [183]DHCP (dynamic IP address) option is 50 Finnish marks cheaper;
   in October 1999 the prices were 245 FIM per month for a dynamic
   address and 295 FIM for a static one.
   
   I opted for a static IP. Configuration was incredibly easy. They give
   you a couple of info brochures which contain the necessary IP and
   networking information.
   
   About speed: it varies but is generally acceptable, from 30 kbytes/sec
   to 200 kbytes/sec. Your best bet is the early morning hours. The
   fastest download speed so far was 470 kbytes/sec from a Finnish
   Linuxberg mirror.
   
   More information about HTVi can be found at [184]http://www.htvi.net/.
     _________________________________________________________________
   
3.33. Garden State Cable, New Jersey

   This information is provided by Denis Voitenko <[185]denis@o3m.com>:
   
   In New Jersey Garden State Cable offers @Home. They give you a 3Com
   CMX series cable modem and a SMC PCI NIC with the DIGITAL chip. It
   works just perfect with the Tulip driver. They assign static IP
   addresses.
   
   One more interesting thing. Unlike in most places, upstream speed is
   not limited to 128kbs.
   
   Garden State cable web pages are located at
   [186]http://www.gardenstatecable.com/.
     _________________________________________________________________
   
3.34. Zoom Internet, Butler County, PA

   This information is provided by Jim Garrison <[187]garrison@olga.net>:
   
   Zoom internet [188]http://www.zoominternet.net/ is a cable ISP. They
   provide a Bay Networks cable modem, which connects to a 10-Base-T
   ethernet card. The only thing required to set it up is to enable
   [189]DHCP.
   
   Note: They provide the cable modem, but you must have your ethernet
   card working properly with [190]DHCP before the installation guys
   come.
     _________________________________________________________________
   
3.35. Charter Pipeline, St. Louis Metro Area

   This information is provided by Chris Weiss
   <[191]chris@free-source.com>:
   
   Charter gave me a 3Com cable modem that uses DHCP. I simply followed
   the [192]DHCP mini-HOWTO and my 256Kbps connection was running at over
   350Kbps!
     _________________________________________________________________
   
3.36. Netcabo, TV Cabo, Portugal

   This information is provided by Marco Soeima
   <[193]msoeima@netcabo.pt>:
   
   It's a Portuguese ISP and it's available through TV Cabo. The hardware
   consists of a RealTek ethernet card (just use the rtl8139.o module)
   and a 3Com U.S. Robotics CMX cable modem. The only thing required to
   get one's cable access up and running is configure the ethernet card
   and install [194]DHCP. After that it works like a charm!
   
   More information about Netcabo can be found at
   [195]http://www.netcabo.pt.
     _________________________________________________________________
   
3.37. Supercable, Spain

   This information is provided by Mario Galan <[196]galan@arquired.es>:
   
   The setup isn't so much different than other Cable providers. They
   offer a SMC (I think) network card but you can use yours if you want.
   They then install a cable modem made by com21 (http://www.com21.com).
   IP setup is easy since it uses DHCP so I don't think you should have
   any problems under a modern linux distribution.
   
   Last thing worth to be said is that Supercable doesn't provide support
   for Linux but you can always ask your questions in news.supercable.es
   in the Linux area. Their web page is located at
   [197]http://www.supercable.es/ (WARNING: get ready to download an
   almost 1MB of useless Macromedia's Flash garbage).
     _________________________________________________________________
   
3.38. NTL, United Kingdom

   This information is provided by cogNiTioN
   <[198]cog-cablemodem@cognite.net>:
   
   This assumes that you've spoken to NTL, you have the cable modem, the
   cable line installed and your network card installed and recognised.
   You should also have you MAC address registered with NTL. (NTL
   contact: [199]http://www.ntl.com/cablemodems/)
   
   Now all you have to do is connect your cable modem to your network
   card and run the DHCP client. I've found that you have to specify the
   username you supplied during the registration process, on the command
   line: e.g. root # dhcpcd -h cognition (substitute cognition for your
   user name.). For any other problems with DHCP please check out the
   [200]DHCP mini-HOWTO.
   
   I've also found that occasionally the 3COM CMX modem used needs to be
   rebooted (power off, press the reset button on the back, power on) if
   left connected 24/7.
   
   Nameservers used by NTL are: 194.168.4.100 and 194.168.8.100, so those
   should be added to your /etc/resolv.conf.
   
   I've found NTL's tech support to be close to useless, most the time
   and they don't officially support Linux, so you're probably better off
   contacting your local LUG ([201]http://www.lug.org.uk/ ), or you could
   even try mailing me direct (but I don't promise to be able to
   respond).
     _________________________________________________________________
   
3.39. Virtua, So Paulo, Brazil

   This information is provided by Thiago Macieira
   <[202]thiagom@mail.com>:
   
   IP is assigned dynamically via DHCP. Just run dhcpcd or pump to get
   the IP and you're done. For more detailed instructions on how to get
   DHCP running read the [203]DHCP mini-HOWTO.
   
   Notes: operator blocks incoming connections to ports below 1024
     _________________________________________________________________
   
3.40. Hathway, Bombay, India

   This information is provided by Rishi Gangoly <[204]rishi@w-o-i.com>:
   
   The tech support guys at Hathway were not Linux Savvy at all, but I
   must say were quite helpful. They even referred me to another customer
   who got Linux to work with it. However, that person was only able to
   get it to work on Linux as a stand-alone workstation and not as a
   gateway (as a router) for his entire network.
   
   Since I was not even able to get it to work as a stand-alone
   workstation I knew I had a long way to go. The Windows 98 Workstation
   configuration was a Celeron Workstation and it had a 10/100 D-Link Lan
   Card Chipset RTL 8139 . The IP address was manually entered, so I knew
   that there was no DHCP Client required etc.
   
   Even the DNS and Gateway address was manually entered.
   
   I was able to do a ping without any problem in Windows to any site and
   things were just happening. However, I had no luck with it in Linux. I
   installed Linux on the same machine (Dual Boot) to make sure there was
   any Hardware compatibility problems.
   
   I even got the workstation to hook up on the LAN successfully in
   Linux. So I knew that the Lan Card was working.
   
   I noticed that when I connected the Cable Modem to the LAN card I was
   not able to see any of the Link LED light up on the LAN Card. So I
   figured that could be part of the problem. I booted the PC in DOS and
   ran the DIAG DOS based utility to check the configuration of the Card.
   I just decided to take a chance and re-configured the LAN Card. I
   configured it to operate in 10 MBPS Half Duplex Mode instead of Auto
   Sense.
   
   .......... Guess what..... The problem got solved ;-)
   
   Even the lights (LED Link indicators) started to work, so all was
   good. ;-) At the end of everything it all worked out. I plugged that
   lan card into the linux server (since I knew it worked) and got it to
   work as a router / gateway too. I still wonder why the other customer
   was not able to get the Linux Box to work as a gateway for the rest of
   his network. That was no big deal at all. It just worked. The Cable
   Modem that was used (provided by Hathway) was a SurfBoard 3100
     _________________________________________________________________
   
3.41. Siti Cable, Bangalore, India

   This information is provided by Vinay Avasthi
   <[205]vinay@avasthi.com>:
   
   Zee Telefilms has partnered with Siti Cable in Bangalore, India to
   provide cable modem service. I subscribed to this service and it kind
   of worked out of the box from linux.
   
   I am using Redhat 6.1 on a IBM Thinkpad 600 with Xircom Realport
   Ethernet card. On autodetect links mentions that the card will be used
   in 10MB/s only.
   
   Only problem that I faced was on shutdown, the system will hang while
   shutting down pump. To temporarily fix the problem I just put that
   particular like in rc-scripts to background.
   
   The steps that one needs to perform are as follows.
   
     * - Need to have an ethernet card that works with Linux.
     * - Enable DHCP by using pump. For some reason dhcpd does not seem
       to work.
       
   Only thing that I would suggest is to be careful regarding support
   since the tech support do not seem to know much about software.
     _________________________________________________________________
   
3.42. Com Hem, Sweden

   This information is provided by Zoltan Arpadffy
   <[206]arpadffy@polarfox.com>:
   
   com hem [207]http://www.comhem.se/ is a Swedish cable TV/Internet
   provider, a sub-company of Telia [208]http://www.telia.com/ the
   biggest Scandinavian carrier. com hem does not support any other OS
   but Windows and Mac-OS (as com hem support claims ), but it is not so
   complicate to set up on Linux as well.
   
   com hem sells NetGame's cable modem (NeMo). Initial speed is 512 kb/s
   and it can be set up to 10Mb/s. You can order it with or without
   Ethernet card. com hem internet service is available in the bigger
   cities all over Sweden.
     _________________________________________________________________
   
3.42.1. 1. Setting up a single node

     * set up your network card to work properly ([209]Ethernet HOWTO)
     * configure DHCP to that card (DHCP mini-HOWTO)
     * you need some browser what supports Java-script (as Netscape) and
       go to the login site [210]http://login1.telia.com/
     * - fill in your user-name and password (provided by com hem) ...
       and you're there.
       
Network what you'd become a member is:
        IP address: Assigned by com hem
        Subnet mask: 255.255.255.0
        Default GW: Assigned by com hem
        Hostname: Assigned by com hem
        Domain name: telia.com
        Primary DNS server (nameserver): 10.0.0.1
        Secondary DNS server (nameserver): 10.0.0.2
     _________________________________________________________________
   
3.42.2. 2. Connecting your home LAN (if you have more than one machine)

   We have to turn one computer to gateway (I did it with an old Pentium
   66MHz/16M)
   
     * install two network cards in your gateway [211]NET3-4 HOWTO
     * first set up (and connect) to your LAN
     * second network card have to use DHCP ([212]DHCP mini-HOWTO)
     * enable ip forwarding
       
net.ipv4.ip_forward = 1 in /etc/sysctl.conf or by
echo "1" > /proc/sys/net/ipv4/ip_forwarding

     * set up IP masquerade ([213]IP Masquerade mini-HOWTO)
       
ipchains -P forward DENY
ipchains -A forward -s your_network_here/24 -j MASQ

       (for me it was ipchains -A forward -s 192.168.10.0/24 -j MASQ)
       check your routing table with route command... it should be
       something like below:
       
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
gate.polarfox.h *               255.255.255.255 UH    0      0        0 eth0
telia-net       *               255.255.255.0   U     0      0        0 eth1
polarfox-net    *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         h2n5fdt22o429.t 0.0.0.0         UG    0      0        0 eth1

       Useful literature for security issues is [214]Linux IPCHAINS HOWTO
     * configure default gateway for all other hosts in your LAN. On unix
       nodes it should look something like:
       
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
sea.polarfox.ho *               255.255.255.255 UH    0      0        0 eth0
polarfox-net    *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         gate.polarfox.h 0.0.0.0         UG    0      0        0 eth0

       Default gateway setup for other OSs you can find a very nice
       description in IP Masquerade mini-HOWTO
     * configure name server on your gateway DNS HOWTO or just set up
       your hosts to use Telia's name server (10.0.0.1)
     * log in from any host [215]http://login1.telia.com/ and you're on
       the road with all your LAN.
     _________________________________________________________________
   
3.42.3. Problems:

     * If you don't use browser with Java-script support, you can not log
       in. Solution: there is no elegant solution. Without it you can not
       log in and open the connection.
     * After some network inactivity period (10-15 minutes) your
       connection will be terminated and you have to log in again...
       meanwhile your gateway and all your inner services will be
       unreachable from outside as well (if you're running some web
       server at home etc). Solution: start one ping process or even more
       elegant solution is to submit one cron job for every 5-10 minutes
       on the gateway, to "do something" though the network.
       
   I did it with /etc/cron.d/keep-alive file when contains:
# fake connection in order to keep line alive
# every 5 minutes send some packages
MAILTO=""
*/5 * * * * ping -f -c 5 www.polarfox.com
     _________________________________________________________________
   
3.43. SwissOnLine HiSpeed Internet, Switzerland

   This information is provided by Nick Barnes <[216]nick@debau.ch>:
   
   This assumes that you have registered (either on-line or via snail
   mail) with SwissOnLine and you have received your cable modem, have
   plugged it in and ensured that it boots correctly as per the
   installation instructions.
   
   At the time of speaking, SwissOnLine HiSpeed provide COM-21 modems
   (http://www.com21.com) complete with two different kinds of Antanae
   leads and an antenna splitter.
   
   You will require a standard 10BaseT ethernet cable to plug the modem
   into either a network card installed in a PC or the uplink port of a
   10BaseT hub. To plug the modem into a normal hub port, you will
   require a crossover cable.
   
   All information is provided to the host via DHCP, with no special
   parameters needed in the call. The modem is not locked down by MAC
   address.
   
   Providing it is not rebooted, the modem appears to grant the same IP
   address to the host. While this is not guaranteed with anything other
   than the static IP address option on the business account, I have not
   seen my address change in the time I have had the modem.
   
   Be wary of any device on your local ethernet which makes DHCP
   requests. The modem is not fussy which devices it allocates addresses
   to and it appears to offer the same IP address to _any_ machine which
   makes a DHCP request.
   
   SwissOnLine do not support Linux directly, but they are aware of its
   existance!
     _________________________________________________________________
   
3.44. Liwest, Austria

   Information provide by Bernd Haug <[217]haug@liwest.at>:
   
   I'm connected through an Austrian cable provider called Liwest. The
   support eMail is <[218]helpdesk@liwest.at>, the homepage is
   [219]http://www.liwest.at/.
   
   The modem is a Terayon, the box gets connected via TP cable. The modem
   works great with my ethernet hardware (3com 905b, vortex driver) as
   well under Linux as under Windows. Macs are supported, too.
   
   None of my Friends, who use very various hardware and/or OS(versions)
   have any problems with incompatibilities.
   
   The configuration is done manually (no DHCP, but it's *really* easy
   since the information sheets are very compact & informative),
   customers get fixed IPs and DNS entries. Running servers over the
   cable line is forbidden, no firewall, but ports 80, 21 usw are scanned
   on a regular base.
   
   Use of bandwidth is limited neither in volume nor in time.
   
   The provider had great availability problems a while ago, but they
   seem more or less fixed now; I am content with the Service. Transfers
   go up to ~30k (intercontinental, too).
   
   Please contact Bernd if you have additional questions. He has kindly
   agreed to provide assistance to any current or new Linux user.
     _________________________________________________________________
   
4. Hybrid Cable modem ISPs

   If you think you have the card recognized you have to now look at the
   entry for your ISP. I have sorted the information according to a
   provider because setups are mostly ISP specific.
   
   This section is for people who are using so-called "hybrid" cable
   modems. Hybrid modems are modems that need two hookups (connections),
   one to the (TV) cable and one to the phone line. TV cable is used for
   downloading while phone line is used for uploading.
     _________________________________________________________________
   
4.1. Adelphia Powerlink, USA

   Instructions on how to get your Adelphia Powerlink hybrid modem
   running under Linux can be found at [220]http://linuxpower.cx/~cable/
     _________________________________________________________________
   
4.2. LinkExpress, Brasil

   This information is provided by Rodrigo Severo <[221]rodrigo@who.net>:
   
   First of all, let me tell you that here we have the MMD Cable Modem
   from General Instrument. We use SurfBoard 1000 ISA board for download
   and a regular telephone modem for upload. I would prefer to use an
   external board like the SurfBoard 1200 which is available only to
   corporate users, i.e., willing to pay US$ 200,00 instead of the
   regular US$ 30,00 so I found out this driver for the internal ISA
   board. For home users, Linkexpress (my ISP) just installs and supports
   the internal ISA board - Surfboard 1000. If you want to use it, you
   have to install Windows 95/98 on your computer and let the guy from
   Linkexpress install the equipment. After that, make your Linux
   installation as you like.
   
   I started from the files I downloaded from
   [222]http://linuxpower.cx/~cable/.
   
   Here is the relevant data:
   
     * ISP: LinkExpress [223]http://www.linkexpress.com.br
     * DNS: 200.252.88.20
     * Frequency: 351 MHz
     * Phone number: 321 3300
     * City: Brasilia
     * Province: Distrito Federal
     * Upload speed: regular 33.6K (just the download goes through the
       cable modem)
       
   During a download from a local tucows mirror I got 70KB~300KB per
   second. From distant sites I managed to get 30KB/s a few times.
   
   More information about LinkExpress can be found at
   [224]http://www.linkexpress.com.br/.
     _________________________________________________________________
   
4.3. ExpressNet, Maryland

   I recently accuired an expressnet cable modem for the maryland area.
   it is a com21 one way modem and I had a hell a time making it work so
   id like to share my knowledge in your faq maybe? well heres what I
   learned inorder for the PPP connection to authenticate the user must
   be running PAP which consists of editing the /etc/ppp/pap-secrets file
   accordingly:
#/etc/ppp/pap-secrets
#this is the PAP secrets file for PPP
#the quotes are required on both
"username"      *       "password"

   after that they must create a PPP-on script what ever name it must
   execute this command:
exec /usr/sbin/pppd debug persist /dev/ttyS1 38400 0.0.0.0:0.0.0.0 connect "cha
t -v TIMEOUT 3 ABORT 'BUSY' ABORT 'NOANSWER' '' ATH TIMEOUT 30 'OK' ATDTTELEPHO
NE CONNECT ''"

   this must be done with no carrage returns either
   
   next step is to modify the /etc/ppp/ip-up.local file if it does not
   exist it should be created it should read the following:
#!/bin/bash
#/etc/ppp/ip-up.local
#this will set up the route to the ppp device as default everytime the modem
#authenticates dont include it if you do not want this option
route add default ppp0

   then the user must configure their ethernet card on box I have a
   3c905.
   
   I configured it the following way:
ifconfig eth0 up
ifconfig eth0 10.0.0.1 broadcast 10.0.0.15 netmask 255.255.255.240

   then I added some more routes to the kernel routing table as follows:
route add -host 10.0.0.1 eth0
route add -net 10.0.0.0 eth0

   all of these commands can be added into a script file as follows
#!/bin/bash
#This is a script file for establishing the cable modem IF device properties as
#well as the route properties
ifconfig eth0 up
ifconfig eth0 10.0.0.1 broadcast 10.0.0.15 netmask 255.255.255.240
route add -host 10.0.0.1 eth0
route add -net 10.0.0.0 eth0

   thats all and the cable modem connection is setup fast as hell I might
   add.
   
   Contributors: Chris <[225]chris@wrm.grdn.net> and Mike Milbert
   <[226]mike@milbert.com>.
     _________________________________________________________________
   
4.4. Charter Pipeline, Riverside, CA

   This information is provided by Gabriel Peters
   <[227]gpx1@earthlink.net>:
   
   (I have Charter Pipeline, Powered by Earthlink, Riverside, CA) The
   modem is a Com21 ComPORT 2000.. connected to the computer via 10 BaseT
   ethernet cable to a Linksys 10/100 ethernet card (Cable modem,
   ethernet cabling, and ethernet card supplied) The ethernet card driver
   that I had to compile into the kernel was for the DEC Tulip.
   auto-detected the card and set it up nicely.
   
   This is the information I needed:
eth0 IP address - 10.0.0.1
DNS Servers - 207.217.126.81, 207.217.120.83
Subnet Mask - 255.255.255.240
Gateway: None
Your hostname should be CBL-(your username).hs.earthlink.net

   Then you need to configure PPP to dial up your access number as
   normal.. What I had to do to get it to work was this: I typed ifconfig
   eth0 down to shutdown the ethernet, ppp-go to dial in, once it
   reported my IP addresses, i typed ifconfig eth0 up and voila, it
   worked perfectly.
   
   Editor's comment:
   
   Each time PPP link is brought up or down pppd executes scripts
   /etc/ppp/ip-up (link up) and /etc/ppp/ip-down (link down) so in order
   to have Ethernet network go up and down with PPP link simply add:
ifconfig eth0 up

   before exit 0 statement in /etc/ppp/ip-up and ifconfig eth0 down in
   ip-down.
     _________________________________________________________________
   
4.5. Chambers Cable, Chico, CA / Fundy Cable, New Brunswick

   This information is provided by Brian Moore <[228]bem@cmc.net>:
   
   For those using Chambers Cable in Chico, CA, the product is the
   Scientific Atlanta data Xcellerator(tm) modem. Mike Cumings of Cal
   State University wrote a nifty driver for it, available at
   [229]http://www.ecst.csuchico.edu/~mcumings/cablemodem/. This should
   also work for others using the same modem, such as Fundy Cable of New
   Brunswick.
     _________________________________________________________________
   
4.6. Smyrna Cable, Atlanta, GA

   This information is provided by Blake Sorensen
   <[230]librarian@unseen.net>:
   
   I have Smyrna Connect, supported by Smyrna Cable in Atlanta, GA. They
   are currently (June, 1999) using half-duplex but are scheduled to have
   full-duplex within six months. The Cable Modem is a ComPort Com21.
   Here is the configuration stuff I needed to get my linux box running
   as my dialup.
   
   My eth0 device is a 3com ISA card set to IP 10.0.0.1, Bcast
   10.0.0.255, Mask 255.255.255.0.
   
   The machine is set to the hostname Smyrna418.smyrnacable.net where
   Smyrna418 is my username. I don't think this is that important, but I
   haven't fiddled with it to see if it will still work once I change the
   hostname.
   
   My modem is an external 56K X2 US Robotics on /dev/ttyS0.
   
   I also have eth1 (a DEC tulip based pci card) set up as 192.168.0.1 as
   the gateway for the rest of my network to masquerade behind.
   
   Smyrna Connect does not give you DNS info for the cablemodem since you
   are supposed to use the Windows PPP feature of using the default DNS
   for the server you dial in to. However, they do have one that works at
   209.116.152.252.
   
   I use a ppp connection script to dial in, but the guts of it is this:
/usr/sbin/pppd modem /dev/ttyS0 persist mru 1000 asyncmap 0 \
-detach crtscts user Smyrna??? defaultroute connect '/usr/sbin/chat \
ABORT BUSY ABORT ERROR "" ATZ OK ATDT7704365664 CONNECT' \
57600 0.0.0.0:0.0.0.0 &

   I keep the persist in there since Smyrna Connect has a habit of
   dropping the connection every once in awhile, and this way it
   automatically dials back in. You will need to replace the Smyrna??? in
   the above command with your own username and put the line:
Smyrna???       Smyrna???       password

   in the file /etc/ppp/pap-secrets.
     _________________________________________________________________
   
4.7. Amnet de Costa Rica, Costa Rica

   This information is provided by Roberto Salvatierra
   <[231]chuby@internettico.com>:
   
   Ok to set up a Hybrid cable modem conection using Costa Rica's Amnet
   Provider is not all that hard ( once you get the hang of it ) is like
   the other providers that use com21 modems, but with some minor
   diferences.
   
   My Hardware is:
CableModem: Com21 ComPort 1000
Modem     : Rockwell 56k
Ethernet  : Ne2k PCI clone
Machine   : i386
Os        : Debian 2.1
Kernel    : either a 2.2.x or a 2.3.x*

   The first thing I did was disable my whole networking system, mainly
   because i had a real mess on my routing tables, hosts, and resolv.conf
   files ( I was using several ISP's and an intranet ) so I opted for
   this but that was just me, I even stopped lo so I started with a clean
   config.
   
   okey first of all if you have a dual system ( win/linux ) make sure
   the system is working under windows, that way we can make sure
   everything is up and running, after that, reboot to linux**.
   
   If you don't have a dual system I found something interesting that
   MIGHT help you state if the cablemodem and the eth card are
   functional, first, type this on your system:
ifconfig eth0 up
ifconfig eth0 10.0.0.1 netmask 255.255.255.240
route add -host 10.0.0.1 eth0

   after that look in your system log files for pings from 10.0.0.4 ( I
   have no idea why but this machine keeps "pinging" my box ,I asked
   amnet's help desk what was this all about, and they didn't give me an
   answer I guess they do It to check the network integrity) well anyhow,
   if you get this pings means that amnet connection is working okey.
   
   well after we have stated that the cable modem is up and running the
   rest is quite easy.
   
   if you did the above step now lets bring eth0 down ( ifconfig eth0
   down )
   
   first lets place amnet's DNS where it sould be in /etc/resolv.conf so
   we need to add this:
search amnet.co.cr
nameserver 196.40.3.10

   okey now we need a ppp script for the modem
   
   this one works: ( we all use the same username "amnet" and password
   "conexion" so for this to work just cut and paste)
exec /usr/sbin/pppd /dev/ttyS1 57600 0.0.0.0:0.0.0.0 debug user amnet
defaultroute connect "chat -v TIMEOUT 60 ABORT 'BUSY' ABORT 'NOANSWER' ''
ATH TIMEOUT 60 'OK' ATDT2969130 CONNECT ''"

   amnet uses PAP (password authentication protocol) to authenticate
   users so we need to add a line to /etc/ppp/pap-secrets:
"amnet" * "conexion"

   okey now you need to bring ppp up so just run that script to check
   that it works type: ifconfig, now you should have something like this:
ppp0      Link encap:Point-to-Point Protocol
          inet addr:196.40.3.177  P-t-P:196.40.30.114  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:1 dropped:0 overruns:0 frame:1
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          Collisions:0

     Important: make sure at this point that you do not have eth0 up or
     it WILL NOT WORK
     
   okey after you have this working type this:
ifconfig eth0 up
ifconfig eth0 10.0.0.1 netmask 255.255.255.240
route add -host 10.0.0.1 eth0

   now type ifconfig you should have something like this:
eth0      Link encap:Ethernet  HWaddr 00:00:21:61:7C:F0
          inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.255.255.240
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5594 errors:0 dropped:0 overruns:0 frame:0
          TX packets:241 errors:0 dropped:0 overruns:0 carrier:0
          Collisions:0
          Interrupt:11 Base address:0xde00

ppp0      Link encap:Point-to-Point Protocol
          inet addr:196.40.3.142  P-t-P:196.40.30.114  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:2 dropped:0 overruns:0 frame:0
          TX packets:65 errors:0 dropped:0 overruns:0 carrier:0
          Collisions:0

   and voila , your conection is up and running !!
   
   some tips:
   
   when you are not connected your eth should be DOWN activate eth only
   AFTER ppp is running OR IT WILL NOT WORK.
   
   To make this you can add the eth up and down scripts to /etc/ppp/ip-up
   and /etc/ppp/ip-down scripts ( on debian just place them on
   /etc/ppp/ip-up.d and /etc/ppp/ip-down.d )
   
   ip-up should contain this:
ifconfig eth0 up
ifconfig eth0 10.0.0.1 netmask 255.255.255.240
route add -host 10.0.0.1 eth0

   and ip-down this:
ifconfig eth0 down

   now here is a WORKING route table that might help you troubleshooting
   the system: ( my HOSTN = hostname )
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
HOSTN.amnet.co. *               255.255.255.255 UH    0      0        0 eth0
196.40.30.114   *               255.255.255.255 UH    0      0        0 ppp0
HOSTN.amnet.co. *               255.255.255.240 U     0      0        0 eth0
default         196.40.30.114   0.0.0.0         UG    0      0        0 ppp0

   Relevant Information:
DNS      : 196.40.3.10
----- eth0 -----
IP       : 10.0.0.1
NetMask  : 255.255.255.240
Bcast    : 10.255.255.255
Gateway  : NONE
----- ppp ------
IP       : 196.40.X.X (Dhcp Pool)
NetMask  : 255.255.255.255
Bcast    : Unknown
Gateway  : Self Default

   that's all folks !!
   
   if you need this in spanish look for it in:
   [232]http://www.internetTICO.com/cablemodem.html
   
   Questions/comments: <[233]chuby@internettico.com>. Please use the
   subject CABLEMODEM or I will not answer.
   
   Biography: Linux Cable Modem mini-how-to Chapter: Hybrid cable modems
   sections, 4.2 and 4.4
   
   * about using 2.3.x kernels, this are unstable as anyone knows but I
   found that the performace with this kernel and amnet is LOUSY ( like a
   14K modem ) I DO NOT RECOMEND USING IT, but anyhow if you do use it
   and you get that your machine does not have ppp do not panic just
   upgrade your pppd program, 2.3.x kernels use a split async sync
   interface so pppd < 2.3.10 will NOT work.
   
   ** sometimes when I'm using the cable modem on windows and I reboot to
   linux the modem gets "stupid" so I need to turn off the modem, the
   machine, then turn on the modem and restart the machine after that it
   always work. I have no Idea why this happens but I'm guessing that the
   ethernet card has a different hardware address on windows and linux
   (wierd) and that the modem keeps this config on an memory, and that it
   needs to be cleand up for it to work, so if it was working on windows
   and you are not getting even a ping on linux try this.
   
   More info about Amnet can be obtained at [234]http://www.amnet.co.cr/.
     _________________________________________________________________
   
4.8. Prime Cable, Chicago, IL

   This information is provided by Eric Agnew
   <[235]agnew@goku.dyndns.org>:
   
   I just got a hybrid com21 setup w/ Prime Cable in Chicago, and I have
   a very important addition that will save other users (particularly
   debian users w/ newer kernels) a LOT of grief:
   
   When I initially set everything up, I was able to establish the ppp
   connection just fine, but the only things coming back over eth1 were
   broadcast packets from an internal (10.0.0.x) network. After 3 weeks
   of extreme frustration, I finally found the solution in the kernel
   docs under Documentation/networking/README.sb1000:
   
   Solution -- As root type:
echo 0 > /proc/sys/net/ipv4/conf/cm0/rp_filter'

   so it can share the same IP address as the ppp0 interface.
   
   The boot-time script that sets this normally on debian systems is in
   /etc/init.d/networking, in the 'spoofprotect_rp_filter' function. I
   simply added 'echo 0 > /proc/sys/net/ipv4/conf/eth1/rp_filter' after
   it had done everything else. To be sure, I also added it to a script I
   added to /etc/ppp/ip-up.d that brought eth1 up if I was using the
   cable connection (as opposed to my other straight-ppp connection).
     _________________________________________________________________
   
4.9. Millennium Digital Media, Maryland

   This information is provided by Mike Miller
   <[236]CableModem@mikemiller.net>:
   
   I live in Maryland (Anne Arundel County) where my cable company is
   Millennium Digital Media ( [237]http://millenniumdigitalmd.com/ ),
   which offers Cable Modem service from Cablespeed (
   [238]http://cablespeed.com/ ). Since most areas aren't currently
   upgraded to 2-way digital service, for now they're giving us a General
   Instruments SURFboard SB2100D external (hybrid) cable modem (which
   includes a 33.6 modem), so you plug the cable and phone line right
   into the cable modem -- no need to use your own modem or set up ppp or
   anything. The modem uses DHCP to determine all the settings and
   connect to the network, so all I have to do it switch on the modem and
   it automatically dials up and connects to the network. To get Linux
   working, all I had to do was load and configure dhcpd (or
   dhcp-client). Since I'm using Debian, all I ran was:
   apt-get install dhcp-client

   and voila! I was on the net.
   
   If you're running something other than Debian, please read DHCP
   mini-HOWTO at [239]http://www.oswg.org/oswg-nightly/DHCP.html.

References

   1. Cable-Modem.html#INTRODUCTION
   2. Cable-Modem.html#AEN22
   3. Cable-Modem.html#AEN27
   4. Cable-Modem.html#AEN31
   5. Cable-Modem.html#AEN42
   6. Cable-Modem.html#AEN47
   7. Cable-Modem.html#ETHERNET
   8. Cable-Modem.html#ISPS
   9. Cable-Modem.html#MEDIAONE
  10. Cable-Modem.html#HOME
  11. Cable-Modem.html#AEN154
  12. Cable-Modem.html#AEN169
  13. Cable-Modem.html#AEN182
  14. Cable-Modem.html#JONES
  15. Cable-Modem.html#AEN213
  16. Cable-Modem.html#AEN226
  17. Cable-Modem.html#AEN232
  18. Cable-Modem.html#AEN237
  19. Cable-Modem.html#AEN264
  20. Cable-Modem.html#AEN272
  21. Cable-Modem.html#AEN292
  22. Cable-Modem.html#AEN318
  23. Cable-Modem.html#A2000
  24. Cable-Modem.html#AEN338
  25. Cable-Modem.html#AEN356
  26. Cable-Modem.html#AEN371
  27. Cable-Modem.html#AEN381
  28. Cable-Modem.html#AEN387
  29. Cable-Modem.html#AEN435
  30. Cable-Modem.html#AEN443
  31. Cable-Modem.html#AEN474
  32. Cable-Modem.html#AEN497
  33. Cable-Modem.html#AEN503
  34. Cable-Modem.html#AEN512
  35. Cable-Modem.html#AEN519
  36. Cable-Modem.html#AEN526
  37. Cable-Modem.html#AEN535
  38. Cable-Modem.html#AEN545
  39. Cable-Modem.html#AEN552
  40. Cable-Modem.html#AEN566
  41. Cable-Modem.html#AEN577
  42. Cable-Modem.html#AEN585
  43. Cable-Modem.html#AEN594
  44. Cable-Modem.html#AEN600
  45. Cable-Modem.html#AEN608
  46. Cable-Modem.html#AEN615
  47. Cable-Modem.html#AEN627
  48. Cable-Modem.html#AEN634
  49. Cable-Modem.html#AEN646
  50. Cable-Modem.html#AEN660
  51. Cable-Modem.html#AEN720
  52. Cable-Modem.html#AEN731
  53. Cable-Modem.html#HYBRID
  54. Cable-Modem.html#ADELPHIAHYBRID
  55. Cable-Modem.html#AEN752
  56. Cable-Modem.html#EXPRESSNET
  57. Cable-Modem.html#AEN802
  58. Cable-Modem.html#AEN823
  59. Cable-Modem.html#AEN829
  60. Cable-Modem.html#AEN846
  61. Cable-Modem.html#AEN908
  62. Cable-Modem.html#AEN918
  63. http://www.cs.unm.edu/~vuksan/linux/Cable-Modem.html
  64. mailto:vuksan-feedback@veus.hr
  65. mailto:dsulli@home.com
  66. http://www.opencontent.org/opl.shtml
  67. http://www.linuxdoc.org/HOWTO/Ethernet-HOWTO.html
  68. http://www.oswg.org/oswg-nightly/DHCP.html
  69. http://www.mediaone.com/
  70. Cable-Modem.html#MEDIAONE
  71. http://support.3com.com/infodeli/tools/nic/index.htm
  72. mailto:sstancil@home.com
  73. http://www.linuxforum.com/plug/projects.html
  74. http://www.monmouth.com/~jay/Linux/
  75. mailto:akaiceman@hotmail.com
  76. mailto:dan@sidhe.org
  77. http://www.kernel-panic.com/user_files/cox.at.home.html
  78. mailto:jstormes@gtfcu.com
  79. mailto:mrscoobdoo@home.com
  80. mailto:positron@redstroke.com
  81. mailto:no_robmars_spam@yahoo.com
  82. mailto:miracle@procyon.com
  83. mailto:andywjones@home.com
  84. mailto:nuisance@DELETE_BEFORE_SENDINGcmu.edu
  85. Cable-Modem.html#SOLOMON
  86. http://www.home.com/
  87. http://www.oswg.org/oswg-nightly/DHCP.html
  88. http://www.math.uakron.edu/RoadRunner/
  89. http://people.qualcomm.com/karn/rr/index.html
  90. http://www.vortech.net/rrlinux/
  91. mailto:pjb@rocsoft.com
  92. http://www.rr.com/
  93. mailto:randal.leavitt@home.com
  94. http://members.home.net/randal.leavitt/CableModemConnectionNotes.html
  95. mailto:gregjacobs@home.com
  96. http://www.rogers.home.com/
  97. http://www.sunflower.com/
  98. mailto:gladiatr@artorius.sunflower.com
  99. http://www.gtecablemodem.com/
 100. http://computingcentral.msn.com/topics/bandwidth/speedtest.asp
 101. mailto:peenchee@asu.edu
 102. Cable-Modem.html#JONES
 103. mailto:breu@cfu.net
 104. mailto:mib@post.com
 105. http://www.oswg.org/oswg-nightly/DHCP.html
 106. http://www.users.bigpond.net.au/bpalogin/
 107. http://www.users.bigpond.net.au/bpalogin/tutorial.html
 108. http://www.users.bigpond.net.au/bpalogin/tutorial.html
 109. http://www.fibertel.com.ar/
 110. http://www.oswg.org/oswg-nightly/DHCP.html
 111. mailto:gwynp@artware.qc.ca
 112. mailto:mihaip@videotron.ca
 113. ftp://ftp.videotron.ca/pub/linux/
 114. mailto:s_kogan@alcor.concordia.ca
 115. http://www.videotron.ca/
 116. ftp://ftp.redhat.com/pub/contrib/hurricane/SRPMS/3c5x9utils-1.0-3.src.rpm
 117. ftp://ftp.redhat.com/pub/contrib/readmes/3c5x9utils-1.0-1.README
 118. mailto:marcel.ebmer@chello.at
 119. http://www.telekabel.at/
 120. http://www.oswg.org/oswg-nightly/DHCP.html
 121. http://huizen.dds.nl/~frodol/
 122. http://www.tebenet.nl/
 123. mailto:J.A.List@speed.A2000.nl
 124. http://agvk.a2000.nl/antwoorden/linux/
 125. http://noordholland.coax.nl/instellingen.html
 126. mailto:pmok@shaw.wave.ca
 127. http://shaw.home.com/
 128. http://www.shaw.ca/
 129. http://www.oswg.org/oswg-nightly/DHCP.html
 130. Cable-Modem.html#HOME
 131. Cable-Modem.html#HOME
 132. https://profile.home.net/Users/menu.htm
 133. http://www.ee.ualberta.ca/~pmok/linux/
 134. mailto:sean@incisive.dhs.org
 135. http://www.oswg.org/oswg-nightly/DHCP.html
 136. mailto:togrady@cgocable.net
 137. http://www.oswg.org/oswg-nightly/DHCP.html
 138. http://incisive.dhs.org/
 139. mailto:islesfan@nassau.cv.net
 140. http://www.netaxis.com/~wharris/optimum/index.html
 141. mailto:jieyao@letterbox.com
 142. http://www.oswg.org/oswg-nightly/DHCP.html
 143. mailto:Jerome.Sautret@wanadoo.fr
 144. http://www.oswg.org/oswg-nightly/DHCP.html
 145. mailto:cvd@casema.net
 146. Cable-Modem.html#EXPRESSNET
 147. http://www.wanadoo.nl/
 148. mailto:jedi@penguin.lcvm.com
 149. http://www.oswg.org/oswg-nightly/DHCP.html
 150. http://penguin.lvcm.com/
 151. mailto:pykeldermans@usa.net
 152. http://www.oswg.org/oswg-nightly/DHCP.html
 153. http://www.tvd.be/
 154. http://www.tvd.net/
 155. mailto:karel.goderis@pandora.be
 156. http://www.oswg.org/oswg-nightly/DHCP.html
 157. http://www.pandora.be/
 158. http://www.telenet.be/
 159. mailto:iota@inaxx.net
 160. http://www.oswg.org/oswg-nightly/DHCP.html
 161. http://www.cybercable.fr/
 162. mailto:fstx@algorithmica.se
 163. http://www.oswg.org/oswg-nightly/DHCP.html
 164. http://www.starport.se/
 165. mailto:support@gci.net
 166. http://www.oswg.org/oswg-nightly/DHCP.html
 167. http://www.gci.net/
 168. mailto:nigelwin@the.net.nz
 169. http://www.com21.com/
 170. http://www.saturn.co.nz/
 171. mailto:jaco@dynasol.com
 172. http://www.dynasol.nl/~jaco/redhat6.0/install.html
 173. http://www.oswg.org/oswg-nightly/DHCP.html
 174. http://www.chello.nl/
 175. mailto:kspfohl@adelphia.net
 176. http://www.oswg.org/oswg-nightly/DHCP.html
 177. Cable-Modem.html#ADELPHIAHYBRID
 178. mailto:jjorgens@bdsinc.com
 179. mailto:mark@xanderbelly.com
 180. http://www.easydns.com/
 181. mailto:wired.poet@sci.fi
 182. http://www.oswg.org/oswg-nightly/DHCP.html
 183. http://www.oswg.org/oswg-nightly/DHCP.html
 184. http://www.htvi.net/
 185. mailto:denis@o3m.com
 186. http://www.gardenstatecable.com/
 187. mailto:garrison@olga.net
 188. http://www.zoominternet.net/
 189. http://www.oswg.org/oswg-nightly/DHCP.html
 190. http://www.oswg.org/oswg-nightly/DHCP.html
 191. mailto:chris@free-source.com
 192. http://www.oswg.org/oswg-nightly/DHCP.html
 193. mailto:msoeima@netcabo.pt
 194. http://www.oswg.org/oswg-nightly/DHCP.html
 195. http://www.netcabo.pt/
 196. mailto:galan@arquired.es
 197. http://www.supercable.es/
 198. mailto:cog-cablemodem@cognite.net
 199. http://www.ntl.com/cablemodems/
 200. http://www.oswg.org/oswg-nightly/DHCP.html
 201. http://www.lug.org.uk/
 202. mailto:thiagom@mail.com
 203. http://www.oswg.org/oswg-nightly/DHCP.html
 204. mailto:rishi@w-o-i.com
 205. mailto:vinay@avasthi.com
 206. mailto:arpadffy@polarfox.com
 207. http://www.comhem.se/
 208. http://www.telia.com/
 209. http://www.linuxdoc.org/HOWTO/Ethernet-HOWTO.html
 210. http://login1.telia.com/
 211. http://www.linuxdoc.org/HOWTO/NET3-4-HOWTO.html
 212. http://www.oswg.org/oswg-nightly/DHCP.html
 213. http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO.html
 214. http://www.linuxdoc.org/HOWTO/IPCHAINS-HOWTO.html
 215. http://login1.telia.com/
 216. mailto:nick@debau.ch
 217. mailto:haug@liwest.at
 218. mailto:helpdesk@liwest.at
 219. http://www.liwest.at/
 220. http://linuxpower.cx/~cable/
 221. mailto:rodrigo@who.net
 222. http://linuxpower.cx/~cable/
 223. http://www.linkexpress.com.br/
 224. http://www.linkexpress.com.br/
 225. mailto:chris@wrm.grdn.net
 226. mailto:mike@milbert.com
 227. mailto:gpx1@earthlink.net
 228. mailto:bem@cmc.net
 229. http://www.ecst.csuchico.edu/~mcumings/cablemodem/
 230. mailto:librarian@unseen.net
 231. mailto:chuby@internettico.com
 232. http://www.internetTICO.com/cablemodem.html
 233. mailto:chuby@internettico.com
 234. http://www.amnet.co.cr/
 235. mailto:agnew@goku.dyndns.org
 236. mailto:CableModem@mikemiller.net
 237. http://millenniumdigitalmd.com/
 238. http://cablespeed.com/
 239. http://www.oswg.org/oswg-nightly/DHCP.html
  Chroot-BIND HOWTO
  Scott Wunsch, scott at wunsch.org
  v1.1, 24 June 2000

  This document describes installing the BIND 8 nameserver to run in a
  chroot jail and as a non-root user, to provide added security and min
  imise the potential effects of a security compromise.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 What?
     1.2 Why?
     1.3 Where?
     1.4 How?
     1.5 Disclaimer

  2. Preparing the Jail

     2.1 Creating a User
     2.2 Directory Structure
     2.3 Placing the BIND Data
     2.4 System Support Files
     2.5 Logging
        2.5.1 The Ideal Solution
        2.5.2 The Other Solutions

  3. Compiling BIND

     3.1 Modifying Paths
     3.2 Doing the Build

  4. Installing Your Shiny New BIND

     4.1 Installing the Tools Outside the Jail
     4.2 Installing the Binaries in the Jail
     4.3 Setting up the Init Script
     4.4 Configuration Changes

  5. The End

     5.1 Launching BIND
     5.2 That's It!

  6. Appendix - Document Distribution Policy



  ______________________________________________________________________

  1.  Introduction

  This is the Chroot-BIND HOWTO; see ``Where?'' for the master site,
  which contains the latest copy.  It is assumed that you already know
  how to configure and use BIND (the Berkeley Internet Name Domain).  If
  not, I would recommend that you read the DNS HOWTO first.  It is also
  assumed that you have a basic familiarity with compiling and
  installing software on your UNIX-like system.



  1.1.  What?

  This document describes some extra security precautions that you can
  take when you install BIND.  It explains how to configure BIND so that
  it resides in a ``chroot jail'', meaning that it cannot see or access
  files outside its own little directory tree.  We shall also configure
  it to run as a non-root user.

  The idea behind chroot is fairly simple.  When you run BIND (or any
  other process) in a chroot jail, the process is simply unable to see
  any part of the filesystem outside the jail.  For example, in this
  document, we'll set BIND up to run chrooted to the directory
  /chroot/named.  Well, to BIND, the contents of this directory will
  appear to be /, the root directory.  Nothing outside this directory
  will be accessible to it.  You've probably encounted a chroot jail
  before, if you've ever ftped into a public system.


  1.2.  Why?

  The idea behind running BIND in a chroot jail is to limit the amount
  of access any malicious individual could gain by exploiting
  vulnerabilities in BIND.  It is for the same reason that we run BIND
  as a non-root user.

  This should be considered as a supplement to the normal security
  precautions (running the latest version, using access control, etc.),
  not a replacement for them.

  If you're interested in DNS security, you might also be interested in
  a few other products.  Building BIND with StackGuard
  <http://www.immunix.org/products.html#stackguard> would probably be a
  good idea for even more protection.  Using it is easy; it's just like
  using ordinary gcc.  Also, DNScache <http://cr.yp.to/dnscache.html> is
  a secure replacement for BIND, written by Dan Bernstein.  Dan is the
  author of qmail, and DNScache appears to follow a similar philosophy.


  1.3.  Where?

  The latest version of this document is always available from the web
  site of the Linux/Open Source Users of Regina, Sask., at
  <http://www.losurs.org/docs/howto/Chroot-BIND.html>.

  BIND is available from the Internet Software Consortium
  <http://www.isc.org/> at  <http://www.isc.org/bind.html>.  As of this
  writing, the current version of BIND is 8.2.2_P5.


  1.4.  How?

  I wrote this document based on my experiences in setting BIND up in a
  chroot environment.  In my case, I already had an existing BIND
  installation in the form of a package that came with my Linux
  distribution.  I'll assume that most of you are probably in the same
  situation, and will simply be transferring over and modifying the
  configuration files from your existing BIND installation, and then
  removing the package before installing the new one.  Don't remove the
  package yet, though; we may want some files from it first.

  If this is not the case for you, you should still be able to follow
  this document.  The only difference is that, where I refer to copying
  an existing file, you first have to create it yourself.  The DNS HOWTO
  may be helpful for this.


  1.5.  Disclaimer

  These steps worked for me, on my system.  Your mileage may vary.  This
  is but one way to approach this; there are other ways to set the same
  thing up (although the general approach will be the same).  It just
  happens that this was the first way that I tried that worked, so I
  wrote it down.

  My BIND experience to date has been installing on Linux servers.
  However, most of the instructions in this document should be easily
  applicable to other flavours of UNIX as well, and I shall try to point
  out differences of which I am aware.


  2.  Preparing the Jail

  2.1.  Creating a User

  As mentioned in the introduction, it's not a good idea to run BIND as
  root.  So, before we begin, let's create a separate user for BIND.
  Note that you should never use an existing user like nobody for this
  purpose.

  This requires adding a line something like the following to
  /etc/passwd:


       named:x:200:200:Nameserver:/chroot/named:/bin/false



  And one like this to /etc/group:


       named:x:200:



  This creates a user and group called named for BIND.  Make sure that
  the UID and GID (both 200 in this example) are unique on your system.
  The shell is set to /bin/false because this user will never need to
  log in.


  2.2.  Directory Structure

  Now, we must set up the directory structure that we will use for the
  chroot jail in which BIND will live.  This can be anywhere on your
  filesystem; the truly paranoid may even want to put it on a separate
  volume.  I shall assume that you will use /chroot/named.  Let's start
  by creating the following directory structure:



       /chroot
         +-- named
              +-- bin
              +-- dev
              +-- etc
              |    +-- namedb
              +-- lib
              +-- var
                   +-- run

  2.3.  Placing the BIND Data

  Assuming that you have already done a conventional installation of
  BIND and are using it, you will already have an existing named.conf
  and zone files.  These files must now be moved (or copied, to be safe)
  into the chroot jail, so that BIND can get at them.  named.conf goes
  in /chroot/named/etc, and the zone files can go in
  /chroot/named/etc/namedb.  For example:


       # cp -p /etc/named.conf /chroot/named/etc/

       # cp -a /var/named/* /chroot/named/etc/namedb/



  BIND will likely need to write to the namedb directory, and probably
  some of the files in it.  For example, if your DNS serves as a slave
  for a zone, it will have to update that zone file.  Also, BIND can
  dump statistical information, and does so in this directory.  For that
  reason, you should probably make the named user the owner of this
  directory and its contents:


       # chown -R named:named /chroot/named/etc/namedb



  BIND will also need to write to the /var/run directory, to put its
  pidfile and ndc socket there, so let's allow it to do so:


       # chown named:named /chroot/named/var/run



  2.4.  System Support Files

  Once BIND is running in the chroot jail, it will not be able to access
  files outside the jail at all.  However, it needs to access a few key
  files, such as the system's C library.  Exactly what libraries are
  required will depend on your flavour of UNIX.  For most modern Linux
  systems, the following commands will be sufficient to put the
  necessary libraries in place:


       # cd /chroot/named/lib
       # cp -p /lib/libc-2.*.so .
       # ln -s libc-2.*.so libc.so.6
       # cp -p /lib/ld-2.*.so .
       # ln -s ld-2.*.so ld-linux.so.2



  As an alternative, you could simply build statically-linked versions
  of the BIND binaries to put in your chroot jail.  You should also copy
  ldconfig into the jail, and run it to create an etc/ld.so.conf for the
  jail environment.  The following commands could take care of this:



  # cp /sbin/ldconfig /chroot/named/bin/
  # chroot /chroot/named /bin/ldconfig -v



  BIND needs one more system file in its jail:  good ol' /dev/null.
  Again, the exact command necessary to create this device node may vary
  from system to system; check your /dev/MAKEDEV script to be sure.
  Some systems may also require /dev/zero.  For most Linux systems, we
  can use the following command:


       # mknod /chroot/named/dev/null c 1 3



  Finally, you need a couple extra files in the /etc directory inside
  the jail.  In particular, you must copy /etc/localtime (this sometimes
  known as /usr/lib/zoneinfo/localtime on some systems) in there so that
  BIND logs things with the right time on them, and you must make a
  simple group file with the named group in it.  The following two
  commands will take care of this:


       # cp /etc/localtime /chroot/named/etc/

       # echo 'named:x:200:' > /chroot/named/etc/group



  Keep in mind that the GID, 200 in this example, must match the one you
  defined in the real /etc/group above.


  2.5.  Logging

  Unlike a conventional jailbird, BIND can't just scribble its log
  entries on the walls :-).  Normally, BIND logs through syslogd, the
  system logging daemon.  However, this type of logging is performed by
  sending the log entries to the special socket /dev/log.  Since this is
  outside the jail, BIND can't use it any more.  Fortuantely, there are
  a couple options to work around this.


  2.5.1.  The Ideal Solution

  The ideal solution to this dilemma requires a reasonably recent
  version of syslogd which supports the -a switch introduced by OpenBSD.
  Check the manpage for your syslogd(8) to see if you have such a
  version.

  If you do, all you have to do is add the switch ``-a
  /chroot/named/dev/log'' to the command line when you launch syslogd.
  On systems which use a full SysV-init (which includes most Linux
  distributions), this is typically done in the file
  /etc/rc.d/init.d/syslog.  For example, on my Red Hat Linux system, I
  changed the line


       daemon syslogd -m 0



  to


       daemon syslogd -m 0 -a /chroot/named/dev/log



  The simply restart syslogd, either by killing it and launching it
  again, or by using the SysV-init script to do it for you:


       # /etc/rc.d/init.d/syslog stop
       # /etc/rc.d/init.d/syslog start



  Once it's been restarted, you should see a ``file'' in
  /chroot/named/dev called log, that looks something like this:


  srw-rw-rw-   1 root     root            0 Mar 13 20:58 log



  2.5.2.  The Other Solutions

  If you have an older syslogd, then you'll have to find another way to
  do your logging.  There are a couple programs out there, such as
  holelogd, which are designed to help by acting as a ``proxy'' and
  accepting log entries from the chrooted BIND and passing them out to
  the regular /dev/log socket.

  Alteratively, you can simply configure BIND to log to files instead of
  going through syslog.  See the BIND documentation for more details if
  you choose to go this route.


  3.  Compiling BIND

  You should be able to find the BIND source by visiting
  <http://www.isc.org/bind.html>.  You need the bind-src.tar.gz package.
  Be sure to get the latest version!


  3.1.  Modifying Paths

  Things can get a bit confusing at this point, because different parts
  of the BIND package will be referring to the same directories by
  different names (depending on whether or not they're running inside
  the jail).  I'll try not to confuse you too much :-).

  The main directory that we have to worry about here is /var/run,
  because its contents are required for both the main named daemon
  (inside the jail), and the ndc utility (on the outside).  We'll start
  by setting everything up to find this directory from the outside
  world.  To do this, we need to modify src/port/linux/Makefile.set
  (substitute your port's directory if you're not running Linux), and
  change the line


       DESTRUN=/var/run


  to


       DESTRUN=/chroot/named/var/run



  While you're in there, you may want to change the other destination
  paths from /usr to /usr/local.

  Now everything should be able to find that directory... except the
  named daemon itself, to which it's still just /var/run inside the
  jail.  We can get around this by making a small change in the named
  source.  In the file src/bin/named/named.h, find the line


       #include "pathnames.h"



  and add the following line immediately after it


       #define _PATH_NDCSOCK    "/var/run/ndc"



  This way, named will ignore our definition of DESTRUN over in Make
  file.set and use the correct location (from its perspective in the
  chroot jail).  You will notice some warnings about redefinitions of
  _PATH_NDCSOCK when you do the build; just ignore them.


  3.2.  Doing the Build

  You should now be able to compile BIND as normal, following the
  instructions in the INSTALL file.  At this stage, we only want to
  compile BIND, not install it.  Don't go too far when following the
  INSTALL file.  Essentially, it's just make clean, make depend, and
  make.


  4.  Installing Your Shiny New BIND

  I should mention that if you have an existing installation of BIND,
  such as from an RPM, you should probably remove it before installing
  the new one.  On Red Hat systems, this probably means removing the
  packages bind and bind-utils, and possibly bind-devel and caching-
  nameserver, if you have them.

  You may want to save a copy of the init script (e.g.,
  /etc/rc.d/init.d/named), if any, before doing so; it'll be useful
  later on.


  4.1.  Installing the Tools Outside the Jail

  This is the easy part :-).  Just run make install and let it take care
  of it for you.  You may want to chmod 000 /usr/local/sbin/named
  afterwards, to make sure you don't accidentally run the non-chrooted
  copy of BIND.  (This is /usr/sbin/named if you didn't tell it to go in
  /usr/local/sbin like I suggested.)

  4.2.  Installing the Binaries in the Jail

  Only two parts of the package have to live inside the chroot jail:
  the main named daemon itself, and named-xfer, which it uses for zone
  transfers.  You can simply copy them in from the source tree:


       # cp src/bin/named/named /chroot/named/bin

       # cp src/bin/named-xfer/named-xfer /chroot/named/bin



  4.3.  Setting up the Init Script

  If you have an existing init script from your distribution, it would
  probably be best simply to modify it to run /chroot/named/bin/named,
  with the appropriate switches.  The switches are... (drumroll
  please...)

    -u named, which tells BIND to run as the user named, rather than
     root.

    -g named, to run BIND under the group named too, rather than root
     or wheel.

    -t /chroot/named, which tells BIND to chroot itself to the jail
     that we've set up.

  The following is the init script I use with my Red Hat 6.0 system.  As
  you can see, it is almost exactly the same as the way it shipped from
  Red Hat.  I have also modified the ndc restart command so that it
  restarts the server properly, and keeps it chrooted.  You should
  probably do the same in your init script, even if you don't copy this
  one.



  ______________________________________________________________________
  #!/bin/sh
  #
  # named           This shell script takes care of starting and stopping
  #                 named (BIND DNS server).
  #
  # chkconfig: 345 55 45
  # description: named (BIND) is a Domain Name Server (DNS) \
  # that is used to resolve host names to IP addresses.
  # probe: true

  # Source function library.
  . /etc/rc.d/init.d/functions

  # Source networking configuration.
  . /etc/sysconfig/network

  # Check that networking is up.
  [ ${NETWORKING} = "no" ] && exit 0

  [ -f /chroot/named/bin/named ] || exit 0

  [ -f /chroot/named/etc/named.conf ] || exit 0

  # See how we were called.
  case "$1" in
    start)
          # Start daemons.
          echo -n "Starting named: "
          daemon /chroot/named/bin/named -u named -g named -t /chroot/named
          echo
          touch /var/lock/subsys/named
          ;;
    stop)
          # Stop daemons.
          echo -n "Shutting down named: "
          killproc named
          rm -f /var/lock/subsys/named
          echo
          ;;
    status)
          /usr/local/sbin/ndc status
          exit $?
          ;;
    restart)
          /usr/local/sbin/ndc -n /chroot/named/bin/named "restart -u named -g named -t /chroot/named"
          exit $?
          ;;
    reload)
          /usr/local/sbin/ndc reload
          exit $?
          ;;
    probe)
          # named knows how to reload intelligently; we don't want linuxconf
          # to offer to restart every time
          /usr/local/sbin/ndc reload >/dev/null 2>&1 || echo start
          exit 0
          ;;

    *)
          echo "Usage: named {start|stop|status|restart}"
          exit 1
  esac

  exit 0
  ______________________________________________________________________
  4.4.  Configuration Changes

  You will also have to add or change a few options in your named.conf
  to keep the various directories straight.  In particular, you should
  add (or change, if you already have them) the following directives in
  the options section:


       ______________________________________________________________________
       directory "/etc/namedb";
       pid-file "/var/run/named.pid";
       named-xfer "/bin/named-xfer";
       ______________________________________________________________________



  Since this file is being read by the named daemon, all the paths are
  of course relative to the chroot jail.


  5.  The End

  5.1.  Launching BIND

  Everything should be set up, and you should be ready to put your new,
  more secure BIND into action.  Assuming you set up a SysV-style init
  script, you can simply launch it as:


       # /etc/rc.d/init.d/named start



  Make sure you kill any old versions of BIND still running before doing
  this.

  If you take a look at your logs, you should find the initialisation
  messages that BIND spits out when it loads.  (If not, there's a
  problem with your ``logging configuration'' that you need to fix.)
  Amongst those messages, BIND should tell you that it chrooted
  successfully, and that it is running as the user and group named.  If
  not, you have a problem.


  5.2.  That's It!

  You can go take a nap now ;-).


  6.  Appendix - Document Distribution Policy

  Copyright  Scott Wunsch, 2000.  This document may be distributed only
  subject to the terms set forth in the LDP licence at
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the LDP licence.  It is distributed in
  the hope that it will be useful, but without any warranty; without
  even the impled warranty of merchantability or fitness for a
  particular purpose.  See the LDP licence for more details.



  Linux Commercial HOWTO
  Mr. Poet <poet@linuxports.com>
  v5.38, 7 March 1999

  This document contains a listing of commercial software and applica-
  tions which are offered for Linux.  It is maintained by Mr. Poet
  <poet@linuxports.com>.
  ______________________________________________________________________

  Table of Contents



  1. About this document

  2. Copyright Information

  3. Disclaimer

  4. Related Information

  5. Linux for the Commercial Market?

     5.1 Turnkey systems
     5.2 Large end-user customers
     5.3 Specialized markets
     5.4 Biography

  6. Website Development

     6.1 ASWedit, HTML editor
     6.2 Empress DataWEB
     6.3 EZ-EDIT
     6.4 LinkScan
     6.5 TalentSoft Web+ (WebPlus)
     6.6 VirtuFlex 1.1
     6.7 Visual prolog
     6.8 Web Crossing
     6.9 ThreadTrack and WebTailor from Webthreads.

  7. Databases

     7.1 c-tree Plus
     7.2 Empress
     7.3 Essentia
     7.4 FairCom Server
     7.5 INFORMIX-SE
     7.6 Just Logic/SQL
     7.7 KE Texpress
     7.8 Qddb
     7.9 Raima Database Manager++
     7.10 Empress Embedded RDBMS
     7.11 SOLID Server
     7.12 Velocis Database Server
     7.13 Yard SQL

  8. Data Visualisation and CAD

     8.1 IDL (Interactive Data Language)
     8.2 Megahedron
     8.3 Tecplot 7.0
     8.4 VariCAD
     8.5 VARKON
     8.6 XVScan

  9. Development Tools

     9.1 ACUCOBOL-GT
     9.2 Amzi! Prolog & Logic Server
     9.3 Basmark QuickBASIC
     9.4 Critical Mass CM3
     9.5 Dynace
     9.6 Absoft Fortran 77
     9.7 Finesse
     9.8 ISE Eiffel
     9.9 EiffelBench
     9.10 C-Forge IDE
     9.11 IdeaFix
     9.12 j-tree
     9.13 KAI C++
     9.14 Khoros Pro 2.1
     9.15 MetaCard
     9.16 ObjectManual Release 3.0
     9.17 Critical Mass Reactor
     9.18 Resource Standard Metrics
     9.19 r-tree
     9.20 sdoc (Source Documenter)
     9.21 SEDIT, S/REXX
     9.22 SNiFF+
     9.23 ST/X (Smalltalk/X)
     9.24 tdb (Tcl Debugger)
     9.25 tprof (Tcl Profiler)
     9.26 View Designer/X (VDX)
     9.27 XBasic
     9.28 XMove 4.0 for Linux

  10. Emulation

     10.1 Emulus
     10.2 Executor 2
     10.3 Wabi 2.2 for OpenLinux

  11. Financial Software

     11.1 BB Stock Pro and BB Stock Tool
     11.2 TimeClock

  12. Libraries

     12.1 FontScope
     12.2 INTERACTER
     12.3 Matrix<LIB> - C++ Math Matrix Library
     12.4 PKWARE Data Compression Library for Linux
     12.5 readyBase
     12.6 SIMLIB IG

  13. Mathematics

     13.1 Maple V Release 4 - The Power Edition
     13.2 MATCOM and MATCOM MATH LIBRARY
     13.3 Mathematica 3.0
     13.4 MATLAB and Simulink

  14. Multimedia

     14.1 Peter Lipa and his Journeys
     14.2 Lucka Vondrackova and her Journeys
     14.3 MpegTV Player 1.0
     14.4 Peter Nagy and his Journeys
     14.5 Xaudio

  15. Network Servers

     15.1 Critical Angle X.500 Enabler
     15.2 DNEWS News Server
     15.3 Aventail Internet Policy Manager
     15.4 Aventail VPN
     15.5 WANPIPE
     15.6 Zeus Web Server

  16. Office Tools

     16.1 Corel WordPerfect 8
     16.2 The American Heritage Dictionary Deluxe
     16.3 Applixware Office Suite for Linux
     16.4 D.M.S. Document Management System
     16.5 HotWire EasyFAX
     16.6 NExS, the Network Extensible Spreadsheet
     16.7 Axene Office
     16.8 Projector and Projector/Net
     16.9 The Virtual Office System
     16.10 Axene XAllWrite
     16.11 Axene Xclamation
     16.12 Axene XQuad

  17. Text Processing

     17.1 Edith Pro for X11
     17.2 TeraSpell 97 for Emacs

  18. System Administration Tools

     18.1 Host Factory
     18.2 PerfectBACKUP+
     18.3 Venus

  19. X Windows Related Products

     19.1 Accelerated-X Display Server
     19.2 BXwidgets
     19.3 BXwidgets/DB
     19.4 Laptop, Accelerated-X Display Server
     19.5 MaXimum cde Developer's Edition v1.0
     19.6 Multi-headed, Accelerated-X Display Server
     19.7 OpenGL, Accelerated-X Display Server
     19.8 OSF-Certified Motif

  20. Other Software

     20.1 ABACUS 4
     20.2 BBBS
     20.3 Clustor
     20.4 FootPrints
     20.5 Aladdin Ghostscript
     20.6 Magician
     20.7 journyx WebTime
     20.8 LanSafe
     20.9 LjetMgr
     20.10 Synchronize/CyberScheduler

  21. Free Software for Commercial Hardware

     21.1 Stallion Technologies Multiport Serial Boards


  ______________________________________________________________________

  1.  About this document


  This is the Linux Commercial HOWTO.  It contains a listing of
  commercial software which is available for Linux.  The Linux
  Commercial HOWTO doesn't contain any information on Linux
  distributions -- this is covered by the Distribution HOWTO.


  If you contact any companies or purchase any products listed in this
  document, please mention the Linux Commercial HOWTO.



  This document was originated by Harald Milz <Harald.Milz@Linux.org>.
  and then maintained by Mr. Poet

  It is now maintained by Mr. Poet AND LinuxPorts <poet@linuxports.com>.

  If you need to know more about the Linux Documentation Project or
  about Linux HOWTO's, feel free to contact the supervisor Tim Bynum
  <linux-howto@metalab.unc.edu>.


  Tim Bynum will post the listing to several national and international
  newsgroups on a monthly basis.  In addition, the Linux Commercial
  HOWTO can be found on the World Wide Web at
  http://commercial.cyrius.com.  New versions of the Linux Commercial
  HOWTO are always placed at this site first, so please be sure to check
  if the copy you are reading is still up to date!


  The Linux Commercial HOWTO is not a forum for product announcements or
  marketing hype; it is a service for potential customers and the whole
  Linux community.  Resellers will not be listed; the list is for
  companies who produce their software themselves.  Two main goals are
  being aimed at:


  o  It shall help companies who want to run Linux to find software
     solutions and applications.  The international distribution of this
     list will enhance the contact opportunity.

  o  It is meant to prove the commercial useability of Linux and thus to
     encourage other vendors to port their software as well.

  Companies and developers who are offering their products for Linux and
  interested in joining the Linux Commercial HOWTO are invited to fill
  out the following form and contact me at poet@linuxports.com.


  This HOWTO contains tabular entries for each product (example
  follows).  The entry format is similar to the Linux Software Map (LSM)
  entry (field/stanza lengths are arbitrary).  If you want me to add
  your entry please keep short, otherwise I'll have to shorten your
  data.  Furthermore, please send me plain ASCII data; no HTML, and no
  PostScript.



  Category:

          Databases, Data Visualisation, Development tools, Financial
          Software, Mathematics, Multimedia, Network Management, Text
          Processing, X Windows or Other Software.

  Name:

  The name of your application.

  Description:

  Short description of the package, just the basic functionality.

  Distribution media:

  Licensing policy:

  Whatever applies.  Is there a free demo or shareware version available
  via FTP or WWW?  Where?

  OS provisions:

  Kernel version, XFree86 version, Motif version, RAM, harddisk usage, etc.

  Documentation:

  Printed documentation, page number, online help, language.

  Extra features and add-Ons:

  (and their prices)

  Price range:

  Whatever it costs.

  Vendor:

  Address:
  Phone: (U.S. and Canada: if you like to be reachable internationally,
         please don't enter only a +1 800 or +1 900 number)
  Fax:
  EMail:
  URL:
  Contact:



  2.  Copyright Information


  This HOWTO is Copyright (C) 1996, 1997, 1998 by Mr. Poet.

  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author.  Translations
  are similarly permitted without express permission if it includes a
  notice on who translated it.

  Short quotes may be used without prior consent by the author.
  Derivative work and partial distributions of the Linux Commercial
  HOWTO must be accompanied with either a verbatim copy of this file or
  a pointer to the verbatim copy.
  Commercial redistribution is allowed and encouraged; however, the
  author would like to be notified of any such distributions.

  In short, we wish to promote dissemination of this information through
  as many channels as possible.  However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  We further want that all information provided in the HOWTOs is
  disseminated.  If you have questions, please contact Tim Bynum, the
  Linux HOWTO coordinator, at linux-howto@metalab.unc.edu.



  3.  Disclaimer


  This HOWTO is not actually a HOWTO in the sense of the Linux
  Documentation Project.  Instead, it is an instrument to investigate
  the commercial Linux opportunity and to list applications which were
  already ported and marketed in a native Linux version.  As a software
  vendor, you probably know that you can alternatively offer Linux users
  a statically linked SCO version of your application which would
  probably run under the iBCS2 emulator (albeit with a small performance
  penalty and higher memory requirements).  Such applications will not
  be listed here.

  I will not select nor deselect any particular product.  Instead,
  everyone who wants to have her product included will be serviced.
  However, I reserve the right to shorten individual entries to keep
  things in shape.

  If you don't find a particular product or vendor in this list, this is
  probably due to one of the following reasons:


  o  I never heard of that product or vendor and thus didn't try to get
     in contact.

  o  I did get in contact, but the vendor didn't answer yet.

  o  I did get in contact, but the vendor stated positively that he
     doesn't sell his product for Linux (yet).

  In any case, please get in contact if you feel someone's missing; also
  if you discover any errors in the file.

  Sometimes two vendor's addresses are mentioned in the ``Vendor:''
  field.  In these cases I received the information from the German
  subsidiary/distributor.  The original manufacturer's address is always
  mentioned first.


  4.  Related Information

  There's another document which covers commercial Linux software.  It
  is maintained by Alan Cox <Alan.Cox@Linux.org> and can be found at
  http://www.uk.linux.org/LxCommercial.html.

  In addition, feel free to visit the Linux Mall where you can order
  most products presented in this HOWTO.



  5.  Linux for the Commercial Market?

  Copyright (C) 1996 iX Multiuser Multitasking Magazin
  Courtesy of iX Multiuser Multitasking Magazin!


  People keep asking me ``When is Linux going to be ready for the
  commercial market''.  I guess the first thing to discuss is what is
  meant by "commercial" in this context.


  Some CD-ROM vendors have put the word "commercial" in their name, only
  to have the technical people think their product is good only for use
  by banks and insurance companies.  Other people look at their product
  with disdain and say that ``Linux is not commercial quality'', because
  it is missing some feature they need, or they feel it is unstable
  (usually without ever trying it even one time).


  To me, the word ``commercial'' has lost as much meaning in the
  marketplace as some of the other buzzwords:



  o  ``Open'' vs ``Proprietary'' (People are now saying UNIX is
     ``Proprietary'')

  o  ``Workstation'' vs ``PC'' (What is a workstation, anyway?)

  In the old days of computing the commercial market was banks,
  insurance companies and business-oriented facilities where the use of
  COBOL or RPG was the mainstream.  The technical market was scientific,
  engineering and manufacturing where FORTRAN and assembly language was
  used.  Somewhere along the way the term ``commercial'' seems to have
  gotten twisted around to mean ``ready for the mass market'', versus
  ``ready for hackers''.


  For the purpose of this article I will take the second meaning, and
  address whether I think Linux is ready for commercial purposes rather
  than the hobbyist and hacker market, and ready for the mass market
  rather than limited markets.


  For those of you who hate reading long articles, or who are short on
  time, let me give you my conclusion right now.  Then you can go out
  and drink beer or other fun activities:


  ``Yes, Linux is ready for the commercial market...in some cases''.


  In order for an operating system to be ready for the mass market it
  must have several attributes:



  o  have lots of applications

  o  be relatively easy to install

  o  have lots of applications

  o  be relatively easy to maintain


  o  have lots of applications

  o  be relatively easy to use

  o  have lots of applications

  o  not crash (much)

  o  have lots of applications

  o  be economical

  o  have lots of applications

  But you can eliminate all of these considerations in today's mass
  market if only one thing is true:


  You have lots of applications.


  after all, there would not be 170,000,000 DOS systems in the world if
  any of the others had to be true.


  I almost added that is has to be economical, but history has actually
  proven me wrong on that.  If people added up the total cost of
  ownership, then Apple would certainly have won over the PC.  But
  people ignore the human costs of someone else (or even themselves)
  beating their head against the wall trying to get something to work,
  or the system crashing repeatedly, or the fact that the one keystroke
  they can hit the easiest (through practice) is


               <CTRL><ALT><DEL>



  In the old days people were content to spend several hundreds of dol-
  lars on a simple ASCII text editor, or deal with a simple spreadsheet.
  And it took an act of mangement to get them, with lots of Purchase
  Orders.  Today, they want multi-media integrated with their operating
  system, and have all the applications available that their neighbor
  (or boss, or compatriot) has available on their system.  And they want
  to get these applications easily, certainly no harder than to call up
  on the phone to order them through a catalog, or go down to their cor-
  ner store to get them.


  Now what causes this plethora of applications for an operating system?
  Ease of programming?  Good software development tools?  Features
  inside the operating system?  Stability of the interfaces over time?


  The answer is ``none of these''.  While all these attributes may help
  convince an application developer to port, the one overriding issue is
  volume of the operating system platform.  Again, if MSDOS were
  compared to MacOS, or even to UNIX and volume were not taken into
  account, we know which two operating systems would have the most
  applications, and they would not be from Microsoft.


  While it is true that several Linux vendors are working on getting
  these applications for the mass market (read this " your mother and
  father"), the number of applications that run on Microsoft platforms
  have been estimated as high as 35,000.  SunOS has an estimated 10,000
  applications, with other `commercial UNIX'' systems (including Solaris
  2.x) much lower in number. It will take the Linux vendors a long time
  to get the number of applications necessary to hit the really large
  mass market, particularly if they did not depend on iBCS2 and
  DOS/Windows compatibility (which could supply a fair number of current
  applications), but depended on ``native'' Linux applications.


  So applications are king (and queen) for the mass market, and
  installed base (volume) or the promise of explosive growth (volume) is
  the key to these. But is the mass market the only ``commercial''
  market?  The answer is ``no''. The mass market is a subset (albeit
  very large one) of the commercial market. So let's look at what the
  rest of the commercial market needs.  We will look at this by
  segmenting the market into:


  o  turnkey systems

  o  large end-user customers

  o  specialized markets


  5.1.  Turnkey systems


  When I speak of turnkey systems I typically mean a computer system
  that has one specific (or not so specific) application that runs on
  it.  Examples of turnkey systems are point-of-sale terminals,
  reservation systems, CAD systems, etc.  But in a larger sense, other
  applications such as Web servers, nameservers (such as BIND), etc.
  could also be considered ``turnkey'', since they have only a few
  necessary programs that have to run on the system.


  Usually turnkey systems are ones that an Independent Software Vendor
  (ISV) or Value Added Reseller (VAR) will chose a hardware system, an
  operating system, port an application to it, then duplicate that
  system 500 to 1000 times without change to the basic application.
  These ISVs and VARs will try to chose the lowest cost solution to fit
  their customer's needs.


  Linux is perfect for these types of applications.  The operating
  system is stable enough for the developer to port their application
  and test the application fully.  Once it is fully tested and stable,
  the entire package is ``frozen'' and duplicated any number of times
  for the end customer.


  Since the operating system may be freely copied, and it runs on
  inexpensive hardware, their variable costs are minimal. Even a
  developer who is not familiar with the Linux system (so they need help
  getting it running on a platform) will quickly pay back the porting
  and system programmer costs they accrue by not paying $200-$500. per
  license for the operating system.  Plus they have all the source code
  for the entire system, in case they run into trouble later on.  You
  can buy a lot of Linux support for $200-$500K.


  As I said before, I include Internet Service Providers (ISPs) as part
  of this ``turnkey'' environment, for both external internet and
  internal internet. Why overload your expensive, high-powered, highly
  complex general-purpose server to do Web serving when a smaller,
  simpler box can offload it?  Why not run your NIS slaves on a Linux
  box?  Or perhaps your BIND server?


  In the early days of Digital UNIX (known then as DEC OSF/1) we did not
  have very many applications.  In fact we had none.  The marketing
  staff came to me with sad faces asking if it was possible to sell an
  operating system that had no applications.  I invented a term called
  ``Turbocharging'', which allowed a Digital UNIX system using the speed
  and power of the Alpha processor (as well as the throughput of our
  networking devices) to offload NIS, NFS, BIND and other services from
  people's overloaded, slower SPARC machines.  We also showed people how
  they could use the rsh(1) command to allow the Alpha to do a portion
  of their very CPU intensive processing while delivering the result
  back to the SPARCs on their desk.  This allowed the SPARCs to work
  more on applications and less on the other ``system administration''
  tasks that they were performing.  We sold lots of Digital UNIX systems
  based solely on executing those tasks.  Today, of course, Digital UNIX
  has a lot more applications, and particularly very large memory
  databases that are extremely fast.  But the same principle applies.
  The database engine runs on the Alpha system, supplying data to the
  slower SPARC engines as a ``Turbocharger''.  I could see Linux systems
  headed in the same direction, following the same path.



  5.2.  Large end-user customers


  Very large customers often have their own home-grown applications
  which they need to deploy across a wide network of people.  Or they
  can have management dictate a certain suite of applications, which
  then can be ported to Linux. Since these customers are so large, their
  operating system costs are huge, and utilizing the savings using the
  Linux operating system they may completely cover the expenses of
  porting their software.


  Or these very large customers may ``influence'' their layered product
  providers to port to the Linux platform.  Finally, they may even
  change some of their computing habits (to use existing programs) if
  the cost savings are enough to warrant it.


  Companies like Caldera are creating a suite of applications and
  approaching these very large customers to show them the operating
  system savings that they can achieve if they switch to Linux.  While
  it is true that every application the customer could ever conceive of
  running may not run on Linux, by using the native applications, the
  iBCS2 applications, the DOSEMU applications, and applications that run
  under WABI, a nice suite of applications could be built to solve their
  needs.


  5.3.  Specialized markets


  Finally there are what I call ``specialized markets''.  Markets that
  might buy Linux simply because it is Linux, and not because of the
  application suites that it provides.


  In the education field there are three main markets:

  o  administrative

  o  ``campus computing''

  o  computer science education

  The administrative part is the ``business'' aspect of the market.
  They are looking for easy-to-use systems that can also handle complex
  administrative tasks that might cover a community the size of a small
  city.


  The ``campus computing'' is the supply of computing power and service
  for majors of all types, web services and research into non-computer
  science (for example, molecular modeling) research.


  Finally there is computer science education, both on the undergraduate
  and graduate level, as well as research into computer science.


  While the administrative sub-market typically relies more on shrink-
  wrapped applications, the other two rely on them to a lesser extent
  (with the computer science education market relying the least).  The
  other two markets can utilize a lot more of the freeware and shareware
  applications that are already ported to Linux.  This gives them a very
  low-cost (from a software perspective) platform while allowing them to
  see and (often) modify the source code for the applications they use.


  More importantly, in the computer science research area, the results
  of the research can be freely distributed to others working in the
  field, or even published as source code to illustrate the results.
  This can not be done with ``commercial'' operating systems.


  Some universities are utilizing Linux more and more to run their
  campus.  From a ``commercial'' standpoint, their needs are the same as
  many large businesses. Students graduating from college will know
  about Linux, and bring the word to their future employers.


  Finally, there is the computer hobbyist and software developer market.
  I relate this market to the amateur radio market.  In the amateur
  radio market the radio is often used to simply talk to other people,
  but at the same time the users investigate new ways of using radio,
  and improving it.  Many electrical engineers started out as amateur
  radio users.  So it can be with Linux, since for the first time both
  the prices of the hardware and the prices of the operating system
  source code are within the reach of mortal people.


  In conclusion, I feel that Linux does have the items needed for
  several types of ``commercial'' uses:


  o  stability and quality

  o  low variable costs for turnkey applications

  o  explosive growth in volume to attract ISVs

  What Linux really needs is for the ``commercial'' community to
  understand what is going on, and to embrace it where it will be
  useful.  This will increase the volume numbers even more, which will
  attract more applications.


  Along these lines I would like to ``advertise'' a joint effort of
  USENIX and Linux International to happen in January of 1997 in
  Anaheim, California of the United States. There will be a joint
  USENIX/Linux development conference, and while a certain part of the
  Linux conference will be oriented towards the development of the Linux
  operating system, the bulk of the conference will be oriented towards
  application developers and marketing people, to better understand the
  Linux operating system and how to sell their applications and services
  into the Linux market. We hope to show ISVs, VARs, resellers and
  distributors how they can make money by selling their applications and
  services on top of the Linux operating system.



  5.4.  Biography


  Jon ``maddog'' Hall is a Senior Leader in the Digital Equipment
  Corporation UNIX group.  He has been in the computer industry for
  twenty-five years, UNIX for sixteen years and has guided the emergence
  of six operating systems, including Alpha Linux.  He has an MS in
  Computer Science.


  6.  Website Development



  6.1.  ASWedit, HTML editor



     Description:
        ASWedit is a commercial, comprehensive and easy to use HTML and
        text editor for X Window System and Motif.  It offers three
        independent modes: a plain text editing mode and two context-
        sensitive, validating modes for authoring of HTML documents as
        used on the Internet and Intranets.  The two HTML modes are:
        standard and experimental.


     Distribution media:
        3.5" diskettes, 4-mm DAT, 1/4" and 8mm tapes, Internet (FTP).


     Licensing policy:
        Per machine basis.  The number of users that can run the
        software on the licensed computer is unlimited.

        A version of the program, called asWedit, is available for free
        for students and staff in education and charitable non-profit
        organizations, and for free evaluation by individuals and
        commercial organizations.  It is available via FTP from many
        archives. See http://www.advasoft.com/asWedit.html for details.


     OS provisions:
        Linux 1.2.13 or higher (ELF), X11R6, Motif 2.0 (not required if
        the statically linked version is used), 5 MB of RAM, 1.5-3.5 MB
        hard disk usage.


     Documentation:
        Printed documentation, online help, language: User's Guide (44
        pages), HTML 3.2 extended, Reference Manual (89 pages), HTML 3.2
        experimental, Reference Manual (106 pages).  Online, context
        sensitive, hypertext help - 560 KB.  Localized resource files
        are available for the following languages: English (default),
        Czech, Danish, Dutch, French, German, Polish, Portuguese,
        Spanish and Swedish.  Commands and messages are localized for
        each language but the online help and documentation are only
        available in English.


     Product support:
        The license includes free product upgrades by FTP for a period
        of one year.


     Extra features and add-ons:
        Can work with external Unix filters.  Highly customizable.
        Supports four different browsers for previewing.


     Available since:
        July, 1995.


     Countries with distribution:
        World wide.


     Price range:
        US$149.  Quantity discounts are available.


     Vendor:
        AdvaSoft Ltd.



          30 Hatch Road
          London SW16 4PN
          England



     Phone:
        +44 181 251 0033

     Fax:
        +44 181 251 0011

     EMail:
        as@advasoft.com

     URL:
        http://www.advasoft.com

     Contact:
        Andre Stochniol


     Last modified:
        August 30, 1997.



  6.2.  Empress DataWEB



     Description:
        Empress DataWEB allows users to easily and rapidly build
        dynamic, interactive, database-fed web applications.  No special
        programming language needs to be learned; developers of
        applications simply can use HTML with the Empress extensions for
        accessing the RDBMS.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Please contact vendor for evaluation copies.


     OS provisions:
        16 MB of RAM; 60 MB harddisk space (additional requirements: web
        browser required).


     Documentation:
        Online help.


     Product support:
        Full technical support available, priced separately.


     Extra features and add-ons:
        Extra features such as an HTTP server and other tools to
        facilitate the creation of web applications come with the
        software package.


     Available since:
        April, 1996.


     Countries with distribution:
        World wide.


     Price range:
        Please contact vendor.


     Vendor:
        Empress Software Inc.



          6401 Golden Triangle Drive
          Greenbelt, MD 20770
          U.S.A.



     3100 Steeles Avenue East
     Markham, ON L3R 8T3
     Canada



     Phone:
        +1 301 220 1919 (USA), +1 905 513 8888 (Canada)

     Fax:
        +1 301 220 1919 (USA), +1 905 513 1668 (Canada)

     EMail:
        sales@empress.com

     URL:
        http://www.empress.com

     Contact:
        Dick Naedel


     Last modified:
        August 4, 1997.



  6.3.  EZ-EDIT



     Description:
        EZ-EDIT is an online HTML editor, which allows users to
        completly manage their web site through a web browser (edit,
        create, upload, rename/move/copy, create and remove
        directories)!  EZ-EDIT is the only editor which features the
        "File Filter" which allows you to specify what file types are
        allowed on your system.  Create the look you want by editing EZ-
        EDIT's 16 template files with over 80 tags.  Also allows you to
        set disk space limits!  Supports form based file uploads, also
        includes a Java page creater.  All administration is also done
        through a web browser.


     Distribution media:
        3.5" diskettes, Internet (FTP and WWW).


     Licensing policy:
        A free demo is available from our web site.  Demo version is
        unlocked to full version with registration key.


     OS provisions:
        Linux/Intel.


     Documentation:
        Online HTML user and admin manuals (English only).


     Product support:
        Update service, support (via EMail).

     Available since:
        September 17, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$149.95.


     Vendor:
        Relative Web



          P. O. Box 351
          Saylorsburg, PA 18353-0351
          U.S.A.



     Phone:
        +1 610 381 3072

     Fax:
        +1 610 381 3072

     EMail:
        ez-edit@relative-web.com

     URL:
        http://www.relative-web.com/dynamic/ez-edit/

     Contact:
        John Bergeron


     Last modified:
        October 6, 1997.



  6.4.  LinkScan



     Description:
        LinkScan operates on Unix an NT servers on both Internets and
        Intranets, LinkScan can test over 40,000 links per hour because
        it is the only link checker that uses multi-threaded
        simultaneous processing.  LinkScan has been tested on web sites
        with over 45,000 pages and more than 80,000 links.  LinkScan
        also produces two revolutionary types of maps of web sites.
        LinkScan's SiteMap enables the user to produce a site map that
        includes every link on a web site arranged in a hierarchical
        format that resembles a book's table of contents.  LinkScan's
        TapMap is an expandable and collapsible site map that allows
        viewers to tap down through the various and multiple levels of a
        web site to quickly and easily navigate and explore the web site
        by tapping on a few control icons.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        A license is required for each server on which the product is
        used.  Free evaluation copies of LinkScan may be downloaded from
        our web site.


     OS provisions:
        Requires Perl 5 or higher.


     Documentation:
        Complete documentation and a comprehensive FAQ may be read at
        our web site and/or downloaded.


     Product support:
        This product is continuously updated and maintained.  Prompt
        responses to all inquiries and problems via EMail or telephone
        as required.  No fees for support.


     Available since:
        January 7, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$495.


     Vendor:
        Electronic Software Publishing Corporation



          1504 #8-00200 Main Street
          Gardnerville, NV 89410-5273
          U.S.A.



     EMail:
        ken@elsop.com

     URL:
        http://www.elsop.com

     Contact:
        Ken Churilla


     Last modified:
        November 6, 1997.



  6.5.  TalentSoft Web+ (WebPlus)



     Description:
        TalentSoft Web+ is a development tool dedicated to developing
        web-based client/server applications without writing low level
        CGI programs.  Web+ enables rapid and easy creation of highly
        functional web pages which integrates with databases, file
        systems, EMail, Java applets, your legacy applications (EXEs,
        DLLs), and communicates with other TCP/IP applications using
        sockets.  Web+ works with all popular web severs, databases, and
        operating systems and integrates closely with Netscape web
        servers via NSAPI and CGI.  Web+ also acts as a multi-threaded
        web middleware that integrates the web servers with databases,
        EMail, TCP/IP sockets, and other applications.  Please check out
        the "Teach Me Web+" link on our web site for the coolest
        interactive tutorial with hands on exercises.  We are proud to
        be the first to provide dynamic code interpretation on the
        Internet!  Now you may start writing and running your own web
        application without buying or installing Web+.


     Distribution media:
        3.5" diskettes, CD-ROM and Internet (FTP and WWW).


     Licensing policy:
        Free evluation copy available at http://www.TalentSoft.com.
        Trial out version notices displayed by will not time out.


     OS provisions:
        16 MB RAM, 5 MB HD.


     Documentation:
        Both printed documentation (about 200 pages) and HTML online
        help.  English only.


     Product support:
        Free EMail, web+ conference, and phone support.  Training
        available for a fee.


     Available since:
        May 1, 1997.


     Countries with distribution:
        USA, UK, Hong Kong, China, Singapore.


     Price range:
        US$195 to $1295.


     Vendor:
        TalentSoft / Talent Information Management, LLC.



     900 Nicollet Mall, Suite 700
     Minneapolis, MN 55402
     U.S.A.



          P.O. Box 2997
          Minneapolis, MN 55402
          U.S.A.



     Phone:
        +1 612 338 8900

     Fax:
        +1 612 904 0010

     EMail:
        info@TalentSoft.com

     URL:
        http://www.TalentSoft.com

     Contact:
        Victor Tong, Ian Gorrie, Jeff Persche, Tony Tong


     Last modified:
        August 8, 1997.



  6.6.  VirtuFlex 1.1



     Description:
        VirtuFlex 1.1 is a web application builder for adding dynamic
        functionality to a web site.  VirtuFlex provides the power to
        transform web sites into live applications by integrating
        databases, fax, EMail and pagers with the web.  VirtuFlex
        provides sophisticated functionality that can be added to web
        sites by any HTML developer.  VirtuFlex is reusable, modular,
        easy to use, high performance and provides DB connectivity
        almost any database.  The componenets of VirtuFlex are a macro
        language, macro processor, DB server and pre-built template
        packs.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        VirtuFLex is licensed on a per domain basis.  A free evaluation
        copy is available on our web site.


     OS provisions:
        Linux ELF binary format (1.2.x kernels or higher).  VirtuFlex
        runs on standard Unix workstations with 8 MB of RAM minimum, 16
        MB recommended.


     Documentation:
        Available for download from our web site, English.


     Product support:
        Basic support four hours.  Other support options available -
        call for details.


     Extra features and add-ons:
        Pre-built Template-Paks come free with VirtuFlex for shopping
        carts, threaded discussion groups, database application builder,
        quizzes and surveys, web spiders and banner rotators.
        Additional Template-Paks are added on a regular basis.


     Available since:
        1996.


     Countries with distribution:
        World wide through UniDirect, Soft Export and the Internet.


     Price range:
        US$995, educational discounts available.


     Vendor:
        VirtuFlex Software Corp.



          930 Massachusetts Avenue
          Cambridge, MA 02139
          U.S.A.



     Phone:
        +1 617 497 8006

     Fax:
        +1 617 492 0486

     EMail:
        comments@virtuflex.com

     URL:
        http://www.virtuflex.com

     Contact:
        Dan Housman


     Last modified:
        March 17, 1997.



  6.7.  Visual prolog



     Description:
        One of the worlds strongest prolog development environments.


     Distribution media:
        CD-ROM and Internet (WWW).


     Documentation:
        Manuals supplied on CD-ROM, online help and intro.html lots of
        examples.


     Product support:
        EMail based.


     Available since:
        1984.


     Countries with distribution:
        World wide.


     Vendor:
        Prolog Development Center



          H.J. Holstvej 3-5A
          DK-2605 Broendby
          Dankmark



     Phone:
        +45 36 72 10 22

     Fax:
        +45 36 72 02 69

     EMail:
        sales@pdc.dk

     URL:
        http://www.pdc.dk

     Contact:
        Claus Witfelt <witfelt@pdc.dk>


     Last modified:
        November 28, 1997.



  6.8.  Web Crossing



     Description:
        Online conferencing server for the Intranet and Extranet and
        world wide web providing discussion forums and chat rooms.  Web
        Crossing is a groupware application server, accessible with any
        web browser, via most web servers.  It makes communication more
        efficient and productive than newsgroups or EMail mailing lists.


     Distribution media:
        Internet.


     Licensing policy:
        commercial; fully-functional demo available.


     Price range:
        US$995, unlimited users.


     Vendor:
        Lundeen & Associates



          P.O. Box 2900
          Alameda, CA 94501
          U.S.A.



     Phone:
        +1 510 521 5855

     Fax:
        +1 510 522 6647

     EMail:
        sales@lundeen.com

     URL:
        http://webcrossing.com


     Last modified:
        August 16, 1997.



  6.9.  ThreadTrack and WebTailor from Webthreads.



     Description:
        ThreadTrack and WebTailor are lightweight browser and server
        independent CGI script packages, developed under Linux, that add
        state to web servers.  ThreadTrack is used for tracking the
        activity of individual visitors to a web site, and WebTailor is
        used to dynamically modify the content of a web site in response
        to a visitor's profile or actions.
        WebTailor uses a simple server-side scripting language to modify
        the site's content.  The language, targeted to non-technical web
        designers, is easy to learn and use.  For the more technical,
        the CGI interface has been expanded to enable parameter passing
        on a per visitor basis between scripts running on different
        pages.

        ThreadTrack tags individual visitors to a web site with a unique
        identifier that remains with them for their visit.  Each
        visitor's session is recorded click-by-click, so a database of
        aggregate and individual activity is available for reports.
        Comprehensive reporting is included, and the data (dBase III) is
        easily transferrable to custom reporting packages.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        30 Day fully functional eval available from
        http://www.webthreads.com


     OS provisions:
        Any version of Linux on x86, a.out and ELF.


     Documentation:
        Web site and online provided with the package.


     Product support:
        EMail support.


     Extra features and add-ons:
        Msql interface.  Registration site management addition.


     Available since:
        June, 1996.


     Countries with distribution:
        World wide.


     Price range:
        ThreadTrack starts at US$295.  WebTailor starts at US$895.


     Vendor:
        Webthreads, L.L.C.



          1919 Gallows Road, 10th floor
          Vienna, VA 22182
          U.S.A.



     Phone:
        +1 703 848 9027

     Fax:
        +1 703 848 2444

     EMail:
        info@webthreads.com

     URL:
        http://www.webthreads.com

     Contact:
        Gavin Sutcliffe


     Last modified:
        March 18, 1997.



  7.  Databases



  7.1.  c-tree Plus



     Description:
        Based on advanced B+tree (balanced) algorithm, c-tree Plus API
        handles all aspects of database I/O.  Program single user or
        multi-user non-server applications royalty free and migrate
        existing c-tree Plus applications to the FairCom Server by
        recompiling.


     Distribution media:
        3.5" diskettes and CD-ROM.


     Licensing policy:
        c-tree Plus is licensed on a per programmer basis.  Single-user,
        multi-user and multi-user non-server royalty-free distribution.
        Contact FairCom for possible restrictions: general purpose
        database and application development systems prohibited.


     OS provisions:
        3 MB hard drive space; 128 KB of RAM.


     Documentation:
        Printed manuals distributed with product; full online
        documentation with CD-ROM, available in English and Japanese.


     Product support:
        Three months of full technical support from purchase date.
        Unlimited technical support and product updates available
        thereafter with c-tree Plus maintenance program.


     Available since:
        October, 1995.

     Countries with distribution:
        World wide.


     Price range:
        US$895 includes source.


     Vendor:
        FairCom



          4006 W. Broadway
          Columbia, MO 65203-0100
          U.S.A.



     Phone:
        +1 573 445 6833

     Fax:
        +1 573 445 9698

     EMail:
        Faircom@faircom.com

     URL:
        http://www.faircom.com

     Contact:
        Tamra Brown <tami@faircom.com>


     Vendor:
        FairCom Europe



          Via Patrioti 6
          I-24021 Albino
          Italy



     Phone:
        +39 35 773 464

     Fax:
        +39 35 773 806

     EMail:
        Europe@faircom.com


     Vendor:
        FairCom Japan



     Ikeda Bldg. #3 4F, 112-5
     Komei-chou, Tsu-city MIE 514
     Japan



     Phone:
        +81 059 229 7504

     Fax:
        +81 059 249 723


     Vendor:
        FairCom do Brasil Ltda.


     Phone:
        +55 11 3872 9802

     Fax:
        +55 11 3862 1752

     EMail:
        Brazil@faircom.com


     Last modified:
        August 7, 1997.



  7.2.  Empress



     Description:
        Empress for Linux is a multimedia RDBMS for members of the
        rapidly growing Linux developer community.  Key components of
        the package include the powerful Empress RDBMS as well as
        dynamic SQL, Empress 4GL, Empress GUI Builder for rapidly
        developing graphical front-ends to Empress applications, a WWW
        HTML toolkit, and a grahical point and click interface to the
        Empress RDBMS development environment.  A streamlined, single-
        user version of this product, Personal Empress for Linux, is
        available also.


     Distribution media:
        3.5" diskettes.


     Licensing policy:
        Free demos are available via FTP.  Must contact vendor.


     OS provisions:
        Empress GUI Builder requires OSF Motif version 1.2.4 or 2.0.  16
        MB RAM.  80 MB Disk Space.  486 CPU or better.


     Documentation:
        Printed documentation.

     Product support:
        Full technical support available, priced separately.


     Extra features and add-ons:
        Other features which are components of the package include
        shared libraries, shared memory, math library functions and a C
        language interface.


     Available since:
        December, 1995.


     Countries with distribution:
        World wide.


     Price range:
        Product is priced by number of concurrent users.  Please contact
        vendor.


     Vendor:
        Empress Software Inc.



          6401 Golden Triangle Drive
          Greenbelt, MD 20770
          U.S.A.



          3100 Steeles Avenue East
          Markham, ON L3R 8T3
          Canada



     Phone:
        +1 301 220 1919 (USA), +1 905 513 8888 (Canada)

     Fax:
        +1 301 220 1919 (USA), +1 905 513 1668 (Canada)

     EMail:
        sales@empress.com

     URL:
        http://www.empress.com

     Contact:
        Dick Naedel


     Last modified:
        August 4, 1997.



  7.3.  Essentia



     Description:
        Database Engine.

        Some Features: Remote databases, client/server, automatic
        consistency check, incremental backup, mirroring, shadowing,
        distributable database, journaling, versions, RISE, object
        oriented DBMS, implements relational model three tier
        client/server architecture, cooperative servers, language
        independent user-configurable (English, Spanish, Portuguese).


     Distribution media:
        4/8 mm. DAT, 150/525 MB tape.  Academic version available from:


     o  ftp://ftp.inter-soft.com

     o  http://www.inter-soft.com/html/products/essentia


     Licensing policy:
        Commercial.  Free version for Linux available.


     OS provisions:
        10 MB disk space.


     Documentation:
        Available in PostScript and HTML.


     Product support:
        Contact essentia-info@inter-soft.com for more information.


     Extra features and add-ons:
        SQL Server, ODBC Interface for Windows, JDBC Interface, User
        servers.


     Available since:
        1993.


     Countries with distribution:
        Argentina, Brazil, Russia, Mexico, Venezuela and USA.


     Price range:
        Linux version for free (with some restrictions).  Other prices
        available on request.


     Vendor:
        InterSoft Argentina S.A.



     Cordoba 883 9th. Floor
     Capital Federal (1054)
     Argentina



     Phone:
        +54 1 318 8900

     Fax:
        +54 1 318 8997

     EMail:
        info@inter-soft.com

     URL:
        http://www.inter-soft.com


     Last modified:
        August 4, 1997.



  7.4.  FairCom Server



     Description:
        High performance, multi-threaded, transaction processing server.
        Features include: industrial quality transaction processing,
        including full commit and rollback; intermediate save points and
        complete logging; automatic log management; restart/disaster
        recovery; user passwords; access security and online
        administration; deadlock detection/resolution; read/write locks
        at the record/individual key level; more.


     Distribution media:
        3.5" diskettes and CD-ROM.


     Licensing policy:
        The FairCom Server is licensed on a per machine basis.  Contact
        FairCom for specific licensing questions.


     OS provisions:
        2 MB of RAM.


     Documentation:
        Printed manuals distributed with product; full online
        documentation with CD-ROM, available in English and Japanese.


     Product support:
        Three months of full technical support from purchase date.
        Unlimited technical support and product updates available
        thereafter with Server maintenance program.


     Available since:
        October, 1995.
     Countries with distribution:
        World wide.


     Price range:
        US$445-$6795 depending upon platform and number of users.
        Special licensing and OEM agreements available.


     Vendor:
        FairCom



          4006 W. Broadway
          Columbia, MO 65203-0100
          U.S.A.



     Phone:
        +1 573 445 6833

     Fax:
        +1 573 445 9698

     EMail:
        Faircom@faircom.com

     URL:
        http://www.faircom.com

     Contact:
        Tamra Brown <tami@faircom.com>


     Vendor:
        FairCom Europe



          Via Patrioti 6
          I-24021 Albino
          Italy



     Phone:
        +39 35 773 464

     Fax:
        +39 35 773 806

     EMail:
        Europe@faircom.com


     Vendor:
        FairCom Japan



     Ikeda Bldg. #3 4F, 112-5
     Komei-chou, Tsu-city MIE 514
     Japan



     Phone:
        +81 059 229 7504

     Fax:
        +81 059 249 723


     Vendor:
        FairCom do Brasil Ltda.


     Phone:
        +55 11 3872 9802

     Fax:
        +55 11 3862 1752

     EMail:
        Brazil@faircom.com


     Last modified:
        August 7, 1997.



  7.5.  INFORMIX-SE



     Description:
        INFORMIX-SE is an SQL-based database engine for small- to
        medium-range applications.  It is the ideal solution for
        businesses that want the power of SQL without complex database
        administration requirements.  With over a decade of proven
        reliability, INFORMIX-SE has a strong track record among Unix
        database servers.

        INFORMIX-ESQL/C: Productivity, flexibility, portability, and
        standards are what programmers can achieve with the use of
        INFORMIX-ESQL for C.  Developers can continue to use these
        familiar third-generation languages (3GLs) for developing
        applications and gain the advantage of using SQL to access data
        from those applications.  Developers don't have to build their
        own database functions saving development time and effort.


     Distribution media:
        CD-ROM and Internet (FTP).


     Licensing policy:
        Free development license.  Runtime Licenses must be purchased
        separately.  Information on both is available at
        http://www.informix.com/informix/solutions/linux/lx.html.



     OS provisions:
        The database server process requires 1.2 MB to run, and can be
        installed with 6 MB of disk space.


     Documentation:
        Online manuals.


     Product support:
        Annual technical support and software maintenance contracts.


     Extra features and add-ons:
        TBD.


     Available since:
        July 22, 1998.


     Countries with distribution:
        World wide.


     Price range:
        To go along with your free development license, Informix offers
        attractively priced maintenance contracts through Informix-
        Assurance:
        http://www.informix.com/informix/services/csp/assurance/assurance.htm


     Vendor:
        Informix Software, Inc.


     EMail:
        sales@informix.com, http://www.informix.com/cgi-bin/contact.pl

     URL:
        http://www.informix.com


     Last modified:
        September 21, 1998.



  7.6.  Just Logic/SQL



     Description:
        Relational Database Management System


     Distribution media:
        3.5" diskettes.


     Licensing policy:
        Unlimited runtime included.


     Documentation:
        Printed manual, examples.
     Product support:
        EMail, fax or phone.


     Extra features and add-ons:

     o  client-server option: lets run applications on several computers
        running Windows or Linux, that access a central database on a
        Linux system.

     o  web-enabling option: passthrough between an HTTP Web server and
        a Just Logic/SQL database.  No C or Perl required.  SQL commands
        are embedded directly within HTML files.  Compatible with
        Netscape, Apache, NCSA and all other CGI-compliant HTTP servers.


     Available since:
        1993.


     Countries with distribution:
        World wide.


     Price range:
        US$149-$395.


     Vendor:
        Just Logic Technologies



          P.O. Box 63050, 40 Commerce Street
          Nun's Island, Montreal, QC H3E 1V6
          Canada



     Phone:
        +1 514 761 6887

     Fax:
        +1 514 642 6480

     EMail:
        sales@justlogic.com

     URL:
        http://www.justlogic.com

     Contact:
        Luc Vallieres


     Last modified:
        August 5, 1997.



  7.7.  KE Texpress



     Description:
        KE Texpress is a high-speed client server database engine that
        supports object-oriented, relational and free text data
        structures and operations.  It is particularly suited to
        applications with large data sets, complex operations and large
        numbers of concurrent users.  KE Texpress is used for a wide
        variety WWW database applications.  Vertical applications
        include collections management, library systems, vital
        statistics, archives, text retrieval and records management.


     Distribution media:
        Internet (FTP and WWW) and tape.


     Licensing policy:
        Commercial product licensed by number of concurrent users.  A 30
        day free trial is available at our web site.


     OS provisions:
        Linux ELF and a.out libraries.  Requires about 30 MB disk space.
        Runs on over 20 other varieties of Unix and Windows NT.


     Documentation:
        Printed and HTML documentation is available.


     Product support:
        Annual technical support (EMail, fax and phone) and software
        maintenance contracts.


     Extra features and add-ons:

     o  Texhtml WWW module - publish KE Texpress databases on the web

     o  Texql - SQL-like structured query language

     o  TexAPI - applications programming interface with client
        libraries for Windows (C, C++ and VB), Unix and Macintosh System
        7

     o  TexODBC - ODBC drivers for Windows

        KE Software has an extensive consulting service assisting
        clients to develop KE Texpress database applications.


     Available since:
        1984.


     Countries with distribution:
        USA, Canada, Australia, Hong Kong, Japan and Malaysia.


     Price range:
        US$2,000 to $100,000+.


     Vendor:
        KE Software Inc.


     303-601 West Broadway
     Vancouver, BC V5Z 4C2
     Canada



     Phone:
        +1 604 877 1960

     Fax:
        +1 604 877 1961

     EMail:
        info@kesoftware.com

     URL:
        http://www.kesoftware.com

     Contact:
        Andrzej Kowalski


     Last modified:
        August 4, 1997.



  7.8.  Qddb



     Description:
        Qddb is fast, powerful and flexible database software that runs
        on Unix.  Some of its features include: Tcl/Tk programming
        interface, easy to use, you can have a DB application completely
        up and, running in about 5 minutes, using nxqddb.  CGI interface
        for quick and easy online databases and guestbooks.  Fast, and
        powerful searching capability.  Report generator.  Barcharts and
        graphs.  Mass mailings with EMail, letters and postcards.


     Distribution media:
        3.5" diskettes, tape and Internet (FTP and WWW).


     Licensing policy:
        GNU and Commercial versions available.


     OS provisions:
        GNU version comes with source code.  Binary packages available
        for Linux, FreeBSD, and BSD/OS(BSDI) --- RPM and buildkit
        format.


     Documentation:
        Online documentation and PostScript files available.  Printed
        manuals also available upon request.


     Product support:
        User and programmer support available along with upgrade
        contracts.

     Extra features and add-ons:
        Tcl/Tk programming interface, CGI interface, report generator,
        many useful free and commercial applications built with Qddb.


     Available since:
        1996.


     Countries with distribution:
        World wide.


     Price range:
        See http://www.hsdi.com/orders


     Vendor:
        Herrin Software Development, Inc.



          41 South Highland Avenue
          Prestonsburg, KY 41653
          U.S.A.



     Phone:
        +1 606 886 8202

     Fax:
        +1 606 277 3239

     EMail:
        info@hsdi.com

     URL:
        http://www.hsdi.com

     Contact:
        Eric Herrin


     Last modified:
        November 4, 1997.



  7.9.  Raima Database Manager++



     Description:
        Low-level high performance database engine with C API and C++
        class library, for embedding in applications.  This database is
        used in thousands of leading commercial applications.  Includes
        source for C++ class library that encapsulates database
        navigation and object storage and retrieval into C++ classes,
        adding an object-oriented interface.  Supports multiple database
        models, including relational, network model, and combined.



     Distribution media:
        3.5" diskettes and tape.


     Licensing policy:
        Pay for development license, distribute runtime copies freely.


     Documentation:
        Extensive documentation available from Raima Corporation,
        dealing with all aspects of database, C API and C++ class
        library.


     Product support:
        Available from Raima Corporation on annual basis, raining
        available.


     Extra features and add-ons:
        Windows GUI Report Writer.


     Available since:
        1984, originally called db_VISTA.


     Countries with distribution:
        Direct in the USA, use distributors internationally - Germany,
        England, France, Italy, Spain, Netherlands, Russia, Estonia,
        Argentina, Columbia, Singapore, Malaysia, Australia, Finland,
        Taiwan, other countries.


     Price range:
        RDM++ Database Module is US$995 for single user, US$2,395 for
        multi-user.  System is US$1,395 for single user, US$3,395 for
        multi-user (System includes RDM++ database, QUERY SQL query tool
        and REVISE database restructuring tool).  All versions available
        with source code for extra cost.

        Depends on machine class; lowest is US$3,995 without system
        utilities; US$6,195 with system utilities.


     Vendor:
        Raima Corporation



          4800 Columbia Center
          701 5th Avenue
          Seattle, WA 98104



     Phone:
        +1 800 327 2462, +1 206 515 9477

     Fax:
        +1 206 748 5200

     EMail:
        sales@raima.com
     URL:
        http://www.raima.com

     Contact:
        Dave Morse


     Last modified:
        March 18, 1997.



  7.10.  Empress Embedded RDBMS



     Description:
        The Empress Embedded RDBMS is an embedded systems developer's
        toolkit.  The RDBMS engine is fast, compact and easy-to-embed.
        Additionally, this package possesses superior bulk object
        handling capabilities.  Embedded Empress RDBMS is Internet ready
        with a JDBC/ODBC bridge available.


     Distribution media:
        3.5" diskettes.


     Licensing policy:
        Please contact vendor for evaluations copies.


     OS provisions:
        32 MB of RAM, 60 MB disk disk space.


     Documentation:
        Printed documentation.


     Product support:
        Full technical support available, priced separately.


     Extra features and add-ons:
        Extra features included with the toolkit are Empress Report
        Writer and enhanced Internet capabilities (ability to use Java
        applets, etc.) via the HTML toolkit.


     Available since:
        January, 1997.


     Countries with distribution:
        World wide.


     Price range:
        Starting at US$1000 for PCs, US$4000 for typical workstations,
        US$16,000 for mid-range servers.


     Vendor:
        Empress Software Inc.

          6401 Golden Triangle Drive
          Greenbelt, MD 20770
          U.S.A.



          3100 Steeles Avenue East
          Markham, ON L3R 8T3
          Canada



     Phone:
        +1 301 220 1919 (USA), +1 905 513 8888 (Canada)

     Fax:
        +1 301 220 1919 (USA), +1 905 513 1668 (Canada)

     EMail:
        sales@empress.com

     URL:
        http://www.empress.com

     Contact:
        Dick Naedel


     Last modified:
        August 4, 1997.



  7.11.  SOLID Server



     Description:
        SOLID Server is a database engine for new applications and
        products.  It is extremely easy to set up, and has a small
        footprint.  SOLID Server is standards-compliant and full of
        power.  It is perfectly suited for distributed use in countless
        copies.  Its maintenance is care-free, requiring minimal or no
        administrator attention.


     Distribution media:
        3.5" diskettes and Internet (FTP and WWW).


     Licensing policy:
        Copy-protected.


     OS provisions:
        At least 2 MB RAM, recommended are 8 MB; harddisk about 3-4 MB.


     Documentation:
        English manuals and online help.  WWW.

     Product support:
        Available.


     Available since:
        1994.


     Countries with distribution:
        World wide.


     Price range:
        SOLID Desktop US$99, SOLID Server US$199/seat, SOLID Web Engine
        US$495.


     Vendor:
        Solid Information Technology Ltd



          Huovitie 3
          FIN-00400 Helsinki
          Finland



     Phone:
        +358 9 477 4730

     Fax:
        +358 9 477 47 390

     EMail:
        info@solidtech.com

     URL:
        http://www.solidtech.com


     Last modified:
        August 4, 1997.



  7.12.  Velocis Database Server



     Description:
        Velocis Database Server is designed for database application
        developers who are looking for a high performance client/server
        or web database engine.  Velocis is a scaleable SQL
        client/server database engine that provides a rich set of
        architectural choices and APIs including ANSI SQL, SQL C-API,
        low-level C-API, C++ class libraries, and support for custom
        APIs.  Unlike typical relational client/server database
        products, Velocis supports both relational and pointer-based
        network model databases in any combination as well as processing
        on either side of the client/server equation.  The choices of
        multiple operating platforms, APIs, processing locality (client
        or server), and database model can be mixed and combined to
        satisfy the performance requirements of virtually any
        application.


     Distribution media:
        3.5" diskettes and tape.


     Licensing policy:
        Pay for development license.  Runtimes are requires to
        distribute applications.


     Documentation:
        Extensive documentation available from Raima Corporation,
        dealing with all aspects of database, C API and C++ class
        library.



     Product support:
        Available from Raima Corporation on annual basis, raining
        available.


     Extra features and add-ons:
        Windows GUI Report Writer, Raima Object Manager.


     Available since:
        1993, originally called Raima Database Server.


     Countries with distribution:
        World wide.


     Price range:
        1-8 users: US$1,995, 1-25 users: US$3,995, unlimited: US$8,995.


     Vendor:
        Raima Corporation



          4800 Columbia Center
          701 5th Avenue
          Seattle, WA 98104



     Phone:
        +1 800 327 2462, +1 206 515 9477

     Fax:
        +1 206 748 5200

     EMail:
        sales@raima.com

     URL:
        http://www.raima.com


     Contact:
        Dave Morse


     Last modified:
        November 4, 1997.



  7.13.  Yard SQL



     Description:
        The YARD company offers the following products:


     o  YARD-SQL -- Relational SQL client/server database with
        compliance to X/Open XPG4 and ANSI SQL 92 including network
        support for accessing remote databases

     o  YARD-ESQLC -- Embedded SQL for C

     o  YARD-ODBC -- ODBC interface for MS Windows clients

     o  YARD-X -- Motif client for database access (No development tool)

     o  YARD-JDBC -- Java Interface


     Distribution media:
        CD-ROM and Internet (FTP).


     Licensing policy:
        License number and activation key for each product and
        installation with user dependent licenses.  A Private Edition
        (limited to 1 user and 5 MB database) for non commercial private
        use and for evaluation is available at ftp://ftp.yard.de.


     OS provisions:
        Linux ELF version; RAM usage: 1 MB (minimum) for shared memory,
        500 KB per user.  Disk usage: YARD-SQL 10 MB, YARD-ESQLC 1 MB,
        YARD-ODBC 1.5 MB and YARD-X 5 MB.


     Documentation:
        Printed 600 pages reference and users guide in German.  English
        documentation is available only as PostScript file.


     Product support:
        Upon request.


     Extra features and add-ons:
        All products also available for other widely distributed Unix
        systems (e.g. SCO Unix, SPARC Solaris, IBM, HP, SGI).


     Available since:
        January, 1994.



     Countries with distribution:
        Contact YARD Software GmbH for information about resellers.


     Price range:
        Upon request.


     Vendor:
        YARD Software GmbH



          Wikingerstr. 18
          D-51107 Koeln
          Germany



     Fax:
        +49 221 98664 99

     EMail:
        yard@yard.de

     URL:
        http://www.yard.de

     FTP:
        ftp://ftp.yard.de

     Contact:
        Thomas Schonhoven <thomass@yard.de>


     Last modified:
        August 4, 1997.



  8.  Data Visualisation and CAD



  8.1.  IDL (Interactive Data Language)



     Description:
        IDL is powerful software for data analysis, visualization, and
        application development.  IDL's features include flexible I/O,
        object-oriented programming, 2D plotting, 3D graphics, volume
        rendering, image processing, mathematics, statistics, a cross-
        platform GUI toolkit, plus a high-level, array-oriented
        programming language.  Use IDL for visual data analysis, rapid
        prototyping, or application development.  IDL programs,
        including their graphical user interfaces, are portable across
        Linux, Windows 3.11, Windows 95, Windows NT, Mac, PowerMac, Unix
        and VMS.

        The IDL-Student Version is a functionality-limited version of
        IDL 5.0.  It is designed to compliment IDL-teaching lab
        environments and give students access to software specifically
        designed for technical curriculums including physics, astronomy,
        engineering, earth sciences, medical sciences and computer
        science.  For more information or to place an order, visit our
        web site.


     Distribution media:
        CD-ROM and Internet (FTP).


     Licensing policy:
        Free demo CD-ROM available or download via FTP.


     OS provisions:
        IDL 5.0 for Linux is built using the Linux 2.0.18 kernel and the
        Red Hat version 4.0 Linux distribution.


     Documentation:
        3000+ pages of documentation on paper and hypertext online help.


     Product support:
        Customer support service, maintenance/update service, training
        and consulting are available.  In addition, a Usenet group is
        devoted to IDL.


     Extra features and add-ons:
        ENVI: remote sensing image processing application, DataMiner:
        ODBC database access, HDF, CDF, netCDF support, animation,
        volume slicer, high resolution mapping.


     Available since:
        May, 1997.


     Countries with distribution:
        Ask vendor.


     Price range:
        Contact vendor/distributor.


     Vendor:
        Research Systems, Inc.



          2995 Wilderness Place
          Boulder, CO 80301
          U.S.A.



     Phone:
        +1 303 786 9900

     Fax:
        +1 303 786 9909


     EMail:
        info@rsinc.com

     URL:
        http://www.rsinc.com

     FTP:
        ftp://ftp.rsinc.com


     Last modified:
        November 5, 1997.



  8.2.  Megahedron



     Description:
        A flexible and powerful 3D graphics engine controlled by a high-
        level interpreted language called SMPL.  With it, you can learn
        about 3D, write your own interactive simulations, animations,
        and ray-tracings.  You can even write your own shaders,
        customize procedural objects and motions, and use up to 64
        computers at once for net rendering.  Includes executables for
        Windows 95, Windows NT x86 and Alpha, SGI Irix and Linux.


     Distribution media:
        CD-ROM, ISO-9660 and Rock Ridge.


     Licensing policy:
        Very flexible.  The owner is allowed to run as many copies as
        they can, on any platforms.  Demo version, full documentation
        and sample images and scripts available on our web site.


     OS provisions:
        Supports kernel 1.2.8 or 1.3.15.  Non-ELF, a.out executable
        (QMAGIC).  16 MB of RAM minimum recommended.  7 MB free disk
        space recommended.


     Documentation:
        In HTML on CDROM.


     Product support:
        Private news server, EMail.  Patches on web site.


     Extra features and add-ons:
        Everything included on one CD-ROM.


     Available since:
        August, 1996.


     Countries with distribution:
        World wide, direct and through dealers.



     Price range:
        US$99


     Vendor:
        Syndesis Corporation



          235 South Main Street
          Jefferson, WI 53549
          U.S.A.



     Phone:
        +1 414 674 5200

     Fax:
        +1 414 674 6363

     EMail:
        syndesis@threedee.com

     URL:
        http://www.threedee.com

     Contact:
        John Foust <jfoust@threedee.com>


     Last modified:
        November 3, 1997.



  8.3.  Tecplot 7.0



     Description:
        Tecplot is interactive data visualization software for XY
        plotting, 2D and 3D mesh, contour, vector, scatter, and shade
        plots.  For more information, see the Amtec Engineering web
        site.


     Distribution media:
        CD-ROM and Internet (FTP).


     Licensing policy:
        Either personal licenses (node locked) or network licenses.
        Evaluation copies available on CD-ROM or by anonymous FTP.


     OS provisions:
        12 MB minimum, Linux 1.2 or newer (available in both statically
        linked and dynamically linked versions).  Use the statically
        linked version if your system does not have Motif 1.2 or newer
        installed.  32 MB RAM is recommended.



     Documentation:
        Printed User's and Reference Manuals, full online help.
        English.


     Product support:
        Update and technical support included with license for first
        three months.  Extra charge (ask for EUSS) after that.  Training
        courses available.


     Available since:
        V7 since September 1996, V6 since August 1993.


     Countries with distribution:
        Many, see Amtec web site.


     Price range:
        US$1795 for personal license, US$2395 for single-user network
        license, US$1795 for each additional user.  All prices the USA
        and Canada only.


     Vendor:
        Amtec Engineering, Inc



          PO Box 3633
          Bellevue, WA 98009-3633
          U.S.A.



     Phone:
        +1 800 676 7568, +1 425 827 3304

     Fax:
        +1 425 827 3989

     EMail:
        tecplot@amtec.com

     URL:
        http://www.amtec.com


     Last modified:
        August 4, 1997.



  8.4.  VariCAD



     Description:
        Mechanical CAD system available for Linux and Windows 95 and
        Windows NT.

        The system is equipped with all basic resources necessary both
        for constructors' and designers' work in engineering.  It
        includes functions for 3D modeling, 2D drawing, editing,
        transformations, working with user defined objects, block, group
        and symbol creating capabilities.  The whole system is very
        customizable and widely open.


     Distribution media:
        CD-ROM, Internet (WWW).


     Licensing policy:
        Free demo version available on our web site.


     OS provisions:
        Kernel version 2.0 or higher, XFree86 version 3.1+, RAM 16 MB,
        harddisk 20 MB, libc 5.4.


     Documentation:
        Online help, English.


     Product support:
        New version about every three months.


     Extra features and add-ons:
        New versions during first year free.


     Available since:
        1991.


     Countries with distribution:
        World wide.


     Price range:
        US$dollar;199-$499.


     Vendor:
        VariCAD



          931 Greenbriar Avenue
          Ottawa, ON K2C 0J8
          Canada



          P. O. Box 38
          Liberec 2
          460 02
          Czech Republic



     Phone:
        +1 613 723 5319

     Fax:
        +1 613 723 5319

     EMail:
        mail@varicad.com

     URL:
        http://www.varicad.com

     Contact:
        Petr Placek


     Last modified:
        August 15, 1998.



  8.5.  VARKON



     Description:
        A high level development tool for CAD and Product modeling
        applications.  Interactive parametric modelling in 2D and 3D
        with object oriented database.  High level CAD and modelling
        language MBS included.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        Free binary for Linux.


     OS provisions:
        Requires X but not Motif.  Needs 3 MB of harddisk for basic
        installation and 3MB of RAM to run.


     Documentation:
        400 pages of documentation included in the free version for
        Linux.


     Product support:
        Service with continous updates and free consultation available
        for US $75/month.


     Extra features and add-ons:
        Additional plotterdrivers available free of charge.


     Available since:
        July, 1996.


     Countries with distribution:
        World wide.

     Price range:
        Linux version is free of charge.


     Vendor:
        Microform AB



          Henningsholmsgatan 4
          S-703 69 Orebro
          Sweden



     Phone:
        +46 19314932

     Fax:
        +46 19314969

     EMail:
        info@microform.se

     URL:
        http://www.microform.se

     Contact:
        Johan Kjellander


     Last modified:
        September 30, 1997.



  8.6.  XVScan



     Description:
        Image scanning and manipulation software for HP ScanJet
        scanners.


     Distribution media:
        Internet (EMail and FTP).  4mm DDS2 DAT tape or 3.5 diskettes
        (additional US$15 in the USA, US$25 international).


     Licensing policy:
        XVScan is based on XV and is not available in demo version due
        to licensing restrictions.  Distributed with full source code.


     OS provisions:
        Linux, tested with 1.2.x and 2.0.x, requires a recent generic
        SCSI driver support to be built in (no earlier than 1.1.79).
        Motif is not required.  Any XFree version (X11R5, X11R6).


     Documentation:
        Online, WWW, English.

     Product support:
        Updates free for first year.


     Extra features and add-ons:
        Also available for HP-UX, BSD/OS 2.2 and 3.0, SunOS 4.1.x,
        Solaris 2.x, and FreeBSD.


     Available since:
        May, 1995.


     Countries with distribution:
        World wide.


     Price range:
        US$50 for FTP or EMail shipping.  Additional US$15 for media in
        the United States, US$15, internationally.  Mastercard, Visa and
        Discover, and American Express Credit Cards accepted.


     Vendor:
        tummy.com, ltd.



          3506 Stratton Drive
          Fort Collins, CO 80525-2722
          U.S.A.



     Phone:
        +1 970 223 8215

     Fax:
        +1 408 490 2728

     EMail:
        xvscan@tummy.com

     URL:
        http://www.tummy.com/xvscan

     Contact:
        Sean Reifschneider <jafo@tummy.com> or Evelyn Mitchell
        <efm@tummy.com>


     Last modified:
        August 4, 1997.



  9.  Development Tools



  9.1.  ACUCOBOL-GT



     Description:
        ACUCOBOL-GT is an ANSI-85 COBOL development system with
        compiler, runtime, debugger, support utilities and
        documentation.  It offers single source hardware independence,
        GUI COBOL, client/server capabilities, multithreading support,
        and data source flexibility.  Additionally, ACUCOBOL-GT is year
        2000 compliant.


     Distribution media:
        currently 3,5" diskettes (A CD-ROM is planned for 2Q/98).


     Licensing policy:
        Runtime license for each installed application including license
        fees for all products free of charge 30 day evaluation copy
        available on our web site.


     OS provisions:
        Linux a.out and ELF.  Tested on Red Hat Linux 4.1 with kernel
        version 2.0.30.


     Documentation:
        Printed dccumentation for all products (english), online
        documentation for web evaluation copy.


     Product support:
        Update service (annual fee is 20% of product list price),
        training courses for core products (DM 600/day at scheduled
        dates), technical support included in update service.


     Available since:
        February, 1995.


     Countries with distribution:
        World wide.


     Price range:
        US$1.500 for single user development system (Linux), US$300 for
        each additional developer, runtime fees on request (price is
        depending on contract form).


     Vendor (Germany):
        Acucobol Deutschland GmbH



          Otto-Hahn-Str. 9
          D-61381 Friedrichsdorf
          Germany



     Phone:
        +49 6175 93310


     Fax:
        +49 6175 1429

     EMail:
        aschmidt@acucobol.de

     Contact:
        Annette Schmidt


     Vendor (USA):
        Acucobol, Inc.



          7950 Silverton Avenue, Suite #201
          San Diego, CA 92126
          U.S.A.



     Phone:
        +1 800 COBOL 85, +1 619 6897220

     Fax:
        +1 619 566 3071

     EMail:
        info@acucobol.com

     URL:
        http://www.acucobol.com

     Contact:
        Jeff Freedman


     Last modified:
        November 1, 1997.



  9.2.  Amzi! Prolog & Logic Server



     Description:
        Amzi! enables the easy integration of intelligent components
        with conventional applications allowing you to add logic-bases
        that give advice, configure and tune systems, diagnose problems,
        apply business rules, monitor processes and parse documents.
        Your applications access a logic-base of rules just as a
        database server accesses records.  The rules are expressed in
        Prolog which has powerful, built-in search and pattern matching
        capabilities.  The Amzi! Logic Server is encapsulated as a C++
        Class and C API Interface.  You can add your own Prolog
        functions in C/C++.  Includes: compiler, listener, debugger,
        linker, EXE, generator, call-in/call-out Logic Server API, full
        documentation, comprehensive Prolog tutorial and lots of sample
        code.


     Distribution media:
        Internet.
     Licensing policy:
        The Professional Edition includes an unlimited, royalty-free
        license.  The Personal Edition is limited to distributing
        applications for non-commercial use only.


     OS provisions:
        About 350 KB of RAM for typical small application, 3-4 MB disk.


     Documentation:
        HTML format, includes full Prolog tutorial.


     Product support:
        Subscription Plus service provides automatic updates for a full
        year, $198.  Custom development services available.


     Linux Support:
        No Linux system included.  For Amzi! software, free tech support
        for registered users by phone, fax and EMail.


     Available since:
        November 3, 1995.


     Countries with distribution:
        World wide.


     Price range:
        Personal (Shareware), $49.  Professional, $298.


     Vendor:
        Amzi! inc.



          40 Samuel Prescott Drive
          Stow, MA 01775
          U.S.A.



     Phone:
        +1 508 897 7332

     Fax:
        +1 508 897 2784

     EMail:
        info@amzi.com

     URL:
        http://www.amzi.com

     Contact:
        Mary Kroening



     Last modified:
        August 4, 1997.



  9.3.  Basmark QuickBASIC



     Description:
        The Basmark QuickBASIC Compiler is a multi-user IBM-PC BASICA,
        MBASIC and Microsoft QuickBASIC Compiler designed to provide
        performance and consistency across a variety of machines (e.g.
        i386 and i486, Pentium, SPARC, RS/6000, HP PA-RISC) under Unix,
        AIX, SunOS, Linux, HP-UX and Xenix.


     Distribution media:
        Internet.


     Licensing policy:
        Per machine, no run-time restrictions.


     OS provisions:
        GNU GAS and LD must be installed.


     Documentation:
        400+ page manual, release and installation notes available in
        hardcopy form for an additional US$50 (plus shipping).


     Product support:
        Updates available for US$139 less shipping.  Maintenance
        contracts available.


     Extra features and add-ons:
        C-ISAM (Informix Inc.) Interface in C source code form.  Cost is
        US$35.


     Available since:
        December, 1993.


     Countries with distribution:
        World wide.


     Price range:
        US$195.


     Vendor:
        Basmark Corporation



          P.O. Box 40450
          Cleveland, OH 44140
          U.S.A.


     Phone:
        +1 216 871 8855

     Fax:
        +1 216 871 9011

     EMail:
        jgo@basmark.com (for orders)

     URL:
        http://www.basmark.com

     Contact:
        Joseph O'Toole (for orders)


     Last modified:
        November 4, 1997.



  9.4.  Critical Mass CM3



     Description:
        Systems development compiler and runtime.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        Commercial with library source, evaluation licenses available
        for download at http://www.cmass.com/cm3.


     OS provisions:
        Linux/ELF.


     Documentation:
        Online.


     Product support:
        Optional.


     Extra features and add-ons:
        See http://www.cmass.com/cm3


     Available since:
        May, 1996.


     Countries with distribution:
        USA.


     Price range:
        US$479/seat.


     Vendor:
        Critical Mass, Inc.



          Critical Mass, Inc.
          225R Concord Avenue
          Cambridge, MA 02138
          U.S.A.



     Phone:
        +1 617 354 6277

     Fax:
        +1 617 354 5027

     EMail:
        info@cmass.com

     URL:
        http://www.cmass.com


     Last modified:
        May 19, 1997.



  9.5.  Dynace



     Description:
        Dynace (pronounced like ``dynasty'' without the ``t'') is a
        preprocessor, include files and a library which extends the C
        language with advanced object oriented capabilities, automatic
        garbage collection and multiple threads.  Dynace is designed to
        solve many of the problems associated with C++ while being
        easier to learn and containing more flexable object oriented
        facilities.  Dynace is able to add facilities previously only
        available in languages such as Smalltalk and CLOS without all
        the overhead normally associated with those environments.


     Distribution media:
        Internet (WWW); including full C source code.


     Licensing policy:
        One license per programmer; Applications are royalty free. Full
        system is on http://www.edge.net/algorithms.  Free for non-
        commercial use.


     OS provisions:
        Any Linux.


     Documentation:
        310 pages; in Postscript, HP PCL, or TeX DVI.


     Product support:
        Dynace-support@edge.net


     Extra features and add-ons:
        Complete Windows development system.


     Available since:
        December, 1993.


     Price range:
        US$599.


     Vendor:
        Algorithms Corporation



          3020 Liberty Hills Drive
          Franklin, TN 37067
          U.S.A.



     Phone:
        +1 800 566 8991, +1 615 791 1636

     Fax:
        +1 615 791 7736

     EMail:
        blake@edge.net

     URL:
        http://www.edge.net/algorithms

     Contact:
        Blake McBride


     Last modified:
        August 4, 1997.



  9.6.  Absoft Fortran 77



     Description:
        VAX/VMS compatible ANSI Fortran 77 compiler and debugger.


     Distribution media:
        3.5" diskettes.


     Licensing policy:
        Single user license; multi-user packages also available.


     OS provisions:
        Linux 1.2.13.


     Documentation:
        300+ pages hard copy documentation.


     Product support:
        No-charge technical support.


     Available since:
        March, 1996.


     Countries with distribution:
        World wide.


     Price range:
        US$525-$2,000.


     Vendor:
        Absoft Corporation



          2781 Bond Street
          Rochester Hills, MI 48309
          U.S.A.



     Phone:
        +1 248 853 0050

     Fax:
        +1 248 853 0108

     EMail:
        sales@absoft.com

     URL:
        http://www.absoft.com

     Contact:
        Wood Lotz


     Last modified:
        August 7, 1997.



  9.7.  Finesse



     Description:
        OSF/Motif GUI for shell scripts.


     Distribution media:
        Internet (FTP).


     Licensing policy:
        Finesse is a fully commercial product for other Unixes where
        nodelocked licenses are possible.  The Linux version is freely
        available via FTP.  Floppy medium is DM 90.


     OS provisions:
        ELF Libraries.  X11R6.  No Motif required.


     Documentation:
        PostScript File.


     Product support:
        No support for free version.


     Available since:
        May, 1995.


     Countries with distribution:
        World wide.


     Price range:
        Free demo.  Commercial version with support on request.


     Vendor:
        science + computing GmbH



          Hagellocher Weg 71
          D-72070 Tuebingen
          Germany



     Phone:
        +49 7071 9457 0

     Fax:
        +49 7071 9457 27

     EMail:
        info@science-computing.de

     URL:
        http://www.science-computing.de

     FTP:
        ftp://ftp.science-computing.de/pub/finesse.

     Contact:
        Olaf Flebbe


     Last modified:
        February 25, 1997.



  9.8.  ISE Eiffel



     Description:
        ISE Eiffel is a seamless object-oriented development
        environment.  ISE Eiffel provides an integrated solution for
        software developers through pure object-oriented methods, from
        analysis and design through code generation, maintenance, and
        reverse engineering.

        The components of ISE Eiffel include EiffelBench, EiffelBase,
        EiffelBuild, EiffelVision, EiffelLex, EiffelParse, EiffelNet,
        EiffelStore, ObjEdit, EiffelCase, EiffelMath, EiffelWeb, DLE
        (Dynanic Linking in Eiffel) and SCOOP (Distribution/Concurrency
        mechanism).


     Distribution media:
        CD-ROM and Internet (FTP and WWW)


     Licensing policy:
        No run-time fees are required for products, commercial or
        otherwise, developed with ISE's technology.  In the case of
        commercial products we simply require the product and its
        documentation to acknowledge ISE Eiffel clearly.  The copyright
        holder must acknowledge the product's use/incorporation of ISE
        Eiffel by (a) Featuring "ISE Eiffel" prominently in product
        documentation, and (b) Featuring an "ISE Eiffel" software window
        or pop-up message clearly visible during the copyrighted
        product's installation process.


     OS provisions:
        Linux ELF or a.out.


     Documentation:
        Printed documentation.  Additional online help.


     Product support:
        Update service, maintenance, training available.


     Available since:
        August, 1994.


     Countries with distribution:
        World wide.


     Price range:
        Starting at US$99.


     Vendor:
        Interactive Software Engineering, Inc.

          ISE Building
          270 Storke Road, 2nd Floor
          Goleta, CA 93117
          U.S.A.



     Phone:
        +1 805 685 1006

     Fax:
        +1 805 685 6869

     EMail:
        info@eiffel.com

     URL:
        http://www.eiffel.com


     Last modified:
        October 3, 1997.



  9.9.  EiffelBench



     Description:
        Object-oriented CASE Workbench.


     Distribution media:
        CD-ROM and Internet (FTP and WWW).


     Licensing policy:
        No run-time fees are required for products, commercial or
        otherwise, developed with ISE's technology.  In the case of
        commercial products we simply require the product and its
        documentation to acknowledge ISE Eiffel clearly.  The copyright
        holder must acknowledge the product's use/incorporation of ISE
        Eiffel by (a) Featuring "ISE Eiffel" prominently in product
        documentation, and (b) Featuring an "ISE Eiffel" software window
        or pop-up message clearly visible during the copyrighted
        product's installation process.


     OS provisions:
        Linux ELF or a.out.


     Documentation:
        Eiffel: The Environment.  Language References.


     Product support:
        Update service, maintenance, training available.


     Available since:
        August, 1994.

     Countries with distribution:
        World wide.


     Price range:
        Starting at US$99.


     Vendor:
        Interactive Software Engineering, Inc.



          ISE Building
          270 Storke Road, 2nd Floor
          Goleta, CA 93117
          U.S.A.



     Phone:
        +1 805 685 1006

     Fax:
        +1 805 685 6869

     EMail:
        info@eiffel.com

     URL:
        http://www.eiffel.com


     Last modified:
        October 3, 1997.



  9.10.  C-Forge IDE



     Description:
        C-Forge is a highly scalable, multi-user integrated development
        environment that provides full project management and complete
        edit, compile and debug cycle support.  Includes its own full-
        featured editor, revision control tool and diff tool.  Drag and
        drop is enabled throughout the environment.  Allows easy
        configuration and use of external tools.  Currently supports
        C/C++ -- more languages on the way.


     Distribution media:
        Internet (FTP).


     Licensing policy:
        Single user and floating multi user licenses available. Free
        demo available at our web site.


     OS provisions:
        Works with Linux kernels 2.0.x and 2.1.x.  Installations
        available in tar.gz and RPM formats.
     Documentation:
        Online.


     Product support:
        By EMail.


     Extra features and add-ons:
        We add the features you want to future versions of C-Forge.


     Available since:
        February, 1998.


     Countries with distribution:
        World wide.


     Price range:
        US$30 for single user version.  Contact for corporate pricing
        policies.  Educational discounts available.


     Vendor:
        Code Forge Inc.


     EMail:
        consult@codeforge.com

     URL:
        http://www.codeforge.com

     Contact:
        Yuri Mironoff


     Last modified:
        February 8, 1998.



  9.11.  IdeaFix



     Description:
        The InterSoft Development Environment for Applications in Unix,
        or IdeaFix, is a set of programming tools and utilities designed
        to provide an integrated environment for programmers as well as
        end-users.  The aim of IdeaFix is to maximize performance and
        productivity for both.

        For the end-user, IdeaFix offers a user-friendly interface and
        an online help system.  IdeaFix provides the developer with
        tools to simplify development of such design criteria as
        relational databases and modular structured programming.


     Distribution media:
        4/8 mm. DAT, 150/525 MB tape.  Academic version available from:



     o  ftp://ftp.inter-soft.com/pub/ideafix

     o  http://www.inter-soft.com/html/products/ideafix


     Licensing policy:
        Commercial.


     OS provisions:
        20 MB disk space, and GNU C/C++ compiler.


     Documentation:
        Available in PostScript.


     Product support:
        Contact ideafix-info@inter-soft.com for more information.


     Extra features and add-ons:
        SQL server, Dali - Development Environment, Cracker for Windows.


     Available since:
        1986.


     Countries with distribution:
        Argentina, Brazil, Russia, Mexico, Venezuela and USA.


     Price range:
        Linux version for free (with some restrictions).  Other prices
        available on request.


     Vendor:
        InterSoft Argentina S.A.



          Cordoba 883 9th. Floor
          Capital Federal (1054)
          Argentina



     Phone:
        +54 1 318 8900

     Fax:
        +54 1 318 8997

     EMail:
        info@inter-soft.com

     URL:
        http://www.inter-soft.com


     Last modified:
        August 4, 1997.
  9.12.  j-tree



     Description:
        Harness the power of Java clients while maintaining a legacy
        database on wide variety of O/S.  Java API with c-tree Plus'
        ISAM functionality gives Java functionality through native
        methods/RMI.  j-tree utilizes the power/flexibility of FairCom's
        full line of database Servers.


     Distribution media:
        3.5" diskettes.


     Licensing policy:
        A licensed copy of c-tree Plus, thereafter royalty free.


     OS provisions:
        2 MB of RAM.


     Documentation:
        Full online documentation with CD-ROM, available in English and
        Japanese.


     Product support:
        Three months of full technical support from purchase date.


     Available since:
        August, 1997.


     Countries with distribution:
        World wide.


     Price range:
        Upon request.


     Vendor:
        FairCom



          4006 W. Broadway
          Columbia, MO 65203-0100
          U.S.A.



     Phone:
        +1 573 445 6833

     Fax:
        +1 573 445 9698

     EMail:
        Faircom@faircom.com
     URL:
        http://www.faircom.com

     Contact:
        Tamra Brown <tami@faircom.com>


     Vendor:
        FairCom Europe



          Via Patrioti 6
          I-24021 Albino
          Italy



     Phone:
        +39 35 773 464

     Fax:
        +39 35 773 806

     EMail:
        Europe@faircom.com


     Vendor:
        FairCom Japan



          Ikeda Bldg. #3 4F, 112-5
          Komei-chou, Tsu-city MIE 514
          Japan



     Phone:
        +81 059 229 7504

     Fax:
        +81 059 249 723


     Vendor:
        FairCom do Brasil Ltda.


     Phone:
        +55 11 3872 9802

     Fax:
        +55 11 3862 1752

     EMail:
        Brazil@faircom.com


     Last modified:
        August 9, 1997.
  9.13.  KAI C++



     Description:
        The KAI C++ compiler provides conformance to the latest draft
        standard, high performance, low abstraction penalty, identical
        syntax and libraries on all supported platforms and superior
        customer support.  No other compiler is as close to the draft
        standard.


     Distribution media:
        Internet (FTP and WWW).


     Licensing policy:
        Commercial.  30 day free trial available at
        http://www.kai.com/kcc_howto.shtml


     OS provisions:
        Red Hat Linux 2.1 or later.  Other Software: gcc 2.7.2.1.  Disk
        space: 15 MB.


     Documentation:
        Complete online documentation is supplied.


     Product support:
        No-charge technical support.  Annual Support service provides
        automatic updates for a full year, US$79.


     Available since:
        May, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$395 single processor; US$545 multiprocessor.


     Vendor:
        Kuck & Associates, Inc.



          1906 Fox Drive
          Champaign, IL  61820-7345
          U.S.A.



     Phone:
        +1 217 356 2288

     Fax:
        +1 217 356 5199

     EMail:
        kai@kai.com

     URL:
        http://www.kai.com/kcc_howto.shtml

     Contact:
        Bruce Leasure <bruce@kai.com>


     Last modified:
        July 14, 1997.



  9.14.  Khoros Pro 2.1



     Description:
        Khoros Pro 2.2 is a software development environment with
        extensive image processing, software development, and data
        visualization capabilities.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Single user license comes with Khoros Pro CD-ROM.  For software
        developers, independent software developer licenses are
        available.


     OS provisions:
        Linux 2.0.18, gcc 2.7.2, Fortran compiler f2c 19951025+ AT&T
        Bell Labs.


     Documentation:
        Printed documentation; Installation Guide and User's Guide come
        with the CD-ROM.  Five volume Developer's Manual set available
        from KRI.


     Product support:
        Training in Software Development and Digital Image Processing
        scheduled through 1998.  See
        http://www.khoral.com/training/training.html.

        Maintenance, technical and engineering support may be purchased
        from KRI on a negotiated basis.


     Available since:
        August, 1996.


     Countries with distribution:
        World wide.  Addison Wesley selling to educational market.


     Price range:
        Single user Khoros Pro 2.2 is US$549.  Independent software
        developer licenses start at US$5,000 and go up depending on
        platforms and organization structure.  Royalty agreements can be
        negotiated.


     Vendor:
        Khoral Research Inc.



          6001 Indian School NE Suite 200
          Albuquerque, NM 87110
          U.S.A.



     Phone:
        +1 505 837 6500

     Fax:
        +1 505 881 3842

     EMail:
        info@khoral.com

     URL:
        http://www.khoral.com

     FTP:
        ftp://ftp.khoral.com

     Contact:
        Annie MacFarlane <annie@khoral.com>


     Last modified:
        August 4, 1997.



  9.15.  MetaCard



     Description:
        MetaCard is a GUI development and multimedia authoring tool
        compatible with Apple Corporation's HyperCard.  Anyone can use
        MetaCard to build GUI applications and hypermedia documents
        using a powerful, direct manipulation editor and an easy-to-
        learn scripting language.


        MetaCard goes beyond HyperCard by including support for color
        controls and images, vector graphics, scrollbars, and dialog
        boxes.  MetaCard's scripting language has support for arrays,
        custom (user defined) object properties, and is based on high-
        perforance "virtual compiler" technology.  Stacks developed with
        MetaCard are portable among all popular Unix platforms and
        Windows 95/NT and can be distributed with without licensing fees
        or royalties.


     Distribution media:
        3.5" diskettes and Internet (FTP and EMail).

     Licensing policy:
        MetaCard can be licensed to a single, named individual, but can
        be used on any machine or combination of machines by that user.
        Multiple user packages are also available.


        The save-disabled distribution is available via anonymous FTP
        from ftp://ftp.metacard.com/MetaCard and
        ftp://ftp.uu.net/vendor/MetaCard.


     OS provisions:
        The Linux engine is built on a 1.2.13 ELF system.  Minumum 8 MB
        RAM for runtime, 16MB RAM for development.  Minimum 640x480x8
        screen resolution for runtime, 800x600x8 for development.
        Development system requires about 5MB disk space.  GUI is Motif-
        compliant, but does not require Motif libraries.


     Documentation:
        Complete online documentation is supplied.  Printed
        documentation is an extra-cost option.


     Product support:
        Free EMail technical support, phone support available at extra
        cost.


     Extra features and add-ons:
        A library version of MetaCard that can be linked directly to C
        programs (Embedded MetaCard) is available at extra cost.


     Available since:
        June, 1992.


     Countries with distribution:
        World wide.


     Price range:
        US$995 for single-user all-platform development license.


     Vendor:
        MetaCard Corporation



          4710 Shoup pl.
          Boulder, CO 80303
          U.S.A.



     Phone:
        +1 303 447 3936

     Fax:
        +1 303 499 9855


     EMail:
        info@metacard.com

     URL:
        http://www.metacard.com


     Last modified:
        August 4, 1997.



  9.16.  ObjectManual Release 3.0



     Description:
        Automated documentation generator from C++ programs.  Generates
        doucmentation in various formats including HTML, RTF, MIF along
        with Java classes.


     Distribution media:
        Internet (FTP and WWW).


     Licensing policy:
        Single, Multiple, Site and Floating Licenses.


     OS provisions:
        Linux ELF.


     Documentation:
        Provided in PostScript along with the distribution.


     Product support:
        Free for 30 days.  Then a contract based on six month to a one
        year cycle.


     Extra features and add-ons:
        New release are released every quarter.


     Available since:
        1995.


     Countries with distribution:
        USA.


     Price range:
        US$2295 for most flavours of Unix.  Free of charge for Linux
        users that work in a non-commercial environment.


     Vendor:
        ObjectSoftware, Inc.



     3519 Misty Meadow Drive
     Dallas, TX 75287
     U.S.A.



     Phone:
        +1 214 373 2021

     Fax:
        +1 972 662 0756

     EMail:
        objsoft@netcom.com

     URL:
        http://www.obsoft.com

     Contact:
        Bobby Sardana


     Last modified:
        September 30, 1997.



  9.17.  Critical Mass Reactor



     Description:
        Distributed application development environment.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Commercial with library source, evaluation licenses available
        for purchase.


     OS provisions:
        Linux/ELF.


     Documentation:
        Extensive documentation included (printed and online)


     Product support:
        Optional.


     Extra features and add-ons:
        See
        http://www.cmass.com/reactor/overview/index.html#reactor_features


     Available since:
        May, 1996.

     Countries with distribution:
        USA.


     Price range:
        US$479-$3500/seat.  Discounts are available for non-commercial
        and academic use.


     Vendor:
        Critical Mass, Inc.



          Critical Mass, Inc.
          225R Concord Avenue
          Cambridge, MA 02138
          U.S.A.



     Phone:
        +1 617 354 6277

     Fax:
        +1 617 354 5027

     EMail:
        info@cmass.com

     URL:
        http://www.cmass.com


     Last modified:
        May 19, 1997.



  9.18.  Resource Standard Metrics



     Description:
        A source code metrics and quality analysis tool for C and C++.
        This creates standard metrics like Lines of Code, Cylcomatic
        complexity and functional analysis.  This tool is portable
        across most all popular operating systems.  The quality analysis
        checks for semantic errors that most compilers miss and enforces
        stardard software development standards.


     Distribution media:
        Software can be downloaded from our

        web site or EMailed or shipped on floppy disk in ZIP and tar
        format.


     Licensing policy:
        Shareware licensing for the demo version which processes one
        file.  Commercial single user and network licenses will process
        any number of files of any size from wild cards at the command
        line, from a list or recursively descend a directory tree.
     OS provisions:
        Linux 1.2.


     Documentation:
        Comes with full online documentation or printed text file.
        English language only.


     Product support:
        1 Email support.  1 year software maintenance available.


     Extra features and add-ons:
        Some license come with unmodifiable source code for compiling on
        your specific OS.  Each license comes with a pretty printing
        utility and a DOS to Unix conversion utility.


     Available since:
        March, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$99.99 for single user non-source code version to US$999.95
        for the network source code license.


     Vendor:
        M Squared Technolgies



          2128 Hidden Pine Lane
          Apopka, FL 32712
          U.S.A.



     Phone:
        +1 407 880 2627

     Fax:
        +1 407 880 2627

     EMail:
        m2tech@reachus.com

     URL:
        http://www.m2tech.net


     Last modified:
        September 25, 1998.



  9.19.  r-tree



     Description:
        r-tree report generator in C source code.


        Provides complex, multi-line reports by handling virtually every
        aspect of report generation.  The only programming requirement
        is to call the r-tree report function, which reads c-tree data
        files, performs calculations, monitors control breaks and
        accumulators and produces a formatted report.  Complete with C
        source code.  Requires c-tree Plus.


     Distribution media:
        3.5" diskettes and CD-ROM.


     Licensing policy:
        r-tree Plus is licensed on a per programmer basis.  Royalty-free
        distribution.  Contact FairCom for possible restrictions.


     Documentation:
        Printed manuals distributed with product; full online
        documentation with CD-ROM, available in English and Japanese.


     Product support:
        Three months of full technical support from purchase date.
        Unlimited technical support and product updates available
        thereafter with r-tree maintenance program.


     Available since:
        October, 1995.


     Countries with distribution:
        World wide.


     Price range:
        US$445.


     Vendor:
        FairCom



          4006 W. Broadway
          Columbia, MO 65203-0100
          U.S.A.



     Phone:
        +1 573 445 6833

     Fax:
        +1 573 445 9698
     EMail:
        Faircom@faircom.com

     URL:
        http://www.faircom.com

     Contact:
        Tamra Brown <tami@faircom.com>


     Vendor:
        FairCom Europe



          Via Patrioti 6
          I-24021 Albino
          Italy



     Phone:
        +39 35 773 464

     Fax:
        +39 35 773 806

     EMail:
        Europe@faircom.com


     Vendor:
        FairCom Japan



          Ikeda Bldg. #3 4F, 112-5
          Komei-chou, Tsu-city MIE 514
          Japan



     Phone:
        +81 059 229 7504

     Fax:
        +81 059 249 723


     Vendor:
        FairCom do Brasil Ltda.


     Phone:
        +55 11 3872 9802

     Fax:
        +55 11 3862 1752

     EMail:
        Brazil@faircom.com

     Last modified:
        August 7, 1997.



  9.20.  sdoc (Source Documenter)



     Description:
        This program helps to create a complete, indexed documentation
        from your sources (C, tcl, Perl currently available, other will
        follow soon).

        You add documentation information to your scripts using pod
        (Plain old documentation), the documentation format also used in
        Perl.  The documentation options provided by pod are simple and
        easy to learn but powerfull enough to create nice and good
        looking documents.

        sdoc uses this information to create a pod-document which in
        turn may be transformed to HTML, LaTeX (and PostScript), nroff
        or just plain text.

        The preview function of tdoc lets you create documentation
        interactively - add or modify your documentation to the source
        file and check the output for correctness.

        Here are some highlights:


     o  Documentation is included in source file, no separate files
        needed

     o  Powerfull formatting options combined with easy learning

     o  Good looking documentation can be created without hassle

     o  Automated indexing

     o  Output may be in HTML, PostScript and a lot of other formats
        (have a look at the perlpod manual page or at available pod
        converters).

        The Tcl Documenter is also available as a commercial version.
        This version adds the following features:


     o  Significantly faster

     o  May optionally use Netscape to display preview pages.

     o  Includes the package concept to further automate file selection.

     o  Direct connection to emacs for file editing

     o  Direct creation of postscript output

     o  Full support, upgrades

     o  Complete documentation


     Distribution media:
        3.5" diskettes and Internet (EMail and WWW).

     Licensing policy:
        You can download the public domain version of sdoc from the
        neosoft tcl archive:


     o  http://www.neosoft.com/tcl/ftparchive/sorted/development

     o  ftp://ftp.neosoft.com/pub/tcl/sorted/development


     OS provisions:
        You need an ELF based system with X11.


     Documentation:
        Context sensitive help and complete documentation in Pod format.
        Available as PostScript on request.


     Product support:
        Installation support included, additional support available.


     Available since:
        July, 1996.


     Countries with distribution:
        World wide.


     Price range:
        Contact softWorks for pricing details.  Discounts for students
        and educational institutions available.


     Vendor:
        softWorks, Richard Schwaninger



          Theodor-Koernerstr. 173
          A-8010 Graz
          Austria



     Phone:
        +43 316 686590

     Fax:
        +43 316 686590

     EMail:
        risc@ping.at

     URL:
        http://members.ping.at/risc

     Contact:
        Richard Schwaninger



     Last modified:
        August 7, 1997.



  9.21.  SEDIT, S/REXX



     Description:
        SEDIT is a powerful Unix text editor patterned after IBM's XEDIT
        editor.  It operates with a GUI under X windows or in character
        mode from a tty device.  S/REXX is a full Unix implementation of
        IBM's SAA procedural language except that the numeric digit
        specification is limited to 15 digits.  S/REXX functions as an
        imbedded macro language for SEDIT as well as providing a
        powerful modern programming language alternative to shell
        scripting languages.  SEDIT and S/REXX may be purchased in a
        bundle or individually.  See our web site for more information
        including pricing for Linux, etc.  For additional information,
        please contact one of the local distributors listed on the web
        site or mail us at sedit@dialup.FranceNet.fr


     Distribution media:
        4mm, 8mm, 1/4" or 3.5" diskettes and Internet (FTP).


     Licensing policy:
        SEDIT and S/REXX are licensed products.  See the above WWW site
        for details.  For demo purposes, a short term license key will
        be provided on request to anyone who obtains the product via
        ftp.


     OS provisions:
        We believe these products will work with any recent stable Linux
        kernel since 1.1.18 supporting a.out format.  Motif is fully
        bound with SEDIT and SEDIT is distributed with XFree86 3.1
        shared libraries for use if your system is not at that level.


     Documentation:
        Documentation is furnished in PostScript form, in extensive
        online help files, and in optional printed manuals.


     Product support:
        Technical support is available for all licensed users.  For
        maintenance, see the above URLs.


     Extra features and add-ons:
        A REXX interactive graphical debugger is available as an
        optional feature as are printed manuals, physical media, and on
        going maintenance.  See the above URLs.


     Available since:
        The original Linux version has been available since 3rd quarter
        1995.


     Countries with distribution:
        SEDIT and S/REXX are available worldwide. The URLs should be
        consulted for current information.
     Price range:
        Pricing information should be requested from the local
        distributor responsible for your country.  An economical 2 user
        license is available for Linux without media or printed
        documentation with other options for more users, S/REXX,
        hardcopy manuals, etc.


     Vendor:
        Benaroya



          31 Rue de Constantinople
          F-75008 Paris
          France



     Phone:
        +33 1 47 22 22 13

     Fax:
        +33 1 47 22 06 17

     EMail:
        sedit@dialup.FranceNet.fr

     URL:
        http://www.sedit.com

     Contact:
        Robert Benaroya


     Last modified:
        August 4, 1997.



  9.22.  SNiFF+



     Description:
        SNiFF+ is an open, scalable and multiplatform programming
        environment for C/C++, Java, CORBA IDL and Fortran.  The main
        goal in developing SNiFF+ was to create an efficient and
        portable programming environment with a comfortable user
        interface and special support for object oriented programming.


     Distribution media:
        CD-ROM and Internet (FTP).


     Licensing policy:
        Trial license avialable.


     OS provisions:
        Linux 1.2 or 2.0.


     Documentation:
        Printed documentation and HTML version.


     Extra features and add-ons:
        Extensions for other programming languages available.


     Vendor:
        TakeFive Software GmbH



          Jakob-Haringer-Strasse 8
          A-5020 Salzburg
          Austria



     Phone:
        +43 662 4579150

     Fax:
        +43 662 4579156

     EMail:
        info@takefive.co.at

     URL:
        http://www.takefive.co.at


     Last modified:
        November 3, 1997.



  9.23.  ST/X (Smalltalk/X)



     Description:
        ST/X is a complete implementation of the Smalltalk programming
        language with development environment providing all of the
        advantages you would expect from Smalltalk: a fully object
        oriented programming language, a graphical development
        environment with editors, browsers, symbolic debugger,
        incremental compiler and just-in-time compilation to machine
        code as well as an extensive class library.


     Distribution media:
        CD-ROM.


     Licensing policy:
        There are non-commercial, evaluation and commercial licences
        available.  There is also demo version on the Internet, although
        it is quite old, this should be updated at some time in 1997.


     OS provisions:
        ST/X requires 32 MB or more of memory and 100 MB hard disk
        space.
     Documentation:
        The ST/X documentation is available online as hypertext (HTML).


     Product support:
        eXept Software AG provides mentoring, training, and consulting.
        Onsite support is also available.  For the commercial licence
        there is an update service and maintenance support.


     Extra features and add-ons:
        ST/X includes a supplementary stand-alone machine code compiler
        and the possibility to embed C code directly into Smalltalk
        methods.  This allows the exploitation and use of existing C
        libraries or a performance improvement in the speed of time
        critical operations.  An integral part of ST/X is an HTML
        browser which is fully implemented in Smalltalk.  It supports
        network loadable Smalltalk applets and smalltalk scripts
        embedded in HTML pages.  This allows the development of Internet
        and Intranet applications analogous to Java.


     Available since:
        ST/X has been available as a beta version on the Internet for
        quite a while.  eXept Software AG has been further developing
        and marketing ST/X since 1996.  Claus Gittinger (the developer
        from ST/X) is a founding member of eXept.


     Countries with distribution:
        World wide.


     Price range:
        There are non-commercial, evaluation and commercial licences
        available.  The commercial licence costs US$3,500.  A six month
        evaluation licence costs US$350.  The non-commercial license is
        available for US$150 plus shipping and handling.


     Vendor:
        eXept Software AG



          Besigheimerstr. 1
          D-74369 Loechgau
          Germany



     Phone:
        +49 7143 870045

     Fax:
        +49 7143 870048

     EMail:
        info@exept.de

     URL:
        http://home.t-online.de/home/exept


     Contact:
        David Queeney


     Last modified:
        August 5, 1997.



  9.24.  tdb (Tcl Debugger)



     Description:
        This is a debugger for tcl scripts.  It allows interactive
        debugging of tcl/tk programs and speeds up your development
        cycle.

        Here are some highlights:

     o  Step by step execution with breakpoints

     o  Display and manipulation of local and global variables

     o  On-the-fly source code modifications and fast programm restarts

     o  Graphical user interface, easy use

     o  Easy configuration and installation

        The commercial version adds the following features:

     o  Full screen context display

     o  Hot link to editor (currently emacs)

     o  Scripting and user extensibility (tcl)

     o  Plugin support (script, popup)

     o  A lot faster

     o  Full support, upgrades

     o  Complete documentation


     Distribution media:
        3.5" diskettes and Internet (EMail and WWW)


     Licensing policy:
        You can download the public domain version of tdb from the
        neosoft archive:


     o  http://www.neosoft.com/tcl/ftparchive/sorted/development

     o  ftp://ftp.neosoft.com/pub/tcl/sorted/development


     OS provisions:
        ELF based system with X11.


        Note that tdb requires changes to the base tcl C-libraries and
        also depends on dynamic loading.  Please check out the info
        package for further details.  You don' need tcl installed to use
        the debugger, all necessary code is included.


        The commercial version may be purchased in source form and
        support for porting to other platforms is available.  Please
        contact softWorks for details.


     Documentation:
        Context sensitive help and complete documentation in HTML
        format.  Available as PostScript on request.


     Product support:
        Installation support included, additional support available.


     Extra features and add-ons:
        Debugger-PlugIns for speacialized debug tasks (e.g. to debug tk
        widget hierarchies are also available).


     Available since:
        July, 1996.


     Countries with distribution:
        World wide.


     Price range:
        US$450 for a binary version, US$750 for the source code, with a
        10% discount for students and educational institutions.


     Vendor:
        softWorks, Richard Schwaninger



          Theodor-Koernerstr. 173
          A-8010 Graz
          Austria



     Phone:
        +43 316 686590

     Fax:
        +43 316 686590

     EMail:
        risc@ping.at

     URL:
        http://members.ping.at/risc

     Contact:
        Richard Schwaninger


     Last modified:
        August 7, 1997.



  9.25.  tprof (Tcl Profiler)



     Description:
        This is a profiler for tcl scripts.  It allows the creation of
        profiling data from your tcl programms and later analysis and
        detailed inspection through a graphical frontend.

        This tool is especially well suited if you encounter performance
        problems with your tcl scripts.  Instead of rewriting the whole
        application in C you can isolate time-critical procedures and
        speed them up (if necessary using C).

        Here are some highlights:

     o  Call flow display

     o  Barcharts for number of calls, CPU time and real time

     o  Tabular display of profiling data set

     o  Analyse both tcl procs and commands written in C

     o  Graphical user interface, easy use

     o  Simple aquisition of profiling data

     o  Easy configuration and installation

        tprof is available both as a public domain and as a commercial
        version.  The commercial version adds the following features:


     o  Zoom in on interesting subsets of the data

     o  Printout of data sets

     o  PostScript (eps) images of charts and tables

     o  Merging of multiple data sets

     o  Exporting data sets in different formats to inspect them further
        (eg. sc/xspread, Wingz, DBase, text)

     o  A lot faster

     o  Full support, upgrades

     o  Complete documentation


     Distribution media:
        3.5" diskettes, Internet (EMail and WWW).


     Licensing policy:
        You can download the public domain version of tprof from
        sunsite.unc.edu and it's mirrors.


     OS provisions:
        You need an ELF based system with X11.


     Documentation:
        Context sensitive help and complete documentation in HTML
        format.  Available as PostScript on request.


     Product support:
        Installation support included, additional support available.


     Available since:
        October, 1996.


     Countries with distribution:
        World wide.


     Price range:
        Contact softWorks for details and discounts.


     Vendor:
        softWorks, Richard Schwaninger



          Theodor-Koernerstr. 173
          A-8010 Graz
          Austria



     Phone:
        +43 316 686590

     Fax:
        +43 316 686590

     EMail:
        risc@ping.at

     URL:
        http://members.ping.at/risc

     Contact:
        Richard Schwaninger


     Last modified:
        August 7, 1997.



  9.26.  View Designer/X (VDX)



     Description:
        Motif interface builder that generates C and C++ code.  VDX
        provides WYSIWYG view, widget tree browser, resource editor,
        widget templates and more tools to design user interfaces.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        Free demo version.  Purchase of license key that removes
        restrictions of the demo version.  Three types of licenses are
        available: company license, host license, student license.


     OS provisions:
        Linux, ELF, X11R6, Libc.5, 5 MB on harddisk.


     Documentation:
        Online help, English.  PostScript manual, English.  A German
        version of the manual is available.


     Product support:
        Minor update (1.x to 1.x) free.  Free EMail support.


     Available since:
        December, 1996.


     Countries with distribution:
        World wide.


     Price range:
        DM 800 (approximately US$470), Major update (1.x to 2.x) DM 500
        (approximately US$295).


     Vendor:
        Bredex GmbH



          Fallersleber-Tor-Wall 23
          D-38100 Braunschweig
          Germany



     Phone:
        +49 531 24 33 00

     Fax:
        +49 531 24 33 099

     EMail:
        info@bredex.de

     URL:
        http://www.bredex.de

     Contact:
        Regina Heine
     Last modified:
        October 13, 1997.



  9.27.  XBasic



     Description:
        XBasic is a comprehensive visual program development environment
        that integrates a powerful editor, advanced 32/64-bit BASIC
        compiler, debugger, GuiDesigner and GraphicsDesigner.  XBasic is
        written entirely in XBasic.


     Distribution media:
        Internet (FTP).


     Licensing policy:
        Each copy is licensed on a per machine basis.


     OS provisions:
        Linux (ELF 1.2.13 or higher).


     Documentation:
        300+ page electronic manual (Word format).


     Product support:
        US$3 per minute.


     Available since:
        January, 1996.


     Countries with distribution:
        World wide,


     Price range:
        US$195.


     Vendor:
        Basmark Corporation



          P.O. Box 40450
          Cleveland, OH 44140
          U.S.A.



     Phone:
        +1 216 871 8855

     Fax:
        +1 216 871 9011
     EMail:
        jgo@basmark.com

     URL:
        http://www.basmark.com

     Contact:
        Joseph G. O'Toole


     Last modified:
        November 4, 1997.



  9.28.  XMove 4.0 for Linux



     Description:
        XMove is a software package for design, prototyping and testing
        the graphic user interface of a software system dealing
        dynamically changing values.  This conception shall be partially
        reflected in the name XMove, which is also the abbreviation of
        "X Window System Meter Object Visualization and Editing Tool".

        X Window System: XMove is based completely on the standard X
        Windows System.  XMove was specifically designed to support this
        standard for graphics user interfaces.  In many applications
        XMove can be used complementary to OSF/Motif.

        Meter Object: Meter Object is the reference to the dynamic
        features of XMove.  Using XMove the user can provide dynamic
        attributes for any graphics object in addition to the definition
        of static behavior.

        Visualizing: means that the displaying and managing of the
        application-specific graphics, which can be designed
        interactively usign XMove, is done by XMove during of the
        application.

        Editing Tool: stands for the interactive possibilities of
        creating the static and dynamic parts of an application-specific
        graphyc usign the XMove editors.

        XMove generate the necesary C++ code for X Windows System to
        develop the application in a very sample way.  XMove is an
        object oriented graphics developing system.


     Distribution media:
        CD-ROM, Internet (EMail and WWW).


     Documentation:
        PostScript manuals are included with the package.


     Available since:
        March, 1997.


     Countries with distribution:
        World wide.


     Price range (Europe, Asia, Australia):

     o  US$6,000 (including the editor and libraries).

     o  US$3,500 (only the editor)

     o  US$3,500 (only the library)


     Price range (America):

     o  US$5,000 (including the editor and libraries).

     o  US$3,000 (only the editor)

     o  US$3,000 (only the library)


     Vendor:
        Future Technologies



          Via B. Cairoli, 1
          I-33170 Pordenone
          Italy



     Phone:
        +39 434 20 91 07

     Fax:
        +39 434 20 95 10

     EMail:
        info@futuretg.com

     URL:
        http://www.futuretg.com

     Contact:
        Giovanni A. Orlando


     Last modified:
        August 12, 1997.



  10.  Emulation



  10.1.  Emulus



     Description:
        Emulus is an X-Windows/Motif application which uses TCP/IP to
        establish a connection to an IBM mainframe host, emulating a
        3270 terminal.  Emulus supports mainframe graphics, including
        3270 graphics datastream extension used by mainframe SAS
        Software.  Other features include customization through dialogs,
        a scripting facility to record and playback host interaction,
        EasyPads (customized windows of buttons), and cut and paste
        between Emulus and other X applications.  Emulus also comes with
        Helplus, an hypertext help viewer modeled after WinHelp.  It is
        used to provide online help for Emulus, but can also be used to
        develop Help for other X applications.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Licensing is per CPU.


     OS provisions:
        Linux 1.2 or higher, 8-16 MB RAM, 5 MB hard disk; Motif
        statically linked.


     Documentation:
        Printed book, man pages, online help, English.


     Product support:
        Technical Support from SAS Institute.


     Price range:
        US$99; includes hardcopy documentation, and Technical Support
        for one year.


     Vendor:
        SAS Institute Inc.



          SAS Campus Drive
          Cary, NC 27513
          U.S.A.



     Phone:
        +1 919 677 8000

     Fax:
        +1 919 677 8166

     EMail:
        saspjh@unx.sas.com

     URL:
        http://www.sas.com

     Contact:
        Phil Herold


     Last modified:
        August 4, 1997.

  10.2.  Executor 2



     Description:
        Executor 2 allows your Linux system to run many Macintosh
        applications, including commercial software like Adobe Photoshop
        and Illustrator, Quark XPress, Microsoft Word and Excel and
        Quicken, as well as lots of Macintosh shareware, freeware and
        demoware.  A compatibility database is available at our web
        site.  Executor 2 also allows you to read and write Macintosh
        formatted media without losing important meta-data information
        like the file type and file creator.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Commercial software with a time limited demo available from our
        web site.


     OS provisions:
        Linux/X and Linux/SVGAlib.


     Documentation:
        30 page mini-manual in CD-ROM jewel-box case, additional
        tutorial information available on our web site and in the Usenet
        group comp.emulators.mac.executor.


     Extra features and add-ons:
        Each Executor 2 CD-ROM contains Executor/DOS and Executor/Linux.
        You can switch between them, but are allowed to only run one at
        a time.


     Price range:
        Suggested Retail: US$249.  Educational Institutions: US$149,
        Full-time Students: US$65.


     Vendor:
        ARDI



          Suite 4-101
          1650 University Boulevard, NE
          Albuquerque, NM 87102
          U.S.A.



     Phone:
        +1 505 766 9115

     Fax:
        +1 505 766 5153


     EMail:
        questions@ardi.com

     URL:
        http://www.ardi.com


     Last modified:
        November 4, 1997.



  10.3.  Wabi 2.2 for OpenLinux



     Description:
        Caldera licensed and ported SunSoft's Wabi technology to enable
        end users to run popular Windows 3.1 applications on Linux-based
        system software.  Channel Partners and customers can utilize
        Caldera Wabi 2.2 for Linux running on Caldera OpenLinux, an open
        source environment, to remotely manage Windows 3.1 applications
        at home, in the office or on the road.  Channel Partners who
        create customized turn-key solutions based on environments like
        SCOR OpenServer 5 or Windows NT can now use the Wabi/COL
        solution to increase revenues by lowering overall cost and
        system requirements.  The suggested retail price for Wabi 2.2
        for Linux is US$199.  The product requires Linux on a 386 (or
        higher) Intel-based processor, 16 MB RAM (24 MB recommended),
        VGA-quality video and 10 MB disk space.


     Distribution media:
        CD-ROM.


     Licensing policy:
        One user per licensed copy.  No shareware or FTP.


     OS provisions:
        Runs on Caldera Network Desktop and OpenLinux.


     Documentation:
        Online and printed manual.


     Product support:
        30-days installation support via EMail and phone.


     Available since:
        November 18, 1996.


     Countries with distribution:
        47 countries worldwide; see our web site for local reseller.


     Price range:
        US$199 with additional licenses at US$179.  Educational pricing
        is US$149 with additional licenses at US$129.



     Vendor:
        Caldera, Inc.



          633 S. 550 E.
          Provo, UT 84606
          U.S.A.



     Phone:
        +1 800 850 7779, +1 801 377 7687

     Fax:
        +1 801 377 8752

     EMail:
        orders@caldera.com

     URL:
        http://www.caldera.com

     Contact:
        Nathan Hatch


     Last modified:
        November 14, 1997.



  11.  Financial Software



  11.1.  BB Stock Pro and BB Stock Tool



     Description:
        BB Stock Pro and BB Stock Tool are powerful stock charting,
        tracking and analysis tools for investors.  Features include
        stock charting, technical analysis, market timing, portfolio
        management.  In addition, it has customized alerts, automatic
        stock split detection and management, stock screening, most
        active issues and big price movers, personalized watch list,
        Auto-Run, and builtin Easy Stock Update via Internet with either
        direct connection or behind firewall via proxy server.


     Distribution media:
        Internet (FTP and WWW).


     Licensing policy:
        Per machine license.  30 day free trial is available at our web
        site.


     OS provisions:
        Linux 2.0 ELF.


     Documentation:
        Context sensitive online help, and User's Guide in HTML, viewed
        with web browser.


     Product support:
        Free technical support.  Frequently asked questions and answers
        available at our web site.


     Available since:
        Sun SPARC version available since December 1993.  Linux version
        available since April 1995.


     Countries with distribution:
        USA, Canada, Sweden, Germany, Singapore, Malaysia, Taiwan.


     Price range:
        Linux version is US$99.


     Vendor:
        Falkor Technologies



          P.O. Box 14201
          Fremont, CA 94539
          U.S.A.



     Phone:
        +1 510 505 0700

     EMail:
        skyline@falkor.com

     URL:
        http://www.falkor.com

     Contact:
        Henry Chen


     Last modified:
        March 18, 1997.



  11.2.  TimeClock



     Description:
        Employee time and attendance package for small to medium sized
        businesses.  Includes custom report module, interface to
        barcode/magnetic card readers (Employee ID), and data export
        module.



     Distribution media:
        3.5" diskettes.


     Licensing policy:
        One CPU, unlimited users.


     Documentation:
        Printed manual and online HTML manual included with software.


     Product support:
        Free, usually 20 minute response time.


     Extra features and add-ons:
        Barcode/magnetic card interface.


     Available since:
        1992 XENIX and MS-DOS version, 1994 AIX version, October 1996
        Linux version.


     Countries with distribution:
        USA.


     Price range:
        US$149.99.


     Vendor:
        Quality Software Solutions, Inc.



          1322 Dodds Avenue
          Chattanooga, TN 37404
          U.S.A.



     Phone:
        +1 888 423 5757, +1 423 821 5757

     Fax:
        +1 423 629 0744

     EMail:
        dbryson@tclock.com

     URL:
        http://www.tclock.com

     Contact:
        Donald Bryson


     Last modified:
        August 4, 1997.


  12.  Libraries



  12.1.  FontScope



     Description:
        Type 1 Font Rasterizer Library.  Allows users to arbitrarily
        scale, skew or rotate characters in Type 1 fonts and get back
        either a bitmap or an outline.  Product includes full sources.


     Distribution media:
        3.5" diskettes.


     Licensing policy:
        Single user license with product.  Since product includes full
        sources and our resources are limited, it is sold with no
        warranty and no support.  Support contracts may be purchased at
        additional cost.  OEM licenses, site licenses and enterprise-
        wide licenses available.


     Documentation:
        A manual, nicely typeset in 2-column format, is available with
        the distribution as a PostScript file.


     Product support:
        Support contracts may be purchased at additional cost.


     Available since:
        October 15, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$39.95.  California residents subject to sales tax.  Price
        subject to change without notice.


     Vendor:
        CurveSoft, Inc.



          2053 Grant Road, Suite 555
          Los Altos, CA 94024
          U.S.A.



     Phone:
        +1 800 563 0843, +1 510 843 6485 (Sales only)

     Fax:
        +1 650 254 0900
     EMail:
        info@curvesoft.com

     URL:
        http://www.curvesoft.com

     Contact:
        Munagala V. S. Ramanath


     Last modified:
        October 24, 1997.



  12.2.  INTERACTER



     Description:
        INTERACTER is a portable user-interface and graphics subroutine
        library for Fortran software developers.  INTERACTER-based
        programs are portable to a wide range of Fortran compilers
        running on Unix, VMS, Windows, DOS.  The Linux version supports
        f2c and g77 (ELF).  Functions include menus, text windows,
        forms, graphics primitives, presentation graphics, hardcopy
        (many formats) and operating system interface.


     Distribution media:
        3.5" diskettes and 4mm DAT.


     Licensing policy:
        INTERACTER-based programs can be distributed royalty free.
        Linux demo program available at http://www.demon.co.uk/issltd.


     OS provisions:
        Linux version supports X Windows (via Xlib), graphics terminals
        or Linux console (colour text-mode).  Requires g77 or f2c.


     Documentation:
        Two-volume English language printed manual.


     Product support:
        Free lifetime technical support.  New releases every six months.
        Chargeable software updates.


     Extra features and add-ons:
        Optional INTERACTER Toolkit provides form designer, graphics
        file viewer, online help, hardcopy post-processor and set-up
        file editor.


     Available since:
        October, 1995.


     Countries with distribution:
        Distributors in North America, Europe and Australia.


     Price range:
        Linux version: US$675 (UK L450).


     Vendor:
        Interactive Software Services Ltd.



          Westwood House
          Littleton Drive
          Huntington
          Staffs WS12 4TS
          United Kingdom



     Phone:
        +44 1543 503611

     Fax:
        +44 1543 574566

     EMail:
        support@issltd.demon.co.uk

     URL:
        http://www.demon.co.uk/issltd


     Last modified:
        October 1, 1997.



  12.3.  Matrix<LIB> - C++ Math Matrix Library



     Description:
        Matrix<LIB> is a Matlab Compatible C++ Matrix Class Library,
        designed for development of advanced scientific high-level C++
        code.  Our main design objective was to keep the C++ source code
        clear and similar to the equivalent Matlab code, making your
        shift from Matlab to C++ easier.  If you know how to program
        Matlab, you already know how to use our Matrix<LIB> C++ Math
        Library.  The code was carefully optimized for maximal
        performance, too.  Matrix<LIB> is also included in the MATCOM V2
        distribution.

        The library includes complex math, binary and unary operators,
        powerful indexing capabilities, signal processing, file I/O,
        linear algebra, string operations and graphics.  Over 300
        mathematical functions are included in Matrix<LIB>.

        MS Windows and many Unix platform are supported with a variety
        of C++ compilers.  An evaluation version (fully functional, 30
        days limited) is available for free download from our web site.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        From single license to site license.  Contact The MathTools for
        details.


     OS provisions:
        Linux 1.2, gcc 2.6.3 or later, 8 MB of RAM, 15 MB on disk.


     Documentation:
        Users manual and library reference in various formats (MS Word,
        MS Write, plain text, PostScript).


     Product support:
        A fast product support is given by EMail only.  The support
        section in the web page give immediate access to a wealth of
        resources, technical support, answers to frequently asked
        questions, technical documents and more.


     Extra features and add-ons:
        MathTools Accelerator: provides significant performance gains
        for Matrix<LIB> programs using Linear Algebra and matrix
        multiplication, on a Pentium with the Visuall C++ compiler.


     Available since:
        November, 1996.


     Countries with distribution:
        World wide.


     Price range:
        US$499 (US$249 for academic institutes).


     Vendor:
        MathTools, Ltd.



          P.O. Box 855
          Horsham, PA 19044-0855
          U.S.A.



     Phone:
        +1 212 208 4476

     Fax:
        +1 888 628 4866, +1 215 957 1719

     EMail:
        info@mathtools.com

     URL:
        http://www.mathtools.com

     Contact:
        Robert G. Ford
     Last modified:
        August 7, 1997.



  12.4.  PKWARE Data Compression Library for Linux



     Description:
        The library does lossless compression and consists of
        compression, an extraction, and an error checking routine.  To
        maintain flexibility and keep the library's code size at a
        minimum, the PKWARE Data Compression Library does not create
        .ZIP compatible archives.


     Distribution media:
        3.5" diskettes.


     Licensing policy:
        Per machine with no runtime royalties.


     OS provisions:
        Intel x86, 36 KB RAM for compressing and 13 KB RAM for
        uncompressing, 1 MB on hard disk.


     Documentation:
        Printed 33 page manual and separate installation notes in
        English.  Example code provided on disk.


     Product support:
        No-charge.  Technical support via phone, fax or EMail.


     Extra features and add-ons:
        Also compatible with FreeBSD.


     Available since:
        September 14, 1995.


     Countries with distribution:
        Australia, Brazil, France, Germany, India, Italy, Germany, The
        Netherlands, Japan, and the UK.


     Price range:
        US$450.  Educational discount available.


     Vendor:
        PKWARE, Inc.



          9025 N. Deerwood Drive
          Brown Deer, WI 53223-2480
          U.S.A.


     Phone:
        +1 414 354 8699

     Fax:
        +1 414 354 8559

     EMail:
        info@pkware.com

     URL:
        http://www.pkware.com

     Contact:
        Bob Gorman


     Last modified:
        August 5, 1997.



  12.5.  readyBase



     Description:
        A dynamic embeddable database library with a C API, Perl module,
        and Java interface.


     Distribution media:
        CD-ROM and Internet (FTP and WWW).


     Licensing policy:
        Commercial license.  A free 30 day demo is available.


     OS provisions:
        Kernel 2.0.x.  1MB RAM.


     Documentation:
        Online documentation.


     Product support:
        Update service, maintenance, training and prices thereof.


     Available since:
        March, 1998.


     Countries with distribution:
        USA.


     Price range:
        US$1295 for 1 developer and 50 end-user license


     Vendor:
        Dynamical Systems, Ltd.


     175 W. Jackson Boulevard, Suite A253
     Chicago, IL 60604
     U.S.A.



     Phone:
        +1 312 341 1755

     Fax:
        +1 312 341 1891

     EMail:
        info@dynamical-systems.com

     URL:
        http://www.dynamical-systems.com

     Contact:
        Gary Kuper


     Last modified:
        April 22, 1998.



  12.6.  SIMLIB IG



     Description:
        SIMLIB IG is a C library.  It enables the user to communicate
        with an Evans & Sutherland image generator (Liberty and ESIG
        Systems) using a very efficient raw Ethernet protocol.  There is
        no need for using opcodes, since SIMLIB IG provides an API to
        the functionality of the image generators.


     Distribution media:
        4mm DAT tar format and 3.5" diskettes.


     Licensing policy:
        Commercial.


     OS provisions:
        Linux 2.0.


     Documentation:
        Printed manual in English, source code examples on media.


     Price range:
        US$2,500.


     Vendor:
        KNIENIEDER Simulationstechnik



     Technologiezentrum Tirol
     Eduard Bodemgasse 5
     A-6020 Innsbruck
     Austria



     Phone:
        +43 512 390415 650

     Fax:
        +43 512 364000 20, +43 512 364000 30

     EMail:
        office@knienieder.co.at

     Contact:
        Stephan Haidacher


     Last modified:
        September 29, 1997.



  13.  Mathematics



  13.1.  Maple V Release 4 - The Power Edition



     Description:
        Maple V Release 4 is the powerful computer algebra system used
        by mathematicians, engineers, and scientists for teaching and
        research.  Maple V lets you perform a wide range of symbolic and
        numeric computations quickly and accurately.  It includes more
        than 2500 built-in math functions, 2D and 3D graphics,
        animation, and more.  New features in Release 4 include
        outlining, styles, and hyperlinking, typeset math notation in
        input, output, and text, full text search of Help Database and
        new computational and plotting facilities.


     Distribution media:
        CD-ROM.


     Licensing policy:
        License for unlimited use in time of the bought version,
        floating license with user based pricing.


     OS provisions:
        Linux kernel 2.0.0 or above, X11 R6.1 or above (for running X11
        GUI components), 12 MB of RAM suggested.  The binaries are
        available in ELF format only.


     Documentation:
        3 books: "Maple V - Learning Guide", "Maple V - Programming
        Guide", "The Maple V Handbook".  Also available in German:
        "Einfuehrung in Maple V" und "Programmieren mit Maple V".
        Documentation and help in English, a variety of books available
        in different languages.


     Product support:
        Updates/maintenance depending on license, please call the
        distributor or WMSI.


     Extra features and add-ons:
        Share library via EMail and FTP.  Free mailing list available
        (maple_group@daisy.waterloo.edu).


     Available since:
        September, 1994.


     Countries with distribution:
        USA/Canada, Europe and Asia.


     Vendor:
        Waterloo Maple Inc.



          450 Phillip Street
          Waterloo, ON N2L 5J2
          Canada



     Phone:
        +1 519 747 2373

     Fax:
        +1 519 747 5284

     EMail:
        info@maplesoft.com


     Vendor in Germany:
        Scientific Computers GmbH



          Franzstr. 106
          D-52064 Aachen
          Germany



     Phone:
        +49 241 47075 0

     Fax:
        +49 241 44983

     EMail:
        maple@scientific.de
     Contact:
        Andreas Himmeldorf


     Last modified:
        August 4, 1997.



  13.2.  MATCOM and MATCOM MATH LIBRARY



     Description:
        MATCOM is a Matlab to C++ compiler and C++ MATRIX MATH LIBRARY.
        MATCOM compiles Matlab source files (M-Files) to C++ source
        code.  The resulting code is linked with the supplied C++ Matrix
        class library to create standalone executables or MEX files.


        The C++ code and library can be integrated in products, royalty
        free, saving the need to translate the algorithm prototype.


        Compiled code runs significantly faster than the original
        interpreted source.


        Matrices of doubles, floats, ints and chars are supported,
        providing lower memory usage for many applications, especially
        signal and image processing.


        MS Windows and many Unix platform are supported with a variety
        of C++ compilers.  An evaluation version (fully functional, 30
        days limited) is available for free download from our web site.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        From single license to site license.  Contact The MathTools for
        details.


     OS provisions:
        Linux 1.2, gcc 2.6.3 or later, 8 MB of RAM, 15 MB on disk.


     Documentation:
        Users manual and library reference in various formats (MS Word,
        MS Write, plain text, PostScript).


     Product support:
        A fast product support is given by EMail only.  The support
        section in the web page give immediate access to a wealth of
        resources, technical support, answers to frequently asked
        questions, technical documents and more.


     Extra features and add-ons:
        MathTools Accelerator: provides significant performance gains
        for MATCOM programs using Linear Algebra and matrix
        multiplication, on a Pentium with the Visual C++ compiler.


     Available since:
        May, 1995.


     Countries with distribution:
        World wide.


     Price range:
        US$499 ($249 for academic institutes).


     Vendor:
        MathTools, Ltd.



          P.O. Box 855
          Horsham, PA 19044-0855
          U.S.A.



     Phone:
        +1 212 208 4476

     Fax:
        +1 888 628 4866, +1 215 957 1719

     EMail:
        info@mathtools.com

     URL:
        http://www.mathtools.com

     Contact:
        Robert G. Ford


     Last modified:
        August 7, 1997.



  13.3.  Mathematica 3.0



     Description:
        Mathematica 3.0--Known for delivering quick, accurate numeric
        and symbolic solutions, Mathematica is ideal for creating
        interactive technical reports and presentations that include
        text, active formulas, graphics, and customizable buttons and
        palettes.  Breakthrough new features, such as an innovative
        typesetting system that can do math, now make Mathematica even
        easier to use.


     Distribution media:
        CD-ROM.

     Licensing policy:
        Commercial, 30 day fully functional demo CD-ROM.


     OS provisions:
        Kernel 1.2 or higher.


     Documentation:
        The Mathematica Book 1400 pages.  Complete book and additional
        help files online.


     Product support:
        Three service levels, see http://www.wolfram.com/service for
        details.


     Extra features and add-ons:
        About 15 application packages.


     Available since:
        October, 1996.


     Countries with distribution:
        World wide.


     Price range:
        US$1295, academic and student discounts, site licenses
        available.


     Vendor:
        Wolfram Research Europe Ltd



          10 Blenheim Office Park
          Lower Road
          Long Hanborough
          Oxfordshire
          OX8 8LN
          UK



     Phone:
        +44 1993 883400

     Fax:
        +44 1993 883800

     EMail:
        info@wolfram.co.uk

     URL:
        http://www.wolfram.co.uk


     Last modified:
        May 25, 1998.
  13.4.  MATLAB and Simulink



     Description:
        MATLAB is a high performance language for technical computing.
        It integrates computation, visualization, and programming in an
        easy-to-use environment where problems and solutions are
        expressed in familiar mathematical notation.  MATLAB supports
        the development of large complex applications.  Features include
        the M-file Performance Profiler for algorithm optimization, the
        integrated visual editor and debugger, and powerful interactive
        tools for signal processing and control system design.

        Simulink is a powerful, interactive software package for
        modeling, analyzing, and simulating dynamic systems.  It
        provides extremely accurate simulations of nonlinear continuous-
        time systems and systems with multiple modes of operation.
        Features include support for conditionally executed subsystems;
        state-of-the-art solvers; usability improvements such as signal
        and port labeling; and new blocks.


     Distribution media:
        CD-ROM and Internet (FTP).


     Licensing policy:
        Using GlobeTrotter (FLEXlm) CPU locked or floating network
        options.  Contact The MathWorks for details.


     OS provisions:
        Linux 2.0.18, 32 MB of RAM, 40 MB disk space (60 MB to include
        all help files and documentation).


     Documentation:
        Printed documentation, online help, MATLAB Reference Guide
        (HTML).


     Product support:
        The MathWorks supports a variety of Internet-based services to
        provide product information and services 24 hours a day.  These
        services give immediate access to a wealth of resources, product
        data sheets, technical support, answers to frequently asked
        questions, user-contributed materials, open-forum discussions,
        and more.


     Extra features and add-ons:
        MATLAB Extensions: MATLAB Compiler, MATLAB C/C++ Math Library.

        Toolboxes: Fuzzy Logic, Signal Processing, Image Processing,
        Spline, Symbolic Math, Neural Network, Control System, Robust
        Control, Mu-Analysis & Synthesis, System Identification,
        Optimization, Statistics, Financial, Frequency Domain System
        Identification, Higher-Order Spectral Analysis, Communication,
        LMI Control, Model Predicitve Control, NAG Foundation, Neural
        Network, Partial Differential Equation, QFT Control Design,
        Symbolic Math and Extended Symbolic Math, Wavelet.

        Simulink Extensions: Simulink Accelerator, Real-Time Workshop.

        Blocksets: Fixed-Point, DSP, Nonlinear Control Design.
     Available since:
        June, 1995.


     Countries with distribution:
        World wide.


     Price range:
        Upon request.


     Vendor:
        The MathWorks, Inc.



          24 Prime Park Way
          Natick, MA 01760
          U.S.A.



     Phone:
        +1 508 647 7000 x7322

     Fax:
        +1 508 647 7002

     EMail:
        efroio@mathworks.com, brian@mathworks.com

     URL:
        http://www.mathworks.com

     Contact:
        Enza Froio (Marketing), Brian Bourgault (Technical)


     Last modified:
        March 27, 1997.



  14.  Multimedia



  14.1.  Peter Lipa and his Journeys



     Description:
        This is a multimedia CD-ROM about world-known jazzman Peter
        Lipa.  It is the first product from edition Journeys of Groups
        and Singers from KDK Company to contain Linux version of the
        program directly on the CD-ROM.  The CD-ROM contains more than 8
        hours of near-CD quality music (101 songs in full length), more
        than 30 minutes of videos, 2 hours of spoken word, more than 120
        photos, 10 karaoke songs and a lot of other information
        (Bratislava Jazz Days, various performances all over the world,
        TV and theatre performances, ...).  The CD-ROM is multilingual:
        English, German and Slovak.

     Distribution media:
        CD-ROM.


     Licensing policy:
        Program is free, data licensed per CPU.


     OS provisions:
        Linux kernel 2.0.27 or higher (may work with 1.2), XFree86 3.2
        (may work with older X11R6 versions), 16 MB of RAM, 10-30 MB of
        disk space, no Motif, Intel Linux ELF.


     Documentation:
        Online and short description of controls in CD-ROM booklet
        (English, German and Slovak).


     Available since:
        October 14, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$30 plus shipping, includes unlimited free program upgrades
        (via FTP).



     Vendor:
        KDK Company, Ltd.



          Vodna 8
          040 01 Kosice
          Slovakia



     Phone:
        +421 95 6233335

     Fax:
        +421 95 6233336

     EMail:
        linux@kdk.sk

     URL:
        http://www.kdk.sk, http://obchod.kdk.sk (virtual store).

     Contact:
        Ivan Schreter


     Last modified:
        November 1, 1997.


  14.2.  Lucka Vondrackova and her Journeys



     Description:
        This is a multimedia CD-ROM about Lucka Vondrackova, young Czech
        singer and actress.  This CD-ROM is multilingual: English,
        Slovak and Czech.  The product does not yet contain Linux
        version of the program directly on the CD-ROM (The Linux version
        of the program is supplied on an extra diskette or can be
        downloaded via FTP).  The CD-ROM contains more than three hours
        of music (all Lucka's songs in full length), 9 videoclips, all
        lyrics to Lucka's songs with notes and guitar accords, more than
        130 photos, a lot of interesting interviews, 10 karaoke songs
        and a lot of other information about Lucka.


     Distribution media:
        Multimedia data on CD-ROM, program on diskette or via FTP.


     Licensing policy:
        Program is free, data licensed per CPU.


     OS provisions:
        Linux kernel 2.0.27 or higher (may work with 1.2), XFree86 3.2
        (may work with older X11R6 versions), 16 MB of RAM, 10-30 MB of
        disk space, no Motif, Intel Linux ELF.


     Documentation:
        Online and short description of controls in CD-ROM booklet
        (English and Slovak).


     Available since:
        October 14, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$34 plus shipping, includes unlimited free program upgrades
        (via FTP).



     Vendor:
        KDK Company, Ltd.



          Vodna 8
          040 01 Kosice
          Slovakia



     Phone:
        +421 95 6233335

     Fax:
        +421 95 6233336

     EMail:
        linux@kdk.sk

     URL:
        http://www.kdk.sk, http://obchod.kdk.sk (virtual store).

     Contact:
        Ivan Schreter


     Last modified:
        November 1, 1997.



  14.3.  MpegTV Player 1.0



     Description:
        Real-time MPEG Video player (with audio) and Video-CD player.


     Distribution media:
        Internet.


     Licensing policy:
        Shareware for personal and non-profit use.  Commercial licenses
        required for commercial and governmental use.


     Documentation:
        Online help and HTML manual on web site.


     Extra features and add-ons:
        Can stream video from networks.


     Price range:
        Shareware registration fee is US$10.  Commercial licenses:
        please contact MpegTV at sales@mpegtv.com.


     Vendor:
        MpegTV LLC



          90 Divisadero Street, #15
          San Francisco, CA 94117
          U.S.A.



     Phone:
        +1 415 864 6466

     EMail:
        info@mpegtv.com
     URL:
        http://www.mpegtv.com

     Contact:
        Tristan Savatier


     Last modified:
        December 23, 1997.



  14.4.  Peter Nagy and his Journeys



     Description:
        This is a multimedia CD-ROM about Peter Nagy, Slovak pop singer.
        This CD-ROM is available in Slovak only and does not yet contain
        the Linux version of the program directly on the CD-ROM (The
        Linux version of the program is supplied on an extra diskette or
        can be downloaded via FTP).  The CD-ROM contains more than four
        hours of music (154 song samples, 38 songs in full length), 9
        videoclips, 222 song lyrics, 93 song notes with guitar accords,
        120 photos, 8 interviews, citations from the book Musicross,
        information about all albums of Peter Nagy and a lot of other
        information.


     Distribution media:
        Multimedia data on CD-ROM, program on diskette or via FTP.


     Licensing policy:
        Program is free, data licensed per CPU.


     OS provisions:
        Linux kernel 2.0.27 or higher (may work with 1.2), XFree86 3.2
        (may work with older X11R6 versions), 16 MB of RAM, 10-30 MB of
        disk space, no Motif, Intel Linux ELF.


     Documentation:
        Online and short description of controls in CD-ROM booklet
        (Slovak only).


     Available since:
        October 14, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$34 plus shipping, includes unlimited free program upgrades
        (via FTP).



     Vendor:
        KDK Company, Ltd.


     Vodna 8
     040 01 Kosice
     Slovakia



     Phone:
        +421 95 6233335

     Fax:
        +421 95 6233336

     EMail:
        linux@kdk.sk

     URL:
        http://www.kdk.sk, http://obchod.kdk.sk (virtual store).

     Contact:
        Ivan Schreter


     Last modified:
        November 1, 1997.



  14.5.  Xaudio



     Description:
        MP3 Player.


     Distribution media:
        Internet.


     Licensing policy:
        Free for personal and non-profit use.  Commercial licenses
        required for commercial and governmental use.


     Documentation:
        Online help and HTML manual on web site.


     Extra features and add-ons:
        Can stream CD-quality audio from networks.


     Price range:
        Free for personal and non-profit use.  Commercial licenses:
        please contact MpegTV at sales@mpegtv.com.


     Vendor:
        MpegTV LLC



     90 Divisadero Street, #15
     San Francisco, CA 94117
     U.S.A.



     Phone:
        +1 415 864 6466

     EMail:
        xaudio@mpegtv.com

     URL:
        http://www.xaudio.com

     Contact:
        Gilles Boccon-Gibod


     Last modified:
        December 23, 1997.



  15.  Network Servers



  15.1.  Critical Angle X.500 Enabler



     Description:
        The Critical Angle X.500 Enabler allows an LDAP-only directory
        server to be integrated into an X.500 directory service, such as
        the PARADISE international white pages directory or an
        enterprise messaging directory service.  It supports all
        X.500(88) operations, including authentication.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        Licensed per server.


     OS provisions:
        Reference platform is Red Hat Linux 3 or later for Intel.


     Documentation:
        English documentation is included.


     Product support:
        An upgrade subscription is also available.


     Countries with distribution:
        World wide.


     Price range:
        A single server license is US$495.


        There is also (in 1997) a special version, PARADISE X.500
        Enabler, exclusively for universities.  This version does not
        include the support for authentication or modification
        operations; it is intended only for searching public
        information.  A single server license of PARADISE X.500 Enabler
        is currently US$95.


     Vendor:
        Critical Angle Inc.



          4815 W. Braker Lane #502-385
          Austin TX 78759
          U.S.A.



     EMail:
        info@critical-angle.com

     URL:
        http://www.critical-angle.com

     Contact:
        Mark Wahl


     Last modified:
        August 5, 1997.



  15.2.  DNEWS News Server



     Description:
        DNEWS is an advanced, full featured NNTP based news server.  It
        is suitable for ISP's and Corporate Intranets.  DNEWS can be
        used as a replacement for INN or cnews and will generally result
        in improved performance and much lower administration.  Features
        include: easy installation and management, flexible expire
        settings, flexible access restrictions, EMail confirmation of
        posts, XOVER extentions implemented, streaming extentions built
        in, dynamic sucking feeds option, news to web gateway included.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        Commercial, DNEWS is try before you buy software and can be
        downloaded from our web site for free trial.


     OS provisions:
        No special requirements
     Documentation:
        A user manual is provided in HTML format.  Online help included.


     Product support:
        Supported by Netwin LTD.


     Extra features and add-ons:
        DNEWSWEB - A news to web gateway.  Allows local and Usenet news
        groups to be added to ordinary HTML pages and allows users to
        read and post to local and Usenet news groups directly using any
        web browser.


     Available since:
        1995.


     Countries with distribution:
        World wide.


     Price range:
        US$485 (Free registration for schools and universities).


     Vendor:
        Netwin LTD



          P.O Box 27574
          MT Roskill
          Auckland
          New Zealand



     Fax:
        +64 9 6300 689

     EMail:
        netwin@netwinsite.com

     URL:
        http://netwinsite.com

     Contact:
        Stephen Pugmire


     Last modified:
        August 4, 1997.



  15.3.  Aventail Internet Policy Manager



     Description:
        Commerical SOCKS v5 server for Linux with support for multiple
        authentication methods, sophisticated access controls,
        datastream filtering, and intelligent auditing capabilities.


     Distribution media:
        CD-ROM and Internet (FTP).


     Licensing policy:
        Commercial, free demo availalbe from
        http://www.aventail.com/download.html


     OS provisions:
        Linux 2.x, 32 MB of RAM recommended, administration tool
        requires X11R6 or later.  Approximately 14 MB of hard disk space
        required (less if you have Perl 5.003 and Perl/Tk installed).


     Documentation:
        English documentation available in PDF or Microsoft Word format.


     Product support:
        90 days free technical support.  Yearly maintenance is 20% of
        your total licence cost.  Maintenance includes product upgrades.


     Extra features and add-ons:
        Various authentication and filtering plugins to add
        functionality at run-time.


     Available since:
        November, 1996.


     Countries with distribution:
        World wide.  VPN products avaiable only in 40 bit encryption
        strength outside of the USA or Canada due to export
        restrictions.


     Price range:
        IPM starting at US$6.495.  VPN starting at US$7.995.


     Vendor:
        Aventail Corporation



          808 Howell Street, 2nd Floor
          Seattle, WA 98101
          U.S.A.



     Phone:
        +1 888 762 5785, +1 206 215 1111

     Fax:
        +1 206 215 1120


     EMail:
        info@aventail.com

     URL:
        http://www.aventail.com


     Last modified:
        June 23, 1998.



  15.4.  Aventail VPN



     Description:
        Aventail VPN runs on Linux, Unix and NT platforms.  Aventail VPN
        features multiple authentication and encryption methods,
        sophisticated access controls, intelligent filtering and makes
        no modifications to the underlying client or server operating
        system.  Authentication modules include username and password,
        CHAP, RADIUS, SSL, digital certificates and token-based
        security.  Encryption modules include DES, Triple DES and MD
        4/5.  Aventail VPN's access controls allow user permission to be
        grated based on variables such as the user's role within a
        company, group association, intended destination, type of
        application, type of encryption and/or authentication, or even
        more customized information.  Aventail VPN is the only product
        to work on top of PPTP, IPSec, and L2TP.


     Distribution media:
        CD-ROM.


     Licensing policy:
        60 day evaluation period; pricing based on server connections
        and quantity of clients.


     Product support:
        All products ship with an automatic 90 day warranty and dial-up
        telephone technical support.  To extend your coverage, you may
        purchase the Annual Support Program.  The Support Program is 20%
        of your total license cost, annually renewable.


     Available since:
        May, 1997.


     Countries with distribution:
        World wide.


     Price range:
        Starts at US$6,995; Pricing based on connections.


     Vendor:
        Aventail Corporation



     808 Howell Street, 2nd Floor
     Seattle, WA 98101
     U.S.A.



     Phone:
        +1 206 215 1111

     Fax:
        +1 206 215 1120

     EMail:
        info@aventail.com

     URL:
        http://www.aventail.com

     Contact:
        Deanna Leung


     Last modified:
        June 23, 1998.



  15.5.  WANPIPE



     Description:
        WANPIPE integrates into the Linux routing stack to provide IP
        and IPX routing over Frame Relay, PPP or X.25 networks at line
        speeds to 2.048Mbps.  WANPIPE has either V.35, EIA530, X.21 or
        RS232 interfaces, or a built in T1 and Fractional T1 DSU/CSU.
        Extensive debugging and monitoring features make installation
        and management easy.


     Distribution media:
        Internet (FTP).


     Licensing policy:
        Linux source freely distributed.


     OS provisions:
        All versions of Linux.


     Documentation:
        Provided with source for Linux.


     Product support:
        Supported by Sangoma, unlimited.


     Extra features and add-ons:
        Optional integrated T1/Ft1 DSU/CSU, choice of V.35, X.21, EIA530
        or RS232 cabling.

     Available since:
        1995.


     Countries with distribution:
        US, UK, Israel, Poland, Canada, Germany, Korea, China.


     Price range:
        US$589-$859.


     Vendor:
        Sangoma Technologies Inc.



          1001 Denison Street, Suite 101
          Markham, ON L3R 2Z6
          Canada



     Phone:
        +1 905 474 1990, +1 800 388 2475

     Fax:
        +1 905 474 9223

     EMail:
        dm@sangoma.com

     URL:
        http://www.sangoma.com

     FTP:
        ftp://ftp.sangoma.com/pub/linux

     Contact:
        David Mandelstam


     Last modified:
        May 8, 1998.



  15.6.  Zeus Web Server



     Description:
        Scalable web application server for ISP hosting, Ontranets and
        secure e-Commerce.  Full Frontpage support, 128 bit SSL3 world
        wide, Apache compatibility, web-centric delegatable management
        interface.

        Application development in ISAPI, Java-Servlets and CGI.
        Distributed server-side Java gives high performance database
        connectivity.

        Unlimited virtual servers with groupable configuration, real-
        time statistics, bandwidth throttling and extensive logging.

     Distribution media:
        Internet (WWW).


     Licensing policy:
        One License per machine running the software.  Free 30 day
        evaluations are available from the site.


     Documentation:
        Online help, available in Germany and Spanish.


     Price range:
        Academic: L50.  Commercial: L999.


     Vendor:
        Zeus Technology Limited



          St Johns Innovation Centre, Cowley Road
          Cambridge, CB4 4WS
          UK



     Phone:
        +44 1223 42 17 27

     Fax:
        +44 1223 42 17 31

     EMail:
        sales@zeustech.net

     URL:
        http://www.zeustech.net

     Contact:
        Bryan Amesbury <bames@zeustech.net>


     Last modified:
        December 23, 1997.



  16.  Office Tools



  16.1.  Corel WordPerfect 8



     Description:
        WordPerfect 8 for Linux Personal Edition is a world-class word
        processor, native on Linux.  It offers the same outstanding
        tools, intuitive graphical interface and file formatas the
        Windows version.  WordPerfect 8 for Linux imports over 40
        document types (including Microsoft Word97), and supports over
        1,000 different printers.
        WordPerfect 8 for Linux Server Edition includes everything from
        the Personal Edition, plus a character terminal binary and
        several powerful utilities, such as background merge and print.
        Server Edition also offers concurrent licensing for business
        use.

        WordPerfect 8 for Linux (both editions) offer localized versions
        in English (US), English (UK), English (Canada), English
        (Australia), French (national), French (Canada), German,
        Italian, Spanish, and Dutch.


     Distribution media:
        CD-ROM and Internet (WWW).


     Licensing policy:
        WordPerfect 8 for Linux Personal Edition: licensing is per
        machine.  WordPerfect 8 for Linux Server Edition: licensing is
        concurrent use.


     OS provisions:
        Kernel 2.0.x and later stable versions; libc.  For X Windows, 9
        MB of RAM for first user, 2.5 MB RAM for each additional user,
        43-104 MB hard disk space (depending on install options).  For
        Character terminals, 2 MB RAM for first user, 1 MB RAM for each
        additional user, 31-40 MB hard disk space (depending on install
        options).


     Documentation:
        Printed manuals: GUI binary, character terminal binary
        (approximately 750 pages each).  Online (Adobe Acrobat format)
        manuals available for GUI binary.


     Product support:
        WordPerfect 8 for Linux Personal Edition: self-support
        (knowledge base, discussion groups, etc.), EMail support,
        telephone toll support.  WordPerfect 8 for Linux Server Edition:
        30 day up-and-running telephone support, EMail support;
        additional support and maintenance packages are available.


     Extra features and add-ons:
        100's of Language modules (provided by Corel, these provide
        keyboard templates, spelling dictionaries, and other tools
        needed to create documents in other languages).  Medical
        spelling dictionaries (provided by third parties--contact
        info@sdcorp.com for details).


     Available since:
        September, 1998.


     Countries with distribution:
        World wide.


     Price range:
        US$39.95-$495.



     Vendor:
        Software Development Corporation



          512 East 1860 South
          Provo, UT 84606
          U.S.A.



     Phone:
        +1 801 370 9600

     Fax:
        +1 801 370 9696

     EMail:
        info@sdcorp.com

     URL:
        http://www.sdcorp.com

     Contact:
        John Gleave


     Last modified:
        August 15, 1998.



  16.2.  The American Heritage Dictionary Deluxe



     Description:
        This long-awaited release is ideal for technical writers,
        authors, and researchers.  Previously available only on PC's,
        the product offers the ultimate reference tool for Linux users,
        with full definitions for well over 200,000 words, plus
        pronunciations, derivations, proper usage, idioms and sample
        sentences.  The world reknowned Roget's 500,000 word Thesarus is
        fully integrated with the AHD.  Browse, word and topic search,
        anagrams and more.  Single user, network, academic and site
        licenses are available for Linux and key Unix platforms.


     Distribution media:
        CD-ROM, tapes, Internet (FTP and WWW).


     Licensing policy:
        Single user node locked or server license (shared).  A free
        unclockable demo is available at our web site.


     OS provisions:
        Motif GUI, 8-16 MB RAM, 15 MB harddisk or run from the CD-ROM.


     Documentation:
        Documentation as a help text file.  English language.

     Product support:
        Maintenance available.  Call DUX for details.


     Extra features and add-ons:
        Addlitional reference volumes and additional language support to
        be announced.


     Available since:
        February, 1997.


     Countries with distribution:
        Currently sold in the USA and Germany.  However, sales are made
        internationally via unclockable FTP/WWW copies and sold with
        authorized major credit card.


     Price range:
        US$49.95 for node lock single user.  Call DUX or an authorized
        reseller for sliding scale or site license pricing.


     Vendor:
        DUX Software Corporation



          425 Sherman Avenue Ste 330
          Palo Alto, CA 94306
          U.S.A.



     Phone:
        +1 800 543 4999, +1 415 473 1800

     Fax:
        +1 415 462 8723

     EMail:
        sales@dux.com

     URL:
        http://www.dux.com

     Contact:
        Bob Adams, Rob DuFrane


     Last modified:
        August 7, 1997.



  16.3.  Applixware Office Suite for Linux



     Description:
        Fully-graphical, fully-integrated office suite for Linux.
        Includes word processor, spreadsheet, presentation graphics,
        mail, database client, and HTML authoring software.  Also
        includes Builder, a graphical rapid application development
        program.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Per concurrent user license.


     OS provisions:
        Kernel 1.2.13 or better, XFree86 3.1.2 or better, 16 MB RAM, 150
        MB hard disk.


     Documentation:
        Make-It-Happen Manual.  Online documentation in English, French,
        and German.


     Product support:
        Paid support avaailable.  Users can subscribe to mailing list
        applixware-list@applix.com, and see archives and FAQ's at
        http://linux.applixware.com.


     Extra features and add-ons:
        French and German interface, international dictionaries.


     Available since:
        July, 1996.


     Countries with distribution:
        North America, Europe, Japan, Australia.


     Price range:
        US$99, upgrades for US$79.


     Vendor:
        Applix, Inc.



          112 Turnpike Road
          Westboro, MA 01581
          U.S.A.



     Phone:
        +1 508 870 0300

     EMail:
        mrlinux@applix.com

     URL:
        http://linux.applixware.com

     Contact:
        Richard Manly <rmanly@applix.com>


     Last modified:
        October 1, 1998.



  16.4.  D.M.S. Document Management System



     Description:
        The system collects documents in Tiff-g4, PostScript and JPEG
        and organizes them in folders with record information like names
        and descriptions.  The system can be access using any web
        broswer: viewing, modify, full text retrieval and faxing are
        provided by a web interface.  New documents are made by printing
        to printer spooler.


     Licensing policy:
        The system is installed by vendor on your Linux box with a
        server licence, unlimited clients, unlimited document number.


     OS provisions:
        Linux 2.0.


     Documentation:
        HTML.


     Extra features and add-ons:
        SQL server integrationm, print capture from accounting software.


     Price range:
        Upon request.


     Vendor:
        Studio LEADER Pro



          Via Pietrastretta, 76
          I-38100 Trento
          Italy



     Phone:
        +39 461 828229

     Fax:
        +39 461 829826, +39 461 829877

     EMail:
        DMS@leader.it


     URL:
        http://www.leader.it

     Contact:
        Guido Brugnara <brugnara@leader.it>


     Last modified:
        August 19, 1997.



  16.5.  HotWire EasyFAX



     Description:
        Fully functional GUI Fax Management Program.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        Free fully functional eval from WWW site..


     OS provisions:
        5.5 MB Disk, 4 MB RAM.


     Documentation:
        Online context-sensitive help.


     Product support:
        Via EMail and Usenet only.


     Available since:
        January 1, 1997.


     Countries with distribution:
        USA/Canada (Unisource Systems, Inc.), Germany/Europe (Delix
        Computer, GmbH).


     Price range:
        US$99.


     Vendor:
        Unisource Systems, Inc.



          1409 N. Cove Boulevard
          Longwood, FL 32750
          U.S.A.



     Phone:
        +1 407 834 1973

     Fax:
        +1 407 834 8013

     EMail:
        sales@unisrc.com

     URL:
        http://www.unisrc.com

     Contact:
        Gary Heller


     Last modified:
        October 3, 1997.



  16.6.  NExS, the Network Extensible Spreadsheet



     Description:
        NExS is a full-featured graphical spreadsheet package which is
        designed to take advantage of the advanced features of Unix and
        the X Window system.  It includes more than 230 computational
        functions and 13 2D and 3D graph types for engineering,
        scientific and business applications.  NExS is extensible
        through a network aware API that allows user-defined "plug-ins"
        to add new features and functions in a variety of programming
        languages.  NExS software plug-in bus includes 63 "slots" for
        remote processes to connect and extend NExS' basic
        functionality, allowing for the development of sophisticated
        networked applications.


     Distribution media:
        Internet (FTP and WWW).


     Licensing policy:
        The NExS Personal Edition license is for a single user and
        single platform type.  The owner may use the license on multiple
        machines.  The Professional Edition license is a floating
        network license which allows a pool of licenses to be used on
        any supported platform in your network.  Without a license, NExS
        runs in "demo mode" with limited functionality.


     OS provisions:
        NExS runs on Linux kernels which support ELF binaries.  There
        are two flavors for Linux, one which requires Motif 2.0 shared
        libraries, and one which includes Motif 2.0 statically linked.


     Documentation:
        The NExS User Guide is available in PostScript (letter format,
        431 pages, or A4 format, 403 pages), and in HTML.  API and
        tclNExS documentation are available separate from the User
        Guide, also in PostScript and HTML format.  Printed
        documentation is also available.  All documentation is in
        English.

     Product support:
        EMail support is standard at no cost.  Phone-in support is
        available for a charge.  Bug fix and minor version releases
        (e.g., 1.2.x -> 1.3.0) are no cost.  Major releases are
        substantially discounted for existing licensees.


     Extra features and add-ons:
        NExS plug-ins and user-contributed code are available at
        http://www.xess.com/plugins.html.


     Available since:
        1994.


     Countries with distribution:
        World wide.


     Price range:

     o  US$149 ($99 academic) for Personal Edition

     o  US$249 ($125 academic) for Professional Edition


     Vendor:
        X Engineering Software Systems (XESS) Corp.



          P.O. Box 33091
          Raleigh, NC 27636
          U.S.A.



     Phone:
        +1 800 961 7840, +1 919 387 0076

     Fax:
        +1 919 387 1302

     EMail:
        info@xess.com

     URL:
        http://www.xess.com

     FTP:
        ftp://ftp.vnet.net/pub/users/xess/NExS

     Contact:
        Dave Van den Bout <devb@xess.com>


     Last modified:
        March 15, 1997.



  16.7.  Axene Office



     Description:
        Axene Office suite includes Xclamation (Desktop Publishing),
        XQuad (Spreadsheet), XAllWrite (Word Processor) and XMayday
        (HTML Documentation browser).  Available in English, French,
        German and Spanish.


     Distribution media:
        CD-ROM, tape, Internet (FTP).


     Licensing policy:
        Workstation or floating licenses.  Downloadable demo version by
        FTP.


     OS provisions:
        8-16 MB RAM, 10 MB harddisk or run from the CD-ROM.  a.out or
        ELF version.


     Documentation:
        Online HTML help and printed documentation.


     Available since:
        1998.


     Countries with distribution:
        World wide.


     Price range:
        US$49.


     Vendor:
        AXENE, Inc.



          30 Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          U.S.A.



     Phone:
        +1 201 434 4244

     EMail:
        info@axene.com

     URL:
        http://www.axene.com/english/showroom.html

     FTP:
        ftp://ftp.axene.com/pub

     Last modified:
        February 8, 1998.



  16.8.  Projector and Projector/Net



     Description:
        Produces project schedules and Gantt charts using critical path
        analysis from list of activities (tasks) with their associated
        durations and prerequisites.  Projector produces sleek printed
        output and Projector/Net produces HTML for web clients.


     Distribution media:
        3.5" diskettes.


     Licensing policy:
        Single user and server licenses.  There is a demo version
        available for downloading from our web site.


     OS provisions:
        PC/Linux. Projector requires GhostScript or PostScript printer.
        Projector/Net requires only a client-side web browser capable of
        displaying graphics (Netscape and IE are fine).  RAM
        requirements for both versions are (very roughly) load module
        size plus 44 bytes/activity plus 32 bytes per prerequisite
        activity specification plus size of input project description
        file (excluding embedded comments).  Tested only with Red Hat
        Linux 4.2.  Projector/Net tested only with Linux/Apache server
        with Internet Explorer and Netscape on the client side.


     Documentation:
        All contained in the product distribution README and sample
        project description file (English).


     Countries with distribution:
        World wide.


     Price range:
        US$200 for Projector.  US$2500 for Projector/Net.


     Vendor:
        IEDU



          Morris Dovey
          1001 Office Park Road, Suite 300
          West Des Moines, IA 50265
          U.S.A.



     Phone:
        +1 515 225 1636
     EMail:
        mrdovey@iedu.com

     URL:
        http://www.iedu.com/project

     Contact:
        Morris Dovey


     Last modified:
        May 8, 1998.



  16.9.  The Virtual Office System



     Description:
        Internet capable client/server, enterprise document imaging and
        management.  Scan directly to Linux host from Window client
        without using EMail or FTP.


     Distribution media:
        3.5" diskettes, tape and Internet (FTP).


     Licensing policy:
        Free Windows client demo available from our web site.  30 day
        evaluation of enterprise server available upon request.


     OS provisions:
        Server: Linux 2.0.  Client: Windows 95 and Windows NT Desktop.


     Documentation:
        Online help and printed administrator's manual.


     Extra features and add-ons:
        Windows file archiving.


     Price range:
        US$4995 - 5 user, 1 scanner, enterprise edition.


     Vendor:
        CONTEXT Information Systems, Ltd.



          314 S. 2nd Street
          Oakland, MD 21550
          U.S.A.



     Phone:
        +1 301 334 6550

     EMail:
        sales@contextis.com

     URL:
        http://www.contextis.com


     Last modified:
        June 13, 1998.



  16.10.  Axene XAllWrite



     Description:
        The word-processing application Axene XAllWrite permits the user
        to create excellent quality documents with ease, whether a
        simple letter or a large, complex publication.  It features
        tools for multi-document management, bitmap or line-art image
        integration, various font capabilities, and HTML format
        exportation.  Available in English, French, German and Spanish.


     Distribution media:
        CD-ROM, tape, Internet (FTP).


     Licensing policy:
        Workstation or floating licenses.  Downloadable demo version by
        FTP.


     OS provisions:
        8-16 MB RAM, 10 MB harddisk or run from the CD-ROM.  a.out or
        ELF version.


     Documentation:
        Online HTML help and printed documentation.


     Available since:
        1998.


     Countries with distribution:
        World wide.


     Price range:
        US$25.


     Vendor:
        AXENE, Inc.



          30 Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          U.S.A.



     Phone:
        +1 201 434 4244

     EMail:
        info@axene.com

     URL:
        http://www.axene.com/english/xallwrite.html

     FTP:
        ftp://ftp.axene.com/pub


     Last modified:
        February 8, 1998.



  16.11.  Axene Xclamation



     Description:
        Xclamation has multidocument capabilities, multi-column and
        gutters capabilities, magnetic ruler marks, integration of text,
        bitmap or vectorized images within polymorphous frames, complex
        editing operations on frames (including logical, zooming,
        outlining, rotation, background transparency, etc.), and text
        exportation in HTML format.  Available in English, French,
        Spanish and German.


     Distribution media:
        CD-ROM, tape, Internet (FTP).


     Licensing policy:
        Workstation or floating licenses.  Downloadable demo version by
        FTP.


     OS provisions:
        8-16 MB RAM, 10 MB harddisk or run from the CD-ROM.  a.out or
        ELF version.


     Documentation:
        Online HTML help and printed documentation.


     Available since:
        1996.


     Countries with distribution:
        World wide.


     Price range:
        US$25.


     Vendor:
        AXENE, Inc.


     30 Montgomery street, suite 604
     Jersey City, NJ 07302-3821
     U.S.A.



     Phone:
        +1 201 434 4244

     EMail:
        info@axene.com

     URL:
        http://www.axene.com/english/xclamation.html

     FTP:
        ftp://ftp.axene.com/pub


     Last modified:
        February 8, 1998.



  16.12.  Axene XQuad



     Description:
        XQuad features all the necessary functions for scientific and
        financial calculations and for graphical presentation of
        numerical data, including over 100 mathematical, logical, and
        string manipulation functions, various types of graphs (from
        histograms to radar), importation of external data files (text,
        Excel, etc.), production tools which allow text in cells to have
        automatic effect on graphical presentation.  Available in
        English, French, German and Spanish.


     Distribution media:
        CD-ROM, tape, Internet (FTP).


     Licensing policy:
        Workstation or floating licenses.  Downloadable demo version by
        FTP.


     OS provisions:
        8-16 MB RAM, 10 MB harddisk or run from the CD-ROM.  a.out or
        ELF version.


     Documentation:
        Online HTML help and printed documentation.


     Available since:
        1996.


     Countries with distribution:
        World wide.

     Price range:
        US$25.


     Vendor:
        AXENE, Inc.



          30 Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          U.S.A.



     Phone:
        +1 201 434 4244

     EMail:
        info@axene.com

     URL:
        http://www.axene.com/english/xquad.html

     FTP:
        ftp://ftp.axene.com/pub


     Last modified:
        February 8, 1998.



  17.  Text Processing



  17.1.  Edith Pro for X11



     Description:
        Edith Pro is a powerful and easy-to-use text editing package,
        for editing plain text such as EMail messages, HTML, LaTeX and
        programming languages.  It is aimed at people who want a
        flexible editing tool but who are not prepared to spend much
        time into learning and configuring their application.  It
        includes a fast text-only web browser with access to the system
        manual and info.


     Distribution media:
        Internet (WWW).


     Licensing policy:
        You are only allowed to download Edith from the ZFC web pages
        for personal use.  Without a licence, Edith will regularly issue
        messages stressing that the copy used is not licenced.  Personal
        use without a licence is allowed, but organizations are required
        to buy a licence.



     OS provisions:
        ELF binary.  1MB is sufficient for editing normally sized text.


     Documentation:
        Online HTML help covers the printed manual completely.  The
        printed manual contains illustrations not in the online help.


     Product support:
        Free updates can be downloaded from the ZFC web pages.  Licence
        holders will be notified of updates.  Licence holders can
        contact ZFC by EMail for immediate support.


     Available since:
        January 1, 1997.


     Countries with distribution:
        World wide directly from ZFC.


     Price range:
        NLG 70 (approximately US$35) single host, NLG 400 (approximately
        US$200) full site licence.  50%50 discount for educational
        organizations and students.


     Vendor:
        ZFC



          P.O. Box 15813
          1001 NH Amsterdam
          The Netherlands



     Phone:
        +31 20 4 208 248

     EMail:
        zfc@zfc.nl

     URL:
        http://www.zfc.nl

     Contact:
        Annius V. Groenink


     Last modified:
        August 4, 1997.



  17.2.  TeraSpell 97 for Emacs



     Description:
        TeraSpell 97 for Emacs is the user-friendly spell checker for
        Emacs which incorporates visual highlights for misspelled words
        and on-the-fly spell checking.  TeraSpell 97 for Emacs sets a
        new standard of quality in spelling correction software by
        providing the technically most advanced spelling correction
        system available on the market.

        TeraSpell eliminates the traditional tedious spelling dialog and
        speeds up the process of spell checking your documents.  Visual
        highlights let you efficiently identify all spelling errors in
        your documents at once and ignore all non-words that you may
        have used in your document.  TeraSpell can spell check your
        document as you type.  As soon as you type an incorrect word, it
        becomes highlighted.  By clicking right on a highlighted word, a
        menu of suggestions appears.


     Distribution media:
        Internet (EMail and WWW).


     Licensing policy:
        Evaluation version available for free from our web site.  Single
        user license, 3, 5, 10, 20 users license.  Site-wide and
        University wide licenses,


     OS provisions:
        Emacs 19.29.1 or higher.  XEmacs 19.14 or higher.


     Documentation:
        Online documentation.


     Product support:
        EMmail support.  WWW Updates.  FAQs on WWW.


     Extra features and add-ons:
        Additional languages available.


     Available since:
        August, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$29.99 single user student Linux license.  US$89 single user
        Linux, Solaris, Irix, HPUX.


     Vendor:
        Teragram Corporation



          236 Huntington Avenue
          Boston MA 02115-4701
          U.S.A.



     Phone:
        +1 617 369 0100

     Fax:
        +1 617 369 0101

     EMail:
        info@teragram.com

     URL:
        http://www.teragram.com

     Contact:
        Yves Schabes


     Last modified:
        August 16, 1997.



  18.  System Administration Tools



  18.1.  Host Factory



     Description:
        Host Factory is a system to control the entire software contents
        of deployed Unix machines.  Host Factory lets you customize one
        prototype Unix system and use it to build hundreds of similar
        systems.  You can deliver incremental changes to running systems
        and roll them back if they fail.  Changes are tracked in a
        version-control filesystem integral to the product.  Host
        Factory provides an environment to do configuration management
        and version control of complete hosts.


     Licensing policy:
        Commercial and GPL.


     Documentation:
        Printed documentation.


     Product support:
        EMail.


     Available since:
        1996.


     Countries with distribution:
        World wide.


     Price range:
        Upon request.  Special prices for educational institutions.


     Vendor:
        Working Version
          31 Shea Road
          Cambridge, MA 02140
          U.S.A.



     EMail:
        bb@wv.com

     URL:
        http://www.wv.com

     Contact:
        Brian Bartholomew


     Last modified:
        July 22, 1997.



  18.2.  PerfectBACKUP+



     Description:
        PerfectBACKUP+ is the Unix/Linux world's premier Backup/Restore
        utility.  It is the worlds fastest backup/restore for Unix and
        has been since 1985.  Previously sold in the US as FASTBACK PLUS
        for Unix, the counterpart to the DOS FASTBACK PLUS, it now has
        character and Motif interfaces, networking support, compression,
        the best verification and recovery, scheduling and is compatible
        with both tar and cpio.  Backs up all files, devices, partitions
        etc. and can backup Windows, Netware and Windows NT drives too.


     Distribution media:
        3.5" diskettes, Internet (WWW), 4/8mm DAT and soon CD-ROM.


     Licensing policy:
        Free evaluation copy from our web site.  Free online manual from
        same the same address.  Price per CPU, unlimited users.


     OS provisions:
        Kernels 1.2.x and 2.0.x,  X11R6, Motif 1.2, 3 MB of RAM, 3 MB
        disk.


     Documentation:
        Printed (188 pages), PostScript online, and online help.
        English language documentation, but help by phone and EMail also
        avilable in Spanish.


     Product support:
        Unlimited free EMail support and phone support.


     Extra features and add-ons:
        Comes with free PC program to read tar/cpio diskettes onto PC.
        AutoChanger add-on with tape recycling for high-end shops.

     Available since:
        1996.


     Countries with distribution:
        USA, Canada, Germay, UK, Switzerland, Singapore, Malaysia,
        Germany.


     Price range:
        UD$79 to US$499.  Linux off the net (no media) is US$79 and
        HP/UX is US$499.  Always full product.


     Vendor:
        Unisource Systems, Inc.



          1409 North Cove Boulevard
          Longwood, FL 32750
          U.S.A.



     Phone:
        +1 407 834 1973

     Fax:
        +1 407 834 1973

     EMail:
        sales@unisrc.com

     URL:
        http://www.unisrc.com

     Contact:
        Gary Heller


     Last modified:
        October 3, 1997.



  18.3.  Venus



     Description:
        Venus is an distributed administration tool for any network
        built of Unix workstations from different hardware vendors.  A
        Venus network presents itselfs to the user as a homogeneous
        computer system and guarantees transparent access to any network
        resource.  It provides software tools for major cluster
        management tasks: configuration management, software
        distribution, user and filesystem administration.


     Licensing policy:
        Commercial.


     OS provisions:
        Currently build on top of the S.u.S.E distribution.


     Documentation:
        Printed doumentation, online help.


     Product support:
        Hotline, EMail, courses.


     Available since:
        1994.


     Countries with distribution:
        World wide.


     Price range:
        Upon request.  Special prices for educational institutions.


     Vendor:
        science + computing GmbH



          Hagellocher Weg 71
          D-72070 Tuebingen
          Germany



     Phone:
        +49 7071 9457 0

     Fax:
        +49 7071 9457 27

     EMail:
        info@science-computing.de

     URL:
        http://www.science-computing.de

     Contact:
        Olaf Flebbe


     Last modified:
        February 25, 1997.



  19.  X Windows Related Products



  19.1.  Accelerated-X Display Server



     Description:
        Commercial grade X display server with workstation-class
        features like multiple visuals, overlays, and gamma correction
        for FreeBSD, and Linux.  The AcceleratedX server drives the most
        popular graphics hardware, including the latest cards from ATI,
        Diamond, Matrox, NeoMagic, Number 9, and S3.  In all, more than
        490 different cards are supported.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Per CPU.


     OS provisions:
        No known problems with any Linux distribution.


     Documentation:
        A 100 page perfect bound manual is included.


     Product support:
        Unlimited support in included.


     Available since:
        1994.


     Countries with distribution:
        World wide.


     Price range:
        Contact your local reseller, or Xi Graphics.


     Vendor:
        Xi Graphics



          1801 Broadway, Suite 1710
          Denver, CO 80202
          U.S.A.



     Phone:
        +1 303 298 7478

     Fax:
        +1 303 298 1406

     EMail:
        sales@xig.com

     URL:
        http://www.xig.com

     Contact:
        Kyle Fink


     Last modified:
        August 14, 1997.



  19.2.  BXwidgets



     Description:
        BXwidgets is a supplementary widget set to develop especially
        commercial Motif applications.  It includes special widgets for
        tabulars, masks, formatted input field and the full support for
        a complete help system.  All has Motif look and feel and is
        platform independent.


     Distribution media:
        3.5" diskettes.


     Licensing policy:
        Source code licence.


     OS provisions:
        Any kernel, X11R5 or X11R6, Motif 1.1 or Motif 1.2.


     Documentation:
        About 250 pages of documenation with examples.  Several demo
        programs.


     Product support:
        Support and update service is available (DM 1200; approximately
        US$750)


     Available since:
        1992.


     Countries with distribution:
        Germany, UK and USA.


     Price range:
        DM 1600 (approximately US$1000) for a full source code licence.


     Vendor:
        BREDEX GmbH



          Fallersleber-Tor-Wall 23
          D-38100 Braunschweig
          Germany



     Phone:
        +49 531 24 33 0 0

     Fax:
        +49 531 24 33 0 99

     EMail:
        info@bredex.de

     URL:
        http://www.bredex.de


     Last modified:
        November 3, 1997.



  19.3.  BXwidgets/DB



     Description:
        BXwidgets/DB is a supplementary widget set to access relational
        databases.  Data can be automatically queried form the database,
        displayed in various forms, changed and stored in the database.
        All applications built with BXwidgets/DB are database
        independent.  The database access is performed by transaction-
        servers. Transaction-Server and database may reside on other
        hotsts in the network.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Per OS license, no run-time restrictions.  Evaluation license
        available.


     OS provisions:
        X11R5 and Motif 1.2 must be installed.


     Documentation:
        Printed manual in English.


     Product support:
        Support and update service is available.


     Available since:
        1996.


     Price range:
        DM 4900 (approximately US$2900).


     Vendor:
        BREDEX GmbH



     Fallersleber-Tor-Wall 23
     D-38100 Braunschweig
     Germany



     Phone:
        +49 531 24 33 0 0

     Fax:
        +49 531 24 33 0 99

     EMail:
        info@bredex.de

     URL:
        http://www.bredex.de


     Last modified:
        November 3, 1997.



  19.4.  Laptop, Accelerated-X Display Server



     Description:
        Commercial grade X display server with workstation-class
        features like multiple visuals, overlays, and gamma correction
        for FreeBSD and Linux.  The AcceleratedX server drives the most
        popular laptop hardware, including the latest cards from Dell,
        IBM, Toshiba, and Neo Magic.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Per CPU.


     OS provisions:
        No known problems with any Linux distribution.


     Documentation:
        A 100 page perfect bound manual is included.


     Product support:
        Unlimited support in included.


     Available since:
        1994.


     Countries with distribution:
        World wide.


     Price range:
        Contact your local reseller, or Xi Graphics.


     Vendor:
        Xi Graphics



          1801 Broadway, Suite 1710
          Denver, CO 80202
          U.S.A.



     Phone:
        +1 303 298 7478

     Fax:
        +1 303 298 1406

     EMail:
        sales@xig.com

     URL:
        http://www.xig.com

     Contact:
        Kyle Fink


     Last modified:
        August 14, 1997.



  19.5.  MaXimum cde Developer's Edition v1.0



     Description:
        A complete networked desktop that enables administrators to
        integrate industry-standard PCs into existing Unix networks with
        better internationalization and the same functionality as more
        expensive workstations.  Also includes developer's tools.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Per CPU.


     OS provisions:
        No known problems with any Linux distribution.


     Documentation:
        A 100 page perfect bound manual the Accelerated-X server and a
        300 page perfect bound manual for CDE is included.


     Product support:
        Unlimited support in included.


     Available since:
        1997.


     Countries with distribution:
        World wide.


     Price range:
        Contact your local reseller, or Xi Graphics.


     Vendor:
        Xi Graphics



          1801 Broadway, Suite 1710
          Denver, CO 80202
          U.S.A.



     Phone:
        +1 303 298 7478

     Fax:
        +1 303 298 1406

     EMail:
        sales@xig.com

     URL:
        http://www.xig.com

     Contact:
        Kyle Fink


     Last modified:
        August 14, 1997.



  19.6.  Multi-headed, Accelerated-X Display Server



     Description:
        Commercial grade X display server with workstation-class
        features like multiple visuals, overlays, and gamma correction
        for FreeBSD and Linux.  The AcceleratedX server drives the most
        popular graphics hardware, including the latest cards from
        Colorgraphics, STB, and Matrox.  In all, more than 10 different
        cards are supported.


     Distribution media:
        CD-ROM.

     Licensing policy:
        Per CPU.


     OS provisions:
        No known problems with any Linux distribution.


     Documentation:
        A 100 page perfect bound manual is included.


     Product support:
        Installation support in included.


     Available since:
        1994.


     Countries with distribution:
        World wide.


     Price range:
        Contact your local reseller, or Xi Graphics.


     Vendor:
        Xi Graphics



          1801 Broadway, Suite 1710
          Denver, CO 80202
          U.S.A.



     Phone:
        +1 303 298 7478

     Fax:
        +1 303 298 1406

     EMail:
        sales@xig.com

     URL:
        http://www.xig.com

     Contact:
        Kyle Fink


     Last modified:
        August 14, 1997.



  19.7.  OpenGL, Accelerated-X Display Server



     Description:
        Commercial grade X display server with workstation-class
        features like multiple visuals, overlays, and gamma correction
        for FreeBSD and Linux.  The AcceleratedX server drives the most
        popular graphics hardware, including the latest cards from ATI,
        Diamond, Matrox, NeoMagic, Number 9, and S3.  The lastest
        version of OpenGL from Silicon Graphics Inc.  In all, more than
        450 different cards are supported.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Per CPU.


     OS provisions:
        No known problems with any Linux distribution.


     Documentation:
        A 100 page perfect bound manual is included.


     Product support:
        Installation support in included.


     Available since:
        1994.


     Countries with distribution:
        World wide.


     Price range:
        Contact your local reseller, or Xi Graphics.


     Vendor:
        Xi Graphics



          1801 Broadway, Suite 1710
          Denver, CO 80202
          U.S.A.



     Phone:
        +1 303 298 7478

     Fax:
        +1 303 298 1406

     EMail:
        sales@xig.com

     URL:
        http://www.xig.com
     Contact:
        Kyle Fink


     Last modified:
        August 14, 1997.



  19.8.  OSF-Certified Motif



     Description:
        A complete OSF-Certified Motif runtime and development
        environment.


     Distribution media:
        CD-ROM.


     Licensing policy:
        Per CPU.


     OS provisions:
        No known problems with any Linux distribution.


     Documentation:
        Release note that include references to well-written commerical
        reference manuals.


     Product support:
        Installation support in included.


     Available since:
        1995.


     Countries with distribution:
        World wide.


     Price range:
        Contact your local reseller, or Xi Graphics.


     Vendor:
        Xi Graphics



          1801 Broadway, Suite 1710
          Denver, CO 80202
          U.S.A.



     Phone:
        +1 303 298 7478
     Fax:
        +1 303 298 1406

     EMail:
        sales@xig.com

     URL:
        http://www.xig.com

     Contact:
        Kyle Fink


     Last modified:
        August 14, 1997.



  20.  Other Software



  20.1.  ABACUS 4



     Description:
        The ABACUS 4 process control system is a block based software
        system for the real time control of industrial and other
        continuous and batch processes.


     Distribution media:
        Available at http://www.arosnet.se/bbab/abacus-4.980708.tar.gz


     Licensing policy:
        Per machine license.


     OS provisions:
        Tested on Slackware 3.4, expected to run on any Linux
        distribution for Linux.


     Documentation:
        Reference Manual is in HTML and included with the product.  Can
        be seen at http://www.arosnet.se/bbab/abacusmanual/index.html


     Product support:
        EMail support.


     Available since:
        July 1998.


     Countries with distribution:
        World wide.


     Price range:
        US$1995 per CPU, discounts for quantity.


     Vendor:
        McHedlund Associates



          c/o Bristol Babcock AB
          Fallhammargatan 2a
          S-72133 Vaesteraas
          Sweden



     Phone:
        +46 21 350450

     Fax:
        +46 21 350455

     EMail:
        abacusabacus@hotmail.com, abacus4@geocities.com

     URL:
        http://www.geocities.com/Eureka/Enterprises/2275/abacus4.html

     Contact:
        Frank McNamara


     Last modified:
        July 12, 1998.



  20.2.  BBBS



     Description:
        Complete BBS package with full internal FidoNet and Internet
        support.  ISDN, mailer, mail processor, TICK, AllFix, telnet,
        FTP, finger, news, EMail, gateway, offline, VT320, ANSI,
        multilingual, multinode, Mg, full screen editor, multitask, CD-
        ROM, HYDRA, Zmodem, Kermit, BZLink, TCP/IP, voice, FAX,
        charsets, accounts, IRC, plus much much more.  Everything you
        need to run a BBS!


     Distribution media:
        3.5" diskette, Internet (FTP and WWW).


     Licensing policy:
        Per node basis.  Shareware version can be downloaded from
        http://www.bbbs.net.


     OS provisions:
        Current version, 3.33 How, is for libc5.  Next version and
        current beta is for libc6.


     Documentation:
        ASCII and HTML documentation, English.

     Extra features and add-ons:
        Lot of 3rd party utilities.


     Countries with distribution:
        World wide.


     Price range:
        Two node license US$60.


     Vendor:
        Foobar Oy



          Paavolankatu 3 D 34
          FIN-20240 Turku
          Finland



     Phone:
        +358 2 240 1513

     Fax:
        +358 2 240 7755

     EMail:
        b@bbbs.net

     URL:
        http://www.bbbs.net

     Contact:
        Kim Heino


     Last modified:
        August 2, 1998.



  20.3.  Clustor



     Description:
        Clustor is a program for managing large computational tasks.
        Clustor greatly simplifies a common computationally intensive
        activity - running the same program code numerous times with
        different inputs.  Clustor provides increased performance by
        distributing jobs over a network of computers and improved task
        management through a friendly user interface.


        Targeted at users who run computationally demanding tasks,
        Clustor supports all phases of running such a task: task
        preparation, job generation and job execution.  With Clustor,
        users who do not have extensive knowledge of programming
        parallel applications, such as scientists, engineers,
        researchers, are able to utilize the power of networked
        computers.
     Distribution media:
        Internet (WWW).  Optional CD-ROM.


     Licensing policy:
        A free demo licenses with limited functionality, 30 days
        evaluation licenses with complete functionality from our web
        site.


     OS provisions:
        Linux 1.2 or higher.


     Documentation:
        Web site, optional printed documentation.


     Product support:
        EMail support.


     Extra features and add-ons:
        Features for load monitoring and resource sharing, network
        installation program.


     Available since:
        February, 1997.


     Countries with distribution:
        World wide


     Price range:
        Starting at US$495.


     Vendor:
        Active Tools Inc.



          246 First Street, Suite 310
          San Francisco, CA 94105
          U.S.A.



     Phone:
        +1 415 882 7062

     Fax:
        +1 415 680 2369

     EMail:
        info@activetools.com

     URL:
        http://www.activetools.com

     Contact:
        Rok Sosic, Sergij Foski
     Last modified:
        August 7, 1997.



  20.4.  FootPrints



     Description:
        The first web-based helpdesk software system.  Tracks
        problems/solutions, trouble tickets -- whatever information you
        need to manage -- and makes it available via the World Wide Web
        to your customers or users.  Resides on Unix or NT Web server;
        platform independent access using any web browser.


     Distribution media:
        Internet (FTP and WWW).  Also available: 3.5" diskettes and
        tape.


     Licensing policy:
        Free eval available from http://www.unipress.com/cgi-
        bin/free_evals or ftp://ftp.unipress.com/pub/free_evals.


        Pricing is on a per-user basis.


     OS provisions:
        Runs with any Linux running a web server.


     Documentation:
        Online manual/help.


     Product support:
        15% of software purchase price charged for maintenance and
        updates.  Technical support via web and phone is free.


     Available since:
        January 1, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$1995 per starter pack (server software plus 3 user licenses).
        Licenses may be Group (a number of users can access your
        helpdesk, e.g. all your customers use one Group license) or
        Individual (helpdesk engineers and administrators would each
        require one Individual license).


     Vendor:
        UniPress Software, Inc.



     2025 Lincoln Highway
     Edison, NJ 08817
     U.S.A.



     Phone:
        +1 800 222 0550, +1 732 287 2100

     Fax:
        +1 732 287 4929

     EMail:
        info@unipress.com

     URL:
        http://www.unipress.com/footprints

     Contact:
        Sue Glassberg <sue@unipress.com>


     Last modified:
        August 4, 1997.



  20.5.  Aladdin Ghostscript



     Description:
        PostScript, PDF, PCL5e (2Q97), PCL5c (2Q97), and PCL XL
        interpreter.  Provides X Windows previewing, conversion to half
        a dozen raster file formats, and output to dozens of printers.
        Runs in all OS environments, not just Linux, and on any
        processor (32- or 64-bit) with a C compiler.  Can drive black-
        and-white, RGB, and CMYK devices, both bilevel and continuous-
        tone.  For more information, see
        http://www.cs.wisc.edu/~ghost/index.html.  Note that Aladdin
        Ghostscript is an OEM product only: end-user licensing is not
        available (and not necessary, since the product is free for end
        users), nor is end-user support.


     Distribution media:
        3.5" diskettes.


     Licensing policy:
        Normally per-CPU.  License normally includes source code,
        upgrades, and support.


     OS provisions:
        X11R5 or later is required for X Windows previewing.  OS-
        specific modules are available for Unix (including Linux), VMS,
        MS Windows (including Windows NT), OS/2, and Macintosh.  Porting
        to other OSs is simple: all OS dependencies are segregated in a
        single file of typically less than 100 lines of code.


     Documentation:
        Online documentation only, in English.  Currently in plain ASCII
        text; texinfo and HTML versions are in preparation.


     Product support:
        Normally included in license; by EMail, phone, and fax.


     Extra features and add-ons:
        Each input language is priced separately, with a discount for
        multiple languages.


     Available since:
        1988 as free software, 1991 commercially.


     Countries with distribution:
        World wide.


     Price range:
        Negotiated for each customer.


     Vendor:
        Artifex Software Inc.



          454 Las Gallinas Avenue, Suite 108
          San Rafael, CA 94903
          U.S.A.



     Phone:
        +1 415 492 9861

     Fax:
        +1 415 492 9862

     EMail:
        info@arsoft.com

     URL:
        http://www.cs.wisc.edu/~ghost/index.html


     Last modified:
        September 30, 1997.



  20.6.  Magician



     Description:
        Magician is a high performance Java interface to native OpenGL
        implementations allowing developers to write sophisticated
        OpenGL applications in Java.



     Distribution media:
        CD-ROM and Internet (WWW).


     Licensing policy:
        Free for personal use only.  However, personal users may acquire
        a licence affording faster technical support and the software
        for all platforms on CD and a printed manual.  Commercial users
        are required to licence the product for use.  Source code
        licences are also available.


     OS provisions:
        Runs on Linux (libc5 and glibc) based systems.


     Documentation:
        Freely downloadable javadoc API reference.  Freely downloadable
        comprehensive Programmer's Guide.


     Product support:
        Support for Magician is available via EMail, phone and fax.
        Mailing lists exist for inter-developer discussions.  The
        purchase of licences (personal or commercial) gives you higher
        priority support.


     Extra features and add-ons:
        Support for all OpenGL 1.1 GL and GLU calls.  Many features of
        Aux and GLUT have also been translated to work within a Java
        environment.  Built-in, easy-to-use multiple simultaneous view
        support.  Multi-threaded rendering.  Support for direct OpenGL
        calls or polymorphic methods.


     Available since:
        June 10, 1998.


     Countries with distribution:
        World wide.


     Price range:
        US$35 for a Personal Runtime Licence.  US$200 per set for
        Commercial Runtime Licences.  Source licences pricing available
        on request.


     Vendor:
        Arcane Technologies Ltd.



          P.O. Box 3738
          Glasgow, G41 4YD
          Scotland
          UK



     Phone:
        +44 141 423 3449
     Fax:
        +44 141 423 3449

     EMail:
        magician-sales@arcana.co.uk

     URL:
        http://www.arcana.co.uk/products/magician

     Contact:
        Alligator Descartes


     Last modified:
        July 12, 1998.



  20.7.  journyx WebTime



     Description:
        A web based time and attendance tracking software product.  You
        can record and report on employee time worldwide using the power
        of the Internet, or across your entire enterprise on your
        Intranet.


     Distribution media:
        3.5" diskettes and Internet (FTP).


     Licensing policy:
        Free for first 60 days of use, US$1000 plus US$25 per user
        thereafter.


     OS provisions:
        Runs on any version of Linux.


     Documentation:
        All documentation is in HTML and included online with the
        product.


     Product support:
        A maintenance contract is 15% of the purchase price per annum.


     Extra features and add-ons:
        Works with any browser including text based browsers such as
        lynx.  Easy export of data to Microsoft Excel or Quickbooks.
        Free webserver and SQL database engine included in the package.


     Available since:
        August 1, 1997.


     Countries with distribution:
        World wide.



     Price range:
        U$1000-$10,000.


     Vendor:
        journyx



          6716 Beauford Drive
          Austin, TX 78750
          U.S.A.



     Phone:
        +1 512 345 8282

     Fax:
        +1 512 342 9379

     EMail:
        info@journyx.com

     URL:
        http://journyx.com

     Contact:
        Curt Finch


     Last modified:
        October 24, 1997.



  20.8.  LanSafe



     Description:
        LanSafe III is a UPS Power Management application.  It provides
        automatic orderly shutdown functionality in case of an extended
        power failure that should outlast the UPS battery run time.
        LanSafe III enables broadcast messages and EMail to be sent
        according to user defined power condition changes.

        LanSafe III is bundled with the following Exide Electronics
        UPSs: OneUPS Plus, NetUPS, PowerWare Prestige, PowerWare
        Profile, PowerWare Plus 5xx.  It also ships with FPS Power
        Systems UPSs: PowerRite Plus, PowerRite Max, PowerWorks A30,
        PowerWorks A40, Series 9000 and Series 10000.

        It is also possible to purchase a separate software license to
        use with a previous UPS model or an other manufactures UPS.


     Distribution media:
        CD-ROM.


     OS provisions:
        Linux kernel 2.0.  Both X/Motif based and character based user
        interfaces provided.
     Documentation:
        Online help.  Online manual.


     Product support:
        Available.


     Extra features and add-ons:
        Support for other manufacturer's UPS.


     Available since:
        May, 1997.


     Countries with distribution:
        World wide.


     Price range:
        US$149.


     Vendor (USA):
        Exide Electronics



          8609 Six Forks Road
          Raleigh, NC 27615
          U.S.A.



     Vendor (Europe/Middle East/Africa):
        Exide Electronics S.A.



          MPL House, Prescott Road
          Poyle, Colnbrook
          Berkshire, SL3 0AE
          UK



     Phone:
        +1 800 554 3448, +1 919 872 3020, +44 1753 686200

     Fax:
        +1 800 75 EXIDE, +44 1753 686827

     EMail:
        info@exide.com, info@deltecpower.com, sales_support@exide.co.uk

     URL:
        http://www.exide.com, http://www.deltecpower.com,
        http://www.fpsUPS.com



     Last modified:
        October 12, 1997.



  20.9.  LjetMgr



     Description:
        Printers from Hewlett-Packard (both laser and ink variants) have
        an extensive set of configurable options.  These options are
        normally set on the front panel of the printer.


        The most notable options are:


     o  Ccono-mode to save toner

     o  Powersave mode

     o  Page format selection

     o  Font/typeface and language selection

        With LjetManager you can directly modify these settings on your
        screen.  It is especially usefull for printers that lack front
        panel configurability (like the LaserJet 5L) or if you have more
        than one printer at your disposal.


        LjetManager sports a graphical user interface, is fully
        localizable and comes with documentation and help pages in HTML
        format.


     Distribution media:
        3.5" diskettes, Internet (EMail and WWW).


     Licensing policy:
        You can download a demo version version of LjetMgr from the
        following location and the corresponding mirror sites:
        ftp://sunsite.unc.edu/pub/Linux/system/Printing  Just have a
        look for ljetmgr-2.6.README and the accompanying files.


     OS provisions:
        Needs a printer that supports PJL.  Available for Linux on
        Intel.


     Documentation:
        Complete context sensitive Help and documentation in HTML
        format.  A PostScript version is available on request.


     Product support:
        Prices include installation support and one year of free
        upgrades.  Additional support available on request.


     Available since:
        May, 1996.

     Countries with distribution:
        World wide.


     Price range:
        Please contact softWorks for current prices.  Discounts for
        educational institutions and students available.


     Vendor:
        softWorks, Richard Schwaninger



          Theodor-Koernerstr. 173
          A-8010 Graz
          Austria



     Phone:
        +43 316 686590

     Fax:
        +43 316 686590

     EMail:
        risc@ping.at

     URL:
        http://members.ping.at/risc

     Contact:
        Richard Schwaninger


     Last modified:
        August 7, 1997.



  20.10.  Synchronize/CyberScheduler



     Description:
        Calendaring and scheduling software for LANS, WANs and
        Intranets.


     Distribution media:
        Internet (FTP).


     Licensing policy:
        Per user.


     OS provisions:
        Linux.


     Documentation:
        Take a look at our web site.
     Available since:
        1989.


     Countries with distribution:
        World wide.


     Price range:
        US$100 per user.


     Vendor:
        CrossWind Technologies Inc.



          1505 Ocean Street, Suite 1
          Santa Cruz, CA 95060
          U.S.A.



     Phone:
        +1 408 469 1780

     Fax:
        +1 408 469 1750

     EMail:
        info@crosswind.com

     URL:
        http://www.crosswind.com

     Contact:
        Anne Becker


     Last modified:
        November 13, 1997.



  21.  Free Software for Commercial Hardware


  This section covers free Linux software (e.g. drivers) for specialized
  hardware.


  21.1.  Stallion Technologies Multiport Serial Boards



     Description:
        Stallion provides Linux support for its EasyIO and
        EasyConnection range of multiport cards.  EasyIO is available
        with either 4 asynchronous serial ports with RJ45 connectors, or
        8 asynchronous serial ports with RJ45 or DB25 connectors.
        EasyIO supports data rates of up to 145 Kbits/sec or 460
        Kbits/sec per port (depending on the model) and full modem
        signaling.  Drivers are available for most Intel-based operating
        systems, including Linux.  EasyIO is available for the ISA bus.
        EasyConnection is an expandable multiport solution that provides
        from 8 to 64 asynchronous serial ports in 8 or 16 port
        increments.  Both RJ45 and DB25 connectors are available.
        Features include full surge suppression, full modem signaling,
        and data rates of up to 145 Kbits/sec or 460 Kbits/sec per port
        (depending on the panel version).  Drivers are available for
        most Intel-based operating systems, including Linux.
        EasyConnection is available for the ISA, EISA and PCI bus.


     Distribution media:
        Internet (FTP).


     Licensing policy:
        The Linux driver is available at no charge and is copyrighted
        under the GNU General Public License.  Source code is provided.


     OS provisions:
        The most current driver supports all 2.0.x kernel versions.  The
        drivers are updated regularly to keep pace with kernel changes.


     Documentation:
        Hardware reference documentation provided with the boards.  The
        Linux driver package contains a README file with driver
        installation and usage information.


     Product support:
        Stallion Technologies now fully supports the Stallion board
        Linux drivers.  Software updates are available from the
        Internet.  Stallion also provides technical support for the
        hardware.  Contact Stallion support for assistance.


     Available since:
        October, 1994.


     Countries with distribution:
        World wide distribution.  Available in most countries.


     Price range:
        Prices for the serial boards vary from country to country.
        Contact your nearest Stallion Technologies office for local
        availability and pricing.  The driver package contains a file
        with contact information for all Stallion Technologies offices.


     Vendor:
        Stallion Technologies Pty Ltd.



          2880 Research Park Drive, Suite 160
          Soquel, CA 95073
          U.S.A.



     Phone:
        +1 800 347 7979

     Fax:
        +1 408 477 0444

     EMail:
        info@stallion.com

     URL:
        http://www.stallion.com

     FTP:
        ftp://ftp.stallion.com


     Last modified:
        September 30, 1997.



  Configuration HOWTO
  By Guido Gonzato,  <guido ``at'' ibogeo.df.unibo.it>
  v1.3.7, 6 September 1999

  This HOWTO aims at making the fine--tuning of your newly installed
  Linux box quicker and easier. Here you will find a set of configura-
  tions for the most common applications and services.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Why This HOWTO
     1.2 What We Will Be Configuring

  2. General System Setup

     2.1 A Few Words About Security
     2.2 Start the Logbook!
     2.3 Keyboard
     2.4 Boot and Rescue Floppy
     2.5 Kernel Matters
     2.6 Sendmail Lock
     2.7 Hard Disk Performance
     2.8 Parallel Port Zip Drive
     2.9 Device Drivers
     2.10 Sound Card
     2.11 Login Messages
     2.12 Hostname
     2.13 Mouse
     2.14 Mount Points
     2.15 lilo(8) and LOADLIN.EXE
        2.15.1 Security Tip
     2.16 Mail Capabilities
     2.17 Printer Configuration
     2.18 SVGATextMode

  3. Common Administration Tasks

     3.1 Network configuration
     3.2 Sharing the Internet
     3.3 Restricting Network Access
     3.4 NFS Exports
     3.5 Name Server

  4. Software Configuration

     4.1 bash(1)
     4.2 ls(1)
     4.3 less(1)
     4.4 emacs(1)
     4.5 joe(1)
     4.6 jed(1)
     4.7 pine(1)
     4.8 minicom(1)
     4.9 efax(1)
     4.10 Ghostscript
     4.11 TeX and Friends
     4.12 Avoid PPProblems!
        4.12.1 A Quick Start with eznet
        4.12.2 A Quick Start with wvdial
     4.13 POP Client
     4.14 X Window System (XFree86)
        4.14.1 Setting Up the X Server
        4.14.2 Keypad
        4.14.3 Graphical Login with xdm
        4.14.4 Window Manager
        4.14.5 Defaults for X11 Apps
     4.15 Users' Configurations
     4.16 Making .rpms
     4.17 Upgrading

  5. Configuration Software

  6. The End

     6.1 Copyright
     6.2 Feedback
     6.3 Disclaimer


  ______________________________________________________________________

  1.  Introduction



  1.1.  Why This HOWTO


  I have installed Linux on many PCs and noted that current
  distributions are terrific but, annoyingly, lack some basic
  configuration. Most applications will work out of the box, but others
  won't. Moreover, I have noted that the same questions crop up on
  c.o.l.setup over and over again. To try and remedy this situation, and
  for my own convenience, I wrote a to--do list that eventually became
  this HOWTO. Here you will find configuration tips and examples for the
  most common applications, programs, and services, which should save
  you a fair amount of time and work.

  A few of the examples outlined in this HOWTO depend somehow on the
  distribution. Currently, I only have access to Red Hat 5.2 machines,
  kernel 2.0.36; so don't take any of my tips as gospel if you have
  other distributions. It shouldn't be hard to adapt my tips to other
  distros, though.

  This HOWTO can't, and is not meant to, replace others. Reading docs
  and HOWTOs always pays, so you're strongly advised to do so if you
  want to know more. Also, no spoon--feeding here: if you realise you
  don't understand something, please refer to the relevant HOWTO. Let me
  remind you that the right place for seeking help with Linux
  configuration is Usenet, i.e.  <news:comp.os.linux.setup>. Please,
  don't seek help from me because I'm quite overloaded.

  The official place for this document, including some translations, is
  available at  <http://metalab.unc.edu/mdw/HOWTO>. Here you will also
  find all other HOWTOs I refer to. The very latest version is available
  at  <http://ibogeo.df.unibo.it/guido/Configuration>.



  1.2.  What We Will Be Configuring


  There can be endless hardware configurations for a PC, but in my
  experience one is quite common: a PC fitted with a large HD split into
  three partitions (one for DOS/Windows, one for Linux, one for the
  swap), sound card, modem, CD--ROM drive, printer, mouse. A parallel
  port Zip Drive is also very common. This machine is possibly part of a
  mixed Windows-Linux network, where it acts as server.

  This is the hardware I'll assume you want to configure, but it's easy
  to adapt the following tips to different configurations. It's
  implicitly assumed that you'll be root when editing/fixing/hacking.

  And now, lads, sleeves up.



  2.  General System Setup



  2.1.  A Few Words About Security


  Even before your system boots, you should decide what level of
  security you want to implement. To begin with, don't connect your
  machine to the network until you have decided what to do.

  Security is a vast subject that goes beyond the scope of this HOWTO;
  two good starting points are the Linux Security Administrator's Guide
  at <http://www.seifried.org/lasg> and the Linux Security Guide at
  <http://nic.com/~dave/Security>. You should consider at least the
  following steps: using shadow passwords (Shadow Password HOWTO),
  restricting network access to the machine (Section ``Restricting
  Network Access''), using the Secure Shell (
  <http://www.cs.hut.fi/ssh/>) or the Secure Remote Password (
  <http://srp.stanford.edu/srp/>). Good luck.



  2.2.  Start the Logbook!


  To keep your installation in shape, it's essential that you know
  exactly what happened to your machine, which packages you installed
  that day, what you removed or modified, and so on. So, the first thing
  you'll do before you tamper with your machine is start a ``logbook''.
  Therein you'll take note of every move you make as root; in my own
  logbook I also keep a section where I list all modified system files,
  additional .rpms, and .tar.gz I installed. Optimally, backtracking
  your moves you should be able to re-obtain a pristine installation.

  Make a backup copy of the system files you touch. Better still, use
  RCS; you'll be able to backtrack all changes. Never work as root
  without logging your moves!



  2.3.  Keyboard


  If you missed this step during installation or have changed your
  keyboard, you'll have to:


  o  find a suitable key table starting from /usr/lib/kbd/keymaps/; for
     example, it.map selects the Italian keyboard;

  o  edit the file /etc/sysconfig/keyboard so as it reads:
     KEYTABLE="it";

  o  to set up the keyboard repeat rate and delay time, add this line to
     /etc/rc.d/rc.sysinit (Red Hat) or /etc/rc.d/rc.boot (Caldera) or
     /etc/rc.d/boot (S.u.S.E.):



       /sbin/kbdrate -s -r 16 -d 500  # or whatever you like



  To load the key table, issue /etc/rc.d/init.d/keytable start.  Other
  special keys will be considered in the following sections.

  To enable NumLock on by default, add these lines to
  /etc/rc.d/rc.sysinit:



       for tty in /dev/tty[1-9]*; do
         setleds -D +num < $tty
       done



  2.4.  Boot and Rescue Floppy


  Make a couple of boot floppies for your newly installed system. Your
  distribution may include a command for creating such a floppy; if not,
  these commands will do:



       #~ dd if=/boot/vmlinuz-2.0.36-0.7 of=/dev/fd0  # use your kernel image
       #~ rdev /dev/fd0 /dev/hda2                     # your Linux partition



  Also, have at least a couple of rescue disks ready. There's a wide
  choice of rescue disks at
  <ftp://metalab.unc.edu/pub/Linux/system/recovery>; if you don't know
  which one to choose, I suggest you try out Tomsbtrt.



  2.5.  Kernel Matters


  IMHO, the first thing to do next is build a kernel that best suits
  your system. It's very simple to do but, in any case, refer to the
  README file in /usr/src/linux/ or the Kernel HOWTO. Hints:


  o  consider carefully your needs. Choosing a kernel configuration,
     applying the patches, and compiling it once and for all is more
     productive than reconfiguring and recompiling each month; this is
     especially true if your Linux box is a server. Don't forget to
     include support for all the hardware you might likely add in the
     future (e.g. SCSI, Zip, network cards, etc); using modules is
     usually the best choice;

  o  if your PC is based on a Cyrix CPU that is not properly recognised
     as such by the kernel, apply appropriate patches to improve its
     performance. Information on
     <http://www.linuxhq.com/patch/20-p0591.html>;

  o  notebook users will want to improve their LCD screen legibility. I
     once suggested that a kernel patch should be applied, but
     SVGATextMode (see Section ``SVGATextMode'') is probably the best
     solution. Anyway, the Big Cursor kernel patch is on
     <http://www.linuxhq.com/patch/20-p0239.html>;

  o  again for notebook users, if you plan to use a PCMCIA modem/fax
     don't compile serial support as a module; compile it in the kernel,
     otherwise your PCMCIA modem won't work;

  o  if you use PCMCIA cards, remember to compile those modules as well;
     also, don't forget to edit /etc/pcmcia/network.opts if you use a
     PCMCIA network card;

  o  if you get those pesky messages from modprobe indicating that some
     modules can't be located, that means that your /etc/conf.modules
     needs mending. For instance, if you don't use the ipx and appletalk
     modules, add these lines:



       alias net-pf-4 off
       alias net-pf-5 off



  o  to save time the next time you reconfigure and recompile the
     kernel, it's a good idea to save your configuration on a file and
     keep it in a safe place. Beware: if you upgrade your kernel this
     config file is bound to be useless, because it doesn't contain the
     features of the new kernel.



  2.6.  Sendmail Lock


  On some systems, sendmail hangs the machine for a couple of minutes at
  boot time. There are two cases: 1) the machine is not directly
  connected to the Internet, 2) the machine is connected, and has a
  permanent IP address.

  Quick fix for the first case: make sure your /etc/hosts contains a
  line that reads



       127.0.0.1   localhost



  For the second case: the lock is caused by /etc/hosts containing a
  line like



       127.0.0.1   localhost   your_host_name



  which you will split this way:



       127.0.0.1    localhost
       w.x.y.z      your_host_name


  See also Section ``Hostname''.



  2.7.  Hard Disk Performance


  Your (E)IDE hard disk's performance can be greatly enhanced by
  carefully using hdparm(8). If your Linux distribution doesn't include
  it, you'll find on <ftp://metalab.unc.edu/pub/Linux/system/hardware>;
  look for a file called hdparm-X.Y.tar.gz.

  Since many details depend on your hard disk and HD controller, I can't
  give you a general recipe. You risk to toast your filesystem, so read
  the man page carefully before using some of the options. At its
  simplest, you could add the following line to /etc/rc.d/rc.sysinit:



       /sbin/hdparm -c1 /dev/hda  # first IDE drive assumed



  which enables (E)IDE 32-bit I/O support. As for the `-m' option, this
  is what hdparm author Mark Lord emailed me:


       (...) if your system uses components from the past couple of
       years [< 1997], it will be fine. Older than that, there
       *may* be a problem (unlikely). The really buggy chips were
       the CMD0646 and RZ1000 chips, used *extensively* on 486 and
       (early) 586 motherboards about 2-3 years ago.


  For recent machines, these settings should work fine:



       /sbin/hdparm -c1 -A1 -m16 -d1 /dev/hda



  2.8.  Parallel Port Zip Drive


  To use the parallel port version of the Zip drive you can use the
  default driver that comes with recent (2.x.x) kernels. During kernel
  configuration, make sure that SCSI support and SCSI disk support are
  enabled. Remember, there can be conflicts between the printer and the
  Zip drive on the same parallel port, so you will want to use kernel
  modules. There's an alternative ppa driver at
  <http://www.torque.net/~campbell>.

  Zip disks are sold preformatted on partition /dev/sda4. To enable the
  Zip, append this to /etc/rc.d/rc.sysinit:



       # Enable the Zip drive
       /sbin/modprobe ppa


  Zip disks can be mounted via /etc/fstab as shown below, or via Mtools
  adding this line to your /etc/mtools.conf:



       drive z: file="/dev/sda4" exclusive



  besides, the command mzip allows you to eject, query the status, write
  and password protect Zip disks; man mzip for details.  The Mtools home
  page is at <http://linux.wauug.org/pub/knaff/mtools>.



  2.9.  Device Drivers


  Devices in /dev (or better, links to the actual device drivers) may be
  missing. Check what devices your mouse, modem, and CD--ROM drive
  correspond to, then do what follows:



       ~# cd /dev
       /dev# ln -s ttyS0 mouse; ln -s ttyS1 modem; ln -s hdb cdrom; ln -s sda4 zip



  In most notebooks the mouse device is /dev/psaux: take this into
  account when configuring X11.

  If you want, do chmod 666 to these devices to make them fully
  accessible by every user.



  2.10.  Sound Card


  All I own is an old Sound Blaster 16; even if you've got something
  different, you may take what follows as guidelines.

  I compiled the sound card support as a module (sb.o).  Then I put this
  in /etc/conf.modules:



       options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330
       alias sound sb



  To enable the sound, make sure that modprobe sound is invoked in
  /etc/rc.d/rc.sysinit. Alternatively, get the tool sndconfig from the
  RedHat site.



  2.11.  Login Messages


  If you wish to customise the login messages, check whether your
  /etc/rc.d/rc.local overwrites /etc/issue and /etc/motd. (RedHat does.)
  If so, get on with your editor.

  If you'd like a colourised login message, you may adapt your rc.local
  inserting lines like these:



       # put a real escape character instead of ^[. To do this:
       # emacs: ^Q ESC   vi: ^V ESC   joe:  ` 0 2 7   jed: ` ESC
       ESC="^["  # a real escape character
       BLUE="$ESC[44;37m"
       NORMAL="$ESC[40;37m"
       CLEAR="$ESC[H$ESC[J"

       > /etc/issue
       echo "$CLEAR" >> /etc/issue
       echo "$BLUE   Welcome to MyServer (192.168.1.1)   " >> /etc/issue
       echo "$NORMAL " >> /etc/issue
       echo "" >> /etc/issue



  2.12.  Hostname


  Issuing the command hostname new_host_name may not be enough. To avoid
  the dreaded sendmail lock, follow these steps (only valid for a
  stand--alone machine):


  o  edit /etc/sysconfig/network and change the hostname therein (e.g.
     new_host_name.localdomain);

  o  edit /etc/HOSTNAME appropriately;

  o  append the new hostname in the line in /etc/hosts:


       127.0.0.1       localhost  new_host_name.locadomain



  2.13.  Mouse


  gpm mouse services are useful to perform cut and paste in tty mode,
  and to use the mouse in some applications. For Red Hat, check that you
  have a file called /etc/sysconfig/mouse and that it reads:



       MOUSETYPE="Microsoft"
       XEMU3=yes

  Moreover, you must have a file /etc/rc.d/init.d/gpm, where you'll put
  additional command line parameters. Mine reads:



       ...
              daemon gpm -t $MOUSETYPE -d 2 -a 5 -B 132 # two-button mouse
       ...



  Obviously, make sure this configuration is right for your mouse type.
  In most notebooks, MOUSETYPE is ``PS/2''.

  For Caldera, all you have to do is append this line to
  /etc/rc.d/rc.boot:



       /usr/bin/gpm



  On S.u.S.E., gpm options go in /etc/rc.config; on Debian, you'll edit
  /etc/gpm.conf.

  If you like to use menus in console with Ctrl-button, then configure
  gpm-root. Edit the default menu in /etc/gpm-root.conf, then launch
  gpm-root from /etc/rc.d/rc.local.



  2.14.  Mount Points


  It's handy to have mount points for the floppy, other devices and NFS-
  exported directories. For example, you can do the following:



       ~# cd /mnt
       /mnt# mkdir floppy; mkdir cdrom; mkdir win; mkdir zip; mkdir server



  This creates mount points for a DOS/Win floppy, an ext2 floppy, the
  CD--ROM, the Windows partition, the parallel port Zip drive, and a NFS
  directory.

  Now edit the file /etc/fstab and add the following entries:



       /dev/fd0        /mnt/floppy     auto            user,noauto 0 1
       /dev/cdrom      /mnt/cdrom      iso9660         ro,user,noauto 0 1
       /dev/zip        /mnt/zip        vfat            user,noauto,exec 0 1
       /dev/hda1       /mnt/win        vfat            user,noauto 0 1
       server:/export  /mnt/server     nfs             defaults



  Obviously, you must use the correct device in the first field. Recent
  kernels support fat32 partitions natively; for older ones, there's a
  kernel patch at <http://bmrc.berkeley.edu/people/chaffee/fat32.html>.
  man mount for further information.

  Note the ``auto'' filesystem type in the first line; it allows you to
  mount both ext2 and vfat (DOS/Windows) floppies. You may find mtools
  more convenient.



  2.15.  lilo(8) and LOADLIN.EXE


  Many users run both Linux and DOS/Windows on their PC, and want to
  choose at boot time which os to use; this should be done at install
  time, but in case, do what follows. Let's suppose that /dev/hda1
  contains DOS/Windows and that /dev/hda2 contains Linux.



       ~# fdisk
       Using /dev/hda as default device!

       Command (m for help):a
       Partition number (1-4): 2

       Command (m for help):w
       ~#



  This makes the Linux partition bootable. Then write this basic
  /etc/lilo.conf file:



       boot = /dev/hda2
       compact                # may conflict with "linear"
       delay = 100            # 10 seconds
       linear                 # gets rid of the "1024 cylinder" problem
       # message = /boot/bootmesg.txt  # write your own, if you will
       root = current
       image = /boot/vmlinuz  # boot linux by default as this entry comes first
         label = linux
         read-only
       #  append="mem=128M"   # to see more memory than 64M
       other = /dev/hda1
         table = /dev/hda
         label = dos



  Now issue /sbin/lilo and you're done. Being lilo a crucial part of
  your installation, you're strongly advised to read its documentation
  anyway.

  To boot Linux from DOS/Windows without resetting, put LOADLIN.EXE in a
  directory (in the DOS partition!) included in the DOS path; then copy
  your kernel to, say, C:\TEMP\VMLINUZ. The following simple .BAT file
  will boot Linux:



  rem   linux.bat
  smartdrv /C
  loadlin c:\temp\vmlinuz root=/dev/hda2 ro



  If you use Windows 9x, set the properties of this .BAT so as it starts
  in MS--DOS mode.



  2.15.1.  Security Tip


  Making a backup copy of your MBR before installing Linux is a safe
  move.  Use restorrb (included in the FIPS package) before
  installation, or a Linux rescue floppy to issue this command:



       rescue:~# dd if=/dev/hda of=MBR bs=512 count=1



  then make at least two copies of the file MBR on floppies. Should
  disaster strike, you'll be able to restore your old MBR by issuing:



       rescue:~# dd if=/mnt/MBR of=/dev/hda bs=446 count=1



  assuming that a floppy containing MBR is mounted under /mnt.
  Alternatively, use a DOS rescue floppy to issue FDISK /MBR.



  2.16.  Mail Capabilities


  You will want to be able to read mail messages written in HTML or
  containing exotic file formats. Make sure you have two files:
  /etc/mime.types and /etc/mailcap. The first one lists file types and
  related extensions, like:



       application/postscript          ps eps
       image/jpeg                      jpe jpeg jpg
       text/html                       html



  while the second one tells the mail client how to display that file
  type.

  You may receive mail from people who use Microsoft Outlook, whose
  messages are in multi--part MIME format. These two lines, put in
  etc/mailcap, should let you read those messages:


       text/plain; less %s; needsterminal
       text/html; lynx -force_html %s; needsterminal



  2.17.  Printer Configuration


  All distributions I know have a configuration tool for setting up the
  printer (printtool, yast, or magicfilter); if you don't have it, this
  is a basic manual configuration.

  Let's suppose you have a non--PostScript (non ``Windows-only'' too!)
  printer you want to use to print raw text (e.g., C source files) and
  PostScript files via Ghostscript, which is assumed to be already
  installed.

  Setting up the printer involves a few steps:


  o  find out which one the parallel print device is: try



       ~# echo "hello, world" > /dev/lp0
       ~# echo "hello, world" > /dev/lp1



  and take note which one works.

  o  make two spool directories:



       ~# cd /var/spool/lpd
       /var/spool/lpd/# mkdir raw; mkdir postscript



  o  if your printer exibits the ``staircase effect'' (most inkjets do),
     you'll need a filter. Try to print two lines with



       ~# echo "first line" > /dev/lp1 ; echo "second line" > /dev/lp1



  if the output is like this:



       first line
                 second line


  then save this script as /var/spool/lpd/raw/filter:



       #!/bin/sh
       # This filter eliminates the "staircase effect"
       awk '{print $0, "\r"}'



  and make it executable with chmod 755 /var/spool/lpd/raw/filter.

  o  make a filter for PostScript emulation. Write the following filter
     as /var/spool/lpd/postscript/filter:



       #!/bin/sh

       DEVICE=djet500
       RESOLUTION=300x300
       PAPERSIZE=a4
       SENDEOF=

       nenscript -TUS -ZB -p- |
       if [ "$DEVICE" = "PostScript" ]; then
               cat -
       else
               gs -q -sDEVICE=$DEVICE \
                       -r$RESOLUTION \
                       -sPAPERSIZE=$PAPERSIZE \
                       -dNOPAUSE \
                       -dSAFER \
                       -sOutputFile=- -
       fi

       if [ "$SENDEOF" != "" ]; then
               printf "\004"
       fi



  (in this example an HP DeskJet printer is assumed. Fix it to suit your
  printer).

  o  finally, add the following entries in /etc/printcap:



  # /etc/printcap
  lp|ps|PS|PostScript|djps:\
          :sd=/var/spool/lpd/postscript:\
          :mx#0:\
          :lp=/dev/lp1:\
          :if=/var/spool/lpd/postscript/filter:\
          :sh:
  raw:\
          :sd=/var/spool/lpd/raw:\
          :mx#0:\
          :lp=/dev/lp1:\
          :if=/var/spool/lpd/raw/filter:\
          :sh:



  For more complex or exotic printing configurations, the Printing-HOWTO
  awaits you.

  If you use printtool, be aware that the GSDEVICE chosen by Printtool
  will work, but not necessarily at its best for your printer. You may
  consider fiddling a bit with the file postscript.cfg; for instance, I
  changed GSDEVICE from cdj500 to djet500 and now my prints come out
  much quicker.



  2.18.  SVGATextMode


  This utility, available on
  <ftp://tsx-11.mit.edu/pub/linux/sources/sbin>, is useful for changing
  the console screen resolution, font, and cursor shape. Users whose
  language include accented characters will be able to use them in
  console applications, while notebook users may change the cursor shape
  to make it more visible.

  Edit /etc/TextConfig or /etc/TextMode, starting with the default VGA
  definition. Europeans should be happy with this ``LoadFont'' section:



       Option "LoadFont"
       FontProg "/usr/bin/setfont"
       FontPath "/usr/lib/kbd/consolefonts"
       FontSelect "lat1u-16.psf"   8x16 9x16 8x15 9x15
       FontSelect "lat1u-14.psf"   8x14 9x14 8x13 9x13
       FontSelect "lat1u-12.psf"   8x12 9x12 8x11 9x11
       FontSelect "lat1u-08.psf"   8x8  9x8  8x7  9x7



  Once you're done, try your configuration with a command like
  SVGATextMode "80x34x9", and if everything appears to be working fine,
  remove the warnings from /etc/TextMode and include this line in
  etc/rc.d/rc.sysinit:



       # SVGATextMode
       /usr/sbin/SVGATextMode "80x34x9"


  Please note that the block cursor only works with some modes; on my
  notebook, "80x32x9".



  3.  Common Administration Tasks


  So many things to do, so little time! Here is where the fun begins.
  This section is rather network-centric, though many other tasks await
  you.

  Networking is a vast subject which cannot be fully covered here. The
  reference is the NET-3 HOWTO, and most distributions provide
  documentation on setting up network services. Only a few points will
  be recalled here.

  A quick to-do list for the services you may want to install: cron and
  timed tasks like calendar or reminder, Http, Samba, telnet/ssh access,
  anonymous ftp, POP/IMAP server, NFS services...



  3.1.  Network configuration


  Although the actual method of starting network services of your
  distribution may be much more complex, the following script should be
  enough to get you started:



       #!/bin/sh

       # net-up.sh: set up network access

       DEVICE=eth0
       IPADDR=192.168.1.100
       NETMASK=255.255.255.0
       NETWORK=192.168.1.0
       GATEWAY=192.168.1.1

       ifconfig $DEVICE $IPADDR netmask $NETMASK up
       route add -net $NETWORK netmask $NETMASK $DEVICE
       route add default gw $GATEWAY



  This script is handy for enabling network access when you use a rescue
  disk.  Obviously, this lets you only ping, ftp and telnet to the
  outside.



  3.2.  Sharing the Internet


  One of the most useful tasks for a Linux server. Currently, most stock
  kernels come with IP firewalling, masquerading and forwarding enabled
  by default; if in doubt, consult the IP-Masquerade mini-HOWTO to learn
  how to enable them. Then install ipfwadm (kernels 2.0.x;
  <http://www.xos.nl/linux/ipfwadm/>) or ipchains (kernels 2.2.x;
  <http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html>).
  Remember to enable kernel modules for the services you need, e.g. for
  ftp you'll add this line to /etc/rc.d/rc.sysconfig:
       /sbin/modprobe ip_masq_ftp



  Other modules are usually found in /lib/modules/KERNEL-VERSION/ipv4.

  Enabling IP masquerading for other machines in your local network is
  very simple. First, check the network initialisation scripts
  (/etc/sysconfig/network should be the right place) to see if they
  contain a line that reads FORWARD_IPV4=true. It's used to set
  /proc/sys/net/ipv4/ip_forward to 1 when the network subsystem comes
  up.

  Add these lines to /etc/rc.d/rc.sysinit:



       # default: packets cannot go reach the outside
       /sbin/ipfwadm -F -p deny
       # allow all machines on the local network to reach the Internet
       /sbin/ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0
       # alternatively, allow only these two machines
       # /sbin/ipfwadm -F -a m -S 192.168.1.100/24 -D 0.0.0.0/0
       # /sbin/ipfwadm -F -a m -S 192.168.1.101/24 -D 0.0.0.0/0



  If you use a kernel of the 2.2.x series, use ipfwadm-wrapper instead
  of ipfwadm to get started quickly.

  Now you'll want something to let client machines dial the ISP; I use
  Mserver ( <http://cpwright.villagenet.com/mserver/>). Edit
  etc/mserver.conf; the only entries that you should modify are
  ``checkhost'', ``shadow'', and ``cname''. Then define your
  connection(s).  Obviously, install one of the available clients on the
  client machines.



  3.3.  Restricting Network Access


  Let's suppose you connect to the Internet via PPP. Once you're
  connected, your machine may become vulnerable to attacks. Insert this
  in /etc/hosts.allow:



       # only allow access to localhost
       ALL: 127.



  and this in /etc/hosts.deny:



       # deny access to everyone
       ALL: ALL



  If you belong to a network with direct Internet access, you had better
  disable finger, telnet, and possibly other services for security
  reasons; use ssh instead of telnet. The file to edit is
  /etc/inet.conf. Alternatively, you can restrict network access putting
  this in /etc/hosts.allow:



       in.telnetd: 192.168.1., .another.trusted.network
       in.ftpd: 192.168.1., .another.trusted.network



  and this in /etc/hosts.deny:



       in.telnetd: ALL
       in.ftpd: ALL



  3.4.  NFS Exports


  It is common to export the home directories on the server; a problem
  arises if a user's UID and GID are not consistent across different
  machines.  If user guido has UID/GID equal to 500 on server and
  UID/GID equal to 512 on client, a convenient configuration is this:



       # /etc/exports
       /tmp            my.client.machine(rw)
       /home/guido     my.client.machine(rw,map_static=/etc/nfs/client.map)



  In /etc/nfs/client.map you'll put this:



       # /etc/nfs/client.map
       # NFS mapping for client
       #       remote          local
       uid     512             500
       gid     512             500



  3.5.  Name Server


  Not written yet.



  4.  Software Configuration


  These are the the configuration files we are going to custimise:
  /etc/profile /etc/bashrc .bashrc .bashrc .bash_profile .bash_logout
  .inputrc .less .lessrc .xinitrc .fvwmrc .fvwm2rc95 .Xmodmap
  .Xmodmap.num .Xdefaults .jedrc .abbrevs.sl .joerc .emacs .  Don't add
  users until you have completed your system configuration; you'll put
  the dot files in /etc/skel.



  4.1.  bash(1)


  Arguably, the most important piece of software after the kernel. To
  tailor the behaviour of bash, these are the main files to edit:


  o  /etc/bashrc contains system wide aliases and functions;

  o  /etc/profile contains system wide environment stuff and startup
     programs;

  o  $HOME/.bashrc contains user aliases and functions;

  o  $HOME/.bash_profile contains user environment stuff and startup
     programs;

  o  $HOME/.inputrc contains key bindings and other bits.

  Examples of these files are shown below. First, the most important:
  /etc/profile. It's used to configure a lot of features in your Linux
  box, as you will see in the following sections. Please look out for
  reverse quotes!



  ______________________________________________________________________
  # /etc/profile

  # System wide environment and startup programs
  # Functions and aliases go in /etc/bashrc

  # This file sets up the following features and programs:
  #
  #   o path
  #   o prompts
  #   o a few environment variables
  #   o colour ls
  #   o less
  #   o rxvt
  #
  # Users can override these settings and/or add others in their
  # $HOME/.bash_profile

  # set a decent path
  PATH="$PATH:/usr/X11R6/bin:$HOME/bin:."

  # notify the user: login or non-login shell. If login, the prompt is
  # coloured in blue; otherwise in magenta. Root's prompt is red.
  # See the Colour-ls mini HOWTO for an explanation of the escape codes.
  USER=`whoami`
  if [ $LOGNAME = $USER ] ; then
    COLOUR=44  # blue
  else
    COLOUR=45  # magenta
  fi

  if [ $USER = 'root' ] ; then
    COLOUR=41  # red
    PATH="$PATH:/usr/local/bin"
  fi

  ESC="\033"
  PROMPT='\h'    # hostname
  STYLE=';1m'    # bold
  # PROMPT='\u'  # username
  # STYLE='m'    # plain
  PS1="\[$ESC[$COLOUR;37$STYLE\]$PROMPT:\[$ESC[37;40$STYLE\]\w\\$ "
  PS2="> "

  # no core dumps, please
  ulimit -c 0

  # set umask
  if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
    umask 002
  else
    umask 022
  fi

  # a few variables
  USER=`id -un`
  LOGNAME=$USER
  MAIL="/var/spool/mail/$USER"  # sendmail, postfix, smail
  # MAIL="$HOME/Mailbox"        # qmail
  NNTPSERVER=news.myisp.it      # put your own here
  VISUAL=jed
  EDITOR=jed
  HOSTNAME=`/bin/hostname`
  HISTSIZE=1000
  HISTFILESIZE=1000
  export PATH PS1 PS2 USER LOGNAME MAIL NNTPSERVER
  export VISUAL EDITOR HOSTNAME HISTSIZE HISTFILESIZE

  # enable colour ls
  eval `dircolors /etc/DIR_COLORS -b`
  export LS_OPTIONS='-s -F -T 0 --color=yes'

  # customize less
  LESS='-M-Q'
  LESSEDIT="%E ?lt+%lt. %f"
  LESSOPEN="| lesspipe.sh %s"
  LESSCHARDEF=8bcccbcc13b.4b95.33b. # show colours in ls -l | less
  # LESSCHARSET=latin1
  PAGER=less
  export LESS LESSEDIT LESSOPEN VISUAL LESSCHARDEF

  # fix the backspace key in rxvt/xterm
  CTRL_H="\010"
  NULL_STRING=" $CTRL_H" # space + backspace
  if [ "$NULL_STRING" != "" ] ; then
    stty erase ^?
  else
    stty erase ^H
  fi

  # set xterm title: full path
  case $TERM in
    xterm*)
      PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
      ;;
  esac

  for i in /etc/profile.d/*.sh ; do
    if [ -x $i ]; then
      . $i # beware - variables and aliases might get overridden!
    fi
  done

  # call fortune, if available
  if [ -x /usr/games/fortune ] ; then
    echo ; /usr/games/fortune ; echo
  fi
  ______________________________________________________________________



  This is a sample /etc/bashrc:



  ______________________________________________________________________
  # /etc/bashrc

  # System wide functions and aliases
  # Environment stuff goes in /etc/profile
  # Insert PS1 definitions here if you experience problems.

  export CDPATH="$CDPATH:~"

  # common aliases
  alias cp='cp -i'
  alias l=less
  alias ls="ls $LS_OPTIONS"
  alias mv='mv -i'
  alias rm='rm -i'
  alias rmbk='/bin/rm -f .*~ *~ *aux *bak *log *tmp 2> /dev/null'
  alias u='cd ..'
  alias which="type -path"
  alias x=startx

  # A few useful functions
  c ()    # cd to the new directory and list its contents
  {
    cd $1 ; ls
  }

  inst()  # Install a .tar.gz archive in current directory
  {
    if [ $# != 0 ]; then tar zxvf $1; fi
  }

  cz()    # List the contents of a .zip archive
  {
    if [ $# != 0 ]; then unzip -l $*; fi
  }

  ctgz()  # List the contents of a .tar.gz archive
  {
    for file in $* ; do
      tar ztf ${file}
    done
  }

  tgz()   # Create a .tgz archive a la zip.
  {
    if [ $# != 0 ]; then
      name=$1.tar; shift; tar -rvf ${name} $* ; gzip -9 ${name}
    fi
  }

  crpm()  # list information on an .rpm file
  {
    if [ $# != 0 ]; then rpm -qil $1 | less; fi
  }
  ______________________________________________________________________



  This is a sample .bashrc:



  ______________________________________________________________________
  # $HOME/.bashrc
  # Source global definitions

  if [ -f /etc/bashrc ]; then
    . /etc/bashrc
  fi

  # this is needed to notify the user that they are in non-login shell
  if [ "$GET_PS1" = "" ] ; then
    COLOUR=45; ESC="\033"; STYLE=';1m';  # STYLE='m'
    USER=`whoami`
    export PS1="\[$ESC[$COLOUR;37$STYLE\]$USER:\[$ESC[37;40$STYLE\]\w\\$ "
  fi

  # personal aliases
  alias backup='tar -Mcvf /dev/fd0'
  alias dial='eznet up myisp'
  alias f='cd ~/fortran'
  alias hangup='eznet down'
  alias lyx='lyx -width 580 -height 450'
  alias restore='tar -M -xpvf /dev/fd0'

  # personal functions
  xj()    # Launch xjed and a file in background
  {
    xjed $1 &
  }
  ______________________________________________________________________



  This is a sample .bash_profile:


  ______________________________________________________________________
  # $HOME/.bash_profile

  # User specific environment and startup programs
  # This file contains user-defined settings that override
  # those in /etc/profile

  # Get user aliases and functions
  if [ -f ~/.bashrc ]; then
    GET_PS1="NO"  # don't change the prompt colour
    . ~/.bashrc
  fi

  # set a few `default' directories
  export CDPATH="$CDPATH:$HOME:$HOME/text:$HOME/text/geology"
  ______________________________________________________________________



  This is a sample .inputrc:



  ______________________________________________________________________
  # $HOME/.inputrc

  # key bindings
  "\e[1~": beginning-of-line
  "\e[3~": delete-char
  "\e[4~": end-of-line
  # (F1 .. F5) are "\e[[A" ... "\e[[E"
  "\e[[A": "info \C-m"

  set bell-style visible          # please don't beep
  set meta-flag On                # allow 8-bit input (i.e, accented letters)
  set convert-meta Off            # don't strip 8-bit characters
  set output-meta On              # display 8-bit characters correctly
  set horizontal-scroll-mode On   # scroll long command lines
  set show-all-if-ambiguous On    # after TAB is pressed
  ______________________________________________________________________



  To make the backspace and delete keys work correctly in xterm and
  other X11 applications, the following is also needed:


  o  put this in your .xinitrc:



       usermodmap=$HOME/.Xmodmap
       xmodmap $usermodmap



  o  then your .Xmodmap will contain:



       keycode 22 = BackSpace
       keycode 107 = Delete



  this fixes the console. To fix xterm:

  o  put this in your .Xdefaults:



       xterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n\
               <Key>Delete:        string(0x1b) string("[3~")\n\
               <Key>Home:          string(0x1b) string("[1~")\n\
               <Key>End:           string(0x1b) string("[4~")\n\
               Ctrl<Key>Prior:     string(0x1b) string("[40~")\n\
               Ctrl<Key>Next:      string(0x1b) string("[41~")

       nxterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n\
               <Key>Delete:        string(0x1b) string("[3~")\n\
               <Key>Home:          string(0x1b) string("[1~")\n\
               <Key>End:           string(0x1b) string("[4~")\n\
               Ctrl<Key>Prior:     string(0x1b) string("[40~")\n\
               Ctrl<Key>Next:      string(0x1b) string("[41~")

  rxvt is a wee bit more complicated, as some compile--time options
  influence its behaviour. See the above /etc/profile.

  More info in bash(1) and readline(3) man pages.

  Don't expect every application to work correctly! If you run joe in
  xterm, for instance, some keys won't work; the same holds for some
  versions of rxvt.



  4.2.  ls(1)


  ls can display directory listings using colours to highlight different
  file types. To enable this feature, you just need a couple of lines in
  /etc/profile as seen above. However, this won't work with some
  versions of rxvt; use some flavour of xterm instead. It looks like
  some old rxvts have a bug that prevents them from inheriting the
  environment correctly in some circumstances.

  Caldera's ls doesn't have colours, but there's an equivalent color-ls.
  Add this in /etc/bashrc:



       alias ls="color-ls $LS_OPTIONS"



  4.3.  less(1)


  With this excellent pager you can browse not only plain text files,
  but also gzip compressed, tar and zip archives, man pages, and what
  have you. Its configuration involves a few steps:


  o  to use it with the movement keys, have this plain ASCII file
     .lesskey in your home directory:



       ^[[A   back-line
       ^[[B   forw-line
       ^[[C   right-scroll
       ^[[D   left-scroll
       ^[OA   back-line
       ^[OB   forw-line
       ^[OC   right-scroll
       ^[OD   left-scroll
       ^[[6~  forw-scroll
       ^[[5~  back-scroll
       ^[[1~  goto-line
       ^[[4~  goto-end
       ^[[7~  goto-line
       ^[[8~  goto-end



  then run the command lesskey. (These are escape sequences for
  vt100-like terminals.) This creates a binary file .less containing the
  key bindings.


  o  write the following file as /usr/local/bin/lesspipe.sh:


     ___________________________________________________________________
     #!/bin/sh
     # This is a preprocessor for 'less'.  It is used when this environment
     # variable is set:   LESSOPEN="|lesspipe.sh %s"

     lesspipe() {
       case "$1" in
       *.tar) tar tf $1 2>/dev/null ;; # View contents of .tar and .tgz files
       *.tgz|*.tar.gz|*.tar.Z|*.tar.z) tar ztf $1 2>/dev/null ;;
       *.Z|*.z|*.gz) gzip -dc $1  2>/dev/null ;; # View compressed files correctly
       *.zip) unzip -l $1 2>/dev/null ;; # View archives
       *.arj) unarj -l $1 2>/dev/null ;;
       *.rpm) rpm -qpil $1 2>/dev/null ;;
       *.cpio) cpio --list -F $1 2>/dev/null ;;
       *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.l|*.man) FILE=`file -L $1`
         FILE=`echo $FILE | cut -d ' ' -f 2`
         if [ "$FILE" = "troff" ]; then
           groff -s -p -t -e -Tascii -mandoc $1
         fi ;;
       *) file $1 | grep text > /dev/null ;
         if [ $? = 1 ] ; then # it's not some kind of text
           strings $1
         fi ;;
       esac
     }

     lesspipe $1
     ___________________________________________________________________



  then make it executable with chmod 755 lesspipe.sh.

  o  put the necessary variables in /etc/profile as seen above.



  4.4.  emacs(1)


  I rarely use emacs, so I have only a couple of tips for you.  Some
  emacs distributions don't come preconfigured for colours and syntax
  highlighting. Put this in your .emacs:



       (global-font-lock-mode t)
       (setq font-lock-maximum-decoration t)



  This only works in X11. Moreover, to enable accented characters you'll
  add this line:



  (standard-display-european 1)



  I'll leave it to you to peruse all of emacs' documentation to find out
  how to tailor it to your needs---potentially, it can take months of
  hacking.  The Dotfile generator (Section ``Configuration Software'')
  is a good helping hand.



  4.5.  joe(1)


  Some versions of joe don't work with colours in console, and some
  special keys don't work either. A quick and dirty (and inelegant)
  solution to the former problem is this:



       ~$ export TERM=vt100
       ~$ joe myfile
          (edit your file)
       ~$ export TERM=linux



  To make the special keys work, all you have to do is edit .joerc,
  .jstarrc or your favourite emulation; you can start from the system-
  wide config files in /usr/lib/joe. Look for the fourth section (key
  bindings). This enables Home and End:



       bol ^[ [ 1 ~    Go to beginning of line
       eol ^[ [ 4 ~    Go to end of line



  Find out the desired ESC sequences typing cat followed by the special
  keys.



  4.6.  jed(1)


  This is my favourite editor: it does what I need, it's lighter and
  easier to configure than emacs, and emulates other editors quite well.
  Many users at my university use jed to emulate EDT, VMS' system
  editor.

  jed's configuration files are .jedrc and /usr/lib/jed/lib/*; the
  former can be adapted from jed.rc in the latter directory.


  o  to make jed use the special keys correctly, write the file
     /usr/lib/jed/lib/defaults.sl whose only line reads:



       () = evalfile("linux");

  o  if xjed apparently doesn't recognise the DEL key, add these lines
     to your .jedrc:



       #ifdef XWINDOWS
         x_set_keysym (0xFFFF, 0, "\e[3~");
         setkey (``delete_char_cmd'', "\e[3~");
       #endif



  o  edit /usr/lib/jed/lib/linux.sl to specify Info_Directory =
     "/usr/info"; and /bin/mail after /UCB_Mailer = "/bin/mail";;

  o  to make jed emulate EDT (or other editors) all you have to do is
     edit a couple of lines in .jedrc. If you want the numeric keypad
     `+' to delete words instead of a single character, add this in
     .jedrc:



       unsetkey("\eOl");
       unsetkey("\eOP\eOl");
       setkey("edt_wdel", "\eOl");
       setkey("edt_uwdel", "\eOP\eOl");



  after the line that reads () = evalfile("edt") (or similar);

  o  to make xjed use the numeric keypad for EDT emulation, insert the
     following in .Xmodmap:



       keycode 77  = KP_F1
       keycode 112 = KP_F2
       keycode 63  = KP_F3
       keycode 82  = KP_F4
       keycode 86  = KP_Separator



  o  colour customization for xjed is done adding lines like these in
     .Xdefaults:



       xjed*Geometry: 80x32+150+50
       xjed*font: 10x20
       xjed*background: midnight blue
       # and so on...



  o  the ``abbreviation'' feature is an invaluable timesaver. Write a
     file like the following as $HOME/.abbrevs.sl (you can change this
     name by inserting variable Abbrev_File = "/usr/lib/jed/abbrev.sl";
     in .jedrc):



       create_abbrev_table ("Global", "0-9A-Za-z");
       define_abbrev ("Global", "GG", "Guido Gonzato");
       create_abbrev_table ("TeX", "\\A-Za-z0-9");
       define_abbrev ("TeX", "\\beq", "\\begin{equation}");
       define_abbrev ("TeX", "\\eeq", "\\end{equation}");
       % and so on...



  and type ESC x abbrev_mode to enable it. To have the abbreviation
  enabled by default, add entries like these to your .jedrc:



       define text_mode_hook ()
       {
         set_abbrev_mode (1);
       }
       %
       define fortran_hook ()
       {
         set_abbrev_mode (1);
         use_abbrev_table ("Fortran");
       }
       % and so on...



  4.7.  pine(1)


  Edit the global configuration in /usr/lib/pine.conf, taking care at
  least of the following fields: user-domain, smtp-server, and nntp-
  server. Note that inbox-path depends on your MTA: if you use sendmail
  or postfix, that'll be var/spool/mail/$USER; with Qmail,
  /home/$USER/Mailbox (but root will use /var/qmail/alias/Mailbox.



  4.8.  minicom(1)


  Users can't use minicom unless a global configuration has been made by
  root. Remember to make it.



  4.9.  efax(1)


  This package is probably the most convenient for simple
  sending/receiving of faxes. You'll have to tailor the script
  /usr/bin/fax; easy job, but a couple of quirks caused me quite a
  headache:

  o  to find out whether your modem is class 1, 2, or 2.0, use minicom
     or similar program to issue the command at+fclass=?. The reply may
     be like 0,1,2; 1 and 2 are the classes supported by your modem;

  o  DIALPREFIX: chances are that simply putting `T' or `P' won't work
     in some countries (in Italy, at least). Put `ATDT' or `ATDP'
     instead;

  o  INIT and RESET: these strings contain the initialisers `-i' and
     `-k', needed by efax. If you want to add an AT command, add it to
     the appropriate string leaving out `AT' and preceding the rest with
     either `-i' or `-k'. Example: to add the `ATX3' command to INIT,
     you'll append `-iX3'.

  That done, there are a few permissions to fix to enable non-root users
  to send and receive faxes. The directories /var/lock and
  /var/spool/fax must be writable. To do so, create the group faxusers,
  add users to it, then type:



       ~# chown root.faxusers /var/lock
       ~# mkdir /var/spool/fax
       ~# chown root.faxusers /var/spool/fax; chmod g+w /var/spool/fax



  4.10.  Ghostscript


  This essential tool suffers from a small snag. Owing to to the well-
  known export regulations in the USA, the utility pdf2ps doesn't work
  on encrypted .pdf files. Never mind: turn your browser to
  <http://www.ozemail.com.au/~geoffk/pdfencrypt>, download the file
  pdf_sec.ps and put it in place of the file with the same name that
  comes with the distribution of Ghostscript.



  4.11.  TeX and Friends


  I'll assume you have the teTeX distribution.


  o  download additional LaTeX packages from your nearest CTAN mirror
     site, e.g.  <ftp://ftp.dante.de/pub/tex>. Add the files under
     /usr/share/texmf/tex/latex, then run the command texhash so that
     teTeX recognises the new package;

  o  to configure the hyphenation pattern for your language, edit the
     file /usr/share/texmf/tex/generic/config/language.dat, then do:



       ~# texconfig init ; texconfig hyphen



  o  to tailor dvips, the file to edit is
     /usr/share/texmf/dvips/config/config.ps. Be aware that the fields
     regarding the default resolution also affect xdvi's behaviour; if
     you experience annoying attempts to create fonts each time you run
     it, put the line



       XDvi*mfmode:



  in .Xdefault. This should help.

  o  to include PostScript figures that reside in subdirectories, you
     can expand TeX's search path to include subdirectories. Put this
     command in your .bash_profile:



       export TEXINPUTS="$HOME/figures::./figures"



  which makes TeX search in $HOME/figures before the default directo-
  ries, and ./figures after the default directories.



  4.12.  Avoid PPProblems!


  I'll take it for granted that your kernel has PPP + TCP/IP support
  compiled in, that loopback is enabled, and that you already have the
  pppd package correctly installed and, if you will, suid root.
  Obviously, your ISP must support PPP.

  There are now two ways to get PPP to work: a) manual configuration,
  and b) a configuration program that automagically sees to it.
  Whichever option you choose, have the following information on hand:


  o  your ISP's telephone number;

  o  your ISP's name, mail and news server address;

  o  your ISP's domain;

  o  your username and password.

  Manual configuration is a drudgery. It's about editing files and
  writing scripts; not too much work, but it's easy to make mistakes and
  newcomers are often intimidated. The PPP HOWTO is there for you.
  Alternatively, there are tools that ask for the information above and
  do all the work.

  Gnome and KDE include, respectively, gnome-ppp and kppp which are easy
  enough to set up. Alternatively, I suggest that you have a look at a
  couple of tty--based tools, wvdial and eznet.  You feed them your
  ISP's phone number, your username, your password, and you're in
  business. Their home pages are at
  <http://www.worldvisions.ca/wvdial> and
  <http://www.hwaci.com/sw/eznet>. Both are great, but I prefer the
  latter.
  4.12.1.  A Quick Start with eznet


  First of all, create an /etc/resolv.conf like this:



       nameserver w.x.y.z



  where you'll insert the address of your ISP's nameserver. To create an
  account with eznet, issue the following command:



       #~ eznet add service=YOUR_ISP user=NAME password=PASSWORD phone=PHONE



  which creates the file /var/eznet/eznet.conf, owned by root.root with
  permissions 600; chmod it to 666 if you want it to be world readable.
  Now dial your ISP with eznet up YOUR_ISP. If the modem keeps waiting
  for the dial tone and won't connect, then try this command:



       #~ eznet change YOUR_ISP init0=atx3



  To hang up, the command is eznet down. That's all!



  4.12.2.  A Quick Start with wvdial


  wvdial's setup is even shorter. Type wvdialconf /etc/wvdial.conf, then
  edit the resulting file to include your username, password, and phone
  number. Try it out with wvdial, and keep your fingers crossed. To hang
  up, stop it with Ctrl-C.



  4.13.  POP Client


  To retrieve your mail from a POP3 server, you use a POP client like
  fetchpop or fetchmail; the latter is more advanced, but requires that
  you run sendmail. This is a bit of an overkill on low-spec machines.
  They're available on
  <ftp://metalab.unc.edu/pub/Linux/system/mail/pop>.

  To configure these clients:


  o  fetchpop: the first time you run it, you'll be prompted for some
     information. Answer the questions and you're set. fetchpop must be
     used with the -r switch if your ISP's POP3 server doesn't implement
     the command LAST properly.


  o  fetchmail: adapt this sample .fetchmailrc:



       # $HOME/.fetchmailrc
       poll mbox.myisp.com with protocol pop3;
         user john there with password _Loo%ny is john here



  One user reported that adding ``smtphost localhost'' to the second
  line improved performance dramatically.

  You must set the permissions to this file with the command chmod 600
  .fetchmailrc, otherwise fetchmail will rightly refuse to start. This
  example is very basic; there are endless possibilities of configura-
  tion. Check out at  <http://www.ccil.org/~esr/fetchmail>.



  4.14.  X Window System (XFree86)



  4.14.1.  Setting Up the X Server


  Come on, it's not difficult as it used to be... All major
  distributions include a tool for setting up X11 (e.g.  XConfigurator,
  sax, XF86Setup, or at least xf86config). X configuration is virtually
  automatic these days, but a few video cards may refuse to work. Each
  time I experience problems setting up X on a system, I resort to a
  simple method that has always worked:


  o  make sure that the plain VGA server is installed;

  o  go to <ftp://ftp.XFree86.org/pub/XFree86/current/binaries>, cd to
     the proper Linux subdirectory, and download the archives
     X_version_bin.tgz, X_version_set.tgz, and all the servers.  Amongst
     other programs, the first archive contains the most up-to-date
     SuperProbe;

  o  unpack X_version_bin.tgz to a temporary directory, cd to it, and
     run ./SuperProbe. If your video card is recognised, chances are
     that you'll be able to set it up. Otherwise, hard luck;

  o  install the servers and X_version_set.tgz from /usr/X11R6/, then
     run XF86Setup.

  This has always worked for me, but your mileage may vary. Please note
  that most times X11 won't start because the specs you choose for your
  monitor were too high! Start with conservative settings, i.e. 800x600
  and 256 colours, then pump it up. Warning: these operations are
  dangerous and your monitor might be damaged!



  4.14.2.  Keypad


  We have seen above how to make a few special keys work. The sample
  file .Xmodmap works well if you want to use Xjed, but it makes the
  keypad unusable. You'll then need another config file, which we'll
  call .Xmodmap.num:



       ! Definitions can be found in <X11/keysymdef.h>

       keycode 77  = Num_Lock
       keycode 112 = KP_Divide
       keycode 63  = KP_Multiply
       keycode 82  = KP_Subtract
       keycode 86  = KP_Add
       keycode 79  = KP_7
       keycode 80  = KP_8
       keycode 81  = KP_9
       keycode 83  = KP_4
       keycode 84  = KP_5
       keycode 85  = KP_6
       keycode 87  = KP_1
       keycode 88  = KP_2
       keycode 89  = KP_3
       keycode 90  = KP_0
       keycode 91  = KP_Decimal



  Make sure that your /etc/X11/XF86Config does not contain these three
  lines:



         ServerNumLock
         Xleds
         XkbDisable



  and in case, comment them out. To re-enable the keypad, you'll issue
  the command xmodmap .Xmodmap.num.



  4.14.3.  Graphical Login with xdm


  To be greeted by a graphical login, edit the file /etc/inittab, which
  should include a line like this:



       x:5:respawn:/usr/bin/X11/xdm -nodaemon



  where 5 is the runlevel corresponding to X11 (S.u.S.E. uses 4). Modify
  the line that defines the default runlevel (usually 2 or 3), changing
  it as above:



       id:5:initdefault:



  The number of colours is specified in /etc/X11/xdm/Xserver:



       :0 local /usr/X11R6/bin/X :0 -bpp 16 vt07  # first X server, 65k colours
       :1 local /usr/X11R6/bin/X :1 -bpp 32 vt08  # second X server, true colour



  If you already have .xinitrc, copy it to .xsession and make the latter
  executable with chmod +x .xsession. Now issue the command telinit 5
  and you're in business.



  4.14.4.  Window Manager


  Once X works, there are endless possibilities of configuration; it
  depends on the window manager you use, there are tens to choose from.
  Mostly, it's all down to editing one or more ASCII files in your home
  directory; in other cases you don't have to edit a thing, and use an
  applet or even a menu.

  Some examples:


  o  the fvwm family: copy /etc/X11/fvwm/system.fvwmrc (or similar) to
     your home using the appropriate name, browse it and start
     experimenting. You may waste a lot of time before you get the
     precise look and feel you like;

  o  WindowMaker: it has several config files that live under
     $HOME/GNUstep, and a cool configuration applet;

  o  KDE and Gnome: nothing to edit manually here: everything can be
     done via the menu.

  In short: if you don't mind editing config file, choose something like
  icewm, fvwm*, blackbox etc; if you do mind, the choice is currently
  restricted to KDE, Gnome, WindowMaker, and XFCE.

  It's important to have a good .xinitrc. An example:



  #!/bin/sh
  # $HOME/.xinitrc

  usermodmap=$HOME/.Xmodmap
  xmodmap $usermodmap

  xset s noblank  # turn off the screen saver
  xset s 300 2    # screen saver start after 5 min
  xset m 10 5     # set mouse acceleration

  rxvt -cr green -ls -bg black -fg white -fn 7x14 \
    -geometry 80x30+57+0 &

  if [ "$1" = "" ] ; then  # default
    WINMGR=wmaker
  else
    WINMGR=$1
  fi

  $WINMGR



  Although it doesn't appear to be strictly required, make it executable
  with chmod +x .xinitrc.

  This .xinitrc lets you choose the window manager: try


       $ startx startkde # or other w.m.



  (it doesn't work with some S.u.S.E. versions, though).



  4.14.5.  Defaults for X11 Apps


  Find out where the app-defaults directory is (it should be
  /usr/X11R6/lib/X11/app-defaults). Several apps keep a configuration
  file there.



  4.15.  Users' Configurations


  When you're done editing the dot files, copy them to /etc/skel as seen
  in Section ``Software Configuration''.



  4.16.  Making .rpms


  rpm is such a wonderful method of keeping packages under control that
  I'm reluctant to install .tar.gz archives but in very few special
  cases (e.g., security). Whenever you install a tarball, consider
  turning it into an .rpm archive, then reinstall it; consult the RPM
  HOWTO. Also, if you use modern gcc versions like egcs or pgcc, it may
  be advisable to put this in your /etc/rpmrc:

       optflags: i386 -O2 -mpentium



  4.17.  Upgrading


  If you upgrade your machine, do your backup as usual and remember to
  save a few additional files. Some could be /etc/X11/XF86Config,
  /usr/bin/fax, all the stuff in /usr/local, the kernel configuration,
  the whole /etc, and all the mail in /var/spool/mail.

  Then it's time to upgrade (in rare cases, downgrade!) applications
  that your distribution ship with, and to add additional packages. Keep
  a list of these ones.



  5.  Configuration Software


  There are several programs that make Linux easy to setup and
  configure. Some are becoming sort of standard: Red Hat, Caldera and
  other distributions ship with apps like setup, printtool, netcfg,
  usertool, etc, while S.u.S.E. ships with a comprehensive configuration
  program called Yast. Other useful programs are:


  o  The Dotfile Generator: fine X app with modules to configure
     packages like emacs, bash, procmail and more. Its page is at
     <http://www.imada.ou.dk/~blackie/dotfile>;

  o  Linuxconf: the ultimate configuration tool. It can do everything,
     both in console and under X. Go to
     <http://www.solucorp.qc.ca/linuxconf> at once.



  6.  The End



  6.1.  Copyright


  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at  <linux-howto@metalab.unc.edu> via email.



  6.2.  Feedback


  Perhaps even more than other HOWTOs, this one needs and welcomes your
  suggestions, criticisms, and contributions. Not only is feedback
  welcome: it's necessary. If you think something is missing or wrong,
  please email me.  If you have a distribution other than Red
  Hat/Mandrake and your config files are different or placed in other
  directories, please tell me and I'll include your tips. My aim is
  making life with Linux as easy as possible.

  Linux has a huge number of packages, so it's impossible to include
  directions for all of them. Please keep your requests/suggestions
  pertinent to the ``most reasonable'' programs---I'll leave it to your
  common sense.



  6.3.  Disclaimer


  ``Configuration HOWTO'' was written by Guido Gonzato,
  <REMOVE_MEguido@ibogeo.df.unibo.it>. (Remove ``REMOVE_ME''.)  Many
  thanks to all other HOWTO authors and man pages writers/maintainers,
  whose work I've shamelessly pilfered; and to all people who provided
  me with feedback.

  This document is provided ``as is''. I put great effort into writing
  it as accurately as I could, but you use the information contained in
  it at your own risk. In no event shall I be liable for any damages
  resulting from the use of this work.

  I hope you'll find this work useful, though. Whenever I install a new
  Linux box, I actually do...

  Enjoy,

  Guido   =8-)



  Linux Consultants HOWTO
  Mr. Poet <poet@linuxports.com>
  v9.46, 12 September 1999

  This document contains a listing of companies providing commercial
  Linux related support.  If you want to find a Linux consultant or con-
  sulting firm in your area, this listing will probably be of help for
  you.  It is maintained by Poet poet@linuxports.com.

  This document is also completely indexed, databased and searchable at
  the LinuxPorts website. If you would like information on advertising
  on the Consultants database pages please contact us at
  poet@linuxports.com.



  Note to the reader:

  Please send comments to Mr. Poet poet@linuxports.com.

  Mr. Poet


  About this document


  This is the Linux Consultants HOWTO. It is a listing of companies
  providing commercial Linux related support.  If you contact any
  companies listed in this document, please mention the Linux
  Consultants HOWTO.

  If you need to know more about the Linux Documentation Project or
  about Linux HOWTO's, feel free to contact the Coordinator Tim Bynum
  linux-howto@metalab.unc.edu.


  Linux Consultants HOWTO can be found on the World Wide Web at
  http://www.linuxports.com/.  New versions of the Linux Consultants
  HOWTO are always placed at this site first, so please be sure to check
  if the copy you are reading is still up to date!

  This site also contains all information needed to submit to this howto
  or search this howto via a database.

  Companies providing Linux support are invited to fill out the form at
  LinuxPorts Please note that we have temporarily stopped accepting
  8-bit characters (German umlauts, etc).



  Copyright Information

  This HOWTO is Copyright (C) 1999 Mr. Poet and LinuxPorts

  A verbatim copy may be reproduced or distributed in any electronic
  medium without permission of the author. Physical medium copies,
  reproductions or distributions for commercial use must have explicit
  permission of the author.  Translations are similarly permitted
  without express permission if it includes a notice on who translated
  it.

  Short quotes may be used without prior consent by the author.
  Derivative work and partial distributions of the Linux Consultants
  HOWTO must be accompanied with either a verbatim copy of this file or
  a pointer to the verbatim copy.

  Commercial redistribution is allowed and encouraged; however, the
  author must be notified of any such distributions and all copyright
  information must be intact.

  In short, we wish to promote dissemination of this information through
  as many channels as possible.  However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  We further want that all information provided in the HOWTOs is
  disseminated.  If you have questions, please contact Tim Bynum, the
  Linux HOWTO coordinator, at linux-howto@metalab.unc.edu.


  1.  Consultant Listings

  1.1.  Consultant ID: Argentina, BASystem



       Manuel ugarte 2328
       Buenos Aires, NON United States 1428

       Argentina



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        RedHat Not Applicable



     Company Phone Number:
        54-11 4781-9710


     Company Fax:
        54-11 4789-9228


     Support Phone Number:
        54-11 4781-9710

     Contact Email Address:
        clau@basystem.com.ar

     Company URL:
        http://www.basystem.com.ar

     Primary Contact:
        Norberto Mayo



  1.2.  Consultant ID: Argentina, CompuSoft



       Drago 23, Piso 5, Oficina 12
       Bahia Blanca, NON United States 8000

       Argentina



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Not_Applicable
     Company Phone Number:
        +54(291) 455-3570


     Company Fax:
        +54(291) 453-6735


     Support Phone Number:
        +54(291) 15 648-9284

     Contact Email Address:
        goburastero@arnet.com.ar

     Company URL:
        http://www.arnet.com.ar

     Primary Contact:
        Guillermo Burastero



  1.3.  Consultant ID: Argentina, CyberWare Information Technology



       Zeballos 2774
       Rosario, NON United States 2000

       Argentina



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable


     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (54)(0341) 156-40-14


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        soporte@cyberware.com.ar

     Company URL:
        http://www.cyberware.com.ar

     Primary Contact:
        Javier  Kohan



  1.4.  Consultant ID: Argentina, Generic Soft



       Defensa 767 ofic. 20
       Buenos Aires, NON United States 1065

       Argentina



     Consulting Specialties:
        CIFS (Samba) Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        5411-4300-7294


     Company Fax:
        5411-4300-7294


     Support Phone Number:
        5411-4300-7294

     Contact Email Address:
        soporte@generic.findhere.com

     Company URL:
        http://generic.findhere.com

     Primary Contact:
        Pablo Lazaro



  1.5.  Consultant ID: Argentina, Jorge Forte



       Calle 47 Nro 826 Dep 9
       La Plata, NON United States 1900

       Argentina



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        542214821914


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        soporte@forte.com.ar

     Company URL:
        http://www.forte.com.ar

     Primary Contact:
        Jorge Forte



  1.6.  Consultant ID: Argentina, NIXE S.R.L.



       Pte. Luis S. Pea 366 4 A
       Buenos Aires, NON United States 1110

       Argentina



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +54 (11) 4383-7831


     Company Fax:
        +54 (11) 4383-7831


     Support Phone Number:
        +54 (11) 15-4444-832

     Contact Email Address:
        support@nixe.com.ar

     Company URL:
        http://www.nixe.com.ar

     Primary Contact:
        Gustavo Gasparrini



  1.7.  Consultant ID: Argentina, Nixe S.R.L.



       Pte. Luis Saenz Pe#a 366 4A
       Buenos Aires, NON United States 1110

       Argentina



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Slackware
     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +54 (11) 4383-7831


     Company Fax:
        +54 (11) 4383-7831


     Support Phone Number:
        +54 (11) 4383-7831

     Contact Email Address:
        support@nixe.com.ar

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Gustavo Gasparrini



  1.8.  Consultant ID: Australia, Computer Clinic (WA) Pty Ltd



       4/226 Main St Osborne Park
       Perth WA, NON United States 6017

       Australia



     Consulting Specialties:
        Custom Systems



     Main Distribution:
        Caldera


     Other Distribution:
        NA

     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        Caldera



     Company Phone Number:
        08 94406611


     Company Fax:
        08 94406610


     Support Phone Number:
        08 94406611

     Contact Email Address:
        support@cclinic.com.au

     Company URL:
        http://www.cclinic.com.au

     Primary Contact:
        Colin or Garth Hewitt or Atkinson



  1.9.  Consultant ID: Australia, Cybersource Pty. Ltd.



       Level 8, 140 Queen Street
       Melbourne, NON United States 3000

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat

     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        +61 3 9642 5997


     Company Fax:
        +61 3 9642 5998


     Support Phone Number:
        +61 3 9642 5997

     Contact Email Address:
        rh-support@cyber.com.au

     Company URL:
        http://www.cyber.com.au

     Primary Contact:
        Con Zymaris



  1.10.  Consultant ID: Australia, Cyberspace Corporation



       3A/426 Burwood Highway
       Melbourne, NON United States 3152

       Australia



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking


     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61 (3) 9887 4700


     Company Fax:
        +61 (3) 9887 2756


     Support Phone Number:
        +61 (3) 9887 4700

     Contact Email Address:
        support@cyberspace.net.au

     Company URL:
        http://www.cyberspace.net.au

     Primary Contact:
        Keith Chamberlain



  1.11.  Consultant ID: Australia, DataSource Pty. Ltd



       Not_Applicable
       SYDNEY, NON United States 2570

       Australia



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61418675892


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +6146556792

     Contact Email Address:
        Linux@sysmon.net

     Company URL:
        http://www.sysmon.net

     Primary Contact:
        Steve Deadman



  1.12.  Consultant ID: Australia, EMUSYS Unix Consulting



       20 Ivanhoe Rd
       Croydon, NON United States 2132

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61 2 9798 7604


     Company Fax:
        +61 2 9798 2854


     Support Phone Number:
        0500 500 EMU

     Contact Email Address:
        support@emusys.com.au

     Company URL:
        http://www.emusys.com.au

     Primary Contact:
        Anthony Rumble



  1.13.  Consultant ID: Australia, Echo Labs



  29 Weld St, Nedlands
  Perth, NON United States 6009

  Australia



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61 41 356 0008


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        echo@iinet.net.au

     Company URL:
        http://www.iinet.net.au/~echo

     Primary Contact:
        Ralph Billes



  1.14.  Consultant ID: Australia, Farrow Norris



       58 St Georges Pde
       Sydney, NON United States 2220

       Australia



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet (Web) Programming Network
        Administration System Administration Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61 4 1724 3183


     Company Fax:
        +61 2 9546 4468


     Support Phone Number:
        +61 4 1724 3183

     Contact Email Address:
        support@fn.com.au

     Company URL:
        http://http://www.fn.com.au/

     Primary Contact:
        James Farrow
  1.15.  Consultant ID: Australia, Hinterlands Consultancy I.T.



       1 Crusader Rd
       Galston NSW., NON United States 2159

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Intel and Alpha


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61 2 9653 2837


     Company Fax:
        +61 2 9653 2937


     Support Phone Number:
        +61 2 9653 2837

     Contact Email Address:
        support@hinterlands.com.au

     Company URL:
        http://www.hinterlands.com.au

     Primary Contact:
        Chris Blown
  1.16.  Consultant ID: Australia, Informed Technology Pty Ltd



       136/138 Railway Pde
       West Leederville, NON United States 6007

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Debian Sparc


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61-8-9380-4244


     Company Fax:
        +61-8-9380-4354


     Support Phone Number:
        +61-8-9380-4244

     Contact Email Address:
        support@it.net.au

     Company URL:
        http://www.it.net.au


     Primary Contact:
        Andrew Howell



  1.17.  Consultant ID: Australia, John Pearson



       PO Box 3412 Rundle Mall
       Adelaide, NON United States 5000

       Australia



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61 407391169


     Company Fax:
        +61 883644231


     Support Phone Number:
        +61 407391169

     Contact Email Address:
        huiac@camtech.net.au
     Company URL:
        http://Not_Applicable

     Primary Contact:
        John Pearson



  1.18.  Consultant ID: Australia, LINSUP.COM



       P. O. Box 689
       St. Ives, NON United States 2075

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Debian


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61 2 9144-6131


     Company Fax:
        +61 2 9144-6138



     Support Phone Number:
        +61 2 9144-6131

     Contact Email Address:
        info@linsup.com

     Company URL:
        http://www.linsup.com

     Primary Contact:
        Richard Ames



  1.19.  Consultant ID: Australia, Linux Garden



       Unit 4, 142 Culloden Road, Marsfield
       Sydney, NSW, NON United States 2122

       Australia



     Consulting Specialties:
        Custom Programming Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        61 0417 869242



     Company Fax:
        Not_Applicable


     Support Phone Number:
        61 0417 869242

     Contact Email Address:
        shyam@linuxgarden.com

     Company URL:
        http://www.linuxgarden.com

     Primary Contact:
        Shyam Govardhan



  1.20.  Consultant ID: Australia, Studio of Arts And Sciences (SAAS)



       PO Box 214 Mosman
       Sydney, NON United States NSW 2088

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Darwin and all MAC


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        +61-2-9453-9100


     Company Fax:
        +61-2-9453-9101


     Support Phone Number:
        +61-2-9453-9100

     Contact Email Address:
        saas@saas.nsw.edu.au

     Company URL:
        http://www.saas.nsw.edu.au

     Primary Contact:
        Roger Buck



  1.21.  Consultant ID: Australia, Sydnet Group Pty Ltd



       PO Box 4664
       North Rocks, NON United States 2151

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61 2 9873 6400


     Company Fax:
        +61 2 9873 6411


     Support Phone Number:
        +61 2 9873 6400

     Contact Email Address:
        support@syd.net.au

     Company URL:
        http://www.syd.net.au

     Primary Contact:
        Mark Lipscombe



  1.22.  Consultant ID: Australia, TereDonn Computer Engineering



       Suite 1, 128 Bowen St, Spring Hill
       BRISBANE, ZZ 4004

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        ALL


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61 7 32369366


     Company Fax:
        +61 7 32369930


     Support Phone Number:
        +61 414 663053

     Contact Email Address:
        service@tdce.com.au

     Company URL:
        http://www.tdce.com.au

     Primary Contact:
        Terence Giufre-Sweetser



  1.23.  Consultant ID: Australia, WWWalker Web Development



       PO Box 288
       Wentworthville, NON United States 2145

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        61-412-405-727


     Company Fax:
        61-2-97772058


     Support Phone Number:
        61-412-405727

     Contact Email Address:
        dwight@zip.com.au

     Company URL:
        http://www.wwwalker.com.au

     Primary Contact:
        Dwight Walker



  1.24.  Consultant ID: Australia, Win International Networking



       Lisle Street
       Mount Claremont, NON United States 6010

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Mandrake
     Specialty Distribution:
        Other


     Other Specialty Distribution:
        various/hand tooled


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +61-409-65535-9


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +61-409-65535-9

     Contact Email Address:
        leon@brooks.smileys.net

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Leon Brooks



  1.25.  Consultant ID: Australia, linsup.com



       P. O. Box 689
       St. Ives, NON United States 2075

       Australia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat
     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        61 2 9144-6131


     Company Fax:
        61 2 9144-6138


     Support Phone Number:
        61 2 9144-6131

     Contact Email Address:
        info@linsup.com

     Company URL:
        http://www.linsup.com

     Primary Contact:
        Richard Ames



  1.26.  Consultant ID: Austria, Bernhard Zwischenbrugger



       Lerchenfeldestrasse 88-90/17
       Vienna, NON United States 1080

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        System Administration System Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        auto install one dis


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +43/1/4022752


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        bzwische@email.archlab.tuwien.ac.at

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Bernhard Zwischenbrugger



  1.27.  Consultant ID: Austria, Bitsniz Data Systems



       Kreuzgasse 60
       Vienna, NON United States A-1180

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +43-(0)1-4065098


     Company Fax:
        +43-(0)1-4065098-99


     Support Phone Number:
        +43-(0)1-4065098-20

     Contact Email Address:
        office@bitsniz.at

     Company URL:
        http://www.bitsniz.at

     Primary Contact:
        Franz  Antonicek



  1.28.  Consultant ID: Austria, Dialog Data GmbH



       Steyrergasse 76
       Graz, NON United States A-8010

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +43(316)810091


     Company Fax:
        +43(316)826348


     Support Phone Number:
        +43(316)810091

     Contact Email Address:
        support@dialogdata.com

     Company URL:
        http://www.dialogdata.com/

     Primary Contact:
        Norbert Friesl



  1.29.  Consultant ID: Austria, EDV-Beratung F.Ganter



  Liebiggasse 19
  Graz, NON United States A-8010

  Austria



     Consulting Specialties:
        Custom Systems Firewalls and Internet Security Internet (Web)
        Programming System Administration



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +43 699 110 21 621


     Company Fax:
        +43 699 310 21 621


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        ganter@ganter.at

     Company URL:
        http://www.ganter.at

     Primary Contact:
        Fritz Ganter



  1.30.  Consultant ID: Austria, Horus GmbH



       Jakob-Haringer-Strae 8
       Salzburg, NON United States A-5020

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +43 (0)662 450363-0


     Company Fax:
        +43 (0)662 450363-30


     Support Phone Number:
        +43 (0)662 450363-0

     Contact Email Address:
        info@horus.com

     Company URL:
        http://www.horus.com

     Primary Contact:
        Thomas 'Dune' Freina


  1.31.  Consultant ID: Austria, LINUX@work



       Hauptstr. 99
       Hagenberg, NON United States 4232

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Netware
        Connectivity Network Administration System Administration



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +43 7236 2200


     Company Fax:
        +43 7236 2200 22


     Support Phone Number:
        +43 7236 2200 13

     Contact Email Address:
        support@linuxatwork.at

     Company URL:
        http://www.linuxatwork.at

     Primary Contact:
        Andreas Hupfau
  1.32.  Consultant ID: Austria, LinzNet



       Floetzerweg 150
       Linz, NON United States 4030

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration Virtual
        Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +43 732 370700


     Company Fax:
        +43 732 376554


     Support Phone Number:
        +43 732 370700

     Contact Email Address:
        support@linznet.at

     Company URL:
        http://www.linznet.at


     Primary Contact:
        Rainer Skarke



  1.33.  Consultant ID: Austria, M.T.G. Handelsges.m.b.H.



       Raiffeisenstr. 16/9
       Zwlfaxing, NON United States 2320

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        custom distributions


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +43/676/4091256


     Company Fax:
        +43/1/7065299


     Support Phone Number:
        +43/1/7070750


     Contact Email Address:
        office@mtg.co.at

     Company URL:
        http://https://www.mtg.co.at/

     Primary Contact:
        Andreas Kostyrka



  1.34.  Consultant ID: Austria, PSI Providing Services for the Internet



       Htteldorfer Strae 193/24
       Wien, NON United States 1140

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Suse


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +43-1-9117757


     Company Fax:
        +43-1-9117757
     Support Phone Number:
        +43-1-9117757

     Contact Email Address:
        info@psi.co.at

     Company URL:
        http://www.psi.co.at

     Primary Contact:
        Raphael Wegmann



  1.35.  Consultant ID: Austria, communication.center.one



       Hetzendorfer Str.23/20
       Vienna, ZZ A-1120

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +43-1-8045753


     Company Fax:
        +43-1-8031553


     Support Phone Number:
        +43-676-477-70-70

     Contact Email Address:
        support@ccone.at

     Company URL:
        http://www.ccone.at

     Primary Contact:
        Gerhard Beck



  1.36.  Consultant ID: Austria, g.a.m.s. edv-dienstleistungen gmbh



       Stiegergasse 15-17/8
       Vienna, NON United States 1150

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        +43 1 895 84 99


     Company Fax:
        +43 1 895 84 99 60


     Support Phone Number:
        +43 1 895 84 99

     Contact Email Address:
        linux@gams.at

     Company URL:
        http://www.gams.at

     Primary Contact:
        Andreas Kainz



  1.37.  Consultant ID: Austria, iDAS



       Gasgasse 13/5
       Vienna, NON United States A-1150

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Systems Internet (Web) Programming Network
        Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable

     Company Phone Number:
        ++43-664-2630131


     Company Fax:
        ++43-1-8939122-26


     Support Phone Number:
        ++43-664-2630131

     Contact Email Address:
        office@iDAS.co.at

     Company URL:
        http://www.iDAS.co.at

     Primary Contact:
        Thomas Kirchtag



  1.38.  Consultant ID: Austria, xS+S



       Karmarschgasse 51/2/20
       Wien, NON United States A-1100

       Austria



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Network
        Administration System Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        xS+S Linux


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        xS+S Linux


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +43 1 6060114 0


     Company Fax:
        +43 1 6060114 71


     Support Phone Number:
        +43 1 6060114 10

     Contact Email Address:
        support@xss.co.at

     Company URL:
        http://www.xss.co.at

     Primary Contact:
        Andreas Haumer



  1.39.  Consultant ID: Bangladesh, Information Services Network Limited



       52, New Eskaton Road TMC Building(3rd & 4th Floor)
       Dhaka, NON United States 1000

       Bangladesh



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        8802842785


     Company Fax:
        88029345460


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.bangla.net

     Primary Contact:
        Sumon Ahmed Sabir



  1.40.  Consultant ID: Belgium, Alexandre Dulaunoy, Consultance Open-
  Source



       4, rue d'Aineffe
       Borlez Faimes, NON United States 4317

       Belgium



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other
     Other Specialty Distribution:
        self-made


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        3219566115


     Company Fax:
        3219567337


     Support Phone Number:
        3219566115

     Contact Email Address:
        adulau@unix.be.eu.org

     Company URL:
        http://http://unix.be.eu.org/adulau

     Primary Contact:
        Alexandre Dulaunoy



  1.41.  Consultant ID: Belgium, BARTH Group's



       12, rue de l'Espoir
       Lige, NON United States 4030

       Belgium



     Consulting Specialties:
        Custom Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC
     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        32 4 367.49.16


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        BARTH.groups@skynet.be

     Company URL:
        http://www.skynet.be

     Primary Contact:
        Wathelet Michel



  1.42.  Consultant ID: Belgium, Better Access NV



       Geldenaakse Vest 6
       Leuven, NON United States 3000

       Belgium



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Caldera

     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Custombuilt Linux So


     Reseller Authorizations:
        Compaq HP Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +32 16 29 80 45


     Company Fax:
        +32 16 29 80 46


     Support Phone Number:
        +32 16 29 80 45

     Contact Email Address:
        info@ba.be

     Company URL:
        http://www.ba.be

     Primary Contact:
        Jan Guldentops



  1.43.  Consultant ID: Belgium, CompuSense bvba



       Mr Vorsselmanslaan 27
       Kalmthout, NON United States B 2920

       Belgium



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security System
        Administration System Security



     Main Distribution:
        RedHat



     Other Distribution:
        SuSe


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        Sparc Linux


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +32 75 503503


     Company Fax:
        +32 3 6666579


     Support Phone Number:
        +32 75 503503

     Contact Email Address:
        herman.willekens@skynet.be

     Company URL:
        http://www.skynet.be

     Primary Contact:
        Herman Willekens



  1.44.  Consultant ID: Belgium, CoolNet



       rue Croix Claire 67
       NANDRIN, NON United States 4550

       Belgium



     Consulting Specialties:
        Custom Programming E-Commerce Firewalls and Internet Security
        Internet Server Development Network Administration



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +32 75 93 51 71


     Company Fax:
        +32 4 372 01 38


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        marc.brocha@coolnet.be

     Company URL:
        http://www.coolnet.be

     Primary Contact:
        marc brocha Not_Applicable



  1.45.  Consultant ID: Belgium, Double Barrel Consultancy & Productions



       Sportstraat 28
       Gent, ZZ 9000

       Belgium



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +32-9-2227764


     Company Fax:
        +32-9-2224976


     Support Phone Number:
        +32-9-2227764

     Contact Email Address:
        help@double-barrel.be

     Company URL:
        http://www.double-barrel.be

     Primary Contact:
        Michael Vergallen



  1.46.  Consultant ID: Belgium, FD Informatica Consulting



       Merellaan 42
       Kapellen, NON United States B2950

       Belgium



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +32 (75) 96 04 93


     Company Fax:
        +32 (3) 605 10 56


     Support Phone Number:
        (only on request)

     Contact Email Address:
        support@denkens.com

     Company URL:
        http://www.denkens.com

     Primary Contact:
        Frederik Denkens



  1.47.  Consultant ID: Belgium, SPIER bvba



       Knaptandstraat 96
       Sint-Niklaas, NON United States B9100

       Belgium

     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        + 32 3 765 90 61


     Company Fax:
        + 32 3 765 90 62


     Support Phone Number:
        + 32 3 765 90 61

     Contact Email Address:
        support@spier.be

     Company URL:
        http://www.spier.be

     Primary Contact:
        Jan Lybeert



  1.48.  Consultant ID: Belgium, VirgoPlus



       Rue Dartois, 1
       Lige, NON United States 4000

       Belgium

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +32-4-253 00 59


     Company Fax:
        +32-4-253 00 49


     Support Phone Number:
        +32-4-253 00 85

     Contact Email Address:
        bruno@virgoplus.com

     Company URL:
        http://www.virgoplus.com

     Primary Contact:
        Christophe Ozer



  1.49.  Consultant ID: Belgium, information technology partners



  Klokhof 2
  Heusden-Zolder, NON United States 3550

  Belgium



     Consulting Specialties:
        E-Commerce Internet Server Development Internet (Web)
        Programming Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        Suse/Caldera


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +32 11 53 77 53


     Company Fax:
        +32 11 53 77 17


     Support Phone Number:
        +32 11 53 77 53

     Contact Email Address:
        guy.dillen@skynet.be

     Company URL:
        http://www.skynet.be

     Primary Contact:
        Guy Dillen



  1.50.  Consultant ID: Brazil, 4Web Internet



       R. James Watt, 142 - Cj 42
       Sao Paulo, NON United States 04576-050

       Brazil



     Consulting Specialties:
        E-Commerce Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        55-11-5506-6844


     Company Fax:
        55-11-5506-6844


     Support Phone Number:
        55-11-5506-6844

     Contact Email Address:
        esaito@4web.com.br

     Company URL:
        http://www.4web.com.br

     Primary Contact:
        Eduardo Saito
  1.51.  Consultant ID: Brazil, Abner Graham Jacobsen



       Rua Bruno Becacici, 107
       Vitoria, NON United States 29042-0320

       Brazil



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Netware
        Connectivity Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Conectiva


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        55 027 322-1837


     Company Fax:
        55 027 223-0562


     Support Phone Number:
        Not Available

     Contact Email Address:
        ajacobsen@interlink.com.br

     Company URL:
        http://www.interlink.com.br

     Primary Contact:
        Not_Applicable Not_Applicable
  1.52.  Consultant ID: Brazil, Dextra Solucoes em Informatica



       Av Jose Souza Campos 1815/1205
       Campinas, NON United States 13025-320

       Brazil



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +55-19-251-3644


     Company Fax:
        +55-19-253-3742


     Support Phone Number:
        NA

     Contact Email Address:
        consultoria@dextra.com.br

     Company URL:
        http://www.dextra.com.br

     Primary Contact:
        Bill Coutinho
  1.53.  Consultant ID: Brazil, Dextra Solucoes



       Av J Souza Campos 1815 cj 1205
       Campinas, NON United States 13025-320

       Brazil



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        55 19 251-3644


     Company Fax:
        55 19 253-3742


     Support Phone Number:
        55 19 251-3644

     Contact Email Address:
        consultoria@dextra.com.br

     Company URL:
        http://www.dextra.com.br

     Primary Contact:
        Bill Coutinho
  1.54.  Consultant ID: Brazil, Fernando Mauro Martins



       Rua Padre Justino, 44
       So Paulo, NON United States 05580-090

       Brazil



     Consulting Specialties:
        Custom Programming



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        none


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +55 11 814-5679


     Company Fax:
        na


     Support Phone Number:
        +55 11 814-5679

     Contact Email Address:
        lalo@webcom.com

     Company URL:
        http://www.webcom.com

     Primary Contact:
        Fernando Martins


  1.55.  Consultant ID: Brazil, INFOX Sistemas e Computadores Ltda



       Rua Boquim, 97 - 1. andar
       Aracaju, NON United States 49.010-280

       Brazil



     Consulting Specialties:
        System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        55-79-211-5122


     Company Fax:
        55-79-211-0783


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        infox@infox.com.br

     Company URL:
        http://www.infox.com.br

     Primary Contact:
        Fred Silva


  1.56.  Consultant ID: Brazil, Kernel LinuxRO



       Rua Jacaranda, 910 - Fundos
       Porto Velho, NON United States 78912-570

       Brazil



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        CONECTIVA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +55699844175


     Company Fax:
        +55692273741


     Support Phone Number:
        +55699844175

     Contact Email Address:
        jbs@portovelho.br

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Joao Silva
  1.57.  Consultant ID: Brazil, Lumina Informatica Ltda



       Caixa Postal 1393
       Blumenau, NON United States 89010-971

       Brazil



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet (Web) Programming Network
        Administration System Administration Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +55 47 329-0065


     Company Fax:
        +55 47 329-0091


     Support Phone Number:
        +55 47 329-0065

     Contact Email Address:
        lumina@luminainfo.com.br

     Company URL:
        http://www.luminainfo.com.br

     Primary Contact:
        Odilon Mader Netto
  1.58.  Consultant ID: Brazil, Millennium Consultoria e Informtica
  Ltda.



       758, R. Francisco Parolin
       Curitiba, NON United States 80.220-360

       Brazil



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +55-41-333-5645


     Company Fax:
        +55-41-333-5645


     Support Phone Number:
        +55-41-913-2316 / +5

     Contact Email Address:
        millennium@millennium.etc.br

     Company URL:
        http://www.millennium.etc.br


     Primary Contact:
        Andr A. C. Santos



  1.59.  Consultant ID: Brazil, Onlinet Com. Serv. de Informtica Ltda.



       R. Par, 35 - Cid, Industrial
       Lorena, NON United States 12600-000

       Brazil



     Consulting Specialties:
        Internet Server Development



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +55 (012) 553-1234


     Company Fax:
        +55 (012) 553-2568


     Support Phone Number:
        +55 (012) 553-1234

     Contact Email Address:
        suporte@onlinet.com.br


     Company URL:
        http://www.onlinet.com.br

     Primary Contact:
        Denys Sene



  1.60.  Consultant ID: Brazil, Pragana, Filhos E Cia Ltda



       CxPostal 721 CDC Aldeia
       Camaragibe, NON United States 54792-990

       Brazil



     Consulting Specialties:
        Custom Programming



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        55-81-459-1776


     Company Fax:
        55-81-459-1776


     Support Phone Number:
        Not_Applicable


     Contact Email Address:
        rpragana@acm.org

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Rildo Pragana



  1.61.  Consultant ID: Brazil, Rodrigo Barbosa



       Phone or e-mail contact prefered
       Santa Rita do Sapucai, NON United States 37540-000

       Brazil



     Consulting Specialties:
        CIFS (Samba) Internet Server Development Internet (Web)
        Programming Network Administration System Administration Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        55-35-9982-0006


     Company Fax:
        Not_Applicable

     Support Phone Number:
        55-35-9982-0006

     Contact Email Address:
        rodrigob@linuxbr.com.br

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Rodrigo Barbosa



  1.62.  Consultant ID: Brazil, TELEMATICA Coml. de Teleinformtica Ltda.



       R. Princesa Isabel, 211
       Pelotas, NON United States 96015-590

       Brazil



     Consulting Specialties:
        CIFS (Samba) Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        Other


     Other Distribution:
        Conectiva Linux


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +55 532 27-7266


     Company Fax:
        +55 532 27-7972


     Support Phone Number:
        +55 532 27-7266

     Contact Email Address:
        telematica@conesul.com.br

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Vagner Farias



  1.63.  Consultant ID: Brazil, VisualBook



       161, Hipolito da Costa
       Rio de Janeiro, NON United States 20551040

       Brazil



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        55021-8720623


     Company Fax:
        55021-872-0576


     Support Phone Number:
        55021-2040333

     Contact Email Address:
        vb@visualbook.com.br

     Company URL:
        http://www.visualbook.com.br

     Primary Contact:
        Luiz Medeiros



  1.64.  Consultant ID: Brazil, aIPiWorks Network Consulting



       R. Conceicao 233, Sala 1514, Ed. Centro Emp. ENCOL
       Campinas, NON United States 13010-000

       Brazil



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Other


     Other Distribution:
        RedHat / Mandrake /


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Mandrake / RedHat


     Reseller Authorizations:
        Not Applicable


     Linux Certifications:
        Not Applicable



     Company Phone Number:
        055-19-2281876


     Company Fax:
        055-19-2281876


     Support Phone Number:
        055-019-2281876

     Contact Email Address:
        info@aipiworks.com.br

     Company URL:
        http://www.aipiworks.com.br

     Primary Contact:
        Mario R. Williams



  1.65.  Consultant ID: Brazil, iSNet Servios de Informatica



       Av. Othon Gama d'Ea, 900/704
       Florianopolis, NON United States 88015-240

       Brazil



     Consulting Specialties:
        E-Commerce



     Main Distribution:
        Other


     Other Distribution:
        Conectiva


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable

     Linux Certifications:
        RedHat



     Company Phone Number:
        +55 48 322-0249


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@isnet.com.br

     Company URL:
        http://www.isnet.com.br

     Primary Contact:
        Paulo Santos



  1.66.  Consultant ID: Bulgaria, University of Mining and Geology,
  Dept. Computer S



       Studentski Grad
       Sofia, NON United States 1700

       Bulgaria



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet (Web) Programming Network Administration
        System Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +359 2 62581 /ext.56


     Company Fax:
        +359 2


     Support Phone Number:
        +359 2 62581 /ext.56

     Contact Email Address:
        support@mgu.bg

     Company URL:
        http://www.mgu.bg

     Primary Contact:
        Volin Karagiozov



  1.67.  Consultant ID: Canada, 4 Office Automation



       375 Britannia Road East
       Mississauga, ON L4Z 3E2

       Canada



     Consulting Specialties:
        CIFS (Samba)



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA
     Reseller Authorizations:
        HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-416-463-3423


     Company Fax:
        1-905-501-1515


     Support Phone Number:
        1-416-463-3423

     Contact Email Address:
        hyeung@4office.com

     Company URL:
        http://www.4office.com

     Primary Contact:
        Hillman Yeung



  1.68.  Consultant ID: Canada, 8D Technologies inc.



       Pobox 778
       Hudson, PQ J0P1H0

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other

     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        514.994.2645


     Company Fax:
        514.994.2654


     Support Phone Number:
        514.994.2645

     Contact Email Address:
        info@8D.com

     Company URL:
        http://www.8D.com

     Primary Contact:
        Patrick Bernard



  1.69.  Consultant ID: Canada, ADR Computing



       5-1115 West 10th Avenue
       Vancouver, BC V6H 1J2

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1 604 202 2800


     Company Fax:
        Not_Applicable


     Support Phone Number:
        1 604 202 2800

     Contact Email Address:
        support@adrcomp.com

     Company URL:
        http://www.adrcomp.com

     Primary Contact:
        Chris Airriess



  1.70.  Consultant ID: Canada, Affinity Systems Inc.



       Box 10, RR1
       Innisfail, AB T4G 1T6

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat

     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-403-886-4638


     Company Fax:
        1-403-886-2663


     Support Phone Number:
        1-403-886-4638

     Contact Email Address:
        support@affinity-systems.ab.ca

     Company URL:
        http://www.affinity-systems.ab.ca

     Primary Contact:
        James Bourne



  1.71.  Consultant ID: Canada, Allt Computer Consulting



       170 Willow Rd.
       Guelph, ON N1H 1W8

       Canada



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Netware Connectivity
        Network Administration System Administration Virtual Private
        Networking


     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        519 763-0405


     Company Fax:
        508 448-0716


     Support Phone Number:
        n/a

     Contact Email Address:
        allt@netloads.com

     Company URL:
        http://www.netloads.com/allt

     Primary Contact:
        Greg Allt



  1.72.  Consultant ID: Canada, Best Computers



       10610 170 St
       Edmonton, AB T5S-1P3

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        SuSE, Debian


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Secured Linux


     Reseller Authorizations:
        HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        780-413-9830


     Company Fax:
        780-413-9831


     Support Phone Number:
        780-413-9830

     Contact Email Address:
        support@best-comp.com

     Company URL:
        http://http://www.best-comp.com/

     Primary Contact:
        Kurt Seifried



  1.73.  Consultant ID: Canada, CAL Consultants Inc.



       358 Danforth Ave., Suite 29
       Toronto, ON M4K 3Z2

       Canada



     Consulting Specialties:
        E-Commerce Internet Server Development Network Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        01.416.461.7634


     Company Fax:
        01.416.461.6908


     Support Phone Number:
        01.416.461.7634

     Contact Email Address:
        support@cal.ca

     Company URL:
        http://www.cal.ca

     Primary Contact:
        Graydon Clipperton



  1.74.  Consultant ID: Canada, Centurion Services



       9351 Blundell Road
       Richmond, BC V6Y 1K5

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        1-604-279-1857


     Company Fax:
        1-604-279-1800


     Support Phone Number:
        1-604-720-1857

     Contact Email Address:
        jwalter@rogers.wave.ca

     Company URL:
        http://www.rogers.wave.ca

     Primary Contact:
        Mr. Jan Walter



  1.75.  Consultant ID: Canada, Chris Newton



       254 Barton
       Fredericton, NB e3a 5a6

       Canada

     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        506-474-0454


     Company Fax:
        Not_Applicable


     Support Phone Number:
        506-474-0454

     Contact Email Address:
        newton@unb.ca

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Chris Newton



  1.76.  Consultant ID: Canada, Computing And Networking Centre



  POBOX 28117
  Dartmouth/Halifax, NS B2W6E2

  Canada



     Consulting Specialties:
        Network Administration



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        902-465-3734


     Company Fax:
        902-465-3734


     Support Phone Number:
        902-465-3734

     Contact Email Address:
        cnc98@sprint.ca

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Ahmed  Bentiba



  1.77.  Consultant ID: Canada, DFC International Computers Inc.



       52 Mowatt Court
       Thornhill, ON L3T 6V5

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq IBM



     Linux Certifications:
        RedHat Not Applicable



     Company Phone Number:
        (905)731-6449


     Company Fax:
        (905)731-7684


     Support Phone Number:
        (905)731-6449

     Contact Email Address:
        support@dfc.com

     Company URL:
        http://www.dfc.com

     Primary Contact:
        David Fitzerman



  1.78.  Consultant ID: Canada, DFC International Computing Inc.



       52 Mowatt Court
       Thornhill, ON L3T 6V5

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        RedHat



     Company Phone Number:
        (905)731-6449


     Company Fax:
        (905)731-7684


     Support Phone Number:
        (905)731-6449

     Contact Email Address:
        support@dfc.com

     Company URL:
        http://www.dfc.com

     Primary Contact:
        David Fitzerman



  1.79.  Consultant ID: Canada, DPD Software Ltd



       1455 Waverly St
       Winnipeg, MB R2W 0RY

       Canada



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Slak


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        RedHat



     Company Phone Number:
        204-489-4398


     Company Fax:
        204-489-4398
     Support Phone Number:
        204-489-4398

     Contact Email Address:
        kevind@dpdsoftware.mb.ca

     Company URL:
        http://www.dpdsoftware.mb.ca

     Primary Contact:
        Kevin Druet



  1.80.  Consultant ID: Canada, Diminishing Networks



       5330 Entwhistle Dr
       Nanaimo, BC V9V 1H2

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1(250) 758-2217

     Company Fax:
        1(250) 758-2217


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        tech@mymail.penguinpowered.com

     Company URL:
        http://www.soatusa.com/DimNet/

     Primary Contact:
        Adam Jordens



  1.81.  Consultant ID: Canada, G Desktop Solutions



       2037 Decarie Blvd #1
       Montreal, PQ H4A 3J2

       Canada



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (514) 996-5153


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        gldesk@gomer.mlink.net

     Company URL:
        http://gomer.mlink.net/~gldesk/

     Primary Contact:
        Greg Patterson



  1.82.  Consultant ID: Canada, Gedris Linux Consulting



       183 St. Andrew Street
       Ottawa, ON K1N 5G3

       Canada



     Consulting Specialties:
        Custom Programming Internet Server Development Internet (Web)
        Programming System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable
     Company Phone Number:
        (613)562-0628


     Company Fax:
        Not_Applicable


     Support Phone Number:
        (613)562-0628

     Contact Email Address:
        vic@worldchat.com

     Company URL:
        http://www.worldchat.com

     Primary Contact:
        Victor Gedris



  1.83.  Consultant ID: Canada, Global Proximity Corporation



       RR 7
       Woodstock, ON N4S 7W2

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +1 519 469 3439


     Company Fax:
        +1 519 469 8653


     Support Phone Number:
        +1 519 469 3439

     Contact Email Address:
        Support@Global.Proximity.ON.CA

     Company URL:
        http://www.Global.Proximity.ON.CA

     Primary Contact:
        Chris Tyler



  1.84.  Consultant ID: Canada, HK Computer Consultants



       35 Chalmers Drive
       Ajax, NON United States l155w8

       Canada



     Consulting Specialties:
        Custom Programming Custom Systems Network Administration System
        Administration



     Main Distribution:
        Caldera


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable

     Linux Certifications:
        Not Applicable



     Company Phone Number:
        905-619-6888


     Company Fax:
        Not_Applicable


     Support Phone Number:
        905-619-6888

     Contact Email Address:
        hallamh@excite.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Hallam  Holder



  1.85.  Consultant ID: Canada, Hard Data Ltd.



       11060 - 166 Avenue
       Edmonton, AB T5X 1Y3

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        ALL


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Hard Hat Linux



     Reseller Authorizations:
        Compaq HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        01-780-456-9771


     Company Fax:
        01-780-456-9772


     Support Phone Number:
        01-780-456-1510

     Contact Email Address:
        support@harddata.com

     Company URL:
        http://www.harddata.com

     Primary Contact:
        Maurice Hilarius



  1.86.  Consultant ID: Canada, ITPS Groupe Inc.



       350 Price Arthur Apt.810
       Montreal, PQ H2X 3R4

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Internet Server
        Development Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        RedHat



     Company Phone Number:
        (514) 286-1354


     Company Fax:
        (514) 286-4827


     Support Phone Number:
        (514)-821-1568

     Contact Email Address:
        Boris.Kuschel@itpsgroup.com

     Company URL:
        http://http://www.itpsgroup.com/

     Primary Contact:
        Boris Kuschel



  1.87.  Consultant ID: Canada, JDP Computer Systems Inc.



       206 Finch Ave. East
       Toronto, ON L9W 3S9

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA

     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-416-733-3655


     Company Fax:
        1-416-733-1839


     Support Phone Number:
        1-416-733-3655

     Contact Email Address:
        support@jdp.com

     Company URL:
        http://www.jdp.com

     Primary Contact:
        Gordon Gray



  1.88.  Consultant ID: Canada, Jeff Tranter



       1 Laurie Court
       Kanata, ON K2L 1S2

       Canada



     Consulting Specialties:
        Custom Programming Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming System
        Administration



     Main Distribution:
        Other


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 613 836 7697


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +1 613 836 7697

     Contact Email Address:
        tranter@pobox.com

     Company URL:
        http://www.pobox.com/~tranter

     Primary Contact:
        Jeff Tranter



  1.89.  Consultant ID: Canada, LeadSource Consultants Inc.



       1227 Mississauga Road
       Mississauga, ON L5H 2J1

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking


     Main Distribution:
        Other


     Other Distribution:
        slackware


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        HoNet


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        905 278 6808


     Company Fax:
        905 278 6863


     Support Phone Number:
        905 278 6808

     Contact Email Address:
        support@leadsource.ca

     Company URL:
        http://http://www.leadsource.ca

     Primary Contact:
        Adam Mikolajewicz



  1.90.  Consultant ID: Canada, Logisoft Technologies inc



       718 pl Denise-pelletier
       Ste-Julie, PQ J3E 2G8

       Canada



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Mandrake


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (514) 570-7638


     Company Fax:
        Not_Applicable


     Support Phone Number:
        (514) 580-0050

     Contact Email Address:
        support@logisoftech.com

     Company URL:
        http://www.logisoftech.com

     Primary Contact:
        Guillaume Bourque



  1.91.  Consultant ID: Canada, MOE Online Enterprises



       50 Stephanie, Suite 1008
       Toronto, ON M5T1B3

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 416 588 0672


     Company Fax:
        Not_Applicable


     Support Phone Number:
        n/a

     Contact Email Address:
        mozai@canada.com

     Company URL:
        http://ativan.netdesign.net/~moses/

     Primary Contact:
        Moses Moore



  1.92.  Consultant ID: Canada, Macadamian Technologies Inc.



  700 Industrial Avenue Suite 220
  Ottawa, ON K1G 0Y9

  Canada



     Consulting Specialties:
        Custom Programming Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-877-7-SYNDEO


     Company Fax:
        1-613-739-9859


     Support Phone Number:
        1-877-7-SYNDEO

     Contact Email Address:
        info@macadamian.com

     Company URL:
        http://www.macadamian.com

     Primary Contact:
        Claude Montpetit



  1.93.  Consultant ID: Canada, Mediabase



       3 shenstone rd, (changing soon)
       North York, ON m2r 3b3 (changi

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Netware Connectivity System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Slackware 4.0


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        4164685400


     Company Fax:
        na


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        mediabase@ihosts.net

     Company URL:
        http://www.mediabase.ihosts.net

     Primary Contact:
        Cyrus Hill
  1.94.  Consultant ID: Canada, Minek Consulting Inc.



       B403-1331 Homer St.
       Vancouver, BC V6B 5M5

       Canada



     Consulting Specialties:
        Custom Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-604-3185875


     Company Fax:
        1-604-899-2492


     Support Phone Number:
        1-604-3185875

     Contact Email Address:
        support@minek.com

     Company URL:
        http://www.minek.com

     Primary Contact:
        Dan Rokosz


  1.95.  Consultant ID: Canada, Montage IT Services



       350, 708 - 11 Ave. SW
       Calgary, AB T2R0E4

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        All


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        01.403.265.4461


     Company Fax:
        01.403.265.4462


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        dboyd@cal.montage.ca

     Company URL:
        http://www.montage.ca


     Primary Contact:
        Darren Boyd



  1.96.  Consultant ID: Canada, MostlyLinux



       Not_Applicable
       Calgary, AB Not_Applicable

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Systems Network Administration System
        Administration System Security



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Small Business serve


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        403-285-1399


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Scott Barker



  1.97.  Consultant ID: Canada, Net Direct Inc.



       557 Havelock Dr.
       Waterloo, ON N2L 4Z1

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        None


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        519-579-5006


     Company Fax:
        519-745-9940



     Support Phone Number:
        519-579-5006

     Contact Email Address:
        support@netdirect.ca

     Company URL:
        http://www.net.direct.ca

     Primary Contact:
        John Van Ostrand



  1.98.  Consultant ID: Canada, Pilkington Software Inc.



       1046 Barrington St
       Halifax, NS B3H 2R1

       Canada



     Consulting Specialties:
        Custom Programming Custom Systems



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        902 423 6033


     Company Fax:
        902 423 6033
     Support Phone Number:
        902 423 6033

     Contact Email Address:
        support@cpsoft.com

     Company URL:
        http://www.cpsoft.com

     Primary Contact:
        Charles Pilkington



  1.99.  Consultant ID: Canada, Pryor and Pryor Inc.



       602 - 1230 Comox Street
       Vancouver, BC V6E 1K7

       Canada



     Consulting Specialties:
        Custom Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        604-685-2621


     Company Fax:
        604-683-3488
     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://http://www.pryor-and-pryor.com

     Primary Contact:
        Roger Pryor



  1.100.  Consultant ID: Canada, Quist Consulting



       219 Donlea Drive
       Toronto, ON M4G2N1

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Debian


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        UltraPenguin


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1.416.696.7600

     Company Fax:
        1.416.978.6620


     Support Phone Number:
        1.416.696.7600

     Contact Email Address:
        russ@quist.on.ca

     Company URL:
        http://www.quist.on.ca

     Primary Contact:
        Russell Suherland



  1.101.  Consultant ID: Canada, Real-Time Remedies Inc.



       33 Ridgefield Crescent
       Nepean, ON K2H 6S3

       Canada



     Consulting Specialties:
        Custom Systems Firewalls and Internet Security Internet Server
        Development Network Administration System Administration Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Intel x86 and NetWin


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        613-277-4944


     Company Fax:
        616-828-9659


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        mlord@pobox.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Mark Lord



  1.102.  Consultant ID: Canada, Roaring Penguin Software Inc.



       986 Eiffel Avenue
       Ottawa, ON K2C 0J2

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Network Administration System
        Administration



     Main Distribution:
        Other


     Other Distribution:
        Any distro


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        613 851-4379


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        David Skoll



  1.103.  Consultant ID: Canada, Salmar Consulting Inc.



       P.O. Box 52531, 1801 Lakeshore Road West
       Mississauga, ON L5J 4S6

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        All


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        905-403-8835


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@salmar.com

     Company URL:
        http://www.salmar.com

     Primary Contact:
        Marcel Gagne



  1.104.  Consultant ID: Canada, Soft Touch Computers



       Not_Applicable
       Calgary, AB Not_Applicable

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        SUSE


     Specialty Distribution:
        Other
     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (403)259-6016


     Company Fax:
        (403)258-0267


     Support Phone Number:
        (403)259-6016

     Contact Email Address:
        admin@softouchcomputer.com

     Company URL:
        http://www.softouchcomputer.com

     Primary Contact:
        Al Green



  1.105.  Consultant ID: Canada, Stable Network Technologies Inc.



       141 Adelaide Street West, Suite 1200
       Toronto, ON M5H 3L5

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA



     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1 416 367 2745


     Company Fax:
        1 416 861 0650


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@snti.com

     Company URL:
        http://www.snti.com

     Primary Contact:
        David Kerry



  1.106.  Consultant ID: Canada, Steve Willer



       1544A Queen St. W.
       Toronto, ON M6R1A6

       Canada



     Consulting Specialties:
        Custom Programming E-Commerce Internet Server Development
        Internet (Web) Programming



     Main Distribution:
        Debian



     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        416-516-8470


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.interlog.com/~willer/

     Primary Contact:
        Steve Willer



  1.107.  Consultant ID: Canada, Technical Consulting Group



       25 - 52061 - RR215
       Sherwood Park, AB T8E-1B2

       Canada



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Linux on Alpha


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        780-922-5755


     Company Fax:
        780-922-6990


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        ken.gehring@gov.ab.ca

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Ken Gehring



  1.108.  Consultant ID: Canada, TeleDynamics Communications Inc



       7 Forest Place RR#1
       Sauble Beach, ON N0H 2G0

       Canada



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        519-422-1150


     Company Fax:
        519-422-2723


     Support Phone Number:
        Not Available

     Contact Email Address:
        teledynamics@canada.com

     Company URL:
        http://http://www.teledyn.com

     Primary Contact:
        Gary Murphy



  1.109.  Consultant ID: Canada, The Net Result



       #10 3450 Coast Meridian Rd
       Port Coquitlam, BC V3B7H2

       Canada



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Caldera


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        604 942 7257


     Company Fax:
        604 942 7440


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@result.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Jay Thorne



  1.110.  Consultant ID: Canada, The People's Linux



  109-288 East 14th Avenue
  Vancouver, BC V5T 2M6

  Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        604-709-9512


     Company Fax:
        604-709-9512


     Support Phone Number:
        604-709-9512

     Contact Email Address:
        fred@nuge.com

     Company URL:
        http://http://www.linuxnut.com

     Primary Contact:
        Bob  Strasser



  1.111.  Consultant ID: Canada, Troika Management Services



       Unit 4 - 40 Fairfax Court
       London, NON United States N6G3Y3

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration



     Main Distribution:
        Other


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-519-670-4567


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        xbill@xbill.com

     Company URL:
        http://www.xbill.com


     Primary Contact:
        William McLean



  1.112.  Consultant ID: Canada, Troy Ryder



       3665 Luxmoore Road
       Kelowna, BC V1W 4C7

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        250-764-0917


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        ryder@direct.ca

     Company URL:
        http://www.vanisle.net/ryder

     Primary Contact:
        Troy Ryder Not_Applicable



  1.113.  Consultant ID: Canada, VL



       221 BRitannia
       Ottawa, ON K2B - 5X1

       Canada



     Consulting Specialties:
        System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Caldera


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        1 (613) 292-9818


     Company Fax:
        1 (613) 829-0967


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Hung Vu



  1.114.  Consultant ID: Canada, Webcon, Inc.



       70 Forest Hill Ave.
       Ottawa, ON K2C 1P6

       Canada



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 613 276 6206



     Company Fax:
        +1 613 276 8206


     Support Phone Number:
        +1 613 276 6206

     Contact Email Address:
        tech@webcon.net

     Company URL:
        http://www.webcon.net

     Primary Contact:
        Robert Hardy



  1.115.  Consultant ID: Canada, iNsu Innovations



       3465 Thimmens
       St-Laurent, PQ H4R 1V5

       Canada



     Consulting Specialties:
        E-Commerce Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Virtual Private
        Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        514-336-5544


     Company Fax:
        514-336-8128


     Support Phone Number:
        514-336-5544

     Contact Email Address:
        support@insu.com

     Company URL:
        http://www.insu.com

     Primary Contact:
        Joel Pomerleau



  1.116.  Consultant ID: Colombia, Linux Colombia Ltda



       Avenida 5AN 23DN68 Oficina 2-118B
       Cali, NON United States Not_Applicable

       Colombia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Netware
        Connectivity Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        57 2 6607908


     Company Fax:
        57 2 6676596


     Support Phone Number:
        57 2 6607908

     Contact Email Address:
        linuxcol@linuxcolombia.com.co

     Company URL:
        http://www.linuxcolombia.com.co

     Primary Contact:
        Juan Diego Bolaos Ramirez



  1.117.  Consultant ID: Colombia, Msoft



       Cra 24 No 80-52 Apto G-201
       Bucaramanga, NON United States 212

       Colombia



     Consulting Specialties:
        CIFS (Samba) Internet Server Development Netware Connectivity
        Network Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable
     Linux Certifications:
        Not Applicable



     Company Phone Number:
        ++57-7-6384935


     Company Fax:
        ++57-7-6389374


     Support Phone Number:
        ++57-7-6313428

     Contact Email Address:
        nelsonmauriciosilva@yahoo.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Mauricio Silva



  1.118.  Consultant ID: Colombia, Skina Ltda.



       Calle 95 #30-61 int 8
       Santafe de Bogota, NON United States Not_Applicable

       Colombia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        5712565008


     Company Fax:
        5712565008


     Support Phone Number:
        cel: 2059620

     Contact Email Address:
        skina@skina.com.co

     Company URL:
        http://www.skina.com.co

     Primary Contact:
        Ricardo Naranjo_Faccini



  1.119.  Consultant ID: Czech Republic, Martin Knotek, poskytovani
  software



       Havelkova 23
       Brno, NON United States 625 00

       Czech Republic



     Consulting Specialties:
        Custom Programming Custom Systems System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC



     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        420 5 356605


     Company Fax:
        Not_Applicable


     Support Phone Number:
        420 5 356605

     Contact Email Address:
        knotekmartin@email.cz

     Company URL:
        http://www.email.cz

     Primary Contact:
        Martin Knotek



  1.120.  Consultant ID: Denmark, Arnecke Informatik



       Havnegade 4
       Odense, NON United States 5100

       Denmark



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA



     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +45 63130050


     Company Fax:
        +45 63130051


     Support Phone Number:
        +45 63130050

     Contact Email Address:
        info@a-info.dk

     Company URL:
        http://www.a-info.dk

     Primary Contact:
        Allan Hansen



  1.121.  Consultant ID: Denmark, Dansk Data Elektronik A S



       Herlev Hovedgade 199
       Herlev, NON United States 2730

       Denmark



     Consulting Specialties:
        Custom Systems



     Main Distribution:
        Other


     Other Distribution:
        Any well known Linux
     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +45 44572000


     Company Fax:
        +45 44572001


     Support Phone Number:
        +45 44572010

     Contact Email Address:
        support@dde.dk

     Company URL:
        http://www.dde.dk

     Primary Contact:
        Jens Knudsen



  1.122.  Consultant ID: Denmark, Plomus



       Nddelunden 110
       Smrum, NON United States DK-2765

       Denmark



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Caldera
     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +45 44 66 24 16


     Company Fax:
        +45 44 66 25 16


     Support Phone Number:
        +45 44 66 25 16

     Contact Email Address:
        support@plomus.dk

     Company URL:
        http://www.plomus.dk

     Primary Contact:
        Claus Srensen



  1.123.  Consultant ID: Dominican Republic, microbell



       jesus maestr 18, suite A3, mirador sur
       santo domingo, ZZ 0000

       Dominican Republic



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking

     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        809 383 2613


     Company Fax:
        809 540 4025


     Support Phone Number:
        809 383 2613

     Contact Email Address:
        microbell@microbell.com.do

     Company URL:
        http://microbell.com.do

     Primary Contact:
        homero gonzalez



  1.124.  Consultant ID: Egypt, AB2



       29 Alexander the Great St.
       Alexandria, NON United States 21131

       Egypt



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet (Web) Programming
        Network Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Intel


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +20 3 482 4756


     Company Fax:
        +20 3 483 5030


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.ab2.com

     Primary Contact:
        Khalid Baheyeldin



  1.125.  Consultant ID: Finland, Netsol Network Solutions Oy



       Hiihtotie 3 A
       Vantaa, NON United States 01280

       Finland



     Consulting Specialties:
        Custom Systems Firewalls and Internet Security Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP IBM Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +358 9 34090410


     Company Fax:
        +358 9 34090404


     Support Phone Number:
        +358 9 34090410

     Contact Email Address:
        support@netsol.fi

     Company URL:
        http://www.netsol.fi

     Primary Contact:
        Timo Virtaneva



  1.126.  Consultant ID: Finland, SOT Finnish Sofware Engineering Ltd.



       Hermiankatu 8 E
       TAMPERE, NON United States 33720

       Finland

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Best Linux


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +358-3-316 5544


     Company Fax:
        +358-3-316 5959


     Support Phone Number:
        0600-95549

     Contact Email Address:
        linux@bestlinux.net

     Company URL:
        http://www.sot.com

     Primary Contact:
        Santeri Kannisto Kai Valijrvi



  1.127.  Consultant ID: Finland, Tmi Netics Konsultointi



  Etelniityntie 6
  MUSTASAARI, NON United States FIN-65610

  Finland



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Network Administration System
        Administration



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        planned with custome


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +358 50 501 2132


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +358 50 501 2132

     Contact Email Address:
        juhani.puska@netics.fi

     Company URL:
        http://www.netics.fi

     Primary Contact:
        Juhani Puska



  1.128.  Consultant ID: France, ALCOVE



       12 - 13 place Indira Gandhi
       Gennevilliers, NON United States 92230

       France



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +33 1 47 33 82 84


     Company Fax:
        +33 1 47 33 76 98


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Anne Collet
  1.129.  Consultant ID: France, Alcove



       12-13 place Indira Gandhi
       Gennevilliers, NON United States 92230

       France



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Network Administration System
        Administration System Security



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        33147338284


     Company Fax:
        33147337698


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        assistance@alcove.fr

     Company URL:
        http://www.alcove.fr

     Primary Contact:
        Anne Collet
  1.130.  Consultant ID: France, CRAO



       19, rue Forcrand
       Montpellier, NON United States 34000

       France



     Consulting Specialties:
        Custom Systems E-Commerce Internet Server Development Internet
        (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +33 4 67 63 24 27


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        crao@crao.net

     Company URL:
        http://crao.net

     Primary Contact:
        Arnaud Fontaine

  1.131.  Consultant ID: France, EBC Consulting



       16, rue des sorbiers
       SORBEY, NON United States 57580

       France



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        client specific


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +33 (0) 3. 87.64.58.


     Company Fax:
        +33 (0) 3. 87.64.58.


     Support Phone Number:
        +33 (0) 3. 87.64.58.

     Contact Email Address:
        ebconsul@altavista.net

     Company URL:
        http://www.ebcip.fr


     Primary Contact:
        Eric Binger



  1.132.  Consultant ID: France, Hubert Gregoire



       118, avenue Gambetta
       PARIS, NON United States 75020

       France



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +33 (0) 140312326


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        hubert@dune-concept.com

     Company URL:
        http://dune-concept.com

     Primary Contact:
        Hubert  Gregoire



  1.133.  Consultant ID: France, NTCD



       11 rue A. Carrel
       PARIS, ZZ 75019

       France



     Consulting Specialties:
        Custom Programming Custom Systems Internet Server Development
        Internet (Web) Programming System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Debian


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        33 1 40 40 77 09


     Company Fax:
        33 1 40 40 77 09


     Support Phone Number:
        none

     Contact Email Address:
        http://www.ntcd.com/hotline/index.htm

     Company URL:
        http://ntcd

     Primary Contact:
        Didier Blanchard



  1.134.  Consultant ID: France, Paralline



       71, avenue des Vosges
       STRASBOURG, NON United States 67000

       France



     Consulting Specialties:
        Custom Systems



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        33 3 88 14 17 40


     Company Fax:
        33 3 88 14 17 41
     Support Phone Number:
        33 3 88 14 17 40

     Contact Email Address:
        support@paralline.com

     Company URL:
        http://www.paralline.com

     Primary Contact:
        Pierre BRUA



  1.135.  Consultant ID: France, Paul Boyer Consultants Sarl



       20 rue d'Hauteville
       Paris, NON United States 75010

       France



     Consulting Specialties:
        Firewalls and Internet Security System Security



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +33 1 47 700 801


     Company Fax:
        +33 1 47 700 850
     Support Phone Number:
        +33 1 47 700 801

     Contact Email Address:
        paulboyer@usa.net

     Company URL:
        http://www.usa.net

     Primary Contact:
        Paul Boyer



  1.136.  Consultant ID: France, Thorvax



       39, rue Armand Silvestre
       Courbevoie, NON United States 92400

       France



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Network Administration System Administration System Security
        Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +33 6 80 08 93 83


     Company Fax:
        +33 1 43 33 51 33


     Support Phone Number:
        +33 6 80 08 93 83

     Contact Email Address:
        Illaire@Club-Internet.fr

     Company URL:
        http://www.penguinpowered.com/~tyrann

     Primary Contact:
        Vincent Illaire



  1.137.  Consultant ID: France, sokram inc



       161 rue de la eoquette
       Paris, NON United States 75011

       France



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet (Web)
        Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +33614704591


     Company Fax:
        +33140242235


     Support Phone Number:
        +33614704591

     Contact Email Address:
        sokram@usa.net

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Bernard Not_Applicable



  1.138.  Consultant ID: Germany, Andreas Spengler EDV-Service



       Gronauer Strasse 9
       Karben, NON United States 61184

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Systems Network Administration System
        Administration



     Main Distribution:
        Suse


     Other Distribution:
        RedHat


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable
     Company Phone Number:
        +49 6039 44401


     Company Fax:
        +49 6039 44401


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Andreas Spengler



  1.139.  Consultant ID: Germany, Bigge & Langanke GbR



       Corunnastr. 1
       Iserlohn, NON United States 58636

       Germany



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable
     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        support@transdata.de

     Company URL:
        http://www.transdata.de

     Primary Contact:
        Frank Bigge



  1.140.  Consultant ID: Germany, CHIRON



       Neupullach 3
       Hohenlinden, NON United States 85664

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Selfmade embedded


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 8124 52 83 44


     Company Fax:
        +49 8124 52 83 46


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        chiron@chiron.de

     Company URL:
        http://www.chiron.de

     Primary Contact:
        M. Brandstetter



  1.141.  Consultant ID: Germany, Call-a-Server



       Not_Applicable
       Berlin, NON United States D-14129 Berlin

       Germany



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        DLD, RedHat und S.u.


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 +177 7170896


     Company Fax:
        +49 +30 8017423


     Support Phone Number:
        +49 +177 7170896

     Contact Email Address:
        support@call-a-server.de

     Company URL:
        http://www.call-a-server.de

     Primary Contact:
        Joachim von Thadden



  1.142.  Consultant ID: Germany, Gecko GmbH



       Ringstr. 53
       Bad Oeynhausen, NON United States 32549

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49.5731.741010


     Company Fax:
        +49.5731.741013


     Support Phone Number:
        Not Available

     Contact Email Address:
        support@lizard.de

     Company URL:
        http://www.lizard.de

     Primary Contact:
        Eike Sieker



  1.143.  Consultant ID: Germany, Gerd Aschemann



       Osannstr. 49
       Darmstadt, NON United States 64285

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration System Security



     Main Distribution:
        Suse


     Other Distribution:
        Redhat, Caldera


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49/6151/16-2259


     Company Fax:
        +49/6151/16-3052


     Support Phone Number:
        +49/6151/16-2259

     Contact Email Address:
        Aschemann@Informatik.TU-Darmstadt.de

     Company URL:
        http://www.Informatik.TU-Darmstadt.de

     Primary Contact:
        Gerd Aschemann



  1.144.  Consultant ID: Germany, Grosch & Link GmbH



       Friedrich-Ebert-Anlage 18
       Frankfurt, NON United States 60325

       Germany



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration System Security



     Main Distribution:
        Suse


     Other Distribution:
        RedHat


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49699740130


     Company Fax:
        +496997401322


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        frankfurt@grosch-link.de

     Company URL:
        http://www.grosch-link.de/html

     Primary Contact:
        Mario Oschwald



  1.145.  Consultant ID: Germany, ID-Pro GmbH



       Koenigswinterer Str. 116
       Bonn, NON United States 53227

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking


     Main Distribution:
        Other


     Other Distribution:
        All major distributi


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49-(0)228-42154-0


     Company Fax:
        +49-(0)228-42154-29


     Support Phone Number:
        +49-(0)228-42154-19

     Contact Email Address:
        support@id-pro.de

     Company URL:
        http://id-pro.de

     Primary Contact:
        Daniel Riek



  1.146.  Consultant ID: Germany, Jochen Laser IT-Services



       Fliederweg 2a
       Woebbelin, NON United States 19288

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        Suse


     Other Distribution:
        others as well


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 (0)38753 80181


     Company Fax:
        on request


     Support Phone Number:
        +49 (0)38753 80181

     Contact Email Address:
        on request

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Jochen Laser



  1.147.  Consultant ID: Germany, LINUXHAUS



       RINGBAHNSTR. 13
       BERLIN, NON United States 10711

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        SuSE


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 30 890 944 63


     Company Fax:
        +49 30 890 944 64


     Support Phone Number:
        Not Available

     Contact Email Address:
        support@linuxhaus.de

     Company URL:
        http://www.linuxhaus.de

     Primary Contact:
        Joerg Fruehbrodt



  1.148.  Consultant ID: Germany, Linux-Systemhaus Schulz



       Hauptfeld 18
       Dortmund, NON United States 44369

       Germany

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        none


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        0049 172 2362995


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        schulz@linux-systemhaus.de

     Company URL:
        http://www.Linux-Systemhaus.de

     Primary Contact:
        Karsten Schulz



  1.149.  Consultant ID: Germany, Manfred Kunde EDV-Beratung



       Hauptstrasse 70
       Karben, NON United States 61184

       Germany

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Internet Server
        Development Internet (Web) Programming



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49-(0)-06039-931064


     Company Fax:
        +49-(0)-06039-931065


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://http://www.Manfred-Kunde.de

     Primary Contact:
        Manfred Kunde



  1.150.  Consultant ID: Germany, Matthias Stolte Datentechnik



       Not_Applicable
       33613 Bielefeld, NON United States Not_Applicable

       Germany


     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet (Web) Programming Netware
        Connectivity Network Administration System Administration System
        Security



     Main Distribution:
        Other


     Other Distribution:
        SuSE und andere...


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49-521-880056


     Company Fax:
        +49-521-880059


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Not_Applicable Not_Applicable



  1.151.  Consultant ID: Germany, Michael Bussmann EDV-Dienstleistungen



  Im Brook 8
  Haltern/Westf., NON United States 45721

  Germany



     Consulting Specialties:
        Custom Systems Firewalls and Internet Security Internet Server
        Development Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 2364 108537


     Company Fax:
        +49 2364 4095


     Support Phone Number:
        n/a

     Contact Email Address:
        michael.bussmann@gmx.net

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Michael Bussmann



  1.152.  Consultant ID: Germany, Michael Krause Software-Entwicklung



       Auf der Horst 11
       Borgholzhausen, NON United States 33829

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Internet Server Development
        Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 5425 930310


     Company Fax:
        +49 5425 930311


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://homepages.teuto.net/mkrause/

     Primary Contact:
        Michael Krause

  1.153.  Consultant ID: Germany, NetUSE GmbH



       Siemenswall
       Kiel, NON United States 24107

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 431 386 435 00


     Company Fax:
        +49 431 386 435 99


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        service@netuse.de

     Company URL:
        http://netuse.de


     Primary Contact:
        Heinz Rohde



  1.154.  Consultant ID: Germany, PiN - Prsenz im Netz Ges. f. Informa-
  tionstechnolo



       Leimbacher Str. 36
       Wuppertal, NON United States 42281

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Alle Distributionen


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49-202-2501164


     Company Fax:
        +49-202-2501165


     Support Phone Number:
        +49-202-2501164
     Contact Email Address:
        support@pinserve.de

     Company URL:
        http://www.pinserve.de

     Primary Contact:
        Andre Dressler



  1.155.  Consultant ID: Germany, SDC GmbH



       Schlossstrase 26
       Berlin, NON United States 13507

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        Redhat


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 30 4309430


     Company Fax:
        +49 30 43094310
     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.sdc.de

     Primary Contact:
        Christian Gleich



  1.156.  Consultant ID: Germany, Simulina GmbH



       Trajanstrae  8
       LADENBURG, NON United States DE-68526

       Germany



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +49 6203 92 20 41


     Company Fax:
        +49 6203 92 20 42
     Support Phone Number:
        +49 6203 92 40 41

     Contact Email Address:
        hk@simulina.se

     Company URL:
        http://www.ncc-mannheim.net/simulina

     Primary Contact:
        Hkan Kllberg



  1.157.  Consultant ID: Germany, Syslab.com oHg



       Karl-Theodor Strae 66
       Mnchen, NON United States 80803

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 89 306358-90

     Company Fax:
        +49 89 306358-99


     Support Phone Number:
        +49 89 306358-92

     Contact Email Address:
        support@syslab.com

     Company URL:
        http://www.syslab.com

     Primary Contact:
        Manfred Lang



  1.158.  Consultant ID: Germany, TDS Consulting GmbH



       Gustav-Heinemann-Ring 212
       Munich, NON United States 81739

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Netware Connectivity System
        Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 89 62736-0


     Company Fax:
        +49 89 62736-129


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Peter.Schroff@tds.de

     Company URL:
        http://www.tds.de

     Primary Contact:
        Peter Schroff



  1.159.  Consultant ID: Germany, WebArtists Internet Services



       Steendammwisch 49
       Hamburg, NON United States 22459

       Germany



     Consulting Specialties:
        Custom Systems E-Commerce Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49-40-555 40 427


     Company Fax:
        +49-40-555 40 182


     Support Phone Number:
        0172/4032506

     Contact Email Address:
        support@linuxberatung.com

     Company URL:
        http://www.webartists.net

     Primary Contact:
        Markus Braasch



  1.160.  Consultant ID: Germany, Wesemann Software & Consulting



       Heinrich-Plett-Allee 18
       Bremen, NON United States D-28259

       Germany



     Consulting Specialties:
        System Administration



     Main Distribution:
        Suse


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable

     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        ++49 421 579 579 3


     Company Fax:
        ++49 421 579 58 28


     Support Phone Number:
        +49 421 579 579 3

     Contact Email Address:
        info@wscnet.de

     Company URL:
        http://www.wscnet.de

     Primary Contact:
        Andreas Wesemann



  1.161.  Consultant ID: Germany, Wolfgang Kirch



       Gustav-Heinemann-Ring 51
       Eisenberg, NON United States 67304

       Germany



     Consulting Specialties:
        Firewalls and Internet Security



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable


     Linux Certifications:
        Not Applicable



     Company Phone Number:
        49 6351 398761


     Company Fax:
        49 6351 398762


     Support Phone Number:
        Not Available

     Contact Email Address:
        Kirch.Wolfgang@t-online.de

     Company URL:
        http://www.t-online.de

     Primary Contact:
        Wolfgang Kirch



  1.162.  Consultant ID: Germany, WorNet Internetdienste



       Brgermeister-Graf-Ring 28
       Geretsried, NON United States D-82538

       Germany



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration System Security
        Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 8171 41809-0


     Company Fax:
        +49 8171 41809-9


     Support Phone Number:
        Not Available

     Contact Email Address:
        wornet@wor.net

     Company URL:
        http://www.wor.net

     Primary Contact:
        Christian Eich



  1.163.  Consultant ID: Germany, ariadne_net



       Kpenicker Str. 8
       Berlin, NON United States 10997

       Germany



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Netware Connectivity
        Network Administration System Administration System Security
        Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC

     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        0493061280438


     Company Fax:
        0493061280437


     Support Phone Number:
        0493061280438

     Contact Email Address:
        aduecker@t-online.de

     Company URL:
        http://www.t-online.de

     Primary Contact:
        Andreas Dcker



  1.164.  Consultant ID: Germany, b.i.t. beratungsgesellschaft fr infor-
  mations-tech



       elisabethenstr. 62
       darmstadt, NON United States 64283

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Internet Server
        Development Network Administration System Administration System
        Security



     Main Distribution:
        Suse


     Other Distribution:
        NA

     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49-6151-827575


     Company Fax:
        +49-6151-827576


     Support Phone Number:
        +49-6151-827575

     Contact Email Address:
        support@b-i-t.de

     Company URL:
        http://www.b-i-t.de

     Primary Contact:
        Andy Schmidt



  1.165.  Consultant ID: Germany, conIT GmbH



       Industriering 7
       Grosswallstadt, NON United States 63868

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        Suse

     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 (0)6022/262-082


     Company Fax:
        +49 (0)6022/262-101


     Support Phone Number:
        +49 (0)6022/262-102

     Contact Email Address:
        support@conIT.com

     Company URL:
        http://www.conIT.com

     Primary Contact:
        Arnold Weis



  1.166.  Consultant ID: Germany, dev consulting GmbH



       Webereistr. 3
       Bielefeld, NON United States 33602

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking

     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        Linux Server


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat Not Applicable



     Company Phone Number:
        Not_Applicable


     Company Fax:
        +49 521 1365803


     Support Phone Number:
        +49 521 1365800

     Contact Email Address:
        info@devcon.net

     Company URL:
        http://www.devcon.net

     Primary Contact:
        Winfried Motzkus



  1.167.  Consultant ID: Germany, dynamis EDV-Consulting



       Bundschuhstrasse 24
       76661 Philippsburg, NON United States 76661

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 7256 9326-0


     Company Fax:
        +49 7256 9326-90


     Support Phone Number:
        +49 7256 9326-0

     Contact Email Address:
        support@dynamis.de

     Company URL:
        http://www.dynamis.de

     Primary Contact:
        Jochen Lillich



  1.168.  Consultant ID: Germany, envi.con KG



       Brandenburgische Str. 69
       Berlin, NON United States 10713

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Other


     Other Distribution:
        almost all


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        almost all


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49-30-34902670


     Company Fax:
        +49-30-34902671


     Support Phone Number:
        +49-30-34902670

     Contact Email Address:
        yourx@envicon.de

     Company URL:
        http://http://www.envicon.de

     Primary Contact:
        Stefania Rozzi



  1.169.  Consultant ID: Germany, frontsite AG



  Eschollbrcker Strae 4a
  Darmstadt, NON United States 64283

  Germany



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        high avail. and ISDN


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49-6151-300-88-80


     Company Fax:
        +49-6151-300-88-80


     Support Phone Number:
        +49-6151-300-88-80

     Contact Email Address:
        info@frontsite.de

     Company URL:
        http://www.frontsite.de

     Primary Contact:
        Mark Semmler



  1.170.  Consultant ID: Germany, intraDAT GmbH



       Wilhelm-Leuschner-Str. 9-11
       Frankfurt/Main, NON United States D-60329

       Germany



     Consulting Specialties:
        Custom Programming E-Commerce Firewalls and Internet Security
        Internet (Web) Programming Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 +69-9740-5703


     Company Fax:
        +49 +69-9740-5705


     Support Phone Number:
        +49 +69-9740-5703

     Contact Email Address:
        email@intradat.com

     Company URL:
        http://www.intradat.com

     Primary Contact:
        Manfred Schmid

  1.171.  Consultant ID: Germany, ipm intranet project management gmbh



       Huelchrather Strasse 17-23
       Koeln, NON United States 50670

       Germany



     Consulting Specialties:
        E-Commerce



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        49-221-97353217


     Company Fax:
        49-221-97353216


     Support Phone Number:
        49-221-97353217

     Contact Email Address:
        support@ipm-koeln.de

     Company URL:
        http://http://www.ipm-koeln.de

     Primary Contact:
        Dietmar Horn


  1.172.  Consultant ID: Germany, loth systemtechnik



       Julius-Vosseler-Strasse 136
       Hamburg, ZZ D-22527

       Germany



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 40 40192181


     Company Fax:
        +49 40 40192183


     Support Phone Number:
        +49 171 5406784

     Contact Email Address:
        support@loth.de

     Company URL:
        http://www.loth.de


     Primary Contact:
        Michael Loth



  1.173.  Consultant ID: Germany, netServe oHG Mnster



       Fresnostrae 10a
       Mnster, NON United States 48159

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        49-251-98725-0


     Company Fax:
        49-251-866977


     Support Phone Number:
        49-251-98725-21

     Contact Email Address:
        info@muenster.com

     Company URL:
        http://www.muenster.com

     Primary Contact:
        Torsten Mueller



  1.174.  Consultant ID: Germany, ralf geschke internet consulting



       Roemerhofweg 1a
       Erftstadt, NON United States 50374

       Germany



     Consulting Specialties:
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49-177-5262345


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        support@geschke.nt

     Company URL:
        http://www.geschke.nt

     Primary Contact:
        Ralf Geschke



  1.175.  Consultant ID: Germany, regioconnect GmbH



       Bahnhofstr. 11
       Steinfurt, NON United States Steinfurt

       Germany



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +492551919300
     Company Fax:
        +492551833169


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@regioconnect.net

     Company URL:
        http://www.regioconnect.net

     Primary Contact:
        Michael Rve



  1.176.  Consultant ID: Germany, unitegs - Unix Systems Technologies



       Wacholderweg 11
       Ilmenau, NON United States 98693

       Germany



     Consulting Specialties:
        Custom Programming Custom Systems System Administration



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +49 3677 884620
     Company Fax:
        +49 3677 884621


     Support Phone Number:
        Not Available

     Contact Email Address:
        support@unitegs.de

     Company URL:
        http://www.unitegs.de

     Primary Contact:
        Gunar Schorcht



  1.177.  Consultant ID: Hong Kong, Cyber Channel Int'l Ltd



       Room 1723 610 Nathan Road Kowloon
       Hong Kong SAR, NON United States Not_Applicable

       Hong Kong



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        852 23754341


     Company Fax:
        852 23754148


     Support Phone Number:
        852 27823211

     Contact Email Address:
        support@cyberchn.com.hk

     Company URL:
        http://http://www.cyberchn.com.hk

     Primary Contact:
        Thomas Lee Paul Lee



  1.178.  Consultant ID: Hong Kong, Genesis Systems Int'l Ltd.



       5/F., 7/F., Honytex Building T.S.T, Kowloon
       Hong Kong, ZZ Not_Applicable

       Hong Kong



     Consulting Specialties:
        Internet Server Development



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable

     Company Phone Number:
        +852 2815 0728


     Company Fax:
        +852 2815 0729


     Support Phone Number:
        +852 2199 7255

     Contact Email Address:
        support@genesis.com.hk

     Company URL:
        http://www.genesis.com.hk

     Primary Contact:
        Gyver  Lo



  1.179.  Consultant ID: Hong Kong, Hong Kong Terminal



       72A G/F Tokwawan Road,
       Kowloon, NON United States Not_Applicable

       Hong Kong



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable


     Linux Certifications:
        Not Applicable



     Company Phone Number:
        852-21420007


     Company Fax:
        852-27814919


     Support Phone Number:
        852-21420007

     Contact Email Address:
        support@zero.com.hk

     Company URL:
        http://http://zero.com.hk

     Primary Contact:
        Peter Wong



  1.180.  Consultant ID: Hong Kong, Linux Center (Hong Kong) Ltd.



       Unit A, 5th Floor, Comet Comeercial Building , 42A
       Kowloon, NON United States Not_Applicable

       Hong Kong



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +852 2959 3675


     Company Fax:
        +852 2959 3672


     Support Phone Number:
        available to custome

     Contact Email Address:
        available to customers only

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Chris Yung



  1.181.  Consultant ID: Hong Kong, Uniforce System Ltd.



       Rm 903B, Kaiser Center, 18 Centre Street, Sai Ying
       Hong Kong, NON United States Not_Applicable

       Hong Kong



     Consulting Specialties:
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +852 24464316


     Company Fax:
        +852 21918185


     Support Phone Number:
        +852 24464316

     Contact Email Address:
        support@uniforce.net

     Company URL:
        http://www.uniforce.net

     Primary Contact:
        Francis Kam



  1.182.  Consultant ID: Hong Kong, Vortex Ltd.



       Tsim Sha Tsui
       Not_Applicable, NON United States Not_Applicable

       Hong Kong



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA

     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (852) 23021988


     Company Fax:
        (852) 23021212


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        scwong@ieee.org

     Company URL:
        http://Comming Soon

     Primary Contact:
        Stephen Wong



  1.183.  Consultant ID: Hong Kong, Yoric Network Ltd.



       Rm 801, On Hong Commerical Building, 145 Hennessy
       Wanchai, NON United States Not_Applicable

       Hong Kong



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat

     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        852 2391 4685


     Company Fax:
        852 2330 4818


     Support Phone Number:
        852 2391 4685

     Contact Email Address:
        support@yoric.com

     Company URL:
        http://www.yoric.com

     Primary Contact:
        Vincent Chan



  1.184.  Consultant ID: Hungary, BalaBit Bt.



       42. Bem Street
       Szekszard, NON United States 7100

       Hungary



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        System Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        ++36209683602


     Company Fax:
        Not_Applicable


     Support Phone Number:
        ++36209683602

     Contact Email Address:
        support@balabit.hu

     Company URL:
        http://www.balabit.hu

     Primary Contact:
        Balazs Scheidler



  1.185.  Consultant ID: India, Atanu M



       H1/55, Mahavir Enclave, Palam-Dabri Road
       New Delhi, NON United States 110045

       India



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        91-11-5033742 91-11-


     Company Fax:
        Not_Applicable


     Support Phone Number:
        91-11-5033742 91-11-

     Contact Email Address:
        atanu@poboxes.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Atanu Not_Applicable



  1.186.  Consultant ID: India, C Consulting



       15/5 18th Cross
       Bangalore, NON United States 560055

       India



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +91 (80) 3440397


     Company Fax:
        +91 (80) 3341137


     Support Phone Number:
        +91 (80) 3440397

     Contact Email Address:
        linux-support@cbconsulting.com

     Company URL:
        http://www.cbconsulting.com

     Primary Contact:
        Atul Chitnis



  1.187.  Consultant ID: India, Connect Solutions



       Not Applicable
       Not Appicable, NON United States 10

       India

     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Network Administration System Administration System
        Security



     Main Distribution:
        Suse


     Other Distribution:
        Easy, Debian, RedHat


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Testing all kinds of


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        not applicable


     Company Fax:
        not applicable


     Support Phone Number:
        not applicable

     Contact Email Address:
        sriram@connectsolutions.net

     Company URL:
        http://www.connectsolutions.net

     Primary Contact:
        Sriram V



  1.188.  Consultant ID: India, DSF Internet Services



       C-29 Neeti Bagh
       New Delhi, NON United States 110049

       India

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        91-11-685-6158


     Company Fax:
        91-11-685-6157


     Support Phone Number:
        91-11-685-6158

     Contact Email Address:
        support@indoworld.com

     Company URL:
        http://www.indoworld.com

     Primary Contact:
        Anmol Taneja



  1.189.  Consultant ID: India, GratiSource Solutions (P) Ltd.



  #308, Shakti Sai Apartments, Chapel Rd, Nampally
  Hyderabad, NON United States 500001

  India



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Debian, Caldera and


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        91-40-3391937


     Company Fax:
        91-40-3391937


     Support Phone Number:
        91-40-3391937

     Contact Email Address:
        sidcarter@softhome.net

     Company URL:
        http://gratisource.8m.com

     Primary Contact:
        Khader Syed



  1.190.  Consultant ID: India, K K Software Services



       B 2, Murugan Towers NAD Kotha Rd
       Visakhapatnam, NON United States 530009

       India



     Consulting Specialties:
        Custom Systems System Administration



     Main Distribution:
        Other


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +91-891-521102


     Company Fax:
        +91-891-596571


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        vijaykittu@yahoo.com

     Company URL:
        http://vizag.8m.com

     Primary Contact:
        Vijaya Kittu Manda


  1.191.  Consultant ID: India, Lateral Software Technology Pvt Ltd



       86 TTK Road
       Madras, NON United States 600 018

       India



     Consulting Specialties:
        Custom Programming



     Main Distribution:
        RedHat


     Other Distribution:
        Easy Linux


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +91=044-4671560


     Company Fax:
        +91-044-4910740


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        linux@lateralsoftware.com

     Company URL:
        http://lateralsoftware.com

     Primary Contact:
        Roshan Thomas


  1.192.  Consultant ID: India, Netangle Com Pvt ltd



       # 2 , Vishal Bhavan , Road no 12, Banjara hills
       Hyderabad, ZZ 500034

       India



     Consulting Specialties:
        CIFS (Samba)



     Main Distribution:
        RedHat


     Other Distribution:
        Debian


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        RPM,TAR


     Reseller Authorizations:
        HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        091-40-3300394


     Company Fax:
        091-40-3391412


     Support Phone Number:
        091-40-3328207

     Contact Email Address:
        goswami@netangle.us-inc.com

     Company URL:
        http://www.netangle.us-inc.com

     Primary Contact:
        satyakam goswami


  1.193.  Consultant ID: India, Shah Micro System



       103, Orental House, 229/231, Samuel Street, Musjid
       Bombay, NON United States 400003

       India



     Consulting Specialties:
        CIFS (Samba) Internet Server Development Netware Connectivity
        Network Administration System Administration Virtual Private
        Networking



     Main Distribution:
        RedHat


     Other Distribution:
        All Linux Flavours


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        All i386 Distributio


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +91-22-8862711


     Company Fax:
        +91-22-8868214


     Support Phone Number:
        +91-22-8862711

     Contact Email Address:
        dinesh@indiamal.com

     Company URL:
        http://http://members.tripod.com/~dineshah/

     Primary Contact:
        Dinesh Shah
  1.194.  Consultant ID: Indonesia, Nayaga Reka Media Aplika, PT



       Jl. Situsari Wetan no 39
       Bandung, NON United States 40265

       Indonesia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        RedHat, Slackware, M


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +62-22-302764


     Company Fax:
        n/a


     Support Phone Number:
        +62-22-302764

     Contact Email Address:
        nayagapt@bdg.centrin.net.id

     Company URL:
        http://nayagarekamedia.hypermart.net/index1.htm

     Primary Contact:
        Andika Triwidada



  1.195.  Consultant ID: Indonesia, Netindo Pusaka Prima pt.



       Duta Harapan Indah  Blok SS/10, Jl. Kapuk Muara
       Jakarta, NON United States 14460

       Indonesia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        +6221 - 6631868


     Company Fax:
        +6221 - 6623606


     Support Phone Number:
        n/a

     Contact Email Address:
        support@netindo.co.id

     Company URL:
        http://www.netindo.co.id

     Primary Contact:
        Andy Luhur



  1.196.  Consultant ID: Indonesia, PT Cakram DataLingga Duaribu



       Jln Gunung Batu 131
       Bogor, NON United States 16610

       Indonesia



     Consulting Specialties:
        CIFS (Samba) Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +62-251-332122


     Company Fax:
        +62-251-332122

     Support Phone Number:
        +62-251-332122

     Contact Email Address:
        linux-support@cdl2000.or.id

     Company URL:
        http://http://www.cdl2000.or.id

     Primary Contact:
        Maliana Harsoadi



  1.197.  Consultant ID: Israel, Breakthrough LTD



       Hatzabar 18/9
       Kiron, NON United States 55106

       Israel



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Network
        Administration System Administration System Security



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        972-52-442549



     Company Fax:
        972-3-6356434


     Support Phone Number:
        972-52-442549

     Contact Email Address:
        webmaster@breakt.co.il

     Company URL:
        http://www.breakt.co.il

     Primary Contact:
        Alex Rier Not_Applicable



  1.198.  Consultant ID: Israel, Init Computers



       35 Hadar St.
       Herzlia, NON United States 46326

       Israel



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +972-9-9582971


     Company Fax:
        +972-9-9582952


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@init.co.il

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Paolo Supino



  1.199.  Consultant ID: Israel, Reuven Lerner -- Communications Con-
  sulting Ltd.



       17 Disraeli Street
       Haifa, NON United States 34333

       Israel



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable


     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +972-4-824-2265


     Company Fax:
        +972-4-826-1219


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        reuven@lerner.co.il

     Company URL:
        http://lerner.co.il

     Primary Contact:
        Reuven Lerner



  1.200.  Consultant ID: Israel, vPrise



       50, Disengof
       Tel-Aviv, NON United States Not_Applicable

       Israel



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        972-54-654576


     Company Fax:
        972-151-54-654576


     Support Phone Number:
        972-54-654576

     Contact Email Address:
        support@vprise.com

     Company URL:
        http://www.vprise.com

     Primary Contact:
        Shai Almog



  1.201.  Consultant ID: Italy, Alessandro Rubini



       Viale Golgi 72
       PAvia, NON United States 27100

       Italy



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Network Administration



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other



     Other Specialty Distribution:
        ET-Linux (embedded 3


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +39 0382 529554


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +39 0382 529554

     Contact Email Address:
        alessandro.rubini@linux.it

     Company URL:
        http://www.linux.it

     Primary Contact:
        Alessandro Rubini



  1.202.  Consultant ID: Italy, ERANET snc



       13H, Via S. Giuseppe
       Conegliano, NON United States 31015

       Italy



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA

     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +39(0)438-415887


     Company Fax:
        +39(0)438-415887


     Support Phone Number:
        +39(0)438-415887

     Contact Email Address:
        andrea.girotto@usa.net

     Company URL:
        http://www.era-net.it

     Primary Contact:
        Andrea Girotto



  1.203.  Consultant ID: Italy, Francesco Patamia



       Via G. Marrazzo, 2
       Cropani Marina, NON United States Not_Applicable

       Italy



     Consulting Specialties:
        CIFS (Samba) E-Commerce Internet Server Development Internet
        (Web) Programming Network Administration System Administration



     Main Distribution:
        Other



     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +390961-961486


     Company Fax:
        +390961-961155


     Support Phone Number:
        +390338-8165310

     Contact Email Address:
        patamia@biponline.com

     Company URL:
        http://http://www.biponline.com/fpnet

     Primary Contact:
        Francesco Patamia



  1.204.  Consultant ID: Italy, Luca Perugini



       Via Furio Camillo 27
       Passo Corese (RI), NON United States 02036

       Italy



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +390765488457


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +3903473392355

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Not_Applicable Not_Applicable



  1.205.  Consultant ID: Italy, Marco Iannacone



       Not_Applicable
       Milano, NON United States I-20090

       Italy



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Internet
        Server Development Network Administration System Administration
        Virtual Private Networking

     Main Distribution:
        Suse


     Other Distribution:
        Red Hat, Slackware,


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Securty, Network int


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.pippo.com

     Primary Contact:
        Marco Iannacone



  1.206.  Consultant ID: Italy, Marco Michelino



       Viale Colli Aminei 36
       Napoli, NON United States 80131

       Italy



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Network Administration System Administration
        System Security



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +390817418669


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        mmarco@hempseed.com

     Company URL:
        http://www.hempseed.com

     Primary Contact:
        Marco Michelino



  1.207.  Consultant ID: Italy, Mauro Barella



       Via Roma, 8
       UDINE, NON United States 33100

       Italy



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +39 0432 512592


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.maurobarella.org

     Primary Contact:
        Mauro Barella



  1.208.  Consultant ID: Italy, PROFUSO



  Not_Applicable
  Abano Terme - Padova, NON United States 35031

  Italy



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +39 0498059070


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@profuso.com

     Company URL:
        http://http://www.profuso.com/

     Primary Contact:
        Giuseppe Zanetti



  1.209.  Consultant ID: Italy, PROSA Progettazione Sviluppo Aperto



       via Degli Zabarella, 3
       Padova, NON United States 35121

       Italy



     Consulting Specialties:
        Custom Programming



     Main Distribution:
        Debian


     Other Distribution:
        PROSA Debian GNU/Lin


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +39 049 66 05 19


     Company Fax:
        +39 049 87 80 504


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Davide Barbieri



  1.210.  Consultant ID: Italy, Panservice



       Via Nervi - CC LT Fiori - Torre 8
       Latina, NON United States 04100

       Italy



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        39 0773 410020


     Company Fax:
        39 0773 410020


     Support Phone Number:
        39 0773 410084

     Contact Email Address:
        helpdesk@panservice.it

     Company URL:
        http://http://www.panservice.it


     Primary Contact:
        Giuliano Peritore



  1.211.  Consultant ID: Italy, Paolo Correnti



       Via dei Monti di S.Paolo 55/O
       Rome, NON United States 00126

       Italy



     Consulting Specialties:
        Custom Systems Internet Server Development Internet (Web)
        Programming System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        3965250639


     Company Fax:
        ---


     Support Phone Number:
        ----

     Contact Email Address:
        pcorrenti@iol.it

     Company URL:
        http://users.iol.it/pcorrenti/index.html

     Primary Contact:
        Paolo Correnti



  1.212.  Consultant ID: Italy, Prometeus di Michele Sciabarr



       via Marco Polo 31
       Martinsicuro, NON United States 64014

       Italy



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        39 0861 761767


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        michele@sciabarra.com

     Company URL:
        http://www.sciabarra.com

     Primary Contact:
        Michele Sciabarr



  1.213.  Consultant ID: Italy, Studio C



       via Romeo Romei 23
       Rome, NON United States 00136

       Italy



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +39639722036



     Company Fax:
        +39639736598


     Support Phone Number:
        +39639722036

     Contact Email Address:
        albe@vdi.net

     Company URL:
        http://www.studioc-advertising.com

     Primary Contact:
        Marco Capecci



  1.214.  Consultant ID: Italy, Studio LEADER Pro



       Via Pietrastretta 76
       TRENTO, NON United States 38100

       Italy



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Network Administration System
        Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        Caldera RedHat


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        HAL91


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Caldera Not Applicable



     Company Phone Number:
        +39 461828229


     Company Fax:
        +39 461829826


     Support Phone Number:
        Not Available

     Contact Email Address:
        info@leader.it

     Company URL:
        http://www.leader.it

     Primary Contact:
        Guido Brugnara



  1.215.  Consultant ID: Japan, M



       1-8-19 Toshimaku Minami Ikebukuro
       Tokyo, NON United States 171

       Japan



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +81 3 5396 5966


     Company Fax:
        +81 3 3983 4542


     Support Phone Number:
        +81 3 5396 5966

     Contact Email Address:
        fisher@m-t.com

     Company URL:
        http://www.m-t.com

     Primary Contact:
        Masahiro Otsuka



  1.216.  Consultant ID: Kuwait, Internet Universe - Network Solutions



       Dasma
       P.O.Box 2, NON United States non

       Kuwait



     Consulting Specialties:
        Custom Systems Firewalls and Internet Security Internet Server
        Development Network Administration System Administration System
        Security



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        General Linux networ



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +965-262-5678


     Company Fax:
        +965-262-5679


     Support Phone Number:
        +965-262-5678

     Contact Email Address:
        support@kuwait-net.com

     Company URL:
        http://www.kuwait-net.com

     Primary Contact:
        Faisal  Al-Abhoul



  1.217.  Consultant ID: Malaysia, JirehBuilderZ Web Techs Snd. Bhd.



       Unit 5.06, Fifth Menara PSCI,
       Penang, NON United States 10050

       Malaysia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        SlackWare


     Specialty Distribution:
        LinuxRouter

     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        604-3700378


     Company Fax:
        604-3700377


     Support Phone Number:
        604-3700378

     Contact Email Address:
        info@jirehtechs.com

     Company URL:
        http://www.jirehtechs.com

     Primary Contact:
        Wai Boon Ng



  1.218.  Consultant ID: Malaysia, Linux Resources Sdn. Bhd.



       No. 33-1, Jalan 46A/26, Pusat Bandar Taman Sri Ram
       Setapak, NON United States 53300

       Malaysia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA
     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +603-4139010


     Company Fax:
        +603-4139011


     Support Phone Number:
        +603-4139010

     Contact Email Address:
        drliwa@pc.jaring.my

     Company URL:
        http://www.ihsan.com/linux

     Primary Contact:
        Dr. Liwaudin Muhamad



  1.219.  Consultant ID: Malaysia, MAGNIFIX



       2102 Wisma Rampai, Jln 34/26
       Kuala Lumpur, NON United States 53300

       Malaysia



     Consulting Specialties:
        Internet Server Development



     Main Distribution:
        RedHat


     Other Distribution:
        SUSE

     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq



     Linux Certifications:
        RedHat



     Company Phone Number:
        603 412 1775


     Company Fax:
        603 412 1550


     Support Phone Number:
        603 412 1776

     Contact Email Address:
        info@magnifix.com.my

     Company URL:
        http://www.magnifix.com.my

     Primary Contact:
        Izauddin  Isa



  1.220.  Consultant ID: Mexico, BUFETE CONSULTOR DE MEXICO



       APDO POSTAL 105-336
       Mexico CityMMexico City, NON United States 11590

       Mexico



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat
     Other Distribution:
        DEBIAN SUSE SLACKWAR


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        EPHYRA CLUSTERS, RDB


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        RedHat



     Company Phone Number:
        +(52)5247-0272


     Company Fax:
        +(52)5247-0272


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@ephyra.com

     Company URL:
        http://ephyra.com

     Primary Contact:
        FELIPE BAROUSSE



  1.221.  Consultant ID: Mexico, BUFETE CONSULTOR DE MEXICO



       APDO POSTAL 105-336
       Mexico CityMMexico City, NON United States 11590

       Mexico



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking

     Main Distribution:
        RedHat


     Other Distribution:
        DEBIAN SUSE SLACKWAR


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        EPHYRA CLUSTERS, RDB


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        RedHat



     Company Phone Number:
        +(52)5247-0272


     Company Fax:
        +(52)5247-0272


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@ephyra.com

     Company URL:
        http://ephyra.com

     Primary Contact:
        FELIPE BAROUSSE



  1.222.  Consultant ID: Mexico, Ephyra Systems (BCM)



       APDO POSTAL 105336
       Mexico City, NON United States 11590

       Mexico



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        DEBIAN SUSE SLACKWAR


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        EPHYRA CLUSTERS, RDB


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        RedHat



     Company Phone Number:
        +(52)5247-0272


     Company Fax:
        +(52)5247-0272


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@ephyra.com

     Company URL:
        http://ephyra.com

     Primary Contact:
        Phillip BAROUSSE



  1.223.  Consultant ID: Mexico, Gustavo Cavazos



       Not_Applicable
       Mexico City, NON United States Not_Applicable

       Mexico


     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        gcavazos@yahoo.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Gustavo Cavazos



  1.224.  Consultant ID: Mexico, Linux Michoacan OpenSource



  186 Gral Antonio Cabales
  Morelia, NON United States 58000

  Mexico



     Consulting Specialties:
        Custom Programming Custom Systems Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        CHARAL


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +5243 246824


     Company Fax:
        +5243 246824


     Support Phone Number:
        +5243 246824

     Contact Email Address:
        linux@ciencia.dcc.umich.mx

     Company URL:
        http://www.ciencia.dcc.umich.mx

     Primary Contact:
        Cederik De Leon



  1.225.  Consultant ID: Mexico, Servicios en Alta Tecnologia



       Jose Ma. Chavez #420, Centro
       Aguascalientes, NON United States 20000

       Mexico



     Consulting Specialties:
        System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        SUSE


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        52(49)15-70-26


     Company Fax:
        52(49)15-70-26


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Hector Vega


  1.226.  Consultant ID: Mexico, Virtual.Net



       Martin Torres #200
       Xalapa, Veracruz, NON United States 91020

       Mexico



     Consulting Specialties:
        E-Commerce Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming System Administration
        System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Slackware 4.0, Suse


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +52 (28) 135187


     Company Fax:
        +52 (28) 135187


     Support Phone Number:
        +52 (28) 249063

     Contact Email Address:
        soporte@virtual.net.mx

     Company URL:
        http://www.virtual.net.mx

     Primary Contact:
        Roman Torres
  1.227.  Consultant ID: Morocco, ANNOUR Technologies



       89 Bd Anfa, Appt. 9 A,
       CASABLANCA, NON United States 20000

       Morocco



     Consulting Specialties:
        E-Commerce



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        RedHat



     Company Phone Number:
        212 2 48 11 34


     Company Fax:
        212 2 48 70 56


     Support Phone Number:
        212 2 48 68 09

     Contact Email Address:
        info@annour.com

     Company URL:
        http://www.annour.com

     Primary Contact:
        Karim BENABID Hicham BENABID


  1.228.  Consultant ID: Netherlands, Abe I.T. B.V.



       Oude haagweg 295
       Den Haag, NON United States 2552 EP

       Netherlands



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +31704400368


     Company Fax:
        +31704400369


     Support Phone Number:
        +31704400368

     Contact Email Address:
        info@aboveit.nl

     Company URL:
        http://www.aboveit.nl

     Primary Contact:
        Alex Schreuder
  1.229.  Consultant ID: Netherlands, BitWizard B.V.



       Van Bronckhorststraat 12
       Delft, NON United States 2612 XV

       Netherlands



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development System Security



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +31-15-2137555


     Company Fax:
        +31-15-2138217


     Support Phone Number:
        +31-15-2137555

     Contact Email Address:
        info@BitWizard.nl

     Company URL:
        http://www.BitWizard.nl

     Primary Contact:
        Roger Wolff

  1.230.  Consultant ID: Netherlands, CMG



       Kralingseweg 241-249
       Rotterdam, NON United States 3009 AN

       Netherlands



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        RedHat



     Company Phone Number:
        +31.10.2537000


     Company Fax:
        +31.2537032


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Henk.Drenth@cmg.nl

     Company URL:
        http://www.cmg.nl


     Primary Contact:
        Henk Drenth



  1.231.  Consultant ID: Netherlands, CistroN



       38, Ondernemingsweg
       Alphen aan den Rijn, NON United States 2404 HN

       Netherlands



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +31-172-421071


     Company Fax:
        +31-172-430979


     Support Phone Number:
        n/a


     Contact Email Address:
        linux@cistron.nl

     Company URL:
        http://www.cistron.nl

     Primary Contact:
        Danny ter Haar



  1.232.  Consultant ID: Netherlands, ComCare IT BV



       Papaverweg 34
       Amsterdam, NON United States 1032 KJ

       Netherlands



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Internet
        (Web) Programming Network Administration System Administration
        System Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        RedHat


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +31 20 4942165


     Company Fax:
        +31 20 4942164

     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.comcare.nl

     Primary Contact:
        Sjoerd Venema



  1.233.  Consultant ID: Netherlands, Le Reseau netwerksystemen BV



       Bieslookstraat 31, Unit A3
       Groningen, NON United States NL-9731 HH

       Netherlands



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        Secure Linux (own di


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        and LinuxRouter


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +31 50 549 2701

     Company Fax:
        +31 50 549 2310


     Support Phone Number:
        +31 50 549 4548

     Contact Email Address:
        support@reseau.nl

     Company URL:
        http://www.reseau.nl/

     Primary Contact:
        Arthur Donkers Rudo de Jong



  1.234.  Consultant ID: Netherlands, Linvision



       Delftechpark 26
       Delft, NON United States 2628 XH

       Netherlands



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet (Web)
        Programming System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +31 15 260 04 33


     Company Fax:
        +31 15 260 04 05


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@linvision.com

     Company URL:
        http://www.linvision.com

     Primary Contact:
        Geerten Schram



  1.235.  Consultant ID: Netherlands, Manna Automatisering



       Meteorenstraat 116
       Hilversum, NON United States 1223 EV

       Netherlands



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Advise


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        31356423980


     Company Fax:
        31356423981


     Support Phone Number:
        31356423982

     Contact Email Address:
        info@manna.nl

     Company URL:
        http://www.manna.nl

     Primary Contact:
        Not_Applicable Not_Applicable



  1.236.  Consultant ID: Netherlands, Maxfort Consultancy



       Albardastraat 11
       Schiedam, NON United States 3119 PA

       Netherlands



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration System Security
        Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Debian, TurboLinux,


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        0031102469224


     Company Fax:
        0031102469225


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        helpdesk@maxfort.com

     Company URL:
        http://www.maxfort.com

     Primary Contact:
        Arjan van Eersel



  1.237.  Consultant ID: Netherlands, Murphy Software BV



       P.O. Box 285
       Enschede, NON United States NL-7500 AG

       Netherlands



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development System Administration
        System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        31 53 4320055


     Company Fax:
        31 53 5360448


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        office@murphy.nl

     Company URL:
        http://www.murphy.nl

     Primary Contact:
        Marc Roelofs



  1.238.  Consultant ID: Netherlands, Netland Internet Services



       Kruislaan 419
       Amsterdam, NON United States 1098 VA

       Netherlands



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        our own


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +31 20 562 8282


     Company Fax:
        +31 20 562 8281


     Support Phone Number:
        +31 20 562 8280

     Contact Email Address:
        support@netland.nl

     Company URL:
        http://www.netland.nl

     Primary Contact:
        Ron Arts



  1.239.  Consultant ID: Netherlands, Romme SE



       Cornelis Trompstraat 90
       Delft, NON United States 2628 RS

       Netherlands



     Consulting Specialties:
        Custom Programming E-Commerce Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming



     Main Distribution:
        RedHat



     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +31-15-2855904


     Company Fax:
        +31-15-2855905


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        akram@xs4all.nl

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Johan Romme



  1.240.  Consultant ID: Netherlands, Root Systems



       van Kinsbergenstraat 73

       Netherlands



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (+31) 70 3460010


     Company Fax:
        (+31) 70 3460118


     Support Phone Number:
        (+31) 703460126

     Contact Email Address:
        support@rootsystems.nl

     Company URL:
        http://www.rootsystems.nl

     Primary Contact:
        Conrad Langford



  1.241.  Consultant ID: Netherlands, Stone IT Services BV



       Jan Steenlaan 3
       Bilthoven, NON United States 3723 BS

       Netherlands



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Netware Connectivity Network Administration
        System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        S.u.S.E.


     Reseller Authorizations:
        Compaq



     Linux Certifications:
        Caldera RedHat



     Company Phone Number:
        +31 30 2287995


     Company Fax:
        +31 30 2287997


     Support Phone Number:
        +31 30 2294653

     Contact Email Address:
        support@stonebv.com

     Company URL:
        http://www.stonebv.com

     Primary Contact:
        M.J. Smit



  1.242.  Consultant ID: Netherlands, X OS Experts in Open Systems BV



       Kruislaan 419
       Amsterdam, NON United States 1098 VA

       Netherlands



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +31 20 6938364


     Company Fax:
        +31 20 6948204


     Support Phone Number:
        +31 20 6938364

     Contact Email Address:
        support@xos.nl

     Company URL:
        http://www.xos.nl

     Primary Contact:
        Jos Vos



  1.243.  Consultant ID: New Zealand, Catalyst IT Ltd



       PO Box 10-225, Level 21, Morrison Kent House, 105
       Wellington, NON United States 6000

       New Zealand

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +64 (4) 499 2267


     Company Fax:
        +64 (4) 499 5596


     Support Phone Number:
        +64 (4) 499 2267

     Contact Email Address:
        linux@cat-it.co.nz

     Company URL:
        http://www.cat-it.co.nz

     Primary Contact:
        Andrew McMillan



  1.244.  Consultant ID: New Zealand, Egressive Limited



  P.O. Box 24 162
  Christchurch, NON United States 8006

  New Zealand



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration



     Main Distribution:
        RedHat


     Other Distribution:
        General Linux instal


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        64 25 229 8147


     Company Fax:
        Not_Applicable


     Support Phone Number:
        64 25 229 8147

     Contact Email Address:
        support@egressive.co.nz

     Company URL:
        http://www.egressive.co.nz

     Primary Contact:
        David Lane



  1.245.  Consultant ID: Nigeria, CyberAge Systems



       6, Rasaq Balogun Str,
       Surulere, Lagos, NON United States Not_Applicable

       Nigeria



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Caldera


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        Others


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        234 01 2602080


     Company Fax:
        234 01 2602080


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        cyberservice@eudoramail.com

     Company URL:
        http://Not_Applicable


     Primary Contact:
        Edwin Okugbo



  1.246.  Consultant ID: Norway, AQS AS



       P.B. 121
       Eidsvoll, NON United States 2080

       Norway



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        47 63962296


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.aqs.as

     Primary Contact:
        Martin Langsjen



  1.247.  Consultant ID: Norway, Initio IT-losninger



       Holtermannsv. 31B
       Trondheim, NON United States 7031

       Norway



     Consulting Specialties:
        Custom Programming Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +47 - 73 83 71 71


     Company Fax:
        +47 - 73 83 71 70
     Support Phone Number:
        +47 - 73 83 71 71

     Contact Email Address:
        initio@initio.no

     Company URL:
        http://www.initio.no

     Primary Contact:
        Pal Loberg



  1.248.  Consultant ID: Not_Applicable, Cybernetrics and Systems Co.
  Ltd.



       34-36 Cipero Rd, Cross Crossing,
       San Fernando, NON United States TTWI

       Not_Applicable



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Caldera


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1 868 653 5960
     Company Fax:
        1 868 659 6604


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@cysco.com

     Company URL:
        http://www.cysco.com

     Primary Contact:
        Kerry Panchoo



  1.249.  Consultant ID: Not_Applicable, L and L Develo Oy



       Sturenkatu 37-41
       HELSINKI, NON United States 00550

       Not_Applicable



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Network Administration System
        Administration Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        v5.2


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +358-40-500 5635
     Company Fax:
        +358-9-7269 2988


     Support Phone Number:
        +358-9-7269 2980

     Contact Email Address:
        develo@saunalahti.fi

     Company URL:
        http://www.develo.fi

     Primary Contact:
        Tomi Lind



  1.250.  Consultant ID: Pakistan, Atlantic 2000 Micro Care



       Al-Habib Arcade, Near Shell Petrol Pump,  Clifton
       Karachi, NON United States xxx

       Pakistan



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable

     Company Phone Number:
        92 21 5872379


     Company Fax:
        92 21 5872367


     Support Phone Number:
        92 21 5872379

     Contact Email Address:
        info@atlantic2000.com

     Company URL:
        http://www.atlantic2000.com

     Primary Contact:
        Farhan Ghafoor



  1.251.  Consultant ID: Pakistan, GeneralSoft (Pvt) Ltd



       179-C-1 Model Town
       Lahore, NON United States 54700

       Pakistan



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Internet Server
        Development Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable
     Company Phone Number:
        +92 42 5836152


     Company Fax:
        +92 42 5834920


     Support Phone Number:
        +92 42 5880851

     Contact Email Address:
        linux@generalsoft.com

     Company URL:
        http://www.generalsoft.com

     Primary Contact:
        Abid Nasim



  1.252.  Consultant ID: Pakistan, Instec Digital Systems



       904 Fortune Centre, 45A Block 6 PECHS
       Karachi, NON United States 75400

       Pakistan



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        9221-4547281


     Company Fax:
        9221-4547282


     Support Phone Number:
        9221-4547283

     Contact Email Address:
        support@instecdigital.com

     Company URL:
        http://www.instecdigital.com

     Primary Contact:
        Mudassir Khan



  1.253.  Consultant ID: Philippines, MISTRONIX



       153 Julio Pacana St
       Cagayan de Oro, NON United States 9000

       Philippines



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        Other


     Other Distribution:
        SLACKWARE


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        SLACKWARE


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        63 (8822) 724249


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        mistronix@linuxstart.com

     Company URL:
        http://www.linuxstart.com/~mistronix

     Primary Contact:
        Noel Mistula



  1.254.  Consultant ID: Poland, AM ELEKTRONIK s. c.



       ul. Biala 7
       Gdansk, NON United States 80-435

       Poland



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Network Administration System Administration
        System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +48 58 3440061


     Company Fax:
        +48 58 3440061


     Support Phone Number:
        Not Available

     Contact Email Address:
        amelektr@itnet.pl

     Company URL:
        http://www.itnet.pl/amelektr

     Primary Contact:
        Marek Michalkiewicz



  1.255.  Consultant ID: Poland, Internet Designers s.c.



       Rynek 58
       Wroclaw, NON United States 50-116

       Poland



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet (Web)
        Programming Network Administration System Administration



     Main Distribution:
        Debian


     Other Distribution:
        NA



     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +48713410099


     Company Fax:
        +48713410099


     Support Phone Number:
        +48713460827

     Contact Email Address:
        support@id.pl

     Company URL:
        http://www.id.pl

     Primary Contact:
        Ryszard Lach



  1.256.  Consultant ID: Poland, RG Studio



       Limanowskiego 23
       Warszawa, NON United States 02-934

       Poland



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        RedHat

     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Cobalt


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +48 22 651 66 38


     Company Fax:
        +48 22 651 66 38


     Support Phone Number:
        +48 22 651 66 38

     Contact Email Address:
        info@rgstudio.com.pl

     Company URL:
        http://www.rgstudio.com.pl

     Primary Contact:
        Jan Rychter



  1.257.  Consultant ID: Poland, Softomat Ltd.



       Krynicka 1
       Gdansk, NON United States 80-393

       Poland



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +48 58 5543 730


     Company Fax:
        +48 58 556 11 76


     Support Phone Number:
        +48 58 5543 731

     Contact Email Address:
        softomat@softomat.com.pl

     Company URL:
        http://www.softomat.com.pl

     Primary Contact:
        Jacek Kijewski



  1.258.  Consultant ID: Portugal, COM2000 Sistemas Informaticos



       APARTADO 13098
       LISBOA, NON United States 1019

       Portugal



     Consulting Specialties:
        Internet Server Development



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +351 1 8478838


     Company Fax:
        +351 1 8475438


     Support Phone Number:
        +351 1 8478838

     Contact Email Address:
        linux@com2000si.com

     Company URL:
        http://www.com2000si.com

     Primary Contact:
        Not_Applicable Not_Applicable



  1.259.  Consultant ID: Portugal, S CONSULTORES LDA



       R. Prof. Fernando Fonseca, 16
       Lisboa, NON United States 1600-618

       Portugal



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Internet
        Server Development Netware Connectivity Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        351 1 757 17 18


     Company Fax:
        351 1 757 17 33


     Support Phone Number:
        351 1 7520017

     Contact Email Address:
        sf@sfconsultores.pt

     Company URL:
        http://www.sfconsultores.pt

     Primary Contact:
        Jos Ferradeira



  1.260.  Consultant ID: Puerto Rico, EZ Networks



       PO Box 3534
       Guaynabo, PR 00970

       Puerto Rico



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Internet Server Development Internet (Web) Programming Netware
        Connectivity Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        787-289-7801


     Company Fax:
        787-289-8779


     Support Phone Number:
        NA

     Contact Email Address:
        info@ez-networks.com

     Company URL:
        http://www.ez-networks.com

     Primary Contact:
        Jose Torres



  1.261.  Consultant ID: Romania, EVERCOMM Serv SRL



  Str. Ciucea nr.8, bl.L18, ap.189
  Bucharest, NON United States 7400

  Romania



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +40-9-254-4355


     Company Fax:
        +40-1-345-4355


     Support Phone Number:
        +40-9-254-4355

     Contact Email Address:
        support@evercomm.ro

     Company URL:
        http://www.evercomm.ro

     Primary Contact:
        Mihnea Stoenescu



  1.262.  Consultant ID: Russia, Sofia Ltd.



       PO Box 188
       Kazan, NON United States 420101

       Russia



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Mandrake


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +7-8432-343469


     Company Fax:
        NA


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        sherba@sofia.cgb18.kcn.ru

     Company URL:
        http://NA

     Primary Contact:
        Andrew Sherba



  1.263.  Consultant ID: Singapore, Aeon Xe Technology Pte Ltd



       38 Edgware Road
       Singapore, NON United States 799781

       Singapore



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Network
        Administration System Administration System Security



     Main Distribution:
        Suse


     Other Distribution:
        Redhat, Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        654846834


     Company Fax:
        654842687


     Support Phone Number:
        Not Available

     Contact Email Address:
        support@aeonxe.com
     Company URL:
        http://www.aeonxe.com

     Primary Contact:
        Eddie  Tan



  1.264.  Consultant ID: Singapore, LinuxAsia Pte Ltd



       No. 2 Alexandra Road, #05-03 Delta House
       Singapore, NON United States 159919

       Singapore



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Internet Server
        Development Network Administration System Administration Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        65-272 5482


     Company Fax:
        65-234 2400


     Support Phone Number:
        65-272 5482
     Contact Email Address:
        support@linuxasia.com

     Company URL:
        http://www.linuxasia.com

     Primary Contact:
        Stephane Benoist



  1.265.  Consultant ID: Singapore, Webworks Pte Ltd



       37, Lorong 23 Geylang, #03-04, Yu Li Industrial Bu
       Singapore, NON United States 388371

       Singapore



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Slackware


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +65 741 9526


     Company Fax:
        +65 749 3806
     Support Phone Number:
        +65 741 9526

     Contact Email Address:
        support@webworks.com.sg

     Company URL:
        http://www.webworks.com.sg

     Primary Contact:
        Lon Voon Ong



  1.266.  Consultant ID: South Africa, Computer Development Systems



       P.O.Box 40012
       Cleveland, NON United States 2022

       South Africa



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Industrial


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +27-11-615-7983

     Company Fax:
        +27-11-615-8650


     Support Phone Number:
        +27-11-615-7983

     Contact Email Address:
        support@lrlabs.com

     Company URL:
        http://www.lrlabs.com

     Primary Contact:
        Linda Lessing



  1.267.  Consultant ID: South Africa, Neogenix



       Pineslopes Office Park; East Block; Witkoppen Road
       Johannesburg, NON United States Not_Applicable

       South Africa



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        RedHat


     Company Phone Number:
        +27 (0)11 465-0798


     Company Fax:
        +27 (0)11 465-9688


     Support Phone Number:
        +27 (0)11 465-0796

     Contact Email Address:
        marius@neogenix.co.za

     Company URL:
        http://www.neogenix.co.za

     Primary Contact:
        Theunis Botha



  1.268.  Consultant ID: South Africa, Obsidian Systems



       Unit 3, Boskruin Business Park, Boskruin
       Johannesburg, NON United States 2156

       South Africa



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Netware Connectivity
        Network Administration System Administration System Security
        Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +27-11-792-6500


     Company Fax:
        +27-11-792-6522


     Support Phone Number:
        +27-11-792-6500

     Contact Email Address:
        support@obsidian.co.za

     Company URL:
        http://www.obsidian.co.za

     Primary Contact:
        Anton de Wet



  1.269.  Consultant ID: South Africa, Qualica Technologies (Pty) Ltd



       28 8th Avenue, Parktown North
       Gauteng, NON United States 2193

       South Africa



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Jurix


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +27 11 442 9090


     Company Fax:
        +27 11 442 9090


     Support Phone Number:
        +27 11 442 9090

     Contact Email Address:
        support@qualica.com

     Company URL:
        http://www.qualica.com

     Primary Contact:
        Kezia Cousins



  1.270.  Consultant ID: Spain, ACCESSUS - Proyectos y Consultores en
  Telecomunica



       Moctezuma, 4 - 1
       Santander - Cantabria, NON United States 39003

       Spain



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other
     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +34 942 31 80 55


     Company Fax:
        +34 942 31 80 56


     Support Phone Number:
        +34 942 31 80 55

     Contact Email Address:
        seguridad@grupoaccessus.com

     Company URL:
        http://www.grupoaccessus.com

     Primary Contact:
        Jose Antonio Revilla



  1.271.  Consultant ID: Spain, Atica Sistemas, SL



       Ronda Po XII, 1-A, 2, mod. 5
       Sevilla, NON United States 41008

       Spain



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA

     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +34-954368107


     Company Fax:
        +34-954367159


     Support Phone Number:
        +34-954368107

     Contact Email Address:
        soporte-linux@aticasistemas.com

     Company URL:
        http://www.aticasistemas.com

     Primary Contact:
        Marco Antonio Blanco



  1.272.  Consultant ID: Spain, Innovacion y Futuro s.l.



       Plaza de S'Antigor, 3
       Manacor, NON United States 07500

       Spain



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Netware Connectivity Virtual Private
        Networking



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        Caldera



     Company Phone Number:
        +34 971846014


     Company Fax:
        +34 971846014


     Support Phone Number:
        +34 971846014

     Contact Email Address:
        info@i-futuro.com

     Company URL:
        http://www.i-futuro.com

     Primary Contact:
        Pascal Peregrina



  1.273.  Consultant ID: Spain, LANGRE INGENIEROS S.L.



       Castilla 95
       Santander, NON United States 39009

       Spain



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Netware Connectivity Network Administration System
        Administration Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        34-942-33-56-33


     Company Fax:
        34-942-35-42-75


     Support Phone Number:
        34-942-33-56-33

     Contact Email Address:
        linux@langre.com

     Company URL:
        http://www.langre.com

     Primary Contact:
        Arturo  Limon



  1.274.  Consultant ID: Spain, Linux Sistemas



       C/ Emilio Carrere, 8 5izq
       Madrid, ZZ Not_Applicable

       Spain



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Network
        Administration System Administration System Security
     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +34914459494


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +34914459494

     Contact Email Address:
        vaceituno@hotmail.com

     Company URL:
        http://www.hotmail.com

     Primary Contact:
        Vicente Aceituno



  1.275.  Consultant ID: Sweden, Ewing Data AB



       Gtgatan 39
       Stockholm, NON United States 11621

       Sweden



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        RedHat, Debian, Cald


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +46 (0)8 643-1106


     Company Fax:
        +46 (0)8 643-1106


     Support Phone Number:
        +46 (0)8 643-1106

     Contact Email Address:
        admin@ewingdata.com

     Company URL:
        http://www.ewingdata.com

     Primary Contact:
        James Ewing



  1.276.  Consultant ID: Sweden, Mandator Sverige AB



       Box 6074
       Gteborg, NON United States 400 60

       Sweden


     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Netware Connectivity Network Administration System
        Administration Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        031-7076900


     Company Fax:
        031-7076969


     Support Phone Number:
        031-7076990

     Contact Email Address:
        helpdesk@mandator.se

     Company URL:
        http://www.mandator.se

     Primary Contact:
        Ulrik Holmn



  1.277.  Consultant ID: Sweden, Omicron Software Systems AB



       Borgarfjordsgatan 13
       Kista, NON United States S-164 40

       Sweden

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Other


     Other Distribution:
        ALL


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        46 8 7510180


     Company Fax:
        46 8 7039413


     Support Phone Number:
        46 8 7512940

     Contact Email Address:
        support@omicron.se

     Company URL:
        http://www.omicron.se

     Primary Contact:
        Johan Nordin



  1.278.  Consultant ID: Sweden, South Pole AB



  Banvaktsvgen 12
  Solna, NON United States 171 48

  Sweden



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +46 (0)8 566 106 50


     Company Fax:
        +46 (0)8 566 106 01


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@southpole.se

     Company URL:
        http://southpole.se

     Primary Contact:
        Jakob Sandgren



  1.279.  Consultant ID: Sweden, Tarkus



       Flitiga Lisas v. 8
       Vsters, NON United States 72246

       Sweden



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Network Administration System Administration
        System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        Not_Applicable


     Company Fax:
        +33 4 50602749


     Support Phone Number:
        +46 70 75 22246

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Carlos Vidal
  1.280.  Consultant ID: Sweden, Textalk AB



       Kroksltts fabriker 64
       Gteborg, NON United States 43137

       Sweden



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        ALL


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +46 31 872920


     Company Fax:
        +46 31 674894


     Support Phone Number:
        NA

     Contact Email Address:
        info@textalk.se

     Company URL:
        http://www.textalk.se

     Primary Contact:
        Henryk Rubinstein
  1.281.  Consultant ID: Sweden, TheLogic



       Lingonstigen 24
       SKVDE, NON United States 541 33

       Sweden



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +46-500-459772


     Company Fax:
        +46-500-459773


     Support Phone Number:
        +46-500-459772

     Contact Email Address:
        thomas@thelogic.com

     Company URL:
        http://www.thelogic.com

     Primary Contact:
        Thomas Ekstrm



  1.282.  Consultant ID: Sweden, Xantus AB



       Bredgatan 10
       Lund, NON United States S-222 21

       Sweden



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +46 46 399200


     Company Fax:
        +46 46 399201


     Support Phone Number:
        +46 46 399200


     Contact Email Address:
        info@xantus.se

     Company URL:
        http://www.xantus.se

     Primary Contact:
        Henrik Carling



  1.283.  Consultant ID: Switzerland, 3T



       Gassackerweg 47
       Frenkendorf, NON United States CH-4402

       Switzerland



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        Suse


     Other Distribution:
        RedHat, Stampede


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +41 61 303 91 91


     Company Fax:
        +41 61 303 91 92
     Support Phone Number:
        +41 61 303 91 91

     Contact Email Address:
        info@t-t-t.com

     Company URL:
        http://www.t-t-t.com

     Primary Contact:
        Stefan Schaefer



  1.284.  Consultant ID: Switzerland, ALPHANET NF



       Battieux 6c
       Colombier, NON United States 2013

       Switzerland



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development System
        Administration System Security



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +41328414014


     Company Fax:
        +41328414081


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        schaefer@alphanet.ch

     Company URL:
        http://www-internal.alphanet.ch

     Primary Contact:
        Marc SCHAEFER



  1.285.  Consultant ID: Switzerland, Born Consulting



       Brunnadernstrasse 3
       Berne, NON United States 3006

       Switzerland



     Consulting Specialties:
        CIFS (Samba)



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        MkLinux and SPARC Li


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +41 (0)79 338 95 79
     Company Fax:
        -


     Support Phone Number:
        +41 (0)79 338 95 79

     Contact Email Address:
        flborn@spectraweb.ch

     Company URL:
        http://www.spectraweb.ch

     Primary Contact:
        Fritz Lorenz Born



  1.286.  Consultant ID: Switzerland, CONNEXT Communications



       Lebrigstrasse 1
       Goetighofen, NON United States 8583

       Switzerland



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        +41-71 640 0410


     Company Fax:
        +41-71 640 0411


     Support Phone Number:
        +41-71 640 0410

     Contact Email Address:
        support@connext.ch

     Company URL:
        http://www.connext.ch

     Primary Contact:
        Mauro Canal



  1.287.  Consultant ID: Switzerland, Coxbit GmbH



       Postgasse 6
       Zollikofen, NON United States 3052

       Switzerland



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +41 31 9811 60 35


     Company Fax:
        +41 31 9811 60 35


     Support Phone Number:
        +41 31 9811 60 35

     Contact Email Address:
        info@coxbit.ch

     Company URL:
        http://http://www.coxbit.ch

     Primary Contact:
        Henriette Fux



  1.288.  Consultant ID: Switzerland, Didier Frick, Freelance Software
  Engineer



       Chasselas 32a
       Peseux, NON United States 2034

       Switzerland



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +41 (32) 731 49 29


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +41 (32) 731 49 29

     Contact Email Address:
        dfrick@dial.eunet.ch

     Company URL:
        http://www.dfr.ch

     Primary Contact:
        Didier Frick



  1.289.  Consultant ID: Switzerland, ETV Software Engineering S.A.



       Ch. du Pavillon 2, PO Box 242
       Grand Saconnex, NON United States 1218

       Switzerland



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other

     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +41 22 717 64 00


     Company Fax:
        +41 22 717 64 01


     Support Phone Number:
        +41 22 717 64 18

     Contact Email Address:
        linux-support@software-engineering.ch

     Company URL:
        http://www.software-engineering.ch

     Primary Contact:
        Joel Margot



  1.290.  Consultant ID: Switzerland, Erik Rossen



       Rue Centrale 26
       Chavannes-Renens, NON United States CH-1022

       Switzerland



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Internet (Web)
        Programming System Administration



     Main Distribution:
        Other


     Other Distribution:
        NA



     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +41 21 636 42 80


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Erik Rossen



  1.291.  Consultant ID: Switzerland, InfoDevice Sagl



       V. Castelrotto 20
       Locarno, NON United States CH-6600

       Switzerland



     Consulting Specialties:
        Not_Applicable


     Main Distribution:
        Suse


     Other Distribution:
        NA



     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +41 91 7600168


     Company Fax:
        +41 91 7600169


     Support Phone Number:
        +41 91 7600168

     Contact Email Address:
        infodevice@ticino.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Giuseppe Abbatiello



  1.292.  Consultant ID: Switzerland, Penta Group AG



       Badenerstrasse 701
       ZURICH, NON United States CH-8048

       Switzerland



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Network Administration System Administration



     Main Distribution:
        Other



     Other Distribution:
        ALL (whatever Custom


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +41 1 438 50 50


     Company Fax:
        +41 1 438 50 60


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Benedikt Hochstrasser



  1.293.  Consultant ID: Switzerland, SciOS Scientific Operating Systems
  GmbH



       Not_Applicable
       Islikon, NON United States 8546

       Switzerland



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Network
        Administration System Administration System Security


     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        ++41-52-366-52-15


     Company Fax:
        ++41-52-366-52-14


     Support Phone Number:
        ++41-52-366-52-15

     Contact Email Address:
        support@scios.ch

     Company URL:
        http://www.scios.ch

     Primary Contact:
        Not_Applicable Not_Applicable



  1.294.  Consultant ID: Switzerland, Technology Solutions



       Not_Applicable
       Pfaffhausen, NON United States 8118

       Switzerland



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking
     Main Distribution:
        RedHat


     Other Distribution:
        Debian, Suse


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Linux/AXP


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +41 1 825 28 36


     Company Fax:
        +41 1 825 28 36


     Support Phone Number:
        Not Available

     Contact Email Address:
        linux-support@feigin.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Not_Applicable Not_Applicable



  1.295.  Consultant ID: Switzerland, Wescom GmbH



       Wesemlinstr. 37
       Luzern, NON United States CH-6002

       Switzerland



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration



     Main Distribution:
        Debian


     Other Distribution:
        RedHat


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +41 41 4221050


     Company Fax:
        +41 41 4221051


     Support Phone Number:
        +41 41 4221050

     Contact Email Address:
        mail@wescom.net

     Company URL:
        http://www.wescom.ch

     Primary Contact:
        Markus Fischer



  1.296.  Consultant ID: Taiwan, Daniel C. Chao



       PO Box 84-511
       Taipei, NON United States 100

       Taiwan



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +886935630111


     Company Fax:
        +88628731535


     Support Phone Number:
        +886935630111

     Contact Email Address:
        danchao@o3.net

     Company URL:
        http://www.o3.net

     Primary Contact:
        Daniel Chao



  1.297.  Consultant ID: Taiwan, WHINSTONE INFO. CO., LTD.



       Not_Applicable
       TAIPEI, NON United States 105

       Taiwan

     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        886-2-27492626


     Company Fax:
        886-2-27468790


     Support Phone Number:
        886-2-27492626

     Contact Email Address:
        info@whinstone.com

     Company URL:
        http://www.whinstone.com

     Primary Contact:
        Anthony Hsia



  1.298.  Consultant ID: Thailand, Software Advanced Solutions Co., Ltd.



  48 Villa 1, Yaowarat Soi 1
  Phuket, NON United States 83000

  Thailand



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +66 76 218 826


     Company Fax:
        +66 76 214 041


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.sas.co.th

     Primary Contact:
        Rudiger Koch



  1.299.  Consultant ID: Togo, HTP Communication Pvt. Ltd



       1/236, Kalikasthan, Dillibazar
       Kathmandu, NON United States 11188

       Togo



     Consulting Specialties:
        Internet Server Development



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM Not Applicable



     Linux Certifications:
        RedHat Not Applicable



     Company Phone Number:
        9771472072


     Company Fax:
        9771496620


     Support Phone Number:
        9771415772

     Contact Email Address:
        ssupport@htp.com.np

     Company URL:
        http://www.namaste.com.np

     Primary Contact:
        Ranjan  Koirala


  1.300.  Consultant ID: Turkey, Gelecek A.S



       Perpa Ticaret Merkezi Kat:11 B Blok No:1932
       Istanbul, NON United States Not_Applicable

       Turkey



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        EasyLinux


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +90 212 2107194


     Company Fax:
        +90 212 2100442


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        destek@gelecek.com.tr

     Company URL:
        http://www.gelecek.com.tr

     Primary Contact:
        Gorkem Cetin
  1.301.  Consultant ID: Turkey, YORE Elektronik Yayimcilik A.S.



       Halaskargazi C 301K 5  Sisli
       Istanbul, NON United States 80260

       Turkey



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming System Security Virtual Private
        Networking



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +90 212 234 0090


     Company Fax:
        +90 212 230 7142


     Support Phone Number:
        +90 212 234 0090

     Contact Email Address:
        destek@yore.com.tr

     Company URL:
        http://http://www.yore.net.tr/


     Primary Contact:
        Tunc Ozbilgin



  1.302.  Consultant ID: US, AK, HB Technical Services



       PO Box 60731
       Fairbanks, AK 99706

       US



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        907-479-2403


     Company Fax:
        none


     Support Phone Number:
        907-479-2403

     Contact Email Address:
        hbtech@mosquitonet.com
     Company URL:
        http://www.mosquitonet.com/~hbtech

     Primary Contact:
        Howard Benson



  1.303.  Consultant ID: US, AL, Linux Support Services



       923 Stage Road Suite F
       Auburn, AL 36830

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (877) LINUX-ME (toll


     Company Fax:
        (334) 887-2299



     Support Phone Number:
        (334) 887-1042

     Contact Email Address:
        staff@linux-support.net

     Company URL:
        http://www.linux-support.net

     Primary Contact:
        Mark Spencer



  1.304.  Consultant ID: US, AL, Megabyte Information Services, Inc.



       PO Box 122
       Pell City, AL 35125

       US



     Consulting Specialties:
        Custom Programming E-Commerce Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        2052227706



     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@meginfo.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        David Miller



  1.305.  Consultant ID: US, AL, Technology Unlimited, Inc.



       3336 Summit Drive
       Birmingham, AL 35243

       US



     Consulting Specialties:
        CIFS (Samba) Internet Server Development Network Administration
        System Administration Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        205-969-1110


     Company Fax:
        205-969-7113


     Support Phone Number:
        205-969-1110

     Contact Email Address:
        support@tuial.com

     Company URL:
        http://www.tuial.com

     Primary Contact:
        Edward McLain



  1.306.  Consultant ID: US, AL, The Net Effect, LLC



       P O Box 885
       Mobile, AL 36601

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration System Security
        Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        USA (334) 433 0196


     Company Fax:
        USA (334) 433 5371


     Support Phone Number:
        USA (334) 433 0196

     Contact Email Address:
        grs@theneteffect.com

     Company URL:
        http://www.theneteffect.com

     Primary Contact:
        Glenda Snodgrass



  1.307.  Consultant ID: US, AZ, Brindlesoft



       PO Box 237
       St. David, AZ 85630-0237

       US



     Consulting Specialties:
        Custom Programming System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable

     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (520) 720-9431


     Company Fax:
        Not_Applicable


     Support Phone Number:
        (520) 720-9431

     Contact Email Address:
        thegrendel@theriver.com

     Company URL:
        http://www.theriver.com

     Primary Contact:
        Mendel Cooper



  1.308.  Consultant ID: US, AZ, Jay Ts



       P.O. Box 410
       Sedona, AZ 86339

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (888) 282-0549


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://http://jayts.cx

     Primary Contact:
        Jay Ts



  1.309.  Consultant ID: US, AZ, LucidImage Technologies



       P.O. Box 875
       Chandler, AZ 85224-0875

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet (Web) Programming Netware
        Connectivity Network Administration System Administration
        Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter

     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        480 967 6899


     Company Fax:
        480 641 0248


     Support Phone Number:
        480 967 6899

     Contact Email Address:
        support@lucid-image.com

     Company URL:
        http://www.lucid-image.com

     Primary Contact:
        Bill Williams



  1.310.  Consultant ID: US, AZ, MagusNet, Inc.



       1201 East Washington Ave.
       Gilbert, AZ 85234

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        602-892-8186


     Company Fax:
        NA


     Support Phone Number:
        NA

     Contact Email Address:
        support@magusnet.com

     Company URL:
        http://www.magusnet.com

     Primary Contact:
        Jean Francois



  1.311.  Consultant ID: US, AZ, Tapestry Software



       7990 E. Maguey Drive
       Tucson, AZ 85750

       US



     Consulting Specialties:
        Custom Programming Internet (Web) Programming System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA

     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        01-520-749-2728


     Company Fax:
        01-520-749-2885


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        sbw@tapestry.tucson.az.us

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Steve Wampler



  1.312.  Consultant ID: US, CA, Aedra Associates, Inc.



       Not_Applicable
       San Jose, CA 95117

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        RedHat

     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        408-246-0875


     Company Fax:
        Not_Applicable


     Support Phone Number:
        408-246-0875

     Contact Email Address:
        support@aedra.com

     Company URL:
        http://www.aedra.com

     Primary Contact:
        Steve Otto



  1.313.  Consultant ID: US, CA, Aztronic Enterpises



       Not_Applicable
       San Diego, CA Not_Applicable

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        619 585-1063


     Company Fax:
        619 585-1063


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@aztronic.com

     Company URL:
        http://www.aztronic.com

     Primary Contact:
        Randy Church



  1.314.  Consultant ID: US, CA, Beyond 2000 Solutions



       2750 E. Spring St. Suite 230
       Long Beach, CA 90806

       US



     Consulting Specialties:
        Firewalls and Internet Security Network Administration System
        Administration System Security
     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat Not Applicable



     Company Phone Number:
        562-997-9500


     Company Fax:
        562-997-9504


     Support Phone Number:
        n/a

     Contact Email Address:
        abusir@b2000s.com

     Company URL:
        http://www.b2000s.com

     Primary Contact:
        Asem Abusir



  1.315.  Consultant ID: US, CA, Carumba



       55 West 20th Ave Suite #113
       San Mateo, CA 94402

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        650 572 2644


     Company Fax:
        650 572 2644


     Support Phone Number:
        650 572 2644

     Contact Email Address:
        support@carumba.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Jauder Ho



  1.316.  Consultant ID: US, CA, Cyber Sleuths



       715 Tender Ln.
       Foster City, CA 94404

       US



     Consulting Specialties:
        Custom Programming Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        650-571-7771


     Company Fax:
        650-571-7771


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        evan715@sirius.com

     Company URL:
        http://www.cyber-sleuths.com

     Primary Contact:
        Evan Klinger



  1.317.  Consultant ID: US, CA, David Fetter Consulting



       888 O'Farrell Street, Suite E1205
       San Francisco, CA 94109

       US

     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 415 567 2690


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        dfetter@best.com

     Company URL:
        http://www.best.com

     Primary Contact:
        David Fetter



  1.318.  Consultant ID: US, CA, Gregg Weber



       Not_Applicable
       El Sobrante, CA 94803

       US

     Consulting Specialties:
        Internet Server Development Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        510 223-3310


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Not_Applicable Not_Applicable



  1.319.  Consultant ID: US, CA, Herlein Engineering



       2034 Filbert Street
       San Francisco, CA 94123

       US

     Consulting Specialties:
        Custom Programming Custom Systems Internet Server Development
        Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        415-519-3650


     Company Fax:
        415-440-9015


     Support Phone Number:
        415-519-3650

     Contact Email Address:
        support@herlein.com

     Company URL:
        http://www.herlein.com

     Primary Contact:
        Greg Herlein



  1.320.  Consultant ID: US, CA, Hiverworld, LLC



       1918 University Av e
       Berkeley, CA 94704

       US



     Consulting Specialties:
        System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        510.848.0740


     Company Fax:
        n/a


     Support Phone Number:
        510.848.0740

     Contact Email Address:
        support@hiverworld.com

     Company URL:
        http://www.hiverworld.com

     Primary Contact:
        Gretchen Flowers



  1.321.  Consultant ID: US, CA, Intrusoft



       1433 Superior Ave #373
       Newport Beach, CA 92663

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        949-515-3554


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@intrusoft.com

     Company URL:
        http://www.intrusoft.com

     Primary Contact:
        Jean-Christophe Smith



  1.322.  Consultant ID: US, CA, Inverselogic, LLC



       2947A Honolulu Ave,
       Glendale, CA 91214q=

       US

     Consulting Specialties:
        Internet Server Development Internet (Web) Programming Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Caldera


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        all


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Caldera RedHat



     Company Phone Number:
        818-542-3941


     Company Fax:
        818-542-3942


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@inverselogic.com

     Company URL:
        http://www.inverselogic.com

     Primary Contact:
        Ara Aslanian



  1.323.  Consultant ID: US, CA, Jalan Network Services



       24664 Shepardson Drive
       Loma Linda, CA 92354

       US

     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Customized Redhat fo


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        909-799-3805


     Company Fax:
        909-799-3285


     Support Phone Number:
        909-799-3805

     Contact Email Address:
        ops@jalan.com

     Company URL:
        http://www.jalan.com

     Primary Contact:
        Matthew Marlowe



  1.324.  Consultant ID: US, CA, KSI



  1677 Azusa Ave, #240
  Hacienda Heights, CA 91745

  US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        714-937-2469


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@klabs.net

     Company URL:
        http://www.klabs.net

     Primary Contact:
        Dan Kuykendall



  1.325.  Consultant ID: US, CA, KrystalBox Technologies, Inc.



       555 Bryant Street #359
       Palo Alto, CA 94301

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity System Security
        Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        650-327-8929


     Company Fax:
        650-327-8949


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@krystalbox.com

     Company URL:
        http://www.krystalbox.com


     Primary Contact:
        Travis Godbout



  1.326.  Consultant ID: US, CA, Linuxcare



       650 Townsend Street
       San Francisco, CA 94103

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        We support ALL distr


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        We support ALL distr


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Caldera RedHat



     Company Phone Number:
        888-546-4878


     Company Fax:
        415-701-7457


     Support Phone Number:
        888-546-4878

     Contact Email Address:
        support@linuxcare.com
     Company URL:
        http://www.linuxcare.com

     Primary Contact:
        David LaDuke



  1.327.  Consultant ID: US, CA, Lone Peak Software



       164 N. Katherine Drive
       Ventura, CA 93003-1509

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        805-652-1301


     Company Fax:
        805-652-1301


     Support Phone Number:
        Not_Applicable
     Contact Email Address:
        lonepeak@pacbell.net

     Company URL:
        http://www.lonepeak.net

     Primary Contact:
        Joe Duran



  1.328.  Consultant ID: US, CA, MK Information System Services



       Not_Applicable
       Roseville, CA Not_Applicable

       US



     Consulting Specialties:
        Custom Programming Custom Systems Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration



     Main Distribution:
        Suse


     Other Distribution:
        Caldera, RedHat


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (916)765-2253


     Company Fax:
        Not_Applicable

     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        blaw@ns.net

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Bob Law



  1.329.  Consultant ID: US, CA, Mountain Ranch Design



       P.O. Box 679
       Mountain Ranch, CA 95246

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        209-754-3108


     Company Fax:
        209-754-0273


     Support Phone Number:
        1-888-551-3003

     Contact Email Address:
        support@mtnranch.com

     Company URL:
        http://www.mtnranch.com

     Primary Contact:
        Mark Hansen



  1.330.  Consultant ID: US, CA, Network Presence, LLC



       548 S Spring St, Ste 1015
       Los Angeles, CA 90013

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        213-627-4356


     Company Fax:
        213-627-4357


     Support Phone Number:
        213-627-4356

     Contact Email Address:
        support@netpr.com

     Company URL:
        http://www.netpr.com

     Primary Contact:
        Robert Brown



  1.331.  Consultant ID: US, CA, Newyen Technology



       3535 El Portal Dr C206
       El Sobrante, CA 94803

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP Not Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        1-510-758-5950


     Company Fax:
        Not_Applicable


     Support Phone Number:
        1-510-758-5950

     Contact Email Address:
        sales@newyen.com

     Company URL:
        http://www.newyen.com

     Primary Contact:
        Kent Nguyen



  1.332.  Consultant ID: US, CA, Oration



       7 West 41st Avenue, Suite 78
       San Mateo, CA 94403

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable
     Linux Certifications:
        Not Applicable



     Company Phone Number:
        877-ORATION


     Company Fax:
        650-572-8315


     Support Phone Number:
        877-ORATION

     Contact Email Address:
        support@oration.com

     Company URL:
        http://www.oration.com

     Primary Contact:
        Pramod John



  1.333.  Consultant ID: US, CA, Ozlin Network Designs



       600-A Anton Blvd. #302
       Costa Mesa, CA 92626

       US



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Netware
        Connectivity Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable
     Linux Certifications:
        Not Applicable



     Company Phone Number:
        714-546-4250


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        info@ozlin.com

     Company URL:
        http://www.ozlin.com

     Primary Contact:
        Mark Linn



  1.334.  Consultant ID: US, CA, PSO Systems Inc



       120 Linden Street
       Oakland, CA 94607

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA

     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        510 663 1156


     Company Fax:
        510 663 1157


     Support Phone Number:
        510 663 1156

     Contact Email Address:
        support@pso.com

     Company URL:
        http://www.pso.com

     Primary Contact:
        Hwajin Bae



  1.335.  Consultant ID: US, CA, Predictive Science



       2008 Conquista Ave
       Long Beach, CA 90815

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet (Web) Programming
        Network Administration System Administration



     Main Distribution:
        Other


     Other Distribution:
        RedHat & Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1.562.592.6884


     Company Fax:
        1.562.592.6884


     Support Phone Number:
        1.562.592.6884

     Contact Email Address:
        lganders@gte.net

     Company URL:
        http://www.gte.net

     Primary Contact:
        Leonard Anderson



  1.336.  Consultant ID: US, CA, Softcraft Impresa



       2923 Cohansey Drive
       San Jose, CA 95132

       US



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming



     Main Distribution:
        Other


     Other Distribution:
        Generations Linux



     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@softcraft.com

     Company URL:
        http://www.softcraft.com

     Primary Contact:
        Mauro DePalma



  1.337.  Consultant ID: US, CA, South Coast Software



       Not_Applicable
       Anaheim, CA 92802

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Internet Server
        Development Network Administration System Administration Virtual
        Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        All distributions


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-714-774-6952


     Company Fax:
        1-714-774-7512


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@sc-software.com

     Company URL:
        http://www.sc-software.com

     Primary Contact:
        John  Heil



  1.338.  Consultant ID: US, CA, Starshine Technical Services



       903 Harriet Avenue
       Campbell, CA 95008

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Internet Server Development Internet
        (Web) Programming System Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        PC-based but includi


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        will aid requirement


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        800-938-4078


     Company Fax:
        408-374-LUGS


     Support Phone Number:
        (leave voice mail at

     Contact Email Address:
        consulting@starshine.org

     Company URL:
        http://www.starshine.org

     Primary Contact:
        Heather Stern Not_Applicable



  1.339.  Consultant ID: US, CA, Tesno Systems



       3435 Ocean Park Bl Ste 112
       Santa Monica, CA 90405

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        310 2047875


     Company Fax:
        310 5589221


     Support Phone Number:
        310 2047875

     Contact Email Address:
        info@tesnosystems.com

     Company URL:
        http://www.tesnosystems.com

     Primary Contact:
        Jerry Leahy



  1.340.  Consultant ID: US, CA, U.S. Technical Services



       9121 Atlanta Ave. Suite 230
       Huntington Beach, CA 92646

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (714) 374-6300


     Company Fax:
        (714) 242-1346


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        brian harvey



  1.341.  Consultant ID: US, CA, US CustomLogic, LLC



       11292 Coloma Road, Suite C
       Gold River, CA 95670

       US

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Intel


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-916-853-4920


     Company Fax:
        1-916-853-4924


     Support Phone Number:
        1-916-853-4920

     Contact Email Address:
        info@customlogic.com

     Company URL:
        http://www.customlogic.com

     Primary Contact:
        Tom Henderson



  1.342.  Consultant ID: US, CA, Vennerable Consulting



  1563 Solano Avenue, Suite 516
  berkeley, CA 94707

  US



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        510 528 8072


     Company Fax:
        510 528 8072


     Support Phone Number:
        510 528 8072

     Contact Email Address:
        support@vennerable.com

     Company URL:
        http://www.vennerable.com

     Primary Contact:
        jason venner



  1.343.  Consultant ID: US, CA, interactivate consulting group



       2244b carmel valley road
       del mar, CA 92014

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        red hat, slackware,


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        custom


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        please use email


     Company Fax:
        619 793 4069


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        sean dreilinger

  1.344.  Consultant ID: US, CO, BDA Consulting LLC



       758 English Sparrow Trail Suite 100
       Highlands Ranch, CO 80126

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        firewalls


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        303-683-9252


     Company Fax:
        303-683-7439


     Support Phone Number:
        303-683-9252

     Contact Email Address:
        support@bdaconsulting.com

     Company URL:
        http://www.bdaconsulting.com

     Primary Contact:
        James Davis

  1.345.  Consultant ID: US, CO, Eklektix, Inc.



       5624 Rim Rock Ct
       Boulder, CO 80301-3553

       US



     Consulting Specialties:
        Custom Programming Network Administration System Administration
        System Security



     Main Distribution:
        RedHat


     Other Distribution:
        All others


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        303 581 0750


     Company Fax:
        303 581 0385


     Support Phone Number:
        303 581 0750

     Contact Email Address:
        info@eklektix.com

     Company URL:
        http://www.eklektix.com

     Primary Contact:
        Elizabeth Coolbaugh

  1.346.  Consultant ID: US, CO, FourThought LLC



       3355 Sam Houston
       Ft. Collins, CO 80526

       US



     Consulting Specialties:
        Custom Programming E-Commerce Internet Server Development
        Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Debian


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        01-970-481-0805


     Company Fax:
        01-970-513-2884


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        consulting@fourthought.com

     Company URL:
        http://FourThought.com

     Primary Contact:
        Uche Ogbuji

  1.347.  Consultant ID: US, CO, ISP, Ltd.



       302 Grand Ave., Box 132
       Paonia, CO 81428

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1-970-527-6756


     Company Fax:
        +1-970-527-4120


     Support Phone Number:
        Not published

     Contact Email Address:
        techsupport@paonia.com

     Company URL:
        http://www.paonia.com


     Primary Contact:
        Angelo Babudro



  1.348.  Consultant ID: US, CO, MW Software



       P.O. Box 481762
       Denver, CO 80248-1762

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        303-832-5595


     Company Fax:
        303-832-3579


     Support Phone Number:
        303-832-5595

     Contact Email Address:
        mwinter@mwsoftware.com
     Company URL:
        http://mwsoftware.com

     Primary Contact:
        Mark Winter



  1.349.  Consultant ID: US, CO, PC WorkStations



       Not_Applicable
       Colorado Springs, CO Not_Applicable

       US



     Consulting Specialties:
        Custom Systems



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        719-330-3563


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable


     Contact Email Address:
        sales@pcworkstations.com

     Company URL:
        http://www.pcworkstations.com

     Primary Contact:
        lance williams



  1.350.  Consultant ID: US, CO, Paramin Consulting Group



       6424 South Quebec Street
       Englewood, CO 80111

       US



     Consulting Specialties:
        E-Commerce



     Main Distribution:
        Other


     Other Distribution:
        Slakware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        888 337 8227


     Company Fax:
        303 721 7522


     Support Phone Number:
        303 773 1361
     Contact Email Address:
        support@paramin.com

     Company URL:
        http://www.paramin.com

     Primary Contact:
        Amy Strauser



  1.351.  Consultant ID: US, CO, Paramin Consulting Group, Inc.



       6424 South Quebec Street
       Englewood, CO 80111

       US



     Consulting Specialties:
        Custom Programming E-Commerce Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming



     Main Distribution:
        Other


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        303 773 1361


     Company Fax:
        303 721 7522


     Support Phone Number:
        303 773 1361

     Contact Email Address:
        support@paramin.com

     Company URL:
        http://www.paramin.com

     Primary Contact:
        Amy Strauser



  1.352.  Consultant ID: US, CO, Travis Schack



       6105 Chase St
       Arvada, CO 80003

       US



     Consulting Specialties:
        Firewalls and Internet Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        303-456-2951


     Company Fax:
        303-414-6299
     Support Phone Number:
        303-456-2951

     Contact Email Address:
        tschack@uswest.net

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Travis Schack



  1.353.  Consultant ID: US, CO, tummy.com, ltd.



       5400 Fossil Court North
       Fort Collins , CO 80525

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Own Dist.


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        970 223-8215

     Company Fax:
        408 490-2728


     Support Phone Number:
        Not Available

     Contact Email Address:
        support@tummy.com

     Company URL:
        http://www.tummy.com

     Primary Contact:
        Evelyn Mitchell



  1.354.  Consultant ID: US, CT, DCA Online (Dutch Computer Association)



       26 Tobacco Road
       Weston, CT 06883-1612

       US



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        +1 203 222 8267


     Company Fax:
        +1 203 226 7037


     Support Phone Number:
        +1 203 222 8267

     Contact Email Address:
        support@dcaonline.com

     Company URL:
        http://www.dcaonline.com

     Primary Contact:
        Peter Leonard Krebs



  1.355.  Consultant ID: US, CT, DownCity, LLC



       131 Broadway
       Norwich, CT 06360

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-860-823-3000


     Company Fax:
        1-860-859-9401


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Robert Szarka



  1.356.  Consultant ID: US, CT, GNUTEC



       1655 North Colony Road, Suite 3002
       Meriden, CT 06450

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet (Web) Programming
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        All Distributions


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        All Distributions


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-203-379-0125


     Company Fax:
        1-203-379-0126


     Support Phone Number:
        1-203-668-UNIX

     Contact Email Address:
        support@gnutec.com

     Company URL:
        http://http://www.gnutec.com/

     Primary Contact:
        Kyle Amon



  1.357.  Consultant ID: US, CT, Information Design, Inc.



       145 Durham Road, Suite 11
       Madison, CT 06443

       US



     Consulting Specialties:
        Custom Programming Internet Server Development Internet (Web)
        Programming



     Main Distribution:
        Other


     Other Distribution:
        All


     Specialty Distribution:
        Other



     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (203)245-0772


     Company Fax:
        (203)245-1885


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        sales@idi-middleware.com

     Company URL:
        http://www.idi-middleware.com

     Primary Contact:
        Dennis Faust



  1.358.  Consultant ID: US, CT, MANHATTAN GROUP



       925 WHITE PLAINS ROAD
       TRUMBULL, CT 06611

       US



     Consulting Specialties:
        Custom Programming Custom Systems Internet Server Development
        Internet (Web) Programming System Administration Virtual Private
        Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        203-445-0011


     Company Fax:
        203-445-0009


     Support Phone Number:
        203-445-0011

     Contact Email Address:
        SUPPORT@MANHATTANGROUP,COM

     Company URL:
        http://WWW.MANHATTANGROUP.COM

     Primary Contact:
        JOHN LOMBARDI



  1.359.  Consultant ID: US, CT, Peter Santoro Computing



       66 Farmbrook Lane
       South Windsor, CT 06074

       US



     Consulting Specialties:
        Custom Programming E-Commerce Internet Server Development
        Internet (Web) Programming



     Main Distribution:
        RedHat



     Other Distribution:
        Suse, Caldera, Slack


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        860 648-5737


     Company Fax:
        NA


     Support Phone Number:
        860 648-5737

     Contact Email Address:
        peter@pscomp.com

     Company URL:
        http://www.connix.com/~psantoro/

     Primary Contact:
        Peter Santoro



  1.360.  Consultant ID: US, CT, Tempest Harding, Inc.



       322 Main Street, Suite 1204
       Willimantic, CT 06226

       US



     Consulting Specialties:
        Custom Systems



     Main Distribution:
        RedHat
     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        860-456-3639


     Company Fax:
        860-456-2814


     Support Phone Number:
        860-456-3639

     Contact Email Address:
        info@thinc.net

     Company URL:
        http://www.thinc.net

     Primary Contact:
        Paul Herbstritt



  1.361.  Consultant ID: US, DC, BKP, Inc.



       P.O. Box 21026
       Washington, DC 20009

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Internet Server Development Netware
        Connectivity Network Administration System Administration



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (202) 332-5609


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        John Thomas Not_Applicable



  1.362.  Consultant ID: US, DC, Haisam K. Ido



       Not_Applicable
       Washington, DC 20015

       US



     Consulting Specialties:
        Internet (Web) Programming Network Administration System
        Administration
     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1 202 537 5064


     Company Fax:
        Not_Applicable


     Support Phone Number:
        1 202 537 5064

     Contact Email Address:
        idoh@cais.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Haisam Ido



  1.363.  Consultant ID: US, DE, W. E. Hughes, INC



       1527 Vandyke Greenspring Road
       Smyrna, DE 19977

       US



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security System
        Administration System Security
     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        wally@dca.net

     Company URL:
        http://members.dca.net/wally

     Primary Contact:
        Wally Hughes



  1.364.  Consultant ID: US, FL, Anthony Awtrey Consulting



       781 Marsaille Dr Suite D
       Indialantic, FL 32903

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration Virtual
        Private Networking
     Main Distribution:
        RedHat


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        None


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        407-777-7164


     Company Fax:
        407-779-7269


     Support Phone Number:
        407-777-7164

     Contact Email Address:
        support@awtrey.com

     Company URL:
        http://www.awtrey.com

     Primary Contact:
        Anthony Awtrey



  1.365.  Consultant ID: US, FL, Bellstedt Custom Computers And Consult-
  ing



       3865 Corey Road
       Malabar, FL 32950-4118

       US



     Consulting Specialties:
        Custom Programming Custom Systems Network Administration System
        Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        001 407 729 0932


     Company Fax:
        001 407 956 8629


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        olaf@bellstedt.com

     Company URL:
        http://www.bellstedt.com

     Primary Contact:
        Olaf Bellstedt



  1.366.  Consultant ID: US, FL, Byte Technologies, Inc.



       224 Datura St., Suite 808
       West Palm Beach, FL 33401

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Network Administration System
        Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        561-833-2330


     Company Fax:
        561-833-3135


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@bytetechinc.com

     Company URL:
        http://www.bytetechinc.com

     Primary Contact:
        Adam Steinhoff



  1.367.  Consultant ID: US, FL, Inicom, Inc.



       6255 SW 69 Street
       South Miami, FL 33143

       US


     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Mandrake


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        305-439-9437


     Company Fax:
        305-665-1139


     Support Phone Number:
        305-439-9437

     Contact Email Address:
        aem@inicom.com

     Company URL:
        http://www.inicom.com

     Primary Contact:
        Andrew Mossberg



  1.368.  Consultant ID: US, FL, Linux Florida



       6344 Raleigh St #1113
       Orlando, FL 32835

       US

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        407-296-0680


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        cshepher@linux-florida.com

     Company URL:
        http://www.linux-florida.com

     Primary Contact:
        Christopher Shepherd



  1.369.  Consultant ID: US, FL, Mackintosh Web, Inc.



  3318 Clark Rd
  Sarasota, FL 34231

  US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-941-316-5691


     Company Fax:
        1-941-921-5148


     Support Phone Number:
        1-941-921-5148

     Contact Email Address:
        terry@terrym.com

     Company URL:
        http://www.terrym.com

     Primary Contact:
        Terry Mackintosh



  1.370.  Consultant ID: US, FL, Richard J Kinch, PhD



       6994 Pebble Beach Ct
       Lake Worth, FL 33467

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 (561) 966-8400


     Company Fax:
        +1 (561) 966-0962


     Support Phone Number:
        +1 (561) 966-8400

     Contact Email Address:
        kinch@truetex.com

     Company URL:
        http://www.truetex.com


     Primary Contact:
        Richard Kinch



  1.371.  Consultant ID: US, FL, Spectrum Enterprises



       1609 Puritan Ave
       Winter Park, FL 32792

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        1-407-257-1437


     Company Fax:
        1-407-257-1437


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@spectrumenterprises.com
     Company URL:
        http://www.spectrumenterprises.com

     Primary Contact:
        Paul Marble



  1.372.  Consultant ID: US, FL, TSM Services



       108 Sunset Blvd
       Boynton Beach, FL 33426

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        561-374-8874


     Company Fax:
        561-375-7877



     Support Phone Number:
        Not Available

     Contact Email Address:
        support@tsmservices.com

     Company URL:
        http://www.tsmservices.com

     Primary Contact:
        Steve Grevemeyer



  1.373.  Consultant ID: US, FL, Timothy Jones



       PO Box 292371
       Temple Terrace, FL 33687

       US



     Consulting Specialties:
        Custom Programming Custom Systems Internet Server Development
        Internet (Web) Programming System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        813-914-0653



     Company Fax:
        n/a


     Support Phone Number:
        813-914-0653

     Contact Email Address:
        tim@worldfax.com

     Company URL:
        http://www.timjones.com

     Primary Contact:
        Timothy  Jones



  1.374.  Consultant ID: US, FL, Yup Dot Com



       531 NE 2nd Street
       Gainesville, FL 32601

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        352/379-8921


     Company Fax:
        Not_Applicable


     Support Phone Number:
        352/379-8921

     Contact Email Address:
        info@yup.com

     Company URL:
        http://yup.com

     Primary Contact:
        Daniel Butler



  1.375.  Consultant ID: US, FL, eBuilders Network



       8204 Crystal Clear Lane Suite 1200
       Orlando , FL 32809

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Internet Server Development Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        Mandrake


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable
     Company Phone Number:
        407-857-6800


     Company Fax:
        407-857-2333


     Support Phone Number:
        407-857-6800

     Contact Email Address:
        sales@ebuildernet.com

     Company URL:
        http://www.ebuildernet.com

     Primary Contact:
        Pablo Bryan



  1.376.  Consultant ID: US, FL, psiCat Software, Inc.



       571-U Haverty Court
       Rockledge, FL 32955

       US



     Consulting Specialties:
        Custom Programming Custom Systems Internet Server Development
        Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable
     Company Phone Number:
        407-632-1924


     Company Fax:
        407-632-1925


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@psicat.com

     Company URL:
        http://www.psicat.com

     Primary Contact:
        Nathan Harris



  1.377.  Consultant ID: US, GA, Corvusware, Inc.



       PMB 138, 3245 Peachtree Pkwy
       Suwanee, GA 30024

       US



     Consulting Specialties:
        Custom Programming Internet Server Development Internet (Web)
        Programming Network Administration System Administration



     Main Distribution:
        Other


     Other Distribution:
        All - we support LIN


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable
     Company Phone Number:
        770-886-7385


     Company Fax:
        770-886-7295


     Support Phone Number:
        770-886-7385

     Contact Email Address:
        sales@corvusware.com

     Company URL:
        http://www.corvusware.com

     Primary Contact:
        David Corbin



  1.378.  Consultant ID: US, GA, Fly-By-Day Consulting, Inc.



       4642 Bentley Place
       Duluth, GA 30096

       US



     Consulting Specialties:
        Custom Programming Firewalls and Internet Security Internet
        Server Development Network Administration System Administration
        System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1 770 662 8321


     Company Fax:
        Not_Applicable


     Support Phone Number:
        1 770 662 8321

     Contact Email Address:
        bob@cavu.com

     Company URL:
        http://www.cavu.com

     Primary Contact:
        Bob Toxen



  1.379.  Consultant ID: US, GA, Hacom Corp



       2477 Wrightsboro Road
       Augusta, GA 30904

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        706-736-8717


     Company Fax:
        706-736-8717


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@hacom.net

     Company URL:
        http://www.hacom.net

     Primary Contact:
        Bao Ha



  1.380.  Consultant ID: US, GA, John Meister



       2350 Cobb Parkway, #34J
       Smyrna, GA 30080

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Netware
        Connectivity Network Administration System Administration System
        Security



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC

     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (770) 980-0665


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        meisterj@acm.org

     Company URL:
        http://www.acm.org

     Primary Contact:
        John Meister



  1.381.  Consultant ID: US, GA, PWR Group



       4330 North Smoke Ridge Court
       Roswell, GA 30075

       US



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Network
        Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA



     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        770-650-8144


     Company Fax:
        Not_Applicable


     Support Phone Number:
        1-770-650-8144

     Contact Email Address:
        prooker@pwrgroup.com

     Company URL:
        http://www.pwrgroup.com

     Primary Contact:
        Penn Rooker



  1.382.  Consultant ID: US, GA, Worldwind Technologies, Inc.



       8520 River Walk Landing
       Suwanee, GA 30024

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming



     Main Distribution:
        RedHat



     Other Distribution:
        Mandrake


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (770) 307-8590


     Company Fax:
        (770) 814-9967


     Support Phone Number:
        (770) 307-8590

     Contact Email Address:
        info@worldwindtech.com

     Company URL:
        http://www.worldwindtech.com

     Primary Contact:
        Chris Woodruff



  1.383.  Consultant ID: US, HI, Cytronix Computer Services, Inc.



       350 Ward Ave. 106-288
       Honolulu, HI 96814

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Internet Server Development Internet (Web) Programming Netware
        Connectivity Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Custom In-House Dist


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Customer In-House Di


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (808) 383-0558


     Company Fax:
        Not_Applicable


     Support Phone Number:
        (800) 939-9247

     Contact Email Address:
        deven@cytronix.net

     Company URL:
        http://www.cytronix.net

     Primary Contact:
        Deven Phillips



  1.384.  Consultant ID: US, HI, United Writers PC Support



       205-C1 Rose St
       Wahiawa, HI 96786

       US



     Consulting Specialties:
        Internet (Web) Programming

     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Will look at all


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        808-622-0043


     Company Fax:
        808-622-1345


     Support Phone Number:
        808-622-0043

     Contact Email Address:
        unitedwriters.org@juno.com

     Company URL:
        http://hawaiidakine.com (Linux Forum)

     Primary Contact:
        AL PLANT



  1.385.  Consultant ID: US, IA, JEONET



       PO Box 1282
       Iowa City, IA 52241

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        DNS and Firewall con


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        319-338-6353


     Company Fax:
        319-338-6353


     Support Phone Number:
        800 number for clien

     Contact Email Address:
        linuxsupport@jeo.net

     Company URL:
        http://www.jeo.net

     Primary Contact:
        Afan Ottenheimer



  1.386.  Consultant ID: US, IL, Cobler Corporation



       3013 S. Wolf Rd.
       Westchester, IL 60154

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        708-205-3313


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Kenneth Cobler



  1.387.  Consultant ID: US, IL, Dataline



       105 South Wright St. Suite #309
       Champaign, IL 61820

       US

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        2173512647


     Company Fax:
        2173512647


     Support Phone Number:
        2173512647

     Contact Email Address:
        support@jay.cx

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Jay Thomas



  1.388.  Consultant ID: US, IL, Ossmann Consulting



  651 W. Belmont Ave.
  Chicago, IL 60657

  US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        773-294-0250


     Company Fax:
        Not_Applicable


     Support Phone Number:
        773-294-0250

     Contact Email Address:
        mike@ossmann.com

     Company URL:
        http://www.ossmann.com

     Primary Contact:
        Michael Ossmann



  1.389.  Consultant ID: US, IL, Promethan Consulting



       18 Skyview Drive
       Springfield, IL 62702

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Red Hat, Debian


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        217/698-6234


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Jeff Licquia

  1.390.  Consultant ID: US, IL, QLITech Linux Computers



       3717 43rd St. Suite #112
       Moline, IL 61265

       US



     Consulting Specialties:
        Custom Systems E-Commerce Netware Connectivity Network
        Administration System Administration System Security



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-877-24-LINUX


     Company Fax:
        1-309-764-1142


     Support Phone Number:
        1-877-24-linux

     Contact Email Address:
        support@qlitech.net

     Company URL:
        http://www.qlitech.net

     Primary Contact:
        Ray Sanders

  1.391.  Consultant ID: US, IL, Remington*Microshare



       1834 Walden Office Square, Suite 100
       Schaumburg, IL 60173

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet (Web) Programming Netware Connectivity Network
        Administration System Administration Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        847-221-0200


     Company Fax:
        847-221-0399


     Support Phone Number:
        847-221-0200

     Contact Email Address:
        chrisd@remingtonltd.com

     Company URL:
        http://www.remingtonmicroshare.com

     Primary Contact:
        Jeremy Simon
  1.392.  Consultant ID: US, IL, Urbana Computer Works



       701 Devonshire Dr. C-8
       Champaign, IL 61820

       US



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        217-355-5936


     Company Fax:
        217-355-5953


     Support Phone Number:
        217-355-5936

     Contact Email Address:
        dpointer@ucworks.com

     Company URL:
        http://www.ucworks.com

     Primary Contact:
        David Pointer

  1.393.  Consultant ID: US, IL, WellThot Inc.



       305 Van Damin Ave.
       Glen Ellyn, IL 60137-5215

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        630-545-1470


     Company Fax:
        630-545-1471


     Support Phone Number:
        630-545-1470

     Contact Email Address:
        support@wellthot.com

     Company URL:
        http://wellthot.com


     Primary Contact:
        Mark  Schwenk



  1.394.  Consultant ID: US, IL, onShore, Inc



       1407 W Chicago Av
       Chicago, IL 60622

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Pacific HiTech HA


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        RedHat



     Company Phone Number:
        312 850-5200


     Company Fax:
        312 850-5208


     Support Phone Number:
        312 850-5200

     Contact Email Address:
        support-managers@onshore.com
     Company URL:
        http://www.onshore.com

     Primary Contact:
        Adam Di Carlo



  1.395.  Consultant ID: US, IN, CLFINC



       P.O.Box 1271
       Columbus, IN 47202-1271

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        812-372-1911


     Company Fax:
        Not_Applicable


     Support Phone Number:
        812-372-1911

     Contact Email Address:
        cfiene@iquest.net

     Company URL:
        http://www.iquest.net

     Primary Contact:
        Curtis Fiene



  1.396.  Consultant ID: US, IN, IndyBox Systems, Inc.



       PO Box 3564
       Carmel, IN 46082-3564

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Caldera RedHat



     Company Phone Number:
        01 317 8469762
     Company Fax:
        Not_Applicable


     Support Phone Number:
        +01 317 8469762

     Contact Email Address:
        support@indybox.com

     Company URL:
        http://www.indybox.com

     Primary Contact:
        Charles Martin



  1.397.  Consultant ID: US, IN, ValCom



       8098 Woodland Drive
       Indianapolis, IN 46278

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (317)870-8020


     Company Fax:
        (317)870-8035


     Support Phone Number:
        (317)870-8020

     Contact Email Address:
        mreba@pccval.com

     Company URL:
        http://www.pccval.com

     Primary Contact:
        Matthew Reba



  1.398.  Consultant ID: US, KY, Computer Associates Network, Inc.



       218 South Porter Dr. Suite 2
       Richmond, KY 40475

       US



     Consulting Specialties:
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Mandrake


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-800-803-6706


     Company Fax:
        1-606-626-9559


     Support Phone Number:
        1-800-803-6706

     Contact Email Address:
        service@richmondsolutions.com

     Company URL:
        http://www.richmondsolutions.com

     Primary Contact:
        Jerry Hensley



  1.399.  Consultant ID: US, KY, WSI.com Consulting



       Woodchase Drive
       Erlanger, KY 41018

       US



     Consulting Specialties:
        Custom Programming Internet (Web) Programming System
        Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        None


     Reseller Authorizations:
        Not Applicable
     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (877) 506-6762


     Company Fax:
        (209) 882-9554


     Support Phone Number:
        (877) 506-6762

     Contact Email Address:
        support@wsicnslt.com

     Company URL:
        http://www.wsicnslt.com

     Primary Contact:
        Justin Rains



  1.400.  Consultant ID: US, LA, Advanced Network Technologies



       10795 Mead Rd. #104
       Baton Rouge, LA 70816

       US



     Consulting Specialties:
        Custom Programming Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming Network
        Administration



     Main Distribution:
        Other


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        225-296-5815


     Company Fax:
        Not_Applicable


     Support Phone Number:
        225-296-5815

     Contact Email Address:
        support@advanced-net-tech.com

     Company URL:
        http://www.advanced-net-tech.com

     Primary Contact:
        Benjamin Curtis



  1.401.  Consultant ID: US, LA, Connectivity Solutions, Inc.



       365 Canal Street, Suite 2300
       New Orleans, LA 70130

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC
     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        504-561-6540


     Company Fax:
        504-561-6694


     Support Phone Number:
        504-561-6540

     Contact Email Address:
        support@conn-sol.com

     Company URL:
        http://www.conn-sol.com

     Primary Contact:
        Kevin Wilson



  1.402.  Consultant ID: US, MA, Antarctica IT, Inc.



       48 Simpson Drive
       Framingham, MA 01701

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        NA

     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        Caldera



     Company Phone Number:
        1-877-365-4689 (1-87


     Company Fax:
        1-603-215-4709


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@antarcticait.com

     Company URL:
        http://www.antarcticait.com

     Primary Contact:
        Scott Shaw



  1.403.  Consultant ID: US, MA, CYWAYS, Incorporated



       19 Westchester Road
       Newton, MA 02468

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat
     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +1 800 5-CYWAYS


     Company Fax:
        +1 617 796-8997


     Support Phone Number:
        +1 617 796-8995

     Contact Email Address:
        support@cyways.com

     Company URL:
        http://www.cyways.com

     Primary Contact:
        Peter Lemieux



  1.404.  Consultant ID: US, MA, ComputeAmerica.com



       120C Broadmeadow Rd.
       Marlborough, MA 01752

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        RedHat
     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Intel


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        877-672-2171


     Company Fax:
        508-624-0120


     Support Phone Number:
        508-460-8897

     Contact Email Address:
        support@computeamerica.com

     Company URL:
        http://www.computeamerica.com/WebDesign

     Primary Contact:
        Sonny parlin Steve Doherty



  1.405.  Consultant ID: US, MA, DataProfit



       330 Whitney Ave
       Holyoke, MA 01040

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        800-437-7634


     Company Fax:
        413-536-3354


     Support Phone Number:
        NA

     Contact Email Address:
        rcolumbia@dataprofit.com

     Company URL:
        http://www.dataprofit.com

     Primary Contact:
        Richard Columbia



  1.406.  Consultant ID: US, MA, LSC



       205 West Granville RD
       Tolland, MA 01034

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        413-258-4074


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        c5141@iname.com

     Company URL:
        http://www.iname.com

     Primary Contact:
        Richard Columbia



  1.407.  Consultant ID: US, MA, NetInterface Consulting



       56 Houghton
       Hudson, MA 01749

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1.978.567.0972


     Company Fax:
        1.978.567.0972


     Support Phone Number:
        1.978.567.0972

     Contact Email Address:
        support@netinterface.com

     Company URL:
        http://www.netinterface.com

     Primary Contact:
        Lenny Forziati



  1.408.  Consultant ID: US, MA, New England Linux Resource



  Not_Applicable
  Newton, MA 02468

  US



     Consulting Specialties:
        E-Commerce Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Netware Connectivity
        Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        Caldera


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        617 332 0387


     Company Fax:
        Not_Applicable


     Support Phone Number:
        617 332 0837

     Contact Email Address:
        nelinuxresources@hotmail.com

     Company URL:
        http://www.nelinuxresourses.com

     Primary Contact:
        curt Not_Applicable



  1.409.  Consultant ID: US, MA, New England Linux resources



       Not_Applicable
       Newton, MA 02468

       US



     Consulting Specialties:
        Custom Programming



     Main Distribution:
        RedHat


     Other Distribution:
        caldera


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        617 332 0837


     Company Fax:
        Not_Applicable


     Support Phone Number:
        617 332 0837

     Contact Email Address:
        nelinuxresources@hotmail.com

     Company URL:
        http://www.nelinuxresources.com

     Primary Contact:
        curt Not_Applicable


  1.410.  Consultant ID: US, MA, Worldmachine Technologies Corporation



       44 Winter Street, 3rd Floor
       Boston, MA 02108-4745

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        all


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (617) 357-4040


     Company Fax:
        (617) 357-4949


     Support Phone Number:
        (617) 357-4040

     Contact Email Address:
        support@worldmachine.com

     Company URL:
        http://www.worldmachine.com


     Primary Contact:
        Eric Hansen



  1.411.  Consultant ID: US, MD, JAMUX



       4520 Yates Road
       Beltsville, MD 20705-2629

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        1 301 595 2013


     Company Fax:
        Not_Applicable


     Support Phone Number:
        1 301 595 2013

     Contact Email Address:
        jam@jamux.com

     Company URL:
        http://www.jamux.com

     Primary Contact:
        John Martin



  1.412.  Consultant ID: US, MD, Quest



       10555 Metropolitan Avenue
       Kensington, MD 20895-2627

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Caldera, SUSE


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Caldera RedHat



     Company Phone Number:
        800 876 4000


     Company Fax:
        301 942 0175



     Support Phone Number:
        800 876 4000

     Contact Email Address:
        superman@xrayvision.com

     Company URL:
        http://qhq.com

     Primary Contact:
        David Schwering



  1.413.  Consultant ID: US, MD, RABA Technologies, Inc.



       10500 Little Patuxent Pkwy, Ste. 190
       Columbia, MD 21044

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Caldera RedHat



     Company Phone Number:
        (410) 715-9399
     Company Fax:
        (410) 715-9397


     Support Phone Number:
        (410) 715-9399

     Contact Email Address:
        stuart.chandler@raba.com

     Company URL:
        http://www.raba.com

     Primary Contact:
        Stuart Chandler



  1.414.  Consultant ID: US, ME, TransWeb ToolBox



       PO Box 788
       Windham, ME 04062

       US



     Consulting Specialties:
        Not_Applicable


     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Caldera


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        RedHat



     Company Phone Number:
        207-450-7914


     Company Fax:
        207-892-8745


     Support Phone Number:
        207-450-7914

     Contact Email Address:
        support@transwebtools.com

     Company URL:
        http://www.transwebtools.com

     Primary Contact:
        Henri Brady



  1.415.  Consultant ID: US, MI, Jim Willette



       18190 - 15 mile Rd.
       Big Rapids, MI 49307

       US



     Consulting Specialties:
        CIFS (Samba)



     Main Distribution:
        Other


     Other Distribution:
        Any


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Any


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (616) 592 - 0405
     Company Fax:
        Not_Applicable


     Support Phone Number:
        (616) 592-0405

     Contact Email Address:
        jimw@ctec.net

     Company URL:
        http://www.ctec.net

     Primary Contact:
        Jim Willette



  1.416.  Consultant ID: US, MI, Nugent Telecommunications



       3081 Braeburn Circle
       Ann Arbor, MI 48108

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        734-971-1076


     Company Fax:
        734-971-4529


     Support Phone Number:
        734-971-1076

     Contact Email Address:
        jjn@nuge.com

     Company URL:
        http://www.nuge.com

     Primary Contact:
        Jay Nugent



  1.417.  Consultant ID: US, MI, Radiomind Studios



       213 Schuring Rd
       Portage, MI 49024-5012

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        616-323-9417


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@radiomind.com

     Company URL:
        http://www.radiomind.com

     Primary Contact:
        John Beimler



  1.418.  Consultant ID: US, MI, Struction Consulting



       3181 Baylis Dr.
       Ann Arbor, MI 48108-1709

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        +1 (734) 975-0782


     Company Fax:
        +1 (917) 463-1256


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@struction.com

     Company URL:
        http://www.struction.com

     Primary Contact:
        Brian Shensky



  1.419.  Consultant ID: US, MN, Anvi Corp



       2610 Grand St. NE
       Minneapolis, MN 55418

       US



     Consulting Specialties:
        Custom Programming Custom Systems Internet Server Development
        Internet (Web) Programming System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other



     Other Specialty Distribution:
        Slackware


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (612) 782-1955


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://menon.com/

     Primary Contact:
        Kps Menon



  1.420.  Consultant ID: US, MN, Donnal Group Inc.



       19820 Cottagewood Road
       Excelsior, MN 55331

       US



     Consulting Specialties:
        Custom Systems



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        Other
     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Caldera



     Company Phone Number:
        612-474-7785


     Company Fax:
        612-474-7793


     Support Phone Number:
        888-617-0002

     Contact Email Address:
        support@donnalgroup.com

     Company URL:
        http://www.donnalgroup.com

     Primary Contact:
        Tim Burke



  1.421.  Consultant ID: US, MN, Geek Work



       634 Providence Ct
       Chaska, MN 55318

       US



     Consulting Specialties:
        Custom Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter
     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        612-368-0331


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        randym@acm.org

     Company URL:
        http://www.hamline.edu/~rcmaas

     Primary Contact:
        Randall Maas



  1.422.  Consultant ID: US, MO, Caviness Technologies, Inc.



       4940 S. Peck Ave. Independence
       Kansas City, MO 64055

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA
     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        816 478-7078


     Company Fax:
        816 350-7001


     Support Phone Number:
        816 478-7078

     Contact Email Address:
        linuxsupport@maxbaud.net

     Company URL:
        http://www.maxbaud.net

     Primary Contact:
        Chris Caviness



  1.423.  Consultant ID: US, MO, Caviness Technologies, Inc.



       4940 S. Peck Ave. Independence
       Kansas City, MO 64055

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat
     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        816 478-7078


     Company Fax:
        816 350-7001


     Support Phone Number:
        816 478-7078

     Contact Email Address:
        linuxsupport@maxbaud.net

     Company URL:
        http://www.maxbaud.net

     Primary Contact:
        Chris Caviness



  1.424.  Consultant ID: US, MO, Firefly Enterprises, Inc.



       922 Rochdale Dr . Suite 100
        Kirkwood , MO 63122

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        314-835-1590


     Company Fax:
        314-835-1591


     Support Phone Number:
        314-835-1590

     Contact Email Address:
        rsponholtz@earthlink.net

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Ross Sponholtz



  1.425.  Consultant ID: US, MO, Omnitec Corporation



       PO Box 411010
       St. Louis, MO 63141

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Suse


     Other Distribution:
        Debian/LinuxPro


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        3149974600


     Company Fax:
        3149970153


     Support Phone Number:
        3149974600

     Contact Email Address:
        admin@omnitec.net

     Company URL:
        http://www.omnitec.net

     Primary Contact:
        Lee Lammert



  1.426.  Consultant ID: US, MO, PhazeOne, Inc.



       3101 Broadway, Suite 605
       Kansas City, MO 64111

       US



     Consulting Specialties:
        Custom Programming E-Commerce Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (816)756-1300


     Company Fax:
        (816)756-1355


     Support Phone Number:
        (816)756-1300

     Contact Email Address:
        support@phazeone.com

     Company URL:
        http://www.phazeone.com

     Primary Contact:
        Steven Heutinck



  1.427.  Consultant ID: US, MS, BCCS



       307 Clear View dr
       Florence, MS 39073

       US


     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Netware
        Connectivity Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        601-845-3191


     Company Fax:
        NA


     Support Phone Number:
        NA

     Contact Email Address:
        rbelk@netdoor.com

     Company URL:
        http://www2.netdoor.com/~rbelk

     Primary Contact:
        Randy Belk



  1.428.  Consultant ID: US, NC, ApeX Systems Integration Corp.



       PO Box 338
       Apex, NC 27502

       US

     Consulting Specialties:
        Custom Systems Firewalls and Internet Security Network
        Administration System Administration



     Main Distribution:
        Suse


     Other Distribution:
        Red Hat, and others


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        919-468-8150


     Company Fax:
        919-468-5288


     Support Phone Number:
        NA

     Contact Email Address:
        apex@2boot.com

     Company URL:
        http://www.2boot.com

     Primary Contact:
        Joe Ferguson



  1.429.  Consultant ID: US, NC, Certified Services



       4911 Benthaven Lane
       Charlotte, NC 28269

       US


     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        704-509-4585


     Company Fax:
        Not_Applicable


     Support Phone Number:
        704-509-4585

     Contact Email Address:
        support@certifiedservices.com

     Company URL:
        http://wwww.certifiedservices.com

     Primary Contact:
        Kurt Brust



  1.430.  Consultant ID: US, NC, Computer Network Consulting Inc.



       102 Shepton Drive
       Morrisville, NC 27560

       US

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 919 380 9687


     Company Fax:
        +1 919 380 0409


     Support Phone Number:
        +1 919 380 9687

     Contact Email Address:
        Support@CNConsulting.com

     Company URL:
        http://www.CNConsulting.com

     Primary Contact:
        Tuananh Nguyen



  1.431.  Consultant ID: US, NC, Jim Bray



  (not posted on web)
  Brevard, NC 28712

  US



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration



     Main Distribution:
        Debian


     Other Distribution:
        Any


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Any


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        828-862-5407


     Company Fax:
        NA


     Support Phone Number:
        NA

     Contact Email Address:
        jb@as220.org

     Company URL:
        http://as220.org/jb/freeware

     Primary Contact:
        Jim Bray



  1.432.  Consultant ID: US, NC, Linux Workshop



       105 B. Milton Dr.
       Carrboro, NC 27514

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        Not_Applicable


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat Not Applicable



     Company Phone Number:
        919-960-8030


     Company Fax:
        919-942-0793


     Support Phone Number:
        919-960-8030

     Contact Email Address:
        support@linux-workshop.com

     Company URL:
        http://www.linux-workshop.com


     Primary Contact:
        Not_Applicable Not_Applicable



  1.433.  Consultant ID: US, NC, Moongroup Consulting, Inc.



       134 Grande Meadow Way
       Cary, NC 27513

       US



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        01-919-462-9426


     Company Fax:
        01-919-462-9427


     Support Phone Number:
        01-919-462-9426

     Contact Email Address:
        support@moongroup.com
     Company URL:
        http://www.moongroup.com

     Primary Contact:
        Chuck Mead



  1.434.  Consultant ID: US, NC, Network Computing Solutions



       3733 National Dr.
       Raleigh, NC 27612

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-919-510-6970


     Company Fax:
        1-919-510-6971



     Support Phone Number:
        1-919-510-6970

     Contact Email Address:
        linux-support@networks.com

     Company URL:
        http://www.networks.com

     Primary Contact:
        Pat Hughes



  1.435.  Consultant ID: US, NC, UTSL dot com



       1007 North Buchanan Blvd.
       Durham, NC 27701-1139

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Debian


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        919-286-1441



     Company Fax:
        Not_Applicable


     Support Phone Number:
        919-286-1441

     Contact Email Address:
        biggers@utsl.com

     Company URL:
        http://www.utsl.com

     Primary Contact:
        Mark Biggers



  1.436.  Consultant ID: US, NC, Whole Systems Solutions, Inc.



       2 Terrace Way, Suite A
       Greensboro, NC 27403

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Any Distribution


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 336-297-4977


     Company Fax:
        +1 336-297-9787


     Support Phone Number:
        +1 336-297-4977

     Contact Email Address:
        support@wss.net

     Company URL:
        http://www.wss.net

     Primary Contact:
        Jay Eisenberg



  1.437.  Consultant ID: US, NC, World Wide Wizdom



       104 Quartermaine Ct.
       Cary, NC 27513-5152

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        919-818-1855


     Company Fax:
        919-468-4684


     Support Phone Number:
        919-468-4680

     Contact Email Address:
        support@wiZdom.net

     Company URL:
        http://www.wiZdom.net

     Primary Contact:
        David Boone



  1.438.  Consultant ID: US, NE, Paktronix Systems LLC



       1506 North 59th Street
       Omaha, NE 68104-4830

       US



     Consulting Specialties:
        Custom Systems Firewalls and Internet Security Internet Server
        Development Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Trinux, Pretty Secur



     Reseller Authorizations:
        IBM



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        1-402-932-7250


     Company Fax:
        1-402-932-7258


     Support Phone Number:
        1-402-932-7250

     Contact Email Address:
        tech@paktronix.com

     Company URL:
        http://www.paktronix.com

     Primary Contact:
        Paul Greunke



  1.439.  Consultant ID: US, NH, AKCP, Inc



       379 Amherst Street, Suite 182
       Nashua, NH 03063

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC

     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        603-881-7343


     Company Fax:
        Not_Applicable


     Support Phone Number:
        603-881-7343

     Contact Email Address:
        info@kcpinc.com

     Company URL:
        http://www.kcpinc.com

     Primary Contact:
        Brad Klein



  1.440.  Consultant ID: US, NH, KORKSOFT



       8 Olde Bedford Way
       Bedford, NH 03110

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA
     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        603 472 8262


     Company Fax:
        603 472 8262


     Support Phone Number:
        603 472 8262

     Contact Email Address:
        support@korksoft.com

     Company URL:
        http://www.korksoft.com

     Primary Contact:
        Jason Korkin



  1.441.  Consultant ID: US, NJ, Etc Services



       31 N. Vivyen St.
       Bergenfield, NJ 07621-1529

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        201-385-7113


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Scott Webster



  1.442.  Consultant ID: US, NJ, Mitchell C. Nelson, Ph.D.



       Not_Applicable
       Morristown, NJ 07960

       US



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development System Security Virtual
        Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Any and All


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Any and All


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (973) 644-3577


     Company Fax:
        please phone first


     Support Phone Number:
        (973) 644-3577

     Contact Email Address:
        mcnelson@mindspring.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Mitch Nelson



  1.443.  Consultant ID: US, NJ, Voortek Software, Inc



       1 Las Brisas Blvd
       Voorhees, NJ 08043

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Caldera



     Company Phone Number:
        David J Adamson


     Company Fax:
        609-346-3172


     Support Phone Number:
        888-346-4616

     Contact Email Address:
        voorteksoftware@erols.com

     Company URL:
        http://www.erols.com

     Primary Contact:
        David J  Adamson



  1.444.  Consultant ID: US, NON United States, ASA Computers, Inc.



       23
       Not_Applicable, NON United States Not_Applicable

       US



     Consulting Specialties:
        Not_Applicable


     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Not_Applicable Not_Applicable



  1.445.  Consultant ID: US, NON United States, Antonio Marcelo F. Fon-
  seca



       Rua Haddock Lobo 131 - c7 -  Rio Comprido
       Rio de Janeiro, NON United States 20260-130

       US



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        55-21-2932523


     Company Fax:
        55-21-2932523


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        amarcelo@iis.com.br

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Antonio Marcelo



  1.446.  Consultant ID: US, NON United States, Aztronic Enterprises



       Not_Applicable
       San , NON United States Not_Applicable

       US

     Consulting Specialties:
        Not_Applicable


     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Not_Applicable Not_Applicable



  1.447.  Consultant ID: US, NON United States, Coldweb Consulting



       2200 A Montclair Rd
       Greensboro, NON United States 27410

       US



     Consulting Specialties:
        E-Commerce Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration System Security



     Main Distribution:
        Caldera


     Other Distribution:
        Redhat and Other


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Turbo Linux


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        336-323-0253


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Not_Applicable Not_Applicable



  1.448.  Consultant ID: US, NON United States, CyberMarketplace



       1106 Coolidge Blvd
       Lafayette, NON United States LA

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Cobalt Intranet Serv


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (318) 232-5759


     Company Fax:
        (318) 234-7376


     Support Phone Number:
        support@cybermp.net

     Contact Email Address:
        support@cybermp.net

     Company URL:
        http://www.cybermp.net

     Primary Contact:
        Theron Lutz



  1.449.  Consultant ID: US, NON United States, Developpement Strate-
  gique Sophos inc.



  1305 Monette
  Montreal, NON United States J7K 3C1

  US



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (450) 966-9676


     Company Fax:
        (450) 474-7161


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@Sophos.ca

     Company URL:
        http://Sophos.ca

     Primary Contact:
        Ludovic Marcotte



  1.450.  Consultant ID: US, NON United States, Emit Sp z o.o.



       ul. Koszarowa 48/9
       Wroclaw, NON United States 51-149

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Custom


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Single floppy


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +48713267026


     Company Fax:
        +48713289733


     Support Phone Number:
        +48713288967

     Contact Email Address:
        kontakt@emit.pl

     Company URL:
        http://www.emit.pl

     Primary Contact:
        Ian Carr-de Avelon



  1.451.  Consultant ID: US, NON United States, Gatekeeper Technology,
  Ltd.



       26 All Saints' Avenue
       COLCHESTER, NON United States CO3 4NZ

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +44 7050 368852


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +44 7050 368852


     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Tom Yates



  1.452.  Consultant ID: US, NON United States, Jobsoft Design and
  Development, Inc.



       118 South Maple Street
       Murfreesboro, NON United States 37130

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        6159049559


     Company Fax:
        6158908941


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@jobsoft.com

     Company URL:
        http://www.jobsoft.com

     Primary Contact:
        Andy Fort



  1.453.  Consultant ID: US, NON United States, Magiclink



       Av. ACM, Sala 304 Edf. Maxcenter - Pituba
       Salvador - BA, NON United States 41858-900

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat

     Company Phone Number:
        +55-71-351-1615


     Company Fax:
        +55-71-353-2220


     Support Phone Number:
        +55-71-351-1615

     Contact Email Address:
        admin@magiclink.com.br

     Company URL:
        http://www.magiclink.com.br

     Primary Contact:
        Isamar Maia



  1.454.  Consultant ID: US, NON United States, Not_Applicable



       Not_Applicable
       Not_Applicable, NON United States Not_Applicable

       US



     Consulting Specialties:
        Not_Applicable


     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Not_Applicable Not_Applicable



  1.455.  Consultant ID: US, NON United States, Onlinet Com. Serv.
  Informtica Ltda.



       R. Par, 35 - Cid. Industrial
       Lorena, NON United States 12.600-000

       US



     Consulting Specialties:
        Internet Server Development



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable
     Company Phone Number:
        +55 (012) 553-1234


     Company Fax:
        +55 (012) 553-2568


     Support Phone Number:
        +55 (012) 553-1234

     Contact Email Address:
        suporte@onlinet.com.br

     Company URL:
        http://www.onlinet.com.br

     Primary Contact:
        Denys Sene



  1.456.  Consultant ID: US, NON United States, Psand Limited



       Not_Applicable
       Not_Applicable, NON United States Not_Applicable

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming System
        Security Virtual Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        RedHat


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Caldera



     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.psand.net

     Primary Contact:
        Mike Harris



  1.457.  Consultant ID: US, NON United States, Tksoft, OY, Inc.



       Sepantie 10
       Porvoo, NON United States 06400

       US



     Consulting Specialties:
        Custom Programming E-Commerce Firewalls and Internet Security
        Internet (Web) Programming System Security



     Main Distribution:
        Other


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable
     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +358-19-575-4081


     Company Fax:
        +358-19-575-4133


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        admin@tksoft.com

     Company URL:
        http://www.tksoft.com

     Primary Contact:
        Troy Korjuslommi



  1.458.  Consultant ID: US, NON United States, Venkat



       1,1810,river court
       jersey, NON United States 07310

       US



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        avsrao_india@yahoo.com

     Company URL:
        http://avsrao.8m.com

     Primary Contact:
        venkat rao



  1.459.  Consultant ID: US, NON United States, iOpen Technologies Ltd.



       PO Box 13-917
       Christchurch, NON United States 8004

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other
     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +64 21 636 661


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +64 21 636 661

     Contact Email Address:
        support@iopen.co.nz

     Company URL:
        http://www.iopen.co.nz

     Primary Contact:
        Richard Waid



  1.460.  Consultant ID: US, NON United States, spinalware technologies



       33,st.pauls ave
       jersey, NON United States 07310

       US



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        201-626-3184


     Company Fax:
        n/a


     Support Phone Number:
        201-626-3184

     Contact Email Address:
        avsrao_india@yahoo.com

     Company URL:
        http://avsrao.8m.com

     Primary Contact:
        venkat rao



  1.461.  Consultant ID: US, NY, Aegis Information Systems, Inc.



       P.O. Box 730
       Hicksville, NY 11802

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Netware
        Connectivity Network Administration System Administration System
        Security



     Main Distribution:
        RedHat

     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        various


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        800-234-4700


     Company Fax:
        516-937-3999


     Support Phone Number:
        800-344-8165

     Contact Email Address:
        help@AegisInfoSys.com.

     Company URL:
        http://www.AegisInfoSys.com.

     Primary Contact:
        David Harari



  1.462.  Consultant ID: US, NY, Andrew Madloch



       152 Madison Avenue, Suite 1104
       New York, NY 10016

       US



     Consulting Specialties:
        Custom Programming E-Commerce Internet (Web) Programming



     Main Distribution:
        RedHat
     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        +1 212 214 0558


     Company Fax:
        +1 212 214 0558


     Support Phone Number:
        +1 212 214 0558

     Contact Email Address:
        support@intermarket3d.com

     Company URL:
        http://www.intermarket3d.com

     Primary Contact:
        Andrew Madloch



  1.463.  Consultant ID: US, NY, Donahue Consulting



       100 John St., #1410
       New York, NY 10038

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking

     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        212.998.3158


     Company Fax:
        212.995.4120


     Support Phone Number:
        212.998.3158

     Contact Email Address:
        adam@donahueinc.net

     Company URL:
        http://www.donahueinc.net

     Primary Contact:
        Adam Donahue



  1.464.  Consultant ID: US, NY, Instrumental Software Technologies,
  Inc.



       70 CEREUS WAY
       NEW PALTZ , NY 12561

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Internet (Web) Programming
        Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        914 256-9290


     Company Fax:
        914 256-9299


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@isti.com

     Company URL:
        http://www.isti.com

     Primary Contact:
        Paul Friberg



  1.465.  Consultant ID: US, NY, Internet Server COnnections, Inc.



       3616 Edgehill Road
       Yorktown Heights, NY 10598-1104

       US



     Consulting Specialties:
        Custom Programming E-Commerce Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Intel


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1-914-243-5675


     Company Fax:
        +1-914-243-4965


     Support Phone Number:
        +1-914-243-5675

     Contact Email Address:
        support@internetserver.com

     Company URL:
        http://www.internetserver.com

     Primary Contact:
        Homayoon Beigi



  1.466.  Consultant ID: US, NY, JAP Consulting



       82 Beach 2nd Street
       Lawrence, NY 11559

       US

     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Netware Connectivity Network Administration System
        Administration



     Main Distribution:
        Suse


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-516-371-6886


     Company Fax:
        1-516-371-6886


     Support Phone Number:
        1-516-371-6886

     Contact Email Address:
        support@japconsulting.com

     Company URL:
        http://www.japconsulting.com

     Primary Contact:
        Jason Pearsall



  1.467.  Consultant ID: US, NY, Logicept Corporation



  41 Chenango St, Suite 201
  Binghamton, NY 13901-2901

  US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@logicept.com

     Company URL:
        http://www.logicept.com

     Primary Contact:
        Jaron Rubenstein



  1.468.  Consultant ID: US, NY, Lrw.Net



       188 2nd Ave, #9
       New York, NY 10003

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Suse


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-212-254-3551


     Company Fax:
        1-212-254-6175


     Support Phone Number:
        1-212-254-3551

     Contact Email Address:
        rw26@lrw.net

     Company URL:
        http://lrw.net

     Primary Contact:
        Randy Wright
  1.469.  Consultant ID: US, NY, Paul Dlug



       6 Alilah Ct.
       Miller Place, NY 11764

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        pdlug@portjeff.net

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Paul Dlug
  1.470.  Consultant ID: US, NY, Realtime Software Solutions, Inc.



       44 Northfield Road
       Rcchester, NY 14617

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Internet Server Development
        Internet (Web) Programming Network Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-716-467-8889


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        tom@realtime1.com

     Company URL:
        http://realtime1.com

     Primary Contact:
        Thomas Bond

  1.471.  Consultant ID: US, NY, RetiComp, Inc.



       75 West End Ave. Suite R32C
       New York, NY 10023

       US



     Consulting Specialties:
        Firewalls and Internet Security Internet Server Development
        Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        212-957-6710


     Company Fax:
        212-957-6711


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.reticomp.com

     Primary Contact:
        Donn Morrill

  1.472.  Consultant ID: US, NY, SuperGeek Consolidated



       80 Miller Rd.
       Latham, NY 12110

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Red Hat & Debian


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1+ 518-786-1594


     Company Fax:
        1+ 518-786-1594


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        supergeek@supergeek.com

     Company URL:
        http://www.supergeek.com


     Primary Contact:
        Ed Huott



  1.473.  Consultant ID: US, NY, Templar Studios, Inc.



       157 Ludlow St.
       New York, NY 10002

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Or any other...


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        212-982-9360


     Company Fax:
        212-982-9370


     Support Phone Number:
        212-982-9360

     Contact Email Address:
        dwood@templar.com

     Company URL:
        http://www.templar.com

     Primary Contact:
        David Wood



  1.474.  Consultant ID: US, NY, Zenez, Inc.



       40 Paine Street
       Lindenhurst, NY 11757

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-516-957-1907


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        ben@amvalue.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Benjamin Suto



  1.475.  Consultant ID: US, OH, 800Linux



       1357 West Lane Ave suite 211
       Columbus, OH 43221

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet (Web) Programming Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        614-324-1610


     Company Fax:
        614-324-1617

     Support Phone Number:
        614-324-1610

     Contact Email Address:
        suppor

     Company URL:
        http://www.linux800.com

     Primary Contact:
        Not_Applicable Not_Applicable



  1.476.  Consultant ID: US, OH, Advanced Unix and Network Consulting



       7652 Crimson Ct.
       Mentor, OH 44060

       US



     Consulting Specialties:
        Firewalls and Internet Security Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (440) 255-0421



     Company Fax:
        (440) 255-0421


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Dennis.Dumont@AUNC.com

     Company URL:
        http://www.aunc.com

     Primary Contact:
        Dennis Dumont



  1.477.  Consultant ID: US, OH, Bradley M. Kuhn



       P.O. Box 20042
       Cincinnati, OH 45220

       US



     Consulting Specialties:
        Custom Programming Firewalls and Internet Security Internet
        (Web) Programming Network Administration System Administration
        System Security



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        Red Hat


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        513-475-0311
     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        bkuhn@acm.org

     Company URL:
        http://www.ebb.org/bkuhn

     Primary Contact:
        Bradley Kuhn



  1.478.  Consultant ID: US, OH, CinLAN Systems



       1054 Kreis Lane
       Cincinnati, OH 45205

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Network Administration System
        Administration



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        513-471-7272


     Company Fax:
        Not_Applicable


     Support Phone Number:
        513-471-7272

     Contact Email Address:
        crdorr@briefcase.com

     Company URL:
        http://members.xoom.com/CinLAN

     Primary Contact:
        Christopher Dorr



  1.479.  Consultant ID: US, OH, Cleveland Internet Association



       4876 East 85th
       Cleveland, OH 44125

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Will consider any


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        216-552-4368


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Jeff Garvas



  1.480.  Consultant ID: US, OH, Computer Wizards Consulting



       148 Apricot Ln
       Dayton, OH 45433-1109

       US



     Consulting Specialties:
        Custom Programming Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming Network
        Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        937-754-0458


     Company Fax:
        937-754-0194


     Support Phone Number:
        937-754-0458

     Contact Email Address:
        support@computerwizards.com

     Company URL:
        http://www.computerwizards.com

     Primary Contact:
        Jeff Lamb



  1.481.  Consultant ID: US, OH, Essex Software Development, Inc.



       3452 Meadowbrook Blvd.
       Cleveland Heights, OH 44118

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet (Web) Programming Network Administration System
        Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        216-932-1230


     Company Fax:
        216-397-3380


     Support Phone Number:
        216-932-1230

     Contact Email Address:
        Support@esdi.com

     Company URL:
        http://http://www.esdi.com

     Primary Contact:
        Brendan O'Haire



  1.482.  Consultant ID: US, OH, LANshark Systems, Inc



       784 Morrison Road
       Columbus, OH 43230

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        All others
     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        614-751-1111


     Company Fax:
        614-751-1112


     Support Phone Number:
        614-751-1111

     Contact Email Address:
        support@lanshark.com

     Company URL:
        http://www.lanshark.com

     Primary Contact:
        Scott Sharkey



  1.483.  Consultant ID: US, OH, Lightstream Internet, Inc.



       7700 Saint Clair
       Mentor, OH 44060

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (440)/269-2352


     Company Fax:
        (440)/942-6387


     Support Phone Number:
        (440)/269-2352

     Contact Email Address:
        tech@lightstream.net

     Company URL:
        http://www.lightstream.net

     Primary Contact:
        Jon Changnon



  1.484.  Consultant ID: US, OH, Saraber Solutions



       110 Diehl st.
       Bettsville, OH 44815

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration



     Main Distribution:
        Other


     Other Distribution:
        Any, Redhat, Debian,


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (419)986-5028


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@saraber.dhs.org

     Company URL:
        http://saraber.dhs.org

     Primary Contact:
        Gerard Saraber



  1.485.  Consultant ID: US, OH, TES, Inc.



       2903 Ravogli Ave.
       Cincinnati, OH 45211

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Netware Connectivity Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 513 661 3200


     Company Fax:
        +1 513 661 3732


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Larry Townsend



  1.486.  Consultant ID: US, OH, The Computer Underground



       1357 West Lane Ave suite 210
       Columbus, OH 43221

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        614-485-0506


     Company Fax:
        Not_Applicable


     Support Phone Number:
        614-485-0506

     Contact Email Address:
        support@tcu-inc.com

     Company URL:
        http://http://www.tcu-inc.com

     Primary Contact:
        Mark Nielsen



  1.487.  Consultant ID: US, OH, The Computer Underground, Inc.



       1357 West Lane Ave suite 210
       Columbus, OH 43221

       US

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        614-485-0506


     Company Fax:
        614-485-9617


     Support Phone Number:
        614-485-0506

     Contact Email Address:
        suport@tcu-inc.com

     Company URL:
        http://www.tcu-inc.com

     Primary Contact:
        Mark Nielsen



  1.488.  Consultant ID: US, OH, Unique Systems, Inc.



  6920 Spring Valley Dr, #106
  Holland, OH 43528

  US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Internet (Web) Programming System Administration Virtual Private
        Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Mandrake


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        419 861-3331


     Company Fax:
        419 861-3340


     Support Phone Number:
        419 861-3331

     Contact Email Address:
        info@uniqsys.com

     Company URL:
        http://www.uniqsys.com

     Primary Contact:
        Glenn Jacobson



  1.489.  Consultant ID: US, OH, dkFlyer



       3962 East 55th St
       Newburgh Hts, OH 44125-4864

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Other


     Other Distribution:
        All


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        WiniX


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (216)883-0222


     Company Fax:
        (216)883-0221


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        dkflyer@dkflyer.com

     Company URL:
        http://www.dkflyer.com

     Primary Contact:
        Dennis Kennedy



  1.490.  Consultant ID: US, OK, After Hours Computer Consulting,LLC.



       2 West 6th Street, Suite 450
       Tulsa, OK 74119

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Internet Server Development Internet
        (Web) Programming Network Administration System Administration
        System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        918.583.1004


     Company Fax:
        918.587.2422


     Support Phone Number:
        918.583.1004

     Contact Email Address:
        support@ahcctulsa.com
     Company URL:
        http://www.ahcctulsa.com

     Primary Contact:
        Kenneth Hess



  1.491.  Consultant ID: US, OR, 3D Technology, Inc.



       9150 SW Pioneer Ct. Suite E
       Portland, OR 97070

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet (Web) Programming
        Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        RedHat



     Company Phone Number:
        877-333-2677


     Company Fax:
        503-582-9102


     Support Phone Number:
        503-582-1190
     Contact Email Address:
        support@3dtech.net

     Company URL:
        http://www.3dtech.net

     Primary Contact:
        Kerry Lafferty



  1.492.  Consultant ID: US, OR, Avalon Technology Group, Inc.



       0607 SW Idaho St.
       Portland, OR 97201

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (503) 246-3630


     Company Fax:
        (503) 246-3124
     Support Phone Number:
        (503) 246-3630

     Contact Email Address:
        support@avalongroup.net

     Company URL:
        http://www.avalongroup.net

     Primary Contact:
        Timothy Grant



  1.493.  Consultant ID: US, OR, Fargus.Net



       326 sw 7th street
       Corvallis, OR 97333

       US



     Consulting Specialties:
        Custom Programming Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming Network
        Administration System Administration Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        1 541 754 6231


     Company Fax:
        Not_Applicable
     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        nick@fargus.net

     Company URL:
        http://www.fargus.net

     Primary Contact:
        Nick Rusnov



  1.494.  Consultant ID: US, OR, Fence-Post Technology



       5117 NE 31st Ave
       Portland, OR 97211

       US



     Consulting Specialties:
        Custom Programming Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        503-287-5244



     Company Fax:
        503-335-9306


     Support Phone Number:
        503-287-5244

     Contact Email Address:
        info@fence-post.com

     Company URL:
        http://www.fence-post.com

     Primary Contact:
        Art Opiela-Young



  1.495.  Consultant ID: US, OR, Hurrah Internet Services



       28 SW 1st Ave.
       Portland, OR 97204

       US



     Consulting Specialties:
        Custom Programming E-Commerce Internet Server Development
        Internet (Web) Programming System Administration Virtual Private
        Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-503-380-3218


     Company Fax:
        1-503-223-3140


     Support Phone Number:
        1-503-380-3218

     Contact Email Address:
        support@hurrah.com

     Company URL:
        http://www.hurrah.com

     Primary Contact:
        Tracy Camp David Elkins



  1.496.  Consultant ID: US, OR, Naked Ape Consulting



       4404 SE Nehalem St.
       Portland, OR 97206

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        None


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 503 788 4688


     Company Fax:
        +1 503 788 4688


     Support Phone Number:
        +1 503 788 4688

     Contact Email Address:
        wcooley@nakedape.navi.net

     Company URL:
        http://nakedape.navi.net

     Primary Contact:
        W. Reilly Cooley



  1.497.  Consultant ID: US, PA, 23rd Century Computing



       271 Austin Drive
       Grantville, PA 17028

       US



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security System
        Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Slackware


     Reseller Authorizations:
        Not Applicable
     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (717) 469-0614


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@23cc.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Brian Reifsnyder



  1.498.  Consultant ID: US, PA, Associated Micro Systems, Inc.



       140 South Village Avenue Suite 20
       Exton, PA 19341

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming System Administration Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        610-524-9816


     Company Fax:
        610-524-9821


     Support Phone Number:
        610-524-9816

     Contact Email Address:
        mmarcini@amicrosys.com

     Company URL:
        http://www.amicrosys.com

     Primary Contact:
        Mike Marciniszyn



  1.499.  Consultant ID: US, PA, Azaroff Consulting



       2 Brandywine
       Hershey, PA 17033

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        Caldera


     Other Distribution:
        Red Hat


     Specialty Distribution:
        Other

     Other Specialty Distribution:
        Extreme Linux


     Reseller Authorizations:
        IBM



     Linux Certifications:
        Caldera



     Company Phone Number:
        7175200423


     Company Fax:
        none


     Support Phone Number:
        7175200423

     Contact Email Address:
        aazaroff@redrose.net

     Company URL:
        http://none

     Primary Contact:
        Andre Azaroff



  1.500.  Consultant ID: US, PA, IQ Group



       325 Chestnut Street
       Philadelphia, PA 19106

       US



     Consulting Specialties:
        Custom Programming E-Commerce Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        215-925-4500


     Company Fax:
        215-925-1970


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        mcdonc@iqgroup.com

     Company URL:
        http://www.iqgroup.com

     Primary Contact:
        Chris McDonough



  1.501.  Consultant ID: US, PA, JAV-Associates Consulting



       239 South West Street
       York, PA 17404

       US



     Consulting Specialties:
        Custom Systems Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Netware Connectivity
        Network Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        7178540425


     Company Fax:
        3058322662


     Support Phone Number:
        7178540425

     Contact Email Address:
        tech@src-router.tytek.net

     Company URL:
        http://src-router.tytek.net

     Primary Contact:
        John Vorchak



  1.502.  Consultant ID: US, PA, Megaglobal Corp.



       922 South 46th Street
       Philadelphia, PA 19143

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking

     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        215-681-8316


     Company Fax:
        Not_Applicable


     Support Phone Number:
        215-681-8316

     Contact Email Address:
        support@megaglobal.com

     Company URL:
        http://megaglobal.com

     Primary Contact:
        andrew jastremski



  1.503.  Consultant ID: US, PA, Michael Jastremski



       922 South 46ths
       Philadelphia, PA 19143

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Any


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Our Own Distro :)


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        215-681-8316


     Company Fax:
        215-555-1212


     Support Phone Number:
        215-681-8316

     Contact Email Address:
        support@westphila.net

     Company URL:
        http://http://westphila.net

     Primary Contact:
        Michael Jastremski



  1.504.  Consultant ID: US, PA, Outcome Technology Associates, Inc.



       612 California Avenue
       Pittsburgh, PA 15202

       US



     Consulting Specialties:
        Custom Systems E-Commerce Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not Applicable



     Company Phone Number:
        412.766.0300


     Company Fax:
        412.766.8245


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.otai.net

     Primary Contact:
        Sean McLinden



  1.505.  Consultant ID: US, PA, Reed Consulting



       26 courtney st
       pittsburgh, PA 15202

       US

     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        412-766-2373


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Joel Reed



  1.506.  Consultant ID: US, PA, Rich Westcott



       4053 Boone St
       Phila, PA 19127

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        215-487-7529


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        rwestcot@ctlinux.ecogchair.org

     Company URL:
        http://www.ctlinux.ecogchair.org

     Primary Contact:
        Rich Westcott



  1.507.  Consultant ID: US, PR, OG Consulting



  Urb. Santa Clara; W-1 Anamu
  Guaynabo, PR 00969

  US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        787-731-4332


     Company Fax:
        787-731-4331


     Support Phone Number:
        787-731-4332

     Contact Email Address:
        support@og-consulting.com

     Company URL:
        http://www.og-consulting.com

     Primary Contact:
        James O'Malley



  1.508.  Consultant ID: US, RI, New England Computer



       847 Mendon Rd.
       Woonsocket, RI 02895

       US



     Consulting Specialties:
        CIFS (Samba)



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        4017629980


     Company Fax:
        4017650031


     Support Phone Number:
        4017629980

     Contact Email Address:
        jaxon6@home.com

     Company URL:
        http://www.home.com

     Primary Contact:
        Patrick Paul


  1.509.  Consultant ID: US, SC, Crux



       729 Martin Raod
       Starr, SC 29684

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        864-375-3077


     Company Fax:
        Not_Applicable


     Support Phone Number:
        864-375-0377

     Contact Email Address:
        carlk@carol.net

     Company URL:
        http://www.carol.net

     Primary Contact:
        Carl A. Kolasky Not_Applicable



  1.510.  Consultant ID: US, SC, GAME.NET



       1209 Midvale Avenue
       Charleston, SC 29412

       US



     Consulting Specialties:
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration



     Main Distribution:
        Other


     Other Distribution:
        slackware


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-843-762-7131


     Company Fax:
        1-843-762-7131


     Support Phone Number:
        1-843-762-7131

     Contact Email Address:
        info@game.net

     Company URL:
        http://game.net

     Primary Contact:
        Jim Sims



  1.511.  Consultant ID: US, SC, GAME.NET, Inc.



       1209 Midvale Avenue
       Charleston, SC 29412

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        Other


     Other Distribution:
        SlackWare


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1-843-762-7131


     Company Fax:
        fax is for losers -



     Support Phone Number:
        +1-843-762-7131

     Contact Email Address:
        support@game.net

     Company URL:
        http://www.game.net

     Primary Contact:
        Rick Bauman



  1.512.  Consultant ID: US, SC, Linux Empower



       Not_Applicable
       Sumter, SC 29040

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        consulting@linuxempower.com

     Company URL:
        http://www.linuxempower.com

     Primary Contact:
        Rob Smith



  1.513.  Consultant ID: US, SC, Michael W. Shaffer



       P.O. Box 12215
       Columbia, SC 29211

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        803-252-8079


     Company Fax:
        Not_Applicable


     Support Phone Number:
        803-252-8079

     Contact Email Address:
        mwshaffer@earthlink.net

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Michael Shaffer



  1.514.  Consultant ID: US, SC, PenguinXpress



       1752 Potter Road
       Lancaster, SC 29720

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-803-285-1350


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        rclong@hubcap.clemson.edu

     Company URL:
        http://www.penguinxpress.net

     Primary Contact:
        Robert Long



  1.515.  Consultant ID: US, SC, eDivision.net



       PMB# 274; 33 Office Park Rd 4A
       Hilton Head Island, SC 29928

       US



     Consulting Specialties:
        E-Commerce



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable

     Linux Certifications:
        Not Applicable



     Company Phone Number:
        770.216.1516


     Company Fax:
        770.216.1516


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@eDivision.net

     Company URL:
        http://www.eDivision.net

     Primary Contact:
        ski kinsey



  1.516.  Consultant ID: US, TN, Michael Chaney Consulting Corporation



       2624 Oak Forest Drive
       Antioch, TN 37013

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Internet (Web)
        Programming Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable
     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 615 361 3254


     Company Fax:
        +1 615 361 1244


     Support Phone Number:
        +1 615 361 3254

     Contact Email Address:
        mdchaney@michaelchaney.com

     Company URL:
        http://www.michaelchaney.com/serious

     Primary Contact:
        Michael Chaney



  1.517.  Consultant ID: US, TN, Sheer Genius



       2016 Rosecliff Dr.
       Nashville, TN 37206

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 615.226.4040


     Company Fax:
        +1 615.228.9900


     Support Phone Number:
        +1 615.364.4040

     Contact Email Address:
        consulting@sheergenius.com

     Company URL:
        http://www.sheergenius.com

     Primary Contact:
        Matt Kenigson



  1.518.  Consultant ID: US, TN, TeleVideo Global, Inc.



       448 N. Cedar Bluff Rd. #350
       Knoxville, TN 37923

       US



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Mandrake-RedHat


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        423-777-0080


     Company Fax:
        423-777-0098


     Support Phone Number:
        423-777-0080

     Contact Email Address:
        televid@televid.com

     Company URL:
        http://linux.televid.com

     Primary Contact:
        Stephen Nodvin



  1.519.  Consultant ID: US, TX, Aegis Data Systems



       PO Box 28554
       Dallas, TX 75228

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable
     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        214.394.4213


     Company Fax:
        972.857.9909


     Support Phone Number:
        214.394.4213

     Contact Email Address:
        operations@aegisdata.com

     Company URL:
        http://www.aegisdata.com

     Primary Contact:
        Mark Stingley



  1.520.  Consultant ID: US, TX, Computer Innovations International



       2145 NW Military Highway, Suite 103
       San Antonio, TX 78213

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat

     Other Distribution:
        Caldera


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Intel/Sparc/Alpha


     Reseller Authorizations:
        Compaq HP IBM



     Linux Certifications:
        Caldera



     Company Phone Number:
        210-348-0850 or 210-


     Company Fax:
        210-348-0851


     Support Phone Number:
        210-348-0850 or 210-

     Contact Email Address:
        techsales@txcii.com

     Company URL:
        http://www.txcii.com

     Primary Contact:
        Waldemar Vega



  1.521.  Consultant ID: US, TX, Corlogic



       1707A Brackenridge
       Austin, TX 78704

       US



     Consulting Specialties:
        Custom Programming Internet Server Development Internet (Web)
        Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        512-707-2347


     Company Fax:
        Not_Applicable


     Support Phone Number:
        512-707-2347

     Contact Email Address:
        corey@corlogic.com

     Company URL:
        http://www.corlogic.com

     Primary Contact:
        Corey Huinker



  1.522.  Consultant ID: US, TX, Daily Data, Inc.



       Post Office Box 140465
       Dallas, TX 75214-0465

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        214.827.2170


     Company Fax:
        214.821.5051


     Support Phone Number:
        214.827.2170

     Contact Email Address:
        custsvc@dailydatainc.com

     Company URL:
        http://www.dailydatainc.com

     Primary Contact:
        Rod Rodolico



  1.523.  Consultant ID: US, TX, DartW Network Consulting



       P.O.Box 270362
       Flower Mound, TX 75027-0362

       US



     Consulting Specialties:
        Not_Applicable


     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        214.793.3053


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        dart@dartw.com

     Company URL:
        http://www.dartw.com

     Primary Contact:
        Dart  West



  1.524.  Consultant ID: US, TX, Internet Power And Light



       19009 Preston Rd #215-240
       Dallas, TX 75252-2496

       US



     Consulting Specialties:
        Custom Systems Firewalls and Internet Security Internet Server
        Development Internet (Web) Programming Netware Connectivity
        Network Administration System Administration System Security
        Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 972 407 0727


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Phil Howard



  1.525.  Consultant ID: US, TX, LEAP _ Linux Enterprise Application
  Products



  P.O. Box 850905
  Richardson, TX 75085-0905

  US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Linux Host with ASCI


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1.972.475.8440


     Company Fax:
        +1.972.463.2998


     Support Phone Number:
        +1.972.475.8440

     Contact Email Address:
        adcoker@leap4linux.com

     Company URL:
        http://www.leap4linux.com

     Primary Contact:
        Dr. Stephen F. Wheeler



  1.526.  Consultant ID: US, TX, PSW Technologies



       6300 Bridgepoint Parkway, Bldg 3, Ste 200
       Austin, TX 78730

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming System Administration System Security
        Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat Not Applicable



     Company Phone Number:
        512-343-6666


     Company Fax:
        512-343-9650


     Support Phone Number:
        512-343-6666

     Contact Email Address:
        linux@pswtech.com

     Company URL:
        http://www.psw.com


     Primary Contact:
        Satish Rao



  1.527.  Consultant ID: US, TX, ProSoft Plus, Inc.



       11113 Cherry Park
       San Antonio, TX 78249

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Network
        Administration System Administration Virtual Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        IBM



     Linux Certifications:
        Caldera



     Company Phone Number:
        (210)694-0801


     Company Fax:
        (210) 699-9416


     Support Phone Number:
        Not Available

     Contact Email Address:
        prosoft@satx.net

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Ed Valentine



  1.528.  Consultant ID: US, TX, Quinn Team Incorporated



       12941 North Freeway
       Houston, TX 77060

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Mandrake


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        281.875.3883 #211


     Company Fax:
        281.875.3890



     Support Phone Number:
        Not Available

     Contact Email Address:
        linux@quinnteam.com

     Company URL:
        http://www.quinnteam.com

     Primary Contact:
        Micah Quinn



  1.529.  Consultant ID: US, TX, R & B Consulting



       14019 SW FWY #301  PMB 411
       Sugar land, TX 77478

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1-281-494-UNIX

     Company Fax:
        1-281-494-4329


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Support@TexasComputers.com

     Company URL:
        http://www.TexasComputers.com

     Primary Contact:
        Brian Walters



  1.530.  Consultant ID: US, TX, Z Consulting



       Route 1 Box 68 A-1
       Hockley, TX 77447

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        409-931-2838


     Company Fax:
        Not_Applicable


     Support Phone Number:
        409-931-2838

     Contact Email Address:
        wczimmer@earthlink.net

     Company URL:
        http://www.earthlink.net

     Primary Contact:
        Chris Zimmerman



  1.531.  Consultant ID: US, TX, heights Open Systems



       517 harvard St.
       Houston, TX 77007

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        Debian/GNU


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        713-864-5676


     Company Fax:
        713-864-5676


     Support Phone Number:
        713-864-5676

     Contact Email Address:
        perry@open-systems.com

     Company URL:
        http://www.open-systems.com

     Primary Contact:
        Perry Piplani



  1.532.  Consultant ID: US, UT, Open Source Consulting Group



       5136 W. 6435 S.
       West Jordan, UT 84084

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Any


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        Any


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (801) 966-1297


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        info@oscg.net

     Company URL:
        http://www.oscg.net

     Primary Contact:
        Mark Whitley



  1.533.  Consultant ID: US, VA, 2RAD



       14402 Haystack Court
       Centreville, VA 20120

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter

     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        703 502-0640


     Company Fax:
        703 502 8870


     Support Phone Number:
        703 502-0640

     Contact Email Address:
        rad@2rad.net

     Company URL:
        http://www.2rad.net

     Primary Contact:
        Mark  Rorabaugh



  1.534.  Consultant ID: US, VA, Atlantis Consulting



       206B 88th Street
       Virginia Beach, VA 23451

       US



     Consulting Specialties:
        Firewalls and Internet Security Internet Server Development
        Network Administration System Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        Other

     Other Specialty Distribution:
        None


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        757 425-5950


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        mskar@zasoftware.com

     Company URL:
        http://www.zasoftware.com

     Primary Contact:
        Marc Skarshinski



  1.535.  Consultant ID: US, VA, Atlantis



       206B 88th Street
       Virginia Beach, VA 23451

       US



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Network Administration System Administration System
        Security



     Main Distribution:
        Other


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        757 425-5950


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        mskar@zasoftware.com

     Company URL:
        http://www.zasoftware.com

     Primary Contact:
        Marc Skarshinski



  1.536.  Consultant ID: US, VA, Branch & Company



       P.O. Box 547
       Powhatan, VA 23139

       US



     Consulting Specialties:
        Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        804-598-2153   USA


     Company Fax:
        804-225-8023   USA


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Carlisle Branch



  1.537.  Consultant ID: US, VA, Brown Technolgies Network, Inc.



       43953 Bruceton Mills Circle
       Ashburn, VA 20147-4806

       US



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        703-858-0642


     Company Fax:
        703-858-0642


     Support Phone Number:
        703-858-0642

     Contact Email Address:
        pbrown@btechnet.com

     Company URL:
        http://www.btechnet.com

     Primary Contact:
        Paul Brown



  1.538.  Consultant ID: US, VA, Flamingo Internet Navigators



       310-D Patriot lane
       Williamsburg, VA 23185-2055

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking

     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +1 757 269-0350


     Company Fax:
        +1 757 269-0348


     Support Phone Number:
        +1 757 269-0350

     Contact Email Address:
        support@fini.net

     Company URL:
        http://http://www.fini.net/

     Primary Contact:
        Christopher Hicks



  1.539.  Consultant ID: US, VA, HBruch & Associates



       12809 Reams Station Place
       Herndon, VA 20170

       US



     Consulting Specialties:
        Custom Programming Custom Systems

     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        1.703.742.9546


     Company Fax:
        Not_Applicable


     Support Phone Number:
        1.703.742.9546

     Contact Email Address:
        harris@bruch.net

     Company URL:
        http://www.mindspring.com/~hbruch

     Primary Contact:
        Harris Bruch



  1.540.  Consultant ID: US, VA, Jade Enterprises, Inc.



       12085 Cheroy Woods Ct.
       Ashland, VA 23005

       US



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        804-752-6688


     Company Fax:
        804-752-6788


     Support Phone Number:
        n/a

     Contact Email Address:
        jay@jade-ent.com

     Company URL:
        http://www.jade-ent.com

     Primary Contact:
        Jay Campbell



  1.541.  Consultant ID: US, VA, Linux & Web Professionals



       PO Box 2763
       Lynchburg, VA 24501

       US



     Consulting Specialties:
        Custom Programming Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1 (973) 283-4712


     Company Fax:
        1 (973) 283-4712


     Support Phone Number:
        1 (973) 283-4712

     Contact Email Address:
        support@linuxwebpro.com

     Company URL:
        http://www.linuxwebpro.com

     Primary Contact:
        Floyd Jennings



  1.542.  Consultant ID: US, VA, NetSource of Virginia, Inc.



       7639 Hull Street Rd.   STE 202
       Richmond, VA 23235-6438

       US


     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Netware Connectivity
        Network Administration System Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        Slackware and Red Ha


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        none currently


     Reseller Authorizations:
        HP



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        1-804-674-6040


     Company Fax:
        1-804-674-6041


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        netsource@erols.com

     Company URL:
        http://www.erols.com/netsource

     Primary Contact:
        Jeff Davis



  1.543.  Consultant ID: US, VA, Noblestar Systems Corporation



       12021 Sunset Hills Road
       Reston, VA 20190

       US


     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming System Administration



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        703.464.4000


     Company Fax:
        703.464.4001


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.noblestar.com

     Primary Contact:
        Jerry Matus



  1.544.  Consultant ID: US, VA, Phaedo Consulting, Inc.



       8000 Towers Crescent Drive, Suite 1350
       Vienna, VA 22182

       US


     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        SparcLinux, AlphaLin


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        703-847-3639


     Company Fax:
        540-370-4185


     Support Phone Number:
        703-847-3639

     Contact Email Address:
        info@phaedo.com

     Company URL:
        http://www.phaedo.com

     Primary Contact:
        Ryan Quick



  1.545.  Consultant ID: US, VA, Signet Computers, Inc.



       1901 N. Moore St. Suite 805
       Arlington, VA 22209

       US


     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming Netware Connectivity
        Network Administration System Administration Virtual Private
        Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Slackware


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        703 812 8585


     Company Fax:
        703 812 8547


     Support Phone Number:
        703 812 8585

     Contact Email Address:
        sci-info@sigcomp.com

     Company URL:
        http://www.sigcomp.com

     Primary Contact:
        Chuck Olczak



  1.546.  Consultant ID: US, VA, Spectrum Office Systems, Inc.



  11320 Random Hills Road, Suite 630
  Fairfax, VA 22030-6001

  US



     Consulting Specialties:
        Firewalls and Internet Security Netware Connectivity Network
        Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        703-591-7400


     Company Fax:
        703-591-9780


     Support Phone Number:
        703-591-7400

     Contact Email Address:
        tech@spectrum-systems.com

     Company URL:
        http://www.spectrum-systems.com

     Primary Contact:
        Nancy Fallon



  1.547.  Consultant ID: US, VA, Two Radical Technologies, Inc.



       14119-M Sullyfield Circle
       Chantilly, VA 20151-1626

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        1 888 321-2RAD


     Company Fax:
        1 703 502 8870


     Support Phone Number:
        1 888 321-2RAD

     Contact Email Address:
        rad@2rad.net

     Company URL:
        http://www.2rad.net


     Primary Contact:
        Mark  Rorabaugh



  1.548.  Consultant ID: US, VA, Zentropic Computing, LLC



       441-B Carlisle Dr.
       Herndon, VA 20170

       US



     Consulting Specialties:
        Custom Programming Custom Systems



     Main Distribution:
        Other


     Other Distribution:
        Zentropix RealTime L


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Zentropix RealTime L


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        703-471-6690


     Company Fax:
        703-471-2108


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        info@zentropix.com


     Company URL:
        http://www.zentropix.com

     Primary Contact:
        David Beal



  1.549.  Consultant ID: US, VT, Everest Systems



       Route 100 South
       Morrisville, VT 05661

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        802-888-7857


     Company Fax:
        802-888-7857


     Support Phone Number:
        802-888-7857
     Contact Email Address:
        braman@world.std.com

     Company URL:
        http://world.std.com/~braman/

     Primary Contact:
        Balu Raman, MSEE.,CC Veda Aranyam



  1.550.  Consultant ID: US, WA, Cheek Consulting



       620 5th Avve W, Suite 309
       Seattle, WA 98119

       US



     Consulting Specialties:
        CIFS (Samba) E-Commerce Firewalls and Internet Security Internet
        Server Development Internet (Web) Programming Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        206 282-2892


     Company Fax:
        Not_Applicable
     Support Phone Number:
        206 282-2892

     Contact Email Address:
        support@cheek.com

     Company URL:
        http://www.cheek.com

     Primary Contact:
        joseph cheek



  1.551.  Consultant ID: US, WA, Dreamcorp Computer Solutions



       4137 University Way NE Suite 201
       Seattle, WA 98105

       US



     Consulting Specialties:
        Custom Programming Custom Systems Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration System Security
        Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (206) 634-1355

     Company Fax:
        (206) 634-1332


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@dreamcorp.com

     Company URL:
        http://www.dreamcorp.com

     Primary Contact:
        Steve Glor



  1.552.  Consultant ID: US, WA, Foresight Technologies



       705 204th DR SE
       Snohomish, WA 98290

       US



     Consulting Specialties:
        Not_Applicable


     Main Distribution:
        Other


     Other Distribution:
        slakware


     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        425-334-0933

     Company Fax:
        Not_Applicable


     Support Phone Number:
        425-334-0933

     Contact Email Address:
        dagnabit2@yahoo.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Dan Thacker



  1.553.  Consultant ID: US, WA, K Development



       2103 N 106th St. #C-402
       Seattle, WA 98133

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable


     Company Phone Number:
        206 365 5585


     Company Fax:
        Not_Applicable


     Support Phone Number:
        206 365 5585

     Contact Email Address:
        info@kd-dev.com

     Company URL:
        http://www.kd-dev.com

     Primary Contact:
        Derek Simkowiak



  1.554.  Consultant ID: US, WA, PeakServ



       104 Prospect Street
       Bellingham, WA 98225

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        800-453-5322


     Company Fax:
        360-733-7818


     Support Phone Number:
        800-453-5322

     Contact Email Address:
        info@peakserv.com

     Company URL:
        http://www.peakserv.com

     Primary Contact:
        John Blanford



  1.555.  Consultant ID: US, WA, Tacoma & Puget Sound Company



       4419 Harbor Ridge Road NE
       Tacoma, WA 98422

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Slackware


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (253)927-4051


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        spj@tapsco.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Steven Johnson



  1.556.  Consultant ID: US, WA, Veriteam, Inc.



       3039 173rd Ct NE
       Redmond, WA 98052-6228

       US



     Consulting Specialties:
        Custom Programming Internet Server Development Internet (Web)
        Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other



     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        425.882.0938


     Company Fax:
        425.882.0938


     Support Phone Number:
        425.882.0938

     Contact Email Address:
        support@veriteam.com

     Company URL:
        http://www.veriteam.com

     Primary Contact:
        Bernie Thompson



  1.557.  Consultant ID: US, WA, buzzwerks, Inc.



       1000 Second Ave, Suite 4060
       Seattle, WA 98104-1094

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        Debian


     Other Distribution:
        NA

     Specialty Distribution:
        UltraPenguin


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +001 206 625 0135


     Company Fax:
        +001 206 625 0304


     Support Phone Number:
        +001 206 625 0135

     Contact Email Address:
        support@buzzwerks.com

     Company URL:
        http://www.buzzwerks.com

     Primary Contact:
        Mitch Pirtle



  1.558.  Consultant ID: US, WI, BadgerData Internet Solutions



       P.O. Box 1526
       Appleton, WI 54912

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat
     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        920-830-1343


     Company Fax:
        920-830-1341


     Support Phone Number:
        920-830-1343

     Contact Email Address:
        support@bdis.net

     Company URL:
        http://www.bdis.net

     Primary Contact:
        Garrett Meiers



  1.559.  Consultant ID: US, WI, Midnight Software



       N11546 Old 41 Road
       Daggett,  (Michigan), WI 49821

       US



     Consulting Specialties:
        Custom Programming Custom Systems



     Main Distribution:
        RedHat
     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        906-639-2882


     Company Fax:
        906-639-2558


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        midnight@alphacomm.net

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Aaron Tuinstra



  1.560.  Consultant ID: US, WI, Network Integration Services



       S29W30139 S. Bethesda Cir.
       Waukesha, WI 53188

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Netware
        Connectivity Network Administration System Administration System
        Security Virtual Private Networking


     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        414-256-9617


     Company Fax:
        414-968-3044


     Support Phone Number:
        414-256-9617

     Contact Email Address:
        nis@pobox.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Michael Bloxham



  1.561.  Consultant ID: US, WI, Perry Systems



       PO Box 207
       Milwaukee, WI 53201-0207

       US



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Network Administration
        System Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        414/803-4797


     Company Fax:
        NA


     Support Phone Number:
        NA

     Contact Email Address:
        help@perrysystems.com

     Company URL:
        http://www.perrysystems.com

     Primary Contact:
        James Offutt



  1.562.  Consultant ID: US, WI, Rindy Consulting



       125 North Executive Drive; Suite 380
       Brookfield, WI 53005

       US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq HP



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        414-252-4273


     Company Fax:
        414-252-4274


     Support Phone Number:
        414-252-4273

     Contact Email Address:
        support@rindy.com

     Company URL:
        http://www.rindy.com

     Primary Contact:
        Troy Rindy



  1.563.  Consultant ID: US, WI, WhitePine Consulting



  606 N. Main St
  Fall River, WI 53932

  US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        920.484.6005


     Company Fax:
        Not_Applicable


     Support Phone Number:
        920.484.6005

     Contact Email Address:
        mjmc@whitepine.com

     Company URL:
        http://www.whitepine.com

     Primary Contact:
        Not_Applicable Not_Applicable



  1.564.  Consultant ID: US, WY, INTERNATIONAL SCIENCE & TEKOLOGY



  740 STATE HIGHWAY 230
  LARAMIE, WY 82072

  US



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        REDHAT && SUSE


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        LINUX BEOWULF CLUSTE


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        307 742 5822


     Company Fax:
        na


     Support Phone Number:
        307 742 5822

     Contact Email Address:
        maximum_linux@hotmail.com

     Company URL:
        http://na in process

     Primary Contact:
        Keith  Schmauss



  1.565.  Consultant ID: US, ZZ, ETA Associates, Inc.



       2018 31st Ave S
       Seattle, ZZ Not_Applicable

       US



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        425-765-3471


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@ultracode.com

     Company URL:
        http://www.ultracode.com/

     Primary Contact:
        Eric Anderson

  1.566.  Consultant ID: United Arab Emirates, GoldenSun Internet Con-
  sulting & Research



       P.O.Box 26038
       Dubai, NON United States Dubai

       United Arab Emirates



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Netware Connectivity Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        SUSE


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        971-4-2221780


     Company Fax:
        971-4-2210124


     Support Phone Number:
        971-4-2221780

     Contact Email Address:
        consult@goldensun.com

     Company URL:
        http://www.goldensun.com

     Primary Contact:
        Prabhakar James GSC



  1.567.  Consultant ID: United Arab Emirates, JM Infotech Solutions
  STPI



       P.O.Box 2687
       Dubai, NON United States 2687

       United Arab Emirates



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat



     Company Phone Number:
        971 50 6326822


     Company Fax:
        971 4 359295


     Support Phone Number:
        971 50 6326822

     Contact Email Address:
        mammen@emirates.net.ae
     Company URL:
        http://www.emirates.net.ae

     Primary Contact:
        John Mammen



  1.568.  Consultant ID: United Kingdom, Acetechno Solutions Ltd



       77 Delapre Drive
       Banbury, Oxon, NON United States OX16 7WS

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems System
        Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        0044 1295 259 523


     Company Fax:
        0044 1295 259 523


     Support Phone Number:
        0044 1295 259 523

     Contact Email Address:
        support@acetechno.freeserve.co.uk

     Company URL:
        http://acetechno.hypermart.net

     Primary Contact:
        Junior Williamson



  1.569.  Consultant ID: United Kingdom, CiteCall Ltd.



       Claremont, Coppice Lane
       Chorley, Lancashire, NON United States PR6 9DA

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Programming Internet (Web) Programming
        Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        Suse


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +44 1257 230 638


     Company Fax:
        +44 870 164 0846


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Kevin Mulholland



  1.570.  Consultant ID: United Kingdom, Dome Computer Consultants Ltd



       10 Manor Road, Whitcharch-on-Thames,
       Reading, NON United States RG8 7EU

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Programming Firewalls and Internet Security
        Network Administration System Administration System Security
        Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        Redhat


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Mandrake


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +44 (0) 7887 955 981


     Company Fax:
        Not_Applicable


     Support Phone Number:
        +44 (0) 7887 955 981

     Contact Email Address:
        domecc@email.com

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Phil Lewis



  1.571.  Consultant ID: United Kingdom, Enterprise Management Consult-
  ing



       Barnaby House, Charles Dickens Terrace, Maple Rd.
       London, NON United States SE20 8RE

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        RedHat

     Company Phone Number:
        44 181 659 2000


     Company Fax:
        44 181 778 0101


     Support Phone Number:
        44 181 659 2000

     Contact Email Address:
        emcweb@btinternet.com

     Company URL:
        http://www.emcuk.com

     Primary Contact:
        Malcolm Macsween



  1.572.  Consultant ID: United Kingdom, FGM Technology LTD EuroDev
  Cybernetics LTD



       1 South Terrace
       Thirsk, NON United States YO7 1RH

       United Kingdom



     Consulting Specialties:
        Network Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        EuroDev Linux & ARM


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable
     Company Phone Number:
        0441 197 869 / 01845


     Company Fax:
        NA


     Support Phone Number:
        ONLY GIVEN TO CLIENT

     Contact Email Address:
        ONLY GIVEN TO CLIENTS

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Not_Applicable Not_Applicable



  1.573.  Consultant ID: United Kingdom, GBdirect



       27 Park Drive
       Bradford, NON United States BD9 4DS

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        Caldera


     Other Distribution:
        ALL


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        ALL


     Reseller Authorizations:
        Not Applicable


     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +44 01274 772277


     Company Fax:
        +44 01274 772281


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        linux@gbdirect.co.uk

     Company URL:
        http://www.gbdirect.co.uk

     Primary Contact:
        Mike Banahan



  1.574.  Consultant ID: United Kingdom, J.S Unix Consultants Ltd



       1073 Manchester Road, Castleton
       Rochdale, NON United States OL11 2XJ

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Internet (Web)
        Programming Network Administration System Administration System
        Security



     Main Distribution:
        RedHat


     Other Distribution:
        Suse


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA



     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        (+44) 958 402172


     Company Fax:
        (+44) 970 0548678


     Support Phone Number:
        (+44) 958 402172

     Contact Email Address:
        support@santoroj.demon.co.uk

     Company URL:
        http://www.netspear.co.uk/js_unix

     Primary Contact:
        Joe Santoro



  1.575.  Consultant ID: United Kingdom, Jason Clifford



       264 Ripon Road
       Stevenage, NON United States SG1 4NF

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Netware Connectivity
        Network Administration System Administration System Security
        Virtual Private Networking



     Main Distribution:
        Other


     Other Distribution:
        All distributions


     Specialty Distribution:
        Other

     Other Specialty Distribution:
        All


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +44 7957 356660


     Company Fax:
        +44 1438 223433


     Support Phone Number:
        Not Available

     Contact Email Address:
        support@dlsl.demon.co.uk

     Company URL:
        http://www.dlsl.demon.co.uk

     Primary Contact:
        Jason Clifford



  1.576.  Consultant ID: United Kingdom, Labrat Computing Ltd



       86 Crayford Way
       Dartford, NON United States DA1 4LQ

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Systems E-Commerce Firewalls and Internet
        Security Internet Server Development Internet (Web) Programming
        Network Administration System Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +44 370 837124


     Company Fax:
        +44 870 050 9749


     Support Phone Number:
        n/a

     Contact Email Address:
        support@labrat.cx

     Company URL:
        http://www.labrat.cx

     Primary Contact:
        Russ  Spooner



  1.577.  Consultant ID: United Kingdom, Lightwood Consultancy Ltd



       PO Box 1387
       Stoke-on-Trent, NON United States ST3 5YH

       United Kingdom



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming System Administration



     Main Distribution:
        Other



     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +44 870 7402748


     Company Fax:
        +44 8700 523955


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@lightwood.net

     Company URL:
        http://www.lightwood.net

     Primary Contact:
        Chris Newman



  1.578.  Consultant ID: United Kingdom, MPC Data Limited



       The Old Gas Warehouse, Frome Road
       Bradford on Avon, Wiltshi, NON United States BA15 1HA

       United Kingdom



     Consulting Specialties:
        Custom Programming Custom Systems



     Main Distribution:
        RedHat
     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Embedded


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +44 1225 868228


     Company Fax:
        +44 1225 868191


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        jback@mpc-data.co.uk

     Company URL:
        http://www.mpc-data.co.uk

     Primary Contact:
        Julian Back



  1.579.  Consultant ID: United Kingdom, Michiel Dethmers



       Quipu, 91 Brick Lane
       London, NON United States E1 6QL

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security


     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        44 171 3776601


     Company Fax:
        44 171 3776601


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        support@quipu.co.uk

     Company URL:
        http://www.quipu.co.uk

     Primary Contact:
        Michiel Dethmers



  1.580.  Consultant ID: United Kingdom, Oakhaven Consultants Ltd



       Bunces Lane, Burghfield Common
       Reading., NON United States RG7 3DL

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet (Web) Programming Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +441189831707


     Company Fax:
        +448700523200


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://www.thennion.demon.co.uk

     Primary Contact:
        Trevor Hennion BSc.



  1.581.  Consultant ID: United Kingdom, Philip Hands Computing Ltd



       Unit 1, Cherry Close, Caversham
       Reading, NON United States RG4 8UP

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development System Security



     Main Distribution:
        Debian


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not_Applicable


     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +44 118 9545656


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        Not_Applicable

     Company URL:
        http://Not_Applicable

     Primary Contact:
        Philip Hands



  1.582.  Consultant ID: United Kingdom, RedAmazon



       Not_Applicable
       London, NON United States Not_Applicable

       United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxRouter


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        Not_Applicable


     Company Fax:
        Not_Applicable


     Support Phone Number:
        Not Available

     Contact Email Address:
        support@redamazon.com

     Company URL:
        http://www.redamazon.com

     Primary Contact:
        Jim Thoreaux



  1.583.  Consultant ID: United Kingdom, Share Net International Ltd



  Belle Vue, Crowborough
  East Sussex, NON United States TN6 1ST

  United Kingdom



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems E-Commerce
        Firewalls and Internet Security Internet Server Development
        Internet (Web) Programming Netware Connectivity Network
        Administration System Administration System Security Virtual
        Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +044 01892 661 044


     Company Fax:
        +044 01892 665 731


     Support Phone Number:
        +044 01892 661 044

     Contact Email Address:
        support@share-net.co.uk

     Company URL:
        http://www.share-net.co.uk

     Primary Contact:
        Grace Nunn



  1.584.  Consultant ID: United Kingdom, iCode Systems Ltd



       Consort Court, High Street
       Fareham, NON United States PO16 7AL

       United Kingdom



     Consulting Specialties:
        Custom Programming E-Commerce Firewalls and Internet Security
        Internet Server Development Internet (Web) Programming Network
        Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq



     Linux Certifications:
        Not_Applicable


     Company Phone Number:
        +44 1329 829898


     Company Fax:
        +44 1329 829899


     Support Phone Number:
        +44 1329 829898

     Contact Email Address:
        linux@icode.co.uk

     Company URL:
        http://www.icode.co.uk

     Primary Contact:
        Darren Durbin

  1.585.  Consultant ID: United Kingdom, thorNET



       34 St Mary Street, Thornbury
       Bristol, NON United States BS35 2AT

       United Kingdom



     Consulting Specialties:
        Custom Programming Custom Systems E-Commerce Internet Server
        Development Internet (Web) Programming Network Administration
        System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +44 1454854413


     Company Fax:
        +44 1454854412


     Support Phone Number:
        +44 1454 854413

     Contact Email Address:
        info@thornet.co.uk

     Company URL:
        http://www.thornet.co.uk

     Primary Contact:
        Steve Heaven
  1.586.  Consultant ID: Venezuela, Ernesto Hernndez-Novich



       Av. Ppal. La Bonita Res. La Montaa Apto. 7-F
       Caracas, NON United States 1080

       Venezuela



     Consulting Specialties:
        CIFS (Samba) Custom Programming Custom Systems Firewalls and
        Internet Security Internet Server Development Internet (Web)
        Programming Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        Other


     Other Distribution:
        All of them


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        None


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        58-2-9414198


     Company Fax:
        Not_Applicable


     Support Phone Number:
        58-14-9254779

     Contact Email Address:
        emhn@telcel.net.ve

     Company URL:
        http://www.telcel.net.ve


     Primary Contact:
        Ernesto Hernndez-Novich



  1.587.  Consultant ID: Venezuela, Grupo INABOX,C.A.



       Torre Capriles, Planta Baja, Local 13
       Caracas, NON United States Not_Applicable

       Venezuela



     Consulting Specialties:
        System Administration



     Main Distribution:
        Caldera


     Other Distribution:
        NA


     Specialty Distribution:
        LinuxPPC


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Caldera



     Company Phone Number:
        005827934692


     Company Fax:
        005827934692


     Support Phone Number:
        005827934692

     Contact Email Address:
        inaboxca@yahoo.com


     Company URL:
        http://www.yahoo.com

     Primary Contact:
        Gilberto  Hernandez Meza



  1.588.  Consultant ID: Venezuela, Linux Sistemas, C.A.



       Paseo Los Ilustres, Ed. Don Paco, Local 1, Los Cha
       Caracas, NON United States 1041

       Venezuela



     Consulting Specialties:
        CIFS (Samba) Firewalls and Internet Security Internet Server
        Development Netware Connectivity Network Administration System
        Administration System Security



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Compaq IBM



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +58 2 6934233


     Company Fax:
        +58 2 6623580


     Support Phone Number:
        +58 2 6934233
     Contact Email Address:
        linuxsistemas@mercared.com

     Company URL:
        http://http://www.mercared.com/linuxsistemas

     Primary Contact:
        Jose Rey



  1.589.  Consultant ID: Vietnam, Nam Ltd



       14 Chuong Duong
       Hanoi, NON United States HAN

       Vietnam



     Consulting Specialties:
        CIFS (Samba) E-Commerce Internet Server Development Internet
        (Web) Programming Network Administration System Administration



     Main Distribution:
        RedHat


     Other Distribution:
        NA


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        NA


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        84-4-8242294


     Company Fax:
        84-4-8242294


     Support Phone Number:
        NA

     Contact Email Address:
        xuanbn@vol.vnn.vn

     Company URL:
        http://NA

     Primary Contact:
        Bui nam Xuan



  1.590.  Consultant ID: Yugoslavia, Berislav Todorovic



       Elektrotehnicki fakultet, Bulevar Revolucije 73
       Belgrade SERBIA, NON United States 11000

       Yugoslavia



     Consulting Specialties:
        CIFS (Samba) Custom Systems Firewalls and Internet Security
        Internet Server Development Network Administration System
        Administration System Security Virtual Private Networking



     Main Distribution:
        RedHat


     Other Distribution:
        Not_Applicable


     Specialty Distribution:
        Other


     Other Specialty Distribution:
        Slackware


     Reseller Authorizations:
        Not Applicable



     Linux Certifications:
        Not Applicable



     Company Phone Number:
        +381-11-3221-419


     Company Fax:
        +381-11-3248-681


     Support Phone Number:
        Not_Applicable

     Contact Email Address:
        beri@etf.bg.ac.yu

     Company URL:
        http://ubbg.etf.bg.ac.yu/~beri/

     Primary Contact:
        Berislav Todorovic



  Cyrus IMAP HOWTO
  Aurora Skarra-Gallagher (Community Vision)
  v1.1, 10 July 2000

  A comprehensive guide to installing, configuring, and running Cyrus
  Imap and Cyrus Sasl
  ______________________________________________________________________

  Table of Contents


  1. About this HOWTO

     1.1 Copyrights and Trademarks
     1.2 Feedback
     1.3 CHANGES
     1.4 Document Conventions

  2. Introduction to IMAP

     2.1 What is IMAP?
     2.2 IMAP vs. POP
     2.3 Cyrus IMAP vs. Washington IMAP

  3. Obtaining the Files

     3.1 Cyrus Imap Homepage
     3.2 Downloading the files

  4. Cyrus SASL

     4.1 Uncompress
     4.2 Building the files

  5. Cyrus IMAP Installation

     5.1 Uncompress
     5.2 A note on com_err.h
     5.3 Configure
     5.4 Adding the default user
     5.5 Building the files

  6. Cyrus IMAP Configuration

     6.1 Editing conf files
     6.2 Creating the necessary directories
     6.3 More configuration file editing

  7. Cyrus IMAP Implementation

     7.1 Add the cyrus administrator
     7.2 Testing Cyrus IMAP
     7.3 Setting up users
     7.4 Finishing up

  8. Troubleshooting



  ______________________________________________________________________

  1.  About this HOWTO



  1.1.  Copyrights and Trademarks

  (c) 2000 Aurora Skarra-Gallagher

  This section was copied from the HOWTO-HOWTO:

  This manual may be reproduced in whole or in part, without fee,
  subject to the following restrictions:


    The copyright notice above and this permission notice must be
     preserved complete on all complete or partial copies

    Any translation or derived work must be approved by the author in
     writing before distribution.

    If you distribute this work in part, instructions for obtaining the
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

    Small portions may be reproduced as illustrations for reviews or
     quotes in other works without this permission notice if proper
     citation is given. Exceptions to these rules may be granted for
     academic purposes: Write to the author and ask. These restrictions
     are here to protect us as authors, not to restrict you as learners
     and educators. Any source code (aside from the SGML this document
     was written in) in this document is placed under the GNU General
     Public License, available via anonymous FTP from the GNU archive.

  1.2.  Feedback

  Comments (especially corrections) can be sent to
  asg@CommunityVision.com <mailto:asg@CommunityVision.com>

  1.3.  CHANGES


    v1.1: Fixed sendmail.mc configuration file error and added IMAP
     information to the introduction.

  1.4.  Document Conventions


    Italics signifies a  directory

    This font signifies instructions to be ran at the command line

  2.  Introduction to IMAP

  2.1.  What is IMAP?

  This definition is from the ComputerUser.com High-Tech Dictionary
  <http://www.computeruser.com/resources/dictionary/dictionary.html>:

  Internet Message Access Protocol. A protocol that allows a user to
  perform certain electronic mail functions on a remote server rather
  than on a local computer. Through IMAP the user can create, delete, or
  rename mailboxes; get new messages; delete messages; and perform
  search functions on mail. A separate protocol is required for sending
  mail. Also called Internet Mail Access Protocol.

  2.2.  IMAP vs. POP

  IMAP allows the user to read email from many different locations and
  accounts because email folders are stored on the server, locally, at
  the home or the office, for instance. Even saved and read messages are
  stored on the IMAP server. POP only stores new unread messages on the
  server, and the read and saved messages are stored locally. To force
  POP to not delete email once it has been read can create many copies
  of the same email, creating a waste of space and confusion. However,
  IMAP is usually more complicated to set up. If you only have one email
  account, POP is most likely your best choice. If you want to access
  more than one account, from different locations, IMAP will probably
  serve you most efficiently.

  2.3.  Cyrus IMAP vs. Washington IMAP

  Cyrus has its own mailbox database which is standalone and increases
  performance, whereas Washington uses the stanard UNIX mailbox format,
  which was designed for a smaller set of users. Washington is portable
  to more UNIX and non-UNIX systems than Cyrus. The main difference is
  that with Cyrus, you don't have to add new users to your linux box
  (i.e. in /etc/passwd) to add new mail users, and with Washington, you
  do.

  3.  Obtaining the Files

  3.1.  Cyrus Imap Homepage

  The homepage is currently located at:

  http://asg.web.cmu.edu/cyrus/imapd
  <http://asg.web.cmu.edu/cyrus/imapd>

  3.2.  Downloading the files

  You will need both IMAP and SASL. Download the latest files here:

  ftp://ftp.andrew.cmu.edu/pub/cyrus-mail
  <ftp://ftp.andrew.cmu.edu/pub/cyrus-mail>


  Download cyrus-imapd-X.X.X.tar.gz and cyrus-sasl-X.X.X.tar.gz (where
  X.X.X is the latest release) into your temporary directory.

  I will use /temp as the directory I've uncompressed the files under
  for the rest of the examples.

  4.  Cyrus SASL

  4.1.  Uncompress

  Here we untar and gunzip the file in a single step.


  1.  cd /temp

  2.  tar -zxvf cyrus-sasl-X.X.X.tar.gz

  3.  cd cyrus-sasl-X.X.X

  4.2.  Building the files

  For most purposes, the following set of instructions works fine. If
  you would like to examine the other configuration options, type
  ./configure --help | more


  1.  ./configure

  2.  make

  3.  make install

  If you don't want your password check to be the default sasldb, you
  must specify which one of PAM, kerberos_v4, passwd, shadow you wish to
  use. If PAM is the authentication you desire for example, you would
  type:

  ./configure --pwcheck_method=PAM

  instead of the ./configure line above

  5.  Cyrus IMAP Installation

  5.1.  Uncompress

  The following commands will tar and gunzip cyrus IMAP under /temp.


  1. cd /temp

  2. tar -zxvf tar/cyrus-imapd-1.6.24.tar.gz

  3. cd cyrus-imapd-1.6.24

  5.2.  A note on com_err.h

  When I tried to install cyrus IMAP, I got errors regarding the file
  com_err.h. My com_err.h was located in /usr/include/et. It needs to
  reside in /usr/include.  Run the following command to make sure it is
  in the correct location:

  locate com_err.h

  This will show you where the file is. If it is under /usr/include, you
  can skip to the next section. If it is in another directory, just copy
  it to /usr/include. If it doesn't exist, download it here:
  http://www.ludd.luth.se/~jnilsson/cvsweb/cvsweb.cgi/src/contrib/com_err
  <http://www.ludd.luth.se/~jnilsson/cvsweb/cvsweb.cgi/src/contrib/com_err>.

  5.3.  Configure

   ./configure --with-auth=unix

  5.4.  Adding the default user

  Cyrus requires a user to own its files. The default user is cyrus. The
  following command adds a user cyrus with the group of "mail"

  useradd -g mail cyrus

  You'll want to set the password for user cyrus.

  passwd cyrus

  Type in the password you desire cyrus to have each time you are
  prompted

  5.5.  Building the files


  1.  make depend

  2.  make all CFLAGS=-O

  3.  make install

  That's it! You've installed SASL and are ready to install IMAP.

  6.  Cyrus IMAP Configuration

  6.1.  Editing conf files


  1. Edit /etc/syslog.conf and add the following lines at the bottom:

             local6.debug    /var/adm/imapd.log
             auth.debug      /var/adm/auth.log



  2. Edit a new file /etc/imapd.conf and place in it the following
     lines:

             configdirectory: /var/imap
             partition-default: /var/spool/imap
             admins: cyrus root
             srvtab: /var/imap/srvtab
             allowanonymouslogin: no
             sasl_passwd_check: shadow



  6.2.  Creating the necessary directories

  This list of instructions will set up all the directories necessary
  for imap.


  1. mkdir /var/adm

  2. touch /var/adm/imapd.log /var/adm/auth.log

  3. mkdir /var/imap /var/spool/imap /var/imap/srvtab

  4. chown cyrus /var/imap /var/spool/imap /var/imap/srvtab

  5. chgrp mail /var/imap /var/spool/imap /var/imap/srvtab

  6. chmod 750 /var/imap /var/spool/imap /var/imap/srvtab

  7. su cyrus

  You are now the user cyrus. This is necessary for the files to have
  the correct owner and group.  Continue:


  1. tools/mkimap

  2. cd /var/imap

  3. chattr +S . user quota user/* quota/*

  4. chattr +S /var/spool/imap

  5. exit

  You are now root again. The last command:

  chattr +S /var/spool/mqueue



  6.3.  More configuration file editing


  1. Edit /etc/services and check for the following lines. If they do
     not exist, add them:

             pop3    110/tcp
             imap    143/tcp
             imsp    406/tcp
             kpop    1109/tcp
             sieve   2000/tcp



  2. Edit /etc/inetd.conf and comment out any imap and pop3 lines and
     add the following:

             imap    stream  tcp     nowait  cyrus   /usr/cyrus/bin/imapd    imapd
             pop3    stream  tcp     nowait  cyrus   /usr/cyrus/bin/imapd    pop3d



  3. Edit /etc/sendmail.mc with care not to add extra spaces and add the
     following lines(do not copy and paste directly from this text as
     the tabs won't be added correctly):

       MAILER(local)
       MAILER(cyrus)
       define(`confLOCAL_MAILER',`cyrus')
       LOCAL_RULE_0
       R$=N                   $: $#local $: $1
       R$=N < @ $=w . >       $: $#local $: $1
       Rbb + $+ < @ $=w . >   $#cyrusbb $: $1


  Use tabs to separate the data (i.e. R$=N has three tabs between it and
  $: $#local $: $1) Then run: m4 sendmail.mc > sendmail.cf

  4. Edit /etc/group and add the user daemon to the mail group.

  7.  Cyrus IMAP Implementation

  7.1.  Add the cyrus administrator

  Run the following command to set up a user for cyrus

  /usr/local/sbin/saslpasswd cyrus

  7.2.  Testing Cyrus IMAP


  1. killall -HUP inetd

  2. su cyrus

  3. imtest -m login -p imap localhost

  Enter your password. If you see something like:


          (L01 OK User logged in means you're in)



  Then the setup has been successful. Type

          . logout



  to log out.

  7.3.  Setting up users

  Still as the user cyrus, type the following commands. They will set up
  the mailbox(es) for each user. Fill in the username where you see the
  (username).


  1. cyradm localhost

  2. cm user.(username)  (for all usernames)

  3. quit

  4. exit (back as root)

  Now as root, enter a password for each username

  saslpasswd (username)

  7.4.  Finishing up

  Reboot the machine to make sure that everything has been restarted
  under the new configuration

  8.  Troubleshooting

  If you encounter any errors, you can do the following to view error
  messages:


  1. tail /var/log/messages

  2. tail /var/adm/imapd.log

  3. killall sendmail && sendmail -bd -X /root/error.log (then read
     /root/error.log)




DB2 Version 7.1 for Linux HOWTO

Dan Scott

   Revision History
   Revision 0.7 May 26, 2000 Revised by: dbs
   Based on DB2 V7.1 beta release, wrote install instructions for Caldera
   2.4, Red Hat 6.2, SuSE 6.2, SuSE 6.3, and TurboLinux 6.0.
   Revision 1.0 July 6, 2000 Revised by: dbs
   Added basic Debian instructions. Corrected some factual, stylistic,
   and grammatical mistakes. Licensed document under GNU GPL. Submitted
   document to LDP.
   
   This HOWTO gives you explicit instructions on installing DB2 Universal
   Database Version 7.1 for Linux on the following Intel x86-based
   distributions: Caldera OpenLinux 2.4, Debian, Red Hat Linux 6.2, SuSE
   Linux 6.2 and 6.3, and TurboLinux 6.0. After installing DB2, you can
   work with a sample database, connect to your DB2 server from a remote
   machine, and administer DB2 using the DB2 Control Center.
     _________________________________________________________________
   
   Table of Contents
   1. [1]Introduction
          
        1.1. [2]Why a DB2 installation HOWTO?
        1.2. [3]Who should read this HOWTO?
        1.3. [4]New versions of this document
        1.4. [5]Copyright and License
        1.5. [6]Credits
        1.6. [7]About the author
                
   2. [8]Prerequisites
          
        2.1. [9]What are prerequisites?
                
   3. [10]Preparing your distribution for DB2
          
        3.1. [11]Caldera OpenLinux 2.4
        3.2. [12]Red Hat Linux 6.2
        3.3. [13]SuSE Linux 6.2 or 6.3
        3.4. [14]TurboLinux 6.0
                
   4. [15]Installing DB2 using db2setup
          
        4.1. [16]Using the db2setup utility
        4.2. [17]Installing DB2 components
                
   5. [18]Installing DB2 on other Linux distributions
   6. [19]Creating DB2 instances
          
        6.1. [20]Overview of DB2 Administration Server
        6.2. [21]Overview of DB2 instance
                
   7. [22]Removing DB2
   8. [23]Using DB2
          
        8.1. [24]DB2 Control Center
        8.2. [25]DB2 Information Center
        8.3. [26]The DB2 command line
                
   9. [27]Troubleshooting
          
        9.1. [28]Problems with DB2 installation
        9.2. [29]Problems creating a DB2 instance
        9.3. [30]Problems using DB2
                
   10. [31]Installing the IBM Developer Kit for Java
   Appendix A. [32]Resources
   Appendix B. [33]GNU General Public License
          
        Appendix B.1. [34]Preamble
                
1. Introduction

1.1. Why a DB2 installation HOWTO?

   Ever since DB2 Version 5.2 was ported to Linux in 1998 and made
   available as a beta download, there has been a lot of interest in DB2
   on Linux. The beta represented one of IBM's first dips into the waters
   of Linux, and it generated a lot of feedback. In fact, if you read
   through the newsgroups, you still see occasional questions from people
   who are trying out the Version 5.2 beta. (I don't know where they're
   getting it, but they're out there.) And, not surprisingly, they run
   into problems. It was a beta product, after all.
   
   Anyway, I've been trying out DB2 on Linux since Version 5.2, so I've
   had a chance to witness the improvements over the past couple of
   years. I've also made a lot of use of the Linux Documentation Project
   in that time, and wanted to contribute something to the LDP. So I
   decided to write about the one thing that I really know something
   about on Linux, and hope that it helps someone else out there.
   
   DB2 on Linux has come a long way since Version 5.2. The first
   supported release of DB2 on Linux was Version 6.1 in 1999, which
   removed many of the installation hurdles faced by the Version 5.2 beta
   testers.
   
   DB2 Version 7.1 is the second major release that supports Linux, and
   since it's a new release I'm expecting that a new wave of people
   curious about DB2, as well as people migrating from Version 6.1, are
   going to try installing this new release on Linux. To that end, I'm
   writing this HOWTO to share my experiences and help smooth your
   installation. One of the big boosts comes from the standardization on
   the IBM Developer Kit for Java, which improves the stability of the
   DB2 Control Center and enables application developers to write stored
   procedures and UDFs in Java. DB2 Version 7.1 also introduces the
   ability to write stored procedures in SQL.
   
   As time permits, I hope to provide hints and tips for improving the
   performance of DB2 on Linux, and for configuring the environment on
   various Linux distributions to be able to build DB2 applications in C,
   C++, and Java.
     _________________________________________________________________
   
1.2. Who should read this HOWTO?

   If you plan to install DB2 Version 7.1 on one of the Linux
   distributions supported by IBM, this document is for you. The
   distributions that IBM supports are:
   
     * Caldera OpenLinux 2.4
     * Red Hat Linux 6.2
     * SuSE Linux 6.2 and 6.3
     * TurboLinux 6.0
       
   For Debian, I have included very basic installation instructions in
   [35]Section 5. If you have any other installation success stories,
   please forward me the details and I'll try to expand the section. As
   time permits, I plan to try to duplicate and confirm these
   installation instructions.
   
   If you plan to install DB2 Version 6.1 on Linux, I'll try to track
   down some references for you, but I don't include any DB2 Version 6.1
   information here. If you plan to install DB2 Version 5.2 on Linux,
   don't! (Have I emphasized that point enough? All right, I'll stop
   now.) The Personal Developer's Edition of DB2 Version 7.1 is available
   as a free (beer) download from IBM, at the [36]DB2 Universal Database
   download site. Registration is required, and, of course, your copy of
   DB2 is only free as long as you don't use it in a production
   environment.
   
   This document is really meant to help you install DB2 Version 7.1 on
   the previously listed Linux distributions. I've installed DB2 on all
   of the distributions supported by IBM and noted the prerequisites and
   quirks for each of them. I don't go into detail about the various
   features of DB2, or what each installation option means, but I do
   cover the basics that you need to know to get it installed.
     _________________________________________________________________
   
1.3. New versions of this document

   I like my friends at the Linux Documentation Project, so you'll always
   be able to find the most up-to-date version of this document at the
   [37]LDP web site.
     _________________________________________________________________
   
1.4. Copyright and License

   Copyright (c) 2000 International Business Machines Incorporated.
   
   This document is free documentation; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version. This document is
   distributed in the hope that it will be useful, but WITHOUT ANY
   WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
   for more details. You should have received a copy of the GNU General
   Public License along with this document; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
     _________________________________________________________________
   
1.5. Credits

   Dan Scott is the originator and current maintainer of this HOWTO.
   Please send all suggestions for improvement, criticisms, or
   more-or-less related questions to me at <[38]daniels@REMca.ibm.com>
   (remove REM in my email address before sending). Please send all spam
   or hate mail to /dev/null.
   
   Feedback and suggestions for improvement have been provided by Susan
   Williams, Serge Boivin, Darin McBride, and Xiaoyan Zhao. Ronnie
   Seagren did an awesome job of editing the original version for style
   and consistency.
     _________________________________________________________________
   
1.6. About the author

   Dan Scott has been employed by IBM Canada as an Information Developer
   since 1998--approximately when DB2 was first ported to Linux. It's
   probably just coincidence. He has documented and tested DB2
   application development for the bulk of that time. In his spare time
   he can occasionally be found mourning for his dearly departed
   motorcycle, abusing his body on his mountain bike, or contemplating
   how to upgrade his Linux distribution at home (which started life as
   Mandrake 5.3 and has mutated wildly ever since) without suffering the
   wrath of his girlfriend.
     _________________________________________________________________
   
2. Prerequisites

2.1. What are prerequisites?

   Prerequisites are what you, your machine, and your distribution
   require before you will be able to successfully install or use DB2.
   The required prerequisites come straight from [39]IBM DB2 Universal
   Database for UNIX Quick Beginnings. The suggested prerequisites come
   from experience. For your convenience, I've divided them into hardware
   and software requirements.
   
   Hardware prerequisites
   
   Processor
          x86 compatible (for example, Intel, AMD, or Cyrix). I've
          successfully installed DB2 Version 7.1 on a Pentium Pro 200 and
          a Pentium II 350. Your experiences with other x86 processors
          would be appreciated.
          
   Memory
          For application development, I've found 96 MB of RAM is enough
          to run a small database and test out your applications. Even
          the Control Center responds acceptably if your processor speed
          is fast enough. In my case, I was working with a Thinkpad 600
          equipped with a Pentium 233 MMX processor and 96 MB of RAM.
          However, more memory is recommended if you're putting your
          database into production or running multiple services.
          
   Free disk space
          Of course, this depends on the components you install, but for
          a typical installation of the DB2 Version 7.1 server, the
          Administration Client, the Application Development Client, the
          documentation, and the creation of a sample database, you will
          need about 350 MB of free disk space.
          
   Software prerequisites
   
   glibc
          2.1.2 or greater. This can be a tough part of Linux to upgrade
          on its own, so if your current distribution doesn't meet this
          requirement, I would strongly suggest upgrading your entire
          distribution. For example, I tried upgrading only the glibc
          portion of TurboLinux 4.0 from 2.1.1 to 2.1.3 and ran into a
          whole world of trouble.
          
          DB2 Version 7.1 should work with glibc 2.1.1. IBM sets
          prerequisites based on the systems with which they tested.
          
   kernel
          2.2.12 or greater. I've upgraded to 2.2.15 and recompiled the
          kernel for my own purposes, and DB2 seems to work as well as
          before.
          
          DB2 Version 7.1 should work with a minimum of kernel 2.2.10.
          IBM sets prerequisites based on the systems with which they
          tested.
          
   libstdc++
          2.9.0. This exact version is mandatory.
          
   pdksh
          5.2 or greater. This is a public domain version of the Korn
          shell that both the DB2 installer and the DB2 commands require.
          You cannot do anything with DB2 without installing pdksh.
          
   rpm
          3.0 or greater. DB2 for Linux is distributed as a number of RPM
          packages, so you won't get far without this piece of software.
          For information on installing DB2 on distributions without
          using RPM, see [40]Section 5.
          
   Java
          The IBM Developer Kit for Java 1.1.8 is an optional component,
          but is required to:
          
          + use the DB2 Control Center to administer your databases using
            a graphical user interface
          + create or run Java applications, including stored procedures
            and user-defined functions
            
          As of this writing, the minimum required level of the IBM
          Developer Kit for Java is the March 22, 2000 release. You can
          get the IBM Developer Kit and Runtime Environment for Linux,
          Java Technology Edition, Version 1.1.8, at the [41]IBM Java
          Developer Kit downloads web site.
          
          Please note: Other versions of Java, such as the Blackdown or
          Sun JDKs, have not been tested with DB2 and are not supported
          by IBM. And no, none of the distributions I have seen so far
          package the IBM JDK. But do yourself a favour, and get the IBM
          Developer Kit for Java.
          
   Web browser
          DB2 calls the netscape command when you:
          
          + display the online help for the DB2 Control Center
          + display information using the DB2 Information Center
            
          The easiest approach is to install Netscape Navigator or
          Communicator on your system. Netscape version 4.72 or above is
          required to display the Business Intelligence Quick Tour,
          because of its extreme use of JavaScript.
          
          To use a browser other than Netscape to display online help or
          information, create a link called netscape to your preferred
          browser executable. The link must appear in your PATH. For
          example, to display online help with mozilla, you could create
          a link in /usr/local/bin with the following command:
          
bash# ln -s /usr/bin/mozilla-bin /usr/local/bin/netscape

   Table 1. Prequisite levels, by distribution
   Package Caldera OpenLinux 2.4 Red Hat 6.2 SuSE 6.2 SuSE 6.3 TurboLinux
   6.0
   glibc 2.1.2 2.1.2 2.1.1 2.1.2 2.1.2
   Linux kernel 2.2.14 2.2.14 2.2.10 2.2.13 2.2.13
   libstdc++ 2.9.0 2.9.0 2.9.0 2.9.0 2.9.0
   pdksh 5.2.14 5.2.14 5.2.14 5.2.14 5.2.14
     _________________________________________________________________
   
3. Preparing your distribution for DB2

3.1. Caldera OpenLinux 2.4

3.1.1. Before installing DB2 on Caldera OpenLinux

   This section contains instructions that you must follow before
   installing DB2.
   
   Preparing for the installation of DB2
    1. Install the pdksh-5.2.14-1.i386.rpm package from the Caldera
       OpenLinux CD-ROM in the /Packages/RPMS/ directory. For example,
       log in as root, mount the CD-ROM, and enter the following command
       to install the pdksh package:
       
bash# rpm -ivh /mnt/cdrom/Packages/RPMS/pdksh-5.2.14-1.i386.rpm

    2. Remove the jdk package, (JDK 1.2.2 from Sun), since it will
       conflict with the IBM Developer Kit for Java that you will install
       in the next step. To remove Sun's JDK, issue the following command
       as root:
       
bash# rpm -e jdk

    3. Install the IBM Developer Kit for Java. A brief set of
       installation directions is included in [42]Section 10.
    4. Edit the JAVA_HOME and PATH entries in /etc/config.d/shells/bashrc
       to remove the references to the JDK from Sun and update them to
       reflect the IBM Developer Kit for Java. The section that I changed
       started as:
       
    [ -z "$JAVA_HOME" ]&& [ -d /usr/java ] && (
            export JAVA_HOME=/usr/java
            [ -r $JAVA_HOME/lib/classes.zip ] &&
              export CLASSPATH=$JAVA_HOME/lib/classes.zip
)

       Replace it with the following section to reflect the default
       locations for the IBM Developer Kit for Java:
       
    [ -z "$JAVA_HOME" ]&& [ -d /usr/jdk118 ] && (
            export JAVA_HOME=/usr/jdk118
            export PATH=$PATH:$JAVA_HOME/bin
            [ -r $JAVA_HOME/lib/classes.zip ] &&
              export CLASSPATH=$JAVA_HOME/lib/classes.zip
)
     _________________________________________________________________
   
3.1.2. Installing DB2 and creating instances on Caldera

   Follow the instructions in [43]Section 4 the generic section on
   installing DB2, and go ahead and create the instances. It's probably a
   good idea at this point to read through [44]Section 3.1.3 to keep in
   mind the steps that you need to take after installing DB2.
   
   3.1.2.1. [45]What does /etc/login.defs not accessible, using defaults
          mean?
          
   3.1.2.2. [46]Okay, DB2 is installed and I created the instances. Now
          what do I do?
          
   3.1.2.1. What does /etc/login.defs not accessible, using defaults
   mean?
   
   It means something went slightly wrong, but it's okay. You may get
   this message splashed across your installation screen one or more
   times during the DB2 installation process, but other than not looking
   pretty, DB2 still installs correctly. Caldera apparently doesn't
   include a /etc/login.defs configuration file. The file controls the
   default options for the useradd command for adding new users,
   including policies like how many days before the new user's password
   expires and whether a home directory should be created for a new user.
   For more information on the /etc/login.defs file, refer to the man
   page for useradd.
   
   3.1.2.2. Okay, DB2 is installed and I created the instances. Now what
   do I do?
   
   Now that you've installed DB2, you have to perform some steps to
   configure your instances correctly. Keep reading.
     _________________________________________________________________
   
3.1.3. After installing DB2 on Caldera

   This section contains instructions that you must follow after
   installing DB2.
     _________________________________________________________________
   
3.1.3.1. Adding instance user IDs to their groups

   The most important step is to manually add the instance user ID to the
   corresponding instance group you defined during the instance creation
   step. DB2 and Caldera OpenLinux don't get this part of the DB2
   instance creation process right, so you have to do it yourself. You
   can add an instance user ID to an instance group in two ways:
   
     * Edit /etc/group to add the appropriate instance user ID to the
       last field for each group.
     * Use the COAS utility to manage your groups by selecting KDE menu,
       Settings, COAS, System, Accounts, then selecting the Groups
       submenu and the Manage Groups menu item.
     _________________________________________________________________
   
3.1.3.2. Changing the default home page in Netscape

   The DB2 Control Center and the DB2 Information Center use the Netscape
   browser to display help and documentation. This works for the first
   document you display in the browser, but if you try to switch to a
   different DB2 document (for example, from one book to another), you
   may instead be redirected to the default home page set by the Caldera
   OpenLinux installation process. I found that this problem went away as
   soon as I changed the default home page in the Edit menu, Preferences
   menu item.
     _________________________________________________________________
   
3.1.3.3. Removing the Caldera login greeting

   Add a file called .hushlogin to the home directory of each of your
   instance user IDs. This should prevent the Welcome to your OpenLinux
   system! messages while running DB2 commands.
   
   DB2 generates these messages on Caldera because the DB2 commands run
   under the root user ID, which in turn becomes the instance owner to
   invoke commands. Part of this su process calls one or both of
   /etc/config.d/shells/csh.login and /etc/config.d/shells/profile, which
   in turn call the /etc/config.d/shells/OL-greeting script that contains
   the offensive string.
   
   Instead of adding .hushlogin to every user's home directory, you could
   probably edit /etc/config.d/shells/OL-greeting to remove the message
   (or change it to something else, if you want). I haven't tried it
   myself, so let me know what works best.
     _________________________________________________________________
   
3.2. Red Hat Linux 6.2

3.2.1. Before installing DB2 on Red Hat

   Preparing for the installation of DB2
    1. Install the pdksh-5.2.14-2.i386.rpm package from the Red Hat
       CD-ROM in the /RedHat/RPMS/ directory. For example, log in as
       root, mount the CD-ROM, and enter the following command to install
       the pdksh package:
       
bash# rpm -ivh /mnt/cdrom/RedHat/RPMS/pdksh-5.2.14-2.i386.rpm
     _________________________________________________________________
   
3.2.2. Installing DB2 and creating instances on Red Hat

   Follow the instructions in [47]Section 4, the generic section on
   installing DB2 and creating instances.
     _________________________________________________________________
   
3.2.3. After installing DB2 on Red Hat

   With Red Hat 6.2, you don't need to take any special steps after
   installing DB2 Version 7.1. It works.
     _________________________________________________________________
   
3.3. SuSE Linux 6.2 or 6.3

3.3.1. Before installing DB2 on SuSE

   SuSE 6.3 includes all of the required packages at or above the minimum
   required levels for DB2 Version 7.1. If you have a choice between
   installing SuSE 6.3 or 6.2, I would strongly recommend installing 6.3.
   
   SuSE 6.2, ships with a glibc level of 2.1.1 and a kernel level of
   2.2.10; however, in my tests this did not cause any problems with
   installation, running the DB2 Control Center, or creating and running
   Java and C applications for DB2.
     _________________________________________________________________
   
3.3.2. Installing DB2 and creating instances on SuSE

   Follow the instructions in [48]Section 4, the generic section on
   installing DB2. When you create the instances, keep in mind the
   following information about creating instances on SuSE.
     _________________________________________________________________
   
3.3.2.1. Creating instances on SuSE

   The default installation packages in the SuSE distribution include an
   old beta version of DB2. This means that the default DB2 user IDs and
   groups used by the Create Instance menu are already created when you
   try to create an instance for DB2 Version 7.1, causing the following
   problems:
   
     * Default user name already exists
       Because the default user name already exists, the DB2 Create
       Instance panel places the corresponding user ID in the "User ID"
       field. This can cause a problem when you change the value of the
       User Name field to reflect the name of the new instance, because
       the value of the "User ID" still reflects the original user name.
       Ensure that you select the "Use default UID" check box to
       automatically associate the new user name with its corresponding
       user ID.
     * Default group name already exists
       Because the default group name already exists, the DB2 Create
       Instance panel places the corresponding group ID in the Group ID
       field. This can cause a problem when you change the value of the
       Group Name field to reflect the name of the new instance, because
       the value of the Group ID still reflects the original group name.
       Ensure that you select the "Use default GID" check box to
       automatically associate the new group name with its corresponding
       group ID.
     * Default home directory points to /usr/lib/db2/
       Because the default user name already exists and was created in
       the /usr/lib/db2/ directory, you have to manually specify the
       location of the new instance. The default home directory is
       /home/.
     _________________________________________________________________
   
3.3.3. After installing DB2 on SuSE

   With SuSE 6.2 or above, I have not needed to take any special steps
   after installing DB2 Version 7.1. It just works--and that's nice.
     _________________________________________________________________
   
3.4. TurboLinux 6.0

3.4.1. Before installing DB2 on TurboLinux

   TurboLinux 6.0 includes all of the required packages at or above the
   minimum required levels for DB2 Version 7.1.
     _________________________________________________________________
   
3.4.2. Installing DB2 on TurboLinux

   Follow the instructions in [49]Section 4, the generic section on
   installing DB2.
     _________________________________________________________________
   
3.4.3. After installing DB2 on TurboLinux

   When you run the DB2 Control Center with TurboLinux 6.0, the console
   window may display a number of map failed messages. These messages do
   not indicate a serious problem, so do not worry about them.
     _________________________________________________________________
   
4. Installing DB2 using db2setup

   The purpose of this section is to walk you through a typical install
   of DB2 Version 7.1 on Linux. The following section, [50]Section 6,
   tells you how to create both a DB2 Administration Server and a DB2
   instance. For in-depth information on the components offered by DB2
   Version 7.1, consult the following documents:
   
     * [51]DB2 for UNIX Quick Beginnings
     * [52]DB2 Personal Edition for Linux Quick Beginnings
     * [53]DB2 Connect Personal Edition for Linux Quick Beginnings
       
   For the purposes of this document, I'll assume that you have a copy of
   DB2 Version 7.1 on CD-ROM. If you download a copy from IBM, just
   adjust the path /mnt/cdrom in the following instructions to reflect
   the directory created by the tar command.
     _________________________________________________________________
   
4.1. Using the db2setup utility

   You'll find the following executables on the root directory of the DB2
   Version 7.1 installation CD-ROM:
   
     * db2setup: Use the db2setup command to install DB2 Version 7.1, to
       create or modify DB2 instances, and to create a DB2 Administration
       Server. Once you install DB2, db2setup is copied to the
       /usr/IBMdb2/V7.1/install directory to enable you to create or
       modify instances without the CD-ROM.
     * db2_install: The db2_install command provides an alternate means
       of installing DB2 RPMs. Unlike db2setup, it does not enable you to
       create a DB2 instance or Administration Server, or install a
       license key. I highly recommend db2setup.
     * db2_deinstall: Use the db2_deinstall command to uninstall the DB2
       Version 7.1 packages on your system. For more information, see
       [54]Section 7.
       
     Note: The db2setup command provides a terminal-based text menu for
     your installation and instance creation options. Unfortunately,
     db2setup on Linux sometimes encounters a few formatting bugs in
     terminal emulators. Running db2setup from the TTY console works
     well. Within an X session, the rxvt or xterm terminals work quite
     well, but gnome-terminal is rather frustrating to use. If the text
     menu formats incorrectly, press CTRL-L to refresh the menu.
     _________________________________________________________________
   
4.2. Installing DB2 components

   The following instructions assume that you are using db2setup to
   install DB2.
   
   To select or deselect a component, highlight the component using the
   cursor keys and press ENTER.
   
   To change the options for a component, highlight [ Customize... ] and
   press ENTER.
   
   To install your selected components, highlight [ OK ] on the Install
   DB2 V7 menu and press ENTER.
   
   The common DB2 files are installed in the /usr/IBMdb2/V7.1/ directory.
   When you create an instance, a directory called sqllib is created in
   the corresponding user's home directory. The sqllib directory contains
   symbolic links to the executables and other files in
   /usr/IBMdb2/V7.1/.
   
   The following list describes some of the common DB2 components that
   you can install, including estimates of the size required for each
   component.
   
   Description of DB2 components
   
   Administration Client
          The Administration Client enables database administrators to
          administer local or remote DB2 servers from the command line.
          This component, without Java support or the Control Center,
          requires about 20 MB of disk space.
          
   Control Center
          The Control Center (db2cc) is an optional part of many DB2
          components. It gives database administrators a graphical
          interface for administering local or remote DB2 servers. The
          Control Center includes the DB2 Information Center (db2ic),
          which gives you a graphical interface that provides a tree view
          of the DB2 documentation installed on your workstation
          organized by task or by title.
          
          Note that both the Control Center and Information Center are
          Java applications, so their performance depends on your
          system's processor speed and available memory. This component
          requires about 90 MB of disk space.
          
   DB2 UDB Enterprise Edition, DB2 UDB Workgroup Edition, DB2 Personal
          Edition
          These components determine the state of your DB2 installation
          as a database server. The core capabilities of the components
          are the same. The difference between Enterprise Edition and
          Workgroup Edition primarily has to do with how they are
          licensed--Enterprise Edition is licensed on a per-processor
          basis with unlimited users, while Workgroup Edition is licensed
          on a per-user basis. Enterprise Edition also gives you the
          capability to enable DB2 clients to connect to mainframe
          databases, like DB2 for OS/390 or DB2 for OS/400. In contrast,
          Personal Edition is a single user database server that is
          useful only for developing DB2 applications. You cannot use
          Personal Edition as a server because Personal Edition does not
          accept incoming remote connections.
          
          Adding one of these components requires about 40 MB of disk
          space.
          
   Options for DB2 servers
   
        Replication
                This option enables your DB2 server to replicate data to
                other DB2 servers, and, with additional software, across
                non-DB2 servers as well. This option requires about 5 MB
                of disk space.
                
        Distributed Join for DB2 Data Sources
                This option enables your DB2 server to participate in a
                join with data from other database servers. This option
                requires about 2 MB of disk space.
                
   Application Development Client
          The Application Development Client component installs the
          headers and libraries that you need to create applications
          using embedded SQL for C and C++, Call Level Interface (CLI),
          Java Database Connectivity (JDBC), or embedded SQL for Java
          (SQLJ). You also have the option of installing the source code
          for sample applications that demonstrate much of the
          functionality of DB2.
          
     Tip: If you plan on developing applications for DB2, install the
     sample applications. The sample directories in
     /usr/IBMdb2/V7.1/samples/ contain build scripts (bld***) that
     include the compile and link options suitable for your own
     applications.
     
     Tip: If you are trying to develop applications and you get an error
     like "That command is not supported in this environment" while
     trying to precompile a file, it's because you either did not
     install the Application Development Client, or you installed it
     after you created an instance and you have not used the db2iupdt
     command to update the instance. See [55]Section 9.1 for more
     information on db2iupdt.
     
          Including the sample applications, this component requires
          about 10 MB of disk space.
          
   DB2 Product Library (HTML documentation)
          Documentation is installed into the /usr/IBMdb2/V7.1/doc/
          directory. For each language that you install, the DB2
          installer creates a subdirectory with a five-character name
          corresponding to the language locale. Issue the db2help command
          to fire up your Web browser with a page that links to the
          [56]documentation installed with DB2.
          
          The English HTML (En_US) documentation requires about 90 MB of
          disk space.
     _________________________________________________________________
   
5. Installing DB2 on other Linux distributions

   DB2 Version 7.1 is distributed as a set of RPM packages. If you want
   to install DB2 on a distribution that is not officially supported by
   IBM, and that distribution satisfies all of the prerequisites
   specified in [57]Section 2, all that you theoretically need to do is
   find a way to install those packages on your distribution. The alien
   utility available from [58]Kite converts RPM packages into formats
   supported by Debian (dpkg), Stampede (slp), and Slackware (slp).
   
   Susan Williams reported success in installing DB2 Version 7.1 on
   Debian using the following script as root:
   
   Example 1. Installation script for DB2 Version 7.1 on Debian
#!/bin/bash
cd /
for f in /mnt/cdrom1/db2/*rpm
do
alien -d -i -c $f
done

   This script installs every DB2 package on the CD-ROM. In a future
   iteration of this document I plan to provide a description of all of
   the DB2 packages to help you develop a more selective approach for
   your installation.
   
   Using this approach apparently prevents you from using the db2setup
   command to create instances. To create a DB2 Administration Server
   from the command line, issue the /usr/ibmdb2/v7.1/instance/dasicrt
   command as root. To create a DB2 instance, issue the
   /usr/ibmdb2/v7.1/instance/db2icrt command as root. To get the correct
   syntax for either command, use the -h flag.
     _________________________________________________________________
   
6. Creating DB2 instances

   This section gives you a brief overview of DB2 instances and the DB2
   Administration Server, and tells you how to create them.
   
   Some IBM documentation uses the term "instance" to refer to both DB2
   instances and a DB2 Administration Server. The basic similarity
   between a DB2 Administration Server and a DB2 instance, or "database
   manager", is that each is associated with a unique user ID. When you
   create either a DB2 instance or a DB2 Administration Server, DB2:
   
     * creates one or more new user IDs and corresponding home
       directories
     * creates a subdirectory in the instance home directory called
       sqllib
     * alters the .bashrc file to call the ~/sqllib/db2profile shell
       script to set up the environment for the instance
     _________________________________________________________________
   
6.1. Overview of DB2 Administration Server

   Like a queen bee in a hive, only one DB2 Administration Server can
   exist on any given DB2 server. By locally or remotely logging as the
   user ID that corresponds to the DB2 Administration Server, a database
   administrator uses the DB2 Administration Server to create, drop, or
   change the properties of DB2 instances.
     _________________________________________________________________
   
6.2. Overview of DB2 instance

   To quote the IBM DB2 Universal Database Version 7.1 Administration
   Guide definition of an instance:
   
     An instance (sometimes called a database manager) is DB2 code that
     manages data. It controls what can be done to the data, and manages
     system resources assigned to it. Each instance is a complete
     environment. ... An instance has its own databases (which other
     instances cannot access), and all its database partitions share the
     same system directories. It also has separate security from other
     instances on the same machine (system).
     
   What this boils down to is that for every DB2 instance, DB2 requires a
   unique user ID on your Linux workstation. Security for an instance is
   provided by the normal password authentication process for any Linux
   user ID. Each instance can contain one or more databases, each of
   which inherits settings from their instance.
   
   Creating the Administration Server using db2setup
   
   The DB2 Administration Server requires about 3 MB of disk space. The
   following steps guide you through the process of creating a DB2
   Administration Server.
    1. Issue the db2setup command as described in [59]Section 4.2.
    2. Select [ Create... ].
    3. Select the check box for Create the Administration Server. The
       Administration Server window is displayed.
    4. Enter a unique user name in the User Name field. You can use an
       existing user name that is not already in use by a DB2 instance,
       but it is probably simpler to create a new user for each instance.
    5. Select the Use default UID check box. As far as I can tell, this
       setting is always right.
    6. Enter a unique group name in the Group Name field. You can use an
       existing group name if you wish, but creating a new group ensures
       that you do not inadvertently give permissions to other users on
       your system.
    7. Select the Use default GID check box. Again, as far as I can tell,
       this setting is always right.
    8. Ensure that the value of the Home Directory field reflects the
       home directory of the user ID.
       
   Warning
   SuSE users: The prefix for the home directory may default to
   /usr/lib/db2/. This is almost certainly wrong; the value for a
   standard SuSE system should be /home/.
    9. Enter a unique password in the Password and Verify Password
       fields.
       
   Warning
   Enter a new password! If you do not enter a new password in these
   fields, DB2 assigns the default password ibmdb2, giving crackers a
   wide-open front door to your system.
       
   Creating a DB2 instance using db2setup
   
   A DB2 instance requires about 2 MB of disk space. A sample database
   for a DB2 instance requires about 16 MB of disk space. The following
   steps guide you through the process of creating a DB2 instance.
    1. Issue the db2setup command as described in [60]Section 4.2.
    2. Select [ Create... ].
    3. Select the Create a DB2 Instance check box. The DB2 Instance
       window is displayed.
    4. Enter a unique user name in the User Name field. You can use an
       existing user name that is not already in use by a DB2 instance,
       but it is probably simpler to create a new user for each instance.
    5. Select the Use default UID check box. As far as I can tell, this
       setting is always right.
    6. Enter a unique group name in the Group Name field. You can use an
       existing group name if you wish, but creating a new group ensures
       that you do not inadvertently give permissions to other users on
       your system.
    7. Select the Use default GID check box. Again, as far as I can tell,
       this setting is always right.
    8. Ensure that the value of the Home Directory field reflects the
       home directory of the user ID.
       
   Warning
   SuSE users: The prefix for the home directory may default to
   /usr/lib/db2/. This is almost certainly wrong; the value for a
   standard SuSE system should be /home/.
    9. Enter a unique password in the Password and Verify Password
       fields.
       
   Warning
   Enter a new password! If you do not enter a new password in these
   fields, DB2 assigns the default password ibmdb2, giving crackers a
   wide-open front door to your system.
   10. Select [ Properties... ] to change the properties for the
       instance.
         a. Under the Authentication Type heading, select the Server
            Encrypt check box. This greatly improves the security of your
            system, by telling DB2 to accept encrypted passwords, rather
            than plain text passwords.
         b. Select the Auto start DB2 Instance at system boot check box
            if you want to start this DB2 instance every time you reboot
            your system.
         c. Select the Create a sample database for DB2 Instance check
            box if you plan to work with the sample applications
            available with the Application Development Client. To run
            correctly, most of the sample applications require the
            specific tables and data of the sample database. If you do
            not create the sample database now, you can create it later
            using the db2sampl command.
   11. Select [ OK ] to create the DB2 instance. The Fenced User text
       window is displayed. Repeat the previous steps for creating a new
       user and group. Server-side DB2 executables, such as stored
       procedures and user-defined functions, execute under the
       permissions of the fenced user ID. By controlling the permissions
       of the fenced user ID, you control the permissions of the
       server-side DB2 executables.
   12. Select [ OK ] to create the fenced user.
     _________________________________________________________________
   
7. Removing DB2

   To remove DB2 from your workstation cleanly, perform the following
   steps:
    1. Log in as root.
    2. List all DB2 instances:
       
bash# /usr/IBMdb2/V7.1/instance/db2ilist

    3. Drop each instance listed in the previous step with the following
       command:
       
bash# /usr/ibmdb2/v7.1/instance/db2idrop instance-name

    4. Drop the DB2 administration server:
       
bash# /usr/IBMdb2/V7.1/instance/dasidrop `/usr/IBMdb2/V7.1/instance/dasilist`

    5. Uninstall all of the DB2 packages on your system using the
       db2deinstall command on your DB2 CD-ROM:
       
bash# /mnt/cdrom/db2/db2_deinstall -n
     _________________________________________________________________
   
8. Using DB2

   This section gives you the basic information you need to start working
   with DB2 on Linux. It includes instructions on issuing DB2 commands
   and SQL statements from the command line, as well as the commands you
   need to start the DB2 Control Center and the DB2 Information Center.
   
     Note: This section assumes that you have followed the instructions
     in [61]Section 10.
     _________________________________________________________________
   
8.1. DB2 Control Center

   The left side of the DB2 Control Center provides an object-oriented
   view of the database objects that you have catalogued, including DB2
   instances and databases on other DB2 servers. One way to add, edit, or
   drop database objects is to right-click on an object to bring up a
   menu.
   
   To start the DB2 Control Center
    1. Ensure you are logged on to your Linux workstation using either
       the DB2 Administration Server user ID or the DB2 instance user ID.
       If you use the su command to become the user, ensure you include
       the -l parameter to initialize the environment for the user.
    2. Start the X server, if it is not already started.
    3. Issue the db2cc command to start the DB2 Control Center. Depending
       on the speed of your system, it may take a few seconds for the
       splash screen to appear, and longer before the full DB2 Control
       Center appears.
     _________________________________________________________________
   
8.2. DB2 Information Center

   The DB2 Information Center provides tree views of the information
   about DB2 that is installed on your system, as well as a number of
   links to web sites with further information. If you did not install
   the DB2 documentation, the tree views contain fewer links.
   
   To start the DB2 Information Center
    1. Ensure you are logged on to your Linux workstation using either
       the DB2 Administration Server user ID or the DB2 instance user ID.
       If you use the su command to become the user, ensure you include
       the -l parameter to initialize the environment for the user.
    2. Ensure that the X server is started.
    3. Issue the db2ic command to start the DB2 Information Center.
       Depending on the speed of your system, it may take a few seconds
       for the splash screen to appear, and longer before the full DB2
       Information Center appears.
     _________________________________________________________________
   
8.3. The DB2 command line

   If you are logged on to your Linux workstation using either the DB2
   Administration Server user ID or the DB2 instance user ID, you can
   issue DB2 commands and SQL statements from the command line.
   
   If this is your first time using DB2, I would suggest creating the
   sample database that ships with DB2. The sample database is used
   throughout the DB2 documentation and is required by most of the sample
   applications. To create the sample database, you can either select the
   Create the sample database option when you create a DB2 instance, or
   issue the db2sampl command from the DB2 command line.
   
   Before you can issue an SQL statement, you have to connect to a
   database. To connect to a database:
   
     * db2 CONNECT TO database USER userID USING password
       
   To connect to a database, and have DB2 prompt you for the password:
   
     * db2 CONNECT TO database USER userID
       
   To connect to a database using the default user ID:
   
     * db2 CONNECT TO database
       
   Once you have connected to a database, you can then issue SQL
   statements or DB2 commands against that database. For example, to
   select all of the columns from the EMPLOYEE table in the SAMPLE
   database, issue the following command:
bash$ db2 "SELECT * FROM employee"

     Note: You can avoid typing db2 as the prefix for every SQL
     statement and DB2 command by issuing commands using the Command
     Line Processor (CLP). To start the CLP, issue the db2 command by
     itself. DB2 provides the following prompt:
     
You can issue database manager commands and SQL statements from the command
prompt. For example:
    db2 => connect to sample
    db2 => bind sample.bnd

For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
 ? CATALOG DATABASE for help on the CATALOG DATABASE command
 ? CATALOG          for help on all of the CATALOG commands.

To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.

For more detailed help, refer to the Online Reference Manual.

db2 =>

     I don't use the CLP because it prevents me from using the command
     line history feature of my shell. I find myself using the command
     line history a lot when I'm issuing SQL statements.
     
     Some users claim that running the CLP within an Emacs shell gives
     them the best of both worlds: they get command line history, and
     they don't have to escape commands that contain lots of quotation
     marks and brackets.
     _________________________________________________________________
   
9. Troubleshooting

   The following section covers some of the common problems you may
   encounter while installing DB2, creating an instance, or using a DB2
   database.
     _________________________________________________________________
   
9.1. Problems with DB2 installation

   The following section covers some of the common problems you may
   encounter when you install DB2.
   
   9.1.1. [62]When I try to run db2setup, I get the following error:
          DBI1503E An error was encountered when opening or writing to
          file, "/tmp/.dbinst.swp".
          
   9.1.2. [63]After creating a DB2 instance, I installed the Application
          Development Client, but I can't use that instance to create DB2
          applications.
          
   9.1.1. When I try to run db2setup, I get the following error: DBI1503E
   An error was encountered when opening or writing to file,
   "/tmp/.dbinst.swp".
   
   DB2 issues this error when it can't find the pdksh or ksh shells. This
   has probably occurred because you did not install the pdksh package
   for your distribution. See [64]Section 3 for more details on
   installing the pdksh package for your Linux distribution.
   
   9.1.2. After creating a DB2 instance, I installed the Application
   Development Client, but I can't use that instance to create DB2
   applications.
   
   When you add the Application Development Client after you initially
   install DB2 and create a DB2 instance, your existing DB2 instance
   won't recognize the db2 prep command. Instead, DB2 returns the
   following error: DB21051E The command is not supported for this
   environment.
   
   The problem is that when you install a new DB2 component, DB2 does not
   automatically update existing DB2 instances to include links to the
   new libraries and executables. To update an existing DB2 instance, use
   the db2iupdt command as root:
bash# /usr/IBMdb2/V7.1/instance/db2iupdt instance-name

   To update all existing DB2 instances, issue the following command as
   root:
bash# /usr/IBMdb2/V7.1/instance/db2iupdt -e
     _________________________________________________________________
   
9.2. Problems creating a DB2 instance

   The following section covers some of the common problems you may
   encounter when you create a DB2 instance.
   
   9.2.1. [65]Creating a DB2 instance or a DB2 Administration Server
          fails.
          
   9.2.2. [66]db2setup indicated that it successfully created an
          instance, but I checked /tmp/db2install.log and it contains the
          message DBI1766W Cannot change the secondary group list of ""
          (Caldera OpenLinux 2.4). 
          
   9.2.1. Creating a DB2 instance or a DB2 Administration Server fails.
   
   DB2 often fails to create an instance because you became root by
   issuing the command bash$ su root rather than bash$ su -l root, which
   uses the environment settings for the root account. Check the contents
   of the DB2 install log in /tmp/db2setup.log. If the installer has
   issued the following error message:
  DBI1517E An attempt to execute a command in a subprocess failed.

  Explanation: An error was detected when attempting to execute a command in a
subprocess. One of the
  following problems occurred:

      o The command does not exist.
      o Incomplete command search path.
      o Incorrect access permissions on the command.
      o System resource problem.

   then most likely your root account did not have the /usr/sbin
   directory in the PATH environment variable for root.
   
   PATH is normally set correctly for you if you log in as root, or issue
   the command bash$ su -l root to become root. You can add /usr/sbin to
   the PATH environment variable by issuing the following command at the
   terminal prompt, or including it in /root/.bashrc:
  export PATH=$PATH:/usr/sbin

   9.2.2. db2setup indicated that it successfully created an instance,
   but I checked /tmp/db2install.log and it contains the message DBI1766W
   Cannot change the secondary group list of "" (Caldera OpenLinux 2.4). 
   
   This is one area where DB2 and Caldera OpenLinux don't work well
   together. Fix this by manually adding each instance user ID to the
   group you defined during instance creation. Here's the full help from
   the IBM DB2 Message Reference:
      DBI1766W Cannot change the secondary group list of
                "".

      Explanation:  A code, "", is returned when attempting to
      change the secondary group list of the given user ID. One of the
      following situations has occurred:

      o  NIS is running.

      o  One or more processes are currently being executed under the
          given user ID.

      User Response:  You must add the group ID, "", to the
      secondary group list of the user ID, "", so that the
      Adminstration Server can function properly.

      o  If there happens to be any process run under the given user
          ID, terminate all of these processes and follow the
          instructions above to setup the secondary group list of this
          user ID.

      o  If you are running this command on an NIS client, try the
          above instructions to setup the secondary group list of this
          user ID on your NIS server.

   For instructions on how to add user IDs to groups, see [67]Section
   3.1.3.1.
     _________________________________________________________________
   
9.3. Problems using DB2

   The following section covers some of the common problems you may
   encounter when you use a DB2 database.
   
   9.3.1. [68]I'm running out of connections for my DB2 server.
   9.3.2. [69]When I start the DB2 Control Center, I get a message box
          with the error SQL1042C An unexpected system error occurred.
          
   9.3.3. [70]The DB2 Control Center starts normally, but the "Systems"
          folder is empty.
          
   9.3.4. [71]When I try to start the DB2 Control Center with the db2cc
          command, the splash screen comes up, then disappears.
          
   9.3.5. [72]When I run any db2 commands, part of the output is Welcome
          to your OpenLinux system!. How do I change this? (Caldera
          OpenLinux 2.4)
          
   9.3.1. I'm running out of connections for my DB2 server.
   
   The number of connections that DB2 can support depends on two #define
   variables included in the kernel source header files.
   
   NR_TASKS
          This variable, defined in /usr/src/linux/include/linux/tasks.h,
          determines the number of simultaneous processes that Linux
          supports. A second variable, MAX_TASKS_PER_USER, is defined as
          NR_TASKS/2. Since DB2 instances are treated as users by Linux,
          and each connection uses a single process, the maximum number
          of connections per instance is capped at the value of
          NR_TASKS/2.
          
          The default value for NR_TASKS in the kernel source is 512,
          allowing a maximum of 256 simultaneous connections to a single
          DB2 instance. DB2 itself requires a few connections for
          overhead processes. If you recompile the kernel yourself, you
          should increase this value to something like 2048. Thankfully,
          the stock kernels shipped with the Red Hat 6.1, Red Hat 6.2,
          SuSE 6.2, SuSE 6.3, and TurboLinux 6.0 distributions set the
          value of NR_TASKS to 2560, thus allowing 1280 connections for a
          single DB2 instance. However, Caldera OpenLinux 2.4 ships with
          a kernel in which NR_TASKS is set to the default value of 512.
          Caldera users may want to consider recompiling the kernel.
          
   SEMMNI
          This variable, defined in /usr/src/linux/include/linux/sem.h,
          determines the number of semaphore identifiers that Linux
          supports. This variable is particularly important on symmetric
          multi-processing (SMP) machines. A unique semaphor identifier
          is required for each processor per agent (or connection);
          therefore, on a quad-processor machine, four semaphore
          identifiers are required per connection.
          
          The default value for SEMMNI in the kernel source is 128,
          which, on a quad-processor machine, will only allow 32
          simultaneous connections to a DB2 instance. If you recompile
          the kernel yourself, increase this value to something like
          1024.
          
     Note: To be added: the value of this variable in the stock kernels
     shipped with the Caldera OpenLinux 2.4, Red Hat 6.2, SuSE 6.2, SuSE
     6.3, and TurboLinux 6.0 distributions.
     
   9.3.2. When I start the DB2 Control Center, I get a message box with
   the error SQL1042C An unexpected system error occurred.
   
   This error occurs only the first time you start the Control Center.
   Note that the message box may be mostly covered up by the pretty DB2
   splash screen; if this is the case, you have to move the error message
   window down and press the "Close" button. The Control Center then
   starts correctly, and you should not get the error message again.
   
   9.3.3. The DB2 Control Center starts normally, but the "Systems"
   folder is empty.
   
   If the Control Center displays an empty "Systems" folder, you might
   need to catalog the DB2 Administration Server manually for the local
   instance from which you are trying to run the Control Center. This
   assumes that you have created the DB2 Administration Server instance
   before starting the Control Center.
   
   To catalog the DB2 Administration Server, issue the following command:
bash$ db2 catalog admin local node machine-name instance Administration-Server-
name system machine-name ostype linux

   Now restart the Control Center. Your local system is now displayed
   under the "Systems" folder. Do not try this from a client-only install
   of DB2, because no local DB2 Administration Server can be available.
   
   9.3.4. When I try to start the DB2 Control Center with the db2cc
   command, the splash screen comes up, then disappears.
   
   On Caldera, the Control Center didn't work for me until I added the
   instance user IDs to the appropriate groups. For more information, see
   [73]Section 3.1.3.1.
   
   Ensure that you have installed the IBM Developer Kit for Java 1.1.8,
   and that the /usr/jdk118/bin directory is in your path. If you issue
   the command
bash$ java -fullversion

   , you should get a response like this: java full version "JDK 1.1.8
   IBM build l118-20000325 (JIT enabled: jitc)" Java virtual machines
   from other sources may not work. For a quick guide to installing the
   IBM Developer Kit for Java, see [74]Section 10.
   
   9.3.5. When I run any db2 commands, part of the output is Welcome to
   your OpenLinux system!. How do I change this? (Caldera OpenLinux 2.4)
   
   Caldera OpenLinux includes this annoying message as part of their
   default login. For instructions on how to remove or modify this
   output, see [75]Section 3.1.3.3.
     _________________________________________________________________
   
10. Installing the IBM Developer Kit for Java

   This section gives you quick and dirty instructions on how to install
   the IBM Developer Kit for Java, version 1.1.8. You need this version
   to run the DB2 Control Center or Java applications or applets that
   connect to DB2. Note that these instructions are not meant to replace
   the documentation supplied with the IBM Developer Kit for Java.
   
   Warning
   
   For DB2 Version 7.1, you cannot use other versions of Java. Versions
   of the Java Virtual Machine (JVM) supplied by other software
   organizations are not supported, and even later versions of the IBM
   Developer Kit for Java, such as JDK 1.3.x, are not supported.
   
   Installing the IBM Developer Kit for Java
    1. Download the IBM Developer Kit for Java, version 1.1.8, from the
       [76]IBM Java Developer's Kit downloads web site. I'll assume that
       you download the RPM package of the IBM Developer Kit for Java.
    2. Install the IBM Developer Kit for Java by issuing the following
       command as root:
       
bash# rpm -ivh IBMJava118-SDK-1.1.8-2.0-i386.rpm

    3. Add the following lines to your /etc/profile file to set up the
       Java environment for all users:
       
   export JAVA_HOME=/usr/jdk118
   export PATH=$PATH:$JAVA_HOME/bin
   export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/classes.zip

     Note: Caldera users should see [77]Section 3.1.1 for instructions
     on configuring the IBM Developer Kit for Java on Caldera OpenLinux.
     _________________________________________________________________
   
Appendix A. Resources

   Following is a list of references to further information on using DB2
   V7.1 for Linux:
   
   Newsgroups
          
        [78]comp.databases.ibm-db2
                Covers the use of DB2 Universal Database on all
                platforms, including Linux and other Unices, OS/2,
                OS/390, OS/400, and Windows. This forum is quite active.
                
        [79]ibm.software.db2.udb.v7beta on the news.software.ibm.com NNTP
                server
                Although this newsgroup was meant to serve users trying
                out the DB2 V7.1 beta code, there are a lot of general
                questions about DB2 on Linux that might help answer your
                questions. Now that the final release is available,
                activity on this forum has slowed down significantly.
                
   Web sites
          
        [80]DB2 Library
                IBM publishes many books on installing, administering,
                and developing applications with DB2. If you decide not
                to install the documentation when you install DB2, you
                can always access the documentation online in HTML format
                or download PDF versions of the books.
                
        [81]DB2 Application Development
                This web site contains the latest information about
                restrictions, workarounds, or additional documentation
                for developing applications with DB2.
                
        [82]DB2 for Linux
                This web site contains general information about using
                DB2 for Linux, including a link to the free [83]download
                of DB2 Personal Developers Edition.
                
        [84]DB2 Magazine
                This web site is the online version of DB2 Magazine,
                which publishes articles about using DB2 on Linux and
                other platforms. You can also sign up a free subscription
                to the print version of the magazine.
                
        [85]DB2 White Papers
                This web site contains white papers published by IBM
                about DB2. White papers typically provide overviews or
                introductions to new technology or new releases of a
                product.
                
        [86]International DB2 Users Group (IDUG)
                IDUG holds a number of international conferences on DB2
                and has regional user groups. While IDUG has
                traditionally focused on DB2 for OS/390 and OS/400, they
                have increasingly included information on DB2 for Linux,
                other Unices, OS/2, and Windows. The IDUG web site
                includes online discussion forums and links to other DB2
                resources.
     _________________________________________________________________
   
Appendix B. GNU General Public License

     Version 2, June 1991
     
     Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple
     Place, Suite 330, Boston, MA 02111-1307 USA
     
     Everyone is permitted to copy and distribute verbatim copies of
     this license document, but changing it is not allowed.
     _________________________________________________________________
   
Appendix B.1. Preamble

   The licenses for most software are designed to take away your freedom
   to share and change it. By contrast, the GNU General Public License is
   intended to guarantee your freedom to share and change free
   software--to make sure the software is free for all its users. This
   General Public License applies to most of the Free Software
   Foundation's software and to any other program whose authors commit to
   using it. (Some other Free Software Foundation software is covered by
   the GNU Library General Public License instead.) You can apply it to
   your programs, too.
   
   When we speak of free software, we are referring to freedom, not
   price. Our General Public Licenses are designed to make sure that you
   have the freedom to distribute copies of free software (and charge for
   this service if you wish), that you receive source code or can get it
   if you want it, that you can change the software or use pieces of it
   in new free programs; and that you know you can do these things.
   
   To protect your rights, we need to make restrictions that forbid
   anyone to deny you these rights or to ask you to surrender the rights.
   These restrictions translate to certain responsibilities for you if
   you distribute copies of the software, or if you modify it.
   
   For example, if you distribute copies of such a program, whether
   gratis or for a fee, you must give the recipients all the rights that
   you have. You must make sure that they, too, receive or can get the
   source code. And you must show them these terms so they know their
   rights.
   
   We protect your rights with two steps: (1) copyright the software, and
   (2) offer you this license which gives you legal permission to copy,
   distribute and/or modify the software.
   
   Also, for each author's protection and ours, we want to make certain
   that everyone understands that there is no warranty for this free
   software. If the software is modified by someone else and passed on,
   we want its recipients to know that what they have is not the
   original, so that any problems introduced by others will not reflect
   on the original authors' reputations.
   
   Finally, any free program is threatened constantly by software
   patents. We wish to avoid the danger that redistributors of a free
   program will individually obtain patent licenses, in effect making the
   program proprietary. To prevent this, we have made it clear that any
   patent must be licensed for everyone's free use or not licensed at
   all.
   
   The precise terms and conditions for copying, distribution and
   modification follow.
     _________________________________________________________________
   
Appendix B.1.1. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING,
DISTRIBUTION AND MODIFICATION

   0. This License applies to any program or other work which contains a
   notice placed by the copyright holder saying it may be distributed
   under the terms of this General Public License. The "Program", below,
   refers to any such program or work, and a "work based on the Program"
   means either the Program or any derivative work under copyright law:
   that is to say, a work containing the Program or a portion of it,
   either verbatim or with modifications and/or translated into another
   language. (Hereinafter, translation is included without limitation in
   the term "modification".) Each licensee is addressed as "you".
   
   Activities other than copying, distribution and modification are not
   covered by this License; they are outside its scope. The act of
   running the Program is not restricted, and the output from the Program
   is covered only if its contents constitute a work based on the Program
   (independent of having been made by running the Program). Whether that
   is true depends on what the Program does.
   
   1. You may copy and distribute verbatim copies of the Program's source
   code as you receive it, in any medium, provided that you conspicuously
   and appropriately publish on each copy an appropriate copyright notice
   and disclaimer of warranty; keep intact all the notices that refer to
   this License and to the absence of any warranty; and give any other
   recipients of the Program a copy of this License along with the
   Program.
   
   You may charge a fee for the physical act of transferring a copy, and
   you may at your option offer warranty protection in exchange for a
   fee.
   
   2. You may modify your copy or copies of the Program or any portion of
   it, thus forming a work based on the Program, and copy and distribute
   such modifications or work under the terms of Section 1 above,
   provided that you also meet all of these conditions:
   
   a) You must cause the modified files to carry prominent notices
   stating that you changed the files and the date of any change.
   
   b) You must cause any work that you distribute or publish, that in
   whole or in part contains or is derived from the Program or any part
   thereof, to be licensed as a whole at no charge to all third parties
   under the terms of this License.
   
   c) If the modified program normally reads commands interactively when
   run, you must cause it, when started running for such interactive use
   in the most ordinary way, to print or display an announcement
   including an appropriate copyright notice and a notice that there is
   no warranty (or else, saying that you provide a warranty) and that
   users may redistribute the program under these conditions, and telling
   the user how to view a copy of this License. (Exception: if the
   Program itself is interactive but does not normally print such an
   announcement, your work based on the Program is not required to print
   an announcement.)
   
   These requirements apply to the modified work as a whole. If
   identifiable sections of that work are not derived from the Program,
   and can be reasonably considered independent and separate works in
   themselves, then this License, and its terms, do not apply to those
   sections when you distribute them as separate works. But when you
   distribute the same sections as part of a whole which is a work based
   on the Program, the distribution of the whole must be on the terms of
   this License, whose permissions for other licensees extend to the
   entire whole, and thus to each and every part regardless of who wrote
   it.
   
   Thus, it is not the intent of this section to claim rights or contest
   your rights to work written entirely by you; rather, the intent is to
   exercise the right to control the distribution of derivative or
   collective works based on the Program.
   
   In addition, mere aggregation of another work not based on the Program
   with the Program (or with a work based on the Program) on a volume of
   a storage or distribution medium does not bring the other work under
   the scope of this License.
   
   3. You may copy and distribute the Program (or a work based on it,
   under Section 2) in object code or executable form under the terms of
   Sections 1 and 2 above provided that you also do one of the following:
   
   a) Accompany it with the complete corresponding machine-readable
   source code, which must be distributed under the terms of Sections 1
   and 2 above on a medium customarily used for software interchange; or,
   
   b) Accompany it with a written offer, valid for at least three years,
   to give any third party, for a charge no more than your cost of
   physically performing source distribution, a complete machine-readable
   copy of the corresponding source code, to be distributed under the
   terms of Sections 1 and 2 above on a medium customarily used for
   software interchange; or,
   
   c) Accompany it with the information you received as to the offer to
   distribute corresponding source code. (This alternative is allowed
   only for noncommercial distribution and only if you received the
   program in object code or executable form with such an offer, in
   accord with Subsection b above.)
   
   The source code for a work means the preferred form of the work for
   making modifications to it. For an executable work, complete source
   code means all the source code for all modules it contains, plus any
   associated interface definition files, plus the scripts used to
   control compilation and installation of the executable. However, as a
   special exception, the source code distributed need not include
   anything that is normally distributed (in either source or binary
   form) with the major components (compiler, kernel, and so on) of the
   operating system on which the executable runs, unless that component
   itself accompanies the executable.
   
   If distribution of executable or object code is made by offering
   access to copy from a designated place, then offering equivalent
   access to copy the source code from the same place counts as
   distribution of the source code, even though third parties are not
   compelled to copy the source along with the object code.
   
   4. You may not copy, modify, sublicense, or distribute the Program
   except as expressly provided under this License. Any attempt otherwise
   to copy, modify, sublicense or distribute the Program is void, and
   will automatically terminate your rights under this License. However,
   parties who have received copies, or rights, from you under this
   License will not have their licenses terminated so long as such
   parties remain in full compliance.
   
   5. You are not required to accept this License, since you have not
   signed it. However, nothing else grants you permission to modify or
   distribute the Program or its derivative works. These actions are
   prohibited by law if you do not accept this License. Therefore, by
   modifying or distributing the Program (or any work based on the
   Program), you indicate your acceptance of this License to do so, and
   all its terms and conditions for copying, distributing or modifying
   the Program or works based on it.
   
   6. Each time you redistribute the Program (or any work based on the
   Program), the recipient automatically receives a license from the
   original licensor to copy, distribute or modify the Program subject to
   these terms and conditions. You may not impose any further
   restrictions on the recipients' exercise of the rights granted herein.
   You are not responsible for enforcing compliance by third parties to
   this License.
   
   7. If, as a consequence of a court judgment or allegation of patent
   infringement or for any other reason (not limited to patent issues),
   conditions are imposed on you (whether by court order, agreement or
   otherwise) that contradict the conditions of this License, they do not
   excuse you from the conditions of this License. If you cannot
   distribute so as to satisfy simultaneously your obligations under this
   License and any other pertinent obligations, then as a consequence you
   may not distribute the Program at all. For example, if a patent
   license would not permit royalty-free redistribution of the Program by
   all those who receive copies directly or indirectly through you, then
   the only way you could satisfy both it and this License would be to
   refrain entirely from distribution of the Program.
   
   If any portion of this section is held invalid or unenforceable under
   any particular circumstance, the balance of the section is intended to
   apply and the section as a whole is intended to apply in other
   circumstances.
   
   It is not the purpose of this section to induce you to infringe any
   patents or other property right claims or to contest validity of any
   such claims; this section has the sole purpose of protecting the
   integrity of the free software distribution system, which is
   implemented by public license practices. Many people have made
   generous contributions to the wide range of software distributed
   through that system in reliance on consistent application of that
   system; it is up to the author/donor to decide if he or she is willing
   to distribute software through any other system and a licensee cannot
   impose that choice.
   
   This section is intended to make thoroughly clear what is believed to
   be a consequence of the rest of this License.
   
   8. If the distribution and/or use of the Program is restricted in
   certain countries either by patents or by copyrighted interfaces, the
   original copyright holder who places the Program under this License
   may add an explicit geographical distribution limitation excluding
   those countries, so that distribution is permitted only in or among
   countries not thus excluded. In such case, this License incorporates
   the limitation as if written in the body of this License.
   
   9. The Free Software Foundation may publish revised and/or new
   versions of the General Public License from time to time. Such new
   versions will be similar in spirit to the present version, but may
   differ in detail to address new problems or concerns.
   
   Each version is given a distinguishing version number. If the Program
   specifies a version number of this License which applies to it and
   "any later version", you have the option of following the terms and
   conditions either of that version or of any later version published by
   the Free Software Foundation. If the Program does not specify a
   version number of this License, you may choose any version ever
   published by the Free Software Foundation.
   
   10. If you wish to incorporate parts of the Program into other free
   programs whose distribution conditions are different, write to the
   author to ask for permission. For software which is copyrighted by the
   Free Software Foundation, write to the Free Software Foundation; we
   sometimes make exceptions for this. Our decision will be guided by the
   two goals of preserving the free status of all derivatives of our free
   software and of promoting the sharing and reuse of software generally.
   
   NO WARRANTY
   
   11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
   WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
   EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
   OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
   PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
   THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
   
   12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
   WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
   AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
   FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
   CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
   PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
   RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
   FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
   SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
   DAMAGES.
   
   END OF TERMS AND CONDITIONS
     _________________________________________________________________
   
Appendix B.1.2. How to Apply These Terms to Your New Programs

   If you develop a new program, and you want it to be of the greatest
   possible use to the public, the best way to achieve this is to make it
   free software which everyone can redistribute and change under these
   terms.
   
   To do so, attach the following notices to the program. It is safest to
   attach them to the start of each source file to most effectively
   convey the exclusion of warranty; and each file should have at least
   the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and a brief idea of what it does.
Copyright (C) yyyy name of author

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

   Also add information on how to contact you by electronic and paper
   mail.
   
   If the program is interactive, make it output a short notice like this
   when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

   The hypothetical commands `show w' and `show c' should show the
   appropriate parts of the General Public License. Of course, the
   commands you use may be called something other than `show w' and `show
   c'; they could even be mouse-clicks or menu items--whatever suits your
   program.
   
   You should also get your employer (if you work as a programmer) or
   your school, if any, to sign a "copyright disclaimer" for the program,
   if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.

signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice

   This General Public License does not permit incorporating your program
   into proprietary programs. If your program is a subroutine library,
   you may consider it more useful to permit linking proprietary
   applications with the library. If this is what you want to do, use the
   GNU Library General Public License instead of this License.

References

   1. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#INTRO
   2. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN23
   3. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN31
   4. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN50
   5. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN55
   6. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN59
   7. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN66
   8. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#PREREQS
   9. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN71
  10. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#PREPLINUX
  11. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN228
  12. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN323
  13. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN347
  14. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN397
  15. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2INSTALL
  16. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN438
  17. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2COMPONENTS
  18. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#XFACTOR
  19. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2INSTANCE
  20. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN579
  21. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN582
  22. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#UNINSTALL
  23. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#USINGDB2
  24. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN696
  25. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN710
  26. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN724
  27. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2TROUBLE
  28. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#TSINSTALL
  29. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN795
  30. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN826
  31. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#JDKINSTALL
  32. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#REFERENCES
  33. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#GPL
  34. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN989
  35. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#XFACTOR
  36. http://www.ibm.com/software/data/db2/udb/downloads.html
  37. http://www.linuxdoc.org/
  38. mailto:daniels@REMca.ibm.com
  39. http://www.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/v7pubs.d2w/main
  40. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#XFACTOR
  41. http://www.ibm.com/java/jdk/118/linux/
  42. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#JDKINSTALL
  43. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2INSTALL
  44. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#CALDERAPOSTINSTALL
  45. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN267
  46. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN279
  47. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2INSTALL
  48. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2INSTALL
  49. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2INSTALL
  50. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2INSTANCE
  51. http://www.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/v7pubs.d2w/main
  52. http://www.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/v7pubs.d2w/main
  53. http://www.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/v7pubs.d2w/main
  54. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#UNINSTALL
  55. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#TSINSTALL
  56. file://localhost/usr/IBMdb2/V7.1/doc/html/index.htm
  57. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#PREREQS
  58. http://kitenet.net/programs/alien/
  59. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2COMPONENTS
  60. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#DB2COMPONENTS
  61. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#JDKINSTALL
  62. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN770
  63. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN783
  64. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#PREPLINUX
  65. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN800
  66. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN816
  67. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#CALDERAUID
  68. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN831
  69. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN865
  70. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN872
  71. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN883
  72. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#AEN897
  73. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#CALDERAUID
  74. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#JDKINSTALL
  75. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#CALDERAGREETING
  76. http://www.ibm.com/java/jdk/118/linux/
  77. file://localhost/export/sunsite/users/gferg/howto/00_DB2-HOWTO.html#CALDERAPREINSTALL
  78. news:comp.databases.ibm-db2
  79. news:ibm.software.db2.udb.v7beta
  80. http://www-4.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/v7pubs.d2w/main
  81. http://www.ibm.com/software/data/db2/udb/ad
  82. http://www.ibm.com/software/data/db2/linux
  83. http://www.ibm.com/software/data/db2/udb/downloads.html
  84. http://www.db2mag.com/
  85. http://www.ibm.com/software/data/pubs/papers
  86. http://www.idug.org/
  DNS HOWTO
  Nicolai Langfeldt janl@math.uio.no
  v2.2, 11 February 1999

  HOWTO become a totally small time DNS admin.
  ______________________________________________________________________

  Table of Contents


  1. Preamble

     1.1 Legal stuff
     1.2 Credits and request for help.
     1.3 Dedication

  2. Introduction.

  3. A caching only name server.

     3.1 Starting named
     3.2 Making it even better
     3.3 Congratulations

  4. A

     4.1 But first some dry theory
     4.2 Our own domain
     4.3 The reverse zone
     4.4 Words of caution
     4.5 Why reverse lookups don't work.
        4.5.1 The reverse zone isn't delegated.
        4.5.2 You've got a classless subnet

  5. A real domain example

     5.1 /etc/named.conf (or /var/named/named.conf)
     5.2 /var/named/root.hints
     5.3 /var/named/zone/127.0.0
     5.4 /var/named/zone/land-5.com
     5.5 /var/named/zone/206.6.177

  6. Maintenance

  7. Converting from version 4 to version 8

  8. Questions and Answers

  9. How to become a bigger time DNS admin.



  ______________________________________________________________________

  1.  Preamble

  Keywords: DNS, bind, bind-4, bind-8, named, dialup, ppp, slip, isdn,
  Internet, domain, name, hosts, resolving, caching.


  This document is part of the Linux Documentation Project.



  1.1.  Legal stuff

  (C)opyright 1995-1999 Nicolai Langfeldt. Do not modify without
  amending copyright, distribute freely but retain copyright message.


  1.2.  Credits and request for help.

  I want to thank Arnt Gulbrandsen whom I cause to suffer through the
  drafts to this work and whom provided many useful suggestions.  I also
  want to thank the numerous people that have e-mailed suggestions and
  notes.


  This will never be a finished document, please send me mail about your
  problems and successes, it can make this a better HOWTO.  So please
  send comments and/or questions or money to janl@math.uio.no.  If you
  send e-mail and want an answer please show the simple courtesy of
  making sure that the return address is correct and working.  Also,
  please read the ``QnA'' section before mailing me.  Another thing, I
  can only understand Norwegian and English.



  If you want to translate this HOWTO please notify me so I can keep
  track of what languages it has been published in, and also I can
  notify you when the HOWTO has been updated.


  1.3.  Dedication

  This HOWTO is dedicated to Anne Line Norheim Langfeldt.  Though she
  will probably never read it since she's not that kind of girl.


  2.  Introduction.

  What this is and isn't.


  DNS is is the Domain Name System.  DNS converts machine names to the
  IP addresses that all machines on the net have.  It maps from name to
  address and from address to name, and some other things.  This HOWTO
  documents how to define such mappings using a Linux system.  A mapping
  is simply a association between two things, in this case a machine
  name, like ftp.linux.org, and the machines IP number (or address)
  199.249.150.4.


  DNS is, to the uninitiated (you ;-), one of the more opaque areas of
  network administration.  This HOWTO will try to make a few things
  clearer.  It describes how to set up a simple DNS name server.
  Starting with a caching only server and going on to setting up a
  primary DNS server for a domain.  For more complex setups you can
  check the ``QnA'' section of this document.  If it's not described
  there you will need to read the Real Documentation.  I'll get back to
  what this Real Documentation consists of in ``the last chapter''.


  Before you start on this you should configure your machine so that you
  can telnet in and out of it, and successfully make all kinds of
  connections to the net, and you should especially be able to do telnet
  127.0.0.1 and get your own machine (test it now!).  You also need a
  good /etc/nsswitch.conf (or /etc/host.conf), /etc/resolv.conf and
  /etc/hosts files as a starting point, since I will not explain their
  function here.  If you don't already have all this set up and working
  the NET-3-HOWTO and/or the PPP-HOWTO explains how to set it up.  Read
  them.


  When I say `your machine' I mean the machine you are trying to set up
  DNS on.  Not any other machine you might have that's involved in your
  networking effort.


  I assume you're not behind any kind of firewall that blocks name
  queries.  If you are you will need a special configuration, see the
  section on ``QnA''.


  Name serving on Unix is done by a program called named.  This is a
  part of the ``bind'' package which is coordinated by Paul Vixie for
  The Internet Software Consortium.  Named is included in most Linux
  distributions and is usually installed as /usr/sbin/named.  If you
  have a named you can probably use it; if you don't have one you can
  get a binary off a Linux ftp site, or get the latest and greatest
  source from ftp.isc.org:/isc/bind/src/cur/bind-8/.  This HOWTO is
  about bind version 8.  The old version of the HOWTO, about bind 4 is
  still available at http://www.math.uio.no/~janl/DNS/ in case you use
  bind 4.  If the named man page talks about (at the very end, the FILES
  section) named.conf you have bind 8, if it talks about named.boot you
  have bind 4.  If you have 4 and are security conscious you really
  ought to upgrade to a recent 8.


  DNS is a net-wide database.  Take care about what you put into it.  If
  you put junk into it, you, and others will get junk out of it.  Keep
  your DNS tidy and consistent and you will get good service from it.
  Learn to use it, admin it, debug it and you will be another good admin
  keeping the net from falling to it's knees by mismanagement.


  In this document I state flatly a couple of things that are not
  completely true (they are at least half truths though).  All in the
  interest of simplification.  Things will (probably ;-) work if you
  believe what I say.


  Tip: Make backup copies of all the files I instruct you to change if
  you already have them, so if after going through this nothing works
  you can get it back to your old, working state.


  3.  A caching only name server.

  A first stab at DNS config, very useful for dialup users.


  A caching only name server will find the answer to name queries and
  remember the answer the next time you need it.  This will shorten the
  waiting time the next time significantly, especially if you're on a
  slow connection.


  First you need a file called /etc/named.conf.  This is read when named
  starts.  For now it should simply contain:



  ______________________________________________________________________
  // Config file for caching only name server

  options {
          directory "/var/named";

          // Uncommenting this might help if you have to go through a
          // firewall and things are not working out:

          // query-source port 53;
  };

  zone "." {
          type hint;
          file "root.hints";
  };

  zone "0.0.127.in-addr.arpa" {
          type master;
          file "pz/127.0.0";
  };
  ______________________________________________________________________



  The `directory' line tells named where to look for files.  All files
  named subsequently will be relative to this.  Thus pz is a directory
  under /var/named, i.e., /var/named/pz.  /var/named is the right
  directory according to the Linux File system Standard.


  The file named /var/named/root.hints is named in this.
  /var/named/root.hints should contain this:



  ______________________________________________________________________
  ;
  ; There might be opening comments here if you already have this file.
  ; If not don't worry.
  ;
  .                     6D IN NS        G.ROOT-SERVERS.NET.
  .                     6D IN NS        J.ROOT-SERVERS.NET.
  .                     6D IN NS        K.ROOT-SERVERS.NET.
  .                     6D IN NS        L.ROOT-SERVERS.NET.
  .                     6D IN NS        M.ROOT-SERVERS.NET.
  .                     6D IN NS        A.ROOT-SERVERS.NET.
  .                     6D IN NS        H.ROOT-SERVERS.NET.
  .                     6D IN NS        B.ROOT-SERVERS.NET.
  .                     6D IN NS        C.ROOT-SERVERS.NET.
  .                     6D IN NS        D.ROOT-SERVERS.NET.
  .                     6D IN NS        E.ROOT-SERVERS.NET.
  .                     6D IN NS        I.ROOT-SERVERS.NET.
  .                     6D IN NS        F.ROOT-SERVERS.NET.

  G.ROOT-SERVERS.NET.     5w6d16h IN A    192.112.36.4
  J.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.10
  K.ROOT-SERVERS.NET.     5w6d16h IN A    193.0.14.129
  L.ROOT-SERVERS.NET.     5w6d16h IN A    198.32.64.12
  M.ROOT-SERVERS.NET.     5w6d16h IN A    202.12.27.33
  A.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.4
  H.ROOT-SERVERS.NET.     5w6d16h IN A    128.63.2.53
  B.ROOT-SERVERS.NET.     5w6d16h IN A    128.9.0.107
  C.ROOT-SERVERS.NET.     5w6d16h IN A    192.33.4.12
  D.ROOT-SERVERS.NET.     5w6d16h IN A    128.8.10.90
  E.ROOT-SERVERS.NET.     5w6d16h IN A    192.203.230.10
  I.ROOT-SERVERS.NET.     5w6d16h IN A    192.36.148.17
  F.ROOT-SERVERS.NET.     5w6d16h IN A    192.5.5.241
  ______________________________________________________________________



  The file describes the root name servers in the world.  This changes
  over time and must be maintained.  See the ``maintenance section'' for
  how to keep it up to date.


  The next section in named.conf is the last zone. I will explain its
  use in a later chapter, for now just make this a file named 127.0.0 in
  the subdirectory pz:


  ______________________________________________________________________
  @               IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                                  1       ; Serial
                                  8H      ; Refresh
                                  2H      ; Retry
                                  1W      ; Expire
                                  1D)     ; Minimum TTL
                          NS      ns.linux.bogus.
  1                       PTR     localhost.
  ______________________________________________________________________



  Next, you need a /etc/resolv.conf looking something like this:



  ______________________________________________________________________
  search subdomain.your-domain.edu your-domain.edu
  nameserver 127.0.0.1
  ______________________________________________________________________



  The `search' line specifies what domains should be searched for any
  host names you want to connect to.  The `nameserver' line specifies
  the address of your nameserver, in this case your own machine since
  that is where your named runs (127.0.0.1 is right, no matter if your
  machine has an other address too).  If you want to list several name
  servers put in one `nameserver' line for each. (Note: Named never
  reads this file, the resolver that uses named does.)


  To illustrate what this file does: If a client tries to look up foo,
  then foo.subdomain.your-domain.edu is tried first, then foo.your-
  fomain.edu, finally foo.  If a client tries to look up
  sunsite.unc.edu, sunsite.unc.edu.subdomain.your-domain.edu is tried
  first (yes, it's silly, but that's the way it works), then
  sunsite.unc.edu.your-domain.edu, and finally sunsite.unc.edu.  You may
  not want to put in too many domains in the search line, it takes time
  to search them all.


  The example assumes you belong in the domain subdomain.your-
  domain.edu, your machine then, is probably called your-
  machine.subdomain.your-domain.edu.  The search line should not contain
  your TLD (Top Level Domain, `edu' in this case).  If you frequently
  need to connect to hosts in another domain you can add that domain to
  the search line like this:


  ______________________________________________________________________
  search subdomain.your-domain.edu your-domain.edu other-domain.com
  ______________________________________________________________________



  and so on. Obviously you need to put real domain names in instead.
  Please note the lack of periods at the end of the domain names.  This
  is important, please note the lack of periods at the end of the domain
  names.


  Next, depending on your libc version you either need to fix
  /etc/nsswitch.conf or /etc/host.conf.  If you already have
  nsswitch.conf that's what we'll fix, if not, we'll fix host.conf.


  /etc/nsswitch.conf


  This is a long file specifying where to get different kinds of data
  types, from what file or database.  It usually contains helpful
  comments at the top, which you should consider reading.  After that
  find the line starting with `hosts:', it should read


  ______________________________________________________________________
  hosts:      files dns
  ______________________________________________________________________


  If there is no line starting with `hosts:' then put in the one above.
  It says that programs should first look in the /etc/hosts file, then
  check DNS according to resolv.conf.


  /etc/host.conf


  It probably contains several lines, one should start with order and it
  should look like this:


  ______________________________________________________________________
  order hosts,bind
  ______________________________________________________________________



  If there is no `order' line you should add one.  It tells the host
  name resolving routines to first look in /etc/hosts, then ask the name
  server (which you in resolv.conf said is at 127.0.0.1).


  3.1.  Starting named

  After all this it's time to start named.  If you're using a dialup
  connection connect first.  Type `ndc start', and press return, no
  options.  If that does not work try `/usr/sbin/ndc start' instead.  If
  that back-fires see the ``QnA'' section.  If you view your syslog
  message file (usually called /var/adm/messages, but another directory
  to look in is /var/log and another file to look in is syslog) while
  starting named (do tail -f /var/log/messages) you should see something
  like:


  (the lines ending in \ continue on the next line)



       Feb 15 01:26:17 roke named[6091]: starting.  named 8.1.1 Sat Feb 14 \
         00:18:20 MET 1998 ^Ijanl@roke.uio.no:/var/tmp/bind-8.1.1/src/bin/named
       Feb 15 01:26:17 roke named[6091]: cache zone "" (IN) loaded (serial 0)
       Feb 15 01:26:17 roke named[6091]: master zone "0.0.127.in-addr.arpa" \
         (IN) loaded (serial 1)
       Feb 15 01:26:17 roke named[6091]: listening [127.0.0.1].53 (lo)
       Feb 15 01:26:17 roke named[6091]: listening [129.240.230.92].53 (ippp0)
       Feb 15 01:26:17 roke named[6091]: Forwarding source address is [0.0.0.0].1040
       Feb 15 01:26:17 roke named[6092]: Ready to answer queries.



  If there are any messages about errors then there is a mistake.  Named
  will name the file it is in (one of named.conf and root.hints I hope
  :-) Kill named and go back and check the file.


  Now you can test your setup.  Start nslookup to examine your work.



  $ nslookup
  Default Server:  localhost
  Address:  127.0.0.1

  >



  If that's what you get it's working.  We hope.  Anything else, go back
  and check everything.  Each time you change the named.conf file you
  need to restart named using the ndc restart command.


  Now you can enter a query.  Try looking up some machine close to you.
  pat.uio.no is close to me, at the University of Oslo:



       > pat.uio.no
       Server:  localhost
       Address:  127.0.0.1

       Name:    pat.uio.no
       Address:  129.240.130.16



  nslookup now asked your named to look for the machine pat.uio.no.  It
  then contacted one of the name server machines named in your
  root.hints file, and asked its way from there.  It might take tiny
  while before you get the result as it may need to search all the
  domains you named in /etc/resolv.conf.


  If you ask the same again you get this:



       > pat.uio.no
       Server:  localhost
       Address:  127.0.0.1

       Non-authoritative answer:
       Name:    pat.uio.no
       Address:  129.240.2.50



  Note the ``Non-authoritative answer:'' line we got this time around.
  That means that named did not go out on the network to ask this time,
  the information is in the cache now.  But the cached information might
  be out of date (stale).  So you are informed of this (very slight)
  possibility by it saying `Non-authorative answer:'.  When nslookup
  says this the second time you ask for a host it's a sure sign that
  named caches the information and that it's working.  You exit nslookup
  by giving the command `exit'.



  3.2.  Making it even better

  In large, well organized, academic or ISP (Internet Service Provider)
  networks you will sometimes find that the network people has set up a
  forwarder hierarchy of DNS servers which helps lighten the internal
  network load and on the outside servers as well.  It's not easy to
  know if you're inside such a network or not.  It is however not
  important and by using the DNS server of your network provider as a
  ``forwarder'' you can make the responses to queries faster and less of
  a load on your network.  If you use a modem this can be quite a win.
  For the sake of this example we assume that your network provider has
  two name servers they want you to use, with IP numbers 10.0.0.1 and
  10.1.0.1.  Then, in your named.conf file, inside the opening section
  called ``options'' insert these lines:


  ______________________________________________________________________
             forward first;
             forwarders {
                  10.0.0.1;
                  10.1.0.1;
              };
  ______________________________________________________________________



  Restart your nameserver and test it with nslookup.  Should work fine.


  3.3.  Congratulations

  Now you know how to set up a caching named.  Take a beer, milk, or
  whatever you prefer to celebrate it.


  4.  A simple  domain.

  How to set up your own domain.


  4.1.  But first some dry theory

  Before we really start this section I'm going to serve you some theory
  on and an example of how DNS works.  And you're going to read it
  because it's good for you.  If you don't want to you should at least
  skim it very quickly.  Stop skimming when you get to what should go in
  your named.conf file.


  DNS is a hierarchical, tree structured, system.  The top is written
  `.' and pronounced `root'.  Under . there are a number of Top Level
  Domains (TLDs), the best known ones are ORG, COM, EDU and NET, but
  there are many more.  Just like a tree it has a root and it branches
  out.  If you have any computer science background you will recognize
  DNS as a search tree, and you will be able to find nodes, leaf nodes
  and edges.


  When looking for a machine the query proceeds recursively into the
  hierarchy starting at the top.  If you want to find out the address of
  prep.ai.mit.edu your name server has to find a name server that serves
  edu.  It asks a . server (it already knows the .  servers, that's what
  the root.hints file is for), the .  server gives a list of edu
  servers:

       $ nslookup
       Default Server:  localhost
       Address:  127.0.0.1



  Start asking a root server:



       > server c.root-servers.net.
       Default Server:  c.root-servers.net
       Address:  192.33.4.12



  Set the Query type to NS (name server records):



       > set q=ns



  Ask about edu:



       > edu.



  The trailing . here is significant, it tells nslookup we're asking
  that edu is right under . (and not under any of our search domains, it
  speeds the search).



       edu     nameserver = A.ROOT-SERVERS.NET
       edu     nameserver = H.ROOT-SERVERS.NET
       edu     nameserver = B.ROOT-SERVERS.NET
       edu     nameserver = C.ROOT-SERVERS.NET
       edu     nameserver = D.ROOT-SERVERS.NET
       edu     nameserver = E.ROOT-SERVERS.NET
       edu     nameserver = I.ROOT-SERVERS.NET
       edu     nameserver = F.ROOT-SERVERS.NET
       edu     nameserver = G.ROOT-SERVERS.NET
       A.ROOT-SERVERS.NET      internet address = 198.41.0.4
       H.ROOT-SERVERS.NET      internet address = 128.63.2.53
       B.ROOT-SERVERS.NET      internet address = 128.9.0.107
       C.ROOT-SERVERS.NET      internet address = 192.33.4.12
       D.ROOT-SERVERS.NET      internet address = 128.8.10.90
       E.ROOT-SERVERS.NET      internet address = 192.203.230.10
       I.ROOT-SERVERS.NET      internet address = 192.36.148.17
       F.ROOT-SERVERS.NET      internet address = 192.5.5.241
       G.ROOT-SERVERS.NET      internet address = 192.112.36.4



  This tells us that all ROOT-SERVERS.NET servers serves EDU., so we can
  go on asking any of them.  We'll continue asking C.  Now we want to
  know who serves the next level of the domain name: mit.edu.:



       > mit.edu.
       Server:  c.root-servers.net
       Address:  192.33.4.12

       Non-authoritative answer:
       mit.edu nameserver = W20NS.mit.edu
       mit.edu nameserver = BITSY.mit.edu
       mit.edu nameserver = STRAWB.mit.edu

       Authoritative answers can be found from:
       W20NS.mit.edu   internet address = 18.70.0.160
       BITSY.mit.edu   internet address = 18.72.0.3
       STRAWB.mit.edu  internet address = 18.71.0.151



  steawb, w20ns and bitsy all serves mit.edu, we select one and inquire
  about the name one more level up: ai.mit.edu:



       > server W20NS.mit.edu.



  Host names are not case sensitive, but I use my mouse to cut and paste
  so it gets copied as-is from the screen.



  Server:  W20NS.mit.edu
  Address:  18.70.0.160

  > ai.mit.edu.
  Server:  W20NS.mit.edu
  Address:  18.70.0.160

  Non-authoritative answer:
  ai.mit.edu      nameserver = ALPHA-BITS.AI.MIT.EDU
  ai.mit.edu      nameserver = GRAPE-NUTS.AI.MIT.EDU
  ai.mit.edu      nameserver = TRIX.AI.MIT.EDU
  ai.mit.edu      nameserver = MUESLI.AI.MIT.EDU
  ai.mit.edu      nameserver = LIFE.AI.MIT.EDU
  ai.mit.edu      nameserver = BEET-CHEX.AI.MIT.EDU
  ai.mit.edu      nameserver = MINI-WHEATS.AI.MIT.EDU
  ai.mit.edu      nameserver = COUNT-CHOCULA.AI.MIT.EDU
  ai.mit.edu      nameserver = MINTAKA.LCS.MIT.EDU

  Authoritative answers can be found from:
  AI.MIT.EDU      nameserver = ALPHA-BITS.AI.MIT.EDU
  AI.MIT.EDU      nameserver = GRAPE-NUTS.AI.MIT.EDU
  AI.MIT.EDU      nameserver = TRIX.AI.MIT.EDU
  AI.MIT.EDU      nameserver = MUESLI.AI.MIT.EDU
  AI.MIT.EDU      nameserver = LIFE.AI.MIT.EDU
  AI.MIT.EDU      nameserver = BEET-CHEX.AI.MIT.EDU
  AI.MIT.EDU      nameserver = MINI-WHEATS.AI.MIT.EDU
  AI.MIT.EDU      nameserver = COUNT-CHOCULA.AI.MIT.EDU
  AI.MIT.EDU      nameserver = MINTAKA.LCS.MIT.EDU
  ALPHA-BITS.AI.MIT.EDU   internet address = 128.52.32.5
  GRAPE-NUTS.AI.MIT.EDU   internet address = 128.52.36.4
  TRIX.AI.MIT.EDU internet address = 128.52.37.6
  MUESLI.AI.MIT.EDU       internet address = 128.52.39.7
  LIFE.AI.MIT.EDU internet address = 128.52.32.80
  BEET-CHEX.AI.MIT.EDU    internet address = 128.52.32.22
  MINI-WHEATS.AI.MIT.EDU  internet address = 128.52.54.11
  COUNT-CHOCULA.AI.MIT.EDU        internet address = 128.52.38.22
  MINTAKA.LCS.MIT.EDU     internet address = 18.26.0.36



  So museli.ai.mit.edu is a nameserver for ai.mit.edu:



       > server MUESLI.AI.MIT.EDU
       Default Server:  MUESLI.AI.MIT.EDU
       Address:  128.52.39.7



  Now I change query type, we've found the name server so now we're
  going to ask about everything wheaties knows about prep.ai.mit.edu.



  > set q=any
  > prep.ai.mit.edu.
  Server:  MUESLI.AI.MIT.EDU
  Address:  128.52.39.7

  prep.ai.mit.edu CPU = dec/decstation-5000.25    OS = unix
  prep.ai.mit.edu
          inet address = 18.159.0.42, protocol = tcp
            ftp  telnet  smtp  finger
  prep.ai.mit.edu preference = 1, mail exchanger = gnu-life.ai.mit.edu
  prep.ai.mit.edu internet address = 18.159.0.42
  ai.mit.edu      nameserver = beet-chex.ai.mit.edu
  ai.mit.edu      nameserver = alpha-bits.ai.mit.edu
  ai.mit.edu      nameserver = mini-wheats.ai.mit.edu
  ai.mit.edu      nameserver = trix.ai.mit.edu
  ai.mit.edu      nameserver = muesli.ai.mit.edu
  ai.mit.edu      nameserver = count-chocula.ai.mit.edu
  ai.mit.edu      nameserver = mintaka.lcs.mit.edu
  ai.mit.edu      nameserver = life.ai.mit.edu
  gnu-life.ai.mit.edu     internet address = 128.52.32.60
  beet-chex.ai.mit.edu    internet address = 128.52.32.22
  alpha-bits.ai.mit.edu   internet address = 128.52.32.5
  mini-wheats.ai.mit.edu  internet address = 128.52.54.11
  trix.ai.mit.edu internet address = 128.52.37.6
  muesli.ai.mit.edu       internet address = 128.52.39.7
  count-chocula.ai.mit.edu        internet address = 128.52.38.22
  mintaka.lcs.mit.edu     internet address = 18.26.0.36
  life.ai.mit.edu internet address = 128.52.32.80



  So starting at . we found the successive name servers for the each
  level in the domain name.  If you had used your own DNS server instead
  of using all those other servers, your named would of-course cache all
  the information it found while digging this out for you, and it would
  not have to ask again for a while.


  In the tree analogue each ``.'' in the name is a branching point.  And
  each part between the ``.''s are the names of individual branches in
  the tree.


  We climb the tree by taking the name we want (prep.ai.mit.edu) first
  finding the root (.) and then looking for the next branch to climb, in
  this case edu.  Once we have found it we climb it by switching to the
  server that knows about that part of the name.  Next we look for the
  mit branch over the edu branch (the combined name is mit.edu) and
  climb it by switching to a server that knows about mit.edu.  Again we
  look for the next branch, it's ai.mit.edu and again we switch to the
  server that knows about it.  Now we have arrived at the right server,
  at the right branching point.  The last part is finding
  prep.ai.mit.edu, which is simple.  In computer science we usually call
  prep a leaf on the tree.


  A much less talked about, but just as important domain is in-
  addr.arpa.  It too is nested like the `normal' domains.  in-addr.arpa
  allows us to get the hosts name when we have its address.  A important
  thing here is to note that ip addresses are written in reverse order
  in the in-addr.arpa domain.  If you have the address of a machine:
  192.128.52.43 named proceeds just like for the prep.ai.mit.edu
  example: find arpa. servers.  Find in-addr.arpa. servers, find 192.in-
  addr.arpa. servers, find 128.192.in-addr.arpa. servers, find
  52.128.192.in-addr.arpa.  servers.  Find needed records for
  43.52.128.192.in-addr.arpa.  Clever huh? (Say `yes'.)  The reversion
  of the numbers can be confusing for years though.


  I have just told a lie.  DNS does not work precisely the way I just
  told you.  But it's close enough.


  4.2.  Our own domain

  Now to define our own domain.  We're going to make the domain
  linux.bogus and define machines in it.  I use a totally bogus domain
  name to make sure we disturb no-one Out There.


  One more thing before we start: Not all characters are allowed in host
  names.  We're restricted to the characters of the English alphabet: a-
  z, and numbers: 0-9 and the character '-' (dash).  Keep to those
  characters.  Upper and lower-case characters are the same for DNS, so
  pat.uio.no is identical to Pat.UiO.No.


  We've already started this part with this line in named.conf:


  ______________________________________________________________________
  zone "0.0.127.in-addr.arpa" {
          type master;
          file "pz/127.0.0";
  };
  ______________________________________________________________________



  Please note the lack of `.' at the end of the domain names in this
  file.  This says that now we will define the zone 0.0.127.in-
  addr.arpa, that we're the master server for it and that it is stored
  in a file called pz/127.0.0.  We've already set up this file, it
  reads:


  ______________________________________________________________________
  @               IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                                  1       ; Serial
                                  8H      ; Refresh
                                  2H      ; Retry
                                  1W      ; Expire
                                  1D)     ; Minimum TTL
                          NS      ns.linux.bogus.
  1                       PTR     localhost.
  ______________________________________________________________________



  Please note the `.' at the end of all the full domain names in this
  file, in contrast to the named.conf file above. Some people like to
  start each zone file with a $ORIGIN directive, but this is
  superfluous.  The origin (where in the DNS hierarchy it belongs) of a
  zone file is specified in the zone section of the named.conf file, in
  this case it's 0.0.127.in-addr.arpa.



  This `zone file' contains 3 `resource records' (RRs): A SOA RR.  A NS
  RR and a PTR RR.  SOA is short for Start Of Authority.  The `@' is a
  special notation meaning the origin, and since the `domain' column for
  this file says 0.0.127.in-addr.arpa the first line really means



       0.0.127.in-addr.arpa.   IN      SOA ...



  NS is the Name Server RR.  There is no '@' at the start of this line,
  it is implicit since the last line started with a '@'.  Saves some
  typing that.  So the NS line could also be written



       0.0.127.in-addr.arpa.   IN      NS      ns.linux.bogus



  It tells DNS what machine is the name server of the domain 0.0.127.in-
  addr.arpa, it is ns.linux.bogus.  'ns' is a customary name for name-
  servers, but as with web servers who are customarily named
  www.something the name may be anything.

  And finally the PTR record says that the host at address 1 in the
  subnet 0.0.127.in-addr.arpa, i.e., 127.0.0.1 is named localhost.


  The SOA record is the preamble to all zone files, and there should be
  exactly one in each zone file.  It describes the zone, where it comes
  from (a machine called ns.linux.bogus), who is responsible for its
  contents (hostmaster@linux.bogus, you should insert your e-mail
  address here), what version of the zone file this is (serial: 1), and
  other things having to do with caching and secondary DNS servers.  For
  the rest of the fields (refresh, retry, expire and minimum) use the
  numbers used in this HOWTO and you should be safe.


  Now restart your named (the command is ndc restart) and use nslookup
  to examine what you've done:



       $ nslookup

       Default Server:  localhost
       Address:  127.0.0.1

       > 127.0.0.1
       Server:  localhost
       Address:  127.0.0.1

       Name:    localhost
       Address:  127.0.0.1



  so it manages to get localhost from 127.0.0.1, good.  Now for our main
  task, the linux.bogus domain, insert a new 'zone' section in
  named.conf:


  ______________________________________________________________________
  zone "linux.bogus" {
          notify no;
          type master;
          file "pz/linux.bogus";
  };
  ______________________________________________________________________



  Note again the lack of ending `.' on the domain name in the named.conf
  file.


  In the linux.bogus zone file we'll put some totally bogus data:


  ______________________________________________________________________
  ;
  ; Zone file for linux.bogus
  ;
  ; The full zone file
  ;
  @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                          199802151       ; serial, todays date + todays serial #
                          8H              ; refresh, seconds
                          2H              ; retry, seconds
                          1W              ; expire, seconds
                          1D )            ; minimum, seconds
  ;
                  NS      ns              ; Inet Address of name server
                  MX      10 mail.linux.bogus     ; Primary Mail Exchanger
                  MX      20 mail.friend.bogus.   ; Secondary Mail Exchanger
  ;
  localhost       A       127.0.0.1
  ns              A       192.168.196.2
  mail            A       192.168.196.4
  ______________________________________________________________________



  Two things must be noted about the SOA record.  ns.linux.bogus must be
  a actual machine with a A record.  It is not legal to have a CNAME
  record for he machine mentioned in the SOA record.  It's name need not
  be `ns', it could be any legal host name.  Next,
  hostmaster.linux.bogus should be read as hostmaster@linux.bogus, this
  should be a mail alias, or a mailbox, where the person(s) maintaining
  DNS should read mail frequently.  Any mail regarding the domain will
  be sent to the address listed here.  The name need not be
  `hostmaster', it can be your normal e-mail address, but the e-mail
  address `hostmaster' is often expected to work as well.


  There is one new RR type in this file, the MX, or Mail eXchanger RR.
  It tells mail systems where to send mail that is addressed to
  someone@linux.bogus, namely too mail.linux.bogus or mail.friend.bogus.
  The number before each machine name is that MX RRs priority.  The RR
  with the lowest number (10) is the one mail should be sent to if
  possible.  If that fails the mail can be sent to one with a higher
  number, a secondary mail handler, i.e., mail.friend.bogus which has
  priority 20 here.
  Restart named by running ndc restart.  Examine the results with
  nslookup:



       $ nslookup
       > set q=any
       > linux.bogus
       Server:  localhost
       Address:  127.0.0.1

       linux.bogus
               origin = ns.linux.bogus
               mail addr = hostmaster.linux.bogus
               serial = 199802151
               refresh = 28800 (8 hours)
               retry   = 7200 (2 hours)
               expire  = 604800 (7 days)
               minimum ttl = 86400 (1 day)
       linux.bogus     nameserver = ns.linux.bogus
       linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus
       linux.bogus     preference = 20, mail exchanger = mail.friend.bogus
       linux.bogus     nameserver = ns.linux.bogus
       ns.linux.bogus  internet address = 192.168.196.2
       mail.linux.bogus        internet address = 192.168.196.4



  Upon careful examination you will discover a bug.  The line



       linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus



  is all wrong.  It should be



       linux.bogus     preference = 10, mail exchanger = mail.linux.bogus



  I deliberately made a mistake so you could learn from it :-) Looking
  in the zone file we find that the line



                       MX      10 mail.linux.bogus     ; Primary Mail Exchanger



  is missing a period.  Or has a 'linux.bogus' too many.  If a machine
  name does not end in a period in a zone file the origin is added to
  its end causing the double linux.bogus.linux.bogus.  So either



  ______________________________________________________________________
                  MX      10 mail.linux.bogus.    ; Primary Mail Exchanger
  ______________________________________________________________________



  or


  ______________________________________________________________________
                  MX      10 mail                 ; Primary Mail Exchanger
  ______________________________________________________________________



  is correct.  I prefer the latter form, it's less to type.  There are
  some bind experts that disagree, and some that agree with this.  In a
  zone file the domain should either be written out and ended with a `.'
  or it should not be included at all, in which case it defaults to the
  origin.


  I must stress that in the named.conf file there should not be `.'s
  after the domain names.  You have no idea how many times a `.' too
  many or few have fouled up things and confused the h*ll out of people.


  So having made my point here is the new zone file, with some extra
  information in it as well:



  ______________________________________________________________________
  ;
  ; Zone file for linux.bogus
  ;
  ; The full zone file
  ;
  @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                          199802151       ; serial, todays date + todays serial #
                          8H              ; refresh, seconds
                          2H              ; retry, seconds
                          1W              ; expire, seconds
                          1D )            ; minimum, seconds
  ;
                  TXT     "Linux.Bogus, your DNS consultants"
                  NS      ns              ; Inet Address of name server
                  NS      ns.friend.bogus.
                  MX      10 mail         ; Primary Mail Exchanger
                  MX      20 mail.friend.bogus. ; Secondary Mail Exchanger

  localhost       A       127.0.0.1

  gw              A       192.168.196.1
                  HINFO   "Cisco" "IOS"
                  TXT     "The router"

  ns              A       192.168.196.2
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "Pentium" "Linux 2.0"
  www             CNAME   ns

  donald          A       192.168.196.3
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "i486"      "Linux 2.0"
                  TXT     "DEK"

  mail            A       192.168.196.4
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "386sx" "Linux 1.2"

  ftp             A       192.168.196.5
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "P6" "Linux 2.1.86"
  ______________________________________________________________________



  There are a number of new RRs here: HINFO (Host INFOrmation) has two
  parts, it's a good habit to quote each.  The first part is the
  hardware or CPU on the machine, and the second part the software or OS
  on the machine.  The machine called 'ns' has a Pentium CPU and runs
  Linux 2.0.  CNAME (Canonical NAME) is a way to give each machine
  several names.  So www is an alias for ns.


  CNAME record usage is a bit controversial.  But it's safe to follow
  the rule that a MX, CNAME or SOA record should never refer to a CNAME
  record, they should only refer to something with a A record, so it is
  inadvisable to have



  ______________________________________________________________________
  foobar          CNAME   www                     ; NO!
  ______________________________________________________________________



  but correct to have


  ______________________________________________________________________
  foobar          CNAME   ns                      ; Yes!
  ______________________________________________________________________



  It's also safe to assume that a CNAME is not a legal host name for a
  e-mail address: webmaster@www.linux.bogus is an illegal e-mail address
  given the setup above.  You can expect quite a few mail admins Out
  There to enforce this rule even if it works for you.  The way to avoid
  this is to use A records (and perhaps some others too, like a MX
  record) instead:


  ______________________________________________________________________
  www             A       192.168.196.2
  ______________________________________________________________________



  A number of the arch-bind-wizards, recommend not using CNAME at all.
  But the discussion of why or why not is beyond this HOWTO.


  But as you see, this HOWTO and many sites does not follow this rule.


  Load the new database by running ndc reload, this causes named to read
  its files again.



       $ nslookup
       Default Server:  localhost
       Address:  127.0.0.1

       > ls -d linux.bogus



  This means that all records should be listed.  It results in this:



  [localhost]
  $ORIGIN linux.bogus.
  @                       1D IN SOA       ns hostmaster (
                                          199802151       ; serial
                                          8H              ; refresh
                                          2H              ; retry
                                          1W              ; expiry
                                          1D )            ; minimum

                          1D IN NS        ns
                          1D IN NS        ns.friend.bogus.
                          1D IN TXT       "Linux.Bogus, your DNS consultants"
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
  gw                      1D IN A         192.168.196.1
                          1D IN HINFO     "Cisco" "IOS"
                          1D IN TXT       "The router"
  mail                    1D IN A         192.168.196.4
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "386sx" "Linux 1.0.9"
  localhost               1D IN A         127.0.0.1
  www                     1D IN CNAME     ns
  donald                  1D IN A         192.168.196.3
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "i486" "Linux 1.2"
                          1D IN TXT       "DEK"
  ftp                     1D IN A         192.168.196.5
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "P6" "Linux 1.3.59"
  ns                      1D IN A         192.168.196.2
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "Pentium" "Linux 1.2"



  That's good.  As you see it looks a lot like the zone file itself.
  Let's check what it says for www alone:



       > set q=any
       > www.linux.bogus.
       Server:  localhost
       Address:  127.0.0.1

       www.linux.bogus canonical name = ns.linux.bogus
       linux.bogus     nameserver = ns.linux.bogus
       linux.bogus     nameserver = ns.friend.bogus
       ns.linux.bogus  internet address = 192.168.196.2



  In other words, the real name of www.linux.bogus is ns.linux.bogus,
  and it gives you some of the information it has about ns as well,
  enough to connect to it if you were a program.



  Now we're halfway.


  4.3.  The reverse zone

  Now programs can convert the names in linux.bogus to addresses which
  they can connect to.  But also required is a reverse zone, one making
  DNS able to convert from an address to a name.  This name is used buy
  a lot of servers of different kinds (FTP, IRC, WWW and others) to
  decide if they want to talk to you or not, and if so, maybe even how
  much priority you should be given.  For full access to all services on
  the Internet a reverse zone is required.


  Put this in named.conf:


  ______________________________________________________________________
  zone "196.168.192.in-addr.arpa" {
          notify no;
          type master;
          file "pz/192.168.196";
  };
  ______________________________________________________________________



  This is exactly as with the 0.0.127.in-addr.arpa, and the contents are
  similar:


  ______________________________________________________________________
  @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                          199802151 ; Serial, todays date + todays serial
                          8H      ; Refresh
                          2H      ; Retry
                          1W      ; Expire
                          1D)     ; Minimum TTL
                  NS      ns.linux.bogus.

  1               PTR     gw.linux.bogus.
  2               PTR     ns.linux.bogus.
  3               PTR     donald.linux.bogus.
  4               PTR     mail.linux.bogus.
  5               PTR     ftp.linux.bogus.
  ______________________________________________________________________



  Now you restart your named (ndc restart) and examine your work with
  nslookup again:


  ______________________________________________________________________
  > 192.168.196.4
  Server:  localhost
  Address:  127.0.0.1

  Name:    mail.linux.bogus
  Address:  192.168.196.4
  ______________________________________________________________________



  so, it looks OK, dump the whole thing to examine that too:


  ______________________________________________________________________
  > ls -d 196.168.192.in-addr.arpa
  [localhost]
  $ORIGIN 196.168.192.in-addr.arpa.
  @                       1D IN SOA       ns.linux.bogus. hostmaster.linux.bogus. (
                                          199802151       ; serial
                                          8H              ; refresh
                                          2H              ; retry
                                          1W              ; expiry
                                          1D )            ; minimum

                          1D IN NS        ns.linux.bogus.
  1                       1D IN PTR       gw.linux.bogus.
  2                       1D IN PTR       ns.linux.bogus.
  3                       1D IN PTR       donald.linux.bogus.
  4                       1D IN PTR       mail.linux.bogus.
  5                       1D IN PTR       ftp.linux.bogus.
  @                       1D IN SOA       ns.linux.bogus. hostmaster.linux.bogus. (
                                          199802151       ; serial
                                          8H              ; refresh
                                          2H              ; retry
                                          1W              ; expiry
                                          1D )            ; minimum
  ______________________________________________________________________



  Looks good!  If your output didn't look like that look for error-
  messages in your syslog, I explained how to do that at the very
  beginning of this chapter.


  4.4.  Words of caution

  There are some things I should add here.  The IP numbers used in the
  examples above are taken from one of the blocks of 'private nets',
  i.e., they are not allowed to be used publicly on the internet.  So
  they are safe to use in an example in a HOWTO.  The second thing is
  the notify no; line.  It tells named not to notify its secondary
  (slave) servers when it has gotten a update to one of its zone files.
  In bind-8 the named can notify the other servers listed in NS records
  in the zone file when a zone is updated.  This is handy for ordinary
  use, but for private experiments with zones this feature should be
  off, we don't want the experiment to pollute the Internet do we?


  And, of course, this domain is highly bogus, and so are all the
  addresses in it.  For a real example of a real-life domain see the
  next main-section.


  4.5.  Why reverse lookups don't work.

  There are a couple of ``gotchas'' that normally are avoided with name
  lookups that are often seen when setting up reverse zones.  Before you
  go on you need reverse lookups of your machines working on your own
  nameserver.  If it isn't go back and fix it before continuing.


  I will discuss two failures of reverse lookups as seen from outside
  your network:

  4.5.1.  The reverse zone isn't delegated.

  When you ask a service provider for a network-address range and a
  domain name the domain name is normally delegated as a matter of
  course.  A delegation is the glue NS record that helps you get from
  one nameserver to another as explained in the dry theory section
  above.  You read that, right?  If your reverse zone dosn't work go
  back and read it.  Now.


  The reverse zone also needs to be delegated.  If you got the
  192.168.196 net with the linux.bogus domain from your provider they
  need to put NS records in for your reverse zone as well as for your
  forward zone.  If you follow the chain from in-addr.arpa and up to
  your net you will probably find a break in the chain.  Most probably
  at your service provider.  Having found the break in the chain contact
  your service-provider and ask them to correct the error.


  4.5.2.  You've got a classless subnet

  This is a somewhat advanced topic, but classless subnets are very
  common these days and you probably have one unless you're a medium
  sized company.


  A classless subnet is what keeps the Internet going these days.  Some
  years ago there was much ado about the shortage of ip numbers.  The
  smart people in IETF (the Internet Engineering Task Force, they keep
  the Internet working) stuck their heads together and solved the
  problem.  At a price.  The price is that you'll get less than a ``C''
  subnet and some things may break.  Please see Ask Mr. DNS at
  http://www.acmebw.com/askmrdns/00007.htm for an good explanation of
  this and how to handle it.


  Did you read it?  I'm not going to explain it so please read it.


  The first part of the problem is that your ISP must understand the
  technique described by Mr. DNS.  Not all small ISPs have a working
  understanding of this.  If so you might have to explain to them and be
  persistent.  But be sure you understand it first ;-).  They will then
  set up a nice reverse zone at their server which you can examine for
  correctness with nslookup.


  The second and last part of the problem is that you must understand
  the technique.  If you're unsure go back and read about it again.
  Then you can set up your own classless reverse zone as described by
  Mr. DNS.


  There is another trap lurking here.  Old resolvers will not be able to
  follow the CNAME trick in the resolving chain and will fail to
  reverse-resolve your machine.  This can result in the service
  assigning it an incorrect access class, deny access or something along
  those lines.  If you stumble into such a service the only solution
  (that I know of) is for your ISP to insert your PTR record directly
  into their trick classless zone file instead of the trick CNAME
  record.


  Some ISPs will offer other ways to handle this, like Web based forms
  for you to input your reverse-mappings in or other automagical
  systems.
  5.  A real domain example

  Where we list some real zone files


  Users have suggested that I include a real example of a working domain
  as well as the tutorial example.


  I use this example with permission from David Bullock of LAND-5.
  These files were current 24th of September 1996, and were then edited
  to fit bind 8 restrictions and use extensions by me.  So, what you see
  here differs a bit from what you find if you query LAND-5's name
  servers now.


  5.1.  /etc/named.conf (or /var/named/named.conf)

  Here we find master zone sections for the two reverse zones needed:
  the 127.0.0 net, as well as LAND-5's 206.6.177 subnet. And a primary
  line for land-5's forward zone land-5.com. Also note that instead of
  stuffing the files in a directory called pz, as I do in this HOWTO, he
  puts them in a directory called zone.


  ______________________________________________________________________
  // Boot file for LAND-5 name server

  options {
          directory "/var/named";
  };

  zone "." {
          type hint;
          file "root.hints";
  };

  zone "0.0.127.in-addr.arpa" {
          type master;
          file "zone/127.0.0";
  };

  zone "land-5.com" {
          type master;
          file "zone/land-5.com";
  };

  zone "177.6.206.in-addr.arpa" {
          type master;
          file "zone/206.6.177";
  };
  ______________________________________________________________________



  If you put this in your named.conf file to play with PLEASE put
  ``notify no;'' in the zone sections for the two land-5 zones so as to
  avoid accidents.


  5.2.  /var/named/root.hints

  Keep in mind that this file is dynamic, and the one listed here is
  old. You're better off using one produced now, with dig, as explained
  earlier.
  ______________________________________________________________________
  ; <<>> DiG 8.1 <<>> @A.ROOT-SERVERS.NET.
  ; (1 server found)
  ;; res options: init recurs defnam dnsrch
  ;; got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10
  ;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
  ;; QUERY SECTION:
  ;;      ., type = NS, class = IN

  ;; ANSWER SECTION:
  .                     6D IN NS        G.ROOT-SERVERS.NET.
  .                     6D IN NS        J.ROOT-SERVERS.NET.
  .                     6D IN NS        K.ROOT-SERVERS.NET.
  .                     6D IN NS        L.ROOT-SERVERS.NET.
  .                     6D IN NS        M.ROOT-SERVERS.NET.
  .                     6D IN NS        A.ROOT-SERVERS.NET.
  .                     6D IN NS        H.ROOT-SERVERS.NET.
  .                     6D IN NS        B.ROOT-SERVERS.NET.
  .                     6D IN NS        C.ROOT-SERVERS.NET.
  .                     6D IN NS        D.ROOT-SERVERS.NET.
  .                     6D IN NS        E.ROOT-SERVERS.NET.
  .                     6D IN NS        I.ROOT-SERVERS.NET.
  .                     6D IN NS        F.ROOT-SERVERS.NET.

  ;; ADDITIONAL SECTION:
  G.ROOT-SERVERS.NET.     5w6d16h IN A    192.112.36.4
  J.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.10
  K.ROOT-SERVERS.NET.     5w6d16h IN A    193.0.14.129
  L.ROOT-SERVERS.NET.     5w6d16h IN A    198.32.64.12
  M.ROOT-SERVERS.NET.     5w6d16h IN A    202.12.27.33
  A.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.4
  H.ROOT-SERVERS.NET.     5w6d16h IN A    128.63.2.53
  B.ROOT-SERVERS.NET.     5w6d16h IN A    128.9.0.107
  C.ROOT-SERVERS.NET.     5w6d16h IN A    192.33.4.12
  D.ROOT-SERVERS.NET.     5w6d16h IN A    128.8.10.90
  E.ROOT-SERVERS.NET.     5w6d16h IN A    192.203.230.10
  I.ROOT-SERVERS.NET.     5w6d16h IN A    192.36.148.17
  F.ROOT-SERVERS.NET.     5w6d16h IN A    192.5.5.241

  ;; Total query time: 215 msec
  ;; FROM: roke.uio.no to SERVER: A.ROOT-SERVERS.NET.  198.41.0.4
  ;; WHEN: Sun Feb 15 01:22:51 1998
  ;; MSG SIZE  sent: 17  rcvd: 436
  ______________________________________________________________________



  5.3.  /var/named/zone/127.0.0

  Just the basics, the obligatory SOA record, and a record that maps
  127.0.0.1 to localhost.  Both are required.  No more should be in this
  file.  It will probably never need to be updated, unless your
  nameserver or hostmaster address changes.



  ______________________________________________________________________
  @               IN      SOA     land-5.com. root.land-5.com. (
                                  199609203       ; Serial
                                  28800   ; Refresh
                                  7200    ; Retry
                                  604800  ; Expire
                                  86400)  ; Minimum TTL
                          NS      land-5.com.

  1                       PTR     localhost.
  ______________________________________________________________________



  5.4.  /var/named/zone/land-5.com

  Here we see the mandatory SOA record, the needed NS records.  We can
  see that he has a secondary name server at ns2.psi.net.  This is as it
  should be, always have a off site secondary server as backup.  We can
  also see that he has a master host called land-5 which takes care of
  many of the different Internet services, and that he's done it with
  CNAMEs (a alternative is using A records).


  As you see from the SOA record, the zone file originates at
  land-5.com, the contact person is root@land-5.com. hostmaster is
  another oft used address for the contact person.  The serial number is
  in the customary yyyymmdd format with todays serial number appended;
  this is probably the sixth version of zone file on the 20th of
  September 1996.  Remember that the serial number must increase
  monotonically, here there is only one digit for todays serial#, so
  after 9 edits he has to wait until tomorrow before he can edit the
  file again.  Consider using two digits.



  ______________________________________________________________________
  @       IN      SOA     land-5.com. root.land-5.com. (
                          199609206       ; serial, todays date + todays serial #
                          8H              ; refresh, seconds
                          2H              ; retry, seconds
                          1W              ; expire, seconds
                          1D )            ; minimum, seconds
                  NS      land-5.com.
                  NS      ns2.psi.net.
                  MX      10 land-5.com.  ; Primary Mail Exchanger
                  TXT     "LAND-5 Corporation"

  localhost       A       127.0.0.1

  router          A       206.6.177.1

  land-5.com.     A       206.6.177.2
  ns              A       206.6.177.3
  www             A       207.159.141.192

  ftp             CNAME   land-5.com.
  mail            CNAME   land-5.com.
  news            CNAME   land-5.com.

  funn            A       206.6.177.2

  ;
  ;       Workstations
  ;
  ws-177200       A       206.6.177.200
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177201       A       206.6.177.201
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177202       A       206.6.177.202
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177203       A       206.6.177.203
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177204       A       206.6.177.204
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177205       A       206.6.177.205
                  MX      10 land-5.com.   ; Primary Mail Host
  ; {Many repetitive definitions deleted - SNIP}
  ws-177250       A       206.6.177.250
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177251       A       206.6.177.251
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177252       A       206.6.177.252
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177253       A       206.6.177.253
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177254       A       206.6.177.254
                  MX      10 land-5.com.   ; Primary Mail Host
  ______________________________________________________________________



  If you examine land-5s nameserver you will find that the host names
  are of the form ws_number.  As of late bind 4 versions named started
  enforcing the restrictions on what characters may be used in host
  names.  So that does not work with bind-8 at all, and I substituted
  '-' (dash) for '_' (underline) for use in this HOWTO.


  Another thing to note is that the workstations don't have individual
  names, but rather a prefix followed by the two last parts of the IP
  numbers.  Using such a convention can simplify maintenance
  significantly, but can be a bit impersonal, and, in fact, be a source
  of irritation among your customers.


  We also see that funn.land-5.com is an alias for land-5.com, but using
  an A record, not a CNAME record.  This is a good policy as noted
  earlier.


  5.5.  /var/named/zone/206.6.177

  I'll comment on this file below


  ______________________________________________________________________
  @               IN      SOA     land-5.com. root.land-5.com. (
                                  199609206       ; Serial
                                  28800   ; Refresh
                                  7200    ; Retry
                                  604800  ; Expire
                                  86400)  ; Minimum TTL
                          NS      land-5.com.
                          NS      ns2.psi.net.
  ;
  ;       Servers
  ;
  1       PTR     router.land-5.com.
  2       PTR     land-5.com.
  2       PTR     funn.land-5.com.
  ;
  ;       Workstations
  ;
  200     PTR     ws-177200.land-5.com.
  201     PTR     ws-177201.land-5.com.
  202     PTR     ws-177202.land-5.com.
  203     PTR     ws-177203.land-5.com.
  204     PTR     ws-177204.land-5.com.
  205     PTR     ws-177205.land-5.com.
  ; {Many repetitive definitions deleted - SNIP}
  250     PTR     ws-177250.land-5.com.
  251     PTR     ws-177251.land-5.com.
  252     PTR     ws-177252.land-5.com.
  253     PTR     ws-177253.land-5.com.
  254     PTR     ws-177254.land-5.com.
  ______________________________________________________________________



  The reverse zone is the bit of the setup that seems to cause the most
  grief.  It is used to find the host name if you have the IP number of
  a machine.  Example: you are an IRC server and accept connections from
  IRC clients.  However you are a Norwegian IRC server and so you only
  want to accept connections from clients in Norway and other
  Scandinavian countries.  When you get a connection from a client the C
  library is able to tell you the IP number of the connecting machine
  because the IP number of the client is contained in all the packets
  that are passed over the network.  Now you can call a function called
  gethostbyaddr that looks up the name of a host given the IP number.
  Gethostbyaddr will ask a DNS server, which will then traverse the DNS
  looking for the machine.  Supposing the client connection is from
  ws-177200.land-5.com.  The IP number the C library provides to the IRC
  server is 206.6.177.200.  To find out the name of that machine we need
  to find 200.177.6.206.in-addr.arpa.  The DNS server will first find
  the arpa. servers, then find in-addr.arpa.  servers, following the
  reverse trail through 206, then 6 and at last finding the server for
  the 177.6.206.in-addr.arpa zone at LAND-5.  From which it will finally
  get the answer that for 200.177.6.206.in-addr.arpa we have a ``PTR
  ws-177200.land-5.com'' record, meaning that the name that goes with
  206.6.177.200 is ws-177200.land-5.com.  As with the explanation of how
  prep.ai.mit.edu is looked up, this is slightly fictitious.


  Getting back to the IRC server example.  The IRC server only accepts
  connections from the Scandinavian countries, i.e., *.no, *.se, *.dk,
  the name ws-177200.land-5.com clearly does not match any of those, and
  the server will deny the connection.  If there was no reverse mapping
  of 206.2.177.200 through the in-addr.arpa zone the server would have
  been unable to find the name at all and would have to settle to
  comparing 206.2.177.200 with *.no, *.se and *.dk, none of which will
  match.


  Some people will tell you that reverse lookup mappings are only
  important for servers, or not important at all.  Not so: Many ftp,
  news, IRC and even some http (WWW) servers will not accept connections
  from machines of which they are not able to find the name.  So reverse
  mappings for machines are in fact mandatory.


  6.  Maintenance

  Keeping it working.


  There is one maintenance task you have to do on nameds, other than
  keeping them running.  That's keeping the root.hints file updated.
  The easiest way is using dig, first run dig with no arguments, you
  will get the root.hints according to your own server.  Then ask one of
  the listed root servers with dig @rootserver.  You will note that the
  output looks terribly like a root.hints file.  Save it to a file (dig
  @e.root-servers.net . ns >root.hints.new) and replace the old
  root.hints with it.


  Remember to reload named after replacing the cache file.


  Al Longyear sent me this script, that can be run automatically to
  update root.hints, install a crontab entry to run it once a month and
  forget it.  The script assumes you have mail working and that the
  mail-alias `hostmaster' is defined.  You must hack it to suit your
  setup.



  ______________________________________________________________________
  #!/bin/sh
  #
  # Update the nameserver cache information file once per month.
  # This is run automatically by a cron entry.
  #
  # Original by Al Longyear
  # Updated for bind 8 by Nicolai Langfeldt
  # Miscelanious error-conditions reported by David A. Ranch
  # Ping test suggested by Martin Foster
  #
  (
   echo "To: hostmaster <hostmaster>"
   echo "From: system <root>"
   echo "Subject: Automatic update of the root.hints file"
   echo

   PATH=/sbin:/usr/sbin:/bin:/usr/bin:
   export PATH
   cd /var/named

   # Are we online?  Ping a server at your ISP
   case `ping -qnc some.machine.net` in
     *'100% packet loss'*)
          echo "The network is DOWN. root.hints NOT updated"
          echo
          exit 0
          ;;
   esac

   dig @rs.internic.net . ns >root.hints.new 2>&1

   case `cat root.hints.new` in
     *NOERROR*)
          # It worked
          :;;
     *)
          echo "The root.hints file update has FAILED."
          echo "This is the dig output reported:"
          echo
          cat root.hints.new
          exit 0
          ;;
   esac

   echo "The root.hints file has been updated to contain the following
  information:"
   echo
   cat root.hints.new

   chown root.root root.hints.new
   chmod 444 root.hints.new
   rm -f root.hints.old
   mv root.hints root.hints.old
   mv root.hints.new root.hints
   ndc restart
   echo
   echo "The nameserver has been restarted to ensure that the update is complete."
   echo "The previous root.hints file is now called
  /var/named/root.hints.old."
  ) 2>&1 | /usr/lib/sendmail -t
  exit 0
  ______________________________________________________________________



  Some of you might have picked up that the root.hints file is also
  available by ftp from Internic.  Please don't use ftp to update
  root.hints, the above method is much more friendly to the net, and
  Internic.


  7.  Converting from version 4 to version 8

  This was originally a section on using bind 8 written by David E.
  Smith (dave@bureau42.ml.org).  I have edited it some to fit the new
  section name.


  There's not much to it. Except for using named.conf instead of
  named.boot, everything is identical. And bind8 comes with a perl
  script that converts old-style files to new. Example named.boot (old
  style) for a cache-only name server:


  ______________________________________________________________________
  directory /var/named
  cache   .                                     root.hints
  primary 0.0.127.IN-ADDR.ARPA                    127.0.0.zone
  primary localhost                               localhost.zone
  ______________________________________________________________________



  On the command line, in the bind8/src/bin/named directory (this
  assumes you got a source distribution.  If you got a binary package
  the script is probably around, I'm not sure where it would be though.
  -ed.), type:


  ______________________________________________________________________
  ./named-bootconf.pl < named.boot > named.conf
  ______________________________________________________________________



  Which creates named.conf:


  ______________________________________________________________________
  // generated by named-bootconf.pl

  options {
          directory "/var/named";
  };

  zone "." {
          type hint;
          file "root.hints";
  };

  zone "0.0.127.IN-ADDR.ARPA" {
          type master;
          file "127.0.0.zone";
  };

  zone "localhost" {
          type master;
          file "localhost.zone";
  };
  ______________________________________________________________________

  It works for everything that can go into a named.boot file, although
  it doesn't add all of the new enhancements and configuration options
  that bind8 allows.  Here's a more complete named.conf that does the
  same things, but a little more efficiently.


  ______________________________________________________________________
  // This is a configuration file for named (from BIND 8.1 or later).
  // It would normally be installed as /etc/named.conf.
  // The only change made from the `stock' named.conf (aside from this
  // comment :) is that the directory line was uncommented, since I
  // already had the zone files in /var/named.

  options {
          directory "/var/named";
          datasize 20M;
  };

  zone "localhost" IN {
          type master;
          file "localhost.zone";
  };

  zone "0.0.127.in-addr.arpa" IN {
          type master;
          file "127.0.0.zone";
  };

  zone "." IN {
          type hint;
          file "root.hints";
  };
  ______________________________________________________________________



  In the bind 8 distributions directory bind8/src/bin/named/test you
  find this, and copies of the zone files, that many people can just
  drop in and use instantly.


  The formats for zone files and root.hints files are identical, as are
  the commands for updating them.


  8.  Questions and Answers

  Please read this section before mailing me.


  1. My named wants a named.boot file


     You are reading the wrong HOWTO.  Please see the old version of
     this HOWTO, which covers bind 4, at
     http://www.math.uio.no/~janl/DNS/


  2. How do use DNS from inside a firewall?


     A hint: forward only;, You will probably also need



     ___________________________________________________________________
       query-source port 53;

     ___________________________________________________________________



  inside the ``options'' part of the named.conf file as suggested in the
  example ``caching'' section.


  3. How do I make DNS rotate through the available addresses for a
     service, say www.busy.site to obtain a load balancing effect, or
     similar?


     Make several A records for www.busy.site and use bind 4.9.3 or
     later.  Then bind will round-robin the answers.  It will not work
     with earlier versions of bind.


  4. I want to set up DNS on a (closed) intranet.  What do I do?


     You drop the root.hints file and just do zone files.  That also
     means you don't have to get new hint files all the time.


  5. How do I set up a secondary (slave) name server?


     If the primary/master server has address 127.0.0.1 you put a line
     like this in the named.conf file of your secondary:


     ___________________________________________________________________
       zone "linux.bogus" {
             type slave;
             file "sz/linux.bogus";
             masters { 127.0.0.1; };
       };

     ___________________________________________________________________



  You may list several alternate master servers the zone can be copied
  from inside the masters list, separated by ';' (semicolon).


  6. I want bind running when I'm disconnected from the net.


     There are three items regarding this:


  o  I have received this mail from Ian Clark <ic@deakin.edu.au> where
     he explains his way of doing this:



  I run named on my 'Masquerading' machine here. I have
  two root.hints files, one called root.hints.real which contains
  the real root server names and the other called root.hints.fake
  which contains...

  ----
  ; root.hints.fake
  ; this file contains no information
  ----

  When I go off line I copy the root.hints.fake file to root.hints and
  restart named.

  When I go online I copy root.hints.real to root.hints and restart
  named.

  This is done from ip-down & ip-up respectively.

  The first time I do a query off line on a domain name named doesn't
  have details for it puts an entry like this in messages..

  Jan 28 20:10:11 hazchem named[10147]: No root nameserver for class IN

  which I can live with.

  It certainly seems to work for me. I can use the nameserver for
  local machines while off the 'net without the timeout delay for
  external domain names and I while on the 'net queries for external
  domains work normally



  o  I have also received information about how bind interacts with NFS
     and the portmapper on a mostly offline machine from Karl-Max
     Wanger:



       I use to run my own named on all my machines which are only
       occasionally connected to the Internet by modem. The nameserver only
       acts as a cache, it has no area of authority and asks back for
       everything at the name servers in the root.cache file. As is usual with
       Slackware, it is started before nfsd and mountd.

       With one of my machines (a Libretto 30 notebook) I had the problem
       that sometimes I could mount it from another system connected to my
       local LAN, but most of the time it didn't work.  I had the same effect
       regardless of using PLIP, a PCMCIA ethernet card or PPP over a serial
       interface.

       After some time of guessing and experimenting I found out that
       apparently named messed with the process of registration nfsd and
       mountd have to carry out with the portmapper upon startup (I start
       these daemons at boot time as usual). Starting named after nfsd and
       mountd eliminated this problem completely.

       As there are no disadvantages to expect from such a modified boot
       sequence I'd advise everybody to do it that way to prevent potential
       trouble.



  o  Finally, there is HOWTO information about this at Ask Mr. DNS at
     http://www.acmebw.com/askmrdns/#linux-ns.  It is about bind 4
     though, so you have to adapt what he says to bind 8.



  7. Where does the caching name server store its cache? Is there any
     way I can control the size of the cache?


     The cache is completely stored in memory, it is not written to disk
     at any time.  Every time you kill named the cache is lost.  The
     cache is not controllable in any way.  named manages it according
     to some simple rules and that is it.  You cannot control the cache
     or the cache size in any way for any reason. If you want to you can
     ``fix'' this by hacking named.  This is however not recommended.


  8. Does named save the cache between restarts?  Can I make it save it?


     No, named does not save the cache when it dies.  That means that
     the cache must be built anew each time you kill and restart named.
     There is no way to make named save the cache in a file.  If you
     want you can ``fix'' this by hacking named.  This is however not
     recommended.


  9. How can I get a domian? I want to set up my own domain called (for
     example) linux-rules.net.  How can I get the domain I want assigned
     to me?


     Please contact your network service provider.  They will be able to
     help you with this.  Please note that in most parts of the world
     you need to pay money to get a domain.



  9.  How to become a bigger time DNS admin.

  Documentation and tools.


  Real Documentation exists.  Online and in print.  The reading of
  several of these is required to make the step from small time DNS
  admin to a big time one.  In print the standard book is DNS and BIND
  by C. Liu and P. Albitz from O'Reilly & Associates, Sebastopol, CA,
  ISBN 0-937175-82-X.  I read this, it's excellent, though based on bind
  4, this is not a real problem though.  There is also a section in on
  DNS in TCP/IP Network Administration, by Craig Hunt from O'Reilly...,
  ISBN 0-937175-82-X.  Another must for Good DNS administration (or good
  anything for that matter) is Zen and the Art of Motorcycle Maintenance
  by Robert M. Pirsig :-) Available as ISBN 0688052304 and others.


  Online you will find stuff on  <http://www.dns.net/dnsrd/> (DNS
  Resources Directory),  <http://www.isc.org/bind.html>; A FAQ, a
  reference manual (BOG; Bind Operations Guide) as well as papers and
  protocol definitions and DNS hacks (these, and most, if not all, of
  the RFCs mentioned below, are also contained in the bind
  distribution).  I have not read most of these, but then I'm not a big-
  time DNS admin either.  Arnt Gulbrandsen on the other hand has read
  BOG and he's ecstatic about it :-).  The newsgroup comp.protocols.tcp-
  ip.domains is about DNS.  In addition there are a number of RFCs about
  DNS, the most important are probably these:



     RFC 2052
        A. Gulbrandsen, P. Vixie, A DNS RR for specifying the location
        of services (DNS SRV), October 1996


     RFC 1918
        Y. Rekhter, R. Moskowitz, D. Karrenberg, G. de Groot, E. Lear,
        Address Allocation for Private Internets, 02/29/1996.


     RFC 1912
        D. Barr, Common DNS Operational and Configuration Errors,
        02/28/1996.


     RFC 1912 Errors
        B. Barr Errors in RFC 1912, this is available at
        <http://www.cis.ohio-state.edu/~barr/rfc1912-errors.html>


     RFC 1713
        A. Romao, Tools for DNS debugging, 11/03/1994.


     RFC 1712
        C. Farrell, M. Schulze, S. Pleitner, D. Baldoni, DNS Encoding of
        Geographical Location, 11/01/1994.


     RFC 1183
        R. Ullmann, P. Mockapetris, L. Mamakos, C. Everhart, New DNS RR
        Definitions, 10/08/1990.


     RFC 1035
        P. Mockapetris, Domain names - implementation and specification,
        11/01/1987.


     RFC 1034
        P. Mockapetris, Domain names - concepts and facilities,
        11/01/1987.


     RFC 1033
        M. Lottor, Domain administrators operations guide, 11/01/1987.


     RFC 1032
        M. Stahl, Domain administrators guide, 11/01/1987.


     RFC 974
        C. Partridge, Mail routing and the domain system, 01/01/1986.



  From DOS/Windows to Linux HOWTO
  By Guido Gonzato,  <REMOVE_MEguido@ibogeo.df.unibo.it>
  (Remove ``REMOVE_ME'')
  v1.3.2, 22 February 1999

  This HOWTO is dedicated to all the (soon to be former?) DOS and Win-
  dows users who have decided to switch to Linux, the free UNIX clone.
  The purpose of this document is to help the reader translate his or
  her knowledge of DOS and Windows into the Linux environment, as well
  as providing hints on exchanging files and resources between the two
  OSes.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Is Linux Right for You?
     1.2 It Is. Tell Me More
        1.2.1 Introductory Concepts
        1.2.2 Getting Help
     1.3 Conventions

  2. For the Impatient

  3. Meet bash

  4. Files and Programs

     4.1 Files: Preliminary Notions
     4.2 Symbolic Links
     4.3 Permissions and Ownership
     4.4 Files: Translating Commands
        4.4.1 Examples
     4.5 Running Programs: Multitasking and Sessions
     4.6 Running Programs on Remote Computers

  5. Using Directories

     5.1 Directories: Preliminary Notions
     5.2 Directories Permissions
     5.3 Directories: Translating Commands
        5.3.1 Examples

  6. Floppies, Hard Disks, and the Like

     6.1 Managing Devices the DOS Way
     6.2 Managing Devices the UNIX Way
     6.3 Backing Up

  7. What About Windows?

  8. Tailoring the System

     8.1 System Initialisation Files
     8.2 Program Initialisation Files

  9. Networking: Concepts

  10. A Bit of Programming

     10.1 Shell Scripts: .BAT Files on Steroids
     10.2 C for Yourself

  11. The Remaining 1%

     11.1 Using tar and gzip
     11.2 Installing Applications
     11.3 Tips You Can't Do Without
     11.4 Where to Find Applications
     11.5 A Few Things You Couldn't Do
     11.6 Practicing UNIX under DOS/Windows
     11.7 Common Extensions and Related Programs
     11.8 Converting Files
     11.9 Free Office Suites

  12. The End, for Now

     12.1 Copyright
     12.2 Disclaimer

  ______________________________________________________________________

  1.  Introduction



  1.1.  Is Linux Right for You?


  You want to switch from the DOS world (this definition includes
  Windows) to Linux? Good idea: Linux is technically superior to DOS,
  Windows 9x and even Windows NT. But beware: it might not be useful for
  you. These are the main differences between DOS/Windows and Linux:


  o  Windows runs Microsoft Office and lots of games; is perceived to be
     easy to install and configure; is notoriously unstable; performs
     poorly; crashes are frequent.

  o  Linux runs StarOffice, scores of technical software and fewer
     games; can be difficult to install and configure; is rock solid;
     performs impeccably; crashes are extremely rare.

  It's up to you to decide what you need. Furthermore, Linux gives you
  power, but it takes some time to learn how to harness it. Thus, if
  mostly need commercial sw, or if you don't feel like learning new
  commands and concepts, you had better look elsewhere. Be aware that
  many newcomers give up because of initial difficulties.

  Work is underway to make Linux simpler to use, but don't expect to be
  proficient with it unless you read a lot of documentation and use it
  at least for a few months. Linux won't give you instant results. In
  spite of these warnings, I'm 100% confident that if you are the right
  user type you'll find in Linux your computer Nirvana. By the way,
  Linux + DOS/Win can coexist happily on the same machine.

  Prerequisites for this howto: I'll assume that


  o  you know the basic DOS commands and concepts;

  o  Linux, possibly with X Window System (X11 for short), is properly
     installed on your PC;

  o  your shell (the equivalent of COMMAND.COM) is bash.

  Unless specified, all information in this work is aimed at bad ol'
  DOS.  There is information about Windows here and there, but bear in
  mind that Windows and Linux are totally different, unlike DOS that is
  sort of a UNIX poor relation.

  Please also note that this work is neither a complete primer nor a
  configuration guide!

  The latest version of this document is available in several formats on
  <ftp://sunsite.unc.edu:/pub/Linux/docs/howto>.



  1.2.  It Is. Tell Me More


  You installed Linux and the programs you needed on the PC. You gave
  yourself an account (if not, type adduser yourname now!) and Linux is
  running. You've just entered your name and password, and now you are
  looking at the screen thinking: ``Well, now what?''
  Now, don't despair. You're almost ready to do the same things you used
  to do with DOS/Win, and many more. If you were running DOS/Win instead
  of Linux, you would be doing some of the following tasks:


  o  running programs and creating, copying, viewing, deleting,
     printing, renaming files;

  o  CD'ing, MD'ing, RD'ing, and DIR'ring your directories;

  o  formatting floppies and copying files from/to them;

  o  tailoring the system;

  o  surfing the Internet;

  o  writing .BAT files and programs in your favourite language;

  o  the remaining 1%.

  You'll be glad to know that these tasks can be accomplished under
  Linux in a fashion similar to DOS. Under DOS, the average user uses
  very few of the 100+ commands available: the same, up to a point,
  applies to Linux.



  1.2.1.  Introductory Concepts


  The best way to learn something new is to get your feet wet. You are
  strongly encouraged to experiment and play with Linux: unless you
  login as ``root'', you can't damage the system that way. A few points:


  o  first of all, how to quit Linux safely. If you see a text mode
     screen, press <CTRL-ALT-DEL>, wait for the system to reboot, then
     switch off the PC. If you are working under X Window System, press
     <CTRL-ALT-BACKSPACE> first, then <CTRL-ALT-DEL>. Never switch off
     or reset the PC directly: this could damage the file system;

  o  unlike DOS or Windows, Linux has built-in security mechanisms.
     Files and directories have permissions associated to them; as a
     result, some cannot be accessed by the normal user; (see Section
     ``Permissions and Ownership''). DOS and Windows, on the contrary,
     will let you wipe out the entire contents of your hard disk;

  o  there's a special user called ``root'': the system administrator,
     with full power of life and death on the machine.  If you work on
     your own PC, you'll be root as well. Working as root is dangerous:
     any mistake can seriously damage or destroy the system just like
     with DOS/Win. Don't work as root unless absolutely necessary;

  o  much of the complexity of Linux comes from its extreme
     configurability: virtually every feature and every application can
     be tailored through one or more configuration files. Complexity is
     the price to pay for power;

  o  redirection and piping are a side DOS feature, a very inportant one
     and much more powerful under Linux. Simple commands can be strung
     together to accomplish complex tasks. I strongly suggest that you
     learn how to use them.



  1.2.2.  Getting Help


  There are many ways to get help with Linux. The most important are:


  o  reading the documentation---I mean it. Although the HOWTO you are
     reading may serve as an introduction to Linux, there are several
     books that you really should read: Matt Welsh's ``Linux
     Installation and Getting Started'' (
     <http://sunsite.unc.edu/mdw/LDP/gs/gs.html>), Larry Greenfield's
     ``Linux User Guide'' ( <ftp://sunsite.unc.edu/pub/Linux/docs/linux-
     doc-project/users-guide>), and the Linux FAQ (
     <http://sunsite.unc.edu/mdw/FAQ/Linux-FAQ.html>).  Feel a guilty
     conscience until you have read at least one of them;

  o  the documentation of the packages installed on the machine is often
     found in subdirectories under /usr/doc/;

  o  to get some help about the ``internal commands'' of the shell, type
     help or, better, man bash or info bash;

  o  to get help about a command, type man command that invokes the
     manual (``man'') page of command. Alternatively, type info command
     that invokes, if available, the info page pertinent of command;
     info is a hypertext-based documentation system, perhaps not
     intuitive to use at first. Finally, you may try apropos command or
     whatis command. With all of these commands, press `q' to exit.

  o  finally, on the Internet: the right place for getting help is
     Usenet, like  <news:comp.os.linux.setup>. Please don't email me for
     help, because I'm quite overloaded.



  1.3.  Conventions


  Throughout this work, examples will often follow the following format:
  <...> is a required argument, while [...] an optional one.  Example:



       $ tar -tf <file.tar> [> redir_file]



  file.tar must be indicated, but redirection to redir_file is optional.

  ``RMP'' means ``please Read the Man Pages for further information''.
  I can't stress enough how important reading the documentation is.
  ``DOSWin'' stands for ``DOS/Windows''.

  When the prompt of a command example is #, the command can only be
  performed by root.



  2.  For the Impatient


  Want to strike out? Have a look at this table:



       DOS                     Linux                   Notes
       ------------------------------------------------------------------------------

       ATTRIB (+-)attr file    chmod <mode> file       completely different
       BACKUP                  tar -Mcvf device dir/   ditto
       CD dirname\             cd dirname/             almost the same syntax
       COPY file1 file2        cp file1 file2          ditto
       DEL file                rm file                 beware - no undelete
       DELTREE dirname         rm -R dirname/          ditto
       DIR                     ls                      not exactly the same syntax
       DIR file /S             find . -name file       completely different
       EDIT file               vi file                 I think you won't like it
                               jstar file              feels like dos' edit
       EDLIN file              ed file                 forget it
       FORMAT                  fdformat,
                               mount, umount           quite different syntax
       HELP command            man command,            same philosophy
                               info command
       MD dirname              mkdir dirname/          almost the same syntax
       MORE < file             less file               much better
       MOVE file1 file2        mv file1 file2          ditto
       NUL                     /dev/null               ditto
       PRINT file              lpr file                ditto
       PRN                     /dev/lp0,
                               /dev/lp1                ditto
       RD dirname              rmdir dirname/          almost the same syntax
       REN file1 file2         mv file1 file2          not for multiple files
       RESTORE                 tar -Mxpvf device       different syntax
       TYPE file               less file               much better
       WIN                     startx                  poles apart!



  If you need more than a table of commands, please refer to the
  following sections.



  3.  Meet bash


  Good news: with Linux you type much less at the prompt, because the
  bash shell types for you whenever possible, and features cool line
  editing capabilities. To begin with, the arrow-up key recalls previous
  command lines; but there's more. Pressing <TAB> completes file and
  directory names, so typing



       $ ls /uTABloTABbTAB



  is like typing



       $ ls /usr/local/bin



  If there were ambiguities, as typing

       $ ls /uTABloTABiTAB



  bash stops because it doesn't know if you mean /usr/local/info or
  /usr/local/include. Supply more characters then press <TAB> again.

  Other useful key presses are <ESC-BACKSPACE> that deletes a word to
  the left, while <ESC-D> deletes a word to the right; <ESC-F> moves the
  cursor one word to the right, <ESC-B> to the left; <CTRL-A> moves to
  the beginning of the line, <CTRL-E> to the end. The <ALT> key is
  equivalent to <ESC>.

  Enough for now. Once you get used to these shortcuts, you'll find the
  DOS prompt very annoying...



  4.  Files and Programs



  4.1.  Files: Preliminary Notions


  Linux has a structure of directories and files very similar to that of
  DOSWin. Files have filenames that obey special rules, are stored in
  directories, some are executable, and among these most have command
  switches. Moreover, you can use wildcard characters, redirection, and
  piping. There are only a few minor differences:


  o  under DOS, file names are in the so-called 8.3 form; e.g.
     NOTENOUG.TXT. Under Linux we can do better. If you installed Linux
     using a file system like ext2 or umsdos, you can use longer
     filenames (up to 255 characters), and with more than one dot: for
     example, This_is.a.VERY_long.filename. Please note that I used both
     upper and lower case characters: in fact...

  o  upper and lower case characters in file names or commands are
     different. Therefore, FILENAME.tar.gz and filename.tar.gz are two
     different files. ls is a command, LS is a mistake;

  o  Windows users, beware when using long file names under Linux.  If a
     file name contains spaces (not recommended but possible), you must
     enclose the file name in double quotes whenever you refer to it.
     For example:



       $ # the following command makes a directory called "My old files"
       $ mkdir "My old files"
       $ ls
       My old files    bin     tmp



  Further, some characters shouldn't be used: some are !*$&#.

  o  there are no compulsory extensions like .COM and .EXE for programs,
     or .BAT for batch files. Executable files are marked by an asterisk
     `*' at the end of their name when you issue the ls -F command. For
     example:



       $ ls -F
       I_am_a_dir/   cindy.jpg    cjpg*   letter_to_Joe    my_1st_script*  old~



  The files cjpg* and my_1st_script* are executables, that is ``pro-
  grams''. Under DOS, backup files end in .BAK, while under Linux they
  end with a tilde `~'. Further, a file whose name starts with a dot is
  considered as hidden. Example: the file .I.am.a.hidden.file won't show
  up after the ls command;

  o  DOS program switches are obtained with /switch, Linux switches with
     -switch or --switch. Example: dir /s becomes ls -R. Note that many
     DOS programs, like PKZIP or ARJ, use UNIX-style switches.

  You can now jump to Section ``Translating Commands from DOS to
  Linux'', but if I were you I'd read on.



  4.2.  Symbolic Links


  UNIX has a type of file that doesn't exist under DOS: the symbolic
  link.  This can be thought of as a pointer to a file or to a
  directory, and can be used instead of the file or directory it points
  to; it's similar to Windows shortcuts. Examples of symbolic links are
  /usr/X11, which points to /usr/X11R6; /dev/modem, which points to
  either /dev/ttyS0 or /dev/ttyS1.

  To make a symbolic link:



       $ ln -s <file_or_dir> <linkname>



  Example:



       $ ln -s /usr/doc/g77/DOC g77manual.txt



  Now you can refer to g77manual.txt instead of /usr/doc/g77/DOC.  Links
  appear like this in directory listings:



       $ ls -F
       g77manual.txt@
       $ ls -l
       (several things...)           g77manual.txt -> /usr/doc/g77/DOC



  4.3.  Permissions and Ownership


  DOS files and directories have the following attributes: A (archive),
  H (hidden), R (read-only), and S (system). Only H and R make sense
  under Linux: hidden files start with a dot, and for the R attribute,
  read on.

  Under UNIX a file has ``permissions'' and an owner, who in turn
  belongs to a ``group''. Look at this example:



       $ ls -l /bin/ls
       -rwxr-xr-x  1  root  bin  27281 Aug 15 1995 /bin/ls*



  The first field contains the permissions of the file /bin/ls, which
  belongs to root, group bin. Leaving the remaining information aside,
  remember that -rwxr-xr-x means, from left to right:

  - is the file type (- = ordinary file, d = directory, l = link, etc);
  rwx are the permissions for the file owner (read, write, execute); r-x
  are the permissions for the group of the file owner (read, execute);
  (I won't cover the concept of group, you can survive without it as
  long as you're a beginner ;-) r-x are the permissions for all other
  users (read, execute).

  The directory /bin has permissions, too: see Section ``Directories
  Permissions'' for further details. This is why you can't delete the
  file /bin/ls unless you are root: you don't have the permission to do
  so. To change a file's permissions, the command is:



       $ chmod <whoXperm> <file>



  where who is u (user, that is owner), g (group), o (other), X is
  either + or -, perm is r (read), w (write), or x (execute). Common
  examples of chmod use are the following:



       $ chmod +x file



  this sets the execute permission for the file.



       $ chmod go-rw file



  this removes read and write permission for everyone but the owner.



  $ chmod ugo+rwx file



  this gives everyone read, write, and execute permission.



       # chmod +s file



  this makes a so-called ``setuid'' or ``suid'' file---a file that
  everyone can execute with its owner's privileges. Typically, you'll
  come across root suid files; these are often important system files,
  like the X server.

  A shorter way to refer to permissions is with digits: rwxr-xr-x can be
  expressed as 755 (every letter corresponds to a bit: --- is 0, --x is
  1, -w- is 2, -wx is 3...).  It looks difficult, but with a bit of
  practice you'll understand the concept. root, being the superuser, can
  change everyone's file permissions.  RMP.



  4.4.  Files: Translating Commands


  On the left, the DOS commands; on the right, their Linux counterpart.



       ATTRIB:         chmod
       COPY:           cp
       DEL:            rm
       MOVE:           mv
       REN:            mv
       TYPE:           more, less, cat



  Redirection and plumbing operators:  < > >> |

  Wildcards: * ?

  nul:        /dev/null

  prn, lpt1:  /dev/lp0 or /dev/lp1; lpr


  4.4.1.  Examples



  DOS                                     Linux
  ---------------------------------------------------------------------

  C:\GUIDO>ATTRIB +R FILE.TXT             $ chmod 400 file.txt
  C:\GUIDO>COPY JOE.TXT JOE.DOC           $ cp joe.txt joe.doc
  C:\GUIDO>COPY *.* TOTAL                 $ cat * > total
  C:\GUIDO>COPY FRACTALS.DOC PRN          $ lpr fractals.doc
  C:\GUIDO>DEL TEMP                       $ rm temp
  C:\GUIDO>DEL *.BAK                      $ rm *~
  C:\GUIDO>MOVE PAPER.TXT TMP\            $ mv paper.txt tmp/
  C:\GUIDO>REN PAPER.TXT PAPER.ASC        $ mv paper.txt paper.asc
  C:\GUIDO>PRINT LETTER.TXT               $ lpr letter.txt
  C:\GUIDO>TYPE LETTER.TXT                $ more letter.txt
  C:\GUIDO>TYPE LETTER.TXT                $ less letter.txt
  C:\GUIDO>TYPE LETTER.TXT > NUL          $ cat letter.txt > /dev/null
          n/a                             $ more *.txt *.asc
          n/a                             $ cat section*.txt | less



  Notes:


  o  * is smarter under Linux: * matches all files except the hidden
     ones; .* matches all hidden files (but also the current directory
     `.' and parent directory `..': beware!); *.* matches only those
     that have a `.' in the middle or that end with a dot; p*r matches
     both `peter' and `piper'; *c* matches both `picked' and `peck';

  o  when using more, press <SPACE> to read through the file, `q' to
     exit. less is more intuitive and lets you use the arrow keys;

  o  there is no UNDELETE, so think twice before deleting anything;

  o  in addition to DOS' < > >>, Linux has 2> to redirect error messages
     (stderr); moreover, 2>&1 redirects stderr to stdout, while 1>&2
     redirects stdout to stderr;

  o  Linux has another wildcard: the []. Usage: [abc]* matches files
     starting with a, b, c; *[I-N1-3] matches files ending with I, J, K,
     L, M, N, 1, 2, 3;

  o  lpr <file> prints a file in background. To check the status of the
     print queue, use lpq; to remove a file from the print queue, use
     lprm;

  o  there is no DOS-like RENAME; that is, mv *.xxx *.yyy won't work. A
     REN-like command is available on
     <ftp://sunsite.unc.edu/pub/Linux/utils/file>;

  o  use cp -i and mv -i to be warned when a file is going to be
     overwritten.



  4.5.  Running Programs: Multitasking and Sessions


  To run a program, type its name as you would do under DOS. If the
  directory (Section ``Using Directories'') where the program is stored
  is included in the PATH (Section ``System Initialisation Files''), the
  program will start. Exception: unlike DOS, under Linux a program
  located in the current directory won't run unless the directory is
  included in the PATH. Escamotage: being prog your program, type
  ./prog.
  This is what the typical command line looks like:



       $ command [-s1 [-s2] ... [-sn]] [par1 [par2] ... [parn]] [< input] [> output]



  where -s1, ..., -sn are the program switches, par1, ..., parn are the
  program parameters. You can issue several commands on the command
  line:



       $ command1 ; command2 ; ... ; commandn



  That's all about running programs, but it's easy to go a step beyond.
  One of the main reasons for using Linux is that it is a multitasking
  os---it can run several programs (from now on, processes) at the same
  time. You can launch processes in background and continue working
  straight away. Moreover, Linux lets you have several sessions: it's
  like having many computers to work on at once!


  o  To switch to session 1..6 on the virtual consoles, press <ALT-F1>
     ... <ALT-F6>

  o  To start a new session in the same v.c. without leaving the current
     one, type su - <loginname>. Example: su - root. This is useful, for
     instance, when you need to perform a task that only root can do.

  o  To end a session, type exit. If there are stopped jobs (see later),
     you'll be warned.

  o  To launch a process in background, add an ampersand '&' at the end
     of the command line:



       $ progname [-switches] [parameters] [< input] [> output] &
       [1] 123



  the shell identifies the process with a job number (e.g. [1]; see
  below), and with a PID (Process Identification Number; 123 in our
  example).

  o  To see how many processes there are, type ps ax. This will output a
     list of currently running processes.

  o  To kill (terminate) a process, type kill <PID>. You may need to
     kill a process when you don't know how to quit it the right way....
     Unless you're root, you can't kill other people's processes.
     Sometimes, a process will only be killed by kill -SIGKILL <PID>.

     In addition, the shell allows you to stop or temporarily suspend a
     process, send a process to background, and bring a process from
     background to foreground. In this context, processes are called
     ``jobs''.
  o  To see how many jobs there are, type jobs. Here the jobs are
     identified by their job number, not by their PID.

  o  To stop a process running in foreground, press <CTRL-C> (it won't
     always work).

  o  To suspend a process running in foreground, press <CTRL-Z> (ditto).

  o  To send a suspended process into background, type bg <%job> (it
     becomes a job).

  o  To bring a job to foreground, type fg <%job>. To bring to
     foreground the last job sent to background, simply type fg.

  o  To kill a job, type kill <%job> where <job> may be 1, 2, 3,...

  Using these commands you can format a disk, zip a bunch of files,
  compile a program, and unzip an archive all at the same time, and
  still have the prompt at your disposal. Try this with Windows, just to
  see the difference in performance (if it doesn't crash, of course).



  4.6.  Running Programs on Remote Computers


  To run a program on a remote machine whose name is remote.machine.edu:



       $ telnet remote.machine.edu



  After logging in, start your favourite program. Needless to say, you
  must have a shell account on the remote machine.

  If you have X11, you can even run an X application on a remote
  computer, displaying it on your X screen. Let remote.machine.edu be
  the remote X computer and let local.linux.box be your Linux machine.
  To run from local.linux.box an X program that resides on
  remote.machine.edu, do the following:


  o  fire up X11, start an xterm or equivalent terminal emulator, then
     type:



       $ xhost +remote.machine.edu
       $ telnet remote.machine.edu



  o  after logging in, type:



       remote:$ DISPLAY=local.linux.box:0.0
       remote:$ progname &



  (instead of DISPLAY..., you may have to write: setenv DISPLAY
  local.linux.box:0.0. It depends on the remote shell.)

  Et voila! Now progname will start on remote.machine.edu and will be
  displayed on your machine. Don't try this over the modem though, for
  it's too slow to be usable. Moreover, this is a crude and insecure
  method: please read the ``Remote X Apps mini-HOWTO'' at
  <http://sunsite.unc.edu/LDP/HOWTO/mini/Remote-X-Apps>.



  5.  Using Directories



  5.1.  Directories: Preliminary Notions


  We have seen the differences between files under DOSWin and Linux. As
  for directories, under DOSWin the root directory is \, under Linux it
  is /. Similarly, nested directories are separated by \ under DOSWin,
  by / under Linux. Example of file paths:



       DOS:    C:\PAPERS\GEOLOGY\MID_EOC.TEX
       Linux:  /home/guido/papers/geology/middle_eocene.tex



  As usual, .. is the parent directory and . is the current directory.
  Remember that the system won't let you cd, rd, or md everywhere you
  want. Each user has his or her stuff in a directory called `home',
  given by the system administrator; for instance, on my PC my home dir
  is /home/guido.



  5.2.  Directories Permissions


  Directories, too, have permissions. What we have seen in Section
  ``Permissions and Ownership'' applies to directories as well (user,
  group, and other). For a directory, rx means you can cd to that
  directory, and w means that you can delete a file in the directory
  (according to the file's permissions, of course), or the directory
  itself.

  For example, to prevent other users from snooping in /home/guido/text:



       $ chmod o-rwx /home/guido/text



  5.3.  Directories: Translating Commands



  DIR:            ls, find, du
  CD:             cd, pwd
  MD:             mkdir
  RD:             rmdir
  DELTREE:        rm -rf
  MOVE:           mv



  5.3.1.  Examples



       DOS                                     Linux
       ---------------------------------------------------------------------

       C:\GUIDO>DIR                            $ ls
       C:\GUIDO>DIR FILE.TXT                   $ ls file.txt
       C:\GUIDO>DIR *.H *.C                    $ ls *.h *.c
       C:\GUIDO>DIR/P                          $ ls | more
       C:\GUIDO>DIR/A                          $ ls -l
       C:\GUIDO>DIR *.TMP /S                   $ find / -name "*.tmp"
       C:\GUIDO>CD                             $ pwd
               n/a - see note                  $ cd
               ditto                           $ cd ~
               ditto                           $ cd ~/temp
       C:\GUIDO>CD \OTHER                      $ cd /other
       C:\GUIDO>CD ..\TEMP\TRASH               $ cd ../temp/trash
       C:\GUIDO>MD NEWPROGS                    $ mkdir newprogs
       C:\GUIDO>MOVE PROG ..                   $ mv prog ..
       C:\GUIDO>MD \PROGS\TURBO                $ mkdir /progs/turbo
       C:\GUIDO>DELTREE TEMP\TRASH             $ rm -rf temp/trash
       C:\GUIDO>RD NEWPROGS                    $ rmdir newprogs
       C:\GUIDO>RD \PROGS\TURBO                $ rmdir /progs/turbo



  Notes:


  o  when using rmdir, the directory to remove must be empty. To delete
     a directory and all of its contents, use rm -rf (at your own risk).

  o  the character `~' is a shortcut for the name of your home
     directory. The commands cd or cd ~ will take you to your home
     directory from wherever you are; the command cd ~/tmp will take you
     to /home/your_home/tmp.

  o  cd - ``undoes'' the last cd.



  6.  Floppies, Hard Disks, and the Like


  There are two ways to manage devices under Linux: the DOS way and the
  UNIX way. Take your pick.



  6.1.  Managing Devices the DOS Way


  Most Linux distributions include the Mtools suite, a set of commands
  that are perfectly equivalent to their DOS counterpart, but start with
  an `m': i.e., mformat, mdir, mdel, mmd, and so on. They can even
  preserve long file names, but not file permissions. If you configure
  Mtools editing a file called /etc/mtools.conf (a sample is provided in
  the distribution), you can also access the DOS/Win partition, the
  CD--ROM, and the Zip drive. To format a fresh disk though, the mformat
  command won't do. As root, you'll have to issue this command
  beforehand: fdformat /dev/fd0H1440.

  You can't access files on the floppy with a command like, say, less
  a:file.txt! This is the disadvantage of the DOS way of accessing
  disks.



  6.2.  Managing Devices the UNIX Way


  UNIX has a different way to handle devices. There are no separate
  volumes like A: or C:; a disk, be it a floppy or whatever, becomes
  part of the local file system through an operation called
  ``mounting''. When you're done using the disk, before extracting it
  you must ``unmount'' it.

  Physically formatting a disk is one thing, making a file system on it
  is another. The DOS command FORMAT A: does both things, but under
  Linux there are separate commands. To format a floppy, see above; to
  create a file system:



       # mkfs -t ext2 -c /dev/fd0H1440



  You can use dos, vfat (recommended) or other formats instead of ext2.
  Once the disk is prepared, mount it with the command



       # mount -t ext2 /dev/fd0 /mnt



  specifying the right file system if you don't use ext2. Now you can
  address the files in the floppy using /mnt instead of A: or B:.
  Examples:



       DOS                                     Linux
       ---------------------------------------------------------------------

       C:\GUIDO>DIR A:                         $ ls /mnt
       C:\GUIDO>COPY A:*.*                     $ cp /mnt/* .
       C:\GUIDO>COPY *.ZIP A:                  $ cp *.zip /mnt
       C:\GUIDO>EDIT A:FILE.TXT                $ jstar /mnt/file.txt
       C:\GUIDO>A:                             $ cd /mnt
       A:> _                                   /mnt/$ _

  When you've finished, before extracting the disk you must unmount it
  with the command



       # umount /mnt



  Obviously, you have to fdformat and mkfs only unformatted disks, not
  previously used ones. If you want to use the drive B:, refer to
  fd1H1440 and fd1 instead of fd0H1440 and fd0 in the examples above.

  Needless to say, what applies to floppies also applies to other
  devices; for instance, you may want to mount another hard disk or a
  CD--ROM drive. Here's how to mount the CD--ROM:



       # mount -t iso9660 /dev/cdrom /mnt



  This was the ``official'' way to mount your disks, but there's a trick
  in store. Since it's a bit of a nuisance having to be root to mount a
  floppy or a CD--ROM, every user can be allowed to mount them this way:


  o  as root, do the following:



       # mkdir /mnt/floppy ; mkdir /mnt/cdrom
       # chmod 777 /mnt/floppy /mnt/cd*
       # # make sure that the CD-ROM device is right
       # chmod 666 /dev/hdb ; chmod 666 /dev/fd*



  o  add in /etc/fstab the following lines:



       /dev/cdrom      /mnt/cdrom  iso9660 ro,user,noauto          0       0
       /dev/fd0        /mnt/floppy vfat    user,noauto             0       0



  Now, to mount a DOS floppy and a CD--ROM:



       $ mount /mnt/floppy
       $ mount /mnt/cdrom



  /mnt/floppy and /mnt/cdrom can now be accessed by every user. Remember
  that allowing everyone to mount disks this way is a gaping security
  hole, if you care.

  Two useful commands are df, which gives information on the mounted
  file systems, and du dirname which reports the disk space consumed by
  the directory.



  6.3.  Backing Up


  There are several packages to help you, but the very least you can do
  for a multi-volume backup is (as root):



       # tar -M -cvf /dev/fd0H1440 dir_to_backup/



  Make sure to have a formatted floppy in the drive, and several more
  ready.  To restore your stuff, insert the first floppy in the drive
  and do:



       # tar -M -xpvf /dev/fd0H1440



  7.  What About Windows?


  The ``equivalent'' of Windows is the graphic system X Window System.
  Unlike Windows or the Mac, X11 wasn't designed for ease of use or to
  look good, but just to provide graphic facilities to UNIX
  workstations. These are the main differences:


  o  while Windows looks and feels the same all over the world, X11 does
     not: it's much more configurable. X11's overall look is given by a
     key component called ``window manager'', of which you have a wide
     choice: fvwm, basic but nice and memory efficient, fvwm2-95,
     Afterstep, WindowMaker, Enlightenment, and many more. The w.m.  is
     usually invoked from .xinitrc;

  o  your w.m. can be configured so as a window acts as under, er,
     Windows: you click on it and it comes to foreground. Another
     possibility is that it comes to foreground when the mouse moves
     over it (``focus''). Also, the placement of windows on the screen
     can be automatic or interactive: if a strange frame appears instead
     of your program, left click where you want it to appear;

  o  most features can be tailored editing one or more configuration
     files. Read the docs of your w.m.: the configuration file can be
     .fvwmrc, .fvwm2rc95, .steprc, etc. A sample configuration file is
     typically found in /etc/X11/window-manager-name/system.window-
     manager-name;

  o  X11 applications are written using special libraries (``widget
     sets''); as several are available, applications look different. The
     most basic ones are those that use the Athena widgets (2--D look;
     xdvi, xman, xcalc); others use Motif (netscape), others still use
     Tcl/Tk, XForms, Qt, Gtk, and what have you. Nearly all of these
     libraries provide roughly the same look and feel as Windows;

  o  the feel, unfortunately, can be incoherent. For instance, if you
     select a line of text using the mouse and press <BACKSPACE>, you'd
     expect the line to disappear, right? This doesn't work with
     Athena--based apps, but it does with other widget sets;

  o  how scrollbars and resizing work depends on the w.m. and the widget
     set. Tip: if you find that the scrollbars don't behave as you would
     expect, try using the central button or the two buttons together to
     move them;

  o  applications don't have an icon by default, but they can have many.
     Most w.m. feature a menu you recall by clicking on the desktop
     (``root window''); needless to say, the menu can be tailored. To
     change the root window appearance, use xsetroot or xloadimage;

  o  the clipboard can only contain text, and behaves strange. Once
     you've selected text, it's already copied to the clipboard: move
     elsewhere and press the central button to paste it. There's an
     application, xclipboard, that provides for multiple clipboard
     buffers;

  o  drag and drop is an option, and is only available if you use X11
     applications and/or w.m. that support it.

  To save memory, one should use applications that use the same
  libraries, but this is difficult to do in practice.

  There are projects that aim at making X11 look and behave as
  coherently as Windows. Gnome,  <http://www.gnome.org> and KDE,
  <http://www.kde.org>, are awesome. Give them a try: you won't regret
  your Windows desktop anymore.



  8.  Tailoring the System



  8.1.  System Initialisation Files


  Two important files under DOS are AUTOEXEC.BAT and CONFIG.SYS, which
  are used at boot time to initialise the system, set some environment
  variables like PATH and FILES, and possibly launch a program or batch
  file.  Under Linux there are lots of initialisation files, some of
  which you had better not tamper with until you know exactly what you
  are doing. I'll tell you what the most important are, anyway:



       FILES                                   NOTES

       /etc/inittab                            don't touch for now!
       /etc/rc.d/*                             ditto



  If all you need is setting the PATH and other environment variables,
  or you want to change the login messages or automatically launch a
  program after the login, have a look at the following files:

       FILES                                   NOTES

       /etc/issue                              sets pre-login message
       /etc/motd                               sets post-login message
       /etc/profile                            sets $PATH and other variables, etc.
       /etc/bashrc                             sets aliases and functions, etc.
       /home/your_home/.bashrc                 sets your aliases + functions
       /home/your_home/.bash_profile   or
       /home/your_home/.profile                sets environment + starts your progs



  If the latter file exists (note that it is a hidden file), it will be
  read after the login, and the commands therein will be executed.

  Example---look at this .bash_profile:


  ______________________________________________________________________
  # I am a comment
  echo Environment:
  printenv | less   # equivalent of command SET under DOS
  alias d='ls -l'   # easy to understand what an alias is
  alias up='cd ..'
  echo "I remind you that the path is "$PATH
  echo "Today is `date`"  # use the output of the command 'date'
  echo "Have a good day, "$LOGNAME
  # The following is a "shell function"
  ctgz() # List the contents of a .tar.gz archive.
  {
    for file in $*
    do
      gzip -dc ${file} | tar tf -
    done
  }
  # end of .profile
  ______________________________________________________________________



  $PATH and $LOGNAME, you guessed right, are environment variables.
  There are many others to play with; for instance, RMP for apps like
  less or bash.

  Putting this line in your /etc/profile will provide the rough
  equivalent of PROMPT $P$G:



       export PS1="\w\\$ "



  8.2.  Program Initialisation Files


  Under Linux, virtually everything can be tailored to your needs. Most
  programs have one or more initialisation files you can fiddle with,
  often as a .prognamerc in your home dir. The first ones you'll want to
  modify are:


  o   .inputrc: used by bash to define key bindings;

  o   .xinitrc: used by startx to initialise X Window System;

  o   .fvwmrc: used by the window manager fvwm.

  o   .joerc, .jstarrc: used by the editor joe;

  o   .jedrc: used by the editor jed;

  o   .pinerc: used by the mail reader pine;

  o   .Xdefault: used by many X programs.

  For all of these and the others you'll come across sooner or later,
  RMP.  Perhaps I could interest you in the Configuration HOWTO,
  <http://sunsite.unc.edu/mdw/HOWTO/Config-HOWTO.html>?



  9.  Networking: Concepts


  Not only is ``Dialup Networking'' available under Linux, it's also
  more stable and quicker. The name of the game is ``PPP'', the protocol
  employed for connecting to the Internet using modems. You need a
  kernel that supports PPP and a tool that dials and makes the
  connection.

  To retrieve your mail from the ISP's server you need a tool called
  ``email fetcher'' that uses the POP protocol; when the mail is fetched
  it will appear as though it had been directly delivered to your Linux
  box. You'll then use a MUA (Mail User Agent) like pine, mutt, elm or
  many others to manage it.

  While under Windows the dialer is automatically invoked when you
  launch an Internet application, under Linux the path is the other way
  round: you dial first, then launch the application. A thing called
  diald provides the usual behaviour. Installing and configuring dialup
  networking used to be one of the most difficult things to do under
  Linux, but not anymore: please consult the Configuration HOWTO.

  Finally, a word about ``Network neighborhood'': you can make your
  Linux workstation appear as Windows NT/9x in a local network of
  Windows machines! The magic word is Samba: not the lively Brazilian
  dance, but an implementation of the SMB protocol for Linux. Go to
  <http://samba.anu.edu.au/samba>.



  10.  A Bit of Programming



  10.1.  Shell Scripts: .BAT Files on Steroids


  If you used .BAT files to create shortcuts of long command lines (I
  did a lot), this goal can be attained by inserting appropriate alias
  lines (see example above) in profile or .bash_profile. But if your
  .BATs were more complicated, then you'll love the scripting language
  made available by the shell: it's as powerful as good ol' QBasic, if
  not more. It has variables, structures like while, for, case, if...
  then... else, and lots of other features: it can be a good alternative
  to a ``real'' programming language.
  To write a script---the equivalent of a .BAT file under DOS---all you
  have to do is write a standard ASCII file containing the instructions,
  save it, then make it executable with the command chmod +x
  <scriptfile>. To execute it, type its name.

  A word of warning. The system editor is called vi, and in my
  experience most new users find it very difficult to use. I'm not going
  to explain how to use it; please consult Matt Welsh's book or search
  for a tutorial on the net. Suffice it here to say that:


  o  to insert some text, type i then your text;

  o  to delete characters, type <ESC> then x;

  o  to quit vi whithout saving, type <ESC> then :q!

  o  to save and quit, type <ESC> then :wq.

  A good beginner editor is joe: invoking it by typing jstar you'll get
  the same key bindings as the DOSWin editor. jed in WordStar or IDE
  mode is even better. Please consult Section ``Where to Find
  Applications'' to see where to get these editors.

  Writing scripts under bash is such a vast subject it would require a
  book by itself, and I will not delve into the topic any further. I'll
  just give you an example of shell script, from which you can extract
  some basic rules:


  ______________________________________________________________________
  #!/bin/sh
  # sample.sh
  # I am a comment
  # don't change the first line, it must be there
  echo "This system is: `uname -a`" # use the output of the command
  echo "My name is $0" # built-in variables
  echo "You gave me the following $# parameters: "$*
  echo "The first parameter is: "$1
  echo -n "What's your name? " ; read your_name
  echo notice the difference: "hi $your_name" # quoting with "
  echo notice the difference: 'hi $your_name' # quoting with '
  DIRS=0 ; FILES=0
  for file in `ls .` ; do
    if [ -d ${file} ] ; then # if file is a directory
      DIRS=`expr $DIRS + 1`  # DIRS = DIRS + 1
    elif [ -f ${file} ] ; then
      FILES=`expr $FILES + 1`
    fi
    case ${file} in
      *.gif|*jpg) echo "${file}: graphic file" ;;
      *.txt|*.tex) echo "${file}: text file" ;;
      *.c|*.f|*.for) echo "${file}: source file" ;;
      *) echo "${file}: generic file" ;;
    esac
  done
  echo "there are ${DIRS} directories and ${FILES} files"
  ls | grep "ZxY--!!!WKW"
  if [ $? != 0 ] ; then # exit code of last command
    echo "ZxY--!!!WKW not found"
  fi
  echo "enough... type 'man bash' if you want more info."
  ______________________________________________________________________



  10.2.  C for Yourself


  Under UNIX, the system language is C, love it or hate it. Scores of
  other languages (Java, FORTRAN, Pascal, Lisp, Basic, Perl, awk...) are
  also available.

  Taken for granted that you know C, here are a couple of guidelines for
  those of you who have been spoilt by Turbo C++ or one of its DOS kin.
  Linux's C compiler is called gcc and lacks all the bells and whistles
  that usually accompany its DOS counterparts: no IDE, on-line help,
  integrated debugger, etc. It's just a rough command-line compiler,
  very powerful and efficient. To compile your standard hello.c you'll
  do:



       $ gcc hello.c



  which will create an executable file called a.out. To give the
  executable a different name, do



       $ gcc -o hola hello.c



  To link a library against a program, add the switch -l<libname>. For
  example, to link in the math library:



       $ gcc -o mathprog mathprog.c -lm



  (The -l<libname> switch forces gcc to link the library
  /usr/lib/lib<libname>.so; so -lm links /usr/lib/libm.so).

  So far, so good. But when your prog is made of several source files,
  you'll need to use the utility make. Let's suppose you have written an
  expression parser: its source file is called parser.c and #includes
  two header files, parser.h and xy.h. Then you want to use the routines
  in parser.c in a program, say, calc.c, which in turn #includes
  parser.h. What a mess! What do you have to do to compile calc.c?

  You'll have to write a so-called Makefile, which teaches the compiler
  the dependencies between sources and objects files. In our example:



  ______________________________________________________________________
  # This is Makefile, used to compile calc.c
  # Press the <TAB> key where indicated!

  calc: calc.o parser.o
  <TAB>gcc -o calc calc.o parser.o -lm
  # calc depends on two object files: calc.o and parser.o

  calc.o: calc.c parser.h
  <TAB>gcc -c calc.c
  # calc.o depends on two source files

  parser.o:  parser.c parser.h xy.h
  <TAB>gcc -c parser.c
  # parser.o depends on three source files

  # end of Makefile.
  ______________________________________________________________________



  Save this file as Makefile and type make to compile your program;
  alternatively, save it as calc.mak and type make -f calc.mak, and of
  course RMP. You can invoke some help about the C functions, that are
  covered by man pages, section 3; for example,



       $ man 3 printf



  To debug your programs, use gdb. info gdb to learn how to use it.

  There are lots of libraries available; among the first you'll want to
  use are ncurses (textmode effects), and svgalib (console graphics). If
  you feel brave enough to tackle X11 programming (it's not that
  difficult), there are several libraries that make writing X11 programs
  a breeze. Have a look at <http://www.xnet.com/~blatura/linapp6.html>,
  bearing in mind that Gtk is becoming a Linux standard.

  Many editors can act as an IDE; emacs and jed, for instance, also
  feature syntax highlighting, automatic indent, and so on.
  Alternatively, get the package rhide from
  <ftp://sunsite.unc.edu:/pub/Linux/devel/debuggers/>.  It's a Borland
  IDE clone, and chances are that you'll like it.



  11.  The Remaining 1%


  Much more than 1%, actually...



  11.1.  Using tar and gzip


  Under UNIX there are some widely used applications to archive and
  compress files. tar is used to make archives---it's like PKZIP or
  Winzipbut it doesn't compress, it only archives. To make a new
  archive:


       $ tar -cvf <archive_name.tar> <file> [file...]



  To extract files from an archive:



       $ tar -xpvf <archive_name.tar> [file...]



  To list the contents of an archive:



       $ tar -tf <archive_name.tar> | less



  You can compress files using compress, which is obsolete and shouldn't
  be used any more, or gzip:



       $ compress <file>
       $ gzip <file>



  that creates a compressed file with extension .Z (compress) or .gz
  (gzip). These programs can compress only one file at a time.  To
  decompress:



       $ compress -d <file.Z>
       $ gzip -d <file.gz>



  RMP.

  There are also the unarj, zip and unzip (PK??ZIP compatible)
  utilities. Files with extension .tar.gz or .tgz (archived with tar,
  then compressed with gzip) are as common in the UNIX world as .ZIP
  files are under DOS. Here's how to list the contents of a
   .tar.gz archive:



       $ tar -ztf <file.tar.gz> | less



  11.2.  Installing Applications


  First of all: installing packages is root's work. Most Linux
  applications are distributed as a .tar.gz archive, which typically
  will contain a directory aptly named containing files and/or
  subdirectories.  A good rule is to install these packages from
  /usr/local with the command



       # tar -zxf <archive.tar.gz>



  reading then the README or INSTALL file. In most cases, the
  application is distributed in source, which you'll have to compile;
  often, typing make then make install will suffice. If the archive
  contains a configure script, run it first.  Obviously, you'll need the
  gcc or g++ compiler.

  Other archives have to be unpacked from /; this is the case with
  Slackware's .tgz archives. Other archives contain the files but not a
  subdirectory - careful not to mess things up!. Always list the
  contents of the archive before installing it.

  Debian and Red Hat have their own archive format; respectively, .deb
  and .rpm. The latter is gaining wide acceptance; to install an rpm
  package, type



       # rpm -i package.rpm



  11.3.  Tips You Can't Do Without


  Backscrolling: pressing <SHIFT + PAG UP> (the grey key) allows you to
  backscroll a few pages, depending on how much video memory you have.

  Resetting the screen: if you happen to more or cat a binary file, your
  screen may end up full of garbage. To fix it, blind type reset or this
  sequence of characters: echo CTRL-V ESC c RETURN.

  Pasting text: in console, see below; in X, click and drag to select
  the text in an xterm window, then click the middle button (or the two
  buttons together if you have a two-button mouse) to paste. There is
  also xclipboard (alas, only for text); don't get confused by its very
  slow response.

  Using the mouse: if you installed gpm, a mouse driver for the console,
  you can click and drag to select text, then right click to paste the
  selected text. It works across different VCs.

  Messages from the kernel: have a look at /var/adm/messages or
  /var/log/messages as root to see what the kernel has to tell you,
  including bootup messages. The command dmesg is also handy.



  11.4.  Where to Find Applications


  If you're wondering whether you can replace your old and trusted
  DOS/Win application with a Linux one, I suggest that you browse the
  main Linux software repositories: <ftp://sunsite.unc.edu/pub/Linux>,
  <ftp://tsx-11.mit.edu/pub/linux>, and <ftp://ftp.funet.fi/pub/Linux>.
  Other good starting places are the ``Linux Applications and Utilities
  Page'' <http://www.xnet.com/~blatura/linapps.shtml>, and the
  ``official'' Linux page  <http://www.linux.org>.



  11.5.  A Few Things You Couldn't Do


  Linux can do an awful lot of things that were cumbersome, difficult or
  impossible do to with DOS/Windows. Here's a short list that may whet
  your appetite:


  o  at allows you to run programs at a specified time;

  o  awk is a simple yet powerful language to manipulate data files (and
     not only). For example, being data.dat your multi field data file,



       $ awk '$2 ~ "abc" {print $1, "\t", $4}' data.dat



  prints out fields 1 and 4 of every line in data.dat whose second field
  contains ``abc''.

  o  cron is useful to perform tasks periodically, at specified date and
     time. Type man 5 crontab.

  o  file <filename> tells you what filename is (ASCII text, executable,
     archive, etc.);

  o  find (see also Section ``Directories: Translating Commands'') is
     one of the most powerful and useful commands. It's used to find
     files that match several characteristics and perform actions on
     them. General use of find is:



       $ find <directory> <expression>



  where <expression> includes search criteria and actions. Examples:



       $ find . -type l -exec ls -l {} \;



  finds all the files that are symbolic links and shows what they point
  to.



       $ find / -name "*.old" -ok rm {} \;



  finds all the files matching the pattern and deletes them, asking for
  your permission first.



       $ find . -perm +111



  finds all the files whose permissions match 111 (executable).



       $ find . -user root



  finds all the files that belong to root. Lots of possibilities
  here---RMP.

  o  grep finds text patterns in files. For example,



       $ grep -l "geology" *.tex



  lists the files *.tex that contain the word ``geology''. The variant
  zgrep works on gzipped files. RMP;

  o  regular expressions are a complex but darn powerful way of
     performing search operations on text. For example, ^a[^a-
     m]X{4,}txt$ matches a line that starts with `a', followed by any
     character except those in the interval a-m, followed by 4 or more
     `X', and ends in `txt'. You use regular expressions with advanced
     editors, less, and many other applications. man grep for an
     introduction.

  o  script <script_file> dumps the screen contents on script_file until
     you issue the command exit. Useful for debugging;

  o  sudo allows users to perform some of root's tasks (e.g.  formatting
     and mounting disks; RMP);

  o  uname -a gives you info about your system;

  o  zcat and zless are useful for browsing and piping gzipped files
     without decompressing them. For example:
       $ zless textfile.gz
       $ zcat textfile.gz | lpr



  o  The following commands often come in handy: bc, cal, chsh, cmp,
     cut, fmt, head, hexdump, nl, passwd, printf, sort, split, strings,
     tac, tail, tee, touch, uniq, w, wall, wc, whereis, write, xargs,
     znew. RMP.



  11.6.  Practicing UNIX under DOS/Windows


  Believe it or not, there are fine tools that provide a UNIX-like
  environment under DOS/Windows! One is the Djgpp suite (
  <http://www.delorie.com/djgpp>) for DOS, while Cygnus (
  <http://www.cygnus.com>) is a more complex port for Win32. Both
  include the same GNU development tools and utilities as Linux; you
  won't get the same stability and performance, though.

  If you'd like to have a taste of Linux, try out Djgpp. Download and
  install the following files (as of this writing, the latest version is
  2.02): djdev202.zip, bnu281b.zip, bsh1147b.zip, fil316b.zip,
  find41b.zip, grep22b.zip, gwk303b.zip, lss332b.zip, shl112b.zip..
  Installation instructions are provided, and you can find assistance on
  <news:comp.os.msdos.djgpp>.

  In particular, using bash under DOSWin is a whiff of fresh air. To
  configure it properly, edit the supplied file BOOT.BAT to reflect your
  installation, then put these files in your home directory (in the
  Windows partition) instead of those provided:



       # this is _bashrc

       LS_OPTIONS="-F -s --color=yes"
       alias cp='cp -i'
       alias d='ls -l'
       alias l=less
       alias ls="ls $LS_OPTIONS"
       alias mv='mv -i'
       alias rm='rm -i'
       alias u='cd ..'



  # this is _bprof
  if [ -f ~/_bashrc ]; then
    . ~/_bashrc
  fi
  PS1='\w\$ '
  PS2='> '
  CDPATH="$CDPATH:~"
  # stuff for less(1)
  LESS="-M-Q"                     # long prompt, silent
  LESSEDIT="%E ?lt+%lt. %f"       # edit top line
  VISUAL="jed"                    # editor
  LESSCHARSET=latin1              # visualise accented letters
  export PS1 PS2 CDPATH LS_OPTIONS LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET



  11.7.  Common Extensions and Related Programs


  You may come across scores of file extensions. Excluding the more
  exotic ones (i.e. fonts, etc.), here's a list of who's what:


  o  1 ... 8: man pages. Read them with groff -Tascii -man <file.1>.

  o  arj: archive made with arj.

  o  dvi: output file produced by TeX (see below). xdvi to visualise it;
     dvips to turn it into a PostScript .ps file.

  o  gz: archive made with gzip.

  o  info: info file (sort of alternative to man pages). Get info.

  o  lsm: Linux Software Map file. It's a plain ASCII file containing
     the description of a package.

  o  ps: PostScript file. To visualise or print it get gs and,
     optionally, ghostview or gv.

  o  rpm: Red Hat package. You can install it on any system using the
     package manager rpm.

  o  taz, tar.Z: archive made with tar and compressed with compress.

  o  tgz, tar.gz: archive made with tar and compressed with gzip.

  o  tex: text file to submit to TeX, a powerful typesetting system.
     Get the package tex, available in many distributions.

  o  texi: texinfo file, can produce both TeX and info files (cp.
     info). Get texinfo.

  o  xbm, xpm, xwd: graphic file.

  o  Z: archive made with compress.



  11.8.  Converting Files



  If you need to exchange text files between DOS/Win and Linux, be aware
  of the ``end of line'' problem. Under DOS, each line of text ends with
  CR/LF (that is, ASCII 13 + ASCII 10), with LF under Linux. If you edit
  a DOS text file under Linux, each line will likely end with a
  strange--looking `M' character; a Linux text file under DOS will
  appear as a kilometric single line with no paragraphs. There are a
  couple of tools, dos2unix and unix2dos, to convert the files.

  If your text--only files contain accented characters, make sure they
  are made under Windows (with Notepad) and not under plain DOS;
  otherwise, all accented characters will be screwed up.

  To convert Word or WordPerfect files to plain text, the matter is a
  bit trickier but possible. You'll need one of the tools that can be
  found on the CTAN sites; one is  <ftp://ftp.tex.ac.uk>.  Get the
  program word2x from the directory /pub/tex/tools/, or try one the
  programs available in directory /pub/tex/support/. In particular,
  word2x converts Word 6 files, while for Word 97 files you'll need
  mswordview ( <http://www.csn.ul.ie/~caolan/docs/MSWordView.html>) that
  turns them to HTML.



  11.9.  Free Office Suites


  If converting files is not enough, you have the choice of sinking your
  teeth into a (free!) Microsoft Office--like package.

  The StarOffice suite is free for private use. It's big, somewhat slow,
  but very good anyway: it offers a lot of functionality not found in
  Microsoft Office. It can also read and write Word and Excel files,
  although the conversion isn't always perfect. Home page:
  <http://www.stardivision.com>.

  Another good package is Corel WordPerfect, a free edition of which is
  available for download. Should I say more? Go fetch it:
  <http://www.corel.com>.



  12.  The End, for Now


  Congratulations! You have now grasped a little bit of UNIX and are
  ready to start working. Remember that your knowledge of the system is
  still limited, and that you are expected to do more practice with
  Linux to use it comfortably. But if all you had to do was get a bunch
  of applications and start working with them, what I included here is
  enough.

  I'm sure you'll enjoy using Linux and will keep learning more about
  it---everybody does. I bet, too, that you'll never go back to DOSWin!
  I hope I made myself understood and did a good service to my 3 or 4
  readers.



  12.1.  Copyright


  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at  <linux-howto@sunsite.unc.edu> via email.



  12.2.  Disclaimer


  ``From DOS to Linux HOWTO'' was written by Guido Gonzato,
  <REMOVE_MEguido@ibogeo.df.unibo.it>. (Remove ``REMOVE_ME''.)  Many
  thanks to Matt Welsh, the author of ``Linux Installation and Getting
  Started'', to Ian Jackson, the author of ``Linux frequently asked
  questions with answers'', to Giuseppe Zanetti, the author of
  ``Linux'', to all the folks who emailed me suggestions, and especially
  to Linus Torvalds and GNU who gave us Linux.

  This document is provided ``as is''. I put great effort into writing
  it as accurately as I could, but you use the information contained in
  it at your own risk. In no event shall I be liable for any damages
  resulting from the use of this work.

  Feedback is welcome. For any requests, suggestions, flames, etc., feel
  free to contact me.

  Enjoy Linux and life,

  Guido   =8-)



  The dosemu HOWTO
  by Mike Deisher.


  Updated by Uwe Bonnes for dosemu-0.64.4, 15 March 1997

  Updated by David Hodges, davidhodges@altavista.net


  ______________________________________________________________________

  Table of Contents



  1. The preliminaries

     1.1 What is dosemu, anyway?
     1.2 What operating systems does dosemu work under ?
     1.3 What processors does dosemu work on ?
     1.4 What if I have an Alpha/Sparc/Motorola/other non-Intel CPU ?
     1.5 Do I need MS-DOS to use dosemu ?
     1.6 Can I run Microsoft Windows programs under dosemu ?
     1.7 I want to run something that won't run under DOSemu or Wine
     1.8 Names and numbers
     1.9 What version of Dosemu should I use?
     1.10 What's the newest version of dosemu and where can I get it?
     1.11 Where can I ask questions?
     1.12 Where can I report bugs and ask questions?
     1.13 What documentation is available for dosemu?
     1.14 I have a program that fails, not listed in EMUfailure.txt
     1.15 How do I submit changes or additions to the HOWTO?
     1.16 Message from Greg...

  2. Compiling and installing dosemu

     2.1 Where are the installation instructions?
     2.2 Top ten problems while compiling and installing dosemu.
     2.3 How do I make aout binaries?
     2.4 How do I compile dosemu on a machine with low memory?
     2.5 Compilation fails with some strange error regarding "slang"
     2.6 What configurable options are available ?
     2.7 Do I need to run dosemu as root?
     2.8 How do I patch dosemu ?
     2.9 What versions of DOS are known to run with dosemu ?

  3. Hard disk setup

     3.1 How do I use my hard disk with dosemu?
     3.2 How can I access the hdimage from Linux?
     3.3 Can I use my stacked/double-spaced/super-stored disk?
     3.4 Creating your own hdimage file.

  4. Parallel ports, serial ports and mice

     4.1 Port access worked with older version, but doesn't work now!
     4.2 Port access was faster with older versions!
     4.3 Where are the (microsoft compatible) mouse drivers?
     4.4 Why doesn't the mouse driver work?
     4.5 Why does dosemu clobber COM4?
     4.6 How do I use dosemu over the serial ports?
     4.7 How can I switch between dosemu and a shell over the serial line?
     4.8 How can I get the parallel ports to work?

  5. Multiple users and Non-interactive sessions

     5.1 Can I use dosemu on a multi-user system?
     5.2 How can I run dos commands non-interactively?

  6. dosemu and Netware

     6.1 How do I get Netware access from dosemu?

  7. dosemu and X-windows(97/2/9).

     7.1 Can I run dosemu in console mode while running X?
     7.2 Is it possible to run dosemu in a window in X-windows?
     7.3 Xdos dosen't work on a remote X-display!
     7.4 Xdos dosen't find the VGA font
     7.5 The vga font is very small on my high resolution display
     7.6 Dosemu compilation fails with some strange error regarding X!
     7.7 Does ansi emulation work properly?

  8. dosemu and MS-Windows 3.1

     8.1 Is it possible to run MS-Windows 3.1 under dosemu?
     8.2 Can I run 32bit stuff with winemu
     8.3 Errormessage: Cannot find the vdtapi.386 file when starting dosemu
     8.4 Windows 3.x in xdos:
     8.5 Can I install windows from within dosemu?
     8.6 Notes for the mouse under win31-in-xdos:
     8.7 Why did my Icon disappear from the Program manager?

  9. Video and sound

     9.1 Can I run 32-bit video games under dosemu?
     9.2 Exiting from dosemu gives me a screen full of garbage.
     9.3 Why doesn't my soundcard software work with dosemu?

  10. Games

     10.1 Duke3d dosen't work

  11. Problems and fixes

     11.1 Security issues
     11.2 dosemu says "ERROR: general protection" and terminates when I run some program
     11.3 Dosemu dies when booting. I have Win95 installed.
     11.4 Dosemu hangs! How can I kill it?
     11.5 Dosemu crashed and now I can't type anything.
     11.6 I've enabled EMS memory in dosemu.conf but it does not help.
     11.7 How do I get rid of all those annoying "disk change" messages?
     11.8 Why won't dosemu run a second time after exiting in console mode?
     11.9 Why will dosemu run in a term but not in the console?
     11.10 How can I speed up dosemu?
     11.11 My CDROM drive has problems reading some files under dosemu.
     11.12 How do I see debugging output?
     11.13 Why are my keystrokes echoed ttwwiiccee??
     11.14 Dosemu scrambles my screen?
     11.15 MS FoxPro 2.6 won't run

  12. Contributing to the dosemu project

     12.1 Who is responsible for dosemu?
     12.2 I want to help.  Who should I contact?


  ______________________________________________________________________


  1.  The preliminaries

  1.1.  What is dosemu, anyway?

  To quote the manual, "dosemu" is a user-level program which uses
  certain special features of the Linux kernel and the 80386 processor
  to run MS-DOS/FreeDOS/DR-DOS in what we in the biz call a `DOS box.'
  The DOS box, a combination of hardware and software trickery, has
  these capabilities:

  o the ability to virtualize all input/output and processor control
  instructions

  o the ability to support the word size and addressing modes of the
  iAPX86 processor family's "real mode," while still running within the
  full protected mode environment

  o the ability to trap all DOS and BIOS system calls and emulate such
  calls as are necessary for proper operation and good performance

  o the ability to simulate a hardware environment over which DOS
  programs are accustomed to having control.

  o the ability to provide DOS services through native Linux services;
  for example, dosemu can provide a virtual hard disk drive which is
  actually a Linux directory hierarchy."


  1.2.  What operating systems does dosemu work under ?

  Dosemu is primarily written for Linux. It also works on NetBSD and
  possibly FreeBSD, however the graphics emulation is unlikely to work
  on NetBSD, which means that all DOS programs that use graphics mode
  (most DOS programs) will not work under NetBSD.


  1.3.  What processors does dosemu work on ?

  Dosemu only works on Intel 80x86 processors, e.g. 80386, 80486,
  Pentium etc.


  1.4.  What if I have an Alpha/Sparc/Motorola/other non-Intel CPU ?

  Dosemu only works on Intel 80x86 processors but there are
  alternatives: Bochs (http://www.bochs.com) is an open source shareware
  PC emulator that runs on most Unixes (as well as MS-Windows), and
  there are other (non-free) alternatives - see the comp.emulators.misc
  FAQ, available via usenet or ftp://rtfm.mit.edu/pub/usenet-by-
  hierarchy/comp/emulators/misc/


  1.5.  Do I need MS-DOS to use dosemu ?

  No. You need some version of DOS but not necessarily MS-DOS.  See the
  section "What versions of DOS are known to run with dosemu ?"


  1.6.  Can I run Microsoft Windows programs under dosemu ?

  Not reliably. You would be better to use the Windows emulator Wine
  (http://www.winehq.com). If you insist on running Windows under
  dosemu, see section 8 - dosemu and MS-Windows 3.1.


  1.7.  I want to run something that won't run under DOSemu or Wine

  See section 1.4.

  1.8.  Names and numbers


       (xx/yy/zz) means day zz in month yy in year xx.



       winemu mean WinOS/2 running in dosemu.



  1.9.  What version of Dosemu should I use?

  Dosemu uses the same numbering scheme as the kernel. Uneven second
  numbers are for possible unstable developer releases, even second
  numbers are for releases considered stable. At the time of writing,
  0.98.8 is the latest stable release, while 0.99.10 is the latest
  developer's release. So if you want to use dosemu, get the latest
  stable release.


  1.10.  What's the newest version of dosemu and where can I get it?

  The newest version of dosemu as of 99/04/09 is dosemu0.98.8 and can be
  ftp'ed from:

       ftp://ftp.dosemu.org/pub/dosemu/



  Remember that this is ALPHA code, however: there may be serious bugs
  and very little documentation for new features. The development
  version is particularly likely to have bugs. Please use it only if you
  like to do active development. Don't report bugs in the development
  version, fix them instead.


  1.11.  Where can I ask questions?

  If you have problems regarding installing and running dosemu after
  reading the documentation, first try to help yourself: Your question
  has probably been asked and perhaps answered before. Try some search
  engine on the internet to retrieve that information. E.g. you can ask

       http://www.dejanews.com


  to find all newsnet articles containing the keywords of your question.
  Helping yourself will probably be faster than asking a well known
  question. It also frees up the time of developers from answering
  trivial question and so helps the further development of dosemu.


  1.12.  Where can I report bugs and ask questions?

  If you want to ask questions and report bugs regarding dosemu, you
  should consider subscribing to the linux-msdos mailing list.  To
  subscribe, send mail to Majordomo@vger.rutgers.edu with the following
  command in the body of your email message:

      subscribe linux-msdos your_username@your.email.address


  If you ever want to remove yourself from the mailing list, you can
  send mail to Majordomo@vger.rutgers.edu with the following command in
  the body of your email message:

      unsubscribe linux-msdos your_username@your.email.address


  (95/8/11). When you are subscribed to linux-msdos, you can send your
  report as mail to linux-msdos@vger.rutgers.edu. There is a gate that
  send mails to linux-msdos@vger.rutgers.edu as postings to the news-
  group named linux.dev.msdos. If your News provider doesn't carry that
  group, ask her(him) to add that group.  Before you ask a question, you
  should carefully read all of the documentation, including this HOWTO
  and check one of the mailing list archives listed at
  http://www.dosemu.org/mailinglist.html to see whether your question
  has already been asked and answered.


  1.13.  What documentation is available for dosemu?

  Dosemu comes with documentation. The main documentation files
  README.txt and README-tech.txt cover virtually all aspects of dosemu
  and may be more up-to-date than this HOWTO.

  The "dosemu Novice's Altering Guide" or DANG is a road map to the
  inner workings of dosemu.  It is designed for the adventurous, those
  who wish to modify the source code themselves.  The DANG is maintained
  by Alistair MacDonald (alistair@slitesys.demon.co.uk) and is found in
  the doc directory of the dosemu source tree.


  The EMU failure list (EMUfailure.txt) is a partial list of programs
  known not to work under dosemu.


  And then, of course, there is the dosemu FAQ/HOWTO.  But you already
  know about that, don't you.  It is also posted once in a while to the
  mailing list and found in the doc-directory.  The most recent version
  can be found at http://www.dosemu.org.


  1.14.  I have a program that fails, not listed in EMUfailure.txt

  First check, if the failure of your program is not caused by some of
  the fundamental incapabilities of dosemu, listed in EMUfailure.txt. If
  you think you have something new, please report to linux-
  msdos@vger.rutgers.edu.  Perhaps it can be made going with the help
  others. Give detailed information about your setup, tell the version
  of kernel, dosemu etc and name the observed errors. You can use xdos
  to cut and paste the error message into your report. But keep your
  report in a readable form. We know the content of ../etc/config.dist.
  So only send the active lines from your dosemu.conf. Try running
  dosemu with some or all debug output turned on and scan through your
  debug output and at first only send those parts you think are
  relevant. Few people are willing to decode some long attachment to a
  mail, to do debugging for others. But keep your logs at hand, in case
  others ask detailed questions.



  1.15.  How do I submit changes or additions to the HOWTO?

  The preferred method is to edit the file dosemu-HOWTO-xx.x.sgml to
  incorporate the changes, create a diff file by typing something like


       diff -uw original-file new-file


  and send it to davidhodges@altavista.net.  If you do not know SGML,
  that's ok.  Changes or new information in any form will be accepted.
  Creating the diff file just makes it easier on the HOWTO maintainer.
  :-)



  1.16.  Message from Greg...

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Greg Hankins, the Linux HOWTO
  coordinator, at gregh@cc.gatech.edu(95/8/11).


  2.  Compiling and installing dosemu

  2.1.  Where are the installation instructions?

  The installation instructions are in the file, "QuickStart", included
  in the distribution.


  2.2.  Top ten problems while compiling and installing dosemu.


  1. Forgetting to read the QuickStart Guide.

  2. Try to compile some old version of dosemu.

  3. Try to compile with a kernel older than 2.0.28 or 2.1.15.

  4. Having the wrong linux kernel source sitting in /usr/src/linux or
  missing /usr/src/linux/include/version.h

  5. Use dosemu with a kernel that does not have IPC compiled in.

  6. Compile with gcc older than 2.7.2 or libc older than 5.x.x.

  7. Forget to edit your /etc/dosemu.conf, /etc/dosemu.users and
  /var/lib/dosemu/global.conf files

  8. Run DOSEMU with partition access while they are already mounted.

  9. Don't install dosemu with sufficient privileges (i.e., root).

  10. Try to run programs that use DPMI without enabling dpmi in
  /etc/dosemu.conf


  2.3.  How do I make aout binaries?

  Starting with version 0.64.4 there is no a.out support any more.  If
  you absolutely need it, you must use version 0.64.3.1.  The configure
  script then should take care for this, if you setup is a standard
  setup.



  2.4.  How do I compile dosemu on a machine with low memory?

  Marty Leisner (leisner@sdsp.mc.xerox.com) reported (95/4/8) that

  If you have problems with running out of swap space you may want to
  add CFLAGS+=-fno-inline after CFLAGS is defined in dpmi/Makefile.  Be
  careful before you do this and check for the existence of swap space.
  I found Linux crashes at times when it has no swap space.


  2.5.  Compilation fails with some strange error regarding "slang"

  You probably have

       slangforce off


  in your compiletime-settings file. You need to change it to

       slangforce on


  and recompile.


  2.6.  What configurable options are available ?

  The compiletime-settings.help file describes the options you can
  change at compile time. The README.txt file describes the options you
  can change at run time.


  2.7.  Do I need to run dosemu as root?

  No. Although dosemu drops root privilege wherever possible, it is
  still safer to not run dosemu as root, especially if you run DPMI
  programs under dosemu. Most normal DOS applications don't need dosemu
  to run as root, especially if you run dosemu under X.  Thus you should
  not allow users to run a suid root copy of dosemu, wherever possible,
  but only a non-suid copy. You can configure this on a per-user basis
  using the /etc/dosemu.users file.

  Programs that require direct access to hardware ports (e.g. if the
  program needs to talk to some unusual hardware that is not supported
  by Linux and dosemu) require dosemu to run as root but printers,
  serial ports, mice and video cards (and to a small extent sound -
  hopefully more soon) are emulated by dosemu so you don't need direct
  hardware access and don't need to run as root to use these.


  2.8.  How do I patch dosemu ?

  If you do patch dosemu from one version to another, do "make
  pristine;./configure; make".  If you don't make pristine, at least the
  version of the new executable will be wrong, if the whole thing
  compiles at all(97/2/9).



  2.9.  What versions of DOS are known to run with dosemu ?

  All versions of DOS should work with dosemu, with the following
  caveats:

  FreeDOS (http://www.freedos.org) does not (yet) have a working
  redirector so you will not be able to access your Linux filesystem or
  Novell networking under FreeDOS. Note also that FreeDOS is unreliable
  beta software and may crash unexpectedly, trash its filesystem, etc.
  etc.


  DOS 4.01 had problems by itself, so it won't work reliably with dosemu
  either.


  With MsDos-7 aka Win95 you must not start the graphic shell at bootup.
  If you make the hdimage bootable with the so called "Rescue Disk" you
  are offered to make during the Windows installation, you get the right
  settings. If you use your normal Win95 installation to transfer the
  system files, have a look at the msdos.sys written on the hdimage and
  change the settings under the section [Options] to have entries like
  [Options] Logo=0 BootGUI=0


  3.  Hard disk setup

  3.1.  How do I use my hard disk with dosemu?

  First, mount your dos hard disk partition as a Linux subdirectory.
  For example, you could create a directory in Linux such as /dos (mkdir
  -m 755 /dos) and add a line like

     /dev/hda1       /dos     msdos   umask=022


  to your /etc/fstab.  (In this example, the partition is mounted read-
  only.  You may want to mount it read/write by replacing "022" with
  "000" and using the -m 777 option with mkdir).  Now mount /dos.  The
  README.txt says:



    you just can have a Linux directory containing all what you
    want to have under your DOS C:. Copy your IO.SYS, MSDOS.SYS or what
    ever to that directory (e.g. /var/lib/dosemu/bootdir), put

            $_hdimage = "bootdir"


    into your /etc/dosemu.conf, and up it goes. DOSEMU makes a lredir'ed
    drive out of it and can boot from it. You can edit the config.sys and
    the autoexec.bat within this directory before you start dosemu.  Fur-
    ther more, you may have a more sohisticated setup. Given you want to
    run the same DOS drive as you normal have when booting into native
    DOS, then you just mount you DOS partition under Linux (say to /dos)
    and put links to its subdirectories into the boot dir. This way you
    can decide which files/directories have to be visible under DOSEMU and
    which have to be different. Here's a small and incomplete example
    bootdir setup:


           config.sys
           autoexec.bat
           command.com -> /dos/command.com
           io.sys -> /dos/io.sys
           msdos.sys -> /dos/msdos.sys
           dos -> /dos/dos
           bc -> /dos/bc
           windows -> /dos/windows


    There is, however, one drawback, you can't use the DosC kernel
    (FreeDos) for it, because it hasn't yet a working redirector (will
    hopefully be available some time in the future).



  3.2.  How can I access the hdimage from Linux?

  Use mtools. With a line in /etc/mtools.conf like


     drive n:  file="/var/lib/dosemu/hdimage" MTOOLS_SKIP_CHECK=1 \
     MTOOLS_LOWER_CASE=1 MTOOLS_NO_VFAT=1 partition=1 offset=128


  you can use the mtools on the hdimage, like "mdir n:". "mcopy n:/con-
  fig.emu /tmp" copies the config.emu file from the hdimage to /tmp/con-
  fig.emu. You can edit it there and copy it back. Use a drive letter
  you find sensible. "N:" is only an example.


  3.3.  Can I use my stacked/double-spaced/super-stored disk?

  At this time, compressed drives cannot be accessed via the redirector
  (lredir or emufs) on a standard kernel. There is a patch for the
  kernel to mount compressed files under the name "dmsdosfs".  Find it
  on sunsite.unc.edu and its mirrors

       http://sunsite.unc.edu:/pub/Linux/system/filesystems/dosfs/


  A good idea is also to look in http://sun-
  site.unc.edu:/pub/Linux/Incoming for a newer version.  The "wholedisk"
  option in older versions of dosemu is no longer allowed in recent ver-
  sions, however, a line like

     $_hdimage = "/dev/hda1"


  may work, at the risk that you could lose all data in that partition
  on a dosemu crash.

  If your dos partition is already mounted with write access and you try
  to run dosemu with partition access, dosemu will print a warning
  message and abort.  This prevents DOS and Linux from making
  independent writes to your disk and trashing the data on your dos
  partition(95/8/11).

  ---------------------

  If LILO is installed, the above will not work.  However...

  Thomas Mockridge (thomas@aztec.co.za) reported (94/8/5) that

  To boot dosemu with LILO and Stacker 4.0 I did a little work around...

  1. dd the MBR to a file. (or norton utility, etc., first 512 bytes)

  2. Boot dos (from full boot not emu), do a fdisk /mbr, make your dos
  partition active with (dos) fdisk.

  3. Copy the new MBR to a file.

  4. Replace the original MBR

  5. Copy the second MBR to /var/lib/dosemu/partition.hda? (Whichever is
  your dos partition)

  6. Set dosemu.conf

                 disk {partition "/dev/hda? ?"}



  7. Start dosemu and and voila!  No LILO.

  For recent versions of dosemu you need to change the

                 disk {partition "/dev/hda? ?"}


  line to something like

                 $_hdimage = "/dev/hda1"


  ---------------------

  Holger Schemel (q99492@pbhrzx.uni-paderborn.de) reported (94/2/10)
  that

  Works even fine under dosemu with MS-DOS 6.0. If you have problems,
  then you have to edit the file 'DBLSPACE.INI' manually and change the
  disk letter to the letter your drive gets under dosemu.

  ---------------------

  Darren J Moffat (moffatd@dcs.gla.ac.uk) also reported (94/3/27)

  "...use 6.2 if you can get it!!  Just make sure you have a LILO boot
  disk on hand since dos 6{.2} will change the MBR of the boot HZ."

  3.4.  Creating your own hdimage file.

  The easy way is to use mkdexe - see README.txt for details.  The old-
  fashioned way (I don't know why anyone would want to do it that way
  any more but here it is, just in case) is as follows:

  There is an extra util program called mkfatimage16 which allows for
  creating a hdimage file headers.  The full information is in the
  manpage (man/mkfatimage16.1) included in your distribution.

  To create a hard disk image file with a geometry corresponding to that
  of a real hard disk of 32 megabytes run:

  mkfatimage16 -k 32768 > hdimage



  This is probably too large for most needs; if you need this much
  space, consider using the disk redirector."

  Usually it is a good idea to format the drive after it.


  4.  Parallel ports, serial ports and mice

  4.1.  Port access worked with older version, but doesn't work now!

  Read ../doc/README.txt  and the port-section in ../etc/config.dist


  4.2.  Port access was faster with older versions!

  To have a chance to log port access, by default every port access
  produces an exception out of vm86-mode. This takes some time.  If you
  don't want to log port access, use the keyword "fast" in the
  appropriate port statement.


  4.3.  Where are the (microsoft compatible) mouse drivers?

  Tom Kimball (tk@pssparc2.oc.com) reported (93/11/24) that

  Several people said to use a different mouse driver and suggested
  some.  I found a couple that seem to work fine.

     oak.oakland.edu:/pub/msdos/mouse/mouse701.zip   (mscmouse)
     oak.oakland.edu:/pub/msdos/mouse/gmous102.zip   (gmouse)


  Normally you can use dosemu's internaldriver, so you don't need any
  additional mousedriver in dosemu outside winemu(97/2/10).


  4.4.  Why doesn't the mouse driver work?

  Mark Rejhon (mdrejhon@magi.com) reported (95/4/7) that

  If you start the mouse driver and it just hangs (it might actually
  take 30-60s), but if you are waiting longer than a minute for the
  mouse driver to start, try specifying the COM port that the mouse is
  on, at the mouse driver command line.



  4.5.  Why does dosemu clobber COM4?

  Rob Janssen (rob@pe1chl.ampr.org) reported (94/3/24) that

  According to jmorriso@bogomips.ee.ubc.ca, "dosemu still clobbers COM4
  (0x2e8, IRQ 5). 0x2e8 isn't in ports{} in config.  I have to run
  setserial /dev/cua3 irq 5 on it after dosemu exits."

  This is caused by your VGA BIOS.  I have found that by enabling the IO
  port trace and seeing where it was clobbered.

  Disable the "allowvideoportaccess on" line in config and it will work
  fine.  When you then have problems with the video, try to enable more
  selective ranges of IO addresses (e.g., 40-43).


  4.6.  How do I use dosemu over the serial ports?



  4.7.  How can I switch between dosemu and a shell over the serial
  line?

  John Taylor (taylor@pollux.cs.uga.edu) reported (94/5/25) that

  I am running Linux 1.1.13 and want to point out a great feature that
  should be protected and not taken out (IMHO). With the 52 version, I
  can run the program, "screen."  From screen, i can invoke dos -D-a.
  What is really great (IMHO) is the screen commands (the CTRL-A cmds)
  still work. This means I can do a CTRL-A C and add another unix shell,
  and switch between the two (DOS / UNIX).  This allows me to use dosemu
  over the serial line really well, because switching is made easy.


  4.8.  How can I get the parallel ports to work?

  The dosemu.conf has lines at the end to redirect printers to either
  lpr or a file.  If you want direct access to the bare metal, comment
  out these emulation lines, and add the line

       $_ports { device /dev/lp0 fast range 0x3bc 0x3bf  } # lpt0


  for the "monitor card" printer port (corresponds to /dev/lp0), or

       $_ports { device /dev/lp1 fast range 0x378 0x37f } # lpt1


  or

       $_ports { device /dev/lp1 fast range 0x278 0x27f } # lpt2


  for LPT1 (/dev/lp1) or LPT2 (/dev/lp2) respectively(97/2/9).

  Hans Lermen (lermen@dosemu.org) writes:

  But NOTE: these lines should not be _added_ simply, the string should
  be concatenated such as:

  $_ports = "...." $_ports = $_ports, " device /dev/lp0 fast range 0x3bc
  0x3bf" = This blank is important



  5.  Multiple users and Non-interactive sessions

  5.1.  Can I use dosemu on a multi-user system?

  Yes, you can configure dosemu on a per-user basis. See README.txt for
  details.


  5.2.  How can I run dos commands non-interactively?


  You can do any of the following: 1. redirect a file to dosemu standard
  input 2. use the keystroke configuration option and the -I command
  line option as described in the README.txt file to specify keystrokes
  on the command line that will act exactly as if you had typed them
  within dosemu 3. use the mkdexe program to create a DEXE file - a
  small DOS filesystem image containing just the program you want to run
  - see the README.txt file for details.

  Here are some additional alternatives:


  Daniel T. Schwager (danny@dragon.s.bawue.de) reported (94/7/2) that

  You can use different dosemu.conf files (and different hd-boot-images
  with different autoexec.bat's) and call dosemu like

  $ dos -F my_quicken_q_exe_dosemu.conf



  ---------------------


  Dietmar Braun (braun@math20.mathematik.uni-bielefeld.de) reported
  (94/7/4) that

  This is no problem at all when you use the redirector of dosemu.  It
  is possible to redirect a drive letter to a linux path given by an
  environment variable.

  So I have a shell script named "DOS" which does something like

   mkdir /tmp/dos.$$
   DOSTMP=/tmp/dos.$$; export DOSTMP


  and then a little trick to get "echo $* > $DOSTMP/startup.bat" really
  working (actually a small C Program which turns '/' in '\' and termi-
  nates lines correctly for messy dos with cr/lf pairs and adds ^Z at
  the end of the file), creates startup files, links and so on in this
  directory, and then starts dosemu. Within "autoexec.bat" drive c: is
  redirected from hdimage to this tmp-directory, which has links for
  $HOME and $PWD.

  So if I want to see my filenames shortened to 8.3 I can type "DOS dir"
  and I get my current directory listing.  So I have full DOS multi user
  (I don't have any DOS partition and redirecting to Linux preserves
  user permissions) and multi tasking. (dosemu sessions are completely
  independent).  I did this once to be able to use a dos driver for my
  printer. My printcap df is actually a DOS program. So you can even
  make DOS executables act as lpr filters.



  6.  dosemu and Netware

  6.1.  How do I get Netware access from dosemu?

  As always, access through the Linux filesystem is preferred. Mount
  your Netware drives with Caldera's Netware utilities or Volker
  Lendecke's free ncpfs utility
  (ftp://ftp.gwdg.de:/pub/linux/misc/ncpfs). If you need real IPX
  access, e.g. to run Novell's "syscon", read ../doc/NOVELL-HOWTO.txt.
  You probably can not currently access Netware from FreeDOS.


  7.  dosemu and X-windows(97/2/9).

  7.1.  Can I run dosemu in console mode while running X?

  Ronald Schalk (R.Schalk@uci.kun.nl) reported (94/1/17) that

  Yes, no problem.  Just remember to use ctrl-alt-<Fn> to go to a
  Virtual Console (VC), and you can run any Linux application (dosemu is
  a linux-application).  I've got almost always WP5.1 in a dos session.

  [Note:  Use ctrl-alt-F7 to switch back to X from dosemu, if X runs on
  VC7.]



  7.2.  Is it possible to run dosemu in a window in X-windows?

  If you have X installed and you have successfully compiled dosemu and
  run it successfully outside X-windows, you should be able to run
  "xdos" or "dos -X" right away to bring up a dosemu window.  If this
  does not work, make sure:


    1. Dosemu has X support compiled in. This is default, however
       if you you have compiled dosemu with "x off" in the
       compiletime-settings file you don't have X support. So changing
       "x off" to "x on" in the compiletime-settings file, followed by
       "make pristine; make; make install" should build
       you a dosemu-executable with X support, if you have the
       X-libraries installed in /usr/X11R6.
    2. Set up your X key-mappings.  In an xterm, type

       xmodmap -e "keycode 22 = 0xff08"
       xmodmap -e "keycode 107 = 0xffff"

       These lines fix the backspace and delete keys respectively.
    3. Configure the X-related configuration options in your
       /etc/dosemu.conf file.



  Alternatively, you can run dosemu inside a color xterm, which is not
  recommended because many color xterms have buggy support for the
  complex text display capabilities of dosemu.  This does not require
  X_SUPPORT to be compiled into dosemu.  However, if you really want to
  do this, do the following steps:



    1. Install ansi_xterm.  The recommended package is available as:
       tsx-11.mit.edu:/pub/linux/ALPHA/dosemu/Development/ansi-xterm-R6.tar.gz

    2. Set up your X key-mappings.  In an xterm, type

       xmodmap -e "keycode 22 = 0xff08"
       xmodmap -e "keycode 107 = 0xffff"

       These lines fix the backspace and delete keys, respectively.

    3. Configure the terminal-related (not X-related) settings in
       /etc/dosemu.conf



  Marty Leisner (leisner@sdsp.mc.xerox.com) reported (95/3/31) that

  I have xrdb log the following resources

       dosxterm*Font:  vga dosxterm*geometry:      80x25 dosxterm*saveLines:
       25


  or I alias "dosxterm" to "term -fn vga -title dosxterm -geometry 80x25
  -sl 25"

  If you use the xrdb method, all you have to do is run "xterm -name
  dosxterm"


  7.3.  Xdos dosen't work on a remote X-display!

  At present, dosemu is set up to use the MIT shared memory extensions.
  This extension only works on a local display. If you want to run xdos
  on a remote display, compile dosemu with "mitshm off" in the
  compiletime-settings file after a "make pristine" or on the clean
  source tree(97/2/9).


  7.4.  Xdos dosen't find the VGA font

  Check that the vga fonts you installed are listed in the font.dir of
  the directory you installed the fonts in:


       hertz:~> grep misc /usr/X11R6/lib/X11/XF86Config
           FontPath    "/usr/X11R6/lib/X11/fonts/misc/"
       hertz:~> grep vga /usr/X11R6/lib/X11/fonts/misc/fonts.dir
       vga.pcf vga
       vga11x19.pcf vga11x19
       hertz:~> ls /usr/X11R6/lib/X11/fonts/misc/vga*
       /usr/X11R6/lib/X11/fonts/misc/vga.pcf
       /usr/X11R6/lib/X11/fonts/misc/vga11x19.bdf
       /usr/X11R6/lib/X11/fonts/misc/vga11x19.pcf



  If you installed some X-fonts, like you did when you installed dosemu
  with X-Support for the first time,  "mkfontdir" and then "xset fp
  rehash" needs to be run. The dosemu install should take care for
  "mkfontdir" and tells you about "xset fp rehash". Tell us if it
  doesn't work for you.  (97/2/13)


  7.5.  The vga font is very small on my high resolution display

  Look for the vga11x19 font.  (97/2/13)


  7.6.  Dosemu compilation fails with some strange error regarding X!

  As stated above, dosemu uses the MIT shared memory extensions by
  default. Under XFree86 they are only available with Version 3.1.2 and
  above. If you have an older version, consider to upgrade, or configure
  dosemu to not use this extension (see last section)(97/2/9).


  7.7.  Does ansi emulation work properly?

  Marty Leisner (leisner@sdsp.mc.xerox.com) reported (95/3/31) that

  Yes.  I use nnansi.com under X windows.  I find 25, 43 and 50 line
  mode work properly, however 50 line mode is difficult to use on a
  1024x768 screen (unless smaller fonts are used or you use a bigger
  screen.  43 line mode will resize the xterm window to use 43 lines.



  8.  dosemu and MS-Windows 3.1

  8.1.  Is it possible to run MS-Windows 3.1 under dosemu?

  The ../doc/README.Windows file says:


  ***************************************************************
  *    WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!   *
  *                                                             *
  *  Danger Will Robinson!!!  This is not yet fully supported   *
  *  and there are many known bugs!  Large programs will almost *
  *  certainly NOT WORK!!!  BE PREPARED FOR SYSTEM CRASHES IF   *
  *  YOU TRY THIS!!!                                            *
  *                                                             *
  *    WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!   *
  ***************************************************************



  Okay, it is possible to boot WINOS2 (the modified version of Windows
  3.1 that OS/2 uses) under DOSEMU.  Many kudos to Lutz & Dong!

  However, YOU NEED BOTH LICENSES, for WINDOWS-3.1 as well OS/2 !!!

  There are many known problems.  Windows is prone to crash, could take
  data with it, large programs will not load, etc. etc. etc.  In other
  words, it is NOT ready for daily use.  Many video cards are known to
  have problems (you may see a nice white screen, however, look below
  for win31-in-xdos).  Your program groups are all likely to disappear.
  ...  Basically, it's a pain.

  for more details see the README.txt file.


  8.2.  Can I run 32bit stuff with winemu

  Sorry, no you can't.  Win32s needs stuff running in ring 0. That's a
  "nono" with linux.  (97/04/27)



  8.3.  Errormessage: Cannot find the vdtapi.386 file when starting
  dosemu

  As explained above, winemu can't handle 32 bit stuff. All drivers
  ending in 386 are 32bit. So to run winemu, you have to delete all
  references to .386 drivers in your win.ini.  (97/04/27)


  8.4.  Windows 3.x in xdos:

  As of version 0.64.3 DOSEMU is able to run Windows in xdos. Of course,
  this is not recommended at all, but if you really want to try, it is
  safer then starting windows-31 on the console, because _when_ it
  crashes, it doesn't block your keyboard or freeze your screen.

  Hints:

  1. Get Dosemu & Linux source.
  2. Unpack dosemu.
  3. Run "./configure" to configure Dosemu (it will enable vm86plus as a
     default).
  4. Type "make" to compile.
  5. Get a Trident SVGA drivers for Windows. The files are tvgaw31a.zip
     and/or tvgaw31b.zip. They are available at garbo.uwasa.fi in
     /windows/drivers (any mirrors?).
  6. Unpack the Trident drivers.
  7. In Windows setup, install the Trident "800x600 256 color for 512K
     boards" driver.
  8. Do the things described above to get and install OS2WIN31.
  10. Start xdos.
  11. In Dosemu, go to windows directory and start winemu.
  12. Cross your fingers.



  8.5.  Can I install windows from within dosemu?

  No you can't. Dos will tell you something like

       The XMS driver you have on your system is not compatible with Win-
       dows...


  You need to install windows from Dos. You can copy the windows tree to
  somewhere on your Linux Filesystem and use lredir to mount it on the
  same place as it is in dos. Example:

       You have windows in d:\windows You have d:\ mounted as /dosc in Linux
       You copy the windows tree to Linux, e.g. "cp -a /dosd/windows
       /usr/share Inside dosemu you redirect the copied tree like lredir d:
       linux\fs\dosd


  Now dosemu can't mess around in you windows directory, but changes in
  the windows directory aren't seen by dosemu too. If you want to do the
  same with windows on drive c:> look in this FAQ how to redirect c:.

  But you can use "setup" from inside the windows directory to install
  drivers and change some settings.  (97/2/1497)


  8.6.  Notes for the mouse under win31-in-xdos:

  1. Use the mouse driver "mouse.drv" from WinOS2

  2. In order to let the mouse properly work you need the following in
  your win.ini file:

       [windows]
       MouseThreshold1=0
       MouseThreshold2=0
       MouseSpeed=0



  3. The mouse cursor gets not painted by X, but by windows itself, so
  it depends on the refresh rate how often it gets updated, though the
  mouse coordinates movement itself will not get delayed.  ( In fact you
  have 2 cursors, but the X-cursor is given an 'invisible' cursor shape
  while within the DOS-Box. )

  4. Because the coordinates passed to windows are interpreted
  relatively, we need to calibrate the cursor. This is done
  automatically whenever you enter the DOS-Box window: The cursor gets
  forced to 0,0 and then back to its right coordinates. Hence, if you
  want to re-calibrate the cursor, just move the cursor outside and then
  inside the DOS-Box again.  (97/2/10)


  8.7.  Why did my Icon disappear from the Program manager?

  MS-Windows and WinOS2 handle the program manager group differently.
  While MS-Win store the setup in progman.ini, WinOS2 wants the contents
  of progman.ini in system.ini. Here's a tip from (friest@acm.org (Todd
  T. Fries)):

       cat progman.ini >> system.ini


  Be sure to use >> :-)


  9.  Video and sound

  9.1.  Can I run 32-bit video games under dosemu?

  Mark Rejhon (mdrejhon@magi.com) reported (95/4/8) that

  With the recent DPMI improvements that has gone into 0.60, you can now
  run some 32-bit video games in dosemu.   If the game is compatible in
  an OS/2 DOS box, there are chances that it will work in dosemu.
  (Example 32-bit games include Descent, Dark Forces, Mortal Kombat 2,
  Rise of The Triad, which have all successfully been tested in recent
  dosemu releases).

  Before you attempt to run a video game, you must have the keyboard
  configured in raw keyboard mode and enabled VGA graphics modes, in the
  /etc/dosemu.conf file.

  Note, however, you will have to turn off the sound in the game.
  (Someone will have to program in sound board emulation before we can
  avoid this).  Note that game timers can be a little bit slow, due to
  Linux multitasking and lack of high-frequency timer support.  So the
  games may run from anywhere from 5 to 100 percent speed.  Typically,
  the speed is approximately 50 percent in recent dosemu releases and is
  expected to improve eventually.

  Who knows, it might even work. If you can't get it to work, check
  EMUfailure.txt if the program is listed there, or falls in a category
  of programs that at present don't or probably never work with dosemu.
  If you think, it should be listed in EMUfailure.txt, report to linux-
  msdos@vger.rutgers.edu

  There is a security hole when having enabled DPMI and having dosemu
  suid root (especially when using dos4gw-based games), the client is
  able to access the whole user space, hence also can modify the dosemu
  code itself. Use of the 'secure' option in /etc/dosemu.conf, e.g.

       $_secure = "ngd" # secure for: n (normal users), g (guest), d (dexe)


  disables this. It is better to run dosemu as a normal user under X
  rather than root anyway.


  9.2.  Exiting from dosemu gives me a screen full of garbage.

  (95/4/8)

  The problem is that the font information for the VGA text screen is
  not being saved.  Get a copy of the svgalib package.  The current
  source is in

  sunsite.unc.edu:/pub/Linux/libs/graphics/svgalib-1.3.1.tar.gz


  It may also be available as a pre-compiled package in your favorite
  Linux distribution (e.g., Slackware, etc.).  Use savetextmode to save
  the current text mode and font to a file in /tmp before running
  dosemu.  Then run textmode upon exiting dosemu to restore it.

  Addition from (lermen@elserv.ffm.fgan.de(97/2/11)):

  Have a look also at src/arch/linux/debugger/README.recover and
  README.dosdebug, dosdebug can aid you recovering.


  9.3.  Why doesn't my soundcard software work with dosemu?

  Dosemu includes a rudimentary soundblaster emulator called SBemu - the
  documentation for it is currently at
  http://www.slitesys.demon.co.uk/a.macdonald/dosemu/sound/ This is a
  work in progress, not completed yet so much or most DOS software that
  uses sound will not work correctly with it yet.


  10.  Games

  10.1.  Duke3d dosen't work

  Hans Lermen <lermen@elserv.ffm.fgan.de> said (97/2/16): duke3d must be
  'configured' via a setup, within this setup you have to choose


  11.  Problems and fixes

  11.1.  Security issues

  A full featured Dosemu needs to be suid root, e.g to access ports.
  Most dos programs don't need this however so when running under X you
  usually do not need to run dosemu as root.  Dosemu runs as suid "root"
  only where it is needed, and releases this right thereafter. But with
  DPMI, the Dos client programm can access the whole user space, hence
  also can modify the dosemu code itself. Use of the 'secure' option in
  /etc/dosemu.conf disables this.  There are several other important
  security considerations discussed in the Security section of the
  README.txt file.
  11.2.  dosemu says "ERROR: general protection" and terminates when I
  run some program

  This will happen if your program uses DPMI and you do not have DPMI
  enabled. Try changing the line

  $_dpmi = (off)


  in /etc/dosemu.conf to

  $_dpmi = (nnnn)


  where nnnn is the number of kilobytes of memory you wish to give to
  the DOS program (e.g. Doom requires about 4000 kilobytes). If you do
  this, you should not run dosemu as root (see the Security Issues sec-
  tion) - it is better not to run dosemu as root whenever possible, in
  any case.

  Another likely cause is that your program uses VCPI (see
  EMUfailure.txt for more details) or some other means of switching to
  protected mode (other than DPMI), in which case it will never work
  under dosemu.

  If none of these is the case, see section 1.14 I have a program that
  fails, not listed in EMUfailure.txt.


  11.3.  Dosemu dies when booting. I have Win95 installed.

  Dosemu relies that the Dos-Version on the hdimage and the Drive you
  map to contain command.com are the same. If not, dosemu will crash
  sooner or later. With the dual boot option Win95 offers when pressing
  the F4,F5 and F8 Keys with the "Starting Win95" text, versions on the
  Win95 drive may swap. Take special care for command.com. Let your
  shell variable in config.emu point to the correct static version of
  command.com, e.g.: shell=c:\win95\command.com c:\ /P /E:1024
  (97/02/28)



  11.4.  Dosemu hangs! How can I kill it?

  Switch to another console and type dosdebug, then type kill (it may
  take a while but will work eventually).


  11.5.  Dosemu crashed and now I can't type anything.

  Daniel Barlow(jo95004@sable.ox.ac.uk) reported (95/4/8) that

  If you have no terminal or network access that you can use to log in,
  you may have to press the reset button.  If you can still get a usable
  shell somehow, run "kbd_mode -a" to switch the keyboard out of raw
  mode, and/or "stty sane" on the console so that you can see what
  you're typing.

  A useful thing to do is to use a script to run dosemu, and run
  "kbd_mode -a" automatically right after dosemu.  When dosemu crashes,
  the script usually will resume running, and execute the "kbd_mode -a"
  command.



  11.6.  I've enabled EMS memory in dosemu.conf but it does not help.

  Rob Janssen (rob@pe1chl.ampr.org) reported (94/7/11)

  Don't forget to load the provided ems.sys from the config.sys file.


  11.7.  How do I get rid of all those annoying "disk change" messages?

  (94/8/11)

  Grab and install klogd.  Try

           sunsite.unc.edu:/pub/Linux/system/Daemons/sysklogd1.2.tgz



  11.8.  Why won't dosemu run a second time after exiting in console
  mode?

  Aldy Hernandez (aldy@sauron.cc.andrews.edu) reported (94/7/8) that

  You should disable your video and/or BIOS caching.


  11.9.  Why will dosemu run in a term but not in the console?

  JyiJiin Luo (jjluo@casbah.acns.nwu.edu) reported (94/4/19) that

  I experienced exactly the same problem before. I figured out all the
  video shadow in my AMI BIOS must be disabled. Now dosemu runs fine on
  my system.


  11.10.  How can I speed up dosemu?

  In some cases it is useful to play with the value of the HogThreshold
  variable in your dosemu.conf file.


  Daniel Barlow(jo95004@sable.ox.ac.uk) reported (95/4/8) that

  HogThreshold should now be set to approximately half of the BogoMips
  value that the system reports on boot.



  11.11.  My CDROM drive has problems reading some files under dosemu.

  Vinod G Kulkarni (vinod@cse.iitb.ernet.in) reported (94/4/7) that

  When a CDROM is mounted from linux and used from within dosemu (mapped
  drive), there could be some problems. The CD-ROM driver (iso9660) in
  the kernel tries to find out the type of the file (i.e. binary or
  text).  If it can't find, it tries to guess the type of the file using
  a heuristic. This heuristic fails under some circumstances when a
  (almost) text file is to be treated as binary.  (I do not know if it
  is a bug or feature.)

  The result of this is that if you copy such a file from CD-ROM (from
  linux itself, and not necessarily dosemu), the resulting file will be
  usually bigger than original file. (Blanks get added before ^J,^M.)
  So a program running in dosemu gives an error or hangs, which may be
  mistaken as problem of dosemu.

  Rob Janssen (pe1chl@rabo.nl) reported (94/8/10) that

  The way to solve this is to turn off conversion altogether.  Pass the
  option "-o conv=binary" to the mount command mounting the CD-ROM, or
  use the following in /etc/fstab:

  /dev/cdrom      /cdrom          iso9660 conv=binary,ro


  No patches to the kernel are necessary.


  11.12.  How do I see debugging output?

  Daniel Barlow(jo95004@sable.ox.ac.uk) reported (95/4/8) that

  As of dosemu 0.60, debugging output is redirected to a file specified
  on the command line.  Use "dos -D+a -o /tmp/debug" to log all debug
  output to /tmp/debug.  There should no longer be any need to redirect
  stderr.



  11.13.  Why are my keystrokes echoed ttwwiiccee??

  Nick Holloway (alfie@dcs.warwick.ac.uk) reported (94/2/22) that

  After running dos after playing with some stty settings, I was getting
  doubled key presses.  I can now reveal what the reason is!

  It only happens when dos is run on the console with 'istrip' set.
  This is (I think) because the raw scancodes are mutilated by the
  'istrip', so that key release events look like key press events.

  So, the input processing needs to be turned off when using the scan
  codes on a console (it wouldn't be a good idea to do it for tty
  lines).


  11.14.  Dosemu scrambles my screen?

  For those graphics cards not fully supported in dosemu, with allowed
  console graphics a dosemu crash may leave your console in a scrambles
  and nearly unusable way. To prepare for that situation, Spudgun
  <spudgun@earthlight.co.nz> posted the following solution. First save
  your registers when running on the console ~> cat
  /usr/bin/savetextmode ~> restoretextmode -w /etc/textregs ~>
  restorefont -w /etc/fontdata Then, when a crash happened, run
  following script: restoretextmode -r /etc/textregs restorefont -r
  /etc/fontdata restorepalette

  If it doesn't fix it nothing will I also found having an X server
  running sometimes put my Vid card's registers into a strange state
  where this script made things worse I think since changing X servers
  and/or running savetextmode on a vt while X was running helped.
  (97/04/08)


  11.15.  MS FoxPro 2.6 won't run

  FoxPro 2.6 doesn't run on network drives. Alexey Naidyonov
  <growler@growler.tsu.tula.ru> states on that problem: And I guess your
  FoxPro files are on lredir'ed disk, yeah? The matter is that FoxPro
  doesn't run on such disk, but when I said disk { partition ... } in
  /etc/dosemu/conf, it runs.

  12.  Contributing to the dosemu project

  12.1.  Who is responsible for dosemu?


  Dosemu is built upon the work of Matthias Lautner and Robert Sanders.
  Hans Lermen (lermen@dosemu.org) is responsible for organizing the
  latest releases of dosemu.

                         History of dosemu

            Version    Date                Person
           -------------------------------------------------
            0.1        September 3, 1992   Matthias Lautner
            0.2        September 13, 1992  Matthias Lautner
            0.3        ???                 Matthias Lautner
            0.4        November 26, 1992   Matthias Lautner
            0.47       January 27, 1993    Robert Sanders
            0.47.7     February 5, 1993    Robert Sanders
            0.48       February 16, 1993   Robert Sanders
            0.48pl1    February 18, 1993   Robert Sanders
            0.49       May 20, 1993        Robert Sanders
            0.49pl2    November 18, 1993   James MacLean
            0.49pl3    November 30, 1993   James MacLean
            0.49pl3.3  December 3, 1993    James MacLean
            0.50       March 4, 1994       James MacLean
            0.50pl1    March 18, 1994      James MacLean
            0.52       June 16, 1994       James MacLean
            0.60       April 9, 1995       James MacLean
            0.64.4     February 9,1997     Hans Lermen
            0.66.3     April 20, 1997      Hans Lermen
            0.98.1     December 9, 1998    Hans Lermen
            0.98.6     March 21, 1999      Hans Lermen



  12.2.  I want to help.  Who should I contact?

  The dosemu project is a team effort.  If you wish to contribute, see
  the DPR (dosemu Project Registry).  A current copy may be found in
  doc/DANG.



  DVD Playing HOWTO
  Nathan Rowlan, nkr@helo.org
  v0.1.8 5 June 2000

  A (hopefully) easy to follow explanation on how to get DVD movie play
  back in Linux.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Goal
     1.2 New Versions
     1.3 Copyrights and Trademarks
     1.4 Thanks
     1.5 Translations

  2. Requirements

  3. Files

  4. Installation

     4.1 Kernel
     4.2 LiViD Utilities

  5. Playing

  6. Additional Stuff

     6.1 Setting up MTRR's

  7. Problems

     7.1 Run time errors
        7.1.1 Illegal Instruction Error
     7.2 Compilation errors
        7.2.1 `dvd_struct' undeclared...
        7.2.2 can't determine absolute dir of '../../../../src/plugin/codec/mpeg2dec/.libs'
     7.3 Broken stuff
     7.4 Other errors

  8. To Do



  ______________________________________________________________________

  1.  Introduction

  1.1.  Goal

  The purpose of this is to provide step by step instructions on getting
  DVD movies to play in Linux. I will try to be as clear as possible,
  but if something is confusing or incorrect, please tell me about it
  and I'll fix it. If you have any questions, you can subscribe to the
  livid-dev mailing list by sending a blank email to livid-dev-
  subscribe@linuxvideo.org.

  1.2.  New Versions

  This howto is available in many formats, including html and tex. The
  newest version can always be retrieved from my site at
  http://helo.org/dvd/howto/ <http://helo.org/dvd/howto/>. It is highly
  recommended that you get the most recent version, as  this howto is
  being updated quite often.

  1.3.  Copyrights and Trademarks

  This manual may be reproduced in whole or in part, without fee,
  subject to the following restrictions:


    The copyright notice above and this permission notice must be
     preserved complete on all complete or partial copies.

    Any translation or derived work must be approved by the author in
     writing before distribution.

    If you distribute this work in part, instructions for obtaining the
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

    Small portions may be reproduced as illustrations for reviews or
     quotes in other works without this permission notice if proper
     citation is given.

  Exceptions to these rules may be granted for acedemic purposes: Write
  to the author and ask. These restrictions are here to protect us as
  authors, not to restrict you as learners and educators. Any souce code
  (aside from the SGML this document was written in) in this document is
  placed under the GNU General Public License, available via anonymous
  FTP from the GNU archive <ftp://ftp.gnu.org/GNU/COPYING>.

  1.4.  Thanks

  Thanks to the authors of oms and the rest of the LiViD developers, who
  have given the project much of their time and work, and also to those
  individuals who have given me feedback to make this HOWTO better.

  Much of the layout of this HOWTO was gotten from the HOWTO-HOWTO,
  written by Mark F. Komarinski.  It can be found at
  http://www.linuxdoc.org/ <http://www.linuxdoc.org/>.

  1.5.  Translations

  Any translations of this document that I recieve go into
  http://helo.org/dvd/howto/trans/ <http://helo.org/dvd/howto/trans/>.
  If you would like to translate this howto, please email me at
  nkr@helo.org.

  2.  Requirements


  This HOWTO assumes you have:

    Linux > v2.2.0

    XFree86 3.3.X

    A DVD-ROM/RAM/RW drive supported in Linux (most are)

    A decent knowledge of bash and english

    A master's degree in Nuclear Engineering



  3.  Files

  First things first, you need to get a kernel with MTRR (more on this
  later) and DVD ioctl support. While MTRR's have been in the kernel
  since 2.2.11 (correct me if I'm wrong), you will probably need to
  update your kernel to get DVD ioctls.  There are two ways to skin this
  cat, you can either download a development kernel (v2.3.x), or patch a
  stable release kernel (v2.2.x), the patches are at
  http://www.kernel.dk/ <http://www.kernel.dk/>, and the kernel can be
  found on your favorite mirror of ftp://ftp.kernel.org/
  <ftp://ftp.kernel.org>.

  Next, you need to get the LiViD utilities. This can be done two ways:


    Get the LiViD utilities from CVS, so you can update it as it is
     being updated by the developers. (recommended)



         The following commands will retrieve them:

         # mkdir ~/livid
         # cd ~/livid
         # export CVSROOT=:pserver:anonymous@cvs.linuxvideo.org:/cvs/livid
         # cvs login
         (Logging in to anonymous@cvs.linuxvideo.org)
         CVS password:

         There is no password for anonymous, just press enter.

         # cvs -z3 co -P ac3dec oms mpeg2dec mgadvd

         They should download into their respective directories.



     If you don't like CVS (freak!), you can download the most recent
     nightly tarball of LiViD. This contains more than you need, but if
     you are really afraid of using CVS for some reason, suit yourself.


         It can be found at:

         http://linuxvideo.org/developer/data/livid.tar.gz



  4.  Installation

  4.1.  Kernel

  If you have a development kernel (2.3.x), you should already have DVD
  ioctl support, so you just need to make sure you have MTRR support
  enabled in the kernel configuration, and then compile and install it
  as you normally would.


  If you want to patch your exisiting kernel, start by going to


          http://www.kernel.dk/


  and downloading the correct patch for your kernel.


  If don't know how to install or patch your kernel, you should go read
  the Kernel HOWTO at:


          http://howto.tucows.com/LDP/HOWTO/Kernel-HOWTO.html



  4.2.  LiViD Utilities

  To install the LiViD utilities, you need to make sure you have
  /usr/local/lib somewhere in /etc/ld.so.conf.

  The following commands should compile and install the LiViD utilities
  on your system.  If you have problems, please see the "Problems"
  section.



        ac3dec:

          # cd ~/livid/ac3dec
          # ./autogen.sh
          # make
          # make install

        mpeg2dec:

          # cd ~/livid/mpeg2dec
          # ./autogen.sh
          # make
          # make install

        oms:

          # cd ~/livid/oms
          # ./autogen.sh
          # ./configure
          # make
          # make install



  Now the necessary LiViD utilities should be installed.  oms needs some
  special fifo pipes to be created for the DVD data to travel over.
  These can be made with the following commands (if they don't already
  exist):



          # mkfifo /tmp/video
          # mkfifo /tmp/audio



  One last thing to do. Oms needs /dev/dvd to be a symlink to where your
  DVD drive resides, such as /dev/hdb1 or /dev/scd0.  If it is at
  /dev/cdrom, you would create the link by typing:


          # ln -s /dev/cdrom /dev/dvd

  It is generally a good idea not to make a symlink to a symlink,
  because it adds unnecessary I/O.  Replace /dev/cdrom with the correct
  device that your dvd drive is on.

  5.  Playing


  To play a DVD, you need to be running X in 16-bit color mode. With the
  DVD in the drive, type:



          # ac3dec /tmp/audio& mpeg2dec /tmp/video& oms



  If all has gone well, some text should fly by, followed by it asking
  you if you want it to look up the name of the disk in the DVDDB.  It
  is safe to say yes. Then, the oms panel should pop up. Click the play
  button and the video window should appear and begin playing.

  6.  Additional Stuff

  6.1.  Setting up MTRR's



                  ** Note to Matrox video card owners **

                  If you have matroxfb compiled into the kernel,
                  chances are that your MTRR's are already set
                  up.  You can probably just skip this section.



  Setting up your MTRR's can increase video performance quite a bit in
  some cases, so it is a good idea to do it.  First, you need to make
  sure you have MTRR support in your kernel by typing:



             # ls /proc/mtrr



  If it tells you that there is no such thing as /proc/mtrr, you need to
  recompile your kernel with MTRR support (it is under "Processor type
  and features" in menuconfig).


  Once you know MTRR is working, you need to know the base memory
  address of your video card, and how much video ram it has.  The
  easiest way to do this is to look at the output of X as it starts up.
  Because the output usually scrolls off the screen and is lost when it
  switches to a different tty, you need to redirect the output of X to a
  file (xoutput) so you can go back and look at it to get the needed
  values.  This can be done by typing:



             # startx 2> xoutput



  The line having the needed information is probably somewhere towards
  the middle of xoutput, and should look something like:



             (--) SVGA: PCI: NVidia Riva TNT2 rev 17, Memory @ 0xee000000, 0xe2000000



  Once you have located that, write down the last memory address, in
  this case 0xe2000000.  Depending on your hardware, you may or may not
  have multiple memory addresses shown, so don't worry if yours looks a
  little different. With this information recorded, you can delete
  xoutput.


  Next you need to create a new MTRR. In order to do that, you have know
  how much ram your video card has in hex. Here are some common values:



             4MB  -- 0x400000
             8MB  -- 0x800000
             16MB -- 0x1000000
             32MB -- 0x2000000



  To add the MTRR, type:



             # echo "base=0xe2000000 size=0x2000000 type=write-combining" >| /proc/mtrr



  Substituting "0xe2000000" and "0x2000000" with the base address and
  amount of video ram specific to your system.


  Now you should have MTRR set up, and just to make sure, type:



             # cat /proc/mtrr



  And you should get output that looks remotely similar to:



             reg00: base=0x00000000 (   0MB), size= 128MB: write-back, count=1
             reg01: base=0xe2000000 (3616MB), size=  32MB: write-combining, count=1



  Again, the number of entries will probably be different from these,
  don't sweat it.


  7.  Problems

  7.1.  Run time errors

  This is a (small) list of known run-time errors.

  7.1.1.  Illegal Instruction Error

  If you use a non-Intel chip (K6 especially), and you are getting this
  error when you try to run mpeg2video, try editing nist/configure.in,
  lines 129 and 130:



                 CFLAGS="$CFLAGS -DHAVE_MMX -DLINUX -march=i686 -fschedule-insns2 -malign-doub
                 CXXFLAGS="$CXXFLAGS -DHAVE_MMX -DLINUX -march=i686 -fschedule-insns2 -malign-



  replace "-march=i686" in both with "-march=i586", and then recompile
  and reinstall.

  7.2.  Compilation errors

  This is a running list of common compilation errors that have known
  fixes.

  7.2.1.  `dvd_struct' undeclared...

  The most frequent problem people have when trying to compile these
  utilities stems from oms looking in the wrong place for the kernel
  headers. By default, it uses /usr/include/[linux|asm], but those
  headers are from a stable kernel so that when you compile a normal
  program, it will be using stable headers. oms needs to use non-stable
  (or patched) kernel headers, so when oms tries to compile, many things
  are undeclared and compilation fails. The best way to fix this is to
  edit the oms Makefile and -I/usr/src/linux/include to the CFLAGS and
  CXXFLAGS. (thanks to Adam Powell for this info)


          These commands should do it:

          # mkdir /usr/include/old
          # mv /usr/include/linux /usr/include/old/linux
          # mv /usr/include/asm /usr/include/old/asm
          # mv /usr/include/scsi /usr/include/old/scsi
          # ln -s /usr/src/linux/include/linux /usr/include/linux
          # ln -s /usr/src/linux/include/scsi /usr/include/scsi
          # ln -s /usr/src/linux/include/asm /usr/include/asm



  7.2.2.  can't determine absolute dir of '../../../../src/plu
  gin/codec/mpeg2dec/.libs'

  Another common error is with the oms/src/plugin/codec/mpeg2dec/.libs
  directory. For some reason or another, this directory does not exist,
  and it needs to for compilation. To fix it, just make the directory:


          # mkdir src/plugin/codec/mpeg2dec/.libs



  7.3.  Broken stuff

  Features that don't currently work as intended:

    None of the chapter seek buttons work very well (crash).

    Once stopped, it doesn't like to start again (crash).

    Audio/video like to skip every second or so.

    Extreme slowdowns at beginning of chapters with mpeg2dec.

    Sometimes ac3dec doesn't close properly, and must be killed via
     "killall ac3dec".

  7.4.  Other errors

  If your problem isn't listed here, then likely the current CVS code
  has a bug in it. The best thing to do is just to wait a few days, and
  then try updating from CVS. There is a mailing list where you can ask
  questions, to subscribe send a blank email to livid-dev-
  subscribe@linuxvideo.org.

  8.  To Do


    Get someone with a Matrox card to send me a list of things they did
     to improve performance. (dent!!!)

    Makefile options (HAVE_MMX, HAVE_3Dnow, etc)

    -march=k6 for mpeg2dec

    add easy MTRR stuff (framebuffer)

    add need for region coding to be set on most drives:
     www.linuxtv.org/dvd



  Diald Howto
  Andrs Seco AndresSH@ctv.es
  v1.03, April 17, 2000

  This document shows some typical scenarios for easy start using Diald.
  These scenarios include a connection from a standalone computer to an
  ISP using PPP over a modem without using pon/poff or ppp-on/ppp-off to
  a proxy/firewall server with different Internet connections through
  various ISPs.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Objectives
     1.2 New versions
     1.3 Thanks

  2. Copyright and discharge of responsibility

  3. Quick Diald operation description

  4. Note about authentication

     4.1 Username and password - Login and password prompts.
     4.2 PAP - Password Authentication Protocol
     4.3 CHAP - Challenge Authentication Protocol

  5. Notes about DNS name resolution

  6. Connecting a standalone computer to an ISP using a modem and PPP

     6.1 /etc/diald/diald.options or diald.conf file
     6.2 Personal filters file
     6.3 Making the call
     6.4 Connection start script

  7. Conecting a computer to a group of different ISPs with a modem and PPP

     7.1 Note about sending mail using a relay host
     7.2 Scripts to automate multiple connections and changing from one to another
        7.2.1 Starting up
        7.2.2 New provider
        7.2.3 Changing from one to another

  8. Connecting a proxy/firewall to an ISP using a modem and PPP

     8.1 Example for Debian 2.1
     8.2 Example for Suse 6.1
     8.3 Example for Slackware 3.6

  9. Programs and versions used

  10. More information



  ______________________________________________________________________

  1.  Introduction



  1.1.  Objectives


  This document shows some typical scenarios for easy start using Diald.
  These scenarios include a connection from a standalone computer to an
  ISP using PPP over a modem without using pon/poff or ppp-on/ppp-off to
  a proxy/firewall server with different Internet connections through
  various ISPs.

  In the present document, the following scenarios will be treated:

    Connecting a standalone computer to an ISP using a modem and PPP

    Conecting a computer to a group of different ISPs with a modem and
     PPP

    Connecting a proxy/firewall to an ISP using a modem and PPP

  In following versions of this document, other scenarios will be added,
  as multiple instances of Diald, ISDN lines and lines used to call and
  receive calls.

  Before this document, a Diald-mini-Howto exist, wrote by Harish Pillay
  h.pillay@ieee.org, that presented and example of connection to an ISP
  using a chat based authentication scheme (login and password previous
  to the pppd start, with no use of PAP or CHAP).

  Example configuration files will be included in this document to serve
  as starting point to get Diald up. To obtain maximum performance and
  all programs attributes, it is necesary you read all documentation
  from the programs and reconfigure the example configuration files
  included here.

  Finally, configuration files can be in different directories depending
  on what GNU/Linux distribution you are using. If you find a file
  commented here in other directory, please, write me.


  1.2.  New versions


  Latest version of this document can be found in my web page
  http://www.ctv.es/USERS/andressh/linux, in SMGL and HTML formats.
  Other versions and formats can be found in Spanish in the Insflug web
  site, http://www.insflug.org/documentos/Diald-Como/, and in other
  languages in the LDP - Linux Documentation Project,
  http://www.linuxdoc.org.


  1.3.  Thanks


  I want to be grateful to the people that help me to get my first Diald
  up and running with their example files (somebody who's name i forgot,
  Mr Cornish Rex, Hoo Kok Mun and John Dalbec), to the people that have
  wrote me to send corrections and suggestions for this document (Tim
  Coleman, Jacob Joseph, Paul Schmidt and Jordi Mallach), to the future
  translators of this document to other languages, and, of course, to
  all the people that have developed and develops Diald for us.

  This document was originally wrote in Spanish. The own author
  translated it, and some people made corrections.



  2.  Copyright and discharge of responsibility


  This document is Copyright  2000 Andres Seco, and it's free. You can
  distribute it under the terms of the GNU General Public License, which
  you can get at http://www.gnu.org/copyleft/gpl.html. You can get
  unofficial translated issues somewhere in the Internet.

  Information and other contents in this document are the best of our
  knowledge. However, we may have made errors. So you should determine
  if you want to follow the instructions given in this document.

  Nobody is responsible for any damage to your computer and any other
  loss derived from the use of the information contained herein.

  THE AUTHOR AND MAINTAINERS ARE NOT RESPONSIBLE FOR ANY DAMAGE INCURRED
  DUE TO ACTIONS TAKEN BASED ON INFORMATION CONTAINED IN THIS DOCUMENT.

  Of course, i am open to all type of suggestions and corrections on the
  content of this document.


  3.  Quick Diald operation description


  In a few words, Diald creates a new network interface and sets it as
  the default gateway. This interface is not real (in the original
  documentation it is called proxy interface). Diald monitors this
  interface, and, when packets arrive, makes a ppp connection, waits for
  it to be stablished and changes the default gateway to this new ppp
  interface (usually ppp0).

  Diald monitors the interface to determine which packets have been
  received the interface and their types to decide if they are going to
  be considered to set the ppp connection up, maintain the link, drop it
  or do nothing, and how long the link should be help up after the
  packet is transmitted.

  Finally, if there is no more traffic and the last packet up time is
  over, Diald will close the link.

  You can control days and hours when the link can go up and when it
  cannot, so you can use the low cost hours/days or low trafic times.

  This previous description is valid for Diald versions from 0.16.5 to
  latest (0.99.3 when this document was finished), but latest versions
  also include aditional attributes such as user enabled list, advanced
  accounting, better support for ISDN lines, better performance using an
  ethertap device as proxy (this is like a network interface that
  read/writes over a socket instead of a real network adapter) in place
  of slip, backup connections and other functions.


  4.  Note about authentication


  When you connect to an Internet Services Provider, it is usually
  necesary that you send an username and a password. This can be
  accomplished using several methods; the exact method that you use is
  determined by your provider.

  Added to the three shown options, you can use a link without
  authentication, (generally when the remote end is also yours).



  4.1.  Username and password - Login and password prompts.


  Actually, this is not an usual authentication method to access the
  Internet through an ISP.

  Identification is made before pppd is started, and it is the dialer,
  usually chat, who sends the login name and the password. This data is
  sent in plaintext, so this method should not be considered secure.

  An example script for chat where you can see how to specify username
  and password to be sent before running pppd would look something like
  this:



       ABORT BUSY
       ABORT "NO CARRIER"
       ABORT VOICE
       ABORT "NO DIALTONE"
       ABORT "NO ANSWER"
       "" ATZ
       OK ATDT_TelephoneNumber_
       CONNECT \d\c
       ogin _Username_
       assword _Password_



  The last 2 lines define username and password, and when to send it
  (after receiving ogin and assword respectively.  The chat script
  only needs to see parts of the words login and password and so we
  don't check the first letter of each.  This is so that we don't need
  to worry about uppercase/lowercase characters.

  Suppose that this script is called provider, and it is saved into the
  /etc/chatscripts directory. Then, you can run it with:



       /usr/sbin/chat -v -f /etc/chatscripts/provider



  4.2.  PAP - Password Authentication Protocol


  If the provider you are using requires PAP as the authentication
  protocol, during the LCP negotiation in PPP this protocol will be
  asked to use this protocol. When the phone call is connected after
  using chat, pppd is started. In this scenario, pppd will send the
  username and the password, which it will look for in the /etc/ppp/pap-
  secrets file. This file must have read and write permissions only for
  root only, so that nobody else can read the passwords inside it.

  PAP is not very secure, as the password is sent in plaintext, so can
  be read by somebody that monitors your transmission line.

  Simple example of /etc/ppp/pap-secrets:



  _Username_ * _Password_



  4.3.  CHAP - Challenge Authentication Protocol


  If the provider you are using requires CHAP as the authentication
  protocol, during the LCP negotiation in PPP this protocol will be
  asked to use this protocol. When the phone call is connected after
  using chat, pppd is started. In this scenario, pppd will send the
  username and the password, which it will look for in the
  /etc/ppp/chap-secrets file. This file must have read and write
  permissions only for root only, so that nobody else can read the
  passwords inside it.

  CHAP is more secure than PAP, as the password is never sent through
  the transmission line in plaintext. The authentication server sends a
  random identifier (the challenge), that the client must encrypt with
  its password, and then send back to the server.

  Simple example of /etc/ppp/chap-secrets:



       _Username_ * _Password_



  Sometimes an ISP uses PAP and other times CHAP, so it is common to
  define your username and password in both files.


  5.  Notes about DNS name resolution


  Everytime you connect to an ISP, it is necesary to have configured DNS
  name resolution, so your computer can find IP addresses associated to
  a computer name.

  IP addresses of your DNS servers are placed into the /etc/resolv.conf
  file.

  In a standalone computer connecting to Internet, this file usually
  contains the IP addresses of your ISP's DNS servers:



       #/etc/resolv.conf file for ISPname
       nameserver 111.222.333.444
       nameserver 222.333.444.555



  In a proxy/firewall computer, this file usually contains its own IP
  address (or the loopback address, 127.0.0.1), and this computer
  includes a DNS server that translates DNS names to IP addresses by
  querying external DNS servers.



  #/etc/resolv.conf file for local DNS resolution
  nameserver 127.0.0.1



  Installation of a local DNS server is out of the scope of this
  document.  There is a lot of documentation about this, but a good and
  quick approach can be found in the DNS-Howto
  (http://www.linuxdoc.org/HOWTO/DNS-HOWTO.html).


  6.  Connecting a standalone computer to an ISP using a modem and PPP


  When configuring Diald to connect your computer to an ISP, the next
  steps will be necesary:

    Getting the Diald package installed. The quickest way is to install
     the package that comes with your GNU/Linux distribution.

    Configure DNS resolver (/etc/resolv.conf file).

    Check that you can call an ISP. If your GNU/Linux distribution
     includes an utility to configure a connection, the quickest way
     will be to use it (pppconfig in Debian, kppp if you use KDE, etc).
     If you are having problems connecting to an ISP, the PPP-Howto
     (http://www.linuxdoc.org/HOWTO/PPP-HOWTO.html), Modem-Howto
     (http://www.linuxdoc.org/HOWTO/Modem-HOWTO.html) and Serial-Howto
     (http://www.linuxdoc.org/HOWTO/Serial-HOWTO.html) documents can
     help you.

    Configure username and password in the /etc/ppp/pap-secrets and
     /etc/ppp/chap-secrets files, as mentioned in previous sections.

  And finally, going into Diald:


    Prepare the Diald configuration file (/etc/diald/diald.options for
     version 0.16.5 and /etc/diald/diald.conf for later versions).

    Prepare filters file /etc/diald/standard.filter, or better, leave
     that file as is, and modify a copy of it that you can call
     /etc/diald/personal.filter.

    Prepare the script to make the call (/etc/diald/diald.connect with
     execute permissions for root) and instruction file for chat
     (/etc/chatscripts/provider), that will be used by the previous
     script.

    Prepare scripts to be run when the link goes up and down
     (/etc/diald/ip-up and /etc/diald/ip-down) if you want to use it
     (both must have execute permissions for root).

    Prepare script to set and delete routes (/etc/diald/addroute and
     /etc/diald/delroute) if you want (both must have execute
     permissions for root). This step is not necesary if you only use a
     single Diald instance.

    Finally, start the diald daemon (/etc/init.d/diald start in
     Debian, /etc/rc.d/init.d/diald start in RedHat).  Normally, Diald
     package installation process prepares the scripts to run Diald when
     the computer boot up in the /etc/rcX.d directories.

  If you make any change in the Diald config file when it is running, it
  is necesary to restart it (/etc/init.d/diald restart in Debian,
  /etc/rc.d/init.d/diald restart in RedHat).


  6.1.  /etc/diald/diald.options or diald.conf file


  In this example file you must check for:

    Comm port where your modem is connected. Option device.

    Comm port speed to talk with modem. Option speed.

    User name to be used in ppp. Option pppd-options.

    Retry counters and timers.

    Enabled connection hours. Options restrict.

    Decide if you want to use the ip-up and ip-down scripts.  Options
     ip-up and ip-down.

    Decide if you want to use the addroute and delroute scripts.
     Options addroute and delroute. Generally it is not needed to modify
     this scripts, but if you use more than one instance of Diald or
     have a complex configuration, you need it.

    Decide if you use the standar or personal filter file. Options
     include.



  ##########################
  # /etc/diald/diald.options

  # Device where your modem is connected
  device /dev/ttyS0

  # Log file
  accounting-log /var/log/diald.log

  # Monitoring queue
  #fifo /var/run/diald/diald.fifo

  # Debug activation
  # Activating debug reduces performance
  #debug 31

  # We use PPP as encapsulator
  mode ppp

  # Local IP (when you connect this address is automatically modified
  # with the ip assigned by your ISP if you use the dinamic option).
  local 127.0.0.5

  # Remote IP (when you connect this address is automatically modified
  # with the ip of the remote server that receives our call).
  remote 127.0.0.4

  # Subnet mask for the wan link
  netmask 255.255.255.0

  # The IP addresses will be asigned when connection starts.
  dynamic

  # If link goes down by remote end, start it again only if there is
  # outgoing packets.
  two-way

  # When link is up, route directly to the real ppp interface, not the proxy
  # interface. Not to do this is a performance lost of about 20 per cent.
  # There are old kernels that do not support reroute. See diald manual for
  # more information
  reroute

  # Diald will set up the default route the the SLIP interface used as proxy
  defaultroute

  # Script to set up personalized routes
  #addroute "/etc/diald/addroute"
  #delroute "/etc/diald/delroute"

  # Scripts to execute when the link is up and ready or down and closed.
  # In Diald versions 0.9x there is another option called ip-goingdown that
  # can be used to run commands when the link is going to be down but is
  # still up.
  ip-up /etc/diald/ip-up
  #ip-down /etc/diald/ip-down

  # Scripts used to connect or disconnect the interface
  connect "/etc/diald/diald.connect"
  #disconnect "/etc/diald/diald.disconnect"

  # Use UUCP lock to signal the device is being used
  #lock

  # We connect over a modem. WARNING: Do not especify this options in the
  # ppp options file, because they will conflict with the diald options. To
  # see what ppp options that you can not use in the pppd-options option,
  # see the diald man page and search for pppd-options
  modem
  crtscts
  speed 115200

  # Some timers and retry options
  # See Diald man page for more information
  connect-timeout 120
  redial-timeout 60
  start-pppd-timeout 120
  died-retry-count 0
  redial-backoff-start 4
  redial-backoff-limit 300
  dial-fail-limit 10

  # Options to be passed to pppd
  # This options can be included in the /etc/ppp/options file, that are the
  # default options for pppd, but if you need to use different
  # configurations of diald for more than one instance, you must put it here
  # noauth - do not ask remote for authenticaion.
  #          "Infova Plus" (Spain) do not identify to our machine
  # user - our username and isp. Ask your isp for the sintaxis. Some isps,
  #        do not need the @isp
  pppd-options noauth user usuario@isp

  # Hour restriccions.
  # This section must be before filters.
  # The restrict command is experimental, and can change in other versions
  # of diald. Check the man page. (this example has been checked for 0.16,
  # but i think it runs in later versions).
  # Example: only use in the night from monday to friday, and all day in
  # saturday and sunday.
  restrict 8:00:00 18:00:00 1-5 * *
  down
  restrict * * * * *

  # No special tarificaion considerations
  # (first seconds included in the setup cost, tarify unit in seconds,
  # time in seconds to check if it is good to go down)
  #impulse 0,0,0
  # Bononet Noche (Spain-Telefnica) is billed in seconds after the 160
  # first seconds
  impulse 160,0,0
  # if it would be billed in minuttes and the first 10 will be billed
  # always:
  #impulse 600,60,10

  # Standar filters
  #include /etc/diald/standard.filter
  # or personal filters
  include /etc/diald/personal.filter



  6.2.  Personal filters file


  Manipulation of this file must be done very carefully. This file is
  used to decide when and why to start up the line, maintain it, bring
  down the line or ignore a packet, depending on the traffic type.

  Generally, the Diald standar filter file is sufficient for most cases,
  but perhaps, it may be too restrictive or not restrictive enough in
  some situations. The personal.filter file that is shown has some
  corrections over the original from the 0.16 version.

  In next versions of this document, other commented more restrictive
  examples will be included.



  # /etc/diald/personal.filter
  # Filter rules shown are the same as in the standard.filter with the
  # following changes:
  #
  # Change 10 to 4 minuttes in "any other tcp conection".
  # Added "ignore tcp tcp.fin" to ignore the FIN ACK packets.
  # Ignore icmp packets (ping and traceroute don't fire up the interface).
  #

  # This is a pretty complicated set of filter rules.
  # (These are the rules I use myself.)
  #
  # I've divided the rules up into four sections.
  # TCP packets, UDP packets, ICMP packets and a general catch all rule
  # at the end.

  ignore icmp any

  #------------------------------------------------------------------------------
  # Rules for TCP packets.
  #------------------------------------------------------------------------------
  # General comments on the rule set:
  #
  # In general we would like to treat only data on a TCP link as significant
  # for timeouts. Therefore, we try to ignore packets with no data.
  # Since the shortest possible set of headers in a TCP/IP packet is 40 bytes,
  # any packet with length 40 must have no data riding in it.
  # We may miss some empty packets this way (optional routing information
  # and other extras may be present in the IP header), but we should get
  # most of them. Note that we don't want to filter out packets with
  # tcp.live clear, since we use them later to speedup disconnects
  # on some TCP links.
  #
  # We also want to make sure WWW packets live even if the TCP socket
  # is shut down. We do this because WWW doesn't keep connections open
  # once the data has been transfered, and it would be annoying to have the link
  # keep bouncing up and down every time you get a document.
  #
  # Outside of WWW the most common use of TCP is for long lived connections,
  # that once they are gone mean we no longer need the network connection.
  # We don't neccessarily want to wait 10 minutes for the connection
  # to go down when we don't have any telnet's or rlogin's running,
  # so we want to speed up the timeout on TCP connections that have
  # shutdown. We do this by catching packets that do not have the live flag set.

  # --- start of rule set proper ---

  # When initiating a connection we only give the link 15 seconds initially.
  # The idea here is to deal with possibility that the network on the opposite
  # end of the connection is unreachable. In this case you don't really
  # want to give the link 10 minutes up time. With the rule below
  # we only give the link 15 seconds initially. If the network is reachable
  # then we will normally get a response that actually contains some
  # data within 15 seconds. If this causes problems because you have a slow
  # response time at some site you want to regularly access, you can either
  # increase the timeout or remove this rule.
  accept tcp 15 tcp.syn

  # Keep named xfers from holding the link up
  ignore tcp tcp.dest=tcp.domain
  ignore tcp tcp.source=tcp.domain

  # (Ack! SCO telnet starts by sending empty SYNs and only opens the
  # connection if it gets a response. Sheesh..)
  accept tcp 5 ip.tot_len=40,tcp.syn

  # keep empty packets from holding the link up (other than empty SYN packets)
  ignore tcp ip.tot_len=40,tcp.live

  # Modification by Andres Seco to ignore the FIN ACK packets.
  ignore tcp tcp.fin

  # make sure http transfers hold the link for 2 minutes, even after they end.
  # NOTE: Your /etc/services may not define the tcp service www, in which
  # case you should comment out the following two lines or get a more
  # up to date /etc/services file. See the FAQ for information on obtaining
  # a new /etc/services file.
  accept tcp 120 tcp.dest=tcp.www
  accept tcp 120 tcp.source=tcp.www
  # Same for https
  accept tcp 120 tcp.dest=tcp.443
  accept tcp 120 tcp.source=tcp.443

  # Once the link is no longer live, we try to shut down the connection
  # quickly. Note that if the link is already down, a state change
  # will not bring it back up.
  keepup tcp 5 !tcp.live
  ignore tcp !tcp.live

  # an ftp-data or ftp connection can be expected to show reasonably frequent
  # traffic.
  accept tcp 120 tcp.dest=tcp.ftp
  accept tcp 120 tcp.source=tcp.ftp

  #NOTE: ftp-data is not defined in the /etc/services file provided with
  # the latest versions of NETKIT, so I've got this commented out here.
  # If you want to define it add the following line to your /etc/services:
  # ftp-data        20/tcp
  # and uncomment the following two rules.
  #accept tcp 120 tcp.dest=tcp.ftp-data
  #accept tcp 120 tcp.source=tcp.ftp-data

  # If we don't catch it above, give the link 10 minutes up time.
  #accept tcp 600 any
  # Modificacion de Andres Seco. Solo dejar 4 minutos mas.
  accept tcp 240 any

  # Rules for UDP packets
  #
  # We time out domain requests right away, we just want them to bring
  # the link up, not keep it around for very long.
  # This is because the network will usually come up on a call
  # from the resolver library (unless you have all your commonly
  # used addresses in /etc/hosts, in which case you will discover
  # other problems.)
  # Note that you should not make the timeout shorter than the time you
  # might expect your DNS server to take to respond. Otherwise
  # when the initial link gets established there might be a delay
  # greater than this between the initial series of packets before
  # any packets that keep the link up longer pass over the link.

  # Don't bring the link up for rwho.
  ignore udp udp.dest=udp.who
  ignore udp udp.source=udp.who
  # Don't bring the link up for RIP.
  ignore udp udp.dest=udp.route
  ignore udp udp.source=udp.route
  # Don't bring the link up for NTP or timed.
  ignore udp udp.dest=udp.ntp
  ignore udp udp.source=udp.ntp
  ignore udp udp.dest=udp.timed
  ignore udp udp.source=udp.timed
  # Don't bring up on domain name requests between two running nameds.
  ignore udp udp.dest=udp.domain,udp.source=udp.domain
  # Bring up the network whenever we make a domain request from someplace
  # other than named.
  accept udp 30 udp.dest=udp.domain
  accept udp 30 udp.source=udp.domain
  # Do the same for netbios-ns broadcasts
  # NOTE: your /etc/services file may not define the netbios-ns service
  # in which case you should comment out the next three lines.
  ignore udp udp.source=udp.netbios-ns,udp.dest=udp.netbios-ns
  accept udp 30 udp.dest=udp.netbios-ns
  accept udp 30 udp.source=udp.netbios-ns
  # keep routed and gated transfers from holding the link up
  ignore udp tcp.dest=udp.route
  ignore udp tcp.source=udp.route
  # Anything else gest 2 minutes.
  accept udp 120 any

  # Catch any packets that we didn't catch above and give the connection
  # 30 seconds of live time.
  accept any 30 any



  6.3.  Making the call


  /etc/diald/diald.connect file (it must have execute permission):



       /usr/sbin/chat -f /etc/chatscripts/provider



  /etc/chatscripts/provider file. In this example file you must check
  the destination phone number:



       ABORT BUSY
       ABORT "NO CARRIER"
       ABORT VOICE
       ABORT "NO DIALTONE"
       ABORT "NO ANSWER"
       "" ATZ
       OK ATDT123456789
       CONNECT \d\c



  6.4.  Connection start script


  It must have execute permission.

  This script can be used to many tasks (synchronize time, send the
  queued mail, get incoming mail, etc.).

  In the example, a message is sent to root with data passed to the
  script (interface, subnet mask, local ip address, remote ip address
  and cost for routing):



       #!/bin/sh

       iface=$1
       netmask=$2
       localip=$3
       remoteip=$4
       metric=$5

       # Set the time and date
       # netdate ntp.server.somecountry

       # Run the mail queue
       # runq

       echo `date` $1 $2 $3 $4 $5 | mail -s "diald - conecting" root@localhost



  7.  Conecting a computer to a group of different ISPs with a modem and
  PPP


  Many times, one standalone computer does not only connect to just one
  network. It is common to connect to different networks or to the
  Internet using some different service providers. In this case,
  changing configuration files each time you want to connect to a
  different site can be annoying.

  The solution i propose here consist in using different sets of
  configuration files for each different connection. You can find here
  some scripts to automate changing from one to another.


  7.1.  Note about sending mail using a relay host


  If your email client program uses a local Message Transfer Agent with
  a smtp relay host to send all messages, or if you use a email client
  program that sends the messages directly to your provider's smtp
  server, changing where you are connecting means you need to
  reconfigure this option for the smtp relay server. This is because the
  providers usually check if the receipt mailbox is local or to any
  domain directly maintained by this provider or if the origin ip
  address is from the range of ip addresses that this provider assigns,
  to avoid having an open relay server that can be used to send spam,
  anonymous message and so on.

  In the following examples, you will find how to change this parameter
  in the Smail configuration files in a simple configuration where all
  external messages are sent to a smtp relay server. If you use another
  Message Transfer Agent (MTA) in your system, you can send me what you
  must change in your MTA to include it here. If you use an email client
  program that directly sends to the external smtp server (Kmail,
  Netscape, etc.) send me your changes too.


  7.2.  Scripts to automate multiple connections and changing from one
  to another


  7.2.1.  Starting up


  First of all, create a subdirectory of /etc/diald called providers
  where you store your scripts to automatically change from one to
  another provider and the subdirectories with the set of files to
  configure each of the providers connections.

  With the next script this directory is created and filled with the
  current configuration files from Diald, chat, pppd and Smail, that
  will be treated as a template for the next configurations.



       #!/bin/sh
       #File /etc/diald/providers/setupdialdmultiprovider
       mkdir /etc/diald/providers
       mkdir /etc/diald/providers/setup
       cp /etc/ppp/pap-secrets /etc/diald/providers/setup
       cp /etc/ppp/chap-secrets /etc/diald/providers/setup
       cp /etc/resolv.conf /etc/diald/providers/setup
       cp /etc/diald/diald.options /etc/diald/providers/setup
       cp /etc/diald/standard.filter /etc/diald/providers/setup
       cp /etc/diald/personal.filter /etc/diald/providers/setup
       cp /etc/diald/diald.connect /etc/diald/providers/setup
       cp /etc/chatscripts/provider /etc/diald/providers/setup
       cp /etc/diald/ip-up /etc/diald/providers/setup
       cp /etc/diald/ip-down /etc/diald/providers/setup
       cp /etc/smail/routers /etc/diald/providers/setup



  7.2.2.  New provider


  With the next script the template configuration will be copied to a
  new directory to prepare it for a new provider connection or a new net
  connection. This script (/etc/diald/providers/newdialdprovider) will
  need a parameter with the provider or net name.



       #!/bin/sh
       #File /etc/diald/providers/newdialdprovider
       mkdir /etc/diald/providers/$1
       cp /etc/diald/providers/setup/* /etc/diald/providers/$1



  Now, you will modify as you need the new files in
  /etc/diald/providers/provdidername, being providername the parameter
  passed to newdialdprovider.


  7.2.3.  Changing from one to another


  At the end, with this script you will change all your configuration
  files related to Diald to connect to another provider or net. I use
  symbolic links to avoid using duplicate files. Using symbolic links,
  if you change any config file in its original location like
  /etc/resolv.conf, the change is really made in the
  /etc/diald/providers/providername/resolv.conf file.
       #!/bin/sh
       #File /etc/diald/providers/setdialdprovider
       /etc/init.d/diald stop
       #wait for Diald to stop.
       sleep 4
       ln -sf /etc/diald/providers/$1/pap-secrets /etc/ppp
       ln -sf /etc/diald/providers/$1/chap-secrets /etc/ppp
       ln -sf /etc/diald/providers/$1/resolv.conf /etc
       ln -sf /etc/diald/providers/$1/diald.options /etc/diald
       ln -sf /etc/diald/providers/$1/standard.filter /etc/diald
       ln -sf /etc/diald/providers/$1/personal.filter /etc/diald
       ln -sf /etc/diald/providers/$1/diald.connect /etc/diald
       ln -sf /etc/diald/providers/$1/provider /etc/chatscripts
       ln -sf /etc/diald/providers/$1/ip-up /etc/diald
       ln -sf /etc/diald/providers/$1/ip-down /etc/diald
       ln -sf /etc/diald/providers/$1/routers /etc/smail
       /etc/init.d/diald start



  8.  Connecting a proxy/firewall to an ISP using a modem and PPP


  Connecting a private net to the Internet with dedicated server which
  handles packet routing from the local network to the Internet along
  with proxy/caching services and security firewalling is a complex
  theme that is beyond the scope of this document. There are other
  Howto documents that handle these topics much more comprehensively.
  At the end of this document you can find a list of links and
  references to such documents.

  Here, we are only configuring Diald supposing that the computer
  already uses IP-Masquerading, has a web proxy like Squid or similar
  working, an ISP connection correctly configured and that access
  security to TCP/UDP ports have been revised (/etc/inetd.conf file and
  others like securetty, host.allow, etc).

  Basically, the only need is to reconfigure the rules for
  masquerading/filtering/accessing each time the set of interfaces
  change, that is, when the interface ppp0 is stablished and when it is
  deleted. A good location to do that are the ip-up and ip-down scripts
  from pppd.


  8.1.  Example for Debian 2.1


  With Debian, it is sufficient to install the ipmasq package answering
  that you want to change rules sinchronously with pppd when seting it
  up. Two scripts will be created inside /etc/ppp/ip-up.d and
  /etc/ppp/ip-down.d directories to call /sbin/ipmasq, a script that
  analizes existing interfaces and makes a simple configuration that is
  valid in many cases, but you can personalize it using rule files in
  /etc/ipmasq/rules.

  The only correction after installing this package is to change when
  the startup script for ipmasq is run, deleting the symbolic link from
  /etc/rcS.d and creating a new one in /etc/rc2.d to run it after
  S20diald. Now, when ipmasq is executed to analyze interfaces sl0
  already exist. S90ipmasq is a good name for this symbolic link to
  /etc/init.d/ipmasq.

  Using Debian there is no need to worry about the kernel version, as
  the /sbin/ipmasq script uses ipfwadm or ipchains as needed.
  8.2.  Example for Suse 6.1


  This example is from Mr Cornish Rex, troll@tnet.com.au.

  The following ip-masp and routing control commands are for use with
  version 2.2 kernels, using ipchains, but they are not valid for
  version 2.0 kernels.

  We are going to supose that the ethernet interface has the 192.168.1.1
  ip address with 16 bit netmask, that is, 255.255.0.0.

  This is the /etc/ppp/ip-up file:



       #!/bin/sh
       # $1 = Interface
       # $2 = Tty device
       # $3 = speed
       # $4 = local ip
       # $5 = remote ip
       # $6 = ipparam
       /sbin/ipchains -F input
       /sbin/ipchains -P input DENY
       /sbin/ipchains -A input -j ACCEPT -i eth0 -s 192.168.0.0/16 -d 0.0.0.0/0
       /sbin/ipchains -A input -j DENY -p udp -i $1 -s 0.0.0.0/0 -d $4/32 0:52 -l
       /sbin/ipchains -A input -j DENY -p udp -i $1 -s 0.0.0.0/0 -d $4/32 54:1023 -l
       /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 0:112 -l
       /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 114:1023 -l
       /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 6000:6010 -l
       /sbin/ipchains -A input -j DENY -p icmp --icmp-type echo-request \
       -i $1 -s 0.0.0.0/0 -l
       /sbin/ipchains -A input -j DENY -p icmp -f -i $1 -s 0.0.0.0/0 -l
       /sbin/ipchains -A input -j DENY -p udp -i $1 -s 0.0.0.0/0 -d $4/32 5555 -l
       /sbin/ipchains -A input -j DENY -p udp -i $1 -s 0.0.0.0/0 -d $4/32 8000 -l
       /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 8000 -l
       /sbin/ipchains -A input -j DENY -p udp -i $1 -s 0.0.0.0/0 -d $4/32 6667 -l
       /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 6667 -l
       /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 4557 -l
       /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 4559 -l
       /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 4001 -l
       /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 2005 -l
       /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 6711 -l
       /sbin/ipchains -A input -j DENY -i $1 -s 192.168.0.0/16 -d 0.0.0.0/0 -l
       /sbin/ipchains -A input -j ACCEPT -i $1 -s 0.0.0.0/0 -d $4/32
       /sbin/ipchains -A input -j ACCEPT -i lo -s 0.0.0.0/0 -d 0.0.0.0/0
       /sbin/ipchains -A input -j DENY -s 0.0.0.0/0 -d 0.0.0.0/0 -l

       /sbin/ipchains -F output
       /sbin/ipchains -P output DENY
       /sbin/ipchains -A output -j ACCEPT -i eth0 -s 0.0.0.0/0 -d 192.168.0.0/16
       /sbin/ipchains -A output -j DENY -i $1 -s 192.168.0.0/16 -d 0.0.0.0/0 -l
       /sbin/ipchains -A output -j ACCEPT -i $1 -s $4/32 -d 0.0.0.0/0
       /sbin/ipchains -A output -j ACCEPT -i lo -s 0.0.0.0/0 -d 0.0.0.0/0
       /sbin/ipchains -A output -j DENY -s 0.0.0.0/0 -d 0.0.0.0/0

       /sbin/ipchains -F forward
       /sbin/ipchains -P forward DENY
       /sbin/ipchains -M -S 120 120 120
       /sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24
       /sbin/ipchains -A forward -j DENY -s 0.0.0.0/0 -d 0.0.0.0/0

       exit 0


  This is the /etc/ppp/ip-down file:



       #!/bin/sh
       # $1 = Interface
       # $2 = Tty device
       # $3 = Speed
       # $4 = Local ip
       # $5 = Remote ip
       /sbin/ipchains -F input
       /sbin/ipchains -F output
       /sbin/ipchains -F forward
       /sbin/ipchains-restore < /etc/ppp/orig.chains



  Last file in last script, orig.chains, is the following file (original
  status of ipchains):



       # orig.chains
       # created with: ipchains-save > orig.chains
       :input ACCEPT
       :forward ACCEPT
       :output ACCEPT
       -A input -s 0.0.0.0/0.0.0.0 -d 192.168.1.1/255.255.255.255
       -A output -s 192.168.1.1/255.255.255.255 -d 0.0.0.0/0.0.0.0



  8.3.  Example for Slackware 3.6


  This example is from Hoo Kok Mun, hkmun@pacific.net.sg.

  This is the most simple example i have seen, but fully functional.
  From the beginning, this example configures masquerading, before the
  sl0 interface exists, and it does not change when the ppp0 interface
  appears. If you need advanced security considerations, it may be a
  little limited.



       #/etc/rc.d/rc.local
       /sbin/ipfwadm -F -p deny
       /sbin/ipfwadm  -F -a m -S 192.168.0.0/24 -D 0.0.0.0/0



  As you can see, it is for version 2.0 kernels.


  9.  Programs and versions used


  To write this document i have used the following diald versions:


    Diald 0.16.5 - Last version maintained by the original diald autor.

    Diald 0.99.3 - Last version until the first edition of this
     document.

  And the following pppd versions:


    pppd 2.3.5

  Diald 0.16.5 version is perhaps the most extended, and the one that
  many Linux distributions include. It is suficient for many sites, and
  it is very reliable, but, of course, later versions have many
  interesting capabilites.


  10.  More information


  Original information from where this document has been obtained can be
  found in the man pages about diald, diald-examples, diald-control,
  diald-monitor, dctrl, pppd, chat, as well as from information in the
  /usr/doc directories and in web pages of this packages:


    New Diald Official Home Page: http://diald.sourceforge.net/

    Download of new versions: ftp://diald.sourceforge.net/pub/diald/

    Previous Diald home page: http://diald.unix.ch

    Old Diald home page until 0.16.5 version:
     http://www.loonie.net/~erics/diald.html

    pppd FTP site: ftp://cs.anu.edu.au/pub/software/ppp/

    Other site: http://www.p2sel.com/diald

    One more: http://rufus.w3.org/linux/RPM/

  There is a mailing list for discussion about diald on David S.
  Miller's mailing list server at vger.rutgers.edu. To subscribe, send a
  message to Majordomo@vger.rutgers.edu with the text subscribe linux-
  diald IN THE MESSAGE BODY.

  An archive of the list can be found in http://www.geocrawler.com.

  There are also multiple RFC documents (Request For Comments) that
  define how the PPP encapsulated lines and its associated protocols
  (LCP, IPCP, PAP, CHAP, ...) must work. You can find these documents in
  the /usr/doc/doc-rfc directory and some World Wide Web sites, like
  http://metalab.unc.edu and http://nic.mil/RFC. You can ask for
  information about RFCs in RFC-INFO@ISI.EDU.

  The following Howtos can help you:


    DNS-HOWTO - http://www.linuxdoc.org/HOWTO/DNS-HOWTO.html

    Firewall-HOWTO - http://www.linuxdoc.org/HOWTO/Firewall-HOWTO.html

    IP-Masquerade-HOWTO - http://www.linuxdoc.org/HOWTO/IP-Masquerade-
     HOWTO.html

    IPCHAINS-HOWTO - http://www.linuxdoc.org/HOWTO/IPCHAINS-HOWTO.html

    Modem-HOWTO - http://www.linuxdoc.org/HOWTO/Modem-HOWTO.html

    NET3-4-HOWTO - http://www.linuxdoc.org/HOWTO/NET3-4-HOWTO.html

    PPP-HOWTO - http://www.linuxdoc.org/HOWTO/PPP-HOWTO.html


    Serial-HOWTO - http://www.linuxdoc.org/HOWTO/Serial-HOWTO.html



  Diskless Nodes HOW-TO document for Linux
  Robert Nemkin        buci@math.klte.hu , Al Dev (Alavoor
  Vasudevan) - Maintainer of this HOWTO alavoor@yahoo.com ,
  Markus Gutschke markus+etherboot@gutschke.com , Ken Yap
  ken.yap@acm.org , Gero Kuhlmann gero@gkminix.han.de
  v12.0, 10 Jul 2000

  This document describes how to set up a diskless Linux box. As tech
  nology is advancing rapidly, network-cards are becoming cheaper and
  much faster - 100 MBits ethernet is standard now and in about 1 to 2
  years 1000 MBits i.e. 1GigBits ethernet cards will become a industry
  standard.  With high-speed network cards, remote access will become as
  fast as the local disk access which will make diskless nodes a viable
  alternative to workstations in local LAN. Also diskless nodes elimi
  nates the cost of software upgrades and system administration costs
  like backup, recovery which will be centralized on the server side.
  Diskless nodes also enable "sharing/optimization" of centralised
  server CPU, memory, hard-disk, tape and cdrom resources. Diskless
  nodes provides mobility for the users i.e., users can log on from any
  one of diskless nodes and are not tied to one workstation.  Diskless
  Linux box completely eliminates the need for local floppy disk, cdrom
  drive, tape drive and hard-disk. Diskless nodes JUST has a network
  card, 8MB RAM, a low-end cpu and a very simple mother-board which does
  not have any interface sockets/slots for harddisks, modem, cdrom,
  floppy etc..  With Diskless linux nodes you can run programs on remote
  Linux 64 CPU SMP box or even on Linux super-computer!  Diskless nodes
  lowers the "Total Cost of Ownership" of the computer system.  This
  document is copyrighted by Robert Nemkin and other authors as listed
  above. Copyright policy is GPL.  Thanks to Bela Kis        bkis@car
  tan.math.klte.hu for translating this initial document v0.0.3 (which
  was a mini-howto) to English.
  ______________________________________________________________________

  Table of Contents



  1. Buying is cheaper than building!

  2. Diskless Computer for Microsoft Windows 95/NT !!

     2.1 VMWare package
     2.2 VNC package from AT and T

  3. Advantages of Diskless Computer

  4. Linux Terminal Server Project - LTSP

  5. EPROM Burners and Memory chips

     5.1 Non-Volatile Memory chips
     5.2 List of EEPROM Burner manufacturers

  6. Introduction to Network Booting and Etherboot

     6.1 What is Network booting?
     6.2 How does it work
     6.3 Netbooting in Practice
        6.3.1 Bootp
        6.3.2 Tftp
        6.3.3 NFS root filesystem
        6.3.4 Burn EPROM
     6.4 Uses of Network booting
     6.5 For more information

  7. Redhat Linux configuration

     7.1 X-terminal

  8. LanWorks BootWare PROMs

  9. Etherboot

  10. Netboot

     10.1 Introduction
     10.2 Mailing list
     10.3 Netboot useful links

  11. Related URLs

  12. Copyright Notice

  13. Appendix A - Install Instructions

  14. Appendix B - Troubleshoot Problems

  15. Appendix C - RFC 951

  16. Appendix D - RFC 1533

  17. Appendix E - RFC 1350

  18. Other Formats of this Document



  ______________________________________________________________________

  1.  Buying is cheaper than building!

  Sometimes, buying a diskless linux computer will be cheaper than
  building!!  Checkout the following commercial sites, which are selling
  diskless linux network-cards and diskless computers. These companies
  do mass production of Linux Diskless computers selling millions of
  units and thereby reducing the cost per unit. Each and every fortune
  1000 companies in USA will be replacing the MS Windows PCs with
  diskless computers in near future as diskless linux computers can run
  both Linux and MS Windows 95 programs (via VMWare BIOS software).
  VMWare <http://www.vmware.com> is NOT a emulator but has BIOS which
  allows you to install Windows 98/NT as guest OS to linux. You can use
  the 'xhost' command and DISPLAY environment from diskless node to run
  Windows95/Linux programs. See 'man xhost' on linux.  You can also use
  Virtual Network Computing (VNC) to run Windows95/NT programs on linux
  diskless nodes. Get VNC from  <http://www.uk.research.att.com/vnc>


    Linux Systems Labs Inc., USA  <http://www.lsl.com> Click on "Shop
     On-line" and than click on "HardWare" where all the Diskless
     computers will be listed. Phone 1-888-LINUX-88.


    Diskless Workstations Corporation, USA
     <http://www.disklessworkstations.com>


    Unique Systems of Holland Inc., Ohio, USA  <http://www.uniqsys.com>

  Even if you buy diskless linux computer, you may be very much
  interested in reading this entire document.

  2.  Diskless Computer for Microsoft Windows 95/NT !!

  Since Microsoft Windows 95/NT DOES NOT support diskless nodes, there
  is a intelligent work-around to overcome this short coming.  Microsoft
  corporation will be surprised !!

  2.1.  VMWare package

  Use the VMWare <http://www.vmware.com> BIOS software with Linux which
  can host the Windows 95/98/NT.  Linux will be the "host" OS and
  Windows 95/NT will be the "guest" OS.  VMWare <http://www.vmware.com>
  is NOT a emulator but has BIOS which allows you to install Windows
  95/98/NT as the guest OS to linux. Install the VMWare on Linux server
  and than install Windows 95/NT on VMWare.

  You can use the 'xhost' command and DISPLAY environment from any
  diskless node. See 'man xhost' on linux. At diskless node give -

  ______________________________________________________________________
          export DISPLAY=server_hostname:0.0
  where server_hostname is the name of the server machine. And start X-terminal with
          xterm
  ______________________________________________________________________


  Using VMWare <http://www.vmware.com>, Diskless linux computers can run
  both Linux and MS Windows 95 programs.  VMWare is at
  <http://www.vmware.com>.

  2.2.  VNC package from AT and T

  You can also use the VNC (Virtual Network Computing) Technology from
  the telecom giant AT & T. VNC is GPLed and is a free software. Using
  VNC you can run Windows 95/NT programs on diskless linux computer but
  actually running on remote Windows95/NT server.  VNC is at
  <http://www.uk.research.att.com/vnc>


  3.  Advantages of Diskless Computer

  Diskless linux computer will become immensely popular and will be the
  product of this century and in the next century.  The diskless linux
  computers will be very successful because of the availability of very
  high-speed network cards at very low prices. Today 100 Megabit per
  second (12.5 MB per sec transfer rate) network cards are common and in
  about 1 to 2 years 1000 MBit (125 MB per sec transfer rate) network
  cards will become very cheap and will be the standard.

  In near future, Monitor manufacturers will place the CPU, NIC, RAM
  right inside the monitor to form a diskless computer!!  This
  eliminates the diskless computer box and saves space. The monitor will
  have outlet for mouse, keyboard, network RJ45 and power supply.

  The following are benefits of using diskless computers -

    Diskless Linux computers can run BOTH MS Windows 95/NT and linux
     programs.


    Total cost of ownership is very low in case of Diskless computers.
     Total cost of ownership is cost of initial purchasing + cost of
     maintainence.  The cost of maintainence is usually 3 to 5 times the
     cost of initial computer purchase and this cost is recurring year
     after year.  In case of Diskless computers, the cost of
     maintainence is completely eliminated!!


    All the backups are centralized at one single main server.


    More security of data as it is located at server.


    No need of UPS battery, air-conditioning, dust proof environment
     for diskless clients, only server needs UPS battery, A/C and dust
     proof environment.


    Protection from Virus attack - Computer virus cannot attack
     diskless computers as they do not have any hard disk. Virus cannot
     do any damage to diskless computers. Only one single server box
     need to be protected against virus attack. This saves millions of
     dollars for the company by avoiding installtion of vaccines and
     cleaning the hard disks!!


    Server can have large powerful/high performance hard disks, can
     optimize the usage of disk space via sharing by many diskless
     computer users.  Fault tolerance of hard disk failure is possible
     by using RAID on main server.


    Server can have 64 bit CPU SMP box having many CPUs or even linux
     super-computers. CPU power can be shared by many diskless computer
     users


    Sharing of central server RAM memory by many diskless computer
     users.  For example, if many users are using web browser than at
     server RAM there will be only one copy of web browser in the RAM.
     In case Windows 95 PCs, many users need to have individual copy of
     web browser in local RAM and hence there is wastage of RAM space.


    Diskless linux computers can run programs on multiple servers using
     the "xhost" and DISPLAY environment.


    Very few system administrators required to maitain central server
     unlike Windows 95 PC clients which need many administrators.


    Zero administration at diskless client side. Diskless computers are
     absolutely maintainence free and troublefree.


    Long life of diskless clients - more than 100 years without any
     hardware or software upgrades.


    Eliminates install/upgrade of hardware, software on diskless client
     side.


    Eliminates cost of cdrom, floppy, tape drive, modem, UPS battery,
     Printer parallel ports, serial ports etc..


    Can operate in places like factory floor where a hard disk might be
     too fragile.

  4.  Linux Terminal Server Project - LTSP

  LTSP is a open source code project to build diskless linux computers.

  At LTSP site you will find RPM packages for Redhat Linux and packages
  for Debian Linux which will save you lots of time. The subsequent
  chapters given in this document are for academic purposes only, which
  you can read them if you have more time.

  Visit the LTSP and related sites at :-

    <http://www.ltsp.org>


    <http://www.disklessworkstations.com>


    <http://www.slug.org.au/etherboot>


    <http://metalab.unc.edu/Linux/HOWTO/XFree86-Video-Timings-
     HOWTO.html>

     Related topics worth seeing -

    NCD X-terminal  <http://www.linuxdoc.org/HOWTO/mini/NCD-X-
     Terminal.html>

  5.  EPROM Burners and Memory chips

  In the following chapters you will need information about EPROM
  burners which are given below.

  5.1.  Non-Volatile Memory chips

  Here is the brief descriptions of memory chips and their types.

    PROM: Pronounced prom, an acronym for programmable read-only
     memory. A PROM is a memory chip on which data can be written only
     once. Once a program has been written onto a PROM, it remains there
     forever. Unlike RAM, PROMs retain their contents when the computer
     is turned off.  The difference between a PROM and a ROM (read-only
     memory) is that a PROM is manufactured as blank memory, whereas a
     ROM is programmed during the manufacturing process. To write data
     onto a PROM chip, you need a special device called a PROM
     programmer or PROM burner. The process of programming a PROM is
     sometimes called burning the PROM.  An EPROM (erasable programmable
     read-only memory) is a special type of PROM that can be erased by
     exposing it to ultraviolet light. Once it is erased, it can be
     reprogrammed. An EEPROM is similar to a PROM, but requires only
     electricity to be erased.

    EPROM: Acronym for erasable programmable read-only memory, and
     pronounced e-prom, EPROM is a special type of memory that retains
     its contents until it is exposed to ultraviolet light. The
     ultraviolet light clears its contents, making it possible to
     reprogram the memory. To write to and erase an EPROM, you need a
     special device called a PROM programmer or PROM burner.  An EPROM
     differs from a PROM in that a PROM can be written to only once and
     cannot be erased. EPROMs are used widely in personal computers
     because they enable the manufacturer to change the contents of the
     PROM before the computer is actually shipped. This means that bugs
     can be removed and new versions installed shortly before delivery.

     A note on EPROM technology: The bits of an EPROM are programmed by
     injecting electrons with an elevated voltage into the floating gate
     of a field-effect transistor where a 0 bit is desired. The
     electrons trapped there cause that transistor to conduct, reading
     as 0. To erase the EPROM, the trapped electrons are given enough
     energy to escape the floating gate by bombarding the chip with
     ultraviolet radiation through the quartz window.  To prevent slow
     erasure over a period of years from sunlight and fluorescent
     lights, this quartz window is covered with an opaque label in
     normal use.

    EEPROM: Acronym for electrically erasable programmable read-only
     memory. Pronounced double-e-prom or e-e-prom, an EEPROM is a
     special type of PROM that can be erased by exposing it to an
     electrical charge. Like other types of PROM, EEPROM retains its
     contents even when the power is turned off. Also like other types
     of ROM, EEPROM is not as fast as RAM.  EEPROM is similar to flash
     memory (sometimes called flash EEPROM). The principal difference is
     that EEPROM requires data to be written or erased one byte at a
     time whereas flash memory allows data to be written or erased in
     blocks. This makes flash memory faster.

    FRAM: Short for Ferroelectric Random Access Memory, a type of non-
     volatile memory developed by Ramtron International Corporation.
     FRAM combines the access speed of DRAM and SRAM with the non-
     volatility of ROM. Because of its high speed, it is replacing
     EEPROM in many devices. The term FRAM itself is a trademark of
     Ramtron.

    NVRAM: Abbreviation of Non-Volatile Random Access Memory, a type of
     memory that retains its contents when power is turned off. One type
     of NVRAM is SRAM that is made non-volatile by connecting it to a
     constant power source such as a battery. Another type of NVRAM uses
     EEPROM chips to save its contents when power is turned off. In this
     case, NVRAM is composed of a combination of SRAM and EEPROM chips.

    Bubble Memory: A type of non-volatile memory composed of a thin
     layer of material that can be easily magnetized in only one
     direction. When a magnetic field is applied to circular area of
     this substance that is not magnetized in the same direction, the
     area is reduced to a smaller circle, or bubble.  It was once widely
     believed that bubble memory would become one of the leading memory
     technologies, but these promises have not been fulfilled. Other
     non-volatile memory types, such as EEPROM, are both faster and less
     expensive than bubble memory.

    Flash Memory: A special type of EEPROM that can be erased and
     reprogrammed in blocks instead of one byte at a time. Many modern
     PCs have their BIOS stored on a flash memory chip so that it can
     easily be updated if necessary. Such a BIOS is sometimes called a
     flash BIOS. Flash memory is also popular in modems because it
     enables the modem manufacturer to support new protocols as they
     become standardized.

  5.2.  List of EEPROM Burner manufacturers

  For a list of EPROM burner manufacturers visit the Yahoo site and go
  to economy->company->Hardware->Peripherals->Device programmers.

    Yahoo URL for EPROMs is at
     <http://dir.yahoo.com/Business_and_Economy/Companies/Computers/Hardware/Peripherals/Device_Programmers/>


    Advanced Research Technology B.V <http://www.artbv.nl/ > -
     development, production and sales of electronic programmer
     equipment; development of hardware and software.

    Advin Systems Inc. <http://www.advin.com > - PC-based device
     programmers that support the latest in package types and device
     technologies.

    Andromeda Research Labs <http://www.arlabs.com > - manufactures a
     portable eprom and device programming system.

    B and C Microsystems, Inc <http://www.bcmicro.com/> - offers test
     and duplication/programming equipment for PCMCIA (PC) Cards,
     ISA/PCI Cards, SIMMs, Memory Devices (including FLASH), PLDs.

    BP Microsystems <http://www.bpmicro.com/ > - Device Programmers.

    Bytek <http://www.bytek.com > - designs, develops, manufactures and
     markets micro-processor-based, modular electronic systems used to
     program and test semiconductor devices. Product line includes the
     ChipBurner.

    Concentrated Programming Ltd <http://www.logicaldevices.com/ > -
     offers a full range of device programming solutions.

    Dataman Programmmers Ltd. <http://www.dataman.com/ > - manufacture
     of hand-help EPROM programmer/emulator. Also sell PC-based
     programmers, and Gang-Pro programmers.

    General Device Instruments <http://www.generaldevice.com/ > - IC
     Device programmers. Universal and Gang programmers for Pld, Flash,
     microcontrollers, Proms, EEproms, Memory, Epld, Mach and many other
     ic devices.

    HI-LO System Research Co., Ltd. <http://hilosystems.com.tw > -
     manufacturer of universal and gang device programmers.

    ICE Technology <http://www.icetech.com/ > - EPROM and universal
     device programmers which support memories, microcontrollers, and
     programmable logic devices.

    Iceprom <http://www.inabyte.com/iceprom.html > - in-circuit
     erasable programmable read-only memory.

    Incept Ltd. <http://www.incept.ie >

    International Microsystems Inc <http://www.imtest.com > - High
     speed reliable gang programmer. (PROM, FLASH, Microcontroller,
     PCMCIA memory card).

    JED Microprocessors Pty. Ltd. <http://www.jedmicro.com.au > - plugs
     into a PC printer port D25 connector, and programs any 28-pin or
     32-pin EPROM and FLASH device.

    Logical Devices, Inc <http://www.logicaldevices.com > - device
     programming for PLDs, FPGAs, PROMs, microcontrollers. Producers of
     CUPL compiler for programmable logic and the ALLPRO and Chipmaster
     device programmer.

    MCL Systems <http://www.mcl.dk > - new method not only for
     programming but also for developing your new hardware with
     Integrated Controller Unit. And you don't need to be an expert.

    MQP Electronics <http://www.mqp.com > - manufacturer of universal
     device programmers, gang programmers, production software, and
     package converters. High thoughput and reliability.

    Needham's Electronics <http://www.quiknet.com/~needhams/ > -
     manufacturer of device programmers.

    NP Programming Services <http://www.npps.com/ > - provides
     programming for memory and logic parts.

    Program Automation, Inc. <http://www.progauto.com > - independent
     service company specializing in high volume PROM programming,
     including flash I/Cs.

    Stag Programmers Inc <http://www.stagusa.com > - manufacturer of
     prom and logic programmers, production handling equipment and UV
     erasers.

    Sunrise Electronics <http://www.sunriseelectronics.com > -
     universal device programmers, gang and in-circuit programmers with
     life time support.

    System General Co. <http://www.sg.com.tw > - Device Programmer,
     EPROM Writer and IC Tester

    Tribal Microsystems <http://www.tribalmicro.com > - universal and
     gang device programmers, 8051 and EPROM emulators, test and burn-in
     sockets and production sockets.

    Universal Device Programmers <http://www.xeltek.com/ >


  6.  Introduction to Network Booting and Etherboot

  This chapter is written by Ken Yap ken.yap@acm.org and explains how to
  bootstrap your computer from a program stored in non-volatile memory
  without accessing your hard disk. It is an ideal technique for
  maintaining and configuring a farm of linux boxes.

  6.1.  What is Network booting?


  Network booting is an old idea. The central idea is that the computer
  has some bootstrap code in non-volatile memory, e.g. a ROM chip, that
  will allow it to contact a server and obtain system files over a
  network link.

  6.2.  How does it work

  In order to boot over the network, the computer must get

  1. an identity

  2. an operating system image and

  3. usually, a working filesystem.

  Consider a diskless computer (DC) that has a network boot ROM. It may
  be one of several identical DCs. How can we distinguish this computer
  from others? There is one piece of information that is unique to that
  computer (actually its network adapter) and that is its Ethernet
  address. Every Ethernet adapter in the world has a unique 48 bit
  Ethernet address because every Ethernet hardware manufacturer has been
  assigned blocks of addresses. By convention these addresses are
  written as hex digits with colons separating each group of two digits,
  for example - 00:60:08:C7:A3:D8 .

  The protocols used for obtaining an IP address, given an Ethernet
  address, are called Boot Protocol (BOOTP) and Dynamic Host
  Configuration Protocol (DHCP). DHCP is an evolution of BOOTP. In our
  discussion, unless otherwise stated, anything that applies to BOOTP
  also applies to DHCP. (Actually it's a small lie that BOOTP and DHCP
  only translate Ethernet addresses. In their foresight, the designers
  made provision for BOOTP and DHCP to work with any kind of hardware
  address. But Ethernet is what most people will be using.)

  An example of a BOOTP exchange goes like this:

  DC: Hello, my hardware address is 00:60:08:C7:A3:D8, please give me my
  IP address.

  BOOTP server: (Looks up address in database.) Your name is aldebaran,
  your IP address is 192.168.1.100, your server is 192.168.1.1, the file
  you are supposed to boot from is /tftpboot/vmlinux.nb (and a few other
  pieces of information).

  You may wonder how the DC found the address of the BOOTP server in the
  first place. The answer is that it didn't. The BOOTP request was
  broadcast on the local network and any BOOTP server that can answer
  the request will.

  After obtaining an IP address, the DC must download an operating
  system image and execute it. Another Internet protocol is used here,
  called Trivial File Transfer Protocol (TFTP). TFTP is like a cut-down
  version of FTP---there is no authentication, and it runs over User
  Datagram Protocol (UDP) instead of Transmission Control Protocol
  (TCP). UDP was chosen instead of TCP for simplicity. The
  implementation of UDP on the DC can be small so the code is easy to
  fit on a ROM. Because UDP is a block oriented, as opposed to a stream
  oriented, protocol, the transfer goes block by block, like this:



       DC: Give me block 1 of /tftpboot/vmlinux.nb.
       TFTP server: Here it is.
       DC: Give me block 2.



  and so on, until the whole file is transferred. Handshaking is a
  simply acknowledge each block scheme, and packet loss is handled by
  retransmit on timeout. When all blocks have been received, the network
  boot ROM hands control to the operating system image at the entry
  point.

  Finally, in order to run an operating system, a root filesystem must
  be provided. The protocol used by Linux and other Unixes is normally
  Network File System (NFS), although other choices are possible. In
  this case the code does not have to reside in the ROM but can be part
  of the operating system we just downloaded. However the operating
  system must be capable of running with a root filesystem that is a
  NFS, instead of a real disk. Linux has the required configuration
  variables to build a version that can do so.



  6.3.  Netbooting in Practice

  Net Loader is a small program that runs as a BIOS extension, usually
  on an EPROM on the NIC. It handles the BOOTP query and TFTP loading
  and then transfers control to the loaded image.  It uses TCP/IP
  protocols but the loaded image doesn't have to be Linux. The loaded
  image can be anything, even DOS.  They can also be loaded from a
  floppy for testing and for temporary setups.

  Besides commercial boot ROMs, there are TWO sources for free packages
  for network booting.  Free implementations of TCP/IP net loaders are -

  1. ETHERBOOT  <http://www.slug.org.au/etherboot/>  and

  2. NETBOOT  <http://www.han.de/~gero/netboot.html>

  Etherboot uses built-in drivers while Netboot uses Packet drivers.
  First you have to ascertain that your network card is supported by
  Etherboot or Netboot. Eventually you have to find a person who is
  willing to put the code on an EPROM (Erasable Programmable Read Only
  Memory) for you but in the beginning you can do network booting from a
  floppy.

  To create a boot floppy, a special boot block is provided in the
  distribution. This small 512 byte program loads the disk blocks
  following it on the floppy into memory and starts execution. Thus to
  make a boot floppy, one has only to concatenate the boot block with
  the Etherboot binary containing the driver for one's network card like
  this:


  ______________________________________________________________________
          # cat floppyload.bin 3c509.lzrom > /dev/fd0
  ______________________________________________________________________



  Get the nfsboot package (the package is available from your favourite
  linux mirror site in the /pub/Linux/system/Linux-boot directory). It
  contains a booteprom image for the network cards (like wd8013) which
  can be directly burned in. See also the LTSP site at
  <http://www.ltsp.org>

  Before you put in the network boot floppy, you have to set up three
  services on Linux -

  1. BOOTP (or DHCP)

  2. TFTP and

  3. NFS.

  You don't have to set up all three at once, you can do them step by
  step, making sure each step works before going on to the next.


  6.3.1.  Bootp

  Install Bootp. See bootp*.rpm on Redhat linux cdrom.  See also LTSP
  site for RPM packages at  <http://www.ltsp.org>.  See also unix manual
  pages 'man 5 bootptab', 'man 8 bootpd', 'man 8 bootpef', 'man 8
  bootptest'.  You then have to ensure that this server is waiting for
  bootp requests.  The daemon can be run either directly by issuing
  command

  ______________________________________________________________________
         bootpd -s
  ______________________________________________________________________



  Or by using inetd edit the file /etc/inetd.conf and put a line like
  this:


  ______________________________________________________________________
          bootps dgram   udp     wait    root    /usr/sbin/in.bootpd    bootpd
  ______________________________________________________________________


  Insert or uncomment the following two lines in /etc/services:

  ______________________________________________________________________
  bootps          67/tcp          # BOOTP server
  tftp            69/udp          # TFTP server
  ______________________________________________________________________



  If you had to modify /etc/inetd.conf, then you need to restart inetd
  by sending the process a HUP signal.

  ______________________________________________________________________
         kill -HUP <process id of inetd>.
  ______________________________________________________________________



  Next, you need to give bootp a database to map Ethernet addresses to
  IP addresses. This database is in /etc/bootptab.  You must modify it
  by inserting the IP addresses of your gateway, dns server, and the
  ethernet address(es) of your diskless machine(s).  It contains lines
  of the following form:


  ______________________________________________________________________
          aldebaran.foo.com:ha=006008C7A3D8:ip=192.168.1.100:bf=/tftpboot/vmlinuz.nb
  ______________________________________________________________________



  Other information can be specified but we will start simple.


  Another example of /etc/bootptab is :


  ______________________________________________________________________
    global.prof:\
            :sm=255.255.255.0:\
            :ds=192.168.1.5:\
            :gw=192.168.1.19:\
            :ht=ethernet:\
            :bf=linux:
    machine1:hd=/export/root/machine1:tc=global.prof:ha=0000c0863d7a:ip=192.168.1.140:
    machine2:hd=/export/root/machine2:tc=global.prof:ha=0800110244e1:ip=192.168.1.141:
    machine3:hd=/export/root/machine3:tc=global.prof:ha=0800110244de:ip=192.168.1.142:
  ______________________________________________________________________



  global.prof is a general template for host entries, where


    sm field contains the subnet mask

    ds field contains the address of the Domain Name Server

    gw field contains the default gateway address

    ht field contains the lan media hardware type

    bf field contains the name of the boot file

  After this, every machine must have a line:


    the first field contains the host name,

    hd field contains the directory of the bootfile,

    the global template can be included with the tc field,

    ha field contains the hardvare address of the ethernet card,

    ip field contains the assigned ip address.

  Now boot the DC with the floppy and it should detect your Ethernet
  card and broadcast a BOOTP request. If all goes well, the server
  should respond to the DC with the information required. Since
  /tftpboot/vmlinux.nb doesn't exist yet, it will fail when it tries to
  load the file.  Now you need to compile a special kernel, one that has
  the option for mounting the root filesystem from NFS turned on. You
  also need to enable the option to get the IP address of the kernel
  from the original BOOTP reply. You also need to compile the Linux
  driver for your network adapter into the kernel instead of loading it
  as a module. It is possible to download an initial ramdisk so that
  module loading works but this is something you can do later.

  You cannot install the zImage resulting from the kernel compilation
  directly. It has to be turned into a tagged image. A tagged image is a
  normal kernel image with a special header that tells the network
  bootloader where the bytes go in memory and at what address to start
  the program. You use a program called mknbi-linux to create this
  tagged image. This utility can be found in the Etherboot distribution.
  After you have generated the image, put it in the /tftpboot directory
  under the name specified in /etc/bootptab. Make sure to make this file
  world readable because the tftp server does not have special
  privileges.

  6.3.2.  Tftp

  For TFTP, see tftp*.rpm on Redhat Linux cdrom.  TFTP (Trivial File
  Transfer Protocol) is a file transfer protocol, such as ftp, but it's
  much simpler to help coding it in EPROMs. TFTP can be used in two
  ways:


    Simple tftp: means that the client can acces to your whole file
     system. It's simpler but it's a big security hole (anyone can get
     your password file via tftp).

    Secure tftp: the tftp server uses a chroot.2 system call to change
     it's own root directory. Anything outside the new root directory
     will be completely inaccessible. Because of the chroot dir becomes
     the new root dir, the hd filed in the bootptab must reflect the new
     situation. For example: when using insecure tftp, the hd field
     contains the full path to the boot directory:
     /export/root/machine1.  When using secure tftp whith /export as
     root dir, then /export becomes / and the hd field must be
     /root/machine1.

  Tftpd is normally started up from inetd with a line like this in
  /etc/inetd.conf.


  ______________________________________________________________________
  tftp dgram udp wait root /usr/sbin/tcpd in.tftpd -s /tftpboot
  #tftp   dgram   udp     wait    root    /usr/sbin/in.tftpd     tftpd /export
  ______________________________________________________________________



  Again, restart inetd with a HUP signal and you can retry the boot and
  this time it should download the kernel image and start it. You will
  find that the boot will continue until the point where it tries to
  mount a root filesystem. At this point you must configure and export
  NFS partitions to proceed.


  6.3.3.  NFS root filesystem

  For various reasons, it's not a good idea to use the root filesystem
  of the server as the root filesystem of the DCs. One is simply that
  there are various configuration files there and the DC will get the
  wrong information that way. Another is security. It's dangerous to
  allow write access (and write access is needed for the root
  filesystem, for various reasons) to your server's root. However the
  good news is that a root filesystem for the DC is not very large, only
  about 30 MB and a lot of this can be shared between multiple DCs.

  Ideally, to construct a root filesystem, you have to know what files
  your operating system distribution is expecting to see there. Critical
  to booting are device files, files in /sbin and /etc. You can bypass a
  lot of the hard work by making a copy of an existing root filesystem
  and modifying some files for the DC. In the Etherboot distribution,
  there is a tutorial and links to a couple of shell scripts that will
  create such a DC root filesystem from an existing server root
  filesystem. There are also troubleshooting tips in the Etherboot
  documentation as this is often the trickiest part of the setup.

  The customised Linux kernel for the DC expects to see the root
  filesystem at /tftpboot/(IP address of the DC), for example:
  /tftpboot/192.168.1.100 in the case above. This can be changed when
  configuring the kernel, if desired.

  Now create or edit /etc/exports (see 'man 5 exports' and 'man 8
  exportfs') on the server and put in a line of the following form:


  ______________________________________________________________________
  /tftpboot/192.168.1.100 aldebaran.foo.com(rw,no_root_squash)
  ______________________________________________________________________



  The rw access is needed for various system services. The
  no_root_squash attribute prevents the NFS system from mapping root's
  ID to another one. If this is not specified, then various daemons and
  loggers will be unhappy.

  Start or restart the NFS services (rpc.portmap and rpc.mountd) and
  retry the diskless boot.  If you are successful, the kernel should be
  able to mount a root filesystem and boot all the way to a login
  prompt. Most likely, you will find several things misconfigured. Most
  Linux distributions are oriented towards disked operation and require
  a little modification to suit diskless booting. The most common
  failing is reliance on files under /usr during the boot process, which
  is normally imported from a server late in the boot process. Two
  possible solutions are -


  1. Provide the few required files under a small /usr directory on the
     root filesystem, which will then be overlaid when /usr is imported,
     and


  2. Modify the paths to look for the files in the root filesystem. The
     files to edit are under /tftpboot/192.168.1.100 (remember, this is
     the root directory of the DC).

  You may wish to mount other directories from the server, such as /usr
  (which can be exported read-only).


  6.3.4.  Burn EPROM

  When you are satisfied that you can boot over the network without any
  problems, you may wish to put the code on an EPROM.


  6.4.  Uses of Network booting

  X-terminals are one natural use of network booting. The lack of a disk
  in the terminal makes it quieter and contributes to a pleasant working
  environment. The machine should ideally have 16MB of memory or more
  and the best video card you can find for it. This is an ideal use for
  a high-end 486 or low-end Pentium that has been obsoleted by hardware
  advances.  Other people have used network booting for clusters of
  machines where the usage is light on the DC and does not warrant a
  disk, e.g. a cluster of classroom machines.

  6.5.  For more information

  Your first stop should be the Etherboot home page:
  <http://www.slug.org.au/etherboot/>

  There you will find links to other resources, including a mailing list
  you can subscribe to, where problems and solutions are discussed.

  Related documents

    NFS-root Mini Howto at /usr/doc/HOWTO/mini or on Linux cdrom.

    Linux Networking-HOWTO by Terry Dawson,  at /usr/doc/HOWTO or on
     linux cdrom 94004531@postoffice.csu.edu.au

    NET-3-Howto at /usr/doc/HOWTO or on Linux cdrom.

    /usr/src/linux/README about configuring and compiling new kernels

  7.  Redhat Linux configuration

  The DC requests to mount /tftpboot/< IP address of DC > (in Linux
  Kernel 2.1 and above it is - /tftpboot/< name of DC in bootptab > ) as
  its root directory '/' by NFS from server. You must export this from
  the server (rw, no_root_squash) because the DC wants to write on it
  (log files, etc).

  The root directory / must contain /sbin, /bin, /lib, /etc, /var, /tmp,
  /root, /dev and /proc.

  /sbin, /bin, /lib can be a copy of an existing Redhat Linux system.
  They can be shared between all DCs. But hard links only. By the way,
  don't link to server originals.

  /etc, /var and /dev should be non-sharable copies. Customise
  /etc/sysconfig/network, /etc/sysconfig/network-scripts/ifcfg-eth0,
  /etc/fstab, /etc/conf.modules, and others. Turn off all network
  services you don't need. Remove all stuff you don't need from /var,
  e.g. RPM db, lpd files.

  /root and /proc should just exist. /tmp should exist and be mode 1777.

  You probably want to create /usr and /home mount points. /usr can be
  mounted ro (read-only).

  About 10 MB per DC plus about 15 MB of shared files should be
  sufficient. By the way, if your DCs are quite similar, the kernel
  image can also be shared.

  Here is an illustrative script to create the first root filesystem.



  ______________________________________________________________________
  #!/bin/sh
  if [ $# != 1 ]
  then
          echo Usage: $0 client-IP-addr
          exit 1
  fi

  cd /

  umask 022

  mkdir -p /tftpboot/$1

  # just make these ones
  for d in home mnt proc tmp usr
  do
          mkdir /tftpboot/$1/$d
          done

          chmod 1777 /tftpboot/$1/tmp

          touch /tftpboot/$1/fastboot
          chattr +i /tftpboot/$1/fastboot

          # copy these ones
          cp -a bin lib sbin dev etc root var /tftpboot/$1

  cat <<EOF
  Now, in /tftpboot/$1/etc, edit

                  sysconfig/network
                  sysconfig/network-scripts/ifcfg-eth0
                  fstab
                  conf.modules

  and configure

                  rc.d/rc3.d
  EOF
  ______________________________________________________________________



  Here is an illustrative script to duplicate the root filesystem



  ______________________________________________________________________
  #!/bin/sh
  if [ $# != 2 ]
  then
          echo Usage: $0 olddir newdir
          exit 1
  fi

  cd /tftpboot

  if [ ! -d $1 ]
  then
          echo $1 is not a directory
          exit 1
  fi

  umask 022

  mkdir -p $2

  # just make these ones
  for d in home mnt proc tmp usr
  do
          mkdir $2/$d
  done

  chmod 1777 $2/tmp

  touch $2/fastboot
  chattr +i $2/fastboot

  # link these ones
  for d in bin lib sbin
  do
          (cd $1; find $d -print | cpio -pl ../$2)
  done

  # copy these ones
  for d in dev etc root var
  do
          cp -a $1/$d $2
  done

  cat <<EOF
  Now, in /tftpboot/$2/etc, edit

          sysconfig/network
          sysconfig/network-scripts/ifcfg-eth0
          fstab (maybe)
          conf.modules (maybe)

  and configure

          rc.d/rc3.d
  EOF
  ______________________________________________________________________



  7.1.  X-terminal

  On the server, make sure the DC is matched by a clause in
  /etc/X11/xdm/Xaccess and comment out the :0 in /etc/X11/xdm/Xservers.
  Then make sure that xdm is run from the init scripts.


  On the client, run X -query server

  You will get the xdm login box and then all your X clients will run on
  the server.

  For other applications use - you could use diskless technique for
  netboot routers, print servers (but should not be spooling print
  server), standalone apps, etc.

  8.  LanWorks BootWare PROMs

  This information may save you time.  In order to make LanWorks
  BootWare(tm) PROMs to correctly start up a Linux kernel image, the
  "bootsector" part of the image must be modified so as to enable the
  boot prom to jump right into the image start address.  The net-
  bootable image format created by netboot/etherboot's `mknbi-linux'
  tool differs and will not run if used with BootWare PROMs.

  A modified bootsector together with a Makefile to create a BootWare-
  bootable image after kernel compilation can be found at -

    Bwimage package
     <ftp://ftp.ipp.mpg.de/pub/ipp/wls/linux/bwimage-0.1.tgz>

    See also  <http://www.patoche.org/LTT/net/00000096.html>

    LanWorks BootWare Boot ROMs  <http://www.3com.com/lanworks>

  Refer to the README file for installation details. Currently, only
  "zImage"-type kernels are supported. Unfortunately, kernel parameters
  are ignored.

  This section courtesy of Jochen Kmietsch email to -
  jochen.kmietsch@tu-clausthal.de for any questions.

  9.  Etherboot

  Etherboot is a package for creating ROM images that can download code
  over the network to be executed on an x86 computer. Typically the
  computer is diskless and the code is Linux, but these are not the only
  possibilities.

  This document is at the Etherboot Home Page
  <http://www.slug.org.au/etherboot/>.  This document explains how to
  install, configure and use the Etherboot package.

  10.  Netboot

  Netboot was written by Zurck zu Gero. The main site is at
  <http://www.han.de/~gero/netboot.html>.

  10.1.  Introduction

  The following list shows just a few examples of what Netboot can be
  used for:


    Printer spooler

    Terminal server

    X11 terminal

    Data logging system


    Network-Computer (NC)

    Some more ....

  For the bootrom to find the kernel image it uses the BOOTP protocol as
  defined in ``'' and ``'' to get the necessary boot information, and
  then loads the actual image using the TFTP protocol as defined in
  ``''.

  The exact specifications for this netboot process can be found
  <http://www.han.de/~gero/netboot/english/spec.html>.


  10.2.  Mailing list

  There exists a mailing list devoted to network booting. To subscribe
  simply send a mail with the line

  subscribe netboot

  in it's body to majordomo@baghira.han.de

  The subject in the mail header doesn't matter.  After subscribing to
  it, you can send messages into the list by writing a mail to
  netboot@baghira.han.de.

  10.3.  Netboot useful links

  Netboot mailing list archive is at
  <http://www.han.de/~gero/netboot/archive/maillist.html>


    3com drivers at  <http://support.3com.com/infodeli/tools/nic>

    Accton drivers at here
     <http://www.accton.com/accton/drivers/adapter.html>

    Artisoft <http://www.artisoft.com>

    CNET <http://www.cnet.com.tw>

    Compaq <http://www.compaq.com/support/networking>

    D-Link <http://www.dlink.com>

    Microdyne <http://www.mcdy.com/marketin/prodman/prodcat.htm>

    Many NE2000 PCI cards are based on Realtek chipsets. Get drivers
     here <http://www.realtek.com.tw/cn/driver/driver.htm>

    Standard Microsystems Corp <http://www.smc.com/support.html>

    Surecom <http://www.sure-com.net>

    Thomas Conrad corp
     <http://www.compaq.com/support/networking/OutOfProduction.html>

    Winbond <http://www.winbond.com.tw>

    Xircom <http://www.xircom.com>



    Webopaedia page <http://www.sandybay.com/pc-
     web/network_interface_card_NIC.htm> on network cards

    Jargon's driver page
     <http://www.evitech.fi/~jarnomn/files/drivers/net_d.html> with many
     drivers for older network cards.

    Etherboot <http://www.slug.org.au/etherboot/> This is a project
     similar to Netbot but based on the BSD bootrom code.

    How to make an X Window Terminal
     <http://www.menet.umn.edu/~kaszeta/unix/xterminal/index.html> out
     of your old or outdated PC.

    List of jumper settings <http://www.slug.org.au/NIC/index.html> for
     various network cards. This page also contains many other good
     links.

    Freefire <http://sites.inka.de/lina/freefire-l/tools.html> is the
     home page of the Freefire project, which lists many resources for
     network security issues.

  11.  Related URLs


    See 'Diskless-root-NFS-HOWTO' at
     <http://metalab.unc.edu/LDP/HOWTO/Diskless-root-NFS-HOWTO.html>

    Linux goodies  <http://www.aldev.8m.com> or at
     <http://www.aldev.webjump.com>

  12.  Copyright Notice

  Copyright policy is GNU/GPL as per LDP (Linux Documentation project).
  LDP is a GNU/GPL project.  Additional restrictions are - you must
  retain the author's name, email address and this copyright notice on
  all the copies. If you make any changes or additions to this document
  than you should intimate all the authors of this document.

  13.  Appendix A - Install Instructions



                       I N S T A L L A T I O N

  Overview of the installation process
  ====================================

  Due to it's nature this package requires at least two computer systems. One
  acts as a server, and at least one other will be setup as a diskless client.
  Therefore this installation guide is divided into four sections:

          1.) Compilation and installation of utility programs on the server
          2.) Create a netbootable image of the target operating system
          3.) Setup of the server
          4.) Setup of the client including building the bootrom

  The server has to support TCP/IP and certain protocols based on this network
  standard. Most likely this will be a Unix-type server. Though it's probably
  possible to also use servers running OS/2 or Windows-NT, for example, all
  server related programs in this package can currently only be compiled on
  a Unix-type host. This requirement is independed of the operating system
  which is later booted on the diskless client. Therefore even if you want
  to boot MS-DOS on your client(s) you need at least one Unix-type computer
  for program compilation and generation of all boot files. Lateron when all
  necessary files are built you can use any server you want.

  This package contains two main parts:

          1.) The bootrom source and binaries. This part gets installed on
              the diskless client. All binaries except for utility programs
              are already precompiled. There are no further user changeable
              or adjustable options in the sources so you don't have to have
              access to the 16 bit development tools in order to use the boot-
              rom. You can just use the binaries provided.
              In order for the bootrom to access the network card in your
              diskless client you need a driver. Currently the bootrom only
              supports so called packet drivers, which are normally used on
              MS-DOS systems to interface a network stack with the hardware.
              With this package only the packet driver binaries are required,
              so you don't need to recompile anything here as well. You can
              find precompiled packet drivers for many popular network cards
              on any SimTel FTP mirror (it's called Crynwr packet driver col-
              lection), and for those of you without internet access some of
              those packet driver binaries are included with this package.
              Another good source for a packet driver for your network card
              might be it's manufacturer. At least the well known manufacturers
              (3Com and SMC for example) provide packet drivers for their
              complete product line. Those manufacturer provided packet drivers
              are usually faster and easier to install than those from the
              Crynwr collection, and can sometimes determine the hardware
              configuration at runtime, which the Crynwr drivers can't. However,
              there is a limitation in that you can only use packet drivers
              which are COM-type executables. EXE-type programs are not
              supported yet.

          2.) A set of programs to generate netbootable images on the server.
              These programs are called mknbi-<os>, where <os> identifies the
              operating system which is lateron running on the diskless client.
              Currently only Linux and MS-DOS are supported.

  There is another requirement which should not leave unnoted. Although you
  can build a bootrom with slightly limited functionality which is less than
  16kB in size, the usual size for a bootrom will be between 16kB and 32kB.
  Therefore when you go shopping for a network card you should try to get
  one which is able to support 32kB EPROM's. This is standard on almost all
  cards from major manufacturers, but most cheap NE2000 are known to allow
  only a maximum of 16kB. Also note that some network cards from 3Com and SMC
  allow you to select ROM sizes of 32kB and more with their configuration
  programs, but can physically support only 16kB!



  Compilation and installation of utility programs on the server
  ==============================================================


  This package uses GNU's autoconf to configure the compilation process
  of the utility programs. You shouldn't have any problems to compile
  these programs on any Unix-type system.

          1.) Cd into the netboot directory and run ./configure. It's
              a configuration script generated by autoconf and checks
              for header files and system specific details. The mknbi
              utility programs contain some Intel assembler modules which
              lateron run on the diskless client. If you want to assemble
              these modules you need as86 and ld86, which you can get for
              free for Unix systems. However, there are preassembled files
              available so you actually don't need these two programs.
              configure checks for their existence and creates the Makefiles
              accordingly.
              For an explanation of the switches available to configure
              just run it with the --help option. Some additional switches
              are available:

                  --disable-mknbi-linux
                  --disable-mknbi-dos

              Choose these options if you don't want to create any of the
              corresponding mknbi utility programs. There is also another
              configure option:

                  --enable-bootrom

              Use this option only if you want to recompile the bootrom
              itself. If you want to use the precompiled binaries, you don't
              need to specify this switch. See the file INSTALL.bootrom
              about how to recompile the bootrom.

          2.) Check that all generated Makefiles and the config.h are correct
              for your system.

          3.) Compile all programs with

                  make clean
                  make

              This will compile all programs without those which you disabled
              during the configuration stage. IMPORTANT NOTE: Some Makefiles
              use ifdef, which not every make program understands. If you
              get an error from make (usually in the form: "missing delimiter")
              then get and install GNU make on your system! Especially System V
              systems are known to have this deficiency.

          4.) If you want to permanently install the utility programs on
              your server you can run

                  make install

              This will also install the corresponding man pages for later
              reference. However, it's perfectly ok to skip this step and
              run the mknbi program from their source directories. But please
              note that they are just called "mknbi" within their source
              directories. Therefore if you read further down to run mknbi-dos,
              you have to use "./mknbi-dos/mknbi" instead if you didn't install
              the programs using 'make install'.



  Create a netbootable image of the target operating system
  =========================================================


  This step of the installation process depends on which operating you
  want to boot on your diskless clients. Everything described in this
  chapter does not depend on working on a Linux system. You can use any
  UNIX type system to create the netbootable images.

  Linux:  With Linux you have far too many options to list them all in
          this text. Please refer to the mknbi-linux man page for all
          details. I will only describe the most common ways to setup a
          diskless Linux client here.
          First you have to decide where the Linux client is going to
          mount it's root filesystem from. This can either be a directory
          on an NFS server or a ram disk. Setup your Linux kernel accordingly.
          To use a root filesystem on an NFS server you should include TCP/IP
          network support into the kernel together with support for NFS file-
          systems. You cannot load this NFS support using a module as it has
          to be available at bootup. Additionally you also have to select
          NFSROOT support during kernel configuration. However, you don't
          need BOOTP or RARP support. Accordingly if you want to use ramdisk
          support the filesystem type you are going to use on the ramdisk has
          to be permanently compiled into the kernel. Also initrd has to be
          included in that case.


          1.) Configuring for NFS root filesystem.

          Next copy your Linux kernel into the current directory and run
          mknbi-linux:

                  mknbi-linux -d rom -i rom -k zImage -o bootImage

          This supposes that your kernel image is called zImage, and gives
          you a netbootable image named bootImage.


          2.) Configuring for root filesystem on ramdisk

          If you want to use a ramdisk as a root device you have to create
          a ramdisk image first. Probably the easiest way to setup such an
          image is to use a floppy, though you can also use the loopback
          device if you are working on a Linux host. First format the floppy
          and make a filesystem on it. Next copy all programs and files onto
          it which you want to have on the root filesystem of the diskless
          client lateron. You should then test your root floppy. To do this
          copy your kernel onto another floppy with dd and set it's root device
          to floppy using rdev:

                  dd if=zImage of=/dev/fd0
                  rdev /dev/fd0 /dev/fd0

          Now boot your diskless client using this boot disk. After the kernel
          started up, it will ask you to insert the root floppy and to press
          enter. Your root floppy will be mounted.
          If everything works as you intended, you can now create a netbootable
          image. Re-insert the root floppy into your server system (or whereever
          this netboot directory is located), and type:

                  dd if=/dev/fd0 of=ramImage
                  gzip -9 ramImage
                  mknbi-linux -d ram -i rom -r ramImage.gz -k zImage -o bootImage

          Like above this will now give you a file bootImage with the netbootable
          Linux kernel image in it.


  MS-DOS: To boot DOS on your diskless client you have to have MS-DOS Version
          5.0 or higher. Windows-95 has an internal DOS called version 7.0, so
          it should be no problem to use it as well. Older MS-DOS versions
          will definitely not work. I haven't had a chance to test any other
          DOS like Novell-DOS or DR-DOS. Give them a try, and tell me.

          First you have to create a directory which contains all the files
          the client will see on it's boot drive (either A: or C:). This
          can either be the root directory on a DOS floppy or any directory
          on the system on which you installed mknbi-dos. In the first case
          it has to be a floppy which contains a bootable DOS system, i.e.
          which has been created with

                  format a: /s

          on a DOS system. If the directory resides on a UNIX system, you
          have to copy the two system files msdos.sys and io.sys, which are
          part of MS-DOS, into it by yourself. To do this I recommend using
          mread of the MTools, which are freely available for almost every
          UNIX system.

          After you created the directory or floppy which lateron becomes
          the clients boot drive, you should copy all other necessary files
          into it. This will probably include programs to setup a network
          environment on the client. When editing text files for the client
          please note that they usually have to be in MS-DOS format with
          lines ending in Carriage-Return/Linefeed instead of just Linefeed
          as it is common on UNIX systems. When you are finished setting up
          the clients boot directory, first get a copy of the floppy disk
          image, and then run mknbi-dos to create a netbootable image:

                  dd if=/dev/fd0 of=fdImage
                  mknbi-dos -r fdImage -o bootImage

          This assumes that you inserted the boot floppy into the fd0 drive
          of your UNIX system, and will create a file named bootImage. If you
          used a UNIX directory, substitute fdImage with it's name. mknbi-dos
          will automatically detect wether it is a directory, an ordinary
          file or a block device.

          By default mknbi-dos creates a netbootable image, which lateron
          mounts the ram disk as the A: drive on your client. If you want
          to mount the ram disk as C: instead, you should include the '-c'
          switch to the call of mknbi-dos.
          The difference between mounting the ram disk as a floppy (A:) or
          hard disk (C:) is, that with the floppy option the ram disk can
          be removed lateron, maybe after a network redirector has been
          loaded, which makes the ram disk obsolete. This is not possible
          with a virtual hard disk drive. On the other hand side, when using
          the ram disk as C: you can specify a different ramdisk size with
          the '-s' option. Please refer to the man page for mknbi-dos for
          further information.



  Setup of the server
  ===================


  Setup of the server depends on the kind of server you are using. There-
  fore all further explanations in this chapter can only serve as a general
  guide. You should consult your server's documentation as the final autho-
  rity.

  When the bootrom starts on the client it first tries to query a bootp
  server for information like IP numbers and the name of the boot image
  file. Such a bootp server program is usually called bootpd. Most sun
  servers use a program called bootparamd instead. Note that you _cannot_
  use bootparamd as a substitute for bootpd as both programs use different
  protocols. Install a publicly available bootpd instead on your sun.
  Next you should copy the bootImage file, which you have created in the
  previous step above, into a publicly accessible directory (called /boot
  for example). If you want to boot more than one diskless client you can
  use the same bootImage file for every client. However, if you configured
  for a ramdisk (with Linux or DOS) and the ramdisk image contains different
  files or information for every client, you will obviously also need a
  different bootImage file for each client.
  Then you need to setup a boot description file for bootpd, which is
  usually called /etc/bootptab. Consult your server's documentation for
  further information. However, the entries in this file will usually
  look something like this for every diskless client:

  client1:hd=/boot:vm=auto:ip=192.109.225.66:\
          :ht=ethernet:ha=004001417173:\
          :bf=bootImage-client1:rp=/boot/client1/root

  which you created in the previous step. Therefore the full pathname for
  the bootImage file for the diskless system called "client1" will be

          /boot/bootImage-client1

  with this sample entry. The 'ip' tag specifies the IP address of the client,
  ware address. The 'vm=auto' tag tells bootpd to use the same vendor encoding
  as the bootrom. If your diskless client is going to use it's root filesystem
  via NFS you should also specify the directory on the server which gets mounted
  lateron with the 'rp' tag. However, if your diskless client uses a ramdisk,
  you can omit 'rp'. When you choose to use the standard bootrom with ANSI
  display driver (see below for further information) you could also setup
  a menu for letting the user select different boot image files. See the
  additional file INSTALL.menu about how to use this feature. But I recommend
  to first use the standard way of setting up the bootptab file as described
  above. You can always add a user menu lateron.
  Of course you should also remember to get bootpd running on the server,
  either on bootup from /etc/rc or some similar mechanism, or from inetd.
  Again, see your server's documentation about how to do this.

  The next step preformed by the bootrom after querying the bootp server is
  to load in the boot image file specified by the 'hd' and 'bf' tags in
  /etc/bootptab. To do this a protocol named tftp is used. Therefore you
  will next have to setup a daemon process for this protocol on your server.
  Such a daemon is usually called tftpd, and you should again remember to
  get tftpd running, usually via inetd. Since the TFTP protocol is very
  insecure access to the tftpd server is usually restricted, either within
  tftpd itself, or with a TCP/IP wrapper like tcpd. tcpd for example uses
  host access control tables which are stored in /etc/hosts.allow and
  /etc/hosts.deny. See tftpd(8), tcpd(8) and hosts_access(5) as well as
  your server's documentation for further information.

  If you selected a ramdisk for the diskless client's root directory you are
  now finished with the server setup. But if your client is going to use NFS
  (either directly like with booting Linux, or by using programs included on
  the ram disk) you should now setup everything which is necessary for moun-
  ting an NFS directory on the server. This usually involves running several
  programs: portmap, mountd, nfsd and optionally ugidd. portmap usually doesn't
  require editing any configuration files. But for mountd and nfsd you need
  to specify the permissions which allow the client to access the required
  directories on the server. These permissions are usually set with a file
  called /etc/exports. Typically it looks like this for our sample client:

  #
  #  Export directories for client1 (diskless workstation)
  #
  /boot/client1/root              client1(rw,link_absolute)
  /boot/client1/usr               client1(rw,link_absolute)

  If you use 'map-daemon' to map UID and GID numbers on the server you
  should remember to also configure and run ugidd on the server. Please
  consult your server's documentation for further information regarding
  setup of NFS exports. You might also want to check out the portmap(8),
  nfsd(8), mountd(8) and ugidd(8) man pages. Also remember that access
  to any of these services might be restricted with tcpd on your server.

  Another important step is to fill up the root directory for the disk-
  less client. It has to contain all files necessary for the client to
  startup and mount further directories via NFS (like a /usr filesystem
  as specified in the /etc/exports example above). How to setup this
  root directory is far beyond the scope of this documentation. Just one
  hint: if your server is _not_ running Linux, you should be aware of
  major/minor number assignments in the /boot/client1/root/dev directory.
  For example, simply using mknod on an AIX server will eventually give
  you wrong major/minor number when the directory is later exported to
  a Linux diskless client. With some configurations AIX will add a certain
  offset to all major numbers which makes them unusable for Linux. Refer
  to your server's manuals for further information. You might also find
  some useful hints in the file Documentation/nfsroot.txt in the Linux
  source tree, if your diskless client is booting Linux.



  Setup of the client including building the bootrom
  ==================================================


  Until now you only had to work on the server (with the exception of maybe
  booting your diskless client from a diskette to check the correctness of
  the root filesystem). As the last step we can now go on and setup the
  diskless client itself.

  The first step is to configure the network card in the diskless client. For
  this refer to the manual which came with the network card. Some cards require
  setting of jumpers. Others have setup programs which have to be run. After
  configuring the network interface write down all necessary hardware parameters
  like I/O addresses, memory addresses, interrupt line number or DMA channel
  numbers, as you might need this information lateron in the configuration
  process.

  Next change into the netboot directory on your UNIX system (where this
  documentation file is in) and type

          make bootrom

  This will compile all necessary utility programs and then run the
  configuration program. It will first ask you which bootrom kernel you
  want to use. The minimal kernel is necessary for network cards which
  only allow up to 16 kB ROM size, and kernel86 can be used to boot on
  16-bit systems (older than 386), for example for booting MS-DOS. Unless
  you have any special requirements you should choose the standard kernel.
  Then you have to specify the packet driver to use for your network card.
  You can either choose one of the supplied drivers, or provide your own.
  If you want to provide your own driver you have to give the full path
  name of the packet driver binary on your server, and also specify all
  necessary options to run it. Don't specify any options here which switch
  the packet driver into windows mode or which allow it to work for disk-
  less systems. Those options are for Novell network bootroms only, and
  are not necessary for this bootrom.
  If you use one of the drivers in the list shown, the configuration
  program will ask you about all necessary hardware information to run
  the packet driver which you selected. This usually includes the I/O
  address of the network card, it's interrupt number and a DMA channel
  number. Note that only that information is requested which is really
  necessary. You should have your network card information handy when
  entering this information. Some packet drivers are able to determine
  hardware related information at runtime and therefore don't require
  any further information.

  If you did not select the minimal kernel, the configuration program
  is next going to ask you wether you want to include some additional
  drivers. First it lets you select the ANSI display driver. This will
  allow you to draw nice menus on the screen with the standard bootrom
  kernel. You can then select the packet driver debugging program. It's
  an additional module to trace network problems and is usually not re-
  quired. It shows you the first couple bytes of all packets (where
  the UDP/IP headers are encoded) going through the packet driver
  during boot time of the diskless client. Only select this debugging
  module if you run into problems during the initial network boot process
  of the bootrom _and_ you know how to decode the UDP/IP header infor-
  mation. The configuration program will also ask you about any additional
  modules you want to install into the bootrom. These modules have to
  be standard DOS COM-type programs, and can, for example, preset
  the network card to a special state before the packet driver starts,
  or setup a serial line to support booting over a PPP or SLIP connec-
  tion (the Crynwr packet driver collection also contains a SLIP packet
  driver which is not provided in this package). However note that the
  total size of the resulting bootrom image can't be larger than 64kB.

  After you answered all questions the configuration program is creating
  the bootrom according to your specifications. It first combines the
  bootrom kernel with all selected modules, then compresses the resulting
  file and adds the bootrom startup code. When the configuration program
  has finished you will find two new files in the current directory:

          image.flo - this file can be written onto a floppy using dd
          image.rom - image to be burned into an EPROM

  You should now copy image.flo onto a floppy using

          dd if=image.flo of=/dev/fd0

  and then boot your diskless client using this floppy. If you have setup
  everything (including your network card) you will see the bootrom code
  starting, querying the bootp server and loading the boot image file. When
  everything works as required you can then go on and burn the file image.rom
  into an EPROM. Please consult the manual of your EPROM burner how to do
  this. It usually requires converting the image file into a special format
  (Intel or Motorola hex format for example). Insert the EPROM into the
  socket on your network card and turn on the diskless system. You should
  now see the bootrom coming up.
  Another way of getting the bootrom code into your client is using the
  Flash-EPROM card (called FlashCard), for which you can find a schematic
  and PCB layout in this package. You can use image.rom directly to burn
  it into FlashCard - there is no hex conversion necessary. About how to
  use and program the FlashCard see the documentation in the FlashCard
  directory.

  In case you want to create new bootroms without always having the sources
  around, you can now install the binaries created during the configuration
  step with the command

          make bootrom_install

  This will copy all necessary binaries for creating new bootroms into the
  directory $prefix/lib/netboot where $prefix is either /usr/local or the
  prefix you specified with running GNU configure. The typical path would
  be /usr/local/lib/netboot. It will also install the makerom script into
  $prefix/bin, so you just have to type makerom to create a new bootrom.



  Appendix: Recompiling the bootrom
  ========


  If you want to recompile the bootrom for some reason, checkout the file
  INSTALL.bootrom for further information. However, you don't need to re-
  compile the bootrom in order to just use it!



  14.  Appendix B - Troubleshoot Problems



                  T R O U B L E S H O O T I N G

  If you run into any problem during installation or when using this
  package, please first read the following text and all other relevant
  documentation. Especially you should consult your server's documen-
  tation if you run into problems setting up your server. Also refer
  to your network card's user manual or the documentation for the
  operating systems of the diskless clients accordingly. However, if
  you still can't solve the problem on your own, you can send me an
  email to

                  gero@gkminix.han.de

  Users able to speak German can send me the mail in german. Otherwise
  please write in english. I already received some emails in so poor
  english that I haven't been able to even understand the problem. I
  can't help you in that case. And please excuse me that I can't answer
  questions sent to me by standard mail or telephone calls. I just don't
  have the time for dealing with that.
  If you decided to send me an email please describe your problem as
  exactly as possible. It usually helps to send me relevant portions
  of configuration files (I have to pay for my internet access by myself
  so please keep quotings as short as possible). Especially with problems
  with the bootrom it usually helps to _exactly_ write down the screen
  output, not only but including any error messages. Also state as exact
  as possible how you created the problem so that I can try to simulate
  it on my own hardware.
  Additionally please note that I can't help you with every problem with
  your server, as there are so many different systems on the market. The
  same is true for problems with network cards. I just don't have the
  financial capabilities to buy any card on the market for testing. Per-
  sonally I'm using NE2000 and WD8013 cards, so I can probably help you
  with those.
  If you find a problem which looks like a bug in the code I really
  appreciate a short notice from you. And if you have a fix for the bug
  I would even more appreciate your message.
  Besides contacting me directly there also exists a mailing list related
  to network booting which you can subscribe to. Write a mail with the
  message 'subscribe netboot' in it's body to majordomo@baghira.han.de
  (the subject of the mail doesn't matter). The readers of the mailing
  list should also be able to help you with any problem you might have
  while setting up a diskless client. And besides that I'm also going
  to announce any new version of this netboot package to the mailing
  list.



  Problem: My operating system OS/XY is not supported by netboot

          I would gladly provide support for every operating system on the
          market, but I don't have the resources for doing this. However,
          if you want a particular operating system to be supported, you
          should get in contact with me. In any case you will have to provide
          me with a valid and licensed copy of that operating system. You are
          also invited to write your own boot loader, and send it to me for
          inclusion into netboot under the terms of the GNU GPL.



  Problem: While trying to build a bootrom I get a compiler error

          The installation scripts require to compile a couple of utility
          programs which are only required during building the bootrom.
          They should compile on any Unix-type system, so if you get an
          error please report it to me, even when you are able to fix it
          yourself, so that I can include a patch for future releases.



  Problem: I get a an error from make saying something like "missing delimiter"

          Some of the Makefiles use ifdef's, which older make programs don't
          understand. Even some more "modern" systems like SCO Open-Server 5
          have this problem. In that case you will have to get and install GNU
          make on your system (which is the better choice anyway).



  Problem: The bootrom doesn't startup at all

          Either you have a floppy in your diskette drive or you have
          a hard disk installed with a partition marked as active, and the
          bootrom has been built so that it lets the BIOS look for active
          partitions first. Both conditions let the system boot from the
          bootable media instead of using the bootrom. Just remove the
          floppy or use fdisk to mark all partitions as unbootable (e.g.
          inactive). Alternatively you can also build the bootrom so that
          it does not allow the BIOS to look for bootable partitions. The
          program which actually creates the bootrom ('makerom', it gets
          called when you run 'make bootrom') will ask you about this right
          after selecting the bootrom kernel image.



  Problem: The bootrom behaves strange during startup, and may even hangup
           the whole system

          If you compiled the mknbi programs on a system with big endian
          byte order (like Motorola or PPC systems) this might indicate
          that the configuration program couldn't find the correct byte
          order. It might also be that there is a bug in the byte ordering
          code. Some systems like SPARCs also do not allow data accesses at
          misaligned addresses. 'configure' should usually find out about
          these conditions. In any case, if 'configure' is not able to pro-
          perly detect what kind of system you are using, edit the file
          config.h by hand and try it again. Please report this condition,
          and also note which system you used for installation.



  Problem: The packet driver is not able to start properly

          First check what error message the packet driver prints. Usually
          this problem is a result of an incorrect setup of the network
          card, so check that it uses an I/O address, interrupt line and DMA
          channel (if applicable) of it's own, and that the packet driver
          uses the correct values. Another common problem with ethernet
          cards which use shared memory (like WD80?3 cards) is an overlap-
          ping of this shared memory with the rom area used by the bootrom.
          Select a different shared memory address in that case. If that's
          ok you should next check that you configured the packet driver
          correctly with the bootrom configuration program. Usually the
          packet driver prints out what it expects the hardware to look
          like so you can use this information to check up your setup.



  Problem: The bootrom tells me that there is not enough memory but I have
           xx megabytes installed

          This problem is a result of the fact that the BIOS starts the
          bootrom in the processor's real mode. The bootrom is therefore
          only able to access the lower 1 megabyte of memory, regardless
          of how much you installed. And 384kB of this is reserved for
          ROM's and the video memory, so there is only 640kB left. Unfor-
          tunately some systems even reserve memory from these lower 640kB
          for internal BIOS data. This is called extended BIOS data area,
          and known to be used on most PS/2 systems. But also some other
          BIOSes use such an extended BIOS data area, which is usually
          selectable in the system's setup. Therefore you should try to
          deselect such a feature. If that's not possible you are out
          of luck - sorry.



  Problem: The bootrom doesn't receive a bootp answer and just hangs printing
           dots

          First you should check if bootpd runs on your server or is started
          properly from inetd. Then check that the server's /etc/bootptab is
          setup correctly. Especially the hardware address and the client's
          IP address and name have to be correct.
          Most bootp servers have the ability to write debugging information
          into a log file. Use that feature to verify that your server really
          receives bootp requests from the client's bootrom and sends out a
          valid answer. Also check for error messages in the log file. Even
          if your bootpd doesn't write into a seperate log file it might use
          syslog on your system, so find the log file name from your syslogd
          configuration file and check for errors.
          If you are able to use a network tracing program like tcpdump you
          can check if the bootrom sends out correct requests and that the
          server is answering correctly. In that case it is more likely to
          be a problem in the bootrom, so you should create a new bootrom
          image with the packet driver debugging module included. You should
          then see the bootrom's request packets going out, and the server's
          answers coming in. If there are no packets coming in although you
          verified that the server is sending out correct replies there might
          be a problem with your network card. Did you set it up correctly,
          is a cable connected (no kidding, those things really happen)?
          If everything fails try to boot the diskless client with the
          intended operating system and try to access the network card
          using that operating system's tools.
          If the server is not sending out answer packets, but the bootpd
          logfiles indicates correct answers, it might be a problem with
          the arp setup on your server. Normally arp shouldn't be a concern
          for you. However, some older versions of bootpd for Linux had
          problems here, which could be solved by setting the kernel arp
          table manually.



  Problem: The bootrom did get a bootp answer but is not able to load the
           bootimage file

          This is likely to be a problem with the tftpd setup on the server.
          Does tftpd run when you startup the bootrom code? If not check
          that inetd is configured correctly. Also there might be a TCP/IP
          wrapper running on your server which might prohibit access to
          the tftp service (which is known to be very insecure and therefore
          a candidate for getting started by an internet security wrapper
          like tcpd). Check any access configuration files for tcpd.
          Furthermore tftpd has to be able to access the bootimage file. It
          usually runs as a user with very low priviliges because of security
          reasons and might not be allowed to read the bootimage file, so
          you should check and set the bootimage file's permissions correctly.


  Problem: The boot image loader reports an error

          Congratulations! You just discovered a bug in the boot loader.
          Please report it to me.



  Problem: When I'm using the bootrom menu to load a Unix system off the local
           hard disk, it reports some weird error messages to me (especially,
           SCO Unix says that it's not able to open boot device). However,
           booting without the bootrom works without a problem.

          Some operating systems, especially Unix like systems, read the
          partition table after booting and try to find their own boot par-
          tition. When using the bootrom, it's not necessary to mark the
          Unix partition as bootable, so the Unix startup loader fails.
          To solve this problem, mark the Unix partition active with some
          fdisk program. To avoid that it starts running instead of the
          bootrom, create the bootrom so that it does not allow the BIOS
          to search for boot partitions on the installed hard disks (the
          'makerom' program, which gets run when you do a 'make bootrom',
          will ask you about this right after selecting a kernel image).



  Problem: I'm loading Linux onto my diskless client and the kernel tells
           me to insert a root floppy and press enter

          First you should check that you built your kernel correctly. It
          should have support for the root filesystem built in. If you want
          to use an NFS mounted directory as root the kernel should have
          TCP/IP support installed. Also it has to have a driver for your
          network card built in, and NFS and NFSROOT have to be both speci-
          fied. When using a ramdisk it's support has to be compiled in
          as well as support for the filesystem with which you formatted
          the ramdisk image. Please note that the loaded kernel is not
          able to use modules at bootup time (only _after_ the root file-
          system has been mounted, but not before), so everything has to
          be compiled in.

          If the kernel is not able mount it's root via NFS, this might
          have many different reasons. It requires all addresses in the
          /etc/bootptab file to be correct, and the access rights on the
          server have to be set correctly - not only in /etc/exports but
          also the permissions for the directory to get mounted. If that's
          correct check that a portmapper is running on the server, and
          that it registered the mountd and nfsd services correctly. You
          can usually do this by running the command

                          rpcinfo -p

          Note that services are only listed here if their associated server
          process is really running. The rpcinfo output should then look
          something like this:

                     program vers proto   port
                      100000    2   tcp    111  portmapper
                      100000    2   udp    111  portmapper
                      100003    2   udp   2049  nfs
                      100003    2   tcp   2049  nfs
                      100005    1   udp    663  mountd
                      100005    1   tcp    665  mountd

          However, the port numbers might be different.

          When the kernel starts mounting the NFS root directory it prints
          out the name of that directory on the server. It should be the
          same as the one configured in /etc/bootptab. Check that it's
          correct. If not you can try to use the -d option with mknbi-linux
          to specify the name explicitely.

          If the kernel gets an error from the server's nfsd, it prints
          a number which is defined according to the NFS protocol. The
          most commonly occurring numbers are:

                   1  -  permission denied to access directory
                   2  -  directory doesn't exist
                   5  -  I/O error on server filesystem
                  13  -  nfsd is unable to access directory
                  20  -  path name is not a directory
                  63  -  path name is too long

          Note that some nfsd and mountd programs only read /etc/exports
          on startup. If you changed this file afterwards, you will have
          to restart both daemons. Additionally, with nfsd versions for
          Linux earlier than 2.1 you will have problems with special files
          like UNIX domain sockets or block/character special files on
          your NFS partitions. You should therefore use the latest avai-
          lable versions.



  Problem: The Linux kernel mounts it's root correctly but doesn't give me
           a login prompt.

  1.)     This might be the result of an incorrect setup of the root file-
          system (see No. 2 below). However, it's also possible that your
          server reported the wrong major/minor numbers for the console device
          even though you specified them correctly in the NFS mounted root
          directory. I know of this problem with AIX and HP-UX servers,
          but there might exist others as well which don't transfer special
          devices via NFS as Linux requires it. One solution to solve this
          problem is to boot the diskless client with a ramdisk image as
          it's root, and then mount the should-be-root directory on the
          server using NFS. Then you can create the special files in the
          dev directory using Linux's mknod program, and use the NFS root
          mounting bootimage again.
          Another way is to try to find out, how the server operating system
          encodes major/minor numbers on it's own filesystem. For example,
          HP-UX uses a 32 bit device number, with the 8 highest bits being
          the major number, and the lower 24 bits being the minor device
          number:

                  major << 24 | minor   ==>   aaaaaaaabbbbbbbbbbbbbbbbbbbbbbbb

          In this representation (a) means a bit of the major number, and
          (b) means a bit of the minor number. Linux uses the following
          scheme instead:

                  major << 8 | minor    ==>   0000000000000000aaaaaaaabbbbbbbb

          The NFS protocol now transfers these 32 bits just as they are,
          without any further interpretation regarding major/minor numbers.
          That means, that all relevant bits in the Linux representation
          fit into the minor number on HP-UX. Therefore, if you create a
          device on the HP-UX server, you have to alway give it a major
          number of zero and compute the minor number the way mentioned
          above for Linux. For example, to let Linux see a device 5/2 in
          it's NFS-mounted /dev directory, you can compute the minor device
          number on HP-UX as

                  5 << 8 | 2    ==>  1282
          So the device to create on the HP-UX server is 0/1282. This will
          let Linux see 5/2 after the filesystem is mounted with NFS.

  2.)     Another reason for this problem might be that the init process
          doesn't get started at all. This can be a result of incorrect
          shared libraries, which the client might see but without a proper
          ld.so.cache file. Or the shared libraries are not reachable by
          the client at all. Bruce Janson and Markus Gutschke collected a
          good list of possibilities, which you should check out:

                  - you do not have a private copy of the /, /etc, /var, ...
                    directories

                  - your /dev directory is missing entries for /dev/zero and/or
                    /dev/null or is sharing device entries from a server that uses
                    different major and minor numbers (i.e. a server that is not
                    running Linux - see above).

                  - your /lib directory is missing libraries (most notably libc*
                    and/or libm*) or does not have the loader files ld*.so*

                  - you neglected to run ldconfig to update /etc/ldconfig.cache
                    or you do not have a configuration file for ldconfig.

                  - your /etc/inittab and/or /etc/rc.d/* files have not been
                    customized for the clients.

                  - your kernel is missing some crucial compile-time feature
                    (such as NFS filesystem support, booting from the net, trans-
                    name (optional), ELF file support, networking support, driver
                    for your ethernet card).

                  - missing init executable (in one of the directories
                    known by the kernel: /etc, /sbin, ?)

                  - missing /etc/inittab

                  - missing /dev/tty?

                  - missing /bin/sh

                  - system programs that insist on creating/writing to files
                    outside of /var (mount and /etc/mtab* is the canonical
                    example)



  Problem: Can't compile the bootrom

          Please get in touch with me if you encounter any problems
          while recompiling the bootrom.



  15.  Appendix C - RFC 951

  This section is for academic interest only - for universities or
  research institutes.



  Network Working Group                   Bill Croft (Stanford University)
  Request for Comments: 951                John Gilmore (Sun Microsystems)
                                                            September 1985

                         BOOTSTRAP PROTOCOL (BOOTP)


  1. Status of this Memo

     This RFC suggests a proposed protocol for the ARPA-Internet
     community, and requests discussion and suggestions for improvements.
     Distribution of this memo is unlimited.

  2. Overview

     This RFC describes an IP/UDP bootstrap protocol (BOOTP) which allows
     a diskless client machine to discover its own IP address, the address
     of a server host, and the name of a file to be loaded into memory and
     executed.  The bootstrap operation can be thought of as consisting of
     TWO PHASES.  This RFC describes the first phase, which could be
     labeled 'address determination and bootfile selection'.  After this
     address and filename information is obtained, control passes to the
     second phase of the bootstrap where a file transfer occurs.  The file
     transfer will typically use the TFTP protocol [9], since it is
     intended that both phases reside in PROM on the client.  However
     BOOTP could also work with other protocols such as SFTP [3] or
     FTP [6].

     We suggest that the client's PROM software provide a way to do a
     complete bootstrap without 'user' interaction.  This is the type of
     boot that would occur during an unattended power-up.  A mechanism
     should be provided for the user to manually supply the necessary
     address and filename information to bypass the BOOTP protocol and
     enter the file transfer phase directly.  If non-volatile storage is
     available, we suggest keeping default settings there and bypassing
     the BOOTP protocol unless these settings cause the file transfer
     phase to fail.  If the cached information fails, the bootstrap should
     fall back to phase 1 and use BOOTP.

     Here is a brief outline of the protocol:

        1. A single packet exchange is performed.  Timeouts are used to
        retransmit until a reply is received.  The same packet field
        layout is used in both directions.  Fixed length fields of maximum
        reasonable length are used to simplify structure definition and
        parsing.

        2. An 'opcode' field exists with two values.  The client
        broadcasts a 'bootrequest' packet.  The server then answers with a
        'bootreply' packet.  The bootrequest contains the client's
        hardware address and its IP address, if known.


  Croft & Gilmore                                                 [Page 1]


  RFC 951                                                   September 1985
  Bootstrap Protocol


        3. The request can optionally contain the name of the server the
        client wishes to respond.  This is so the client can force the
        boot to occur from a specific host (e.g. if multiple versions of
        the same bootfile exist or if the server is in a far distant
        net/domain).  The client does not have to deal with name / domain
        services; instead this function is pushed off to the BOOTP server.
        4. The request can optionally contain the 'generic' filename to be
        booted.  For example 'unix' or 'ethertip'.  When the server sends
        the bootreply, it replaces this field with the fully qualified
        path name of the appropriate boot file.  In determining this name,
        the server may consult his own database correlating the client's
        address and filename request, with a particular boot file
        customized for that client.  If the bootrequest filename is a null
        string, then the server returns a filename field indicating the
        'default' file to be loaded for that client.

        5. In the case of clients who do not know their IP addresses, the
        server must also have a database relating hardware address to IP
        address.  This client IP address is then placed into a field in
        the bootreply.

        6. Certain network topologies (such as Stanford's) may be such
        that a given physical cable does not have a TFTP server directly
        attached to it (e.g. all the gateways and hosts on a certain cable
        may be diskless).  With the cooperation of neighboring gateways,
        BOOTP can allow clients to boot off of servers several hops away,
        through these gateways.  See the section 'Booting Through
        Gateways' below.  This part of the protocol requires no special
        action on the part of the client.  Implementation is optional and
        requires a small amount of additional code in gateways and
        servers.

  3. Packet Format

     All numbers shown are decimal, unless indicated otherwise.  The BOOTP
     packet is enclosed in a standard IP [8] UDP [7] datagram.  For
     simplicity it is assumed that the BOOTP packet is never fragmented.
     Any numeric fields shown are packed in 'standard network byte order',
     i.e. high order bits are sent first.

     In the IP header of a bootrequest, the client fills in its own IP
     source address if known, otherwise zero.  When the server address is
     unknown, the IP destination address will be the 'broadcast address'
     255.255.255.255.  This address means 'broadcast on the local cable,
     (I don't know my net number)' [4].



  Croft & Gilmore                                                 [Page 2]


  RFC 951                                                   September 1985
  Bootstrap Protocol


     The UDP header contains source and destination port numbers.  The
     BOOTP protocol uses two reserved port numbers, 'BOOTP client' (68)
     and 'BOOTP server' (67).  The client sends requests using 'BOOTP
     server' as the destination port; this is usually a broadcast.  The
     server sends replies using 'BOOTP client' as the destination port;
     depending on the kernel or driver facilities in the server, this may
     or may not be a broadcast (this is explained further in the section
     titled 'Chicken/Egg issues' below).  The reason TWO reserved ports
     are used, is to avoid 'waking up' and scheduling the BOOTP server
     daemons, when a bootreply must be broadcast to a client.  Since the
     server and other hosts won't be listening on the 'BOOTP client' port,
     any such incoming broadcasts will be filtered out at the kernel
     level.  We could not simply allow the client to pick a 'random' port
     number for the UDP source port field; since the server reply may be
     broadcast, a randomly chosen port number could confuse other hosts
     that happened to be listening on that port.

     The UDP length field is set to the length of the UDP plus BOOTP
     portions of the packet.  The UDP checksum field can be set to zero by
     the client (or server) if desired, to avoid this extra overhead in a
     PROM implementation.  In the 'Packet Processing' section below the
     phrase '[UDP checksum.]' is used whenever the checksum might be
     verified/computed.

        FIELD   BYTES   DESCRIPTION
        -----   -----   -----------

           op      1       packet op code / message type.
                           1 = BOOTREQUEST, 2 = BOOTREPLY

           htype   1       hardware address type,
                           see ARP section in "Assigned Numbers" RFC.
                           '1' = 10mb ethernet

           hlen    1       hardware address length
                           (eg '6' for 10mb ethernet).

           hops    1       client sets to zero,
                           optionally used by gateways
                           in cross-gateway booting.

           xid     4       transaction ID, a random number,
                           used to match this boot request with the
                           responses it generates.

           secs    2       filled in by client, seconds elapsed since
                           client started trying to boot.


  Croft & Gilmore                                                 [Page 3]


  RFC 951                                                   September 1985
  Bootstrap Protocol


           --      2       unused

           ciaddr  4       client IP address;
                           filled in by client in bootrequest if known.

           yiaddr  4       'your' (client) IP address;
                           filled by server if client doesn't
                           know its own address (ciaddr was 0).

           siaddr  4       server IP address;
                           returned in bootreply by server.

           giaddr  4       gateway IP address,
                           used in optional cross-gateway booting.

           chaddr  16      client hardware address,
                           filled in by client.

           sname   64      optional server host name,
                           null terminated string.

           file    128     boot file name, null terminated string;
                           'generic' name or null in bootrequest,
                           fully qualified directory-path
                           name in bootreply.

           vend    64      optional vendor-specific area,
                           e.g. could be hardware type/serial on request,
                           or 'capability' / remote file system handle
                           on reply.  This info may be set aside for use
                           by a third phase bootstrap or kernel.

  4. Chicken / Egg Issues

     How can the server send an IP datagram to the client, if the client
     doesnt know its own IP address (yet)?  Whenever a bootreply is being
     sent, the transmitting machine performs the following operations:

        1. If the client knows its own IP address ('ciaddr' field is
        nonzero), then the IP can be sent 'as normal', since the client
        will respond to ARPs [5].

        2. If the client does not yet know its IP address (ciaddr zero),
        then the client cannot respond to ARPs sent by the transmitter of
        the bootreply.  There are two options:

           a. If the transmitter has the necessary kernel or driver hooks


  Croft & Gilmore                                                 [Page 4]


  RFC 951                                                   September 1985
  Bootstrap Protocol


           to 'manually' construct an ARP address cache entry, then it can
           fill in an entry using the 'chaddr' and 'yiaddr' fields.  Of
           course, this entry should have a timeout on it, just like any
           other entry made by the normal ARP code itself.  The
           transmitter of the bootreply can then simply send the bootreply
           to the client's IP address.  UNIX (4.2 BSD) has this
           capability.

           b. If the transmitter lacks these kernel hooks, it can simply
           send the bootreply to the IP broadcast address on the
           appropriate interface.  This is only one additional broadcast
           over the previous case.

  5. Client Use of ARP

     The client PROM must contain a simple implementation of ARP, e.g. the
     address cache could be just one entry in size.  This will allow a
     second-phase-only boot (TFTP) to be performed when the client knows
     the IP addresses and bootfile name.

     Any time the client is expecting to receive a TFTP or BOOTP reply, it
     should be prepared to answer an ARP request for its own IP to
     hardware address mapping (if known).

     Since the bootreply will contain (in the hardware encapsulation) the
     hardware source address of the server/gateway, the client MAY be able
     to avoid sending an ARP request for the server/gateway IP address to
     be used in the following TFTP phase.  However this should be treated
     only as a special case, since it is desirable to still allow a
     second-phase-only boot as described above.

  6. Comparison to RARP

     An earlier protocol, Reverse Address Resolution Protocol (RARP) [1]
     was proposed to allow a client to determine its IP address, given
     that it knew its hardware address.  However RARP had the disadvantage
     that it was a hardware link level protocol (not IP/UDP based).  This
     means that RARP could only be implemented on hosts containing special
     kernel or driver modifications to access these 'raw' packets.  Since
     there are many network kernels existent now, with each source
     maintained by different organizations, a boot protocol that does not
     require kernel modifications is a decided advantage.

     BOOTP provides this hardware to IP address lookup function, in
     addition to the other useful features described in the sections
     above.



  Croft & Gilmore                                                 [Page 5]


  RFC 951                                                   September 1985
  Bootstrap Protocol


  7. Packet Processing

     7.1. Client Transmission

        Before setting up the packet for the first time, it is a good idea
        to clear the entire packet buffer to all zeros; this will place
        all fields in their default state.  The client then creates a
        packet with the following fields.

        The IP destination address is set to 255.255.255.255.  (the
        broadcast address) or to the server's IP address (if known).  The
        IP source address and 'ciaddr' are set to the client's IP address
        if known, else 0.  The UDP header is set with the proper length;
        source port = 'BOOTP client' port destination port = 'BOOTP
        server' port.

        'op' is set to '1', BOOTREQUEST.  'htype' is set to the hardware
        address type as assigned in the ARP section of the "Assigned
        Numbers" RFC. 'hlen' is set to the length of the hardware address,
        e.g. '6' for 10mb ethernet.

        'xid' is set to a 'random' transaction id.  'secs' is set to the
        number of seconds that have elapsed since the client has started
        booting.  This will let the servers know how long a client has
        been trying.  As the number gets larger, certain servers may feel
        more 'sympathetic' towards a client they don't normally service.
        If a client lacks a suitable clock, it could construct a rough
        estimate using a loop timer.  Or it could choose to simply send
        this field as always a fixed value, say 100 seconds.

        If the client knows its IP address, 'ciaddr' (and the IP source
        address) are set to this value.  'chaddr' is filled in with the
        client's hardware address.

        If the client wishes to restrict booting to a particular server
        name, it may place a null-terminated string in 'sname'.  The name
        used should be any of the allowable names or nicknames of the
        desired host.

        The client has several options for filling the 'file' name field.
        If left null, the meaning is 'I want to boot the default file for
        my machine'.  A null file name can also mean 'I am only interested
        in finding out client/server/gateway IP addresses, I dont care
        about file names'.

        The field can also be a 'generic' name such as 'unix' or

  Croft & Gilmore                                                 [Page 6]


  RFC 951                                                   September 1985
  Bootstrap Protocol


        'gateway'; this means 'boot the named program configured for my
        machine'.  Finally the field can be a fully directory qualified
        path name.

        The 'vend' field can be filled in by the client with
        vendor-specific strings or structures.  For example the machine
        hardware type or serial number may be placed here.  However the
        operation of the BOOTP server should not DEPEND on this
        information existing.

        If the 'vend' field is used, it is recommended that a 4 byte
        'magic number' be the first item within 'vend'.  This lets a
        server determine what kind of information it is seeing in this
        field.  Numbers can be assigned by the usual 'magic number'
        process --you pick one and it's magic.  A different magic number
        could be used for bootreply's than bootrequest's to allow the
        client to take special action with the reply information.

        [UDP checksum.]

     7.2. Client Retransmission Strategy

        If no reply is received for a certain length of time, the client
        should retransmit the request.  The time interval must be chosen
        carefully so as not to flood the network.  Consider the case of a
        cable containing 100 machines that are just coming up after a
        power failure.  Simply retransmitting the request every four
        seconds will inundate the net.

        As a possible strategy, you might consider backing off
        exponentially, similar to the way ethernet backs off on a
        collision.  So for example if the first packet is at time 0:00,
        the second would be at :04, then :08, then :16, then :32, then
        :64.  You should also randomize each time; this would be done
        similar to the ethernet specification by starting with a mask and
        'and'ing that with with a random number to get the first backoff.
        On each succeeding backoff, the mask is increased in length by one
        bit.  This doubles the average delay on each backoff.

        After the 'average' backoff reaches about 60 seconds, it should be
        increased no further, but still randomized.

        Before each retransmission, the client should update the 'secs'
        field. [UDP checksum.]



  Croft & Gilmore                                                 [Page 7]


  RFC 951                                                   September 1985
  Bootstrap Protocol


     7.3. Server Receives BOOTREQUEST

        [UDP checksum.]  If the UDP destination port does not match the
        'BOOTP server' port, discard the packet.

        If the server name field (sname) is null (no particular server
        specified), or sname is specified and matches our name or
        nickname, then continue with packet processing.

        If the sname field is specified, but does not match 'us', then
        there are several options:

           1. You may choose to simply discard this packet.

           2. If a name lookup on sname shows it to be on this same cable,
           discard the packet.

           3. If sname is on a different net, you may choose to forward
           the packet to that address.  If so, check the 'giaddr' (gateway
           address) field.  If 'giaddr' is zero, fill it in with my
           address or the address of a gateway that can be used to get to
           that net.  Then forward the packet.

        If the client IP address (ciaddr) is zero, then the client does
        not know its own IP address.  Attempt to lookup the client
        hardware address (chaddr, hlen, htype) in our database.  If no
        match is found, discard the packet.  Otherwise we now have an IP
        address for this client; fill it into the 'yiaddr' (your IP
        address) field.

        We now check the boot file name field (file).  The field will be
        null if the client is not interested in filenames, or wants the
        default bootfile.  If the field is non-null, it is used as a
        lookup key in a database, along with the client's IP address.  If
        there is a default file or generic file (possibly indexed by the
        client address) or a fully-specified path name that matches, then
        replace the 'file' field with the fully-specified path name of the
        selected boot file.  If the field is non-null and no match was
        found, then the client is asking for a file we dont have; discard
        the packet, perhaps some other BOOTP server will have it.

        The 'vend' vendor-specific data field should now be checked and if
        a recognized type of data is provided, client-specific actions
        should be taken, and a response placed in the 'vend' data field of
        the reply packet.  For example, a workstation client could provide



  Croft & Gilmore                                                 [Page 8]


  RFC 951                                                   September 1985
  Bootstrap Protocol


        an authentication key and receive from the server a capability for
        remote file access, or a set of configuration options, which can
        be passed to the operating system that will shortly be booted in.

        Place my (server) IP address in the 'siaddr' field.  Set the 'op'
        field to BOOTREPLY.  The UDP destination port is set to 'BOOTP
        client'.  If the client address 'ciaddr' is nonzero, send the
        packet there; else if the gateway address 'giaddr' is nonzero, set
        the UDP destination port to 'BOOTP server' and send the packet to
        'giaddr'; else the client is on one of our cables but it doesnt
        know its own IP address yet --use a method described in the 'Egg'
        section above to send it to the client. If 'Egg' is used and we
        have multiple interfaces on this host, use the 'yiaddr' (your IP
        address) field to figure out which net (cable/interface) to send
        the packet to.  [UDP checksum.]

     7.4. Server/Gateway Receives BOOTREPLY

        [UDP checksum.]  If 'yiaddr' (your [the client's] IP address)
        refers to one of our cables, use one of the 'Egg' methods above to
        forward it to the client.  Be sure to send it to the 'BOOTP
        client' UDP destination port.

     7.5. Client Reception

        Don't forget to process ARP requests for my own IP address (if I
        know it).  [UDP checksum.]  The client should discard incoming
        packets that: are not IP/UDPs addressed to the boot port; are not
        BOOTREPLYs; do not match my IP address (if I know it) or my
        hardware address; do not match my transaction id.  Otherwise we
        have received a successful reply. 'yiaddr' will contain my IP
        address, if I didnt know it before.  'file' is the name of the
        file name to TFTP 'read request'.  The server address is in
        'siaddr'.  If 'giaddr' (gateway address) is nonzero, then the
        packets should be forwarded there first, in order to get to the
        server.

  8. Booting Through Gateways

     This part of the protocol is optional and requires some additional
     code in cooperating gateways and servers, but it allows cross-gateway
     booting.  This is mainly useful when gateways are diskless machines.
     Gateways containing disks (e.g. a UNIX machine acting as a gateway),
     might as well run their own BOOTP/TFTP servers.

     Gateways listening to broadcast BOOTREQUESTs may decide to forward or
     rebroadcast these requests 'when appropriate'.  For example, the


  Croft & Gilmore                                                 [Page 9]


  RFC 951                                                   September 1985
  Bootstrap Protocol


     gateway could have, as part of his configuration tables, a list of
     other networks or hosts to receive a copy of any broadcast
     BOOTREQUESTs.  Even though a 'hops' field exists, it is a poor idea
     to simply globally rebroadcast the requests, since broadcast loops
     will almost certainly occur.

     The forwarding could begin immediately, or wait until the 'secs'
     (seconds client has been trying) field passes a certain threshold.

     If a gateway does decide to forward the request, it should look at
     the 'giaddr' (gateway IP address) field.  If zero, it should plug its
     own IP address (on the receiving cable) into this field.  It may also
     use the 'hops' field to optionally control how far the packet is
     reforwarded. Hops should be incremented on each forwarding.  For
     example, if hops passes '3', the packet should probably be discarded.
     [UDP checksum.]

     Here we have recommended placing this special forwarding function in
     the gateways.  But that does not have to be the case.  As long as
     some 'BOOTP forwarding agent' exists on the net with the booting
     client, the agent can do the forwarding when appropriate.  Thus this
     service may or may not be co-located with the gateway.

     In the case of a forwarding agent not located in the gateway, the
     agent could save himself some work by plugging the broadcast address
     of the interface receiving the bootrequest into the 'giaddr' field.
     Thus the reply would get forwarded using normal gateways, not
     involving the forwarding agent.  Of course the disadvantage here is
     that you lose the ability to use the 'Egg' non-broadcast method of
     sending the reply, causing extra overhead for every host on the
     client cable.

  9. Sample BOOTP Server Database

     As a suggestion, we show a sample text file database that the BOOTP
     server program might use.  The database has two sections, delimited
     by a line containing an percent in column 1.  The first section
     contains a 'default directory' and mappings from generic names to
     directory/pathnames.  The first generic name in this section is the
     'default file' you get when the bootrequest contains a null 'file'
     string.

     The second section maps hardware addresstype/address into an
     ipaddress. Optionally you can also overide the default generic name
     by supplying a ipaddress specific genericname.  A 'suffix' item is
     also an option; if supplied, any generic names specified by the
     client will be accessed by first appending 'suffix' to the 'pathname'


  Croft & Gilmore                                                [Page 10]


  RFC 951                                                   September 1985
  Bootstrap Protocol


     appropriate to that generic name.  If that file is not found, then
     the plain 'pathname' will be tried.  This 'suffix' option allows a
     whole set of custom generics to be setup without a lot of effort.
     Below is shown the general format; fields are delimited by one or
     more spaces or tabs; trailing empty fields may be omitted; blank
     lines and lines beginning with '#' are ignored.

        # comment line

        homedirectory
        genericname1    pathname1
        genericname2    pathname2
        ...

        % end of generic names, start of address mappings

        hostname1 hardwaretype hardwareaddr1 ipaddr1 genericname suffix
        hostname2 hardwaretype hardwareaddr2 ipaddr2 genericname suffix
        ...

     Here is a specific example.  Note the 'hardwaretype' number is the
     same as that shown in the ARP section of the 'Assigned Numbers' RFC.
     The 'hardwaretype' and 'ipaddr' numbers are in decimal;
     'hardwareaddr' is in hex.

        # last updated by smith

        /usr/boot
        vmunix          vmunix
        tip             ethertip
        watch           /usr/diag/etherwatch
        gate            gate.

        % end of generic names, start of address mappings

        hamilton        1 02.60.8c.06.34.98     36.19.0.5
        burr            1 02.60.8c.34.11.78     36.44.0.12
        101-gateway     1 02.60.8c.23.ab.35     36.44.0.32      gate 101
        mjh-gateway     1 02.60.8c.12.32.bc     36.42.0.64      gate mjh
        welch-tipa      1 02.60.8c.22.65.32     36.47.0.14      tip
        welch-tipb      1 02.60.8c.12.15.c8     36.46.0.12      tip

     In the example above, if 'mjh-gateway' does a default boot, it will
     get the file '/usr/boot/gate.mjh'.



  Croft & Gilmore                                                [Page 11]


  RFC 951                                                   September 1985
  Bootstrap Protocol


  10. Acknowledgements

     Ross Finlayson (et. al.) produced two earlier RFC's discussing TFTP
     bootstraping [2] using RARP [1].

     We would also like to acknowledge the previous work and comments of
     Noel Chiappa, Bob Lyon, Jeff Mogul, Mark Lewis, and David Plummer.

  REFERENCES

     1.  Ross Finlayson, Timothy Mann, Jeffrey Mogul, Marvin Theimer.  A
         Reverse Address Resolution Protocol.  RFC 903, NIC, June, 1984.

     2.  Ross Finlayson.  Bootstrap Loading using TFTP.  RFC 906, NIC,
         June, 1984.

     3.  Mark Lottor.  Simple File Transfer Protocol.  RFC 913, NIC,
         September, 1984.

     4.  Jeffrey Mogul.  Broadcasting Internet Packets.  RFC 919, NIC,
         October, 1984.

     5.  David Plummer.  An Ethernet Address Resolution Protocol.  RFC
         826, NIC, September, 1982.

     6.  Jon Postel.  File Transfer Protocol.  RFC 765, NIC, June, 1980.

     7.  Jon Postel.  User Datagram Protocol.  RFC 768, NIC, August, 1980.

     8.  Jon Postel.  Internet Protocol.  RFC 791, NIC, September, 1981.

     9.  K. R. Sollins, Noel Chiappa.  The TFTP Protocol.  RFC 783, NIC,
         June, 1981.


  Croft & Gilmore                                                [Page 12]



  16.  Appendix D - RFC 1533

  This section is for academic interest only - for universities or
  research institutes.



  Network Working Group                                       S. Alexander
  Request for Comments: 1533                      Lachman Technology, Inc.
  Obsoletes: 1497, 1395, 1084, 1048                               R. Droms
  Category: Standards Track                            Bucknell University
                                                              October 1993


                 DHCP Options and BOOTP Vendor Extensions

  Status of this Memo

     This RFC specifies an Internet standards track protocol for the
     Internet community, and requests discussion and suggestions for
     improvements.  Please refer to the current edition of the "Internet
     Official Protocol Standards" for the standardization state and status
     of this protocol.  Distribution of this memo is unlimited.

  Abstract

     The Dynamic Host Configuration Protocol (DHCP) [1] provides a
     framework for passing configuration information to hosts on a TCP/IP
     network.  Configuration parameters and other control information are
     carried in tagged data items that are stored in the "options" field
     of the DHCP message.  The data items themselves are also called
     "options."

     This document specifies the current set of DHCP options.  This
     document will be periodically updated as new options are defined.
      Each superseding document will include the entire current list of
     valid options.

     All of the vendor information extensions defined in RFC 1497 [2] may
     be used as DHCP options.  The definitions given in RFC 1497 are
     included in this document, which supersedes RFC 1497.  All of the
     DHCP options defined in this document, except for those specific to
     DHCP as defined in section 9, may be used as BOOTP vendor information
     extensions.

  Table of Contents

      1.  Introduction ..............................................  2
      2.  BOOTP Extension/DHCP Option Field Format ..................  2
      3.  RFC 1497 Vendor Extensions ................................  3
      4.  IP Layer Parameters per Host .............................. 10
      5.  IP Layer Parameters per Interface ........................  13
      6.  Link Layer Parameters per Interface ....................... 16
      7.  TCP Parameters ............................................ 17
      8.  Application and Service Parameters ........................ 18



  Alexander & Droms                                               [Page 1]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


      9.  DHCP Extensions ........................................... 23
     10.  Extensions ................................................ 27
     11.  Acknowledgements .......................................... 28
     12.  References ................................................ 28
     13.  Security Considerations ................................... 19
     14.  Authors' Addresses ........................................ 30

  1. Introduction

     This document specifies options for use with both the Dynamic Host
     Configuration Protocol and the Bootstrap Protocol.
     The full description of DHCP packet formats may be found in the DHCP
     specification document [1], and the full description of BOOTP packet
     formats may be found in the BOOTP specification document [3].  This
     document defines the format of information in the last field of DHCP
     packets ('options') and of BOOTP packets ('vend').  The remainder of
     this section defines a generalized use of this area for giving
     information useful to a wide class of machines, operating systems and
     configurations. Sites with a single DHCP or BOOTP server that is
     shared among heterogeneous clients may choose to define other, site-
     specific formats for the use of the 'options' field.

     Section 2 of this memo describes the formats of DHCP options and
     BOOTP vendor extensions.  Section 3 describes options defined in
     previous documents for use with BOOTP (all may also be used with
     DHCP).  Sections 4-8 define new options intended for use with both
     DHCP and BOOTP. Section 9 defines options used only in DHCP.

     References further describing most of the options defined in sections
     2-6 can be found in section 12.  The use of the options defined in
     section 9 is described in the DHCP specification [1].

     Information on registering new options is contained in section 10.

  2. BOOTP Extension/DHCP Option Field Format

     DHCP options have the same format as the BOOTP "vendor extensions"
     defined in RFC 1497 [2].  Options may be fixed length or variable
     length.  All options begin with a tag octet, which uniquely
     identifies the option.  Fixed-length options without data consist of
     only a tag octet.  Only options 0 and 255 are fixed length.  All
     other options are variable-length with a length octet following the
     tag octet.  The value of the length octet does not include the two
     octets specifying the tag and length.  The length octet is followed
     by "length" octets of data.  In the case of some variable-length
     options the length field is a constant but must still be specified.



  Alexander & Droms                                               [Page 2]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


     Any options defined subsequent to this document should contain a
     length octet even if the length is fixed or zero.

     All multi-octet quantities are in network byte-order.

     When used with BOOTP, the first four octets of the vendor information
     field have been assigned to the "magic cookie" (as suggested in RFC
     951).  This field identifies the mode in which the succeeding data is
     to be interpreted.  The value of the magic cookie is the 4 octet
     dotted decimal 99.130.83.99 (or hexadecimal number 63.82.53.63) in
     network byte order.

     All of the "vendor extensions" defined in RFC 1497 are also DHCP
     options.

     Option codes 128 to 254 (decimal) are reserved for site-specific
     options.

     Except for the options in section 9, all options may be used with
     either DHCP or BOOTP.

     Many of these options have their default values specified in other
     documents.  In particular, RFC 1122 [4] specifies default values for
     most IP and TCP configuration parameters.

  3. RFC 1497 Vendor Extensions

     This section lists the vendor extensions as defined in RFC 1497.
     They are defined here for completeness.

  3.1. Pad Option

     The pad option can be used to cause subsequent fields to align on
     word boundaries.

     The code for the pad option is 0, and its length is 1 octet.

      Code
     +-----+
     |  0  |
     +-----+



  Alexander & Droms                                               [Page 3]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  3.2. End Option

     The end option marks the end of valid information in the vendor
     field.  Subsequent octets should be filled with pad options.

     The code for the end option is 255, and its length is 1 octet.

      Code
     +-----+
     | 255 |
     +-----+

  3.3. Subnet Mask

     The subnet mask option specifies the client's subnet mask as per RFC
     950 [5].

     If both the subnet mask and the router option are specified in a DHCP
     reply, the subnet mask option MUST be first.

     The code for the subnet mask option is 1, and its length is 4 octets.

      Code   Len        Subnet Mask
     +-----+-----+-----+-----+-----+-----+
     |  1  |  4  |  m1 |  m2 |  m3 |  m4 |
     +-----+-----+-----+-----+-----+-----+

  3.4. Time Offset

     The time offset field specifies the offset of the client's subnet in
     seconds from Coordinated Universal Time (UTC).  The offset is
     expressed as a signed 32-bit integer.

     The code for the time offset option is 2, and its length is 4 octets.
      Code   Len        Time Offset
     +-----+-----+-----+-----+-----+-----+
     |  2  |  4  |  n1 |  n2 |  n3 |  n4 |
     +-----+-----+-----+-----+-----+-----+



  Alexander & Droms                                               [Page 4]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  3.5. Router Option

     The router option specifies a list of IP addresses for routers on the
     client's subnet.  Routers SHOULD be listed in order of preference.

     The code for the router option is 3.  The minimum length for the
     router option is 4 octets, and the length MUST always be a multiple
     of 4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  3  |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--

  3.6. Time Server Option

     The time server option specifies a list of RFC 868 [6] time servers
     available to the client.  Servers SHOULD be listed in order of
     preference.

     The code for the time server option is 4.  The minimum length for
     this option is 4 octets, and the length MUST always be a multiple of
     4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  4  |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--

  3.7. Name Server Option

     The name server option specifies a list of IEN 116 [7] name servers
     available to the client.  Servers SHOULD be listed in order of
     preference.

     The code for the name server option is 5.  The minimum length for
     this option is 4 octets, and the length MUST always be a multiple of
     4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  5  |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--



  Alexander & Droms                                               [Page 5]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  3.8. Domain Name Server Option

     The domain name server option specifies a list of Domain Name System
     (STD 13, RFC 1035 [8]) name servers available to the client.  Servers
     SHOULD be listed in order of preference.

     The code for the domain name server option is 6.  The minimum length
     for this option is 4 octets, and the length MUST always be a multiple
     of 4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  6  |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--

  3.9. Log Server Option

     The log server option specifies a list of MIT-LCS UDP log servers
     available to the client.  Servers SHOULD be listed in order of
     preference.

     The code for the log server option is 7.  The minimum length for this
     option is 4 octets, and the length MUST always be a multiple of 4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  7  |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--

  3.10. Cookie Server Option

     The cookie server option specifies a list of RFC 865 [9] cookie
     servers available to the client.  Servers SHOULD be listed in order
     of preference.

     The code for the log server option is 8.  The minimum length for this
     option is 4 octets, and the length MUST always be a multiple of 4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  8  |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--



  Alexander & Droms                                               [Page 6]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  3.11. LPR Server Option

     The LPR server option specifies a list of RFC 1179 [10] line printer
     servers available to the client.  Servers SHOULD be listed in order
     of preference.

     The code for the LPR server option is 9.  The minimum length for this
     option is 4 octets, and the length MUST always be a multiple of 4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  9  |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--

  3.12. Impress Server Option

     The Impress server option specifies a list of Imagen Impress servers
     available to the client.  Servers SHOULD be listed in order of
     preference.

     The code for the Impress server option is 10.  The minimum length for
     this option is 4 octets, and the length MUST always be a multiple of
     4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  10 |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--

  3.13. Resource Location Server Option

     This option specifies a list of RFC 887 [11] Resource Location
     servers available to the client.  Servers SHOULD be listed in order
     of preference.

     The code for this option is 11.  The minimum length for this option
     is 4 octets, and the length MUST always be a multiple of 4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  11 |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--



  Alexander & Droms                                               [Page 7]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  3.14. Host Name Option

     This option specifies the name of the client.  The name may or may
     not be qualified with the local domain name (see section 3.17 for the
     preferred way to retrieve the domain name).  See RFC 1035 for
     character set restrictions.

     The code for this option is 12, and its minimum length is 1.

      Code   Len                 Host Name
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  12 |  n  |  h1 |  h2 |  h3 |  h4 |  h5 |  h6 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--

  3.15. Boot File Size Option

     This option specifies the length in 512-octet blocks of the default
     boot image for the client.  The file length is specified as an
     unsigned 16-bit integer.

     The code for this option is 13, and its length is 2.

      Code   Len   File Size
     +-----+-----+-----+-----+
     |  13 |  2  |  l1 |  l2 |
     +-----+-----+-----+-----+

  3.16. Merit Dump File

     This option specifies the path-name of a file to which the client's
     core image should be dumped in the event the client crashes.  The
     path is formatted as a character string consisting of characters from
     the NVT ASCII character set.

     The code for this option is 14.  Its minimum length is 1.

      Code   Len      Dump File Pathname
     +-----+-----+-----+-----+-----+-----+---
     |  14 |  n  |  n1 |  n2 |  n3 |  n4 | ...
     +-----+-----+-----+-----+-----+-----+---



  Alexander & Droms                                               [Page 8]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  3.17. Domain Name

     This option specifies the domain name that client should use when
     resolving hostnames via the Domain Name System.

     The code for this option is 15.  Its minimum length is 1.

      Code   Len        Domain Name
     +-----+-----+-----+-----+-----+-----+--
     |  15 |  n  |  d1 |  d2 |  d3 |  d4 |  ...
     +-----+-----+-----+-----+-----+-----+--

  3.18. Swap Server

     This specifies the IP address of the client's swap server.

     The code for this option is 16 and its length is 4.

      Code   Len    Swap Server Address
     +-----+-----+-----+-----+-----+-----+
     |  16 |  n  |  a1 |  a2 |  a3 |  a4 |
     +-----+-----+-----+-----+-----+-----+

  3.19. Root Path

     This option specifies the path-name that contains the client's root
     disk.  The path is formatted as a character string consisting of
     characters from the NVT ASCII character set.

     The code for this option is 17.  Its minimum length is 1.

      Code   Len      Root Disk Pathname
     +-----+-----+-----+-----+-----+-----+---
     |  17 |  n  |  n1 |  n2 |  n3 |  n4 | ...
     +-----+-----+-----+-----+-----+-----+---



  Alexander & Droms                                               [Page 9]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  3.20. Extensions Path

     A string to specify a file, retrievable via TFTP, which contains
     information which can be interpreted in the same way as the 64-octet
     vendor-extension field within the BOOTP response, with the following
     exceptions:

            - the length of the file is unconstrained;
            - all references to Tag 18 (i.e., instances of the
              BOOTP Extensions Path field) within the file are
              ignored.

     The code for this option is 18.  Its minimum length is 1.

      Code   Len      Extensions Pathname
     +-----+-----+-----+-----+-----+-----+---
     |  18 |  n  |  n1 |  n2 |  n3 |  n4 | ...
     +-----+-----+-----+-----+-----+-----+---

  4. IP Layer Parameters per Host

     This section details the options that affect the operation of the IP
     layer on a per-host basis.

  4.1. IP Forwarding Enable/Disable Option

     This option specifies whether the client should configure its IP
     layer for packet forwarding.  A value of 0 means disable IP
     forwarding, and a value of 1 means enable IP forwarding.

     The code for this option is 19, and its length is 1.

      Code   Len  Value
     +-----+-----+-----+
     |  19 |  1  | 0/1 |
     +-----+-----+-----+



  Alexander & Droms                                              [Page 10]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  4.2. Non-Local Source Routing Enable/Disable Option

     This option specifies whether the client should configure its IP
     layer to allow forwarding of datagrams with non-local source routes
     (see Section 3.3.5 of [4] for a discussion of this topic).  A value
     of 0 means disallow forwarding of such datagrams, and a value of 1
     means allow forwarding.

     The code for this option is 20, and its length is 1.

      Code   Len  Value
     +-----+-----+-----+
     |  20 |  1  | 0/1 |
     +-----+-----+-----+

  4.3. Policy Filter Option

     This option specifies policy filters for non-local source routing.
     The filters consist of a list of IP addresses and masks which specify
     destination/mask pairs with which to filter incoming source routes.

     Any source routed datagram whose next-hop address does not match one
     of the filters should be discarded by the client.

     See [4] for further information.

     The code for this option is 21.  The minimum length of this option is
     8, and the length MUST be a multiple of 8.

      Code   Len         Address 1                  Mask 1
     +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
     |  21 |  n  |  a1 |  a2 |  a3 |  a4 |  m1 |  m2 |  m3 |  m4 |
     +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
             Address 2                  Mask 2
     +-----+-----+-----+-----+-----+-----+-----+-----+---
     |  a1 |  a2 |  a3 |  a4 |  m1 |  m2 |  m3 |  m4 | ...
     +-----+-----+-----+-----+-----+-----+-----+-----+---



  Alexander & Droms                                              [Page 11]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  4.4. Maximum Datagram Reassembly Size

     This option specifies the maximum size datagram that the client
     should be prepared to reassemble.  The size is specified as a 16-bit
     unsigned integer.  The minimum value legal value is 576.

     The code for this option is 22, and its length is 2.
      Code   Len      Size
     +-----+-----+-----+-----+
     |  22 |  2  |  s1 |  s2 |
     +-----+-----+-----+-----+

  4.5. Default IP Time-to-live

     This option specifies the default time-to-live that the client should
     use on outgoing datagrams.  The TTL is specified as an octet with a
     value between 1 and 255.

     The code for this option is 23, and its length is 1.

      Code   Len   TTL
     +-----+-----+-----+
     |  23 |  1  | ttl |
     +-----+-----+-----+

  4.6. Path MTU Aging Timeout Option

     This option specifies the timeout (in seconds) to use when aging Path
     MTU values discovered by the mechanism defined in RFC 1191 [12].  The
     timeout is specified as a 32-bit unsigned integer.

     The code for this option is 24, and its length is 4.

      Code   Len           Timeout
     +-----+-----+-----+-----+-----+-----+
     |  24 |  4  |  t1 |  t2 |  t3 |  t4 |
     +-----+-----+-----+-----+-----+-----+



  Alexander & Droms                                              [Page 12]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  4.7. Path MTU Plateau Table Option

     This option specifies a table of MTU sizes to use when performing
     Path MTU Discovery as defined in RFC 1191.  The table is formatted as
     a list of 16-bit unsigned integers, ordered from smallest to largest.
     The minimum MTU value cannot be smaller than 68.

     The code for this option is 25.  Its minimum length is 2, and the
     length MUST be a multiple of 2.

      Code   Len     Size 1      Size 2
     +-----+-----+-----+-----+-----+-----+---
     |  25 |  n  |  s1 |  s2 |  s1 |  s2 | ...
     +-----+-----+-----+-----+-----+-----+---

  5. IP Layer Parameters per Interface

     This section details the options that affect the operation of the IP
     layer on a per-interface basis.  It is expected that a client can
     issue multiple requests, one per interface, in order to configure
     interfaces with their specific parameters.

  5.1. Interface MTU Option

     This option specifies the MTU to use on this interface.  The MTU is
     specified as a 16-bit unsigned integer.  The minimum legal value for
     the MTU is 68.

     The code for this option is 26, and its length is 2.

      Code   Len      MTU
     +-----+-----+-----+-----+
     |  26 |  2  |  m1 |  m2 |
     +-----+-----+-----+-----+



  Alexander & Droms                                              [Page 13]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  5.2. All Subnets are Local Option

     This option specifies whether or not the client may assume that all
     subnets of the IP network to which the client is connected use the
     same MTU as the subnet of that network to which the client is
     directly connected.  A value of 1 indicates that all subnets share
     the same MTU.  A value of 0 means that the client should assume that
     some subnets of the directly connected network may have smaller MTUs.

     The code for this option is 27, and its length is 1.

      Code   Len  Value
     +-----+-----+-----+
     |  27 |  1  | 0/1 |
     +-----+-----+-----+

  5.3. Broadcast Address Option

     This option specifies the broadcast address in use on the client's
     subnet.  Legal values for broadcast addresses are specified in
     section 3.2.1.3 of [4].

     The code for this option is 28, and its length is 4.

      Code   Len     Broadcast Address
     +-----+-----+-----+-----+-----+-----+
     |  28 |  4  |  b1 |  b2 |  b3 |  b4 |
     +-----+-----+-----+-----+-----+-----+

  5.4. Perform Mask Discovery Option
     This option specifies whether or not the client should perform subnet
     mask discovery using ICMP.  A value of 0 indicates that the client
     should not perform mask discovery.  A value of 1 means that the
     client should perform mask discovery.

     The code for this option is 29, and its length is 1.

      Code   Len  Value
     +-----+-----+-----+
     |  29 |  1  | 0/1 |
     +-----+-----+-----+



  Alexander & Droms                                              [Page 14]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  5.5. Mask Supplier Option

     This option specifies whether or not the client should respond to
     subnet mask requests using ICMP.  A value of 0 indicates that the
     client should not respond.  A value of 1 means that the client should
     respond.

     The code for this option is 30, and its length is 1.

      Code   Len  Value
     +-----+-----+-----+
     |  30 |  1  | 0/1 |
     +-----+-----+-----+

  5.6. Perform Router Discovery Option

     This option specifies whether or not the client should solicit
     routers using the Router Discovery mechanism defined in RFC 1256
     [13].  A value of 0 indicates that the client should not perform
     router discovery.  A value of 1 means that the client should perform
     router discovery.

     The code for this option is 31, and its length is 1.

      Code   Len  Value
     +-----+-----+-----+
     |  31 |  1  | 0/1 |
     +-----+-----+-----+

  5.7. Router Solicitation Address Option

     This option specifies the address to which the client should transmit
     router solicitation requests.

     The code for this option is 32, and its length is 4.

      Code   Len            Address
     +-----+-----+-----+-----+-----+-----+
     |  32 |  4  |  a1 |  a2 |  a3 |  a4 |
     +-----+-----+-----+-----+-----+-----+


  Alexander & Droms                                              [Page 15]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  5.8. Static Route Option

     This option specifies a list of static routes that the client should
     install in its routing cache.  If multiple routes to the same
     destination are specified, they are listed in descending order of
     priority.

     The routes consist of a list of IP address pairs.  The first address
     is the destination address, and the second address is the router for
     the destination.

     The default route (0.0.0.0) is an illegal destination for a static
     route.  See section 3.5 for information about the router option.

     The code for this option is 33.  The minimum length of this option is
     8, and the length MUST be a multiple of 8.

      Code   Len         Destination 1           Router 1
     +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
     |  33 |  n  |  d1 |  d2 |  d3 |  d4 |  r1 |  r2 |  r3 |  r4 |
     +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
             Destination 2           Router 2
     +-----+-----+-----+-----+-----+-----+-----+-----+---
     |  d1 |  d2 |  d3 |  d4 |  r1 |  r2 |  r3 |  r4 | ...
     +-----+-----+-----+-----+-----+-----+-----+-----+---

  6. Link Layer Parameters per Interface

     This section lists the options that affect the operation of the data
     link layer on a per-interface basis.

  6.1. Trailer Encapsulation Option

     This option specifies whether or not the client should negotiate the
     use of trailers (RFC 893 [14]) when using the ARP protocol.  A value
     of 0 indicates that the client should not attempt to use trailers.  A
     value of 1 means that the client should attempt to use trailers.

     The code for this option is 34, and its length is 1.

      Code   Len  Value
     +-----+-----+-----+
     |  34 |  1  | 0/1 |
     +-----+-----+-----+



  Alexander & Droms                                              [Page 16]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  6.2. ARP Cache Timeout Option

     This option specifies the timeout in seconds for ARP cache entries.
     The time is specified as a 32-bit unsigned integer.

     The code for this option is 35, and its length is 4.

      Code   Len           Time
     +-----+-----+-----+-----+-----+-----+
     |  35 |  4  |  t1 |  t2 |  t3 |  t4 |
     +-----+-----+-----+-----+-----+-----+

  6.3. Ethernet Encapsulation Option

     This option specifies whether or not the client should use Ethernet
     Version 2 (RFC 894 [15]) or IEEE 802.3 (RFC 1042 [16]) encapsulation
     if the interface is an Ethernet.  A value of 0 indicates that the
     client should use RFC 894 encapsulation.  A value of 1 means that the
     client should use RFC 1042 encapsulation.

     The code for this option is 36, and its length is 1.

      Code   Len  Value
     +-----+-----+-----+
     |  36 |  1  | 0/1 |
     +-----+-----+-----+

  7. TCP Parameters

     This section lists the options that affect the operation of the TCP
     layer on a per-interface basis.

  7.1. TCP Default TTL Option

     This option specifies the default TTL that the client should use when
     sending TCP segments.  The value is represented as an 8-bit unsigned
     integer.  The minimum value is 1.

     The code for this option is 37, and its length is 1.

      Code   Len   TTL
     +-----+-----+-----+
     |  37 |  1  |  n  |
     +-----+-----+-----+



  Alexander & Droms                                              [Page 17]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  7.2. TCP Keepalive Interval Option

     This option specifies the interval (in seconds) that the client TCP
     should wait before sending a keepalive message on a TCP connection.
     The time is specified as a 32-bit unsigned integer.  A value of zero
     indicates that the client should not generate keepalive messages on
     connections unless specifically requested by an application.

     The code for this option is 38, and its length is 4.

      Code   Len           Time
     +-----+-----+-----+-----+-----+-----+
     |  38 |  4  |  t1 |  t2 |  t3 |  t4 |
     +-----+-----+-----+-----+-----+-----+

  7.3. TCP Keepalive Garbage Option

     This option specifies the whether or not the client should send TCP
     keepalive messages with a octet of garbage for compatibility with
     older implementations.  A value of 0 indicates that a garbage octet
     should not be sent. A value of 1 indicates that a garbage octet
     should be sent.

     The code for this option is 39, and its length is 1.

      Code   Len  Value
     +-----+-----+-----+
     |  39 |  1  | 0/1 |
     +-----+-----+-----+

  8. Application and Service Parameters

     This section details some miscellaneous options used to configure
     miscellaneous applications and services.

  8.1. Network Information Service Domain Option

     This option specifies the name of the client's NIS [17] domain.  The
     domain is formatted as a character string consisting of characters
     from the NVT ASCII character set.

     The code for this option is 40.  Its minimum length is 1.

      Code   Len      NIS Domain Name
     +-----+-----+-----+-----+-----+-----+---
     |  40 |  n  |  n1 |  n2 |  n3 |  n4 | ...
     +-----+-----+-----+-----+-----+-----+---



  Alexander & Droms                                              [Page 18]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  8.2. Network Information Servers Option

     This option specifies a list of IP addresses indicating NIS servers
     available to the client.  Servers SHOULD be listed in order of
     preference.

     The code for this option is 41.  Its minimum length is 4, and the
     length MUST be a multiple of 4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  41 |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--

  8.3. Network Time Protocol Servers Option

     This option specifies a list of IP addresses indicating NTP [18]
     servers available to the client.  Servers SHOULD be listed in order
     of preference.

     The code for this option is 42.  Its minimum length is 4, and the
     length MUST be a multiple of 4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+--
     |  42 |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |  ...
     +-----+-----+-----+-----+-----+-----+-----+-----+--

  8.4. Vendor Specific Information
     This option is used by clients and servers to exchange vendor-
     specific information.  The information is an opaque object of n
     octets, presumably interpreted by vendor-specific code on the clients
     and servers.  The definition of this information is vendor specific.
     The vendor is indicated in the class-identifier option.  Servers not
     equipped to interpret the vendor-specific information sent by a
     client MUST ignore it (although it may be reported).  Clients which
     do not receive desired vendor-specific information SHOULD make an
     attempt to operate without it, although they may do so (and announce
     they are doing so) in a degraded mode.

     If a vendor potentially encodes more than one item of information in
     this option, then the vendor SHOULD encode the option using
     "Encapsulated vendor-specific options" as described below:

     The Encapsulated vendor-specific options field SHOULD be encoded as a
     sequence of code/length/value fields of identical syntax to the DHCP
     options field with the following exceptions:



  Alexander & Droms                                              [Page 19]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


        1) There SHOULD NOT be a "magic cookie" field in the encapsulated
           vendor-specific extensions field.

        2) Codes other than 0 or 255 MAY be redefined by the vendor within
           the encapsulated vendor-specific extensions field, but SHOULD
           conform to the tag-length-value syntax defined in section 2.

        3) Code 255 (END), if present, signifies the end of the
           encapsulated vendor extensions, not the end of the vendor
           extensions field. If no code 255 is present, then the end of
           the enclosing vendor-specific information field is taken as the
           end of the encapsulated vendor-specific extensions field.

     The code for this option is 43 and its minimum length is 1.

     Code   Len   Vendor-specific information
     +-----+-----+-----+-----+---
     |  43 |  n  |  i1 |  i2 | ...
     +-----+-----+-----+-----+---

     When encapsulated vendor-specific extensions are used, the
     information bytes 1-n have the following format:

      Code   Len   Data item        Code   Len   Data item       Code
     +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
     |  T1 |  n  |  d1 |  d2 | ... |  T2 |  n  |  D1 |  D2 | ... | ... |
     +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+

  8.5. NetBIOS over TCP/IP Name Server Option

     The NetBIOS name server (NBNS) option specifies a list of RFC
     1001/1002 [19] [20] NBNS name servers listed in order of preference.

     The code for this option is 44.  The minimum length of the option is
     4 octets, and the length must always be a multiple of 4.

      Code   Len           Address 1              Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----
     |  44 |  n  |  a1 |  a2 |  a3 |  a4 |  b1 |  b2 |  b3 |  b4 | ...
     +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----

  Alexander & Droms                                              [Page 20]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  8.6. NetBIOS over TCP/IP Datagram Distribution Server Option

     The NetBIOS datagram distribution server (NBDD) option specifies a
     list of RFC 1001/1002 NBDD servers listed in order of preference. The
     code for this option is 45.  The minimum length of the option is 4
     octets, and the length must always be a multiple of 4.

      Code   Len           Address 1              Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----
     |  45 |  n  |  a1 |  a2 |  a3 |  a4 |  b1 |  b2 |  b3 |  b4 | ...
     +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----

  8.7. NetBIOS over TCP/IP Node Type Option

     The NetBIOS node type option allows NetBIOS over TCP/IP clients which
     are configurable to be configured as described in RFC 1001/1002.  The
     value is specified as a single octet which identifies the client type
     as follows:

        Value         Node Type
        -----         ---------
        0x1           B-node
        0x2           P-node
        0x4           M-node
        0x8           H-node

     In the above chart, the notation '0x' indicates a number in base-16
     (hexadecimal).

     The code for this option is 46.  The length of this option is always
     1.

      Code   Len  Node Type
     +-----+-----+-----------+
     |  46 |  1  | see above |
     +-----+-----+-----------+



  Alexander & Droms                                              [Page 21]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  8.8. NetBIOS over TCP/IP Scope Option

     The NetBIOS scope option specifies the NetBIOS over TCP/IP scope
     parameter for the client as specified in RFC 1001/1002. See [19],
     [20], and [8] for character-set restrictions.

     The code for this option is 47.  The minimum length of this option is
     1.

      Code   Len       NetBIOS Scope
     +-----+-----+-----+-----+-----+-----+----
     |  47 |  n  |  s1 |  s2 |  s3 |  s4 | ...
     +-----+-----+-----+-----+-----+-----+----

  8.9. X Window System Font Server Option

     This option specifies a list of X Window System [21] Font servers
     available to the client. Servers SHOULD be listed in order of
     preference.

     The code for this option is 48.  The minimum length of this option is
     4 octets, and the length MUST be a multiple of 4.

      Code   Len         Address 1               Address 2
     +-----+-----+-----+-----+-----+-----+-----+-----+---
     |  48 |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |   ...
     +-----+-----+-----+-----+-----+-----+-----+-----+---

  8.10. X Window System Display Manager Option

     This option specifies a list of IP addresses of systems that are
     running the X Window System Display Manager and are available to the
     client.

     Addresses SHOULD be listed in order of preference.

     The code for the this option is 49. The minimum length of this option
     is 4, and the length MUST be a multiple of 4.

      Code   Len         Address 1               Address 2

     +-----+-----+-----+-----+-----+-----+-----+-----+---
     |  49 |  n  |  a1 |  a2 |  a3 |  a4 |  a1 |  a2 |   ...
     +-----+-----+-----+-----+-----+-----+-----+-----+---



  Alexander & Droms                                              [Page 22]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  9. DHCP Extensions

     This section details the options that are specific to DHCP.

  9.1. Requested IP Address

     This option is used in a client request (DHCPDISCOVER) to allow the
     client to request that a particular IP address be assigned.

     The code for this option is 50, and its length is 4.

      Code   Len          Address
     +-----+-----+-----+-----+-----+-----+
     |  50 |  4  |  a1 |  a2 |  a3 |  a4 |
     +-----+-----+-----+-----+-----+-----+

  9.2. IP Address Lease Time

     This option is used in a client request (DHCPDISCOVER or DHCPREQUEST)
     to allow the client to request a lease time for the IP address.  In a
     server reply (DHCPOFFER), a DHCP server uses this option to specify
     the lease time it is willing to offer.

     The time is in units of seconds, and is specified as a 32-bit
     unsigned integer.

     The code for this option is 51, and its length is 4.

      Code   Len         Lease Time
     +-----+-----+-----+-----+-----+-----+
     |  51 |  4  |  t1 |  t2 |  t3 |  t4 |
     +-----+-----+-----+-----+-----+-----+

  9.3. Option Overload

     This option is used to indicate that the DHCP "sname" or "file"
     fields are being overloaded by using them to carry DHCP options. A
     DHCP server inserts this option if the returned parameters will
     exceed the usual space allotted for options.

     If this option is present, the client interprets the specified
     additional fields after it concludes interpretation of the standard
     option fields.

     The code for this option is 52, and its length is 1.  Legal values
     for this option are:



  Alexander & Droms                                              [Page 23]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


             Value   Meaning
             -----   --------
               1     the "file" field is used to hold options
               2     the "sname" field is used to hold options
               3     both fields are used to hold options

      Code   Len  Value
     +-----+-----+-----+
     |  52 |  1  |1/2/3|
     +-----+-----+-----+

  9.4. DHCP Message Type

     This option is used to convey the type of the DHCP message.  The code
     for this option is 53, and its length is 1.  Legal values for this
     option are:

             Value   Message Type
             -----   ------------
               1     DHCPDISCOVER
               2     DHCPOFFER
               3     DHCPREQUEST
               4     DHCPDECLINE
               5     DHCPACK
               6     DHCPNAK
               7     DHCPRELEASE

      Code   Len  Type
     +-----+-----+-----+
     |  53 |  1  | 1-7 |
     +-----+-----+-----+

  9.5. Server Identifier

     This option is used in DHCPOFFER and DHCPREQUEST messages, and may
     optionally be included in the DHCPACK and DHCPNAK messages.  DHCP
     servers include this option in the DHCPOFFER in order to allow the
     client to distinguish between lease offers.  DHCP clients indicate
     which of several lease offers is being accepted by including this
     option in a DHCPREQUEST message.

     The identifier is the IP address of the selected server.



  Alexander & Droms                                              [Page 24]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


     The code for this option is 54, and its length is 4.

      Code   Len            Address
     +-----+-----+-----+-----+-----+-----+
     |  54 |  4  |  a1 |  a2 |  a3 |  a4 |
     +-----+-----+-----+-----+-----+-----+

  9.6. Parameter Request List

     This option is used by a DHCP client to request values for specified
     configuration parameters.  The list of requested parameters is
     specified as n octets, where each octet is a valid DHCP option code
     as defined in this document.

     The client MAY list the options in order of preference.  The DHCP
     server is not required to return the options in the requested order,
     but MUST try to insert the requested options in the order requested
     by the client.

     The code for this option is 55.  Its minimum length is 1.

      Code   Len   Option Codes
     +-----+-----+-----+-----+---
     |  55 |  n  |  c1 |  c2 | ...
     +-----+-----+-----+-----+---

  9.7. Message

     This option is used by a DHCP server to provide an error message to a
     DHCP client in a DHCPNAK message in the event of a failure. A client
     may use this option in a DHCPDECLINE message to indicate the why the
     client declined the offered parameters.  The message consists of n
     octets of NVT ASCII text, which the client may display on an
     available output device.

     The code for this option is 56 and its minimum length is 1.

      Code   Len     Text
     +-----+-----+-----+-----+---
     |  56 |  n  |  c1 |  c2 | ...
     +-----+-----+-----+-----+---



  Alexander & Droms                                              [Page 25]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  9.8. Maximum DHCP Message Size

     This option specifies the maximum length DHCP message that it is
     willing to accept.  The length is specified as an unsigned 16-bit
     integer.  A client may use the maximum DHCP message size option in
     DHCPDISCOVER or DHCPREQUEST messages, but should not use the option
     in DHCPDECLINE messages.

     The code for this option is 57, and its length is 2.  The minimum
     legal value is 576 octets.

      Code   Len     Length
     +-----+-----+-----+-----+
     |  57 |  2  |  l1 |  l2 |
     +-----+-----+-----+-----+

  9.9. Renewal (T1) Time Value

     This option specifies the time interval from address assignment until
     the client transitions to the RENEWING state.

     The value is in units of seconds, and is specified as a 32-bit
     unsigned integer.

     The code for this option is 58, and its length is 4.

      Code   Len         T1 Interval
     +-----+-----+-----+-----+-----+-----+
     |  58 |  4  |  t1 |  t2 |  t3 |  t4 |
     +-----+-----+-----+-----+-----+-----+

  9.10. Rebinding (T2) Time Value

     This option specifies the time interval from address assignment until
     the client transitions to the REBINDING state.

     The value is in units of seconds, and is specified as a 32-bit
     unsigned integer.

     The code for this option is 59, and its length is 4.

      Code   Len         T2 Interval
     +-----+-----+-----+-----+-----+-----+
     |  59 |  4  |  t1 |  t2 |  t3 |  t4 |
     +-----+-----+-----+-----+-----+-----+



  Alexander & Droms                                              [Page 26]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  9.11. Class-identifier

     This option is used by DHCP clients to optionally identify the type
     and configuration of a DHCP client.  The information is a string of n
     octets, interpreted by servers.  Vendors and sites may choose to
     define specific class identifiers to convey particular configuration
     or other identification information about a client.  For example, the
     identifier may encode the client's hardware configuration.  Servers
     not equipped to interpret the class-specific information sent by a
     client MUST ignore it (although it may be reported).

     The code for this option is 60, and its minimum length is 1.

     Code   Len   Class-Identifier
     +-----+-----+-----+-----+---
     |  60 |  n  |  i1 |  i2 | ...
     +-----+-----+-----+-----+---

  9.12. Client-identifier

     This option is used by DHCP clients to specify their unique
     identifier.  DHCP servers use this value to index their database of
     address bindings.  This value is expected to be unique for all
     clients in an administrative domain.

     Identifiers consist of a type-value pair, similar to the

     It is expected that this field will typically contain a hardware type
     and hardware address, but this is not required.  Current legal values
     for hardware types are defined in [22].

     The code for this option is 61, and its minimum length is 2.

     Code   Len   Type  Client-Identifier
     +-----+-----+-----+-----+-----+---
     |  61 |  n  |  t1 |  i1 |  i2 | ...
     +-----+-----+-----+-----+-----+---

  10. Extensions

     Additional generic data fields may be registered by contacting:

        Internet Assigned Numbers Authority (IANA)
        USC/Information Sciences Institute
        4676 Admiralty Way
        Marina del Rey, California  90292-6695

        or by email as: iana@isi.edu



  Alexander & Droms                                              [Page 27]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


     Implementation specific use of undefined generic types (those in the
     range 61-127) may conflict with other implementations, and
     registration is required.

  11. Acknowledgements

     The authors would like to thank Philip Almquist for his feedback on
     this document.  The comments of the DHCP Working Group are also
     gratefully acknowledged.  In particular, Mike Carney and Jon Dreyer
     from SunSelect suggested the current format of the Vendor-specific
     Information option.

     RFC 1497 is based on earlier work by Philip Prindeville, with help
     from Drew Perkins, Bill Croft, and Steve Deering.

  12. References

     [1] Droms, R., "Dynamic Host Configuration Protocol", RFC 1531,
         Bucknell University, October 1993.

     [2] Reynolds, J., "BOOTP Vendor Information Extensions", RFC 1497,
         USC/Information Sciences Institute, August 1993.

     [3] Croft, W., and J. Gilmore, "Bootstrap Protocol", RFC 951,
         Stanford University and Sun Microsystems, September 1985.

     [4] Braden, R., Editor, "Requirements for Internet Hosts -
         Communication Layers", STD 3, RFC 1122, USC/Information Sciences
         Institute, October 1989.

     [5] Mogul, J., and J. Postel, "Internet Standard Subnetting
         Procedure", STD 5, RFC 950, USC/Information Sciences Institute,
         August 1985.

     [6] Postel, J., and K. Harrenstien, "Time Protocol", STD 26, RFC
         868, USC/Information Sciences Institute, SRI, May 1983.

     [7] Postel, J., "Name Server", IEN 116, USC/Information Sciences
         Institute, August 1979.

     [8] Mockapetris, P., "Domain Names - Implementation and
         Specification", STD 13, RFC 1035, USC/Information Sciences
         Institute, November 1987.

     [9] Postel, J., "Quote of the Day Protocol", STD 23, RFC 865,
         USC/Information Sciences Institute, May 1983.



  Alexander & Droms                                              [Page 28]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


     [10] McLaughlin, L., "Line Printer Daemon Protocol", RFC 1179, The
          Wollongong Group, August 1990.

     [11] Accetta, M., "Resource Location Protocol", RFC 887, CMU,
          December 1983.

     [12] Mogul, J. and S. Deering, "Path MTU Discovery", RFC 1191,
          DECWRL,  Stanford University, November 1990.

     [13] Deering, S., "ICMP Router Discovery Messages", RFC 1256,
          Xerox PARC, September 1991.

     [14] Leffler, S. and M. Karels, "Trailer Encapsulations", RFC 893,
          U. C. Berkeley, April 1984.

     [15] Hornig, C., "Standard for the Transmission of IP Datagrams over
          Ethernet Networks", RFC 894, Symbolics, April 1984.

     [16] Postel, J. and J. Reynolds, "Standard for the Transmission of
          IP Datagrams Over IEEE 802 Networks", RFC 1042,  USC/Information
          Sciences Institute, February 1988.

     [17] Sun Microsystems, "System and Network Administration", March
          1990.

     [18] Mills, D., "Internet Time Synchronization: The Network Time
          Protocol", RFC 1305, UDEL, March 1992.

     [19] NetBIOS Working Group, "Protocol Standard for a NetBIOS Service
          on a TCP/UDP transport: Concepts and Methods", STD 19, RFC 1001,
          March 1987.

     [20] NetBIOS Working Group, "Protocol Standard for a NetBIOS Service
          on a TCP/UDP transport: Detailed Specifications", STD 19, RFC
          1002, March 1987.

     [21] Scheifler, R., "FYI On the X Window System", FYI 6, RFC 1198,
          MIT Laboratory for Computer Science, January 1991.

     [22] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, RFC 1340,
          USC/Information Sciences Institute, July 1992.

  13. Security Considerations

     Security issues are not discussed in this memo.



  Alexander & Droms                                              [Page 29]
  RFC 1533        DHCP Options and BOOTP Vendor Extensions    October 1993


  14. Authors' Addresses

     Steve Alexander
     Lachman Technology, Inc.
     1901 North Naper Boulevard
     Naperville, IL 60563-8895

     Phone: (708) 505-9555 x256
     EMail: stevea@lachman.com


     Ralph Droms
     Computer Science Department
     323 Dana Engineering
     Bucknell University
     Lewisburg, PA 17837

     Phone: (717) 524-1145
     EMail: droms@bucknell.edu


  Alexander & Droms                                              [Page 30]



  17.  Appendix E - RFC 1350

  This section is for academic interest only - for universities or
  research institutes.



  Network Working Group                                         K. Sollins
  Request For Comments: 1350                                           MIT
  STD: 33                                                        July 1992
  Obsoletes: RFC 783


                       THE TFTP PROTOCOL (REVISION 2)

  Status of this Memo

     This RFC specifies an IAB standards track protocol for the Internet
     community, and requests discussion and suggestions for improvements.
     Please refer to the current edition of the "IAB Official Protocol
     Standards" for the standardization state and status of this protocol.
     Distribution of this memo is unlimited.

  Summary

     TFTP is a very simple protocol used to transfer files.  It is from
     this that its name comes, Trivial File Transfer Protocol or TFTP.
     Each nonterminal packet is acknowledged separately.  This document
     describes the protocol and its types of packets.  The document also
     explains the reasons behind some of the design decisions.

  Acknowlegements

     The protocol was originally designed by Noel Chiappa, and was
     redesigned by him, Bob Baldwin and Dave Clark, with comments from
     Steve Szymanski.  The current revision of the document includes
     modifications stemming from discussions with and suggestions from
     Larry Allen, Noel Chiappa, Dave Clark, Geoff Cooper, Mike Greenwald,
     Liza Martin, David Reed, Craig Milo Rogers (of USC-ISI), Kathy
     Yellick, and the author.  The acknowledgement and retransmission
     scheme was inspired by TCP, and the error mechanism was suggested by
     PARC's EFTP abort message.

     The May, 1992 revision to fix the "Sorcerer's Apprentice" protocol
     bug [4] and other minor document problems was done by Noel Chiappa.

     This research was supported by the Advanced Research Projects Agency
     of the Department of Defense and was monitored by the Office of Naval
     Research under contract number N00014-75-C-0661.

  1. Purpose

     TFTP is a simple protocol to transfer files, and therefore was named
     the Trivial File Transfer Protocol or TFTP.  It has been implemented
     on top of the Internet User Datagram protocol (UDP or Datagram) [2]



  Sollins                                                         [Page 1]
  RFC 1350                    TFTP Revision 2                    July 1992


     so it may be used to move files between machines on different
     networks implementing UDP.  (This should not exclude the possibility
     of implementing TFTP on top of other datagram protocols.)  It is
     designed to be small and easy to implement.  Therefore, it lacks most
     of the features of a regular FTP.  The only thing it can do is read
     and write files (or mail) from/to a remote server.  It cannot list
     directories, and currently has no provisions for user authentication.
     In common with other Internet protocols, it passes 8 bit bytes of
     data.

     Three modes of transfer are currently supported: netascii (This is
     ascii as defined in "USA Standard Code for Information Interchange"
     [1] with the modifications specified in "Telnet Protocol
     Specification" [3].)  Note that it is 8 bit ascii.  The term
     "netascii" will be used throughout this document to mean this
     particular version of ascii.); octet (This replaces the "binary" mode
     of previous versions of this document.) raw 8 bit bytes; mail,
     netascii characters sent to a user rather than a file.  (The mail
     mode is obsolete and should not be implemented or used.)  Additional
     modes can be defined by pairs of cooperating hosts.

     Reference [4] (section 4.2) should be consulted for further valuable
     directives and suggestions on TFTP.

  2. Overview of the Protocol

     Any transfer begins with a request to read or write a file, which
     also serves to request a connection.  If the server grants the
     request, the connection is opened and the file is sent in fixed
     length blocks of 512 bytes.  Each data packet contains one block of
     data, and must be acknowledged by an acknowledgment packet before the
     next packet can be sent.  A data packet of less than 512 bytes
     signals termination of a transfer.  If a packet gets lost in the
     network, the intended recipient will timeout and may retransmit his
     last packet (which may be data or an acknowledgment), thus causing
     the sender of the lost packet to retransmit that lost packet.  The
     sender has to keep just one packet on hand for retransmission, since
     the lock step acknowledgment guarantees that all older packets have
     been received.  Notice that both machines involved in a transfer are
     considered senders and receivers.  One sends data and receives
     acknowledgments, the other sends acknowledgments and receives data.

     Most errors cause termination of the connection.  An error is
     signalled by sending an error packet.  This packet is not
     acknowledged, and not retransmitted (i.e., a TFTP server or user may
     terminate after sending an error message), so the other end of the
     connection may not get it.  Therefore timeouts are used to detect
     such a termination when the error packet has been lost.  Errors are



  Sollins                                                         [Page 2]
  RFC 1350                    TFTP Revision 2                    July 1992


     caused by three types of events: not being able to satisfy the
     request (e.g., file not found, access violation, or no such user),
     receiving a packet which cannot be explained by a delay or
     duplication in the network (e.g., an incorrectly formed packet), and
     losing access to a necessary resource (e.g., disk full or access
     denied during a transfer).

     TFTP recognizes only one error condition that does not cause
     termination, the source port of a received packet being incorrect.
     In this case, an error packet is sent to the originating host.

     This protocol is very restrictive, in order to simplify
     implementation.  For example, the fixed length blocks make allocation
     straight forward, and the lock step acknowledgement provides flow
     control and eliminates the need to reorder incoming data packets.

  3. Relation to other Protocols

     As mentioned TFTP is designed to be implemented on top of the
     Datagram protocol (UDP).  Since Datagram is implemented on the
     Internet protocol, packets will have an Internet header, a Datagram
     header, and a TFTP header.  Additionally, the packets may have a
     header (LNI, ARPA header, etc.)  to allow them through the local
     transport medium.  As shown in Figure 3-1, the order of the contents
     of a packet will be: local medium header, if used, Internet header,
     Datagram header, TFTP header, followed by the remainder of the TFTP
     packet.  (This may or may not be data depending on the type of packet
     as specified in the TFTP header.)  TFTP does not specify any of the
     values in the Internet header.  On the other hand, the source and
     destination port fields of the Datagram header (its format is given
     in the appendix) are used by TFTP and the length field reflects the
     size of the TFTP packet.  The transfer identifiers (TID's) used by
     TFTP are passed to the Datagram layer to be used as ports; therefore
     they must be between 0 and 65,535.  The initialization of TID's is
     discussed in the section on initial connection protocol.

     The  TFTP header consists of a 2 byte opcode field which indicates
     the packet's type (e.g., DATA, ERROR, etc.)  These opcodes and  the
     formats of  the various types of packets are discussed further in the
     section on TFTP packets.



  Sollins                                                         [Page 3]
  RFC 1350                    TFTP Revision 2                    July 1992


            ---------------------------------------------------
           |  Local Medium  |  Internet  |  Datagram  |  TFTP  |
            ---------------------------------------------------

                        Figure 3-1: Order of Headers


  4. Initial Connection Protocol

     A transfer is established by sending a request (WRQ to write onto a
     foreign file system, or RRQ to read from it), and receiving a
     positive reply, an acknowledgment packet for write, or the first data
     packet for read.  In general an acknowledgment packet will contain
     the block number of the data packet being acknowledged.  Each data
     packet has associated with it a block number; block numbers are
     consecutive and begin with one.  Since the positive response to a
     write request is an acknowledgment packet, in this special case the
     block number will be zero.  (Normally, since an acknowledgment packet
     is acknowledging a data packet, the acknowledgment packet will
     contain the block number of the data packet being acknowledged.)  If
     the reply is an error packet, then the request has been denied.

     In order to create a connection, each end of the connection chooses a
     TID for itself, to be used for the duration of that connection.  The
     TID's chosen for a connection should be randomly chosen, so that the
     probability that the same number is chosen twice in immediate
     succession is very low.  Every packet has associated with it the two
     TID's of the ends of the connection, the source TID and the
     destination TID.  These TID's are handed to the supporting UDP (or
     other datagram protocol) as the source and destination ports.  A
     requesting host chooses its source TID as described above, and sends
     its initial request to the known TID 69 decimal (105 octal) on the
     serving host.  The response to the request, under normal operation,
     uses a TID chosen by the server as its source TID and the TID chosen
     for the previous message by the requestor as its destination TID.
     The two chosen TID's are then used for the remainder of the transfer.

     As an example, the following shows the steps used to establish a
     connection to write a file.  Note that WRQ, ACK, and DATA are the
     names of the write request, acknowledgment, and data types of packets
     respectively.  The appendix contains a similar example for reading a
     file.



  Sollins                                                         [Page 4]
  RFC 1350                    TFTP Revision 2                    July 1992


        1. Host A sends  a  "WRQ"  to  host  B  with  source=  A's  TID,
           destination= 69.

        2. Host  B  sends  a "ACK" (with block number= 0) to host A with
           source= B's TID, destination= A's TID.

     At this point the connection has been established and the first data
     packet can be sent by Host A with a sequence number of 1.  In the
     next step, and in all succeeding steps, the hosts should make sure
     that the source TID matches the value that was agreed on in steps 1
     and 2.  If a source TID does not match, the packet should be
     discarded as erroneously sent from somewhere else.  An error packet
     should be sent to the source of the incorrect packet, while not
     disturbing the transfer.  This can be done only if the TFTP in fact
     receives a packet with an incorrect TID.  If the supporting protocols
     do not allow it, this particular error condition will not arise.

     The following example demonstrates a correct operation of the
     protocol in which the above situation can occur.  Host A sends a
     request to host B. Somewhere in the network, the request packet is
     duplicated, and as a result two acknowledgments are returned to host
     A, with different TID's chosen on host B in response to the two
     requests.  When the first response arrives, host A continues the
     connection.  When the second response to the request arrives, it
     should be rejected, but there is no reason to terminate the first
     connection.  Therefore, if different TID's are chosen for the two
     connections on host B and host A checks the source TID's of the
     messages it receives, the first connection can be maintained while
     the second is rejected by returning an error packet.

  5. TFTP Packets

     TFTP supports five types of packets, all of which have been mentioned
     above:

            opcode  operation
              1     Read request (RRQ)
              2     Write request (WRQ)
              3     Data (DATA)
              4     Acknowledgment (ACK)
              5     Error (ERROR)

     The TFTP header of a packet contains the  opcode  associated  with
     that packet.
  Sollins                                                         [Page 5]
  RFC 1350                    TFTP Revision 2                    July 1992


              2 bytes     string    1 byte     string   1 byte
              ------------------------------------------------
             | Opcode |  Filename  |   0  |    Mode    |   0  |
              ------------------------------------------------

                         Figure 5-1: RRQ/WRQ packet


     RRQ and WRQ packets (opcodes 1 and 2 respectively) have the format
     shown in Figure 5-1.  The file name is a sequence of bytes in
     netascii terminated by a zero byte.  The mode field contains the
     string "netascii", "octet", or "mail" (or any combination of upper
     and lower case, such as "NETASCII", NetAscii", etc.) in netascii
     indicating the three modes defined in the protocol.  A host which
     receives netascii mode data must translate the data to its own
     format.  Octet mode is used to transfer a file that is in the 8-bit
     format of the machine from which the file is being transferred.  It
     is assumed that each type of machine has a single 8-bit format that
     is more common, and that that format is chosen.  For example, on a
     DEC-20, a 36 bit machine, this is four 8-bit bytes to a word with
     four bits of breakage.  If a host receives a octet file and then
     returns it, the returned file must be identical to the original.
     Mail mode uses the name of a mail recipient in place of a file and
     must begin with a WRQ.  Otherwise it is identical to netascii mode.
     The mail recipient string should be of the form "username" or
     "username@hostname".  If the second form is used, it allows the
     option of mail forwarding by a relay computer.

     The discussion above assumes that both the sender and recipient are
     operating in the same mode, but there is no reason that this has to
     be the case.  For example, one might build a storage server.  There
     is no reason that such a machine needs to translate netascii into its
     own form of text.  Rather, the sender might send files in netascii,
     but the storage server might simply store them without translation in
     8-bit format.  Another such situation is a problem that currently
     exists on DEC-20 systems.  Neither netascii nor octet accesses all
     the bits in a word.  One might create a special mode for such a
     machine which read all the bits in a word, but in which the receiver
     stored the information in 8-bit format.  When such a file is
     retrieved from the storage site, it must be restored to its original
     form to be useful, so the reverse mode must also be implemented.  The
     user site will have to remember some information to achieve this.  In
     both of these examples, the request packets would specify octet mode
     to the foreign host, but the local host would be in some other mode.
     No such machine or application specific modes have been specified in
     TFTP, but one would be compatible with this specification.

     It is also possible to define other modes for cooperating pairs of



  Sollins                                                         [Page 6]
  RFC 1350                    TFTP Revision 2                    July 1992


     hosts, although this must be done with care.  There is no requirement
     that any other hosts implement these.  There is no central authority
     that will define these modes or assign them names.


                     2 bytes     2 bytes      n bytes
                     ----------------------------------
                    | Opcode |   Block #  |   Data     |
                     ----------------------------------

                          Figure 5-2: DATA packet


     Data is actually transferred in DATA packets depicted in Figure 5-2.
     DATA packets (opcode = 3) have a block number and data field.  The
     block numbers on data packets begin with one and increase by one for
     each new block of data.  This restriction allows the program to use a
     single number to discriminate between new packets and duplicates.
     The data field is from zero to 512 bytes long.  If it is 512 bytes
     long, the block is not the last block of data; if it is from zero to
     511 bytes long, it signals the end of the transfer.  (See the section
     on Normal Termination for details.)

     All  packets other than duplicate ACK's and those used for
     termination are acknowledged unless a timeout occurs [4].  Sending a
     DATA packet is an acknowledgment for the first ACK packet of the
     previous DATA packet. The WRQ and DATA packets are acknowledged by
     ACK or ERROR packets, while RRQ


                           2 bytes     2 bytes
                           ---------------------
                          | Opcode |   Block #  |
                           ---------------------

                           Figure 5-3: ACK packet


     and ACK packets are acknowledged by  DATA  or ERROR packets.  Figure
     5-3 depicts an ACK packet; the opcode is 4.  The  block  number  in
     an  ACK echoes the block number of the DATA packet being
     acknowledged.  A WRQ is acknowledged with an ACK packet having a
     block number of zero.



  Sollins                                                         [Page 7]
  RFC 1350                    TFTP Revision 2                    July 1992


                 2 bytes     2 bytes      string    1 byte
                 -----------------------------------------
                | Opcode |  ErrorCode |   ErrMsg   |   0  |
                 -----------------------------------------

                          Figure 5-4: ERROR packet


     An ERROR packet (opcode 5) takes the form depicted in Figure 5-4.  An
     ERROR packet can be the acknowledgment of any other type of packet.
     The error code is an integer indicating the nature of the error.  A
     table of values and meanings is given in the appendix.  (Note that
     several error codes have been added to this version of this
     document.) The error message is intended for human consumption, and
     should be in netascii.  Like all other strings, it is terminated with
     a zero byte.

  6. Normal Termination
     The end of a transfer is marked by a DATA packet that contains
     between 0 and 511 bytes of data (i.e., Datagram length < 516).  This
     packet is acknowledged by an ACK packet like all other DATA packets.
     The host acknowledging the final DATA packet may terminate its side
     of the connection on sending the final ACK.  On the other hand,
     dallying is encouraged.  This means that the host sending the final
     ACK will wait for a while before terminating in order to retransmit
     the final ACK if it has been lost.  The acknowledger will know that
     the ACK has been lost if it receives the final DATA packet again.
     The host sending the last DATA must retransmit it until the packet is
     acknowledged or the sending host times out.  If the response is an
     ACK, the transmission was completed successfully.  If the sender of
     the data times out and is not prepared to retransmit any more, the
     transfer may still have been completed successfully, after which the
     acknowledger or network may have experienced a problem.  It is also
     possible in this case that the transfer was unsuccessful.  In any
     case, the connection has been closed.

  7. Premature Termination

     If a request can not be granted, or some error occurs during the
     transfer, then an ERROR packet (opcode 5) is sent.  This is only a
     courtesy since it will not be retransmitted or acknowledged, so it
     may never be received.  Timeouts must also be used to detect errors.



  Sollins                                                         [Page 8]
  RFC 1350                    TFTP Revision 2                    July 1992


  I. Appendix

  Order of Headers

                                                    2 bytes
      ----------------------------------------------------------
     |  Local Medium  |  Internet  |  Datagram  |  TFTP Opcode  |
      ----------------------------------------------------------

  TFTP Formats

     Type   Op #     Format without header

            2 bytes    string   1 byte     string   1 byte
            -----------------------------------------------
     RRQ/  | 01/02 |  Filename  |   0  |    Mode    |   0  |
     WRQ    -----------------------------------------------
            2 bytes    2 bytes       n bytes
            ---------------------------------
     DATA  | 03    |   Block #  |    Data    |
            ---------------------------------
            2 bytes    2 bytes
            -------------------
     ACK   | 04    |   Block #  |
            --------------------
            2 bytes  2 bytes        string    1 byte
            ----------------------------------------
     ERROR | 05    |  ErrorCode |   ErrMsg   |   0  |
            ----------------------------------------

  Initial Connection Protocol for reading a file

     1. Host  A  sends  a  "RRQ"  to  host  B  with  source= A's TID,
        destination= 69.

     2. Host B sends a "DATA" (with block number= 1) to host  A  with
        source= B's TID, destination= A's TID.



  Sollins                                                         [Page 9]
  RFC 1350                    TFTP Revision 2                    July 1992


  Error Codes

     Value     Meaning

     0         Not defined, see error message (if any).
     1         File not found.
     2         Access violation.
     3         Disk full or allocation exceeded.
     4         Illegal TFTP operation.
     5         Unknown transfer ID.
     6         File already exists.
     7         No such user.

  Internet User Datagram Header [2]

     (This has been included only for convenience.  TFTP need not be
     implemented on top of the Internet User Datagram Protocol.)

       Format

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |          Source Port          |       Destination Port        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |            Length             |           Checksum            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


     Values of Fields


     Source Port     Picked by originator of packet.

     Dest. Port      Picked by destination machine (69 for RRQ or WRQ).

     Length          Number of bytes in UDP packet, including UDP header.

     Checksum        Reference 2 describes rules for computing checksum.
                     (The implementor of this should be sure that the
                     correct algorithm is used here.)
                     Field contains zero if unused.

     Note: TFTP passes transfer identifiers (TID's) to the Internet User
     Datagram protocol to be used as the source and destination ports.



  Sollins                                                        [Page 10]
  RFC 1350                    TFTP Revision 2                    July 1992


  References

     [1]  USA Standard Code for Information Interchange, USASI X3.4-1968.

     [2]  Postel, J., "User Datagram  Protocol," RFC 768, USC/Information
          Sciences Institute, 28 August 1980.

     [3]  Postel, J., "Telnet Protocol Specification," RFC 764,
          USC/Information Sciences Institute, June, 1980.

     [4]  Braden, R., Editor, "Requirements for Internet Hosts --
          Application and Support", RFC 1123, USC/Information Sciences
          Institute, October 1989.

  Security Considerations

     Since TFTP includes no login or access control mechanisms, care must
     be taken in the rights granted to a TFTP server process so as not to
     violate the security of the server hosts file system.  TFTP is often
     installed with controls such that only files that have public read
     access are available via TFTP and writing files via TFTP is
     disallowed.

  Author's Address

     Karen R. Sollins
     Massachusetts Institute of Technology
     Laboratory for Computer Science
     545 Technology Square
     Cambridge, MA 02139-1986

     Phone: (617) 253-6006

     EMail: SOLLINS@LCS.MIT.EDU



  Sollins                                                        [Page 11]
  18.  Other Formats of this Document

  This document is published in 11 different formats namely - DVI,
  Postscript, Latex, Adobe Acrobat PDF, LyX, GNU-info, HTML, RTF(Rich
  Text Format), Plain-text, Unix man pages and SGML.

    You can get this HOWTO document as a single file tar ball in HTML,
     DVI, Postscript or SGML formats from -
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/>

    Plain text format is in:
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO>

    Translations to other languages like French, German, Spanish,
     Chinese, Japanese are in
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> Any help from you to
     translate to other languages is welcome.

     The document is written using a tool called "SGML-Tools" which can
     be got from - <http://www.sgmltools.org> Compiling the source you
     will get the following commands like

    sgml2html CVS-HOWTO.sgml     (to generate html file)

    sgml2rtf  CVS-HOWTO.sgml     (to generate RTF file)

    sgml2latex CVS-HOWTO.sgml    (to generate latex file)

  LaTeX documents may be converted into PDF files simply by producing a
  Postscript output using sgml2latex ( and dvips) and running the output
  through the Acrobat distill ( <http://www.adobe.com>) command as
  follows:

  ______________________________________________________________________
  bash$ man sgml2latex
  bash$ sgml2latex filename.sgml
  bash$ man dvips
  bash$ dvips -o filename.ps filename.dvi
  bash$ distill filename.ps
  bash$ man ghostscript
  bash$ man ps2pdf
  bash$ ps2pdf input.ps output.pdf
  bash$ acroread output.pdf &
  ______________________________________________________________________


  Or you can use Ghostscript command ps2pdf.  ps2pdf is a work-alike for
  nearly all the functionality of Adobe's Acrobat Distiller product: it
  converts PostScript files to Portable Document Format (PDF) files.
  ps2pdf is implemented as a very small command script (batch file) that
  invokes Ghostscript, selecting a special "output device" called
  pdfwrite. In order to use ps2pdf, the pdfwrite device must be included
  in the makefile when Ghostscript was compiled; see the documentation
  on building Ghostscript for details.

  This howto document is located at -

    <http://sunsite.unc.edu/LDP/HOWTO/CVS-HOWTO.html>

  Also you can find this document at the following mirrors sites -

    <http://www.caldera.com/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.WGS.com/LDP/HOWTO/CVS-HOWTO.html>


    <http://www.cc.gatech.edu/linux/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.redhat.com/linux-info/ldp/HOWTO/CVS-HOWTO.html>

    Other mirror sites near you (network-address-wise) can be found at
     <http://sunsite.unc.edu/LDP/hmirrors.html> select a site and go to
     directory /LDP/HOWTO/CVS-HOWTO.html


  In order to view the document in dvi format, use the xdvi program. The
  xdvi program is located in tetex-xdvi*.rpm package in Redhat Linux
  which can be located through ControlPanel | Applications | Publishing
  | TeX menu buttons.  To read dvi document give the command -


               xdvi -geometry 80x90 howto.dvi
               man xdvi



  And resize the window with mouse.  To navigate use Arrow keys, Page
  Up, Page Down keys, also you can use 'f', 'd', 'u', 'c', 'l', 'r',
  'p', 'n' letter keys to move up, down, center, next page, previous
  page etc.  To turn off expert menu press 'x'.

  You can read postscript file using the program 'gv' (ghostview) or The
  ghostscript program is in ghostscript*.rpm package and gv program is
  in gv*.rpm package in Redhat Linux which can be located through
  ControlPanel | Applications | Graphics menu buttons. The gv program is
  much more user friendly than ghostscript.  Also ghostscript and gv are
  available on other platforms like OS/2, Windows 95 and NT, you view
  this document even on those platforms.


    Get ghostscript for Windows 95, OS/2, and for all OSes from
     <http://www.cs.wisc.edu/~ghost>

  To read postscript document give the command -


                       gv howto.ps
                       ghostscript howto.ps



  You can read HTML format document using Netscape Navigator, Microsoft
  Internet explorer, Redhat Baron Web browser or any of the 10 other web
  browsers.

  You can read the latex, LyX output using LyX a X-Windows front end to
  latex.



  Root over nfs clients & server Howto.
  Hans de Goede hans@highrise.nl

  v1.0 30 March 1999

  Howto setup a server and configure clients for diskless operation from
  a network.

  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright
     1.2 Changelog

  2. Basic principle

     2.1 Things can't be that simple
        2.1.1 Each ws needs its own writable copy of a number of dirs
        2.1.2 Write access to /home might be needed
        2.1.3 How does a ws find out it's ip so that it can communicate with the server?
        2.1.4 What about ws sepecific configuration
        2.1.5 Miscelancious problems

  3. Preparing the server

     3.1 Building a kernel
     3.2 Creating and populating /tftpboot, making symlinks for /tmp etc.
        3.2.1 The automagic part
        3.2.2 Manual adjustments to some files
     3.3 Exporting the appropriate file systems and setting up bootp
        3.3.1 Exporting the appropriate file systems
        3.3.2 Setting up bootp

  4. Adding workstations

     4.1 Creating a boot disk or bootrom
        4.1.1 Creating a bootdisk
        4.1.2 Creating a bootrom
     4.2 Creating a ws dir
     4.3 Add entries to /etc/bootptab and /etc/hosts
     4.4 Booting the ws for the first time
     4.5 Set the ws specific configuration.

  5. Added bonus: booting from cdrom

     5.1 Basic Principle
        5.1.1 Things can't be that simple
     5.2 Creating a test setup.
     5.3 Creating the cd
        5.3.1 Creating a boot image
        5.3.2 Creating the iso image
        5.3.3 Verifying the iso image
        5.3.4 Writing the actual cd
     5.4 Boot the cd and test it

  6. Thanks

  7. Comments



  ______________________________________________________________________

  1.  Introduction

  This howto is also available at - <http://xmame.retrogames.com/hans>.
  This document describes a setup for nfs over root. This document
  differs from the other root over nfs howto's in 2 ways:


  1. It describes both the server and the client side offering a
     complete solution, it doesn't desribe the generic principles off
     root over nfs although they will become clear. Instead it offers a
     working setup for root over nfs. One of the many possible setup's I
     might add.

  2. This solution is unique in that it shares the root of the server
     with the workstations (ws). Instead of having a mini-root per ws.
     This has a number of advantages:

  o  low diskspace usage

  o  any changes on the serverside are also automagicly made at the
     client side, all configuration has only to be done once!

  o  Very easy adding of new clients

  o  only one system to maintain

  This document is heavily based on a RedHat-5.2 system. Quite a bit of
  prior linux sysadmin experience is assumed in this howto, if you have
  that it shouldn't be a problem to addept this solutions to other
  distributions.

  1.1.  Copyright

  Well here's the standard howto legal stuff:

  This manual may be reproduced and distributed in whole or in part,
  without fee, subject to the following conditions:


  o  The copyright notice above and this permission notice must be
     preserved complete on all complete or partial copies.

  o  Any translation or derived work must be approved by the author in
     writing before distribution.

  o  If you distribute this work in part, instructions for obtaining the
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

  o  Small portions may be reproduced as illustrations for reviews or
     quotes in other works without this permission notice if proper
     citation is given.


  Exceptions to these rules may be granted for academic purposes: Write
  to the author and ask. These restrictions are here to protect us as
  authors, not to restrict you as learners and educators.

  1.2.  Changelog


  o  v0.1, 20 January 1999: First draft written at the HHS, where the
     setup was originally developed.

  o  v1.0, 30 March 1999: First released version partially written in
     time of ISM

  2.  Basic principle

  As already said with this setup the clients share basicly the entire
  root-fs with the server. But the clients ofcourse only get read access
  to it. This is basicly how things work.

  2.1.  Things can't be that simple

  Unfortunatly things aren't that simple, there are a couple of problems
  the overcome with this simple setup.

  2.1.1.  Each ws needs its own writable copy of a number of dirs

  A normal linux setup needs to have write access to the following dirs:


  1. /dev

  2. /var

  3. /tmp

  There are 3 solutions for this, of which one will only work for /dev:


  1. mount a ramdisk and populate it by untarring a tarball, or by
     copying a template dir.

  o  Advantages:

     a. It's cleaned up every reboot, which removes tmp files and logs.
        Thus it needs no maintaince unlike server sided dirs.

     b. It doesn't take up any space on the server, and that it doesn't
        generate any network traffic. A ramdisk takes less server and
        network resources, and is faster.

  o  Disadvantages:

     a. It takes memory.

     b. The logs aren't kept after a reboot, if you really want logging
        of all your clients tell syslog to redirect the logging to your
        server.

  2. create a dir for each ws on the server and mount it rw over nfs.

  o  Advantages & disadvantages:

     a. The above arguments work in reverse for serversided dirs.

  3. With kernel 2.2 devfs can be used for /dev, this is a virtual
     filesystem ala /proc for /dev.

  o  Advantages:

     a. Devfs takes very little memory when compared to a ramdisk / no
        diskspace on the server and is very fast. A normal /dev takes at
        least 1.5 mb since the minimal size for a file (and thus for a
        device) is 1k, and there are somewhere around 1200 devices. You
        can offcourse use a template of a stripped /dev with only the
        entries you need to save some space. 1.5 Mb is a lott for a
        ramdisk and also isn't nice on a server.
     b. Devfs automagicly creates entries for newly added & detected
        devices, so no maintainance is needed.

  o  Disadvantages:

     a. Any changes to /dev like creating symlinks for the mouse and
        cdrom are lost. Devfs comes with a script called rc.devfs to
        save these chances. The script's provided in this howto will
        automagicly restore these symlinks settings by calling rc.devfs
        If you make any changes to /dev you need to call the rc.devfs
        yourself to save them by typing:


       /etc/rc.d/rc.devfs save /etc/sysconfig


  As you can see, there are a number of ways to solve this problem. For
  the rest of this Howto the following choices are assumed:


  o  For /dev we'll use Devfs

  o  For /var and /tmp we'll use a shared ramdisk of 1mb. It's shared to
     use the space as effeciently as possible. /tmp is replaced by a
     symlink to /var/tmp to make the sharing possible.

  o  Populating the ramdisk with tarballs or template dirs, works
     equally well.  But with template dirs it's much easier to make
     changes, thus we'll use template dirs.

  2.1.2.  Write access to /home might be needed

  Not really a problem in every unix client/server setup /home is
  mounted rw from the server so we'll just do that ;)

  2.1.3.  How does a ws find out it's ip so that it can communicate with
  the server?

  Luckily for us, this problem has already been solved and the linux
  kernel has support for 2 ways of autoconfiguration of the ip-address:


  1. RARP

  2. Bootp

  Rarp is the easiest to setup, bootp is the most flexible. Since most
  bootroms only support bootp that's what we'll use.

  2.1.4.  What about ws sepecific configuration

  On redhat most system dependent config files are already in
  /etc/sysconfig We'll just move those which aren't there and add
  symlinks. Then we mount a seperate /etc/sysconfig on a per ws basis.
  This is really the only distribution dependent part on other
  distributions you can just create a sysconfig dir, move all config
  files which can't be shared there and create symlinks. Also
  /etc/rc.d/rc3.d, or symilar on other dists, might need to be different
  for the server resp the workstations. Assuming that all ws run the
  same services in runlevel 3, we'll just create a seperate 3th runlevel
  for the workstations and the server:


  1. Create both a /etc/rc.d/rc3.ws and a /etc/rc.d/rc3.server


  2. make /etc/rc.d/rc3.d a symlink to /etc/sysconfig/rc3.d

  3. make /etc/sysconfig/rc3.d a symlink to the apropiate
     /etc/rc.d/rc3.xxx

  4. replace S99local in rc3.ws by a link to /etc/sysconfig/rc.local so
     that each ws can have it's own rc.local

  2.1.5.  Miscelancious problems

  There are a few problems left:


  1. /etc/rc.d/rc.sysinit needs /var, so /var needs to be mounted or
     created before /etc/rc.d/rc.sysinit is run. It would also be nice
     if the ws-specific /etc/sysconfig is mounted before any initscripts
     are run.

  o  We'll just source a bootup script for the ws in the very top of
     /etc/rc.d/rc.sysinit.  Note this script will then ofcourse also be
     sourced by the server itself on boot, so the script has to detect
     this and do nothing on the server.

  2. /etc/mtab needs to be writable:

  o  This is a tricky one, just create a link to /proc/mounts and create
     an empty file mounts in /proc so that fsck and mount don't complain
     during the initscripts when /proc isn't mounted yet. One note
     smb(u)mount doesn't respect mtab being a link and overwrites it.
     Thus if you want to use smb(u)mount create wrapper scripts that
     restore the symlink.

  3.  Preparing the server

  Now it's time to prepare the server to serve diskless clients.

  3.1.  Building a kernel

  The first thing todo is build a kernel with the nescesarry stuff in to
  support root over nfs. Take the following steps to build your kernel:


  1. Since we'll be using redhat-5.2 with kernel-2.2 you should asure
     yourself that your redhat-5.2 is kernel-2.2 ready. RedHat has got
     an excellent howto on this.

  2. I use the same kernel for both server and ws, to avoid module
     conflicts since they share the same /lib/modules. If this is not
     possible in your situation, fake different kernel versions by
     editing the version number in the kernel's top makefile. These
     different versionsnumbers will avoid any conflicts.

  3. Besides the usual stuff the kernel should have the following:

  o  ext2 compiled in (if used on server, or for both)

  o  nfs and root-over-nfs compiled in (if used on client or both), to
     get the nfs over root option in 2.2 enable ip-autoconfig in the
     network options. We'll use bootp as configuration method.

  o  ws networkcard support compiled in (if used on client or both)

  o  compile devfs in (required for client, also nice for server)

  o  anything else you normally use, modules for all other devices used
     on either the server or all / some ws etc.
  4. The kernel-src needs to be edited to make the default root-over-nfs
     mount: /tftpboot/<ip>/root instead of just /tftpboot/<ip>. This is
     to get a clean tree in /tftpboot with one dir per ws containing
     both the root for it (a link to the actual server root) and any ws
     specific dirs.

  o  For 2.0 This is a define in: "include/linux/nfs_fs.h" called
     "NFS_ROOT"

  o  For 2.2 This is a define in: "fs/nfs/nfsroot.c"

  5. Now just compile the kernel as usual, see the kernel-howto.

  6. If you don't have /dev/nfsroot yet, create it by typing:

       mknod /dev/nfsroot b 0 255.


  7. After compiling the kernel set the root to nfsroot by typing:

       rdev <path-to-zImage>/zImage /dev/nfsroot


  8. Before booting with devfs you need to make a few changes to
     /etc/conf.modules, append the contents of the conf.modules in the
     devfs documentation to it.

  9. Since this new kernel is compiled for autoconfig of ip's it will
     try to autoconf the ip of the server during bootup. Which ofcourse
     will fail since it gives out the ip's. To avoid a long timeout add:
     append="ip=off" To the linux section of /etc/lilo.conf.

  10.
     Run lilo and boot the new kernel.

  11.
     Due to devfs you'll have lost all symlinks on the server. With
     redhat this is usually /dev/mouse and /dev/cdrom. Recreate these.
     If you also used to use special ownerships, chown to appropiate
     files in /dev. Now save the /dev settings (in /etc/sysconfig, since
     they might be ws specific):

  o  Copy rc.devfs from the devfs documentation in the kernel source to
     /etc/rc.d/rc.devfs and make it executable

  o  Save the settings by typing:

       /etc/rc.d/rc.devfs save /etc/sysconfig


  3.2.  Creating and populating /tftpboot, making symlinks for /tmp etc.

  The next step is to create and populate /tftpboot

  3.2.1.  The automagic part

  This is all handled by a big script since putting a long list of
  commands into this howto seemed pretty useless to me. If you want todo
  this manual just read the script and type it in as you go ;)

  This setup script thus some nasty things like nuke /tmp, temporary
  kill syslog, umount /proc. So make sure that noone is using the
  machine during this, and that X isn't running. Just making sure your
  the only one logged in on a text-console is enough, no need to change
  runlevels.

  DISCLAIMER: this script has been tested but nevertheless if it messes
  up your server your on your own. I can take no responsibility what so
  ever. Lett me repeat this howto is only for experienced linux
  sysadmins. Also this is script is designed to be run once and I really
  mean once. Running it twice will nuke: /etc/fstab,
  /etc/X11/XF86Config, /etc/X11/X and /etc/conf.modules.

  Now with that said, just cut and paste the script make it executable,
  execute it and pray to the holy penguin that it works ;)



  ______________________________________________________________________
  #!/bin/sh

  SERVER_NAME=`hostname -s`

  ###
  echo creating /etc/rc.d/rc.ws
  #this basicly just echos the entire script ;)
  echo "#root on nfs stuff

  SERVER=$SERVER_NAME

  #we need proc for mtab, route etc
  mount -t proc /proc /proc

  IP=\`ifconfig eth0|grep inet|cut --field 2 -d ':'|cut --field 1 -d ' '\`

  #if the first mount fails we're probably the server, or atleast something is
  #pretty wrong, so only do the other stuff if the first mount succeeds
  mount \$SERVER:/tftpboot/\$IP/sysconfig /etc/sysconfig -o nolock &&
  {
     #other mounts
     mount \$SERVER:/home /home -o nolock
     mount \$SERVER:/ /\$SERVER -o ro,nolock

     #/var
     echo Creating /var ...
     mke2fs -q -i 1024 /dev/ram1 1024
     mount /dev/ram1 /var -o defaults,rw
     cp -a /tftpboot/var /

     #network stuff
     . /etc/sysconfig/network
     HOSTNAME=\`cat /etc/hosts|grep \$IP|cut --field 2\`
     route add default gw \$GATEWAY
     ifup lo
  }

  #restore devfs settings
  /etc/rc.d/rc.devfs restore /etc/sysconfig

  umount /proc" > /etc/rc.d/rc.ws

  ###
  echo splitting runlevel 3 for the client and server
  mv /etc/rc.d/rc3.d /etc/rc.d/rc3.server
  cp -a /etc/rc.d/rc3.server /etc/rc.d/rc3.ws
  rm /etc/rc.d/rc3.ws/*network
  rm /etc/rc.d/rc3.ws/*nfs
  rm /etc/rc.d/rc3.ws/*nfsfs
  rm /etc/rc.d/rc3.ws/S99local
  ln -s /etc/sysconfig/rc.local /etc/rc.d/rc3.ws/S99local
  ln -s /etc/rc.d/rc3.server /etc/sysconfig/rc3.d
  ln -s /etc/sysconfig/rc3.d /etc/rc.d/rc3.d

  ###
  echo making tmp a link to /var/tmp
  rm -fR /tmp
  ln -s var/tmp /tmp

  ###
  echo moving various files around and create symlinks for them
  echo mtab
  /etc/rc.d/init.d/syslog stop
  umount /proc
  touch /proc/mounts
  mount /proc
  /etc/rc.d/init.d/syslog start
  rm /etc/mtab
  ln -s /proc/mounts /etc/mtab
  echo fstab
  mv /etc/fstab /etc/sysconfig
  ln -s sysconfig/fstab /etc/fstab
  echo X-config files
  mkdir /etc/sysconfig/X11
  mv /etc/X11/X /etc/sysconfig/X11
  ln -s ../sysconfig/X11/X /etc/X11/X
  mv /etc/X11/XF86Config /etc/sysconfig/X11
  ln -s ../sysconfig/X11/XF86Config /etc/X11/XF86Config
  echo conf.modules
  mv /etc/conf.modules /etc/sysconfig
  ln -s sysconfig/conf.modules /etc/conf.modules
  echo isapnp.conf
  mv /etc/isapnp.conf /etc/sysconfig
  ln -s sysconfig/isapnp.conf /etc/isapnp.conf

  ###
  echo creating a template dir for the ws directories
  echo /tftpboot/template
  mkdir /home/tftpboot
  ln -s home/tftpboot /tftpboot
  mkdir /tftpboot/template
  mkdir /$SERVER_NAME
  echo root
  ln -s / /tftpboot/template/root
  echo sysconfig
  cp -a /etc/sysconfig /tftpboot/template/sysconfig
  rm -fR /tftpboot/template/sysconfig/network-scripts
  ln -s /$SERVER_NAME/etc/sysconfig/network-scripts \
   /tftpboot/template/sysconfig/network-scripts
  echo NETWORKING=yes > /tftpboot/template/sysconfig/network
  echo `grep "GATEWAY=" /etc/sysconfig/network` >> /tftpboot/template/sysconfig/network
  echo "/dev/nfsroot / nfs defaults 1 1" > /tftpboot/template/sysconfig/fstab
  echo "none /proc proc defaults 0 0" >> /tftpboot/template/sysconfig/fstab
  echo "#!/bin/sh" > /tftpboot/template/sysconfig/rc.local
  chmod 755 /tftpboot/template/sysconfig/rc.local
  rm /tftpboot/template/sysconfig/rc3.d
  ln -s /etc/rc.d/rc3.ws /tftpboot/template/sysconfig/rc3.d
  rm /tftpboot/template/sysconfig/isapnp.conf
  echo var
  cp -a /var /tftpboot/var
  rm -fR /tftpboot/var/lib
  ln -s /$SERVER_NAME/var/lib /tftpboot/var/lib
  rm -fR /tftpboot/var/catman
  ln -s /$SERVER_NAME/var/catman /tftpboot/var/catman
  rm -fR /tftpboot/var/log/httpd
  rm -f /tftpboot/var/log/samba/*
  for i in `find /tftpboot/var/log -type f`; do cat /dev/null > $i; done
  rm `find /tftpboot/var/lock -type f`
  rm `find /tftpboot/var/run -type f`
  echo /sbin/fsck.nfs
  echo "#!/bin/sh
  exit 0" > /sbin/fsck.nfs
  chmod 755 /sbin/fsck.nfs

  echo all done

  ______________________________________________________________________



  3.2.2.  Manual adjustments to some files

  Now we need to make a few manual adjustments to the server:


  1. The ws setup script has to be sourced at the very beginning of
     rc.sysinit, so add the following lines directly after setting the
     PATH:

     ___________________________________________________________________
     #for root over nfs workstations.
     /etc/rc.d/rc.ws

     ___________________________________________________________________



  2. Strip /etc/rc.d/rc3.ws to a bare minimum. It might be useful to
     create something like rc.local.ws but I'll leave that up to you.
     Network and nfsfs are already setup.The following have been already
     removed / updated by the automagic script:

  o  network

  o  nfsfs

  o  nfs

  o  rc.local

  3.3.  Exporting the appropriate file systems and setting up bootp

  The server must ofcourse export the appropriate filesystems and asign
  the ip addresses to the clients.

  3.3.1.  Exporting the appropriate file systems

  We need to export some dir's for the workstations so for the situation
  here at the university I would add the following to /etc/exports:


  ______________________________________________________________________
  / *.st.hhs.nl(ro,no_root_squash)
  /home *.st.hhs.nl(rw,no_root_squash)

  ______________________________________________________________________



  Ofcourse use the apropriate domain ;) and restart nfs by typing:


       /etc/rc.d/init.d/nfs restart


  Note for knfsd users: knfsd doesn't allow you to have multiple exports
  on one partition with different permissions. Also knfsd doesn't allow
  clients to go past partition boundaries for example if a client mounts
  / and /usr is a different partition it won't have access to /usr. Thus
  if you use knfsd, at least /home should be on a different partition,
  the server prepare script already puts /tftpboot in /home so that
  doesn't need a seperate partition.  If you've got any other partitions
  your clients should have access to export them seperatly and add mount
  commands for them to /etc/rc.d/rc.ws.


  3.3.2.  Setting up bootp


  1. If bootp isn't installed yet install it. It comes with RedHat.

  2. Edit /etc/inetd.conf and uncomment the line beginning with bootps,
     if you want to use a bootprom uncomment tftp while your at it.

  3. Restart inetd by typing:

       /etc/rc.d/init.d/inetd restart


  4.  Adding workstations

  Now that the server is all done, we can start adding workstations.

  4.1.  Creating a boot disk or bootrom

  You'll need ot create a bootrom and / or a bootdisk to boot your
  workstation.

  4.1.1.  Creating a bootdisk

  Even if you wish to use a bootrom its wise to first test with a
  bootdisk, to create a boot disk just type:


       dd if=/<path-to-zImage>/zImage of=/dev/fd0


  4.1.2.  Creating a bootrom

  There are a few free package's out there to create bootroms:


  1. netboot, this is IMHO the most complete free package out there. It
     uses standard dos packet drivers so allmost all cards are
     supported. One very usefull hint I got on there mailing list was to
     pklite the packetdrivers since some commercial drivers are to big
     to fit into the bootrom. Netboot's documentation is complete
     enough, so I won't waste any time reproducing it here, it should be
     more then sufficient to create a bootrom and boot a ws with it.
     Netboot's webpage is: http://www.han.de/~gero/netboot/

  2. etherboot, this is the other free package out there it has got a
     few nice features like dhcp support, but has limited driver support
     as it uses its own driver format. I haven't used this so I really
     can't give anymore usefull info.  Etherboot's webpage is:
     http://www.slug.org.au/etherboot/

  About the roms themselves. Most cards take ordinary eproms with an 28
  pins dip housing. These eproms come in size upto 64kB. For most cards
  you'll need 32kB eproms with netboot. Some cards drivers will fit into
  16kB but the price difference of the eproms is minimal. These eproms
  can be burned with any ordinairy eprom burner.

  4.2.  Creating a ws dir

  Just copy over the template by typing:


       cd /tftpbootcp -a template <ip>



  You could of course also copy over the dir of a workstation with
  identical mouse, graphicscard and monitor and ommit the configuration
  in step 5.4.

  4.3.  Add entries to /etc/bootptab and /etc/hosts

  Edit /etc/bootptab and add an entry for your test ws, an example entry
  is:


  ______________________________________________________________________
  nfsroot1:hd=/tftpboot:vm=auto:ip=10.0.0.237:\
  :ht=ethernet:ha=00201889EE78:\
  :bf=bootImage:rp=/tftpboot/10.0.0.237/root

  ______________________________________________________________________



  Replace nfsroot1 by the hostname you want your ws to have. Replace
  10.0.0.237 by the ip you want your ws to have (do this twice) and
  replace 00201889EE78 by the MAC-ADDRESS of your ws. If you don't know
  the MAC-ADDRESS of the ws, just boot it with the just created boot
  disk and look for the MAC-ADDRESS in the boot messages. There's a
  chance bootpd is already running so just to make sure try to restart
  it by typing:


       killall -HUP bootpd


  Don't worry if it fails, that just means it wasn't running, inetd will
  start it when asked too.

  4.4.  Booting the ws for the first time

  Just boot the ws from the bootdisk. This should get you a working ws
  in textmode, with the exact same setup as your server except for the
  ip-nr and the running services. Even if you want to use a bootprom
  it's wise to first test with the bootdisk, if that works you can try
  to boot with the bootrom see the bootroms documentation for more info.

  4.5.  Set the ws specific configuration.

  Now it's time to configure any ws specific settings:


  1. First off all to get the mouse working, just run mouseconfig. To
     apply the changes, and check that the mouse works type:

       /etc/rc.d/init.d restart


  2. Run Xconfigurator, when Xconfigurator has probed the card and you
     can press ok don't! Since we have moved the symlink for the Xserver
     from /etc/X11/X to /etc/sysconfig/X11/X Xconfigurator will fail to
     create the proper link. Thus to make sure the rest of Xconfigurator
     goes well, switch to another console and create the link in
     /etc/sysconfig/X11 to the advised server. Now just finish
     Xconfigurator and test X.

  3. Configure anything else which is different then the server /
     template:

  o  sound: You probaly need to modify isapnp.conf and conf.modules,
     both are already made links to /etc/sysconfig by the server setup
     script.

  o  cdrom: Link in /dev, entry in /etc/fstab? etc.

  o  rc.local: Make any nescesarry changes.

  4. Save the links and any other changes to /dev type:

       /etc/rc.d/rc.devfs save /etc/sysconfig


  5. All done.

  5.  Added bonus: booting from cdrom

  Much of the above also goes for booting from cdrom. Since I wanted to
  document howto boot from cdrom anyway, I document it in here to avoid
  typing a lott of the same twice.

  Why would one want to boot a machine from cd-rom? Booting from cdrom
  is interesting everywhere where one wants to run a very specific
  application, like a kiosk, a library database program or an intenet
  cafe, and one doesn't have a network or a server to use a root over
  nfs setup.

  5.1.  Basic Principle

  The basic principle is wants again simple, boot with a cdrom as root.
  To make this possible we'll use the rockridge extension to put a unix
  like filesystem on a cd and the Eltorito extension to make cd's
  bootable.

  5.1.1.  Things can't be that simple

  Ofcourse this setup also has a few problems. most are the same as
  above:


  1. We'll need write access to: /dev, /var & /tmp.

  o  We'll just use the same solutions as with root over nfs (see
     above):

  o  For /dev we'll use Devfs

  o  For /var and /tmp we'll use a shared ramdisk of 1mb. It's shared to
     use the space as effeciently as possible. /tmp is replaced by a
     symlink to /var/tmp to make the sharing possible.

  o  Populating the ramdisk with tarballs or template dirs, works
     equally well.  But with template dirs it's much easier to make
     changes, thus we'll use template dirs.

  2. Some apps need write access to /home.

  o  Put the homedir of the user's who will be running the application
     in /var, and populate it wiht the rest of /var every boot.

  3. /etc/mtab needs to be writable:

  o  Create a link to /proc/mounts and create an empty file mounts in
     /proc, see above.



  5.2.  Creating a test setup.

  Now that we know what we want todo and how, it's time to create a test
  setup:


  1. For starters just take one of the machines which you want to use
     and put in a big disk and a cd-burner.

  2. Install your linux of choice on this machine, and leave a 650mb
     partition free for the test setup. This install will be used to
     make the iso-image and to burn the cd's from, so install the
     nescesarry tools. It will also be used to restore any booboo's
     which leave the test setup unbootable.

  3. On the 650 mb partition install your linux of choice with the setup
     you want to have on the cd, this will be the test setup

  4. Boot the test setup.

  5. Compile a kernel as described in Section 3.1, follow all the steps,
     the changes need for devfs are still needed! At step 3 of Section
     3.1 put in the following:

  o  isofs compiled in

  o  devfs compiled in

  o  cdrom support compiled in

  o  everything else you need either compiled in or as module.

  6. Configure the test setup:

  o  Create the user which we'll be running the application.

  o  Put it's homedir in /var.

  o  Install the application if needed.

  o  Configure the application if needed.

  o  Configure the user so that the application is automagicly run after
     login.

  o  Configure linux so that it automaigcly logs in the user.

  o  Configure anything else which needs configuring.

  7. Test that the test setup automagicly boots into the apllication and
     everything works.

  8. Boot the main install and mount the 650 mb partition on /test of
     the main install.

  9. Put the following in a file called /test/etc/rc.d/rc.iso, this file
     we'll be sourced at the begining of rc.sysinit to create /var



     ___________________________________________________________________
     #/var
     echo Creating /var ...
     mke2fs -q -i 1024 /dev/ram1 1024
     mount /dev/ram1 /var -o defaults,rw
     cp -a /lib/var /

     #restore devfs settings, needs proc
     mount -t proc /proc /proc
     /etc/rc.d/rc.devfs restore /etc/sysconfig
     umount /proc

     ___________________________________________________________________



  10.
     Edit /test/etc/rc.sysinit comment the lines we're the root is
     remounted rw and add the following 2 lines directly afer setting
     the PATH:

     ___________________________________________________________________
     #to boot from cdrom
     . /etc/rc.d/rc.iso

     ___________________________________________________________________



  11.
     Copying the following to a script and executing it, this wil create
     a template for /var and make /tmp and /etc/mtab links.

     ___________________________________________________________________
     #!/bin/sh
     echo tmp
     rm -fR /test/tmp
     ln -s var/tmp /test/tmp

     ###
     echo mtab
     touch /test/proc/mounts
     rm /test/etc/mtab
     ln -s /proc/mounts /test/etc/mtab

     ###
     echo var
     mv /test/var/lib /test/lib/var-lib
     mv /test/var /test/lib
     mkdir /test/var
     ln -s /lib/var-lib /test/lib/var/lib
     rm -fR /test/lib/var/catman
     rm -fR /test/lib/var/log/httpd
     rm -f /test/lib/var/log/samba/*
     for i in `find /test/lib/var/log -type f`; do cat /dev/null > $i; done
     rm `find /test/lib/var/lock -type f`
     rm `find /test/lib/var/run -type f`


     ___________________________________________________________________



  12.
     Remove the creation of /etc/issue* from /test/etc/rc.local it will
     only fail.
  13.
     Now boot the test partition again, it will be read only just like a
     cdrom.  If something doesn't work reboot to the working partition
     fix it, try again etc. Or you could remount / rw ,fix it then
     reboot straight into to test partition again. To remount / rw type:

       mount -o remount,rw /


  5.3.  Creating the cd

  5.3.1.  Creating a boot image

  First of all boot into the workign partition. To create a bootable cd
  we'll need an image of a bootable floppy. Just dd-ing a zimage doesn't
  work since the loader at the beginning of the zimage doesn't seem to
  like the fake floppydrive a bootable cd creates. So we'll use syslinux
  instead.


  1. Get boot.img from a redhat cd

  2. Mount boot.img somewhere through loopback by typing:

       mount boot.img somewhere -o loop -t vfat


  3. Remove everything from boot.img except for:

  o  ldlinux.sys

  o  syslinux.cfg

  4. Cp the kernel-image from the test partition to boot.img.

  5. Edit syslinux.cfg so that it contains the following, ofcourse
     replace zImage by the appropiote image name:

     ___________________________________________________________________
     default linux

     label linux
     kernel zImage
     append root=/dev/<insert your cdrom device here>

     ___________________________________________________________________



  6. Umount boot.img:

       umount somewhere


  7. If your /etc/mtab is a link to /proc/mounts umount won't
     automagicly free /dev/loop0 so free it by typing:

       losetup -d /dev/loop0


  5.3.2.  Creating the iso image

  Now that we have the boot image and an install that can boot from a
  readonly mount it's time to create an iso image of the cd:


  1. Copy boot.img to /test

  2. Cd to the directory where you want to store the image make sure
     it's on a partition with enough free space.

  3. Now generate the image by typing:

       mkisofs -R -b boot.img -c boot.catalog -o boot.iso /test


  5.3.3.  Verifying the iso image


  1. Mounting the image throug the loopbackdevice by typing:

       mount boot.iso somewhere -o loop -t iso9660


  2. Now verify that the contents is ok.

  3. Umount boot.iso:

       umount somewhere


  4. If your /etc/mtab is a link to /proc/mounts umount won't
     automagicly free /dev/loop0 so free it by typing:

       losetup -d /dev/loop0


  5.3.4.  Writing the actual cd

  Assuming that you've got cdrecord installed and configured for your
  cd-writer type:


       cdrecord -v speed=<desired writing speed> dev=<path to your
       writers generic scsi device> boot.iso


  5.4.  Boot the cd and test it

  Well the title of this paragraph says it all ;)

  6.  Thanks


  o  The HHS (Haagse Hoge School) a dutch college where I first
     developed and tested this setup for use in a couple of labs. And
     where the initial version of this HOWTO was written.

  o  ISM a dutch company where I'm doing my final project. Part of the
     project involves diskless machines, so I got to develop this setup
     further and had the time to update this HOWTO.

  o  All the users who will give me usefull input once this first
     version is out ;)

  7.  Comments

  Comments suggestions and such are welcome. They can be send to Hans de
  Goede at: j.w.r.degoede@et.tudelft.nl



  The Linux Distribution HOWTO
  Eric S. Raymond <esr@thyrsus.com>
  v6.9, 8 June 2000

  This document is intended to help new users choose a Linux distribu
  tion, and to help experienced users track the state of the Linux mar
  ket.  It does not aim to be a complete list of Linux distributions for
  all platforms, but instead focuses on leading English-language Intel
  distributions available on CD-ROM and accessible to Linux novices.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 New versions of this document
     1.2 Recent Changes
     1.3 Overview of the Linux Market
     1.4 Editorial Recommendations

  2. Distributions

     2.1 Caldera OpenLinux
     2.2 Debian Linux Distribution
     2.3 Linux Pro
     2.4 Red Hat Linux
     2.5 Trans-Ameritech Linuxware
     2.6 Slackware
     2.7 S.u.S.E.
     2.8 LinuxGT
     2.9 KRUD - Kevin's Red Hat Uber Distribution
     2.10 Linux-Mandrake
     2.11 Linux by Libranet
     2.12 Turbo Linux

  3. Submissions To This Document

     3.1 Types of Submissions
     3.2 How to submit
     3.3 Submission Guidelines

  4. Administrivia

     4.1 Terms of Use
     4.2 Acknowledgements


  ______________________________________________________________________

  1.  Introduction

  There is no single distribution of the Linux software. Instead, there
  are many such distributions, available both via anonymous FTP and by
  mail order on CD-ROM.

  The purpose of this document is to provide short summaries of the
  English-language Linux CD-ROM distributions, and to provide pointers
  for the reader to find more information.  A German Distributions HOWTO
  was formerly maintained by Marco Budde but seems to have disappeared.
  We are not aware of any distributions in languages other than English
  and German.

  The information presented here is not complete; there are other Linux
  distributions than are listed here.  By the nature of open source
  software, anyone that changes anything in their Linux installation and
  makes it available to others somehow is `a distribution'. A document
  such as this has to pick somewhere to draw the line.  I have picked
  `available on CD'. This is by no means the definition of a Linux
  distribution.  There are numerous small distributions that offer
  things the big distros don't, not the least of which is smallness
  itself.

  The information presented here is not complete; there are other Linux
  distributions than are listed here. If you are associated with a CD-
  ROM distribution we don't list, please see ``Submissions To This
  Document'' near the end of this document for information on making a
  submission.  It's easy and should take less then five minutes.

  For a more complete list of distributions (albeit with sparser
  information on each) see the Linux HQ Distributions List
  <http://www.linuxhq.com/dist-index.html>.

  Disclaimer: We make absolutely no guarantee as to the correctness of
  the information, prices, and ordering details given in this document.
  Check the last-modified field of each to get an idea of its currency,
  then go to the vendor's web page for up-to-date information.
  Furthermore, unless otherwise stated the Linux software comes with
  ABSOLUTELY NO WARRANTY.

  Your editor tries to stick to facts in most of this HOWTO, but he has
  some opinions on the state of the Linux market.  If you care what they
  are, you can read them under ``Editorial Recommendations''.

  Disclosure: I (esr) have no financial connection to any Linux vendor,
  nor have I accepted any renumeration or perquisites from any vendor
  other than free product for review (and one T-shirt from Red Hat).


  1.1.  New versions of this document

  This document will be posted monthly to the newsgroups
  comp.os.linux.answers . The document is archived on a number of Linux
  FTP sites, including metalab.unc.edu in pub/Linux/docs/HOWTO.

  You can also view the latest version of this HOWTO on the World Wide
  Web via the URL  <http://metalab.unc.edu/mdw/HOWTO/Distribution-
  HOWTO.html>.

  Feel free to mail any questions or comments about this HOWTO to Eric
  S. Raymond, esr@snark.thyrsus.com.  Please do not send me general
  Linux questions or requests for help in choosing a distribution unless
  you're willing to hire me at normal consulting rates; I don't have
  time to deal with them, and I try to put everything I know about
  choosing a distribution in this document.


  1.2.  Recent Changes

  Yggdrasil Plug-And-Play and Craftworks Linux seem no longer to be
  available for sale, and have been dropped.  DOSLINUX has also been
  dropped due to its specialist nature.  KRUD, Linux-Mandrake, and
  LinuxGT have been added.


  1.3.  Overview of the Linux Market

  In the beginning (say, 1993), a Linux distribution was something you
  downloaded off the Internet onto floppies.  Installation was a
  laborious process and repeated frustrations due to bad media were
  common.

  Then came cheap CD-ROM drives and the CD-ROM, a medium ideally suited
  for shipping large volumes of operating-system software cheaply.
  There's a whole mini-industry now built around commercial CD-ROM
  Linuxes, and (because the vendors have actual cash flow to fund
  support and marketing) they increasingly dominate the Linux world.
  Debian is now the only significant non-commercial release, and even it
  seems to be propagated largely by shovelware CD-ROMs.

  Most of the CD-ROM distributions (including Slackware, Yggdrasil and
  Red Hat) are still available for FTP from the home sites of their
  developers.  But if you have a CD-ROM drive and a few dollars, you
  will have many more distributions and more support options to choose
  from (and you'll usually get some useful paper documentation).  For
  more on the details of installation, see the Linux Installation HOWTO,
  <http://metalab.unc.edu/mdw/HOWTO/Installation-HOWTO.html>.

  Prices for CD-ROM distributions of Intel Linuxes start at $20 and top
  out at a whole $50 (and the extra few dollars can buy real value).
  Many vendors sell subscription deals that will lower your cost-per-CD
  for regular updates over the subscription period.

  Price correlates with features and quality pretty well (as one would
  expect in a very competitive market).  Your editor recommends paying
  the few extra dollars for a top-drawer original CD-ROM distribution;
  this will pay off in fewer installation and administration hassles
  down the road.

  Making good choices is much simpler than it used to be.  In 1995-96
  the Linux market underwent a serious shakeout, with a very few
  commercial distributions emerging as leaders while weaker ones
  disappeared or stagnated.  The toll among general-purpose non-
  commercial distributions has been even fiercer; essentially, only
  Debian survives in this role.

  As a result, the three-tier structure of primary distribution
  builders, value-added repackagers, and bottom-feeding CD shovellers
  that used to define the market has nearly collapsed.  To be
  competitive in the third millennium, a Linux outfit (whether
  commercial or noncommercial) has to offer reasonable support and
  behave like a primary distribution builder, whether it's really one or
  not. So as long as you look for a recent freeze date, it is pretty
  hard to get stuck with a dud distribution these days.


  1.4.  Editorial Recommendations

  Last section, the facts.  In this section, my opinions (for whatever
  they're worth -- and remember the caveat about free advice).  There is
  no substitute for doing your own evaluation based on experience and
  the data in this guide, and these are intended more to illuminate my
  possible biases than as a guide to what you should do.

  From the beginnings of the Linux CD-ROM industry in 1993 to Fall 1995,
  Yggdrasil was the king of the hill -- it essentially founded the CD-
  ROM market and then set the standard for everybody else.  I used
  Yggdrasil, and I recommended it over commercial System V versions for
  its superior documentation, large collection of applications, and
  enlightened policy of sending free releases to open-source authors and
  dedicating part of the price of each CD-ROM to financially supporting
  free software.  But Yggdrasil hasn't issued a new release since 1995
  and they've been left behind by the market.

  I now run Red Hat Linux and am quite satisfied with it. They have
  successfully created a de-facto standard in distribution packaging
  with RPM (now also used by SuSE and Mandrake, among others). They've
  made most of the right moves at the right times and I consider them
  the current market leader.

  If you're ideologically wedded to using a non-commercial distribution,
  Debian seems to me to be the clear choice, the only one left with a
  serious support team behind it.

  These opinions should certainly not be interpreted as an unconditional
  endorsement; different Linux distributions are optimized for different
  needs, and yours may well be best served by some other distribution
  (especially if, unlike me, you're mainly a DOS user and are looking
  for a distribution tuned for dual-boot systems and being launched from
  DOS).

  Furthermore, industry standing is volatile.  By the time you read
  this, Red Hat or Debian may well have fallen off their games and been
  displaced by hungrier newcomers.


  2.  Distributions

  All these distributions are available on CD-ROM (some of the non-
  commercial ones only show up on network-archive snapshots).  Most of
  these are available for free over the network (but the commercial ones
  won't support you if you buy this way).  They are custom-assembled,
  rather than just being re-packagings of a pre-existing network
  release.

  They are listed in alphabetical order.


  2.1.  Caldera OpenLinux


     Distributor:
        Caldera, Inc.
        633 South 550 East
        Provo, Utah 84606

        Net: info@caldera.com
        WWW:  <http://www.caldera.com>
        FTP:  <ftp://ftp.caldera.com>
        Vox: (801)-377-7678
        Fax: (801)-377-8752


     Provider's Description:
        Caldera is shipping OpenLinux 1.2 in a three-tiered family of
        products: OpenLinux Lite, OpenLinux Base, and OpenLinux
        Standard.

        OpenLinux Lite is a freely available evaluation of the OpenLinux
        product (it includes a 90-day evalutation of the Caldera
        integrated Desttop--the full licensed version of the desktop is
        included in the Base and Standard products). OpenLinxu Lite can
        be downloaded from Caldera's ftp site, or obtainded on CD for
        the cost of shipping. It is also designed for use by book and
        software publishers to provide a commercially stable Linux
        offering with their books and software products.

        OpenLinux Base contains everything that is in Lite plus it is a
        complete, easy-to-install Linux operating system, with
        integrated Desktop, Internet client and server components, and
        Intranet connectivity. OpenLinux Base includes Netscape
        Navigator and full documentation.

        OpenLinux Standard includes what is in Base plus more high-end,
        name brand, commercial software components (such as Netscape
        FastTrack Web Server, Netscape Navigator Gold Web browser and
        authoring tools, ADABAS D database, StarOffice productivity
        suite, Caldera OpenDOS, and NetWare client and administration
        tools).

        All three tiers of the OpenLinux 1.2 release are currently
        available.

        With Caldera OpenLinux, you can see a whole world of powerful
        new computing, even the power of a UNIX workstation on your PC!
        By using a Linux kernel, OpenLinux gives you speed and stability
        that compare to systems costing thousands of dollars. Open Linux
        also gives you:

       Real multi-tasking runs many text or graphical applications at
        once; no application can cause another to crash, unlike less
        robust systems.

       The Linux 2.0 kernel gives super-fast TCP/IP access to the
        Internet, plus loadable device drivers, for the most efficient
        use of your system resources.

       Easy-to-follow, quick installation with menu-based choices and
        auto-detection of your hardware make installation a snap on most
        systems. The Getting Started Guide (included) provides a step-
        by-step illustrated procedure, with troubleshooting tips.

        No other Linux system includes a complete, integrated desktop
        interface with configuration tools and graphical editor. Its
        powerful drag-and-drop capabilities come pre-configured with
        thousands of icons and application settings. The Desktop
        provides a convenient place where you can store your favorite
        programs and data files for instant access. The Desktop gives
        you:


       Drag-and-drop launching of programs with data files.

       An integrated graphical text editor.

       Easy access to an array of powerful system configuration tools.

       A configurable icon bar, custom layouts, and preference
        settings.

       Powerful file management using drag-and-drop or graphical
        dialogs.


     Ordering:
        By email with PGP key, by phone, by fax, or by conventional
        mail.  Full ordering details are at
        <http://www.caldera.com/mpro/orinfo/orderinfo.html>.


     Support:
        Caldera is one of the only Linux distributers to offer E-mail
        and telephone support. OpenLinux Base (E-mail only) and Standard
        (Telephone and E-mail) users are fully supported (Standard users
        receive 5 free incident calls during the first 30 days). There
        is no technical support for the Lite product.

        OpenLinux Base and Standard ship with full licensed versions of
        the Caldera Desktop, which do not expire. OpenLinux Lite ships
        with a 90-day evaluation version of the Desktop.
     Last Freeze Date:
        May 1998 (?)


     Entry last modified:
        13 August 1998


  2.2.  Debian Linux Distribution


     Distributor:
        Software in the Public Interest, Inc.  PO Box 1326
        Boston, Ma. 02117 USA

        Net: info@debian.org
        WWW:  <http://www.debian.org>
        FTP:  <ftp://ftp.debian.org/debian>


     Provider's Description:
        Debian Linux is the result of a volunteer effort to create a
        high-quality non-commercial Linux distribution.  Debian Linux
        2.0 is a complete and fully-functional Unix-compatible operating
        system for the personal computer.  The system uses ELF
        executables and libc6 (unlikeprevious Debian versions, which
        used libc5).  At present, Debian Linux is available for the IBM
        PC architecture (386/486/Pentium) and m68k, with versions for
        Sparc and Alpha promised for 2.1.  ARM, PPC, and UltraSparc
        ports are underway.

        Debian Linux is an easy-to-upgrade distribution that mostly
        consists of freely redistributable software from a number of
        different sources and systems.  Support for shadow passwords is
        available, although it should be considered experimental in the
        1.1 release.  Non-free packages may also obtained, making Debian
        a well-rounded system.

        The benefits of Debian Linux are its upgradability, well-defined
        dependencies between packages, and its open development.  It is
        the only distribution of Linux that is being developed co-
        operatively by many individuals through the Internet, in the
        same spirit as Linux and other open-source operating systems.
        More than 400 package maintainers are working on over 1500
        packages and improving Debian Linux.  A sophisticated bug
        tracking system allows users to easily report bugs and security
        concerns which are quickly dealt with by the Debian community.
        A new release of the package will soon occur on well-known ftp
        archives.

        Debian Linux is a very dynamic distribution.  Snap-shot releases
        are made about every three months, the ftp archives are updated
        daily.

        For more information about Debian Linux, please refer to the
        files at  <ftp://ftp.debian.org/debian/doc/> or visit our World
        Wide Web page at  <http://www.debian.org/>.  There is also a
        book, "Running Debian GNU/Linux", from O'Reilly & Associates.

        If you're interested in joining this project you are invited to
        subscribe to either debian-user@lists.debian.org or debian-
        devel@lists.debian.org by sending a mail to debian-user-
        request@lists.debian.org (or debian-devel-request respectively)
        with the word "help" in the subject line.


     Internet Access:
        Debian Linux is available via anonymous FTP from
        <ftp://ftp.debian.org/debian/> and on a mirror near to you.


     Last Freeze Date:
        24 July 1998 (2.0)


     Entry last modified:
        13 Aug 1998


  2.3.  Linux Pro


     Distributor:
        WorkGroup Solutions, Inc.
        P.O. Box 460190
        Aurora, CO 80046-0190

        Vox: (303)-699-7470
        Fax: (303)-699-2793
        Net: info@wgs.com (orders)
        FTP:  <ftp://ftp.wgs.com/pub2/wgs>


     Provider's Description:
        The charter of the WGS Linux Pro CD is different from all other
        distributions currently on the market.  We are actively pursuing
        penetration into the commercial marketplace for Linux.
        Everything we do is aimed at increasing the size of the Linux
        community, and helping Linux to become THE one true operating
        system, not just an operating system.

        WGS Linux Pro consists of our Main "Stable" Linux CD, for which
        we select what we consider to be the best Linux distribution
        available.  Then we make bug fixes & minor enhancements.  This
        CD often contains software older than the latest, under the
        theory that "the latest is not always the greatest".  Together
        with this approach we provide technical support as well as
        support agreements.  For this reason WGS Linux Pro is considered
        a primary Linux distribution.  Optionally, and in addition to
        our primary CD, we supply supplemental CDs containing all the
        latest Linux software (including current archives of the tsx-11,
        metalab, and Red Hat sites).  Virtually anything you will get
        with anyone's Linux product can be found on these supplemental
        CDs.  We continually add more to these supplemental CDs as
        software becomes available.  Even with all this, pricing on our
        product line is very favorable when correctly compared to other
        Linux distributions.  Also optional (included with Linux Pro+)
        is a professionally produced and printed manual containing the
        Linux documentation project and more!

        Current version is 4.0a; kernel is 1.2.13 with installable 2.0.x
        on the CD.


     Internet Access:
        Look in  <http://www.wgs.com> for a list of WGS products, and
        latest information on the CD-ROM.


     Ordering:
        WGS Linux Pro is available on CD from dealers and distributors
        worldwide, and soon from our FTP site.
        You may call, fax, email, or mail us, to purchase, or request
        additional information.  We will be happy to respond to any
        question you have.  We accept American Express, Visa, Discover,
        and MasterCard, or purchase orders with approval of credit.


     Miscellaneous:
        Complete information is available on our FTP site.

        WGS publishes a free E-Mail newsletter on Linux and FlagShip to
        which you may subscribe by just emailing us your request.

        In addition we carry Motif, FlagShip, A line of books, and other
        products to make your experience with Linux more complete and
        fulfilling.  Check us out!


     Last Freeze Date:
        1 October 1996.


     Entry last modified:
        13 March 1997


     Editor's comment:
        They describe their current distribution as "Red Hat 3.03 plus".


  2.4.  Red Hat Linux


     Distributor:
        Red Hat Software
        3201 Yorktown Rd, Suite 123 DeKalb Center
        Durham, NC 27713

        Vox: (800) 546-7274 or (919) 572-6500
        Fax: (919) 572-6726
        Net: redhat@redhat.com
        WWW:  <http://www.redhat.com>
        FTP:  <ftp://ftp.redhat.com>


     Provider's Description:
        Red Hat 6.1 is based on the 2.2 kernel and is available for
        Intel, Sparc and Alpha platforms.

        Four installation innovations make Red Hat the easiest Linux to
        install ever.  Our graphical installation mode brings you
        straight up into X for most of the installation.  Our boot disk
        creation script eases selection of the proper boot disk, and it
        saves your existing network configuration information and
        XF86Config so you don't have to configure TCP/IP or X!  Our FTP
        install allows you to install simply by downloading 3 floppy
        disk images -- the rest is done automatically!  And finally, the
        installation includes seamless support for PCMCIA devices --
        install Red Hat on your laptop as easily as on your desktop
        machine!

        After installing Red Hat Linux once, you will never need to
        reinstall Linux again!  The new RPM packaging system is
        sophisticated enough to allow upgrading to new Red Hat releases
        without reinstalling your system - no partitioning, no backing
        up all your files, no headaches.

     Ordering:
        Available directly from Red Hat Software and most distributors
        of Linux related products.  Please contact Red Hat Software for
        ordering details (on-line ordering is available through Red
        Hat's Web).  Suggested retail price for the Standard version is
        $29.95; for the Professional (server) version $149.95; for the
        Deluxe version $79.95.


     Last Freeze Date:
        Unknown.


     Entry last modified:
        1 Nov 1999.


     Editor's Comments:
        The big selling point of this distribution is RPM, the Red Hat
        Package Manager.  This piece of software is a remarkable
        advance; it allows you to cleanly install and de-install
        applications and operating-system components, including the
        kernel and OS base itself.  RPM is now used as well by
        essentially all other distributions except Debian.


  2.5.  Trans-Ameritech Linuxware


     Distributor:
        Trans-Ameritech
        2342A Walsh Avenue
        Santa Clara, CA 95051

        Net: info@trans-am.com
        WWW: http://www.trans-am.com
        Vox: (408)-727-3883
        Fax: (408)-727-3882
        BBS: (408)-980-9840


     Provider's Description:
        Trans-Ameritech has published 10 releases of Linux by early
        1997.  Traditionally, Trans-Ameritech has set new standards for
        combining ease of use and straightforward installation, even for
        a first-time user, with its line of LinuxWare CD-ROMs.  This is
        a flexible, easy-to-install operating system geared toward those
        interested in learning Unix as well as technical people,
        students and home PC users.


       New Linux users will appreciate a Windows-based set up program
        from the CD.

       To minimize the possibility of hardware conflicts many extra
        kernels are provided for different configurations. They are
        usable for installation and normal operation.

       Many on-line documents are provided for quick reference,
        including the Linux Documentation Project files in source, dvi
        and ps formats.

        Many applications are included:



       MS-Windows based X configuration program

       C/C++,Pascal and Ada compilers as well as converters fron
        Fortran

       TCP/IP networking, UUCP,SLIP,CSLIP,PPP

       Internet access with binaries and sources for FTP,Telnet,News
        and E-mail

       Multiple terminals and X-Windows environment

       Gnu and international versions of the ispell spell-cheker

       The communications apps:term,minicom,Seyon (X-Windows based)

       Editors:elvis(vi clone),joe,jove,Emacs

       PostScript clone ghostscript

       Object oriented GNU Smalltalk and the Smalltalk interface to X

       TCL/Tk (Powerful scripting language with Motif-like X interface)

       Programs for electrical engineers and ham enthusiasts

       Interviews libraries,include files and doc Word-processor and
        idraw drawing program

       Typesetting:TeX,LaTeX,xdvi,dvips,Metafont,groff

       Andrew multimedia word prodessor with hyperlinks

       FAX send and receive on either class 1 or class 2 fax modems

       DOOM for game enthusiasts

        All the sources are available on the CD-ROM. The often needed
        sources are uncompressed and can be used directly from the CD-
        ROM.

        An uncompressed Linux filesystem is available for references and
        disk space conversaion. You can run programs directly from the
        CD-ROM! There is a large info directory for on-line reference
        and many manpages.

        For hacker's reference, uncompressed FreeBSD and netBSD sources
        are provided.

        Our distribution is targeted for Windows and DOS users who want
        an easy migration path upwards, rather than for UNIX experts.


     Ordering:
        Email orders are taken at order@trans-am.com

        The price for our current release of LinuxWare 2.5 is $19.95

        The price for a package order: LinuxWare 2.5,Supplement 5 and
        Supplement 4 (Ultimate LinuxWare Bundle) in one shipment is $30

        If you order with a credit card (VISA, MC, AmEx, Discovery),
        please, indicate the card number, expiration date and your
        mailing address.

        Shipping and handling in US: single CD-ROM or Ultimate LinuxWare
        Bundle is $5(first class US mail).

        Overseas shipping is $8 for single CD-ROM , $12 for the bundle.

        COD is available in the US only for $4.50.  California
        residents, please add 7.75% sales tax.

        Annual subscription (4 releases) is available for $80 plus S&H
        (note: there are 4 shipments in a subscription).  Example:
        subscription in US is:$80+$5x4=$100.  Subscription in
        Europe/Japan etc. $80 + $8x4 = $112.


     Miscellaneous:
        If you have any further questions,please contact us through E-
        mail: info@trans-am.com or order@trans-am.com.


     Last Freeze Date:
        January 1997 (Supplement 5)


     Entry last modified:
        13 August 1998


  2.6.  Slackware


     Distributor:
        Walnut Creek CDROM
        4041 Pike Lane, Suite D
        Concord, CA  94520

        Net: info@cdrom.com (information), order@cdrom.com (orders),
        support@cdrom.com (support).


     Provider's Description:
        Ftp.cdrom.com is the home of Slackware Linux.  We are the
        publishers of the Official Slackware Linux CDROM.  Our
        distribution is a 4-disc set with the current version being
        Slackware 96.  The current disc is based on the 2.0.34 kernel.

        Slackware Linux is a full featured distribution of the Linux
        operating system designed for 386/486 computers with a 3.5"
        floppy and CD-ROM drive.


     Internet Access:
        WWW:  <http://www.cdrom.com/titles/os/slack96.htm>
        FTP:  <ftp:ftp.cdrom.com/pub/linux/slackware>


     Ordering:
        The cost of the CD-ROM set from Walnut Creek is $39.95.


     Last Freeze Date:
        July 1998 (3.5)


     Entry last modified:
        13 August 1998.


  2.7.  S.u.S.E.


     Distributor:
        S.u.S.E., Inc.
        458 Santa Clara Ave
        Oakland CA 94610 USA

        Net: info@suse.com
        WWW:  <http://www.suse.com>
        FTP:  <ftp://ftp.suse.com>
        Vox: +1-510-835-7873 Fax: +1-510-835-7875 fax


     Provider's Description:
        S.u.S.E. Linux offers users of all levels, from novice to
        expert, quick and easy entry into world of Linux and Unix.
        Resources such as a menu-driven installation from CD-ROM, a
        modular boot diskette, 400-page reference book and S.u.S.E.'s
        own system administration tool, YaST allow one to quickly get
        Linux installed and running, and to keep it running smoothly.

        Furthermore, S.u.S.E. offers a series of supported X servers,
        which support the newest graphics cards. These servers are
        created in cooperation with the XFree86 (tm) development team.
        See the following URL for more details:
        <http://www.suse.de/XSuSE>.

        New in S.u.S.E. Linux 5.3:


       Kernel 2.0.35

       KDE 1.0

       GIMP 1.0

       SaX (SuSE advanced XF86 configuration tool)

        Quick overview of other features:


       The Linux OS, over 875 software packages, including complete
        sources and live file system on 4 CD-ROMs

       400 page reference book

       Packages in RPM format; TGZ packages installable

       System V compatible boot concept, compliance with file system
        standard

       Installation and administration utility 'YaST' configures
        network, ISDN, e-mail, printer, X Window System

       S.u.S.E. X servers which support new graphics cards

       Administration of file systems, users, groups

       Automatic configuration of several window managers

       Online help system and documentation

       Demo mode, either directly from CD-ROM, or on DOS partition


     Ordering:
        You can download from  <ftp://ftp.suse.com/pub/SuSE-Linux>.  For
        the CD-ROM with support, order vphone, secure WWW order form,
        fax, or post.  Price is $49.95, or $34.95 per edition by
        subscription. Use order code LSUE520 for the English version,
        LSUD520.

        Also available: OSF Motif 2.1 for $129.95 (price for update to
        be determined; order code: LMEA210


     Support:
        60 days of free installation support are included with each
        purchase of S.u.S.E. Linux. See the web page for contact info
        and conditions.


     Last Freeze Date:
        Unknown.


     Entry last modified:
        13 Aug 1998 (5.3)


  2.8.  LinuxGT


     Distributor:
        Grey Technology
        PMB 205
        2479 Murphreesboro Rd.
        Nashville, TN 37217

        Net: rick@greysite.com (orders)
        WWW:  <http://www.greysite.com>
        FTP:  <ftp://metalab.unc.edu/pub/Linux/distributions/linuxGT>


     Provider's Description:
        LinuxGT is based in the Linux 2.2 kernel, available for Intel
        only at this point, a PPC and SPARC are on the way! With a
        simple, to the point installation, we believe it is the easiest
        to get running server solutions available today! Creating a boot
        disk is a simple click of a button (from Windows), or running a
        simple script (DOS/Linux). Other installation methods are via
        ftp, http, NFS, or from your existing hard disk partition.  By
        following the steps in the QuickStart Guide, you can't go wrong,
        most people won't NEED the Guide if they have ANY familiarity
        with Linux.  Further product information can be found at our
        website (http://www.greysite.com) or via e-mail.


     Ordering:
        Available through Grey Technologies, GT Partners, and
        Distribution Vendors.  Please contact Grey Technology for
        ordering details (on-line ordering is available through
        GreySite.Com). Suggested retail price is for the Intel Server
        version is $dollar;24.95. Other platforms will be priced at time
        of availability.


     Miscellaneous:
        Technical support is available via telephone, e-mail, chatroom,
        or online Web Forum.

     Last Freeze Date:
        24 Jun 1999


     Entry last modified:
        24 Jun 1999


  2.9.  KRUD - Kevin's Red Hat Uber Distribution


     Distributor:
        tummy.com, ltd.
        5400 Fossil Court North
        Fort Collins CO 80525

        Vox: (970) 223-8215 Net: krud@tummy.com Web:
        <http://www.tummy.com/>



     Provider's Description:
        The current Red Hat distribution with full errata available by
        subscription or as a single CD. Also included are a variety of
        useful packages for Linux, including a several security-related
        packages such as ssh and isinglass.  Requires standard Red Hat
        compatible Hardware.  Currently, KRUD is not for export because
        it contains crypto software.


     Internet Access:
        Available on CD-ROM only because of export restrictions.


     Ordering:
        (online)
        (by mail)
        $3/US each
        $36/US 12 issue subscription (monthy update)
        Visa/Mastercard/Discover/Amex credit cards accepted.
        University and large business purchase orders, Postal money
        orders are also accepted.


     Support:
        Support is available on an hourly or contract basis from
        tummy.com, ltd. Rates start at $120/hour.


     Miscellaneous:
        KRUD helps you keep up with the flood of errata and package
        upgrades by offering a monthly CD-ROM subscription delivered to
        you at a reasonable price.


  2.10.  Linux-Mandrake


     Distributor:
        MandrakeSoft
        Daniel Morales - MandrakeSoft 818.834.9860
        Caroline Carmagnol - Aliz Public Relations 650.323.1607
        mandrake@linux-mandrake.com


        Net: mandrake@linux-mandrake.com (orders)
        WWW:  <http://www.linux-mandrake.com>
        Vox: 818.834.9860


     Provider's Description:
        Linux-Mandrake is inspired by Red Hat(tm) Linux, with many
        improvements and pre-configured applications which make it
        easier to use for beginners, and faster for everyone.

        Linux-Mandrake is available both in GPL Edition and in the
        PowerPack Edition which includes 5 CDs and commercials
        applications. The GPL Edition CD (base system and applications)
        is freely available from Internet as an iso image.

        Linux-Mandrake 6.0 won two LinuxWorld Editors' Choice Awards and
        was a runner up at LinuxWorld Expo, San Jose, CA in August 1999:


        1. Best Linux Product of the Year.

        2. Best Distribution/Server.

        3. finalist for Best Distribution/Client.

        Mandrake 6.1 (Helios) features:


        1. Linux-Kernel: 2.2.13 (pre4)

        2. XFree86: 3.3.5

        3. Glibc: 2.1.1

        4. RPM: 3.0.3

        5. Bash: 2.03

        6. KDE: 1.1.2 (with Mandrake customization)

        7. Gnome: built from 1.0.4->1.0.14 versions (with Mandrake
           customization)

        8. Enlightenment 0.16-dev5, Windowmaker 0.60, AfterStep 1.7.111,
           XFCE 3.0.2, IceWM 0.9.48

        and many applications such as Apache, MySQL etc.

        In Mandrake, packages have been compiled with CPU optimizations
        for pentium-class (intel, amd, cyrix, winchip...) and higher
        processors resulting in speed improvements up to 30%.


     Internel Access:
        <http://www.linux-mandrake.com/en/ftp.php3>


     Ordering:
        Free download available from Internet.  The Linux-Mandrake
        PowerPack price is typically  between $45 and $50.  Payment
        method  depends on the distributor.  Distributor lists available
        at: <http://www.linux-mandrake.com/en/fsinglecd.php3>.


     Support:
        The PowerPack is provided with 100 days of support by email.

        Several specialized mailling-lists and a USENET newsgroup
        (alt.os.linux.mandrake) are available for support between users.

        Bynari Systems Group and LinuxCare also provide complete support
        for Mandrake.


     Last Freeze Date:
        Sep 17, 1999 for Mandrake 6.1 (Helios).  Update frequency: about
        4 months.


     Entry last modified:
        18 September 1999


  2.11.  Linux by Libranet


     Distributor:
        Libra Computer Systems Ltd.
        1860 Langworthy Street
        North Vancouver, BC
        V7K 1N8

        Net: sales@libranet.com (orders)
        Net: support@libranet.com (support)
        Net: faq@libranet.com (faq)
        WWW:  <http://www.libranet.com>


     Provider's Description:
        Based on the Debian distribution, it allows users to start with
        an already configured desktop complete with the most commonly
        used applications. The simple installation gets the system up
        and running easily. This is a major benefit to those new to
        Linux and a great time-saver for the experienced.


     Ordering:
        Available on CD for intel i386 and higher compatibles.  Order
        via the web at http://www.libranet.com or fax/mail order One
        year free support via email and fax.


     Miscellaneous:
        The Linux by Libranet Desktop brings Debian, traditionally the
        choice of developers, to the desktop user.


     Last Freeze Date:
        Updated CD about every 4 months.


     Entry last modified:
        1 November 1999


  2.12.  Turbo Linux


     TurboLinux, Inc.
     2000 Sierra Point Parkway
     Suite 401
     Brisbane, CA 94005

     Net: info@turbolinux.com (orders)
     WWW:  <http://www.turbolinux.com>
     FTP:  <ftp://ftp.turbolinux.com/>
     Vox: (650)-244-7777 Fax: 650-244-7766


     Provider's Description:
        TurboLinux makes a suite of high-performance Linux products for
        the workstation and server markets. Our products are available
        from our Web site, at more than 3,000 retail stores in North
        America and from our value-added reseller partners around the
        world. Our products:


        Workstation 6.0
           TurboLinux Workstation 6.0 is your high-performance choice
           for Linux on the desktop.  The powerful office productivity
           suite StarOffice gives you full Microsoft Office
           compatibility and Netscape gets you quickly online for e-mail
           and Web surfing.


        Server 6.0
           TurboLinux Server 6.0, completely re-engineered as a secure,
           high-performance backend server for business workgroups in
           the enterprise, now includes robust e-commerce software for
           business-to-business transactions.


        TurboCluster Server 4.0
           Build affordable, scalable and available server clusters (25+
           cluster nodes!) with TurboCluster Server 4.0, voted Best Web
           Solution by the editors of Linux Journal.  TurboCluster
           Server, also named Corporate IT Best Product winner for
           enterprise-class customers at the IT 2000 Sydney computer
           show, integrates seamlessly into your existing IT environment
           to cluster Solaris and Windows NT server nodes as well as
           Linux..


        enFuzion 6.0>
           Turn your existing network into a supercomputer! Based on a
           simple but powerful concept called parametric execution,
           enFuzion turns your existing computer network into a high
           speed, fault tolerant, highly available supercomputer."

     Ordering:
        See  <http://www.turbolinux.com/products/> TurboLinux is also
        offered in retail stores and many online stores.


     Last Freeze Date:
        Workstation 6.0 - January 3.
        Server 6.0 - January 3.
        TurboCluster Server - October 4.

        Estimated update frequency can vary from 2 weeks to 3 months
        depending on the product.


     Entry last modified:
        22 Mar 2000.



  3.  Submissions To This Document

  I encourage anyone and everyone who maintains a Linux distribution or
  mail order service, to submit information on their service to this
  HOWTO. It's easy and fun, and it's free advertising. This document is
  posted to many places and is archived (see the next section).


  3.1.  Types of Submissions

  We are interested in submissions for:


    Complete distributions of Linux software available on CD-ROM.  (We
     no longer carry FTP-only distributions, as this document is aimed
     primarily at new users for which they are not appropriate.)  By
     `complete distribution' we mean any set of software which can be
     used to build a complete Linux system from scratch.

    Layered products or individual software packages available only via
     mail order. If your software package is available via anonymous
     FTP, chances are people can find it. Software products only
     available via mail-order include commercial things such as Motif,
     and any other commercial software ported to Linux.

    Any other Linux-specific goods available via mail order, such as
     Linux-specific books and documentation, T-shirts, and assorted
     paraphrenalia.   Note: our interest in the latter categories is
     marginal -- this is a Linux Distributions HOWTO, not a catalogue of
     cutesy Linux junk.  Whatever you're selling will have to be (a)
     very useful, (b) very original, or (c) very funny, to get listed
     here.

  If the number of submissions for services and layered products is
  large, I'll create a separate HOWTO for these items.


  3.2.  How to submit

  To submit an entry to this HOWTO, please send mail to
  esr@snark.thyrsus.com with the following information. This format is
  not machine-parsable; any of the fields may be any length that you
  wish, but I'd like to keep each entry down to, say, 50 lines.


     Name:
        Name of service or distribution


     Distributor:
        Name of company, person, etc. who distributes/maintains the
        service or distribution.  Should include mail, email, phone
        contact information, and (if possible) a WWW reference.


     Provider's Description:
        Description of the distribution or service that you provide. If
        this is a software distribution, please include information such
        as what software is included, versions, general overview of
        installation, requirements, and so on.


     Internet Access:
        Where your service or distribution is available over the
        Internet; typically a WWW or FTP address.

     Ordering:
        How to order your distribution or service, if applicable.
        Include prices, shipping information, methods of payment, etc.


     Support:
        Information on support terms and support contracts.


     Miscellaneous:
        Anything else that you find relevant.


     Last Freeze Date:
        Last freeze date of the current version(s).  Also, your
        estimated update frequency.


  3.3.  Submission Guidelines

  Please keep your entry as short as possible. If you need to include
  extensive information, please make a reference to where one can FTP or
  mail to get more information on your distribution; these entries are
  only meant to be pointers to where one can find information on your
  service or distribution.

  If you provide more than one service or distribution, please use
  separate entries for each.

  I may edit your entries for conciseness and brevity, if I find any
  irrelevant information, or if the entry is overly verbose.  Otherwise
  the content should remain the same.

  When making submissions to the Distribution-HOWTO, you grant implicit
  permission for me to use the entries in other materials, such as books
  from the LDP, and other online documents. For example, information
  from the Distribution-HOWTO may be included in a published Linux book.
  If you do not want me to include your entry in materials other than
  the Distribution-HOWTO, please say so.


  4.  Administrivia


  4.1.  Terms of Use

  This document is copyright 1997 by Eric S. Raymond. You may use,
  disseminate, and reproduce it freely, provided you:


    Do not omit or alter this copyright notice.

    Do not omit or alter or omit the version number and date.

    Do not omit or alter the document's pointer to the current WWW
     version.

    Clearly mark any consdensed, altered or versions as such.

  These restrictions are intended to protect potential readers from
  stale or mangled versions.  If you think you have a good case for an
  exception, ask me.



  4.2.  Acknowledgements

  This document was originated by Bill Riemers.  Matt Welsh maintained
  the second version.  Erik Troan then maintained the document to
  release 3.0.

  In January 1995, Eric Raymond, while unaware of the existence of this
  document, began to develop a similar FAQ in the format of his now-
  discontinued "PC-clone UNIX Software Buyer's Guide", which had covered
  mainly System V UNIXes and BSD/OS.

  In March 1995, Eric approached Erik about cooperating on a merged
  version.  In early April 1995, Erik went to work for Red Hat Software,
  and (wishing to avoid a conflict of interest) handed the document to
  Eric.  Eric merged in a lot of new information and added several new
  fields to the distribution entries.

  Accordingly, this document has been a sort of serial collaboration.
  The editorial `we' generally tags observations by all the maintainers;
  `I' is Eric (the current one) speaking.

  We are delighted to acknowledge the contributions of all the Linux
  users and Internet hackers who have contributed information and
  feedback.



  Linux Ecology HOWTO
  Werner Heuser < wehe@snafu.de > Wade W. Hampton <whamp-
  ton@staffnet.com>
  v0.6, 01 March 2000

  The Ecology-HOWTO discusses ways Linux computers can be used as a mean
  to protect our environment, by using its features to save power or
  paper. Since it does not require big hardware, Linux may be used with
  old computers to make their life cycle longer. Games may be used in
  environmental education and software is available to simulate ecologi-
  cal processes.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Objectives
     1.2 Caveats
     1.3 About the Document and the Authors

  2. Reduction of Power Consumption

     2.1 Advanced Power Management (APM/ACPI)
        2.1.1 Linux Compatibility Check
        2.1.2 Introduction
        2.1.3 Caveats
        2.1.4 Troubleshooting
        2.1.5 ACPI
     2.2 Turn Monitor off, use Keyboard LEDs
     2.3 Screensavers
     2.4 Energy Star Label
     2.5 Miscellaneous Power Saving Techniques

  3. Alternative Power Supplies - Sun, Wind, Water

  4. Noise Reduction

     4.1 Fan
     4.2 Harddisk
     4.3 Speakers

  5. Saving Consumables (Paper, Ink, etc.)

     5.1 Printing of Drafts / Multiple Pages on One Sheet of Paper
     5.2 Reading From the Monitor Instead From Paper
     5.3 Other Techniques

  6. Recycling of Consumables (Paper, Printer Cartrigdes, CD, Floppies, Tapes)

  7. Reduction of Radiation, Electro Magnetic Fields, Heat

  8. Extending the Life Cycle of your Hardware

     8.1 Recycling of Hardware
        8.1.1 Supported CPU Families
        8.1.2 Dealing with Limited Resources or Tuning the System
           8.1.2.1 Related HOWTOs
           8.1.2.2 Introduction
           8.1.2.3 Small Space
              8.1.2.3.1 Introduction
              8.1.2.3.2 Techniques
           8.1.2.4 Harddisk Speed
           8.1.2.5 Small Memory
              8.1.2.5.1 Related HOWTOs
              8.1.2.5.2 Techniques
           8.1.2.6 Low CPU Speed
           8.1.2.7 Tiny Applications and Distributions
     8.2 Other Techniques
     8.3 Other Operating Systems

  9. X10 - Home Automation System

  10. Uninterruptable Power Supply - UPS

  11. Games

  12. Ecology Software (Simulation, Datacollection, Statistics, etc.)

     12.1 Ecolab
     12.2 OpenClassroom
     12.3 Tierra
     12.4 Linux in Environmental Research
     12.5 SWARM
     12.6 Climate-Dynamics
     12.7 UNCERT
     12.8 EcoTopia

  13. Related Projects, Mailing Lists and Newsgroups

  14. Credits

  15. Revision History

  16. Copyright and Disclaimer

  17. Appendix A - Linux with Laptops

     17.1 Battery
     17.2 PCMCIA Card Services and Advanced Power Management
     17.3 Power Saving Techniques

  18. Appendix B - MP3-Hardware-Decoder at Parallel Port

  19. Appendix C - Bibliography

  20. Appendix D - Recommendations for Buying a New Computer

  21. Appendix E - A New Environmentally Friendly Hardware Design

  22. Appendix F - Computer Related Eco Labels

  23. Appendix G - Other Operating Systems

     23.1 DOS
     23.2 MS-Windows

  24. Appendix H - URLs of Recylers



  ______________________________________________________________________


  1.  Introduction

  Life is the first gift, love is the second, and understanding is the
  third. -- Marge Piercy <http://www.capecod.net/~tmpiercy/>


  Though computers can be seen as part of environmental pollution, there
  are also ways to use computers in a more reasonable manner to help
  protect the environment. So I have just started to collect some means
  to do so with Linux.


  1.1.  Objectives

  Some objectives of the howto:


  o  Reduction in power consumption.

  o  Reduction in consumables like paper and inks.

  o  Reduction in waste by reusing older components or keeping them in
     service longer.
  o  Reduction in toxic waste such as used batteries.

  o  Use of Linux in environmental education and research.


  1.2.  Caveats

  Some of the recommendations in this text are discussed controversial,
  for instance: powering down a device, when it's not in use. This may
  save power, but not under all circumstances. Also it may have other
  additional ecological costs, e.g. the life time of the device can be
  shortened.

  I don't have enough technological knowledge to make a decision between
  these alternatives. Also some alternatives might be rated differently
  by different persons. So finally the decision what to choose is up to
  you. Anyway if you have better alternatives please let me know.


  1.3.  About the Document and the Authors

  If I didn't provide an URL for a program or a package, you may get it
  from Debian <http://www.debian.org> or as a RPM package, from your
  favorite RPM server, for instance Rufus
  <http://rufus.w3.org/linux/RPM/ByName.html>.

  Some parts are modified chapters from my Laptop-HOWTO and my
  IR-(InfraRed)-HOWTO <http://home.snafu.de/wehe/howtos.html>.

  The document is included in the LINUX DOCUMENTATION PROJECT
  <http://linuxdoc.org/>.

  The latest version of this document is available at Ecology and
  Computers <http://home.snafu.de/wehe/eco_linux.html> .

  Since Wade W. Hampton provided a great amount of information included
  into this text I consider him as a co-author. Though all
  responsibility for any mistakes is taken by me.

  Jun Morimoto <morimoto@xantia.citroen.org> has written the translation
  into Japanese <http://www.linux.or.jp/JF/JFdocs/Ecology-HOWTO.html>.

  Please feel free to contact me for comments or questions about the
  HOWTO. I know this material is not finished or perfect, but I hope you
  find it useful anyway.

  Werner Heuser <wehe@snafu.de>


  2.  Reduction of Power Consumption

  There are some means to save power when using a computer which are
  supported by Linux: Advanced Power Management, certain harddisk
  settings, working without monitor and others.


  2.1.  Advanced Power Management (APM/ACPI)


  2.1.1.  Linux Compatibility Check

  From the Battery-Powered-mini-HOWTO " .. for APM to work on any
  notebook or energy-conscious desktop, the system BIOS ROM in the
  machine must support the APM standard. Furthermore, for APM to work
  with the Linux operating system, the system BIOS ROM must support
  either the 1.0 or 1.1 version of the APM standard, and it must also
  support 32-bit protected mode connections. A system that supports APM
  1.1 is preferred, as it provides more features that the device driver
  and supporting utilities can take advantage of."

  You may get information about the APM version with the dmesg command
  and in the /proc/apm file.


  2.1.2.  Introduction

  When you first install Linux, you will probably have to recompile the
  kernel. The kernel that came with your distribution probably does not
  have APM enabled.

  APM support consists of two parts: kernel support and user-land
  support.

  For kernel support, enable the parameters in the corresponding kernel
  section. AFAIK not all features work with laptops. AFAIK the feature
  CONFIG_APM_POWER_OFF works with most laptops.

  The utilities for userland support may be found at WorldVisions
  <http://www.worldvisions.ca/~apenwarr/apmd/>. APMD is a set of
  programs that control the Advanced Power Management system found in
  most modern laptop computers. If you run a 2.2.x kernel and want to
  experiment, Gabor Kuti <seasons@falcon.sch.bme.hu> has made a kernel
  patch that allows you to hibernate any Linux system to disk, even if
  your computers APM BIOS doesn't support it directly.

  Richard Gooch wrote: I'have had a look at the beta version of apmd,
  and I still don't like it, because:


  o  Only supports one command to run at suspend time.

  o  Doesn't distinguish between user and system suspends.

  o  doesn't provide a way to disable policy (the sync(); sleep(0) ;
     sync(); sleep(1); sequence)

  o  Does not document extra features.

  o  And I'm not sure that what we want is a single super daemon. A
     collection of smaller daemons might be better, since it allows
     people to pick and choose. A super daemon is bloat for those who
     only want one small feature.

  Though this topic was discussed controversly Richard Gooch has put
  together a package suspendd at http://www.atnf.csiro.au/~rgooch/linux/
  <http://www.atnf.csiro.au/~rgooch/linux/> .

  Also, have a look at apmcd (apm based crontab) at
  ftp://ftp.binary9.net/pub/linux/ <ftp://ftp.binary9.net/pub/linux/> .
  A tool made by Nicolas J. Leon <nicholas@binary9.net>
  http://mrnick.binary9.net/ <http://mrnick.binary9.net/>.

  Note: I didn't check wether this features are merged into one package
  (apmd eventually) already.


  2.1.3.  Caveats

  If you have another operating system preinstalled or use another
  operating system at the same disk, make sure there is no "hibernation"
  or "suspend" tool installed, which could severely interfere with
  Linux, e.g. it might use disk space which is occupied by Linux or vice
  versa.


  2.1.4.  Troubleshooting

  If your machine worked with 2.0.x kernels but not with the 2.2.x
  series, take this advice from Klaus Franken kfr@klaus.franken.de :
  "The default changed in 2.2. Search in the init-scripts for halt and
  change it to halt -p or poweroff. See man halt , if you don't have
  this option you need a newer version of halt." You may find it in the
  SysVinit package.

  Sometimes X windows and APM don't work smoothly together, the machine
  might even hang. A recommendation from Steve Rader: Some Linux systems
  have their X server hang when doing apm -s. Folks with this affliction
  might want switch to the console virtual terminal then suspend chvt 1;
  apm -s as root, or, more appropiately.sudo chvt 1; sudo apm -s. I have
  these commands in a script, say, my-suspend and then do xapmload
  --click-command my-suspend .

  On some new machines (for instance HP Omnibook 4150 - 366 MHz model)
  when accessing /proc/apm, you may get a kernel fault general
  protection fault: f000. Stephen Rothwell
  <Stephen.Rothwell@canb.auug.org.au> http://www.canb.auug.org.au/~sfr/
  <http://www.canb.auug.org.au/~sfr/> explaines: "This is your APM BIOS
  attempting to use a real mode segment while in protected mode, i.e. it
  is a bug in your BIOS. .. We have seen a few of these recently, except
  all the others are in the power off code in the BIOS wher we can work
  around it by returning to real mode before attempting to power off.
  Here we cannot do this."


  2.1.5.  ACPI

  The latest standard is ACPI. The ACPI4Linux project has started at the
  beginning of 1999. The ACPI4Linux project is a kernel driver project
  aimed at implementing full ACPI support for Linux, including fan
  control, dock/undock detection and a WindowMaker dockable temperature
  meter. You may reach it at http://phobos.fachschaften.tu-
  muenchen.de/acpi/ <http://phobos.fachschaften.tu-muenchen.de/acpi/> .


  1. hdparm
     <ftp://tsx-11.mit.edu/pub/linux/sources/sbin/hdparm-3.0.tar.gz>
     hdparm is a Linux IDE disk utility that lets you set spin-down
     timeouts and other disk parameters. It works also for some SCSI
     features.

  2. Mobile Update Daemon
     <http://www.complang.tuwien.ac.at/ulrich/linux/tips.html> This is a
     drop-in replacement for the standard update daemon, mobile-update
     minimizes disk spin ups and reduces disk uptime. It flushes buffers
     only when other disk activity is present. To ensure a consistent
     file system call sync manually. Otherwise files may be lost on
     power failure. mobile-update does not use APM. So it works also on
     older systems.

  3. Toshiba Linux Utilities
     <http://www2.prestel.co.uk/hex/toshiba.html> This is a set of Linux
     utilities for controlling the fan, supervisor passwords, and hot
     key functions of Toshiba Pentium notebooks. There is a KDE package
     Klibreta, too.

  4. LCDproc <http://lcdproc.omnipotent.net/> . "LCDproc is a small
     piece of software that will enable your Linux box to display live
     system information on a 20x4 line backlit LCD display. AFAIK it
     connects only to the external Matrix-Orbital 20x4 LCD display
     Matrix-Orbital <http://www.matrix-orbital.com/>, which is a LCD
     display connected to a serial port.

  5. Dial Daemon <http://www.loonie.net/~eschenk/diald.html> . The Diald
     daemon provides on demand Internet connectivity using the SLIP or
     PPP protocols. Diald can automatically dial in to a remote host
     when needed or bring down dial-up connections that are inactive.


  2.2.  Turn Monitor off, use Keyboard LEDs

  There are some tools which allow to get information from your computer
  without using the monitor:


  o  bl : Blink Keyboard LEDs

  o  blinkd : "Blinks keyboard LEDs for an answering machine or fax
     machine. Blinkd is a client/server pair, that lets the keyboard
     LEDs blink, indicating things like the number of incoming voice
     calls in the voice box or incoming faxes in the spool."

  o  mailleds : Shows new mails with the keyboard LEDs, mailleds is a
     quiet, unobtrusive way to signify that you have  new mail: a user
     daemon to blink LEDs when there is new mail.

  o  tleds : Blinks keyboard LEDs indicating TX and RX network packets.
     They blink Scroll-Lock LED when a network packet leaves the
     machine, and Num-Lock LED when one is received.


  2.3.  Screensavers

  Do they only prevent the screen from being burned in or do they save
  power, too?

  Some recommendations from Wade W. Hampton:

  Screensavers usually display graphics, look for ETI, or perform other
  tasks.  When using your screensaver in this manner, you may actually
  consume MORE power. For example a computer using XSETI as a
  screensaver might get far warmer (hence use more power) than when it
  was being used to edit a document or perform a compile.

  To really save power, and if your X server plus monitor supports it,
  use the dpms option of xset (see the manual page for xset). For
  example, to enable the DPMS (Energy Star) features of you X server:
  xset +dpms

  You may also manually change the mode of your X display:

  ______________________________________________________________________
  xset dpms force standby
  xset dpms force suspend
  xset dpms force off
  ______________________________________________________________________



  AFAIK a CRT consumes on the order of 25 percent more power when
  displaying a plain white screen than displaying a plain black screen.
  So, a screensaver that's mostly black can help save power, even if it
  doesn't actually use DPMS to power down the screen. Of course, one
  that's very bright and colourful, or that keeps the CPU running fast
  is not much help.


  Some screen saver programs:


  o  The purpose of xscreensaver is to display pretty pictures on your
     screen when it is not in use, in keeping with the philosophy that
     unattended monitors should always be doing something interesting,
     just like they do in the movies. The benefit that this program has
     over the combination of the xlock and  xautolock programs is the
     ease with which new graphics hacks can be  installed: you don't
     need to recompile this program to add a new display mode, you just
     change some resource settings. Any program which can be  invoked in
     such a way that it draws on the root window of the screen can now
     be used as a screensaver without modification.  The programs that
     are being run as screensavers don't need to have any special
     knowledge about what it means to be a screensaver.

  o  LockVC is a console-locking-program combined with a starfield
     screensaver. Executing LOCKVC on a virtual console brings up a
     starfield that starts to rotate around all three axes.


  2.4.  Energy Star Label

  Robert Horn <rjh@world.std.com> wrote: "

  I had a chance to discuss Energy Star with the designers of desktop
  printers. They confirmed that the allowable stand-by power targets
  depend on the device, and they only knew their targets. But they made
  some other interesting comments:

  1. Energy Star ratings lead to significant operational power savings.
     Timer based power savings are the exception. Most savings come from
     designing in power on demand with low leakage drivers. For example,
     using stepper motors with low leakage current instead of high
     leakage.

     This savings is both from individual designs and from the resulting
     demand for low leakage products causing better and cheaper low
     leakage product designs. The old-style (e.g. typewriter) design
     with one motor (always on) and various clutches is no longer the
     least cost.


  2. Energy Star was good organizational engineering. It never required
     designers to compromise quality or performance, which made it much
     harder to argue against design changes to reduce power consumption
     while idle. Since most of the savings begin the millisecond that
     parts stop moving, these savings are considerable.

  3. The power ratings on PC's are a safety rating, not a usage rating.
     So the 235W and 300W power supplies that commonly found in PCs are
     specifying their safety limits. Actual full power usage is much
     less, typically 20-30 percent of the safe limit. The designers also
     noted that it is actually difficult to measure the power
     consumption of a switching power supply. You need to use specially
     designed power meters. The regular AC meters are designed for
     motors, and are rather inaccurate for switching power supplies.

     ..."



  2.5.  Miscellaneous Power Saving Techniques

  Linux halts the CPU in the idle cycle to further reduce power
  consumption. Early reports of OS/2, Win3.1/95, NT, and Linux showed
  Linux to use far less power than DOS-based O/S's that spun in the idle
  loop and consumed power -- this may have changed hence it would need
  research to validate.

  Most Linux-users tend to leave their computer on for years whenever
  possible. However, several modern BIOS's support an unattended
  powerup, and with cron you can even do an unattended shutdown. No need
  to leave the computer on night after night.


  3.  Alternative Power Supplies - Sun, Wind, Water

  See a survey of links at Eklektix <http://www.eklektix.com/solar> .


  4.  Noise Reduction

  Most of the noise emitted by a computer is produced by the fan, the
  harddisk and the speakers.


  4.1.  Fan


  o  libsensors0 is a library to read temperature/voltage/fan sensors

  o  lm-sensors "Kernel drivers to read temperature/voltage/fan sensors.
     This is a module for reading the temperature/voltage/fan sensors in
     Linux via the LM78/79 chip and possibly sensors on the SMBus
     (System Management Bus, usually found in P6 and P-II systems). The
     LM80 and a LM78-clone called W83781D are also supported."
     http://www.lm-sensors.nu/ <http://www.lm-sensors.nu/>

  o  ACPI, see APM chapter


  4.2.  Harddisk

  The noise of the hard disk can be very disturbing, see man hdparm to
  reduce the spin of the disk.


  4.3.  Speakers

  For the console setterm -blength 0 and for X xset b off turns the bell
  off. See also PCMCIA-HOWTO, and much more details in the Visible-Bell-
  mini-Howto by Alessandro Rubini.


  5.  Saving Consumables (Paper, Ink, etc.)


  5.1.  Printing of Drafts / Multiple Pages on One Sheet of Paper

  Use psutils package to put more than one page on one sheet of paper.
  This collection of utilities is for manipulating PostScript documents.
  Page selection and rearrangement are supported, including arrangement
  into signatures for booklet printing, and page merging for n-up
  printing.

  Often HTML pages are not optimised for printing. You may use html2ps,
  a HTML to PostScript converter, to print HTML pages. "This program
  converts HTML directly to PostScript. The HTML code can be retrieved
  from one or more URLs or local files, specified as parameters on the
  command line. A comprehensive level of HTML is supported, including
  inline images, CSS1, and some features of HTML 4.0."

  Or you may use mpage to print 2 up or 4 up (PS documents or ASCII
  text). This may be used to save up to 50 percent or more of your
  paper.


  5.2.  Reading From the Monitor Instead From Paper

  Or use less/xless/gless as a viewer instead of printing. You can view
  PostScript documents with gs and view PDF documents with either xpdf
  or acroread (from Adobe <http://www.adobe.com>). Ask yourself, do you
  --really-- need a hardcopy each time you decide to print something
  out.

  What are the reasons why people don't read from the monitor:

  o  Reading is slower up to 30 percent, see N.N.
     <http://www.useit.com/alertbox/9602.html>. The speed can be
     improved by better hardware (e.g. TFT display, greater screen,
     though this is against the other below to take smaller CRTs) and
     better display software (type-1, t1lib, truetype, freetype).

  o  Paper seems better organizable and more secure to some people. I
     suppose this can be treated by better software (e.g. Linux) and
     hardware, too.

  Some people use handheld PC (e.g. PalmIII, Newton Message Pad, Psion
  5) to carry around documents to read rather than printing them out.


  5.3.  Other Techniques

  Another means of saving paper is through the use of comments and
  redline/strikeout markings when exchanging a document with a co-
  worker/colaborator. For example, a draft could be written using
  WordPerfect, then E-MAILed to a co-worker. They could update the draft
  and send it back to you. You can use WordPerfect's redline/strikeout
  features to see the changes. The document need not be printed until it
  is "final" or in "final draft" status.

  Question: Can you use the back side of paper in a laser printer? I
  have not had much luck. You can use the paper that has been in a laser
  printer in an inkjet printer by using the other side.

  You should purchase smaller computers and monitors when possible. This
  will save packaging material translating into less solid waste. For
  example the box for a 15" CRT monitor is 2-3 times the size of the box
  for a 15" LCD monitor. Linux works well with 15" LCD monitors on
  smaller computers like the Netwinder or E3000
  <http://www.thinworks.com/campaign/try_e3000.html> .

  Some have expressed the concern that LCD displays may use more toxic
  materials and manufacturing processes than CRT displays, hence their
  usage actually may be worse on the environment. The original
  information above concerned the solid waste issue, which is fairly
  tangible and hence more controllable.

  Does anyone know of studies or additional research to help clarify and
  resolve this issue?

  Recycle your used paper, ink, and packing materials.

  You may use refillable printer cartridges. In Germany the are marked
  with the Blauer Engel label.

  Laser printer cartridges can often be used much more longer if you
  shake them when the message toner low appears at the message panel.

  Wade W. Hampton provided the biggest part of this chapter.

  From Ralf Muschall I got this suggestions:


  o  LaTeX documents: Using \usepackage{ccfonts} replaces the usual
     fonts by ones with wider lines and bolder serifes, improving
     readability at low resolutions. They are darker (i.e. use more ink)
     than the CM fonts and not as beautiful, so I would not recommend
     them for normal-size printings.

  o  Size-Reduction: Instead of psnup or other parts of the pstools I
     recommend the psnup written in Perl4 by Malcolm Herbert (it's from
     1994, and no longer maintained but however there is a descendant of
     it called yup, available at yup
     <http://redback.spyda.net/~mjch/yup/>.


     It has a lot of options, which allow to set all 4 margins and the
     inner gutter separately. Since reduced documents are not very
     pretty anyway, this can be used to reduce the margin, leaving more
     place for the text. This probably requires some experimenting
     (trying new values over and over, checking the result with
     ghostview).

     The normally used options are:

  o  -p2 (or -p4 etc., like -2 in the old psnup)

  o  -NIH (don't decorate)

  o  -l10 -r20 -b30 -t40 (add to margins)

  o  -g50 (add to gutter)

     (these values vary depending on the papersize and the margins of
     the original, negative values are allowed).



  o  Different ink printers are more or less capable to print on the
     backside of already used paper sheets. Try different manufacturers.
     Older Canon ink printers offer 360 dpi, older HP ink printers 300
     dpi. The readability of 4 pages/sheet using LaTex 10pt lies in
     between this features.

  o  Non-Linux: If you have to work with MS-Windows you should get the
     original Adobe-PostScript-Driver, instead of using the ones from
     MS-Windows. These fonts offer more than one page per paper sheet.
     AFAIK both psnup programs don't work with Adobe-PS, MS-Windows-PS
     and the PostScript extracted from MS-Windows-PDF files.

  o  Ghostscript has a new output format pswrite, which creates output
     in correct PostScript. This feature can be used to repair broken
     PostScript e.g. from Microsoft drivers, allowing their
     postprocessing with psnup etc.

  o  impose+ <http://imagic.weizmann.ac.il/~dov/freesw/impose+/> is a
     set of PostScript utilities. The main program is impose, which is
     used for two-up printing of DSC-compliant PostScript (including
     that from Netscape, dvips, and FrameMaker). It makes an effort to
     remove white space from the printout by probing the original
     PostScript for the bounding box of the printed area. This makes the
     output much more esthetic than does a simplistic layout of non-
     cropped original pages.


  6.  Recycling of Consumables (Paper, Printer Cartrigdes, CD, Floppies,
  Tapes)

  All of these consumables are recycleable. I have put a list of URLs
  into appendix H. You may start this process by separating different
  kinds of "waste". There should be included some words on the
  difficulties of recycling (data security, motivation, costs, ...).


  7.  Reduction of Radiation, Electro Magnetic Fields, Heat


  o  monitors are a source of radiation and electro magnetic fields.
     They may be reduced by lead filters, LCD displays. Some eco labels
     like TCO95 include maximum levels of radiation, etc.

  o  especially larger number of PCs or can heat a room very much
     therefore it might be necessary to cool the room. This ca be
     reduced by using standby (powerdown) techniques.



  8.  Extending the Life Cycle of your Hardware


  8.1.  Recycling of Hardware

  The commercial computer market is largely driven by vendors seeking to
  sell new hardware and software. There is no commercial marketing
  benefit in promoting reuse.

  Hence Linux doesn't require big hardware, it's very useful if you like
  or need to use old and small hardware.


  8.1.1.  Supported CPU Families

  Linux runs on Intel-compatible processors, including Intel's 386, 486,
  Pentium, Pentium Pro and Pentium II, and compatible processors by AMD,
  Cyrix and others.

  Linux doesn't support the 286 CPU family yet. But there are some
  efforts at ELKS http://www.linux.org.uk/ELKS-Home/index.html
  <http://www.linux.org.uk/ELKS-Home/index.html> or
  http://www.elks.ecs.soton.ac.uk/ <http://www.elks.ecs.soton.ac.uk/>.

  If you like, you may use Minix <http://www.cs.vu.nl/~ast/minix.html>
  one of the predecessors of Linux. Minix supports 8088 to 286 with as
  little as 640K memory.

  Of course there are also ports to other systems, such as ALPHA,
  PowerPC, etc. For details about systems which are supported by the
  Linux Kernel, see the Linux FAQ <http://www.linuxdoc.org/FAQ/Linux-
  FAQ.html> .

  The ARM is a fast AND low-power alternative. For example, the
  Corel/Rebel Netwinder is based on the ARM processor see Rebel
  <http://www.rebel.com> and Strong-ARM
  <http://developer.intel.com/design/strong/>.
  8.1.2.  Dealing with Limited Resources or Tuning the System

  This chapter is taken from my Laptop-HOWTO.


  8.1.2.1.  Related HOWTOs



  1. LBX-HOWTO

  2. Small-Memory-HOWTO


  8.1.2.2.  Introduction

  To deal with limited space, memory, CPU speed and battery power, I
  have written this chapter.


  8.1.2.3.  Small Space


  8.1.2.3.1.  Introduction

  There are different types of techniques to gain more disk space, such
  as sharing of space, freeing unused or redundant space, filesystem
  tuning and compression. Note: some of these techniques use memory
  instead of space. As you will see, there are many small steps
  necessary to free some space.


  8.1.2.3.2.  Techniques



  1. Stripping: Though many distributions come with stripped binaries
     today it is useful to check this. For details see man strip. To
     find every unstripped file you can use the file command or more
     convenient the tool findstrip. Attention: don't strip libraries,
     sometimes the wrong symbols are removed due to a bad programming
     technique.

     A recommendation from Russell Marks <rus@beeb.net>:

     These days a lot of people compile with -g, which I find a bit
     annoying (though AFAIK this only loses you disk space, in
     practice).

     strip has a --strip-debug option which doesn't strip symbols, but
     does still get rid of the debugging stuff. This is almost as good,
     in many cases, and it's ok to use it on libraries. As it happens, I
     recently got SuSE 6.3, so I can give you a live example:


     ___________________________________________________________________
     bash-2.03# cd /lib
     bash-2.03# ls -l libc.so.6
     -rwxr-xr-x   1 root     root      4223971 Nov  6 16:22 libc.so.6
     bash-2.03# strip --strip-debug libc.so.6
     bash-2.03# ls -l libc.so.6
     -rwxr-xr-x   1 root     root      1200355 Dec  8 00:13 libc.so.6
     ___________________________________________________________________



  2. Perforation: zum(1)reads a file list on stdin and attempts to
     perforate these files. Perforation means, that series of null bytes
     are replaced by lseek, thus giving the file system a chance of not
     allocating real disk space for those bytes. Example: find . -type f
     | xargs zum

  3. Remove Odd Files and Duplicates: Check your system for core files,
     emacs recovery files <#FILE#> vi recovery files <FILE>.swp, RPM
     recovery files <FILE>.rpmorig and patch recovery files. Find
     duplicates, you may try finddup. Choose a system to name your
     backup, temporary and test files, e.g. with a signature at the end.

  4. Clean Temporary Files: , e.g. /tmp, there is even a tool tmpwatch.

  5. Shorten the Log Files: usually the files in /var/log. There are
     some nice helpers for this task around, e.g. savelog .

  6. Remove Files: Remove files which are not "necessary" under all
     circumstances such as man pages, documentation /usr/doc and sources
     e.g. /usr/src .

  7. Unnecessary Libraries: You may use the binstats package to find
     unused libraries (Thanks to Tom Ed White).

  8. Filesystem: Choose a filesystem which treats disk space
     economically e.g. rsfs aka Reiser Filesystem. Tune your filesystem
     e.g. tune2fs. Choose an appropriate partition and block size.

  9. Reduce Kernel Size: Either by using only the necessary kernel
     features and/or making a compressed kernel image bzImage.

  10.
     Compression: I didn't check this but AFAIK you may compress your
     filesystem with gzip and decompress it on the fly. Alternatively
     you may choose to compress only certain files. You can even execute
     compressed files with zexec

  11.
     Compressed Filesystems:

     - For e2fs filesystems there is a compression version available
     e2compr , see http://debs.fuller.edu/e2compr/
     <http://debs.fuller.edu/e2compr/> .

     - DMSDOS which enables your machine to access Windows95 compressed
     drives (drivespace, doublestacker). If you don't need DOS/Windows95
     compatibility, i.e. if you want to compress Linux-only data, this
     is really discouraged by the author of the program. See
     http://fb9nt-ln.uni-duisburg.de/mitarbeiter/gockel/software/dmsdos/
     <http://fb9nt-ln.uni-
     duisburg.de/mitarbeiter/gockel/software/dmsdos/> .

  12.
     Partition Sharing: You may share swap-space (see Swap-Space-HOWTO)
     or data partitions between different OS (see mount). For mounting
     MS-DOS Windows95 compressed drives (doublespace, drivespace) you
     may use dmsdos
     http://metalab.unc.edu/pub/Linux/system/filesystems/dosfs/
     <http://metalab.unc.edu/pub/Linux/system/filesystems/dosfs/>.

  13.
     Libraries: Take another (older) library, for instance libc5 , this
     library seems to be smaller than libc6 aka glibc2 .

  14.
     Kernel: If your needs are fitted with an older kernel version, you
     can save some space.

  15.
     GUI: Avoid as much Graphical User Interface (GUI) as possible.

  16.
     Tiny Distributions: There are some distributions available which
     fit from one 3.5" floppy to 10MB disk space and fit for small
     memories, too. See Laptop-HOWTO
     <http://home.snafu.de/wehe/index_li.html>


  8.1.2.4.  Harddisk Speed

  Use the tool hdparm to set up better harddisk performance. Though I
  have seen laptop disk enabled with striping, I can't see a reason to
  do so, because IMHO aka RAID0 striping needs at least to different
  disks to increase performance.


  8.1.2.5.  Small Memory


  8.1.2.5.1.  Related HOWTOs



  1. Small-Memory-mini-HOWTO by Todd Burgess <tburgess@uoguelph.ca >
     http://eddie.cis.uoguelph.ca/~tburgess
     <http://eddie.cis.uoguelph.ca/~tburgess>

  2. Modules-mini-HOWTO

  3. Kerneld-mini-HOWTO


  8.1.2.5.2.  Techniques

  Check the memory usage with free and top.

  Mergemem Project  <http://www.complang.tuwien.ac.at/ulrich/mergemem/>.
  Many programs contain memory areas of the same content that remain
  undetected by the operating system. Typically, these areas contain
  data that have been generated on startup and remain unchanged for
  longer periods. With mergemem such areas are detected and shared. The
  sharing is performed on the operating system level and is invisible to
  the user level programs. mergemem is particularily useful if you run
  many instances of interpreters and emulators (like Java or Prolog)
  that keep their code in private data areas. But also other programs
  can take advantage albeit to a lesser degree.

  You may also reduce the kernel size as much as possible by removing
  any feature which is not necessary for your needs and by modularizing
  the kernel as much as possible.

  Also you may shutdown every service or daemon which is not needed,
  e.g. lpd, mountd, nfsd and close some virtual consoles. Please see
  Small-Memory-mini-HOWTO for details.

  And of course use swap space, when possible.

  If possible you may use the resources of another machine, for instance
  with X, VNC or even telnet. For more information on Virtual Network
  Computing (VNC), see http://http://www.uk.research.att.com/vnc/
  <http://www.uk.research.att.com/vnc> .

  8.1.2.6.  Low CPU Speed

  You may want to overdrive the CPU speed but this can damage your
  hardware and I don't have experience with it. For some examples look
  at Adorable Toshiba Libretto - Overclocking
  http://www.cerfnet.com/~adorable/libretto.html
  <http://www.cerfnet.com/~adorable/libretto.html>.


  8.1.2.7.  Tiny Applications and Distributions

  A small collection yet, but I'm looking for more information.


  1. BOA - "Lightweight and High Performance WebServer. boa is a single-
     tasking HTTP server. That means that unlike traditional web
     servers, it does not fork for each incoming connection, nor does it
     fork many copies of itself to handle multiple connections. It
     internally multiplexes all of the ongoing HTTP connections, and
     forks only for CGI programs (which must be separate processes.)
     Preliminary tests show boa is capable of handling several hundred
     hits per second on a 100 MHz Pentium."

  2. MGR - a graphical windows system, which uses much less resources
     than X.

  3. Low Bandwidth X - Alan Cox in LINUX REDUX February 1998 " .. there
     are two that handle normal applications very nicely. LBX (Low
     Bandwidth X) is the official application of the X Consortium (now
     OpenGroup www.opengroup.org). Dxpc
     http://ccwf.cc.utexas.edu/~zvonler/dxpc
     <http://ccwf.cc.utexas.edu/~zvonler/dxpc> is the alternative most
     people prefer. These systems act as proxy X11 servers and compress
     datastreams by well over 50 percent for normal requests, often
     reaching a reduction to 25 percent of the original bandwidth usage.
     With dxpc, X windows applications are quite usable over a 28.8
     modem link or across the Internet."

  4. blackbox - "This is a window manager for X. It is similar in many
     respects to such popular packages as Window Maker, Enlightenment,
     and FVWM2. You might be interested in this package if you are tired
     of window managers that are a heavy drain on your system resources,
     but you still want an attractive and modern-looking interface."

  5. linux-lite - distribution based on a 1.x.x kernel for systems with
     only 2MB memory and 10MB harddisk. URL see above.

  6. smallLinux -  http://smalllinux.netpedia.net/
     <http://smalllinux.netpedia.net/> . Three disk micro-distribution
     of Linux and utilities. Based on kernel 1.2.11. Root disk is ext2
     format and has fdisk and mkfs.ext2 so that a harddisk install can
     be done. Useful to boot up on old machines with less than 4MB of
     RAM.

  7. cLIeNUX - client-use-oriented Linux distribution.

  8. minix - not a Linux but a UNIX useful for very small systems, such
     as 286 CPU and 640K RAM http://www.cs.vu.nl/~ast/minix.html
     <http://www.cs.vu.nl/~ast/minix.html> . There is even X support
     named mini-x by David I. Bell
     ftp://ftp.linux.org.uk/pub/linux/alan/
     <ftp://ftp.linux.org.uk/pub/linux/alan/> .

  9. screen - tiny but powerful console manager. John M. Fisk
     <fiskjm@ctrvax.vanderbilt.edu> in LINUX GAZETTE July 1, 1996 :"It's
     a GUI, GUI, GUI, GUI world! " - or so the major OS manufacturers
     would have you belief. Truth is, that while this is increasingly
     the case, there are times when the command line interface (CLI) is
     still a very good choice for getting things done. It's fast,
     generally efficient, and is a good choice on memory or CPU
     constrained machines. And don't forget that there are still a lot
     of very nifty things that can be done at the console." "screen is a
     full-screen window manager that multiplexes a physical terminal
     between several processes, typically interactive shells. Each
     virtual terminal provides the functions of the DEC VT100 terminal
     and, in addition, several control functions from the ANSI X3.64
     (ISO 6429) and ISO 2022 standards (e.g., insert/delete line and
     support for multiple character sets). Real multiuser support, split
     screen support, hardstatus emulation support, configurable window
     seperator and hardstatus strings, permanent window seperator, many
     new escapes, logfile timestamps and flush timeout, optional builtin
     telnet, optional Braille support, support for history compaction."

  10.
     tinyirc - "A tiny, stripped down IRC Client. Doesn't have most of
     the more advance commands in the ircII family of IRC Clients, nor
     does it have any color, but it works, and it's tiny."

  11.
     tinyproxy - "Tinyproxy is a lightweight HTTP proxy designed to do
     the job with a minimum of system resource use. It's ideal for small
     networks where a larger HTTP proxy such as squid might be overkill
     or a security risk. This simplicity also makes tinyproxy an ideal
     candidate for customization - it takes very little time to read and
     understand the tinyproxy source, and thus you can start adding your
     own desired features on short order."


  8.2.  Other Techniques

  NiCad batteries need to be discharged periodically to prevent the
  memory effect and prolong their lifespan.

  Batteries such as NiCad, Lead Acid, and NiMH contain TOXIC chemicals.
  Techniques should be taken to prolong their lifespan, and when you do
  discard them, they should be recycled, not thrown in the trash.

  One technology to watch is the "Iron" battery mentioned in the article
  at N.N. <http://news.excite.com/news/r/990815/01/science-battery-iron>
  . Such a battery could reduce some of the toxic waste problems
  associated with used batteries, however such a battery is probably a
  few years away.

  Some remarks about backlights in laptops, monitors (screensavers),
  harddisks (hdparm), etc. have to be written.


  8.3.  Other Operating Systems

  Courtesy of George White <gwhite@bodnext.bio.dfo.ca>:

  Or you can buy an older computer (SGI, Sun, NeXT) that comes with unix
  and is capable of running a wide range of open source software. In
  some cases (SGI Indigo2) you can still run current OS versions, in
  others you may do better with an open source OS such as Linux, but in
  either case you have access to lots of good software and tools to
  write your own.

  The lower power consumption of older computers means you get more
  reserve time from an UPS or can use a small alternative power source
  if you don't have access to "mains" power.

  9.  X10 - Home Automation System

  "X-10 modules are devices that plug into an electrical outlet and
  allow you to remotely control the power to a lamp or an appliance that
  is plugged into them. There are also X-10 modules that install in
  place of wall switches to control lights, and there's one that can be
  used to set back a thermostat."

  These X10 <http://www.x10.com> folks make a really cool dongle called
  the Firecracker. These allow for the control of X10 devices via a
  serial-port of your PC. Programs like bottlerocket and gtk-x10 allow
  Linux programs to control X10 devices using the Firecracker device.
  You may be able to get the Firecracker, a remote control, a receiver,
  and a lamp module for as little as $5.95 U.S. (special promotion).

  GNU Phantom.Home <http://www.joethielen.com/phantom/home/> is a
  computer controlled home automation system. The software includes a
  circuit diagram for building the Phantom.Home.Controller, a simple
  circuit board that attaches to your PC's parallel port. Using the
  combination of hardware/software you can control (i.e. flip on or off)
  nearly any 120V device. And with a little bit of electronics know-how,
  you can probably control nearly any device at any voltage by modifying
  the circuit board to meet your needs. The simple circuit included can
  be created and built for around $25. The modules cost around $10
  (basically a heavy duty relay).

  Turn that light off when not in use!


  10.  Uninterruptable Power Supply - UPS

  You should use a UPS if you have many thunderstorms in the area. That
  will save hardware, software, your time, and money, and help prevent
  you from throwing out that old monitor, CPU, or modem when it gets
  trashed by lightening. For details consult the UPS-HOWTO
  <http://linuxdoc.org/HOWTO/UPS-HOWTO.html>.

  UPSs do save hardware, save work, etc. In areas prone to lightening,
  they could save hours of work each week, potentially translating into
  power savings. They do save hardware in areas prone to power outages.
  There is some concern over their additional usage of AC power. If
  anyone has any studies or research on this issue, could they please
  forward it to us? That would be an interesting question to post to
  APC, BEST, etc.


  11.  Games

  Personally I'm not much a player of computer games but probably they
  can be used for environmental education. In a first investigation I
  found lincity and Real Life, please check their usefulness by
  yourself.


  o  lincity build & maintain a city/country. You are required to build
     and maintain a city. You must feed, house, provide jobs and goods
     for your residents. You can build a sustainable economy with the
     help of renewable energy and recycling, or you can go for broke and
     build rockets to escape from a pollution ridden and resource
     starved planet, it's up to you. Due to the finite resources
     available in any one place, this is not a game that you can leave
     for long periods of time. This game is similar to the commercial
     simulation game with a similar name. This package provides files
     common to both the X and SVGALIB versions of the game.


  o  Real Life <http://www.sunysb.edu/philosophy/RealLife.html> - "In
     Conway's Game of Life every cell is either fully alive (has the
     value of 1) or completely dead (has the value 0). In Real Life this
     restriction to bivalence is lifted to countenance -real-valued-
     degrees of life and death. Real Life contains Conway's Game of Life
     as a special case; however, Real Life, in contrast to Conway's Game
     of Life, exhibits sensitive dependence on initial conditions which
     is characteristic of chaotic systems."

  o  Sierra <http://www.sierra.com> has produced (some time ago) Eco
     Quest 1 - Lost in Rainforest and Eco Quest 2 - The Search for Cetus


  12.  Ecology Software (Simulation, Datacollection, Statistics, etc.)

  Though I know there is some MS-Windows based software which is used in
  ecological science (there is even a branch environmental informatic),
  I know only Ecolab available for Linux yet. But I guess Linux software
  (for instance databases or statistics programs) may easily adopted.
  Also it might be possible to use a Linux cluster to solve ecological
  simulations.


  12.1.  Ecolab

  Ecolab is both the name of a software package and a research project
  that is looking at the dynamics of evolution.
  http://parallel.acsu.unsw.edu.au/rks/ecolab.html
  <http://parallel.acsu.unsw.edu.au/rks/ecolab.html> EcoLab is a system
  that implements an abstract ecology model. It is written as a set of
  Tcl/Tk commands so that the model parameters can easily be changed on
  the fly by means of editing a script. The model itself is written in
  C++.


  12.2.  OpenClassroom

  "OpenClassroom - distribution for Education. Pre-alpha. homepage:
  OpenClassroom <http://www.openclassroom.org/> is integrating a package
  of software that allows educational and community organizations to
  create communities of knowledge by connecting their existing PCs (old
  or new) into a network, both local and worldwide, such as the
  Internet. A central focus of this initiative is to allow such
  organizations to extend the usable life of their equipment by bringing
  them state-of-the-art software that runs on their existing PCs. Our
  toolset allows organizations and citizens to own and operate their own
  digital printing press."


  12.3.  Tierra

  Tierra <http://www.hip.atr.co.jp/~ray/tierra/tierra.html> is a tool
  for studying digital evolution and ecology that runs on Linux and
  other OSes.


  12.4.  Linux in Environmental Research

  Courtesy of Wade W. Hampton: Linux is ideally suited for use as a
  research tool for environmental experiments. There are small embedded
  Linux solutions that can be used for remote monitoring or telemetry.
  There are VERY small Linux implementations from PC-104 systems to
  embedded systems like the uCsimm <http://www.uclinux.com>.  Linux even
  flew on the shuttle controlling biological experiments....  Linux has
  been used for weather research on NOAA's Hurricane Hunter aircraft.

  Linux is also an ideal platform for researching ecological and
  environmental information via the Internet using standard WWW-based
  tools like Netscape.

  Linux may even be used to model complex biological and environmental
  processes.  A (beowulf cluster <http://www.beowulf.org> could be used
  to run complex simulations of environmental processes, for example
  Earthdome <http://www.methaz.com/earthdome.htm> and a survey at A
  COLLECTION OF LINKS OF VISUALIZATION & SIMULATION OF SELF-ORGANIZED
  SYSTEMS <http://platon.ee.duth.gr/~soeist7t/Visualizations/>.


  12.5.  SWARM

  SWARM <http://www.swarm.org> is a software package for multi-agent
  simulation of complex systems that is being developed by the Swarm
  Development Group (SDG).

  Swarm is intended to be a useful tool for researchers in a variety of
  disciplines, especially artificial life. The basic architecture of
  Swarm is the simulation of collections of concurrently interacting
  agents: with this architecture, we can implement a large variety of
  agent based models. The source code is freely available under GNU
  Licensing terms.


  12.6.  Climate-Dynamics

  Climate-Dynamics <http://www.climate-dynamics.rl.ac.uk> is project to
  share computer client resources to analyze the climate.


  12.7.  UNCERT

  UNCERT <http://uncert.mines.edu/> is a geostatistical uncertainty
  analysis package applied to groundwater flow and contaminant transport
  modeling. This package was developed for evaluating the inherent
  uncertainty in describing subsurface geology, hydraulic properties,
  and the migration of hazardous contaminants in groundwater flow
  systems. It is well suited for the aforementioned purposes, but is
  also sufficiently general to be usable by researchers in a wide range
  of disciples.


  12.8.  EcoTopia

  The EcoTopia <http://www.ecotopia.org> web site uses computer
  simulation to model Santa Cruz, California as an ideal environmental
  community. For Ecotourists and Green Consumers, EcoTopia strives to
  offer the nation a model of integration of technology and
  environmental remediation using computer modeling and image
  forecasting.


  13.  Related Projects, Mailing Lists and Newsgroups


  o  Though I searched the WWW, I couldn't find neither a dedicated
     newsgroup nor a mailing list yet. So I decided to create the Eco-
     Com mailing list. You can subscribe to this list via email. Write
     to <eco_com-subscribe@listbot.com>, and you will be sent a
     verification message.

  o  Repair FAQ <http://www.repairfaq.org> .


  o  Obsolete Computer Helpline
     <http://www.ncsc.dni.us/fun/user/tcc/cmuseum/helpline/helpline.htm>
     .

  o  386 World <http://come.to/386> by Gaute Hvoslef Kvalnes
     <386@altavista.net> . He provides one of the greatest recources
     available on 386 computers and software. Though his work is mainly
     related to MS-Windows, he also supports Linux.

  o  "The Electronic Green Journal <http://www.lib.uidaho.edu>,
     published by the University of Idaho Library, is a professional,
     refereed publication devoted to disseminating information
     concerning sources on international environmental topics including:
     assessment, conservation, development, disposal, education,
     hazards, pollution, resources, technology, and treatment. We are
     academically sponsored; our focus, however, is to publish articles,
     bibliographies, reviews, and announcements for the educated
     generalist as well as the specialist. We welcome original
     contributions from authors on any of the above topics." . You may
     also find a survey about Environmental Resources on the World Wide
     Web there.


  14.  Credits

  Thanks to:


  o  Verena Lorenz-Meyer <lome@cs.tu-berlin.de>

  o  George White <gwhite@bodnext.bio.dfo.ca>

  o  Wade W. Hampton <whampton@staffnet.com>

  o  Daniel Pirone <cocteau@wact.net>

  o  Knut Suebert <ksueber@gwdg.de>

  o  Ben De Rydt <ben.de.rydt@pandora.be>

  o  Hanno Mueller <kontakt@hanno.de>

  o  Bernhard Reiter <bernhard@uwm.edu>

  o  Yan Wong <yan.wong@linacre.ox.ac.uk>

  o  Robert Horn <rjh@world.std.com>

  o  Martin Pool <martinp@mincom.com>

  o  Andreas Gohr <ballermann@>

  o  Lionel, "trollhunter" Bouchpan-Lerust-Juery,
     <trollhunter@linuxfr.org>

  o  Hristo Bojinov <hib@mit.edu>

  o  Ralf Muschall <rmuschall.fih@t-online.de>

  o  Russell Marks <rus@beeb.net>

  o  Martin Pool <martinp@mincom.com>

  o  Malcolm Herbert <Malcolm.Herbert@fulcrum.com.au>


  o  Sotiris Vassilopoulos <Sotiris.Vassilopoulos@betatech.gr>

  o  Thomas Boutell <boutell@boutell.com>

  o  Matthias Scheller <mscheller@access.diax.ch>

  o  Martin <Niteskate@aol.com>

  o  Jun Morimoto <morimoto@xantia.citroen.org>

  o  Georg Schwarz <schwarz@physik.tu-berlin.de>


  15.  Revision History


  o  v0.1, 18 June 1999, first draft

  o  v0.2, 10 September 1999, changed <htmlurl ... > tag to <url ...>,
     another motto, added appendix B about MP3 player, created and added
     eco_com mailing list, added chapter about alternative power
     supplies, added recommendations for buying a new computer, improved
     screensaver section, added UPS chapter, added chapter about
     hardware design, minor changes

  o  v0.3, 17 September 1999, added information about Tierra, added
     information about wasting of resources during computer production,
     added some comments about UPS, minor changes

  o  v0.4, 05 December 1999, added appendix G about other operating
     systems, added information about CD recycling, added appendix H
     URLs of recyclers, removed link to Linux Games Survey, added links
     to SWARM, UNCERT and Climate-Dynamics, added chapter about Energy
     Star label (courtesy of Robert Horn), minor changes

  o  v0.5, 04 January 2000, some additional information about PostScript
     utilities, new chapter Caveats, URL corrections and minor changes

  o  v0.6, 01 March 2000, link to Japanese translation added and some
     spell checking (thanks to Jun Morimoto), correction of URLs


  16.  Copyright and Disclaimer

  Copyright (C) 1999 by Werner Heuser. This document may be distributed
  under the terms set forth in the LDP license at COPYRIGHT
  <http://linuxdoc.org/COPYRIGHT.html>.

  The information in this document is correct to the best of my
  knowledge, but there's a always a chance I've made some mistakes, so
  don't follow everything too blindly, especially if it seems wrong.
  Nothing here should have a detrimental effect on your computer, but
  just in case I take no responsibility for any damages incurred from
  the use of the information contained herein. All trademarks belong to
  their owners.


  17.  Appendix A - Linux with Laptops


  17.1.  Battery

  Has to be written. See LDP - Battery-HOWTO
  <http://linuxdoc.org/HOWTO/mini/Battery-Powered.html> by Hanno
  Mueller, too.

   apmd-rhcn-2.4phil-1 by RedHat ftp://rhcn.redhat.com/pub/rhcn/
  <ftp://rhcn.redhat.com/pub/rhcn/> contains an unofficial patch for
  shutting down the PCMCIA sockets before a suspend and patches for
  multiple batteries.


  17.2.  PCMCIA Card Services and Advanced Power Management

  Quoted from the LDP - PCMCIA-HOWTO  <http://linuxdoc.org/HOWTO/PCMCIA-
  HOWTO.html>: "Card Services can be compiled with support for APM
  (Advanced Power Management) if you've configured your kernel with APM
  support. ...  The PCMCIA modules will automatically be configured for
  APM if a compatible version is detected on your system. Whether or not
  APM is configured, you can use cardctl suspend before suspending your
  laptop, and cardctl resume after resuming, to cleanly shut down and
  restart your PCMCIA cards. This will not work with a modem that is in
  use, because the serial driver isn't able to save and restore the
  modem operating parameters. APM seems to be unstable on some systems.
  If you experience trouble with APM and PCMCIA on your system, try to
  narrow down the problem to one package or the other before reporting a
  bug. Some drivers, notably the PCMCIA SCSI drivers, cannot recover
  from a suspend/resume cycle.  When using a PCMCIA SCSI card, always
  use cardctl eject prior to suspending the system."

  You should use the internal modem in a laptop instead of a PCMCIA
  modem, if possible (it may be a WinModem).


  17.3.  Power Saving Techniques


  1. If you don't need infrared support, disable it in the BIOS or
     shutdown the IrDA device driver. There are also some IrDA features
     of the kernel which are useful for saving power.

     In the specifications of my HP OmniBook 800 it is recommended to
     turn off the IR port, if it is not in use, because it may consume
     up to 10 percent of the battery time.

     If necessary, you may also try to disable the Fast RRs feature in
     the IrDA section of the kernel. This option will give you much
     better latencies but will consume more power.

  2. PCMCIA services consume much power, so shut them down if you don't
     need them.

  3. I'm not sure to which extend the backlight consumes power. WARNING:
     AFAIK this device can only bear a limited number of uptime circles.
     So avoid using screensavers too much.

  4. For some examples to build batteries with increased uptime up to 8
     hours look at Adorable Toshiba Libretto
     http://www.cerfnet.com/~adorable/libretto.html
     <http://www.cerfnet.com/~adorable/libretto.html>.

  5. For information about APM look at the APM chapter above.

  6. A hacked rclock  <http://www-leland.stanford.edu/~bbense/toys/>.
     Booker C. Bense has hacked the rclock program to include a simple
     battery power meter on the clock face.

  7. xbatstat <http://www.jaist.ac.jp/~daisuke/Linux/xbatstat.html>. A
     battery level status checker for Linux and X.

  8. KDE http://www.kde.org <http://www.kde.org> provides KAPM, Kbatmon
     and Kcmlaptop. Written by Paul Campbell kcmlaptop is a set of KDE
     control panels that implements laptop computer support functions,
     it includes a dockable battery status monitor for laptops - in
     short a little icon in the KDE status bar that shows how much
     battery time you have left. It also will warn you when power is
     getting low and allows you to configure power saving options.

     Similar packages you may find at the GNOME project
     http://www.gnome.org/ <http://www.gnome.org/> . See the software
     maps at both sites.

  9. Please see Battery Powered Linux Mini-HOWTO by Hanno Mueller,
     hanno@lava.de http://www.lava.de/~hanno/
     <http://www.lava.de/~hanno/> for more information.

  10.
     toshiba-fan Turn the fan on a Toshiba Pentium laptop on or off.
     This is a command line utility to turn the fan of a Toshiba laptop
     on or off, or view its current state. It should work on all Toshiba
     Pentium laptops that have fans.


  18.  Appendix B - MP3-Hardware-Decoder at Parallel Port

  In the German computer magazine CT <http://www.heise.de/ct/> issue
  9/1999 p. 200 and 10/1999 p. 260 I found an article about turning an
  old PC (from 286 upward) into a MP3 player, by using a MP3-Hardware-
  Decoder at the parallel port. Authors Homepag <http://www.ieee.rwth-
  aachen.de/mp3/> .

  Also mentioned there, is a software by Klaus Peichl <http://cip8.e-
  technik.uni-erlangen.de:8080/hyplan/kspeichl/mpegcd.htm>, which
  doesn't need a hardware decoder.

  Though both programs are DOS based, I mention them here. I hadn't time
  to look for an according Linux solution.

  Cajun <http://www.cajun.nu/> is a program that allows you to turn any
  computer (>75mhz) into a massive audio jukebox for your car or home.
  It uses the matrix-orbital serial display and supports the IRman
  infra-red remote control interface. Soundcard output is delivered to
  your (car or home) stereo for amplification. The software supports a
  hotlist and shuffle mode. It includes FM/Video4Linux support,
  icecast/shoutcast support, CrystalFontz serial display support, and
  choice of mpg123 or xaudio for driving the sound card.


  19.  Appendix C - Bibliography


  o  Ellringmann, H. /Hrsg.): Softwarefuehrer Umweltschutz. Anbieter -
     Produkte - Maerkte; 1999ff.

  o  Koellner, W. / Fichtler, W.: Recycling von Elektro- und
     Elektronikschrott; 1996

  o  Rohwedder, W.J. "Rocky" / Alm, Andy: Using Computers in
     Environmental Education; 1994

  o  Schloegl, M.:Recycling von Elektro- und Elektronikschrott; 1995

  o  Tiltmann, K.O. (Hrsg.): Recyclingpraxis Elektronik; 1994

  o  Andreas Grote: (be): Gruene Rechnung - Das Produkt Computer in der
     Oekobilanz - Report, Oekologie, Rohstoffverbrauch, Energieverbrauch
     und Schadstoff-Emissionen bei Herstellung, Betrieb und Entsorgung,
     EPA, Energy Star, Green-PC (c't 12/1994, Seite 92) CT
     <http://www.heise.de/ct/> .


  20.  Appendix D - Recommendations for Buying a New Computer

  Courtesy of Wade W. Hampton (modifications by wh): Purchase a low-
  power computer such as a laptop or network computer. These typically
  don't use as much power as desktop systems. For example, someone on
  the WWW had a Corel/Rebel Netwinder powered by solar cells. I find it
  funny that an "Energy Star" desktop still has a 300W power supply and
  uses far more power than a computer like the Netwinder which uses
  something like 10 Watts of power, (though this is consistent with the
  Energy Star goals for computer equipment, since they have targeted
  unused power consumption).

  Maybe there should be a new class of computers called "Energy Miser"
  (or similar) that use nearly an order of magnitude less power than
  Energy Star systems?

  To save power for the display, one could purchase a LCD monitor
  instead of a CRT. LCD monitors consume 30-40 Watts of power versus the
  100's of Watts used by most monitors.  The price of an LCD is still
  2-3 times that of a similar monitor, but as LCDs become more widely
  used, the price will come down.

  Make sure that any new computer purchase includes APM-compliant
  hardware and low-radiation. Use TCO, DPMS or Energy Star compliant
  monitors.

  R Horn <rjh@world.std.com> wrote: " I personally have found the
  Lawrence Berkeley Labs - LBL <http://eande.lbl.gov/> web site to be
  the best source for information on energy efficient equipment. They go
  into considerable details on how to reduce energy consumption from
  many kinds of equipment, including much more than computers.  They
  also have a good collection of links to related sites. The Energy Star
  program is defined by the US Environmental Protection Agency, which
  has a web site on it. So far all of the Energy Star regulations have
  been defined to reduce energy usage without requireing change or
  restrictions on regular usage.  There is an amazingly large amount of
  electricity consumed by idle equipment (computers, televisions,
  microwave ovens,...) and also large amounts consumed unnecessarily by
  equipment that must be continuously one (emergency exit signs, traffic
  lights, ...). Since this energy can be saved without asking users to
  make any compromises on performance, it is being targeted first.

  Somewhere on the LBL web site they have the actual power consumption
  figures for various PCs. The 300W power supply is quite misleading.
  Actual power usage varies depending upon what programs you run and
  whether the disks can be powered down. Genuine usage while in
  operation is usually in the 50-75W range. When the system is idle, it
  drops significantly.

  The NetWinder is a nice machine, but does force operational
  compromises. The peak CPU performance is much lower.  The operating
  system is not Windows.  And there are other limitations. A closer
  comparison is the typical laptop PC.  These can generally be operated
  from a modest solar panel because their average power drain is quite
  low.  With these you can see the cost vs power consumption tradeoff.
  They achieve the same performance as the desktop units, but the low
  power consumption has doubled or tripled the cost.

  (I personally use a Psion.  A decent slow computer that requires only
  200mw of power. It may even run Linux once they deal with some of the
  ROM issues.)


  The big debate in setting the energy star regulations was deciding
  which would have greater overall benefit: small negligible cost
  improvements to almost all equipment sold, or greater improvements at
  much higher cost? Could that cost be invested elsewhere to greater
  benefit?  How will the purchasers react to the higher cost? So far the
  consensus has been that improving a large number of machines at
  negligible cost is wiser than improving a smaller number of machines
  at high cost."


  21.  Appendix E - A New Environmentally Friendly Hardware Design

  Courtesy of Wade W. Hampton and Knut Suebert: New hardware designs
  that plan to use Linux should take advantage of environmentally
  friendly technologies such as low-power CPUs e.g., the ARM from: Intel
  <http://developer.intel.com/design/strong/>, environmentally friendly
  battery design, low-power displays (e.g., non-backlit LCDs), smaller
  packaging, etc.  Linux supports a WIDE variety of hardware and
  technologies. These could be leveraged into powerful, flexible,
  environmentally friendly Linux-based solutions.

  An "Environmental Rating" could be created for new Linux-based
  hardware and even some Linux-based software such as bottlerocket
  (X10). Devices such as the Netwinder or the uCsimm would receive high
  ratings for their size, power consumption, capabilities, etc.

  At Telepolis (German Computer Magazine)
  <http://www.telepolis.de/tp/deutsch/inhalt/te/1367/1.html> you might
  find an article about wasted resources during computer manufacturing.

  Generally speaking PPC CPUs consume less power than x86 CPUs.


  22.  Appendix F - Computer Related Eco Labels

  Currently I have only this small list: TCO, DPMS or Energy Star Blauer
  Engel <http://www.blauer-engel.de/> (Germany), Energy Label - Group
  for Efficient Appliances (GEA).


  23.  Appendix G - Other Operating Systems


  23.1.  DOS

  To my surprise there are still many tools available to make old 286 PC
  useful. I started a search for 286 at Simtel.Net
  <http://www.simtel.net/> and found many useful shareware programs. For
  instance:


  o  Full-featured LAN for MSDOS computers, 286+req
     <ftp://ftp.simtel.net/pub/simtelnet/msdos/lan/neos-10.zip>

  o  RoseMail, PCBoard offline mail, 8086/286 exe's
     <ftp://ftp.simtel.net/pub/simtelnet/msdos/pcboard/rm172b.zip>

  o  Multitasking/multiuser environment for 286-586
     <ftp://ftp.simtel.net/pub/simtelnet/msdos/sysutl/vmix285.zip>

  There is even a free DOS around, see The OS Developers Homepage
  <http://www.500mhz.net/ndx.html>



  23.2.  MS-Windows

  A power saving utility CPUIDLE
  <http://www.bugcomputer.com/cpuidle/index.html > is available. Another
  one for older versions of MS-WindowsNT is available at Niteskate
  <http://members.aol.com/niteskate/ntpwr.zip>.


  24.  Appendix H - URLs of Recylers


  o  REMEDIA <http://www.remedia.de/mitte.htm> - Germany - recycling of
     data storage media (CD, floppy, tape)

  o  ALCAD <http://www.alcad.com/site_map.htm > - worldwide - Ni-Cd
     Battery Recycling

  o  CD-COLLECT <http://www.cd-collect.com/> - CD recycling

  o  Rechargeable Battery Recycling Corporation <http://www.rbrc.org/>
     RBRC is a non-profit, public service organization created to
     promote the recycling of Nickel-Cadmium (Ni-Cd) rechargeable
     batteries.

  o  The European Portable Battery Association (EPBA) <http://www.epba-
     europe.org> is the European organisation of companies
     manufacturing, selling or distributing portable batteries. The
     mission of the EPBA is to ensure that the ideal conditions are
     created for responsible development of the portable battery
     industry in Europe. Acting in the common interests of all of its
     members, the EPBA aims to sustain a competitive industry in an
     increasingly complex commercial climate.

  o  Battery Council International <http://www.batterycouncil.org > is a
     not-for-profit organization with the mission of promoting the
     interests of the international lead-acid battery industry. With
     more than 175 members worldwide, the Battery Council International
     (BCI) brings together lead-acid battery manufacturers and
     recyclers, marketers and retailers, suppliers of raw materials and
     equipment, and industry consultants.



  Emacs Beginner's HOWTO
  Jeremy D. Zawodny, jzawodn@wcnet.org
  v1.7, 14 October 1999

  This document introduces Linux users to the Emacs editor. It assumes
  minimal familiarity with vi or a similar editor. The latest version of
  this document is usually available from http://www.wcnet.org/jza-
  wodn/emacs/
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Copyright
     1.2 Audience and Intent
     1.3 What is Emacs?
        1.3.1 Ports and Versions
        1.3.2 Getting Emacs

  2. Running Emacs

     2.1 Starting & Quitting Emacs
        2.1.1 What you'll see
           2.1.1.1 The Menu Bar
           2.1.1.2 The Status Bar and Mini-buffer
     2.2 Some Terminology
        2.2.1 Buffers & Files
        2.2.2 Point & Region
        2.2.3 Windows
        2.2.4 Frames
     2.3 Keyboard Basics
        2.3.1 Command Keys (Meta, Esc, Control, and Alt)
        2.3.2 Moving Around in a Buffer
        2.3.3 Essential Commands
        2.3.4 Tab Completion
     2.4 Tutorial, Help, & Info

  3. Emacs Modes

     3.1 Major vs. Minor Modes
     3.2 Programming Modes
        3.2.1 C/C++/Java
        3.2.2 Perl
        3.2.3 Python
        3.2.4 Others
     3.3 Authoring
        3.3.1 Spell-Checking (
        3.3.2 HTML (
        3.3.3 TeX (
        3.3.4 SGML (
     3.4 Other Modes
        3.4.1 Version Control (
        3.4.2 Shell Mode
        3.4.3 Telnet and FTP
        3.4.4 Man
        3.4.5 Ange-FTP

  4. Customizing Emacs

     4.1 Temporary Customization
        4.1.1 Variable Assignments
        4.1.2 File Associations
     4.2 Using a
     4.3 The Customize Package
     4.4 X Windows Display

  5. Popular Packages

     5.1 VM (Mail)
     5.2 Gnus (Mail and News)
     5.3 BBDB (A rollodex)
     5.4 AucTeX (another TeX mode)

  6. Other Resources

     6.1 Books
        6.1.1 Learning GNU Emacs
        6.1.2 Writing GNU Emacs Extensions
        6.1.3 Programming in Emacs Lisp: An Introduction
        6.1.4 The GNU Emacs Lisp Reference Manual
     6.2 Web Sites
        6.2.1 EMACSulation
     6.3 Newsgroups
     6.4 Mailing Lists
     6.5 The Emacs Lisp Archive

  7. Credits



  ______________________________________________________________________

  1.  Introduction

  1.1.  Copyright

  Copyright (C) 1998 - 1999 Jeremy D. Zawodny. Permission to distribute
  and modify this document is granted under the GNU General Public
  License. An on-line copy is available at
  http://www.gnu.org/copyleft/gpl.html


  1.2.  Audience and Intent

  This document is targeted at the Linux user interested in learning a
  bit about Emacs and trying it out. This actually began as the outline
  of a brief tutorial that I was to give at a Toledo Area Linux User
  Group meeting: http://www.talug.org/. It has since grown a bit as the
  result of the helpful feedback I have received from the community. See
  the Credits section for details.


  Having said that, there is virtually nothing Linux-specific in this
  document. It applies to virtually all flavors of Unix and even Emacs
  running on Microsoft Windows. But since this document is part of the
  Linux Documentation Project, I make a point of saying that it was
  developed for Linux users--because it was.


  And finally, those of you who prefer the name GNU/Linux to simply
  ``Linux'' (read http://www.gnu.org/gnu/linux-and-gnu.html to see why
  one might) are welcomed to mentally substitute GNU/Linux for all
  occurrences of Linux in this document. While I don't disagree with the
  reasoning and spirit behind that idea, I don't feel compelled to write
  GNU/Linux.


  1.3.  What is Emacs?

  Emacs is different things to different people. Depending who you ask,
  you'll could get any of the following responses:


  o  Text Editor

  o  Mail Client

  o  News Reader

  o  Word Processor

  o  Religion

  o  Integrated Development Environment

  o  Whatever you want it to be!


  But for our purposes, let's just pretend it's a text editor--an
  amazingly flexible text editor. We'll dig deeper into the question
  later on. Emacs was written by Richard Stallman (founder of the Free
  Software Foundation: http://www.fsf.org/ and the GNU project
  http://www.gnu.org/) and he still maintains it today.


  Emacs is one of the most popular and powerful text editors used on
  Linux (and Unix). It is second in popularity only to vi. It is known
  for it huge feature set, ability to be easily customized, and lack of
  bugs. It's large feature set and ability to be customized actually are
  the result of how Emacs was designed and implemented. Without going
  into all the details, I'll simply point out that Emacs isn't ``just an
  editor''. It is an editor written mostly in the programming language
  Lisp. At the core of Emacs is a full-featured Lisp interpreter written
  in C. Only the most basic and low-level pieces of Emacs are written in
  C. The majority of the editor is actually written in Lisp. So, in a
  sense, Emacs has an entire programming language ``built in'' which you
  can use to customize, extend, and change its behavior.


  Emacs is also one of the oldest editors around. The fact that is has
  been used by thousands of programmers over the past 20 (?) years means
  that there are many add-on packages available. These add-ons allow you
  to make Emacs do things that Stallman had probably never dreamed
  possible when he first began work on Emacs. More on that in a later
  section.


  There are many other web sites and documents which give a better
  overview of Emacs, its history, and related matters. Rather than
  attempt to reproduce much of that here, I suggest that you check out
  some of the places listed in Section ``Other Resources'' section of
  this document.


  1.3.1.  Ports and Versions

  It's worth pointing out that there are actually two different Emacs
  editors: GNU Emacs and XEmacs. Both come from the same heritage and
  share most of the same features. This document focuses on GNU Emacs
  (version 20.3, specifically) but much of what you'll read here will
  apply just as well to XEmacs and earlier versions of GNU Emacs.
  Throughout this document I will simply refer to ``Emacs''. When I do
  so, bear that in mind.


  1.3.2.  Getting Emacs

  Getting Emacs is easy. If you are using a popular Linux distribution
  like Debian, RedHat, Slackware, or any of the others, Emacs is
  probably an optional package that you can install from your
  distribution media. If not, you can get the Emacs source code and
  compile it yourself. Visit the GNU web site for the exact location:
  http://www.gnu.org/software/emacs/emacs.html


  2.  Running Emacs



  2.1.  Starting & Quitting Emacs

  As a new user, you'll probably want to launch Emacs just to mess
  around and try it out. Once you're into Emacs and want to exit,
  however, you may not be able to figure out what to do. So if you've
  never used Emacs before, give it a shot right now. At your shell
  prompt, type emacs and hit enter. Emacs should start up. If not, it is
  either not installed or not in your path.


  Once you've seen Emacs, you need to know how to exit. The keystrokes
  for leaving Emacs are C-x C-c. The C-x notation means hold down the
  Ctrl key and press x. In this case, you'll then need to hold down Ctrl
  and press c to finish the task.


  The keystrokes used in Emacs will likely seem odd, foreign, and maybe
  even uncomfortable to you at first--especially if you're a vi user.
  Unlike vi, Emacs doesn't have separate modes for editing text and
  issuing commands.


  To re-cap: emacs will start Emacs. C-x C-c will exit Emacs.


  2.1.1.  What you'll see

  When Emacs starts up it will consume a whole X window (or screen if
  you're running on a console instead of in the X Window System). You'll
  see a menu across the top, some text in the main part of the screen,
  and a couple of lines at the bottom.


  It will look something like this ASCII sketch:


  +----------------------------------------------------------------------+
  |Buffers Files Tools Edit Search Mule Help                             |
  |                                                                      |
  |Welcome to GNU Emacs, one component of a Linux-based GNU system.      |
  |                                                                      |
  |                                                                      |
  |                                                                      |
  | ...                                                                  |
  |                                                                      |
  |---1:---F1  *scratch*         (Lisp Interaction)--L1--All-------------|
  |For information about the GNU Project and its goals, type C-h C-p.    |
  +----------------------------------------------------------------------+



  NOTE: Emacs will usually fill the entire screen/window. I've shrunk
  the above example to save space here. You will also see a welcome
  message in Emacs when you first start it. I omitted that as well and
  substituted ``...'' instead. The welcome message simply identifies the
  exact version of Emacs you are using as well as pointing you to the
  on-line help and related items.


  2.1.1.1.  The Menu Bar

  The topmost line of the Emacs interface is a menu. If you're running
  X, you'll recognize them as traditional pull-down menus that you can
  access using your mouse. Otherwise you'll need to use keyboard
  shortcuts (not covered here) for accessing the menus.
  2.1.1.2.  The Status Bar and Mini-buffer

  Of the last two lines in the Emacs interface, the topmost one is
  essentially a status bar. It contains information about the buffer
  you're working in, which mode Emacs is in, and various other things.
  For now, just realize that it's there.


  The bottommost line is called the mini-buffer. It is separated from
  the main buffer by the status bar we just discussed. You can think of
  the mini-buffer as the Emacs ``command-line''. It is where commands
  that you give Emacs appear and it is where status messages are printed
  in response to things you do.


  You'll find that what I've called the status bar is usually referred
  to as the mode line in Emacs related documentation. It is where Emacs
  displays information about the current modes(s) you may be using as
  well as things like the current date and time, line number, file size,
  and almost anything else you might want to see there.


  2.2.  Some Terminology

  This section covers the most basic of Emacs terminology that you'll
  encounter when using and reading about Emacs.


  2.2.1.  Buffers & Files

  Unlike some editors, when you open a file in Emacs it does not stay
  ``open'' the entire time you're working with it. Instead, Emacs reads
  the file into a buffer in memory. While you're editing the buffer and
  working with the data nothing is changed on disk. Only when you
  actually save the buffer does the file on disk get updated. There are
  advantages and disadvantages to this approach but it is only important
  that you understand that it works this way.


  As a consequence, you will see the term ``buffer'' used in Emacs
  documentation, modes, packages, and so on. Just realize that buffer
  means ``a copy of the file that is currently in memory.'' Oh, it's
  worth pointing out that a buffer doesn't always have to refer to a
  specific file on disk. Often times Emacs will create buffers as the
  result of commands you run. Such buffers may contain the result of the
  command, a list of selections to pick from, and so on.


  2.2.2.  Point & Region

  In Emacs lingo, you'll often hear or see references to the point. In
  general terms the point is the cursor. The actual distinction between
  the point and cursor probably isn't important when you're first
  starting out with Emacs. But if you are curious, think about it this
  way. The cursor is the visual representation of the point. The cursor
  is always ``on'' a particular character position in the current
  buffer. The point, on the other hand, lives in the space between
  characters on in the buffer. So you might say that if the cursor is on
  the letter `h' in the word ``the'' then the point is between the `t'
  and the `h'.


  Like many modern editors, Emacs allows to perform operations (indent,
  spell-check, reformat, cut, copy, paste, ...) on a section of the
  current buffer. You can highlight (or ``mark'') a block of text using
  the keyboard or mouse and then perform operations on just the selected
  block of text. In Emacs, that block of text is called a region.


  2.2.3.  Windows

  Okay, this will be a bit confusing to anyone who has ever used a GUI
  interface before. Just remember that Emacs was developed long before
  GUI interfaces and window managers were popular.


  A window in Emacs is an area of the screen in which a buffer is
  displayed. When Emacs is first started, you have one window on your
  screen. Some Emacs functions (such as the help and documentation)
  often [temporarily] open up additional windows in your Emacs screen.


  Emacs windows have nothing to do with X windows in the GUI sense. You
  can open up additional X windows to display Emacs buffers, maybe to
  compare two files side by side. Those new X windows are referred to as
  frames in Emacs lingo. Read on.


  2.2.4.  Frames

  In Emacs, a frame is a separate X window in which an Emacs buffer is
  displayed. But both are part of the same Emacs session. The behavior
  is somewhat (but not too much) like what happens if you hit Alt+N in
  Netscape Navigator.


  2.3.  Keyboard Basics

  This section covers the basics of keyboarding for Emacs. Like every
  powerful editor, everything that you can do with Emacs is just a few
  keystrokes away.


  If you're a vi user, the notion of using the k, j, l, h keys to move
  up a line, down a line, forward by a character, and backward by a
  character probably took some getting used to. In fact, it might have
  taken you a few hours or even weeks of practice before you could
  comfortably navigate a file using the various key combinations
  available in vi.


  Emacs is no different. There are different keystrokes and commands to
  learn. Just like vi, you only need to master the basics to get a lot
  of work done. Then, as time goes on, you can slowly expand your
  knowledge and find faster ways of doing things.


  2.3.1.  Command Keys (Meta, Esc, Control, and Alt)

  As you'll soon learn, Emacs makes heavy use of multi-key combinations.
  Because it is not a modal editor like vi, you don't have to think
  about being in ``command mode'' or ``editing mode'' before you can try
  to move the cursor or execute a command. Instead, you just press the
  right combination of keys and Emacs does as told (usually).


  The keys that Emacs makes the most use of are usually abbreviated in
  the documentation as C (for Control or Ctrl) and M for (Meta). While
  most modern PC keyboards have one or more keys labeled Ctrl few have
  one labeled Meta. You'll want to mentally substitute either Esc or Alt
  for the Meta key. In most standard configurations, both Esc and Alt do
  essentially the same thing.
  So when you see a reference in any Emacs related documentation to C-x
  f it means ``press control-x and then f.'' And if you see a reference
  to something like M-x shell is means ``press alt-x and type the word
  shell''.


  A very useful command for beginners is M-x apropos or C-h a. apropos
  will search the Emacs on-line documentation for all functions and
  search for the regular expression you type. This is a great way to
  discover all commands related to frames. Simply C-h a and then frame.


  2.3.2.  Moving Around in a Buffer

  Now that you know what all those fancy abbreviations mean, here's a
  list of the most common keystrokes for moving within a buffer:


  Keystrokes  Action
  -----------------------------------
  C-p         Up one line
  C-n         Down one line
  C-f         Forward one character
  C-b         Backward one character
  C-a         Beginning of line
  C-e         End of line
  C-v         Down one page
  M-v         Up one page
  M-f         Forward one word
  M-b         Backward one word
  M-<         Beginning of buffer
  M->         End of buffer
  C-g         Quit current operation
  -----------------------------------



  And, as you might expect, the cursor keys (or arrow keys) usually work
  just as you'd expect. Your Backspace may not. That's another story.
  :-(


  2.3.3.  Essential Commands

  Okay, now that you know how to move around within a buffer what about
  opening and saving files? Search? Here are some basic commands.


  Before we jump straight to those commands, I need to briefly point out
  how this works.


  All ``command keystrokes'' in Emacs (those that are M-x something or
  C-something) are actually just shortcuts to functions which are part
  of Emacs. You can call any of those functions by typing M-x function-
  name and hitting Enter. You can also use the keyboard shortcut for
  that function (if it has one).


  For example, the Emacs function which saves a buffer to disk is called
  save-buffer. By default it is also bound to C-x C-s. So, you can
  either use they shortcut to save the current buffer, or you could type
  M-x save-buffer and achieve the exact same result.


  All of the most common functions have keyboard shortcuts by default.
  Some of them are listed below.


  Keystrokes  Function           Description
  -------------------------------------------------------------------
  C-x C-s     save-buffer        Save the current buffer to disk
  C-x u       undo               Undo the last operation
  C-c C-f     find-file          Open a file from disk
  C-s         isearch-forward    Search forward for a string
  C-r         isearch-backward   Search backward for a string
              replace-string     Search & replace for a string
              replace-regexp     Search & replace using regexp
  C-h t       help-with-tutorial Use the interactive tutorial
  C-h f       describe-function  Display help for a function
  C-h v       describe-variable  Display help for a variable
  C-h x       describe-key       Display what a key sequence does
  C-h a       apropos            Search help for string/regexp
  C-h F       view-emacs-FAQ     Display the Emacs FAQ
  C-h i       info               Read the Emacs documentation
  C-x r m     bookmark-set       Set a bookmark. Useful in searches
  C-x r b     bookmark-jump      Jump to a bookmark.
  -------------------------------------------------------------------



  As you try many of those functions, you'll notice that many will
  prompt you for input. They will always to do in the mini-buffer. This
  is similar to using the : commands in vi or most commands that you'd
  use within your favorite Unix shell.


  Emacs has literally hundreds of built-in functions available. The list
  above is a tiny sample that represents those that I use regularly. See
  the on-line help for a more complete listing of the available
  functions and more complete documentation on those I mentioned above.


  2.3.4.  Tab Completion

  Like many popular Unix shells (bash, csh, tcsh, ...) Emacs offers
  command completion via the Tab key. In fact, the command completion in
  bash was modeled after that in Emacs, so if you use that feature in
  bash you'll be right at home.


  As an example, try M-x search and then hit Tab. Emacs will append a
  hyphen to indicate that there are several possible completions but
  they all have a hyphen as the next character. Hit Tab once more and
  Emacs will display a list of the possible matches for you to choose
  from. Notice that it does so in a new window. It temporarily splits
  your display into two windows: one which contains the buffer you were
  editing and the other contains the list of possible completions for
  ``search-''. You may hit C-g to exit out of the selection process and
  close the new window.


  2.4.  Tutorial, Help, & Info

  Emacs comes with an on-line tutorial which walks you through the basic
  editing features and functions that everyone should know. It also
  explains how to use the other help features in Emacs.



  I highly recommend that you spend some time going through the tutorial
  if you plan on making a serious effort to learn Emacs. As shown in the
  table above, you can enter the tutorial via C-h t. The tutorial is
  self-guided and aimed at folks who are just getting started with
  Emacs.


  If you are running Emacs in X, you will see that the rightmost menu on
  the menu bar is labeled Help. As you explore the Help menu notice that
  some items have keyboard shortcuts and those are listed right in the
  menu.


  Finally, to see the volume of documentation available with Emacs, you
  should try M-x info or C-h i which launches Info, the Emacs
  documentation browser.


  3.  Emacs Modes

  Emacs modes are different behaviors and features which you can turn on
  or off (or customize, of course) for use in different circumstances.
  Modes are what make one editor (Emacs) equally useful for writing
  documentation, programming in a variety of languages (C, C++, Perl,
  Python, Java, and many more), creating a home page, sending E-Mail,
  reading Usenet news, keeping track of your appointments, and even
  playing games.


  Emacs modes are simply libraries of Lisp code that extend, modify, or
  enhance Emacs is some way.


  3.1.  Major vs. Minor Modes

  There are fundamentally two types of modes available: Major and Minor.
  The distinction isn't the easiest thing to grasp until you've worked
  with a few of them off and on, but let's give it a shot.


  Only one major mode can be active at a given time. Many minor modes
  can be active at a given time. Major modes tend to be language or
  task-specific, while minor modes are smaller and less specific
  utilities that cut across many tasks.


  Sounds kind of abstract, so let's try an example. There's a mode that
  I use quite often when I'm writing plain old text files. It's called
  text-mode. This mode was designed for writing free form text like a
  README file. It understands how to identify words and paragraphs and
  generally makes sure that it does what I expect when I use the normal
  navigation keystrokes.


  When I'm writing text for human consumpiton, I typically want it to
  look good. It should be properly word-wrapped to a reasonble value and
  so on. To enable word wrapping I just turn on the auto-fill minor
  mode. This mode tries to do the Right Thing when I'm typing along and
  hit the end of the line. The fact that it is a minor mode means that
  it can work with several different major modes. My notion of the
  ``Right Thing'' to do when I hit the end of the line is different when
  I'm in text-mode than it is when I'm in java-mode for example. I don't
  want my Java code to be word-wrapped as if was English text. But I do
  want the blocks of comments in my Java code to be word wrapped! auto-
  fill mode is smart enough to figure that out.

  The authors of various Emacs modes have done a great job of making
  sure that things that should work as minor modes are minor modes.


  If you look back at that ASCII sketch of an Emacs screen, you'll
  notice that the mode line identifies the mode(s) that Emacs is in. In
  that case it was in a mode called ``Lisp Interaction'' which is the
  default mode. It's really only useful if you're going to be writing
  Lisp code. (But since most of Emacs is written in Lisp, why not?)


  3.2.  Programming Modes

  First and foremost, Emacs was designed by a programmer for
  programmers. There are high-quality modes available for almost every
  popular programming language you can think of (and even some not so
  popular ones). I only briefly describe a few of them here.


  Most programming modes share some common characteristics. Usually,
  they'll do some or all of the following:


  o  Provide color-syntax highlighting for the language.

  o  Provide automatic indentation and code formatting for the language.

  o  Provide context (language) sensitive help.

  o  Automatically interface with your debugger.

  o  Add language-specific menus to the menu bar.


  In addition, there are some non-language specific modes that help out
  with tasks that are common to programming in many languages. Things
  like interfacing to your version control software, automatically
  adding comments to your code, creating Makefiles, updating Change Logs
  and so on.


  When you add all these modes together and consider the maturity and
  stability of the Emacs code, it compares quite nicely to commerically
  marketed Integrated Development Environments (IDEs) for languages like
  C++ and Java. And, of course, it's free.


  3.2.1.  C/C++/Java

  Because the syntax of C, C++, and Java are quite similar, there is one
  Emacs mode which handles all three languages (as well as Objective-C
  and IDL). It's a very mature and complete package and it included in
  the Emacs distribution. This mode is called either cc-mode or CC Mode.


  For more details or to download a newer version, visit
  http://www.python.org/emacs/.


  3.2.2.  Perl

  There are actually two modes for editing Perl code in Emacs. The first
  is called perl-mode (as you would expect) and the second is cperl-
  mode. I don't have a good grasp of this history and why there are two
  modes (the docs don't say), but it would appear that perl-mode was the
  original mode for editing Perl code in Emacs. It seems to have fewer
  features than cperl-mode and is lacking the ability to recognize some
  of Perl's fancier langugage constructs.


  Personally, I use and recommend cperl-mode which seems to be quite
  actively maintained and has just about every feature I could ever
  want. You can find the latest release here: ftp://ftp.math.ohio-
  state.edu/pub/users/ilya/emacs.


  But don't take my word for it. Try them both and pick the one that
  best meets your needs.


  3.2.3.  Python

  Python (another very popular scripting language) has an Emacs mode
  available for it as well. As far as I can tell, it is not distributed
  with GNU Emacs but it distributed with XEmacs. It works quite well in
  both editors, though.


  You can get python-mode from the official Python web site
  http://www.python.org/emacs/python-mode/.


  3.2.4.  Others

  There are many many other editing modes available to help out
  programmers. Such modes help out with things like:


  o  Shell Scripts (Bash, sh, ksh, csh, ...)

  o  Awk, Sed, Tcl, ...

  o  Makefiles

  o  Change Logs

  o  Documentation

  o  Debugging


  And much more. See the last section of this document for more
  information on finding other modes and add-ins.


  3.3.  Authoring

  Fancy Emacs modes are not limited to just those who write code. Folks
  writing documentation (of any sorts) can also benefit from a wide
  selection of Emacs modes.


  3.3.1.  Spell-Checking ( ispell  mode)

  Authors of many types of documents need to spell-check once in a
  while. If you have GNU ispell installed, you can type M-x ispell and
  spell-check the current buffer. If ispell finds words that it doesn't
  know, it prompts you with a list of possible replacements and lets you
  select one (or none) of them. It's functionally equivelant to the
  spell-checkers in many popular non-free software packages.


  3.3.2.  HTML ( html-helper  mode)

  If you find yourself writing HTML files once in a while (or even a
  lot), you might want to try out html-helper-mode. It is available from
  http://www.santafe.edu/~nelson/tools/ as is the documentation and
  related stuff.


  As its name suggests, html-helper-mode provides lots of things to help
  out those folks who still write HTML by hand--the old fashioned way.


  3.3.3.  TeX ( tex-mode )

  When you're writing documents in TeX, it's often helpful to get Emacs
  to add some color and highlight the backslashes, braces and other
  charcters. tex-mode takes care of that for you.


  Though I don't write much directly in TeX anymore, when I did this
  mode proved to be quite helpful in making my TeX source a bit more
  readable.


  3.3.4.  SGML ( sgml-mode )

  The document you're now reading was written in SGML (and probably
  converted to the format you're reading it in). sgml-mode provides all
  the basics for SGML documents: validation, highlighting, forward-tag,
  backward-tag, and much more. It is a standard part of Emacs.


  3.4.  Other Modes

  Of course, there are lots of other handy modes to make life easier.
  Here's just a sampling of the popular ones:


  3.4.1.  Version Control ( vc  mode)

  vc mode interfaces with most of the popular version control back-ends
  (RCS, SCCS, CVS) to make it very easy to check files in and out,
  manage releases and so on. It is a standard part of Emacs and is
  documented in the Emacs documentation.


  3.4.2.  Shell Mode

  Why switch to another X window or virtual console just to run a few
  shell commands? Do it from within Emacs and save yourself the trouble.
  :-)


  M-x shell will launch a shell within an Emacs buffer. You can do most
  things with this buffer that you could do with a normal shell prompt
  (except for running full screen programs like vi or pine) because
  Emacs is talking to your real shell behind the scenes.


  This is a standard part of Emacs, too, so you'll find it documented in
  the Emacs docs.



  3.4.3.  Telnet and FTP

  Why switch to another X window or virtual console just to run telnet
  or FTP?  Do it from within Emacs and save yourself the trouble.
  (Notice the pattern yet?)


  Just like running a shell inside of Emacs, you can telnet and ftp. Try
  M-x telnet or M-x ftp to experience it for yourself. See the
  documentation for all the gory details.


  3.4.4.  Man

  Why switch to another X window or virtual console just to read a
  manual page?  Do it from within Emacs and save yourself the trouble.
  (I promise. I'll stop.)


  Just like running a shell inside of Emacs, you can read manual pages.
  Try M-x man to experience it for yourself. See the documentation for
  more.


  3.4.5.  Ange-FTP

  To quote the ange-ftp documentation:


       This package attempts to make accessing files and directo-
       ries using FTP from within GNU Emacs as simple and transpar-
       ent as possible.  A subset of the common file-handling rou-
       tines are extended to interact with FTP.



  That means you can treat files on remote machines as if there were
  local. So if you need to edit a file on a different computer, just
  tell Emacs to open it (using a slightly different path syntax) and it
  takes care of all the details of logging in and retrieving the file.
  Then, when you save the file via C-x C-s, ange-ftp intercepts the save
  and writes the file back to the remote machine.


  The slightly different path syntax goes like this... A file named
  ``myfile'', in a ``user'''s directory, on a machine named
  ``my.host.org'' can be opened by opening (C-x f) the file:


       /user@my.host.org:~user/myfile



  This, also, is a standard part of the Emacs distribution so you can
  find it documented in the Emacs documentation.


  Thanks to Etienne Grossmann (etienne@anonimo.isr.ist.utl.pt) for the
  example above.


  4.  Customizing Emacs

  Virtually all Emacs customization is done via Lisp code. You can
  modify variables which influence the way Emacs operates or you can add
  new functions to Emacs (or override existing functions--replacing them
  with your own.


  4.1.  Temporary Customization

  While experimenting with Emacs customization, you'll probably want to
  do it in a way that is temporary. If you do something horribly wrong,
  you can just C-x C-c to exit emacs and run it again. Once you've
  figured out what changes you'd like to make permenant, you can add
  them to your very own .emacs file so that they take effect every time
  you start Emacs. This is discussed in the next section.


  4.1.1.  Variable Assignments

  The easiest customizations are accomplished by changing the value of a
  variable in Emacs. The list code to do this looks like this:


  (setq variable-name new-value)



  Where variable-name is the name of the variable and new-value is the
  value you'd like to give the variable. (In Lisp-speak, you're binding
  a variable to a value.) The setq function in lisp is analagous to the
  assignment operators (ususally =) in other programming languages.


  NOTE: I'm glossing over many details here for the sake of simplicity.
  You may also see me or others use the Lisp functions set and even
  setq-default. If you're really curious, feel free to look them up in
  an Emacs Lisp reference.


  Let's look at a line from my .emacs file


  (setq-default transient-mark-mode t)



  The variable transient-mark-mode controls whether or not a region
  becomes highlighted when I mark it. In many GUI applications, if you
  click and drag the mouse to select a range of text it becomes
  hilighted in reverse video or some other color. Emacs will do the same
  thing it the transient-mark-mode varible is set (to a non-nil value).


  A WHAT value?


  Okay. Brief digression. Most programming languages have some notion of
  true/false values. In C/C++ a value is considered true if it is a non-
  zero value. In Perl, a non-null or non-zero value is true. In Lisp,
  the same idea applies but the names and symbols are different.


  True is usually written as t and false (or null) is written as nil.
  Like in other languages, though, any non-nill value is considered
  true.



  To get the full description of what transient-mark-mode does, you can
  use the on-line help. Type C-h v or M-x describe-variable and then
  transient-mark-mode. If you're lazy like me, you can take advantage of
  variable name completion using the Tab key. Just type part of the
  variable name and hit the Tab key. If you've typed enough of it that
  Emacs can already uniquely identify it, you'll see the whole name
  completed for you.


  Another variable that folks often set is fill-column. It tells Emacs
  how wide the screen should be for the purposes of word-wrapping (and
  auto-fill-mode respects this value). To set the value to something
  absurd, you could type:


  (setq fill-column 20)



  But that won't actaully do anything. You need to tell Emacs to
  evaluate the expression you typed. To do so, put the point (cursor) at
  the end of the expression end then type C-x C-e, which calls the
  function eval-last-sexp in case you care. When you do that, noice that
  20 (or whatever value you used) is echoed back to you in the mini-
  buffer at the bottom of the screen. That's just the return value from
  the expression you evaluated.


  Just to prove that it works, type a sentence or two. If you happen to
  have auto-fill-mode enabled (you probably don't), you'll notice the
  text wrapping at the 20 column mark. Otherwise, after you've typed
  some stuff, type M-q which calls the function fill-paragraph. It will
  then perform the word wrapping.


  4.1.2.  File Associations

  You can configure Emacs to automatically do something when you open a
  file of a particular type (just like some GUIs will automatically
  launch a specific application if you click on the icon for a
  particular file). For example, I may want Emacs to automatically
  switch to text-mode every time I open a file with a .txt extension.
  Well, that already happens. :-) So let's tell Emacs to always enter
  text-mode when you open a file named ``README''.


  (setq auto-mode-alist (cons '("README" . text-mode) auto-mode-alist))



  Huh?


  Without diving into lots of Lisp programming that you really don't
  need to know (but it wouldn't hurt you to learn), let just say that
  the variable auto-mode-alist contains a list of pairs. Each pair
  contains a regular expression and an Emacs mode name. If a file you
  open matches the regular expression (in this case, the string README)
  Emacs starts the mode you specified.


  The funny syntax above is because we're actaully adding another pair
  to that mode list. You wouldn't want to just assign to auto-mode-alist
  without making sure the values that it already contains aren't lost.
  And if I wanted Emacs to automatically switch to html-helper-mode
  every time that I opened a file that ended with .html or .htm, I would
  add this to my .emacs file:


  (setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist))
  (setq auto-mode-alist (cons '("\\.htm$" . html-helper-mode) auto-mode-alist))



  The possibilities are truly endless.


  4.2.  Using a .emacs  File

  After you've spent some time with Emacs and have a basic idea of what
  customization can do for you, you'll probably want to customize a few
  things permanently (or at least until you change your mind). If you
  find yourself using Emacs on a daily basis, you'll also notice that
  your .emacs file get bigger as time goes on. That's a Good Thing
  because it means you've figured out how to make Emacs work the way you
  want it do work. It's a shame that more software products don't let
  you do that.


  In case you haven't already guessed, every time you start Emacs, it
  looks for a file named .emacs in your home directory. Your .emacs file
  is where you should put any Lisp code that you want run automatiaclly
  and that includes the sort of customization we've been dealing with
  here.


  Another example from my .emacs file:


  (setq inhibit-startup-message t)



  The inhibit-startup-message variable controls whether or not Emacs
  displays that welcome message when it starts. After a while, I got
  sick of looking at it (because I knew how to find the help and
  whatnot), so I went in search of a way to turn it off.


  As an exercise, try creating a .emacs file of your own and add that
  line to it. Then exit and start Emacs again. You should not see the
  welcome message.


  Often times when your read about an Emacs mode (or a package), the
  documentation will suggest some code to add to your .emacs file in
  order to make the mode or package work in a particular way.


  The GNU Emacs FAQ (C-h F) contains some items related to .emacs files
  that you might find useful.


  4.3.  The Customize Package

  As Emacs has grown in popularity and continuted to evolved, someone
  eventaully said ``there has to be a better way to let novice users
  customize their Emacs.'' And customize was born.
  Customize provides a more intuitive method of customizing parts of
  Emacs. To try it out, either visit the Customize sub-menu in your Help
  menu, or type M-x customize.


  Customize groups customization into logical groups like ``Editing'',
  ``Programming'', ``Files'', and so on. Some groups contain sub-groups.


  If you make changes using the customize interface, Emacs will save the
  changes to your .emacs file. That's rather handy, because you can
  easily inspect (and change) the changes it made for you.


  I don't use the Customize interface, so I can't say much more about
  it..


  4.4.  X Windows Display

  Like any well behaved X application, Emacs respects your X resources.
  That means you can control the initial colors, geometry, and other X
  specfic things just as you could with an xterm, nxterm, or whatever.


  Here's the relevant bit of my ~/.Xdefaults file:


  emacs*Background: DarkSlateGray
  emacs*Foreground: Wheat
  emacs*pointerColor: Orchid
  emacs*cursorColor: Orchid
  emacs*bitmapIcon: on
  emacs*font: fixed
  emacs.geometry: 80x25



  See your X manual page for more details about X resources.


  Chris Gray (cgray4@po-box.mcgill.ca) also notes:


       In Debian, the ~/.Xdefaults doesn't seem to be used.  How-
       ever, Debian people can put what you have given in
       /etc/X11/Xresources/emacs and they can have the pretty col-
       ors that they had when they were using RedHat.



  5.  Popular Packages

  In addition to the many different modes available for Emacs, there are
  also many add-on packages. I call them packages because they're more
  than just new modes. They often include extra utilities or are so
  large that calling them modes just doesn't seem to do them justice. In
  still other cases, they are software which extends or integrates other
  Emacs modes and packages. The distinction isn't entirely clear, but
  that's okay.



  5.1.  VM (Mail)

  To quote the VM FAQ:


       VM (View Mail) is an Emacs subsystem that allows mail to be
       read and disposed of within Emacs. Commands exist to do the
       normal things expected of a mail user agent, such as gener-
       ating replies, saving messages to folders, deleting messages
       and so on. There are other more advanced commands that do
       tasks like bursting and creating digests, message forward-
       ing, and organizing message presentation according to vari-
       ous criteria.



  When I first began using Emacs, I tried VM out for a while. I found it
  to be a great replacement for Pine, Elm, or most any other mail
  program. But I didn't want to use separate programs to read mail and
  news. VM is actively developed and well supported today.


  It is available here: http://www.wonderworks.com/vm/.


  5.2.  Gnus (Mail and News)

  To quote the GNUS Manual:


       Gnus is a message-reading laboratory. It will let you look
       at just about anything as if it were a newsgroup. You can
       read mail with it, you can browse directories with it, you
       can ftp with it---you can even read news with it!



       Gnus tries to empower people who read news the same way
       Emacs empowers people who edit text. Gnus sets no limits to
       what the user should be allowed to do. Users are encouraged
       to extend Gnus to make it behave like they want it to
       behave. A program should not control people; people should
       be empowered to do what they want by using (or abusing) the
       program.



  GNUS is what I currently use for mail and news (as hinted above). GNUS
  is also actively developed and well supported today.


  It is available here: http://www.gnus.org/.


  5.3.  BBDB (A rollodex)

  BBDB is an Insidious Big Brother Database, a rollodex-like program for
  Emacs that works with most of the popular Emacs Mail packages (VM and
  GNUS included).


  It is available here:
  http://pweb.netcom.com/~simmonmt/bbdb/index.html.



  5.4.  AucTeX (another TeX mode)

  AucTeX is another mode for editing TeX files.


  To quote the AucTeX web site:


       AUC TeX is an extensible package that supports writing and
       formatting TeX files for most variants of GNU Emacs. Many
       different macro packages are supported, including AMS TeX,
       LaTeX, and TeXinfo.



  It is available here: http://sunsite.auc.dk/auctex/.


  6.  Other Resources

  This section covers books, web sites, newsgroups, mailing lists, and
  other places you can find more information about Emacs.


  6.1.  Books

  There are a a few really good books available for learning Emacs. In
  addition to these, you'll find that many Linux and Unix books also
  contain a chapter or two about Emacs (and vi).


  6.1.1.  Learning GNU Emacs

  Authors: Debra Cameron, Bill Rosenblatt, Eric S. Raymond


  Publisher: O'Reilly & Associates - http://www.ora.com/


  You can buy it at a discount from Amazon.com via their Associates
  program: http://www.amazon.com/exec/obidos/ASIN/1565921526/


  Commentary: This is probably the best book to start with. After you've
  read the HOWTO and looked through the FAQ this book serves as a
  comprehensive and very approachable tutorial.


  6.1.2.  Writing GNU Emacs Extensions

  Author: Bob Glickstein


  Publisher: O'Reilly & Associates - http://www.ora.com/


  You can buy it at a discount from Amazon.com via their Associates
  program: http://www.amazon.com/exec/obidos/ASIN/1565922611/


  Commentary: After you've used Emacs for a while and have decided that
  you'd like to try writing your own mode or maybe try out some advanced
  customization, this is the book for you. While it doesn't attempt to
  teach Lisp, it does contain a brief introduction to the language.


  6.1.3.  Programming in Emacs Lisp: An Introduction

  Author: Robert J. Chassell


  From the README file:


       This is an elementary introduction to programming in Emacs
       Lisp for people who are not programmers, and who are not
       necessarily interested in programming, but who do want to
       customize or extend their computing environment.



  You can retrieve the manual in its entirety via anonymous FTP from the
  GNU FTP server: ftp://prep.ai.mit.edu/gnu/emacs/.


  You can buy a nicely printed version from Amazon.com via their
  Associates program:
  http://www.amazon.com/exec/obidos/ASIN/1882114418/jeremydzawodny/.


  Commentary: This a good introductory manual for Emacs Lisp--even if
  you're not a heavy-duty programmer.


  6.1.4.  The GNU Emacs Lisp Reference Manual

  Author: Richard Stallman


  Publisher: The Free Software Foundation - http://www.fsf.org/


  You can retrieve the manual in its entirety via anonymous FTP from the
  GNU FTP server: ftp://prep.ai.mit.edu/gnu/emacs/.


  Commentary: This is the definitive guide to the Emacs Lisp programming
  language.


  6.2.  Web Sites

  6.2.1.  EMACSulation

  EMACSulation is a column written by Eric Marsden that appears in the
  on-line magazine Linux Gazette located at
  http://www.linuxgazette.com/. The most recent column as of this
  writing is located at
  http://www.linuxgazette.com/issue39/marsden.html. Scan to the bottom
  of the article for links to previous ones.


  6.3.  Newsgroups

  Search you local news feed for newsgroups which contain the string
  ``emacs'' and you'll probably find many. Those which my server carries
  are:


  o  comp.emacs


  o  comp.emacs.sources

  o  gnu.emacs

  o  gnu.emacs.bug

  o  gnu.emacs.help

  o  gnu.emacs.sources


  6.4.  Mailing Lists

  The only mailing list devoted to Emacs that I know of right now is the
  NT-Emacs list. It is a list for folks who are using the Micro$oft
  Windows version of Emacs. See the NT-Emacs FAQ
  http://www.cs.washington.edu/homes/voelker/ntemacs.html for more.
  information.


  6.5.  The Emacs Lisp Archive

  From the Emacs Lisp Archive README:


       The Emacs Lisp archives on ftp.cis.ohio-state.edu contain
       various pieces and packages of Emacs Lisp code.  Emacs Lisp
       is the language used to extend the GNU Emacs editor pub-
       lished by the Free Software Foundation.  Although much Emacs
       Lisp code is included in the GNU Emacs distribution, many
       people have written packages to interface with other sys-
       tems, to better support editing the programming language
       they use, to add new features, or to change Emacs' default
       behavior.  Most of the contents of this archive have been
       written by individuals and distributed publicly over the
       Internet through the info-emacs or info-gnu-emacs mailing
       lists or the comp.emacs, gnu.emacs, or gnu.emacs.sources
       newsgroups.



  The archives are available via anonymous FTP from ftp://ftp.cis.ohio-
  state.edu/pub/emacs-lisp/.


  NOTE: As far as I can tell, the Emacs Lisp Archive is slowly becoming
  out of date. I see very few new (or updated) packages appearing there,
  though I know they exist. They do get posted to the comp.emacs.sources
  newsgroup. (Feel free to correct me if this is wrong.)


  7.  Credits

  The following people have contributed to the success of this document.


  o  Robert Vollmert rvollmer@gmx.net

  o  Larry Brasfield larrybr@seanet.com

  o  Etienne Grossmann etienne@anonimo.isr.ist.utl.pt

  o  Thomas Weinell kf6mli@amsat.org

  o  Adam C. Finnefrock adam@bigbro.biophys.cornell.edu

  o  Chris Gray cgray4@po-box.mcgill.ca

  o  Robert J. Chassell bob@rattlesnake.com

  o  Isaac To kkto@csis.hku.hk

  o  Matteo Valsasna valsasna@elet.polimi.it

  o  Tijs van Bakel smoke@casema.net



  The Linux Emacspeak HOWTO
  Jim Van Zandt, jrv@vanzandt.mv.com
  v.1.6, 10 April 1999

  This document describes how a blind user can use Linux with a speech
  synthesizer to replace the video display.  It describes how to get
  Linux running on your own PC, and how to set it up for speech output.
  It suggests how to learn about Unix.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Stage 1. DOS with speech

     2.1 Getting Linux on CDROM
     2.2 Getting Linux by FTP
     2.3 Linux Documentation

  3. Stage 2. Terminal to remote UNIX system

     3.1 Learning Unix
     3.2 Learning Emacs

  4. Stage 3. Terminal to local Linux system

     4.1 Installing Linux
     4.2 Learning Unix System Administration

  5. Stage 4. Emacspeak under Linux

     5.1 Emacspeak Introduction - Speech Enabled Normal Commands
     5.2 Emacspeak Introduction - New Commands
     5.3 Emacspeak Introduction - Using the Help System

  6. Footnotes and References

     6.1 JAWS
     6.2 TELIX
     6.3 COMMO
     6.4 SimTel
     6.5 InfoMagic
     6.6 Walnut Creek
     6.7 Red Hat
     6.8 Craftwork
     6.9 Yggdrasil
     6.10 Emacs for DOS
     6.11 GNU Mirror Sites
     6.12 Emacspeak with Earlier Slackware Releases

  7. Frequently Asked Questions (FAQ)

     7.1 Why does it say "space" after each character?
     7.2 Why the high pitched tone from a DECtalk?
     7.3 Why the "No library autorevert in search path" message?
     7.4 How do I change Emacspeak defaults?
     7.5 What if an error message is not spoken?
     7.6 The terminal emulator is the most problematic portion of Emacspeak.
     7.7 In a term buffer, the first half screen is not spoken
     7.8 Term mode gets flaky after a long session.

  8. Legalese


  ______________________________________________________________________

  1.  Introduction

  Emacspeak is an Emacs subsystem that allows the user to get feedback
  using synthesized speech.

  Screen reading programs allow a visually impaired user to get feedback
  using synthesized speech. Such programs have been commercially
  available for well over a decade. Most of them run on PC's under DOS,
  and there are now a few screen-readers for the Windows platform.
  However, screen-readers for the UNIX environment have been conspicuous
  in their absence.

  This means that most visually impaired computer users face the
  additional handicap of being DOS-impaired :-)

  Emacspeak is an emacs subsystem that provides basic speech access.
  Emacspeak will always have the shortcoming that it will only work
  under Emacs.  This said, there is very little that cannot be done
  inside Emacs, so it's not a real shortcoming:-) Within Emacs, you can
  open a "shell window" where you can run commands and examine their
  output, even output which has scrolled out of the window.  Emacs
  provides special modes for running certain commands.  For example, it
  can parse error messages printed by a compiler and open a separate
  edit window with the cursor at the point of the error.  It can also
  run a debugger and keep a separate edit window open at the point in
  the source code corresponding to the program counter.

  Emacspeak does have a significant advantage: since it runs inside
  Emacs, a structure-sensitive, fully customizable editor, Emacspeak
  often has more context-specific information about what it is speaking
  than its commercial counterparts.  In this sense, Emacspeak is not a
  "screenreader", it is a subsystem that produces speech output.  A
  traditional screen-reader speaks the content of the screen, leaving it
  to the user to interpret the visually laid-out information.
  Emacspeak, on the other hand, treats speech as a first-class output
  mode; it speaks the information in a manner that is easy to comprehend
  when listening.

  This initial version provides a basic speech subsystem for Emacs;
  using Emacs' power and flexibility, it has proven straightforward to
  add modules that customize how things are spoken, e.g. depending on
  the major/minor mode of a given buffer.  Note that the basic speech
  functionality provided by Emacspeak is sufficient to use most Emacs
  packages effectively; adding package-specific customizations makes the
  interaction much smoother.  This is because package-specific
  extensions can take advantage of the current context.

  Emacspeak will only work with emacs.  However, emacs can be used to
  run any program that has a command-line interface (ls, cd, rm,
  adduser, etc.).  In general use M-x shell to run such programs.

  You can even run those like less or lynx which use escape sequences to
  control the appearance of the screen.  The key to this is term mode,
  which you get with the emacs command M-x term.

  Let me insert here some explanation, because the word "terminal" is
  used in several senses.  The original terminal was of course an
  electromechanical device that translated keystrokes into character
  codes and received the same codes and printed the characters.
  Eventually these were replaced by entirely electronic "dumb terminals"
  which also implemented escape sequences to clear the screen, move the
  cursor, etc.  Unix adapted to these by introducing an abstract notion
  of a "terminal" with very general capabilities.  A program like a text
  editor issues generic commands, which are translated into the commands
  suitable for your terminal.  The choice of translation is controlled
  by the variable "TERM" in the environment.  One common value for this
  variable is "vt100", since many terminals implement the same commands
  as the DEC VT100.  The Emacs command `M-x term' starts a virtual
  terminal with its own set of cursor commands.  It notifies the
  operating system of this by setting the environment variable "TERM" to
  the value "eterm" (which is why it is sometimes called eterm mode).

  Note that this Unix "terminal" is concerned only with escape commands
  for the display.  Let me just mention a couple of other kinds of
  "terminal" to distinguish them from the Unix concept: For DOS, there
  are "terminal emulators" like COMMO and TELIX that simulate a
  terminal, and can be used to connect to a remote computer via a serial
  port (and usually a modem).  That is, they accept keystrokes and send
  the character codes out a serial port, and receive character codes
  from the serial port and display them.  Unix has similar programs,
  such as minicom and seyon.  Both DOS and Unix have another program
  called "telnet" which can establish a similar connection to a separate
  computer using the Internet (that is, a TCP/IP connection rather than
  a serial connection).  The program "kermit" is available for both DOS
  and Unix, and can establish either kind of connection.  However, none
  of these should be confused with the eterm mode of emacs.  There is
  nothing about eterm mode that implies a connection to a remote
  computer.

  Note that in most cases there is an emacs mode that works better than
  the separate program in an eterm buffer.  That is, instead of "less",
  just open a buffer on the file.  Instead of "lynx", use w3.  Instead
  of "man", use `M-x man', and type the name of the program in the
  minibuffer.

  Remember, though: ordinary command-line oriented programs are best run
  in shell mode, which starts with the command `M-x shell'.

  Emacs is a large program, but it does not all have to be in RAM,
  because Linux has virtual memory.  You can designate a swap partition,
  so that programs (or parts of programs) can be swapped out when they
  are not being used.  You can comfortably run emacs with 8 MB of ram
  plus 8 MB of swap space.

  This document is limited to the following:


  o  Linux (not Free BSD)

  o  The Slackware distribution (not Red Hat, Debian, etc.)

  o  Speech output only (not Braille - see the Access HOWTO)

  o  DECtalk (Dectalk Express and MultiVoice), DoubleTalk, LiteTalk,
     Braille 'n Speak, Type 'n Speak, Braille Lite, Apollo, and Accent
     synthesizers (--not the SmarTalk, a sound card, etc.)

  o  Use of Emacs, with T. V. Raman's Emacspeak package, to drive the
     synthesizer.

  The use of adaptive technology with Linux, and in particular, using
  adaptive technology to make Linux accessible to those who could not
  use it otherwise, is covered in the Linux Access HOWTO.

  If you would like to help extend this document to cover one or more of
  the other alternatives, or point me to a discussion somewhere else,
  please contact me.

  The most recent version of this document should be available in
  several formats at  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/> and
  its mirrors (see below).  The plain text version should be available
  at  <ftp://leb.net/pub/blinux/doc/>.

  Emacspeak was written by T. V. Raman raman@adobe.com.  Emacspeak has a
  Web page at
  <http://www.cs.cornell.edu/Info/People/raman/emacspeak/emacspeak.html>.

  Emacspeak supports several speech synthesizers.  The software required
  depends on which you have.

  If you have a DECtalk Express or MultiVoice, you need the basic
  Emacspeak package, tcl (an interpreter), and tclx (extensions for
  tcl).  You can get the source package for Emacspeak from the Emacspeak
  web page, or a binary package in one of the popular distributions of
  Linux (Slackware, Red Hat, or Debian).  I build each of these
  packages.  Since I normally run Debian, the Debian package will be
  available a little sooner than the others.  At this writing, the most
  recent release of Emacspeak is version 7.0.  Here are some URLs:

       <http://leb.net/pub/blinux/emacspeak/cornell.mirror>
       <ftp://leb.net/pub/blinux/emacspeak/blinux/emacspeak-6.0-2.i386.rpm>


  Note: there are European mirrors of the blinux site which you should
  use if they closer:

       <ftp://ftp.uni-muenster.de/share/public6/>
       <ftp://ftp.gwdg.de/pub/linux/misc/blinux/>


  For the internal DECtalk PC, you also need a kernel driver which is
  available from <ftp://leb.net/pub/blinux/dectalk_pc-0.91.tgz>

  Extract it with the command: `tar xfz dectalk_pc-0.91.tgz' and then
  follow the installation instructions found in the README file.  This
  driver apparently works with both the original DECTALK-pc and the new
  DECTALK-PC II.

  For the external DoubleTalk, LiteTalk, Accent, or Apollo synthesizers,
  or for the Braille 'n Speak, Type 'n Speak, or Braille Lite devices in
  "speech box" mode, you need the Emacspeak package and a separate
  "speech server" which comes in the emacspeak-ss package:

       <ftp://leb.net/pub/blinux/emacspeak/blinux/emacspeak-ss-0.5.tar.gz>


  The DoubleTalk and LiteTalk are also supported by a separate speech
  server which has been packaged for Red Hat and Debian systems:

       <http://www.mv.com/ipusers/vanzandt/emacspeak-dt-tcl-1.2.tar.gz>
       <ftp://leb.net/pub/blinux/emacspeak/blinux/emacspeak-
       dt-1.2-1.i386.rpm> <http://www.mv.com/ipusers/vanzandt/emacspeak-
       dt_0.27-1_i386.deb> <http://www.mv.com/ipusers/vanzandt/emacspeak-dt-
       tcl_1.2-1_all.deb>


  For the internal DoubleTalk, you need three pieces of software: the
  basic Emacspeak package, the emacspeak-ss or emacspeak-dt package, and
  a device driver.  Here are some URLs for the device driver:

       <ftp://leb.net/pub/blinux/emacspeak/blinux/dtlk-1.12.tar.gz>
       <http://www.mv.com/ipusers/vanzandt/dtlk-1.12.tar.gz>
       <http://www.mv.com/ipusers/vanzandt/dtlk_1.12-1_i386.deb>



  There is a server for the Braille 'n Speak, Braille Lite, and Type 'n
  Speak devices used in "speech box" mode:

       <ftp://leb.net/pub/blinux/emacspeak/blinux/emacspeak-bs-
       tcl-1.2.tar.gz> <ftp://leb.net/pub/blinux/emacspeak/blinux/emacspeak-
       bs-tcl_1.2-1_all.deb> <ftp://leb.net/pub/blinux/emacspeak/blinux/emac-
       speak-bs-1.2-1.i386.rpm>


  Once again, the emacspeak-ss server handles all the synthesizers other
  than the DECtalk.  You should use that one if you don't mind building
  and installing a source package.

  Computer hardware, Unix user commands, Unix system administration,
  Emacs, and Emacspeak are each substantial subjects.  Attempting to
  learn all of them at once is likely to lead to frustration.  Instead,
  I suggest that the new user go through a sequence of stages, learning
  about only one system at a time.


  2.  Stage 1. DOS with speech

  Most blind computer users have speech synthesizers with a screen
  reader program like JAWS [``JAWS''].  (References in this format refer
  to entries in the "Footnotes and References" section below.)  Using
  this setup, install and become familiar with some terminal emulator
  like Telix [``TELIX''] or Commo [``COMMO''], which are available from
  the SimTel archive [``SimTel''] among others.


  2.1.  Getting Linux on CDROM

  If you have or can borrow a CDROM drive, I recommend you get one of
  the many good distributions of Linux on that medium.  The instructions
  below are for the Slackware distribution.  I am most familiar with
  disks from InfoMagic [``InfoMagic''].  Another source is Walnut Creek
  [``Walnut Creek''] (where the whole idea of inexpensive CDROMs full of
  programs from Internet archives got its start).  Distributions other
  than Slackware are available from Red Hat [``Red Hat''], Craftwork
  [``Craftwork''], and Yggdrasil [``Yggdrasil''].  As a rule, these
  CDROMs use the "ISO 9660" format, which can be read under DOS.  (They
  also use the "Rock Ridge extensions" which add extra files in each
  directory.  Linux uses the extra information to give you long
  filenames, both upper and lower case characters in filenames, and file
  permissions.)


  2.2.  Getting Linux by FTP

  Another way to get Linux and its documentation is by FTP over the
  Internet.  The home site for the Slackware distribution is Walnut
  Creek [``Walnut Creek''].  It is also carried by sunsite and many of
  it mirror sites.  Here is a partial list:


  o  USA (home site)  <ftp://ftp.cdrom.com/pub/linux/slackware>

  o  UK/Europe
     <ftp://src.doc.ic.ac.uk/public/Mirrors/ftp.cdrom.com/pub/linux/slackware-3.1>

  o  Japan  <ftp://ftp.cs.titech.ac.jp/pub/os/linux/slackware>

  o  Taiwan  <ftp://NCTUCCCA.edu.tw/OS/Linux/Slackware>

  o  Hong Kong  <ftp://ftp.cs.cuhk.hk/pub/slackware>

  o  USA  <ftp://metalab.unc.edu/pub/Linux/distributions/slackware>

  o  USA
     <ftp://uiarchive.cso.uiuc.edu/pub/systems/linux/sunsite/distributions/slackware>

  More sites are listed in the INFO-SHEET:

       <http://metalab.unc.edu/pub/Linux/welcome.html> <ftp://meta-
       lab.unc.edu/pub/Linux/docs/HOWTO/INFO-SHEET>
       <ftp://uiarchive.cso.uiuc.edu/pub/systems/linux/sun-
       site/docs/HOWTO/INFO-SHEET>



  2.3.  Linux Documentation

  Read the Linux documentation.  I will quote here the file names and
  locations on the first disk of InfoMagic's December 1996 "Developer's
  Resource" set of six CDROMs, as seen under DOS.  Other CDROM sets
  should have similar information, though perhaps differently arranged.
  The Slackware distribution is on disk 2 of the set.  Matt Welsh's step
  by step guide to installing Slackware is in
  \doc\install-\install-.002.  (This is a 245 page book!)

  More general information is in the Linux "Frequently Asked Questions"
  list in \docs\linux.faq\linux-fa.asc.  Longer descriptions are in
  "HOWTO" documents (of which this is one).  They are found in \docs.
  Note particularly \docs\hardware, which lists which kinds of hardware
  are supported by Linux, \docs\meta-faq, which points to sources of
  information (that is, a more extensive version of this paragraph), and
  \help\index, which is a list of the HOWTO documents with short
  descriptions.  The Linux installation HOWTO, \docs\installation, is
  another (much shorter, somewhat older) version of Matt Welsh's
  installation instructions.

  One note on reading the documentation.  You may run into files with
  ASCII highlighting, where character-backspace-character stands for
  "bold", and underscore-backspace-character stands for "italics".  One
  way to handle this is to use the less program, which displays these
  sequences in alternate colors.  A DOS screenreader can, for example,
  search for such highlighted text.  A DOS version of less can be
  obtained by FTP from the SimTel archive [``SimTel''].  Within the
  SimTel collection, look for directory msdos/textutil.  For example,
  try  <ftp://ftp.coast.net/pub/SimTel/msdos/textutil>.

  I will suggest four alternatives for learning Emacs commands (see
  section [``Learning Emacs'']).  The first option is to install Emacs
  under DOS and learn it while using the DOS screen reader.  Where to
  get Emacs for DOS is a "frequently asked question" [``Emacs for
  DOS''].

  The source code for Emacs (about 10 MB) can be gotten from
  <ftp://prep.ai.mit.edu/pub/gnu/> (look for emacs-19.34b.tar.gz or
  similar), or from one of many mirrors of the GNU collection [``Gnu
  Mirrors''].


  3.  Stage 2. Terminal to remote UNIX system



  Arrange for what is called a "shell account" on some Unix system.
  Most Internet Service Providers (ISPs) can provide this service.  Use
  the terminal emulator program and a modem to dial in.  Learn the basic
  Unix commands.  If the system has Emacs installed, or you can persuade
  the system administrator to install it, this is your second chance to
  learn it.  It is probably best to learn it at this point, because
  administering a Unix system (the next stage) will call for you to edit
  files.  Therefore, I include here my suggestions for learning both
  Unix and Emacs.


  3.1.  Learning Unix

  When you arrange for a shell account, or set up a new account on your
  own machine, you will have to decide on a username and a password.
  Your username will also be used in your email address, so try to find
  something short and memorable.  Your password is important, and should
  be hard to guess.  That usually means at least six characters,
  including at least one non-alphanumeric character.

  When a Unix system is ready for you to log in, it normally displays a
  prompt ending with "login:".  At this point you should type in your
  username.  It will then prompt you for your password, and will turn
  off command echoing while you type it in.

  The command to finish a terminal session is logout.

  To learn about a command, use the man command to display its manual
  page.  For example, learn more about the cp command by typing man cp.
  Of course, this helps only if you know or can guess the command name.
  However, each man page has a line near the beginning with the command
  name and a short description of what the command does.  You can search
  a database of these lines using the command apropos.  Thus, typing
  apropos working will list lines that include the word "working".
  Here's what that command prints here:


       cd (n)               - Change working directory
       pwd (n)              - Return the current working directory
       Cwd (3pm)            - get pathname of current working directory
       chdir (2)            - change working directory
       fchdir (2)           - change working directory
       get_current_dir_name (3) - Get current working directory
       getcwd (3)           - Get current working directory
       getwd (3)            - Get current working directory
       pwd (1)              - print name of current/working directory
       rcsclean (1)         - clean up working files



  The numbers in parentheses are sections of the manual.  User commands
  are in section 1.  Functions called from within programs are in sec-
  tions 2 and 3.  Commands used mostly by the system administrator are
  in section 8.  You can find out more about the on-line manual with the
  command man man.

  Under Unix, commands normally accept options starting with a minus
  sign rather than the forward slash used under DOS.  In a path,
  directory names are separated by forward slashes rather than backward
  slashes.  Both operating systems have a "standard input", by default
  the keyboard, and a "standard output", by default the display screen.
  You can redirect the standard input using "<", and redirect the output
  using ">".  You can use the output from one command as the input of
  another by separating the two commands with "|".  This is called the
  "pipe" symbol.

  The program that interprets your command is a "shell".  Under DOS,
  COMMAND.COM is the shell.  Most Unix shells are descendents of either
  the Bourne shell sh or the C shell csh.  The shell most commonly used
  with Linux is the "Bourne again shell", or bash.
  If a program gets "stuck", here is a sequence of keystrokes to try:


  o  Control-Q.  You may have sent a control-S, which halts all output,
     without realizing it.  The control-Q will restart it.

  o  Control-D, which signals "end of file" under Unix (similar to
     control-Z under DOS), in case the program expects input which you
     are not prepared to supply.

  o  Control-C is an interrupt, which may halt the program.

  o  Control-Z puts the program in the background.  At this point you
     may simply log out, although you will be warned about the
     background process and will have to repeat the logout command.  You
     can instead kill the process, as follows: Run ps with no arguments.
     It will list a header line, then one line for each of your
     processes.  The first item on each line is the process id number,
     or PID.  The command used to start the process (or at least the
     beginning of it) appears at the end of the line.  If the PID were
     117, you would kill the process with the command kill -9 117.

  o  If running Linux from the console, alt-2, or some other alt-number
     combination, will switch to a different virtual console.  You can
     log in there just as if you had sat down to a different terminal.

  o  If your machine is connected to a network, you can log in from
     another machine.

  o  Control-alt-del should reboot the computer nondestructively.

  o  As a last resort, you can hit "reset" or cycle the power.  This
     will leave the filesystems in an invalid state, since some buffers
     will not have been written to disk.  The kernel will discover this
     while booting, and will take time to check and repair the
     filesystems.  Actual data loss is unlikely unless you had something
     else going on at the time.

  Guido Gonzato Guido@ibogfs.cineca.it has written an excellent guide to
  Linux for (former) DOS users, the DOS2Linux mini-HOWTO.  You can
  probably find it where you found this document, or else at
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/mini/>.

  You can find general Unix information, including manual pages for
  several systems at <http://www.cis.ohio-
  state.edu/hypertext/man_pages.html>

  There is a tutorial entitled "Beginning Unix and the C Shell" at
  <http://www.eng.hawaii.edu:80/Courses/C.unix/page-03.html>.

  You can get general help from  <http://www.nova.edu/Inter-
  Links/UNIXhelp/TOP_.html> or <http://www.eecs.nwu.edu/unix.html>

  You can find a list of books on UNIX at
  <http://www.eskimo.com/~cher/eskimospace/booklist.html>.


  3.2.  Learning Emacs

  When you start Emacs, you will normally list on the command line one
  or more files which you will be editing.  To edit a file named
  "foobar" with Emacs, you would enter the command emacs foobar.  If you
  enter the command emacs with no arguments, GNU Emacs will print out an
  introduction which includes the first five commands you need to learn,
  approximately as follows:

     Type C-h for help;   (`C-' means use CTRL key.)
     Type C-x u to undo changes.
     Type C-h t for a tutorial on using Emacs.
     Type C-h i to enter Info, which you can use to read GNU documentation.
     To kill the Emacs job, type C-x C-c.



  Note the way Emacs documentation refers to key combinations.  C-h
  means hold the control key down while typing "h".  You will also run
  into key combinations like M-v, which is pronounced "meta v".  The
  tutorial suggests holding down the key labeled "edit" or "meta" then
  typing "v".  I have never run across a keyboard with those keys, so I
  always use the escape key instead: typing "Esc" then "v" (two separate
  keystrokes).  After using Emacs for a long time, I discovered that
  under Linux, the left "Alt" key works like a "meta" key.  You may want
  to use this.  On the other hand, some of these key combinations may
  conflict with your screen reader or communications program under DOS.
  Using the escape key is more reliable.

  Three of the above commands start with C-h, which may be treated as a
  backspace by your communications program.  In that case, you may
  access the help command using the long form M-x help.  Conversely, you
  may find that pressing the backspace key starts the help command.
  This issue is treated in the Emacs FAQ, which is available within
  Emacs using C-h F or M-x help F.  Look for the question "Why does the
  `Backspace' key invoke help?".  In the mean time, you can end the help
  session with the command C-g.  (This is the keyboard-quit command,
  which cancels any prefix keys you have typed.)

  You may also find that C-s and C-q are unavailable because they are
  used for flow control (XON and XOFF).  You should look at the question
  "How do I handle C-s and C-q being used for flow control?" in the FAQ.
  For the particular command C-x C-s (save buffer), you may substitute
  the command C-x s (save-some-buffers).  The former command saves the
  current buffer, while the latter asks the user about each of the
  modified buffers.

  Note in particular the command "C-h t" to start the Emacs tutorial.
  That is one the first things you will want to try.  I will only make a
  couple of comments on the tutorial.  To move the cursor, it gives the
  four commands C-f, C-b, C-p, and C-n (for forward, back, previous
  line, and next line).  These commands always work.  However, with a
  properly installed Emacs, the regular arrow keys should also work.
  Try them out and use them if you are more comfortable with them.
  Similarly, you may be able to use home, end, page down, and page up
  keys in place of the standard commands C-a, C-e, C-v, and M-v.
  Finally, all Emacspeak commands begin with C-e.  Once you start using
  Emacspeak, you will have to type it twice to get the end of line
  function.  (The "End" key should be unaffected by Emacspeak.)



  4.  Stage 3. Terminal to local Linux system


  This arrangement again requires a DOS machine with a speech
  synthesizer and a terminal emulator program.  However, instead of
  dialing up a remote computer, it is used as a terminal to a local
  computer running Linux.  To get to this point, you need to install
  Linux on a machine.  You may be able to prevail on a knowledgeable
  friend to help you with this.  However, it is also possible to install
  it yourself with speech feedback for almost the whole procedure.


  4.1.  Installing Linux


  First, some background.  Even the simplest Unix system requires a
  program called the kernel and a root file system.  The kernel has all
  the device drivers and resource management functions.  One normally
  thinks of a "file system" as residing on a hard disk or floppy disk,
  but during an installation it is usually in ram.  Linux is normally
  installed by writing a kernel image to a floppy disk, called the "boot
  floppy", configuring it to reserve a section of RAM for a ramdisk,
  then filling that ramdisk with data from a second floppy disk, called
  the "root floppy".  As soon as both floppies have been read in, the
  user can log in as "root" and complete the installation.  The sighted
  user logs in on the "system console", that is, the computer's own
  keyboard and video display.  However, remember that Unix has been a
  multiprocessing operating system from the very beginning.  Even this
  very primitive Unix system, running out of a small ramdisk, also
  supports logins from a terminal connected to a serial port.  This is
  what a blind user can use.

  To connect the two computers, you can use a "null modem", a serial
  cable that connects ground to ground, and transmit on each end to
  receive on the other.  The cable that comes with the DOS application
  LapLink will work fine.  It is particularly handy, in fact, because it
  has both a 9 pin and a 25 pin connector on each end.  If you want to
  check a cable or have one made, here are the required connections:

  For two 9 pin connectors, connect pin 2 (receive data) to pin 3, pin 3
  (transmit data) to pin 2, and pin 5 (signal ground) to pin 5.

  For two 25 pin connectors, connect pin 2 (receive data) to pin 3, pin
  3 (transmit data) to pin 2, and pin 7 (signal ground) to pin 7.

  For a 9 pin connector (first) to a 25 pin connector (second), connect
  pin 2 (receive data) to pin 2 (transmit data), pin 3 (transmit data)
  to pin 3 (receive data), and pin 5 (signal ground) to pin 7 (signal
  ground).

  You may have noted that I have included no connections for the
  "handshaking" signals.  During login, the serial port is handled by
  the program agetty.  Recent versions of this program accept a -L
  switch which tells it not to expect modem control signals.  The
  version in Slackware 3.0 does, but the one on the 3.0 (and earlier)
  installation root disks does not.  However, Pat Volkerding has assured
  me that the root disks in the next release of Slackware will have the
  updated version of agetty.  It is also possible to use the earlier
  root disks [``Emacspeak with Earlier Slackware Releases''].

  Consult the documentation on your CDROM, or downloaded from an FTP
  site, and choose a boot disk with the proper kernel features for your
  hardware (IDE or SCSI, CDROM driver, etc.).  I have the InfoMagic
  September 1996 "Developer's Resource" set of six CDROMs.  Slackware
  3.1 is on disk 1 of that set, mostly in the two directories slackwar
  and slakware.  (Note the difference in spelling.  You will access them
  in alphabetical order: first slackwar, then slakware.)

  Documentation on the boot floppies is in \bootdsks.144\which.one.  A
  copy of the DOS program for writing boot images to a floppy,
  rawrite.exe, is in the same directory.  Assuming the CDROM is the M
  drive under DOS, one might use these commands to write to a floppy
  disk in the A drive:



          C>m:
          M>cd \bootdsks.144
          M>rawrite scsinet.s a:



  Similarly, to write the "text" root disk:



               C>m:
               M>cd \rootdsks
               M>rawrite text.gz a:



  If you install from floppies, you should also copy the Emacspeak
  package onto a floppy with a command like this:



               C>copy m:\contrib\emacspea.tgz a:



  For the actual installation, proceed as follows: Use the null modem to
  connect the computer running DOS and equipped with speech output
  (which I will call the "DOS machine") to the computer into which you
  want to install Linux (the "Linux machine").

  Boot the DOS machine, and start your terminal emulation program.  Set
  it up for 9600 baud, no parity, eight data bits, 1 stop bit.

  On the Linux machine, insert the "boot" disk and boot (power up, cntl-
  alt-del, or hit the reset switch).  It should read the disk for five
  seconds or so, beep, and stop with the following text:

  (Note: in the following, the large blocks of text quoted from the
  installation disks are preceded by "-- begin quote" and followed by
  "-- end quote".  To skip to the end of a quote, you may search for two
  dashes starting in the first column.  I have word wrapped some
  sections to limit the line lengths.)


  -- begin quote



  Welcome to the Slackware96 Linux (v. 3.1.0) bootkernel disk!

  If you have any extra parameters to pass to the kernel, enter them at
  the prompt below after one of the valid configuration names (ramdisk,
  mount, drive2)

  Here are some examples (and more can be found in the BOOTING file):

    ramdisk hd=cyl,hds,secs    (Where "cyl", "hds", and "secs" are the
                               number of cylinders, sectors, and heads
                               on the drive.  Most machines won't need
                               this.)

  In a pinch, you can boot your system with a command like:
    mount root=/dev/hda1

  On machines with low memory, you can use mount root=/dev/fd1 or mount
  root=/dev/fd0 to install without a ramdisk.  See LOWMEM.TXT for
  details.

  If you would rather load the root/install disk from your second
  floppy drive: drive2 (or even this: ramdisk root=/dev/fd1)

  DON'T SWITCH ANY DISKS YET!  This prompt is just for entering extra
  parameters.  If you don't need to enter any parameters, hit ENTER to
  continue.

  boot:



  -- end quote



  I have almost always been able to just hit "enter" at this point.

  After your entry, the Linux machine should read the floppy for another
  twenty seconds or so, then boot the kernel.  The first thing it prints
  is "Loading ramdisk...", which is somewhat misleading.  In this case,
  "ramdisk" is actually the name of the kernel configuration.

  Each device driver in the kernel displays a line or two.  The
  particular disk I'm using (the "bare.i" bootdisk) displays more than
  one screen's worth.  It is possible to type shift-page up to scroll
  the text back.  On my machine, the boot messages are as follows:


  -- begin quote



  Loading ramdisk.....
  Uncompressing Linux...done.
  Now booting the kernel
  Console: colour VGA+ 80x25, 1 virtual console (max 63)
  Calibrating delay loop.. ok - 35.94 BogoMIPS
  Memory: 23028k/24768k available (688k kernel code, 384k reserved,
   668k data)
  Swansea University Computer Society NET3.035 for Linux 2.0
  NET3: Unix domain sockets 0.12 for Linux NET3.035.
  Swansea University Computer Society TCP/IP for NET3.034
  IP Protocols: ICMP, UDP, TCP
  VFS: Diskquotas version dquot_5.6.0 initialized
  Checking 386/387 coupling... Ok, fpu using exception 16 error reporting.
  Checking 'hlt' instruction... Ok.
  Linux version 2.0.0 (root@darkstar) (gcc version 2.7.2) #1 Mon Jun 10
  21:11:56 CDT 1996
  Serial driver version 4.13 with no serial options enabled
  tty00 at 0x03f8 (irq = 4) is a 16550A
  PS/2 auxiliary pointing device detected -- driver installed.
  Ramdisk driver initialized : 16 ramdisks of 49152K size
  hda: IBM-DBOA-2720, 689MB w/64KB Cache, LBA, CHS=700/32/63
  ide0: at 0x1f0-0x1f7,0x3f6 on irq 14
  Floppy drive(s): fd0 is 1.44M
  Started kswapd v 1.4.2.2
  FDC 0 is a 8272A
  Partition check:
    hda: hda1 hda2 hda3
  VFS: Insert root floppy disk to be loaded into ramdisk and press ENTER



  -- end quote



  Some messages will of course be different on a machine with different
  hardware.  Now, insert the "text" rootdisk and press ENTER.  After it
  is read, the following is displayed on the console:


  -- begin quote



  RAMDISK: Compressed image found at block 0
  JAVA Binary support v1.01 for Linux 1.3.98 (C)1996 Brian A. Lantz
  VFS: Mounted root (minix filesystem).
  INIT: version 2.60 booting
  none on /proc type proc (rw)
  INIT: Entering runlevel: 4


  Welcome to the Slackware Linux installation disk ,version 3.1.0-text!
  ### READ THE INSTRUCTIONS BELOW CAREFULLY! ###

  You will need one or more partitions of type "Linux native"
  prepared. It is also recommended that you create a swap partition
  (type "Linux swap") prior to installation. Most users can use the
  Linux "fdisk" utility to create and tag the types of all these
  partitions. OS/2 Boot Manager users, however, should create their
  Linux partitions with OS/2 "fdisk", add the bootable (root) partition
  to the Boot Manager menu, and then use the Linux "fdisk" to tag the
  partitions as type "Linux native".

  If you have 4 megabytes or less of RAM, you MUST ACTIVATE a swap
  partition before running setup. After making the partition with fdisk,
  use:

  mkswap /dev/<partition> <number of blocks> ; swapon /dev/<partition>

  Once you have prepared the disk partitions for Linux, type "setup" to
  begin the installation process.

  You may now login as "root".

  slackware login:



  -- end quote



  The program that prints the login prompt is called agetty.  The
  Slackware 3.1 root disks are set up to allow logins only from the
  computer's own keyboard.  You will have to reconfigure it to also
  allow logins from a serial port.  This requires typing four lines on
  the Linux machine keyboard, with no voice feedback.  If you realize
  you have made a mistake before hitting the carriage return, you can
  erase it with the backspace key.  You can also discard what you have
  typed on a line with control-C.  Here is what you type:



       root
       cat >>/etc/inittab
       s1:45:respawn:/sbin/agetty 9600 ttyS0
       control-D
       init q



  I will repeat that with explanations of what is going on.

  First, type "root" and a single carriage return to log in (no password
  is needed).  Next, you need to append one line to /etc/inittab.  Type
  the following two lines:

       cat >>/etc/inittab
       s1:45:respawn:/sbin/agetty 9600 ttyS0



  Finish each line with the "enter" key.  Then type a control-D, which
  signals end of file to a Unix program.  (Note: In the second line, the
  next to last character is an upper case "S".  Everything else is in
  lower case.)  This adds a line to the configuration file of the
  program init, to instruct it to use agetty to watch for logins on the
  first serial port on the Linux machine, called "COM1" under DOS, or
  "/dev/ttyS0" under Linux.  To use the second port instead, change the
  last item on the above line to "ttyS1".

  Then type



       init q



  which causes init to reread /etc/inittab.  At this point the DOS
  machine should display the login prompt (the third of the blocks of
  text quoted above).  On the DOS machine, type root, and finish the
  installation.  (The next thing you should do is create and enable a
  swap partition.)

  If you don't get the Slackware installation disk prompt, try the
  following:

  o  Type a single carriage return on the DOS machine.

  o  Recheck the terminal setup (9600 baud, no parity, eight data bits,
     1 stop bit)

  o  Disconnect the null modem from the DOS machine.  In its place,
     connect a modem which supports the Hayes "AT" commands.  Type AT
     and a carriage return.  You should get a reply of "OK" from the
     modem.

  Once you get the above prompt on the DOS machine, you may type root
  and a carriage return to log in, and complete the installation like
  any other user.  Of course, you must remember to include these
  packages: emacs, tcl, and tclX.

  The installation script will offer to prepare a boot floppy.  You
  should do this, since it is the most foolproof way to boot Linux.  You
  will probably also want to install lilo (which is an abbreviation for
  "Linux loader") and/or loadlin (which is an abbreviation for "load
  Linux").  The installation script can install lilo.  Loadlin is a DOS
  program that will let you boot from DOS to Linux.  Install it on a DOS
  partition, and copy a compressed kernel file (usually named zImage) to
  the same partition.  While running DOS, you may boot Linux with a
  command like loadlin zimage root=/dev/hda3 ro/.  (I have assumed here
  that the kernel image is in the same directory as the loadlin program.
  You may find it more convenient to store kernel images in
  subdirectories named for the kernel version.)

  After the Slackware setup script finishes the main installation, it
  will tell you to restart by pressing cntl-alt-del.  Before doing that,
  you should install emacspeak.  It can be found with the other
  "contributed" software.  In the InfoMagic set, it is in
  slackwar/contrib.  Assuming you are installing Linux directly from a
  CDROM, the setup script will mount the CDROM under /CDROM, and you may
  install emacspeak with the following command:



               # installpkg /CDROM/slackwar/contrib/emacspeak.tgz



  If you install from floppies, insert the floppy you made earlier and
  type this:


               # mount -tmsdos /dev/fd0 /floppy
               # cp /floppy/emacspea.tgz /tmp/emacspeak.tgz
               # installpkg /tmp/emacspeak.tgz



  You should not install the package directly off the floppy disk,
  because the DOS filesystem will not allow the full filename, so the
  installpkg program will think the package name is "emacspea" and will
  store its records under that name.

  If you have a DoubleTalk or LiteTalk speech synthesizer, you should
  also install the emacspeak-dt package.

  Reboot the Linux machine with the new boot floppy, with the DOS
  machine still connected.  You should get a login prompt on the DOS
  machine.  Celebrate!  After getting this system working, you need to
  learn emacs (third option) and Unix system administration.


  4.2.  Learning Unix System Administration


  Mostly you will learn system administration as the need arises.  First
  adding a user (yourself), then installing programs, and so forth.  The
  exception to this is making backups, which you should learn before you
  need them.

  Among the many programs you will need to learn are these:

     adduser
        Register a new user, including creating a home directory and
        adding an entry in /etc/passwd.


     tar
        Create and unpack .tar files, which are collections of files
        (something like .zip files).  To list the contents of an
        archive, use tar -tf foobar.tar.  For a more verbose listing,
        use tar -tvf foobar.tar.  To unpack an archive, use tar -xf
        foobar.tar.


     chmod
        Change permissions of a file or directory.


     chown
        Change ownership of a file or directory.


     find
        Search directories recursively.  For example, the command find .
        -name '*alpha*' -print means: search starting in the current
        directory (.) for a file whose name contains the string "alpha"
        (-name '*alpha*'), and print its path and name (-print).  (With
        GNU find, the -print is optional.)


     du Display the amount of space occupied by files or subdirectories.
        For a file with "holes", this may be much less than the length
        of the file.


     df Display filesystem capacities, free space, and where they are
        mounted.


     mount
        Display filesystems, where they are mounted, and the mount
        flags.


     ifconfig
        Configure and check internet protocol (IP) network interfaces,
        including Ethernet cards, SLIP links, and PLIP links.


     route
        Configure and check IP network routing, after the interface is
        configured.


     ping
        Check IP network connectivity, after the interfaces and routes
        are configured.


     ftp
        Transfer files across the Internet.


  Here are some programs you may want to install:

     agrep
        Approximate grep searches for approximate, not exact, string
        matches (also called "fuzzy string searches").


     archie
        Search Internet archives for files.


     flip
        Convert text files between Unix and DOS formats.


     glimpse
        Fuzzy string searches in large collection of files (uses agrep).


     lynx
        Text mode web browser.

  Here are some Web pages related to Unix system administration:


  General information <http://www.ensta.fr/internet/unix/sys_admin/> or
  <http://www.sai.msu.su/sysadm.html>

  There is a Unix system administration tutorial at
  <http://www.iem.ac.ru/sysadm.html>

  UnixWorld Online Magazine Home Page <http://www.wcmh.com/uworld/>

  Internet Essentials for UNIX System Administrators Tutorial
  <http://www.greatcircle.com/tutorials/ieusa.html>

  Pointers to Unix goodies available on the Internet
  <http://www.ensta.fr/internet/unix/>

  Pointers to Unix system administration "goodies" available on the
  Internet <http://www.ensta.fr/internet/unix/sys_admin/>


  5.  Stage 4. Emacspeak under Linux


  The Slackware setup script for Emacspeak should create the needed
  environment variables and install a script emacspeak that starts emacs
  with emacspeak.  This is your fourth option for learning Emacs.  This
  is the first time you will be able to actually use Emacspeak.  A short
  tutorial appears below.  Within Emacs, you may type C-h C-e to get a
  list of the commands.  To search for a command, use C-h a.  To get an
  explanation for a key sequence, use C-h k.  There is also an info file
  which is part of the Emacspeak distribution.  Within emacs, you may
  type C-h i to open the directory to the info pages.  Search for the
  emacspeak menu item by typing C-s emacspeak, then two carriage returns
  (one to terminate the search, and a second one to go to the info page.
  If you have the standalone info program installed, you can consult the
  info file with the command info Emacspeak.


  5.1.  Emacspeak Introduction - Speech Enabled Normal Commands

  All of the normal Emacs movement commands will speak the relevant
  information after moving.  Here are some of the cursor movement
  functions that have  been speech enabled.  Note that this list only
  enumerates a few of these speech enabled commands; the purpose of
  emacspeak is to speech-enable all of emacs and provide you spoken
  feedback as you work.  Thus, this list is here only as a
  representative example of the kind of speech-enabling extensions
  Emacspeak  provides.


     `C-n' or
        `M-x next-line' or `down'" Moves the cursor to the next line and
        speaks it.


     `C-p' or
        `M-x previous-line' or `up'" Moves the cursor to the previous
        line and speaks it.


     `M-f' or
        `M-x forward-word' or" Moves the cursor to the next word and
        speaks it.  Places point on the first character of the next
        work, rather than on the space preceding it (This is my personal
        preference).



     `M-b' or
        `M-x backward-word'" Moves the cursor to the previous word and
        speaks it.


     `M-C-b' or
        `M-x backward-sexp'" Moves the cursor to the previous sexp and
        speaks it.  If the sexp spans more than a line, only the first
        line is spoken.


     `M-<' or
        `M-x beginning-of-buffer'" Speaks line moved to.


     `M->' or
        `M-x end-of-buffer'" Speaks line moved to.


     `M-m' or
        `M-x back-to-indentation'" Speaks entire current line.  A useful
        way of hearing the current line.


  5.2.  Emacspeak Introduction - New Commands

  Emacspeak provides a number of commands for reading portions of the
  current buffer, getting status information, and modifying Emacspeak's
  state.

  All of the commands are documented in the subsequent sections.  They
  can be classified into types:

  The first group of commands are for listening to chunks of
  information.  The names of these commands all start with the common
  prefix `emacspeak-'.  All Emacspeak commands are bound to the keymap
  EMACSPEAK-KEYMAP and are accessed with the key `Control e'.  Thus, the
  Emacspeak command "emacspeak-speak-line" is bound to `l' in keymap
  EMACSPEAK-KEYMAP and can be accessed with the keystroke `Control-e l'.

  Here are some of the commands for reading text:


     `C-e c' or
        `M-x emacspeak-speak-char'" Speak current character, using the
        phonetic alphabet.


     `C-e w' or
        `M-x emacspeak-speak-word'" Speak current word.


     `C-e l' or
        `M-x emacspeak-speak-line'" Speak current line.  With prefix `C-
        u', speaks the rest of the line from point.  With negative
        prefix `C-u -', speaks from start of line to point.  Voicifies
        if voice-lock-mode is on.  Indicates indentation with a tone if
        audio indentation is in use.  Indicates position of point with
        an aural highlight if option emacspeak-show-point is turned on
        --see command `M-x emacspeak-show-point'.


     `C-e .' or
        `M-x emacspeak-speak-sentence'" Speak the current sentence.


  The second category of commands provided by Emacspeak report status of
  various kinds.


     `C-e k' or
        `M-x emacspeak-speak-current-kill'" Speak the current kill entry
        (which would be yanked by the next C-y).


     `C-e =' or
        `M-x emacspeak-speak-current-column'" State the column where
        point is.


     `C-e C-l' or
        `M-x emacspeak-speak-line-number'" State the line where point
        is.


     `C-e m' or `M-x emacspeak-speak-line-number'
        Speak the mode-line: the name of the buffer, how far point is
        into the current buffer as a percentage, and the major mode.


     `C-e M' or `M-x emacspeak-speak-minor-mode-line'
        Speak the minor modes that are in effect.


     `C-e v' or `M-x emacspeak-speak-version'
        Announce the emacspeak version.

  The third category of commands provided by Emacspeak manipulate the
  state of the speech device.  The names of these commands start with
  the common prefix `dtk-'.  Many of these commands take the prefix
  `Control-e d'.  Thus, the command "dtk-set-rate" is bound to `r' in
  keymap EMACSPEAK-DTK-SUBMAP and can be executed by pressing `Control e
  d r'.


     `C-e s' or
        `M-x dtk-stop'" Stop speech now.  In addition, any command that
        causes speech output will discard anything in the speech buffer.


     `C-e d V' or `M-x emacspeak-dtk-speak-version'
        Use this to find out which version of the Dectalk firmware you
        have.


     `C-e d I' or `M-x dtk-toggle-stop-immediately-while-typing'
        Toggle state of variable dtk-stop-immediately-while-typing.  As
        the name implies, if true then speech flushes immediately as you
        type.


     `C-e d i' or `M-x emacspeak-toggle-audio-indentation'
        Toggle state of Emacspeak audio indentation.  Specifying the
        method of indentation as `tone' results in the DECtalk producing
        a tone whose length is a function of the line's indentation.
        Specifying `speak' results in the number of initial spaces being
        spoken.


     `C-e d k' or `M-x emacspeak-toggle-character-echo'
        Toggle state of  Emacspeak  character echo (that is, whether
        typed characters are echoed).
     `C-e d w' or `M-x emacspeak-toggle-word-echo'
        Toggle state of  Emacspeak  word echo (initially on).


     `C-e d l' or `M-x emacspeak-toggle-line-echo'
        Toggle state of  Emacspeak  line echo (that is, whether typed
        text is echoed after typing enter).


     `C-e d p' or `M-x dtk-set-punctuations'
        Set punctuation state. Possible values are `some', `all', or
        `none'.


     `C-e d q' or `M-x dtk-toggle-quiet'
        Toggle state of the speech device between being quiet and
        talkative.  Useful if you want to continue using an emacs
        session that has emacspeak loaded but wish to make the speech
        shut up.


     `C-e d R' or `M-x dtk-reset-state'
        Restore sanity to the Dectalk.  Typically used after the Dectalk
        has been power cycled.


     `C-e d SPC' or `M-x dtk-toggle-splitting-on-white-space'
        Toggle state of emacspeak that decides if we split text purely
        by clause boundaries, or also include whitespace.


     `C-e d r' or `M-x dtk-set-rate'
        Set speaking rate for the dectalk.


     `C-e d s' or `M-x dtk-toggle-split-caps'
        Toggle split caps mode.  In split caps mode, a transition from
        lower case to upper case is treated like the beginning of a new
        word.  This is useful when reading Hungarian notation in program
        source code.


     `C-e d v' or `M-x voice-lock-mode'
        Toggle Voice Lock mode (initially off).  When Voice Lock mode is
        enabled, text is voiceified as you type it, as follows:

     o  Comments are spoken in voice-lock-comment-personality; (That is
        a variable whose value should be a personality name.)

     o  Strings are spoken in voice-lock-string-personality.

     o  Documentation strings are spoken in voice-lock-doc-string-
        personality.

     o  Function and variable names in their defining forms are spoken
        in voice-lock-function-name-personality.

     o  Certain other expressions are spoken in other personalities
        according to the value of the variable voice-lock-keywords.


  5.3.  Emacspeak Introduction - Using the Help System


  When you press C-h to get the help index, the screen will appear, but
  Emacspeak will not speak the window.  The only thing spoken is "Type
  one of the options listed or Space to scroll:".

  Here is the menu that Emacspeak is not speaking:


  -- begin quote



       You have typed C-h, the help character.  Type a Help option:
       (Use SPC or DEL to scroll through this text.  Type q to exit the Help
       command.)

       a  command-apropos.  Give a substring, and see a list of commands
               (functions interactively callable) that contain
               that substring.  See also the  apropos  command.
       b  describe-bindings.  Display table of all key bindings.
       c  describe-key-briefly.  Type a command key sequence;
               it prints the function name that sequence runs.
       f  describe-function.  Type a function name and get documentation of
       it.
       C-f Info-goto-emacs-command-node.  Type a function name;
               it takes you to the Info node for that command.
       F  view-emacs-FAQ.  Shows emacs frequently asked questions file.
       i  info. The  info  documentation reader.
       k  describe-key.  Type a command key sequence;
               it displays the full documentation.
       C-k Info-goto-emacs-key-command-node.  Type a command key sequence;
               it takes you to the Info node for the command bound to that
       key.
       l  view-lossage.  Shows last 100 characters you typed.
       m  describe-mode.  Print documentation of current major mode,
               which describes the commands peculiar to it.
       n  view-emacs-news.  Shows emacs news file.
       p  finder-by-keyword. Find packages matching a given topic keyword.
       s  describe-syntax.  Display contents of syntax table, plus
       explanations
       t  help-with-tutorial.  Select the Emacs learn-by-doing tutorial.
       v  describe-variable.  Type name of a variable;
               it displays the variable's documentation and value.
       w  where-is.  Type command name; it prints which keystrokes
               invoke that command.
       C-c print Emacs copying permission (General Public License).
       C-d print Emacs ordering information.
       C-n print news of recent Emacs changes.
       C-p print information about the GNU project.
       C-w print information on absence of warranty for GNU Emacs.



  -- end quote



  Suppose you type "a", for command-apropos.

  The next spoken prompt is "Apropos command (regexp):"

  Now you type some word you think is part of an emacs command, like
  "visit".

  The help system will display the first section of the help, but will
  leave the cursor in the other window.  The spoken text is "Type C-x 1
  to remove help window.  M-C-v to scroll the help."  At this point, I
  think it's more helpful to move point to the other window with C-x o,
  then you can use regular navigation commands to speak the help text.
  You can delete the help window with C-x 0, which will also put point
  back where it was.

  The complete menu displayed by help-for-help is also visible if you do
  a describe function on help-for-help.  In a future version of
  Emacspeak, Raman plans to add a message to that effect when the user
  presses C-h ?


  6.  Footnotes and References

  6.1.  JAWS

  Job Access With Speech (JAWS) is a screen reader which runs under
  Microsoft MSDOS.  JAWS for Windows supports Windows 95, Windows 98 and
  Windows NT.  Both are products of Henter-Joyce, Inc., 2100 62nd Avenue
  North, St. Petersburg, FL 33702, telephone: 800-336-5658.  For
  details, see  <http://www.hj.com>.


  6.2.  TELIX


  TELIX is a shareware terminal emulator for MSDOS.  It can be obtained
  by FTP from the SimTel archive [``SimTel''].  Within the SimTel
  collection, look for directory msdos/telix.  For example, try
  <ftp://ftp.coast.net/pub/SimTel/msdos/telix>.  The latest version of
  the program itself is in the four files tlx322-1.zip, tlx322-2.zip,
  tlx322-3.zip, and tlx322-4.zip.


  6.3.  COMMO


  COMMO is another shareware terminal emulator for DOS.  In the SimTel
  archive [``SimTel''], it is in directory msdos/commprog, file
  commo66.zip.  For example, try
  <ftp://ftp.coast.net/pub/SimTel/msdos/commprog/commo66.zip>.


  6.4.  SimTel


  The SimTel archive is maintained by Keith Petersen w8sdz@Simtel.Net.
  CD-ROM copies of Simtel.Net collections are available from Walnut
  Creek CDROM [``Walnut Creek''].  The primary ftp sites are
  <ftp://ftp.simtel.net/pub/simtelnet>, and
  <oak.oakland.edu://pub/simtelnet>.  There are many mirror sites, as
  listed in the following table:


  o  US, ALL (primary)   <ftp://ftp.simtel.net/pub/simtelnet>

  o  US, California      <ftp://ftp.cdrom.com/pub/simtelnet>

  o  US, California      <ftp://ftp.digital.com/pub/micro/pc/simtelnet>

  o  US, California      <ftp://ftp.lib.sonoma.edu/pub/simtelnet>

  o  US, Illinois
     <ftp://uiarchive.cso.uiuc.edu/pub/systems/pc/simtelnet>


  o  US, Massachusetts   <ftp://ftp.bu.edu/pub/mirrors/simtelnet>

  o  US, Michigan        <ftp://oak.oakland.edu/pub/simtelnet>

  o  US, New York        <ftp://ftp.rge.com/pub/systems/simtelnet>

  o  US, Oklahoma        <ftp://ftp.ou.edu/pub/simtelnet>

  o  US, Oregon          <ftp://ftp.orst.edu/pub/simtelnet>

  o  US, Pennsylvania    <ftp://ftp.epix.net/pub/simtelnet>

  o  US, Utah            <ftp://ftp.cyber-naut.com/pub/simtelnet>

  o  US, Virginia        <ftp://mirrors.aol.com/pub/simtelnet>

  o  Argentina           <ftp://ftp.satlink.com/pub/mirrors/simtelnet>

  o  Australia           <ftp://ftp.iniaccess.net.au/pub/simtelnet>

  o  Australia           <ftp://sunsite.anu.edu.au/pub/pc/simtelnet>

  o  Austria, Vienna     <ftp://ftp.univie.ac.at/mirror/simtelnet>

  o  Belgium             <ftp://ftp.linkline.be/mirror/simtelnet>

  o  Belgium             <ftp://ftp.tornado.be/pub/simtelnet>

  o  Bulgaria            <ftp://ftp.eunet.bg/pub/simtelnet>

  o  Brazil              <ftp://ftp.iis.com.br/pub/simtelnet>

  o  Brazil              <ftp://ftp.unicamp.br/pub/simtelnet>

  o  Canada, Ottawa      <ftp://ftp.crc.doc.ca/systems/ibmpc/simtelnet>

  o  Canada, Vancouver   <ftp://ftp.direct.ca/pub/simtelnet>

  o  Chile
     <ftp://sunsite.dcc.uchile.cl/pub/Mirror/simtelnet>

  o  China               <ftp://ftp.pku.edu.cn/pub/simtelnet>

  o  Czech Republic      <ftp://ftp.eunet.cz/pub/simtelnet>

  o  Czech Republic      <ftp://ftp.zcu.cz/pub/simtelnet>

  o  Czech Republic      <ftp://pub.vse.cz/pub/simtelnet>

  o  Finland
     <ftp://ftp.funet.fi/mirrors/ftp.simtel.net/pub/simtelnet>

  o  France              <ftp://ftp.grolier.fr/pub/simtelnet>

  o  France              <ftp://ftp.ibp.fr/pub/simtelnet>

  o  Germany             <ftp://ftp.mpi-sb.mpg.de/pub/simtelnet>

  o  Germany             <ftp://ftp.rz.ruhr-uni-bochum.de/pub/simtelnet>

  o  Germany             <ftp://ftp.tu-chemnitz.de/pub/simtelnet>

  o  Germany             <ftp://ftp.uni-heidelberg.de/pub/simtelnet>

  o  Germany             <ftp://ftp.uni-
     magdeburg.de/pub/mirrors/simtelnet>
  o  Germany             <ftp://ftp.uni-paderborn.de/pub/simtelnet>

  o  Germany             <ftp://ftp.uni-
     trier.de/pub/pc/mirrors/Simtel.net>

  o  Germany             <ftp://ftp.rz.uni-
     wuerzburg.de/pub/pc/simtelnet>

  o  Greece              <ftp://ftp.ntua.gr/pub/pc/simtelnet>

  o  Hong Kong           <ftp://ftp.cs.cuhk.hk/pub/simtelnet>

  o  Hong Kong           <ftp://ftp.hkstar.com/pub/simtelnet>

  o  Hong Kong           <ftp://sunsite.ust.hk/pub/simtelnet>

  o  Ireland             <ftp://ftp.iol.ie/pub/simtelnet>

  o  Israel              <ftp://ftp.huji.ac.il/pub/simtelnet>

  o  Italy               <ftp://cis.utovrm.it/simtelnet>

  o  Italy               <ftp://ftp.flashnet.it/pub/simtelnet>

  o  Italy               <ftp://ftp.unina.it/pub/simtelnet>

  o  Italy               <ftp://mcftp.mclink.it/pub/simtelnet>

  o  Japan               <ftp://ftp.iij.ad.jp/pub/simtelnet>

  o  Japan               <ftp://ftp.riken.go.jp/pub/simtelnet>

  o  Japan               <ftp://ftp.saitama-u.ac.jp/pub/simtelnet>

  o  Japan               <ftp://ftp.u-aizu.ac.jp/pub/PC/simtelnet>

  o  Japan               <ftp://ftp.web.ad.jp/pub/simtelnet>

  o  Japan               <ftp://ring.aist.go.jp/pub/simtelnet>

  o  Japan               <ftp://ring.asahi-net.or.jp/pub/simtelnet>

  o  Latvia              <ftp://ftp.lanet.lv/pub/mirror/simtelnet>

  o  Malaysia            <ftp://ftp.jaring.my/pub/simtelnet>

  o  Malaysia            <ftp://ftp.mimos.my/pub/simtelnet>

  o  Mexico              <ftp://ftp.gdl.iteso.mx/pub/simtelnet>

  o  Netherlands         <ftp://ftp.euro.net/d5/simtelnet>

  o  Netherlands         <ftp://ftp.nic.surfnet.nl/mirror-
     archive/software/simtelnet>

  o  New Zealand         <ftp://ftp.vuw.ac.nz/pub/simtelnet>

  o  Norway              <ftp://ftp.bitcon.no/pub/simtelnet>

  o  Poland              <ftp://ftp.cyf-kr.edu.pl/pub/mirror/Simtel.Net>

  o  Poland              <ftp://ftp.icm.edu.pl/pub/simtelnet>

  o  Poland              <ftp://ftp.man.poznan.pl/pub/simtelnet>


  o  Portugal            <ftp://ftp.ip.pt/pub/simtelnet>

  o  Portugal            <ftp://ftp.ua.pt/pub/simtelnet>

  o  Romania             <ftp://ftp.sorostm.ro/pub/simtelnet>

  o  Singapore           <ftp://ftp.nus.sg/pub/simtelnet>

  o  Slovakia            <ftp://ftp.uakom.sk/pub/simtelnet>

  o  Slovenia            <ftp://ftp.arnes.si/software/simtelnet>

  o  South Africa        <ftp://ftp.is.co.za/pub/simtelnet>

  o  South Africa        <ftp://ftp.sun.ac.za/pub/simtelnet>

  o  South Korea         <ftp://ftp.nuri.net/pub/simtelnet>

  o  South Korea         <ftp://ftp.sogang.ac.kr/pub/simtelnet>

  o  South Korea         <ftp://sunsite.snu.ac.kr/pub/simtelnet>

  o  Spain               <ftp://ftp.rediris.es/mirror/simtelnet>

  o  Sweden              <ftp://ftp.sunet.se/pub/simtelnet>

  o  Switzerland         <ftp://sunsite.cnlab-
     switch.ch/mirror/simtelnet>

  o  Taiwan              <ftp://ftp.ncu.edu.tw/Packages/simtelnet>

  o  Taiwan              <ftp://nctuccca.edu.tw/mirror/simtelnet>

  o  Thailand            <ftp://ftp.nectec.or.th/pub/mirrors/simtelnet>

  o  UK, Edinburgh       <ftp://emwac.ed.ac.uk/mirrors/simtelnet>

  o  UK, London          <ftp://ftp.demon.co.uk/pub/simtelnet>

  o  UK, Lancaster       <ftp://micros.hensa.ac.uk/pub/simtelnet>

  o  UK, London          <ftp://sunsite.doc.ic.ac.uk/packages/simtelnet>


  6.5.  InfoMagic

  Simtel      Ste D-InfoMagic is at 11950 N. Highway 89, Flagstaff AZ
  86004, telephone 800-800-6613 or 520-526-9565, fax 520-526-9573,
  email: info@infomagic.com, web:  <http://www.infomagic.com>.


  6.6.  Walnut Creek

  Walnut Creek CDROM has many useful CDROMs.  They are at 4041 Pike ,
  Concord, CA 94520, USA.  Telephone (800) 786-9907 or (510) 674-0783,
  or FAX (510) 674-0821.  email: orders@cdrom.com.  Web:
  <http://www.cdrom.com/>


  6.7.  Red Hat

  Red Hat Software: telephone 800-454-5502 or 203-454-5500, fax:
  203-454-2582, email: sales@redhat.com.  Web:  <http://www.redhat.com>.



  6.8.  Craftwork

  CraftWork Solutions, 4320 Stevens Creek Blvd, Suite 170, San Jose CA
  95129, telephone 800-985-1878, email: info@craftwork.com, web:
  <http://www.craftwork.com>.


  6.9.  Yggdrasil

  Yggdrasil Computing, 4880 Stevens Creek Blvd., Suite 205, San Jose CA
  95129-1024, telephone 800-261-6630 or 408-261-6630, fax: 408-261-6631,
  email: info@yggdrasil.com, web: <http://www.yggdrasil.com>.


  6.10.  Emacs for DOS

  From the Emacs FAQ of November 11, 1996:

  --begin quote


  93:  Where can I get Emacs for my PC running MS-DOS?

  A pre-built binary distribution of Emacs 19.34 should be available by
  the beginning of November 1996 from the Simtel archives, the main site
  of which is at

  <ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/>

  If you prefer to compile Emacs for yourself, you will need a 386 (or
  better) processor, and are running MS-DOS 3.0 or later.  According to
  Eli Zaretskii eliz@is.elta.co.il and Darrel Hankerson
  hankedr@dms.auburn.edu, you will need the following:

  Compiler: djgpp version 1.12 maint 1 or later.  Djgpp 2.0 or later is
  recommended, since 1.x is being phased out.  Djgpp 2 supports long
  filenames under Windows 95.

  You can get the latest release of djgpp by retrieving all of the files
  in

  <ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp>

  Gunzip and tar:

  The easiest way is to use "djtar" which comes with djgpp v2.x, because
  it can open gzip'ed tarfiles (i.e., those ending with ".tar.gz") in
  one step.  Djtar comes in "djdev201.zip", from the URL mentioned
  above.

  Utilities: make, mv, sed, rm.

  All of these utilities are available at

  <ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu>

  16-bit utilities can be found in GNUish:

  <ftp://ftp.simtel.net/pub/simtelnet/gnu/gnuish>

  The file INSTALL in the top-level directory of the Emacs source
  contains some additional information regarding Emacs under MS-DOS.  In
  addition, the file etc/MSDOS contains some information on the
  differences between the Unix and MS-DOS versions of Emacs.


  For the most comprehensive information on running GNU Emacs on a PC,
  see the file prepared by Michael Ernst mernst@theory.lcs.mit.edu at

  <ftp://theory.lcs.mit.edu/pub/emacs/pc-emacs.gz>

  For a list of other MS-DOS implementations of Emacs (and Emacs look-
  alikes), consult the list of "Emacs implementations and literature,"
  available at

  <ftp://rtfm.mit.edu/pub/usenet/comp.emacs/>

  Note that while many of these programs look similar to Emacs, they
  often lack certain features, such as the Emacs Lisp extension
  language.


  --end quote



  6.11.  GNU Mirror Sites

  The GNU collection at  <ftp://prep.ai.mit.edu/pub/gnu> is mirrored at
  many sites.  Mirrors in USA include these:

  o  <ftp://labrea.stanford.edu/pub/gnu>

  o  <ftp://wuarchive.wustl.edu/systems/gnu>

  o  <ftp://ftp.kpc.com/pub/mirror/gnu>

  o  <ftp://f.ms.uky.edu/pub3/gnu>

  o  <ftp://jaguar.utah.edu/gnustuff>

  o  <ftp://ftp.hawaii.edu/mirrors/gnu>

  o  <ftp://uiarchive.cso.uiuc.edu/gnu>

  o  <ftp://uiarchive.cso.uiuc.edu/pub/gnu>

  o  <ftp://ftp.cs.columbia.edu/archives/gnu/prep>

  o  <ftp://gatekeeper.dec.com/pub/GNU>

  o  <ftp://ftp.uu.net/systems/gnu>


  6.12.  Emacspeak with Earlier Slackware Releases

  If you want to install Slackware 3.0 or earlier, you will need to
  prepare a full null modem cable, including modem control signals.

  For two DB25 (25 pin) connectors, the required connections are:

  o  1 (Frame Ground) - 1 (Frame Ground)

  o  2 (Receive Data) - 3 (Transmit Data)

  o  3 (Transmit Data) - 2 (Receive Data)

  o  4 (Request To Send) - 5 (Clear To Send)

  o  5 (Clear To Send) - 4 (Request To Send)

  o  6 (Data Set Ready) - 20 (Data Terminal Ready)

  o  7 (Signal Ground) - 7 (Signal Ground)

  o  8 (Carrier Detect) - 20 (Data Terminal Ready)

  o  20 (Data Terminal Ready) - 6 (Data Set Ready)

  o  20 (Data Terminal Ready) - 8 (Carrier Detect)

  For two DB9 connectors, the connections are:

  o  1 (Carrier Detect) - 4 (Data Terminal Ready)

  o  2 (Receive Data) - 3 (Transmit Data)

  o  3 (Transmit Data) - 2 (Receive Data)

  o  4 (Data Terminal Ready) - 6 (Data Set Ready)

  o  4 (Data Terminal Ready) - 1 (Carrier Detect)

  o  5 (Signal Ground) - 5 (Signal Ground)

  o  6 (Data Set Ready) - 4 (Data Terminal Ready)

  o  7 (Request To Send) - 8 (Clear To Send)

  o  8 (Clear To Send) - 7 (Request To Send)

  o  9 (Ring Indicator) not connected

  For a DB9 (listed first) to a DB25 (second), the connections are:

  o  1 (Carrier Detect) - 20 (Data Terminal Ready)

  o  2 (Receive Data) - 2 (Transmit Data)

  o  3 (Transmit Data) - 3 (Receive Data)

  o  4 (Data Terminal Ready) - 6 (Data Set Ready)

  o  4 (Data Terminal Ready) - 8 (Carrier Detect)

  o  5 (Signal Ground) - 7 (Signal Ground)

  o  6 (Data Set Ready) - 20(Data Terminal Ready)

  o  7 (Request To Send) - 5 (Clear To Send)

  o  8 (Clear To Send) - 4 (Request To Send)

  o  9 (Ring Indicator) not connected


  7.  Frequently Asked Questions (FAQ)

  7.1.  Why does it say "space" after each character?

  Your DECtalk Express has old firmware.  Use the Emacspeak command `C-e
  d V' to find out your version.  You should be running a version no
  older than 4.2bw from March 1995.  If you have an earlier version, you
  can find an updated version at
  <http://www.ultranet.com/~rongemma/tips_upd.htm>, a WWW site
  maintained by Ron Jemma of the Dectalk Group at DEC.  Alternatively,
  you can send email to Anne Nelson at DECnelson@dectlk.enet.dec.com.
  The most recent version at this writing is 4.3 release AA X01 May 20
  1996.


  7.2.  Why the high pitched tone from a DECtalk?

  On occasion when reading the DECtalk will produce high pitch tones
  that last for several words or more, if this happens in a buffer it
  will often repeat within the same buffer.

  The problem is due to remaining bugs in the Dectalk firmware.  When
  emacspeak produces tones, especially when split caps is on, the dtk
  sometime goes into squealing mode.

  If you notice this happening in particular text documents, just turn
  off split caps mode locally with `C-e d s'.



  7.3.  Why the "No library autorevert in search path" message?

  What is the significance of the message "No library autorevert in
  search path" which is spoken (or at least queued for speech) when
  emacspeak 7.0 starts?

  It's completely insignificant. autorevert is a new minor mode provided
  by emacs 20 and emacspeak looks for it and if found speech-enables it.


  7.4.  How do I change Emacspeak defaults?

  What is the best way to change Emacspeak defaults for things such as
  speech rate, default punctuation mode, etc.?

  Just put the needed changes in your .emacs file.  ".emacs" is a file
  in your home directory that is loaded by emacs when it starts (shortly
  after reading emacspeak).  It is the place to do personal
  modifications.

  Here is an example which resets the speech rate and redefines a
  function (courtesy of Greg Priest-Dorman priestdo@cs.vassar.edu):



               ;;
               (dtk-set-rate 380 1)
               ;;
               (defun emacspeak-speak-time ()
                 "Speak the time. "
                 (interactive)
                 (dtk-speak  (format-time-string "%A %B %e, %I %M %p"
                     (current-time) )))
               ;;



  7.5.  What if an error message is not spoken?

  An error message was displayed on the screen, but not reported by
  Emacspeak

  In general, if emacs hits an error and you don't get to hear the
  message because it went by too quickly, here is what you should do:

  1) Switch to the *Messages* buffer and see if you see the message
  there. 99% of the time it will be there.

  2) If some portion of emacs or an emacs application throws an error
  without leaving an appropriate message in the *Messages* buffer, then
  turn on emacs' debugging facility by `M-x set-variable ret' `debug-on-
  error ret' `t ret' this sets debugon-on-error to true now repeat what
  caused the error you will be placed in a backtrace buffer.

  Warning: do not read the entire contents of the backtrace buffer at
  one shot with emacspeak.  Go line by line.  (courtesy of T. V. Raman
  raman@Adobe.COM)


  7.6.  The terminal emulator is the most problematic portion of Emacs-
  peak.

  It's not an emacspeak problem-- it's a terminal problem.  Getting a
  terminal emulator working correctly inside emacs is not a joke-- and
  eterm is an excellent piece of work, but depending on how some old app
  behaves you will (or should always expect to) see some weirdness.

  After all, remember all of these UNIX terminal apps work from all
  kinds of terminals ranging from vt52's to new devices.


  7.7.  In a term buffer, the first half screen is not spoken


  When starting a term buffer, no output is spoken in line mode by
  Emacspeak until the cursor has made it about half way down the screen

  I've not seen this-- and I am running emacs 20.

  When you start term it is in character mode.  When you switch to line
  mode make sure the cursor is at the end of the buffer-- otherwise what
  you send will never go to the shell.

  Also, in general use M-x shell (comint-mode) for running things you
  would run in line mode in eterm-- it's been around longer and far more
  robust. M-x term specializes in its character-mode of terminal
  emulation and may not always take care of everything in line mode.
  (courtesy of T. V. Raman raman@Adobe.COM)


  7.8.  Term mode gets flaky after a long session.

  Sometimes, after long sessions with a term buffer, I will experience
  similar problems as do you with spech in the term becoming very flaky.
  Output may or may not be spoken (I have not determined the pattern).

  if the term becomes flaky, enter character mode and issue a reset.
  the above is usually a result of running some curses based app that
  leaves the terminal in a screwy state.

  Many curses based apps follow slightly different conventions on where
  they leave the cursor while you edit-- 60-70% of them leave the cursor
  just after the character you typed with a null character after point.
  Others leave a space character there which is what you hear.

  Experiment between setting TERM to vt100 and eterm.  Depending on
  whether the app was linked against curses or ncurses (former uses
  TERMCAP and latter uses TERMINFO) you will get different results.



  8.  Legalese

  Copyright (c) 1998 by James R. Van Zandt jrv@vanzandt.mv.com.  This
  document may be distributed under the terms set forth in the LDP
  license at  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at tjbynum@metalab.unc.edu or linux-
  howto@metalab.unc.edu.



  Enterprise Java for Linux HOWTO
  Gary Meyer gary@meyer.net
  v 0.1, January 1999

  How to set up an Enterprise Java environment on Linux including a Java
  Development Kit, a Web server, supporting Java servlets, accessing a
  database via JDBC, and supporting Enterprise Java Beans (EJBs).
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Background
     1.2 Audience
     1.3 New Versions
     1.4 Copyrights and License
     1.5 Disclaimers
     1.6 Potential Future Sections
     1.7 Other Resources
     1.8 Feedback

  2. How to Setup the Java Development Kit

     2.1 Blackdown JDK
        2.1.1 Background
        2.1.2 Download
        2.1.3 Installation
        2.1.4 Setting up Your Environment
        2.1.5 Confirming Your Installation
        2.1.6 More Information
     2.2 IBM Java Developer Kit
        2.2.1 Background
        2.2.2 Download
        2.2.3 Installation
        2.2.4 Setting up Your Environment
        2.2.5 Confirming Your Installation
        2.2.6 More Information
     2.3 Kaffe
        2.3.1 Background
        2.3.2 Download and Installation
        2.3.3 Setting up Your Environment
        2.3.4 Confirming Your Installation
        2.3.5 More Information
     2.4 Sun J2SE
        2.4.1 Background
        2.4.2 Download
        2.4.3 Installation
        2.4.4 Setting up Your Environment
        2.4.5 Confirming Your Installation
        2.4.6 More Information

  3. How to Setup the Web Server

     3.1 Apache
        3.1.1 Background
        3.1.2 Download, Installation, and Setting up Your Environment
        3.1.3 Confirming Your Installation
     3.2 IBM Domino
     3.3 IBM HTTP Server
        3.3.1 Background
        3.3.2 Download
        3.3.3 Installation
        3.3.4 Setting up Your Environment
        3.3.5 Confirming Your Installation
        3.3.6 More Information

  4. How to Setup Java Servlet Support

     4.1 Allaire JRun
     4.2 Apache JServ
        4.2.1 Background
        4.2.2 Download
        4.2.3 Installation
        4.2.4 Setting up Your Environment
        4.2.5 Confirming Your Installation
        4.2.6 More Information
     4.3 BEA WebLogic
     4.4 Enhydra
     4.5 IBM WebSphere
     4.6 Locomotive

  5. How to Setup Java Server Pages (JSP) Support

     5.1 Apache Jakarta
     5.2 Caucho Resin

  6. How to Setup JDBC Support

     6.1 IBM DB2
     6.2 MiniSQL
     6.3 MySQL
     6.4 Oracle
     6.5 PostgreSQL
        6.5.1 Background
        6.5.2 Download and Installation
        6.5.3 Confirming Your Installation
        6.5.4 More Information
     6.6 Sybase
        6.6.1 Background
        6.6.2 Download
        6.6.3 Installation
        6.6.4 Confirming Your Installation
        6.6.5 More Information

  7. How to Setup Enterprise Java Bean (EJB) Support

     7.1 BEA WebLogic
     7.2 EJBoss
        7.2.1 Background
        7.2.2 Download
        7.2.3 Installation
        7.2.4 Setting up Your Environment
        7.2.5 Confiming Your Installation
     7.3 Bullsoft JOnAS EJB


  ______________________________________________________________________

  1.  Introduction


  1.1.  Background


  This document was started January, 1999 by Gary Meyer (
  gary@meyer.net) after several weeks of installing various open source
  and proprietary Enterprise Java products for Linux.  "Enterprise Java"
  is defined as using the Java Enterprise APIs.


  1.2.  Audience


  This HOWTO is intended to benefit software professionals who are
  interested in evaluating, developing, or deploying Enterprise Java on
  Linux.  Limited knowledge or experience in either Linux or Java is
  assumed.

  1.3.  New Versions



  The newest version of this document can be found at the author's
  website at http://24.8.19.113/ej4linux.html.


  1.4.  Copyrights and License


  Copyright (c) 1999 Gary Meyer.

  This document may be distributed only subject to the terms and
  conditions set forth in the LDP License at
  http://www.linuxdoc.org/COPYRIGHT.html.  This  document must not be
  distributed in modified form without the author's consent.

  1.5.  Disclaimers


  The suggestions in this document are provided to help you get a
  Enterprise Java environment on Linux up and running as quickly as
  possible.  The suggestions are not product  recommendations or
  endorsements.  As you become familiar with the options available, you
  can do you own product evaluations and determine what options are best
  for your particular purpose.

  For the purpose of this HOWTO, "Enterprise Java" is defined as using
  the Java Enterprise APIs. This HOWTO does not address scalability,
  availability, manageability, and other such aspects of software that
  are often associated with the word "enterprise."

  1.6.  Potential Future Sections


  This HOW has focused on the most popular aspects of Enterprise Java.
  The following sections may be added to this HOWTO.

  o  Integrated Development Environments (IDEs) that Support Enterprise
     Java for Linux

  o  Java Naming and Directory Interface (JNDI) Support

  o  Java Mail API (JMAPI) Support

  o  Java Transaction Service (JTS) Support

  o  Java Interface Definition Language (JIDL) Support

  o  Java Messaging Service (JMS) Support

  o  Common Object Request Broker Architecture (CORBA) Support

  Interested in authoring a section?

  Please contact the author, Gary Meyer, at ( gary@meyer.net).

  1.7.  Other Resources


  The App-Serv Center website at http://www.app-serv.com/.

  Java Enterprise in a Nutshell by David Flanagan et al at
  http://www.oreilly.com/catalog/jentnut/.

  1.8.  Feedback



  Please submit all additions and corrections to the author, Gary Meyer,
  at (gary@meyer.net).

  2.  How to Setup the Java Development Kit


  There are several Java Development Kits available for Linux.  These
  include:


  o  ``Blackdown JDK''

  o  ``IBM Java Developer Kit ''

  o  ``Sun J2SE ''

  o  ``Kaffe ''

  If you are going to try just one JDK, I suggest you initially try the
  Sun J2SE, unless you are recommended otherwise by specific software
  you are using or want to use. Additionally, if you are interested in
  an open source implementation, you will need to use Kaffe.

  2.1.  Blackdown JDK


  2.1.1.  Background


  The Blackdown JDK is a port of Sun JDK to Linux.  As of the time of
  this writing, the Blackdown JDK is current with JDK 1.2.2 on the Intel
  architecture and 1.1.8 on the PowerPC.

  In December 1999, Sun announced availability of the Java 2 Platform,
  Standard Endition (J2SE) on Linux.  This Sun release has significant
  impact on Blackdown because Blackdown is a port. In a press release,
  Sun states, "This week's announcement would not have been possible
  without the  collaboration of Blackdown, a group of developers and
  enthusiasts around the globe.  Since its inception, Blackdown has been
  a provider of Java technology for the Linux platform.  Their dedicated
  effort over a number of years has laid the foundation for this release
  of the Java 2 platform port to Linux; in particular their effort was
  critical to the success of this release."

  Additionally, the Sun press release continues, "Blackdown.org
  continues to be a valuable source for Java technology for Linux,
  including JDK 1.1.x releases."

  2.1.2.  Download


  The Blackdown JDK can be obtained from http://www.blackdown.org.

  >From the Blackdown home page, select download and a mirror site.

  Select the version of the JDK you want.  If other software that you
  are wanting to use does not recommend a specific version, I suggest
  the most current, which is at the time of this writing, JDK 1.2.2.

  Select the machine architecture you are installing on.  For Intel
  architecture, select i386.

  Select the release candidate you want.  If other software that you are
  wanting to use does not recommend a specific release candidate, I
  suggest the most recent or final version if available.

  For the Blackdown JDK, there are possibly a number of different files
  available in different packaging formats.  Additionally you have to be
  sure you get support for the right libc for your Linux distribution.

  The files available include:

  o  jdk - The Java Development Kit contains everything you need to
     compile, run, and debug Java.  It does not contain international
     character converters.


  o  jre - The Java Runtime Environment, including international
     character converters.


  o  rt - A minimal Java Runtime Environment that does not include
     international character converters.

  o  i18n - The internationalization font mappings and a JAR containing
     the international character converters.

  o  native - Additional binaries providing native thread support.

  I suggest downloading only the jdk for Java development in English.

  When downloading the Blackdown files, you may need to select between
  libc5 and glibc as well as potentially a specific version of glibc.
  The libc options include:

  o  libc5 - The older, and still most common, Linux libc is libc5.

  o  glibc - The new Linux libc.

  If you are using a newer distribution of Linux, you will most likely
  have glibc. I suggest initially trying glibc.

  2.1.3.  Installation


  I suggest installing files in the /usr/local directory. After
  downloading the files, run:

  mkdir /usr/local/blackdown
  mv jdk* /usr/local/blackdown



  If you downloaded the tarball format, run:

  tar zxvf [filename].tar.gz



  Where [filename] is the name of the file.

  Under the /usr/local/blackdown directory, you now should see a
  directory such as jdk1.2.2.

  The above example shows JDK 1.2.2 release candidate 3 for the Intel
  architecture.  Substitute the file name, version number, release
  candidate number, and architecture as appropriate.  You will need to
  open each distribution package file in the above manner.



  2.1.4.  Setting up Your Environment


  The environment variables to set up are:

  o  JAVA_HOME

  o  PATH

  o  CLASSPATH

  The JAVA_HOME environment variable references the home directory of
  your JDK installation.  Set your JAVA_HOME environment variable to the
  directory into which you just installed a version of the Blackdown
  JDK.

  export JAVA_HOME=/usr/local/blackdown/jdk1.2.2



  The $JAVA_HOME/bin directory has the Java compiler (javac) and the
  Java Virtual Machine (java) as well as other necessary programs for
  development.  Add $JAVA_HOME/bin to your PATH.

  export PATH=$JAVA_HOME/bin:$PATH



  Note that $JAVA_HOME/bin was added to the front of the PATH so that
  the installed JDK will be used rather than any JDK that might have
  come with your Linux distribution.

  To confirm that your PATH is correctly set up, check which Java
  compiler and JVM will be used.

  which javac
  which java



  The output should reference javac and java in your $JAVA_HOME/bin
  directory.

  The CLASSPATH environment variable references all JARs and directories
  that you will need to compile and run Java programs.

  For JDK 1.2.2, you don't need to initially add any JARs to your
  CLASSPATH.  JARs can be packaged in either .jar or .zip files.

  export CLASSPATH=$CLASSPATH:.



  2.1.5.  Confirming Your Installation


  You are now ready to compile and run a simple application.  Create the
  following program.

  class HelloWorld {
    public static void main (String[] args) {
      System.out.println("Hello, World!");
    }
  }


  Compile the program with the Java compiler.

  javac HelloWorld.java



  If the compiler produces errors, double check the syntax and confirm
  your PATH and CLASSPATH.

  Run the program with the JVM.

  java HelloWorld



  If the JVM produces errors, confirm your PATH and CLASSPATH.

  You should see the following output:

  Hello, World!



  Congratulations, you have installed, set up an environment for, and
  tested the Blackdown JDK on Linux.

  2.1.6.  More Information


  For more information on the Blackdown JDK, see the Blackdown website
  at http://www.blackdown.org.  There is an excellent FAQ available.

  2.2.  IBM Java Developer Kit


  2.2.1.  Background


  The IBM Java Developer Kit and Runtime Environment pass Sun's Java
  compatibility test and include the latest maintenance.  (From the IBM
  website.)

  As of the time of this writing, the IBM Java Developer Kit is current
  with JDK 1.1.8 and is available only on the Intel architecture.

  2.2.2.  Download


  The IBM Java Developer Kit can be obtained from
  http://www.ibm.com/java/jdk/118/linux.


  In order to download, you will have to register with the IBM website
  and agree to the license online.

  The files available include:

  o  ibm-jdk-l118-linux-x86.tgz - The Java Development Kit contains
     everything you need to compile, run, and debug Java.

  o  ibm-jre-l118-linux-x86.tgz - The Java Runtime Environment contains
     everything you need to run Java.

  Since you will be doing Java development, I suggest downloading the
  ibm-jdk tarball file.

  2.2.3.  Installation


  I suggest installing files in the /usr/local directory. After
  downloading the files, run:

  mkdir /usr/local/ibm
  mv ibm-jdk-l118-linux-x86.tgz /usr/local/ibm



  You can now open the distribution package.  To do this, type:

  tar zxvf ibm-jdk-l118-linux-x86.tgz



  Under the /usr/local/ibm directory, you now should see  the jdk118
  directory.


  The above example shows JDK 1.1.8 for the Intel architecture.
  Substitute the filenames as appropriate.

  2.2.4.  Setting up Your Environment


  The environment variables to set up are:

  o  JAVA_HOME

  o  PATH

  o  CLASSPATH

  The JAVA_HOME environment variable references the home directory of
  your JDK installation.  Set your JAVA_HOME environment variable to the
  directory into which you just installed a version of the IBM Java
  Developer Kit.

  export JAVA_HOME=/usr/local/ibm/jdk118



  The $JAVA_HOME/bin directory has the Java compiler (javac) and the
  Java Virtual Machine (java) as well as other necessary programs for
  development.  Add $JAVA_HOME/bin to your PATH.

  export PATH=$JAVA_HOME/bin:$PATH



  Note that $JAVA_HOME/bin was added to the front of the PATH so that
  the installed JDK will be used rather than any JDK that might have
  come with your Linux distribution.

  To confirm that your PATH is correctly set up, check which Java
  compiler and JVM will be used.

  which javac
  which java



  The output should reference javac and java in your $JAVA_HOME/bin
  directory.
  The CLASSPATH environment variable references all JARs and directories
  that you will need to compile and run Java programs.

  Initially I suggest adding the following JARs to your CLASSPATH. JARs
  can be packaged in either .jar or .zip files.

  For instance:

  export CLASSPATH=$JAVA_HOME/lib/classes.zip
  export CLASSPATH=$CLASSPATH:.



  2.2.5.  Confirming Your Installation


  You are now ready to compile and run a simple application.  Create the
  following program.

  class HelloWorld {
    public static void main (String[] args) {
      System.out.println("Hello, World!");
    }
  }



  Compile the program with the Java compiler.

  javac HelloWorld.java



  If the compiler produces errors, double check the syntax and confirm
  your PATH and CLASSPATH.

  Run the program with the JVM.

  java HelloWorld



  If the JVM produces errors, confirm your PATH and CLASSPATH.

  You should see the following output:

  Hello, World!



  Congratulations, you have installed, set up an environment for, and
  tested the IBM Java Developer Kit on Linux.

  2.2.6.  More Information


  For more information on the IBM Java Developer Kit, see the IBM Java
  website at http://www.ibm.com/java.


  2.3.  Kaffe



  2.3.1.  Background


  Kaffe is a cleanroom, open source implmentation of a Java Virtual
  Machine and class libraries.  As of the time of this writing, Kaffe
  "mostly complies with JDK 1.1, except for a few missing parts."  And
  "parts of it are already JDK 1.2 (Java 2) compatible."  (From the
  Kaffe website.)


  Kaffe may have already been shipped with your Linux distribution
  because of its open source license.

  2.3.2.  Download and Installation


  Rather than downloading from Kaffe, I suggest you initially try the
  Kaffe that most likely came with your Linux distribution.

  Alternatively, Kaffe can be obtained from http://www.kaffe.org.

  >From the Kaffe home page, select the current release.  At the time of
  this writing, the current release is 1.0.5. The Kaffe version number
  has no relationship to JDK specification version numbers.

  2.3.3.  Setting up Your Environment


  The environment variables to set up are:

  o  PATH

  o  CLASSPATH

  To confirm that your PATH is correctly set up, check which Java
  compiler and JVM will be used.

  which javac
  which java



  The CLASSPATH environment variable references all JARs and directories
  that you will need to compile and run Java programs.

  Initially I suggest you add the following JARs to your CLASSPATH. JARs
  can be packaged in either .jar or .zip files.

  For instance:

  export CLASSPATH=/usr/local/share/kaffe/Klasses.zip
  export CLASSPATH=$CLASSPATH:.



  2.3.4.  Confirming Your Installation


  You are now ready to compile and run a simple application.  Create the
  following program.



  class HelloWorld {
    public static void main (String[] args) {
      System.out.println("Hello, World!");
    }
  }



  Compile the program with the Java compiler.

  javac HelloWorld.java



  If the compiler produces errors, double check the syntax and confirm
  your PATH and CLASSPATH.

  Run the program with the JVM.

  java HelloWorld



  If the JVM produces errors, confirm your PATH and CLASSPATH.

  You should see the following output:

  Hello, World!



  Congratulations, you have installed, set up an environment for, and
  tested Kaffe on Linux.

  2.3.5.  More Information


  For more information on Kaffe, see the Kaffe website at
  http://www.kaffe.org.

  2.4.  Sun J2SE


  2.4.1.  Background


  The Sun Java 2, Standard Edition (J2SE) is Sun's production release of
  the Java 2 Platform for the Linux operating system. As of the time of
  this writing, J2SE is current with JDK 1.2.2 on the Intel
  architecture.

  2.4.2.  Download


  J2SE can be obtained from
  http://developer.java.sun.com/developer/earlyAccess/j2sdk122.


  You will need to register with Sun and agree to the license online
  before downloading.

  2.4.3.  Installation


  I suggest installing files in the /usr/local directory. After
  downloading the files, run:
  mkdir /usr/local/sun
  mv jdk1_2_2rc1-linux-i386.tar.gz /usr/local/sun



  You can now open the distribution package.  To do this, type:

  tar zxvf jdk1_2_2rc1-linux-i386.tar.gz



  Under the /usr/local/sun directory, you now should see  the jdk1.2.2
  directory.


  The above example shows JDK 1.2.2 release candidate 1 for the Intel
  architecture.  Substitute the filenames as appropriate.

  2.4.4.  Setting up Your Environment


  The environment variables to set up are:

  o  JAVA_HOME

  o  PATH

  o  CLASSPATH

  The JAVA_HOME environment variable references the home directory of
  your JDK installation.  Set your JAVA_HOME environment variable to the
  directory into which you just installed a version of J2SE.

  export JAVA_HOME=/usr/local/sun/jdk1.2.2



  The $JAVA_HOME/bin directory has the Java compiler (javac) and the
  Java Virtual Machine (java) as well as other necessary programs for
  development.  Add $JAVA_HOME/bin to your PATH.

  export PATH=$JAVA_HOME/bin:$PATH



  Note that $JAVA_HOME/bin was added to the front of the PATH so that
  the installed JDK will be used rather than any JDK that might have
  come with your Linux distribution.

  To confirm that your PATH is correctly set up, check which Java
  compiler and JVM will be used.

  which javac
  which java



  The output should reference javac and java in your $JAVA_HOME/bin
  directory.

  The CLASSPATH environment variable references all JARs and directories
  that you will need to compile and run Java programs.

  For JDK 1.2.2, you don't need to initially add any JARs to your
  CLASSPATH.  JARs can be packaged in either .jar or .zip files.

  export CLASSPATH=$CLASSPATH:.



  2.4.5.  Confirming Your Installation


  You are now ready to compile and run a simple application.  Create the
  following program.

  class HelloWorld {
    public static void main (String[] args) {
      System.out.println("Hello, World!");
    }
  }



  Compile the program with the Java compiler.

  javac HelloWorld.java



  If the compiler produces errors, double check the syntax and confirm
  your PATH and CLASSPATH.

  Run the program with the JVM.

  java HelloWorld



  If the JVM produces errors, confirm your PATH and CLASSPATH.

  You should see the following output:

  Hello, World!



  Congratulations, you have installed, set up an environment for, and
  tested the Sun J2SE for Linux.

  2.4.6.  More Information


  For more information on Sun J2SE, see the Sun Java website at
  http://java.sun.com. There are excellent discussion forums available
  where you might be able to find answers to various questions.

  3.  How to Setup the Web Server


  There are several Web Servers available for Linux.  These include:

  o  ``Apache ''

  o  ``IBM Domino ''

  o  ``IBM HTTP Server ''

  If you are going to try just one Web Server, I suggest you initially
  try Apache, principally because it comes with most major Linux
  distributions and may already be installed, and perhaps running, on
  your system.
  3.1.  Apache


  3.1.1.  Background


  Apache is the most popular HTTP server on the Internet.  It was
  originally based upon the NCSA httpd and has since been completely
  rewritten.  It is Open Source licensed.  (From the Apache website.)

  3.1.2.  Download, Installation, and Setting up Your Environment


  Rather than downloading from Apache, I suggest you initially try the
  Apache that most likely came with your Linux distribution.

  Alternatively, Apache can be obtained from http://www.apache.org.

  3.1.3.  Confirming Your Installation


  To confirm that Apache is installed and running on your computer, open
  your web browser, and enter the URL: "http://127.0.0.1".  (127.0.0.1
  is the IP address for the localhost.)

  You should see a web page to the effect of "It Worked!"

  If it did not work, you can confirm that Apache is installed by typing
  the following on a RedHat Package Manager (RPM)-based Linux
  distribution.

  rpm -q | grep apache



  To start Apache, type:

  cd /etc/rc.d/init.d
  ./httpd start



  Note: The httpd script used at boot time may be in a different
  location on other Linux distributions.

  For more assistance, I suggest you look into the Apache FAQ at
  http://www.apache.org/docs/misc/FAQ.html.


  3.2.  IBM Domino


  To be written.

  See http://www.lotus.com/dominolinuxfor more information.

  3.3.  IBM HTTP Server


  3.3.1.  Background


  The IBM HTTP Server is an IBM repackaging of Apache.  You might
  consider using the IBM HTTP Server if you plan on working with IBM
  WebSphere.

  At the time of this writing, the most recent version is 1.3.6.1.

  3.3.2.  Download


  The IBM HTTP Server can be obtained from
  http://www-4.ibm.com/software/webservers/httpservers/download.html.


  Click on the download link and select 56-bit or 128-bit SSL
  encryption.


  You will need to register with IBM, fill out a marketing survey, and
  accept the license agreement before downloading. The IBM HTTP Server
  requires glibc either version 2.0 or 2.1. glibc is the new Linux libc.
  If you have an older distribution that is based upon libc5, you will
  not be able to use the IBM HTTP Server.

  On an RedHat Package Manager (RPM)-based Linux distribution, you can
  run:


  rpm -qa | grep libc



  You will see output such as:

  glibc-2.1.2-11
  libc-5.3.12-31



  This will show you which versions of libc5 and glibc you have
  installed on your Linux distribution.  In my above example I have both
  glibc and libc5 installed on my system.  glibc is version 2.1, so I
  would want to download the files for glibc2.1.

  I suggest downloading all of the tar files for the glib version of
  Linux that you have as they are relatively small.  However, minimally
  you will need the server file.  For RedHat 6.0 and distributions
  derived from  Redhat 6.0 you will also need the redhat60only.  For
  glibc2.0 based distributions you will also need the libstdc file.

  3.3.3.  Installation


  I suggest installing files in the /usr/local directory. After
  downloading the files, run:

  mkdir /usr/local/ibm
  mv HTTPServer.linux.* /usr/local/ibm



  You can now open the distribution package file or files.

  tar xvf [filename].tar



  Where [filename] is the name of the file.

  Under the /usr/local/ibm directory, you now should see the directory
  IHS.
  Use the RedHat Package Manager (RPM) to install the rpm files that the
  tar file produced.  If you needed the libstdc file, you will need to
  install that file first.  Then you would install the server RPM file
  such as:

  cd IHS
  rpm -i IBM_HTTP_Server-1.3.6-2.i386.rpm



  The above example shows version 1.3.6 for the Intel architecture.
  Substitute the filename as appropriate.

  After installing you can delete the rpm files as they can be easily
  recreated from the tar files.

  3.3.4.  Setting up Your Environment


  The environment variables to set up are:

  o  PATH

  The IBM HTTP Server installed itself into /opt/IBMHTTPServer.  You
  need to add its bin directory to your PATH.

  export PATH=/opt/IBMHTTPServer/bin:$PATH



  Note that /opt/IBMHTTPServer/bin was added to the front of the PATH so
  that the installed Web Server will be used rather than any Web Server
  that might have come with your Linux distribution.

  To confirm that your PATH is correctly set up, check which Apache
  controller will be used.  Type:

  which apachectl



  The output should reference apachectl in the /opt/IBMHTTPServer/bin
  directory.


  Note: because the IBM HTTP Server is based upon Apache, it uses the
  Apache controller to start and stop it.  When you have both the IBM
  HTTP Server and Apache installed on a computer, take particular care
  to your PATH to make sure you are working with the correct server.

  You may need to modify the IBM HTTP Server configuration file.  The
  configuration file was installed in
  /opt/IBMHTTPServer/conf/httpd.conf.  The most common two entries that
  need to be changed are the ServerName and the Listen port number.
  Look for the key words "ServerName" and "Listen" in the httpd.conf
  file.  The ServerName should be set to either your hostname or IP
  address.  If your computer uses DHCP to acquire an IP address, the
  hostname is a better candidate.  However, in order to use your
  computer's hostname, your computer's hostname and IP address must be
  properly registered in DNS.


  Additionally if you are running another Web server on the computer you
  need to assign the IBM HTTP Server to another port so you can run both
  Web servers simultaneously if necessary.

  The following is an example entry in httpd.conf.

  ServerName 192.168.0.4
  Listen 3000



  3.3.5.  Confirming Your Installation


  To start the IBM HTTP Server, type the following:

  /opt/IBMHTTPServer/bin/apachectl start



  To confirm that the IBM HTTP Server is installed and running on your
  computer, open your web browser, and enter the URL:
  "http://192.168.0.4:3000" substituting the correct IP address and port
  number entered into httpd.conf.


  You should see a web page to the effect of "Welcome to the IBM HTTP
  Server". Contratulations, you have installed, set up an environment
  for, and tested the IBM HTTP Server for Linux.

  3.3.6.  More Information


  For more information, I suggest you look into the IBM HTTP Server
  Support page at
  http://www-4.ibm.com/software/webservers/httpservers/support.html.


  4.  How to Setup Java Servlet Support


  There are several Web Server plug-ins and Application Servers
  available for Linux that provide support for Java Servlets.  These
  include:

  o  ``Allaire JRun''

  o  ``Apache JServ''

  o  ``BEA WebLogic''

  o  ``Enhydra''

  o  ``Locomotive''

  o  ``IBM Websphere ''

  If you are going to try just one, I suggest you initially try Apache
  JServ.


  4.1.  Allaire JRun


  To be written.

  See http://www.allaire.com/products/jrun/for more information.



  4.2.  Apache JServ


  4.2.1.  Background


  Apache JServe is a 100% pure Java servlet engine fully compliant with
  the Java Servlet 2.0 specification.  Apache JServ is part of the Java
  Apache  Project. (From the Apache Java Project website).

  4.2.2.  Download


  Apache JServ can be obtained from
  http://java.apache.org/jserv/index.html.


  >From the Apache JServ Project home page, follow the Download Apache
  JServ link.

  Currently RPM distributions are available for RedHat Linux.  For other
  Linux distributions you will have to build from source.  The following
  example describes how install the RPM for RedHat 6x.

  As of the time of this writing, the current version is 1.1b3.

  4.2.3.  Installation


  I suggest installing files in the /usr/local directory. After
  downloading the files, run:

  mkdir /usr/local/apachejserv
  mv ApacheJServ*.rpm /usr/local/apachejserv



  For RedHat and RedHat-derived distributions, use the RedHat Package
  Manager (RPM) to install the rpm file such as:

  rpm -i ApacheJServ-1.1-b2_RH6x.i386.rpm



  The above example shows version 1.1-b2 for the RedHat 6x on the Intel
  architecture.


  4.2.4.  Setting up Your Environment


  You will need to stop, set your Java environment variables, and
  restart Apache to register Apache JServ.

  To stop Apache, type:

  cd /etc/rc.d/init.d
  ./httpd stop



  Note: The httpd script used at boot time may be in a different
  location on other Linux distributions

  To set you Java environment, see the How to Install the JDK section of
  this document, specifically for the JDK you intend to use.  You need
  to set several properties in the jserv.properties file installed in
  /etc/httpd/conf/jserv.  Specifically, look for:

  o  wrapper.bin - to reference the JDK you installed

  o  wrapper.classpath - to minimally include
     /usr/lib/apache/ApacheJServ.jar and
     /home/httpd/classes/servlet-2.0.jar

  o  bindaddress=localhost

  o  port=8007

  To restart Apache, type:

  cd /etc/rc.d/init.d
  ./httpd start



  4.2.5.  Confirming Your Installation


  To confirm that the Apache JServ is installed and running on your
  computer, open your web browser, and enter the URL:
  "http://127.0.0.1/servlet/IsItWorking" substituting the correct IP
  address if you are browsing from another machine.


  You should see a web page to the effect of "Yes, It's Working!".
  Contratulations, you have installed, set up an environment for, and
  tested the Apache JServ for Linux.

  For more assistance, I suggest you look into the Apache JServ website
  at

  http://java.apache.org/jserv/index.html.


  Now, to compile and run your own servlet.  Enter the following Java
  servlet program.

  import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;

  public class HelloWorldServlet extends HttpServlet {
    public void service (HttpServletRequest request,
      HttpServletResponse response) throws ServletException, IOException {
    }
  }



  4.2.6.  More Information


  For more information, I suggest you look into the Java Apache Project
  website at http://java.apache.org/.


  4.3.  BEA WebLogic


  See ``BEA WegLogic ''below.

  4.4.  Enhydra


  To be written.

  See http://www.enhydra.orgfor more information.

  4.5.  IBM WebSphere


  To be written.

  See http://www-4.ibm.com/software/webservers/appserv/linux.htmlfor
  more information.

  4.6.  Locomotive


  To be written.

  See ://www.locomotive.org/for more information.

  5.  How to Setup Java Server Pages (JSP) Support


  To be written.

  5.1.  Apache Jakarta


  To be written.

  See ://jakarta.apache.com/for more information.

  5.2.  Caucho Resin


  To be written.

  See ://www.caucho.com/for more information.

  6.  How to Setup JDBC Support


  There are several databases that run on Linux that also support a JDBC
  interface.  These include:

  o  ``IBM DB2 ''

  o  ``MiniSQL ''

  o  ``MySQL ''

  o  ``Oracle ''

  o  ``PostgreSQL ''

  o  ``Sybase ''

  If you are going to try just one DBMS, I suggest you initially try
  PostgreSQL, principally because it comes with most major Linux
  distributions and may already be installed on your system.



  6.1.  IBM DB2


  To be written.

  See http://www-4.ibm.com/software/data/db2/linux/for more information.

  6.2.  MiniSQL


  To be written.

  See http://www.hughes.com.au/for more information.

  6.3.  MySQL


  To be written.

  See http://www.mysql.org/for more information.

  6.4.  Oracle


  To be written.

  See http://platforms.oracle.com/linux/

  6.5.  PostgreSQL


  6.5.1.  Background


  PostgreSQL is a sophisticated Object-Relational DBMS, supporting
  almost all SQL constructs, including subselects, transactions, and
  user-defined types and functions.  It is the most advanced open-source
  database available anywhere.  Commercial Support is also available
  from PostgreSQL, Inc.  The current version is 6.5.3 and is available
  at any of the many mirror sites or on CD.  (From the PostgreSQL
  website.)

  PostgreSQL may have already been shipped with your Linux distribution
  because of its open source license.

  6.5.2.  Download and Installation


  Rather than downloading from PostgreSQL, I suggest you initially try
  the PostgreSQL that most likely came with your Linux distribution.

  Alternatively, PostgreSQL can be obtained from
  http://www.postgresql.org.


  To confirm that PostgreSQL is installed on your computer, type:

  rpm -qa | grep postgresql



  or

  which postmaster
  which psql

  You need the postgresql, postgresql-server, and postgresql-java
  packages installed to use Java with PostgreSQL.

  Make sure PostgreSQL is running.  Type:

  ps -f -u postgres



  You should see postmaster, the PostgreSQL daemon, running.

  If postmaster is not running, there will probably be a Sys V Init
  script that you can use to start it.  In many distributions it is
  located in /etc/rc.d/init.d.  To start PostgreSQL, type:

  cd /etc/rc.d/init.d
  ./postgresql start



  You can use the above "ps" command to confirm that PostgreSQL is
  running.

  Note: To use JDBC, PostgreSQL needs to have been started with the '-i'
  parameter indicating support for TCP/IP connections rather than solely
  UNIX domain sockets.  Confirm that postmaster> was started with the
  '-i' paramter.


  Create a test database by typing:

  su - postgres
  createdb javatest



  You should see no error messages.

  Create a test table with one test row.  First, log in to the
  interactive PostgreSQL tool and connect to the javatest database you
  just created by typing (as the postgres user):

  psql javatest



  You should see confirmation that you are connected to the database:
  javatest.


  Then, create the test table by typing (within psql):

  create table test (col1 varchar(255));



  You should see the "CREATE" confirmation message.

  Next, insert one row by typing (within psql):

  insert into test (col1) values ('Hello, from PostgreSQL!');



  You should see the "INSERT" confirmation message.

  Finally, confirm that the row is there by typing (within psql):

  select col1 from test;



  You should see the row you just created.

  You can exit psql by typing "\ q".

  For more assistance on working with PostgreSQL, I suggest you look
  into the Database-SQL-RDBMS HOW-TO document for Linux (PostgreSQL
  Object Relational Database System) at
  http://metalab.unc.edu/mdw/HOWTO/PostgreSQL-HOWTO.html.


  You will need to add the appropriate JAR to your CLASSPATH.  The
  PostgreSQL JARs come in the postgresql-jdbc package.

  export CLASSPATH=$CLASSPATH:/usr/lib/pgsql/jdbc6.5-1.2.jar



  You may need to substitute the path depending you where PostgreSQL is
  installed on your system.

  6.5.3.  Confirming Your Installation


  You are now ready to compile and run a simple JDBC application that
  uses PostgreSQL.  Create the following program.

  import java.sql.*;

  class PostgreSQLTest {
    public static void main (String[] args) {
      try {
        Driver driver = (Driver)
          Class.forName("postgresql.Driver").newInstance();
        DriverManager.registerDriver(driver);

        String     url = "jdbc:postgresql:javatest";
        Connection con = DriverManager.getConnection(url, "postgres", "");
        Statement  stm = con.createStatement();

        stm.setQueryTimeout(10);
        ResultSet  rs  = stm.executeQuery("select col1 from test");

        rs.next();

        System.out.println(rs.getString(1));

      } catch (SQLException e) {

        System.out.println("Exception!");
        System.out.println(e.toString());
    }
  }



  Compile the program with the Java compiler.

  javac PostgreSQLTest.java


  If the compiler produces errors, double check the syntax and confirm
  your PATH and CLASSPATH.

  Run the program with the JVM.

  java PostgreSQLTest



  If the JVM produces errors, confirm your PATH and CLASSPATH.

  You should see the following output:

  Hello, from PostgreSQL!



  Congratulations, you have installed, set up an environment for, and
  tested a JDBC interface to PostgreSQL.

  6.5.4.  More Information


  For more information, I suggest you look into the PostgreSQL website
  at

  http://www.postgresql.org/.


  6.6.  Sybase


  6.6.1.  Background


  Sybase Adaptive Server Enterprise is a commericial RDBMS that is
  available for the Linux operating system.  While Sybase has recently
  released version 12.0, version 11.9.2 is available for Linux.

  According to the Sybase website, "By porting ASE to Linux, Sybase
  provides the Linux development community with the first highly
  scalable, high-performance database engine available for the platform.
  The package includes the standard features of Adaptive Server
  Enterprise and all related connectivity components.  Adaptive Server
  Enterprise 11.9.2 is offered FREE for development."


  6.6.2.  Download


  The Sybase ASE can be obtained from
  http://www.sybase.com/products/databaseservers/linux/linux1192_reg.html.


  In order to download, you will have to register with the Sybase
  website and agree to the license online.

  The Sybase JDBC driver can be obtained from
  http://www.sybase.com/products/internet/jconnect/.


  Select download jConnect 4.2/5.2.

  If you have access to a Sybase server on the network, you only need to
  download and install the JDBC driver.

  6.6.3.  Installation


  Installation of Sybase is beyond the scope of this HOWTO.  This HOWTO
  will assume that Sybase has been correctly installed and configured
  and that you can get to Sybase using isql.

  Log into isql as sa and create a test user and test database by
  typing:


  create database javatest
  go
  sp_addlogin javatest, javatest, javatest
  go
  use javatest
  go
  sp_dbowner javatest
  go



  You should see no error messages.

  Create a test table with one test row.  First, log in to isql as the
  javatest user and type:

  create table test (col1 varchar(255))
  go



  You should see no error messages.

  Next, insert one row by typing:

  insert into test (col1) values ('Hello, from Sybase!')
  go



  You should see no error messages.

  Finally, confirm that the row is there by typing:

  select col1 from test
  go



  You should see the row you just created.

  You can exit isql by typing "exit".

  For more assistance on working with Sybase, review the documentation
  that can be downloaded with Sybase.

  You will need to add the appropriate JAR to your CLASSPATH.

  export CLASSPATH=$CLASSPATH:/usr/local/sybase/jConnect-5_2/classes/jconn2.jar



  You may need to substitute the path depending you where jConnect is
  installed on your system.

  6.6.4.  Confirming Your Installation


  You are now ready to compile and run a simple JDBC application that
  uses Sybase.  Create the following program.

  import java.sql.*;

  class SybaseTest {
    public static void main (String[] args) {
      try {
        Driver driver = (Driver)
          Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
        DriverManager.registerDriver(driver);

        String     host = "127.0.0.1";
        String     port = "4100";

        String     url = "jdbc:sybase:Tds:" + host + ":" + port;
        Connection con = DriverManager.getConnection(url, "javatest", "javatest");
        Statement  stm = con.createStatement();

        stm.setQueryTimeout(10);
        ResultSet  rs  = stm.executeQuery("select col1 from test");

        rs.next();

        System.out.println(rs.getString(1));

      } catch (SQLException e) {

        System.out.println("Exception!");
        System.out.println(e.toString());
    }
  }



  You will need to substitute the host and port number of you Sybase
  server as appropriate.  See $SYBASE/interfaces and the $DSQUERY entry
  for what values to use for the host and port number.

  Compile the program with the Java compiler.

  javac SybaseTest.java



  If the compiler produces errors, double check the syntax and confirm
  your PATH and CLASSPATH.

  Run the program with the JVM.

  java SybaseTest



  If the JVM produces errors, confirm your PATH and CLASSPATH.

  You should see the following output:

  Hello, from Sybase!



  Congratulations, you have installed, set up an environment for, and
  tested a JDBC interface to Sybase.

  6.6.5.  More Information


  For more information, I suggest you look into the Sybase jConnect
  website at http://www.sybase.com/products/internet/jconnect/.


  7.  How to Setup Enterprise Java Bean (EJB) Support


  To be written.

  7.1.  BEA WebLogic


  To be written.

  See http://www.beasys.com/linux/for more information.

  7.2.  EJBoss


  7.2.1.  Background


  The EJBoss organization strives at delivering a complete J2EE
  compliant platform to the open source web. (From the EJBoss website).

  As of the time of this writing, the most recent version is 0.95.

  7.2.2.  Download


  EJBoss can be downloaded from the Telkel website at
  http://www.telkel.com/ejboss.

  As no implementation for JDK 1.3 is available for Linux, select
  ejboss095_jdk122.jar.

  7.2.3.  Installation


  I suggest installing files in the /usr/local directory. After
  downloading, run:

  mkdir /usr/local/ejboss
  mv ejboss* /usr/local/ejboss



  Unjar the file:

  jar xvf ejboss095_jdk122.jar



  You should see various files and directories created under
  /usr/local/ejboss.

  The above example shows EJBoss 0.95 for JDK 1.2.2. Substitute the file
  names as appropriate.


  7.2.4.  Setting up Your Environment


  The environment variables to set up are:

  o  CLASSPATH

  The CLASSPATH environment variable references all JARs and directories
  that you will need to compile and run Java programs.

  Include the EJBoss JAR and the beans/generated directory in your
  CLASSPATH.

  export CLASSPATH=/usr/local/ejboss/lib/ejboss095_jdk122.jar:/usr/local/ejboss/beans/generated:$CLASSPATH



  7.2.5.  Confiming Your Installation


  You are now ready to compile and run a simple EJB application. Create
  the following three source files for the server.

  First, the business interface.

  // EJBTest.java

  import javax.ejb.*;
  import java.rmi.RemoteException;

  public
   interface EJBTest extends EJBObject {
    public String greet() throws
   RemoteException;

  }



  Second, the home interface.

  // EJBTestHome.java

  import javax.ejb.*;
  import java.rmi.RemoteException;

  public
   interface EJBTestHome extends EJBHome {

    public EJBTest create() throws

     CreateException, RemoteException;
  }



  Third, the bean implementation class.



  // EJBTestBean.java

  import javax.ejb.*;
  import java.rmi.RemoteException;

  public
   interface EJBTestBean implements SessionBean {

    private SessionContext
   mContext = null;

    public void ejbPassivate() {
      System.out.println("EJBTestBean
   passivated.");
  }

    public void ejbActivate() {
      System.out.println("EJBTestBean
   activated.");
  }

    public void ejbCreate() {
      System.out.println("EJBTestBean
   created.");
  }

    public void ejbRemove() {
      System.out.println("EJBTestBean
   removed.");
  }

    public void setSessionContext() {
      System.out.println("EJBTestBean
   context set.");
      mContext = context;
  }

    public String greet()
   {
      return "Hello, I'm an EJB!";
  }

  }



  Compile the server source files with the Java compiler:

  javac EJBTest*.java



  If the compiler produces errors, double check the syntax and confirm
  your PATH and CLASSPATH.

  Now that you have successfully written and compiled the server source
  files, you need to deploy your bean to EJBoss. Deploying a bean to
  EJBoss requires several steps that must be performed exactly.

  First, create the file ejb-jar.xml.

  <?xml version="1.0" encoding="Cp1252"?>



  <ejb-jar ID="">



       <description></description>



       <display-name></display-name>



       <small-icon></small-icon>



       <large-icon></large-icon>



       <ejb-client-jar></ejb-client-jar>



       <enterprise-beans>



         <session>



           <description>Nextgen bean</description>



           <ejb-name>nextgen.EJBTest</ejb-name>



           <home>EJBTestHome</home>



           <remote>EJBTest</remote>



           <ejb-class>EJBTestBean</ejb-class>



           <session-type>Stateful</session-type>



           <transaction-type>Bean</transaction-type>



           <env-entry>



             <description></description>

             <env-entry-name></env-entry-name>



             <env-entry-type>java.lang.String</env-entry-type>



             <env-entry-value></env-entry-value>



           </env-entry>



           <resource-ref>



             <description></description>



             <res-ref-name></res-ref-name>



             <res-type></res-type>



             <res-auth>Container</res-auth>



           </resource-ref>



         </session>



       </enterprise-beans>



       <assembly-descriptor />



     </ejb-jar>



  The above file, which must be named ejb-jar.xml identifies the
  interface and class names of files that you just created as well as a
  name for the object.

  Second, relative to the directory of the three class files you just
  created, create a META-INF directory.

  mkdir META-INF
  mv ejb-jar.xml META-INF

  Third, package all four files into a jar.

  jar cvf EJBTest.jar EJBTest*.class META-INF/ejb-jar.xml



  You should see that it added the manifest as well as the three class
  files and the XML deployment descriptor file.

  Fourth, put the JAR you just created in the EJBoss beans directory.

  mv EJBTest.jar /usr/local/ejboss/beans



  Fifth, move the class files you created to the EJBoss beans/generated
  directory.

  mv EJBTest*.class /usr/local/ejboss/beans/generated



  (This fifth step is redudant due to a bug in EJBoss 0.95. )

  You are now ready to start the EJBoss server.

  cd /usr/local/ejboss

  sh server.sh

  You should see the proxy files compile automatically and confirmation
  that your EJB is deployed.

  You are now ready to write, compile and test the simple client
  applicaiton.

  7.3.  Bullsoft JOnAS EJB


  To be written.

  See http://www.bullsoft.com/ejb/for more information.



  Linux Ethernet-Howto
  by Paul Gortmaker
  v2.7, 5 May 1999

  This is the Ethernet-Howto, which is a compilation of information
  about which ethernet devices can be used for Linux, and how to set
  them up.   Note that this Howto is focused on the hardware and low
  level driver aspect of the ethernet cards, and does not cover the
  software end of things like ifconfig and route. See the Network Howto
  for that stuff.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 New Versions of this Document
     1.2 Using the Ethernet-Howto
     1.3 HELP - It doesn't work!

  2. What card should I buy for Linux?

     2.1 So What Drivers are Stable?
     2.2 Eight bit vs 16 bit Cards
     2.3 32 Bit (VLB/EISA/PCI) Ethernet Cards
     2.4 Available 100Mbs Cards and Drivers
     2.5 100VG versus 100BaseT
     2.6 Type of cable that your card should support

  3. Frequently Asked Questions

     3.1 Alpha Drivers -- Getting and Using them
     3.2 Using More than one Ethernet Card per Machine
     3.3 The
     3.4 Problems with NE1000 / NE2000 cards (and clones)
     3.5 Problems with SMC Ultra/EtherEZ and WD80*3 cards
     3.6 Problems with 3Com cards
     3.7 FAQs Not Specific to Any Card.
        3.7.1 Linux and ISA Plug and Play Ethernet Cards
        3.7.2 Ethercard is Not Detected at Boot.
        3.7.3 (TT
        3.7.4 PCI machine detects card but driver fails probe.
        3.7.5 Shared Memory ISA cards in PCI Machine do not work (
        3.7.6 Card seems to send data but never receives anything.
        3.7.7 Asynchronous Transfer Mode (ATM) Support
        3.7.8 Gigabyte Ethernet Support
        3.7.9 FDDI Support
        3.7.10 Full Duplex Support
        3.7.11 Ethernet Cards for Linux on SMP Machines
        3.7.12 Ethernet Cards for Linux on Alpha/AXP PCI Boards
        3.7.13 Ethernet for Linux on SUN/Sparc Hardware.
        3.7.14 Ethernet for Linux on Other Hardware.
        3.7.15 Linking 10 or 100 BaseT without a Hub
        3.7.16 SIOCSIFxxx: No such device
        3.7.17 SIOCSFFLAGS: Try again
        3.7.18 Using `ifconfig' and Link UNSPEC with HW-addr of 00:00:00:00:00:00
        3.7.19 Huge Number of RX and TX Errors
        3.7.20 Entries in
        3.7.21 Linux and ``trailers''
        3.7.22 Access to the raw Ethernet Device

  4. Performance Tips

     4.1 General Concepts
     4.2 ISA Cards and ISA Bus Speed
     4.3 Setting the TCP Rx Window
     4.4 Increasing NFS performance

  5. Vendor/Manufacturer/Model Specific Information

     5.1 3Com
        5.1.1 3c501
        5.1.2 EtherLink II, 3c503, 3c503/16
        5.1.3 Etherlink Plus 3c505
        5.1.4 Etherlink-16 3c507
        5.1.5 Etherlink III, 3c509 / 3c509B
        5.1.6 3c515
        5.1.7 3c523
        5.1.8 3c527
        5.1.9 3c529
        5.1.10 3c562
        5.1.11 3c575
        5.1.12 3c579
        5.1.13 3c589 / 3c589B
        5.1.14 3c590 / 3c595
        5.1.15 3c592 / 3c597
        5.1.16 3c900 / 3c905 / 3c905B
        5.1.17 3c985
     5.2 Accton
        5.2.1 Accton MPX
        5.2.2 Accton EN1203, EN1207, EtherDuo-PCI
        5.2.3 Accton EN2209 Parallel Port Adaptor (EtherPocket)
        5.2.4 Accton EN2212 PCMCIA Card
     5.3 Allied Telesyn/Telesis
        5.3.1 AT1500
        5.3.2 AT1700
        5.3.3 AT2450
        5.3.4 AT2500
        5.3.5 AT2540FX
     5.4 AMD / Advanced Micro Devices
        5.4.1 AMD LANCE (7990, 79C960/961/961A, PCnet-ISA)
        5.4.2 AMD 79C965 (PCnet-32)
        5.4.3 AMD 79C970/970A (PCnet-PCI)
        5.4.4 AMD 79C971 (PCnet-FAST)
        5.4.5 AMD 79C972 (PCnet-FAST+)
        5.4.6 AMD 79C974 (PCnet-SCSI)
     5.5 Ansel Communications
        5.5.1 AC3200 EISA
     5.6 Apricot
        5.6.1 Apricot Xen-II On Board Ethernet
     5.7 Arcnet
     5.8 AT&T
        5.8.1 AT&T T7231 (LanPACER+)
     5.9 Boca Research
        5.9.1 Boca BEN (ISA, VLB, PCI)
     5.10 Cabletron
        5.10.1 E10**, E10**-x, E20**, E20**-x
        5.10.2 E2100
        5.10.3 E22**
     5.11 Cogent
        5.11.1 EM100-ISA/EISA
        5.11.2 Cogent eMASTER+, EM100-PCI, EM400, EM960, EM964
     5.12 Compaq
        5.12.1 Compaq Deskpro / Compaq XL (Embedded AMD Chip)
        5.12.2 Compaq Nettelligent/NetFlex (Embedded ThunderLAN Chip)
     5.13 Danpex
        5.13.1 Danpex EN9400
     5.14 D-Link
        5.14.1 DE-100, DE-200, DE-220-T, DE-250
        5.14.2 DE-520
        5.14.3 DE-528
        5.14.4 DE-530
        5.14.5 DE-600
        5.14.6 DE-620
        5.14.7 DE-650
     5.15 DFI
        5.15.1 DFINET-300 and DFINET-400
     5.16 Digital / DEC
        5.16.1 DEPCA, DE100/1, DE200/1/2, DE210, DE422
        5.16.2 Digital EtherWorks 3 (DE203, DE204, DE205)
        5.16.3 DE425 EISA, DE434, DE435, DE500
        5.16.4 DEC 21040, 21041, 2114x, Tulip
     5.17 Farallon
        5.17.1 Farallon Etherwave
     5.18 Fujitsu
        5.18.1 Fujitsu FMV-181/182/183/184
     5.19 Hewlett Packard
        5.19.1 27245A
        5.19.2 HP EtherTwist, PC Lan+ (27247, 27252A)
        5.19.3 HP-J2405A
        5.19.4 HP-Vectra On Board Ethernet
        5.19.5 HP 10/100 VG Any Lan Cards (27248B, J2573, J2577, J2585, J970, J973)
        5.19.6 HP NetServer 10/100TX PCI (D5013A)
     5.20 IBM / International Business Machines
        5.20.1 IBM Thinkpad 300
        5.20.2 IBM Credit Card Adaptor for Ethernet
        5.20.3 IBM Token Ring
     5.21 ICL Ethernet Cards
        5.21.1 ICL EtherTeam 16i/32
     5.22 Intel Ethernet Cards
        5.22.1 Ether Express
        5.22.2 Ether Express PRO/10
        5.22.3 Ether Express PRO/10 PCI (EISA)
        5.22.4 Ether Express PRO 10/100B
     5.23 Kingston
     5.24 LinkSys
        5.24.1 LinkSys Etherfast 10/100 Cards.
        5.24.2 LinkSys Pocket Ethernet Adapter Plus (PEAEPP)
        5.24.3 LinkSys PCMCIA Adaptor
     5.25 Microdyne
        5.25.1 Microdyne Exos 205T
     5.26 Mylex
        5.26.1 Mylex LNE390A, LNE390B
        5.26.2 Mylex LNP101
        5.26.3 Mylex LNP104
     5.27 Novell Ethernet, NExxxx and associated clones.
        5.27.1 NE1000, NE2000
        5.27.2 NE2000-PCI (RealTek/Winbond/Compex)
        5.27.3 NE-10/100
        5.27.4 NE1500, NE2100
        5.27.5 NE/2 MCA
        5.27.6 NE3200
        5.27.7 NE3210
        5.27.8 NE5500
     5.28 Proteon
        5.28.1 Proteon P1370-EA
        5.28.2 Proteon P1670-EA
     5.29 Pure Data
        5.29.1 PDUC8028, PDI8023
     5.30 Racal-Interlan
        5.30.1 ES3210
        5.30.2 NI5010
        5.30.3 NI5210
        5.30.4 NI6510 (not EB)
        5.30.5 EtherBlaster (aka NI6510EB)
     5.31 RealTek
        5.31.1 RealTek RTL8002/8012 (AT-Lan-Tec) Pocket adaptor
        5.31.2 RealTek 8009
        5.31.3 RealTek 8019
        5.31.4 RealTek 8029
        5.31.5 RealTek 8129/8139
     5.32 Sager
        5.32.1 Sager NP943
     5.33 Schneider & Koch
        5.33.1 SK G16
     5.34 SEEQ
        5.34.1 SEEQ 8005
     5.35 SMC (Standard Microsystems Corp.)
        5.35.1 WD8003, SMC Elite
        5.35.2 WD8013, SMC Elite16
        5.35.3 SMC Elite Ultra
        5.35.4 SMC Elite Ultra32 EISA
        5.35.5 SMC EtherEZ (8416)
        5.35.6 SMC EtherPower PCI (8432)
        5.35.7 SMC EtherPower II PCI (9432)
        5.35.8 SMC 3008
        5.35.9 SMC 3016
        5.35.10 SMC-9000 / SMC 91c92/4
        5.35.11 SMC 91c100
     5.36 Texas Instruments
        5.36.1 ThunderLAN
     5.37 Thomas Conrad
        5.37.1 Thomas Conrad TC-5048
     5.38 VIA
        5.38.1 VIA 86C926 Amazon
        5.38.2 VIA 86C100A Rhine II (and 3043 Rhine I)
     5.39 Western Digital
     5.40 Winbond
        5.40.1 Winbond 89c840
        5.40.2 Winbond 89c940
     5.41 Xircom
        5.41.1 Xircom PE1, PE2, PE3-10B*
        5.41.2 Xircom PCMCIA Cards
     5.42 Zenith
        5.42.1 Z-Note
     5.43 Znyx
        5.43.1 Znyx ZX342 (DEC 21040 based)
     5.44 Identifying an Unknown Card
        5.44.1 Identifying the Network Interface Controller
        5.44.2 Identifying the Ethernet Address
        5.44.3 Tips on Trying to Use an Unknown Card
     5.45 Drivers for Non-Ethernet Devices

  6. Cables, Coax, Twisted Pair

     6.1 Thin Ethernet (thinnet)
     6.2 Twisted Pair
     6.3 Thick Ethernet

  7. Software Configuration and Card Diagnostics

     7.1 Configuration Programs for Ethernet Cards
        7.1.1 WD80x3 Cards
        7.1.2 Digital / DEC Cards
        7.1.3 NE2000+ or AT/LANTIC Cards
        7.1.4 3Com Cards
     7.2 Diagnostic Programs for Ethernet Cards

  8. Technical Information

     8.1 Programmed I/O vs. Shared Memory vs. DMA
        8.1.1 Programmed I/O (e.g. NE2000, 3c509)
        8.1.2 Shared memory (e.g. WD80x3, SMC-Ultra, 3c503)
        8.1.3 Slave (normal) Direct Memory Access (e.g. none for Linux!)
        8.1.4 Bus Master Direct Memory Access (e.g. LANCE, DEC 21040)
     8.2 Writing a Driver
     8.3 Driver interface to the kernel
        8.3.1 Probe
        8.3.2 Interrupt handler
        8.3.3 Transmit function
        8.3.4 Receive function
        8.3.5 Open function
        8.3.6 Close function (optional)
        8.3.7 Miscellaneous functions
     8.4 Technical information from 3Com
     8.5 Notes on AMD PCnet / LANCE Based cards
     8.6 Multicast and Promiscuous Mode
     8.7 The Berkeley Packet Filter (BPF)
  9. Networking with a Laptop/Notebook Computer

     9.1 Using SLIP
     9.2 PCMCIA Support
     9.3 ISA Ethercard in the Docking Station.
     9.4 Pocket / parallel port adaptors.

  10. Miscellaneous.

     10.1 Passing Ethernet Arguments to the Kernel
        10.1.1 The
        10.1.2 The
     10.2 Using the Ethernet Drivers as Modules
     10.3 Related Documentation
     10.4 Disclaimer and Copyright
     10.5 Closing


  ______________________________________________________________________

  1.  Introduction


  The Ethernet-Howto covers what cards you should and shouldn't buy; how
  to set them up, how to run more than one, and other common problems
  and questions. It contains detailed information on the current level
  of support for all of the most common ethernet cards available.

  It does not cover the software end of things, as that is covered in
  the NET-3 Howto. Also note that general non-Linux specific questions
  about Ethernet are not (or at least they should not be) answered here.
  For those types of questions, see the excellent amount of information
  in the comp.dcom.lans.ethernet FAQ. You can FTP it from rtfm.mit.edu
  just like all the other newsgroup FAQs.

  This present revision covers distribution kernels up to and including
  2.2.7.

  The Ethernet-Howto is by:

       Paul Gortmaker, p_gortmaker@yahoo.com


  The primary source of information for the initial ASCII-only version
  of the Ethernet-Howto was:

       Donald J. Becker, becker@cesdis.gsfc.nasa.gov


  who we should thank for writing the vast majority of ethernet card
  drivers that are presently available for Linux. He also is the author
  of the original NFS server too. Thanks Donald!

  This document is Copyright (c) 1993-1999 by Paul Gortmaker.  Please
  see the Disclaimer and Copying information at the end of this document
  (``copyright'') for information about redistribution of this document
  and the usual `we are not responsible for what you manage to break...'
  type legal stuff.


  1.1.  New Versions of this Document


  New versions of this document can be retrieved from:


  Ethernet-HOWTO <http://metalab.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html>

  or for those wishing to use FTP and/or get non-HTML formats:

  Sunsite HOWTO Archive <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/>

  This is the `official' location - it can also be found on various
  Linux WWW/ftp mirror sites. Updates will be made as new information
  and/or drivers becomes available. If this copy that you are reading is
  more than 6 months old, then you should check to see if an updated
  copy is available.

  This document is available in various formats (postscript, dvi, ASCII,
  HTML, etc.).  I would recommend viewing it in HTML (via a WWW browser)
  or the Postscript/dvi format. Both of these contain cross-references
  that are not included in the plain text ASCII format.



  1.2.  Using the Ethernet-Howto


  As this guide is getting bigger and bigger, you probably don't want to
  spend the rest of your afternoon reading the whole thing. And the good
  news is that you don't have to read it all. The HTML and
  Postscript/dvi versions have a table of contents which will really
  help you find what you need a lot faster.

  Chances are you are reading this document beacuse you can't get things
  to work and you don't know what to do or check. The next section
  (``HELP - It doesn't work!'')  is aimed at newcomers to linux and will
  point you in the right direction.

  Typically the same problems and questions are asked over and over
  again by different people. Chances are your specific problem or
  question is one of these Frequently Asked Questions, and is answered
  in the FAQ portion of this document .  (``The FAQ section'').
  Everybody should have a look through this section before posting for
  help.

  If you haven't got an ethernet card, then you will want to start with
  deciding on a card.  (``What card should I buy...'')

  If you have already got an ethernet card, but are not sure if you can
  use it with Linux, then you will want to read the section which
  contains specific information on each manufacturer, and their cards.
  (``Vendor Specific...'')

  If you are interested in some of the technical aspects of the Linux
  device drivers, then you can have a browse of the section with this
  type of information.  (``Technical Information'')


  1.3.  HELP - It doesn't work!


  Okay, don't panic. This will lead you through the process of getting
  things working, even if you have no prior background in linux or
  ethernet hardware.

  First thing you need to do is figure out what model your card is so
  you can determine if Linux has a driver for that particular card.
  Different cards typically have different ways of being controlled by
  the host computer, and the linux driver (if there is one) contains
  this control information in a format that allows linux to use the
  card.  If you don't have any manuals or anything of the sort that tell
  you anything about the card model, then you can try the section on
  helping with mystery cards (reference section: ``Identifying an
  Unknown Card'').

  Now that you know what type of card you have, read through the details
  of your particular card in the card specific section (reference
  section: ``Vendor Specific...'')  which lists in alphabetical order,
  card manufacturers, individual model numbers and whether it has a
  linux driver or not. If it lists it as `Not Supported' you can pretty
  much give up here. If you can't find your card in that list, then
  check to see if your card manual lists it as being `compatible' with
  another known card type. For example there are hundreds, if not
  thousands of different cards made to be compatible with the original
  Novell NE2000 design.

  Assuming you have found out that a linux driver exists for your card,
  you now have to find it and make use of it.  Just because linux has a
  driver for your card does not mean that it is built into every kernel.
  (The kernel is the core operating system that is first loaded at boot,
  and contains drivers for various pieces of hardware, among other
  things.)  Depending on who made the particular linux distribution you
  are using, there may be only a few pre-built kernels, and a whole
  bunch of drivers as smaller separate modules, or there may be a whole
  lot of kernels, covering a vast combination of built-in driver
  combinations.

  Most linux distributions now ship with a bunch of small modules that
  are the various drivers.  The required modules are typically loaded
  late in the boot process, or on-demand as a driver is needed to access
  a particualr device.  You will need to attach this module to the
  kernel after it has booted up. See the information that came with your
  distribution on installing and using modules, along with the module
  section in this document.  (``Using the Ethernet Drivers as Modules'')

  If you didn't find either a pre-built kernel with your driver, or a
  module form of the driver, chances are you have a typically uncommon
  card, and you will have to build your own kernel with that driver
  included. Once you have linux installed, building a custom kernel is
  not difficult at all. You essentially answer yes or no to what you
  want the kernel to contain, and then tell it to build it. There is a
  Kernel-HowTo that will help you along.

  At this point you should have somehow managed to be booting a kernel
  with your driver built in, or be loading it as a module.  About half
  of the problems people have are related to not having driver loaded
  one way or another, so you may find things work now.

  If it still doesn't work, then you need to verify that the kernel is
  indeed detecting the card. To do this, you need to type dmesg | more
  when  logged in after the system has booted and all modules have been
  loaded.  This will allow you to review the boot messages that the
  kernel scrolled up the screen during the boot process.  If the card
  has been detected, you should see somewhere in that list a message
  from your card's driver that starts with eth0, mentions the driver
  name and the hardware parameters (interrupt setting, input/output port
  address, etc) that the card is set for. (Note: At boot, linux lists
  all the PCI cards installed in the system, regardless of what drivers
  are available - do not mistake this for the driver detection which
  comes later!)

  If you don't see a driver indentification message like this, then the
  driver didn't detect your card, and that is why things aren't working.
  See the FAQ (``The FAQ Section'') for what to do if your card is not
  detected. If you have a NE2000 compatible, there is also some NE2000
  specific tips on getting a card detected in the FAQ section as well.

  If the card is detected, but the detection message reports some sort
  of error, like a resource conflict, then the driver probably won't
  have initialized properly and the card still wont be useable. Most
  common error messages of this sort are also listed in the FAQ section,
  along with a solution.

  If the detection message seems okay, then double check the card
  resources reported by the driver against those that the card is
  physically set for (either by little black jumpers on the card, or by
  a software utility supplied by the card manufacturer.)  These must
  match exactly. For example, if you have the card jumpered or
  configured to IRQ 15 and the driver reports IRQ 10 in the boot
  messages, things will not work. The FAQ section discusses the most
  common cases of drivers incorrectly detecting the configuration
  information of various cards.

  At this point, you have managed to get you card detected with all the
  correct parameters, and hopefully everything is working.  If not, then
  you either have a software configuration error, or a hardware
  configuration error. A software configuration error is not setting up
  the right network addresses for the ifconfig and route commands, and
  details of how to do that are fully described in the Network HowTo and
  the `Network Administrator's Guide' which both probably came on the
  CD-ROM you installed from.

  A hardware configuration error is when some sort of resource conflict
  or mis-configuration (that the driver didn't detect at boot) stops the
  card from working properly. This typically can be observed in several
  different ways. (1) You get an error message when ifconfig tries to
  open the device for use, such as ``SIOCSFFLAGS: Try again''. (2) The
  driver reports eth0 error messages (viewed by dmesg | more) or strange
  inconsistencies for each time it tries to send or receive data. (3)
  Typing cat /proc/net/dev shows non-zero numbers in one of the errs,
  drop, fifo, frame or carrier columns for eth0. (4) Typing cat
  /proc/interrupts shows a zero interrupt count for the card.  Most of
  the typical hardware configuration errors are also discussed in the
  FAQ section.

  Well, if you have got to this point and things still aren't working,
  read the FAQ section of this document, read the vendor specific
  section detailing your particular card, and if it still doesn't work
  then you may have to resort to posting to an appropriate newsgroup for
  help. If you do post, please detail all relevant information in that
  post, such as the card brand, the kernel version, the driver boot
  messages, the output from cat /proc/net/dev, a clear description of
  the problem, and of course what you have already tried to do in an
  effort to get things to work.

  You would be surprised at how many people post useless things like
  ``Can someone help me? My ethernet doesn't work.'' and nothing else.
  Readers of the newsgroups tend to ignore such silly posts, whereas a
  detailed and informational problem description may allow a `linux-
  guru' to spot your problem right away.



  2.  What card should I buy for Linux?


  The answer to this question depends heavily on exactly what you intend
  on doing with your net connection, and how much traffic it will see.

  If you only expect a single user to be doing the occasional ftp
  session or WWW connection, then even an old 8 bit ISA card will
  probably keep you happy.

  If you intend to set up a server, and you require the CPU overhead of
  Rx'ing and Tx'ing network data to be kept to a minimum, you probably
  want to look at one of the PCI cards that uses a chip with bus-
  mastering capapbility, such as the DEC tulip (21xxx) chip, or the AMD
  PCnet-PCI chip.

  If you fall somewhere in the middle of the above, then any one of the
  low cost PCI or 16 bit ISA cards with stable drivers will do the job
  for you.


  2.1.  So What Drivers are Stable?


  Of the 16 bit ISA cards, the following drivers are very mature, and
  you shouldn't have any problems if you buy a card that uses these
  drivers.

  SMC-Ultra/EtherEZ, SMC-Elite (WD80x3), 3c509, Lance, NE2000.

  This is not to say that all the other drivers are unstable.  It just
  happens that the above are the oldest and most used of all the linux
  drivers, making them the safest choice.

  Note that some el-cheapo motherboards can have trouble with the bus-
  mastering that the ISA Lance cards do, and some el-cheapo NE2000
  clones can have trouble getting detected at boot.

  The most commonly used linux PCI drivers are probably the 3Com
  Vortex/Boomerang (3c59x/3c9xx), the DEC tulip (21xxx), and the Intel
  EtherExpressPro 100.  The various PCI-NE2000 clone cards are also
  extremely common, but purchasing a PCI-NE2000 clone card is not
  recommended unless the lowest possible price is more important than
  having a modern high-performace design card.



  2.2.  Eight bit vs 16 bit Cards


  You probably can't buy a new 8 bit ISA ethercard anymore, but you will
  find lots of them turning up at computer swap meets and the like for
  the next few years, at very low prices.  This will make them popular
  for ``home-ethernet'' systems.  The above holds true for 16 bit ISA
  cards now as well, since PCI cards are now very common.

  Some 8 bit cards that will provide adequate performance for light to
  average use are the wd8003, the 3c503 and the ne1000.  The 3c501
  provides poor performance, and these poor 12 year old relics of the XT
  days should be avoided. (Send them to Alan, he collects them...)

  The 8 bit data path doesn't hurt performance that much, as you can
  still expect to get about 500 to 800kB/s ftp download speed to an 8
  bit wd8003 card (on a fast ISA bus) from a fast host.  And if most of
  your net-traffic is going to remote sites, then the bottleneck in the
  path will be elsewhere, and the only speed difference you will notice
  is during net activity on your local subnet.


  2.3.  32 Bit (VLB/EISA/PCI) Ethernet Cards


  Note that a 10Mbs network typically doesn't justify  requiring a 32
  bit interface.  See ``Programmed I/O vs. ...'' as to why having a
  10Mbps ethercard on an 8MHz ISA bus is really not a bottleneck. Even
  though having the ethercard on a fast bus won't necessarily mean
  faster transfers, it will usually mean reduced CPU overhead, which is
  good for multi-user systems.

  Of course for 100Mbps networks, which are now commonplace, the 32 bit
  interface is a must to make use of the full bandwidth.  AMD has the 32
  bit PCnet-VLB and PCnet-PCI chips.  See ``AMD PCnet-32'' for info on
  the 32 bit versions of the LANCE / PCnet-ISA chip.

  The DEC 21xxx PCI `tulip' chip is another option (see ``DEC 21040'')
  for power-users.  Many manufacturers produce cards that use this chip,
  and the prices of such no-name cards is usually quite cheap.

  3Com's `Vortex' and `Boomerang' PCI cards are also another option, and
  the price is quite cheap if you can get one under their evaluation
  deal while it lasts.  (see ``3c590/3c595'')

  Intel's EtherExpress Pro 10/100 PCI cards have also been reported to
  work well with linux. (see ``EtherExpress'')

  Various clone manufacturers have started making PCI NE2000 clones
  based on a RealTek or Winbond chip. These cards are also supported by
  the linux ne2000 driver for v2.0.31 and newer kernels.  However you
  only benefit from the faster bus interface, as the card is still using
  the age-old ne2000 driver interface.  As of v2.0.34 (and above) a
  separate PCI-specific driver for these cards ne2k-pci.c is also
  available, which will be sightly more efficient than the ISA ne.c
  driver.


  2.4.  Available 100Mbs Cards and Drivers


  The present list of supported 100Mbs hardware is as follows: cards
  with the DEC 21140 chip; the 3c595/3c90x Vortex cards; the
  EtherExpressPro10/100B; the PCnet-FAST; the SMC 83c170 (epic100) and
  the HP 100VG ANY-LAN.

  Have a look at the vendor specific information for each that is in
  this document. You may also want to check out some of the following:


  Linux and 100Mbs Ethernet
  <http://cesdis.gsfc.nasa.gov/linux/misc/100mbs.html>

  Donald's 100VG Page
  <http://cesdis.gsfc.nasa.gov/linux/drivers/100vg.html>

  Dan Kegel's Fast Ethernet Page <http://alumni.caltech.edu/~dank/fe/>


  2.5.  100VG versus 100BaseT


  100BaseT is much more prominent than 100VG, and the following blurb
  from an older one of Donald's informative comp.os.linux postings
  summarizes the situation quite well:

  ``For those not in the know, there are two competing 100Mbs ethernet
  standards, 100VG (aka 100baseVG and 100VG-AnyLAN) and 100baseT (with
  100baseTx, 100baseT4 and 100baseFx cable types).

  100VG was on the market first, and I feel that it is better engineered
  than 100baseTx.  I was rooting for it to win, but it clearly isn't
  going to.  HP et al. made several bad choices:


  1) Delaying the standard so that they could accommodate IBM and
  support token ring frames.  It `seemed like a good idea at the time',
  since it would enable token ring shops to upgrade without the managers
  having to admit they made a very expensive mistake committing to the
  wrong technology.  But there was nothing to be gained, as the two
  frame types couldn't coexist on a network, token ring is a morass of
  complexity, and IBM went with 100baseT anyway.

  2) Producing only ISA and EISA cards.  (A PCI model was only recently
  announced.)  The ISA bus is too slow for 100mbs, and relatively few
  EISA machines exist.  At the time VLB was common, fast, and cheap with
  PCI a viable choice.  But "old-timer" wisdom held that servers would
  stay with the more expensive EISA bus.

  3) Not sending me a databook.  Yes, this action was the real reason
  for the 100VGs downfall :-).  I called all over for programming info,
  and all I could get was a few page color glossy brochure from AT&T
  describing how wonderful the Regatta chipset was.''


  2.6.  Type of cable that your card should support


  If you are setting up a small ``personal'' network, you will probably
  want to use thinnet or thin ethernet cable. This is the style with the
  standard BNC connectors.  The thinnet, or thin ethernet cabling,
  (RG-58 coaxial cable) with the BNC (metal push and turn-to-lock)
  connectors is technically called 10Base2.

  Most ethercards also come in a `Combo' version for only $10-$20 more.
  These have both twisted pair and thinnet transceiver built-in,
  allowing you to change your mind later.

  The twisted pair cables, with the RJ-45 (giant phone jack) connectors
  is technically called 10BaseT. You may also hear it called UTP
  (Unsheilded Twisted Pair).

  The older thick ethernet (10mm coaxial cable) which is only found in
  older installations is called 10Base5. The 15 pin D-shaped plug found
  on some ethernet cards (the AUI connector) is used to connect to thick
  ethernet and external transcievers.

  Large corporate installations will most likely use 10BaseT instead of
  10Base2. 10Base2 does not offer any upgrade path to 100Base-whatever.

  See ``Cables, Coax...''  for other concerns with different types of
  ethernet cable.


  3.  Frequently Asked Questions


  Here are some of the more frequently asked questions about using Linux
  with an Ethernet connection. Some of the more specific questions are
  sorted on a `per manufacturer basis'.  Chances are the question you
  want an answer for has already been asked (and answered!) by someone
  else, so even if you don't find your answer here, you probably can
  find what you want from a news archive such as Dejanews
  <http://www.dejanews.com>.


  3.1.  Alpha Drivers -- Getting and Using them


  I heard that there is an updated or preliminary/alpha driver available
  for my card. Where can I get it?
  The newest of the `new' drivers can be found on Donald's ftp site:
  cesdis.gsfc.nasa.gov in the /pub/linux/ area. Things change here quite
  frequently, so just look around for it.  Alternatively, it may be
  easier to use a WWW browser on:

  Don's Linux Home Page <http://cesdis.gsfc.nasa.gov/linux/>

  to locate the driver that you are looking for. (Watch out for WWW
  browsers that silently munge the source by replacing TABs with spaces
  and so on - use ftp, or at least an FTP URL for downloading if
  unsure.)

  Now, if it really is an alpha, or pre-alpha driver, then please treat
  it as such. In other words, don't complain because you can't figure
  out what to do with it. If you can't figure out how to install it,
  then you probably shouldn't be testing it.  Also, if it brings your
  machine down, don't complain. Instead, send us a well documented bug
  report, or even better, a patch!

  Note that some of the `useable' experimental/alpha drivers have been
  included in the standard kernel source tree. When running make config
  one of the first things you will be asked is whether to ``Prompt for
  development and/or incomplete code/drivers''.  You will have to answer
  `Y' here to get asked about including any alpha/experiemntal drivers.


  3.2.  Using More than one Ethernet Card per Machine


  What needs to be done so that Linux can run two ethernet cards?

  The answer to this question depends on whether the driver(s) is/are
  being used as a loadable module or are compiled directly into the
  kernel.  Most linux distributions use modular drivers now.  This saves
  distributing lots of kernels, each with a different driver set built
  in. Instead a single basic kernel is used and the individual drivers
  that are need for a particular user's system are loaded once the
  system has booted far enough to access the driver module files
  (usually stored in /lib/modules/).

  With the Driver as a Module: In the case of PCI drivers, the module
  will typically detect all of the installed cards of that brand model
  automatically.  However, for ISA cards, probing for a card is not a
  safe operation, and hence you typically need to supply the I/O base
  address of the card so the module knows where to look. This
  information is stored in the file /etc/conf.modules.

  As an example, consider a user that has two ISA NE2000 cards, one at
  0x300 and one at 0x240 and what lines they would have in their
  /etc/conf.modules file:


          alias eth0 ne
          alias eth1 ne
          options ne io=0x240,0x300



  What this does: This says that if the administrator (or the kernel)
  does a modprobe eth0 or a modprobe eth1 then the ne.o driver should be
  loaded for either eth0 or eth1.  Furthermore, when the ne.o module is
  loaded, it should be loaded with the options io=0x240,0x300 so that
  the driver knows where to look for the cards. Note that the 0x is
  important - things like 300h as commonly used in the DOS world won't
  work.  Switching the order of the 0x240 and the 0x300 will switch
  which physical card ends up as eth0 and eth1.
  Most of the ISA module drivers can take multiple comma separated I/O
  values like this example to handle multiple cards.  However, some
  (older?) drivers, such as the 3c501.o module are currently only able
  to handle one card per module load. In this case you can load the
  module twice to get both cards detected. The /etc/conf.modules file in
  this case would look like:


          alias eth0 3c501
          alias eth1 3c501
          options eth0 -o 3c501-0 io=0x280 irq=5
          options eth1 -o 3c501-1 io=0x300 irq=7



  In this example the -o option has been used to give each instance of
  the module a unique name, since you can't have two modules loaded with
  the same name.  The irq= option has also been used to to specify the
  hardware IRQ setting of the card.  (This method can also be used with
  modules that accept comma separated I/O values, but it is less
  efficient since the module ends up being loaded twice when it doesn't
  really need to be.)

  As a final example, consider a user with one 3c503 card at 0x350and
  one SMC Elite16 (wd8013) card at 0x280.  They would have:


          alias eth0 wd
          alias eth1 3c503
          options wd io=0x280
          options 3c503 io=0x350



  For PCI cards, you typically only need the alias lines to correlate
  the ethN interfaces with the appropriate driver name, since the I/O
  base of a PCI card can be safely detected.

  The available modules are typically stored in /lib/modules/`uname
  -r`/net where the uname -r command gives the kernel version (e.g.
  2.0.34).  You can look in there to see which one matches your card.
  Once you have the correct settings in your conf.modules file, you can
  test things out with:


          modprobe ethN
          dmesg | tail



  where `N' is the number of the ethernet interface you are testing.


  With the Driver Compiled into the Kernel: If you have the driver
  compiled into the kernel, then the hooks for multiple ethercards are
  all there.  However, note that at the moment only one ethercard is
  auto-probed for by default.  This helps to avoid possible boot time
  hangs caused by probing sensitive cards.

  (Note: As of late 2.1.x kernels, the boot probes have been sorted into
  safe and unsafe, so that all safe (e.g. PCI and EISA) probes will find
  all related cards automatically. Systems with more than one ethernet
  card with at least one of them being an ISA card will still need to do
  one of the following.)


  There are two ways that you can enable auto-probing for the second
  (and third, and...) card. The easiest method is to pass boot-time
  arguments to the kernel, which is usually done by LILO. Probing for
  the second card can be achieved by using a boot-time argument as
  simple as ether=0,0,eth1. In this case eth0 and eth1 will be assigned
  in the order that the cards are found at boot.  Say if you want the
  card at 0x300 to be eth0 and the card at 0x280 to be eth1 then you
  could use


       LILO: linux ether=5,0x300,eth0 ether=15,0x280,eth1


  The ether= command accepts more than the IRQ + I/O + name shown above.
  Please have a look at ``Passing Ethernet Arguments...''  for the full
  syntax, card specific parameters, and LILO tips.

  These boot time arguments can be made permanent so that you don't have
  to re-enter them every time. See the LILO configuration option
  `append' in the LILO manual.

  The second way (not recommended) is to edit the file Space.c and
  replace the 0xffe0 entry for the I/O address with a zero. The 0xffe0
  entry tells it not to probe for that device -- replacing it with a
  zero will enable autoprobing for that device.

  Note that if you are intending to use Linux as a gateway between two
  networks, you will have to re-compile a kernel with IP forwarding
  enabled. Usually using an old AT/286 with something like the `kbridge'
  software is a better solution.

  If you are viewing this while net-surfing, you may wish to look at a
  mini-howto Donald has on his WWW site. Check out Multiple Ethercards
  <http://cesdis.gsfc.nasa.gov/linux/misc/multicard.html>.


  3.3.  The ether=  thing didn't do anything for me. Why?


  As described above, the ether= command only works for drivers that are
  compiled into the kernel. Now most distributions use the drivers in a
  modular form, and so the ether= command is rarely used anymore. (Some
  older documentation has yet to be updated to reflect this change.)  If
  you want to apply options for a modular ethernet driver you must make
  changes to the /etc/conf.modules file.

  If you are using a compiled in driver, and have added an ether= to
  your LILO configuration file, note that it won't take effect until you
  re-run lilo to process the updated configuration file.



  3.4.  Problems with NE1000 / NE2000 cards (and clones)


  Problem: PCI NE2000 clone card is not detected at boot with v2.0.x.

  Reason: The ne.c driver up to v2.0.30 only knows about the PCI ID
  number of RealTek 8029 based clone cards. Since then, several others
  have also released PCI NE2000 clone cards, with different PCI ID
  numbers, and hence the driver doesn't detect them.

  Solution: The easiest solution is to upgrade to a v2.0.31 (or newer)
  version of the linux kernel. It knows the ID numbers of about five
  different NE2000-PCI chips, and will detect them automatically at boot
  or at module loading time. If you upgrade to 2.0.34 (or newer) there
  is a PCI-only specific NE2000 driver that is slightly smaller and more
  efficient than the original ISA/PCI driver.

  Problem: PCI NE2000 clone card is reported as an ne1000 (8 bit card!)
  at boot or when I load the ne.o module for v2.0.x, and hence doesn't
  work.

  Reason: Some PCI clones don't implement byte wide access (and hence
  are not truly 100% NE2000 compatible). This causes the probe to think
  they are NE1000 cards.

  Solution: You need to upgrade to v2.0.31 (or newer) as described
  above.  The driver(s) now check for this hardware bug.

  Problem: PCI NE2000 card gets terrible performance, even when reducing
  the window size as described in the Performance Tips section.

  Reason: The spec sheets for the original 8390 chip,  desgined and sold
  over ten years ago, noted that a dummy read from the chip was required
  before each write operation for maximum reliablity.  The driver has
  the facility to do this but it has been disabled by default since the
  v1.2 kernel days.  One user has reported that re-enabling this `mis-
  feature' helped their performance with a cheap PCI NE2000 clone card.

  Solution: Since it has only been reported as a solution by one person,
  don't get your hopes up. Re-enabling the read before write fix is done
  by simply editing the driver file in linux/drivers/net/, uncommenting
  the line containing NE_RW_BUGFIX and then rebuilding the kernel or
  module as appropriate. Please send an e-mail describing the
  performance difference and type of card/chip you have if this helps
  you. (The same can be done for the ne2k-pci.c driver as well).

  Problem: The ne2k-pci.c driver reports error messages like timeout
  waiting for Tx RDC with a PCI NE2000 card and doesn't work right.

  Reason: Your card and/or the card to PCI bus link can't handle the
  long word I/O optimization used in this driver.

  Solution: Firstly, check the settings available in the BIOS/CMOS setup
  to see if any related to PCI bus timing are too aggressive for
  reliable operation. Otherwise using the ISA/PCI ne.c driver (or
  removing the #define USE_LONGIO from ne2k-pci.c) should let you use
  the card.

  Probem: ISA Plug and Play NE2000 (such as RealTek 8019) is not
  detected.

  Reason: The original NE2000 specification (and hence the linux NE2000
  driver) does not have support for Plug and Play.

  Solution: Use the DOS configuration disk that came with the card to
  disable PnP, and to set the card to a specified I/O address and IRQ.
  Add a line to /etc/conf.modules  like options ne io=0xNNN where 0xNNN
  is the hex I/O address you set the card to. (This assumes you are
  using a modular driver; if not then use an ether=0,0xNNN,eth0 argument
  at boot).  You may also have to enter the BIOS/CMOS setup and mark the
  IRQ as Legacy-ISA instead of PnP.  Alternatively, if you need to leave
  PnP enabled for compatibility with some other operating system, then
  look into the isapnptools package. Try man isapnp to see if it is
  already installed on your system.  If not, then have a look at the
  following URL:

  ISA PNP Tools <http://www.roestock.demon.co.uk/isapnptools/>



  Problem: NE*000 driver reports `not found (no reset ack)' during boot
  probe.

  Reason: This is related to the above change. After the initial
  verification that an 8390 is at the probed I/O address, the reset is
  performed. When the card has completed the reset, it is supposed to
  acknowedge that the reset has completed.  Your card doesn't, and so
  the driver assumes that no NE card is present.

  Solution: You can tell the driver that you have a bad card by using an
  otherwise unused mem_end hexidecimal value of 0xbad at boot time. You
  have to also supply a non-zero I/O base for the card when using the
  0xbad override. For example, a card that is at 0x340 that doesn't ack
  the reset would use something like:


       LILO: linux ether=0,0x340,0,0xbad,eth0



  This will allow the card detection to continue, even if your card
  doesn't ACK the reset. If you are using the driver as a module, then
  you can supply the option bad=0xbad just like you supply the I/O
  address.

  Problem: NE*000 card hangs machine at first network access.

  Reason: This problem has been reported for kernels as old as 1.1.57 to
  the present. It appears confined to a few software configurable clone
  cards. It appears that they expect to be initialized in some special
  way.

  Solution: Several people have reported that running the supplied DOS
  software config program and/or the supplied DOS driver prior to warm
  booting (i.e. loadlin or the `three-finger-salute') into linux allowed
  the card to work. This would indicate that these cards need to be
  initialized in a particular fashion, slightly different than what the
  present Linux driver does.

  Problem: NE*000 ethercard at 0x360 doesn't get detected.

  Reason: Your NE2000 card is 0x20 wide in I/O space, which makes it hit
  the parallel port at 0x378.  Other devices that could be there are the
  second floppy controller (if equipped) at 0x370 and the secondary IDE
  controller at 0x376--0x377.  If the port(s) are already registered by
  another driver, the kernel will not let the probe happen.

  Solution: Either move your card to an address like 0x280, 0x340, 0x320
  or compile without parallel printer support.

  Problem: Network `goes away' every time I print something (NE2000)

  Reason: Same problem as above, but you have an older kernel that
  doesn't check for overlapping I/O regions. Use the same fix as above,
  and get a new kernel while you are at it.

  Problem: NE*000 ethercard probe at 0xNNN: 00 00 C5 ... not found.
  (invalid signature yy zz)

  Reason: First off, do you have a NE1000 or NE2000 card at the addr.
  0xNNN?  And if so, does the hardware address reported look like a
  valid one? If so, then you have a poor NE*000 clone. All NE*000 clones
  are supposed to have the value 0x57 in bytes 14 and 15 of the SA PROM
  on the card. Yours doesn't -- it has `yy zz' instead.


  Solution: There are two ways to get around this. The easiest is to use
  an 0xbad mem_end value as described above for the `no reset ack'
  problem. This will bypass the signature check, as long as a non-zero
  I/O base is also given. This way no recompilation of the kernel is
  required.

  The second method (for hackers) involves changing the driver itself,
  and then recompiling your kernel (or module).  The driver
  (/usr/src/linux/drivers/net/ne.c) has a "Hall of Shame" list at about
  line 42. This list is used to detect poor clones.  For example, the
  DFI cards use `DFI' in the first 3 bytes of the PROM, instead of using
  0x57 in bytes 14 and 15, like they are supposed to.

  Problem: The machine hangs during boot right after the `8390...'  or
  `WD....' message. Removing the NE2000 fixes the problem.

  Solution: Change your NE2000 base address to something like 0x340.
  Alternatively, you can use the ``reserve='' boot argument in
  conjunction with the ``ether='' argument to protect the card from
  other device driver probes.

  Reason: Your NE2000 clone isn't a good enough clone. An active NE2000
  is a bottomless pit that will trap any driver autoprobing in its
  space.  Changing the NE2000 to a less-popular address will move it out
  of the way of other autoprobes, allowing your machine to boot.


  Problem: The machine hangs during the SCSI probe at boot.

  Reason: It's the same problem as above, change the ethercard's
  address, or use the reserve/ether boot arguments.

  Problem: The machine hangs during the soundcard probe at boot.

  Reason: No, that's really during the silent SCSI probe, and it's the
  same problem as above.

  Problem: NE2000 not detected at boot - no boot messages at all

  Solution: There is no `magic solution' as there can be a number of
  reasons why it wasn't detected. The following list should help you
  walk through the possible problems.

  1) Build a new kernel with only the device drivers that you need.
  Verify that you are indeed booting the fresh kernel. Forgetting to run
  lilo, etc. can result in booting the old one. (Look closely at the
  build time/date reported at boot.) Sounds obvious, but we have all
  done it before. Make sure the driver is in fact included in the new
  kernel, by checking the System.map file for names like ne_probe.

  2) Look at the boot messages carefully. Does it ever even mention
  doing a ne2k probe such as `NE*000 probe at 0xNNN: not found (blah
  blah)' or does it just fail silently. There is a big difference.  Use
  dmesg|more to review the boot messages after logging in, or hit Shift-
  PgUp to scroll the screen up after the boot has completed and the
  login prompt appears.

  3) After booting, do a cat /proc/ioports and verify that the full
  iospace that the card will require is vacant. If you are at 0x300 then
  the ne2k driver will ask for 0x300-0x31f. If any other device driver
  has registered even one port anywhere in that range, the probe will
  not take place at that address and will silently continue to the next
  of the probed addresses. A common case is having the lp driver reserve
  0x378 or the second IDE channel reserve 0x376 which stops the ne
  driver from probing 0x360-0x380.

  4) Same as above for cat /proc/interrupts. Make sure no other device
  has registered the interrupt that you set the ethercard for. In this
  case, the probe will happen, and the ether driver will complain loudly
  at boot about not being able to get the desired IRQ line.

  5) If you are still stumped by the silent failure of the driver, then
  edit it and add some printk() to the probe. For example, with the ne2k
  you could add/remove lines (marked with a `+' or `-') in
  linux/drivers/net/ne.c like:


  ______________________________________________________________________
      int reg0 = inb_p(ioaddr);

  +    printk("NE2k probe - now checking %x\n",ioaddr);
  -    if (reg0 == 0xFF)
  +    if (reg0 == 0xFF) {
  +       printk("NE2k probe - got 0xFF (vacant I/O port)\n");
          return ENODEV;
  +    }
  ______________________________________________________________________



  Then it will output messages for each port address that it checks, and
  you will see if your card's address is being probed or not.

  6) You can also get the ne2k diagnostic from Don's ftp site (mentioned
  in the howto as well) and see if it is able to detect your card after
  you have booted into linux. Use the `-p 0xNNN' option to tell it where
  to look for the card. (The default is 0x300 and it doesn't go looking
  elsewhere, unlike the boot-time probe.)  The output from when it finds
  a card will look something like:


  ______________________________________________________________________
  Checking the ethercard at 0x300.
    Register 0x0d (0x30d) is 00
    Passed initial NE2000 probe, value 00.
  8390 registers: 0a 00 00 00 63 00 00 00 01 00 30 01 00 00 00 00
  SA PROM  0: 00 00 00 00 c0 c0 b0 b0 05 05 65 65 05 05 20 20
  SA PROM 0x10: 00 00 07 07 0d 0d 01 01 14 14 02 02 57 57 57 57

          NE2000 found at 0x300, using start page 0x40 and end page 0x80.
  ______________________________________________________________________



  Your register values and PROM values will probably be different.  Note
  that all the PROM values are doubled for a 16 bit card, and that the
  ethernet address (00:00:c0:b0:05:65) appears in the first row, and the
  double 0x57 signature appears at the end of the PROM.

  The output from when there is no card installed at 0x300 will look
  something like this:



  ______________________________________________________________________
  Checking the ethercard at 0x300.
    Register 0x0d (0x30d) is ff
    Failed initial NE2000 probe, value ff.
  8390 registers: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  SA PROM        0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  SA PROM 0x10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

   Invalid signature found, wordlength 2.
  ______________________________________________________________________



  The 0xff values  arise because that is the value that is returned when
  one reads a vacant I/O port. If you happen to have some other hardware
  in the region that is probed, you may see some non 0xff values as
  well.

  7) Try warm booting into linux from a DOS boot floppy (via loadlin)
  after running the supplied DOS driver or config program. It may be
  doing some extra (i.e. non-standard) "magic" to initialize the card.

  8) Try Russ Nelson's ne2000.com packet driver to see if even it can
  see your card -- if not, then things do not look good. Example:


       A:> ne2000 0x60 10 0x300


  The arguments are software interrupt vector, hardware IRQ, and  I/O
  base.  You can get it from any msdos archive in pktdrv11.zip -- The
  current version may be newer than 11.



  3.5.  Problems with SMC Ultra/EtherEZ and WD80*3 cards


  Problem: You get messages such as the following:


          eth0: bogus packet size: 65531, status=0xff, nxpg=0xff



  Reason: There is a shared memory problem.

  Solution: The most common reason for this is PCI machines that are not
  configured to map in ISA memory devices. Hence you end up reading the
  PC's RAM (all 0xff values) instead of the RAM on the card that
  contains the data from the received packet.

  Other typical problems that are easy to fix are board conflicts,
  having cache or `shadow ROM' enabled for that region, or running your
  ISA bus faster than 8Mhz. There are also a surprising number of memory
  failures on ethernet cards, so run a diagnostic program if you have
  one for your ethercard.

  Problem: SMC EtherEZ doesn't work in non-shared memory (PIO) mode.

  Reason: Older versions of the Ultra driver only supported the card in
  the shared memory mode of operation.

  Solution: The driver in kernel version 2.0 and above also supports the
  programmed I/O mode of operation. Upgrade to v2.0 or newer.
  Problem: Old wd8003 and/or jumper-settable wd8013 always get the IRQ
  wrong.

  Reason: The old wd8003 cards and jumper-settable wd8013 clones don't
  have the EEPROM that the driver can read the IRQ setting from.  If the
  driver can't read the IRQ, then it tries to auto-IRQ to find out what
  it is. And if auto-IRQ returns zero, then the driver just assigns IRQ
  5 for an 8 bit card or IRQ 10 for a 16 bit card.

  Solution: Avoid the auto-IRQ code, and tell the kernel what the IRQ
  that you have jumpered the card to in your module configuration file
  (or via a boot time argument for in-kernel drivers).

  Problem: SMC Ultra card is detected as wd8013, but the IRQ and shared
  memory base is wrong.

  Reason: The Ultra card looks a lot like a wd8013, and if the Ultra
  driver is not present in the kernel, the wd driver may mistake the
  ultra as a wd8013. The ultra probe comes before the wd probe, so this
  usually shouldn't happen. The ultra stores the IRQ and mem base in the
  EEPROM differently than a wd8013, hence the bogus values reported.

  Solution: Recompile with only the drivers you need in the kernel. If
  you have a mix of wd and ultra cards in one machine, and are using
  modules, then load the ultra module first.


  3.6.  Problems with 3Com cards

  Problem: The 3c503 picks IRQ N, but this is needed for some other
  device which needs IRQ N. (eg. CD ROM driver, modem, etc.)  Can this
  be fixed without compiling this into the kernel?

  Solution: The 3c503 driver probes for a free IRQ line in the order {5,
  9/2, 3, 4}, and it should pick a line which isn't being used. The
  driver chooses when the card is ifconfig'ed into operation.

  If you are using a modular driver, you can use module parameters to
  set various things, including the IRQ value.

  The following selects IRQ9, base location 0x300, <ignored value>, and
  if_port #1 (the external transceiver).



       io=0x300 irq=9 xcvr=1


  Alternately, if the driver is compiled into the kernel, you can set
  the same values at boot by passing parameters via LILO.


       LILO: linux ether=9,0x300,0,1,eth0


  The following selects IRQ3, probes for the base location, <ignored
  value>, and the default if_port #0 (the internal transceiver)


       LILO: linux ether=3,0,0,0,eth0


  Problem: 3c503: configured interrupt X invalid, will use autoIRQ.

  Reason: The 3c503 card can only use one of IRQ{5, 2/9, 3, 4} (These
  are the only lines that are connected to the card.)  If you pass in an
  IRQ value that is not in the above set, you will get the above
  message.  Usually, specifying an interrupt value for the 3c503 is not
  necessary. The 3c503 will autoIRQ when it gets ifconfig'ed, and pick
  one of IRQ{5, 2/9, 3, 4}.

  Solution: Use one of the valid IRQs listed above, or enable autoIRQ by
  not specifying the IRQ line at all.

  Problem: The supplied 3c503 drivers don't use the AUI (thicknet) port.
  How does one choose it over the default thinnet port?

  Solution: The 3c503 AUI port can be selected at boot-time for in-
  kernel drivers, and at module insertion for modular drivers.  The
  selection is overloaded onto the low bit of the currently-unused
  dev->rmem_start variable, so a boot-time parameter of:


       LILO: linux ether=0,0,0,1,eth0


  should work for in-kernel drivers.

  To specify the AUI port when loading as a module, just append xcvr=1
  to the module options line along with your I/O and IRQ values.



  3.7.  FAQs Not Specific to Any Card.



  3.7.1.  Linux and ISA Plug and Play Ethernet Cards


  For best results (and minimum aggravation) it is recommended that you
  use the (usually DOS) program that came with your card to disable the
  PnP mechanism and set it to a fixed I/O address and IRQ.  Make sure
  the I/O address you use is probed by the driver at boot, or if using
  modules then supply the address as an io= option in /etc/conf.modules.
  You may also have to enter the BIOS/CMOS setup and mark the IRQ as
  Legacy-ISA instead of PnP (if your computer has this option).

  Note that you typically don't need DOS installed to run a DOS based
  configuration program. You can usually just boot a DOS floppy disk and
  run them from the supplied floppy disk.  You can also download OpenDOS
  and FreeDOS for free.

  If you require PnP enabled for compatibility with some other operating
  system then you will have to use the isapnptools package with linux to
  configure the card(s) each time at boot.  You will still have to make
  sure the I/O address chosen for the card is probed by the driver or
  supplied as an io= option.



  3.7.2.  Ethercard is Not Detected at Boot.


  The usual reason for this is that people are using a kernel that does
  not have support for their particular card built in. For a modular
  kernel, it usually means that the required module has not been
  requested for loading, or that an I/O address needs to be specified as
  a module option.

  If you are using a modular based kernel, such as those installed by
  most of the linux distributions, then try and use the configuration
  utility for the distribution to select the module for your card. For
  ISA cards, it is a good idea to determine the I/O address of the card
  and add it as an option (e.g. io=0x340) if the configuration utility
  asks for any options. If there is no configuration utility, then you
  will have to add the correct module name (and options) to
  /etc/conf.modules -- see man modprobe for more details.

  If you are using a pre-compiled kernel that is part of a distribution
  set, then check the documentation to see which kernel you installed,
  and if it was built with support for your particular card. If it
  wasn't, then your options are to try and get one that has support for
  your card, or build your own.

  It is usually wise to build your own kernel with only the drivers you
  need, as this cuts down on the kernel size (saving your precious RAM
  for applications!) and reduces the number of device probes that can
  upset sensitive hardware. Building a kernel is not as complicated as
  it sounds. You just have to answer yes or no to a bunch of questions
  about what drivers you want, and it does the rest.

  The next main cause is having another device using part of the I/O
  space that your card needs. Most cards are 16 or 32 bytes wide in I/O
  space. If your card is set at 0x300 and 32 bytes wide, then the driver
  will ask for 0x300-0x31f. If any other device driver has registered
  even one port anywhere in that range, the probe will not take place at
  that address and  the driver will silently continue to the next of the
  probed addresses. So, after booting, do a cat /proc/ioports and verify
  that the full I/O space that the card will require is vacant.

  Another problem is having your card jumpered to an I/O address that
  isn't probed by default.  The list of probed addresses for each driver
  is easily found just after the text comments in the driver source.
  Even if the I/O setting of your card is not in the list of probed
  addresses, you can supply it at boot (for in-kernel drivers) with the
  ether= command as described in ``Passing Ethernet Arguments...''
  Modular drivers can make use of the io= option in /etc/conf.modules to
  specify an address that isn't probed by default.



  3.7.3.  ifconfig  reports the wrong I/O address for the card.


  No it doesn't. You are just interpreting it incorrectly.  This is not
  a bug, and the numbers reported are correct. It just happens that some
  8390 based cards (wd80x3, smc-ultra, etc) have the actual 8390 chip
  living at an offset from the first assigned I/O port.  This is the
  value stored in dev->base_addr, and is what ifconfig reports. If you
  want to see the full range of ports that your card uses, then try cat
  /proc/ioports which will give the numbers you expect.


  3.7.4.  PCI machine detects card but driver fails probe.


  Some PCI BIOSes may not enable all PCI cards at power-up, especially
  if the BIOS option `PNP OS' is enabled. This mis-feature is to support
  the current release of Windows which still uses some real-mode
  drivers. Either disable this option, or try and upgrade to a newer
  driver which has the code to enable a disabled card.


  3.7.5.  Shared Memory ISA cards in PCI Machine do not work ( 0xffff )



  This will usually show up as reads of lots of 0xffff values.  No
  shared memory cards of any type will work in a PCI machine unless you
  have the PCI ROM BIOS/CMOS SETUP configuration set properly. You have
  to set it to allow shared memory access from the ISA bus for the
  memory region that your card is trying to use. If you can't figure out
  which settings are applicable then ask your supplier or local computer
  guru. For AMI BIOS, there is usually a "Plug and Play" section where
  there will be an ``ISA Shared Memory Size'' and ``ISA Shared Memory
  Base'' settings. For cards like the wd8013 and SMC Ultra, change the
  size from the default of `Disabled' to 16kB, and change the base to
  the shared memory address of your card.



  3.7.6.  Card seems to send data but never receives anything.


  Do a cat /proc/interrupts.  A running total of the number of interrupt
  events your card generates will be in the list given from the above.
  If it is zero and/or doesn't increase when you try to use the card
  then there is probably a physical interrupt conflict with another
  device installed in the computer (regardless of whether or not the
  other device has a driver installed/available).  Change the IRQ of one
  of the two devices to a free IRQ.



  3.7.7.  Asynchronous Transfer Mode (ATM) Support


  Werner Almesberger has been working on ATM support for linux.  He has
  been working with the Efficient Networks ENI155p board (Efficient
  Networks <http://www.efficient.com/>) and the Zeitnet ZN1221 board
  (Zeitnet <http://www.zeitnet.com/>).

  Werner says that the driver for the ENI155p is rather stable, while
  the driver for the ZN1221 is presently unfinished.

  Check the latest/updated status at the following URL:

  Linux ATM Support <http://lrcwww.epfl.ch/linux-atm/>


  3.7.8.  Gigabyte Ethernet Support


  Is there any gigabyte ethernet support for Linux?

  Yes, there are currently at least two.  A driver for the Packet
  Engines G-NIC PCI Gigabit Ethernet adapter is available in the v2.0
  and v2.2 kernels For more details, support, and driver updates, see:

  http://cesdis.gsfc.nasa.gov/linux/drivers/yellowfin.html

  The acenic.c driver available in the v2.2 kernels can be used for the
  Alteon AceNIC Gigabit Ethernet card and other Tigon based cards such
  as the 3Com 3c985.  The driver should also work on the NetGear GA620,
  however this has yet to be verified.


  3.7.9.  FDDI Support

  Is there FDDI support for Linux?

  Yes. Larry Stefani has written a driver for v2.0 with Digital's DEFEA
  (FDDI EISA) and DEFPA (FDDI PCI) cards.  This was included into the
  v2.0.24 kernel.  Currently no other cards are supported though.


  3.7.10.  Full Duplex Support


  Will Full Duplex give me 20MBps? Does Linux support it?

  Cameron Spitzer writes the following about full duplex 10Base-T cards:
  ``If you connect it to a full duplex switched hub, and your system is
  fast enough and not doing much else, it can keep the link busy in both
  directions.  There is no such thing as full duplex 10BASE-2 or
  10BASE-5 (thin and thick coax).  Full Duplex works by disabling
  collision detection in the adapter.  That's why you can't do it with
  coax; the LAN won't run that way.  10BASE-T (RJ45 interface) uses
  separate wires for send and receive, so it's possible to run both ways
  at the same time.  The switching hub takes care of the collision
  problem.  The signalling rate is 10 Mbps.''

  So as you can see, you still will only be able to receive or transmit
  at 10Mbps, and hence don't expect a 2x performance increase. As to
  whether it is supported or not, that depends on the card and possibly
  the driver. Some cards may do auto-negotiation, some may need driver
  support, and some may need the user to select an option in a card's
  EEPROM configuration.  Only the serious/heavy user would notice the
  difference between the two modes anyway.


  3.7.11.  Ethernet Cards for Linux on SMP Machines


  If you spent the extra money on a multi processor (MP) computer then
  buy a good ethernet card as well. For v2.0 kernels it wasn't really an
  issue, but it definitely is for v2.2. Most of the older non-
  intelligent (e.g. ISA bus PIO and shared memory design) cards were
  never designed with any consideration for use on a MP machine.  The
  executive summary is to buy an intelligent modern design card and make
  sure the driver has been written (or updated) to handle MP operation.
  (The key words here are `modern design'  - the PCI-NE2000's are just a
  10+ year old design on a modern bus.)  Looking for the text spin_lock
  in the driver source is a good indication that the driver has been
  written to deal with MP operation.  The full details of why you should
  buy a good card for MP use (and what happens if you dont) follow.

  In v2.0 kernels, only one processor was allowed `in kernel' (i.e.
  changing kernel data and/or running device drivers) at any given time.
  So from the point of view of the card (and the associated driver)
  nothing was different from uni processor (UP) operation and things
  just continued to work. (This was the easiest way to get a working MP
  version of Linux - one big lock around the whole kernel only allows
  one processor in at a time. This way you know that you won't have two
  processors trying to change the same thing at the same time!)

  The downside to only allowing one processor in the kernel at a time
  was that you only got MP performance if the running programs were self
  contained and calculation intensive.  If the programs did a lot of
  input/output (I/O) such as reading or writing data to disk or over a
  network, then all but one of the processors would be stalled waiting
  on their I/O requests to be completed while the one processor running
  in kernel frantically tries to run all the device drivers to fill the
  I/O requests. The kernel becomes the bottleneck and since there is
  only one processor running in the kernel, the performance of a MP
  machine in the heavy I/O, single-lock case quickly degrades close to
  that of a single processor machine.


  Since this is clearly less than ideal (esp. for file/WWW servers,
  routers, etc.) the v2.2 kernels have finer grained locking - meaning
  that more than one processor can be in the kernel at a time. Instead
  of one big lock around the whole kernel, there are a lot of smaller
  locks protecting critical data from being manipulated by more than one
  processor at a time - e.g. one processor can be running the driver for
  the network card, while another processor is running the driver for
  the disk drive at the same time.

  Okay, with that all in mind here are the snags:  The finer locking
  means that you can have one processor trying to send data out through
  an ethernet driver while another processor tries to access the same
  driver/card to do something else (such as get the card statistics for
  cat /proc/net/dev). Oops - your card stats just got sent out over the
  wire, while you got data for your stats instead. Yes, the card got
  confused by being asked to do two (or more!) things at once, and
  chances are it crashed your machine in the process.

  So, the driver that worked for UP is no longer good enough - it needs
  to be updated with locks  that control access to the underlying card
  so that the three tasks of receive, transmit and manipulation of
  configuration data are serialized to the degree required by the card
  for stable operation. The scary part here is that a driver not yet
  updated with locks for stable MP operation will probably appear to be
  working in a MP machine under light network load, but will crash the
  machine or at least exhibit strange behaviour when two (or more!)
  processors try to do more than one of these three tasks at the same
  time.

  The updated MP aware ethernet driver will (at a minimum) require a
  lock around the driver that limits access at the entry points from the
  kernel into the driver to `one at a time please'.  With this in place,
  things will be serialized so that the underlying hardware should be
  treated just as if it was being used in a UP machine, and so it should
  be stable. The downside is that the one lock around the whole ethernet
  driver has the same negative performance implications that having one
  big lock around the whole kernel had (but on a smaller scale) - i.e.
  you can only have one processor dealing with the card at a time.
  [Technical Note: The performance impact may also include increased
  interrupt latencies if the locks that need to be added are of the
  irqsave type and they are held for a long time.]

  Possible improvements on this situation can be made in two ways. You
  can try to minimize the time between when the lock is taken and when
  it is released, and/or you can implement finer grained locking within
  the driver (e.g. a lock around the whole driver would be overkill if a
  lock or two protecting against simultaneous access to a couple of
  sensitive registers/settings on the card would suffice).

  However, for older non-intelligent cards that were never designed with
  MP use in mind, neither of these improvements may be feasible. Worse
  yet is that the non-intelligent cards typically require the processor
  to move the data between the card and the computer memory, so in a
  worst case scenario the lock will be held the whole time that it takes
  to move each 1.5kB data packet over an ISA bus.

  The more modern intelligent cards typically move network data directly
  to and from the computer memory without any help from a processor.
  This is a big win, since the lock is then only held for the short time
  it takes the processor to tell the card where in memory to get/store
  the next network data packet. More modern card designs are less apt to
  require a single big lock around the whole driver as well.



  3.7.12.  Ethernet Cards for Linux on Alpha/AXP PCI Boards


  As of v2.0, only the 3c509, depca, de4x5, pcnet32, and all the 8390
  drivers (wd, smc-ultra, ne, 3c503, etc.) have been made `architecture
  independent' so as to work on the DEC Alpha CPU based systems.  Other
  updated PCI drivers from Donald's WWW page may also work as these have
  been written with architecture independence in mind.

  Note that the changes that are required to make a driver architecture
  independent aren't that complicated.  You only need to do the
  following:

  -multiply all jiffies related values by HZ/100 to account for the
  different HZ value that the Alpha uses.  (i.e timeout=2; becomes
  timeout=2*HZ/100;)

  -replace any I/O memory (640k to 1MB) pointer dereferences with the
  appropriate readb() writeb() readl() writel() calls, as shown in this
  example.


  ______________________________________________________________________
  -       int *mem_base = (int *)dev->mem_start;
  -       mem_base[0] = 0xba5eba5e;
  +       unsigned long mem_base = dev->mem_start;
  +       writel(0xba5eba5e, mem_base);
  ______________________________________________________________________



  -replace all memcpy() calls that have I/O memory as source or target
  destinations with the appropriate one of memcpy_fromio() or
  memcpy_toio().

  Details on handling memory accesses in an architecture independent
  fashion are documented in the file linux/Documentation/IO-mapping.txt
  that comes with recent kernels.


  3.7.13.  Ethernet for Linux on SUN/Sparc Hardware.

  For the most up to date information on Sparc stuff, try the following
  URL:

  Linux Sparc <http://www.geog.ubc.ca/sparc>

  Note that some Sparc ethernet hardware gets its MAC address from the
  host computer, and hence you can end up with multiple interfaces all
  with the same MAC address.  If you need to put more than one interface
  on the same net then use the hw option to ifconfig to assign unique
  MAC address.

  Issues regarding porting PCI drivers to the Sparc platform are similar
  to those mentioned above for the AXP platform.  In addition there may
  be some endian issues, as the Sparc is big endian, and the AXP and
  ix86 are little endian.


  3.7.14.  Ethernet for Linux on Other Hardware.

  There are several other hardware platforms that Linux can run on, such
  as Atari/Amiga (m68k). As in the Sparc case it is best to check with
  the home site of each Linux port to that platform to see what is
  currently supported.  (Links to such sites are welcome here - send
  them in!)
  3.7.15.  Linking 10 or 100 BaseT without a Hub

  Can I link 10/100BaseT (RJ45) based systems together without a hub?

  You can link 2 machines easily, but no more than that, without extra
  devices/gizmos. See ``Twisted Pair'' -- it explains how to do it. And
  no, you can't hack together a hub just by crossing a few wires and
  stuff. It's pretty much impossible to do the collision signal right
  without duplicating a hub.


  3.7.16.  SIOCSIFxxx: No such device

  I get a bunch of `SIOCSIFxxx: No such device' messages at boot,
  followed by a `SIOCADDRT: Network is unreachable' What is wrong?

  Your ethernet device was not detected at boot/module insertion time,
  and when ifconfig and route are run, they have no device to work with.
  Use dmesg | more to review the boot messages and see if there are any
  messages about detecting an ethernet card.


  3.7.17.  SIOCSFFLAGS: Try again

  I get `SIOCSFFLAGS: Try again' when I run `ifconfig' -- Huh?

  Some other device has taken the IRQ that your ethercard is trying to
  use, and so the ethercard can't use the IRQ.  You don't necessairly
  need to reboot to resolve this, as some devices only grab the IRQs
  when they need them and then release them when they are done. Examples
  are some sound cards, serial ports, floppy disk driver, etc. You can
  type cat /proc/interrupts to see which interrupts are presently in
  use. Most of the Linux ethercard drivers only grab the IRQ when they
  are opened for use via `ifconfig'. If you can get the other device to
  `let go' of the required IRQ line, then you should be able to `Try
  again' with ifconfig.


  3.7.18.  Using `ifconfig' and Link UNSPEC with HW-addr of
  00:00:00:00:00:00

  When I run ifconfig with no arguments, it reports that LINK is UNSPEC
  (instead of 10Mbs Ethernet) and it also says that my hardware address
  is all zeros.

  This is because people are running a newer version of the `ifconfig'
  program than their kernel version. This new version of ifconfig is not
  able to report these properties when used in conjunction with an older
  kernel. You can either upgrade your kernel, `downgrade' ifconfig, or
  simply ignore it. The kernel knows your hardware address, so it really
  doesn't matter if ifconfig can't read it.

  You may also get strange information if the ifconfig program you are
  using is a lot older than the kernel you are using.


  3.7.19.  Huge Number of RX and TX Errors

  When I run ifconfig with no arguments, it reports that I have a huge
  error count in both rec'd and transmitted packets. It all seems to
  work ok -- What is wrong?

  Look again. It says RX packets big number PAUSE errors 0 PAUSE dropped
  0 PAUSE overrun 0.  And the same for the TX column.  Hence the big
  numbers you are seeing are the total number of packets that your
  machine has rec'd and transmitted.  If you still find it confusing,
  try typing cat /proc/net/dev instead.


  3.7.20.  Entries in /dev/  for Ethercards

  I have /dev/eth0 as a link to /dev/xxx. Is this right?

  Contrary to what you have heard, the files in /dev/* are not used.
  You can delete any /dev/wd0, /dev/ne0 and similar entries.


  3.7.21.  Linux and ``trailers''

  Should I disable trailers when I `ifconfig' my ethercard?

  You can't disable trailers, and you shouldn't want to. `Trailers' are
  a hack to avoid data copying in the networking layers. The idea was to
  use a trivial fixed-size header of size `H', put the variable-size
  header info at the end of the packet, and allocate all packets `H'
  bytes before the start of a page. While it was a good idea, it turned
  out to not work well in practice.  If someone suggests the use of
  `-trailers', note that it is the equivalent of sacrificial goats
  blood. It won't do anything to solve the problem, but if problem fixes
  itself then someone can claim deep magical knowledge.



  3.7.22.  Access to the raw Ethernet Device

  How do I get access to the raw ethernet device in linux, without going
  through TCP/IP and friends?


  ______________________________________________________________________
          int s=socket(AF_INET,SOCK_PACKET,htons(ETH_P_ALL));
  ______________________________________________________________________



  This gives you a socket receiving every protocol type.  Do recvfrom()
  calls to it and it will fill the sockaddr with device type in
  sa_family and the device name in the sa_data array. I don't know who
  originally invented SOCK_PACKET for Linux (its been in for ages) but
  its superb stuff.  You can use it to send stuff raw too via sendto()
  calls.  You have to have root access to do either of course.


  4.  Performance Tips

  Here are some tips that you can use if you are suffering from low
  ethernet throughput, or to gain a bit more speed on those ftp
  transfers.

  The ttcp.c program is a good test for measuring raw throughput speed.
  Another common trick is to do a ftp> get large_file /dev/null where
  large_file is > 1MB and residing in the buffer cache on the Tx'ing
  machine. (Do the `get' at least twice, as the first time will be
  priming the buffer cache on the Tx'ing machine.) You want the file in
  the buffer cache because you are not interested in combining the file
  access speed from the disk into your measurement. Which is also why
  you send the incoming data to /dev/null instead of onto the disk.



  4.1.  General Concepts

  Even an 8 bit card is able to receive back-to-back packets without any
  problems. The difficulty arises when the computer doesn't get the Rx'd
  packets off the card quick enough to make room for more incoming
  packets. If the computer does not quickly clear the card's memory of
  the packets already received, the card will have no place to put the
  new packet.

  In this case the card either drops the new packet, or writes over top
  of a previously received packet. Either one seriously interrupts the
  smooth flow of traffic by causing/requesting re-transmissions and can
  seriously degrade performance by up to a factor of 5!

  Cards with more onboard memory are able to ``buffer'' more packets,
  and thus can handle larger bursts of back-to-back packets without
  dropping packets.  This in turn means that the card does not require
  as low a latency from the the host computer with respect to pulling
  the packets out of the buffer to avoid dropping packets.

  Most 8 bit cards have an 8kB buffer, and most 16 bit cards have a 16kB
  buffer. Most Linux drivers will reserve 3kB of that buffer (for two Tx
  buffers), leaving only 5kB of receive space for an 8 bit card. This is
  room enough for only three full sized (1500 bytes) ethernet packets.


  4.2.  ISA Cards and ISA Bus Speed

  As mentioned above, if the packets are removed from the card fast
  enough, then a drop/overrun condition won't occur even when the amount
  of Rx packet buffer memory is small. The factor that sets the rate at
  which packets are removed from the card to the computer's memory is
  the speed of the data path that joins the two -- that being the ISA
  bus speed. (If the CPU is a dog-slow 386sx-16, then this will also
  play a role.)

  The recommended ISA bus clock is about 8MHz, but many motherboards and
  peripheral devices can be run at higher frequencies. The clock
  frequency for the ISA bus can usually be set in the CMOS setup, by
  selecting a divisor of the mainboard/CPU clock frequency. Some ISA and
  PCI/ISA mainboards may not have this option, and so you are stuck with
  the factory default.

  For example, here are some receive speeds as measured by the TTCP
  program on a 40MHz 486, with an  8 bit WD8003EP card, for different
  ISA bus speeds.


  ______________________________________________________________________
          ISA Bus Speed (MHz)     Rx TTCP (kB/s)
          -------------------     --------------
          6.7                     740
          13.4                    970
          20.0                    1030
          26.7                    1075
  ______________________________________________________________________



  You would be hard pressed to do better than 1075kB/s with any 10Mb/s
  ethernet card, using TCP/IP. However, don't expect every system to
  work at fast ISA bus speeds. Most systems will not function properly
  at speeds above 13MHz. (Also, some PCI systems have the ISA bus speed
  fixed at 8MHz, so that the end user does not have the option of
  increasing it.)

  In addition to faster transfer speeds, one will usually also benefit
  from a reduction in CPU usage due to the shorter duration memory and
  I/O cycles. (Note that hard disks and video cards located on the ISA
  bus will also usually experience a performance increase from an
  increased ISA bus speed.)

  Be sure to back up your data prior to experimenting with ISA bus
  speeds in excess of 8MHz, and thouroughly test that all ISA
  peripherals are operating properly after making any speed increases.


  4.3.  Setting the TCP Rx Window


  Once again, cards with small amounts of onboard RAM and relatively
  slow data paths between the card and the computer's memory run into
  trouble. The default TCP Rx window setting is 32kB, which means that a
  fast computer on the same subnet as you can dump 32k of data on you
  without stopping to see if you received any of it okay.

  Recent versions of the route command have the ability to set the size
  of this window on the fly. Usually it is only for the local net that
  this window must be reduced, as computers that are behind a couple of
  routers or gateways are `buffered' enough to not pose a problem. An
  example usage would be:


  ______________________________________________________________________
          route add <whatever> ... window <win_size>
  ______________________________________________________________________



  where win_size is the size of the window you wish to use (in bytes).
  An 8 bit 3c503 card on an ISA bus operating at a speed of 8MHz or less
  would work well with a window size of about 4kB. Too large a window
  will cause overruns and dropped packets, and a drastic reduction in
  ethernet throughput. You can check the operating status by doing a cat
  /proc/net/dev which will display any dropped or overrun conditions
  that occurred.


  4.4.  Increasing NFS performance

  Some people have found that using 8 bit cards in NFS clients causes
  poorer than expected performance, when using 8kB (native Sun) NFS
  packet size.

  The possible reason for this could be due to the difference in on
  board buffer size between the 8 bit and the 16 bit cards.  The maximum
  ethernet packet size is about 1500 bytes. Now that 8kB NFS packet will
  arrive as about 6 back to back maximum size ethernet packets. Both the
  8 and 16 bit cards have no problem Rx'ing back to back packets. The
  problem arises when the machine doesn't remove the packets from the
  cards buffer in time, and the buffer overflows. The fact that 8 bit
  cards take an extra ISA bus cycle per transfer doesn't help either.
  What you can do if you have an 8 bit card is either set the NFS
  transfer size to 2kB (or even 1kB), or try increasing the ISA bus
  speed in order to get the card's buffer cleared out faster.  I have
  found that an old WD8003E card at 8MHz (with no other system load) can
  keep up with a large receive at 2kB NFS size, but not at 4kB, where
  performance was degraded by a factor of three.

  On the other hand, if the default mount option is to use 1kB size and
  you have at least a 16 bit ISA card, you may find a significant
  increase in going to 4kB (or even 8kB).
  5.  Vendor/Manufacturer/Model Specific Information


  The following lists many cards in alphabetical order by vendor name
  and then product identifier. Beside each product ID, you will see
  either `Supported', `Semi-Supported' or `Not Supported'.

  Supported means that a driver for that card exists, and many people
  are happily using it and it seems quite reliable.

  Semi-Supported means that a driver exists, but at least one of the
  following descriptions is true: (1) The driver and/or hardware are
  buggy, which may cause poor performance, failing connections or even
  crashes.  (2) The driver is new or the card is fairly uncommon, and
  hence the driver has seen very little use/testing and the driver
  author has had very little feedback. Obviously (2) is preferable to
  (1), and the individual description of the card/driver should make it
  clear which one holds true. In either case, you will probably have to
  answer `Y' when asked ``Prompt for development and/or incomplete
  code/drivers?'' when running make config.

  Not Supported means there is not a driver currently available for that
  card. This could be due to a lack of interest in hardware that is
  rare/uncommon, or because the vendors won't release the hardware
  documentation required to write a driver.

  Note that the difference between `Supported' and `Semi-Supported' is
  rather subjective, and is based on user feedback observed in newsgroup
  postings and mailing list messages. (After all, it is impossible for
  one person to test all drivers with all cards for each kernel
  version!!!) So be warned that you may find a card listed as semi-
  supported works perfectly for you (which is great), or that a card
  listed as supported gives you no end of troubles and problems (which
  is not so great).

  After the status, the name of the driver given in the linux kernel is
  listed. This will also be the name of the driver module that would be
  used in the alias eth0 driver_name line that is found in the
  /etc/conf.modules module configuration file.



  5.1.  3Com


  If you are not sure what your card is, but you think it is a 3Com
  card, you can probably figure it out from the assembly number. 3Com
  has a document `Identifying 3Com Adapters By Assembly Number' (ref
  24500002) that would most likely clear things up. See ``Technical
  Information from 3Com'' for info on how to get documents from 3Com.

  Also note that 3Com has a FTP site with various goodies: ftp.3Com.com
  that you may want to check out.

  For those of you browsing this document by a WWW browser, you can try
  3Com's WWW site as well.


  5.1.1.  3c501

  Status: Semi-Supported, Driver Name: 3c501

  This obsolete stone-age 8 bit card is really too brain-damaged to use.
  Avoid it like the plague. Do not purchase this card, even as a joke.
  It's performance is horrible, and it breaks in many ways.

  For those not yet convinced, the 3c501 can only do one thing at a time
  -- while you are removing one packet from the single-packet buffer it
  cannot receive another packet, nor can it receive a packet while
  loading a transmit packet. This was fine for a network between two
  8088-based computers where processing each packet and replying took
  10's of msecs, but modern networks send back-to-back packets for
  almost every transaction.

  AutoIRQ works, DMA isn't used, the autoprobe only looks at 0x280 and
  0x300, and the debug level is set with the third boot-time argument.

  Once again, the use of a 3c501 is strongly discouraged!  Even more so
  with a IP multicast kernel, as you will grind to a halt while
  listening to all multicast packets. See the comments at the top of the
  source code for more details.


  5.1.2.  EtherLink II, 3c503, 3c503/16

  Status: Supported, Driver Name: 3c503 (+8390)

  The 3c503 does not have ``EEPROM setup'', so a diagnostic/setup
  program isn't needed before running the card with Linux. The shared
  memory address of the 3c503 is set using jumpers that are shared with
  the boot PROM address. This is confusing to people familiar with other
  ISA cards, where you always leave the jumper set to ``disable'' unless
  you have a boot PROM.

  These cards should be about the same speed as the same bus width
  WD80x3, but turn out to be actually a bit slower.  These shared-memory
  ethercards also have a programmed I/O mode that doesn't use the 8390
  facilities (their engineers found too many bugs!)  The Linux 3c503
  driver can also work with the 3c503 in programmed-I/O mode, but this
  is slower and less reliable than shared memory mode. Also, programmed-
  I/O mode is not as well tested when updating the drivers.  You
  shouldn't use the programmed-I/O mode unless you need it for MS-DOS
  compatibility.

  The 3c503's IRQ line is set in software, with no hints from an EEPROM.
  Unlike the MS-DOS drivers, the Linux driver has capability to autoIRQ:
  it uses the first available IRQ line in {5,2/9,3,4}, selected each
  time the card is ifconfig'ed. (Older driver versions selected the IRQ
  at boot time.) The ioctl() call in `ifconfig' will return EAGAIN if no
  IRQ line is available at that time.

  Some common problems that people have with the 503 are discussed in
  ``Problems with...''.

  If you intend on using this driver as a loadable module you should
  probably see ``Using the Ethernet Drivers as Modules'' for module
  specific information.

  Note that some old diskless 386 workstations have an on board 3c503
  (made by 3Com and sold under different names, like `Bull') but the
  vendor ID is not a 3Com ID and so it won't be detected.  More details
  can be found in the Etherboot package, which you will need anyways to
  boot these diskless boxes.


  5.1.3.  Etherlink Plus 3c505

  Status: Semi-Supported, Driver Name: 3c505

  This is a driver that was written by Craig Southeren
  geoffw@extro.ucc.su.oz.au. These cards also use the i82586 chip.
  There are not that many of these cards about.  It is included in the
  standard kernel, but it is classed as an alpha driver. See ``Alpha
  Drivers'' for important information on using alpha-test ethernet
  drivers with Linux.

  There is also the file /usr/src/linux/drivers/net/README.3c505 that
  you should read if you are going to use one of these cards.  It
  contains various options that you can enable/disable.


  5.1.4.  Etherlink-16 3c507

  Status: Semi-Supported, Driver Name: 3c507

  This card uses one of the Intel chips, and the development of the
  driver is closely related to the development of the Intel Ether
  Express driver.  The driver is included in the standard kernel
  release, but as an alpha driver.  See ``Alpha Drivers'' for important
  information on using alpha-test ethernet drivers with Linux.


  5.1.5.  Etherlink III, 3c509 / 3c509B

  Status: Supported, Driver Name: 3c509

  This card is fairly inexpensive and has good performance for an ISA
  non-bus-master design.  The drawbacks are that the original 3c509
  requires very low interrupt latency. The 3c509B shouldn't suffer from
  the same problem, due to having a larger buffer. (See below.) These
  cards use PIO transfers, similar to a ne2000 card, and so a shared
  memory card such as a wd8013 will be more efficient in comparison.

  The original 3c509 has a small packet buffer (4kB total, 2kB Rx, 2kB
  Tx), causing the driver to occasionally drop a packet if interrupts
  are masked for too long. To minimize this problem, you can try
  unmasking interrupts during IDE disk transfers (see man hdparm) and/or
  increasing your ISA bus speed so IDE transfers finish sooner.

  The newer model 3c509B has 8kB on board, and the buffer can be split
  4/4, 5/3 or 6/2 for Rx/Tx. This setting is changed with the DOS
  configuration utility, and is stored on the EEPROM. This should
  alleviate the above problem with the original 3c509.

  3c509B users should use either the supplied DOS utility to disable the
  plug and play support, and to set the output media to what they
  require. The linux driver currently does not support the Autodetect
  media setting, so you have to select 10Base-T or 10Base-2 or AUI.
  Note that to turn off PnP entirely, you should do a 3C5X9CFG
  /PNP:DISABLE and then follow that with a hard reset to ensure that it
  takes effect.

  Some people ask about the ``Server or Workstation'' and ``Highest
  Modem Speed'' settings presented in the DOS configuration utility.
  Donald writes ``These are only hints to the drivers, and the Linux
  driver does not use these parameters: it always optimizes for high
  throughput rather than low latency (`Server'). Low latency was
  critically important for old, non-windowed, IPX throughput.  To reduce
  the latency the MS-DOS driver for the 3c509 disables interrupts for
  some operations, blocking serial port interrupts.  Thus the need for
  the `modem speed' setting.  The Linux driver avoids the need to
  disable interrupts for long periods by operating only on whole packets
  e.g. by not starting to transmit a packet until it is completely
  transferred to the card.''

  Note that the ISA card detection uses a different method than most
  cards. Basically, you ask the cards to respond by sending data to an
  ID_PORT (port 0x100 to 0x1ff on intervals of 0x10).  This detection
  method means that a particular card will always get detected first in
  a multiple ISA 3c509 configuration.  The card with the lowest hardware
  ethernet address will always end up being eth0. This shouldn't matter
  to anyone, except for those people who want to assign a 6 byte
  hardware address to a particular interface.  If you have multiple
  3c509 cards, it is best to append ether=0,0,ethN commands without the
  I/O port specified (i.e. use I/O=zero) and allow the probe to sort out
  which card is first. Using a non-zero I/O value will ensure that it
  does not detect all your cards, so don't do it.

  If this really bothers you, have a look at Donald's latest driver, as
  you may be able to use a 0x3c509 value in the unused mem address
  fields to order the detection to suit your needs.


  5.1.6.  3c515

  Status: Supported, Driver Name: 3c515

  This is 3Com's ISA 100Mbps offering, codenamed ``CorkScrew''. A
  relatively new driver from Donald for these cards is included in the
  v2.2 kernels.  For the most up to date information, you should
  probably look on the Vortex page:

  Vortex <http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html>



  5.1.7.  3c523

  Status: Semi-Supported, Driver Name: 3c523

  This MCA bus card uses the i82586, and  Chris Beauregard has modified
  the ni52 driver to work with these cards. The driver for it can be
  found in the v2.2 kernel source tree.

  More details can be found on the MCA-Linux page at
  http://glycerine.cetmm.uni.edu/mca/


  5.1.8.  3c527

  Status: Not Supported.

  Yes, another MCA card. No, not too much interest in it.  Better
  chances with the 3c529 if you are stuck with MCA.


  5.1.9.  3c529

  Status: Supported, Driver Name: 3c509

  This card actually uses the same chipset as the 3c509.  Donald
  actually put hooks into the 3c509 driver to check for MCA cards after
  probing for EISA cards, and before probing for ISA cards, long before
  MCA support was added to the kernel.  The required MCA probe code is
  included in the driver shipped with v2.2 kernels.  More details can be
  found on the MCA-Linux page at:

  http://glycerine.cetmm.uni.edu/mca/


  5.1.10.  3c562

  Status: Supported, Driver Name: 3c589 (distributed separately)

  This PCMCIA card is the combination of a 3c589B ethernet card with a
  modem. The modem appears as a standard modem to the end user. The only
  difficulty is getting the two separate linux drivers to share one
  interrupt. There are a couple of new registers and some hardware
  interrupt sharing support.  You need to use a v2.0 or newer kernel
  that has the support for interrupt sharing.


  Thanks again to Cameron for getting a sample unit and documentation
  sent off to David Hinds. Look for support in David's PCMCIA package
  release.

  See ``PCMCIA Support'' for more info on PCMCIA chipsets, socket
  enablers, etc.


  5.1.11.  3c575

  Status: Unknown.

  A driver for this PCMCIA card is under development and hopefully will
  be included in David's PCMCIA package in the future.  Best to check
  the PCMCIA package to get the current status.



  5.1.12.  3c579

  Status: Supported, Driver Name: 3c509

  The EISA version of the 509. The current EISA version uses the same 16
  bit wide chip rather than a 32 bit interface, so the performance
  increase isn't stunning.  Make sure the card is configured for EISA
  addressing mode.  Read the above 3c509 section for info on the driver.



  5.1.13.  3c589 / 3c589B

  Status: Semi-Supported, Driver Name: 3c589

  Many people have been using this PCMCIA card for quite some time now.
  Note that support for it is not (at present) included in the default
  kernel source tree.  The "B" in the name means the same here as it
  does for the 3c509 case.

  There are drivers available on Donald's ftp site and in David Hinds
  PCMCIA package.  You will also need a supported PCMCIA controller
  chipset.  See ``PCMCIA Support'' for more info on PCMCIA drivers,
  chipsets, socket enablers, etc.


  5.1.14.  3c590 / 3c595

  Status: Supported, Driver Name: 3c59x

  These ``Vortex'' cards are for PCI bus machines, with the '590 being
  10Mbps and the '595 being 3Com's 100Mbs offering.  Also note that you
  can run the '595 as a '590 (i.e. in a 10Mbps mode).  The driver is
  included in the v2.0 kernel source, but is also continually being
  updated. If you have problems with the driver in the v2.0 kernel, you
  can get an updated driver from the following URL:

  Vortex <http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html>


  Note that there are two different 3c590 cards out there, early models
  that had 32kB of on-board memory, and later models that only have 8kB
  of memory. Chances are you won't be able to buy a new 3c59x for much
  longer, as it is being replaced with the 3c90x card. If you are buying
  a used one off somebody, try and get the 32kB version. The 3c595 cards
  have 64kB, as you can't get away with only 8kB RAM at 100Mbps!

  A thanks to Cameron Spitzer and Terry Murphy of 3Com for sending cards
  and documentation to Donald so he could write the driver.

  Donald has set up a mailing list for Vortex driver support.  To join
  the list, just do:

  echo subscribe | /bin/mail linux-vortex-request@cesdis.gsfc.nasa.gov



  5.1.15.  3c592 / 3c597

  Status: Supported, Driver Name: 3c59x

  These are  the EISA versions of the 3c59x series of cards. The
  3c592/3c597 (aka Demon) should work with the vortex driver discussed
  above.


  5.1.16.  3c900 / 3c905 / 3c905B

  Status: Supported, Driver Name: 3c59x

  These cards (aka `Boomerang', aka EtherLink III XL) have been released
  to take over the place of the 3c590/3c595 cards.

  The support for the Cyclone `B' revision was only recently added.  To
  use this card with older v2.0 kernels, you must obtain the updated
  3c59x.c driver from Donald's site at:

  Vortex-Page <http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html>

  If in doubt about anything then check out the above WWW page.  Donald
  has set up a mailing list for Vortex driver support announcements and
  etc.  To join the list, just do:

  echo subscribe | /bin/mail linux-vortex-request@cesdis.gsfc.nasa.gov


  5.1.17.  3c985

  Status: Supported, Driver Name: acenic

  This driver, by Jes Sorensen, is available in v2.2 kernels It supports
  several other Gigabit cards in addition to the 3Com model.


  5.2.  Accton



  5.2.1.  Accton MPX

  Status: Supported, Driver Name: ne (+8390)

  Don't let the name fool you. This is still supposed to be a NE2000
  compatible card, and should work with the ne2000 driver.


  5.2.2.  Accton EN1203, EN1207, EtherDuo-PCI

  Status: Supported, Driver Name: de4x5, tulip

  This is another implementation of the DEC 21040 PCI chip.  The EN1207
  card has the 21140, and also has a 10Base-2 connector, which has
  proved troublesome for some people in terms of selecting that media.
  Using the card with 10Base-T and 100Base-T media have worked for
  others though.  So as with all purchases, you should try and make sure
  you can return it if it doesn't work for you.

  See ``DEC 21040'' for more information on these cards, and the present
  driver situation.


  5.2.3.  Accton EN2209 Parallel Port Adaptor (EtherPocket)

  Status: Semi-Supported, Driver Name: ?

  A driver for these parallel port adapters is available but not yet
  part of the 2.0 or 2.1 kernel source. You have to get the driver from:

  http://www.unix-ag.uni-siegen.de/~nils/accton_linux.html



  5.2.4.  Accton EN2212 PCMCIA Card

  Status: Semi-Supported, Driver Name: ?

  David Hinds has been working on a driver for this card, and you are
  best to check the latest release of his PCMCIA package to see what the
  present status is.



  5.3.  Allied Telesyn/Telesis



  5.3.1.  AT1500

  Status: Supported, Driver Name: lance

  These are a series of low-cost ethercards using the 79C960 version of
  the AMD LANCE. These are bus-master cards, and hence one of the faster
  ISA bus ethercards available.

  DMA selection and chip numbering information can be found in ``AMD
  LANCE''.

  More technical information on AMD LANCE based Ethernet cards can be
  found in ``Notes on AMD...''.


  5.3.2.  AT1700

  Status: Supported, Driver Name: at1700

  Note that to access this driver during make config you still have to
  answer `Y' when asked ``Prompt for development and/or incomplete
  code/drivers?'' at the first. This is simply due to lack of feedback
  on the driver stability due to it being a relatively rare card.  If
  you have problems with the driver that ships with the kernel then you
  may be interested in the alternative driver available at:
  http://www.cc.hit-u.ac.jp/nagoya/at1700/
  The Allied Telesis AT1700 series ethercards are based on the Fujitsu
  MB86965. This chip uses a programmed I/O interface, and a pair of
  fixed-size transmit buffers. This allows small groups of packets to be
  sent back-to-back, with a short pause while switching buffers.

  A unique feature is the ability to drive 150ohm STP (Shielded Twisted
  Pair) cable commonly installed for Token Ring, in addition to 10baseT
  100ohm UTP (unshielded twisted pair). A fibre optic version of the
  card (AT1700FT) exists as well.

  The Fujitsu chip used on the AT1700 has a design flaw: it can only be
  fully reset by doing a power cycle of the machine.  Pressing the reset
  button doesn't reset the bus interface. This wouldn't be so bad,
  except that it can only be reliably detected when it has been freshly
  reset. The solution/work-around is to power-cycle the machine if the
  kernel has a problem detecting the AT1700.


  5.3.3.  AT2450

  Status: Supported, Driver Name: pcnet32

  This is the PCI version of the AT1500, and it doesn't suffer from the
  problems that the Boca 79c970 PCI card does.  DMA selection and chip
  numbering information can be found in ``AMD LANCE''.

  More technical information on AMD LANCE based Ethernet cards can be
  found in ``Notes on AMD...''.


  5.3.4.  AT2500

  Status: Semi-Supported, Driver Name: rtl8139

  This card uses the RealTek 8139 chip - see the section ``RealTek
  8139''.


  5.3.5.  AT2540FX

  Status: Semi-Supported, Driver Name: eepro100

  This card uses the i82557 chip, and hence may/should work with the
  eepro100 driver. If you try this please send in a report so this
  information can be updated.


  5.4.  AMD / Advanced Micro Devices


  Carl Ching of AMD was kind enough to provide a very detailed
  description of all the relevant AMD ethernet products which helped
  clear up this section.


  5.4.1.  AMD LANCE (7990, 79C960/961/961A, PCnet-ISA)

  Status: Supported, Driver Name: lance

  There really is no AMD ethernet card. You are probably reading this
  because the only markings you could find on your card said AMD and the
  above number. The 7990 is the original `LANCE' chip, but most stuff
  (including this document) refer to all these similar chips as `LANCE'
  chips. (...incorrectly, I might add.)


  These above numbers refer to chips from AMD that are the heart of many
  ethernet cards.  For example, the Allied Telesis AT1500 (see
  ``AT1500'') and the NE1500/2100 (see ``NE1500'')  use these chips.

  The 7990/79c90 have long been replaced by newer versions.  The 79C960
  (a.k.a. PCnet-ISA) essentially contains the 79c90 core, along with all
  the other hardware support required, which allows a single-chip
  ethernet solution. The 79c961 (PCnet-ISA+) is a jumperless Plug and
  Play version of the '960. The final chip in the ISA series is the
  79c961A (PCnet-ISA II), which adds full duplex capabilities.  All
  cards with one of these chips should work with the lance.c driver,
  with the exception of very old cards that used the original 7990 in a
  shared memory configuration. These old cards can be spotted by the
  lack of jumpers for a DMA channel.

  One common problem people have is the `busmaster arbitration failure'
  message. This is printed out when the LANCE driver can't get access to
  the bus after a reasonable amount of time has elapsed (50us). This
  usually indicates that the motherboard implementation of bus-mastering
  DMA is broken, or some other device is hogging the bus, or there is a
  DMA channel conflict. If your BIOS setup has the `GAT option' (for
  Guaranteed Access Time) then try toggling/altering that setting to see
  if it helps.

  Also note that the driver only looks at the addresses: 0x300, 0x320,
  0x340, 0x360 for a valid card, and any address supplied by an ether=
  boot argument is silently ignored (this will be fixed) so make sure
  your card is configured for one of the above I/O addresses for now.

  The driver will still work fine, even if more than 16MB of memory is
  installed, since low-memory `bounce-buffers' are used when needed
  (i.e. any data from above 16MB is copied into a buffer below 16MB
  before being given to the card to transmit.)

  The DMA channel can be set with the low bits of the otherwise-unused
  dev->mem_start value (a.k.a. PARAM_1).  (see ``PARAM_1'') If unset it
  is probed for by enabling each free DMA channel in turn and checking
  if initialization succeeds.

  The HP-J2405A board is an exception: with this board it's easy to read
  the EEPROM-set values for the IRQ, and DMA.

  See ``Notes on AMD...''  for more info on these chips.


  5.4.2.  AMD 79C965 (PCnet-32)

  Status: Supported, Driver Name: pcnet32

  This is the PCnet-32 -- a 32 bit bus-master version of the original
  LANCE chip for VL-bus and local bus systems.  chip.  While these chips
  can be operated with the standard lance.c driver, a 32 bit version
  (pcnet32.c) is also available that does not have to concern itself
  with any 16MB limitations associated with the ISA bus.


  5.4.3.  AMD 79C970/970A (PCnet-PCI)

  Status: Supported, Driver Name: pcnet32

  This is the PCnet-PCI -- similar to the PCnet-32, but designed for PCI
  bus based systems. Please see the above PCnet-32 information.  This
  means that you need to build a kernel with PCI BIOS support enabled.
  The '970A adds full duplex support along with some other features to
  the original '970 design.

  Note that the Boca implementation of the 79C970 fails on fast Pentium
  machines. This is a hardware problem, as it affects DOS users as well.
  See the Boca section for more details.


  5.4.4.  AMD 79C971 (PCnet-FAST)

  Status: Supported, Driver Name: pcnet32

  This is AMD's 100Mbit chip for PCI systems, which also supports full
  duplex operation. It was introduced in June 1996.


  5.4.5.  AMD 79C972 (PCnet-FAST+)

  Status: Unknown, Driver Name: pcnet32

  This should also work just like the '971 but this has yet to be
  confirmed.


  5.4.6.  AMD 79C974 (PCnet-SCSI)

  Status: Supported, Driver Name: pcnet32

  This is the PCnet-SCSI --  which is basically treated like a '970 from
  an Ethernet point of view.  Also see the above information. Don't ask
  if the SCSI half of the chip is supported -- this is the Ethernet-
  HowTo, not the SCSI-HowTo.


  5.5.  Ansel Communications



  5.5.1.  AC3200 EISA

  Status: Semi-Supported, Driver Name: ac3200

  Note that to access this driver during make config you still have to
  answer `Y' when asked ``Prompt for development and/or incomplete
  code/drivers?'' at the first. This is simply due to lack of feedback
  on the driver stability due to it being a relatively rare card.

  This driver is included in the present kernel as an alpha test driver.
  It is based on the common NS8390 chip used in the ne2000 and wd80x3
  cards.  Please see ``Alpha Drivers'' in this document for important
  information regarding alpha drivers.

  If you use it, let one of us know how things work out, as feedback has
  been low, even though the driver has been in the kernel since v1.1.25.

  If you intend on using this driver as a loadable module you should
  probably see ``Using the Ethernet Drivers as Modules'' for module
  specific information.


  5.6.  Apricot



  5.6.1.  Apricot Xen-II On Board Ethernet

  Status: Semi-Supported, Driver Name: apricot


  This on board ethernet uses an i82596 bus-master chip.  It can only be
  at I/O address 0x300.  By looking at the driver source, it appears
  that the IRQ is also hardwired to 10.

  Earlier versions of the driver had a tendency to think that anything
  living at 0x300 was an apricot NIC.  Since then the hardware address
  is checked to avoid these false detections.


  5.7.  Arcnet

  Status: Supported, Driver Name: arcnet (arc-rimi, com90xx, com20020)

  With the very low cost and better performance of ethernet, chances are
  that most places will be giving away their Arcnet hardware for free,
  resulting in a lot of home systems with Arcnet.

  An advantage of Arcnet is that all of the cards have identical
  interfaces, so one driver will work for everyone. It also has built in
  error handling so that it supposedly never loses a packet.  (Great for
  UDP traffic!)

  Avery Pennarun's arcnet driver has been in the default kernel sources
  since 1.1.80. The arcnet driver uses `arc0' as its name instead of the
  usual `eth0' for ethernet devices.  Bug reports and success stories
  can be mailed to:

  apenwarr@foxnet.net

  There are information files contained in the standard kernel for
  setting jumpers and general hints.

  Supposedly the driver also works with the 100Mbs ARCnet cards as well!


  5.8.  AT&T


  Note that AT&T's StarLAN is an orphaned technology, like SynOptics
  LattisNet, and can't be used in a standard 10Base-T environment,
  without a hub that `speaks' both.


  5.8.1.  AT&T T7231 (LanPACER+)

  Status: Not Supported.

  These StarLAN cards use an interface similar to the i82586 chip. At
  one point, Matthijs Melchior (matthijs.n.melchior@att.com) was playing
  with the 3c507 driver, and almost had something useable working.
  Haven't heard much since that.


  5.9.  Boca Research


  Yes, they make more than just multi-port serial cards.  :-)


  5.9.1.  Boca BEN (ISA, VLB, PCI)

  Status: Supported, Driver Name: lance, pcnet32

  These cards are based on AMD's PCnet chips.  Perspective buyers should
  be warned that many users have had endless problems with these VLB/PCI
  cards. Owners of fast Pentium systems have been especially hit. Note
  that this is not a driver problem, as it hits DOS/Win/NT users as
  well.  Boca's technical support number is (407) 241-8088, and you can
  also reach them at 75300.2672@compuserve.com.  The older ISA cards
  don't appear to suffer the same problems.

  Donald did a comparitive test with a Boca PCI card and a similar
  Allied Telsyn PCnet/PCI implementation, which showed that the problem
  lies in Boca's implementation of the PCnet/PCI chip. These test
  results can be accessed on Don's www server.

  Linux at CESDIS <http://cesdis.gsfc.nasa.gov/linux/>

  Boca is offering a `warranty repair' for affected owners, which
  involves adding one of the missing capacitors, but it appears that
  this fix doesn't work 100 percent for most people, although it helps
  some.

  If you are still thinking of buying one of these cards, then at least
  try and get a 7 day unconditional return policy, so that if it doesn't
  work properly in your system, you can return it.

  More general information on the AMD chips can be found in ``AMD
  LANCE''.

  More technical information on AMD LANCE based Ethernet cards can be
  found in ``Notes on AMD...''.


  5.10.  Cabletron


  Donald writes: `Yes, another one of these companies that won't release
  its programming information. They waited for months before actually
  confirming that all their information was proprietary, deliberately
  wasting my time. Avoid their cards like the plague if you can.  Also
  note that some people have phoned Cabletron, and have been told things
  like `a D. Becker is working on a driver for linux' -- making it sound
  like I work for them. This is NOT the case.'


  Apparently Cabletron has changed their policy with respect to
  programming information (like Xircom) since Donald made the above
  comment several years ago -- send e-mail to support@ctron.com if you
  want to verify this or ask for programming information.  However, at
  this point in time, there is little demand for modified/updated
  drivers for the older E20xx and E21xx cards.



  5.10.1.  E10**, E10**-x, E20**, E20**-x

  Status: Semi-Supported, Driver Name: ne (+8390)

  These are NEx000 almost-clones that are reported to work with the
  standard NEx000 drivers, thanks to a ctron-specific check during the
  probe. If there are any problems, they are unlikely to be fixed, as
  the programming information is unavailable.


  5.10.2.  E2100

  Status: Semi-Supported, Driver Name: e2100 (+8390)

  Again, there is not much one can do when the programming information
  is proprietary.  The E2100 is a poor design. Whenever it maps its
  shared memory in during a packet transfer, it maps it into the whole
  128K region! That means you can't safely use another interrupt-driven
  shared memory device in that region, including another E2100.  It will
  work most of the time, but every once in a while it will bite you.
  (Yes, this problem can be avoided by turning off interrupts while
  transferring packets, but that will almost certainly lose clock
  ticks.) Also, if you mis-program the board, or halt the machine at
  just the wrong moment, even the reset button won't bring it back. You
  will have to turn it off and leave it off for about 30 seconds.

  Media selection is automatic, but you can override this with the low
  bits of the dev->mem_end parameter.  See ``PARAM_2''. Module users can
  specify an xcvr=N value as an option in the /etc/conf.modules file.

  Also, don't confuse the E2100 for a NE2100 clone.  The E2100 is a
  shared memory NatSemi DP8390 design, roughly similar to a brain-
  damaged WD8013, whereas the NE2100 (and NE1500) use a bus-mastering
  AMD LANCE design.

  There is an E2100 driver included in the standard kernel.  However,
  seeing as programming info isn't available, don't expect bug-fixes.
  Don't use one unless you are already stuck with the card.

  If you intend on using this driver as a loadable module you should
  probably see ``Using the Ethernet Drivers as Modules'' for module
  specific information.


  5.10.3.  E22**

  Status: Semi-Supported, Driver Name: lance

  According to information in a Cabletron Tech Bulletin, these cards use
  the standard AMD PC-Net chipset (see ``AMD PC-Net'') and should work
  with the generic lance driver.



  5.11.  Cogent


  Here is where and how to reach them:



          Cogent Data Technologies, Inc.
          175 West Street, P.O. Box 926
          Friday Harbour, WA 98250, USA.

          Cogent Sales
          15375 S.E. 30th Place, Suite 310
          Bellevue, WA 98007, USA.

          Technical Support:
          Phone (360) 378-2929 between 8am and 5pm PST
          Fax (360) 378-2882
          Compuserve GO COGENT
          Bulletin Board Service (360) 378-5405
          Internet: support@cogentdata.com



  5.11.1.  EM100-ISA/EISA

  Status: Semi-Supported, Driver Name: smc9194

  These cards use the SMC 91c100 chip and may work with the SMC 91c92
  driver, but this has yet to be verified.


  5.11.2.  Cogent eMASTER+, EM100-PCI, EM400, EM960, EM964

  Status: Supported, Driver Name: de4x5, tulip

  These are yet another DEC 21040 implementation that should hopefully
  work fine with the standard 21040 driver.

  The EM400 and the EM964 are four port cards using a DEC 21050 bridge
  and 4 21040 chips.

  See ``DEC 21040'' for more information on these cards, and the present
  driver situation.


  5.12.  Compaq


  Compaq aren't really in the business of making ethernet cards, but a
  lot of their systems have embedded ethernet controllers on the
  motherboard.


  5.12.1.  Compaq Deskpro / Compaq XL (Embedded AMD Chip)

  Status: Supported, Driver Name: pcnet32

  Machines such as the XL series have an AMD 79c97x PCI chip on the
  mainboard that can be used with the standard LANCE driver. But before
  you can use it, you have to do some trickery to get the PCI BIOS to a
  place where Linux can see it. Frank Maas was kind enough to provide
  the details:

  `` The problem with this Compaq machine however is that the PCI
  directory is loaded in high memory, at a spot where the Linux kernel
  can't (won't) reach. Result: the card is never detected nor is it
  usable (sideline: the mouse won't work either) The workaround (as
  described thoroughly in http://www-c724.uibk.ac.at/XL/) is to load MS-
  DOS, launch a little driver Compaq wrote and then load the Linux
  kernel using LOADLIN. Ok, I'll give you time to say `yuck, yuck', but
  for now this is the only working solution I know of. The little driver
  simply moves the PCI directory to a place where it is normally stored
  (and where Linux can find it).''

  More general information on the AMD chips can be found in ``AMD
  LANCE''.


  5.12.2.  Compaq Nettelligent/NetFlex (Embedded ThunderLAN Chip)

  Status: Supported, Driver Name: tlan

  These systems use a Texas Instruments ThunderLAN chip Information on
  the ThunderLAN driver can be found in ``ThunderLAN''.



  5.13.  Danpex



  5.13.1.  Danpex EN9400

  Status: Supported, Driver Name: de4x5, tulip

  Yet another card based on the DEC 21040 chip, reported to work fine,
  and at a relatively cheap price.

  See ``DEC 21040'' for more information on these cards, and the present
  driver situation.


  5.14.  D-Link



  5.14.1.  DE-100, DE-200, DE-220-T, DE-250

  Status: Supported, Driver Name: ne (+8390)

  Some of the early D-Link cards didn't have the 0x57 PROM signature,
  but the ne2000 driver knows about them.  For the software configurable
  cards, you can get the config program from www.dlink.com.  The DE2**
  cards were the most widely reported as having the spurious transfer
  address mismatch errors with early versions of linux.  Note that there
  are also cards from Digital (DEC) that are also named DE100 and DE200,
  but the similarity stops there.


  5.14.2.  DE-520

  Status: Supported, Driver Name: pcnet32

  This is a PCI card using the PCI version of AMD's LANCE chip.  DMA
  selection and chip numbering information can be found in ``AMD
  LANCE''.

  More technical information on AMD LANCE based Ethernet cards can be
  found in ``Notes on AMD...''.


  5.14.3.  DE-528

  Status: Supported, Driver Name: ne, ne2k-pci (+8390)

  Apparently D-Link have also started making PCI NE2000 clones.



  5.14.4.  DE-530

  Status: Supported, Driver Name: de4x5, tulip

  This is a generic DEC 21040 PCI chip implementation, and is reported
  to work with the generic 21040 tulip driver.

  See ``DEC 21040'' for more information on these cards, and the present
  driver situation.


  5.14.5.  DE-600

  Status: Supported, Driver Name: de600

  Laptop users and other folk who might want a quick way to put their
  computer onto the ethernet may want to use this. The driver is
  included with the default kernel source tree.  Bjorn Ekwall
  bj0rn@blox.se wrote the driver.  Expect about 180kb/s transfer speed
  from this via the parallel port. You should read the README.DLINK file
  in the kernel source tree.

  Note that the device name that you pass to ifconfig is now eth0 and
  not the previously used dl0.

  If your parallel port is not at the standard 0x378 then you will have
  to recompile. Bjorn writes: ``Since the DE-620 driver tries to sqeeze
  the last microsecond from the loops, I made the irq and port address
  constants instead of variables. This makes for a usable speed, but it
  also means that you can't change these assignements from e.g. lilo;
  you _have_ to recompile...'' Also note that some laptops implement the
  on-board parallel port at 0x3bc which is where the parallel ports on
  monochrome cards were/are.


  5.14.6.  DE-620

  Status: Supported, Driver Name: de620

  Same as the DE-600, only with two output formats.  Bjorn has written a
  driver for this model, for kernel versions 1.1 and above. See the
  above information on the DE-600.


  5.14.7.  DE-650

  Status: Semi-Supported, Driver Name: de650 (?)

  Some people have been using this PCMCIA card for some time now with
  their notebooks. It is a basic 8390 design, much like a NE2000. The
  LinkSys PCMCIA card and the IC-Card Ethernet are supposedly DE-650
  clones as well.  Note that at present, this driver is not part of the
  standard kernel, and so you will have to do some patching.

  See ``PCMCIA Support'' in this document, and if you can, have a look
  at:

  Don's PCMCIA Stuff <http://cesdis.gsfc.nasa.gov/linux/pcmcia.html>


  5.15.  DFI



  5.15.1.  DFINET-300 and DFINET-400

  Status: Supported, Driver Name: ne (+8390)

  These cards are now detected (as of 0.99pl15) thanks to Eberhard
  Moenkeberg emoenke@gwdg.de who noted that they use `DFI' in the first
  3 bytes of the prom, instead of using 0x57 in bytes 14 and 15, which
  is what all the NE1000 and NE2000 cards use. (The 300 is an 8 bit
  pseudo NE1000 clone, and the 400 is a pseudo NE2000 clone.)



  5.16.  Digital / DEC



  5.16.1.  DEPCA, DE100/1, DE200/1/2, DE210, DE422

  Status: Supported, Driver Name: depca

  There is documentation included in the source file `depca.c', which
  includes info on how to use more than one of these cards in a machine.
  Note that the DE422 is an EISA card. These cards are all based on the
  AMD LANCE chip.  See ``AMD LANCE'' for more info.  A maximum of two of
  the ISA cards can be used, because they can only be set for 0x300 and
  0x200 base I/O address.  If you are intending to do this, please read
  the notes in the driver source file depca.c in the standard kernel
  source tree.

  This driver will also work on Alpha CPU based machines, and there are
  various ioctl()s that the user can play with.


  5.16.2.  Digital EtherWorks 3 (DE203, DE204, DE205)

  Status: Supported, Driver Name: ewrk3

  These cards use a proprietary chip from DEC, as opposed to the LANCE
  chip used in the earlier cards like the DE200. These cards support
  both shared memory or programmed I/O, although you take about a
  50%performance hit if you use PIO mode. The shared memory size can be
  set to 2kB, 32kB or 64kB, but only 2 and 32 have been tested with this
  driver. David says that the performance is virtually identical between
  the 2kB and 32kB mode. There is more information (including using the
  driver as a loadable module) at the top of the driver file ewrk3.c and
  also in README.ewrk3.  Both of these files come with the standard
  kernel distribution.  This driver has Alpha CPU support like depca.c
  does.

  The standard driver has a number of interesting ioctl() calls that can
  be used to get or clear packet statistics, read/write the EEPROM,
  change the hardware address, and the like. Hackers can see the source
  code for more info on that one.

  David has also written a configuration utility for this card (along
  the lines of the DOS program NICSETUP.EXE) along with other tools.
  These can be found on most Linux FTP sites in the directory
  /pub/Linux/system/Network/management -- look for the file ewrk3tools-
  X.XX.tar.gz.



  5.16.3.  DE425 EISA, DE434, DE435, DE500

  Status: Supported, Driver Name: de4x5, tulip

  These cards are based on the 21040 chip mentioned below.  The DE500
  uses the 21140 chip to provide 10/100Mbs ethernet connections.  Have a
  read of the 21040 section below for extra info.  There are also some
  compile-time options available for non-DEC cards using this driver.
  Have a look at README.de4x5 for details.

  All the Digital cards will autoprobe for their media (except,
  temporarily, the DE500 due to a patent issue).

  This driver is also Alpha CPU ready and supports being loaded as a
  module.  Users can access the driver internals through ioctl() calls -
  see the 'ewrk3' tools and the de4x5.c sources for information about
  how to do this.


  5.16.4.  DEC 21040, 21041, 2114x, Tulip

  Status: Supported, Driver Name: de4x5, tulip


  The DEC 21040 is a bus-mastering single chip ethernet solution from
  Digital, similar to AMD's PCnet chip. The 21040 is specifically
  designed for the PCI bus architecture.  SMC's new EtherPower PCI card
  uses this chip.

  You have a choice of two drivers for cards based on this chip. There
  is the DE425 driver discussed above, and the generic 21040  `tulip'
  driver.

  Warning: Even though your card may be based upon this chip, the
  drivers may not work for you. David C. Davies writes:

  ``There are no guarantees that either `tulip.c' OR `de4x5.c' will run
  any DC2114x based card other than those they've been written to
  support.  WHY?? You ask.  Because there is a register, the General
  Purpose Register (CSR12) that (1) in the DC21140A is programmable by
  each vendor and they all do it differently (2) in the DC21142/3 this
  is now an SIA control register (a la DC21041). The only small ray of
  hope is that we can decode the SROM to help set up the driver.
  However, this is not a guaranteed solution since some vendors (e.g.
  SMC 9332 card) don't follow the Digital Semiconductor recommended SROM
  programming format."

  In non-technical terms, this means that if you aren't sure that an
  unknown card with a DC2114x chip will work with the linux driver(s),
  then make sure you can return the card to the place of purchase before
  you pay for it.

  The updated 21041 chip is also found in place of the 21040 on most of
  the later SMC EtherPower cards.  The 21140 is for supporting 100Base-?
  and works with the Linux drivers for the 21040 chip.  To use David's
  de4x5 driver with non-DEC cards, have a look at README.de4x5 for
  details.

  Donald has used SMC EtherPower-10/100 cards to develop the `tulip'
  driver. Note that the driver that is in the standard kernel tree at
  the moment is not the most up to date version. If you are having
  trouble with this driver, you should get the newest version from
  Donald's ftp/WWW site.

  Tulip Driver <http://cesdis.gsfc.nasa.gov/linux/drivers/tulip.html>

  The above URL also contains a (non-exhaustive) list of various
  cards/vendors that use the 21040 chip.

  Also note that the tulip driver is still considered an alpha driver
  (see ``Alpha Drivers'') at the moment, and should be treated as such.
  To use it, you will have to edit arch/i386/config.in and uncomment the
  line for CONFIG_DEC_ELCP support.

  Donald has even set up a mailing list for tulip driver support
  announcements, etc.  To join it just type:

  echo subscribe | /bin/mail linux-tulip-request@cesdis.gsfc.nasa.gov


  5.17.  Farallon

  Farallon sells EtherWave adaptors and transceivers. This device allows
  multiple 10baseT devices to be daisy-chained.


  5.17.1.  Farallon Etherwave

  Status: Supported, Driver Name: 3c509

  This is reported to be a 3c509 clone that includes the EtherWave
  transceiver. People have used these successfully with Linux and the
  present 3c509 driver. They are too expensive for general use, but are
  a great option for special cases.  Hublet prices start at $125, and
  Etherwave adds $75-$100 to the price of the board -- worth it if you
  have pulled one wire too few, but not if you are two network drops
  short.


  5.18.  Fujitsu


  Unlike many network chip manufacturers, Fujitsu have also made and
  sold some network cards based upon their chip.


  5.18.1.  Fujitsu FMV-181/182/183/184

  Status: Supported, Driver Name: fmv18x

  According to the driver, these cards are a straight forward Fujitsu
  MB86965 implementation, which would make them very similar to the
  Allied Telesis AT1700 cards.


  5.19.  Hewlett Packard


  The 272** cards use programmed I/O, similar to the NE*000 boards, but
  the data transfer port can be `turned off' when you aren't accessing
  it, avoiding problems with autoprobing drivers.

  Thanks to Glenn Talbott for helping clean up the confusion in this
  section regarding the version numbers of the HP hardware.


  5.19.1.  27245A

  Status: Supported, Driver Name: hp (+8390)

  8 Bit 8390 based 10BaseT, not recommended for all the 8 bit reasons.
  It was re-designed a couple years ago to be highly integrated which
  caused some changes in initialization timing which only affected
  testing programs, not LAN drivers. (The new card is not `ready' as
  soon after switching into and out of loopback mode.)

  If you intend on using this driver as a loadable module you should
  probably see ``Using the Ethernet Drivers as Modules'' for module
  specific information.


  5.19.2.  HP EtherTwist, PC Lan+ (27247, 27252A)

  Status: Supported, Driver Name: hp+ (+8390)

  The HP PC Lan+ is different to the standard HP PC Lan card. This
  driver was added to the list of drivers in the standard kernel during
  the v1.1.x development cycle. It can be operated in either a PIO mode
  like a ne2000, or a shared memory mode like a wd8013.

  The 47B is a 16 Bit 8390 based 10BaseT w/AUI, and the 52A is a 16 Bit
  8390 based ThinLAN w/AUI.  These cards have 32K onboard RAM for Tx/Rx
  packet buffering instead of the usual 16KB, and they both offer LAN
  connector autosense.


  If you intend on using this driver as a loadable module you should
  probably see ``Using the Ethernet Drivers as Modules'' for module
  specific information.


  5.19.3.  HP-J2405A

  Status: Supported, Driver Name: lance

  These are lower priced, and slightly faster than the 27247/27252A, but
  are missing some features, such as AUI, ThinLAN connectivity, and boot
  PROM socket.  This is a fairly generic LANCE design, but a minor
  design decision makes it incompatible with a generic `NE2100' driver.
  Special support for it (including reading the DMA channel from the
  board) is included thanks to information provided by HP's Glenn
  Talbott.

  More technical information on LANCE based cards can be found in
  ``Notes on AMD...''


  5.19.4.  HP-Vectra On Board Ethernet

  Status: Supported, Driver Name: lance

  The HP-Vectra has an AMD PCnet chip on the motherboard.  DMA selection
  and chip numbering information can be found in ``AMD LANCE''.

  More technical information on LANCE based cards can be found in
  ``Notes on AMD...''


  5.19.5.  HP 10/100 VG Any Lan Cards (27248B, J2573, J2577, J2585,
  J970, J973)

  Status: Supported, Driver Name: hp100


  This driver also supports some of the Compex VG products.  Since the
  driver supports ISA, EISA and PCI cards, it is found under ISA cards
  when running make config on a kernel source.


  5.19.6.  HP NetServer 10/100TX PCI (D5013A)

  Status: Supported, Driver Name: eepro100

  Apparently these are just a rebadged Intel EtherExpress Pro 10/100B
  card. See the Intel section for more information.



  5.20.  IBM / International Business Machines



  5.20.1.  IBM Thinkpad 300

  Status: Supported, Driver Name: znet

  This is compatible with the Intel based Zenith Z-note.  See ``Z-note''
  for more info.

  Supposedly this site has a comprehensive database of useful stuff for
  newer versions of the Thinkpad. I haven't checked it out myself yet.

  Thinkpad-info <http://peipa.essex.ac.uk/html/linux-thinkpad.html>

  For those without a WWW browser handy, try
  peipa.essex.ac.uk:/pub/tp750/


  5.20.2.  IBM Credit Card Adaptor for Ethernet

  Status: Semi-Supported, Driver Name: ? (distributed separately)

  People have been using this PCMCIA card with Linux as well.  Similar
  points apply, those being that you need a supported PCMCIA chipset on
  your notebook, and that you will have to patch the PCMCIA support into
  the standard kernel.

  See ``PCMCIA Support'' in this document, and if you can, have a look
  at:

  Don's PCMCIA Stuff <http://cesdis.gsfc.nasa.gov/linux/pcmcia.html>



  5.20.3.  IBM Token Ring

  Status: Semi-Supported, Driver Name: ibmtr

  To support token ring requires more than only writing a device driver,
  it also requires writing the source routing routines for token ring.
  It is the source routing that would be the most time comsuming to
  write.

  Peter De Schrijver has been spending some time on Token Ring lately.
  and has worked with IBM ISA and MCA token ring cards.

  The present token ring code has been included into the first of the
  1.3.x series kernels.

  Peter says that it was originally tested on an MCA 16/4 Megabit Token
  Ring board, but it should work with other Tropic based boards.


  5.21.  ICL Ethernet Cards



  5.21.1.  ICL EtherTeam 16i/32

  Status: Supported, Driver Name: eth16i

  Mika Kuoppala (miku@pupu.elt.icl.fi) wrote this driver, and it was
  included into early 1.3.4x kernels. It uses the Fujitsu MB86965 chip
  that is also used on the at1700 cards.


  5.22.  Intel Ethernet Cards


  Note that the naming of the various Intel cards is ambiguous and
  confusing at best.  If in doubt, then check the i8xxxx number on the
  main chip on the card or for PCI cards, use the PCI information in the
  /proc directory and then compare that to the numbers listed here.



  5.22.1.  Ether Express

  Status: Supported, Driver Name: eexpress

  This card uses the intel i82586.  Earlier versions of this driver (in
  v1.2 kernels) were classed as alpha-test, as it didn't work well for
  most people.  The driver in the v2.0 kernel seems to work much better
  for those who have tried it, although the driver source still lists it
  as experimental and more problematic on faster machines.

  The comments at the top of the driver source list some of the problems
  (and fixes!) associated with these cards. The slowdown hack of
  replacing all the outb with outb_p in the driver has been reported to
  avoid lockups for at least one user.


  5.22.2.  Ether Express PRO/10

  Status: Supported, Driver Name: eepro

  Bao Chau Ha has written a driver for these cards that has been
  included into early 1.3.x kernels. It may also work with some of the
  Compaq built-in ethernet systems that are based on the i82595 chip.


  5.22.3.  Ether Express PRO/10 PCI (EISA)

  Status: Semi-Supported, Driver Name: ? (distributed separately)

  John Stalba (stalba@ultranet.com) has written a driver for the PCI
  version. These cards use the PLX9036 PCI interface chip with the Intel
  i82596 LAN controller chip. If your card has the i82557 chip, then you
  don't have this card, but rather the version discussed next, and hence
  want the EEPro100 driver instead.

  You can get the alpha driver for the PRO/10 PCI card, along with
  instructions on how to use it at:

  EEPro10 Driver <http://www.ultranet.com/~stalba/eep10pci.html>

  If you have the EISA card, you will probably have to hack the driver a
  bit to account for the different (PCI vs. EISA) detection mechanisms
  that are used in each case.



  5.22.4.  Ether Express PRO 10/100B

  Status: Supported, Driver Name: eepro100

  Note that this driver will not work with the older 100A cards.  The
  chip numbers listed in the driver are i82557/i82558.  For driver
  updates and/or driver support, have a look at:

  EEPro-100B Page
  <http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html>

  To subscribe to the mailing list relating to this driver, do:

  echo subscribe | /bin/mail linux-eepro100-request@cesdis.gsfc.nasa.gov

  Apparently Donald had to sign a non-disclosure agreement that stated
  he could actually disclose the driver source code! How is that for
  sillyness on intel's part?


  5.23.  Kingston


  Kingston make various cards, including NE2000+, AMD PCnet based cards,
  and DEC tulip based cards. Most of these cards should work fine with
  their respective driver. See Kingston Web Page
  <http://www.kingston.com>

  The KNE40 DEC 21041 tulip based card is reported to work fine with the
  generic tulip driver.



  5.24.  LinkSys


  LinkSys make a handful of different NE2000 clones, some straight ISA
  cards, some ISA plug and play and some even ne2000-PCI clones based on
  one of the supported ne2000-PCI chipsets. There are just too many
  models to list here.

  LinkSys are linux-friendly, with a linux specific WWW support page,
  and even have Linux printed on the boxes of some of their products.
  Have a look at:

  http://www.linksys.com/support/solution/nos/linux.htm



  5.24.1.  LinkSys Etherfast 10/100 Cards.

  Status: Supported, Driver Name: tulip

  Note that with these cards there have been several `revisions' (i.e.
  different chipset used) all with the same card name. The 1st used the
  DEC chipset. The 2nd revision used the Lite-On PNIC 82c168 PCI Network
  Interface Controller, and support for this was merged into the
  standard tulip driver (as of version 0.83 and newer).  More PNIC
  information is available at:

  http://cesdis.gsfc.nasa.gov/linux/drivers/pnic.html

  More information on the various versions of these cards can be found
  at the LinkSys WWW site mentioned above.



  5.24.2.  LinkSys Pocket Ethernet Adapter Plus (PEAEPP)

  Status: Supported, Driver Name: de620

  This is supposedly a DE-620 clone, and is reported to work well with
  that driver. See ``DE-620'' for more information.


  5.24.3.  LinkSys PCMCIA Adaptor

  Status: Supported, Driver Name: de650 (?)

  This is supposed to be a re-badged DE-650. See ``DE-650'' for more
  information.



  5.25.  Microdyne



  5.25.1.  Microdyne Exos 205T

  Status: Semi-Supported, Driver Name: ?

  Another i82586 based card. Dirk Niggemann dirk-n@dircon.co.uk has
  written a driver that he classes as ``pre-alpha'' that he would like
  people to test. Mail him for more details.


  5.26.  Mylex


  Mylex can be reached at the following numbers, in case anyone wants to
  ask them anything.


          MYLEX CORPORATION, Fremont
          Sales:  800-77-MYLEX, (510) 796-6100
          FAX:    (510) 745-8016.



  They also have a web site: Mylex WWW Site <http://www.mylex.com>


  5.26.1.  Mylex LNE390A, LNE390B

  Status: Supported, Driver Name: lne390 (+8390)

  These are fairly old EISA cards that make use of a shared memory
  implementation similar to the wd80x3. A driver for these cards is
  available in the current 2.1.x series of kernels.  Ensure you set the
  shared memory address below 1MB or above the highest address of the
  physical RAM installed in the machine.


  5.26.2.  Mylex LNP101

  Status: Supported, Driver Name: de4x5, tulip

  This is a PCI card that is based on DEC's 21040 chip.  It is
  selectable between 10BaseT, 10Base2 and 10Base5 output.  The LNP101
  card has been verified to work with the generic 21040 driver.

  See the section on the 21040 chip (``DEC 21040'') for more
  information.


  5.26.3.  Mylex LNP104

  Status: Semi-Supported, Driver Name: de4x5, tulip

  The LNP104 uses the DEC 21050 chip to deliver four independent 10BaseT
  ports. It should work with recent 21040 drivers that know how to share
  IRQs, but nobody has reported trying it yet (that I am aware of).


  5.27.  Novell Ethernet, NExxxx and associated clones.


  The prefix `NE' came from Novell Ethernet. Novell followed the
  cheapest NatSemi databook design and sold the manufacturing rights
  (spun off?) Eagle, just to get reasonably-priced ethercards into the
  market. (The now ubiquitous NE2000 card.)


  5.27.1.  NE1000, NE2000

  Status: Supported, Driver Name: ne (+8390)

  The ne2000 is now a generic name for a bare-bones design around the
  NatSemi 8390 chip. They use programmed I/O rather than shared memory,
  leading to easier installation but slightly lower performance and a
  few problems.  Some of the more common problems that arise with NE2000
  cards are listed in ``Problems with...''

  Some NE2000 clones use the National Semiconductor `AT/LANTic' 83905
  chip, which offers a shared memory mode similar to the wd8013 and
  EEPROM software configuration. The shared memory mode will offer less
  CPU usage (i.e. more efficient) than the programmed I/O mode.

  In general it is not a good idea to put a NE2000 clone at I/O address
  0x300 because nearly every device driver probes there at boot. Some
  poor NE2000 clones don't take kindly to being prodded in the wrong
  areas, and will respond by locking your machine. Also 0x320 is bad
  because SCSI drivers probe into 0x330.

  Donald has written a NE2000 diagnostic program (ne2k.c) for all ne2000
  cards.  See ``Diagnostic Programs'' for more information.

  If you intend on using this driver as a loadable module you should
  probably see ``Using the Ethernet Drivers as Modules'' for module
  specific information.


  5.27.2.  NE2000-PCI (RealTek/Winbond/Compex)

  Status: Supported, Driver Name: ne, ne2k-pci (+8390)

  Yes, believe it or not, people are making PCI cards based on the more
  than ten year old interface design of the ne2000. At the moment nearly
  all of these cards are based on the RealTek 8029 chip, or the Winbond
  89c940 chip. The Compex, KTI, VIA and Netvin cards apparently also use
  these chips, but have a different PCI ID.

  The latest v2.0 kernel has support to automatically detect all these
  cards and use them. (If you are using a kernel v2.0.34 or older, you
  should upgrade to ensure your card will be detected.)  There are now
  two drivers to choose from; the original ISA/PCI ne.c driver, and a
  relatively new PCI-only ne2k-pci.c driver.

  To use the original ISA/PCI driver you have to say `Y'  to the `Other
  ISA cards' option when running make config as you are actually using
  the same NE2000 driver as the ISA cards use. (That should also give
  you a hint that these cards aren't anywhere as intelligent as say a
  PCNet-PCI or DEC 21040 card...)

  The newer PCI-only driver differs from the ISA/PCI driver in that all
  the support for old NE1000 8 bit cards has been removed and that data
  is moved to/from the card in bigger blocks, without any intervening
  pauses that the older ISA-NE2000's required for reliable operation.
  The result is a driver that is slightly smaller and slightly more
  efficient, but don't get too excited as the difference will not be
  obvious under normal use.  (If you really wanted maximum
  efficiency/low CPU use, then a PCI-NE2000 is simply a very poor
  choice.) Driver updates and more information can be found at:


  http://cesdis.gsfc.nasa.gov/linux/drivers/ne2k-pci.html

  If you have a NE2000 PCI card that is not  detected by the most
  current version of the driver, please contact the maintainer of the
  NE2000 driver as listed in /usr/src/linux/MAINTAINERS along with the
  output from a cat /proc/pci and dmesg so that support for your card
  can also be added to the driver.

  Also note that various card makers have been known to put `NE2000
  Compatible' stickers on their product boxes even when it is completely
  different (e.g. PCNet-PCI or RealTek 8139).  If in doubt check the
  main chip number against this document.


  5.27.3.  NE-10/100

  Status: Not Supported.

  These are ISA 100Mbps cards based on the National Semiconductor
  DP83800 and DP83840 chips. There is currently no driver support, nor
  has anyone reported that they are working on a driver.  Apparently
  documentation on the chip is unavailable with the exception of a
  single PDF file that doesn't give enough details for a driver.


  5.27.4.  NE1500, NE2100

  Status: Supported, Driver Name: lance

  These cards use the original 7990 LANCE chip from AMD and are
  supported using the Linux lance driver. Newer NE2100 clones use the
  updated PCnet/ISA chip from AMD.

  Some earlier versions of the lance driver had problems with getting
  the IRQ line via autoIRQ from the original Novell/Eagle 7990 cards.
  Hopefully this is now fixed.  If not, then specify the IRQ via LILO,
  and let us know that it still has problems.

  DMA selection and chip numbering information can be found in ``AMD
  LANCE''.

  More technical information on LANCE based cards can be found in
  ``Notes on AMD...''


  5.27.5.  NE/2 MCA

  Status: Semi-Supported, Driver Name: ne2

  There were a few NE2000 microchannel cards made by various companies.
  This driver, available in v2.2 kernels, will detect the following MCA
  cards: Novell Ethernet Adapter NE/2, Compex ENET-16 MC/P, and the Arco
  Ethernet Adapter AE/2.


  5.27.6.  NE3200

  Status: Not Supported.

  This old EISA card uses a 8MHz 80186 in conjunction with an i82586.
  Nobody is working on a driver for it, as there is no information
  available on the card, and no real demand for a driver either.



  5.27.7.  NE3210

  Status: Supported, Driver Name: ne3210 (+8390)

  This EISA card is completely different from the NE3200, as it uses a
  Nat Semi 8390 chip.  The driver can be found in the v2.2 kernel source
  tree.  Ensure you set the shared memory address below 1MB or above the
  highest address of the physical RAM installed in the machine.


  5.27.8.  NE5500

  Status: Supported, Driver Name: pcnet32

  These are just AMD PCnet-PCI cards ('970A) chips. More information on
  LANCE/PCnet based cards can be found in ``AMD LANCE''.



  5.28.  Proteon



  5.28.1.  Proteon P1370-EA

  Status: Supported, Driver Name: ne (+8390)

  Apparently this is a NE2000 clone, and works fine with Linux.


  5.28.2.  Proteon P1670-EA

  Status: Supported, Driver Name: de4x5, tulip

  This is yet another PCI card that is based on DEC's Tulip chip.  It
  has been reported to work fine with Linux.

  See the section on the 21040 chip (``DEC 21040'') for more driver
  information.



  5.29.  Pure Data



  5.29.1.  PDUC8028, PDI8023

  Status: Supported, Driver Name: wd (+8390)

  The PureData PDUC8028 and PDI8023 series of cards are reported to
  work, thanks to special probe code contributed by Mike Jagdis
  jaggy@purplet.demon.co.uk. The support is integrated with the WD
  driver.


  5.30.  Racal-Interlan


  Racal Interlan can be reached via WWW at www.interlan.com. I believe
  they were also known as MiCom-Interlan at one point in the past.



  5.30.1.  ES3210

  Status: Semi-Supported, Driver Name: es3210

  This is an EISA 8390 based shared memory card. An experimetal driver
  is shipped with v2.2 kernels and it is reported to work fine, but the
  EISA IRQ and shared memory address detection appears not to work with
  (at least) the early revision cards.  (This problem is not unique to
  the Linux world either...)  In that case, you have to supply them to
  the driver.  For example, card at IRQ 5 and shared memory 0xd0000,
  with a modular driver, add options es3210 irq=5 mem=0xd0000 to
  /etc/conf.modules.  Or with the driver compiled into the kernel,
  supply at boot ether=5,0,0xd0000,eth0 The I/O base is automatically
  detected and hence a value of zero should be used.


  5.30.2.  NI5010

  Status: Semi-Supported, Driver Name: ni5010

  You used to have to go get the driver for these old 8 bit MiCom-
  Interlan cards separately, but now it is shipped with the v2.2 kernels
  as an experimental driver.


  5.30.3.  NI5210

  Status: Semi-Supported, Driver Name: ni52

  This card also uses one of the Intel chips.  Michael Hipp has written
  a driver for this card. It is included in the standard kernel as an
  `alpha' driver. Michael would like to hear feedback from users that
  have this card. See ``Alpha Drivers'' for important information on
  using alpha-test ethernet drivers with Linux.


  5.30.4.  NI6510 (not EB)

  Status: Semi-Supported, Driver Name: ni65

  There is also a driver for the LANCE based NI6510, and it is also
  written by Michael Hipp. Again, it is also an `alpha' driver. For some
  reason, this card is not compatible with the generic LANCE driver. See
  ``Alpha Drivers'' for important information on using alpha-test
  ethernet drivers with Linux.


  5.30.5.  EtherBlaster (aka NI6510EB)

  Status: Supported, Driver Name: lance

  As of kernel 1.3.23, the generic LANCE driver had a check added to it
  for the 0x52, 0x44 NI6510EB specific signature.  Others have reported
  that this signature is not the same for all NI6510EB cards however,
  which will cause the lance driver to not detect your card. If this
  happens to you, you can change the probe (at about line 322 in
  lance.c) to printk() out what the values are for your card and then
  use them instead of the 0x52, 0x44 defaults.

  The cards should probably be run in `high-performance' mode and not in
  the NI6510 compatible mode when using the lance driver.



  5.31.  RealTek



  5.31.1.  RealTek RTL8002/8012 (AT-Lan-Tec) Pocket adaptor

  Status: Supported, Driver Name: atp

  This is a generic, low-cost OEM pocket adaptor being sold by AT-Lan-
  Tec, and (likely) a number of other suppliers. A driver for it is
  included in the standard kernel.  Note that there is substantial
  information contained in the driver source file `atp.c'.

  Note that the device name that you pass to ifconfig was not eth0 but
  atp0 for earlier versions of this driver.


  5.31.2.  RealTek 8009

  Status: Supported, Driver Name: ne (+8390)

  This is an ISA NE2000 clone, and is reported to work fine with the
  linux NE2000 driver.  The rset8009.exe program can be obtained from
  RealTek's WWW site at http://www.realtek.com.tw - or via ftp from the
  same site.


  5.31.3.  RealTek 8019

  Status: Supported, Driver Name: ne (+8390)

  This is a Plug and Pray version of the above.  Use the DOS software to
  disable PnP and enable jumperless configuration; set the card to a
  sensible I/O address and IRQ and you should be ready to go.  (If using
  the driver as a module, don't forget to add an io=0xNNN option to
  /etc/conf.modules).  The rset8019.exe program can be obtained from
  RealTek's WWW site at http://www.realtek.com.tw - or via ftp from the
  same site.


  5.31.4.  RealTek 8029

  Status: Supported, Driver Name: ne, ne2k-pci (+8390)

  This is a PCI single chip implementation of a NE2000 clone.  Various
  vendors are now selling cards with this chip. See ``NE2000-PCI'' for
  information on using any of these cards.  Note that this is still a
  10+ year old design just glued onto a PCI bus. Performance won't be
  staggeringly better than the equivalent ISA model.



  5.31.5.  RealTek 8129/8139

  Status: Semi-Supported, Driver Name: rtl8139

  Another PCI single chip ethernet solution from RealTek.  A driver for
  cards based upon this chip was included in the v2.0.34 release of
  linux.  You currently have to answer `Y' when asked if you want
  experimental drivers for v2.2 kernels to get access to this driver.
  For more information, see:

  http://cesdis.gsfc.nasa.gov/linux/drivers/rtl8139.html



  5.32.  Sager



  5.32.1.  Sager NP943

  Status: Semi-Supported, Driver Name: 3c501

  This is just a 3c501 clone, with a different S.A. PROM prefix. I
  assume it is equally as brain dead as the original 3c501 as well. The
  driver checks for the NP943 I.D. and then just treats it as a 3c501
  after that. See ``3Com 3c501'' for all the reasons as to why you
  really don't want to use one of these cards.


  5.33.  Schneider & Koch



  5.33.1.  SK G16

  Status: Supported, Driver Name: sk_g16

  This driver was included into the v1.1 kernels, and it was written by
  PJD Weichmann and SWS Bern. It appears that the SK G16 is similar to
  the NI6510, in that it is based on the first edition LANCE chip (the
  7990). Once again, it appears as though this card won't work with the
  generic LANCE driver.


  5.34.  SEEQ



  5.34.1.  SEEQ 8005

  Status: Supported, Driver Name: seeq8005

  This driver was included into early 1.3.x kernels, and was written by
  Hamish Coleman.  There is little information about the card included
  in the driver, and hence little information to be put here. If you
  have a question, you are probably best off e-mailing
  hamish@zot.apana.org.au


  5.35.  SMC (Standard Microsystems Corp.)



  The ethernet part of Western Digital was bought out by SMC many years
  ago when the wd8003 and wd8013 were the main product. Since then SMC
  has continued making 8390 based ISA cards (Elite16, Ultra, EtherEZ)
  and also added several PCI products to their range.

  Contact information for SMC:

  SMC / Standard Microsystems Corp., 80 Arkay Drive, Hauppage, New York,
  11788, USA.  Technical Support via phone: 800-992-4762 (USA) or
  800-433-5345 (Canada) or 516-435-6250 (Other Countries).  Literature
  requests: 800-SMC-4-YOU (USA) or 800-833-4-SMC (Canada) or
  516-435-6255  (Other Countries).  Technical Support via E-mail:
  techsupt@ccmail.west.smc.com. FTP Site: ftp.smc.com.  WWW Site: SMC
  <http://www.smc.com>.



  5.35.1.  WD8003, SMC Elite

  Status: Supported, Driver Name: wd (+8390)

  These are the 8-bit versions of the card. The 8 bit 8003 is slightly
  less expensive, but only worth the savings for light use. Note that
  some of the non-EEPROM cards (clones with jumpers, or old old old
  wd8003 cards) have no way of reporting the IRQ line used. In this
  case, auto-irq is used, and if that fails, the driver silently assings
  IRQ 5.  You can get the SMC setup/driver disks from SMC's ftp site.
  Note that some of the newer SMC `SuperDisk' programs will fail to
  detect the real old EEPROM-less cards. The file SMCDSK46.EXE seems to
  be a good all-round choice. Also the jumper settings for all their
  cards are in an ASCII text file in the aforementioned archive. The
  latest (greatest?) version can be obtained from ftp.smc.com.

  As these are basically the same as their 16 bit counterparts (WD8013 /
  SMC Elite16), you should see the next section for more information.



  5.35.2.  WD8013, SMC Elite16

  Status: Supported, Driver Name: wd (+8390)

  Over the years the design has added more registers and an EEPROM. (The
  first wd8003 cards appeared about ten years ago!)  Clones usually go
  by the `8013' name, and usually use a non-EEPROM (jumpered) design.
  Late model SMC cards will have the SMC 83c690 chip instead of the
  original Nat Semi DP8390 found on earlier cards.  The shared memory
  design makes the cards a bit faster than PIO cards, especially with
  larger packets.  More importantly, from the driver's point of view, it
  avoids a few bugs in the programmed-I/O mode of the 8390, allows safe
  multi-threaded access to the packet buffer, and it doesn't have a
  programmed-I/O data register that hangs your machine during warm-boot
  probes.

  Non-EEPROM cards that can't just read the selected IRQ will attempt
  auto-irq, and if that fails, they will silently assign IRQ 10. (8 bit
  versions will assign IRQ 5)

  Cards with a non standard amount of memory on board can have the
  memory size specified at boot (or as an option in /etc/conf.modules if
  using modules).  The standard memory size is 8kB for an 8bit card and
  16kB for a 16bit card.  For example, the older WD8003EBT cards could
  be jumpered for 32kB memory. To make full use of that RAM, you would
  use something like (for I/O=0x280 and IRQ 9):

  ______________________________________________________________________
          LILO: linux ether=9,0x280,0xd0000,0xd8000,eth0
  ______________________________________________________________________



  Also see ``8013 problems'' for some of the more common problems and
  frequently asked questions that pop up often.

  If you intend on using this driver as a loadable module you should
  probably see ``Using the Ethernet Drivers as Modules'' for module
  specific information.


  5.35.3.  SMC Elite Ultra

  Status: Supported, Driver Name: smc-ultra (+8390)

  This ethercard is based on the 83c790 chip from SMC, which has a few
  new features over the 83c690. While it has a mode that is similar to
  the older SMC ethercards, it's not entirely compatible with the old
  WD80*3 drivers. However, in this mode it shares most of its code with
  the other 8390 drivers, while operating slightly faster than a WD8013
  clone.

  Since part of the Ultra looks like an 8013, the Ultra probe is
  supposed to find an Ultra before the wd8013 probe has a chance to
  mistakenly identify it.

  Donald mentioned that it is possible to write a separate driver for
  the Ultra's `Altego' mode which allows chaining transmits at the cost
  of inefficient use of receive buffers, but that will probably not
  happen.

  Bus-Master SCSI host adaptor users take note: In the manual that ships
  with Interactive UNIX, it mentions that a bug in the SMC Ultra will
  cause data corruption with SCSI disks being run from an aha-154X host
  adaptor.  This will probably bite aha-154X compatible cards, such as
  the BusLogic boards, and the AMI-FastDisk SCSI host adaptors as well.

  SMC has acknowledged the problem occurs with Interactive, and older
  Windows NT drivers. It is a hardware conflict with early revisions of
  the card that can be worked around in the driver design. The current
  Ultra driver protects against this by only enabling the shared memory
  during data transfers with the card. Make sure your kernel version is
  at least 1.1.84, or that the driver version reported at boot is at
  least smc-ultra.c:v1.12 otherwise you are vulnerable.

  If you intend on using this driver as a loadable module you should
  probably see ``Using the Ethernet Drivers as Modules'' for module
  specific information.


  5.35.4.  SMC Elite Ultra32 EISA

  Status: Supported, Driver Name: smc-ultra32 (+8390)

  This EISA card shares a lot in common with its ISA counterpart.  A
  working (and stable) driver is included in both v2.0 and v2.2 kernels.
  Thanks go to Leonard Zubkoff for purchasing some of these cards so
  that linux support could be added for them.


  5.35.5.  SMC EtherEZ (8416)

  Status: Supported, Driver Name: smc-ultra (+8390)

  This card uses SMC's 83c795 chip and supports the Plug 'n Play
  specification. It also has an SMC Ultra compatible mode, which allows
  it to be used with the Linux Ultra driver.  For best results, use the
  SMC supplied program (avail. from their www/ftp site) to disable PnP
  and configure it for shared memory mode.  See the above information
  for notes on the Ultra driver.

  For v1.2 kernels, the card had to be configured for shared memory
  operation. However v2.0 kernels can use the card in shared memory or
  programmed I/O mode. Shared memory mode will be slightly faster, and
  use less CPU resources as well.


  5.35.6.  SMC EtherPower PCI (8432)

  Status: Supported, Driver Name: de4x5, tulip

  NB: The EtherPower II is an entirely different card. See below!  These
  cards are a basic DEC 21040 implementation, i.e. one big chip and a
  couple of transceivers. Donald has used one of these cards for his
  development of the generic 21040 driver (aka tulip.c). Thanks to Duke
  Kamstra, once again, for supplying a card to do development on.

  Some of the later revisons of this card use the newer DEC 21041 chip,
  which may cause problems with older versions of the tulip driver. If
  you have problems, make sure you are using the latest driver release,
  which may not yet be included in the current kernel source tree.

  See ``DEC 21040'' for more details on using one of these cards, and
  the current status of the driver.

  Apparently, the latest revision of the card, the EtherPower-II uses
  the 9432 chip. It is unclear at the moment if this one will work with
  the present driver. As always, if unsure, check that you can return
  the card if it doesn't work with the linux driver before paying for
  the card.


  5.35.7.  SMC EtherPower II PCI (9432)

  Status: Semi-Supported, Driver Name: epic100

  These cards, based upon the SMC 83c170 chip, are entirely different
  than the Tulip based cards. A new driver has been included in kernels
  v2.0 and v2.2 to support these cards. For more details, see:

  http://cesdis.gsfc.nasa.gov/linux/drivers/epic100.html



  5.35.8.  SMC 3008

  Status: Not Supported.

  These 8 bit cards are based on the Fujitsu MB86950, which is an
  ancient version of the MB86965 used in the Linux at1700 driver. Russ
  says that you could probably hack up a driver by looking at the
  at1700.c code and his DOS packet driver for the Tiara card
  (tiara.asm). They are not very common.


  5.35.9.  SMC 3016

  Status: Not Supported.

  These are 16bit I/O mapped 8390 cards, much similar to a generic
  NE2000 card. If you can get the specifications from SMC, then porting
  the NE2000 driver would probably be quite easy.  They are not very
  common.


  5.35.10.  SMC-9000 / SMC 91c92/4

  Status: Supported, Driver Name: smc9194

  The SMC9000 is a VLB card based on the 91c92 chip.  The 91c92 appears
  on a few other brand cards as well, but is fairly uncommon.  Erik
  Stahlman (erik@vt.edu) has written this driver which is in v2.0
  kernels, but not in the older v1.2 kernels. You may be able to drop
  the driver into a v1.2 kernel source tree with minimal difficulty.



  5.35.11.  SMC 91c100

  Status: Semi-Supported, Driver Name: smc9194

  The SMC 91c92 driver is supposed to work for cards based on this
  100Base-T chip, but at the moment this is unverified.


  5.36.  Texas Instruments



  5.36.1.  ThunderLAN

  Status: Supported, Driver Name: tlan

  This driver covers many Compaq built-in ethernet devices, including
  the NetFlex and Netelligent groups. It also supports the Olicom 2183,
  2185, 2325 and 2326 products.


  5.37.  Thomas Conrad



  5.37.1.  Thomas Conrad TC-5048


  This is yet another PCI card that is based on DEC's 21040 chip.

  See the section on the 21040 chip (``DEC 21040'') for more
  information.


  5.38.  VIA


  You probably won't see a VIA networking card, as VIA make several
  networking chips that are then used by others in the construction of
  an ethernet card.  They have a WWW site at:

  http://www.via.com.tw/


  5.38.1.  VIA 86C926 Amazon

  Status: Supported, Driver Name: ne, ne2k-pci (+8390)

  This controller chip is VIA's PCI-NE2000 offering. You can choose
  between the ISA/PCI ne.c driver or the PCI-only ne2k-pci.c driver. See
  the PCI-NE2000 section for more details.


  5.38.2.  VIA 86C100A Rhine II (and 3043 Rhine I)

  Status Supported, Driver Name: via-rhine

  This relatively new driver can be found in current 2.0 and 2.1
  kernels.  It is an improvement over the 86C926 NE2000 chip in that it
  supports bus master transfers, but strict 32 bit buffer alignment
  requirements limit the benefit gained from this. For more details and
  driver updates, see:

  http://cesdis.gsfc.nasa.gov/linux/drivers/via-rhine.html


  5.39.  Western Digital


  Please see ``SMC'' for information on SMC cards. (SMC bought out
  Western Digital's network card section many years ago.)


  5.40.  Winbond


  Winbond don't really make and sell complete cards to the general
  public -- instead they make single chip ethernet solutions that other
  companies buy, stick onto a PCI board with their own name and then
  sell through retail stores.


  5.40.1.  Winbond 89c840

  Status: Semi-Supported, Driver Name: winbond-840

  This driver isn't currently shipped with the kernel, as it is in the
  testing phase.  It is available at:

  http://cesdis.gsfc.nasa.gov/linux/drivers/test/winbond-840.c


  5.40.2.  Winbond 89c940

  Status: Supported, Driver Name: ne, ne2k-pci (+8390)

  This chip is one of the two commonly found on the low price PCI ne2000
  cards sold by lots of manufacturers. Note that this is still a 10+
  year old design just glued onto a PCI bus. Performance won't be
  staggeringly better than the equivalent ISA model.


  5.41.  Xircom


  For the longest time, Xircom wouldn't release the programming
  information required to write a driver, unless you signed your life
  away. Apparently enough linux users have pestered them for driver
  support (they claim to support all popular networking operating
  systems...) so that they have changed their policy to allow
  documentation to be released without having to sign a non-disclosure
  agreement. Some people have said they they will release the source
  code to the SCO driver, while others have been told that they are no
  longer providing information on `obsolete' products like the earlier
  PE models.  If you are interested and want to check into this
  yourself, you can reach Xircom at 1-800-874-7875, 1-800-438-4526 or
  +1-818-878-7600.


  5.41.1.  Xircom PE1, PE2, PE3-10B*

  Status: Not Supported.

  Not to get your hopes up, but if you have one of these parallel port
  adaptors, you may be able to use it in the DOS emulator with the
  Xircom-supplied DOS drivers. You will have to allow DOSEMU access to
  your parallel port, and will probably have to play with SIG (DOSEMU's
  Silly Interrupt Generator).



  5.41.2.  Xircom PCMCIA Cards

  Status: Semi-Supported, Driver Name: ????

  Some of the Xircom PCMCIA card(s) have drivers that are available with
  David Hinds PCMCIA package. Check there for the most up to date
  indformation


  5.42.  Zenith



  5.42.1.  Z-Note

  Status: Supported, Driver Name: znet

  The built-in Z-Note network adaptor is based on the Intel i82593 using
  two DMA channels. There is an (alpha?) driver available in the present
  kernel version. As with all notebook and pocket adaptors, it is under
  the `Pocket and portable adaptors' section when running make config.
  Also note that the IBM ThinkPad 300 is compatible with the Z-Note.


  5.43.  Znyx



  5.43.1.  Znyx ZX342 (DEC 21040 based)

  Status: Supported, Driver Name: de4x5, tulip

  You have a choice of two drivers for cards based on this chip. There
  is the DE425 driver written by David, and the generic 21040 driver
  that Donald has written.

  Note that as of 1.1.91, David has added a compile time option that may
  allow non-DEC cards (such as the Znyx cards) to work with this driver.
  Have a look at README.de4x5 for details.

  See ``DEC 21040'' for more information on these cards, and the present
  driver situation.


  5.44.  Identifying an Unknown Card


  Okay, so your uncle's cousin's neighbour's friend had a brother who
  found an old ISA ethernet card in the AT case he was using as a cage
  for his son's pet hampster. Somehow you ended up with the card and
  want to try and use it with linux, but nobody has a clue what the card
  is and there isn't any documentation.

  First of all, look for any obvious model numbers that might give a
  clue. Any model number that contains 2000 will most likely be a NE2000
  clone. Any cards with 8003 or 8013 on them somewhere will be
  Western/Digital WD80x3 cards or SMC Elite cards or clones of them.


  5.44.1.  Identifying the Network Interface Controller

  Look for the biggest chip on the card. This will be the network
  controller (NIC) itself, and most can be identified by the part
  number. If you know which NIC is on the card, the following might be
  able to help you figure out what card it is.

  Probably still the most common NIC is the National Semiconductor
  DP8390 aka NS32490 aka DP83901 aka DP83902 aka DP83905 aka DP83907.
  And those are just the ones made by National! Other companies such as
  Winbond and UMC make DP8390 and DP83905 clone parts, such as the
  Winbond 89c904 (DP83905 clone) and the UMC 9090.  If the card has some
  form of 8390 on it, then chances are it is a ne1000 or ne2000 clone
  card. The second most common 8390 based card are wd80x3 cards and
  clones. Cards with a DP83905 can be configured to be an ne2000 or a
  wd8013. Never versions of the genuine wd80x3 and SMC Elite cards have
  an 83c690 in place of the original DP8390. The SMC Ultra cards have an
  83c790, and use a slightly different driver than the wd80x3 cards.
  The SMC EtherEZ cards have an 83c795, and use the same driver as the
  SMC Ultra. All BNC cards based on some sort of 8390 or 8390 clone will
  usually have an 8392 (or 83c692, or ???392) 16 pin DIP chip very close
  to the BNC connector.

  Another common NIC found on older cards is the Intel i82586.  Cards
  having this NIC include the 3c505, 3c507, 3c523, Intel EtherExpress-
  ISA, Microdyne Exos-205T, and the Racal-Interlan NI5210.

  The original AMD LANCE NIC was numbered AM7990, and newer revisions
  include the 79c960, 79c961, 79c965, 79c970, and 79c974.  Most cards
  with one of the above will work with the Linux LANCE driver, with the
  exception of the old Racal-Interlan NI6510 cards that have their own
  driver.

  Newer PCI cards having a DEC 21040, 21041, 21140, or similar number on
  the NIC should be able to use the linux tulip or de4x5 driver.

  Other PCI cards having a big chip marked RTL8029 or 89C940 or 86C926
  are ne2000 clone cards, and the ne driver in linux version v2.0 and up
  should automatically detect these cards at boot.


  5.44.2.  Identifying the Ethernet Address


  Each ethernet card has its own six byte address that is unique to that
  card. The first three bytes of that address are the same for each card
  made by that particular manufacturer.  For example all SMC cards start
  with 00:00:c0.  The last three are assigned by the manufacturer
  uniquely to each individual card as they are produced.

  If your card has a sticker on it giving all six bits of its address,
  you can look up the vendor from the first three.  However it is more
  common to see only the last three bytes printed onto a sticker
  attached to a socketed PROM, which tells you nothing.

  You can determine which vendors have which assigned addresses from
  RFC-1340. Apparently there is a more up to date listing available in
  various places as well. Try a WWW or FTP search for EtherNet-codes or
  Ethernet-codes and you will find something.


  5.44.3.  Tips on Trying to Use an Unknown Card


  If you are still not sure what the card is, but have at least narrowed
  it down some, then you can build a kernel with a whole bunch of
  drivers included, and see if any of them autodetect the card at boot.

  If the kernel doesn't detect the card, it may be that the card is not
  configured to one of the addresses that the driver probes when looking
  for a card. In this case, you might want to try getting
  scanport.tar.gz from your local linux ftp site, and see if that can
  locate where your card is jumpered for. It scans ISA I/O space from
  0x100 to 0x3ff looking for devices that aren't registered in
  /proc/ioports. If it finds an unknown device starting at some
  particular address, you can then explicity point the ethernet probes
  at that address with an ether= boot argument.

  If you manage to get the card detected, you can then usually figure
  out the unknown jumpers by changing them one at a time and seeing at
  what I/O base and IRQ that the card is detected at. The IRQ settings
  can also usually be determined by following the traces on the back of
  the card to where the jumpers are soldered through. Counting the `gold
  fingers' on the backside, from the end of the card with the metal
  bracket, you have IRQ 9, 7, 6, 5, 4, 3, 10, 11, 12, 15, 14 at fingers
  4, 21, 22, 23, 24, 25, 34, 35, 36, 37, 38 respectively.  Eight bit
  cards only have up to finger 31.

  Jumpers that appear to do nothing usually are for selecting the memory
  address of an optional boot ROM. Other jumpers that are located near
  the BNC or RJ-45 or AUI connectors are usually to select the output
  media. These are also typically near the `black box' voltage
  converters marked YCL, Valor, or Fil-Mag.

  A nice collection of jumper settings for various cards can be found at
  the following URL:

  Ethercard Settings <http://www.slug.org.au/NIC/>



  5.45.  Drivers for Non-Ethernet Devices


  There are a few other drivers that are in the linux source that
  present an ethernet-like device to network programs, while not really
  being ethernet. These are briefly listed here for completeness.

  dummy.c - The purpose of this driver is to provide a device to point a
  route through, but not to actually transmit packets.

  eql.c - Load Equalizer, enslaves multiple devices (usually modems) and
  balances the Tx load across them while presenting a single device to
  the network programs.

  ibmtr.c - IBM Token Ring, which is not really ethernet.  Broken-Ring
  requires source routing and other uglies.

  loopback.c - Loopback device, for which all packets from your machine
  and destined for your own machine go.  It essentially just moves the
  packet off the Tx queue and onto the Rx queue.

  pi2.c - Ottawa Amateur Radio Club PI and PI2 interface.

  plip.c - Parallel Line Internet Protocol, allows two computers to send
  packets to each other over two joined parallel ports in a point-to-
  point fashion.

  ppp.c - Point-to-Point Protocol (RFC1331), for the Transmission of
  Multi-protocol Datagrams over a Point-to-Point Link (again usually
  modems).

  slip.c - Serial Line Internet Protocol, allows two computers to send
  packets to each other over two joined serial ports (usually via
  modems) in a point-to-point fashion.

  tunnel.c - Provides an IP tunnel through which you can tunnel network
  traffic transparently across subnets

  wavelan.c - An Ethernet-like radio transceiver controlled by the Intel
  82586 coprocessor which is used on other ethercards such as the Intel
  EtherExpress.


  6.  Cables, Coax, Twisted Pair

  If you are starting a network from scratch, you will have to decide
  whether to use thin ethernet (RG58 co-ax cable with BNC connectors) or
  10baseT (twisted pair telco-style cables with RJ-45 eight wire `phone'
  connectors).  The old-fashioned thick ethernet, RG-5 cable with N
  connectors is obsolete and rarely seen anymore.

  See ``Type of cable...'' for an introductory look at cables.  Also
  note that the FAQ from comp.dcom.lans.ethernet has a lot of useful
  information on cables and such. FTP to rtfm.mit.edu and look in
  /pub/usenet-by-hierarchy/ for the FAQ for that newsgroup.


  6.1.  Thin Ethernet (thinnet)


  Thin ethernet cable is pretty inexpensive. If you are making your own
  cables solid-core RG58A is $0.27/m. and stranded RG58AU is $0.45/m.
  Twist-on BNC connectors are < $2 ea., and other misc. pieces are
  similarly inexpensive. It is essential that you properly terminate
  each end of the cable with 50 ohm terminators, so budget $2 ea. for a
  pair. It's also vital that your cable have no `stubs' -- the `T'
  connectors must be attached directly to the ethercards.

  There are two main drawbacks to using thinnet. The first is that it is
  limited to 10Mb/sec - 100Mb/sec requires twisted pair. The second
  drawback is that if you have a big loop of machines connected
  together, and some bonehead breaks the loop by taking one cable off
  the side of his tee, the whole network goes down because it sees an
  infinite impedance (open circuit) instead of the required 50 ohm
  termination. Note that you can remove the tee piece from the card
  itself without killing the whole subnet, as long as you don't remove
  the cables from the tee itself. Of course this will disturb the
  machine that you pull the actual tee off of. 8-) And if you are doing
  a small network of two machines, you still need the tees and the 50
  ohm terminators -- you can't just cable them together!


  There are also some fancy cable systems which look like a single lead
  going to the card, but the lead is actually two runs of cable laying
  side-by-side covered by an outer sheath, giving the lead an oval
  shaped cross-section. At the turnaround point of the loop, a BNC
  connector is spliced in which connects to your card. So you have the
  equivalent of two runs of cable and a BNC T, but in this case, it is
  impossible for the user to remove a cable from one side of the T and
  disturb the network.



  6.2.  Twisted Pair


  Twisted pair networks require active hubs, which start around $50, and
  the raw cable cost can actually be higher than thinnet.  You can
  pretty much ignore claims that you can use your existing telephone
  wiring as it is a rare installation where that turns out to be the
  case.

  On the other hand, all 100Mb/sec ethernet proposals use twisted pair,
  and most new business installations use twisted pair.  Also, Russ
  Nelson adds that `New installations should use Category 5 wiring.
  Anything else is a waste of your installer's time, as 100Base-whatever
  is going to require Cat 5.'

  If you are only connecting two machines, it is possible to avoid using
  a hub, by swapping the Rx and Tx pairs (1-2 and 3-6).

  If you hold the RJ-45 connector facing you (as if you were going to
  plug it into your mouth) with the lock tab on the top, then the pins
  are numbered 1 to 8 from left to right. The pin usage is as follows:


          Pin Number              Assignment
          ----------              ----------
          1                       Output Data (+)
          2                       Output Data (-)
          3                       Input Data (+)
          4                       Reserved for Telephone use
          5                       Reserved for Telephone use
          6                       Input Data (-)
          7                       Reserved for Telephone use
          8                       Reserved for Telephone use



  If you want to make a cable, the following should spell it out for
  you.  Differential signal pairs must be on the same twisted pair to
  get the required minimal impedance/loss of a UTP cable.  If you look
  at the above table, you will see that 1+2 and 3+6 are the two sets of
  differential signal pairs. Not 1+3 and 2+6 !!!!!!  At 10MHz, with
  short lengths, you *may* get away with such errors, if it is only over
  a short length. Don't even think about it at 100MHz.

  For a normal patch cord, with ends `A' and `B', you want straight
  through pin-to-pin mapping, with the input and output each using a
  pair of twisted wires (for impedance issues). That means 1A goes to
  1B, 2A goes to 2B, 3A goes to 3B and 6A goes to 6B. The wires joining
  1A-1B and 2A-2B must be a twisted pair. Also the wires joining 3A-3B
  and 6A-6B must be another twisted pair.

  Now if you don't have a hub, and want to make a `null cable', what you
  want to do is make the input of `A' be the output of `B' and the
  output of `A' be the input of `B', without changing the polarity.  Tha
  means connecting 1A to 3B (out+ A to in+ B) and 2A to 6B (out- A to
  in- B). These two wires must be a twisted pair. They carry what
  card/plug `A' considers output, and what is seen as input for
  card/plug `B'. Then connect 3A to 1B (in+ A to out+ B) and also
  connect 6A to 2B (in- A to out- B). These second two must also be a
  twisted pair. They carry what card/plug `A' considers input, and what
  card/plug `B' considers output.

  So, if you consider a normal patch cord, chop one end off of it, swap
  the places of the Rx and Tx twisted pairs into the new plug, and crimp
  it down, you then have a `null' cable. Nothing complicated.  You just
  want to feed the Tx signal of one card into the Rx of the second and
  vice versa.

  Note that before 10BaseT was ratified as a standard, there existed
  other network formats using RJ-45 connectors, and the same wiring
  scheme as above. Examples are SynOptics's LattisNet, and AT&T's
  StarLAN.  In some cases, (as with early 3C503 cards) you could set
  jumpers to get the card to talk to hubs of different types, but in
  most cases cards designed for these older types of networks will not
  work with standard 10BaseT networks/hubs. (Note that if the cards also
  have an AUI port, then there is no reason as to why you can't use
  that, combined with an AUI to 10BaseT transceiver.)
  6.3.  Thick Ethernet

  Thick ethernet is mostly obsolete, and is usually used only to remain
  compatible with an existing implementation. You can stretch the rules
  and connect short spans of thick and thin ethernet together with a
  passive $3 N-to-BNC connector, and that's often the best solution to
  expanding an existing thicknet. A correct (but expensive) solution is
  to use a repeater in this case.

  7.  Software Configuration and Card Diagnostics


  In most cases, if the configuration is done by software, and stored in
  an EEPROM, you will usually have to boot DOS, and use the vendor
  supplied DOS program to set the cards IRQ, I/O, mem_addr and whatnot.
  Besides, hopefully it is something you will only be setting once. If
  you don't have the DOS software for your card, try looking on the WWW
  site of your card manufacturer. If you don't know the site name, take
  a guess at it, i.e. `www.my_vendor.com' where `my_vendor' is the name
  of your card manufacturer. This works for SMC, 3Com, and many many
  other manufacturers.

  There are some cards for which Linux versions of the config utils
  exist, and they are listed here.  Donald has written a few small card
  diagnostic programs that run under Linux. Most of these are a result
  of debugging tools that he has created while writing the various
  drivers. Don't expect fancy menu-driven interfaces. You will have to
  read the source code to use most of these. Even if your particular
  card doesn't have a corresponding diagnostic, you can still get some
  information just by typing cat /proc/net/dev -- assuming that your
  card was at least detected at boot.

  In either case, you will have to run most of these programs as root
  (to allow I/O to the ports) and you probably want to shut down the
  ethercard before doing so by typing ifconfig eth0 down first.


  7.1.  Configuration Programs for Ethernet Cards



  7.1.1.  WD80x3 Cards


  For people with wd80x3 cards, there is the program wdsetup which can
  be found in wdsetup-0.6a.tar.gz on Linux ftp sites.  It is not being
  actively maintained, and has not been updated for quite a while. If it
  works fine for you then great, if not, use the DOS version that you
  should have got with your card. If you don't have the DOS version, you
  will be glad to know that the SMC setup/driver disks are available at
  SMC's ftp site.  Of course, you have to have an EEPROM card to use
  this utility.  Old, old wd8003 cards, and some wd8013 clones use
  jumpers to set up the card instead.


  7.1.2.  Digital / DEC Cards


  The Digital EtherWorks 3 card can be configured in a similar fashion
  to the DOS program NICSETUP.EXE. David C. Davies wrote this and other
  tools for the EtherWorks 3 in conjunction with the driver. Look on you
  local linux FTP site in the directory
  /pub/linux/system/Network/management for the file that is named
  ewrk3tools-X.XX.tar.gz.


  7.1.3.  NE2000+ or AT/LANTIC Cards


  Some Nat Semi DP83905 implementations (such as the AT/LANTIC and the
  NE2000+) are software configurable. (Note that these cards can also
  emulate a wd8013 card!) You can get the file
  /pub/linux/setup/atlantic.c from Donald's ftp server,
  cesdis.gsfc.nasa.gov to configure this card.  In addition, the
  configuration programs for the Kingston DP83905 cards seem to work
  with all cards, as they don't check for a vendor specific address
  before allowing you to use them. Follow the following URL: Kingston
  Software <http://www.kingston.com/download/etherx/etherx.htm> and get
  20XX12.EXE and INFOSET.EXE.

  Be careful when configuring NE2000+ cards, as you can give them bad
  setting values which can cause problems. A typical example is
  accidentally enabling the boot ROM in the EEPROM (even if no ROM is
  installed) to a setting that conflicts with the VGA card. The result
  is a computer that just beeps at you when you turn it on and nothing
  appears on the screen.

  You can typically recover from this by doing the following: Remove the
  card from the machine, and then boot and enter the CMOS setup.  Change
  the `Display Adapter' to `Not Installed' and change the default boot
  drive to `A:' (your floppy drive).  Also change the `Wait for F1 if
  any Error' to `Disabled'.  This way, the computer should boot without
  user intervention.  Now create a bootable DOS floppy (`format a: /s
  /u') and copy the program default.exe from the 20XX12.EXE archive
  above onto that floppy. Then type echo default > a:autoexec.bat so
  that the program to set the card back to sane defaults will be run
  automatically when you boot from this floppy.  Shut the machine off,
  re-install the ne2000+ card, insert your new boot floppy, and power it
  back up. It will still probably beep at you, but eventually you should
  see the floppy light come on as it boots from the floppy. Wait a
  minute or two for the floppy to stop, indicating that it has finished
  running the default.exe program, and then power down your computer.
  When you then turn it on again, you should hopefully have a working
  display again, allowing you to change your CMOS settings back, and to
  change the card's EEPROM settings back to the values you want.

  Note that if you don't have DOS handy, you can do the whole method
  above with a linux boot disk that automatically runs Donald's atlantic
  program (with the right command line switches) instead of a DOS boot
  disk that automatically runs the default.exe program.


  7.1.4.  3Com Cards


  The 3Com Etherlink III family of cards (i.e. 3c5x9) can be configured
  by using another config utility from Donald.  You can get the file
  /pub/linux/setup/3c5x9setup.c from Donald's ftp server,
  cesdis.gsfc.nasa.gov to configure these cards. (Note that the DOS
  3c5x9B config utility may have more options pertaining to the new
  ``B'' series of the Etherlink III family.)



  7.2.  Diagnostic Programs for Ethernet Cards


  Any of the diagnostic programs that Donald has written can be obtained
  from this URL.

  Ethercard Diagnostics
  <ftp://cesdis.gsfc.nasa.gov/pub/linux/diag/index.html>
  Allied Telesis AT1700 -- look for the file /pub/linux/diag/at1700.c on
  cesdis.gsfc.nasa.gov.

  Cabletron E21XX -- look for the file /pub/linux/diag/e21.c on
  cesdis.gsfc.nasa.gov.

  HP PCLAN+ -- look for the file /pub/linux/diag/hp+.c on
  cesdis.gsfc.nasa.gov.

  Intel EtherExpress -- look for the file /pub/linux/diag/eexpress.c on
  cesdis.gsfc.nasa.gov.

  NE2000 cards -- look for the file /pub/linux/diag/ne2k.c on
  cesdis.gsfc.nasa.gov.  There is also a PCI version for the now common
  NE2000-PCI clones.

  RealTek (ATP) Pocket adaptor -- look for the file /pub/linux/diag/atp-
  diag.c on cesdis.gsfc.nasa.gov.

  All Other Cards -- try typing cat /proc/net/dev and dmesg to see what
  useful info the kernel has on the card in question.


  8.  Technical Information


  For those who want to understand a bit more about how the card works,
  or play with the present drivers, or even try to make up their own
  driver for a card that is presently unsupported, this information
  should be useful. If you do not fall into this category, then perhaps
  you will want to skip this section.


  8.1.  Programmed I/O vs. Shared Memory vs. DMA


  If you can already send and receive back-to-back packets, you just
  can't put more bits over the wire. Every modern ethercard can receive
  back-to-back packets. The Linux DP8390 drivers (wd80x3, SMC-Ultra,
  3c503, ne2000, etc) come pretty close to sending back-to-back packets
  (depending on the current interrupt latency) and the 3c509 and AT1500
  hardware have no problem at all automatically sending back-to-back
  packets.

  The ISA bus can do 5.3MB/sec (42Mb/sec), which sounds like more than
  enough for 10Mbps ethernet. In the case of the 100Mbps cards, you
  clearly need a faster bus to take advantage of the network bandwidth.


  8.1.1.  Programmed I/O (e.g. NE2000, 3c509)


  Pro: Doesn't use any constrained system resources, just a few I/O
  registers, and has no 16M limit.

  Con: Usually the slowest transfer rate, the CPU is waiting the whole
  time, and interleaved packet access is usually difficult to
  impossible.


  8.1.2.  Shared memory (e.g. WD80x3, SMC-Ultra, 3c503)


  Pro: Simple, faster than programmed I/O, and allows random access to
  packets. Where possible, the linux drivers compute the checksum of
  incoming IP packets as they are copied off the card, resulting in a
  further reduction of CPU usage vs. an equivalent PIO card.

  Con: Uses up memory space (a big one for DOS users, essentially a non-
  issue under Linux), and it still ties up the CPU.


  8.1.3.  Slave (normal) Direct Memory Access (e.g. none for Linux!)


  Pro: Frees up the CPU during the actual data transfer.

  Con: Checking boundary conditions, allocating contiguous buffers, and
  programming the DMA registers makes it the slowest of all techniques.
  It also uses up a scarce DMA channel, and requires aligned low memory
  buffers.


  8.1.4.  Bus Master Direct Memory Access (e.g. LANCE, DEC 21040)


  Pro: Frees up the CPU during the data transfer, can string together
  buffers, can require little or no CPU time lost on the ISA bus.  Most
  of the bus-mastering linux drivers now use a `copybreak' scheme where
  large packets are put directly into a kernel networking buffer by the
  card, and small packets are copied by the CPU which primes the cache
  for subsequent processing.

  Con: (Only applicable to ISA bus cards) Requires low-memory buffers
  and a DMA channel for cards. Any bus-master will have problems with
  other bus-masters that are bus-hogs, such as some primitive SCSI
  adaptors. A few badly-designed motherboard chipsets have problems with
  bus-masters. And a reason for not using any type of DMA device is
  using a 486 processor designed for plug-in replacement of a 386: these
  processors must flush their cache with each DMA cycle. (This includes
  the Cx486DLC, Ti486DLC, Cx486SLC, Ti486SLC, etc.)



  8.2.  Writing a Driver


  The only thing that one needs to use an ethernet card with Linux is
  the appropriate driver. For this, it is essential that the
  manufacturer will release the technical programming information to the
  general public without you (or anyone) having to sign your life away.
  A good guide for the likelihood of getting documentation (or, if you
  aren't writing code, the likelihood that someone else will write that
  driver you really, really need) is the availability of the Crynwr (nee
  Clarkson) packet driver. Russ Nelson runs this operation, and has been
  very helpful in supporting the development of drivers for Linux. Net-
  surfers can try this URL to look up Russ' software.

  Russ Nelson's Packet Drivers <http://www.crynwr.com/crynwr/home.html>

  Given the documentation, you can write a driver for your card and use
  it for Linux (at least in theory).  Keep in mind that some old
  hardware that was designed for XT type machines will not function very
  well in a multitasking environment such as Linux. Use of these will
  lead to major problems if your network sees a reasonable amount of
  traffic.

  Most cards come with drivers for MS-DOS interfaces such as NDIS and
  ODI, but these are useless for Linux. Many people have suggested
  directly linking them in or automatic translation, but this is nearly
  impossible. The MS-DOS drivers expect to be in 16 bit mode and hook
  into `software interrupts', both incompatible with the Linux kernel.
  This incompatibility is actually a feature, as some Linux drivers are
  considerably better than their MS-DOS counterparts. The `8390' series
  drivers, for instance, use ping-pong transmit buffers, which are only
  now being introduced in the MS-DOS world.

  (Ping-pong Tx buffers means using at least 2 max-size packet buffers
  for Tx packets. One is loaded while the card is transmitting the
  other. The second is then sent as soon as the first finished, and so
  on. In this way, most cards are able to continuously send back-to-back
  packets onto the wire.)

  OK. So you have decided that you want to write a driver for the Foobar
  Ethernet card, as you have the programming information, and it hasn't
  been done yet. (...these are the two main requirements ;-) You should
  start with the skeleton network driver that is provided with the Linux
  kernel source tree. It can be found in the file
  /usr/src/linux/drivers/net/skeleton.c in all recent kernels.  Also
  have a look at the Kernel Hackers Guide, at the following URL: KHG
  <http://www.redhat.com:8080/HyperNews/get/khg.html>



  8.3.  Driver interface to the kernel


  Here are some notes on the functions that you would have to write if
  creating a new driver. Reading this in conjunction with the above
  skeleton driver may help clear things up.



  8.3.1.  Probe


  Called at boot to check for existence of card. Best if it can check
  un-obtrsively by reading from memory, etc. Can also read from I/O
  ports. Initial writing to I/O ports in a probe is not good as it may
  kill another device.  Some device initialization is usually done here
  (allocating I/O space, IRQs,filling in the dev->??? fields etc.)  You
  need to know what io ports/mem the card can be configured to, how to
  enable shared memory (if used) and how to select/enable interrupt
  generation, etc.


  8.3.2.  Interrupt handler


  Called by the kernel when the card posts an interrupt.  This has the
  job of determining why the card posted an interrupt, and acting
  accordingly. Usual interrupt conditions are data to be rec'd, transmit
  completed, error conditions being reported. You need to know any
  relevant interrupt status bits so that you can act accordingly.


  8.3.3.  Transmit function


  Linked to dev->hard_start_xmit() and is called by the kernel when
  there is some data that the kernel wants to put out over the device.
  This puts the data onto the card and triggers the transmit. You need
  to know how to bundle the data and how to get it onto the card (shared
  memory copy, PIO transfer, DMA?) and in the right place on the card.
  Then you need to know how to tell the card to send the data down the
  wire, and (possibly) post an interrupt when done.  When the hardware
  can't accept additional packets it should set the dev->tbusy flag.
  When additional room is available, usually during a transmit-complete
  interrupt, dev->tbusy should be cleared and the higher levels informed
  with mark_bh(INET_BH).


  8.3.4.  Receive function


  Called by the kernel interrupt handler when the card reports that
  there is data on the card. It pulls the data off the card, packages it
  into a sk_buff and lets the kernel know the data is there for it by
  doing a netif_rx(sk_buff). You need to know how to enable interrupt
  generation upon Rx of data, how to check any relevant Rx status bits,
  and how to get that data off the card (again sh mem, PIO, DMA, etc.)


  8.3.5.  Open function


  linked to dev->open and called by the networking layers when somebody
  does ifconfig eth0 up - this puts the device on line and enables it
  for Rx/Tx of data. Any special initialization incantations that were
  not done in the probe sequence (enabling IRQ generation, etc.)  would
  go in here.


  8.3.6.  Close function (optional)


  This puts the card in a sane state when someone does ifconfig eth0
  down.  It should free the IRQs and DMA channels if the hardware
  permits, and turn off anything that will save power (like the
  transceiver).


  8.3.7.  Miscellaneous functions


  Things like a reset function, so that if things go south, the driver
  can try resetting the card as a last ditch effort.  Usually done when
  a Tx times out or similar. Also a function to read the statistics
  registers of the card if so equipped.


  8.4.  Technical information from 3Com


  If you are interested in working on drivers for 3Com cards, you can
  get technical documentation from 3Com. Cameron has been kind enough to
  tell us how to go about it below:

  3Com's Ethernet Adapters are documented for driver writers in our
  `Technical References' (TRs). These manuals describe the programmer
  interfaces to the boards but they don't talk about the diagnostics,
  installation programs, etc that end users can see.

  The Network Adapter Division marketing department has the TRs to give
  away. To keep this program efficient, we centralized it in a thing
  called `CardFacts.' CardFacts is an automated phone system. You call
  it with a touch-tone phone and it faxes you stuff. To get a TR, call
  CardFacts at 408-727-7021. Ask it for Developer's Order Form, document
  number 9070. Have your fax number ready when you call. Fill out the
  order form and fax it to 408-764-5004.  Manuals are shipped by Federal
  Express 2nd Day Service.

  There are people here who think we are too free with the manuals, and
  they are looking for evidence that the system is too expensive, or
  takes too much time and effort.  So far, 3Com customers have been
  really good about this, and there's no problem with the level of
  requests we've been getting. We need your continued cooperation and
  restraint to keep it that way.


  8.5.  Notes on AMD PCnet / LANCE Based cards


  The AMD LANCE (Local Area Network Controller for Ethernet) was the
  original offering, and has since been replaced by the `PCnet-ISA'
  chip, otherwise known as the 79C960.  Note that the name `LANCE' has
  stuck, and some people will refer to the new chip by the old name.
  Dave Roberts of the Network Products Division of AMD was kind enough
  to contribute the following information regarding this chip:

  `Functionally, it is equivalent to a NE1500. The register set is
  identical to the old LANCE with the 1500/2100 architecture additions.
  Older 1500/2100 drivers will work on the PCnet-ISA.  The NE1500 and
  NE2100 architecture is basically the same.  Initially Novell called it
  the 2100, but then tried to distinguish between coax and 10BASE-T
  cards. Anything that was 10BASE-T only was to be numbered in the 1500
  range. That's the only difference.

  Many companies offer PCnet-ISA based products, including HP, Racal-
  Datacom, Allied Telesis, Boca Research, Kingston Technology, etc.  The
  cards are basically the same except that some manufacturers have added
  `jumperless' features that allow the card to be configured in
  software. Most have not. AMD offers a standard design package for a
  card that uses the PCnet-ISA and many manufacturers use our design
  without change.  What this means is that anybody who wants to write
  drivers for most PCnet-ISA based cards can just get the data-sheet
  from AMD. Call our literature distribution center at (800)222-9323 and
  ask for the Am79C960, PCnet-ISA data sheet. It's free.

  A quick way to understand whether the card is a `stock' card is to
  just look at it. If it's stock, it should just have one large chip on
  it, a crystal, a small IEEE address PROM, possibly a socket for a boot
  ROM, and a connector (1, 2, or 3, depending on the media options
  offered). Note that if it's a coax card, it will have some transceiver
  stuff built onto it as well, but that should be near the connector and
  away from the PCnet-ISA.'

  A note to would-be card hackers is that different LANCE
  implementations do `restart' in different ways. Some pick up where
  they left off in the ring, and others start right from the beginning
  of the ring, as if just initialised.


  8.6.  Multicast and Promiscuous Mode


  Another one of the things Donald has worked on is implementing
  multicast and promiscuous mode hooks.  All of the released (i.e. not
  ALPHA) ISA drivers now support promiscuous mode.

  Donald writes: `I'll start by discussing promiscuous mode, which is
  conceptually easy to implement. For most hardware you only have to set
  a register bit, and from then on you get every packet on the wire.
  Well, it's almost that easy; for some hardware you have to shut the
  board (potentially dropping a few packet), reconfigure it, and then
  re-enable the ethercard.  OK, so that's easy, so I'll move on
  something that's not quite so obvious: Multicast. It can be done two
  ways:


  1. Use promiscuous mode, and a packet filter like the Berkeley packet
     filter (BPF). The BPF is a pattern matching stack language, where
     you write a program that picks out the addresses you are interested
     in. Its advantage is that it's very general and programmable. Its
     disadvantage is that there is no general way for the kernel to
     avoid turning on promiscuous mode and running every packet on the
     wire through every registered packet filter. See ``The Berkeley
     Packet Filter'' for more info.


  2. Using the built-in multicast filter that most etherchips have.

  I guess I should list what a few ethercards/chips provide:



          Chip/card  Promiscuous  Multicast filter
          ----------------------------------------
          Seeq8001/3c501  Yes     Binary filter (1)
          3Com/3c509      Yes     Binary filter (1)
          8390            Yes     Autodin II six bit hash (2) (3)
          LANCE           Yes     Autodin II six bit hash (2) (3)
          i82586          Yes     Hidden Autodin II six bit hash (2) (4)



  1. These cards claim to have a filter, but it's a simple yes/no
     `accept all multicast packets', or `accept no multicast packets'.

  2. AUTODIN II is the standard ethernet CRC (checksum) polynomial. In
     this scheme multicast addresses are hashed and looked up in a hash
     table. If the corresponding bit is enabled, this packet is
     accepted. Ethernet packets are laid out so that the hardware to do
     this is trivial -- you just latch six (usually) bits from the CRC
     circuit (needed anyway for error checking) after the first six
     octets (the destination address), and use them as an index into the
     hash table (six bits -- a 64-bit table).


  3. These chips use the six bit hash, and must have the table computed
     and loaded by the host. This means the kernel must include the CRC
     code.


  4. The 82586 uses the six bit hash internally, but it computes the
     hash table itself from a list of multicast addresses to accept.

  Note that none of these chips do perfect filtering, and we still need
  a middle-level module to do the final filtering. Also note that in
  every case we must keep a complete list of accepted multicast
  addresses to recompute the hash table when it changes.


  8.7.  The Berkeley Packet Filter (BPF)


  The general idea of the developers is that the BPF functionality
  should not be provided by the kernel, but should be in a (hopefully
  little-used) compatibility library.

  For those not in the know: BPF (the Berkeley Packet Filter) is an
  mechanism for specifying to the kernel networking layers what packets
  you are interested in. It's implemented as a specialized stack
  language interpreter built into a low level of the networking code. An
  application passes a program written in this language to the kernel,
  and the kernel runs the program on each incoming packet. If the kernel
  has multiple BPF applications, each program is run on each packet.

  The problem is that it's difficult to deduce what kind of packets the
  application is really interested in from the packet filter program, so
  the general solution is to always run the filter. Imagine a program
  that registers a BPF program to pick up a low data-rate stream sent to
  a multicast address.  Most ethernet cards have a hardware multicast
  address filter implemented as a 64 entry hash table that ignores most
  unwanted multicast packets, so the capability exists to make this a
  very inexpensive operation. But with the BPF the kernel must switch
  the interface to promiscuous mode, receive _all_ packets, and run them
  through this filter. This is work, BTW, that's very difficult to
  account back to the process requesting the packets.


  9.  Networking with a Laptop/Notebook Computer


  There are several ways to put your laptop on a network.  You can use
  the SLIP code (and run at serial line speeds); you can get a notebook
  with a supported PCMCIA slot built-in; you can get a laptop with a
  docking station and plug in an ISA ethercard; or you can use a
  parallel port Ethernet adapter.


  9.1.  Using SLIP


  This is the cheapest solution, but by far the most difficult. Also,
  you will not get very high transmission rates. Since SLIP is not
  really related to ethernet cards, it will not be discussed further
  here. See the NET-2 Howto.



  9.2.  PCMCIA Support


  Try and determine exactly what hardware you have (ie. card
  manufacturer, PCMCIA chip controller manufacturer) and then ask on the
  LAPTOPS channel. Regardless, don't expect things to be all that
  simple.  Expect to have to fiddle around a bit, and patch kernels,
  etc.  Maybe someday you will be able to type `make config' 8-)

  At present, the two PCMCIA chipsets that are supported are the
  Databook TCIC/2 and the intel i82365.

  There is a number of programs on tsx-11.mit.edu in
  /pub/linux/packages/laptops/ that you may find useful. These range
  from PCMCIA Ethercard drivers to programs that communicate with the
  PCMCIA controller chip. Note that these drivers are usually tied to a
  specific PCMCIA chip (ie. the intel 82365 or the TCIC/2)

  For NE2000 compatible cards, some people have had success with just
  configuring the card under DOS, and then booting linux from the DOS
  command prompt via loadlin.

  Things are looking up for Linux users that want PCMCIA support, as
  substantial progress is being made. Pioneering this effort is David
  Hinds. His latest PCMCIA support package can be obtained from:

  PCMCIA Package <ftp://cb-iris.stanford.edu/pub/pcmcia>


  Look for a file like pcmcia-cs-X.Y.Z.tgz where X.Y.Z will be the
  latest version number. This is most likely uploaded to the
  tsx-11.mit.edu FTP site as well.

  Note that Donald's PCMCIA enabler works as a user-level process, and
  David Hinds' is a kernel-level solution.  You may be best served by
  David's package as it is much more widely used and under continuous
  development.


  9.3.  ISA Ethercard in the Docking Station.


  Docking stations for laptops typically cost about $250 and provide two
  full-size ISA slots, two serial and one parallel port. Most docking
  stations are powered off of the laptop's batteries, and a few allow
  adding extra batteries in the docking station if you use short ISA
  cards. You can add an inexpensive ethercard and enjoy full-speed
  ethernet performance.


  9.4.  Pocket / parallel port adaptors.


  The `pocket' ethernet adaptors may also fit your need.  Note that the
  transfer speed will not be all that great (perhaps 200kB/s tops?) due
  to the limitations of the parallel port interface.

  Also most tie you down with a wall-brick power supply.  You can
  sometimes avoid the wall-brick with the adaptors by buying or making a
  cable that draws power from the laptop's keyboard port. (See
  ``keyboard power'')

  See ``DE-600 / DE-620'' and ``RealTek'' for two supported pocket
  adaptors.



  10.  Miscellaneous.


  Any other associated stuff that didn't fit in anywhere else gets
  dumped here. It may not be relevant, and it may not be of general
  interest but it is here anyway.


  10.1.  Passing Ethernet Arguments to the Kernel


  Here are two generic kernel commands that can be passed to the kernel
  at boot time (ether and reserve).  This can be done with LILO,
  loadlin, or any other booting utility that accepts optional arguments.

  For example, if the command was `blah' and it expected 3 arguments
  (say 123, 456, and 789) then, with LILO, you would use:

  LILO: linux blah=123,456,789

  For more information on (and a complete list of) boot time arguments,
  please see the BootPrompt-HOWTO
  <http://metalab.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html>



  10.1.1.  The ether  command


  The ether= argument is used in conjunction with drivers that are
  directly built into the kernel. The ether= argument will have
  absolutely no effect on a modular driver.  In its most generic form,
  it looks something like this:


       ether=IRQ,BASE_ADDR,PARAM_1,PARAM_2,NAME


  All arguments are optional.  The first non-numeric argument is taken
  as the NAME.

  IRQ: Obvious.  An IRQ value of `0' (usually the default) means to
  autoIRQ.  It's a historical accident that the IRQ setting is first
  rather than the base_addr -- this will be fixed whenever something
  else changes.

  BASE_ADDR: Also obvious.  A value of `0' (usually the default) means
  to probe a card-type-specific address list for an ethercard.

  PARAM_1: It was orginally used as an override value for the memory
  start for a shared-memory ethercard, like the WD80*3.  Some drivers
  use the low four bits of this value to set the debug message level.  0
  -- default, 1-7 -- level 1..7, (7 is maximum verbosity)  8 -- level 0
  (no messages). Also, the LANCE driver uses the low four bits of this
  value to select the DMA channel.  Otherwise it uses auto-DMA.

  PARAM_2: The 3c503 driver uses this to select between the internal and
  external transceivers.  0 -- default/internal, 1 -- AUI external.  The
  Cabletron E21XX card also uses the low 4 bits of PARAM_2 to select the
  output media. Otherwise it detects automatically.

  NAME: Selects the network device the values refer to.  The standard
  kernel uses the names `eth0', `eth1', `eth2' and `eth3' for bus-
  attached ethercards, and `atp0' for the parallel port `pocket'
  ethernet adaptor. The arcnet driver uses `arc0' as its name.  The
  default setting is for a single ethercard to be probed for as `eth0'.
  Multiple cards can only be enabled by explicitly setting up their base
  address using these LILO parameters.  The 1.0 kernel has LANCE-based
  ethercards as a special case.  LILO arguments are ignored, and LANCE
  cards are always assigned `eth<n>' names starting at `eth0'.
  Additional non-LANCE ethercards must be explicitly assigned to
  `eth<n+1>', and the usual `eth0' probe disabled with something like
  `ether=0,-1,eth0'.  ( Yes, this is bug. )


  10.1.2.  The reserve  command


  This next lilo command is used just like `ether=' above, ie. it is
  appended to the name of the boot select specified in lilo.conf


       reserve=IO-base,extent{,IO-base,extent...}


  In some machines it may be necessary to prevent device drivers from
  checking for devices (auto-probing) in a specific region. This may be
  because of poorly designed hardware that causes the boot to freeze
  (such as some ethercards), hardware that is mistakenly identified,
  hardware whose state is changed by an earlier probe, or merely
  hardware you don't want the kernel to initialize.

  The reserve boot-time argument addresses this problem by specifying an
  I/O port region that shouldn't be probed. That region is reserved in
  the kernel's port registration table as if a device has already been
  found in that region. Note that this mechanism shouldn't be necessary
  on most machines. Only when there is a problem or special case would
  it be necessary to use this.

  The I/O ports in the specified region are protected against device
  probes. This was put in to be used when some driver was hanging on a
  NE2000, or misidentifying some other device as its own.  A correct
  device driver shouldn't probe a reserved region, unless another boot
  argument explicitly specifies that it do so.  This implies that
  reserve will most often be used with some other boot argument. Hence
  if you specify a reserve region to protect a specific device, you must
  generally specify an explicit probe for that device. Most drivers
  ignore the port registration table if they are given an explicit
  address.

  For example, the boot line


       LILO: linux  reserve=0x300,32  ether=0,0x300,eth0


  keeps all device drivers except the ethercard drivers from probing
  0x300-0x31f.

  As usual with boot-time specifiers there is an 11 parameter limit,
  thus you can only specify 5 reserved regions per reserve keyword.
  Multiple reserve specifiers will work if you have an unusually
  complicated request.


  10.2.  Using the Ethernet Drivers as Modules


  Most of the linux distributions now ship kernels that have very few
  drivers built-in.  The drivers are instead supplied as a bunch of
  independent dynamically loadable modules.  These modular drivers are
  typically loaded by the administrator with the modprobe(8) command, or
  in some cases they are automatically loaded by the kernel through
  `kerneld' (in 2.0) or `kmod' (in 2.1) which then calls modprobe.

  You particular distribution may offer nice graphical configuration
  tools for setting up ethernet modules. If possible you should try and
  use them first. The description that follows here gives information on
  what underlies any fancy configuration program, and what these
  programs change.

  The information that controls what modules are to be used and what
  options are supplied to each module is usually stored in the file
  /etc/conf.modules.  The two main options of interest (for ethernet
  cards) that will be used in this file are alias and options.  The
  modprobe command consults this file for module information.

  The actual modules themselves are typically stored in a directory
  named /lib/modules/`uname -r`/net where the uname -r command gives the
  kernel version (e.g. 2.0.34).  You can look in there to see which
  module matches your card.

  The first thing you need in your conf.modules file is something to
  tell modprobe what driver to use for the eth0 (and eth1 and...)
  network interface.  You use the alias command for this.  For example,
  if you have an ISA SMC EtherEZ card which uses the smc-ultra.o driver
  module, you need to alias this driver to eth0 by adding the line:

          alias eth0 smc-ultra



  The other thing you may need is an options line indicating what
  options are to be used with a particular module (or module alias).
  Continuing with the above example, if you only used the single alias
  line with no options line, the kernel would warn you (see dmesg) that
  autoprobing for ISA cards is not a good idea.  To get rid of this
  warning, you would add another line telling the module what I/O base
  the card is configured to, in this case say the hexidecimal address
  0x280 for example.


          options smc-ultra io=0x280



  Most ISA modules accept parameters like io=0x340 and irq=12 on the
  insmod command line. It is REQUIRED or at least STRONGLY ADVISED that
  you supply these parameters to avoid probing for the card. Unlike PCI
  and EISA devices, there is no real safe way to do auto-probing for
  most ISA devices, and so it should be avoided when using drivers as
  modules.

  A list of all the options that each module accepts can be found in the
  file:

  /usr/src/linux/Documentation/networking/net-modules.txt

  It is recommended that you read that to find out what options you can
  use for your particular card.  Note that some modules support comma
  separated value lists for modules that have the capability to handle
  multiple devices from a single module, such as all the 8390 based
  drivers, and the PLIP driver.  For exmple:


  ______________________________________________________________________
          options 3c503 io=0x280,0x300,0x330,0x350 xcvr=0,1,0,1
  ______________________________________________________________________



  The above would have the one module controlling four 3c503 cards, with
  card 2 and 4 using external transcievers. Don't put spaces around the
  `=' or commas.

  Also note that a busy module can't be removed. That means that you
  will have to ifconfig eth0 down  (shut down the ethernet card) before
  you can remove the module(s).

  The command lsmod will show you what modules are loaded, whether they
  are in use, and rmmod will remove them.


  10.3.  Related Documentation


  Much of this info came from saved postings from the comp.os.linux
  groups, which shows that it is a valuable resource of information.
  Other useful information came from a bunch of small files by Donald
  himself. Of course, if you are setting up an Ethernet card, then you
  will want to read the NET-2 Howto so that you can actually configure
  the software you will use.  Also, if you fancy yourself as a bit of a
  hacker, you can always scrounge some additional info from the driver
  source files as well. There is usually a paragraph or two in there
  describing any important points before any actual code starts..

  For those looking for information that is not specific in any way to
  Linux (i.e. what is 10BaseT, what is AUI, what does a hub do, etc.)  I
  strongly recommend making use of the newsgroup comp.dcom.lans.ethernet
  and/or comp.sys.ibm.pc.hardware.networking.  Newsgroup archives such
  as those at dejanews.com can also be an invaluable source of
  information.  You can grab the newsgroup FAQ from RTFM (which holds
  all the newsgroup FAQs) at the following URL:

  Usenet FAQs <ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/>

  You can also have a look at the `Ethernet-HomePage' so to speak, which
  is at the following URL:

  Ethernet-HomePage <http://wwwhost.ots.utexas.edu/ethernet/ethernet-
  home.html>



  10.4.  Disclaimer and Copyright


  This document is not gospel. However, it is probably the most up to
  date info that you will be able to find. Nobody is responsible for
  what happens to your hardware but yourself. If your ethercard or any
  other hardware goes up in smoke (...nearly impossible!)  we take no
  responsibility. ie. THE AUTHORS ARE NOT RESPONSIBLE FOR ANY DAMAGES
  INCURRED DUE TO ACTIONS TAKEN BASED ON THE INFORMATION INCLUDED IN
  THIS DOCUMENT.

  This document is Copyright (c) 1993-1997 by Paul Gortmaker.
  Permission is granted to make and distribute verbatim copies of this
  manual provided the copyright notice and this permission notice are
  preserved on all copies.

  Permission is granted to copy and distribute modified versions of this
  document under the conditions for verbatim copying, provided that this
  copyright notice is included exactly as in the original, and that the
  entire resulting derived work is distributed under the terms of a
  permission notice identical to this one.

  Permission is granted to copy and distribute translations of this
  document into another language, under the above conditions for
  modified versions.

  A hint to people considering doing a translation.  First, translate
  the SGML source (available via FTP from the HowTo main site) so that
  you can then generate other output formats.  Be sure to keep a copy of
  the original English SGML source that you translated from! When an
  updated HowTo is released, get the new SGML source for that version,
  and then a simple diff -u old.sgml new.sgml will show you exactly what
  has changed so that you can easily incorporate those changes into your
  translated SMGL source without having to re-read or re-translate
  everything.

  If you are intending to incorporate this document into a published
  work, please make contact (via e-mail) so that you can be supplied
  with the most up to date information available. In the past, out of
  date versions of the Linux HowTo documents have been published, which
  caused the developers undue grief from being plagued with questions
  that were already answered in the up to date versions.



  10.5.  Closing


  If you have found any glaring typos, or outdated info in this
  document, please send an e-mail. It is big, and it is easy to overlook
  stuff. If you have e-mailed about a change, and it hasn't been
  included in the next version, please don't hesitate to send it again,
  as it might have got lost amongst the usual sea of SPAM and junk mail
  I get.

  Thanks!

  Paul Gortmaker, p_gortmaker@yahoo.com



  Filesystems HOWTO
  Martin Hinner <mhi@penguin.cz>
  Version 0.7.4, 17 March 2000

  This small HOWTO is about filesystems and accessing filesystems. It is
  not Linux- or Unix-related document as you probably expect. You can
  find there also a lot of interesting information about non-Unix
  (file)systems, but Unix is my primary interest :-)
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Copyright
     1.2 Filesystems mailing-list
        1.2.1 Linux kernel filesystems mailing-list
        1.2.2 FreeBSD filesystems mailing-list
     1.3 Filesystems collection at metalab.unc.edu
     1.4 Credits
     1.5 Filesystems accessibility map
     1.6 Introduction to contiguous allocation filesystems
     1.7 Introduction to linked-list allocation filesystems
     1.8 Introduction to FAT-based filesystems
     1.9 Introduction to Inode filesystems
     1.10 Introduction to extent filesystems
     1.11 Introduction to filesystems using balanced trees
     1.12 Introduction to logging/journaling filesystems
     1.13 Other filesystem features
        1.13.1 Quota
        1.13.2 Snapshot
        1.13.3 ACLs

  2. Volumes

     2.1 PC Partitions
        2.1.1 GNU parted
        2.1.2 Repairing corrupted partition table
           2.1.2.1 Fixdisktable
           2.1.2.2 gpart
           2.1.2.3 rescuept
           2.1.2.4 findsuper
     2.2 Other partitions
        2.2.1 ADFS partitions
        2.2.2 Amiga partitions
        2.2.3 ATARI partitions
        2.2.4 Macintosh partitions
        2.2.5 OSF partitions
        2.2.6 Sun partitions
        2.2.7 Ultrix partitions
     2.3 Unix disklabels
        2.3.1 BSD disklabel
        2.3.2 UnixWare disklabel
        2.3.3 SCO OpenServer disklabel
        2.3.4 Sun Solaris disklabel
     2.4 Windows NT volumes
        2.4.1 Repairing "fault tolerant" NTFS disks using FTEdit
     2.5 MD - Multiple Devices driver for Linux
     2.6 LVM - Logical Volume Manager (HP-UX LVM?)
     2.7 VxVM - Veritas Volume Manager
     2.8 IBM OS/2 LVM
     2.9 StackVM
     2.10 Novell NetWare volumes

  3. DOS FAT 12/16/32, VFAT

     3.1 VFAT: Long filenames
     3.2 UMSDOS: Linux LFN/attributes on FAT filesystem
     3.3 OS/2 Extended Attributes on FAT filesystems
     3.4 Star LFN
     3.5 Accessing VFAT from OS/2 (VFAT-OS2)
     3.6 Accessing VFAT from DOS (LFNDOS driver)
     3.7 Accessing VFAT from DOS (Free LFNDOS driver)
     3.8 Accessing VFAT from DOS (Odi's LFN tools)
     3.9 Accessing FAT32 from OS/2 (FAT32.IFS)
     3.10 Accessing FAT32 from Windows NT 4.0
     3.11 Accessing FAT32 from Windows NT 4.0
     3.12 Accessing Stac/Dblspaced/Drvspaced drives from Linux (DMSDOS)
     3.13 Accessing Dblspaced/Drvspaced drives from Linux (thsfs)
     3.14 Fsresize - FAT16/32 resizer
     3.15 FIPS - FAT16 resizer

  4. High Performance FileSystem (HPFS)

     4.1 Accessing HPFS from DOS (iHPFS)
     4.2 Accessing HPFS from DOS (hpfsdos)
     4.3 Accessing HPFS from DOS (hpfsa)
     4.4 Accessing HPFS from DOS (amos)
     4.5 Accessing HPFS from Linux
     4.6 Accessing HPFS from FreeBSD
     4.7 Accessing HPFS from Windows NT 3.5
     4.8 Accessing HPFS from Windows NT 4

  5. New Technology FileSystem (NTFS)

     5.1 Accessing NTFS from DOS (NTFSDOS.EXE)
     5.2 Accessing NTFS from DOS (ntpwd)
     5.3 Accessing NTFS from OS/2
     5.4 Accessing NTFS from Linux
     5.5 Accessing NTFS from FreeBSD and NetBSD
     5.6 Accessing NTFS from BeOS
     5.7 Accessing NTFS from BeOS (another)
     5.8 Repairing NTFS using NTFSDOS Tools
     5.9 Repairing NTFS using NTRecover

  6. Extended filesystems (Ext, Ext2, Ext3)

     6.1 Extended filesystem (ExtFS)
     6.2 Second Extended Filesystem (Ext2 FS)
        6.2.1 Motivations
        6.2.2 ``Standard'' Ext2fs features
        6.2.3 ``Advanced'' Ext2fs features
        6.2.4 Physical Structure
        6.2.5 Performance optimizations
     6.3 Third Extended Filesystem (Ext3 FS)
     6.4 E2compr - Ext2fs transparent compression
     6.5 Accessing Ext2 from DOS (Ext2 tools)
     6.6 Accessing Ext2 from DOS, Windows 9x/NT and other Unixes (LTools)
     6.7 Accessing Ext2 from OS/2
     6.8 Accessing Ext2 from Windows 95/98 (FSDEXT2)
     6.9 Accessing Ext2 from Windows 95 (Explore2fs)
     6.10 Accessing Ext2 from Windows NT (ext2fsnt)
     6.11 Accessing Ext2 from BeOS
     6.12 Accessing Ext2 from MacOS (MountX)
     6.13 Accessing Ext2 from MiNT
     6.14 Ext2fs defrag
     6.15 Ext2fs resize
     6.16 Ext2end
     6.17 Repairing/analyzing/creating Ext2 using E2fsprogs
     6.18 Ext2 filesystem editor - Ext2ed
     6.19 Linux filesystem editor - lde
     6.20 Ext2 undelete utilities

  7. Macintosh Hierarchical Filesystem - HFS

     7.1 Accessing HFS from Linux
     7.2 Accessing HFS from OS/2 (HFS/2)
     7.3 Accessing HFS from Windows 95/98/NT (HFV Explorer)
     7.4 Accessing HFS from DOS (MAC-ETTE)
     7.5 HFS utils
     7.6 MacFS: A Portable Macintosh File System Library

  8. ISO 9660 - CD-ROM filesystem

     8.1 RockRidge extensions
     8.2 Joliet extensions
     8.3 Hybrid CD-ROMs
     8.4 Physical formats
        8.4.1 CD-DA - Audio CDs
        8.4.2 Data CDs
        8.4.3 Recordable CDs
           8.4.3.1 CD-MO - Magneto-optical
           8.4.3.2 CD-WO - Write-once
           8.4.3.3 CD-RW - Rewritable CDs
        8.4.4 CD Extra - eXtended Architecture
           8.4.4.1 MODE-1
           8.4.4.2 MODE-2
              8.4.4.2.1 FORM-1
              8.4.4.2.2 FORM-2
        8.4.5 Video CD
     8.5 Accessing Joliet from Linux
     8.6 Accessing Joliet from BeOS
     8.7 Accessing Joliet from OS/2
     8.8 Accessing Audio CD as filesystem from BeOS
     8.9 Creating Hybrid CD-ROMs (mkhybrid)

  9. Other filesystems

     9.1 ADFS - Acorn Disc File System
     9.2 AFFS - Amiga fast filesystem
     9.3 BeFS - BeOS filesystem
     9.4 BFS - UnixWare Boot Filesystem
     9.5 CrosStor filesystem
     9.6 DTFS - Desktop filesystem
     9.7 EFS - Enhanced filesystem (Linux)
     9.8 EFS - Extent filesystem (IRIX)
        9.8.1 EFS and UFS library, libfs
     9.9 FFS - BSD Fast filesystem
     9.10 GPFS - General Parallel Filesystem
     9.11 HFS - HP-UX Hi performance filesystem
     9.12 HTFS - High throughput filesystem
     9.13 JFS - Journaled filesystem (HP-UX, AIX, OS/2 5)
     9.14 LFS - Linux log structured filesystem
     9.15 MFS - Macintosh filesystem
     9.16 Minix filesystem
     9.17 NWFS - Novell NetWare filesystem
        9.17.1 NetWare filesystem / 286
        9.17.2 NetWare filesystem / 386
        9.17.3 Accessing NWFS-386 from Linux
     9.18 NSS - Novell Storage Services
     9.19 ODS - On Disk Structure filesystem
     9.20 QNX filesystem
     9.21 Reiser filesystem
     9.22 RFS (CD-ROM Filesystem)
     9.23 RomFS - Rom filesystem
     9.24 SFS - Secure filesystem
     9.25 Spiralog filesystem (OpenVMS)
     9.26 System V and derived filesystems
        9.26.1 AFS - Acer Fast Filesystem
        9.26.2 EAFS - Extended Acer Fast Filesystem
        9.26.3 Coherent filesystem
        9.26.4 S5
        9.26.5 S51K - SystemV 1K
        9.26.6 Version 7 filesystem
        9.26.7 Xenix filesystem
     9.27 Text - (Philips' CD-ROM Filesystem)
     9.28 UDF - Universal Disk Format (DVD-ROM filesystem)
     9.29 UFS
     9.30 VxFS - Veritas filesystem (HP-UX, SCO UnixWare, Solaris)
        9.30.1 VxTools
     9.31 XFS - Extended filesystem (IRIX)
     9.32 Xia FS

  10. Raw partitions

  11. Appendix

     11.1 Network filesystems
        11.1.1 AFS - Andrew Filesystem
        11.1.2 CODA
        11.1.3 NFS - Network filesystem (Unix)
        11.1.4 NCP - NetWare Core Protocol (Novell NetWare)
        11.1.5 SMB - Session Message Block (Windows 3.x/9x/NT)
     11.2 Encrypted filesystems
        11.2.1 CFS
        11.2.2 TCFS
        11.2.3 SFS
        11.2.4 VS3FS: Steganographic File System for Linux
     11.3 Writing your own filesystem driver
        11.3.1 DOS
        11.3.2 OS/2
        11.3.3 Windows NT
     11.4 Related documents


  ______________________________________________________________________

  1.  Introduction


  The Filesystems HOWTO is about filesystems and accessing filesystems
  from various OS. Although this document has been put together to the
  best of my knowledge, it may and probably does contain mistakes.
  Please if you find some mistake or outdated information, let me know.
  I will try to keep this document up to date and as error free as
  possible. Any contributions are also welcome, so if you want to write
  anything about filesystems, please contact me via e-mail.


  Before you read this HOWTO it's recommended to read Stein Gjoen's
  Disk-HOWTO (you can obtain it from
  <http://sunsite.unc.edu/LDP/HOWTO/> ).


  This HOWTO can be obtained from  <http://penguin.cz/~mhi/fs/> or
  <http://metalab.unc.edu/filesystems/howto/>.


  If you are Japanese user, you might be interested that FUJIWARA
  Teruyoshi translated this HOWTO to Japanese.  It is available at
  <http://www.linux.or.jp/JF/JFdocs/Filesystems-HOWTO.html>.  SGML
  source file can be downloaded from
  <ftp://ftp.linet.gr.jp/pub/JF/sgml/Filesystems-HOWTO.sgml.gz>.



  1.1.  Copyright


  The Filesystems HOWTO, Copyright (c) 1999 Martin Hinner
  <mhi@penguin.cz>.

  This HOWTO is free document; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
  Free Software Foundation; either version 2 of the License, or (at your
  option) any later version.


  This HOWTO is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  General Public License for more details.


  You should have received a copy of the GNU General Public License
  along with this document or GNU CC; if not, write to the: Free
  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.



  1.2.  Filesystems mailing-list

  You may want to join Filesystems mailing list. It's intended to be a
  good source of information for both end-users and developers. So if
  you have anything to do with filesystems, join ;-) To subscribe send
  email to <majordomo@penguin.cz> and in the BODY (not the subject) of
  the email message put (without quotes): "subscribe fs-l".



  1.2.1.  Linux kernel filesystems mailing-list

  To join Linux kernel filesystems mailing list linux-
  fsdev@vger.rutgers.edu, send e-mail to listserv@vger.rutgers.edu. Put
  "subscribe linux-fsdev" in message body.



  1.2.2.  FreeBSD filesystems mailing-list

  To join techical FreeBSD filesystems mailing list freebsd-
  fs@FreeBSD.org, send e-mail to majordomo@FreeBSD.org. Put "subscribe
  freebsd-fs" in message body.



  1.3.  Filesystems collection at metalab.unc.edu

  Filesystems collection is FTP/WWW site providing useful information
  about filesystems and filesystem-related programs and drivers. It
  lives at <http://metalab.unc.edu/filesystems/>, or FTP-only at
  <ftp://metalab.unc.edu/pub/docs/filesystems/>.



  1.4.  Credits


  The original "Filesystems access HOWTO" was written by Georgatos
  Photis (see his homepage at  <http://students.ceid.upatras.gr/~gef/>).
  This HOWTO contains a lot of information from his webpage. Thanks,
  Gef.


  FUJIWARA Teruyoshi <fujiwara@linux.or.jp> translated this HOWTO to
  Japanese.



  Other people who have contributed or helped me (directly or
  indirectly) with this HOWTO are, in alphabetical order:

  o  Remy Card <card@masi.ibp.fr> - Ext2 filesystem introduction

  o  Peter A. Dinda <pdinda@cs.cmu.edu> - HFS filesystem description

  o  Alfonso De Gregorio <adg@speedcom.it> - TCFS filesystem info

  o  Radek Machacka <radekm@sco.com> - Thanks for SCO UnixWare and SCO
     OpenServer

  o  Peter Todd <retep2@home.com> - SFS filesystem info

  o  Theodore Ts'o <tytso@mit.edu> - Ext2 filesystem introduction

  o  Stephen Tweedie <sct@dcs.ed.ac.uk> - Ext2 filesystem introduction

     Many thanks to the above people. If I have forgotten anyone, please
     let me know.



  1.5.  Filesystems accessibility map

  This is filesystem accessibility "map", alphabetically ordered by
  operating system. You may find this list a little bit chaotic. It's
  because Linux sgmltools don't know tables.

  YOU SEE THAT THIS `MAP' IS NOT STILL COMPLETE.  I WILL TRY TO FINISH
  IT IN THE NEAR FUTURE.


  FreeBSD: ``BSD FFS'' | ``Ext2'' | ``HPFS'' | ``NTFS''


  Linux: ``AFFS''| ``BeFS''| ``BFS''| ``Ext2 FS''| ``BSD FFS''|
  ``HPFS''| ``Qnx4 FS''| ``Xia''


  NetBSD: ``BSD FFS'' | ``FAT12/16'' | ``ISO9660''


  NetWare 2.x: ``NWFS-286''


  NetWare 3.x, 4.x: ``NWFS-386'' | ``ISO9660''


  NetWare 5.x: ``NWFS-386'' | ``NSS'' | ``ISO9660''


  OpenBSD: ``BSD FFS'' | ``FAT12/16''


  OS/2: ``Ext2 FS'' | ``FAT12/16/32'' | ``HPFS'' | ``HPFS'' | ``ISO
  9660'' | ``JFS'' | ``VFAT''


  QNX 4: ``FAT12/16'' | ``ISO 9660'' | ``Qnx4 FS''


  SCO OpenServer: ``AFS''| ``DTFS''| ``EAFS''| ``HTFS''| ``ISO 9660'' |
  ``S51K''


  SCO UnixWare: ``BFS''| ``DTFS''| ``ISO 9660'' | ``System V''| ``VxFS''



  1.6.  Introduction to contiguous allocation filesystems



  Some contiguous filesystems: ``BFS'', ``ISO9660 and extensions''.


  1.7.  Introduction to linked-list allocation filesystems



  1.8.  Introduction to FAT-based filesystems

  (todo)

  Some FAT filesystems: ``FAT12/16/32, VFAT'' and ``NetWare filestem''.


  1.9.  Introduction to Inode filesystems

  (todo)


  1.10.  Introduction to extent filesystems

  (todo)

  Some 'extent' filesystems: ``EFS'' and ``VxFS''.


  1.11.  Introduction to filesystems using balanced trees

  (todo)

  Some filesystems which use B+ trees: ``HFS'', ``NSS'', ``Reiser FS''
  and ``Spiralog filesystem''.


  1.12.  Introduction to logging/journaling filesystems


  File systems update their structural information (called metadata) by
  synchronous writes. Each metadata update may require many separate
  writes, and if the system crashes during the write sequence, metadata
  may be in inconsistent state.

  At the next boot the filesystem check utility (called fsck) must walk
  through the metadata structures, examining and repairing them.  This
  operation takes a very very long time on large filesystems.  And the
  disk may not contain sufficient information to correct the structure.
  This results in misplaced or removed files.


  A journaling file system uses a separate area called a log or journal.
  Before metadata changes are actually performed, they are logged to
  this separate area. The operation is then performed. If the system
  crashes during the operation, there is enough information in the log
  to "replay" the log record and complete the operation.

  This approach does not require a full scan of the file system,
  yielding very quick filesystem check time on large file systems,
  generally a few seconds for a multiple-gigabyte file system. In
  addition, because all information for the pending operation is saved,
  no removals or lost-and-found moves are required. Disadvantage of
  journaling filesystems is that they are slower than other filesystems.


  Some journaling filesystems: ``BeFS'', ``HTFS'', ``JFS'', ``NSS'',
  ``Spiralog filesystem'', ``VxFS'' and ``XFS''.


  1.13.  Other filesystem features



  1.13.1.  Quota



  1.13.2.  Snapshot



  1.13.3.  ACLs



  2.  Volumes



  2.1.  PC Partitions



  o  <http://www.win.tue.nl/~aeb/partitions/> Partition types document
     by Andries Brouwer <aeb@cwi.nl>


  2.1.1.  GNU parted


  o  Homepage:  <www.alphalink.com.au/~clausen/parted/>

  o  Download:  <ftp://ftp.gnu.org/gnu/parted/>

  o  Authors: Andrew Clausen <clausen@alphalink.com.au>, Lennert
     Buytenhek <buytenh@dsv.nl> and Matt Wilson <msw@redhat.com>.

  o  Bug reports: <bug-parted@gnu.org>,

  o  Access: varies for each filesystem, see below.

  o  License: GPL

     GNU parted can create, destroy, resize, copy and move partitions,
     and the filesystems on them.  It currently supports ``Ext2'',
     ``FAT16'', ``FAT32'' and Linux-swap.


  Filesystem      detect  create  resize  copy    check
  ext2            *               *               *1
  fat             *       *       *2      *2      *
  linux-swap      *       *       *       *


  NOTES:


  1 Limited checking is done when the filesystem is opened.  This is the
  only checking at the moment.  All commands (including resize) will
  gracefully fail, leaving the filesystem in tact, if there is are any
  errors in the file system (and the vast majority of errors in
  general).


  2 The size of the new partition, after resizing or copying, is
  restricted by the cluster size. This is worse than you think, because
  you don't get to choose your cluster size (it's a bug in Windows, and
  you want compatibility, right?).



  2.1.2.  Repairing corrupted partition table



  2.1.2.1.  Fixdisktable


  o  Homepage:  <http://bmrc.berkeley.edu/people/chaffee/fat32.html>

  o  Download: ?

  o  Author: ?

  o  Access: ?

  o  License: ?

     This is a utility that handles ext2, FAT, NTFS, ufs, BSD disklabels
     (but not yet old Linux swap partitions); it actually will rewrite
     the partition table, if you give it permission.



  2.1.2.2.  gpart


  o  Homepage:  <http://home.pages.de/~michab/gpart/>

  o  Download: ?

  o  Author: ?

  o  Access: ?

  o  License: ?

     GPART is a utility that handles ext2, FAT, Linux swap, HPFS, NTFS,
     FreeBSD and Solaris/x86 disklabels, minix, reiser fs; it prints a
     proposed contents for the primary partition table, and is well-
     documented.


  2.1.2.3.  rescuept


  o  Homepage: util-linux ?

  o  Download: ?

  o  Author: ?

  o  Access: ?

  o  License: ?

     Recognizes ext2 superblocks, FAT partitions, swap partitions, and
     extended partition tables; it may also recognize BSD disklabels and
     Unixware 7 partitions.  It prints out information that can be used
     with fdisk or sfdisk to reconstruct the partition table.  It is in
     the non-installed part of the util-linux distribution.


  2.1.2.4.  findsuper


  o  Homepage: e2progs ?

  o  Download: ?

  o  Author: ?

  o  Access: ?

  o  License: ?

     Small utility that finds blocks with the ext2 superblock signature,
     and prints out location and some info.  It is in the non-installed
     part of the e2progs distribution.



  2.2.  Other partitions

  Because I use only Intel x86 machines, any contributions (or non-x86
  machine donation ;-) ) are very welcome. If you can provide any useful
  information, don't hesitate to mail me.



  2.2.1.  ADFS partitions



  2.2.2.  Amiga partitions



  2.2.3.  ATARI partitions



  2.2.4.  Macintosh partitions



  2.2.5.  OSF partitions



  2.2.6.  Sun partitions



  2.2.7.  Ultrix partitions



  2.3.  Unix disklabels

  (todo)


  2.3.1.  BSD disklabel

  (todo)


  2.3.2.  UnixWare disklabel

  UnixWare VTOC (Volume Table Of Contents) divides disk partition to 16
  logical partitions. Linux kernel supports UnixWare VTOC, you must
  check "UnixWare slices support (EXPERIMENTAL)" and recompile your
  kernel.  Another way of reading UnixWare disklabel is using GPL port
  of prtvtoc(1) command, which is in ``vxtools'' package.


  2.3.3.  SCO OpenServer disklabel

  (todo)


  2.3.4.  Sun Solaris disklabel

  (todo)



  2.4.  Windows NT volumes



  o  Homepage:  <http://www.penguin.cz/~mhi/fs/vol/>

  o  Author: Martin Hinner <mhi@penguin.cz>

  o  Access: Read-only, supports OS/2 Volumes, Windows NT Stripe sets
     and volumes.

  o  Download:  <ftp://ftp.penguin.cz/pub/users/mhi/vol/>

  o  License: GPL

     This linux-kernel driver allows you to access and mount linear and
     stripe set volumes.


  2.4.1.  Repairing "fault tolerant" NTFS disks using FTEdit


  o  Homepage:  ? MS ARTICLE ID: Q131658

  o  Download:  <ftp://ftp.rhrz.uni-
     bonn.de/pub/pc/winnt/intel/ftedit.zip>

  o  Author: Microsoft Corp.

  o  License: ?

     If you have a Windows NT Workstation or Server configured for fault
     tolerant (FT) partitions (such as stripes with parity and volume
     sets), and those partitions are inaccessible and appear in Disk
     Administrator as type Unknown, you can possibly make them
     accessible again by using the utility FTEDIT.



  2.5.  MD - Multiple Devices driver for Linux



  o  Homepage:?

  o  Author: Marc Zyngier <maz@wild-wind.fr.eu.org>

  o  Access: Read-write, supports linear mode, RAID-1, RAID-4 and
     RAID-5.

  o  Download: Linux kernel, tools are available at <ftp://sweet-
     smoke.ufr-info-p7.ibp.fr/public/Linux/>

  o  License: GPL

     This driver lets you combine several hard disk partitions into one
     logical block device. This can be used to simply append one
     partition to another one or to combine several redundant hard disks
     to a RAID1/4/5 device so as to provide protection against hard disk
     failures. This is called "Software RAID" since the combining of the
     partitions is done by the kernel.



  2.6.  LVM - Logical Volume Manager (HP-UX LVM?)

  Linux implementation is available here:


  o  Homepage:  <http://linux.msede.com/lvm/>

  o  Author: Heinz Mauelshagen <mauelsha@ez-darmstadt.telekom.de>

  o  Access: ?

  o  Download:  <ftp://linux.msede.com/lvm/v0.6/>

  o  License: GPL



  2.7.  VxVM - Veritas Volume Manager


  For more information about Veritas Volume Manager see
  <http://www.veritas.com/>.

  See also: ``VxFS (Veritas Journaling Filesystem)''.



  2.8.  IBM OS/2 LVM

  Logical Volume Manager is available in OS/2 WarpServer 5. It allows
  you to create linear volumes on several disks/partitions. Some people
  say that it's compatible with IBM AIX Logical Volume Manager.


  See also: ``HPFS'', ``JFS''



  2.9.  StackVM


  StackVM is CrosStor's volume manager. Using StackVM the administrator
  can combine multiple physical disk slices into a single logical device
  know as a vdisk. Vdisk is short for virtual disk. The physical disks
  can be combined to form a concatenation, RAID 0 (stripe), RAID 1
  (mirror), RAID 4 or RAID 5. In addition a single disk partition can be
  subdivided into multiple simple vdisks. For more information see
  CrosStor homepage at  <http://www.crosstor.com/>.



  2.10.  Novell NetWare volumes

  NetWare volumes are used for NWFS-386 filesystem.



  3.  DOS FAT 12/16/32, VFAT



  3.1.  VFAT: Long filenames

  Windows 95/98 and Windows NT/2000 store long filenames on FAT in
  special directory entries with set attributes ReadOnly, Hidden, System
  and Volume, so if you access FAT volume from DOS you don't see these
  "files". These special entries have this mad structure:


  byte              sequence number for slot
  string(10)        first 5 characters in name
  byte              attribute byte
  byte              always 0
  byte              checksum for 8.3 alias
  string(12)        6 more characters in name
  word              starting cluster number, 0 in long slots
  string(4)         last 2 characters in name



  Problem occur when you delete or modify file with long name from
  system without VFAT support, because only DOS 8+3 entry will be
  deleted or modified. Scandisk from Windows 95/98 can repair this
  problem.



  3.2.  UMSDOS: Linux LFN/attributes on FAT filesystem

  Linux has it's own FAT extensions which gives you long filenames,
  permissions and owners, links and special devices on FAT partition,
  called UMSDOS.  Each directory contains file named "--linux-.---".
  There are stored long names and other necessary fields. For more
  information see file
  /usr/src/linux/Documentation/filesystems/umsdos.txt. Author of Linux
  umsdos driver is Jacques Gelinas <jacques@solucorp.qc.ca> and it is
  currently maintained by Matija Nalis <mnalis@jagor.srce.hr>.



  3.3.  OS/2 Extended Attributes on FAT filesystems

  OS/2 Warp version 3,4 and 5 stores long filenames and extended
  attributes on FAT volume in files "\ea data. sf" and "\wp root. sf"
  (both files are in root directory of filesystem). AFAIK there is no
  known implementation of OS/2 EAs for any other OS. If you can supply
  any information about EA structure, don't hesitate to mail them to me.



  3.4.  Star LFN

  Star LFN is an emulator that allows programs, running under DOS 4.0 or
  above, to use the long filename functions present in Windows'95 DOS
  boxes. Currently, it can only read and write long filenames from and
  into a system+hidden file, which means you can't either read or write
  real Windows'95 long filenames. For more information see
  <http://c64.rulez.org/~sta/starlfn.html>.



  3.5.  Accessing VFAT from OS/2 (VFAT-OS2)


  o  Homepage:  <http://www.dsteiner.com/products/software/os2/ifs.htm>

  o  Author: Daniel Steiner <info@dsteiner.com>

  o  Access: Read-Write, no EAs supported.

  o  Mirror:  <ftp://hobbes.nmsu.edu/pub/os2/system/drivers/filesys/>

  o  License: GPL

     VFAT-OS2 is a package that will allow OS/2 to seamlessly access
     Windows 95 VFAT formatted partitions from OS/2 as if they were
     standard OS/2 drive letters. The ultimate aim of this package is to
     be able to use the VFAT file system as a replacement of FAT. It can
     now also access NTFS partitions in read-only mode.


  3.6.  Accessing VFAT from DOS (LFNDOS driver)

  Some people say that Microsoft has released a driver called LFNDOS
  that provides the Microsoft Long Filename API under DOS. If you know
  where can this driver be downloaded, send me e-mail please.


  3.7.  Accessing VFAT from DOS (Free LFNDOS driver)


  o  Homepage:  <http://members.xoom.com/dosuser/>

  o  Author: Chris Jones <dosuser@bigfoot.com>

  o  Access: Read-Write

  o  Mirror:
     <http://www.simtel.net/pub/simtelnet/msdos/fileutil/lfnds106.zip>
  o  License: Free, source code available

     LFNDOS provides the Windows95 Long Filename (LFN) API to DOS
     programs.  It uses the same format for storing the names on disk as
     Windows95 does, so you can view and use long filenames under both
     systems interchangeably. It runs as a memory-resident program, and
     while resident requires about 60k of conventional memory.


  Under Windows95, a DOS program can use long filenames by calling a set
  of interrupt functions, which Windows provides. For example,
  COMMAND.COM will allow long filenames when run as a DOS Prompt from
  Windows, but not if you restart in MS-DOS mode. Other programs such as
  EDIT.COM and all DJGPP programs use long filenames if available.


  3.8.  Accessing VFAT from DOS (Odi's LFN tools)


  o  Homepage:  <http://odi.webjump.com/>

  o  Author: Ortwin Glueck <glueck@freesurf.ch>

  o  Access: Read-Write, only DOS utilities

  o  Mirror:
     <http://www.simtel.net/pub/simtelnet/msdos/fileutil/lfn141.zip>

  o  License: ?

     These tools provide easy file management under DOS with long
     filenames created by Windows 95/98 on FAT32, FAT16 and FAT12 file
     systems.  Typing LDIR brings up the directory with its long
     filenames. Copying a file with LCOPY preserves long filenames.  You
     can even create directories (LMD) with long names or rename files
     (LREN) with long names.



  3.9.  Accessing FAT32 from OS/2 (FAT32.IFS)


  o  Homepage:  <http://www.os2ss.com/information/kelder/index.html>

  o  Author: Henks Kelder < hkelder@capgemini.nl >

  o  Access: Read-Write, long filenames, no EAs support.

  o  Download:  <http://www.os2ss.com/information/kelder/os2fat32.zip>

  o  License: Free

     FAT32.IFS for OS/2 will allow you to access FAT32 partitions from
     OS/2. You cannot create FAT32 partitions, you'll still need Win95
     OSR2 to do that.  Also, OS/2s CHKDSK cannot fix all possible errors
     that can occur, you'll have to use Windows 95 Scandisk to fix
     certain errors.


  3.10.  Accessing FAT32 from Windows NT 4.0


  o  Download:  <http://www.chat.ru/~ashedel/fat32/fastfat32.rar>

  o  Author: Anonymous

  o  License: Free or GPL ?

     FAT32 filesystem driver for NT 4.0 and NT 3.51.



  3.11.  Accessing FAT32 from Windows NT 4.0


  o  Homepage:  <http://www.sysinternals.com/fat32.htm>

  o  Author: Mark Russinovich <mark@sysinternals.com> and Bryce Cogswell
     <cogswell@winternals.com>.

  o  Access: Read-only in free version, RW in commercial.

  o  Download: ?

  o  License: Free(read-only) or Commercial(read-write)

     This is a FAT32 file system driver for Windows NT(R) 4.0. Once
     installed, any FAT32 drives present on your system will be fully
     accessible as native Windows NT volumes. Free version provides
     read-only capabilities. A read/write version is for sale.


  3.12.

  Accessing Stac/Dblspaced/Drvspaced drives from Linux (DMSDOS)


  o  Homepage:  <http://fb9nt.uni-
     duisburg.de/mitarbeiter/gockel/software/dmsdos/>

  o  Author: Frank Gockel <gockel@sent13.uni-duisburg.de> and Pavel Pisa
     <pisa@cmp.felk.cvut.cz>

  o  Access: Stacker, Dblspace and Drvspace in Read-Write mode, long
     filenames.

  o  Download:  <ftp://fb9nt.uni-duisburg.de/pub/linux/dmsdos/>

  o  Freshmeat: Console/Filesystems

  o  License: GPL

     DMSDOS reads and writes compressed DOS filesystems (CVF-FAT). The
     following configurations are supported:

  o  DoubleSpace / DriveSpace (MS-DOS 6.x)

  o  DoubleSpace / DriveSpace (Windows 95)

  o  DriveSpace 3 (Windows 95 with Plus! pack)

  o  Stacker 3

  o  Stacker 4

     It works with FAT32, NLS, codepages (tested with fat32 patches
     version 0.2.8 under Linux 2.0.33 and with fat32 in standard 2.1.xx
     kernels and 2.0.34+35). Dmsdos can run together with vfat or umsdos
     for long filenames. It has been redesigned to be ready for SMP and
     should now compile completely under libc6.


  3.13.

  Accessing Dblspaced/Drvspaced drives from Linux (thsfs)


  o  Download:  <ftp://ftp.ai-lab.fh-
     furtwangen.de/pub/os/linux/local/thsfs.tgz>

  o  Author: Thomas Scheuermann <ths@ai-lab.fh-furtwangen.de>

  o  Access: Dblspace and Drvspace in Read-only mode.

  o  License: See copyright on files. Basically free


  3.14.  Fsresize - FAT16/32 resizer


  o  Homepage:  <http://www.alphalink.com.au/~clausen/fsresize/>

  o  Author: Andrew Clausen <clausen@alphalink.com.au>

  o  Download:
     <http://www.alphalink.com.au/~clausen/fsresize-0.8.tar.gz>

  o  Freshmeat: Console/Filesystems

  o  Access: Read/Write, full FAT16/FAT32 support

  o  License: GPL

     Resizes FAT16/FAT32 filesystems.  It doesn't require any other
     programs (like a defrager).  It has --backup and --restore options,
     so if there's a power failure, (or a bug), you can always go back.
     The backup files are usually < 1 meg.


  The author  probably won't be releasing any more versions of fsresize,
  because he is working on parted - a Partition Magic clone. It will be
  able to resize, copy, create and check filesystems/partitions.



  3.15.  FIPS - FAT16 resizer


  o  Homepage: ?

  o  Author: Arno Schaefer <schaefer@rbg.informatik.th-darmstadt.de>

  o  Download:
     <ftp://sunsite.unc.edu/pub/Linux/system/Install/fips01alpha.tar.z>

  o  License: GPL


  4.  High Performance FileSystem (HPFS)


  Good HPFS links:

  o  <ftp://ftp.leo.org/pub/comp/os/os2/leo/doc/hpfsinf.zip>

  o  <ftp://hobbes.nmsu.edu/pub/os2/info/tips/hpfs.zip>


  o  <http://www.globalxs.nl/home/c/cyborg/index.html> - a good page
     about HPFS accessibility

  o  <http://www-4.ibm.com/software/os/warp/warp-server/warp-server-
     adv/c2j.html> - IBM OS/2 Warp Server : Features & Benefits : File &
     Print



  4.1.  Accessing HPFS from DOS (iHPFS)


  o  Homepage: <http://www.student.nada.kth.se/~f96-bet/ihpfs/>

  o  Author: Marcus Better Marcus.Better@abc.se

  o  Download:
     <http://www.student.nada.kth.se/~f96-bet/ihpfs/ihpfs128.zip>

  o  Access: Read-only

  o  License: GPL

  iHPFS makes possible for OS/2 users to use their HPFS partitions when
  they boot plain DOS.  The HPFS partition is assigned a drive letter,
  and can be accessed like any DOS drive.iHPFS is restricted to read-
  only access.


  This program is no longer being developed, because author doesn't use
  OS/2. If you are willing to maintain the program, let him know.


  4.2.  Accessing HPFS from DOS (hpfsdos)


  o  Homepage: ?

  o  Author: Robert Muchsel <rmuchsel@iiic.ethz.ch> (this e-mail doesn't
     work)

  o  Access: Read-only

  o  License: Shareware ($23)



  4.3.  Accessing HPFS from DOS (hpfsa)


  o  Homepage:  <http://www.student.informatik.th-
     darmstadt.de/~akinzler/>

  o  Author: Andreas Kinzler <akinzler@rbg.informatik.th-darmstadt.de>
     (this email doesn't work)

  o  Download: <ftp://ftp.cdrom.com/.1/os2/mdos/hpfsa102.zip>

  o  Access: Read/Write

  o  License: Shareware ($40)



  4.4.  Accessing HPFS from DOS (amos)


  o  Homepage: ?

  o  Author:  Allan Mertner <mertner@login.dknet.dk> (this email doesn't
     work)

  o  Download:  <ftp://hobbes.nmsu.edu/pub/dos/amos320.zip>

  o  License: Shareware ($50)


  4.5.  Accessing HPFS from Linux


  o  Homepage:
     <http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi>

  o  Download:
     <http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/hpfs-0.99b.tar.gz>
     for 2.0 kernels; and
     <http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/hpfs-1.98b.tar.gz>
     for 2.2 kernels

  o  Author: Mikulas Patocka < mikulas@artax.karlin.mff.cuni.cz >

  o  Access: Read-Write, extended attributes, long names.

  o  License: GPL

     This driver is part of Linux kernel (2.1.x+). It can read and write
     to HPFS partions. Access rights and owner can be stored in extended
     attributes. Few bugs in original read-only HPFS are corrected.  It
     supports HPFS386 on Warp Server Advanced.


  If you have kernel with HPFS support, say "Y"es to 'OS/2 HPFS
  filesystem support' in Filesystems submenu. Then recompile kernel
  using 'make dep bzImage', reboot and try to mount your HPFS partition
  (e.g. mount /dev/hda2 /mnt -t hpfs).


  4.6.  Accessing HPFS from FreeBSD


  o  Homepage:  <http://iclub.nsu.ru/~semen/>

  o  Download:  <http://iclub.nsu.ru/~semen/hpfs/hpfs-0.3b.tar.gz>

  o  Author: Semen A. Ustimenko < semenu@FreeBSD.org >

  o  Access: Read/Only

  o  License: BSD

     Driver allows to mount HPFS volume into Unix namespace.  ReadOnly
     access is only supported for now.


  4.7.  Accessing HPFS from Windows NT 3.5


  o  Homepage: <http://www.htc.net/~nbehnken/>


  o  Download: <http://www.htc.net/~nbehnken/hpfs_nt.zip>

  o  Author: Chris Behnken < nbehnken@htc.net >

  o  License: Freeware

     This program will edit the Windows NT registry and enable HPFS
     support.  Pinball.sys is the HPFS filesystem driver for Windows NT.
     It can be found on NT 3.5x's CD-ROM.  Microsoft no longer supports
     HPFS.  Installing this program will void your warranty and possibly
     the license agreement.


  4.8.  Accessing HPFS from Windows NT 4


  o  Download: <ftp://hobbes.nmsu.edu/pub/windows/hpfsnt.zip>

  o  Author: ?

  o  License: ?

     HPFS driver for Windows NT 4.0



  5.  New Technology FileSystem (NTFS)


  References:

  o  <http://www.microsoft.com/msj/1198/ntfs/ntfstop.htm> NTFS 5
     information

  o  Rajeev Nagar, Windows NT File System Internals (O'Reilly).

  o  Helen Custer, Inside the Windows NT File System, ISBN:
     1-55615-660-X.

  o  NTFS documentation by Regis Duchesne <regis@via.ecp.fr>,
     <http://www.via.ecp.fr/~regis/ntfs.tar.bz2> or
     <http://celine.via.ecp.fr/~regis/ntfs/new>

  o  Microsoft TechNet, February 97, Windows NT Training: Support, NTFS

  o  <http://www.stat.math.ethz.ch/~maechler/NTFS-docu>


  5.1.  Accessing NTFS from DOS (NTFSDOS.EXE)


  o  Homepage: http://www.sysinternals.com/ntfs20.htm

  o  Authors: Mark Russinovich <mark@sysinternals.com> and Bryce
     Cogswell <cogswell@winternals.com>.

  o  Access: Read-only, Long filenames under DOS 7 and Win9x.

     NTFSDOS.EXE is a network file system redirector for DOS/Windows
     that is able to recognize and mount NTFS drives for transparent
     access.  It makes NTFS drives appear indistinguishable from
     standard FAT drives, providing the ability to navigate, view and
     execute programs on them from DOS or from Windows, including from
     the Windows 3.1 File Manager and Windows 95 Explorer.

  5.2.  Accessing NTFS from DOS (ntpwd)


  o  Homepage:  <http://www.esiea.fr/public_html/Christophe.GRENIER/>

  o  Author: Grenier Christophe < grenier@nef.esiea.fr  >

  o  Access: Read-only (rw experimental), long filenames supported, no
     driver letter (dos tools)

  o  License: GPL

  NTPwd contains command line tools to access NTFS partition, it'a a Dos
  port of the driver used by Linux. It contains too a little utility to
  change NT password.



  5.3.  Accessing NTFS from OS/2


  o  Homepage:  <http://www.dsteiner.com/products/software/os2/ifs.htm>

  o  Mirror:  <ftp://ftp-
     os2.nmsu.edu/pub/os2/system/drivers/filesys/ntfs_003.zip>,
     <ftp://ftp.leo.org/pub/comp/os/os2/leo/drivers/ifs>

  o  Author: Daniel Steiner < info@dsteiner.com >

  o  Access: Read-only, Long filenames supported

     ntfs_003.zip archive contains only command line tools to acccess a
     NTFS partition in OS/2. A true IFS for accessing NTFS is included
     in ``VFAT-OS2'' v0.05.


  5.4.  Accessing NTFS from Linux


  o  Homepage:  <http://www.informatik.hu-berlin.de/~loewis/ntfs/>

  o  Author: Martin von Lwis loewis@informatik.hu-berlin.de

  o  Freshmeat: Console/Filesystems

  o  Homepage:  <http://www.informatik.hu-berlin.de/~loewis/ntfs/ntfs-
     current.tgz>

  o  Mirror: Included in official Linux kernel

  o  Access: RO, experimental RW, compression, no encryption

  o  License: GPL

     Works both as a kernel driver, as well as a set of command line
     utilities.


  5.5.  Accessing NTFS from FreeBSD and NetBSD


  o  Homepage:  <http://iclub.nsu.ru/~semen/ntfs/>

  o  Author: Semen A. Ustimenko <semenu@FreeBSD.org
     <mailto:semenu@FreeBSD.org>>

  o  Download: As part of FreeBSD (
     <ftp://ftp.FreeBSD.org/pub/FreeBSD/>), and NetBSD (
     <ftp://ftp.NetBSD.org/pub/NetBSD/>)

  o  Mirror: Lookup for FreeBSD's and NetBSD's mirrors

  o  Access: Read + limited writing, doesn't support codepages

  o  License: BSD

     Driver allows to mount NTFS volumes under FreeBSD and NetBSD. We
     also support limited writing ability: you can write into not
     comressed files without holes, but you can't change the size of
     file yet. Write support was made to swap on NTFS volume.


  5.6.  Accessing NTFS from BeOS


  o  Homepage:  <http://www.cs.tamu.edu/people/tkg0143/be/>

  o  Author: Travis Geiselbrecht < geist@tamu.edu >

  o  Download:
     <http://www.cs.tamu.edu/people/tkg0143/be/downloads/ntfs-0.05-x86-r4.zip>

  o  Access: ?

  o  License: Free

     This is a ALPHA version of a NTFS driver for BeOS. It is not the
     most polished thing in the world, but every release that author
     puts out is more stable than the last. He just implemented
     compressed file reads, so be careful with those.  He also finally
     worked with NTFS 5 volumes, and managed to root out a few bugs.


  Author now works for Be Inc, so you will not see his NTFS and ext2
  filesystem support updated on the web much more. The drivers will be
  pulled into future BeOS releases.


  5.7.  Accessing NTFS from BeOS (another)


  o  Homepage: http://www.sw.com.sg/solutions/ntfs-ro.shtml

  o  Author: Standard & Western Software, http://www.sw-soft.com

  o  Download: http://download.sw.com.sg/pub/Be/ntfs-rod-0302.tar.gz

  o  Access: Read-only.



  5.8.  Repairing NTFS using NTFSDOS Tools


  o  Homepage:   <http://www.sysinternals.com/>

  o  Author: Winternals Software <info@winternals.com>

  o  Access: Read-Write: Copy and replace files.

  o  License: Commercial

     An add-on to NTFSDOS that allows one to rename existing files, or
     to overwrite a file with new data.  Very limited functionality.



  5.9.  Repairing NTFS using NTRecover


  o  Homepage:  <http://www.sysinternals.com/>

  o  Author: Winternals Software <info@winternals.com>

  o  Access: Freeware version is read-only, commercial version is
     read/write.

  o  License: Freeware read-only version, commercial read/write version

     Uses a boot floppy and a serial connection to a second NT system to
     provide full access to a NTFS drives on dead NT systems.  Ideal for
     salvaging data or replacing drivers.


  6.  Extended filesystems (Ext, Ext2, Ext3)

  Extended filesystem (ext fs), second extended filesystem (ext2fs) and
  third extended filesystem (ext3fs) were designed and implemented on
  Linux by Rmy Card, Laboratoire MASI--Institut Blaise Pascal,
  <card@masi.ibp.fr>, Theodore Ts'o, Massachussets Institute of
  Technology, <tytso@mit.edu> and Stephen Tweedie, University of
  Edinburgh, <sct@redhat.com>



  o  <http://web.mit.edu/tytso/www/linux/ext2.html> - The ext2 homepage.
     This is the primary source of information about ext2.

  o  <http://uranus.it.swin.edu.au/~jn/explore2fs/es2fs.htm> - Document
     about ext2fs from John Newbigin.

  o  <http://www.ing.umu.se/~bosse/> - Ext2fs_Rec (ext2 recognizer for
     WinNT).



  6.1.  Extended filesystem (ExtFS)

  This is old filesystem used in early Linux systems.



  6.2.  Second Extended Filesystem (Ext2 FS)

  The Second Extended File System is probably the most widely used
  filesystem in the Linux community. It provides standard Unix file
  semantics and advanced features. Moreover, thanks to the optimizations
  included in the kernel code, it is robust and offers excellent
  performance.


  Since Ext2fs has been designed with evolution in mind, it contains
  hooks that can be used to add new features. Some people are working on
  extensions to the current filesystem: access control lists conforming
  to the Posix semantics, undelete, and on-the-fly file compression.



  Ext2fs was first developed and integrated in the Linux kernel and is
  now actively being ported to other operating systems. An Ext2fs server
  running on top of the GNU Hurd has been implemented. People are also
  working on an Ext2fs port in the LITES server, running on top of the
  Mach microkernel and in the VSTa operating system. Last, but not
  least, Ext2fs is an important part of the Masix operating system,
  currently under development by one of the authors.


  6.2.1.  Motivations

  The Second Extended File System has been designed and implemented to
  fix some problems present in the first Extended File System. Our goal
  was to provide a powerful filesystem, which implements Unix file
  semantics and offers advanced features.


  Of course, we wanted to Ext2fs to have excellent performance.  We also
  wanted to provide a very robust filesystem in order to reduce the risk
  of data loss in intensive use. Last, but not least, Ext2fs had to
  include provision for extensions to allow users to benefit from new
  features without reformatting their filesystem.



  6.2.2.  ``Standard'' Ext2fs features

  The Ext2fs supports standard Unix file types: regular files,
  directories, device special files and symbolic links.


  Ext2fs is able to manage filesystems created on really big partitions.
  While the original kernel code restricted the maximal filesystem size
  to 2 GB, recent work in the VFS layer have raised this limit to 4 TB.
  Thus, it is now possible to use big disks without the need of creating
  many partitions.


  Ext2fs provides long file names. It uses variable length directory
  entries. The maximal file name size is 255 characters. This limit
  could be extended to 1012 if needed.


  Ext2fs reserves some blocks for the super user (root). Normally, 5% of
  the blocks are reserved. This allows the administrator to recover
  easily from situations where user processes fill up filesystems.



  6.2.3.  ``Advanced'' Ext2fs features

  In addition to the standard Unix features, Ext2fs supports some
  extensions which are not usually present in Unix filesystems.


  File attributes allow the users to modify the kernel behavior when
  acting on a set of files. One can set attributes on a file or on a
  directory. In the later case, new files created in the directory
  inherit these attributes.


  BSD or System V Release 4 semantics can be selected at mount time. A
  mount option allows the administrator to choose the file creation
  semantics. On a filesystem mounted with BSD semantics, files are
  created with the same group id as their parent directory. System V
  semantics are a bit more complex: if a directory has the setgid bit
  set, new files inherit the group id of the directory and
  subdirectories inherit the group id and the setgid bit; in the other
  case, files and subdirectories are created with the primary group id
  of the calling process.


  BSD-like synchronous updates can be used in Ext2fs. A mount option
  allows the administrator to request that metadata (inodes, bitmap
  blocks, indirect blocks and directory blocks) be written synchronously
  on the disk when they are modified.  This can be useful to maintain a
  strict metadata consistency but this leads to poor performances.
  Actually, this feature is not normally used, since in addition to the
  performance loss associated with using synchronous updates of the
  metadata, it can cause corruption in the user data which will not be
  flagged by the filesystem checker.


  Ext2fs allows the administrator to choose the logical block size when
  creating the filesystem. Block sizes can typically be 1024, 2048 and
  4096 bytes. Using big block sizes can speed up I/O since fewer I/O
  requests, and thus fewer disk head seeks, need to be done to access a
  file. On the other hand, big blocks waste more disk space: on the
  average, the last block allocated to a file is only half full, so as
  blocks get bigger, more space is wasted in the last block of each
  file. In addition, most of the advantages of larger block sizes are
  obtained by Ext2 filesystem's preallocation techniques.


  Ext2fs implements fast symbolic links. A fast symbolic link does not
  use any data block on the filesystem. The target name is not stored in
  a data block but in the inode itself. This policy can save some disk
  space (no data block needs to be allocated) and speeds up link
  operations (there is no need to read a data block when accessing such
  a link). Of course, the space available in the inode is limited so not
  every link can be implemented as a fast symbolic link. The maximal
  size of the target name in a fast symbolic link is 60 characters. We
  plan to extend this scheme to small files in the near future.


  Ext2fs keeps track of the filesystem state. A special field in the
  superblock is used by the kernel code to indicate the status of the
  file system. When a filesystem is mounted in read/write mode, its
  state is set to ``Not Clean''. When it is unmounted or remounted in
  read-only mode, its state is reset to ``Clean''. At boot time, the
  filesystem checker uses this information to decide if a filesystem
  must be checked. The kernel code also records errors in this field.
  When an inconsistency is detected by the kernel code, the filesystem
  is marked as ``Erroneous''. The filesystem checker tests this to force
  the check of the filesystem regardless of its apparently clean state.


  Always skipping filesystem checks may sometimes be dangerous, so
  Ext2fs provides two ways to force checks at regular intervals. A mount
  counter is maintained in the superblock. Each time the filesystem is
  mounted in read/write mode, this counter is incremented. When it
  reaches a maximal value (also recorded in the superblock), the
  filesystem checker forces the check even if the filesystem is
  ``Clean''. A last check time and a maximal check interval are also
  maintained in the superblock. These two fields allow the administrator
  to request periodical checks. When the maximal check interval has been
  reached, the checker ignores the filesystem state and forces a
  filesystem check.


  An attribute allows the users to request secure deletion on files.
  When such a file is deleted, random data is written in the disk blocks
  previously allocated to the file. This prevents malicious people from
  gaining access to the previous content of the file by using a disk
  editor.


  Last, new types of files inspired from the 4.4 BSD filesystem have
  recently been added to Ext2fs. Immutable files can only be read:
  nobody can write or delete them. This can be used to protect sensitive
  configuration files. Append-only files can be opened in write mode but
  data is always appended at the end of the file. Like immutable files,
  they cannot be deleted or renamed. This is especially useful for log
  files which can only grow.



  6.2.4.  Physical Structure


  The physical structure of Ext2 filesystems has been strongly
  influenced by the layout of the BSD filesystem. A filesystem is made
  up of block groups. Block groups are analogous to BSD FFS's cylinder
  groups. However, block groups are not tied to the physical layout of
  the blocks on the disk, since modern drives tend to be optimized for
  sequential access and hide their physical geometry to the operating
  system.

  ,---------+---------+---------+---------+---------,
  | Boot    | Block   | Block   |   ...   | Block   |
  | sector  | group 1 | group 2 |         | group n |
  `---------+---------+---------+---------+---------'



  Each block group contains a redundant copy of crucial filesystem
  control informations (superblock and the filesystem descriptors) and
  also contains a part of the filesystem (a block bitmap, an inode
  bitmap, a piece of the inode table, and data blocks). The structure of
  a block group is represented in this table:

  ,---------+---------+---------+---------+---------+---------,
  | Super   | FS      | Block   | Inode   | Inode   | Data    |
  | block   | desc.   | bitmap  | bitmap  | table   | blocks  |
  `---------+---------+---------+---------+---------+---------'



  Using block groups is a big win in terms of reliability: since the
  control structures are replicated in each block group, it is easy to
  recover from a filesystem where the superblock has been corrupted.
  This structure also helps to get good performances: by reducing the
  distance between the inode table and the data blocks, it is possible
  to reduce the disk head seeks during I/O on files.


  In Ext2fs, directories are managed as linked lists of variable length
  entries. Each entry contains the inode number, the entry length, the
  file name and its length. By using variable length entries, it is
  possible to implement long file names without wasting disk space in
  directories.



  6.2.5.  Performance optimizations

  In Linux, the Ext2fs kernel code contains many performance
  optimizations, which tend to improve I/O speed when reading and
  writing files.


  Ext2fs takes advantage of the buffer cache management by performing
  readaheads: when a block has to be read, the kernel code requests the
  I/O on several contiguous blocks. This way, it tries to ensure that
  the next block to read will already be loaded into the buffer cache.
  Readaheads are normally performed during sequential reads on files and
  Ext2fs extends them to directory reads, either explicit reads
  (readdir(2) calls) or implicit ones (namei kernel directory lookup).


  Ext2fs also contains many allocation optimizations. Block groups are
  used to cluster together related inodes and data: the kernel code
  always tries to allocate data blocks for a file in the same group as
  its inode. This is intended to reduce the disk head seeks made when
  the kernel reads an inode and its data blocks.


  When writing data to a file, Ext2fs preallocates up to 8 adjacent
  blocks when allocating a new block. Preallocation hit rates are around
  75% even on very full filesystems. This preallocation achieves good
  write performances under heavy load. It also allows contiguous blocks
  to be allocated to files, thus it speeds up the future sequential
  reads.


  These two allocation optimizations produce a very good locality of:

  o  related files through block groups

  o  related blocks through the 8 bits clustering of block allocations.



  6.3.  Third Extended Filesystem (Ext3 FS)

  Ext3 support the same features as Ext2, but includes also Journaling.
  You can download pre- version from
  <ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/>.


  6.4.  E2compr - Ext2fs transparent compression


  o  Homepage:  <http://opensource.captech.com/e2compr/>

  o  Download:  <ftp://opensource.captech.com/e2compr/>

  o  Maintainer: Peter Moulder <reiter@netspace.net.au>

  o  Freshmeat: Console/Filesystems

  o  Access: As for ext2 (Read/Write, Long filenames)

  o  License: GPL except for compression algorithms (various licenses)

     Implements `chattr +c' for the ext2 filesystem.  Software consists
     of a patch to the linux kernel, and patched versions of various
     software (principally e2fsprogs i.e. e2fsck and friends).  Although
     some people have been relying on it for years, THIS SOFTWARE IS
     STILL IN DEVELOPMENT, AND IS NOT ,END-USER`-READY.
  6.5.  Accessing Ext2 from DOS (Ext2 tools)


  o  Download:ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ext2/

  o  Access: Read-only, no drive letters (special utilites)

  o  Author: Claus Tondering <ct@login.dknet.dk>

  o  Access: ?

  o  License: ?

     A collection of DOS programs that allow you to read a Linux ext2
     file system from DOS.


  6.6.  Accessing Ext2 from DOS, Windows 9x/NT and other Unixes (LTools)


  o  Homepage:  <http://www.it.fht-
     esslingen.de/~zimmerma/software/ltools.html>

  o  Author: Werner Zimmermann <Werner.Zimmermann@fht-esslingen.de>

  o  Homepage:  <http://www.it.fht-
     esslingen.de/~zimmerma/software/ltools.htm>

  o  Mirror:  <http://metalab.unc.edu/pub/linux/utils/dos/> (only major
     releases)

  o  Access: Read/Write/Modify, Long filenames

  o  License: GPL

     The LTOOLS are under DOS/Windows 3.x/Windows 9x/Windows NT or non-
     Linux-UNIX, what the MTOOLS are under Linux. You can access (read,
     write, modify) your Linux files when running one of the other
     operating systems. The kernel of the LTOOLS is a set of command
     line programs.  Additionally a JAVA program as a stand alone
     graphical user interface is available. Alternatively, you can use
     your standard web browser as a graphical user interface. The LTOOLS
     do not only provide access to Linux files on your own machine, but
     also remote access to files on other machines.



  6.7.  Accessing Ext2 from OS/2


  o  Homepage: <http://perso.wanadoo.fr/matthieu.willm/ext2-os2/>

  o  Author: Matthieu WILLM <willm@ibm.net> ,
     <matthieu.willm@wanadoo.fr>

  o  Download:
     <ftp://hobbes.nmsu.edu/pub/os2/system/drivers/filesys/ext2_240.zip>

  o  Freshmeat: Console/Filesystems

  o  Access: Read/Write, swapping and booting to/from ext2, removable
     media support, but NO extended attributes.

     EXT2-OS2 is a package that allows OS/2 to seamlessly access Linux
     ext2 formatted partitions from OS/2 as if they were standard OS/2
     drive letters.  The ultimate aim of this package is to be able to
     use the ext2 file system as a replacement of FAT or HPFS. For the
     moment the only lacking feature to achieve this goal is the support
     for OS/2 extended attributes.


  6.8.  Accessing Ext2 from Windows 95/98 (FSDEXT2)


  o  Homepage:http://www.yipton.demon.co.uk/

  o  Author: Peter van Sebille pvs@globalxs.nl , pese@nlnwgfsc.origin.nl

  o  Freshmeat: Console/Filesystems

  o  Access: Read-only, Long filenames supported


  6.9.  Accessing Ext2 from Windows 95 (Explore2fs)


  o  Homepage: <http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm>

  o  Access: Read/Write, Long filenames, symbolic links etc...

  o  Author: John Newbigin <jn@it.swin.edu.au>

  o  License: GPL

     A user space application which can read and write the second
     extended file system ext2.  Supports hard disks and removable
     media, including zip and floppy.  Uses a windows explorer like
     interface to show files and details.  Supports Drag& Drop, context
     menus etc.  Written for Windows NT, but has some support for
     Windows 95.  Large disks can cause problems.


  6.10.  Accessing Ext2 from Windows NT (ext2fsnt)


  o  Homepage:  <http://www.chat.ru/~ashedel/ext2fsnt/>

  o  Download:  <http://www.chat.ru/~ashedel/ext2fsnt/ext2fsnt.rar>

  o  Author: Andrey Shedel < andreys@tarzan.cr.cyco.com >

  o  License: Free

  o  Access: Read-write, LFN, Security, PageFile, Hardlinks.


  6.11.  Accessing Ext2 from BeOS


  o  Homepage:  <http://www.cs.tamu.edu/people/tkg0143/be/>

  o  Author: Travis Geiselbrecht < geist@tamu.edu >

  o  Download:
     <http://www.cs.tamu.edu/people/tkg0143/be/downloads/ext2fs-1.0.6-x86-r4.zip>
     for R4 and
     <http://www.cs.tamu.edu/people/tkg0143/be/downloads/ext2fs-1.0.3-x86-r3.zip>
     for R3.

  o  Access: Read-only, long filenames supported.


  o  License: Free

     This is a driver to allow BeOS to mount the Linux Ext2 filesystem.
     The version that is currently released author consider pretty
     stable. People have been using it for a long time, with no bug
     reports.


  Authow now works for Be Inc, so you will not see his ext2 and NTFS
  filesystem support updated on the web much more. The drivers will be
  pulled into future BeOS releases.


  6.12.  Accessing Ext2 from MacOS (MountX)


  o  Homepage:  <http://calvaweb.calvacom.fr/bh40>

  o  Author: ?

  o  Download: ?

     MacOS driver which allows you to mount ext2 filesystems (Linux and
     MkLinux) on the Macintosh.



  6.13.  Accessing Ext2 from MiNT


  o  Homepage:  <http://?>

  o  Author: <yescrew@capybara.sk-pttsc.lj.edus.si>

  o  Download: ?

  o  License: GPL

     This is a full working Ext2 filesystem driver for FreeMiNT.  It can
     read and write the actual ext2 version as implemented in Linux for
     example. The partition size is not limited and the logical sector
     size can be 1024, 2048 or 4096 bytes. The only restriction is that
     the physical sector size is smaller or equal to the logical sector
     size.  The blocksize can be configured if you initialize the
     partition with mke2fs.



  6.14.  Ext2fs defrag


  o  Download:  <ftp://ftp.uk.linux.org/pub/linux/sct/defrag/>

  o  Author: Stephen C. Tweedie < sct@redhat.com >

  o  License: GPL

     Defragments your ext2 filesystem.  Needs updated for glib
     libraries.


  6.15.  Ext2fs resize


  o  Homepage:  <http://www.dsv.nl/~buytenh/ext2resize/>

  o  Download:
     <http://www.dsv.nl/~buytenh/ext2resize/ext2resize-990617.tar.bz2>

  o  Author: Lennert Buytenhek <buytenh@dsv.nl>.

  o  License: GPL

     Resizes second extended filesystem.


  6.16.  Ext2end


  o  Homepage:  <http://linux.msede.com/ext2/ext2end.html>

  o  Maintainer: Mike Field <mafield@the.net.nz>

  o  License: Copyright Mike Field. To be GPLed once stable.

     For use with ``LVM'' Consists of 2 utilites. ext2endable
     reorganises an empty ext2 file systems to allow them to be
     extended, and ext2end that extends an unmounted ext2 file system.
     If ext2endable has not been run when the file system was created
     ext2end will only be able to extend it to the next multiple of
     256MB


  6.17.  Repairing/analyzing/creating Ext2 using E2fsprogs


  o  Homepage:  <http://web.mit.edu/tytso/www/linux/e2fsprogs.html>

  o  Authors: tytso@mit.edu and card@masi.ibp.fr

  o  Download:
     <http://sunsite.unc.edu/pub/Linux/system/Filesystems/ext2/e2fsprogs-1.06.tar.gz>

  o  Windows NT port:  <http://www.chat.ru/~ashedel/ext2fsnt/>

  o  Freshmeat: Console/Filesystems

  o  License: GPL

     The ext2fsprogs package contains essential ext2 filesystem
     utilities which consists of e2fsck, mke2fs, debugfs, dumpe2fs,
     tune2fs, and most of the other core ext2 filesystem utilities.


  6.18.  Ext2 filesystem editor - Ext2ed


  o  Homepage: ?

  o  Author: tgud@tochnapc2.technion.ac.il.

  o  Download:
     <http://sunsite.unc.edu/pub/Linux/system/Filesystems/ext2/ext2ed-0.1.tar.gz>

  o  License: GPL

     EXT2ED is a disk editor for the extended2 filesystem.  It will show
     you the ext2 filesystem structures in a nice and intuitive way,
     letting you easily "travel" between them and making the necessary
     modifications.


  6.19.  Linux filesystem editor - lde


  o  Homepage: ?

  o  Author: Scott D. Heavner <sdh@po.cwru.edu>.

  o  Download:
     <http://sunsite.unc.edu/pub/Linux/system/Filesystems/lde-2.3.4.tar.gz>

  o  License: GPL

     This allows you to view some Linux fs's,  hex block and inode
     editing are now supported and you can use it to dump an erased file
     to another partition with a little bit of work.  Supports ext2,
     minix, and xiafs.  Includes LaTeX Introduction to the Minix fs. You
     must patch sources to compile on 2.2.x and 2.3.x kernels beacuse of
     missing Xia header files in kernel.



  6.20.  Ext2 undelete utilities


  o  Homepage:  <http://amadeus.uprm.edu/~undelete>

  o  Authors: Gunther Costas, Wilfredo Lugo, Jerry Ramirez
     <undelete@amadeus.uprm.edu>

  o  Freshmeat: Console/Filesystems

  o  License: GPL

     This is a patch for kernel 2.0.30 that adds undelete capabilities
     using the "undeletable" attribute provided by the ext2fs. This
     patch include man pages, the undelete daemon and utilities.  Check
     our web page for the latest and greatest version.



  7.  Macintosh Hierarchical Filesystem - HFS

  All Macintosh storage devices except floppy disks are partitioned into
  one or more volumes. Volumes can contain four kinds of items: files,
  directories, directory threads and file threads. Each item is
  described by a catalog record which is analogous to a Unix inode.
  Catalog records are organized in the on-disk catalog B-Tree. Directory
  contents are derived from searching the catalog B-Tree. Only a file
  can occupy space outside of its catalog record.


  A Macintosh "file" contains two components, or forks. The resource
  fork is an indexed file containing code segments, menu items, dialog
  boxes, etc. The data fork has the "stream of bytes" semantics of a
  Unix file contents. Each fork is comprised of one or more extents or
  contiguous runs of blocks. An extent descriptor encodes an extent's
  starting block and length into a 32bit quantity. The first extent
  record (three extent descriptors) of each fork is a part of the file's
  catalog record. Any further extent records are kept in the extents
  overflow B-Tree.


  In addition to file and B-Tree extents a volume also contains two boot
  blocks, a volume information block, and a free space bitmap. There is
  a remarkable amount of redundancy in the on diskdata structures which
  improves crash recovery. While not strictly a part of the filesystem,
  it should be noted that several catalog record fields are reserved for
  the exclusive use of Finder, a program which handles user access to
  the filesystem and automatically maintains associations between
  applications and data files. Thus, HFS must also maintain this Finder
  info.


  Every file and directory on an HFS volume has an identification
  number, similar to an inode number in the Unix filesystem. However, a
  file or directory is named by its parent's identification number and
  the file or directory's file name, which is a 32 character string that
  can contain nulls. This combination is the search key to the volume's
  catalog B-Tree. The catalog B-Tree differs from a traditional B-Tree
  structure in that all the nodes at each level of the B-Tree are linked
  together to form a doubly linked list and all of the records are in
  the leaf nodes. These variations permit accessing many items in the
  same directory by traversing the leaves using the linked list.
  Strictly speaking, the HFS B-Trees are a variant of B+-Trees although
  Apple's technical documentation calls them B*-Trees.


  Each directory, including the root directory, contains its directory
  thread, which has the empty filename. The directory thread record
  contains the name of the directory and the id of the parent of the
  directory.  Similarly, filethreads contain the name of a file and the
  id of the directory they are in. While every directory must contain a
  directory thread, file threads are very uncommon. In fact, both are
  examples of HFS redundancy - for undamaged trees, threads are not
  strictly necessary.  Both file and directory records contain 32 bytes
  of information used by Finder. The first three extent descriptors for
  the catalog B-Tree are kept in the volume information block. If the
  catalog B-Tree file grows beyond three extents, the remaining extent
  descriptors are kept in the extents overfow.


  HFS and HFS+ (also called Sequoia) filesystems are well documented.
  The best source of tech. information about HFS can be found in the
  Inside Mactosh series of books. Look at
  <http://developer.apple.com/techpubs/mac/Files/Files-99.html>.  The
  HFS+ filesystem is described in Technote 1150, available online at
  <http://developer.apple.com/technotes/tn/tn1150.html>.  A lot of
  information is available also in other technotes. This links are
  collected by Paul H. Hargrove:


  o  <http://developer.apple.com/dev/technotes/fl/fl_22.html> - HFS
     Ruminations.

  o  <http://developer.apple.com/dev/technotes/fl/fl_32.html> - Hey,
     Buddy, Can You Spare A Block?

  o  <http://developer.apple.com/dev/technotes/fl/fl_505.html> - Alias
     Manager Q&As

  o  <http://developer.apple.com/dev/technotes/fl/fl_515.html> - File
     Manager File Handling Q&As

  o  <http://developer.apple.com/dev/technotes/fl/fl_530.html> - File
     Manager Volume Handling Q&As

  o  <http://developer.apple.com/dev/qa/ops/ops08.html> - Bizarre
     Extension Loading Order: BackQuote Sorts Between "A" and "B"

  o  <http://developer.apple.com/dev/technotes/tb/tb_535.html> - Finder
     Q&As

  7.1.  Accessing HFS from Linux


  o  Homepage:  <http://www-sccm.stanford.edu/~hargrove/HFS/>

  o  Author: Paul. Hargrove <hargrove@sccm.stanford.edu>

  o  Freshmeat: Console/Filesystems

  o  License: GPL


  7.2.  Accessing HFS from OS/2 (HFS/2)


  o  Homepage:  <http://www.student.nada.kth.se/~f96-bet/HFS/>

  o  Author: Marcus Better <Marcus.Better@abc.se>

  HFS/2 lets OS/2 users seamlessly read and write files on diskettes
  formatted with the Hierarchical File System, the file system used by
  Macintosh computers. With HFS/2, Macintosh diskettes can be used just
  as if they were regular diskettes.


  This program is no longer being developed, because author doesn't use
  OS/2. If you are willing to maintain the program, let him know.


  7.3.  Accessing HFS from Windows 95/98/NT (HFV Explorer)


  o  Homepage:  <http://gamma.nic.fi/~lpesonen/HFVExplorer/>

  o  Author: Lauri Pesonen <lpesonen@nic.fi>

  o  Access: R/W access to floppies, Zip disks and virtual volume files.
     Read access to HFS and hybrid CD's.

  o  License: GPL

     An HFS volume browser for Windows NT and Windows 9x based on
     hfsutils. Launch pad support for all major Macintosh emulators
     running on Windows.


  7.4.  Accessing HFS from DOS (MAC-ETTE)


  o  Homepage: ?

  o  Author: Paul E. Thomson

  o  Download:  <http://home2.inet.tele.dk/shefan/macette3.zip>

  o  Access: Read-Only

  o  License: Shareware ($34)

     Mac-ette is a PC utility which can read, write, format and
     duplicate Macintosh HFS format 1.4 Meg diskettes on a PC equipped
     with a 3.5 inch high density diskette drive.



  7.5.  HFS utils


  o  Homepage:  <http://www.mars.org/home/rob/proj/hfs/>

  o  Author: Robert Leslie <rob@mars.org>

  o  OS/2 port:  <http://www.f.kth.se/~f96-bet/hfsutils/>

  The hfsutils package contains a set of command-line utilities such as
  hformat, hmount, hdir, hcopy, etc. They allow read-write access of
  files and directories on HFS volumes.


  7.6.  MacFS: A Portable Macintosh File System Library


  o  Tech report:  <http://reports-
     archive.adm.cs.cmu.edu/anon/1998/abstracts/98-145.html>

  o  Author: Peter A. Dinda <pdinda+macfs@cs.cmu.edu>, George C. Necula,
     and Morgan Price

  o  Download:  <ftp://ftp.cs.cmu.edu/user/pdinda/MacFS_0.1.tar.gz>

  o  Access: Read/Write, full open/read/write/seek/close support

  o  License: Free for noncommercial and nonmilitary use, see
     <ftp://ftp.cs.cmu.edu/user/pdinda/MacFS_0.1.LICENSE>

     This is a Macintosh file system library which is portable to a
     variety of operating systems and platforms. It presents a
     programming interface sufficient for creating a user level API as
     well as file system drivers for operating systems that support
     them. Authors implemented and tested such a user level API and
     utility programs based on it as well as an experimental Unix
     Virtual File System.  They also describe the Macintosh Hierarchical
     File System and their implementation and note that the design is
     not well suited to reentrancy and that its complex data structures
     can lead to slow implementations in multiprogrammed environments.
     Performance measurements show that our implementation is faster
     than the native Macintosh implementation at creating, deleting,
     reading and writing files with small request sizes, but slower than
     the Berkeley Fast File System (FFS.) However, the native Macintosh
     implementation can perform large read and write operations faster
     that either our implementation or FFS.


  8.  ISO 9660 - CD-ROM filesystem



  8.1.  RockRidge extensions

  Extensions allowing long filenames and Unix-style symbolic links.


  8.2.  Joliet extensions

  Joliet is a Microsoft extension to the ISO 9660 filesystem that allows
  Unicode characters to be used in filenames.  This is a benefit when
  handling internationalization.  Like the Rock Ridge extensions, Joliet
  also allows long filenames.



  8.3.  Hybrid CD-ROMs



  8.4.  Physical formats



  8.4.1.  CD-DA - Audio CDs


  8.4.2.  Data CDs


  8.4.3.  Recordable CDs


  8.4.3.1.  CD-MO - Magneto-optical


  8.4.3.2.  CD-WO - Write-once


  8.4.3.3.  CD-RW - Rewritable CDs


  8.4.4.  CD Extra - eXtended Architecture


  8.4.4.1.  MODE-1

  8.4.4.2.  MODE-2

  8.4.4.2.1.  FORM-1

  8.4.4.2.2.  FORM-2

  8.4.5.  Video CD



  8.5.  Accessing Joliet from Linux



  o  Homepage:  <http://bmrc.berkeley.edu/people/chaffee/joliet.html>

  o  License: GPL


  8.6.  Accessing Joliet from BeOS



  o  Homepage:  <http://www.iae.nl/users/gertjan/be/>

  o  Author: Gertjan van Ratingen <gertjan@iae.nl>

  o  License: ?

     It is updated ISO9660 driver to be able to use a Joliet ISO9660
     extensions.



  8.7.  Accessing Joliet from OS/2



  o  Download:
     <ftp://hobbes.nmsu.edu/pub/os2/system/drivers/filesys/jcdfs.zip>

  o  Author: IBM

  o  License: ?

     Jcdfs.zip archive contains CDFS.IFS driver for OS/2 with Joliet
     level 3 support.


  8.8.  Accessing Audio CD as filesystem from BeOS



  o  Homepage:  <http://www.xs4all.nl/~marcone/be.html>

  o  Download:  <http://www.xs4all.nl/~marcone/be/files/cdda5.zip>
     (PPC/Intel archive)

  o  Author: Marco ?

  o  License: ?

     This filesystem add-on will allow you (if your CD drive supports
     it) to treat a regular audio CD as if it were a bunch of WAV files.
     You can copy the files, encode them to mp3, play them slower,
     faster, even backwards.


  8.9.  Creating Hybrid CD-ROMs (mkhybrid)



  o  Homepage:  <http://www.ps.ucl.ac.uk/~jcpearso/mkhfs.html>

  o  Download:  <ftp://ftp.ge.ucl.ac.uk/pub/mkhfs/>

  o  Author: <j.pearson@ge.ucl.ac.uk>

  o  License: ?

     Make an ISO9660/HFS/JOLIET shared hybrid CD volume



  9.  Other filesystems



  9.1.  ADFS - Acorn Disc File System

  The Acorn Disc Filing System is the standard filesystem of the RiscOS
  operating system which runs on Acorn's ARM-based Risc PC systems and
  the Acorn Archimedes range of machines.


  Linux kernel 2.1.x+ supports this filesystem. Author of Linux
  filesystem implementation is Russell King <rmk@arm.uk.linux.org>.



  9.2.  AFFS - Amiga fast filesystem

  The Fast File System (FFS) is the common filesystem used on hard disks
  by Amiga(tm) systems since AmigaOS Version 1.3 (34.20).


  Linux kernel 2.1.x+ supports this filesystem. Author of Linux
  filesystem implementation is Ray Burr <ryb@nightmare.com>.



  9.3.  BeFS - BeOS filesystem

  BeFS is ``journaling'' filesystem used in BeOS.  For more information
  about BeFS see Practical File System Design with the Be File System
  book or BeFS linux driver source code.


  Linux BeFS implementation:


  o  Homepage:  <http://hp.vector.co.jp/authors/VA008030/bfs/>

  o  Download:
     <http://hp.vector.co.jp/authors/VA008030/bfs/bfs-19990528.tar.gz>

  o  Author: Makoto Kato <m_kato@ga2.so-net.ne.jp>

  o  Access: Read-only

  o  License: GPL

     This driver supports x86 and PowerPC Linux platform.  Also, it only
     supports readable in hard disk and floppy disk.


  9.4.  BFS - UnixWare Boot Filesystem

  UnixWare BFS filesystem type is a special-purpose filesystem. It was
  designed for loading and booting UnixWare kernel. BFS was designed as
  a ``contiguous filesystem''. BFS supports only one (root) directory
  and you can create only regular files; no subdirs or special files
  such as devices or sockets can be created.



  For more information about BFS see
  <http://uw7doc.sco.com/FS_admin/_The_bfs_File_System_Type.html>.

  o  <http://uw7doc.sco.com/FS_admin/_The_bfs_Superblock.html> -
     superblock

  o  <http://uw7doc.sco.com/FS_admin/_bfs_Inodes.html> - inodes

  o  <http://uw7doc.sco.com/FS_admin/_bfs_Storage_Blocks.html> - storage
     blocks

  You can access BFS filesystem from Linux:


  o  Homepage:  <http://www.ocston.org/~tigran/patches/bfs/>

  o  Download: In the Linux kernel, patches available at homepage.

  o  Author: Tigran A. Aivazian <tigran@ocston.org>

  o  License: GPL

  o  Access: Read/write (write part is limited, no compactification yet)

     The support for BFS is included in the Linux kernel since version
     2.3.25. If you are using an earlier kernel, check if BFS homepage
     contains a patch which adds support for this filesystem. The
     homepage also contains bugfixes/enhancement which are not yet
     merged into the official kernel.


  There is also mine old implementation, which is now obsolete. My plan
  is to port this code to FreeBSD:



  o  Homepage:  <http://www.penguin.cz/~mhi/fs/bfs/>

  o  Download:  <ftp://ftp.penguin.cz/pub/users/mhi/bfs/>

  o  Author: Martin Hinner <mhi@penguin.cz>

  o  License: GPL

  o  Access: Read-only

     This is read-only UnixWare Boot filesystem support for Linux. You
     can use it to mount read-only your UnixWare /stand partition or
     floppy disks. I don't plan a read-write version, but if you want it
     mail me. You might be also interested in ``VxFS'' Linux support.


  9.5.  CrosStor filesystem

  This is new name for High throughput filesystem (HTFS). For more
  information see CrosStor homepage at  <http://www.crosstor.com>.


  9.6.  DTFS - Desktop filesystem

  Goals in designing the Desktop File System were influenced by
  impression of what environment was like for small computer systems.
  DTFS compress the data stored in regular files to reduce disk space
  requirements (directories remain uncompressed). Compression is
  performed a page at a time and occur 'on-the-fly'.  DTFS supports LZW
  and no-compression but you can add your own algorithms. Some space is
  saved by not pre-allocating inodes. Any disk block is fair game to be
  allocated as an inode. Each inode is stored as a B+tree. For more
  information see DTFS USENIX paper (you can download it from
  <ftp://ftp.crosstor.com/pub/DTFS/papers/>).


  Read/Write commercial driver available from CrosStor for UnixWare and
  SUN Solaris:



  o  Download:  <ftp://ftp.crosstor.com/pub/DTFS/>

  o  License: Commercial?

  o  Access: Read/Write



  9.7.  EFS - Enhanced filesystem (Linux)

  The Enhanced Filing system project aims to create a new filing system
  for Linux and eventually other OSs which will allow the administrator
  to define mountable "file systems" on a set of block devices (either
  hard drives or partitions). The aim is to allow file systems to be
  added or removed from the partition set while the system is running
  and partitions may be added to a set (or removed if the remaining
  partitions have enough space to contain all the data) while the system
  is running.The two main aims are to allow a number of mountable file
  systems to share the same pool of storage space (IE have the user home
  dirs on the same drive as the news spool but have separate accounting
  for them), and to allow the easy addition of more hard drives to allow
  more space.


  Some other features that authors want to implement are
  ``logging/journaling'', support for as many OSs as possible (although
  all work will be initially done on Linux), and quotas in the FS so we
  don't need to waste ages running a silly quotacheck program at boot -
  the logging should avoid quotacheck the same way it avoids fsck! They
  want to be able to boot a system with 10gig of news spread over 4 hard
  drives with full quotas AFTER a power failure with less than 20
  seconds for mounting file systems!


  Homepage of Enhanced FS is at
  <http://www.coker.com.au/~russell/enh/>.  Contact Russell Coker
  <russell@coker.com.au> for more information.



  9.8.  EFS - Extent filesystem (IRIX)

  The Extent File System (efs) is Silicon Graphics' early block-device
  filesystem, widely used on pre-6.0 versions of IRIX. Since 6.0, xfs
  has been bundled with IRIX and users are being encouraged to migrate
  to xfs filesystems. IRIX support for efs will be read-only in versions
  of IRIX beyond 6.5, however efs is still very much in use on SGI
  software distribution CDs.


  There are two kernel modules for linux to access EFS filesystem.



  o  Homepage:  <http://aeschi.ch.eu.org/efs/>

  o  Download:  <http://aeschi.ch.eu.org/efs/efs-1.0b.tar.gz>

  o  Author: Al Smith <Al.Smith@aeschi.ch.eu.org>

  o  License: GPL

  o  Access: Read-only

     The efs kernel module is an implementation of the extent file
     system for linux 2.2 kernels. An efs implementation
     (efsmod-0.6.tar.gz) was originally written for 1.x kernels by
     Christian Vogelgsang.  In this implementation the code has
     undergone a complete rewrite and is also endian-clean. To use the
     efs module, you will need to have at least a 2.2 kernel. To mount
     IRIX CDs, your CD-ROM will need to be able to cope with 512-byte
     blocks.  This version of efs contains support for hard-disk
     partitions, and also contains a kernel patch to allow you to
     install the efs code into your linux kernel tree. Handling of large
     files has also been vastly improved.


  Original efsmod is also available:



  o  Homepage:  <http://wwwcip.informatik.uni-
     erlangen.de/user/cnvogelg/proj.html>

  o  Download:  <http://wwwcip.informatik.uni-
     erlangen.de/user/cnvogelg/bin/efsmod-0.6.tgz>

  o  Author: Christian Vogelgsang

  o  License: GPL

  o  Access: Read-only

     Efs-mod 0.6 is original EFS read/only module for Linux. Version 0.6
     finished but Project frozen due to lack of time and information for
     implementing the write part.



  9.8.1.  EFS and UFS library, libfs



  o  Download:  <ftp://ivo.cps.unizar.es/pub/SPDsoft/libfs.tar.gz>

  o  Author: J.A. Gutierrez <spd@ivo.cps.unizar.es>

  o  License: GPL

  o  Access: Read/Only IRIX EFS and Sun UFS

     A C library to read EFS and UFS from WinNT x86, SunOS and IRIX.
     Easy to use (Posix like interface) and to links aginst existent
     code FTP server has also winefssh.exe and winufssh.exe, simple
     WinNT binaries to interactively read UFS and EFS file systems.  Not
     a very polished/documented package, but somebody may find it
     useful.


  Useful links:

  o  IRIX EFS filesystem brief description:
     <http://squish.ucs.indiana.edu:80/ebt-bin/nph-
     dweb/dynaweb/SGI_Admin/IA_DiskFiles/@ebt-
     link;td=8?target=%25N%14_7484_START_RESTART_N%25>



  9.9.  FFS - BSD Fast filesystem

  This is native filesystem for most BSD unixes (FreeBSD, NetBSD,
  OpenBSD, Sun Solaris, ...).


  See also: ``SFS, secure filesystem'', ``UFS''.



  9.10.  GPFS - General Parallel Filesystem

  This is a UNIX(tm) operating system style file system designed for the
  RS/6000 SP(tm) server. It allows applications on multiple nodes to
  share file data. GPFS supports very large file systems and stripes
  data across multiple disks for higher performance. GPFS is based on a
  shared disk model which provides lower overhead access to disks not
  directly attached to the application nodes and uses a distributed
  locking protocol to provide full data coherence for access from any
  node. It offers many of the standard AIX(tm) file system interfaces
  allowing most applications to execute without modification or
  recompiling. These capabilities are available while allowing high
  speed access to the same data from all nodes of the SP system, and
  providing full data coherence for operations occurring on the various
  nodes. GPFS attempts to continue operation across various node and
  component failures assuming that sufficient resources exist to
  continue.


  o  <http://www.austin.ibm.com/resource/technology/paper1.html>


  9.11.  HFS - HP-UX Hi performance filesystem

  This is the second hfs that appears in this howto. It is used in older
  HP-UX versions.


  9.12.  HTFS - High throughput filesystem


  Useful links:

  o  SCO OpenServer 5 filesystems whitepaper:
     <http://www.sco.com/products/Whitepapers/family/filesy4.htm>

  Read/Write commercial driver available from CrosStor:



  o  Download:  <ftp://ftp.crosstor.com/pub/HTFS/>

  o  License: Commercial?

  o  Access: Read/Write


  9.13.  JFS - Journaled filesystem (HP-UX, AIX, OS/2 5)



  9.14.  LFS - Linux log structured filesystem


  Linux Log structured filesystem implementation called d(t)fs:

  o  Homepage:  <http://www.complang.tuwien.ac.at/czezatke/lfs.html>

  o  Author: Christian Czezatke <e9025461@student.tuwien.ac.at>

  o  License: GPL

  o  Access: rw/long filenames, etc

     d(t)fs is a log-structured filesystem project for Linux.
     Currently, the filesystem is mostly up and running, but no cleaner
     has been written so far.


  There will also be a dtfs mailing list that will be announced on the
  homepage. For more information you can have a look at:
  <http://www.xss.co.at/mailman/listinfo.cgi/dtfs>



  o  <http://collective.cpoint.net/lfs/> - The kfs Homepage Cornelius
     "Kees" Cook has started a Linux Log--Structured Filesystem project
     before dtfs came to live.

  o  <http://lucien.blight.com/~c-cook/prof/lfs/> - Another (death) LFS
     implementation ;-)

  o  <http://www.eecs.harvard.edu/~margo/usenix.195/> - Margo Seltzer's
     <margo@das.harvard.edu> LFS page



  9.15.  MFS - Macintosh filesystem

  MFS is original Macintosh filesystem. It has been replaced by HFS /
  HFS+.  If you can provide further information, mail me please.



  9.16.  Minix filesystem

  This is Minix native filesystem. It was also used in first versions of
  Linux.



  9.17.  NWFS - Novell NetWare filesystem

  NWFS is native in Novell NetWare OS. It is modified FAT-based
  filesystem.  Two variants of this filesystem exists. 16bit NWFS 286 is
  used in NetWare 2.x.  NetWare 3.x, 4.x and 5 use 32bit NWFS 386.


  9.17.1.  NetWare filesystem / 286

  (todo)


  9.17.2.  NetWare filesystem / 386

  (todo)


  9.17.3.  Accessing NWFS-386 from Linux


  o  Homepage:  <http://www.timpanogas.com/html/fenris_for_linux.html>

  o  Download:  <ftp://207.109.151.240/nwfs/>

  o  Author: Timpanogas Research Group, Inc. (jmerkey@timpanogas.com)

  o  License: GPL

  o  Access: Read-Only

     This driver allows you to mount NWFS-386 filesystem on Linux.


  9.18.  NSS - Novell Storage Services

  This is a new 64bit ``journaling'' filesystem using a ``balanced
  tree'' algorithms. It is used in Novell NetWare 5.


  o  <http://www.novell.com/whitepapers/nw5/nss.html> - NSS Whitepaper



  9.19.  ODS - On Disk Structure filesystem

  This is OpenVMS and VMS native filesystem.



  9.20.  QNX filesystem

  This filesystem is used in QNX. Two major filesystem version exists,
  version 2 is used by QNX 2 and version 4 by QNX 4. QNX 4 doesn't
  support version 2 and vice versa.


  QNX4 filesystem is now accessible from Linux 2.1.x+. Say "Y"es to 'QNX
  filesystem support';


  o  Download: In the kernel ;)

  o  Author: Frank Denis  <j@4u.net> (maintainer), Richard Frowijn

  o  License: GPL

  o  Access: Read (except for multi-extents files), Write (experimental)

     Driver for the QNX 4 filesystem.



  9.21.  Reiser filesystem

  Reiserfs is a file system using a variant on classical balanced tree
  algorithms. The results when compared to the ext2fs conventional block
  allocation based file system running under the same operating system
  and employing the same buffering code suggest that these algorithms
  are more effective for large files and small files not near node size
  in time performance, become less effective in time performance and
  more significantly effective in space performance as one approaches
  files close to the node size, and become markedly more effective in
  both space and time as file size decreases substantially below node
  size (4k), reaching order of magnitude advantages for file sizes of
  100bytes. The improvement in small file space and time performance
  suggests that we may now revisit a common OS design assumption that
  one should aggregate small objects using layers above the file system
  layer.


  Useful links:

  o  Reiser fs homepage <http://devlinux.org/namesys/>



  9.22.  RFS (CD-ROM Filesystem)

  Sony's incremental packet-writing filesystem.


  9.23.  RomFS - Rom filesystem

  Author of Linux RomFS implemplementation is Janos Farkas
  <chexum@shadow.banki.hu> For more information see
  /usr/src/linux/Documentation/filesystems/romfs.txt file.


  9.24.  SFS - Secure filesystem

  The sfs filesystem type is a variation of the FFS filesystem type. The
  boot block,superblock, storage blocks, and free blocks for the sfs
  filesystem type are, at the administrative level, identical to those
  for FFS.  The inodes differ from FFS inodes, however. Each odd-
  numbered inode is reserved for security information. The information
  contains Access Control List information. I'm not sure if SFS has any
  other abilities though.


  SFS links:

  o  <http://uw7doc.sco.com/FS_admin/_The_sfs_File_System_Type.html> -
     UnixWare 7 documentation: SFS Filesystem


  9.25.  Spiralog filesystem (OpenVMS)


  Spiralog is a 64bit high-performance filesystem for the OpenVMS.  The
  Spiralog combines ``log-structured'' technology with more traditional
  ``B-tree'' technology to provide a general abstraction. The B-tree
  mapping mechanism uses write-ahead logging to give stability and
  recoverability guarantees.


  Spiralog-related links at Digital:


  o  <http://www.digital.com/info/SP6048/> - Spiralog File System for
     OpenVMS Alpha

  o  <http://www.digital.com/DTJM01/DTJM01AH.HTM> - Overview of the
     Spiralog File System

  o  <http://www.digital.com/DTJM02/DTJM02HM.HTM> - Design of the Server
     for the Spiralog File System


  9.26.  System V and derived filesystems

  Homepage of System V Linux project is at
  <http://www.knm.org.pl/prezes/sysv.html>. Maintainer of this project
  is <kgb@manjak.knm.pl.org>.


  9.26.1.  AFS - Acer Fast Filesystem

  The Acer Fast Filesystem is used on SCO Open Server. It is similar to
  the System V Release 4 filesystem, but it is using bitmaps instead of
  chained free-list of blocks.


  9.26.2.  EAFS - Extended Acer Fast Filesystem

  The AFS filesystem can be 'extended' to handle file names up to 255
  characters, but directories entries still have 14-char names. This
  filesystem type is used on SCO Open Server.


  9.26.3.  Coherent filesystem



  9.26.4.  S5

  This filesystem is used in UnixWare. It's probably SystemV compatible,
  but I haven't verified it yet. For more information see
  <http://uw7doc.sco.com/FS_admin/_The_s5_File_System_Type.html>.


  9.26.5.  S51K - SystemV 1K



  9.26.6.  Version 7 filesystem

  This filesystem type is used on Version 7 Unix for PDP-11 machines.


  9.26.7.  Xenix filesystem



  9.27.  Text - (Philips' CD-ROM Filesystem)

  Philips' standard for encoding disc and track data on audio CDs.


  9.28.  UDF - Universal Disk Format (DVD-ROM filesystem)


  There is a Linux UDF filesystem driver:


  o  Homepage:  <http://trylinux.com/projects/udf/>

  o  Download:  <http://trylinux.com/projects/udf/udf-0.8.0.1.tar.gz>

  o  Author: Dave Boynton <dave@trylinux.com>

  o  Mailing-list: <linux_udf@hootie.lvld.hp.com>

  o  License: GPL

  o  Access: Read-only


  9.29.  UFS


  Note: People often call ``BSD Fast Filesystem'' incorrectly UFS. FFS
  and UFS are *diferrent* filesystems. All modern Unixes use FFS
  filesystem.

  Useful links:

  o  <http://www.sun.ca/white-papers/ufs-cluster.html> - Implementation
     of write-clustering for Sun's UFS
  See also: ``BSD FFS''



  9.30.  VxFS - Veritas filesystem (HP-UX, SCO UnixWare, Solaris)

  This is commercial filesystem developer by Veritas Inc. You can see it
  in HP-UX, SCO UnixWare, Solaris and probably other systems. It has
  very interesting features: Extent based allocation, Journaling, access
  control lists (ACLs), up to 2 terabyte large file support, online
  backup (snapshot filesystem), BSD style quotas and many more.

  Three VxFS versions are available with VxFS:


   Version 1: This is original VxFS, not commonly in use.

   Version 2: Support for filesets and dynamic inode allocation.

   Version 4: Latest version, supports large files and quotas.


  Note that HP-UX, Solaris and UnixWare versions use slightly different
  structures, so you may not be able to read VxFS when you connect it to
  different system.


  VxFS related links:

  o  <http://www.veritas.com/> - Veritas Inc <vx-sales@veritas.com>.

  o  <http://uw7doc.sco.com/ODM_FSadmin/CONTENTS.html> - VxFS ODM FS
     Admin - UnixWare 7 (documentation, really good).

  o  <http://uw7doc.sco.com/FS_manager/fsD.vxfsopt.html> - VxFS FS
     Manager - UnixWare 7 (documentation).

  o  <http://manuals.mchp.siemens.de:80/dynaweb/english/ru544e/drlugueb/o25636e1/@Generic__BookView/1641;cd=3>
     - VxFS - Reliant Unix.


  See also: ``VxVM (Veritas volume manager)'' and ``journaling
  filesystems''.


  9.30.1.  VxTools


  Unix command-line utilities for accessing VxFS versions 2 and 4 are
  available under the GNU GPL:

  o  Homepage:  <http://www.penguin.cz/~mhi/fs/vxfs/>

  o  Download:  <ftp://ftp.penguin.cz/pub/users/mhi/vxfs/>

  o  Author: Martin Hinner <mhi@penguin.cz>

  o  Mailing-list: <fs-l@penguin.cz>

  o  License: GPL

  o  Access: Read-only, command-line utilites

     Vxtools is a set of command-line utilites which allow you to access
     your VxFS filesystem from Linux (and possibly other Unixes).
     Current version can read VxFS versions 2 and 4.
  I (mhi) plan also VxFS Linux kernel driver.


  AFAIK Rodney Ramdas <rodney@quicknet.nl> works on VxFS driver for
  FreeBSD. I don't know current status of his project, so if you want
  more info contact him directly.



  9.31.  XFS - Extended filesystem (IRIX)



  XFS(tm) is the next-generation file system for Silicon Graphics[TM]
  systems, from desktop workstations to supercomputers.  XFS provides
  full 64-bit file capabilities that scale easily to handle extremely
  large files and file systems that grow to 1 terabyte. The XFS file
  system integrates volume management, guaranteed rate I/O, and
  ``journaling'' technology for fast, reliable recovery. File systems
  can be backed up while still in use, significantly reducing
  administrative overhead.


  XFS is designed for a very high performance; sustained throughput in
  excess of 300MB per second has been demonstrated on CHALLENGE systems.
  The XFS file system scales in performance to match the CHALLENGE MP
  architecture. Traditional files, directories, and file systems have
  reduced performance as they grow in size. With the XFS file system,
  there is no performance penalty. For example, XFS directories have
  been tested with up to 32 million files in a single directory.


  XFS is a journalled file system.  It logs changes to the inodes,
  directories and bitmaps to the disk before the original entries are
  updated.  Should the system crash before the updates are done they can
  be recreated using the log and updated as intended.


  XFS uses a space manager to allocate disk space for the file system
  and control the inodes.  It uses a namespace manager to control
  allocation of directory files.  These managers use B-tree indexing to
  store file location information, significantly decreasing the access
  time needed to retrieve file information.


  Inodes are created as needed and are not restricted to a particular
  area on a disk partition.  XFS tries to position the inodes close to
  the files and directories they reference.  Very small files, such as
  symbolic links and some directories, are stored as part of the inode,
  to increase performance and save space.  Large directories use B-tree
  indexing within the directory file to speed up directory searches,
  additions and deletions.


  Useful XFS links:

  o  <http://www.sgi.com/Technology/xfs-whitepaper.html> XFS whitepaper


  XFS Linux port covered by the GNU General Public License is available
  from SGI Inc.:


  o  Homepage:  <http://oss.sgi.com/projects/xfs/>


  o  Download:  <ftp://oss.sgi.com/www/projects/xfs/download/>

  o  Author: SGI Inc.,  <http://www.sgi.com/>

  o  License: GPL

  o  Access: Read-write


  9.32.  Xia FS

  This filesystem was developed to replace old Minix filesystem in
  Linux. Author of this fs is Franx Xia <qx@math.columbia.edu>


  10.  Raw partitions

  11.  Appendix



  11.1.  Network filesystems

  This HOWTO is not about Network filesystems, but I should mention
  them.


  There is a brief list of some which I know:


  11.1.1.  AFS - Andrew Filesystem



  o  The AFS FAQ is at  <http://www.angelfire.com/hi/plutonic/afs-
     faq.html>.

  o  Commercial clients and servers for almost all platforms (except
     win98) are available from IBM. See
     <http://www.transarc.com/Product/EFS/AFS/index.html>

  o  A free client for Unix is available from the Arla Team at
     <http://www.stacken.kth.se/projekt/arla/>.

  o  A free Server is also in preparation, but not in production yet.


  11.1.2.  CODA



  11.1.3.  NFS - Network filesystem (Unix)



  11.1.4.  NCP - NetWare Core Protocol (Novell NetWare)



  11.1.5.  SMB - Session Message Block (Windows 3.x/9x/NT)

  This protocol is used in Windows world.



  11.2.  Encrypted filesystems



  11.2.1.  CFS



  o  Homepage: ?

  o  Download: ?

  o  Author: Matt Blaze <mab@research.att.com>.

  o  License: ?

  o  Access: Read/Write, using DES/3DES.

     CFS pushes encryption services into the Unix(tm) file system.  It
     supports secure storage at the system level through a standard Unix
     file system interface to encrypted files.  Users associate a
     cryptographic key with the directories they wish to protect.  Files
     in these directories (as well as their pathname components) are
     transparently encrypted and decrypted with the specified key
     without further user intervention; cleartext is never stored on a
     disk or sent to a remote file server.  CFS employs a novel
     combination of DES stream and codebook cipher modes to provide high
     security with good performance on a modern workstation.  CFS can
     use any available file system for its underlying storage without
     modification, including remote file servers such as NFS.  System
     management functions, such as file backup, work in a normal manner
     and without knowledge of the key.



  11.2.2.  TCFS



  o  Homepage:  <http://tcfs.dia.unisa.it/>

  o  Download:  <ftp://tcfs.dia.unisa.it/pub/tcfs/>

  o  Authors: Luigi Catuogno <luicat@tcfs.dia.unisa.it>, Aniello Del
     Sorbo <anidel@tcfs.dia.unisa.it>, Luigi Della Monica
     <dellui@tcfs.dia.unisa.it>, G.Cattaneo <cattaneo@dia.unisa.it>,
     G.Persiano ( <http://www.dia.unisa.it/~giuper/>), Ermelindo (Erry)
     Mauriello <errmau@tcfs.dia.unisa.it>, Angelo Celentano
     <angcel@tcfs.dia.unisa.it>, Andrea Cozzolino
     <andcoz@tcfs.dia.unisa.it>.

  o  License: GPL

  o  Access: Read/Write transparently using CBC-
     DES/3DES/RC5/IDEA/Others..

     The main difference between TCFS and CFS is the trasparency to user
     obtained by using TCFS. As a matter of fact, CFS works in user
     space while TCFS works in the kernel space thus resulting in
     improved performances and security.  The dynamic encryption module
     feature of TCFS allows a user to specify the encryption engine of
     his/her choiche to be used by TCFS.  Currently available only for
     Linux, TCFS will be relased soon also for NetBSD, and will support
     in a near future also other FS then NFS.


  11.2.3.  SFS

  ( TODO:  <http://www.cs.auckland.ac.nz/~pgut001/sfs/index.html> )


  11.2.4.  VS3FS: Steganographic File System for Linux



  o  Homepage:  <http://www.linux-security.org/sfs/>

  o  License: ?

  o  Access: ?

     fspatch is a kernel patch which introduces module support for the
     steganographic file system (formerly known as vs3fs, an
     experimental type of filesytem that not only encrypts all
     information on the disk, but also tries to hide that information in
     such a way that it cannot be proven to even exist on the disk. This
     enables you to keep sensitive information on a disk, while not be
     prone to being forced to reveal that information. Even under
     extreme circumstances, fake documents could be stored on other
     parts of the disk, for which a pasword may be revealed.  It should
     not be possible to find out whether any other information is stored
     on the disk.



  11.3.  Writing your own filesystem driver



  11.3.1.  DOS

  I haven't seen yet any good page about writing DOS filesystem drivers
  (Network redirectors) on the net. The best source is Ralf Brown's
  interrupt list and ``iHPFS'' source code.


  11.3.2.  OS/2


  o  <ftp://ftp.leo.org/pub/comp/os/os2/leo/devtools/doc/ifsinf.zip>

  o  <ftp://hobbes.nmsu.edu/pub/os2/system/drivers/filesys/32drv170.zip>
     - 32 bits OS/2 device driver and IFS support. Provides 32 bits
     kernel services (DevHelp) and utility functions to 32 bits OS/2
     ring 0 code (device drivers and installable file system drivers).


  11.3.3.  Windows NT

  For more information about writing FS drivers for Windows NT see
  <http://www.ing.umu.se/~bosse/> by <bosse@acc.umu.se>.


  11.4.  Related documents



  o  <http://www.honeycomb.net/os/holistic/connect/filesys.htm> - good
     page about filesystems

  o  <http://home.att.net/~artnaseef/> - Linux overlay filesystem by
     <artnaseef@worldnet.att.net>.
  o  <http://www.braysystems.com/linux/trustees.html> - Linux trustees

  o  <http://tcfs.dia.unisa.it> - Transparent Cryptography Filesystem

  o  <http://www.sas.com/standards/large.file> - Large file summit -
     attacks the problem of 2gig+ of file in a 32bit computer

  o  <http://www.coda.cs.cmu.edu/> - The CODA project (a distributed
     file system based on AFS)

  o  <ftp://ftp.scis.org/pub/lfs/> - LFS related papers

  o  <http://www.redhat.com:8080/HyperNews/get/khg.html> - Linux Kernel
     Hacker's guide

  o  <http://www.win.tue.nl/~aeb/linux/largedisk.html> - Large disk
     HOWTO

  o  <http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html> - The
     Linux devfs

  o  <http://gfs.lcse.umn.edu/> - The Global File System (GFS)

  o  <ftp://hobbes.nmsu.edu/pub/os2/system/drivers/filesys/tvfs211.zip>
     - The Toronto Virtual Filesystem/2.

  o  <ftp://hobbes.nmsu.edu/pub/os2/system/drivers/filesys/ramfs64.zip>
     Dynamic RAM drive IFS driver for OS/2

  o  <http://doc.sco.com/> - UnixWare and SCO Unix documentation online

  o  <http://uw7doc.sco.com/> - UnixWare 7 documentation online

  o  <http://publib.boulder.ibm.com/cgi-
     bin/bookmgr/BOOKS/SG244428/CCONTENTS> - Inside OS/2 LAN Server 4.0

  o  <ftp://tsx-11.mit.edu/pub/linux/ALPHA/userfs/> - Linux UserFS, it
     allows you to write a Linux process which implements a filesystem.

  o  <http://www.nyx.net/~sgjoen/disk.html> - Stein Gjoen's Multi Disk
     System Tuning HOWTO.

  o  <http://linuxtoday.com/stories/5556.html> - Linux Today: Kragen's
     Amazing List of Filesystems.

  o  <http://www.koehntopp.de/kris/artikel/dateisysteme/> - Kristian
     Kohntopp's Unix Filesystems (in German).



  Firewall and Proxy Server HOWTO
  Mark Grennan, mark@grennan.com
  v0.80, Feb. 26, 2000

  This document is designed to describe the basics of firewall systems
  and give you some detail on setting up both a filtering and proxy
  firewall on a Linux based system. An HTML version of this document is
  available at http://www.grennan.com/Firewall-HOWTO.html
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Feedback
     1.2 Disclaimer
     1.3 Copyright
     1.4 My Reasons for Writing this
     1.5 Further Readings

  2. Understanding Firewalls

     2.1 Firewall Politics
        2.1.1 How it create a security policy
     2.2 Types of Firewalls
        2.2.1 Packet Filtering Firewalls
        2.2.2 Proxy Servers
        2.2.3 Application Proxy
        2.2.4 SOCKS Proxy

  3. Firewall Architecture

     3.1 Dial-up Architecture
     3.2 Single Router Architecture
     3.3 Firewall with Proxy Server
     3.4 Redundent Internet Configuration

  4. Setting up the Linux Filtering Firewall

     4.1 Hardware requirements

  5. Software requirements

     5.1 Selecting a Kernel
     5.2 Selecting a proxy server

  6. Preparing the Linux system

     6.1 Compiling the Kernel
     6.2 Configuring two network cards
     6.3 Configuring the Network Addresses
     6.4 Testing your network
     6.5 Securing the Firewall

  7. IP filtering setup (IPFWADM)

  8. IP filtering setup (IPCHAINS)

  9. Installing a Transparent SQUID proxy

  10. Installing the TIS Proxy server

     10.1 Getting the software
     10.2 Compiling the TIS FWTK
     10.3 Installing the TIS FWTK
     10.4 Configuring the TIS FWTK
        10.4.1 The netperm-table file
        10.4.2 The /etc/services file

  11. The SOCKS Proxy Server

     11.1 Setting up the Proxy Server
     11.2 Configuring the Proxy Server
        11.2.1 The Access File
        11.2.2 The Routing File
     11.3 Working With a Proxy Server
        11.3.1 Unix
        11.3.2 MS Windows with Trumpet Winsock
        11.3.3 Getting the Proxy Server to work with UDP Packets
     11.4 Drawbacks with Proxy Servers

  12. Advanced Configurations

     12.1 A large network with emphasis on security
        12.1.1 The Network Setup
        12.1.2 The Proxy Setup

  13. Making Management Easy

     13.1 Firewall tools
     13.2 General tools

  14. Defeating a Proxy Firewall Just to spoil your day, and keep you on your toes about security, I'll describe how easy it is to defeat a proxy firewall. Now that you have done everything in this document and have a very secure server and network.  You have a DMZ and no one can get into your network and you are logging every connection made to the outside world. You make all your users go through a proxy and no one can go directly to the Internet. Then one of your users, with a didacated connection of his own, finds out about

  15. APPENDEX A - Example Scripts

     15.1 RC Script useing GFCC
     15.2 GFCC script
     15.3 RC Script without GFCC This is the firewall rules set built my hand. It does not use GFCC.

  16. APPENDEX B - An VPN RC Script for RedHat



  ______________________________________________________________________

  1.  Introduction

  David Rudder wrote this original version of this Firewall-HOWTO,
  these many moons ago, and I'd still like to thank him for allowing me
  to update his work.

  I'd also like to thank Ian Gough for kindly assisting a this dislexic
  writer.

  Firewalls have gained great popularity as the ultimate in Internet
  Security. Like most hot subject they are also often misunderstood.
  This HOWTO will go over the basics of what a firewall is and how to
  set one up.

  I am using kernel 2.2.13 and RedHat 6.1 to develop this howto so the
  examples here are based on this distribution. If you find differences
  in your distribution, please email me and I'll update this howto.


  1.1.  Feedback

  Any feedback is very welcome. PLEASE REPORT ANY INACCURACIES IN THIS
  PAPER!!!  I am human, and prone to making mistakes.  If you find a fix
  for anything please send it to me.  I will try to answer all e-mail,
  but I am busy, so don't get insulted if I don't.

  My email address is mark@grennan.com <mailto:mark@grennan.com>


  1.2.  Disclaimer


  I AM NOT RESPONSIBLE FOR ANY DAMAGES INCURRED DUE TO ACTIONS TAKEN
  BASED ON THIS DOCUMENT. This document is meant as an introduction to
  how firewalls and proxy servers work. I am not, nor do I pretend to
  be, a security expert. ;-) I am just some guy who has read too much
  and likes computers more than most people. Please, I am writing this
  to help people get acquainted with this subject, and I am not ready to
  stake my life on the accuracy of what is in here.


  1.3.  Copyright


  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have any questions, please email me. (See Above)


  1.4.  My Reasons for Writing this

  Several years ago, while working for the State of Oklahoma as their
  "Internet Administrator" I was ask to "put the State on the Internet",
  with no budget. (Note: There was no such title at the time.  I was
  just the guy doing all the work.) The best way to make this happen was
  to use as much free software and junk hardware as I could.  Linux and
  a bunch of old 486s were all I had to work with.

  Commercial firewalls are VERY over priced and the documentation on how
  they work is considered almost top secret. I found creating a firewall
  of my own was almost impossible.

  At my next job, I was asked to put in a firewall.  Linux had just
  added firewall code.  So again with no budget I started building a
  firewall with Linux. Six months later my firewall was in place and
  this document was updated.



  1.5.  Further Readings


  o  The The Linux Networking Overview HOWTO
     <http://sunsite.unc.edu/mdw/HOWTO/Networking-Overview-HOWTO.html>

  o  The Ethernet HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-
     HOWTO.html>

  o  IPchains Firewalling made Easy! <http://ipchains.nerdherd.org/>

  o  Linux Network Address Translation
     <http://www.linas.org/linux/load.html>

  o  The Net-3 HOWTO <http://sunsite.unc.edu/mdw/HOWTO/NET-3-HOWTO.html>

  o  The NET-PPP HOWTO <http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html>

  o  The easiest way to create Virtual Tunnels over TCP/IP networks
     <http://vtun.netpedia.net/>

  [ More URLS go here ]



  2.  Understanding Firewalls

  A firewall is a structure intended to keep a fire from spreading.
  Building have firewalls made of brick walls completely dividing
  sections of the building. In a car a firewall is the metal wall
  separating the engine and passenger compartments.

  Internet firewalls are intended to keep the flames of Internet hell
  out of your private LAN. Or, to keep the members of your LAN pure and
  chaste by denying them access the all the evil Internet temptations.
  ;-)

  The first computer firewall was a non-routing Unix host with
  connections to two different networks. One network card connected to
  the Internet and the other to the private LAN. To reach the Internet
  from the private network, you had to logon to the firewall (Unix)
  server.  You then used the resources of the system to access the
  Internet. For example, you could use X-windows to run Netscape's
  browser on the firewall system and have the display on your work
  station. With the browser running on the firewall it has access to
  both networks.

  This sort of dual homed system (a system with two network connections)
  is great if you can TRUST ALL of your users. You can simple setup a
  Linux system and give an account accounts on it to everyone needing
  Internet access. With this setup, the only computer on your private
  network that knows anything about the outside world is the firewall.
  No one can download to their personal workstations. They must first
  download a file to the firewall and then download the file from the
  firewall to their workstation.

  BIG NOTE: 99% of all break-ins start with gaining account level access
  on the system being attacked.  Because of this I don't recommend this
  type of firewall.  It is also very limiting.



  2.1.  Firewall Politics


  You shouldn't believe a firewall machine is all you need.  Set
  policies first.

  Firewalls are used for two purposes.


  1. to keep people (worms / crackers) out.

  2. to keep people (employees / children) in.

  When I started working on firewalls I was surprised to learn the
  company I worked for were more interested in "spying" on their
  employees then keeping crackers out of their networks.

  At least in my state (Oklahoma) employers have the right to monitor
  phone calls and Internet activity as long as they inform the employees
  they are doing it.


  Big Brother is not government. Big Brother = Big Business.

  Don't get me wrong. People should work, not play at work. And I feel
  the work ethic has been eroding.  However, I have also observed that
  management types are the biggest abusers of the rules they set. I have
  seen hourly workers reprimanded for using the Internet to looking for
  bus routesto get to work while the same manager used hours of work
  time looking for fine restaurants and nightclubs to take prospective
  customers.

  My fix for this type of abuse is to publish the firewall logs on a Web
  page for everyone to see.

  The security business can be scary. If you are the firewall manager,
  watch your back.


  2.1.1.  How it create a security policy

  I have seen some realy high folutin documentation on how to create a
  security policy.  After many years of experence I know now say, don't
  believe a word of them. Create a security policy is simple.


  1. describe what you need to service

  2. describe the group of people you need to service

  3. describe which service each group needs access to

  4. for each service group describe how the service should be keep
     secure

  5. write a statment making all other forms of access a vialation

  Your policy will become more complicated with time but don't try to
  cover to much ground now.  Make it simple and clear.


  2.2.  Types of Firewalls

  There are two types of firewalls.


  1. Filtering Firewalls - that block selected network packets.

  2. Proxy Servers (sometimes called firewalls) - that make network
     connections for you.


  2.2.1.  Packet Filtering Firewalls

  Packet Filtering is the type of firewall built into the Linux kernel.

  A filtering firewall works at the network level. Data is only allowed
  to leave the system if the firewall rules allow it.  As packets arrive
  they are filtered by their type, source address, destination address,
  and port information contained in each packet.

  Many network routers have the ability to perform some firewall
  services. Filtering firewalls can be thought of as a type of router.
  Because of this you need a deep understanding of IP packet structure
  to work with one.

  Because very little data is analyzed and logged, filtering firewalls
  take less CPU and create less latency in your network.
  Filtering firewalls do not provide for password controls. User can not
  identify themselves. The only identity a user has is the IP number
  assigned to their workstation. This can be a problem if you are going
  to use DHCP (Dynamic IP assignments). This is because rules are based
  on IP numbers you will have to adjust the rules as new IP numbers are
  assigned.  I don't know how to automate this process.

  Filtering firewalls are more transparent to the user.  The user does
  not have to setup rules in their applications to use the Internet.
  With most proxy servers this is not true.



  2.2.2.  Proxy Servers


  Proxies are mostly used to control, or monitor, outbound traffic. Some
  application proxies cache the requested data. This lowers bandwidth
  requirements and decreases the access the same data for the next user.
  It also gives unquestionable evidence of what was transferred.

  There are two types of proxy servers.

  1. Application Proxies - that do the work for you.

  2. SOCKS Proxies  - that cross wire ports.


  2.2.3.  Application Proxy

  The best example is a person telneting to another computer and then
  telneting from there to the outside world. With a application proxy
  server the process is automated. As you telnet to the outside world
  the client send you to the proxy first. The proxy then connects to the
  server you requested (the outside world) and returns the data to you.

  Because proxy servers are handling all the communications, they can
  log everything they (you) do. For HTTP (web) proxies this includes
  very URL they you see.  For FTP proxies this includes every file you
  download. They can even filter out "inappropriate" words from the
  sites you visit or scan for viruses.

  Application proxy servers can authenticate users. Before a connection
  to the outside is made, the server can ask the user to login first. To
  a web user this would make every site look like it required a login.



  2.2.4.  SOCKS Proxy


  A SOCKS server is a lot like an old switch board.  It simply cross
  wires your connection through the system to another outside
  connection.

  Most SOCKS server only work with TCP type connections.  And like
  filtering firewalls they don't provide for user authentication. They
  can however record where each user connected to.



  3.  Firewall Architecture

  There are lots of ways to structure your network to protect your
  systems using a firewall.

  If you have a dedicated connections to the Internet through a router,
  you could plug the router directly into your firewall system. Or, you
  could go through a hub to provide for full access servers outside your
  firewall.


  3.1.  Dial-up Architecture

  You may be using a dialup service like an ISDN line.  In this case you
  might use a third network card to provide provide a filtered DMZ. This
  gives you full control over your Internet services and still separates
  them from your regular network.


                    __________
     _/\__/\_      |          |          _______________
    |        |     | Firewall |  (LAN)  |               |
   / Internet \----|  System  |--(HUB)--| Workstation/s |
   \_  _  _  _/    |__________|         |_______________|
     \/ \/ \/           |
                      (DMZ)
                      (HUB)



  3.2.  Single Router Architecture

  If there is a router or cable modem between you and the Internet. If
  you own the router you could setup some hard filter rules in the
  router. If this router is owned by your ISP so you may not the have
  the needed controls. You can ask your ISP to put in filters.


                    _________           __________
     _/\__/\_      | Router  |         |          |          _______________
    |        |     |   or    |  (DMZ)  | Firewall |  (LAN)  |               |
   / Internet \----|Cable Mdm|--(HUB)--|  System  |--(HUB)--| Workstation/s |
   \_  _  _  _/    |_________|    |    |__________|         |_______________|
     \/ \/ \/                     |
                              (Outside)
                              (Server)



  3.3.  Firewall with Proxy Server

  If you need to monitor where users of your network are going and your
  network is small, you can intergrate a proxy server into your
  firewall.  ISP's some times do this to create interest list of their
  users to resell to marketing agencies.


                     __________
      _/\__/\_      | Proxy /  |          _______________
     |        |     | Firewall |  (LAN)  |               |
    / Internet \----|  System  |--(HUB)--| Workstation/s |
    \_  _  _  _/    |__________|         |_______________|
      \/ \/ \/



  You can put the proxy server on your LAN as will.  In this case the
  firewall should have rules to only allow the proxy server to connect
  to the Internet for the services it is providing.  This way the users
  can get to the Internet only through the proxy.


                    __________
     _/\__/\_      |          |          _______________
    |        |     | Firewall |  (LAN)  |               |
   / Internet \----|  System  |--(HUB)--| Workstation/s |
   \_  _  _  _/    |__________|    |    |_______________|
     \/ \/ \/                      |     ______________
                                   |    |              |
                                   +----| Proxy Server |
                                        |______________|



  3.4.  Redundent Internet Configuration

  If you are going to run a service like YAHOO or maybe SlashDot you may
  want to make your system by using redundant routers and firewalls.
  (Check out the High Availability HowTo.)

  By using a round-robin DNS techniques to provide access to multipule
  web servers from one URL and multiple ISP's, routers and firewalls
  using High Avaibility technics you can create a 100% uptime service.


     _/\__/\_                                     _/\__/\_
    |        |                                   |        |
   /  ISP #1  \______                 (WAN)_____/ Partners \
   \_  _  _  _/      |                (HUB)     \_  _  _  _/
     \/ \/ \/        |               ___|____     \/ \/ \/
                   __|___           |_______ |
     _/\__/\_     |_____ |         |Firewall||          ______
    |        |   |      ||  (DMZ)  | System ||  (LAN)  |      |
   /  ISP #2  \--|Router||--(HUB)--|  (VPN) ||--(HUB)--| WS/s |
   \_  _  _  _/  |______|     |    |________|     |    |______|
     \/ \/ \/                 |         |         |     ______
            |             (Outside)  (Shared)     |    |      |
    ------  |             (Server)   (Server)     +----|Proxy |
   | WS/s | |                                          |______|
   | VPN  |-+
   |______|



  It is easy to let your network get out of hand.  Keep control of every
  connection. It only takes a user with a modem to compromise your LAN.



  4.  Setting up the Linux Filtering Firewall


  4.1.  Hardware requirements


  Filtering firewalls don't require fancy hardware. They are little more
  then simple routers.

  All you need is:


  1. a 486-DX66 with 32 meg of memory


  2. a 250m hard disk (500 recommended)

  3. network connections (LAN Cards, Serial Ports, Wireless?)

  4. monitor and keyboard

  With some systems by using a serial port console, you can even
  eliminate the monitor and keyboard.

  If you need a proxy server that will handle lots of traffic, you
  should get the largest system you can afford.  This is because for
  every user that connects to the system it will be creating another
  process. If you will have 50 or more concurrent users I'm guessing you
  will need:


  1. a Pentium II with 64meg of memory

  2. a two gig hard disk to store all the logs

  3. two network connections

  4. monitor and keyboard

     The network connections can be any type (NIC cards, ISDN, even
     modems).


  5.  Software requirements


  5.1.  Selecting a Kernel


  To create a filtering firewall, you don't need any special software.
  Linux will do. At the time of this writing I'm using RedHat 6.1.

  The bilt in Linux firewall have changed several times. If you are
  using an old Linux kernel (1.0.x or older) geta new copy. These older
  used ipfwadm from http://www.xos.nl/linux/ipfwadm/ and is no longer
  supported.

  If you are using 2.2.13 or newer you will be using ipchaining as
  developed by http://www.rustcorp.com/linux/ipchains/

  If you are using the newer 2.4 kernal there is a new firewall utility
  with more feachers.  I will write about this soon.


  5.2.  Selecting a proxy server

  If you want to setup a proxy server you will need one of these
  packages.


  1. Squid

  2. The TIS Firewall Toolkit (FWTK)

  3. SOCKS


  Squid is a great package and works with Linux's Transparent Proxy
  feature. I will be describing how to setup this server.


  AT the time of this writing, Network Associates
  <http://www.networkassociates.com/> and Trusted Information System's
  (TIS) , have merged. So keep watching their web sites for more
  information about changes. Mean while, the Tool Kit can still be had
  at. http://www.tis.com/research/software/
  <http://www.tis.com/research/software/>

  Trusted Information System put out a collection of programs designed
  to facilitate firewalling.  With this toolkit, you set up one daemon
  for each service (WWW, telnet ect.) you will be using.


  6.  Preparing the Linux system

  Install as little of the Linux system as you can. My  installation
  started with a server configuration and then I turn off ever un-needed
  service in /etc/inetd.conf.  For more security you should uninstall
  the unneeded service.

  Because most distributions don't dome with a kernel usefull to your
  perpose.  You will need to compile your own kernal. It is best if you
  do this on a computer other then the firewall. If you do install a C
  compiler and utilities on your firewall, remove them after you have
  completed comfiguring your kernel.


  6.1.  Compiling the Kernel


  Start with a clean minimal installation of your Linux distribution.
  The less software you have loaded the less holes, backdoors and/or
  bugs there will be to introduce security problems in your server.

  Pick a stable kernel. I am using kernel 2.2.13 kernel for my system.
  So this documentation is based on it's settings.

  You well need to recompile the Linux kernel with the appropriate
  options. If you haven't recompiled your kernel before you should read
  the Kernel HOWTO, the Ethernet HOWTO, and the NET-2 HOWTO.

  Here are the network related setting I know work.  I have marked some
  with a ?. If you will be using this feature, turn it on as well.

  I use "make menuconfig" to edit my kernel settings.



      <*> Packet socket
      [ ] Kernel/User netlink socket
      [*] Network firewalls
      [ ] Socket Filtering
      <*> Unix domain sockets
      [*] TCP/IP networking
      [ ] IP: multicasting
      [*] IP: advanced router
      [ ] IP: kernel level autoconfiguration
      [*] IP: firewalling
      [?] IP: always defragment (required for masquerading)
      [?] IP: transparent proxy support
      [?] IP: masquerading
      --- Protocol-specific masquerading support will be built as modules.
      [?] IP: ICMP masquerading
      --- Protocol-specific masquerading support will be built as modules.
      [ ] IP: masquerading special modules support
      [*] IP: optimize as router not host
      < > IP: tunneling
      < > IP: GRE tunnels over IP
      [?] IP: aliasing support
      [*] IP: TCP syncookie support (not enabled per default)
      --- (it is safe to leave these untouched)
      < > IP: Reverse ARP
      [*] IP: Allow large windows (not recommended if <16Mb of memory)
      < > The IPv6 protocol (EXPERIMENTAL)
      ---
      < > The IPX protocol
      < > Appletalk DDP
      < > CCITT X.25 Packet Layer (EXPERIMENTAL)
      < > LAPB Data Link Driver (EXPERIMENTAL)
      [ ] Bridging (EXPERIMENTAL)
      [ ] 802.2 LLC (EXPERIMENTAL)
      < > Acorn Econet/AUN protocols (EXPERIMENTAL)
      < > WAN router
      [ ] Fast switching (read help!)
      [ ] Forwarding between high speed interfaces
      [ ] PU is too slow to handle full bandwidth
      QoS and/or fair queueing  --->



  After making all the setting you need you should recompile, reinstall
  the kernel and reboot.

  I use the command:

  make dep;make clean;make bzlilo;make modules;make modules_install;init
  6 to accomplish all of this in one step.



  6.2.  Configuring two network cards


  If you have two network cards in your computer, you may need to add an
  append statement to your /etc/lilo.conf file to describe the IRQ and
  address of both cards.  My lilo append statement looks like this:



  append="ether=12,0x300,eth0 ether=15,0x340,eth1"



  6.3.  Configuring the Network Addresses


  Now we arrive at the fun part of our setup. I'm not going to go deep
  into how to setup a LAN.  Read the Networking-HOWTO to solve your
  problems here.

  Your goal is to provide two network connection to your filtering
  firewall system. One on the Internet (unsecured side) and one on the
  LAN (secure side).

  Anyway, you have a few decisions to make.


  1. Will you use Real IP number or Make some up for your LAN.

  2. Will your ISP assign the number or will you be using static IP
     numbers?

  Since you don't want the internet to have access to your private
  network, you don't need to use "real addresses".  You could just
  makeup addresses for your private LAN. But this is not recommended. If
  data gets routed out of your LAN, it might end up at another systems
  port.

  There are a number of Internet address ranges set aside for private
  networks. Of these, 192.168.1.xxx, is set aside and we will use it in
  our examples.

  You will need to use IP masquerading to make this happen. With this
  process the firewall will forward packets and translate them into
  "REAL " " IP address to travel on the Internet.

  Using these non-routable IP address makes your network is more secure.
  Internet routers will not pass packets with these addresses.

  You may want to read the IP Masquerading HOWTO at this point.


              24.94.1.123  __________    192.168.1.1
        _/\__/\_        \ |          | /           _______________
       |        |        \| Firewall |/           |               |
      / Internet \--------|  System  |------------| Workstation/s |
      \_  _  _  _/        |__________|            |_______________|
        \/ \/ \/



  You must have a "real" IP address to assign to your Internet network
  card. This address can be permanently assigned to you. (A static IP
  address) or it can be assigned at network connect time by the PPP
  process.

  You assign your inside IP numbers. Like 192.168.1.1 to the LAN card.
  This will be your gateway IP address.  You can assign all the other
  machines in the protected network (LAN) a number in the 192.168.1.xxx
  range. (192.168.1.2 through 192.168.1.254)

  I use RedHat Linux. To configure the network at boot time I added a
  ifcfg-eth1 file in the  /etc/sysconfig/network-scripts directory.  You
  may also find a ifcfg-ppp0 or ifcfg-tr0 in this directory. These
  'ifcfg-' files are used by RedHat to configure and enable your network
  devices at boot time. The are named after the connection type.

  Here is the ifcfg-eth1 (second ehternet card) for our example;

      DEVICE=eth1
      IPADDR=192.168.1.1
      NETMASK=255.255.255.0
      NETWORK=192.168.1.0
      BROADCAST=192.168.1.255
      GATEWAY=24.94.1.123
      ONBOOT=yes



  If you are going to use a dialup connection you will need to look at
  the ifcfg-ppp0 and the chat-ppp0 file. These control your PPP
  connection.

  This ifcfg file might look like;


      DEVICE="ppp0"
      ONBOOT="yes"
      USERCTL="no"
      MODEMPORT="/dev/modem"
      LINESPEED="115200"
      PERSIST="yes"
      DEFABORT="yes"
      DEBUG="yes"
      INITSTRING="ATZ"
      DEFROUTE="yes"
      HARDFLOWCTL="yes"
      ESCAPECHARS="no"
      PPPOPTIONS=""
      PAPNAME="LoginID"
      REMIP=""
      NETMASK=""
      IPADDR=""
      MRU=""
      MTU=""
      DISCONNECTTIMEOUT=""
      RETRYTIMEOUT="5"
      BOOTPROTO="none"



  6.4.  Testing your network


  Start by using the ifconfig and route commands.  If you have two
  network cards ifconfig should look something like:



    #ifconfig
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:3924  Metric:1
              RX packets:1620 errors:0 dropped:0 overruns:0
              TX packets:1620 errors:0 dropped:0 overruns:0
              collisions:0 txqueuelan:0

    eth0      Link encap:10Mbps Ethernet  HWaddr 00:00:09:85:AC:55
              inet addr:24.94.1.123 Bcast:24.94.1.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1000 errors:0 dropped:0 overruns:0
              TX packets:1100 errors:0 dropped:0 overruns:0
              collisions:0 txqueuelan:0
              Interrupt:12 Base address:0x310

    eth1      Link encap:10Mbps Ethernet  HWaddr 00:00:09:80:1E:D7
              inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1110 errors:0 dropped:0 overruns:0
              TX packets:1111 errors:0 dropped:0 overruns:0
              collisions:0 txqueuelan:0
              Interrupt:15 Base address:0x350



  and your route table should look like:


    #route -n
    Kernel routing table
    Destination     Gateway         Genmask         Flags MSS    Window Use Iface
    24.94.1.0       *               255.255.255.0   U     1500   0       15 eth0
    192.168.1.0     *               255.255.255.0   U     1500   0        0 eth1
    127.0.0.0       *               255.0.0.0       U     3584   0        2 lo
    default         24.94.1.123     *               UG    1500   0       72 eth0



  Note: 24.94.1.0 is the Internet side of this firewall and 192.168.1.0
  is the private (LAN) side.

  You should start by making sure every computer on your LAN can ping
  the inside address of your firewall system. (192.168.1.1 in this
  example) If not, go over the NET-2 HOWTO again and work on the network
  some more.

  Next, from the firewall, try to ping a Internet system.  I use
  www.internic.net as my test point.  If it doesn't work, try a server
  at your ISP. If this doesn't work some part of your Internet
  connection is wrong.  You should be able to connect to the anywhere on
  the Internet from the firewall. Try looking at your default gateway
  setting.  If you are using a dialup connection double check your user
  ID and Password. Reread the Net-2 HOWTO, and try again.

  Now try to ping the outside address of the firewall (24.94.1.123) from
  a computer on your LAN. This shouldn't work.  If it does, you have
  masquerading or IP Forwarding turned on, or you already have some
  packet filtering set. Turn them off and try again. You need to know
  the filtering is in place.

  For kernels newer then 2.1.102 you can issue the command;


      echo "0" > /proc/sys/net/ipv4/ip_forward

  If you are using an older kernel (WHY) you will need to re-compile
  your kernel with forwarding turned off. (Just upgrade.)

  Try pinging the outside address of the firewall (24.94.1.123) again.
  It shouldn't work.

  Now turn on IP forwarding and/or masquerading. You should be able to
  ping the anywhere on the Internet from any system on your LAN.


      echo "1" > /proc/sys/net/ipv4/ip_forward



  BIG NOTE: If you are using "REAL" IP addresses on your LAN (not
  192.168.1.*) and you can't ping the internet but you CAN ping the
  Internet side of your firewall, make sure your ISP is routing packets
  for your private network address.

  A test for this problem is to have someone else on the Internet (say a
  friend using a local provider) use traceroute to your network. If the
  trace stops at your providers router, then they are not forwarding
  your traffic.

  It works? Great. The hard part is done. :-)



  6.5.  Securing the Firewall

  A firewall isn't any good if the system it is build on is left wide
  open to attacks.  A "bad guy" could gain access to the through a non
  firewall service and modify it for their own needs. You need to
  turning off any unneeded services.

  Look in your /etc/inetd.conf file.  This file configures inetd also
  known as the "super server".  It controls a bunch of the server
  daemons and starts them as they are requested by a packet arriving at
  a "well known" port.

  You should turn off echo, discard, daytime, chargen, ftp, gopher,
  shell, login, exec, talk, ntalk, pop-2, pop-3, netstat, systat, tftp,
  bootp,  finger, cfinger, time, swat and linuxconfig if you have one.

  To turn a service off, put # as the first character of the service
  line.  When your done, send a SIG-HUP to the process by typing "kill
  -HUP <pid>", where <pid> is the process number of inetd.  This will
  make inetd re-read its configuration file (inetd.conf) and restart
  without taking your system down.

  Test this by telneting to port 15 (netstat) on firewall.  If you get
  any output you have not turned these services off.

  telnet localhost 19

  You can also create the file /etc/nologin. Put a few line of text in
  it like (BUZZ OFF). When this file exists, login will not allow user
  to logon. They will see the contents of this file and their logins
  refused. Only root can logon.

  You can also edit the file /etc/securetty. If  the  user  is  root,
  then  the  login  must  be  occurring  on  a  tty  listed  in
  /etc/securetty.  Failures will be logged with the syslog facility.
  With both of these controls in place the only way to logon to the
  firewall will be as root from the console.

  NEVER EVER TELNET to a system and log IN AS ROOT.  If you need remote
  root access SSH (Secure Shell).  You might even turn off telnet.

  If you are really paranoid you need to be using lids (Linux Intrusion
  Detect System). It is an intrusion detection system patch for the
  Linux kernel; it can protect important files from being changed. When
  it's in effect, no one (including root) can change the protected files
  or directories and their sub-directories. You have to reboot the
  system with a security=1 LILO setting to modify secure files. (I'd
  also boot into single user mode.)


  7.  IP filtering setup (IPFWADM)


  If you are using kernel 2.1.102 or newer skip to the next section on
  IPCHAINS.

  In older kernels IP Forwarding is turned on by default in the kernel.
  Because of this, your network should start by denying access to
  everything and flushing any ipfw rules in place from the last time it
  was run. This script fragment should go in your network startup
  script. (/etc/rc.d/init.d/network)


    #
    # setup IP packet Accounting and Forwarding
    #
    #   Forwarding
    #
    # By default DENY all services
    ipfwadm -F -p deny
    # Flush all commands
    ipfwadm -F -f
    ipfwadm -I -f
    ipfwadm -O -f



  Now we have the ultimate firewall. Nothing can get through.

  Now create the file /etc/rc.d/rc.firewall. This script should allow
  email, Web and DNS traffic through. ;-)



  #! /bin/sh
  #
  # rc.firewall
  #
  # Source function library.
  . /etc/rc.d/init.d/functions

  # Get config.
  . /etc/sysconfig/network

  # Check that networking is up.
  if [ ${NETWORKING} = "no" ]
  then
          exit 0
  fi
  case "$1" in
    start)
    echo -n "Starting Firewall Services: "
    # Allow email to got to the server
    /sbin/ipfwadm -F -a accept -b -P tcp -S 0.0.0.0/0 1024:65535 -D 192.1.2.10 25
    # Allow email connections to outside email servers
    /sbin/ipfwadm -F -a accept -b -P tcp -S 192.1.2.10 25 -D 0.0.0.0/0 1024:65535
    # Allow Web connections to your Web Server
    /sbin/ipfwadm -F -a accept -b -P tcp -S 0.0.0.0/0 1024:65535 -D 192.1.2.11 80
    # Allow Web connections to outside Web Server
    /sbin/ipfwadm -F -a accept -b -P tcp -S 192.1.2.* 80 -D 0.0.0.0/0 1024:65535
    # Allow DNS traffic
    /sbin/ipfwadm -F -a accept -b -P udp -S 0.0.0.0/0 53 -D 192.1.2.0/24
    ;;
    stop)
    echo -n "Stooping Firewall Services: "
    ipfwadm -F -p deny
    ;;
    status)
    echo -n "Now do you show firewall stats?"
    ;;
    restart|reload)
          $0 stop
          $0 start
          ;;
    *)
          echo "Usage: firewall {start|stop|status|restart|reload}"
          exit 1
  esac



  NOTE: In this example we have the email (smtp) server running at
  192.1.2.10 that must be able to send and receive on port 25. The web
  server running at 192.1.2.11. We are allowing anyone on the LAN to get
  to outside web and DNS servers.

  This is not perfectly secure. Because port 80 doesn't have to used as
  a web port, a smart hacker might use this port to create a virtual
  private network (VPN) through the firewall.  The way around this is to
  setup a web proxy. and only allow the proxy through the firewall.
  Users on the LAN will have to go through the proxy to get to outside
  web servers.

  You might also be interested in accounting for traffic going through
  your firewall. This script will count ever packet.  You could add a
  line or two to account for packets going to just a single system.



    # Flush the current accounting rules
    ipfwadm -A -f
    # Accounting
    /sbin/ipfwadm -A -f
    /sbin/ipfwadm -A out -i -S 192.1.2.0/24 -D 0.0.0.0/0
    /sbin/ipfwadm -A out -i -S 0.0.0.0/0 -D 192.1.2.0/24
    /sbin/ipfwadm -A in -i -S 192.1.2.0/24 -D 0.0.0.0/0
    /sbin/ipfwadm -A in -i -S 0.0.0.0/0 -D 192.1.2.0/24



  If all you need is a filtering firewall you can stop here.  Test it
  and Enjoy.



  8.  IP filtering setup (IPCHAINS)

  Linux ipchains is a rewrite of the Linux IPv4 firewalling code and a
  rewrite of ipfwadm, which was a rewrite of BSD's ipfw, I believe. It
  is required to administer the IP packet filters in Linux kernel
  versions 2.1.102 and above.

  The older code doesn't deal with fragments, has 32-bit counters (on
  Intel at least), doesn't allow specification of protocols other than
  TCP, UDP or ICMP, can't make large changes atomically, can't specify
  inverse rules, has some quirks, and can be tough to manage (making it
  prone to user error). Or so the author says.

  I'm not going to get real deep into how to control an IPChains
  firewall because there is a GREAT!! HOWTO on it at
  http://www.rustcorp.com/linux/ipchains/HOWTO.html
  <http://www.rustcorp.com/linux/ipchains/HOWTO.html>. I'd just end up
  duplicating it here. Here are the basics.

  You work with chains by name. You start with three built-in chains
  input, output and forward which you can't delete.  You can create
  chains of your own. Rules can then be added and deleted from these
  rule sets.

  The operations to work on entire chains are;


  1. Create a new chain (-N).

  2. Delete an empty chain (-X).

  3. Change the policy for a built-in chain. (-P).

  4. List the rules in a chain (-L).

  5. Flush the rules out of a chain (-F).

  6. Zero the packet and byte counters on all rules in a chain (-Z).

  There are several ways to manipulate rules inside a chain:


  1. Append a new rule to a chain (-A).

  2. Insert a new rule at some position in a chain (-I).

  3. Replace a rule at some position in a chain (-R).

  4. Delete a rule at some position in a chain (-D).

  5. Delete the first rule that matches in a chain (-D).

  There are a few operations for masquerading, which are in ipchains for
  want of a good place to put them:


  1. List the currently masqueraded connections (-M -L).

  2. Set masquerading timeout values (-M -S).

  There are some timing issues involved in altering firewall rules. If
  you are not careful, you can let packets through while you are half-
  way through your changes. A simplistic approach is to do the
  following:


       # ipchains -I input 1 -j DENY
       # ipchains -I output 1 -j DENY
       # ipchains -I forward 1 -j DENY



  ... make changes ...


       # ipchains -D input 1
       # ipchains -D output 1
       # ipchains -D forward 1
       #



  This drops all packets for the duration of the changes.

  Here a duplicate of the above firewall rules in IPChains.



  #!/bin/sh
  #
  # rc.firewall
  #
  ## Flush everything, start from scratch
    /sbin/ipchains -F input
    /sbin/ipchains -F output
    /sbin/ipchains -F forward

  ## Redirect for HTTP Transparent Proxy
    #$IPCHAINS  -A input -p tcp -s 192.1.2.0/24 -d 0.0.0.0/0 80 -j REDIRECT 8080

  ## Create your own chain
    /sbin/ipchains -N my-chain
    # Allow email to got to the server
    /sbin/ipchains -A my-chain -s 0.0.0.0/0 smtp -d 192.1.2.10 1024:-j ACCEPT
    # Allow email connections to outside email servers
    /sbin/ipchains -A my-chain -s 192.1.2.10 -d 0.0.0.0/0 smtp -j ACCEPT
    # Allow Web connections to your Web Server
    /sbin/ipchains -A my-chain -s 0.0.0.0/0 www -d 192.1.2.11 1024: -j ACCEPT
    # Allow Web connections to outside Web Server
    /sbin/ipchains -A my-chain -s 192.1.2.0/24 1024: -d 0.0.0.0/0 www -j ACCEPT
    # Allow DNS traffic
    /sbin/ipchains -A my-chain -p UDP -s 0.0.0.0/0 dns -d 192.1.2.0/24 -j ACCEPT

  ## If you are using masquerading
    # don't masq internal-internal traffic
    /sbin/ipchains -A forward -s 192.1.2.0/24 -d 192.1.2.0/24 -j ACCEPT
    # don't masq external interface direct
    /sbin/ipchains -A forward -s 24.94.1.0/24 -d 0.0.0.0/0 -j ACCEPT
    # masquerade all internal IP's going outside
    /sbin/ipchains -A forward -s 192.1.2.0/24 -d 0.0.0.0/0 -j MASQ

  ## Deny everything else
    /sbin/ipchains -P my-chain input DENY



  Don't stop here.  This is not a great firewall and I'm sure you have
  other services you will be providing.  Again, read the IPCHAINS-HOWTO.



  9.  Installing a Transparent SQUID proxy

  The squid proxy is available at  http://squid.nlanr.net/
  <http://squid.nlanr.net/>.

  The SQUID developers provide RedHat and Debian packages.  If you can,
  use one of these.



  10.  Installing the TIS Proxy server



  10.1.  Getting the software

  The TIS FWTK is available at http://www.tis.com/research/software/
  <http://www.tis.com/research/software/ >.

  Don't make the mistake I did. When you ftp files from TIS, READ THE
  README's. The TIS fwtk is locked up in a hidden directory on their
  server.
  TIS requires you read their agreement at
  http://www.tis.com/research/software/fwtk_readme.html
  <http://www.tis.com/research/software/fwtk_readme.html > and then send
  email to fwtk-request@tislabs.com <mailto:fwtk-request@tislabs.com>
  with only the word accepted in the body of the message to learn the
  name of this hidden directory. No subject is needed in the message.
  Their system will then mails you back the directory name (good for 12
  hours) to download the source.

  As of this writing, the current version of FWTK is 2.1.


  10.2.  Compiling the TIS FWTK


  Version 2.1 of the FWTK compiles much easier then any of the older
  versions.

  EXPLAIN HERE!!!

  Now run make.



  10.3.  Installing the TIS FWTK

  Run make install.

  The default installation directory is /usr/local/etc. You could change
  this (I didn't) to a more secure directory. I chose to change the
  access to this directory to 'chmod 700'.

  All last is left now is to configure the firewall.


  10.4.  Configuring the TIS FWTK


  Now the fun really begins. We must teach the system to call theses new
  services and create the tables to control them.

  I'm not going to try to re-write the TIS FWTK manual here. I will show
  you the setting I found worked and explain the problems I ran into and
  how I got around them.

  There are three files that make up these controls.



  o  /etc/services

  o  Tells the system what ports a services is on.


  o  /etc/inetd.conf

  o  Tells inetd what program to call when someone knocks on a service
     port.


  o  /usr/local/etc/netperm-table

  o  Tells the FWTK services who to allow and deny service to.

  To get the FWTK functioning, you should edit these files from the
  bottom up. Editing the services file without the inetd.conf or
  netperm-table file set correctly could make your system inaccessible.


  10.4.1.  The netperm-table file


  This file controls who can access the services of the TIS FWTK. You
  should think about the traffic using the firewall from both sides.
  People outside your network should identify themselves before gaining
  access, but the people inside your network might be allowed to just
  pass through.

  So people can identify themselves, the firewall uses a program called
  authsrv to keep a database of user IDs and passwords. The
  authentication section of the netperm-table controls where the
  database is keep and who can access it.

  I had some trouble closing the access to this service. Note the
  premit-hosts line I show uses a '*' to give everyone access. The
  correct setting for this line is '' authsrv: premit-hosts localhost if
  you can get it working.


    #
    # Proxy configuration table
    #
    # Authentication server and client rules
    authsrv:      database /usr/local/etc/fw-authdb
    authsrv:      permit-hosts *
    authsrv:      badsleep 1200
    authsrv:      nobogus true
    # Client Applications using the Authentication server
    *:            authserver 127.0.0.1 114



  To initialize the database, su to root, and run ./authsrv in the
  /var/local/etc directory to create the administrative user record.
  Here is a sample session.

  Read the FWTK documentation to learn how to add users and groups.



      #
      # authsrv
      authsrv# list
      authsrv# adduser admin "Auth DB admin"
      ok - user added initially disabled
      authsrv# ena admin
      enabled
      authsrv# proto admin pass
      changed
      authsrv# pass admin "plugh"
      Password changed.
      authsrv# superwiz admin
      set wizard
      authsrv# list
      Report for users in database
      user   group  longname           ok?    proto   last
      ------ ------ ------------------ -----  ------  -----
      admin         Auth DB admin      ena    passw   never
      authsrv# display admin
      Report for user admin (Auth DB admin)
      Authentication protocol: password
      Flags: WIZARD
      authsrv# ^D
      EOT
      #



  The telnet gateway (tn-gw) controls are straight forward and the first
  you should set up.

  In my example, I permit host from inside the private network to pass
  through without authenticating themselves. (permit-hosts 19961.2.*
  -passok) But, any other user must enter their user ID and password to
  use the proxy. (permit-hosts * -auth)

  I also allow one other system (192.1.2.202) to access the firewall
  directly without going through the firewall at all. The two inetacl-
  in.telnetd lines do this.  I will explain how these lines are called
  latter.

  The Telnet timeout should be keep short.


    # telnet gateway rules:
    tn-gw:                denial-msg      /usr/local/etc/tn-deny.txt
    tn-gw:                welcome-msg     /usr/local/etc/tn-welcome.txt
    tn-gw:                help-msg        /usr/local/etc/tn-help.txt
    tn-gw:                timeout 90
    tn-gw:                permit-hosts 192.1.2.* -passok -xok
    tn-gw:                permit-hosts * -auth
    # Only the Administrator can telnet directly to the Firewall via Port 24
    netacl-in.telnetd: permit-hosts 192.1.2.202 -exec /usr/sbin/in.telnetd



  The r-commands work the same way as telnet.



    # rlogin gateway rules:
    rlogin-gw:    denial-msg      /usr/local/etc/rlogin-deny.txt
    rlogin-gw:    welcome-msg     /usr/local/etc/rlogin-welcome.txt
    rlogin-gw:    help-msg        /usr/local/etc/rlogin-help.txt
    rlogin-gw:    timeout 90
    rlogin-gw:    permit-hosts 192.1.2.* -passok -xok
    rlogin-gw:    permit-hosts * -auth -xok
    # Only the Administrator can telnet directly to the Firewall via Port
    netacl-rlogind: permit-hosts 192.1.2.202 -exec /usr/libexec/rlogind -a



  You shouldn't have anyone accessing your firewall directly and that
  includes FTP so don't put an FTP, server on you firewall.

  Again, the permit-hosts line allows anyone in the protected network
  free access to the Internet and all others must authenticate
  themselves. I included logging of every file sent and received to my
  controls. (-log { retr stor })

  The ftp timeout controls how long it will take to drop a bad
  connections as well as how long a connection will stay open with out
  activity.


    # ftp gateway rules:
    ftp-gw:               denial-msg      /usr/local/etc/ftp-deny.txt
    ftp-gw:               welcome-msg     /usr/local/etc/ftp-welcome.txt
    ftp-gw:               help-msg        /usr/local/etc/ftp-help.txt
    ftp-gw:               timeout 300
    ftp-gw:               permit-hosts 192.1.2.* -log { retr stor }
    ftp-gw:               permit-hosts * -authall -log { retr stor }



  Web, gopher and browser based ftp are contorted by the http-gw. The
  first two lines create a directory to store ftp and web documents as
  they are passing through the firewall. I make these files owned by
  root and put the in a directory accessible only by root.

  The Web connection should be kept short. It controls how long the user
  will wait on a bad connections.


    # www and gopher gateway rules:
    http-gw:      userid          root
    http-gw:      directory       /jail
    http-gw:      timeout 90
    http-gw:      default-httpd   www.afs.net
    http-gw:      hosts           192.1.2.* -log { read write ftp }
    http-gw:      deny-hosts      *



  The ssl-gw is really just a pass anything gateway. Be carefully with
  it. In this example I allow anyone inside the protected network to
  connect to any server outside the network except the addresses
  127.0.0.* and 192.1.1.* and then only on ports 443 through 563. Ports
  443 through 563 are known SSL ports.


    # ssl gateway rules:
    ssl-gw:         timeout 300
    ssl-gw:         hosts           192.1.2.* -dest { !127.0.0.* !192.1.1.* *:443:563 }
    ssl-gw:         deny-hosts      *

  Here is an example of how to use the plug-gw to allow connections to a
  news server.  In this example I allow anyone inside the protected
  network to connect to only one system and only to it's news port.

  The seconded line allows the news server to pass its data back to the
  protected network.

  Because most clients expect to stay connected while the user read
  news, the timeout for a news server should be long.



    # NetNews Pluged gateway
    plug-gw:        timeout 3600
    plug-gw: port nntp 192.1.2.* -plug-to 24.94.1.22 -port nntp
    plug-gw: port nntp 24.94.1.22 -plug-to 192.1.2.* -port nntp



  The finger gateway is simple. Anyone inside the protected network must
  login first and then we allow them to use the finger program on the
  firewall. Anyone else just gets a message.


    # Enable finger service
    netacl-fingerd: permit-hosts 192.1.2.* -exec /usr/libexec/fingerd
    netacl-fingerd: permit-hosts * -exec /bin/cat /usr/local/etc/finger.txt



  I haven't setup the Mail and X-windows services so I'm not including
  examples.  If anyone has a working example, please send me email.



  10.4.2.  The /etc/services file


  This is where it all begins. When a client connects to the firewall it
  connects on a known port (less then 1024).  For example telnet
  connects on port 23. The inetd deamon hears this connection and looks
  up the name of these service in the /etc/services file. It then calls
  the program assigned to the name in the /etc/inetd.conf file.

  Some of the services we are creating are not normally in the
  /etc/services file. You can assign some of them to any port you want.
  For example, I have assigned the administrator's telnet port (telnet-
  a) to port 24. You could assign it to port 2323 if you wished. For the
  administrator (YOU) to connect directly to the firewall you will need
  to telnet to port 24 not 23 and if you setup your netperm-table file,
  like I did, you will only be able to this from one system inside your
  protected network.



    telnet-a        24/tcp
    ftp-gw          21/tcp           # this named changed
    auth            113/tcp   ident    # User Verification
    ssl-gw          443/tcp



  11.  The SOCKS Proxy Server


  11.1.  Setting up the Proxy Server

  The SOCKS proxy server available from http://www.socks.nec.com/.

  Uncompressed and untar the files into a directory on your system, and
  follow the instructions on how to make it.  I had a couple problems
  when I made it.  Make sure that your Makefiles are correct.

  One important thing to note is that the proxy server needs to be added
  to /etc/inetd.conf.  You must add a line:


    socks  stream  tcp  nowait  nobody  /usr/local/etc/sockd  sockd



  to tell the server to run when requested.


  11.2.  Configuring the Proxy Server


  The SOCKS program needs two separate configuration files.  One to tell
  the access allowed, and one to route the requests to the appropriate
  proxy server.  The access file should be housed on the server.  The
  routing file should be housed on every UNIX machine.  The DOS and,
  presumably, Macintosh computers will do their own routing.


  11.2.1.  The Access File

  With socks4.2 Beta, the access file is called "sockd.conf".It should
  contain 2 lines, a permit and a deny line.   Each line will have three
  entries:


  o  The Identifier (permit/deny)

  o  The IP address

  o  The address modifier

  The identifier is either permit or deny.  You should have both a
  permit and a deny line.

  The IP address holds a four byte address in typical IP dot notation.
  I.E.  192.168.1.0.

  The address modifier is also a typical IP address four byte number. It
  works like a netmask.  Envision this number to be 32 bits (1s or 0s).
  If the bit is a 1, the corresponding bit of the address that it is
  checking must match the corresponding bit in the IP address field. For
  instance, if the line is:


      permit 192.168.1.23 255.255.255.255



  it will permit only the IP address that matches every bit in
  192.168.1.23, eg, only 192.168.1.3.  The line:


      permit 192.168.1.0 255.255.255.0



  will permit every number within group 192.168.1.0 through
  192.168.1.255, the whole C Class domain.   One should not have the
  line:


      permit 192.168.1.0 0.0.0.0



  as this will permit every address, regardless.

  So, first permit every address you want to permit, and then deny the
  rest.  To allow everyone in the domain 192.168.1.xxx, the lines:


      permit 192.168.1.0 255.255.255.0
      deny 0.0.0.0 0.0.0.0



  will work nicely.  Notice the first "0.0.0.0" in the deny line.  With
  a modifier of 0.0.0.0, the IP address field does not matter.  All 0's
  is the norm because it is easy to type.

  More than one entry of each is allowed.

  Specific users can also be granted or denied access.  This is done via
  ident authentication.  Not all systems support ident, including
  Trumpet Winsock, so I will not go into it here.  The documentation
  with socks is quite adequate on this subject.


  11.2.2.  The Routing File


  The routing file in SOCKS is poorly named "socks.conf".  I say "poorly
  named" because it is so close to the name of the access file that it
  is easy to get the two confused.

  The routing file is there to tell the SOCKS clients when to use socks
  and when not to.  For instance, in our network, 192.168.1.3 will not
  need to use socks to talk with 192.168.1.1, firewall.  It has a direct
  connection in via Ethernet.  It defines 127.0.0.1, the loopback,
  automatically.  Of course you do not need SOCKS to talk to yourself.
  There are three entries:



  o  deny

  o  direct

  o  sockd

  Deny tells SOCKS when to reject a request.  This entry has the same
  three fields as in sockd.conf, identifier, address and modifier.
  Generally, since this is also handled by sockd.conf, the access file,
  the modifier field is set to 0.0.0.0.  If you want to preclude
  yourself from calling any place, you can do it here.

  The direct entry tells which addresses to not use socks for.  These
  are all the addresses that can be reached without the proxy server.
  Again we have the three fields, identifier, address and modifier.  Our
  example would have


      direct 192.168.1.0 255.255.255.0



  Thus going direct for any on our protected network.

  The sockd entry tells the computer which host has the socks server
  daemon on it.  The syntax is:


    sockd @=<serverlist> <IP address> <modifier>



  Notice the @= entry.  This allows you to set the IP addresses of a
  list of proxy servers.  In our example, we only use one proxy server.
  But, you can have many to allow a greater load and for redundancy in
  case of failure.

  The IP address and modifier fields work just like in the other
  examples.  You specify which addresses go where through these. 6.2.3.
  DNS from behind a Firewall

  Setting up Domain Name service from behind a firewall is a relatively
  simple task.  You need merely to set up the DNS on the firewalling
  machine.  Then, set each machine behind the firewall to use this DNS.


  11.3.  Working With a Proxy Server


  11.3.1.  Unix


  To have your applications work with the proxy server, they need to be
  "sockified".  You will need two different telnets, one for direct
  communication, one for communication via the proxy server.  SOCKS
  comes with instructions on how to SOCKify a program, as well as a
  couple pre-SOCKified programs.  If you use the SOCKified version to go
  somewhere direct, SOCKS will automatically switch over to the direct
  version for you.  Because of this, we want to rename all the programs
  on our protected network and replace them with the SOCKified programs.
  "Finger" becomes "finger.orig", "telnet" becomes "telnet.orig", etc.
  You must tell SOCKS about each of these via the include/socks.h file.

  Certain programs will handle routing and sockifying itself.  Netscape
  is one of these.  You can use a proxy server under Netscape by
  entering the server's address (192.168.1.1 in our case) in the SOCKs
  field under Proxies.  Each application will need at least a little
  messing with, regardless of how it handles a proxy server.


  11.3.2.  MS Windows with Trumpet Winsock


  Trumpet Winsock comes with built in proxy server capabilities.  In the
  "setup" menu, enter the IP address of the server, and the addresses of
  all the computers reachable directly.  Trumpet will then handle all
  outgoing packets.



  11.3.3.  Getting the Proxy Server to work with UDP Packets


  The SOCKS package works only with TCP packets, not UDP.  This makes it
  quite a bit less useful.  Many useful programs, such as talk and
  Archie, use UDP.  There is a package designed to be used as a proxy
  server for UDP packets called UDPrelay, by Tom Fitzgerald
  <fitz@wang.com>.  Unfortunately, at the time of this writing, it is
  not compatible with Linux.


  11.4.  Drawbacks with Proxy Servers


  The proxy server is, above all, a security device.  Using it to
  increase internet access with limited IP addresses will have many
  drawbacks.  A proxy server will allow greater access from inside the
  protected network to the outside, but will keep the inside completely
  inaccessible from the outside.  This means no servers, talk or archive
  connections, or direct mailing to the inside computers.  These
  drawbacks might seem slight, but think of it this way:


  o  You have left a report you are doing on your computer inside a
     firewall protected network.  You are at home, and decide that you
     would like to go over it.  You can not.  You can not reach your
     computer because it is behind the firewall.  You try to log into
     firewall first, but since everyone has proxy server access, no one
     has set up an account for you on it.



  o  Your daughter goes to college.  You want to email her.  You have
     some private things to talk about, and would rather have your mail
     sent directly to your machine.  You trust your systems
     administrator completely, but still, this is private mail.



  o  The inability to use UDP packets represents a big drawback with the
     proxy servers.  I imagine UDP capabilities will be coming shortly.

  FTP causes another problem with a proxy server.  When getting or doing
  an ls, the FTP server opens a socket on the client machine and sends
  the information through it.  A proxy server will not allow this, so
  FTP doesn't particularly work.

  And, proxy servers run slow.  Because of the greater overhead, almost
  any other means of getting this access will be faster.

  Basically, if you have the IP addresses, and you are not worried about
  security, do not use a firewall and/or proxy servers.  If you do not
  have the IP addresses, but you are also not worried about security,
  you might also want to look into using an IP emulator, like Term,
  Slirp or TIA.  Term is available from  ftp://sunsite.unc.edu, Slirp is
  available from ftp://blitzen.canberra.edu.au/pub/slirp, and TIA is
  available from marketplace.com.  These packages will run faster, allow
  better connections, and provide a greater level of access to the
  inside network from the internet.  Proxy servers are good for those
  networks which have a lot of hosts that will want to connect to the
  internet on the fly, with one setup and little work after that.



  12.  Advanced Configurations

  There is one configuration I would like to go over before wrapping
  this document up.  The one I have just outlined will probably suffice
  for most people.  However, I think the next outline will show a more
  advanced configuration that can clear up some questions.  If you have
  questions beyond what I have just covered, or are just interested in
  the versatility of proxy servers and firewalls, read on.


  12.1.  A large network with emphasis on security

  Say, for instance, you are the leader of millisha and you wish to
  network  your site.  You have 50 computers and a subnet of 32 (5 bits)
  IP numbers.  You need various levels of access within your network
  because you tell your followers different things. Therefore, you'll
  need to protect certain parts of the network from the rest.

  The levels are:


  1. The external level.  This is the level that gets shown to
     everybody. This is where you rant and rave to get new volunteers.

  2. Troop  This is the level of people who have gotten beyond the
     external level.  Here is where you teach them about the evail
     government and how to make bombs.

  3. Mercenary  Here is where the real plans are keep. In this level is
     stored all the information on how the 3rd world government is going
     to take over the world, your plans involving Newt Gingrich,
     Oklahoma City, lown care products and what really is stored in that
     hangers at area 51.


  12.1.1.  The Network Setup

  The IP numbers are arranged as:



  o  1 number is 192.168.1.255, which is the broadcast address and is
     not usable.

  o  23 of the 32 IP addresses are allocated to 23 machines that will be
     accessible to the internet.

  o  1 extra IP goes to a Linux box on that network

  o  1 extra goes to a different Linux box on that network.

  o  2 IP #'s go to the router

  o  4 are left over, but given domain names paul, ringo, john, and
     george, just to confuse things a bit.

  o  The protected networks both have the addresses 192.168.1.xxx

  Then, two separate networks are built, each in different rooms.  They
  are routed via infrared Ethernet so that they are completely invisible
  to the outside room.  Luckily, infrared ethernet works just like
  normal ethernet.

  These networks are each connected to one of the Linux boxes with an
  extra IP address.

  There is a file server connecting the two protected networks.  This is
  because the plans for taking over the world involves some of the
  higher Troops.  The file server holds the address 192.168.1.17 for the
  Troop network and 192.168.1.23 for the Mercenary network.  It has to
  have different IP addresses because it has to have different Ethernet
  cards.  IP Forwarding on it is turned off.

  IP Forwarding on both Linux boxes is also turned off.  The router will
  not forward packets destined for 192.168.1.xxx unless explicitly told
  to do so, so the internet will not be able to get in.  The reason for
  turning off IP Forwarding here is so that packets from the Troop's
  network will not be able to reach the Mercenary network, and vica
  versa.

  The NFS server can also be set to offer different files to the
  different networks.  This can come in handy, and a little trickery
  with symbolic links can make it so that the common files can be shared
  with all.  Using this setup and another ethernet card can offer this
  one file server for all three networks.


  12.1.2.  The Proxy Setup

  Now, since all three levels want to be able to monitor the network for
  their own devious purposes, all three need to have net access.  The
  external network is connected directly into the internet, so we don't
  have to mess with proxy servers here.  The Mercenary and Troop
  networks are behind firewalls, so it is necessary to set up proxy
  servers here.

  Both networks will be setup very similarly.  They both have the same
  IP addresses assigned to them.  I will throw in a couple of
  parameters, just to make things more interesting though.


  1. No one can use the file server for internet access.  This exposes
     the file server to viruses and other nasty things, and it is rather
     important, so its off limits.

  2. We will not allow troop access to the World Wide Web.  They are in
     training, and this kind of information retrieval power might prove
     to be damaging.

  So, the sockd.conf file on the Troop's Linux box will have this line:


      deny 192.168.1.17 255.255.255.255



  and on the Mercenary machine:


      deny 192.168.1.23 255.255.255.255



  And, the Troop's Linux box will have this line


      deny 0.0.0.0 0.0.0.0 eq 80



  This says to deny access to all machines trying to access the port
  equal (eq) to 80, the http port.  This will still allow all other
  services, just deny Web access.

  Then, both files will have:


      permit 192.168.1.0 255.255.255.0



  to allow all the computers on the 192.168.1.xxx network to use this
  proxy server except for those that have already been denied (ie. The
  file server and Web access from the Troop network).


  The Troop's sockd.conf file will look like:


      deny 192.168.1.17 255.255.255.255
      deny 0.0.0.0 0.0.0.0 eq 80
      permit 192.168.1.0 255.255.255.0



  and the Mercenary file will look like:


      deny 192.168.1.23 255.255.255.255
      permit 192.168.1.0 255.255.255.0



  This should configure everything correctly.  Each network is isolated
  accordingly, with the proper amount of interaction.  Everyone should
  be happy.


  13.  Making Management Easy


  13.1.  Firewall tools

  There are several software packages that will make managing your
  firewall easier.

  Be carefull, don't use these tools unless you can do without them.
  These scripts make it just as easy to make a misstake as they do to
  help you get it wright.

  Both graphical and web based interfaces are being developed to work
  with the Linux filtering rules.  Some companies have even create
  commercial firewalls based on Linux by putting it in their own box
  with their own management code. (nice)

  I'm not realy a GUI guy.  However, I have been using firewalls with
  GUI interfaces for some time. I've found they help by providing a nice
  report of all the rules in one easy glance.

  gfcc (GTK+ Firewall Control Center) is a GTK+ application which can
  control Linux firewall policies and rules, based on ipchains package.
  Go to http://icarus.autostock.co.kr <http://icarus.autostock.co.kr/>
  and get your copy. This is a realy good tool.

  I have included RC scripts in appendex A. These scripts work with and
  without gfcc.


  There a lots of scripts avaible to setup a firewall. One very complete
  script is avaible at
  http://www.jasmine.org.uk/~simon/bookshelf/papers/instant-
  firewall/instant-firewall.html
  <http://www.jasmine.org.uk/~simon/bookshelf/papers/instant-
  firewall/instant-firewall.html>. Another will done script is at
  http://www.pointman.org/ <http://www.pointman.org/>.

  Kfirewall is a GUI frontend for ipchains or ipfwadm (depending on your
  kernel version).  http://megaman.ypsilonia.net/kfirewall/
  <http://megaman.ypsilonia.net/kfirewall/>

  FCT is an HTML based tool for the configuration of a firewall. It
  features automatic script-generation for IP-filtering commands
  (ipfwadm) on a firewall for multiple interfaces and any internet
  services.  http://www.fen.baynet.de/~ft114/FCT/firewall.htm
  <http://www.fen.baynet.de/~ft114/FCT/firewall.htm>


  13.2.  General tools

  WebMin is a general system admin package. It will not help you manage
  the firewall rules but it will help you with turning on and off damons
  and processes.  This program is VERY good, I'm hoping the J. Cameron
  will include a IPCHAINS module. http://www.webmin.com/
  <http://www.webmin.com/>

  If you are an ISP, you will want to know about IPFA (IP Firewall
  Acounting) http://www.soaring-bird.com/ipfa/ <http://www.soaring-
  bird.com/ipfa/>. It can do Per-Month/Per-day/per-min/ logs and has a
  Web based GUI administation.



  14.  Just to spoil your day, and keep you on your toes about security,
  I'll describe how easy it is to defeat a proxy firewall.  Now that you
  have done everything in this document and have a very secure server
  and network.  You have a DMZ and no one can get into your network and
  you are logging every connection made to the outside world. You make
  all your users go through a proxy and no one can go directly to the
  Internet.  Then one of your users, with a didacated connection of his
  own, finds out abouthttptunnel <http://www.nocrew.org/software/http-
  tunnel.html>. httptunnel creates a bidirectional virtual data path
  tunnelled in HTTP requests. The HTTP requests can be sent via an HTTP
  proxy if so desired. Or, on their system  they install a Virtual Pri-
  vate Network (vpn). See:http://sunsite.auc.dk/vpnd/ <http://sun-
  site.auc.dk/vpnd/> Or, Maybe this user simply puts a modem on their NT
  system and turns on routing.  Finally, on the workstation, on the pri-
  vate LAN, change the default gateway to point to the new route to the
  Internet. Now, from this workstation, you can go anywhere. The only
  thing the firewall admin might see is one connect with nowill see is a
  really long DNS lookup.  Now, take over the world!  Defeating a Proxy
  Firewall

  15.  APPENDEX A - Example Scripts



  15.1.  RC Script useing GFCC



  #!/bin/bash
  #
  # Firewall Script - Version 0.9.1
  #
  # chkconfig: 2345 09 99
  # description: firewall script for 2.2.x kernel
  # Set for testing
  # set -x
  #
  # NOTES:
  #
  #  This script is written for RedHat 6.1 or better.
  #
  #  Be careful about offering public services like web or ftp servers.
  #
  # INSTALLATION:
  #  1. place this file in /etc/rc.d/init.d  (you'll have to be root..)
  #     call it something like "firewall"    :-)
  #     make it root owned -->  "chown root.root (filename)"
  #     make it executable -->  "chmod 755 (filename)"
  #
  #  2. use GFCC to create your firewall rules and export them to a file
  #     named /etc/gfcc/rules/firewall.rule.sh.
  #
  #  3. add the firewall to the RH init structure --> "chkconfig --add (filename)"
  #     next time the router boots, things should happen automagically!
  #     sleep better at night knowing you are *LESS* vulnerable than before...
  #
  # RELEASE NOTES
  #   30 Jan, 2000 - Changed to GFCC script
  #   11 Dec, 1999 - updated by Mark Grennan <mark@grennan.com>
  #   20 July, 1999 - initial writing - Anthony Ball <tony@LinuxSIG.org>
  #

  ################################################

  # Source function library.
  . /etc/rc.d/init.d/functions

  # Source networking configuration.
  . /etc/sysconfig/network

  # Check that networking is up.
  [ ${NETWORKING} = "no" ] && exit 0

  # See how we are called
  case "$1" in

    start)
          # Start providing access
          action "Starting firewall: " /bin/true
          /etc/gfcc/rules/firewall.rule.sh
          echo
          ;;

    stop)
          action "Stoping firewall: " /bin/true
          echo 0 > /proc/sys/net/ipv4/ip_forward
          /sbin/ipchains -F input
          /sbin/ipchains -F output
          /sbin/ipchains -F forward

          echo
          ;;

    restart)
          action "Restarting firewall: " /bin/true
          $0 stop
          $0 start

          echo
          ;;

    status)
          # List out all settings
          /sbin/ipchains -L
          ;;

    test)
          action "Test Mode firewall: " /bin/true
          /sbin/ipchains -F input
          /sbin/ipchains -F output
          /sbin/ipchains -F forward
          echo 1 > /proc/sys/net/ipv4/ip_forward
          /sbin/ipchains -A input -j ACCEPT
          /sbin/ipchains -A output -j ACCEPT
          /sbin/ipchains -P forward DENY
          /sbin/ipchains -A forward -i $PUBLIC -j MASQ

          echo
          ;;

    *)
          echo "Usage: $0 {start|stop|restart|status|test}"
          exit 1

  esac



  15.2.  GFCC script

  This script was generated by the Graphical Firewall program (GFCC).
  This is not the working rule set. This is the exported rules set.



  #!/bin/sh
  # Generated by Gtk+ firewall control center

  IPCHAINS=/sbin/ipchains


  localnet="192.168.1.0/24"
  firewallhost="192.168.1.1/32"
  localhost="172.0.0.0/8"
  DNS1="24.94.163.119/32"
  DNS2="24.94.163.124/32"
  Broadcast="255.255.255.255/32"
  Multicast="224.0.0.0/8"
  Any="0.0.0.0/0"
  mail_grennan_com="192.168.1.1/32"
  mark_grennan_com="192.168.1.3/32"

  $IPCHAINS -P input DENY
  $IPCHAINS -P forward ACCEPT
  $IPCHAINS -P output ACCEPT

  $IPCHAINS -F
  $IPCHAINS -X

  # input rules
  $IPCHAINS -A input -s $Any -d $Broadcast -j DENY
  $IPCHAINS -A input -p udp -s $Any -d $Any netbios-ns -j DENY
  $IPCHAINS -A input -p tcp -s $Any -d $Any netbios-ns -j DENY
  $IPCHAINS -A input -p udp -s $Any -d $Any netbios-dgm -j DENY
  $IPCHAINS -A input -p tcp -s $Any -d $Any netbios-dgm -j DENY
  $IPCHAINS -A input -p udp -s $Any -d $Any bootps -j DENY
  $IPCHAINS -A input -p udp -s $Any -d $Any bootpc -j DENY
  $IPCHAINS -A input -s $Multicast -d $Any -j DENY
  $IPCHAINS -A input -s $localhost -d $Any -i lo -j ACCEPT
  $IPCHAINS -A input -s $localnet -d $Any -i eth1 -j ACCEPT
  $IPCHAINS -A input -s $localnet -d $Broadcast -i eth1 -j ACCEPT
  $IPCHAINS -A input -p icmp -s $Any -d $Any -j ACCEPT
  $IPCHAINS -A input -p tcp -s $Any -d $Any -j ACCEPT ! -y
  $IPCHAINS -A input -p udp -s $DNS1 domain -d $Any 1023:65535 -j ACCEPT
  $IPCHAINS -A input -p udp -s $DNS2 domain -d $Any 1023:65535 -j ACCEPT
  $IPCHAINS -A input -p tcp -s $Any -d $Any ssh -j ACCEPT
  $IPCHAINS -A input -p tcp -s $Any -d $Any telnet -j ACCEPT
  $IPCHAINS -A input -p tcp -s $Any -d $Any smtp -j ACCEPT
  $IPCHAINS -A input -p tcp -s $Any -d $Any pop-3 -j ACCEPT
  $IPCHAINS -A input -p tcp -s $Any -d $Any auth -j ACCEPT
  $IPCHAINS -A input -p tcp -s $Any -d $Any www -j ACCEPT
  $IPCHAINS -A input -p tcp -s $Any -d $Any ftp -j ACCEPT
  $IPCHAINS -A input -s $Any -d $Any -j DENY -l

  # forward rules
  $IPCHAINS -A forward -s $localnet -d $Any -j MASQ

  # output rules



  15.3.  This is the firewall rules set built my hand. It does not use
  GFCC.  RC Script without GFCC



  #!/bin/bash
  #
  # Firewall Script - Version 0.9.0

  # chkconfig: 2345 09 99
  # description: firewall script for 2.2.x kernel

  # Set for testing
  # set -x

  #
  # NOTES:
  #
  #  This script is written for RedHat 6.0 or better.
  #
  #  This firewall script should work for most routers, dial-up or cable modem.
  #  It was written for RedHat distributions.
  #
  #  Be careful about offering public services like web or ftp servers.
  #
  # INSTALLATION:
  #  1. This file planned for a RedHat system.  It would work
  #     on other distro's with perhaps no modification, but again...
  #     Who knows?!!?  These instructions apply to RedHat systems.
  #
  #  2. place this file in /etc/rc.d/init.d  (you'll have to be root..)
  #     call it something like "firewall"    :-)
  #     make it root owned -->  "chown root.root <filename>"
  #     make it executable -->  "chmod 755 <filename>"
  #
  #  3. set the values for your network, internal interface, and DNS servers
  #     uncomment lines further down to enable optional in-bound services
  #     make sure "eth0" is your internal NIC (or change the value below)
  #     test it -->  "/etc/rc.d/init.d/<filename> start"
  #     you can list the rules -->  "ipchains -L -n"
  #     fix anything that broke...  :-)
  #
  #  4. add the firewall to the RH init structure --> "chkconfig --add <filename>"
  #     next time the router boots, things should happen automagically!
  #     sleep better at night knowing you are *LESS* vulnerable than before...
  #
  # RELEASE NOTES
  #   20 July, 1999 - initial writing - Anthony Ball <tony@LinuxSIG.org>
  #   11 Dec, 1999 - updated by Mark Grennan <mark@grennan.com>
  #

  ################################################
  #  Fill in the values below to match your
  #  local network.

  PRIVATENET=xxx.xxx.xxx.xxx/xx

  PUBLIC=ppp0
  PRIVATE=eth0

  # your dns servers
  DNS1=xxx.xxx.xxx.xxx
  DNS2=xxx.xxx.xxx.xxx

  ################################################

  # some handy generic values to use
  ANY=0.0.0.0/0
  ALLONES=255.255.255.255

  # Source function library.
  . /etc/rc.d/init.d/functions

  # Source networking configuration.
  . /etc/sysconfig/network

  # Check that networking is up.
  [ ${NETWORKING} = "no" ] && exit 0

  # See how we are called
  case "$1" in

    start)
          # Start providing access
          action "Starting firewall: " /bin/true

          ##
          ## Setup Envirement
          ##
          # Flush all lists
          /sbin/ipchains -F input
          /sbin/ipchains -F output
          /sbin/ipchains -F forward

          # Plug up everything
          /sbin/ipchains -I input 1 -j DENY

          # set policy to deny (Default is ACCEPT)
          /sbin/ipchains -P input DENY
          /sbin/ipchains -P output ACCEPT
          /sbin/ipchains -P forward ACCEPT

          # Turn on packet forwarding
          echo 1 > /proc/sys/net/ipv4/ip_forward

          ##
          ## Install Modules
          ##
          # Insert the active ftp module.  This will allow non-passive ftp to machines
          # on the local network (but not to the router since it is not masq'd)
          if ! ( /sbin/lsmod | /bin/grep masq_ftp > /dev/null ); then
              /sbin/insmod ip_masq_ftp
          fi

          ##
          ## Some Security Stuff
          ##
          # turn on Source Address Verification and get spoof protection
          # on all current and future interfaces.
          if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
              for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
                  echo 1 > $f
              done
          else
              echo
              echo "PROBLEMS SETTING UP IP SPOOFING PROTECTION.  BE WORRIED."
              echo
          fi

          # deny bcasts on remaining interfaces
          /sbin/ipchains -A input -d 0.0.0.0 -j DENY
          /sbin/ipchains -A input -d 255.255.255.255 -j DENY

          # deny these without logging 'cause there tend to be a lot...
          /sbin/ipchains -A input -p udp -d $ANY 137 -j DENY   # NetBIOS over IP
          /sbin/ipchains -A input -p tcp -d $ANY 137 -j DENY   #   ""
          /sbin/ipchains -A input -p udp -d $ANY 138 -j DENY   #   ""
          /sbin/ipchains -A input -p tcp -d $ANY 138 -j DENY   #   ""
          /sbin/ipchains -A input -p udp -d $ANY 67 -j DENY    # bootp
          /sbin/ipchains -A input -p udp -d $ANY 68 -j DENY    #   ""
          /sbin/ipchains -A input -s 224.0.0.0/8 -j DENY       # Multicast addresses

          ##
          ## Allow private network out
          ##
          # allow all packets on the loopback interface
          /sbin/ipchains -A input -i lo -j ACCEPT

          # allow all packets from the internal "trusted" interface
          /sbin/ipchains -A input -i $PRIVATE -s $PRIVATENET -d $ANY -j ACCEPT
          /sbin/ipchains -A input -i $PRIVATE -d $ALLONES -j ACCEPT

          ##
          ## Allow Outside Services into the firewall (if you dare)
          ##
          # allow ICMP
          /sbin/ipchains -A input -p icmp -j ACCEPT
          # allow TCP
          /sbin/ipchains -A input -p tcp ! -y -j ACCEPT

          # allow lookups to DNS (on firewall)
          /sbin/ipchains -A input -p udp -s $DNS1 domain -d $ANY 1023: -j ACCEPT
          /sbin/ipchains -A input -p udp -s $DNS2 domain -d $ANY 1023: -j ACCEPT
          # or (BETTER IDEA) run a caching DNS server on the router and use the
          # following two lines instead...
          # /sbin/ipchains -A input -p udp -s $DNS1 domain -d $ANY domain -j ACCEPT
          # /sbin/ipchains -A input -p udp -s $DNS2 domain -d $ANY domain -j ACCEPT

          # uncomment the following to allow ssh in
          /sbin/ipchains -A input -p tcp -d $ANY 22 -j ACCEPT

          # uncomment the following to allow telnet in (BAD IDEA!!)
          /sbin/ipchains -A input -p tcp -d $ANY telnet -j ACCEPT

          # uncomment to allow NTP (network time protocol) to router
          # /sbin/ipchains -A input -p udp -d $ANY ntp -j ACCEPT

          # uncomment to allow SMTP in (not for mail clients - only a server)
          /sbin/ipchains -A input -p tcp -d $ANY smtp -j ACCEPT

          # uncomment to allow POP3 in (for mail clients)
          /sbin/ipchains -A input -p tcp -d $ANY 110 -j ACCEPT

          # allow auth in for sending mail or doing ftp
          /sbin/ipchains -A input -p tcp -d $ANY auth -j ACCEPT

          # uncomment to allow HTTP in (only if you run a web server on the router)
          /sbin/ipchains -A input -p tcp -d $ANY http -j ACCEPT

          # uncomment to allow FTP in
          /sbin/ipchains -A input -p tcp -d $ANY ftp -j ACCEPT

          ##
          ## Masquerading stuff
          ##
          # masquerade packets forwarded from internal network
          /sbin/ipchains -A forward -s $PRIVATENET -d $ANY -j MASQ

          ##
          ## deny EVERYthing else and log them to /var/log/messages
          ##
          /sbin/ipchains -A input -l -j DENY

          # Remove the Plug
          /sbin/ipchains -D input 1

          ;;

    stop)
          action "Stoping firewall: " /bin/true
          echo 0 > /proc/sys/net/ipv4/ip_forward
          /sbin/ipchains -F input
          /sbin/ipchains -F output
          /sbin/ipchains -F forward

          echo
          ;;

    restart)
          action "Restarting firewall: " /bin/true
          $0 stop
          $0 start

          echo
          ;;

    status)
          # List out settings
          /sbin/ipchains -L
          ;;

    test)
          ##
          ## This is about as simple as it gets
          ##    (This is not secure AT ALL)
          action "WARNING Test Firewall: " /bin/true
          /sbin/ipchains -F input
          /sbin/ipchains -F output
          /sbin/ipchains -F forward
          echo 1 > /proc/sys/net/ipv4/ip_forward
          /sbin/ipchains -A input -j ACCEPT
          /sbin/ipchains -A output -j ACCEPT
          /sbin/ipchains -P forward DENY
          /sbin/ipchains -A forward -i $PUBLIC -j MASQ

          echo
          ;;

    *)
          echo "Usage: $0 {start|stop|restart|status|test}"
          exit 1

  esac



  16.  APPENDEX B - An VPN RC Script for RedHat



  #!/bin/sh
  #
  # vpnd            This shell script takes care of starting and stopping
  #                 vpnd (Vertual Privage Network connections).
  #
  # chkconfig: - 96 96
  # description: vpnd
  #

  # Source function library.
  . /etc/rc.d/init.d/functions

  # Source networking configuration.
  . /etc/sysconfig/network

  # Check that networking is up.
  [ ${NETWORKING} = "no" ] && exit 0

  [ -f /usr/sbin/vpnd ] || exit 0

  [ -f /etc/vpnd.conf ] || exit 0

  RETVAL=0

  # See how we were called.
  case "$1" in
    start)
          # Start daemons.
          echo -n "Starting vpnd: "
          daemon vpnd
          RETVAL=$?
          [ $RETVAL -eq 0 ] && touch /var/lock/subsys/vpnd
          echo
          ;;
    stop)
          # Stop daemons.
          echo -n "Shutting down vpnd: "
          killproc vpnd
          RETVAL=$?
          [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/vpnd
          echo
          ;;
    restart)
          $0 stop
          $0 start
          ;;
    *)
          echo "Usage: vpnd {start|stop|restart}"
          exit 1
  esac

  exit $RETVAL



  Font HOWTO
  Donovan Rebbechi,       elflord@panix.com
  <mailto:elflord@panix.com>

  ____________________________________________________________

  Table of Contents



  1. Introduction

     1.1 The Location of This Document
     1.2 Rationale
     1.3 Credits and Acknowledgements

  2. Fonts 101 -- A Quick Introduction to Fonts

     2.1 Types of fonts
        2.1.1 Bitmap Fonts
        2.1.2 Type1 Fonts
        2.1.3 Type3 fonts
        2.1.4 TrueType fonts
        2.1.5 Type42 Fonts
        2.1.6 Type1 vs TrueType -- a comparison
        2.1.7 Metafont
     2.2 Families of Typefaces

  3. Fonts 102 -- Typography

     3.1 Classifications of Typefaces
        3.1.1 Fixed versus variable width
        3.1.2 To serif or not to serif ?
        3.1.3 The old and the new -- different types of Serif fonts
           3.1.3.1 Old Style
           3.1.3.2 Moderns ( or didone )
           3.1.3.3 Transitional
           3.1.3.4 Slab Serifs
        3.1.4 The Sans Serif Revolution
           3.1.4.1 Grotesque
           3.1.4.2 Geometric
           3.1.4.3 Humanist
        3.1.5 Compatible Typefaces
     3.2 Ligatures, Small caps fonts and expert fonts
        3.2.1 Ligatures
        3.2.2 Small caps fonts
        3.2.3 Expert fonts
     3.3 Font Metrics and Shapes

  4. Making Fonts Available To X

     4.1 The font path
     4.2 Installing Type1 Fonts
        4.2.1 Run Type1inst
        4.2.2 If You Have the
        4.2.3 If You Don't Have The
     4.3 True Type Fonts
        4.3.1 xfstt
     4.4 xfs
        4.4.1 The
        4.4.2 Installing a Font Into

  5. Making Fonts Available To Ghostscript

     5.1 Type1
     5.2 True Type
     5.3 Using Ghostscript To Preview Fonts

  6. True Type to Type1 Conversion

     6.1 Why ?
     6.2 How ?

  7. WYSIWYG Publishing and Fonts

     7.1 Introduction and Overview
     7.2 Applixware
        7.2.1 FontTastic
        7.2.2 Using System Wide Fonts With Applixware
           7.2.2.1 Make the fonts available to X
           7.2.2.2 Make the fonts available to ghostscript
           7.2.2.3 Edit the fontmap.dir
     7.3 Star Office
        7.3.1 Backup Your Configuration Before you Start !
        7.3.2 Adding Type1 Fonts to Star Office
        7.3.3 Adding TrueType Fonts to Star Office
        7.3.4 Under the Hood
     7.4 Word Perfect

  8. Netscape

  9. TeX / LaTeX

     9.1 A Quick Primer on LaTeX/TeX fonts
     9.2 Adding Type1 fonts
        9.2.1 Naming the fonts
        9.2.2 Creating the virtual fonts and tex font metrics
        9.2.3 Configure dvips
        9.2.4 Test the font
        9.2.5 Create a .sty file

  10. Getting Fonts For Linux

     10.1 True Type
        10.1.1 Commercial Software
        10.1.2 Microsoft's Font Download
        10.1.3 Luc's Webpage
        10.1.4 Web sites with truetype fonts
        10.1.5 Foundries
     10.2 Type 1 Fonts and Metafont
        10.2.1 Dealing With Mac and Windows Formats
        10.2.2 Free Stuff
        10.2.3 Commercial Fonts
           10.2.3.1 Value vs Premium: Why Should I buy Premium Fonts ?
           10.2.3.2 Value
           10.2.3.3 Premium
           10.2.3.4 More Links

  11. Useful Font Software for Linux

  12. Ethics and Licensing Issues Related to Type

  13. References

     13.1 Font Information
     13.2 Postscript and Printing Information

  14. Glossary



  ______________________________________________________________________

  1.  Introduction

  1.1.  The Location of This Document

  This document is located at my webpage
  <http://pegasus.rutgers.edu/~elflord/font_howto>



  1.2.  Rationale

  I'm going to make this brief (-; The purpose of this document is to
  address what was a gaping hole in font documentation. While
  previously, there were several documents about fonts for Linux, I felt
  that none of them were comprehensive, all of them had a relatively
  narrow focus. Hence the goal of this document is not to provide
  radical new insight into the issue of font handling ( though I have
  included material previously unavailable ), the main aim is to provide
  a comprehensive source to act as a starting point for any and all font
  questions about Linux.

  1.3.  Credits and Acknowledgements

  Special thanks are due to Rod Smith, who made several helpful
  suggestions, and fixed pfm2afm.  Also thanks to Doug Holland, whose
  Font Deuglification HOWTO proved to be a good reference, John
  McLaughlin, author of the document that helped me come to grips with
  Star Office, and the Linux community for their suggestions and
  construtive comments.

  2.  Fonts 101 -- A Quick Introduction to Fonts

  2.1.  Types of fonts

  2.1.1.  Bitmap Fonts

  A bitmap is a matrix of dots. Bitmap fonts are represented in
  precisely this way -- as matrices of dots. Because of this, they are
  device dependent -- they are only useful at a particular resolution. A
  75 DPI screen bitmap font is still 75 DPI on your 1200 DPI printer.

  There are two types of bitmap fonts -- bitmap printer fonts, such as
  the pk fonts generated by dvips, and bitmap screen fonts, used by X
  and the console. The bitmap screen fonts typically have a bdf or pcf
  extension. Bitmap screen fonts are most useful for terminal windows,
  consoles and text editors, where the lack of scalability and the fact
  that they are unprintable is not an issue.

  2.1.2.  Type1 Fonts

  The Type1 font standard was devised by Adobe, and Type1 fonts are
  supported by Adobe's postscript standard. Because of this, they are
  also well supported under linux. They are supported by X and
  ghostscript. Postscript fonts have traditionally been the choice of
  font for anything on UNIX that involves printing.

  Typically, a UNIX Type1 font is distributed as an afm ( adobe font
  metric ) file, and an outline file, which is usually a pfb ( printer
  font binary ) or pfa ( printer font ascii ) file. The outline file
  contains all the glyphs, while the metric file contains the metrics.

  Type 1 fonts for other platforms may be distributed in different
  formats. For example, postscript fonts for windows often use a
  different format ( pfm ) for the metric file.

  2.1.3.  Type3 fonts

  These fonts are distributed in a similar manner to Type1 files -- in
  groups of afm font metrics, and pfa files.  While they are supported
  by the postscript standard, they are not supported by X, and hence
  have limited use.



  2.1.4.  TrueType fonts

  True type fonts were developed by Apple. They made the format
  available to Microsoft, and succesfully challenged Adobe's grip on the
  font market.  True type fonts store the metric and shape information
  in a single file ( usually one with a ttf extension ). Recently, font
  servers have been developed that make TrueType available to X. And
  postscript and ghostscript have supported TrueType fonts for some
  time. Because of this, TrueType fonts are becoming more popular on
  linux.

  2.1.5.  Type42 Fonts

  Type42 fonts are actually just TrueType fonts with headers that enable
  them to be rendered by a postscript interpreter. Most applications,
  such as ghostscript and SAMBA handle these fonts transparently.
  However, if you have a postscript printer, it may be necessary to
  explicitly create Type42 font files.

  2.1.6.  Type1 vs TrueType -- a comparison

  Despite the historical feuding between the proponents to Type1 and
  TrueType fonts, both have a lot in common. Both are scalable outline
  fonts.  Type1 fonts use cubic as opposed to quadratic curves for the
  glyphs.  This is in theory at least a slight advantage since they
  include all the curves available to TrueType fonts. In practice, it
  makes very little difference.

  TrueType fonts have the apparent advantage that their support for
  hinting is better ( Type1 fonts do have hinting functionality, but it
  is not as extensive as that of TrueType fonts ).  However, this is
  only an issue on low resolution devices, such as screens ( the
  improved hinting makes no discernable difference on a 600dpi printer,
  even at small point sizes. ) The other point that makes this apparent
  advantage somewhat questionable is the fact that well hinted TrueType
  fonts are rare.  This is because software packages that support
  hinting functionality are out of the budget of most small time
  designers.  Only a few major foundries, such as Monotype make well
  hinted fonts available.

  In conclusion, the main differences between TrueType and Type1 fonts
  are in availability and application support. The widespread
  availability of TrueType fonts for Windows has resolted in webpages
  designed with the assumption that certain TrueType fonts are
  available. Also, many users have large numbers of TrueType fonts
  because they ship with the users Windows applications. However, on
  Linux, most applications support Type1 fonts but do not have the same
  level of support for TrueType. Moreover, most major font foundries
  still ship most of their fonts in Type1 format.  For example, Adobe
  ship very few TrueType fonts.  My recommendation to users is to use
  whatever works for your application, and try to avoid converting from
  one format to another where possible ( because the format conversion
  is not without loss ).

  2.1.7.  Metafont

  Metafont was developed by Donald E Knuth as part of the TeX
  typesetting system. Metafont is a graphics programming language ( like
  postscript ) that has applications wider than just fonts.  Metafonts
  exhibit some very desirable qualities. One of the important features
  is that metafonts can scale very gracefully.  The metafont Computer
  Modern has different shape at 20 point and 10 point. The shape changes
  with size, because it is desirable for a smaller font to be
  proportionately wider than a larger font ( this makes the larger fonts
  more elegant and the smaller font more readable ).

  Metafonts typically have a mf extension. They are rendered to device
  dependent bitmap fonts. The rendering is slow, so they are of
  excellent quality, but are not well suited to WYSIWYG publishing.

  2.2.  Families of Typefaces

  Typically typically come in groups of a few variants. For example,
  most fonts come with a bold, italic, and bold-italic variant.  Some
  fonts may also have small caps, and demibold variants.  A group of
  fonts consisting of a font and its variants is called a family of
  typefaces.  For example, the Garamond family consists of Garamond,
  Garamond-italic, Garamond-bold, Garamond bold-italic, Garamond demi-
  bold, and Garamond demi-bold-italic. The Adobe expert Garamond font
  also makes available Garamond small caps, and Garamond titling
  capitals.

  3.  Fonts 102 -- Typography

  Here, we discuss some typography basics. While this information is not
  essential, many font lovers will find it interesting.

  3.1.  Classifications of Typefaces

  3.1.1.  Fixed versus variable width

  There are several classifications of typefaces. Firstly, there are
  fixed width fonts, and variable width fonts.  The fixed width fonts
  look like typewriter text, because each character is the same width.
  This quality is desirable for something like a text editor or a
  computer console, but not desirable for the body text of a long
  document. The other class is variable width. Most of the fonts you
  will use are variable width, though fixed with can be useful also (
  for example, all the example shell commands in this document are
  illustrated with a fixed with font ). The most well known fixed width
  font is courier.

  3.1.2.  To serif or not to serif ?

  Serifs are little hooks on the ends of characters. For example, the
  letter i in a font such as Times Roman has serifs protruding from the
  base of the i and the head of the i.  Serif fonts are usually
  considered more readable than fonts without serifs. There are many
  different types of serif fonts.

  Sans serif fonts do not have these little hooks, so they have a
  starker appearance. One usually does not write a long book using a
  sans serif font for the body text. There are sans serif fonts that are
  readable enough to be well suited to documents that are supposed to be
  browsed / skimmed ( web pages, catalogues, marketting brochures ).
  Another application that sans serif fonts have is as display fonts on
  computer screens, especially at small sizes. The lack of detail in the
  font can provide it with more clarity. For example, Microsoft touts
  Verdana as being readable at very small sizes on screen.

  Notable sans serif fonts include Lucida sans, MS Comic Sans, Verdana,
  Myriad, Avant Garde, Arial, Century Gothic and Helvetica.  By the way,
  Helvetica is considered harmful by typographers.  It is somewhat
  overused, and many books by typographers plead users to stay away from
  it.

  3.1.3.  The old and the new -- different types of Serif fonts

  3.1.3.1.  Old Style

  Old style fonts are based on very traditional styles dating as far
  back as the late 15th century. Old style fonts tend to be conservative
  in design, and very readable. They are well suited to writing long
  documents. The name ``old style'' refers to the style of the font, as
  opposed to the date of its design.  There are classic old style fonts,
  such as Goudy Old Style, which wre designed in the 20th century.  The
  old style class of fonts has the following distinguishing features:

  o  Well defined, shapely serifs.

  o  Diagonal emphasis. Imagine drawing a font with a fountain pen,
     where lines 45 degrees anticlockwise from vertical are heavy and
     lines 45 degrees clockwise from verticle are light. Old style fonts
     often have this appearance.

  o  Readability. Old style fonts are almost always very readable.

  o  Subtlety and lack of contrast. The old style fonts have heavy lines
     and light lines but the contrast in weight is subtle, not stark.

     Notable Old Style fonts include Garamond, Goudy Old Style, Jenson,
     and Caslon ( the latter is contentious -- some consider it
     transitional )

  3.1.3.2.  Moderns ( or didone )

  The moderns are the opposite of old style fonts. These fonts typically
  have more character, and more attitude than their old style
  counterparts, and can be used to add character to a document rather
  than to typeset a long piece. However, nothing is black and white --
  and there are some modern fonts such as computer modern and Monotype
  modern, and New Century Schoolbook are very readable ( the contrast
  between heavy and light is softened to add readability ).  They are
  based on the designs popular in the 19th century and later. Their
  distinguishing features include:

  o  Lighter serifs, often just thin horizontal lines.

  o  Vertical emphasis. Vertical lines are heavy, horizontal lines are
     light.

  o  Many moderns have a stark contrast between light and heavy strokes.

  o  Modern typefaces with high contrast between light and heavy strokes
     are not as readable as the old style fonts.

     Bodoni is the most notable modern. Other moderns include computer
     modern, and Monotype modern ( on which computer modern is based ).

  3.1.3.3.  Transitional

  Transitional fonts fit somewhere in between moderns and old style
  fonts.  Many of the transitionals have the same kind of readability as
  the old styles. However, they are based on slightly later design.
  While a move in the direction of the moderns may be visible in these
  fonts, they are still much more subtle than the the moderns.  Examples
  of transitionals include Times Roman, Utopia, Bulmer, and Baskerville.
  Of these, Times leans towards old style, while Bulmer looks very
  modern.


  3.1.3.4.  Slab Serifs

  The slab serif fonts are so named because they have thick, block like
  serifs, as opposed to the smooth hooks of the old styles or the thin
  lines of some of the moderns.  Slab serif fonts tend to be sturdy
  looking and are generally quite readable. Many of the slab serifs have
  Egyptian names -- such as Nile, and Egyptienne ( though they are not
  really in any way Egyptian ).  These fonts are great for producing
  readable text that may suffer some dilution in quality ( such as
  photocpied documents, and documents printed on newspaper ). These
  fonts tend to look fairly sturdy.  The most notable slab serif fonts
  are Clarendon, Memphis and Egyptienne, as well as several typewriter
  fonts.  Many of the slab serif fonts are fixed width. Conversely, most
  ( almost all ) fixed width fonts are slab serif.

  3.1.4.  The Sans Serif Revolution

  Surprisingly, the rise of sans serif fonts is a fairly recent
  phenomenon. The first well known sans serif fonts were designed in the
  19th early 20th century. The earlier designs include Futura, Grotesque
  and Gill Sans. These fonts represent respectively the ``geometric'',
  ``grotesque'' and ``humanist'' classes of sans serif fonts.

  3.1.4.1.  Grotesque

  The grotesques where so named because the public were initially
  somewhat shocked by their relatively stark design. Groteques are very
  bare in appearance due to the absence of serifs, and the simpler,
  cleaner designs. Because of their ``in your face'' appearance,
  grotesques are good for headlines. The more readable variations also
  work quite well for comic books, and marketting brochures, where the
  body text comes in small doses. Grotesques don't look as artsy as
  their geometric counterparts.  Compared to the geometrics, they have
  more variation in weight, more strokes, they are squarer ( because
  they don't use such circular arcs ). They use a different upper case G
  and lower case a to the geometrics.  While they are minimalistic but
  don't go to the same extreme as the brutally avant-garde geometrics.

  Notable grotesques include the overused Helvetica,  Grotesque, Arial,
  Franklin Gothic, and Univers.

  3.1.4.2.  Geometric

  The Futura font came with the manifesto: form follows function.  The
  geometric class of fonts has a stark minimalistic appearance.
  Distinguishing features include a constant line thickness ( no weight
  ).  This is particularly conspicuous in the bold variants of a font.
  Bold groteques and humanist fonts often show some notable variation in
  weight while this rarely happens with the geometric fonts. Also
  notable is the precise minimalism of these designs.  The characters
  almost always are made up from straight horizontal and vertical lines,
  and arcs that are very circular ( to the point where they often look
  as though they were drawn with a compass ).  The characters have a
  minimal number of strokes. This gives them a contemporary look in that
  they embrace the minimalistic philosophy that would later take the
  world of modern art by storm.  A tell tale sign that a font is a
  geometric type is the upper case ``G'', which consists of a
  minimalistic combination of two strokes -- a long circular arc and a
  horizontal line.  The other character that stands out is the lower
  case ``a'' -- which is again two simple strokes, a straight vertical
  line and a circle ( the other ``a'' character is more complex which is
  why it is not used ).  Notable geometrics include Avant Garde, Futura,
  and Century Gothic.

  3.1.4.3.  Humanist

  As the name might suggest, humanist fonts were designed with a goal of
  being less mechanical in appearance. In many ways, they are more
  similar to the serif fonts than the geometrics and the grotesques.
  They are said to have a ``pen drawn'' look about them.  They tend to
  have subtle variation in weight, especially observable in bold
  variants. The curve shapes are considerably less rigid than those of
  the geometrics. Many of them are distinguishable by the ``double
  story'' lower case g, which is the same shape as the g used in the old
  style serif fonts.  The humanist typefaces are the easiest to use
  without producing an ugly document as they are relatively compatible
  with the old style fonts.

  3.1.5.  Compatible Typefaces

  Grouping typefaces is not easy, so it pays to avoid using too many on
  the one page. A logical choice of two typefaces consists of a serif
  and a sans serif.  Monotype's Typography 101 page
  <http://www.monotype.com/newmedia/type101_ex.htm> provides a category-
  matchup. They conclude that the moderns and geometrics form good
  pairs, while the old styles and humanists also go together well.  The
  transitionals are also paired with the humanists.  The slab serifs are
  paired with the grotesques, and some variants of the slab serifs are
  also said to match the geometrics or humanists.

  From reading this, one gets the impression that their philosophy is
  essentially to match the more conservative serifs with the more
  moderate sans serifs, and pair the wilder modern serifs with the avant
  garde looking ( pun unavoidable ) geometrics.

  3.2.  Ligatures, Small caps fonts and expert fonts

  3.2.1.  Ligatures

  Properly spacing fonts brings with it all sorts of issues.  For
  example, to properly typeset the letters ``fi'', the i should be very
  close to the f. The problem is that this causes the dot on the i to
  collide with the f, and the serif on the head of the i to collide with
  the horizontal stroke of the f.  To deal with this problem, font
  collections include ligatures.  For example, the ``fi'' ligature
  character is a single character that one can substitute for the the
  two character string ``fi''.  Most fonts contain fi and fl ligatures.
  Expert fonts discussed later often include extra ligatures, such as
  ffl, ffi, and a dotless i character.

  3.2.2.  Small caps fonts

  Small caps fonts are fonts that have reduced size upper case letters
  in place of the lower case letters. These are useful for writing
  headings that require emphasis ( and they are often used in LaTeX ).
  Typically, when one writes a heading in small caps, they use a large
  cap for the beginning of each word, and small capitals for the rest of
  the word ( ``title case'' ). The advantage of this over using all caps
  is that you get something that is much more readable ( using all caps
  is a big typographic sin ).

  3.2.3.  Expert fonts

  Expert fonts consist of several extras designed to supplement a
  typeface.  These include things like ligatures, ornaments ( much like
  a mini-dingbats collection designed to go with the typeface ), small
  caps fonts, and swash capitals ( fancy, calligraphic letters ).

  3.3.  Font Metrics and Shapes

  Font metrics define the spacing between variable width fonts.  The
  metrics include information about the size of the font, and kerning
  information, which assigns kerning pairs -- pairs of characters that
  should be given different spacing. For example, the letters ``To''
  would usually belong in a kerning pair, because correctly spaced ( or
  kerned ), the o should partly sit under the T. Typesetting programs
  such as LaTeX need to know information about kerning so that they can
  make decisions about where to break lines and pages. The same applies
  to WYWIWYG publishing programs.
  In addition to the metrics, is the font outline, or shape.  The
  components of the fonts shape ( a stroke, an accent, etc ) are called
  ``glyphs''.

  4.  Making Fonts Available To X

  There are a number of ways fonts can be added to X. Firstly, XFree86
  has a font path which is just a list of several directories or font
  servers where it searches for fonts. A font server is just a
  background process that makes fonts available to XFree86.  An
  advantage of font servers is that they can send fonts to remote
  displays.

  Recently, xfs ( the ``X font server'' ) has been patched to support
  TrueType fonts, and run as a stand-alone program.  The patched version
  ships with Redhat and Redhat-based distributions, and is included in
  XFree86 3.9.17 ( the latest version at the time of writing. It will
  also be a part of XFree86 4.0 ) xfs is actually just the standard font
  server that comes with XFree86. It's source code is part of the
  XFree86 source tree.  However, distributions have recently been
  shipping a version that runs in stand alone mode.  The standalone X
  font server, with the TrueType support patch ( the TrueType support
  takes place via a font server called xfsft ) is probably the nicest
  font management solution currently available. Its advantages include:

  o  Support for different types of fonts, including Type1, TrueType and
     bitmap.

  o  Makes fonts available to remote displays.

  o  Greatly simplifies editing the fontpath -- you can do it via the
     command line utility chkfontpath, as opposed to having to edit
     configuration files. This not only makes life easier for users, it
     makes packaging more safer and more scriptable for packagers.

  Because different distributions ship with different configurations, it
  is not true that one size fits all. We can split users up into three
  groups:

  o  Your distribution ships with a standalone xfs and it has been
     patched to support TrueType. This group includes Redhat users and
     users of derivatives of Redhat such as Mandrake, TurboLinux, and
     Independence.  For this group, the wisest strategy is to install
     both TrueType and Type1 fonts through xfs

  o  Some distributions ship with a stand alone xfs package, but no
     TrueType support (at the time of writing.  Note that XFree86
     supports TrueType as of version 3.9.17 ).  This includes Debian.
     For these users, the best thing to do is use xfs to install Type1
     fonts, and install TrueType fonts via xfstt. Debian users can seek
     out the TrueType Fonts in Debian mini-HOWTO
     <http://www.dimensional.com/~bgiles/debian-tt.html> for information
     about installing TrueType fonts in Debian.

  o  If you don't have xfs then you will need to install Type1 fonts by
     adding to their XFree86 font path and using xset. You should
     install TrueType via xfstt.

  4.1.  The font path

  XFree86 finds your fonts by searching a font path, a list of
  directories ( or servers -- we'll explain this further later. )
  containing fonts.  When an application requests a font, it searches
  through the directories in your font path one at a time until the font
  is found.  To make fonts available requires you to set your font path.
  You can add a directory to your font path with the command
          xset fp+ directory



  Once you have done this, you need to ask the X server to re-scan for
  available fonts with the command

          xset fp rehash



  Since you will want these commands to run automatically, you should
  put them in your .xinitrc file ( or possibly your .Xclients or .xses-
  sion file -- this depends on how you start X. It's convenient to make
  two of these files symlinks to the other to avoid confusion ).
  Another way to have the commands  set automatically is edit XF86Con-
  fig.  For example, to add /usr/share/fonts/myfonts to the fontpath
  when X is started, edit XF86Config like this:

                  ...
                  Section "Files"
                  ...

                  FontPath /usr/share/fonts/myfonts
                  ...
                  EndSection
                  ...


  The advantage of editing XF86Config is that the resulting changes are
  system wide.

  4.2.  Installing Type1 Fonts

  4.2.1.  Run Type1inst

  The easiest way to make Type1 fonts available to X is with the help of
  the Type1inst utility. This is a perlscript that automatically creates
  the fonts.dir and fonts.scale files that you need for X to use the
  fonts. Simply CD to the directory, and run type1inst.

          cd directory
          type1inst



  4.2.2.  If You Have the xfs  Package

  Now you need to add the fonts to your fontpath. If you already have
  the standalone ``xfs'' running, you do this by editing your xfs
  configuration file.

  Redhat users can just use ``chkfontpath''.  the format is chkfontpath
  --add directory

  Your fonts should now be available to X. Now you just run

          xset fp rehash



  and X will be able to find the new fonts.



  4.2.3.  If You Don't Have The xfs  Package

  In this case, you need to add the directory containing your new fonts
  to the font path, as described previously.

  4.3.  True Type Fonts

  Adding TrueType fonts is a little more difficult, because you need to
  have a font server that is capable of serving TrueType fonts.  Two
  font servers that do this are xfstt and xfs.

  xfstt is a TrueType font server. While it's easy to configure, and
  quite useful, it appear that xfs is becoming more popular.  The main
  advantage of xfs over xfstt is that it supports both Type1 and
  TrueType fonts.

  4.3.1.  xfstt

  To set up xfstt, just download it and install it. If you have an rpm
  based distribution, there is a well packaged version of xfstt at
  http://independence.seul.org/.  Once you install it, you need to do
  the following:

  1.  install fonts into the appropriate directory ( read the
     documentation that comes with the package ).

  2. cd to that directory and run xfstt --sync. This causes it to look
     for the fonts and create the fonts.dir file.

  3. Now add unix/:7100 to your font path.

     Your TrueType fonts should now display and be available to
     applications such as GIMP and Netscape.  You may want to configure
     it to start every time your system starts up.  Check to see if
     there's a startup file included ( if you are using RPM, you can use
     rpm -ql xfstt |grep init and look for the file with a name
     something like this: /etc/rc.d/init.d/xfstt ) If you don't have an
     init script, just put two  lines in /etc/rc.local like this:

             /usr/X11R6/bin/xfstt --sync
             /usr/X11R6/bin/xfstt &



  4.4.  xfs

  Some of the newer Linux distributions ship with the X font server xfs
  configured to run as a stand alone program.  Notably, Redhat and all
  the redhat based distributions use this modularised xfs with TrueType
  compiled in.  Debian also ship xfs, but the version they ship doesn't
  have built in true type support.

  Running xfs as a stand alone server has several benefits, especially
  if it is compiled with TrueType support. The main advantage is that
  since the font server is no longer attached to the X server, it is
  possible to serve fonts to remote displays. Also, it makes it much
  easier to modify the font path.

  4.4.1.  The xfs  Path

  As a font server, xfs has it's own font path.  One might wonder where
  this fits into the picture. It works like this: you can place the xfs
  font server in XFree86's font path, by adding unix/:port to the
  XFree86 font path.  Once you do this, any font in the xfs font path
  automatically becomes available to XFree86.
  The xfs font path is determined by the xfs configuration file, which
  is /etc/X11/fs/config on Redhat, and /etc/X11/xfs/config on Debian.
  Redhat users do not need to explicitly edit this file, they can use
  the chkfontpath utility.  The syntax is simple:


          chkfontpath --add directory



  Users of other distributions can edit the configuration file as fol-
  lows:

          catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
          ...
          /usr/share/fonts/my_new_fonts/,
          ...
          /usr/share/fonts/some_other_directory
          # in 12 points, decipoints
          default-point-size = 120
          ...



  The above would add /usr/share/fonts/my_new_fonts/ to the xfs font
  path. Note that the last line of the list of directories doesn't have
  a comma at the end.  For these modifications to the font path to
  become effective, xfs must be restarted. It's also a good idea to
  restart your X session after restarting xfs.

  4.4.2.  Installing a Font Into xfs

  To prepare a font for xfs, you need to follow the following steps:

  o  If you don't have xfs installed, you need to install it.

  o  Put the new fonts in a directory.

  o  If you are installing Type1 fonts, prepare the new directory for
     the server by running type1inst in the directory.

  o  If you are installing TrueType fonts, ( remember, not all
     distributions can do TrueType via xfs !  ), prepare the new
     directory for the server by running

             ttmkfdir -o fonts.scale
             mkfontdir



  in the directory containing your new fonts.  ttmkfdir is part of the
  freetype package.

  o  Now you can add the new directory to your xfs search path.  Users
     of Redhat-like distributions can do this with the chkfontpath
     utility: Other users can do this by editing their xfs configuration
     file.

  o  if xfs is already installed on your system, you should see which
     port it is running on. You can do this as follows:

             ps ax|grep xfs



  o  Then check your XFree86 font path.

                     xset -q



  o  If your font path includes something like unix:/port_number were
     port_number is the port which the server is running on, then you
     already have xfs set up properly. Otherwise, you should add it to
     your XFree86 font path.

                     xset fp+ unix/:port_number
                     xset fp rehash



  You can add it permanently by editing your .xinitrc as explained pre-
  viously.  To add it system wide, edit your XF86Config file ( probably
  either /etc/X11/XF86Config, /etc/XF86Config or
  /usr/X11R6/lib/X11/XF86Config ), by adding a line FontPath
  "unix:/port_number" in the Files section.  Here's an example:

                  ...
                  Section "Files"
                  ...

                  FontPath "unix/:-1"
                  ...
                  EndSection
                  ...



  o  If xfs is already properly installed, then you can restart it like
     this:

                     /etc/rc.d/init.d/xfs restart



  o  After restarting xfs, it's a good idea to restart your X-session.

  5.  Making Fonts Available To Ghostscript

  To make fonts available to ghostscript, it suffices to tell
  ghostscript where the files corresponding to a given font are located.
  The file that needs to be edited is
  /usr/share/ghostscript/version/Fontmap.  The format is very simple,
  almost immediately self evident on perusing it.

  5.1.


  Type1

  Adding Type1 fonts is straightforward. Run type1inst on the directory
  containing the font. type1inst will output a file called Fontmap.
  Append this file to the ghostscript Fontmap file.

  5.2.

  True Type

  Adding truetype fonts is a little trickier, because we have to get the
  name of the TrueType font. One way (brute force, alas) to do this is
  using the ttf2pt1 TrueType to Type1 converter, and grabbing the font
  name from the afm ( there's got to be a more efficient way !  but this
  works, ugly as it is ). You do it like this:

                  ttf2pt1 -A fontname - 2 > /dev/null  |grep FontName



  Then you add an entry to the ghostscript Fontmap file in the correct
  format, eg

          some-font       (/usr/share/fonts/subdirectory/somefont.pbf);



  Well, that works fine, but try doing it with 500 or so fonts.  This is
  the kind of thing that calls for a short perlscript:

  #!/usr/bin/perl
  # ttfontmap -- generate fontmap file for TrueType fonts
  my $directory=shift || print STDERR "Usage: ttfontmap {directory}\n";

  $directory=~s/\/$//;

  for my $fontname ( glob ( "$directory/*.ttf" ) )
  {
      open ( R, "sh -c \"ttf2pt1 -A $fontname - 2>/dev/null\" |" );
      while ( <R> )
      {
          if ( $_ =~ /^FontName/ )
          {
              s/^FontName\s*//;
              chomp;
              print "/" .  $_ . "    ($fontname);\n" ;
          }
      }
      close R;
  }



  You can download this script <http://pegasus.rut-
  gers.edu/~elflord/font_howto/ttfontmap>

  To set this script up, all you need to do is cut and paste it into a
  file called ttfontmap, and place the file somewhere in your PATH (
  such as /usr/bin ).  You run this script like this:

          ttfontmap directory > output_file



  where directory is the directory containing the fonts. You are left
  with the file output_file which you can append to your ghostscript
  fontmap. Note: some will observe that you could just use

          ttfontmap directory >> /usr/share/ghostscript/version/Fontmap



  However, I advise against this ( what would happen if you typed ``>''
  instead of ``>>'' ? )


  5.3.  Using Ghostscript To Preview Fonts

  Once you've made fonts available to ghostscript, you can preview them.
  Do this by running the ghostscript interpreter on the file prfont.ps
  in your ghostscript installation, and after you start it, type:

          /Fontname DoFont



  at the ghostscript font ( where FontName is the ghostscript name of
  the font you wish to preview ).  There are several other ways you can
  invoke gs. For example, if you want to create a postscript file that
  you can look at in a nicer postscript viewer such as gv, you can use

          gs -sDEVICE=pswrite -sOutputFile=somefile.ps  prfont.ps



  Having done this, you can also print your output file.


  6.  True Type to Type1 Conversion

  6.1.  Why ?

  or perhaps the right question to ask is ``why not ?'' The typical
  Linux user has experienced a migration from Windows, and probably has
  an enormous collection of TrueType fonts. Many of these fonts ( eg
  those that ship with MS Word and Corel's products ) are of fairly good
  quality. However, some Linux applications, such as Star Office and
  LaTeX do not support TrueType fonts, but do support Type1 fonts.
  update: it looks like Star Office can handle TrueType fonts, but I'm
  still trying to work out the details. At best, it involves some fairly
  gruesome hacks.  This is a pity, because with ghostscript support for
  TrueType, and TrueType font servers, Linux has the infrastructure it
  needs to handle TrueType.

  6.2.  How ?

  To convert your TrueType fonts into Type1 fonts, go to
  http://quadrant.netspace.net.au/ttf2pt1/
  <http://quadrant.netspace.net.au/ttf2pt1/> and get ttf2pt1.  To
  convert a TrueType to a Type1 font, use the following syntax:

          ttf2pt1 -b file.ttf name



  Where name is the name of the file corresponding to the new Type1 font
  ( ie it's arbitrary. It's a good idea to make it the same as the ttf
  file.  eg ttf2pt1 -b foo.ttf foo.

  Well, that worked fine for one font. If we have a lot, we need a
  smarter way to do it. One can just just use a loop:

          for X in *.ttf; do ttf2pt1 -b $X ${X%%.ttf}; done



  Alternatively, you can download the ttfutils <http://pegasus.rut-
  gers.edu/~elflord/font_howto/ttfutils-0.2.tar.gz> package and use
  ttf2type1 for the conversions.



          ttf2type1 *.ttf



  7.  WYSIWYG Publishing and Fonts

  7.1.  Introduction and Overview

  Installing fonts for WYSIWYG publishing on Linux is a relatively
  complex task. It typically involves three steps:

  o  Make the font available to the X server

  o  Make the font available to ghostscript

  o  Make the font available to the application

     The main reason for the complexity is that the font printing system
     ( ghostscript ) is unrelated to the screen font system. In a way,
     Linux's left hand does not know what it's right hand is doing.
     This problem is nontrivial to solve, because it is possible that
     printer fonts and display fonts reside on different machines, so
     there is no guarantee that all fonts the XClient uses are
     printable.

  The good news is that most WYSIWYG applications use what is a
  reasonable solution to this problem. The solution involves
  constructing some kind of mechanism that maps screen fonts to printer
  fonts ( this is the main issue.  There are also other issues, such as
  grouping bold, italic and roman variants into ``families'' of fonts ).
  Unfortunately, there is no standard way to do this. It seems that font
  management standards which address this issue would greatly simplify
  the installation of fonts into WYSIWYG publishing systems, because all
  applications could use a system-wide ( as opposed to application-
  specific ) configuration.

  7.2.  Applixware

  There are two ways to install fonts into Applixware. One method
  involves using FontTastic, which is Applixware's ``private'' font
  server. The other method involves editing Applixware's fontmap, to use
  a font already installed on the system. Installing into the font
  server is more convenient, but fonts installed in this manner may only
  be printed at 300 dpi.

  7.2.1.  FontTastic

  Using FontTastic is the easy way to do it. To install new fonts like
  this, simply do the following:

  1. Run Applixware as root

  2. Click on the tools menu.

  3. Choose ``Font Installer''

  4. Check ``OK'' in the popup dialog

  5. Click the ``Catalogs'' menu and choose ``create''

  6. Fill in the catalog name box. It doesn't matter what you put there.
     For the rest of this example, we'll assume it's called ``foobar''

  7. Select your foobar catalog from the catalog manipulations list.

  8. From the ``Services'' menu, select ``install fonts into ->
     FontTastic font server''

  9. Make sure catalog foobar is selected in the catalogs list, then
     press the ``select files'' button.

  10.
     Use the select files dialog to select the fonts you want to
     install. Press ``OK'' when you've selected the files.  For example,
     if you want to select arial.ttf in the directory
     /usr/share/fonts/ttfonts/, you would type /usr/share/fonts/ttfonts
     in the ``Current Directory'' dialog, then select arial.ttf from the
     files dialog box, then click ``OK''. Note that you can select
     multiple files, but they all must come from the same directory.

  11.
     You can edit your list by checking on the different fonts in the
     list box and possibly removing or renaming them.

  12.
     When you're ready, click the ``install fonts'' button. Then click
     ``OK''.

  13.
     Go to the ``services'' menu and choose ``update''. Check ``OK'' on
     the annoying modal dialog, then choose exit from the services menu.
     Exit applix.

  14.
     Congrats, you're done ! The new fonts will be available when you
     restart Applix.

  7.2.2.  Using System Wide Fonts With Applixware

  This method is more involved,  but produces better results. I
  recommend that this method is used for fonts that are really
  important, and that you use a lot. There are a few steps to this:

  7.2.2.1.  Make the fonts available to X

  This is explained ``in the previous section''

  7.2.2.2.  Make the fonts available to ghostscript

  This is explained in ``in the previous section''

  7.2.2.3.  Edit the fontmap.dir

  This is the final step in making your fonts available to Applix, and
  also the most time consuming step. The file fontmap.dir is in under
  the axdata/fontmetrics of your applix installation.  The purpose of
  this step is basically to tell applix which screen fonts go with which
  outline fonts. This is in general a very nontrivial problem, because
  the screen fonts are not always on the same computer that the
  application is installed.

  We describe how to add  fonts to fontmap.dir. In this example, we add
  the font Baskerville Italic.


  1. First, we add a line that says FontRecord = Baskerville-Normal-
     Italic In fact, the name we use in FontRecord is completely
     arbitrary.  However, the font record must be unique to the font.
     Because of this, it's good practice to use the name that
     ghostscript uses for the font.

  2. Next, we a line that says Family = Baskerville The family name for
     a font is the name that appears in Applix's font selection menu.
     Typically, it is non-unique, since bold, italic, roman and bold-
     italic variants of a font will typically go under the same family.

  3. If the font is either a bold, or italic variant, or both, we need
     to add the following lines:

             Slant = 1



  if the font is italic, and

          Weight = 1



  if the font is bold.  If the font is bold and italic, we add both
  lines.  In this example, we need only add the line

          Slant = 1



  4. We add a line that looks like this:

             ScreenName = "-paradise-baskerville-medium-i-normal--0-0-0-0-p-0-iso8859-1"



  The screen name is the name that the X-server uses for the font.  We
  can list font names containing the string ``bask'' by typing

          xlsfonts|grep -i bask



  5. Now we add a line that gives the name of the printer font:
     PostScriptPrinterName = Baskerville-Normal-Italic

  6. Next, we need to specify the location of the font metric file and
     the outline file

             MetricsFile = /usr/share/fonts/misc/baskvli.afm
             Type1FontFileName = /usr/share/fonts/misc/baskvli.pfb



  If you are adding a TrueType file, you can use ttf2pt1 to generate an
  afm file :

                  ttf2pt1 -A foo.ttf - > foo.afm



  ( or get the ttfutils package and use ttf2afm ) Then you use something
  like this:

          MetricsFile = /usr/share/fonts/misc/foo.afm



  Do not include a Type1FontFileName directive -- let ghostscript take
  care of this.

  That's it. Now after adding the whole family of fonts, you should have
  something like this:

          FontRecord = Baskerville-Normal
          Family = Baskerville
          ScreenName = "-paradise-baskerville-medium-r-normal--0-0-0-0-p-0-iso8859-1"
          PostScriptPrintName = Baskerville-Normal
          MetricsFile = /usr/share/fonts/misc/baskvl.afm
          Type1FontFileName = /usr/share/fonts/misc/baskvl.pfb

          FontRecord = Baskerville-Normal-Italic
          Family = Baskerville
          Slant = 1
          ScreenName = "-paradise-baskerville-medium-i-normal--0-0-0-0-p-0-iso8859-1"
          PostScriptPrintName = Baskerville-Normal-Italic
          MetricsFile = /usr/share/fonts/misc/baskvli.afm
          Type1FontFileName = /usr/share/fonts/misc/baskvli.pfb

          FontRecord = Baskerville-Bold
          Family = Baskerville
          Weight = 1
          ScreenName = "-paradise-baskerville-bold-r-normal--0-0-0-0-p-0-iso8859-1"
          PostScriptPrintName = Baskerville-Bold
          MetricsFile = /usr/share/fonts/misc/baskvlb.afm
          Type1FontFileName = /usr/share/fonts/misc/baskvlb.pfb

          FontRecord = Baskerville-Bold-Italic
          Family = Baskerville
          Weight = 1
          Slant = 1
          ScreenName = "-paradise-baskerville-bold-i-normal--0-0-0-0-p-0-iso8859-1"
          PostScriptPrintName = Baskerville-Bold-Italic
          MetricsFile = /usr/share/fonts/misc/baskvlbi.afm
          Type1FontFileName = /usr/share/fonts/misc/baskvlbi.pfb



  It is possible to do more with this configuration file. The file
  itself has a glossary which explains the format of the configuration
  file.

  7.3.  Star Office

  Here, we cover Star Office 5.0. The procedure with Star Office 5.1 is
  similar, but the utility is called spadmin, not psetup.  It's worth
  mentioning up front that John McLaughlin's page
  <http://www.mindspring.com/~john_mcl/adding_fonts.html> is an
  excellent source on this issue, and it inspired most of what follows.

  Having tried both Star Office 5.0, and 5.1, I have found that Star
  Office 5.1 seems to give me less grief when adding new fonts. I was
  not succesful adding true type fonts to Star Office 5.0, but it proved
  somewhat easier with Star Office 5.1.

  7.3.1.  Backup Your Configuration Before you Start !

  It's good to make a backup in case you inadvertantly hose your
  configuration. Modifying fonts will impact several files in the xp3.
  You should definitely backup the file xp3/psstd.fonts.  I recommend
  going further and backing up the whole xp3 directory. You can do this
  by cd-ing to your Star Office directory, then using

          tar cvzf xp3.tgz xp3



  to create a backup. To restore a backup, delete the xp3 directory and
  unpack the archive

          rm -rf xp3
          tar xvzf xp3.tgz



  7.3.2.  Adding Type1 Fonts to Star Office

  Adding Type1 fonts to Star Office is relatively simple.  If you want
  to use your TrueType fonts with Star Office 5.0, the best thing to do
  is convert them to Type1 fonts, and then follow the procedure outlined
  here. If you have Star Office 5.1, you might wish to use the
  proceedure for installing TrueType fonts instead ( though it is
  somewhat more difficult ).  Firstly, do the usual thing -- make the
  font available to both X and ghostscript. Once this is done, the font
  can be installed into Star Office using the psetup tool. The procedure
  is as follows:

  1. As root, run psetup ( or spadmin if you have Star Office 5.1 )

  2. Press the ``add fonts'' button.

  3. The easiest thing to do after this is press the ``initialize font
     paths'' button. This puts a list of all fonts in your X font path
     in the list box.

  4. Choose the directory containing the font you wish to install ( it
     should be in the box ), and then press ``OK''.

  5. Click the ``convert all font metrics button''.

     That's it. You're done. You can exit ( or click ``OK'' until it
     exits ).  When you restart Star Office, you will have the new
     fonts.

  7.3.3.  Adding TrueType Fonts to Star Office

  Adding TrueType fonts to Star Office is nontrivial, but possible.
  After some hard work, and long hours stareing at John McLaughlin's
  page <http://www.mindspring.com/~john_mcl/adding_fonts.html> page, I
  finally got them working in Star Office 5.1.  Note that this does not
  work with version 5.0.  The following steps are appropriate it you are
  printing through ghostscript:

  o  Make the fonts available to X.

  o  Make the fonts available to ghostscript.

  o  You need to have afm files for the fonts you wish to add. Use

             ttf2pt1 -A foo.ttf - > foo.afm



  to create the afm files.  Alternatively, you can get the

  o  ttfutils
     <http://pegasus.rutgers.edu/~elflord/font_howto/ttfutils-0.2.tar.gz>
     package and use ttf2afm The advantage of this is you can handle
     several at a time, eg

             ttf2afm *.ttf



  o  Star Office needs pfb files corresponding to each ttf file. You can
     create them with the command

             touch foo.pfb



  Actually, Star Office only uses these files for printing purposes.
  And by enterring the font in the PPD, thus duping Star Office into
  thinking the fonts are inside your printer ( when they're actually
  inside ghostscript's rendering system ), you get around needing to use
  these files. Star Office just seems to require that the pfb file
  exists to install the font.


  o  Now you can run spadmin and install the font(s).

  o   Now add the fonts to the PPD file corresponding to your printer
     configuration. The name you use for the font should be the same
     name Star Office uses for it, not the ghostscript font name. For
     example, if the font is foobar.ttf and the corresponding afm file
     is foobar.afm, you use the name ``foobar'' for the font in the PPD
     file. The entry should look something like this:

     *Font cloistrk: Standard "(001.002)" Standard ROM



  On the other hand, if you are not printing from ghostscript, you have
  different issues to deal with. In this case, tricking Star Office into
  thinking that your printer has the fonts is a bad idea, because your
  printer does not have the fonts in the ROM, so while gv will display
  the postscript files nicely, your printer will not be able to print
  them.  If you have a postscript printer, the main differences are as
  follows:

  o  Do not edit the PPD file.

  o  Instead of using touch foo.pfb to create empty pfb files, you need
     the pfb files to be Type42 postscript fonts. A Type42 font is
     really a ``printer TrueType font''.  You don't really notice Type42
     fonts even when you use them, because most applications handle them
     transparently.  To create Type42 fonts, you use ttfps
     <ftp://ftp.dcs.ed.ac.uk/pub/jek/programs/ttfps.tar.gz> to create
     the files.

             ttfps foo.ttf foo.pfb



  There are some gotchas. Sometimes, Star Office might not choose the
  screen font you like. It is sometimes worth checking xp3/psstd.fonts
  and possibly editing it to make sure that Star Office is really using
  the font you had in mind for screen display.  Also, Star Office
  doesn't handle configuration problems gracefully.  If there's
  something wrong with your configuration, it's possible that the word
  processor will not even start. This is why you should back up your xp3
  directory.

  7.3.4.  Under the Hood

  If you wish to install TrueType fonts in Star Office, you may need to
  learn how Star Office handles things. When you run spadmin or psetup,
  the following happens:

  o  Star Office makes symbolic links to the pfb outline files in your
     xp3/pssoftfonts directory.

  o  The afm file is copied into the directory xp3/fontmetrics/afm/

  o  An entry is added to the xp3/psstd.fonts file.  This file stores
     the names of all the screen fonts used by Star Office ( in
     particular, it maps the screen fonts to the outline filenames ).

  This is why it's good to simply backup the whole xp3 directory -- it
  is the only convenient way to restore Star Office to a clean
  configuration.

  7.4.  Word Perfect

  Nothing yet.  Rod Smith's webpage <http://www.rodsbooks.com/wpfonts/>
  is the definitive resource regarding installing fonts on Word Perfect.

  8.  Netscape

  Perhaps the most notorious application as far as fonts are concerned
  is the dreaded Netscape. However, there is a fairly simple procedure
  to attack Netscape font ugliness. The main problem is that Netscape
  wants to use 75dpi fonts which is typically too small. You can fix
  this by specifying the appropriate X resources in your .Xdefaults
  file:

          Netscape*documentFonts.sizeIncrement: 20
          Netscape*documentFonts.xResolution*iso-8859-1: 100
          Netscape*documentFonts.yResolution*iso-8859-1: 100


  The number 100 can be chosen arbitrarily. For example, if you like
  your fonts really large, like I do, then you may want to use 150
  instead.

  The other essential tip with regard to addressing Netscape font
  ugliness is this -- get the Microsoft font pack. These fonts are
  widely used and it makes an enormous difference if you have ( or don't
  have ) those fonts.

  9.  TeX / LaTeX

  9.1.  A Quick Primer on LaTeX/TeX fonts

  Adding fonts to TeX and LaTeX is a somewhat complex procedure.
  However, like a lot of things, it's easy if you know how to do it.
  Some fonts are distributed in metafont format, and some in Type1
  format.  Usually, the Type1 formats are more easily available.
  However, metafont fonts have the distinct advantage that they can
  adjust their shape at different sizes, while Type1 and TrueType fonts
  at different point sizes are simply magnified or reduced versions of
  precisely the same shape. The main reason why this feature is
  desirable is that ideally, fonts should be ( relatively ) wider at
  smaller sizes and narrower at larger sizes.

  For this discussion, we focus on Type1 fonts, since they are more
  widely available, and more problematic to install.

  Here's a quick primer on LaTeX fonts.    LaTeX uses the following
  types of font files for handling Type1 fonts:

  o  .pl -- property list. This is a human readable version of a tex
     font metric file.

  o  .vpl -- virtual property list. Human readable version of a virtual
     font file.

  o  .fd -- font definition. Used to define a family of fonts.

  o  .tfm  -- tex font metric. This is a metric file, as explained in
     the glossary. It is completely analogous to the .afm files used by
     Type1 fonts. TeX needs the font metrics to properly layout the
     page.

  o  .vf -- virtual font. These files contain encoding details, and act
     as interpreters. TeX treats them as fonts. For example, Imagine
     that there's some wacky font foobar-exp.pfb which consists of a few
     ( say 20 ) alternate characters, and there's a virtual font which
     uses a few of these alternate characters ( and it gets the rest of
     the characters from font foobar.pfb ).  Dvips might say ``I want
     character 65 of virtual font foo.vf''. Dvips knows that 65 is
     always an ``a'' in TeX's scheme. Then the virtual font maps TeX's
     request to a request for character 14 of the Type1 font foobar.pfb
     ( which might be the alternate ``a'' in the Type1 font foobar.pfb
     ). The virtual font mechanism is very flexible and allows fonts to
     be constructed from many different font files. This is useful when
     using fonts such as adobe's ``expert'' fonts.

  o  .pk -- a device dependent bitmap font. These are usually
     constructed on an as-needed basis ( they are renderings of Type1
     and metafont fonts ).  They are typically high resolution ( about
     300-1200dpi ), and are intended to be rendered on a printer.
     Because of their high resolution, and the fact that each point size
     of each font requires a .pk file, they require a lot of disk space,
     so they are cached, but not stored.

  o  .mf -- metafont files. Metafont is a graphics programming language
     widely used for font design ( though it can also be used for
     graphics ).  It has many advantages over TrueType and Type1
     schemes. However, it's main weakness is that it is not as
     ubiquitous as TrueType or Type1 ( and it is also not terribly well
     suited to WYSIWYG publishing. Of course, this isn't a major
     disadvantage when TeX is your typesetting system. )


  It's good to know your way around the TeX directory structure. Here
  are the main directories you'll need to know about:

  o  $TEXMF/fonts     -- the main font directory

  o  $TEXMF/fonts/type1 -- the type1 font directory

  o  $TEXMF/fonts/type1/foundry -- the directory for the shape files in
     a given foundry

  o  $TEXMF/fonts/type1/foundry/fontname -- contains the font called
     name.  The name is usually plain English, and needn't follow TeX's
     cryptic naming scheme for fonts.

  o  $TEXMF/fonts/afm/foundry/fontname -- the directory containing the
     afm files corresponding to the font name belonging to foundry
     foundry.

  o  $TEXMF/fonts/tfm/foundry/fontname -- analogous to the afm
     directory, but contains tfm files instead.

  o  $TEXMF/fonts/vf/foundry/fontname -- similar to the above, but
     contains the virtual fonts.

  o  $TEXMF/fonts/source/foundry/fontname -- similar to the above, but
     contains metafont files.

  o  $TEXMF/dvips/config/psfonts.map -- fontmap file for dvips. This
     file is similar in both function and format to ghostscript's
     Fontmap file.

  o  $TEXMF/tex/latex/psnfss -- this is where all the font definition
     files go.


  9.2.  Adding Type1 fonts

  9.2.1.  Naming the fonts

  First, you need to appropriately name your fonts.  See the fontinst
  documentation on your system for instructions on how to name fonts (
  it should be fontinst subdirectory of the directory containing your
  tetex documentation ).  To make a long story very short, the naming
  scheme is FNW{V}E{n} where:

  o  F is a one-letter abbreviation for the foundry ( m = monotype, p =
     adobe, b = bitstream, f = free )

  o  N is a two letter abbreviation for the font name ( for example, ag
     = ``avant garde'' )

  o  W is the font weight ( r = regular, b = bold, l = light d =
     demibold )

  o  V is an optional slope variant ( i = italic , o = oblique )

  o  E is an abbreviation for the encoding ( almost always 8a which is
     adobe standard encoding ).

  o  N is an optional width variant ( n = narrow )

     For example, the font Adobe Garamond demibold is pgad8a.

  9.2.2.  Creating the virtual fonts and tex font metrics

  Now you can run fontinst as follows:

          latex `kpsewhich fontinst.sty`



  then you type at the prompt:

          \latinfamily{font_name}{}\bye



  where font_name is the first three letters of your font file name (
  for example, pad for adobe garamond ).  Now fontinst will generate a
  number of files -- font description files, property list files and
  virtual property list files. It also generates a lot of .mtx files.
  These are created by fontinst, but you don't need to use them.  You
  need to convert the property lists and virtual property lists to met-
  rics and virtual fonts. This is done using the utilities vptovf and
  pltotf.

          for X in *.pl; do pltotf $X; done
          for X in *.vpl; do vptovf $X; done



  Then remove the old vpl, pl and mtx files.

  9.2.3.  Configure dvips

  You will need to edit your dvips config file, psfonts.map.  The best
  way to explain the format of the file is to give an example.


       marr8r          ArialMT <8r.enc <farr8a.pfa
       marbi8r         Arial_BoldItalicMT <8r.enc <farbi8a.pfa
       marb8r          Arial_BoldMT <8r.enc <farb8a.pfa
       marri8r         Arial_ItalicMT <8r.enc <farri8a.pfa
       marr8rn         Arial_Narrow <8r.enc <farr8an.pfa



  The 8r.enc is simply there to inform dvips of the encoding scheme used
  ( in all our examples, it's 8r, because of the way fontinst constructs
  the virtual fonts ). The leftmost column is the font name TeX uses.
  The second column is the real name of the font, which is hardcoded
  into the font file ( this name can be deduced by opening the afm file
  in a text editor, and looking for the FontName directive ). The last
  column is the filename of the shape file corresponding with the font.
  It is not necessary to provide a directory path -- tex knows where to
  look.

  9.2.4.  Test the font

  Try running latex on a document like this:

  \documentclass{article}
  \begin{document}
          \usefont{T1}{pga}{m}{n}\selectfont
          \huge
          Testing a new font \dots the quick red fox jumped over the lazy brown dogs
  \end{document}



  where you replace pga with the outline of your font.  If this works,
  you are almost done. All you have to do now is put all the files in
  the right directories ( as explained in the primer ), then run

           texconfig rehash



  so that tex can update the directory lists.

  9.2.5.  Create a .sty file

  You may want to create a .sty file so that you can more easily use
  fonts. Use the files in $TEXMF/tex/latex/psnfss as a template.



  10.  Getting Fonts For Linux

  10.1.  True Type

  10.1.1.

  Commercial Software

  True type fonts are very easy to come by, and large amounts of them
  are typically included in packages like Microsoft Word and Word
  Perfect. Getting Word Perfect is an easy way to get an enormous amount
  of fonts ( and if you're really cheap, you could buy a legacy version
  of Word Perfect for windows. The fonts on the CD are readable. )

  10.1.2.

  Microsoft's Font Download

  Microsoft have also made several TrueType fonts available. The .exe
  file is simply an archive, you can extract it using unzip.  You can
  get them from the download site
  <http://www.microsoft.com/truetype/fontpack/win.htm>

  10.1.3.

  Luc's Webpage

  Luc Devroye's webpage
  <http://cgm.cs.mcgill.ca/~luc/originalfonts.html> has links to several
  sites with free fonts available.  What's unique about these fonts is
  that a lot of them are really free, they are not ``warez fonts''.

  10.1.4.

  Web sites with truetype fonts

  There are several web sites offering freely available downloadable
  fonts. For example, the freeware connection
  <http://www.freewareconnection.com/fonts.html> has links to a number
  of archives.

  10.1.5.

  Foundries

  Several foundries sell TrueType fonts. However, most of them are quite
  expensive, and for the same money, you'd be better of with Type1
  fonts. I'll discuss these more in the Type1 fonts section. The one
  place that does do sell true type fonts at low prices is buyfonts
  <http://www.buyfonts.com>.  Please read the section on ethics before
  you buy cheap fonts.

  10.2.  Type 1 Fonts and Metafont

  10.2.1.  Dealing With Mac and Windows Formats

  Many foundries ship fonts with Windows and Mac users in mind.  This
  can sometimes pose a problem. Typically, the ``Windows fonts'' are
  fairly easy to handle, because they are packed in a zip file. The only
  work to be done is converting the pfm file to and afm file ( using
  pfm2afm ).

  Macintosh fonts are more problematic, because they are typically made
  available in .sit.bin format -- stuffit archives.  Unfortunately,
  there is no tool for Linux that can unpack stuffit archives created
  with the newer version of stuffit.  The only way to do it is run
  Executor ( Mac emulator ), or try running stuffit in dosemu or Wine.
  Once the sit.bin file is unpacked, the Macintosh files can be
  converted using t1unmac which comes with the t1utils package.

  Unfortunately, some vendors only ship Type1 fonts in Macintosh format
  ( stuffit archives ). However, according to font expert Luc Devroye
  <http://cgm.cs.mcgill.ca/~luc/>, all major foundries make Type1 fonts
  available for Mac and Windows.

  10.2.2.

  Free Stuff

  ctan <http://www.ctan.org> have a number of good fonts, many of which
  are free.  Most of these are in Metafont format, though some are also
  Type1 fonts.  Also, see Bluesky <http://www.bluesky.com> who have made
  available Type1 versions of the computer modern fonts. ( The computer
  modern fonts are of excellent quality -- to purchase anything of
  comparable quality and completeness will cost you around $500-. They
  are comparable to the premium fonts. )

  Luc Devroye's webpage
  <http://cgm.cs.mcgill.ca/~luc/originalfonts.html> has links to several
  sites with free fonts available.  What's unique about these fonts is
  that a lot of them are really free, they are not ``warez fonts''.

  URW have released the standard postscript fonts resident in most
  printers to the public domain. These fonts are quite good.

  The Walnut Creek Archive <ftp://ftp.cdrom.com/pub/os2/fonts/> has
  several freely available fonts, and shareware fonts.  Some of these
  are obvious ripoffs ( and not very good ones ).  If a font doesn't
  come with some kind of license, chances are it's a ripoff.  Also
  Winsite <http://www.winsite.com/win3/fonts/atm/> have several Type1
  fonts ( in the fonts/atm subsection of their windows 3.x software ).
  Unfortunately, several of these have afm files which have mistakes and
  are missing all kerning pairs ( you can fix the afms by editing the
  "FontName" section of the afm files. It should match the fontname
  given in the font shape file. Of course, adding kerning pairs is a
  topic beyond the scope of this document. )

  Luc Devroye's webpage <http://cgm.cs.mcgill.ca/~luc/> includes several
  free fonts he designed, as well as a lot of links, and fascinating
  discussion on the topic of typography.  This site is a ``must-visit''.
  There are also several links to many foundries.

  10.2.3.  Commercial Fonts

  10.2.3.1.  Value vs Premium: Why Should I buy Premium Fonts ?

  So you're wondering -- why do some fonts cost a lot and others are
  cheap ?  These fonts are the ``standard postscript fonts'' resident in
  most postscript printers. Also the famous Why should I buy the more
  expensive ones ?  My take on it is that for a casual user, the value
  fonts ( such as those on the Bitstream CD ) are just fine. However, if
  you're using the fonts for ``real work'', or you're just a hard core
  font junkie, then the better quality fonts are a must-have -- and most
  of the quality fonts are either free ( for example, Computer Modern ),
  or they are upmarket commercial fonts.

  The advantage of the cheaper fonts is self evident -- they are
  cheaper.  The quality fonts also have their advantages though.

  o  Ethical issues: The cheaper fonts are almost always ripoffs. Type
     design takes a long time and and experienced designer. Fonts that
     are sold for less than $1- per font were almost certainly not
     designed by the vendor.  CDs with insane quantities of fonts on the
     are almost always ripoffs  ( the possible exceptions being
     collections from major foundries that cost thousands of dollars ).
     Usually, the ripoffs lack the quality of fonts from respectable
     founries.

  o  Completeness: The higher quality fonts ( notably from Adobe ) come
     in several variants, with some nice supplements to provide the user
     with a more complete font family.  There are often bold, italic,
     and demibold variants, swash capitals, small caps, old style
     figures, and extra ligatures to supplement the font. More recently,
     Adobe have a multiple master technology which gives the user (
     almost ) infinite variation within one font family.

  o  Quality: A lot of the freely available fonts or the cheap ripoffs
     lack fairly essential features such as kerning pairs and decent
     ligatures. They are basically cheap copies. In contrast, reputable
     designers take a lot of trouble to study the original design, and
     rework it to the best of their ability.

  o  Authenticity: The person who designed Adobe Garamond ( Robert
     Slimbach ) actually studied the original designs of Claude
     Garamond. In fact reputable foundries always carefully research
     their designs, rather than just swiping something off the net, and
     modifying it with Fontographer.

  10.2.3.2.  Value


  o  An excellent place to go for a CD packed with several Type1 fonts
     of reasonable quality is Bitstream <http://www.bitstream.com>.
     Bitstreams more noted products include their 250 font CD
     <http://www.bitstream.com/products/world/font_cd/bits_collection.html>
     and their 500 font CD
     <http://www.bitstream.com/products/world/font_cd/500_cd.html> ( the
     latter goes for $50- at the time of writing ).  These are fairly
     good quality fonts, and are a fairly good starting point for the
     casual user.  The fonts used in Corel's products are (mostly)
     licensed from bitstream.

  o   Matchfonts <http://www.matchfonts.com/> offer more modestly priced
     fonts -- they are distributed in ``packs'' of about 8 fonts for
     $30. This includes some nice calligraphic fonts.  All fonts seem to
     be offered in a usable format ( the windows ATM fonts come in a
     .exe file.  Don't let the extension fool you -- it's just a zip
     archive ).  These are not ripoffs as far as I can tell.

  o   EFF <http://www.buyfonts.com> sell TrueType fonts for $2- per hit.
     They also have ``professional range'' postscript and TrueType fonts
     for $16- per typeface.

  10.2.3.3.

  Premium


  o  Adobe have several high quality,  fonts available at Adobe's type
     website <http://www.adobe.com/type/>.  Some of these are expensive,
     but they have several more affordable bundles -- see Adobe Type
     Collections <http://www.adobe.com/type/collections.html>.  Adobe
     have some of the most complete font families on the market, for
     example, Garamond <http://www.adobe.com/type/browser/P/P_912.html>,
     Caslon <http://www.adobe.com/type/browser/P/P_180.html>, and their
     multiple masters <http://www.adobe.com/type/browser/C/C_4e.htm> (
     Myriad and Minion, used on their website are among the nicer of
     their multiple masters. )
  o  Berthold Types Limited <http://www.bertholdtypes.com> is a major
     foundry, who offer several quality fonts. Some of them are resold
     through Adobe, all are directly available from Berthold. Same price
     ballpark as Adobe.

  o  ITC develop several quality fonts ( including some of the ones
     Corel ships with their products ) at http://www.itcfonts.com
     <http://www.itcfonts.com> They offer family packages for about
     $100-180 US.  Their fonts, come in both Type1 and TrueType format.
     It's better to choose the ``Windows'' package, because Mac formats
     are difficult to handle on Linux.

  o  Linotype <http://www.linotypelibrary.com> are a well known foundry
     who offer fonts by legendary designers including Herman Zapf. (
     yep, the guy ``Zapf Chancery'' is named after.  He also designed
     Palatino. )

  o  Monotype <http://www.monotype.com> develop most of the fonts
     shipped with Microsoft products. One of the older and well
     respected foundries.

  o   Tiro Typeworks <http://www.portal.ca/~tiro/> sell good quality, if
     somewhat expensive typefaces.  Their typefaces are very complete,
     for example, they include complete sets of ligatures, and
     smallcaps, titling fonts, etc.  UNIX is listed as one of the OS
     options -- which is a welcome surprise after seeing the words
     ``Windows or Mac'' too many times..

  10.2.3.4.

  More Links

  For links to a bunch of other foundries, see Luc Devroye's page
  <http://cgm.cs.mcgill.ca/~luc/>


  11.  Useful Font Software for Linux

  There are several font packages for Linux. Many of them are essential.

  o  chkfontpath is a utility for manipulating the xfs configuration
     file.

  o  DTM -- the Definitive Type Manager
     <http://www.debian.org/~fog/dtm/> is a global font management tool.
     This is a developer's release.

  o  fontinst <http://www.tug.org/applications/fontinst/index.html> is a
     LaTeX package designed to simplify the installation of Type1 fonts
     into LaTeX.

  o  Freetype <http://www.freetype.org> is a TrueType library that comes
     with most Linux distributions

  o  Ghostscript <http://www.cs.wisc.edu/~ghost/> is the software that
     is used for printing on Linux. The version of ghostscript that
     ships with Linux is GNU ghostscript. This is one version behind the
     latest release of Aladdin ghostscript ( who release their old
     versions under the GPL )

  o  pfm2afm
     <http://pegasus.rutgers.edu/~elflord/font_howto/pfm2afm.tgz> is a
     utility for converting windows pfm font metric files into afm
     metrics that can be used for Linux. This is based on the original
     version available at CTAN, and includes modifications from Rod
     Smith to make it compile under Linux.
  o  mminstance and t1utils <http://www.lcdf.org/~eddietwo/type/> are
     two packages for handling Type1 fonts.  mminstance is for handling
     Adobe's multiple master
     <http://www.adobe.com/type/browser/C/C_4e.html> Type1 fonts.
     t1utils is a suite of utilities for converting between the
     different Type1 formats.

  o  ttf2pt1 <http://quadrant.netspace.net.au/ttf2pt1/> is a TrueType to
     Type1 font converter. It is useful if you have applications that
     require Type1 fonts.

  o  ttfps <ftp://ftp.dcs.ed.ac.uk/pub/jek/programs/ttfps.tar.gz>
     converts .ttf TrueType font files into Type42 files.

  o  ttfutils
     <http://pegasus.rutgers.edu/~elflord/font_howto/ttfutils-0.2.tar.gz>
     A package of utilities for handling TrueType fonts. This package
     requires ttf2pt1. Useful if not essential.

  o  type1inst <ftp://ftp.metalab.unc.edu/pub/Linux/X11/xutils/> is an
     essential package for installing Type1 fonts. It greatly simplifies
     the installation.

  o  xfstt <ftp://ftp.metalab.unc.edu/pub/Linux/X11/fonts/> is a
     TrueType font server for Linux. It's useful, but xfs is probably a
     better choice.

  o  xfsft <http://www.dcs.ed.ac.uk/home/jec/programs/xfsft/> The xfsft
     font server. Note that this is included in xfs.

  o  x-tt <http://hawk.ise.chuo-u.ac.jp/student/person/tshiozak/x-tt/>
     is a font server designed to handle Korean and Japanese fonts.


  12.  Ethics and Licensing Issues Related to Type

  Font licensing is a very contentious issue. While it is true that
  there is a wealth of freely available fonts, the chances are that the
  fonts are ``ripoffs'' in some sense, unless they come with a license
  indicating otherwise.  The issue is made more confusing by
  intellectual property laws regarding typefaces. Basically, in the USA,
  font files  are protected by copyright, but font renderings are not.
  In other words, it's illegal to redistribute fonts, but it's perfectly
  legal to ``reverse-engineer'' them by printing them out on graph paper
  and designing the curves to match the printout. Reverse engineered
  fonts are typically cheap and freely available, but of poor quality.
  These fonts, as well as pirated fonts are often distributed on very
  cheap CDs containing huge amounts of fonts.  So it's not always easy
  to tell if a font is reverse engineered, or simply pirated. This
  situation creates an enormous headache for anyone hoping to package
  free fonts for Linux.

  Perhaps one of the most offensive things about the nature of font
  piracy is that it artificially debases the value of the work that type
  designers do. Pirated fonts invariably are bundled en masse onto these
  one zillion font CDs, with no due credit given to the original
  designers. In contrast, what is commendable about several legitimate
  font foundries is that they credit their designers.

  There are many differing opinions on this issue. See typeright
  <http://www.typeright.org> for an explanation of the case in favour of
  intellectual property rights.  Also, see Southern Software, Inc
  <http://www.ssifonts.com/> for another opinion -- but don't buy any of
  their fonts! Their Type1 fonts ( poorly reverse-engineered Adobe fonts
  ) do not have AFMs, and are thus unusable.

  The comp.fonts FAQ <http://www.faqs.org/faqs/fonts-faq/part2/> also
  discusses the issues of fonts and intellectual property, as does Luc
  Devroye's homepage <http://cgm.cs.mcgill.ca/~luc/>. These references
  are somewhat less extreme in their views.



  13.  References

  13.1.  Font Information


  o  Rod Smith's homepage <http://www.rodsbooks.com/> contains a wealth
     of information about using fonts and printers with Applixware and
     Word Perfect.

  o  John McLaughlin's page
     <http://www.mindspring.com/~john_mcl/adding_fonts.html> discusses
     setting up fonts with Star Office

  o  Jim Land's homepage
     <http://www.geocities.com/SiliconValley/5682/postscript.html>
     contains a lot of links to sites on postscript and fonts.

  o  The comp.fonts FAQ <http://www.faqs.org/faqs/fonts-faq/> is the
     definitive font FAQ.

  o  Luc Devroye's homepage <http://cgm.cs.mcgill.ca/~luc/> Contains
     enough information about fonts and other things to sink a ship.
     This guy designed a bunch of free fonts, and his homepage has a lot
     of interesting links, information and commentary.

  o  The Font Deuglification HOWTO
     <http://www.linuxdoc.org/HOWTO/mini/FDU.html> discusses TrueType
     fonts under Linux. This is the clear winner of the ``TrueType''
     HOWTOs.  An excellent source of information.

  o  TrueType Fonts in Debian mini-HOWTO
     <http://www.dimensional.com/~bgiles/debian-tt.html> discusses
     installing TrueType in Debian.  A must-read for Debian users.  Also
     worth reading if you have any distribution that doesn't have the
     version of xfs with TrueType support.

  o  The (preliminary) True Type HOWTO
     <http://www.moisty.org/~brion/linux/TrueType-HOWTO.html> -- an
     incomplete HOWTO dated June 1998. Included in this list for
     completeness.

  o  TrueType for XFree86 Mini-HOWTO
     <http://www.sfu.ca/~yzhang/linux/truetype/> -- a slightly dated
     HOWTO. Only applicable to Redhat 5.x

  13.2.  Postscript and Printing Information


  o  Adobe's Postscript page
     <http://www.adobe.com/print/postscript/main.html> is the definitive
     site on the postscript standard.

  o  Ghostscript's home page <http://www.cs.wisc.edu/~ghost/> has a lot
     of information, and all the latest printer drivers.

  o  Jim Land's homepage
     <http://www.geocities.com/SiliconValley/5682/postscript.html>
     contains a lot of links to sites on postscript and fonts.

  o  Christopher Browne's Printing FAQ
     <http://www.hex.net/~cbbrowne/printing.html>


  14.  Glossary


  o  afm Stands for Adobe Font Metric. These files store information
     about the width and spacing associated with the font, as opposed to
     information about the font shape.

  o  anti-aliasing also referred to as font smoothing is a technique
     used to render fonts on low resolution devices ( such as a monitor
     ).  The problem with rendering fonts is that the fonts consist of
     outlines, but the device renders in dots. The obvious way to render
     a font is to color black any pixel inside the outline, and leave
     all other dots.  The problem with this is that it doesn't
     adequately address the pixels that are on the outline. A smarter
     algorithm would be to color the boundary pixels gray. Anti-aliasing
     essentially involves doing this.

  o  bdf fonts are a variety of bit-mapped fonts that may be used with
     X.

  o  bitmap fonts These fonts are simply a collection of dots. Each
     character of the font is stored as a dot matrix. Because of this,
     bitmap fonts are device dependent, so you can't use the same bitmap
     fonts on a screen and a printer. Examples of bitmap screen fonts
     include .pcf and .bdf fonts used by X. Examples of printer bitmap
     fonts include TeX's PK fonts.

  o  didone see modern.

  o  DPI Dots Per Inch. Monitors typically display at 75-100 DPI, while
     modern printers vary from 300-1200 DPI

  o  expert fonts are collections of additional characters that
     supplement a font. They include small caps fonts, ornaments, extra
     ligatures, and variable width digits. Many of Adobe's fonts have
     expert fonts available.

  o  font server a background program that makes fonts available to
     XFree86.

  o  glyph A glyph is a fancy word for a shape. It is a component that
     makes up an outline font. For example, the dot on the letter ``i''
     is a glyph, as is the vertical line, as are the serifs. Glyphs
     determine the shape of the font.

  o  kerning In variable width fonts, different pairs of characters are
     spaced differently. The font metric files store information
     regarding spacing between pairs of characters, called kerning
     pairs.

  o  ligature A ligature is a special character that is used to
     represent a sequence of characters. This is best explained by
     example -- when the letter fi are rendered, the dot on the ``i''
     collides with the ``f'', and the serif on the top left of the i can
     also collide with the horizontal stroke of the f. The fi ligature
     is a single character that can be used in the place of a single f
     followed by a single i. There are also ligatures for fl, ffi, and
     ffl.  Most fonts only include the fi and fl ligatures. The other
     ligatures may be made available in an expert font.



  o  metafont A graphics language used for creating fonts. Metafont has
     a lot of nice features, the main one being that fonts created with
     metafont need not just scale linearly. That is, a 17 point computer
     modern font generated by metafont is not the same as a magnified 10
     point computer modern font. Prior to Adobe's multiple master
     technology, metafont was unique with respect to having this
     feature.  Metafonts main advantage is that it produces high quality
     fonts.  The disadvantage is that generating bitmaps from the
     outline fonts is slow, so they aren't feasible for WYSIWYG
     publishing.

  o  metric this stores information about how much space a font takes
     up. A font metric is like a box that one can embed the font in.
     Font metrics are essential for the purpose of laying out fonts on a
     page, while the font shape itself is not. So typically, variable
     width fonts have metric information as well as shape information.
     The metric also includes kerning information.

  o  modern fonts are fonts based on designs developed in the 19th
     century or later. The moderns have a solid appearance due to their
     vertical stress. They tend to have more ``character'' or
     ``attitude'' than the old styles and transitionals, but still carry
     a certain amount of dignity and formality.  They are not suited for
     writing long passages, but they are useful for adding character to
     a piece of writing.  Bodoni is a notable modern typeface.

  o  old style fonts are a traditional class of typeface.  The old style
     fonts are based on designs from as far back as the late 15th
     century. Old style fonts are great for writing long documents (
     such as books ). While the old style fonts are designed in the
     tradition of the earlier designers, some of them were designed
     quite recently. Notably, the face Goudy Old Style was designed by
     Goudy in the early 20th century. Notable old style faces include
     Goudy Old Style, Garamond, and Caslon.

  o  pcf fonts are bit-mapped fonts used by X.

  o  postscript is a programming language designed for page description.
     Postscript was a trademark of it's inventor, adobe. However, it is
     also an ISO standard. Postscript needs an interpreter to render it.
     This can be done via a program on the computer, such as
     ghostscript, or it can be interpreted by some printers.

  o  serif fonts are fonts with little hooks ( called serifs ) on the
     ends of the font.  the serifs usually help make the font more
     readable.  However, serifs are quite difficult to render on low
     resolution devices, especially at small font sizes ( because they
     are a fine detail ), so it is often true that at small sizes on low
     resolution devices, sans serif fonts ( such as Microsoft's Verdana
     ) prove more readable. Another issue is that there are sans serif
     fonts ( like the moderns ) that are not designed for writing long
     documents.

  o  sans serif fonts are fonts without serifs ( sans is French for
     ``without'' ). These fonts have a stark appearance, and are well
     suited for writing headlines. While textbook typography mandates
     that serif fonts be used just for headlines, they can have other
     uses.  There are sans serif fonts designed for readability as
     opposed to impact.  Short punchy documents that are skimmed ( such
     as catalogues and marketting brochures ) may use them, and
     recently, Microsoft have made available the Verdana font which is
     designed for readability at small sizes on low resolution devices.
     Well known sans serif fonts include Lucida Sans, MS Comic Sans,
     Avant Garde, Arial, Verdana, Century Gothic.


  o  slab serif fonts are a certain class of font whose serifs look like
     slabs ( eg flat lines or blocks ) and not hooks.  Slab serif fonts
     are often, but not always very readable.  Because the serifs are
     simple and strong, they give one the feeling that they have been
     punched into the page.  Well known examples of slab serifs are
     Clarendon, New Century Schoolbook, and Memphis.

  o  transitional fonts are fonts that are based on more recent designs
     than the old style fonts. many of the transitional fonts have good
     readability. Notable transitionals include Baskerville, and Times
     Roman.

  o  Type1 is a type of font designed by Adobe. These fonts are well
     supported by almost all linux applications, because they have been
     supported by the X server architecture and the postscript standard
     for a long time. Postscript fonts are distributed in many different
     formats. Typically, a UNIX postscript font is distributed as an afm
     ( adobe font metric ) file, and an outline file, which is usually a
     .pfb ( printer font binary ) or .pfa ( printer font ascii ) file.
     The outline file contains all the glyphs, while the metric file
     contains the metrics.

  o  type3 fonts are similar to Type1. The file extensions are similar
     to Type1 fonts ( they are distributed as pfa and afm files ), but
     they are not supported by X, and because of this, there are not
     very many linux applications which support them.



  Framebuffer HOWTO
  Alex Buell, alex.buell@tahallah.demon.co.uk
  v1.1, 22 July 1999

  This document describes how to use the framebuffer devices in Linux
  with a variety of platforms. This also includes how to set up multi-
  headed displays.
  ______________________________________________________________________

  Table of Contents



  1. Contributors

  2. What is a framebuffer device?

  3. What advantages does framebuffer devices have?

  4. Using framebuffer devices on Intel platforms

     4.1 What is vesafb?
     4.2 How do I activate the vesafb drivers?
     4.3 What VESA modes are available to me?
     4.4 Got a Matrox card?
     4.5 Got a Permedia card?
     4.6 Got a ATI card?
     4.7 Which graphic cards are VESA 2.0 compliant?
     4.8 Can I make vesafb as a module?
     4.9 How do I modify the cursor?

  5. Using framebuffer devices on Atari m68k platforms

     5.1 What modes are available on Atari m68k platforms?
     5.2 Additional suboptions on Atari m68k platforms
     5.3 Using the internal suboption on Atari m68k platforms
     5.4 Using the external suboption on Atari m68k platforms

  6. Using framebuffer devices on Amiga m68k platforms

     6.1 What modes are available for Amiga m68k platforms?
     6.2 Additional suboptions on Amiga m68k platforms
     6.3 Supported Amiga graphic expansion boards

  7. Using framebuffer devices on Macintosh m68k platforms

  8. Using framebuffer devices on PowerPC platforms

  9. Using framebuffer devices on Alpha platforms

     9.1 What modes are available to me?
     9.2 Which graphic cards can work with the frambuffer device?

  10. Using framebuffer devices on SPARC platforms

     10.1 Which graphic cards can work with the framebuffer device?
     10.2 Configuring the framebuffer devices

  11. Using framebuffer devices on MIPS platforms

  12. Using framebuffer devices on ARM platforms

     12.1 Netwinders
     12.2 Acorn Archimedes
     12.3 Other ARM ports (SA 7110s et. al)

  13. Using multi-headed framebuffers

     13.1 Introduction
     13.2 Feedback
     13.3 Contributors
     13.4 Standard Disclaimer
     13.5 Copyright Information
     13.6 What hardware is supported?
     13.7 Commercial support
     13.8 Getting all the stuff.
     13.9 Getting Started
        13.9.1 Move a console over...
        13.9.2 Use "fbset" to adjust the setting on this second monitor
        13.9.3 Set up X for Frame Buffer support.
        13.9.4 Try starting the X server on the second monitor.
     13.10 Summary
     13.11 Other Notes and Problems
        13.11.1 Getting "init level five" (i.e. xdm/gdm) to work
        13.11.2 Using the x2x program.
        13.11.3 Other useful commands
        13.11.4 Appendix A.  Octave cvtmode.m script
        13.11.5 Appendix B.  Borne Shell script "cvtfile"

  14. Using/Changing fonts

  15. Changing console modes

  16. Setting up the X11 FBdev driver

  17. How do I convert XFree86 mode-lines into framebuffer device timings?

  18. Looking for further information?



  ______________________________________________________________________

  1.  Contributors

  Thanks go to these people listed below who helped improve the
  Framebuffer HOWTO.


  o  Jeff Noxon jeff@planetfall.com

  o  Francis Devereux f.devereux@cs.ucl.ac.uk

  o  Andreas Ehliar ehliar@futurniture.se

  o  Martin McCarthy marty@ehabitat.demon.co.uk

  o  Simon Kenyon simon@koala.ie

  o  David Ford david@kalifornia.com

  o  Chris Black cblack@cmpteam4.unil.ch

  o  N Becker nbecker@fred.net

  o  Bob Tracy rct@gherkin.sa.wlk.com

  o  Marius Hjelle marius.hjelle@roman.uib.no

  o  James Cassidy jcassidy@misc.dyn.ml.org

  o  Andreas U. Trottmann andreas.trottmann@werft22.com

  o  Lech Szychowski lech7@lech.pse.pl

  o  Aaron Tiensivu tiensivu@pilot.msu.edu

  o  Jan-Frode Myklebust for his info on permedia cards
     janfrode@ii.uib.no

  o  Many others too numerous to add, but thanks!

  Thanks go to Rick Niles frederick.a.niles@gsfc.nasa.gov who has very
  kindly handed over his Multi-Head Mini-HOWTO for inclusion in this
  HOWTO.
  Thanks to these people listed below who built libc5/glibc2 versions of
  the XF86_FBdev X11 framebuffer driver for X11 on Intel platforms:


  o  Brion Vibber brion@pobox.com

  o  Gerd Knorr kraxel@cs.tu-berlin.de

  and of course the authors of the framebuffer devices:


  o  Martin Schaller - original author of the framebuffer concept

  o  Roman Hodek Roman.Hodek@informatik.uni-erlangen.de

  o  Andreas Schwab schwab@issan.informatik.uni-dortmund.de

  o  Guenther Kelleter

  o  Geert Uytterhoeven Geert.Uytterhoeven@cs.kuleuven.ac.be

  o  Roman Zippel roman@sodom.obdg.de

  o  Pavel Machek pavel@atrey.karlin.mff.cuni.cz

  o  Gerd Knorr kraxel@cs.tu-berlin.de

  o  Miguel de Icaza miguel@nuclecu.unam.mx

  o  David Carter carter@compsci.bristol.ac.uk

  o  William Rucklidge wjr@cs.cornell.edu

  o  Jes Sorensen jds@kom.auc.dk

  o  Sigurdur Asgeirsson

  o  Jeffrey Kuskin jsk@mojave.stanford.edu

  o  Michal Rehacek michal.rehacek@st.mff.cuni.edu

  o  Peter Zaitcev zaitcev@lab.ipmce.su

  o  David S. Miller davem@dm.cobaltmicro.com

  o  Dave Redman djhr@tadpole.co.uk

  o  Jay Estabrook

  o  Martin Mares mj@ucw.cz

  o  Dan Jacobowitz dan@debian.org

  o  Emmanuel Marty core@ggi-project.org

  o  Eddie C. Dost ecd@skynet.be

  o  Jakub Jelinek jj@ultra.linux.cz

  o  Phil Blundell philb@gnu.org

  o  Anyone else, stand up and be counted. :o)



  2.  What is a framebuffer device?


  A framebuffer device is an abstraction for the graphic hardware. It
  represents the frame buffer of some video hardware, and allows
  application software to access the graphic hardware through a well-
  defined interface, so that the software doesn't need to know anything
  about the low-level interface stuff [Taken from Geert Uytterhoeven's
  framebuffer.txt in the linux kernel sources]


  3.  What advantages does framebuffer devices have?



  Penguin logo. :o) Seriously, the major advantage of the framebuffer
  drives is that it presents a generic interface across all platforms.
  It was the case until late in the 2.1.x kernel development process
  that the Intel platform had console drivers completely different from
  the other console drivers for other platforms. With the introduction
  of 2.1.109 all this has changed for the better, and introduced more
  uniform handling of the console under the Intel platforms and also
  introduced true bitmapped graphical consoles bearing the Penguin logo
  on Intel for the first time, and allowed code to be shared across
  different platforms. Note that 2.0.x kernels do not support
  framebuffer devices, but it is possible someday someone will backport
  the code from the 2.1.x kernels to 2.0.x kernels.  There is an
  exception to that rule in that the v0.9.x kernel port for m68k
  platforms does have the framebuffer device support included.

  With the release of the 2.2.x kernel, framebuffer device support is
  very solid and stable. You should use the framebuffer device if your
  graphic card supports it, if you are using 2.2.x kernels. Older 2.0.x
  kernels does not support framebuffer devices, at least on the Intel
  platform.


  o  0.9.x (m68k) - introduced m68k framebuffer devices. Note that m68k
     0.9.x is functionally equivalent to Intel 1.0.9 (plus 1.2.x
     enhancements)

  o  2.1.107 - introduced Intel framebuffer/new console devices and
     added generic support, without scrollback buffer support.

  o  2.1.113 - scrollback buffer support added to vgacon.

  o  2.1.116 - scrollback buffer support added to vesafb.

  o  2.2.x - includes matroxfb(Matrox) and atyfb(ATI).

  There are some cool features of the framebuffer devices, in that you
  can give generic options to the kernel at bootup-time, including
  options specific to a particular framebuffer device. These are:


  o  video=xxx:off - disable probing for a particular framebuffer device

  o  video=map:octal-number - maps the virtual consoles (VCs) to
     framebuffer (FB) devices

  o  video=map:01 will map VC0 to FB0, VC1 to FB1, VC2 to FB0, VC3 to
     FB1..

  o  video=map:0132 will map VC0 to FB0, VC1 to FB1, VC2 to FB3, VC4 to
     FB2, VC5 to FB0..

  Normally framebuffer devices are probed for in the order specified in
  the kernel, but by specifying the video=xxx option, you can add the
  specific framebuffer device you want probed before the others
  specified in the kernel.


  4.  Using framebuffer devices on Intel platforms

  4.1.  What is vesafb?


  Vesafb is a framebuffer driver for Intel architecture that works with
  VESA 2.0 compliant graphic cards. It is closely related to the
  framebuffer device drivers in the kernel.

  vesafb is a display driver that enables the use of graphical modes on
  your Intel platform for bitmapped text consoles. It can also display a
  logo, which is probably the main reason why you'd want to use vesafb
  :o)

  Unfortunately, you can not use vesafb successfully with VESA 1.2
  cards.  This is because these 1.2 cards do not use linear frame
  buffering.  Linear frame buffering simply means that the system's CPU
  is able to access every bit of the display. Historically, older
  graphic adapters could allow the CPU to access only 64K at a time,
  hence the limitations of the dreadful CGA/EGA graphic modes! It may be
  that someone will write a vesafb12 device driver for these cards, but
  this will use up precious kernel memory and involve a nasty hack.

  There is however a potential workaround to add VESA 2.0 extensions for
  your legacy VESA 1.2 card. You may be able to download a TSR type
  program that will run from DOS, and used in cojunction with loadlin,
  can help configure the card for the appropriate graphic console modes.
  Note that this will not always work, as an example some Cirrus Logic
  cards such as the VLB 54xx series are mapped to a range of memory
  addresses (for example, within the 15MB-16MB range) for frame
  buffering which preludes these from being used successfully with
  systems that have more than 32MB of memory. There is a way to make
  this work, i.e. if you have a BIOS option to leave a memory hole at
  15MB-16MB range, it might work, Linux doesn't support the use of
  memory holes. However there are patches for this option though [Who
  has these and where do one gets them from?]. If you wish to experiment
  with this option, there are plenty of TSR style programs available, a
  prime example is UNIVBE, which can be found on the Internet.

  Alternatively, you may be able to download kernel patches to allow
  your VESA 1.2 card to work with the VESA framebuffer driver. For
  example, there are patches for use with older S3 boards (such as S3
  Trio, S3 Virge) that supports VESA 1.2. For these cards, you can pick
  up patches from
  ftp://ccssu.crimea.ua/pub/linux/kernel/v2.2/unofficial/s3new.diff.gz)


  4.2.  How do I activate the vesafb drivers?

  Assuming you are using menuconfig, you will need to do the following
  steps:

  If your processor (on Intel platforms) supports MTRRs, enable this. It
  speeds up memory copies between the processor and the graphic card,
  but not strictly necessary. You can of course, do this after you have
  the console device working.

  IMPORTANT: For 2.1.x kernels, go into the Code Maturity Level menu,
  and enable the prompt for development andor incomplete drivers.  This
  is no longer necessary for the 2.2.x kernels.
  Go into the Console Drivers menu, and enable the following:


  o  VGA Text Console

  o  Video Selection Support

  o  Support for frame buffer devices (experimental)

  o  VESA VGA Graphic console

  o  Advanced Low Level Drivers

  o  Select Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp and 32bpp packed pixel
     drivers

  VGA Chipset Support (text only) - vgafb - used to be part of the list
  above, but it has been removed as it is now deprecated and no longer
  supported. It will be removed shortly. Use VGA Text Console (fbcon)
  instead. VGA Character/Attributes is only used with VGA Chipset
  Support, and doesn't need to be selected.

  Ensure that the Mac variable bpp packed pixel support is not enabled.
  Linux kernel release 2.1.111 (and 112) seemed to enable this
  automatically if Advanced Low Level Drivers was selected for the first
  time. This no longer happens with 2.1.113.

  There is also the option to compile in fonts into memory, but this
  isn't really necessary, and you can always use kbd-0.99's (see section
  on fonts) setfont utility to change fonts by loading fonts into the
  console device.

  Make sure these aren't going to be modules. [Not sure if it's possible
  to build them as modules yet - please correct me on this]

  You'll need to create the framebuffer device in /dev. You need one per
  framebuffer device, so all you need to do is to type in mknod /dev/fb0
  c 29 0 for the first one. Subsequent ones would be in multiples of 32,
  so for example to create /dev/fb1, you would need to type in mknod
  /dev/fb1 c 29 32, and so on up to the eighth framebuffer device (mknod
  /dev/fb7 c 29 224)

  Then rebuild the kernel, modify /etc/lilo.conf to include the VGA=ASK
  parameter, and run lilo, this is required in order for you to be able
  to select the modes you wish to use.

  Here's a sample LILO configuration (taken from my machine)


  # LILO configuration file
  boot = /dev/hda3
  delay = 30
  prompt
  vga = ASK # Let user enter the desired modes
  image = /vmlinuz
    root = /dev/hda3
    label = Linux
    read-only # Non-UMSDOS filesystems should be mounted read-only for checking



  Reboot the kernel, and as a simple test, try entering 0301 at the VGA
  prompt (this will give you 640x480 @ 256), and you should be able to
  see a cute little Penguin logo.


  Note, that at the VGA prompt, you're required to type in the number in
  the format of "0" plus the 3 digit figure, and miss out the 'x'. This
  isn't necessary if you're using LILO.

  Once you can see that's working well, you can explore the various VESA
  modes (see below) and decide on the one that you like the best, and
  hardwire that into the "VGA=x" parameter in lilo.conf. When you have
  chosen the one you like the best, look up the equivalent hexadecimal
  number from the table below and use that (i.e. for 1280x1024 @ 256,
  you just use "VGA=0x307"), and re-run lilo. That's all there it is to
  it.  For further references, read the LoadLin/LILO HOWTOs.

  NOTE! vesafb does not enable scrollback buffering as a default. You
  will need to pass to the kernel the option to enable it. Use
  video=vesa:ypan or video=vesa:ywrap to activate it. Both does the same
  thing, but in different ways. ywrap is a lot faster than ypan but may
  not work on slightly broken VESA 2.0 graphic cards. ypan is slower
  than ywrap but a lot more compatible. This option is only present in
  kernel 2.1.116 and above. Earlier kernels did not have the ability to
  allow scrollback buffering in vesafb.


  4.3.  What VESA modes are available to me?

  This really depends on the type of VESA 2.0 compliant graphic card
  that you have in your system, and the amount of video memory
  available. This is just a matter of testing which modes work best for
  your graphic card.

  The following table shows the mode numbers you can input at the VGA
  prompt or for use with the LILO program. (actually these numbers are
  plus 0x200 to make it easier to refer to the table)


  Colours   640x400 640x480 800x600 1024x768 1280x1024 1600x1200
  --------+-----------------------------------------------------
   4 bits |    ?       ?     0x302      ?        ?         ?
   8 bits |  0x300   0x301   0x303    0x305    0x307     0x31C
  15 bits |    ?     0x310   0x313    0x316    0x319     0x31D
  16 bits |    ?     0x311   0x314    0x317    0x31A     0x31E
  24 bits |    ?     0x312   0x315    0x318    0x31B     0x31F
  32 bits |    ?       ?       ?        ?        ?         ?



  Key: 8 bits = 256 colours, 15 bits = 32,768 colours, 16 bits = 65,536
  colours, 24 bits = 16.8 million colours, 32 bits - same as 24 bits,
  but the extra 8 bits can be used for other things, and fits perfectly
  with a 32 bit PCI/VLB/EISA bus.

  Additional modes are at the discretion of the manufacturer, as the
  VESA 2.0 document only defines modes up to 0x31F. You may need to do
  some fiddling around to find these extra modes.


  4.4.  Got a Matrox card?


  If you've got a Matrox graphic card, you don't actually need vesafb,
  you need the matroxfb driver instead. This greatly enhances the
  capabilities of your card. Matroxfb will work with Matrox Mystique
  Millennium I & II, G100 and G200. It also supports multiheaded systems
  (that is, if you have two Matrox cards in your machine, you can use
  two displays on the same machine!). To configure for Matrox, you will
  need to do the following:

  You might want to upgrade the Matrox BIOS though, you can download the
  BIOS upgrade from http://www.matrox.com/mgaweb/drivers/ftp_bios.htm.
  Beware that you will need DOS to do this.

  Go into the Code Maturity Level menu, and enable the prompt for
  development and/or incomplete drivers [note this may change for future
  kernels - when this happens, this HOWTO will be revised]

  Go into the Console Drivers menu, and enable the following:


  o  VGA Text Console

  o  Video Selection Support

  o  Support for frame buffer devices (experimental)

  o  Matrox Acceleration

  o  Select the following depending on the card that you have

  o  Millennium I/II support

  o  Mystique support

  o  G100/G200 support

  o  Enable Multihead Support if you want to use more than one Matrox
     card

  o  Advanced Low Level Drivers

  o  Select Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp and 32bpp packed pixel
     drivers

  Rebuild your kernel. Then you will need to modify your lilo.conf file
  to enable the Matroxfb device. The quickest and simplest way is re-use
  mine.


  # LILO configuration file
  boot = /dev/hda3
  delay = 30
  prompt
  vga = 792    # You need to do this so it boots up in a sane state
  # Linux bootable partition config begins
  image = /vmlinuz
    append = "video=matrox:vesa:440" # then switch to Matroxfb
    root = /dev/hda3
    label = Linux
    read-only # Non-UMSDOS filesystems should be mounted read-only for checking



  Lastly, you'll need to create the framebuffer device in /dev. You need
  one per framebuffer device, so all you need to do is to type in mknod
  /dev/fb0 c 29 0 for the first one. Subsequent ones would be in
  multiples of 32, so for example to create /dev/fb1, you would need to
  type in mknod /dev/fb1 c 29 32, and so on up to the eight framebuffer
  device (mknod /dev/fb7 c 29 224)

  And that should be it! [NOTE: Is anyone using this multiheaded
  support, please get in touch with me ASAP - I need to talk to you
  about it so I can document it!


  4.5.  Got a Permedia card?


  Permedia cards cannot be used with the vesafb driver, but fortunately,
  there is the Permedia framebuffer driver available to use. Assuming
  you are using menuconfig, do the following:

  Go into the Code Maturity Level menu, and enable the prompt for
  development and/or incomplete drivers [note this may change for future
  kernels - when this happens, this HOWTO will be revised]

  Go into the Console Drivers menu and select the following:


  o  VGA Text Console

  o  Video Selection Support

  o  Support for frame buffer devices (experimental)

  o  Permedia2 support (experimental)

  o  Generic Permedia2 PCI board support

  o  Advanced Low Level Drivers

  o  Select Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp and 32bpp packed pixel
     drivers

  o  Optionally, select the following, if you wish to use the compiled
     in fonts

  o  Select compiled-in fonts

  o  Select Sparc console 12x22 font

  Rebuild your kernel. Then you will need to modify your lilo.conf file
  to enable the pm2fb device. The quickest and simplest way is re-use
  the following


  # LILO configuration file
  boot = /dev/hda3
  delay = 30
  prompt
  vga = 792    # You need to do this so it boots up in a sane state
  # Linux bootable partition config begins
  image = /vmlinuz
    append = "video=pm2fb:mode:1024x768-75,font:SUN12x22,ypan" # then switch to pm2fb
    root = /dev/hda3
    label = Linux
    read-only # Non-UMSDOS filesystems should be mounted read-only for checking



  The line "pm2fb:mode:1024x768-75,font:SUN12x22,ypan" indicates you are
  selecting a 1024x768 mode at 75Hz, with the SUN12x22 font selected (if
  you did select it), including ypan for scrollback support. You may
  select other modes if you desire.

  Lastly, you'll need to create the framebuffer device in /dev. You need
  one per framebuffer device, so all you need to do is to type in mknod
  /dev/fb0 c 29 0 for the first one. Subsequent ones would be in
  multiples of 32, so for example to create /dev/fb1, you would need to
  type in mknod /dev/fb1 c 29 32, and so on up to the eight framebuffer
  device (mknod /dev/fb7 c 29 224)
  For more information on the other features of the Permedia framebuffer
  driver, point your browser at:
  http://www.cs.unibo.it/ nardinoc/pm2fb/index.html.

  video=pm2fb:[option[,option[,option...]]]

  where option is one of the following


  o  off to disable the driver.

  o  mode:resolution to set the console resolution. The modes have been
     taken from the fb.modes.ATI file in Geert's fbset package. The
     depth for all the modes is 8bpp. This is the list of the available
     modes:

  o  640x480-(60,72,75,90,100)

  o  800x600-(56,60,70,72,75,90,100)

  o  1024x768-(60,70,72,75,90,100,illo) illo=80KHz 100Hz

  o  1152x864-(60,70,75,80)

  o  1280x1024-(60,70,74,75)

  o  1600x1200-(60,66,76)

  o  The default resolution is 640x480-60.

  o  font:font name to set the console font. Example: font:SUN12x22

  o  ypan sets the current virtual height as big as video memory size
     permits.

  o  oldmem this option is for CybervisionPPC users only. Specify this
     if your board has Fujitsu SGRAMs mounted on (all CVisionPPCs before
     30-Dec-1998).

  o  virtual (temporary) specify this if the kernel remaps the PCI
     regions on your platform.


  4.6.  Got a ATI card?


  [Note: This information is at best, only second-hand or third-hand,
  since I don't have an ATI card to test it with. Feel free to correct
  me if I am wrong or flame me!] 8)

  ATI cards can be used with the vesafb driver, but you may or may not
  have problems, depending on how horribly broken the card is.
  Fortunately, there is the atyfb framebuffer driver available to use.
  Assuming you are using menuconfig, do the following:

  Go into the Code Maturity Level menu, and enable the prompt for
  development and/or incomplete drivers [note this may change for future
  kernels - when this happens, this HOWTO will be revised]

  Go into the Console Drivers menu and select the following:


  o  VGA Text Console

  o  Video Selection Support

  o  Support for frame buffer devices (experimental)

  o  ATI Mach64 display support

  o  Advanced Low Level Drivers

  o  Select Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp and 32bpp packed pixel
     drivers

  o  Optionally, select the following, if you wish to use the compiled
     in fonts

  o  Select compiled-in fonts

  o  Select Sparc console 12x22 font

  Rebuild your kernel. Then you will need to modify your lilo.conf file
  to enable the atyfb device. The quickest and simplest way is re-use
  the following


  # LILO configuration file
  boot = /dev/hda3
  delay = 30
  prompt
  vga = 792    # You need to do this so it boots up in a sane state
  # Linux bootable partition config begins
  image = /vmlinuz
    append = "video=atyfb:1024x768,font:SUN12x22"
    root = /dev/hda3
    label = Linux
    read-only # Non-UMSDOS filesystems should be mounted read-only for checking



  The line "atyfb:mode:1024x768,font:SUN12x22" indicates you are
  selecting a 1024x768 mode.

  Lastly, you'll need to create the framebuffer device in /dev. You need
  one per framebuffer device, so all you need to do is to type in mknod
  /dev/fb0 c 29 0 for the first one. Subsequent ones would be in
  multiples of 32, so for example to create /dev/fb1, you would need to
  type in mknod /dev/fb1 c 29 32, and so on up to the eight framebuffer
  device (mknod /dev/fb7 c 29 224)

  video=atyfb:[option[,option[,option...]]]

  where option is one of the following


  o  font:STRING selects the built-in font (compiled into the kernel)

  o  noblink Turns off blinking

  o  noaccel Disables acceleration

  o  vram:ULONG Tells the atyfb driver how much memory you have

  o  pll:ULONG Unknown

  o  mclk:ULONG Unknown

  o  vmode:ULONG Unknown

  o  cmode:ULONG - sets depth - 0, 8, 15, 16, 24 and 32

  4.7.  Which graphic cards are VESA 2.0 compliant?

  This lists all the graphic cards that are known to work with the
  vesafb device:


  o  ATI PCI VideoExpression 2MB (max. 1280x1024 @ 8bit)

  o  ATI PCI All-in-Wonder

  o  Matrox Millennium PCI - BIOS v3.0

  o  Matrox Millennium II PCI - BIOS v1.5

  o  Matrox Millennium II AGP - BIOS v1.4

  o  Matrox Millennium G200 AGP - BIOS v1.3

  o  Matrox Mystique & Mystique 220 PCI - BIOS v1.8

  o  Matrox Mystique G200 AGP - BIOS v1.3

  o  Matrox Productiva G100 AGP - BIOS v1.4

  o  All Riva 128 based cards

  o  Diamond Viper V330 PCI 4MB

  o  Genoa Phantom 3D/S3 ViRGE/DX

  o  Hercules Stingray 128/3D with TV output

  o  Hercules Stingray 128/3D without TV output - needs BIOS upgrade
     (free from support@hercules.com)

  o  SiS 6326 PCI/AGP 4MB

  o  STB Lightspeed 128 (Nvida Riva 128 based) PCI

  o  STB Velocity 128 (Nvida Riva 128 based) PCI

  o  Jaton Video-58P ET6000 PCI 2MB-4MB (max. 1600x1200 @ 8bit)

  This list is composed of on-board chipsets on systems' motherboards:


  o  Trident Cyber9397

  o  SiS 5598

  This list below blacklists graphic cards that doesn't work with the
  vesafb device:


  o  TBA


  4.8.  Can I make vesafb as a module?



  As far as is known, vesafb can't be modularised, although at some
  point in time, the developer of vesafb may decide to modify the
  sources for modularising. Note that even if modularising is possible,
  at boot time you will not be able to see any output on the display
  until vesafb is modprobed. It's probably a lot wiser to leave it in
  the kernel, for these cases when there are booting problems.


  4.9.  How do I modify the cursor?


  [Taken from VGA-softcursor.txt - thanks Martin Mares!]

  Linux now has some ability to manipulate cursor appearance. Normally,
  you can set the size of hardware cursor (and also work around some
  ugly bugs in those miserable Trident cards--see #define TRIDENT_GLITCH
  in drivers/char/ vga.c). In case you enable "Software generated
  cursor" in the system configuration, you can play a few new tricks:
  you can make your cursor look like a non-blinking red block, make it
  inverse background of the character it's over or to highlight that
  character and still choose whether the original hardware cursor should
  remain visible or not.  There may be other things I have never thought
  of.

  The cursor appearance is controlled by a

  <ESC>[?1;2;3c


  sequence where 1, 2 and 3 are parameters described below. If you omit
  any of them, they will default to zeroes.

  Parameter 1 specifies cursor size (0=default, 1=invisible,
  2=underline, ..., 8=full block) + 16 if you want the software cursor
  to be applied + 32 if you want to always change the background colour
  + 64 if you dislike having the background the same as the foreground.
  Highlights are ignored for the last two flags.

  The second parameter selects character attribute bits you want to
  change (by simply XORing them with the value of this parameter). On
  standard VGA, the high four bits specify background and the low four
  the foreground. In both groups, low three bits set colour (as in
  normal colour codes used by the console) and the most significant one
  turns on highlight (or sometimes blinking--it depends on the
  configuration of your VGA).

  The third parameter consists of character attribute bits you want to
  set.  Bit setting takes place before bit toggling, so you can simply
  clear a bit by including it in both the set mask and the toggle mask.

  To get normal blinking underline, use: echo -e '\033[?2c' To get
  blinking block, use:            echo -e '\033[?6c' To get red non-
  blinking block, use:    echo -e '\033[?17;0;64c'



  5.  Using framebuffer devices on Atari m68k platforms


  This section describes framebuffer options on Atari m68k platforms.


  5.1.  What modes are available on Atari m68k platforms?



  Colours   320x200 320x480 640x200 640x400 640x480 896x608 1280x960
  --------+---------------------------------------------------------
   1 bit  |                         sthigh   vga2    falh2   tthigh
   2 bits |                 stmid            vga4
   4 bits | stlow                         ttmid/vga16 falh16
   8 bits |         ttlow                   vga256



  ttlow, ttmid and tthigh are only used by the TT, whilst vga2, vga4,
  vga15, vga256, falh3 and falh16 are only used by the Falcon.

  When used with the kernel option video=xxx, and no suboption is given,
  the kernel will probe for the modes in the following order until it
  finds a mode that is possible with the given hardware:


  o  ttmid

  o  tthigh

  o  vga16

  o  sthigh

  o  stmid

  You may specify the particular mode you wish to use, if you don't wish
  to auto-probe for the modes you desire. For example, video=vga16 gives
  you a 4 bit 640x480 display.


  5.2.  Additional suboptions on Atari m68k platforms


  There are a number of suboptions available with the video=xxx
  parameter:


  o  inverse - inverts the display so that the background/foreground
     colours are reversed. Normally the background is black, but with
     this suboption, it gets sets to white.

  o  font - sets the font to use in text modes. Currently you can only
     select VGA8x8, VGA8x16, PEARL8x8. The default is to use the VGA8x8
     only if the vertical size of the display is less than 400 pixels,
     otherwise it defaults to VGA8x16.

  o  internal - a very interesting option. See the next section for
     information.

  o  external - as above.

  o  monitorcap - describes the capabilities for multisyncs. DON'T use
     with a fixed sync monitor!


  5.3.  Using the internal suboption on Atari m68k platforms


  Syntax: internal:(xres);(yres)[;(xres_max);(yres_max);(offset)]

  This option specifies the capabilities of some extended internal video
  hardware, i.e OverScan modes. (xres) and (yres) gives the extended
  dimensions of the screen.

  If your OverScan mode needs a black border, you'll need to write the
  last three arguments of the internal: suboption. (xres_max) is the
  maximum line length that the hardware allows, (yres_max) is the
  maximum number of lines, and (offset) is the offset of the visible
  part of the screen memory to its physical start, in bytes.

  Often extended internal video hardware has to be activated, for this
  you will need the "switches=*" options. [Note: Author would like extra
  information on this, please. The m68k documentation in the kernel
  isn't clear enough on this point, and he doesn't have an Atari!
  Examples would be helpful too]


  5.4.  Using the external suboption on Atari m68k platforms


  Syntax:
  external:(xres);(yres);(depth);(org);(scrmem)[;(scrlen)[;(vgabase)[;(colw)[;(coltype)[;(xres_virtual)]]]]]

  This is quite complicated, so this document will attempt to explain as
  clearly as possible, but the Author would appreciate if someone would
  give this a look over and see that he hasn't fscked something up! :o)

  This suboption specifies that you have an external video hardware
  (most likely a graphic board), and how to use it with Linux. The
  kernel is basically limited to what it knows of the internal video
  hardware, so you have to supply the parameters it needs in order to be
  able to use external video hardware. There are two limitations; you
  must switch to that mode before booting, and once booted, you can't
  change modes.

  The first three parameters are obvious; gives the dimensions of the
  screen as pixel height, width and depth. The depth supplied should be
  the number of colours is 2^n that of the number of planes required.
  For example, if you desire to use a 256 colour display, then you need
  to give 8 as the depth. This depends on the external graphic hardware,
  though so you will be limited by what the hardware can do.

  Following from this, you also need to tell the kernel how the video
  memory is organised - supply a letter as the (org) parameter


  o  n - use normal planes, i.e one whole plane after another

  o  i - use interleaved planes, i.e. 16 bits of the first plane, then
     the 16 bits of the next plane and so on. Only built-in Atari video
     modes uses this - and there are no graphic card that supports this
     mode.

  o  p - use packed pixels, i.e consecutive bits stands for all planes
     for a pixel. This is the most common mode for 256 colour displays
     on graphic cards.

  o  t - use true colour, i.e this is actually packed pixels, but does
     not require a colour lookup table like what other packed pixel
     modes uses. These modes are normally 24 bit displays - gives you
     16.8 million colours.

  However, for monochrome modes, the (org) parameter has a different
  meaning


  o  n - use normal colours, i.e 0=white, 1=black

  o  i - use inverted colours, i.e. 0=black, 1=white

  The next important item about the video hardware is the base address
  of the video memory. That is given by the (scrmem) parameter as a
  hexadecimal number with an 0x prefix. You will need to find this out
  from the documentation that comes with your external video hardware.

  The next paramter (scrlen) tells the kernel about the size of the
  video memory. If it's missing, this is calculated from the (xres),
  (yres) and (depth) parameters. It's not useful to write a value here
  these days anyway. To leave this empty, give two consecutive
  semicolons if you need to give the (vgabase) parameter, otherwise,
  just leave it.

  The (vgabase) parameter is optional. If it isn't given, the kernel
  can't read/write any colour registers of the video hardware, and thus
  you have to set up the appropriate colours before you boot Linux. But
  if your card is VGA compatible, you can give it the address where it
  can locate the VGA register set so it can change the colour lookup
  tables. This information can be found in your external video hardware
  documentation. To make this clear, (vgabase) is the base address, i.e
  a 4k aligned address. For reading/writing the colour registers, the
  kernel uses the address range between (vgabase) + 0x3c7 and (vgabase)
  + 0x3c9. This parameter is given in hexadecimal and must have a 0x
  prefix, just like (scrmem).

  (colw) is only meaningful, if the (vgabase) parameter is specified. It
  tells the kernel how wide each of the colour register is, i.e the
  number of bits per single colour (red/green/blue). Default is usually
  6 bits, but it is also common to specify 8 bits.

  (coltype) is used with the (vgabase) parameter, it tells the kernel
  about the colour register model of your graphic board. Currently the
  types supported are vga and mv300. vga is the default.

  (xres_virtual) is only required for the ProMST/ET4000 cards where the
  physical linelength differs from the visible length. With ProMST, you
  need to supply 2048, whilst for ET4000, it depends on the
  initialisation of the video board.


  6.  Using framebuffer devices on Amiga m68k platforms



  This section describes the options for Amigas, which are quite
  similiar to that for the Atari m68k platforms.


  6.1.  What modes are available for Amiga m68k platforms?


  This depends on the chipset used in the Amiga. There are three main
  ones; OCS, ECS and AGA which all uses the colour frame buffer device.


  o  NTSC modes

  o  ntsc - 640x200

  o  ntsc-lace - 640x400

  o  PAL modes

  o  pal - 640x256

  o  pal-lace - 640x512

  o  ECS modes - 2 bit colours on ECS, 8 bit colours on AGA chipsets
     only.

  o  multiscan - 640x480

  o  multiscan-lace - 640x960

  o  euro36 - 640x200

  o  euro36-lace - 640x400

  o  euro72 - 640x400

  o  euro72-lace - 640x800

  o  super72 - 800x300

  o  super72-lace - 800x600

  o  dblntsc - 640x200

  o  dblpal - 640x256

  o  dblntsc-ff - 640x400

  o  dblntsc-lace - 640x800

  o  dblpal-ff - 640x512

  o  dblpal-lace - 640x1024

  o  VGA modes - 2 bit colours on ECS, 8 bit colours on AGA chipsets
     only.

  o  vga - 640x480

  o  vga70 - 640x400


  6.2.  Additional suboptions on Amiga m68k platforms


  These are similar to the Atari m68k suboptions. They are:


  o  depth - specifies the pixel bit depth.

  o  inverse - does the same thing as the Atari suboption.

  o  font - does the same thing as the Atari suboption, although the
     PEARL8x8 font is used instead of VGA8x8 font, if the display size
     is less than 400 pixel wide.

  o  monitorcap - specifies the capabilities of the multisync monitor.
     Do not use with fixed sync monitors.


  6.3.  Supported Amiga graphic expansion boards



  o  Phase5 CyberVision 64 (S3 Trio64 chipset)

  o  Phase5 CyverVision 64-3D (S3 ViRGE chipset)


  o  MacroSystems RetinaZ3 (NCR 77C32BLT chipset)

  o  Helfrich Piccolo, SD64, GVP ECS Spectrum, Village Tronic Picasso
     IIII+ and IV/ (Cirrus Logic GD542x/543x)


  7.  Using framebuffer devices on Macintosh m68k platforms


  Currently, the framebuffer device implemented only supports the mode
  selected in MacOS before booting into Linux, also supports 1, 2, 4 and
  8 bit colours modes.

  Framebuffer suboptions are selected using the following syntax


  video=macfb:<font>:<inverse>



  You can select fonts such as VGA8x8, VGA8x16 and 6x11 etc. The inverse
  option allows you to use reverse video.


  8.  Using framebuffer devices on PowerPC platforms


  The author would love to receive information on the use of
  framebuffers on this platform.


  9.  Using framebuffer devices on Alpha platforms

  9.1.  What modes are available to me?



  So far, there is only the TGA PCI card - which only does 80x30 with a
  resolution of 640x480 at either 8 bits or 24/32 bits.


  9.2.  Which graphic cards can work with the frambuffer device?


  This lists all the graphic cards that are known to work:


  o  DEC TGA PCI (DEC21030) - 640x480 @ 8 bit or 24/32 bit versions


  10.  Using framebuffer devices on SPARC platforms

  10.1.  Which graphic cards can work with the framebuffer device?

  This lists all the graphic cards available:


  o  MG1/MG2 - SBus or integrated on Sun3 - max. 1600x1280 @ mono
     (BWtwo)

  o  CGthree - Similar to MG1/MG2 but supports colour - max resolution ?

  o  GX - SBus - max. 1152x900 @ 8bit (CGsix)

  o  TurboGX - SBus - max. 1152x900 @ 8 bit (CGsix)

  o  SX - SS10/SS20 only - max. 1280x1024 @ 24 bit - (CGfourteen)

  o  ZX(TZX) - SBus - accelerated 24bit 3D card - max resolution ?
     (Leo)

  o  TCX - AFX - for Sparc 4 only - max. 1280x1024 @ 8bit

  o  TCX(S24) - AFX - for Sparc 5 only - max. 1152x900 @ 24bit

  o  Creator - SBus - max. 1280x1024 @ 24bit (FFB)

  o  Creator3D - SBus - max. 1920x1200 @ 24bit (FFB)

  o  ATI Mach64 - accelerated 8/24bit for Sparc64 PCI only

  There is the option to use the PROM to output characters to the
  display or to a serial console.

  Also, have a look at the Sparc Frame Buffer FAQ at

  http://c3-a.snvl1.sfba.home.com/Framebuffer.html



  10.2.  Configuring the framebuffer devices



  During make config, you need to choose whether to compile promcon
  and/or fbcon. You can select both, but if you do this, you will need
  to set the kernel flags to select the device. fbcon always takes
  precedence if not set. If promcon is not selected in, on boot up, it
  defaults to dummycon. If promcon is selected, it will use this device.
  Once the buses are booted, and fbcon is compiled in, the kernel probes
  for the above framebuffers and will use fbcon. If there is no
  framebuffer devices, it will default to promcon.

  Here are the kernel options

  video=sbus:options
          where options is a comma separated list:
                  nomargins       sets margins to 0,0
                  margins=12x24   sets margins to 12,24 (default is computed
  from resolution)
                  off             don't probe for any SBus/UPA framebuffers
                  font=SUN12x22   use a specific font



  So for example, booting with

   video=sbus:nomargins,font=SUN12x22


  96x40, looks similar to a Solaris console but with colours and virtual
  terminals just like on the Intel platform.

  If you want to use the SUN12x22 font, you need to enable it during
  make config (disable the fontwidth != 8 option). The accelerated
  framebuffers can support any font width between 1 to 16 pixels, whilst
  dumb frame buffers only supports 4, 8, 12 and 16 pixel font widths.

  It is recommended that you grab a recent consoletools packages.


  11.  Using framebuffer devices on MIPS platforms



  There is no need to change anything for this platform, this is all
  handled for you automatically. Indys in particular are hardwired to
  use a console size of 160x64. However, moves are afoot to rewrite the
  console code for these Indys, so keep an eye on this section.


  12.  Using framebuffer devices on ARM platforms



  12.1.  Netwinders

  For the Netwinders (which uses the ARM SA110 RISC chip - a lovely
  British processor), there are two versions of the Cyber2000
  framebuffer driver - one for 2.0.x kernels and one for 2.2.x kernels.
  It is quite straightforward to enable and use this driver on both
  kernels, however, the older version is hardcoded for depth and
  resolution (blech), but the good news is that the newer version in the
  2.2.x kernels is much more flexible, but currently in a state of flux
  as it is still in development. To get this up and running, your best
  bet is to read the documentation that comes with the ARM port of the
  kernel sources.

  The Netwinders uses a VGA compatible chipset, but unfortunately noone
  has ported vgafb to it yet. That might happen if someone has some time
  on their hands. [I would do it if someone would give me a NetWinder to
  play with]


  12.2.  Acorn Archimedes

  Acorns have always had framebuffer support since the Linux 1.9.x days.
  However the Acornfb driver in 2.2.x is totally new since the generic
  framebuffer interface changed during the development of 2.1.x kernels
  (which, of course, became 2.2.x). As previously, it is a simple matter
  to activate the driver and set depths and resolutions.


  12.3.  Other ARM ports (SA 7110s et. al)

  Surprisingly, there is even a framebuffer driver for the Psion 5 and
  the Geofox!  I have been told that it displays the Penguin quite well.
  [Someone please donate me a Psion 5!]


  13.  Using multi-headed framebuffers


  This part of the document was very kindly donated by Frederick A.
  Niles, who retains all rights to the information contained herewith
  this section of the HOWTO.


  13.1.  Introduction

  The main goal of this document is to get you started with running a
  dual head configuration of Linux.  While this process is pretty
  straight forward there are numerous things that one can do wrong along
  the way.

  The example I concentrate on is getting an X-server running on a
  second monitor.  I find this nice as you can usually find old large
  19" to 21" fixed frequency monitors around that people are giving away
  because they can't use them.  This way you can boot off a small
  multisync and then use X on a nice big monitor.

  Please understand dual head support is currently developing so this
  information changes rapidly.  Anything in this document could be out
  of date or just plain incorrect by the time you are reading this.

  ** WARNING ** This document was written before any XFree86 4.0
  release.  If you are reading this and XFree86 4.0 is already released
  many things may have changed.  Try getting a newer version of this
  document if it's available.


  13.2.  Feedback

  Feedback is most certainly welcome for this document. Without your
  submissions and input, this document wouldn't exist. So, please post
  your additions, comments and criticisms to:
  Frederick.A.Niles@gsfc.nasa.gov.


  13.3.  Contributors

  The following people have contributed to this mini-HOWTO.

  *  Petr Vandrovec vandrove@vc.cvut.cz

  *  Andreas Ehliar ehliar@lysator.liu.se (x2x)

  *  Marco Bizzarri m.bizzarri@icube.it (multiple X servers)


  13.4.  Standard Disclaimer

  No liability for the contents of this document can be accepted.  Use
  the concepts, examples and other content at your own risk.  As this is
  a new edition of this document, there may be errors and inaccuracies
  that could be damaging to your system.  Proceed with caution, and
  although this is highly unlikely, I don't take any responsibility for
  that.


  13.5.  Copyright Information

  This section of the document is copyrighted (c)1999 Frederick Niles
  and distributed under the following terms:

  *  Linux HOWTO documents may be reproduced and distributed in whole or
  in part, in any medium physical or electronic, as long as this
  copyright notice is retained on all copies. Commercial redistribution
  is allowed and encouraged; however, the author would like to be
  notified of any such distributions.

  *  All translations, derivative works, or aggregate works
  incorporating any Linux HOWTO documents must be covered under this
  copyright notice.  That is, you may not produce a derivative work from
  a HOWTO and impose additional restrictions on its distribution.
  Exceptions to these rules may be granted under certain conditions;
  please contact the Linux HOWTO coordinator at the address given below.

  *  If you have questions, please contact, the Linux HOWTO coordinator,
  at linux-howto@sunsite.unc.edu



  13.6.  What hardware is supported?

  Most video cards assume they will be the only one in the system and
  are permanently set with the addressing of the primary display
  adapter.  There are a few exceptions.

  *  Matrox cards: This includes Matrox Millennium, Matrox Millennium
  II, Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100,
  Matrox Mystique G200, Matrox Millennium G200 and Matrox Marvel G200
  video cards

  *  MDA: This includes monochrome Hercules graphics adapter among
  others.  This for text only second head support.

  Note: it's only the second adapter that has to be one of the above.


  13.7.  Commercial support

  This mini-HOWTO in primarily concerned with free software.  However,
  there are commercial X servers with multi-head support.  These include
  Metro Link's (www.metrolink.com) Metro-X and Xi Graphics'
  (www.xig.com) Accelerated-X.


  13.8.  Getting all the stuff.

  You'll need the following patches and programs:

  * "fbset" program try: http://www.cs.kuleuven.ac.be/ geert/bin/ (note:
  this program comes with RedHat 6.0)

  * "fbaddon" Matrox dual head patches for Linux kernel try:
  ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/

  * "con2fb" program try: ftp://platan.vc.cvut.cz/pub/linux/matrox-
  latest/

  * The X11 frame buffer server XF86_FBDev.  This is a standard part of
  XFree86 3.3.1.


  13.9.  Getting Started

  The first thing you'll need to do is to patch a copy of the Linux
  source with the "fbaddon" patch.  Then you need to configure the
  kernel and turn on frame buffer support.  If you have Matrox cards
  turn on Matrox unified accelerated driver support as well as the
  particular type of card you have.  Don't turn on VESA frame buffer
  support. It can cause a conflict.  Do turn on multi-head support
  (obviously).  Build the kernel and reboot.

  Now you need to install the "fbset" program and carefully read all the
  documentation on how to adjust the settings.  Using a "/etc/fb.modes"
  file is highly recommended once you've decided on your settings.  The
  fbset program includes a Perl script to convert your XF86Config file
  to fb.modes settings.  I've included my octave/Borne shell script to
  convert your XF86Config file in Appendix A & B.

  You need to get comfortable with using the frame buffer device on one
  monitor, understanding any issues that can arise from your set up that
  have nothing to do with multi-head support.  This can save a lot of
  head scratching later.

  I'm going to concentrate my explanation on getting X running on the
  second monitor as doing most other configurations will just be a
  obvious subset of the procedure.


  13.9.1.  Move a console over...

  Compile the "con2fb" program.  If you run it without any arguments
  you'll get the following usage message:

  "usage: con2fb fbdev console".

  Thus, an example command would be "con2fb /dev/fb1 /dev/tty6" to move
  virtual console number six over to the second monitor.  Use Ctrl-Alt-
  F6 to move over to that console and see that it does indeed show up on
  the second monitor.


  13.9.2.  Use "fbset" to adjust the setting on this second monitor

  Only set the "fbset" settings on the monitor you run the "fbset"
  command on.  Therefore, you must be careful to use the "-fb" flag on
  the second monitor.  In particular, if you do nothing else you'll
  probably want to at least set the virtual vertical resolution to your
  actually vertical resolution.

  e.g. "fbset -fb /dev/fb1 -vyres 600"

  This will seriously slow down text mode, but X will be obnoxious
  without it.


  13.9.3.  Set up X for Frame Buffer support.

  The framebuffer.txt file explains this better than I can, but here's
  the two important points.

  Make sure you set the link for "X" to point to "XF86_FBDev".

  Next you need to add a monitor section to your XF86Config file for the
  frame buffer device.  Here's an example:



  # The Frame Buffer server

  Section "Screen"
      Driver      "fbdev"
      Device      "Millennium"
      Monitor     "NEC MultiSync 5FGp"
      Subsection "Display"
          Depth       8
          Modes       "default"
          ViewPort    0 0
      EndSubsection
      Subsection "Display"
          Depth       16
          Modes       "default"
          ViewPort    0 0
      EndSubsection
      Subsection "Display"
          Depth       24
          Modes       "default"
          ViewPort    0 0
      EndSubsection
      Subsection "Display"
          Depth       32
          Modes       "default"
          ViewPort    0 0
      EndSubsection
  EndSection



  Use the "default" modes as I don't think any other one will work with
  the Matrox frame buffer.


  13.9.4.  Try starting the X server on the second monitor.

  Set the variable FRAMEBUFFER to the second frame buffer.

  "export FRAMEBUFFER=/dev/fb1"

  or

  "setenv FRAMEBUFFER /dev/fb1"

  You need to start the X server so that it both matches the selected
  color depth and it appears on the same monitor you start the X server
  from.

  e.g. "startx -- :0 -bpp 16 vt06"

  This example will start the "zeroth" X server on virtual console six
  with 16 bit color.  Using ":1" when launching another X server for the
  other frame buffer will allow you to have two X servers running.


  13.10.  Summary

  The steps involved in getting an X server running on a second monitor
  can be summarized as follows:

  * Get the kernel patch, fbset, and con2fb.

  * Patch the kernel, configure, rebuild, and reboot.

  * Add XF86_FBDev section to XF86Config file and set X link.

  Then each time you reboot:

  * Move a console over.  e.g. "con2fb /dev/fb1 /dev/tty6"

  * Adjust the settings   e.g. "fbset -fb /dev/fb1 1280x1024"

  * Set the FRAMEBUFFER.  e.g. "export FRAMEBUFFER=/dev/fb1"

  * Start the X server.   e.g. "startx -- -bpp 16 vt06"

  You can automate this each time you reboot via a shell alias.  It must
  be an alias and not a shell script since it needs to detect the
  current console number.  This is my C-shell alias to start up X on a
  second fixed frequency monitor:


  alias startxfb = "
  setenv FRAMEBUFFER /dev/fb\!*;    # Set the env var to the cmd arg.
  con2fb $FRAMEBUFFER /dev/$tty;    # Move the fb to the current tty.
  fbset -fb $FRAMEBUFFER 1280x1024@62;  # Favorite from /etc/fb.modes
  startx -- :\!* -bpp 16 vt0`echo $tty | cut -dy f 2`' # X on this tty.
  "



  In my .cshrc file these are all on the same line together without the
  comments, but it's easier to read here with line breaks and comments
  inserted.  I just give the number of the frame buffer as an argument
  and it starts right up.

  I'm not sure how to do this same alias in bash.  I don't know how to
  determine the current tty or get the arguments to an alias in bash.
  If someone lets me know I'll insert it here.  However, you can use the
  "tty" command to get the name of the current VT and just make two
  separate aliases for each X server.


  13.11.  Other Notes and Problems

  * Both "fbset" and "startx" MUST be run from the same frame buffer as
  the one being affected.  This places serious limits on how much of
  these commands can be automated via scripts.

  * XFree86 4.0 will have "proper" multi-head support, but 3.3.1 does
  not.  You can run two servers with 3.3.1 and use x2x to switch between
  them however...(see the next bullet)

  * The inactive frame buffer will just hold the last image of when it
  was active, no updates with occur.

  * The monitor that's not selected doesn't always preseve it's state
  when not active. (But it usually does.)

  * Geert Uytterhoeven (the frame buffer maintainer) and Linus Torvalds
  don't agree with the current "frame buffer per VT" multi-head console
  support changes (i.e. fbaddon) so it may never be in the mainstream
  kernel tree.  (This was heard third hand and may be wildly untrue.)

  * If you "break the rules" and start the X server (run "startx") from
  a different monitor, the machine can eventually crash badly with the
  keyboard and mouse input all mixed together.

  * The documentation framebuffer.txt in the kernel source explains that
  you can use the Modeline settings in your XF86Config file directly
  when running X.  Using the Matrox frame buffer seems to force the X
  server to drop all of those.  So you can only have the one ("default")
  setting at at time (the same one you had in text mode).

  * The XF86_FBDev is unaccelerated.  However, there are patches for
  accelerated Matrox support at http://www.in-
  berlin.de/User/kraxel/xfree86/


  13.11.1.  Getting "init level five" (i.e. xdm/gdm) to work

  I have not yet figured out a way to boot with init level 5 with a dual
  monitor configuration (and actually have the server on either the
  second montior or both).  While it seems easy enough to add a line to
  the gdm/xdm Xservers file, the constrain that you must start the X
  server from the same frame buffer prevents the obvious solution from
  working.  If anyone finds a way please e-mail me and I'll add it here.


  13.11.2.  Using the x2x program.

  There's a nice little program called x2x that will switch X servers
  for you when you get to the edge of the screen.  Last known home for
  this program was: http://ftp.digital.com/pub/DEC/SRC/x2x/.  It's also
  an optional Debian package.  I haven't tried it yet but some users
  have reported success.


  13.11.3.  Other useful commands

  These are existing linux commands that are worth remembering when
  dealing with a multi-head configuration (especially in writing
  scripts).

  * "chvt" will allow you to switch between virtual terminals.

  * "openvt" start a program on a new virtual terminal (VT).

  * "tty" will report the name of the current terminal.


  13.11.4.  Appendix A.  Octave cvtmode.m script

  (note the bpp setting)



  #!/usr/bin/octave -q
  bpp = 16;
  DCF = sscanf(argv(1,:), "%f");
  HR  = sscanf(argv(2,:), "%f");
  SH1 = sscanf(argv(3,:), "%f");
  SH2 = sscanf(argv(4,:), "%f");
  HFL = sscanf(argv(5,:), "%f");
  VR  = sscanf(argv(6,:), "%f");
  SV1 = sscanf(argv(7,:), "%f");
  SV2 = sscanf(argv(8,:), "%f");
  VFL = sscanf(argv(9,:), "%f");
  pixclock = 1000000 / DCF;
  left_margin = HFL - SH2;
  right_margin = SH1 - HR;
  hsync_len = SH2 - SH1;

  # 3) vertical timings:
  upper_margin = VFL - SV2;
  lower_margin = SV1 - VR;
  vsync_len = SV2 - SV1;

  RR = DCF / (HFL * VFL) *1e6;
  HSF = DCF / HFL * 1e3;

  printf("mode \"%dx%d\"\n",HR,VR);
  printf("   # D: %3.2f MHz, H: %3.2f kHz, V: %2.2f Hz\n", DCF, HSF, RR);
  printf("   geometry %d %d %d %d %d\n", HR, VR, HR, VR, bpp);
  printf("   timings %d %d %d %d %d %d %d\n", ...
                                   pixclock, left_margin, right_margin, ...
                                   upper_margin, lower_margin, ...
                                   hsync_len, vsync_len);
  printf("endmode\n");



  13.11.5.  Appendix B.  Borne Shell script "cvtfile"

  (This calls the octave script "cvtmode")

  #!/bin/sh

  # Shell script to convert XF86Config file to fb.modes file.
  # Uses octave script cvtmode.m

  if [ -z $1 ]; then
    FILE=/etc/X11/XF86Config
  else
    FILE=$1
  fi

  i=1
  LEN=`grep Modeline $FILE | wc -l`
  while expr $i \< $LEN > /dev/null ;
  do
    CURLINE=`grep Modeline $FILE | cut -d'"' -f 3-20 | head -$i | tail -1 `
    ./cvtmode.m $CURLINE
    echo " "
    i=`expr $i + 1`
  done



  14.  Using/Changing fonts


  To get the capability to change fonts, you need kbd-0.99. You may
  obtain this from ftp://ftp.win.tue.nl/pub/linux/utils/kbd.

  One advantage of downloading and installing kbd-0.99 is that you will
  be able to load international fonts (i.e Euro symbol) into your
  console device (It is tres chic to have three symbols on my keyboard,
  the dollar sign, the English pound sign and the Euro sign!).


  15.  Changing console modes


  To get the capability to change modes (i.e 640x480, 800x800 etc), you
  need fbset (currently fbset-19990118.tar.gz) - you may ftp it from:


  http://www.cs.kuleuven.ac.be/~geert/bin/fbset-19990118.tar.gz



  This comes with a full set of instructions on how to operate this.


  16.  Setting up the X11 FBdev driver


  If you are not using XFree86 3.3.3.1 or later, you are urged to
  upgrade to XFree86 3.3.3.1 - it includes a FBdev X driver for
  framebuffer devices.  Otherwise, follow the steps below to either
  download or build your own FBdev driver for older XFree86 versions
  such as 3.3.2, 3.3.3 etc.

  Go to http://www.xfree86.org, and download the latest XServers source
  archive, unpack, and configure the drivers, following these steps:


  o  Edit xc/config/cf/xf86site.def, uncomment the #define for
     XF68FBDevServer

  o  Comment out all references to FB_VISUAL_STATIC_DIRECTCOLOR, as
     these are bogus and aren't used any more. If you are using XFree86
     3.3.3.1, there is no need to do this step - as they have removed
     this.

  o  Edit xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c, and
     change K_RAW to K_MEDIUMRAW.

  and then build the driver. Don't worry about the m68k references, it
  supports Intel platforms. Then build the whole thing - it'll take a
  long time though as it's a large source tree.

  Alternatively, if you don't have the time to spare, you can obtain the
  binaries from the sites below. Please note that these are 'unofficial'
  builds and you use them at your risk.

  For libc5, use the one at:


  http://user.cs.tu-berlin.de/~kraxel/linux/XF68_FBDev.gz


  For glibc2, download from these URLs.

  http://user.cs.tu-berlin.de/~kraxel/linux/XF68_FBDev.libc6.gz
  http://pobox.com/~brion/linux/fbxserver.html



  There have been reports that X11 is non functional on certain graphic
  cards with this vesafb feature enabled, if this is happening, try the
  new XF86_FBdev driver for X11.

  This driver, along with vesafb can also help run X11 in higher graphic
  resolutions with certain graphic chipsets which are not supported by
  any of the current X11 drivers. Examples are MGA G-200 et. al.

  To configure the XF86_FBdev driver with your X11 system, you'll need
  to edit your XF86Config for the following:


  Section "Screen"
          Driver          "FBDev"
          Device          "Primary Card"
          Monitor         "Primary Monitor"
          SubSection      "Display"
                  Modes           "default"
          EndSubSection
  EndSection



  You'll also need to set XkbDisable in the keyboard section as well, or
  invoke the XF86_FBDev server with the '-kb' option to set up your
  keyboard so it works properly. If you forget to set XkbDisable, you
  will have to put the following lines in your .Xmodmap to straighten
  out the keyboard mappings. Alternatively, you can edit your xkb to
  reflect the list below.

  This is fixed in XFree86 3.3.3.1, and it is a good idea to upgrade to
  this version anyway because there are quite a few bug fixes, and also,
  it includes FBDev as one of the drvers, as I've mentioned previously.


  ! Keycode settings required
  keycode 104 = KP_Enter
  keycode 105 = Control_R
  keycode 106 = KP_Divide
  keycode 108 = Alt_R Meta_R
  keycode 110 = Home
  keycode 111 = Up
  keycode 112 = Prior
  keycode 113 = Left
  keycode 114 = Right
  keycode 115 = End
  keycode 116 = Down
  keycode 117 = Next
  keycode 118 = Insert
  keycode 119 = Delete



  You may need to do some fiddling around with this (try copying the
  original definition from the original X11 driver that you were using
  and editing the name of the driver to FBDev), but basically this is
  what you need to do to use the vesafb X11 driver.

  Hopefully the X11 problems with supported graphic cards will be fixed
  in future releases.

  17.  How do I convert XFree86 mode-lines into framebuffer device tim-
  ings?


  If you have XFree86 (X11) installed on your machine, and you can use
  it successfully, it is a simple matter to convert the mode-lines in
  your XF86Config to the required timings needed by the framebuffer
  devices.

  The framebuffer device requires the following fields

  o  pixclock - pixel clock in pico seconds

  o  left_margin - time fron sync to picture

  o  right_margin - time from picture to sync

  o  upper_margin - time from sync to picture

  o  lower_margin - time from picture to sync

  o  hsync_len - length of horizontal sync

  o  vsync_len - length of vertical sync


  An XFree86 mode line has the following fields


  Modeline  "1280x1024" DCF HR SH1 SH2 HFL VR SV1 SV2 VFL



  It is necessary to do some simple calculations to translate the XF86
  mode-lines into a set of framebuffer device timings. As an example, we
  shall examine how to convert a mode-line taken from my XF86Config
  file.


  Modeline  "1280x1024" 110.00 1280 1328 1512 1712 1024 1025 1028 1054



  First, calculate the required pixclock rate. XFree86 uses megahertz
  whilst framebuffer devices uses picoseconds (Why, I don't know).
  Divide one million by DCF.  For example, 1,000,000 / 110.0 = 9090.9091


  Now we need to calculate the horizontal timings.

  o  left_margin = HFL - SH2

  o  right_margin = SH1 - HR

  o  hsync_len = SH2 - SH1


  In our example, this would be:

  o  left_margin = 1712 - 1512 = 200

  o  right_margin = 1328 - 1280 = 48


  o  hsync_len = 1512 - 1328 = 184


  And now we need to calculate the vertical timings.

  o  upper_margin = VFL - SV2

  o  lower_margin = SV1 - VR

  o  vsync_len = SV2 - SV1


  For our example, this would be:

  o  upper_margin = 1054 - 1028 = 26

  o  lower_margin = 1025 - 1024 = 1

  o  vsync_len = 1028 - 1025 = 3


  Now we can use this information to set up the framebuffer for the
  desired mode.  For example, for the matroxfb framebuffer, it requires:


  video=matrox:xres:<>,yres:<>,depth:<>,left:<>,right:<>,hslen:<>,upper:<>,lower:<>,vslen:<>



  I put in my /etc/lilo.conf the following line:

  append = "video=matrox:xres:1280,yres:1024,depth:32,left:200,right:48,hslen:184,upper:26,lower:0,vslen:3"



  Note that in this case the pixclock isn't used. It's only necessary if
  you don't like the default pixclock rates. You can supply this as a
  parameter as well. Setting the pixclock is documented in other parts
  of this HOWTO.


  18.  Looking for further information?


  For those of you interested in working with the framebuffer drivers,
  point your browser at

  http://www.csoft.net/~systems/jim/fb.html



  French speakers, there is a translation at

  http://www.freenix.org/unix/linux/HOWTO/mini/Vesafb.html



  From Power Up To Bash Prompt
  Greg O'Keefe, gcokeefe@postoffice.utas.edu.au
  v0.7, April 2000

  This is a brief description of what happens in a Linux system, from
  the time that you turn on the power, to the time that you log in and
  get a bash prompt.  It is organised by package to make it easier for
  people who want to build a system from source code. Understanding this
  will be helpful when you need to solve problems or configure your sys
  tem.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

  2. Hardware

     2.1 Configuration
     2.2 Exercises
     2.3 More Information

  3. Lilo

     3.1 Configuration
     3.2 Exercises
     3.3 More Information

  4. The Linux Kernel

     4.1 Configuration
     4.2 Exercises
     4.3 More Information

  5. The GNU C Library

     5.1 Configuration
     5.2 Exercises
     5.3 More Information

  6. Init

     6.1 Configuration
     6.2 Exercises
     6.3 More Information

  7. The Filesystem

     7.1 Configuration
     7.2 Exercises
     7.3 More Information

  8. Kernel Daemons

     8.1 Configuration
     8.2 Exercises
     8.3 More Information

  9. System Logger

     9.1 Configuration
     9.2 Exercises
     9.3 More Information

  10. Getty and Login

     10.1 Configuration
     10.2 Exercises

  11. Bash

     11.1 Configuration
     11.2 Exercises
     11.3 More Information

  12. Commands

  13. Building A Minimal Linux System From Source

     13.1 What You Will Need
     13.2 The Filesystem
     13.3 MAKEDEV
     13.4 Kernel
     13.5 Lilo
     13.6 Glibc
     13.7 SysVinit
     13.8 Ncurses
     13.9 Bash
     13.10 Util-linux (getty and login)
     13.11 Sh-utils
     13.12 Towards Useability
     13.13 Random Tips
     13.14 More Information

  14. Conclusion

  15. Administrivia

     15.1 Copyright
     15.2 Homepage
     15.3 Feedback
     15.4 Acknowledgements
     15.5 Change History
        15.5.1 0.6 -> 0.7
        15.5.2 0.5 -> 0.6
     15.6 TODO


  ______________________________________________________________________

  1.  Introduction

  I find it frustrating that many things happen inside my Linux machine
  that I do not understand. If, like me, you want to really understand
  your system rather than just knowing how to use it, this document
  should be a good place to start.  This kind of background knowledge is
  also needed if you want to be a top notch Linux problem solver.


  I assume that you have a working Linux box, and understand some basic
  things about Unix and PC hardware. If not, an excellent place to start
  learning is Eric S. Raymond's The Unix and Internet Fundamentals HOWTO
  <http://www.linuxdoc.org/HOWTO/Unix-and-Internet-Fundamentals-
  HOWTO.html> It is short, very readable and covers all the basics.


  The main thread in this document is how Linux starts itself up.  But
  it also tries to be a more comprehensive learning resource.  I have
  included exercises in each section. If you actually do some of these,
  you will learn much more than you could by just reading.


  There are also links to source code downloads. The reason for this is
  that I hope some readers will undertake the best Linux learning
  exercise that I know of, which is building a system from source code.
  Giambattista Vico, an Italian philosopher (1668-1744) said ``verum
  ipsum factum'', which means ``understanding arises through making''.
  Thanks to Alex (see ``Acknowledgements'') for this quote.


  If you want to ``roll your own'', you should also see Gerard Beekmans'
  Linux From Scratch HOWTO <http://www.linuxfromscratch.org> (LFS).  LFS
  has detailed instructions on building a complete useable system from
  source code. On the LFS website, you will also find a mailing list for
  people building systems this way. What I have included in this
  document, is instructions (see ``Building a Minimal Linux System From
  Source'') for building a ``toy'' system, purely as a learning
  exercise.


  Packages are presented in the order in which they appear in the system
  startup process. This means that if you install the packages in this
  order you can reboot after each installation, and see the system get a
  little closer to giving you a bash prompt each time. There is a
  reassuring sense of progress in this.


  I recommend that you first read the main text of each section,
  skipping the exercises and references. Then decide how deep an
  understanding you want to develop, and how much effort you are
  prepared to put in. Then start at the beginning again, doing the
  exercises and additional reading as you go.



  2.  Hardware

  When you first turn on your computer it tests itself to make sure
  everything is in working order. This is called the ``Power on self
  test''. Then a program called the bootstrap loader, located in the ROM
  BIOS, looks for a boot sector. A boot sector is the first sector of a
  disk and has a small program that can load an operating system. Boot
  sectors are marked with a magic number 0xAA55 = 43603 at byte 0x1FE =
  510. That's the last two bytes of the sector. This is how the hardware
  can tell whether the sector is a boot sector or not.


  The bootstrap loader has a list of places to look for a boot sector.
  My old machine looks in the primary floppy drive, then the primary
  hard drive.  More modern machines can also look for a boot sector on a
  CD-ROM.  If it finds a boot sector, it loads it into memory and passes
  control to the program that loads the operating system.  On a typical
  Linux system, this program will be LILO's first stage boot loader.
  There are many different ways of setting your system up to boot
  though. See the LILO User's Guide for details. See section ``LILO''
  for a URL.


  Obviously there is a lot more to say about what PC hardware does. But
  this is not the place to say it. See one of the many good books about
  PC hardware.


  2.1.  Configuration

  The machine stores some information about itself in its CMOS. This
  includes what disks and RAM are in the system. The machine's BIOS
  contains a program to let you modify these settings. Check the
  messages on your screen as the machine is turned on to see how to
  access it. On my machine, you press the delete key before it begins
  loading its operating system.


  2.2.  Exercises

  A good way to learn about PC hardware is to build a machine out of
  second hand parts. Get at least a 386 so you can easily run Linux on
  it. It won't cost much.  Ask around, someone might give you some of
  the parts you need.


  Check out, download compile and make a boot disk for Unios
  <http://learning.taslug.org.au/resources>.  (They used to have a home
  page at  <http://www.unios.org>, but it disappeared) This is just a
  bootable ``Hello World!'' program, consisting of just over 100 lines
  of assembler code. It would be good to see it converted to a format
  that the GNU assembler as can understand.


  Open the boot disk image for unios with a hex editor. This image is
  512 bytes long, exactly one sector. Find the magic number 0xAA55. Do
  the same for the boot sector from a bootable floppy disk or your own
  computer. You can use the dd command to copy it to a file: dd
  if=/dev/fd0 of=boot.sector.  Be very careful to get if (input file)
  and of (output file) the right way round!

  Check out the source code for LILO's boot loader.


  2.3.  More Information


    The Unix and Internet Fundamentals HOWTO
     <http://www.linuxdoc.org/HOWTO/Unix-and-Internet-Fundamentals-
     HOWTO.html> by Eric S. Raymond, especially section 3, What happens
     when you switch on a computer?

    The first chapter of The LILO User's Guide gives an excellent
     explanation of PC disk partitions and booting.  See section
     ``LILO'' for a URL.

    The NEW Peter Norton Programmer's Guide to the IBM PC & PS/2, by
     Peter Norton and Richard Wilton, Microsoft Press 1988 There is a
     newer Norton book, which looks good, but I can't afford it right
     now!

    One of the many books available on upgrading PC's



  3.  Lilo

  When the computer loads a boot sector on a normal Linux system, what
  it loads is actually a part of lilo, called the ``first stage boot
  loader''. This is a tiny program who's only job in life is to load and
  run the ``second stage boot loader''.


  The second stage loader gives you a prompt (if it was installed that
  way) and loads the operating system you choose.


  When your system is up and running, and you run lilo, what you are
  actually running is the ``map installer''. This reads the
  configuration file /etc/lilo.conf and writes the boot loaders, and
  information about the operating systems it can load, to the hard disk.


  There are lots of different ways to set your system up to boot. What I
  have just explained is the most obvious and ``normal'' way, at least
  for a system who's main operating system is Linux. The Lilo Users'
  Guide explains several examples of ``boot concepts''. It is worth
  reading these, and trying some of them out.



  3.1.  Configuration

  The configuration file for lilo is /etc/lilo.conf. There is a manual
  page for it: type man lilo.conf into a shell to see it. The main thing
  in lilo.conf is one entry for each thing that lilo is set up to boot.
  For a Linux entry, this includes where the kernel is, and what disk
  partition to mount as the root filesystem. For other operating
  systems, the main piece of information is which partition to boot
  from.


  3.2.  Exercises

  DANGER: take care with these exercises. It is easy enough to get
  something wrong and screw up your master boot record and make your
  system unuseable. Make sure you have a working rescue disk, and know
  how to use it to fix things up again. See below for a link to
  tomsrtbt, the rescue disk I use and recommend. The best precaution is
  to use a machine that doesn't matter.


  Set up lilo on a floppy disk. It doesn't matter if there is nothing
  other than a kernel on the floppy - you will get a ``kernel panic''
  when the kernel is ready to load init, but at least you will know that
  lilo is working.


  If you like you can press on and see how much of a system you can get
  going on the floppy. This is probably the second best Linux learning
  activity around.  See the Bootdisk HOWTO (url below), and tomsrtbt
  (url below) for clues.


  Get lilo to boot unios (see section ``hardware exercises'' for a URL).
  As an extra challenge, see if you can do this on a floppy disk.


  Make a boot-loop. Get lilo in the master boot record to boot lilo in
  one of the primary partition boot sectors, and have that boot lilo in
  the master boot record... Or perhaps use the master boot record and
  all four primary partitions to make a five point loop. Fun!


  3.3.  More Information



    The lilo man page.

    The Lilo package (see ``downloads'') contains the ``LILO User's
     Guide'' lilo-u-21.ps.gz (or a later version).  You may already have
     this document though.  Check /usr/doc/lilo or there abouts.  The
     postscript version is better than the plain text, since it contains
     diagrams and tables.

    tomsrtbt <http://www.toms.net/rb> the coolest single floppy linux.
     Makes a great rescue disk.

    The Bootdisk HOWTO <http://www.linuxdoc.org/HOWTO/Bootdisk-HOWTO/>



  4.  The Linux Kernel


  The kernel does quite a lot really. I think a fair way of summing it
  up is that it makes the hardware do what the programs want, fairly and
  efficiently.


  The processor can only execute one instruction at a time, but Linux
  systems appear to be running lots of things simultaneously. The kernel
  acheives this by switching from task to task really quickly. It makes
  the best use of the processor by keeping track of which processes are
  ready to go, and which ones are waiting for something like a record
  from a hard disk file, or some keyboard input.  This kernel task is
  called scheduling.


  If a program isn't doing anything, then it doesn't need to be in RAM.
  Even a program that is doing something, might have parts that aren't
  doing anything.  The address space of each process is divided into
  pages. The Kernel keeps track of which pages of which processes are
  being used the most. The pages that aren't used so much can be moved
  out to the swap partition. When they are needed again, another unused
  page can be paged out to make way for it. This is virtual memory
  management.


  If you have ever compiled your own Kernel, you will have noticed that
  there are many many options for specific devices. The kernel contains
  a lot of specific code to talk to diverse kinds of hardware, and
  present it all in a nice uniform way to the application programs.


  The Kernel also manages the filesystem, interprocess communication,
  and a lot of networking stuff.


  Once the kernel is loaded, the first thing it does is look for an init
  program to run.


  4.1.  Configuration

  Most of the configuration of the kernel is done when you build it,
  using make menuconfig, or make xconfig in /usr/src/linux/ (or wherever
  your Linux kernel source is). You can reset the default video mode,
  root filesystem, swap device and RAM disk size using rdev. These
  parameters and more can also be passed to the kernel from lilo. You
  can give lilo parameters to pass to the kernel either in lilo.conf, or
  at the lilo prompt.  For example if you wanted to use hda3 as your
  root file system instead of hda2, you might type


          LILO: linux root=/dev/hda3



  If you are building a system from source, you can make life a lot
  simpler by creating a ``monolithic'' kernel. That is one with no
  modules. Then you don't have to copy kernel modules to the target
  system.


  NOTE: The System.map file is used by the kernel logger to determine
  the module names generating messages. The program top also uses this
  information. When you copy the kernel to the target system, copy
  System.map too.


  4.2.  Exercises

  Think about this: /dev/hda3 is a special type of file that describes a
  hard disk partition. But it lives on a file system just like all other
  files. The kernel wants to know which partition to mount as the root
  filesystem - it doesn't have a file system yet. So how can it read
  /dev/hda3 to find out which partition to mount?


  If you haven't already: build your own kernel. Read all the help
  information for each option.


  See how small a kernel you can make that still works. You can learn a
  lot by leaving the wrong things out!


  Read ``The Linux Kernel'' (URL below) and as you do, find the parts of
  the source code that it refers to. The book (as I write) refers to
  kernel version 2.0.33, which is pretty out of date. It might be easier
  to follow if you download this old version and read the source there.
  Its amazing to find bits of C code called ``process'' and ``page''.


  Hack! See if you can make it spit out some extra messages or
  something.



  4.3.  More Information


    /usr/src/linux/README and the contents of
     /usr/src/linux/Documentation/ (These may be in some other place on
     your system)

    The Kernel HOWTO
     <http://mirror.aarnet.edu.au/linux/LDP/HOWTO/Kernel-HOWTO.html>

    The help available when you configure a kernel using make
     menuconfig or make xconfig

    The Linux Kernel (and other LDP Guides)
     <http://mirror.aarnet.edu.au/linux/LDP/LDP/>

    Kernel source download see ``downloads''



  5.  The GNU C Library

  The next thing that happens as your computer starts up is that init is
  loaded and run. However, init, like almost all programs, uses
  functions from libraries.


  You may have seen an example C program like this:



          main() {
                  printf("Hello World!\n");
          }



  The program contains no definition of printf, so where does it come
  from?  It comes from the standard C libraries, on a GNU/Linux system,
  glibc.  If you compile it under Visual C++, then it comes from a
  Microsoft implementation of the same standard functions. There are
  zillions of these standard functions, for math, string, dates/times
  memory allocation and so on. Everything in Unix (including Linux) is
  either written in C or has to try hard to pretend it is, so everything
  uses these functions.



  If you look in /lib on your linux system you will see lots of files
  called libsomething.so or libsomething.a etc. They are libraries of
  these functions.  Glibc is just the GNU implementation of these
  functions.


  There are two ways programs can use these library functions. If you
  statically link a program, these library functions are copied into the
  executable that gets created. This is what the libsomething.a
  libraries are for. If you dynamically link a program (and this is the
  default), then when the program is running and needs the library code,
  it is called from the libsomething.so file.


  The command ldd is your friend when you want to work out which
  libraries are needed by a particular program.  For example, here are
  the libraries that bash uses:



          [greg@Curry power2bash]$ ldd /bin/bash
                  libtermcap.so.2 => /lib/libtermcap.so.2 (0x40019000)
                  libc.so.6 => /lib/libc.so.6 (0x4001d000)
                  /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)



  5.1.  Configuration

  Some of the functions in the libraries depend on where you are. For
  example, in Australia we write dates as dd/mm/yy, but Americans write
  mm/dd/yy. There is a program that comes with the glibc distribution
  called localedef which enables you to set this up.


  5.2.  Exercises

  Use ldd to find out what libraries your favourite applications use.


  Use ldd to find out what libraries init uses.


  Make a toy library, with just one or two functions in it. The program
  ar is used to create them, the man page for ar might be a good place
  to start investigating how this is done. Write, compile and link a
  program that uses this library.

  5.3.  More Information


    source code, see section ``downloads''



  6.  Init

  I will only talk about the ``System V'' style of init that Linux
  systems mostly use. There are alternatives. In fact, you can put any
  program you like in /sbin/init, and the kernel will run it when it has
  finished loading.


  It is init's job to get everthing running the way it should be.  It
  checks that the file systems are ok and mounts them. It starts up
  ``daemons'' to log system messages, do networking, serve web pages,
  listen to your mouse and so on. It also starts the getty processes
  that put the login prompts on your virtual terminals.


  There is a whole complicated story about switching ``run-levels'', but
  I'm going to mostly skip that, and just talk about system start up.


  Init reads the file /etc/inittab, which tells it what to do.
  Typically, the first thing it is told to do is to run an
  initialisation script.  The program that executes (or interprets) this
  script is bash, the same program that gives you a command prompt.  In
  Debian systems, the initialisation script is /etc/init.d/rcS, on Red
  Hat, /etc/rc.d/rc.sysinit. This is where the filesystems get checked
  and mounted, the clock set, swap space enabled, hostname gets set etc.


  Next, another script is called to take us into the default run-level.
  This just means a set of subsystems to start up. There is a set of
  directories /etc/rc.d/rc0.d, /etc/rc.d/rc1.d, ..., /etc/rc.d/rc6.d in
  Red Hat, or /etc/rc0.d, /etc/rc1.d, ..., /etc/rc6.d in Debian, which
  correspond to the run-levels. If we are going into runlevel 3 on a
  Debian system, then the script runs all the scripts in /etc/rc3.d that
  start with `S' (for start).  These scripts are really just links to
  scripts in another directory usually called init.d.


  So our run-level script was called by init, and it is looking in a
  directory for scripts starting with `S'. It might find S10syslog
  first. The numbers tell the run-level script which order to run them
  in. So in this case S10syslog gets run first, since there were no
  scripts starting with S00 ... S09. But S10syslog is really a link to
  /etc/init.d/syslog which is a script to start and stop the system
  logger. Because the link starts with an `S', the run-level script
  knows to execute the syslog script with a ``start'' parameter. There
  are corresponding links starting with `K' (for kill), which specify
  what to shut down and in what order when leaving the run-level.


  To change what subsystems start up by default, you must set up these
  links in the rcN.d directory, where N is the default runlevel set in
  your inittab.


  The last important thing that init does is to start some getty's.
  These are ``respawned'' which means that if they stop, init just
  starts them again. Most distributions come with six virtual terminals.
  You may want less than this to save memory, or more so you can leave
  lots of things running and quickly flick to them as you need them. You
  may also want to run a getty for a text terminal or a dial in modem.
  In this case you will need to edit the inittab file.



  6.1.  Configuration

  /etc/inittab is the top level configuration file for init.


  The rcN.d directories, where N = 0, 1, ..., 6 determine what
  subsystems are started.


  Somewhere in one of the scripts invoked by init, the mount -a command
  will be issued. This means mount all the file systems that are
  supposed to be mounted. The file /etc/fstab defines what is supposed
  to be mounted.  If you want to change what gets mounted where when
  your system starts up, this is the file you will need to edit. There
  is a man page for fstab.


  6.2.  Exercises

  Find the rcN.d directory for the default run-level of your system and
  do a ls -l to see what the files are links to.


  Change the number of gettys that run on your system.


  Remove any subsystems that you don't need from your default run-level.


  See how little you can get away with starting.


  Set up a floppy disk with lilo, a kernel and a statically linked
  "hello world" program called /sbin/init and watch it boot up and say
  hello.


  Watch carefully as your system starts up, and take notes about what it
  tells you is happening. Or print a section of your system log
  /var/log/messages from start up time. Then starting at inittab, walk
  through all the scripts and see what code does what. You can also put
  extra start up messages in, such as


          echo "Hello, I am rc.sysinit"



  This is a good exercise in learning Bash shell scripting too, some of
  the scripts are quite complicated. Have a good Bash reference handy.


  6.3.  More Information


    see ``downloads'' for source code download url's

    There are man pages for the inittab and fstab files.  Type (eg) man
     inittab into a shell to see it.
    The Linux System Administrators Guide has a good section
     <http://mirror.aarnet.edu.au/linux/LDP/LDP/> on init.



  7.  The Filesystem

  In this section, I will be using the word ``filesystem'' in two
  different ways.  There are filesystems on disk partitions and other
  devices, and there is the filesystem as it is presented to you by a
  running Linux system. In Linux, you ``mount'' a disk filesystem onto
  the system's filesystem.


  In the previous section I mentioned that init scripts check and mount
  the filesystems. The commands that do this are fsck and mount
  respectively.


  A hard disk is just a big space that you can write ones and zeros on.
  A filesystem imposes some structure on this, and makes it look like
  files within directories within directories... Each file is
  represented by an inode, which says who's file it is, when it was
  created and where to find its contents.  Directories are also
  represented by inodes, but these say where to find the inodes of the
  files that are in the directory. If the system wants to read
  /home/greg/bigboobs.jpeg, it first finds the inode for the root
  directory / in the ``superblock'', then finds the inode for the
  directory home in the contents of /, then finds the inode for the
  directory greg in the contents of /home, then the inode for
  bigboobs.jpeg which will tell it which disk blocks to read.



  If we add some data to the end of a file, it could happen that the
  data is written before the inode is updated to say that the new blocks
  belong to the file, or vice versa. If the power cuts out at this
  point, the filesystem will be broken. It is this kind of thing that
  fsck attempts to detect and repair.


  The mount command takes a filesystem on a device, and adds it to the
  heirarchy that you see when you use your system. Usually, the kernel
  mounts its root file system read-only. The mount command is used to
  remount it read-write after fsck has checked that it is ok.


  Linux supports other kinds of filesystem too: msdos, vfat, minix and
  so on. The details of the specific kind of filesystem are abstracted
  away by the virtual file system (VFS). I won't go into any detail on
  this though. There is a discussion of it in ``The Linux Kernel'' (see
  section ``The Linux Kernel'' for a url)


  7.1.  Configuration

  There are parameters to the command mke2fs which creates ext2
  filesystems. These control the size of blocks, the number of inodes
  and so on.  Check the mke2fs man page for details.


  What gets mounted where on your filesystem is controlled by the
  /etc/fstab file. It also has a man page.



  7.2.  Exercises

  Make a very small filesystem, and view it with a hex viewer. Identify
  inodes, superblocks and file contents.


  I believe there are tools that give you a graphical view of a
  filesystem.  Find one, try it out, and email me the url and a review!


  Check out the ext2 filesystem code in the Kernel.


  7.3.  More Information


    Chapter 9 of the LDP book ``The Linux Kernel'' is an excellent
     description of filesystems. You can find it at the Australian LDP
     mirror <http://mirror.aarnet.edu.au/linux/LDP/LDP/>

    The mount command is part of the util-linux package, there is a
     link to it in ``downloads''.

    man pages for mount, fstab, fsck and mke2fs

    EXT2 File System Utilities ext2fsprogs
     <http://web.mit.edu/tytso/www/linux/e2fsprogs.html> home page
     ext2fsprogs
     <ftp://mirror.aarnet.edu.au/pub/linux/metalab/system/filesystems/ext2/>
     Australian mirror. There is also a Ext2fs-overview document here,
     although it is out of date, and not as readable as chapter 9 of
     ``The Linux Kernel''

     Unix File System Standard
     <ftp://tsx-11.mit.edu/pub/linux/docs/linux-standards/fsstnd/>
     Another link <http://www.pathname.com/fhs/> to the Unix File System
     Standard.  This describes what should go where in a Unix file
     system, and why. It also has minimum requirements for the contents
     of /bin, /sbin and so on. This is a good reference if your goal is
     to make a minimal yet complete system.



  8.  Kernel Daemons

  Unfortunately, this section contains more conjectures and questions
  than facts.  Perhaps you can help?


  If you issue the ps aux command, you will see something like the
  following:



  USER       PID %CPU %MEM  SIZE   RSS TTY STAT START   TIME COMMAND
  root         1  0.1  8.0  1284   536   ? S    07:37   0:04 init [2]
  root         2  0.0  0.0     0     0   ? SW   07:37   0:00 (kflushd)
  root         3  0.0  0.0     0     0   ? SW   07:37   0:00 (kupdate)
  root         4  0.0  0.0     0     0   ? SW   07:37   0:00 (kpiod)
  root         5  0.0  0.0     0     0   ? SW   07:37   0:00 (kswapd)
  root        52  0.0 10.7  1552   716   ? S    07:38   0:01 syslogd -m 0
  root        54  0.0  7.1  1276   480   ? S    07:38   0:00 klogd
  root        56  0.3 17.3  2232  1156   1 S    07:38   0:13 -bash
  root        57  0.0  7.1  1272   480   2 S    07:38   0:01 /sbin/agetty 38400 tt
  root        64  0.1  7.2  1272   484  S1 S    08:16   0:01 /sbin/agetty -L ttyS1
  root        70  0.0 10.6  1472   708   1 R   Sep 11   0:01 ps aux



  This is a list of the processes running on the system. Note that init
  is process number one. Processes 2, 3, 4 and 5 are kflushd, kupdate,
  kpiod and kswapd. There is something strange here though: notice that
  in both the virtual storage size (SIZE) and the Real Storage Size
  (RSS) columns, these processes have zeroes. How can a process use no
  memory? These processes are really part of the kernel. The kernel does
  not show up on process lists at all, and you can only work out what
  memory it is using by subtracting the memory available from the amount
  on your system. The brackets around the command name could signify
  that these are kernel processes(?)


  kswapd moves parts of programs that are not currently being used from
  real storage (ie RAM) to the swap space (ie hard disk). kflushd writes
  data from buffers to disk. This allows things to run faster. What
  programs write can be kept in memory, in a buffer, then written to
  disk in larger more efficient chunks. I don't know what kupdate and
  kpiod are for.


  This is where my knowledge ends. What do these last two daemons do?
  Why do kernel daemons get explicit process numbers rather than just
  being anonymous bits of kernel code? Does init actually start them, or
  are they already running when init arrives on the scene?


  I put a script to mount /proc and do a ps aux in /sbin/init. Process 1
  was the script itself, and processess 2, 3, 4 and 5 were the kernel
  daemons just as under the real init. The kernel must put these
  processes there, because my script certainly didn't!


  The following ramblings were contributed by David Leadbeater:


  These processes seem to take care of disk reads and writes, they seem
  to be started by the kernel but after it runs the init process, it
  seems that being run as kernel processes rather than seperate
  processess they are protected from being killed (kill -9 dosen't stop
  them), I am not sure why they are run as seperate threads (it seems to
  be something with disk access)


  kflushd and kupdate These two processes are started to flush dirty
  (changed) buffers back to disk.  kflushd is run when the buffers are
  full and kupdate runs periodically (5 seconds?) to sync the disk and
  the buffers in memory.



  kpiod and kswapd These deal with paging out pages (sections) of memory
  into the swap file so main memory never gets exhausted, these are
  similar to kflushd and kupdate in that one is run when needed kpiod
  and the other kswapd is run peridically (1 second intervals)


  Other Kernel Daemons On a default install of RH6 kupdate is missing
  but update is running as a user space daemon so it seems it needs to
  be run! Also another daemon mdrecoveryd is there, this seems to be
  dealing with software RAID, looking at the kernel source it seems that
  some SCSI drivers also start seperate processes.


  I am still unsure of the meaning of the brackets but it seems that
  they appear when the RSS of a process is 0 meaning it isn't using any
  memory?


  (end of ramble, thanks David)



  8.1.  Configuration

  I don't know of any configuration for these kernel daemons.


  8.2.  Exercises

  Find out what these processes are for, how they work, and write a new
  ``Kernel Daemons'' section for this document and send it to me!


  8.3.  More Information

  The Linux Documentation Project's ``The Linux Kernel'' (see section
  ``The Linux Kernel'' for a url), and the kernel source code are all I
  can think of.



  9.  System Logger

  Init starts the syslogd and klogd daemons. They write messages to
  logs. The kernel's messages are handled by klogd, while syslogd
  handles log messages from other processes. The main log is
  /var/log/messages. This is a good place to look if something is going
  wrong with your system. Often there will be a valuable clue in there.



  9.1.  Configuration

  The file /etc/syslog.conf tells the loggers what messages to put
  where. Messages are identified by which service they come from, and
  what priority level they are. This configuration file consists of
  lines that say messages from service x with priority y go to z, where
  z is a file, tty, printer, remote host or whatever.


  NOTE: Syslog requires the /etc/services file to be present. The
  services file allocates ports. I am not sure whether syslog needs a
  port allocated so that it can do remote logging, or whether even local
  logging is done through a port, or whether it just uses /etc/services
  to convert the service names you type /etc/syslog.conf into port
  numbers.
  9.2.  Exercises

  Have a look at your system log. Find a message you don't understand,
  and find out what it means.


  Send all your log messages to a tty. (set it back to normal once done)



  9.3.  More Information

  Australian sysklogd Mirror
  <http://mirror.aarnet.edu.au/pub/linux/metalab/system/daemons/>



  10.  Getty and Login

  Getty is the program that enables you to log in through a serial
  device such as a virtual terminal, a text terminal, or a modem. It
  displays the login prompt. Once you enter your username, getty hands
  this over to login which asks for a password, checks it out and gives
  you a shell.



  There are many getty's available. Some distributions, including Red
  Hat use a very small one called mingetty that only works with virtual
  terminals.


  The login program is part of the util-linux package, which also
  contains a getty called agetty, which works fine. This package also
  contains  mkswap, fdisk, passwd, kill, setterm, mount, swapon, rdev,
  renice, more (the program) and more (ie more programs).


  10.1.  Configuration

  The message that comes on the top of your screen with your login
  prompt comes from /etc/issue. Gettys are usually started in
  /etc/inittab.  Login checks user details in /etc/passwd, and if you
  have password shadowing, /etc/shadow.


  10.2.  Exercises

  Create a /etc/passwd by hand. Passwords can be set to null, and
  changed with the program passwd once you log on. See the man page for
  this file Use man 5 passwd to get the man page for the file rather
  than the man page for the program.



  11.  Bash

  If you give login a valid username and password combination, it will
  check in /etc/passwd to see which shell to give you. In most cases on
  a Linux system this will be bash. It is bash's job to read your
  commands and see that they are acted on. It is simultaneously a user
  interface, and a programming language interpreter.


  As a user interface it reads your commands, and executes them itself
  if they are ``internal'' commands like cd, or finds and executes a
  program if they are ``external'' commands like cp or startx. It also
  does groovy stuff like keeping a command history, and completing
  filenames.


  We have already seen bash in action as a programming language
  interpreter. The scripts that init runs to start the system up are
  usually shell scripts, and are executed by bash. Having a proper
  programming language, along with the usual system utilities available
  at the command line makes a very powerful combination, if you know
  what you are doing.  For example (smug mode on) I needed to apply a
  whole stack of ``patches'' to a directory of source code the other
  day. I was able to do this with the following single command:


  for f in /home/greg/sh-utils-1.16*.patch; do patch -p0 < $f; done;



  This looks at all the files in my home directory whose names start
  with sh-utils-1.16 and end with .patch. It then takes each of these in
  turn, and sets the variable f to it and executes the commands between
  do and done. In this case there were 11 patch files, but there could
  just as easily have been 3000.


  11.1.  Configuration

  The file /etc/profile controls the system-wide behaviour of bash. What
  you put in here will affect everybody who uses bash on your system. It
  will do things like add directories to the PATH, set your MAIL
  directory variable.


  The default behaviour of the keyboard often leaves a lot to be
  desired. It is actually readline that handles this. Readline is a
  separate package that handles command line interfaces, providing the
  command history and filename completion, as well as some advanced line
  editing features. It is compiled into bash. By default, readline is
  configured using the file .inputrc in your home directory. The bash
  variable INPUTRC can be used to override this for bash. For example in
  Red Hat 6, INPUTRC is set to /etc/inputrc in /etc/profile. This means
  that backspace, delete, home and end keys work nicely for everyone.


  Once bash has read the system-wide configuration file, it looks for
  your personal configuration file. It checks in your home directory for
  .bash_profile, .bash_login and .profile. It runs the first one of
  these it finds. If you want to change the way bash behaves for you,
  without changing the way it works for others, do it here. For example,
  many applications use environment variables to control how they work.
  I have the variable EDITOR set to vi so that I can use vi in Midnight
  Commander (an excellent console based file manager) instead of its
  editor.



  11.2.  Exercises

  The basics of bash are easy to learn. But don't stop there: there is
  an incredible depth to it. Get into the habit of looking for better
  ways to do things.

  Read shell scripts, look up stuff you don't understand.


  11.3.  More Information


    source code download see ``downloads''

    There is a ``Bash Reference Manual'' with this, which is
     comprehensive, but heavy going.

    There is an O'Rielly book on Bash, not sure if it's good.

    I don't know of any good free up to date bash tutorials. If you do,
     please email me a url.



  12.  Commands

  You do most things in bash by issuing commands like cp. Most of these
  commands are small programs, though some, like cd are built into the
  shell.


  The commands come in packages, most of them from the Free Software
  Foundation (or GNU).  Rather than list the packages here, I'll direct
  you to the Linux From Scratch HOWTO <http://www.linuxfromscratch.org>.
  It has a full and up to date list of the packages that go into a Linux
  system as well as instructions on how to build them.



  13.  Building A Minimal Linux System From Source

  So far I have focussed on what the packages do. Here I will offer what
  clues I can about making a minimal Linux system from source. This is a
  toy system we are making here. If you want to build a real system to
  be used for real work, see the Linux From Scratch HOWTO
  <http://www.linuxfromscratch.org>.


  It is possible to get a bash prompt without installing everything I
  mention here. What I describe is a base system, without nasty kludges,
  that can be built on easily.



  13.1.  What You Will Need

  We will install a Linux distribution like Red Hat in one partition,
  and use that to build a new Linux system in another partition.  I will
  call the system we are building the ``target'' and the system we are
  using to build it with, the ``source'' (not to be confused with source
  code which we will also be using.)


  So you are going to need a machine with two spare partitions on it.
  If you can, use a machine with nothing important on it.  You could use
  an existing Linux installation as the source system, but I wouldn't
  recommend that. If you leave a parameter out of one of the commands we
  will issue, you could accidentally install stuff to this system. This
  could lead to incompatibilites and strife.



  Older PC hardware, mostly 486's and earlier, have an annoying
  limitation in their bios. They can not read from a hard disk past the
  first 512M.  This is not too much of a problem for Linux, because once
  it is up, it does its own disk io, bypassing the bios.  But for Linux
  to get loaded by these old machines, the kernel has to reside
  somewhere below 512M. If you have one of these machines you will need
  to have a separate partition completely below the 512M mark, to mount
  as /boot for any partitions that are over that 512M mark.


  Last time I did this, I used Red Hat 6.1 as a source system. I
  installed the base system plus


    cpp

    egcs

    egcs-c++

    patch

    make

    dev86

    ncurses-devel

    glibc-devel

    kernel-headers


  I also had X-window and Mozilla so I could read documentation easily,
  but that's not really necessary.  By the time I had finished working,
  it had used about 350M of disk space. (Seems a bit high, I wonder
  why?)


  The finished target system took 650M, but that includes all the source
  code and intermediate build files. If space is tight, you should do a
  make clean after each package is built. Still, this mind boggling
  bloat is a bit of a worry.


  Finally, you are going to need the source code for the system we are
  going to build. These are the ``packages'' that I have discussed in
  this document. These can be obtained from a source cd, or from the
  internet. I'll give URL's for the USA sites and for Australian
  mirrors.



    MAKEDEV USA <ftp://tsx-11.mit.edu/pub/linux/sources/sbin> Another
     USA <ftp://sunsite.unc.edu/pub/Linux/system/admin> site

    Lilo USA <ftp://lrcftp.epfl.ch/pub/linux/local/lilo/>, Australia
     <ftp://mirror.aarnet.edu.au/pub/linux/metalab/system/boot/lilo/>.

    Linux Kernel Use one of the mirrors listed at home page
     <http://www.kernel.org> rather than USA
     <ftp://ftp.kernel.org/pub/linux/kernel> because they are always
     overloaded.  Australia
     <ftp://kernel.mirror.aarnet.edu.au/pub/linux/kernel/>

    GNU libc itself, and the linuxthreads addon are at USA
     <ftp://ftp.gnu.org/pub/gnu/glibc> Australia
     <ftp://mirror.aarnet.edu.au/pub/gnu/glibc>

    GNU libc addons You will also need the linuxthreads and libcrypt
     addons.  If libcrypt is not there it is because of some US export
     laws.  You can get it at libcrypt
     <ftp://ftp.gwdg.de/pub/linux/glibc> The linuxthreads addon is in
     the same places as libc itself

    GNU ncurses USA <ftp://ftp.gnu.org/gnu/ncurses> Australia
     <ftp://mirror.aarnet.edu.au/pub/gnu/ncurses>

    SysVinit USA <ftp://sunsite.unc.edu/pub/Linux/system/daemons/init>
     Australia
     <ftp://mirror.aarnet.edu.au/pub/linux/metalab/system/daemons/init>

    GNU Bash USA <ftp://ftp.gnu.org/gnu/bash> Australia
     <ftp://mirror.aarnet.edu.au/pub/gnu/bash>

    GNU sh-utils USA <ftp://ftp.gnu.org/gnu/sh-utils> Australia
     <ftp://mirror.aarnet.edu.au/pub/gnu/sh-utils>

    util-linux Somewhere else
     <ftp://ftp.win.tue.nl/pub/linux/utils/util-linux/> Australia
     <ftp://mirror.aarnet.edu.au/pub/linux/metalab/system/misc> This
     package contains agetty and login.


  To sum up then, you will need:

    A machine with two spare partitions of about 400M and 700M
     respectively though you could probably get away with less

    A Linux distribution (eg. a Red Hat cd) and a way of installing it
     (eg. a cdrom drive)

    The source code tarballs listed above


  I'm assuming that you can install the source system yourself, without
  any help from me. From here on, I'll assume that its done.


  The first milestone in this little project is getting the kernel to
  boot up and panic because it can't find an init. This means we are
  going to have to install a kernel, and install lilo. To install lilo
  nicely though, we will need the device files in the target /dev
  directory. Lilo needs them to do the low level disk access necessary
  to write the boot sector.  MAKEDEV is the script that creates these
  device files.  (You can just copy them from the source system of
  course, but that's cheating!)  But first of all, we need a filesystem
  to put all of this into.



  13.2.  The Filesystem

  Our new system is going to live in a file system. So first, we have to
  make that file system using mke2fs. Then mount it somewhere. I'd
  suggest /mnt/target. In what follows, I'll assume that this is where
  it is.  You could save yourself a bit of time by putting an entry in
  /etc/fstab so that it mounts there automatically when the source
  system comes up.


  When we boot up the target system, the stuff that's now in /mnt/target
  will be in /.


  We need a directory structure on target. Have a look at the File
  Heirarchy Standard (see section ``Filesystem'') to work out what this
  should be, or just cd to where the target is mounted and blindly do



          mkdir bin boot dev etc home lib mnt root sbin tmp usr var
          cd var; mkdir lock log run spool
          cd ../usr; mkdir bin include lib local sbin share src
          cd share/; mkdir man; cd man
          mkdir man1 man2 man3 ... man9



  Since the FHS and most packages disagree about where man pages should
  go, we need a symlink



          cd ..; ln -s share/man man



  13.3.  MAKEDEV

  We will put the source code in the target /usr/src directory.  So for
  example, if your target file system is mounted on /mnt/target and your
  tarballs are in /root, you would do



          cd /mnt/target/usr/src
          tar -xzvf /root/MAKEDEV-2.5.tar.gz



  Don't be completely lame and copy the tarball to the place where you
  are going to extract it ;->


  Normally when you install software, you are installing it onto the
  system that is running. We don't want to do that though, we want to
  install it as though /mnt/target is the root filesystem. Different
  packages have different ways of letting you do this. For MAKEDEV you
  do


          ROOT=/mnt/target make install



  You need to look out for these options in the README and INSTALL files
  or by doing a ./configure --help.


  Have a look in MAKEDEV's Makefile to see what it does with the ROOT
  varible that we set in that command. Then have a look in the man page
  by doing man ./MAKEDEV.man to see how it works. You'll find that the
  way to make our device files is to cd /mnt/target/dev and do ./MAKEDEV
  generic.  Do an ls to see all the wonderful device files it has made
  for you.


  13.4.  Kernel

  Next we make a kernel. I presume you've done this before, so I'll be
  brief.  It is easier to install lilo if the kernel it is meant to boot
  is already there. Go back to the target usr/src directory, and unpack
  the linux kernel source there. Enter the linux source tree (cd linux)
  and configure the kernel using your favourite method, for example make
  menuconfig.  You can make life slightly easier for yourself by
  configuring a kernel without modules. If you configure any modules,
  then you will have to edit the Makefile, find INSTALL_MOD_PATH and set
  it to /mnt/target.


  Now you can make dep, make bzImage, and if you configured modules:
  make modules, make modules_install. Copy the kernel
  arch/i386/boot/bzImage and the system map System.map to the target
  boot directory /mnt/target/boot, and we are ready to install lilo.


  13.5.  Lilo

  Lilo comes with a neat script called QuickInst. Unpack the lilo source
  into the target source directory, run this script with the command
  ROOT=/mnt/target ./QuickInst. It will ask you questions about how you
  want lilo installed.


  Remember, since we have set ROOT, to the target partition, you tell it
  file names relative to that. So when it asks what kernel you want to
  boot by default, answer /boot/bzImage not /mnt/target/boot/bzImage.  I
  found a little bug in the script, so it said



          ./QuickInst: /boot/bzImage: no such file



  But if you just ignore it, it's ok.


  Where should we get QuickInst to put the boot sector?  When we reboot
  we want to have the choice of booting into the source system or the
  target system, or any other systems that are on this box.  And we want
  the instance of lilo that we are building now to load the kernel of
  our new system. How are we going achieve both of these things? Let's
  digress a little and look at how lilo boots DOS on a dual boot Linux
  system. The lilo.conf file on such a system probably looks something
  like this:



  prompt
  timeout = 50
  default = linux

  image = /boot/bzImage
          label  = linux
          root   = /dev/hda1
          read-only

  other = /dev/hda2
          label = dos



  If the machine is set up this way, then the master boot record gets
  read and loaded by the bios, and it loads the lilo bootloader, which
  gives a prompt.  If you type in dos at the prompt, lilo loads the boot
  sector from hda2, and it loads DOS.


  What we are going to do is just the same, except that the boot sector
  in hda2 is going to be another lilo boot sector - the one that
  QuickInst is going to install. So the lilo from the Linux distribution
  will load the lilo that we have built, and that will load the kernel
  that we have built.  You will see two lilo prompts when you reboot.


  To cut a long story short, when QuickInst asks you where to put the
  boot sector, tell it the device where your target filesystem is, eg.
  /dev/hda2.


  Now modify the lilo.conf on your source system, so it has a line like



  other = /dev/hda2
          label = target



  run lilo, and we should be able to do our first boot into the target
  system.


  13.6.  Glibc

  Next we want to install init, but like almost every program that runs
  under Linux, init uses library functions provided by the GNU C
  library, glibc. So we will install that first.


  Glibc is a very large and complicated package. It took 90 hours to
  build on my old 386sx/16 with 8M RAM. But it only took 33 minutes on
  my Celeron 433 with 64M. I think memory is the main issue here. If you
  only have 8M of RAM (or, shudder, less!) be prepared for a long build.


  The glibc install documentation recommends building in a separate
  directory.  This enables you to start again easily, by just blowing
  that directory away.  You might also want to do that to save yourself
  about 265M of disk space!


  Unpack the glibc-2.1.3.tar.gz (or whatever version) tarball into
  /mnt/target/usr/src as usual. Now, we need to unpack the ``add-ons''
  into glibc's directory. So cd glibc-2.1.3, and then unpack the glibc-
  crypt-2.1.3.tar.gz and glibc-linuxthreads-2.1.3.tar.gz tarballs there.


  Now we can create the build directory, configure, make and install
  glibc.  These are the commands I used, but read the documentation
  yourself and make sure you do what is best for your circumstances.
  Before you do though, you might want to do a df command to see how
  much free space you have. You can do another after you've built and
  installed glibc, to see what a space-hog it is.



          cd ..
          mkdir glibc-build
          ../glibc-2.1.3/configure --enable-add-ons --prefix=/usr
          make
          make install_root=/mnt/target install



  Notice that we have yet another way of telling a package where to
  install.


  13.7.  SysVinit

  Making and installing the SysVinit binaries is pretty straight
  forward.  I'll just be lazy and give you the commands, assuming that
  you have unpacked and entered the SysVinit source code directory:



   cd src
   make
   ROOT=/mnt/target make install



  There are also a lot of scripts associated with init.  There are
  example scripts with the SysVinit package, which work fine.  But you
  have to install them manually. They are set up in a heirarchy under
  debian/etc in the SysVinit source code tree. You can just copy them
  straight across into the target etc directory, with something like cd
  ../debian/etc; cp -r * /mnt/target/etc.  Obviously you will want to
  have a look before you copy them across!


  Everything is in place now for the target kernel to load up init when
  we reboot. The problem this time should be that the scripts won't run,
  becasue bash isn't there to interpret them. Also, init will try to run
  getty's, but there is no getty for it to run.  Reboot now and make
  sure there is nothing else wrong.


  13.8.  Ncurses

  The next thing we need is Bash, but bash needs ncurses, so we'll
  install it first. Ncurses replaces termcap as the way of handling text
  screens, but it can also provide backwards compatibility by supporting
  the termcap calls.  In the interests of having a clean simple modern
  system, I think its best to disable the old termcap method. You might
  strike trouble later on if you are compiling an older application that
  uses termcap.  But at least you will know what is using what. If you
  need to you can recompile ncurses with termcap support.


  The commands I used are



          ./configure --prefix=/usr --with-install-prefix=/mnt/target --with-shared --disable-termcap
          make
          make install



  13.9.  Bash

  It me took quite a lot of reading and thinking and trial and error to
  get Bash to install itself where I thought it should go. The
  configuration options I used are



   ./configure --prefix=/mnt/target/usr/local --exec-prefix=/mnt/target --with-curses



  Once you have made and installed Bash, you need to make a symlink like
  this cd /mnt/target/bin; ln -s bash sh. This is because scripts
  usually have a first line like this



  #!/bin/sh



  If you don't have the symlink, your scripts won't be able to run,
  because they will be looking for /bin/sh not /bin/bash.


  You could reboot again at this point if you like. You should notice
  that the scripts actually run this time, though you still can't login,
  because there are no getty or login programs.


  13.10.  Util-linux (getty and login)

  The util-linux package contains agetty and login. We need both of
  these to be able to log in and get a bash prompt. After it is
  instlalled, make a symlink from agetty to getty in the target /sbin
  directory. getty is one of the programs that is supposed to be there
  on all Unix-like systems, so the link is a better idea than hacking
  inittab to run agetty.


  I have one remaining problem with the compilation of util-linux. The
  package also contains the program more, and I have not been able to
  persuade the make process to have more link against the ncurses 5
  library on the target system rather than the ncurses 4 on the source
  system. I'll be having a closer look at that.


  You will also need a /etc/passwd file on the target system.  This is
  where the login program will check to find out if you are allowed in.
  Since this is only a toy system at this stage, we can do outrageous
  things like setting up only the root user, and not requiring any
  password!! Just put this in the target /etc/passwd



  root::0:0:root:/root:/bin/bash



  The fields are separated by colons, and from left to right they are
  user id, password (encrypted), user number, group number, user's name,
  home directory and default shell.


  13.11.  Sh-utils

  The last package we need is GNU sh-utils. The only program we need
  from here at this stage is stty, which is used in /etc/init.d/rc which
  is used to change runlevels, and to enter the initial runlevel.  I
  actually have, and used a package that contains only stty, but I can't
  remember where it came from. Its a better idea to use the GNU package,
  because there is other stuff in there that you will need if you add to
  the system to make it useable.


  Well that's it. You should now have a system that will boot up and
  prompt you for a login. Type in ``root'', and you should get a shell.
  You won't be able to do much with it. There isn't even an ls command
  here for you to see your handiwork. Press tab twice so you can see the
  available commands. This was about the most satisfying thing I found
  to do with it.


  13.12.  Towards Useability

  It might look like we have made a pretty useless system here. But
  really, there isn't that far to go before it can do some work. One of
  the first things you would have to do is have the root filesystem
  mount read-write.  There is a script from the SysVinit package, in
  /etc/init.d/mountall.sh which does this, and issues a mount -a so that
  everything gets mounted the way you specify in /etc/fstab. Put a
  symlink called something like S05mountall to it in the target's
  etc/rc2.d.


  You may find that this script will use commands that you haven't
  installed yet. If so, find the package that contains the commands and
  install it. See section ``Random Tips'' for clues on how to find
  packages.


  Look at the other scripts in /etc/init.d. Most of them will need to be
  included in any serious system. Add them in one at a time, make sure
  everthing is running smoothly before adding more.


  Check the File Heirarchy Standard (see section ``Filesystem'').  It
  has lists of the commands that should be in /bin and /sbin. Make sure
  that you have all these commands installed.  Even better, find the
  Posix documentation that specifies this stuff.

  >From there, it's really just a matter of throwing in more and more
  packages until everything you want it there. The sooner you can put
  the build tools such as gcc and make in the better. Once that is done,
  you can use the target system to build itself, which is much less
  complicated.


  13.13.  Random Tips

  If you have a command called thingy on a Linux system with RPM, and
  want a clue about where to get the source from, you can use the
  command:


          rpm -qif `which thingy`



  And if you have a Red Hat source CD, you can install the source code
  using


          rpm -i /mnt/cdrom/SRPMS/what.it.just.said-1.2.srpm



  This will put the tarball, and any Red Hat patches into
  /usr/src/redhat/SOURCES.


  13.14.  More Information


    There is a mini-howto on building software from source, the
     Software Building mini-HOWTO
     <http://www.linuxdoc.org/HOWTO/Software-Building.html>.

    There is also a HOWTO on building a Linux system from scratch.  It
     focuses much more on getting the system built so it can be used,
     rather than just doing it as a learning exercise.  The Linux From
     Scratch HOWTO <http://www.linuxfromscratch.org>


  14.  Conclusion

  One of the best things about Linux, in my humble opinion, is that you
  can get inside it and really find out how it all works. I hope that
  you enjoy this as much as I do. And I hope that this little note has
  helped you do it.


  15.  Administrivia

  15.1.  Copyright

  This document is copyright (c) 1999, 2000 Greg O'Keefe. You are
  welcome to use, copy, distribute or modify it, without charge, under
  the terms of the GNU General Public Licence
  <http://www.gnu.org/copyleft/gpl.html>.  Please acknowledge me if you
  use all or part of this in another document.



  15.2.  Homepage

  The lastest version of this document lives at From Powerup To Bash
  Prompt <http://learning.taslug.org.au/power2bash>



  15.3.  Feedback

  I would like to hear any comments, criticisms and suggestions for
  improvement that you have. Please send them to me Greg O'Keefe
  <mailto:gcokeefe@postoffice.utas.edu.au>



  15.4.  Acknowledgements

  Product names are trademarks of the respective holders, and are hereby
  considered properly acknowledged.


  There are some people I want to say thanks to, for helping to make
  this happen.



     Everyone on the learning@TasLUG mailing list
        Thanks for reading all my mails and asking interesting
        questions.  You can join this list by sending a message to
        majordomo <mailto:majordomo@taslug.org.au> with

                subscribe learning


     in the message body.



     Michael Emery
        For reminding me about Unios.

     Tim Little
        For some good clues about /etc/passwd

     sPaKr on #linux in efnet
        Who sussed out that syslogd needs /etc/services, and introduced
        me to the phrase ``rolling your own'' to describe building a
        system from source code.

     Alex Aitkin
        For bringing Vico and his ``verum ipsum factum'' (understanding
        arises through making) to my attention.

     Dennis Scott
        For correcting my hexidecimal arithmetic.

     jdd
        For pointing out some typos.

     David Leadbeater
        For contributing some ``ramblings'' about the kernel deamons.



  15.5.  Change History

  15.5.1.  0.6 -> 0.7


    more emphasis on explanation, less on how to build a system,
     building info gathered together in a separate section and the
     system built is trimmed down, direct readers to Gerard Beekmans'
     ``Linux From Scratch'' doc for serious building

    added some ramblings contributed by David Leadbeater

    fixed a couple of url's, added link to unios download at
     learning.taslug.org.au/resources

    tested and fixed url's

    generally rewrite, tidy up


  15.5.2.  0.5 -> 0.6


    added change history

    added some todos


  15.6.  TODO


    explain kernel modules, depmod, modprobe, insmod and all that (I'll
     have to find out first!)

    mention the /proc filesystem, potential for exercises here

    convert to docbook sgml

    add more exercises, perhaps a whole section on larger exercises,
     like creating a minimal system file by file from a distro install.



  Ftape-HOWTO
  Claus-Justus Heine, <heine@math1.rwth-aachen.de>
  v3.0, August 1998

  This HOWTO discusses essential do's and dont's for the ftape floppy
  tape driver under Linux. It focusses on the newest version which is
  ftape-4.02 at the time of this writing. This HOWTO is to be intended
  as first step help and source of information.  The ftape driver inter-
  faces to QIC-40, QIC-80, QIC-3010 and QIC-3020 compatible drives, and
  to the Iomega Ditto 2GB and Ditto Max drives.  The QIC-3010 and
  QIC-3020 standards are also known as `Travan' (TR-2 and TR-3).  These
  drives connect via the floppy disk controller (FDC) which may be
  either an internal FDC or inside of certain parallel port floppy tape
  drives. Please refer to the section ``Supported drives'' for further
  information.  ftape does not cover SCSI or QIC-02 tape drives.  DAT
  tape drives usually (always?) connect to a SCSI controller.  This is
  but one of the Linux HOWTO documents.  You can get an index of the
  HOWTOs from the Linux HOWTO index, while the real HOWTO's can be
  fetched (using ftp) from sunsite.unc.edu:pub/Linux/doc/HOWTO (this is
  the ``official'' place) or via the World Wide Web from the Linux Docu-
  mentation Project home page.
  ______________________________________________________________________

  Table of Contents



  1. Legalese

  2. Revision History

  3. The preliminaries

     3.1 Other sources of information
     3.2 Contacts
     3.3 What is

  4. Getting and installing

     4.1 Getting
     4.2 Differences between
     4.3 Installing the driver with v2.0.x and earlier kernels
     4.4 Installing the driver with v2.1.x and later kernels
     4.5 Following the development of the
     4.6 Mixing

  5. The Care and Feeding of Tape and Tape Drives

     5.1 Formatting
        5.1.1 Can I format my tapes under Linux?
        5.1.2 Which formatting programs can I use under DOS?
     5.2 Retensioning
     5.3 Drive Cleaning
     5.4 Repairing de-spooled cartridges

  6. Hardware support

     6.1 Supported tape drives
     6.2 Supported special controllers
        6.2.1 Colorado FC-10, FC-20
        6.2.2 Mountain MACH-2
        6.2.3 Iomega Tape Accelerator II
        6.2.4 Iomega Ditto Dash and other 2Mbps controllers
        6.2.5 Iomega Ditto EZ PnP controller
     6.3 Unsupported tape drives
     6.4 Using an external tape drive with
     6.5 PCI motherboards and

  7. Backing up and restoring data

     7.1 Writing an archive to a tape
     7.2 Restoring an archive
     7.3 Testing the archive
     7.4 Putting more than one backup on a tape
     7.5 Appending files to an archive
     7.6 Mount/unmounting tapes

  8. Creating an emergency boot floppy for

  9. Frequently Asked Questions

  10. FAQ: "Compiling and installing Ftape" related questions !

     10.1 What Ftape version should I use?
     10.2 I'm having problems getting my XYZ drive to run under the 2.0.xx kernel with the built-in driver.  How do I fix this?
     10.3 I'm running Linux/SMP and the system just freezes when trying to access the Ftape devices!
     10.4 Why does depmod complain about "undefined symbols"?
     10.5 "insmod" says the kernel version is wrong
     10.6 "insmod" says that kernel 1.2.0 and 1.2.0 differ
     10.7 Trying to compile Ftape gives me the error "modversions.h: no such file or directory"
     10.8 What is this versioned symbols stuff anyway?
     10.9 I seem to be getting sftape instead of zftape. When I run "ftmt status" command, I get output that the Ftape docs says corresponds to sftape ( /dev/qft0: Invalid argument ). Why?
     10.10 My Ditto DASH/FC-20/Exabyte Accelerator card works under Microsoft Windows, but I get a drive not found type of error in /var/log/messages when trying to use it under Linux.
     10.11 Ftape DMA transfers gives ECC errors
     10.12 Help! I'm getting 'dmaalloc() failed' in my syslog file.
     10.13 Syslogd works overtime when running Ftape
     10.14 How do I change the trace-level?
     10.15 I'm having problems with Ftape.  I'm using the latest version of Ftape from the Ftape Home Page and believe that I've located a real bug. What should I do?

  11. FAQ: "Using Ftape" related questions !

     11.1 How fast is Ftape ?
     11.2 When I write to some of my tapes, they seem to spend a lot of time "shoe-shining," or repositioning instead of streaming.  Is something wrong with my system?
     11.3 Do I have to reboot to the DOS world to format tapes?
     11.4 Is it possibly to format Ditto 2GB tapes with ftape?
     11.5 Is it possibly to format Ditto Max or Max Pro tapes with ftape?
     11.6 Ftape detects more bad sectors than DOS on QIC-3020 tapes
     11.7 Is it ok that I'm not hearing the tape move when I do a fsf or a bsf with mt?
     11.8 Why does my XYZ backup program complain about "Invalid argument" errors?
     11.9 I/O errors and FDC - some explanations.
     11.10 Why do I get "/dev/qft0: No such device" errors?
     11.11 I get "device busy" when I make multiple backups on a tape using some script.
     11.12 How do I "..." with tar?
     11.13 What block-size should I use with tar ?
     11.14 Where can I find the tar/mt/cpio/dd binaries - sources - manpages?
     11.15 If I use tapers compression, is it a bad idea to use the compression with zftape, or would it be better to not use tapers compression, and let zftape do it?
     11.16 How does zftape compression compare to say gzip -9?
     11.17 I don't trust compression, but hear that the sftape interface is going away. What should I do?
     11.18 Ftape says "This tape has no 'Linux raw format"
     11.19 Can I exchange tapes with someone using DOS?
     11.20 How does `mt eom' work when you've started overwriting a tape in the middle?
     11.21 When I made backups before using taper, under the 2.0.29 ftape my drive didn't support fsf, under the new zftape it does, why would this be, and what exactly is fsf ?
     11.22 What exactly is the difference between ftape, and zftape?
     11.23 What is the difference between a rewinding, and non rewinding drive?
     11.24 Can someone tell me how to use mt to rewind my TR-3 drive one record using zftape record, so I can verify it?
     11.25 By non-rewinding, they mean that it doesn't automatically rewind, correct? It doesn't mean that under no circumstances it will rewind, right?  I tried using /dev/zqft0, and it instantly rewinds the tape.
     11.26 What is the difference between what mt considers a record and what it considers a file?
     11.27 Reusing tapes with zftape without reformatting the tape.
     11.28 This script implements a simple contents listing for the zftape package using the "MTIOCVOLINFO" ioctl.

  12. FAQ: "Tape and Drivers" related questions !

     12.1 What are good makers of Travan tapes?
     12.2 Where can I obtain the QIC standards?
     12.3 Is the Iomega Ditto 2GB drive supported?
     12.4 Is the Iomega Ditto Max drive supported?
     12.5 Is the Iomega Ditto Max Pro drive supported?

  13. FAQ: Miscellaneous !

     13.1 How to subscribe to the Ftape Mailing List?
     13.2 How to un-subscribe from the Ftape Mailing List?
     13.3 Links to related information.

  14. Debugging the

     14.1 The kernel/
     14.2 OK, it's a bug ...ehhh... feature - How do I submit a report?

  15. Contributions



  ______________________________________________________________________

  1.  Legalese



  The Linux ftape-HOWTO may be reproduced and distributed in whole or in
  part, subject to the following conditions:



       Copyright (c) 1993-1996 by Kai Harrekilde-Petersen
       Email: khp@dolphinics.no

       Copyright (c) 1996-1997 by Kevin Johnson
       Email: kjj@pobox.com

       Copyright (c) 1998 by Claus-Justus Heine
       Email: heine@math1.rwth-aachen.de



  The Linux ftape-HOWTO is a free document; you may reproduce and/or
  modify it under the terms of version 2 (or, at your option, any later
  version) of the GNU General Public License as published by the Free
  Software Foundation.

  This HOWTO is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  The author encourages wide distribution of this document for personal
  or commercial use, provided that the above copyright notice remains
  intact and the provisions of the GNU General Public License are
  adhered to.  The summary is that you may copy and distribute this
  document free of charge, or for a profit.  No explicit permission is
  required from the author for reproduction of this document in any
  medium, physical or electronic.

  Note that derivative works and translations of this document must be
  placed under the GNU General Public License, and the original
  copyright notice must remain intact.  If you have contributed new
  material to this document, you must make the source code (e.g., SGML
  source) available for your revisions.  Please make revisions and
  updates available directly to the author: Contact heine@math1.rwth-
  aachen.de via Internet e-mail.  This will allow the author to merge
  updates and provide consistent revisions to the Linux community.

  The author encourages distributors of Linux software in any medium to
  use the HOWTO as an installation and user guide.  Given the copyright
  above, you are free to print and distribute copies of this document
  with your software.  If doing so, you may wish to include a short
  ``installation supplement'' for your release, or modify the relevant
  sections of this book to reflect your product.

  The author would like to know of any plans to publish and distribute
  this HOWTO commercially.  In this way, we can ensure that you are kept
  up-to-date with new revisions.  And, should a new version be right
  around the corner, you might wish to delay your publication of the
  HOWTO until it is available.

  If you are distributing this HOWTO commercially, donations, royalties,
  and/or printed copies are greatly appreciated by the author.
  Contributing in this way shows your support for free software and the
  Linux Documentation Project.

  If you have questions or comments, please contact the author at

  heine@math1.rwth-aachen.de

  2.  Revision History



     version 3.0 (August, 1998)

     o  Additions to list of supported hardware.

     o  New section about differences between ftape versions.

     o  Pointers to the Ftape-FAQ and the Ftape manual.

     o  Updated to ftape-4.02.

     o  Additions to the FAQ.

     o  Update all URLs.

     version 2.0 (March 15, 1997)

     o  Updated to ftape v2.11 and v3.xx

     o  Lots of updates.

     version 1.9 (September 20, 1996)

     o  New maintainers of ftape and the HOWTO.

     o  A few minor formatting and spelling fixes.

     o  Updated for Linux v2.0.

     o  Started to integrate some of Andrew Martin's ftape info.


     version 1.8 (May 22, 1996)

     o  Copyright policy changed to GNU GPL v2

     o  The maintainer's email address has changed.

     o  Updated to ftape-2.08

     o  ftape is now a part of the kernel distribution.

     version 1.7.1 (February 13, 1996)

     o  Updated to ftape-2.06b

     version 1.7 (January 28, 1996)

     o  Updated to ftape-2.06 and modules-1.3.57

     version 1.6.2 (January 23, 1996)

     o  Connor TST3200R drive added

     o  Updated 2Mbps fdc information.

     version 1.6.1 (January 16, 1996)

     o  minor corrections

     version 1.6 (January 10, 1996)


     o  New maintainer of ftape

     o  updated to v2.05

     o  added new drives



  3.  The preliminaries



  3.1.  Other sources of information



     ftape version 3
        ftape-3.x came with a manual of its own, which is contained in
        the ftape-3.04d package available from the usual places.  See
        ``Getting Ftape''.


     ftape version 4
        ftape-4.x also has a documentation package ftape-doc which is
        available from the usual places. This Ftape-HOWTO, however, also
        focusses on ftape-4.x and is meant as an entry point to the
        available documentation. See ``Getting Ftape''.


     ftape-tools
        The ftape-tools package (including useful utilities for ftape)
        comes with its own manual.  See ``Getting Ftape''.


     Ftape-FAQ
        The Ftape-FAQ is included wordly in this manual, but more recent
        versions may be found at http://www.correct.nl/~ftape.



  3.2.  Contacts


  The maintainer of the source for ftape is Claus Heine
  <heine@math1.rwth-aachen.de>.  He has a web page at http://www-
  math.math.rwth-aachen.de/~LBFM/claus/ftape/.

  If you have a problem or questions about ftape, try posting to the
  Linux Tape mailing list linux-tape@vger.rutger.edu (see ``Following
  the ftape development'' below).  There also used to be a newsgroup
  that mirrored the mailing list traffic but it has vanished some time
  ago.

  I use ftape (it is my sole means of backing up on my linux box :-).  I
  hesitate to make recommendations on what hardware to buy.  See the
  section ``Supported drives'' and ``Unsupported drives'' for a list of
  supported and unsupported drives.

  You should try to post a summary of your problems and its solution(s),
  after you've got it working, even if you only got it partially
  working. Please also send a copy copy of your solution to the Linux
  Tape mailing list at <linux-tape@vger.rutgers.edu> so that it can be
  added to the HOWTO and/or the FAQ.

  If you receive this as part of a printed distribution or on a CD-ROM,
  please check out the Linux Documentation home page or ftp to
  ftp://sunsite.unc.edu:/pub/Linux/doc/HOWTO to see if there exists a
  more recent version.  This could potentially save you a lot of
  trouble.

  If you email me, please include the string ftape in the subject line.
  This will help ensure the mail doesn't inadvertently get buried. But
  preferrably you should email to the Linux Tape mailing list at <linux-
  tape@vger.rutgers.edu> instead of contacting me directly.



  3.3.  What is ftape


  ftape is a driver program that controls various low-cost tape drives
  that connect to the floppy controller.

  ftape is not a backup program as such; it is a device driver, which
  allows you to use the tape drive (just like the SoundBlaster 16 driver
  let you use your sound card) through the device files
  /dev/[n]qft[0-3].

  ftape was originally written by Bas Laarhoven <bas@vimec.nl>, with ``a
  little help from his friends'' to sort out the ECC (Error Correcting
  Code) stuff. ftape is copyrighted by Bas under the GNU General Public
  License, which basically says: ``go ahead and share this with the
  world, just don't disallow other people from copying it further''.

  ftape has undergone several changes since then. While the Linux-2.0.x
  kernel series still contains ftape-2.08 the v2.1.x and soon the v2.2.*
  kernel series come with ftape-3.x (hopefully even with ftape-4.02, but
  this wasn't clear at the time of this writing) which differs in some
  points from the ftape-2.x driver.  Since version 3.00 the ftape driver
  has been maintained by me (Claus-Justus Heine); it has been changed
  and improved in several respects and support for new hardware has been
  added.

  ftape is quite stable, and has been that for some time now.  It is
  reliable enough for critical backups (but it's always a good idea to
  check your backups, so you won't get a nasty surprise some day).

  ftape supports drives that conform to the QIC-117 and one of the
  QIC-80, QIC-40, QIC-3010, and QIC-3020 standards as well as the Iomega
  Ditto 2GB and Ditto Max drives which no longer strictly conform to the
  QIC standards in all respects.

  ftape can drive floppy tape drives that connect to the internal FDC as
  well as certain parallel port floppy tape drives.

  ftape supports neither QIC-02, IDE (ATAPI), nor SCSI tape drives.
  SCSI drives are accessed as /dev/[n]st[0-7] and are supported by the
  kernel through the SCSI drivers.  If you look for help on SCSI tape
  drives, you should read the SCSI-howto.  ATAPI tape drives are
  supported by the kernel since 1.3.46.  See section ``Supported
  drives'' and ``Unsupported drives'' for a list of supported and
  unsupported drives.



  4.  Getting and installing ftape



  4.1.  Getting ftape


  The v2.0.x versions of the kernel include version 2.08 of ftape I
  recommend, however, that you grab the latest version of the full
  source code package for ftape. It is a newer version, includes files
  that are not included in the kernel v2.0.X distribution, and includes
  much better documentation about how to install ftape.  The v2.1.x and
  later versions of the kernel include the version 3.04 of ftape.


  I recommend that you download the latest stable version of ftape which
  is 4.02 at the time of this writing and is available from

  http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape/archives.html

  as well as from

  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/.

  You probably should also grab the ftape-doc and the ftape-tools
  package that are available from the same locations.

  If you still want to use the ftape-2.08 which is shipped with the
  v2.0.x kernels, then you get a version of the driver which is really
  out of date and doesn't support QIC-3020 tapes at 2Mbps correctly,
  neither does it support the Ditto 2GB drives nor the Ditto Max drives
  nor any kind of parallel port tape drive. The section ``Supported
  drives'' gives detailed information about which version of the ftape
  driver supports which hardware.


  4.2.  Differences between ftape-2.x , ftape-3.x  and ftape-4.x  ver-
  sions


  ftape-3.x and ftape-4.x use the file system interface that was
  implemented for a branch release which was called zftape. Actually,
  the module that implements the VFS (Virtual File System) interface of
  ftape-3.x and ftape-4.x still is called zftape.o and its C-sources
  inside the kernel tree reside in
  [/usr/src/linux/]drivers/char/ftape/zftape/.

  ftape-2.x (i.e. the version still contained in the v2.0.x kernel) uses
  another file system interface, that was implemented by ftape's
  original author Bas Larhoven.


     File Marks
        The conceptional difference between ftape-2.x and later versions
        of ftape is the way file marks are implemented.

        Floppy tape devices don't have real file marks. (--  File marks
        are used to distinguish different backup sets if you write
        multiple backup sets to a tape. SCSI and QIC-150 tapes have real
        file marks, i.e. between two different backup sets there is a
        region on the tape that is written special data to so that the
        drive logic can detect that marker when the tape is wound with
        (possibly) high speed over those file marks.--) Because the goal
        of ftape's file system interface was from the beginning on to
        provide an interface that could be used with standard Unix-like
        tape utilities (i.e. mt) the developers of ftape started to
        emulate file marks by storing the positions on the tape where a
        file mark should be located in certain fields of the header
        segments. (-- header segments refers to a region at the
        beginning of the tape sized two times 29k to hold some important
        information about the tape format and size and some status
        information.--)

        However, the QIC standards already designate a special region to
        store such information in, the so called volume table segment.
        Since ftape-3.x this volume table segment is used instead of
        using unused data fields in the header segment. As a result it
        is possible to use your tape cartridge with different operating
        systems in the sense that your Win or DOS backup program will
        realize that certain regions of the tape cartridge are already
        occupied with data, and ftape-3.x and later will detect the
        regions used by those DOS and Win programs. However, you can't
        extract a DOS backup set under Linux or extract a volume written
        by ftape under DOS, safe you write your own software to do that.


     IOCTL interface
        There are certain differences in the IOCTL (-- This IO control
        interface is used by e.g. mt to rewind the tape or skip to the
        next file mark or do any other tape operation.--)

        interface between ftape-2.x and ftape-3.x and later. A detailed
        description can be found in the ftape-manual contained in the
        ftape-doc package.  See ``Getting Ftape''.


     Formatting
        Formatting of cartridges is supported with ftape-3.x and later
        only. Please get the ftape-tools package that contains the
        ftformat program that interfaces to the driver to format
        cartridges.  See ``Getting Ftape''. The ftape-tools package
        comes with (more or less) detailed documentation, so the case of
        formatting cartridges is not dealt with in this document.


     Compression
        ftape-3.x supported user transparent on-the-fly compression in
        software. This feature (or bug) has vanished in ftape-4.x as it
        made further improvements concerning the realiability of backups
        very very hard. This means, ftape-4.x comes without compression
        support.

        However de-compression of compressed archives produced with
        ftape-3.x is supported in order not to brake existing backup
        programs where a user-level filter would not suffice to preserve
        compatibility. Think, e.g., of taper which calls the MTIOC
        ioctls itself instead of relying on the mt program to perform
        tape operations.


  The ftape-manual contained in the ftape-doc package contains much more
  detailed information about ftape`s file system interface as well as
  implementation notes which by far exceed the scope of this HOWTO. See
  ``Getting Ftape'' for informations about where to obtain the manual.



  4.3.  Installing the driver with v2.0.x and earlier kernels


  The following section provides some useful information to get you
  going with the installation of v4.x which is not shipped with the
  kernel source tree yet but has to be downloaded separately, see the
  section ``Getting ftape'' above.

  Once you've downloaded the source code (probably ftape-4.02-tar.gz),
  untar it.  You can do this by determining what directory you want the
  source code to be located in.  I recommend /usr/src/ or ~/src.  When
  the tar file is extracted, it will dump everything into a ftape-4.02
  subdirectory, so that you'll end up, in the example I've given, with
  something like /usr/src/ftape-4.02 or ~/src/ftape-4.02.

  NOTE: you cannot compile ftape-4.02 into your v2.0.x kernel. Instead,
  configure your kernel to not compile the ftape driver and follow the
  installation instructions in the ftape-4.02 distribution and install
  ftape-4.02 as a module.

  Read the README file.  The README is required reading.  It's the top
  of the tree, so to speak.  If there are specific files that the README
  tells you to read then read them.  It will make the process much less
  complicated.

  Do NOT proceed with compiling the package until you have read the
  appropriate README files and the INSTALL file.

  Afterwards you need to edit the MCONFIG file and configure you package
  according to your hardware. The MCONFIG file contains lots of
  explanations so it should be fairly easy to go along with it.

  However, most of the hardware configuration can be done via setting
  parameters during module load time so most parameters specified in the
  file MCONFIG simply give the default configuration, but you don't need
  to recompile the driver to change IO addresses or interrupt settings.
  The file INSTALL and the file modules/insert contain examples how to
  specify the proper module parameters when loading the kernel modules,
  so I won't go into further detail here.

  If you are using a Linux-v1.3.x kernel, you should consider moving to
  v2.0.x.  v1.3.x was the development release prior to the production
  release v2.0.x.



  4.4.  Installing the driver with v2.1.x and later kernels


  (* Maybe ftape-4.02 will be included into the v2.2.x kernel, but this
  isn't clear at the time of this writing. This HOWTO will be revised
  appropriately when this has become clear. So long you have to refer to
  the previous section ``Installing the driver with v2.0.x and earlier
  kernels'' and disregard the contents of this section.  *)


  The Linux kernel v2.1.x and later already include ftape-4.x so you
  don't need to download the ftape-4.x kernel driver package.

  ftape-4.x as included in the v2.1.x versions of the kernel can be
  completely configured using the kernel configuration menus (either
  with make menuconfig or make xconfig. Also, there is online help
  available that documents each parameter setting which I won't repeat
  here.

  The various boot- and loadtime parameter settings are explained in the
  file

  [/usr/src/linux/]Documentation/ftape.txt

  of the Linux-v2.1.x and later kernel distributions.



  4.5.  Following the development of the ftape  driver


  If you want to follow the development of the ftape driver, you should
  subscribe to the Linux Tape mailing list linux-tape@vger.rutgers.edu.
  To do so you need to send an email saying `subscribe linux-tape' (in
  the body) to majordomo@vger.rutgers.edu.  When you subscribe, you will
  be sent a greeting mail, which will tell you how to submit real mails
  and how to get off the list again. Store this email in a safe place.
  Please.

  Please note that I do not, repeat DO NOT, have any special powers with
  regard to this mailing list.  If you're stuck on the list, don't
  bother to tell me that.  I can only shrug and send you my sympathy
  (but that won't get you off the list).



  4.6.  Mixing ftape  and floppies


  If you use your floppy tape drive with the standard FDC then the
  floppy drive and the floppy tape drive cannot run concurrently as they
  share the same hardware, the FDC, and the floppy and the ftape driver
  do not talk to each other.  Thus, if you have mounted a floppy and
  then try to access the tape drive, ftape will complain that it cannot
  grab IRQ6 and then die.  This is especially a problem when designing a
  emergency disk for use with ftape.  This solution is to either load
  the boot/root disk into a ramdisk and then unmount the floppy, or have
  two floppy drive controllers.



  5.  The Care and Feeding of Tape and Tape Drives



  5.1.  Formatting


  Before a tape can be used, it must be formatted.  The formatting
  process lays out sector information onto the tape.  Other tape
  interfaces don't typically require formatting.  The reason floppy
  tapes do is that they need to look like a floppy (kinda gross, but
  what the hey - it works :-).



  5.1.1.  Can I format my tapes under Linux?


  Yes, you can, if you use ftape-3.04d or above. To format a floppy tape
  cartridge you need a user level tool called ftformat as well which is
  contained in the ftape-tools distribution (see section ``Getting
  ftape'').

  The ftape-tools package comes with its own manual, so I do not need to
  repeat here how to use ftformat.


  5.1.2.  Which formatting programs can I use under DOS?



  The following are known to work:


  o  Colorado Memory System's software (tape.exe)

  o  Conner Backup Basics v1.1 and all Windows versions

  o  Norton Backup

  o  QICstream version 2

  o  Tallgrass FileSecure v1.52

  o  Escom Powerstream 3.0 (qs3.exe -- QICstream v3?)

  These programs are known to be more or less buggy:


  o  Conner Backup Basics 1.0

  o  Colorado Windows tape program

  o  CP Backup (wastes tape space, but is OK apart from that)

  As a general rule, most software under DOS should work.  The Conner
  Backup Basics v1.0 has a parameter off by one (someone could not read
  the QIC-80 specs right!), which is corrected in version 1.1.  However,
  ftape detects this, and will work around it.  Dennis T. Flaherty
  (<dennisf@denix.elk.miles.com>) report that Conner C250MQ owners can
  obtain the new v1.1, by calling Conner at 1-800-4Conner (in the US)
  and ask for an upgrade (for a nominal fee for the floppy).  The
  Windows versions should work fine.  Some versions of Colorado's tape
  program for windows, has an off-by-one error in the number of
  segments. ftape also detect and work around that bug.

  Central Point Backup can be used, but it wastes precious tape space
  when it encounters a bad spot on the tape.

  NOTE: If you are running a formatting software under DOS, which is not
  mentioned here, please mail the relevant info to me
  (<heine@math1.rwth-aachen.de>), so I can update the list.



  5.2.  Retensioning


  QIC tapes are particularly sensitive to tape stretch.  The reason is
  that floppy tapes are pre-formatted with sector information, whereas
  other tape types have their sync information written as the data is
  written to the tape.  If the floppy tape stretches and the sync fields
  get out of sync the result will be read errors.  The problem is worse
  with longer tapes.

  It is a good idea to retension new tapes a few times before using them
  and before formatting them.  You should also try retensioning the tape
  if you are start getting read errors.  It might also be a good idea
  retension the tape before a backup.


  5.3.  Drive Cleaning


  The coating on the tape is an oxide compound.  As the tape is dragged
  across the tape head it has a tendency to leave tiny amounts of
  residue on the head.  You should periodically use a tape cleaner -
  following the specs for the drive in question.  Tape cleaners should
  be available from any distributer of tapes.

  One more additional note about tape cleaning.  You might want to clean
  the drive after the first use of a brand new tape.  A brand new tape
  will typically leave quite a bit of residue the first time it's used.

  Thanks to Neal Friedman for the explanation and suggestion that this
  information be included in the HOWTO.


  5.4.  Repairing de-spooled cartridges


  In rare occasions it can happen that the tape drive doesn't detect the
  EOT (End Of Tape) markers correctly. These markers are simply holes in
  the tape which are detected by the tape drive with means of a little
  photo-transistor (or the like).

  The manual of your tape drive will probably give you proper hints how
  to clean those EOT detectors.

  However, if the EOT detection fails, then the tape drive despooles the
  cartridge because the tape isn't glued to the wheels, but hold by
  friction only.

  There are detailed instructions how to fix such a despooled tape at
  the Iomega WWW pages at

  http://www.iomega.com/support/techs/ditto/3006.html

  and at the Hewlett Packard WWW pages at

  http://www.hp.com/isgsupport/cms/docs/lpg12020.html

  If the pages shouldn't be in the exact locations as given above, then
  please try to browse a little bit through the web pages of HP or
  Iomega until you find the needed information.



  6.  Hardware support



  6.1.  Supported tape drives


  All drives that are both QIC-117 compatible and one of the QIC-40, 80,
  3010, and 3020 standards should work.  QIC-WIDE and Travan drives are
  also supported (TR-1 is just QIC-80 with 8mm tapes, while TR-2 and
  TR-3 is a.k.a QIC-3010 and 3020 respectively). Iomega Ditto 2GB and
  Ditto Max drives are supported, too, though they no longer conform to
  the QIC standards in every respect. Some parallel port tape drives are
  supported as well.

  Some of the comments given below about possible problems with certain
  tape drives are very old, and I don't have access to all of the
  hardware, so I couldn't check everything.

  Some of the reports below have been commented by me
  (<heine@math1.rwth-aachen.de>) like this:


       This is a comment.

  Currently, the list of drives that are known to work with ftape is:


     Alloy Retriever 250


     Archive 5580i, XL9250i


     Colorado DJ-10, DJ-20 (aka: Jumbo 120, Jumbo 250)


     Colorado 1400
        <kosowsky@bellini.harvard.edu> reported a problem doing a 1G
        backup using taper.


     Colorado Trakker parallel port tape drive

        Support added by Jochen Hoenicke
        <Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE>.


     HP Colorado T1000

          The problem reports are probably totally out-dated. In
          particular, the zftape the people talk about doesn't
          exist any more, and the ftape driver is the very
          ftape-2.08.


     Works with 3M Travan 400M (TR-1) tapes with 120M tapes.  Also
     reported that mt dies, but with backups using tar it works ok.
     With cpio, ftape is recommended rather than zftape.
     (<millner@millner.bevc.blacksburg.va.us>)

     Problems have been reported with the drive continually stopping and
     starting with zftape (<75104.1756@compuserve.com>).  This appears
     to be a problem with the tape going too fast for the computer; the
     DMA buffers are getting flushed before getting filled again.  Newer
     versions of zftape don't do this any more is a suitably fast backup
     program or large DMA buffers are used
     (<millner@millner.bevc.blacksburg.va.us>).


     Conner C250MQ(T)
        The 250Q is reported to generate write error and frequent
        repositioning. (Frank Stuess at Nacamar Data Communications)


          Write errors need not be caused by the tape drive, but
          also by bad tape cartridges. Frequent repositioning can
          be caused by bad cartridges, too, but can also be caused
          by overrun errors which would indicate that the FDC and
          DMA controller have problems to talk to each other.



     Conner TSM420R, TSM850R
        The 400 and 800 models only work with TR-1 tapes.


          I don't know whether it was meant that named drives
          doesn't work with ordinary 120MB DC-2120 cartridges, or
          that TR-3 tapes can't be read. The tape drives weren't
          designed for the latter. So what.
     Conner TST3200R
        Works with TR-3 tapes at 1Mbps (ie. 1600M capacity only).  Wirks
        with QIC-WIDE 400M tapes (Sony 5122's?)  (<chris@cs.wmich.edu>).
        Works with TR3, QIC-3010, and QIC-3020 tapes.  Comes with a 2MB
        FDC which the Promise 2300+ 1Mbps controller works
        (<kjh@pollux.usc.edu>).

        Reported that the floppy disk can no longer read low-density
        floppies.  May have to fiddle with IRQ/ports/dma channels
        (<chris@yakkocs.wmich.edu>).


          The TST3200R works well with ftape.



     Conner TST800R
        The TST800R works with TR-1, Sony QW5122F (210M) and DC2120
        tapes.


          Works well with ftape since ftape-2.07 at least. Used it
          myself until the drive died with a melted transistor.
          Probably caused by over-heating it previously.



     Conner CTT3200

        The CTT3200 is supposedly identical to the Iomega Ditto 3200.
        It works with the supplied 2Mbps controller, but reported not to
        work under DOS on some machines. (<jmorris@dtx.net>)


     Conner 1.7G Tapestor (TSM1700R)

        Works with QIC-WIDE tapes (<pschmidt@slip.net>).  Partially
        works with QIS-3200.  Using the HSC-2 controller, the DMA
        channel needs to be changed (incremented by 1, channel2?, Modify
        the Makefile).  You then need to modify the ftape Makefile to
        reflect this change.  However, ftape seems to be a bit flaky
        with this (no version number supplied) (<ttait@tiac.net>).  It
        may not work at 2Mbps (QIC-3020) with the HSC controller.  The
        tape died with a messages like "dumb tape stop" and has since
        been unreliable (<ttait@tiac.net>).


          No recent informations available



     Escom or Archive (Hornet) 31250Q


     Exabyte EXB-1500
        Work with QIC-3010 tapes.


     Exabyte TR-3

     Irwin 80SX, Insight 80Mb


     Iomega 250


     Iomega Ditto Tape Insider 420, 1700


     Iomega Ditto Tape Insider 3200
        This is the unit, that I use.  The default jumper settings don't
        work.  Leave the irq and ioport address at the default (6 and
        0x370, respectfully), but change the DMA from 3 to 2. (Kevin
        Johnson <kjj@pobox.com>).


          Refer to the file MCONFIG of recent ftape distributions
          for other suggestions for ioport, irq and DMA channel.


     May require the having {0x08882, 80, wake_up_colorado, "Iomega
     3200"}, added to vendors.h on older versions of ftape.

     Problems reported with ftape 2.07 and kernel 1.12.13.  With all
     sorts of combinations of accelerator, etc, the drive may (on some
     systems) only be accessed once (<erwin@box.nl>).  Also, after the
     first access, the next use of the tape says it is write protected
     (<erwin@box.nl>, <M.J.Ammerlaan@dutiwy.twi.tudelft.nl>).

     There has been one report of a problem where the tape got wound off
     the end of the spool.


          This may be caused by a dirty EOT sensor, and need not be
          a real hardware bug (except when it was a bug that dirt-
          ied the EOT sensor ...)


     Another problem has been reported with writing archives (with dd)
     to the tape.  It may start fine, but when the driver catches up
     with dd, it stops the tape and rewinds it to the beginning.  Then
     it starts winding on through the tape ad infinitum.  It appears to
     occur when the driver asks the tape to pause which should cause the
     tape to move back by 3 segments, but instead is moves back to the
     beginning of the tape.  A bug fix submitted is reported to not
     solve the problem.


          Should have been fixed somewhere between ftape-3.00 and
          ftape-4.00. Unluckily, the fast-skipping facilities of
          all Iomega floppy tape drives are really poor. Recent
          ftape versions work around this problem. I suggest get-
          ting the latest version of the ftape driver when you
          experience this problem.



     Iomega Ditto 800 Insider
        Works with Travan TR1, TR2, or DC2120 tapes
        (<klein@informatik.uni-rostock.de>).


     Iomega Ditto 2GB
        Support added by Jochen Hoenicke
        <Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE> to ftape-3.xx and
        later.

        Can't format cartridges, writing is only possible with special
        Ditto 2GB cartridges (hardware limitation, not a lacking feature
        of ftape).


     Iomega Ditto Max

     Iomega Ditto Max Pro
        Supported since ftape-4.00. Thanks to Tim Jones
        <tjones@estinc.com>.

        Can't format cartridges, writing is only possible with special
        Ditto Max cartridges (hardware limitation, not a lacking feature
        of ftape)

        I wasn't able to get the Ditto Max to work with any other device
        than /dev/[n]qft0. I don't know whether this is a feature of the
        Ditto Max or the Ditto EZ controller I had plugged the Ditto Max
        into.

        (* You don't need to buy a Ditto Max Pro to use the 5/10GB
        cartridges. With ftape there is no real difference between the
        Ditto Max and the Ditto Max Pro.  *)


     Iomega Ditto 800/3200/2GB/Max/Max Pro Easy (parallel port)
        Supported since ftape-4.00 with the bpck-fdc FDC driver.


     Mountain FS8000


     Reveal TB1400

        Reported not to work with kernel 1.3.79 and ftape (no version
        given) or with kernel 1.2.13 and zftape 1.04
        (<colin@colina.demon.co.uk>).


          The mentioned ftape driver versions are out of date. If
          you still have such a beast try the more recent versions
          of the ftape driver.



     Summit SE 150, SE 250


     Tallgrass FS300
        If you have a Tallgrass FS300 and an AHA1542B, you need to
        increase the bus-on / bus-off time of the 1542B.  Antti Virjo
        (<klanvi@uta.fi>), says that changing CMD_BUSON_TIME to 4 and
        CMD_BUSOFF_CMD to 12 in linux/drivers/scsi/aha1542.c will do the
        trick.


     Teac 800


     Memorex tape drive backup system


     Wangtek 3040F, 3080F


  You can always check out the newest list of drives that are recognised
  by ftape, by looking in the file vendors.h in the ftape distribution.

  Although I do not want to endorse one drive type over another, it has
  been reported that the Colorado DJ-20 drive is rather noisy, when
  compared to, say, a Conner C250MQ drive ('tis said that the Colorado
  is 5-10 times as noisy as the Conner drive. Since I have neither, I
  can't tell for sure).


       If you have a drive that works fine, but it is not listed
       here, or if you have corrections to the above information,
       please send a mail to the HOWTO maintainer
       (<heine@math1.rwth-aachen.de>).



  6.2.  Supported special controllers


  These dedicated high-speed tape controllers are supported by ftape:


  o  Colorado FC-10, FC-20

  o  Mountain MACH-2

  o  Iomega Tape Accelerator II

  o  2Mbps controllers (using the i82078-1 fdc)

  o  Iomega Ditto EZ 4Mbps PnP controller


  6.2.1.  Colorado FC-10, FC-20


  Support for the FC-10 controller has been merged into the ftape driver
  in version 1.12. See the RELEASE-NOTES and the Makefile files in the
  ftape distribution.  Since of version 2.03 of ftape, the FC-20
  controller will work, but only at 1Mbit/sec (check the Release
  notes!).


  6.2.2.  Mountain MACH-2


  The support for the MACH-2 controller was added in ftape-1.14d.


  6.2.3.  Iomega Tape Accelerator II


  To use the Iomega Tape Accelerator II (not to be mistaken as the
  Iomega Ditto Dash!), use -DMACH2, and set the right settings for I/O
  base, IRQ and DMA.  This works (by the empirical testing of Scott
  Bailey <sbailey@xcc.mc.xerox.com>), with at least ftape-2.02.


  6.2.4.  Iomega Ditto Dash and other 2Mbps controllers


  The Iomega Ditto Dash, and all other known 2Mbps controllers, use the
  Intel 82078-1 chip, which can run at 2Mbps. This is supported properly
  since ftape-3.00.


  6.2.5.  Iomega Ditto EZ PnP controller


  This controller requires the use of e.g. the isapnptools package to
  configure it. You may get it from
  http://www.roestock.demon.co.uk/isapnptools/

  The controller will cause too many overrun errors when used at the
  highest possible speed of 4Mbps. Neither Tim Jones <tjones@estinc.com>
  nor I <heine@math1.rwth-aachen.de> have been able to find but a single
  system which could run the controller at 4Mbps. 3Mbps seems to  be
  fine.

  If you configure the Ditto EZ to use DMA 2 (the DMA channel used by
  the floppy controller) then your floppy drive will no longer work. It
  doesn't help to disable the controllers DMA gate (as is the case with
  other hight speed controllers) so this can't be helped from inside
  ftape.


  6.3.  Unsupported tape drives



  o  Some parallel port floppy tape drives still not work. Others do.

  o  Irwin AX250L / Accutrak 250. (not a QIC-80 drive)

  o  IBM Internal Tape Backup Unit (identical to the Irwin AX250L drive)

  o  COREtape light

  The Irwin AX250L (and the IBM Internal Tape Backup Unit) does not work
  the ftape.  This is because they only support QIC-117, but not the
  QIC-80 standard (they use Irwin's proprietary ``servoe (Rhomat)''
  format).  I know nothing about the Rhomat format, nor where to get any
  info on it.  Sorry.

  The COREtape light does not accept the initialisation commands, we're
  feeding it. This pretty much leaves the drive unusable.


  6.4.  Using an external tape drive with ftape


  If you have a floppy controller which has a female DB37 connector on
  the bracket (and some means of delivering power to the drive), you can
  use it with ftape.  OK, that sentence was not very obvious. Let's try
  it this way: Some FDC's (the very ancient one's), have a DB37
  connector on the bracket, for connecting to external floppy drives.

  If you make a suitable cable from the DB37 connector (on the FDC) to
  your external tape drive, you can get ftape to control your tape
  drive.

  This is because that from a program's view there is no difference
  between the internal and the external connectors. So, from ftape's
  point of view, they are identical.


  o  Pins 20-37: GROUND

  o  1: +12 Volt (POWER)

  o  2: +12 Volt return (GROUND)

  o  3: +5 Volt return (GROUND)

  o  4: +5 Volt (POWER)


  o  5: 2

  o  6: 8

  o  7: 10

  o  8: 12

  o  9: 14

  o  10: 16

  o  11: 18

  o  12: 20

  o  13: 22

  o  14: 24

  o  15: 26

  o  16: 28

  o  17: 30

  o  18: 32

  o  19: 34

  The power connector is of the "mini" type, sitting on 3.5" floppy
  drives.  The idea appears to be that you plug one of the power
  connectors from the PSU to this connector on the board.  If you want
  to use just a single cable, you might want to get a 50 wire cable, and
  use multiple wires for the power lines (and ground, for that matter).

  I have received no confirmation from anyone that this works.  Let me
  know your results if you try it.



  6.5.  PCI motherboards and ftape


  Unfortunately, some PCI motherboards cause problems when running
  ftape.  Some people have experienced that ftape would not run in a PCI
  based box, but ran flawlessly in a normal ISA based 386DX machine.  If
  you have such a problem, please read the README.PCI file in the ftape
  distribution.


       A floppy disk controller needs the ISA bus DMA controller
       for its memory transfers. Seemingly the ISA DMA controller
       doesn't get control over the memory bus often enough on some
       PCI based systems.



  7.  Backing up and restoring data


  This section describes some simple uses of tar and mt. Other examples
  can be found in the ftape-manual of the ftape-doc package. The ftape-
  tools contains some simple automated DejaGnu (-- Package for writing
  automated tests.--)

  test-suites. See section ``Getting ftape'' for informations about
  where to download those additional packages from.


  7.1.  Writing an archive to a tape


  You can use `tar', `dd', `cpio', and `afio'. You will need to use `mt'
  to get the full potential of your tapes and the ftape driver.  For a
  start I'd recommend using `tar', as it can archive lots of directories
  and let you pick out separate files from an archive.  cpio creates
  smaller archives and is more generally more flexible than tar, but is
  missing some features like volume labels.  `afio' creates backups
  where each file is compressed individually and then concatenated.
  This will allow you to access the files ``after'' the point of the
  error.  If you use gzipped tar files, all data after the point of the
  error is lost! (to me, this is a pretty good reason for NOT using
  compression on backups).  The choice of which is most appropriate
  depends on the situation and the features and malfeatures of each of
  the packages.  I recommend taking a look at each package at reviewing
  the options that each provides.  It's possible that this HOWTO may
  provide more detail on this subject at some point in the future.

  There are more links pointing to backup software at http://www-
  math.math.rwth-aachen.de/~LBFM/claus/ftape/ in the software section of
  that page.

  To make a backup of your kernel source tree using tar, do this
  (assuming you have the sources in /usr/src/linux):



               # cd /usr/src
               # tar cf /dev/ftape linux



  This will not compress the files, but gives you a smoother tape run.
  If you want the compression (and you've got tar 1.11.2), you just
  include the -z flag(*), eg: `tar czf /dev/ftape linux'

  For further instructions on how to use tar, dd and mt look at the man
  pages and the texinfo files that comes with the respective
  distributions.

  (*) tar assumes that the first argument is options, so the `-' is not
  necessary, i.e. these two commands are the same: `tar xzf /dev/ftape'
  and `tar -xzf /dev/ftape'



  7.2.  Restoring an archive


  OK, let us restore the backup of the kernel source you made in section
  ``Writing an archive to a tape'' above.  To do this you simply say



               tar xf /dev/ftape


  If you used compression, you will have to say



               tar xzf /dev/ftape



  When you use compression, gzip will complain about trailing garbage
  after the very end of the archive (and this will lead to a `broken
  pipe' message).  This can be safely ignored.

  For the other utilities, please read the man page.



  7.3.  Testing the archive


  tar has an option (-d) for detecting differences between two archives.
  To test your backup of the kernel source say



               tar df /dev/ftape



  If you do not have the man page for tar, you are not lost (yet); tar
  has a built-in option list: try `tar --help 2>&1 | less'


  7.4.  Putting more than one backup on a tape



  To put more than one backup on a tape you must have the mt utility.
  You will probably have it already, if you got one of the mainline
  distributions (eg. Slackware or Debian).

  Programs like tar and cpio generate a single Tape ARchive and know
  nothing about multiple files or positioning of a tape, it just reads
  or writes from/to a device. mt knows everything about moving the tape
  back and forth, but nothing about reading the data off the tape.  As
  you might have guessed, combining tar or cpio with mt does the trick.

  By using the nqft[0-3] (nftape) device, you can use `mt' to position
  the tape the correct place (`mt -f /dev/nqft0 fsf 2' means step over
  two ``file marks'', i.e.  tar files) and then use tar or cpio to read
  or write the relevant data.

  The most common use of the non-rewinding device is to append another
  backup to an existing tape.  Here are the specific steps with a little
  explanation thrown in for good measure.


  o  Insert a tape into the drive.  On some devices this may cause the
     tape to be rewound.

  o  Issue an End-of-Tape command to the NON-rewinding device.



          mt -f /dev/n???? eof



  The tape should now be positioned at the End-of-Data (EOD). The tape
  won't move unless a program opens the device, closes the rewinding
  device, removes the device driver from kernel memory (rmmod) or ejects
  the tape.  Using `mt eof' may be faster on QIC tapes.

  o  The next tape operation will start at the EOD mark.  If you perform
     a write, it will append a new `file'.  If you perform a read it
     will fail with EOF.  The EOD mark on most tape formats is actually
     two consecutive EOF marks, however, since version 3.xx ftape  uses
     the volume table as specified in the QIC-113 standard to emulate
     file marks, thus there aren't two consecutive file marks at EOD.
     Writing the EOF marks is handled by either the device driver or the
     hardware when a close() is performed.

  o  Here's where you write the actual data to the tape.

  o  Here's the important part. Now rewind the tape.  Both ftape caches
     some information that belongs in the header segments on the tape
     and update those header segments only when the tape is rewound.
     This caching is necessary because rewinding the tape and updating
     the header segments takes a conspicuous amount of time.  The
     drawback of this caching is that you will lose information if you
     have written to the tape and not rewound the device.



  7.5.  Appending files to an archive


  ``Is there a way to extend an archive -- put a file on the tape, then
  later, add more to the tape?''

  No. The tar documentation will tell you to use `tar -Ar', but it does
  not work.  This is a limitation of the current ftape driver.



  7.6.  Mount/unmounting tapes


  Since a tape does not have a ``filesystem'' on it, you do not mount /
  unmount the tape.  To backup, you just insert the tape and run your
  `tar' command (or whatever you use to access the tape with).



  8.  Creating an emergency boot floppy for ftape


  (* As of the time of this writing (August 1998) I remember that I have
  read about several emergency disk sets in the c.o.l.a
  (comp.os.linux.announce) news group since the time this section has
  been written. Some of those packages actually might produce rather
  sophisticated emergency boot floppy sets. Please check out yourself.
  I didn't try to create an emergency boot floppy with recent versions
  of ftape.  *)

  This section was written by Claus Toendering <ct@login.dknet.dk>.

  Once you are the happy owner of a tape drive and several tapes full of
  backups, you will probably ask yourself this question: ``If everything
  goes wrong, and I completely lose my hard disk, how do I restore my
  files from tape?''

  What you need is an emergency floppy disk that contains enough files
  to enable you to boot Linux and restore your hard disk from tape.

  The first thing you should do is to read ``The Linux Bootdisk HOWTO''
  written by Graham Chapman <grahamc@zeta.org.au>.  That document tells
  you almost everything you need to know about making an emergency
  floppy boot kit.  The paragraphs below contain a few extra pieces of
  information that will make your life a bit easier when you follow
  Graham Chapman's procedures:


  o  You don't really need /etc/init, /etc/inittab, /etc/getty, and
     /etc/rc.d/* on your floppy disk.  If Linux doesn't find /etc/init,
     it will start /bin/sh on your console, which is fine for restoring
     your system.  Deleting these files gives you extra space on your
     floppy, which you will probably need.

  o  Find a small version of /bin/sh.  They are frequently available on
     the boot floppies that come with a Linux distribution.  This again
     will give you extra space.  I'd suggest ash, which is extremely
     small (approx 62Kbytes), and yet very bash compatible.

  o  The /etc/fstab you include on your floppy disk should look
     something like this:


               /dev/fd0        /               minix   defaults
               none            /proc           proc    defaults
               /dev/hda        /mnt            ext2    defaults



  Once you have booted from your floppy, give the command:


               mount -av



  o  Make sure your floppy drive is not mounted when you access the
     streamer tape!  Otherwise you may get the following error message:


               Unable to grab IRQ6 for ftape driver



  This means that you MUST load the floppy into a RAMDISK.

  This has the unfortunate consequence that the programs needed to
  restore the files from the tape can not be located on a separate
  floppy disk.  You have two options here:

     1. You place tar (or cpio or afio or whatever other backup program
        you use) on your root floppy disk.  (This is where you'll need
        all the extra space created in the steps above.)

     2. Before you start restoring from tape, copy tar (or cpio or afio
        or whatever) to your hard disk and load it from there.

  o  Apart from your backup program, you will probably need mt on your
     root floppy as well.

  o  Make sure your ftape device (typically /dev/nqft0) is present on
     your boot floppy.

  o  Finally: TRY IT OUT! Of course, I don't recommend that you destroy
     your hard disk contents to see if you are able to restore
     everything.  What I do recommend, however, is that you try booting
     from your emergency disks and make sure that you can at least make
     a file listing of the contents of your backup tape.



  9.  Frequently Asked Questions


  (* This is the literal inclusion of the Ftape Frequently Asked
  questions collection which is maintained by Johan De Wit
  <jo@correct.nl> and which may be viewed on the web at
  http://www.correct.nl/~ftape.  As Linuxdoc SGML doesn't include sub-
  sub-sections into the table of contents, I have prepended the word FAQ
  to the sections of the original FAQ document.  *)

  This FAQ collection might be slightly out of data as it was collected
  while version 3.04d of the ftape driver was the newest one. If any
  answer given in the FAQ contradicts any other statement of this HOWTO,
  then please disregard the answer in the FAQ and drop me
  (<heine@math1.rwth-aachen.de>) as well as the maintainer of the Ftape-
  FAQ (Johan De Wit <jo@correct.nl>) a note


  You might encounter references to the following addresses while
  reading this document:


  o  The maintainer of the Ftape FAQ :

     Johan De Wit <jo@correct.nl>

  o  The Ftape maintainer :

     Claus-Justus Heine <claus@momo.math.rwth-aachen.de>

  o  The Ftape Home Page :

     <http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape/>

  o  Mirrors of the Ftape Home Page :

     <http://www.torque.net/ftape/>

     Thanks to Grant R. Guenther <grant@torque.net>

     <http://www.info-systems.com/ftape/>

     Thanks to Jakob Curdes <jc@info-systems.com>

     <http://www.newwave.net/~joshg/ftape/>

     Thanks to Josh Goins <joshg@newwave.net>


  o  The Ftape HOWTO :

     <http://sunsite.unc.edu/LDP/HOWTO>

  o  The Ftape Mailing List :

     <linux-tape@vger.rutgers.edu>


  There is surely quite a lot missing. Please feel free to improve this
  FAQ.  The preferred way of doing this is to post to the Ftape Mailing
  List in case you have a question that isn't answered here.

  Also, if you are already reading the list regularly and have the
  impression that some questions occur again and again, feel free to
  send that question and possibly an answer in the format indicated
  below to the maintainer of the Ftape FAQ AND to Ftape Mailing List.

  If you make FAQ related postings, then please DON'T FORGET to prepend
  the word "[FAQ]" to the subject of your posting. Please don't add the
  word "FAQ" to the subject if you post something that isn't related to
  the FAQ.

  That's all for now.

  Claus-Justus Heine.


  10.  FAQ: "Compiling and installing Ftape" related questions !



  10.1.  What Ftape version should I use?


  Always the latest stable version which is _supposed_ to be available
  from ftp://sunsite.unc.edu/pub/Linux/kernel/tapes and http://www-
  math.math.rwth-aachen.de/~LBFM/claus/ftape/

  At time of this writing the latest stable version is ftape-4.02.

  <answer from Claus Heine>

  10.2.  I'm having problems getting my XYZ drive to run under the
  2.0.xx kernel with the built-in driver.  How do I fix this?


  The default version of Ftape included in the 2.0.xx kernel sources is
  2.08 or 2.09 and is very out of date.  Please update the Ftape drivers
  to the latest from the Ftape Home Page.

  <answer from Tim Jones>

  10.3.  I'm running Linux/SMP and the system just freezes when trying
  to access the Ftape devices!


  You need to add -D__SMP__ to the KERNEL_OPT variable in the file
  MCONFIG. In newer ftape versions you only need to uncomment a certain
  line in the MCONFIG file.

  <answer from Claus Heine>


  10.4.  Why does depmod complain about "undefined symbols"?


  Ignore the depmod error messages. The problem is that the Ftape
  modules have to be compiled without the version checksum feature (i.e.
  CONFIG_MODVERSIONS) with 2.0.* kernels. This causes no problem, even
  when the modules are used with a kernel that has support for this
  feature; only that depmod wrongly complains about undefined symbols.
  Ignore the complaints of depmod and try to insert the modules despite
  of these complaints:


       modprobe zftape



  If this fails, something is wrong.

  <answer from Claus Heine>


  10.5.  "insmod" says the kernel version is wrong


  The insmod program can check the kernel version against the version
  that Ftape was compiled for in two ways: It can directly compare the
  kernel version number recorded in the Ftape module against the version
  of the running kernel, or, if both the kernel and Ftape is compiled
  with versioned symbols, compare the version of the used kernel
  symbols.

  If you have upgraded your version of GCC to v2.7.0 or later, you must
  recompile the modules utilities with gcc v2.7.x.

  Newer versions of insmod allows you to "force" insertion of a module
  into the kernel, even though the version string is incorrect.

  <from the Ftape-Howto>


  10.6.  "insmod" says that kernel 1.2.0 and 1.2.0 differ


  Did you remember to apply the ksyms.c patch to the kernel?  If not,
  read the README.linux-1.2 file in the source distribution.

  <from the Ftape-Howto>


  10.7.  Trying to compile Ftape gives me the error "modversions.h: no
  such file or directory"


  The modversions.h file is created when the kernel is compiled with the
  configuration item CONFIG_MODVERSIONS turned on.  With this option
  enabled, the file will be created during the make dep step.

  One more handy tip is that a make mrproper will remove
  /usr/include/linux/modversions.h.  You will need to reconfig the
  kernel and do a make dep to get the file back.


  <from the Ftape-Howto>


  10.8.  What is this versioned symbols stuff anyway?


  When you say `yes' to CONFIG_MODVERSIONS during `make config', all the
  symbols exported by the kernel, i.e: the symbols that the loadable
  modules can "see", are augmented to include a checksum across the
  types of the call/return parameters.  This allows insmod to detect
  whether the definition of a variable or function in the kernel has
  changed since the time when Ftape was compiled.

  This ensures a high degree of safety, such that you do not crash the
  kernel because you used an outdated module with your kernel.

  If you enable CONFIG_MODVERSIONS in the kernel, make sure you have

  -DMODVERSIONS -include /usr/include/linux/modversions.h


  uncommented in the MODULE_OPT line in the Ftape Makefile.  Conversely,
  if you do not have CONFIG_MODVERSIONS enabled, make sure you have it
  commented out.

  <from the Ftape-Howto>


  10.9.  I seem to be getting sftape instead of zftape. When I run "ftmt
  status" command, I get output that the Ftape docs says corresponds to
  sftape ( /dev/qft0: Invalid argument ). Why?


  There are (at least) two possible sources of the problem:

  o  All Ftape-3.* versions prior to 3.04 install the modules into


       /lib/modules/misc
       instead of
       /lib/modules/uname -r/misc



  As modprobe searches in /lib/modules/misc/ last there might be an old
  ftape.o module floating around in /lib/modules/ uname -r/misc which
  modprobe finds first (uname -r stands for the kernel version).  Remove
  the old ftape.o module.

  o  Your kernel has support for Ftape compiled in. Reconfigure your
     kernel without support for Ftape (CONFIG_FTAPE) and recompile and
     install it.

  <answer from Claus Heins>


  10.10.  My Ditto DASH/FC-20/Exabyte Accelerator card works under
  Microsoft Windows, but I get a drive not found type of error in
  /var/log/messages when trying to use it under Linux.


  You are probably trying to use the same IRQ and DMA settings as your
  on-board FDC. This does not work in versions of Ftape prior to 3.03b.
  Please update the Ftape Drivers to the latest from the Ftape Home
  Page.
  <answer from Tim Jones>


  10.11.  Ftape DMA transfers gives ECC errors


  Sadly to say there are some SVGA cards and Ethernet cards that do not
  decode their addresses correct.  This typically happens when the Ftape
  buffers are in the range 0x1a0000 to 0x1c0000.  Somehow, the DMA write
  cycles get clobbered and every other byte written gets a bad value
  (0xff).  These problems are reported to happen with both SVGA and
  Ethernet cards.  We know of at least one (bad?) ATI 16bit VGA card
  that caused this.

  The easiest solution is to put the card in an 8bit slot (it is often
  not enough to reconfigure the card to 8bit transfers).  Moving the
  Ftape buffer away from the VGA range is only a partial solution; All
  DMA buffers used in Linux can have this problem!  Let us make this one
  clear: This has nothing to do with the Ftape software.

  <from the Ftape-Howto>


  10.12.  Help! I'm getting 'dmaalloc() failed' in my syslog file.


  You should only see this is you are trying to insmod the ftape.o
  module.  Try running swapout first.  It is provided with the
  standalone Ftape source.  It doesn't appear in the Ftape source that's
  provided with the kernel.

  Here's an example of how you can set your rc.local file to use it.



       # Install the Floppy Tape Driver
       if [ -f /boot/modules/`uname -r`/misc/ftape.o ]; then
          echo Installing ftape for Linux `uname -r`
          swapout
          insmod /boot/modules/`uname -r`/misc/ftape.o
       fi



  Please note that you won't have this type of problem if you compile
  the Ftape driver into the kernel.

  <from the Ftape-Howto>


  10.13.  Syslogd works overtime when running Ftape


  The compile-time options NO_TRACE and NO_TRACE_AT_ALL in Ftape control
  the amount of system logging.  Add whichever is appropriate to the
  FTAPE_OPT line in the Makefile and recompile.

  <from the Ftape-Howto>


  10.14.  How do I change the trace-level?


  There are three ways you can do this (in order of personal
  preference).
  While we're at it, here are the meanings of the various trace levels.


  o  0 Bugs

  o  1 + Errors

  o  2 + Warnings

  o  3 + Information

  o  4 + More information

  o  5 + Program flow

  o  6 + FDC/DMA info

  o  7 + Data flow

  o  8 + Everything else


  1. Using insmod to change trace-level

     If you are using the modules mechanism to load the Ftape driver,
     you can specify the tracing level as an option to the insmod
     command.


               /sbin/insmod ftape.o tracing=<tracing-level>



  2. Using mt to change trace-level

     The Ftape driver has a hack in it that allows the fsr option in mt
     to be used to set the tracing level.  zftape does not have this
     hack.


               mt -f /dev/ftape fsr <tracing-level>



  The use of the fsr command in mt is a hack, and will probably disap-
  pear or change with time.

  3. Recompiling to change trace-level

     The file tracing.c contains a line int tracing = 3;.  Change the 3
     to whatever is appropriate and recompile.

  <From the Ftape-Howto>


  10.15.  I'm having problems with Ftape.  I'm using the latest version
  of Ftape from the Ftape Home Page and believe that I've located a real
  bug. What should I do?


  Check the Ftape Home Page.  for an even newer version. Then check the
  FAQ contained in the that package if your problem is listed there.
  Next, try to check if the manual that comes with the Ftape
  distribution mentions your problem.
  There is no need to read the entire manual, simply check the "Concept
  Index" if it contains a keyword that might be related to your problem,
  then jump to the proper location in the manual.

  If you are still convinced you've found a bug, then post a general
  question describing the problem to the Linux-Tape Mailing List , but
  do not attach your entire Ftape error-log. If we've seen the problem
  before, we'll let you know where the resolution effort stands.  If we
  haven't, the Ftape maintainer will most likely request that you send
  him the entire Ftape error-log (snipped from your system messages
  file).

  <answer from Tim Jones>


  11.  FAQ: "Using Ftape" related questions !



  11.1.  How fast is Ftape ?


  You can achieve quite respectable backup and restore speeds with
  Ftape: a Colorado DJ-20 and an Adaptec 1542CF controller, has been
  measured at 4.25Mbyte/min sustained data transfer rate (no
  compression) across a 70Mbyte tar archive, while comparing the archive
  on the tape with data on an IDE disk.  The speed of Ftape is mostly
  dependent on the data transfer rate of your FDC: The AHA1542CF has a
  ``post-1991 82077'' FDC, and it will push 1Mbit/sec at the tape drive.
  If you have an FDC which can only deliver 500Kbit/sec data rates, you
  will see half the transfer rate (well, roughly).



  11.2.  When I write to some of my tapes, they seem to spend a lot of
  time "shoe-shining," or repositioning instead of streaming.  Is some-
  thing wrong with my system?


  There has been a few reports of "shoeshining".  This is when the tape
  just seems to run back and forth endlessly.  This has been seen on a
  Jumbo 250 (74407.3051@compuserve.com) and on an Iomega 250 Ditto
  Insider (tom@opus.cais.com). In the latter case it has been narrowed
  own to using an ELF Linux and running off a SCSI hard disk (connected
  to an Adaptec 1542cf).  Please contact me if you have an update to
  this problem.

  <from the Ftape-Howto>

  Probably not. If you are backing up a large number of < 2K files,
  you're just going to have to live with it.  In this event, the
  repositions are caused by file system access overhead. If you are
  backing up a normal system's files, this may be caused by slop or
  media stretching in the tape cartridge. By simply retensioning the
  tape, you should see this go away. Try


       ftmt -f /dev/zqft0 reten



  to retension the tape. If retensioning doesn't solve this, and it's
  only happening on certain tapes, it might be wise to replace the tapes
  in question.

  <answer from Tim Jones>

  If you use afio as your backup tool you can set it to write a very
  large number of buffers in one hit by using the -c flag. Make it large
  enough so that you supply enough data for most of a single end-to-end
  pass over the tape.  For my system, the following streams quite nicely
  - stopping relatively few times per tape pass on an unloaded system:


       find /usr/local -xdev -print | afio -o -v -f -b 10240 -c 800 /dev/qft0



  In my case I'm writing 800 x 10240 bytes per tape write, i.e. about
  8MB.  haven't experimented that much with these settings - so someone
  might like to establish more optimal ones.

  Presumably other backup utilities could be modified to use a similar
  technique.

  <answer by Michael Hamilton>

  GNU tar doesn't use buffering in this way. The commercial backup
  program "bru" is able to multi-buffer using shared memory; this works
  only when writing compressed archive with bru (regardless whether you
  use Ftape's builtin compression)

  Another way to overcome the problem might be to use more dma buffers
  in the Ftape kernel driver like:


       mt -f /dev/qft0 setdrvbuffer $((6*32786))



  $((6*32786)) should be expanded by your shell when using a Bourne com-
  patible one. This has a negative impact on the system's memory pool:
  Ftape's dma buffers cannot be used by any other part of the kernel nor
  by any other application. And kernel memory cannot be swapped out. If
  you decide to use this kind of multi-buffering then you should unload
  the driver as soon as it isn't needed any longer.

  <answer by Claus Heine>


  11.3.  Do I have to reboot to the DOS world to format tapes?


  Not if you are using the latest version of the Ftape drivers from  the
  Ftape Home Page.

  To format a QIC-80, TR-1, TR-3, QICWide 3010 or 3020 tape, get the
  latest version of ftape and the latest version of the ftape-tools
  package (from the same location) and read the documentation of the
  ftformat utility which is included in the ftape-tools package.

  (* Do not try to format Ditto 2GB tapes.  *)

  (* Do not try to format Ditto Max or Max Pro tapes.  *)

  <answers from Tim Jones and Claus Heine>



  11.4.  Is it possibly to format Ditto 2GB tapes with ftape?


  It isn't possible to format Ditto 2GB tapes with Ditto 2GB tape drive,
  and it isn't possible at all to re-format Ditto 2GB tapes in a way
  that they still can be used by a Ditto 2GB tape drive.

  This is a hardware limitation of the Ditto 2GB tape drive. It can't be
  helped at the software level, i.e. it isn't ftape's fault.


  11.5.  Is it possibly to format Ditto Max or Max Pro tapes with ftape?


  No, the Ditto Max can't format tapes.

  This is a hardware limitation of the Ditto Max (Pro) tape drive. It
  can't be helped at the software level, i.e. it isn't ftape's fault.


  11.6.  Ftape detects more bad sectors than DOS on QIC-3020 tapes


  If you look at the difference, you will notice that Ftape always
  detects 2784 sectors more than DOS.

  The number that Ftape reports is correct (of course :-). Each
  correctly formatted QIC-3020 tape has 2784 sectors at fixed positions
  that are marked in the bad sector map. To quote from the specs:


       Tracks 5,7,9,11,13,15,17,19,21,23,25 and 27 within 4 seg-
       ments of either EOT or BOT are prone to increased error
       rates due to hole imprints.  Therefore, these regions shall
       be mapped as bad at format time and entered in the bad sec-
       tor map by indicating that all sectors within the identified
       segments are bad.


  This gives 12 tracks * 2 * 4 segments * 29 sectors == 2784 sectors.

  So Ftape choose to report the real number of sectors that cannot be
  used on the tape, while DOS gives a more optimistic number giving a
  better indication of tape quality.  (Ftape's behavior might change in
  the future to detect correct formatting and display the separate
  numbers. It has rather low priority though).

  QIC-3010 are alike QIC-3020 tapes regarding this.

  <from the Ftape-Howto>


  11.7.  Is it ok that I'm not hearing the tape move when I do a fsf or
  a bsf with mt?


  Yes.  The driver merely updates an internal counter when those
  commands are issues.  The tape should move to the proper location on
  the next read or write access to the tape drive.

  <from the Ftape-Howto>



  11.8.  Why does my XYZ backup program complain about "Invalid argu-
  ment" errors?


  zftape requires the data to be written in multiples of a fixed minimal
  block size. This is a very usual behavior for a tape device. There are
  three ways to get rid of those errors:

  o  set Ftape's block size to the block size used by the backup
     program. The example below works for "afio":


       mt -f /dev/qft0 setblk 5120



  o  If you don't want to use Ftape's built in compression you can also
     use


       mt -f /dev/qft0 setblk 0



  to switch Ftape to variable block size mode and be able to write the
  data in arbitrary portions to the tape (BUT: the builtin compression
  doesn't work with this setting). When you intend to use "KBackup" then
  this is the only way to make it work together with Ftape (it _may_
  work, don't know if it does)

  o  tell your backup program about Ftape's default block size of 10k
     (which is also the default of GNU tar). For "afio" you can use the
     following command line switch:


       afio -b 10k ...



  You may want to read the section "Tape blocks" of the manual (use its
  "Concept index" to directly jump to that section)

  When using GNU tar's builtin compression with GNU tar versions prior
  to tar-1.12 one needs to run tar with the --block-compress switch to
  re-block the output to the tape.  Otherwise tar will compress the data
  it reads, and write it in arbitrary portions to the tape.



       Example :

       tar -czvf /dev/qft0 --block-compress /etc



  WARNING: One shouldn't use tar's builtin compression with large
  backups as it makes the entire data stream one huge compressed block.
  If such archives are corrupted right at the beginning it will be very
  difficult to recover.

  <answer by Claus Heine>

  11.9.  I/O errors and FDC - some explanations.


  When you get next messages, this could be interesting for you !


  o  fdc-io.c (ft_handle_perpend) - Your FDC does not support QIC-3020.

  o  Cannot write to /dev/qft0: I/O error

  The explanations:

  "FDC" menas "Floppy Disk Controller". The problem is that your floppy
  disk controller must be able to support something that is called
  "perpendicular mode" to be able to read and write QIC-3020/QIC-3010
  cartridges (i.e. TR-3 cartridges). To my knowledge all FDCs that are
  capable of at least 1Mbit/sec data transfer rate also support
  "perpendicular mode" ("perpendicular" refers to the direction of
  magnetization of the ferro-magnetic particles on the tape).

  This means that you need to purchase another FDC. Either look around
  some computer stores and ask for an IO controller cards that is able
  to support 2.88 Mb floppies (which imlies 1Mbit data transfer rate and
  perpendicular mode).

  Or get one of the so called "high speed" controllers that even support
  2Mbit/sec data transfer rate. Those controllers are based on an Intel
  82078 FDC. Iomega sells such a card under the name "Ditto Dash". I
  think Exabyte sells their 2Mbit controllers separately, too, whereas
  Seagate ships its TR-3 drives (i.e. the TST-3200) together with such a
  controller.


  <answer from Claus Heine>


  11.10.  Why do I get "/dev/qft0: No such device" errors?


  I assume that the following is the problem: The Ftape module is loaded
  OK into the kernel:


       /usr/src/ftape-3.03b-970603# lsmod
        Module         Pages    Used by
        ftape             22            0



  but then this happens:


       $ ftmt -f /dev/qft0 status
       ftmt: /dev/qft0: No such device



  Solution You need to load the zftape.o module as well. With Ftape-3.*
  the ftape.o module doesn't implement the VFS interface. This is done
  by zftape.o.

  <answer from Claus Heine>


  11.11.  I get "device busy" when I make multiple backups on a tape
  using some script.


  The "device busy" messages can only occur while the Ftape devices are
  still held open by some program. As soon as the close() system call
  has completed the busy flag is cleared. May be "bru" or some other
  program has still forked off a child that dies delayed?

  Yes, this will reproduce the problem, it seems:


       tar -cvvzf /dev/nqft0 --block-compress ; mt rewind



  You can skip the "--block-compress" if using the most recent version
  of GNU tar.

  However, this is not a bug of Ftape. It seems that the parent tar
  process exits before its child has closed the tape device. I know,
  however, from hacking the tar code ages ago, that tar properly waits
  for its parent to die.

  However, the busy message simply means that the "busy" variable is
  still held at 1 (zftape/zftape-init.c). And this simply means that
  there still is a process hanging around that holds the tape device
  open.

  I think I have it (only for the case of tar 'cause I have the source
  code.

  If on uses tar with compression, then it forks a child which will
  become the compressor bei execing  "gzip" or whatever. Before the call
  to execlp() the child will fork off a grand child of its parent tar.
  That grandchild will do the actual tape I/O.


       tar - fork() - write to child tar
               |
             child tar - fork() - gzip (will pipe to grand child tar)
                           |
                         grand child tar - open archive.



  Now, parent tar only waits for its child to die. gzip surely doesn't
  wait for the grand child as the gzip is a result of an execlp().

  What I don't know is whether the grand child should be implicitly
  waited for by the parent tar, or if the wait() function also waits for
  grand childs.

  But this seems to be the problem: the parent tar already has exited
  while its grandchild still is busy closing the archive. One hardly
  will notice this problem if the close() happens fast (i.e. regular
  files, block devices, also other tape devices?), but it isn't a bug in
  Ftape, but either in the backup programs or in the kernel or maybe
  libc exit code.

  Don't know if the considerations above also apply to bru. If there is
  no grandchild and the parent process properly waits for its childs
  then there shouldn't be a problem.

  <answer from Claus Heine>


  11.12.  How do I "..." with tar?


  These are really tar questions: Please read the man page and the info
  page.  If you have not got it either, try


       tar  --help 2>&1 | less



  If your version of tar is v1.11.1 or earlier, consider upgrading to
  v1.11.8 - This version can call GNU zip directly (i.e.: it supports
  the -z option) and has an elaborate help included.  Also, it compiles
  right out of the box on Linux.

  <from the Ftape-Howto>


  11.13.  What block-size should I use with tar ?


  When using compression, and in all general, it can be a benefit to
  specify to tar, that it should block the output into chunks.  Since
  Ftape cuts things into 29Kbyte blocks, saying `-b58' should be
  optimum.

  "Why 29Kbyte?", I hear you cry.  Well, the QIC-80 standard specifies
  that all data should be protected by an Error Correcting Code (ECC)
  code.  The code specified in the QIC-80 standard is known as a Reed-
  Solomon (R-S) code.  The R-S code takes 29 data bytes and generates 3
  parity bytes.  To increase the performance of the ECC code, the parity
  bytes are generated across 29 1Kbyte sectors.  Thus, Ftape takes
  29Kbytes of data, adds 3Kbytes of ECC parity, and writes 32Kbytes to
  the tape at a time.  For this reason, Ftape will always read and write
  32K byte blocks to be able to detect (and correct) data errors.

  If you are curious, and wish to know more, look in the ecc.c and ecc.h
  files, for an explanation of the code and a reference to a textbook on
  Reed-Solomon codes.

  <from the Ftape-Howto>


  11.14.  Where can I find the tar/mt/cpio/dd binaries - sources - man-
  pages?


  All of these tools have been developed by the GNU project, and the
  source (and man page) can be fetched from just-about any ftp site in
  the world (including ftp.funet.fi, tsx-11.mit.edu, and
  sunsite.unc.edu).  In any case they can be fetched from the official
  GNU home site: prep.ai.mit.edu [18.71.0.38]:/pub/gnu.  The latest
  versions (as of September 12 1996) are:



  cpio:   2.4.2 (cpio-2.4.2.tar.gz)
  dd:     3.13 (fileutils-3.13.tar.gz)
  mt:     2.4.2 (cpio-2.4.2.tar.gz)
  tar:    1.11.8 (tar-1.11.8.tar.gz)
  gzip:   1.2.4 (gzip-1.2.4.tar.gz)



  They all compile out of the box on Linux v1.0.4 / libc v4.5.19 / gcc
  v2.5.8.

  <from the Ftape-Howto>


  11.15.  If I use tapers compression, is it a bad idea to use the com-
  pression with zftape, or would it be better to not use tapers compres-
  sion, and let zftape do it?


  It is not bad as such to compress data twice (which would be the case
  when using tapers compression together with zftape's compression) but
  it doesn't make any sense. You won't gain much further compression,
  but only waste CPU cycles.

  Tapers compression should be quite safe, as taper compresses single
  files; in contrast to tar -czf ... which makes the entire data stream
  a large compressed block of data, which is really a bad thing with
  serious backups as a single bad byte at the beginning of the archive
  can make the entire archive unusable, well, it will be at least quite
  difficult to recover.

  <Answer from Claus Heine>


  11.16.  How does zftape compression compare to say gzip -9?


  gzip -9 is better (i.e. one gains higher compression). zftape's
  compression is comparable with the Un*x compress program, but should
  be faster, and is faster than gzip.

  <Answer from Claus Heine>


  11.17.  I don't trust compression, but hear that the sftape interface
  is going away. What should I do?


  Use the zftape interface, but don't load the zft-compressor module.
  The device then becomes /dev/qft0.

  <answer from Tim Jones>


  11.18.  Ftape says "This tape has no 'Linux raw format"


  You get this complaint if you haven't erased your freshly formatted
  tape.  This is because Ftape expect a "magic header" on the tape, to
  be able that it is allowed to interpret the header segment in its own
  way (eg: file marks).  To remove the problem, say

  mt -f /dev/nftape erase


  <from the Ftape-Howto>


  11.19.  Can I exchange tapes with someone using DOS?


  No.  The DOS software conforms to the QIC-80 specs about the layout of
  the DOS filesystem, and it should(?)  be a small problem to write a
  program that can read/write the DOS format.  In fact, I'd bet that
  creating a nice user interface would be a bigger problem.

  <From the Ftape-Howto>


  11.20.  How does `mt eom' work when you've started overwriting a tape
  in the middle?


  (EOM is "End Of recorded Media", the position right after all data
  already recorded to the tape)

  One cannot use tape "files" like files on an ordinary file system.

  In principle, a tape doesn't allow anything but appending new data at
  EOM.  However, if one positiones just in the middle of the already
  recorded data AND starts writing, then the driver first deletes all
  following files (thus moving the EOM to the actual position) and then
  starts writing.

  Thus, the new EOM after finishing the write process, is then after the
  newly recorded data.

  One of the consequences of the above is, of course, that writing to
  the tape in the middle of the already recorded area, is destructive in
  the sense, that it not only overwrites the "file" the tape is
  positioned at, but also deletes all following files.

  <from the Ftape-Howto> <Answer from Claus Heine>


  11.21.  When I made backups before using taper, under the 2.0.29 ftape
  my drive didn't support fsf, under the new zftape it does, why would
  this be, and what exactly is fsf ?


  It probably didn't work before because you didn't use a


       mt -f /dev/rft0 erase



  before writing data to the cartridge. THIS ISN'T necessary any more.

  But, hey, what does mt fsf? Tape drives don't store files in the sense
  that you can use

  cp somefile /dev/my_what_ever_tape


  or be able to mount the tape drive like you could mount a harddisk.
  You can't do nothing with a tape drive but write data to it in a
  sequential manner.


  As this is quite inconvenient, somebody invented something which is
  known under the name file mark or eof mark (eof == End Of File). Those
  marks don't separate files that have been backed up to the tape
  device, but only separate blocks of data (whatever data that might
  be).

  Normally, the kernel tape device drivers take care of writing file
  marks when the tape device is closed, i.e.


       tar -cf /dev/nqft0 /bin
       tar -cf /dev/nqft0 /etc
       mt -f /dev/nqft0 rewind



  would result in a backup of all files under /bin and /etc. When the
  first tar finishes, the kernel driver will take care of writing a file
  mark to the tape at the the current tape position, and when the second
  tar process has finished, another file mark is written to the tape
  cartridge at that position.

  Now, the sense of those file marks is, that it is possible to skip
  between different archives on the tape more quickly than would be
  possible with reading the data back.

  The commands to do that are:

     mt fsf
        fast skip to the next file mark towards EOT (End Of Tape)

     mt bsf
        fast skip to the next file marks towards BOT (Begin Of Tape)

  Thus, to extract the second archive in the example above, one doesn't
  need to read the first archive back, but can proceed as follows:


       mt -f /dev/nqft0 rewind
       mt -f /dev/nqft0 fsf
       tar -xvf /dev/nqft0



  <Answer from Claus Heine>


  11.22.  What exactly is the difference between ftape, and zftape?


  When Ftape was young there were two versions of the floppy tape
  driver, one of them was called zftape because of its built-in user-
  transparent on-the-fly compression. Whether such a thing is a feature
  or a bug ('cause this needn't be done in kernel space) is another
  question. However, the ioctl interface and file mark handling provided
  by zftape was much better and had less bugs. And zftape allows to use
  floppy tape cartridges with different OS. Well, you can't exchange
  data, but zftape won't overwrite volumes created by your Windoze
  program, and vice versa.

  Nowadays, Ftape is name of the entire floppy tape driver package AND
  ftape.o is the file-name of the kernel module that implements the low-
  level hardware support. zftape has ceased to exist as a separate
  package, but the new Ftape versions (since ftape-3.00) contain a
  zftape.o module that needs to be loaded on top of ftape.o (i.e. you
  need to load BOTH modules to be able to access your floppy tape drive)
  and implements the file system interface and the advanced (?) features
  of the previous verions zftape.

  <Answer from Claus Heine>


  11.23.  What is the difference between a rewinding, and non rewinding
  drive?


  Well, the rewinding tape devices rewind the tape to BOT (Begin Of
  Tape) when the device is closed, i.e.


       tar -cvf /dev/qft0 /bin



  will rewind the tape cartridge when the tar job has finished. In con-
  trast,


       tar -cvf /dev/nqft0 /bin



  will NOT rewind the tape cartridge and leave the tape R/W head at its
  current position.

  Rewinding devices should be used when performing a single backup, non-
  rewinding devices can be useful when doing multiple backups as one
  doesn't need to space to EOM (End Of recorded Media) before appending
  another archive.

  Non-rewinding devices MUST be used when sending any of the tape motion
  command to the tape drive, such as


       mt -f /dev/nqft0 fsf



  , because when the mt process finishes then the tape device is closed
  which would result in rewinding the cartridge with the rewinding
  devices.

  <Answer from Claus Heine>


  11.24.  Can someone tell me how to use mt to rewind my TR-3 drive one
  record using zftape record, so I can verify it?


  Well, it depends. If the tape is still positioned inside the volume
  just written, "mt bsf 1" (or equivalently "mt bsf") will backspace
  just to the beginning of that volume (this is how "tar --verify"
  works). If the tape is already positioned AFTER the filemark that
  marks the end of the last written volume, then you need to issue "mt
  bsf 2"


  The logic behind this is as follows: "MTBSF count" backspaces over
  count file marks, stops, and then positions on the EOT side of the
  last skipped file mark. This means, an "mt bsf 2" will position right
  at the beginning of the previous volume.

  <answer form Claus Heine>


  11.25.  By non-rewinding, they mean that it doesn't automatically
  rewind, correct? It doesn't mean that under no circumstances it will
  rewind, right?  I tried using /dev/zqft0, and it instantly rewinds the
  tape.


  You are right: auto-rewind means, the tape is rewound when the tape
  device is closed, non-rewinding  means, the tape isn't automatically
  rewound when the tape device is closed (but you can, of course, use
  the tape motion commands BSF/FSF etc. to position the tape head at
  every position you like).

  <answer form Claus Heine>


  11.26.  What is the difference between what mt considers a record and
  what it considers a file?


  A record is the minimal amount of bytes that will be accepted by the
  tape in one read/write operation (except in "variable block size mode"
  where it just should be the amount of data actually written in a
  single write operation??).

  For zftape every read and write access has to be a multiple of a fixed
  block size (fixed, but tunable with MTSETBLK). This block size is a
  "tape record" (as mentioned in the GNU mt man page and defaults to
  10kb for zftape.

  A "file" (in the sense of the mt man page) is a, well, misleading
  terminus. What is meant is an area of the tape between two file marks.
  This is not a file like a file on the file system, in the sense that
  it could have a name, file access modes, could be moved or copied with
  cp, mv, rm etc.

  Instead, It simply is the area of the tape that was recorded in one
  backup session, its end is marked by a tape file mark, and its
  beginning is delimited by either BOT or the file mark of the previous
  tape "file". That tape "files" are the things that can be skipped with
  the MTBSF/FSF commands.

  <answer form Claus Heine>


  11.27.  Reusing tapes with zftape without reformatting the tape.


  We try to answer the followong questions :

  o  Is there a good way to erase, as in remove the data or at least the
     volumes from a tape, without reformating?

  o  Can you overwrite the last volume on a tape with making a mess out
     of it?

  o  Can you overwrite the last several volumes without making a mess?


  o  Can you delete the last volume?

  If you want to "erase" an entire cartridge, then simply do:



       mt -f /dev/qft0 erase



  This will erase the volume table (i.e. the "file marks").

  Pre-ftape-3.x releases of zftape and ftape used to allow overwriting
  of already existing volumes on a cartridge. I have removed this
  feature as it was reported that it already has caused data-loss with
  some backup programs.

  If you indeed need to remove some volumes on the tape then you should
  use the



       vtblc



  program that comes with the ftape-tools package which can be down-
  loaded from the same locations as the ftape kernel driver package.
  Please refer to the documentation which is contained in the ftape-
  tools package for more information.

  If you simply want to reuse old tapes, then it suffices to do



       mt rewind



  If the tape is at BOT (Begin Of Tape) then every write access to the
  tape will silently erase all file marks and overwrite the data already
  existing on the tape.

  <answer by Claus Heine>


  11.28.  This script implements a simple contents listing for the
  zftape package using the "MTIOCVOLINFO" ioctl.


  Here is as little perl/bash script that lists the contents of a
  cartridge using the zftape specific "volinfo" ioctl. Hope this shows
  how to handle this kind of stuff.

  What it basically does is the following:


  1. Rewind the cartridge

  2. Issue the volinfo command:



     claus@thales:~$ mt volinfo
     file number          = 1
     block size           = 10240
     physical space used  =  522.0 kilobytes
     real size of volume  =  520.0 kilobytes



  Parse the ouput and place the values in appropriate variables

  3. Skip to the next volume with "mt fsf"

  4. Exit if this gives an error (EOD), otherwise "goto 2)"

  The Perl Script



  #!/usr/bin/perl
  #
  #     Copyright (C) 1997 Claus-Justus Heine
  #
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
  # the Free Software Foundation; either version 2, or (at your option)
  # any later version.
  #
  # This program is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # GNU General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with this program; see the file COPYING.  If not, write to
  # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  #
  #   This script implements a simple contents listing for the zftape
  #   package using the MTIOCVOLINFO ioctl.
  #

  $version = <<EOT;
  listtape-1.0 -- a perl script to list the contents of a floppy tape cartridge
  under Linux using the zftape driver

  RCS \$Revision: 1.2 $
  RCS \$Date: 1998/08/30 13:44:03 $
  EOT

  $tapedev = "/dev/tape";
  $usage = <<EOT;
  Usage: listtape [options ...]

  Mandatory or optional arguments to long options are mandatory or optional
  for short options too.

  -f, --file=FILE       Tape device to use. Default is  "/dev/tape".
  -h, --help            Print this help.
  -?                    Same as '-h'.
  --usage           Same as '-h'.
  -V, --version         Print version information.

  Author: Claus-Justus Heine <claus\@momo.math.rwth-aachen.de>
  EOT

  while ($ARGV[0] =~ /^-/) {
  $_ = shift;
  if (/--file/) {$_ = shift; $tapedev = $_; next;}
  if (/-f/) {$_ = shift; $tapedev = $_; next;}
  if (/--help/) { print $usage; exit 0; }
  if (/-h/) { print $usage; exit 0; }
  if (/--usage/) { print $usage; exit 0; }
  if (/-\?/) { print $usage; exit 0; }
  if (/--version/) { print $version; exit 0; }
  if (/-V/) { print $version; exit 0; }
  die $usage;
  }

  &open_tape($tapedev, "status");
  while(<FTMT>)
  {
  $online = 1 if (/.*online.*/);
  }

  if (! $online) { die "No cartridge present.\n"; }
  &mtop($tapedev, "rewind");

  printf "%11s%12s%20s%20s\n",
  "file number", "block size", "volume size", "tape space";

  while (1)
  {
  &open_tape($tapedev, "volinfo");
  while (<FTMT>) {
  if (/^file number\s*=\s*([0-9]*)$/) { $filenumber = $1; }
  if (/^block size\s*=\s*([0-9]*)$/) { $blocksize = $1; }
  if (/^physical space used\s*=\s*([[0-9]*.*)/) { $rawsize = $1; }
  if (/^real size of volume\s*=\s*([[0-9]*.*)/) { $size = $1; }
  }
  close(FTMT);
  if (&mtop($tapedev, "fsf 1") != 0) {
  &mtop($tapedev,"rewind");
  print "\nRemaining space: $rawsize\n";
  print "Tape block size: $blocksize\n";
  exit 0;
  }
  printf "%6d          %5d  %20s%20s\n",
      $filenumber, $blocksize, $size, $rawsize;
  }

  sub mtop
  {
  local ($tape, $operation) = @_;
  local ($exitval);
  system "ftmt -f $tape $operation > /dev/null 2>&1";
  }

  sub open_tape
  {
  local ($tape, $operation) = @_;
  local ($command);

  $command = "ftmt -f " . $tape . " " . $operation . " |";
  open(FTMT, $command) || die "Couldn't open $command -- $!\n";
  }



  The Bash Script



  ______________________________________________________________________

  #! /bin/bash
  #
  #     Copyright (C) 1997 Claus-Justus Heine
  #
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
  # the Free Software Foundation; either version 2, or (at your option)
  # any later version.
  #
  # This program is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # GNU General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with this program; see the file COPYING.  If not, write to
  # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  #
  #   This script implements a simple contents listing for the zftape
  #   package using the MTIOCVOLINFO ioctl.
  #

  #
  # insert better option parsing here
  #
  TAPEDEV=${1-/dev/tape}

  if ! echo $TAPEDEV | grep "/dev/n"
  then
  TAPEDEV=/dev/n$(basename $TAPEDEV)
  fi

  if ! [ -c $TAPEDEV ]
  then
  echo $TAPEDEV is not a character device!  1>&2
  exit 1
  fi

  if ! mt -f $TAPEDEV rewind
  then
  echo Could not rewind $TAPEDEV - no cartridge present?  1>&2
  exit 1
  fi

  echo -e "\nContents of $TAPEDEV:\n"

  printf "%11s%12s%20s%20s\n" "file number" "block size" "volume size" "tape space"

  trap "rm -f /tmp/$0.$$" exit

  while true
  do
  if ! foo=$(mt -f $TAPEDEV volinfo |cut -f 2 -d =)
  then
  echo $TAPEDEV doesn\'t seem to be a floppy tape device 1>&2
  exit 1
  fi
  #
  # "echo foo | read foo" will not work as the "read foo" is executed in
  # another shell.
  #
  echo $foo > /tmp/$0.$$
  read file blksz used usedunit size sizeunit < /tmp/$0.$$
  if ! mt -f $TAPEDEV fsf 1 > /dev/null 2>&1
  then
  echo -e "\nRemaining space: $used $usedunit"
  echo -e "Tape block size: $blksz"
  if ! mt -f $TAPEDEV rewind
  then
      echo Rewind of $TAPEDEV failed 1>&2
      exit 1
  fi
  exit 0
  fi
  printf "%6d          %5d  %20s%20s\n"\
  $file $blksz "$size $sizeunit" "$used $usedunit"
  done
  ______________________________________________________________________



  <answer from Claus Heine>


  12.  FAQ: "Tape and Drivers" related questions !



  12.1.  What are good makers of Travan tapes?


  I was the UNIX Product Manager at Archive Corp (Prior to the
  Conner/Seagate mess) and we performed extensive tests of tape media
  for compatibility certification, including retentivity, flaking and
  length consistancy.  Based on the results of the tests, we selected
  the best of these certified manufacturers' products to private label
  as our own media.  Here is the order in which we selected vendors up
  through 1995 (when I lost contact with the ATI group):


     QIC

        1. 3M (now known as Imation)

        2. QMaxell/Sony (tie)

        3. (BTW - Iomega uses Sony private-labelled media)

     4MM

        1. Fuji

        2. Maxell/Sony (tie - is this a trend?)

     8MM

        1. Fuji/Exabyte - which we believed to be OEM'd Fuji (tie - so
           much for trend!)

        2. Sony

        3. Maxell

     DLT

        1. Maxell

        2. Sony


  Otherwise, we had entries in our search from other vendors which were
  generally a private-labelled version of one of the major labels above.
  The exceptions were Verbatim and DIC.  Both of these manufacturer's
  media had fall-out rates and length discrepancies that were so high
  that we would not certify them and even warned customers about them
  indicating that we could not offer any sort of guarantee that they
  would get a good backup using the media from these manufacturers.

  In addition, since coming to EST, I've found that Verbatim media is
  still not worth the money saved in purchasing it.  We have 11 of their
  TR-Extra and QIC-Extra (QICXL) tapes that were useless after fewer
  than 20 passes each.

  While this is my personal opinion, it is based on over 9 years of
  experience with this very question, I strongly recommend Imation/3M
  media for QIC/Travan user, Fuji media 4MM users, Exabyte/Fuji for 8MM
  and DEC labelled media for DLT users.

  <answer from Tim Jones>


  12.2.  Where can I obtain the QIC standards?


  If you wish to help developing Ftape, or add some utility (e.g. a tape
  formatting program), you will need that appropriate QIC standards.
  The standard(s) to get is: QIC-80, -117, -3010, and 3020.  QIC-117
  describes how commands are sent to the tape drive (including timing
  etc), so you would probably never need it.  QIC-80/3010/3020 describes
  higher level part, such as tape layout, ECC code, standard filesystem.
  You can get the QIC standards from the following address:



       Quarter Inch Cartridge Drive Standards, Inc.
       311 East Carrillo Street
       Santa Barbara, California 93101
       Phone: (805) 963-3853
       Fax:   (805) 962-1541



  Note: They are registered as `Freeman Associates, Inc' in the phone
  book.

  <from the Ftape-Howto>


  12.3.  Is the Iomega Ditto 2GB drive supported?


  Yes, if you are using version ftape-3.x or later of the Ftape drivers
  from the Ftape Home Page or from
  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes.

  <answer from Tim Jones>

  As the Ditto 2GB is a Tr-3 tape (though it can only store 1GB instead
  of the 1.6GB you get with a regular Tr-3 drive) you need an FDC (FDC
  means: Floppy Disk Controller) that is capable of at 1Mbit/sec
  transfer rate. You don't need to worry about this if you have an
  accellerator card (i.e. the Ditto Dash controller). Otherwise try to
  purchase an FDC that claims to be capable of driving 2.88Mb floppies
  because this implies that the FDC is capable of 1Mbit transfer rate.

  Ftape prints the maximum data rate of the FDC to the kernel log files
  like this:

  ftape-ctl.c (ftape_init_drive) - Highest FDC supported data rate: 500 Kbps.



  <answer from Claus Heine>


  12.4.  Is the Iomega Ditto Max drive supported?


  Yes, if you are using version ftape-4.02 or later of the Ftape drivers
  from the Ftape Home Page or from
  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes.

  <answer from Claus Heine>


  12.5.  Is the Iomega Ditto Max Pro drive supported?


  Yes. But if you want to use the 5GB (10GB with compression) cartridges
  you don't need it. With ftape there doesn't seem to be any difference
  between the Ditto Max and the Ditto Max Pro.

  <answer from Claus Heine>


  13.  FAQ: Miscellaneous !



  13.1.  How to subscribe to the Ftape Mailing List?


  You can subscribe to that list by sending mail to


       majordomo@vger.rutgers.edu



  with the single line


       subscribe linux-tape



  in its body. Please store the answer you get from majordomo in a safe
  place because it contains instructions how to UNSUBSCRIBE from the
  mailing list.

  <answer from Claus Heine>


  13.2.  How to un-subscribe from the Ftape Mailing List?


  Send mail to


  majordomo@vger.rutgers.edu



  with the single line


       unsubscribe linux-tape MY@EMAIL.ADDRESS



  where MY@EMAIL.ADDRESS has to be replaced by the the email address
  that you used when subscribing to the list. Note that you must have
  received an email with instructions how to unsubscribe from the mail-
  ing list at the time you subscribed to it.

  <answer from Claus Heine>


  13.3.  Links to related information.



  <http://www.uwsg.indiana.edu/usai/library/backups.html>

  More links wanted !!!



  14.  Debugging the ftape  driver



  14.1.  The kernel/ ftape  crashes on me when I do `...' - is that a
  bug?


  No, that is a feature ;-)

  Seriously, reliable software do not crash.  Especially kernels do not
  or rather should not crash.  If the kernel crashes upon you when you
  are running ftape, and you can show that it is ftape that is messing
  things up, regard it as a Bug That Should Be Fixed.  Mail the details
  to the maintainer (<heine@math1.rwth-aachen.de>) and to the tape list.



  14.2.  OK, it's a bug ...ehhh... feature - How do I submit a report?


  First, make sure you can reproduce the problem.  Spurious errors are a
  pain in the ass, since they are just about impossible to hunt down :-/
  This is a quick check list:


  o  Kernel version, and patches applied

  o  ftape version

  o  tape drive model / manufacturer

  o  Expansion bus type (EISA, ISA, PCI, or VL-bus)

  o  What you did to expose the problem

  o  What went wrong on your system.

  o  Do not delete the kernel and the ftape.o file. I might want you run
     try some patches out or run a different test on your system.

  Increase the tracing level to 4 or 5 and run the command that caused
  problems again (don't do it if your fear that you loose data or damage
  your hardware, there is absolutely no warranty for neither data loss
  nor hardware damage caused by ftape, remember this). Increasing the
  trace level beyond 5 probably doesn't make any sense as it affects the
  timing of the driver in a way that it doesn't work well any more. Get
  the tracing data from the kernel log or /proc/kmsg, depending on where
  you harvest your error messages.  Try to look at what ftape spews out
  at you.  It may look in-comprehensible to you at first, but you can
  get valuable information from the logfile.  Most messages have a
  function name prepended, to make it easier to locate the problem.
  Look through the source, don't just cry ``WOLF!'', without giving it a
  try.  If your version of the kernel (or ftape for that matter), is
  ``old'', when compared to the newest version of the kernel, try to get
  a newer (or even the newest) kernel and see if the problem goes away
  under the new kernel.  When you post your problem report, include the
  information about ftape version, kernel version, expansion bus type
  (ISA, VL-bus, PCI or EISA), bus speed, floppy controller, and tape
  drive.  State exactly what you did, and what happened on your system.
  Some people have experienced that ftape would not run in a PCI based
  box, but ran flawlessly in a normal ISA based 386DX machine (see
  section ``Getting PCI motherboards to work with <tt/ftape/'' on PCI
  machines above)

  Also, please think of the poor souls who actually pay the their
  Internet access (like me): avoid posting a (huge) log from the ftape
  run, without reason.  Instead, you could describe the problem, and
  offer to send the log to the interested parties.

  Send your bug report to <linux-tape@vger.rutgers.edu>. You might also
  want to mail the bug to <heine@math1.rwth-aachen.de>.



  15.  Contributions


  The following is a list of notable folks that have contributed to
  ftape's HOWTO document.  This is a recent addition added by someone
  coming in midstream.  My sincerest apologies if I've inadvertently
  left someone important off the list. You can view anoterh attempt to
  collect such kind of information at Ftape's Hall of Fame

  Johan De Wit <jo@correct.nl>: The maintainer of the Ftape FAQ.

  Kevin Johnson <kjj@pobox.com>: The previous maintainer of the Ftape-
  HOWTO

  Kai Harrekilde-Petersen <khp@dolphinics.no>: The previous maintainer
  of ftape and the HOWTO.


  Andrew Martin <martin@biochemistry.ucl.ac.uk>: Many additions to the
  HOWTO.



  Bas Laarhoven <bas@vimec.nl>: The original author of ftape.




The Linux GCC HOWTO

Daniel Barlow

   Linux Documentation Project
   
   May 1999
   
   This document covers how to set up the GNU C compiler and development
   libraries under Linux, and gives an overview of compiling, linking,
   running and debugging programs under it. Most of the material in it
   has been taken from Mitch D'Souza's GCC-FAQ or the ELF-HOWTO - it
   replaces both documents.
   
   This is the first version to be written in DocBook instead of the old
   Linuxdoc format, and may contain markup errors. Please let me know if
   you find anything worng.
   
   As can be determined from the long times between updates of this
   document, I don't actually have the time or inclination to maintain it
   much. If you have, can, and want to, drop me some email describing
   what you'd do with it and why you think you'd be good at it.
     _________________________________________________________________
   
   Table of Contents
   [1]Preliminaries
          
        [2]ELF vs. a.out, libc 5 vs 6
        [3]Administrata
        [4]Typography
                
   [5]Where to get things
   [6]GCC installation and setup
          
        [7]GCC versions
        [8]Where did it go?
        [9]Where are the header files?
        [10]Building cross compilers
                
   [11]Porting and Compiling
          
        [12]Automatically defined symbols
        [13]Compiler invocation
        [14]Portability
                
   [15]Debugging and Profiling
          
        [16]Preventative maintenance (lint)
        [17]Debugging
        [18]Profiling
                
   [19]Linking
          
        [20]Shared vs static libraries
        [21]Interrogating libraries (`which library is sin() in?')
        [22]Finding files
        [23]Building your own libraries
                
   [24]Dynamic Loading
          
        [25]Concepts
        [26]Error messages
        [27]Controlling the operation of the dynamic loader
        [28]Writing programs with dynamic loading
                
   [29]Contacting the developers
          
        [30]Bug reports
        [31]Helping with development
                
   [32]The Remains
          
        [33]The Credits
        [34]Translations
        [35]Feedback
        [36]Legalese
                
Preliminaries

ELF vs. a.out, libc 5 vs 6

   Three years ago when this document was first created, I opened this
   section by saying "Linux development is in a state of flux right now"
   and going on to describe how ELF was replacing the older a.out binary
   format.
   
   It still is in a state of flux. It always will be. Though that
   particular change is long since past, development of the Linux kernel
   and the surrounding system continues to happen, and things change for
   developers as a result. So it's a good idea to know upfront what kind
   of system you have in front of you.
   
   The possible candidates, in order of age, are
   
     * libc 4, a.out: very old systems
     * libc 5, ELF: Red Hat 4.2, Debian 2.0
     * libc 6 (a.k.a glibc 2), ELF: Red Hat 5 - 5.2, Debian 2.1
     * libc 6.1,(a.k.a glibc 2.1) ELF: Red Hat 6
       
   How to tell? The simplest approach is to pick a binary that you
   consider is typical (e.g. /bin/ls and run ldd on it. One of the listed
   libraries should be libc - check its version number.
$ ldd /bin/ls
        libc.so.6 => /lib/libc.so.6 (0x4000e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

   This document was created on a [37]Debian 2.1 system, so no surprise
   there.
   
   It's entirely possible that the system you're using may have a mix of
   different versions on it. What you probably want to know in that case
   is the version that its C development environment is set up for, so
   you're best off compiling "hello world" and running ldd on the output
   thus created. Note that for historical reasons, gcc defaults to an
   output file called a.out even on ELF systems, so don't assume anything
   from that.
     _________________________________________________________________
   
Administrata

   The copyright information and like legalese can be found at the end of
   this document, together with the statutory warnings about asking dumb
   questions on Usenet, revealing your ignorance of the C language by
   reporting bugs which aren't, and picking your nose while chewing gum.
     _________________________________________________________________
   
Typography

   If you're reading this in Postscipt, dvi, or html format, you get to
   see a little more font variation than people with the plain text
   version. In particular, filenames, commands, command output and source
   code excerpts are set in some form of typewriter font, whereas
   `variables' and random things that need emphasizing are emphasized.
   
   You also get a usable index. In dvi or postscript, the numbers in the
   index are section numbers. In HTML they're just sequentially assigned
   numbers that you can click on. In the plain text version, they really
   are just numbers. Get an upgrade!
   
   The Bourne (rather than C) shell syntax is used in examples. C shell
   users will want to use
% setenv FOO bar

   where I have written

$ FOO=bar; export FOO

   If the prompt shown is # rather than $, the command shown will
   probably only work as root. Of course, I accept no responsibility for
   anything that happens to your system as a result of trying these
   examples. Have a nice day :-)
     _________________________________________________________________
   
Where to get things

   In the three years since the first `HOWTO' version of this, useful
   Linux distributions have become prevalent. So, where once I'd have
   spent pages listing FTP sites and hours updating (failing to update)
   version numbers and directory names, now I will simply say - your
   distribution maintainer should be taking care of this for you. If you
   don't have, say, gcc installed, find the RPM or the deb packages that
   contain it, and install it. If that isn't an option because you don't
   have a friendly distribution, you've almost certainly been using Linux
   long enough that you don't need me to tell you where to find things
   anyway.
     _________________________________________________________________
   
This document

   You're reading it. You probably have it already.
   
   This document is one of the Linux HOWTO series, so is probably already
   installed somewhere in /usr/doc if you're reading this on a linux box.
   Failing that, from all Linux HOWTO repositories (try [38]Metalab) and
   (possibly in a slightly newer version) at my personal web site
   [39]www.telent.net.
     _________________________________________________________________
   
Other documentation

   The official documentation for gcc is in the source distribution (see
   below) as texinfo files, and as .info files. If you have a fast
   network connection, a cdrom, or a reasonable amount of patience, you
   can just untar it and copy the relevant bits into /usr/info. If not,
   you may find them at [40]tsx-11, but not necessarily always the latest
   version.
   
   There are two source of documentation for libc. GNU libc comes with
   info files which describe Linux libc fairly accurately except for
   stdio. Also, the [41]manpages archive are written for Linux and
   describe a lot of system calls (section 2) and libc functions (section
   3).
     _________________________________________________________________
   
GCC

   There are two answers.
   
   (a) The official Linux GCC distribution can always be found in binary
   (ready-compiled) form at . At the time of writing, 2.7.2
   (gcc-2.7.2.bin.tar.gz) is the latest version.
   
   (b) The latest source distribution of GCC from the Free Software
   Foundation can be had from [42]GNU archives. This is not necessarily
   always the same version as above, though it is just now. The Linux GCC
   maintainer(s) have made it easy for you to compile the latest version
   available yourself --- the configure script should set it all up for
   you. Check [43]tsx-11 as well, for patches which you may want to
   apply.
   
   To compile anything non-trivial (and quite a few trivial things also)
   you will also need the
     _________________________________________________________________
   
C library and header files

   What you want here depends on (i) whether your system is ELF or a.out,
   and (ii) which you want it to be. If you're upgrading from libc 4 to
   libc 5, you are recommended to look at the ELF-HOWTO from
   approximately the same place as you found this document.
   
   These are available from [44]tsx-11 as above:
   
   libc-5.2.18.bin.tar.gz
          --- ELF shared library images, static libraries and include
          files for the C and maths libraries.
          
   libc-5.2.18.tar.gz
          --- Source for the above. You will also need the .bin. package
          for the header files. If you are deliberating whether to
          compile the C library yourself or use the binaries, the right
          answer in nearly all cases is to use the binaries. You will
          however need to roll your own if you want NYS or shadow
          password support.
          
   libc-4.7.5.bin.tar.gz
          --- a.out shared library images and static libraries for
          version 4.7.5 of the C library and friends. This is designed to
          coexist with the libc 5 package above, but is only really
          necessary if you wish to keep using/developing a.out format
          programs.
     _________________________________________________________________
   
Associated tools (as, ld, ar, strings etc)

   From [45]tsx-11, just like everything else so far. The current version
   is binutils-2.6.0.2.bin.tar.gz.
   
   Note that the binutils are only available in ELF, the current libc
   version is in ELF and the a.out libc is happiest when used in
   conjunction with an ELF libc. C library development is moving
   emphatically ELFwards, and unless you have really good reasons for
   needing a.out things you're encouraged to follow suit.
     _________________________________________________________________
   
GCC installation and setup

GCC versions

   You can find out what GCC version you're running by typing gcc -v at
   the shell prompt. This is also a fairly reliable way to find out
   whether you are set up for ELF or a.out. On my system it does
   
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.7.2/specs
gcc version 2.7.2

   The key things to note here are
   
     * i486. This indicates that the gcc you are using was built for a
       486 processor --- you might have 386 or 586 instead. All of these
       chips can run code compiled for each of the others; the difference
       is that the 486 code has added padding in some places so runs
       faster on a 486. This has no detrimental performance effect on a
       386, but does make the binaries slightly larger.
     * box. This is not at all important, and may say something else
       (such as slackware or debian) or nothing at all (so that the
       complete directory name is i486-linux). If you build your own gcc,
       you can set this at build time for cosmetic effect. Just like I
       did :-)
     * linux. This may instead say linuxelf or linuxaout, and,
       confusingly, the meaning of each varies according to the version
       that you are using.
          + linux means ELF if the version is 2.7.0 or newer, a.out
            otherwise.
          + linuxaout means a.out. It was introduced as a target when the
            definition of linux was changed from a.out to ELF, so you
            won't see any linuxaout gcc older than 2.7.0.
          + linuxelf is obsolete. It is generally a version of gcc 2.6.3
            set to produce ELF executables. Note that gcc 2.6.3 has known
            bugs when producing code for ELF --- an upgrade is advisable.
     * 2.7.2 is the version number.
       
   So, in summary, I have gcc 2.7.2 producing ELF code. Quelle surprise.
     _________________________________________________________________
   
Where did it go?

   If you installed gcc without watching, or if you got it as part of a
   distribution, you may like to find out where it lives in the
   filesystem. The key bits are
   
     * /usr/lib/gcc-lib/target/version/ (and subdirectories) is where
       most of the compiler lives. This includes the executable programs
       that do actual compiling, and some version-specific libraries and
       include files.
     * /usr/bin/gcc is the compiler driver --- the bit that you can
       actually run from the command line. This can be used with multiple
       versions of gcc provided that you have multiple compiler
       directories (as above) installed. To find out the default version
       it will use, type gcc -v. To force it to another version, type gcc
       -V version. For example
       
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.7.2/specs
gcc version 2.7.2
# gcc -V 2.6.3 -v
Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.6.3/specs
gcc driver version 2.7.2 executing gcc version 2.6.3

     * /usr/target/(bin|lib|include)/. If you have multiple targets
       installed (for example, a.out and elf, or a cross-compiler of some
       sort, the libraries, binutils (as, ld and so on) and header files
       for the non-native target(s) can be found here. Even if you only
       have one kind of gcc installed you might find anyway that various
       bits for it are kept here. If not, they're in
       /usr/(bin|lib|include).
     * /lib/,/usr/lib and others are library directories for the native
       system. You will also need /lib/cpp for many applications (X makes
       quite a lot of use of it) --- either copy it from
       /usr/lib/gcc-lib/target/version/ or make a symlink pointing there.
     _________________________________________________________________
   
Where are the header files?

   Apart from whatever you install yourself under /usr/local/include,
   there are three main sources of header files in Linux:
   
     * Most of /usr/include/ and its subdirectories are supplied with the
       libc binary package from H J Lu. I say `most' because you may also
       have files from other sources (curses and dbm libraries, for
       example) in here, especially if you are using the newest libc
       distribution (which doesn't come with curses or dbm, unlike the
       older ones).
     * /usr/include/linux and /usr/include/asm (for the files <linux/*.h>
       and <asm/*.h>) should be symbolic links to the directories
       linux/include/linux and linux/include/asm in the kernel source
       distribution. You need to install these if you plan to do any
       non-trivial development; they are not just there for compiling the
       kernel. You might find also that you need to do make config in the
       kernel directory after unpacking the sources. Many files depend on
       <linux/autoconf.h> which otherwise may not exist, and in some
       kernel versions asm is a symbolic link itself and only created at
       make config time. So, if you unpack your kernel sources under
       /usr/src/linux, that's
       
$ cd /usr/src/linux
$ su
# make config
[answer the questions.  Unless you're going to go on and build the kernel
it doesn't matter _too_ much what you say]
# cd /usr/include
# ln -s ../src/linux/include/linux .
# ln -s ../src/linux/include/asm .

     * Files such as <float.h>, <limits.h>, <varargs.h>, <stdarg.h> and
       <stddef.h> vary according to the compiler version, so are found in
       /usr/lib/gcc-lib/i486-box-linux/2.7.2/include/ and places of that
       ilk.
     _________________________________________________________________
   
Building cross compilers

Linux as the target platform

   Assuming you have obtained the source code to gcc, usually you can
   just follow the instructions given in the INSTALL file for GCC. A
   configure --target=i486-linux --host=XXX on platform XXX followed by a
   make should do the trick. Note that you will need the Linux includes,
   the kernel includes, and also to build the cross assembler and cross
   linker from the sources in .
     _________________________________________________________________
   
Linux as the source platform, MSDOS as the target

   Ugh. Apparently this is somewhat possible by using the "emx" package
   or the "go" extender. Please look at .
   
   I have not tested this and cannot vouch for its abilities.
     _________________________________________________________________
   
Porting and Compiling

Automatically defined symbols

   You can find out what symbols your version of gcc defines
   automatically by running it with the -v switch. For example, mine
   does:
   
$ echo 'main(){printf("hello world\n");}' | gcc -E -v -
Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.7.2/specs
gcc version 2.7.2
 /usr/lib/gcc-lib/i486-box-linux/2.7.2/cpp -lang-c -v -undef
-D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ELF__ -Dunix -Di386 -Dlinux
-D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386
-D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386)
-Amachine(i386) -D__i486__ -

   If you are writing code that uses Linux-specific features, it is a
   good idea to enclose the nonportable bits in
   
#ifdef __linux__
/* ... funky stuff ... */
#endif /* linux */

   Use __linux__ for this purpose, not linux. Although the latter is
   defined, it is not POSIX compliant.
     _________________________________________________________________
   
Compiler invocation

   The documentation for compiler switches is the gcc info page (in
   Emacs, use C-h i then select the `gcc' option). Your distributor may
   not have packed this with your system, or you may have an old version;
   the best thing to do in this case is to download the gcc source
   archive from or one of its mirrors, and copy them out of it.
   
   The gcc manual page (gcc.1) is, generally speaking, out of date. It
   will warn you of this when you try to look at it.
     _________________________________________________________________
   
Compiler flags

   gcc can be made to optimize its output code by adding -On to its
   command line, where n is an optional small integer. Meaningful values
   of n, and their exact effect, vary according to the exact version, but
   typically it ranges from 0 (no optimization) to 2 (lots) or 3 (lots
   and lots).
   
   Internally, gcc translates these to a series of -f and -m options. You
   can see exactly which -O levels map to which options by running gcc
   with the -v flag and the (undocumented) -Q flag. For example, for -O2,
   mine says
   
enabled: -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks
-fexpensive-optimizations
         -fthread-jumps -fpeephole -fforce-mem -ffunction-cse -finline
         -fcaller-saves -fpcc-struct-return -frerun-cse-after-loop
         -fcommon -fgnu-linker -m80387 -mhard-float -mno-soft-float
         -mno-386 -m486 -mieee-fp -mfp-ret-in-387

   Using an optimization level higher than your compiler supports (e.g.
   -O6) will have exactly the same effect as using the highest level that
   it does support. Distributing code which is set to compile this way is
   a poor idea though --- if further optimisations are incorporated into
   future versions, you (or your users) may find that they break your
   code.
   
   Users of gcc 2.7.0 thru 2.7.2 should note that there is a bug in -O2
   on these. Specifically, strength reduction doesn't work. A patch can
   be had to fix this if you feel like recompiling gcc, otherwise make
   sure that you always compile with -fno-strength-reduce
     _________________________________________________________________
   
Processor-specific

   There are other -m flags which aren't turned on by any variety of -O
   but are nevertheless useful. Chief among these are -m386 and -m486,
   which tell gcc to favour the 386 or 486 respectively. Code compiled
   with one of these will still work on the other; 486 code is bigger,
   but otherwise not slower on the 386.
   
   There is currently no -mpentium or -m586. Linus suggests using -m486
   -malign-loops=2 -malign-jumps=2 -malign-functions=2, to get 486 code
   optimisations but without the big gaps for alignment (which the
   pentium doesn't need). Michael Meissner (of Cygnus) says
   
   "My hunch is that -mno-strength-reduce also results in faster code on
   the x86 (note, I'm not talking about the strength reduction bug, which
   is another issue). This is because the x86 is rather register starved
   (and GCC's method of grouping registers into spill registers vs. other
   registers doesn't help either). Strength reduction typically results
   in using additional registers to replace multiplications with
   addition. I also suspect -fcaller-saves may also be a loss." "Another
   hunch is that -fomit-frame-pointer might or might not be a win. On the
   one hand, it can mean that another register is available for
   allocation. On the other hand, the way the x86 encodes its instruction
   set, means that stack relative addresses take more space instead of
   frame relative addresses, which means slightly less Icache availble to
   the program. Also, -fomit-frame-pointer, means that the compiler has
   to constantly adjust the stack pointer after calls, while with a
   frame, it can let the stack accumulate for a few calls."
   
   The final word on this subject is from Linus again:
   
   "Note that if you want to get optimal performance, don't believe me:
   test. There are lots of gcc compiler switches, and it may be that a
   particular set gives the best optimizations for you. "
     _________________________________________________________________
   
Internal compiler error: cc1 got fatal signal 11

   Signal 11 is SIGSEGV, or `segmentation violation'. Usually it means
   that the program got its pointers confused and tried to write to
   memory it didn't own. So, it could be a gcc bug.
   
   gcc is however, a well tested and reliable piece of software, for the
   most part. It also uses a large number of complex data structures, and
   an awful lot of pointers. In short, it's the pickiest RAM tester
   commonly available. If you can't duplicate the bug --- if it doesn't
   stop in the same place when you restart the compilation --- it's
   almost certainly a problem with your hardware (CPU, memory,
   motherboard or cache). Don't claim it as a bug because your computer
   passes the power-on checks or runs Windows ok or whatever; these
   `tests' are commonly and rightly held to be worthless. And don't claim
   it's a bug because a kernel compile always stops during `make zImage'
   --- of course it will! `make zImage' is probably compiling over 200
   files; we're looking for a slightly smaller place than that.
   
   If you can duplicate the bug, and (better) can produce a short program
   that exhibits it, you can submit it as a bug report to the FSF, or to
   the linux-gcc mailing list. See the gcc documentation for details of
   exactly what information they need.
     _________________________________________________________________
   
Portability

   It has been said that, these days, if something hasn't been ported to
   Linux then it is not worth having :-)
   
   Seriously though, in general only minor changes are needed to the
   sources to get over Linux's 100% POSIX compliance. It is also
   worthwhile passing back any changes to authors of the code such that
   in the future only `make' need be called to provide a working
   executable.
     _________________________________________________________________
   
BSDisms (including bsd_ioctl, daemon and <sgtty.h>)

   You can compile your program with -I/usr/include/bsd and link it with
   -lbsd (i.e. add -I/usr/include/bsd to CFLAGS and -lbsd to the LDFLAGS
   line in your Makefile). There is no need to add -D__USE_BSD_SIGNAL any
   more if you want BSD type signal behavior, as you get this
   automatically when you have -I/usr/include/bsd and include <signal.h>.
     _________________________________________________________________
   
`Missing' signals (SIGBUS, SIGEMT, SIGIOT, SIGTRAP, SIGSYS etc)

   Linux is POSIX compliant. These are not POSIX-defined signals ---
   ISO/IEC 9945-1:1990 (IEEE Std 1003.1-1990), paragraph B.3.3.1.1 sez:
   
   "``The signals SIGBUS, SIGEMT, SIGIOT, SIGTRAP, and SIGSYS were
   omitted from POSIX.1 because their behavior is implementation
   dependent and could not be adequately categorized. Conforming
   implementations may deliver these signals, but must document the
   circumstances under which they are delivered and note any restrictions
   concerning their delivery.''"
   
   The cheap and cheesy way to fix this is to redefine these signals to
   SIGUNUSED. The correct way is to bracket the code that handles them
   with appropriate #ifdefs:
   
#ifdef SIGSYS
/* ... non-posix SIGSYS code here .... */
#endif
     _________________________________________________________________
   
K & R Code

   GCC is an ANSI compiler; much existing code is not ANSI. There's
   really not much that can be done about this, except to add
   -traditional to the compiler flags. There is a certain amount of
   finer-grained control over which varieties of brain damage to emulate;
   consult the gcc info page.
   
   Note that -traditional has effects beyond just changing the language
   that gcc accepts. For example, it turns on -fwritable-strings, which
   moves string constants into data space (from text space, where they
   cannot be written to). This increases the memory footprint of the
   program.
     _________________________________________________________________
   
Preprocessor symbols conflict with prototypes in the code

   One of the most frequent problems is that some common functions are
   defined as macros in Linux's header files and the preprocessor will
   refuse to parse similar prototype definitions in the code. Common ones
   are atoi() and atol().
     _________________________________________________________________
   
sprintf()

   Something to be aware of, especially when porting from SunOS, is that
   sprintf(string, fmt, ...) returns a pointer to string on many unices,
   whereas Linux (following ANSI) returns the number of characters which
   were put into the string.
     _________________________________________________________________
   
fcntl and friends. Where are the definitions of FD_* stuff ?

   In <sys/time.h>. If you are using fcntl you probably want to include
   <unistd.h> too, for the actual prototype.
   
   Generally speaking, the manual page for a function lists the necessary
   #includes in its SYNOPSIS section.
     _________________________________________________________________
   
The select() timeout. Programs start busy-waiting.

   The BSD manual page for select(2) used to say "select() should
   probably return the time remaining from the original timeout, if any,
   by modifying the time value in place. This may be implemented in
   future versions of the system. Thus, it is unwise to assume that the
   timeout pointer will be unmodified by the select() call."
   
   Some versions of Linux do perform this modification. Some don't. It is
   incredibly unwise to assume one behaviour or the other.
   
   To fix, put the timeout value into that structure every time you call
   select(). Change code like
      struct timeval timeout;
      timeout.tv_sec = 1; timeout.tv_usec = 0;
      while (some_condition)
            select(n,readfds,writefds,exceptfds,&timeout);

   to, say,
      struct timeval timeout;
      while (some_condition) {
            timeout.tv_sec = 1; timeout.tv_usec = 0;
            select(n,readfds,writefds,exceptfds,&timeout);
      }

   Some versions of Mosaic were at one time notable for this problem. The
   speed of the spinning globe animation was inversely related to the
   speed that the data was coming in from the network at!
     _________________________________________________________________
   
Interrupted system calls.

Symptom:

   When a program is stopped using Ctrl-Z and then restarted - or in
   other situations that generate signals: Ctrl-C interruption,
   termination of a child process etc. - it complains about "interrupted
   system call" or "write: unknown error" or things like that.
     _________________________________________________________________
   
Problem:

   POSIX systems check for signals a bit more often than some older
   unices. Linux may execute signal handlers ---
   
     * asynchronously (at a timer tick)
     * on return from any system call
     * during the execution of the following system calls: select(),
       pause(), connect(), accept(), read() on terminals, sockets, pipes
       or files in /proc, write() on terminals, sockets, pipes or the
       line printer, open() on FIFOs, PTYs or serial lines, ioctl() on
       terminals, fcntl() with command F_SETLKW, wait4(), syslog(), any
       TCP or NFS operations.
       
   For other operating systems you may have to include the system calls
   creat(), close(), getmsg(), putmsg(), msgrcv(), msgsnd(), recv(),
   send(), wait(), waitpid(), wait3(), tcdrain(), sigpause(), semop() to
   this list.
   
   If a signal (that the program has installed a handler for) occurs
   during a system call, the handler is called. When the handler returns
   (to the system call) it detects that it was interrupted, and
   immediately returns with -1 and errno = EINTR. The program is not
   expecting that to happen, so bottles out.
   
   You may choose between two fixes.
   
   (1) For every signal handler that you install, add SA_RESTART to the
   sigaction flags. For example, change
   
  signal (sig_nr, my_signal_handler);

   to
  signal (sig_nr, my_signal_handler);
  { struct sigaction sa;
    sigaction (sig_nr, (struct sigaction *)0, &sa);
#ifdef SA_RESTART
    sa.sa_flags |= SA_RESTART;
#endif
#ifdef SA_INTERRUPT
    sa.sa_flags &= ~ SA_INTERRUPT;
#endif
    sigaction (sig_nr, &sa, (struct sigaction *)0);
  }

   Note that while this applies to most system calls, you must still
   check for EINTR yourself on read(), write(), ioctl(), select(),
   pause() and connect(). See below.
   
   (2) Check for EINTR explicitly, yourself:
   
   Here are two examples for read() and ioctl(),
   
   Original piece of code using read()
   
int result;
while (len > 0) {
  result = read(fd,buffer,len);
  if (result < 0) break;
  buffer += result; len -= result;
}

   becomes
   
int result;
while (len > 0) {
  result = read(fd,buffer,len);
  if (result < 0) { if (errno != EINTR) break; }
  else { buffer += result; len -= result; }
}

   and a piece of code using ioctl()
   
int result;
result = ioctl(fd,cmd,addr);

   becomes
int result;
do { result = ioctl(fd,cmd,addr); }
while ((result == -1) && (errno == EINTR));

   Note that in some versions of BSD Unix the default behaviour is to
   restart system calls. To get system calls interrupted you have to use
   the SV_INTERRUPT or SA_INTERRUPT flag.
     _________________________________________________________________
   
Writable strings (program seg faults randomly)

   GCC has an optimistic view of its users, believing that they intend
   string constants to be exactly that --- constant. Thus, it stores them
   in the text (code) area of the program, where they can be paged in and
   out from the program's disk image (instead of taking up swapspace),
   and any attempt to rewrite them will cause a segmentation fault. This
   is a feature!
   
   It may cause a problem for old programs that, for example, call
   mktemp() with a string constant as argument. mktemp() attempts to
   rewrite its argument in place.
   
   To fix, either (a) compile with -fwritable-strings, to get gcc to put
   constants in data space, or (b) rewrite the offending parts to
   allocate a non-constant string and strcpy the data into it before
   calling.
     _________________________________________________________________
   
Why does the execl() call fail?

   Because you're calling it wrong. The first argument to execl is the
   program that you want to run. The second and subsequent arguments
   become the argv array of the program you're calling. Remember: argv[0]
   is traditionally set even when a program is run with `no' arguments.
   So, you should be writing
   
execl("/bin/ls","ls",NULL);

   not just
execl("/bin/ls", NULL);

   Executing the program with no arguments at all is construed as an
   invitation to print out its dynamic library dependencies, at least
   using a.out. ELF does things differently.
   
   (If you want this library information, there are simpler interfaces;
   see the section on dynamic loading, or the manual page for ldd).
     _________________________________________________________________
   
Debugging and Profiling

Preventative maintenance (lint)

   There is no widely-used lint for Linux, as most people are satisfied
   with the warnings that gcc can generate. Probably the most useful is
   the -Wall switch --- this stands for `Warnings, all' but probably has
   more mnemonic value if thought of as the thing you bang your head
   against.
   
   There is a public domain lint available from . I don't know how good
   it is.
     _________________________________________________________________
   
Debugging

How do I get debugging information into a program ?

   You need to compile and link all its bits with the -g switch, and
   without the -fomit-frame-pointer switch. Actually, you don't need to
   recompile all of it, just the bits you're interested in debugging.
   
   On a.out configurations the shared libraries are compiled with
   -fomit-frame-pointer, which gdb won't get on with. Giving the -g
   option when you link should imply static linking; this is why.
   
   If the linker fails with a message about not finding libg.a, you don't
   have /usr/lib/libg.a, which is the special debugging-enabled C
   library. It may be supplied in the libc binary package, or (in newer C
   library versions) you may need to get the libc source code and build
   it yourself. You don't actually need it though; you can get enough
   information for most purposes simply by symlinking it to
   /usr/lib/libc.a
     _________________________________________________________________
   
How do I get it out again?

   A lot of GNU software comes set up to compile and link with -g,
   causing it to make very big (and often static) executables. This is
   not really such a hot idea.
   
   If the program has an autoconf generated configure script, you can
   usually turn off debugging information by doing ./configure CFLAGS= or
   ./configure CFLAGS=-O2. Otherwise, check the Makefile. Of course, if
   you're using ELF, the program is dynamically linked regardless of the
   -g setting, so you can just strip it.
     _________________________________________________________________
   
Available software

   Most people use gdb, which you can get in source form from [46]GNU
   archive sites, or as a binary from [47]tsx-11 or sunsite. xxgdb is an
   X debugger based on this (i.e. you need gdb installed first). The
   source may be found at 
   
   Also, the UPS debugger has been ported by Rick Sladkey. It runs under
   X as well, but unlike xxgdb, it is not merely an X front end for a
   text based debugger. It has quite a number of nice features, and if
   you spend any time debugging stuff, you probably should check it out.
   The Linux precompiled version and patches for the stock UPS sources
   can be found in , and the original source at .
   
   Another tool you might find useful for debugging is `strace', which
   displays the system calls that a process makes. It has a multiplicity
   of other uses too, including figuring out what pathnames were compiled
   into binaries that you don't have the source for, exacerbating race
   conditions in programs that you suspect contain them, and generally
   learning how things work. The latest version of strace (currently
   3.0.8) can be found at .
     _________________________________________________________________
   
Background (daemon) programs

   Daemon programs typically execute fork() early, and terminate the
   parent. This makes for a short debugging session.
   
   The simplest way to get around this is to set a breakpoint for fork,
   and when the program stops, force it to return 0.
   
(gdb) list
1       #include <stdio.h>
2
3       main()
4       {
5         if(fork()==0) printf("child\n");
6         else printf("parent\n");
7       }
(gdb) break fork
Breakpoint 1 at 0x80003b8
(gdb) run
Starting program: /home/dan/src/hello/./fork
Breakpoint 1 at 0x400177c4

Breakpoint 1, 0x400177c4 in fork ()
(gdb) return 0
Make selected stack frame return now? (y or n) y
#0  0x80004a8 in main ()
    at fork.c:5
5         if(fork()==0) printf("child\n");
(gdb) next
Single stepping until exit from function fork,
which has no line number information.
child
7       }
     _________________________________________________________________
   
Core files

   When Linux boots it is usually configured not to produce core files.
   If you like them, use your shell's builtin command to re-enable them:
   for C-shell compatibles (e.g. tcsh) this is
% limit core unlimited

   while Bourne-like shells (sh, bash, zsh, pdksh) use
$ ulimit -c unlimited

   If you want a bit more versatility in your core file naming (for
   example, if you're trying to conduct a post-mortem using a debugger
   that's buggy itself) you can make a simple mod to your kernel. Look
   for the code in fs/binfmt_aout.c and fs/binfmt_elf.c (in newer
   kernels, you'll have to grep around a little in older ones) that says
   
        memcpy(corefile,"core.",5);
#if 0
        memcpy(corefile+5,current->comm,sizeof(current->comm));
#else
        corefile[4] = '\0';
#endif

   and change the 0s to 1s.
     _________________________________________________________________
   
Profiling

   Profiling is a way to examine which bits of a program are called most
   often or run for longest. It is a good way to optimize code and look
   at where time is being wasted. You must compile all object files that
   you require timing information for with -p, and to make sense of the
   output file you will also need gprof (from the binutils package). See
   the gprof manual page for details.
     _________________________________________________________________
   
Linking

   Between the two incompatible binary formats, the static vs shared
   library distinction, and the overloading of the verb `link' to mean
   both `what happens after compilation' and `what happens when a
   compiled program is invoked' (and, actually, the overloading of the
   word `load' in a comparable but opposite sense), this section is
   complicated. Little of it is much more complicated than that sentence,
   though, so don't worry too much about it.
   
   To alleviate the confusion somewhat, we refer to what happens at
   runtime as `dynamic loading' and cover it in the next section. You
   will also see it described as `dynamic linking', but not here. This
   section, then, is exclusively concerned with the kind of linking that
   happens at the end of a compilation.
     _________________________________________________________________
   
Shared vs static libraries

   The last stage of building a program is to `link' it; to join all the
   pieces of it together and see what is missing. Obviously there are
   some things that many programs will want to do --- open files, for
   example, and the pieces that do these things are provided for you in
   the form of libraries. On the average Linux system these can be found
   in /lib and /usr/lib/, among other places.
   
   When using a static library, the linker finds the bits that the
   program modules need, and physically copies them into the executable
   output file that it generates. For shared libraries, it doesn't ---
   instead it leaves a note in the output saying `when this program is
   run, it will first have to load this library'. Obviously shared
   libraries tend to make for smaller executables; they also use less
   memory and mean that less disk space is used. The default behaviour of
   Linux is to link shared if it can find the shared libraries, static
   otherwise. If you're getting static binaries when you want shared,
   check that the shared library files (*.sa for a.out, *.so for ELF) are
   where they should be, and are readable.
   
   On Linux, static libraries have names like libname.a, while shared
   libraries are called libname.so.x.y.z where x.y.z is some form of
   version number. Shared libraries often also have links pointing to
   them, which are important, and (on a.out configurations) associated
   .sa files. The standard libraries come in both shared and static
   formats.
   
   You can find out what shared libraries a program requires by using ldd
   (List Dynamic Dependencies)
$ ldd /usr/bin/lynx
        libncurses.so.1 => /usr/lib/libncurses.so.1.9.6
        libc.so.5 => /lib/libc.so.5.2.18

   This shows that on my system the WWW browser `lynx' depends on the
   presence of libc.so.5 (the C library) and libncurses.so.1 (used for
   terminal control). If a program has no dependencies, ldd will say
   `statically linked' or `statically linked (ELF)'.
     _________________________________________________________________
   
Interrogating libraries (`which library is sin() in?')

   nm libraryname should list all the symbols that libraryname has
   references to. It works on both static and shared libraries. Suppose
   that you want to know where tcgetattr() is defined: you might do
   
$ nm libncurses.so.1 |grep tcget
         U tcgetattr

   The U stands for `undefined' --- it shows that the ncurses library
   uses but does not define it. You could also do
   
$ nm libc.so.5 | grep tcget
00010fe8 T __tcgetattr
00010fe8 W tcgetattr
00068718 T tcgetpgrp

   The `W' stands for `weak', which means that the symbol is defined, but
   in such a way that it can be overridden by another definition in a
   different library. A straightforward `normal' definition (such as the
   one for tcgetpgrp) is marked by a `T'
   
   The short answer to the question in the title, by the way, is
   libm.(so|a). All the functions defined in <math.h> are kept in the
   maths library; thus you need to link with -lm when using any of them.
     _________________________________________________________________
   
Finding files

   ld: Output file requires shared library `libfoo.so.1`
   
   The file search strategy of ld and friends varies according to
   version, but the only default you can reasonably assume is /usr/lib.
   If you want libraries elsewhere to be searched, specify their
   directories with the -L option to gcc or ld.
   
   If that doesn't help, check that you have the right file in that
   place. For a.out, linking with -lfoo makes ld look for libfoo.sa
   (shared stubs), and if unsuccessful then for libfoo.a (static). For
   ELF, it looks for libfoo.so then libfoo.a. libfoo.so is usually a
   symbolic link to libfoo.so.x.
     _________________________________________________________________
   
Building your own libraries

Version control

   As any other program, libraries tend to have bugs which get fixed over
   time. They also may introduce new features, change the effect of
   existing ones, or remove old ones. This could be a problem for
   programs using them; what if it was depending on that old feature?
   
   So, we introduce library versioning. We categorise the changes that
   might be made to a library as `minor' or `major', and we rule that a
   `minor' change is not allowed to break old programs that are using the
   library. You can tell the version of a library by looking at its
   filename (actually, this is, strictly speaking, a lie for ELF; keep
   reading to find out why) : libfoo.so.1.2 has major version 1, minor
   version 2. The minor version number can be more or less anything ---
   libc puts a `patchlevel' in it, giving library names like
   libc.so.5.2.18, and it's also reasonable to put letters, underscores,
   or more or less any printable ASCII in it.
   
   One of the major differences between ELF and a.out format is in
   building shared libraries. We look at ELF first, because it's simpler.
     _________________________________________________________________
   
ELF? What is it then, anyway?

   ELF (Executable and Linking Format) is a binary format originally
   developed by USL (UNIX System Laboratories) and currently used in
   Solaris and System V Release 4. Because of its increased flexibility
   over the older a.out format that Linux was using, the GCC and C
   library developers decided last year to move to using ELF as the Linux
   standard binary format also.
     _________________________________________________________________
   
Come again?

   This section is from the document '/news-archives/comp.sys.sun.misc'.
   
   "ELF ("Executable Linking Format) is the "new, improved" object file
   format introduced in SVR4. ELF is much more powerful than straight
   COFF, in that it *is* user-extensible. ELF views an object-file as an
   arbitarily long list of sections (rather than an array of fixed size
   entities), these sections, unlike in COFF, do not HAVE to be in a
   certain place and do not HAVE to come in any specific order etc. Users
   can add new sections to object-files if they wish to capture new data.
   ELF also has a far more powerful debugging format called DWARF
   (Debugging With Attribute Record Format) - not currently fully
   supported on linux (but work is underway). A linked list of DWARF DIEs
   (or Debugging Information Entries) forms the .debug section in ELF.
   Instead of being a collection of small, fixed-size information
   records, DWARF DIEs each contain an arbitrarily long list of complex
   attributes and are written out as a scope-based tree of program data.
   DIEs can capture a large amount of information that the COFF .debug
   section simply couldn't (like C++ inheritance graphs etc.)." "ELF
   files are accessed via the SVR4 (Solaris 2.0 ?) ELF access library,
   which provides an easy and fast interface to the more gory parts of
   ELF. One of the major boons in using the ELF access library is that
   you will never need to look at an ELF file qua. UNIX file, it is
   accessed as an Elf *, after an elf_open() call and from then on, you
   perform elf_foobar() calls on its components instead of messing about
   with its actual on-disk image (something many COFFers did with
   impunity). "
   
   The case for/against ELF, and the necessary contortions to upgrade an
   a.out system to support it, are covered in the ELF-HOWTO and I don't
   propose to cut/paste them here. The HOWTO should be available in the
   same place as you found this one.
     _________________________________________________________________
   
ELF shared libraries

   To build libfoo.so as a shared library, the basic steps look like
   this:
   
$ gcc -fPIC -c *.c
$ gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 *.o
$ ln -s libfoo.so.1.0 libfoo.so.1
$ ln -s libfoo.so.1 libfoo.so
$ LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH

   This will generate a shared library called libfoo.so.1.0, and the
   appropriate links for ld (libfoo.so) and the dynamic loader
   (libfoo.so.1) to find it. To test, we add the current directory to
   LD_LIBRARY_PATH.
   
   When you're happpy that the library works, you'll have to move it to,
   say, /usr/local/lib, and recreate the appropriate links. The link from
   libfoo.so.1 to libfoo.so.1.0 is kept up to date by ldconfig, which on
   most systems is run as part of the boot process. The libfoo.so link
   must be updated manually. If you are scrupulous about upgrading all
   the parts of a library (e.g. the header files) at the same time, the
   simplest thing to do is make libfoo.so -> libfoo.so.1, so that
   ldconfig will keep both links current for you. If you aren't, you're
   setting yourself up to have all kinds of weird things happen at a
   later date. Don't say you weren't warned.
   
$ su
# cp libfoo.so.1.0 /usr/local/lib
# /sbin/ldconfig
# ( cd /usr/local/lib ; ln -s libfoo.so.1 libfoo.so )
     _________________________________________________________________
   
Version numbering, sonames and symlinks

   Each library has a soname. When the linker finds one of these in a
   library it is searching, it embeds the soname into the binary instead
   of the actual filename it is looking at. At runtime, the dynamic
   loader will then search for a file with the name of the soname, not
   the library filename. Thus a library called libfoo.so could have a
   soname libbar.so, and all programs linked to it would look for
   libbar.so instead when they started.
   
   This sounds like a pointless feature, but it is key to understanding
   how multiple versions of the same library can coexist on a system. The
   de facto naming standard for libraries in Linux is to call the
   library, say, libfoo.so.1.2, and give it a soname of libfoo.so.1. If
   it's added to a `standard' library directory (e.g. /usr/lib), ldconfig
   will create a symlink libfoo.so.1 -> libfoo.so.1.2 so that the
   appropriate image is found at runtime. You also need a link libfoo.so
   -> libfoo.so.1 so that ld will find the right soname to use at link
   time.
   
   So, when you fix bugs in the library, or add new functions (any
   changes that won't adversely affect existing programs), you rebuild
   it, keeping the soname as it was, and changing the filename. When you
   make changes to the library that would break existing binaries, you
   simply increment the number in the soname --- in this case, call the
   new version libfoo.so.2.0, and give it a soname of libfoo.so.2. Now
   switch the libfoo.so link to point to the new version and all's well
   with the world again.
   
   Note that you don't have to name libraries this way, but it's a good
   convention. ELF gives you the flexibility to name libraries in ways
   that will confuse the pants off people, but that doesn't mean you have
   to use it.
   
   Executive summary: supposing that you observe the tradition that major
   upgrades may break compatibility, minor upgrades may not, then link
   with
   
gcc -shared -Wl,-soname,libfoo.so.major -o libfoo.so.major.minor

   and everything will be all right.
     _________________________________________________________________
   
a.out. Ye olde traditional format

   The ease of building shared libraries is a major reason for upgrading
   to ELF. That said, it's still possible in a.out. Get and read the 20
   page document that you will find after unpacking it. I hate to be so
   transparently partisan, but it should be clear from context that I
   never bothered myself :-)
     _________________________________________________________________
   
ZMAGIC vs QMAGIC

   QMAGIC is an executable format just like the old a.out (also known as
   ZMAGIC) binaries, but which leaves the first page unmapped. This
   allows for easier NULL dereference trapping as no mapping exists in
   the range 0-4096. As a side effect your binaries are nominally smaller
   as well (by about 1K).
   
   Obsolescent linkers support ZMAGIC only, semi-obsolescent support both
   formats, and current versions support QMAGIC only. This doesn't
   actually matter, though, as the kernel can still run both formats.
   
   Your `file' command should be able to identify whether a program is
   QMAGIC.
     _________________________________________________________________
   
File Placement

   An a.out (DLL) shared library consists of two real files and a
   symlink. For the `foo' library used throughout this document as an
   example, these files would be libfoo.sa and libfoo.so.1.2; the symlink
   would be libfoo.so.1 and would point at the latter of the files. What
   are these for?
   
   At compile time, ld looks for libfoo.sa. This is the `stub' file for
   the library, and contains all exported data and pointers to the
   functions required for run time linking.
   
   At run time, the dynamic loader looks for libfoo.so.1. This is a
   symlink rather than a real file so that libraries can be updated with
   newer, bugfixed versions without crashing any application that was
   using the library at the time. After the new version --- say,
   libfoo.so.1.3 --- is completely there, running ldconfig will switch
   the link to point to it in one atomic operation, leaving any program
   which had the old version still perfectly happy.
   
   DLL libraries (I know that's a tautology --- so sue me) often appear
   bigger than their static counterparts. They reserve space for future
   expansion in the form of `holes' which can be made to take no disk
   space. A simple cp call or using the program makehole will achieve
   this. You can also strip them after building, as the addresses are in
   fixed locations. Do not attempt to strip ELF libraries.
     _________________________________________________________________
   
``libc-lite''?

   A libc-lite is a light-weight version of the libc library built such
   that it will fit on a floppy and suffice for all of the most menial of
   UNIX tasks. It does not include curses, dbm, termcap etc code. If your
   /lib/libc.so.4 is linked to a lite lib, you are advised to replace it
   with a full version.
     _________________________________________________________________
   
Linking: common problems

   Send me your linking problems! I probably won't do anything about
   them, but I will write them up if I get enough ...
   
   Programs link static when you wanted them shared
          Check that you have the right links for ld to find each shared
          library. For ELF this means a libfoo.so symlink to the image,
          for a.out a libfoo.sa file. A lot of people had this problem
          after moving from ELF binutils 2.5 to 2.6 --- the earlier
          version searched more `intelligently' for shared libraries, so
          they hadn't created all the links. The intelligent behaviour
          was removed for compatibility with other architectures, and
          because quite often it got its assumptions wrong and caused
          more trouble than it solved.
          
   The DLL tool `mkimage' fails to find libgcc, or
          As of libc.so.4.5.x and above, libgcc is no longer shared.
          Hence you must replace occurrences of `-lgcc' on the offending
          line with `gcc -print-libgcc-file-name` (complete with the
          backquotes).
          
          Also, delete all /usr/lib/libgcc* files. This is important.
          
   __NEEDS_SHRLIB_libc_4 multiply defined messages
          are another consequence of the same problem.
          
   ``Assertion failure'' message when rebuilding a DLL ?
          This cryptic message most probably means that one of your jump
          table slots has overflowed because too little space has been
          reserved in the original jump.vars file. You can locate the
          culprit(s) by running the `getsize' command provided in the
          tools-2.17.tar.gz package. Probably the only solution, though,
          is to bump the major version number of the library, forcing it
          to be backward incompatible.
          
   ld: output file needs shared library libc.so.4
          This usually happens when you are linking with libraries other
          than libc (e.g. X libraries), and use the -g switch on the link
          line without also using -static.
          
          The .sa stubs for the shared libraries usually have an
          undefined symbol _NEEDS_SHRLIB_libc_4 which gets resolved from
          the libc.sa stub. However with -g you end up linking with
          libg.a or libc.a and thus this symbol never gets resolved,
          leading to the above error message.
          
          In conclusion, add -static when compiling with the -g flag, or
          don't link with -g. Quite often you can get enough debugging
          information by compiling the individual files with -g, and
          linking without it.
     _________________________________________________________________
   
Dynamic Loading

   This section is a tad short right now; it will be expanded over time
   as I gut the ELF howto 
     _________________________________________________________________
   
Concepts

   Linux has shared libraries, as you will by now be sick of hearing if
   you read the whole of the last section at a sitting. Some of the
   matching-names-to-places work which was traditionally done at link
   time must be deferred to load time.
     _________________________________________________________________
   
Error messages

   Send me your link errors! I won't do anything about them, but I might
   write them up ...
   
   can't load library: /lib/libxxx.so, Incompatible version
          (a.out only) This means that you don't have the correct major
          version of the xxx library. No, you can't just make a symlink
          to another version that you do have; if you are lucky this will
          cause your program to segfault. Get the new version. A similar
          situation with ELF will result in a message like
          
ftp: can't load library 'libreadline.so.2'

   warning using incompatible library version xxx
          (a.out only) You have an older minor version of the library
          than the person who compiled the program used. The program will
          still run. Probably. An upgrade wouldn't hurt, though.
     _________________________________________________________________
   
Controlling the operation of the dynamic loader

   There are a range of environment variables that the dynamic loader
   will respond to. Most of these are more use to ldd than they are to
   the average user, and can most conveniently be set by running ldd with
   various switches. They include
   
     * LD_BIND_NOW --- normally, functions are not `looked up' in
       libraries until they are called. Setting this flag causes all the
       lookups to happen when the library is loaded, giving a slower
       startup time. It's useful when you want to test a program to make
       sure that everything is linked.
     * LD_PRELOAD can be set to a file containing `overriding' function
       definitions. For example, if you were testing memory allocation
       strategies, and wanted to replace `malloc', you could write your
       replacement routine, compile it into malloc.o and then
       
$ LD_PRELOAD=malloc.o; export LD_PRELOAD
$ some_test_program

       LD_ELF_PRELOAD and LD_AOUT_PRELOAD are similar, but only apply to
       the appropriate type of binary. If LD_something_PRELOAD and
       LD_PRELOAD are set, the more specific one is used.
     * LD_LIBRARY_PATH is a colon-separated list of directories in which
       to look for shared libraries. It does not affect ld; it only has
       effect at runtime. Also, it is disabled for programs that run
       setuid or setgid. Again, LD_ELF_LIBRARY_PATH and
       LD_AOUT_LIBRARY_PATH can also be used to direct the search
       differently for different flavours of binary. LD_LIBRARY_PATH
       shouldn't be necessary in normal operation; add the directories to
       /etc/ld.so.conf/ and rerun ldconfig instead.
     * LD_NOWARN applies to a.out only. When set (e.g. with
       LD_NOWARN=true; export LD_NOWARN) it stops the loader from issuing
       non-fatal warnings (such as minor version incompatibility
       messages).
     * LD_WARN applies to ELF only. When set, it turns the usually fatal
       ``Can't find library'' messages into warnings. It's not much use
       in normal operation, but important for ldd.
     * LD_TRACE_LOADED_OBJECTS applies to ELF only, and causes programs
       to think they're being run under ldd:
       
$ LD_TRACE_LOADED_OBJECTS=true /usr/bin/lynx
        libncurses.so.1 => /usr/lib/libncurses.so.1.9.6
        libc.so.5 => /lib/libc.so.5.2.18
     _________________________________________________________________
   
Writing programs with dynamic loading

   This is very close to the way that Solaris 2.x dynamic loading support
   works, if you're familiar with that. It is covered extensively in H J
   Lu's ELF programming document, and the dlopen(3) manual page, which
   can be found in the ld.so package. Here's a nice simple example
   though: link it with -ldl
   
#include <dlfcn.h>
#include <stdio.h>

main()
{
  void *libc;
  void (*printf_call)();

  if(libc=dlopen("/lib/libc.so.5",RTLD_LAZY))
  {
    printf_call=dlsym(libc,"printf");
    (*printf_call)("hello, world\n");
  }

}
     _________________________________________________________________
   
Contacting the developers

Bug reports

   Start by narrowing the problem down. Is it specific to Linux, or does
   it happen with gcc on other systems? Is it specific to the kernel
   version? Library version? Does it go away if you link static? Can you
   trim the program down to something short that demonstrates the bug?
   
   Having done that, you'll know what program(s) the bug is in. For GCC,
   the bug reporting procedure is explained in the info file. For ld.so
   or the C or maths libraries, send mail to linux-gcc@vger.rutgers.edu.
   If possible, include a short and self-contained program that exhibits
   the bug, and a description both of what you want it to do, and what it
   actually does.
     _________________________________________________________________
   
Helping with development

   If you want to help with the development effort for GCC or the C
   library, the first thing to do is join the linux-gcc@vger.rutgers.edu
   mailing list. If you just want to see what the discussion is about,
   there are list archives at . The second and subsequent things depend
   on what you want to do!
     _________________________________________________________________
   
The Remains

The Credits

   " Only presidents, editors, and people with tapeworms have the right
   to use the editorial ``we''." (Mark Twain)
   
   This HOWTO is based very closely on Mitchum DSouza's GCC-FAQ; most of
   the information (not to mention a reasonable amount of the text) in it
   comes directly from that document. Instances of the first person
   pronoun in this HOWTO could refer to either of us; generally the ones
   that say ``I have not tested this; don't blame me if it toasts your
   hard disk/system/spouse'' apply to both of us.
   
   Contributors to this document have included (in ASCII ordering by
   first name) Andrew Tefft, Axel Boldt, Bill Metzenthen, Bruce Evans,
   Bruno Haible, Daniel Barlow, Daniel Quinlan, David Engel, Dirk
   Hohndel, Eric Youngdale, Fergus Henderson, H.J. Lu, Jens Schweikhardt,
   Kai Petzke, Michael Meissner, Mitchum DSouza, Olaf Flebbe, Paul
   Gortmaker, Rik Faith, Steven S. Dick, Tuomas J Lukka, and of course
   Linus Torvalds, without whom the whole exercise would have been
   pointless, let alone impossible :-)
   
   Please do not feel offended if your name has not appeared here and you
   have contributed to this document (either as HOWTO or as FAQ). Email
   me and I will rectify it.
     _________________________________________________________________
   
Translations

     * French, Eric Dumas
       <[48]dumas@freenix.fr>
       http://www.freenix.fr/unix/linux/HOWTO/GCC-HOWTO.html
     * Italian, Andrea Girotto
       <[49]andrea.girotto@usa.net>
       http://www.pluto.linux.it/ildp/HOWTO/GCC-HOWTO.html
     * Japanese,
       <[50]nakano@apm.seikei.ac.jp>
     _________________________________________________________________
   
Feedback

   is welcomed. Mail me at [51]daniel.barlow@linux.org. My PGP public key
   (ID 5F263625) is available from my [52]web pages, if you feel the need
   to be secretive about things.
     _________________________________________________________________
   
Legalese

   All trademarks used in this document are acknowledged as being owned
   by their respective owners.
   
   This document is copyright (C) 1996,1999 Daniel Barlow
   <dan@detached.demon.co.uk>. It may be reproduced and distributed in
   whole or in part, in any medium physical or electronic, as long as
   this copyright notice is retained on all copies. Commercial
   redistribution is allowed and encouraged; however, the author would
   like to be notified of any such distributions.
   
   All translations, derivative works, or aggregate works incorporating
   any Linux HOWTO documents must be covered under this copyright notice.
   That is, you may not produce a derivative work from a HOWTO and impose
   additional restrictions on its distribution. Exceptions to these rules
   may be granted under certain conditions; please contact the Linux
   HOWTO coordinator at the address given below.
   
   In short, we wish to promote dissemination of this information through
   as many channels as possible. However, we do wish to retain copyright
   on the HOWTO documents, and would like to be notified of any plans to
   redistribute the HOWTOs.
   
   If you have questions, please contact Tim Bynum, the Linux HOWTO
   coordinator, at linux-howto@sunsite.unc.edu via email.

References

   Visible links
   1. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN17
   2. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN19
   3. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#INDEX.3
   4. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN48
   5. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN63
   6. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN123
   7. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#INDEX.12
   8. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN165
   9. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#INDEX.17
  10. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN236
  11. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN250
  12. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#INDEX.25
  13. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN265
  14. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN327
  15. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN501
  16. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#INDEX.58
  17. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#INDEX.59
  18. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN569
  19. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN575
  20. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN579
  21. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#INDEX.67
  22. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN628
  23. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN643
  24. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN796
  25. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN800
  26. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN803
  27. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#INDEX.80
  28. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#INDEX.82
  29. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN867
  30. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#INDEX.84
  31. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN876
  32. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN881
  33. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN883
  34. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN890
  35. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN905
  36. file://localhost/export/sunsite/users/gferg/work/00_GCC-HOWTO.html#AEN910
  37. http://www.debian.org/
  38. http://metalab.unc.edu/LDP/HOWTO/
  39. http://www.telent.net/linux/linux/gcc-howto/
  40. ftp://tsx-11.mit.edu/pub/linux/packages/GCC/
  41. ftp://sunsite.unc.edu/pub/Linux/docs/
  42. ftp://prep.ai.mit.edu/pub/gnu/
  43. ftp://tsx-11.mit.edu/pub/linux/packages/GCC/
  44. ftp://tsx-11.mit.edu/pub/linux/packages/GCC/
  45. ftp://tsx-11.mit.edu/pub/linux/packages/GCC/
  46. ftp://prep.ai.mit.edu/pub/gnu
  47. ftp://tsx-11.mit.edu/pub/linux/packages/GCC
  48. mailto:dumas@freenix.fr
  49. mailto:andrea.girotto@usa.net
  50. mailto:nakano@apm.seikei.ac.jp
  51. mailto:daniel.barlow@linux.org
  52. http://www.telent.net/#pgp

   Hidden links:
  53. ftp://tsx-11.mit.edu/pub/linux/packages/GCC/
  54. ftp://tsx-11.mit.edu/pub/linux/packages/GCC/
  55. ftp://sunsite.unc.edu/pub/Linux/devel/msdos
  56. ftp://prep.ai.mit.edu/pub/gnu
  57. ftp://larch.lcs.mit.edu/pub/Larch/lclint
  58. ftp://ftp.x.org/contrib/xxgdb-1.08.tar.gz
  59. ftp://sunsite.unc.edu/pub/Linux/devel/debuggers/
  60. ftp://ftp.x.org/contrib/ups-2.45.2.tar.Z
  61. ftp://ftp.std.com/pub/jrs/
  62. ftp://tsx-11.mit.edu/pub/linux/packages/GCC/src/tools-2.17.tar.gz
  63. http://homer.ncm.com/linux-gcc/
  Glibc 2 HOWTO
  Eric Green, ejg3@cornell.edu
  v1.6, 22 June 1998

  The glibc 2 HOWTO covers installing and using the GNU C Library ver-
  sion 2 (libc 6) on Linux systems.
  ______________________________________________________________________

  Table of Contents



  1. Introduction.

     1.1 About glibc 2.
     1.2 About this document.
     1.3 Recent changes in this document.

  2. Choosing your installation method.

  3. Getting the library.

  4. Installing as a test library.

     4.1 Compiling and installing.
        4.1.1 Prerequisites.
        4.1.2 Extracting the source.
        4.1.3 Configuring.
        4.1.4 Compiling and installing.
     4.2 Updating the dynamic loader.
     4.3 Configuring for gcc.
     4.4 Updating header file links.
     4.5 Testing your installation.

  5. Installing as the primary C library.

     5.1 Building the library from source.
        5.1.1 Prerequisites.
        5.1.2 Extracting the source.
        5.1.3 Configuring.
        5.1.4 Compiling.
     5.2 Preparing for installation.
     5.3 Installing from the binary package.
     5.4 Installing from the source.
     5.5 Updating the gcc specs.
     5.6 Testing your installation.

  6. Compiling with the non-primary libc.

     6.1 A warning when using non-primary libcs.
     6.2 Compiling programs with a test glibc.
     6.3 Compiling programs with libc 5 when glibc is primary library.

  7. Compiling C++ programs.

     7.1 Installing libg++ for a test glibc install.
     7.2 Installing libg++ for a primary glibc install.
     7.3 Compiling C++ programs with the non-primary libc.

  8. Problems.

     8.1 Host names do not resolve.

  9. Reporting bugs.

  10. Sample specs file.

  11. Miscellanea.

     11.1 Further information.
        11.1.1 Web pages.
        11.1.2 Newgroups.
        11.1.3 Mailing lists.
     11.2 Credits.
     11.3 Feedback.
     11.4 Copyright.


  ______________________________________________________________________

  1.  Introduction.



  1.1.  About glibc 2.


  Glibc 2 is the latest version of the GNU C Library. It currently runs
  unmodified on GNU Hurd systems and Linux i386, m68k, and alpha
  systems.  Support for Linux PowerPC, MIPS, Sparc, Sparc 64, and Arm
  will be in version 2.1.  In the future support for other architectures
  and operating systems will be added.

  On Linux, glibc 2 is used as the libc with major version 6, the
  successor of the Linux libc 5.  It is intended by the Linux libc
  developers to eventually replace libc 5.  As of 2.0.6, glibc is
  considered production quality.  Version 2.1 (due out in the near
  future) will be ready for main stream use along with adding more ports
  and features.

  There are three optional add-ons available for glibc 2:

     Crypt
        The UFC-crypt package.  It is seperate  because of export
        restrictions.

     LinuxThreads
        An implementation of the Posix 1003.1c "pthread" interface.

     Locale data
        Contains the data needed to build the locale data files to use
        the internationalization features of the glibc.

  The crypt and LinuxThreads add-ons are strongly recommended... not
  using them risks to be incompatible with the libraries of other
  systems.  (If you do not wish to use them, you must add the option
  --disable-sanity-checks when you run configure.)


  1.2.  About this document.


  This HOWTO covers installing the glibc 2 library on an existing Linux
  system.  It is tailored for users of Intel based systems currently
  using libc 5, but users of other systems and alternate libraries (such
  as glibc 1) should be able to use this information by substituting the
  proper filenames and architecture names in the appropriate places.

  The latest copy of this HOWTO can be found as part of the Linux
  Documentation Project <http://sunsite.unc.edu/LDP> or from
  <http://www.imaxx.net/~thrytis/glibc/Glibc2-HOWTO.html>.


  1.3.  Recent changes in this document.


  Differences between version 1.6 and 1.5:

  o  Fixed the install instructions of the binary glibc package.

  Differences between version 1.5 and 1.4:

  o  Indexing added Ed Bailey.

  o  Changed my email address.



  2.  Choosing your installation method.


  There are a few ways to install glibc.  You can install the libraries
  as a test, using the existing libraries as the default but letting you
  try the new libraries by using different options when compiling your
  program.  Installing in this way also makes it easy to remove glibc in
  the future (though any program linked with glibc will no longer work
  after the libraries are removed). Using glibc as a test library
  requires you to compile the libraries from source.  There is no binary
  distribution for installing libraries this way.  This installation is
  described in ``Installing as a test library''.

  The other way described in this document to install is using glibc as
  your primary library.  All new programs that you compile on your
  system will use glibc, though you can link programs with your old
  libraries using different options while compiling.  You can either
  install the libraries from binaries, or compile the library yourself.
  If you want to change optimization or configuration options, or use an
  add-on which is not distributed as a binary package, you must get the
  source distribution and compile.  This installation procedure is
  described in ``Installing as the primary C library''.

  Frodo Looijaard describes yet another way of installing glibc.  His
  method involves installing glibc as a secondary library and setting up
  a cross compiler to compile using glibc.  The installation procedure
  for this method is more complicated then the test library install
  described in this document, but allows for easier compiling when
  linking to glibc.  This method is described in his Installing glibc-2
  on Linux <http://huizen.dds.nl/~frodol/glibc/> document.

  If you are currently running Debian 1.3 but do not want to upgrade to
  the unstable version of Debian to use glibc, the Debian libc5 to libc6
  Mini-HOWTO <http://www.gate.net/~storm/FAQ/libc5-libc6-Mini-
  HOWTO.html> describes how to use Debian packages to upgrade your
  system.

  If you are installing glibc 2 on an important system, you might want
  to use the test install.  Even if there are no bugs, some programs
  will need to be modified before they will compile due to changes in
  function prototypes and types.



  3.  Getting the library.


  The glibc 2 consists of the glibc package and three optional add-on
  packages, LinuxThreads, Locale, and Crypt.  The source can be found at

  o  <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.6.tar.gz>

  o  <ftp://prep.ai.mit.edu/pub/gnu/glibc-linuxthreads-2.0.6.tar.gz>

  o  <ftp://prep.ai.mit.edu/pub/gnu/glibc-localedata-2.0.6.tar.gz>

  o  <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.6.tar.gz>

  It will take about 150 MB of disk space for the full compile and
  install.  The basic binary install of just the core library package is
  about 50 MB.

  Binary packages for 2.0.6 are not available.  Version 2.0.4 binary
  packages are available for i386 and m68k, and version 2.0.1 for the
  alpha can be found at

  o  Intel x86:

  o  <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.4.bin.i386.tar.gz>

  o  <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.4.bin.i386.tar.gz>

  o  Alpha:

  o  <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.1.bin.alpha-linux.tar.gz>

  o  <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.1.bin.alpha-
     linux.tar.gz>

  o  m68k:

  o  <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.4-m68k-linux.bin.tar.gz>

  o  <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.4-m68k-
     linux.bin.tar.gz>

     There are export restrictions on the crypt add-on.  Non-US users
     should get it from  <ftp://ftp.ifi.uio.no/pub/gnu>.

  If you are running a Red Hat distribution, you can get rpms for glibc
  2 from <ftp://ftp.redhat.com/pub/redhat/>.  Glibc 2 is the primary C
  library for the new Red Hat distribution 5.0.

  If you are running a Debian distribution, you can get the packages for
  glibc 2 from  <ftp://ftp.debian.org/debian/dists/unstable/main/>.  The
  files are named libc6.  Glibc 2 is now part of the base package of the
  hamm version of Debian, and will be the primary libc when Debian 2.0
  is released.



  4.  Installing as a test library.


  This section covers installing glibc 2 as a test library.  Anything
  you compile will be linked to your existing libraries unless you give
  some extra parameters to link to the new libraries.  It appears that
  the paths are compiled into quite a few files, so you probably have to
  install the library from source.


  4.1.  Compiling and installing.



  4.1.1.  Prerequisites.



  o  About 150 MB free disk space

  o  GNU make 3.75

  o  gcc >= 2.7.2 (better 2.7.2.1)

  o  binutils 2.8.1 (for alpha you need a snapshot)


  o  bash 2.0

  o  autoconf 2.12 (if you change configure.in)

  o  texinfo 3.11

  On an i586@133 with 64 MB of RAM, it takes about 3 hours to compile
  with full libraries with add-ons.  On a loaded i686@200, it takes
  about half an hour.


  4.1.2.  Extracting the source.


  You need to extract the source from the archives so you can compile
  it.  The best way to do this is:


        tar xzf glibc-2.0.6.tar.gz
        cd glibc-2.0.6
        tar xzf ../glibc-linuxthreads-2.0.6.tar.gz
        tar xzf ../glibc-crypt-2.0.6.tar.gz
        tar xzf ../glibc-localedata-2.0.6.tar.gz



  This will put linuxthreads, crypt, and localedata directories in the
  glibc-2.0.6 directory where configure can find these add-ons.


  4.1.3.  Configuring.


  In the glibc-2.0.6 directory, create a directory named compile, and cd
  into it.  All work will be done in this directory, which will simplify
  cleaning up.  (The developers have not been very concerned with
  getting 'make clean' perfect yet.)


        mkdir compile
        cd compile



  Run ../configure.  To use the add-on packages, you need to specify
  them with --enable-add-ons, such as --enable-add-ons=linux-
  threads,crypt,localedata.  You also need to choose a destination
  directory to install to.  /usr/i486-linuxglibc2 is a good choice.  The
  configure line for this would be:


        ../configure --enable-add-ons=linuxthreads,crypt,localedata --prefix=/usr/i486-linuxglibc2



  4.1.4.  Compiling and installing.



  To compile and verify, run:


        make
        make check



  If the 'make check' succeeds, install the library as root (while still
  in the compile/ directory):


        make install



  4.2.  Updating the dynamic loader.



  1. Create a link from the new ld.so to /lib/ld-linux.so.2:


        ln -s /usr/i486-linuxglibc2/lib/ld-linux.so.2 /lib/ld-linux.so.2



  This is the only library where the location is fixed once a program is
  linked, and using a link in /lib will ease upgrading to glibc as your
  primary C library when the stable version is released.

  2. Edit /etc/ld.so.conf.  You need to add path to the lib directory
     the new libraries reside in at the end of the file, which will be
     <prefix>/lib, such as /usr/i486-linuxglibc2/lib for the choice
     above.  After you have modified /etc/ld.so.conf, run


        ldconfig -v



  4.3.  Configuring for gcc.

  The last step of installation is updating /usr/lib/gcc-lib so gcc
  knows how to use the new libraries.  First you need to duplicate the
  existing configuration.  To find out which configuration is current,
  use the -v option of gcc:


        % gcc -v
        Reading specs from /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2/specs
        gcc version 2.7.2.2



  In this case, i486-unknown-linux is the system, and 2.7.2.2 is the
  version.  You need to copy the /usr/lib/gcc-lib/<system> to the new
  test system directory:


        cd /usr/lib/gcc-lib/
        cp -r i486-unknown-linux i486-linuxglibc2



  Change into your new test system directory and version directory


        cd /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2



  and edit the file specs found in this directory.  In this file, change
  /lib/ld-linux.so.1 to /lib/ld-linux.so.2.  You also need to remove all
  expressions %{...:-lgmon} in the file, since glibc does not use the
  gmon library for profiling.  A sample specs file can be found in the
  ``Sample specs file'' section.


  4.4.  Updating header file links.


  You need create links in your new include directory to other include
  directories:


        cd /usr/i486-linuxglibc2/include
        ln -s /usr/src/linux/include/linux
        ln -s /usr/src/linux/include/asm
        ln -s /usr/X11R6/include/X11



  You might also have other libraries such as ncurses which need their
  header files put in this directory.  You should copy or link the files
  from /usr/include.  (Some libraries may need to be recompiled with
  glibc2 in order to work with it.  In these cases, just compile and
  install the package to /usr/i486-linuxglibc2.)


  4.5.  Testing your installation.


  To test the installation, create the following program in a file
  glibc.c:


        #include <stdio.h>

        main()
        {
            printf("hello world!\n");
        }


  and compile with the options of "-b <base install directory> -nostdinc
  -I<install directory>/include -I/usr/lib/gcc-lib/<new system dir>/<gcc
  version>/include":


        % gcc -b i486-linuxglibc2 -nostdinc -I/usr/i486-linuxglibc2/include -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include glibc.c -o glibc



  Use ldd to verify the program was linked with glibc2, and not your old
  libc:


        % ldd glibc
        libc.so.6 => /usr/i486-linuxglibc2/lib/libc-2.0.6.so (0x4000d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)



  If it compiles, the links check out, and it generates "hello world!"
  when run, the installation succeeded.



  5.  Installing as the primary C library.


  This section covers installing glibc 2 as your primary C library.  Any
  new programs you compile will be linked with this library, unless you
  use special compile options to link with another version.

  If you are are using Redhat or Debian and have downloaded the
  appropriate rpm or deb files, see the Redhat or Debian installion
  instructions.  You can then skip this section.



  5.1.  Building the library from source.


  This section explains how to compile glibc 2 and add-ons from the
  sources.  You must compile the library if you want to change
  optimization or configuration options or use a package you do not have
  the binaries for.


  5.1.1.  Prerequisites.



  o  About 150 MB free disk space

  o  GNU make 3.75

  o  gcc >= 2.7.2 (better 2.7.2.1)

  o  binutils 2.8.1 (for alpha you need a snapshot)

  o  bash 2.0


  o  autoconf 2.12 (if you change configure.in)

  o  texinfo 3.11

  On an i586@133 with 64 MB of RAM, it takes about 3 hours to compile
  with full libraries with add-ons.  On a loaded i686@200, it takes
  about half an hour.


  5.1.2.  Extracting the source.


  You need to extract the source from the archives so you can compile
  it.  The best way to do this is:


        tar xzf glibc-2.0.6.tar.gz
        cd glibc-2.0.6
        tar xzf ../glibc-linuxthreads-2.0.6.tar.gz
        tar xzf ../glibc-crypt-2.0.6.tar.gz
        tar xzf ../glibc-localedata-2.0.6.tar.gz



  This will put linuxthreads, crypt, and localedata directories in the
  glibc-2.0.6 directory where configure can find these add-ons.


  5.1.3.  Configuring.


  In the glibc-2.0.6 directory, create a directory named compile, and cd
  into it.  All work will be done in this directory, which will simplify
  cleaning up.  (The developers have not been very concerned with
  getting 'make clean' perfect yet.)


       mkdir compile
       cd compile



  Run ../configure.  To use the add-on packages, you need to specify
  them with --enable-add-ons, such as --enable-add-ons=linux-
  threads,crypt,localedata.  You probably will also want to specify
  paths where it will be installed.  To match the standard linux distri-
  butions, specify --prefix=/usr.  (When a prefix of /usr is specified
  on a linux system, configure knows to adjust other paths to place
  libc.so and other important libraries in /lib.)  The whole configure
  line would be:


        ../configure --enable-add-ons=linuxthreads,crypt,localedata --prefix=/usr



  5.1.4.  Compiling.


  To compile and verify, run:

   make
   make check



  5.2.  Preparing for installation.


  Now you need to move some files around to prepare for the new library,
  whether you are installing from source or binaries.  Any new program
  compiled will be linked to glibc, but old programs which are not
  statically linked will still depend on libc 5, so you can not just
  overwrite the old version.


  1. Create a new directory to hold the old files to:


        mkdir -p /usr/i486-linuxlibc5/lib



  2. The old header files must be evacuated from /usr/include:


        mv /usr/include /usr/i486-linuxlibc5/include



  3. Create a new include directory and set up the links to other
     include directories:


        mkdir /usr/include

        ln -s /usr/src/linux/include/linux /usr/include/linux
        ln -s /usr/src/linux/include/asm /usr/include/asm
        ln -s /usr/X11R6/include/X11 /usr/include/X11
        ln -s /usr/lib/g++-include /usr/include/g++



  The links may need adjusting according to your distribution.  At least
  Slackware puts g++ headers in /usr/local/g++-include, while Debian
  puts the headers in /usr/include/g++, and links /usr/lib/g++-include
  to /usr/include/g++.  In the later case, you probably will want to
  move the original g++ include directory back to /usr/include.

  4. Restore any extra header files and links.  Some non-standard
     libraries such as ncurses put files in /usr/include or put a link
     to their include directories in the /usr/include.  These files and
     links need to be restored in order to use the extra libraries
     properly.

  5. Add your new library directory (such as /usr/i486-linuxlibc5/lib)
     at the top of your /etc/ld.so.conf file.  You should have ld.so
     1.8.8 or better installed to avoid getting strange messages once
     glibc is installed.

  6. Move/copy all the old C libraries into the new directory.


        mv /usr/lib/libbsd.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libc.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libgmon.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libm.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libmcheck.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libc.so /usr/i486-linuxlibc5/lib
        mv /usr/lib/libm.so /usr/i486-linuxlibc5/lib
        cp /lib/libm.so.5.* /usr/i486-linuxlibc5/lib
        cp /lib/libc.so.5.* /usr/i486-linuxlibc5/lib



  libm.so.5 and libc.so.5 should be copied and not moved if /usr is a
  seperate partition from /, because they are required by programs used
  to start linux and must be located on the root drive partition.

  7. Move the /usr/lib/*.o files into the new directory.


        mv /usr/lib/crt1.o /usr/i486-linuxlibc5/lib
        mv /usr/lib/crti.o /usr/i486-linuxlibc5/lib
        mv /usr/lib/crtn.o /usr/i486-linuxlibc5/lib
        mv /usr/lib/gcrt1.o /usr/i486-linuxlibc5/lib



  8. Update your library cache after your libraries are moved.


        ldconfig -v



  5.3.  Installing from the binary package.


  If you are installing glibc from precompiled binaries, you first want
  to check what is in the package before you install the binaries:


        tar -tzvvf glibc-2.0.bin.i386.tar.gz
        tar -tzvvf glibc-crypt-2.0.bin.i386.tar.gz



  If you are happy with that, you can install glibc with:

   cd /
   tar -xzf glibc-2.0.bin.i386.tar.gz
   tar -xzf glibc-crypt-2.0.bin.i386.tar.gz
   ldconfig -v



  If you have a different architecture or version, substitute the proper
  file names.

  The most recent glibc version is generally not available as a binary
  package, and it is strongly recommended that you run the most recent
  version to avoid bugs.  If you can not build the library yourself,
  grab a binary package of glibc from one of the distributions that is
  based on glibc (e.g. RedHat) and install this.


  5.4.  Installing from the source.


  To install the library from source, run as root from the compile/
  directory:


        make install
        ldconfig -v



  5.5.  Updating the gcc specs.


  The final step of the installation (for both binary and source
  installs) is to update the gcc specs file so you can link your
  programs properly. To determine which specs file is the one used by
  gcc, use:


        % gcc -v
        reading specs from /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2/specs
        gcc version 2.7.2.2



  In this case, i486-unknown-linux is the system, and 2.7.2.2 is the
  version.  You need to copy the /usr/lib/gcc-lib/<system> to the old
  system directory:


        cd /usr/lib/gcc-lib/
        cp -r i486-unknown-linux i486-linuxlibc5



  Change into the original directory and version directory

   cd /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2



  and edit the file specs found in this directory.  In this file, change
  /lib/ld-linux.so.1 to /lib/ld-linux.so.2.  You also need to remove all
  expressions %{...:-lgmon} in the file, since glibc does not use the
  gmon library for profiling.  A sample specs file can be found in the
  ``Sample specs file'' section.



  5.6.  Testing your installation.


  To test the installation, create the following program in a file
  glibc.c:


        #include <stdio.h>

        main()
        {
            printf("hello world!\n");
        }



  and compile the program.


        % gcc glibc.c -o glibc



  Use ldd to verify the program was linked with glibc2, and not your old
  libc:


        % ldd glibc
        libc.so.6 => /lib/libc.so.6 (0x4000e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)



  If this compiles and generates "hello world!" when run, the installa-
  tion was successful.



  6.  Compiling with the non-primary libc.


  There are times you will want to use an alternate library to compile
  your programs with.  This section explains how to accomplish this,
  using the directories and installation names used in the examples in
  the previous two sections.  Remember to change the names to fit your
  setup.


  6.1.  A warning when using non-primary libcs.

  Before compiling any programs which is used in the system boot
  process, remember that if the program is dynamically linked and is
  used before the non-root partitions are mounted, all linked libraries
  must be on the root partition.  Following the installation process in
  the previous section for installing glibc as your primary C library,
  the old libc is left in /lib, which will be on your root partition.
  This means all of your programs will still work during booting.
  However, if /usr is on a different partition and you install glibc as
  a test library in /usr/i486-linuxglibc2, any new programs you compile
  with glibc will not work until your /usr partition is mounted.


  6.2.  Compiling programs with a test glibc.

  To compile a program with a test-install glibc, you need to reset the
  include paths to point to the glibc includes.  Specifying "-nostdinc"
  will negate the normal paths, and "-I/usr/i486-linuxglibc2/include"
  will point to the glibc includes.  You will also need to specify the
  gcc includes, which are found in /usr/lib/gcc-
  lib/i486-linuxglibc2/2.7.2.2/include (assuming you installed the test
  lib in i486-linuxglibc2 with gcc version 2.7.2.2).

  To link a program with a test-install glibc, you need to specify the
  gcc setup.  This is done by using the option "-b i486-linuxglibc2".

  For most programs, you can specify these new options by adding them to
  the $CFLAGS and $LDFLAGS makefile options:


        CFLAGS = -nostdinc -I/usr/i486-linuxglibc2/include -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include -b i486-linuxglibc2
        LDFLAGS = -b i486-linuxglibc2



  If you are using a configure script, define the $CFLAGS and $LDFLAGS
  shell variables (by using env/setenv for csh/tcsh, or set/export for
  sh/bash/etc) before running configure.  The makefiles generated by
  this should contain the proper $CFLAGS and $LDFLAGS.  Not all config-
  ure scripts will pick up the variables, so you should check after run-
  ning configure and edit the makefiles by hand if necessary.

  If the programs you are compiling only call gcc (and not cpp or
  binutils directly), you can use the following script to save having to
  specify all of the options each time:


        #!/bin/bash
        /usr/bin/gcc -b i486-linuxglibc2 -nostdinc \
                     -I/usr/i486-linuxglibc2/include \
                     -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include "$@"



  You can then use this script instead of "gcc" when compiling.



  6.3.  Compiling programs with libc 5 when glibc is primary library.

  To compile a program with your old libraries when you have installed
  glibc as your main library, you need to reset the include paths to the
  old includes.  Specifying "-nostdinc" will negate the normal paths,
  and "-I/usr/i486-linuxlibc5/include" will point to the glibc includes.
  You must also specify "-I/usr/lib/gcc-
  lib/i486-linuxlibc5/2.7.2.2/include" to include the gcc specific
  includes.  Remember to adjust these paths based on the what you named
  the new directories and your gcc version.

  To link a program with your old libc, you need to specify the gcc
  setup.  This is done by using the option "-b i486-linuxlibc5".

  For most programs, you can specify these new options by appending them
  to the $CFLAGS and $LDFLAGS makefile options:


        CFLAGS = -nostdinc -I/usr/i486-linuxlibc5/include -I/usr/lib/gcc-lib/i486-linuxlibc5/2.7.2.2/include -b i486-linuxlibc5
        LDFLAGS = -b i486-linuxlibc5



  If you are using a configure script, define the $CFLAGS and $LDFLAGS
  shell variables (by using env/setenv for csh/tcsh, or set/export for
  sh/bash/etc) before running configure.  The makefiles generated by
  this should contain the proper $CFLAGS and $LDFLAGS.  Not all config-
  ure scripts will pick up the variables, so you should check after run-
  ning configure and edit the makefiles by hand if necessary.

  If the programs you are compiling only call gcc (and not cpp or
  binutils directly), you can use the following script to save having to
  specify all of the options each time:


        #!/bin/bash
        /usr/bin/gcc -b i486-linuxlibc5 -nostdinc \
                     -I/usr/i486-linuxlibc5/include \
                     -I/usr/lib/gcc-lib/i486-linuxlibc5/2.7.2.2/include "$@"



  You can then use this script instead of "gcc" when compiling.



  7.  Compiling C++ programs.


  Libg++ uses parts of the math library, so is link to libm.  Since your
  existing libg++ will be compiled with your old library, you will have
  to recompile libg++ with glibc or get a binary copy.  The latest
  source for libg++ along with a binary linked with glibc (for x86) can
  be found at <ftp://ftp.yggdrasil.com/private/hjl/>.


  7.1.  Installing libg++ for a test glibc install.

  If you have installed glibc as a test library, you need to install the
  files into the directory you installed glibc into (such as
  /usr/i486-linuxglibc2 for the example in the previous sections).  If
  you are installing from the binary package (which i would recommend,
  since i never had any luck compiling libg++ this way), you need to
  extract the files into a temporary directory and move all the usr/lib/
  files into the <install directory>/lib/ directory, the usr/include/
  files into the <install directory>/include/ directory (remember to
  delete your include/g++ link first!), and the usr/bin/ files into the
  <install directory>/bin/ directory.


  7.2.  Installing libg++ for a primary glibc install.

  If you have installed glibc as the primary library, you first need to
  move your old libg++ files into your old libc directory if you still
  want to be able to compile g++ programs with your old libc.  Probably
  the easiest way to do this is by installing a new copy of the libg++
  compiled with libc 5 as in the previous section, and then installing
  the glibc version normally.


  7.3.  Compiling C++ programs with the non-primary libc.

  If you are trying to compile a C++ program with a non-primary libc,
  you will need to include the g++ include dir, which in the examples
  above would be /usr/i486-linuxglibc2/include/g++ for a test glibc
  install or /usr/i486-linuxlibc5/include/g++ for a primary glibc
  install.  This can usually be done by appending the $CXXFLAGS
  variable:


        CXXFLAGS = -nostdinc -I/usr/i486-linuxglibc2/include -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include -I/usr/i486-linuxlibc5/include/g++ -b i486-linuxglibc2



  8.  Problems.


  The glibc package contains a FAQ with additional information that you
  should check if you are having problems.  An online version is also
  available at  <http://www.imaxx.net/~thrytis/glibc/glibc-FAQ.html>.
  Below are some tips for solving problems which are not covered in the
  FAQ or are covered here in more detail.


  8.1.  Host names do not resolve.


  Glibc 2 uses a different method than libc 5 in looking up host names.
  The glibc name server switch (NSS) code looks for a file
  /etc/nsswitch.conf.  If host names are not resolving for you when
  using a glibc 2 application and your /etc/resolv.conf is configured
  correctly, check if you have the /etc/nsswitch.conf file.  If you do
  not have this file, you can create one containing the line:


        hosts:        files dns



  It will now look for /etc/resolv.conf to find the nameservers.


  You should look at the section of the libc info pages describing the
  nsswitch.conf file for more details.



  9.  Reporting bugs.


  If you think the lib is buggy, please read first the FAQ. It might be
  that others had the same problem and there's an easy solution. You
  should also check the section "Recommended Tools to Install the GNU C
  Library" in the INSTALL file since some bugs are bugs of the tools and
  not of glibc.

  Once you've found a bug, make sure it's really a bug. A good way to do
  this is to see if the GNU C library behaves the same way some other C
  library does. If so, probably you are wrong and the libraries are
  right (but not necessarily). If not, one of the libraries is probably
  wrong.

  Next, go to  <http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl>, and
  look through the bug database.  Check here to verify the problem has
  not already be reported. You should also look at the file BUGS
  (distributed with libc) to check for known bugs.

  Once you're sure you've found a new bug, try to narrow it down to the
  smallest test case that reproduces the problem. In the case of a C
  library, you really only need to narrow it down to one library
  function call, if possible.  This should not be too difficult.

  The final step when you have a simple test case is to report the bug.
  When reporting a bug, send your test case, the results you got, the
  results you expected, what you think the problem might be (if you've
  thought of anything), your system type, the versions of the GNU C
  library, the GNU CC compiler, and the GNU Binutils which you are
  using.  Also include the files config.status and config.make which are
  created by running configure; they will be in whatever directory was
  current when you ran configure.

  All bug reports for the GNU C library should be sent using the
  glibcbug shell script which comes with the GNU libc to <bugs@gnu.org>
  (the older address  <bugs@gnu.ai.mit.edu> is still working), or
  submitted through the GNATS web interface at <http://www-
  gnats.gnu.org:8080/cgi-bin/wwwgnats.pl>.

  Suggestions and questions should be sent to the mailing list at <bugs-
  glibc@prep.ai.mit.edu>.  If you don't read the gnewsgroup
  gnu.bug.glibc, you can subscribe to the list by asking  <bug-glibc-
  request@prep.ai.mit.edu>.

  Please DO NOT send bug report for the GNU C library to <bug-
  gcc@prep.ai.mit.edu>.  That list is for bug reports for GNU CC.  GNU
  CC and the GNU C library are separate entities maintained by separate
  people.



  10.  Sample specs file.


  Included here is a sample specs file for glibc 2 which is used by gcc
  for compiling and linking.  It should be found in the directory
  /usr/lib/gcc-lib/<new system dir>/<gcc version>.  If you are running
  an x86 system, you probably can copy this section to the file exactly.


   *asm:
   %{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}

   *asm_final:
   %{pipe:-}

   *cpp:
   %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}

   *cc1:
   %{profile:-p}

   *cc1plus:


   *endfile:
   %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s

   *link:
   -m elf_i386 %{shared:-shared}   %{!shared:     %{!ibcs:       %{!static:   %{rdynamic:-export-dynamic}      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}}
  %{static:-static}}}

   *lib:
   %{!shared: %{pthread:-lpthread}  %{profile:-lc_p} %{!profile: -lc}}

   *libgcc:
   -lgcc

   *startfile:
   %{!shared:      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s}                        %{!p:%{profile:gcrt1.o%s}
   %{!profile:crt1.o%s}}}}    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}

   *switches_need_spaces:


   *signed_char:
   %{funsigned-char:-D__CHAR_UNSIGNED__}

   *predefines:
   -D__ELF__ -Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)

   *cross_compile:
   0

   *multilib:
   . ;



  11.  Miscellanea.



  11.1.  Further information.



  11.1.1.  Web pages.



  o  FSF's GNU C Library Home Page
     <http://www.gnu.org/software/libc/libc.html>
  o  Using GNU Libc 2 with Linux <http://www.imaxx.net/~thrytis/glibc/>

  o  Installing glibc-2 on Linux <http://huizen.dds.nl/~frodol/glibc/>.

  o  Debian libc5 to libc6 Mini-HOWTO
     <http://www.gate.net/~storm/FAQ/libc5-libc6-Mini-HOWTO.html>.


  11.1.2.  Newgroups.



  o  comp.os.linux.development.system

  o  comp.os.linux.development.apps

  o  linux.dev.kernel

  o  gnu.bugs.glibc


  11.1.3.  Mailing lists.



     Glibc 2 Linux discussion list.
        This list is intended for discussion among Linux users who have
        installed glibc2, the new GNU C libraries.  Topics might include
        compatibility issues and questions about the compilation of code
        in a Linux/glibc setting.  To subscribe, send mail to
        Majordomo@ricardo.ecn.wfu.edu
        <mailto:Majordomo@ricardo.ecn.wfu.edu> with a body of "subscribe
        glibc-linux <your email address>.

        Archives for this mailing list can be found at
        <http://www.progressive-comp.com/Lists/?l=linux-
        glibc&r=1&w=2#linux-glibc>


  11.2.  Credits.


  Most of this information was stolen from the GNU Libc web page
  <http://www.gnu.org/software/libc/libc.html> and from Ulrich Drepper's
  <drepper@gnu.ai.mit.edu> glibc 2 announcement and his comments.
  Andreas Jaeger <aj@arthur.rhein-neckar.de> provided some of the
  Reporting bugs section.

  The following people have provided information and feedback for this
  document:

  o  Allex <allex@ms2.accmail.com.tw>

  o  Mark Brown <M.A.Brown-4@sms.ed.ac.uk>

  o  Ulrich Drepper <drepper@gnu.ai.mit.edu>

  o  Scott K. Ellis <ellis@valueweb.net>

  o  Aron Griffis <agriffis@coat.com>

  o  Andreas Jaeger <aj@arthur.rhein-neckar.de>

  o  Hank Leininger <hlein@progressive-comp.com>


  o  Frodo Looijaard <frodol@dds.nl>

  o  Ryan McGuire <rmcguire@freenet.columbus.oh.us>

  o  Shaya Potter <spotter@capaccess.org>

  o  Les Schaffer <godzilla@futuris.net>

  o  Andy Sewell <puck@pookhill.demon.co.uk>

  o  Gary Shea <shea@gtsdesign.com>

  o  Stephane <sr@adb.fr>

  o  Jan Vandenbos <jan@imaxx.net>

  o  Michael Wolf <wolfm@rpi.edu>

  Translations of this document are being done by:

  o  Chinese: Allex <allex@ms2.accmail.com.tw>

  o  French:  Olivier Tharan <tharan@int-evry.fr>

  o  Japanese:  Kazuyuki Okamoto <ikko-@pacific.rim.or.jp>



  11.3.  Feedback.


  Besides writing this HOWTO, maintaining the glibc 2 for Linux
  <http://www.imaxx.net/~thrytis/glibc> page, and using it on my
  machine, I have nothing to do with the glibc project.  I am far from
  knowledgeable on this topic, though I try to help with problems mailed
  to me.  I welcome any feedback, corrections, or suggestions you have
  to offer.  Please send them to ejg3@cornell.edu
  <mailto:ejg3@cornell.edu>.


  11.4.  Copyright.

  Copyright (c) 1997 by Eric Green.  This document may be distributed
  under the terms set forth in the LDP license.




HOWTO-HOWTO

Mark F. Komarinski

   v1.4 12 Jun, 2000
   Revision History
   Revision 1.4 Jun 12, 2000 Revised by: mfk
   Documented vim and sgedit. Spelling and other changes from ldp list.
   Also added LDP guidelines under style guide.
   
   List the tools, procedures, and hints to get HOWTO authors up to speed
   and writing.
     _________________________________________________________________
   
   Table of Contents
   [1]About this HOWTO
          
        [2]Purpose / Scope of this HOWTO
        [3]About the LDP
        [4]Feedback
        [5]Copyrights and Trademarks
        [6]Acknowledgments and Thanks
        [7]Conventions
                
   [8]Introduction to the LDP and SGML
          
        [9]The LDP
        [10]SGML
        [11]Why SGML instead of HTML or other formats?
        [12]For New Authors
        [13]Mailing Lists
                
   [14]The tools
          
        [15]DSSSL
        [16]DocBook DTD (version 3.1)
        [17]Jade
        [18]Jade wrappers
        [19]Editing tools
        [20]Other/Reference
                
   [21]Getting Started with DocBook
          
        [22]Downloading and installing the tools
        [23]Writing SGML by hand
        [24]Writing SGML using LyX
        [25]Writing SGML using PSGML
                
   [26]Style guides
          
        [27]Date formats
        [28]Graphics formats
        [29]DocBook Versions
        [30]Depreciated Tags
        [31]Tag Minimization
        [32]Conventions
                
   [33]Tips and Tricks with DocBook
          
        [34]Including Images
        [35]Naming separate HTML files
        [36]Using ldp.dsl
                
   [37]CVS
          
        [38]Getting a CVS account
        [39]Other CVS repository notes
        [40]Updating files and CVS
                
   [41]Distributing your documentation
          
        [42]Before you distribute
        [43]Copyright and Licensing issues
        [44]Submission to LDP
        [45]HOWTO maintenance
                
   [46]FAQs about the LDP
          
        [47]I want to help the LDP. How can I do this?
        [48]I want to publish a collection of LDP documents in a book.
                How is the LDP content licensed?
                
        [49]I found an error in an LDP document. Can I fix it?
        [50]But I don't know SGML/Can't get the tools working/Don't like
                SGML
                
About this HOWTO

Purpose / Scope of this HOWTO

   This document was started on Aug 26, 1999 by Mark F. Komarinski after
   two day's worth of frustration getting tools to work. If even one LDP
   author is helped by this, then I did my job.
   
   The newest version of this can be found on my homepage
   [51]http://www.cgipc.com/~markk in its SGML source. Other versions may
   be found in different formats at the LDP homepage
   [52]http://www.linuxdoc.org.
   
   There are many ways to contribute to the Linux movement without
   actually writing code. One of the most important is writing
   documentation, allowing each person to share their knowledge with
   thousands of others around the world. This HOWTO is designed to help
   you get familiar with how the LDP works, and what tools you'll need to
   write your own HOWTO.
     _________________________________________________________________
   
About the LDP

   The following is an excerpt from the LDP Manifesto
   ([53]http://www.linuxdoc.org/manifesto.html)
   
   The Linux Documentation Project (LDP) is working on developing free,
   high-quality documentation for the GNU/Linux operating system.The
   overall goal of the LDP is to collaborate in all of the issues of
   Linux documentation. This includes the creation of "HOWTOs" and
   "Guides". We hope to establish a system of documentation for Linux
   that will be easy to use and search. This includes the integration of
   the manual pages, info docs, HOWTOs,and other documents.
   
   You can find out more about the Linux Documentation Project at
   [54]http://www.linuxdoc.org
     _________________________________________________________________
   
Feedback

   Comments on this HOWTO may be directed to the author
   (<[55]markk@linuxdoc.org>).
     _________________________________________________________________
   
Copyrights and Trademarks

   (c) 1999-2000 Mark F. Komarinski
   
   This manual may be reproduced in whole or in part, without fee,
   subject to the following restrictions:
   
     * The copyright notice above and this permission notice must be
       preserved complete on all complete or partial copies
     * Any translation or derived work must be approved by the author in
       writing before distribution.
     * If you distribute this work in part, instructions for obtaining
       the complete version of this manual must be included, and a means
       for obtaining a complete version provided.
     * Small portions may be reproduced as illustrations for reviews or
       quotes in other works without this permission notice if proper
       citation is given. Exceptions to these rules may be granted for
       academic purposes: Write to the author and ask. These restrictions
       are here to protect us as authors, not to restrict you as learners
       and educators. Any source code (aside from the SGML this document
       was written in) in this document is placed under the GNU General
       Public License, available via anonymous FTP from the GNU archive.
     _________________________________________________________________
   
Acknowledgments and Thanks

   Thanks to everyone that gave comments as I was writing this. This
   includes David Lawyer, Deb Richardson, Daniel Barlow, Greg Ferguson,
   Mark Craig and other members of the
   <[56]ldp-discuss@lists.linuxdoc.org> list. Some sections I got from
   the [57]HOWTO Index (available at many LDP locations) and the
   sgmltools documentation. The sections on network access to CVS was
   partially written by Serek (<[58]ser@serek.arch.pwr.wroc.pl>).
   Sections on DocBook were written by Jorge Godoy
   (<[59]godoy@conectiva.com.br>). A great deal of thanks to both of them
   for their help.
     _________________________________________________________________
   
Conventions

   Commands that are listed have the following format. Commands are
   prefaced with the name of the current shell running. This is followed
   by a $ for commands that should be run as a normal (non-root) user.
   Shells followed by a # are commands that should be run as a root user.
     _________________________________________________________________
   
Introduction to the LDP and SGML

The LDP

   The Linux Documentation Project (LDP) was started to provide new users
   a way of getting information quickly about a particular subject. It
   not only contains a series of books on administration, networking, and
   programming, but has a large number of smaller works on individual
   subjects, written by those who have used it. If you want to find out
   about printing, you get the [60]Printing HOWTO. If you want to do find
   out if your Ethernet card works with Linux, grab the [61]Ethernet
   HOWTO, and so on. At first, many of these works were in text or HTML.
   As time went on, there had to be a better way of managing these
   documents. One that would let you read it from a web page, a text file
   on a CD-ROM, or even your hand-held PDA. The answer, as it turns out,
   is SGML.
     _________________________________________________________________
   
SGML

   The Standard Generalized Markup Language (SGML) is a language that is
   based on embedding codes within a document. In this way, it is similar
   to HTML, but there is where any similarities end. The power of SGML is
   that unlike WYSIWYG(What You See Is What You Get), you don't define
   things like colors, or font sizes, or even some kinds of formatting.
   Instead, you define elements(paragraph, section, numbered list) and
   let the SGML processor and the end program worry about placement,
   colors, fonts, and so on. HTML does the same thing, and is actually a
   subset of SGML. SGML has really three parts that make it up. First is
   the Structure, which is what is commonly called the DTD, or Document
   Type Definition. The DTD defines the relationship between each of the
   elements. The DocBook DTD, used to create this document, is an example
   of this. The DTD lists the rules that the content must follow. Second
   is the DSSSL or Document Style Semantics and Specification Language.
   The DSSSL tells the program doing the rendering how to convert the
   SGML into something that a human can read. It tells the renderer to
   convert a <table> tag into 14 point bold if it is going to RTF format,
   or to turn it into a <h1> tag if you're going to HTML. Finally there
   is the Content, which is what gets rendered by the SGML processor and
   is eventually seen by the user. This paragraph is content, but so
   would a graphic image, table, numbered list,and so on. Content is
   surrounded by tags to separate out each element.
     _________________________________________________________________
   
Why SGML instead of HTML or other formats?

   SGML provides for more than just formatting. You can automatically
   build indexes, table of contents, and links within the document or to
   outside. The Jade and OpenJade packages also let you export (I'll call
   it render from here on) SGML to LaTeX, info, text, HTML, and RTF. From
   these basic formats, you can then create other formats such as MS
   Word, PostScript, PDF and so on.Programs like LyX allow you to write
   in TeX format, then export it as SGML and render from SGML to whatever
   you chose. In the end, SGML is more concerned about the way elements
   work instead of the way they look. A big distinction,and one that will
   let you write faster, since you don't have to worry about placement of
   paragraphs, font sizes, font types, and so on.
     _________________________________________________________________
   
For New Authors

   If you are a new to the LDP and want to pick up an unmaintained HOWTO
   or write a new HOWTO or mini-HOWTO document, contact the HOWTO
   coordinator at <[62]ldp-discuss@lists.linuxdoc.org>. This is to make
   sure the HOWTO coordinator can know who is working on what
   documentation.
   
   Once that part is complete, you may write your documentation in the
   format of your choice and submit a draft to
   <[63]ldp-submit@lists.linuxdoc.org>and the draft will be reviewed by
   an LDP volunteer. In a few short days you will get the draft and
   comments from the volunteer. After applying the comments,you may send
   this version to the ldp-submit list again for final submission into
   the LDP.
   
   At this point, another LDP volunteer will translate your document into
   DocBook and send you the finished DocBook document. From here on, all
   submissions to the LDP has to be in DocBook format. If you have markup
   questions, you may ask the volunteer who assisted you, or ask the LDP
   DocBook list.
     _________________________________________________________________
   
Mailing Lists

   There are a few mailing lists to subscribe to so you can take part in
   how the LDP works. First is <[64]ldp-discuss@lists.linuxdoc.org>,
   which is the main discussion group of the LDP. To subscribe, send a
   message with the subject reading "subscribe" to
   <[65]ldp-discuss-request@lists.linuxdoc.org>. To unsubscribe, send an
   e-mail with the subject of "unsubscribe" to
   <[66]ldp-discuss-request@lists.linuxdoc.org>.
   
   Another list is the <[67]ldp-docbook@lists.linuxdoc.org> list, which
   is for markup or other questions about DocBook itself. If you run into
   trouble with a particular markup tag, you can send your question here
   for answers. You can subscribe to the DocBook list by sending a
   "subscribe"message to <[68]ldp-docbook-request@lists.linuxdoc.org>.
     _________________________________________________________________
   
The tools

   In this section, we will cover some of the tools that you'll need or
   want to use to create your own LDP documentation. I'll describe them
   here, and better define them later on, along with how to install them.
   If you use some other tool to assist in writing LDP, please let me
   know and I'll add a blurb here for it.
     _________________________________________________________________
   
DSSSL

   The Normal Walsh version is required, the LDP is optional.
     _________________________________________________________________
   
Norman Walsh DSSSL

   [69]http://nwalsh.com/docbook/dsssl/db152.zip
   
   The Document Style Semantics and Specification Language tells jade how
   to render a SGML document into print or online form. The DSSSL is what
   converts a title tag into an <H1> tag in HTML, or bold, 14 point Times
   Roman for RTF, for example. Documentation for DSSSL is located at
   [70]http://nwalsh.com/docbook/dsssl/db152d.zip.Note that modifying the
   DSSSL doesn't modify DocBook itself. It merely changes the way the
   rendered text looks. The LDP uses a modified DSSSL that provides for a
   table of contents.
     _________________________________________________________________
   
LDP DSSSL

   [71]http://metalab.unc.edu/gferg/ldp/ldp.dsl
   
   The LDP DSSSL requires the Norman Walsh version (see above) but is a
   slightly modified DSSSL to provide things like a table of contents.
     _________________________________________________________________
   
DocBook DTD (version 3.1)

   Required - [72]http://www.oasis-open.org/docbook/sgml/3.1/docbk31.zip
   
   The DocBook DTD defines the tags and structure of a DocBook SGML
   document. Modifying the DTD, such as adding a new tag, doesn't make it
   DocBook anymore.
     _________________________________________________________________
   
Jade

   Jade and OpenJade are two of the programs that do most of the
   rendering and validation of code based off the DTD and DSSSL. One of
   the following is required and should be installed after the DTD and
   DSSSL have been installed.
     _________________________________________________________________
   
Jade

   [73]ftp://ftp.jclark.com/pub/jade/jade-1.2.1.tar.gz
   
   Jade is the front-end processor for SGML. It uses the DSSSL and
   DocBook DTD to perform the verification and rendering from SGML into
   the target format.
     _________________________________________________________________
   
OpenJade

   [74]http://openjade.sourceforge.net/
   
   An extension of Jade written by the DSSSL community. Some applications
   require jade, but are being updated to support either software
   package.
     _________________________________________________________________
   
Jade wrappers

   These tools are optional and may be installed after Jade, the DSSSL,
   and DTD have been installed.
     _________________________________________________________________
   
sgmltools-lite

   [75]http://sgmltools-lite.sourceforge.net/
   
   This is the successor to the sgmltools project, which has officially
   been disbanded for over a year. Since then, Cees de Groot has created
   a slightly different project, which acts as a wrapper to the jade SGML
   processor. It hides much of the ugliness of syntax. This author was
   able to install the old sgmltools package followed by the
   sgmltools-lite and could format this document quite easily. There's
   even a man page for sgmltools showing syntax.
     _________________________________________________________________
   
Cygnus DocBook Tools

   May be Red Hat specific - [76]http://www.redhat.com/
   
   Red Hat distributes three packages, starting with the 6.2 release,
   that include DocBook support and some tools. The tools are easily
   installed, allowing you to focus more on writing than wrestling with
   the tools. TeTex, Jade, and JadeTeX must be installed first. All three
   of these packages are available on the installation CD.
     _________________________________________________________________
   
Editing tools

   The following tools may be used to create, edit, or validate your
   HOWTO.
     _________________________________________________________________
   
LyX

   [77]http://www.lyx.org/
   
   LyX provides the power of writing SGML with the ease-of-use of a
   regular word processor. It's not a WYSIWYG program, but more WYSIWYM
   (What You See Is What You Mean) application, since what you see on the
   screen isn't necessarily what happens after the SGML processor is done
   with it. The display that LyX provides is similar to, but not exactly
   like, what the output from jade would look like. However, it's close
   enough for you to see the flow of the document. Sections and
   subsections are numbered and put in bold, and different fonts are used
   to signify things like <code> or <url> tags. Most tags are hidden from
   the main LyX window while you edit, since LyX writes in TeX, then
   exports the TeX to SGML.
   
   Figure 1. LyX screen shot
   
   LyX doesn't show tags, but reformats the text based on the tag being
   used.
     _________________________________________________________________
   
Emacs (PSGML)

   Optional - [78]http://www.lysator.liu.se/~lenst/about_psgml/
   
   Emacs has an SGML writing mode called psgml that is a major mode
   designed for editing SGML and XML documents. It provides "syntax
   highlighting" or "pretty printing" features that make SGML tags stand
   out, a way to insert tags other than typing them by hand, and the
   ability to validate your document while writing.
   
   For users of Emacs, it's a great way to go, and many believe it to
   allow more versatility than any other SGML documentation tool. It
   works with DocBook,LinuxDoc and other DTDs equally well.
     _________________________________________________________________
   
VIM

   [79]http://www.vim.org
   
   No mention of Emacs is complete without talking about vi. The VIM (Vi
   IMproved)editor has the functionality of regular vi, but also has an
   SGML mode that will color-coordinate your screen to show where tags
   are.
     _________________________________________________________________
   
WordPerfect 9 (Corel Office 2000)

   [80]http://www.corel.com/
   
   WordPerfect 9 for the MS Windows platform has support for SGML and
   DocBook 3.0. WordPerfect 9 for Linux has no SGML capabilities.
   
   This is the least expensive of the commercial applications that
   support SGML.
     _________________________________________________________________
   
sgedit

   [81]http://www.tksgml.de/
   
   The sgedit program allows you to visually edit SGML files. It has the
   advantages of not needing to know Emacs or VI before starting, and is
   cross-platform, working in both Windows and Linux. It's a commercial
   application, but pricing has not been set. There will be free licenses
   for private and academic use.
   
   Along with visual editing, sgedit will also validate documents on
   loading, and on demand by using the Document->Validate command.
   
   The screen shot of the sgedit program shows a tree on the left side
   that has the SGML document in a hierarchy, while the right side shows
   the document. Tags are shown with a grey background.
     _________________________________________________________________
   
Other/Reference

   The items in this section are reference books or other utilities that
   can't quite be categorized (yet).
     _________________________________________________________________
   
DocBook: The Definitive Guide

   [82]http://www.docbook.org/
   
   This book was released by O'Reilly in October 1999, and is a great
   reference to DocBook. I have not found it to be a great practical
   book, and much of the emphasis is on XML, but the DocBook tags for
   version 3.1 are all listed in a handy format. You can pick it up at
   the book vendor of choice. The entire book is also available online
   (in HTML and SGML formats) at the above URL.
     _________________________________________________________________
   
Aspell

   Optional - [83]http://aspell.sourceforge.net/
   
   This spell checking application can work around SGML tags, and only
   spell check the content within the tags. Default spell checkers like
   ispell will try to spell check the tags, causing errors at every new
   tag.
     _________________________________________________________________
   
Getting Started with DocBook

   This section covers the new method of writing LDP documentation, using
   the DocBook 3.1 DTD. We'll cover getting, installing, and using tools,
   along with an introduction to DocBook tags. Since there are over 300
   DocBook tags, we won't cover them all here. Really interested readers
   can go to [84]http://www.docbook.org for more information.
     _________________________________________________________________
   
Downloading and installing the tools

Manual using jade/OpenJade

   This is the quick and dirty way that should work for all
   distributions, no matter what distribution you're using.
   
    1. Create a base directory to store everything such as
       /usr/local/sgml/. We'll call this $_toolroot from here on.
    2. Install Jade, DocBook DTD, and DSSSL such that the base of each is
       under $_toolroot (creating $_toolroot/jade-1.2.1, $_toolroot/dtd,
       $_toolroot/dssl)
    3. You'll need to set the SGML_CATALOG_FILES environment variable to
       the catalogs that you have under$_toolroot. You can do this with
       the command:bash$ export SGML_CATALOG_FILES =
       $_toolroot/dtd/docbook.cat:$_toolroot/dsssl/docbook/catalog:$_tool
       root/jade-1.2.1/dsssl/catalog
    4. Now you can start using Jade. To create individual HTML files:
       $_toolroot/jade-1.2.1/jade/jade -t sgml -i html -d
       $_toolroot/dsssl/docbook/html/docbook.dsl howto.sgml
    5. To create one large HTML file, add -V nochunks to the jade
       command.
     _________________________________________________________________
   
sgmltools

   Unlike previous versions of sgmltools, you will require sgmltools
   version 2.x for use with DocBook. Since some major distributions ship
   with sgmltools 1.x, you'll need to remove the sgmltools 1.x package
   and install either a 2.0 version, or a CVS version. To get the latest
   CVS source code version, you can use the following set of commands:
bash$ CVSROOT=:pserver:cvs@cvs.sgmltools.org:/home/cvs
bash$ export CVSROOT
bash$ cvs login
bash$ cvs -z6 get sgmltools

   The CVS password is 'cvs'. Once downloaded, You can just use
bash$ ./compile
bash$ make
bash# make install

   to install sgmltools. For Red Hat-based systems (using RPM) you can
   use the rpmfind command to get the latest sgmltools. The rpmfind
   program is available at [85]http://www.rpmfind.net/. Make sure you get
   sgmltools and not sgml-tools, as the latter is sgml-tools 1.0.9 and
   only works with LinuxDoc documents. For Debian-based systems, running
   2.2 "Potato" and above, apt-get will retrieve the right package for
   you:
bash# apt-get install sgmltools-2

   As with Red Hat Linux, the sgml-tools package is outdated. Be sure to
   get sgmltools-2.
     _________________________________________________________________
   
Cygnus DocBook Tools

   These tools are provided with Red Hat 6.2. Make sure the following
   packages are installed:
   
     * sgml-common
     * docbook
     * stylesheets
       
   Red Hat has the latest version on their web site:
   [86]http://www.redhat.com/support/errata/RHBA-2000022-01.html.
   
   Download/get/sneakernet the RPMs to your machine and install in the
   usual manner (become root, then rpm -Uvh filename). Once the RPMs are
   installed, you can use the following commands to render DocBook:
bash$ db2html filename

   Renders DocBook into HTML. A subdirectory with the filename (minus the
   .sgml extension) is created and the HTML files are placed there.
bash$ db2pdf filename

   Renders DocBook into a PDF file.
     _________________________________________________________________
   
Writing SGML by hand

   Most of this is covered by Jorge Godoy's Using DocBook document. Those
   interested can read it
   at[87]http://metalab.unc.edu/godoy/using-docbook/using-docbook.htmlfor
   writing DocBook using your favorite text editor.
   
     If you write SGML by hand: SGML has over 300 tags, and uses tags
     much more heavily than HTML. It's recommended that you use an
     existing HOWTO as a template and see how other authors have
     written. It's also recommended that you use a user-friendly editor
     like PSGML or WordPerfect for Windows, as it lists many of the tags
     that are available.
     _________________________________________________________________
   
Writing SGML using LyX

New documents

   You can easily start a new HOWTO using LyX. Use the File->New From
   Template... menu command to bring up the template listings. Select
   Templates on the right side of the screen, then select
   docbook_template.lyx in the file listing. Select OK, and you'll have a
   new document. Fill in the items, such as title, abstract, and author
   name, then start writing.
   
   Figure 2. DocBook Template screen from LyX
   
   You can select the docbook_template.lyx here
     _________________________________________________________________
   
Existing documents

   If you have an already-existing LyX, TeX, or text document, you can
   import it into LyX with the File->import command. Once the file is
   imported, go to Layout->Document... In the popup window, under Style,
   select SGML (DocBook Article). You'll be asked if you want to convert
   all text over, and say Yes. You will need to re-apply most tags, but
   it's a fairly simple matter of selecting text and changing the style.
   Many LyX functions have a keyboard shortcut to assist you.
   
   Figure 3. Document Layout screen
   
   Image of the Document Layout Screen from LyX
     _________________________________________________________________
   
Exporting documents to SGML

   Once your document is written or converted, save it in LyX format.
   This will allow you to edit future versions easily. Then, go to
   File->Export->as DocBook... and the file will be exported in DocBook.
     _________________________________________________________________
   
Writing SGML using PSGML

Introduction

   If you have installed a recent distribution, you may already have
   PSGML installed for use with Emacs. To check, start Emacs and look for
   the PSGML documentation (C-himpsgml).
   
   From here on, we assume you have PSGML installed for use with a recent
   version of GNU Emacs. If that all went by too fast for you, see the
   free chapter from Bob Ducharme's SGML CD book:
   [88]http://www.snee.com/bob/sgmlfree/.
     _________________________________________________________________
   
Updating your .emacs to use PSGML

   If you want GNU Emacs to enter PSGML mode when you open a .sgml file
   and be ready for SGML editing, make sure PSGML can find the DocBook
   DTD. If your distribution already had PSGML set up for use with GNU
   Emacs, you probably do not have to do anything to get this to work.
   Otherwise, you may need to set an environment variable that tells
   PSGML where to look for the SGML catalog (the list of DTDs).
   
   For example:
bash$ export SGML_CATALOG_FILES=/usr/lib/sgml/catalog

   Then add something like the following to your .emacs file:
;; *******************************************************************
;; set up psgml mode...
;; use psgml-mode instead of emacs native sgml-mode
;;

(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t )
(setq auto-mode-alist
  (append
  (list
    '("\\.sgm$" . sgml-mode)
    '("\\.sgml$" . sgml-mode)
    )
  auto-mode-alist))

;; set some psgml variables

(setq sgml-auto-activate-dtd t)
(setq sgml-omittag-transparent t)
(setq sgml-balanced-tag-edit t)
(setq sgml-auto-insert-required-elements t)
(setq sgml-live-element-indicator t)
(setq sgml-indent-step nil)

;; create faces to assign to markup categories

(make-face 'sgml-comment-face)
(make-face 'sgml-start-tag-face)
(make-face 'sgml-end-tag-face)
(make-face 'sgml-entity-face)
(make-face 'sgml-doctype-face) ; DOCTYPE data
(make-face 'sgml-ignored-face) ; data ignored by PSGML
(make-face 'sgml-ms-start-face) ; marked sections start
(make-face 'sgml-ms-end-face) ; end of marked section
(make-face 'sgml-pi-face) ; processing instructions
(make-face 'sgml-sgml-face) ; the SGML declaration
(make-face 'sgml-shortref-face) ; short references

;; view a list of available colors with the emacs-lisp command:
;;
;; list-colors-display
;;
;; please assign your own groovy colors, because these are pretty bad
(set-face-foreground 'sgml-comment-face "coral"
;(set-face-background 'sgml-comment-face "cornflowerblue")
(set-face-foreground 'sgml-start-tag-face "slateblue")
;(set-face-background 'sgml-start-tag-face "cornflowerblue")
(set-face-foreground 'sgml-end-tag-face "slateblue")
;(set-face-background 'sgml-end-tag-face "cornflowerblue")
(set-face-foreground 'sgml-entity-face "lavender")
;(set-face-background 'sgml-entity-face "cornflowerblue")
(set-face-foreground 'sgml-doctype-face "lavender")
;(set-face-background 'sgml-doctype-face "cornflowerblue")
(set-face-foreground 'sgml-ignored-face "cornflowerblue")
;(set-face-background 'sgml-ignored-face "cornflowerblue")
(set-face-foreground 'sgml-ms-start-face "coral")
;(set-face-background 'sgml-ms-start-face "cornflowerblue")
(set-face-foreground 'sgml-ms-end-face "coral")
;(set-face-background 'sgml-ms-end-face "cornflowerblue")
(set-face-foreground 'sgml-pi-face "coral")
;(set-face-background 'sgml-pi-face "cornflowerblue")
(set-face-foreground 'sgml-sgml-face "coral")
;(set-face-background 'sgml-sgml-face "cornflowerblue")
(set-face-foreground 'sgml-shortref-face "coral")
;(set-face-background 'sgml-shortref-face "cornflowerblue")

;; assign faces to markup categories

(setq sgml-markup-faces '
  (
  (comment . sgml-comment-face)
  (start-tag . sgml-start-tag-face)
  (end-tag . sgml-end-tag-face)
  (entity . sgml-entity-face)
  (doctype . sgml-doctype-face)
  (ignored . sgml-ignored-face)
  (ms-start . sgml-ms-start-face)
  (ms-end . sgml-ms-end-face)
  (pi . sgml-pi-face)
  (sgml . sgml-sgml-face)
  (shortref . sgml-shortref-face)
  ))

;; tell PSGML to pay attention to face settings
(setq sgml-set-face t)
;; ...done setting up psgml-mode.
;; *******************************************************************

   Then restart Emacs
     _________________________________________________________________
   
SGML Smoke Test

   Try the following smoke test. Start a new file, /tmp/test.sgml for
   example, and enter the following:
<!DOCTYPE test [
<!ELEMENT test - - (#PCDATA)>
]>

   Enter C-cC-p. If Emacs manages to parse your DTD, you will see Parsing
   prolog...done in the minibuffer. Try C-c C-e RETURN to insert a <test>
   element. If things are working correctly, you should see the following
   in Emacs:
<!DOCTYPE test [
<!ELEMENT test - - (#PCDATA)>
]>
<test></test>
     _________________________________________________________________
   
Writing a New HOWTO in DocBook

   Start a new file for your HOWTO and enter the following:
<!DOCTYPE ARTICLE PUBLIC "-//OASIS//DTD DocBook V3.1//EN">

   EnterC-cC-pand hold your breath. If everything goes as planned, you
   will see Emacs chewing for a few seconds and then Parsing
   prolog...done in the minibuffer.
   
   At this point, enterC-cC-eRETURN to insert an <article> element and
   proceed to write your HOWTO.
     _________________________________________________________________
   
Quick Reference for Emacs with PSGML

   See Nik Clayton's primer for FreeBSD documentation:
   [89]http://www.freebsd.org/tutorials/docproj-primer/psgml-mode.html
     _________________________________________________________________
   
Style guides

   This section contains notes on conventions that the LDP has agreed to
   in order to give all LDP documents a similar look and feel. You should
   keep these guides in mind when writing.
     _________________________________________________________________
   
Date formats

   The <pubdate> tag in your header should be in the following format:
v1.0, 21 April 2000
     _________________________________________________________________
   
Graphics formats

   When submitting graphics to the LDP, please submit one set of graphics
   in .eps, and another in either .gif or .jpg. Be aware of the patent
   issues with .gif, but it makes slightly better pictures then .jpg.
     _________________________________________________________________
   
DocBook Versions

   Only DocBook 3.1 is supported by the LDP at this time. DocBook 4.0 is
   under consideration. Many 3.1 documents can be converted to 4.0 easily
   by avoiding the use of depreciated tags.
   
   When writing your DocBook header, it should look like this:
<!doctype article public "-//OASIS//DTD DocBook V3.1//EN">
     _________________________________________________________________
   
Depreciated Tags

   Tags listed in DocBook: The Definitive Guide as depreciated are
   discouraged for use in LDP documentation. Some ways to use newer tags
   are listed in the tip and tricks section.
     _________________________________________________________________
   
Tag Minimization

   Tag minimization is using </> instead of the full end of a tag (such
   as </para>. Since this makes the document more confusing for future
   authors and LDP members, and is not allowed in XML DocBook, please
   refrain from this practice.
     _________________________________________________________________
   
Conventions

   Conventions for different kinds of text is as follows:
   
   If you're going to show the use of a command, format the command so it
   looks like a user's command line. The prompt must contain the shell
   type (bash, tcsh, zsh, etc) followed by a $ for commands to be run as
   a normal (non-root) user or a # for a root user.
   
   A command would then look like this:
bash$ command "run as a normal user"
bash# command "run as a root user"
tcsh# setenv DISPLAY :0.0
     _________________________________________________________________
   
Tips and Tricks with DocBook

   This section covers a few quirks of DocBook that you may run into when
   writing your documents.
     _________________________________________________________________
   
Including Images

   If you plan on including images in your HOWTOs, you can now do this,
   as LinuxDoc didn't support images. Here's a sample way of including an
   image in your HOWTOS:
<figure>
<title>LyX screen shot</title>
<mediaobject>
<imageobject><imagedata fileref="lyx_screenshot.eps" format="eps"></imageobject
>
<imageobject><imagedata fileref="lyx_screenshot.jpg" format="jpg"></imageobject
>
<textobject><phrase>Screen shot of the LyX document processing program</phrase>
</textobject>
</mediaobject>
</figure>

   This is a better way than using <graphic> for two reasons. First,
   <graphic> will be removed in DocBook 5.0 in favor of the <mediaobject>
   tag. So you may as well get started with the right way now. Second,
   <mediaobject> allows for different kinds of media based on what the
   output is. In this example, the first <imageobject> is an encapsulated
   PostScript(eps) file for use with formats derived from TeX such as
   DVI, PS, and PDF. The second <imageobject> is a JPEG image for visual
   display, mostly for HTML output. The <textobject> is presented if the
   output doesn't support graphics (TXT). Think of it as an <alt> tag.
     _________________________________________________________________
   
Naming separate HTML files

   By default, when separate HTML files are made, the SGML processor will
   assign arbitrary names to the resulting files. This can be confusing
   to readers who may bookmark a page only to have it change, or so you
   know what files are what. Whatever your reasoning, here's how to make
   separate files named the way you want:
   
   In your first <article> tag (which should be the only one) include an
   id parameter and call it index. This will make your tag look like
   this:
<article id="index">

   On the first <sect1> tag, do not modify it, as it's usually an
   introduction and you want that on the first page. For each other
   <sect> tag, include the id parameter and name it. Names should include
   only alphanumeric characters, and it should be short enough to
   understand what it is.
<sect1 id="tips">
     _________________________________________________________________
   
Using ldp.dsl

   The LDP uses its own DSSSL file, which adds things like a white
   background and automatic generation of the table of contents you see
   at the beginning of HOWTOs. You can find the latest copy of the file
   at [90]http://metalab.unc.edu/gferg/ldp/ldp.dsl.
   
   Once you have the file, you may need to do some editing of the first
   few lines based on the location of your DocBook DSSSL files. My
   example uses the Cygnus tool set.
   
   Place the ldp.dsl file in /usr/lib/sgml/stylesheets and bring it up
   under your favorite text editor.You should see something like this:
   
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % html "IGNORE">
<![%html;[
<!ENTITY % print "IGNORE">
<!ENTITY docbook.dsl SYSTEM "docbook.dsl (1) " CDATA dsssl>
]]>
<!ENTITY % print "INCLUDE">
<![%print;[
<!ENTITY docbook.dsl SYSTEM "docbook.dsl (2) " CDATA dsssl>
]]>
]>

   [91](1) 
          Change the first "docbook.dsl" to read
          /usr/lib/sgml/stylesheets/nwalsh-modular/html/docbook.dsl
   [92](2) 
          Change the second "docbook.dsl" to read
          /usr/lib/sgml/stylesheets/nwalsh-modular/print/docbook.dsl
          
   If you're using another DSSSL, point those two files to the location
   of the HTML and print DSSSL files. They're usually in directories
   called html and print.
   
   With that complete, you can now generate HTML files:
bash$ mkdir HOWTO-HOWTO ; cd HOWTO-HOWTO
bash$ jade -t sgml -ihtml -d /usr/lib/sgml/stylesheets/ldp.dsl\#html ../HOWTO-H
OWTO.sgml

   The first command creates a new directory to put your files into. The
   second command (the jade one) generates individual HTML files for each
   section of your document. If you are going to something like RTF, you
   can do this:
bash$ jade -t rtf -d /usr/lib/sgml/stylesheets/ldp.dsl ../HOWTO-HOWTO.sgml
     _________________________________________________________________
   
CVS

   The LDP is in the process of providing CVS access to authors. There
   are a few good reasons for this:
   
    1. CVS will keep an off-site backup of your documents. In the event
       that you hand over a document to another author, they can just
       retrieve the document from CVS and continue on. In the event you
       need to go back to a previous version of a document, you can
       retrieve it as well.
    2. It's great if you have many people working on the same document.
       You can have CVS tell you what changes were made while you were
       editing your copy by another author, and integrate those changes
       in.
    3. Keeps a log of what changes were made. These logs (and a date
       stamp) can be placed automatically inside the document when you
       use some special tags that get processed before the SGML
       processor.
    4. Can provide for a way for a program to automatically update the
       LDP web site with new documentation as it's written and submitted.
       This is not in place yet, but is a potential goal. Currently, CVS
       updates signal the HOWTO coordinator to update the LDP web page,
       meaning that if you use CVS, you're not required to e-mail your
       SGML code.
       
   If you're completely new to CVS, there are a few web pages you may
   want to look at which can help you out:
   
     * [93]http://www.sourcegear.com/CVS/Docs/blandy
     * [94]https://wroclaw.art.pl/~ser/docs/cvs.html
     _________________________________________________________________
   
Getting a CVS account

   First you'll need to get an account at the LDP's CVS Repository. This
   is pretty much the root directory that is used by CVS, with various
   projects (HOWTOs, mini HOWTOs, etc.) created as subdirectories of
   that.
   
   You will need to create a hashed password and userid for your account.
   The hashed password allows you to send an encrypted password to the
   CVS group without them needing to know your password. You can do this
   with the following command, from bash (or sh):
bash$ echo your_password | perl -e "print crypt(<>,\
join '',('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]),\"\n\""

   Take the output of this command, and send it with your proposed userid
   to <[95]cvsadmin@cvslist.linuxdoc.org>. Your unique CVSROOT directory
   will be created and you'll get an e-mail with a response. When you get
   your response, log into your CVSROOT and make sure everything is set
   up properly:
bash$ export CVSROOT=:pserver:your_userid@cvs.linuxdoc.org:/cvsroot
bash$ cvs -d $CVSROOT login

   (Replace the your_userid with what you were sent in the response
   e-mail).
   
   You will be asked for your password, and then given access to the CVS
   Repository in read-write mode. Once you've used cvs login once and
   have been given access to the system, your password is stored in
   .cvsroot and you will not have to use cvs login again. Just set the
   CVSROOT and continue on. You can get the entire linuxdoc repository
   with this command:
bash$ cvs get LDP

   Or you can get the SGML source for your own document with these
   commands:
bash$ cvs get howto/YOUR-HOWTO.sgml
bash$ cvs get minihowto/YOURDOC.sgml
     _________________________________________________________________
   
Other CVS repository notes

Anonymous CVS access

   Anonymous CVS access is available for those who do not require an
   account (such as those wishing to publish LDP documents). This
   repository is read-only:
bash$ cvs -d :pserver:cvs@anoncvs.linuxdoc.org:/cvsroot login

   As a password, use cvs. You can then get linuxdoc modules as above.
   Note that changes to the anoncvs site may be a half an hour behind the
   main site.
     _________________________________________________________________
   
CVS Files via web

   You can access the CVS repository via the web at
   [96]http://cvsweb.linuxdoc.org/index.cgi/linuxdoc.
     _________________________________________________________________
   
Graphical access to CVS

   There are graphical interfaces to CVS, and you can get a list of them
   at [97]http://freshmeat.net/appindex. Search for CVS.
     _________________________________________________________________
   
Updating files and CVS

   CVS has a special tag, $Id, that you can use to automatically insert
   the date and version directly into the document. After committing, CVS
   will turn this tag into $Id: HOWTO-HOWTO.sgml,v 1.4 2000/06/12
   20:49:54 markk Exp $. By including this tag in your document, you can
   have that automatically change each time you change the file, allowing
   the revision mark to increment each time.
   
   When you're ready to upload changes to the CVS server, use the command
   cvs ci -m "comment" YOUR-HOWTO.sgml. The -m "comment" isn't necessary,
   but if you don't include it, you'll be brought into the editor
   (usually vi, or whatever your EDITOR environment variable is) and be
   given the chance to add a comment about the changes.
   
   You can follow more of the CVS discussion on the ldp-discuss list. For
   the time being, LDP submissions should still be sent to
   <[98]ldp-submit@lists.linuxdoc.org>.
     _________________________________________________________________
   
Distributing your documentation

Before you distribute

   Before you distribute your code to millions of potential readers there
   are a few things you should do.
   
   First, be sure to spell-check your document. Most utilities that you
   would use to write SGML have plug-ins to perform a spell check. If
   not, there's always the aspell program.
   
   Second, get someone to review your documentation for comments and
   factual correctness. The documentation that is published by the LDP
   needs to be as factually correct as possible, as there are millions of
   Linux users that may be reading it. If you're part of a larger mailing
   list talking about the subject, ask others from the list to help you
   out.
   
   Third, create a web site where you can distribute your documentation.
   This isn't required, but is helpful for people to find the original
   location of your document.
     _________________________________________________________________
   
Validate your SGML code

   Using jade, or really the nsgmls command, you can validate your .sgml
   code against the DTD to make sure there aren't any errors.
bash$ nsgmls -s HOWTO-HOWTO.sgml

   If there are no issues, you'll just get your command prompt back.
     _________________________________________________________________
   
Copyright and Licensing issues

   In order for an LDP document to be accepted by the LDP, it must be
   licensed to conform to the "LICENSE REQUIREMENTS" section of the LDP
   Manifesto located at [99]http://www.linuxdoc.org/manifesto.html. As an
   author, you may retain the copyright and add other restrictions (for
   example, you must approve any translations or derivative works). A
   sample license is available in the Manifesto or at
   [100]http://www.linuxdoc.org/COPYRIGHT.html. If you choose to use the
   boilerplate copyright, simply copy it into your source code under a
   section called "Copyright and Licenses" or similar. Also include a
   copyright statement of your own (since you still own it). If you are a
   new maintainer for an already-existing HOWTO, you must include the
   previous copyright statements of the previous author(s) and the dates
   they maintained that document.
   
   You'll note that the licensing for the HOWTO-HOWTO requires
   notification to the author of any derivative works or translations. I
   also explicitly place any source code (aside from the SGML the HOWTO
   was written in) under the GPL. If your HOWTO includes bits of source
   code that you want others to use, you may do the same.
     _________________________________________________________________
   
Submission to LDP

   Once your LDP document has been carefully reviewed, you can release
   your document to the LDP. Send an e-mail with the SGML source code as
   an attachment(you may gzip it if you like) to
   <[101]ldp-submit@lists.linuxdoc.org>.
   
   Be sure to include the name of your HOWTO in the subject line, and use
   the body to outline changes you've made and attach your HOWTO. This
   allows the maintainers to do their jobs faster, so you don't have to
   wait for your HOWTO to be updated on the LDP web site. If you don't
   hear anything in 7 calendar days, please follow up with an e-mail to
   make sure things are still in process.
   
   If your HOWTO contains extras, such as graphics or a special catalog,
   create a.tar.gz file with all the files in it including the .sgml
   source code and mail it as an attachment to the ldp-submit list.
     _________________________________________________________________
   
HOWTO maintenance

   Now that you're a HOWTO author, you should maintain the document and
   update it when new versions of software are released. You should also
   respond to reasonable comments and questions from your readers. You
   don't have to help them all, especially if their question is already
   answered in your HOWTO. However, a good experience with the LDP from
   readers is one of our goals and a great way of increasing the
   popularity of Linux
     _________________________________________________________________
   
FAQs about the LDP

I want to help the LDP. How can I do this?

   The easiest way is to find something and document it. Also check the
   unmaintained HOWTOs and see if there is a subject there that you know
   about and can continue documenting.
     _________________________________________________________________
   
I want to publish a collection of LDP documents in a book. How is the LDP
content licensed?

   Please see [102]http://www.linuxdoc.org/COPYRIGHT.html. Note that this
   is only a guideline to authors. However, the licensing cannot be more
   restrictive than what is listed in that URL.
     _________________________________________________________________
   
I found an error in an LDP document. Can I fix it?

   Contact the author of the document, or the LDP coordinator at
   <[103]ldp-discuss@lists.linuxdoc.org>and mention the problem and how
   you think it needs to be fixed.
     _________________________________________________________________
   
But I don't know SGML/Can't get the tools working/Don't like SGML

   That's okay. You have the option of writing your first draft of the
   HOWTO in the format of your choice, then submit that to the LDP. An
   LDP volunteer will review the document, then convert it into DocBook
   for you. Once that's done,it will be easier for you to maintain the
   HOWTO. If you run into questions,you can always drop a line to the LDP
   volunteer or the LDP Docbook list
   at<[104]ldp-docbook@lists.linuxdoc.org>.

References

   1. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN17
   2. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN19
   3. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN26
   4. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN33
   5. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN37
   6. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN50
   7. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN57
   8. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#INTRODUCTION
   9. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN62
  10. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN67
  11. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN70
  12. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN73
  13. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN80
  14. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#TOOLS
  15. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN92
  16. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN106
  17. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN111
  18. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN124
  19. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN137
  20. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN187
  21. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#GETSTARTED
  22. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN204
  23. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN262
  24. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN269
  25. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN314
  26. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#STYLE
  27. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN380
  28. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN384
  29. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN387
  30. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN392
  31. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN396
  32. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN399
  33. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#TIPS
  34. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN408
  35. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN413
  36. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN420
  37. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#CVS
  38. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN464
  39. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN482
  40. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN497
  41. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#DISTRIBUTION
  42. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN509
  43. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN520
  44. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN526
  45. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN532
  46. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#FAQ
  47. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN537
  48. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN540
  49. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN544
  50. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#AEN548
  51. http://www.cgipc.com/~markk
  52. http://www.linuxdoc.org/
  53. http://www.linuxdoc.org/manifesto.html
  54. http://www.linuxdoc.org/
  55. mailto:markk@linuxdoc.org
  56. mailto:ldp-discuss@lists.linuxdoc.org
  57. http://www.linuxdoc.org/HOWTO/
  58. mailto:ser@serek.arch.pwr.wroc.pl
  59. mailto:godoy@conectiva.com.br
  60. http://www.linuxdoc.org/HOWTO/Printing-HOWTO.html
  61. http://www.linuxdoc.org/HOWTO/Ethernet-HOWTO.html
  62. mailto:ldp-discuss@lists.linuxdoc.org
  63. mailto:ldp-submit@lists.linuxdoc.org
  64. mailto:ldp-discuss@lists.linuxdoc.org
  65. mailto:ldp-discuss-request@lists.linuxdoc.org
  66. mailto:ldp-discuss-request@lists.linuxdoc.org
  67. mailto:ldp-docbook@lists.linuxdoc.org
  68. mailto:ldp-docbook-request@lists.linuxdoc.org
  69. http://nwalsh.com/docbook/dsssl/db152.zip
  70. http://nwalsh.com/docbook/dsssl/db152d.zip
  71. http://metalab.unc.edu/gferg/ldp/ldp.dsl
  72. http://www.oasis-open.org/docbook/sgml/3.1/docbk31.zip
  73. ftp://ftp.jclark.com/pub/jade/jade-1.2.1.tar.gz
  74. http://openjade.sourceforge.net/
  75. http://sgmltools-lite.sourceforge.net/
  76. http://www.redhat.com/
  77. http://www.lyx.org/
  78. http://www.lysator.liu.se/~lenst/about_psgml/
  79. http://www.vim.org/
  80. http://www.corel.com/
  81. http://www.tksgml.de/
  82. http://www.docbook.org/
  83. http://aspell.sourceforge.net/
  84. http://www.docbook.org/
  85. http://www.rpmfind.net/
  86. http://www.redhat.com/support/errata/RHBA-2000022-01.html
  87. http://metalab.unc.edu/godoy/using-docbook/using-docbook.html
  88. http://www.snee.com/bob/sgmlfree/
  89. http://www.freebsd.org/tutorials/docproj-primer/psgml-mode.html
  90. http://metalab.unc.edu/gferg/ldp/ldp.dsl
  91. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#HTML
  92. file://localhost/export/sunsite/users/gferg/howto/00_HOWTO-HOWTO.html#PRINT
  93. http://www.sourcegear.com/CVS/Docs/blandy
  94. https://wroclaw.art.pl/~ser/docs/cvs.html
  95. mailto:cvsadmin@cvslist.linuxdoc.org
  96. http://cvsweb.linuxdoc.org/index.cgi/linuxdoc
  97. http://freshmeat.net/appindex
  98. mailto:ldp-submit@lists.linuxdoc.org
  99. http://www.linuxdoc.org/manifesto.html
 100. http://www.linuxdoc.org/COPYRIGHT.html
 101. mailto:ldp-submit@lists.linuxdoc.org
 102. http://www.linuxdoc.org/COPYRIGHT.html
 103. mailto:ldp-discuss@lists.linuxdoc.org
 104. mailto:ldp-docbook@lists.linuxdoc.org

[1]LDP HOWTO-INDEX

Guylhem Aznar

Greg Ferguson

Joshua Drake

   Copyright  2000 by The Authors
   
   This document contains an index to the Linux HOWTOs as well as other
   information about the HOWTO project.
     _________________________________________________________________
   
   Table of Contents
   1. [2]What Are Linux HOWTOs?
   2. [3]Where Can I Get Linux HOWTOs?
   3. [4]HOWTO Translations
   4. [5]Categorized List of HOWTOs
          
        4.1. [6]Administration HOWTOs (60% done)
        4.2. [7]Hardware HOWTOs (0% done)
        4.3. [8]Networking HOWTOs (50% done)
        4.4. [9]Other Languages
        4.5. [10]Programming HOWTOs
                
   5. [11]Single list of HOWTOs
   6. [12]Single list of mini-HOWTOs
   7. [13]Special HOWTOs
   8. [14]Unmaintained HOWTOs
   9. [15]Writing and Submitting a HOWTO
   10. [16]Copyright
     _________________________________________________________________
   
Chapter 1. What Are Linux HOWTOs?

   Linux HOWTOs are documents which describe in detaila certain aspect of
   configuring or using Linux. For example, there is the Installation
   HOWTO, which gives instructions on installing Linux, and the Mail
   Administrator HOWTO, which describes how to set up and configure mail
   under Linux. Other examples include the Net HOWTO and the Printing
   HOWTO.
   
   HOWTOs are comprehensive docs - much like an FAQ but generally not in
   question-and-answer format. However, many HOWTOs contain a FAQ section
   at the end.
   
   There are several HOWTO formats available: plain text, PostScript,
   PDF, and HTML.
   
   In addition to the HOWTOs, there are a multitude of mini-HOWTOs on
   short, specific subjects.
     _________________________________________________________________
   
Chapter 2. Where Can I Get Linux HOWTOs?

   HOWTOs can be retrieved via anonymous FTP from the following sites:
   
     * [17]ftp://metalab.unc.edu/pub/Linux/docs/HOWTO
     * [18]ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO
       
   as well as many [19]mirror sites.
   
   You can also browse HOWTOs [20]in HTML format or grab
   [21]Linux-html-HOWTOs.tar.gz for viewing on your own PC. The files
   will be extracted into HOWTO/html/.
   
   Many [22]mirror sites mirror the HTML files.
   
   www.linuxdoc.org is heavily used, so please use a mirror site if
   possible.
   
   A HOWTO index is also posted towards the beginning of the month to the
   Usenet newsgroupcomp.os.linux.answers. There is a tool called
   [23]NewstoHOWTO that will assemble the postings.
     _________________________________________________________________
   
Chapter 3. HOWTO Translations

   HOWTO translations are available on [24]metalab.unc.edu and mirrors
   around the world. So far, there are:
   
     * Chinese (zh)
     * Croatian (hr)
     * French (fr)
     * German (de)
     * Hellenic (el)
     * Indonesian (id)
     * Italian (it)
     * Japanese (ja)
     * Korean (ko)
     * Polish (pl)
     * Slovenian (sl)
     * Spanish (es)
     * Swedish (sv)
     * Turkish (tr)
       
   If you know of any other translation projects, please let us know and
   they will be added to this list. If you are interested in getting your
   translations archived on metalab.unc.edu, please read the directory
   structure specification at
   [25]http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/Directory
   -Structure and contact the LDP.
     _________________________________________________________________
   
Chapter 4. Categorized List of HOWTOs

   This is a categorized list of the currently available HOWTOs. It is
   the hope that by categorizing this information if will be easier for
   you to find the information that you are looking for.
     _________________________________________________________________
   
4.1. Administration HOWTOs (60% done)

   This section includes HOWTOs on topics such as System Administration.
   
     * [26]Bash-Prompt-HOWTO, Bash Prompt HOWTO
       Updated: December 1999. Creating and controlling terminal and
       xterm prompts is discussed, including incorporating standard
       escape sequences to give username,current working directory, time,
       etc.
     * [27]Benchmarking-HOWTO, Linux Benchmarking HOWTO
       Updated: August 1997. Discusses some issues associated with the
       benchmarking of Linux systems and presents a basic benchmarking
       toolkit.
     * [28]Bootdisk-HOWTO, The Linux Bootdisk HOWTO
       Updated: April 2000. How to design and build your own boot/root
       diskettes for Linux.
     * [29]BootPrompt-HOWTO, The Linux BootPrompt HOWTO
       Updated: May 1999. A compilation of all the possible boot time
       arguments that can be passed to the Linux kernel at boot time.
       Includes all kernel and device parameters.
     * [30]CD-Writing-HOWTO, CD-Writing HOWTO
       Updated: May 2000. Explains how to write CD-ROMs under Linux.
     * [31]Config-HOWTO, Configuration HOWTO
       Updated: September 1999. Aims at making the fine-tuning of your
       newly installed Linux box quicker and easier. You will find a set
       of configurations for the most common applications and services.
     * [32]Filesystems-HOWTO, Filesystems HOWTO
       Updated: March 2000. About filesystems and accessing filesystems.
     * [33]Font-HOWTO, Font HOWTO
       Updated: March 2000. Provides a comprehensive source to act as a
       starting point for any and all font questions about Linux.
     * [34]From-PowerUp-To-Bash-Prompt-HOWTO, From Power Up To Bash
       Prompt
       Updated: April 2000. A brief description of what happens in a
       Linux system from the time that you turn on the power, to the time
       that you log in and get a bash prompt.
     * [35]Ftape-HOWTO, Ftape HOWTO
       Updated: August 1998. Discusses essential do's and dont's for the
       ftape floppy tape driver under Linux. Focuses on the newest
       version (ftape-4.02 at the time of this writing).
     * [36]HP-HOWTO, HP HOWTO - Utilisation and Configuration Guide of HP
       Products under Linux
       Updated: April 2000. Describes the use of products available in
       the Hewlett-Packard (HP) catalog with Linux and some free
       software.
     * [37]Installation-HOWTO, The Linux Installation HOWTO
       Updated: May 2000. How to obtain and install Linux software. It is
       the first document which a new Linux user should read to get
       started.
     * [38]ISP-Hookup-HOWTO, ISP-Hookup HOWTO
       Updated: March 1998. How to use Linux to connect to an Internet
       Service Provider via a dial-up modem TCP/IP connection (basic
       dial-up procedure and IP establishment, email and news handling is
       covered).
     * [39]ISP-Setup-RedHat, "Pocket" ISP based on RedHat Linux
       Updated: April 2000. Outlines the setup of a single RedHat box for
       dial-ins, virtual web hosting, virtual email, POP3 and ftp
       servers.
     * [40]Jaz-Drive-HOWTO, Jaz-drive HOWTO
       Updated: January 2000. Covers the configuration and use of the 1Gb
       and 2Gb Iomega Jaz drives under Linux.
     * [41]Kernel-HOWTO, The Linux Kernel HOWTO
       Updated: June 1999. A detailed guide to kernel configuration,
       compilation, upgrades, and troubleshooting for ix86-based systems.
     * [42]Keyboard-and-Console-HOWTO, The Linux keyboard and console
       HOWTO
       Updated: February 1998. Contains some information about the Linux
       (v2.0) keyboard and console, and the use of non-ASCII characters.
     * [43]KickStart-HOWTO, RedHat Linux KickStart HOWTO
       Updated: January 1999. Briefly describes how to use the RedHat
       Linux KickStart system to rapidly install large numbers of
       identical Linux boxes.
     * [44]Loopback-Encrypted-Filesystem-HOWTO, Loopback Encrypted
       Filesystem HOWTO
       Updated: November 1999. Explains how to setup and then use a
       filesystem that, when mounted by a user, dynamically and
       transparently encrypts its contents.
     * [45]MultiOS-HOWTO, Managing Multiple Operating Systems HOWTO
       Updated: February 2000. Covers the procedures for using removable
       hard disks to install and manage multiple alternative operating
       systems while leaving a single fixed disk to permanently house and
       protect the primary operating system.
     _________________________________________________________________
   
4.2. Hardware HOWTOs (0% done)

   This section includes HOWTOs on topics such as Graphics chips and how
   to get items such as Bus Mice working under Linux.
     _________________________________________________________________
   
4.3. Networking HOWTOs (50% done)

   This section includes HOWTOs on topics such as Networking, Routing and
   Sendmail.
   
     * [46]Adv-Routing-HOWTO, Linux 2. 4 Advanced Routing HOWTO
       Updated: May 2000. A very hands-on approach to iproute2, traffic
       shaping and a bit of netfilter.
     * [47]AX25-HOWTO, Linux AX25-HOWTO, Amateur Radio
       Updated: October 1997. How to install and configure support for
       the AX. 25 packet radio protocol utilized by Amateur Radio
       Operators worldwide.
     * [48]Beowulf-HOWTO, Beowulf HOWTO
       Updated: November 1998. Introduces the Beowulf Supercomputer
       architecture and provides background information on parallel
       programming, including links to other more specific documents.
     * [49]Cable-Modem, Cable Modem Providers HOWTO
       Updated: June 2000. Answers basic questions on how to connect your
       Linux box to a cable modem or cable Internet provider.
     * [50]Diald-HOWTO, Diald HOWTO
       Updated: April 2000. Shows some typical scenarios for easy start
       using Diald. Replaces the Diald mini-HOWTO.
     * [51]Diskless-HOWTO, Diskless Nodes HOWTO for Linux
       Updated: April 2000. How to set up a diskless Linux box.
     * [52]Diskless-root-NFS-HOWTO, Root over nfs clients & server HOWTO
       Updated: March 1999. How to setup a server and configure clients
       for diskless operation from a network.
     * [53]DNS-HOWTO, DNS HOWTO
       Updated: February 1999. How to become a totally "small time" DNS
       admin.
     * [54]Firewall-HOWTO, Firewall and Proxy Server HOWTO
       Updated: February 2000. Designed to describe the basics of
       firewall systems and give you some detail on setting up both a
       filtering and proxy firewall on a Linux-based system.
     * [55]Intranet-Server-HOWTO, The Linux Intranet Server HOWTO
       Updated: August 1997. How to setup an Intranet using Linux as the
       server which binds Unix, Netware, NT and Windows together.
     * [56]IP-Masquerade-HOWTO, Linux IP Masquerade HOWTO
       Updated: May 2000. How to enable the Linux IP Masquerade feature
       on a given Linux host.
     * [57]IPCHAINS-HOWTO, Linux IPCHAINS HOWTO
       Updated: July 2000. How to obtain, install and configure the
       enhanced IP firewalling chains software for Linux, and some ideas
       on how you might use them.
     * [58]IPX-HOWTO, Linux IPX HOWTO
       Updated: May 1998. How to obtain, install and configure various
       tools available for the Linux operating system that use the Linux
       kernel IPX protocol support.
     * [59]Mail-Administrator-HOWTO, The Linux Electronic Mail
       Administrator HOWTO
       Updated: January 2000. Describes the setup, care and feeding of
       Electronic Mail (e-mail) under Linux. Primarily intended for
       administrators.
     * [60]Mail-User-HOWTO, The Linux Mail User HOWTO
       Updated: May 1999. An introduction to the world of electronic mail
       (email) under Linux. Focuses on user-level issues and typical
       configurations for Linux home and small-business machines
       connected to the net via an ISP.
     * [61]Majordomo-MajorCool-HOWTO, Majordomo and MajorCool HOWTO
       Updated: November 1999. Intended to guide a user through an
       installation of the Majordomo Mailing List Software and MajorCool
       (utility for managing Majordomo lists via a CGI script).
     * [62]Multicast-HOWTO, Multicast over TCP/IP HOWTO
       Updated: March 1998. Tries to cover most aspects related to
       multicast over TCP/IP networks.
     * [63]Mutt-GnuPG-PGP-HOWTO, Mutt-i, GnuPG and PGP HOWTO
       Updated: February 2000. Briefly explains how to configure Mutt-i,
       PGP and GnuPG in its different versions (2. 6. x, 5. x and GnuPG).
     * [64]NC-HOWTO, Linux Netstation HOWTO
       Updated: June 2000. Describes how to hook up a IBM Netstation to
       your local network using a Linux box as server.
     * [65]NCD-HOWTO, Linux NCD mini-HOWTO
       Updated: September 1999. Describes how to hook up a NCD ThinSTAR
       to your local network using a Linux box as server.
     * [66]Net-HOWTO, Linux Networking HOWTO
       Updated: March 2000. Information about networking for Linux
       (relates only to version 4 of the Linux Networking Kernel or more
       specifically kernel releases 2.x and 2.2.x).
     * [67]NET3-4-HOWTO, Linux Networking HOWTO (Previously the Net-3
       Howto)
       Updated: August1999. Describes how to install and configure the
       Linux networking software and associated tools.
     * [68]Networking-Overview-HOWTO, The Linux Networking Overview HOWTO
       Updated: July 2000. Overview of the networking capabilities of the
       Linux Operating System; provides pointers for further information
       and implementation details.
     * [69]NFS-HOWTO, NFS HOWTO
       Updated: October 1999. How to set up NFS clients and servers.
     * [70]NIS-HOWTO, The Linux NIS(YP)/NYS/NIS+ HOWTO
       Updated: March 1999. How to configure Linux as NIS(YP) or NIS+
       client and how to install as a NIS server.
     _________________________________________________________________
   
4.4. Other Languages

   This section includes HOWTOs on topics such as using Linux if you are
   Chinese or Dutch.
   
     * [71]Chinese-HOWTO, Chinese HOWTO
       Updated: June 1998. Demonstrates how to implement Chinese on Linux
       system, including those common problems encountered while using
       Chinese, the ways to obtain, and shows how to install and setup a
       variety of different Chinese software.
     * [72]Cyrillic-HOWTO, The Linux Cyrillic HOWTO
       Updated: January 1998. How to set up your Linux box to typeset,
       view and print the documents in the Russian language.
     * [73]Danish-HOWTO, The Linux Danish/International HOWTO
       Updated: March 2000. How to configure Linux and various Linux
       applications for Danish locale standards such as keyboard, font,
       paper-size etc.
     * [74]Esperanto-HOWTO, Linux-Esperanto-HOWTO
       Updated: August 1999.
     * [75]Finnish-HOWTO, Finnish HOWTO
       Updated: February 1996. How to "finlandize" Linux - Finnish
       keyboard mapping, time zone, 8-bit clean settings for
       applications, etc. (written in Finnish).
     * [76]German-HOWTO, German HOWTO
       Updated: March 1997. Addresses Linux localization issues specific
       to German users (written in German).
     * [77]Hebrew-HOWTO, The Hebrew HOWTO
       Updated: September 1995. How to configure your Linux machine to
       use Hebrew characters on X-Windows and Virtual Consoles.
     * [78]Hellenic-HOWTO, Hellenic HOWTO
       Updated: August 1997. Addresses Linux localization issues specific
       to Greek users (written in Hellenic).
     * [79]Serbian-HOWTO, Serbian HOWTO
       Updated: November 1998. Addresses Linux localization issues
       specific to Serbian users (written in Serbian).
     * [80]Slovenian-HOWTO, Slovenian HOWTO
       Updated: February 1999. Addresses Linux localization issues
       specific to Slovenian users (written in Slovenian).
     * [81]Spanish-HOWTO, Spanish Linux HOWTO
       Updated: August 1996. Contains information on Linux in the Spanish
       environment, for developing software with Spanish support or how
       to get in touch with the Linux community in Spain (written in
       Spanish).
     * [82]Thai-HOWTO, The Linux Thai HOWTO
       Updated: August 1998. How to use Thai language with Linux. This
       will cover setting Thai fonts, Thai keyboard and some Thai
       applications.
     * [83]Turkish-HOWTO, Turkish HOWTO
       Updated: September 1999. Addresses Linux localization issues
       specific to Turkish users (written in Turkish).
     _________________________________________________________________
   
4.5. Programming HOWTOs

   This section includes HOWTOs on topics such as C++ programming and
   Perl programming.
   
     * [84]AI-Alife-HOWTO, Linux AI & Alife HOWTO
       Updated: June 2000. Information about, and links to, various AI
       related software libraries, applications, etc. that work on the
       Linux platform.
     * [85]Assembly-HOWTO, Linux Assembly HOWTO
       Updated: June 2000. How to program in assembly language using FREE
       programming tools, focusing on development for or from the Linux
       Operating System on IA-32 (i386) platform.
     * [86]Bash-Prog-Intro-HOWTO, BASH Programming - Introduction HOWTO
       Updated: June 2000. This article intends to help you to start
       programming basic-to-intermediate shell scripts.
     * [87]C++Programming-HOWTO, C++ Programming HOWTO
       Updated: July 2000. Discusses methods to avoid memory problems in
       C++ and also will help you to program properly in C++ language.
       Applies to all operating sytems.
     * [88]C-C++Beautifier-HOWTO, C-C++ Beautifier HOWTO
       Updated: July 2000. Helps you to format (beautify) C/C++ programs
       so that they are more readable and conform to your site coding
       standards. Applies to all operating sytems.
     * [89]CVS-RCS-HOWTO, CVS-RCS HOWTO for Linux (Source Code Control
       System)
       Updated: July 2000. A "practical guide" to very quickly setup a
       CVS/RCS source code control system.
     * [90]DB2-HOWTO, DB2 Version 7.1 for Linux HOWTO
       Updated: July 2000. Explicit instructions on installing DB2
       Universal Database Version 7.1 for Linux on the following Intel
       x86-based distributions: Caldera OpenLinux 2.4, Debian, Red Hat
       Linux 6.2, SuSE Linux 6.2 and 6.3, and TurboLinux 6.0.
     * [91]Enterprise-Java-for-Linux-HOWTO, Enterprise Java for Linux
       HOWTO
       Updated: January 1999. How to set up an Enterprise Java
       environment on Linux including a JDK, a Web server, supporting
       Java servlets, accessing a database via JDBC, and supporting
       Enterprise Java Beans (EJBs).
     * [92]GCC-HOWTO, The Linux GCC HOWTO
       Updated: May 1999. Covers how to set up the GNU C compiler and
       development libraries under Linux; gives an overview of compiling,
       linking, running and debugging programs under it.
     * [93]Glibc2-HOWTO, Glibc 2 HOWTO
       Updated: June 1998. Covers installing and using the GNU C Library
       version 2 (libc6) on Linux systems.
     * [94]IngresII-HOWTO, Ingres II HOWTO
       Updated: June 2000. Helps install the Ingres II Relational
       Database Management System on Linux.
     * [95]IO-Port-Programming, Linux I/O port programming mini-HOWTO
       Updated: December 1997. Describes programming hardware I/O ports
       and waiting for small periods of time in user-mode Linux programs
       running on the Intel x86 architecture.
     * [96]Java-CGI-HOWTO, Java CGI HOWTO
       Updated: December 1998. Explains how to set up your server to
       allow CGI programs written in Java and how to use Java to write
       CGI programs.
     * [97]Kerneld, The Linux kerneld mini-HOWTO
       Updated: May 2000. Explains how you can use the kerneld function
       in the Linux kernels.
     * [98]Oracle-7-HOWTO, Oracle 7 Database HOWTO
       Updated: August 1998. A guide to installing and configuring the
       Oracle 7 Database Server on a Linux system.
     * [99]Oracle-8-HOWTO, Oracle (8) for Linux Installation HOWTO
       Updated: June 2000. A guide to installing and configuring the
       Oracle 8i Enterprise Edition for Linux.
     * [100]Parallel-Processing-HOWTO, Linux Parallel Processing HOWTO
       Updated: January 1998. Discusses the four basic approaches to
       parallel processing that are available to Linux users: SMP Linux
       systems, clusters of networked Linux systems, parallel execution
       using multimedia instructions (i.e., MMX), and attached (parallel)
       processors hosted by a Linux system.
     * [101]PHP-HOWTO, PHP HOWTO
       Updated: May 2000. How to develop PHP programs and also to migrate
       all the Windows 95 GUI applications to powerful PHP + HTML + DHTML
       + XML + Java applets + Javascript. Applies to all the operating
       sytems where PHP is ported.
     * [102]PostgreSQL-HOWTO, Database-SQL-RDBMS HOWTO for Linux
       (PostgreSQL Object Relational Database System)
       Updated: July 2000. A "practical guide" to very quickly setup a
       SQL Database engine and front end tools on a Unix system.
     * [103]Program-Library-HOWTO, Program Library HOWTO
       Updated: April 2000. This HOWTO for programmers discusses how to
       create and use program libraries on Linux. This includes static
       libraries, shared libraries, and dynamically loaded libraries.
     * [104]Programming-Languages, Programming Languages mini-HOWTO
       Updated: January 2000. A brief comparison of major programming
       languages for Linux and major libraries for creating graphical
       user interfaces (GUIs) under Linux.
     * [105]RCS, The RCS mini-HOWTO
       Updated: August 1997. Covers basic installation and usage of RCS,
       the GNU Revision Control System, under Linux.
     * [106]RPM-HOWTO, RPM HOWTO - RPM at Idle
       Updated: November 1999. RPM is the RPM Package Manager. It is an
       open packaging system available for anyone to use. It allows users
       to take source code for new software and package it into source
       and binary form such that binaries can be easily installed and
       tracked and source can be rebuilt easily. It also maintains a
       database of all packages and their files that can be used for
       verifying packages and querying for information about files and/or
       packages.
     * [107]SCSI-Programming-HOWTO, The Linux SCSI programming HOWTO
       Updated: May 1996. Deals with programming the Linux generic SCSI
       interface.
     * [108]Secure-Programs-HOWTO, Secure Programming for Linux and Unix
       HOWTO
       Updated: June 2000. Provides a set of design and implementation
       guidelines for writing secure programs for Linux and Unix systems.
     * [109]Serial-Programming-HOWTO, The Linux Serial Programming HOWTO
       Updated: January 1998. How to program communications with devices
       over a serial port on a Linux box.
     * [110]SMB-HOWTO, SMB HOWTO
       Updated: April 2000. How to use the Server Message Block (SMB)
       protocol, also called the Session Message Block, NetBIOS or
       LanManager protocol, with Linux using Samba.
     * [111]Software-Building-HOWTO, Building and Installing Software
       Packages for Linux
       Updated: July 1999. A comprehensive guide to building and
       installing "generic" UNIX software distributions under Linux.
     * [112]Software-Release-Practice-HOWTO, Software Release Practice
       HOWTO
       Updated: June 2000. Describes good release practices for Linux
       open-source projects.
     * [113]TclTk-HOWTO, The Linux Tcl and Tk HOWTO
       Updated: November 1998. Describes the Linux approach to Tcl, a
       scripting language.
     * [114]Vim-HOWTO, Vim Color Editor HOWTO (Vi Improved w/syntax color
       highlighting)
       Updated: July 2000. A guide to very quickly setup Vim color editor
       on Linux or Unix systems.
     * [115]WWW-mSQL-HOWTO, A mSQL and perl Web Server HOWTO
       Updated: September 1997. How to build a SQL client/server database
       using WWW and HTML for the user interface.
     _________________________________________________________________
   
Chapter 5. Single list of HOWTOs

   The following Linux HOWTOs are currently available:
   
     * [116]3Dfx-HOWTO, The Linux 3Dfx HOWTO
       Updated: February 1998. Describes 3Dfx graphics accelerator chip
       support for Linux.
     * [117]4mb-Laptops, 4mb Laptop HOWTO
       Updated: April 2000. Put a "grown-up" Linux on a small-spec (4mb
       RAM, <=200mb hard disk) laptop.
     * [118]Access-HOWTO, Linux Access HOWTO
       Updated: March 1997. Covers using adaptive technology to make
       Linux accessible to those who could not use it otherwise.
     * [119]Adv-Routing-HOWTO, Linux 2.4 Advanced Routing HOWTO
       Updated: May 2000. A very hands-on approach to iproute2, traffic
       shaping and a bit of netfilter.
     * [120]AI-Alife-HOWTO, Linux AI & Alife HOWTO
       Updated: June 2000. Information about, and links to, various AI
       related software libraries, applications, etc. that work on the
       Linux platform.
     * [121]Alpha-HOWTO, Brief Introduction to Alpha Systems and
       Processors
       Updated: June 1997. A brief overview of existing Alpha CPUs,
       chipsets and systems.
     * [122]Assembly-HOWTO, Linux Assembly HOWTO
       Updated: July 2000. How to program in assembly language using FREE
       programming tools, focusing on development for or from the Linux
       Operating System on IA-32 (i386) platform.
     * [123]Astronomy-HOWTO, Linux Astronomy HOWTO
       Updated: May 2000. Document shares tips and resources to utilize
       Linux solutions in the pursuit of Astronomy.
     * [124]AX25-HOWTO, Linux AX25-HOWTO, Amateur Radio
       Updated: October 1997. How to install and configure support for
       the AX. 25 packet radio protocol utilized by Amateur Radio
       Operators worldwide.
     * [125]Bash-Prog-Intro-HOWTO, BASH Programming - Introduction HOWTO
       Updated: June 2000. This article intends to help you to start
       programming basic-to-intermediate shell scripts.
     * [126]Bash-Prompt-HOWTO, Bash Prompt HOWTO
       Updated: December 1999. Creating and controlling terminal and
       xterm prompts is discussed, including incorporating standard
       escape sequences to give username, current working directory,
       time, etc.
     * [127]Belgian-HOWTO, The Belgian HOWTO
       Updated: February 2000. How to tweak Linux for Belgian users;
       lists Linux user groups, businesses and other resources in
       Belgium.
     * [128]Benchmarking-HOWTO, Linux Benchmarking HOWTO
       Updated: August 1997. Discusses some issues associated with the
       benchmarking of Linux systems and presents a basic benchmarking
       toolkit.
     * [129]Beowulf-HOWTO, Beowulf HOWTO
       Updated: November 1998. Introduces the Beowulf Supercomputer
       architecture and provides background information on parallel
       programming, including links to other more specific documents.
     * [130]Bootdisk-HOWTO, The Linux Bootdisk HOWTO
       Updated: April 2000. How to design and build your own boot/root
       diskettes for Linux.
     * [131]BootPrompt-HOWTO, The Linux BootPrompt HOWTO
       Updated: May 1999. A compilation of all the possible boot time
       arguments that can be passed to the Linux kernel at boot time.
       Includes all kernel and device parameters.
     * [132]BRIDGE-STP-HOWTO, Linux BRIDGE-STP-HOWTO
       Updated: June 2000. Describes how to setup a bridge with the
       recent kernel patches and brctl utility by Lennert Buytenhek. With
       developer kernel 2.3.47 the new bridging code is part of the
       mainstream. On 20.06.2000 there are patches for stable kernels
       2.2.14 and 2.2.15. What happens if a penguin crosses a bridge?
     * [133]Busmouse-HOWTO, The Linux Busmouse HOWTO
       Updated: February 2000. How to install, configure and use a
       busmouse under Linux.
     * [134]C++Programming-HOWTO, C++ Programming HOWTO
       Updated: July 2000. Discusses methods to avoid memory problems in
       C++ and also will help you to program properly in C++ language.
       Applies to all operating sytems.
     * [135]C-C++Beautifier-HOWTO, C-C++ Beautifier HOWTO
       Updated: July 2000. Helps you to format (beautify) C/C++ programs
       so that they are more readable and conform to your site coding
       standards. Applies to all operating sytems.
     * [136]Cable-Modem, Cable Modem Providers HOWTO
       Updated: July 2000. Answers basic questions on how to connect your
       Linux box to cable modem or cable Internet provider.
     * [137]CD-Writing-HOWTO, CD-Writing HOWTO
       Updated: May 2000. Explains how to write CD-ROMs under Linux.
     * [138]CDROM-HOWTO, The Linux CD-ROM HOWTO
       Updated: March 1999. How to install, configure, and use CD-ROM
       drives under Linux.
     * [139]Chinese-HOWTO, Chinese HOWTO
       Updated: June 1998. Demonstrates how to implement Chinese on Linux
       system, including those common problems encountered while using
       Chinese, the ways to obtain, and shows how to install and setup a
       variety of different Chinese software.
     * [140]Chroot-BIND-HOWTO, Chroot-BIND HOWTO
       Updated: June 2000. Describes installing the BIND 8 nameserver to
       run in a chroot jail and as a non-root user, to provide added
       security and minimise the potential effects of a security
       compromise.
     * [141]Commercial-HOWTO, Linux Commercial HOWTO
       Updated: March 1999. A listing of commercial software and
       applications which are offered for Linux.
     * [142]Config-HOWTO, Configuration HOWTO
       Updated: September 1999. Aims at making the fine-tuning of your
       newly installed Linux box quicker and easier. You will find a set
       of configurations for the most common applications and services.
     * [143]Consultants-HOWTO, Linux Consultants HOWTO
       Updated: September 1999. A listing of companies providing
       commercial Linux related support.
     * [144]CVS-RCS-HOWTO, CVS-RCS HOWTO for Linux (Source Code Control
       System)
       Updated: June 2000. A "practical guide" to very quickly setup a
       CVS/RCS source code control system.
     * [145]Cyrillic-HOWTO, The Linux Cyrillic HOWTO
       Updated: January 1998. How to set up your Linux box to typeset,
       view and print the documents in the Russian language.
     * [146]Cyrus-IMAP, Cyrus IMAP HOWTO
       Updated: July 2000. A comprehensive guide to installing,
       configuring, and running Cyrus Imap and Cyrus Sasl.
     * [147]Danish-HOWTO, The Linux Danish/International HOWTO
       Updated: March 2000. How to configure Linux and various Linux
       applications for Danish locale standards such as keyboard, font,
       paper-size etc.
     * [148]DB2-HOWTO, DB2 Version 7.1 for Linux HOWTO
       Updated: July 2000. Explicit instructions on installing DB2
       Universal Database Version 7.1 for Linux on the following Intel
       x86-based distributions: Caldera OpenLinux 2.4, Debian, Red Hat
       Linux 6.2, SuSE Linux 6.2 and 6.3, and TurboLinux 6.0.
     * [149]Diald-HOWTO, Diald HOWTO
       Updated: April 2000. Shows some typical scenarios for easy start
       using Diald. Replaces the Diald mini-HOWTO.
     * [150]Diskless-HOWTO, Diskless Nodes HOWTO for Linux
       Updated: July 2000. How to set up a diskless Linux box.
     * [151]Diskless-root-NFS-HOWTO, Root over nfs clients & server HOWTO
       Updated: March 1999. How to setup a server and configure clients
       for diskless operation from a network.
     * [152]Distribution-HOWTO, The Linux Distribution HOWTO
       Updated: June 2000. Intended to help new users choose a Linux
       distribution, and to help experienced users track the state of the
       Linux market.
     * [153]DNS-HOWTO, DNS HOWTO
       Updated: February 1999. How to become a totally "small time" DNS
       admin.
     * [154]DOS-Win-to-Linux-HOWTO, From DOS/Windows to Linux HOWTO
       Updated: February 1999. Written for all the DOS and Windows users
       who have decided to switch to Linux.
     * [155]DOSEMU-HOWTO, The dosemu HOWTO
       Updated: March 1997. DOSEMU stands for DOS Emulation, and is an
       application that enables the Linux OS to run many DOS programs.
     * [156]DVD-Playing-HOWTO, DVD Playing HOWTO
       Updated: June 2000. A easy to follow explanation on how to get DVD
       movie play-back in Linux.
     * [157]Ecology-HOWTO, Linux Ecology HOWTO
       Updated: March 2000. Discusses ways Linux computers can be used as
       a means to protect our environment, by using its features to save
       power or paper.
     * [158]Emacs-Beginner-HOWTO, Emacs Beginner's HOWTO
       Updated: October 1999. Introduces Linux users to the Emacs editor.
     * [159]Emacspeak-HOWTO, The Linux Emacspeak HOWTO
       Updated: April 1999. How a blind user can use Linux with a speech
       synthesizer to replace the video display.
     * [160]Enterprise-Java-for-Linux-HOWTO, Enterprise Java for Linux
       HOWTO
       Updated: January 1999. How to set up an Enterprise Java
       environment on Linux including a JDK, a Web server, supporting
       Java servlets, accessing a database via JDBC, and supporting
       Enterprise Java Beans (EJBs).
     * [161]Esperanto-HOWTO, Linux-Esperanto-HOWTO
       Updated: August 1999.
     * [162]Ethernet-HOWTO, Linux Ethernet HOWTO
       Updated: May 1999. Information about which ethernet devices can be
       used for Linux, and how to set them up (focused on the hardware
       and low level driver aspect of the ethernet cards; see Network
       HOWTO for software configuration information).
     * [163]Filesystems-HOWTO, Filesystems HOWTO
       Updated: March 2000. About filesystems and accessing filesystems.
     * [164]Finnish-HOWTO, Finnish HOWTO
       Updated: February 1996. How to "finlandize" Linux - Finnish
       keyboard mapping, time zone, 8-bit clean settings for
       applications, etc. (written in Finnish).
     * [165]Firewall-HOWTO, Firewall and Proxy Server HOWTO
       Updated: February 2000. Designed to describe the basics of
       firewall systems and give you some detail on setting up both a
       filtering and proxy firewall on a Linux based system.
     * [166]Font-HOWTO, Font HOWTO
       Updated: March 2000. Provides a comprehensive source to act as a
       starting point for any and all font questions about Linux.
     * [167]Framebuffer-HOWTO, Framebuffer HOWTO
       Updated: July 1999. How to use the framebuffer devices in Linux
       with a variety of platforms. Also includes how to set up
       multi-headed displays.
     * [168]Francophones-HOWTO, Le Francophones-HOWTO : Linux & la langue
       franaise
       Updated: December 1999.
     * [169]From-PowerUp-To-Bash-Prompt-HOWTO, From Power Up To Bash
       Prompt
       Updated: April 2000. A brief description of what happens in a
       Linux system from the time that you turn on the power, to the time
       that you log in and get a bash prompt.
     * [170]Ftape-HOWTO, Ftape HOWTO
       Updated: August 1998. Discusses essential do's and dont's for the
       ftape floppy tape driver under Linux. Focuses on the newest
       version (ftape-4.02 at the time of this writing).
     * [171]GCC-HOWTO, The Linux GCC HOWTO
       Updated: May 1999. Covers how to set up the GNU C compiler and
       development libraries under Linux; gives an overview of compiling,
       linking, running and debugging programs under it.
     * [172]German-HOWTO, German HOWTO
       Updated: March 1997. Addresses Linux localization issues specific
       to German users (written in German).
     * [173]Glibc2-HOWTO, Glibc 2 HOWTO
       Updated: June 1998. Covers installing and using the GNU C Library
       version 2 (libc6) on Linux systems.
     * [174]Hardware-HOWTO, Linux Hardware Compatibility HOWTO
       Updated: September 1999. Lists most of the hardware supported by
       Linux and helps you locate any necessary drivers.
     * [175]Hebrew-HOWTO, The Hebrew HOWTO
       Updated: September 1995. How to configure your Linux machine to
       use Hebrew characters on X-Windows and Virtual Consoles.
     * [176]Hellenic-HOWTO, Hellenic HOWTO
       Updated: August 1997. Addresses Linux localization issues specific
       to Greek users (written in Hellenic).
     * [177]HOWTO-HOWTO, HOWTO HOWTO
       Updated: June 2000. Lists the tools, procedures, and hints to get
       LDP authors up to speed and writing.
     * [178]HOWTO-INDEX, The Linux HOWTO Index
       Updated: April 2000. Index to the Linux HOWTOs as well as other
       information about the HOWTO project.
     * [179]HP-HOWTO, HP HOWTO - Utilisation and Configuration Guide of
       HP Products under Linux
       Updated: April 2000. Describes the use of products available in
       the Hewlett-Packard (HP) catalog with Linux and some free
       software.
     * [180]INFO-SHEET, Linux Information Sheet
       Updated: September 1998. Provides basic information about the
       Linux operating system, including an explanation of Linux, a list
       of features, some requirements, and some resources.
     * [181]IngresII-HOWTO, Ingres II HOWTO
       Updated: June 2000. Helps install the Ingres II Relational
       Database Management System on Linux.
     * [182]Installation-HOWTO, The Linux Installation HOWTO
       Updated: May 2000. How to obtain and install Linux software. It is
       the first document which a new Linux user should read to get
       started.
     * [183]Intranet-Server-HOWTO, The Linux Intranet Server HOWTO
       Updated: August 1997. How to setup an Intranet using Linux as the
       server which binds Unix, Netware, NT and Windows together.
     * [184]IP-Masquerade-HOWTO, Linux IP Masquerade HOWTO
       Updated: May 2000. How to enable the Linux IP Masquerade feature
       on a given Linux host.
     * [185]IPCHAINS-HOWTO, Linux IPCHAINS HOWTO
       Updated: July 2000. How to obtain, install and configure the
       enhanced IP firewalling chains software for Linux, and some ideas
       on how you might use them.
     * [186]IPX-HOWTO, Linux IPX HOWTO
       Updated: May 1998. How to obtain, install and configure various
       tools available for the Linux operating system that use the Linux
       kernel IPX protocol support.
     * [187]IR-HOWTO, Linux IR HOWTO
       Updated: September 1999. Introduction to Linux and infrared
       devices and how to use the software provided by the Linux/IrDA
       project.
     * [188]ISP-Hookup-HOWTO, ISP-Hookup HOWTO
       Updated: March 1998. How to use Linux to connect to an Internet
       Service Provider via a dial-up modem TCP/IP connection (basic
       dial-up procedure and IP establishment, email and news handling is
       covered).
     * [189]ISP-Setup-RedHat, "Pocket" ISP based on RedHat Linux
       Updated: April 2000. Outlines the setup of a single RedHat box for
       dial-ins,virtual web hosting, virtual email, POP3 and ftp servers.
     * [190]Italian-HOWTO, Linux Italian HOWTO
       Updated: November 1998. Addresses Linux localization issues
       specific to Italian users (written in Italian).
     * [191]Java-CGI-HOWTO, Java CGI HOWTO
       Updated: December 1998. Explains how to set up your server to
       allow CGI programs written in Java and how to use Java to write
       CGI programs.
     * [192]JavaStation-HOWTO, Linux on the Sun JavaStation NC HOWTO
       Updated: June 2000. Describes how to enable the Linux OS on the
       Sun JavaStation NC.
     * [193]Jaz-Drive-HOWTO, Jaz-drive HOWTO
       Updated: January 2000. Covers the configuration and use of the 1Gb
       and 2Gb Iomega Jaz drives under Linux.
     * [194]Kernel-HOWTO, The Linux Kernel HOWTO
       Updated: June 1999. A detailed guide to kernel configuration,
       compilation, upgrades, and troubleshooting for ix86-based systems.
     * [195]Keyboard-and-Console-HOWTO, The Linux keyboard and console
       HOWTO
       Updated: February 1998. Contains some information about the Linux
       (v2.0) keyboard and console, and the use of non-ASCII characters.
     * [196]KickStart-HOWTO, RedHat Linux KickStart HOWTO
       Updated: January 1999. Briefly describes how to use the RedHat
       Linux KickStart system to rapidly install large numbers of
       identical Linux boxes.
     * [197]Kiosk-HOWTO, Kiosk HOWTO
       Updated: October 1999. Provides a guide for setting up a WWW-based
       kiosk using Linux, X11R6, FVWM2, Netscape Navigator 4.X, and a
       customized trackball.
     * [198]Kodak-Digitalcam-HOWTO, Kodak Digital Camera HOWTO
       Updated: February 2000. Getting a Kodak digital camera working
       under GNU/Linux.
     * [199]Laptop-HOWTO, Linux Laptop HOWTO
       Updated: December 1999. Contains a concise survey of
       laptop-related (Linux content) documents, such as installation
       methods for laptops (via PCMCIA, without CD drive, etc.), laptop
       hardware features, and configurations for different (network)
       environments.
     * [200]Large-Disk-HOWTO, Large Disk HOWTO
       Updated: February 2000. All about disk geometry and the 1024
       cylinder limit for disks.
     * [201]LDAP-HOWTO, LDAP Linux HOWTO
       Updated: February 2000. Information about installing, configuring,
       running and maintaining a LDAP (Lightweight Directory Access
       Protocol) Server on a Linux machine.
     * [202]Linux-From-Scratch-HOWTO, Linux From Scratch HOWTO
       Updated: April 2000. Describes the process of creating your own
       Linux system from scratch from an already installed Linux
       distribution, using nothing but the source code of software that
       we need.
     * [203]LinuxDoc+Emacs+Ispell-HOWTO, LinuxDoc+Emacs+Ispell HOWTO
       Updated: February 1998. Aimed at writers and translators of Linux
       HOWTOs or any other paper for the Linux Documentation Project.
       Gives hints at using tools including Emacs and Ispell.
     * [204]Loopback-Encrypted-Filesystem-HOWTO, Loopback Encrypted
       Filesystem HOWTO
       Updated: November 1999. Explains how to setup and then use a
       filesystem that, when mounted by a user, dynamically and
       transparently encrypts its contents.
     * [205]LVM-HOWTO, Logical Volume Manager HOWTO
       Updated: May 2000. A very hands-on HOWTO for Linux LVM.
     * [206]Mail-Administrator-HOWTO, The Linux Electronic Mail
       Administrator HOWTO
       Updated: January 2000. Describes the setup, care and feeding of
       Electronic Mail (e-mail) under Linux. Primarily intended for
       administrators.
     * [207]Mail-User-HOWTO, The Linux Mail User HOWTO
       Updated: May 1999. An introduction to the world of electronic mail
       (email) under Linux. Focuses on user-level issues and typical
       configurations for Linux home and small-business machines
       connected to the net via an ISP.
     * [208]Majordomo-MajorCool-HOWTO, Majordomo and MajorCool HOWTO
       Updated: November 1999. Intended to guide a user through an
       installation of the Majordomo Mailing List Software and MajorCool
       (utility for managing Majordomo lists via a CGI script).
     * [209]META-FAQ, Linux Meta-FAQ
       Updated: October 1997. Mainly a list of valuable sources of
       information for Linux. Use these sources if you want to learn more
       about Linux, or have problems and need help.
     * [210]MGR-HOWTO, The MGR Window System HOWTO
       Updated: May 1996. Information on the installation, configuration
       and running of the MGR Window System.
     * [211]MILO-HOWTO, Alpha Miniloader HOWTO
       Updated: December 1996. Describes the Alpha Linux Miniloader (also
       known as MILO), a program for Alpha-based systems that can be used
       to initialize the machine and load Linux.
     * [212]MIPS-HOWTO, Linux/MIPS HOWTO
       Updated: June 2000. Describes the MIPS port of the Linux operating
       system, common problems and their solutions, availability and
       more.
     * [213]Modem-HOWTO, The Linux Modem HOWTO
       Updated: June 2000. Help with selecting, connecting, configuring,
       trouble-shooting, and understanding modems for a PC.
     * [214]MP3-HOWTO, The Linux MP3 HOWTO
       Updated: April 2000. Describes the hardware, software and
       procedures needed to encode, play and stream MP3 sound files under
       Linux.
     * [215]Multi-Disk-HOWTO, HOWTO: Multi Disk System Tuning
       Updated: November 1999. How best to use multiple disks and
       partitions for a Linux system.
     * [216]Multicast-HOWTO, Multicast over TCP/IP HOWTO
       Updated: March 1998. Tries to cover most aspects related to
       multicast over TCP/IP networks.
     * [217]Mutt-GnuPG-PGP-HOWTO, Mutt-i, GnuPG and PGP HOWTO
       Updated: February 2000. Briefly explains how to configure Mutt-i,
       PGP and GnuPG in its different versions (2.6.x, 5.x and GnuPG).
     * [218]NC-HOWTO, Linux Netstation HOWTO
       Updated: June 2000. Describes how to hook up a IBM Netstation to
       your local network using a Linux box as server.
     * [219]NCD-HOWTO, Linux NCD mini-HOWTO
       Updated: September 1999. Describes how to hook up a NCD ThinSTAR
       to your local network using a Linux box as server.
     * [220]Net-HOWTO, Linux Networking HOWTO
       Updated: March 2000. Information about networking for Linux
       (relates only to version 4 of the Linux Networking Kernel or more
       specifically kernel releases 2.x and 2.2.x).
     * [221]NET3-4-HOWTO, Linux Networking HOWTO (Previously the Net-3
       Howto)
       Updated: August1999. Describes how to install and configure the
       Linux networking software and associated tools.
     * [222]Networking-Overview-HOWTO, The Linux Networking Overview
       HOWTO
       Updated: July 2000. Overview of the networking capabilities of the
       Linux Operating System; provides pointers for further information
       and implementation details.
     * [223]NFS-HOWTO, NFS HOWTO
       Updated: October 1999. How to set up NFS clients and servers.
     * [224]NIS-HOWTO, The Linux NIS(YP)/NYS/NIS+ HOWTO
       Updated: March 1999. How to configure Linux as NIS(YP) or NIS+
       client and how to install as a NIS server.
     * [225]Online-Troubleshooting-HOWTO, Online Troubleshooting
       Resources HOWTO
       Updated: September 1999. Directs Linux users to resources
       available on the Internet that provide access to a vast amount of
       Linux-related information useful in troubleshooting problems.
     * [226]Optical-Disk-HOWTO, Linux - Optical Disk HOWTO
       Updated: December 1998. Describes the installation and
       configuration of optical disk drives for Linux.
     * [227]Oracle-7-HOWTO, Oracle 7 Database HOWTO
       Updated: August 1998. A guide to installing and configuring the
       Oracle 7 Database Server on a Linux system.
     * [228]Oracle-8-HOWTO, Oracle (8) for Linux Installation HOWTO
       Updated: June 2000. A guide to installing and configuring the
       Oracle 8i Enterprise Edition for Linux.
     * [229]PalmOS-HOWTO, Palm OS Desktop HOWTO
       Updated: February 1999. Explains how to use your Palm OS device
       with a Linux system.
     * [230]Parallel-Processing-HOWTO, Linux Parallel Processing HOWTO
       Updated: January 1998. Discusses the four basic approaches to
       parallel processing that are available to Linux users: SMP Linux
       systems, clusters of networked Linux systems, parallel execution
       using multimedia instructions (i.e., MMX), and attached (parallel)
       processors hosted by a Linux system.
     * [231]PCI-HOWTO, Linux PCI-HOWTO
       Updated: March 1997. Information on what works with Linux and
       PCI-boards and what does not.
     * [232]PCMCIA-HOWTO, Linux PCMCIA HOWTO
       Updated: December 1999. How to install and use PCMCIA Card
       Services for Linux.
     * [233]phhttpd-HOWTO, PHHTTPD
       Updated: January 2000. phhttpd is an HTTP accelerator. It serves
       fast static HTTP fetches from a local file-system and passes
       slower dynamic requests back to a waiting server.
     * [234]PHP-HOWTO, PHP HOWTO
       Updated: July 2000. How to develop PHP programs and also to
       migrate all the Windows 95 GUI applications to powerful PHP + HTML
       + DHTML + XML + Java applets + Javascript. Applies to all the
       operating sytems where PHP is ported.
     * [235]PLIP-Install-HOWTO, PLIP Install HOWTO
       Updated: June 2000. How to install a GnuXXPIPELinux distribution
       on a computer without Ethernet card, nor cdrom, but just a local
       floppy drive and a remote nfs server attached by a Null-Modem
       parallel cable.
     * [236]Plug-and-Play-HOWTO, The Linux Plug-and-Play HOWTO
       Updated: June 2000. How to get your Linux system to support
       Plug-and-Play.
     * [237]Polish-HOWTO, Polish HOWTO
       Updated: February 1999. Addresses Linux localization issues
       specific to Polish users (written in Polish).
     * [238]Portuguese-HOWTO, Portuguese HOWTO
       Updated: December 1999. Addresses Linux localization issues
       specific to Portuguese users (written in Portuguese).
     * [239]PostgreSQL-HOWTO, Database-SQL-RDBMS HOWTO for Linux
       (PostgreSQL Object Relational Database System)
       Updated: July 2000. A "practical guide" to very quickly setup a
       SQL Database engine and front end tools on a Unix system.
     * [240]PPP-HOWTO, Linux PPP HOWTO
       Updated: March 1997. How to connect your Linux PC to a PPP server,
       how to use PPP to link two LANs together; provides one method of
       setting up your Linux computer as a PPP server.
     * [241]Printing-HOWTO, The Linux Printing HOWTO
       Updated: February 2000. A collection of information on how to
       generate, preview, print and fax anything under Linux (and other
       Unices in general).
     * [242]Printing-Usage-HOWTO, The Linux Printing Usage HOWTO
       Updated: February 1998. How to use the print system under Linux.
     * [243]Process-Monitor-HOWTO, Process Monitor HOWTO for Linux
       Updated: July 2000. How to monitor Linux/Unix processes and to
       re-start them automatically if they die (without any manual
       intervention).
     * [244]Program-Library-HOWTO, Program Library HOWTO
       Updated: April 2000. This HOWTO for programmers discusses how to
       create and use program libraries on Linux. This includes static
       libraries, shared libraries, and dynamically loaded libraries.
     * [245]Psion-HOWTO, Linux and Psion HOWTO
       Updated: November 1999. How to use Psion palmtops with Linux. Does
       not cover running Linux on a Psion palmtop.
     * [246]Qmail-VMailMgr-Courier-imap-HOWTO, Qmail VMailMgr and
       Courier-Imap HOWTO
       Updated: April 2000. Building a mail server that will support
       virtual domain hosting and provide smtp, pop3 and imap services,
       using a powerful alternative to sendmail.
     * [247]Quake-HOWTO, Linux Quake HOWTO
       Updated: August 1998. How to install, run and troubleshoot Quake,
       QuakeWorld and Quake II on an Intel Linux system.
     * [248]Reading-List-HOWTO, The Linux Reading List HOWTO
       Updated: March 2000. Lists the books the author thinks are most
       valuable to a person trying to learn Unix (especially Linux) top
       to bottom.
     * [249]RedHat-CD-HOWTO, Burning a RedHat CD HOWTO
       Updated: March 2000. How to make your own CDs from the Red Hat
       Linux distribution equivalent to the ones commercially available
       from Red Hat.
     * [250]Root-RAID-HOWTO, Root RAID HOWTO cookbook
       Updated: May 2000. This document only applies to the OLD
       raidtools, versions 0.50 and under. The workarounds and solutions
       addressed in this HOWTO have largely been made obsolete by the
       vast improvment in the 0.90 raidtools and accompanying kernel
       patch to the 2.0.37, 2.2x and 2.3x series kernels. You may find
       the detailed descriptions useful, particularly if you plan to run
       root raid or use initrd.
       original description: A cookbook for creating a root mounted raid
       filesystem and companion fallback rescue system using linux
       initrd. Step-by-step instructions for both raid1 and raid5 md0
       devices.
     * [251]RPM-HOWTO, RPM HOWTO - RPM at Idle
       Updated: November 1999. RPM is the RPM Package Manager. It is an
       open packaging system available for anyone to use. It allows users
       to take source code for new software and package it into source
       and binary form such that binaries can be easily installed and
       tracked and source can be rebuilt easily. It also maintains a
       database of all packages and their files that can be used for
       verifying packages and querying for information about files and/or
       packages.
     * [252]SCSI-Programming-HOWTO, The Linux SCSI programming HOWTO
       Updated: May 1996. Deals with programming the Linux generic SCSI
       interface.
     * [253]Secure-Programs-HOWTO, Secure Programming for Linux and Unix
       HOWTO
       Updated: June 2000. Provides a set of design and implementation
       guidelines for writing secure programs for Linux and Unix systems.
     * [254]Securing-Domain-HOWTO, Setting Up Your New Domain Mini HOWTO
       Updated: December 1999. Outlines the things you will probably have
       to do when you want to setup a network of computers under your own
       domain. Covers configuration of network parameters, network
       services, and security settings.
     * [255]Security-HOWTO, Linux Security HOWTO
       Updated: March 2000. A general overview of security issues that
       face the administrator of Linux systems.
     * [256]Serbian-HOWTO, Serbian HOWTO
       Updated: November 1998. Addresses Linux localization issues
       specific to Serbian users (written in Serbian).
     * [257]Serial-HOWTO, The Linux Serial HOWTO
       Updated: June 2000. Describes serial port features other than
       those which should be covered by other HOWTOs. Lists information
       on multiport serial cards and contains detailed technical
       information about the serial port itself.
     * [258]Serial-Programming-HOWTO, The Linux Serial Programming HOWTO
       Updated: January 1998. How to program communications with devices
       over a serial port on a Linux box.
     * [259]Shadow-Password-HOWTO, Linux Shadow Password HOWTO
       Updated: April 1996. How to obtain, install, and configure the
       Linux password Shadow Suite.
     * [260]Slovenian-HOWTO, Slovenian HOWTO
       Updated: February 1999. Addresses Linux localization issues
       specific to Slovenian users (written in Slovenian).
     * [261]SMB-HOWTO, SMB HOWTO
       Updated: April 2000. How to use the Server Message Block (SMB)
       protocol, also called the Session Message Block, NetBIOS or
       LanManager protocol, with Linux using Samba.
     * [262]SMP-HOWTO, Linux SMP HOWTO
       Updated: January 2000. Reviews main issues related to SMP
       configuration under Linux.
     * [263]Software-Building-HOWTO, Building and Installing Software
       Packages for Linux
       Updated: July 1999. A comprehensive guide to building and
       installing "generic" UNIX software distributions under Linux.
     * [264]Software-RAID-HOWTO, Software-RAID HOWTO
       Updated: January 2000 (latest version). How to use Software RAID
       under Linux. It addresses a specific version of the Software RAID
       layer, namely the 0.90 RAID layer made by Ingo Molnar and others.
       This is the RAID layer that will be standard in Linux-2.4, and it
       is the version that is also used by Linux-2.2 kernels shipped from
       some vendors. The 0.90 RAID support is available as patches to
       Linux-2.0 and Linux-2.2, and is by many considered far more stable
       that the older RAID support already in those kernels.
     * [265]Software-RAID-0.4x-HOWTO, Software-RAID HOWTO (earlier
       implementation)
       Updated: November 1998. How to use Software RAID under Linux. RAID
       stands for "Redundant Array of Inexpensive Disks". For users of
       the Linux MD kernel extension, the associated tools, and their
       use. This HOWTO addresses an earlier implementation.
     * [266]Software-Release-Practice-HOWTO, Software Release Practice
       HOWTO
       Updated: June 2000. Describes good release practices for Linux
       open-source projects.
     * [267]Sound-HOWTO, The Linux Sound HOWTO
       Updated: March 1999. Describes sound support for Linux (hardware,
       configuration, etc).
     * [268]Sound-Playing-HOWTO, The Linux Sound Playing HOWTO
       Updated: August 1998. Lists applications for Linux that play
       various sound formats.
     * [269]Spanish-HOWTO, Spanish Linux HOWTO
       Updated: August 1996. Contains information on Linux in the Spanish
       environment, for developing software with Spanish support or how
       to get in touch with the Linux community in Spain (written in
       Spanish).
     * [270]SRM-HOWTO, SRM Firmware HOWTO
       Updated: March 2000. How to boot Linux/Alpha using the SRM
       firmware, which is the firmware normally used to boot DEC Unix
       (also known as OSF/1 and Tru64Unix) and OpenVMS.
     * [271]TclTk-HOWTO, The Linux Tcl and Tk HOWTO
       Updated: November 1998. Describes the Linux approach to Tcl, a
       scripting language.
     * [272]TeTeX-HOWTO, The teTeX HOWTO: The Linux-teTeX Local Guide
       Updated: November 1998. Covers the basic installation and usage of
       the teTeX TeX and LaTeX implementation, plus auxiliary packages
       like Ghostscript.
     * [273]Text-Terminal-HOWTO, The Linux Text-Terminal HOWTO
       Updated: June 2000. Explains what text terminals are, how they
       work, how to install and configure them, and provides some info on
       how to repair them.
     * [274]Thai-HOWTO, The Linux Thai HOWTO
       Updated: August 1998. How to use Thai language with Linux. This
       will cover setting Thai fonts, Thai keyboard and some Thai
       applications.
     * [275]Thinclient-HOWTO, Thin Client: New User Guide
       Updated: November 1999. How to turn inexpensive legacy computers
       into fast terminals.
     * [276]Tips-HOWTO, The Linux Tips HOWTO
       Updated: June 1998. Contains those hard to find hints and
       tweekings that make Linux a bit nicer.
     * [277]Turkish-HOWTO, Turkish HOWTO
       Updated: September 1999. Addresses Linux localization issues
       specific to Turkish users (written in Turkish).
     * [278]UMSDOS-HOWTO, UMSDOS HOWTO
       Updated: November 1995. Explains how to use Umsdos (a linux file
       system) in different configurations, and its operation.
     * [279]Unicode-HOWTO, The Unicode HOWTO
       Updated: October 1999. How to change your Linux system so it uses
       UTF-8 as text encoding.
     * [280]Unix-and-Internet-Fundamentals-HOWTO, The Unix and Internet
       Fundamentals HOWTO
       Updated: July 2000. Describes the working basics of PC-class
       computers, Unix-like operating systems, and the Internet in
       non-technical language.
     * [281]UPS-HOWTO, The UPS HOWTO
       Updated: November 1997. Helps you connect an uninterruptable power
       supply to a Linux box.
     * [282]User-Authentication-HOWTO, User Authentication HOWTO
       Updated: May 2000. Explains how user and group information is
       stored and how users are authenticated on a Linux system (PAM),
       and how to secure you system's user authentication.
     * [283]User-Group-HOWTO, Linux User Group HOWTO
       Updated: April 1998. A guide to founding, maintaining, and growing
       a Linux User Group.
     * [284]UUCP-HOWTO, The Linux UUCP HOWTO
       Updated: February 1998. Describes the setup, care & feeding of
       UUCP under Linux.
     * [285]VAR-HOWTO, Linux VAR HOWTO
       Updated: August 1999. Contains a listing of service companies
       which do not manufacture hardware or create packaged software, but
       add value to existing products.
     * [286]Vim-HOWTO, Vim Color Editor HOWTO (Vi Improved w/syntax color
       highlighting)
       Updated: July 2000. A guide to very quickly setup Vim color editor
       on Linux or Unix systems.
     * [287]Virtual-Services-HOWTO, Virtual Services HOWTO
       Updated: August 1998. How to virtualize a service.
     * [288]VMailMgr-HOWTO, VMailMgr HOWTO
       Updated: April 2000. Explains how to setup VMailMgr to support
       pop3 virtual domain services in conjunction with Qmail.
     * [289]VME-HOWTO, VME HOWTO
       Updated: July 1998. Shows the embedded system community how to run
       Linux on their VMEbus Pentium and other PCI local bus based VMEbus
       processor designs.
     * [290]VMS-to-Linux-HOWTO, From VMS to Linux HOWTO
       Updated: September 1999. Aimed at all those who have been using
       VMS and now need or want to switch to Linux.
     * [291]VPN-HOWTO, VPN HOWTO
       Updated: December 1999. How to set up a Virtual Private Network
       with Linux.
     * [292]VPN-Masquerade-HOWTO, Linux VPN Masquerade HOWTO
       Updated: September 1999. How to configure a Linux firewall to
       masquerade IPsec- and PPTP-based Virtual Private Network traffic,
       allowing you to establish a VPN connection without losing the
       security and flexibility of your Linux firewall's internet
       connection and allowing you to make available a VPN server that
       does not have a registered internet IP address.
     * [293]Wacom-Tablet-HOWTO, Wacom Tablet HOWTO
       Updated: March 2000. Installation of (not only) Wacom graphic
       tablets under linux and/or xfree86.
     * [294]Wearable-HOWTO, Wearable HOWTO
       Updated: March 2000. Nomadism is one of the major trends of our
       society, now most of the people can work with a laptop computer,
       but few did the next step: to live, or if you prefer to wear one
       computer - that is a wearable.
     * [295]Winmodems-and-Linux-HOWTO, Winmodems-and-Linux HOWTO
       Updated: April 2000. Helps users having a Winmodem for getting it
       working under Linux.
     * [296]WWW-HOWTO, Linux WWW HOWTO
       Updated: August 1999. Information about setting up WWW services
       under Linux (both server and client).
     * [297]WWW-mSQL-HOWTO, A mSQL and perl Web Server HOWTO
       Updated: September 1997. How to build a SQL client/server database
       using WWW and HTML for the user interface.
     * [298]XFree86-HOWTO, The Linux XFree86 HOWTO
       Updated: April 2000. How to obtain, install, and configure version
       4.0 of the XFree86 version of the X Window System (X11R6) for
       Linux systems.
     * [299]XFree86-Touch-Screen-HOWTO, Linux Touch Screen HOWTO
       Updated: December 1999. How to set up a touch screen input device
       under XFree86.
     * [300]XFree86-Video-Timings-HOWTO, XFree86 Video Timings HOWTO
       Updated: March 2000. How to compose a mode line for your
       card/monitor combination under XFree86.
     * [301]Xinerama-HOWTO, Using the Xinerama Extensions to MultiHead X
       v.4.0
       Updated: May 2000. How to configure XFree86 Version 4.0 with
       Multiple monitors and the Xinerama extentions.
     * [302]XWindow-User-HOWTO, The X Window User HOWTO
       Updated: September 1999. Information on configuring the X Window
       environment for the Linux user, as well as for the beginning
       system administrator attempting to sort through the many
       configuration options and details of X Window.
     _________________________________________________________________
   
Chapter 6. Single list of mini-HOWTOs

   The following Linux mini-HOWTOs are currently available:
   
     * [303]3-Button-Mouse, The 3 Button Serial Mouse mini-HOWTO
       Updated: May 1998. How to get a 3 button serial mouse working
       properly under Linux.
     * [304]ADSL, ADSL HOWTO for Linux Systems
       Updated: April 1999. How to setup a Linux System to work with
       Asymmetric Digital Subscriber Loop (ADSL).
     * [305]ADSM-Backup, Linux ADSM mini-HOWTO
       Updated: January 1997. How to install and use a client for the
       commercial ADSM backup system for Linux/i386.
     * [306]Advocacy, Linux Advocacy mini-HOWTO
       Updated: May 2000. Suggestions for how the Linux community can
       effectively advocate the use of Linux.
     * [307]Alsa-sound, Alsa-sound-mini-HOWTO
       Updated: November 1999. Describes the installation of the ALSA
       sound drivers for Linux.
     * [308]Apache-mods,
       Apache+DSO+mod_ssl+mod_perl+php+mod_auth_nds+mod_auth_mysql+mod_fa
       stcgi mini-HOWTO
       Updated: April 2000. Details the installation of an Apache based
       webserver suite configured to handle DSO, and various useful
       modules including mod_perl, mod_ssl and php.
     * [309]Apache+SSL+PHP+fp, Linux Apache SSL PHP/FI frontpage
       mini-HOWTO
       Updated: July 1998. About building a multipurpose webserver that
       will support dynamic web content via the PHP/FI scripting
       language, secure transmission of data based on Netscape's SSL,
       secure execution of CGI's and M$Frontpage Server Extensions.
     * [310]Automount, Automount mini-HOWTO
       Updated: April 1999. Describes the autofs automounter, how to
       configure it; points out some problems to avoid.
     * [311]Backup-With-MSDOS, Backup-With-MSDOS mini-HOWTO
       Updated: August 1997. How to use a Linux-compatible tape drive
       installed on an MS-DOS machine to back up the filesystem of a
       Linux machine.
     * [312]Battery-Powered, Battery Powered Linux Mini-HOWTO
       Updated: December 1997. How to reduce a Linux system's power
       consumption by tweaking some of its configuration settings.
     * [313]Boca, Boca HOWTO
       Updated: August 1997. How to install a Boca 16-port serial card
       (Boca 2016) with Linux.
     * [314]BogoMips, BogoMips mini-HOWTO
       Updated: February 2000. Some information about BogoMips, compiled
       from various sources.
     * [315]Boot+Root+Raid+LILO, Boot + Root + Raid + Lilo : Software
       Raid mini-HOWTO
       Updated: May 2000. A cookbook for setting up root raid using the
       0.90 raidtools for bootable raid mounted on root using standard
       LILO.
     * [316]Bridge, Bridging mini-HOWTO
       Updated: September 1998. Describes how to setup an ethernet
       bridge.
     * [317]Bridge+Firewall, Linux Bridge+Firewall Mini-HOWTO
       Updated: December 1997. A bridge is an intelligent connection wire
       between two network cards. A firewall is an intelligent insulator.
     * [318]Bridge+Firewall+DSL, Bridge + Firewall + DSL Mini-HOWTO
       Updated: March 2000. Configuring a Linux system to act as a
       firewall and bridge with a DSL network connection.
     * [319]BTTV-Mini-HOWTO-0.3, The BTTV Mini-HOWTO
       Updated: February 2000. Describes the hardware, software, and
       procedures needed to use a bt8x8 chipset based frame grabber or TV
       tuner card under Linux.
     * [320]Bzip2, Bzip2 mini-HOWTO
       Updated: August 1999. How to use the new bzip2 compression
       program.
     * [321]call-back call-back mini HOWTO
       Updated: June 2000. How to set up call-back by using the Linux
       system and modem.
     * [322]Cipe+Masq, The Linux Cipe+Masquerading mini-HOWTO
       Updated: April 1999. How to setup a VPN using Cipe on a linux
       masquerading firewall.
     * [323]Clock, The Clock Mini-HOWTO
       Updated: July 1999. How to set and keep your computer's clock on
       time.
     * [324]Coffee, COFFEE-HOWTO
       Updated: January 1998. Yes, Linux DOES make coffee, and it tastes
       good.
     * [325]Commercial-Port-Advocacy, Commercial Port Advocacy mini-HOWTO
       Updated: December 1999. Discusses methods that can be used to
       approach commercial software companies to convince them to port
       their programs to Linux.
     * [326]Compressed-TCP, Compressed TCP/IP-Sessions using SSH-like
       tools
       Updated: April 2000. Discusses how to compress data streams.
     * [327]DHCP, DHCP mini-HOWTO
       Updated: November 1999. Answers basic questions on how to set up
       your Linux box to serve as a DHCP server or a DHCP client.
     * [328]Divert-Sockets-mini-HOWTO, Divert Sockets mini-HOWTO
       Updated: February 2000. Describes how to get, compile and use
       FreeBSD divert sockets under Linux 2.2.12.
     * [329]Domain-Setup-mini-HOWTO, Setting Up Your New Domain
       Mini-HOWTO
       Updated: February 2000. Outlines the things you will probably have
       to do when you want to set up a network of computers under your
       own domain.
     * [330]DPT-Hardware-RAID, Linux DPT Hardware RAID HOWTO
       Updated: April 1999. How to set up hardware RAID under Linux.
     * [331]Ext2fs-Undeletion, Linux Ext2fs Undeletion mini-HOWTO
       Updated: February 1999. Presents a discussion of how to retrieve
       deleted files from a Second Extended File System.
     * [332]Fax-Server, Linux simple fax printer server mini-HOWTO
       (faxsrv-mini-HOWTO)
       Updated: November 1997. Describes in detail one of the simplest
       ways to setup a fax server on your Linux system.
     * [333]Font-Deuglification-mini-HOWTO, XFree86 Font Deuglification
       Mini HOWTO
       Updated: November 1999. How to fix ugly and unreadable X Window
       fonts.
     * [334]Firewall-Piercing, Firewall Piercing mini-HOWTO
       Updated: November 1998. Directions for using ppp over telnet to do
       network activities transparently through an Internet firewall.
     * [335]FTP, FTP mini-HOWTO
       Updated: January 2000. How to use ftp clients and servers
     * [336]GIS-GRASS, GIS-GRASS mini-HOWTO
       Updated: November 1997. How to acquire, install and configure a
       powerful scientific public-domain Geographic Information System
       (GIS): the Geographic Resources Analysis Support System (GRASS).
     * [337]Handspring-Visor, Handspring-Visor mini-HOWTO
       Updated: April 2000. Using the Visor with Linux and your USB port.
     * [338]Hard-Disk-Upgrade, Hard Disk Upgrade Mini HOWTO
       Updated: April 2000. How to copy a Linux system from one hard disk
       to another.
     * [339]Home-Network-mini-HOWTO, Red Hat Linux 6. X as an Internet
       Gateway for a Home Network
       Updated: June 2000. Tutorial on configuring Red Hat 6 and related
       variants to operate as an internet gateway to a small home or
       office network. Topics covered include masquerading, DNS, DHCP,
       and basic security.
     * [340]Install-From-ZIP, Linux Install From PPA-Zip drive mini-HOWTO
       Updated: April 1998. How to install Linux from a parallel port zip
       drive using the Slackware Linux distribution.
     * [341]Intkeyb, mini-HOWTO for Linux (Unix) to setup international
       keyboards
       Updated: April 2000. This xmodmap and kimap solutions will work
       for you in setting up any international keyboard for (Debian,
       RedHat, Mandrake, Corel) Linux, FreeBSD, OpenBSD, NetBSD and
       possibly every Unix that uses Xfree86 and KDE.
     * [342]IO-Port-Programming, Linux I/O port programming mini-HOWTO
       Updated: December 1997. Describes programming hardware I/O ports
       and waiting for small periods of time in user-mode Linux programs
       running on the Intel x86 architecture.
     * [343]IP-Subnetworking, IP Sub-Networking mini-HOWTO
       Updated: March 1997. Describes why and how to subnetwork an IP
       network - that is using a single A, B or C Class network number to
       function correctly on several interconnected networks.
     * [344]IP-Alias, Setting Up IP Aliasing On A Linux Machine
       Mini-HOWTO
       Updated: January 1997. How to set up and run IP aliasing on a
       Linux box.
     * [345]IPMasquerading+Napster, IPMasquerading+Napster mini-HOWTO
       Updated: April 2000. Present a way to allow users behind an
       IPMasq'd system to use Napster.
     * [346]ISP-Connectivity, ISP-Connectivity mini-HOWTO
       Updated: November 1997. How to setup PPP, connect up to your ISP,
       configure mail and news, get a permanent IP (if available), get a
       domain name, and have a bona fide system running in a little over
       thirty minutes.
     * [347]Kerneld, The Linux kerneld mini-HOWTO
       Updated: May 2000. Explains how you can use the kerneld function
       in the Linux kernels.
     * [348]LBX, The LBX mini-HOWTO
       Updated: December 1997. LBX (Low Bandwidth X) is an X server
       extension which performs compression on the X protocol. It is
       meant to be used in conjunction with X applications and an X
       server which are separated by a slow network connection, to
       improve display and response time.
     * [349]Leased-Line, Leased line mini-HOWTO
       Updated: April 2000. Configuring your modem and pppd to use a 2
       wire twisted pair leased line.
     * [350]LILO, Lilo mini-HOWTO
       Updated: August 1998. Lilo (LILO) is the most used Linux Loader
       for the x86 flavour of Linux. This describes some typical Lilo
       installations. Intended as a supplement to the Lilo User's Guide.
     * [351]Linux+DOS+Win95+OS2, The Linux ``Linux-DOS-Win95-OS2''
       mini-HOWTO
       Updated: November 1997. Presents a procedure to make 4 operating
       systems co-exist on a single hard disk.
     * [352]Linux+FreeBSD, The Linux+FreeBSD mini-HOWTO
       Updated: March 2000. How to use Linux and FreeBSD on the same
       system.
     * [353]Linux-Modem-Sharing Linux Modem sharing mini-HOWTO
       Updated: February 1997. Describes how to setup a Linux system in
       order to share a modem attached to this system with other systems
       over a TCP/IP network.
     * [354]Linux+NT-Loader, NT OS Loader + Linux mini-HOWTO
       Updated: September 1997. Describes the use of the Windows NT boot
       loader to start Linux. This procedures have been tested with
       Windows NT 4.0 WS and Linux 2.0.
     * [355]Linux+Solaris, Linux+Solaris mini-HOWTO
       Updated: April 2000. Describes how to use Solaris and Linux
       together on one machine. It addresses common questions like
       multibooting and file-sharing.
     * [356]Linux+Win95, Yes my Children, it CAN be DONE!
       Updated: April 1996. Installing both Linux and Windows 95 on your
       PC.
     * [357]Loadlin+Win95, The Loadlin+Win95 mini-HOWTO
       Updated: March 1999. How to use Loadlin with Windows 95 to boot to
       Linux.
     * [358]Loopback-Root-FS, The Loopback Root Filesystem HOWTO
       Updated: September 1999. How to use the Linux loopback device to
       create a Linux native filesystem format installation that can be
       run from a DOS partition without re-partitioning.
     * [359]Mac-Terminal, The MacTerminal mini-HOWTO
       Updated: November 1997. How to configure the Mac for use as a
       Linux terminal.
     * [360]Mail-Queue, Linux Mail-Queue mini-HOWTO
       Updated: September 1997. Configuration changes necessary to make
       sendmail deliver local mail now; while stashing remote mail in the
       queue until "I Say So".
     * [361]Mail2News, Mail2News mini-HOWTO
       Updated: July 1999. How to feed a mailing list to a news server.
     * [362]Man-Page, The Linux Man Page mini-HOWTO
       Updated: January 2000. Explains what you should bear in mind when
       you are going to write on-line documentation -- a so called man
       page -- that you want to make accessible via the man(1) command.
     * [363]Modules, Linux Modules Installation mini-HOWTO
       Updated: n/a How to successfully set up Linux with modules
       configured and working.
     * [364]Multiboot-with-LILO, Win95 + WinNT + Linux multiboot using
       LILO mini-HOWTO
       Updated: March 1998. How to use the to multiboot between Windows
       95, Windows NT, and Linux.
     * [365]NCD-X-Terminal, NCD X terminal mini HOWTO
       Updated: March 2000. How to connect an NCD X terminal to a UNIX
       host.
     * [366]Netrom-Node, Netrom-Node mini-Howto
       Updated: October 1998. How to setup the ax25-utilities package for
       Amateur Radio such that it makes Netrom Nodes for the Node program
       and the BBS software from John-Paul Roubelat, F6FBB.
     * [367]Netscape+Proxy, HOWTO for inHouse IntraNet
       Updated: August 1997. Describes the procedure to set up a NETWORK
       (INTRANET) at your home. Then we shall setup the network such that
       NETSCAPE Clients can be used on ANY machine to access the
       internet. . .
     * [368]News-Leafsite, News Leafsite mini-HOWTO
       Updated: January 1998. This will help you to configure a small
       leafsite for Usenet News using the free software package Leafnode.
     * [369]NFS-Root, NFS-Root mini-HOWTO
       Updated: August 1997. How to setup a ``disc-less'' Linux
       workstation, which mounts it's root filesystems via NFS.
     * [370]NFS-Root-Client-mini-HOWTO, NFS-Root-Client Mini-HOWTO
       Updated: February 1999. How to create client root directories on a
       server that is using NFS Root mounted clients.
     * [371]Offline-Mailing, Linux off-line mailing method (offline
       mailaddr with 1 account)
       Updated: June 1998. Use your linux mailing system offline, receive
       mail for multiple users with only one email address, and without
       being 24-24 online.
     * [372]Partition-Rescue-mini-HOWTO, The Linux Partition-Rescue
       mini-HOWTO
       Updated: January 2000. Describes how to rescue your Linux
       partition if M$-DOG has deleted it for you.
     * [373]Partition, Linux Partition HOWTO
       Updated: May 2000. Teaches you how to plan and layout disk space
       for your Linux system.
     * [374]Path, PATH HOWTO
       Updated: November 1997. Describes common tricks and problems with
       Unix / Linux environment variables, especially with PATH variable.
     * [375]PLIP, LINUX PLIP mini-HOWTO
       Updated: March 1998. Will hopefully let you build and use a
       Parallel Line Interface Protocol.
     * [376]Pre-Installation-Checklist, Linux pre-installation checklist
       Updated: December 1999. An aide-memoire which may make
       installation of Linux a pleasant experience for you.
     * [377]Process-Accounting, How To Enable Process Accounting on Linux
       Updated: August 1997. Describes how to enable system process
       accounting on a Linux host, and the usage of various process
       accounting commands
     * [378]Programming-Languages, Programming Languages mini-HOWTO
       Updated: January 2000. A brief comparison of major programming
       languages for Linux and major libraries for creating graphical
       user interfaces (GUIs) under Linux.
     * [379]Proxy-ARP-Subnet, ProxyARP Subnetting HOWTO
       Updated: August 1997. Discusses using Proxy Address Resolution
       Protocol (ARP) with subnetting in order to make a small network of
       machines visible on another Internet Protocol (IP) subnet.
     * [380]Public-Web-Browser, The Linux Public Web Browser mini-HOWTO
       Updated: January 1998. The basic idea here is to give web access
       to people who wander by, while limiting their ability to mess
       anything up.
     * [381]Qmail+MH, mini-HOWTO install qmail with MH
       Updated: March 1998. Installation experiences to offer some help
       to other users who wish to use this combination for their email.
     * [382]Quota, Quota mini-HOWTO
       Updated: August 1997. How to enable file system quota on a Linux
       host, assigning quota for users and groups, as well as the usage
       of miscellaneous quota commands.
     * [383]RCS, The RCS mini-HOWTO
       Updated: August 1997. Covers basic installation and usage of RCS,
       the GNU Revision Control System, under Linux.
     * [384]Remote-Boot, Linux Remote-Boot mini-HOWTO: Configuring
       Remote-Boot Workstations with Linux, DOS, Windows 95/98 and
       Windows NT
       Updated: February 1999. How to set up a very robust and secure
       server-based configuration for a cluster of PCs, allowing each
       client to choose at boot-time which operating system to run.
     * [385]Remote-X-Apps, Remote X Apps mini-HOWTO
       Updated: November 1999. How to run remote X applications.
     * [386]RPM+Slackware, RPM+Slackware Mini-Howto
       Updated: April 1998. How to get RPM installed and working properly
       under Slackware.
     * [387]Saving-Space, Saving Space mini-HOWTO
       Updated: April 1999. Directions for squeezing your Linux
       installation into the least possible space. Particularly aimed at
       notebook users.
     * [388]Secure-POP+SSH, Secure POP via SSH mini-HOWTO
       Updated: September 1998. How to set up secure POP connections
       using ssh.
     * [389]Sendmail+UUCP, Sendmail+UUCP HOWTO
       Updated: May 1998. How to setup a single machine with no direct
       access to the internet to route mail for you via sendmail and UUCP
       to a 'smarter host' (eg. your ISP).
     * [390]Sendmail-Address-Rewrite, sendmail address rewriting
       mini-HOWTO
       Updated: May 1998. A brief description of how to set up sendmail's
       configuration file for the home user's dial-up access.
     * [391]SLIP-PPP-Emulator, SLIP/PPP Emulator HOWTO
       Updated: August 1997. Describes how to get your Linux box to
       connect to a generic site via a SLIP/PPP emulator, such as SLiRP
       or TIA.
     * [392]Small-Memory, Small Memory Mini-HOWTO
       Updated: March 2000. How to run Linux on a system with a small
       amount of memory.
     * [393]Soundblaster-AWE, Sound Blaster AWE 32/64 HOWTO
       Updated: January 1998. How to install and configure a Sound
       Blaster 32 (SB AWE 32, SB AWE 64) card from Creative Labs in a
       Linux System using the AWE Sound Driver Extension written by
       Takashi Iwai. It also covers some special tools and players for
       the SB AWE series.
     * [394]StarOffice, StarOffice 3.1 Mini-HOWTO
       Updated: November 1999. Information on installing the StarOffice
       3.1 Office Suite by StarDivision.
     * [395]Swap-Space, Linux Swap Space Mini-HOWTO
       Updated: December 1999. How to share your Linux swap partition
       with Windows.
     * [396]Term-Firewall, Using Term to Pierce an Internet Firewall
       Updated: July 1996. Directions for using ``term'' to do network
       stuff through a TCP firewall that you're not supposed to be able
       to.
     * [397]TkRat, TkRat mini-HOWTO
       Updated: September 1999. Geared toward anyone interested in using
       their Linux computer to send and receive Internet E-Mail.
     * [398]Token-Ring, Token-Ring mini-HOWTO
       Updated: January 1998. Designed to help you install the kernel
       patch and also try to point out some things to look for.
     * [399]TransparentProxy, Transparent Proxy with Squid mini-HOWTO
       Updated: April 2000. Provides information on how to setup a
       transparent caching HTTP proxy server using only Linux and squid.
     * [400]TT-Debian, TrueType Fonts in Debian mini-HOWTO
       Updated: January 2000. How to configure a Debian system to use
       TrueType fonts for display and printing.
     * [401]Ultra-DMA, The Linux Ultra-DMA Mini-Howto
       Updated: November 1999. How to use Ultra-DMA aka Ultra-ATA aka
       Ultra33 and Ultra66 hard drives and interfaces with Linux.
     * [402]Update, The Staying Updated mini-HOWTO
       Updated: September 1999. How to stay updated and abreast of the
       development that takes place in the Linux world of development.
     * [403]Upgrade, Upgrading Your linux Distribution mini-HOWTO
       Updated: June 1996. Hints and tips on upgrading from one linux
       distribution to another.
     * [404]VAIO+Linux, Linux on Sony VAIO mini-HOWTO
       Updated: September 1998. This document explains installation of
       Linux on Sony VAIO computers.
     * [405]Visual-Bell, Visible bell mini-Howto
       Updated: November 1997. How to use termcap to configure a visual
       bell on one's system and describes how to disable audible bells on
       demand.
     * [406]VPN, The VPN HOWTO
       Updated: August 1997. How to setup a Virtual Private Network.
     * [407]Wacom-USB-mini-HOWTO, Wacom Graphire USB Mini-HOWTO
       Updated: June 2000. How to setup a Wacom Graphire USB tablet for
       use with Linux.
     * [408]WordPerfect, WordPerfect Mini-howto
       Updated: August 1997. Discusses running WordPerfect on Linux,
       including a brief discussion on the WordPerfect 7.0 beta.
     * [409]X-Big-Cursor, X11-big-cursor mini-HOWTO
       Updated: August 1997. How to use enlarged mouse cursors with the X
       window system.
     * [410]XFree86-XInside, Linux XFree-to-Xinside mini-HOWTO
       Updated: September 1997. How to convert an XFree86 modeline into
       an XInside/XiGraphics one.
     * [411]Xterm-Title, How to change the title of an xterm
       Updated: October 1999. How to use escape sequences to dynamically
       change window and icon titles of an xterm.
     * [412]ZIP-Drive, Zip Drive Mini-HOWTO
       Updated: January 1999. Provides a quick reference quide on setting
       up and using the Iomega ZIP drive with Linux.
     * [413]ZIP-Install, Installing Linux on ZIP disk using ppa ZIP Drive
       Mini-Howto
       Updated: January 1998. This document is only useful for those with
       the printer port version of a ZIP drive who wish to have either a
       portable or backup Linux system on a ZIP disk.
     _________________________________________________________________
   
Chapter 7. Special HOWTOs

   The High Availability HOWTO, by Harald Milz <hm@seneca.muc.de> is
   available at
   [414]http://metalab.unc.edu/pub/Linux/ALPHA/linux-ha/High-Availability
   -HOWTO.html. It is not included with the HOWTO collection because it
   relies on figures and cannot be distributed in all supported formats.
     _________________________________________________________________
   
Chapter 8. Unmaintained HOWTOs

   There are a number of unmaintained documents, which can be found at:
   [415]http://metalab.unc.edu/pub/Linux/docs/HOWTO/unmaintained/.
   
   These are kept around since old documentation is sometimes better than
   none. However, you should be aware that you are reading old
   documentation.
   
   If the date tag is too old, please consider the HOWTO as unmaintained.
   
   However, there are exceptions, such as old programs (for example UUCP
   HOWTO) or not-so-hot topics (for example AX-25 HOWTO).
     _________________________________________________________________
   
Chapter 9. Writing and Submitting a HOWTO

   If you are interested in writing or maintaining a HOWTO, please
   contact us FIRST!!! at [416]ldp-discuss@lists.linuxdoc.org. If you
   want to maintain a unmaintained HOWTO, please try to contact the
   former author.
   
   Consult the [417]HOWTO-HOWTO for detailed information on writing and
   submitting a HOWTO.
   
   Here are a few general guidelines that you should follow when writing
   a HOWTO:
   
     * Try to use meaningful structure and organization, and write
       clearly. Remember that many of the people reading HOWTOs do not
       speak English as their first language.
     * Make sure that all of the information is correct. We can't stress
       this enough. When in doubt, speculate, but make it clear that
       you're only guessing.
     * Make sure that you are covering the most recent version of the
       available software. Also, be sure to include full instructions on
       where software can be downloaded from (FTP site name,
       fullpathname), and the current version number and release date of
       the software.
     * Include an FAQ section at the end, if appropriate. Many HOWTO
       documents need a ``FAQ'' or ``Common Problems'' section to cover
       information which cannot be covered in the regular text.
     * HOWTOs should be submitted to us in either DocBook or linuxdoc
       SGML. Refer to the [418]HOWTO-HOWTO for further information.
     * Use other HOWTOs a model. The SGML source to the HOWTOs is
       available on Linux FTP sites. In addition, examine the
       [419]HOWTO-HOWTO, the [420]LDP manifesto (and license guide), and
       the [421]Using DocBook HOWTO.
     * Make sure that your name, email address, date, and a version
       number is near the beginning of the document. You could also
       include WWW addresses and a postal mail address if you want. The
       standard header is: Title / Author's name and email address /
       Version number and date. For example:
       The Linux HOWTO Index by Tim Bynum v2.10.29, 31 July 1997
     * Lastly, be prepared to receive questions and comments about your
       writing. There are several hundreds of accesses to thei HOWTO
       collection every day from around the world!
       
   After you have written the HOWTO, mail the SGML source to us at
   [422]ldp-submit@lists.linuxdoc.org.
   
   It is important that you go through us when submitting a HOWTO, as we
   maintain the archives and need to keep track of what HOWTOs are being
   written and who is doing what.
   
   Please send the LDP periodic updates whenever appropriate.
     _________________________________________________________________
   
Chapter 10. Copyright

   Copyright (c) 1995 - 2000 by Tim Bynum. Copyright (c) 2000 by Guylhem
   Aznar / Greg Ferguson / Joshua Drake
   
   Unless otherwise stated, Linux HOWTO documents are copyrighted by
   their respective authors. Linux HOWTO documents may be reproduced and
   distributed in whole or in part, in any medium physical or electronic,
   as long as this copyright notice is retained on all copies. Commercial
   redistribution is allowed and encouraged; however, the author would
   like to be notified of any such distributions.
   
   All translations, derivative works, or aggregate works incorporating
   any Linux HOWTO documents must be covered under this copyright notice.
   That is, you may not produce a derivative work from a HOWTO and impose
   additional restrictions on its distribution. Exceptions to these rules
   may be granted under certain conditions; please contact the Linux
   HOWTO coordinator at the address given below.
   
   In short, we wish to promote dissemination of this information through
   as many channels as possible. However, we do wish to retain copyright
   on the HOWTO documents, and would like to be notified of any plans to
   redistribute the HOWTOs.
   
   If you have questions, please contact the Linux HOWTO coordinator, at
   [423]linux-howto@metalab.unc.edu via email.

References

   1. http://www.linuxdoc.org/
   2. index/HOWTO-INDEX.html#INTRO
   3. index/HOWTO-INDEX.html#LOCATION
   4. index/HOWTO-INDEX.html#TRANSLATIONS
   5. index/HOWTO-INDEX.html#CATEGORIES
   6. index/HOWTO-INDEX.html#ADMIN
   7. index/HOWTO-INDEX.html#HARDWARE
   8. index/HOWTO-INDEX.html#NETWORKING
   9. index/HOWTO-INDEX.html#OTHER-LANG
  10. index/HOWTO-INDEX.html#PROGRAMMING
  11. index/HOWTO-INDEX.html#HOWTOS
  12. index/HOWTO-INDEX.html#MINI
  13. index/HOWTO-INDEX.html#SPECIAL
  14. index/HOWTO-INDEX.html#UNMAINTAINED
  15. index/HOWTO-INDEX.html#WRITING
  16. index/HOWTO-INDEX.html#COPYRIGHT
  17. ftp://metalab.unc.edu/pub/Linux/docs/HOWTO
  18. ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO
  19. ftp://metalab.unc.edu/pub/Linux/MIRRORS.html
  20. index/howto.html
  21. http://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/html/Linux-html-HOWTOs.tar.gz
  22. http://www.linuxdoc.org/mirrors.html
  23. ftp://metalab.unc.edu/pub/Linux/system/news/misc/
  24. ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations
  25. http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/Directory-Structure
  26. Bash-Prompt-HOWTO.html
  27. Benchmarking-HOWTO.html
  28. Bootdisk-HOWTO/index.html
  29. BootPrompt-HOWTO.html
  30. CD-Writing-HOWTO.html
  31. Config-HOWTO.html
  32. Filesystems-HOWTO.html
  33. Font-HOWTO.html
  34. From-PowerUp-To-Bash-Prompt-HOWTO.html
  35. Ftape-HOWTO.html
  36. HP-HOWTO/index.html
  37. Installation-HOWTO.html
  38. ISP-Hookup-HOWTO.html
  39. ISP-Setup-RedHat.html
  40. Jaz-Drive-HOWTO.html
  41. Kernel-HOWTO.html
  42. Keyboard-and-Console-HOWTO.html
  43. KickStart-HOWTO.html
  44. Loopback-Encrypted-Filesystem-HOWTO.html
  45. MultiOS-HOWTO.html
  46. Adv-Routing-HOWTO.html
  47. AX25-HOWTO.html
  48. Beowulf-HOWTO.html
  49. Cable-Modem/index.html
  50. Diald-HOWTO.html
  51. Diskless-HOWTO.html
  52. Diskless-root-NFS-HOWTO.html
  53. DNS-HOWTO.html
  54. Firewall-HOWTO.html
  55. Intranet-Server-HOWTO.html
  56. IP-Masquerade-HOWTO.html
  57. IPCHAINS-HOWTO.html
  58. IPX-HOWTO.html
  59. Mail-Administrator-HOWTO.html
  60. Mail-User-HOWTO.html
  61. Majordomo-MajorCool-HOWTO.html
  62. Multicast-HOWTO.html
  63. Mutt-GnuPG-PGP-HOWTO.html
  64. NC-HOWTO.html
  65. NCD-HOWTO.html
  66. Net-HOWTO.html
  67. NET3-4-HOWTO.html
  68. Networking-Overview-HOWTO.html
  69. NFS-HOWTO.html
  70. NIS-HOWTO.html
  71. Chinese-HOWTO.html
  72. Cyrillic-HOWTO.html
  73. Danish-HOWTO.html
  74. Esperanto-HOWTO.html
  75. Finnish-HOWTO.html
  76. German-HOWTO.html
  77. Hebrew-HOWTO.html
  78. Hellenic-HOWTO.html
  79. Serbian-HOWTO.html
  80. Slovenian-HOWTO.html
  81. Spanish-HOWTO.html
  82. Thai-HOWTO.html
  83. Turkish-HOWTO.html
  84. AI-Alife-HOWTO.html
  85. Assembly-HOWTO.html
  86. Bash-Prog-Intro-HOWTO.html
  87. C++Programming-HOWTO.html
  88. C-C++Beautifier-HOWTO.html
  89. CVS-RCS-HOWTO.html
  90. DB2-HOWTO/index.html
  91. Enterprise-Java-for-Linux-HOWTO.html
  92. GCC-HOWTO/index.html
  93. Glibc2-HOWTO.html
  94. IngresII-HOWTO/index.html
  95. mini/IO-Port-Programming.html
  96. Java-CGI-HOWTO.html
  97. mini/Kerneld/index.html
  98. Oracle-7-HOWTO.html
  99. Oracle-8-HOWTO.html
 100. Parallel-Processing-HOWTO.html
 101. PHP-HOWTO.html
 102. PostgreSQL-HOWTO.html
 103. Program-Library-HOWTO/index.html
 104. mini/Programming-Languages.html
 105. mini/RCS.html
 106. RPM-HOWTO/index.html
 107. SCSI-Programming-HOWTO.html
 108. Secure-Programs-HOWTO/index.html
 109. Serial-Programming-HOWTO.html
 110. SMB-HOWTO.html
 111. Software-Building-HOWTO.html
 112. Software-Release-Practice-HOWTO.html
 113. TclTk-HOWTO.html
 114. Vim-HOWTO.html
 115. WWW-mSQL-HOWTO.html
 116. 3Dfx-HOWTO.html
 117. 4mb-Laptops.html
 118. Access-HOWTO.html
 119. Adv-Routing-HOWTO.html
 120. AI-Alife-HOWTO.html
 121. Alpha-HOWTO.html
 122. Assembly-HOWTO.html
 123. Astronomy-HOWTO.html
 124. AX25-HOWTO.html
 125. Bash-Prog-Intro-HOWTO.html
 126. Bash-Prompt-HOWTO.html
 127. Belgian-HOWTO.html
 128. Benchmarking-HOWTO.html
 129. Beowulf-HOWTO.html
 130. Bootdisk-HOWTO/index.html
 131. BootPrompt-HOWTO.html
 132. BRIDGE-STP-HOWTO/index.html
 133. Busmouse-HOWTO.html
 134. C++Programming-HOWTO.html
 135. C-C++Beautifier-HOWTO.html
 136. Cable-Modem/index.html
 137. CD-Writing-HOWTO.html
 138. CDROM-HOWTO.html
 139. Chinese-HOWTO.html
 140. Chroot-BIND-HOWTO.html
 141. Commercial-HOWTO.html
 142. Config-HOWTO.html
 143. Consultants-HOWTO.html
 144. CVS-RCS-HOWTO.html
 145. Cyrillic-HOWTO.html
 146. Cyrus-IMAP.html
 147. Danish-HOWTO.html
 148. DB2-HOWTO/index.html
 149. Diald-HOWTO.html
 150. Diskless-HOWTO.html
 151. Diskless-root-NFS-HOWTO.html
 152. Distribution-HOWTO.html
 153. DNS-HOWTO.html
 154. DOS-Win-to-Linux-HOWTO.html
 155. DOSEMU-HOWTO.html
 156. DVD-Playing-HOWTO.html
 157. Ecology-HOWTO.html
 158. Emacs-Beginner-HOWTO.html
 159. Emacspeak-HOWTO.html
 160. Enterprise-Java-for-Linux-HOWTO.html
 161. Esperanto-HOWTO.html
 162. Ethernet-HOWTO.html
 163. Filesystems-HOWTO.html
 164. Finnish-HOWTO.html
 165. Firewall-HOWTO.html
 166. Font-HOWTO.html
 167. Framebuffer-HOWTO.html
 168. Francophones-HOWTO.html
 169. From-PowerUp-To-Bash-Prompt-HOWTO.html
 170. Ftape-HOWTO.html
 171. GCC-HOWTO/index.html
 172. German-HOWTO.html
 173. Glibc2-HOWTO.html
 174. Hardware-HOWTO.html
 175. Hebrew-HOWTO.html
 176. Hellenic-HOWTO.html
 177. HOWTO-HOWTO/index.html
 178. HOWTO-INDEX/index.html
 179. HP-HOWTO/index.html
 180. INFO-SHEET.html
 181. IngresII-HOWTO/index.html
 182. Installation-HOWTO.html
 183. Intranet-Server-HOWTO.html
 184. IP-Masquerade-HOWTO.html
 185. IPCHAINS-HOWTO.html
 186. IPX-HOWTO.html
 187. IR-HOWTO.html
 188. ISP-Hookup-HOWTO.html
 189. ISP-Setup-RedHat.html
 190. Italian-HOWTO.html
 191. Java-CGI-HOWTO.html
 192. JavaStation-HOWTO/index.html
 193. Jaz-Drive-HOWTO.html
 194. Kernel-HOWTO.html
 195. Keyboard-and-Console-HOWTO.html
 196. KickStart-HOWTO.html
 197. Kiosk-HOWTO.html
 198. Kodak-Digitalcam-HOWTO.html
 199. Laptop-HOWTO.html
 200. Large-Disk-HOWTO.html
 201. LDAP-HOWTO.html
 202. Linux-From-Scratch-HOWTO.html
 203. LinuxDoc+Emacs+Ispell-HOWTO.html
 204. Loopback-Encrypted-Filesystem-HOWTO.html
 205. LVM-HOWTO.html
 206. Mail-Administrator-HOWTO.html
 207. Mail-User-HOWTO.html
 208. Majordomo-MajorCool-HOWTO.html
 209. META-FAQ.html
 210. MGR-HOWTO.html
 211. MILO-HOWTO.html
 212. MIPS-HOWTO.html
 213. Modem-HOWTO.html
 214. MP3-HOWTO.html
 215. Multi-Disk-HOWTO.html
 216. Multicast-HOWTO.html
 217. Mutt-GnuPG-PGP-HOWTO.html
 218. NC-HOWTO.html
 219. NCD-HOWTO.html
 220. Net-HOWTO.html
 221. NET3-4-HOWTO.html
 222. Networking-Overview-HOWTO.html
 223. NFS-HOWTO.html
 224. NIS-HOWTO.html
 225. Online-Troubleshooting-HOWTO.html
 226. Optical-Disk-HOWTO.html
 227. Oracle-7-HOWTO.html
 228. Oracle-8-HOWTO.html
 229. PalmOS-HOWTO.html
 230. Parallel-Processing-HOWTO.html
 231. PCI-HOWTO.html
 232. PCMCIA-HOWTO.html
 233. phhttpd-HOWTO/index.html
 234. PHP-HOWTO.html
 235. PLIP-Install-HOWTO.html
 236. Plug-and-Play-HOWTO.html
 237. Polish-HOWTO.html
 238. Portuguese-HOWTO.html
 239. PostgreSQL-HOWTO.html
 240. PPP-HOWTO.html
 241. Printing-HOWTO.html
 242. Printing-Usage-HOWTO.html
 243. Process-Monitor-HOWTO.html
 244. Program-Library-HOWTO/index.html
 245. Psion-HOWTO.html
 246. Qmail-VMailMgr-Courier-imap-HOWTO.html
 247. Quake-HOWTO.html
 248. Reading-List-HOWTO.html
 249. RedHat-CD-HOWTO.html
 250. Root-RAID-HOWTO.html
 251. RPM-HOWTO/index.html
 252. SCSI-Programming-HOWTO.html
 253. Secure-Programs-HOWTO/index.html
 254. Securing-Domain-HOWTO.html
 255. Security-HOWTO.html
 256. Serbian-HOWTO.html
 257. Serial-HOWTO.html
 258. Serial-Programming-HOWTO.html
 259. Shadow-Password-HOWTO.html
 260. Slovenian-HOWTO.html
 261. SMB-HOWTO.html
 262. SMP-HOWTO.html
 263. Software-Building-HOWTO.html
 264. Software-RAID-HOWTO.html
 265. Software-RAID-0.4x-HOWTO.html
 266. Software-Release-Practice-HOWTO.html
 267. Sound-HOWTO.html
 268. Sound-Playing-HOWTO.html
 269. Spanish-HOWTO.html
 270. SRM-HOWTO.html
 271. TclTk-HOWTO.html
 272. TeTeX-HOWTO.html
 273. Text-Terminal-HOWTO.html
 274. Thai-HOWTO.html
 275. Thinclient-HOWTO.html
 276. Tips-HOWTO.html
 277. Turkish-HOWTO.html
 278. UMSDOS-HOWTO.html
 279. Unicode-HOWTO.html
 280. Unix-and-Internet-Fundamentals-HOWTO.html
 281. UPS-HOWTO.html
 282. User-Authentication-HOWTO/index.html
 283. User-Group-HOWTO.html
 284. UUCP-HOWTO.html
 285. VAR-HOWTO.html
 286. Vim-HOWTO.html
 287. Virtual-Services-HOWTO.html
 288. VMailMgr-HOWTO.html
 289. VME-HOWTO.html
 290. VMS-to-Linux-HOWTO.html
 291. VPN-HOWTO.html
 292. VPN-Masquerade-HOWTO.html
 293. Wacom-Tablet-HOWTO.html
 294. Wearable-HOWTO.html
 295. Winmodems-and-Linux-HOWTO.html
 296. WWW-HOWTO.html
 297. WWW-mSQL-HOWTO.html
 298. XFree86-HOWTO.html
 299. XFree86-Touch-Screen-HOWTO.html
 300. XFree86-Video-Timings-HOWTO.html
 301. Xinerama-HOWTO.html
 302. XWindow-User-HOWTO.html
 303. mini/3-Button-Mouse.html
 304. mini/ADSL.html
 305. mini/ADSM-Backup.html
 306. mini/Advocacy.html
 307. mini/Alsa-sound.html
 308. mini/Apache-mods.html
 309. mini/Apache+SSL+PHP+fp.html
 310. mini/Automount.html
 311. mini/Backup-With-MSDOS.html
 312. mini/Battery-Powered.html
 313. mini/Boca.html
 314. mini/BogoMips.html
 315. mini/Boot+Root+Raid+LILO.html
 316. mini/Bridge.html
 317. mini/Bridge+Firewall.html
 318. mini/Bridge+Firewall+DSL.html
 319. mini/BTTV-Mini-HOWTO-0.3.html
 320. mini/Bzip2.html
 321. mini/call-back-mini-HOWTO.html
 322. mini/Cipe+Masq.html
 323. mini/Clock.html
 324. mini/Coffee.html
 325. mini/Commercial-Port-Advocacy.html
 326. mini/Compressed-TCP.html
 327. mini/DHCP/index.html
 328. mini/Divert-Sockets-mini-HOWTO.html
 329. mini/Domain.html
 330. mini/DPT-Hardware-RAID.html
 331. mini/Ext2fs-Undeletion.html
 332. mini/Fax-Server.html
 333. mini/FDU.html
 334. mini/Firewall-Piercing.html
 335. mini/FTP.html
 336. mini/GIS-GRASS.html
 337. mini/Handspring-Visor.html
 338. mini/Hard-Disk-Upgrade.html
 339. mini/Home-Network-mini-HOWTO.html
 340. mini/Install-From-ZIP.html
 341. mini/Intkeyb.html
 342. mini/IO-Port-Programming.html
 343. mini/IP-Subnetworking.html
 344. mini/IP-Alias.html
 345. mini/IPMasquerading+Napster.html
 346. mini/ISP-Connectivity.html
 347. mini/Kerneld/index.html
 348. mini/LBX.html
 349. mini/Leased-Line.html
 350. mini/LILO.html
 351. mini/Linux+DOS+Win95+OS2.html
 352. mini/Linux+FreeBSD.html
 353. mini/Linux-Modem-Sharing.html
 354. mini/Linux+NT-Loader.html
 355. mini/Linux+Solaris.html
 356. mini/Linux+Win95.html
 357. mini/Loadlin+Win95.html
 358. mini/Loopback-Root-FS.html
 359. mini/Mac-Terminal.html
 360. mini/Mail-Queue.html
 361. mini/Mail2News.html
 362. mini/Man-Page.html
 363. mini/Modules.html
 364. mini/Multiboot-with-LILO.html
 365. mini/NCD-X-Terminal.html
 366. mini/Netrom-Node.html
 367. mini/Netscape+Proxy.html
 368. mini/News-Leafsite.html
 369. mini/NFS-Root.html
 370. mini/NFS-Root-Client-mini-HOWTO/index.html
 371. mini/Offline-Mailing.html
 372. mini/Partition-Rescue-mini-HOWTO.html
 373. mini/Partition.html
 374. mini/Path.html
 375. mini/PLIP.html
 376. mini/Pre-Installation-Checklist.html
 377. mini/Process-Accounting.html
 378. mini/Programming-Languages.html
 379. mini/Proxy-ARP-Subnet.html
 380. mini/Public-Web-Browser.html
 381. mini/Qmail+MH.html
 382. mini/Quota.html
 383. mini/RCS.html
 384. mini/Remote-Boot.html
 385. mini/Remote-X-Apps.html
 386. mini/RPM+Slackware.html
 387. mini/Saving-Space.html
 388. mini/Secure-POP+SSH.html
 389. mini/Sendmail+UUCP.html
 390. mini/Sendmail-Address-Rewrite.html
 391. mini/SLIP-PPP-Emulator.html
 392. mini/Small-Memory.html
 393. mini/Soundblaster-AWE.html
 394. mini/StarOffice.html
 395. mini/Swap-Space.html
 396. mini/Term-Firewall.html
 397. mini/TkRat.html
 398. mini/Token-Ring.html
 399. mini/TransparentProxy.html
 400. mini/TT-Debian.html
 401. mini/Ultra-DMA.html
 402. mini/Update.html
 403. mini/Upgrade.html
 404. mini/VAIO+Linux.html
 405. mini/Visual-Bell.html
 406. mini/VPN.html
 407. mini/Wacom-USB-mini-HOWTO.html
 408. mini/WordPerfect.html
 409. mini/X-Big-Cursor.html
 410. mini/XFree86-XInside.html
 411. mini/Xterm-Title.html
 412. mini/ZIP-Drive.html
 413. mini/ZIP-Install.html
 414. http://metalab.unc.edu/pub/Linux/ALPHA/linux-ha/High-Availability-HOWTO.html
 415. http://metalab.unc.edu/pub/Linux/docs/HOWTO/unmaintained/
 416. mailto:ldp-discuss@lists.linuxdoc.org
 417. HOWTO-HOWTO/index.html
 418. HOWTO-HOWTO/index.html
 419. HOWTO-HOWTO/index.html
 420. file://localhost/export/sunsite/users/gferg/manifesto.html
 421. http://metalab.unc.edu/godoy/using-docbook/using-docbook.html
 422. mailto:ldp-submit@lists.linuxdoc.org
 423. mailto:linux-howto@metalab.unc.edu

HP HOWTO

Utilisation and Configuration Guide of HP Products under Linux

Bruno Cornec

   Medasys Digital Systems

   Bruno.Cornec@medasys-digital-systems.fr

   Copyright  1997-2000 by Bruno Cornec

   This document describes the use of products available in
   [1]Hewlett-Packard (HP) catalog with Linux and some free software. It
   gives the state of the support for hardware, software to use, answers
   to some frequently asked questions and gives elements of sizing. The
   goals are to offer a general view of free software functions and their
   use at best with HP products; as well as to make new users of HP
   products rapidly operational and also to allow others to choose their
   products knowing facts.

   License

   This HOWTO is a free documentation thanks to [2]Medasys and
   [3]Hewlett-Packard for whom I do that job; you may redistribute and/or
   modify it under the terms of the [4]Diffusion License of Free
   Documents .

   This document is distributed hoping it will be useful, but without any
   guaranty; you're completely responsible of its use, and coulnd't
   complain in case it doesn't work, or even if it breaks the hardware.
     _________________________________________________________________

   Table of Contents
   1. [5]Introduction

        [6]Presentation

              [7]New versions of this document
              [8]Suggestions

        [9]Aknowledgements

   2. [10]Presentation of Linux and Free Software

        [11]Some definitions

              [12]Free Software or Open Source software
              [13]Examples and counter-examples
              [14]Linux

        [15]Free software concepts

              [16]Free software philosophy
              [17]The choice of free software
              [18]Wrong ideas on free software
              [19]Real problems around free software

        [20]Linux and other operating systems

              [21]Linux and other proprietary Unix (HP-UX, Tru64, AIX,
                      Solaris, Irix)

              [22]Linux and SCO
              [23]Linux and Windows NT

   3. [24]Linux and HP products

        [25]Informations on HP products and Linux

              [26]General informations
              [27]Particular announces

        [28]HP hardware supported by Linux

              [29]Intel based computer range
              [30]The monitors range
              [31]PA-Risc based computer range
              [32]The IA-64 range
              [33]The printing product range

        [34]HP software available under Linux

              [35]HP softwares
              [36]Third party softwares linked to HP

        [37]Support of HP solutions under Linux
        [38]Training on HP Linux solutions

   4. [39]Solutions and Sizing

        [40]Linux as file and print server

              [41]Linux as file server
              [42]Linux as print server

        [43]Internet/Intranet Linux server

              [44]Web Server
              [45]Mail Server
              [46]Firewall/Proxy/Web-Cache server

        [47]Linux as computing server
        [48]Linux as an office server

   5. [49]Frequently Asked Questions (FAQ)
   6. [50]References
   7. [51]Contributors
   8. [52]Future versions
     _________________________________________________________________

Chapter 1. Introduction

Presentation

   This document is a guide on the use of products proposed by the
   hardware manufacturer [53]Hewlett-Packard (HP) under Linux. It's a
   quick reference guide, covering all what you need to know to size,
   install and configure your products under Linux, or which
   complementary software will be usefull for their use. Frequently Asked
   Questions find answers, and references are given concerning other
   sources of information related to HP technologies and applications.

   Opinions expressed here are those of the author, and don't commit both
   [54]Medasys or [55]Hewlett-Packard . Informations are provided in the
   aim to be useful to the readers. However, there can't be, through this
   document, any warranty of any kind either from [56]Medasys or
   [57]Hewlett-Packard on these systems under Linux, as well as from
   myself. Neither [58]Medasys , nor [59]Hewlett-Packard , nor the author
   could be responsible for any problem caused by the use of these
   informations. However, software editors don't garantee you a lot
   either (re-read the contracts).
     _________________________________________________________________

New versions of this document

   New versions of this document will be announced regularly on the
   Usenet groups news:fr.comp.os.linux.annonces and
   news:comp.os.linux.annonces. They will also be updated on the various
   anonymous ftp sites which archive such informations, mainly
   ftp://metalab.unc.edu/pub/Linux/docs/HOWTO.

   Hypertext versions of this and other Linux HOWTO are available on many
   web sites, including http://metalab.unc.edu/LDP/HOWTO and
   http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO. Most
   Linux distributions on CD-ROM include the HOWTO, often under the
   /usr/doc, directory, and you can also buy printed copies from several
   vendors. Sometimes the HOWTO available from CD-ROM vendors, ftp sites
   or printed format are out of date. If the date on this HOWTO is more
   than 6 months in the past, then a newer copy is probably available on
   the Internet. The site of reference for this HOWTO is
   http://www.medasys-digital-systems.fr/linux/HP-Howto/HP-HOWTO-EN

   If you make a translation of this document into another language,
   please let me know so that I can include a reference to it here.
     _________________________________________________________________

Suggestions

   I rely on you, the reader, to make this HOWTO useful. If you have any
   suggestions, corrections, or congratulations :-) don't hesitate to
   send them to me <[60]Bruno.Cornec@medasys-digital-systems.fr>, and I
   will try to incorporate them in a next revision.

   I am also willing to answer general questions on HP hardware and
   software with Linux, as best I can. Before doing so, please read all
   of the information in this HOWTO, and then send me detailed
   information about the problem.

   If you publish this document on a CD-ROM or in hardcopy form, a
   complimentary copy would be appreciated; mail me for my postal
   address. Also consider making a donation to the Linux Documentation
   Project to help support free documentation for Linux. Contact the
   Linux HOWTO coordinator, Guylhem AZNAR
   <[61]guylhem@rrremovethis.oeil.qc.ca>.
     _________________________________________________________________

Aknowledgements

   Most of the informations provided here come from research made in HP
   documentations, files provided with Linux kernel sources, the FAQ of
   the Usenet newsgroup news:comp.sys.hp.hpux with a [62]HTML version
   available on all mirror sites like the CICT, our experience as an HP
   VAR, a lot of tests and deployments realised, and remarks from Linux
   users.

   Numerous people have contributed to this document and augmented its
   contents. You'll find the most complete possible list in the
   [63]Chapter 7. I would like to thank just now, without any particular
   order, those without whom this document would simply not exist :

     * Marc Hia Bali <[64]Marc_Hia-Balie@hp.com>, who ordered that
       document and accepted to make it a free documentation.
     * [65]Linus Torvalds, for the Linux project (without it, nothing
       would exist).
     * [66]Richard Stallman, for the GNU project (without it, nothing
       would exist either).
     * Nat Makarvitch <[67]nat@nataa.frmug.org>, For his work as
       translator and his advocacy conferences.
     * Xavier Cazin <[68]xc@itp.fr>, for his talent to convince me to use
       DocBook.
     * Eric Dumas <[69]dumas@Linux.EU.Org>, for the management of the
       french LDP.
     * Rmy Card <[70]Remy.Card@linux.org>, for ext2 and his love of
       electricity :-)
     * Ren Cougnenc, to have helped a lot of people to begin with Linux,
       including myself.
     * Dany Coffineau <[71]Dany.Coffineau@alcatel.fr>, for teachnig me
       Unix.
     * Franois Strobel <[72]Francois.Strobel@alcatel.fr>, for his
       peacefulness and legendary patience :-)
     * Frdric Dubuy <[73]Frederic.Dubuy@medasys-digital-systems.fr>,
       who contributed to the writing of that document and took all the
       work I coulnd't achieve, while I was writing it. Without saying
       he's also the graphist of the logo !
     * Alain Pascal <[74]pascal@montrouge.omnes.slb.com>, for the several
       tests made.
     * Pascal Lemonnier <[75]Pascal.Lemonnier@medasys-digital-systems.fr>
       typography expert who found a lot of typos.
     * Ralf S. Engelschall <[76]rse@engelschall.com>, who realised the
       [77]wml tool set, used to manage the languages of this document.
     * Cees de Groot <[78]cg@sgmltools.org>, who realised the
       [79]SGMLTools tools set, which allow to generate all the versions
       of this document from a single SGML source.
     * Norman Walsh <[80]ndw@nwalsh.com>, who realised the SGML DTD
       [81]DocBook.
     * James Clark <[82]jjc@jclark.com>, who realised the tool [83]Jade.
     * Cornec family<[84]cornec@victoria.frmug.org>, for his patience and
       his support.
     _________________________________________________________________

Chapter 2. Presentation of Linux and Free Software

Some definitions

   Before going into more details in the presentation, it could be useful
   to give some definitions of terms and software mentionned in that
   HOWTO.
     _________________________________________________________________

Free Software or Open Source software

   A free software (or Open Source software) is a software distributed
   with its source code, allowing its study, its transmission, its
   adaptation. The problem, in english, is the use of free, which has
   both meanings of "at no cost" and "without constraint". Here, it's the
   second use which has to be considered, hence the use of Open Source.
   To remember, think of free as speech, not beer.

   Depending on the licenses used for its development, the constraints
   for users of such a software are various. The most open licenses (like
   the BSD one) allow code appropriation by third parties, including the
   resell of the resulting software (with or without modification) in
   commercial products, without any problem, and without owing something
   else to the originators than the mention of their copyright. Other
   licenses (like the GNU Public License or GPL) force every modified GPL
   software to be free GPL software itself ; this doesn't allow the use
   of such programs in a commercial one. Many other licenses exist, more
   or less open: the Artistic License (perl), the NPL one (mozilla), the
   QPL one (Qt) ...

   A vast majority of free software is today under the GPL license, even
   if the BSD world takes always a great place, however less visible,
   mainly in the press.

   [85]GNU project Web site
          You find there all of the informations on the GNU project,
          including the licenses produced (GPL and LGPL) and various
          discussions on free software.

   [86]Open Source project Web site
          This site proposes a new definition, a bit less restrictive, of
          free software - called here OpenSource Software - by well-known
          people.

   [87]FreeBSD project Web site
          Here are explained the advantages of the very open BSD license.
     _________________________________________________________________

Examples and counter-examples

   First of all, free software and freeware shouldn't be mixed up. A
   freeware is not necessarily a software provided with its sources, on
   the contrary of a free software. On the other side, on the contrary of
   a freeware, you may be charged to obtain a free software (it's not in
   contradiction with the licensed used). The ambiguity, as stated
   before, comes from the word "free" . A freeware is then free of
   charge, but not necessarily "free of sources". (As well, the shareware
   has nothing to do with free software).

   So examples of important and well-known free software are the Linux
   and FreeBSD operating systems, the [88]Apache Web server, the
   [89]SaMBa SMB server, GNU C and C++ compilers ... A contrario,
   examples of well-known freeware are the Internet Explorer browser, the
   Eudora Light mail reader, ...
     _________________________________________________________________

Linux

   Linux is a free operating system, superset of the POSIX norm. "Linux"
   points out the kernel alone. By extension, the name is also given to
   distributions based on that kernel plus a set of tools from the GNU
   project.

   Linux is by consequence a Unix system, except that it doesn't use any
   proprietary code and is furnished under the GPL license, implying the
   availability of the sources. As every Unix system, it is multi-tasks,
   multi-users. It's also extremely portable, and it is available
   officialy today on processors such as Intel (i386 to Pentium III),
   Alpha, Motorola (680x0 and PowerPC), Sparc, StrongArm, Mips. Without
   mention of the ports, operational or in process on PalmPilot, Itanium
   (ex-Merced), PA-Risc, Crusoe ...

   The system is today perfectly stable and mature. Versions "x.y.z" of
   the Linux kernel, where "y" is an even number, are stable and only bug
   corrections are generaly applied when "z" augments. Versions "x.y.z"
   of the Linux kernel, where "y" is an odd number, are development
   versions which may be instable and are reserved to developers or
   intrepids.

   From time to time, when the kernel development stabilizes a "freeze"
   is announced to furnish a new "stable" version (even), and the
   development goes on on a new version (odd).

   The current stable version is the version 2.2.14 (this last number may
   evolve following the rythm of corrections). Development has on the
   other side begun again with a 2.3 version currently in code freeze.

   Numerous presentations of Linux are currently available. Among them,
   you should consult the one made by Michael Johnson at
   http://www.medasys-digital-systems.fr/mirror/linux/HOWTO/INFO-SHEET.ht
   ml.
     _________________________________________________________________

Linux technical characteristics

   The system offers the following technical characteristics :

     * Multi-tasking : executes several programs in pseudo-parallel.
     * Multi-users : many users acting on the same machine at the same
       time (without worrying on licenses).
     * Portable and interoperable : works on several hardware
       architectures. All the sources are available. Linux supports a lot
       of file systems, outside the native ext2 : Systme V, BSD, Sun,
       MS-DOS, VFAT, NTFS, Mac, HPFS, EFS, ISO9660. On the network side,
       it supports the following protocols TCP/IP v4 and v6, Appletalk,
       Netware (client and server), Lan Manager SMB (client and server),
       X-Window, NFS, PPP, SLIP, UUCP.
     * Performant architecture : modular kernel, built at will, execution
       in protect mode on 80x86 processors, page load on demand, page
       share between executables when reading, virtual memory with swap
       on disk, use of a dynamical disk cache in memory, dynamic
       libraries, process management, pseudo terminals, virtual consoles.
     * Security : protection of memory between processus: one user
       program can't compromise the whole system operation.
     * Respect of norms and standards : Posix, with System V and BSD
       extensions. Support of COFF and ELF binaries. Binary compatibility
       with SCO, SVR3/4 through the iBCS2 module. Native Language Support
       as well as national keyboards, fonts...
     _________________________________________________________________

Free software concepts

   Once the definitions are given, it is important to stay on at ideas
   promoted by the free software movement. It's important as well to
   clear some wrong ideas hawked on these software. This section gives
   then a various set of elements in favour of the introduction of free
   software and ends on the real problems remaining to solve.
     _________________________________________________________________

Free software philosophy

   In fact, the philosophy promoted by the free software movement is not
   that different from the one proposed by the scientific movement till a
   long time already: to put in common ideas and collective knowledge to
   allow the progression of the research and the growth of this
   knowledge. The knowledge of the human genome is one of the examples of
   such a collaborative work.

   The computer engineering environement, and especially the software
   one, seems to have turn away till the last 20 years from these base
   concepts of the scientific world. It prefers on the contrary to keep
   the customer captive instead of giving him the informations needed to
   exploit his computing environement the best he can. That's indeed
   following such a problem at the begining of the 80's that Richard
   Stallman, who was doing researches in artificial intelligence at the
   MIT, decided to create the GNU project. This project is the foundation
   of the current free software movement.

   The main ideas promoted by this movement and stated by Richard
   Stallman himself are :

     * Liberty: every user should be free to copy, diffuse, modify a
       program, either to share it with others, or to adapt it to his own
       needs. As well, he should be able to analyse it to understand,
       imitate, improve, verify its operations, as well as every
       scientific result is published and seen by the peers for
       verification, study, understanding and realisation of derived
       works. Could you imagine a vaccine against the liver cancer that
       another laboratory couldn't derive to make a vaccine against the
       pancres cancer.
     * Equality: every person should have the same rights on the
       software. Thus the provider isn't priviledged and can't keep
       customers to whom he furnished his work captive. Could you think
       that only the producer of our vaccine could use it ?
     * Fraternity: this mode of working encourages the whole computer
       engineering community to cooperate and thus to produce software
       more and more reliable and useful to all. Could you imagine that a
       discovery like the vaccine above couldn't help everyone and favour
       other discoveries.

   More over the utopy of these ideas, we can find other reasons which
   allowed free software to spread so widely today. They are detailed in
   [90]the section called The choice of free software.

   The free software movement materializes itself also through a
   community of people. That community, informal meeting of
   personnalities, is heterogeneous in its contents, actions, ideas, even
   if all share the same belief in the freedom of the software. That
   community created for itself the tools needed to its communication :
   Internet and Usenet. And these communication tools are based of course
   on a lot of free software to work. Among the outstanding persons of
   this movement, we can present :

     * [91]Linus Torvalds, conceptor of Linux.
     * [92]Richard Stallman, GNU project conceptor.
     * [93]Eric S. Raymond, writer of several and excellent articles,
       which inspired so many vocations.
     * [94]Larry Wall, author of Perl and of the patch tool, and
       philosopher.
     * Tim O'Reilly <[95]ask_tim@oreilly.com>, free software advocate and
       editor of several books dedicated to them.

   All these personalities are, above all, excellent computer engineers,
   which allows them to be recognized as major actors of the free
   software movement. Their human and communication qualities are also
   strong characteristics of their nature. In any case they aren't
   considered for their power, but for their knowledge.

   Of course, the free software community is built of thousands of
   programmers, whose complete list would be too tedious. All share the
   will of producing useful work, free, and to be recognized for their
   technical qualities above all.
     _________________________________________________________________

The choice of free software

   To use free software to bring solutions in a computing environment is
   a choice. First, it is in favour of a plurality of solutions, mainly
   in the personal computer world which tends to be monopolistic. Then,
   the choice is made, and that's what is finally important, on the own
   qualities of free software, which are detailed just below.

   Source code access
          This point is the most important of the choice, because it
          allows the undestanding, adaptation, correction, distribution,
          improvement of the software.

   Reliability
          That quality is derived from the previous one: the free
          software is the combined result of the experience and the
          intelligence of all the participants. Its reliability increases
          then as time passes, with all the corrections which are made.
          More over, no marketing pression obliges the software's
          producer to deliver it to its customers before it is in a
          satisfactory state.

   Portability
          This quality is not intrinsic to free software, but is very
          often seen in a free software. Indeed if a softawre meets
          success, it will necessarily be adapted to other environments
          than those initialy considered. Thus by increasing its
          disponibility, its portability and reliability are also
          increased.

   Universality
          One essential quality of free software is the character
          naturaly universal of the data format used. Even if they don't
          follow standards, the availibility of the source code assures
          the user that he will understand them, and more over be able to
          write any filter needed to the reuse of data or their exchange
          with other software. This allows also users to stabilize their
          environment, because they are not obliged to migrate in case of
          incompatibility of data formats in their applications.

   Performance
          Resulting from a lot of examinations, the use of algorithms
          coming from advanced research works, as well as tested by
          various usages, free software have good performances by nature.
          Frequently large portions of code are rewritten to allow the
          reuse of the original ideas with a better code and thus to
          increase performance. Several tests made by various organisms
          tend to prove it also ([96]Apache Web Server and competitors

          , [97]SMB [98]SaMBa server vs Windows NT ...). Once more, there
          is no obligation to diffuse an application whose performances
          would be bad.

   Interoperability
          Historically, Unix environment was always a ferment for
          interoperability with other systems (big or medium size
          systems, as well as personal computers). The support in Linux,
          for example, of a lot of network protocols, filesystem formats,
          and even binary compatibility modes assures a good
          interoperability.

   Reactivity
          When considering the more and more longer development cycles of
          the software editors, the reactivity brought by the free
          software movement is interesting for a lot of sites, concerned
          by the rapid obtention of corrections to a given problem. Thus,
          during the recent discoveries of IP problems (ping of the
          death,...), patches were always available within the next 3
          days. And above that, only the patch correcting the hole found
          was delivered. There were no functionality added, which could
          have create other instabilities.

   Independantly of its qualities, it's possible to give other reasons of
   various nature, in favor of free software, depending on the type of
   the person met.
     _________________________________________________________________

Marketing argumentation

   Studies from IDC bring to light the irresistible rise of Linux as a
   server operating system. In 1998, Linux is credited with 17% of market
   share, with an increase of 212%, which is the most important in that
   domain. The following graphics give the whole market share
   repartition.

   Figure 2-1. Server operating system repartition in 1998 (IDC).

   [idc1998]

   This was confirmed in 1999 with a market share climbing to 24% and an
   ancrease of 93%, always more than four times the increase of the
   follower.

   Figure 2-2. Server operating system repartition in 1999 (IDC).

   [idc1999]

   Dataquest [99]estimates on its side that Linux servers will represent,
   with 1.1 million of units, 14% of the servers sold in 2003.

   the Net itself produces marketing tools to demonstrate the superiority
   of free software. Two counters are regularly updated by [100]Netcraft,
   on web server software, and by [101]IOS Counter for the servers on
   Internet. Results, reproduced below, show the importance taken by
   [102]Apache with more than 6 millions of operational sites, crushing
   the competition, as well as the free operating systems Linux and *BSD
   which dominate the world of Internet servers.

   Figure 2-3. Web server software by Netcraft between 1995 and 2000.

   [netcraft]

   Figure 2-4. Repartition of Internet servers by IOS Counter in April
   1999.

   [ioscounter]
     _________________________________________________________________

Financial argumentation

   Financial arguments also speaks for free software. And first the price
   to aquire them is low. Low, because it's never zero. Even if you can
   find it on Internet, you have to consider the costs related to that
   link. However costs are greatly less expensive than for commercial
   software. So a RedHat 6.1 Linux distribution, delivered with more than
   1200 software packages, costs about 60 USD when you have to pay more
   than 800 USD to obtain Windows NT server, delivered only with IIS.

   On the other side, free software don't have the notion of license by
   user or by supplmentary service. Thus there is no additional cost when
   you have to increase the use of these software in your entity. That's
   of course not the case with commercial software whose economical logic
   is often based on the number of licenses.

   Free software bring in addition a better mastering of the TCO (Total
   Cost of Ownership), mentionned so frequently in the massive deployment
   of personal computers. Thus administration costs are reduced because
   systems like Linux or FreeBSD, as Unix, are managed completely
   remotely, either through command line orders (with telnet) or in
   graphical mode by using X-Window. More over, we benefit from a true
   multi-users mode, improving these management operations. Always in
   this domain, it's also possible to do remote management, either
   through the own hardware capacities (as the Remote Assistant card
   integrated in most HP NetServers), or by doing a remote connexion
   (through modem, ISDN adapter or a permanent link) thanks to the native
   protocol PPP and secure connexion systems as tunneling or ssh. This
   managemnt could even be realised by an external entity, in
   outsourcing.

   At last, the costs due to the hardware themselves could be controled;
   on one side, if by chance free software don't meet the needs, it's
   always possible to buy then commercial software solutions to cover the
   rest. On the other side, solutions based on free software have good
   performances by nature, and can use hardware platforms which would be
   considered as obsolete, if installed following the standard criterias
   of other operating systems or applications. It's so possible to use
   "old" hardware, mainly to model. It's then possible to invest, with a
   fine knowledge, when puting the solution in operation, if needed. The
   power increase may naturaly take place progressively.
     _________________________________________________________________

Technical argumentation

   This argumentation was already given in the previous sections. I think
   nevertheless that some notions may be explained with complementary
   informations.

   So concerning the reliability aspects of free software based
   solutions, it's important to note that it implies an operational
   running time very high (standard characteristic of Unix systems in
   general). This is mesured by the command uptime. One of Medasys and HP
   customers, Saint Michel Hospital, has a Vectra VL5 acting as router
   under Linux since more than 300 days. And that's not a isolated case.

   Respect of standards and norms, as well as the extreme portability of
   free software assures also to applications developed on these
   platforms the same qualities. And notably, if after their use, the
   performances or services brought by free software based architectures
   were insufficient, it would be easy to migrate to machines offering
   more performances and capacities of evolution, as the HP 9000 systems,
   running HP-UX.

   At last a development plan centered around performances implies a
   modularity, such as it's possible to resize the system kernel nearest
   to the capacities of the hardware or to use dynamically loaded modules
   following the needs. A packages installation may vary from 40 GB for a
   minimal system up to many GB for a complete distribution. The system
   linearity allow also the support of multi-processors machines (SMP)
   (tested up to 32 processors on a Sparc machine). The system modularity
   allows also to obtain an operational system on a 1.44 MB floppy disk,
   either to realize a minimal repair environment, or to provide a
   perfectly operational router. The world of embedded systems shows
   besides more and more interest for systems such as Linux, because
   above it's modularity, source availability makes communication with
   dedicated peripherals easier (acquisition cards, sonde, ...) and
   entities as Cern or Thomson already use such solutions.
     _________________________________________________________________

Solutions argumentation

   That argumentation is probably the most important of all, because it's
   useless to have free software if it's not to make something useful
   with it or to offer solutions to demands of entities willing to use
   it. In which sectors free softawre may bring solutions today ? Well,
   you have to admit it's in nearly all the sectors of enterprise
   computing.

   Historically, Open Source Software were used to realise
   Internet/Intranet servers, because their growth was following the one
   of the Net. It's so possible to cover all aspects linked to the
   Internet, from the Web server ( [103]Apache ), FTP server
   ([104]Wu-Ftpd), DNS server ([105]Bind), the E-Mail server
   ([106]Sendmail or [107]Postfix), the Usenet groups server([108]INN),
   the proxy server ([109]IPmasqadm), the firewall ([110]IP-Chains),
   Virtual Private Network ([111]OpenSSH, Linux kernel), the Cache server
   for the Web ([112]Squid) or also the Time server ([113]NTP) ... All
   these software are available in standard in a Linux distribution. The
   client computer should be equiped with the software corresponding to
   the application used (mail reader, news reader, web browser, ...)
   whatever its operating system. The choice of the client is free, as
   all these tools respect the standards decreed in the [114]RFCs.

   The second preferential domain for free software is the file and print
   server domain. For these services, clients may be multiple: Unix type
   (use of [115]NFS and [116]KNFS or also [117]Coda, for file sharing and
   of lpd for print service), Microsoft Windows type (use of [118]SaMBa ,
   which allows also the use of local client printers) or MacIntosh type
   (use of [119]NetAtalk). All these software are provided in standard in
   a Linux distribution and don't need any modification at the client
   level to work.

   The other domains where a system such as Linux may bring solutions is
   the computation one, with support of [120]multi-processors, linked to
   the realisation of [121]clusters with multiple nodes with high-speed
   network interfaces (100 Mbit/s, [122]Gigabit or [123]Myrinet), those
   of data security with the support of HP NetRaid[124]Rem. cards,
   allowing Raid level of 0, 1, 3, 5, 10, 50, and HotSpare disks, managed
   by the harware, those of centralized fax server, with a free software
   like [125]HylaFAX or also as an archive/backup server with HP
   SureStore DAT or DLT libraries thanks to a commercial software like
   [126]Arkeia or at last as a database server with free solutions like
   [127]PostgreSQL,[128]MySQL or commercial like [129]Oracle, to speak
   only of these three.

   On the client side, even if it's less highlighted for the moment,
   possibilities to use solutions based on free or commercial software
   are numerous. There also the Internet part is the main one, with tools
   like graphical web browsers ([130]Netscape) or textual ([131]lynx), a
   lot of graphical mail readers ([132]Kmail, [133]XFMail, ...) or
   textual ([134]mutt, [135]elm, ...). But you also have the whole panel
   of indispensable tools for a personal computer today as a PDF reader
   ([136]Acrobat Reader or [137]xpdf), image manipulation tools
   ([138]ImageMagick, [139]the Gimp, [140]RealPlayer tools ...), word
   processors ([141]LyX, [142]LaTeX, [143]SGMLTools, [144]Wordperfect,
   ...), commercial office suites ([145]ApplixWare, [146]StarOffice),
   sound management tools ([147]WavTools, [148]eplaymidi, [149]xmcd,
   ...), CD burning tools ([150]cdrecord, [151]BurnIT, ... with
   complements as [152]mkisofs, [153]cdparanoia), free and commercial
   emulators for various systems ([154]Wine, [155]Executor, [156]WABI,
   [157]DOSEmu, ...), compilers and interpretors for all the languages
   ([158]C, [159]C++, [160]Pascal, [161]Fortran, [162]Basic, [163]Tcl/Tk,
   [164]Perl, [165]Python, [166]Ada, [167]Eiffel, [168]Lisp, [169]Scheme,
   [170]Prolog...), including commercial versions ([171] PGI, ...),
   graphical environments ([172]Gnome, [173]KDE, [174]Motif, ...). The
   evolution of these last tools indicates that the 2000's may be the
   years where Linux and free software will break through at their turn
   on the client.

   I want to mention that this document was realized on an HP Brio BAx
   equiped only with a Linux distribution, with the help of tools like
   [175]SGMLTools, [176]Jade and [177]DocBook, which allowed to generate
   from a single source the formats HTML, Txt, RTF, PostScript, and PDF.
     _________________________________________________________________

Service argumentation

   This one was for a long time a blocking point to the expansion of free
   software in the firms. It's not the case today. Many service providers
   or hardware manufacturers, like HP, control today these solutions and
   propose support around them.

   Other sources of informations are also available, in abundance,
   through several web sites dedicated to these solutions, specialised
   mailing-lists, and various Usenet groups, such as for Linux, the
   international groups under comp.os.linux.* or for the french speaking
   people under fr.comp.os.linux.*.

   Concerning competences, more and more young engineers or academics
   finish their learning cycle being trained to the use of free
   applications and operating systems. This wealth of competences arrives
   now on the labour market and will contribute to increase the movement
   of generalisation of these tools. At last, many firms have internaly
   ignored competences. In fact, their employees often install this
   software at home, and have a good mastering, usable when arrives the
   deployment of the software in their professional structure.
     _________________________________________________________________

Wrong ideas on free software

   Advocating free software consists also to mention some generally
   accepted ideas concerning them and to fight them.

   "There is no support, no training"
          As seen previously, support is currently structuring itself. A
          firm like [178]RedHat provides today support for their
          solutions. Only in France, we may mention firms like
          [179]Medasys , [180]Atrid, [181]Alcove which assure support on
          free software. Likewise, always in France, training on free
          software may be given by [182]HP France, [183]Learning Tree,
          the [184]IUT de Vlizy, without mentioning generic network and
          Unix trainings (besides proposed also by the same
          organizations) which represent a fundamental base in a training
          course.

   "There is no documentation"
          There is a whole set of manuals, the [185]Linux Documentation
          Project made of FAQ (Frequently Asked Questions) and HOWTO,
          counting more than 300 documents around Linux, the main being
          [186]translated in french, available as free documentation.
          This documentation has a various quality, more or less up to
          date, following the subjects, certainly but it makes a corpus
          allowing to apprehend alone a Linux distribution and all its
          components. For myself, I always found in it everything I
          needed to do my job with free software. And, in case of
          complementary informations, a lot of web sites and Usenet
          groups may again bring some of the elements needed. And without
          counting the innumerable manual pages available on line.

          On the other side, the editors [187]O'Reilly and [188]SSC have
          specialised in providing books around free software, written
          generaly by the writers of the software themselves. Their books
          are considered as reference books in their respective domains.

   "A free or nearly free product is a toy"
          You should always make a difference between free (as speech)
          and free (as beer). Too many freeware in Microsoft environment
          are in fact toys and of poor quality. It's absolutely not the
          case for free software, as stated in the previous sections.
          Remember just that they are reliable by construction.

   "Linux is difficult to install"
          Linux is a professional operating system. At that title, it
          requires competences to install it, as well as any other
          professional operating system, like the other Unix or Windows
          NT for example. But it isn't more difficult to install than
          those either, mainly thanks to distributions as RedHat 6.1,
          Mandrake 7.0, ... You need about 30 minutes to realize a
          complete installation of such distributions, so quite the same
          as for HP-UX and noticeably less than for Windows NT Server.

          On the other hand, as before installing a server with Windows
          NT you have to verify its compatibilit with the [189]Hardware
          Compatibility List of Microsoft, for Linux it's also greatly
          recommended to verify the [190]Hardware HOWTO, and for HP
          machines to refer to this [191]page.

   "Free Software are not adequate for heavy tasks"
          This is less and less true and this criticism will be obsolete
          with the next versions of the Linux kernel which will include a
          journalised filesystem, allowing a true application cluster.
          But already Linux authorises the use of multi-processors,
          several nodes to realise computation clusters. And don't forget
          it's used by the portal [192]Voila (France Telecom) or the
          engine [193]Deja among other prestigious references. As well,
          FreeBSD is used with success as the world biggest ftp server :
          [194]Walnut Creek CDROM server

   "What appeal do I have in case of problem with the editors ?"
          There is no appeal, because software licences deny all
          responsabilities for the writers, in case of problem. But, in
          reality developers are always ready to help in case of problem
          and try to correct as soon as possible the bugs encountered
          (for the F00F bug of the pentium, a patch for the Linux kernel
          was published within 3 days, for example). On the other side,
          commercial editors guarantee very badly users against problems
          other than packaging errors. please read the notes furnished
          with your software to judge.
     _________________________________________________________________

Real problems around free software

   It would not be honest to negate certain remaining problems linked to
   free software. Some have begun to disappear, other are inherent to the
   system, other at last will take time to diappear.

   The first problem, inherent to the model of free software, is the
   multiplicity of tools and distributions available. So, if you want to
   setup a mail server, you have to choose between Sendmail, Exim,
   PostFix, Qmail, Smail. As well if you want to install Linux, you may
   choose between the distributions [195]RedHat , [196]SuSE,
   [197]Slackware, [198]enMandrake, [199]Turbo Linux, [200]Debian. This
   represents often a problem for the newcomer, but the esperienced user
   will always prefer to have a large choice he will confront to his
   particularities and to his experience. As long as an actor respects
   the rules by freeing his code (it's the case of the rpm and deb
   formats for example), there is little risk from the comunity point of
   view.

   The second problem, inherent also to the free software birth, is the
   necessity to have strong Unix and Internet competences, to manage such
   solutions. The power available through these systems is proportional
   to the competence of their administrators. And that will stay true
   even with the growth of more and more grahical solutions to manage
   them. On the other side, you capitalize the investment in time to
   learn their functions and that doesn't disappear, because you don't
   have to re-learn eveything from one version to the other. Don't forget
   that systems you use daily seem to be simple, uniquely because you
   passed enough time to learn them. For Internet competences, it's a
   statement of the obvious to say that this investment isn't lost. At
   last, even with the work of translators to provide informations in
   french and other languages, a good knowledge in technical english is
   definitively a plus.

   The last problem met in the implementation of free software solutions
   is to suceed in convincing some mnagers to go against the prevailing
   opinion. The aim of this part is precisely to give all sorts of
   argumentations to achieve that goal, but you need each time to show
   conviction to get his way in the end. As soon as these solutions will
   be adopted by big firms principaly, resistances will disappear.
     _________________________________________________________________

Linux and other operating systems

   The aim is not to examine completely or to compare the functions of
   the various operating systems available. It's more upon looking at the
   respective positions of Linux in comparaison with other systems. Only
   systems having a sufficient representation on the market are
   considered.
     _________________________________________________________________

Linux and other proprietary Unix (HP-UX, Tru64, AIX, Solaris, Irix)

   The situation taken by all the hardware manufacturers place Linux
   today in the entry level (when it's taken in account) and their own
   Unix system in the middle and high level. Reality is sometimes more
   cruel than the situation wanted by the marketing department :-).
   Technically, a Linux distribution has no cause to be envious of the
   manufacturers Unix solutions, except for the moment the set of
   commercial applications. And we can often see that users dope their
   workstations with free software to complete their usage.

   To be precise in the talk, we should consider manufacturers Unix
   solutions as split in stations and servers.

   On the station side, there's no doubt in my mind: for a customer, the
   only reason today to buy one is linked to the availability of a
   software or a hardware which wouldn't exist in the free environment,
   or due to intrinsic performances of the machine. In the first case, we
   can see that this argument should have a short life time, because
   logically every software editor (except maybe hardware manufacturers)
   and every hardware manufacturer has interest in porting their
   applications or allowing the use of their hardware on all the major
   environments in the market. As shown by Oracle, Informix, Sybase, ...
   Linux becomes today one of the major environments. In the second case,
   the difference in term of performances between the Linux dominant
   platform (IA-32) and the other competitors decreases and should even
   disappear with the availability of the IA-64 architecture, which seems
   to be adopted largely by a majority of actors. More over, Linux is
   often available natively on the processors of these actors (Sparc,
   Mips, PowerPC, 68xxx, Alpha, Crusoe, PA-Risc to come). I think Linux
   may represent the famous unique and standard Unix that everybody
   dreamed of from a long time, without succeeding to impose it (the open
   and free characteristics brought by Linux are not without influence on
   that). I think that at the end hardware manufacturer Unix workstations
   will be restricted to some niches such as high end computation,
   virtual reality, ... and that as long as solutions are not available
   on a free environment. Linux offers all the functional qualities of
   the other Unix systems, and thus of the workstation, on a more various
   hardware platform and potentially at a better price, if on PCs. So it
   is the natural choice of every computer engineer with a strong Unix
   culture (old customer of the workstation) who will prefer that
   solution to the migration to a Microsoft system typically.

   On the server side, in addtion to the points mentionned previously for
   the stations, problems are more complex. Ram, disks, processors
   capacities, extensions of every kind make them difficultly repleacable
   by machines with a IA-32 architecture for example. More over, certain
   solutions such as high availability clusters for example are not
   already in production in a Linux environment. The other brake is often
   linked to investments already done around software solutions deployed
   on these servers. Whatever their natural life time is much higher than
   those of the stations. Changes will thus be made more slowly in that
   domain. Here we can consider rightly Linux solutions as an
   entry/middle level solutions, when hardware manufacturer Unix servers
   are the middle/high level. The introduction of Linux in place of these
   machines will begin only with a massive availability of applications,
   mainly in the management sector.

   The advantages of the hardware manufacturer solutions, explaining why
   they are so often chosen when applications are critical, are linked to
   the homogeneity of the solution (hardware and software mastered by the
   same entity, which can't invoke a third party in case of problem), and
   to the support and maintenance garantees furnished.

   Finally, there is not so much antagonism between these systems,
   because they are full cousins. Their association allows today to
   computer teams "pro-Unix" to have solutions from start to finish,
   without having to lose in functions, as it's so often the case with
   other operating systems available for personal computers.
     _________________________________________________________________

Linux and SCO

   The comparaison between Linux and the SCO systems seems to me quite
   unbalanced. First, all the previous points are vaild here also. More
   over, SCO isn't a hardware manufacturer, so the homogeneity advantage
   disappears. the IA-32 Intel platform is supported by both systems, so
   cost is identical. On the other hand, the software solution has a
   disproportionate cost (few software provided in the base install, thus
   a lot of expenses to extend, as well as to increase the number of
   users). Having to manage one OpenServer, I can say that performances
   are far beyond those of a Linux system. More over, its conception is
   older, abounds of symbolic links which makes management complex. The
   hardware supported by SCO is less numerous than those Linux supports.
   Only stay as an advantage the installed base and the set of
   applications available. But for how long ? Besides the fact that SCO
   choose Monterey (AIX based) for the IA-64 port seems significant for
   the future reserved to OpenServer or UnixWare.
     _________________________________________________________________

Linux and Windows NT

   The comparaison is here more difficult, because Windows NT isn't an
   open system, as the precedings, which is already redhibitory for
   certain users. An excellent [201]comparaison was made by John Kirch
   between Unix and Windows NT Server. I recommend to people searching to
   have an enlightened opinion on this subject to read it; it's updated
   regularly and was written by a specialist of both Microsoft and Unix
   operating systems. Financially, obvious advantage for the free
   software. And it's more obvious, as for SCO, if you consider the set
   of complementary software you need to use a server. The author
   evaluates the difference from 1 to 100 all the same ! Technically,
   either on the functions provided or on the reliability, the
   administration, the performances, the hardware supported, and more
   over the security, Unix systems and particularly free systems
   outperform what is proposed by Windows NT. The fact to have a GUI non
   independant from the kernel contributes greatly to the instability of
   NT, because it's more difficult to avoid errors in a GUI (there is no
   mastering possible of the user comportment in front of it) rather than
   in a kernel.

   Which are the real advantages of Windows NT ?: the marketing power of
   Microsoft which persuades the world that computers equal Windows and
   which leans on the enormous installed base; its office applications (a
   monopolistic situation on the market) only available in this
   environment; the confusion maintained between the various flavours of
   Windows (95/98, NT, 2000), and between the server and client
   functions; its agreements with the biggest hardware manufacturers
   which often oblige them to provide a Microsoft system with their
   platforms; its technological initiatives to occupy the market in
   first, based on proprietary code and that often without respect of
   known or documented standards.

   The lack of hegemony in the servers sector is the best reason to hope
   that a plurality of solutions may exist in the future for computers
   users, also at the desktop.
     _________________________________________________________________

Chapter 3. Linux and HP products

   To maintain such a chapter is an endless task :-).
     _________________________________________________________________

Informations on HP products and Linux

General informations

   HP became recently concious of the importance taken by Linux and free
   software in general and on its machines particularly. Thus a web site
   dedicated to Linux in HP environment is now available at
   http://www.hp.com/go/linux.

   In France, there is for a longer time a site on these themes, under
   the responsability of Jacques Misselis <[202]Jacques_Misselis@hp.com>,
   hosted by [203]l'Ecole Centrale de Lyon at the address
   http://hpwww.ec-lyon.fr/hpeduc/education.

   On the other side, the firm [204]Medasys , for which I work, put at
   disposition of the community a certain number of informations since
   1997, available at http://www.medasys-digital-systems.fr/linux. This
   HOWTO is the result of this work.

   HP also realized a synthesis document (PDF format) concerning his
   position vis  vis of Linux, the [205]White Paper HP Linux Strategy.

   HP is a member of [206]Linux International.
     _________________________________________________________________

Particular announces

   HP also communicates through its web site around Linux and free
   software. You'll find some links here.

     * FireHunter announce (10/06/1998)
       http://www.tmo.hp.com/tmo/press/English/PRTM0804813.html
     * Covision program announce (01/27/1999)
       http://www.hp.com/pressrel/jan99/27jan99b.htm
     * Linux support on NetServers and IA-64 announce (01/27/1999)
       http://www.hp.com/pressrel/jan99/27jan99.htm
     * PA-Risc port annouce (03/01/1999)
       http://www.hp.com/pressrel/mar99/01mar99e.htm
     * Informix HP association announce (03/02/1999)
       http://www.hp.com/pressrel/mar99/02mar99i.htm
     * Kayak Linux support (03/17/1999)
       http://www.hp.com/pressrel/mar99/17mar99e.htm
     * World Linux support announce (04/20/1999)
       http://www.hp.com/pressrel/apr99/20apr99a.htm
     * HP OpenView announces (05/17/1999)
       http://www.openview.hp.com/solutions/itsm/press/press.asp?docid=31
       4
     * Availability of Apache on HP 3000 (Summer/1999)
       http://www.businessservers.hp.com/falladvisor/sum99/Summer99/apach
       e.html
     * Visualize Linux support announce (06/21/1999)
       http://www.hp.com/pressrel/jun99/21jun99g.htm
     * Open Source Software commitment by HP (08/09/1999)
       http://internetsolutions.enterprise.hp.com/linux/news/PRelease4.ht
       ml
     * Aberdeen group analysis on HP position on free software
       (08/09/1999)
       http://internetsolutions.enterprise.hp.com/linux/news/aberdeen_whi
       te_paper.html
     * HP announces the certification of its DAT and DLT products under
       Linux (02/02/2000)
       http://www.hp.com/pressrel/feb00/02feb00c.htm
     * HP Brings Award-winning 3-D VISUALIZE Graphics to Linux Desktop
       (02/02/2000)
       http://internetsolutions.enterprise.hp.com/linux/feb02page.html
     * [207]Medasys chosen by Hewlett-Packard France Education/Research
       as Linux competence center
       http://hpwww.ec-lyon.fr/hpeduc/education/offre/linux/educ_linux.ht
       ml
     * Hewlett-Packard France Education/Research announces commitment to
       Linux promotion
       http://hpwww.ec-lyon.fr/hpeduc/education/offre/linux/hp_linux.html

   HP France has also published an article on Linux and free software in
   its May 1999 issue of HP Computer News, an article on HP Linux support
   in the September 1999 issue, and an article on Linux RedHat solutions
   on HP Visualize workstation in the November 1999 issue.
     _________________________________________________________________

HP hardware supported by Linux

   This section presents HP hardware supported today by Linux.
   Informations are based on the latest stable version of the Linux
   kernel, which is currently version 2.2.14. A development kernel
   (version 2.3.x) is also available but doesn't offer any garantee of
   stability.
     _________________________________________________________________

Intel based computer range

   Page last updated the 15th of March 2000.

   That computer range is today the main set of HP machines supported by
   Linux, and that till many years. In case you didn't already do it
   before, some preliminaty readings are recommended before to try to
   install Linux on these platforms.

   The [208]Linux Installation HOWTO contains a great number of
   informations to install Linux. If you bought linux on a CD-ROM,
   chances are that installation instructions are provided with it (the
   little booklet inside the disk case, and/or files on the CD).

   The [209]Linux Kernel HOWTO should be read to have details on kernel
   construction. I will just mention here points which are specific to HP
   hardware.

   Outside particular indication, Linux support means during the
   installation of a RedHat 6.1 distribution. In special cases, a kernel
   rebuild will be necessary to support completely some hardware
   elements. You should note that what is true for one distribution is
   generally true for another, as these functions are linked to the
   kernel or the XFree86 server, and not to the distribution itself.
     _________________________________________________________________

The desktop range (Brio, Vectra, Kayak)

   The following tables indicate the state of Linux support by these
   platforms :

   Table 3-1. Brio and Linux
   Machine Graphic Card Linux support Network Card Linux support SCSI
   Card Linux support Sound Card Linux support Tes-ted
   Brio (D5522A, D5526A, D5857A, D6665A, D5838A, D5848A, D6514A, D5527A,
   D5528A, D6666A, D6675A, D5849A, D5839A, D5859A, D6666A, D6510A,
   D6515A, D6667A, D5840A, D5861A, D6668A, D5840C, D5841A, D6516B) S3
   Trio 64V2 PCI Yes XFree 3.3.6[210]Rem. (SVGA) None N/A None N/A ???
   ??? Yes
   Brio (D6810A, D6812A) ATI Rage Pro ZX AGP Yes XFree 3.3.6[211]Rem.
   (Mach 64) None N/A None N/A ??? ??? No
   Brio (D6638A, D6639A, D6640A, D6644A, D7901A, D7902A, D6645A, D6646A)
   Chipset BX[212]Rem. ATI Rage Pro ZX AGP Yes XFree 3.3.6[213]Rem. (Mach
   64) None N/A None N/A ??? ??? No
   Brio (D5841A, D6516B) Matrox Millenium II PCI Yes XFree 3.3.6[214]Rem.
   (SVGA) None N/A None N/A ??? ??? No
   Brio (D6760A, D7671A, D6908A, D7930A, D7672A, D7925T, D6776A, D6769A,
   D6755A, D6895A, D6896A, D6897A, D7931A) Matrox Productiva G100
   AGP[215]Rem. Yes XFree 3.3.6[216]Rem. (SVGA) None N/A None N/A ??? ???
   No
   Brio BA (D7581A, D7584A, D7585A, D7587A, D7586A, D7591A, D7594A,
   D8411A) Sis 5595 AGP Yes XFree 3.3.6[217]Rem. in Frame Buffer mode
   (FBDEV)[218]Rem. None N/A None N/A Cirrus Logic CS 4614 ??? No
   Brio BAx (D7600A, D7603A, D7624A, D7625A, D7630A, D7610A)[219]Rem.
   Matrox Productiva G200 AGP Yes XFree 3.3.6[220]Rem. (SVGA) None N/A
   None N/A Cirrus Logic CS 4614 ??? Yes
   Brio BAx (D7605A)[221]Rem. Matrox Productiva G200 AGP Yes XFree
   3.3.6[222]Rem. (SVGA) ??? ??? None N/A Cirrus Logic CS 4614 ??? No
   Brio BA400 (D8767A, D8769A, D8934A, D8935A, D8936A, D8943A, D8947A,
   D8952A, D8953A, D9720A, D9721A) Intel i810 AGP[223]Rem. Yes XFree
   3.3.6[224]Rem. (XFCom i810) None N/A None N/A ??? ??? Yes
   Brio BA600 (D8773A, D8778A, D8788A, D8789A, D9070A, D9072A, D9080A,
   D9082A, D9085A, D9091A) Chipset BX[225]Rem. Matrox Productiva G200 AGP
   Yes XFree 3.3.6[226]Rem. (SVGA) None N/A None N/A Cirrus Logic CS 4614
   ??? Yes
   Brio BA600 (D8774A, D9075A) Chipset BX[227]Rem. Matrox Productiva G200
   AGP Yes XFree 3.3.6[228]Rem. (SVGA) ??? ??? None N/A Cirrus Logic CS
   4614 ??? No

   Table 3-2. Vectra and Linux
   Machine Graphic Card Linux support Network Card Linux support SCSI
   Card Linux support Sound Card Linux support Tes-ted
   Vectra VE5 (D5592A, D5602A, D5603A, D5604A, D5606N, D5608A, D5612A,
   D5615A, D5618A, D5607A, D5617A) S3 Trio 64V2 PCI Yes XFree
   3.3.6[229]Rem. (SVGA) None N/A None N/A ??? ??? Yes
   Vectra VE7 (D6530A, D6531A, D6533A, D6610A, D6611A, D6615A, D6616A,
   D6613A) ATI Rage II C AGP Yes XFree 3.3.6[230]Rem. (Mach 64) None N/A
   None N/A ??? ??? Yes
   Vectra VE7 (D6532A, D6612A, D6617A, D6618A) ATI Rage II C AGP Yes
   XFree 3.3.6[231]Rem. (Mach 64) 3Com 905B-TX 10/100 BT[232]Rem. Yes
   driver 3c59x[233]Rem. None N/A ??? ??? Yes
   Vectra VE8 (D6550A, D6560A, D6570A, D6554A, D6584A, D6540A, D6541A,
   D6544A, D6543A, D6578A, D6573A, D6574A, D6580A,D6581A, D6584A, D6583A,
   D6593A, D6597A, D6598A) Chipset BX[234]Rem. Matrox Productiva G100
   AGP[235]Rem. Yes XFree 3.3.6[236]Rem. (SVGA) None N/A None N/A ??? ???
   Yes
   Vectra VE8 (D6552N, D6562N, D6565N, D6542A, D6572A, D6575A, D6582A,
   D6595A, D6582A, D6585N, D6599A) Chipset BX[237]Rem. Matrox Productiva
   G100 AGP[238]Rem. Yes XFree 3.3.6[239]Rem. (SVGA) 3Com 905B-TX 10/100
   BT[240]Rem. Yes driver 3c59x[241]Rem. None N/A ??? ??? Yes
   Vectra VEi7 (D8121A, D8123A, D8124A, D8126A, D8128A, D8129A, D8131A,
   D8133A, D8134A, D8136A, D8138A, D8139A, D8141A, D8143A, D8144A,
   D8145A, D8148A) Sis 5595 AGP Yes XFree 3.3.6[242]Rem. in Frame Buffer
   mode (FBDEV)[243]Rem. None N/A None N/A ??? ??? Yes
   Vectra VEi7 (D8122A, D8127N, D8132A, D8137A) Sis 5595 AGP Yes XFree
   3.3.6[244]Rem. in Frame Buffer mode (FBDEV)[245]Rem. 3Com 905B-TX
   10/100 BT[246]Rem. Yes driver 3c59x[247]Rem. None N/A ??? ??? No
   Vectra VEi8 (D8166A, D8168A, D8151A, D8153A, D8155A, D8169A, D8171A,
   D8173A, D8174A, D8181A, D8183A, D8184A, D8186A, D8188A, D9784A,
   D9786A, D9788A, D9793A) Matrox Productiva G200 AGP Yes XFree
   3.3.6[248]Rem. (SVGA) None N/A None N/A ??? ??? No
   Vectra VEi8 (D8167N, D8152N, D8172N, D8182N, D8187N, D9787N) Matrox
   Productiva G200 AGP Yes XFree 3.3.6[249]Rem. (SVGA) 3Com 905B-TX
   10/100 BT[250]Rem. Yes driver 3c59x[251]Rem. None N/A ??? ??? No
   Vectra VL5 (D4552A, D4543A, D4554A, D4555A, D4556A, D4557A, D4558A,
   D4559A, D4560A, D4567A, D4562A, D4563A, D4572A, D4574A, D4576A,
   D4579A, D4577A) S3 Trio 64V2 PCI Yes XFree 3.3.6[252]Rem. (SVGA) None
   N/A None N/A ??? ??? Yes
   Vectra VL6 Cirrus Logic GD 5446 PCI Yes XFree 3.3.6[253]Rem. (SVGA)
   None N/A None N/A ??? ??? Yes
   Vectra VL6 Matrox Millenium II PCI Yes XFree 3.3.6[254]Rem. (SVGA)
   None N/A None N/A ??? ??? No
   Vectra VL7 (D5710A, D5711N, D5725A, D5720A, D5721N, D5731N, D5797N,
   D5737A, D5799N) Cirrus Logic GD 5465 AGP[255]Rem. Yes XFree
   3.3.6[256]Rem. (SVGA) None N/A None N/A ??? ??? Yes
   Vectra VL7 (D5734N, D5729N, D5739N, D5728N, D5798N) Matrox Millenium
   II PCI Yes XFree 3.3.6[257]Rem. (SVGA) None N/A None N/A ??? ??? No
   Vectra VL7 (D5724N, D5796N) Cirrus Logic GD 5465 AGP[258]Rem. Yes
   XFree 3.3.6[259]Rem. (SVGA) AMD 79C971 KC 10/100 BT Yes driver pcnet32
   None N/A ??? ??? No
   Vectra VL8 (D5880A, D5882A, D5890A, D5891A, D5893A, D5896A, D5898A,
   D5900A, D5902A, D6945A) Chipset BX[260]Rem. Matrox Productiva G100
   AGP[261]Rem. Yes XFree 3.3.6[262]Rem. (SVGA) None N/A None N/A ??? ???
   No
   Vectra VL8 (D5881A, D5883A, D5894A, D5888A, D5892A) Chipset
   BX[263]Rem. Matrox Productiva G100 AGP[264]Rem. Yes XFree
   3.3.6[265]Rem. (SVGA) 3Com 905B-TX 10/100 BT[266]Rem. Yes driver
   3c59x[267]Rem. None N/A ??? ??? No
   Vectra VL8 (D5887A) Chipset BX[268]Rem. Matrox Productiva G100
   AGP[269]Rem. Yes XFree 3.3.6[270]Rem. (SVGA) 3Com 905B-TX 10/100
   BT[271]Rem. Yes driver 3c59x[272]Rem. ??? ??? ??? ??? No
   Vectra VL8 (D6944A) Chipset BX[273]Rem. Matrox Millenium G200 AGP Yes
   XFree 3.3.6[274]Rem. (SVGA) None N/A None N/A ??? ??? No
   Vectra VL8 (D6940A, D6941A, D6942A) Chipset BX[275]Rem. Matrox
   Millenium G200 AGP Yes XFree 3.3.6[276]Rem. (SVGA) 3Com 905B-TX 10/100
   BT[277]Rem. Yes driver 3c59x[278]Rem. None N/A ??? ??? No
   Vectra VL8 (D6943A) Chipset BX[279]Rem. Matrox Millenium G200 AGP Yes
   XFree 3.3.6[280]Rem. (SVGA) 3Com 905B-TX 10/100 BT[281]Rem. Yes driver
   3c59x[282]Rem. Adaptec AIC 7880 UW PCI Yes driver aic7xxx ??? ??? Yes
   Vectra VLi8 (D7941A, D7943A, D7945A, D7948A, D7951A, D7953A, D7955A,
   D7961A, D7963A, D7965A, D7958A, D7968A, D7969A, D7973A, D7976A,
   D9460A, D9463A, D9467A, D9774A, D9810A) Matrox Millenium G200 AGP Yes
   XFree 3.3.6[283]Rem. (SVGA) None N/A None N/A Cirrus Logic CS 4614 ???
   Yes
   Vectra VLi8 (D7826A, D7836A, D7837A, D7846A, D7847A, D7848A, D7856A,
   D7857A, D7866A, D7867N, D7876A, D7877N, D7942A, D7949A, D7952A,
   D7959A, D7962A, D7969A, D7972A, D8696A, D8697A, D8950A, D9456A,
   D9457N, D9461A, D9462A, D9770N, D9771N, D9775A, D9779N, D9809A) Matrox
   Millenium G200 AGP Yes XFree 3.3.6[284]Rem. (SVGA) 3Com 905C-TX 10/100
   BT Yes driver 3c59x[285]Rem. None N/A Cirrus Logic CS 4614 ??? Yes
   Vectra VL600 (D9733A, D8643A, D9737A, D8647A) Chipset i820[286]Rem.
   Matrox Millenium G250 AGP ??? None N/A None N/A Cirrus Logic CS 4614
   ??? No
   Vectra VL600 (D7543N, D8644N, D8648N, D9734N, D9738N) Chipset
   i820[287]Rem. Matrox Millenium G250 AGP ??? 3Com 905C-TX 10/100 BT Yes
   driver 3c59x[288]Rem. None N/A Cirrus Logic CS 4614 ??? No
   Vectra VL600 (D8635A, D8645A, D8649N, D8659N, D8669N, D8679N, D9735A,
   D9739N) Chipset i820[289]Rem. Matrox Millenium G400D AGP Yes XFree
   3.3.6[290]Rem. (SVGA) 3Com 905C-TX 10/100 BT Yes driver 3c59x[291]Rem.
   None N/A Cirrus Logic CS 4614 ??? Yes
   Vectra XA (D3986A, D3989A, D3990A, D3991A, D3993A, D4770N, D4771N,
   D4773N, D4774N, D3994N, D3995N, D4776N) Matrox Millenium II PCI Yes
   XFree 3.3.6[292]Rem. (SVGA) AMD 79C971 KC 10/100 BT Yes driver pcnet32
   None N/A ??? ??? No
   Vectra XA (D4777A) Matrox Millenium II PCI Yes XFree 3.3.6[293]Rem.
   (SVGA) AMD 79C971 KC 10/100 BT Yes driver pcnet32 Adaptec AIC 7880 UW
   PCI Yes driver aic7xxx ??? ??? Yes

   Table 3-3. Kayak and Linux
   Machine Graphic Card Linux support Network Card Linux support SCSI
   Card Linux support Sound Card Linux support Tes-ted
   Kayak XA (D4792A, D4795N) Cirrus Logic GD 5465 AGP[294]Rem. Yes XFree
   3.3.6[295]Rem. (SVGA) None N/A None N/A ??? ??? No
   Kayak XA (D4807N, D4796N, D6491N, D6492N, D4806N, D4808N, D6493N)
   Cirrus Logic GD 5465 AGP[296]Rem. Yes XFree 3.3.6[297]Rem. (SVGA) AMD
   79C971 KC 10/100 BT Yes driver pcnet32 None N/A ??? ??? Yes
   Kayak XA (D4798N, D6490N, D4799N, D4803N, D6494N) Cirrus Logic GD 5465
   AGP[298]Rem. Yes XFree 3.3.6[299]Rem. (SVGA) AMD 79C974 KC 10/100 BT +
   SCSI Yes driver pcnet32 Symbios Logic 8751SP with network card Yes
   driver ncr-53c8xx[300]Rem. ??? ??? No
   Kayak XA (D4796S, D6493S) Matrox Millenium II AGP Yes XFree
   3.3.6[301]Rem. (SVGA) None N/A None N/A ??? ??? No
   Kayak XA (D4803S) Matrox Millenium II AGP Yes XFree 3.3.6[302]Rem.
   (SVGA) AMD 79C974 KC 10/100 BT + SCSI Yes driver pcnet32 Symbios Logic
   8751SP with network card Yes driver ncr-53c8xx[303]Rem. ??? ??? No
   Kayak XA (D6720N, D6721N, D6723N, D6726N, D6724N, D6730N, D6731N,
   D6735N, D6736N, D6738N, D6739N, D7994N) Matrox Millenium G200 AGP Yes
   XFree 3.3.6[304]Rem. (SVGA) None N/A None N/A ??? ??? No
   Kayak XA (D6722N, D6729N, D6734N) Elsa Gloria Synergy + AGP[305]Rem.
   Yes XFree 3.3.6[306]Rem. (3D Labs) None N/A None N/A ??? ??? Yes
   Kayak XA (D6725N, D6732N, D6737N, D7993N) Matrox Millenium G200 AGP
   Yes XFree 3.3.6[307]Rem. (SVGA) AMD 79C971 KC 10/100 BT + SCSI
   (D6692A)[308]Rem. Yes driver pcnet32 Symbios Logic 53c875 with network
   card (D6692A) Yes driver ncr-53c8xx[309]Rem. ??? ??? Yes
   Kayak XA (D6727N) Elsa Gloria Synergy + AGP[310]Rem. Yes XFree
   3.3.6[311]Rem. (3D Labs) AMD 79C971 KC 10/100 BT + SCSI
   (D6692A)[312]Rem. Yes driver pcnet32 Symbios Logic 53c875 with network
   card (D6692A) Yes driver ncr-53c8xx[313]Rem. ??? ??? No
   Kayak XA (D6728N, D6733N) Accel Galaxy AGP Yes XFree 3.3.6[314]Rem. in
   Frame Buffer mode (FBDEV)[315]Rem. Not interesting None N/A None N/A
   ??? ??? No
   Kayak XA-s (D5751N, D5752N, D5753N, D5755N, D5754N, D5756N, D5759N)
   Chipset BX[316]Rem. Matrox Productiva G100 AGP[317]Rem. Yes XFree
   3.3.6[318]Rem. (SVGA) None N/A None N/A ??? ??? No
   Kayak XA-s (D5757N, D5758N) Chipset BX[319]Rem. Matrox Productiva G100
   AGP[320]Rem. Yes XFree 3.3.6[321]Rem. (SVGA) AMD 79C971 KC 10/100 BT +
   SCSI (D6692A)[322]Rem. Yes driver pcnet32 Symbios Logic 53c875 with
   network card (D6692A) Yes driver ncr-53c8xx[323]Rem. ??? ??? Yes
   Kayak XA-s (D5765N, D5763N, D5766N, D5769N, D7982N, D7986N, D7991N,
   D7987N) Chipset BX[324]Rem. Matrox Productiva G200 AGP Yes XFree
   3.3.6[325]Rem. (SVGA) None N/A None N/A ??? ??? Yes
   Kayak XA-s (D5768N, D5767N) Chipset BX[326]Rem. Matrox Productiva G200
   AGP Yes XFree 3.3.6[327]Rem. (SVGA) AMD 79C971 KC 10/100 BT + SCSI
   (D6692A)[328]Rem. Yes driver pcnet32 Symbios Logic 53c875 with network
   card (D6692A) Yes driver ncr-53c8xx[329]Rem. ??? ??? No
   Kayak XA-s (D5762N, D7984N, D7988N) Chipset BX[330]Rem. Elsa Gloria
   Synergy + AGP[331]Rem. Yes XFree 3.3.6[332]Rem. (3D Labs) AMD 79C971
   KC 10/100 BT + SCSI (D6692A)[333]Rem. Yes driver pcnet32 Symbios Logic
   53c875 with network card (D6692A) Yes driver ncr-53c8xx[334]Rem. ???
   ??? Yes
   Kayak XA-s (D5764N, D7983N, D7989N) Chipset BX[335]Rem. Accel Galaxy
   AGP Yes XFree 3.3.6[336]Rem. in Frame Buffer mode (FBDEV)[337]Rem. Not
   interesting AMD 79C971 KC 10/100 BT + SCSI (D6692A)[338]Rem. Yes
   driver pcnet32 Symbios Logic 53c875 with network card (D6692A) Yes
   driver ncr-53c8xx[339]Rem. ??? ??? No
   Kayak XA-s (D7990N) Chipset BX[340]Rem. Matrox Productiva G100
   AGP[341]Rem. Yes XFree 3.3.6[342]Rem. (SVGA) AMD 79C971 KC 10/100 BT +
   SCSI (D6692A)[343]Rem. Yes driver pcnet32 Symbios Logic 53c875 with
   network card (D6692A) Yes driver ncr-53c8xx[344]Rem. ??? ??? No
   Kayak XA-s (D7992N) Chipset BX[345]Rem. Elsa Gloria Synergy II AGP Yes
   XFree 3.3.6[346]Rem. (SVGA) AMD 79C971 KC 10/100 BT + SCSI
   (D6692A)[347]Rem. Yes driver pcnet32 Symbios Logic 53c875 with network
   card (D6692A) Yes driver ncr-53c8xx[348]Rem. Analog Device 1816 Yes
   driver AD1816[349]Rem. Yes
   Kayak XM600 (D9531N, D9533N, D9535N, D9541N, D9549N, D9553N) Matrox
   Millenium G250 AGP ??? SMC 1211 TX EZ Card 10/100 BT Yes driver
   rtl8139 None N/A Cirrus Logic CS 4614 ??? No
   Kayak XM600 (D8350N, D9554N, D9558N) [350]Rem. Matrox Millenium G250
   AGP ??? SMC 1211 TX EZ Card 10/100 BT Yes driver rtl8139 None N/A
   Cirrus Logic CS 4614 ??? No
   Kayak XM600 (D9536N, D9537N, D9538N, D9539N, D9544N, D9548N) Matrox
   Millenium G400D AGP Yes XFree 3.3.6[351]Rem. (SVGA) SMC 1211 TX EZ
   Card 10/100 BT Yes driver rtl8139 None N/A Cirrus Logic CS 4614 ??? No
   Kayak XM600 (D9534N, D9540N, D9543N, D9546N) Elsa Gloria Synergy II
   AGP Yes XFree 3.3.6[352]Rem. (SVGA) SMC 1211 TX EZ Card 10/100 BT Yes
   driver rtl8139 Symbios Logic 53C895 PCI Yes driver ncr-53c8xx[353]Rem.
   Cirrus Logic CS 4614 ??? Yes
   Kayak XM600 (D9545N, D8366N) 3DLabs Oxygen GVX1 AGP Yes XFree
   3.3.6[354]Rem. in Frame Buffer mode (FBDEV)[355]Rem. SMC 1211 TX EZ
   Card 10/100 BT Yes driver rtl8139 Symbios Logic 53C895 PCI Yes driver
   ncr-53c8xx[356]Rem. Cirrus Logic CS 4614 ??? No
   Kayak XU (D4691N, D4692N, D4695N, D4701N, D4693N, D4694N, D4702N,
   D4705N) Matrox Millenium II PCI Yes XFree 3.3.6[357]Rem. (SVGA) AMD
   79C971 KC 10/100 BT Yes driver pcnet32 Adaptec AIC 7860 PCI + Adaptec
   AIC 7880 UW PCI Yes driver aic7xxx ??? ??? Yes
   Kayak XU (D5680N, D5682N, D5683N, D5684N) Chipset BX[358]Rem. Matrox
   Millenium II PCI Yes XFree 3.3.6[359]Rem. (SVGA) AMD 79C971 KC 10/100
   BT Yes driver pcnet32 Adaptec AIC 7860 PCI + Adaptec AIC 7880 UW PCI
   Yes driver aic7xxx Analog Device 1816 Yes driver AD1816[360]Rem. Yes
   Kayak XU (D5702, D5704, D5686N, D6336N, D6348N, D8431N, D8920N) Matrox
   Millenium G200 AGP Yes XFree 3.3.6[361]Rem. (SVGA) AMD 79C972 10/100
   BT + SCSI (D6692A)[362]Rem. Yes driver pcnet32 Symbios Logic 53c875
   with network card (D6692A) + Adaptec AIC 7880 PCI Yes driver ncr53c8xx
   and driver aic7xxx ??? ??? Yes
   Kayak XU (D5687N, D6333N, D6334N, D8432N, D6345N, D8923N) Elsa Gloria
   Synergy + AGP[363]Rem. Yes XFree 3.3.6[364]Rem. (3D Labs) AMD 79C972
   10/100 BT + SCSI (D6692A)[365]Rem. Yes driver pcnet32 Symbios Logic
   53c875 with network card (D6692A) + Adaptec AIC 7880 PCI Yes driver
   ncr53c8xx and driver aic7xxx ??? ??? No
   Kayak XU (D6337N, D6346N) Accel Galaxy AGP Yes XFree 3.3.6[366]Rem. in
   Frame Buffer mode (FBDEV)[367]Rem. Not interesting AMD 79C972 10/100
   BT + SCSI (D6692A)[368]Rem. Yes driver pcnet32 Symbios Logic 53c875
   with network card (D6692A) + Adaptec AIC 7880 PCI Yes driver ncr53c8xx
   and driver aic7xxx ??? ??? No
   Kayak XU (D6347N) Matrox Productiva G100 AGP[369]Rem. Yes XFree
   3.3.6[370]Rem. (SVGA) AMD 79C972 10/100 BT + SCSI (D6692A)[371]Rem.
   Yes driver pcnet32 Symbios Logic 53c875 with network card (D6692A) +
   Adaptec AIC 7880 PCI Yes driver ncr53c8xx and driver aic7xxx ??? ???
   No
   Kayak XU (D8924N) Matrox Millenium G400D AGP Yes XFree 3.3.6[372]Rem.
   (SVGA) AMD 79C972 10/100 BT + SCSI (D6692A)[373]Rem. Yes driver
   pcnet32 Symbios Logic 53c875 with network card (D6692A) + Adaptec AIC
   7880 PCI Yes driver ncr53c8xx and driver aic7xxx ??? ??? No
   Kayak XU800 (D8019N) [374]Rem. Matrox Millenium G250 AGP ??? SMC 1211
   TX EZ Card 10/100 BT Yes driver rtl8139 None N/A Cirrus Logic CS 4614
   ??? No
   Kayak XU800 (D8021N) [375]Rem. Matrox Millenium G400D AGP Yes XFree
   3.3.6[376]Rem. (SVGA) SMC 1211 TX EZ Card 10/100 BT Yes driver rtl8139
   None N/A Cirrus Logic CS 4614 ??? No
   Kayak XU800 (D8000N, D8001N) [377]Rem. [378]Rem. Matrox Millenium G250
   AGP ??? SMC 1211 TX EZ Card 10/100 BT Yes driver rtl8139 Symbios Logic
   53C895 PCI Yes driver ncr-53c8xx[379]Rem. Cirrus Logic CS 4614 ??? No
   Kayak XU800 (D8002N, D8010N, D8016N) [380]Rem. Matrox Millenium G250
   AGP ??? SMC 1211 TX EZ Card 10/100 BT Yes driver rtl8139 Symbios Logic
   53C895 PCI Yes driver ncr-53c8xx[381]Rem. Cirrus Logic CS 4614 ??? No
   Kayak XU800 (D8003N, D8006N, D8012N) [382]Rem. Matrox Millenium G400D
   AGP Yes XFree 3.3.6[383]Rem. (SVGA) SMC 1211 TX EZ Card 10/100 BT Yes
   driver rtl8139 Symbios Logic 53C895 PCI Yes driver ncr-53c8xx[384]Rem.
   Cirrus Logic CS 4614 ??? Yes
   Kayak XU800 (D8007N, D8013N, D8020N, D8022N) [385]Rem. Elsa Gloria
   Synergy II AGP Yes XFree 3.3.6[386]Rem. (SVGA) SMC 1211 TX EZ Card
   10/100 BT Yes driver rtl8139 Symbios Logic 53C895 PCI Yes driver
   ncr-53c8xx[387]Rem. Cirrus Logic CS 4614 ??? No
   Kayak XU800 (D8009N, D8015N) [388]Rem. 3DLabs Oxygen GVX1 AGP Yes
   XFree 3.3.6[389]Rem. in Frame Buffer mode (FBDEV)[390]Rem. SMC 1211 TX
   EZ Card 10/100 BT Yes driver rtl8139 Symbios Logic 53C895 PCI Yes
   driver ncr-53c8xx[391]Rem. Cirrus Logic CS 4614 ??? No
   Kayak XW (D6475N) Elsa Gloria Synergy[392]Rem. Yes XFree
   3.3.6[393]Rem. (3D Labs) AMD 79C971 KC 10/100 BT Yes driver pcnet32
   Adaptec AIC 7860 PCI + Adaptec AIC 7880 UW PCI Yes driver aic7xxx ???
   ??? No
   Kayak XW (D5505N, D5507N, D5509N) Accel Eclipse PCI Yes XFree
   3.3.6[394]Rem. in Frame Buffer mode (FBDEV)[395]Rem. Not interesting
   AMD 79C971 KC 10/100 BT Yes driver pcnet32 Adaptec AIC 7860 PCI +
   Adaptec AIC 7880 UW PCI Yes driver aic7xxx ??? ??? No
   Kayak XW (D5510N, D5514N, D6485N) HP Fx-4 AGP No XFree 3.3.6[396]Rem.
   in Frame Buffer mode (FBDEV)[397]Rem. Not interesting AMD 79C971 KC
   10/100 BT Yes driver pcnet32 Adaptec AIC 7860 PCI + Adaptec AIC 7880
   UW PCI Yes driver aic7xxx ??? ??? No
   Kayak XW (D6480N, D6481N, D6482N) Chipset BX[398]Rem. Accel Eclipse
   PCI Yes XFree 3.3.6[399]Rem. in Frame Buffer mode (FBDEV)[400]Rem. Not
   interesting ??? ??? ??? ??? ??? ??? No
   Kayak XW (D6797N) HP Fx-6 AGP No XFree 3.3.6[401]Rem. in Frame Buffer
   mode (FBDEV)[402]Rem. Not interesting ??? ??? ??? ??? ??? ??? No
   Kayak XW (D6486N, D6487N, D6488N) Chipset BX[403]Rem. HP Fx-4 AGP No
   XFree 3.3.6[404]Rem. in Frame Buffer mode (FBDEV)[405]Rem. Not
   interesting ??? ??? ??? ??? ??? ??? No

   Table 3-4. Visualize and Linux
   Machine Graphic Card Linux support Network Card Linux support SCSI
   Card Linux support Sound Card Linux support Tes-ted
   Visualize P (A5015A) Chipset BX[406]Rem. Elsa Gloria Synergy +
   AGP[407]Rem. Yes XFree 3.3.6[408]Rem. (3D Labs) ??? ??? ??? ??? Analog
   Device 1816 Yes driver AD1816[409]Rem. No
   Visualize P (A5015A) Chipset BX[410]Rem. Elsa Gloria Synergy II AGP
   Yes XFree 3.3.6[411]Rem. (SVGA) ??? ??? ??? ??? Analog Device 1816 Yes
   driver AD1816[412]Rem. No
   Visualize P (A1296A) Chipset BX[413]Rem. Elsa Gloria Synergy II AGP
   Yes XFree 3.3.6[414]Rem. (SVGA) ??? ??? ??? ??? Analog Device 1816 Yes
   driver AD1816[415]Rem. No
   Visualize X (A5014A) Chipset BX[416]Rem. Elsa Gloria Synergy +
   AGP[417]Rem. Yes XFree 3.3.6[418]Rem. (3D Labs) ??? ??? ??? ??? Analog
   Device 1816 Yes driver AD1816[419]Rem. No
   Visualize X (A5014A) Chipset BX[420]Rem. Elsa Gloria Synergy II AGP
   Yes XFree 3.3.6[421]Rem. (SVGA) ??? ??? ??? ??? Analog Device 1816 Yes
   driver AD1816[422]Rem. No
   Visualize X (A1297A) Chipset BX[423]Rem. Elsa Gloria Synergy +
   AGP[424]Rem. Yes XFree 3.3.6[425]Rem. (3D Labs) ??? ??? ??? ??? Analog
   Device 1816 Yes driver AD1816[426]Rem. No
   Visualize X (A1280A) Elsa Gloria Synergy II AGP Yes XFree
   3.3.6[427]Rem. (SVGA) ??? ??? ??? ??? Analog Device 1816 Yes driver
   AD1816[428]Rem. No

   A page dedictaed to these machines and their support under LInux is
   available at http://www.hp.com/visualize/support/technotes/linux
     _________________________________________________________________

Desktop computer accessories

   The following table provides all of the informations on the support
   for this hardware by Linux.

   Table 3-5. Desktop computer accessories
   Reference Card type Chipset Linux support Tes-ted
   D5480A FastRaid Card Adaptec ARO Raidport No No
   D6690A FastRaid Card Adaptec ARO Raidport No No
   D6951A SCSI Card Adaptec AIC 7880 UW PCI Yes driver aic7xxx Yes
   D9528A SCSI Card Symbios Logic 8952U Ultra2 Wide PCI ??? No
   D9529A SCSI Card ??? ??? No
   D6936A Network Card AMD 79C972 AKC 10/100 BT Yes driver pcnet32 Yes
   D7504A Network Card 3Com 905B-TX 10/100 BT[429]Rem. Yes driver
   3c59x[430]Rem. Yes
   D7506A Network Card ??? ??? No
   D7508A Network Card ??? ??? No
   D7522A Network Card 3Com 905C-TX 10/100 BT Yes driver 3c59x[431]Rem.
   Yes
   D7531A Network Card Carte HP chipset RealTek Yes driver RealTek Yes
   D6657A Sound Card ??? ??? No
   D5183A Sound Card ??? ??? No

   CD-ROM, DVD and ZIP drives are supported by Linux kernel. Read the
   various HOWTO for their use, following the interface type.
     _________________________________________________________________

The portable range (OmniBook)

   The following table provides all of the informations on the support
   for this hardware by Linux.

   Table 3-6. OmniBook and Linux
   Machine Graphic Card Linux support Network Card Linux support SCSI
   Card Linux support Sound Card Linux support Tes-ted
   OmniBook 800 (F1360A) Neomagic MagicGraph 128XD NM2160 Yes XFree
   3.3.6[432]Rem. (SVGA) None N/A SCSI Card Yes driver
   ncr-53c8xx[433]Rem. ??? ??? Yes
   OmniBook 2000 (F1356A, F1397A) Chips & Technologies CT65554 Yes XFree
   3.3.6[434]Rem. (SVGA) None N/A None N/A ??? ??? No
   OmniBook Sojourn (F1430A) Neomagic MagicGraph 128XD NM2160 Yes XFree
   3.3.6[435]Rem. (SVGA) None N/A None N/A ??? ??? No
   OmniBook XE (F1719W, F1720W, F1721W, F1722W) Silicon Motion LynxE
   SM810[436]Rem. Yes XFree 3.3.6[437]Rem. (SVGA) None N/A None N/A ???
   ??? Yes
   OmniBook XE2 (F1664W, F1666W, F1666N, F1667W, F1667N, F1674W, F1675W,
   F1753W, F1756W, F1755W, F1755N, F1772W, F1774N, F1774W, F1775N,
   F1775W, F1962W) Silicon Motion LynxE SM810[438]Rem. Yes XFree
   3.3.6[439]Rem. (SVGA) None N/A None N/A ??? ??? Yes
   OmniBook 2100 (F1584W, F1580W, F1581W, F1597W, F1598W, F1599W, F1600W,
   F1729W) Neomagic MagicGraph 128XD NM2160 Yes XFree 3.3.6[440]Rem.
   (SVGA) None N/A None N/A ??? ??? Yes
   OmniBook 900 (F1711W, F1712W, F1760W, F1711N, F1712N, F1765N) Neomagic
   MagicGraph 256AV NM2200 Yes XFree 3.3.6[441]Rem. (SVGA) None N/A None
   N/A ??? ??? Yes
   OmniBook 900 (F1769W, F1769N, F1769K, F1770W, F1770N, F1770K, F1979W,
   F1979N, F1979K, F1980W, F1980N, F1980K) ATI ??? None N/A None N/A ???
   ??? No
   OmniBook 3000 (F1391A, F1392A, F1393A) Neomagic MagicGraph 128XD
   NM2160 Yes XFree 3.3.6[442]Rem. (SVGA) None N/A None N/A ??? ??? No
   OmniBook 3100 (F1582W) Neomagic MagicGraph 128XD NM2160 Yes XFree
   3.3.6[443]Rem. (SVGA) None N/A None N/A ??? ??? No
   OmniBook 4100 (F1462W, F1463W, F1479W, F1464W, F1703W) Neomagic
   MagicGraph 128XD NM2160 Yes XFree 3.3.6[444]Rem. (SVGA) None N/A None
   N/A ??? ??? Yes
   OmniBook 4150 (F1629W, F1640W, F1641W, F1642W, F1629N, F1640N, F1641N,
   F1642N, F1647W, F1647N, F1648W, F1648N, F1663W, F1663N) Neomagic
   MagicGraph 256AV NM2200 Yes XFree 3.3.6[445]Rem. (SVGA) None N/A None
   N/A Crystal CS 4232 ??? Yes
   OmniBook 4150 (F1649W, F1649N, F1649K, F1650W, F1650N, F1650K, F1658W,
   F1658N, F1660W, F1660N, F1662W, F1662N, F1662K, F1976W, F1976N,
   F1976K, F1983W, F1983N, F1983K, F2000W, F2000N, F2000K, ) ATI ??? None
   N/A None N/A Crystal CS 4232 ??? Yes
   OmniBook 5700 (F1352A, F1353A, F1396A, F1354A, F1355A) Chips &
   Technologies CT65554 Yes XFree 3.3.6[446]Rem. (SVGA) None N/A None N/A
   ??? ??? Yes
   OmniBook 7100 (F1441W, F1442W) ATI Rage LT Pro Yes XFree
   3.3.6[447]Rem. (Mach 64) None N/A None N/A ??? ??? Yes
   OmniBook 7150 (F1443W) ATI Rage LT Pro Yes XFree 3.3.6[448]Rem. (Mach
   64) None N/A None N/A ??? ??? No
     _________________________________________________________________

Portable accessories

   The cards mentionned below are PCMCIA or PC-Card cards.

   The following table provides all of the informations on the support
   for this hardware by Linux.

   Table 3-7. Portable accessories
   Reference Card type Chipset Linux support Tes-ted
   F1623A Modem/Net Card Xircom CEM56-100 56Kb 10/100 BT Yes driver
   xirc2ps_cs Yes
   F1625A Modem Card ??? ??? No
   F1626A Network Card 3Com 3CXFE575BT 10/100 BT ??? No
   F1626B Network Card ??? ??? No
   F1643A Modem/Net Card ??? ??? No
     _________________________________________________________________

The server range (NetServer)

   A page on how Linux works on HP NetServer is available at
   http://www.netserver.hp.com/netserver/products/highlights_linux.asp

   An official compatibility matrix of HP NetServer with Linux and other
   operating systems is available at :
   http://netserver.hp.com/netserver/support/compatibility/drvmatrx.htm

   Official documents to help configuring NetServer under Linux
   [449]RedHat [450]5.2 and [451]6.0 are also available.

   The following table provides all of the informations on the support
   for this hardware by Linux.

   Table 3-8. NetServer and Linux
   Machine Graphic Card Linux support Network Card Linux support SCSI
   Card Linux support Sound Card Linux support Tes-ted
   NetServer E45 (D4973A, D4974A, D4975A, D4976A, D5971A) Cirrus Logic GD
   5446 PCI Yes XFree 3.3.6[452]Rem. (SVGA) Intel i82557 / i82558 10/100
   BT (D5013A/B) Yes driver eepro-100 Adaptec AIC 2910bui (7860) PCI Yes
   driver aic7xxx None N/A No
   NetServer E50 (D6034A, D6033A, D6035A, D6031A, D6030A, D6032A) Cirrus
   Logic GD 5446 PCI Yes XFree 3.3.6[453]Rem. (SVGA) Intel i82557 /
   i82558 10/100 BT (D5013A/B) Yes driver eepro-100 Adaptec AIC 7880 UW
   PCI Yes driver aic7xxx None N/A Yes
   NetServer E55 (D9337A) ATI Rage II C AGP Yes XFree 3.3.6[454]Rem.
   (Mach 64) Intel S82093A / i82559 10/100 BT Yes driver eepro-100
   Adaptec AIC 7895H PCI Yes driver aic7xxx None N/A No
   NetServer E60 (D7140A, D7142A, D7144A, D7146A, D7148A, D9123A, D9127A,
   D9128A, D9129A) ATI Rage II C AGP Yes XFree 3.3.6[455]Rem. (Mach 64)
   Intel S82093A / i82559 10/100 BT Yes driver eepro-100 Adaptec AIC
   7895H PCI Yes driver aic7xxx None N/A Yes
   NetServer LC II (D4907A, D4909A, D5014A, D5015A, D5016A, D5969A,
   D5970A, D5959A, D5961A) Cirrus Logic GD 5446 PCI Yes XFree
   3.3.6[456]Rem. (SVGA) Intel i82557 / i82558 10/100 BT (D5013A/B) Yes
   driver eepro-100 Adaptec AIC 7880 UW PCI Yes driver aic7xxx None N/A
   Yes
   NetServer LC 3 (D6123A, D7018A, D6125A, D7020A, D7028A, D7025A,
   D7126A, D8594A) Chipset BX[457]Rem. Cirrus Logic GD 5446 PCI Yes XFree
   3.3.6[458]Rem. (SVGA) Intel i82557 / i82558 10/100 BT (D5013A/B) Yes
   driver eepro-100 Adaptec AIC 7880 UW PCI Yes driver aic7xxx None N/A
   Yes
   NetServer LC 2000 (D8514A, D8515A, D8519A, D8520A, D8524A, D8525A,
   D9162A, D9163A) Chipset i820[459]Rem. [460]Rem. ATI Rage II C AGP Yes
   XFree 3.3.6[461]Rem. (Mach 64) Intel S82093A / i82559 10/100 BT Yes
   driver eepro-100 2 Symbios Logic 53C897 PCI Yes driver
   ncr-53c8xx[462]Rem. None N/A Yes
   NetServer LD Pro (D4944A, D4946A, D4961A, D4962A) Trident TVGA 9000i
   Yes XFree 3.3.6[463]Rem. (SVGA) Intel i82557 / i82558 10/100 BT
   (D5013A/B) Yes driver eepro-100 Adaptec AIC 7880 UW PCI Yes driver
   aic7xxx None N/A No
   NetServer LH Pro (D4979A, D4980A, D4981A, D4982A) Trident TVGA 9000i
   Yes XFree 3.3.6[464]Rem. (SVGA) None N/A 2 Adaptec AIC 7880 UW PCI Yes
   driver aic7xxx None N/A Yes
   NetServer LH II (D5017A, D5953A, D5021A, D5023A, D6047A, D6048A)
   Trident TVGA 9000i Yes XFree 3.3.6[465]Rem. (SVGA) None N/A 2 Adaptec
   AIC 7880 UW PCI Yes driver aic7xxx None N/A Yes
   NetServer LH 3 (D4998A, D5002A, D5000A, D5004A, D7033A, D7034A,
   D8503A, D8504A, D8567A, D8568A, D9343A, D9344A) Chipset BX[466]Rem.
   [467]Rem. Cirrus Logic GD 5446 PCI Yes XFree 3.3.6[468]Rem. (SVGA)
   Intel i82557 / i82558 10/100 BT (D5013A/B) Yes driver eepro-100 2
   Symbios Logic 53C895 PCI Yes driver ncr-53c8xx[469]Rem. None N/A Yes
   NetServer LH 3000 (D8228A, D8230A, D8236A, D8238A, D8244A, D8246A,
   D9176A, D9178A) Chipset BX[470]Rem. [471]Rem. ??? ??? ??? ??? ??? ???
   None N/A No
   NetServer LH 4 (D7092A, D7093A, D7094A, D7095A, D6971A, D6972A,
   D6973A, D6974A, D7103A, D7104A, D8552A, D8553A, D8556A, D8557A,
   D8560A, D8561A) Chipset BX[472]Rem. [473]Rem.[474]Rem. Cirrus Logic GD
   5446 PCI Yes XFree 3.3.6[475]Rem. (SVGA) Intel i82557 / i82558 10/100
   BT (D5013A/B) Yes driver eepro-100 2 Symbios Logic 53C895 PCI Yes
   driver ncr-53c8xx[476]Rem. None N/A Yes
   NetServer LH 6000 () Chipset BX[477]Rem. [478]Rem. [479]Rem. ATI Rage
   II C AGP Yes XFree 3.3.6[480]Rem. (Mach 64) Intel S82093A / i82559
   10/100 BT Yes driver eepro-100 Adaptec AIC 7880 PCI + 2 Symbios Logic
   53C896 PCI Yes driver aic7xxx and driver ncr53c8xx None N/A Yes
   NetServer LPr (D6130A, D6131A, D7171A, D9133A, D9348A, D9431A, D9434A)
   Chipset BX[481]Rem. Cirrus Logic GD 5446 PCI Yes XFree 3.3.6[482]Rem.
   (SVGA) Intel i82557 / i82558 10/100 BT (D5013A/B) Yes driver eepro-100
   Symbios Logic 53C895 PCI Yes driver ncr-53c8xx[483]Rem. None N/A Yes
   Cluster NetServer LPr (D6131A, P1133A)[484]Rem. Cirrus Logic GD 5446
   PCI Yes XFree 3.3.6[485]Rem. (SVGA) Intel i82557 / i82558 10/100 BT
   (D5013A/B) Yes driver eepro-100 Symbios Logic 53C895 PCI Yes driver
   ncr-53c8xx[486]Rem. None N/A No
   NetServer LXePro/LXPro (D4920B, D4925B, D6036A, D4311B, D4312B,
   D6037A, D4315B, D4958B, D6014A, D6015A, D4964B, D4898A, D6016A,
   D4899A, D6017A, D4900A, D6018A) Cirrus Logic GD 5424 PCI Yes XFree
   3.3.6[487]Rem. (SVGA) None N/A 2 Adaptec AIC 7880 UW PCI Yes driver
   aic7xxx None N/A No
   NetServer LXr8 (D5028A) ? ? None N/A Symbios logic UW ? None N/A No
   NetServer LXr8000 (D6021A, D6022A, D6136A, D6137A, D7000A, D8256A,
   D8257A, D8258A, D8546A, D8548A) Cirrus Logic GD 5446 PCI Yes XFree
   3.3.6[488]Rem. (SVGA) None N/A 2 Symbios Logic 53C896 PCI Yes driver
   ncr-53c8xx[489]Rem. None N/A Yes
   NetServer LXr8500 (D8540A, D8542A, D9417A, D9418A) Cirrus Logic GD
   5446 PCI Yes XFree 3.3.6[490]Rem. (SVGA) None N/A 2 Symbios Logic
   53C896 PCI Yes driver ncr-53c8xx[491]Rem. None N/A No
     _________________________________________________________________

NetServers accessories

   The following table provides all of the informations on the support
   for this hardware by Linux.

   Table 3-9. NetServers accessories
   Reference Card type Chipset Linux support Tes-ted
   NetRaid 1 D4992A NetRaid Card AMI Megaraid (Raid 0, 1, 3, 5, 10, 50)
   Yes driver megaraid[492]Rem. Yes
   NetRaid 3 D4943A NetRaid Card AMI Megaraid (Raid 0, 1, 3, 5, 10, 50)
   Yes driver megaraid[493]Rem. Yes
   NetRaid 1Si D2140A NetRaid Card AMI Megaraid (Raid 0, 1, 3, 5, 10, 50)
   Yes driver megaraid[494]Rem. Yes
   NetRaid 3Si D5955A NetRaid Card AMI Megaraid (Raid 0, 1, 3, 5, 10, 50)
   Yes driver megaraid[495]Rem. Yes
   C1578B SCSI Card Adaptec AIC 7895H PCI Yes driver aic7xxx No
   C7430A SCSI Card Adaptec AIC 7880 UW PCI Yes driver aic7xxx No
   D5025A SCSI Card Adaptec AIC 7880 UW PCI Yes driver aic7xxx Yes
   D5252A SCSI Card Adaptec AIC 7880 UWD PCI Yes driver aic7xxx Yes
   D5013A, D5013B Network Card Intel i82557 / i82558 10/100 BT (D5013A/B)
   Yes driver eepro-100 Yes
   J2585B Network Card Carte 100VG (J2585B) Yes driver hp100 Yes
   D6977A Fibre Channel Card ??? ??? No
   D5246A Fibre Channel Card ??? ??? No
   D6028A Top Tools Card ??? Yes Yes
     _________________________________________________________________

Complementary informations

   Please refer to the [496]Hardware Howto and [497]Ethernet Howto for
   other details concerning the support of some hardware elements by
   Linux.

   For video chipsets support, a fundamental page is the one of
   [498]XFree86 with its supported [499]chipsets list and the new running
   developments by [500]Suse (Think, in that case, to download also
   [501]the configuration tool) and [502]RedHat at the following
   addresses :

     * ftp://ftp.medasys-digital-systems.fr/pub/linux/redhat.com/XBF
     * ftp://ftp.medasys-digital-systems.fr/pub/linux/redhat.com/XFCom

   Commercial servers are also available, as those of [503]X-Inside and
   [504]MetroLink

   Netvectra are not supported by Linux.
     _________________________________________________________________

Remarks

   XFree86
          The latest version of XFree86 is the 3.3.6, available from our
          [505]mirror.

   Ncr53c8xx
          The latest version of the ncr53c8xx driver is available from
          the [506]reference site.

   3C59x
          The latest version of the 3c59x driver is available from the
          [507]reference site.

   Sound Chipset AD1816
          The latest version of the AD1816 driver is available from the
          [508]reference site.

   DOS models
          These models are delivered with MS-DOS only, in order to have a
          Linux Machine at the best price.

   G100 card
          To use the MGA G100 AGP card, with a version of XFree86 before
          the 3.3.2 one, you have to use an option in the file XF86Config
          : Option "no_accel".

          Section example :

Section "Device"
[...]
      VendorName "Matrox"
      VideoRam 4096
      Option "no_accel"
EndSection

   Silicon Motion LynxE card
          This card is only supported from the 3.3.6 version of XFree86.
          Nevertheless, even in that version, this is a preliminary
          support, which isn't as stable as the Frame Buffer mode.

          On the other hand, to be able to install a RedHat 6.1 version,
          you should do that in text mode, because the server provided
          (3.3.5) doesn't support this card.

   Intel i810 card
          (Informations provided by Frdric Dubuy
          <[509]Frederic.Dubuy@medasys-digital-systems.fr> and Anne-Marie
          Mahfouf <[510]a-m.mahfouf@lineone.net>)

          This card is only supported with a specific X server XFCom_i810
          downloadable in both format [511]RPM or [512]tar.gz and a
          complementary module for the kernel agpgart, downloadable in
          both format [513]SRPM or [514]tar.gz.

          A detailed documentation on the installation is provided at
          http://www.linux-france.org/article/x/GuideIntel810/book1.html

          To summarize, once the X server installed, the module compiled
          and installed, it's sufficient to modify with the following
          parameters the file /etc/X11/XF86Config :

Section "Device"
[...]
      Identifier "i810"
[...]
EndSection

[...]
Section "Screen"
[...]
      Driver "svga"
      Device "i810"
[...]
EndSection

   XU800
          On that machine, the Bios doesn't give the right amount of
          memory which is in the machine to Linux. You need to use a line
          such as append="mem=xxxM" at the begining of /etc/lilo.conf
          where xxx is your RAM in MB.

   LC 2000
          In order to use the native SCSI controler you need to disable
          in the Bios the option "Reserve PCI Bus Numbers", in the menu
          PCI Device Setting. (Indication of GILLYNN COUCH)

   LH 6000
          In order to use the native SCSI controler you need to
          desactivate in the Bios the "reserver PCI Bus #s", in the menu
          PCI Device Setting. The PS/2 system doesn't seem to be
          operational on the machine we tested. On the other side,
          through the network, the system is perfectly operational in a
          6-processors mode :-)

   BX Chipset
          Intel BX Chipset (Memory Bus at 100 MHz) is supported by
          [515]kernels above 2.0.34/2.1.103.

   i820 Chipset
          Coppermine 0.18 m technology - 256 KB synchronous cache -
          Intel i820 Chipset

   BAx
          Attention, the XF86_SVGA server works correctly with this
          mother board embedded version only above XFree86 3.3.5, due to
          the use of different frequencies (In particular, use the
          updates for RedHat 5.2/6.0).

   FrameBuffer
          To use the FrameBuffer mode, please consult the following
          documents
          http://www.medasys-digital-systems.fr/linux/framebuffer.html
          and
          http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/Fr
          amebuffer-HOWTO.html.

   Boot disk for 3Com card
          Creation of a custom RedHat Boot disk

          To be able to boot with the RedHat 5.1 boot disk, and to have
          the support of the 3C905B-TX card, you need to do the following
          :

# Log as root. Go in the home directory  (~root)
#cd ~
# Put there the 3c59x.c source module for the 3Com card
#ncftp ftp://ftp.medasys-digital-systems.fr/pub/linux/networking/drivers/3c59x.
c
# Compile it
#gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c 3c59x.c `[ -f /usr/
include/linux/modversions.h ] && echo -DMODVERSIONS`
# put the RedHat 5.1 floppy boot disk in the drive
# you have to copy the initrd.img file from the floppy disk
#mcopy a:initrd.img /tmp
# then uncompress it
#gzip -cd /tmp/initrd.img > /tmp/initrd.ext2
# Mount the "file" filesystem thus obtained
#mount -t ext2 /tmp/initrd.ext2 /mnt/floppy -o loop
# uncompress the modules provided
#gzip -cd /mnt/floppy/modules/modules.cgz > /tmp/modules.cpio
# extract the modules
#cd /tmp ; mkdir modules ;
cd modules ; cat /tmp/modules.cpio | cpio -i
# Copy the new updated module for the 3Com card
#cp ~/3c59x.o .
# recreate the compressed cpio file
#ls | cpio -o | gzip -c9 > ../newmodules.cgz
# replace the modules by their update
#cp ../newmodules.cgz /mnt/floppy/modules/modules.cgz
# unmount the "file" filesystem
#umount /mnt/floppy
# compress the "file" filesystem
#gzip -c9 /tmp/initrd.ext2 > /tmp/initrd.img
# copy it on the floppy disk
#mcopy /tmp/initrd.img a:

   GD 5465 video card
          To use a Cirrus Logic GD 5465 AGP card, with a version below
          Xfree86 3.3.3, you have to use an option in the file XF86Config
          : Option "xaa_no_color_exp".

          Section example :

Section "Device"
[...]
       Identifier "CL-GD5465"
       VendorName "Cirrus"
       BoardName  "GD5465"
       VideoRam   2048
       Option     "xaa_no_color_exp"
EndSection

   Elsa Gloria Synergy card
          Specifications of that card should be consulted on Elsa web
          site. This card is equiped with an hardware OpenGL accelerator.
          Under Linux, there is an OpenGL compatible layer called Mesa.
          This layer begins to support hardware accelerators, and among
          them the 3DLabs chipset which is on Elsa Gloria cards.

          + [516]Elsa web site
          + [517]OpenGL web site
          + [518]Mesa web site

   D6692A card
          To use the D6692A card, you need to use a 2.1.122 kernel at
          least. Previous kernels didn't handled correctly the shared IRQ
          between the network and SCSI parts of the card. In particular,
          a standard RedHat 5.2 version doesn't allow to the network part
          to be supported. You have to update your kernel with a recent
          one (preferably 2.2.14) and the distribution with the
          complementary packages needed.

   HA Cluster
          To use a High Availability Custer under Linux, you need to use
          additional software, such as :

          + [519]RSF-1 (Commercial)
          + [520]Linux-HA project (free) and [521]ext3

   LH 4
          The LH4 doesn't seem to work correctly when not in Raid. Even
          with the latest Bios available at the time of the test (16.00),
          the problem remains. If you desactivate the Raid management,
          during the boot, the ncr53c8xx driver in Linux detects 4
          controlers instead of 2 and boot doesn't end. To avoid that,
          you have to activate the Raid in the Bios and use each of the
          disk in Raid0 mode, which is quite the same as the solution
          without Raid at all.

   NetRaid card
          These cards are equiped with an [522]AMI Megaraid chipset and
          may support the following Raid levels : 0, 1, 3, 5, 10, 30 and
          50. Some NetRaid cards, as well as the chipset integrated on
          the LH3 and LH4 mother boards are supported by recent version
          of the Linux kernel (2.0.36/2.2.14 typically - don't use
          2.0.37/38).

          For the RedHat 5.2 distribution, it's not possible to install
          the system on this type of controler, because it's not detected
          by the installation program. You have to use a specific
          [523]floppy disk . This floppy disk should be used as input to
          the rawrite tool, for example. It works for systems with less
          than 1 GB of memory.

          For the RedHat 6.0 distribution, you have to manually declare
          the existence of this card as a supplementary SCSI adapter, in
          order to use it directly during the installation. The megaraid
          driver isn't automatically detected.

          To avoid strange messages during the boot printed by the
          megaraid driver, it's necessary to recompile it with the option
          -DHP.

          For the RedHat 6.1 distribution, the megaraid driver provided
          by the kernel does support on ly the first logical drive. In
          order to obtain the others, please recompile a 2.2.14 standard
          kernel.

          You have to note that the integrated card of the LH3/4 realises
          a software parity checks and performs thus less efficiently
          than the NetRaid daughter cards. On the other side, LH6000 are
          equiped with an integrated card doing hardware checks.
     _________________________________________________________________

The monitors range

   The following table provides all of the informations on the support
   for this hardware by XFree86.

   Table 3-10. HP Monitors and Linux
   Reference Name Vert. F. (Hz) Hor. F. (kHz) Bandwidth (MHz) Resol Freq.
   (Hz) Tes-ted
   D2825A, D2825S 15" HP Ultra VGA 1024 50-110 31-54 65 640x400, 640x480,
   800x600, 1024x768 70, 60-72-75-85, 60-72-75-85, 60 Yes
   D2826A, D2826S 15" HP 50 50-120 31-54 65 640x400, 640x480, 800x600,
   1024x768 70, 60-75-85, 60-75-85, 60 Yes
   D2827A 15" HP 51 50-120 31-54 ??? ??? ??? No
   D2828A 15" HP 52 50-120 30-54 65 640x400, 640x480, 800x600, 1024x768
   70, 60-75-85, 60-75-85, 60 No
   D2832A 15" HP M500 50-120 30-70 110 640x400, 640x480, 800x600,
   1024x768, 1280x1024 70, 60-75-85, 72-75-85, 70-75-85, 60 No
   D2807A 17" Ultra 1280 50-160 30-64 ??? ??? ??? Yes
   D2837A 17" HP70 50-120 30-70 110 640x400, 640x480, 800x600, 1024x768,
   1280x1024 70, 75-85, 75-85, 75-85, 60 Yes
   D2838A 17" HP M700 50-160 30-86 ??? ??? ??? No
   D2840A 17" Ergo 1280 50-150 31-92 160 512x384, 640x480, 800x600,
   1024x768, 1152x864, 1280x1024, 1440x1080, 1600x1200 85, 100, 100, 100,
   100, 85, 72, 60 Yes
   D8901A, D8902A 17" HP71 50-120 30-60 110 640x400, 640x480, 800x600,
   1024x768, 1280x1024 70, 60, 75-85, 75-85, 60 No
   D8900A 17" HP75 50-160 30-86 (30-64 real) 150 640x400, 640x480,
   800x600, 1024x768, 1280x1024 70, 60-75-85, 75-85, 75-75-85, 75 Yes
   D2842A, D2842W 19" HP 90 50-200 30-96 203 640x400, 640x480, 800x600,
   1024x768, 1280x1024, 1600x1200 70, 75-85, 75-85, 75-85, 75-85, 75 Yes
   D8910A 19" HP 910 50-150 29-107 230 640x400, 640x480, 800x600,
   1024x768, 1280x1024, 1600x1200 70, 60-85, 85, 75-85, 75-85, 75-85 No
   A4031A 20" 48-150 30-82 ??? ??? ??? Yes
   D2846A, A4576A 21" P1100 50-160 30-107 ??? ??? ??? No
   D2847A 21" P1110 50-180 29-121 300 ??? ??? Yes
   A4033A 21" 50-120 30-80 ??? ??? ??? Yes
   A1295A 24" Wide Aspect 50-160 30-96 ??? ??? ??? No
   D5061A 15,1" LCD HP ??? ??? N/A ??? ??? No
   D5065A 18,1" LCD HP L1800 56-85 30-80 N/A 640x350, 640x480, 720x400,
   800x600, 832x624, 1024x768, 1152x870, 1152x900, 1280x1024 70,
   60-75-85, 70, 60-75-85, 75, 60-75-85, 75, 66, 60-75 Yes
     _________________________________________________________________

PA-Risc based computer range

   The PA-Risc range is achitectured around a processor designed and
   realised by HP. First versions were produced in 1987. Currently the
   versions are named PA-8000 (8200, 8500, ...).

   HP has announced at the begining of 1999 its intention to contribute
   to the port of Linux on its PA-Risc architecture. This port is a
   native one, which is different from a preceding project which used
   MkLinux on machines based on PA-7200. The work is currently done with
   [524]The Puffin Group and more precise informations on the status may
   be found on their [525]Web site. For the moment the work on the boot
   process is improved, a shell is launched... which dies rapidly :-)

   The first machine concerned by the port is the A Class server. Tests
   are also done on 712 and 715. Other people begin also to work on
   PA-2.0 machines.

   There is on the other side for these machines a Linux project based on
   the MkLinux micro-kernel. This project as developped within OSF. The
   web site mentionning informations is at
   http://www.gr.opengroup.org/mklinux/hppa/mkpa-rel.html.
     _________________________________________________________________

The IA-64 range

   HP is developping in collaboration with Intel a new generation of 64
   bits processors called IA-64. The first processor of this new
   generation, called Itanium, should be there during 2000. The initial
   port of Linux on IA-64 was published the 2nd of february, 2000 and the
   sources of the project are available through
   ftp://ftp.kernel.org/pub/linux/kernel/ia64. More informations on this
   topic may be found on this page of the HP labs :
   http://devresource.hp.com/devresource/Topics/IA64/IA64.html or on the
   reference site http://www.linuxia64.org
     _________________________________________________________________

The printing product range

General points

   Printers may be connected either directly to a machine through a
   parallel port (generally), or a serial port, or even more recently
   through an USB port. They may also be directly wired to the network,
   for a global access; this is done thanks to a card put in a slot of
   the printer, or through the connexion of the parallel port of the
   printer to a sharing network box.

   HP provides such boxes, called JetDirect, which allow thus to share
   personnal printers on the network, directly, without going through a
   machine. They exist for various network topologies (10 BT, 10/100 BT,
   Localtalk, 10B2) and offer the ability to access to the printer
   directly from machine which like Linux support the LPD protocol, by
   using a remote printer in the printcap file. The name of the queue to
   use is then raw.

   An example of /etc/printcap file allowing to access to a printer,
   equiped with such a box or card, named lj4000 on the network is given
   below :
# REMOTE POSTSCRIPT 1200x1200 a4 {} PostScript Default {}
lj4000:\
        :sd=/var/spool/lpd/lj4000:\
        :rm=lj4000:\
        :rp=raw:\
        :if=/var/spool/lpd/lj4000/filter:
        :mx#0:\
        :sh:\

   The configuration access to the box is done either through the
   WebJetAdmin tool provided also under Linux now, or by the telnet
   command. The default address of these products is 192.0.0.192. To
   connect to them initially, you just have to add an IP alias on your
   network interface, typically by :
#ifconfig eth0:0 192.0.0.1

   and a route to that network (if not automatically created) typically
   by :
#route add -net 192.0.0.0

   The access to the equipment is thus done simply by :
#telnet 192.0.0.192

   Please pay attention to have only one such equipment on the network,
   at the same time, or you'll have duplicate IP addresses, which always
   causes problems. Note that HP manageable network equipments also use
   the same default address. The reading of the [526]IP Alias mini HOWTO
   may be useful if you don't understand the previous paragraph :-).

   It is of course possible to access through the network to an HP
   printer attached and declared directly on a Linux machine, thanks to
   the lpd service for the other Unix clients, through [527]SaMBa for the
   clients of Microsoft systems (Win9x ou WinNTx) or through
   [528]NetAtalk for the MacIntosh clients.

   At last, [529]SaMBa offers a tool, smbclient, which allows to print
   from a Unix/Linux machine to a printer wired directly on a Microsoft
   based PC, without any need to use a JetDirect system. All the details
   useful to realize this operation are described in the file example
   smbprint provided with the [530]SaMBa package and on the page
   http://www.medasys-digital-systems.fr/linux/samba-truc.html.

   Communication between a Linux machine and a printer needs also,
   outside a network dialog, a discussion with an exchange language
   between the two elements. There are a lot of languages of that sort,
   such as PCL, Postscript or HPGL. To be able to print correctly, the
   tool providing the datas to print has to generate code known by the
   printer. Filters exist which allow to easily transform an output in
   one given format to another one. Thus the [531]Ghostscript software
   authorizes the transformation of Postscript source in a great variety
   of output formats, as indicated by its invocation in the 'Available
   devices' part :
#gs -h
GNU Ghostscript 5.10 (1998-12-17)
Copyright (C) 1997 Aladdin Enterprises, Menlo Park, CA.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
 -dNOPAUSE           no pause after page   | -q       `quiet', fewer messages
 -g<width>x<height>  page size in pixels   | -r<res>  pixels/inch resolution
 -sDEVICE=<devname>  select device         | -dBATCH  exit after last file
 -sOutputFile=<file> select output file: - for stdout, |command for pipe,
                                         embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PDF
Available devices:
   x11 x11alpha x11cmyk x11gray2 x11mono ap3250 imagen iwhi iwlo iwlq la50
   la70 la75 la75plus lbp8 ln03 lj250 lj4dith lp2563 m8510 necp6 oce9050
   r4081 sj48 st800 stcolor t4693d2 t4693d4 t4693d8 tek4696 xes deskjet
   djet500 djet500c dnj650c laserjet ljetplus ljet2p ljet3 ljet3d ljet4
   cdeskjet cdjcolor cdjmono cdj500 cdj550 paintjet pj pjxl pjxl300 uniprint
   bj10e bj200 bjc600 bjc800 epson eps9mid eps9high epsonc ibmpro jetp3852
   dfaxhigh dfaxlow faxg3 faxg32d faxg4 cp50 pcxmono pcxgray pcx16 pcx256
   pcx24b pcxcmyk pbm pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw
   tiffcrle tiffg3 tiffg32d tiffg4 tifflzw tiffpack tiff12nc tiff24nc psmono
   psgray bit bitrgb bitcmyk pngmono pnggray png16 png256 png16m jpeg
   jpeggray pdfwrite pswrite epswrite pxlmono pxlcolor nullpage
Search path:
   . : /usr/share/ghostscript/5.10 : /usr/share/fonts/default/ghostscript :
   /usr/share/fonts/default/Type1
For more information, see /usr/doc/ghostscript-5.10/use.txt.
Report bugs to ghost@aladdin.com; use the form in bug-form.txt.

   This represents only the output formats compiled in the program. Other
   are also available. You may find a complete list of all the printers
   known by this software at http://www.cs.wisc.edu/~ghost/printer.html.

   A list of the HP printers support may be found on the following page :
   http://www.picante.com/~gtaylor/pht/printer_list.cgi?make=HP&format=fu
   ll.
     _________________________________________________________________

HP software available under Linux

   This section presents rapidly some HP applications which can be used
   under Linux. These are either commercial applications or freeware
   applications.
     _________________________________________________________________

HP softwares

   FireHunter
          This software targetted to the ISP manages services levels and
          is available for RedHat version 5.2 distributions.
          http://www.firehunter.com.

   HP Eloquence
          This software is an IDE for management applications for small
          business firms and is available under Linux since 1997. A lot
          of distributions are supported by a third party firm to which
          HP has given the support. Complementary informations exist on
          the site http://www.hp-eloquence.com.

   HP WebJetAdmin
          This software allows to manage HP network printers through the
          installation of a service on a Linux server, and is accessible
          from any browser running on any client machine. HP has
          announced the availability of this product in its 5.1 version
          in February 1999. You may download it at
          http://www.hp.com/go/webjetadmin.

          An RPM version is also available at
          ftp://ftp.medasys-digital-systems.fr/pub/linux/mds/redhat/RPMS/
          i386/hpwebjet-5.6-1.i386.rpm.

   HP WebQoS
          This software allows to manage Internet Quality of Service by
          stabilizing performances during high loads, by optimizing used
          resources, and by managing priorities at applications and users
          levels. HP has announced the availability of this product
          during summer 1999. Complementary informations exist on the
          site http://www.hp.com/go/webqos.

   HP OpenView
          This software is a complete network management platform. An NNM
          (Network Node Manager) has been announced, as well as ITO. An
          Omniback client is available for Redhat 5.2 distributions (Cf
          http://www.hp.com/storage/event/openview_hl.html).

   HP OpenMail
          A version of this mail and work group management tool is
          available since the first of september, 1999. Informations
          concerning it are available on the page :
          http://www.ice.hp.com/cyc/om/00/cysearch.cgi?pattern=100-1417|1
          00-1408|100-1333|100-0100.

   HP E-Speak
          E-Speak, the open software platform for creating, composing,
          mediating, managing, and accessing Internet-based e-services.
          E-speak allows a resource (computing device, application, or
          data content) to be virtualized and re-deployed as an
          Internet-based e-service. All of the informations concerning it
          are available on the page : http://www.e-speak.hp.com/.
     _________________________________________________________________

Third party softwares linked to HP

   GNUPro
          HP and [532]Cygnus Solutions have announced the 8th of March,
          1999 a partnership to provide the GNUPro tools on all the HP
          machines, including Linux.
     _________________________________________________________________

Support of HP solutions under Linux

   HP proposes since May 1999 a [533]worldwide support offer on Linux.
   It's detailed on the page
   http://www.hp.com/pressrel/apr99/20apr99a.htm. This offer includes up
   to the possibility to answer 24x7, in a delay of 2 hours after taking
   the call. The reference of this product is : HP LNXIA32A

   Third party firms also propose Linux and free software support on HP
   platforms :

   [534]Medasys
          Contact : Cdric Letailleur
          <[535]Cedric.Letailleur@medasys-digital-systems.fr>

   [536]Alcove
          Contact : Lucien Petit <[537]lucien.petit@alcove.fr>
     _________________________________________________________________

Training on HP Linux solutions

   HP proposes since June 1999 a worldwide training offer on Linux. It's
   detailed on the page http://education.hp.com/curr-linux.htm. The
   detail of all the training courses for France is available at :
   http://www.france.hp.com/formation/f_linux_00.html.
     _________________________________________________________________

Chapter 4. Solutions and Sizing

   This chapter proposes an help for sizing NetServers under Linux,
   depending on the different kinds of use.

   You have to consider that exercise as a bit perilous. Indeed, only the
   reality allows to test such previsions. Nevertheless, using the
   experience acquired by deploying solutions in the past, we can give
   some useful rules.

   We may apply a certain number of rules valid for the sizing of
   classical Unix servers, considering that CISC systems (the majority in
   Linux environment) need 2.5 less times resources in memory than RISC
   systems, due to the fact that binaries used are smaller (Intel
   platforms are for the moment 32 bits architectures). This has also
   influences on disk and swap space.

   It's obvious you have to consider, whatever the system, bottlenecks of
   the solution put in place, because they will determine the weakest
   link in the chain.

   You have to look particularly at the following points :

     * The number and the speed of disks (the I/O rate of 10.000 rpm
       disks may go up to 15 MB/s),
     * The number and the speed of SCSI controlers (the I/O rate of
       Ultra2 LVD of the LC2000 - LH3/4/3000/6000 may go up to 80 MB/s),
     * The addition of a supplementary SCSI card supported, when adding
       slow peripherals (DAT, DLT, CD writer ...) in order to avoid that
       the controler slow down in compatible mode, and that I/O
       performanes drop significantly.

   You have also to be suspicious of the extensible functions of
   machines. Indeed, it's often preferable for a customer to add a new
   server, rather than to augment the capacities of the one in place. The
   first reason is a financial one, on one side, because the costs of
   add-ons on an already old system may be near those of a new system,
   whose prices are becoming cheaper and cheaper. And the same for
   maintenance. On the other hand, technically, it could be more
   interesting to benefit from the latest technologies to obtain a
   machine more equilibrate and powerful. For example, when Ultra2 LVD
   was introduced, it was more interesting to buy a new server to benefit
   from the 80 MB/s SCSI bus speed, rather than to update a server which
   had 40 MB/s Ultra Wide SCSI. This implies that it's interesting to
   size correctly the server, from the begining, for the whole forseeable
   period of life of its use (typically 3 years nowadays).

   In the same kind of ideas, you have to examine closely the choice
   between a bi-processors and two mono-processor machines. 2 different
   systems imply 2 disk controlers, 2 disks set, 2 separate RAM busses
   thus best performances, but more administration. On the other hand, a
   unique system renders it easier, allows for a quicker communication
   between processors, which could be necessary for certain applications,
   but makes the environment more fragile (more downtime in case of an
   hardware problem). In fact, there are more losses intrinsically on a
   multi-processors model, in communications at the system level. This
   question should mainly be considered for the addition of a processor
   (necesseraly obsolete) on a machine a posteriori, rather than to add a
   new server.

   On memory aspects, Linux can't manage today more than 2 GB in stable
   kernels. But Linux takes the maximum from the memory you give to it,
   mainly by the constitution of a cache disk which improves greatly
   system performances. You may thus oversize the quantity of RAM
   installed, because it's preferable to a situation where the server
   would be obliged to swap (which drop performances dramatically). The
   minimum RAM size provided on the NetServers (64 or 128 MB) matches
   perfectly a normal use of a system, and doesn't need any particular
   addition. You have to take in account that there is no graphical
   environment used on production servers. Concerning the swap, under
   Linux, it comes in addition to the RAM to give the complete virtual
   memory available for the server. As a base rule, it's recommanded to
   give the same amount of swap space as the amount of RAM, to allow the
   system to put on disk nearly all the running processus in case of
   need. But the rule which exists for System V Unix (such as HP-UX)
   consisting of reserving twice the amount of RAM for swap isn't useful
   under Linux. You may note that Linux may swap certain inactive
   processus to free the maximum RAM possible. So having a system whose
   swap is partially used isn't necesseraly a proof of lack of memory,
   nor lack of performances.

   You'll find below recommandations depending of the type of use made by
   the HP NetServer under Linux. It's possible to cumulate several
   functions on the same server. You'll take care to add in that case the
   resources needed to give the services.

   Some generic rules have to be considered :

     * We consider that the number of simultaneous users is the same as
       half the whole number of users on the server.
     * The minimal RAM size needed for a usable Linux server is 32 MB,
       which is less than the minimum amount of RAM available on the
       NetServers (64 MB). In case you use X-Window with KDE or Gnome on
       this machine, you need to have 64 MB in supplement, thus 96 MB as
       a minimum.
     * The minimal disk size needed for a usable Linux server is 2 GB,
       which is less than the minimum amount of disk available on the
       NetServers (9 GB).
     * In case of use of Raid 1, you have to double the amount of disk
       space useful to obtain the disk space needed. In case of use of
       Raid 5, you need to add 1 disk to obtain the disk space needed.
     * Except in particular cases (computing server), the amount of swap
       is the same as the amount of RAM.
     * The minimal processor needed for a usable Linux server is a
       Pentium 133, which is less than the minimum processor available on
       the NetServers (Pentium II 450).
     * Each X-Window user excuting a client on the server uses in average
       2 MB.
     * It may be useful to add network cards on this type of machine to
       smooth the traffic, depending on the number of clients.
     _________________________________________________________________

Linux as file and print server

Linux as file server

   The sharing service uses 2 MB of RAM, and 2 more MB per share. In case
   of a unique share (users space for example), it leads to a 2 MB
   consumption per user. In the proposed case, we estimate that each user
   has 100 MB of disk space on the server, with an evolution to 200 MB 3
   years later. Processor resources used are relativeley small, an entry
   level model will be sufficient from that point of view. We will
   priviledge the I/O speed with Ultra 2 LVD SCSI at 80 MB/s, if the
   budget allows it, and 10.000 RPM disks.

   Table 4-1. Sizing of a file server
   Simultaneous users RAM size Disk size Machine example
   1 - 100 312 Mo 27 Go E60
   100 - 500 1 Go 117 Go LC2000
   500 - 1000 2 Go 216 Go LH3000
     _________________________________________________________________

Linux as print server

   The sharing service uses 2 MB of RAM, and 2 more MB per printer
   shared. In case of a unique share (One printer per user typically), it
   leads to a 2 MB consumption per user. In the proposed case, we
   estimate that each user prints simultaneously files of 5 MB in
   average, thus we need to have that space available on the server.
   Processor resources used are relativeley small, an entry level model
   will be sufficient from that point of view.

   Table 4-2. Sizing of a print server
   Simultaneous users RAM size Disk size Machine example
   1 - 100 312 Mo 9 Go E60
   100 - 500 1 Go 9 Go E60
   500 - 1000 2 Go 9 Go LC2000
     _________________________________________________________________

Internet/Intranet Linux server

Web Server

   The Web service uses 2.5 MB of RAM, in static mode (simple HTML pages)
   and 5 MB of RAM in dynamic mode (HTML pages generated from per, php,
   ...) per user. The disk space needed is function of the nature of the
   server, knowing that most of the consumption comes from images.
   Processor resources used are important, thus it could be useful to
   consider the increase in frequency and the addition of processors,
   because this type of traffic could be quite well done in parallel. We
   will priviledge also the I/O speed with Ultra 2 LVD SCSI at 80 MB/s,
   if the budget allows it, and 10.000 RPM disks.

   Table 4-3. Sizing of a static Web server
   Simultaneous users RAM size Disk size Machine example
   1 - 100 256 Mo 9 Go E60
   100 - 500 1 Go 9 Go LC2000 Bi-processeur
   500 - 1000 2 Go 9 Go LH4 Quadri-processeurs

   Table 4-4. Sizing of a dynamic Web server
   Simultaneous users RAM size Disk size Machine example
   1 - 100 512 Mo 9 Go E60
   100 - 500 2 Go 9 Go LC2000 Bi-processeur
   500 - 1000 4 Go 18 Go LH6000 Quadri-processeur
     _________________________________________________________________

Mail Server

   Generally, this machine is used as both SMTP (sending and reception of
   messages) and POP server (keeper of messages and manager of client
   accesses). The SMTP Mail service uses 2 MB of RAM per user. The POP
   Mail service uses 2 MB of RAM per user. The disk space needed becomes
   more and more important as long as attachments (images, various
   documents) take the greatest place in exchanges via e-mail. We
   consider in that case that an average mail box size is 50 MB.
   Processor resources used are important, thus it could be useful to
   consider the increase in frequency and the addition of processors,
   because this type of traffic could be quite well done in parallel.

   Table 4-5. Sizing of an e-mail server
   Simultaneous users RAM size Disk size Machine example
   1 - 100 400 Mo 9 Go E60
   100 - 500 2 Go 27 Go LC2000 Bi-processeur
   500 - 1000 4 Go 54 Go LH6000 Quadri-processeur
     _________________________________________________________________

Firewall/Proxy/Web-Cache server

   Generally, this machine is both a Firewall server, a proxy (in both
   directions) and a cache for the Web because all requests go through
   it. The Firewall service uses 1 MB of RAM. The Proxy service uses 0.3
   MB per incoming relay. The Web cache service uses 0.5 MB per user. The
   disk space needed is function of the parameters of the cache Web
   server. In that case, we consider 20 MB per user. Processor resources
   used are important, due to the analysis of IP packets. Thus it could
   be useful to consider the increase in frequency.

   Table 4-6. Sizing of a Firewall/Proxy/Web-Cache server
   Simultaneous users RAM size Disk size Machine example
   1 - 100 128 Mo 9 Go E60
   100 - 500 512 Mo 18 Go E60
   500 - 1000 1 Go 27 Go E60
     _________________________________________________________________

Linux as computing server

   Generally, this machine is extremely stressed, mainly on the processor
   and RAM aspects. Sometimes this is combined with intensive I/O needs.
   We thus equip such a machine with high-end processors (nowadays
   Pentium III Xeon) with the greatest level 2 cache possible (nowadays 2
   MB). In RAM, we would tend to reach the maximum possible, thus 4 GB.
   For this type of server, we should adapt the swap such as it covers
   all the needs in memory required by the computing codes to execute.
   There is often no specific constraint on network performances, except
   in case of a computing cluster, in which case we may consider to equip
   the machines with 100 Mb/s cards with a switch between them, even with
   Myrinet or Gigabit products. Typically, an LH4 2*PIII 550MHz 1
   GB/2*9GB is the target of this type of server. The choice is extremely
   variable depending on the nature of the computation to do. We should
   underline that there are processors, such as PA-Risc, much more
   performant in floating point computation than today Intel processors
   (up to 6 times).
     _________________________________________________________________

Linux as an office server

   This kind of server is for the moment rare in the free software world.
   It's more frequent in Microsoft world, by association with
   [538]Metaframe solutions of [539]Citrix. An office server needs 50 MB
   of RAM per user. Intrinsically, this machine has no requirements in
   term of disk, if it's not at the same time a file server. Processor
   resources used are important, thus it could be useful to consider the
   increase in frequency and the addition of processors, because this
   type of traffic could be quite well done in parallel.

   Table 4-7. Sizing of an office server
   Simultaneous users RAM size Disk size Machine example
   1 - 10 512 Mo 9 Go E60
   10 - 50 2 Go 9 Go LH4 Bi-processeurs
   50 - 100 4 Go 18 Go LH6000 Quadri-processeurs
     _________________________________________________________________

Chapter 5. Frequently Asked Questions (FAQ)

   "How to have more than 1 GB of RAM on my NetServer ?"
          The following informations are adapted from the [540]page of
          Rik van Riel. They concern 2.0.x as well as 2.2.x kernels.

          First of all, the IA32 Intel architecture is limited by
          construction in its memory management to 4 GB. Space which
          should be divided into virtual memory and physical memory.
          Which means that if you choose to recognize more RAM, the
          maximum size for a program decreases.

          But Linux can't manage more than 1 GB by default. To go above
          that, in fact up to 2 GB today, because Linux can't manage more
          memory for the moment, you need to modify 2 files provided with
          kernel sources and recompile it. Those 2 sources are
          /usr/src/linux/include/asm-i386/page.h and
          /usr/src/linux/arch/i386/vmlinux.lds.

          From 2.0.37 and 2.2.12 kernels on, the patch was integrated in
          the kernel and may be activated when doing a make config.

          The maximum Ram managed in the i386 version was ported to 64 GB
          after 2.3.23.

   "How to have more than 128 MB of swap on my NetServer ?"
          Up to the version 2.8x of the util-linux package, the mkswap
          command could create swap partitions only up to 128 MB maximum.
          You then had to create as much partitions as necessary. Till
          the 2.9 version, included in standard in RedHat 6.0 and
          following distributions, it's possible to create directly swap
          partitions up to 1 GB.

   "How to use the other procesors of my NetServer ?"
          Multi-processing is supported by Linux operationnaly till the
          2.0 version of the kernel. For a 2.0.x kernel, you have to
          recompile it and set up the SMP variable in the Makefile to 1.
          For a 2.2.x kernel, you have to set it up during the make
          config. For more details, please consult the [541]SMP-HOWTO.

   "Is Linux Y2K compatible ?"
          Generally, Linux is Y2K compatible. For more informations
          please consult the [542]FAQ.
     _________________________________________________________________

Chapter 6. References

   I already mentioned the documentation files, installed typically under
   the directory /usr/src/linux/Documentation. They are a real gold mine
   of useful informations.

   The following FAQ (Frequently Asked Questions) are periodically posted
   in the group news:news.answers and archived on FTP servers like
   ftp://rtfm.mit.edu :

     * FAQ of the group news:comp.os.linux.announce
     * FAQ of the group news:comp.sys.hp.hpux

   A lot of other Linux HOWTO contain informations useful in link with
   our subject :

     * [543]Linux SCSI HOWTO
     * [544]Linux CD-Writing HOWTO
     * [545]Linux Hardware HOWTO
     * [546]Linux Distribution HOWTO
     * [547]Linux Kernel HOWTO
     * [548]Linux Sound HOWTO

   The following Usenet groups cover subjects linked to HP :

     * news:comp.sys.hp.hardware
     * news:comp.sys.hp.misc

   You may also consult the groups mentioned in [549]the section called
   Service argumentation in Chapter 2.

   On Internet, you may consult with a great benefit the following sites
   :

   Table 6-1. Web sites ofMedasys and HP
   Subject URL
   HP Linux Portal http://www.hp.com/go/linux
   HP and Linux http://www.hp-linux.org
   HP France Education Linux
   http://hpwww.ec-lyon.fr/hpeduc/education/offre/linux
   Medasys Linux http://www.medasys-digital-systems.fr/linux
   HP Support http://www.hp.com/pressrel/apr99/20apr99a.htm
   HP HOWTO
   http://www.medasys-digital-systems.fr/linux/HP-Howto/HP-HOWTO-EN/index
   .html
   Linux Pa-Risc (Puffin Group)
   http://thepuffingroup.com/parisc/software.html
   Linux IA64 http://www.linuxia64.org
   Linux IA64 (HP Labs)
   http://dtf.external.hp.com/dtf/swdev/1999/08/feature1_a.html
   HP RedHat certification
   http://bugzilla.redhat.com/certification/cert-report.php3?mod_company=
   Hewlett+Packard
   HP Utigroup http://www.hputigroup.com

   Table 6-2. Other fundamental sites on Linux and Open Source Software
   Subject URL
   Linux Weekly News - Summary of 1998
   http://lwn.net/1999/features/1998timeline/
   Linux Weekly News - Summary of 1999
   http://lwn.net/1999/features/Timeline/
   IOS Counter http://www.leb.net/hzo/ioscount/index.html
   Comparaison MS-Windows NT Server 4.0 -- Unix
   http://www.linux-france.com/article/these/unix-vs-nt/unix-vs-nt.html
   Netcraft studies http://www.netcraft.com/survey/
   L'AFUL (Association) http://www.aful.org
   APRIL (Association) http://www.april.org
   Linux Center http://www.linux-center.org
   Linux France http://www.linux-france.com/
   Linux Journal http://www.linuxjournal.com
   Linux Gazette http://www.linuxgazette.com/
   Linux Magazine France http://www.linuxmag-france.com/
   Linux Start http://linuxstart.com/index.html
   Da Linux French Page http://linuxfr.org/news/
   RedHat Hardware support http://www.redhat.com/cgi-bin/support
   Source Exchange http://www.sourcexchange.com/
     _________________________________________________________________

Chapter 7. Contributors

   I would like to thank especially all the people who contributed in any
   way to improve this HOWTO :

     * Pierre-Antoine Angelini <[550]angelini@ifsic.univ-rennes1.fr>
     * Stphane Bortzmeyer <[551]bortzmeyer@debian.org>
     * Jean-Bernard Chaffardon <[552]Jean-Bernard_Chaffardon@hp.com>
     * Khalil Chawoshi <[553]chawoshi@subatech.in2p3.fr>
     * Batrice Cornec <[554]beatrice@victoria.frmug.org>
     * Frdric Dubuy <[555]Frederic.Dubuy@medasys-digital-systems.fr>
     * Mark Eve <[556]Mark_Eve@hp.com>
     * Laurent Frey <[557]laurent.frey@iota.u-psud.fr>
     * Stein Roar Gjen <[558]stein.roar.gjoen@ks-t.no>
     * Yann Guillemot <[559]Yann.Guillemot@medasys-digital-systems.fr>
     * Marc Hia Bali <[560]Marc_Hia-Balie@hp.com>
     * Chris Holden <[561]chris.holden@gte.net>
     * Masanari Iida <[562]Masanari_Iida@hp.com>
     * Pascal Lemonnier
       <[563]Pascal.Lemonnier@medasys-digital-systems.fr>
     * Maciej Macowicz <[564]Maciej.Macowicz@epfl.ch>
     * Olivier Martinet <[565]Olivier_Martinet@hp.com>
     * David Mentr <[566]David.Mentre@irisa.fr>
     * Andreas Nierula <[567]A.Nierula@t-online.de>
     * Gilles Noisette <[568]Gilles_Noisette@hp.com>
     * Harry Page <[569]HARRY_PAGE@HP-NewZealand-om1.om.hp.com>
     * Alain Pascal <[570]pascal@montrouge.omnes.slb.com>
     * Fons Rademakers <[571]Fons.Rademakers@cern.ch> - his site :
       http://hp-linux.cern.ch
     * Dirk De Wachter<[572]Dirk.DeWachter@rug.ac.be>
     * Norman Walsh<[573]ndw@nwalsh.com>
     _________________________________________________________________

Chapter 8. Future versions

   This chapter gives indications on elements which should be taken in
   account in future versions of this document. It should be taken more
   as a reminder for the author, than as an engagement of what he will
   really do !

   Version 0.89
          URLs verification in function of the language. Use of official
          addresses and paragraph on mirrors.

          Report of headers and footers on following pages (PS).

          Better management of the size of tables (PS).

          Place of the footer (PS).

          One line paragraph management.

          Management of the size of papers, margins and images (PS).

          Revision of the version number (PS and HTML).

          Paragraph on Kayak Maxilife.

          Paragraph on Kayak Sound

          Paragraph on TX management

          Rethink the copyright in front of the LDP one and becoming an
          official HOWTO.

          Rework chapter 1 (put there history and new versions)

   Version 0.90
          Rework the cluster part

          Paragraph on APM for portables

          Rework the printer paragraph

          Linux as a backup server (Arkeia)

          Remote Assistant - Remote Control. Management

          Glossary/Abbreviations

          Rework the example of the vaccine :-)

          Put the Argumementations in the TOC (HTML).

          Avoid titles in end of page (PS).

          Detail limitations of evolution from Unix to Linux

          Paragraph on HP as a free software user

   Version 0.91
          Paragraph on network products

          Paragraph on scanners

          Management of the date with wml

References

   Visible links
   1. http://www.hp.com/
   2. http://www.medasys-digital-systems.fr/
   3. http://www.hp.com/
   4. http://pauillac.inria.fr/~lang/licence/v1/fddl.html
   5. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#INTRODUCTION
   6. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN59
   7. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN70
   8. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN82
   9. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#REMERCIEMENTS
  10. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#PRESENTATION
  11. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN156
  12. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN159
  13. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN182
  14. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN191
  15. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN217
  16. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN220
  17. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#CHOIX
  18. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN419
  19. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN472
  20. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN484
  21. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN487
  22. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN495
  23. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN498
  24. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#LINUXHP
  25. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN507
  26. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN509
  27. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN524
  28. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN594
  29. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN597
  30. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3165
  31. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3370
  32. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3379
  33. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3385
  34. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3431
  35. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3434
  36. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3474
  37. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3482
  38. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3501
  39. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#SIZING
  40. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3543
  41. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3545
  42. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3577
  43. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3609
  44. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3611
  45. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3672
  46. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3704
  47. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3736
  48. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AEN3739
  49. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FAQ
  50. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#REFERENCES
  51. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#CONTRIBUTEURS
  52. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#TODO
  53. http://www.hp.com/
  54. http://www.medasys-digital-systems.fr/
  55. http://www.hp.com/
  56. http://www.medasys-digital-systems.fr/
  57. http://www.hp.com/
  58. http://www.medasys-digital-systems.fr/
  59. http://www.hp.com/
  60. mailto:Bruno.Cornec@medasys-digital-systems.fr
  61. mailto:guylhem@rrremovethis.oeil.qc.ca
  62. http://hpux.cict.fr/
  63. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#CONTRIBUTEURS
  64. mailto:Marc_Hia-Balie@hp.com
  65. http://www.cs.helsinki.fi/~torvalds/
  66. http://www.gnu.org/people/rms.html
  67. mailto:nat@nataa.frmug.org
  68. mailto:xc@itp.fr
  69. mailto:dumas@Linux.EU.Org
  70. mailto:Remy.Card@linux.org
  71. mailto:Dany.Coffineau@alcatel.fr
  72. mailto:Francois.Strobel@alcatel.fr
  73. mailto:Frederic.Dubuy@medasys-digital-systems.fr
  74. mailto:pascal@montrouge.omnes.slb.com
  75. mailto:Pascal.Lemonnier@medasys-digital-systems.fr
  76. mailto:rse@engelschall.com
  77. http://www.engelschall.com/sw/wml
  78. mailto:cg@sgmltools.org
  79. http://www.sgmltools.org/
  80. mailto:ndw@nwalsh.com
  81. http://www.docbook.org/
  82. mailto:jjc@jclark.com
  83. http://www.jclark.com/jade/
  84. mailto:cornec@victoria.frmug.org
  85. http://www.gnu.org/
  86. http://www.opensource.org/
  87. http://www.freebsd.org/
  88. http://www.apache.org/
  89. http://www.samba.org/
  90. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#CHOIX
  91. http://www.cs.helsinki.fi/~torvalds/
  92. http://www.gnu.org/people/rms.html
  93. http://www.tuxedo.org/~esr
  94. http://kiev.wall.org/~larry
  95. mailto:ask_tim@oreilly.com
  96. http://www.apache.org/
  97. http://www.zdnet.com/sr/stories/news/0,4538,2196106,00.html
  98. http://www.samba.org/
  99. http://gartner6.gartnerweb.com/dq/static/about/press/pr-b9939.html
 100. http://www.netcraft.com/survey/
 101. http://www.leb.net/hzo/ioscount/index.html
 102. http://www.apache.org/
 103. http://www.apache.org/
 104. http://www.landfield.com/wu-ftpd
 105. http://www.isc.org/bind.html
 106. http://www.sendmail.org/
 107. http://www.postfix.org/
 108. http://www.isc.org/inn.html
 109. http://juanjox.linuxhq.com/
 110. http://www.rustcorp.com/linux/ipchains/
 111. http://www.openssh.com/
 112. http://squid.nlanr.net/Squid/
 113. http://www.eecis.udel.edu/~ntp
 114. ftp://ftp.medasys-digital-systems.fr/pub/doc/IETF/rfc
 115. ftp://ftp.mathematik.th-darmstadt.de/pub/linux/okir
 116. ftp://ftp.kernel.org/pub/linux/devel/gcc/
 117. http://www.coda.cs.cmu.edu/
 118. http://www.samba.org/
 119. http://www.umich.edu/~rsug/netatalk
 120. http://www.irisa.fr/prive/mentre/smp-faq/
 121. http://hp-linux.cern.ch/
 122. http://cesdis.gsfc.nasa.gov/linux/drivers/index.html#gigabit
 123. http://lhpca.univ-lyon1.fr/myri.html
 124. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NETRAID
 125. http://www.hylafax.org/
 126. http://www.arkeia.com/
 127. http://www.postgreSQL.org/
 128. http://www.mysql.org/
 129. http://platforms.oracle.com/linux/index_lin.htm
 130. ftp://ftp.netscape.com/pub/communicator/
 131. http://www.cc.ukans.edu/about_lynx/about_lynx.html
 132. http://www.geocities.com/SiliconValley/6702/kmail.html
 133. http://burka.netvision.net.il/xfmail/xfmail.html
 134. http://www.mutt.org/
 135. ftp://ftp.uu.net/networking/mail/elm
 136. http://www.adobe.com/supportservice/custsupport/LIBRARY/acrunix.htm
 137. http://www.foolabs.com/xpdf/
 138. http://www.wizards.dupont.com/cristy/ImageMagick.html
 139. http://www.gimp.org/
 140. http://www.real.com/products/player/downloadrealplayer.html?wp=dl0899&src=dlbutton_all%E2%8C%A9=en#form
 141. http://www.lyx.org/
 142. http://www.latex-project.org/
 143. http://www.sgmltools.org/
 144. http://linux.corel.com/linuxproducts_wp8.htm
 145. http://www.applix.com/applixware/linux/main.cfm
 146. http://www.stardivision.com/office/so5linux_body.html
 147. ftp://ftp.medasys-digital-systems.fr/pub/linux/sunsite/apps/sound/players/wavtools-1.3.2.tar.gz
 148. http://www.ueda.info.waseda.ac.jp/%7Esatoshi/midi/midi-e.html
 149. http://metalab.unc.edu/tkan/xmcd
 150. http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
 151. http://sunsite.auc.dk/BurnIT/
 152. http://www.ge.ucl.ac.uk/~jcpearso/mkisofs.html
 153. http://www.xiph.org/paranoia/
 154. http://www.winehq.com/
 155. http://www.ardi.com/
 156. http://www.calderasystems.com/doc/wabi/wabi.html
 157. http://www.dosemu.org/
 158. http://www.gnu.org/software/gcc/gcc.html
 159. http://www.gnu.org/software/gcc/gcc.html
 160. http://agnes.dida.physik.uni-essen.de/~gnu-pascal/
 161. http://www.gnu.org/software/fortran/fortran.html
 162. ftp://ftp.medasys-digital-systems.fr/pub/linux/sunsite/devel/lang/basic/qb2c-3.2k.tar.gz
 163. http://www.scriptics.com/products/tcltk/
 164. http://www.perl.com/
 165. http://www.python.org/
 166. http://www.adahome.com/Resources/Compilers/GNAT.html
 167. http://www.loria.fr/projets/SmallEiffel/
 168. http://clisp.cons.org/~haible/clisp.html
 169. http://www.scheme.org/
 170. http://www.gnu.org/software/prolog/prolog.html
 171. http://www.pgroup.com/prod_description.html
 172. http://www.gnome.org/
 173. http://www.kde.org/
 174. http://www.opengroup.org/desktop/
 175. http://www.sgmltools.org/
 176. http://www.jclark.com/jade
 177. http://www.oasis-open.org/docbook/
 178. http://www.redhat.com/
 179. http://www.medasys-digital-systems.fr/
 180. http://www.atrid.fr/
 181. http://www.alcove.fr/
 182. http://www.france.hp.com/formation
 183. http://www.learningtree.com/fr/index.htm
 184. http://form-continue.iut-velizy.uvsq.fr/
 185. http://www.linuxdoc.org/
 186. http://www.medasys-digital-systems.fr/mirror/linux/french/ldp
 187. http://www.editions-oreilly.fr/
 188. http://www.ssc.com/
 189. http://www.microsoft.com/HCL
 190. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/Hardware-HOWTO.html
 191. http://www.medasys-digital-systems.fr/linux/HP-Howto/HP-HOWTO-EN/hp-hardware.html
 192. http://www.voila.fr/
 193. http://www.deja.com/
 194. ftp://ftp.cdrom.com/
 195. http://www.redhat.com/
 196. http://www.suse.de/
 197. http://www.slackware.com/
 198. http://www.linux-mandrake.com/
 199. http://www.turbolinux.com/
 200. http://www.debian.org/
 201. http://unix-vs-nt.org/kirch/
 202. mailto:Jacques_Misselis@hp.com
 203. http://www.ec-lyon.fr/
 204. http://www.medasys-digital-systems.fr/
 205. http://www.medasys-digital-systems.fr/linux/HP-Howto/mirror/white-paper.pdf
 206. http://www.li.org/
 207. http://www.medasys-digital-systems.fr/
 208. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/Installation-HOWTO.html
 209. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/Kernel-HOWTO.html
 210. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 211. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 212. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 213. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 214. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 215. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#G100
 216. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 217. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 218. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 219. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BAX
 220. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 221. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BAX
 222. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 223. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#I810
 224. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 225. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 226. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 227. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 228. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 229. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 230. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 231. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 232. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3COM
 233. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 234. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 235. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#G100
 236. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 237. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 238. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#G100
 239. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 240. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3COM
 241. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 242. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 243. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 244. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 245. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 246. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3COM
 247. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 248. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 249. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 250. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3COM
 251. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 252. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 253. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 254. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 255. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#CL5465
 256. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 257. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 258. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#CL5465
 259. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 260. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 261. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#G100
 262. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 263. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 264. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#G100
 265. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 266. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3COM
 267. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 268. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 269. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#G100
 270. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 271. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3COM
 272. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 273. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 274. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 275. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 276. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 277. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3COM
 278. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 279. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 280. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 281. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3COM
 282. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 283. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 284. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 285. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 286. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#COPER
 287. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#COPER
 288. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 289. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#COPER
 290. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 291. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 292. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 293. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 294. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#CL5465
 295. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 296. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#CL5465
 297. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 298. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#CL5465
 299. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 300. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 301. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 302. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 303. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 304. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 305. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#ELSA
 306. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 307. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 308. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 309. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 310. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#ELSA
 311. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 312. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 313. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 314. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 315. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 316. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 317. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#G100
 318. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 319. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 320. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#G100
 321. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 322. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 323. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 324. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 325. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 326. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 327. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 328. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 329. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 330. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 331. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#ELSA
 332. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 333. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 334. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 335. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 336. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 337. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 338. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 339. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 340. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 341. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#G100
 342. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 343. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 344. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 345. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 346. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 347. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 348. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 349. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AD1816
 350. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MODDOS
 351. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 352. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 353. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 354. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 355. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 356. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 357. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 358. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 359. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 360. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AD1816
 361. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 362. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 363. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#ELSA
 364. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 365. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 366. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 367. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 368. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 369. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#G100
 370. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 371. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 372. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 373. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MIXTE1
 374. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XU800
 375. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XU800
 376. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 377. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XU800
 378. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#MODDOS
 379. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 380. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XU800
 381. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 382. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XU800
 383. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 384. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 385. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XU800
 386. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 387. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 388. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XU800
 389. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 390. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 391. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 392. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#ELSA
 393. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 394. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 395. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 396. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 397. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 398. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 399. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 400. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 401. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 402. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 403. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 404. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 405. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#FBDEV
 406. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 407. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#ELSA
 408. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 409. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AD1816
 410. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 411. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 412. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AD1816
 413. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 414. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 415. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AD1816
 416. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 417. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#ELSA
 418. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 419. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AD1816
 420. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 421. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 422. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AD1816
 423. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 424. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#ELSA
 425. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 426. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AD1816
 427. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 428. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#AD1816
 429. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3COM
 430. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 431. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#C3C59X
 432. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 433. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 434. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 435. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 436. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#LYNXE
 437. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 438. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#LYNXE
 439. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 440. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 441. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 442. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 443. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 444. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 445. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 446. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 447. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 448. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 449. http://www.redhat.com/
 450. http://www.medasys-digital-systems.fr/linux/HP-Howto/mirror/netserver-rh5.2.pdf
 451. http://www.medasys-digital-systems.fr/linux/HP-Howto/mirror/netserver-rh6.0.pdf
 452. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 453. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 454. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 455. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 456. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 457. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 458. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 459. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#COPER
 460. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#LC2000
 461. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 462. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 463. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 464. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 465. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 466. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 467. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NETRAID
 468. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 469. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 470. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 471. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NETRAID
 472. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 473. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NETRAID
 474. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#LH4
 475. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 476. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 477. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 478. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NETRAID
 479. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#LH6000
 480. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 481. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#BX
 482. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 483. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 484. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#CLUSTER
 485. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 486. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 487. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 488. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 489. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 490. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#XFREE86
 491. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NCR53C8XX
 492. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NETRAID
 493. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NETRAID
 494. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NETRAID
 495. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#NETRAID
 496. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/Hardware-HOWTO.html
 497. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/Ethernet-HOWTO.html
 498. http://www.xfree86.org/3.3.6/index.html
 499. http://www.xfree86.org/cardlist.html
 500. http://www.suse.de/XSuSE/XSuSE_E/index.html
 501. ftp://ftp.medasys-digital-systems.fr/pub/linux/XSuSE/config/xsuseconfig.tgz
 502. http://www.redhat.com/
 503. http://www.xig.com/
 504. http://www.metrolink.com/
 505. ftp://ftp.medasys-digital-systems.fr/pub/unix/XFree86/3.3.6
 506. ftp://ftp.tux.org/pub/roudier
 507. ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/test/3c59x.c
 508. http://www.student.informatik.tu-darmstadt.de/~tek/projects/linux.html
 509. mailto:Frederic.Dubuy@medasys-digital-systems.fr
 510. mailto:a-m.mahfouf@lineone.net
 511. ftp://download.intel.com/support/graphics/intel810/xfcom-i810-glibc2.1-1.0.0-rh60.i386.rpm
 512. ftp://download.intel.com/support/graphics/intel810/xfcom-i810-glibc2.1-1.0.0.tar.gz
 513. ftp://download.intel.com/support/graphics/intel810/i810gtt-0.1-5.src.rpm
 514. ftp://download.intel.com/support/graphics/intel810/i810gtt-0.1-5.src.tar.gz
 515. ftp://ftp.medasys-digital-systems.fr/pub/linux/kernel
 516. http://www.elsa.de/EUROPE/PRODUCTS/CAD/SPECS/GLO_SYN.HTM
 517. http://www.sgi.com/software/opengl
 518. http://www.mesa3d.org/
 519. http://www.rsi.co.uk/products/rsf/rsf-linux.html
 520. http://www.henge.com/~alanr/ha
 521. ftp://ftp.medasys-digital-systems.fr/pub/linux/ext3
 522. http://www.ami.com/
 523. ftp://ftp.medasys-digital-systems.fr/pub/linux/mds/redhat/images/lh3.img
 524. http://www.thepuffingroup.com/
 525. http://www.thepuffingroup.com/parisc
 526. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/mini/IP-Alias.html
 527. http://www.samba.org/
 528. http://www.umich.edu/~rsug/netatalk
 529. http://www.samba.org/
 530. http://www.samba.org/
 531. http://www.cs.wisc.edu/~ghost
 532. http://www.cygnus.com/
 533. http://www.hp.com/ssg/linux
 534. http://www.medasys-digital-systems.fr/
 535. mailto:Cedric.Letailleur@medasys-digital-systems.fr
 536. http://www.alcove.fr/
 537. mailto:lucien.petit@alcove.fr
 538. http://www.citrix.com/products/metaframe.asp
 539. http://www.citrix.com/
 540. http://humbolt.geo.uu.nl/Linux-MM/more_than_1GB.html
 541. http://www.irisa.fr/prive/mentre/smp-howto
 542. http://www.linux.org/help/beginner/year2000.html
 543. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/SCSI-HOWTO.html
 544. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/CD-Writing-HOWTO.html
 545. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/Hardware-HOWTO.html
 546. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/Distribution-HOWTO.html
 547. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/Kernel-HOWTO.html
 548. http://www.medasys-digital-systems.fr/mirror/linux/LDP/HOWTO/Sound-HOWTO.html
 549. file://localhost/export/sunsite/users/gferg/howto/00HP-HOWTO.html#SERVICE
 550. mailto:angelini@ifsic.univ-rennes1.fr
 551. mailto:bortzmeyer@debian.org
 552. mailto:Jean-Bernard_Chaffardon@hp.com
 553. mailto:chawoshi@subatech.in2p3.fr
 554. mailto:beatrice@victoria.frmug.org
 555. mailto:Frederic.Dubuy@medasys-digital-systems.fr
 556. mailto:Mark_Eve@hp.com
 557. mailto:laurent.frey@iota.u-psud.fr
 558. mailto:stein.roar.gjoen@ks-t.no
 559. mailto:Yann.Guillemot@medasys-digital-systems.fr
 560. mailto:Marc_Hia-Balie@hp.com
 561. mailto:chris.holden@gte.net
 562. mailto:Masanari_Iida@hp.com
 563. mailto:Pascal.Lemonnier@medasys-digital-systems.fr
 564. mailto:Maciej.Macowicz@epfl.ch
 565. mailto:Olivier_Martinet@hp.com
 566. mailto:David.Mentre@irisa.fr
 567. mailto:A.Nierula@t-online.de
 568. mailto:Gilles_Noisette@hp.com
 569. mailto:HARRY_PAGE@HP-NewZealand-om1.om.hp.com
 570. mailto:pascal@montrouge.omnes.slb.com
 571. mailto:Fons.Rademakers@cern.ch
 572. mailto:Dirk.DeWachter@rug.ac.be
 573. mailto:ndw@nwalsh.com

   Hidden links:
 574. http://www5.zdnet.com/products/content/pcmg/1709/305867.html
  Linux Hardware Compatibility HOWTO
  Patrick Reijnen, <antispam.hardware_howto@antispam.reij-
  nen.nl.com (remove both "antispam.")>
  v99.3, 28 September 1999

  This document lists most of the hardware supported by Linux and helps
  you locate any necessary drivers.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Welcome
     1.2 Copyright
     1.3 System architectures

  2. Computers/Motherboards/BIOS

     2.1 Specific system/motherboard/BIOS
     2.2 Unsupported

  3. Laptops

     3.1 Specific laptops
     3.2 PCMCIA

  4. CPU/FPU

  5. Memory

  6. Video cards

     6.1 Diamond video cards
     6.2 SVGALIB (graphics for console)
     6.3 XFree86 3.3.2
        6.3.1 Accelerated
        6.3.2 Unaccelerated
        6.3.3 Monochrome
        6.3.4 Alpha, Beta drivers
     6.4 S.u.S.E. X-Server
     6.5 Commercial X servers
        6.5.1 Xi Graphics, Inc
        6.5.2 Metro-X 4.3.0

  7. Controllers (hard drive)

     7.1 Alpha, Beta drivers

  8. Controllers (hard drive RAID)

  9. Controllers (SCSI)

     9.1 Supported
     9.2 Alpha, Beta drivers
     9.3 Unsupported

  10. Controllers (I/O)

  11. Controllers (multiport)

     11.1 Non-intelligent cards
        11.1.1 Supported
     11.2 Intelligent cards
        11.2.1 Supported
        11.2.2 Alpha, Beta drivers

  12. Network adapters

     12.1 Supported
        12.1.1 Ethernet
        12.1.2 ISDN
        12.1.3 Frame Relay
        12.1.4 Wireless
        12.1.5 X25
        12.1.6 Pocket and portable adapters
        12.1.7 Slotless
        12.1.8 ARCnet
        12.1.9 TokenRing Take a look at the token ring web site
        12.1.10 FDDI
        12.1.11 Amateur radio (AX.25)
        12.1.12 PCMCIA cards
     12.2 Alpha, Beta drivers
        12.2.1 Ethernet
        12.2.2 ISDN
        12.2.3 ATM
        12.2.4 Frame Relay
        12.2.5 Wireless
     12.3 Unsupported

  13. Sound cards

     13.1 Supported
     13.2 Alpha, Beta drivers
     13.3 Unsupported

  14. Hard drives

     14.1 Unsupported

  15. Tape drives

     15.1 Supported
     15.2 Alpha, Beta drivers
     15.3 Unsupported

  16. CD-ROM drives

     16.1 Supported
     16.2 Alpha, Beta drivers
     16.3 Notes

  17. CD-Writers

  18. Removable drives

  19. Mice

     19.1 Supported
     19.2 Alpha, Beta drivers
     19.3 Notes

  20. Modems

  21. Printers/Plotters

     21.1 Ghostscript
        21.1.1 Ghostscript 5.1 supported printers
        21.1.2 Alpha, Beta drivers

  22. Scanners

     22.1 Supported
     22.2 Alpha, Beta drivers
     22.3 Unsupported

  23. Other hardware

     23.1 Amateur Radio
     23.2 VESA Power Savings Protocol (DPMS) monitors
     23.3 Touch screens
     23.4 Terminals on serial port
     23.5 Joysticks
     23.6 Video capture boards / Frame Grabbers / TV tuner
     23.7 Digital Camera
        23.7.1 Supported
        23.7.2 Unsupported
     23.8 UPS
     23.9 Multifunction boards
     23.10 Data acquisition
     23.11 Watchdog timer interfaces
     23.12 Miscellaneous

  24. Related sources of information

  25. Acknowledgments

  26. Appendix A. S3 cards supported by XFree86 3.3.x.

  27. Appendix B. Supported PCMCIA cards

     27.1 Ethernet cards
     27.2 Fast Ethernet (10/100baseT) adapters
     27.3 Token-ring adapters
     27.4 Wireless network adapters
     27.5 ISDN
     27.6 Modem and serial cards
     27.7 Memory cards
     27.8 SCSI adapters
     27.9 ATA/IDE CD-ROM adapters
     27.10 Multifunction cards
     27.11 ATA/IDE card drives
     27.12 ATA/IDE Interface Cards
     27.13 Parallel port cards:
     27.14 Miscellaneous cards
     27.15 Working on ...
     27.16 Unsupported

  28. Appendix C. Supported Parallel Port devices

     28.1 Ethernet
     28.2 Hard drives
     28.3 Tape drives
     28.4 CD-ROM drives
     28.5 Removable drives
     28.6 IDE Adapter
     28.7 SCSI Adapters
     28.8 Digital Camera
     28.9 PCMCIA parallel port cards

  29. Appendix D. Plug and Play devices

  30. Appendix E. Linux incompatible Hardware

  31. Glossary



  ______________________________________________________________________

  1.  Introduction


  NOTE: USB is not yet supported by Linux.



  1.1.  Welcome

  Welcome to the Linux Hardware Compatibility HOWTO. This document lists
  most of the hardware components (not computers with components build
  in) supported by Linux, so reading through this document you can
  choose the components for your own Linux computer. As the list of
  components supported by Linux is growing rapidly, this document will
  never be complete. So, when components are not mentioned in this
  HOWTO, the only reason will be that I don't know they are supported. I
  simply have not found support for the component and/or nobody has told
  me about support.

  Subsections titled 'Alpha, Beta drivers' list hardware with alpha or
  beta drivers in varying degrees of usability. Note that some drivers
  only exist in alpha kernels, so if you see something listed as
  supported but isn't in your version of the Linux kernel, upgrade.

  Some devices are supported by binary-only modules; avoid these when
  you can. Binary-only modules are modules which are compiled for ONE
  kernel version. The source code for these modules has NOT been
  released. This may prevent you from upgrading or maintaining your
  system.
  Linus Torvalds says "I allow binary-only modules, but I want people to
  know that they are _only_ ever expected to work on the one version of
  the kernel that they were compiled for"
  See  <http://www.kt.opensrc.org/kt19990211_5.html#10> for information
  on source code availability of components.

  The latest version of this document can be found on
  <http://users.bart.nl/~patrickr/hardware-howto/Hardware-HOWTO.html>,
  SunSite and all the usual mirror sites. Translations of this and other
  Linux HOWTO's can be found at
  <http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations> and
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations>.

  If you know of any Linux hardware (in)compatibilities not listed here
  please let me know, just send mail.

  Still need some help selecting components after reading this document?
  Check the "Build Your Own PC" site at  <http://www.verinet.com/pc/>.

  Want to have a preconfigured Linux system? Have a look at
  <http://www.linuxresources.com/web/>.


  1.2.  Copyright

  Copyright 1997, 1998, 1999 Patrick Reijnen

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free software Foundation; either version 2 of the
  license, or (at your option) any later version.

  This document is distributed in the hope that it will be useful, but
  without any warranty; without even the implied warranty of
  merchantability or fitness for a particular purpose. See the GNU
  General Public License for more details.  You can obtain a copy of the
  GNU General Public License by writing to the Free Software
  Foundation,, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  If you use this or any other Linux HOWTO's in a commercial
  distribution, it would be nice to send the authors a complimentary
  copy of your product.


  1.3.  System architectures

  This document only deals with Linux for Intel platforms, for other
  platforms check the following:

  o  ARM Linux
     <http://www.arm.uk.linux.org/>

  o  Linux/68k
     <http://www.clark.net/pub/lawrencc/linux/index.html>

  o  Linux/8086 (The Embeddable Linux Kernel Subset)
     <http://www.linux.org.uk/ELKS-Home/index.html>

  o  Linux/Alpha
     <http://www.azstarnet.com/~axplinux/>

  o  Linux/MIPS
     <http://www.linux.sgi.com>

  o  Linux/PowerPC
     <http://www.linuxppc.org/>

  o  Linux for Acorn
     <http://www.ph.kcl.ac.uk/~amb/linux.html>

  o  Linux for PowerMac
     <http://ftp.sunet.se/pub/os/Linux/mklinux/mkarchive/info/index.html>


  2.  Computers/Motherboards/BIOS

  ISA, VLB, EISA, and PCI buses are all supported.



  2.1.  Specific system/motherboard/BIOS


  o  IBM PS/2 MCA systems
     Supported since kernel version 2.0.7, but only for the stable
     kernel releases. For information you can look at the Micro Channel
     Linux Home Page ( <http://www.dgmicro.com/default.htm>). Software
     for MCA systems can be found at
     <ftp://ftp.dgmicro.com/pub/linuxmca>. Information on the MCA SCSI
     subsystem can be found at  <http//www.uni-
     mainz.de/~langm000/linux.html>.

  o  EFA E5TX-AT motherboard has a solvable problem with RedHat Linux
     5.0 and possibly other versions of Linux. It spontaneously reboots
     while probing hardware. To solve, update BIOS to version 1.01. Get
     the BIOS update at
     <http://www.efacorp.com/download/bios/e5tx103.exe>.

  o  The Edom MP080 motherboard needs a BIOS flash for Linux to work.
     Without the BIOS flash Linux will reboot during the hardware scan.
     for the BIOS flash check  <http://www.edom.com/tech/tech.htm> and
     <http://www.edom.com/download>

  o  The Zida 6MLX motherboard with PII Intel LX chipset is mentioned
     only to work with Linux when the PII cache is disabled in BIOS.
     BIOS upgrade does not solve the problem. Symptom is random reboots
     during or shortly after system boot.

  Many new PCI boards are causing a couple of failure messages during
  boot time when "Probing PCI Hardware". The procedure presents the
  folowing message


      Warning : Unknown PCI device (8086:7100).  Please read include/linux/pci.h



  It tells you to read the pci.h file. From this file is the following
  quote


           PROCEDURE TO REPORT NEW PCI DEVICES
      We are trying to collect information on new PCI devices, using
      the standard PCI identification procedure. If some warning is
      displayed at boot time, please report
           - /proc/pci
           - your exact hardware description. Try to find out
             which device is unknown. It may be you mainboard chipset.
             PCI-CPU bridge or PCI-ISA bridge.
           - If you can't find the actual information in your hardware
             booklet, try to read the references of the chip on the board.
           - Send all that to linux-pcisupport@cao-vlsi.ibp.fr,
             and I'll add your device to the list as soon as possible

      BEFORE you send a mail, please check the latest linux releases
      to be sure it has not been recently added.

             Thanks
                   Frederic Potter.



  Normally spoken you motherboard and the unknown PCI devices will
  function correctly.


  2.2.  Unsupported


  o  Supermicro P5MMA with BIOS versions 1.36, 1.37 and 1.4. Linux will
     not boot on this motherboard. A new (beta) release of the BIOS
     which makes Linux boot, is available at
     <ftp.supermicro.com/mma9051.zip>

  o  Supermicro P5MMA98. Linux will not boot on this motherboard. A new
     (beta) release of the BIOS which makes Linux boot, is available at
     <ftp.supermicro.com/a98905.zip>?

  o  DataExpert Corp. ExpertColor TX531 V1.0 motherboard with chipset
     ACER M1531 (Date: 9729, TS6) and ACER M1543 (Date: 9732 TS6) seems
     to present not reproducible segmentations faults, kernel oops and
     kernel hangs under heavy load and tape access. The problem seems to
     be the PCI-bus, respectively the ACER chipset.


  3.  Laptops

  For more information about Linux and laptops, the following site is a
  good starting point.

  o  Linux Laptop Homepage
     <http://www.cs.utexas.edu/users/kharker/linux-laptop/>

  Other information related to laptops can be found at the following
  sites:

  o  Avanced Power Management
     <ftp://ftp.cs.unc.edu/pub/users/faith/linux/>

  o  Notebook battery status
     <ftp://metalab.unc.edu/pub/Linux/system/power/>

  o  non-blinking cursor
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/console/noblink-1.7.tar.gz>

  o  other general info
     <ftp://tsx-11.mit.edu/pub/linux/packages/laptops/>


  3.1.  Specific laptops


  o  Compaq Concerto (pen driver)
     <http://www.cs.nmsu.edu/~pfeiffer/>

  o  Compaq Contura Aero
     <http://domen.uninett.no/~hta/linux/aero-faq.html>

  o  IBM ThinkPad
     <http://peipa.essex.ac.uk/tp-linux/tp-linux.html>

  o  IBM Thinkpad 770 series
     <http://resources.inw.com/linux/thinkpad770>

  o  NEC Versa M and P
     <http://www.santafe.edu:80/~nelson/versa-linux/>

  o  Tadpole P1000
     <http://www.tadpole.com/support-trdi/plans/linux.html>

  o  Tadpole P1000 (another one)

  o  TI TravelMate 4000M
     <ftp://ftp.biomath.jussieu.fr/pub/linux/TM4000M-mini-HOWTO.txt.Z>

  o  TI TravelMate 5100

  o  Toshiba Satellite Pro 400CDT
     <http://terra.mpikg-teltow.mpg.de/~burger/T400CDT-Linux.html>


  3.2.  PCMCIA


  o  PCMCIA
     <http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html>

  PCMCIA drivers currently support all common PCMCIA controllers,
  including Databook TCIC/2, Intel i82365SL, Cirrus PD67xx, and Vadem
  VG-468 chipsets.  Motorola 6AHC05GA controller used in some Hyundai
  laptops is not supported.  See Appendix B for a list of supported
  PCMCIA cards.



  4.  CPU/FPU

  Intel/AMD/Cyrix 386SX/DX/SL/DXL/SLC, 486SX/DX/SL/SX2/DX2/DX4 are
  supported. Intel Pentium, Pentium Pro and Pentium II, Pentium III
  (regular and Xeon versions) ans Celeron also work. AMD K5 and K6 work
  good, although older versions of K6 should be avoided as they are
  buggy. Setting "internal cache" disabled in bios setup can be a
  workaround. AMD K6-2 and K6-3 also work. Some early K6-2 300Mhz have
  problems with the system chips. Cyrix 6x86 works out of the box.

  Also IDT Winchip C6-PSME2006A processors are supported under Linux (
  <http://www.winchip.com>).

  Linux has built-in FPU emulation if you don't have a math coprocessor.

  Experimental SMP (multiple CPU) support is included in kernel 1.3.31
  and newer. Check the Linux/SMP Project page for details and updates.

  o  Linux/SMP Project
     <http://www.linux.org.uk/SMP/title.html>

  Advanced multi-media effects built into the Cyrix MediaGX ar not
  supported.

  A few very early AMD 486DX's may hang in some special situations. All
  current chips should be okay and getting a chip swap for old CPU's
  should not be a problem.

  ULSI Math*Co series has a bug in the FSAVE and FRSTOR instructions
  that causes problems with all protected mode operating systems. Some
  older IIT and Cyrix chips may also have this problem.

  There are problems with TLB flushing in UMC U5S chips in very old
  kernels. (1.1.x)


  o  enable cache on Cyrix processors
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/CxPatch030.tar.z>

  o  Cyrix software cache control
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/linux.cxpatch>

  o  Cyrix 5x86 CPU register settings
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cx5x86mod_1.0c.tgz>


  5.  Memory

  All memory like DRAM, EDO and SDRAM can be used with Linux. There is
  one thing you have to look at: normally the kernel is not supporting
  more than 64 Mb of memory. When you add more than 64 Mb of memory you
  have to add the following line to your LILO configuration file.


     append="mem=<number of Mb>M"



  So, when you have 96 Mb of memory this should become


     append="mem=96M"



  Don't type a number higher than the number Mb you really have. This
  can present unpredictable crashes.


  6.  Video cards

  Linux will work with all video cards in text mode, VGA cards not
  listed below probably will still work with mono VGA and/or standard
  VGA drivers.

  If you're looking into buying a cheap video card to run X, keep in
  mind that accelerated cards (ATI Mach, ET4000/W32p, S3) are MUCH
  faster than unaccelerated or partially accelerated (Cirrus, WD) cards.

  ``32 bpp'' is actually 24 bit color aligned on 32 bit boundaries. It
  does NOT mean the cards are capable of 32 bit color, they still
  display 24 bit color (16,777,216 colors). 24 bit packed pixels modes
  are not supported in XFree86, so cards that can do 24 bit modes to get
  higher resolutions in other OS's are not able to do this in X using
  XFree86. These cards include Mach32, Cirrus 542x, S3 801/805/868/968,
  ET4000, and others.

  AGP (Accelerated Graphics Port) support is growing fast. Most of the
  X-servers (both freely available and commercial versions) have more or
  less support for AGP.


  6.1.  Diamond video cards

  Most currently available Diamond cards ARE supported by the current
  release of XFree86. Early Diamond cards may not be officially
  supported by XFree86, but there are ways of getting them to work.
  Diamond is now actively supporting the XFree86 Project.


  6.2.  SVGALIB (graphics for console)


  o  VGA

  o  EGA

  o  ARK Logic ARK1000PV/2000PV

  o  ATI VGA Wonder

  o  ATI Mach32

  o  Cirrus 542x, 543x

  o  OAK OTI-037/67/77/87

  o  S3 (limited support)

  o  Trident TVGA8900/9000

  o  Tseng ET3000/ET4000/W32


  6.3.  XFree86 3.3.2



  6.3.1.  Accelerated


  o  ARK Logic ARK1000PV/VL, ARK2000PV/MT

  o  ATI Mach8

  o  ATI Mach32 (16 bpp supported for cards with RAMDAC ATI68875,
     AT&T20C49x, BT481 and 2Mb video ram)


  o  ATI Mach64 (16/32 bpp supported for cards with RAMDAC ATI68860,
     ATI68875, CH8398, STG1702, STG1703, AT&T20C408, 3D Rage II,
     internal, IBM RGB514)

  o  Chips & Technologies 64200, 64300, 65520, 65525, 65530, 65535,
     65540, 65545, 65546, 65548, 65550, 65554

  o  Cirrus Logic 5420, 542x/5430 (16 bpp), 5434 (16/32 bpp), 5436,
     544x, 546x, 5480, 62x5, 754x

  o  Diamond Viper 330

  o  Gemini P1 (ET6000 chip)

  o  IBM 8514/A

  o  IBM XGA-I, XGA-II

  o  IIT AGX-010/014/015/016 (16 bpp)

  o  Matrox MGA2064W (Millennium)

  o  Matrox MGA1064SG (Mystique)

  o  Number Nine Imagine I128

  o  Oak OTI-087

  o  S3 732 (Trio32), 764 (Trio64), Trio64V+, 801, 805, 864, 866, 868,
     86C325 (ViRGE), 86C375 (ViRGE/DX), 86C385 (ViRGE/GX), 86C988
     (ViRGE/VX), 911, 924, 928, 964, 968

  o  see Appendix A for list of supported S3 cards

  o  SiS 86c201, 86c202, 86c205

  o  Trident 9440, 96xx, Cyber938x

  o  Tseng ET4000/W32/W32i/W32p, ET6000

  o  Weitek P9000 (16/32 bpp)

  o  Diamond Viper VLB/PCI

  o  Orchid P9000

  o  Western Digital WD90C24/24A/24A2/31/33


  6.3.2.  Unaccelerated


  o  Alliance AP6422, AT24

  o  ATI VGA Wonder series

  o  Avance Logic AL2101/2228/2301/2302/2308/2401

  o  Cirrus Logic 6420/6440, 7555

  o  Compaq AVGA

  o  DEC 21030

  o  Genoa GVGA

  o  MCGA (320x200)

  o  MX MX68000/MX68010

  o  NCR 77C22, 77C22E, 77C22E+

  o  NVidia NV1

  o  Oak OTI-037C, OTI-067, OTI-077

  o  RealTek RTG3106

  o  SGS-Thomson STG2000

  o  Trident 8800CS, 8200LX, 8900x, 9000, 9000i, 9100B, 9200CXr,
     9320LCD, 9400CXi, 9420, 9420DGi, 9430DGi

  o  Tseng ET3000, ET4000AX

  o  VGA (standard VGA, 4 bit, slow)

  o  Video 7 / Headland Technologies HT216-32

  o  Western Digital/Paradise PVGA1, WD90C00/10/11/30


  6.3.3.  Monochrome


  o  Hercules mono

  o  Hyundai HGC-1280

  o  Sigma LaserView PLUS

  o  VGA mono


  6.3.4.  Alpha, Beta drivers


  o  EGA (ancient, from c. 1992)
     <ftp://ftp.funet.fi/pub/Linux/BETA/Xega/>


  6.4.  S.u.S.E. X-Server

  S.u.S.E. is building a serie of X-servers based on the XFree-86 code.
  These X-servers support new video cards and are bug fixe releases for
  XFree86 X-servers. S.u.S.E is building these X-servers together with
  The XFree86 Project, Inc. These X-Servers will be in the next XFree86
  version. These X-servers can be found at
  <http://www.suse.de/index.html>. At this moment S.u.S.E. X-Servers are
  available for the following video cards.


  o  XSuSE Elsa GLoria X-Server

  o  ELSA GLoria L, GLoria L/MX, Gloria S

  o  Video cards with the Alliance Semiconductor AT3D (also AT25) Chip

  o  Hercules Stingray 128 3D

  o  XSuSE NVidia X-Server (PCI and AGP support, NV1 chipset and
     Riva128)
  o  ASUS 3Dexplorer

  o  Diamond Viper 330

  o  ELSA VICTORY Erazor

  o  STB Velocity 128

  o  XSuSE Matrox. Support for Mystique, Millennium, Millennium II and
     Millennium II AGP

  o  XSuSE Trident. Support for the 9685 (including ClearTV) and the
     latest Cyber chipset

  o  XSuSE Tseng. W32, W32i ET6100 and ET6300 support.


  6.5.  Commercial X servers

  Commercial X servers provide support for cards not supported by
  XFree86, and might give better performances for cards that are
  supported by XFree86. In general they support many more cards than
  XFree86, so I'll onlys list cards that aren't supported by XFree86
  here. Contact the vendors directly or check the Commercial HOWTO for
  more info.


  6.5.1.  Xi Graphics, Inc


  Xi Graphics, Inc  <http://www.xig.com> (formerly known as X Inside,
  Inc) is selling three X server products (cards supported are sorted by
  manufacturer):


  o  Accelerated-X Display Server

  o  3Dlabs

  o  300SX

  o  500TX Glint

  o  500MX Glint

  o  Permedia 4MB/8MB

  o  Permedia II 4MB/8MB

  o  Actix

  o  GE32plus 1MB/2MB

  o  GE32ultra 2MB

  o  GraphicsENGINE 64 1MB/2MB

  o  ProSTAR 64 1MB/2MB

  o  Alliance

  o  ProMotion-3210 1MB/2MB

  o  ProMotion-6410 1MB/2MB


  o  ProMotion-6422 1MB/2MB

  o  ARK Logic

  o  ARK1000PV 1MB/2MB

  o  ARK1000VL 1MB/2MB

  o  ARK2000PV 1MB/2MB

  o  AST

  o  Manhattan 5090P (GD5424) 512KB

  o  ATI

  o  3D Xpression 1MB/2MB

  o  3D Pro Turbo PC2TV 4MB/8MB

  o  3D Pro Turbo PC2TV 6144

  o  3D Xpression+ PC2TV 2MB/4MB

  o  3D Xpression+ 2MB/4MB

  o  ALL-IN-WONDER 4MB/8MB

  o  ALL-IN-WONDER PRO 4MB/8MB

  o  Graphics Ultra (Mach8) 1MB

  o  Graphics Pro Turbo (Mach64/VRAM) 2MB/4MB

  o  Graphics Pro Turbo 1600 (Mach64/VRAM) 2MB/4MB

  o  Graphics Ultra Plus (Mach32) 2MB

  o  8514/Ultra (Mach8) 1MB

  o  Graphics Ultra Pro (Mach32) 1MB2MB

  o  Graphics Vantage (Mach8) 1MB

  o  VGA Wonder Plus 512KB

  o  VGA Wonder XL 1MB

  o  Video Xpression 1MB

  o  XPERT@Play 4MB/6MB/8MB

  o  XPERT@Work 4MB/6Mb/8MB

  o  Video Xpression 2MB

  o  WinBoost (Mach64/DRAM) 2MB

  o  WinTurbo (Mach64/VRAM) 2MB

  o  Graphics Wonder (Mach32) 1MB

  o  Graphics Xpression 1MB/2MB

  o  Rage II (SGRAM) 2MB/4MB/8MB

  o  Rage II+ (SGRAM) 2MB/4MB/8MB

  o  Rage Pro 2MB/4MB/8MB

  o  Avance Logic

  o  ALG2101 1MB

  o  ALG2228 1MB/2MB

  o  ALG2301 1MB/2MB

  o  Boca

  o  Voyager 1MB/2MB

  o  Vortek-VL 1MB/2MB

  o  Colorgraphic

  o  Dual Lightning 2MB

  o  Pro Lightning Accelerator 2MB

  o  Quad Pro Lightning Accelerator 2MB

  o  Twin Turbo Accelerator 1MB/2MB

  o  Chips & Technology

  o  64300 1MB/2MB

  o  64310 1MB/2MB

  o  65510 512KB

  o  65520 1MB

  o  65530 1MB

  o  65535 1MB

  o  65540 1MB

  o  65545 1MB

  o  65550 2MB

  o  82C450 512KB

  o  82C451 256KB

  o  82C452 512KB

  o  82C453 1MB

  o  82C480 1MB/2MB

  o  82C481 1MB/2MB

  o  Cirrus Logic

  o  GD5402 512KB

  o  GD5420 1MB

  o  GD5422 1MB

  o  GD5424 1MB

  o  GD5426 1MB/2MB

  o  GD5428 1MB/2MB

  o  GD5429 1MB/2MB

  o  GD5430 1MB/2MB

  o  GD5434 1MB/2MB

  o  GD5436 1MB/2MB

  o  GD5440 1MB/2MB

  o  GD5446 1MB/2MB

  o  GD5462 2MB/4MB PCI and AGP

  o  GD5464 2MB/4MB PCI and AGP

  o  GD5465 2MB/4MB PCI and AGP

  o  GD54M30 1MB/2MB

  o  GD54M40 1MB/2MB

  o  Compaq

  o  ProLiant Series 512KB

  o  ProSignia Series 512KB

  o  QVision 1024 1MB

  o  QVision 1280 1MB/2MB

  o  QVision 2000+ 2MB

  o  QVision 2000 2MB

  o  DEC

  o  DECpc XL 590 (GD5428) 512KB

  o  Dell

  o  466/M & 466/ME (S3 805) 1MB

  o  OnBoard ET4000 1MB

  o  DGX (JAWS) 2MB

  o  OptiPlex XMT 590 (Vision864) 2MB

  o  Diamond

  o  Fire GL 1000 Pro 4MB/8MB

  o  Fire GL 1000 4MB/8Mb

  o  Stealth 3D 2000 2MB/4MB

  o  Stealth 3D 3000XL 2MB/4MB

  o  Stealth 64 Graphics 2001 1MB/2MB

  o  Stealth 64 Graphics 2121XL 1MB/2MB

  o  Stealth 64 Graphics 2201XL 2MB

  o  SpeedStar 1MB

  o  SpeedStar 64 Graphics 2000 1MB/2MB

  o  SpeedStar 24 1MB

  o  SpeedStar 24X 1MB

  o  SpeedStar 64 1MB/2MB

  o  SpeedStar Hicolor 1MB

  o  SpeedStar PCI 1MB

  o  SpeedStar Pro 1MB

  o  SpeedStar Pro SE 1MB/2MB

  o  Stealth 1MB

  o  Stealth 24 1MB

  o  Stealth 32 1MB/2MB

  o  Stealth 64 VRAM 2MB/4MB

  o  Stealth 64 DRAM 1MB/2MB

  o  Stealth 64 Video VRAM (175MHz) 2MB/4MB

  o  Stealth 64 Video DRAM 1MB/2MB

  o  Stealth 64 Video VRAM (220MHz) 2MB/4MB

  o  Stealth Hicolor 1MB

  o  Stealth Pro 1MB/2MB

  o  Stealth SE 1MB/2MB

  o  Stealth 64 Video 2001TV 2MB

  o  Stealth 64 Video 2121 1MB/2MB

  o  Stealth 64 Video 2121TV 1MB/2MB

  o  Stealth 64 Video 2201 2MB

  o  Stealth 64 Video 2201TV 2MB

  o  Stealth 64 Video 3200 2MB

  o  Stealth 64 Video 3240 2MB/4MB

  o  Stealth 64 Video 3400 4MB

  o  Viper 1MB/2MB

  o  Viper Pro 2MB

  o  Viper Pro Video 2MB/4MB

  o  Viper SE 2MB/4MB

  o  ELSA

  o  VICTORY 3D 2MB/4MB

  o  WINNER 1000 1MB/2MB

  o  WINNER 1000AVI 1MB/2MB

  o  WINNER 1000ISA 1MB/2MB

  o  WINNER 1000PRO 1MB/2MB

  o  WINNER 1000TRIO 1MB/2MB

  o  WINNER 1000TRIO/V 1MB/2MB

  o  WINNER 100VL 1MB

  o  WINNER 2000 2MB/4MB

  o  WINNER 2000AVI 2MB/4MB

  o  WINNER 2000AVI/3D 2MB/4MB

  o  WINNER 2000PRO 2MB/4MB

  o  WINNER 2000PRO/X 2MB/4MB/8MB

  o  WINNER 3000-L 4MB

  o  WINNER 3000-M 2MB

  o  WINNER 3000-S 2MB

  o  WINNER 1024 1MB

  o  WINNER 1280, TLC34075 Palette 2MB

  o  WINNER 1280, TLC34076 Palette 2MB

  o  Gloria-XL

  o  Gloria-MX

  o  Gloria-L

  o  Synergy

  o  Everex

  o  ViewPoint 64P 1MB/2MB

  o  VGA Trio 64P 1MB/2MB

  o  Gateway

  o  Mach64 Accelerator (Mach64/VRAM) 2MB

  o  Genoa

  o  5400 512KB

  o  8500/8500VL 1MB

  o  Phantom 32i 8900 2MB

  o  Phantom 64 2MB

  o  Hercules

  o  Dynamite 1MB

  o  Dynamite Pro 1MB/2MB

  o  Dynamite Power 2MB

  o  Dynamite 3D / GL

  o  Graphite 1MB

  o  Stingray 64 1MB/2MB

  o  Stingray Pro 1MB/2MB

  o  Stringray 1MB

  o  Terminator 3D 2MB/4MB

  o  Terminator 64/Video 2MB

  o  Graphite Terminator Pro 2MB/4MB

  o  HP

  o  NetServer LF/LC/LE (TVGA9000i) 512KB

  o  Vectra VL2 (GD5428) 1MB

  o  Vectra XM2i (Vision864) 1MB/2MB

  o  Vectra XU (Vision864) 1MB/2MB

  o  IBM

  o  8514/A 1MB

  o  PC 300 Series (GD5430) 1MB

  o  PC 300 Series (Vision864) 1MB/2MB

  o  PC 700 Series (Vision864) 1MB/2MB

  o  PS/ValuePoint Performance Series (Vision864) 1MB/2MB

  o  VC550 1MB

  o  VGA 256KB

  o  XGA-NI 1MB

  o  XGA 1MB

  o  IIT

  o  AGX014 1MB

  o  AGX015 1MB/2MB

  o  Integral

  o  FlashPoint 1MB/2MB

  o  Leadtek

  o  WinFast L2300 4MB/8MB

  o  Matrox

  o  Comet 2MB

  o  Marvel II 2MB

  o  Impression (MGA-IMP/3/A/H, MGA-IMP/3/V/H, MGA-IMP/3/M/H) 3MB

  o  Impression Lite (MGA-IMP+/LTE/P) 2MB

  o  Impression Plus Lite (MGA-IMP+/LTE/V) 2MB

  o  Millennium (MGA-MIL) 2MB/4MB/8MB

  o  Millennium 220 (MGA-MIL) 2MB/4Mb/8MB

  o  Millennium PowerDoc (WRAM) 2MB/4MB/8MB

  o  Millennium II (WRAM) 2MB/4MB/8MB PCI and AGP

  o  Mystique (MGA-MYS) 2MB/4MB

  o  Mystique 220

  o  Matrox (con.t)

  o  Impression Plus (MGA-IMP+/P, MGA-IMP+/A) 2MB/4MB

  o  Impression Plus 220 (MGA-IMP+/P/H, MGA-IMP+/A/H) 2MB/4MB

  o  Impression Pro (MGA-PRO/4.5/V) 4.5MB

  o  Ultima Plus (MGA-PCI/2+, MGA-VLB/2+) 2MB/4MB

  o  Ultima (MGA-ULT/2/A, MGA-PCI/2, MGA-VLB/2) 2MB

  o  Ultima (MGA-ULT/2/A/H, MGA-ULT_2/M/H) 2MB

  o  Ultima Plus 200 (MGA-PCI/4/200, MGA-VLB/4/200) 4MB

  o  MaxVision

  o  VideoMax 2000 2MB/4MB

  o  Metheus

  o  Premier 801 1MB

  o  Premier 928-1M 1MB

  o  Premier 928-2M 2MB

  o  Premier 928-4M 4MB

  o  Micronics

  o  Mpower 4 Plus (Mach64) 1MB

  o  MIRO

  o  miroCRYSTAL 10AD 1MB

  o  miroCRYSTAL 12SD 1MB

  o  miroCRYSTAL 12SD 2MB

  o  miroCRYSTAL 20PV 2MB

  o  miroCRYSTAL 20SD 2MB

  o  miroCRYSTAL 20SV 2MB

  o  miroCRYSTAL 22SD 2MB

  o  miroCRYSTAL 40SV 4MB

  o  miroCRYSTAL VR2000 2MB/4MB

  o  miroMAGIC 40PV 4MB

  o  miroMAGIC plus 2MB

  o  miroVIDEO 12PD 1MB/2MB

  o  miroVIDEO 20SD 2MB

  o  miroVIDEO 20SV 2MB

  o  miroVIDEO 20TD 2MB

  o  miroVIDEO 22SD 2MB

  o  miroVIDEO 40SV 4MB

  o  NEC

  o  Versa P Series 1MB

  o  Nth Graphics

  o  Engine/150 2MB

  o  Engine/250 2MB

  o  Number Nine

  o  GXE Level 10, AT&T 20C491 Palette 1MB

  o  GXE Level 10, Bt485 or AT&T20C505 Palette 1MB

  o  GXE Level 11 2MB

  o  GXE Level 12 3MB

  o  GXE Level 14 4MB

  o  GXE Level 16 4MB

  o  GXE64 1MB/2MB

  o  GXE64pro 2MB/4Mb

  o  GXE64pro (-1600) 2MB/4MB

  o  Imagine 128 2MB

  o  Image 128 (-1280) 4MB

  o  Image 128 Series 2 (DRAM) 2MB/4Mb

  o  Image 128 Pro (-1600) 4MB/8MB

  o  Image 128 Series 2 (VRAM) 2MB/4MB/8MB

  o  Image 128 Series III (Revolution 3D) (WRAM) 8MB/16MB PCI and AGP

  o  Revolution 3D "Ticket to Ride" (WRAM) 8MB/16MB PCI and AGP

  o  9FX Motion331 1MB/2MB

  o  9FX Motion531 1MB/2MB

  o  9FX Motion771 2MB/4MB

  o  9FX Reality332 2MB

  o  9FX Reality772 2MB/4MB

  o  9FX Reality 334 PCI and AGP

  o  9FX Vision330 1MB/2MB

  o  Oak Technology

  o  OTI-067 512KB

  o  OTI-077 1MB

  o  OTI-087 1MB

  o  OTI-107 1MB/2MB

  o  OTI-111 1MB/2MB

  o  Orchid

  o  Farenheit 1280 Plus, ATT20C491 Palette 1MB

  o  Farenheit 1280 1MB

  o  Farenheit 1280 Plus, SC15025 Palette 1MB

  o  Farenheit ProVideo 64 2MB/4MB

  o  Farenheit Video 3D 2MB

  o  Kelvin 64 1MB/2MB

  o  Kelvin Video64 1MB/2MB

  o  P9000 2MB

  o  Packard Bell

  o  Series 5000 Motherboard 1MB

  o  Paradise

  o  8514/A 1MB

  o  Accelerator 24 1MB

  o  Accelerator Value card 1MB

  o  Bahamas 64 1MB/2MB

  o  Bali 32 1MB/2MB

  o  VGA 1024 512KB

  o  VGA Professional 512KB

  o  Pixelworks

  o  WhrilWIN WL1280 (110MHz) 2MB

  o  WhrilWIN WL1280 (135MHz) 2MB

  o  WhirlWIN WW1280 (110MHz) 2MB

  o  WhirlWIN WW1280 (135MHz) 2MB

  o  WhrilWIN WW1600 1MB

  o  Radius

  o  XGA-2 1MB

  o  Reveal

  o  VC200 1MB

  o  VC300 1MB

  o  VC700 1MB

  o  S3

  o  ViRGE 2MB/4MB

  o  ViRGE/DX  2MB/4MB

  o  ViRGE/GX  2MB/4MB

  o  ViRGE/GX /2 2MB/4MB

  o  ViRGE/VX  2MB/4MB

  o  Trio32 1MB/2MB

  o  Trio64 1MB/2MB

  o  Trio64V+ 1MB/2MB

  o  Trio64V2/DX 1MB/2MB

  o  Trio64V2/GX 1MB/2MB

  o  801 1MB/2MB

  o  805 1MB/2MB

  o  Vision864 1MB/2MB

  o  Vision866 1MB/2MB

  o  Vision868 1MB/2MB

  o  911 1MB

  o  924 1MB

  o  928 1MB

  o  928 2MB/4MB

  o  Sierra

  o  Falcon/64 1MB/2MB

  o  Sigma

  o  Legend 1MB

  o  SPEA/V7

  o  Mercury P64 2MB

  o  Storm Pro 4MB

  o  ShowTime Plus 2MB

  o  STB

  o  Evolution VGA 1MB

  o  Horizon Plus 1MB

  o  Horizon VGA 1MB

  o  Horizon 64 1MB/2MB

  o  Horizon 64 Video 1MB/2MB

  o  Horizon Video 1MB

  o  LightSpeed 2MB

  o  LightSpeed 128 2MB

  o  Nitro 3D 2MB/4MB

  o  Nitro 64 1MB/2MB

  o  Nitro 64 Video 1MB/2MB

  o  PowerGraph VL-24 1MB

  o  PowerGraph X-24 1MB

  o  PowerGraph 64 3D 2MB

  o  PowerGraph 64 1MB/2MB

  o  PowerGraph 64 Video 1MB/2MB

  o  PowerGraph Pro 2MB

  o  Velocity 3D 4MB

  o  Velocity 64V 2MB/4MB

  o  Toshiba

  o  T4900CT 1MB

  o  Trident

  o  TGUI9400CXi 1MB/2MB

  o  TGUI9420DGi 1MB/2MB

  o  TGUI9440 1MB/2MB

  o  TGUI9660 1MB/2MB

  o  TGUI9680 1MB/2MB

  o  TVGA8900B 1MB

  o  TVGA8900C 1MB

  o  TVGA8900CL 1MB

  o  TVGA8900D 1MB

  o  TVGA9000 512KB

  o  TVGA9000i 512KB

  o  TVGA9200CXr 1MB/2MB

  o  Tseng Labs

  o  ET3000 512KB

  o  ET4000 1MB

  o  ET6000 2MB/4MB

  o  VGA/16 (ISA) 1MB

  o  VGA/16 (VLB) 1MB/2MB

  o  VGA/32 1MB/2MB

  o  ET4000/W32 1MB

  o  ET4000/W32i 1MB/2MB

  o  ET4000/W32p 1MB/2MB

  o  VLSI

  o  VL82C975 (AT&T RAMDAC) 2MB

  o  VL82C975 (BrookTree RAMDAC) 2MB

  o  VL82C976 (Internal RAMDAC) 2MB

  o  Western Digital

  o  WD90C00 512KB

  o  WD90C11 512KB

  o  WD90C24 1MB

  o  WD90C26 512KB

  o  WD90C30 1MB

  o  WD90C31 1MB

  o  WD90C33 1MB

  o  WD9510-AT 1MB

  o  Weitek

  o  P9100 2MB

  o  P9000 2MB

  o  W5186 1MB

  o  W5286 1MB


  o  Laptop Accelerated-X Display Server

  o  Broadax

  o  NP8700 (Cyber 9385)

  o  Chips & Technology

  o  65510 512KB

  o  65520 1MB

  o  65530 1MB

  o  65535 1MB

  o  65540 1MB

  o  65545 1MB

  o  65554 2MB/4MB

  o  65555 2MB

  o  Cirrus Logic

  o  GD7541 1MB/2MB

  o  GD7543 1MB/2MB

  o  GD7548 2MB

  o  Compaq

  o  LTE 5400 (Cirrus Logic CL5478)

  o  Presario 1090ES (NM 2093)

  o  Dell

  o  Latitude XPi 896 (NeoMagic 2070)


  o  Latitude XPi (NM 2070)

  o  Latitude XPi CD 1MB (NM 2090)

  o  Latitude LM (NM 2160)

  o  Latitude CP (NM 2160)

  o  Inspiron 3000 (NM 2160)

  o  Digital (DEC)

  o  HiNote VP (NeoMagic 2090)

  o  Fujitsu

  o  Lifebook 435DX (NeoMagic 2093)

  o  Gateway 2000

  o  Solo 2300 (NeoMagic 2160)

  o  Solo 2300 SE (NM 2160)

  o  Solo 9100 (C&T 65554)

  o  Solo 9100XL (C&T 65555)

  o  Hewlett Packard

  o  OmniBook 800 (NM 2093)

  o  Hitachi

  o  Notebook E133T (NeoMagic 2070)

  o  IBM

  o  VGA 256KB

  o  Thinkpad 380D (NeoMagic 2090)*

  o  Thinkpad 385ED (NeoMagic 2090)*

  o  Thinkpad 560E (Cyber 9382)

  o  Thinkpad 760XD (Cyber 9385)

  o  Thinkpad 770 (Cyber 9397)

  o  Micron

  o  TransPort XKE (NeoMagic 2160)

  o  Millenia Transport (Cirrus Logic GD7548)

  o  NEC

  o  Versa P Series 1MB

  o  Versa 6230 2MB (NeoMagic 2160)

  o  NeoMagic

  o  MagicGraph128 / NM2070 896

  o  MagicGraph128 / NM2070

  o  MagicGraph128V / NM2090

  o  MagicGraph128V+ / NM2097

  o  MagicGraph128ZV / NM2093

  o  MagicGraph128XD / NM2160

  o  Sony

  o  VAIO PCG-505 (NeoMagic 2097)

  o  Toshiba

  o  T4900CT 1MB

  o  Tecra 740CDT (C&T 65554)

  o  Trident

  o  Cyber 9397

  o  Cyber 9385

  o  Cyber 9382

  o  Twinhead

  o  Slimnote 9166TH (Cyber 9385)

     * Numerous XiG customers have comfirmed support.

  o  Multi-head Accelerated-X Display Server


  6.5.2.  Metro-X 4.3.0

  Metro Link <sales@metrolink.com>

  Supported Cards:


  7.  Controllers (hard drive)

  Linux will work with standard IDE, MFM and RLL controllers. When using
  MFM/RLL controllers it is important to use ext2fs and the bad block
  checking options when formatting the disk.

  Enhanced IDE (EIDE) interfaces are supported. With up to two IDE
  interfaces and up to four hard drives and/or CD-ROM drives. Linux will
  detect these EIDE interfaces:


  o  CMD-640 (Support for buggy interfaces in kernel 2.2)

  o  DTC 2278D

  o  FGI/Holtek HT-6560B VLB (Support for secondary interface in kernel
     2.2)

  o  RZ1000 (Support for buggy interfaces in kernel 2.2)

  o  Triton I (82371FB) (with busmaster DMA)


  Graphics                                    Card Chipset
  ATI 3D RAGE                                 3D RAGE
  ATI 3D RAGE II                              3D RAGE II
  ATI ALL-IN-WONDER PRO AGP                   3D RAGE PRO
  ATI ALL-IN-WONDER PRO PCI                   3D RAGE PRO
  ATI Graphics Pro Turbo                      Mach64
  ATI Graphics Ultra                          Mach8
  ATI Graphics Xpression                      Mach64
  ATI Mach32                                  Mach32
  ATI Mach64                                  Mach64
  ATI VGA STEREO-F/X                          ATI 28800
  ATI Winturbo PCI                            Mach64
  ATI XPERT@Play                              3D RAGE PRO
  ATI XPERT@Play AGP                          3D RAGE PRO
  ATI XPERT@Work                              3D RAGE PRO
  ATI XPERT@Work AGP                          3D RAGE PRO
  Diamond Fire GL 1000Pro                     PERMEDIA 2
  Diamond SpeedStar 24X                       Western Digital 90C31
  Diamond SpeedStar Pro SE                    Cirrus 5430
  Diamond Stealth 24                          S3 801
  Diamond Stealth 32                          ET4000/W32p
  Diamond Stealth 3D 2000                     S3 ViRGE
  Diamond Stealth 64                          S3 964, Bt485KPJ135
  Diamond Stealth 64 DRAM                     S3 Trio64
  Diamond Stealth 64 DRAM (SDAC)              S3 864, S3 SDAC
  Diamond Stealth 64 Graphics 2000 Series     S3 864, S3 SDAC
  Diamond Stealth 64 Graphics 2200            S3 Trio64
  Diamond Stealth 64 VRAM                     S3 968, IBM RGB526CF22
  Diamond Stealth 64 Video 3000 Series        S3 968, TI 3026-175
  Diamond Stealth 64 Video VRAM               S3 968, TI 3026-175
  Diamond Stealth Video (SDAC)                S3 868, S3 SDAC
  Diamond Stealth Video 2000 Series           S3 868, S3 SDAC
  Diamond Viper (110 MHz RAMDAC)              P9000
  Diamond Viper (135 MHz RAMDAC)              P9000
  ELSA GLoria Synergy                         PERMEDIA 2
  ELSA Victory 3D                             S3 ViRGE
  ELSA WINNER 2000 Office AGP                 PERMEDIA 2
  ELSA Winner 1000 TRIO/V                     S3 Trio64V+
  ELSA Winner 2000 AVI                        S3 968, TI 3026-175
  ELSA Winner 2000 PRO/X-2, -4                S3 968, TI 3026-220
  ELSA Winner 2000 PRO/X-8                    S3 968, IBM RGB528CF25
  EPS Apex L-200                              C&T 65550
  Generic                                     ATI 28800
  Generic                                     Alliance ProMotion
  Generic                                     Ark 2000
  Generic                                     Avance Logic 22xx/23xx/24xx
  Generic                                     Chips & Technologies
  Generic                                     Cirrus 5420
  Generic                                     Cirrus 5422/5424
  Generic                                     Cirrus 5426/5428
  Generic                                     Cirrus 5429
  Generic                                     Cirrus 5430
  Generic                                     Cirrus 5434
  Generic                                     Cirrus 5436
  Generic                                     Cirrus 5446
  Generic                                     Cirrus 5462
  Generic                                     Cirrus 5462/5465
  Generic                                     Cirrus 5480
  Generic                                     Cirrus 62x5
  Generic                                     Cirrus 6410/6412/6420/6440
  Generic                                     Cirrus 754x
  Generic                                     ET3000
  Generic                                     ET4000/W32P
  Generic                                     ET4000AX
  Generic                                     ET6000
  Generic                                     Mach32
  Generic                                     Mach64
  Generic                                     Mach8
  Generic                                     P9000
  Generic                                     PERMEDIA 2
  Generic                                     S3 864/868/924/928/964
  Generic                                     S3 968
  Generic                                     S3 Trio64
  Generic                                     S3 Trio64V+
  Generic                                     S3 ViRGE
  Generic                                     S3 ViRGE/GX/DX
  Generic                                     SiS 86c201/86c202/86c205
  Generic Trident                             TGUI9440
  Generic Trident                             TGUI96xx
  Generic                                     Trident8900
  Generic                                     VGA
  Generic                                     Western Digital SVGA
  Genoa Phantom 64                            S3 Trio64V+
  Genoa WindowsVGA 8500VL                     Cirrus 5426
  Hercules Dynamite 128/Video                 ET6000
  Hercules Dynamite 3D/GL                     PERMEDIA 2
  Hercules Dynamite 3D/GL AGP                 PERMEDIA 2
  Hercules Stingray                           Avance Logic 2301
  Hercules Stingray 128/3D                    Alliance ProMotion AT3D
  Hercules Stingray 64                        Ark 2000
  Hercules Terminator 3D                      S3 ViRGE/DX
  IBM VGA
  Matrox Marvel                               ET4000
  Matrox Marvel II                            ET4000
  Matrox Millennium                           MGA Storm
  Matrox Millennium II AGP                    MGA 2164, TI 3026-250
  Matrox Millennium II PCI (220 MHz)          MGA 2164, TI 3026-220
  Matrox Millennium II PCI (250 MHz)          MGA 2164, TI 3026-250
  Matrox Mystique                             MGA 1064
  Matrox Mystique 220                         MGA 1164
  Number Nine GXE64                           S3 864
  Number Nine Imagine 128                     Imagine 128
  Number Nine Imagine 128 Series 2            Imagine 128 Series 2
  Number Nine Motion 531                      S3 868
  Number Nine Motion 771                      S3 968
  Number Nine Revolution 3D                   Ticket to Ride
  Number Nine Vision 330                      S3 Trio64
  Orchid Kelvin 64                            Cirrus 5434
  SPEA Mirage Video                           S3 Trio64V+
  STB NITRO 3D                                S3 ViRGE/GX
  STB/Symmetric GLyder MAX-2                  PERMEDIA 2
  Sigma Designs VGA Legend                    ET4000
  Tech Source Raptor                          Imagine 128 Series 2
  Trident 64-Bit Providia 9685
  Trident 8900                                Trident 8900
  Trident 9440                                TGUI9440-2
  V PCI-53                                    Cirrus 5434

  o  Triton II (82371SB) (with busmaster DMA)

  ESDI controllers that emulate the ST-506 (MFM/RLL/IDE) interface will
  also work. The bad block checking comment also applies to these
  controllers.

  Generic 8 bit XT controllers also work.

  Starting with pre-patch-2.0.31-3 IDE/ATAPI is provided.



  7.1.  Alpha, Beta drivers


  o  UMC 8672 interfaces (experimental in kernel 2.2)

  o  Promise DC4030VL caching interface card (experimental support in
     kernel 2.2)


  8.  Controllers (hard drive RAID)


  o  Tekram D690CD IDE PCI Cache Controller (with RAID level 1 Mirroring
     and caching)

  o  ARCO Inc. DupliDisk IDE disk mirroring controller
     Support for ATA, IDE, E-IDE and UDMA drive. Controllers available
     can be plugged into ISA and PCI slots, and directly into the IDE
     controller. Furthermore, 3.5-inch and 5.25-inch Bay Mount units are
     available that fit into the respective drive bays. More information
     at  <http://www.arcoide.com>. Make sure you have at least rev 3.00
     of the firmware.

  o  Mylex RAID controllers
     More information can be found at
     <http://www.dandelion.com/Linux/DAC960.html>


  9.  Controllers (SCSI)

  It is important to pick a SCSI controller carefully. Many cheap ISA
  SCSI controllers are designed to drive CD-ROM's rather than anything
  else. Such low end SCSI controllers are no better than IDE. See the
  SCSI HOWTO and look at performance figures before buying a SCSI card.


  9.1.  Supported


  o  AMI Fast Disk (VLB/EISA) (BusLogic compatible)

  o  Adaptec AVA-1502E (ISA/VLB) (AIC-6360) (AHA1520)

  o  Adaptec AVA-1505/1515 (ISA) (Adaptec AHA-152x compatible)

  o  Adaptec AVA-1825 (VLB) (Adaptec AHA-152x compatible)
     This card has a SCSI, EIDE and floppy port which all work nicely.

  o  Adaptec AHA-1510/152x (ISA/VLB) (AIC-6260/6360)

  o  Adaptec AHA-154x (ISA) (all models)

  o  Adaptec AHA-174x (EISA) (in enhanced mode)

  o  Adaptec AHA-274x/274xT (EISA) (AIC-7771). The 274xT is supported
     since kernel series 2.1.x (AHA2740)

  o  Adaptec AHA-284x (VLB) (AIC-7770) (AHA2740)

  o  Adaptec AHA-2910B (PCI) (since kernel series 2.1.x)

  o  Adaptec AHA-2920 (PCI). Use the Future Domain driver. LILO
     parameters are needed when used for hard disks.

  o  Adaptec AHA-2920C (PCI)

  o  Adaptec AHA-2930/U/U2 (PCI)

  o  Adaptec AHA-2940/U/W/AU/UW/U2W/U2/U2B/U2BOEM (PCI) (AIC-7861,
     AIC-7871, AIC-7844, AIC-7881, AIC-7884). Some of these are only
     supported since kernel series 2.1.x (AHA2740)

  o  Adaptec AHA-2944D/WD/UD/UWD (PCI). Some of these are only supported
     since kernel series 2.1.x (AHA2740)

  o  Adaptec AHA-2950U2/U2B/U2W

  o  Adaptec AHA-3940/U/W/UW/AUW/U2W (PCI) (AIC-7872, AIC-7882) (since
     1.3.6). Some of these are only supported since kernel series 2.1.x

  o  Adaptec AHA-3950U2B/U2D

  o  Adaptec AHA-3985U/W/UW (PCI) (AIC-7873, AIC-7883). Some of these
     are only supported since kernel series 2.1.x

  o  Adaptec PCI controllers with AIC-7850, AIC-7855, AIC-7860

  o  Adaptec on board controllers with AIC-777x (EISA), AIC-785x,
     AIC-786x, AIC-787x (PCI), AIC-788x (PCI), AIC-789x, AIC-3860.
     AIC-786x and AIC-789x are supported since kernel series 2.1.x

  o  AdvanSys ABP510/5150 Bus-Master (ISA)
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP5140 Bus-Master (ISA) PnP
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP5142 Bus-Master (ISA) PnP with floppy
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP920 Bus-Master (PCI)
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP930/U Bus-Master (PCI/Ultra>)
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP960/U Bus-Master (PCI/ULTRA) MAC/PC
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP542 Bus-Master (ISA) with floppy (single channel)
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP742 Bus-Master (EISA) (single channel)
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP842 Bus-Master (VL) (single channel)
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP940/U Bus-Master (PCI/Ultra) (single channel)
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP970/U Bus-Master (PCI/Ultra) MAC/PC (single channel)
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP752 Dual Channel Bus-Master (EISA) (dual channel)
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP852 Dual Channel Bus-Master (VL) (dual channel)
     <http://advansys.com/support/software/os/linux.htm>

  o  AdvanSys ABP950 Dual Channel Bus-Master (PCI) (dual channel)
     <http://advansys.com/support/software/os/linux.htm>
  o  Always IN2000

  o  AMD AM53C974

  o  BusLogic FlashPoint LT/DL/LW/DW (BT-930(R), BT-920, BT-932(R),
     BT-950(R), BT-952(R))
     <http://www.dandelion.com/Linux/>

  o  Compaq Smart Array 2

  o  DPT PM2001, PM2012A (EATA-PIO)

  o  DPT Smartcache/SmartRAID Plus,III,IV families (ISA/EISA/PCI)
     Take a look at  <http://www.uni-mainz.de/~neuffer/scsi/dpt/>(EATA-
     DMA)
     Cards in these families are PM2011, PM2021, PM2041, PM3021,
     PM2012B, PM2022, PM2122, PM2322, PM2042, PM3122, PM3222, PM3332,
     PM2024, PM2124, PM2044, PM2144, PM3224, PM3334

  o  DTC 3180/3280

  o  DTC 329x (EISA) (Adaptec 154x compatible)

  o  Future Domain TMC-16x0, TMC-3260 (PCI)

  o  Future Domain TMC-8xx, TMC-950

  o  Future Domain chips TMC-1800, TMC-18C50, TMC-18C30, TMC-36C70

  o  ICP-Vortex PCI-SCSI Disk Array Controllers (many RAID levels
     supported)
     Patches for Linux 1.2.13 and 2.0.29 are available at  <ftp://icp-
     vortex.com/download/linux/>. The controllers GDT6111RP, GDT6121RP,
     GDT6117RP, GDT6127RP, GDT6511RP, GDT6521RP, GDT6517RP, GDT6527RP,
     GDT6537RP and GDT6557RP are supported. You can also use pre-
     patch-2.0.31-4 to pre-patch-2.0.31-9.

  o  ICP-Vortex EISA-SCSI Controllers (many RAID levels supported)
     Patches for Linux 1.2.13 and 2.0.29 are available at  <ftp://icp-
     vortex.com/download/linux/>. The controllers GDT3000B, GDT3000A,
     GDT3010A, GDT3020A and GDT3050A are supported. You can also use
     pre-patch-2.0.31-4 to pre-patch-2.0.31-9.

  o  Iomega PPA3 parallel port SCSI Host Bus Adapter embedded in ZIP
     drive

  o  Initio Corp. INI-9090U INI-9100, INI-9100W/A/UW, INI-9200U/UW,
     INI-9400U/UW, INI-9520U/UW, INI-A100U2W

  o  Initio Corp. INIC-950

  o  Media Vision Pro Audio Spectrum 16 SCSI (ISA)

  o  Mylex (formerly BusLogic) W Series (PCI) (BT-948, BT-958, BT-958D)

  o  Mylex (formerly BusLogic) C Series (ISA/EISA/VLB/PCI) (BT-946C,
     BT-956C, BT-956CD, BT-445, BT-747C, BT-757C, BT-757CD, BT-545C,
     BT-540CF)

  o  Mylex (formerly Buslogic) S Series (ISA/EISA/VLB) (BT-445S,
     BT-747S, BT-747D, BT-757S, BT-757D, BT-545S, BT-542D, BT-742A,
     BT-542B)

  o  Mylex (formerly BusLogic) A Series (ISA/EISA) (BT-742A, BT-542B)


  o  NCR 5380 generic cards

  o  NCR 53C400 (Trantor T130B) (use generic NCR 5380 SCSI support)

  o  NCR 53C406a (Acculogic ISApport / Media Vision Premium 3D SCSI)

  o  NCR chips 53C7x0 (the 53C710 is only supported in PCI variant)

  o  NCR chips 53C810(A), 53C815, 53C820, 53C825(A), 53C860, 53C875,
     53C895 (53C895 supported 'on paper')

  o  Qlogic / Control Concepts SCSI/IDE (FAS408) (ISA/VLB)

  o  Qlogic FASXXX/FASXX family of chips (ISA/VLB)

  o  QLogic IQ-PCI, IQ-PCI-10, IQ-PCI-D (PCI) (ISP1020 chip)

  o  Quantum ISA-200S, ISA-250MG

  o  Seagate ST-01/ST-02 (ISA)

  o  SIIG Ultrawide SCSI Pro (Initio chipset). Drivers and kernel patch
     to be found at  <http://www.initio.com/suse.htm>

  o  SoundBlaster 16 SCSI-2 (Adaptec 152x compatible) (ISA)

  o  Tekram DC-390, DC-390W/U/F

  o  Trantor T128/T128F/T228 (ISA)

  o  UltraStor 14F (ISA), 24F (EISA), 34F (VLB)

  o  Western Digital WD7000 SCSI


  9.2.  Alpha, Beta drivers


  o  AMD AM79C974 (PCI) (Compaq, HP, Zeos onboard SCSI)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/AM53C974-0.3.tgz>

  o  Adaptec ACB-40xx SCSI-MFM/RLL bridgeboard
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/adaptec-40XX.tar.gz>

  o  Always Technologies AL-500
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/al500-0.2.tar.gz>

  o  Iomega PC2/2B
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/iomega_pc2-1.1.x.tar.gz>

  o  Ricoh GSI-8
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/gsi8.tar.gz>


  9.3.  Unsupported


  o  Adaptec AHA 2940UW Pro

  o  Adaptec AAA-13x RAID Adapters

  o  Adaptec AAA-113x Raid Port Cards

  o  Adaptec AIC-7810


  o  NCR chip 53C710 (ISA) (old obsolete chip, but still used in some
     Compaq models)

  o  Non Adaptec compatible DTC boards (327x, 328x)


  10.  Controllers (I/O)

  Any standard serial/parallel/joystick/combo cards. Linux supports
  8250, 16450, 16550, and 16550A UART's. Cards that support non-standard
  IRQ's (IRQ > 9) can be used.

  See National Semiconductor's ``Application Note AN-493'' by Martin S.
  Michael. Section 5.0 describes in detail the differences between the
  NS16550 and NS16550A. Briefly, the NS16550 had bugs in the FIFO
  circuits, but the NS16550A (and later) chips fixed those. However,
  there were very few NS16550's produced by National, long ago, so these
  should be very rare. And many of the ``16550'' parts in actual modern
  boards are from the many manufacturers of compatible parts, which may
  not use the National ``A'' suffix. Also, some multiport boards will
  use 16552 or 16554 or various other multiport or multifunction chips
  from National or other suppliers (generally in a dense package
  soldered to the board, not a 40 pin DIP). Mostly, don't worry about it
  unless you encounter a very old 40 pin DIP National ``NS16550'' (no A)
  chip loose or in an old board, in which case treat it as a 16450 (no
  FIFO) rather than a 16550A. - Zhahai Stewart <zstewart@hisys.com>


  11.  Controllers (multiport)

  11.1.  Non-intelligent cards

  11.1.1.  Supported


  o  AST FourPort and clones (4 port)

  o  Accent Async-4 (4 port)

  o  Arnet Multiport-8 (8 port)

  o  Bell Technologies HUB6 (6 port)

  o  Boca BB-1004, 1008 (4, 8 port) - no DTR, DSR, and CD

  o  Boca BB-2016 (16 port)

  o  Boca IO/AT66 (6 port)

  o  Boca IO 2by4 (4 serial / 2 parallel, uses 5 IRQ's)

  o  Computone ValuePort (4, 6, 8 port) (AST FourPort compatible)

  o  DigiBoard PC/X, PC/Xem, PCI/Xem, EISA/Xem, PCI/Xr (4, 8, 16 port)

  o  Comtrol Hostess 550 (4, 8 port)

  o  PC-COMM 4-port (4 port)

  o  SIIG I/O Expander 4S (4 port, uses 4 IRQ's)

  o  STB 4-COM (4 port)

  o  Twincom ACI/550


  o  Usenet Serial Board II (4 port)

  Non-intelligent cards usually come in two varieties, one using
  standard com port addresses and use 4 IRQ's, and another that's AST
  FourPort compatible and uses a selectable block of addresses and a
  single IRQ. (Addresses and IRQ's are set using setserial.) If you're
  getting one of these cards, be sure to check which standard it
  conforms to, prices are no indication.


  11.2.  Intelligent cards

  11.2.1.  Supported


  o  Computone IntelliPort II (4/8/16 port)
     <ftp://ftp.computone.com/pub/bbs/beta/ip2linux-1.0.2.tar.gz>

  o  Cyclades Cyclom-Y (RISC-based, 8-32 ports) (ISA/PCI)
     <http://www.cyclades.com/>

  o  Cyclades-Z (high-end, 16-64 ports) (PCI)
     <http://www.cyclades.com/>

  o  DigiBoard PC/Xe (ISA), PC/Xi (EISA) and PC/Xeve
     <ftp://ftp.digibd.com/drivers/linux/>

  o  Equinox SST Intelligent serial I/O cards
     <http://www.equinox.com>

  o  Hayes ESP 1, 2 and 8 port versions
     Included in kernel since 2.1.15. The driver for kernel versions
     2.0.x can be found at  <http://www.nyx.net/~arobinso>

  o  Stallion EasyIO (ISA) / EasyConnection 8/32 (ISA/MCA) /
     EasyConnection 8/64 (PCI)
     For DIP switch settings and configuration files check
     <http://www.stallion.com>

  o  Stallion EasyConnection 8/64 (ISA/EISA) / ONboard (ISA/EISA/MCA) /
     Brumby (ISA)
     The latest driver can be found at
     <ftp://ftp.stallion.com/drivers/ata5/Linux/v544.tar.gz>


  11.2.2.  Alpha, Beta drivers


  o  Comtrol RocketPort (8/16/32 port)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/serial/comtrol-1.04.tar.gz>
     (kernels 1.2.x). A driver for kernels 2.x can be found at
     <http://ftp.leidenuniv.nl/linux/tsx-11/packages/comtrol/>

  o  DigiBoard COM/Xi
     Contact Simon Park (si@wimpol.demon.co.uk) or Mark Hatle
     (fray@krypton.mankato.msus.edu). NOTE: both email addresses seem
     not to exist any longer.

  o  Moxa C102, C104, C168, C218 (8 port), C320 (8/16/24/32 expandable)
     and C320T
     <ftp://ftp.moxa.com.tw/drivers/linux/>

  o  RISCom/8

  o  Specialix SIO/XIO (modular, 4 to 32 ports)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/serial/sidrv.taz>
  o  Specialix IO8+
     Contact devices@BitWizard.nl


  12.  Network adapters

  Ethernet adapters vary greatly in performance. In general the newer
  the design the better. Some very old cards like the 3Com 3c501 are
  only useful because they can be found in junk heaps for $5 a time. Be
  careful with clones, not all are good clones and bad clones often
  cause erratic lockups under Linux. Read the Ethernet HOWTO,
  <http://metalab.unc.edu/LDP/HOWTO/>, for detailed descriptions of
  various cards.


  12.1.  Supported

  12.1.1.  Ethernet

  For ethernet cards with the DECchip DC21x4x family the "Tulip" driver
  is available. More information on this driver can be found at
  <http://cesdis.gsfc.nasa.gov/linux/drivers/tulip.html>.


  o  3Com 3c501 - ``avoid like the plague'' (3c501 driver)

  o  3Com 3c503 (3c503 driver), 3c505 (3c505 driver), 3c507 (3c507
     driver), 3c509/3c509B (ISA) / 3c579 (EISA)

  o  3Com Etherlink III Vortex Ethercards (3c590, 3c592, 3c595, 3c597)
     (PCI), 3Com Etherlink XL Boomerang (3c900, 3c905) (PCI) and Cyclone
     (3c905B, 3c980) Ethercards (3c59x driver) and 3Com Fast EtherLink
     Ethercard (3c515) (ISA) (3c515 driver)
     Newer versions of this drivers are available at
     <http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html>
     Avoid the 3c900 card when possible as the driver is not functioning
     well for this card.

  o  3Com 3ccfe575 Cyclone Cardbus (3c59x driver)

  o  3Com 3c575 series Cardbus (3c59x driver) (ALL PCMCIA ??)

  o  AMD LANCE (79C960) / PCnet-ISA/PCI (AT1500, HP J2405A,
     NE1500/NE2100)

  o  AT&T GIS WaveLAN

  o  Allied Telesis AT1700

  o  Allied Telesis LA100PCI-T

  o  Allied Telesyn AT2400T/BT ("ne" module)

  o  Ansel Communications AC3200 (EISA)

  o  Apricot Xen-II / 82596

  o  Cabletron E21xx

  o  Cogent EM110

  o  Crystal Lan CS8920, Cs8900
     <http://www.cirrus.com/private/drivers/ethernet/edrivers.html>

  o  Danpex EN-9400

  o  DEC DE425 (EISA) / DE434/DE435 (PCI) / DE450/DE500 (DE4x5 driver)

  o  DEC DE450/DE500-XA (dc21x4x) (Tulip driver)

  o  DEC DEPCA and EtherWORKS

  o  DEC EtherWORKS 3 (DE203, DE204, DE205)

  o  DEC QSilver's (Tulip driver)

  o  Digi International RightSwitch

  o  DLink DE-220P, DE-528CT, DE-530+, DFE-500TX, DFE-530TX
     More information at  <http://www.dlink.ca/linux.html>

  o  Fujitsu FMV-181/182/183/184

  o  HP PCLAN (27245 and 27xxx series)

  o  HP PCLAN PLUS (27247B and 27252A)

  o  HP 10/100VG PCLAN (J2577, J2573, 27248B, J2585) (ISA/EISA/PCI)
     More information at
     <http://cesdis1.gsfc.nasa.gov:80/linux/drivers/100vg.html>

  o  ICL EtherTeam 16i / 32 (EISA)

  o  Intel EtherExpress

  o  Intel EtherExpress Pro

  o  KTI ET16/P-D2, ET16/P-DC ISA (work jumperless and with hardware-
     configuration options)

  o  Macromate MN-220P (PnP or NE2000 mode)

  o  NCR WaveLAN

  o  NE2000/NE1000 (be careful with clones)

  o  Netgear FA-310TX (Tulip chip)

  o  New Media Ethernet

  o  PureData PDUC8028, PDI8023

  o  SEEQ 8005

  o  SMC Ultra / EtherEZ (ISA)

  o  SMC 9000 series

  o  SMC PCI EtherPower 10/100 (Tulip driver)

  o  SMC EtherPower II (epic100.c driver)

  o  Sun LANCE adapters (kernel 2.2 and newer)

  o  Sun Intel adapters (kernel 2.2 and newer)

  o  Schneider & Koch G16

  o  Western Digital WD80x3

  o  Zenith Z-Note / IBM ThinkPad 300 built-in adapter

  o  Znyx 312 etherarray (Tulip driver)


  12.1.2.  ISDN


  o  Linux ISDN WWW page
     This page seems to be gone ??

  o  ISDN4Linux tools are available from
     <ftp://ftp.franken.de/pub/isdn4linux/v2.0>


  o  3Com Sonix Arpeggio
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/network/sonix.tgz>

  o  ASUSCOM Network Inc. ISDNLink 128K PC adapter (HiSax)

  o  AVM A1 (HiSax)

  o  AVM B1 (avmb1)

  o  Combinet EVERYWARE 1000 ISDN
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/network/combinet1000isdn-1.02.tar.gz>

  o  Compaq ISDN S0 (ISA) (HiSax)

  o  Creatix PnP S0 (HiSax)

  o  Dr. Neuhaus Niccy PnP/PCI (HiSax)

  o  Dynalink IS64PH (HiSax)

  o  Eicon.Diehl Diva 2.0 (ISA/PCI) (S0 and U interface, no PRO version)
     (HiSax)

  o  Eicon.Diehl Diva Piccola (HiSax)

  o  Elsa Microlink PCC-16, PCF, PCF-Pro, PCC-8 (HiSax)

  o  ELSA QuickStep 1000/1000PCI/3000 (HiSax)

  o  HFC-2BS0 based cards (HiSax)

  o  IBM Active 2000 (ISA) (act2000)

  o  ICN ISDN cards (icn)

  o  Ith Kommunikationstechnik GmbH MIC 16 (ISA) (HiSax)

  o  ITK ix1-micro Rev.2 (HiSax)

  o  Octal PCBIT (pcbit)

  o  Sedlbauer Speed Card (HiSax)

  o  Teles SO-8/SO-16.0/SO-16.3/SO-16.3c/SO-16.4 and compatible ones
     (HiSax)

  o  Traverse Technologie NETjet PCI S0 (HiSax)

  o  USR Sportster internal TA (HiSax)

     ISDN cards that emulate standard modems or common Ethernet adapters
     don't need any special drivers to work.

  12.1.3.  Frame Relay


  o  Emerging Technologies Inc Synchronous Adapters (
     <http://www.etinc.com>)

  o  ET/5025 (1 port, 8-bit ISA)

  o  ET/5025-16 (2 ports, 16-bit ISA)

  o  ET/5025-25 (2 ports, 16-bit ISA)

  o  ET/5025pq (4 ports, PCI)


  12.1.4.  Wireless


  o  ZCOM WL2420 ISA
     Product information can be found at  <http://www.zcom.com.tw>.
     Object file kernel drivers are available at
     <www.boerde.de/~matthias/airnet/zcom_v12>


  12.1.5.  X25


  o  Emerging Technologies Inc Synchronous Adapters (
     <http://www.etinc.com>)

  o  ET/5025 (1 port, 8-bit ISA)

  o  ET/5025-16 (2 ports, 16-bit ISA)

  o  ET/5025-25 (2 ports, 16-bit ISA)

  o  ET/5025pq (4 ports, PCI)


  12.1.6.  Pocket and portable adapters


  o  For more information on Linux and use of the parallel port, go to
     the Linux Parallel Port Home Page  <http://www.torque.net/linux-
     pp.html> or  <http://www.torque.net/parport/>. Check Appendix C for
     a complete list of supported parallel port devices (excluding
     printers)


  12.1.7.  Slotless


  o  SLIP/CSLIP/PPP (serial port)

  o  EQL (serial IP load balancing)

  o  PLIP (parallel port) - using ``LapLink cable'' or bi-directional
     cable


  12.1.8.  ARCnet


  o  Works with all ARCnet cards


  12.1.9.  Take a look at the token ring web siteurlnam <http://www.lin-
  uxtr.net> TokenRing


  o  3Com 3C619/B/C Tokenlink 16/4 (ibmtr)

  o  3Com 3C319 Velocity ISA (ibmtr)

  o  IBM PCI token ring adapter

  o  IBM Wake on Lan TR adapter

  o  IBM 16/4 TR PCI Adapter 2, Adapter 2 Wake on Lan, Adapter 2 Wake on
     Lan Special

  o  IBM High Speedd 100/16/4 token ring

  o  IBM ISA 16/4, MCA 16/4 (ibmtr)

  o  IBM Tropic chipset cards

  o  Olicom RapidFire 3139, 3140, 3141, 3540
     <http://www.olicom.com>

  o  Olicom OC-3136, OC-3137, OC-3138, OC-3129
     <http://www.olicom.com>

  o  Madge Smart 100/16/4 PCI, 16/4 PCI Mk3, 16/4 PCI Mk2
     <http://www.madge.com>

  o  Madge Presto PCI, 16/4 CardBus
     <http://www.madge.com>

  o  Syskonnect TR4/16(+) SK-4190 ISA, SK-4590 PCI, SK-4591 PCI (sktr)


  12.1.10.  FDDI


  o  DEC DEFEA (EISA) / DEFPA (PCI) (kernel 2.0.24 and later)


  12.1.11.  Amateur radio (AX.25)


  o  Gracilis PackeTwin

  o  Ottawa PI/PI2

  o  Most generic 8530 based HDLC boards


  12.1.12.  PCMCIA cards


  o  See Appendix B for complete list or the webpages of David Hinds at
     <http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html>


  12.2.  Alpha, Beta drivers

  12.2.1.  Ethernet


  o  Racal-Interlan NI5210 (i82586 Ethernet chip). Improved support in
     kernel 2.2 and newer
  o  Racal-Interlan NI6510 (am7990 lance chip). Starting with kernel
     1.3.66 more than 16Mb Ram is supported.

  o  Racal-Interlan PCI card (AMD PC net chip 97c970) ??


  12.2.2.  ISDN


  o  SpellCaster's Datacomute/BRI, Telecomute/BRI (ISA) (sc)


  12.2.3.  ATM


  o  Efficient Networks ENI155P-MF 155 Mbps ATM adapter (PCI)
     <http://lrcwww.epfl.ch/linux-atm/>


  12.2.4.  Frame Relay


  o  Sangoma S502 56K Frame Relay card
     <ftp://ftp.sovereign.org/pub/wan/fr/>


  12.2.5.  Wireless


  o  Proxim RangeLan2 7100 (ISA) / 630x (OEM mini-ISA)
     <http://www.komacke.com/distribution.html>


  12.3.  Unsupported


  o  3Com 3C359 Velocity XL PCI

  o  3Com 3C339 Velocity PCI

  o  IBM PCI LANStreamer, MCA LANStreamer token ring

  o  Intel TokenExpress PRO, TokenExpress 16/4

  o  Sysconnect / Schneider & Koch Token Ring cards (all of them)


  13.  Sound cards


  More information on sound drivers and sound cards can be found on
  <http://www.opensound.com/ossfree> or
  <http://www.opensound.com/oss.html>.

  13.1.  Supported


  o  4Front Technology Virtual Mixer (includes SoftOSS)

  o  4Front Technology Virtual Synth (SoftOSS)

  o  6850 UART MIDI

  o  A-Plus Sound of Music (OPL3-SA)


  o  A-Trend Harmony 3Ds751 (PCI)

  o  AcerMagic S23

  o  Adlib FM synthesizer card

  o  Adlib MSC 16 PnP (CS4235)

  o  AMD Interwave reference card

  o  ARC Probook

  o  Audio Excell DSP16

  o  Avance Logic ALS-007 chip based cards.
     Code for this chip is integrated in the Sound Blaster 16 driver.
     Isapnptools should be used for configuration.

  o  AW32 Pro (R2.2-W2)

  o  AW35 (CS4237)

  o  AW37 Pro (CS4235)

  o  Aztech Sound Galaxy NX Pro, NX Pro 16, WaveRider 32+

  o  Aztech Washington

  o  BTC Mozart Sound System

  o  BTC-1831 Sound Card (Opti 1688)

  o  Bravo Sound Card (Opti 82C930)

  o  Bull PowerPc builtin audio

  o  CDR4235-6/-8

  o  CS32-3DI

  o  Compaq Deskpro XL integrated Business Audio

  o  Creative EMU8000 add on (PnP)

  o  Creative Phone Blaster 28.8/33.6

  o  Creative Sound Blaster 1.0 to 2.0

  o  Creative Sound Blaster Pro

  o  Creative Sound Blaster 16

  o  Creative Sound Blaster 16 ASP

  o  Creative Sound Blaster 16 PnP (type-1 upto type-10)

  o  Creative Sound Blaster 16 Vibra

  o  Creative Sound Blaster 2.x

  o  Creative Sound Blaster 32/AWE

  o  Creative Sound Blaster 32/AWE PnP (type-1 upto type-10)

  o  Creative Sound Blaster AWE64 (type-1 upto type-7)

  o  Creative Sound Blaster AWE64 Gold (type-1 and type-2)

  o  Creative Sound Blaster PCI64/128

  o  Creative Sound Blaster AWE64/Gold and 16/32/AWE PnP cards need to
     be activated using isapnptools

  o  Creative ViBRA16C/CL/S (type-1 and type-2) PnP

  o  Creative ViBRA16X PnP (half duplex only)

  o  CrystaLake Crystal Clear Series 100

  o  Crystal Audio (CS4235)

  o  Crystal CRD4236B-1E

  o  Crystal CRD4237B-5/-8

  o  Crystal CSC0B35 (CS4236B)

  o  Crystal CX4237B-SIDE

  o  Crystal Onboard PnP Audio (CS4235)

  o  Dell Latidude builtin audio

  o  Diamond Crystal MM PC/104

  o  Digital AXP builtin audio

  o  ECHO-PSS cards (Orchid SoundWave32, Cardinal DSP16)

  o  ESS 1868, 1869 (type-1 and type-2), 1878, 1879, 1968 PnP
     AudioDrive

  o  Ensoniq AudioPCI (ES1371)

  o  Ensoniq AudioPCI / SoundBlaster PCI (ES1370)

  o  Ensoniq Soundscape Elite

  o  Ensoniq Soundscape PnP (model 1 and 2)

  o  Ensoniq Soundscape S-2000

  o  Ensoniq Soundscape VIVO, VIVO90

  o  Ensoniq ActionNote 880 C/CX

  o  Gallant's sound card (SC-6000 and SC-66000 based)

  o  Generic AD1815 based soundcard (PnP)

  o  Generic CMI8330 based soundcard (PnP)

  o  Generic Crystal CS4232 based soundcard or motherboard (non PnP)

  o  Generic Crystal CS4232 by Acer (PnP mode)

  o  Generic Crystal CS4232 type-1 upto type-3 (PnP mode)

  o  Generic Crystal CS4235 type-1

  o  Generic Crystal CS4236 (type-1 upto type-3)

  o  Generic Crystal CS4236 based soundcard or motherboard (non PnP)

  o  Generic Crystal CS4236A (type-1 and type-2), CS4236B

  o  Generic Crystal CS4237 based soundcard or motherboard (non PnP)

  o  Generic Crystal CS4237B (type-1 and type-2)

  o  Generic Crystal CS4238 based soundcard or motherboard (non PnP)

  o  Generic ESS ES688, ES1688, ES1788, ES1868, ES1869, ES1887, ES1888
     based soundcard or motherboard

  o  Generic Jazz16 based soundcard

  o  Generic MAD16 (OPTi 82C928), MAD16 Pro, MAD16 Pro (duplex) (OPTi
     82C929)

  o  Generic Mozart soundcard (OAK OTI-601 chip)

  o  Generic OPTi 82C924, 82C925 based sound card (PnP)

  o  Generic OPTi 82C924 soundcard (non PnP mode). Use the MSS driver
     and the isapnp tools

  o  Generic OPTi 82C930

  o  Generic OPTi 82C931
     See  <http://spoke.nols.com/~drees/opti931.html>

  o  Generic Soundscape based soundcard

  o  Generic Windows Sound System compatible

  o  Generic Yamaha OPL3-SA1 (YMF701) based soundcard

  o  Generic Yamaha OPL3-SA2 (YMF711) based soundcard (type-1, type-3,
     type-4)

  o  Generic Yamaha OPL3-SA3 (YMF715) based soundcard

  o  Generic Yamaha OPL3-SAx (YMF715/YMF719) non-PnP

  o  Gravis Ultrasound

  o  Gravis Ultrasound Extreme

  o  Gravis Ultrasound 16-bit sampling daughterboard

  o  Gravis Ultrasound MAX

  o  Gravis Ultrasound ACE

  o  Gravis Ultrasound PnP (with RAM), PnP Pro

  o  HP OmniBook 2100 (CS4236)

  o  Home Studio 64 (analog audio only)

  o  IBM Audio Feature (CS423x)

  o  Logitech SoundMan Games (SBPro, 44kHz stereo support)

  o  Logitech SoundMan Wave (Jazz16/OPL4)


  o  Logitech SoundMan 16 (PAS-16 compatible)

  o  MED3201 audio card

  o  Maxi Sound 32 PnP (analog audio only)

  o  Maxi Sound 64 Dynamic 3D (analog audio only)

  o  Media Sound SW/32 (non PnP mode)

  o  MediaTriX AudioTriX Pro, 3D XG

  o  Media Vision Premium 3D (Jazz16)

  o  Media Vision Pro Sonic 16 (Jazz)

  o  Media Vision Pro Audio Spectrum 16 (PAS-16)

  o  Media Vision Pro Audio Studio 16

  o  Media Vision Thunderboard

  o  Microsoft Windows Sound System board (AD1848)

  o  MiroSound PCM!-pro

  o  MultiWave AudioWave Green 16

  o  Music Quest MIDI connector card (MCC)

  o  Music Quest MQX-16, MQX-16S MIDI adapter

  o  Music Quest MQX-32, MQX-32M MIDI adapter

  o  Music Quest PC MIDI card

  o  NEC Harmony

  o  Orchid SoundDrive 16EZ

  o  Pine PT201

  o  Primax SoundStorm FM 16, SoundStorm Wave

  o  Pro Audio Spectrum 16, Studio 16

  o  RME Digi32, Digi32 Pro, Digi32/8

  o  Reveal SC300

  o  Reveal WaveExtreme Pro (with RAM)

  o  Roland MPU IPC-T MIDI adapter

  o  S3 SonicVibes

  o  Shark Mako

  o  Sharp PC8800

  o  Shuttle Sound System 48

  o  Spacewalker HOT-255 PCI 3D (PCI)

  o  TerraTec Maestro 32/96

  o  Terratec EWS64XL (audio only)

  o  Terratec Sound System Base 1 (AD1816)

  o  Terratec Sound System Base 64 (AD1816)

  o  Tomato Sound System (OPTi 82C930)

  o  Trust Sound Expert De Luxe Wave 32

  o  Turtle Beach Classic/Tahiti/Monterey

  o  Turtle Beach Maui

  o  Turtle Beach Monte Carlo 928, Monte Carlo 929

  o  Turtle Beach Pinnacle/Fiji

  o  Turtle Beach Tropez, Tropez Plus (audio only)

  o  Turtle Beach Daytona (audio only)

  o  Wearnes Classic 16

  o  Yamaha Sound Edge SW20-PC

  o  Zefiro Acoustics ZA2 (NOT RECOMMENDED)

  o  Zenith Z-Player


  o  AWE32/64 supports is started in kernel series 2.1.x (check the
     SoundBlaster AWE mini-HOWTO by Marcus Brinkmann for installation
     details)

  o  MPU-401 MIDI Intelligent mode (don't enable blindly)

  o  MPU IPC-T

  o  MQX-32M

  o  MPU-401 MIDI UART only dumb port (don't enable blindly)

  o  Yamaha FM synthesizers (OPL2, OPL3, OPL3-SAx (since kernel series
     2.1.x) and OPL4)

  OSS supports all MIDI daughter cards including Wave Blaster, TB Rio
  and Yamaha DB50XG. The only requirement is that the "host" card is
  supported by OSS. Note that only the "host" card needs to be
  configured using soundconf. The daughter card will be automatically
  accessible through the MIDI of the "host" card.


  13.2.  Alpha, Beta drivers


  o  4Front Tech. Waveloop loopback audio device

  o  Acer FX-3D (AD1816 based)

  o  AVM Apex Pro card (AD1816 based)

  o  Aztech AZT1008, AZT2320, AZT3000

  o  Aztech SC-16 3D (AD1816 based)

  o  Creative Sound Blaster Vibra16x

  o  Creative Sound Blaster Live! and Live! Value Edition
     Creative Labs has beta driver for this card. They work with kernels
     2.0.36 and 2.2.5 (and most probably newer kernels in these series).
     The drivers can be downloaded under the software download area at
     <http://www.creativelabs.com>

  o  Highscreen Sound-Boostar 32 Wave 3D (AD1816 based)

  o  Highscreen Sound-Boostar 16 (AD1816 based)

  o  HP Kayak (AD1816 based)

  o  IBM MWave

  o  Newcom SC-16 3D (AD1816 based)

  o  PC speaker / Parallel port DAC
     <ftp://ftp.informatik.hu-berlin.de/pub/os/linux/hu-sound/>

  o  Rockwell WaveArtist chipset

  o  Sonorus STUDI/O

  o  SY-1816 (AD1816 based)

  o  Terratec Base 1, Base 64 (AD1816 based)

  o  Terratec EWS64S (AD1816 based)

  o  Turtle Beach Malibu
     <ftp://ftp.cs.colorado.edu/users/mccreary/archive/tbeach/multisound/>

  For the AD1816 sound chip based sound cards isapnptools is needed for
  configuration.


  13.3.  Unsupported


  o  A-Trend Harmony 3DS724 (PCI)

  o  Actech PCI 388-A3D q

  o  Adaptec AME-1570

  o  Aureal Vortex (PCI)

  o  Cardinal DSP 16

  o  Contributed lowlevel drivers

  o  Crystal CS4614 (PCI)

  o  Cyrix MediaGX builtin audio

  o  Diamond Monster Sound MX300

  o  Diamond Sonic Impact

  o  Dream 94PnP Home Studio

  o  EON Bach SP901 (A3D)


  o  ESS (PCI)

  o  ESS Maestro-1 (PCI), Maestro-2 (PCI)

  o  ESS Solo-1 (PCI)

  o  Echo Personal Sound System

  o  Generic ALS007, ALS100 based soundcard

  o  Orchid NuSound 3D

  o  Orchid SoundWave 32

  o  Paradise DSP-16

  o  Quicknet Internet LineJACK

  o  Terratec XLerate (A3D)

  o  Turtle Beach Montego

  o  Turtle Beach TBS-2000

  o  Videologic SonicStorm

  o  Wearnes Beethoven ADSP-16

  o  Western Digital Paradise DSP-16

  o  Yamaha YMF724 (PCI)

  The ASP chip on Sound Blaster 16 series is not supported. AWE32's
  onboard E-mu MIDI synthesizer is not supported.

  Nathan Laredo <laredo@gnu.ai.mit.edu> is willing to write AWE32
  drivers if you send him a complimentary card. He is also willing to
  write drivers for almost any hardware if you send him free samples of
  your hardware.

  Sound Blaster 16's with DSP 4.11 and 4.12 have a hardware bug that
  causes hung/stuck notes when playing MIDI and digital audio at the
  same time. The problem can happen with either Wave Blaster
  daughterboards or MIDI devices attached to the MIDI port. There is no
  known fix.


  14.  Hard drives

  All hard drives should work if the controller is supported.

  (From the SCSI HOWTO) All direct access SCSI devices with a block size
  of 256, 512, or 1024 bytes should work. Other block sizes will not
  work (Note that this can often be fixed by changing the block and/or
  sector sizes using the MODE SELECT SCSI command).

  Large IDE (EIDE) drives work fine with newer kernels. The boot
  partition must lie in the first 1024 cylinders due to PC BIOS
  limitations.

  Some Conner CFP1060S drives may have problems with Linux and ext2fs.
  The symptoms are inode errors during e2fsck and corrupt file systems.
  Conner has released a firmware upgrade to fix this problem, contact
  Conner at 1-800-4CONNER (US) or +44-1294-315333 (Europe). Have the
  microcode version (found on the drive label, 9WA1.6x) handy when you
  call.
  Many Maxtor and Western Digital IDE drives are reported to not happily
  co-exist on the same IDE cable with the other manufacturers drive.
  Usually one of the drives will fail during operation. Solution is to
  put them on different IDE cables.

  Certain Micropolis drives have problems with Adaptec and BusLogic
  cards, contact the drive manufacturers for firmware upgrades if you
  suspect problems.


  o  Multiple device driver (RAID-0, RAID-1)
     <ftp://sweet-smoke.ufr-info-p7.ibp.fr/public/Linux/>


  14.1.  Unsupported

  The following hard drives are mentioned as not supported by Linux.
  Read the bug report available.


  o  NEC D3817, D3825, D3827, D3847
     "These drives are slightly non-SCSI-2 compliant in the values
     reported in Mode Sense Page 3. In Mode Sense Page 3 all NEC D38x7
     drives report their sector size as zero. The NEC drives are the
     first brand of drive we have ever encountered that reported the
     sector size as zero. Unfortunately, that field in Mode Sense Page 3
     is not modifiable and there is no way to update the firmware on the
     D38x7 drives to correct this problem." Problems are mentioned for
     D3825 and D3827 (both revision 0407). Revision 0410 of these two
     hard drives seems to solve this problem.


  15.  Tape drives

  15.1.  Supported


  o  SCSI tape drives
     (From the SCSI HOWTO) Drives using both fixed and variable length
     blocks smaller than the driver buffer length (set to 32k in the
     distribution sources) are supported. Virtually all drives should
     work. (Send mail if you know of any incompatible drives.)

  o  Seagate Sidewinder 50 AIT (on ICP 6527 RAID-controller)

  o  QIC-02 drives

  o  Iomega Ditto internal (ftape 3.04c and newer)


  15.2.  Alpha, Beta drivers


  o  QIC-117, QIC-40/80, QIC-3010/3020 (QIC-WIDE) drives
     Most tape drives using the floppy controller should work. Various
     dedicated controllers (Colorado FC-10/FC-20, Mountain Mach-2,
     Iomega Tape Controller II) are also supported
     <ftp://metalab.unc.edu/pub/Linux/kernel/tapes>

  o  ATAPI tape drives
     For these an alpha driver (ide-tape.c) is available in the kernel.
     ATAPI tape drives supported are

  o  Seagate TapeStor 8000


  o  Conner CTMA 4000 IDE ATAPI Streaming tape drive


  15.3.  Unsupported


  o  Emerald and Tecmar QIC-02 tape controller cards - Chris Ulrich
     <insom@math.ucr.edu>

  o  Drives that connect to the parallel port (eg: Colorado Trakker)

  o  Some high speed tape controllers (Colorado TC-15)

  o  Irwin AX250L/Accutrak 250 (not QIC-80)

  o  IBM Internal Tape Backup Unit (not QIC-80)

  o  COREtape Light


  16.  CD-ROM drives

  For more information on CD-ROM drives check the CDROM-HOWTO at
  <http://metalab.unc.edu/LDP/HOWTO/>.


  16.1.  Supported


  Common CD-ROM drives

  o  SCSI CD-ROM drives
     (From the CD-ROM HOWTO) Any SCSI CD-ROM drive with a block size of
     512 or 2048 bytes should work under Linux; this includes the vast
     majority of CD-ROM drives on the market.

  o  EIDE (ATAPI) CD-ROM drives (IDECD)
     Almost all double, quad and six speed drives are supported,
     including

  o  Mitsumi FX400

  o  Nec-260

  o  Sony 55E

  Proprietary CD-ROM drives

  o  Aztech CDA268-01A, Orchid CDS-3110, Okano/Wearnes CDD-110, Conrad
     TXC, CyCDROM CR520ie/CR540ie/CR940ie (AZTCD)

  o  Creative Labs CD-200(F) (SBPCD)

  o  Funai E2550UA/MK4015 (SBPCD)

  o  GoldStar R420 (GSCD)

  o  IBM External ISA (SBPCD)

  o  Kotobuki (SBPCD)

  o  Lasermate CR328A (OPTCD)

  o  LMS Philips CM 206 (CM206)


  o  Longshine LCS-7260 (SBPCD)

  o  Matsushita/Panasonic CR-521/522/523/562/563 (SBPCD)

  o  MicroSolutions Backpack parallel portdrive (BPCD)

  o  Mitsumi CR DC LU05S (MCD/MCDX)

  o  Mitsumi FX001D/F (MCD/MCDX)

  o  Optics Storage Dolphin 8000AT (OPTCD)

  o  Sanyo CDR-H94A (SJCD)

  o  Sony CDU31A/CDU33A (CDU31A)

  o  Sony CDU-510/CDU-515 (SOMYCD535)

  o  Sony CDU-535/CDU-531 (SONYCD535)

  o  Teac CD-55A SuperQuad (SBPCD)


  16.2.  Alpha, Beta drivers


  o  LMS/Philips CM 205/225/202
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cdrom/lmscd0.4.tar.gz>

  o  NEC CDR-35D (old)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cdrom/linux-
     neccdr35d.patch>

  o  Sony SCSI multisession CD-XA
     <ftp://tsx-11.mit.edu/pub/linux/patches/sony-multi-0.00.tar.gz>

  o  Parallel Port Driver
     <http://www.torque.net/linux-pp.html>



  16.3.  Notes

  All CD-ROM drives should work similarly for reading data. There are
  various compatibility problems with audio CD playing utilities.
  (Especially with newer low-end NEC drives.) Some alpha drivers may not
  have audio support yet.

  Early (single speed) NEC CD-ROM drives may have trouble with currently
  available SCSI controllers.

  PhotoCD (XA) is supported. The hpcdtoppm program by Hadmut Danisch
  converts PhotoCD files to the portable pixmap format. The program can
  be obtained from  <ftp://ftp.gwdg.de/pub/linux/hpcdtoppm> or as part
  of the PBM utilities.

  Also, reading video CD is supported in kernel series 2.1.3x and later.
  A patch is available for kernel 2.0.30.

  Finally, most IDE CD-ROM Changers are supported.


  17.  CD-Writers

  Many CD-Writers are supported by Linux now. For an up to date list of
  CD-Writers supported check the CD-Writing mini-HOWTO at
  <http://metalab.unc.edu/LDP/HOWTO/CD-Writing-HOWTO.html>, check
  <http://www.shop.de/cgi-bin/winni/lsc.pl> or check
  <http://www.guug.de:8080/cgi-bin/winni/lsc.pl>. Cdwrite
  <ftp://metalab.unc.edu/pub/Linux/utils/disk-management/> and cdrecord
  <http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>
  can be used for writing CD's. The X-CD-Roast package for Linux is a
  graphical front-end for using CD writers. The package can be found at
  <ftp://metalab.unc.edu/pub/Linux/utils/disk-
  management/xcdroast-0.96d.tar.gz>.


  o  Grundig CDR 100 IPW

  o  HP CD-Writer+ 7100

  o  HP SureStore 4020i

  o  HP SureStore 6020es/i

  o  JVC XR-W2010

  o  Kodak PCD 225

  o  Mitsubishi CDRW-226

  o  Mitsumi CR-2600TE

  o  Olympus CDS 620E

  o  Philips CDD-521/10,522,2000,2600,3610

  o  Pinnacle Micro RCD-5020/5040

  o  Plextor CDR PX-24CS

  o  Ricoh MP 1420C

  o  Ricoh MP 6200S/6201S

  o  Sanyo CRD-R24S

  o  Smart and Friendly Internal 2006 Plus 2.05

  o  Sony CDU 920S/924/926S

  o  Taiyo Yuden EW-50

  o  TEAC CD-R50S

  o  WPI(Wearnes) CDR-632P

  o  WPI(Wearnes) CDRW-622

  o  Yamaha CDR-100

  o  Yamaha CDR-200/200t/200tx

  o  Yamaha CDR-400t/400tx


  18.  Removable drives

  All SCSI drives should work if the controller is supported, including
  optical (MO), WORM, floptical, Bernoulli, Zip, Jaz, SyQuest, PD, and
  others.

  o  Panasonic MO (combines a CD-ROM drive and an optical removable
     disk). You have to set a switch when configuring the kernel to get
     both part work at the same time.

  o  Parallel port Zip drives
     <ftp://gear.torque.net/pub/>

  o  Parallel port Avatar Shark-250
     <http://www.torque.net/parport/>

  Removable drives work like hard disks and floppies, just fdisk/mkfs
  and mount the disks. Linux provides drive locking if your drives
  support it.  mtools can also be used if the disks are in MS-DOS
  format.

  CD-R drives require special software to work. Read the CD-R Mini-
  HOWTO.

  Linux supports both 512 and 1024 bytes/sector disks. Starting with
  kernel 2.1.32 Linux also supports 2048 bytes/sector. A patch to kernel
  2.0.30 is available at <http://liniere.gen.u-tokyo.ac.jp/2048.html>.

  The 2048 bytes/sector support is needed for

  o  Fujitsu magneto-optical disk drives M2513

  Starting with pre-patch-2.0.31-3 IDE/ATAPI internal Zip drives,
  flopticals and PD's are supported.

  o  LS-120 floptical

  o  PD-CD


  19.  Mice

  19.1.  Supported


  o  Microsoft serial mouse

  o  Mouse Systems serial mouse

  o  Logitech Mouseman serial mouse

  o  Logitech serial mouse

  o  ATI XL Inport busmouse

  o  C&T 82C710 (QuickPort) (Toshiba, TI Travelmate)

  o  Microsoft busmouse

  o  Logitech busmouse

  o  PS/2 (auxiliary device) mouse


  19.2.  Alpha, Beta drivers


  o  Sejin J-mouse
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/console/jmouse.1.1.70-jmouse.tar.gz>

  o  MultiMouse - use multiple mouse devices as single mouse
     <ftp://metalab.unc.edu/pub/Linux/system/misc/MultiMouse-1.0.tgz>
  o  Microsoft Intellimouse



  19.3.  Notes

  Touchpad devices like Alps Glidepoint also work, so long they're
  compatible with another mouse protocol.

  Newer Logitech mice (except the Mouseman) use the Microsoft protocol
  and all three buttons do work. Eventhough Microsoft's mice have only
  two buttons, the protocol allows three buttons.

  The mouse port on the ATI Graphics Ultra and Ultra Pro use the
  Logitech busmouse protocol.  (See the Busmouse HOWTO for details.)


  20.  Modems

  All internal modems or external modems connected to the serial port
  should work. Alas, some manufactures have created Windows 95 only
  modems. Check Appendix E for Linux incompatible hardware. Furthermore,
  many flash upgradable modems only have flash programs for Win95/NT.
  These modems cannot be upgraded under Linux.

  A small number of modems come with DOS software that downloads the
  control program at runtime. These can normally be used by loading the
  program under DOS and doing a warm boot. Such modems are probably best
  avoided as you won't be able to use them with non PC hardware in the
  future.

  All PCMCIA modems should work with the PCMCIA drivers.

  Fax modems need appropriated fax software to operate. Also be sure
  that the fax part of the modem supports Class 2 or Class 2.0. It seems
  to be generally true for any fax software on unix that support for
  Class 1.0 is not available.

  An exception to this is the Linux efax program which supports both
  Class 1 and Class 2 fax modems. In some cases there can be a few
  (minor) technical problems with Class 1 modems. If you have a choice
  it is recommend to get a Class 2 modem.


  o  Digicom Connection 96+/14.4+ - DSP code downloading program
     <ftp://metalab.unc.edu/pub/Linux/apps/serialcomm/smdl-
     linux.1.02.tar.gz>

  o  Motorola ModemSURFR internal 56K. Add a couple of line to RC.SERIAL
     to account for IRQ and ports if they are non-standard.

  o  ZyXEL U-1496 series - ZyXEL 1.4, modem/fax/voice control program
     <http://www.pe1chl.demon.nl/ZyXEL/ZyXEL-1.6.tar.gz>

  o  ZyXEL Elite 2864 series - modem/fax/voice control program
     <http://www.pe1chl.demon.nl/ZyXEL/ZyXEL-1.6.tar.gz>

  o  ZyXEL Omni TA 128 - modem/fax/voice control program
     <http://www.pe1chl.demon.nl/ZyXEL/ZyXEL-1.6.tar.gz>

  Also multimodem cards are supported by Linux.

  o  Moreton Bay RAStel multimodem card
     Check  <http://www.moreton.com.au/linux.htm> for Linux drivers.


  The following modem is mentioned not to be supported

  o  Aztech MDP3858 56.6 (PCI)


  21.  Printers/Plotters

  All printers and plotters connected to the parallel or serial port
  should work. Alas, some manufacturers have created Windows 95 only
  printers. Check Appendix E for Linux incompatible hardware.

  o  HP LaserJet 4 series - free-lj4, printing modes control program
     <ftp://metalab.unc.edu/pub/Linux/system/printing/free-
     lj4-1.1p1.tar.gz>

  o  BiTronics parallel port interface
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/misc/bt-
     ALPHA-0.0.1.module.patch.gz>

  o  Epson Stylus Color 850. Use Magicfilter with either of the filters
     'stylus800-filter', 'stylus_color_360dpi-filter' or
     'stylus_color_720dpi-filter'.


  21.1.  Ghostscript

  Many Linux programs output PostScript files. Non-PostScript printers
  can emulate PostScript Level 2 using Ghostscript.

  o  Ghostscript
     <ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/>


  21.1.1.  Ghostscript 5.1 supported printers


  o  Apple Imagewriter

  o  Apple Dot Matrix printer

  o  Apple StyleWriter 2x00 (bjc600)

  o  Brother HL-660 (ljet4)

  o  C. Itoh M8510

  o  Canon BubbleJet BJ10e, BJ20 (bj10e)

  o  Canon BubbleJet BJ100, BJ200, BJC-210 (B/W only), BJC-240 (B/W
     only), BJC-250 (B/W only), BJC-70 (B/W only) (bj200)

  o  Canon BubbleJet BJC-600, BJC-610, BJC-4000, BJC-4100 (B/W only),
     BJC-4200, BJC-4300, BJC-4400, BJC-4550, BJC-210, BJC-450, MultiPASS
     C2500, BJC-240, BJC-70 (bjc600)

  o  Canon BubbleJet BJC-800, BJC-7000 (bjc800)

  o  Canon Bubblejet BJC-610 (uniprint)

  o  Canon LBP-8II, LIPS III

  o  DEC LA50/70/75/75plus

  o  DEC LN03, LJ250 (decl250)


  o  Epson 9 pin, 24 pin, LQ series, AP3250

  o  Epson Stylus Color/Color II/400/500/600/800 (stcolor)

  o  Epson Stylus Color/Color II/500/600/800/1520 (uniprint)

  o  Fujitsu 3400,2400,1200

  o  HP 2563B

  o  HP DesignJet 650C

  o  HP DeskJet, Deskjet Plus (deskjet)

  o  HP Deskjet 500, Deskjet Portable (djet500)

  o  HP Deskjet 500C (cdeskjet)

  o  HP Deskjet 550C (uniprint)

  o  HP DeskJet 400/500C/520C/540C/690C/693C (cdj500)

  o  HP DeskJet
     550C/560C/600/660C/660Cse/682C/683C/693C/694C/695C/850/870Cse
     (cdj550)

  o  HP DeskJet 850/855/870Cse/870Cxi/890C/672C/680/1100C (cdj850)

  o  HP DeskJet 500C/510/520/5540C/693C printing black only (cdjmono)

  o  HP DeskJet 600 (lj4dith)

  o  HP DeskJet 600/870Cse, LaserJet 5/5L/6L (ljet4)

  o  HP Deskjet 600/1200C/1600C (pjxl300)

  o  HP Deskjet 500/500C/510/520/540/550C/560C/850C/855C and other PCL3
     printers
     <ftp:ftp.pdb.sni.de/pub/utilities/misc/hpdj-2.1.tar.gz>

  o  HP Deskjet 710, 720, 820 and 1000 series
     <http://www.httptech.com/ppa/>

  o  HP Paintjet (pjtest)

  o  HP Paintjet XL (pjxltest)

  o  HP PaintJet XL300 (pjxl300)

  o  HP LaserJet/Plus/II/III/4/5/6

  o  IBM 3853 Jetprinter color

  o  IBM Proprinter

  o  Imagen ImPress

  o  Lexmark Optra E+ (ljet4)

  o  Mitsubishi CP50 color

  o  NEC P6/P6+/P60

  o  NEC Pinwriter P2X (uniprint)


  o  NEC SuperScript 860 (ljetplus)

  o  Oki OL410ex LED (ljet4)

  o  Okidata MicroLine 182

  o  Ricoh 4081/6000 (r4081)

  o  SPARCprinter

  o  StarJet 48 inkjet printer

  o  Tektronix 4693d color 2/4/8 bit

  o  Tektronix 4695/4696 inkjet plotter

  o  Xerox XES printers (2700, 3700, 4045, etc.)


  21.1.2.  Alpha, Beta drivers


  o  Epson Stylus Color 440


  22.  Scanners

  For scanner support there is the package SANE (Scanner Access Now
  Easy). Information can be found at  <http://www.mostang.com/sane/>. It
  can be downloaded from  <ftp://ftp.mostang.com/pub/sane/>. This is a
  universal scanner interface. It comes complete with documentation and
  several frontends and backends.

  More information on handheld scanners can be found at
  <http://www.willamowius.de/scanner.html>

  Many scanners also have their own, scanner specific, software packages
  which include drivers.


  22.1.  Supported


  o  A4 Tech AC 4096 / AS 8000P (a4scan)
     <ftp://ftp.informatik.hu-
     berlin.de/pub/local/linux/a4scan/a4scan.tgz>

  o  Adara Image Star I
     ??? <http://fb4-1112.uni-muenster.de/ffwd/>
     ??? <ftp://fb4-1112.uni-muenster.de/pub/ffwd/mtekscan-0.2.tar.gz>

  o  Conrad Personal Scanner 64, P105 handheld scanners (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

  o  Epson GT-5500 (SANE epson)

  o  Epson GT-6000
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/ppic0.5.tar.gz>

  o  Escom Image Scanner 256 (SANE umax)

  o  Fujitsu SCSI-2 scanners
     contact Dr. G.W. Wettstein <greg%wind.UUCP@plains.nodak.edu>


  o  Genius ColorPage-SP2
     ??? <http://fb4-1112.uni-muenster.de/ffwd/>
     ??? <ftp://fb4-1112.uni-muenster.de/pub/ffwd/mtekscan-0.2.tar.gz>

  o  Genius GS-B105G handheld scanner (gs105
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs105-0.0.1.tar.gz>

  o  Genius GeniScan GS-4500, GS-4500A handheld scanners (gs4500
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs4500-2.0.tar.gz>

  o  HighScreen Greyscan 256 handheld scanner (BW only) (gs4500)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs4500-2.0.tar.gz>

  o  HP ScanJet II series SCSI
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/hpscanpbm-0.3a.tar.gz>

  o  HP ScanJet IIc, IIcx, IIp, 3c, 4c, 4p, 5p, 5pse, plus
     <http://www.tummy.com/xvscan/>

  o  Linotype Hell Jade, Jade2 (SANE umax)

  o  Logitech Scanman+, Scanman 32, Scanman 256 handheld scanners
     (logiscan)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/logiscan-0.0.4.tar.gz>

  o  Microtek ScanMaker E3, E6, II, IIXE, III and 35t models
     ??? <http://fb4-1112.uni-muenster.de/ffwd/>
     ??? <ftp://fb4-1112.uni-muenster.de/pub/ffwd/mtekscan-0.2.tar.gz>
     E3 and E6 scanners are also supported by
     <http://www.tummy.com/xvscan/>

  o  Mustek M105 handheld scanner (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

  o  Mustek HT800 Turbo, Matador 105, Matador 256 handheld scanners
     (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

  o  Mustek Paragon 6000CX
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/muscan-2.0.6.taz>

  o  Nikon Coolscan SCSI 35mm film scanner
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/coolscan-0.2.tgz>

  o  Nikon AX-210 (SANE umax)

  o  Pearl 256 handheld scanner (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

  o  Polaroid DMC (SANE dmc)

  o  Vobis/Highscreen Scanboostar Premium (SANE umax)

  o  UMAX SCSI scanners
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/umax-0.5.5.tar.gz>

  o  UMAX Vista S6, S6E, T630, Supervista S-12 (SANE umax)

  o  UMAX S-6E, S-6EG, S-12, S-12G (SANE umax)

  o  UMAX Astra 600S, 610S, 1200S, 1220S (SANE umax)


  o  UMAX UC 630, 840, 1200S, 1200SE (SANE umax)

  o  UMAX UG 80, 630 (SANE umax)

  o  UMAX PSD, Gemini D-16 (SANE umax)

  NOTE:The Mustek drivers work only with GI1904 interface cards. Eric
  Chang eric.chang@chrysalis.org has created a patch to use them with
  IF960 interface cards.


  22.2.  Alpha, Beta drivers


  o  Abaton Scan 300/S (SANE abaton)

  o  Abaton Scan 300/GS (SANE abaton)

  o  Agfa Focus, Focus II (SANE agfafocus)

  o  Agfa Focus Color, Focus Color Plus (SANE agfafocus)

  o  Agfa Focus Lineart (SANE agfafocus)

  o  Agfa Arcus II (SANE microtek)

  o  Agfa StudioScan II, IIsi (SANE microtek)

  o  Agfa SnapScan 300, 310, 600 (SANE snapscan)

  o  Apple Scanner, OneScanner, ColorOneScanner (SANE apple)

  o  Artec/Ultima AT3, AT6, AT12 (SANE artec)

  o  Artec A6000C+ (SANE artec)

  o  Canon CanoScan 300, CanoScan 600, CanoScan 2700F (SANE canon)

  o  Genius Colorpage-Vivid+
     Info can be found on
     <http://thor.prohosting.com/~chrordig/Primax/index.html>. The
     driver can also be found here.

  o  Genius GS-4000, ScanMate/32, ScanMate/GS handheld scanners (gs4500)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs4500-2.0.tar.gz>

  o  HP ScanJet IIc, IIp, IIcx, 3c, 4c, 3p, 4p, 5p, 6100c, 6200c (SANE
     hp)

  o  HP PhotoSmart PhotoScanner (SANE hp)

  o  Kodak DC210 (SANE dc210)

  o  Kodak DC20, DC25 (SANE dc25)

  o  Microtek Scanmaker E2, E3, E6, II, IIG, IIHR, IISP, III, 35t+,
     600Z(S), 600G(S) (SANE microtek)

  o  Microtek ScanMaker E3plus, 330, 630, 636, X6 (SANE microtek2)

  o  Microtek Phantom 636 (SANE microtek2)

  o  Mustek MFC-600S, MFC-600CD, MFC-800S (SANE mustek)

  o  Mustek MFS-6000CX, MFS-6000SP, MFS-8000SP, MFS-1200SP, MFS-12000CX
     (SANE mustek)
  o  Mustek SE-6000SP, SE-12000SP (SANE mustek)

  o  Mustek HT105, M800 handheld scanners (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

  o  Nework Scanny MM100
     Info can be found on
     <http://thor.prohosting.com/~chrordig/Primax/index.html>. The
     driver can also be found here.

  o  Nikon LS-20, LS-30, LS-1000 (SANE Coolscan)

  o  Plustek OpticPro 4830P, OpticPro 4831P, OpticPro 9630P/PL, OpticPro
     600P, OpticPro FBIII, OpticPro FBIV (SANE plustek)
     The sane driver can be found at
     <http://www.efn.org/~rick/plustek/>

  o  Primax Colorado Direct 300, Colorado Direct 600/30bit, Storm
     Totalscan
     Info can be found on
     <http://thor.prohosting.com/~chrordig/Primax/index.html>. The
     driver can also be found here.

  o  Siemens S9036 (SANE agfafocus)

  o  Tamarack Artiscan 6000C, 8000C, 12000C (SANE tamarack)

  o  UMAX Vista-S8, UC-1260, Mirage IIse, PL-II (SANE umax)

  o  Vobis HighScan (SANE microtek2)

  o  Voelkner Personal Scanner 64 handheld scanner (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

  o  Vuego 310S (SANE snapscan)


  22.3.  Unsupported


  o  Acer scanners. Acer is not releasing any programming information.

  o  Escom 256 (Primax Lector Premier 256) handheld scanner

  o  Genius ScanMate/256, ScanMate/Color, EasyScan handheld scanners

  o  Mustek CG 8000 handheld scanner

  o  Primax Colorado Direct 9600, Colorado 1200p, Colorado USB 19200
     Info can be found on
     <http://thor.prohosting.com/~chrordig/Primax/index.html>

  o  Trust Ami Scan handheld scanner

  o  UMAX parallel scanners


  23.  Other hardware

  23.1.  Amateur Radio

  The following cards etc. are supported:


  o  KISS based Terminal Node Controllers

  o  Ottawa PI card

  o  Gracilis PacketTwin card

  o  Other Z8530 SCC based cards

  o  Parallel and serial port Baycom modems

  o  Soundblaster cards

  o  Soundcards based on the Crystal chipset


  23.2.  VESA Power Savings Protocol (DPMS) monitors

  Support for power savings is included in the Linux kernel. Use setterm
  to enable support in the Linux console, and xset to enable support
  under X.


  23.3.  Touch screens

  The Metro-X X-server is supporting the following touch screen
  controllers:

  o  Carrol Touch serial touch screen
     <http://www.carrolltouch.com>

  o  EloGraphics

  o  Lucas Deeco

  o  MicroTouch


  23.4.  Terminals on serial port

  Old terminals can easily be used under Linux by connecting them to the
  serial port of your system. At least the following terminals will be
  supported:


  o  VT52

  o  VT100

  o  VT220

  o  VT320

  o  VT420


  23.5.  Joysticks

  Joystick support is in the latest XFree86 distributions (3.3.x) and in
  kernel versions 2.1.xx and 2.2.xx. For older kernels the links below
  are usefull.


  o  Joystick driver
     For information check
     <http://atrey.karlin.mff.cuni.cz/~vojtech/joystick>. An FTP archive
     can be found at
     <ftp://atrey.karlin.mff.cuni.cz/pub/linux/joystick>.

  Currently supported joysticks are:

  o  Amiga joysticks on Amiga

  o  CH Flightstick Pro compatibles with additional two hats and two
     buttons

  o  DirectPad Pro parallel port joystick interfaces (
     <http://www.ziplabel.com/dpadpro/index.html>)

  o  FP Gaming Assasin 3D (
     <http://www.fpgaming.com/portfolio/assn3d.html>)

  o  Gamepads with 6 and 8 buttons

  o  Genius Flight2000 Digital F-23 (
     <http://www.genius.kye.de/english/product/game.html>)

  o  Gravis Blackhawk Digital (
     <http://www.gravis.com/products/js_blackhawkdigital.html>)

  o  Gravis GamePad Pro (
     <http://www.gravis.com/products/gp_gamepadpro.html>)

  o  Gravis Xterminator GamePad (
     <http://www.gravis.com/products/xterminator.html>)

  o  Logitech CyberMan 2 ( <http://www.cyberman2.de>)

  o  Logitech ThunderPad Digital (
     <http://www.logitech.ch/Game+Controllers/ThunderPadDigital.html>)

  o  Logitech WingMan Extreme Digital (
     <http://www.logitech.ch/Game+Controllers/WingManExtremeDigital.html>)

  o  MadCatz Panther ( <http://www.fpgaming.com/portfolio/panther.html>)

  o  MadCatz Panther XL (
     <http://www.fpgaming.com/portfolio/panthxl.html>)

  o  Microsoft SideWinder 3D Pro (
     <http://www.eu.microsoft.com/products/hardware/sidewinder/3Dpro/default.htm>)

  o  Microsoft SideWinder Force Feedback Pro (
     <http://www.eu.microsoft.com/products/hardware/sidewinder/force-
     feedback/default.htm>)

  o  Microsoft SideWinder GamePad (
     <http://www.eu.microsoft.com/products/hardware/sidewinder/gamepad/default.htm>)

  o  Microsoft SideWinder Precision Pro
     <http://www.eu.microsoft.com/products/hardware/sidewinder/precision-
     pro/default.htm>)

  o  Multisystem joysticks (Atari, Amiga, Commodore, Amstrad)

  o  Multisystem joysticks using 0.8.0.2 hw interface

  o  Nintendo Entertainment System (and clone - SVI, Pegasus ...)
     gamepads

  o  PDPI Lightning L4 gamecard ( <http://www.pdpi.net>)


  o  Sega Genesis (MegaDrive) gamepads

  o  Sega Master System gamepads

  o  Sega Saturn gamepads

  o  SNESKey parallel port joystick interfaces

  o  Sony PlayStation gamepads

  o  Standard joysticks with 2, 3 or 4 axes, and up to 4 buttons

  o  Super Nintendo Entertainment System gamepads

  o  ThrustMaster FCS compatibles with additional hat

  o  ThrustMaster Millenium 3D Inceptor (
     <http://www.thrustmaster.com/products/millennium.htm>)

  o  ThrustMaster Rage 3D (
     <http://www.thrustmaster.com/products/rage3d.htm>)

  o  TurboGraFX parallel port joystick interface ( <http://www2.burg-
     halle.de/~schwenke/parport.html>)


  23.6.  Video capture boards / Frame Grabbers / TV tuner

  A couple of programs are available that support TV tuners. These are:

  o  BTTV  <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

  o  Xawtv

  o  Xtvscreen

  All cards with Bt848/Bt848a/Bt849/Bt878/Bt879 and normal Composite/S-
  VHS inputs are supported. Teletext and Intercast support (PAL only)
  via VBI samples decoding in software.


  o  Adlink 7200 Digital I/O device
     <ftp://metalab.unc.edu/pub/Linux/science/lab/adl7200-0.60.tar.gz>

  o  Adlink 7300A Digital I/O device
     <ftp://ftp.systemy.it/pub/develop/adl7300-0.04.tar.gz>

  o  CMOS Video Conferencing Kit. The video capture card has a Bt849
     chipset. It comes with a CCD camera.

  o  Data Translation DT2803

  o  Data Translation DT2851 Frame Grabber
     <ftp://metalab.unc.edu/pub/Linux/apps/video/dt2851-2.01.tar.gz>

  o  Data Translation DT3155
     <http://krusty.eecs.umich.edu/people/ncowan/linux/welcome.html>

  o  Diamond DTV2000 (based on Bt848)

  o  Dipix XPG1000/FPG/PPMAPA (based on TI C40 DSP). Most add-on cards
     are supported.
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html> or
     <http://www.atlantek.com.au/USERS/wes/linux/frame.html>. The driver
     can be found at  <ftp://ftp.atlantek.com.au/pub/ldipix>

  o  Epix SVM

  o  Epix Silicon Video MUX series of video frame grabbing boards
     <http://www.ssc.com/lj/issue13/npc13c.html>

  o  FAST Screen Machine II
     <ftp://metalab.unc.edu/pub/Linux/apps/video/ScreenMachineII.2.0.tgz>

  o  Hauppage Wincast TV PCI (based on Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

  o  Imaging Technology ITI/IC-PCI
     <ftp://ftp.gom-online.de/pub/IC-PCI/icpci-0.3.2.tar.gz>

  o  ImageNation Cortex I
     <ftp://metalab.unc.edu/pub/Linux/apps/video/cortex.drv.1.1.tgz>

  o  ImageNation CX100
     <ftp://metalab.unc.edu/pub/Linux/apps/video/cxdrv-0.86.tar.gz>

  o  ImageNation PX500
     <ftp://ftp.systemy.it/pub/develop>

  o  ImageNation PXC200
     <ftp://ftp.systemy.it/pub/develop>

  o  Imaging Technology Inc. IC-PCI frame grabber board
     <ftp://gandalf.expmech.ing.tu-bs.de/pub/driver/icpci-0.2.0.tar.gz>

  o  Matrix Vision MV-Delta
     <http://www.matrix-vision.de/>

  o  Matrox Meteor
     <ftp://metalab.unc.edu/pub/Linux/apps/video/meteor-1.4a.tgz>

  o  Matrox PIP-1024
     <http://www.powerup.com.au/~sobeyp/pip_tar.gz>

  o  MaxiTV/PCI (based on ZR36120)
     <ftp://metalab.unc.edu/pub/Linux/kernel/misc-
     cards/zr36120-971127.tgz>

  o  Miro PCTV (based on Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

  o  MuTech MV1000 PCI
     <ftp://metalab.unc.edu/pub/Linux/apps/video/mv1000drv-0.33.tgz>

  o  MuTech MV200
     <http://www.powerup.com.au/~sobeyp/mu_tar.gz>

  o  Philips PCA10TV (not in production anymore)
     <ftp://ftp.il.ft.hse.nl/pub/tv1000/pctv1000.02.tgz>

  o  Pinnacle PCTV (based on Bt848)

  o  Pro Movie Studio
     <ftp://metalab.unc.edu/pub/Linux/apps/video/PMS-grabber.3.0.tgz>

  o  Quanta WinVision B&W video capture card
     <ftp://metalab.unc.edu/pub/Linux/apps/video/fgrabber-1.0.tgz>

  o  Quickcam
     <ftp://metalab.unc.edu/pub/Linux/apps/video/qcam-0.7c-5.tar.gz>


  o  Nomadic Technologies Sensus 700
     <http://www.robots.com/> for common information. Alas, Nomadic
     Technologies has removed the page about the Sensus 700.

  o  Smart Video Recoder III (based on Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

  o  STB TV PCI Television Tuner (based on Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

  o  Tekram C210 (based on ZR36120)
     <ftp://metalab.unc.edu/pub/Linux/kernel/misc-
     cards/zr36120-971127.tgz>

  o  Video Blaster, Rombo Media Pro+
     <ftp://metalab.unc.edu/pub/Linux/apps/video/vid_src-0.7.tgz>

  o  VT1500 TV cards
     <ftp://metalab.unc.edu/pub/Linux/apps/video/vt1500-1.0.9.tar.gz>


  23.7.  Digital Camera

  Currently there are five programs which can be used in combination
  with digital cameras.

  o  Camediaplay ( <http://www.itojun.org/itojun.html>)
     You can download it from
     <ftp://ftp.itojun.org/pub/digicam/C-400L/unix/>

  o  Photopc ( <http://www.average.org/digicam/>)
     It can be downloaded from  <ftp://ftp.average.org/pub/photopc/>

  o  Qvplay ( <http://www.asahi-net.or.jp/~XG2K-HYS/index-e.html>)
     It can be downloaded from  <http://www.asahi-net.or.jp/~XG2K-
     HYS/qvplay-0.93.tar.gz>

  o  JCAM, a Java application which allows digital camera owners to
     access and download pictures from a wide variety of popular digital
     cameras ( <http://www.jcam.com>)
     It can be downloaded from
     <http://www.jcam.com/jcam/download.shtml>

  o  gPhoto ( <http://www.gphoto.org>)
     It can be downloaded from  <http://www.gphoto.org/download.php3>

  Photopc can be extended with a graphical Tk frontend. This can be
  found at  <http://www.mediacity.com/~pwhite/Phototk/phototk.html>.
  Also Qvplay cab be extended with a graphical Tk frontend, which can be
  found at
  <http://www.bekkoame.or.jp/~tormato/pub/qvplaytk-0.73c.tar.gz>


  23.7.1.  Supported


  o  Agfa ePhoto line of cameras (photopc, camediaplay, JCAM)
     <http://www.agfahome.com/ephoto/>

  o  Apple QuickTake 200 (JCAM)

  o  Casio QV10, QV-10A, QV-11, QV-30, QV-70, QV-100, QV-200, QV-300,
     QV-700, QV-770 (qvplay)
     <http://www.casio.com/digitalimaging/digital-
     results.cfm?ObjectGroup_ID=171>

  o  Casio QV-10A, QV-11, QV-30, QV-70, QV-100, QV-300, QV-700, QV-770
     (JCAM)

  o  Chinon ES-1000 (same hardware, protocol and image format as Kodak
     DC20) (JCAM)
     <http://www.planet-interkom.de/oliver.hartmann/dc20secr.htm>

  o  Epson "Colorio Photo" CP-100 (PhotoPC) (photopc, camediaplay)
     <http://www.epson.com/cam_scan/>

  o  Epson "Colorio Photo" CP-200 (PhotoPC 500) (photopc, camediaplay,
     JCAM)
     <http://www.epson.com/cam_scan/>

  o  Epson "Colorio Photo" CP-200 (PhotoPC 550) (JCAM)

  o  Epson "Colorio Photo" CP-500 (PhotoPC 600) (photopc, camediaplay,
     JCAM)
     <http://www.epson.com/cam_scan/>

  o  Epson "Colorio Photo" CP-500 (PhotoPC 700) (JCAM)

  o  Epson PhotoPC 550 (photopc, camediaplay)
     <http://www.epson.com/cam_scan/>

  o  Fuji DS-7, DX-5 (DS-10), DX-7 (DS-20), DX-9 (DS-30), DS-300, MX-700
     (JCAM)

  o  HP Photo Smart Digital Camera (Some people say it is supported,
     others say it isn't !!??)

  o  Kodak DC-20, DC-25, DC-200/210 (JCAM)
     <http://www.planet-interkom.de/oliver.hartmann/dc20secr.htm>

  o  Olympus C-300L, C-320L, C-420L, C-800L, C-840L, C-1000L, C-1400L
     (JCAM)
     <http://www.olympusamerica.com/digital/dhome.html>

  o  Olympus "Camedia" C-400L (D-200L) (photopc, camediaplay, JCAM))
     <http://www.olympusamerica.com/digital/dhome.html>

  o  Olympus "Camedia" C-820L (D-320L) (photopc, camediaplay, JCAM))
     <http://www.olympusamerica.com/digital/dhome.html>

  o  Olympus C2000Z (photocd)

  o  Sanyo VPC-G200/G200EX (photopc, camediaplay)
     <http://www.sanyo.co.jp/AV/CEmedia_e/products/digicam/digicam.html>

  o  Sanyo DSC-V1 (VPC-G200E) (photopc, camediaplay)
     <http://www.sanyo.co.jp/AV/CEmedia_e/products/digicam/digicam.html>

  o  Sanyo DSC-X1 (VPC-X300) (JCAM)

  o  Sanyo DSC-X300 (photopc, camediaplay)
     <http://www.sanyo.co.jp/AV/CEmedia_e/products/digicam/digicam.html>

  o  Nikon Coolpix 600/900 (Coolpix 600 untested) (photopc)
     <http://www.nikonusa.com/products/products.taf?id=128> and
     <http://www.nikonusa.com/products/products.taf?id=129>

  o  Sierra Imaging SD640 (photopc)
     <http://www.sierraimaging.com/support/supchimgex.html>

  o  Toshiba PDR-2 (not sure: photopc)
     <http://www.toshiba.com/taisisd/dsc/indexj.htm>
  23.7.2.  Unsupported


  o  Casio QV-120, QV-5000SX, QV-7000SX

  o  Kodak DC40, DC50, DC120



  23.8.  UPS

  Various other UPS's are supported, read the UPS HOWTO


  o  APC SmartUPS
     <http://www.dyer.vanderbilt.edu/server/apcupsd>

  o  APC-BackUPS 400/600, APC-SmartUPS SU700/1400RM
     <http://www.dyer.vanderbilt.edu/server/apcupsd>

  o  Fenton PowerPal
     <ftp://megatec.com.tw/Rups2/UNIX/v3.0.1> for downloads and manuals.
     Web site information can be found at
     <http://www.fentonups.com/index2.htm>

  o  Fenton Tele-UPS
     <ftp://megatec.com.tw/Rups2/UNIX/v3.0.1> for downloads and manuals.
     Web site information can be found at
     <http://www.fentonups.com/index2.htm>

  o  Fenton PowerOn
     <ftp://megatec.com.tw/Rups2/UNIX/v3.0.1> for downloads and manuals.
     Web site information can be found at
     <http://www.fentonups.com/index2.htm>

  o  UPS's with RS-232 monitoring port (genpower package)
     <ftp://metalab.unc.edu/pub/Linux/system/ups/genpower-1.0.1.tgz>

  o  MGE UPS's
     <http://www.mgeups.com/download/softlib.htm> and
     <http://www.mgeups.com/download/software/linux/upsp.tgz>

  o  A daemon to shut down and up computers connected to ups's. It's
     network aware and allows server- and client-mode
     <ftp://metalab.unc.edu/pub/Linux/system/ups/powerd-2.0.tar.gz>


  23.9.  Multifunction boards



  o  Pro Audio Spectrum 16 SCSI / Sound interface card


  23.10.  Data acquisition

  The Linux Lab Project site collects drivers for hardware dealing with
  data acquisition, they also maintain some mailing lists dealing with
  the subject. I have no experience with data acquisition so please
  check the site for more details.


  o  Linux Lab Project
     <http://www.llp.fu-berlin.de/>


  o  CED 1401

  o  DBCC CAMAC

  o  IEEE-488 (GPIB, HPIB) boards

  o  Keithley DAS-1200

  o  National Instruments AT-MIO-16F / Lab-PC+


  o  Analog Devices RTI-800/815 ADC/DAC board
     contact Paul Gortmaker <gpg109@anu.edu.au>


  23.11.  Watchdog timer interfaces


  o  Berkshire Products PC Watchdog Card (ISA cards rev. A and C)
     Check  <ftp://ftp.bitgate.com/pub/bitgate/pcwd> for the PC Watchdog
     program. A driver is included in recent kernels. More information
     on this product can be found at  <http://www.berkprod.com/wdog.htm>

  o  ICS WDT500-P
     <http://www.indcompsrc.com/products/data/html/wdt500-p.html>

  o  ICS WDT501-P (with and without fan tachometer)
     <http://www.indcompsrc.com/products/data/html/wdt500-p.html>

  o  Outsource Engineering & Manufacturing Inc. Basic Watchdog Timer
     Board (ISA)
     Information can be found at  <http://www.ctec.net/basicwdt>.
     Drivers currently running on 2.0.29, 2.0.33 and 2.0.36 kernels


  23.12.  Miscellaneous


  o  Mattel Powerglove

  o  AIMS Labs RadioTrack FM radio card
     <ftp://metalab.unc.edu/pub/Linux/apps/sound/radio/radiotrack-1.1.tgz>

  o  Reveal FM Radio card
     <ftp://magoo.uwsuper.edu/docs/radio.html>

  o  Videotext cards
     <ftp://metalab.unc.edu/pub/Linux/apps/video/videoteXt-0.6.tar.gz>


  24.  Related sources of information


  o  Cameron Spitzer's hardware FAQ archive (??)
     <ftp://ftp.rahul.net/pub/cameron/PC-info/>

  o  Guide to Computer Vendors
     <http://guide.sbanetweb.com/>

  o  System Optimization Information
     <http://www.dfw.net/~sdw/>



  25.  Acknowledgments

  Thanks to all the authors and contributors of other HOWTO's, many
  things here are shamelessly stolen from their works; to FRiC, Zane
  Healy and Ed Carp, the original authors of this HOWTO; and to everyone
  else who sent in updates and feedbacks. Special thanks to Eric Boerner
  and lilo (the person, not the program) for the sanity checks. And
  thanks to Dan Quinlan for the original SGML conversion.


  26.  Appendix A. S3 cards supported by XFree86 3.3.x.



  CHIPSET   RAMDAC            CLOCKCHIP   BPP   CARD

  801/805   AT&T 20C490                    16    Actix GE 32 / 32+ 2Mb
                                                 Orchid Fahrenheit 1280(+)
  801/805   AT&T 20C490       ICD2061A     16    STB PowerGraph X.24
  801/805                                        Del S3 805
                                                 Miro Crystal 8S
                                                 Orchid Fahrenheit VA
                                                 VL-41
  805       S3 GENDAC                      16    Miro 10SD VLB/PCI
                                                 SPEA Mirage VLB
  801/805   SS2410            ICD2061A     8     Diamond Stealth 24 VLB/ISA
  801/805   AT&T 20C490       Ch8391       16    JAX 8231/8241, SPEA Mirage
  801/805   S3 GENDAC                            Miro Crystal 10SD
  805i                                           Actix GE 32i
                                                 ELSA Winner 1000 ISA
  928       AT&T 20C490                    16    Actix Ultra
  928       Sierra SC15025    ICD2061A     32    ELSA Winner 1000 ISA/VLB/EISA
  928       Bt485             ICD2061A     32    STB Pegasus VL
  928       Bt485             SC11412      16    SPEA(/V7) Mercury VLB
  928       Bt485             ICD2061A     32    #9 GXE Level 10/11/12
  928       Ti3020            ICD2061A     32    #9 GXE Level 14/16
  928                                            928Movie
                                                 Diamond Stealth Pro
                                                 ELSA Winner 1000TwinBus
                                                 ELSA Winner 1000VL
                                                 ELSA Winner 2000
                                                 Miro Crystal 16S
  864                         ICD2061A           Miro Crystal 20SD (BIOS 2.xx)
  864       AT&T 20C498       ICS2494      32    Miro (Crystal) 20SD (BIOS 1.xx)
  864       AT&T 20C498/      ICD2061A/    32    ELSA Winner 1000 PRO VLB/PCI
  864       STG1700           ICS9161            MIRO 20SD (BIOS 2.x)
                                                 ELAS Winner 1000 PRO
  864       STG1700           ICD2061A     32    Actix GE 64 VLB
  864       AT&T 20C498/      ICS2595      16    SPEA(/V7) Mirage P64 DRAM (BIOS 3.x)
            AT&T 21C498
  864       S3 86C716 SDAC                 32    ELSA Winner 1000 PRO
                                                 Miro 20SD (BIOS 3.x)
                                                 SPEA Mirage P64 DRAM (BIOS 4.x)
                                                 Diamond Stealth 64 DRAM
                                                 Genoa Phantom 64i
                                                 Miro Crystal 20SD VLB (BIOS 3.xx)
  864       ICS5342           ICS5342      32    Diamond Stealth 64 DRAM (some)
  864       SDAC                                 Diamond Stealth 64 Graphics 2001
  864       AT&T 20C498-13    ICD2061A     32    #9 GXE64 PCI
  864                                            ASUS Video Magic PCI V864
                                                 VidTech FastMax P20



  CHIPSET   RAMDAC            CLOCKCHIP   BPP   CARD

  964                                            ELSA Winner 2000 PRO-2,4
                                                 spider Tarantula 64
  964       AT&T 20C505       ICD2061A     32    Miro Crystal 20SV PCI/40SV
  964       Bt485             ICD2061A     32    Diamond Stealth 64
  964       Bt9485            ICS9161A     32    SPEA Mercury 64
  964       Ti3020            ICD2061A     8     ELSA Winner 2000 PRO PCI
  964       Ti3025            Ti3025       32    #9 GXE64 Pro VLB/PCI
                                                 Miro Crystal 40SV
  964       IBM RGB                        32    Hercules Graphite Terminator 64
  868       S3 86C716 SDAC                 32    ELSA Winner 1000AVI
                                                 Miro Crystal 20SD PCI
  868       AT&T 29C409                          ELSA Winner 1000AVI
  868                                            Diamond Stealth Video DRAM
                                                 Diamond Stealth 64 Video 2120/2200
                                                 ELSA Winner 1000PRO/X
                                                 #9 FX Motion 531
                                                 VideoLogic GrafixStar 500
  968                                            Diamond Stealth 64 Video 3200
                                                 ELSA Gloria-4/8
                                                 ELSA Winner 2000AVI
                                                 ELSA Winner 2000PRO/X-2/X-4/X-8
                                                 Genoa VideoBlitz III AV
                                                 Hercules Graphite Terminator Pro 64
                                                 LeadTek WinFast S430
                                                 LeadTek WinFast S510
                                                 Miro Crystal 80SV
                                                 Miro Crystal 20SV
                                                 #9 FX Motion 771
                                                 VideoLogic GrafixStar 700
                                                 WinFast S430/S510
  968       TVP3026                        32    ELSA Winner 2000PRO/X
                                                 Diamond Stealth 64 Video VRAM
  968       IBM RGB                        32    Genoa VideoBlitz III AVI
                                                 Hercules Terminator Pro 64
                                                 STB Velocity 64 Video
                                                 #9 FX Motion 771
                                                 Diamond Stealth 64 Video 3240/3400
  968       TI RAMDAC                            Diamond Stealth 64 Video 3240/3400
  732       (Trio32)                       32    Diamond Stealth 64 DRAM SE
                                                 (all Trio32 based cards)
  764       (Trio64)                       32    SPEA Mirage P64 (BIOS 5.x)
                                                 Diamond Stealth 64 DRAM
                                                 Diamond Stealth 64 Graphics 2xx0
                                                 #9 FX Vision 330
                                                 STB PowerGraph 64
                                                 (all Trio64 based cards)

  NOTE: for the ViRGE/VX,DX,GX,GX2 chipsets you need XFree86 3.3.1 or
  newer. You should use the XF86_SVGA server.


  27.  Appendix B. Supported PCMCIA cards


  These cards are supported by David Hinds' PCMCIA package and this list
  is taken from his web page (
  <http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html>).


  CardBus cards are listed at the end of each section.  At this time,
  all CardBus drivers should be treated as experimental.  Beware that
  some cards have 16-bit and CardBus versions with very similar names.
  If the CardBus version is not specifically listed as supported here,

  CHIPSET   RAMDAC        CLOCKCHIP   BPP   CARD

            (Trio64V+)                       DSV3326
                                             Diamond Stealth 64 Video 2001
                                             DataExpert DSV3365
                                             ExpertColor DSV3365
                                             MAXColor S3 Trio64V+
                                             ELSA Winner 1000TRIO/V
                                             Hercules Terminator 64/Video
                                             #9 FX Motion 331
                                             STB Powergraph 64 Video
                                             VideoLogic GrafixStar 400
            (Trio64V2)                       ELSA Winner 1000/T2D
            (ViRGE)                          Canopus Co. Power Window 3DV
                                             DSV3325
                                             DataExpert DSV3325
                                             Diamond Multimedia Stealth 3D 2000
                                             Diamond Multimedia Stealth 3D 2000 PRO
                                             Diamond Stealth 3D 2000
                                             Diamond Stealth 3D 2000 PRO
                                             Diamond Stealth 3D 3000
                                             ELSA Victory 3D
                                             ELSA Victory 3DX
                                             ELSA Winner 3000-S
                                             Expertcolor DSV3325
                                             Hercules Terminator 64/3D
                                             LeadTek WinFast 3D S600
                                             MELCO WGP-VG4S
                                             #9 FX Motion 332
                                             Orchid Tech. Fahrenheit Video 3D
                                             STB systems Powergraph 3D
                                             WinFast 3D S600
            (ViRGE/DX)                       Hercules Terminator 3D/DX
            (ViRGE/GX)                       STB Nitro 3D
            (ViRGE/VX)                       ELSA Winner 2000AVI/3D
                                             ELSA Winner 3000
                                             ELSA Winner 3000-L-42/-M-22
                                             MELCO WGP-VX8
                                             STB Systems Velocity 3D
  911/924                                    Diamond Stealth VRAM
  924       SC1148 DAC

  then you should not expect it to work.



  27.1.  Ethernet cards


  o  SMC, Megahertz and Ositech cards use the smc91c92_cs driver

  o  3Com and Farallon cards use the 3c589_cs driver

  o  Fujitsu, TDK, RATOC, CONTEC, Eagle and Nextcom cards use the
     fmvj18x_cs driver

     All other cards use the pcnet_cs driver. Other NE2000-compatible
     cards that are not on the list are also likely to work with
     pcnet_cs.



  o  3Com 3c589, 3c589B, 3c589C, 3c589D (3c589_cs)


  o  3Com Megahertz 3CCE589E, 3CXE589D, 3CXE589EC (3c589_cs)

  o  Accton EN2212, EN2216 EtherCard (pcnet_cs)

  o  Accton SOHO BASIC EN220 (pcnet_cs)

  o  Addtron Ethernet (pcnet_cs)

  o  AIBrain EPCM-T (pcnet_cs)

  o  Allied Telesis CentreCOM CE6001, LA-PCM, LA-PCM V2 (pcnet_cs)

  o  AmbiCom AMB8002, AMB8002T (pcnet_cs)

  o  AnyCom ECO Ethernet (pcnet_cs)

  o  Apollo RE450CT (pcnet_cs)

  o  Argosy EN210 (pcnet_cs)

  o  Asante FriendlyNet (pcnet_cs) (new cards seem not to work!!)

  o  AST 1082 Ethernet (pcnet_cs)

  o  Billionton LNT-10TB, LNT-10TN (pcnet_cs)

  o  Califormia Access LAN Adapter

  o  CeLAN EPCMCIA (pcnet_cs)

  o  CNet CN30BC, CN40BC Ethernet (pcnet_cs)

  o  Compaq Ethernet Adapter (xirc2ps_cs)

  o  Compex/ReadyLINK Ethernet Combo (pcnet_cs)

  o  Compex Linkport Ethernet (pcnet_cs)

  o  COMPU-SHACK BASEline Ethernet (pcnet_cs)

  o  Connectware LANdingGear Adapter (pcnet_cs)

  o  Corega Ether PCC-T, PCM-T (pcnet_cs)

  o  CyQ've ELA-010 10baseT (pcnet_cs)

  o  CONTEC C-NET(PC)C (fmvj18x_cs)

  o  Danpex EN-6200P2 Ethernet (pcnet_cs)

  o  Datatrek NetCard (pcnet_cs)

  o  Dayna Communications CommuniCard E (pcnet_cs)

  o  Digital DEPCM-AA, PCP78-AC Ethernet (pcnet_cs)

  o  Digital EtherWORKS Turbo Ethernet (pcnet_cs)

  o  D-Link DE-650, DE-660 (pcnet_cs)

  o  DynaLink L10C Ethernet (pcnet_cs)

  o  Eagle NE200 Ethernet (fmvj18x_cs)

  o  Edimax Technology Ethernet Combo (pcnet_cs)

  o  EFA InfoExpress 205, 207 Combo (pcnet_cs)

  o  Eiger Labs EPX-ET10T2 Combo (pcnet_cs)

  o  Eiger Labs EPX-10BT, EPX-ET 10BT EPX-ET 10TZ (fmvj18x_cs)

  o  ELECOM Laneed LD-CDWA, LD-CDX, LD-CDNIA, LD-CDY, LD-CDF (pcnet_cs)

  o  EP-210 Ethernet (pcnet_cs)

  o  Epson Ethernet (pcnet_cs)

  o  EtherPRIME Ethernet (pcnet_cs)

  o  Explorer NE-10000 Ethernet (pcnet_cs)

  o  EZLink 4109 Ethernet (pcnet_cs)

  o  Farallon Etherwave, EtherMac (3c589_cs)

  o  Fiberline FL-4680 (pcnet_cs)

  o  Fujitsu FMV-J181, FMV-J182, FMV-J182A, FMV-J183 (fmvj18x_cs)

  o  Fujitsu Towa LA501, FMV-1080, FM50N-183 (fmvj18x_cs)

  o  Gateway 2000 Ethernet (pcnet_cs)

  o  Genius ME3000II Ethernet (pcnet_cs)

  o  Grey Cell Ethernet (pcnet_cs)

  o  GVC NIC-2000P Ethernet Combo (pcnet_cs)

  o  Hitachi HT-4840-11 EtherCard (fmvj18x_cs)

  o  Hypertec HyperNet (pcnet_cs)

  o  IBM CreditCard Ethernet Adapter (pcnet_cs)

  o  IC-Card Ethernet (pcnet_cs)

  o  Infotel IN650ct Ethernet (pcnet_cs)

  o  I-O Data PCLA/T, PCLA/TE (pcnet_cs)

  o  Katron PE-520 Ethernet (pcnet_cs)

  o  KingMax Technology EN10-T2 Ethernet (pcnet_cs)

  o  Kingston KNE-PCM/M, KNE-PC2, KNE-PC2T (pcnet_cs)

  o  KTI PE-520 Plus (pcnet_cs)

  o  LANEED LD-CDW Ethernet (pcnet_cs)

  o  LanPro EP4000A (pcnet_cs)

  o  Lantech Ethernet (pcnet_cs)

  o  Level One EPC-0100TB (pcnet_cs)

  o  Linksys EtherCard (pcnet_cs)

  o  Logitec LPM-LN10T, LPM-LN10BA, LPM-LN20T Ethernet (pcnet_cs)

  o  Longshine ShineNet LCS-8534TB Ethernet (pcnet_cs)

  o  Macnica ME-1 Ethernet (pcnet_cs)

  o  Maxtech PCN2000 Ethernet (pcnet_cs)

  o  Megahertz XJ10BT, XJ10BC, CC10BT Ethernet (smc91c92_cs)

  o  Melco LPC-TJ, LPC-TS, LPC-T, LPC2-T (pcnet_cs)

  o  Microdyne NE4200 Ethernet (pcnet_cs)

  o  Midori LANNER LT-PCMT (pcnet_cs)

  o  Micronet Etherfast Adapter (pcnet_cs)

  o  NDC Instant-Link (pcnet_cs)

  o  Network General ``Sniffer'' (pcnet_cs)

  o  New Media EtherLAN (nmclan_cs)

  o  New Media LanSurfer (pcnet_cs)

  o  New Media LiveWire (NOT the LiveWire+) (nmclan_cs)

  o  New Media BASICS Ethernet (smc91c92_cs)

  o  NextCom NC5310 (fmvj18x_cs)

  o  Novell/National NE4100 InfoMover (pcnet_cs)

  o  Ositech Four of Diamonds (smc91c92_cs)

  o  OvisLink Ethernet (pcnet_cs)

  o  Panasonic CF-VEL211P-B (pcnet_cs)

  o  Planet SmartCom 2000, 3500, ENW-3501-T, ENW-3502-T (pcnet_cs)

  o  Pretec Ethernet (pcnet_cs)

  o  PreMax PE-200 Ethernet (pcnet_cs)

  o  Proteon Ethernet (pcnet_cs)

  o  Ratoc REX-9822, REX-5588A/W, REX-R280 (fmvj18x_cs)

  o  Relia RE2408T Ethernet (pcnet_cs)

  o  Reliasys 2400A Ethernet (pcnet_cs)

  o  RPTI EP400, EP401 Ethernet (pcnet_cs)

  o  SCM Ethernet (pcnet_cs)

  o  Sky Link Express (pcnet_cs)

  o  SMC 8020BT EtherEZ (not the EliteCard) (smc91c92_cs)

  o  SMC 8022 EZCard-10 (pcnet_cs)

  o  Socket Communications EA LAN Adapter (pcnet_cs)

  o  Socket Communications LPE Low Power Ethernet (pcnet_cs)

  o  SOHOware Ethernet (pcnet_cs)

  o  SuperSocket RE450T (pcnet_cs)

  o  Surecom Ethernet (pcnet_cs)

  o  SVEC PN605C (pcnet_cs)

  o  TDK LAC-CD02x, LAK-CD021, LAK-CD022A, LAK-CD021AX, LAK-CD021BX
     (fmvj18x_cs)

  o  Thomas-Conrad Ethernet (pcnet_cs)

  o  Trust Ethernet Combo (pcnet_cs)

  o  UNEX NexNIC MA010 (pcnet_cs)

  o  Volktek NPL-402CT Ethernet (pcnet_cs)

  o  Xircom CreditCard CE2 (xirc2ps_cs)


  27.2.  Fast Ethernet (10/100baseT) adapters

  epic_cb and tulip_cb drivers are experimental and need a 2.2.x or
  newer kernel


  o  3Com 3c574TX, 3CCFE574BT (3c574_cs)

  o  3Com 3c575TX, 3CCFE575BT, 3CXFE575BT CardBus (3c575_cb, performance
     problem)

  o  Abocom LinkMate FE1000 (pcnet_cs)

  o  Accton Fast EtherCard-16 (xirc2ps_cs)

  o  Accton EN2220 CardBus (tulip_cb)

  o  Allied Telesyn AT-2800 (tulip_cb)

  o  AmbiCom AMB8100 (tulip_cb)

  o  AnyCom ECO Ethernet 10/100 (pcnet_cs)

  o  Apollo Fast Ethernet (pcnet_cs)

  o  Argosy EN220 (smc91c92_cs)

  o  Compaq Netelligent 10/100 (xirc2ps_cs)

  o  Compex Linkport TX (tulip_cb)

  o  COMPU-SHACK FASTline 10/100 (pcnet_cs)

  o  Corega FastEther PCC-TX (pcnet_cs)

  o  D-Link DFE-650 (pcnet_cs)

  o  D-Link DFE-660TX (tulip_cb)

  o  Dynalink L100C (smc91c92_cs)

  o  EXP ThinLan 100 (pcnet_cs)


  o  Fiberline Fast Ethernet (pcnet_cs)

  o  Hamlet FE1000 10/100 (pcnet_cs)

  o  Intel EtherExpress PRO/100 (xirc2ps_cs, 16-bit NOT 32-bit)

  o  IO DATA PCET/TX (pcnet_cs)

  o  Kingston KNE-CB4TX (tulip_cb)

  o  KTI KF-C16 (pcnet_cs)

  o  Laneed LD-10/100CD (pcnet_cs)

  o  Lantech FastNet/TX (smc91c92_cs)

  o  LevelOne FPC-0100TX (pcnet_cs)

  o  LevelOne FPC-0101TX 10/100Mbps CardBus (tulip_cb)

  o  Linksys PCMPC100 EtherFast 10/100 (pcnet_cs)

  o  Linksys PCMPC200 EtherFast CardBus (tulip_cb)

  o  Logitec LPM-LN100TX (pcnet_cs)

  o  Melco LPC2-TX (pcnet_cs)

  o  Melco/SMC LPC-TX (smc91c92_cs)

  o  Microcom TravelCard 10/100 (pcnet_cs)

  o  Micronet EtherFast Adapter (pcnet_cs)

  o  NetGear FA410TXC (pcnet_cs)

  o  Ositech Seven of Diamonds (smc91c92_cs)

  o  Ositech Seven of Spades CardBus (epic_cb)

  o  Planet FNW-3600T (pcnet_cs)

  o  SMC EZ CardBus 10/100 Ethernet (tulip_cb)

  o  SVEC FD606 10/100 Ethernet (tulip_cb)

  o  TDK NetworkFlyer LAK-CB100X, LAK-CB100AX CardBus (tulip_cb)

  o  Toshiba IPC5008A, Advanced Network 10/100 (xirc2ps_cs)

  o  UMAX Technologies UMAX250 (tulip_cb)

  o  WiseCom WC-PC400 (smc91c92_cs)

  o  Xircom CBEII-10/100 (tulip_cb)

  o  Xircom CreditCard CE3 (xirc2ps_cs, new cards may not work !!)


  27.3.  Token-ring adapters

  You should at least have kernel 1.3.72


  o  3Com 3c389 Tokenlink Velocity (ibmtr_cs)

  o  3Com 3c689 TokenLink III (ibmtr_cs)

  o  IBM Token ring Adapter (ibmtr_cs)

  o  IBM Turbo 16/4 Token Ring (ibmtr_cs)


  27.4.  Wireless network adapters


  o  Aironet PC4500, PC4800 wireless network adapters (airco_cs) (Ben
     Reed breed@almaden.ibm.com)

  o  AT&T / NCR / Lucent WaveLAN version 2.0 (wavelan_cs)

  o  DEC RoamAbout/DS (wavelan_cs)

  o  Harris PRISM/AM79C930 IEEE 802.11 wireless LAN
     <http://www.absoval.com/linux-wlan> (Mark Mathews mark@absoval.com)

  o  Lucent WaveLAN/IEEE wireless network adapter (wavelan2_cs) (Lucent
     Technologies betasupport@wavelan.com)

  o  Raylink Wireless Network
     <http://world.std.com/~corey/raylink.html> (Corey Thomas
     corey@world.std.com)

  o  WaveLAN/IEEE wireless network adapter  <http://www.fasta.fh-
     dortmund.de/users/andy/wvlan> (Andreas Neuhaus andy@fasta.fh-
     dortmund.de)

  o  Xircom CreditCard Netwave (netwave_cs)


  27.5.  ISDN


  o  Elsa MicroLink ISDN adapter (elsa_cs) (Klaus Lichtenwalder
     Klaus.Lichtenwalder@WebForum.DE)

  o  MPS ISLINEnote ISDN adapter (mpsuni_cs) (Detlef Glaschick
     glaschick@mps-software.de)

  o  Sedlbauer Speed Star ISDN adapter (sedl_cs) (Marcus Niemann
     niemann@www-bib.fh-bielefeld.de)

  o  Teles ISDN adapter (teles_cs) (Christof Petig ea0141@uni-
     wuppertal.de)


  27.6.  Modem and serial cards

  Virtually all modem cards, simple serial port cards, and digital
  cellular modems should work. Also ISDN modems that emulate a standard
  UART are supported.


  o  Advantech COMpad-32/85 dual serial (serial_cs)

  o  Argosy dual serial (serial_cs)

  o  Black Box I114A RS-422/485 (serial_cs)

  o  National Instruments PCMCIA-232, PCMCIA-232/2, PCMCIA-232/4
     (serial_cs)

  o  National Instruments PCMCIA-485, PCMCIA-485/2 (serial_cs)

  o  Omega Engineering QSP-100 (serial_cs)

  o  Quatech, IOTech dual RS-232 cards (serial_cs)

  o  Quatech quad RS-232 card (serial_cs)

  o  Socket Communications dual RS-232 card (serial_cs)

  o  Trimble Mobile GPS (serial_cs)


  27.7.  Memory cards

  All SRAM cards should work. Unsupported flash cards can be read but
  not written.


  o  Epson 2MB SRAM

  o  IBM 8MB Flash (memory_cs)

  o  Intel Series 2, Series 2+ and Value Series 100 Flash (memory_cs)

  o  Maxtor MobileMax 16MB Flash (memory_cs)

  o  New Media SRAM

  o  RATOC SmartMedia Adapter (memory_cs)

  o  TDK Flash Memory SFM20W/C 20MB (memory_cs)


  27.8.  SCSI adapters

  Be careful. Many vendors, particularly CD-ROM vendors, seem to switch
  controller chips at will. Generally, They will use a different product
  code, but not always: older (supported) New Media Bus Toaster cards
  are not easily distinguishable from the current (unsupported) Bus
  Toaster cards.


  o  Adaptec APA-1450A, APA-1460, APA-1460A/B/C/D SlimSCSI (aha152x_cs)

  o  Adaptec SlimSCSI 1480 Cardbus (apa1480_cb, experimental, requires
     kernel 2.2.2.x or later)

  o  Digital SCSI II adapter

  o  Eiger Labs SCSI (qlogic_cs)

  o  Epson SC200 (qlogic_cs)

  o  Future Domain SCSI2GO (fdomain_cs)

  o  IBM SCSI (fdomain_cs)

  o  Iomega ZIP and JAZ Cards (PPA3) (aha152x_cs)

  o  IO-DATA PCSC-II, PCSC-II-L

  o  IO-DATA CDG-PX44/PCSC CD-ROM

  o  Logitec LPM-SCSI2

  o  Logitec LCD-601 CD-ROM

  o  MACNICA mPS110, mPS110-LP SCSI (qlogic_cs)

  o  Melco IFC-SC2, IFC-DC

  o  Midori CN-SC43 (qlogic_cs)

  o  NEC PC-9801N-J03R (qlogic_cs)

  o  New Media Bus Toaster SCSI (older cards only) (aha152x_cs)

  o  New Media Toast 'n Jam (SCSI only) (aha152x_cs)

  o  Noteworthy Bus Toaster SCSI (aha152x_cs)

  o  Panasonic KXL-D740, KXL-DN740A, KXL-DN740A-NB 4X CD-ROM

  o  Pioneer PCP-PR1W, PCP-PR2W CD-ROM

  o  Qlogic FastSCSI (qlogic_cs)

  o  Raven CD-Note 4X (qlogic_cs)

  o  RATOC REX-9530 SCSI-2 (qlogic_cs)

  o  Simple Technologies SCSI (fdomain_cs)

  o  Sony CD-ROM Discman PRD-250

  o  Taxan ICD-400PN

  o  Toshiba NWB0107ABK, SCSC200A, SCSC200B (qlogic_cs)


  27.9.  ATA/IDE CD-ROM adapters

  You should at least have kernel 1.3.72



  o  Argosy EIDE CD-ROM (ide_cs)

  o  Caravelle CD-36N (ide_cs)

  o  CNF CARDport CD-ROM (ide_cs)

  o  Creative Technology CD-ROM (ide_cs)

  o  Digital Mobile Media CD-ROM (ide_cs)

  o  EXP CD940 CD-ROM (ide_cs, Some work, some do not)

  o  EXP Traveler 620 CD-ROM (ide_cs)

  o  H45 Technologies Quick 2x CD-ROM (ide_cs)

  o  H45 Technologies QuickCD 16X (ide_cs)

  o  IBM Max 20X CD-ROM (ide_cs)

  o  IO DATA CDP-TX4/PCIDE, CDP-TX6/PCIDE, CDV-HDN6/PCIDE (ide_cs)

  o  IO DATA CDP-TX10/PCIDE, CDP-FX24/CBIDE, MOP-230/PCIDE (ide_cs)


  o  IO DATA HDP-1G/PCIDE, HDP-1.6G/PCIDE (ide_cs)

  o  Microtech International MicroCD (ide_cs)

  o  Microtech Mii Zip 100 (ide_cs)

  o  NOVAC NV-CD410 (ide_cs)

  o  Sony PCGA-CD5 CD-ROM (ide_cs)

  o  TEAC IDE Card/II (ide_cs)


  27.10.  Multifunction cards

  You should at least have kernel 1.3.73


  o  3Com 3c562, 3c562B/C/D, 3c563B/C/D (3c589_cs)

  o  3Com Megahertz 3CCEM556, 3CXEM556, 3CCEM556B (3c589_cs)

  o  3Com Megahertz 3CCFEM556 (3c574_cs)

  o  3Com 3CCFEM656B (3c575_cb, ethernet only!!)

  o  Accton UE2218 (pcnet_cs)

  o  ActionTex ComNet 33.6 (pcnet_cs)

  o  AnyCom Fast Ethernet + 56K Combo (pcnet_cs)

  o  Asus combo card (pcnet_cs)

  o  Billionton LM5LT-10B (pcnet_cs)

  o  Compaq Microcom CPQ550 Modem + 10/100 LAN (xirc2ps_cs)

  o  Dayna Communicard (pcnet_cs)

  o  D-Link DME336T, DMF560TX (pcnet_cs)

  o  Gateway Telepath Combo (smc91c92_cs)

  o  Grey Cell GCS3400 (pcnet_cs)

  o  GVC LAN modem (pcnet_cs)

  o  IBM Home and Away, Home and Away 28.8 (pcnet_cs)

  o  IO DATA PCEM-336T (pcnet_cs)

  o  Intel EtherExpress PRO/100 LAN/Modem (xirc2ps_cs)

  o  Linksys LANmodem 28.8 (PCMLM28), 33.6 (PCMLM336) (pcnet_cs)

  o  Linksys EtherFast LANmodem 56K (PCMLM56) (pcnet_cs)

  o  Megahertz/U.S. Robotics EM1144, EM3288, EM3336 (smc91c92_cs)

  o  Motorola Mariner (smc91c92_cs)

  o  Motorola Marquis (3c589_cs)

  o  Ositech Jack of Diamonds, Jack of Hearts (smc91c92_cs)

  o  Ositech Jack of Spades CardBus (epic_cb, experimental, requires
     kernel 2.2.x or later)

  o  PREMAX LAN modem (pcnet_cs)

  o  Psion V.34 Gold Card (pcnet_cs)

  o  Psion Gold Card Netglobal 56K+10Mb (pcnet_cs)

  o  Rover ComboCard 33.6 (pcnet_cs)

  o  TDK 3000/3400/5670 (pcnet_cs)

  o  Telecom Device SuperSocket LM336 (pcnet_cs)

  o  Xircom CreditCard CEM28, CEM33, CEM56 (xirc2ps_cs)

  o  Xircom RealPort REM10BT, REM56G-100 (xirc2ps_cs)

  o  Xircom RBEM56G-100BTX, CBEM56G-100BTX (tulip_cb, experimental,
     requires kernel 2.2.x or later)


  27.11.  ATA/IDE card drives

  These card drives are supported starting with kernel 1.3.72. Both
  Flash-ATA cards and rotating-media cards are supported. The very old
  Western Digital 40MB drives are not supported, because they do not
  conform to the PCMCIA ATA specifications.


  27.12.  ATA/IDE Interface Cards



  o  Archos Zip100 MiniDrive (ide_cs)

  o  Microtech International XpressDock (ide_cs)

  o  DataStor Technology PCMCIA ATA/ATAPI Card (ide_cs)

  o  Creo DNBoy (ide_cs)

  o  GREYSTONE DD-25 (ide_cs)

  o  Shining Technology CitiDISK 250PE (ide_cs)

  o  Sicon Periperal Micro Mate (ide_cs)


  27.13.  Parallel port cards:

  See the appendix on supported parallel port devices


  27.14.  Miscellaneous cards


  o  GemPlus GPR400 Smart Card Reader
     <http://www.linuxnet.com/smartcard/code.html> (Wolf Geldmacher
     wgeldmacher@paus.ch)

  o  IBM Smart Capture (iscc_cs) (Koji Okamura oka@ec.kyushu-u.ac.jp)

  o  IBM Etherjet (cs89x0_cs) (Danilo Beuche danili@cs.uni-magdeburg.de)

  o  National Instruments DAQcard700
     <ftp://ftp.rtlinux.org/pub/rtlinux/sources/DAQCard700/> (Oleg
     Subbotin)

  o  Netwave AirSurfer Plus (asplus_cs)
     <http://ipoint.vlsi.uiuc.edu/wireless/asplus.html> (Jay Moorman
     jrmoorma@uiuc.edu)

  o  New Media Bus Toaster SCSI (new version) (sym53c500_cs) (Tim Corner
     tcorner@via.at)

  o  New Media BASICS SCSI (sym53c500_cs) (Tim Corner tcorner@via.at)

  o  Nokia/InTalk ST-500A  <http://www.absoval.com/linux-wlan> (Mark
     Mathews mark@absoval.com)

  o  Proxim RangeLAN2 and Symphony wireless LAN cards
     <http://www.komacke.com/distribution.html> (Dave Koberstein
     davek@komacke.com)

  o  RATOC REX-9590 (iscc_cs) (Koji Okamura oka@nanotsu.kobe-u.ac.jp)

  o  Samsung MagicWave SWL-1000N  <http://www.absoval.com/linux-wlan>
     (Mark Mathews mark@absoval.com)

  o  Silicom SPE ethernet, SEM EtherModem, SES EtherSerial
     <http://www.silicom.co.il/linux.htm>

  o  SIMA TECH SCSI9000 (sym53c500_cs) (Tim Corner tcorner@via.at)

  o  SST 5136-DN-PC DeviceNet Interface (ss5136_cs)
     <http://www.gnofn.org/~marksu/dn5136man.html> (Mark Sutton
     Mark.Sutton@laitram.com)

  o  Trimble Mobile GPS (uses serial/modem driver)

  o  Y-E Data FlashBuster floppy drive adapter (floppy_cs) (David
     Bateman dbateman@eng.uts.edu.au)

  o  Zoom Telephonics ZoomAir 4000  <http://www.absoval.com/linux-wlan>
     (Mark Mathews mark@absoval.com)


  27.15.  Working on ...

  People are working on the following cards:

  o  Roland SCP-55 MIDI (Toshiaki Nakatsu ir9k-nkt@asahi.net.or.jp)

  o  CyberRom CD-ROM (David Rowntree rowntree@dircon.co.uk)

  o  IO DATA PCSC-II (Katayama Nobuhiro kata-n@po.iijnet.or.jp)

  o  Macnica mPS-1x0 (Katayama Nobuhiro kata-n@po.iijnet.or.jp)

  o  Proxim RangeLAN/2
     <http://students.ou.edu/D/James.R.Duchek-1/rangelan2.html> (Jim
     Duchek jimducheck@primary.net

  o  TView Preso (Brenden Tuck friar@zendragon.com)


  27.16.  Unsupported



  o  Adaptec/Trantor APA-460 SlimSCSI

  o  Eiger Labs SCSI w/FCC ID K36..

  o  New Media .WAVjammer and all other sound cards

  o  New Media LiveWire+

  o  Nikon CoolPix100

  o  Panasonic KXL-D720, KXL-D745, KXL-D783

  o  SMC 8016 EliteCard

  o  Xircom CE II Ethernet/Modem

  o  Xircom CE-10BT Ethernet


  28.  Appendix C. Supported Parallel Port devices

  More and more, the parallel port is used to connect other devices than
  printers. To support this parallel port drivers are written for the
  devicesto work. This appendix presents devices for which parallel port
  support is written.

  To be clear: printers are not presented in this appendix as they are
  not supported by parallel port support projects.

  Also, check the Linux Parallel Port support pages for more information
  <http://www.torque.net/parport>. Here you can find

  o  paride subsystem for parallel port IDE devices (
     <http://www.torque.net/parport/paride.html>)

  o  support for parallel port SCSI devices (
     <http://www.torque.net/parport/parscsi.html>)


  28.1.  Ethernet


  o  Accton EtherPocket adapter

  o  AT-Lan-Tec/RealTek parallel port ethernet adapter

  o  D-Link DE600/DE620 parallel port ethernet adapter


  28.2.  Hard drives



  o  H45 Quick HD

  o  KingByte IDE/ATAPI disks

  o  KT Technologies PHd portable hard disk

  o  MicroSolutions backpack hard-drives

  o  SyQuest EZ-135

  o  SyQuest EZ-230


  o  SyQuest SparQ

  o  ValueStor external hard-drive


  28.3.  Tape drives



  o  Hewlett-Packard Colorado Tracker 250 tape drive (all except the
     T1000e)

  o  Hewlett-Packard HP Colorado 5GB tape drive

  o  Iomega Ditto tape drive

  o  MicroSolutions backpack 8000t, 8000td tape drives


  28.4.  CD-ROM drives



  o  Freecom Power CD

  o  Freecom Traveller CD-ROM

  o  H45 Quick CD

  o  Hewlett-Packard HP 7100e/7200e CD-R

  o  KingByte IDE/ATAPI CD-ROMs

  o  MicroSolutions backpack CD-ROM. Models 163550 and later are
     supported by the paride driver. For models 160550 and 162550
     seperate drivers are availavble.

  o  MicroSolutions backpack PD/CD drive

  o  SyQuest SyJet


  28.5.  Removable drives



  o  Avatar Shark 250

  o  Imation Superdisk

  o  Iomega ZIP, ZIP Plus drives


  28.6.  IDE Adapter



  o  Arista ParaDrive products

  o  DataStor Commuter disks

  o  Fidelity International Technologies TransDisk products

  o  Freecom IQ Cable Parallel


  o  Shuttle Technology EPAT/EPEZ parallel port IDE adapter

  o  Shuttle Technology EPIA parallel port IDE adapter


  28.7.  SCSI Adapters



  o  Adaptec APA-348 mini-SCSI plus adapter cable
     Driver available at  <http://www.torque.net/parpart/parscsi.html>

  o  Adaptec APA-358 mini-SCSI EPP adapter cable
     Driver available at  <http://www.torque.net/parpart/parscsi.html>

  o  Shuttle Technology EPSA-2 parallel port SCSI adapter
     Driver available at  <http://www.torque.net/parpart/parscsi.html>

  o  Shuttle Technology EPST parallel port SCSI adapter
     Driver available at  <http://www.torque.net/parpart/parscsi.html>


  28.8.  Digital Camera



  o  Connectix QuickCam


  28.9.  PCMCIA parallel port cards

  The parport_cs driver requires kernel 2.2.x or later


  o  Quatech SPP-100

  o  IOtech DBK35, WBK20A

  29.  Appendix D. Plug and Play devices

  For people having trouble getting Plug and Play devices to work, the
  ISA PnP utilities written by Peter Fox are available. Quote from the
  README:


  These programs allow ISA Plug-And-Play devices to be configured
  on a Linux machine.

  This program is suitable for all systems, whether or not they
  include a PnP BIOS.



  Commands have been taken from the Plug and Play ISA specification
  Version 1.0a.

  More information on ISA PnP utilities can be found on the website of
  Peter Fox:  <http://www.roestock.demon.co.uk/isapnptools/>

  Please let me know about hardware (not normally supported under Linux)
  which can be put to work with the aid of these utilities. A list of
  this hardware will be put in this appendix.



  30.  Appendix E. Linux incompatible Hardware

  Some hardware manufacturers have created devices which are compatible
  with MS-Dos and Windows 95/98 only. They seem to emulate part of the
  normally available hardware in the devices by software packages sold
  together with the device. Specification on these devices are not
  presented to the world so it is almost impossible to write drivers for
  these devices. Below a list of devices reported as being Linux
  incompatible will be given.

  Simply put, it is best to avoid hardware which states things like
  "Needs Windows" or "Windows only".



  o  Printers

  o  Brother HL-820 printer

  o  Canon LBP-465 printer

  o  HP Deskjet 710, 720, 820 and 1000 series printers (although Windows
     only) are supported under Linux. Have a look at
     <http://www.httptech.com/ppa/>. Be warned: Support is still in
     early development.

  o  Lexmark 1000 inkjet printer

  o  Lexmark 3200. For windows it has a emulation driver for HP500 and
     HP500C. Under Linux this printer will not work using a HP500 or
     HP500C driver.

  o  Lexmark 5000 printer

  o  Lexmark CJ5000 (ColorJet) printer

  o  OkiData OkiPage 4w

  o  Sharp JX-9210 printer

  o  Modems

  o  3Com 3CXM356/3CCM356 and 3CXM656/3CCM656 PCMCIA

  o  AOpen FM56-P and FM56-H

  o  AT&T/Lucent winmodem

  o  Boca Research 28.8 internal modem (model MV34AI)

  o  Boca Research 33.6 internal modem (model MV34)(Joe Harjung has
     succeeded in configuring the modem under Win95 and then soft
     booting into Linux with the modem still working. Filippo is using
     this modem under Linux directly without any problems and without
     soft booting from Windows. I definitely need more info on these
     Boca Research modems.)
     The Boca Research 33.6 modem (model M336I) is mentioned to work
     with Linux. The only thing that needed to be done was diabling Plug
     and Play. Here are the specs of the modem

  o  Three stickers saying "MC2920A-3.3", "E6030D 4035-01" and "1721
     8011 A"

  o  Chips etc on the board


  o  Cirrus Logic CL-MD3450D-SC-B

  o  Cirrus Logic MD1724-11VC-D

  o  Datatronic VLM301-1??

  o  Omron G5V-1 (2 of them)

  o  AST (?) M628032-20E1

  o  Cirrus Logic CL-MD4450C-SC-A

  o  Abracon 23-040-20

  o  two empty places for additional chips, one of which might be a
     Cirrus Logic CL-MD1724D

  o  4 jumpers for COM port selection

  o  10 jumpers for IRQ selection

  o  other unknown jumpers

  o  Compaq 192 PCMCIA modem/serial card

  o  HP Fastmodem D4810B

  o  IBM Mwave ("Dolphin") card. This card is a combination of sound,
     modem, fax, voice control and dictation. Software is replacing part
     of hardware functionality so this software should be loaded to get
     things working.

  o  Multiwave Innovation CommWave V.34 modem (
     <http://www.multiwave.com/>)

  o  Megahertz XJ/CC2560 PCMCIA

  o  New Media Winsurfer PCMCIA modem/serial card

  o  Rockwell SoftK56

  o  US Robotics WinModem series

  o  Zoltrix 33.6 Win HSP Voice/Speaker Phone modem

  o  Zoltrix Phantom 56K, model FM-HSP56PCI, chipset PCTel (PCI)

  31.  Glossary


     AGP
        Accelerated Graphics Port. A bus interconnect mechanism designed
        to improve performance of 3D graphics applications. AGP is a
        dedicated bus from the graphics subsystem to the core-logic
        chipset.
        <http://www.euro.dell.com/intl/euro/r+d/r+dnews/vectors/vect_2-1/v2-1_agp.htm>

     ATAPI
        AT Attachment Packet Interface. A new protocol for controlling
        mass storage devices similar to SCSI protocols. It builds on the
        ATA (AT Attachment) interface, the official ANSI Standard name
        for the IDE interface developed for hard disk drives. ATAPI is
        commonly used for hard disks, CD-ROM drives, tape drives, and
        other devices.


     ATM
        Asynchronous Transfer Mode

     CDDA
        Compact Disk Digital Audio. Capability of CD-ROM/Writer to read
        out audio tracks.

     DMA
        Direct Memory Access

     EGA
        Enhanced Graphics Adapter

     EIDE
        Enhanced IDE

     EISA
        Extended Industry System Architecture

     FDDI
        Fiber Distributed Data Interface. High-speed ring local area
        network.

     IDE
        Integrated Drive Electronics. Each drive has a built-in
        controller.

     ISA
        Industry System Architecture

     ISDN
        Integrated Services Digital Network

     MCA
        MicroChannel Architecture

     MFM
        Modified Frequency Modulation

     MMX
        Multimedia Extensions. Added to the newest generation of Intel
        Pentium Processors. It offers better audio and video quality

     PCI
        Pheripheral Component Interconnect. 32-bit bus designed by
        Intel. Information can be found on  <http://www.pcisig.com> and
        <http://infoserver.ee.siue.edu/~jbutter/EE580_1.html>.

     RAID
        Redudant Arrays of Inexpensive Disks. The basic idea of RAID is
        to combine multiple small, inexpensive disk drives into an array
        of disk drives which yields performance exceeding that of a
        single large expensive drive. There are five types of redundant
        array Architectures; RAID-1 through RAID-5. A non-redudant array
        of disk drives is referred to as RAID-0. Some RAID systems can
        mix formats.
        <http://www.uni-mainz.de/~neuffer/scsi/what_is_raid.html>

     PPA
        Printing Performance Architecture. Protocol developed by Hewlett
        Packard for their series of Deskjet printers. In essence, the
        protocol moves the low-level processing of the data to the host
        computer rather than the printer. This allows for a low-cost
        printer with a small amount of memory and computing power and a
        flexible driver. However, this comes at the price of
        compatibility. HP's decision was to develop drivers only for
        Windows 95 for this printer.

     RLL
        Run Length Limited

     SCSI
        Small Computer Systems Interface. A standerd interface defined
        for all devices in a computer. It make it possible to use a
        single adapter for all devices.
        <http://www.uni-mainz.de/~neuffer/scsi/what_is_scsi.html>

     SVGA
        Super Video Graphics Adapter

     UART
        Universal Asynchronous Receiver Transmitter

     USB
        Universal Serial Bus. Not yet supported by Linux.

     VGA
        Video Graphics Adapter

     VLB
        VESA Local Bus. Used in some 486 PC's.

     WORM
        Write Once Read Many



  Linux Information Sheet
  Michael K. Johnson <johnsonm@redhat.com>
  v4.14, 1 September 1998

  This document provides basic information about the Linux operating
  system, including an explanation of Linux, a list of features, some
  requirements, and some resources.
  ______________________________________________________________________

  Table of Contents


  1. Introduction to Linux

  2. Linux Features

  3. Hardware Issues

     3.1 Minimal configuration
     3.2 Usable configuration
     3.3 Supported hardware

  4. An Incomplete List of Ported Programs and Other Software

  5. Who uses Linux?

  6. Getting Linux

     6.1 Anonymous FTP
     6.2 CDROM
     6.3 Other methods of obtaining Linux

  7. Legal Status of Linux

  8. News About Linux

  9. The Future

  10. This document

  11. Legalese



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn ttoo LLiinnuuxx

  Linux is a completely free reimplementation of the POSIX
  specification, with SYSV and BSD extensions (which means it looks like
  Unix, but does not come from the same source code base), which is
  available in both source code and binary form.  Its copyright is owned
  by Linus Torvalds <torvalds@transmeta.com> and other contributors, and
  is freely redistributable under the terms of the GNU General Public
  License (GPL).  A copy of the GPL is included with the Linux source;
  you can also get a copy from  <ftp://prep.ai.mit.edu/pub/gnu/COPYING>

  LLiinnuuxx, per se, is only the kernel of the operating system, the part
  that controls hardware, manages files, separates processes, and so
  forth.  There are several combinations of Linux with sets of utilities
  and applications to form a complete operating system.  Each of these
  combinations is called a ddiissttrriibbuuttiioonn of Linux.  The word LLiinnuuxx,
  though it in its strictest form refers specifically to the kernel, is
  also widely and correctly to refer to an entire operating system built
  around the Linux kernel.  For a list and brief discription of various
  distributions, see <http://sunsite.unc.edu/LDP/HOWTO/Distribution-
  HOWTO.html> NNoonnee of these distributions is ``the official Linux''.

  Linux is nnoott public domain, nor is it `shareware'.  It is `free'
  software, commonly called ffrreeeewwaarree or OOppeenn SSoouurrccee SSooffttwwaarree[[ttmm]] (see
  <http://www.opensource.org>), and you may give away or sell copies,
  but you must include the source code or make it available in the same
  way as any binaries you give or sell.  If you distribute any
  modifications, you are legally bound to distribute the source for
  those modifications.  See the GNU General Public License for details.

  Linux is still free as of version 2.0, and will continue to be free.
  Because of the nature of the GPL to which Linux is subject, it would
  be illegal for it to be made not free.  Note carefully: the `free'
  part involves access to the source code rather than money; it is
  perfectly legal to charge money for distributing Linux, so long as you
  also distribute the source code.  This is a generalization; if you
  want the fine points, read the GPL.

  Linux runs on 386/486/Pentium machines with ISA, EISA, PCI and VLB
  busses.  MCA (IBM's proprietary bus) is not well-supported in 2.0.x
  and earlier versions, but support has been added to the current
  development tree, 2.1.x.  If you are interested, see
  <http://glycerine.itsmm.uni.edu/mca>

  There is a port to multiple Motorola 680x0 platforms (currently
  running on some Amigas, Ataris, and VME machines), which now works
  quite well.  It requires a 68020 with an MMU, a 68030, 68040, or a
  68060, and also requires an FPU. Networking and X now work.  See
  <news:comp.os.linux.m68k>

  Linux runs well on DEC's Alpha CPU, currently supporting the "Jensen",
  "NoName", "Cabriolet", "Universal Desktop Box" (better known as the
  Multia), and many other platforms.  For more information, see
  <http://www.azstarnet.com/~axplinux/FAQ.html>

  Linux runs well on Sun SPARCs; most sun4c, sun4m, and sun4u machines
  now run Linux, with support for sun4 in development.  Red Hat Linux is
  (as of this writing) the only Linux distribution available for SPARCs;
  see <http://www.redhat.com/support/docs/rhl-sparc/>

  Linux is being actively ported to the PowerPC architecture, including
  PowerMac (Nubus and PCI), Motorola, IBM, and Be machines.  See
  <http://www.cs.nmt.edu/~linuxppc/> and <http://www.linuxppc.org/>

  Ports to other machines, including MIPS (see
  <http://linus.linux.sgi.com> and  <http://lena.fnet.fr/>) and ARM, are
  under way and showing various amounts of progress.  Don't hold your
  breath, but if you are interested and able to contribute, you may well
  find other developers who wish to work with you.

  Linux is no longer considered to be in beta testing, as version 1.0
  was released on March 14, 1994.  There are still bugs in the system,
  and new bugs will creep up and be fixed as time goes on.  Because
  Linux follows the ``open development model'', all new versions will be
  released to the public, whether or not they are considered
  ``production quality''.  However, in order to help people tell whether
  they are getting a stable version or not, the following scheme has
  been implemented:  Versions n.x.y, where x is an even number, are
  stable versions, and only bug fixes will be applied as y is
  incremented.  So from version 1.2.2 to 1.2.3, there were only bug
  fixes, and no new features.  Versions n.x.y, where x is an odd number,
  are beta-quality releases for developers only, and may be unstable and
  may crash, and are having new features added to them all the time.
  >From time to time, as the currect development kernel stabilizes, it
  will be frozen as the new ``stable'' kernel, and development will
  continue on a new development version of the kernel.  Note that most
  releases of the Linux kernel, beta or not, are relatively robust;
  ``stable'' in this context means ``slow to change'' in addition to
  ``robust''.

  The current stable version is 2.0.35 (this will continue to change as
  new device drivers get added and bugs fixed), and development has also
  started on the experimental 2.1.x kernels.  The Linux kernel source
  code contains a file, Documentation/Changes, which explains changes
  that you should be aware of when upgrading from one kernel version to
  another.  However, the great majority of Linux users simply update
  their Linux distribution occasionally to get a new kernel version.

  Most versions of Linux, beta or not, are quite robust, and you can
  keep using those if they do what you need and you don't want to be on
  the bleeding edge.  One site had a computer running version 0.97p1
  (dating from the summer of 1992) for over 136 days without an error or
  crash.  (It would have been longer if the backhoe operator hadn't
  mistaken a main power transformer for a dumpster...) Others have
  posted uptimes in excess of a year. One site still had a computer
  running Linux 0.99p15s over 600 days at last report.

  One thing to be aware of is that Linux is developed using an open and
  distributed model, instead of a closed and centralized model like much
  other software.  This means that the current development version is
  always public (with up to a week or two of delay) so that anybody can
  use it.  The result is that whenever a version with new functionality
  is released, it almost always contains bugs, but it also results in a
  very rapid development so that the bugs are found and corrected
  quickly, often in hours, as many people work to fix them.

  In contrast, the closed and centralized model means that there is only
  one person or team working on the project, and they only release
  software that they think is working well.  Often this leads to long
  intervals between releases, long waiting for bug fixes, and slower
  development.  The latest release of such software to the public is
  sometimes of higher quality, but the development speed is generally
  much slower.

  For a discussion of these two models, read ``The Cathedral and the
  Bazaar'' at  <http://sagan.earthspace.net/~esr/writings/cathedral-
  bazaar/> by Eric Raymond.

  As of September 1, 1998, the current stable version of Linux is
  2.0.35, and the latest development version is 2.1.119.


  22..  LLiinnuuxx FFeeaattuurreess


  +o  multitasking: several programs running at the same time.

  +o  multiuser: several users on the same machine at the same time (and
     nnoo two-user licenses!).

  +o  multiplatform: runs on many different CPUs, not just Intel.

  +o  multiprocessor: SMP support is available on the Intel and SPARC
     platforms (with work currently in progress on other platforms), and
     Linux is used in several loosely-coupled MP applications, including
     Beowulf systems (see <http://cesdis.gsfc.nasa.gov/linux-
     web/beowulf/beowulf.html>) and the Fujitsu AP1000+ SPARC-based
     supercomputer.

  +o  multithreading: has native kernel support for multiple independent
     threads of control within a single process memory space.

  +o  runs in protected mode on the 386.

  +o  has memory protection between processes, so that one program can't
     bring the whole system down.

  +o  demand loads executables: Linux only reads from disk those parts of
     a program that are actually used.

  +o  shared copy-on-write pages among executables.  This means that
     multiple process can use the same memory to run in.  When one tries
     to write to that memory, that page (4KB piece of memory) is copied
     somewhere else.  Copy-on-write has two benefits: increasing speed
     and decreasing memory use.

  +o  virtual memory using paging (not swapping whole processes) to disk:
     to a separate partition or a file in the filesystem, or both, with
     the possibility of adding more swapping areas during runtime (yes,
     they're still called swapping areas).  A total of 16 of these 128
     MB (2GB in recent kernels) swapping areas can be used at the same
     time, for a theoretical total of 2 GB of useable swap space.  It is
     simple to increase this if necessary, by changing a few lines of
     source code.

  +o  a unified memory pool for user programs and disk cache, so that all
     free memory can be used for caching, and the cache can be reduced
     when running large programs.

  +o  dynamically linked shared libraries (DLL's), and static libraries
     too, of course.

  +o  does core dumps for post-mortem analysis, allowing the use of a
     debugger on a program not only while it is running but also after
     it has crashed.

  +o  mostly compatible with POSIX, System V, and BSD at the source
     level.

  +o  through an iBCS2-compliant emulation module, mostly compatible with
     SCO, SVR3, and SVR4 at the binary level.

  +o  all source code is available, including the whole kernel and all
     drivers, the development tools and all user programs; also, all of
     it is freely distributable.  Plenty of commercial programs are
     being provided for Linux without source, but everything that has
     been free, including the entire base operating system, is still
     free.

  +o  POSIX job control.

  +o  pseudoterminals (pty's).

  +o  387-emulation in the kernel so that programs don't need to do their
     own math emulation.  Every computer running Linux appears to have a
     math coprocessor.  Of course, if your computer already contains an
     FPU, it will be used instead of the emulation, and you can even
     compile your own kernel with math emulation removed, for a small
     memory gain.

  +o  support for many national or customized keyboards, and it is fairly
     easy to add new ones dynamically.

  +o  multiple virtual consoles: several independent login sessions
     through the console, you switch by pressing a hot-key combination
     (not dependent on video hardware).  These are dynamically
     allocated; you can use up to 64.

  +o  Supports several common filesystems, including minix, Xenix, and
     all the common system V filesystems, and has an advanced filesystem
     of its own, which offers filesystems of up to 4 TB, and names up to
     255 characters long.

  +o  transparent access to MS-DOS partitions (or OS/2 FAT partitions)
     via a special filesystem: you don't need any special commands to
     use the MS-DOS partition, it looks just like a normal Unix
     filesystem (except for funny restrictions on filenames,
     permissions, and so on).  MS-DOS 6 compressed partitions do not
     work at this time without a patch (dmsdosfs).  VFAT (WNT, Windows
     95) support and FAT-32 is available in Linux 2.0

  +o  special filesystem called UMSDOS which allows Linux to be installed
     on a DOS filesystem.

  +o  read-only HPFS-2 support for OS/2 2.1

  +o  HFS (Macintosh) file system support is available separately as a
     module.

  +o  CD-ROM filesystem which reads all standard formats of CD-ROMs.

  +o  TCP/IP networking, including ftp, telnet, NFS, etc.

  +o  Appletalk server

  +o  Netware client and server

  +o  Lan Manager/Windows Native (SMB) client and server

  +o  Many networking protocols: the base protocols available in the
     latest development kernels include TCP, IPv4, IPv6, AX.25, X.25,
     IPX, DDP (Appletalk), Netrom, and others.  Stable network protocols
     included in the stable kernels currently include TCP, IPv4, IPX,
     DDP, and AX.25.



  33..  HHaarrddwwaarree IIssssuueess

  33..11..  MMiinniimmaall ccoonnffiigguurraattiioonn

  The following is probably the smallest possible configuration that
  Linux will work on: 386SX/16, 1 MB RAM, 1.44 MB or 1.2 MB floppy, any
  supported video card (+ keyboards, monitors, and so on of course).
  This should allow you to boot and test whether it works at all on the
  machine, but you won't be able to do anything useful.  See
  <http://rsphy1.anu.edu.au/~gpg109/mem.html> for minimal Linux
  configurations

  In order to do something, you will want some hard disk space as well,
  5 to 10 MB should suffice for a very minimal setup (with only the most
  important commands and perhaps one or two small applications
  installed, like, say, a terminal program).  This is still very, very
  limited, and very uncomfortable, as it doesn't leave enough room to do
  just about anything, unless your applications are quite limited.  It's
  generally not recommended for anything but testing if things work, and
  of course to be able to brag about small resource requirements.


  33..22..  UUssaabbllee ccoonnffiigguurraattiioonn

  If you are going to run computationally intensive programs, such as
  gcc, X, and TeX, you will probably want a faster processor than a
  386SX/16, but even that should suffice if you are patient.
  In practice, you will want at least 4 MB of RAM if you don't use X,
  and 8 MB if you do.  Also, if you want to have several users at a
  time, or run several large programs (compilations for example) at a
  time, you may want more than 4 MB of memory.  It may still work with a
  smaller amount of memory, but it will use virtual memory (using the
  hard drive as ssllooww memory) and that will be so slow as to be unusable.
  If you use many programs at the same time, 16 MB will reduce swapping
  considerably.  If you don't want to swap appreciably under normal
  load, 32 MB will probably suffice for a single user.  If you run lots
  of memory-intensive applications at once, 64 MB may be necessary to
  avoid lots of swapping.  Of course, if you run memory-hungry
  applications, you may want more.

  The amount of hard disk you need depends on what software you want to
  install.  The normal basic set of Unix utilities, shells, and
  administrative programs should be comfortable in less than 10 MB, with
  a bit of room to spare for user files.  For a more complete system,
  get Red Hat, Debian, or another distribution, and assume that you will
  need 60 to 600 MB, depending on what you choose to install and what
  distribution you get.  Add whatever space you want to reserve for user
  files to these totals.  With today's prices on hard drives, if you are
  buying a new system, it makes no sense to buy a drive that is too
  small.  Get at least 2 GB, preferably 4 GB or more, and you will not
  regret it.  Linux will happily handle very large hard drive such as
  the recently popular 11 GB IDE hard drives or 18 GB SCSI hard drives.

  Add more memory, more hard disk, a faster processor and other stuff
  depending on your needs, wishes and budget to go beyond the merely
  usable.  In general, one big difference from DOS is that with Linux,
  adding memory makes a large difference, whereas with DOS, extra memory
  doesn't make that much difference.  This of course has something to do
  with DOS's 640KB limit, which is completely nonexistent under Linux.


  33..33..  SSuuppppoorrtteedd hhaarrddwwaarree


     CCPPUU::
        Anything that runs 386 protected mode programs.  All models of
        386s 486s, Pentiums, Pentium Pros, Pentium IIs, and clones of
        these chips should work.  (286s and below may someday be
        supported on a smaller kernel called ELKS (Embeddable Linux
        Kernel Subset), but don't expect the same capabilities).  A
        version for the 680x0 CPU (for _x = 2 with external MMU, 3, 4,
        and 6) which runs on Amigas and Ataris can be found at
        tsx-11.mit.edu in the 680x0 directory.  Many DEC Alphas, SPARCs,
        and PowerPC machines are supported.  Ports are also being done
        to the ARM, StrongARM, and MIPS architectures.  More details are
        available elsewhere.


     AArrcchhiitteeccttuurree::
        PCI, ISA, EISA, and VLB busses.  MCA (mostly true blue PS/2s)
        support is incomplete but improving (see above).  Linux puts
        higher demands on hardware than DOS, Windows, and in fact most
        operating systems.  This means that some marginal hardware that
        doesn't fail when running less demanding operating system may
        fail when running Linux.  Linux is an excellent memory tester...


     RRAAMM::
        Up to 1 GB on Intel; more on 64-bit platforms.  Some people
        (including Linus) have noted that adding ram without adding more
        cache at the same time has slowed down their machine extremely,
        so if you add memory and find your machine slower, try adding
        more cache.  Some machines can only cache certain amounts of
        memory regardless of how much RAM is installed (64 MB is the
        most one popular chipset can cache).  Over 64 MB of memory will
        require a boot-time parameter with kernels 2.0.35 and earlier,
        as the BIOS was originally designed to be unable to report more
        than 64MB.  Recent 2.1.x kernels and later are able to detect
        more memory in a system.


     DDaattaa ssttoorraaggee::
        Generic AT drives (EIDE, IDE, 16 bit HD controllers with MFM or
        RLL, or ESDI) are supported, as are SCSI hard disks and CD-ROMs,
        with a supported SCSI adaptor.  Generic XT controllers (8 bit
        controllers with MFM or RLL) are also supported.  Supported SCSI
        adaptors: Advansys, Adaptec 1542, 1522, 1740, 27xx, and 29xx
        (with some exceptions) series, Buslogic MultiMaster and
        Flashpoint, NCR53c8xx-based controllers, DPT controllers, Qlogic
        ISP and FAS controllers, Seagate ST-01 and ST-02, Future Domain
        TMC-88x series (or any board based on the TMC950 chip) and
        TMC1660/1680, Ultrastor 14F, 24F and 34F, Western Digital
        wd7000, and others.  SCSI, QIC-02, and some QIC-80 tapes are
        also supported.  Besides IDE and SCSU cdroms, several
        proprietary CD-ROM devices are also supported, including
        Matsushita/Panasonic, Mitsumi, Sony, Soundblaster, Toshiba,
        ATAPI (EIDE), SCSI, and others.  For exact models, check the
        hardware compatibility HOWTO.  NN..BB.. These lists are incomplete,
        and always will be.  Distribution vendors maintain more up-to-
        date lists.


     VViiddeeoo::
        VGA, EGA, CGA, or Hercules (and compatibles) work in text mode.
        For graphics and X, there is support for (at least) normal VGA,
        some super-VGA cards (most of the cards based on Tseng,
        Paradise, and some Trident chipsets), S3, 8514/A, ATI, Matrox,
        and Hercules.  (Linux uses the XFree86 X server, so that
        determines what cards are supported.  A full list of supported
        chipsets alone takes over a page.  See
        <http://www.XFree86.org/>)


     NNeettwwoorrkkiinngg::
        Ethernet support includes 3COM 503/509/579/589/595/905
        (501/505/507 are supported but not recomended), AT&T GIS (nee
        NCR) WaveLAN, most WD8390-based cards, most WD80x3-based cards,
        NE1000/2000 and most clones, AC3200, Apricot 82596, AT1700, ATP,
        DE425/434/435/500, D-Link DE-600/620, DEPCA, DE100/101,
        DE200/201/202 Turbo, DE210, DE422, Cabletron E2100 (not
        recommended), Intel EtherExpress (not recommended), EtherExpress
        Pro, EtherExpress 100, DEC EtherWORKS 3, HP LAN, HP PCLAN/plus,
        most AMD LANCE-based cards, NI5210, ni6510, SMC Ultra, DEC 21040
        (tulip), Zenith Z-Note ethernet, All Zircom cards and all
        Cabletron cards other than the E2100 are unsupported, due to the
        manufacturers unwillingness to release programming information
        freely.

        FDDI support currently includes the DEF_x_x cards from DEC.

        Point-to-Point networking support include PPP, SLIP, CSLIP, and
        PLIP.  PPP support is available for both standard asyncronous
        devices like modems, and syncronous connections like ISDN.

        Limited Token Ring support is available.


     SSeerriiaall::
        Most 16450 and 16550 UART-based boards, including AST Fourport,
        the Usenet Serial Card II, and others.  Intelligent boards
        supported include Cyclades Cyclom series (supported by the
        manufacturer), Comtrol Rocketport series (supported by the
        manufacturer), Stallion (most boards; supported by the
        manufacturer), and Digi (some boards; supported by the
        manufacturer).  Some ISDN, frame relay, and leased line hardware
        is supported.


     OOtthheerr hhaarrddwwaarree::
        SoundBlaster, ProAudio Spectrum 16, Gravis Ultrasound, most
        other sound cards, most (all?)  flavours of bus mice (Microsoft,
        Logitech, PS/2), etc.


  44..  AAnn IInnccoommpplleettee LLiisstt ooff PPoorrtteedd PPrrooggrraammss aanndd OOtthheerr SSooffttwwaarree

  Most of the common Unix tools and programs have been ported to Linux,
  including almost all GNU software and many X clients from various
  sources.  Actually, ported is often too strong a word, since many
  programs compile out of the box without modifications, or only small
  modifications, because Linux tracks POSIX quite closely.  There are
  never enough applications for any operating system, but Linux is
  gaining both end-user applications and server applications.  Contact
  the vendor of your favorite commercial Unix application and ask if
  they have ported it to Linux.

  Here is an incomplete list of software that is known to work under
  Linux:


     BBaassiicc UUnniixx ccoommmmaannddss::
        ls, tr, sed, awk and so on (you name it, Linux probably has it).


     DDeevveellooppmmeenntt ttoooollss::
        gcc, gdb, make, bison, flex, perl, rcs, cvs, prof.


     LLaanngguuaaggeess aanndd EEnnvviirroonnmmeennttss::
        C, C++, Objective C, Java, Modula-3, Modula-2, Oberon, Ada95,
        Pascal, Fortran, ML, scheme, Tcl/tk, Perl, Python, Common Lisp,
        and many others.


     GGrraapphhiiccaall eennvviirroonnmmeennttss::
        GNOME and KDE (desktops), X11R6 (XFree86 3.x), X11R5 (XFree86
        2.x), MGR.


     EEddiittoorrss::
        GNU Emacs, XEmacs, MicroEmacs, jove, ez, epoch, elvis (GNU vi),
        vim, vile, joe, pico, jed, and others.


     SShheellllss::
        bash (POSIX sh-compatible), zsh (includes ksh compatiblity
        mode), pdksh, tcsh, csh, rc, es, ash (mostly sh-compatible shell
        used as /bin/sh by BSD), and many more.


     TTeelleeccoommmmuunniiccaattiioonn::
        PPP, UUCP, SLIP, CSLIP, full TCP/IP communication toolset,
        kermit, szrz, minicom, pcomm, xcomm, term (runs multiple shells,
        redirects network activity, and allows remote X, all over one
        modem line), Seyon (popular X-windows communications program),
        and several fax and voice-mail (using ZyXEL and other modems)
        packages are available.  Of course, remote serial and network
        logins are supported.


     NNeewwss aanndd mmaaiill::
        C-news, innd, trn, nn, tin, smail, elm, mh, exmh, pine, mutt,
        etc.


     TTeexxttpprroocceessssiinngg::
        TeX, groff, doc, ez, LyX, Lout, Linuxdoc-SGML, and others.


     GGaammeess::
        Nethack, several Muds and X games, and lots of others.  One of
        those games is looking through all the games available at tsx-11
        and sunsite.

  All of these programs (and this isn't even a hundredth of what is
  available) are freely available.  Commercial software is becoming
  widely available; ask the vendor of your favorite commercial software
  if they support Linux.


  55..  WWhhoo uusseess LLiinnuuxx??

  Linux is freely available, and no one is required to register their
  copies with any central authority, so it is difficult to know how many
  people use Linux.  Several businesses now survive solely on selling
  and supporting Linux, and the Linux newsgroups are some of the most
  heavily read on the internet, so the number is likely in the millions,
  but firm numbers are hard to come by.  The best market research
  currently indicates between 7.5 and 11 million users.


  One brave soul, Harald T. Alvestrand <Harald.T.Alvestrand@uninett.no>,
  has decided to try to count Linux users the hard way: one by one.  If
  you are willing to be counted as a Linux user, please use the web
  forms available at  <http://counter.li.org/> Alternatively, you can
  send a message to linux-counter@uninett.no with one of the following
  subjects: `I use Linux at home', `I use Linux at work', or `I use
  Linux at home and at work'.  He will also accept `third-party'
  registrations; ask him for details.


  He posts his counts to  <news:comp.os.linux.misc> each month; they are
  also available from  <http://counter.li.org/>.


  66..  GGeettttiinngg LLiinnuuxx

  66..11..  AAnnoonnyymmoouuss FFTTPP

  For freely-redistributable Linux documentation, see the Linux
  Documentation Project sites at
  <ftp://sunsite.unc.edu/pub/Linux/docs/LDP/> and
  <http://sunsite.unc.edu/LDP/>


  Stay tuned to the <news:comp.os.linux.announce> newsgroup for further
  developments.

  At least the following anonymous ftp sites carry Linux.


       Textual name                   Numeric address  Linux directory
       =============================  ===============  ===============
       tsx-11.mit.edu                 18.172.1.2       /pub/linux
       sunsite.unc.edu                152.2.22.81      /pub/Linux
       ftp.funet.fi                   128.214.248.6    /pub/Linux
       net.tamu.edu                   128.194.177.1    /pub/linux
       ftp.mcc.ac.uk                  130.88.203.12    /pub/linux
       src.doc.ic.ac.uk               146.169.2.1      /packages/linux
       fgb1.fgb.mw.tu-muenchen.de     129.187.200.1    /pub/linux
       ftp.informatik.tu-muenchen.de  131.159.0.110    /pub/comp/os/linux
       ftp.dfv.rwth-aachen.de         137.226.4.111    /pub/linux
       ftp.informatik.rwth-aachen.de  137.226.225.3    /pub/Linux
       ftp.Germany.EU.net             192.76.144.75    /pub/os/Linux
       ftp.lip6.fr                    132.227.77.2     /pub/linux
       ftp.uu.net                     137.39.1.9       /systems/unix/linux
       wuarchive.wustl.edu            128.252.135.4    mirrors/linux
       ftp.win.tue.nl                 131.155.70.100   /pub/linux
       ftp.stack.urc.tue.nl           131.155.2.71     /pub/linux
       srawgw.sra.co.jp               133.137.4.3      /pub/os/linux
       cair.kaist.ac.kr                                /pub/Linux
       ftp.denet.dk                   129.142.6.74     /pub/OS/linux
       NCTUCCCA.edu.tw                140.111.1.10     /Operating-Systems/Linux
       nic.switch.ch                  130.59.1.40      /mirror/linux
       sunsite.cnlab-switch.ch        193.5.24.1       /mirror/linux
       cnuce_arch.cnr.it              131.114.1.10     /pub/Linux
       ftp.monash.edu.au              130.194.11.8     /pub/linux
       ftp.dstc.edu.au                130.102.181.31   /pub/linux
       ftp.sydutech.usyd.edu.au       129.78.192.2     /pub/linux





  tsx-11.mit.edu and fgb1.fgb.mw.tu-muenchen.de are the official sites
  for Linux's GCC.  Some sites mirror other sites.  Please use the site
  closest (network-wise) to you whenever possible.

  At least sunsite.unc.edu and ftp.informatik.tu-muenchen.de offer
  ftpmail services.  Mail ftpmail@sunsite.unc.edu or ftp@informatik.tu-
  muenchen.de for help.

  If you are lost, try looking at
  <http://sunsite.unc.edu/LDP/HOWTO/Distribution-HOWTO.html>, where
  several distributions are enumerated.  Red Hat Linux and Debian appear
  to be the most popular distributions at the moment, at least in the
  U.S.


  66..22..  CCDDRROOMM

  Most people now install Linux from CDROM's.  The distributions have
  grown to hundreds of MBs of Linux software, and downloading that over
  even a 28.8 modem or an ISDN connection takes a lloonngg time.


  There are essentially two ways to purchase a Linux distribution on
  CDROM: as part of an archive of FTP sites, or directly from the
  manufacturer.  If you purchase an archive, you will often get several
  different distributions to choose from, but support is generally not
  included.  When you purchase a distribution directly from the vendor,
  you usually only get one distribution, but you usually get some form
  of support, usually installation support.




  66..33..  OOtthheerr mmeetthhooddss ooff oobbttaaiinniinngg LLiinnuuxx

  There are many BBSs that have Linux files.  A list of them is
  occasionally posted to comp.os.linux.announce.  Ask friends and user
  groups, or order one of the commmercial distributions.  A list of
  these is contained in the Linux distribution HOWTO, available as
  <http://sunsite.unc.edu/LDP/HOWTO/Distribution-HOWTO.html>, and posted
  regularily to the  <news:comp.os.linux.announce> newsgroup.



  77..  LLeeggaall SSttaattuuss ooff LLiinnuuxx

  Although Linux is supplied with the complete source code, it is
  copyrighted software, not public domain.  However, it is available for
  free under the GNU General Public License, sometimes referred to as
  the ``copyleft''.  See the GPL for more information.  The programs
  that run under Linux each have their own copyright, although many of
  them use the GPL as well.  X uses the MIT X copyright, and some
  utilities are under the BSD copyright.  In any case, all of the
  software on the FTP site is freely distributable (or else it shouldn't
  be there).


  88..  NNeewwss AAbboouutt LLiinnuuxx

  A monthly magazine, called _L_i_n_u_x _J_o_u_r_n_a_l, was launched over four years
  ago.  It includes articles intended for almost all skill levels, and
  is intended to be helpful to all Linux users.  One-year subscriptions
  are $22 in the U.S., $27 in Canada and Mexico, and $32 elsewhere,
  payable in US currency.  Subscription inquiries can be sent via email
  to subs@ssc.com, or faxed to +1-206-782-7191, or phoned to
  +1-206-782-7733, or mailed to Linux Journal, PO Box 85867, Seattle, WA
  98145-1867 USA.  SSC has a PGP public key available for encrypting
  your mail to protect your credit card number; finger info@ssc.com to
  get the key.

  There are several Usenet newsgroups for Linux discussion, and also
  several mailing lists.  See the Linux FAQ for more information about
  the mailing lists (you should be able to find the FAQ either in the
  newsgroup or on the FTP sites).

  The newsgroup  <news:comp.os.linux.announce> is a moderated newsgroup
  for announcements about Linux (new programs, bug fixes, etc).

  The newsgroup  <news:comp.os.linux.answers> is a moderated newsgroup
  to which the Linux FAQ, HOWTO documents, and other documentation
  postings are made.

  The newsgroup  <news:comp.os.linux.admin> is an unmoderated newsgroup
  for discussion of administration of Linux systems.

  The newsgroup  <news:comp.os.linux.development.system> is an
  unmoderated newsgroup specifically for discussion of Linux kkeerrnneell
  development.  The only application development questions that should
  be discussed here are those that are intimately associated with the
  kernel.  All other development questions are probably generic Unix
  development questions and should be directed to a comp.unix group
  instead, unless they are very Linux-specific applications questions,
  in which case they should be directed at
  comp.os.linux.development.apps.

  The newsgroup  <news:comp.os.linux.development.apps> is an unmoderated
  newsgroup specifically for discussion of Linux-related applications
  development.  It is not for discussion of where to get applications
  for Linux, nor a discussion forum for those who would like to see
  applications for Linux.

  The newsgroup  <news:comp.os.linux.hardware> is for Linux-specific
  hardware questions.

  The newsgroup  <news:comp.os.linux.networking> is for Linux-specific
  networking development and setup questions.

  The newsgroup  <news:comp.os.linux.x> is for Linux-specific X Windows
  questions.

  The newsgroup  <news:comp.os.linux.misc> is the replacement for
  comp.os.linux, and is meant for any discussion that doesn't belong
  elsewhere.

  In general, ddoo nnoott crosspost between the Linux newsgroups.  The oonnllyy
  crossposting that is appropriate is an occasional posting between one
  unmoderated group and  <news:comp.os.linux.announce>.  The whole point
  of splitting the old comp.os.linux group into many groups is to reduce
  traffic in each group.  Those that do not follow this rule will be
  flamed without mercy...

  Linux is on the web at the URL <http://sunsite.unc.edu/LDP/>


  99..  TThhee FFuuttuurree

  After Linux 1.0 was released, work was done on several enhancements.
  Linux 1.2 included disk access speedups, TTY improvements, virtual
  memory enhancements, multiple platform support, quotas, and more.
  Linux 2.0, the current stable version, has even more enhancements,
  including many performance improvements, several new networking
  protocols, one of the fastest TCP/IP implementations in the world, and
  far, far more.  Even higher performance, more networking protocols,
  and more device drivers will be available in Linux 2.2.

  Even with over 3/4 million lines of code in the kernel, there is
  plenty of code left to write, and even more documentation.  Please
  join the linux-doc@vger.rutgers.edu mailing list if you would like to
  contribute to the documentation. Send mail to
  majordomo@vger.rutgers.edu with a single line containing the word
  ``help'' in the body (NNOOTT the subject) of the message.


  1100..  TThhiiss ddooccuummeenntt

  This document is maintained by Michael K. Johnson
  <johnsonm@redhat.com>. Please mail me with any comments, no matter how
  small.  I can't do a good job of maintaining this document without
  your help.  A more-or-less current copy of this document can always be
  found at <http://sunsite.unc.edu/LDP/>


  1111..  LLeeggaalleessee

  Trademarks are owned by their owners.  There is no warranty about the
  information in this document.  Use and distribute at your own risk.
  The content of this document is in the public domain, but please be
  polite and attribute any quotes.







  Linux IP Masquerade HOWTO
  David Ranch, dranch@trinnet.net
  v1.85, May 29, 2000

  This document describes how to enable the Linux IP Masquerade feature
  on a given Linux host.  IP Masq is a form of Network Address Transla
  tion or NAT that allows internally connected computers that do not
  have one or more registered Internet IP addresses to have the ability
  to communicate to the Internet via your Linux box's single Internet IP
  address.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Introduction to IP Masquerading or IP MASQ for short
     1.2 Foreword, Feedback & Credits
     1.3 Copyright & Disclaimer

  2. Background Knowledge

     2.1 What is IP Masquerade?
     2.2 Current Status
     2.3 Who Can Benefit From IP Masquerade?
     2.4 Who Doesn't Need IP Masquerade?
     2.5 How does IP Masquerade Work?
     2.6 Requirements for IP Masquerade on Linux 2.0.x
     2.7 Requirements for IP Masquerade on Linux 2.2.x
     2.8 Requirements for IP Masquerade on Linux 2.3.x and 2.4.x

  3. Setting Up IP Masquerade

     3.1 Compiling the Kernel for IP Masquerade Support
        3.1.1 Linux 2.2.x Kernels
        3.1.2 Linux 2.0.x Kernels
        3.1.3 Linux 2.3.x / 2.4.x Kernels
     3.2 Assigning Private Network IP Addresses to the Internal LAN
     3.3 Configuring IP Forwarding Policies
        3.3.1 Linux 2.0.x Kernels
        3.3.2 Linux 2.2.x Kernels

  4. Configuring the other internal to-be MASQed machines

     4.1 Configuring Microsoft Windows 95
     4.2 Configuring Windows NT
     4.3 Configuring Windows for Workgroup 3.11
     4.4 Configuring UNIX Based Systems
     4.5 Configuring DOS using NCSA Telnet package
     4.6 Configuring MacOS Based System Running MacTCP
     4.7 Configuring MacOS Based System Running Open Transport
     4.8 Configuring Novell network using DNS
     4.9 Configuring OS/2 Warp
     4.10 Configuring OS/400 on a IBM AS/400
     4.11 Configuring Other Systems

  5. Testing IP Masquerade

  6. Other IP Masquerade Issues and Software Support

     6.1 Problems with IP Masquerade
     6.2 Incoming services
     6.3 Supported Client Software and Other Setup Notes
        6.3.1 Network Clients that -Work- with IP Masquerade
        6.3.2 Clients that do not have full support in IP MASQ:
     6.4 Stronger IP Firewall (IPFWADM) Rulesets
     6.5 Stronger IP Firewall (IPCHAINS) rulesets
     6.6 IP Masquerading multiple internal networks
     6.7 IP Masquerade and Dial-on-Demand Connections
     6.8 IPPORTFW, IPMASQADM, IPAUTOFW, REDIR, UDPRED, and other Port Forwarding tools
        6.8.1 IPPORTFW on 2.0.x kernels
        6.8.2 IPMASQADM with IPPORTFW support on 2.2.x kernels
     6.9 CU-SeeMe and Linux IP-Masquerade
     6.10 Mirabilis ICQ
     6.11 Gamers:  The LooseUDP patch

  7. Frequently Asked Questions

     7.1 What Linux Distributions support IP Masquerading out of the box?
     7.2 What are the minimum hardware requirements and any limitations for IP Masquerade?  How well does it perform?
     7.3 I've checked all my configurations, I still can't get IP Masquerade to work.  What should I do?
     7.4 How do I join or view the IP Masquerade and/or IP Masqurade Developers mailing lists and archives?
     7.5 How does IP Masquerade differ from Proxy or NAT services?
     7.6 Are there any GUI firewall creation/management tools?
     7.7 Does IP Masquerade work with dynamically assigned IP addresses?
     7.8 Can I use a cable modem (both bi-directional and with modem returns), DSL, satellite link, etc. to connect to the Internet and use IP Masquerade?
     7.9 Can I use Diald or the Dial-on-Demand feature of PPPd with IP MASQ?
     7.10 What applications are supported with IP Masquerade?
     7.11 How can I get IP Masquerade running on Redhat, Debian, Slackware, etc.?
     7.12 TELNET connections seem to break if I don't use them often.  Why is that?
     7.13 When my Internet connection first comes up, nothing works.  If I try again, everything then works fine.  Why is this?
     7.14 IP MASQ seems to be working fine but some sites don't work.  This usually happens with WWW and FTP.
     7.15 MASQed FTP clients don't work.
     7.16 IP Masquerading seems slow
     7.17 Now that I have IP Masquerading up, I'm getting all sorts of weird notices and errors in the SYSLOG log files.  How do I read the IPFWADM/IPCHAINS firewall errors?
     7.18 Can I configure IP MASQ to allow Internet users to directly contact internal MASQed servers?
     7.19 I'm getting "kernel: ip_masq_new(proto=UDP): no free ports." in my SYSLOG files.  Whats up?
     7.20 I'm getting "ipfwadm: setsockopt failed: Protocol not available" when I try to use IPPORTFW!
     7.21 Microsoft File and Print Sharing and Microsoft Domain clients (SAMBA) don't work through IP Masq!
     7.22 IRC won't work properly for MASQed IRC users.  Why?
     7.23 mIRC doesn't work with DCC Sends
     7.24 Can IP Masquerade work with only ONE Ethernet network card (IP Aliasing)?
     7.25 I'm trying to use the NETSTAT command to show my Masqueraded connections but its not working
     7.26 I would like to get Microsoft PPTP (GRE tunnels) and/or IPSEC (Linux SWAN) tunnels running through IP MASQ
     7.27 I want to get the XYZ network game to work through IP MASQ but it won't work.  Help!
     7.28 IP MASQ works fine for a while but then it stops working.  A reboot seems to fix this for a while.  Why?
     7.29 Internal MASQed computers cannot send SMTP or POP-3 mail!
     7.30 I need different internal MASQed networks to exit on different external IP addresses (IPROUTE2)
     7.31 Why do the new 2.1.x and 2.2.x kernels use IPCHAINS instead of IPFWADM?
     7.32 I've just upgraded to the 2.2.x kernels, why isn't IP Masquerade working?
     7.33 I've just upgraded to a 2.0.38+ kernels later, why isn't IP Masquerade working?
     7.34 I need help with EQL connections and IP Masq
     7.35 I can't get IP Masquerade to work!  What options do I have for Windows Platforms?
     7.36 I want to help on IP Masquerade development.  What can I do?
     7.37 Where can I find more information on IP Masquerade?
     7.38 I want to translate this HOWTO to another language, what should I do?
     7.39 This HOWTO seems out of date, are you still maintaining it?  Can you include more information on ...?  Are there any plans for making this better?
     7.40 I got IP Masquerade working, it's great!  I want to thank you guys, what can I do?

  8. Miscellaneous

     8.1 Useful Resources
     8.2 Linux IP Masquerade Resource
     8.3 Thanks to the following people..
     8.4 Reference
     8.5 Changes


  ______________________________________________________________________

  1.  Introduction


  1.1.  Introduction to IP Masquerading or IP MASQ for short


  This document describes how to enable the Linux IP Masquerade feature
  on a given Linux host.  IP Masq is a form of Network Address
  Translation or NAT that allows internally connected computers that do
  not have one or more registered Internet IP addresses to have the
  ability to communicate to the Internet via your Linux box's single
  Internet IP address.  It is possible to connect your internal machines
  to the Linux host with LAN technologies like Ethernet, TokenRing,
  FDDI, as well as other kinds of connections such as dialup PPP or SLIP
  links. This document uses Ethernet for the primary example since it is
  the most common scenario.
       This document is intended for users using either of the sta
       ble Linux kernels: 2.0.38+ and 2.2.15+ on a IBM-compatible
       PC. Older kernels such as 1.2.x, 1.3.x, and 2.1.x are NOT
       covered in this document and, in some kernel versions, can
       be considered broken.  Please upgrade to one of the stable
       Linux kernels before using IP Masquerading.  The new 2.3 and
       2.4 kernels with the new NetFilter code aren't covered yet
       but URLs are provided below.  Once the feature set for Net
       filter is final, the new code will be covered in this HOWTO.

       If you are configuring IP Masq for use on a Macintosh,
       please email Taro Fukunaga, tarozax@earthlink.net for a copy
       of his short MkLinux version of this HOWTO.



  1.2.  Foreword, Feedback & Credits

  As a new user, I found it very confusing to setup IP masquerade on
  Linux kernel, (1.2.x kernel back then).  Although there is a FAQ and a
  mailing list, there was no document that was dedicated to it.  There
  were also some requests on the mailing list for such a HOWTO.  So, I
  decided to write this HOWTO as a starting point for new users and
  possibly create a building block for other knowledgeable users to use
  add to in the future.  If you have any ideas for this document,
  corrections, etc., feel free to tell us so that we can make it better.

  This document was originally based on the original FAQ by Ken Eves and
  numerous helpful messages from the IP Masquerade mailing list.  A
  special thanks to Mr. Matthew Driver whose mailing list message
  inspired me to set up IP Masquerade and eventually writing this.
  Recently, David Ranch re-wrote the HOWTO and added a substantial
  number of sections to the HOWTO to make this document as complete as
  possible.

  Please feel free to send any feedback or comments to
  ambrose@writeme.com and dranch@trinnet.net if you have any corrections
  or if any information/URLs/etc. is missing. Your invaluable feedback
  will certainly influence the future of this HOWTO!

  This HOWTO is meant to be a fairly comprehensive guide on getting your
  Linux IP Masquerading network working in the shortest time possible.
  David is not a technical writer by trade so  you might find the
  information in this document not as general and/or objective as it
  could be.  The latest news and information regarding this HOWTO and
  other IP MASQ details can be found at the IP Masquerade Resource
  <http://ipmasq.cjb.net/> web page that we actively maintain.  If you
  have any technical questions on IP Masquerade, please join the IP
  Masquerade Mailing List instead of sending email to David.  Most MASQ
  problems are common for ALL MASQ users and can be easily solved by
  someone on the list.  In addition to this, the response time of the IP
  MASQ email list will be much faster than a reply from David.


  The latest version of this document can be found at the following
  sites which also contains HTML and postscript versions

    http://ipmasq.cjb.net/: The IP Masquerade Resources

    http://ipmasq2.cjb.net/: The IP Masquerade Resources MIRROR

    The Linux Documentation Project

    Dranch's Linux page


    Also refer to IP Masquerade Resource Mirror Sites Listing
     <http://ipmasq.cjb.net/index.html#mirror> for other local mirror
     sites.


  1.3.  Copyright & Disclaimer


  This document is copyright(c) 2000 David Ranch and it is a FREE
  document. You may redistribute it under the terms of the GNU General
  Public License.

  The information herein this document is, to the best of David's
  knowledge, correct.  However, the Linux IP Masquerade feature is
  written by humans and thus, there is the chance that mistakes, bugs,
  etc. might happen from time to time.

  No person, group, or other body is responsible for any damage on your
  computer(s) and any other losses by using the information on this
  document. i.e.


       THE AUTHORS AND ALL MAINTAINERS ARE NOT RESPONSIBLE FOR ANY
       DAMAGES INCURRED DUE TO ACTIONS TAKEN BASED ON THE INFORMA
       TION IN THIS DOCUMENT.


  Ok, with all this behind us... On with the show..



  2.  Background Knowledge



  2.1.  What is IP Masquerade?

  IP Masquerade is a networking function in Linux similar to one-to-many
  NAT (Network Address Translation) found in many commercial firewalls
  and network routers.  For example, if a Linux host is connected to the
  Internet via PPP, Ethernet, etc., the IP Masquerade feature allows
  other "internal" computers connected to this Linux box (via PPP,
  Ethernet, etc.) to also reach the Internet as well.  Linux IP
  Masquerading allows for this functionality even though these internal
  machines don't have an officially assigned IP addresses.

  MASQ allows a set of machines to invisibly access the Internet via the
  MASQ gateway.  To other machines on the Internet, all this outgoing
  traffic will appear to be from the IP MASQ Linux server itself.  In
  addition to the added functionality, IP Masquerade provides the
  foundation to create a VERY secure networking environment.  With a
  well built firewall, breaking the security of a well configured
  masquerading system and internal LAN should be considerably difficult.


  2.2.  Current Status

  IP Masquerade has been out for several years now and is fairly mature
  as Linux enters the 2.2.x kernel stage.  Kernels since Linux 1.3.x
  have had MASQ support built-in.  Today many individuals and commercial
  businesses are using it with excellent results.

  Common network uses like Web browsing, TELNET, FTP, PING, TRACEROUTE,
  etc. work well over IP Masquerade.  Other communications such as FTP,
  IRC, and Real Audio work well with the appropriate IP MASQ modules
  loaded.  Other network-specific programs like streaming audio (MP3s,
  True Speech, etc) work too.  Some fellow users on the mailing list
  have even had good results with video conferencing software.

  Please refer to ``'' section for a more complete listing of software
  supported.



  IP Masquerade works well as a server to other 'client machines'
  running various different OS and hardware platforms. There are
  successful cases with internal MASQed systems using :



    Unix:  Sun Solaris, *BSD, Linux, Digital UNIX, etc.

    Microsoft Windows 95/98, Windows NT, and Windows for Workgroups
     (with the TCP/IP package)

    IBM OS/2

    Apple Macintosh MacOS machines running either MacTCP or Open
     Transport

    DOS-based systems with packet drivers and the NCSA Telnet package

    VAXen

    Compaq/Digital Alpha running Linux and NT

    even Amiga computers with AmiTCP or AS225-stack.

  The list goes on and on but the point is, if your OS platform talks
  TCP/IP, it should work with IP Masquerade!


  2.3.  Who Can Benefit From IP Masquerade?


    If you have a Linux host connected to the Internet and

    if you have some computers running TCP/IP connected to a Linux box
     on a local subnet, and/or

    if your Linux host has more than one modem and acts as a PPP or
     SLIP server connecting other computers, which

    those OTHER machines do not have official or public assigned IP
     addresses (i.e. addressed with private TCP/IP numbers).

    And of course, if you want those OTHER machines to communicate to
     the Internet without spending extra money to get additional Public
     / Official TCP/IP addresses from your ISP and either configure
     Linux to be a router or purchase an external router.


  2.4.  Who Doesn't Need IP Masquerade?


    If your machine is a stand-alone Linux host connected to the
     Internet (though setting up a firewall is a good idea), or

    if you already have multiple assigned public addresses for your
     OTHER machines, and


    of course, if you don't like the idea of a 'free ride' using Linux
     and feel more comfortable using expensive commercial tools to do
     the exact same thing.


  2.5.  How does IP Masquerade Work?

  From the original IP Masquerade FAQ by Ken Eves:

    Here is a drawing of the most simple setup:

     SLIP/PPP         +------------+                         +-------------+
     to ISP provider  |  Linux     |         SLIP/PPP        | Anybox      |
    <---------- modem1|    #1      |modem2 ----------- modem3|             |
      111.222.333.444 |            |           192.168.0.100 |             |
                      +------------+                         +-------------+

      In the above drawing, a Linux box with IP_MASQUERADING is installed as
    Linux #1 and is connected to the Internet via SLIP/or/PPP using modem1.  It has
    an assigned public IP address of 111.222.333.444.  It also has modem2 connected
    to allow callers to dial-in and start a SLIP/or/PPP connection.

      The second system (which doesn't have to be running Linux) calls into the
    Linux #1 box and starts a SLIP/or/PPP connection.  It does NOT have a publicly
    assigned IP address from the Internet so it uses the private address
    192.168.0.100. (see below for more info)

      With IP Masquerade and the routing configured properly, the machine
    "Anybox" can interact with the Internet as if it was directly connected to the
    Internet (with a few small exceptions).

  Quoting Pauline Middelink:

    Do not forget to mention that the "ANYBOX" machine should have the
    Linux #1 box configured as its gateway (whether is be the default route or just
    a subnet is no matter). If the "ANYBOX" machine can not do this, the Linux
    machine should be configured to support proxy arp for all routed addresses. But,
    the setup and configuration of proxy arp is beyond the scope of the document.

  The following is an excerpt from a previous post on comp.os.linux.networking which
  has been edited to match the names used in the above example:

     o I tell machine ANYBOX that my PPP or SLIPed Linux box is its gateway.
     o When a packet comes into the Linux box from ANYBOX, it will assign it
       a new TCP/IP source port number and slap its own IP address in the packet
       header, saving the originals.  The MASQ server will then send the modified
       packet out over the SLIP/PPP interface to the Internet.
     o When a packet returns from the Internet to the Linux box, Linux examines
       if the port number is one of those ports that was assigned above.  If so, the
       MASQ server will get the original port and IP address, put them back in the
       returned packet header, and send the packet to ANYBOX.
     o The host that sent the packet will never know the difference.



  Another IP Masquerading Example:


  A typical example is given in the diagram below:



      +----------+
      |          |  Ethernet
      | A-box    |::::::
      |          |.2   : 192.168.0.x
      +----------+     :
                       :      +----------+   PPP
      +----------+     :   .1 |  Linux   |   link
      |          |     :::::::| Masq-Gate|:::::::::::::::::::// Internet
      | B-box    |::::::      |          |  111.222.333.444
      |          |.3   :      +----------+
      +----------+     :
                       :
      +----------+     :
      |          |     :
      | C-box    |::::::
      |          |.4
      +----------+

      |                       |          |
      | <-Internal Network--> |          | <- External Network ---->
      |                       |          |



  In this example, there are (4) computer systems that we are concerned
  about.   There is also presumably something on the far right that your
  PPP connection to the Internet comes through (terminal server, etc.)
  and that there is some remote host (very far off to the right of the
  page) out on the Internet that you are interested communicating with).
  The Linux system Masq-Gate is the IP Masquerading gateway for ALL the
  internal network of machines A-box, B-box and C-box to get to the
  Internet.  The internal network uses one of the several RFC-1918
  assigned private network addresses where in this case, the Class-C
  network 192.168.0.0.  The Linux box having the TCP/IP address
  192.168.0.1 while the other systems having the addresses:


    A-Box: 192.168.0.2

    B-Box: 192.168.0.3

    C-Box: 192.168.0.4


  The three machines, A-box, B-box and C-box, can be running any
  operating system as long as they can speak TCP/IP.  OSes  such as
  Windows 95, Macintosh MacTCP or OpenTransport  or even another Linux
  box can connect to other machines on the Internet.  When running, the
  masquerading system or MASQ-gate converts all of these internal
  connections so that they appear to originate from masq-gate itself.
  MASQ then arranges so that data coming back in to a masqueraded
  connection is relayed back to the proper originating system.   Because
  of this, the systems on the internal network see a direct route to the
  internet and are unaware that their data is being masqueraded.  This
  is called a "Transparent" connection.

  NOTE:  Please see the ``'' for more details on topics such as:


    The differences between NAT, MASQ, and Proxy servers.

    How packet firewalls work



  2.6.  Requirements for IP Masquerade on Linux 2.0.x



       ** Please refer to IP Masquerade Resource
       <http://ipmasq.cjb.net/> for the latest information. **



    Any decent computer hardware.  See the ``'' section for more
     details.


    Kernel 2.0.x source available from http://www.kernel.org/
     (Most modern Linux ``'' such as Redhat 5.2 have modular kernels
     with all the IP Masquerade kernel options compiled in.  In such
     cases, there is no need to compile a new Linux kernel.  If you are
     UPGRADING your kernel, you should be aware of what other programs
     might be required and/or upgraded (mentioned later in the HOWTO.)


    Loadable kernel modules, preferably 2.1.85 or newer available from
     http://www.pi.se/blox/modutils/index.html or
     ftp://ftp.ocs.com.au/pub/modutils/
     (modules-1.3.57 is the minimal requirement)


    A running TCP/IP network or LAN covered in Linux NET-3 HOWTO
     <http://metalab.unc.edu/mdw/HOWTO/NET-3-HOWTO.html> and the Network
     Administrator's Guide <http://metalab.unc.edu/mdw/LDP/nag/nag.html>
     Also check out the TrinityOS
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>
     deocument.  TrinityOS is a very comprehensive guide on Linux
     networking including topics like IP MASQ, security, DNS, DHCP,
     Sendmail, PPP, Diald, NFS, IPSEC-based VPNs, and performance
     sections just to name a few.  Over Fifty sections in all!


    Connectivity to the Internet for your Linux host covered in Linux
     ISP Hookup HOWTO <http://metalab.unc.edu/mdw/HOWTO/ISP-Hookup-
     HOWTO.html>, Linux PPP HOWTO <http://metalab.unc.edu/mdw/HOWTO/PPP-
     HOWTO.html>, TrinityOS
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>, Linux
     DHCP mini-HOWTO <http://metalab.unc.edu/mdw/HOWTO/mini/DHCP.html>
     and Linux Cable Modem mini-HOWTO
     <http://metalab.unc.edu/mdw/HOWTO/mini/Cable-Modem.html>


    Ipfwadm 2.3 or newer available from
     ftp://ftp.xos.nl/pub/linux/ipfwadm/ipfwadm-2.3.tar.gz
     More information on version requirement is on the Linux IPFWADM
     page <http://www.xos.nl/linux/ipfwadm/>


    If you are interested in running IPCHAINS on a 2.0.38+ kernel, see
     Willy Tarreau's IPCHAINS enabler for 2.0.36 <http://www-
     miaif.lip6.fr/willy/pub/linux-patches/> or Rusty's IPCHAINS for
     2.0.x kernels


    Know how to configure, compile, and install a new Linux kernel as
     described in the Linux Kernel HOWTO
     <http://metalab.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>



    You can also apply various optional IP Masquerade patches to enable
     other functionality such as:



    TCP/IP port-forwarders or re-directors:  With these tools, you can
     get some non-MASQ friendly programs to work behind a MASQ server.
     In addition to this, you can configure a MASQ server to let
     Internet users contact internal WWW, TELNET, SMTP, FTP (with a
     patch), etc., servers.  See ``'' section of the HOWTO for more
     information.  Here is a list of IP Masquerading patches for 2.0.x
     kernels:


    Steven Clarke's IP PortForwarding (IPPORTFW) - RECOMMENDED

    IP AutoForward and a mirror
     <ftp://ftp.netis.com/pub/members/rlynch/ipautofw.tar.gz> (IPAUTOFW)
     - NOT Recommended

    REDIR <http://ipmasq.cjb.net/redir_0.7.orig.tar.gz> for TCP (REDIR)
     - NOT Recommended

    UDP redirector (UDPRED) - NOT Recommended

     PORTFWed FTP:


    If you are going to port forward FTP traffic to an internal FTP
     server, you need to download Fred Viles's FTP server patch via HTTP
     or Fred Viles's FTP server patch via FTP.  Explicit details on this
     topic can be found in the ``'' section of the HOWTO.

     X-Windows display forwarders:

    X-windows forwarding (DXCP)
     <ftp://sunsite.unc.edu/pub/Linux/X11/compress/dxpc-3.7.0.tar.gz>

     ICQ MASQ module

    Andrew Deryabin's ICQ MASQ module

     PPTP (GRE) and SWAN (IPSEC) VPNs tunneling forwarders:

    John Hardin's VPN Masquerade forwarders or the old patch for just
     PPTP Support <http://ipmasq.cjb.net/ip_masq_pptp.patch.gz>.

     Game specific patches:

    Glenn Lamb's LooseUDP for 2.0.36+
     <ftp://ftp.netcom.com/pub/mu/mumford/loose-udp-2.0.36.patch.gz>
     patch.

     Please note that some WWW browsers with automatically uncompress
     this .gz file.  To download this file, hold down the SHIFT key as
     you click on the above URL.

     Also check out Dan Kegel's NAT Page
     <http://www.alumni.caltech.edu/~dank/peer-nat.html> for more
     information.  Additional information can be found in the ``''
     section and the ``'' section.

     Please see the IP Masquerade Resource <http://ipmasq.cjb.net/> page
     for more information available on these patches and possibly others
     as well.

  2.7.  Requirements for IP Masquerade on Linux 2.2.x



       ** Please refer to IP Masquerade Resource
       <http://ipmasq.cjb.net/> for the latest information. **



    Kernel 2.2.x source available from http://www.kernel.org/
     NOTE #1: Linux 2.2.x kernels less than 2.2.11 have a IPCHAINS
     fragmentation bug.  Because of this, people running strong IPCHAINS
     rulesets are open to attack.  Please upgrade your kernel to a fixed
     version.

     NOTE #2: Most newer ``'' such as Redhat 5.2 might not be Linux
     2.2.x ready for your setup.  Tools like DHCP, NetUtils, etc. will
     need to be upgraded.  More details can be found in the HOWTO.


    Loadable kernel modules, preferably 2.1.121 or newer available from
     http://www.pi.se/blox/modutils/index.html or
     ftp://ftp.ocs.com.au/pub/modutils/


    A running TCP/IP network or LAN covered in Linux NET-3 HOWTO
     <http://metalab.unc.edu/mdw/HOWTO/NET-3-HOWTO.html> and the Network
     Administrator's Guide <http://metalab.unc.edu/mdw/LDP/nag/nag.html>


    Connectivity to Internet for your Linux host covered in Linux ISP
     Hookup HOWTO <http://metalab.unc.edu/mdw/HOWTO/ISP-Hookup-
     HOWTO.html>, Linux PPP HOWTO <http://metalab.unc.edu/mdw/HOWTO/PPP-
     HOWTO.html>, TrinityOS
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>, Linux
     DHCP mini-HOWTO <http://metalab.unc.edu/mdw/HOWTO/mini/DHCP.html>
     and Linux Cable Modem mini-HOWTO
     <http://metalab.unc.edu/mdw/HOWTO/mini/Cable-Modem.html>


    IP Chains 1.3.9 or newer available from
     http://www.rustcorp.com/linux/ipchains/
     Additional information on version requirements is at the Linux IP
     Firewalling Chains page <http://www.rustcorp.com/linux/ipchains/>


    Know how to configure, compile, and install a new Linux kernel as
     described in the Linux Kernel HOWTO
     <http://metalab.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>


    You can download and use various optional IP Masquerade tools to
     enable other functionality such as:


    TCP/IP port-forwarders or re-directors:

    IP PortForwarding (IPMASQADM) - RECOMMENDED
     <http://juanjox.kernelnotes.org/> or his old mirror.


     ICQ MASQ module

    Andrew Deryabin's ICQ MASQ module

  Please see the IP Masquerade Resource <http://ipmasq.cjb.net/> page
  for more information available on these patches and possibly others as
  well.



  2.8.  Requirements for IP Masquerade on Linux 2.3.x and 2.4.x



       ** Please refer to IP Masquerade Resource
       <http://ipmasq.cjb.net/> for the latest information. **



    The newest 2.3.x and 2.4.x kernels are now using a completely new
     system called NetFilter (much like the 2.2.x kernels went to
     IPCHAINS).  Many architectual changes have gone into this new code
     that will give the user a lot more flexibility, future features,
     etc.

     As of this version of the HOWTO, Netfilter is NOT covered.  Once
     the feature set of NetFilter is set, it will be decided if it will
     be added to -this- HOWTO or a new HOWTO.  Until then, please see
     the following links for the available NetFilter documentation.

     http://netfilter.kernelnotes.org/iptables-HOWTO.html and more
     specifically http://netfilter.kernelnotes.org/ipnatctl-HOWTO.html


  3.  Setting Up IP Masquerade


       If your private network contains any vital information,
       think carefully in terms of SECURITY before implementing IP
       Masquerade.  By default, IP MASQ becomes a GATEWAY for you
       to get to the Internet but it also can allow someone on the
       Internet to possibly get into your internal network.

       Once you have IP MASQ functioning, it is HIGHLY recommended
       for the user to implement a STRONG IPFWADM/IPCHAINS firewall
       ruleset.  Please see the ``'' and ``'' sections below for
       more details.



  3.1.  Compiling the Kernel for IP Masquerade Support



       If your Linux distribution already has all the required fea
       ture support compiled such as:

         IPFWADM/IPCHAINS

         IP forwarding

         IP masquerading

         IP Firewalling

         etc.

     and all MASQ-related modules compiled (most modular
     kernels will have all you need), then you will NOT need
     to re-compile the kernel.  If you aren't sure if you
     Linux distribution is MASQ ready, see the ``'' section or
     the IP Masquerade Resource <http://ipmasq.cjb.net/> for
     more details.  If you can't find out if your distribution
     does support IP Masquerading by default, ASSUME IT
     DOESN'T.

  Regardless of native support or not, reading this section is
  still highly recommended as it contains other useful
  information.



  3.1.1.  Linux 2.2.x Kernels


  Please see the ``'' section for any required software, patches, etc.


    First of all, you need the kernel source for 2.2.x (preferably the
     latest kernel version 2.2.11 or above)

     NOTE #1: Linux 2.2.x kernels less than 2.2.11 have a IPCHAINS
     fragmentation bug.   Because of this, people running strong
     IPCHAINS rulesets are open to attack.  Please upgrade your kernel
     to a fixed version.

     NOTE #2: As the 2.2.x train as progressed, they keep changing the
     compile-time options.  As of this version, this section reflects
     the settings for 2.2.15.  If you are running a previous kernel
     version, the dialogs will look different.  It is recommended that
     you update to the newest kernel for all the new features and
     stability they bring.


    If this is your first time compiling the kernel, don't be scared.
     In fact, it's rather easy and it's covered in several URLs found in
     the ``'' section.


    Unpack the kernel source to /usr/src/ with a command: tar xvzf
     linux-2.2.x.tar.gz -C /usr/src, where the "x" in 2.2.x is the
     current Linux 2.2 kernel.  Once finished, make sure there is a
     directory or symbolic link to /usr/src/linux/


    Apply any appropriate or optional patches to the kernel source
     code.  As of 2.2.1, IP Masq does not require any specific patching
     to get everything working.  Features like PPTP and Xwindows
     forwarders are optional.  Please refer to the ``'' section for URLs
     and the IP Masquerade Resources for up-to-date information and
     patch URLs.


    Here are the MINIMUM options that are needed to be compiled into
     the kernel.  You will also need to configure the kernel to use your
     installed network interfaces as well.  Refer to the Linux Kernel
     HOWTO <http://metalab.unc.edu/mdw/HOWTO/Kernel-HOWTO.html> and the
     README file in the kernel source directory for further instructions
     on compiling a kernel.


     Please note the YES or NO ANSWERS to the following.  Not all
     options will be available without the proper kernel patches
     described later in this HOWTO:



    * Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL) [Y/n/?]
      - YES: though not required for IP MASQ, this option allows the kernel to create the MASQ modules and enable the option for port forwarding

    -- Non-MASQ options skipped --

    * Enable loadable module support (CONFIG_MODULES) [Y/n/?]
      - YES: allows you to load kernel IP MASQ modules

    -- Non-MASQ options skipped --

    * Networking support (CONFIG_NET) [Y/n/?]
      - YES: Enables the network subsystem

    -- Non-MASQ options skipped --

    * Sysctl support (CONFIG_SYSCTL) [Y/n/?]
      - YES:  Enables the ability to enable disable options such as forwarding,
        dynamic IPs, LooseUDP, etc.

    -- Non-MASQ options skipped --

    * Packet socket (CONFIG_PACKET) [Y/m/n/?]
      - YES: Though this is OPTIONAL, this recommended feature will allow you to use TCPDUMP to debug any problems with IP MASQ

    * Kernel/User netlink socket (CONFIG_NETLINK) [Y/n/?]
      - YES: Though this is OPTIONAL, this feature will allow the logging of advanced firewall issues such as routing messages, etc

    * Routing messages (CONFIG_RTNETLINK) [Y/n/?]
      - NO:  This option does not have anything to do with packet firewall logging

    -- Non-MASQ options skipped --

    * Network firewalls (CONFIG_FIREWALL) [Y/n/?]
      - YES: Enables the kernel to be comfigured by the IPCHAINS firewall tool

    * Socket Filtering (CONFIG_FILTER) [Y/n/?]
      - OPTIONAL:  Though this doesn't have anything do with IPMASQ, if you plan
        on implimenting a DHCP server on the internal network, you WILL need this
        option.

    * Unix domain sockets (CONFIG_UNIX) [Y/m/n/?]
      - YES:  This enables the UNIX TCP/IP sockets mechanisms

    * TCP/IP networking (CONFIG_INET) [Y/n/?]
      - YES: Enables the TCP/IP protocol

    -- Non-MASQ options skipped --

    * IP: advanced router (CONFIG_IP_ADVANCED_ROUTER) [Y/n/?]
      - YES:  This will allow you to configure advanced MASQ options farther down

    * IP: policy routing (CONFIG_IP_MULTIPLE_TABLES) [N/y/?]
      - NO: Not needed by MASQ though users who need advanced features such as
        TCP/IP source address-based or TOS-enabled routing will need to
        enable this option.

    * IP: equal cost multipath (CONFIG_IP_ROUTE_MULTIPATH) [N/y/?]
      - NO: Not needed for normal MASQ functionality

    * IP: use TOS value as routing key (CONFIG_IP_ROUTE_TOS) [N/y/?]
      - NO:  Not needed for normal MASQ functionality

    * IP: verbose route monitoring (CONFIG_IP_ROUTE_VERBOSE) [Y/n/?]
      - YES: This is useful if you use the routing code to drop IP spoofed packets (highly recommended) and you want to log them.

    * IP: large routing tables (CONFIG_IP_ROUTE_LARGE_TABLES) [N/y/?]
      - NO:  Not needed for normal MASQ functionality

    * IP: kernel level autoconfiguration (CONFIG_IP_PNP) [N/y/?] ?
      - NO:  Not needed for normal MASQ functionality

    * IP: firewalling (CONFIG_IP_FIREWALL) [Y/n/?]
      - YES: Enable the firewalling feature

    * IP: firewall packet netlink device (CONFIG_IP_FIREWALL_NETLINK) [Y/n/?]
      - OPTIONAL: Though this is OPTIONAL, this feature will allow IPCHAINS to copy some packets to UserSpace tools for additional checks

    * IP: transparent proxy support (CONFIG_IP_TRANSPARENT_PROXY) [N/y/?]
      - NO:  Not needed for normal MASQ functionality

    * IP: masquerading (CONFIG_IP_MASQUERADE) [Y/n/?]
      - YES: Enable IP Masquerade to re-address specific internal to external TCP/IP packets

    * IP: ICMP masquerading (CONFIG_IP_MASQUERADE_ICMP) [Y/n/?]
      - YES: Enable support for masquerading ICMP ping packets (ICMP error codes will be MASQed regardless).  This is an important feature for troubleshooting connections.

    * IP: masquerading special modules support (CONFIG_IP_MASQUERADE_MOD) [Y/n/?]
      - YES: Though OPTIONAL, this enables the OPTION to later enable the TCP/IP Port forwarding system to allow external computers to directly connect to specified internal MASQed machines.

    * IP: ipautofw masq support (EXPERIMENTAL) (CONFIG_IP_MASQUERADE_IPAUTOFW) [N/y/m/?]
      - NO:  IPautofw is a legacy method of port forwarding.  It is mainly old code and has been found to have some issues.  NOT recommended.

    * IP: ipportfw masq support (EXPERIMENTAL) (CONFIG_IP_MASQUERADE_IPPORTFW) [Y/m/n/?]
      - YES: Enables IPPORTFW which allows external computers on the Internet to directly communicate to specified internal MASQed machines.  This feature is typically used to access internal SMTP, TELNET, and WWW servers.  FTP port forwarding will need an additional patch as described in the FAQ section of the MASQ HOWTO.  Additional information on port forwarding is available in the Forwards section of this HOWTO.

    * IP: ip fwmark masq-forwarding support (EXPERIMENTAL) (CONFIG_IP_MASQUERADE_MFW) [Y/m/n/?]
      - OPTIONAL:  This is a new method of doing PORTFW.  With this option, IPCHAINS can mark packets that should have additional work on.  Using a UserSpace tool, much like IPMASQADM or IPPORFW, IPCHAINS would then automaticaly re-address the packets. Currently, this code is less tested than PORTFW but it looks promising.  For now, the recommended method is to use IPMASQADM and IPPORTFW.  If you have thoughts on MFW, please email me.

    * IP: optimize as router not host (CONFIG_IP_ROUTER) [Y/n/?]
      - YES:  This optimizes the kernel for the network subsystem though it isn't known if it makes a siginificant performance difference.

    * IP: tunneling (CONFIG_NET_IPIP) [N/y/m/?]
      - NO: This OPTIONAL section is for IPIP tunnels through IP Masq.  If you
        need tunneling/VPN functionality, it is recommended to use either GRE or
        IPSEC tunnels.

    * IP: GRE tunnels over IP (CONFIG_NET_IPGRE) [N/y/m/?]
      - NO:   This OPTIONAL selection is to enable PPTP and GRE tunnels through the IP MASQ box

      -- Non-MASQ options skipped --

    * IP: TCP syncookie support (not enabled per default) (CONFIG_SYN_COOKIES) [Y/n/?]
      - YES: HIGHLY recommended for basic TCP/IP network security

      -- Non-MASQ options skipped --

    * IP: Allow large windows (not recommended if <16Mb of memory) * (CONFIG_SKB_LARGE) [Y/n/?]
      - YES:  This is recommended to optimize Linux's TCP window

      -- Non-MASQ options skipped --

    * Network device support (CONFIG_NETDEVICES) [Y/n/?]
      - YES: Enables the Linux Network device sublayer

      -- Non-MASQ options skipped --

    * Dummy net driver support (CONFIG_DUMMY) [M/n/y/?]
      - YES:  Though OPTIONAL, this option can help when debugging problems

    == Don't forget to compile in support for your network card !! ==

      -- Non-MASQ options skipped --
    == Don't forget to compile in support for PPP/SLIP if you use a modem or
       use a PPPoE DSL modem ==

      -- Non-MASQ options skipped --

    * /proc filesystem support (CONFIG_PROC_FS) [Y/n/?]
      - YES:  Required to enable the Linux network forwarding system



  NOTE: These are just the components you need for IP Masquerade.  You
  will need to select whatever other options needed for your specific
  setup.


    After compiling the kernel, you should compile and install the IP
     MASQ modules by doing:


         make modules; make modules_install



    Then you should add a few lines into your /etc/rc.d/rc.local file
     to load the IP Masquerade modules and enable IP MASQ automatically
     after each reboot:



               .
               .
               .
               #rc.firewall script - Start IPMASQ and the firewall
               /etc/rc.d/rc.firewall
               .
               .
               .



  3.1.2.  Linux 2.0.x Kernels


  Please see the ``'' section for any required software, patches, etc.


    First of all, you need the kernel source (preferably the latest
     kernel version 2.0.38 or above)


    If this is your first time compiling the kernel, don't be scared.
     In fact, it's rather easy and it's covered in several URLs found in
     the ``'' section.



    Unpack the kernel source to /usr/src/ with a command: tar xvzf
     linux-2.0.x.tar.gz -C /usr/src, where the "x" in 2.0.x is the
     current Linux 2.0 kernel.  Once finished, make sure there is a
     directory or symbolic link to /usr/src/linux/


    Apply any appropriate or optional patches to the kernel source
     code.  As of 2.0.36, IP Masq does not require any specific patching
     to get everything working.  Features like IPPORTFW, PPTP, and
     Xwindows forwarders are optional.  Please refer to the ``'' section
     for URLs and the IP Masquerade Resources <http://ipmasq.cjb.net/>
     for up-to-date information and additional patch URLs.


    Here are the MINIMUM options that are needed to be compiled into
     the kernel.  You will also need to confi gure the kernel to use
     your installed network interfaces as well. Refer to the Linux
     Kernel HOWTO <http://metalab.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>
     and the README file in the kernel source directory for further
     instructions on compiling a kernel


     Please note the YES or NO ANSWERS to the following options.  Not
     all options will be available without the proper kernel patches
     described later in this HOWTO:



    * Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL) [Y/n/?]
      - YES: this will allow you to later select the IP Masquerade feature code

    * Enable loadable module support (CONFIG_MODULES) [Y/n/?]
      - YES: allows you to load kernel IP MASQ modules

    * Networking support (CONFIG_NET) [Y/n/?]
      - YES: Enables the network subsystem

    * Network firewalls (CONFIG_FIREWALL) [Y/n/?]
      - YES: Enables the IPFWADM firewall tool

    * TCP/IP networking (CONFIG_INET)
      - YES: Enables the TCP/IP protocol

    * IP: forwarding/gatewaying (CONFIG_IP_FORWARD)
      - YES: Enables Linux network packet forwarding and routing - Controlled by IPFWADM

    * IP: syn cookies (CONFIG_SYN_COOKIES) [Y/n/?]
      - YES: HIGHLY recommended for basic network security

    * IP: firewalling (CONFIG_IP_FIREWALL) [Y/n/?]
      - YES: Enable the firewalling feature

    * IP: firewall packet logging (CONFIG_IP_FIREWALL_VERBOSE) [Y/n/?]
      - YES: (OPTIONAL but HIGHLY recommended):  Allows for the reporting of firewall hits

    * IP: masquerading (CONFIG_IP_MASQUERADE [Y/n/?]
      - YES: Enable IP MASQ to re-address specific internal to external TCP/IP packets

    * IP: ipautofw masquerade support (EXPERIMENTAL) (CONFIG_IP_MASQUERADE_IPAUTOFW) [Y/n/?]
      - NO:  IPautofw is a legacy method of TCP/IP port forwarding.  Though it works, IPPORTFW
             is a better way so IPAUTOFW is not recommended.

    * IP: ipportfw masq support (EXPERIMENTAL) (CONFIG_IP_MASQUERADE_IPPORTFW) [Y/n/?]
      - YES: This option is ONLY AVAILABLE VIA A PATCH for the 2.0.x kernels.

             With this option, external computers on the Internet can directly communicate to specified internal MASQed machines.  This feature is typically used to access internal SMTP, TELNET, and WWW servers.  FTP port forwarding will need an additional patch as described in the FAQ section.  Additional information on port forwarding is available in the Forwards section of this HOWTO.

    * IP: ICMP masquerading (CONFIG_IP_MASQUERADE_ICMP) [Y/n/?]
      - YES: Enable support for masquerading ICMP packets. Though thought of as optional, many programs will NOT function properly with out ICMP support.

    * IP: loose UDP port managing (EXPERIMENTAL) (CONFIG_IP_MASQ_LOOSE_UDP) [Y/n/?]
      - YES: This option is ONLY AVAILABLE VIA A PATCH for the 2.0.x kernels.

             With this option, internally masqueraded computers can play NAT-friendly games over the Internet.  Explicit details are given in the FAQ section of this HOWTO.

    * IP: always defragment (CONFIG_IP_ALWAYS_DEFRAG) [Y/n/?]
      - YES:  This feature optimizes IP MASQ connections - HIGHLY recommended

    * IP: optimize as router not host (CONFIG_IP_ROUTER) [Y/n/?]
      - YES:  This optimizes the kernel for the network subsystem

    * IP: Drop source routed frames (CONFIG_IP_NOSR) [Y/n/?]
      - YES: HIGHLY recommended for basic network security

    * Dummy net driver support (CONFIG_DUMMY) [M/n/y/?]
      - YES:  Though OPTIONAL, this option can help when debugging problems

    * /proc filesystem support (CONFIG_PROC_FS) [Y/n/?]
      - YES:  Required to enable the Linux network forwarding system



  NOTE: These are just the components you need for IP Masquerade
  functionality. You will need to also select whatever other options you
  need for your specific network and hardware setup.


    After compiling the kernel, you need to also compile and install
     the IP MASQ kernel modules by doing:


       make modules; make modules_install



    Next, add a few lines into your /etc/rc.d/rc.local file to load the
     IP Masquerade script and thus enable IP MASQ automatically after
     each reboot:



               .
               .
               .
               #rc.firewall script - Start IPMASQ and the firewall
               /etc/rc.d/rc.firewall
               .
               .
               .



  3.1.3.  Linux 2.3.x / 2.4.x Kernels


  The 2.3.x and 2.4.x kernels are NOT covered in this HOWTO yet.  Please
  see the ``'' section for URLs, etc until it is covered by this or a
  NEW howto.



  3.2.  Assigning Private Network IP Addresses to the Internal LAN


  Since all INTERNAL MASQed machines should NOT have official Internet
  assigned addressees, there must be specific and accepted way to
  allocate address to those machines without conflicting with anyone
  else's Internet addresses.

  From the original IP Masquerade FAQ:

  RFC 1918 is the official document on which IP addresses are to be used
  on a non-connected or "private" network.  There are 3 blocks of
  numbers set aside specifically for this purpose



  Section 3: Private Address Space

  The Internet Assigned Numbers Authority (IANA) has reserved the
  following three blocks of the IP address space for private networks:

                10.0.0.0        -   10.255.255.255
                172.16.0.0      -   172.31.255.255
                192.168.0.0     -   192.168.255.255

  We will refer to the first block as "24-bit block", the second as
  "20-bit block", and to the third as "16-bit" block".  Note that the
  first block is nothing but a single class A network number, while the
  second block is a set of 16 contiguous class B network numbers, and
  third block is a set of 255 contiguous class C network numbers.



  For the record, my preference is to use the 192.168.0.0 network with a
  255.255.255.0 Class-C subnet mask and this HOWTO reflects this.  But,
  any of the above private networks are valid but just be SURE to use
  the correct subnet-mask.

  So, if you're using a Class-C network, you should number your TCP/IP
  enabled machines as 192.168.0.1, 192.168.0.2, 192.168.0.3, ...,
  192.168.0.x

  192.168.0.1 is usually the internal gateway or Linux MASQ machine to
  get out to the external network.  Please note that 192.168.0.0 and
  192.168.0.255 are the Network and Broadcast address respectively
  (these addresses are RESERVED). Avoid using these addresses on your
  machines or your network will not work properly.



  3.3.  Configuring IP Forwarding Policies

  At this point, you should have your kernel and other required packages
  installed.  All network IP addresses, gateway, and DNS addresses
  should be configured on your Linux MASQ server as well.  If you don't
  know how to configure your Linux network cards, please consult the
  HOWTOs listed in either the ``'' or ``'' sections.

  Now, the only thing left to do is to configure the IP firewalling
  tools to both FORWARD and MASQUERADE the appropriate packets to the
  appropriate machine:



       ** This can be accomplished in many different ways.  The
       following suggestions and examples worked for me, but you
       may have different ideas or needs.



       ** This section ONLY provides you with the bare minimum
       firewall ruleset to get the IP Masquerade feature working.
       Once IP MASQ has been successfully tested (as described
       later in this HOWTO), please refer to the ``'' and ``'' sec
       tions for more secure firewall rulesets.  In addition, check
       out the IPFWADM (2.0.x) and/or IPCHAINS(2.2.x) man pages for
       more details.


  3.3.1.  Linux 2.0.x Kernels


  Create the file /etc/rc.d/rc.firewall with the following initial
  SIMPLE ruleset:



  # rc.firewall - Initial SIMPLE IP Masquerade setup for 2.0.x kernels using IPFWADM
  #
  # Load all required IP MASQ modules
  #
  #   NOTE:  Only load the IP MASQ modules you need.  All current available IP MASQ modules
  #          are shown below but are commented out from loading.

  # Needed to initially load modules
  #
  /sbin/depmod -a

  # Supports the proper masquerading of FTP file transfers using the PORT method
  #
  /sbin/modprobe ip_masq_ftp

  # Supports the masquerading of RealAudio over UDP.  Without this module,
  #       RealAudio WILL function but in TCP mode.  This can cause a reduction
  #       in sound quality
  #
  #/sbin/modprobe ip_masq_raudio

  # Supports the masquerading of IRC DCC file transfers
  #
  #/sbin/modprobe ip_masq_irc

  # Supports the masquerading of Quake and QuakeWorld by default.  This modules is
  #   for for multiple users behind the Linux MASQ server.  If you are going to play
  #   Quake I, II, and III, use the second example.
  #
  #   NOTE:  If you get ERRORs loading the QUAKE module, you are running an old
  #   -----  kernel that has bugs in it.  Please upgrade to the newest kernel.
  #
  #Quake I / QuakeWorld (ports 26000 and 27000)
  #/sbin/modprobe ip_masq_quake
  #
  #Quake I/II/III / QuakeWorld (ports 26000, 27000, 27910, 27960)
  #/sbin/modprobe ip_masq_quake 26000,27000,27910,27960

  # Supports the masquerading of the CuSeeme video conferencing software
  #
  #/sbin/modprobe ip_masq_cuseeme

  #Supports the masquerading of the VDO-live video conferencing software
  #
  #/sbin/modprobe ip_masq_vdolive


  #CRITICAL:  Enable IP forwarding since it is disabled by default
  #
  #           Redhat Users:  you may try changing the options in /etc/sysconfig/network from:
  #
  #                       FORWARD_IPV4=false
  #                             to
  #                       FORWARD_IPV4=true
  #
  echo "1" > /proc/sys/net/ipv4/ip_forward

  #CRITICAL:  Enable automatic IP defragmenting since it is disabled by default
  #
  #           This used to be a compile-time option but the behavior was changed in 2.2.12
  #
  echo "1" > /proc/sys/net/ipv4/ip_ip_always_defrag

  # Dynamic IP users:
  #
  #   If you get your Internet IP address dynamically from SLIP, PPP, or DHCP, enable this following
  #       option.  This enables dynamic-ip address hacking in IP MASQ, making the life
  #       with DialD, PPPd, and similar programs much easier.
  #
  #echo "1" > /proc/sys/net/ipv4/ip_dynaddr


  # MASQ timeouts
  #
  #   2 hrs timeout for TCP session timeouts
  #  10 sec timeout for traffic after the TCP/IP "FIN" packet is received
  #  160 sec timeout for UDP traffic (Important for MASQ'ed ICQ users)
  #
  /sbin/ipfwadm -M -s 7200 10 160


  # DHCP:  For people who receive their external IP address from either DHCP or BOOTP
  #        such as ADSL or Cablemodem users, it is necessary to use the following
  #        before the deny command.  The "bootp_client_net_if_name" should be replaced
  #        the name of the link that the DHCP/BOOTP server will put an address on to.
  #        This will be something like "eth0", "eth1", etc.
  #
  #        This example is currently commented out.
  #
  #
  #/sbin/ipfwadm -I -a accept -S 0/0 67 -D 0/0 68 -W bootp_clients_net_if_name -P udp


  # Enable simple IP forwarding and Masquerading
  #
  #  NOTE:  The following is an example for an internal LAN address in the 192.168.0.x
  #         network with a 255.255.255.0 or a "24" bit subnet mask.
  #
  #         Please change this network number and subnet mask to match your internal LAN setup
  #
  /sbin/ipfwadm -F -p deny
  /sbin/ipfwadm -F -a m -S 192.168.0.0/24 -D 0.0.0.0/0



  Once you are finished with editing the /etc/rc.d/rc.firewall ruleset,
  make it executable by typing in "chmod 700 /etc/rc.d/rc.firewall"

  Now that the firewall ruleset is ready to go, you need to let it run
  after every reboot.  You could either do this by running it by hand
  everytime (a pain) or add it to the boot scripts.  We have covered two
  methods below:


    Redhat and Redhat-derived distros:


    There are two ways to load things in Redhat:  /etc/rc.d/rc.local or
     a init script in /etc/rc.d/init.d/.  The first method is the
     easiest.  All you have to do is add the line:


    echo "Loading the rc.firewall ruleset.."

     /etc/rc.d/rc.firewall

     to the end of the /etc/rc.d/rc.local file and thats it.  The
     problem with this approach is that if you are running a STRONG
     firewall ruleset, the firewall isn't executed until the last stages
     of booting.  The preferred approach is to have the firewall loaded
     just after the networking subsystem is loaded.  For now, the HOWTO
     only covers how to do the /etc/rc.d/rc.local way.  If you want the
     stronger system, I recommend you check out Section 10 of TrinityOS
     found in the links section at the bottom of this HOWTO.


    Slackware:


    There are two ways to load things in Slackware: /etc/rc.d/rc.local
     or editing the /etc/rc.d/rc.inet2 file.  The first method is the
     easiest.  All you have to do is add the line:


    echo "Loading the rc.firewall ruleset.."

     /etc/rc.d/rc.firewall

     to the end of the /etc/rc.d/rc.local file and thats it. The problem
     with this approach is that if you are running a STRONG firewall
     ruleset, the firewall isn' t executed until the last stages of
     booting.  The preferred approach is to have the firewall loaded
     just after the networking subsystem is loaded.  For now, the HOWTO
     only covers how to do the /etc/rc.d/rc.local way.  If you want the
     strong er system, I recommend you check out Section 10 of TrinityOS
     found in the links section at the bottom of this HOWTO.


  Notes on how users might want to change the above firewall ruleset:


  You could have also enabled IP Masquerading on a PER MACHINE basis
  instead of the above method enabling an ENTIRE TCP/IP network.  For
  example, say if I wanted only the 192.168.0.2 and 192.168.0.8 hosts to
  have access to the Internet and NOT any of the other internal
  machines.  I would change the in the "Enable simple IP forwarding and
  Masquerading" section (shown above) of the /etc/rc.d/rc.firewall
  ruleset.



       # Enable simple IP forwarding and Masquerading
       #
       #  NOTE:  The following is an example to only allow IP Masquerading for the 192.168.0.2
       #         and 192.168.0.8 machines with a 255.255.255.0 or a "24" bit subnet mask.
       #
       #         Please use the following in ADDITION to the simple ruleset above for specific
       #         MASQ networks.  Also change the network numbers and subnet masks to match your
       #         internal LAN setup
       #
       /sbin/ipfwadm -F -p deny
       /sbin/ipfwadm -F -a m -S 192.168.0.2/32 -D 0.0.0.0/0
       /sbin/ipfwadm -F -a m -S 192.168.0.8/32 -D 0.0.0.0/0



  Common mistakes:

  What appears to be a common mistake with new IP Masq users is to make
  the first command:

  ipfwadm -F -p masquerade



  Do NOT make your default policy be MASQUERADING.  Otherwise someone
  who can manipulate their routing tables will be able to tunnel
  straight back through your gateway, using it to masquerade their OWN
  identity!



  Again, you can add these lines to the /etc/rc.d/rc.firewall file, one
  of the other rc files you prefer, or do it manually every time you
  need IP Masquerade.

  Please see the ``'' and ``'' sections for a detailed guide on IPFWADM
  and a stronger IPFWADM ruleset example.



  3.3.2.  Linux 2.2.x Kernels


  Please note that IPFWADM is no longer the firewall tool  for
  manipulating IP Masquerading rules for both the 2.1.x and 2.2.x
  kernels.  These new kernels now use the IPCHAINS tool.  For a more
  detailed reason for this change, please see the ``'' section.


  Create the file /etc/rc.d/rc.firewall with the following initial
  SIMPLE ruleset:



  #!/bin/sh
  #
  # rc.firewall - Initial SIMPLE IP Masquerade test for 2.1.x and 2.2.x kernels using IPCHAINS
  #
  # Load all required IP MASQ modules
  #
  #   NOTE:  Only load the IP MASQ modules you need.  All current IP MASQ modules
  #          are shown below but are commented out from loading.

  # Needed to initially load modules
  #
  /sbin/depmod -a

  # Supports the proper masquerading of FTP file transfers using the PORT method
  #
  /sbin/modprobe ip_masq_ftp

  # Supports the masquerading of RealAudio over UDP.  Without this module,
  #       RealAudio WILL function but in TCP mode.  This can cause a reduction
  #       in sound quality
  #
  #/sbin/modprobe ip_masq_raudio

  # Supports the masquerading of IRC DCC file transfers
  #
  #/sbin/modprobe ip_masq_irc


  # Supports the masquerading of Quake and QuakeWorld by default.  This modules is
  #   for for multiple users behind the Linux MASQ server.  If you are going to play
  #   Quake I, II, and III, use the second example.
  #
  #   NOTE:  If you get ERRORs loading the QUAKE module, you are running an old
  #   -----  kernel that has bugs in it.  Please upgrade to the newest kernel.
  #
  #Quake I / QuakeWorld (ports 26000 and 27000)
  #/sbin/modprobe ip_masq_quake
  #
  #Quake I/II/III / QuakeWorld (ports 26000, 27000, 27910, 27960)
  #/sbin/modprobe ip_masq_quake 26000,27000,27910,27960


  # Supports the masquerading of the CuSeeme video conferencing software
  #
  #/sbin/modprobe ip_masq_cuseeme

  #Supports the masquerading of the VDO-live video conferencing software
  #
  #/sbin/modprobe ip_masq_vdolive


  #CRITICAL:  Enable IP forwarding since it is disabled by default since
  #
  #           Redhat Users:  you may try changing the options in /etc/sysconfig/network from:
  #
  #                       FORWARD_IPV4=false
  #                             to
  #                       FORWARD_IPV4=true
  #
  echo "1" > /proc/sys/net/ipv4/ip_forward


  #CRITICAL:  Enable automatic IP defragmenting since it is disabled by default in 2.2.x kernels
  #
  #           This used to be a compile-time option but the behavior was changed in 2.2.12
  #
  echo "1" > /proc/sys/net/ipv4/ip_ip_always_defrag


  # Dynamic IP users:
  #
  #   If you get your IP address dynamically from SLIP, PPP, or DHCP, enable this following
  #       option.  This enables dynamic-ip address hacking in IP MASQ, making the life
  #       with Diald and similar programs much easier.
  #
  #echo "1" > /proc/sys/net/ipv4/ip_dynaddr


  # MASQ timeouts
  #
  #   2 hrs timeout for TCP session timeouts
  #  10 sec timeout for traffic after the TCP/IP "FIN" packet is received
  #  160 sec timeout for UDP traffic (Important for MASQ'ed ICQ users)
  #
  /sbin/ipchains -M -S 7200 10 160


  # DHCP:  For people who receive their external IP address from either DHCP or BOOTP
  #        such as ADSL or Cablemodem users, it is necessary to use the following
  #        before the deny command.  The "bootp_client_net_if_name" should be replaced
  #        the name of the link that the DHCP/BOOTP server will put an address on to?
  #        This will be something like "eth0", "eth1", etc.
  #
  #        This example is currently commented out.
  #
  #
  #/sbin/ipchains -A input -j ACCEPT -i bootp_clients_net_if_name -s 0/0 67 -d 0/0 68 -p udp

  # Enable simple IP forwarding and Masquerading
  #
  #  NOTE:  The following is an example for an internal LAN address in the 192.168.0.x
  #         network with a 255.255.255.0 or a "24" bit subnet mask.
  #
  #         Please change this network number and subnet mask to match your internal LAN setup
  #
  /sbin/ipchains -P forward DENY
  /sbin/ipchains -A forward -s 192.168.0.0/24 -j MASQ



  Once you are finished with editing the /etc/rc.d/rc.firewall ruleset,
  make it executable by typing in chmod 700 /etc/rc.d/rc.firewall


  Now that the firewall ruleset is ready to go, you need to let it run
  after every reboot.  You could either do this by running it by hand
  everytime (a pain) or add it to the boot scripts.  We have covered two
  methods below:


    Redhat and Redhat-derived distros:


    There are two ways to load things in Redhat:  /etc/rc.d/rc.local or
     a init script in /etc/rc.d/init.d/.  The first method is the
     easiest.  All you have to do is add the line:


    echo "Loading the rc.firewall ruleset.." /etc/rc.d/rc.firewall

     to the end of the /etc/rc.d/rc.local file and thats it.  The
     problem with this approach is that if you are running a STRONG
     firewall ruleset, the firewall isn't executed until the last stages
     of booting.  The preferred approach is to have the firewall loaded
     just after the networking subsystem is loaded.  For now, the HOWTO
     only covers how to do the /etc/rc.d/rc.local way.  If you want the
     stronger system, I recommend you check out Section 10 of TrinityOS
     found in the links section at the bottom of this HOWTO.


    Slackware:


    There are two ways to load things in Slackware: /etc/rc.d/rc.local
     or editing the /etc/rc.d/rc.inet2 file.  The first method is the
     easiest.  All you have to do is add the line:


    echo "Loading the rc.firewall ruleset.."

     /etc/rc.d/rc.firewall

     to the end of the /etc/rc.d/rc.local file and thats it. The problem
     with this approach is that if you are running a STRONG firewall
     ruleset, the firewall isn' t executed until the last stages of
     booting.  The preferred approach is to have the firewall loaded
     just after the networking subsystem is loaded.  For now, the HOWTO
     only covers how to do the /etc/rc.d/rc.local way.  If you want the
     strong er system, I recommend you check out Section 10 of TrinityOS
     found in the links section at the bottom of this HOWTO.


  Notes on how users might want to change the above firewall ruleset:

  You could have also enabled IP Masquerading on a PER MACHINE basis
  instead of the above method enabling an ENTIRE TCP/IP network. For
  example, say if I wanted only the 192.168.0.2 and 192.168.0.8 hosts to
  have access to the Internet and NOT any of the other internal
  machines. I would change the in the "Enable simple IP forwarding and
  Masquerading" section (shown above) of the /etc/rc.d/rc.firewall
  ruleset.



       #!/bin/sh
       #
       # Enable simple IP forwarding and Masquerading
       #
       #  NOTE:  The following is an example to only allow IP Masquerading for the 192.168.0.2
       #         and 192.168.0.8 machines with a 255.255.255.0 or a "24" bit subnet mask.
       #
       #         Please change this network number and subnet mask to match your internal LAN setup
       #
       /sbin/ipchains -P forward DENY
       /sbin/ipchains -A forward -s 192.168.0.2/32 -j MASQ
       /sbin/ipchains -A forward -s 192.168.0.8/32 -j MASQ



  Common mistakes:

  What appears to be a common mistake with new IP Masq users is to make
  the first command:
  /sbin/ipchains -P forward masquerade

  Do NOT make your default policy be MASQUERADING.  Otherwise someone
  who can manipulate their routing tables will be able to tunnel
  straight back through your gateway, using it to masquerade their OWN
  identity!



  Again, you can add these lines to the /etc/rc.d/rc.firewall file, one
  of the other rc files you prefer, or do it manually every time you
  need IP Masquerade.

  Please see the ``'' and ``'' sections for a detailed guide on IPCHAINS
  and a strong IPCHAINS ruleset example.  For additional details on
  IPCHAINS usage, please refer to the Linux IP CHAINS HOWTO



  4.  Configuring the other internal to-be MASQed machines

  Besides setting the appropriate IP address for each internal MASQed
  machine, you should also set each internal machine with the
  appropriate gateway IP address of the Linux MASQ server and required
  DNS servers. In general, this is rather straight forward. You simply
  enter the address of your Linux host (usually 192.168.0.1) as the
  machine's gateway address.

  For the Domain Name Service, you can add in any DNS servers that are
  available. The most apparent one should be the one that your Linux
  server is using. You can optionally add any "domain search" suffix as
  well.

  After you have properly reconfigured the internal MASQed machines,
  remember to restart their appropriate network services or reboot them.

  The following configuration instructions assume that you are using a
  Class C network with 192.168.0.1 as your Linux MASQ server's address.
  Please note that 192.168.0.0 and 192.168.0.255 are reserved TCP/IP
  address.


  As it stands, the following Platforms have been tested as internal
  MASQed machines.  This is only an EXAMPLE of all of the compatible
  OSes out there:


    Apple Macintosh OS (with MacTCP or Open Transport)

    Commodore Amiga (with AmiTCP or AS225-stack)

    Digital VAX Stations 3520 and 3100 with UCX (TCP/IP stack for VMS)

    Digital Alpha/AXP with Linux/Redhat

    IBM AIX running on a RS/6000

    IBM OS/2 (including Warp v3)

    IBM OS400 running on a AS/400

    Linux 1.2.x, 1.3.x, 2.0.x, 2.1.x, 2.2.x


    Microsoft DOS (with NCSA Telnet package, DOS Trumpet works
     partially)

    Microsoft Windows 3.1 (with the Netmanage Chameleon package)

    Microsoft Windows For Workgroup 3.11 (with TCP/IP package)

    Microsoft Windows 95, OSR2, 98, 98se

    Microsoft Windows NT 3.51, 4.0, 2000 (both workstation and server)

    Novell Netware 4.01 Server with the TCP/IP service

    SCO Openserver (v3.2.4.2 and 5)

    Sun Solaris 2.51, 2.6, 7


  4.1.  Configuring Microsoft Windows 95


  1. If you haven't installed your network card and adapter driver, do
     so now.  Description of this is beyond the scope of this document.


  2. Go to the 'Control Panel' --> 'Network'.


  3. Click on Add --> Protocol --> Manufacture: Microsoft --> Protocol:
     'TCP/IP protocol' if you don't already have it.


  4. Highlight the TCP/IP item bound to your Windows95 network card and
     select 'Properties'.  Now goto the 'IP Address' tab and set IP
     Address to 192.168.0.x, (1 < x < 255), and then set the Subnet Mask
     to 255.255.255.0


  5. Now select the "Gateway" tab and add 192.168.0.1 as your gateway
     under 'Gateway' and hit "Add".


  6. Under the 'DNS Configuration' tab, make sure to put in a name for
     this machine and enter in your official domain name.  If you don't
     have your own domain, put in the domain of your ISP.  Now, add all
     of the DNS server that your Linux host uses (usually found in
     /etc/resolv.conf).  Usually these DNS servers are located at your
     ISP though you can be running either your own CACHING or
     Authoritative DNS server on your Linux MASQ server as well.
     Optionally, you can add any appropriate domain search suffixes as
     well.


  7. Leave all the other settings as they are unless you know what
     you're doing.


  8. Click 'OK' on all dialog boxes and restart system.


  9. Ping the linux box to test the network connection: 'Start/Run',
     type: ping 192.168.0.1
     (This is only an INTERNAL LAN connection test, you can't ping the
     outside world yet.)  If you don't see "replies" to your PINGs,
     please verify your network configuration.

  10.
     You can optionally create a HOSTS file in the C:\Windows directory
     so that you can ping the "hostname" of the machines on your LAN
     without the need for a DNS server.  There is an example called
     HOSTS.SAM in the C:\windows directory.


  4.2.  Configuring Windows NT


  1. If you haven't installed your network card and adapter driver, do
     so now.  Description of this is beyond the scope of this document.


  2. Go to 'Control Panel' --> 'Network' --> Protocols


  3. Add the TCP/IP Protocol and related Components from the 'Add
     Software' menu if you don't have TCP/IP service installed already.


  4. Under 'Network Software and Adapter Cards' section, highlight the
     'TCP/IP Protocol' in the 'Installed Network Software' selection
     box.


  5. In 'TCP/IP Configuration', select the appropriate adapter, e.g.
     [1]Novell NE2000 Adapter.  Then set the IP Address to 192.168.0.x
     (1 < x < 255), then set Subnet Mask to 255.255.255.0 and Default
     Gateway to 192.168.0.1


  6. Do not enable any of the following options (unless you know what
     you are e xactly doing):


    running on your network.

    Put anything in the 'WINS Server' input areas :  Unless you hav e
     setup one or more WINS servers.

    Enable IP Forwardings : Unless you are routing on your NT machine
     and really -REALLY- know EXACTLY what you're doing.


  7. Click 'DNS', fill in the appropriate information that your Linux
     host uses (usually found in /etc/resolv.conf) and then click 'OK'
     when you're done.


  8. Click 'Advanced', be sure to DISABLE 'DNS for Windows Name
     Resolution' and 'Enable LMHOSTS lookup' unless you known what these
     options do.  If you want to use a LMHOSTS file, it is stored in
     C:\winnt\system32\drivers\etc.


  9. Click 'OK' on all dialog boxes and restart system.


  10.
     Ping the linux box to test the network connection: 'File/Run',
     type: ping 192.168.0.1
     (This is only an INTERNAL LAN connection test, you can't ping the
     outside world yet.) If you don't see "replies" to your PINGs,
     please verify your network configuration.

  4.3.  Configuring Windows for Workgroup 3.11


  1. If you haven't installed your network card and adapter driver, do
     so now.  Description of this is beyond the scope of this document.


  2. Install the TCP/IP 32b package if you don't have it already.


  3. In 'Main'/'Windows Setup'/'Network Setup', click on 'Drivers'.


  4. Highlight 'Microsoft TCP/IP-32 3.11b' in the 'Network Drivers'
     section, click 'Setup'.


  5. Set the IP Address to 192.168.0.x (1 < x < 255), then set the
     Subnet Mask to 255.255.255.0 and Default Gateway to 192.168.0.1


  6. Do not enable any of the following options (unless you know what
     you are exactly doing):


  

    Put anything in the 'WINS Server' input areas :  Unless you have
     setup one or more WINS servers.


  7. Click 'DNS', fill in the appropriate information your Linux host
     uses (usually found in /etc/resolv.conf).  Then click 'OK' when
     you're done with it.


  8. Click 'Advanced', check 'Enable DNS for Windows Name Resolution'
     and 'Enable LMHOSTS lookup' found in c:\windows.


  9. Click 'OK' on all dialog boxes and restart system.


  10.
     Ping the linux box to test the network connection: 'File/Run',
     type: ping 192.168.0.1


  4.4.  Configuring UNIX Based Systems


  1. If you haven't installed your network card and recompile your
     kernel with the appropriate adapter driver, do so now.  Description
     of this is beyond the scope of this document.

  2. Install TCP/IP networking, such as the net-tools package, if you
     don't have it already.


  3. Set IPADDR to 192.168.0.x (1 < x < 255), then set NETMASK to
     255.255.255.0, GATEWAY to 192.168.0.1, and BROADCAST to
     192.168.0.255

     For example with Redhat Linux systems, you can edit the
     /etc/sysconfig/network-scripts/ifcfg-eth0 file, or simply do it
     through the Control Panel.  These changes are different for other
     UNIXes such as SunOS, BSDi, Slackware Linux, Solaris, SuSe, Debian,
     etc...).  Please refer to your UNIX documentation for more
     information.


  4. Add your domain name service (DNS) and domain search suffix in
     /etc/resolv.conf and for the appropreiate UNIX versions, edit the
     /etc/nsswitch.conf file to enable DNS services.


  5. You may want to update your /etc/networks file depending on your
     settings.


  6. Restart the appropriate services, or simply restart your system.


  7. Issue a ping command: ping 192.168.0.1  to test the connection to
     your gateway machine.
     (This is only an INTERNAL LAN connection test, you can't ping the
     outside world yet.)  If you don't see "replies" to your PINGs,
     please verify your network configuration.


  4.5.  Configuring DOS using NCSA Telnet package


  1. If you haven't installed your network card, do so now.  Description
     of this is beyond the scope of this document.


  2. Load the appropriate packet driver. For example: using a NE2000
     Ethernet card set for I/O port 300 and IRQ 10, issue nwpd 0x60 10
     0x300


  3. Make a new directory, and then unpack the NCSA Telnet package:
     pkunzip tel2308b.zip


  4. Use a text editor to open the config.tel file


  5. Set myip=192.168.0.x (1 < x < 255), and netmask=255.255.255.0


  6. In this example, you should set hardware=packet, interrupt=10,
     ioaddr=60


  7. You should have at least one individual machine specification set
     as the gateway, i.e. the Linux host:



       name=default
       host=yourlinuxhostname
       hostip=192.168.0.1
       gateway=1



  8. Have another specification for a domain name service:

       name=dns.domain.com ; hostip=123.123.123.123; nameserver=1



  Note: substitute the appropriate information about the DNS that your
  Linux host uses


  9. Save your config.tel file


  10.
     Telnet to the linux box to test the network connection: telnet
     192.168.0.1  If you don't receive a LOGIN prompt, please verify
     your network configuration.


  4.6.  Configuring MacOS Based System Running MacTCP


  1. If you haven't installed the appropriate driver software for your
     Ethernet adapter, do so now.  Description of this is beyond the
     scope of this document.


  2. Open the MacTCP control panel.  Select the appropriate network
     driver (Ethernet, NOT EtherTalk) and click on the 'More...' button.


  3. Under 'Obtain Address:', click 'Manually'.


  4. Under 'IP Address:', select class C from the popup menu. Ignore the
     rest of this section of the dialog box.


  5. Fill in the appropriate information under 'Domain Name Server
     Information:'.


  6. Under 'Gateway Address:', enter 192.168.0.1


  7. Click 'OK' to save the settings.  In the main window of the MacTCP
     control panel, enter the IP address of your Mac (192.168.0.x, 1 < x
     < 255) in the 'IP Address:' box.


  8. Close the MacTCP control panel.  If a dialog box pops up notifying
     you to do so, restart the system.


  9. You may optionally ping the Linux box to test the network
     connection.  If you have the freeware program MacTCP Watcher, click
     on the 'Ping' button, and enter the address of your Linux box
     (192.168.0.1) in the dialog box that pops up.  (This is only an
     INTERNAL LAN connection test, you can't ping the outside world
     yet.)  If you don't see "replies" to your PINGs, please verify your
     network configuration.


  10.
     You can optionally create a Hosts file in your System Folder so
     that you can use the hostnames of the machines on your LAN.  The
     file should already exist in your System Folder, and should contain
     some (commented-out) sample entries which you can modify according
     to your needs.



  4.7.  Configuring MacOS Based System Running Open Transport


  1. If you haven't installed the appropriate driver software for your
     Ethernet adapter, do so now.  Description of this is beyond the
     scope of this document.


  2. Open the TCP/IP Control Panel and choose 'User Mode ...' from the
     Edit menu. Make sure the user mode is set to at least 'Advanced'
     and click the 'OK' button.


  3. Choose 'Configurations...' from the File menu.  Select your
     'Default' configuration and click the 'Duplicate...' button.  Enter
     'IP Masq' (or something to let you know that this is a special
     configuration) in the 'Duplicate Configuration' dialog, it will
     probably say something like 'Default copy'.  Then click the 'OK'
     button, and the 'Make Active' button


  4. Select 'Ethernet' from the 'Connect via:' pop-up.


  5. Select the appropriate item from the 'Configure:' pop-up.  If you
     don't know which option to choose, you probably should re-select
     your 'Default' configuration and quit.  I use 'Manually'.


  6. Enter the IP address of your Mac (192.168.0.x, 1 < x < 255) in the
     'IP Address:' box.


  7. Enter 255.255.255.0 in the 'Subnet mask:' box.


  8. Enter 192.168.0.1 in the 'Router address:' box.


  9. Enter the IP addresses of your domain name servers in the 'Name
     server addr.:' box.


  10.
     Enter the name of your Internet domain (e.g. 'microsoft.com') in
     the 'Starting domain name' box under 'Implicit Search Path:'.


  11.
     The following procedures are optional.  Incorrect values may cause
     erratic behavior.  If you're not sure, it's probably better to
     leave them blank, unchecked and/or un-selected.  Remove any
     information from those fields, if necessary.  As far as I know
     there is no way through the TCP/IP dialogs, to tell the system not
     to use a previously select alternate "Hosts" file.  If you know, I
     would be interested.

     Check the '802.3' if your network requires 802.3 frame types.



  12.
     Click the 'Options...' button to make sure that the TCP/IP is
     active.  I use the 'Load only when needed' option.  If you run and
     quit TCP/IP applications many times without rebooting your machine,
     you may find that unchecking the 'Load only when needed' option
     will prevent/reduce the effects on your machines memory management.
     With the item unchecked the TCP/IP protocol stacks are always
     loaded and available for use.  If checked, the TCP/IP stacks are
     automatically loaded when needed and un-loaded when not.  It's the
     loading and unloading process that can cause your machines memory
     to become fragmented.


  13.
     You may ping the Linux box to test the network connection.  If you
     have the freeware program MacTCP Watcher, click on the 'Ping'
     button, and enter the address of your Linux box (192.168.0.1) in
     the dialog box that pops up.  (This is only an INTERNAL LAN
     connection test, you can't ping the outside world yet.)   If you
     don't see "replies" to your PINGs, please verify your network
     configuration.


  14.
     You can optionally create a Hosts file in your System Folder so
     that you can use the hostnames of the machines on your LAN.  The
     file may or may not already exist in your System Folder.  If so, it
     should contain some (commented-out) sample entries which you can
     modify according to your needs.  If not, you can get a copy of the
     file from a system running MacTCP, or just create your own (it
     follows a subset of the Unix /etc/hosts file format, described on
     RFC952).  Once you've created the file, open the TCP/IP control
     panel, click on the 'Select Hosts File...' button, and open the
     Hosts file.


  15.
     Click the close box or choose 'Close' or 'Quit' from the File menu,
     and then click the 'Save' button to save the changes you have made.


  16.
     The changes take effect immediately, but rebooting the system won't
     hurt.


  4.8.  Configuring Novell network using DNS


  1. If you haven't installed the appropriate driver software for your
     Ethernet adapter, do so now.  Description of this is beyond the
     scope of this document.


  2. Downloaded tcpip16.exe from The Novell LanWorkPlace page
     <ftp.novell.com/pub/updates/unixconn/lwp5>


  3.

     edit c:\nwclient\startnet.bat



     SET NWLANGUAGE=ENGLISH
     LH LSL.COM
     LH KTC2000.COM
     LH IPXODI.COM
     LH tcpip
     LH VLM.EXE
     F:



  4.

     edit c:\nwclient\net.cfg


     Link Driver KTC2000
             Protocol IPX 0 ETHERNET_802.3
             Frame ETHERNET_802.3
             Frame Ethernet_II
             FRAME Ethernet_802.2

     NetWare DOS Requester
                FIRST NETWORK DRIVE = F
                USE DEFAULTS = OFF
                VLM = CONN.VLM
                VLM = IPXNCP.VLM
                VLM = TRAN.VLM
                VLM = SECURITY.VLM
                VLM = NDS.VLM
                VLM = BIND.VLM
                VLM = NWP.VLM
                VLM = FIO.VLM
                VLM = GENERAL.VLM
                VLM = REDIR.VLM
                VLM = PRINT.VLM
                VLM = NETX.VLM

     Link Support
             Buffers 8 1500
             MemPool 4096

     Protocol TCPIP
             PATH SCRIPT     C:\NET\SCRIPT
             PATH PROFILE    C:\NET\PROFILE
             PATH LWP_CFG    C:\NET\HSTACC
             PATH TCP_CFG    C:\NET\TCP
             ip_address      192.168.0.xxx
             ip_router       192.168.0.1



  Change the IP address in the above "ip_address" field (192.168.0.x, 1 < x < 255)
  and finally create c:\bin\resolv.cfg:

  SEARCH DNS HOSTS SEQUENTIAL
  NAMESERVER xxx.xxx.xxx.xxx
  NAMESERVER yyy.yyy.yyy.yyy



  5. Now edit the above "NAMESERVER" entries and replace them with the
     correct IP addresses for your local DNS server.


  6. Issue a ping command: ping 192.168.0.1  to test the connection to
     your gateway machine.
     (This is only an INTERNAL LAN connection test, you can't ping the
     outside world yet.)  If you don't see "replies" to your PINGs,
     please verify your network configuration.



  4.9.  Configuring OS/2 Warp


  1. If you haven't installed the appropriate driver software for your
     Ethernet adapter, do so now.  Description of this is beyond the
     scope of this document.


  2. Install the TCP/IP protocol if you don't have it already.


  3. Go to Programs/TCP/IP (LAN) / TCP/IP Settings


  4. In 'Network' add your TCP/IP Address (192.168.0.x) and set your
     netmask (255.255.255.0)


  5. Under 'Routing' press 'Add'. Set the Type to 'default' and type the
     IP Address of your Linux Box in the Field 'Router Address'.
     (192.168.0.1).


  6. Set the same DNS (Nameserver) Address that your Linux host uses in
     'Hosts'.


  7. Close the TCP/IP control panel. Say yes to the following
     question(s).



  8. Reboot your system


  9. You may ping the Linux box to test the network configuration. Type
     'ping 192.168.0.1' in a 'OS/2 Command prompt Window'. When ping
     packets are received all is ok.


  4.10.  Configuring OS/400 on a IBM AS/400

  The description of how to configure TCP/IP on OS/400 version V4R1M0
  running on a AS/400 is beyond the scope of this document.

  1) To perform any communications configuration tasks on your AS/400,
  you must have the special authority of *IOSYSCFG (I/O System
  Configuration) defined in your user profile. You can check the
  characteristics of your user profile with the DSPUSRPRF command.

  2) Type GO CFGTCP command th reach the Configure TCP/IP menu.

  3) Select Option 2 - Work with TCP/IP Routes.

  4) Enter a 1 on the Opt field to add a route.  * In Route Destination
  type *DFTROUTE * In Subnet Mask type *NONE * In Type of Service type
  *NORMAL * In Nex Hop type the address of your gataway (the Linux box)

  4.11.  Configuring Other Systems

  The same logic should apply to setting up other platforms.  Consult
  the sections above.  If you're interested in writing about any of
  systems that have not been covered yet, please send a detail setup
  instruction to ambrose@writeme.com and dranch@trinnet.net.


  5.  Testing IP Masquerade



  Finally, it's time to give IP Masquerading an official try after all
  this hard work.  If you haven't already rebooted your Linux box, do so
  to make sure the machines boots ok, executes the /etc/rc.d/rc.firewall
  ruleset, etc. Next, make sure that both the internal LAN connection
  and connection of your Linux hosts to the Internet is okay.

  Now do the following:


    One:  From an internal MASQed computer, try pinging your local IP
     address (i.e. ping 192.168.0.10 ).  This will verify that TCP/IP is
     correctly working on the local machine.  If this doesn't work, make
     sure that TCP/IP is correctly configured on the MASQed PC as
     described earlier in this HOWTO.


    Two:  On the MASQ server itself, ping then internal IP address of
     the MASQ network (i.e. ping 192.168.0.1).  Now Then ping the
     external IP address connected to the Internet.  This address might
     be your PPP, Ethernet, etc. address connected to your ISP.  If you
     don't know what this IP address is, run the Linux command
     "/sbin/ifconfig" on the MASQ server to get the Internet address.
     This will confirm that the MASQ server has full network
     connectivity.


    Three:  Back on a internal MASQed computer, try pinging the IP
     address of the Masquerading Linux box's internal Ethernet card,
     (i.e. ping 192.168.0.1).  This will prove that your internal
     network and routing is ok.  If this fails, make sure Ethernet cards
     of the MASQ server and the MASQed computer have "link".  This is
     usually a LED light on either the back of each Ethernet card and
     also on the Ethernet hub/switch (if you are using one).


    Four:  From an internal MASQed computer, ping the IP address of the
     MASQ server's external TCP/IP address obtained in item TWO above.
     This address might be your PPP, Ethernet, etc. address connected to
     your ISP.  This ping test will prove that masquerading is working
     (ICMP Masquerading specifically).  If it doesn't work, make sure
     that you enabled "ICMP Masquerading" in the kernel and "IP
     Forwarding" in your /etc/rc.d/rc.firewall script.  Also make sure
     that the /etc/rc.d/rc.firewall ruleset loaded ok.  Try run the
     /etc/rc.d/rc.firewall script manually for now to see if it runs ok.

  If you still can't get things to work, take a look at the output from

    "ifconfig" : Make sure your Internet connection is UP and you have
     the correct IP address for the Internet connection


    "netstat -rn" : Make sure your default gateway (the column one with
     the IP address in the Gateway column) is set

    "cat /proc/sys/net/ipv4/ip_forward" : Make sure it says "1" so that
     Linux forwarding is enabled


    "/sbin/ipfwadm -F -l" for 2.0.x or "/sbin/ipchains -F -L" for 2.2.x
     users : Make sure you have MASQ enabled


    Five:  From an internal MASQed computer, now ping a static TCP/IP
     address out on the Internet (i.e. ping 152.19.254.81 (this is
     http://metalab.unc.edu - home of the LDP).  If this works, that
     means that ICMP Masquerading is working over the Internet.  If it
     didn't work, again check your Internet connection.  If this still
     doesn't work, make sure you are using the simple rc.firewall
     ruleset and that you have ICMP Masqurading compiled into the Linux
     kernel.  Also, make sure that the ruleset that enable IP MASQ is
     pointing to the correct EXNTERNAL interface.


    Six:  Now try TELNETing to a remote IP address (i.e. telnet
     152.2.254.81 (metalab.unc.edu - Note that this might take a while
     to get a login prompt since this is a VERY busy server.)  Did you
     get a login prompt after a while?  If that worked, that means that
     TCP Masquerading is running ok.  If not, try TELNETing to some
     other hosts you think will support TELNET like 198.182.196.55
     (www.linux.org).  If this still doesn't work, make sure you are
     using the simple rc.firewall ruleset for now.


    Seven:  Now try TELNETing to a remote HOSTNAME (i.e. "telnet
     metalab.unc.edu" (152.2.254.81).  If this works, this means that
     DNS is working fine as well.  If this didn't work but step FOUR did
     work, make sure that you have valid DNS servers configured on your
     MASQed computer.


    Eight:  As a last test, try browsing some 'INTERNET' WWW sites on
     one of your MASQed machines, and see if you can reach them.  For
     example, access the Linux Documentation Project site.  If this
     works, you can be fairly certain that everything is working FINE!

  If you see The Linux Documentation Project homepage, then
  CONGRATULATIONS! It's working!  If that WWW site comes up correctly,
  then all other standard network tolls such as PING, TELNET, SSH, and
  with their related IP MASQ modules loaded: FTP, Real Audio, IRC DCCs,
  Quake I/II/III, CuSeeme, VDOLive, etc. should work fine!  If FTP, IRC,
  RealAudio, Quake I/II/III, etc. aren't working or are performing
  poorly, make sure their associated Masquerading modules are loaded by
  running "lsmod" and also be sure you are loading the module with any
  non-default server ports.  If you don't see your needed module, make
  sure your /etc/rc.d/rc.firewall script is loading them (i.e. remove
  the # character for a give IP MASQ module).



  6.  Other IP Masquerade Issues and Software Support



  6.1.  Problems with IP Masquerade

  Some TCP/IP application protocols will not currently work with Linux
  IP Masquerading because they either assume things about port numbers
  or encode TCP/IP addresses and/or port numbers in their data stream.
  These latter protocols need specific proxies or IP MASQ modules built
  into the masquerading code to make them work.
  6.2.  Incoming services

  By default, Linux IP Masquerading cannot handle incoming services at
  all but there are a few ways of allowing them.

  If you do not require high levels of security then you can simply
  forward or redirect IP ports.  There are various ways of doing this
  though the most stable method is to use IPPORTFW.  For more
  information, please see the ``'' section.

  If you wish to have some level of authorization on incoming
  connections then you will need to either configure TCP-wrappers or
  Xinetd to then allow only specific IP addresses through.  The TIS
  Firewall Toolkit is a good place to look for tools and information.

  More details on incoming security can be found in the TrinityOS
  <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri> document
  and at IP Masquerade Resource <http://ipmasq.cjb.net>.



  6.3.  Supported Client Software and Other Setup Notes



       ** The Linux Masquerade Application list <http://www.tsmser
       vices.com/masq> has a lot of good information regarding
       applications that work through Linux IP masquerading.  This
       site was recently taken over by Steve Grevemeyer who impli
       mented it with a full database backend.  Its a great
       resource!


  Generally, any application that uses standard TCP and UDP should work.
  If you have any suggestion, hints, etc., please see the IP Masquerade
  Resource <http://ipmasq.cjb.net/> for more details.


  6.3.1.  Network Clients that -Work- with IP Masquerade

  General Clients:


     Archie
        all supported platforms, file searching client (not all archie
        clients are supported)


     FTP
        all supported platforms, with the ip_masq_ftp.o kernel module
        for active FTP connections.


     Gopher client
        all supported platforms


     HTTP
        all supported platforms, WWW surfing


     IRC
        all IRC clients on various supported platforms, DCC is supported
        via the ip_masq_irc.o module


     NNTP (USENET)
        all supported platforms, USENET news client


     PING
        all platforms, with ICMP Masquerading kernel option


     POP3
        all supported platforms, email clients


     SSH
        all supported platforms, Secure TELNET/FTP clients


     SMTP
        all supported platforms, email servers like Sendmail, Qmail,
        PostFix, etc.


     TELNET
        all supported platforms, remote session


     TRACEROUTE
        UNIX and Windows based platforms , some variations may not work


     VRML
        Windows(possibly all supported platforms), virtual reality
        surfing


     WAIS client
        all supported platforms


  Multimedia and Communication Clients:


     Alpha Worlds
        Windows, Client-Server 3D chat program


     CU-SeeMe
        all supported platforms, with the ip_masq_cuseeme module loaded,
        please see the ``'' section for more details.


     ICQ
        all supported clients.  Requires the Linux kernel to be compiled
        with IPPORTFW support and ICQ is configured to be behind a NON-
        SOCKS proxy.  A full description of this configuration is in the
        ``'' section.


     Internet Phone 3.2
        Windows, Peer-to-peer audio communications, people can reach you
        only if you initiate the call, but people cannot call you
        without a specific port forwarding setup.  See the ``'' section
        for more details.

     Internet Wave Player
        Windows, network streaming audio


     Powwow
        Windows, Peer-to-peer Text audio whiteboard communications,
        people can reach you only if you initiate the call, but people
        cannot call you without a specific port forwarding setup.  See
        the ``'' se ction for more details.


     Real Audio Player
        Windows, network streaming audio, higher quality available with
        the ip_masq_raudio UDP module


     True Speech Player 1.1b
        Windows, network streaming audio


     VDOLive
        Windows, with the ip_masq_vdolive patch


     Worlds Chat 0.9a
        Windows, Client-Server 3D chat program



  Games - See the ``'' section for more details on the LooseUDP patch


     Battle.net
        Works but requires TCP ports 116 and 118 and UDP port 6112
        IPPORTFWed to the game machine.  See the ``'' section for more
        details.  Please note that FSGS and Bnetd servers still require
        IPPORTFW since they haven't been re-written to be NAT-friendly.


     BattleZone 1.4
        Works with LooseUDP patch and new NAT-friendly .DLLs from
        Activision


     Dark Reign 1.4
        Works with LooseUDP patch or requires TCP ports 116 and 118 and
        UDP port 6112 IPPORTFWed to the game machine.  See the ``''
        section for more details.


     Diablo
        Works with LooseUDP patch or requires TCP ports 116 and 118 and
        UDP port 6112 IPPORTFWed to the game machine.  Newer versions of
        Diablo use only TCP port 6112 and UDP port 6112.  See the ``''
        section for more details.


     Heavy Gear 2
        Works with LooseUDP patch or requires TCP ports 116 and 118 and
        UDP port 6112 IPPORTFWed to the game machine.  See the ``''
        section for more details.


     Quake I/II/III
        Works right out of the box but requires the ip_masq_quake module
        if there are more than one Quake I/II/III player behind a MASQ
        box.  Also, this module only supports Quake I and QuakeWorld by
        default.  If you need to support Quake II or non-default server
        ports, please see the module install section of the ``'' and
        ``'' rulesets.


     StarCraft
        Works with the LooseUDP patch and IPPORTFWing TCP and UDP ports
        6112 to the internal MASQed game machine.  See the ``'' section
        for more details.


     WorldCraft
        Works with LooseUDP patch


  Other Clients:


     Linux net-acct package
        Linux, network administration-account package


     NCSA Telnet 2.3.08
        DOS, a suite containing telnet, ftp, ping, etc.


     PC-anywhere for Windows
        MS-Windows, Remotely controls a PC over TCP/IP, only work if it
        is a client but not a host without a specific port forwarding
        setup.  See the ``'' section for more details.


     Socket Watch
        uses NTP - network time protocol


  6.3.2.  Clients that do not have full support in IP MASQ:



     All H.323 programs
        - MS Netmeeting, Intel Internet Phone Beta 2 - Connects but
        voice travels one way (out).  Check out Equivalence's PhonePatch
        <http://www.equival.com.au/phonepatch/index.html> H.323 gateway
        for one possible solution.

        UPDATE:  There is now ALPHA module available on the MASQ WWW
        site or at ftp://ftp.coritel.it/pub/linux/ip_masq/
        <ftp://ftp.coritel.it/pub/linux/ip_masq/> to work with Microsoft
        Netmeeting v3.x code on 2.2.x kernels.  There is also another
        module version on the MASQ WWW site specifically for Netmeeting
        2.x with 2.0.x kerneks.


     Intel Streaming Media Viewer Beta 1
        Cannot connect to server


     Netscape CoolTalk
        Cannot connect to opposite side


     WebPhone
        Cannot work at present (it makes invalid assumptions about
        addresses).
  6.4.  Stronger IP Firewall (IPFWADM) Rulesets



  This section provides a more in-depth guide on using the 2.0.x
  firewall tool, IPFWADM.  See below for IPCHAINS rulesets

  This example is for a firewall/masquerade system behind a PPP link
  with a static PPP address (dynamic PPP instructions are included but
  disabled).  The trusted interface is 192.168.0.1 and the PPP interface
  IP address has been changed to protect the guilty :).  I have listed
  each incoming and outgoing interface individually to catch IP spoofing
  as well as stuffed routing and/or masquerading. Anything not
  explicitly allowed is FORBIDDEN (well.. rejected actually).  If your
  IP MASQ box breaks after implementing this rc.firewall script, be sure
  that you edited it for your configuration and check your
  /var/log/messages or /var/adm/messages SYSLOG file for any firewall
  errors.

  For more comprehensive examples of a strong IP Masqueraded IPFWADM
  rulesets for PPP, Cablemodem users, etc., please see TrinityOS -
  Section 10 <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>
  and GreatCircle's Firewall WWW page

  NOTE: If you get a dynamically assigned TCP/IP address from your ISP
  (PPP, ADSL, Cablemodems, etc.), you CANNOT load this strong ruleset
  upon boot.  You will either need to reload this firewall ruleset EVERY
  TIME you get a new IP address or make your /etc/rc.d/rc.firewall
  ruleset more intelligent.  To do this for PPP users, carefully read
  and un-comment out the properly lines in the "Dynamic PPP IP fetch"
  section below.   You can also find more details in the TrinityOS -
  Section 10 <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>
  doc for more details on Strong rulesets and Dynamic IP addresses.

  Please also be aware that there are several GUI Firewall creation
  tools available as well.  Please see the ``'' section for full
  details.

  Lastly, if you are using a STATIC PPP IP address, change the
  "ppp_ip="your.static.PPP.address"" line to reflect your address.

  ----------------------------------------------------------------



  #!/bin/sh
  #
  # /etc/rc.d/rc.firewall: An example of a semi-STRONG IPFWADM firewall ruleset
  #

  PATH=/sbin:/bin:/usr/sbin:/usr/bin

  # testing, wait a bit then clear all firewall rules.
  # uncomment following lines if you want the firewall to automatically
  # disable after 10 minutes.
  # (sleep 600; \
  # ipfwadm -I -f; \
  # ipfwadm -I -p accept; \
  # ipfwadm -O -f; \
  # ipfwadm -O -p accept; \
  # ipfwadm -F -f; \
  # ipfwadm -F -p accept; \
  # ) &

  # Load all required IP MASQ modules
  #
  #   NOTE:  Only load the IP MASQ modules you need.  All current IP MASQ modules
  #          are shown below but are commented from loading.

  # Needed to initially load modules
  #
  /sbin/depmod -a

  # Supports the proper masquerading of FTP file transfers using the PORT method
  #
  /sbin/modprobe ip_masq_ftp

  # Supports the masquerading of RealAudio over UDP.  Without this module,
  #       RealAudio WILL function but in TCP mode.  This can cause a reduction
  #       in sound quality
  #
  #/sbin/modprobe ip_masq_raudio

  # Supports the masquerading of IRC DCC file transfers
  #
  #/sbin/modprobe ip_masq_irc


  # Supports the masquerading of Quake and QuakeWorld by default.  This modules is
  #   for for multiple users behind the Linux MASQ server.  If you are going to play
  #   Quake I, II, and III, use the second example.
  #
  #   NOTE:  If you get ERRORs loading the QUAKE module, you are running an old
  #   -----  kernel that has bugs in it.  Please upgrade to the newest kernel.
  #
  #Quake I / QuakeWorld (ports 26000 and 27000)
  #/sbin/modprobe ip_masq_quake
  #
  #Quake I/II/III / QuakeWorld (ports 26000, 27000, 27910, 27960)
  #/sbin/modprobe ip_masq_quake 26000,27000,27910,27960


  # Supports the masquerading of the CuSeeme video conferencing software
  #
  #/sbin/modprobe ip_masq_cuseeme

  #Supports the masquerading of the VDO-live video conferencing software
  #
  #/sbin/modprobe ip_masq_vdolive


  #CRITICAL:  Enable IP forwarding since it is disabled by default since
  #
  #           Redhat Users:  you may try changing the options in /etc/sysconfig/network from:
  #
  #                       FORWARD_IPV4=false
  #                             to
  #                       FORWARD_IPV4=true
  #
  echo "1" > /proc/sys/net/ipv4/ip_forward


  #CRITICAL:  Enable automatic IP defragmenting since it is disabled by default in 2.2.x kernels
  #
  #           This used to be a compile-time option but the behavior was changed in 2.2.12
  #
  echo "1" > /proc/sys/net/ipv4/ip_ip_always_defrag


  # Dynamic IP users:
  #
  #   If you get your IP address dynamically from SLIP, PPP, or DHCP, enable this following
  #       option.  This enables dynamic-ip address hacking in IP MASQ, making the life
  #       with Diald and similar programs much easier.
  #
  #echo "1" > /proc/sys/net/ipv4/ip_dynaddr


  # Specify your Static IP address here.
  #
  #   If you have a DYNAMIC IP address, you need to make this ruleset understand your
  #   IP address everytime you get a new IP.  To do this, enable the following one-line
  #   script.  (Please note that the different single and double quote characters MATTER).
  #
  #
  #   DHCP users:
  #   -----------
  #   If you get your TCP/IP address via DHCP, **you will need ** to enable the #ed out command
  #   below underneath the PPP section AND replace the word "ppp0" with the name of your EXTERNAL
  #   Internet connection (eth0, eth1, etc).  It should be also noted that the DHCP server can
  #   change IP addresses on you.  To fix this, users should configure their DHCP client to
  #   re-run the firewall ruleset everytime the DHCP lease is renewed.
  #
  #     NOTE #1:  Some newer DHCP clients like "pump" do NOT have this ability to run scripts
  #               after a lease-renew.  Because of this, you need to replace it with something
  #               like "dhcpcd" or "dhclient".
  #
  #     NOTE #2:  The syntax for "dhcpcd" has changed in recent versions.
  #
  #               Older versions used syntax like:
  #                         dhcpcd -c /etc/rc.d/rc.firewall eth0
  #
  #               Newer versions use syntax like:
  #                         dhcpcd eth0 /etc/rc.d/rc.firewall
  #
  #
  #   PPP users:
  #   ----------
  #   If you aren't already aware, the /etc/ppp/ip-up script is always run when a PPP
  #   connection comes up.  Because of this, we can make the ruleset go and get the
  #   new PPP IP address and update the strong firewall ruleset.
  #
  #   If the /etc/ppp/ip-up file already exists, you should edit it and add a line
  #   containing "/etc/rc.d/rc.firewall" near the end of the file.
  #
  #   If you don't already have a /etc/ppp/ip-up sccript, you need to create the following
  #   link to run the /etc/rc.d/rc.firewall script.
  #
  #       ln -s /etc/rc.d/rc.firewall /etc/ppp/ip-up
  #
  #   * You then want to enable the #ed out shell command below *
  #
  #
  # PPP and DHCP Users:
  # -------------------
  # Remove the # on the line below and place a # in front of the line after that.
  #
  #ppp_ip="`/sbin/ifconfig ppp0 | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
  #
  ppp_ip="your.static.PPP.address"


  # MASQ timeouts
  #
  #   2 hrs timeout for TCP session timeouts
  #  10 sec timeout for traffic after the TCP/IP "FIN" packet is received
  #  60 sec timeout for UDP traffic (MASQ'ed ICQ users must enable a 30sec firewall timeout in ICQ itself)
  #
  /sbin/ipfwadm -M -s 7200 10 60


  #############################################################################
  # Incoming, flush and set default policy of reject. Actually the default policy
  # is irrelevant because there is a catch all rule with deny and log.
  #
  /sbin/ipfwadm -I -f
  /sbin/ipfwadm -I -p reject

  # local interface, local machines, going anywhere is valid
  #
  /sbin/ipfwadm -I -a accept -V 192.168.0.1 -S 192.168.0.0/24 -D 0.0.0.0/0

  # remote interface, claiming to be local machines, IP spoofing, get lost
  #
  /sbin/ipfwadm -I -a reject -V $ppp_ip -S 192.168.0.0/24 -D 0.0.0.0/0 -o

  # remote interface, any source, going to permanent PPP address is valid
  #
  /sbin/ipfwadm -I -a accept -V $ppp_ip -S 0.0.0.0/0 -D $ppp_ip/32

  # loopback interface is valid.
  #
  /sbin/ipfwadm -I -a accept -V 127.0.0.1 -S 0.0.0.0/0 -D 0.0.0.0/0

  # catch all rule, all other incoming is denied and logged. pity there is no
  # log option on the policy but this does the job instead.
  #
  /sbin/ipfwadm -I -a reject -S 0.0.0.0/0 -D 0.0.0.0/0 -o


  #############################################################################
  # Outgoing, flush and set default policy of reject. Actually the default policy
  # is irrelevant because there is a catch all rule with deny and log.
  #
  /sbin/ipfwadm -O -f
  /sbin/ipfwadm -O -p reject

  # local interface, any source going to local net is valid
  #
  /sbin/ipfwadm -O -a accept -V 192.168.0.1 -S 0.0.0.0/0 -D 192.168.0.0/24

  # outgoing to local net on remote interface, stuffed routing, deny
  #
  /sbin/ipfwadm -O -a reject -V $ppp_ip -S 0.0.0.0/0 -D 192.168.0.0/24 -o

  # outgoing from local net on remote interface, stuffed masquerading, deny
  #
  /sbin/ipfwadm -O -a reject -V $ppp_ip -S 192.168.0.0/24 -D 0.0.0.0/0 -o

  # outgoing from local net on remote interface, stuffed masquerading, deny
  #
  /sbin/ipfwadm -O -a reject -V $ppp_ip -S 0.0.0.0/0 -D 192.168.0.0/24 -o

  # anything else outgoing on remote interface is valid
  #
  /sbin/ipfwadm -O -a accept -V $ppp_ip -S $ppp_ip/32 -D 0.0.0.0/0

  # loopback interface is valid.
  #
  /sbin/ipfwadm -O -a accept -V 127.0.0.1 -S 0.0.0.0/0 -D 0.0.0.0/0

  # catch all rule, all other outgoing is denied and logged. pity there is no
  # log option on the policy but this does the job instead.
  #
  /sbin/ipfwadm -O -a reject -S 0.0.0.0/0 -D 0.0.0.0/0 -o


  #############################################################################
  # Forwarding, flush and set default policy of deny. Actually the default policy
  # is irrelevant because there is a catch all rule with deny and log.
  #
  /sbin/ipfwadm -F -f
  /sbin/ipfwadm -F -p deny

  # Masquerade from local net on local interface to anywhere.
  #
  /sbin/ipfwadm -F -a masquerade -W ppp0 -S 192.168.0.0/24 -D 0.0.0.0/0
  #
  # catch all rule, all other forwarding is denied and logged. pity there is no
  # log option on the policy but this does the job instead.
  #
  /sbin/ipfwadm -F -a reject -S 0.0.0.0/0 -D 0.0.0.0/0 -o

  #End of file.



  With IPFWADM, you can block traffic to a particular site using the -I,
  -O or -F rules.  Remember that the set of rules are scanned top to
  bottom and "-a" tells IPFWADM to "append" this new rule to the
  existing set of rules.  So with this in mind, any specific
  restrictions need to come before global rules. For example:

  Using -I (input ) rules:

  Probably the fastest and most efficient method to block traffic but it
  only stops the MASQed machines and NOT the the firewall machine
  itself. Of course you might want to allow that combination.

  Anyway, to block 204.50.10.13:


  In the /etc/rc.d/rc.firewall ruleset:



  ... start of -I rules ...

  # reject and log local interface, local machines going to 204.50.10.13
  #
  /sbin/ipfwadm -I -a reject -V 192.168.0.1 -S 192.168.0.0/24 -D 204.50.10.13/32 -o

  # local interface, local machines, going anywhere is valid
  #
  /sbin/ipfwadm -I -a accept -V 192.168.0.1 -S 192.168.0.0/24 -D 0.0.0.0/0

  ... end of -I rules ...



  Using -O (output) rules:

  This is the slower method to block traffic because the packets go
  through masquerading first before they are dropped.  Yet, this rule
  even stops the firewall machine from accessing the forbidden site.



  ... start of -O rules ...

  # reject and log outgoing to 204.50.10.13
  #
  /sbin/ipfwadm -O -a reject -V $ppp_ip -S $ppp_ip/32 -D 204.50.10.13/32 -o

  # anything else outgoing on remote interface is valid
  #
  /sbin/ipfwadm -O -a accept -V $ppp_ip -S $ppp_ip/32 -D 0.0.0.0/0

  ... end of -O rules ...



  Using -F (forward) rules:

  Probably slower than -I (input) rules for blocking traffic, this still
  only stops masqueraded machines (e.g. internal machines).   The
  firewall machine can still reach forbidden site(s).


  ... start of -F rules ...

  # Reject and log from local net on PPP interface to 204.50.10.13.
  #
  /sbin/ipfwadm -F -a reject -W ppp0 -S 192.168.0.0/24 -D 204.50.10.13/32 -o

  # Masquerade from local net on local interface to anywhere.
  #
  /sbin/ipfwadm -F -a masquerade -W ppp0 -S 192.168.0.0/24 -D 0.0.0.0/0

  ... end of -F rules ...



  There is no need for a special rule to allow machines on the
  192.168.0.0/24 network to go to 204.50.11.0. Why?  It is already
  covered by the global MASQ rule.

  NOTE:  There is more than one way of coding the interfaces in the
  above rules.  For example instead of "-V 192.168.255.1" you can code
  "-W eth0", instead of "-V $ppp_ip" , you can use "-W ppp0".  The "-V"
  method was phased out with the imgration to IPCHAINS but for IPFWADM
  users, its personal choice and documentation more than anything.



  6.5.  Stronger IP Firewall (IPCHAINS) rulesets



  This section provides a more in-depth guide on using the 2.2.x
  firewall tool, IPCHAINS.  See above for IPFWADM rulesets.

  This example is for a firewall/masquerade system behind a PPP link
  with a static PPP address (dynamic PPP instructions are included but
  disabled).  The trusted interface is 192.168.0.1 and the PPP interface
  IP address has been changed to protect the guilty :).  I have listed
  each incoming and outgoing interface individually to catch IP spoofing
  as well as stuffed routing and/or masquerading. A nything not
  explicitly allowed is FORBIDDEN (well.. rejected actually).  If your
  IP MASQ box breaks after implementing this rc.firewall script, be sure
  that you edited it for your configuration and check your
  /var/log/messages or /var/adm/messages SYSLOG file for any firewall
  errors.

  For more comprehensive examples of a strong IP Masqueraded IPFWADM
  rulesets for PPP, Cablemodem users, etc., please see TrinityOS -
  Section 10 <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>
  and GreatCircle's Firewall WWW page

  NOTE #1: Linux 2.2.x kernels less than 2.2.11 have a IPCHAINS
  fragmentation bug.   Because of this, people running strong IPCHAINS
  rulesets are open to attack.  Please upgrade your kernel to a fixed
  version.

  NOTE #2: If you get a dynamically assigned TCP/IP address from your
  ISP (PPP, ADSL, Cablemodems, etc.), you CANNOT load this strong
  ruleset upon boot.  You will either need to reload this firewall
  ruleset EVERY TIME you get a new IP address or make your
  /etc/rc.d/rc.firewall ruleset more intelligent.  To do this for PPP
  users, carefully read and un-comment out the properly lines in the
  "Dynamic PPP IP fetch" section below.   You can also find more details
  in the TrinityOS - Section 10
  <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri> doc for
  more details on Strong rulesets and Dynamic IP addresses.

  Please also be aware that there are several GUI Firewall creation
  tools available as well.  Please see the ``'' section for full
  details.

  Lastly, if you are using a STATIC PPP IP address, change the
  "ppp_ip="your.static.PPP.address"" line to reflect your address.

  ----------------------------------------------------------------



  #!/bin/sh
  #
  # /etc/rc.d/rc.firewall: An example of a Semi-Strong IPCHAINS firewall ruleset.
  #

  PATH=/sbin:/bin:/usr/sbin:/usr/bin

  # Load all required IP MASQ modules
  #
  #   NOTE:  Only load the IP MASQ modules you need.  All current IP MASQ modules
  #          are shown below but are commented from loading.

  # Needed to initially load modules
  #
  /sbin/depmod -a

  # Supports the proper masquerading of FTP file transfers using the PORT method
  #
  /sbin/modprobe ip_masq_ftp

  # Supports the masquerading of RealAudio over UDP.  Without this module,
  #       RealAudio WILL function but in TCP mode.  This can cause a reduction
  #       in sound quality
  #
  /sbin/modprobe ip_masq_raudio

  # Supports the masquerading of IRC DCC file transfers
  #
  #/sbin/modprobe ip_masq_irc


  # Supports the masquerading of Quake and QuakeWorld by default.  This modules is
  #   for for multiple users behind the Linux MASQ server.  If you are going to play
  #   Quake I, II, and III, use the second example.
  #
  #   NOTE:  If you get ERRORs loading the QUAKE module, you are running an old
  #   -----  kernel that has bugs in it.  Please upgrade to the newest kernel.
  #
  #Quake I / QuakeWorld (ports 26000 and 27000)
  #/sbin/modprobe ip_masq_quake
  #
  #Quake I/II/III / QuakeWorld (ports 26000, 27000, 27910, 27960)
  #/sbin/modprobe ip_masq_quake 26000,27000,27910,27960


  # Supports the masquerading of the CuSeeme video conferencing software
  #
  #/sbin/modprobe ip_masq_cuseeme

  #Supports the masquerading of the VDO-live video conferencing software
  #
  #/sbin/modprobe ip_masq_vdolive


  #CRITICAL:  Enable IP forwarding since it is disabled by default since
  #
  #           Redhat Users:  you may try changing the options in /etc/sysconfig/network from:
  #
  #                       FORWARD_IPV4=false
  #                             to
  #                       FORWARD_IPV4=true
  #
  echo "1" > /proc/sys/net/ipv4/ip_forward


  #CRITICAL:  Enable automatic IP defragmenting since it is disabled by default in 2.2.x kernels
  #
  #           This used to be a compile-time option but the behavior was changed in 2.2.12
  #
  echo "1" > /proc/sys/net/ipv4/ip_ip_always_defrag


  # Dynamic IP users:
  #
  #   If you get your IP address dynamically from SLIP, PPP, or DHCP, enable this following
  #       option.  This enables dynamic-ip address hacking in IP MASQ, making the life
  #       with Diald and similar programs much easier.
  #
  #echo "1" > /proc/sys/net/ipv4/ip_dynaddr
  # Specify your Static IP address here.



  #
  #   If you have a DYNAMIC IP address, you need to make this ruleset understand your
  #   IP address everytime you get a new IP.  To do this, enable the following one-line
  #   script.  (Please note that the different single and double quote characters MATTER).
  #
  #
  #   DHCP users:
  #   -----------
  #   If you get your TCP/IP address via DHCP, **you will need ** to enable the #ed out command
  #   below underneath the PPP section AND replace the word "ppp0" with the name of your EXTERNAL
  #   Internet connection (eth0, eth1, etc) on the lines for "ppp-ip" and "extip".  It should be
  #   also noted that the DHCP server can change IP addresses on you.  To fix this, users should
  #   configure their DHCP client to re-run the firewall ruleset everytime the DHCP lease is
  #   renewed.
  #
  #     NOTE #1:  Some newer DHCP clients like "pump" do NOT have this ability to run scripts
  #               after a lease-renew.  Because of this, you need to replace it with something
  #               like "dhcpcd" or "dhclient".
  #
  #     NOTE #2:  The syntax for "dhcpcd" has changed in recent versions.
  #
  #               Older versions used syntax like:
  #                         dhcpcd -c /etc/rc.d/rc.firewall eth0
  #
  #               Newer versions use syntax like:
  #                         dhcpcd eth0 /etc/rc.d/rc.firewall
  #
  #
  #   PPP users:
  #   ----------
  #   If you aren't already aware, the /etc/ppp/ip-up script is always run when a PPP
  #   connection comes up.  Because of this, we can make the ruleset go and get the
  #   new PPP IP address and update the strong firewall ruleset.
  #
  #   If the /etc/ppp/ip-up file already exists, you should edit it and add a line
  #   containing "/etc/rc.d/rc.firewall" near the end of the file.
  #
  #   If you don't already have a /etc/ppp/ip-up sccript, you need to create the following
  #   link to run the /etc/rc.d/rc.firewall script.
  #
  #       ln -s /etc/rc.d/rc.firewall /etc/ppp/ip-up
  #
  #   * You then want to enable the #ed out shell command below *
  #
  #
  # PPP and DHCP Users:
  # -------------------
  # Remove the # on the line below and place a # in front of the line after that.
  #
  #extip= "`/sbin/ifconfig ppp0 | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"

  # For PPP users with STATIC IP addresses:
  #
  extip="your.static.PPP.address"

  # ALL PPP and DHCP users must set this for the correct EXTERNAL interface name
  extint="ppp0"

  # Assign the internal IP
  intint="eth0"
  intnet="192.168.1.0/24"


  # MASQ timeouts
  #
  #   2 hrs timeout for TCP session timeouts
  #  10 sec timeout for traffic after the TCP/IP "FIN" packet is received
  #  60 sec timeout for UDP traffic (MASQ'ed ICQ users must enable a 30sec firewall timeout in ICQ itself)
  #
  ipchains -M -S 7200 10 60

  #############################################################################
  # Incoming, flush and set default policy of reject. Actually the default policy
  # is irrelevant because there is a catch all rule with deny and log.
  #
  ipchains -F input
  ipchains -P input REJECT

  # local interface, local machines, going anywhere is valid
  #
  ipchains -A input -i $intint -s $intnet -d 0.0.0.0/0 -j ACCEPT

  # remote interface, claiming to be local machines, IP spoofing, get lost
  #
  ipchains -A input -i $extint -s $intnet -d 0.0.0.0/0 -l -j REJECT

  # remote interface, any source, going to permanent PPP address is valid
  #
  ipchains -A input -i $extint -s 0.0.0.0/0 -d $extip/32 -j ACCEPT

  # loopback interface is valid.
  #
  ipchains -A input -i lo -s 0.0.0.0/0 -d 0.0.0.0/0 -j ACCEPT

  # catch all rule, all other incoming is denied and logged. pity there is no
  # log option on the policy but this does the job instead.
  #
  ipchains -A input -s 0.0.0.0/0 -d 0.0.0.0/0 -l -j REJECT

  #############################################################################
  # Outgoing, flush and set default policy of reject. Actually the default policy
  # is irrelevant because there is a catch all rule with deny and log.
  #
  ipchains -F output
  ipchains -P output REJECT

  # local interface, any source going to local net is valid
  #
  ipchains -A output -i $intint -s 0.0.0.0/0 -d $intnet -j ACCEPT

  # outgoing to local net on remote interface, stuffed routing, deny
  #
  ipchains -A output -i $extint -s 0.0.0.0/0 -d $intnet -l -j REJECT

  # outgoing from local net on remote interface, stuffed masquerading, deny
  #
  ipchains -A output -i $extint -s $intnet -d 0.0.0.0/0 -l -j REJECT

  # anything else outgoing on remote interface is valid
  #
  ipchains -A output -i $extint -s $extip/32 -d 0.0.0.0/0 -j ACCEPT

  # loopback interface is valid.
  #
  ipchains -A output -i lo -s 0.0.0.0/0 -d 0.0.0.0/0 -j ACCEPT

  # catch all rule, all other outgoing is denied and logged. pity there is no
  # log option on the policy but this does the job instead.
  #
  ipchains -A output -s 0.0.0.0/0 -d 0.0.0.0/0 -l -j REJECT

  #############################################################################
  # Forwarding, flush and set default policy of deny. Actually the default policy
  # is irrelevant because there is a catch all rule with deny and log.
  #
  ipchains -F forward
  ipchains -P forward DENY

  # Masquerade from local net on local interface to anywhere.
  #
  ipchains -A forward -i $extint -s $intnet -d 0.0.0.0/0 -j MASQ
  #
  # catch all rule, all other forwarding is denied and logged. pity there is no
  # log option on the policy but this does the job instead.
  #
  ipchains -A forward -s 0.0.0.0/0 -d 0.0.0.0/0 -l -j REJECT

  #End of file.



  With IPCHAINS, you can block traffic to a particular site using the
  "input", "output", and/or "forward" rules.  Remember that the set of
  rules are scanned t op to bottom and "-A" tells IPCHIANS to "append"
  this new rule to the existing set of rules.  So with this in mind, any
  specific restrictions need to come bef ore global rules. For example:

  Using "input" rules:

  Probably the fastest and most efficient method to block traffic but it
  only stops the MASQed machines and NOT the firewall machine itself. Of
  course you might want to allow that combination.

  Anyway, to block 204.50.10.13:

  In the /etc/rc.d/rc.firewall ruleset:

  ... start of "input" rules ...

  # reject and log local interface, local machines going to 204.50.10.13
  #
  ipchains -A input -s 192.168.0.0/24 -d 204.50.10.13/32 -l -j REJECT


  # local interface, local machines, going anywhere is valid
  #
  ipchains -A input -s 192.168.0.0/24 -d 0.0.0.0/0 -l -j ACCEPT


  ... end of "input" rules ...

  Using "output" rules:

  This is the slower method to block traffic because the packets must go
  through masquerading first before they are dropped.  Yet, this rule
  even stops the firewall machine from accessing the forbidden site.


  ... start of "output" rules ...

  # reject and log outgoing to 204.50.10.13
  #
  ipchains -A output -s $ppp_ip/32 -d 204.50.10.13/32 -l -j REJECT


  # anything else outgoing on remote interface is valid
  #
  ipchains -A output -s $ppp_ip/32 -d 0.0.0.0/0 -l -j ACCEPT


  ... end of "output" rules ...



  Using "forward" rules:

  Probably slower than "input" rules for blocking traffic, this still
  only stops masqueraded machines (e.g. internal machines).  The
  firewall machine can still reach forbidden site(s).



  ... start of "forward" rules ...

  # Reject and log from local net on PPP interface to 204.50.10.13.
  #
  ipchains -A forward -i ppp0 -s 192.168.0.0/24 -d 204.50.10.13/32 -l -j REJECT


  # Masquerade from local net on local interface to anywhere.
  #
  ipchains -A forward -i ppp0 -s 192.168.0.0/24 -d 0.0.0.0/0 -j MASQ

  ... end of "forward" rules ...



  No need for a special rule to allow machines on the 192.168.0.0/24
  network to go to 204.50.11.0. Why?  It is already covered by the
  global MASQ rule.

  NOTE: Unlike IPFWADM, IPCHIANS has only one way of coding the
  interfaces name.  IPCHAINS uses the "-i eth0" option where as IPFWADM
  had both "-W" for the interface name and "-V" for the interface's IP
  address.



  6.6.  IP Masquerading multiple internal networks

  Masquerading more than one internal network is fairly simple.  You
  need to first make sure that all of your networks are running
  correctly (both internal and external).  You then need to enable
  traffic to pass to both the other internal interfaces and to be MASQed
  to the Internet.


  Next, you need to enable Masquerading on the INTERNAL interfaces.
  This example shows two internal interfaces eth1 (192.168.0.1) and eth2
  (192.168.1.1) will be MASQed out of interface eth0.  In your
  rc.firewall ruleset next to the existing MASQ enable line, add the
  following:


    2.0.x kernels with IPFWADM

       #Enable internal interfaces to communication between each other
       /sbin/ipfwadm -F -a accept -V 192.168.0.1 -D 192.168.1.0/24
       /sbin/ipfwadm -F -a accept -V 192.168.1.1 -D 192.168.0.0/24

       #Enable internal interfaces to MASQ out to the Internet
       /sbin/ipfwadm -F -a masq -W eth0 -S 192.168.0.0/24 -D 0.0.0.0/0
       /sbin/ipfwadm -F -a masq -W eth0 -S 192.168.1.0/24 -D 0.0.0.0/0



    2.2.x kernels with IPCHAINS

       #Enable internal interfaces to communication between each other
       /sbin/ipchains -A forward -i eth1 -d 192.168.1.0/24
       /sbin/ipchains -A forward -i eth2 -d 192.168.0.0/24

       #Enable internal interfaces to MASQ out to the Internet
       /sbin/ipchains -A forward -j MASQ -i eth0 -s 192.168.0.0/24 -d 0.0.0.0/0
       /sbin/ipchains -A forward -j MASQ -i eth0 -s 192.168.1.0/24 -d 0.0.0.0/0



  6.7.  IP Masquerade and Dial-on-Demand Connections



  1. If you would like to setup your network to automatically dial up
     the Internet, ether the Diald demand dial-up or new versions of the
     PPPd packages will be of great utility.  Diald is the recommended
     solution due to its more granular configuration.


  2. To setup Diald, please check out the Setting Up Diald for Linux
     Page <http://home.pacific.net.sg/~harish/diald.config.html> or
     TrinityOS - Section 23
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>


  3. Once Diald and IP Masq have been setup properly, any MASQed client
     machines that initiate a web, telnet or ftp session will make the
     Linux box dynamically bring up its Internet link.


  4. There is a timeout that will occur with the first connection.  This
     is inevitable if you are using analog modems.  The time taken to
     establish the modem link and the PPP connections may cause your
     client program (WWW browser, etc.).  This isn't common though.  If
     this does happen, just retry that Internet traffic request (say a
     WWW page) again and it should come up fine.  You can also try
     setting echo "1" > /proc/sys/net/ipv4/ip_dynaddr kernel option to
     help with this initial setup.


  6.8.  IPPORTFW, IPMASQADM, IPAUTOFW, REDIR, UDPRED, and other Port
  Forwarding tools


  IPPORTFW, IPAUTOFW, REDIR, UDPRED, and other programs are generic TCP
  and/or UDP port forwarding tools for Linux IP Masquerade.  These tools
  are typically used with or as a replacement for specific IP MASQ
  modules like the current ones for FTP, Quake, etc. With port
  forwarders, you can now re-direct data connections from the Internet
  to an internal, privately addressed machine behind your IP MASQ
  server.  This forwarding ability includes network protocols such as
  TELNET, WWW, SMTP, FTP (with a special patch - see below), ICQ, and
  many others.

  NOTE:  If you are just looking to do port forwarding without IP
  Masquerading, you will STILL NEED to enable IP Masquerading in both
  the kernel AND in either your IPFWADM or IPCHAINS ruleset to then be
  able to use Linux's port forwarding tools.

  So why all the different choices?  IPAUTOFW, REDIR, and UDPRED (all
  URLs are in the ``'' section) were the first tools available to IP
  MASQ users to allow this functionality.  Later, as Linux IP Masquerade
  matured, these tools were eventually replaced by IPPORTFW which is a
  more intelligent solution.  Because of the availablity of the newer
  tools, it is *HIGHLY DISCOURAGED* to use the old tools such as
  IPAUTOFW and REDIR because they don't properly notify the Linux kernel
  of their presence and can ultimately CRASH your Linux server with
  extreme use.

  Before jumping right into installing either the 2.0.x IPPORTFW or
  2.2.x version of IPMASQADM with IPPORTFW support, network security can
  be an issue with any port forwarder.  The reason for this is because
  these tools basically create a hole in the packet firewall for the
  forwarded TCP/UDP ports.  Though this doesn't pose any threat to your
  Linux machine, it might be an issue to the internal machine that this
  traffic is being forwarded to.  No worries though, this is what Steven
  Clarke (the author of IPPORTFW) had to say about that:



               "Port Forwarding is only called within masquerading functions so it
               fits inside the same IPFWADM/IPCHAINS rules. Masquerading is an extension to
               IP forwarding. Therefore, ipportfw only sees a packet if it fits
               both the input and masquerading ipfwadm rule sets."



  With this said, it's important to have a strong firewall ruleset.
  Please see the ``'' and ``'' sections for more details on strong
  rulesets.


  So, to install IPPORTFW forwarding support for either a 2.0.x or 2.2.x
  kernel, you need to re-compile the Linux kernel to support IPPORTFW.

    2.0.x users will need to apply a simple kernel option patch (see
     below)

    2.2.x kernel users will already have the IPPORTFW kernel option
     available via IPMASQADM



  6.8.1.  IPPORTFW on 2.0.x kernels


  First, make sure you have the newest 2.0.x kernel uncompressed into
  /usr/src/linux.  If you haven't already done this, please see the ``''
  section for full details.  Next, download the "ipportfw.c" program and
  the "subs-patch-x.gz" kernel patch from the ``'' section into the
  /usr/src/ directory.

  NOTE:  Please replace the "x" in the "subs-patch-x.gz" file name with
  the most current version available on the site.


  Now, copy the IPPORTFW patch (subs-patch-x.gz) into the Linux
  directory


               cp /usr/src/subs-patch-1.37.gz /usr/src/linux



  Next, apply the kernel patch to create the IPPORTFW kernel option:


               cd /usr/src/linux
               zcat subs-patch-1.3x.gz | patch -p1



  Next, if you plan on port forwarding FTP traffic to an internal
  server, you will have to apply a NEW IP_MASQ_FTP module patch found in
  the ``'' section.  More details regarding this are later in this
  section.


  Ok, time to compile the kernel as shown in the ``'' section.  Be sure
  to say YES to the IPPORTFW option now available when you configure the
  kernel.  Once the compile is complete and you have rebooted, return to
  this section.

  Now with a newly compiled kernel, please compile and install the
  actual "IPPORTFW" program


               cd /usr/src
               gcc ipportfw.c -o ipportfw
               mv ipportfw /usr/local/sbin



  Now, for this example, we are going to allow ALL WWW Internet traffic
  (port 80) hitting your Internet TCP/IP address to then be forwarded to
  the internal Masqueraded machine at IP address 192.168.0.10.

  NOTE:  Once you enable a port forwarder on port 80, that port can no
  longer be used by the Linux IP Masquerade server.  TO be more
  specific, if you have a WWW server already running on the MASQ server
  and then you port forward port 80 to an internal MASQed computer, ALL
  internet users will see the WWW pages pages from the -INTERNAL- WWW
  server and not the pages on your IP MASQ server.  The only work around
  for this is to port forward some other port, say 8080, to your
  internal MASQ machine.  Though this will work, all Internet users will
  have to append :8080 to the URL to then contact the internal MASQed
  WWW server.

  Anyway, to enable port forwarding, edit the /etc/rc.d/rc.firewall
  ruleset.  Add the follow lines but be sure to replace the word
  "$extip" with your Internet IP address.

  NOTE:  If you use get a DYNAMIC TCP/IP address from your ISP (PPP,
  ADSL, Cablemodems, etc.), you will NEED to make your
  /etc/rc.d/rc.firewall ruleset more intelligent.  To do this, please
  see TrinityOS - Section 10
  <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri> for more
  details on strong rulesets and Dynamic IP addresses.



               /etc/rc.d/rc.firewall
               --

               #echo "Enabling IPPORTFW Redirection on the external LAN.."
               #
               /usr/local/sbin/ipportfw -C
               /usr/local/sbin/ipportfw -A -t$extip/80 -R 192.168.0.10/80

               --



  That's it!  Just re-run your /etc/rc.d/rc.firewall ruleset and test it
  out!

  If you get the error message "ipfwadm: setsockopt failed: Protocol not
  available", you AREN'T running your new kernel.  Make sure that you
  moved the new kernel over, re-run LILO, and then reboot again.


  Port Forwarding FTP servers:

  If you plan on port forwarding FTP to an internal machine, things get
  more complicated.  The reason for this is because the standard
  IP_MASQ_FTP kernel module wasn't written for this.  Fortunately, Fred
  Viles wrote a modified IP_MASQ_FTP module to make things work.  If you
  are curious what EXACTLY is the issues, download the following archive
  since Fred documents it quite well.  Also understand that this patch
  is somewhat experimental and should be treated as such.  It should be
  also noted that this patch is ONLY available for the 2.0.x kernels at
  this time.  Though some worked has already been done on a 2.2.x port,
  if you are interested in helping complete this port, please email Fred
  Viles - fv@episupport.com directly.

  So, to get the 2.0.x patch working, you need to:



    Apply the IPPORTFW kernel patch as shown earlier in this section
     FIRST.


    Download the "msqsrv-patch-36" from Fred Viles's FTP server in the
     ``'' section and put it into /usr/src/linux.


    Patch the kernel with this new code by running "cat msqsrv-patch-36
     | patch -p1"


    Next, replace the original "ip_masq_ftp.c" kernel module with the
     new one


    mv /usr/src/linux/net/ipv4/ip_masq_ftp.c
     /usr/src/linux/net/ipv4/ip_masq_ftp.c.orig

    mv /usr/src/linux/ip_masq_ftp.c
     /usr/src/linux/net/ipv4/ip_masq_ftp.c


    Lastly build and install the kernel with this new code in place.

  Once this is complete, edit the /etc/rc.d/rc.firewall ruleset and add
  the follow lines but be sure to replace the word "$extip" with your
  Internet IP address.

  NOTE:  If you use get a DYNAMIC TCP/IP address from your ISP (PPP,
  ADSL, Cablemodems, etc.), you will NEED to make your
  /etc/rc.d/rc.firewall ruleset more intelligent.  To do this, please
  see TrinityOS - Section 10
  <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri> for more
  details on strong rulesets and Dynamic IP addresses.

  This example, like above, will allow ALL FTP Internet traffic (port
  21) hitting your Internet TCP/IP address to then be forwarded to the
  internal Masqueraded machine at IP address 192.168.0.10.

  NOTE:  Once you enable a port forwarder on port 21, that port can no
  longer be used by the Linux IP Masquerade server.  To be more
  specific, if you have a FTP server already running on the MASQ server,
  a port forward will now give all Internet users the FTP files from the
  -INTERNAL- FTP server and not the files on your IP MASQ server.



               /etc/rc.d/rc.firewall
               --

               #echo "Enabling IPPORTFW Redirection on the external LAN.."
               #
               /usr/local/sbin/ipportfw -C
               /usr/local/sbin/ipportfw -A -t$extip/21 -R 192.168.0.10/21

               --



  That's it!  Just re-run your /etc/rc.d/rc.firewall ruleset and test it
  out!

  If you get the error message "ipchains: setsockopt failed: Protocol
  not available", you AREN'T running your new kernel.  Make sure that
  you moved the new kernel over, re-run LILO, and then reboot again.  If
  you are sure you are running your new kernel, run the command "ls
  /proc/net" and make sure the "ip_portfw" file exists.  If it doesn't,
  you must have made an error when configuring your kernel.  Try again.



  6.8.2.  IPMASQADM with IPPORTFW support on 2.2.x kernels


  First, make sure you have the newest 2.2.x kernel uncompressed into
  /usr/src/linux.  If you haven't already done this, please see the ``''
  section for full details.  Next, download the "ipmasqadm.c" program
  from the ``'' section into the /usr/src/ directory.

  Next, you'll need to compile the 2.2.x kernel as shown in the ``''
  section.   Be sure to say YES to the IPPORTFW option when you
  configure the kernel.  Once the kernel compile is complete and you
  have rebooted, return to this section.

  Now, compile and install the IPMASQADM tool:



               cd /usr/src
               tar xzvf ipmasqadm-x.tgz
               cd ipmasqadm-x
               make
               make install



  Now, for this example, we are going to allow ALL WWW Internet traffic
  (port 80) hitting your Internet TCP/IP address to then be forwarded to
  the internal Masqueraded machine at IP address 192.168.0.10.

  NOTE:  At this time, it is beleived that this modified IP_MASQ_FTP
  module for port forwarded FTP connections will NOT work for the 2.2.x
  kernels.  If you feel experimental, please try porting it to the 2.2.x
  kernels and email David your results.

  NOTE: Once you enable a port forwarder on port 80, that port can no
  longer be used by the Linux IP Masquerade server.  To be more
  specific, if you have a WWW server already running on the MASQ server,
  a port forward will now give all Internet users the WWW pages from the
  -INTERNAL- WWW server and not the pages on your IP MASQ server.

  Anyway, to enable port forwarding, edit the /etc/rc.d/rc.firewall
  ruleset.  Add the follow lines but be sure to replace the word
  "$extip" with your Internet IP address.

  NOTE:  If you use get a DYNAMIC TCP/IP address from your ISP (PPP,
  ADSL, Cablemodems, etc.), you will NEED to make your
  /etc/rc.d/rc.firewall ruleset more intelligent.  TO do this, please
  see TrinityOS - Section 10
  <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri> for more
  details on strong rulesets and Dynamic IP addresses.  I'll give you a
  hint though:  /etc/ppp/ip-up for PPP users.



          /etc/rc.d/rc.firewall
          --

          #echo "Enabling IPPORTFW Redirection on the external LAN.."
          #
          /usr/sbin/ipmasqadm portfw -f
          /usr/sbin/ipmasqadm portfw -a -P tcp -L $extip 80 -R 192.168.0.10 80

          --



  That's it!  Just re-run your /etc/rc.d/rc.firewall ruleset and test it
  out!

  If you get the error message "ipchains: setsockopt failed: Protocol
  not available", you AREN'T running your new kernel.  Make sure that
  you moved the new kernel over, re-run LILO, and then reboot again.  If
  you are sure you are running your new kernel, run the command "ls
  /proc/net/ip_masq" and make sure the "portfw" file exists.  If it
  doesn't, you must have made an error when configuring your kernel.
  Try again.



  6.9.  CU-SeeMe and Linux IP-Masquerade


  Linux IP Masquerade supports CuSeeme via the "ip_masq_cuseeme" kernel
  module.  This kernel modules should be loaded in the
  /etc/rc.d/rc.firewall script.  Once the "ip_masq_cuseeme" module is
  installed, you should be able to both initiate and receive CuSeeme
  connections to remote reflectors and/or users.

  NOTE:  It is recommended to use the IPPORTFW tool instead of the old
  IPAUTOFW tool for running CuSeeme.

  If you need more explicit information on configuring CuSeeme, see
  Michael Owings's CuSeeMe page <http://www.swampgas.com/vc/ipmcus.htm>
  for a Mini-HOWTO or The IP Masquerade Resources for a mirror of the
  Mini-HOWTO.



  6.10.  Mirabilis ICQ

  There are two methods of getting ICQ to work behind a Linux MASQ
  server.  One solution is to use a new ICQ Masq module and the other
  solution is to use IPPORTFW.

  The ICQ module has some benefits.  It allows for simple setup of
  multiple ICQ users behind a MASQ server.  It also doesn't require any
  special changes to the ICQ client(s).  Recently, the 2.2.x version of
  the module was updated to support file transfer and read-time chat.
  Yet, for the 2.0.x kernel module, file transfers and real-time chat
  still isn't fully supported.  Anyway, I now feel this is the PREFERRED
  method to get ICQ working with IP Masq running on 2.2.x+ kernels.


  With the IPPORTFW setup, you will have to make some changes on both
  Linux and ICQ clients but all ICQ messaging, URLs, chat, file
  transfer, etc. work.

  If you are interested in Andrew Deryabin's djsf@usa.net ICQ IP Masq
  module for the 2.2.x kernels.  Please see the ``'' section for
  details.

  If you rather use the classic method of getting ICQ to run behind a
  MASQ server, follow these steps:

    First, you need to be running a Linux kernel with IPPPORTFW
     enabled.  Please see the ``'' section for more details.


    Next, you need to add the following lines to your
     /etc/rc.d/rc.firewall file.  This example assumes that 10.1.2.3 is
     your external Internet IP address and your internal MASQed ICQ
     machine is 192.168.0.10:

     The following example is for a 2.0.x kernel with IPFWADM:


       I have included two examples here for the user:  Either once works
       fine:

       Example #1
       --
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2000 -R 192.168.0.10/2000
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2001 -R 192.168.0.10/2001
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2002 -R 192.168.0.10/2002
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2003 -R 192.168.0.10/2003
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2004 -R 192.168.0.10/2004
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2005 -R 192.168.0.10/2005
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2006 -R 192.168.0.10/2006
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2007 -R 192.168.0.10/2007
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2008 -R 192.168.0.10/2008
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2009 -R 192.168.0.10/2009
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2010 -R 192.168.0.10/2010
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2011 -R 192.168.0.10/2011
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2012 -R 192.168.0.10/2012
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2013 -R 192.168.0.10/2013
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2014 -R 192.168.0.10/2014
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2015 -R 192.168.0.10/2015
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2016 -R 192.168.0.10/2016
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2017 -R 192.168.0.10/2017
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2018 -R 192.168.0.10/2018
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2019 -R 192.168.0.10/2019
       /usr/local/sbin/ipportfw -A -t10.1.2.3/2020 -R 192.168.0.10/2020
       --

       Example #2
       --
       port=2000
       while [ $port -le 2020 ]
         do
             /usr/local/sbin/ipportfw -A t10.1.2.3/$port -R 192.168.0.10/$port
             port=$((port+1))
         done
       --



  The following example is for a 2.2.x kernel with IPCHAINS:



    I have included two examples here for the user:  Either once works
    fine:

    Example #1
    --
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2000 -R 192.168.0.10 2000
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2001 -R 192.168.0.10 2001
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2002 -R 192.168.0.10 2002
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2003 -R 192.168.0.10 2003
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2004 -R 192.168.0.10 2004
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2005 -R 192.168.0.10 2005
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2006 -R 192.168.0.10 2006
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2007 -R 192.168.0.10 2007
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2008 -R 192.168.0.10 2008
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2009 -R 192.168.0.10 2009
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2010 -R 192.168.0.10 2010
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2011 -R 192.168.0.10 2011
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2012 -R 192.168.0.10 2012
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2013 -R 192.168.0.10 2013
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2014 -R 192.168.0.10 2014
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2015 -R 192.168.0.10 2015
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2016 -R 192.168.0.10 2016
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2017 -R 192.168.0.10 2017
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2018 -R 192.168.0.10 2018
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2019 -R 192.168.0.10 2019
    /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 2020 -R 192.168.0.10 2020
    --

    Example #2
    --
    port=2000
    while [ $port -le 2020 ]
      do
          /usr/local/sbin/ipmasqadm portfw -a -P tcp -L 10.1.2.3 $port -R 192.168.0.10 $port
          port=$((port+1))
      done
    --



    Once your new rc.firewall is ready, reload the ruleset to make sure
     things are ok by simple typing in "/etc/rc.d/rc.firewall".  If you
     get any errors, you either don't have IPPORTFW support in the
     kernel or you made a typo in the rc.firewall file.


    Now, in ICQ's Preferences-->Connection, configure it to be "Behind
     a LAN" and "Behind a firewall or Proxy".  Now, click on "Firewall
     Settings" and configure it to be "I don't use a SOCK5 proxy".  Also
     note that it was repviously recommended to change ICQ's "Firewall
     session timeouts" to "30" seconds BUT many users have found that
     ICQ becomes unreliable.  It has been found that ICQ is more
     reliable with its stock timeout setting (don't enable that ICQ
     option) and simply change MASQ's timeout to 160 seconds.  You can
     see how to change this timeout in the ``'' and ``'' rulesets.
     Finally, click on Next and configure ICQ to "Use the following TCP
     listen ports.." from "2000" to "2020".  Now click done.

     Now ICQ will tell you that you have to restart ICQ for the changes
     to take effect.  To be honest, I had to REBOOT the Windows9x
     machine to get things to work right but other people say otherwise.
     So.. try it both ways.


    It should also be noted that one user told me that simply
     portforwarding port 4000 to his ICQ machine worked best. He
     reported that everything worked fine (chat, file transfers, etc)
     WITHOUT re-configuring ICQ from its default settings.  Your mileage
     might vary on this topic but I though you might like to hear about
     this alternative configuration.



  6.11.  Gamers:  The LooseUDP patch


  The LooseUDP patch allows NAT-friendly games that usually use UDP
  connections to both WORK and perform quite well behind a Linux IP
  Masquerade server.  Currently, LooseUDP is available as a patch for
  2.0.36+ kernels and it is already built into 2.2.3+ kernels.  To get
  this running, only a few things are required:


    Have the newest 2.0.x kernel sources uncompressed in the
     /usr/src/linux directory


    ABSOLUTELY REQUIRED for v2.0.x:  Download and install the IPPORTFW
     patch from the ``'' section and as described in the ``'' Section of
     the HOWTO.


    Download the LooseUDP patch from the ``'' section

  Now, put the LooseUDP patch in the /usr/src/linux directory.   Once
  this is done, type in:


       For a compressed patch file:  zcat loose-udp-2.0.36.patch.gz | patch
       -p1



       For a NON-compressed patch file:  cat loose-udp-2.0.36.patch | patch
       -p1


  Now, depending on your version of "patch", You will then see the
  following text:



       patching file `CREDITS'
       patching file `Documentation/Configure.help'
       patching file `include/net/ip_masq.h'
       patching file `net/ipv4/Config.in'
       patching file `net/ipv4/ip_masq.c'



  If you see the text "Hunk FAILED" only ONCE and ONLY ONCE at the very
  beginning of the patching, don't be alarmed.  You probably have an old
  patch file (this as been fixed) but it still works.  If it fails
  completely, make sure you have applied the IPPORTFW kernel patch
  FIRST.

  Once the patch is installed, re-configure the kernel as shown in the
  ``'' section and be sure to say "Y" to the "IP: loose UDP port
  managing (EXPERIMENTAL) (CONFIG_IP_MASQ_LOOSE_UDP) [Y/n/?]" option.
  Once you are running the new LooseUDP enabled kernel, you should be
  good to go for most NAT-friendly games.  Some URLs have been given for
  patches to make games like BattleZone and others NAT friendly.  Please
  see the ``'' section for more details.



  7.  Frequently Asked Questions



  If you can think of any useful FAQ suggestions, please send it to
  ambrose@writeme.com and dranch@trinnet.net.  Please clearly state the
  question and an appropriate answer (if you have it).  Thank you!



  7.1.  What Linux Distributions support IP Masquerading out of the box?

  If your Linux distribution doesn't support IP MASQ out of the box,
  don't worry.  All you have to do is re-compile a kernel as shown above
  in this HOWTO.

  NOTE:  If you can help us fill out this table, please email
  ambrose@writeme.com or dranch@trinnet.net.


    Caldera       < v1.2   : NO  - ?

    Caldera         v1.3   : YES - 2.0.35 based

    Caldera         v2.2   : YES - 2.2.5 based

    Caldera eServer v2.3   : YES - ? based

    Debian          v1.3   : NO  - ?

    Debian          v2.0   : NO  - ?

    Debian          v2.1   : YES - 2.2.1 based

    Debian          v2.2   : YES - 2.2.15 based

    DLX Linux       v?     :  ?  - ?

    DOS Linux       v?     :  ?  - ?

    FloppyFW              v1.0.2 :  ?  - ?

    Hal91 Linux     v?     :  ?  - ?

    Linux Mandrake  v5.3   : YES - ?

    Linux Mandrake  v6.0   : YES - 2.2.5 based

    Linux PPC       vR4    :  NO - ?

    Linux Pro       v?     :  ?  - ?

    LinuxWare       v?     :  ?  - ?

    Mandrake        v6.0   : YES - ?

    Mandrake        v6.1   : YES - ?

    Mandrake        v7.0   : YES - 2.2.14

    MkLinux         v?     :  ?  - ?

    MuLinux         v3rl   : YES - ?

    Redhat        < v4.x   : NO  - ?

    Redhat          v5.0   : YES - ?

    Redhat          v5.1   : YES - 2.0.34 based

    Redhat          v5.2   : YES - 2.0.36 based

    Redhat          v6.0   : YES - 2.2.5 based

    Redhat          v6.1   : YES - 2.2.12 based

    Slackware       v3.0   :  ?  - ?

    Slackware       v3.1   :  ?  - ?

    Slackware       v3.2   :  ?  - ?

    Slackware       v3.3   :  ?  - 2.0.34 based

    Slackware       v3.4   :  ?  - ?

    Slackware       v3.5   :  ?  - ?

    Slackware       v3.6   :  ?  - ?

    Slackware       v3.9   :  ?  - 2.0.37pre10 based

    Slackware       v4.0   :  ?  - ?

    Slackware       v7.0   : YES - 2.2.13 based

    Stampede Linux  v?     :  ?  - ?

    SuSE            v5.2   : YES - ?

    SuSE            v5.3   : YES - ?

    SuSE            v6.0   : YES - ?

    SuSE            v6.1   : YES - 2.2.5 based

    SuSE            v6.3   : YES - 2.2.13 based

    Tomsrbt Linux   v?     :  ?  - ?

    TurboLinux Lite v4.0   : YES - ?

    TurboLinux v6.0        : YES - 2.2.12 based

    TriLinux        v?     :  ?  - ?

    Yggdrasil Linux v?     :  ?  - ?



  7.2.  What are the minimum hardware requirements and any limitations
  for IP Masquerade?  How well does it perform?


  A 486/66 box with 16MB of RAM was more than sufficient to fill a
  1.54Mb/s T1 100%!  MASQ has also be known run quite well on 386SX-16s
  with 8MB or RAM.  Yet, it should be noted that Linux IP Masquerade
  starts thrashing with more than 500 MASQ entries.

  The only application that I known that can temporarily break Linux IP
  Masquerade is GameSpy.  Why?  When it refreshes its lists, it creates
  10,000s of quick connections in a VERY short time.  Until these
  sessions timeout, the MASQ tables become "FULL".  See the ``'' section
  of the FAQ for more details.


  While we are at it:

  There is a hard limit of 4096 concurrent connections each for TCP &
  UDP.  This limit can be changed by fiddling the values in
  /usr/src/linux/net/ipv4/ip_masq.h - a upwards limit of 32000 should by
  OK.  If you want to change the limit - you need to change the
  PORT_MASQ_BEGIN & PORT_MASQ_END values to get an appropriately sized
  range above 32K and below 64K.



  7.3.  I've checked all my configurations, I still can't get IP Mas
  querade to work.  What should I do?


    Stay calm.  Get yourself a cup of tea, coffee, soda, etc., and have
     a rest.  Once your mind is clear, try the suggestions mentioned
     below.  Setting up Linux IP Masquerading is NOT hard but there are
     several concepts that will be new to you.


    Again, go through all the steps in the ``'' section.  99% of all
     first-time Masquerade users who have problems haven't looked here.


    Check the IP Masquerade Mailing List Archives
     <http://www.indyramp.com/lists/masq/>, most likely your question or
     problem is a common one and can be found in a simple Archive
     search.


    Check out the TrinityOS
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>
     document.  It covers IP Masquerading for both the 2.0.x and 2.2.x
     kernels and MANY other topics including PPPd, DialD, DHCP, DNS,
     Sendmail, etc.


    Make sure that you aren't running ROUTED or GATED.  To verify, run
     "ps aux | grep -e routed -e gated"


    Post your question to the IP Masquerade Mailing List (see next the
     FAQ section for details).  Please only use this if you cannot find
     the answer from the IP Masquerading Archive.  Be sure to include
     all the information requested in the ``'' section in your email!!


    Post your question to a related Linux NNTP newsgroup.


    Send email to ambrose@writeme.com and dranch@trinnet.net.   You
     have a better chance of getting a reply from the IP Masquerading
     Email list than either of us.
    Check your configurations again :-)


  7.4.  How do I join or view the IP Masquerade and/or IP Masqurade
  Developers mailing lists and archives?

  There are two ways to join the two Linux IP Masquerading mailing
  lists.  The first way is to send an email to masq-
  request@indyramp.com.  To join the Linux IP Masquerading Developers
  mailing list, send an email to masq-dev-request@indyramp.com.  Please
  see the bullet below for more details.


    Subscribe via email:  Now put the word "subscribe" in either the
     subject or body of the e-mail message.  If you want to only
     subscribe to the Digest version of either the main MASQ or MASQ-DEV
     list (all e-mails on the given list during the week are sent to you
     in one big email), put the words "subscribe digest" instead in
     either the subject or body of the e-mail message.

     Once the server receives your request, it will subscribe you to
     your requested list and give you a PASSWORD.  Save this password as
     you will needed to to later unsubscribe from the list or change
     your options.

  The second method is to use a WWW browser and subscribe via a form at
  http://www.indyramp.com/masq-list/ for the main MASQ list or
  http://www.indyramp.com/masq-dev-list/ for the MASQ-DEV list.


  Once subscribed, you will get emails from your subscribed list.  It
  should be also noted that both subscribed and NON-subscribed users can
  access the two list's archives.  To do this, please see the above two
  WWW URLs for more details.

  Lastly, please note that you can only post to the MASQ list from an
  account/address you originally subscribed from.

  If you have any problem regarding the mailing lists or the mailing
  list archive, please contact Robert Novak.

  7.5.  How does IP Masquerade differ from Proxy or NAT services?



  Proxy:  Proxy servers are available for: Win95, NT, Linux, Solaris, etc.

                  Pro:    + (1) IP address ; cheap
                          + Optional caching for better performance (WWW, etc.)

                  Con:    - All applications behind the proxy server must both SUPPORT
                            proxy services (SOCKS) and be CONFIGURED to use the Proxy
                            server
                          - Screws up WWW counters and WWW statistics

           A proxy server uses only (1) public IP address, like IP MASQ, and acts
           as a translator to clients on the private LAN (WWW browser, etc.).
           This proxy server receives requests like TELNET, FTP, WWW,
           etc. from the private network on one interface.  It would then in turn,
           initiate these requests as if someone on the local box was making the
           requests.   Once the remote Internet server sends back the requested
           information, it would re-translate the TCP/IP addresses back to the
           internal MASQ client and send traffic to the internal requesting host.
           This is why it is called a PROXY server.

                  Note:  ANY applications that you might want to use on the
                          internal machines *MUST* have proxy server support
                          like Netscape and some of the better TELNET and FTP
                          clients.  Any clients that don't support proxy servers
                          won't work.

           Another nice thing about proxy servers is that some of them
           can also do caching (Squid for WWW).  So, imagine that you have 50
           proxied hosts all loading Netscape at once.  If they were installed
           with the default homepage URL, you would have 50 copies of the same
           Netscape WWW page coming over the WAN link for each respective computer.
           With a caching proxy server, only one copy would be downloaded by the proxy
           server and then the proxied machines would get the WWW page from the
           cache.  Not only does this save bandwidth on the Internet connection,
           it will be MUCH MUCH faster for the internal proxied machines.



  MASQ:    IP Masq is available on Linux and a few ISDN routers such
   or      as the Zytel Prestige128, Cisco 770, NetGear ISDN routers, etc.
  1:Many
   NAT
                  Pro:    + Only (1) IP address needed (cheap)
                          + Doesn't require special application support
                          + Uses firewall software so your network can become
                            more secure

                  Con:    - Requires a Linux box or special ISDN router
                            (though other products might have this..  )
                          - Incoming traffic cannot access your internal LAN
                            unless the internal LAN initiates the traffic or
                            specific port forwarding software is installed.
                            Many NAT servers CANNOT provide this functionality.
                          - Special protocols need to be uniquely handled by
                            firewall redirectors, etc.  Linux has full support
                            for this (FTP, IRC, etc.) capabilty but many routers
                            do NOT (NetGear DOES).

           Masq or 1:Many NAT is similar to a proxy server in the sense that the
           server will do IP address translating and fake out the remote server
           (WWW for example) as if the MASQ server made the request instead of an
           internal machine.

           The major difference between a MASQ and PROXY server is that MASQ servers
           don't need any configuration changes to all the client machines.  Just
           configure them to use the linux box as their default gateway and everything
           will work fine.  You WILL need to install special Linux modules for things
           like RealAudio, FTP, etc. to work)!

           Also, many people use IP MASQ for TELNET, FTP, etc. *AND* also setup a caching
           proxy on the same Linux box for WWW traffic for the additional performance.


  NAT:     NAT servers are available on Windows 95/NT, Linux, Solaris, and some of the
           better ISDN routers (not Ascend)

                  Pro:    + Very configurable
                          + No special application software needed

                  Con:    - Requires a subnet from your ISP (expensive)

           Network Address Translation is a name for a box that would have a pool of
           valid IP addresses on the Internet interface that it can use.  When on the
           Internal network wanted to goto the Internet, it associates an available
           VALID IP address from the Internet interface to the original requesting PRIVATE
           IP address.  After that, all traffic is re-written from the NAT public IP
           address to the NAT private address.  Once the associated PUBLIC NAT address
           becomes idle for some pre-determined amount of time, the PUBLIC IP address
           is returned back into the public NAT pool.

           The major problem with NAT is, once all of the free public IP addresses are
           used, any additional private users requesting Internet service are out of
           luck until a public NAT address becomes free.



  7.6.  Are there any GUI firewall creation/management tools?


  Yes!  They vary in user interface, complexity, etc. but they are quite
  good though most are only for the IPFWADM tool so far.  Here is a
  short list of available tools in alphabetical order.  If you know of
  any others or have any thoughts on which ones are good/bad/ugly,
  please email David.


    John Hardin's IPFWADM Dot file generator - a IPCHAINS version is in
     the works


    Sonny Parlin's FWCONFIG
     <http://www.mindstorm.com/~sparlin/fwconfig.shtml> for IPFWADM and
     IPCHAINS


    William Stearns's Mason <http://www.pobox.com/~wstearns/mason/> - A
     Build-a-ruleset on-the-fly type system



  7.7.  Does IP Masquerade work with dynamically assigned IP addresses?

  Yes, it works with either dynamic IP addressed assigned by your ISP
  via either PPP or a DHCP/BOOTp server.  As long as you have an valid
  Internet IP address, it should work.  Of course, static IP works too.
  Yet, if you plan on implementing a strong IPFWADM/IPCHAINS ruleset
  and/or plan on using a Port forwarder, your ruleset will have to be
  re-executed everytime your IP address changes.  Please see the top of
  TrinityOS - Section 10
  <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri> for
  additional help with strong firewall rulesets and Dynamic IP
  addresses.


  7.8.  Can I use a cable modem (both bi-directional and with modem
  returns), DSL, satellite link, etc. to connect to the Internet and use
  IP Masquerade?


  Yes, as long as Linux supports that network interface, it should work.
  If you receive a dynamic IP address, please see the URL under the
  "Does IP Masquerade work with dynamically assigned IP" FAQ item above.


  7.9.  Can I use Diald or the Dial-on-Demand feature of PPPd with IP
  MASQ?


  Definitely!  IP Masquerading is totally transparent to Diald or PPP.
  The only thing that might become an issue is if you use STRONG
  firewall rulesets with dynamic IP addresses.  See the FAQ item, "Does
  IP Masquerade work with dynamically assigned IP addresses?" above for
  more details.


  7.10.  What applications are supported with IP Masquerade?

  It is very difficult to keep track of a list of "working
  applications".  However, most of the normal Internet applications are
  supported, such as WWW browsing (Netscape, MSIE, etc.), FTP (such as
  WS_FTP), TELNET, SSH, RealAudio, POP3 (incoming email - Pine, Eudora,
  Outlook), SMTP (outgoing email), etc.  A somewhat more complete list
  of MASQ-compatible clients can be found in the ``'' section of this
  HOWTO.

  Applications involving more complicated protocols or special
  connection methods such as video conferencing software need special
  helper tools.

  For more detail, please see the Linux IP masquerading Applications
  <http://www.tsmservices.com/masq> page.


  7.11.  How can I get IP Masquerade running on Redhat, Debian, Slack
  ware, etc.?

  No matter what Linux distribution you have, the procedures for setting
  up IP Masquerade mentioned in this HOWTO should apply.  Some
  distributions may have GUI or special configuration files that make
  the setup easier.  We try our best to write the HOWTO as general as
  possible.



  7.12.  TELNET connections seem to break if I don't use them often.
  Why is that?

  IP Masq, by default, sets its timers for TCP session, TCP FIN, and UDP
  traffic to 15 minutes.  It is recommend to use the following settings
  (as already shown in this HOWTO's /etc/rc.d/rc.firewall ruleset) for
  most users:

  Linux 2.0.x with IPFWADM:



  # MASQ timeouts
  #
  #   2 hrs timeout for TCP session timeouts
  #  10 sec timeout for traffic after the TCP/IP "FIN" packet is received
  #  60 sec timeout for UDP traffic (MASQ'ed ICQ users must enable a 30sec firewall timeout in ICQ itself)
  #
  /sbin/ipfwadm -M -s 7200 10 60



  Linux 2.2.x with IPCHAINS:


  # MASQ timeouts
  #
  #   2 hrs timeout for TCP session timeouts
  #  10 sec timeout for traffic after the TCP/IP "FIN" packet is received
  #  60 sec timeout for UDP traffic (MASQ'ed ICQ users must enable a 30sec firewall timeout in ICQ itself)
  #
  /ipchains -M -S 7200 10 60



  7.13.  When my Internet connection first comes up, nothing works.  If
  I try again, everything then works fine.  Why is this?

  The reason is because you have a dynamic IP address and when your
  Internet connection first comes up, IP Masquerade doesn't know its IP
  address.  There is a solution to this.  In your /etc/rc.d/rc.firewall
  ruleset, add the following:


  # Dynamic IP users:
  #
  #   If you get your IP address dynamically from SLIP, PPP, or DHCP, enable this following
  #       option.  This enables dynamic-ip address hacking in IP MASQ, making the life
  #       with Diald and similar programs much easier.
  #
  echo "1" > /proc/sys/net/ipv4/ip_dynaddr



  7.14.  IP MASQ seems to be working fine but some sites don't work.
  This usually happens with WWW and FTP.

  There is two possible reasons for this.  The first one is VERY common
  and the second is very UNCOMMON.


    As of the 2.0.38 and 2.2.9+ Linux kernels, there is a an elusive
     BUG in the Masquerade code that has problems with packets that have
     the DF or "Don't Fragment" bit set.  Basically, when a MASQ box
     connect to the Internet with an MTU of anything less than 1500,
     some packets will have the DF field set.  Though changing the MTU
     1500 on the Linux box will seemingly fix the problem, the bug is
     still there.  What is believed to be happening is that the MASQ
     code is not properly re-writing the returning ICMP packets with the
     ICMP 3 sub 4 code back to the originating MASQed computer.  Because
     of this, the packets get dropped.  If you are a network programmer
     and you think you can fix this.. PLEASE TRY!

     No worries though.  A perfectly good workaround is to change your
     Internet link's MTU to 1500.  Now some users will balk at this
     because it can hurt some latency specific programs like TELNET and
     games but the impact is only slight.  On the flip site, most HTTP
     and FTP traffic will SPEED UP!

     To fix this, first see what your MTU for your Internet link is now.
     To do this, run "/bin/ifconfig".  Now look at the lines that
     corresponds to your Internet connection and look for the MTU.  This
     NEEDs to be set to 1500.  Usually, Ethernet links will default to
     this but PPP will default to 576.


    To fix the MTU issue on your PPP link, edit your /etc/ppp/options
     file and towards the top, add the lines "mtu 1500" and "mru 1500".
     Save your new changes and then restart PPP.  Like above, verify
     that your PPP link now has the correct MTU and MTU.


    To fix the MTU issue on your Ethernet link to your ADSL,
     Cablemodem, etc, you need to edit your network startup scripts.
     Please see the TrinityOS - Section 16
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri> document
     for network optimizations.


    Lastly, though this isn't a common problem, some people have found
     this is their solution.  With PPP users, what port is your PPPd
     code connecting to?  A /dev/cua* port or a /dev/ttyS* port?  It
     NEEDS to be a /dev/ttyS* port.  The cua style is OLD and it breaks
     some things in very odd ways.



  7.15.  MASQed FTP clients don't work.

  Check to see that the "ip_masq_ftp" module is loaded.  To do this, log
  into the MASQ server and run the command "/sbin/lsmod".  If you don't
  see the "ip_masq_ftp" module loaded, make sure that you followed the
  BASIC /etc/rc.d/rc.firewall recommendations found in ``'' section.  If
  you are implimenting your own ruleset, make sure you at include most
  of the examples from the HOWTO or you will have lots of continuing
  problems.


  7.16.  IP Masquerading seems slow

  There might be a few reasons for this:

    Ethernet attached setups (DSL, Cablemodem, LANs, etc)


    Make sure you don't have both your INTERNAL and EXTERNAL networks
     running on the same network card with the "IP Alias" feature.  If
     you ARE doing this, it can be made to work but it will be
     excessively slow due to high levels of collisions, IRQ usage, etc.
     It is highly recommended to get another network card so that the
     internal and external networks have their own interface.

     Make sure you have the right Ethernet settings for both SPEED and
     DUPLEX.


    Some 10Mb/s Ethernet cards and most 100Mb/s cards support FULL
     Duplex connections.  Direct connections from Ethernet card to, say,
     DSL modem (without any hubs in between) *CAN* be set to FULL DUPLEX
     but only if the DSL modem supports it.  You should also be sure
     that you have Ethernet cables with all eight wires used and they
     are good quality.

    Internal networks that use HUBs -cannot- use Full Duplex.  You need
     either a 10 or 100Mb.s Ethernet SWITCH to be able to do this.

    Both auto 10/100Mb/s SPEED negotiation and Full/Half DUPLEX
     negotiation on Ethernet cards can wreck havoc on networks.  I
     recommend to hard code both the NIC speed and duplex into the
     NIC(s) if possible.  This is directly possible via Linux NIC kernel
     modules but isn't directly possible in monolithic kernels.  You
     will need to either use MII utililies from ``'' or hardcode the
     kernel source.


    Serial based modem users with PPP


    If you have an external modem, make sure you have a good serial
     cable.  Also, many PCs have cheesy ribbon cables connecting the
     serial port from the motherboard or I/O card to the serial port
     connection.  If you have one of these, make sure it is in good
     condition.  Personally, I have ferrite coils (those grey-black
     metal like rings) around ALL of my ribbon cables.


    Make sure your MTU is set to 1500 as described in the FAQ section
     of this HOWTO above


    Make sure that your serial port is a 16550A or better UART.  Run
     "dmesg | more" to verify


    Setup IRQ-Tune for your serial ports


    On most PC hardware, the use of Craig Estey's IRQTUNE
     <http://www.best.com/~cae/irqtune/> tool and significantly increase
     serial port performance including SLIP and PPP connections.


    Make sure that your serial port for your PPP connection is running
     at 115200 (or faster if both your modem and serial port can handle
     it.. a.k.a  ISDN terminal adapters)


    2.0.x kernels:  The 2.0.x kernels are kind of an odd ball because
     you can't directly tell the kernel to clock the serial ports at
     115200.  So, in one of your startup scripts like the
     /etc/rc.d/rc.local or /etc/rc.d/rc.serial file, execute the
     following commands for a modem on COM2:


    setserial /dev/ttyS1 spd_vhi


    In your PPPd script, edit the actual pppd execution line to include
     the speed "38400" per the pppd man page.


    2.2.x kernels:  Unlike the 2.0.x kernels, both the 2.1.x and 2.2.x
     kernels don't have this "spd_vhi" issue.



    So, in your PPPd script, edit the actual pppd execution line to
     include the speed "115200" per the pppd man page.


    All interface types:


    Set the TCP Sliding window to at least 8192


    Though this is COMPLETELY out of the scope of this document, this
     helps QUITE A BIT on ANY network link you have be it an internal or
     external PPP, Ethernet, TokenRing, etc. link.  For more details,
     check out the Network Optimization section of TrinityOS - Section
     16 for full details.


  7.17.  Now that I have IP Masquerading up, I'm getting all sorts of
  weird notices and errors in the SYSLOG log files.  How do I read the
  IPFWADM/IPCHAINS firewall errors?

  There is probably two common things that you are going to see:

    MASQ: Failed TCP Checksum error:  You will see this error when a
     packet coming from the Internet gets corrupt in the data section of
     the packet but the rest of it "seems" ok.  When the Linux box
     receives this packet, it will calculate the CRC of the packet and
     determine that its corrupt.  On most machines running OSes like
     Microsoft Windows, they just silently drop the packets but Linux IP
     MASQ reports it.  If you get a LOT of them over your PPP link,
     first follow the FAQ entry above for "Masq is slow".


    If all of those tips don't help, try adding the line "-vj" to your
     /etc/ppp/options file and restart PPPd.


    Firewall hits:  Being on the Internet with a decent firewall, you
     are going to be surprised how many people are going to try to get
     into your Linux box!  So what do all these firewall logs mean?

     From the TrinityOS - Section 10
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri> doc:



             In the below rulesets, any lines that either DENY or REJECT any
             traffic also have a "-o" to LOG this firewall hit to the SYSLOG
             messages file found either in:

                     Redhat:         /var/log
                     Slackware:      /var/adm

             If you look at one of these firewall logs, do would see something like:

             ---------------------------------------------------------------------
             IPFWADM:
             Feb 23 07:37:01 Roadrunner kernel: IP fw-in rej eth0 TCP 12.75.147.174:1633
                100.200.0.212:23 L=44 S=0x00 I=54054 F=0x0040 T=254

             IPCHAINS:
             Packet log: input DENY eth0 PROTO=17 12.75.147.174:1633 100.200.0.212:23
               L=44 S=0x00 I=54054 F=0x0040 T=254
             ---------------------------------------------------------------------

       There is a LOT of information in this just one line.  Lets break out this example
       so refer back to the original firewall hit as you read this.  Please note that this
       example is for IPFWADM though it is DIRECTLY readable for IPCHAINS users.

             --------------

             - This firewall "hit" occurred on "Feb 23 07:37:01"

             - This hit was on the "RoadRunner" computer.

             - This hit occurred on the "IP" or TCP/IP protocol

             - This hit came IN to ("fw-in") the firewall
                     * Other logs can say "fw-out" for OUT or "fw-fwd" for FORWARD

             - This hit was then "rejECTED".
                     * Other logs can say "deny" or "accept"

             - This firewall hit was on the "eth0" interface (Internet link)

             - This hit was a "TCP" packet

             - This hit came from IP address "12.75.147.174" on return port "1633".

             - This hit was addressed to "100.200.0.212" on port "23" or TELNET.
                     * If you don't know that port 23 is for TELNET, look at your
                              /etc/services file to see what other ports are used for.

             - This packet was "44" bytes long

             - This packet did NOT have any "Type of Service" (TOS) set
                     --Don't worry if you don't understand this.. not required to know
                     * divide this by 4 to get the Type of Service for ipchains users

             - This packet had the "IP ID" number of "18"
                     --Don't worry if you don't understand this.. not required to know

             - This packet had a 16bit fragment offset including any TCP/IP packet
               flags of "0x0000"
                     --Don't worry if you don't understand this.. not required to know
                     * A value that started with "0x2..." or "0x3..." means the "More
                       Fragments" bit was set so more fragmented packet will be coming in
                       to complete this one BIG packet.
                     * A value which started with "0x4..." or "0x5..." means that the
                       "Don't Fragment" bit is set.
                     * Any other values is the Fragment offset (divided by 8) to be later
                       used to recombine into the original LARGE packet
             - This packet had a TimeToLive (TTL) of 20.
                     * Every hop over the Internet will subtract (1) from this number.  Usually,
                       packets will start with a number of (255) and if that number ever reaches
                       (0), it means that realistically the packet was lost and will be deleted.



  7.18.  Can I configure IP MASQ to allow Internet users to directly
  contact internal MASQed servers?

  Yes!  With IPPORTFW, you can allow ALL or only a select few Internet
  hosts to contact ANY of your internal MASQed computers.  This topic is
  completely covered in the ``'' section of this HOWTO.



  7.19.  I'm getting "kernel: ip_masq_new(proto=UDP): no free ports." in
  my SYSLOG files.  Whats up?

  One of your internal MASQed machine is creating an abnormally high
  number of packets destined for the Internet.  As the IP Masq server
  builds the MASQ table and forwards these packets out over the
  Internet, the table is quickly filling.  Once the table is full, it
  will give you this error.

  The only application that I known that temporarily creates this
  situation is a gaming program called "GameSpy".  Why?  Gamespy builds
  a server list and then pings all of the servers in the list (1000s of
  game servers).  By creating all these pings, it creates 10,000s of
  quick connections in a VERY short time.  Until these sessions timeout
  via the IP MASQ timeouts, the MASQ tables become "FULL".

  So what can you do about it?  Realistically, don't use programs that
  do things like this.  If you do get this error in your logs, find it
  and stop using it.  If you really like GameSpy, just don't do a lot of
  server refreshes.  Regardless, once you stop running this MASQ'ed
  program, this MASQ error will go away as these connections timeout in
  the MASQ tables.


  7.20.  I'm getting "ipfwadm: setsockopt failed: Protocol not avail
  able" when I try to use IPPORTFW!

  If you get the error message "ipfwadm: setsockopt failed: Protocol not
  available", you AREN'T running your new kernel.  Make sure that you
  moved the new kernel over, re-run LILO, and then reboot again.

  Please see the end of the ``'' section for full details.


  7.21.  Microsoft File and Print Sharing and Microsoft Domain clients
  (SAMBA) don't work through IP Masq!

  To properly support Microsoft's SMB protocol, a IP Masq module would
  need to be written but there are three viable work-arounds.  For more
  detail, please see this Microsoft KnowledgeBase article.

  The first work-around is to configure IPPORTFW from the ``'' section
  and portfw TCP ports 137, 138, and 139 to the internal Windows
  machine's IP address.  Though this solution works, it will only works
  for ONE internal machine.
  The second solution is to install and configure Samba on the Linux
  MASQ server.  With Samba running, you can then map your internal
  Windows File and Print shares onto the Samba server.  Then, you can
  mount these newly mounted SMB shares to all of your external clients.
  Configuring Samba is fully covered in a HOWTO found in a Linux
  Documentation Project and in the TrinityOS document as well.

  The third solution is to configure a VPN (virtual private network)
  between the two Windows machines or between the two networks.  This
  can either be done via the PPTP or IPSEC VPN solutions.  There is a
  ``'' patch for Linux and also a full IPSEC implimentation available
  for both 2.0.x and 2.2.x kernels.  This solution will probably be the
  most reliable and secure method of all three solutions.

  All of these solutions are NOT covered by this HOWTO.  I recommend
  that you look at the TrinityOS documentation for IPSEC help and JJohn
  Hardin's PPTP page for more information.

  Also PLEASE understand that Microsoft's SMB protocol is VERY insecure.
  Because of this, running either Microsoft File and Print sharing or
  Windows Domain login traffic over the Internet without any encryption
  is a VERY BAD idea.



  7.22.  IRC won't work properly for MASQed IRC users.  Why?

  The main possible reason is because most common Linux distribution's
  IDENT or "Identity" servers can't deal with IP Masqueraded links.  No
  worries though, there are IDENTs out there that will work.

  Installing this software is beyond the scope of this HOWTO but each
  tool has its own documentation.  Here are some of the URLs:

    Mident <ftp://ftp.code.org/pub/linux/midentd/> is heavily used by
     most IRC users out there.


    Sident <http://insecurity.net/sidentd.gz>


    Other Idents including Oidentd
     <ftp://sunsite.unc.edu/pub/Linux/system/network/daemons/>

  Please note that some Internet IRCs servers still won't allow multiple
  connections from the same host even if they get Ident info and the
  users are different though.  Complain to the remote sys admin.  :)


  7.23.  mIRC doesn't work with DCC Sends

  This is a configuration problem on your copy of mIRC.  To fix this,
  first disconnect mIRC from the IRC server.  Now in mIRC, go to File
  --> Setup and click on the "IRC servers tab".  Make sure that it is
  set to port 6667.  If you require other ports, see below.  Next, goto
  File --> Setup --> Local Info and clear the fields for Local Host and
  IP Address.  Now select the checkboxes for "LOCAL HOST" and "IP
  address" (IP address may be checked but disabled).  Next under "Lookup
  Method", configure it for "normal".  It will NOT work if "server" is
  selected.  That's it.  Try to the IRC server again.

  If you require IRC server ports other than 6667, (for example, 6969)
  you need to edit the /etc/rc.d/rc.firewall startup file where you load
  the IRC MASQ modules.  Edit this file and the line for "modprobe
  ip_masq_irc" and add to this line "ports=6667,6969".  You can add
  additional ports as long as they are separated with commas.
  Finally, close down any IRC clients on any MASQed machines and re-load
  the IRC MASQ module:

  /sbin/rmmod ip_masq_irc /etc/rc.d/rc.firewall


  7.24.  Can IP Masquerade work with only ONE Ethernet network card (IP
  Aliasing)?

  Yes and no. With the "IP Alias" kernel feature, users can setup
  multiple aliased interfaces such as eth0:1, eth0:2, etc but its is NOT
  recommended to use aliased interfaces for IP Masquerading.  Why?
  Providing a secure firewall becomes very difficult with a single NIC
  card.  In addition to this, you will experience an abnormal amount of
  errors on this link since incoming packets will almost simultaneously
  be sent out at the same time.  Because of all this and NIC cards now
  cost less than $10, I highly recommend to just get a NIC card for each
  MASQed network segment.

  Users should also understand that IP Masquerading will only work out a
  physical interface such as eth0, eth1, etc.  MASQing out an aliased
  interface such as "eth0:1, eth1:1, etc" will NOT work.  In other
  words, the following WILL NOT WORK:


    /sbin/ipfwadm -F -a m -W eth0:1 -S 192.168.0.0/24 -D 0.0.0.0/0

    /sbin/ipchains -A forward -i eth0:1 -s 192.168.0.0/24 -j MASQ"

  If you are still interested in using aliased interfaces, you need to
  enable the "IP Alias" feature in the kernel.  You will then need to
  re-compile and reboot.   Once running the new kernel, you need to
  configure Linux to use the new interface (i.e. /dev/eth0:1, etc.).
  After that, you can treat it as a normal Ethernet interface with some
  restrictions like the one above.


  7.25.  I'm trying to use the NETSTAT command to show my Masqueraded
  connections but its not working

  There is a problem with the "netstat" program.  After a Linux reboot,
  running "netstat -M" works fine but after a MASQed computer runs some
  successful ICMP traffic like ping, traceroute, etc., you might see
  something like:


  masq_info.c: Internal Error `ip_masquerade unknown type'.



  The workaround for this is to use the "/sbin/ipfwadm -M -l" command.
  You will also notice that once the listed ICMP masquerade entries
  timeout, "netstat" works again.



  7.26.  I would like to get Microsoft PPTP (GRE tunnels) and/or IPSEC
  (Linux SWAN) tunnels running through IP MASQ

  This IS possible.  Though it is somewhat out of the scope of this
  document, check out John Hardin's PPTP Masq page for all the details.



  7.27.  I want to get the XYZ network game to work through IP MASQ but
  it won't work.  Help!

  First, check Steve Grevemeyer's MASQ Applications page
  <http://www.tsmservices.com/masq>.  If your solution isn't listed
  there, try patching your Linux kernel with Glenn Lamb's LooseUDP
  <ftp://ftp.netcom.com/pub/mu/mumford/loose-udp-2.0.36.patch.gz> patch
  which is covered in the ``'' section above.  Also check out Dan
  Kegel's NAT Page <http://www.alumni.caltech.edu/~dank/peer-nat.html>
  for more information.

  If you are technically inclined, use the program "tcpdump" and sniff
  your network.  Try to find out what protocols and port numbers your
  XYZ game is using.  With this information in hand, subscribe to the IP
  Masq email list and email your results for help.


  7.28.  IP MASQ works fine for a while but then it stops working.  A
  reboot seems to fix this for a while.  Why?

  I bet you are using IPAUTOFW and/or you have it compiled into the
  kernel huh??  This is a known problem with IPAUTOFW.  It is recommend
  to NOT even configure IPAUTOFW into the Linux kernel and use IPPORTFW
  option instead.  This is all covered in more detail in the ``''
  section.


  7.29.  Internal MASQed computers cannot send SMTP or POP-3 mail!


  Though this isn't a Masquerading issue per se but many people do this
  so it should be mentioned.

  SMTP:  The issue is that you are probably using your Linux box as a
  SMTP relay server and get the following error:


       "error from mail server: we do not relay"


  Newer versions of Sendmail and other Mail Transfer Agents (MTAs) dis
  able relaying by default (this is a good thing).  So do the following
  to fix this:


    Sendmail:  Enable specific relaying for your internal MASQed
     machines by editing the /etc/sendmail.cw file and add the hostname
     and domain name of your internal MASQed machine.  You should also
     check to see that the /etc/hosts file has the IP address and Fully
     Qualified Domain Name (FQDN) configured in it.  Once this is done,
     you need to restart Sendmail for it to re-read its configuration
     files.  This is covered in TrinityOS - Section 25
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>

  POP-3:  Some users configure their internal MASQ'ed computer's POP-3
  clients to connect to some external SMTP server.  While this is fine,
  many SMTP servers out there will try to IDENT your connection on port
  113.  Most likely your problem stems around your default Masquerade
  policy being set to DENY.  This is BAD.  Set it to REJECT and re-run
  your rc.firewall ruleset.


  7.30.  I need different internal MASQed networks to exit on different
  external IP addresses (IPROUTE2)


  Say you have the following problem:

  LAN ----------> official IP 192.168.1.x --> 123.123.123.11 192.168.2.x
  -->123.123.123.12


  You have to first understand that both IPFWADM and IPCHAINS run
  *AFTER* the routing system has decided where to send a packet.  This
  ought to be stamped in big red letters on all IPFWADM/IPCHAINS/IPMASQ
  documentation.  You will need to get your routing right first and then
  add IPFWADM/IPCHAINS and/or Masq.

  In the case shown above, you need to persuade the routing system to
  direct packets from 192.168.1.x via 123.123.1233.11 and packets from
  192.168.2.x via 123.123.123.12.  That is the hard part and adding Masq
  on top of correct routing is easy.

  To do this fancy routing, you will use IPROUTE2.

  Primary FTP site is:


    ftp://ftp.inr.ac.ru/ip-routing

     Mirrors are:

     ftp://linux.wauug.org/pub/net
     ftp://ftp.nc.ras.ru/pub/mirrors/ftp.inr.ac.ru/ip-routing/
     ftp://ftp.gts.cz/MIRRORS/ftp.inr.ac.ru/
     ftp://ftp.funet.fi/pub/mirrors/ftp.inr.ac.ru/ip-routing/ (STM1 to
     USA) ftp://sunsite.icm.edu.pl/pub/Linux/iproute/
     ftp://ftp.sunet.se/pub/Linux/ip-routing/
     ftp://ftp.nvg.ntnu.no/pub/linux/ip-routing/
     ftp://ftp.crc.ca/pub/systems/linux/ip-routing/ ftp://ftp.paname.org
     (France) ftp://donlug.ua/pub/mirrors/ip-route/
     ftp://omni.rk.tusur.ru/mirrors/ftp.inr.ac.ru/ip-routing/

     RPMs are available at ftp://omni.rk.tusur.ru/Tango/ and at
     ftp://ftp4.dgtu.donetsk.ua/pub/RedHat/Contrib-Donbass/KAD/


  NOTE:  The following instructions are given below ONLY because
  currently there is very little documentation to the IPROUTE2 tool
  available.  Check out http://www.compendium.com.ar/policy-routing.txt
  for the beginnings of a IPROUTE2 howto.


  The "iprule" and "iproute" commands are the same as "ip rule" and "ip
  route" commands (I prefer the former since it is easier to search
  for.)  All the commands below are completely untested, if they do not
  work, please contact the author of IPROUTE2.. not David Ranch  or
  anyone on the Masq email list as it has NOTHING to do with IP
  Masquerading.

  The first few commands only need to be done once at boot, say in
  /etc/rc.d/rc.local file.



  # Allow internal LANs to route to each other, no masq.
    /sbin/iprule add from 192.168.0.0/16 to 192.168.0.0/16 table main pref 100
  # All other traffic from 192.168.1.x is external, handle by table 101
    /sbin/iprule add from 192.168.1.0/24 to 0/0 table 101 pref 102
  # All other traffic from 192.168.2.x is external, handle by table 102
    /sbin/iprule add from 192.168.2.0/24 to 0/0 table 102 pref 102

  These commands need to be issued when eth0 is configured, perhaps in
  /etc/sysconfig/network-scripts/ifup-post (for Redhat systems).  Be sure to
  do them by hand first to make sure they work.

  # Table 101 forces all assigned packets out via 123.123.123.11
    /sbin/iproute add table 101 via 62123.123.123.11
  # Table 102 forces all assigned packets out via 123.123.123.12
    /sbin/iproute add table 102 via 62123.123.123.12

  At this stage, you should find that packets from 192.168.1.x to the
  outside world are being routed via 123.123.123.11, packets from
  192.168.2.x are routed via 123.123.123.12.

  Once routing is correct, now you can add any IPFWADM or IPCHAINS rules.
  The following examples are for IPCHAINS:


  /sbin/ipchains -A forward -i ppp+ -j MASQ

  If everything hangs together, the masq code will see packets being
  routed out on 123.123.123.11 and 123.123.123.12 and will use those addresses
  as the masq source address.



  7.31.  Why do the new 2.1.x and 2.2.x kernels use IPCHAINS instead of
  IPFWADM?

  IPCHAINS supports the following features that IPFWADM doesn't:


    "Quality of Service" (QoS  support)


    A TREE style chains system vs. LINEAR system like IPFWADM  (Eg.
     this allows something like "if it is ppp0, jump to this chain
     (which contains its own difference set of rules)"


    IPCHAINS is more flexible with configuration.  For example, it has
     the "replace" command (in addition to "insert" and "add").  You can
     also negate rules (e.g. "discard any outbound packets that don't
     come from my registered IP" so that you aren't the source of
     spoofed attacks).


    IPCHAINS can filter any IP protocol explicitly, not just TCP, UDP,
     ICMP


  7.32.  I've just upgraded to the 2.2.x kernels, why isn't IP Masquer
  ade working?

  There are several things you should check assuming your Linux IP Masq
  box already have proper connection to the Internet and your LAN:


    Make sure you have the necessary features and modules are compiled
     and loaded.  See earlier sections for detail.


    Check /usr/src/linux/Documentation/Changes and make sure you have
     the minimal requirement for the network tools installed.


    Make sure you followed all the tests in the ``'' section of the
     HOWTO.


    You should use ipchains <http://www.rustcorp.com/linux/ipchains/>
     to manipulate IP Masq and firewalling rules.


    The standard IPAUTOFW and IPPORTFW port forwarders have been
     replaced by IPMASQADM <http://juanjox.kernelnotes.org/>.  You'll
     need to apply these patches to the kernel, re-compile the kernel,
     compile the new IPMASQADM tool and then convert your old
     IPAUTOFW/IPPORTFW firewall rulesets to the new syntax.  This is
     completely covered in the ``'' section.


    Go through all setup and configuration again!  A lot of time it's
     just a typo or a simple mistake you are overlooking.


  7.33.  I've just upgraded to a 2.0.38+ kernels later, why isn't IP
  Masquerade working?

  There are several things you should check assuming your Linux IP Masq
  box already have proper connection to the Internet and your LAN:


    Make sure you have the necessary features and modules are compiled
     and loaded.  See earlier sections for detail.


    Check /usr/src/linux/Documentation/Changes and make sure you have
     the minimal requirement for the network tools installed.


    Make sure you followed all the tests in the ``'' section of the
     HOWTO.


    You should use ipfwadm <http://www.xos.nl/> to manipulate IP Masq
     and firewalling rules.  If you want to use IPCHAINS, you'll need to
     apply a patch the 2.0.x kernels.


    Go through all setup and configuration again!  A lot of time it's
     just a typo or a simple mistake you overlooked.


  7.34.  I need help with EQL connections and IP Masq

  EQL has nothing to do with IP Masq though they are commonly teamed up
  on Linux boxes.  Because of this, I recommend to check out the NEW
  version of Robert Novak's EQL HOWTO for all your EQL needs.



  7.35.  I can't get IP Masquerade to work!  What options do I have for
  Windows Platforms?

  Giving up a free, reliable, high performance solution that works on
  minimal hardware and pay a fortune for something that needs more
  hardware, lower performance and less reliable?  (IMHO.  And yes, I
  have real life experience with these ;-)

  Okay, it's your call.  If you want a Windows NAT and/or proxy
  solution, here is a decent listing.  I have no preference of these
  tools since I haven't used them before.


    Firesock (from the makers of Trumpet Winsock)

    Does Proxy

    http://www.trumpet.com.au



    Iproute

    DOS program designed to run on 286+ class computers

    requires another box like Linux MASQ

    http://www.mischler.com/iproute/



    Microsoft Proxy

    Requires Windows NT Server

    Quite expensive

    http://www.microsoft.com



    NAT32

    Windows 95/98/NT compatible

    http://www.nat32.com

    Roughly $25 for Win9x and $47 for Win9x and WinNT



    SyGate

    http://www.sygate.com



    Wingate

    Does proxy

    Costs roughly $30 for 2-3 IPs

    http://www.wingate.com


    Winroute

    Does NAT

    http://www.winroute.cz/en/


  Lastly, do a web search on "MS Proxy Server", "Wingate", "WinProxy",
  or goto www.winfiles.com <http://www.winfiles.com>.  And definitely
  DON'T tell anyone that we sent you.


  7.36.  I want to help on IP Masquerade development.  What can I do?

  Join the Linux IP Masquerading DEVELOPERS list and ask the developers
  there what you can help with.  For more details on joining the lists,
  check out the ``'' FAQ section.

  Please DON'T ask NON-IP-Masquerade development related questions
  there!!!!


  7.37.  Where can I find more information on IP Masquerade?

  You can find more information on IP Masquerade at the Linux IP
  Masquerade Resource <http://ipmasq.cjb.net/> that David Ranch
  maintains.

  You can also find more information at Dranch's Linux page
  <http://www.ecst.csuchico.edu/~dranch/LINUX/index-linux.html> where
  the TrinityOS and other Linux documents are kept.

  You may also find more information at The Semi-Original Linux IP
  Masquerading Web Site <http://www.indyramp.com/masq/> maintained by
  Indyramp Consulting, who also provides the IP Masq mailing lists.

  Lastly, you can look for specific questions in the IP MASQ and IP MASQ
  DEV email archives or ask a specific question on these lists.  Check
  out the ``'' FAQ item for more details.


  7.38.  I want to translate this HOWTO to another language, what should
  I do?

  Make sure the language you want to translate to is not already covered
  by someone else.  But, most of the translated HOWTOs are now OLD and
  need to be updated.  A list of available HOWTO translations are
  available at the Linux IP Masquerade Resource
  <http://ipmasq.cjb.net/>.

  If a copy of a current IP MASQ HOWTO isn't in your proposed language,
  please download the newest copy of the IP-MASQ HOWTO SGML code from
  the Linux IP Masquerade Resource <http://ipmasq.cjb.net/>.  From
  there, begin your work while maintaining good SGML coding.  For more
  help on SGML, check out www.sgmltools.org <http://www.sgmltools.org>


  7.39.  This HOWTO seems out of date, are you still maintaining it?
  Can you include more information on ...?  Are there any plans for mak
  ing this better?

  Yes, this HOWTO is still being maintained.  In the past, we've been
  guilty of being too busy working on two jobs and don't have much time
  to work on this, my apology.  As of v1.50, David Ranch has begun to
  revamp the document and get it current again.

  If you think of a topic that could be included in the HOWTO, please
  send email to ambrose@writeme.com and dranch@trinnet.net.  It will be
  even better if you can provide that information.  We will then include
  the information into the HOWTO once it is both found appropriate and
  tested.  Many thanks for your contributions!

  We have a lot of new ideas and plans for improving the HOWTO, such as
  case studies that will cover different network setup involving IP
  Masquerade, more on security via strong IPFWADM/IPCHAINS firewall
  rulesets, IPCHAINS usage, more FAQ entries, etc.  If you think you can
  help, please do!  Thanks.


  7.40.  I got IP Masquerade working, it's great!  I want to thank you
  guys, what can I do?


    Can you translate the newer version of the HOWTO to another
     language?

    Thank the developers and appreciate the time and effort they spent
     on this.

    Join the IP Masquerade email list and support new MASQ users

    Send an email to us and let us know how happy you are

    Introduce other people to Linux and help them when they have
     problems.


  8.  Miscellaneous



  8.1.  Useful Resources


    IP Masquerade Resource page <http://ipmasq.cjb.net/> Will have all
     the current information for setting up IP Masquerade on 2.0.x,
     2.2.x, and even old 1.2 kernels!


    Juan Jose Ciarlante's WWW site <http://juanjox.kernelnotes.org> who
     is the current Linux IP Masquerade maintainer.


    IP Masquerade mailing list Archives
     <http://www.indyramp.com/lists/masq> contains the recent messages
     sent to the mailing lists.


    David Ranch's Linux page including the TrinityOS Linux document and
     current versions of the IP-MASQ-HOWTO.
     <http://www.ecst.csuchico.edu/~dranch/LINUX/index-linux.html>.
     Topics such as IP MASQ, strong IPFWADM/IPCHAINS rulesets, PPP,
     Diald, Cablemodems, DNS, Sendmail, Samba, NFS, Security, etc. are
     covered.


    The IP Masquerading Applications page
     <http://www.tsmservices.com/masq>: A comprehensive list of
     applications that work or can be tuned to work through a Linux IP
     masquerading server.


    For people setting up IP Masq on MkLinux, email Taro Fukunaga at
     tarozax@earthlink.net for a copy of his short MkLinux version of
     this HOWTO.


    IP masquerade FAQ <http://www.indyramp.com/masq/ip_masquerade.txt>
     has some general information


    Paul Russel's http://www.rustcorp.com/linux/ipchains/ doc and its
     possibly older backup at Linux IPCHAINS HOWTO.  This HOWTO has lots
     of information for IPCHAINS usage, as well as source and binaries
     for the ipchains tool.


    X/OS Ipfwadm page <http://www.xos.nl/linux/ipfwadm/> contains
     sources, binaries, documentation, and other information about the
     ipfwadm package


    Check out the GreatCircle's Firewall mailing list for a great
     resource for strong firewall rulesets.


    The LDP Network Administrator's Guide
     <http://metalab.unc.edu/mdw/LDP/nag/nag.html> is a MUST for the
     beginner Linux administrator trying to set up a network.


    The Linux NET-3 HOWTO
     <http://metalab.unc.edu/mdw/HOWTO/NET-3-HOWTO.html> is also another
     comprehensive document on how to setup and configure Linux
     networking.


    Linux ISP Hookup HOWTO <http://metalab.unc.edu/mdw/HOWTO/ISP-
     Hookup-HOWTO.html> and Linux PPP HOWTO
     <http://metalab.unc.edu/mdw/HOWTO/PPP-HOWTO.html> gives you
     information on how to connect your Linux host to the Internet


    Linux Ethernet-Howto <http://metalab.unc.edu/mdw/HOWTO/Ethernet-
     HOWTO.html> is a good source of information about setting up a LAN
     running over Ethernet.


    Donald Becker's NIC drivers and Support Utils
     <http://cesdis.gsfc.nasa.gov/linux/drivers/>


    You may also be interested in Linux Firewalling and Proxy Server
     HOWTO <http://metalab.unc.edu/mdw/HOWTO/Firewall-HOWTO.html>


    Linux Kernel HOWTO <http://metalab.unc.edu/mdw/HOWTO/Kernel-
     HOWTO.html> will guide you through the kernel compilation process


    Other Linux HOWTOs <http://metalab.unc.edu/mdw/HOWTO/HOWTO-
     INDEX-3.html> such as Kernel HOWTO


    Posting to the USENET newsgroup: comp.os.linux.networking



  8.2.  Linux IP Masquerade Resource


  The Linux IP Masquerade Resource  <http://ipmasq.cjb.net/> is a
  website dedicated to Linux IP Masquerade information also maintained
  by Ambrose Au.  It has the latest information related to IP Masquerade
  and may have information that is not being included in the HOWTO.

  You may find the Linux IP Masquerade Resource at the following
  locations:

    http://ipmasq.cjb.net/, Primary Site, redirected to
     http://ipmasq.cjb.net/


    http://ipmasq2.cjb.net/, Secondary Site, redirected to
     http://www.geocities.com/SiliconValley/Heights/2288/



  8.3.  Thanks to the following people..


  In Alphabetical order:

    Gabriel Beitler, gabrielb@voicenet.com
     on providing section 3.3.8 (setting up Novell)


    Juan Jose Ciarlante, irriga@impsat1.com.ar
     on contributing his work on his IPMASQADM port forward tool, his
     work on the 2.1.x and 2.2.x kernel code, the original LooseUDP
     patch, etc.


    Steven Clarke, steven@monmouth.demon.co.uk
     on contributing his IPPORTFW IP port forwarder tool


    Andrew Deryabin, djsf@usa.net
     on contributing his ICQ MASQ module


    Ed Doolittle, dolittle@math.toronto.edu
     on suggestion to -V option in ipfwadm command for improved security


    Matthew Driver, mdriver@cfmeu.asn.au
     on helping extensively on this HOWTO, and providing section 3.3.1
     (setting up Windows 95)


    Ken Eves, ken@eves.com
     on the FAQ that provides invaluable information for this HOWTO


    John Hardin, jhardin@wolfenet.com
     for his PPTP and IPSEC forwarding tools


    Glenn Lamb, mumford@netcom.com
     for the LooseUDP patch


    Ed. Lott, edlott@neosoft.com
     for a long list of tested system and software
    Nigel Metheringham, Nigel.Metheringham@theplanet.net
     on contributing his version of IP Packet Filtering and IP
     Masquerading HOWTO, which make this HOWTO a better and technical
     in-depth document
     section 4.1, 4.2, and others


    Keith Owens, kaos@ocs.com.au
     on providing an excellent guide on ipfwadm section 4.2
     on correction to ipfwadm -deny option which avoids a security hole,
     and clarified the status of ping over IP Masquerade


    Michael Owings, mikey@swampgas.com
     on providing section for CU-SeeMe and Linux IP-Masquerade Teeny
     How-To


    Rob Pelkey, rpelkey@abacus.bates.edu
     on providing section 3.3.6 and 3.3.7 (setting up MacTCP and Open
     Transport)


    Harish Pillay, h.pillay@ieee.org
     on providing section 4.5 (dial-on-demand using Diald)


    Mark Purcell, purcell@rmcs.cranfield.ac.uk
     on providing section 4.6 (IPautofw)


    David Ranch, dranch@trinnet.net
     help updating and maintaining this HOWTO and the Linux IP
     Masquerade Resource Page, the TrinityOS document , ..., too many to
     list here :-)


    Paul Russell, rusty@rustcorp.com.au
     for all his work on IP CHAINS, IP Masquerade kernel patches, etc


    Ueli Rutishauser, rutish@ibm.net
     on providing section 3.3.9 (setting up OS/2 Warp)


    Steve Grevemeyer, grevemes@tsmservices.com
     for taking over the IP Masq Applications page from Lee Nevo and
     updating it to a full DB backend.


    Fred Viles, fv@episupport.com


    John B. (Brent) Williams, forerunner@mercury.net
     on providing section 3.3.7 (setting up Open Transport)


    Enrique Pessoa Xavier, enrique@labma.ufrj.br
     on the BOOTp setup suggestion


    All the people on the IP-MASQ email list, masq@tiffany.indyramp.com
     for their help and support for all the new Linux MASQ users.



    Other code and documentation developers of IP Masquerade for this
     great feature



         Delian Delchev, delian@wfpa.acad.bg

         David DeSimone (FuzzyFox), fox@dallas.net

         Jeanette Pauline Middelink, middelin@polyware.iaf.nl

         Miquel van Smoorenburg, miquels@q.cistron.nl

         Jos Vos, jos@xos.nl

         And more who I may have failed to mention here (please
          let me know)



    All users sending feedback and suggestion to the mailing list,
     especially the ones who reported errors in the document and the
     clients that are supported and not supported


    We apologize if we have omitted any important names, not included
     information that some fellow users have sent us yet, etc.  There
     are many suggestions and ideas sent but there isn't have enough
     time to verify and integrate these changes.  David Ranch is
     constantly trying his best to incorporate all the information sent
     to me into the HOWTO.  I thank you for the effort, and I hope you
     understand our situation.



  8.4.  Reference


    Original IP masquerade FAQ by Ken Eves

    IP masquerade mailing list archive by Indyramp Consulting

    IP Masquerade WWW site by Ambrose Au

    Ipfwadm page by X/OS

    Various networking related Linux HOWTOs

    Some topics covered in TrinityOS by David Ranch


  8.5.  Changes


    TO do - HOWTO:

    Add the scripted IPMASQADM example to the Forwarders section.  Also
     confirm the syntax.

    Add a little section on having multiple subnets behind a MASQ
     server

    Confirm the IPCHAINS ruleset and make sure it is consistant with
     the IPFWADM ruleset


     TO DO - WWW page:

    Update all PPTP urls from lowrent to
     ftp://ftp.rubyriver.com/pub/jhardin/masquerade/ip_masq_vpn.html

    Update the PPTP patch on the masq site

    Update the portfw FTP patch

     Changes from 1.82 to 1.85 - 05/29/00

    Ambrose Au's name has been taken off the title page as DAvid Ranch
     has been the primary maintainer for the HOWTO for over a year.
     Ambrose will still be involved with the WWW site though.

    Deleted a stray SPACE in section 6.4

    Re-ordered the compatible MASQ'ed OS section and added instructions
     for setting up a AS/400 system running on OS/400.  Thanks to
     jaco@libero.it for the notes.

    Added an additional PORFW-FTP patch URL for FTP access if HTTP
     access fails.

    Updated the kernel versions for Redhat 5.1 & 6.1 in the FAQ

    Added FloppyFW to the list of MASQ-enabled Linux distros

    Fixed an issue in the Stronger IPFWADM rule set where there were
     spaces between "ppp_ip" and the "=".

    In the kernel compiling section for 2.2.x kernels, I removed the
     reference to enable "CONFIG_IP_ALWAYS_DEFRAG".  This option was
     removed from the compiling section and enabled by default with MASQ
     enabled in 2.2.12.

    Because of the above change in the kernel behavior, I have added
     the enabling of ip_always_defrag to all the rc.firewall examples.

    Updated the status of support for H.323.  There is now ALPHA
     versions of modules to support H.323 on both 2.0.x and 2.2.x
     kernels.

    Added Debian v2.2 to the supported MASQ distributions list

    Fixed a long standing issue where the section that covered explict
     filtering of IP addresses for IPCHAINS had old IPFWADM syntax.
     I've also cleaned this section up a little and made it a little
     more understandable.

    Doh!  Added Juan Ciarlante's URL to the important MASQ resources
     section.  Man.. you guys need to make me more honest than this!!

    Updated the HOWTO to reflect kernels 2.0.38 and 2.2.15

    Rerversed the order shown to compile kernels to show 2.2.x kernels
     first as 2.0.x is getting pretty old.

    Updated the 2.2.x kernel compiling section to reflect the changed
     options for the latter 2.2.x kernels.

    Added a a possible solution for people that fail to get past MASQ
     test #5.

     Changes from 1.81 to 1.82 - 01/22/00

    Added a missing subsection for /proc/sys/net/ipv4/ip_dynaddr in the
     stronger IPCHAINS ruleset.  Section 6.5

    Changed the IP Masq support for Debian 2.1 to YES

    Reorganized and updated the "Masq is slow" FAQ section to include
     fixing Ethernet speed and duplex issues.

    Added a link to Donald Becker's MII utilities for Ethernet NIC
     cards

    Added a missing ")" for the 2.2.x section (previously fixed it only
     for the 2.0.x version) to the ICQ portfw script and changed the
     evaluation from -lt to -le

    Added Caldera eServer v2.3 to the MASQ supported list

    Added Mandrake 6.0, 6.1, 7.0 to the MASQ supported list

    Added Slackware v7.0 to the MASQ supported list

    Added Redhat 6.1 to the MASQ supported list

    Added TurboLinux 4.0 Lite to the MASQ supported list

    Added SuSe 6.3 to the MASQ supported list

    Updated the recommended stable 2.2.x kernel to be anything newer
     than 2.2.11

    In section 3.3, the HOWTO forgot how to tell the user how to load
     the /etc/rc.d/rc.firewall upon each reboot.  This has now been
     covered for Redhat (and Redhat-based distros) and Slackware.

    Added clarification in the Windows WFWG v3.x and NT setup sections
     why users should NOT configure the DHCP, WINS, and Forwarding
     options.

    Added a FAQ section on how to fix FTP problems with MASQed
     machines.

    Fixed a typo in the Stronger firewall rulesets.  The "extip"
     variabl cannot have the SPACE between the variable name and the "="
     sign.  Thanks to johnh@mdscomp.com for the sharp eye.

    Updated the compatibly section:  Mandrake 7.0 is based on 2.2.14
     and TurboLinux v6.0 runs 2.2.12

     Changes from 1.80 to 1.81 - 01/09/00

    Updated the ICQ section to reflect that the new ICQ Masq module
     supports file transfer and real-time chat.  The 2.0.x module still
     has those limitations.

    Updated Steven E. Grevemeyer's email address.  He is the maintainer
     of the IP Masq Applications page.

    Fixed a few lines that were missing the work AREN'T for the
     "setsockopt" errors.

    Updated a error the strong IPCHAINS ruleset where it was using the
     variable name "ppp_ip" instead of "extip".

    Fixed a "." vs a "?" typo in section 3.3.1 in the DHCP comment
     section.

    Added a missing ")" to the ICQ portfw script and changed the
     evaluation from -lt to -le

    Updated the Quake Module syntax to NOT use the "ports=" verbage



     Changes from 1.79 to 1.80 - 12/26/99

    Fixed a space typo when setting the "ppp_ip" address.

    Fixed a typo in the simple IPCHAINS ruleset.  "deny" to "DENY"

    Updated the URLs for Bjorn's "modutils" for Linux

    Added verbage about NetFilter and IPTables and gave URLs until it
     is added to this HOWTO or a different HOWTO.

    Updated the simple /etc/rc.d/rc.firewall examples to notify users
     about the old Quake module bug.

    Updated the STRONG IPFWADM /etc/rc.d/rc.firewall to clarify users
     about dynamic IP addresses (PPP & DHCP), newer DHCPCD syntax, and
     the old Quake module bug.

    Updated the STRONG IPCHAINS /etc/rc.d/rc.firewall to ADD a missing
     section on dynamic IP addresses (PPP & DHCP) and the old Quake
     module bug.

    Added a note in the "Applications that DO NOT work" section that
     there IS a beta module for Microsoft NetMeeting (H.323 based) v2.x
     on 2.0.x kernels.  There is NO versions available for Netmeeting
     3.x and/or 2.2.x kernels as of yet.



     Changes from 1.78 to 1.79 - 10/21/99

    Updated the HOWTO name to reflect that it isn't a MINI anymore!

     Changes from 1.77 to 1.78 - 8/24/99

    Fixed a typeo in "Section 6.6 - Multiple Internal Networks" where
     the -a policy was ommited.

    Deleted the 2.2.x kernel configure option "Drop source routed
     frames" since it is now enabled by default and the kernel compile
     option was removed.

    Updated the 2.2.x and all other IPCHAINS sections to notify users
     of the IPCHAINS fragmentation bug.

    Updated all the URLs point at Lee Nevo's old IP Masq Applications
     page to Seg's new page.

     Changes from 1.76 to 1.77 - 7/26/99

    Fixed a typo in the Port fowarding section that used "ipmasqadm
     ipportfw -C" instead of "ipmasqadm portfw -f"

     Changes from 1.75 to 1.76 - 7/19/99

    Updated the "ipfwadm: setsockopt failed: Protocol not available"
     message in the FAQ to be more clear instead of making the user hunt
     for the answer in the Forwarders section.

    Fixed incorrect syntax in section 6.7 for IPMASQADM and "portfw"

     Changes from 1.72 to 1.75 - 6/19/99

    Fixed the quake module port setup order for the weak IPFWADM &
     IPCHAINS ruleset and the strong IPFWADM ruleset as well.

    Added a user report about port forwarding ICQ 4000 directly in and
     using ICQ's default settings WITHOUT enabling the "Non-Sock" proxy
     setup.

    Updated the URLs for the IPMASQADM tool

    Added references to Taro Fukunaga, tarozax@earthlink.net for his
     MkLinux port of the HOWTO

    Updated the blurb about Sonny Parlin's FWCONFIG tool to note new
     IPCHAINS support

    Noted that Fred Vile's patch for portfw'ed FTP access is ONLY
     available for the 2.0.x kernels

    Updated the 2.2.x kernel step with a few clarifications on the
     Experiemental tag

    Added Glen Lamb's name to the credits for the LooseUDP patch

    Added a clarification on installing the LooseUDP patch that it
     should use "cat" for non-compressed patches.

    Fixed a typo in the IPAUTO FAQ section

    I had the DHCP client port numbers reversed for the IPFWADM and
     IPCHAINS rulesets.  The order I had was if your Linux server was a
     DHCP SERVER.

    Added explict /sbin path to all weak and strong ruleset examples.

    Made some clarifications in the strong IPFWADM section regarding
     Dynamic IP addresses for PPP and DHCP users.  I also noted that the
     strong rulesets should be re-run when PPP comes up or when a DHCP
     lease is renewed.

    Added reference in the 2.2.x requirements, updated the ICQ FAQ
     section, and added Andrew Deryabin to credits section for his ICQ
     MASQ module.

    Added some clarifcation in the FAQ section why the 2.1.x and 2.2.x
     kernels went to IPCHAINS.

    Added a little FAQ section on Microsoft File/Print/Domain services
     (Samba) through a MASQ server.  I also added a URL to a Microsoft
     Knowledge base document for more details.

    Added clarification in the FAQ section that NO Debian distribution
     supports IP masq out of the box.

    Updated the supported MASQ distributions in the FAQ section.

    Added to the Aliased NIC section of the FAQ that you CANNOT masq
     out of an aliased interface.

    Wow.. never caught this before but the "ppp-ip" variable in the
     strong ruleset section is an invalid variable name!  It has been
     renamed to "ppp_ip"

    In both the IPFWADM and IPCHAINS simple ruleset setup areas, I had
     a commented out section on enabling DHCP traffic.  Problem is, it
     was below the final reject line!  Doh!  I moved both up a section.

    In the simple IPCHAINS setup, the #ed out line for DHCP users, I
     was using the IPFWADM "-W" command instead of IPCHAINS's "-i"
     parameter.

    Added a little blurb to the Forwarders section the resolution to
     the famous "ipfwadm: setsockopt failed: Protocol not available"
     error.  This also includes a little /proc test to let people
     confirm if IPPORTFW is enabled in the kernel.  I also added this
     error to a FAQ section for simple searching.

    Added a Strong IPCHAINS ruleset to the HOWTO

    Added a FAQ section explaining the "kernel: ip_masq_new(proto=UDP):
     no free ports." error.

    Added an example of scripting IPMASQADM PORTFW rules

    Updated a few of the Linux Documentation Project (LDP) URLs

    Added Quake III support in the module loading sections of all the
     rc.firewall rulesets.

    Fixed the IPMASQADM forwards for ICQ


    1.72 - 4/14/99 - Dranch:  Added a large list of Windows NAT/Proxy
     alternatives with rough pricing and URLs to the FAQ.


    1.71 - 4/13/99 - Dranch:  Added IPCHAINS setups for multiple
     internal MASQed networks.  Changed the ICQ setup to use ICQ's
     default 60 second timeout and change IPFWADM/IPCHAINS timeout to
     160 seconds.  Updated the MASQ and MASQ-DEV email list and archive
     subscription instructions.


    1.70 - 3/30/99 - Dranch: Added two new FAQ sections that cover
     SMTP/POP-3 timeout problems and how to masquerade multiple internal
     networks out different external IP addresses with IPROUTE2.


    1.65 - 3/29/99 - Dranch: Typo fixes, clarifications of required
     2.2.x kernel options, added dynamic PPP IP address support to the
     strong firewall section, additional quake II module ports, noted
     that the LooseUDP patch is built into later 2.2.x kernels and its
     from Glenn Lamb and not Dan Kegel, added more game info in the
     compatibility section.


    1.62 - Dranch:  Make the final first-draft changes to the doc and
     now announce it the the MASQ email list.


    1.61 - Dranch:  Make editorial changes, cleaned things up and fixed
     some errors in the Windows95 and NT setups.


    1.58 - Dranch:  Addition of the port forwarding sections; LooseUDP
     setup; Ident servers for IRC users, how to read firewall logs,
     deleted the CuSeeme Mini-HOWTO since it is rarely used.


    1.55 - Dranch: Complete overhaul, feature and FAQ addition, and
     editing sweep of the v1.50 HOWTO.  Completed the 2.2.x kernel and
     IPCHAINS configurations.  Did a conversion from IPAUTOFW to
     IPPORTFW for the examples that applied.  Added many URLs to various
     other documentation and utility sites.  There are so many changes..
     I hope everyone likes it.  Final publishing of this new rev of the
     HOWTO to the LDP project won't happen until the doc is looked over
     and approved by the IP MASQ email list (then v2.00).


    1.50 - Ambrose: A serious update to the HOWTO and the initial
     addition of the 2.2.0 and IPCHAINS configurations.


    1.20 - Ambrose: One of the more recent HOWTO versions that solely
     dealt with < 2.0.x kernels and IPFWADM.



  Linux IPCHAINS-HOWTO
  Rusty Russell
  v1.0.8, Tue Jul  4 14:20:53 EST 2000

  This document aims to describe how to obtain, install and configure
  the enhanced IP firewalling chains software for Linux, and some ideas
  on how you might use them.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 What?
     1.2 Why?
     1.3 How?
     1.4 Where?

  2. Packet Filtering Basics

     2.1 What?
     2.2 Why?
     2.3 How?
        2.3.1 A Kernel With Packet Filtering
        2.3.2 ipchains
        2.3.3 Making Rules Permanent

  3. I'm confused!  Routing, masquerading, portforwarding, ipautofw...

     3.1 Rusty's Three-Line Guide To Masquerading
     3.2 Gratuitous Promotion: WatchGuard Rules
     3.3 Common Firewall-like Setups
        3.3.1 Private Network: Traditional Proxies
        3.3.2 Private Network: Transparent Proxies
        3.3.3 Private Network: Masquerading
        3.3.4 Public Network
        3.3.5 Limited Internal Services
     3.4 More Information on Masquerading

  4. IP Firewalling Chains

     4.1 How Packets Traverse The Filters
        4.1.1 Using ipchains
        4.1.2 What You'll See When Your Computer Starts Up
        4.1.3 Operations on a Single Rule
        4.1.4 Filtering Specifications
           4.1.4.1 Specifying Source and Destination IP Addresses
           4.1.4.2 Specifying Inversion
           4.1.4.3 Specifying Protocol
              4.1.4.3.1 Specifying UDP and TCP Ports
              4.1.4.3.2 Specifying ICMP Type and Code
           4.1.4.4 Specifying an Interface
           4.1.4.5 Specifying TCP SYN Packets Only
           4.1.4.6 Handling Fragments
        4.1.5 Filtering Side Effects
           4.1.5.1 Specifying a Target
           4.1.5.2 Logging Packets
           4.1.5.3 Manipulating the Type Of Service
           4.1.5.4 Marking a Packet
           4.1.5.5 Operations on an Entire Chain
           4.1.5.6 Creating a New Chain
           4.1.5.7 Deleting a Chain
           4.1.5.8 Flushing a Chain
           4.1.5.9 Listing a Chain
           4.1.5.10 Resetting (Zeroing) Counters
           4.1.5.11 Setting Policy
        4.1.6 Operations on Masquerading
        4.1.7 Checking a Packet
        4.1.8 Multiple Rules at Once and Watching What Happens
     4.2 Useful Examples
        4.2.1 Using ipchains-save
        4.2.2 Using ipchains-restore

  5. Miscellaneous.

     5.1 How to Organize Your Firewall Rules
     5.2 What Not To Filter Out
        5.2.1 ICMP packets
        5.2.2 TCP Connections to DNS (nameservers)
        5.2.3 FTP Nightmares
     5.3 Filtering out Ping of Death
     5.4 Filtering out Teardrop and Bonk
     5.5 Filtering out Fragment Bombs
     5.6 Changing Firewall Rules
     5.7 How Do I Set Up IP Spoof Protection?
     5.8 Advanced Projects
        5.8.1 SPF: Stateful Packet Filtering
        5.8.2 Michael Hasenstein's ftp-data hack
     5.9 Future Enhancements

  6. Common Problems

     6.1 ipchains -L Freezes!
     6.2 Inverse doesn't work!
     6.3 Masquerading/Forwarding Doesn't Work!
     6.4 -j REDIR doesn't work!
     6.5 Wildcard Interfaces Don't Work!
     6.6 TOS Doesn't Work!
     6.7 ipautofw and ipportfw Don't Work!
     6.8 xosview is Broken!
     6.9 Segmentation Fault With `-j REDIRECT'!
     6.10 I Can't Set Masquerading Timeouts!
     6.11 I Want to Firewall IPX!

  7. A Serious Example.

     7.1 The Arrangement
     7.2 Goals
     7.3 Before Packet Filtering
     7.4 Packet Filtering for Through Packets
        7.4.1 Set Up Jumps From forward Chain
        7.4.2 Define the icmp-acc Chain
        7.4.3 Good (Internal) to DMZ (Servers)
        7.4.4 Bad (external) to DMZ (servers).
        7.4.5 Good (internal) to Bad (external).
        7.4.6 DMZ to Good (internal).
        7.4.7 DMZ to bad (external).
        7.4.8 Bad (external) to Good (internal).
        7.4.9 Packet Filtering for the Linux Box Itself
           7.4.9.1 Bad (external) interface.
           7.4.9.2 DMZ interface.
           7.4.9.3 Good (internal) interface.
     7.5 Finally

  8. Appendix: Differences between ipchains and ipfwadm.

     8.1 Quick-Reference table.
     8.2 Examples of translated ipfwadm commands

  9. Appendix: Using the ipfwadm-wrapper script.

  10. Appendix: Thanks.

     10.1 Translations


  ______________________________________________________________________

  1.  Introduction

  This is the Linux IPCHAINS-HOWTO; see ``Where?''  for the master site,
  which contains the latest copy.  You should read the Linux NET-3-HOWTO
  as well.  The IP-Masquerading HOWTO, the PPP-HOWTO, the Ethernet-HOWTO
  and the Firewall HOWTO might make interesting reading.  (Then again,
  so might the alt.fan.bigfoot FAQ).


  If packet filtering is passe to you, read Section ``Why?'', Section
  ``How?'', and scan through the titles in Section ``IP Firewalling
  Chains''.


  If you are converting from ipfwadm, read Section ``Introduction'',
  Section ``How?'', and Appendices in section ``Differences between
  ipchains and ipfwadm'' and section ``Using the `ipfwadm-wrapper'
  script''.


  1.1.  What?

  Linux ipchains is a rewrite of the Linux IPv4 firewalling code (which
  was mainly stolen from BSD) and a rewrite of ipfwadm, which was a
  rewrite of BSD's ipfw, I believe.  It is required to administer the IP
  packet filters in Linux kernel versions 2.1.102 and above.


  1.2.  Why?

  The older Linux firewalling code doesn't deal with fragments, has
  32-bit counters (on Intel at least), doesn't allow specification of
  protocols other than TCP, UDP or ICMP, can't make large changes
  atomically, can't specify inverse rules, has some quirks, and can be
  tough to manage (making it prone to user error).


  1.3.  How?

  Currently the code is in the mainstream kernel from 2.1.102.  For the
  2.0 kernel series, you will need to download a kernel patch from the
  web page.  If your 2.0 kernel is more recent than the supplied patch,
  the older patch should be OK; this part of the 2.0 kernels is fairly
  stable (eg. the 2.0.34 kernel patch works just fine on the 2.0.35
  kernel).  Since the 2.0 patch is incompatible with the ipportfw and
  ipautofw patches, I don't recommend applying it unless you really need
  some functionality that ipchains offers.


  1.4.  Where?

  The official page is in three places: Thanks to Penguin Computing
  <http://netfilter.filewatcher.org/ipchains> Thanks to the SAMBA Team
  <http://www.samba.org/netfilter/ipchains> Thanks to Jim Pick
  <http://netfilter.kernelnotes.org/ipchains>


  There is a mailing list for bug reports, discussion, development and
  usage.  Join the mailing list by sending a message containing the word
  ``subscribe ipchains-list'' to subscribe at east.balius.com.  To mail
  to everyone on the list use ipchains-list at east.balius.com.


  2.  Packet Filtering Basics

  2.1.  What?

  All traffic through a network is sent in the form of packets.  For
  example, downloading this package (say it's 50k long) might cause you
  to receive 36 or so packets of 1460 bytes each, (to pull numbers at
  random).
  The start of each packet says where it's going, where it came from,
  the type of the packet, and other administrative details.  This start
  of the packet is called the header.  The rest of the packet,
  containing the actual data being transmitted, is usually called the
  body.


  Some protocols, such TCP, which is used for web traffic, mail, and
  remote logins, use the concept of a `connection' -- before any packets
  with actual data are sent, various setup packets (with special
  headers) are exchanged saying `I want to connect', `OK' and `Thanks'.
  Then normal packets are exchanged.


  A packet filter is a piece of software which looks at the header of
  packets as they pass through, and decides the fate of the entire
  packet.  It might decide to deny the packet (ie. discard the packet as
  if it had never received it), accept the packet (ie. let the packet go
  through), or reject the packet (like deny, but tell the source of the
  packet that it has done so).


  Under Linux, packet filtering is built into the kernel, and there are
  a few trickier things we can do with packets, but the general
  principle of looking at the headers and deciding the fate of the
  packet is still there.


  2.2.  Why?

  Control.  Security.  Watchfulness.



     Control:
        when you are using a Linux box to connect your internal network
        to another network (say, the Internet) you have an opportunity
        to allow certain types of traffic, and disallow others.  For
        example, the header of a packet contains the destination address
        of the packet, so you can prevent packets going to a certain
        part of the outside network.  As another example, I use Netscape
        to access the Dilbert archives.  There are advertisements from
        doubleclick.net on the page, and Netscape wastes my time by
        cheerfully downloading them.  Telling the packet filter not to
        allow any packets to or from the addresses owned by
        doubleclick.net solves that problem (there are better ways of
        doing this though).


     Security:
        when your Linux box is the only thing between the chaos of the
        Internet and your nice, orderly network, it's nice to know you
        can restrict what comes tromping in your door.  For example, you
        might allow anything to go out from your network, but you might
        be worried about the well-known `Ping of Death' coming in from
        malicious outsiders.  As another example, you might not want
        outsiders telnetting to your Linux box, even though all your
        accounts have passwords; maybe you want (like most people) to be
        an observer on the Internet, and not a server (willing or
        otherwise) -- simply don't let anyone connect in, by having the
        packet filter reject incoming packets used to set up
        connections.


     Watchfulness:
        sometimes a badly configured machine on the local network will
        decide to spew packets to the outside world.  It's nice to tell
        the packet filter to let you know if anything abnormal occurs;
        maybe you can do something about it, or maybe you're just
        curious by nature.


  2.3.  How?

  2.3.1.  A Kernel With Packet Filtering

  You need a kernel which has the new IP firewall chains in it.  You can
  tell if the kernel you are running right now has this installed by
  looking for the file `/proc/net/ip_fwchains'.  If it exists, you're
  in.


  If not, you need to make a kernel that has IP firewall chains.  First,
  download the source to the kernel you want.  If you have a kernel
  numbered 2.1.102 or higher, you won't need to patch it (it's in the
  mainstream kernel now).  Otherwise, apply the patch from the web page
  listed above, and set the configuration as detailed below.  If you
  don't know how to do this, don't panic -- read the Kernel-HOWTO.



  The configuration options you will need to set for the 2.0-series
  kernel are:


  ______________________________________________________________________
          CONFIG_EXPERIMENTAL=y
          CONFIG_FIREWALL=y
          CONFIG_IP_FIREWALL=y
          CONFIG_IP_FIREWALL_CHAINS=y
  ______________________________________________________________________



  For the 2.1 or 2.2 series kernels:

  ______________________________________________________________________
          CONFIG_FIREWALL=y
          CONFIG_IP_FIREWALL=y
  ______________________________________________________________________



  The tool ipchains talks to the kernel and tells it what packets to
  filter.  Unless you are a programmer, or overly curious, this is how
  you will control the packet filtering.


  2.3.2.  ipchains

  The ipchains tool inserts and deletes rules from the kernel's packet
  filtering section.  This means that whatever you set up, it will be
  lost upon reboot; see ``Making Rules Permanent'' for how to make sure
  they are restored the next time Linux is booted.


  ipchains replaces ipfwadm, which was used for the old IP Firewall
  code.  There is a set of useful scripts available from the ipchains
  ftp site:


  http://netfilter.filewatcher.org/ipchains/ipchains-
  scripts-1.1.2.tar.gz
  <http://netfilter.filewatcher.org/ipchains/ipchains-
  scripts-1.1.2.tar.gz>


  This contains a shell script called ipfwadm-wrapper which allows you
  to do packet filtering as it was done before.  You probably shouldn't
  use this script unless you want a quick way of upgrading a system
  which uses ipfwadm (it's slower, and doesn't check arguments, etc).
  In that case, you don't need this HOWTO much either.

  See Appendix ``Differences between ipchains and ipfwadm'' and Appendix
  ``Using the `ipfwadm-wrapper' script'' for more details on ipfwadm
  issues.


  2.3.3.  Making Rules Permanent

  Your current firewall setup is stored in the kernel, and thus will be
  lost on reboot.  I recommend using the `ipchains-save' and `ipchains-
  restore' scripts to make your rules permanent.  To do this, set up
  your rules, then run (as root):



       # ipchains-save > /etc/ipchains.rules
       #



  Create a script like the following:



  #! /bin/sh
  # Script to control packet filtering.

  # If no rules, do nothing.
  [ -f /etc/ipchains.rules ] || exit 0

  case "$1" in
      start)
          echo -n "Turning on packet filtering:"
          /sbin/ipchains-restore < /etc/ipchains.rules || exit 1
          echo 1 > /proc/sys/net/ipv4/ip_forward
          echo "."
          ;;
      stop)
          echo -n "Turning off packet filtering:"
          echo 0 > /proc/sys/net/ipv4/ip_forward
          /sbin/ipchains -F
          /sbin/ipchains -X
          /sbin/ipchains -P input ACCEPT
          /sbin/ipchains -P output ACCEPT
          /sbin/ipchains -P forward ACCEPT
          echo "."
          ;;
      *)
          echo "Usage: /etc/init.d/packetfilter {start|stop}"
          exit 1
          ;;
  esac

  exit 0



  Make sure this is run early in the bootup procedure.  In my case
  (Debian 2.1), I make a symbolic link called `S39packetfilter' in the
  `/etc/rcS.d' directory (this will be run before S40network).


  3.  I'm confused!  Routing, masquerading, portforwarding, ipautofw...

  This HOWTO is about packet filtering.  This means deciding whether a
  packet should be allowed to pass or not.  However, Linux being the
  hacker's playground that it is, you probably want to do more than
  that.


  One problem is that the same tool (``ipchains'') is used to control
  both masquerading and transparent proxying, although these are
  notionally separate from packet filtering (the current Linux
  implementation blurs these together unnaturally, leaving the
  impression that they are closely related).


  Masquerading and proxying are covered by separate HOWTOs, and the auto
  forwarding and port forwarding features are controlled by separate
  tools, but since so many people keep asking me about it, I'll include
  a set of common scenarios and indicate when each one should be
  applied.  The security merits of each setup will not be discussed
  here.


  3.1.  Rusty's Three-Line Guide To Masquerading

  This assumes that your external interface is called `ppp0'.  Use
  ifconfig to find out, and adjust to taste.
       # ipchains -P forward DENY
       # ipchains -A forward -i ppp0 -j MASQ
       # echo 1 > /proc/sys/net/ipv4/ip_forward



  3.2.  Gratuitous Promotion: WatchGuard Rules

  You can buy off-the-shelf firewalls.  An excellent one is WatchGuard's
  FireBox.  It's excellent because I like it, it's secure, it's Linux-
  based, and because they funded the maintenance of ipchains as well as
  the new firewalling code (for 2.4).  In short, WatchGuard were paying
  for me to eat while I work for you.  So please consider their stuff.

  http://www.watchguard.com <http://www.watchguard.com>


  3.3.  Common Firewall-like Setups

  You run littlecorp.com.  You have an internal network, and a single
  dialup (PPP) connection to the Internet (firewall.littlecorp.com which
  is 1.2.3.4).  You run Ethernet on your local network, and your
  personal machine is called "myhost".


  This section will illustrate the different arrangement which are
  common.  Read carefully, because they are each subtly different.


  3.3.1.  Private Network: Traditional Proxies

  In this scenario, packets from the private network never traverse the
  Internet, and vice versa.  The IP addresses of the private network
  should be assigned from the RFC1918 Address Allocation for Private
  Internets (ie. 10.*.*.*, 172.16.*.*-172.31.*.* or 192.168.*.*).


  The only way things ever connect to the Internet is by connecting to
  the firewall, which is the only machine on both networks which
  connects onwards.  You run a program (on the firewall) called a proxy
  to do this (there are proxies for FTP, web access, telnet, RealAudio,
  Usenet News and other services).  See the Firewall HOWTO.


  Any services you wish the Internet to access must be on the firewall.
  (But see ``Limited Internal Services'' below).


  Example: Allowing web access from private network to the Internet.

  1. The private network is assigned 192.168.1.* addresses, with myhost
     being 192.168.1.100, and the firewall's Ethernet interface being
     assigned 192.168.1.1.

  2. A web proxy (eg. "squid") is installed and configured on the
     firewall, say running on port 8080.

  3. Netscape on the private network is configured to use the firewall
     port 8080 as a proxy.

  4. DNS does not need to be configured on the private network.

  5. DNS does need to be configured on the firewall.

  6. No default route (aka gateway) needs to be configured on the
     private network.


  Netscape on myhost reads http://slashdot.org.

  1. Netscape connects to the firewall port 8080, using port 1050 on
     myhost.  It asks for the web page of "http://slashdot.org".

  2. The proxy looks up the name "slashdot.org", and gets
     207.218.152.131.  It then opens a connection to that IP address
     (using port 1025 on the firewall's external interface), and asks
     the web server (port 80) for the web page.

  3. As it receives the web page from its connection to the web server,
     it copies the data to the connection from Netscape.

  4. Netscape renders the page.

  ie.  From slashdot.org's point of view, the connection is made from
  1.2.3.4 (firewall's PPP interface) port 1025 to 207.218.152.131
  (slashdot.org) port 80.  From myhost's point of view, the connection
  is made from 192.168.1.100 (myhost) port 1050, to 192.168.1.1
  (firewall's Ethernet interface) port 8080.



  3.3.2.  Private Network: Transparent Proxies

  In this scenario, packets from the private network never traverse the
  Internet, and vice versa.  The IP addresses of the private network
  should be assigned from the RFC1918 Address Allocation for Private
  Internets (ie. 10.*.*.*, 172.16.*.*-172.31.*.* or 192.168.*.*).


  The only way things ever connect to the Internet is by connecting to
  the firewall, which is the only machine on both networks, which
  connects onwards.  You run a program (on the firewall) called a
  transparent proxy to do this; the kernel sends outgoing packets to the
  transparent proxy instead of sending them onwards (ie. it bastardizes
  routing).


  Transparent proxying means that the clients don't need to know there
  is a proxy involved.


  Any services you wish the Internet to access must be on the firewall.
  (But see ``Limited Internal Services'' below).


  Example: Allowing web access from private network to the Internet.

  1. The private network is assigned 192.168.1.* addresses, with myhost
     being 192.168.1.100, and the firewall's Ethernet interface being
     assigned 192.168.1.1.

  2. A transparent web proxy (I believe there are patches for squid to
     allow it to operate in this manner, or try "transproxy") is
     installed and configured on the firewall, say running on port 8080.

  3. The kernel is told to redirect connections to port 80 to the proxy,
     using ipchains.

  4. Netscape on the private network is configured to connect directly.

  5. DNS needs to be configured on the private network (ie. you need to
     run a DNS server as a proxy on the firewall).

  6. The default route (aka gateway) needs to be configured on the
     private network, to send packets to the firewall.


  Netscape on myhost reads http://slashdot.org.

  1. Netscape looks up the name "slashdot.org", and gets
     207.218.152.131.  It then opens a connection to that IP address,
     using local port 1050, and asks the web server (port 80) for the
     web page.

  2. As the packets from myhost (port 1050) to slashdot.org (port 80)
     pass through the firewall, they are redirected to the waiting
     transparent proxy on port 8080.  The transparent proxy opens a
     connection (using local port 1025) to 207.218.152.131 port 80
     (which is where the original packets were going).

  3. As the proxy receives the web page from its connection to the web
     server, it copies the data to the connection from Netscape.

  4. Netscape renders the page.

  ie.  From slashdot.org's point of view, the connection is made from
  1.2.3.4 (firewall's PPP interface) port 1025 to 207.218.152.131
  (slashdot.org) port 80.  From myhost's point of view, the connection
  is made from 192.168.1.100 (myhost) port 1050, to 207.218.152.131
  (slashdot.org) port 80, but it's actually talking to the transparent
  proxy.


  3.3.3.  Private Network: Masquerading

  In this scenario, packets from the private network never traverse the
  Internet without special treatment, and vice versa.  The IP addresses
  of the private network should be assigned from the RFC1918 Address
  Allocation for Private Internets (ie. 10.*.*.*, 172.16.*.*-172.31.*.*
  or 192.168.*.*).


  Instead of using a proxy, we use a special kernel facility called
  "masquerading".  Masquerading rewrites packets as they pass through
  the firewall, so that they always seem to come from the firewall
  itself.  It then rewrites the responses so that they look like they
  are going to the original recipient.


  Masquerading has separate modules to handle "tricky" protocols, such
  as FTP, RealAudio, Quake, etc.  For really hard-to-handle protocols,
  the "auto forwarding" facility can handle some of them by
  automatically setting up port forwarding for related sets of ports:
  look for ``ipportfw'' (2.0 kernels) or ``ipmasqadm'' (2.1 kernels).


  Any services you wish the Internet to access must be on the firewall.
  (But see ``Limited Internal Services'' below).


  Example: Allowing web access from private network to the Internet.

  1. The private network is assigned 192.168.1.* addresses, with myhost
     being 192.168.1.100, and the firewall's Ethernet interface being
     assigned 192.168.1.1.

  2. The firewall is set up to masquerade any packets coming from the
     private network and going to port 80 on an Internet host.

  3. Netscape is configured to connect directly.

  4. DNS must be configured correctly on the private network.

  5. The firewall should be the default route (aka gateway) for the
     private network.

  Netscape on myhost reads http://slashdot.org.

  1. Netscape looks up the name "slashdot.org", and gets
     207.218.152.131.  It then opens a connection to that IP address,
     using local port 1050, and asks the web server (port 80) for the
     web page.

  2. As the packets from myhost (port 1050) to slashdot.org (port 80)
     pass through the firewall, they are rewritten to come from the PPP
     interface of the firewall, port 65000.  The firewall has a valid
     Internet address (1.2.3.4) so reply packets from slashdot.org get
     routed back OK.

  3. As packets from slashdot.org (port 80) to firewall.littlecorp.com
     (port 65000) come in, they are rewritten to go to myhost, port
     1050.  This is the real magic of masquerading: it remembers when it
     rewrites outgoing packets to it can write them back as replies come
     in.

  4. Netscape renders the page.

  ie.  From the slashdot.org's point of view, the connection is made
  from 1.2.3.4 (firewall's PPP interface) port 65000 to 207.218.152.131
  (slashdot.org) port 80.  From the myhost's point of view, the
  connection is made from 192.168.1.100 (myhost) port 1050, to
  207.218.152.131 (slashdot.org) port 80.



  3.3.4.  Public Network

  In this scenario, your personal network is a part of the Internet:
  packets can flow without change across both networks.  The IP
  addresses of the internal network must be assigned by applying for a
  block of IP addresses, so the rest of the network will know how to get
  packets to you.  This implies a permanent connection.


  In this role, packet filtering is used to restrict which packets can
  be forwarded between your network and the rest of the Internet, eg. to
  restrict the rest of the Internet to only accessing your internal web
  servers.


  Example: Allowing web access from private network to the Internet.

  1. Your internal network is assigned according to the IP address block
     you have registered, (say 1.2.3.*).

  2. The firewall is set up to allow all traffic.

  3. Netscape is configured to connect directly.

  4. DNS must be configured correctly on your network.


  5. The firewall should be the default route (aka gateway) for the
     private network.

  Netscape on myhost reads http://slashdot.org.

  1. Netscape looks up the name "slashdot.org", and gets
     207.218.152.131.  It then opens a connection to that IP address,
     using local port 1050, and asks the web server (port 80) for the
     web page.

  2. Packets pass through your firewall, just as they pass through
     several other routers between you and slashdot.org.

  3. Netscape renders the page.

  ie.  There is only one connection: from 1.2.3.100 (myhost) port 1050,
  to 207.218.152.131 (slashdot.org) port 80.


  3.3.5.  Limited Internal Services

  There are a few tricks you can pull to allow the Internet to access
  your internal services, rather than running the services on the
  firewall.  These will work with either a proxy or masquerading based
  approach for external connections.


  The simplest approach is to run a "redirector", which is a poor-man's
  proxy which waits for a connection on a given port, and then open a
  connection a fixed internal host and port, and copies data between the
  two connections.  An example of this is the "redir" program.  From the
  Internet point of view, the connection is made to your firewall.  From
  your internal server's point of view, the connection is made from the
  internal interface of the firewall to the server.


  Another approach (which requires a 2.0 kernel patched for ipportfw, or
  a 2.1 or later kernel) is to use port forwarding in the kernel.  This
  does the same job as "redir" in a different way: the kernel rewrites
  packets as they pass through, changing their destination address and
  ports to point them at an internal host and port.  From the Internet's
  point of view, the connection is made to your firewall.  From your
  internal server's point of view, a direct connection is made from the
  Internet host to the server.


  3.4.  More Information on Masquerading

  David Ranch has written an excellent new HOWTO on Masquerading, which
  has a large amount of overlap with this HOWTO.  You can currently find
  that HOWTO at

  http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO.html


  The official Masquerading home page is at

  http://ipmasq.cjb.net <http://ipmasq.cjb.net>



  4.  IP Firewalling Chains

  This section describes all you really need to know to build a packet
  filter that meets your needs.

  4.1.  How Packets Traverse The Filters

  The kernel starts with three lists of rules; these lists are called
  firewall chains or just chains.  The three chains are called input,
  output and forward.  When a packet comes in (say, through the Ethernet
  card) the kernel uses the input chain to decide its fate.  If it
  survives that step, then the kernel decides where to send the packet
  next (this is called routing).  If it is destined for another machine,
  it consults the forward chain.  Finally, just before a packet is to go
  out, the kernel consults the output chain.


  A chain is a checklist of rules.  Each rule says `if the packet header
  looks like this, then here's what to do with the packet'.  If the rule
  doesn't match the packet, then the next rule in the chain is
  consulted.  Finally, if there are no more rules to consult, then the
  kernel looks at the chain policy to decide what to do.  In a security-
  conscious system, this policy usually tells the kernel to reject or
  deny the packet.


  For ASCII-art fans, this shown the complete path of a packet coming
  into a machine.


          ----------------------------------------------------------------
          |            ACCEPT/                              lo interface |
          v           REDIRECT                  _______                  |
  --> C --> S --> ______ --> D --> ~~~~~~~~ -->|forward|----> _______ -->
      h     a    |input |    e    {Routing }   |Chain  |     |output |ACCEPT
      e     n    |Chain |    m    {Decision}   |_______| --->|Chain  |
      c     i    |______|    a     ~~~~~~~~        |     | ->|_______|
      k     t       |        s       |             |     | |     |
      s     y       |        q       |             v     | |     |
      u     |       v        e       v            DENY/  | |     v
      m     |     DENY/      r   Local Process   REJECT  | |   DENY/
      |     v    REJECT      a       |                   | |  REJECT
      |   DENY               d       --------------------- |
      v                      e -----------------------------
     DENY


  Here is a blow-by-blow description of each stage:


     Checksum:
        This is a test that the packet hasn't been corrupted in some
        way.  If it has, it is denied.


     Sanity:
        There is actually one of these sanity checks before each
        firewall chain, but the input chain's is the most important.
        Some malformed packets might confuse the rule-checking code, and
        these are denied here (a message is printed to the syslog if
        this happens).


     input chain:
        This is the first firewall chain against which the packet will
        be tested.  If the verdict of the chain is not DENY or REJECT,
        the packet continues on.


     Demasquerade:
        If the packet is a reply to a previously masqueraded packet, it
        is demasqueraded, and skips straight to the output chain.  If
        you don't use IP Masquerading, you can mentally erase this from
        the diagram.


     Routing decision:
        The destination field is examined by the routing code, to decide
        if this packet should go to a local process (see Local process
        below) or forwarded to a remote machine (see forward chain
        below).


     Local process:
        A process running on the machine can receive packets after the
        Routing Decision step, and can send packets (which go through
        the Routing Decision step, then traverse the output chain).


     lo interface:
        If packets from a local process are destined for a local
        process, they will go through the output chain with interface
        set to `lo', then return through the input chain with interface
        also `lo'.  The lo interface is usually called the loopback
        interface.


     local:
        If the packet was not created by a local process, then the
        forward chain is checked, otherwise the packet goes to the
        output chain.


     forward chain:
        This chain is traversed for any packets which are attempting to
        pass through this machine to another.


     output chain:
        This chain is traversed for all packets just before they are
        sent out.


  4.1.1.  Using ipchains

  First, check that you have the version of ipchains that this document
  refers to:



       $ ipchains --version
       ipchains 1.3.9, 17-Mar-1999



  Note that I recommend 1.3.4 (which has no long options, like
  `--sport'), or 1.3.8 or above; these are very stable.


  ipchains has a fairly detailed manual page (man ipchains), and if you
  need more detail on particulars, you can check out the programming
  interface (man 4 ipfw), or the file net/ipv4/ip_fw.c in the 2.1.x
  kernel source, which is (obviously) authoritative.


  There is also an excellent quick reference card by Scott Bronson in
  the source package, in both A4 and US Letter PostScript(TM).


  There are several different things you can do with ipchains.  First
  the operations to manage whole chains.  You start with three built-in
  chains input, output and forward which you can't delete.


  1. Create a new chain (-N).

  2. Delete an empty chain (-X).

  3. Change the policy for a built-in chain. (-P).

  4. List the rules in a chain (-L).

  5. Flush the rules out of a chain (-F).

  6. Zero the packet and byte counters on all rules in a chain (-Z).

  There are several ways to manipulate rules inside a chain:


  1. Append a new rule to a chain (-A).

  2. Insert a new rule at some position in a chain (-I).

  3. Replace a rule at some position in a chain (-R).

  4. Delete a rule at some position in a chain (-D).

  5. Delete the first rule that matches in a chain (-D).

  There are a few operations for masquerading, which are in ipchains for
  want of a good place to put them:


  1. List the currently masqueraded connections (-M -L).

  2. Set masquerading timeout values (-M -S). (But see ``I can't set
     masquerading timeouts!'').

  The final (and perhaps the most useful) function allows you to check
  what would happen to a given packet if it were to traverse a given
  chain.


  4.1.2.  What You'll See When Your Computer Starts Up

  Before any ipchains commands have been run (be careful: some
  distributions run ipchains in their initialization scripts), there
  will be no rules in any of the built-in chains (`input', `forward' and
  `output'), and each of the chains will have a policy of ACCEPT.  This
  is as wide-open as you can get.


  4.1.3.  Operations on a Single Rule

  This is the bread-and-butter of ipchains; manipulating rules.  Most
  commonly, you will probably use the append (-A) and delete (-D)
  commands.  The others (-I for insert and -R for replace) are simple
  extensions of these concepts.



  Each rule specifies a set of conditions the packet must meet, and what
  to do if it meets them (a `target').  For example, you might want to
  deny all ICMP packets coming from the IP address 127.0.0.1.  So in
  this case our conditions are that the protocol must be ICMP and that
  the source address must be 127.0.0.1.  Our target is `DENY'.


  127.0.0.1 is the `loopback' interface, which you will have even if you
  have no real network connection.  You can use the `ping' program to
  generate such packets (it simply sends an ICMP type 8 (echo request)
  which all cooperative hosts should obligingly respond to with an ICMP
  type 0 (echo reply) packet).  This makes it useful for testing.



       # ping -c 1 127.0.0.1
       PING 127.0.0.1 (127.0.0.1): 56 data bytes
       64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.2 ms

       --- 127.0.0.1 ping statistics ---
       1 packets transmitted, 1 packets received, 0% packet loss
       round-trip min/avg/max = 0.2/0.2/0.2 ms
       # ipchains -A input -s 127.0.0.1 -p icmp -j DENY
       # ping -c 1 127.0.0.1
       PING 127.0.0.1 (127.0.0.1): 56 data bytes

       --- 127.0.0.1 ping statistics ---
       1 packets transmitted, 0 packets received, 100% packet loss
       #



  You can see here that the first ping succeeds (the `-c 1' tells ping
  to only send a single packet).


  Then we append (-A) to the `input' chain, a rule specifying that for
  packets from 127.0.0.1 (`-s 127.0.0.1') with protocol ICMP (`-p ICMP')
  we should jump to DENY (`-j DENY').


  Then we test our rule, using the second ping.  There will be a pause
  before the program gives up waiting for a response that will never
  come.


  We can delete the rule in one of two ways.  Firstly, since we know
  that it is the only rule in the input chain, we can use a numbered
  delete, as in:


               # ipchains -D input 1
               #



  To delete rule number 1 in the input chain.


  The second way is to mirror the -A command, but replacing the -A with
  -D.  This is useful when you have a complex chain of rules and you
  don't want to have to count them to figure out that it's rule 37 that
  you want to get rid of.  In this case, we would use:

          # ipchains -D input -s 127.0.0.1 -p icmp -j DENY
          #



  The syntax of -D must have exactly the same options as the -A (or -I
  or -R) command.  If there are multiple identical rules in the same
  chain, only the first will be deleted.


  4.1.4.  Filtering Specifications

  We have seen the use of `-p' to specify protocol, and `-s' to specify
  source address, but there are other options we can use to specify
  packet characteristics.  What follows is an exhaustive compendium.


  4.1.4.1.  Specifying Source and Destination IP Addresses

  Source (-s) and destination (-d) IP addresses can be specified in four
  ways.  The most common way is to use the full name, such as
  `localhost' or `www.linuxhq.com'.  The second way is to specify the IP
  address such as `127.0.0.1'.


  The third and fourth ways allow specification of a group of IP
  addresses, such as `199.95.207.0/24' or `199.95.207.0/255.255.255.0'.
  These both specify any IP address from 199.95.207.0 to 199.95.207.255
  inclusive; the digits after the `/' tell which parts of the IP address
  are significant.  `/32' or `/255.255.255.255' is the default (match
  all of the IP address).  To specify any IP address at all `/0' can be
  used, like so:


               # ipchains -A input -s 0/0 -j DENY
               #



  This is rarely used, as the effect above is the same as not specifying
  the `-s' option at all.


  4.1.4.2.  Specifying Inversion

  Many flags, including the `-s' and `-d' flags can have their arguments
  preceded by `!' (pronounced `not') to match addresses NOT equal to the
  ones given.  For example. `-s ! localhost' matches any packet not
  coming from localhost.


  Don't forget the spaces around the `!': they really are needed.


  4.1.4.3.  Specifying Protocol

  The protocol can be specified with the `-p' flag.  Protocol can be a
  number (if you know the numeric protocol values for IP) or a name for
  the special cases of `TCP', `UDP' or `ICMP'.  Case doesn't matter, so
  `tcp' works as well as `TCP'.


  The protocol name can be prefixed by a `!', to invert it, such as `-p
  ! TCP'.
  4.1.4.3.1.  Specifying UDP and TCP Ports

  For the special case where a protocol of TCP or UDP is specified,
  there can be an extra argument indicating the TCP or UDP port, or an
  (inclusive) range of ports (but see ``Handling Fragments'' below).  A
  range is represented using a `:' character, such as `6000:6010', which
  covers 11 port numbers, from 6000 to 6010 inclusive.  If the lower
  bound is omitted, it defaults to 0.  If the upper bound is omitted, it
  defaults to 65535.  So to specify TCP connections coming from ports
  under 1024, the syntax would be as `-p TCP -s 0.0.0.0/0 :1023'.  Port
  numbers can be specified by name, eg. `www'.


  Note that the port specification can be preceded by a `!', which
  inverts it.  So to specify every TCP packet BUT a WWW packet, you
  would specify

  -p TCP -d 0.0.0.0/0 ! www



  It is important to realize that the specification


  -p TCP -d ! 192.168.1.1 www



  is very different from

  -p TCP -d 192.168.1.1 ! www



  The first specifies any TCP packet to the WWW port on any machine but
  192.168.1.1.  The second specifies any TCP connection to any port on
  192.168.1.1 but the WWW port.


  Finally, this case means not the WWW port and not 192.168.1.1:

  -p TCP -d ! 192.168.1.1 ! www



  4.1.4.3.2.  Specifying ICMP Type and Code

  ICMP also allows an optional argument, but as ICMP doesn't have ports,
  (ICMP has a type and a code) they have a different meaning.


  You can specify them as ICMP names (use ipchains -h icmp to list the
  names) after the `-s' option, or as a numeric ICMP type and code,
  where the type follows the `-s' option and the code follows the `-d'
  option.


  The ICMP names are fairly long: you only need use enough letters to
  make the name distinct from any other.


  Here is a small table of some of the most common ICMP packets:



  Number  Name                     Required by

  0       echo-reply               ping
  3       destination-unreachable  Any TCP/UDP traffic.
  5       redirect                 routing if not running routing daemon
  8       echo-request             ping
  11      time-exceeded            traceroute



  Note that the ICMP names cannot be preceeded by `!' at the moment.


  DO NOT DO NOT DO NOT block all ICMP type 3 messages!  (See ``ICMP
  Packets'' below).


  4.1.4.4.  Specifying an Interface

  The `-i' option specifies the name of an interface to match.  An
  interface is the physical device the packet came in on, or is going
  out on.  You can use the ifconfig command to list the interfaces which
  are `up' (ie. working at the moment).


  The interface for incoming packets (ie. packets traversing the input
  chain) is considered to be the interface they came in on.  Logically,
  the interface for outgoing packets (packets traversing the output
  chain) is the interface they will go out on.  The interface for
  packets traversing the forward chain is also the interface they will
  go out on; a fairly arbitrary decision it seems to me.


  It is perfectly legal to specify an interface that currently does not
  exist; the rule will not match anything until the interface comes up.
  This is extremely useful for dial-up PPP links (usually interface
  ppp0) and the like.


  As a special case, an interface name ending with a `+' will match all
  interfaces (whether they currently exist or not) which begin with that
  string.  For example, to specify a rule which matches all PPP
  interfaces, the -i ppp+ option would be used.


  The interface name can be preceded by a `!' to match a packet which
  does NOT match the specified interface(s).


  4.1.4.5.  Specifying TCP SYN Packets Only

  It is sometimes useful to allow TCP connections in one direction, but
  not the other.  For example, you might want to allow connections to an
  external WWW server, but not connections from that server.


  The naive approach would be to block TCP packets coming from the
  server.  Unfortunately, TCP connections require packets going in both
  directions to work at all.


  The solution is to block only the packets used to request a
  connection.  These packets are called SYN packets (ok, technically
  they're packets with the SYN flag set, and the FIN and ACK flags
  cleared, but we call them SYN packets).  By disallowing only these
  packets, we can stop attempted connections in their tracks.


  The `-y' flag is used for this: it is only valid for rules which
  specify TCP as their protocol.  For example, to specify TCP connection
  attempts from 192.168.1.1:

  -p TCP -s 192.168.1.1 -y



  Once again, this flag can be inverted by preceding it with a `!',
  which means every packet other than the connection initiation.


  4.1.4.6.  Handling Fragments

  Sometimes a packet is too large to fit down a wire all at once.  When
  this happens, the packet is divided into fragments, and sent as
  multiple packets.  The other end reassembles the fragments to
  reconstruct the whole packet.


  The problem with fragments is that some of the specifications listed
  above (in particular, source port, destinations port, ICMP type, ICMP
  code, or TCP SYN flag) require the kernel to peek at the start of the
  packet, which is only contained in the first fragment.


  If your machine is the only connection to an external network, then
  you can tell the Linux kernel to reassemble all fragments which pass
  through it, by compiling the kernel with IP: always defragment set to
  `Y'.  This sidesteps the issue neatly.


  Otherwise, it is important to understand how fragments get treated by
  the filtering rules.  Any filtering rule that asks for information we
  don't have will not match.  This means that the first fragment is
  treated like any other packet.  Second and further fragments won't be.
  Thus a rule -p TCP -s 192.168.1.1 www (specifying a source port of
  `www') will never match a fragment (other than the first fragment).
  Neither will the opposite rule -p TCP -s 192.168.1.1 ! www.


  However, you can specify a rule specifically for second and further
  fragments, using the `-f' flag.  Obviously, it is illegal to specify a
  TCP or UDP port, ICMP type, ICMP code or TCP SYN flag in such a
  fragment rule.


  It is also legal to specify that a rule does not apply to second and
  further fragments, by preceding the `-f' with `!'.


  Usually it is regarded as safe to let second and further fragments
  through, since filtering will effect the first fragment, and thus
  prevent reassembly on the target host, however, bugs have been known
  to allow crashing of machines simply by sending fragments.  Your call.


  Note for network-heads: malformed packets (TCP, UDP and ICMP packets
  too short for the firewalling code to read the ports or ICMP code and
  type) are treated as fragments as well.  Only TCP fragments starting
  at position 8 are explicitly dropped by the firewall code (a message
  should appear in the syslog if this occurs).
  As an example, the following rule will drop any fragments going to
  192.168.1.1:



       # ipchains -A output -f -d 192.168.1.1 -j DENY
       #



  4.1.5.  Filtering Side Effects

  OK, so now we know all the ways we can match a packet using a rule.
  If a packet matches a rule, the following things happen:


  1. The byte counter for that rule is increased by the size of the
     packet (header and all).

  2. The packet counter for that rule is incremented.

  3. If the rule requests it, the packet is logged.

  4. If the rule requests it, the packet's Type Of Service field is
     changed.

  5. If the rule requests it, the packet is marked (not in 2.0 kernel
     series).

  6. The rule target is examined to decide what to do to the packet
     next.


  For variety, I'll address these in order of importance.


  4.1.5.1.  Specifying a Target

  A target tells the kernel what to do with a packet that matches a
  rule.  ipchains uses `-j' (think `jump-to') for the target
  specification.  The target name must be less than 8 letters, and case
  matters: "RETURN" and "return" are completely different.


  The simplest case is when there is no target specified.  This type of
  rule (often called an `accounting' rule) is useful for simply counting
  a certain type of packet.  Whether this rule matches or not, the
  kernel simply examines the next rule in the chain.  For example, to
  count the number of packets from 192.168.1.1, we could do this:


       # ipchains -A input -s 192.168.1.1
       #



  (Using `ipchains -L -v' we can see the byte and packet counters
  associated with each rule).



  There are six special targets.  The first three, ACCEPT, REJECT and
  DENY are fairly simple.  ACCEPT allows the packet through.  DENY drops
  the packet as if it had never been received.  REJECT drops the packet,
  but (if it's not an ICMP packet) generates an ICMP reply to the source
  to tell it that the destination was unreachable.


  The next one, MASQ tells the kernel to masquerade the packet.  For
  this to work, your kernel needs to be compiled with IP Masquerading
  enabled.  For details on this, see the Masquerading-HOWTO and the
  Appendix ``Differences between ipchains and ipfwadm''.  This target is
  only valid for packets traversing the forward chain.


  The other major special target is REDIRECT which tells the kernel to
  send a packet to a local port instead of wherever it was heading.
  This can only be specified for rules specifying TCP or UDP as their
  protocol.  Optionally, a port (name or number) can be specified
  following `-j REDIRECT' which will cause the packet to be redirected
  to that particular port, even if it was addressed to another port.
  This target is only valid for packets traversing the input chain.


  The final special target is RETURN which is identical to falling off
  the end of the chain immediately.  (See ``Setting Policy'' below).


  Any other target indicates a user-defined chain (as described in
  ``Operations on an Entire Chain'' below).  The packet will begin
  traversing the rules in that chain.  If that chain doesn't decide the
  fate of the packet, then once traversal on that chain has finished,
  traversal resumes on the next rule in the current chain.


  Time for more ASCII art.  Consider two (silly) chains: input (the
  built-in chain) and Test (a user-defined chain).


           `input'                         `Test'
          ----------------------------    ----------------------------
          | Rule1: -p ICMP -j REJECT |    | Rule1: -s 192.168.1.1    |
          |--------------------------|    |--------------------------|
          | Rule2: -p TCP -j Test    |    | Rule2: -d 192.168.1.1    |
          |--------------------------|    ----------------------------
          | Rule3: -p UDP -j DENY    |
          ----------------------------



  Consider a TCP packet coming from 192.168.1.1, going to 1.2.3.4.  It
  enters the input chain, and gets tested against Rule1 - no match.
  Rule2 matches, and its target is Test, so the next rule examined is
  the start of Test.  Rule1 in Test matches, but doesn't specify a
  target, so the next rule is examined, Rule2.  This doesn't match, so
  we have reached the end of the chain.  We return to the input chain,
  where we had just examined Rule2, so we now examine Rule3, which
  doesn't match either.


  So the packet path is:



                                  v    __________________________
           `input'                |   /    `Test'                v
          ------------------------|--/    -----------------------|----
          | Rule1                 | /|    | Rule1                |   |
          |-----------------------|/-|    |----------------------|---|
          | Rule2                 /  |    | Rule2                |   |
          |--------------------------|    -----------------------v----
          | Rule3                 /--+___________________________/
          ------------------------|---
                                  v



  See the section ``How to Organise Your Firewall Rules'' for ways to
  use user-defined chains effectively.


  4.1.5.2.  Logging Packets

  This is a side effect that matching a rule can have; you can have the
  matching packet logged using the `-l' flag.  You will usually not want
  this for routine packets, but it is a useful feature if you want to
  look for exceptional events.


  The kernel logs this information looking like:



       Packet log: input DENY eth0 PROTO=17 192.168.2.1:53 192.168.1.1:1025
         L=34 S=0x00 I=18 F=0x0000 T=254



  This log message is designed to be terse, and contain technical
  information useful only to networking gurus, but it can be useful to
  the rest of us.  It breaks down like so:


  1. `input' is the chain which contained the rule which matched the
     packet, causing the log message.

  2. `DENY' is what the rule said to do to the packet.  If this is `-'
     then the rule didn't effect the packet at all (an accounting rule).

  3. `eth0' is the interface name.  Because this was the input chain, it
     means that the packet came in `eth0'.

  4. `PROTO=17' means that the packet was protocol 17.  A list of
     protocol numbers is given in `/etc/protocols'.  The most common are
     1 (ICMP), 6 (TCP) and 17 (UDP).

  5. `192.168.2.1' means that the packet's source IP address was
     192.168.2.1.

  6. `:53' means that the source port was port 53.  Looking in
     `/etc/services' shows that this is the `domain' port (ie. this is
     probably an DNS reply).  For UDP and TCP, this number is the source
     port.  For ICMP, it's the ICMP type.  For others, it will be 65535.

  7. `192.168.1.1' is the destination IP address.

  8. `:1025' means that the destination port was 1025.  For UDP and TCP,
     this number is the destination port.  For ICMP, it's the ICMP code.
     For others, it will be 65535.

  9. `L=34' means that packet was a total of 34 bytes long.

  10.
     `S=0x00' means the Type of Service field (divide by 4 to get the
     Type of Service as used by ipchains).

  11.
     `I=18' is the IP ID.

  12.
     `F=0x0000' is the 16-bit fragment offset plus flags.  A value
     starting with `0x4' or `0x5' means that the Don't Fragment bit is
     set.  `0x2' or `0x3' means the `More Fragments' bit is set; expect
     more fragments after this.  The rest of the number is the offset of
     this fragment, divided by 8.

  13.
     `T=254' is the Time To Live of the packet.  One is subtracted from
     this value for every hop, and it usually starts at 15 or 255.

  14.
     `(#5)' there may be a final number in brackets on more recent
     kernels (perhaps after 2.2.9).  This is the rule number which
     caused the packet log.


  On standard Linux systems, this kernel output is captured by klogd
  (the kernel logging daemon) which hands it to syslogd (the system
  logging daemon).  The `/etc/syslog.conf' controls the behaviour of
  syslogd, by specifying a destination for each `facility' (in our case,
  the facility is "kernel") and `level' (for ipchains, the level used is
  "info").


  For example, my (Debian) /etc/syslog.conf contains two lines which
  match `kern.info':



       kern.*                          -/var/log/kern.log
       *.=info;*.=notice;*.=warn;\
               auth,authpriv.none;\
               cron,daemon.none;\
               mail,news.none          -/var/log/messages



  These mean that the messags are duplicated in `/var/log/kern.log' and
  `/var/log/messages'.  For more details, see `man syslog.conf'.


  4.1.5.3.  Manipulating the Type Of Service

  There are four seldom-used bits in the IP header, called the Type of
  Service (TOS) bits.  They effect the way packets are treated; the four
  bits are "Minimum Delay", "Maximum Throughput", "Maximum Reliability"
  and "Minimum Cost".  Only one of these bits is allowed to be set.  Rob
  van Nieuwkerk, the author of the TOS-mangling code, puts it as
  follows:


       Especially the "Minimum Delay" is important for me.  I
       switch it on for "interactive" packets in my upstream
  (Linux) router.  I'm behind a 33k6 modem link.  Linux prior
  itizes packets in 3 queues.  This way I get acceptable
  interactive performance while doing bulk downloads at the
  same time.  (It could even be better if there wasn't such a
  big queue in the serial driver, but latency is kept down 1.5
  seconds now).



  Note: obviously, you have no control over incoming packets; you can
  only control the priority of packets leaving your box.  To negotiate
  priorities with the other end, a protocol like RSVP (which I know
  nothing about, so don't ask me) must be used.


  The most common use is to set telnet & ftp control connections to
  "Minimum Delay" and FTP data to "Maximum Throughput".  This would be
  done as follows:



       ipchains -A output -p tcp -d 0.0.0.0/0 telnet -t 0x01 0x10
       ipchains -A output -p tcp -d 0.0.0.0/0 ftp -t 0x01 0x10
       ipchains -A output -p tcp -s 0.0.0.0/0 ftp-data -t 0x01 0x08



  The `-t' flag takes two extra parameters, both in hexadecimal.  These
  allow complex twiddling of the TOS bits: the first mask is ANDed with
  the packet's current TOS, and then the second mask is XORed with it.
  If this is too confusing, just use the following table:



       TOS Name                Value           Typical Uses

       Minimum Delay           0x01 0x10       ftp, telnet
       Maximum Throughput      0x01 0x08       ftp-data
       Maximum Reliability     0x01 0x04       snmp
       Minimum Cost            0x01 0x02       nntp



  Andi Kleen goes on to point out the following (mildly edited for
  posterity):

       Maybe it would be useful to add an reference to the txqueue
       len parameter of ifconfig to the discussion of TOS bits. The
       default device queue length is tuned for ethernet cards, on
       modems it is too long and makes the 3 band scheduler (which
       queues based on TOS) work suboptimally. It is a good idea to
       set it to a value between 4-10 on modem or single b channel
       ISDN links: on bundled devices a longer queue is needed.
       This is a 2.0 and 2.1 problem, but in 2.1 it is a ifconfig
       flag (with recent nettools), while in 2.0 it requires source
       patches in the device drivers to change.


  So, to see maximal benifits of TOS manipulation for modem PPP links,
  do `ifconfig $1 txqueuelen' in your /etc/ppp/ip-up script.  The number
  to use depends on the modem speed and the amount of buffering in the
  modem; here's Andi setting me straight again:

       The best value for a given configuration needs experiment.
       If the queues are too short on a router then packets will
       get dropped.  Also of course one gets benefits even without
       TOS rewriting, just that TOS rewriting helps to give the
       benefits to non cooperating programs (but all standard linux
       programs are cooperating).



  4.1.5.4.  Marking a Packet

  This allows complex and powerful interactions with Alexey Kuznetsov's
  new Quality of Service implementation, as well as the mark-based
  forwarding in later 2.1 series kernels.  More news as it comes to
  hand.  This option is ignored altogether in the 2.0 kernel series.


  4.1.5.5.  Operations on an Entire Chain

  A very useful feature of ipchains is the ability to group related
  rules into chains.  You can call the chains whatever you want, as long
  as the names don't clash with the built-in chains (input, output and
  forward) or the targets (MASQ, REDIRECT, ACCEPT, DENY, REJECT or
  RETURN).  I suggest avoiding upper-case labels entirely, since I may
  use these for future extensions.  The chain name can be up to 8
  characters long.


  4.1.5.6.  Creating a New Chain

  Let's create a new chain.  Because I am such an imaginative fellow,
  I'll call it test.



       # ipchains -N test
       #



  It's that simple.  Now you can put rules in it as detailed above.


  4.1.5.7.  Deleting a Chain

  Deleting a chain is simple as well.



       # ipchains -X test
       #



  Why `-X'?  Well, all the good letters were taken.


  There are a couple of restrictions to deleting chains: they must be
  empty (see ``Flushing a Chain'' below) and they must not be the target
  of any rule.  You can't delete any of the three built-in chains.



  4.1.5.8.  Flushing a Chain

  There is a simple way of emptying all rules out of a chain, using the
  `-F' command.



               # ipchains -F forward
               #



  If you don't specify a chain, then all chains will be flushed.


  4.1.5.9.  Listing a Chain

  You can list all the rules in a chain by using the `-L' command.



       # ipchains -L input
       Chain input (refcnt = 1): (policy ACCEPT)
       target     prot opt    source                destination           ports
       ACCEPT     icmp -----  anywhere              anywhere              any
       # ipchains -L test
       Chain test (refcnt = 0):
       target     prot opt    source                destination           ports
       DENY       icmp -----  localnet/24           anywhere              any
       #



  The `refcnt' listed for test is the number of rules which have test as
  their target.  This must be zero (and the chain be empty) before this
  chain can be deleted.


  If the chain name is omitted, all chains are listed, even empty ones.


  There are three options which can accompany `-L'.  The `-n' (numeric)
  option is very useful as it prevents ipchains from trying to lookup
  the IP addresses, which (if you are using DNS like most people) will
  cause large delays if your DNS is not set up properly, or you have
  filtered out DNS requests.  It also causes ports to be printed out as
  numbers rather than names.


  The `-v' options shows you all the details of the rules, such as the
  the packet and byte counters, the TOS masks, the interface, and the
  packet mark.  Otherwise these values are omitted.  For example:



       # ipchains -v -L input
       Chain input (refcnt = 1): (policy ACCEPT)
        pkts bytes target     prot opt   tosa tosx  ifname    mark        source                destination           ports
          10   840 ACCEPT     icmp ----- 0xFF 0x00  lo                    anywhere              anywhere              any



  Note that the packet and byte counters are printed out using the
  suffixes `K', `M' or `G' for 1000, 1,000,000 and 1,000,000,000
  respectively.  Using the `-x' (expand numbers) flag as well prints the
  full numbers, no matter how large they are.


  4.1.5.10.  Resetting (Zeroing) Counters

  It is useful to be able to reset the counters.  This can be done with
  the `-Z' (zero counters) option.  For example:



       # ipchains -v -L input
       Chain input (refcnt = 1): (policy ACCEPT)
        pkts bytes target     prot opt   tosa tosx  ifname    mark        source                destination           ports
          10   840 ACCEPT     icmp ----- 0xFF 0x00  lo                    anywhere              anywhere              any
       # ipchains -Z input
       # ipchains -v -L input
       Chain input (refcnt = 1): (policy ACCEPT)
        pkts bytes target     prot opt   tosa tosx  ifname    mark        source                destination           ports
           0     0 ACCEPT     icmp ----- 0xFF 0x00  lo                    anywhere              anywhere              any
       #



  The problem with this approach is that sometimes you need to know the
  counter values immediately before they are reset.  In the above
  example, some packets could pass through between the `-L' and `-Z'
  commands.  For this reason, you can use the `-L' and `-Z' together, to
  reset the counters while reading them.  Unfortunately, if you do this,
  you can't operate on a single chain: you have to list and zero all the
  chains at once.



       # ipchains -L -v -Z
       Chain input (policy ACCEPT):
        pkts bytes target     prot opt   tosa tosx  ifname    mark        source                destination           ports
          10   840 ACCEPT     icmp ----- 0xFF 0x00  lo                    anywhere              anywhere              any

       Chain forward (refcnt = 1): (policy ACCEPT)
       Chain output (refcnt = 1): (policy ACCEPT)
       Chain test (refcnt = 0):
           0     0 DENY       icmp ----- 0xFF 0x00  ppp0                  localnet/24           anywhere              any
       # ipchains -L -v
       Chain input (policy ACCEPT):
        pkts bytes target     prot opt   tosa tosx  ifname    mark        source                destination           ports
          10   840 ACCEPT     icmp ----- 0xFF 0x00  lo                    anywhere              anywhere              any

       Chain forward (refcnt = 1): (policy ACCEPT)
       Chain output (refcnt = 1): (policy ACCEPT)
       Chain test (refcnt = 0):
           0     0 DENY       icmp ----- 0xFF 0x00  ppp0                  localnet/24           anywhere              any
       #



  4.1.5.11.  Setting Policy

  We glossed over what happens when a packet hits the end of a built-in
  chain when we discussed how a packet walks through chains in
  ``Specifying a Target'' above.  In this case, the policy of the chain
  determines the fate of the packet.  Only built-in chains (input,
  output and forward) have policies, because if a packet falls off the
  end of a user-defined chain, traversal resumes at the previous chain.


  The policy can be any of the first four special targets: ACCEPT, DENY,
  REJECT or MASQ.  MASQ is only valid for the `forward' chain.


  It is also important to note that a RETURN target in a rule in one of
  the built-in chains is useful to explicitly target the chain policy
  when a packet matches a rule.


  4.1.6.  Operations on Masquerading

  There are several parameters you can tweak for IP Masquerading.  They
  are bundled with ipchains because it's not worth writing a separate
  tool for them (although this will change).


  The IP Masquerading command is `-M', and it can be combined with `-L'
  to list currently masqueraded connections, or `-S' to set the
  masquerading parameters.


  The `-L' command can be accompanied by `-n' (show numbers instead of
  hostnames and port names) or `-v' (show deltas in sequence numbers for
  masqueraded connection, just in case you care).


  The `-S' command should be followed by three timeout values, each in
  seconds: for TCP sessions, for TCP sessions after a FIN packet, and
  for UDP packets.  If you don't want to change one of these values,
  simply give a value of `0'.


  The default values are listed in
  `/usr/src/linux/include/net/ip_masq.h', currently 15 minutes, 2
  minutes and 5 minutes respectively.


  The most common value to change is the first one, for FTP (see ``FTP
  Nightmares'' below).


  Note the problems with setting timeouts listed in ``I can't set
  masquerading timeouts!''.


  4.1.7.  Checking a Packet

  Sometimes you want to see what happens when a certain packet enters
  your machine, such as for debugging your firewall chains.  ipchains
  has the `-C' command to allow this, using the exact same routines that
  the kernel uses to diagnose real packets.


  You specify which chain to test the packet on by following the `-C'
  argument with its name.  Whereas the kernel always starts traversing
  on the input, output or forward chains, you are allowed to begin
  traversing on any chain for testing purposes.



  The details of the `packet' are specified using the same syntax used
  to specify firewall rules.  In particular, a protocol (`-p'), source
  address (`-s'), destination address (`-d') and interface (`-i') are
  compulsory.  If the protocol is TCP or UDP, then a single source and a
  single destination port must be specified, and a ICMP type and code
  must be specified for the ICMP protocol (unless the `-f' flag is
  specified to indicate a fragment rule, in which case these options are
  illegal).


  If the protocol is TCP (and the `-f' flag is not specified), the `-y'
  flag may be specified, to indicate that the test packet should have
  the SYN bit set.


  Here is an example of testing a TCP SYN packet from 192.168.1.1 port
  60000 to 192.168.1.2 port www, coming in the eth0 interface, entering
  the `input' chain.  (This is a classic incoming WWW connection
  initiation):



       # ipchains -C input -p tcp -y -i eth0 -s 192.168.1.1 60000 -d 192.168.1.2 www
       packet accepted
       #



  4.1.8.  Multiple Rules at Once and Watching What Happens

  Sometimes a single command line can result in multiple rules being
  effected.  This is done in two ways.  Firstly, if you specify a
  hostname which resolves (using DNS) to multiple IP addresses, ipchains
  will act as if you had typed multiple commands with each combination
  of addresses.


  So if the hostname `www.foo.com' resolves to three IP addresses, and
  the hostname `www.bar.com' resolves to two IP addresses, then the
  command `ipchains -A input -j reject -s www.bar.com -d www.foo.com'
  would append six rules to the input chain.


  The other way to have ipchains perform multiple actions is to use the
  bidirectional flag (`-b').  This flag makes ipchains behave as if you
  had typed the command twice, the second time with the `-s' and `-d'
  arguments reversed.  So, to avoid forwarding either to or from
  192.168.1.1, you could do the following:



       # ipchains -b -A forward -j reject -s 192.168.1.1
       #



  Personally, I don't like the `-b' option much; if you want
  convenience, see ``Using ipchains-save'' below.


  The -b option can be used with the insert (`-I'), delete (`-D') (but
  not the variation which takes a rule number), append (`-A') and check
  (`-C') commands.


  Another useful flag is `-v' (verbose) which prints out exactly what
  ipchains is doing with your commands.  This is useful if you are
  dealing with commands that may effect multiple rules.  For example,
  here we check the behaviour of fragments between 192.168.1.1 and
  192.168.1.2.



       # ipchains -v -b -C input -p tcp -f -s 192.168.1.1 -d 192.168.1.2 -i lo
         tcp opt   ---f- tos 0xFF 0x00  via lo    192.168.1.1  -> 192.168.1.2    * ->   *
       packet accepted
         tcp opt   ---f- tos 0xFF 0x00  via lo    192.168.1.2  -> 192.168.1.1    * ->   *
       packet accepted
       #



  4.2.  Useful Examples

  I have a dialup PPP connection (-i ppp0).  I grab news (-p TCP -s
  news.virtual.net.au nntp) and mail (-p TCP -s mail.virtual.net.au
  pop-3) every time I dial up.  I use Debian's FTP method to update my
  machine regularly (-p TCP -y -s ftp.debian.org.au ftp-data).  I surf
  the web through my ISP's proxy while this is going on (-p TCP -d
  proxy.virtual.net.au 8080), but hate the ads from doubleclick.net on
  the Dilbert Archive (-p TCP -y -d 199.95.207.0/24 and -p TCP -y -d
  199.95.208.0/24).


  I don't mind people trying to ftp to my machine while I'm online (-p
  TCP -d $LOCALIP ftp), but don't want anyone outside pretending to have
  an IP address of my internal network (-s 192.168.1.0/24).  This is
  commonly called IP spoofing, and there is a better way to protect
  yourself from it in the 2.1.x kernels and above: see ``How do I set up
  IP spoof protection?''.


  This setup is fairly simple, because there are currently no other
  boxes on my internal network.


  I don't want any local process (ie. Netscape, lynx etc.) to connect to
  doubleclick.net:



       # ipchains -A output -d 199.95.207.0/24 -j REJECT
       # ipchains -A output -d 199.95.208.0/24 -j REJECT
       #



  Now I want to set priorities on various outgoing packets (there isn't
  much point in doing it on incoming packets).  Since I have a fair
  number of these rules, it makes sense to put them all in a single
  chain, called ppp-out.



  # ipchains -N ppp-out
  # ipchains -A output -i ppp0 -j ppp-out
  #



  Minimum delay for web traffic & telnet.



       # ipchains -A ppp-out -p TCP -d proxy.virtual.net.au 8080 -t 0x01 0x10
       # ipchains -A ppp-out -p TCP -d 0.0.0.0/0 telnet -t 0x01 0x10
       #



  Low cost for ftp data, nntp, pop-3:



       # ipchains -A ppp-out -p TCP -d 0.0.0.0/0 ftp-data -t 0x01 0x02
       # ipchains -A ppp-out -p TCP -d 0.0.0.0/0 nntp -t 0x01 0x02
       # ipchains -A ppp-out -p TCP -d 0.0.0.0/0 pop-3 -t 0x01 0x02
       #



  There are a few restrictions on packets coming in the ppp0 interface:
  let's create a chain called `ppp-in':



       # ipchains -N ppp-in
       # ipchains -A input -i ppp0 -j ppp-in
       #



  Now, no packets coming in ppp0 should be claiming a source address of
  192.168.1.*, so we log and deny them:



       # ipchains -A ppp-in -s 192.168.1.0/24 -l -j DENY
       #



  I allow UDP packets in for DNS (I run a caching nameserver which
  forwards all requests to 203.29.16.1, so I expect DNS replies from
  them only), incoming ftp, and return ftp-data only (which should only
  be going to a port above 1023, and not the X11 ports around 6000).



  # ipchains -A ppp-in -p UDP -s 203.29.16.1 -d $LOCALIP dns -j ACCEPT
  # ipchains -A ppp-in -p TCP -s 0.0.0.0/0 ftp-data -d $LOCALIP 1024:5999 -j ACCEPT
  # ipchains -A ppp-in -p TCP -s 0.0.0.0/0 ftp-data -d $LOCALIP 6010: -j ACCEPT
  # ipchains -A ppp-in -p TCP -d $LOCALIP ftp -j ACCEPT
  #



  I allow TCP reply packets back in



       # ipchains -A ppp-in -p TCP ! -y -j ACCEPT
       #



  Finally, local-to-local packets are OK:



       # ipchains -A input -i lo -j ACCEPT
       #



  Now, my default policy on the input chain is DENY, so everything else
  gets dropped:



       # ipchains -P input DENY
       #



  NOTE: I wouldn't set up my chains in this order, as packets might get
  through while I'm setting up.  Safest is usually to set the policy to
  DENY first, then insert the rules.  Of course, if your rules require
  DNS lookups to resolve hostnames, you could be in trouble.


  4.2.1.  Using ipchains-save

  Setting up firewall chains just the way you want them, and then trying
  to remember the commands you used so you can do them next time is a
  pain.


  So, ipchains-save is a script which reads your current chains setup
  and saves it to a file.  For the moment I'll keep you in suspense with
  regards to what ipchains-restore does.


  ipchains-save can save a single chain, or all chains (if no chain name
  is specified).  The only option currently permitted is `-v' which
  prints the rules (to stderr) as they are saved.  The policy of the
  chain is also saved for input, output and forward chains.
       # ipchains-save > my_firewall
       Saving `input'.
       Saving `output'.
       Saving `forward'.
       Saving `ppp-in'.
       Saving `ppp-out'.
       #



  4.2.2.  Using ipchains-restore

  ipchains-restore restores chains as saved with ipchains-save.  It can
  take two options: `-v' which describes each rule as it is added, and
  `-f' which forces flushing of user-defined chains if they exist, as
  described below.


  If a user-defined chain is found in the input, ipchains-restore checks
  if that chain already exists.  If it does, then you will be prompted
  whether the chains should be flushed (cleared of all rules) or whether
  restoring this chain should be skipped.  If you specified `-f' on the
  command line, you will not be prompted; the chain will be flushed.


  For example:



       # ipchains-restore < my_firewall
       Restoring `input'.
       Restoring `output'.
       Restoring `forward'.
       Restoring `ppp-in'.
       Chain `ppp-in' already exists. Skip or flush? [S/f]? s
       Skipping `ppp-in'.
       Restoring `ppp-out'.
       Chain `ppp-out' already exists. Skip or flush? [S/f]? f
       Flushing `ppp-out'.
       #



  5.  Miscellaneous.

  This section contains all the information and FAQs that I couldn't fit
  inside the structure above.


  5.1.  How to Organize Your Firewall Rules

  This question requires some thought.  You can try to organize them to
  optimize speed (minimize the number of rule-checks for the most common
  packets) or to increase manageability.


  If you have an intermittent link, say a PPP link, you might want to
  set the first rule in the input chain to be set to `-i ppp0 -j DENY'
  at boot time, then have something like this in your ip-up script:



  # Re-create the `ppp-in' chain.
  ipchains-restore -f < ppp-in.firewall

  # Replace DENY rule with jump to ppp-handling chain.
  ipchains -R input 1 -i ppp0 -j ppp-in



  Your ip-down script would look like:



       ipchains -R input 1 -i ppp0 -j DENY



  5.2.  What Not To Filter Out

  There are some things you should be aware of before you start
  filtering out everything you don't want.


  5.2.1.  ICMP packets

  ICMP packets are used (among other things) to indicate failure for
  other protocols (such as TCP and UDP).  `destination-unreachable'
  packets in particular.  Blocking these packets means that you will
  never get `Host unreachable' or `No route to host' errors; any
  connections will just wait for a reply that never comes.  This is
  irritating, but rarely fatal.


  A worse problem is the role of ICMP packets in MTU discovery.  All
  good TCP implementations (Linux included) use MTU discovery to try to
  figure out what the largest packet that can get to a destination
  without being fragmented (fragmentation slows performance, especially
  when occasional fragments are lost).  MTU discovery works by sending
  packets with the "Don't Fragment" bit set, and then sending smaller
  packets if it gets an ICMP packet indicating "Fragmentation needed but
  DF set" (`fragmentation-needed').  This is a type of `destination-
  unreachable' packet, and if it is never received, the local host will
  not reduce MTU, and performance will be abysmal or non-existent.


  Note that it is common to block all ICMP redirect messages (type 5);
  these can be used to manipulate routing (although good IP stacks have
  safeguards), and so are often seen as slightly risky.


  5.2.2.  TCP Connections to DNS (nameservers)

  If you're trying to block outgoing TCP connections, remember that DNS
  doesn't always use UDP; if the reply from the server exceeds 512
  bytes, the client uses a TCP connection (still going to port number
  53) to get the data.


  This can be a trap because DNS will `mostly work' if you disallow such
  TCP transfers; you may experience strange long delays and other
  occasional DNS problems if you do.

  If your DNS queries are always directed at the same external source
  (either directly by using the nameserver line in /etc/resolv.conf or
  by using a caching nameserver in forward mode), then you need only
  allow TCP connections to port domain on that nameserver from the local
  domain port (if using a caching nameserver) or from a high port (>
  1023) if using /etc/resolv.conf.


  5.2.3.  FTP Nightmares

  The classic packet filtering problem is FTP.  FTP has two modes; the
  traditional one is called active mode and the more recent one is
  called passive mode.  Web browsers usually default to passive mode,
  but command-line FTP programs usually default to active mode.


  In active mode, when the remote end wants to send a file (or even the
  results of an ls or dir command) it tries to open a TCP connection to
  the local machine.  This means you can't filter out these TCP
  connections without breaking active FTP.


  If you have the option of using passive mode, then fine; passive mode
  makes data connections from client to server, even for incoming data.
  Otherwise, it is recommended that you only allow TCP connections to
  ports above 1024 and not between 6000 and 6010 (6000 is used for X-
  Windows).


  5.3.  Filtering out Ping of Death

  Linux boxes are now immune to the famous Ping of Death, which involves
  sending an illegally-large ICMP packet which overflows buffers in the
  TCP stack on the receiver and causes havoc.


  If you are protecting boxes which might be vulnerable, you could
  simply block ICMP fragments.  Normal ICMP packets aren't large enough
  to require fragmentation, so you won't break anything except big
  pings.  I have heard (unconfirmed) reports that some systems required
  only the last fragment of an oversize ICMP packet to corrupt them, so
  blocking only the first fragment is not recommended.


  While the exploit programs I have seen all use ICMP, there is no
  reasons that TCP or UDP fragments (or an unknown protocol) could not
  be used for this attack, so blocking ICMP fragments is only a
  temporary solution.


  5.4.  Filtering out Teardrop and Bonk

  Teardrop and Bonk are two attacks (mainly against Microsoft Windows NT
  machines) which rely on overlapping fragments.  Having your Linux
  router do defragmentation, or disallowing all fragments to your
  vulnerable machines are the other options.


  5.5.  Filtering out Fragment Bombs

  Some less-reliable TCP stacks are said to have problems dealing with
  large numbers of fragments of packets when they don't receive all the
  fragments.  Linux does not have this problem.  You can filter out
  fragments (which might break legitimate uses) or compile your kernel
  with `IP: always defragment' set to `Y' (only if your Linux box is the
  only possible route for these packets).
  5.6.  Changing Firewall Rules

  There are some timing issues involved in altering firewall rules.  If
  you are not careful, you can let packets through while you are half-
  way through your changes.  A simplistic approach is to do the
  following:



       # ipchains -I input 1 -j DENY
       # ipchains -I output 1 -j DENY
       # ipchains -I forward 1 -j DENY

       ... make changes ...

       # ipchains -D input 1
       # ipchains -D output 1
       # ipchains -D forward 1
       #



  This drops all packets for the duration of the changes.


  If your changes are restricted to a single chain, you might want to
  create a new chain with the new rules, and then replace (`-R') the
  rule that pointed to the old chain with one that points to the new
  chain: then you can delete the old chain.  This replacement will occur
  atomically.


  5.7.  How Do I Set Up IP Spoof Protection?

  IP spoofing is a technique where a host sends out packets which claim
  to be from another host.  Since packet filtering makes decisions based
  on this source address, IP spoofing is uses to fool packet filters.
  It is also used to hide the identity of attackers using SYN attacks,
  Teardrop, Ping of Death and the like (don't worry if you don't know
  what they are).


  The best way to protect from IP spoofing is called Source Address
  Verification, and it is done by the routing code, and not firewalling
  at all.  Look for a file called /proc/sys/net/ipv4/conf/all/rp_filter.
  If this exists, then turning on Source Address Verification at every
  boot is the right solution for you.  To do that, insert the following
  lines somewhere in your init scripts, before any network interfaces
  are initialized:



  # This is the best method: turn on Source Address Verification and get
  # spoof protection on all current and future interfaces.
  if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
    echo -n "Setting up IP spoofing protection..."
    for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
        echo 1 > $f
    done
    echo "done."
  else
    echo PROBLEMS SETTING UP IP SPOOFING PROTECTION.  BE WORRIED.
    echo "CONTROL-D will exit from this shell and continue system startup."
    echo
    # Start a single user shell on the console
    /sbin/sulogin $CONSOLE
  fi



  If you cannot do this, you can manually insert rules to protect every
  interface.  This requires knowledge of each interface.  The 2.1
  kernels automatically reject packets claiming to come from the 127.*
  addresses (reserved for the local loopback interface, lo).


  For example, say we have three interfaces, eth0, eth1 and ppp0.  We
  can use ifconfig to tell us the address and netmask of the interfaces.
  Say eth0 was attached to a network 192.168.1.0 with netmask
  255.255.255.0, eth1 was attached to a network 10.0.0.0 with netmask
  255.0.0.0, and ppp0 connected to the Internet (where any address
  except the reserved private IP addresses are allowed), we would insert
  the following rules:



       # ipchains -A input -i eth0 -s ! 192.168.1.0/255.255.255.0 -j DENY
       # ipchains -A input -i ! eth0 -s 192.168.1.0/255.255.255.0 -j DENY
       # ipchains -A input -i eth1 -s ! 10.0.0.0/255.0.0.0 -j DENY
       # ipchains -A input -i ! eth1 -s 10.0.0.0/255.0.0.0 -j DENY
       #



  This approach is not as good as the Source Address Verification
  approach, because if your network changes, you have to change your
  firewalling rules to keep up.


  If you are running a 2.0 series kernel, you might want to protect the
  loopback interface as well, using a rule like this:



       # ipchains -A input -i ! lo -s 127.0.0.0/255.0.0.0 -j DENY
       #



  5.8.  Advanced Projects

  There is a userspace library I have written which is included with the
  source distribution called `libfw'.  It uses the ability of IP Chains
  1.3 and above to copy a packet to userspace (using the
  IP_FIREWALL_NETLINK config option).


  The mark value can be used to specify the Quality of Service
  parameters for packets, or to specify how packets should be port-
  forwarded.  I've never used either, but if you want to write about it,
  please contact me.


  Things such as stateful inspection (I prefer the term dynamic
  firewalling) can be implemented in userspace using this library.
  Other nifty ideas include controlling packets on a per-user basis by
  doing a lookup in a userspace daemon.  This should be pretty easy.


  5.8.1.  SPF: Stateful Packet Filtering

  ftp://ftp.interlinx.bc.ca/pub/spf <ftp://ftp.interlinx.bc.ca/pub/spf>
  is the site of Brian Murrell's SPF project, which does connection
  tracking in userspace.  It adds significant security for low-bandwidth
  sites.


  There's little documentation at present, but here's a post to the
  mailing list in which Brian answered some questions:



       > I believe it does exactly what I want: Installing a temporary
       > "backward"-rule to let packets in as a response to an
       > outgoing request.

       Yup, that is exactly what it does.  The more protocols it
       understands, the more "backward" rules it gets right.  Right
       now it has support for (from memory, please excuse any errors
       or omissions) FTP (both active and passive, in and out), some
       RealAudio, traceroute, ICMP and basic ICQ (inbound from the ICQ
       servers, and direct TCP connections, but alas the secondary
       direct TCP connections for things like file transfer, etc. are
       not there yet)

       > Is it a replacement for ipchains or a supplement?

       It is a supplement.  Think of ipchains as the engine to allow
       and prevent packets from travelling across a Linux box.  SPF is
       the driver, constantly monitoring traffic and telling ipchains
       how to change it's policies to reflect the changes in traffic
       patterns.



  5.8.2.  Michael Hasenstein's ftp-data hack

  Michael Hasenstein of SuSE has written a kernel patch which adds ftp
  connection tracking to ipchains.  It can currently be found at
  http://www.suse.de/~mha/patch.ftp-data-2.gz
  <http://www.suse.de/~mha/patch.ftp-data-2.gz>

  5.9.  Future Enhancements

  Firewalling and NAT have being redesigned for 2.4.  Plans and
  discussions are available on the netfilter list (see
  http://lists.samba.org <http://lists.samba.org>).  These enhancements
  should clear up many outstanding usability issues (really, firewalling
  and masquerading shouldn't be this hard), and allow growth for far
  more flexible firewalling.


  6.  Common Problems


  6.1.  ipchains -L Freezes!

  You're probably blocking DNS lookups; it will eventually time out.
  Try using the `-n' (numeric) flag to ipchains, which suppresses the
  lookup of names.



  6.2.  Inverse doesn't work!

  You must put the `!' option by itself, with spaces either side.  A
  classic mistake (warned about in 1.3.10) is:



       # ipchains -A input -i !eth0 -j DENY
       #



  There will never be an interface called `!eth0', but ipchains doesn't
  know that.



  6.3.  Masquerading/Forwarding Doesn't Work!

  Make sure that packet forwarding is enabled (in recent kernels it is
  disabled by default, meaning that packets never even try to traverse
  the `forward' chain).  You can override this (as root) by typing



       # echo 1 > /proc/sys/net/ipv4/ip_forward
       #



  If this works for you, you can put this somewhere in your bootup
  scripts so it is enabled every time; you'll want to set up your
  firewalling before this command runs though, otherwise there's an
  opportunity for packets to slip through.



  6.4.  -j REDIR doesn't work!

  You must allow forwarding packets (see above) for redirect to work;
  otherwise the routing code drops the packet.  So if you are just using
  redirect, and don't have any forwarding at all, you should be aware of
  that.


  Note that REDIR (being in the input chain) doesn't effect connections
  from a local process.


  6.5.  Wildcard Interfaces Don't Work!

  There was a bug in versions 2.1.102 and 2.1.103 of the kernel (and
  some old patches I produced) which made ipchains commands which
  specified a wildcard interface (such as -i ppp+) fail.


  This is fixed in recent kernels, and in the 2.0.34 patch on the web
  site.  You can also fix it by hand in the kernel source by changing
  line 63 or so in include/linux/ip_fw.h:



       #define IP_FW_F_MASK    0x002F  /* All possible flag bits mask   */



  This should read ``0x003F''.  Fix this and recompile the kernel.


  6.6.  TOS Doesn't Work!

  This was my mistake: setting the Type of Service field did not
  actually set the Type of Service in kernel versions 2.1.102 through
  2.1.111.  This problem was fixed in 2.1.112.


  6.7.  ipautofw and ipportfw Don't Work!

  For 2.0.x, this is true; I haven't time to create and maintain a jumbo
  patch for ipchains and ipautofw/ipportfw.


  For 2.1.x, download Juan Ciarlante's ipmasqadm from

  <url url="http://juanjox.linuxhq.com/"
          name="http://juanjox.linuxhq.com/">


  and use it exactly as you would have used ipautofw or ipportfw, except
  instead of ipportfw you type ipmasqadm portfw, and instead of ipautofw
  you type ipmasqadm autofw.


  6.8.  xosview is Broken!

  Upgrade to version 1.6.0 or above, which doesn't require any firewall
  rules at all for 2.1.x kernels.  This seems to have broken again in
  the 1.6.1 release; please bug the author (it's not my fault!).


  6.9.  Segmentation Fault With `-j REDIRECT'!

  This was a bug in ipchains version 1.3.3.  Please upgrade.



  6.10.  I Can't Set Masquerading Timeouts!

  True (for 2.1.x kernels) up to 2.1.123.  In 2.1.124, trying to set the
  masquerading timeouts causes a kernel lockup (change return to ret =
  on line 1328 of net/ipv4/ip_fw.c).  In 2.1.125, it works fine.


  6.11.  I Want to Firewall IPX!

  So do a number of others, it seems.  My code only covers IP,
  unfortunately.  On the good side, all the hooks are there to firewall
  IPX!  You just need to write the code; I will happily help where
  possible.


  7.  A Serious Example.

  This example was extracted from Michael Neuling and my March 1999
  LinuxWorld Tutorial; this is not the only way to solve the given
  problem, but it is probably the simplest.  I hope you will find it
  informative.



  7.1.  The Arrangement


    Masqueraded internal network (various operating systems), which we
     call "GOOD".

    Exposed servers in a separate network (called "DMZ" for
     Demilitarized Zone).

    PPP Connection to the Internet (called "BAD").



          External Network (BAD)
                  |
                  |
              ppp0|
           ---------------
           | 192.84.219.1|             Server Network (DMZ)
           |             |eth0
           |             |----------------------------------------------
           |             |192.84.219.250 |             |              |
           |             |               |             |              |
           |192.168.1.250|               |             |              |
           ---------------          --------       -------        -------
                  | eth1            | SMTP |       | DNS |        | WWW |
                  |                 --------       -------        -------
                  |              192.84.219.128  192.84.219.129  192.84.218.130
                  |
          Internal Network (GOOD)



  7.2.  Goals


  Packet Filter box:


      PING any network
        This is really useful to tell if a machine is down.


      TRACEROUTE any network
        Once again, useful for diagnosis.


      Access DNS
        To make ping and DNS more useful.



  Within the DMZ:


  Mail server

    SMTP to external

    Accept SMTP from internal and external

    Accept POP-3 from internal

  Name Server

    Send DNS to external

    Accept DNS from internal, external and packet filter box


  Web server

    Accept HTTP from internal and external

    Rsync access from internal


  Internal:

     Allow WWW, ftp, traceroute, ssh to external
        These are fairly standard things to allow: some places start by
        allowing the internal machines to do just about everything, but
        here we're being restrictive.


      Allow SMTP to Mail server
        Obviously, we want them to be able to send mail out.


      Allow POP-3 to Mail server
        This is how they read their mail.


      Allow DNS to Name server
        They need to be able to look up external names for WWW, ftp,
        traceroute and ssh.


      Allow rsync to Web server
        This is how they synchronize the external web server with the
        internal one.


      Allow WWW to Web server
        Obviously, they should be able to connect to our external web
        server.


      Allow ping to packet filter box
        This is a courteous thing to allow: it means that they can test
        if the firewall box is down (so we don't get blamed if an
        external site is broken).



  7.3.  Before Packet Filtering


    Anti-spoofing


     Since we don't have any asymmetric routing, we can simply turn on
     anti-spoofing for all interfaces.



       # for f in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 1 > $f; done
       #



    Set filtering rules to DENY all:


     We still allow local loopback traffic, but deny anything else.



       # ipchains -A input -i ! lo -j DENY
       # ipchains -A output -i ! lo -j DENY
       # ipchains -A forward -j DENY
       #



    Set Up Interfaces


     This is usually done in the boot scripts.  Make sure the above
     steps are done before the interfaces are configured, to prevent
     packet leakage before the rules are set up.


    Insert per-protocol masquerading modules.

     We need to insert the masquerading module for FTP, so that active
     and passive FTP `just work' from the internal network.



       # insmod ip_masq_ftp
       #


  7.4.  Packet Filtering for Through Packets

  With masquerading, it's best to filter in the forward chain.


  Split forward chain into various user chains depending on source/dest
  interfaces; this breaks the problem down into managable chunks.



       ipchains -N good-dmz
       ipchains -N bad-dmz
       ipchains -N good-bad
       ipchains -N dmz-good
       ipchains -N dmz-bad
       ipchains -N bad-good



  ACCEPTing standard error ICMPs is a common thing to do, so we create a
  chain for it.



       ipchains -N icmp-acc



  7.4.1.  Set Up Jumps From forward Chain

  Unfortunately, we only know (in the forward chain) the outgoing
  interface.  Thus, to figure out what interface the packet came in on,
  we use the source address (the anti-spoofing prevents address faking).


  Note that we log anything which doesn't match any of these (obviously,
  this should never happen).



       ipchains -A forward -s 192.168.1.0/24 -i eth0 -j good-dmz
       ipchains -A forward -s 192.168.1.0/24 -i ppp0 -j good-bad
       ipchains -A forward -s 192.84.219.0/24 -i ppp0 -j dmz-bad
       ipchains -A forward -s 192.84.219.0/24 -i eth1 -j dmz-good
       ipchains -A forward -i eth0 -j bad-dmz
       ipchains -A forward -i eth1 -j bad-good
       ipchains -A forward -j DENY -l



  7.4.2.  Define the icmp-acc Chain

  Packets which are one of the error ICMPs get ACCEPTed, otherwise,
  control will pass back to the calling chain.



  ipchains -A icmp-acc -p icmp --icmp-type destination-unreachable -j ACCEPT
  ipchains -A icmp-acc -p icmp --icmp-type source-quench -j ACCEPT
  ipchains -A icmp-acc -p icmp --icmp-type time-exceeded -j ACCEPT
  ipchains -A icmp-acc -p icmp --icmp-type parameter-problem -j ACCEPT



  7.4.3.  Good (Internal) to DMZ (Servers)

  Internal restrictions:

    Allow WWW, ftp, traceroute, ssh to external

    Allow SMTP to Mail server

    Allow POP-3 to Mail server

    Allow DNS to Name server

    Allow rsync to Web server

    Allow WWW to Web server

    Allow ping to packet filter box

  Could do masquerading from internal network into DMZ, but here we
  don't.  Since noone in the internal network should be trying to do
  evil things, we log any packets that get denied.


  Note that old versions of Debian called `pop3' `pop-3' in
  /etc/services, which disagrees with RFC1700.



       ipchains -A good-dmz -p tcp -d 192.84.219.128 smtp -j ACCEPT
       ipchains -A good-dmz -p tcp -d 192.84.219.128 pop3 -j ACCEPT
       ipchains -A good-dmz -p udp -d 192.84.219.129 domain -j ACCEPT
       ipchains -A good-dmz -p tcp -d 192.84.219.129 domain -j ACCEPT
       ipchains -A good-dmz -p tcp -d 192.84.218.130 www -j ACCEPT
       ipchains -A good-dmz -p tcp -d 192.84.218.130 rsync -j ACCEPT
       ipchains -A good-dmz -p icmp -j icmp-acc
       ipchains -A good-dmz -j DENY -l



  7.4.4.  Bad (external) to DMZ (servers).



    DMZ restrictions:

    Mail server

    SMTP to external

    Accept SMTP from internal and external

    Accept POP-3 from internal


    Name server

    Send DNS to external

    Accept DNS from internal, external and packet filter box


    Web server

    Accept HTTP from internal and external

    Rsync access from internal


    Things we allow from external network to DMZ.

    Don't log violations, as they may happen.



       ipchains -A bad-dmz -p tcp -d 192.84.219.128 smtp -j ACCEPT
       ipchains -A bad-dmz -p udp -d 192.84.219.129 domain -j ACCEPT
       ipchains -A bad-dmz -p tcp -d 192.84.219.129 domain -j ACCEPT
       ipchains -A bad-dmz -p tcp -d 192.84.218.130 www -j ACCEPT
       ipchains -A bad-dmz -p icmp -j icmp-acc
       ipchains -A bad-dmz -j DENY



  7.4.5.  Good (internal) to Bad (external).


    Internal restrictions:

    Allow WWW, ftp, traceroute, ssh to external

    Allow SMTP to Mail server

    Allow POP-3 to Mail server

    Allow DNS to Name server

    Allow rsync to Web server

    Allow WWW to Web server

    Allow ping to packet filter box

    Many people allow everything from the internal to external
     networks, then add restrictions.  We're being fascist.

    Log violations.

    Passive FTP handled by masq. module.

    UDP destination ports 33434 and up are used by traceroute.



  ipchains -A good-bad -p tcp --dport www -j MASQ
  ipchains -A good-bad -p tcp --dport ssh -j MASQ
  ipchains -A good-bad -p udp --dport 33434:33500 -j MASQ
  ipchains -A good-bad -p tcp --dport ftp -j MASQ
  ipchains -A good-bad -p icmp --icmp-type ping -j MASQ
  ipchains -A good-bad -j REJECT -l



  7.4.6.  DMZ to Good (internal).



    Internal restrictions:

    Allow WWW, ftp, traceroute, ssh to external

    Allow SMTP to Mail server

    Allow POP-3 to Mail server

    Allow DNS to Name server

    Allow rsync to Web server

    Allow WWW to Web server

    Allow ping to packet filter box


    If we were masquerading from the internal network to the DMZ,
     simply refuse any packets coming the other way. As it is, only
     allow packets which might be part of an established connection.



       ipchains -A dmz-good -p tcp ! -y -s 192.84.219.128 smtp -j ACCEPT
       ipchains -A dmz-good -p udp -s 192.84.219.129 domain -j ACCEPT
       ipchains -A dmz-good -p tcp ! -y -s 192.84.219.129 domain -j ACCEPT
       ipchains -A dmz-good -p tcp ! -y -s 192.84.218.130 www -j ACCEPT
       ipchains -A dmz-good -p tcp ! -y -s 192.84.218.130 rsync -j ACCEPT
       ipchains -A dmz-good -p icmp -j icmp-acc
       ipchains -A dmz-good -j DENY -l



  7.4.7.  DMZ to bad (external).



    DMZ restrictions:

    Mail server

    SMTP to external

    Accept SMTP from internal and external

    Accept POP-3 from internal



    Name server

    Send DNS to external

    Accept DNS from internal, external and packet filter box


    Web server

    Accept HTTP from internal and external

    Rsync access from internal


  


       ipchains -A dmz-bad -p tcp -s 192.84.219.128 smtp -j ACCEPT
       ipchains -A dmz-bad -p udp -s 192.84.219.129 domain -j ACCEPT
       ipchains -A dmz-bad -p tcp -s 192.84.219.129 domain -j ACCEPT
       ipchains -A dmz-bad -p tcp ! -y -s 192.84.218.130 www -j ACCEPT
       ipchains -A dmz-bad -p icmp -j icmp-acc
       ipchains -A dmz-bad -j DENY -l



  7.4.8.  Bad (external) to Good (internal).



    We don't allow anything (non-masqueraded) from the external network
     to the internal network


       ipchains -A bad-good -j REJECT



  7.4.9.  Packet Filtering for the Linux Box Itself



    If we want to use packet filtering on packets coming into the box
     itself, we need to do filtering in the input chain. We create one
     chain for each destination interface:


       ipchains -N bad-if
       ipchains -N dmz-if
       ipchains -N good-if



    Create jumps to them:



  ipchains -A input -d 192.84.219.1 -j bad-if
  ipchains -A input -d 192.84.219.250 -j dmz-if
  ipchains -A input -d 192.168.1.250 -j good-if



  7.4.9.1.  Bad (external) interface.



    Packet Filter box:

    PING any network

    TRACEROUTE any network

    Access DNS


    External interface also receives replies to masqueraded packets
     (masquerading uses source ports 61000 to 65095) and ICMP errors for
     them and PING replies.



       ipchains -A bad-if -i ! ppp0 -j DENY -l
       ipchains -A bad-if -p TCP --dport 61000:65095 -j ACCEPT
       ipchains -A bad-if -p UDP --dport 61000:65095 -j ACCEPT
       ipchains -A bad-if -p ICMP --icmp-type pong -j ACCEPT
       ipchains -A bad-if -j icmp-acc
       ipchains -A bad-if -j DENY



  7.4.9.2.  DMZ interface.



    Packet Filter box restrictions:

    PING any network

    TRACEROUTE any network

    Access DNS


    DMZ interface receives DNS replies, ping replies and ICMP errors.



       ipchains -A dmz-if -i ! eth0 -j DENY
       ipchains -A dmz-if -p TCP ! -y -s 192.84.219.129 53 -j ACCEPT
       ipchains -A dmz-if -p UDP -s 192.84.219.129 53 -j ACCEPT
       ipchains -A dmz-if -p ICMP --icmp-type pong -j ACCEPT
       ipchains -A dmz-if -j icmp-acc
       ipchains -A dmz-if -j DENY -l



  7.4.9.3.  Good (internal) interface.



    Packet Filter box restrictions:

    PING any network

    TRACEROUTE any network

    Access DNS


    Internal restrictions:

    Allow WWW, ftp, traceroute, ssh to external

    Allow SMTP to Mail server

    Allow POP-3 to Mail server

    Allow DNS to Name server

    Allow rsync to Web server

    Allow WWW to Web server

    Allow ping to packet filter box


    Internal interface receives pings, ping replies and ICMP errors.



       ipchains -A good-if -i ! eth1 -j DENY
       ipchains -A good-if -p ICMP --icmp-type ping -j ACCEPT
       ipchains -A good-if -p ICMP --icmp-type pong -j ACCEPT
       ipchains -A good-if -j icmp-acc
       ipchains -A good-if -j DENY -l



  7.5.  Finally


    Delete blocking rules:


       ipchains -D input 1
       ipchains -D forward 1
       ipchains -D output 1



  8.  Appendix: Differences between ipchains and ipfwadm.

  Some of these changes are a result of kernel changes, and some a
  result of ipchains being different from ipfwadm.



  1. Many arguments have been remapped: capitals now indicates a
     command, and lower case now indicates an option.

  2. Arbitrary chains are supported, so even built-in chains have full
     names instead of flags (eg. `input' instead of `-I').

  3. The `-k' option has vanished: use `! -y'.

  4. The `-b' option actually inserts/appends/deletes two rules, rather
     than a single `bidirectional' rule.

  5. The `-b' option can be passed to `-C' to do two checks (one in each
     direction).

  6. The `-x' option to `-l' has been replaced by `-v'.

  7. Multiple source and destination ports are not supported anymore.
     Hopefully being able to negate the port range will somewhat make up
     for that.

  8. Interfaces can only be specified by name (not address).  The old
     semantics got silently changed in the 2.1 kernel series anyway.

  9. Fragments are examined, not automatically allowed through.

  10.
     Explicit accounting chains have been done away with.

  11.
     Arbitrary protocols over IP can be tested for.

  12.
     The old behavior of SYN and ACK matching (which was previously
     ignored for non-TCP packets) has changed; the SYN option is not
     valid for non-TCP-specific rules.

  13.
     Counters are now 64-bit on 32-bit machines, not 32-bit.

  14.
     Inverse options are now supported.

  15.
     ICMP codes are now supported.

  16.
     Wildcard interfaces are now supported.

  17.
     TOS manipulations are now sanity-checked: the old kernel code would
     silently stop you from (illegally) manipulating the `Must Be Zero'
     TOS bit; ipchains now returns an error if you try, as well as for
     other illegal cases.


  8.1.  Quick-Reference table.

  [ Mainly, command arguments are UPPER CASE, and option arguments are
  lower case ]


  One thing to note, masquerading is specified by `-j MASQ'; it is
  completely different from `-j ACCEPT', and not treated as merely a
  side-effect, unlike ipfwadm does.


  ================================================================
  | ipfwadm      | ipchains              | Notes
  ----------------------------------------------------------------
  | -A [both]    | -N acct               | Create an `acct' chain
  |              |& -I 1 input -j acct   | and have output and input
  |              |& -I 1 output -j acct  | packets traverse it.
  |              |& acct                 |
  ----------------------------------------------------------------
  | -A in        | input                 | A rule with no target
  ----------------------------------------------------------------
  | -A out       | output                | A rule with no target
  ----------------------------------------------------------------
  | -F           | forward               | Use this as [chain].
  ----------------------------------------------------------------
  | -I           | input                 | Use this as [chain].
  ----------------------------------------------------------------
  | -O           | output                | Use this as [chain].
  ----------------------------------------------------------------
  | -M -l        | -M -L                 |
  ----------------------------------------------------------------
  | -M -s        | -M -S                 |
  ----------------------------------------------------------------
  | -a policy    | -A [chain] -j POLICY  | (but see -r and -m).
  ----------------------------------------------------------------
  | -d policy    | -D [chain] -j POLICY  | (but see -r and -m).
  ----------------------------------------------------------------
  | -i policy    | -I 1 [chain] -j POLICY| (but see -r and -m).
  ----------------------------------------------------------------
  | -l           | -L                    |
  ----------------------------------------------------------------
  | -z           | -Z                    |
  ----------------------------------------------------------------
  | -f           | -F                    |
  ----------------------------------------------------------------
  | -p           | -P                    |
  ----------------------------------------------------------------
  | -c           | -C                    |
  ----------------------------------------------------------------
  | -P           | -p                    |
  ----------------------------------------------------------------
  | -S           | -s                    | Only takes one port or
  |              |                       | range, not multiples.
  ----------------------------------------------------------------
  | -D           | -d                    | Only takes one port or
  |              |                       | range, not multiples.
  ----------------------------------------------------------------
  | -V           | <none>                | Use -i [name].
  ----------------------------------------------------------------
  | -W           | -i                    |
  ----------------------------------------------------------------
  | -b           | -b                    | Now actually makes 2 rules.
  ----------------------------------------------------------------
  | -e           | -v                    |
  ----------------------------------------------------------------
  | -k           | ! -y                  | Doesn't work unless
  |              |                       | -p tcp also specified.
  ----------------------------------------------------------------
  | -m           | -j MASQ               |
  ----------------------------------------------------------------
  | -n           | -n                    |
  ----------------------------------------------------------------
  | -o           | -l                    |
  ----------------------------------------------------------------
  | -r [redirpt] | -j REDIRECT [redirpt] |
  ----------------------------------------------------------------
  | -t           | -t                    |
  ----------------------------------------------------------------
  | -v           | -v                    |
  ----------------------------------------------------------------
  | -x           | -x                    |
  ----------------------------------------------------------------
  | -y           | -y                    | Doesn't work unless
  |              |                       | -p tcp also specified.
  ----------------------------------------------------------------



  8.2.  Examples of translated ipfwadm commands

  Old command: ipfwadm -F  -p deny

  New command: ipchains -P forward DENY


  Old command: ipfwadm -F -a m -S 192.168.0.0/24 -D 0.0.0.0/0

  New command: ipchains -A forward -j MASQ -s 192.168.0.0/24 -d
  0.0.0.0/0


  Old command: ipfwadm -I -a accept -V 10.1.2.1 -S 10.0.0.0/8 -D
  0.0.0.0/0

  New command: ipchains -A input -j ACCEPT -i eth0 -s 10.0.0.0/8 -d
  0.0.0.0/0

  (Note that there is no equivalent for specifying interfaces by
  address: use the interface name.  On this machine, 10.1.2.1
  corresponds to eth0).


  9.  Appendix: Using the ipfwadm-wrapper script.

  The ipfwadm-wrapper shell script should be a plug-in replacement of
  ipfwadm for backwards compatibility with ipfwadm 2.3a.


  The only feature it can't really handle is the `-V' option.  When this
  is used, a warning is given.  If the `-W' option is also used, the
  `-V' option is ignored.  Otherwise, the script tries to find the
  interface name associated with that address, using ifconfig.  If that
  fails (such as for an interface which is down) then it will exit with
  an error message.


  This warning can be suppressed by either changing the `-V' to a `-W',
  or directing the standard output of the script to /dev/null.


  If you should find any mistakes in this script, or any changes between
  the real ipfwadm and this script, please report a bug to me: send an
  EMail to rusty@linuxcare.com with "BUG-REPORT" in the subject.  Please
  list your old version of ipfwadm (ipfwadm -h), your version of
  ipchains (ipchains --version), the version of the ipfwadm wrapper
  script (ipfwadm-wrapper --version).  Also send the output of ipchains-
  save.  Thanks in advance.


  Mix ipchains with this ipfwadm-wrapper script at your own peril.


  10.  Appendix: Thanks.

  Many thanks have to go to Michael Neuling, who wrote the first
  releasable cut of the IP chains code while working for me.  Public
  apologies for nixing his result-caching idea, which Alan Cox later
  proposed and I have finally begun implementing, having seen the error
  of my ways.


  Thanks to Alan Cox for his 24-hour EMail tech support, and
  encouragement.


  Thanks to all the authors of the ipfw and ipfwadm code, especially Jos
  Vos.  Standing on the shoulders of giants and all that...  This
  applies to Linus Torvalds and all the kernel and userspace hackers as
  well.


  Thanks to the diligent beta testers and bughunters, especially Jordan
  Mendelson, Shaw Carruthers, Kevin Moule, Dr. Liviu Daia, Helmut Adams,
  Franck Sicard, Kevin Littlejohn, Matt Kemner, John D. Hardin, Alexey
  Kuznetsov, Leos Bitto, Jim Kunzman, Gerard Gerritsen, Serge Sivkov,
  Andrew Burgess, Steve Schmidtke, Richard Offer, Bernhard Weisshuhn,
  Larry Auton, Ambrose Li, Pavel Krauz, Steve Chadsey, Francesco
  Potorti`, Alain Knaff, Casper Boden-Cummins and Henry Hollenberg.


  10.1.  Translations

  People who do translations should put themselves at the top of the
  Thanks page, like so: `Special thanks to XXX, for translating
  everything exactly from my English.'.  Then tell me about your
  translation so I can include it here.


  Arnaud Launay, asl@launay.org:
  http://www.freenix.fr/unix/linux/HOWTO/IPCHAINS-HOWTO.html
  <http://www.freenix.fr/unix/linux/HOWTO/IPCHAINS-HOWTO.html>


  Giovanni Bortolozzo, borto@pluto.linux.it:
  http://www.pluto.linux.it/ildp/HOWTO/IPCHAINS-HOWTO.html
  <http://www.pluto.linux.it/ildp/HOWTO/IPCHAINS-HOWTO.html>


  Herman Rodrguez, herman@maristas.dhis.org:
  http://netfilter.kernelnotes.org/ipchains/spanish/HOWTO.html
  <http://netfilter.kernelnotes.org/ipchains/spanish/HOWTO.html>



  Linux IPX-HOWTO
  Kevin Thorpe, kevin@pricetrak.com
  v2.3, 06 May 1998

  This document aims to describe how to obtain, install and configure
  various tools available for the the Linux operating system that use
  the Linux kernel IPX protocol support.
  ______________________________________________________________________

  Table of Contents



  1. Introduction.

     1.1 Changes from the previous release.
     1.2 Introduction.

  2. Disclaimer.

  3. Related Documentation.

     3.1 New versions of this document.
     3.2 Feedback.
     3.3 Mailing list support.

  4. Some of the terms used in this document.

  5. A brief discussion of IPX network topology

  6. The IPX related files in the

  7. Greg Pages IPX tools.

     7.1 The IPX tools in more detail.

  8. Configuring your Linux machine as an IPX router.

     8.1 Do I need to configure an internal network ?

  9. Configuring your Linux machine as an NCP client.

     9.1 Obtaining
     9.2 Building
     9.3 Building
     9.4 Configuring and using

  10. Configuring your Linux machine as an NCP server.

     10.1 The
        10.1.1 Capability of
        10.1.2 Obtaining
        10.1.3 Building the
     10.2 The
        10.2.1 Capability of
        10.2.2 Obtaining
        10.2.3 Building
        10.2.4 Configuring and using

  11. Configuring your Linux machine as a Novell Print Client.

  12. Configuring your Linux machine as a Novell Print Server.

     12.1 Prerequisites
     12.2 Configuration

  13. An overview of the

     13.1 User commands.
     13.2 Administration tools.

  14. Configuring PPP for IPX support.

     14.1 Configuring an IPX/PPP server.
        14.1.1 First steps.
        14.1.2 Design.
        14.1.3 Configure
        14.1.4 Test the server configuration.
     14.2 Configuring an IPX/PPP client.
        14.2.1 Configuring
        14.2.2 Testing the IPX/PPP client.

  15. IPX tunnel over IP

     15.1 Obtaining
     15.2 Building
     15.3 Configuring
     15.4 Testing and using

  16. Commercial IPX support for Linux.

     16.1 Caldera'a Network Desktop

  17. Some Frequently Asked Questions

  18. Copyright Message.

  19. Miscellaneous and Acknowledgements.



  ______________________________________________________________________

  1.  Introduction.

  This is the Linux IPX-HOWTO. You should read the Linux NET-3-HOWTO in
  conjunction with this document.


  1.1.  Changes from the previous release.



  Change of author:
          Many thanks to Terry Dawson for passing on this document and
          congratulations on becoming a father :-).

  Additions:
          Addition of a brief explanation of IPX. This is in response to
          many baffled queries on the discussion lists.

  Corrections/Updates:
          New version of ncpfs which now supports NDS logins. This is early
          beta test and may be prohibited in your country due to the use of
          patented technology.

          Addition of support for trustee rights in mars_nwe. This is still
          in beta test.



  1.2.  Introduction.

  The Linux Kernel has a completely new network implementation as
  compared to other Unix like operating systems. The ability to take a
  fresh approach to developing the kernel networking software has led to
  the Linux kernel having support for a range of non tcp/ip protocols
  being built. The IPX protocol is one of those that have been included.

  The Linux kernel supports the IPX protocol only. It does not yet
  support protocols such as IPX/RIP, SAP or NCP, these are supported by
  other software such as that documented elsewhere in this document.


  The IPX support was originally developed by Alan Cox
  <alan@lxorguk.ukuu.org.uk> and has been significantly enhanced by Greg
  Page <greg@caldera.com>.


  2.  Disclaimer.

  I do not and cannot know everything there is to know about the Linux
  network software. Please accept and be warned that this document
  probably does contain errors. Please read any README files that are
  included with any of the various pieces of software described in this
  document for more detailed and accurate information. I will attempt to
  keep this document as error-free and up-to-date as possible. Versions
  of software are current as at time of writing.

  In no way do I or the authors of the software in this document offer
  protection against your own actions. If you configure this software,
  even as described in this document and it causes problems on your
  network then you alone must carry the responsibility. I include this
  warning because IPX network design and configuration is not always a
  simple matter and sometimes undesirable interaction with other routers
  and fileservers can result if you do not design or configure your
  network carefully. I also include this warning because I was asked to
  by someone unfortunate enough to have discovered this lesson the hard
  way.


  3.  Related Documentation.

  This document presumes you understand how to build a Linux kernel with
  the appropriate networking options selected and that you understand
  how to use the basic network tools such as ifconfig and route.  If you
  do not, then you should read the NET-3-HOWTO <NET-3-HOWTO.html> in
  conjunction with this document as it describes these.

  Other Linux HOWTO documents that might be useful are:

  The Ethernet-HOWTO <Ethernet-HOWTO.html>, which describes the details
  of configuring an Ethernet device for Linux.

  The PPP-HOWTO <PPP-HOWTO.html> as IPX support is available for version
  2.2.0d and later of the Linux PPP implementation.


  3.1.  New versions of this document.

  If your copy of this document is more than two months old then I
  strongly recommend you obtain a newer version. The networking support
  for Linux is changing very rapidly with new enhancements and features,
  so this document also changes fairly frequently. The latest released
  version of this document can always be retrieved by anonymous ftp
  from:

  ftp:/sunsite.unc.edu/pub/Linux/docs/HOWTO/IPX-HOWTO>/ or:
  ftp:/sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/IPX-
  HOWTO{-html.tar,ps,dvi}.gz>/ via the World Wide Web from the Linux
  Documentation Project Web Server
  <http://sunsite.unc.edu/LDP/linux.html>, at page: IPX-HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/IPX-HOWTO.html> or directly from me,
  <kevin@pricetrak.com>. It may also be posted to the newsgroups:
  comp.os.linux.networking, comp.os.linux.answers and news.answers from
  time to time.



  3.2.  Feedback.

  Please send any comments, updates, or suggestions to me,
  <kevin@pricetrak.com>. The sooner I get feedback, the sooner I can
  update and correct this document. If you find any problems with it,
  please mail me directly as I can miss info posted to the newsgroups.


  3.3.  Mailing list support.

  There is a mailing list established for discussion of the various
  Linux IPX software packages described in this document. You can
  subscribe to it by sending a mail message to `listserv@sh.cvut.cz'
  with `add linware' in the body of the message. To post to the list
  your send your mail to `linware@sh.cvut.cz'. I regularly watch this
  list.

  The mailing list is archived at www.kin.vslib.cz
  <http://www.kin.vslib.cz/hypermail/linware/>.


  4.  Some of the terms used in this document.

  You will often see the terms client and server used in this document.
  They are normally fairly specific terms but in this document I have
  generalized their definitions a little so that they mean the
  following:

     client
        The machine or program that initiates an action or a connection
        for the purpose of gaining use of some service or data.

     server
        The machine or program that accepts incoming connections from
        multiple remote machines and provides a service or data to
        those.

  These definitions are not very reliable either, but they provide a
  means of distinguishing the ends of peer to peer systems such as SLIP
  or PPP which truly do not actually have clients and servers.

  Other terms you will see are:

     Bindery
        The bindery is a specialised database storing network
        configuration information on a Novell fileserver. Netware
        clients may query the bindery to obtain information on available
        services, routing and user information.

     Frame Type
        is a term used to describe that actual protocol used to carry
        the IPX (and IP) datagrams across your ethernet style network
        segments. There are four common ones. They are:

        Ethernet_II
           This is a refined version of the original DIX ethernet
           standard. Novell has been allocated a formal protocol id and
           this means that both IPX and IP can coexist happily in an
           Ethernet_II environment quite happily. This is commonly used
           in Novell environments and is a good choice.

        802.3
           This is an I.E.E.E. protocol defining a Carrier Sense
           Multiple Access with Collision Detection (CSMA/CD) mechanism.
           It was based on the original DIX Ethernet standard, with an
           important modification, the type (protocol id) field was
           converted into a length field instead. It is for this reason
           that IPX really shouldn't be run here. IEEE 802.3 was
           designed to carry IEEE 802.2 frames only but there are
           implementations that use it to carry IPX frames directly and
           remarkably it does work. Avoid it unless you are trying to
           interwork with a network already configured to use it.

        802.2
           This is an I.E.E.E. protocol that defines a set of Logical
           Link Control procedures. It provides a simplistic way of
           allowing different protocols to coexist, but is quite limited
           in this respect. Novell uses an unofficial Service Address
           Point (like a protocol id) but since everyone else uses it as
           well, that hasn't yet presented too much of a problem.

        SNAP
           SNAP is the Sub Network Access Protocol. This protocol is
           designed ride on top of 802.3 and 802.2. It expands the
           multiprotocol capability of 802.2 and provides some measure
           of compatability with existing Ethernet and Ethernet_II frame
           types.


     IPX
        Internet Packet eXchange is a protocol used by the Novell
        corporation to provide internetworking support for their
        NetWare(tm) product.  IPX is similar in functionality to the IP
        protocol used by the tcp/ip community.

     IPX network address
        This is a number which uniquely identifies a particular IPX
        network. The usual notation for this address is in hexadecimal.
        An example might look like: 0x23a91002.

     IPX Internal network
        This is a virtual IPX network. It is virtual because it does not
        correspond to a physical network. This is used to provide a
        means of uniquely identifying and addressing a particular IPX
        host. This is generally only useful to IPX hosts that exist on
        more than one physical IPX network such as fileservers. The
        address is coded in the same form as for a physical IPX network.

     RIP
        Routing Information Protocol is a protocol used to automatically
        propagate network routes in an IPX network. It is functionally
        similar to the RIP used within the tcp/ip community.

     NCP
        NetWare Core Protocol is a networked filesystem protocol
        designed by the Novell Corporation for their NetWare(tm)
        product. NCP is functionally similar to the NFS used in the
        tcp/ip community.

     SAP
        Service Advertisement Protocol is a protocol designed by the
        Novell Corporation that is used to advertise network services in
        a NetWare(tm) environment.

     Hardware address
        This is a number that uniquely identifies a host in a physical
        network at the media access layer. Examples of this are Ethernet
        Addresses. An Ethernet address is generally coded as six
        hexadecimal values separated by colon characters eg.
        00:60:8C:C3:3C:0F


     route
        The route is the path that your packets take through the network
        to reach their destination.


  5.  A brief discussion of IPX network topology

  This is a much simplified explanation for people new to IPX. Large
  networks will probably break lots of the rules explained here. In
  complex IPX networks the administrator should always be consulted.

  IPX networking revolves around a scheme of numbered networks unlike IP
  which places more emphasis on the interface addresses. A network is a
  collection of equipment connected to the same LAN segment and using
  the same frame type. Different frame types on the same LAN segment are
  treated as seperate networks.

  Each network must be allocated a number which is unique across the
  entire internetwork. This is usually performed by a NetWare(tm)
  server, but can easily be performed by Linux. IPX clients are given
  this number by the server when starting, they only require to know the
  correct frame type.

  Routing between networks is usually performed by putting two network
  cards in a server. This server then runs the RIP protocol which holds
  a routing table for the internetwork. Periodic broadcasts of this
  routing table are exchanged between servers. Within a short time each
  server 'discovers' the topology of the internetwork.

  If you only wish to use the services of an existing NetWare server,
  you can use ipx_configure (section 7.1) to automatically define the
  IPX interfaces by using broadcast queries to look for a server. If
  this fails, or you wish to provide IPX services, you will need to
  define the interfaces manually using ipx_interface or mars_nwe.


  6.  The IPX related files in the /proc  filesystem.

  There are a number of files related to the Linux IPX support that are
  located within the /proc filesystem. They are:


     /proc/net/ipx_interface
        This file contains information about the IPX interfaces
        configured on your machine. These may have been configured
        manually by command or automatically detected and configured.

     /proc/net/ipx_route
        This file contains a list of the routes that exist in the IPX
        routing table. These routes may have been added manually by
        command or automatically by an IPX routing daemon.

     /proc/net/ipx
        This file is a list of the IPX sockets that are currently open
        for use on the machine.


  7.  Greg Pages IPX tools.

  Greg Page <greg@caldera.com of Caldera Incorporated has written a
  suite of IPX configuration tools and enhanced the Linux IPX kernel
  support.

  The kernel enhancements allow linux to be configured as a fully
  featured IPX bridge or router. The enhanced IPX support has already
  been fed back into the mainstream kernel distribution so you will
  probably already have it.

  The network configuration tools provide you with the capability to
  configure your network devices to support IPX and allow you to
  configure IPX routing and other facilities under Linux. The Linux IPX
  network tools are available from: sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/ipx.tgz>.


  7.1.  The IPX tools in more detail.


     ipx_interface
        This command is used to manually add, delete or check ipx
        capability to an existing network device. Normally the network
        device would be an Ethernet device such at eth0. At least one
        IPX interface must be designated the primary interface and the
        -p flag to this command does this. For example to enable
        Ethernet device eth0 for IPX capability as the primary IPX
        interface using the IEEE 802.2 frame type and IPX network
        address 39ab0222 you would use:


          # ipx_interface add -p eth0 802.2 0x39ab0222



     If the frame type differs from NetWare(tm) servers on this network,
     they will studiously ignore you. If the frame type is correct but
     the network number differs, they will still ignore you but complain
     frequently on the NetWare server console. The latter is guaranteed
     to gain you flames from your NetWare administrator and may disrupt
     existing NetWare clients.

     If you get an error while running this program and you happen to
     not have already configured tcp/ip, then you will find that you
     need to manually start the eth0 interface using the command:


          # ifconfig eth0 up



     ipx_configure
        This command enables or disables the automatic setting of the
        interface configuration and primary interface settings.

        --auto_interface
           allows you to select whether new network devices should be
           automatically configured as IPX devices or not.

        --auto_primary
           allows you to select whether the IPX software should
           automatically select a primary interface or not. Problems
           have been noted using this with Windows 95 clients on the
           network.

        A typical example would be to enable both automatic interface
        configuration and automatic primary interface setting with the
        following command:



     # ipx_configure --auto_interface=on --auto_primary=on



     ipx_internal_net
        This command allows you to configure or deconfigure an internal
        network address. An internal network address is optional, but
        when it is configured it will always be the primary interface.
        To configure an IPX network address of ab000000 on IPX node 1
        you would use:


          # ipx_internal_net add 0xab000000 1



     ipx_route
        The command allows you to manually modify the IPX routing table.
        For example to add a route to IPX network 39ab0222 via a router
        with node number 00608CC33C0F on IPX network 39ab0108:


          # ipx_route add 0x39ab0222 0x39ab0108 0x00608CC33C0F



  8.  Configuring your Linux machine as an IPX router.

  If you have a number of IPX segments that you wish to internetwork you
  need the services of a router. In the Novell environment there are two
  pieces of information which are necessary to be propagated around the
  network.  They are the network routing information propagated using
  Novell RIP, and the service advertisement information propagated using
  Novell SAP. Any router must support both of these protocols to be
  useful in most situations.

  Linux has support for both of these protocols and can be fairly easily
  made to function as a fully Novell compliant router.

  The Linux kernel IPX support actually manages the IPX packet
  forwarding across interfaces, but it does this according to the rules
  coded into the IPX routing table. Linux needs a program to implement
  the Novell RIP and SAP to ensure that the IPX routing table is built
  correctly and updated periodically to reflect changes in the network
  status.

  Volker Lendecke <lendecke@namu01.gwdg.de> has developed a routing
  daemon ipxripd that will do this for you. The mars_nwe package
  mentioned later includes an alternative routing daemon.

  You can find ipxripd at:

  sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/ipxripd-0.7.tgz>

  or at Volkers home site at:

  ftp.gwdg.de <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/ipxripd-0.7.tgz>


  Configuring your Linux machine to act as a router is very
  straightforward.  The steps you must take are:

  1. Build your kernel with IPX, Ethernet and /proc support.

  2. Obtain, compile and install the ipxd daemon program.

  3. Boot the new kernel and ensure that each of the Ethernet cards has
     been properly detected and there are no hardware conflicts.

  4. Enable the IPX protocol on each of the interfaces using the
     ipx_interface command described above.

  5. Start the ipxd daemon program.

  Consider the following simple network:


   IPX Addr: 0x01000000  802.2
  |--------------------------|
                |
                \_________________________
                                          \          Linux Router
   IPX Addr: 0x02000000  802.2             \
  |--------------------------|              \   eth0/-----------\
                |                            \--====|           |
                \_________________________          | IPX route |
                                          \     eth1|  Table    |
   IPX Addr: 0x03000000  etherII           \----====|    ^      |
  |--------------------------|                      |    |      |
                |                               eth2|  IPXd     |
                \______________________________/====|           |
                                                    |  SAPd     |
   IPX Addr: 0x04000000  etherII                eth3|           |
  |--------------------------|                 /====|           |
                |                              |    \___________/
                \______________________________/



  The configuration for the above network would look like:


       # ipx_interface add eth0 802.2 0x0100000000
       # ipx_interface add eth1 802.2 0x0200000000
       # ipx_interface add eth2 etherii 0x0300000000
       # ipx_interface add eth3 etherii 0x0400000000
       # ipxd



  You should then wait a moment or two and check your
  /proc/net/ipx_route file and you should see it populated with the IPX
  routes relevant to your configuration and any learned from any other
  routers in the network.


  8.1.  Do I need to configure an internal network ?

  Novell has a feature called an internal network, which it uses to
  simplify routing in situations where a host has more than one network
  device connected.  This is useful in the case of a fileserver
  connected to multiple networks as it means that only one route needs
  to be advertised to reach the server regardless of which network you
  are attempting from.
  In the case of a configuration where you are not running a fileserver
  and your machine acting only as an IPX router the question is not as
  simple to answer. It has been reported that configuring for IPX/PPP
  works `better' if you also configure an internal network.

  In any case it is easy to do, but may require a rebuild of your
  kernel.  When you are working through the kernel make config you must
  answer y when asked Full internal IPX network as illustrated:



         ...
         ...
        Full internal IPX network (CONFIG_IPX_INTERN) [N/y/?] y
         ...
         ...



  To configure the internal network interface, use the ipx_internal_net
  command described earlier in the IPX tools section. The main
  precaution to take is to ensure that they IPX network address you
  assign is unique on your network and that no other machine or network
  is using it.


  9.  Configuring your Linux machine as an NCP client.

  If you are a user of a mixed technology network that comprises both IP
  and IPX protocols it is likely that at some time or another you have
  wanted to have your Linux machine access data stored on a Novell
  fileserver on your network. Novell have long offered an NFS server
  package for their fileservers that would allow this, but if you are a
  small site or have only a small number of people interested in doing
  this it is difficult to justify the cost of the commercial package.

  Volker Lendecke <lendecke@namu01.gwdg.de> has written a Linux
  filesystem kernel module that supports a subset of the Novell NCP that
  will allow you to mount Novell volumes into your Linux filesystem
  without requiring any additional products for your fileserver.  Volker
  has called the package ncpfs and derived the necessary information
  mainly from the book "Netzwerkprogrammierung in C" by Manfred Hill and
  Ralf Zessin (further details of the book are contained within the
  README file in the ncpfs package).

  The software causes Linux to emulate a normal Novell workstation for
  file services. It also includes a small print utility that allows you
  to print to Novell print queues (This is documented in the Print
  Client section later).  The ncpfs package will work with Novell
  fileservers of version 3.x and later, it will not work the Novell 2.x.
  The ncpfs client will also work with close Novell compatible products,
  but unfortunately some products that claim to be compatible aren't
  compatible enough. To use ncpfs with Novell 4.x fileservers, it is
  preferred to use the Novell server in bindery emulation mode. The NDS
  support is a very recent early beta addition to ncpfs and additionally
  its use may be prohibited in your country due to the inclusion of
  patented technology.



  9.1.  Obtaining ncpfs .

  The latest ncpfs package was designed to be built against the version
  1.2.13 kernel or kernels later than 1.3.71 (this includes 2.x.x).  If
  you not using a kernel in either of these categories then you will
  have to upgrade your kernel. The Kernel-HOWTO <Kernel-HOWTO.html>
  describes how to do this in detail.

  You can obtain the ncpfs package by anonymous ftp from Volker's home
  site at: ftp.gwdg.de <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/> or
  sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs> or mirror
  sites. The current version at the time of writing was:

  ncpfs-2.0.11.tgz or ncpfs-2.2.0.tgz which adds the NDS support.


  9.2.  Building ncpfs  for kernel 1.2.13.


     Build a kernel with Ethernet and IPX support
        The first thing you need to do is ensure that your kernel has
        been built with IPX support enabled.  In the 1.2.13 version
        kernel you need only ensure that you have answered Y to the
        question: 'The IPX protocol' as illustrated:

         ...
         ...
        Assume subnets are local (CONFIG_INET_SNARL) [y]
        Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n]
        The IPX protocol (CONFIG_IPX) [n] y
        *
        * SCSI support
         ...
         ...


     You will also need to ensure that you include an appropriate driver
     for your Ethernet card. If you do not know how to do this then you
     should read the Ethernet-HOWTO <Ethernet-HOWTO.html>.

     You can then proceed to build your kernel. Make sure you remember
     to run lilo to install it when you have finished.


     Untar the ncpfs software

        # cd /usr/src
        # tar xvfz ncpfs-2.0.11.tgz
        # cd ncpfs



     Check the Makefile
        If you intend to use kerneld to autoload the ncpfs kernel module
        then you must uncomment the line in the Makefile that refers to:
        KERNELD. If you are unsure what this means then you should read
        the Kernel-HOWTO <Kernel-HOWTO.html> to familiarise yourself
        with kernel module configuration.


     Make the ncpfs software
        The software should compile cleanly with no other configuration
        necessary:

        # make



     Copy the IPX tools somewhere useful if you don't already have them.
        After the make has completed you should find all of the tools
        you need in the ncpfs/bin directory. You can use:



          # make install



     to install the tools in Volkers choice of directories. If you are
     running on an ELF based system then you will need to rerun
     `ldconfig -v' to ensure that the shared library is able to be
     found.


     Copy the ncpfs.o module somewhere useful if necessary.
        If you are compiling for a 1.2.* kernel then you will find a
        file called ncpfs.o in the ncpfs/bin directory after the make
        has completed. This is the ncpfs kernel module.  You should copy
        this somewhere useful. On my debian system I have copied it to
        the /lib/modules/1.2.13/fs directory and added ncpfs to the
        /etc/modules file so that it will be automatically started at
        boot time. If you are using some other distribution you should
        find where it keeps its modules and copy it there, or just copy
        it to your /etc directory. To load the modules manually you need
        to use the command:

        # insmod ncpfs.o



  9.3.  Building ncpfs  for kernels 1.3.71++/2.0.*.

  For the latest version of ncpfs you must use kernel 1.3.71 or newer,
  this includes the 2.0.* kernels.

  If you intend using a kernel that is version 1.3.71 or newer then the
  ncpfs kernel code has been included in the standard kernel
  distribution. You need only answer Y to:


       Networking options  --->
           ...
           ...
           <*> The IPX protocol
           ...
       Filesystems  --->
           ...
           ...
           <*> NCP filesystem support (to mount NetWare volumes)
           ...



  You will still need to follow the instructions for building for
  kernels 1.2.* so that you can build the tools but there will not be a
  module file for you to install.



  9.4.  Configuring and using ncpfs .


     Configure the IPX network software
        There are two ways of configuring the IPX network software. You
        can manually configure all of your IPX network information or
        you can choose to let the software determine for itself some
        reasonable settings using the command:



          # ipx_configure --auto_interface=on --auto_primary=on



     This should be reasonable in most circumstances, but if it doesn't
     work for you then read the 'IPX tools' section above to configure
     your software manually. Problems have been noted using this on
     networks containing Windows '95 clients.


     Test the configuration
        After your IPX network is configured you should be able to use
        the slist command to see a list of all of the Novell fileserver
        on your network:

        # slist


     If the slist command displays a message like: ncp_connect: Invalid
     argument then your kernel probably does not support IPX. Check that
     you have actually booted off the appropriate kernel.  When you boot
     you should see messages about 'IPX' and 'ncpfs' in the system
     startup messages. If the slist command does not list all of your
     fileservers then you may need to use the manual network configura-
     tion method.


     Mount a Novell(tm) server or volume.
        If your IPX network software is working ok you should now be
        able to mount a Novell fileserver or volume into your Linux
        filesystem. The ncpmount command is used for this purpose and
        requires that you specify at least the following information:

        1. The fileserver name

        2. (optionally) The fileserver directory to mount

        3. The fileserver login id. If it has a password you will also
           need that.

        4. The mount point ie. where you want the mount to go. This will
           be an existing directory on your machine.

        There is an equivalent ncpumount command to unmount a mounted
        NCP filesystem. The NCP filesystems will be unmounted cleanly if
        you shutdown your machine normally, so you needn't worry about
        ncpumounting your filesystems manually before a halt or
        shutdown.

        An example command to mount fileserver ACCT_FS01, with a login
        id of guest with no password, under the /mnt/Accounts directory
        might look like the following:


        # ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n


     Note the use of the -n option to indicate that no password is
     required for the login. The same login specifying a password of
     secret would look like:

     # ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -P secret


     If you don't specify either the -n or the -P options you will be
     prompted for a password.


     Check the mount
        If the mount is successful you will find all the volumes
        accessible to the userid used for login listed as directories
        under the mount point. You should then also be able to traverse
        the directory structure to find other files. You may
        alternatively use the -V option to mount a single volume.

        NCP does not provide uid or gid ownership of files. All the
        files will have the permission and ownership assigned to the
        mount point directory restricted by trustee permissions on the
        Novell server. Bear this in mind when sharing mounts between
        Linux users.


     Configure mounts to be automatically performed.
        If you have some need to permanently have an ncp mount then you
        will want to configure the commands above into your rc files so
        that they occur automatically at boot time. If your distribution
        doesn't already provide some way of configuring IPX like debian
        then I recommend you place them in your /etc/rc.local file if
        you have one. You might use something like:


          #
          # Start the ncp filesystem

          /sbin/insmod /lib/modules/1.2.13/fs/ncpfs.o

          # configure the IPX network
          ipx_configure --auto_interface=on --auto_primary=on

          # guest login to the Accounting fileserver
          ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n

          #



     There is another means of configuring NCP mounts and that is by
     building a $HOME/.nwclient file. This file contains details of tem-
     porary or user specific NCP mounts that would be performed regu-
     larly. It allows you to store the details of mounts so that you can
     recreate them without having to specify all of the detail each
     time.

     Its format is quite straightforward:



     # The first entry is the 'preferred server' entry and is
     # used whenever you do not specify a server explicitly.
     #
     # User TERRY login to DOCS_FS01 fileserver with password 'password'
     DOCS_FS01/TERRY password
     #
     # Guest login to the ACCT_FS01 fileserver with no password.
     ACCT_FS01/GUEST -



     To activate these mounts you could use:


          $ ncpmount /home/terry/docs



     to mount: DOCS_FS01 with a login of TERRY under the
     /home/terry/docs directory. Note that this entry was chosen because
     no fileserver was specified in the mount command. If the following
     command were used:


          $ ncpmount -S ACCT_FS01 /home/terry/docs



     then a GUEST login to ACCT_FS01 would be mounted there instead.

     Note: for this mechanism to work the permissions of the
     $HOME/.nwclient file must be 0600 so you would need to use the
     command:


          $ chmod 0600 $HOME/.nwclient



     If non-root users are to be allowed to use this mechanism then the
     ncpmount command must be Set Userid Root, so you would need to give
     it permissions:


          # chmod 4755 ncpmount



     Try out the nsend utility
        a utility to send messages to Novell users is also included in
        the package, it is called nsend and is used as follows:

        # nsend rod hello there


     would send the message "hello there" to a logged in user "rod" on
     your "primary" fileserver (the first one appearing in your
     .nwclient file. You can specify another fileserver with the same
     syntax as for the ncpmount command.

  10.  Configuring your Linux machine as an NCP server.

  There are two packages available that allow Linux to provide the
  functions of a Novell Fileserver. They both allow you to share files
  on your linux machine with users using Novell NetWare client software.
  Users can attach and map filesystems to appear as local drives on
  their machines just as they would to a real Novell fileserver. You may
  want to try both to see which best serves your intended purpose.


  10.1.  The mars_nwe  package.

  Martin Stover <mstover@freeway.de> developed mars_nwe to enable linux
  to provide both file and print services for NetWare clients.

  In case you are wondering about the name: mars_nwe is Martin Stovers
  Netware Emulator.


  10.1.1.  Capability of mars_nwe .

  mars_nwe implements a subset of the full Novell NCP for file services,
  disk based bindery and also print services. It is likely to contain
  bugs but there are many people using it now and the number of bugs is
  steadily decreasing as new versions are released.


  10.1.2.  Obtaining mars_nwe .

  You can obtain mars_nwe from ftp.gwdg.de
  <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/> or from
  <ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/>.

  The version current at the time of writing was:
  mars_nwe-0.99.pl10.tgz.


  10.1.3.  Building the mars_nwe  package.


     Build a kernel with Ethernet and IPX Support
        In the 1.2.13 version kernel you need only ensure that you have
        answered Y to the question: 'The IPX protocol' and N to the
        question: `Full internal IPX network' as illustrated:

         ...
         ...
        The IPX protocol (CONFIG_IPX) [n] y
         ...
         ...
        Full internal IPX network (CONFIG_IPX_INTERN) [N/y/?] n
         ...
         ...


     In newer kernels a similar process is adopted but the actual text
     of the prompt may have changed slightly.

     You will also need to ensure that you include an appropriate driver
     for your Ethernet card. If you do not know how to do this then you
     should read the Ethernet-HOWTO <Ethernet-HOWTO.html>.

     You can then proceed to build your kernel. Make sure you remember
     to run lilo to install it when you have finished.


     Untar the mars_nwe package.


          # cd /usr/src
          # tar xvfz mars_nwe-0.99.pl10.tgz



     Make mars_nwe.
        To make the package is very simple.  The first step is to simply
        run make, this will create a config.h file for you. Next you
        should look at and edit the config.h file if necessary. It
        allows you to configure items such as the installation
        directories that will be used and the maximum number of sessions
        and volumes that the server will support. The really important
        entries to look at are:

        FILENAME_NW_INI       the location of the initialisation file
        PATHNAME_PROGS        where the executable support programs will be found.
        PATHNAME_BINDERY      where the 'bindery' files will go.
        PATHNAME_PIDFILES     the directory for the 'pid' files to be written.
        MAX_CONNECTIONS       the maximum number of simultaneous connections allowed.
        MAX_NW_VOLS           the maximum number of volumes mars_nwe will support.
        MAX_FILE_HANDLES_CONN the maximum number of open files per connection.
        WITH_NAME_SPACE_CALLS if you want to support ncpfs clients.
        INTERNAL_RIP_SAP      whether you want mars_nwe to provide rip/sap routing.
        SHADOW_PWD            whether you use shadow passwords or not.



     The defaults will probably be ok but you should check anyway.

     When this is done:


          # make
          # make install



     will build the servers and install them in the appropriate
     directory. The installation script also installs the configuration
     file /etc/nwserv.conf.


     Configure the server.
        Configuration is fairly simple. You need to edit the
        /etc/nwserv.conf file. The format of this file may at first look
        a little cryptic, but it is fairly straightforward. The file
        contains a number of single line configuration items. Each line
        is whitespace delimited and begins with a number that indicates
        the contents of the line. All characters following a '#'
        character are considered a comment and ignored. Martin supplies
        an example configuration file in the package, but I'll present
        what I consider to be a simplified example to offer an
        alternative for you.



     # VOLUMES (max. 5)
     # Only the SYS volume is compulsory. The directory containing the SYS
     # volume must contain the directories: LOGIN, PUBLIC, SYSTEM, MAIL.
     # The 'i' option ignores case.
     # The 'k' option converts all filenames in NCP requests to lowercase.
     # The 'm' option marks the volume as removable (useful for cdroms etc.)
     # The 'r' option set the volume to read-only.
     # The 'o' option indicates the volume is a single mounted filesystem.
     # The 'P' option allows commands to be used as files.
     # The 'O' option allows use of the OS/2 namespace
     # The 'N' option allows use of the NFS namespace
     # The default is upper case.
     # Syntax:
     #    1 <Volumename> <Volumepath>   <Options>

     1   SYS         /home/netware/SYS/               # SYS
     1   DATA        /home/netware/DATA/      k       # DATA
     1   CDROM       /cdrom                   kmr     # CDROM

     # SERVER NAME
     # If not set then the linux hostname will be converted to upper case
     # and used. This is optional, the hostname will be used if this is not
     # configured.
     # Syntax:
     #    2 <Servername>

     2   LINUX_FS01

     # INTERNAL NETWORK ADDRESS
     # The Internal IPX Network Address is a feature that simplifies IPX routing
     # for multihomed hosts (hosts that have ports on more than one IPX network).
     # Syntax:
     #    3 <Internal Network Address> [<Node Number>]
     # or:
     #    3 auto
     #
     # If you use 'auto' then your host IP address will be used. NOTE: this may
     # be dangerous, please be sure you pick a number unique to your network.
     # Addresses are 4byte hexadecimal (the leading 0x is required).

     3   0x49a01010  1


     # NETWORK DEVICE(S)
     # This entry configures your IPX network. If you already have your
     # IPX network configured then you do not need this. This is the same as
     # using ipx_configure/ipx_interface before you start the server.
     # Syntax:
     #    4 <IPX Network Number> <device_name> <frametype> [<ticks>]
     #                         Frame types: ethernet_ii, 802.2, 802.3, SNAP

     4  0x39a01010  eth0  802.3  1

     # SAVE IPX ROUTES AFTER SERVER IS DOWNED
     # Syntax:
     #    5 <flag>
     #       0 = don't save routes, 1 = do save routes

     5 0

     # NETWARE VERSION
     # Syntax:
     #    6 <version>
     #      0 = 2.15, 1 = 3.11

     6 1
     # PASSWORD HANDLING
     # Real Novell DOS clients support a feature which encypts your
     # password when changing it. You can select whether you want your
     # mars server to support this feature or not.
     # Syntax
     #    7 <flag>
     #    <flag> is:
     #        0 to force password encryption. (Clients can't change password)
     #        1 force password encryption, allow unencrypted password change.
     #        7 allow non-encrypted password but no empty passwords.
     #        8 allow non-encrypted password including empty passwords.
     #        9 completely unencrypted passwords (doesn't work with OS/2)

     7 1

     # MINIMAL GID UID rights
     # permissions used for attachments with no login. These permissions
     # will be used for the files in your primary server attachment.
     # Syntax:
     #    10 <gid>
     #    11 <uid>
     #    <gid> <uid> are from /etc/passwd, /etc/groups

     10  200
     11  201

     # SUPERVISOR password
     # May be removed after the server is started once. The server will
     # encrypt this information into the bindery file after it is run.
     # You should avoid using the 'root' user and instead use another
     # account to administer the mars fileserver.
     #
     # This entry is read and encrypted into the server bindery files, so
     # it only needs to exist the first time you start the server to ensure
     # that the password isn't stolen.
     #
     # Syntax:
     #    12 <Supervisor-Login> <Unix username> [<password>]

     12  SUPERVISOR  terry  secret

     # USER ACCOUNTS
     # This associates NetWare logins with unix accounts. Password are
     # optional.
     # Syntax:
          13 <User Login> <Unix Username> [<password>]

     13  MARTIN martin
     13  TERRY  terry

     # LAZY SYSTEM ADMIN CONFIGURATION
     # If you have a large numbers of users and could not be bothered using
     # type 13 individual user mappings, you can automatically map mars_nwe
     # logins to linux user names. BUT, there is currently no means of making
     # use of the linux login password so all users configured this way are
     # will use the single password supplied here. My recommendation is not
     # to do this unless security is absolutely no concern to you.
     # Syntax:
     #    15 <flag> <common-password>
     #    <flag> is: 0  - don't automatically map users.
     #               1  - do automatically map users not configured above.
     #               99 - automatically map every user in this way.

     15  0  duzzenmatta

     # SANITY CHECKING
     # mars_nwe will automatically ensure that certain directories exist if
     # you set this flag.
     # Syntax:
     #    16 <flag>
     #    <flag> is 0 for no, don't, or 1 for yes, do.

     16  0

     # PRINT QUEUES
     # This associates NetWare printers with unix printers. The queue
     # directories must be created manually before printing is attempted.
     # The queue directories are NOT lpd queues.
     # Syntax:
     #    21 <queue_name> <queue_directory> <unix_print_cmd>

     21  EPSON  SYS:/PRINT/EPSON lpr -h
     21  LASER  SYS:/PRINT/LASER lpr -Plaser

     # DEBUG FLAGS
     # These are not normally needed, but may be useful if are you debugging
     # a problem.
     # Syntax:
     #    <debug_item> <debug_flag>
     #
     #    100 = IPX KERNEL
     #    101 = NWSERV
     #    102 = NCPSERV
     #    103 = NWCONN
     #    104 = start NWCLIENT
     #    105 = NWBIND
     #    106 = NWROUTED
     #                 0 = disable debug, 1 = enable debug

     100 0
     101 0
     102 0
     103 0
     104 0
     105 0
     106 0

     # RUN NWSERV IN BACKGROUND AND USE LOGFILE
     # Syntax:
     #    200 <flag>
     #        0 = run NWSERV in foreground and don't use logfile
     #        1 = run NWSERV in background and use logfile

     200  1

     # LOGFILE NAME
     # Syntax:
     #    201 <logfile>

     201  /tmp/nw.log

     # APPEND LOG OR OVERWRITE
     # Syntax:
     #    202 <flag>
     #        0 = append to existing logfile
     #        1 = overwrite existing logfile

     202  1

     # SERVER DOWN TIME
     # This item sets the time after a SERVER DOWN is issued that the
     # server really goes down.
     # Syntax:
     #    210 <time>
     #        in seconds. (defaults 10)

     210  10

     # ROUTING BROADCAST INTERVAL
     # The time is seconds between server broadcasts
     # Syntax:
     #    211 <time>
     #        in seconds. (defaults 60)

     211  60

     # ROUTING LOGGING INTERVAL
     # Set how many broadcasts take place before logging of routing
     # information occurs.
     # Syntax:
     #    300  <number>

     300  5

     # ROUTING LOGFILE
     # Set the name of the routing logfile
     # Syntax:
     #    301 <filename>

     301  /tmp/nw.routes

     # ROUTING APPEND/OVERWRITE
     # Set whether you want to append to an existing log file or
     # overwrite it.
     # Syntax:
     #    302 <flag>
     #        <flag> is 0 for append, 1 for create/overwrite

     302  1

     # WATCHDOG TIMING
     # Set the timing for watchdog messages that ensure the network is
     # still alive.
     # Syntax:
     #    310 <value>
     #        <value> =   0 - always send watchdogs
     #                  < 0 - (-ve) for disable watchdogs
     #                  > 0 - send watchdogs when network traffic
     #                        drops below 'n' ticks

     310  7

     # STATION FILE
     # Set the filename for the stations file which determine which
     # machines this fileserver will act as the primary fileserver for.
     # The syntax of this file is described in the 'examples' directory
     # of the source code.
     # Syntax:
     #    400 <filename>

     400  /etc/nwserv.stations

     # GET NEAREST FILESERVER HANDLING
     # Set how SAP Get Nearest Fileserver Requests are handled.
     # Syntax:
     #    401 <flag>
     #        <flag> is: 0 - disable 'Get Nearest Fileserver' requests.
     #                   1 - The 'stations' file lists stations to be excluded.
     #                   2 - The 'stations' file lists stations to be included.

     401  2



     Start the server
        If you've configured the server to expect external programs to
        configure your network and/or provide the routing function then
        you should start those before starting the server. Presuming you
        have configured the server so that it will configure your
        interfaces for you and provide the routing services you need
        only issue the command:


          # nwserv



     Test the server
        To test the server you should first try to attach and login from
        a NetWare client on your network. You then set a CAPTURE from
        the client and attempt a print. If both of these are successful
        then the server is working.


  10.2.  The lwared  package.

  Ales Dryak <A.Dryak@sh.cvut.cz> developed lwared to allow Linux to
  function as an NCP based fileserver.

  Ales has called the package lwared, an abbreviation for LinWare
  Daemon.


  10.2.1.  Capability of lwared .

  The lwared server is capable of providing a subset of the full
  function of the Novell NCP. It incorporates messaging but it does not
  provide any printing facilities at all. It does not currently work
  very well with either Windows95 or Windows NT clients. The lwared
  server relies on external programs to build and update the IPX routing
  and SAP tables.  Misbehaving clients can cause the server to crash.
  Importantly, filename translation facilities have not been included.

  The server does work for NETX and VLM NetWare shells.


  10.2.2.  Obtaining lwared

  The lwared package can be built for any kernel newer than 1.2.0, I
  recommend you use version 1.2.13 as no kernel patches are required if
  you do. Some of the IPX functionality has changed with the version
  1.3.* kernels and this means that patches are now required to make it
  work properly. Appropriate patches are included for the new kernels,
  so if you must use an alpha kernel you should still be able to get
  lwared to work properly for you.

  You can obtain the lwared package by anonymous ftp from:
  klokan.sh.cvut.cz <ftp://klokan.sh.cvut.cz/pub/linux/linware/>


  or from:

  sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/system/network/daemons> or mirror
  sites. The current version at the time of writing was:
  lwared-0.95.tar.gz


  10.2.3.  Building lwared


     Untar the lwaredpackage
        Something like:

        # cd /usr/src
        # tar xvpfz lwared-0.95.tar.gz



     Build a kernel with Ethernet and IPX support
        If you are using an alpha 1.3.* kernel then you should try and
        use kernel version 1.3.17 or newer because the supplied patches
        were built against it. 1.3.* kernels older than 1.3.17 will
        require hand patching to install. (some information on how to do
        this is included in the INSTALL file in the package.). To
        install the patches against a 1.3.17 kernel or newer you should
        try:

        # make patch



     After applying the patches if necessary, the next thing you need to
     do is ensure that your kernel has been built with IPX support
     enabled. In the 1.2.13 version kernel you need only ensure that you
     have answered Y to the question: 'The IPX protocol' as illustrated:

      ...
      ...
     Assume subnets are local (CONFIG_INET_SNARL) [y]
     Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n]
     The IPX protocol (CONFIG_IPX) [n] y
     *
     * SCSI support
      ...
      ...


     In newer kernels a similar process is adopted by the actual text of
     the prompt may have changed slightly.

     You will also need to ensure that you include an appropriate driver
     for your Ethernet card. If you do not know how to do this then you
     should read the Ethernet-HOWTO <Ethernet-HOWTO.html>.

     You can then proceed to build your kernel. Make sure you remember
     to run lilo to install it when you have finished.


     Compile and install lwared.
        To compile lwared you should first check, edit if necessary, the
        server/config.h file. This file contains various settings that
        will govern the way your server will behave when it is running.
        The defaults are reasonable, though you might want to check that
        the directories specified for the log files and configuration
        files suit your system.

        # make depend
        # make
        # make install


     I found that the 'make depend' complained about not finding the
     float.h file on my system but appeared to work anyway.  I also
     found that when I tried compiling with gcc 2.6.3 I found I had to
     change the line:

     #include <net/route.h>


     to

     #include <net/if_route.h>


     in lib/ipxkern.c as this file changed name sometime.

     The 'make install' will attempt to install the server and routing
     daemon programs into your /usr/sbin directory, the lwpasswd program
     into your /usr/bin directory, the IPX utility programs will be
     installed into your /sbin directory and last but not least the
     manual pages will go into the /usr/man directory structure. If any
     of these locations are not suitable for your system then you should
     edit the relevant Makefile and change the target directories to
     suit.



  10.2.4.  Configuring and using lwared

  Now the fun bit!


     Configuring the IPX network
        The first thing you must do is configure your Ethernet
        interfaces to support the IPX networks your server will support.
        To do this you will need to know the IPX network addresses for
        each of your LAN segments, which Ethernet device (eth0, eth1
        etc.) is on which segment, what frame type (802.3, EtherII etc.)
        each LAN segment uses and what Internal Network address your
        server should use (this is really needed if your server will
        service more than one LAN segment).  A configuration for a
        server that is on two dis-similar segments with IPX network
        addresses 23a91300 and 23a91301 and internal network address
        bdefaced might look like:

        # ipx_internal_net add BDEFACED 1
        # ipx_interface add eth0 802.3 23a91300
        # ipx_interface add eth1 etherii 23a91301



     Start the routing daemons
        The kernel software itself actually does the IPX packet
        forwarding as it does for IP, but the kernel requires additional
        programs to manage the routing table updates. In the case of IPX
        two daemons are needed and both are supplied with lwared:
        ipxripd manages the IPX routing information and ipxsapd manages
        the SAP information.  To start the daemons you need only specify
        the location of where they should write their log messages:
        # ipxripd /var/adm/ipxrip
        # ipxsapd /var/adm/ipxsap



     Configure the lwared server
        There are two files that you must manually configure to allow
        user login to your lwared server.  They are:



        /etc/lwpasswd
           This is where LinWare user account information is kept. The
           lwpasswd program is to keep it up to date.  In its simplest
           form the /etc/lwpasswd file looks like:

           ales:
           terryd:
           guest:


        Its format is a simple list of login id followed by a ':' char-
        acter and then the encrypted version of the login passwd. A cou-
        ple of important caveats here: No encrypted password means no
        password, LinWare users must have Linux accounts, that is any
        user you place in /etc/lwpasswd must also appear in /etc/passwd
        and root is the only account that can change the password of
        another LinWare user. If you are logged in as root you can
        change the password of a LinWare user as this transcript demon-
        strates:

        # lwpasswd rodg
        Changing password for RODG
        Enter new password:
        Re-type new password:
        Password changed.



        /etc/lwvtab
           This is the LinWare volume tables and it stores information
           about what directories should be made available to LinWare
           users (this file is similar in nature to the NFS /etc/exports
           file). A simple example of its format is as follows:

           SYS             /lwfs/sys
           DATA            /lwfs/data
           HOME            /home


        The format is simple: Volume name followed by whitespace fol-
        lowed by Linux directory to export. You must have at least an
        entry for the SYS volume for the server to start. If you intend
        your DOS based users to be able use your LinWare server as their
        primary server then you must install a standard SYS volume
        directory structure underneath the directory you export as your
        SYS volume. Since these files are proprietary and copyright to
        the Novell corporation you should have a license for these. If
        you users will be using a Novell fileserver as their primary
        server then this will not be necessary.


     Start the lwared server.
        tada!

        # lwared


     It is almost an anticlimax isn't it ? Ok so you've got a question,
     right?  What is the fileserver name that is being advertised ? If
     you started the server as shown then the LinWare server name being
     advertised will be based on what is returned by the Linux hostname.
     If you'd like it to be something else then you can give the server
     the name when you start it, for example:

     # lwared -nlinux00


     would start the server with the name linux00.


     Test the lwared server.
        The very first thing to test is that your LinWare server appears
        in an slist from a DOS client on your network. The slist program
        is stored on the SYS volume of a Novell fileserver so you must
        do this from a machine that is already logged in somewhere. If
        this is not successful then check that ipxsapd and lwared are
        both running. If the slist is successful then you should try
        attaching to the server and mapping a volume:

        C:> attach linux00/ales
         ...
         ...
        C:> map l:=linux00/data:
        C:> l:


     You should then be able to treat the new map just like any other
     map. The file permissions you will have will be based on those
     allowed to the linux account that parallels your LinWare login.



  11.  Configuring your Linux machine as a Novell Print Client.

  The ncpfs package includes two small programs that allow you to handle
  printing from you Linux machine to a printer attached to a Novell
  print server.  The nprint command allows you to print to a file to a
  NetWare print queue. The pqlist command allows you the list the
  available print queues on a NetWare server.

  To obtain and install these commands just follow the instructions
  relating to the NCP client described earlier.

  Both commands require that you supply username and password so you
  might normally consider building some shell scripts to make the task
  of printing easier.

  An example might look like:


       # pqlist -S ACCT_FS01 -U guest -n
       # nprint -S ACCT_FS01 -q LASER -U guest -n filename.txt



  The login syntax is similar to the ncpmount command. The examples
  above assume that fileserver ACCT_FS01 has a guest account with no
  password, that a print queue called LASER exists and that guest is
  allowed to print to it.
  On my Linux boxen I have a short shell script for each Novell printer.
  This can then be used as a print filter to allow printing using the
  standard Linux spooler.


  12.  Configuring your Linux machine as a Novell Print Server.

  A program to allow your Linux machine to act as a print server on a
  Netware network is included in the ncpfs package. For instructions on
  how to obtain and build, it follow the directions in the `Netware
  client' section above. Alternatively, support is included in the
  mars_nwe package.



  12.1.  Prerequisites

  Configuration is quite straightforward but relies on you already
  having your printer configuration completed and working under Linux.
  This is covered in the Printing-HOWTO <Printing-HOWTO.html> in some
  depth.


  12.2.  Configuration

  When you have a working printer configuration, and you have built and
  installed the pserver utility then you need to add commands to start
  it into your rc files.

  Exactly what command will use will depend on depend on exactly how you
  want it to operate, but in its simplest form something like the
  following will work:



       # pserver -S ACCT_01 -U LASER -P secret -q LASERJET



  This example asks the pserver utility to login in to the ACCT_01
  fileserver with username LASER and password secret and to take jobs
  from the LASERJET print queue. When an incoming print job is received
  it will use the default print command of lpr to feed the print job to
  the Linux print daemon. The print queue must already be defined on the
  fileserver and the username must have server priveliges for the queue.

  You could if you wished use any Linux command to accept and print the
  print job. The -c argument allows you to specify the exact print
  command.  For example:


       # pserver -S ACCT_01 -U LASER -P secret -q LASERJET -c "lpr -Plaserjet"



  would do exactly the same as the previous example except it would send
  the job to the laserjet printcap configuration instead of the default
  one.


  13.  An overview of the ncpfs  user and adminstration commands

  Recent versions of Volker's ncpfs package include a range of user and
  administration commands that you might want to use. The tools are
  built and installed as part of the ncpfs installation process, so if
  you haven't already, follow the instructions supplied in the Novell
  Client section above to build and install them.

  Detailed information is available in the supplied man pages but a
  brief summary of the commands is as follows;


  13.1.  User commands.


     ncopy
        Network Copy - allows efficient file copies to be performed by
        using a Netware function rather than a copy across the network.

     nprint
        Network Print - allows you to print a file to a Netware print
        queue on a Netware server.

     nsend
        Network Send - allows you to send messages to other users on a
        Netware server.

     nwbols
        List Bindery Objects - allows you to list the bindery contents
        of a Netware server.

     nwboprops
        List Properties of a Bindery Object - allows you to the
        properties of a Netware bindery object.

     nwbpset
        Set Bindery Property - allows you to set the properties of a
        Netware bindery object.

     nwbpvalues
        Print Netware Bindery Objects Property Contents - allows you to
        print the contents of a Netware bindery property.

     nwfsinfo
        Fileserver Information - prints some summary information about a
        Netware server.

     nwpasswd
        Netware Password - allows you to change a Netware users
        password.

     nwrights
        Netware Rights - displays the rights associated with a
        particular file or directory.

     nwuserlist
        Userlist - lists the users currently logged into a Netware
        fileserver.

     pqlist
        Print Queue List - displays the contents of a Netware print
        queue.

     slist
        Server List - displays a list of know Netware fileserver.



  13.2.  Administration tools.


     nwbocreate
        Create a Bindery Object - allows you to create a Netware bindery
        object.

     nwborm
        Remove Bindery Object - allows you to delete a Netware bindery
        object.

     nwbpadd
        Add Bindery Property - allows you to set the value of an
        existing property of a Netware bindery object.

     nwbpcreate
        Create Bindery Property - allows you to create a new property
        for an existing Netware bindery object.

     nwbprm
        Remove Bindery Property - allows you to remove a property from a
        Netware bindery object.

     nwgrant
        Grant Trustee Rights - allows you to assign trustee rights to a
        directory on a Netware fileserver.

     nwrevoke
        Revoke Trustee Rights - allows you to remove trustee rights from
        a directory on a Netware fileserver.



  14.  Configuring PPP for IPX support.

  New versions of the pppd PPP daemon for Linux have support that allows
  you to carry IPX packets across a PPP serial link. You need at least
  version ppp-2.2.0d of the daemon. See the PPP-HOWTO <PPP-HOWTO.html>
  for details on where to find it. When you compile pppd you must ensure
  you enable the IPX support by adding the following two lines:



       IPX_CHANGE = 1
       USE_MS_DNS = 1



  to: /usr/src/linux/pppd-2.2.0f/pppd/Makefile.linux.

  The IPX_CHANGE is what configures the IPX support into PPP.  The
  USE_MS_DNS define allows Microsoft Windows95 machines to do Name
  Lookups.

  The real trick to getting it to work in knowing how to configure it.

  There are many ways of doing this, but I'm only going to describe the
  two that I've received any information on. I've tried neither yet, so
  consider this section experimental, and if you get something to work,
  please let me know.



  14.1.  Configuring an IPX/PPP server.

  The first thing you need to do is configure your Linux machine as an
  IP/PPP server. Don't panic! This isn't difficult. Again, follow the
  instructions in the PPP-HOWTO <PPP-HOWTO.html> and you should be
  pretty much ok. When you have this done there are a couple of simple
  modifications you need to make to get IPX working over the same
  configuration.


  14.1.1.  First steps.

  One of the first steps you must take is to configure your linux
  machine as an IPX router as described in the appropriate section
  earlier in this document.  You won't need to use the ipx_route command
  for the ppp interface because pppd will configure these for you as it
  does for IP. When you have the ipxd daemon running it will
  automatically detect any new IPX interfaces and propogates routes for
  them. In this way your dialup hosts will be seen by other machines
  automatically when they connect.



  14.1.2.  Design.

  When you are running as a server it will normally be your
  responsibility to assign network address to each of the PPP links when
  they are established.  This is an important point, each PPP link will
  be an IPX network and will have a unique IPX network address. This
  means that you must decide how you will allocate addresses and what
  what they will be. A simple convention is to allocate one IPX network
  address to each serial device that will support IPX/PPP. You could
  allocate IPX network addresses based on the login id of the connecting
  user, but I don't see any particularly good reason to do so.

  I will assume that this is what you have done, and that there are two
  serial devices (modems) that we will use. The addresses I've assigned
  in this contrived example are:



       device IPX Network Address
       ------ -------------------
       ttyS0  0xABCDEF00
       ttyS1  0xABCDEF01



  14.1.3.  Configure pppd .

  Configure your /etc/ppp/options.ttyS0 file as follows:



       ipx-network 0xABCDEF00
       ipx-node 2:0
       ipxcp-accept-remote



  and your /etc/ppp/options.ttyS1 file as:


       ipx-network 0xABCDEF01
       ipx-node 3:0
       ipxcp-accept-remote



  These will ask pppd to allocate the appropriate IPX network addresses
  to the link when the link is established, set the local node number to
  2 or 3 and will let the remote node overwrite what the remote node
  number with what it thinks it is. Note that each of the addresses are
  hexadecimal numbers and that 0x is required at the start of the
  network address, but not required at the start of the node address.

  There are other places this information could be configured. If you
  have only one dialin modem then an entry could go into the
  /etc/ppp/options file. Alternatively this information can be passed on
  the command line to pppd.


  14.1.4.  Test the server configuration.

  To test the configuration you will need to have a client configuration
  that is known to work. When the caller dials in, logs in and pppd
  starts it will assign the network address, advise the client of the
  servers node number and negotiate the clients node number. When this
  has completed, and after ipxd has detected the new interface the
  client should be able to establish IPX connections to remote hosts.


  14.2.  Configuring an IPX/PPP client.

  In a client configuration, whether or not you configure your Linux
  machine as an IPX router depends on whether you have a local LAN that
  you wish to act as an IPX router for. If you are a standalone machine
  connecting to an IPX/PPP dialin server then you won't need to run
  ipxd, but if you have a LAN and wish all of the machines on the LAN to
  make use of the IPX/PPP route then you must configure and run ipxd as
  described.  This configuration is much simpler because you do not have
  multiple serial devices to configure.


  14.2.1.  Configuring pppd

  The simplest configuration is one that allows the server to supply all
  of the IPX network configuration information. This configuration would
  be compatible with the server configuration described above.

  Again you need to add some options to your /etc/ppp/options file, they
  are:


       ipxcp-accept-network
       ipxcp-accept-remote
       ipxcp-accept-local



  These options tell pppd to act completely passively and accept all of
  the configuration details from the server. You could supply default
  values here for servers that don't supply details by adding ipx-
  network and ipx-node entries similar to the server configuration.



  14.2.2.  Testing the IPX/PPP client.

  To test the client you will need a known working server to dial into.
  After you have dialled in and pppd has run you should see the IPX
  details configured on your ppp0 device when you run the ifconfig
  command and you should be able to use ncpmount.

  I'm not sure whether you will have to manually add IPX routes so that
  you can reach distant fileserver or not. This seems likely. If anyone
  running this configuration could tell me I'd be grateful.


  15.  IPX tunnel over IP

  Many of you will be in a situation where you have two Novell Local
  Area Netorks with only an IP connection between them. How do you play
  multiplayer deathmatch DOOM for DOS via this arrangement you might ask
  ? Andreas Godzina <ag@agsc.han.de> has an answer for you in the form
  of ipxtunnel.

  ipxtunnel provides a bridge-like facility for IPX by allowing IPX
  packets to be encapsulated with tcp/ip datagrams so that they can be
  carried by a tcp/ip connection. It listens for IPX packets and when it
  hears one it wraps it within a tcp/ip datagram and routes it to a
  remote IP address that you specify. For this to work of course the
  machine that you route the encapsulated IPX must also be running a
  copy of the same version of ipxtunnel as you.


  15.1.  Obtaining ipxtunnel

  You can obtain ipxtunnel from sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/system/network/daemons> or mirror
  sites.


  15.2.  Building ipxtunnel

  ipxtunnel built cleanly for me using the following commands:


       # cd /usr/src
       # tar xvfz .../ipxtunnel.tgz
       # cd ipxtunnel
       # make



  15.3.  Configuring ipxtunnel

  Configuration for ipxtunnel is easy. Lets say that your friends
  machine is gau.somewhere.com and your machine is called gim.sw.edu.
  ipxtunnel uses a configuration file called /etc/ipxtunnel.conf. This
  file allows you to specify the default UDP port to use for the tcp/ip
  connection, where to send the encapsulated data and which of your
  local interfaces ipxtunnel should listen on and deliver IPX packets
  to.

  A simple configuration file would look like the following:



  #
  # /etc/ipxtunnel.conf for gim.sw.edu
  #
  # The UDP port to use:                       (default 7666)
  port 7777
  #
  # The remote machine to send IPX packets to: (no default)
  remote gau.somewhere.com
  #
  # The local interfaces to listen for IPX on: (default eth0)
  interface eth0
  interface eth1



  Obviously the other machine would have a similar configuration file
  specifying this machine as a remote host.


  15.4.  Testing and using ipxtunnel

  ipxtunnel acts like an IPX bridge, so the IPX networks at either end
  of the link should probably be the same. Andreas has never tested the
  ipxtunnel in an environment that actually supports Novell file servers
  so if you do try this in a real environment let Andreas know if it
  works or not.

  If the ipxtunnel is working you should be able to start your DOOM
  machines up at each end of the link running IPX mode and they should
  see each other.

  Andreas has only used this code over good high speed lines and he
  makes no claim as to its performance when your link is low speed.
  Again, let him know what works for you and what doesn't.



  16.  Commercial IPX support for Linux.



  16.1.  Caldera'a Network Desktop

  Caldera Inc., produce a Linux distribution that features a range of
  commercially supported enhancements including fully functional Novell
  NetWare client support. The base distribution is the well respected
  Red Hat Linux Distribution and Caldera have added their "Network
  Desktop" products to this.  The NetWare support provides a fully
  featured Novell NetWare client built on technology licensed from
  Novell Corporation. The client provides full client access to Novell
  3.x and 4.x fileservers and includes features such as NetWare
  Directory Service (NDS) and RSA encryption.

  You can obtain much more information and ordering details from the:
  Caldera Inc Web Server <http://www.caldera.com/>.

  If you work within a Netware 4.x and/or NDS environment then the
  Caldera Netware Client is the only solution available.

  If you have a business critical application for Novell support for
  Linux then the Caldera product should be something you take a close
  look at.


  17.  Some Frequently Asked Questions


     Where can I find commercially supported IPX software for Linux ?
        The Caldera Corporation offers a fully licensed and fully
        supported Netware 3.x and 4.x client. You can obtain information
        about it from the Caldera Inc Web Server
        <http://www.caldera.com/>.


     Does the IPX software work with Arcnet/Token Ring/etc. ?
        The Linux IPX software does work with ArcNet and Token Ring
        interfaces.  I haven't heard of anyone trying it with AX.25 yet.
        Configuration is the same as for configuring for ethernet except
        you will have to substitute appropriate device names in place of
        'eth0' and appopriate hardware addresses where necessary.


     How do I configure more than one IPX interface ?
        If you have more than one interface in your machine you should
        use the ipx_interface command to manually configure each one,
        you should not use the `plug n play' configuration.


     How do I choose IPX addresses ?
        IPX networking is similar, but not identical to, IP networking.
        A major difference is the way that addresses are used. IPX does
        not use the concept of subnetworking and so the sort of
        associations that you have between network addresses and
        networks is different. The rules are fairly simple:

     o  Every IPX network address must be unique on a wide area network.
        This includes Internal Network Addresses. Many organisations
        using IPX over a wide area network will have some sort of
        addressing standard that you should follow.

     o  Every Host address on an individual network must be unique. This
        means that every host on each IPX network must have a uniquely
        assigned address. In the case of ethernet network this isn't
        difficult as the cards each have a unique address. In the case
        of IPX/PPP this means you must ensure that you allocate unique
        addresses to all hosts on the network, irrespective of which end
        of the link(s) they are connected. Host address do not need to
        be unique across a wide area network as the network address is
        used in combination with the host address to uniquely identify a
        host.


     What are frame types, which should I use ?
        There are a variety of frame types in use over which you can run
        IPX.  The most common of these are described in the 'common
        terms' section of this document (under the `Frame Type entry').

        If you are installing your machine on an existing network then
        you must use whatever is already in use to allow you to
        interwork with the other hosts on the network, but if the
        installation is a brand new network you can use any of a range
        of protocols to carry  your IPX traffic. My recommendation if
        you are configuring a brand new network and you need to carry
        both IPX and IP traffic is to use the Ethernet_II frame type.


     My Windows95 machines mess up my frame type autodetection ?
        Apparently they can, yeah. I could make nasty comments, but
        instead I'll just suggest that you use the manual frame type
        configuration instead of the automatic one. It is probably the
        better way anyway.


     Why do I get the message `invalid argument' when I configure IPX ?
        You are probably not running a kernel that supports IPX, either
        recompile your kernel so it does, or double check that you have
        actually used lilo to install and run the new kernel.


     Why do I get the message `package not installed' when I configure
        IPX ?
        You are probably not running a kernel that supports IPX, either
        recompile your kernel so it does, or double check that you have
        actually used lilo to install and run the new kernel.


     Why do I get the message `IPX support not in kernel' from pppd ?
        You've probably compiled IPX as a module and not ensured that it
        was loaded before started pppd.


     How do I NFS export a mounted NCP filesystem ?
        To use NFS to export an NCP filesystem you must mount it using
        the ncpmount -V option. This option allows you to mount only one
        volume of a fileserver instead of the usual mounting of all of
        them.  When you do this your NFS daemon will allow you to export
        that filesystem in the usual way.


     Why doesn't slist work when I have an internel network with
        mars_nwe ?
        You must have the get nearest server enabled.  That is, entry
        401 in /etc/nwserv.conf should be 0 unless you have a reason for
        not responding to get nearest servers.  If you just want slist
        to work and not respond to every get nearest server request,
        include your internal network and node number in
        /etc/nwserv.stations and set entry 401 in /etc/nwserv.conf to 2.


     Does ncpfs package work with mars_nwe ?
        Martin and Volker's code is slowly beginning to converge. Recent
        versions of mars_nwe have an option to enable it to work with
        ncpfs.  You must enable the WITH_NAME_SPACE_CALLS in the
        mars_nwe config.h file.


     Is there any free DOS software to work with mars_nwe ?
        A contrived question deserves a contrived answer. I'm glad you
        asked, Martin has a package that he distributes alongside his
        mars_nwe package that offers free DOS client support for the
        mars_nwe server.  You can find it at the same sites as the
        server, and it will be called mars_dosutils-0.01.tgz. It
        includes C source code for programs such as slist.exe,
        login.exe, map.exe etc. The source is compilable with
        Borland(tm) C.



  18.  Copyright Message.

  The IPX-HOWTO, a guide to software supporting the IPX protocol for
  Linux.  Copyright (c) 1995 Terry Dawson.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the:

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.


  19.  Miscellaneous and Acknowledgements.

  Terry Dawson <terry@perf.no.itg.telstra.com.au> for the original
  document

  David E. Storey <dave@tamos.gmu.edu> and Volker Lendecke
  <lendecke@namu01.gwdg.de> both assisted greatly by supplying me with
  information for this document.  Gilbert Callaghan
  <gilbert@pokey.inviso.com>, David Higgins <dave@infra.com> and Chad
  Robinson <chadr@brtgate.brttech.com> each contributed information on
  configuring IPX/PPP.  Bennie Venter <bjv@Gil-galad.paradigm-sa.com>
  contributed some useful information relating to frame types.
  Christopher Wall <vergil@idir.net contributed some useful suggestions
  to improve the readability and layout of the document.  Axel Boldt
  <boldt@math.ucsb.edu> contributed some useful suggestions and
  feedback.  Erik D. Olson <eriko@wrq.com> provided some useful feedback
  and information on configuring PPP for IPX.  Brian King
  <root@brian.library.dal.ca> contributed a question for the FAQ
  section.

  "NetWare" is a registered trademark of the Novell Corporation
  <http://www.novell.com/>.  "Caldera" is a registered trademark of the
  Caldera Corporation <http://www.caldera.com/>.



  regards Kevin Thorpe.

  <kevin@pricetrak.com>



  Linux IR HOWTO
  Werner Heuser, < wehe@snafu.de >
  v2.8, 20 September 1999

  An introduction to Linux and infrared devices and how to use the soft-
  ware provided by the Linux/IrDA project. This package uses IrDA(TM)
  compliant standards. IrDA(TM) is an industrial standard for infrared
  wireless communication, and most laptops made after January 1996 are
  equipped with an IrDA(TM) compliant infrared transceiver. Infrared
  ports let you communicate with printers, modems, fax machines, LANs,
  and other laptops. Speed ranges from 2400bps to 4Mbps. The Linux/IrDA
  stack supports IrLAP, IrLMP, IrIAS, IrIAP, IrLPT, IrCOMM, IrOBEX, and
  IrLAN. Several of the protocols are implemented as both clients and
  servers. There is also support for multiple IrLAP connections, via
  several IrDA(TM) devices at once. The Linux/IrDA project started at
  the end of 1997 and its status is still experimental, so please don't
  expect every feature working straight. AFAIK Linux/IrDA is the _only_
  open source IrDA implementation currently available. Remote Control
  (RC) via infrared is not the aim of the project, though partly treated
  in this HOWTO.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

  2. Prerequisites

  3. Kernel

     3.1 General Parameters
     3.2 IrDA Specific Parameters
        3.2.1 IrDA subsystem support
           3.2.1.1 IrDA protocols
           3.2.1.2 IrDA protocol options
           3.2.1.3 IrDA compressors
        3.2.2 Infrared-port device drivers
           3.2.2.1 IrTTY (uses serial driver)
           3.2.2.2 Dongle support
           3.2.2.3 FIR support

  4. Linux/IrDA-Utils

     4.1 Compilation
     4.2 Precompiled Packages
     4.3 Contents of Linux/IrDA-Utils
        4.3.1 irmanager
        4.3.2 irattach
        4.3.3 load_misc
        4.3.4 /etc/irda
        4.3.5 irdaping
        4.3.6 irdadump
        4.3.7 gnobex
        4.3.8 irkbd
        4.3.9 irdalib
        4.3.10 obex

  5. Configuration

     5.1 General Configuration
     5.2 IrManager
     5.3 Low Level Drivers
        5.3.1 SIR
        5.3.2 Dongle Connection - Infrared Adapters for the Serial Port
        5.3.3 Dongle Connection - Infrared Motherboard Adapter
        5.3.4 Fast InfraRed (FIR)

  6. Specific Connections and IrDA - Protocols

     6.1 Printer Connection - IrLPT, IrTTP
     6.2 LAN Connection - IrLAN
     6.3 HP NetBeamer Connection
     6.4 Palm III Connection - IrOBEX
     6.5 Palm III Connection to IBM Thinkpad 600
        6.5.1 Prerequisites
        6.5.2 Adding support for IrDA
        6.5.3 Starting IrDA - First Steps
        6.5.4 Configuration Files
     6.6 Psion 5 Connection
     6.7 Cellular Phone Connection
        6.7.1 Ericsson
        6.7.2 NOKIA
     6.8 Digital Camera Connection
     6.9 Window$9x/NT and Linux/IrDA
        6.9.1 Introduction
        6.9.2 Connection between Linux/IrDA and Window$95 IrDA(TM)
     6.10 Linux to Linux Connection
        6.10.1 Connection Methods
        6.10.2 Compression
     6.11 Multiple Instances
     6.12 Connection to Docking Station
     6.13 Connection to Keyboard
     6.14 Connection via Serial Cable
     6.15 Peer-to-Peer Mode / Direct Mode

  7. Hardware Supported by Linux/IrDA

     7.1 Obtaining Information about the Infrared Port in Laptops
        7.1.1 SIR
        7.1.2 FIR
     7.2 Big Endian
     7.3 SMP
     7.4 Hardware Surveys

  8. Graphical User Interface (GUI)

     8.1 GNOBEX
     8.2 KDE

  9. Power Saving

  10. Beyond IrDA

     10.1 Extending Transmission Distance
     10.2 Upcoming Standards (Bluetooth and IrDA)

  11. Troubleshooting, Mailing List

     11.1 General Information
     11.2 Troubleshooting Techniques

  12. IrDA Network Neighborhood

     12.1 Laptop-Printer-PDA
     12.2 Bridging/Routing
     12.3 IPv6
     12.4 DHCP

  13. Linux/IrDA and APM

  14. Known Bugs

  15. FAQ

  16. Infrared Remote Control

     16.1 Resources
     16.2 Infrared Remote Control - IrDA

  17. Infrared and Eye Safety

  18. Credits

  19. Revision History

  20. Copyright and Disclaimer

  21. Appendix A - Configuration Script

  22. Appendix B - Serial Infrared Port Sniffers

     22.1 Sniffer by Gerd Knorr
     22.2 sersniff

  23. Appendix C - User space application for Psion 5 Palmtop Computers: psion.c

  ______________________________________________________________________


  1.  Introduction

                              Better red, than dead. - Unknown AuthorEss

  IrDA support for Linux started at the end of 1997. For 2.0.x kernels
  Linux/IrDA support worked in a totally other way and is no longer
  supported by the Linux/IrDA project. Since 2.1.131 and 2.2.0
  Linux/IrDA is part of the kernel. Please note that the status of the
  project just changed from experimental to stable with 2.2.10 kernels.


  Companies and developers which are interested in joining these efforts
  should contact the at Linux/IrDA Project <http://www.cs.uit.no/linux-
  irda/> or me at < wehe@snafu.de >.

  Some history about Linux/IrDA. The project started at the end of 1997
  with the name Linux/IrDA. Due to some troubles with the name IrDA,
  which is trademarked by the Infrared Data Association <idx>IrDA</idx>
  <http://www.irda.org/>, the name was changed to Linux/IR. At the end
  of 1998 the the relationship between both became better and the name
  was changed to Linux/IrDA again. Since February 1999 the project is an
  official member of IrDA <http://www.irda.org/members/members.asp> .


  This document is based on the "How to use" part of the Linux/IrDA
  project homepage <http://www.cs.uit.no/linux-irda/howto.html>. I also
  included material provided by the Linux/IrDA core team, the Linux/IrDA
  mailing list and other sources.

  The document is included in the LINUX DOCUMENTATION PROJECT
  <http://metalab.unc.edu/LDP>.

  The latest version of this document is available at LiLAC - Linux with
  Laptop Computers <http://www.snafu.de/~wehe/index_li.html> .

  Mathieu Arnold <arn_mat@club-internet.fr> provides the IR-HOWTO in
  French <http://www.mat.cc/> .

  The latest kernel I used is 2.2.3 and the latest irda-utils version is
  0.8.8 .

  I tried to check all information but I don't have all the necessary
  infrared hardware yet, so if something doesn't work for you, please
  don't blame me.

  Please feel free to contact me for comments or questions about the
  HOWTO. I know this material is not finished or perfect, but I hope you
  find it useful anyway. For other questions and current information
  about Linux/IrDA please ask in the Linux/IrDA mailing list as
  explained below.

  <Werner Heuser>


  2.  Prerequisites


  1. BIOS

     - Make sure your infrared port is enabled in the BIOS and check
     what interrupt and port address it uses. With some laptops it seems
     necessary to have Window$x installed to be able to set BIOS
     parameters.
  2. Docking Station

     I have got reports, that connected to a docking station the
     infrared port was disabled.



  3. Infrared Controller Chip

     - Make sure your infrared port is detected by the Linux kernel. For
     detailed information see the "Hardware Survey" section below.



  4. modutils

     - Make sure you use modutils 2.1.x by insmod --version. I use
     version 2.1.121.



  5. Shared Library

     - The shared library glibc2 aka libc6 is recommended. There are
     also efforts to use glibc2.1, you may get this at
     ftp://ftp.funet.fi/pub/gnu/funet/
     <ftp://ftp.funet.fi/pub/gnu/funet/> .

     - In some files you maybe have to change #include <net/if_packet.h>
     to #include <linux/if_packet.h> to get things to compile. This
     means using kernel headers instead of glibc headers. Please consult
     the mailing list archive, if your are interested in further
     information.

     - But libc.so.5 should work, too.

     - I am not sure wether you need the zlib library if you use the
     data compression features.



  6. IrLAN The latest release of net-tools (package netbase for
     Debian/GNU-Linux) is recommended, if you want to use an IrLAN
     connection. It's available from:
     ftp://ftp.netwinder.org/users/p/philb/net-tools/
     <ftp://ftp.netwinder.org/users/p/philb/net-tools/>,
     http://www.tazenda.demon.co.uk/phil/net-tools/
     <http://www.tazenda.demon.co.uk/phil/net-tools/> and shortly from
     ftp://ftp.cs-ipv6.lancs.ac.uk/pub/Code/Linux/Net_Tools/
     <ftp://ftp.cs-ipv6.lancs.ac.uk/pub/Code/Linux/Net_Tools/> .



  7. Graphical User Interface (GUI)

     Currently there are two graphical user interfaces for Linux/IrDA
     under development one for KDE and one for GNOME. See GUI chapter
     below. For the GNOME application you will need the Perl-GTK+ module
     and Python. You must also install all the development packages. To
     run Linux/IrDA I recommend to check the command line tools first,
     because the GUIs don't seem to be finished yet.


  8. Security

     - Most important, you must sync your disks!!! Maybe you have to
     reboot your machine. Have you read the disclaimer?



  9. Miscellaneous

     - Other useful progs: APSFILTER, EZ-Magic, MagicFilter or something
     similar for the printer configuration.


  3.  Kernel

  Please read the Kernel-HOWTO to get more information about the
  compilation process. You'll find the Linux/IrDA code in:

  /usr/src/linux/net/irda (protocol stuff)

  /usr/src/linux/drivers/net/irda (device drivers)

  /usr/src/linux/include/net/irda (header files)



  3.1.  General Parameters

  - Make sure you use kernel 2.2.x sources. If unsure about your kernel
  version try uname -r.

  - Get the latest kernel patch from the Linux/IrDA project
  http://www.cs.uit.no/linux-irda/snapshots/
  <http://www.cs.uit.no/linux-irda/snapshots/>. Or from the Alan Cox
  kernel series at ftp.linux.org.uk/pub/linux/alan/2.2/
  <ftp.linux.org.uk/pub/linux/alan/2.2/> . Put it into /usr/src or where
  else your kernel sources live and apply something like (replace
  patch-2_2.0-irdaXXX  with the actual file name):

  ______________________________________________________________________
  cd /usr/src
  tar xvzf patch-2_2.0-irdaXXX.tar.gz
  cd linux
  patch -p1 -l < ../patch-2_2.0-irdaXXX
  ______________________________________________________________________



  - Experimental support has to be enabled CONFIG_EXPERIMENTAL.

  - Enable sysctl in "General Setup" CONFIG_SYSCTL.

  - You should have proc file system support CONFIG_PROC_FS.

  - Also serial support for the SIR features CONFIG_SERIAL.

  - I am not sure wether there has to be printer support for using a
  printer with Linux/IrDA CONFIG_PRINTER. But I assume this feature is
  not necessary.

  - Networking support _must_ be enabled CONFIG_NET.

  - Make sure you have module support CONFIG_MODULES in your kernel!
  Test it e.g. with lsmod.

  - Also kerneld support CONFIG_KERNELD. But kmod (CONFIG_KMOD) also
  works. A monolithic kernel seems to work, too. But modules are highly
  recommended.

  - To use irdadump you probably have to set CONFIG_PACKET.

  If you only apply the Linux/IrDA patch, you should not have to do a
  make clean, so that should save you some time. I suggest you do
  something like this:


  ______________________________________________________________________
  make dep && make all && make modules && make install && make modules_install
  ______________________________________________________________________



  If you get really strange errors, then try to rebuild from scratch
  after a make clean.


  3.2.  IrDA Specific Parameters

  The following is my draft for
  ../linux-2.2.3/Documentation/Configure.help, parts are from Dag
  Brattli and Andreas Butz. Please consult the latest available kernel
  documentation for current information and new drivers.


  3.2.1.  IrDA subsystem support

  CONFIG_IRDA

  IrDA(TM) is an industrial standard for infrared wireless
  communication. Infrared ports let you communicate with printers,
  modems, fax machines, LANs, and laptops. Speed ranges from 2400bps to
  4Mbps. To use this features you need the irda_utils provided by the
  Linux/IrDA project http://www.cs.uit.no/linux-irda/ Further
  information you may find there and in the Linux/IR-HOWTO at
  http://www.snafu.de/~wehe/index_li.html Currently it is recommended to
  build IrDA support as modules only.  Please see
  Documentation/modules.txt. Please note the status of Linux/IrDA is
  still experimental.


  3.2.1.1.  IrDA protocols


  o  IrLAN protocol

     CONFIG_IRLAN

     Builds the IrDA network device. Use ``ifconfig eth0 <IP-NUMBER>''
     to configure it. - Just say Y


  o  IrLAN client support

     CONFIG_IRLAN_CLIENT

     If you connect to infrared devices via IrLAN one has to be the
     server and the other the client. You can use both the client and
     the server at the same time. The first one to connect becomes the
     client. - Just say Y Note: The latest patch includes peer-to-peer
     support instead.


  o  IrLAN server support

     CONFIG_IRLAN_SERVER
     If you connect to infrared devices via IrLAN one has to be the
     server and the other the client. You can use both the client and
     the server at the same time. The first one to connect becomes the
     client. - Just say Y Note: The latest patch includes peer-to-peer
     support instead.


  o  IrOBEX protocol

     CONFIG_IROBEX

     IrOBEX is a protocol for exchanging objects (files, vcards, etc.)
     over an infrared connection. You can use it to exchange files
     between linux and a PALM III. IrOBEX can also be used between two
     Linux boxes, Linux and Windows95, etc. - Just say Y


  o  IrCOMM protocol

     CONFIG_IRCOMM

     Over IrCOMM you may communicate with cellular phones, etc. To use
     this service you have to build a new device with ``mknod
     /dev/irnine c 60 64'', which works like /dev/ttySx. - Just say Y
     ..Note: major and minor number are still not the official ones yet.
     For latest improvements (IrSocket is on the way!), please look at
     the page of Takahide Higuchi
     http://www.pluto.dti.ne.jp/~thiguchi/irda/

     ..Note: At the moment IrCOMM seems to crash your kernel easily, you
     should probably wait for the next patch.


  o  IrLPT client support

     CONFIG_IRLPT_CLIENT

     Say Y here if you want to build support for the IrLPT client
     protocol. If you want to compile it as a module, say M here and
     read Documentation/modules.txt. The IrLPT client protocol can be
     used to print documents to IrDA compatible printers like the
     HP-5MP, or IrLPT printer adapters like the ACTiSYS IR-100M. - Just
     say Y


  o  IrLPT server support

     CONFIG_IRLPT_SERVER

     Say Y here if you want to build support for the IrLPT server
     protocol. If you want to compile it as a module, say M here and
     read Documentation/modules.txt. The IrLPT server protocol makes it
     possible to use a Linux machine as an infrared printer server for
     other laptops. So if your Linux machine has a cable connection to a
     printer, then other laptops can use the Linux machine to print out
     documents using infrared communication. - Just say Y



  3.2.1.2.  IrDA protocol options

  CONFIG_IRDA_OPTIONS

  You may define some IrDA protocol options.


  o  Cache last

     LSAP CONFIG_IRDA_CACHE_LAST_LSAP

     Say Y here if you want IrLMP to cache the last LSAP used. This
     makes sense since most frames will be sent/received on the same
     connection. Enabling this option will save a hash-lookup per frame.
     If unsure, say Y.


  o  FAST RRs

     CONFIG_IRDA_FAST_RR

     Use this option if you want to send faster RR (Receive Ready)
     frames if the transmit queue is empty. This will give you much
     better latencies but will consume more power, because of the
     bouncing RR frame.


  o  Recycle RRs

     CONFIG_IRDA_RECYCLE_RR

     In the normal life of the IrLAP protocol, it sends a lot of small
     RR (Receive Ready) frames over the link (at least when it has
     nothing else to do). Saying Y to this option will make IrLAP
     recycle these frames thus avoiding many alloc_skb's and
     kfree_skb's. To do this it will only buffer one of these frame
     which is enough for the usual case.


  o  Debug information

     CONFIG_IRDA_DEBUG

     Say Y here if you want the IrDA subsystem to write debug
     information to your syslog. You can change the debug level in
     /proc/sys/net/irda/debug.  If unsure, say Y (since it makes it
     easier to find the bugs).


  3.2.1.3.  IrDA compressors

  CONFIG_IRDA_COMPRESSION

  You may use the compression methods BZIP2 and BSD. These are not IrDA
  standard. This will allow two linux boxes to handshake compression. It
  should be compatible with other IrDA devices, although communication
  will not be compressed then.

  o  Deflate compression (experimental)

     CONFIG_IRDA_DEFLATE

     Say Y here if you want to build support for the Deflate compression
     protocol. If you want to compile it as a module, say M here and
     read Documentation/modules.txt. The deflate compression (GZIP) is
     exactly the same as used by the PPP protocol. Enabling this option
     will build a module called irda_deflate.o.


  o  BZIP2 compression

     CONFIG_IRDA_BZIP2

     Help not available yet.


  o  BSD compression

     CONFIG_IRDA_BSD

     Help not available yet.



  3.2.2.  Infrared-port device drivers

  Three sorts of low level infrared drivers are available: serial,
  dongle and FIR.  They will show up in /proc/net/dev (irda0) after
  initialisation.



  3.2.2.1.  IrTTY (uses serial driver)

  Most IrDA chips support StandardInfraRed (SIR), which works up to
  115200bps and emulates a serial port (16550A UART). On many laptops
  this port is detected by the serial support of the kernel, see
  ``dmesg''. IrTTY connects the Linux/IrDA services to this port. - You
  should say Y here.

  o  Serial dongle support

     CONFIG_IRTTY_SIR

     Say Y here if you want to build support for the IrTTY line
     discipline. If you want to compile it as a module, say M here and
     read Documentation/modules.txt. IrTTY makes it possible to use
     Linux's own serial driver for all IrDA ports that are 16550
     compatible. Most IrDA chips are 16550 compatible so you should
     probably say Y to this option. Using IrTTY will however limit the
     speed of the connection to 115200 bps (IrDA SIR mode).  If unsure,
     say Y.

  3.2.2.2.  Dongle support

  CONFIG_DONGLE

  Currently four dongles (infrared adapters for the serial port) are
  supported. The dongle is an infrared device which may be connected to
  serial port, if you don't have built-in infrared support for your
  machine. If you use a dongle together with a laptop you maybe have to
  disable the IrDA support in the BIOS.

  o  ESI JetEye PC dongle

     CONFIG_ESI_DONGLE

     Say Y here if you want to build support for the Extended Systems
     JetEye PC dongle. If you want to compile it as a module, say M here
     and read Documentation/modules.txt. The ESI dongle attaches to the
     normal 9-pin serial port connector, and can currently only be used
     by IrTTY. To activate support for ESI dongles you will have to
     insert ``irattach -d esi'' in the /etc/irda/drivers script.
     http://www.extendsys.com/support/ftp/infrared.html

  o  ACTiSYS IR-220L and IR220L+ dongle

     CONFIG_ACTISYS_DONGLE

     Say Y here if you want to build support for the ACTiSYS IR-220L and
     IR220L+ dongles. If you want to compile it as a module, say M here
     and read Documentation/modules.txt. The ACTiSYS dongles attaches to
     the normal 9-pin serial port connector, and can currently only be
     used by IrTTY. To activate support for ACTiSYS dongles you will
     have to insert ``irattach -d actisys'' or ``irattach -d
     actisys_plus'' in the/etc/irda/drivers script.
     http://www.actisys.com


  o  Tekram IrMate 210B dongle

     CONFIG_TEKRAM_DONGLE

     Say Y here if you want to build support for the Tekram IrMate 210B
     dongle. If you want to compile it as a module, say M here and read
     Documentation/modules.txt. The Tekram dongle attaches to the normal
     9-pin serial port connector, and can currently only be used by
     IrTTY. To activate support for Tekram dongles you will have to
     insert ``irattach -d tekram'' in the /etc/irda/drivers script.
     http://www.tekram.de/


  o

     CONFIG_GIRBIL_DONGLE

     Say Y here if you want to build support for the Greenwich
     Instruments GirBIL dongle. If you want to compile it as a module,
     say M here and read Documentation/modules.txt. The Greenwich dongle
     attaches to the normal 9-pin serial port connector, and can
     currently only be used by IrTTY. To activate support for Greenwich
     dongles you will have to insert ``irattach -d girbil'' in the
     /etc/irda/drivers script.  http://www.greenwichinst.com/



  3.2.2.3.  FIR support

  FastInfraredSupport (FIR) needs a specific controller chip, which
  supports up to 4Mps. - Just say Y

  o  NSC PC87108

     CONFIG_NSC_FIR

     NationalSemiConductor NSC PC87108 FIR chip e.g. used in the IBM
     Thinkpad 560X and ACTiSYS IR2000 dongle. Probably the NSC PC87338
     FIR chip is also supported. The driver supports SIR, MIR and FIR
     (4Mbps) speeds. - Just say Y


  o  Winbond W83977AF (IR)

     CONFIG_WINBOND_FIR

     Winbond W83977AF (IR) FIR chip e.g. used in the Corel Netwinder PC.
     The driver supports SIR, MIR and FIR (4Mbps) speeds. - Just say Y


  o  Sharp UIRCC

     CONFIG_SHARP_FIR

     Say Y here if you want to build support for the Sharp UIRCC IrDA
     chipset. If you want to compile it as a module, say M here and read
     Documentation/modules.txt. This chipset is used by the Toshiba
     Tecra laptops.



  4.  Linux/IrDA-Utils


  4.1.  Compilation



  o  Use the latest source snapshot of irda-utils available at
     http://www.cs.uit.no/linux-irda/irda-utils/
     <http://www.cs.uit.no/linux-irda/irda-utils/>

  o  Untar the package with tar xvzf irda-utils<VERSION>. I recommend to
     do this in /usr/src.

  o  Do a make depend.

  o  Do a make clean (not necessary if you compile the package for the
     first time).

  o  Do a make all to build the binaries.

  o  Do a make install, this brings irattach and irmanager into the
     right place and installs some config files in /etc/irda.

  A recommendation from Bjoern Hansson <Bjorn.Hansson@signal.uu.se>: If
  make depend fails on stdef.h and stdarg.h just add -I/usr/lib/gcc-
  lib/i586-linux/egcs-2.90.29/include/ or the according path for your
  system to the SYS_INCLUDES line in Makefile.

  To compile irdadump and irdaping (which are not necessary to get
  Linux/IrDA to work) you probably to tweek the source a little:

  Dag Brattli: " The problem is that I'm including kernel header files
  which conflicts with the libc header files. So why do I need to
  include kernel header files? Well, the libc/glibc header files does
  not know that much about IrDA (yet). The reason is just that IrDA is
  quite new. I could have just defined the stuff in the program itself,
  but then people would be able to compile the stuff even if the
  definitions had changed in the kernel. I think its better that you get
  a compile error than some possible strange behaviour. If you don't
  want to wait until I figure out how to solve this stuff, you can just
  remove the linux header files and define the constants in your program
  yourself:


  ______________________________________________________________________
  #define PF_IRDA          23
  #define AF_IRDA          PF_IRDA

  #define ARPHRD_IRDA      783
  #define ETH_P_IRDA       0x0017
  ______________________________________________________________________



  All the stuff above should not be changed, so it is probably safe to
  just hardcode them. I'll change the programs so they just includes the
  normal header files, and then defines these constants only if the
  header files didn't know about them. It should however be safe to
  include linux/irda.h ."
  Though I never succeeded to compile all utilities without errors, I
  recommend to use at least the latest packages of libtool, m4,
  autoconf, and automake if you want to compile irdadump, irdaping, etc.


  4.2.  Precompiled Packages

  NOKUBI Takatsugu provides an unofficial irda-utils Debian package
  <http://www.daionet.gr.jp/~knok/debian> (needs libc2.1). Efforts are
  on the way to include this package into the next Debian release,
  codename Potato.


  4.3.  Contents of Linux/IrDA-Utils


  4.3.1.  irmanager

  The irmanager is user-space daemon that is inspired and quite similar
  to the cardmgr used in the PCMCIA distribution. For example, if IrLMP
  discovers a remote device with IrLAN provider capabilities and no
  local IrLAN client has registred, then IrLMP will send an event to the
  IrManager and make it modprobe the module required. When application
  level clients are ready for communication and user-space
  configuration, they can also notify IrManager about this, so that it
  can execute the right script. For example will IrLAN send the event
  EVENT_IRLAN_START when the data channel is ready for exchanging
  Ethernet frames. When IrManager receives this event, it will execute
  /etc/irda/network start <devname> to configure the network interface.
  If you use the RedHat variant of it, it will in turn execute
  /sbin/ifup<devname> .


  4.3.2.  irattach

  Usually irattach is started by irmanager. irattach attaches an IrDA
  capable tty to the basic services of Linux/IrDA. If kerneld or kmod
  are running, the modules irda and irtty are loaded automatically, if
  not you have to load them by hand in that order. It is recommended to
  start irattach in the background. To stop irattach just kill the
  process.


  4.3.3.  load_misc

  A Perl script which loads a Linux/IrDA module and builds the according
  device in /dev using mknod.


  4.3.4.  /etc/irda

  Configuration files, e.g. contains the serial port of the SIR driver:


  ______________________________________________________________________
  drivers
  network
  network.opts
  obex
  ______________________________________________________________________



  You should at least configure the IR driver drivers:


  ______________________________________________________________________
  #! /bin/sh
  #
  # drivers
  #
  # Initialize and shutdown IrDA device drivers.
  #
  # This script should be invoked with two arguments. The first is the
  # action to be taken, either "start", "stop", or "restart".
  #

  action=$1
  device=$2

  case "${action:?}" in
  start)
      irattach /dev/ttyS2          # The third serial port is an IrDA port
      # irattach /dev/ttyS0 -d esi # Attach a ESI dongle to the first serial port
      # insmod pc87108             # If your machine as a pc87108 FIR chipset
      ;;
  stop)
      killall irattach             # ... or something. Currently not used
      ;;
  restart)
      /sbin/ifconfig ${device:?} down up
      ;;
  esac
  ______________________________________________________________________



  4.3.5.  irdaping

  This is a program similar to ping(8). It sends IrDA test frames (added
  some userdata which contains the frame number and the time the frame
  was sent). You can also change the size of the frame by using the -s
  option. You must supply an IrDA device address, and not an IP address.
  You have to be able to get that device address by some method
  irdadump?

  Here is one output sample (pinging an ACTiSYS IR-100M):


  ______________________________________________________________________
  dagbnb /home/dagb/linux/irda-utils/irdaping/ # ./irdaping 0xf7be8388
  IrDA ping (0xf7be8388): 32 bytes
  32 bytes from 0xf7be8388: irda_seq=0 time=102.466003 ms.
  32 bytes from 0xf7be8388: irda_seq=1 time=102.202003 ms.
  32 bytes from 0xf7be8388: irda_seq=2 time=102.170998 ms.
  32 bytes from 0xf7be8388: irda_seq=3 time=101.633003 ms.

  4 packets received by filter
  ______________________________________________________________________



  4.3.6.  irdadump

  One advantage of implementing IrDA device drivers as network device
  drivers is that you should be able to attach sniffers to the device
  (or actually the packet type). That way, it is possible to use a
  really handy utility called irdadump (instead of tcpdump). This will
  make debugging MUCH easier. Linux-2.2 implements the BPF (Berkeley
  Packet Filter), so its possible to filter out exactly the frames you
  want to see.

  Note: You probably have to be root for using irdadump . CONFIG_PACKET
  has to be enabled in the kernel. If compiled as a module you might
  load the module manually. irdadump has been coverted into a library,
  so it can be used from GUI applications as well.

  Here is a sample output of a small session between Linux and a Palm
  III. This log shows that the local irobex layer is not responding, so
  the Palm III sends a disc frame.


  ______________________________________________________________________
  dagbnb /home/dagb/linux/irda-utils/irdadump/ # ./irdadump

  20:18:15.305711 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=0
  20:18:15.385597 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=1
  20:18:15.465568 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=2
  20:18:15.545953 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=3
  20:18:15.625574 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=4
  20:18:15.705575 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=5
  20:18:15.785601 xid:cmd:saddr=0x05c589 > daddr=0xffffffff,S=6,s=255,info=Linux
  20:18:18.075526 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=0
  20:18:18.225498 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=1
  20:18:18.375495 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=2
  20:18:18.526355 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=3
  20:18:18.675614 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=4
  20:18:18.676364 xid:rsp:saddr=0x05c589 > daddr=0xb50c14b,S=6,s=4
  20:18:18.765506 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=5
  20:18:18.927221 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=255,info=Palm III
  20:18:18.975796 snrm:cmd,ca=0xfe,pf=1
  20:18:18.976534 ua:rsp,ca=0x58,pf=1
  20:18:18.977145 ua:rsp,ca=0x58,pf=1
  20:18:19.585627 rr:rsp,ca=0x58,nr=0,pf=1
  20:18:19.585810 rr:rsp,ca=0x58,nr=0,pf=1
  20:18:19.606413 i:cmd,ca=0x58,nr=0,ns=0,pf=1
  20:18:19.606582 rr:rsp,ca=0x58,nr=1,pf=1
  20:18:19.627708 rr:cmd,ca=0x58,nr=0,pf=1
  20:18:19.627871 i:rsp,ca=0x58,nr=1,ns=0,pf=1
  20:18:19.650571 disc:cmd,ca=0x58,pf=1
  20:18:19.650736 ua:rsp,ca=0x58,pf=1
  20:18:21.165524 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=0
  20:18:21.315608 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=1
  20:18:21.315793 xid:rsp:saddr=0x05c589 > daddr=0xb50c14b,S=6,s=1
  20:18:21.395499 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=2
  20:18:21.545516 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=3
  20:18:21.695500 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=4
  20:18:21.845840 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=5
  20:18:22.007222 xid:cmd:saddr=0xb50c14b > daddr=0xffffffff,S=6,s=255,info=Palm III
  20:18:22.056143 snrm:cmd,ca=0xfe,pf=1
  20:18:22.056310 ua:rsp,ca=0xc8,pf=1
  20:18:22.056381 ua:rsp,ca=0xc8,pf=1

  37 pacckets received by filter
  ______________________________________________________________________



  4.3.7.  gnobex

  GNOME GUI for using the IrOBEX protocol, to connect to Palm III.



  4.3.8.  irkbd

  Support for infrared keyboard (and mouse?) protocol IrKBD.


  4.3.9.  irdalib

  Linux/IrDA library.


  4.3.10.  obex

  Please compile irdalib before compiling obex. Contains irobex_test,
  irobex_receive and irobex_palm3 . And obex_tcp which makes it possible
  to use OBEX over TCP/IP.


  5.  Configuration


  5.1.  General Configuration


  o  First you should put your IR devices in range. Though it might be
     possible that the Linux/IrDA service detects every new device
     automagically I only have good experience with the devices in range
     during the configuration process.

  o  Keep your infrared devices together in a range below one meter and
     an angle of 30 degree. There has to be a direct line of sight
     between them. If this is not possible, you may use a mirror (an
     unused M$ CD should work quite good).

  o  Add the following lines to your /etc/conf.modules file:

     ___________________________________________________________________
     # IrDA
     alias tty-ldisc-11 irtty
     alias char-major-161 ircomm-tty
     ___________________________________________________________________



  Note: The format of this entries has changed!

  Then do a depmod -a to update, and then ircomm should be automagically
  loaded when you need it. Here is what you need in /dev:


  dagbnb /usr/src/ > ll /dev/ir*
  crw-------   1 dagb     161,   0 Aug 25 20:13 /dev/ircomm0
  crw-rw-rw-   1 root     161,   1 Jun 18 13:44 /dev/ircomm1
  crw-rw-rw-   1 root     161,  16 Jun 18 13:44 /dev/irlpt0
  crw-rw-rw-   1 root     161,  17 Jun 18 13:44 /dev/irlpt1



  o  Have a look into the files in /etc/irda. They are similar to the
     files in /etc/pcmcia. Edit /etc/irda/drivers to reflect your setup.
     Most people will use irattach from that file. The files are:



     ___________________________________________________________________
     Makefile
     network*
     network.redhat*
     serial
     drivers
     network.opts
     obex
     printer
     ___________________________________________________________________



  o  Run depmod -a.


  5.2.  IrManager

  Dag Brattli wrote: " IrManager [...].is a user-space daemon that is
  inspired and quite similar to the cardmgr used in the PCMCIA
  distribution.

  The IrManager will receive events from the kernel level side of the
  protocol stack. When the IrManager receives an event it can execute
  shell commands and scripts, so I have added the /etc/irda directory
  which will contain such scripts. [...]

  For example, if IrLMP discovers a remote device with IrLAN provider
  capabilities and no local IrLAN client has registered, then IrLMP will
  send an event to the IrManager and make it "modprobe" the module
  required. [...]

  When application level clients are ready for communication and user-
  space configuration, they can also notify IrManager about this, so
  that it can execute the right script. For example IrLAN will send the
  event EVENT_IRLAN_START when the data channel is ready for exchanging
  Ethernet frames. When IrManager receives this event, it will execute
  /etc/irda/network start <devname> to configure the network interface.
  This network script is actually the same as used by the PCMCIA code
  and since I'm using the Redhat variant of it, it will in turn execute
  /sbin/ifup <devname>.

  So by using the IrManager, I "only" have to do this when I start the
  stack:

  ______________________________________________________________________
  irattach /dev/ttyS2 &
  irmanager -d 1           # -d 1 means: start discovery process
  ______________________________________________________________________


  and then when my laptop discovers the IrLAN provider (HP Netbeamer in
  my case) it will ask IrManager to load the module irlan_client. When
  the connection is up and ready, it will ask it to execute
  /etc/irda/network start eth0. When the connection is broken, it will
  again ask it to take down the interface using /etc/irda/network stop
  eth0.[...]

  That's all to get it working if you are using Redhat. If you are using
  some other distribution which doesn't have /sbin/ifup, then you better
  copy /etc/pcmcia/network.opts to /etc/irda/network.opts or configure
  the file yourself.

  If you want to use the IrLAN server, you will still have to modprobe
  irlan_server before you start the irmanager _without_ -d 1.

  And just like the cardmgr, you will (if you want to) get the beeps
  when the connection is up and running and when it is disconnected!!!

  I hope that we can add such scripts for all the other clients/services
  that need user level configuration. It would be really cool to have a
  /etc/irda/printer script for configuring IrDA(TM) capable printers. So
  if you get in range of an IrDA(TM) capable printer, then IrManager
  should load the irlpt_client module, and also configure the other
  stuff that needs to be done for using this printer.

  I also hope that we can use the config file for configuring IrDA(TM)
  ports and device drivers. Something like:

  ______________________________________________________________________
  Device Drivers
    module "irtty" script="irattach /dev/ttyS2"
    module "smc_ircc" irq=11 port=0x34f
  ______________________________________________________________________


  So that IrManager can load and start all these when it is executed. In
  this way we would only have to start IrManager in
  /etc/rc.d/init.d/irda and the rest would be plug and play. There would
  be no need for manually starting programs and configuring devices.
  When irmanager receives the following events for a device <dev> it
  will currently do:

  EVENT_IRLAN_START, start and configure the device using /sbin/ifup
  <dev>

  EVENT_IRLAN_STOP, close the device using /sbin/ifdown <dev>

  This can however be easily changed by the user, if this is not what is
  the prefered behaviour.

  5.3.  Low Level Drivers

  There are three sorts of low level drivers: SIR, dongle and FIR. If
  the right driver is detected by the kernel you get a message like:

  ______________________________________________________________________
  IrDA irda_device irda0 registered.
  ______________________________________________________________________



  5.3.1.  SIR


  o  Try to find out which serial port is used by the IR device. You may
     do so by watching the output of dmesg. If serial support is
     modularized do an insmod serial first. Look for an entry like:

     ___________________________________________________________________
     Serial driver version 4.25 with no serial options enabled
     ttyS00 at 0x03f8 (irq = 4) is a 16550A     #first serial port /dev/ttyS0
     ttyS01 at 0x3000 (irq = 10) is a 16550A    #e.g. infrared port
     ttyS02 at 0x0300 (irq = 3) is a 16550A     #e.g. PCMCIA modem port
     ___________________________________________________________________


  If this is not the case, you either don't have infrared support
  enabled in the BIOS or the SIR mode of your infrared device is not
  detected by the kernel. Currently I know only two laptop models with
  this effect, the HP OmniBook 800 and the Toshiba Libretto models. I am
  not sure whether PnP support effects the detection of the IR port. If
  you are unsure try it out and let me know the results. Maybe you can
  use FIR mode if SIR doesn't work.

  o  In some situations you may have to use setserial /dev/ttyS<0-2>
     port 0xNNNN irq M to set the values for your infrared serial port,
     especially if the infrared port is a separate serial line. You
     usually don't need to change the values! For further information
     look into the FAQ section below.

  o  If you don't use kerneld or kmod insert the irda module with
     modprobe irda.

  o  Do lsmod. It should show the modules irda and irtty now.

  o  A look into /var/log/messages should show the entry "Serial
     connection established" now.

  o  Say irmanager -d1, which will start the necessary programs, such as
     irattach.

  o  Give irattach some time, e.g. seven seconds, to detect other IR
     devices. Then watch the output from the kernel that you will
     hopefully get in /var/log/messages. It should look like the
     following (I removed some lines, which were not related to
     Linux/IrDA):

     Jan  2 12:57:26 japh kernel: ttyS00 at 0x03f8 (irq = 4) is a 16550A
     Jan  2 12:57:26 japh kernel: ttyS02 at 0x03e8 (irq = 4) is a 16550A
     Jan  2 12:57:26 japh kernel: Linux Support for the IrDA (tm) protocols (Dag Brattli)
     Jan  2 12:59:09 japh syslog: executing: 'echo 1 > /proc/sys/net/irda/discovery'
     Jan  2 12:59:09 japh syslog: Setting discovery to 1 exited with status 1
     Jan  2 12:59:09 japh syslog: + 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
     Jan  2 12:59:09 japh syslog: + 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
     Jan  2 12:59:09 japh syslog: Serial connection established.
     Jan  2 12:59:09 japh kernel: IrDA irda_device irda0 registered.
     Jan  2 13:01:22 japh syslog: executing: './drivers start '
     Jan  2 13:01:22 japh syslog: Serial connection established.
     Jan  2 13:01:42 japh syslogd: Printing partial message
     Jan  2 13:01:42 japh 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
     Jan  2 13:02:49 japh kernel: IrDA Discovered: japh
     Jan  2 13:02:49 japh kernel:     Services: Computer



  o  Even more information you can get with cat /proc/net/irda/discovery
     .


  5.3.2.  Dongle Connection - Infrared Adapters for the Serial Port

  The currently supported dongles are the Extended Systems Inc. ESI-9680
  JetEye, the Tekram IRmate 210B, the ACTiSYS IR220L and 220L+, the
  Greenwich GIrBIL.  dongle.

  Dag Brattli wrote (modified by wh): "To use dongles you have to do
  something like this:

  ______________________________________________________________________
  modprobe tekram         # or esi or actisys
  irmanager -d 1          #
  irattach -d tekram      # or -d esi or -d actisys
  ______________________________________________________________________



  As you can see, you must still use the -d option with irattach since
  it is possible to have two serial ports using different dongles at the
  same time (so the tty you are binding must know which dongle it is
  supposed to use). So if you have two dongles and two serial ports, you
  could do something like this:

  ______________________________________________________________________
  modprobe tekram
  modprobe esi
  irattach /dev/ttyS0 -d esi &
  irattach /dev/ttyS1 -d tekram &
  ______________________________________________________________________


  PS: I would not try to turn the two dongles against each other, since
  I really don't know how the stack would react :-) ...  Since I don't
  have any of these new ACTiSYS 220L+ dongles, I'm not able to test it.
  Since the new dongle has support for one extra speed (38400bps), you
  must specify the dongles differently with irattach so that the kernel
  knows which dongle you are using (and what QoS can be used):

  ______________________________________________________________________
  irattach /dev/ttyS0 -d actisys     # for the 220L dongle
  irattach /dev/ttyS0 -d actisys+    # for the 220L+ dongle
  ______________________________________________________________________


  The current implementation of dongle support does not have any state
  associated with it, so its not possible to use both ACTiSYS dongles
  (220L and 220L+) at the same time (connected to two serial ports) for
  now. If someone needs to be able to do so, please mail me (Dag Brat-
  tli) and I will think about it!"

  Note: When I tried to use an infrared modem (Swissmod 56Ki,
  manufactured by Telelink AG) connected to my laptop (IrDA works with
  Window$95 only, due to non standard hardware) I had to remove the
  infrared support in the BIOS to get it working!

  Dag Brattli: "It is now possible to use irport instead of irtty! I
  have moved all the dongle stuff out of irtty and into irda_device, so
  it will also be possible to attach dongles to irport. Need however to
  make a small user-space utility dongle_attach that can be used to
  attach dongles to a specific driver instance. BTW. irattach is still
  working as before, and you will not notice the difference even when
  attaching dongles to irtty (I've just redirected the dongle ioctl to
  irda_device). Irport may be interesting since you avoid one software
  interrupt (bh) level, and it's also forced to work in half duplex mode
  so you don't get any echo if the irda port itself don't have echo-
  cancellation (girbil dongle and HP-4000 etc) ... To use it, you must
  supply the parameters to insmod like this: insmod irport io=0x3f8
  irq=4, or whichever values you use. You can also add these parameters
  to /etc/conf.modules like this: options irport io=0x3f8 irq=4, but
  then you must remember to do a depmod -a and use modprobe irport
  instead of insmod."



  5.3.3.  Dongle Connection - Infrared Motherboard Adapter

  Support for the ACTiSYS IR2000 dongle has been implemented in a file
  called pc87108 which you can either compile into the kernel or
  insmod/modprobe to insert the module:



  ______________________________________________________________________
  irmanager -d 1
  modprobe pc87108
  ______________________________________________________________________


  or insert modprobe pc87108 into the /etc/irda/drivers file (I think).

  From James <james@esc.cam.ac.uk> I have this description about setting
  up the hardware: There are two configurations, a five pin in line
  connector and a 6 pin DIL (at the end of a 18 pin DIL header).
  Basically any IrDA conpatible transceiver will work (I have a stack of
  old IRM3001 these are now obselete) you need to hook a capacitor (use
  a tantalum about ~1uF) between 5V and 0V near the transceiver and then
  connect everthing else up (RX->RX, TX->TX, 5V->5V, and 0V-0V). If you
  don't like soldering irons, lots of companies do sell IR modules for
  the 5 pin connectors that fit into a hole in your case.


  5.3.4.  Fast InfraRed (FIR)

  The IrDA(TM) standard knows three kinds of speeds:


  1. SIR = Standard IrDA, up to 115kbps IrDA,

  2. MIR = Medium Speed IrDA,

  3. FIR = Fast IrDA (4Mbps),

  4. VFIR = Very Fast IrDA(16Mbps), seems to become a future standard

     Up to 115.200bps (SIR) many (probably all) infrared controllers
     work like a serial port and use a RZI (return to zero, inverted)
     modulation. Not every infrared controller supports 4Mps (FIR), up
     to 4Mbps they have to use 4PPM (4 pulse position) modulation
     technique. Currently there are two FIR chips supported:
     NationalSemiConductor NSC PC87108 e.g. used in IBM Thinkpad 560X
     and Winbond W83977AF (IR) FIR chip e.g. used in the Corel Netwinder
     PC. You may start the FIR service by loading the according module.
     Linux/IrDA will probe your hardware then. More drivers are under
     development.

  So what speeds can you expect? Using SIR, you should be able to get
  about 10 Kbytes/s. Using FIR (4Mbps) you can get over 300 Kbytes/s (if
  you are lucky).



  6.  Specific Connections and IrDA - Protocols


  6.1.  Printer Connection - IrLPT, IrTTP

  IrLPT support is under heavy construction at the moment. Maybe it will
  be replaced by IrCOMM. Please see mailing list archive.


  o  Remove any current print jobs with lprm "*".

  o  If you don't use kerneld do a modprobe irtty.

  o  Do a modprobe irlpt_client.

  o  Check the modules with lsmod. This should show: irda, irtty and
     irlpt_client
  o  cat /proc/misc. Gives you the minor device-number . It is the first
     number in the line with irlpt0.

  o  su to root, and do mknod /dev/irlpt0 c 10 <minor device-number>.
     Note: Something like ./MAKEDEV irlpt0 is not possible yet. But
     maybe load_misc irlpt works, though I couldn't test this yet.

  o  Try to write a small file to /dev/irlpt0 by cat FILE >/dev/irlpt0
     (do not wonder about a bad format this is just a first check). For
     me this didn't always work, but I couldn't find out why not.

  o  The better way is to change your /etc/printcap to use /dev/irlpt0
     in addition or instead of /dev/lp1. See Printing-HOWTO for detailed
     information.

  o  For easy printer setup you may use a printing software like
     APSFILTER, MagicFilter EZ-Magic (with RedHat there should also be a
     GUI for this purpose). Make a copy of /etc/printcap before.

  o  Example for APSFILTER with a HP 6P (non-postscript, HP 6MP is with
     postscript). The two relevant questions are:

     "Do you have a (s)serial or a (p)arallel printer interface?"
     Answer "p"

     "What's the device name for your parallel printer interface?"
     Answer "/dev/irlpt0"


  o  Restart the print daemon with kill -HUP <PID of lpd>. If you use
     another print daemon choose the according command.

  o  Watch whether the connection indicator of your printer shows
     activity, e.g. the green light above the IR port of a HP 6P/MP
     comes on (lower left hand corner, near the paper tray).

  o  I couldn't get to manage printjobs larger than approximately 10
     pages yet. But maybe this depends on the memory size of my
     hardware, which is 16MB. There seems to be a problem with the
     software too, Thomas Davis wrote: "I will ... limit the irlpt, so
     it won't eat memory when you send a large print file.".

  Takahide Higuchi reported: " I have been debugging IrCOMM with a
  printer ( Canon BJC-80v ) with IrDA port and IrCOMM protocol (not
  IrLPT). I can print a short e-mail text though, it easily causes dead
  lock when I try to print a postscript with gs."

  From the page of Thomas Davis http://www.jps.net/tadavis/irda
  <http://www.jps.net/tadavis/irda>: To use the IrLPT server, you need
  to perform the following steps:

  ______________________________________________________________________
  /sbin/insmod irlpt_server
  /sbin/mknod /dev/irlptd c 10 `grep irlptd /proc/misc|cut -f 1`
  ______________________________________________________________________


  At this point, the IrLPT server is ready to recieve print jobs; now;
  all you need is this simple shell script



  ______________________________________________________________________
  #/bin/sh
  #
  while (true)
  do
  cat /dev/irlptd | lpr
  done
  ______________________________________________________________________



  Dag Brattli: I hope that this will make it easier for all you that
  prefer to live in user-space, to make your own IrDA applications and
  try it out. Some printers actually use IrTTP (because of the
  limitations of IrLPT), so now you can write your own small user-space
  printer client so you can talk to it:



  ______________________________________________________________________
  int discover_devices(int fd)
  {
      struct irda_device_list *list;
      unsigned char buf[sizeof(struct irda_device_list) +
                        sizeof(struct irda_device_info) * MAX_DEVICES];
      int len;
      int daddr;
      int i;

      len = sizeof(struct irda_device_list) +
            sizeof(struct irda_device_info) * MAX_DEVICES;
      list = (struct irda_device_list *) buf;

      if (getsockopt(sfd, SOL_IRLMP, IRLMP_ENUMDEVICES, buf, &len)) {
          perror("getsockopt");
          exit(-1);
      }
      if (len > 0) {
          /*
           * Just pick the first one, but we should really ask the
           * user
           */
          daddr = list->dev[0].daddr;

          printf("Discovered: (list len=%d)\n", list->len);

          for (i=0;i<list->len;i++) {
              printf("  name:  %s\n", list->dev[i].info);
              printf("  daddr: %08x\n", list->dev[i].daddr);
              printf("  saddr: %08x\n", list->dev[i].saddr);
              printf("\n");
          }
      }
      return daddr;
  }

  void client()
  {
      struct sockaddr_irda peer;
      int addrlen = sizeof(struct sockaddr_irda);
      int daddr, actual;
      char buf[1024];

      fd = socket(AF_IRDA, SOCK_STREAM, 0);

      daddr = discover_devices(fd);

      peer.sir_family = AF_IRDA;
      strcpy(peer.sir_name, "P1284");
      peer.sir_addr = daddr;

      connect(fd, (struct sockaddr *) &daddr, sizeof(struct sockaddr_irda));

      /* Try to send something */
      actual = send(fd, "Testing", 8, 0);

      /* Try to read reply */
      actual = recv(fd, buf, 1024, 0);
  }
  ______________________________________________________________________



  6.2.  LAN Connection - IrLAN


  o  You might connect your Linux box using IrLAN to another network
     device such as a Linux box with IrLAn, a HP NetBeamer or a
     Window$95 box with Infrared Network Device support.


  o  Dag Brattli wrote: "If you want to use IrLAN you must modprobe
     irlan_client before ifup eth0. I had to remove the request_module()
     stuff since that needed a process context which I don't have in the
     kernel. "

     Maybe you have to choose the access mode. You can do this by using
     modprobe irlan access=1 for direct mode. IrLAN states that a
     provider can either be in direct mode, or in peer mode, so you
     currently have to choose when you start IrLAN.



  o  Run ifconfig eth0 up <ip_address> netmask <ip_netmask> to configure
     it with IP-address and other parameters. If the protocol is still
     running you may start communicating. It is possible to use RedHat's
     netcfg to do this, since it makes it very easy. Next time you only
     need to do /sbin/ifup eth0. Notice that ifconfig does not know how
     to deal with IrLAP addresses, so the address is really just the 4
     first bytes (in little endian format).


  o  Test the network device by pinging to it. For detailed information
     about further setup see the NET3-HOWTO.


  o  Do not forget to add a route, e.g. route add default gw
     <ip_gateway> or route add -host <target host> dev eth0.


  o  Ping to another IP now, to test the connection.


  o  For testing reasons I recommend only to use one laptop and one IR
     ethernet device in the same room. If there are problems look which
     different modes for the IR ethernet device are possible. Try them.

  For an ACTiSYS FIR board and dongle you may do:


  ______________________________________________________________________
  irmanager -d1
  /sbin/modprobe pc87108  # remove irattach from /etc/irda/drivers, or
                          # substitute irattach with the modprobe!
  ______________________________________________________________________



  On machine 1:

  ______________________________________________________________________
  modprobe irlan_client # not really necessary since irmanager should do this!
  ______________________________________________________________________


  On machine 2 (if you don't have an access-point)



  ______________________________________________________________________
  modprobe irlan_server
  ______________________________________________________________________



  Do not compile irlan_server into the kernel, since it currently does
  not like that! You should have configured /etc/sysconfig/network-
  scripts/ircfg-eth0 with a proper ad-hoc network if you are using two
  machines. If you have an access-point, then the normal setup should be
  fine.

  Notice that in the latest patch (2.2.0-irda1) irlan_client will call
  the device irlan0 by default, but you can change this by giving eth=1
  as an option to irlan_client (modprobe irlan_client eth=1 or options
  irlan_client eth=1 in /etc/conf.modules).  The next release of IrLAN
  will be only one module, so you don't need to think about if you need
  to have the client and/or the server installed.

  It's possible to do ifconfig irlan0 -broadcast to stop the AP from
  flooding you with broadcast frames! That can be a problem if you are
  connected to a very large Ethernet segment. The only problem is that
  your machine will then have to initiate all communications and can
  therefore not function as a server (well, you could probably make a
  stationary machine somewhere answer ARP requestes on your behalf).

  When using the IrLAN software from HP, you maybe have to name your
  computer "HP NetbeamIR" in the IAS entry to make it connect. Also I
  have heard rumors that a "Psion 3c" also wanted to connect only to
  another IR device if it had the same or a similar name.


  6.3.  HP NetBeamer Connection

  From Renaud Waldura: All the IrDA stuff is compiled in as modules.


  o  edited /etc/irda/drivers to include irattach /dev/ttyS0 (or
     whatever your "serial" IrDA port is, WH). Also /etc/conf.modules
     contains alias tty-ldisc-11 irtty.

  o  irmanager -d 1 then echo 3 >> /proc/sys/net/irda/debug to see
     what's going on.

  o  modprobe irlan

  o  I had to echo 9 >> /proc/sys/net/irda/slot_timeout (use 90 for
     newer kernels!)  in order to have the NetbeamIR recognized.
     Otherwise I was only getting a bunch of "media busy" messages, and
     no actual discovery of the NetbeamIR. 9 is the smallest value that
     worked for me.

  o  renamed /etc/irda/network.orig to /etc/irda/network and edited
     /etc/irda/network.opts for my IP config. Also copied
     /etc/pcmcia/shared to /etc/irda (this file is apparently missing
     from the distribution).

  o  I also had to comment out grep_stab $1 < /var/run/stab (line 131)
     in /etc/irda/shared. For some reason it fails, spitting a "usage"
     message.

  o  moved laptop in range, the NetbeamIR is discovered, irlan0 created
     and config'ed.

  o  transferred data at 7 kb/s, both ways: ping, ftp, telnet. Yaho!

  6.4.  Palm III Connection - IrOBEX

  The IrOBEX stuff seems under rapidly improving changing development.
  So the applications change, too. Therefore I just can't give quite
  exact information. Please see also the report by Dag Brattli at
  http://www.cdpubs.com/hhsys/archives/66/10brattl.pdf
  <http://www.cdpubs.com/hhsys/archives/66/10brattl.pdf> .

  Please note: IrOBEX now is in user-space and uses IrDA sockets.
  Remember that when using sockets, you don't need to have irobex
  enabled in the kernel, and /dev/irobex is not used anymore!The
  /etc/irda script is really only good for configuration of the devices,
  making the right mknod for /dev/irobex etc., not for starting
  applications.


  o  Palm III -> Linux

     1) Terminal 1> irattach /dev/ttyS<x>

     2) Terminal 2> load_misc irobex

     3) Terminal 3> Start irobex_app in the irobex directory. I suppose
     irobex_app is not working anymore. Now you should use the
     gtk/irobex program instead! You need to have the gtk library
     installed to use this program. A command line frontend should be
     programmed by someone. Maybe the programm to use is irobex_receive.

     4) Beam something from your Palm III.

     5) If everything is successful, you can take a look at a new file
     that has been created in the directory in which you started
     irobex_app (or in /tmp for irobex_receive). This file will be named
     after the object you just transfered.


  o  Linux -> Palm III

     This should also be possible, but I don't have any further
     information right now.


  o  PPP

     Rui Oliveira wrote: "This is just to let you know that with the
     latest IrCOMM patch (050998) of Takahide Higuchi, I managed to
     HotSync and establish a PPP connection between my Palm III and my
     Linux box. I'm using IRLink (from IsComplete) to redirect the
     serial port to ir. Communication with pilot-xfer (probably at
     http://www.slac.com/pilone/kpilot_home/mainpage.html
     <http://www.slac.com/pilone/kpilot_home/mainpage.html>) works
     flawlessly. Although I was able to establish a PPP connection, I'm
     still unable to fetch mail and do Web browsing. This is probably
     due to connection time-outs. I am checking this out. Please see the
     PPP-HOWTO for further information about PPP.

     ... I managed to establish an apparently robust connection between
     my Linux box and a Palm III. The pppd invocation I use is as
     follows:

     /usr/sbin/pppd /dev/irnine 57600 192.168.2.10:192.168.2.11 proxyarp
     passive silent persist noauth local nodetach. Over the PPP
     connection I used ping, ssh, and http.

     Strange is however the fact that discovery must be enabled
     (irmanager -d 1). Otherwise, even with an active IrCOMM connection,
     the link goes down due to a IrLAP disconnect.

     The pilot-link tools (used for Linux/Palm synchronization) also ran
     flawlessly over IrCOMM via /dev/irnine or /dev/ircomm."


  o  IrCOMM

     Jon Howell wrote: "I thought I'd try IrCOMM, since the Palm III can
     be made to reroute serial info to the IR port (using IrLink from
     IS/Complete, available at www.palmcentral.com), and then you can
     run a terminal program (like PalmTelnet in serial mode) over IrDA.
     I can only assume it's using the IrCOMM protocol. I've tested this
     configuration between two palm pilots, but of course I can't know
     what the protocol running over the IR is."

     (1) Start HotSync on your Palm. You need the IrDA upgrade for the
     Palm to have IrCOMM support
     http://www.palm.com/custsupp/downloads/irenhanc.html
     <http://www.palm.com/custsupp/downloads/irenhanc.html> .

     (2) Place the Palm in front of the dongle.

     (3) Start pilot-xfer -p /dev/irnine -s <sync-dir> .

     And if you are lucky it will start syncing. If you start pilot-xfer
     before you start HotSync on the pilot, you will _not_ be lucky!

     Maybe a terminal program like PalmTerm is also useful.


  Wessel de Roode wrote: The Palmpilot is default locked on 57k. You can
  however if you write your own software for the Pilot, use the 115k
  line settings. I quote a part from the irlib.h:

  ______________________________________________________________________
  ---------- irlib.h from the SDK 3.0 from palmpilot -----
  // Options values for IrOpen
  #define irOpenOptBackground     0x80000000              // Unsupported background task use
  #define irOpenOptSpeed115200    0x0000003F              // sets max negotiated baud rate
  #define irOpenOptSpeed57600     0x0000001F              // default is 57600
  #define irOpenOptSpeed9600      0x00000003
  -------------- end quote --------------------------------
  ______________________________________________________________________



  Peter Pregler reported: If the Palm enters the range of the irda-
  device a popup appears with the text "Transmission: waiting for
  sender"

  Ron Choy answered: There is a software called ShutupIR that is
  supposed to help with this problem of annoying popup
  http://hp.vector.co.jp/authors/VA005810/irda/shutup10.zip
  <http://hp.vector.co.jp/authors/VA005810/irda/shutup10.zip> I haven't
  tried it but it looks like it would fix your problem.


  6.5.  Palm III Connection to IBM Thinkpad 600

  This chapter is a courtesy of Harald Milz - SuSE. Minor changes by
  Werner Heuser to fit into the HOWTO.

  This document describes how to set up Linux/IrDA on an IBM Thinkpad
  600. This works for my machine. Your mileage may vary with other
  machines.
  6.5.1.  Prerequisites


  o  Reboot to the preinstalled M$ OS and activate the IR port using the
     Thinkpad tools. There is currently no Linux tool to achieve that.
     This will disable your internal serial port (ttyS0)!

  o  Reboot to Linux and configure a kernel with support for IrDA and
     IrCOMM. The Linux-IR-HOWTO talks about IrOBEX as well, but this is
     just for beaming objects across. This doesn't work with hotsync as
     far as I know (didn't try yet).


  6.5.2.  Adding support for IrDA



  o  Add the following lines to /etc/conf.modules:


     ___________________________________________________________________
     # IrDA
     alias tty-ldisc-11 irtty
     alias char-major-161 ircomm-tty
     ___________________________________________________________________



  o  Get the current IR Tools. I use version 0.9.2 at this time. Compile
     them proper. I installed irmanager and irattach in /usr/local/sbin
     (too lazy to make a RPM archive...).

  o  I modified /etc/irda/drivers and set up this /etc/rc.d/irda
     start/stop script. Don't forget to add the line START_IRDA=yes to
     /etc/rc.config and to add a symlink like /etc/rc.d/rd3.d/S99irda.

  o  Add a device file for the redirected IR device: mknod /dev/irnine c
     161 0 , see also /proc/tty/drivers.

  o  Add a symlink /dev/pilot --> /dev/irnine to make all programs happy
     (if you use the shell variable PILOTPORT=/dev/pilot).


  6.5.3.  Starting IrDA - First Steps

  Call /etc/rc.d/irda start and watch the console messages. ps should
  show irattach and irmanager running. Check /proc/net/irda to see what
  is there. ircomm will only be available and show reasonable stuff when
  an application accesses the irnine port (and loads ircomm_tty through
  kmod).

  Start PilotManager or sync-plan and be happy :-) IR should run fine at
  57600 bps.

  See SuSE Munich PalmIIIx pages
  <http://w3.muc.suse.de/links/palm.php3>, too.


  6.5.4.  Configuration Files


  /etc/irda/drivers:



  ______________________________________________________________________
  #! /bin/sh
  #
  # drivers
  #
  # Initialize and shutdown IrDA device drivers.
  #
  # This script should be invoked with two arguments.  The first is the
  # action to be taken, either "start", "stop", or "restart".
  #

  action=$1
  device=$2

  case "${action:?}" in
  start)
          /usr/local/sbin/irattach /dev/ttyS0          # The third serial port is an IrDA port
          # irattach /dev/ttyS0 -d esi # Attach a ESI dongle to the first serial port
          # irattach /dev/ttyS0 -d tekram
          # insmod pc87108             # If your machine as a pc87108 FIR chipset
          # modprobe uircc             # Sharp UIRCC chipset
      ;;
  stop)
          killall irattach             # ... or something. Currently not used
      ;;
  restart)
          /sbin/ifconfig ${device:?} down up
      ;;
  esac
  ______________________________________________________________________



  /etc/rc.d/irda



  ______________________________________________________________________
  #! /bin/sh
  # Copyright (c) 1995-1998 SuSE GmbH Nuernberg, Germany.
  #
  # Author: hm
  #
  # /sbin/init.d/irda
  #
  #   and symbolic its link
  #
  # /sbin/rc<skeleton>
  #

  . /etc/rc.config

  # Determine the base and follow a runlevel link name.
  base=${0##*/}
  link=${base#*[SK][0-9][0-9]}

  # Force execution if not called by a runlevel directory.
  test $link = $base && START_IRDA=yes
  test "$START_IRDA" = yes || exit 0

  # The echo return value for success (defined in /etc/rc.config).
  return=$rc_done
  case "$1" in
      start)
          echo -n "Starting service irda"
          ## Start daemon with startproc(8). If this fails
          ## the echo return value is set appropriate.

          startproc /usr/local/sbin/irattach /dev/ttyS0 || return=$rc_failed
          startproc /usr/local/sbin/irmanager -s1 -d0 || return=$rc_failed

          echo -e "$return"
          ;;
      stop)
          echo -n "Shutting down service irda"
          ## Stop daemon with killproc(8) and if this fails
          ## set echo the echo return value.

          killproc -TERM /usr/local/sbin/irmanager || return=$rc_failed
          killproc -TERM /usr/local/sbin/irattach || return=$rc_failed
          for i in ircomm_tty ircomm irtty irda ; do
                  rmmod $i;
          done

          echo -e "$return"
          ;;
      restart)
          ## If first returns OK call the second, if first or
          ## second command fails, set echo return value.
          $0 stop  &&  $0 start  ||  return=$rc_failed
          ;;
      reload)
          ## Choose ONE of the following two cases:

          ## First possibility: A few services accepts a signal
          ## to reread the (changed) configuration.

          #echo -n "Reload service foo"
          #killproc -HUP /usr/sbin/foo || return=$rc_failed
          #echo -e "$return"

          ## Exclusive possibility: Some services must be stopped
          ## and started to force a new load of the configuration.
          #$0 stop  &&  $0 start  ||  return=$rc_failed
          ;;
      status)
          echo -n "Checking for service foo: "
          ## Check status with checkproc(8), if process is running
          ## checkproc will return with exit status 0.

          #checkproc /usr/sbin/foo && echo OK || echo No process
          ;;
      probe)
          ## Optional: Probe for the necessity of a reload,
          ## give out the argument which is required for a reload.

          #test /etc/foo.conf -nt /var/run/foo.pid && echo reload
          ;;
      *)
          echo "Usage: $0 {start|stop|status|restart|reload[|probe]}"
          exit 1
          ;;
  esac

  # Inform the caller not only verbosely and set an exit status.
  test "$return" = "$rc_done" || exit 1
  exit 0
  ______________________________________________________________________



  6.6.  Psion 5 Connection

  Andrew Chadwick <andrew.chadwick@symbian.com> wrote: A nifty way to
  check that the baud rates for SIR are set up properly (if you have a
  Psion Series 5) is to point the S5 at your Linux box's IR window and
  try to beam a file. While the beamer dialog's on the screen, the S5
  will try to make an IrDA connection (even when it claims it can't find
  another IR machine). You should be able to do a cat < /dev/ttyS3 and
  if the serial parameters are right on both machines, you should see
  the words "Symbian EPOC" (machine ident) scroll past amidst the spew.

  Fons Botman wrote: " Maybe someone with a Psion 5 would like to test
  this program. It emulates the protocol for the Psion 5 IR send and
  receive command for files on linux. You can now exchange files with
  simple commands. The transfer rate is 9.7 KBytes/sec on a 115KB SIR
  link for big files which is not bad methinks. It is beta, so be sure
  to backup the Psion first, I did get a soft reset once (no data loss).
  ;-)" I have put the source into Appendix C.


  6.7.  Cellular Phone Connection

  As far as I know some cellular phones use the IrCOMM standard, e.g.
  Ericsson SH888 and NOKIA 6110 (I'm not sure about the NOKIA 8110).
  Maybe other cellular phones use the IrOBEX standard (see the Palm III
  section for information about setting up a connection) or IrMC.


  6.7.1.  Ericsson

  To start a communication session with /dev/irnine (/dev/ircomm), for
  instance, say:



  ______________________________________________________________________
  dip -t
  > port irnine
  > term
  ______________________________________________________________________


  Probably you may use cu or xc instead of dip, too (cu -l /dev/irnine
  or xc -l /dev/irnine). There are also reports about some efforts with
  the Ericsson GF768 and IR Modem DI 27.

  Benny Amorsen wrote: The SH888 emulates an IRDA-port when you connect
  it using the serial cable. Why someone would think up something weird
  like that is beyond me, but that is the way you get it to work in
  Windows. Not that I ever managed to make it work in Windows, though.

  Ales Dryak has send this survey (looks like a Debian/GNU Linux
  distribution, please modify your configuration accordingly). Mobile
  Ericsson SH888 (ati1 = 980408 1035 PRGCXC125101):


  1. mknod /dev/ircomm c 60 64

  2. /etc/conf.modules:

     ___________________________________________________________________
     alias tty-ldisc-11 irtty
     alias char-major-60 ircomm_tty
     ___________________________________________________________________



  3. /etc/irda/drivers: irattach /dev/ttyS0 # (IrDA port in SIR mode)

  4. running irmanager

  5. /etc/chatscripts/sh888

     ___________________________________________________________________
     <ABORT stuff>
     "" \d\d\d\d\d\dATZE0
     OK ATD<phone number to call)
     CONNECT \d\c
     ___________________________________________________________________



  6. /etc/ppp/peers/sh888


     ___________________________________________________________________
     noauth
     connect "/usr/sbin/chat -v -f /etc/chatscripts/sh888"
     /dev/ircomm
     115200
     defaultroute
     noipdefault
     user <your username> # don't forget to add your password to chap secrets or chat script
     ___________________________________________________________________



  A few seconds (app. 30) after executing pppd call sh888 I get
  connected to our Intranet/Internet having full IP connectivity
  (telnet, ftp, www, icmp tested). Futhermore I can connect to
  /dev/ircomm using minicom and play with AT command. Great! And looks
  stable!


  6.7.2.  NOKIA

  Carlos Vidal wrote: Correct me if I'm wrong, but it seems to me that
  Nokia telephones do not contain a genuine hardware modem, but
  something which is similar in principle to WinModems for PC. Whenever
  Nokia writes about modem communication, they use the name "Windows
  software modem" (or something similar). Which is actually backed up by
  the need to use special Nokia software for Windows (called Nokia
  Cellular Data Suite).

  Joonas Lehtinen wrote: This is true with 61xx models. Models: 8810,
  9000(i) and 9110 should work fine. (They have inbuilt modem). My Nokia
  9000 reports IrCOMM with linux.

  Some suggestion by Carlos Vidal carlos@tarkus.se : "I'm doing some
  tests trying to see how far can I get with my Nokia 6110 on Linux.
  I've just compiled gnokii-0.2.4 (gnokii is Nokia mobile phones
  connected via serial cable support for Linux and *BSD
  http://multivac.fatburen.org/gnokii/
  <http://multivac.fatburen.org/gnokii/> , WH), but it doesn't work. As
  I have Nokia Data Suite I did the following connection:

  Nokia 6110 <-- Nokia Cable --> PC/Linux <-- Null-modem cable -->
  PC/W95

  In the PC/Linux I run the program snooper (by Jun-ichiro itojun Itoh
  <itojun@mt.cs.keio.ac.jp>, sorry couldn't find an URL maybe some other
  sniffer will do it also, e.g. sniffit, see also appendiy about serial
  sniffers, WH) with small modifications in order to configure the
  serial port correctly.

  Normally, if snooper has the correct baud rate, the phone and the
  PC/W95 should communicate as if there was no snooper in between. This
  worked pretty well when I cracked the protocol of my Minolta camera.
  The problem here is that the phone doesn't answer or hangs after a
  while.

  It seems that the timing is quite important during the initial phase
  of the communication. The log I obtain is:


  ______________________________________________________________________
  0>1: UUUUUUUUUUUUUUUUUUUUUUUU
  line 0: LE *DTR *RTS ST SR CTS CD RI *DSR
  line 1: LE *DTR *RTS ST SR CTS CD RI *DSR
  0>1: UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
  UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
  UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
  UUUUUUUUUUUUUUU\x1e\x00\x0c\x02\x00\x09\x00\x01\x00\x0d\x00\x00\x02\x01@\x00P\x
  06
  1>0: \x18\x00\x00\x00\xfc\x18\x00\x00\x00\x00\x00\x00\xc0\xf0
  0>1: \x1e\x00\x0c\x02\x00\x09\x00\x01\x00\x0d\x00\x00\x02\x01@\x00P\x06
  1>0: \x18\x00\x00\x00\x18\x00\x00\xc0\xf0\x18\x00\x00\x00\x00\x00\x00\xc0\xf0
  0>1: \x1e\x00\x0cd\x00\x06\x00\x01\x00\x10\x01`\x13\x13
  1>0: \x18\x00\x00\xf0\x00\x00\xfc
  0>1: \x1e\x00\x0cd\x00\x06\x00\x01\x00\x10\x01`\x13\x13
  ______________________________________________________________________



  0 is the PC/95 and 1 is the phone. The communication starts with a
  stream of 'U' (0x55) and with DSR/DTR on. The phone answers with '0x18
  0x00 ...'. This dialog continues for a while as if both were deaf and
  finally the phone crashes and the only way to reset it is to remove
  the batteries!

  I guess that what happens is that the phone is trying to find the
  correct baud-rate and fails because of the delays introduced by
  snooper. This probably has to do with some IrDA protocol used with
  also with the infrared connection."


  Wessel de Roode <J.W.deRoode@student.utwente.nl> "I manged to get the
  Discovery IR hint bits (with my Palm Pilot):


  ______________________________________________________________________
  Discover:
  0:xxxxxxxx:81.01
          01  IR_HINT_PNP     01  IR_HINT_TELEPHONY (IrMC ?)
          80  IR_HINT_EXT

  Device info query:
  \006Device\012DeviceName
          4e 6f 6b 69 61 20 36 31 30 30           Nokia 6100
  ______________________________________________________________________



  I also managed to query the PNP device of the Nokia. It has one PNP
  device. It's PNPC100 which equalt a 9600 baud modem. I deleted the
  query, if somene can send me a hint to restore it. was somthing like
  IrDA:<dunno>:PNP:Comp#01 The same query with IrDA:<dunno>:PNP:CompCnt
  gives the number of PNP-devices are available in the Nokia. Which is
  here only one."

  Maybe it is necessary to load the irlpt_server module for connections
  to a NOKIA.


  6.8.  Digital Camera Connection

  Markus Schill wrote: "Great that there are also other people who are
  interested in using the SONY DSC-F1 IR adapter under linux. Up to now
  I have only toyed around with the linux-irda software and the serial
  IR adapter from PuMa Technologies that came with the camera. This is
  the status. I am using linux 2.0.33 and the latest linux-irda...  If I
  use:

  ______________________________________________________________________
  insmod irda
  insmod irtty
  irattach /dev/cua0
  ______________________________________________________________________


  the adapter starts talking to the camera. /var/log/messages says that
  SONY-DSC-F1 was found, but no service is started. (Please note, this
  probably doesn't apply to the 2.2.x kernel versions of Linux/IrDA,
  wh).

  There are two programs for linux available that can be used for the
  communication with the camera via cable: (1) chotplay and (2)
  stillgrab. They both take a tty as commandline option, so I guess that
  they should work if the irtty layer of the protocol stack works
  correctly ... I have not looked at anything in the linux-irda code,
  yet!). I am not sure whether I understand the stack but shouldn't the
  irtty make the thing look like a normal tty? What service should be
  started. "
  Dag Brattli wrote: "I'm not sure which application level protocol the
  camera uses, but it is possible that it implements the IrDA(TM)
  Infrared Transfer Picture Specification (IrTran-P). If you take a look
  at http://www.irda.org/standards/pubs/IrTran-P_10.pdf
  <http://www.irda.org/standards/pubs/IrTran-P_10.pdf>, you will see
  that it is a protocol which is implemented above IrCOMM (not IrTTY!).
  IrTTY is something we use just to be able to talk to the Linux serial
  driver. "


  6.9.  Window$9x/NT and Linux/IrDA


  6.9.1.  Introduction

  Why this? Unfortunately Linux users are not always supported with the
  necessary hardware information. Sometimes it is possible to look at
  this informations in Window$95. Sometimes its even useful to connect
  the two. Linux could also provide occasional access point services to
  a Window95 laptop of a friend dropping by.

  Where to get it from? At
  http://www.microsoft.com/windows95/info/irda.htm
  <http://www.microsoft.com/windows95/info/irda.htm> you will find a
  support pack "Infrared Transfer 2.0". It is a self-extracting archive
  W95IR.EXE with 331KB. Note: MicroSoft seems to change the location of
  this file (and others) at random.

  Microsoft(tm) has three versions of IrDA support for Windows95. The
  version number can be found in the "Software" icon in the Control
  Panel and the file infrared.inf.

  Version 1.0 is still delivered with some hardware.

  Version 2.0 is the version they currently offer at their web site. It
  is in the self-extracting file W95IR.EXE. The last time I looked
  (1999-02-21) it was 434KB and was found at
  http://support.microsoft.com/download/support/mslfiles/W95IR.EXE .
  Their website is frequently changing, so do not be surprised to find
  the file (also) in another location or not at all.

  Version 3.0 can/could be found in their downloadable Infrared
  development kit IRDDK30, but is mostly useful for developers. It is
  internally different from 2.0, it is based on "miniport" network
  drivers, just like the Linux version. It exists for some time and has
  some support for NT, but it clearly did not make it into the
  mainstream NT4.0 distributions. For 95 you are probably better off
  with 2.0. The choice may depend on the documentation of the drivers
  you get with your specific hardware.

  MS website also used to contain a nice utility IrXfer, contained in
  the archive IRXFER.EXE, This is the Infrared Transfer utility, which
  uses an IrOBEX variant I think, it is referenced in the IrOBEX
  protocol description. The utility was freely downloadable, but I could
  not find it the last time. It is a nice graphical utility which can be
  used to transfer files over IrDA between computers.

  With some machines, e.g. a HP Omnibook 800 it is necessary to use a
  vendor specific version of this package (for the HP Omnibook 800 you
  may find it on the recovery CD).

  Especially the ..\windows\inf\*.inf files and the device manager are
  of interest to look for configuration details.

  As far as I know Window$NT doesn't support IrDA(TM). About Window$98 I
  have heard there is no IrDA(TM) support yet. Countersys on
  http://www.countersys.com <http://www.countersys.com> claims to sell
  an IrDA solution for NT4.0 to support their JetBeam product, Microsoft
  refers to them for it.

  AFAIK:

  o  Windows95   : use 2.0

  o  Windows98   : delivered with 3.0 and IrXfer (works with Linux/IrDA,
     IrOBEX?)

  o  WindowsNT4.0: no IrDA

  o  Windows2000 : 3.0(+?) http://www.microsoft.com/hwdev/infrared/

  There are also some non M$ products available. Note: Some of them use
  proprietary infrared protocols:


  o  CounterPoint: QuickBeam 1.15 (works with Linux/IrDA, IrOBEX?)

  o  LapLink 7.5

  o  CarbonCopy 32 4.0

  o  pc ANYWHERE 7.5

  o  Puma Technology: TRANXIT pro 4.0


  6.9.2.  Connection between Linux/IrDA and Window$95 IrDA(TM)

  I suppose there are four ways to connect Linux/IrDA and Window$95:

  1) A network connection between two PC's. If you have set up Infrared
  Transfer 2.0, you will find an IrDA(TM) network device in the <Network
  Device Section>. But I couldn't get a working connection yet.

  Some information by Fons Botman: MS does not support PEER mode, which
  is strange, because it would fit their workgroup model. I have had
  success with IrLAN DIRECT mode when I removed the COMPUTER entry in
  the hints bits from the Linux side. Windows95 will recognise the Linux
  box as a lan access point and will try to install a driver for it but
  cannot find it. At this point I install the network adapter driver
  named Microsoft IrDA Lan Driver (you can also do this beforehand). You
  now should have a new active network driver which can be seen with
  WINIPCFG. To make it work with TCPIP I give the linux side an address
  using the redhat configuration tools and start a dhcp server on the
  linux box which hands out leases on the IrDA subnet. Sometimes I have
  to use WINIPCFG to explicitly ask for a lease. After this you can
  freely network between the two computers. Try to telnet or use
  explorer from Windows95 to linux.

  Open points:

  a. write a proper /etc/sysconfig/network/irlan-up script.

  b. solve the direct/peer mode problem and the peer mode dhcp problem
  (zero, one, too many dhcp servers on the irda sublan), maybe borrow
  leases from a dhcpserver on the eth0 lan (dhcrelay).

  c. Make the Microsoft IrDA Lan Driver install automatically, maybe
  this is a problem in the PnP configuration. This seemed to work better
  on Windows98.


  d. I sometimes get a TCP configuration problem after disconnect, which
  can be solved by a Windows95 reboot. Maybe tune the dhcp
  configuration.

  2) Maybe it is also possible to use the IrOBEX protocol. But I don't
  know which software to use and where to get it. I supposed the
  necessary software comes with a Palm III, but this seems not to be
  true.

  3) Takahide Higuchi <thiguchi@pluto.dti.ne.jp> provided IrCOMM
  support. From his page at http://www.pluto.dti.ne.jp/~thiguchi/irda/
  <http://www.pluto.dti.ne.jp/~thiguchi/irda/> I have taken the
  following description (I have modified it at little): "With IrCOMM
  support you can send or receive short messages between a linux box and
  a terminal program on a win95 laptop! Please add this line to
  /etc/conf.modules:

  ______________________________________________________________________
  alias char-major-60 ircomm_tty
  ______________________________________________________________________


  Next, make a device file mknod /dev/irnine c 161 0. Now Linux/IrDA
  services can be started as usual with irattach /dev/ttyS? &.
  /dev/irnine can be used as a serial device. ircomm and ircomm_tty mod-
  ules will be loaded automatically by kerneld/kmod when a program uses
  /dev/irnine. NOTE: I think "setserial" utility will not work on
  /dev/irnine. Tips:

  o  To accept login via IrCOMM, use this as a root: First, please
     enable IrDA and IrCOMM. Then edit /etc/inittab and add a line like
     this:

     ___________________________________________________________________
     T1:23:respawn:/sbin/getty -L -w irnine 38400 vt100
     ___________________________________________________________________


  and do this as a root: init q. And init will start waiting for incom-
  ing IrCOMM connection. You will see your favorite Linux's login prompt
  from terminal emulator on Win95!

  o  If you try pppd, please consider the -crtscts option to disable
     flow-control. I implemented some flow-control emulation but it is
     not tested.

  o  Now my patch reports what kind of features is needed by the peer
     infrared device. Messages like this will be written in syslog:

     Sep 4 10:01:02 monolith kernel: parse_control:instruction(0x12)
     Sep 4 10:01:02 monolith kernel: data:03



  o  I especially want to know what message SH888 (or other infrared
     devices except for win95 PC) says. So please mail me your syslog
     generated during IrCOMM connection! If you have a copy of the
     IrCOMM specification written by IrDA(TM), please see page 34 or 38,
     and you will know what these messages mean."

  4) From Fons Botman: IrLPT works fine. Make Linux the IrLPT server,
  and in Windows95 configure a printer to use the virtual LPT port
  defined when you installed MS-IrDA. Windows95 periodically sends some
  short sequence to the printer, I still have to figure out what that
  is.

  6.10.  Linux to Linux Connection


  6.10.1.  Connection Methods

  There should be three ways to get two Linux machines connected via
  Linux/IrDA.

  o  Dag Brattli wrote about the IrOBEX support: "The awakened reader
     may wonder what prevents the beaming of files from Linux to Linux?
     Well, nothing!! (but I haven't tried that yet). This means that we
     now have a "simple" way of beaming files between Linux laptops. I
     think that this may be the "killer app" we all have been waiting
     for!" Try to "load_misc irobex at both ends, and then try
     iroabex_app get on one of the machines and irobex put <file> on the
     other.".

  o  Via Linux/IrDA network connection. I suppose you have to load the
     module irlan_client at one machine and irlan_server at the other
     one.

  o  With IrCOMM support, in other words over a serial line, which could
     mean minicom, pppd, etc. If you want just now to use IrCOMM between
     Linux boxes, please add this line to /etc/conf.modules of _one_
     box:


     ___________________________________________________________________
     # set ircomm protocol engine to client-only mode
     options ircomm ircomm_cs=1
     ___________________________________________________________________



  Note: Don't add it to both boxes, or they cannot accept incoming con-
  nection each other! But since 2.2.7 there's no need to add options
  ircomm ircomm_cs=1 to /etc/conf.modules anymore. Please remove it if
  you are using it.


  6.10.2.  Compression

  Please note this feature is still quite experimental! Dag Brattli
  wrote: "Just wanted you to know I have just added COMPRESSION support
  to IrLAP! As you may know, this is _not_ part of the IrDA(TM)
  standard, but Linux can now negotiate with its peer and check if it
  has the same compression capabilities). So obviously if you are
  talking to Win95, Palm III or whatever, you will _not_ get
  compression!!! This is something which is exclusive for Linux as far
  as I know! The IrDA(TM) standard says that devices should ignore
  unknown field in the negotiation header, so we are still "compatible"
  with IrDA(TM) (have just borrowed an unused header value).

  If you want to try using the compression code (Linux <-> Linux) you
  will have to insert the irda_deflate module some time before you
  actually make the connection. I do it before irattach.

  The compression standard I have added is the deflate format used by
  the zlib library which is described by RFCs (Request for Comments)
  1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt (zlib
  format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).

  The compression interface is similar to PPP, so you can add as many
  different compressors as you want. Currently there is only support for
  GZIP, but BSD compression will be added later.  ...  Have just tested
  GZIP compression at 4Mbps. It was a really bad idea! Compressing the
  frames takes so much time that the performance is actually worse than
  when not using compression at all. The conclusion is that compression
  should only be used for SIR speeds, ..."



  6.11.  Multiple Instances

  Dag Brattli wrote: "The IrLAP layer has been enhanced to allow more
  than one instance (so I can use IrLAN on my built-in ir-port, and
  communicate with the Pilot over the IrDA dongle at the same time) ...
  So how do you make two Linux/IrDA connections? Well, you just fire up
  irattach for each of the IR ports you have like this:

  ______________________________________________________________________
  irattach /dev/ttyS0 &    (my ESI dongle)
  irattach /dev/ttyS2 &    (my builtin IrDA port)

  insmod irlan_client
  insmod irobex
  ______________________________________________________________________



  They will not see each other if you run them on the same machine,
  since they will initiate discovery exactly at the same time. You
  should however be able to use them against two other laptops. I can
  run a dongle, builtin IrDA port and a IrDA pcmcia card at the same
  time with three other IrDA devices without any problems.

  You should notice that if the devices can interfere with each other
  then it might be difficult to obtain a connection, since a device is
  not allowed to transmit if the media is busy. I sometimes have to put
  a book between them."


  6.12.  Connection to Docking Station

  Dag Brattli: "Connection to the Tekram IRDocking IR-660
  http://www.tekram.com/Hot_Products.asp?Product=IR-660
  <http://www.tekram.com/Hot_Products.asp?Product=IR-660> . This device
  is a docking station with LAN access, printer, mouse and keyboard. You
  can also use them at the same time as the internal mouse and keyboard!
  Just fire up gpm -t ps2 /dev/irkbd and the laptop will make a
  keyboard/mouse connection to the IR-660. Now I just have to make gpm
  read both /dev/psaux and /dev/irkbd, and then make X11 read
  /dev/gpmdata, and I should have the thing configured!

  ... one problem: gpm can handle multiple mice, but Linux cannot handle
  multiple different keyboards. So if you have one norwegian keyboard
  and one remote US keyboard like I have, then things will be a little
  bit confusing. I got a hint from Alan Cox about a project that is
  implementing real support for multiple keyboards, so I'll check that
  out.

  ... OK, I sort of worked it out. By using TIOCSTI on /dev/console, you
  can insert scancodes directly into the tty queue. This can be a
  problem for virtual consoles that expect to receive some translated
  and cooked keycodes, but X happens to like raw scancodes, so this will
  work quite nice when using X but not for other virtual consoles.
  Anyway this is good enough for me, so I will not use a lot of time
  converting the scancodes to keycodes and index them with some keymap
  just to make it work with text only virtual consoles. As I see it the
  irkbd driver has now been successfully been ported to user-space :-)


  ... the Tekram IR-660 device can, in addition to attach a keyboard and
  mouse, also print using IrTTP (it can print using IrLPT, but that is
  not so funny since it requires exclusive use of IrLMP, and you don't
  wan't to stop the network, mouse and keyboard just to print a
  document). I'll try and see if I can get IrTTP printing working using
  a fifo as well.

  ... Tekram has added a control channel in addition to the data channel
  so that you can get some status information about what is going on.
  The name of their own protocol is P1248. It's published through the
  "P1248" class and "IrDA:TinyTP:LsapSel" LM-IAS entry, so you can try
  to find it.

  ... Canon is using the P1248 protocol, and their printer monitor
  program BrintBuddy2 (Japanese version) is using this protocol now. I
  don't know what they use for the data channel. Maybe they support
  TinyTP directly in addition to the other methods. You can try and look
  up the "IrLPT" class with the "IrDA:TinyTP:LsapSel" in the LM-IAS and
  see if you can find it."


  6.13.  Connection to Keyboard

  The Linux/IrDA keyboard driver is now in user-space. Please see
  chapter Connection to Docking Station above.

  Lichen Wang: "The so called IrDA-D standard is designed to transfer
  Data. It is not suitable for IR Keyboard. IrDA-D is what Dag ported to
  Linux OS and what MS ported to Windows OS.

  The so called IrDA-C (Control) is designed for Keyboard, Joy-stick,
  etc. I am not aware that there is any product in the market that is
  using it yet.

  IrDA-D cannot talk to IrDA-C. IrDA-C cannot talk to IrDA-D either.
  Both the physical encoding/decoding and the software protocol are very
  different.

  It is possible to implement both IrDA-D and IrDA-C in the same device.
  Sharp says that IrDA-D and IrDA-C can coexist -- as long as both of
  them are not used at the same time in the same IR space. This sounds
  rather funny to me. According to this definition, anything can co-
  exist with anything as long as you do not destroy the universe
  permanently in the process ;-)

  Seriously, what SHARP says is that they can tailor the IrDA-D so that
  there are some unused time between the negotiated maximum turnaround
  time and the actual transmission. They then squeeze the IrDA-C frames
  in those unused time. The IrDA-D Primary and IrDA-C Master must be
  implemented in the same device. The keyboards will work, but mice and
  joysticks may be sluggish at times."


  6.14.  Connection via Serial Cable

  For some reasons it may be useful to connect via serial cable instead
  of using a real infrared link. Bjorn Hanson wrote: "Using a cable, I
  managed to get a PPP connection through my Ericsson SH888. I did the
  following (maybe some steps are wrong but they worked for me :-)

  o  added alias tty-ldisc-11 irtty to /etc/conf.modules

  o  edited /etc/irda/drivers to irattach /dev/ttyS0

  o  manually inserted the irda and irtty modules using insmod

  o  started irmanager -d1

  o  run kppp using /dev/irnine (through symlink /dev/modem)

  o  executed stty < /dev/irnine

  o  ping thehost

  o  ifconfig irda0 down

     Everything worked fine for ping and ssh (doing ls -l a couple of
     times) but the computer hang when I tried to mail (Netscape) this
     through that PPP. After reboot I tried both Netscape and lynx. Both
     were able to establish contact but none got any data."

  Another way by Claudiu Costin <claudiuc@calderon.pcnet.ro>:

  o  Linux 2.2.5 with IrDA compiled as modules

  o  Because irattach don't make kernel to load automatically IrDA
     stack, let's type modprobe actisys<

  o  Now, irattach /dev/ttyS1 -d actisys where COM2 is used for null
     link

  o  irmanager

  o  ping <address> work very good!

     This has to be done for both machines.

  Please note this is not the recommended stuff to connect two machines.
  Use PPP instead. Though I cannot see how this approach is useful I
  have included it beause it was asked sometimes in the mailing list.


  6.15.  Peer-to-Peer Mode / Direct Mode

  IrCOMM and IrLAN work in both modes, but currently I don't have
  further information about the differences between these modes and how
  to set them up.



  7.  Hardware Supported by Linux/IrDA


  7.1.  Obtaining Information about the Infrared Port in Laptops

  To get the IrDA port of your laptop working with Linux/IrDA you may
  use StandardInfraRed (SIR) or FastInfraRed (FIR).


  7.1.1.  SIR

  Up to 115.200bps, the infrared port emulates a serial port like the
  16550A UART. This will be detected by the kernel serial driver at boot
  time, or when you load the serial module. If infrared support is
  enabled in the BIOS, for most laptops you will get a kernel message
  like:



  ______________________________________________________________________
  Serial driver version 4.25 with no serial options enabled
  ttyS00 at 0x03f8 (irq = 4) is a 16550A     #first serial port /dev/ttyS0
  ttyS01 at 0x3000 (irq = 10) is a 16550A    #e.g. infrared port
  ttyS02 at 0x0300 (irq = 3) is a 16550A     #e.g. PCMCIA modem port
  ______________________________________________________________________



  7.1.2.  FIR

  If you want to use up to 4Mbps, your machine has to be equipped with a
  certain FIR chip. You need a certain Linux/IrDA driver to support this
  chip. Therefore you need exact information about the FIR chip. You may
  get this information in one of the following ways:


  1. Read the specification of the machine, though it is very rare that
     you will find enough and reliable information there.

  2. Try to find out wether the FIR chip is a PCI device. Do a cat
     /proc/pci . The according files for 2.2.x kernels are in
     /proc/bus/pci . Though often the PCI information is incomplete. You
     may find the latest information about PCI devices and vendor
     numbers in the kernel documentation usually in
     /usr/src/linux/Documentation or at the page of Craig Hart
     http://members.hyperlink.net.au/~chart
     <http://members.hyperlink.net.au/~chart> . From kernel 2.1.82 on,
     you may use lspci from the pci-utils package, too.

  3. Use the DOS tool CTPCI330.EXE provided in ZIP format by the German
     computer magazine CT ftp://www.heise.de/pub/ct/ctsi/ctpci330.zip
     <ftp://www.heise.de/pub/ct/ctsi/ctpci330.zip> . The information
     provided by this program is sometimes better than that provided by
     the Linux tools.

  4. Try to get information about Plug-and-Play (PnP) devices. Though I
     didn't use them for this purpose yet, the isapnp tools, could be
     useful. At the page from Craig Hart I found this PNP IDs:


     ___________________________________________________________________
     IBM0002   IBM Thinkpad Infrared Port
     IBM0034   IBM Thinkpad Infrared Port
     PNP0510   Generic IRDA-compatible device
     PNP8294   IrDA Infrared NDIS driver (Microsoft-supplied)
     PNP8389   Peer IrLAN infrared driver (Microsoft-supplied)
     ___________________________________________________________________



  5. If you are running Linux-2.3.x and PCMCIA-CS-3.1.x, turn on the PnP
     BIOS in PCMCIA-CS. Then, do a lspnp -v (from Thomas Davis).

  6. If you have installed the Linux/IrDA software load the FIR modules
     and watch the output of dmesg, whether FIR is detected or not.

  7. Another way how to figure it out explained by Thomas Davis
     (modified by WH): "Dig through the FTP site of the vendor, find the
     Windows9x FIR drivers, and they have (for a SMC chip):



     ___________________________________________________________________
     -rw-rw-r--   1 ratbert  ratbert       743 Apr  3  1997 smcirlap.inf
     -rw-rw-r--   1 ratbert  ratbert     17021 Mar 24  1997 smcirlap.vxd
     -rw-rw-r--   1 ratbert  ratbert      1903 Jul 18  1997 smcser.inf
     -rw-rw-r--   1 ratbert  ratbert     31350 Jun  7  1997 smcser.vxd
     ___________________________________________________________________



  If in doubt, always look for the .inf/.vxd drivers for Windows95. Win-
  dows95 doesn't ship with _ANY_ FIR drivers. (they are all third party,
  mostly from Counterpoint, who was assimilated by ESI)."

  8. Also Thomas Davis found a package of small DOS utilities made by
     SMC. Look at http://www.smsc.com/ftppub/chips/appnote/ir_utils.zip
     <http://www.smsc.com/ftppub/chips/appnote/ir_utils.zip> . The
     package contains FINDCHIP.EXE. And includes a FIRSETUP.EXE utility
     that is supposed to be able to set all values except the chip
     address. Furthermore it contains BIOSDUMP.EXE, which produces this
     output:

     Example 1 (from a COMPAQ Armada 1592DT)


     ___________________________________________________________________
          In current devNode:
                Size      = 78
                Handle    = 14
                ID        = 0x1105D041 = 'PNP0511' -- Generic IrDA SIR
                Types:  Base = 0x07, Sub = 0x00,  Interface = 0x02
                     Comm. Device, RS-232, 16550-compatible
                Attribute = 0x80
                     CAN be disabled
                     CAN be configured
                     BOTH Static & Dynamic configuration
           Allocated Resource Descriptor Block TAG's:
                TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                        Min=0x03E8, Max=0x03E8
                                        Align=0x00, Range=0x08
                TAG=0x22, Length=2 IRQ Tag, Mask=0x0010
                TAG=0x79, Length=1 END Tag, Data=0x2F
     ___________________________________________________________________



  Result 1:

  Irq Tag, Mask (bit mapped - ) = 0x0010 = 0000 0000 0000 0001 0000 so,
  it's IRQ 4. (start at 0, count up ..), so this is a SIR only device,
  at IRQ=4, IO=x03e8.


  Example 2 (from an unknown machine)



  ______________________________________________________________________
       In current devNode:
            Size      = 529
            Handle    = 14
            ID        = 0x10F0A34D = 'SMCF010' -- SMC IrCC
            Types:  Base = 0x07, Sub = 0x00,  Interface = 0x02
                 Comm. Device, RS-232, 16550-compatible
            Attribute = 0x80
                 CAN be disabled
                 CAN be configured
                 BOTH Static & Dynamic configuration

       Allocated Resource Descriptor Block TAG's:
            TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                    Min=0x02F8, Max=0x02F8
                                    Align=0x00, Range=0x08
            TAG=0x22, Length=2 IRQ Tag, Mask=0x0008
            TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                    Min=0x02E8, Max=0x02E8
                                    Align=0x00, Range=0x08
            TAG=0x2A, Length=2 DMA Tag, Mask=0x02, Info=0x08
            TAG=0x79, Length=1 END Tag, Data=0x00
  ______________________________________________________________________



  Result 2:

  a) it's a SMC IrCC chip

  b) one portion is at 0x02f8, has an io-extent of 8 bytes; irq = 3

  c) another portion is at 0x02e8, io-extent of 8 bytes; dma = 1 (0x02
  =0000 0010)


  Thomas Davis has placed some device information at
  http://www.jps.net/tadavis/irda/devids.txt
  <http://www.jps.net/tadavis/irda/devids.txt> .

  WARNING: The package is not intended for the end user, and some of the
  utilities could be harmful. The only documentation in the package is
  in M$ Word format. Linux users may read this with catdoc, available at
  http://www.fe.msk.ru/~vitus/catdoc/
  <http://www.fe.msk.ru/~vitus/catdoc/> .


  9. Use the Device Manager of Windows9x/NT or WINMSD (Windows NT
     Diagnostics) in Windows NT 4.0, WINMSD is quite useful, and a bit
     more informative than Windows9x's Device Manager.

  10.
     You may also use the hardware surveys mentioned below.

  11.
     And as a last ressort, you may even open the laptop and look at the
     writings at the chipsets itselfs. Here is an probably incomplete
     list of manufacturers: Chrystal, Hewlett Packard (HP, chipsets are
     marked HSDL), Hitachi, IBM, National Semi Conductor (NSC), NEC,
     Philips, Sharp, Standard Micro Systems Corporation (SMC/SMSC),
     Texas Instruments (TI), VLSI, Winbond. As an example of application
     circuits the HSDL-7001 (from a HP brochure, modified by WH):



     ___________________________________________________________________
         LEDs        Encode/Decode        SIR/FIR

        HSDL-1001    HSDL-7001          UART 16550/
                                       MicroController
        ______      ______________      ____________
       |      |    |              |    |            |
     (||   TXD|<---|IR_TXD     TXD|<---|SOUT        |
       |      |    |              |    |            |
       |      |    |           RCV|--->|SIN         |
       |      |    |              |    |            |
     (||   RCV|--->|IR_RCV  16XCLK|<---|BAUDOUT     |
       |      |    |          NRST|-+  |            |
        ------      --------------  |   ------------
                                    V
     ___________________________________________________________________



  7.2.  Big Endian

  Though the source is build to work with big endian machines, I didn't
  get any reports about actually using it. It would be interesting if
  it's actually working or not. You will probably need an IrDA dongle or
  something to test it.

  i386 and alpha are little endian, arm can choose (but the NetWinder
  has been wired as a little endian machine). m68k, sparc and ppc are
  big-endian! mips can choose I think. If unsure, look in
  /usr/src/linux/asm/byteorder.h and check if it includes
  <linux/byteorder/big_endian.h> or <linux/byteorder/little_endian.h> .


  7.3.  SMP

  Dag Brattli: "The problem ... has not been analyzed yet. It may be
  unsafe, and it may work pretty well. All upstream traffic should be
  safe (bh's), but downstream traffic _may_ be dangerous. I really don't
  know. ... All list operations irqueue.c in Linux-IrDA is currently SMP
  safe!". Please check the source code for the current status.


  7.4.  Hardware Surveys

  There are some surveys about Linux and infrared capable devices in the
  WWW:


  o  The Linux/IrDA Project - Hardware Survey at
     http://www.cs.uit.no/linux-irda/hardware.html
     <http://www.cs.uit.no/linux-irda/hardware.html>

  o  Takahide Higuchi at
     http://www.pluto.dti.ne.jp/~thiguchi/ir/product.html
     <http://www.pluto.dti.ne.jp/~thiguchi/ir/product.html>.This page is
     in japanese.

  o  I have also set up a hardware survey at
     http://www.snafu.de/~wehe/index_li.html
     <http://www.snafu.de/~wehe/index_li.html>. This list also contains
     information about infrared capable devices which are not mentioned
     here (mice, printers, remote control, transceivers, etc.).

     To make this hardware survey list more valuable it is necessary to
     collect more information about the infrared devices in different
     hardware. You can help by sending me a short e-mail containing the
     exact name of the hardware you have and which type of infrared
     controller is used.

     Please let me also know how well Linux/IrDA worked, at which tty,
     port and interrupt it works and the corresponding infrared device
     (e.g. printer, cellular phone) you use.

     You can also help by contributing detailed technological
     information about some infrared devices, which is necessary to
     develope an according driver for Linux.



  8.  Graphical User Interface (GUI)

  Currently there are two graphical user interfaces for Linux/IrDA under
  development:


  8.1.  GNOBEX

  A GNOME application developed by Dag Brattli
  http://www.cs.uit.no/linux-irda/irda.html <http://www.cs.uit.no/linux-
  irda/irda.html> with support for drag'n drop from the GNOME file
  manager gmc. It will also show the progress of the file transfer and
  give some better error messages when something goes wrong. The GUI
  isn't finished yet, but if you want to try the GUI you will need the
  Perl-GTK+ module.

  Annotations about CORBA by Dag Brattli: I have just had the first
  successful test running ORBit/CORBA over IrDA sockets/IrTTP! ORBit is
  btw. the GNU CORBA implementation used by the GNOME project. The goal
  is to make it possible for GNOME applications to work between your
  laptop and your stationary PC without having to first set up a TCP/IP
  link. Applications on the laptop can then make use of CORBA exported
  services on your stationary machine.

  IrDA (as a one hop technology) fits nicely into the network hierarchy
  since ORBit will now choose which profile to use in this order:


  1. Same process (same address space), Some short circut mechanism is
     used that I don't know much about. It should however be nearly as
     fast as a procedure call.

  2. Same machine (different address space), UNIX domain sockets are
     used

  3. One hop away, IrDA is used (if IrDA is available and a ORBit/CORBA
     capable device is discovered)

  4. Multiple hops away (if all other methods fails). IIOP, TCP/IP will
     be used.

  I use my laptop and a NetWinder for testing. The machines are
  connected by both Ethernet and IrDA. It's really nice to start a CORBA
  session and see that the IrDA does discovery, IAS-query, and connects
  if a CORBA capable device is discovered. If somethings goes wrong,
  IIOP (TCP/IP) will automagically be used instead. When the transaction
  if finished, the link goes down again."

  There is also OBEX support to the gnome-calendar application gncal.
  Just click on an event and beam it to your Palm Pilot! Still needs to
  do some cleanup, and support for beaming the other way as well.

  8.2.  KDE

  A KDE application developed by Thomas Davis. Look at his page
  http://www.jps.net/tadavis/irda <http://www.jps.net/tadavis/irda>.

  Here's your chance to contribute! Both GUI's need some icons. Any
  icons need to be:


  o  each of them should display a printer, PC, PDA, LAN connection,
     etc.

  o  the format is not really important, but PNG is what will be used in
     the end

  o  set size (48x48 pixels seems to be a common size, I think)

  o  large and mini (ask about size for that; mini's are for docking and
     such)

  o  16 colors

  o  free for use

  o  please, don't blatently copy MS icons!

  Please contact the developers.


  9.  Power Saving

  In the specifications of my HP OmniBook 800 it is recommended to turn
  off the IR port, if it is not in use, because it may consume up to 10
  percent of the battery time.

  If necessary, you may also try to disable the Fast RRs feature in the
  IrDA section of the kernel. This option will give you much better
  latencies but will consume more power.



  10.  Beyond IrDA


  10.1.  Extending Transmission Distance

  According to the IrDA specification the range is up to 1 meter. From
  the "IrDA Data Link Design Guide" p. 20 by Hewlett-Packard
  http://www.hp.com/go/ir <http://www.hp.com/go/ir> : " In some cases it
  may be desired to increase link distance beyond the 1 meter guaranteed
  by IrDA. The two ways to do this are to increase transmitted light
  intensity, or to increase receiver sensitivity. In order to extend the
  link distance, both sensitivity and intensity must be increased for
  both ends of the IR link. If it is desired to communicate with a
  standard IrDA device that may have minimum transmitter intensity, the
  receiver intensity must be increased. The standard IrDA device may
  also have minimum receiver sensitivity, so transmitter intensity must
  also be increased."

  Andreas Butz wrote: "This might be a silly question, but has anyone an
  idea whether the whole IrDA stack really relies on a two-way
  connection, or whether there are some parts of it that could be abused
  for a one-way connection, ideally for unreliable data? We're trying to
  modify some IR dongles to broadcast information to palm pilots over
  several meters distance (cover a whole room), and since we don't want
  to modify the pilots themselves, and increasing the sensitivity on the
  receiver side seems unlikely to work, we're stuck with a one way
  link.". Please see the mailing list archive for details of the
  discussion.

  Sent by Marc Bury <Marc.Bury@NETGEM.com> " .. just heard about some
  Philips new scheme for remote controls: they call it IRDA - Control.
  This is supposed to be bi-directional, 75 kbps data rate, multiple
  simultaneous devices (up to 8) and with a minimum 6 meter range!" More
  information at   http://www.irda.org/ <http://www.irda.org/> .

  The german magazine ELEKTOR issued a guide to build a Long Distance
  IrDA Dongle (20m, RS232, IrDA 1.0), ELEKTOR 5/97 p.
  http://www.elektor.de <http://www.elektor.de> .

  <tzeruch@ceddec.com>: The main problem is that you generally have to
  make the receiver more sensitive. Basic physics has the inverse square
  law: the intensity drops with the SQUARE of the distance, so going
  from 1 to 5 meters requires 25x the power (and battery drain on a
  portable device), or 25x the sensitivity (and dynamic range - it still
  has to be able to work at 3 inches).  And if you want to do it on the
  other end, it doesn't simply have to be 25x more sensitive, it must
  pick up the tiny IrDA pulse needle in a haystack of florescent lights,
  screen savers, moving shadows ...

  Someone tried it with a Palm III upgrade board  http://home.t-
  online.de/home/PSPilot/ppppiii.htm  <http://home.t-
  online.de/home/PSPilot/ppppiii.htm> .

  Also laser diodes (pulsable) were recommended by K-H.Eischer: But they
  are more expensive. And the laser diodes are also dangerous if they
  have more than 1 mW. A better solution would be to use lenses to focus
  the beam. There is a minimum of absorbtion in the air (I don't know
  the right frequency) and you should use IR diodes with this frequency.

  James wrote: " Who ever it was wanting to do long distance with IrDA,
  we've tried this before. The best approaches are:

  o  wavelan - buy the cards but not the antennas you can make your own
     with equaly good gain as the $9000 type they sell here.

  o  microwave - you can pick up X-band doppler radar modules, tune them
     slightly apart and use the your local TX as the LO for the
     incomming RX, the whole thing behaves like ethernet and you can
     hook it onto an AUI port, this may now be illegal.

  o  ir - Many people sell kits which transmit video over Ir, they come
     complete with the large fresnel lense you need, they manage about
     4MHz b/w over 100m.

  o  laser diodes - when we looked at these they were a pain, I think
     elantec make decent drivers but modulating them was a big pain,
     Steve Carcia had a series on articles on modulating He-Ne lasers
     but be careful they have lots of volts in them that want to get out
     and kill you.

     Whatever you choose IrDA might very well be a good choice for a
     protocol, given it's one of the few that sensibly copes with
     simplex."


  10.2.  Upcoming Standards (Bluetooth and IrDA)

  "More and more people now think that IrDA and Bluetooth will live
  happily side by side, and the idea of Bluetooth as the IrDA killer
  just don't work anymore. IrDA is still unbeatable in price/performance
  and with the new additions to the standards family like AIR and VFIR,
  it's really good to see that IrDA is moving in the right direction."


  11.  Troubleshooting, Mailing List


  11.1.  General Information

  If you encounter problems. Try the following:


  o  Read the FAQ section below.

  o  Look at /var/log/messages and/or /var/log/kern.

  o  Do a dmesg.

  o  Look at the different files in /proc/irda.

  o  Look at the mailing list archivs, whether your problem is already
     known. Since August 1999 it the archiv is located at Linux-IrDA
     mailing list archiv
     <http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda>. All mails
     before are archived at
     http://www.ita.chalmers.se/~svinto/hypermail/irda/
     <http://www.ita.chalmers.se/~svinto/hypermail/irda/> .

  o  As a last ressort ask in the Linux-IrDA mailing list. You may
     subscribe at Linux-IrDA mailing list
     <http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda> . You are
     welcome to use this mailing list for posting questions, answers,
     bug-reports, patches, suggestions and comments. It would be much
     easier to help you if you provide some information. Please include:


     ___________________________________________________________________
     uname -a
     cat /proc/net/irda/irlan
     cat /proc/net/irda/irlap
     irdadump
     ___________________________________________________________________



  o  There is also a new IrDA related mailing-list. This list is driven
     by Dag Brattli and the Pasta project, and is intended for
     discussion about IrDA protcols, setups, configurations, devices,
     and problems that users and developers might have and want to
     discuss with others. So this is ment to be a much more general list
     than the Linux-IrDA list. You can find the list at: Linux-IrDA list
     <http://www.pasta.cs.uit.no/mailman/listinfo/irda/>. Archives can
     be found at: Linux-IrDA list archiv
     <http://www.pasta.cs.uit.no/pipermail/irda> . From Dag Brattlis
     announcement: Though "IrDA is already running a public (but web-
     only) mailing-list, and I hope it's OK that we run these two lists
     in parallel. I'm not trying to have any competition ;-) but my
     intentions are purely to make it easier for users and developers to
     publicly discuss IrDA related (and non-Linux specific) issues with
     each other. I have named the list IrDA <irda@pasta.cs.uit.no> since
     it's about IrDA, so I hope this is OK for IrDA. If you visit the
     list, you will see that I have choosen to call it: IrDA -- The
     Pasta Projects Unofficial IrDA Forum.



  11.2.  Troubleshooting Techniques

  Although I'm not much of a hacker I collected some tricks to track
  errors or bugs in the Linux/IrDA software.


  o  You may set the debug level in /proc/sys/net/irda/debug to 1, 2, 3,
     4.

  o  Use the files in /proc/sys/net/irda to try different parameters
     like echo 0 > /proc/sys/net/irda/discovery.

     The /proc/*/irda files are:

     ___________________________________________________________________
     root@duckman:~# ls /proc/sys/net/irda/* /proc/net/irda/*
     /proc/net/irda/discovery        /proc/net/irda/irlmp            /proc/sys/net/irda/devname
     /proc/net/irda/irda_device      /proc/net/irda/irttp            /proc/sys/net/irda/discovery
     /proc/net/irda/irias            /proc/sys/net/irda/compression
     /proc/net/irda/irlap            /proc/sys/net/irda/debug
     ___________________________________________________________________



  o  It is also possible to debug the code. But I don't know how to do
     this. If you want to use SKB debug code, you may edit irda.h and
     change /include/linux/skbuff.h (see revision history of snapshot
     10-2-98).

  o  For problems with the irda module a utility from the modules
     package kdstat might be helpful. But I was not able to try this.

  o  "You can now alter the number of discovery packets used (1, 6, 8 or
     16) and the timeout between sending them (2-8 * 10 ms) in
     /proc/sys/net/irda. Please experiment if you have problems
     discovering your device. My Palm III seems to like 16
     discovery_slots and 8 (*10 ms) for slot_timeout. " ... "The
     absolute minimum for reliable discovery of the IR-610 seems to be
     9."

     Another statement: ... the Palm III does not like 8 discovery
     frames in a row, but 6 is OK. With 8 it will answer 1 out of 6-10
     times, with 6 it answers every time. I really don't know if this is
     a problem with Linux-IrDA or the Palm III. One solution to this
     problem, is to cycle though some different discovery methods for
     each discovery like this:

     Disocvery 1: send 8 xid frames with 80 ms separation

     If answer, keep the same config, if no answer, try next config

     Discovery 2: send 6 xid frames with 80 ms separation

     Discovery 3: send 8 xid frames with 90 ms separation

     Discovery 4: send 6 xid frames with 90 ms separation

     Discovery 5. Go back to 1.

     or some other pattern and maybe more combinations.

     Maybe this is sometimes implemented, so it would be enabled if
     /proc/sys/net/irda/discovery_slots is set to 0 .



  o  If anybody gets a kernel Oops, then please feed it to the
     ../linux/scripts/ksymoops/ksymoops program, so that we can find out
     where it went wrong. Just cut out the Oops lines from the syslog,
     save them to a file, and then run ksymoops <file>

  o  Dag Brattli wrote: I found out that the cs4232 sound card was
     giving me several hundred interrupts per second! I removed the
     sound stuff from my kernel, and the machine is now generally about
     4 times faster!

     Linux/IrDA may get problems if you are running the esound server
     (esd) on your machine. Both my machines, a 166Mhz Pentium laptop
     and a 200Mhz Pentium Pro cannot run Linux/IrDA when esd is running.
     The reason is that esd makes the soundcard give interrups over 300
     times/second which makes the serial driver overrun when receiving.
     This is because the serial driver now uses slow interrupts in
     Linux-2.2 (everything is slow interrupts in 2.2), so the interrupt-
     handler schedules on its way out. The good thing about slow
     interrupts is that packets are delivered much faster, since you
     don't need to wait for the next timer-tick. The only exception for
     this is the pc87108 driver which works fine since it uses DMA and
     will only give a couple of interrupts per packet.

  o  There are also some userspace tools irdaping and irdadump to check
     Linux/IrDA connections.

  o  AFAIK it is possible to use IrCOMM either with an infrared device
     or via serial cable. Maybe this give some debugging possibilities,
     too.

  o  1) You may edit /etc/conf.modules, adding the following lines:

     ___________________________________________________________________
     option irda irda_debug=3
     option irlpt_client_debug=3 irlpt_common_debug=3
     ___________________________________________________________________



  2) Make sure the irda modules have been totally removed.

  3) Edit /etc/syslog.conf, adding the following lines:

  ______________________________________________________________________
  */*                     -/var/log/all
  ______________________________________________________________________



  4) Do killall -1 syslogd .

  5) Print, or do whatever causes problems with irlpt .

  6) Check all the files in /var/log/ .



  12.  IrDA Network Neighborhood


  12.1.  Laptop-Printer-PDA

  You can take a little peek at http://www.cs.uit.no/linux-
  irda/snapshots/ircc.gif <http://www.cs.uit.no/linux-
  irda/snapshots/ircc.gif> Drag-n-drop stuff, so you will be able to
  drop files to your PDA (uses IrOBEX) or drop files to your printer
  (uses IrLPT) etc.


  12.2.  Bridging/Routing

  James wrote: " ... there is a much better way of doing the briding
  which is routing. This is entirely user land and requires no kernel
  patches.

  It's in two parts (you may only need one your milage may vary...) the
  first called irdaipcfg does the following:

  1) First part is executed as irdaipcfg ifeth ifirlan daemonizes, then
  looks for ARP packets on ifirlan, checks that the arp was not
  generated by the machine on which it is running. The arp contains the
  ip address of the machine on the other end of the irlan (it was
  generated by the gratuatous arp in the irlan code). The program then
  sets up a host route to this ip address via ifirlan, adds a proxy arp
  to ifeth for it and generates a gratuatous arp on ifeth. It writes the
  ip address of the client in /var/run/host.ifirlan so you can easily
  undo all of this from a script.

  2) Second part is executed as gratarp ifirlan. Sometimes the
  gratuatous arp seems to get lost in the pipe work, gratarp deamonizes
  and spits out a whole stream of the things...

  I use them as follows: (you can use them to do whatever you like)

  On my host (the machine bolted to my local net) irlanx is brought up
  as 10.192.0.1 with a netmask of 255.255.255.255 and a broadcast of
  10.192.0.1 by my ifup script from /etc/irda/network by irmanager.
  /etc/irda/network then runs irdaipcfg eth0 irlanx and this does the
  routing.

  From /etc/irda/network

  ______________________________________________________________________
  "start")
          echo 1 >/proc/sys/net/ipv4/conf/all/forwarding
          ./ifup ifcfg-${device}
          /sbin/irdaipcfg ${localnet} ${device}
      ;;
  "stop")
          host=`cat /var/run/host.${device}`
          if [ .$host != . ]; then
            /sbin/arp -d ${host} dev ${localnet}
            /sbin/route delete ${host} dev ${device}
          fi
          ./ifdown ifcfg-${device}
          /sbin/ifconfig ${device} down
      ;;
  ______________________________________________________________________



  on the client I set up irlan to use an address on my normal subnet
  10.32.32.51 but with netmask 255.255.255.255 (not my usual netmask) I
  have some static routes which are host 10.192.0.1 dev irlan, and net
  default gw 10.192.0.1 dev irlan. I run gratarp from the
  /etc/irda/network, and I can wander arround my house and not lose
  telnet and ssh sessions ... they are sitting in
  ftp://bullard.esc.cam.ac.uk/pub/irda
  <ftp://bullard.esc.cam.ac.uk/pub/irda> "


  12.3.  IPv6

  AFAIK IPv6 has neighbor discovery mechanismem, but I don't have
  information about Linux/IrDA used with IPv6. Please see the mailing
  list archive for a discussion of this topic under the subject
  :"patch-2.2.7-ac1-irda4" .


  12.4.  DHCP

  I have got reports that it is possible to use dhcpcd with IrLAN.
  Please use latest DHCP software.


  13.  Linux/IrDA and APM

  Fons Botman wrote: "When I hibernate my HP OmniBook 2000CT, (Fn-12
  diskimage is written to disk, machine turns off completely) with irtty
  active and turn it on again, irda does not work. I can see it trying
  to reply to discovery frames it receives from a windows box, using
  irdadump on the OmniBook. but the windows PC does not see the replies.
  If I just kill irattach and remove irtty and serial, and start
  irattach again, it starts working again. Does this occur with other
  linux laptops also? Is it a problem in the serial device driver? "
  Also Pedro Figueiredo reported this problem for a Fujitsu LifeBook
  735DX.

  Answer by Dag Brattli: "Could you all check if the same thing is
  happening when your're using PPP (and not using IrDA). I guess the APM
  stuff shuts down the serial port, so that the driver will need to
  reinitialize it when waking up again. This is properly implemented by
  some of the PCMCIA drivers I know about, but I really don't think the
  serial driver gets any events from the APM system.

  So here you have your own little kernel project. Start adding APM
  support to irport which will be the easiest thing (and also to the FIR
  drivers), then you can start adding a patch to the serial driver (if
  needed). Again I think the PCMCIA subsystem may be a good source on
  how to fix it properly."


  14.  Known Bugs

  If you find a bug, please send a bug report to the mailing list,
  including dmesg output, and which Linux version, and hardware you are
  using. Thank you!

  Sometimes IrCOMM fails to connect (especially when both devices
  discover each other. You can disable discovering with echo 0
  >/proc/sys/net/irda/discovery)

  A CR (carriage return) character cannot be transfered between two
  linux boxes via IrCOMM with cat file >/dev/irnine and cat /dev/irnine.
  It causes a strange thing and freezes your Linux box.  Compiling the
  pc87108 device driver non modular crashes the kernel on boot.
  Temporary solution: compile the driver as a module

  IrOBEX may eat some data on receive. The bug is most probably in the
  user-space side of IrOBEX.



  15.  FAQ



  o  Q1 - Question: I do not know anything about ports and irqs. What
     should I do?

  o  Answer:


     PART A: Hardware settings

     - 1  Have a look at your hardware specs!!! If not available look at
     the support page of your vendor, or contact the support hotline.
     You might also find the information in one of the hardware surveys
     mentioned above.

     - 2  Use a current BIOS. Usually available at the support page of
     your vendor.

     - 3  Try setserial /dev/ttyS? -g -a | egrep 16550A. One of the
     shown devices is probably the one you are looking for. Usually it
     is the second one, but with no guarantee.

     - 4  Note: What seems like an UART is physically the IrDA
     controller. For my HP Omnibook 800 this is the VLSI VL82C147 PCI -
     IrDA controller. These controllers should behave up to 115 200 bps
     like UART's. But sometimes it is very difficult to get the right
     configuration.

     PART B: How to tell the kernel about the hardware settings

     -4  cat /dev/ioports to see which ports are already in use.

     -5  cat /dev/interrupts to see which interrupts are already in use.

     -6  Make ports and interrupts available for use with the IR device,
     e.g. stop the pcmcia service or include a line like this in
     /etc/sysconfig/pcmcia: PCIC_OPTS="irq_list=3,4,5,7,9,10,12,14,15"

     -7  Now try to guess what the right interrupt and port is. Use
     setserial /dev/ttySx irq M port 0xNNNN to tell the kernel. If there
     is more then one possible chance try them all (Note: As mentioned
     in the Serial-HOWTO you should not try irq 0, 1, 6, 8, 13, 14).

     -8  If you were successful please send the useful parameters to the
     author, because I would like to include them in the hardware
     survey.

     -9  Good luck.

     It might also be necessary to fine tune the IR serial port with
     setserial, e.g., setserial /dev/ttyS0 spd_vhi (speed rate 115200).



  o  Q2 - Question: For me, irattach hangs, but recognizes the printer.
     /var/log/messages shows that irattach found my HP LaserJet 6P.

  o  Answer: The "hang" is normal for irattach. Everything is working
     right if you see the HP Laserjet show up in the log. "hang" means
     irattach is polling the IrDA-Devices for incoming connections. If
     you kill it with <CTRL C> the irattach program crashes and
     /dev/ttySx does not work anymore. The problem is within the irda
     module, and not with the irattach program. Rebooting is the only
     thing to do! Next time put irattach in the background by using
     irattach &. Stop it if necessary with killall irattach.
     Recommendation by Andreas Butz: To my knowledge, <CTRL Z> bg should
     work, too, but I haven't tried it in this specific case. Normally
     it has the exact same effect as appending & to a command.
  o  Q3 - Question: I get a message like tcsetattr read/write error in
     /var/log/messages.

  o  Answer: Caused probably by wrong /dev/ttyS* or wrong irq or port.


  o  Q4 - Question: Every setting seems alright, because I get the
     appropriate messages. But it still does not work.

  o  Answer: Move the devices to within 0.5 meter (1.5 feet). Check that
     only one application is using the infrared port. Check that both
     devices are using the same protocol, such as IrOBEX or IrCOMM.


  o  Q5 - Question: I have downloaded the latest snapshot, and compiled
     it successfully under Linux 2.0.33 running on an IBM Thinkpad 560E.
     In the absence of any other IrDA machines to test with, is it safe
     to assume that once the module has been inserted and the syslog
     reports "irattach: Serial connection established.", is the IR
     really working, and will it start to respond once there is another
     machine with which to talk?

  o  Answer by Dag Brattli: Sorry, this only means that irattach has
     done its part of the job, which is just to start the irda-tty.
     Maybe the message should have been different, but as I said, it
     tells that the serial connection between the irda-chip and the
     irda-driver is established.

     Note: Support for IrDA on 2.0.x kernels has been discontinued. You
     are encouraged to switch to 2.2.x kernels and use the newest IrDA
     patches available at http://www.cs.uit.no/linux-irda/snapshots/
     <http://www.cs.uit.no/linux-irda/snapshots/>.


  o  Q6 - Question: At startup modprobe -a checks /lib/modules/<KERNEL-
     VERSION>/net/irda.o and causes the messages: "IrLAP; Missing IrTTY
     /IrLMP Error no IrLAP connection" (in /var/log/messages and on the
     console).

  o  Answer by Werner Heuser: Workaround for SYSTEM V style systems: Put
     a script named for example "ir_rmmod" containing


       ______________________________________________________________________
       #!/bin/sh
       echo "$0 : remove irda module"
       rmmod irport.o
       rmmod irtty.o
       rmmod irda.o
       ______________________________________________________________________



  in the startup process (/etc/init.d and a symbolic link name for exam-
  ple "S100ir_rmmod" in /etc/rc3.d to "ir_rmmod"). (Verify the path for
  "sh"). For BSD style systems try the corresponding approach.


  o  Q7 - Question by Ho Chin Keong: Is there other way of setting up
     communication between the 2 laptops besides setting up a LAN route
     between the two?

  o  Answer by Dag Brattli: Yes and no! One of the IrDA standard, IrCOMM
     permits you to emulate a serial cable between two laptops, so you
     can use any application written for serial ports (terminals, PPP,
     slip, etc.). This is however not yet implemented in Linux/IrDA. The
     IrLPT (printer) support is actually a subset of IrCOMM, so some of
     it is working!


  o  Q8 - Question by Ho Chin Keong: If I block the infrared path
     deliberately for more than 10 seconds, the connection could not re-
     establish. I have to kill the irattach and restart the whole
     procedure to start the infrared route. The connection could be
     maintained, however, if the blocking is less than 10 seconds. Is
     this part of the design or a bug? Is there any way whereby we can
     lengthen this time limit from 10 s to longer or infinitely?

  o  Answer by Thomas Davis: This seems to be a bug in the primary side
     of the IrLAP/IrLMP code. It appears not to send the
     reset/disconnect notice all the way back up the stack. You'll
     notice it when IrLPT gets stuck in the query mode while you were
     trying to talk to a printer, and disconnected/interrupted it when
     it was handshaking. (and now, it shows up in the IrLAN portion)


  o  Q9 - Pierre-Guillaume Raverdy asked: Should I update to IR lib on
     my palm and update the system to version 3.0.2?

  o  Answer by Dag Brattli: You should not need to update your Pilot,
     but it should not do any harm to do so. It is however required if
     you want to use the IrCOMM library from IsComplete


  o  Q10 - Pierre-Guillaume Raverdy asked: Also any simple source code
     (especially on the palm side) would be greatly appreciated.

  o  Answer by Dag Brattli: Get the Pilot SDK from Palm. Unzip the
     examples.zip and take a look at the beamer application.


  o  Q11 - Is there any IrDA support for BSD?

  o  Answer: Linux/IrDA seems to be the only available GPL source yet.


  o  Q12 - By Rui Oliveira: I am having a problem connecting a PalmIII
     to a Linux box with an Actisys 220L adapter. With a motherboard
     adapter (no brand but, I think, similar to the Actisys 210L) I
     simply redirect a pilot syncronization tool (pilot-xfer) to
     /dev/ttyS1 which has the ir adapter attached and, using IrLink in
     SIR mode, I can get the Linux box to talk with the PalmIII. Trying
     the above through a serial port with a serial-irda Actisys 220L
     adapter I can't get this to work. My question is :What happens if
     one just throws data into a serial port with a irda adapter?

  o  Answer by Lichen Wang: In terms of hardware, IrDA SIR needs a
     serializer- deserializer, an encoder-decoder, and a transceiver.
     The UART that drives the COM port of any PC is a serializer-
     deserializer. In some PC, there is also an encoder-decoder which
     can be enabled or disabled by the BIOS. When it is disabled, the
     COM port is usable as an old COM port. When the encoder-decoder is
     enabled, usually the COM port is no longer usable but an IrDA port
     is now usable instead.

     Actisys IR-210 is a SIR transceiver and thus can be used if the PC
     has this kind of UART with an IrDA encoder-decoder and the BIOS has
     enabled it. Under this hardware configuration, you need to tell the
     Windows setup program that you have "standard infrared devices" and
     with "Built-in Infrared port on laptop or desktop".

     Actisys IR-220, on the other hand, includes both the encoder-
     decoder and the transceiver. It is designed to be used with a
     regular UART. If the UART in the PC has also the encoder-decoder
     built-in, you must use BIOS to disable that. Under either of this
     hardware configuration, you need to tell the Windows setup program
     that you have an "ACTiSYS" manufactured "ACT-IR220L Infrared
     Wireless Interface".

     To answer your question: In addition to throwing data at the serial
     port, you need to tell the UART and the encoder-decoder what data
     rate to use. In the case of a built-in encoder-decoder, when you
     set the data rate of the UART, the encoder-decode also get set
     correctly. In the case a separate encoder-decoder, you need to tell
     both of them the data rate separatly.

  o  Q13 - If I try to make a connection, say telnet, it takes an
     incredibly long time for the login prompt to appear.

  o  Answers by Renaud Baldura, Dag Brattli and Hee Thong: ... it's a
     DNS problem. The resolver times out trying to reverse-resolve the
     IP address of your incoming connection. I think just renaming
     /etc/resolv.conf to something else takes care of it. ... or add
     some static bindings in /etc/hosts for the machines you want to
     access in your ad-hoc network. That should avoid the DNS lookups.
     ... If both machines are in a private test environment, put the
     following line in the /etc/host.conf, order hosts, bind. This will
     make the machine check the /etc/host file before doing a DNS
     lookup. Remember to update the host file on both machines to
     reflect the IP and host names of the 2 machines.

  o  Q14 - Question by David LaPorte: I was wondering if anyone has had
     any success getting the irda port on the Toshiba Tecra 740cdt
     working. ... I've read that it should show up at IRQ 11, ttyS2.
     Well, I have a PCMCIA modem which steals ttyS2 and the PCMCIA
     controller steals IRQ 11. Does anyone have any suggestions?

  o  Answer by Dag Brattli: If you still have Win95 on your machine, you
     should go to the device manager and change the PnP setup for the
     IrDA port (something else than the stuff your're already using).
     You could for example move away ttyS1 (in Win95), so that it uses
     the values that the PCMCIA card is going to steal, and then use the
     settings from ttyS1 for ttyS2.


     ___________________________________________________________________
     dagbnb ~/linux/test/ > cat /etc/sysconfig/pcmcia
     PCMCIA=yes
     PCIC=i82365
     PCIC_OPTS="irq_list=7,9,10"
     CORE_OPTS=
     ___________________________________________________________________


  ... should make sure the PCMCIA controller stays away from irq 11.
  Also make sure that the IrDA port is enabled in Win95 since it's dis-
  abled by default.



  16.  Infrared Remote Control


  16.1.  Resources

  Remote control via infrared is not the aim of the Linux/IrDA project
  but is included in this HOWTO to cover "Linux and Infrared" more
  completely. I found three projects which worked on this topic. You may
  find some links to current information at http://
  www.snafu.de/~wehe/index_li.html <http://
  www.snafu.de/~wehe/index_li.html>.

  o  LInux Remote Control - LIRC

     LIRC is a package that supports receiving and sending IR signals of
     the most common IR remote controls. It contains a device driver for
     hardware connected to the serial port, a daemon that decodes and
     sends IR signals using this device driver, a mouse daemon that
     translates IR signals to mouse movements and a couple of user
     programs that allow to control your computer with a remote control.
     Takahide Higuchi wrote about LIRC: "It's great, and it seems almost
     complete solution, but it seems there is almost nothing supporting
     hardware on the market (or need to solder some special circuit ...
     it is hard work for many people to do so). I believe that LIRC will
     be more popular if consumer IR support is implemented in FastIR
     drivers and some common API (for example, a raw IrSocket and common
     ioctls) is made!". You may find LIRC at http://fsinfo.cs.uni-
     sb.de/~columbus/lirc/ <http://fsinfo.cs.uni-sb.de/~columbus/lirc/>

     To subscribe to the LIRC mailing list send an email to <lirc-
     request@xmission.com> with the word "subscribe" in the body of the
     message. There is also a mailing list archive at http://www.wh9.tu-
     dresden.de/~heinrich/lirc/list-archive/ <http://www.wh9.tu-
     dresden.de/~heinrich/lirc/list-archive/>


  o  Serial Infrared Remote Controller

     This is a simple, cheap device that can be connected to any serial
     port to control most components that have infrared remote controls.
     It was designed and built on a solderless breadboard and is finally
     designed as a PC board. You may find this package at
     http://www.armory.com/~spcecdt/remote/remote.html
     <http://www.armory.com/~spcecdt/remote/remote.html>


  o  Infrared Tools for the COREL Netwinder PC

     Ryan Shillington wrote some tools to control the COREL Netwinder
     via infrared, for example:

     Server Side for the Corel Palm Administrator (deamon). It depends
     on having ir-simple installed and up and running. With this you can
     check and change IP addresses, Gateway addresses, setup eth1, etc.
     You can also run simple commands AND you can check the Temperature,
     Memory, Load averages, etc.

     Client Side for the Corel Palm Administrator. You can also run
     simple commands AND you can check the Temperature, Memory, Load
     averages, etc.

     A very basic Infra Red device driver. This does not support IrDA
     (only unreliable transfers). It looks specifically for Remote
     Control signals (and Keyboard, etc.). It blocks and passes data up
     very differently.

     You may find the tools at http://www.netwinder.org/~ryansh/
     <http://www.netwinder.org/~ryansh/>


  o  ir

     ir <http://kramer.ne.mediaone.net/ir/> is an interface program to
     Chris Dodge's RedRat 2 infrared controller to send and receive
     infrared signals to/from consumer devices like TV's, VCR's, cable
     boxes, and stereos. It is written in Perl. It uses only the basic
     Perl constructs and no external packages, so it should work on any
     platform that supports Perl and serial communications. It can be
     accessed via the command line or cron, as an email handler (through
     aliases), or as a cgi script which will automatically generate a
     form with all possible codes. It has macro capability so one
     command can send a series of IR signals. With an X-10's IR543, it
     can be used to control X10 devices, too.



  16.2.  Infrared Remote Control - IrDA

  Two of the above mentioned projects use some kind of selfmade dongle
  for infrared remote control. There is also a description to build a
  serial IrDA dongle by yourself in the german ELEKTOR 5/97 p. 28
  magazine. Maybe someone can merge these two kind of dongles together.

  For a discussion of the relation between Infrared Remote Control and
  IrDA I quote from the Linux/IrDA mailing list (shortend and modified
  by wh):

  Ryan Shillington wrote: "Remote IR and ASK-IR are very different from
  FIR or MIR or SIR.

  Remote IR and ASK-IR are very low speed and low frequency (but very
  long range) uses for IR. They operate around 2400 baud.

  SIR operates at higher rates, and is meant for long range transmission
  where you need more than a few characters pass through (unlike a
  remote control).

  MIR is a little faster (less range), but with speeds up to 1.15 Mbps,
  and FIR (where the devices have to be practically touching) is 4Mbps.
  The range is inversely proportional to the speed you can send data at.

  I'm working on drivers for Remote-IR, but you should know that your IR
  stuff has to support it. Look for protocols like NEC, RC-5 or RC-0
  (those are the most common ones).

  You can use SIR to receive Remote Control signals. Set your baud rate
  nice and low and data will come through. BUT, from my experience, it's
  not the RIGHT data. It's not being analyzed in the right way, and as
  such, you can't compute the checksums or check it with its complement.

  I have managed to get data in (using SIR) with remote controls. I have
  been told that SIR will read the remote control stuff differently
  depending on temperature (although I have never had that experience).
  "

  Lichen Wang <lwang1@ix.netcom.com> wrote in response: "The so-called
  ASKIR in most laptops etc. is not meant for remote IR devices. ASKIR
  is meant for Sharp Wizard and Zauaus PDAs and some of Sharp's notebook
  PCs. Sharp stated this long before IrDA was established and is still
  supporting it to maintain backward compatibility. Apple's Newton had
  this capability at one time, too.

  Briefly, ASKIR uses 9.6 Kbps (19.2 and 38.4 Kbps are also possible)
  asynchronous data format of 8 data bits, 1 stop bit, and odd parity.
  The start bit as well as all 0 bit in data/parity are transmitted as
  IR square wave at 500 KHz (DASK sub-carrier). The stop bit as well as
  all 1 bit in data/parity are represented by the absence of any IR
  transmission.
  As you can see, this is totally incompatible with existing IR remote
  control.

  [..]

  True. Not only can you use SIR hardware to receive, you can transmit,
  too. Of course, there are some limitations.

  Most IR remote controls use 38 KHz sub-carrier. 3 times 38 is 114,
  very close to 115.2. You can set the UART to operate at 115.2 Kbps, 7
  data bits, no parity, and 1 stop bit - a total of 9 bits. Each 3
  cycles of the 38 KHz sub-carrier can be received or transmitted as a
  byte of 0x5B.

  There are some physical limitations in addition to the fact that the
  sub-carrier must be 38 KHz. The SIR receiver is not as sensitive to 38
  KHz as the IR remote receiver designed for that. The SIR transmitter
  has a much lower duty cycle and thus can not emit a strong sub-carrier
  either.

  IR remote encodes the control signal by turning on and off the sub-
  carrier at certain specific patterns. Now that you can transmit and
  receive the sub-carrier, what remains is all in timing.

  For transmit, you have to know how many consecutive bytes of 0x5B to
  send for each burst of the sub-carrier, and how long to be quiet
  between the bursts.

  For receive, you have to know how many of the 0x5Bs you received are
  consecutive, and how long the gaps were between these groups of
  consecutive bytes.

  [..]

  My experience with the IrDA link distance of SIR, MIR and FIR is
  somewhat different from what Ryan said.

  [..]

  SIR, MIR and FIR should all work from 0 to 100 cm but in practice:

  (a) Some devices may have problems at LONG distances.

  When possible, place the two communicating devices no more than 50 cm
  apart. Low power devices, such as pagers, phones, etc. may have even
  shorter ranges despite the fact that they use SIR instead of MIR or
  FIR.

  (b) Some devices may have problems at SHORT distances.

  Place the two devices at least a few cm apart. Putting the two devices
  too close to each other can cause troubles.

  It is somewhat intuitive that when the link is not reliable we put the
  two devices closer together. But it is counterintuitive that too close
  is not good either. The reason is that the light intensity at 1 cm is
  10.000 times brighter than that at 100 cm. At 0.5 cm, it is 40.000
  times, etc. The IR receiver manufacturers have difficulties to cover
  this huge dynamic range. We all have problems reading under a 10 W
  light bulb, but imagine how it feels under a 100.000 W light!

  [..]

  The IrDA Physical Layer is totally incompatible with the DASK
  modulation used in IR remote controls. Thus it is not possible to use
  the same controller function for both FIR and remote control. However,
  practically all FIR controller chips do include some additional
  functions to support remote control. National, SMC, and Winbond (just
  to name a few) all have such I/O chips.

  The IR transmitter for FIR and remote control are very similar. I have
  tried a standard FIR transmitter. It can reach 10 meters for remote
  control purpose. Thus it performs just as good as transmitters
  designed for remote control.

  The IR receiver for FIR and remote control are somewhat different. A
  FIR receiver can receive remote control signals but can reach only 1
  meter whereas receivers designed for remote control typically can
  reach 10 meters.

  I have an ISA bus adapter with a National I/O chip that supports both
  FIR and remote control. I also have IR Dongles that include both FIR
  and remote control receivers. (Plus a transmitter for both modes.) I
  cannot find any software to support remote control functions. I did my
  own experiments in DOS (I cannot run Linux yet.) Anybody interest in
  this? "

  Benny Amorsen wrote: "I have a laptop that is supposed to support
  ASKIR. The mode of the infrared port can be switched to ASKIR in the
  BIOS. Having to reboot to switch the mode in the BIOS makes it
  useless, though, so someone would have to find a way to switch on the
  fly. "

  Dag Brattli wrote: It should be possible to use IrControl (formerly
  IrBus) for IrDA compliant remote controls. I currently don't know
  about any remote controls using IrControl standard, but there should
  be some out there (anyone else who knows better?). You should go to
  the IrDA site (http://www.irda.org) and get the physical layer
  standard (which includes IrControl I think).

  "Normal" IrDA (using IrLAP) is _not_ well suited for remote control
  because of the connection oriented nature (and just supports 9600bps
  for connectionless use). The reason for the limited range is eye-
  safety they say (but I currently don't know why CIR works better using
  the same power). I have however seen laptops connect at 4-5 meters
  (but I don't think that any high speed communication would be
  possible).

  Most IrDA chipsets are capable of CIR operation, and it is quite easy
  to modify the drivers so they talk CIR. Takahide Higuchi has started
  to look at IrSockets and it would be great if we could open a "raw"
  Ir(DA) socket which then could send and receive CIR packets. Then all
  the CIR applications could live in userspace.

  I know that Corel is interested in using CIR for controlling the
  NetWinder (and they actually have running code). Take a look at
  http://www.slashdot.org/articles/98/12/05/0916216.shtml
  <http://www.slashdot.org/articles/98/12/05/0916216.shtml> or
  http://www.netwinder.org/~ryansh <http://www.netwinder.org/~ryansh>

  From the "IrDA Data Link Design Guide" p. 21 by Hewlett-Packard
  http://www.hp.com/go/ir <http://www.hp.com/go/ir> : " It is possible
  to transmit and receive signals other than IrDA signals with Hewlett-
  Packard IR transceivers. For implementation details, please refer to
  the Application Note, Transceiver Performance with ASK and TV Remote
  Signals."

  From the IR-MAN page http://www.usuarios.com/ib308564/irda.html
  <http://www.usuarios.com/ib308564/irda.html> :

  Fortunately, many IrDA devices are compatible with the 38-kbps ASK
  modulation used in TV remotes. This means that they can work with such
  kind of infrared type signals. ... However, it seems that there are
  still many portable computers that can't receive TV infrared stuff.

  For desktop computers, there exist two options, depending on the
  motherboard you have. Usually a Pentium MoBo has an I/O chipset ready
  for infrared communication. There is a special connector where you can
  connect the transducer. The other option is buying a serial type
  transceiver that connects to the standard serial port (RS-232) of the
  computer. ... PC Remote Control has been tested with success using
  both type of IrDA devices:

  1) IRmate IR-210 Serial Port Infrared Adapter. ... The serial port
  speed at wich the device sends recognizable data values is 2400 bps. I
  don't know if this speed will be the same for all the adapters of this
  type or is an unique characteristic of this model.

  Look at the examples of data values received to see how similar are
  them. There are some infrared commands that change a lot every time,
  difficulting the recognition. In such cases, a great tolerance in the
  comparison could be used, but the risk of confusion between different
  commands will be increased. An apropiate tolerance value for almost
  all cases is 20.

  2) Actisys IR2000L connected to an Asus P2B motherboard. ... There are
  several serial port speeds that work well, although 4800 bps seems to
  be the best one. Other adapters of this same type work also well using
  this speed. Take a look at the samples of data sequences received
  using this device. Some remote buttons send exactly the same sequence
  and it's impossible to distinguish between them at all.

  3) Asus IR-eye connected to the same MoBo as above. It works as well
  as the Actisys device.

  TV remotes send commands only one way, in a low-speed burst for
  distances of up to 30 feet. They use directed IR with LEDs that have a
  moderate cone angle to improve ease-of-use characteristics. Cordless
  connectivity via IrDA transfers files, point-to-point and
  bidirectionally, in a high-speed burst for short distances using
  directed IR with LEDs having a narrow cone angle. IrDA transmissions
  require relatively careful aiming, and they're easy to block. For this
  reason, don't expect a great distance while working with the remote
  unit.

  Alessio Massaro <Alessio.Massaro@cern.ch>: wrote: " IrDA doesn't talk
  to tv-remotes, but it does have the IrCOMM layer to emulate a serial
  i/f. My guess is that to get LIRC working with it, you should just
  need ... to read from the IrCOMM virtual serial device (as you would
  with a /dev/cua or whatever) and use a remote that can be seen by your
  dongle+IrDAheader pair."

  Answer by Dag Brattli: "You are talking about being normal serial
  ports, but that is something at least I have choosen IrDA not to be. I
  have implemented all the device drivers as network device drivers, so
  things are a bit different (more frame oriented). The device drivers
  deliver IrDA frames and currently nothing else.

  But I don't think that we must have a tty interface to the IrDA device
  drivers in order to support more RAW reads and writes. And btw. forget
  about IrCOMM, it has nothing to do with this issue.

  I have actually already implemented support for raw reads and writes
  for the device drivers, since some of the dongles require this."



  17.  Infrared and Eye Safety

  This section summarizes some ideas and thoughts that were exchanged on
  the Linux/IrDA mailing list. It is not medically wellfounded, and
  whoever has better evidence or some more wellfounded source of
  information is encouraged to contribute it to this HOWTO.

  The IrDA spec says that the range of IrDA devices has been limited to
  1m for reasons of eye safety. Another plausible assumption is that
  power consumption and IR pollution/crosstalk were reasons for this
  limitation. In principle there could be danger for the eye, because
  infrared light is not registered by the eye, and thus the pupil won't
  close in order to protect the retina from bright IR light sources.
  This is the same situation as with UV light, which will cause snow
  blindness eventually, but in contrast to UV light, IR light contains
  much less harmful energy due to its longer wavelength.

  The only legal restrictions and medical advices we were able to find
  on the web were concerned with infrared emissions of heat lamps or in
  the welding process and IEC 825-1 (CENELEC EN60825-1). This suggests
  that IR light as emitted by IrDA devices will be harmless, since even
  the peak power emitted by strong IR LEDs (ca. 300mW) is several orders
  of magnitude below the power emitted by medical IR heat lamps (up to
  500W). For these, however, you are supposed to wear protective
  goggles, so maybe if you are looking straight into 1.000 infrared LEDs
  flashing at once, you should do so, too. The effect of infrared light
  is mostly heat, though, and not an alteration or destruction of the
  biological cell structure, such as caused by UV light. Though in the
  specs for the HP OmniBook 800 Hewlett-Packard recommends not to look
  directly into the IR LED.

  As stated above, this discussion is only based on guesswork and common
  sense assumptions about the data found in IR LED and heat lamp specs.
  If anybody with a better medical knowledge can comment on this, please
  do so!!!


  18.  Credits

  Thanks to:

  o  Dag Brattli - Linux/IrDA core team

  o  Thomas Davis - Linux/IrDA core team

  o  Takahide Higuchi - Linux/IrDA core team

  o  Ralf Zabka

  o  Benny Amorsen

  o  Lichen Wang

  o  Ryan Shillington

  o  Richard Titmuss

  o  Fons Botman

  o  Rui Oliveira

  o  Jon Howell

  o  Carlos Vidal


  o  Joonas Lehtinen

  o  Markus Schill

  o  Bjoern Hansson

  o  Pawel Machek

  o  Ho Chin Keong

  o  Bjoern Mork

  o  Andreas Butz

  o  Tang Ning

  o  Philip Blundell

  o  Toni van de Wiel

  o  Stefan Dahlke

  o  Ales Dryak

  o  Richard Donkin

  o  Wessel de Roode

  o  Andrew Chadwick

  o  James McKenzie

  o  Gerd Knorr

  o  Claudiu Costin

  o  K-H. Eischer

  o  Alessio Massaro

  o  Igor Pesando

  o  Mathieu Arnold

  o  Harald Milz

  o  The members of the Linux-IrDA mailing list.

  o  The writers of the other HOWTOs which gave me many inspirations.

  o  The developers of the SGML-Tools which provided some means to write
     a HOWTO.

     Sorry I didn't start to follow the credits when starting the HOWTO,
     so probably I forgot somebody.


  19.  Revision History


  o  v0.1 to v0.4a, 19 March 1998 to 4 August 1998, drafts, not included
     in the LDP

  o  v1.0, 14 August 1998, release to the LDP


  o  v1.1, 18 August 1998, added info about IrCOMM patch by Takahide
     Higuchi, minor changes

  o  v1.2, 24 August 1998, updated to linux-irda-1998-08-20 snapshot,
     added FIR section and revision history, minor changes

  o  v1.3, 27 September 1998, added sections about multiple instances,
     cellular phones, digital cameras,Linux to Linux connection, the
     cutting edge - CVS, power saving; some changes in general
     configuration section, changes in hardware survey section, minor
     changes

  o  v1.4, 11 October 1998, better description of IrCOMM support,
     changes in dongle connection section, changes in Palm III section,
     minor changes

  o  v1.5, 12 October 1998, minor changes

  o  v1.6, 26 October 1998, section about IrManager added, updated to
     the linux-irda-1998-10-21 snapshot, changed dongle connection
     section, minor changes

  o  v1.7, 1 November 1998, added remote control section, changed dongle
     connection section, minor changes

  o  v2.0, 9 January 1999, nearly complete rewrite and rearrangement
     according to the new structure of Linux/IR which is included into
     the kernel since 2.1.131, added info about BIOS support into dongle
     connection section, configuration tool section and CVS section
     removed

  o  v2.1, 13 January 1999, minor changes

  o  v2.2, 26 January 1999, project name changed from Linux/IR to
     Linux/IrDA, extended the Troubleshooting chapter, changed the order
     of the Known Bugs chapter after the Troubleshooting chapter,
     removed some lint

  o  v2.3, 4 February 1999, added chapter about Eye Safety written by
     Andreas Butz; spell checking, reworking of Kernel Parameters
     chapter and additional information by Andreas Butz; minor changes

  o  v2.4, 9 February 1999, changed information about applying a patch
     file

  o  v2.5, 12 March 1999; new URL for Linux/IrDA; added chapters about
     Big Endian support, irdaping, irdadump and Beyond IrDA - Extending
     Transmission Distance; chapter Obtaining Information about the
     Infrared Port in Laptops improved; added many information provided
     by Fons Botman to Windows chapter; added SMP chapter; informations
     about Ericsson SH888 added; removed obsolete FAQs; minor changes

  o  v2.6, 6 April 1999, added chapters Connection to Docking Station,
     Connection to Keyboard and Connection via Serial Cable, minor
     changes

  o  v2.7, 11 June 1999 started chapter Upcoming Standards (Bluetooth
     and IrDA), added annotations about CORBA to GUI chapter, minor
     information about Nokia cellular phones added, added Appendix B
     Serial Infrared Port Sniffer, started IrDA Network Neighborhood
     section, started Connection to Psion 5 chapter and Appendix C,
     minor additions to LiRC chapter, minor changes

  o  v2.8, 20 September 1999, added LiRC mailing list, changed <htmlurl
     ... > tag to <url ...>, changed format of conf.modules entries,
     addition to hardware detection (PCMCIA), added IrDA mailing list,
     changed address of Linux-IrDA mailing list, minor additions to
     multiple instances section, added URL of French translation, added
     new sersniff to Appendix B, added section about precompiled
     packages, added Palm III Connection to Thinkpad 600 chapter, minor
     changes



  20.  Copyright and Disclaimer

  Copyright (C) 1998, 1999 by Werner Heuser. This document may be
  distributed under the terms set forth in the LDP license at LDP
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.

  The information in this document is correct to the best of my
  knowledge, but there's a always a chance I've made some mistakes, so
  don't follow everything too blindly, especially if it seems wrong.
  Nothing here should have a detrimental effect on your computer, but
  just in case I take no responsibility for any damages incurred from
  the use of the information contained herein.


  21.  Appendix A - Configuration Script

  Configuration script by Ove Ewerlid (please change to new major device
  numbers, wh):



  ______________________________________________________________________
  #!/bin/sh

  # You may have problems if kerneld is running!

  killall irattach
  killall irmanager

  sleep 1

  rm -f /dev/ircomm
  mknod /dev/ircomm c 60 64

  rmmod ircomm_tty
  rmmod ircomm
  rmmod irtty
  rmmod irda

  insmod irda
  insmod irtty
  insmod ircomm
  insmod ircomm_tty

  irmanager    # executes 'irattach /dev/ttyS1' based on /etc/irda/drivers


  # Now start your favorite PPP software on /dev/ircomm

  # The 'no activity on link' happens if you move the phone out of IR sight, this is no problem once the phone is back in sight!

  # Mar 10 12:31:41 octagon kernel: Linux-2.2 Support for the IrDA (tm) Protocols (Dag Brattli)
  # Mar 10 12:31:41 octagon kernel: IrCOMM_common, $Revision: 1.13 $ $Date: 1998/10/13 12:59:05 $ (Takahide Higuchi)
  # Mar 10 12:31:41 octagon kernel: IrVTD, $Revision: 1.2 $ $Date: 1998/09/27 08:37:04 $ (Takahide Higuchi)
  # Mar 10 12:31:41 octagon irmanager: executing: './drivers start  0'
  # Mar 10 12:31:41 octagon irmanager: + 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
  # Mar 10 12:31:41 octagon irattach: Serial connection established.
  # Mar 10 12:31:41 octagon kernel: IrDA device irda0 registered.
  # Mar 10 12:31:41 octagon irmanager: + 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
  # ...
  # Mar 11 13:13:43 octagon kernel: IrLAP, no activity on link!
  ______________________________________________________________________



  22.  Appendix B - Serial Infrared Port Sniffers


  22.1.  Sniffer by Gerd Knorr

  This programm is a courtesy by Gerd Knorr. You may use it to sniff the
  traffic which is going trough your IrDA port for details of the
  protocol (change the default ttyS1 in the source if necessary):



  ______________________________________________________________________
  #include <stdio.h>
  #include <stdlib.h>
  #include <unistd.h>
  #include <string.h>
  #include <fcntl.h>
  #include <termios.h>
  #include <ctype.h>
  #include <sys/types.h>
  #include <sys/time.h>
  #include <sys/ioctl.h>

  #define BUFSIZE 1024

  int
  read_and_print(int fd, int sec, int usec)
  {
      int             rc,l,i;
      char            buf[BUFSIZE+1];
      fd_set          set;
      struct timeval  tv;

      if (sec || usec) {
          FD_ZERO(&set);
          FD_SET(fd,&set);
          tv.tv_sec  = sec;

          tv.tv_usec = usec;
          if (0 == select(fd+1,&set,NULL,NULL,&tv))
              return -1;
      }

      switch (rc = read(fd,buf,BUFSIZE)) {
      case 0:
          printf("EOF");
          exit(0);
          break;
      case -1:
          perror("read");
          exit(1);
      default:
          for (l = 0; l < rc; l+= 16) {
              printf("%04x  ",l);
              for (i = l; i < l+16; i++) {
                  if (i < rc)
                      printf("%02x ",buf[i]);
                  else
                      printf("-- ");
                  if ((i%4) == 3)
                      printf(" ");
              }
              for (i = l; i < l+16; i++) {

                  if (i < rc)
                      printf("%c",isalnum(buf[i]) ? buf[i] : '.');
              }
              printf("\n");
          }
          break;
      }
      return rc;
  }

  void
  setlines(int fd, int rts, int dtr)
  {
      int lines = 0;

      if (rts) lines |= TIOCM_RTS;
      if (dtr) lines |= TIOCM_DTR;

      ioctl(fd,TIOCMSET,&lines);
  }

  int main(int argc, char *argv[])
  {
      int                 ser,i;
      struct termios      saved_attributes,tattr;
      struct winsize      win;
      char                buf[16];

      if (-1 == (ser = open("/dev/ttyS1",O_RDWR))) {
          perror("open /dev/ttyS1");
          exit(1);
      }

      /* Set the terminal mode */
      tcgetattr (ser, &tattr);
      cfmakeraw (&tattr);
      cfsetospeed (&tattr,B9600);
      cfsetispeed (&tattr,B9600);
      tcsetattr (ser, 0, &tattr);

      setlines(ser,0,0);
  #if 0
      tcsendbreak(ser,0);
  #endif

      /* main loop */
      fprintf(stderr,"setup done\n");
      while (-1 != read_and_print(ser,30,0)) {
          usleep(100000);
      }

      return 0;
  }
  ______________________________________________________________________



  22.2.  sersniff

  Written by Jonathan McDowell sersniff
  <http://www.earth.li/projectpurple/progs/sersniff.html> is a simple
  program to tunnel/sniff between 2 serial ports. The program was
  written to aid with the decoding of the protocol used by the Nokia
  9000i Communicator to talk to the NServer software Nokia provides,
  which only runs under Windows.


  23.  Appendix C - User space application for Psion 5 Palmtop Comput-
  ers: psion.c



  ______________________________________________________________________
  /*********************************************************************
   *
   * Filename:      psion5.c
   * Version:       0.1
   * Description:   User space application for Psion 5 Palmtop Computers
   * Status:        Experimental.
   * Author:        Fons Botman <budely@tref.nl>
   * Created at:    Mon Apr 19 21:51:29 CEST 1999
   *
   *     Copyright (c) 1999, Fons Botman, All Rights Reserved.
   *
   *     This program is free software; you can redistribute it and/or
   *     modify it under the terms of the GNU General Public License as
   *     published by the Free Software Foundation; either version 2 of
   *     the License, or (at your option) any later version.
   *
   *     Neither Fons Botman nor anyone else admit liability nor
   *     provide warranty for any of this software. This material is
   *     provided "AS-IS" and at no charge.
   *
   ********************************************************************/

  #include <unistd.h>
  #include <stdlib.h>
  #include <string.h>
  #include <fcntl.h>
  #include <stdio.h>
  #include <errno.h>
  #include <assert.h>
  #include <signal.h>
  #include <time.h>
  #include <sys/types.h>
  #include <utime.h>

  #include <sys/stat.h>
  #include <sys/ioctl.h>
  #include <netinet/in.h>

  #include <sys/socket.h>
  #include <linux/types.h>
  #include <linux/irda.h>

  #ifndef AF_IRDA
  #define AF_IRDA 23
  #endif /* AF_IRDA */



  #define MAX_DEVICES 10

  int discover_devices(int fd)
  {
          struct irda_device_list *list;
          unsigned char *buf;
          int len;
          int i;
          int daddr = 0;

          len = sizeof(struct irda_device_list) +
                  sizeof(struct irda_device_info) * MAX_DEVICES;

          /* FIXME */
          system("echo 150 > /proc/sys/net/irda/slot_timeout");

          if (!(buf = malloc(len))) {
                  fprintf(stderr, "Could not allocate discovery buffer.\n");
                  exit(1);
          }
          list = (struct irda_device_list *) buf;

          /* FIXME: discovery does not return when there are no devices */
          if (getsockopt(fd, SOL_IRLMP, IRLMP_ENUMDEVICES, buf, &len)) {
                  perror("getsockopt");
                  exit(-1);
          }

          if (len > 0) {
                  printf("Discovered:\n");

                  for (i=0;i<list->len;i++) {
                          printf("  daddr: %08x", list->dev[i].daddr);
                          printf("  saddr: %08x", list->dev[i].saddr);
                          printf("  name:  %s\n", list->dev[i].info);
                          daddr = list->dev[i].daddr;
                  }
          } else {
                  printf("No devices discovered.\n");
          }

          return daddr;
  }


  int irttp_get_mtu(int fd) {
          int mtu;
          int len = sizeof(int);
          /* Check what the IrTTP data size is */
          if (getsockopt(fd, SOL_IRLMP, IRTTP_MAX_SDU_SIZE,
                         (void *)&mtu, &len)) {
                  return -1;
          }
          return mtu;
  }


  int sendfile(char* filename) {
          int fd;
          struct sockaddr_irda peer;
          int daddr;
          FILE* f;
          int buflen;
          char *buf;
          int rc;
          struct stat s;
          int cnt;
          int t0, tx, t;
          unsigned long long int fdatell;

          fd = socket(AF_IRDA, SOCK_STREAM, 0);
          if (fd < 0) {
                  perror("socket");
                  if (errno == EINVAL)
                          fprintf(stderr, "Is IrDA active?, perhaps run irmanager\n");
                  exit(-1);
          }

          /* FIXME: We should use a better/any device selection mechanism */
          daddr = discover_devices(fd);
          if (!daddr) {
                  fprintf(stderr,"No IRDA device found\n");
                  exit(1);
          }

          peer.sir_family = AF_IRDA;
          peer.sir_addr = daddr;
          strcpy(peer.sir_name, "Epoc32:EikonIr:v1.0");

          if (connect(fd, (struct sockaddr *) &peer,
                      sizeof(struct sockaddr_irda))) {
                  perror("connect");
                  if (errno == ENETUNREACH)
                          /* P5: System ^L IrDA is active,
                             but IR-receive not selected */
                          fprintf(stderr,
                                  "No Psion5 or IR-receive is not selected\n");
                  exit(-1);
          }
          printf("Connected to %x\n", daddr);

          buflen = irttp_get_mtu(fd);
          printf("mtu = %d\n", buflen);
          if (buflen < 2) {
                  perror("irttp_get_mtu");
                  exit(1);
          }
          if (!(buf = malloc(buflen))) {
                  perror("malloc");
                  exit(1);
          }
          /*
             FIXME : I got strange results when the buffer size was less than
             the mtu (e.g. 200), the psion did not seem to see the frames were
             not full length, and stopped after the number of frames based on
             the full mtu size.
             investigate.
          */

          /*
             FIXME : psion connects to port 2, but does not get error back
             from us. Linux bug?
          */

          if (!(f = fopen(filename,"rb"))) {
                  perror(filename);
                  exit(1);
          }

          rc = stat(filename,&s);
          if (rc != 0) {
                  perror("stat");
                  exit(1);
          }

          /* FIXME map psion mode bits to unix filemodes */

          fdatell = 62168263200000000ULL + 1000000 *
                  ( s.st_mtime & 0x00000000FFFFFFFFULL);
          printf("date: %Ld\n", (unsigned long long) s.st_mtime);
          printf("date: %Ld\n", fdatell);
          sprintf(buf,"FILE %d %d %lu %lu %s",
                  (int) s.st_size,
                  32 | (s.st_mode & S_IWUSR ? 0 : 1),
                  (unsigned long) ((unsigned long long int) fdatell >> 32),
                  (unsigned long) (fdatell & 0x00000000FFFFFFFFULL),
                  filename);
          rc = write(fd,buf,strlen(buf));
          if (rc != strlen(buf)) {
                  perror("write");
                  fprintf(stderr,"rc = %d, strlen=%d\n",
                          rc, strlen(buf));
                  exit(1);
          }
          printf("sent: %s\n", buf);
          rc = read(fd,buf,buflen-1);
          printf("Received (%d) ", rc);
          if (rc < 0) {
                  perror("reply error");
                  exit(1);
          }
          if (rc == 0) {
                  fprintf(stderr, "EOF on reply?\n");
                  exit(1);
          }
          if (rc < buflen) {
                  buf[rc] = 0;
          }
          /* should be "ACK Y" */
          if (0 != strcmp(buf,"ACK Y")) {
                  fprintf(stderr, "Unexpected response: %s\n", buf);
                  exit(1);
          }
          printf("%s\n", buf);

          cnt = 0;
          t0 = tx = t = time(NULL);

          while (!ferror(f) && !feof(f)) {
                  int wrc;

                  rc = fread(buf, 1, buflen, f);
                  if (rc == 0) continue;

                  wrc = write(fd,buf,rc);
                  if (wrc < 0) {
                          perror("write");
                          exit(1);
                  }
                  if (wrc < rc) {
                          fprintf(stderr, "Problem: only sent %d of %d\n",
                                  wrc, rc);
                          exit(1);
                  }

                  /* progress indication */
                  t = time(NULL);
                  cnt += rc;
                  if (t - t0 == 0 || cnt == 0 || tx == t)
                          /* avoid division errors */
                          /* only once per second */
                          continue;
                  tx = t;
                  printf("sent %d/%lu bytes=%4g%% in %d sec,"
                         " %g Kbytes/s, to go %li sec  \r",
                         cnt, s.st_size, 100.0 * cnt / s.st_size, t - t0,
                         cnt / 1000.0 / (t - t0),
                         ( s.st_size - cnt ) * (t - t0) / cnt);
                  fflush(stdout);
          }
          if (ferror(f)) {
                  perror("ferror");
                  exit(1);
          }
          if (cnt != s.st_size) {
                  printf("Warning: "
                         "file size changed: initial: %lu, actual: %d\n",
                         s.st_size, cnt);
          }
          if (t == t0) t++;       /* white lie for fast transfers */
          printf("\r%79s\r","");        /* Cleanup the progress line */
          printf("Sent %s, %d bytes in %d sec. %g KBytes/sec\n",
                 filename, cnt, t - t0, cnt / 1000.0 / (t - t0));

          /* Check for close on the other side */
          rc = read(fd,buf,buflen);
          if (rc > 0) {
                  fprintf(stderr, "Strange: the other side responded.\n");
                  fprintf(stderr, "rc=%d, data:%s\n", rc, buf);
                  exit(1);
          }
          if (rc == 0) {
                  fprintf(stderr, "Received end of file.\n");
          }
          if (rc == -1) {
                  if (errno == EPERM) {
                          /* Strange error code to get in this case */
                          printf("Other side closed connection, OK\n");
                  } else {
                          perror("last read");
                          exit(1);
                  }
          }

          close(fd);
          return 0;
  }

  int handle_client(int cfd) {
          int buflen;
          char* buf;
          int rc;

          /* fields of file transfer header */
          unsigned int fsize;
          unsigned int fmode;
          unsigned int fdate1;
          unsigned int fdate2;
          char* fname;

          unsigned int fdate;
          unsigned long long int fdatell;

          FILE* f;
          int cnt;

          int t0, tx, t;

          buflen = irttp_get_mtu(cfd);
          printf("mtu=%d\n", buflen);
          if (buflen < 2) {
                  perror("irttp_get_mtu");
                  exit(1);
          }
          if (!(buf = malloc(buflen))) {
                  fprintf(stderr, "malloc buf failed\n");
                  exit(1);
          }

          /* Wait for the other side to send a header */
          /*
             Sample headers received:
             DATA 185
             FILE 55175 32 14689800 2691219200 Data
                  size mode datehi  datelo     name
          */

          rc = read(cfd, buf, buflen);
          if (rc < 0) {
                  perror("1st read");
                  exit(1);
          }
          if (rc == 0) {
                  perror("1st read 0");
                  exit(1);
          }
          assert(rc < buflen);
          buf[rc] = 0;
          printf("%s\n", buf);

          fsize = 0;
          fdate = 0;
          if (0 == strncmp(buf, "FILE ", 5)) {
                  cnt = 0; /* to be safe */
                  rc = sscanf(buf, "FILE %u %u %u %u %n",
                              &fsize, &fmode, &fdate1, &fdate2,
                              &cnt);
                  if (!(rc == 4 || rc == 5)) {
                                  /* grumble */
                          fprintf(stderr, "sscanf rc=%d\n", rc);
                          exit(1);
                  }
                  assert(cnt < buflen);
                  fname = strdup(buf+cnt);
                  fdatell = ((unsigned long long int) fdate1 << 32) + fdate2;
                  fdate = ( fdatell - 62168263200000000ULL) / 1000000 ;

                  printf("filename: %s\n", fname);
                  printf("filesize: %d\n", fsize);
                  printf("Filemode: %d", fmode);
                  printf("%s", (fmode &  1 ? ", Readonly" : ""));
                  printf("%s", (fmode &  2 ? ", Hidden" : ""));
                  printf("%s", (fmode & 32 ? ", Modified" : ""));
                  printf("%s", (fmode & ~35 ? ", Unknown" : ""));
                  printf("\n");
                  printf("fdate1:   %u = 0x%x\n", fdate1, fdate1);
                  printf("fdate2:   %u = 0x%x\n", fdate2, fdate2);
                  printf("filedate: %Ld\n", fdatell);
                  printf("filedate: %d = %s", fdate,
                         asctime(gmtime((time_t*)&fdate)));

                  if (!(f = fopen(fname,"wb"))) {
                          perror(fname);
                          exit(1);
                  }
          } else if (0 == strncmp(buf, "DATA ", 5)) {
                  cnt = 0; /* to be safe */
                  rc = sscanf(buf, "DATA %d", &fsize);
                  if (rc != 1) {
                          fprintf(stderr, "sscanf rc=%d\n", rc);
                          exit(1);
                  }
                  assert(cnt < buflen);
                  fname = strdup("/tmp/psion5-data");
                  if (!(f = fopen(fname,"wb"))) {
                          perror(fname);
                          exit(1);
                  }
          } else {
                  fprintf(stderr, "Unknown data type: %s\n", buf);
                                  /* exit(1); */
          }

          rc = write(cfd,"ACK Y",5);
          if (rc != 5) {
                  perror("1st write");
                  fprintf(stderr,"1st write rc = %d\n", rc);
                  exit(1);
          }

          cnt = 0;
          t0 = tx = t = time(NULL);
          while (cnt < fsize) {
                  int wrc;
                  rc = read(cfd,buf,buflen);
                  if (rc < 0) {
                          perror("data read");
                                  /* EPERM on disconnect ? */
                          exit(1);
                  }
                  if (rc == 0) {
                          perror("data read 0");
                          exit(1);
                  }
                  wrc = fwrite(buf,rc,1,f);
                  if (wrc != 1) {
                          perror("fwrite");
                          exit(1);
                  }
                  cnt += rc;

                  /* progress indication */
                  t = time(NULL);
                  if (t - t0 == 0 || cnt == 0 || tx == t)
                          /* avoid division errors */
                          /* only once per second */
                          continue;
                  tx = t;
                  printf("got %d/%u bytes=%g%% in %d sec,"
                         " %g Kbytes/s, to go %i sec  \r",
                         cnt, fsize, 100.0 * cnt / fsize, t - t0,
                         cnt / 1000.0 / (t - t0),
                         ( fsize - cnt ) * (t - t0) / cnt);
                  fflush(stdout);
          }

          if (cnt != fsize) {
                  printf("Warning: "
                         "file size changed: initial: %u, actual: %d\n",
                         fsize, cnt);
          }
          if (t == t0) t++;       /* white lie for fast transfers */
          printf("\r%79s\r","");        /* Cleanup the progress line */
          printf("Received %s, %d bytes in %d sec. %g KBytes/sec\n",
                 fname, cnt, t - t0, cnt / 1000.0 / (t - t0));

          rc = fclose(f);
          if (rc != 0) {
                  perror("fclose");
                  exit(1);
          }
          if (fdate) {
                  struct utimbuf utb;
                  utb.actime = fdate;
                  utb.modtime = fdate;
                  rc = utime(fname,&utb);
                  if (rc != 0) {
                          perror(fname);
                  }
          }
          free(fname);
          close(cfd);
          return 0;
  }

  int receivefile(int mode)
  {
          /*
             The Psion 5 tries the following connections:
             Epoc32:EikonIr:v1.0  IrDA:TinyTP:LsapSel
             IrDA:IrCOMM          Parameters
             IrLPT                IrDA:IrLMP:LsapSel
             connect on 2

             Warning: discovery reply after 101ms
          */

          int addrlen = sizeof(struct sockaddr_irda);
          /* int oflags; */
          /* int mtu; */
          int fd;
          struct sockaddr_irda peer;
          int cfd;

          /* Create socket */
          fd = socket(AF_IRDA, SOCK_STREAM, 0);
          if (fd < 0) {
                  perror("socket");
                  exit(-1);
          }

          /* Bind local service */
          peer.sir_family = AF_IRDA;
          strcpy(peer.sir_name, "Epoc32:EikonIr:v1.0");
          peer.sir_lsap_sel = LSAP_ANY;

          if (bind(fd, (struct sockaddr*)&peer, sizeof(struct sockaddr_irda))) {
                          perror("bind");
                          return -1;
          }

          if (listen(fd, 2)) {
                  perror("listen");
                  return -1;
          }

          /* FIXME: allow more simultaneous clients */
          for (;;) {
                  cfd = accept(fd, (struct sockaddr *) &peer, &addrlen);
                  if (cfd < 0) {
                          perror("accept");
                          return -1;
                  }

                  if (handle_client(cfd))
                          break;

                  if (mode == 1)
                          break;
          }

          sleep(1);
          close(fd);
          return 0;
  }


  int
  main(int argc, char* argv[]) {
          char* argv0 = argv[0];

          if (argc <= 1) {
                  fprintf(stderr, "Usage: %s [-s file] [-r] [-d]\n", argv0);
                  fprintf(stderr, "\t-s file\tSend file to the Psion\n");
                  fprintf(stderr, "\t-r\tReceive a file from the Psion\n");
                  fprintf(stderr, "\t-b\tReceive multiple files (batch mode)\n");
                  exit(1);
          }

          /* skip program name */
          argv++; argc--;

          for ( ; argc>0 && argv[0] ; argc-- , argv++) {
                  if (0 == strcmp(argv[0],"-s")) {
                          /* FIXME: sending multiple files does not
                             work yet. We need to wait for the user
                             to select receive again on the psion */
                          if (argv[1] && 0 == strcmp(argv[1],"--")) {
                                  /* Allow the user to send ANY filename */
                                  argv++; argv++;
                                  for ( ; argv[1] ; argv++ , argc--) {
                                          sendfile(argv[1]);
                                  }
                          } else {
                                  /* Send files upto next switch */
                                  while (argv[1] && *argv[1] != '-') {
                                          sendfile(argv[1]);
                                          argv++; argc--;
                                  }
                          }
                  } else if (argv[0] && 0 == strcmp(argv[0],"-r")) {
                          receivefile(1);
                  } else if (argv[0] && 0 == strcmp(argv[0],"-b"))
                          receivefile(0);
                  else {
                          fprintf(stderr,"Error: unknown switch %s\n", argv[0]);
                          fprintf(stderr,"Call without args for usage: %s\n",
                                  argv0);
                          exit(1);
                  }
          }
          return 0;
  }
  ______________________________________________________________________



  ISP-Hookup-HOWTO
  Egil Kvaleberg, egil@kvaleberg.no
  v1.26, 5 March 1998

  This document describes how to use Linux to connect to an Internet
  Service Provider via a dial-up modem TCP/IP connection.  As well as
  the basic dial-up procedure and IP establishment, email and news han-
  dling is covered.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright
     1.2 Disclaimer
     1.3 Translations
     1.4 New versions of this document
     1.5 Feedback

  2. How do I connect to the rest of the world?

     2.1 The basic configuration

  3. How do I

  4. How do I send and receive

  5. News

     5.1 How do I set up an online news-reader?
     5.2 How do I set up an offline news-reader?
     5.3 How do I set up C News?
     5.4 How do I set up Leafnode?

  6. How do I automate the connection procedure?

  7. Final words

     7.1 Other things I should know about?

  8. ISP specific information

     8.1 How do I learn more?
     8.2 Thanks to


  ______________________________________________________________________



  1.  Introduction

  This description has been made to answer a few questions about how
  dial-up ISP (Internet Service Provider) subscribers may configure and
  use Linux.

  To aid those who will connect their Linux based machines to an ISP for
  the first time, an attempt has been made to cover most issues
  encountered.  This quite unavoidably will create a certain degree of
  overlap with other Linux Howto-documents and LDP books.  Reference
  should be made to these documents to provide better understanding and
  detail.


  Much of the existing documentation is targeted towards users with a
  certain degree of experience, and first time users will often have
  trouble sorting out the relevant information.

  To simplify, the examples given will assume the following:



  o  User name: dirk

  o  Password: PrettySecret

  o  Internet service provider: acme.xz

  o  Email server: mail.acme.xz

  o  News server: news.acme.xz

  o  Name server: 193.212.1.0

  o  Phone number: 12345678

  Our dirk will be calling his machine roderick.

  All references in the table above should naturally be replaced by
  whatever is valid for the ISP one is using.  Often, just a minimum of
  changes will otherwise be required for users with different ISPs.  I
  would like to be informed about what problems you encounter on this
  account.


  1.1.  Copyright

  Copyright (c) 1996,1997,1998 by Egil Kvaleberg. This document may be
  distributed under the terms set forth in the LDP license at

  http://sunsite.unc.edu/LDP/COPYRIGHT.html


  1.2.  Disclaimer

   No liability for the contents of this documents can be accepted.  Use
  the concepts, examples and other content at your own risk.

  One of many possible setups will be described. In the Linux world,
  there is usually a number of ways in which to accomplish things.
  Paragraphs containing hints to alternatives are marked by ALT: Please
  also note that FTP-references often will change slightly as new
  versions of programs arrive.

  As far as I know, only programs that under certain terms may be used
  or evaluated for personal purposes will be described. Most of the
  programs will be available complete with source under GNU-like terms.


  1.3.  Translations

  This document has been translated to the following languages:

  German, by Cristoph Seibert:

  http://tech.appl-opt.physik.uni-essen.de/LinuX/german-howto/DE-ISP-
  Verbindung-HOWTO.html

  Korean, by Kidong Lee:

  http://www.postech.ac.kr/~cessi/howto/ISP-Hookup/ISP-Hookup-HOWTO.html

  French, by Eric Jacoboni:

  http://www.minet.net/linux/HOWTO-fr/ISP-Hookup-HOWTO.html

  Polish, by Piotr Pogorzelski: URL TBA

  Norwegian:

  http://www.kvaleberg.com/no-linux.html


  1.4.  New versions of this document

  New versions of this document will be periodically posted to
  comp.os.linux.answers.  They will also be added to the various
  anonymous FTP sites who archive such information, including:

  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO

  In addition, you should generally be able to find this document on the
  Linux Documentation Project page via:

  http://sunsite.unc.edu/LDP/

  The very latest version of this document should also be available in
  various formats from:

  ftp://ftp.sol.no/user/egilk/ISP-Hookup-HOWTO.txt

  ftp://ftp.sol.no/user/egilk/ISP-Hookup-HOWTO.ps.gz

  ftp://ftp.sol.no/user/egilk/ISP-Hookup-HOWTO.tar.gz

  http://www.kvaleberg.com/ISP-Hookup-HOWTO.html


  1.5.  Feedback

  All comments, error reports, additional information and criticism of
  all sorts should be directed to:

  egil@kvaleberg.no

  http://www.kvaleberg.com/


  2.  How do I connect to the rest of the world?

  It will be assumed that we have installed the essential networking
  software modules from your Linux distribution, and that you have set
  up which serial port that is to be used for the

  The default configuration will usually only allow direct access to
  /dev/modem as user root.

  To connect to ISP shell accounts directly, and to experiment with
  connection sequences, you may use the minicom program.  It is pretty
  straight forward to use.


  2.1.  The basic configuration

  Configuration of the machine for use on the net should be done as user
  root.  Before proceeding any further, ensure that the file
  /etc/hosts.deny contains the following line:


       ALL: ALL



  You would normally want to allow yourself, so add the following line
  to /etc/hosts.allow:


       ALL: LOCAL



  Or if you insist:


       ALL: 127.0.0.1



  For the following, note that it is meant for those connected via PPP
  and with a dynamic IP address. If you have the benefit of a fixed con-
  nection, there will be some differences.

  It is nice to have a name connected to the machine, a name that the
  dynamic IP user really can select as he or she pleases.  Put the name
  in /etc/HOSTNAME:


       roderick



  The next step is to set up the name server in


       search .
       nameserver 193.212.1.0
       <nidx>nameserver



  The name server must be specified by a numeric IP address, and will be
  different from ISP to ISP. If required, you can have up to three dif-
  ferent servers, each on a separate line.  They will be requested in
  the sequence in which they are listed.

  If you want to be able to use names like somemachine as an
  abbreviation for somemachine.acme.xz, you must replace the first line
  with:


       search acme.xz



  A certain minimum of configuration will also be required in be able to
  manage with:


       127.0.0.1       localhost
       0.0.0.0         roderick



  obviously replace 0.0.0.0 with that.

  Likewise, a minimum /etc/networks is:


       loopback        127.0.0.0
       localnet        0.0.0.0



  You should also set your external mail domain in


       acme.xz



  The username and password at the ISP must be specified in
  /etc/ppp/pap-secrets


       dirk * PrettySecret



  For those ISPs using CHAP instead of PAP the filename is
  /etc/ppp/chap-secrets.

  Finally, the nitty gritty regarding the connection procedure itself
  must be specified before PPP can be initiated.  This is done in
  /etc/ppp/chatscript:


       TIMEOUT 5
       "" ATZ
       OK ATDT12345678
       ABORT "NO CARRIER"
       ABORT BUSY
       ABORT "NO DIALTONE"
       ABORT WAITING
       TIMEOUT 45
       CONNECT ""
       TIMEOUT 5
       "name:" ppp



  Details here may have to be tuned somewhat.  The phone number in the
  third line must of course be set as required.  Some users may need to
  replace the ATZ modem initialization string with something more tai-
  lored for the modem being used.  The last line specifies that one is
  expecting a prompt that ends with name:, and that the response should
  be ppp when it arrives.  Other systems may have other login proce-
  dures.

  To actually initiate a call, the PPP protocol may be initiated by
  issuing the following command:


       exec pppd connect \
            'chat -v -f /etc/ppp/chatscript' \
             -detach crtscts modem defaultroute \
             user dirk \
             /dev/modem 38400



  until the program is killed by typing a ctrl-C.  CAny messages con-
  cerning the connection will be appended to the system logs. To read
  them, try:


       tail /var/adm/messages



       dmesg



  As long as PPP is up, you will have direct access to the Internet and
  may use programs like ftp, ncftp, rlogin, telnet, finger etc.  All
  these programs should be part of the network package.

  Further information concerning PPP is also available from:

  /usr/lib/ppp/README.linux

  /usr/lib/ppp/README.linux-chat

  Finally, an additional word about security The file all services that
  your machine will offer externally. With the have made, no external
  access will be allowed.  For those who need it, access must be allowed
  explicitly in Local traffic may be allowed by:


       ALL: LOCAL



  See also man 5 hosts_access.

  A final minor issue: A certain confusion exists regarding the names of
  the POP protocols. A definition in with just about everything is:


       pop2            109/tcp         pop-2           # PostOffice V.2
       pop3            110/tcp         pop-3 pop       # PostOffice V.3


  ALT: Instead of chatscript, one might use the much more flexible

  ALT: Those fortunate enough to have a permanent TCP/IP connection via
  e.g. an Ethernet may safely ignore anything about PPP and rather start
  concentrating about setting up their network card.

  ALT: Others may not have the possibility of using PPP, but may be able
  to use SLIP instead, for which there is support in much the same
  manner as for PPP. Another possibility is UUCP Others again may have
  to rely on exchange of news and email be means of SOUP A description
  for the latter case may be found in:

  ftp://ftp.sol.no/user/bjorn/Linux-offline.tgz

  The TERM program is also an option. Refer to the Term-HOWTO.


  3.  How do I surf ?

  If you think that text is the most important, you might want to use
  the Lynx web browser. It is available from:

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-
  systems/lynx-2.3.bin2.tar.gz

  If you have installed the X window system, you can also use one of the
  many graphical browsers.  Chimera may be found at:

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-
  systems/chimera-1.65.bin.ELF.tar.gz

  http://www.unlv.edu/chimera/

  Mosaic

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-
  systems/Mosaic-2.7b1-aout.tgz

  ftp://ftp.NCSA.uiuc.edu/Web/Mosaic/Unix/binaries/2.6

  Netscape (aka.  Mozilla

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-systems/netscape-
  v11b3.tar.gz

  ftp://ftp.cs.uit.no/pub/www/netscape

  These browsers are constantly available in new and in various ways
  exciting versions.

  Use and evaluation of these programs is subject to certain terms.
  Please observe them.


  4.  How do I send and receiveemail

  First of all, ensure that sendmail is installed.  Sendmail sorts
  internal and out-bound mail, and will buffer out-bound mail until such
  time it is possible to forward it.

  Sendmail is based on a configuration found in example suitable for ISP
  users can be found in:

  ftp://ftp.sol.no/user/egilk/sendmail.cf This is based on delivery
  agent but may easily be changed to use

  It is if course required to have an official domain address for out-
  bound mail, something which is specified in


       # who I masquerade as (null for no masquerading)
       DMacme.xz



  have the same user name locally as you have at your ISP. If it is dif-
  ferent, just specify the full name instead:


       DMdick@acme.xz



  Sendmail is now configured for sending directly to the recipient.  To
  avoid long and repeated connections in those cases where the connec-
  tion to the receiving end is slow and irregular, is is usually nice to
  use ones ISP as a buffer store.  This can be specified by the DS spec-
  ification:


       # "Smart" relay host (may be null)
       DSmail.acme.xz



  Beware that sendmail is somewhat sensitive to handling of tab stop
  characters in sendmail.cf.  You might want to use the characters are
  retained unchanged.

  Email reception can often be performed via the POP3 protocol, which
  can be initiated every time the connection is brought up.  A script
  for testing this is:


       sendmail -q
       popclient -3 -v mail.acme.xz -u dirk -p "PrettySecret" \
              -k -o /usr/spool/mail/dirk



  connection has been established.  Beware that this script is just for
  testing, so ensure that the local mailbox is left untouched while it
  runs.  The -k option means that the mail is kept in the ISP mailbox,
  and you are simply given a copy of the mail.  You would of course want
  to remove this option once you are confident that your setup is work-
  ing.

  Beware that the password will show on the command line.  Also note
  that popclient is getting old fashioned, and that you should consider
  using instead.

  A more secure and better version of this script may be found at:

  ftp://ftp.sol.no/user/egilk/pop-script.tar.gz

  This version of the script requires that procmail is installed, but
  that is something you'll never regret anyway. Most distributions
  include it, otherwise you may try:
  ftp://sunsite.unc.edu/pub/Linux/system/Mail/mailhandlers/procmail-3.10-2.tar.gz

  Procmail is a simple and flexible tool that can sort incoming email
  based on a large range of criteria. In addition to being able to
  handle automated tasks like vacation messages and such.

  Note that when we use procmail directly as in this case, the situation
  is somewhat different from what is described in the procmail
  documentation.  A .forward is not required, and we also don't need a
  .procmailrc.  The latter is only required if we want to sort the mail.

  The user interface for reading and sending of email can be found in
  programs like

  ALT: Fetchmail has recently become an improved alternative to
  popclient.  The latest version is available from:

  ftp://ftp.ccil.org/pub/esr/fetchmail/fetchmail-3.3.tar.gz

  ALT: For an ordinary dial-up ISP user it is not really necessary to
  have the sendmail daemon active.  To reduce resource usage, and
  possibly other problems, one may thus comment out any startup of
  sendmail, as is usually found in /etc/rc.d/rc.M (this varies from
  distribution to distribution).

  ALT: In place of sendmail one might use the simpler description of it
  (as well as most other things mentioned here) in the Linux Network
  Administrator's Guide.

  ALT: There is also an m4 macro package for making a fresh
  /etc/sendmail.cf.  For a simple installation it might be just as well
  to modify an existing configuration.

  ALT: There are also simpler although less flexible alternatives for
  handling email.  Pine may run stand-alone as long as it is configured
  properly, for instance.  It might even be possible to use newer
  versions of some web-browsers.

  ALT: Many are very enthusiastic regarding the Emacs companion Gnus as
  an email and news handler. Further information can be found at:

  http://www.ifi.uio.no/~larsi/

  ALT: An alternative to popclient is pop-perl5.  It is available from:

  ftp://sunsite.unc.edu/pub/Linux/System/Mail/pop-perl5-1.1.tar.gz


  5.  News

  5.1.  How do I set up an online news-reader?

  possible to read news online.  There are lots of available programs,
  two simple alternatives being trn.

  To start reading news, the only thing required in terms of
  configuration in most cases is to set NNTPSERVER (usually once and for
  all in the file .profile):


       export NNTPSERVER=news.acme.xz



  To get the From-address correct in postings, some programs may
  require:


       export NNTP_INEWS_DOMAIN=acme.xz



  5.2.  How do I set up an offline news-reader?

  offline and thus reduce phone bills and give greater flexibility, one
  must set up a local news-spool of one sort or the other.  This
  requires some configuration, and there will also be a certain amount
  of disk space involved.  After initial setup, things should run more
  or less by themselves, with only some attention needed from time to
  time.

  Two different solutions will be described here.


  5.3.  How do I set up C News?

  The solution described here is based on the news-server C News and the
  NNTP protocol.  C News was originally targeted towards another sort of
  configuration, but is flexible enough to handle our situation too.
  One might also use the more recent INN news server but it might
  require a bit more in terms of resources. Either way, be careful not
  to install both; they don't live together easily.

  It is crucial that all maintenance of news is done while logged in as
  user news, and that all configuration files is placed in
  /usr/lib/news.  One way of handling this is, while logged in as root
  to write su news; cd.

  The most important files in the configuration are:



  o   over active newsgroups.  It is updated as required by the command
     comp.os.linux.networking y.

  o   simply contain whatever you want in the Organization: header
     field, in our case:



       Dirk Gently's Holistic Detective Agency



  o   case be set to acme.xz.

  o   of your site in the Path: thread.  In a setup as described here,
     using newsx, this name will never leave the machine, so you can set
     this to whatever you like as long as you are pretty sure it is
     unique. In this case roderick.

  o  The file fetching and further distribution of news.  We will assume
     the ISP in our case adds acme.xz to the Path, and that this is the
     only news source we have.  The example given really tells that we
     will accept everything that arrives, and that we will only post
     news to acme.xz that it hasn't seen before, and is originally
     posted at our own site.  In this simplified setup we assume that
     the all groups will come from a single source.  /all specifies the
     distribution, and must be included.  The letter F says that
     (pointers to) outgoing news articles will be collected in a file.



       ME:all/all::
       acme/acme.xz:all,!junk/all:FL:



  o  A subdirectory for the outgoing news must be created, in our case:



       mkdir /var/spool/news/out.going/acme



  o   posting in moderated groups, although this task may usually be
     left to the ISP.

  C News needs a certain degree of daily maintenance, but this can be
  specified once and for all via the command crontab -e setup follows;
  it can be tuned as required:


       # maintain incoming and outgoing batches
       10,40 *  * * * /usr/lib/newsbin/input/newsrun

       # expire C News, once a day
       30 0  * * * /usr/lib/newsbin/expire/doexpire

       # monitor and report if needed
       00 2  * * sat /usr/lib/newsbin/maint/addmissing
       40 3  * * * /usr/lib/newsbin/maint/newswatch
       50 3  * * * /usr/lib/newsbin/maint/newsdaily



  out (twice every hour), doexpire will delete articles as they get old
  (every night at 00:30), and the three last commands does various
  supervisory and error correcting tasks.

  One should also ensure that things are cleaned up when starting the
  machine. As user root, add the following line to /etc/rc.d/rc.local:


       su news -c /usr/lib/newsbin/maint/newsboot



  News may be collected via the program NewsX, The program can be found
  at:

  ftp://sunsite.unc.edu/pub/Linux/system/news/transport/newsx-0.9.tar.gz
  Or:

  ftp://ftp.sol.no/user/egilk/newsx-0.9.tar.gz

  Setting up NewsX is quite simple.  Installation is a classic case of:


       make
       su
       make install
       exit



  With the setup outlined here, all you have to do is to create the
  groups you want to read using the addgroup command.

  To fetch articles, user news issues the following commands (assuming
  communication via PPP or similar is up):


       newsrun
       newsx acme news.acme.xz
       newsrun



  The option -d gives continuous printout to the screen.  Refer to the
  NewsX documentation for further information.

  NewsX will also take care of posting of outgoing news.

  To control disposal of articles as they get old, a file explist is
  required.  The comments in this example should explain what we want to
  do:


       # hold onto history lines 14 days, nobody gets >120 days
       /expired/                       x       14      -
       /bounds/                        x       0-1-120 -

       # retain these for 2 months
       comp.sources,comp.os.linux.all  x       60      -

       # noise gets thrown away fast
       junk,control                    x       2       -

       # default:  14 days, no archive
       all                             x       14      -



  ALT: In a small news-spool, one will usually not need the newsgroup
  control.  The traffic is huge compared to the possible usefulness. The
  main point is that articles will be canceled, and that groups may be
  created automatically. To ensure that control messages containing
  newgroup not shall mess up things for us, a file called what we will
  allow:



  comp.os.linux   tale@uunet.com  yv
  all             any             nq



  In this example, all proper groups under comp.os.linux will be created
  (y), and the user news will be notified (v).  Everything else will be
  silently (q) ignored (n).  The last line is sufficient if you want to
  create all groups manually.

  ALT: An alternative to NewsX is suck.


  5.4.  How do I set up Leafnode?

  A different solution altogether is to install the integrated package
  handle all tasks required for a personal news spool, and is easy to
  configure.  It is available via:

  http://www.troll.no/freebies/leafnode.html

  As for C News, all news maintenance really should be performed as user
  news.

  The home directory for leafnode is in /usr/lib/leafnode.  To install,
  write:


       cd /usr/lib/leafnode
       tar -xzvf leafnode-0.8.tgz
       cd leafnode-0.8
       make
       su
       make install



  Note in the following that the prefix /usr/local/sbin should be
  replaced with /usr/sbin if you installed leafnode from a package.

  While still being logged in as root, change the line that controls
  NNTP in /etc/inetd.conf:


       nntp  stream  tcp  nowait  news  /usr/sbin/tcpd /usr/local/sbin/leafnode



  Activate it by:


       killall -HUP inetd



  Return to user news by writing exit.  In /usr/lib/leafnode/config
  change the line that defines the NNTP server. In our case:


       server = news.acme.xz


  Leafnode will look after itself by adding the following command via
  crontab -e as user news:


       # expire Leafnode, once a day
       0 4 * * * /usr/local/sbin/texpire



  News exchange is also done as user news by the following command
  (assuming PPP is up and running):


       /usr/local/sbin/fetch



  Users who wants to read news should then use the recipe in How do I
  set up an online news-reader?, except that they configure for the
  local machine, i.e:


       export NNTPSERVER=localhost



  That should be all there is to it.  The first fetch will transfer a
  list of available newsgroups.  Leafnode will then monitor what groups
  the users are requesting, and adapt to this the next time it is
  activated.

  Note that leafnode does not seems to work in cases where NNTP
  authorization is required.  +.LP

  ALT: An alternative to leafnode is nntpcache, available from:

  ftp://ftp.suburbia.net/pub/nntpcache/nntpcache.tgz ALT: Another
  alternative is to use the newsreader pullslrn-pull package. The
  newsreader must be compiled with the spool feature set.


  6.  How do I automate the connection procedure?

  Automated handling of news and email is quite easy to implement in
  Linux.

  First and foremost one should make a that initiates the ISP
  connection.  Often, this file will simply contain the following:


       /usr/sbin/pppd



  connect "/usr/lib/ppp/chat -v -f /etc/ppp/chatscript"
  crtscts
  modem
  defaultroute
  asyncmap 00000000
  user dirk
  /dev/modem 38400



  To end a connection, use the supplied version of /usr/lib/ppp/ppp-off.

  Having tested the functionality of these two scripts, one must then
  write scripts that perform the various tasks. The script to collect
  email has been described before, and we will here assume it is located
  at /home/dirk/pop.

  A script for exchange of email can then be produced in /root/mail:


       #! /bin/sh
       #
       # exchange mail
       # 10 minutes timeout:
       TIMEOUT=600
       DT=10

       # kick sendmail:
       sendmail -q &

       # retrieve mail:
       su dirk -c /home/dirk/pop

       # wait for sendmail to terminate:
       t=0
       while ! mailq | grep -q "Mail queue is empty"; do
           t=$[$t+$DT]
           if [ $t -gt $TIMEOUT ] ; then
            echo "sendmail -q timeout ($TIMEOUT).."
            exit 1
           fi
           sleep $DT
       done

       exit 0



  The script to exchange news may be placed in /usr/lib/news/news:



  #!/bin/sh
  #
  # exchange news
  # must be run as news:
  cd /usr/lib/news

  #update the outgoing batch (C News):
  /usr/lib/newsbin/input/newsrun < /dev/null

  #exchange news:
  /usr/lib/newsbin/newsx acme news.acme.xz

  #and flush the incoming batch:
  /usr/lib/newsbin/input/newsrun < /dev/null



  A script to connect the various bits and pieces remains, and can be
  placed in /root/news+mail:


       #!/bin/sh
       #
       # exchange news and email
       # must be run as root
       #
       if ! /usr/lib/ppp/ppp-on; then
           exit 1
       fi
       trap "/usr/lib/ppp/ppp-off" 1 2 3 15

       #exchange news+mail:
       /root/mail &
       su news -c ~news/news
       wait

       #disconnect..
       /usr/lib/ppp/ppp-off

       #update the incoming batch (C News):
       su news -c /usr/lib/newsbin/input/newsrun < /dev/null &

       exit 0



  It is quite easy to make an extension to the above that only will
  establish a connection if outgoing email and news is present.  Lets
  call it /root/news+mail.cond, and keep in mind that the name of the
  outgoing news-spool must be updated to suit:


       #!/bin/sh
       #
       # exchange news and email, only if outgoing news or mail
       # (C News spool)
       if [ -s /var/spool/news/out.going/acme/togo ] ||
           ! ( mailq | grep -q "Mail queue is empty"); then
            /root/news+mail
       fi



  The only thing remaining is to specify when all this is going to
  happen.  This is done using the command crontab -e to exchange news
  and mail at 07:00 in the morning, and after that every 4th hour
  assuming there are outgoing email and news:


       00 7            * * *   /root/news+mail
       00 11,15,19,23  * * *   /root/news+mail.cond



  Ensure that every component is tested well before you connect them
  together. One may later add several other tasks, such as adjustment of
  the time of day (using ntpdate), and automatic update (mirroring) of
  locally maintained WWW and FTP files up to the ISP (using make and
  ftp).

  ALT: Depending on ones preferences, it is also possible to turn the
  process upside down. Every time a PPP link is initiated, the script
  /etc/ppp/ip-up will be started.  One may here add whatever magic is
  required to start exchange of email and news.  See man pppd for
  further detail.

  ALT: It is also possible to automatically connect PPP whenever network
  traffic is detected.  This is in many ways the more elegant solution,
  but it is quite dependent on a good configuration to avoid frequent
  (and costly) connections being made.  More information can be found
  at:

  http://www.dna.lth.se/~erics/diald.html

  The diald utility is available from:

  ftp://sunsite.unc.edu/pub/Linux/system/network/serial/diald-0.16.tar.gz

  At the same location one will also find other variations on the theme
  PPP connections.


  7.  Final words

  7.1.  Other things I should know about?



  o  Various error messages in the system will normally be issued as
     internal email. To ensure that these will actually be read, one
     should create an /etc/aliases.  Remember the command newaliases
     every time you change this.  An example that should cover most
     eventualities is:



       PostMaster: root
       ftp: root
       news: root
       usenet: root
       FaxMaster: root
       fax: root
       WebMaster: root
       MAILER.DAEMON: root



  o  Many programs for Linux may be found at Sunsite, many mirrors and
     every time there is a reference to
     ftp://sunsite.unc.edu/pub/Linux/.. one should try to use a mirror
     close to home, e.g.  ftp://ftp.nvg.unit.no/pub/linux/sunsite/...

  o  If you happen to be migrating from Yarn it should be possible to
     convert these to standard folders using the yarn2mf available at:

  ftp://ftp.sol.no/user/egilk/yarn2mf.zip


  8.  ISP specific information

  More specific information for certain ISPs is available from a variety
  of sources:

  Demon Internet

  ftp://ftp.demon.co.uk/pub/unix/linux/Demon/slack3.0.help.tgz

  Netcom

  http://www.netcom.com/bin/webtech/NetCruiser/Operating_Systems/Linux/linux.cfg.html

  PowerTech, Telenor Online, Telia

  http://www.kvaleberg.com/no-isp.html

  Stanford

  http://www-leland.stanford.edu/~wkn/Linux/network/network.html

  MCI

  http://www.kvaleberg.com/linux-mci.html

  SISCOM

  http://www.siscom.net/support/linux_setup.htm

  AOL is not possible since AOL uses a proprietary protocol.

  If you can supply ISP specific information not listed here, please get
  in touch.


  8.1.  How do I learn more?

  The Linux Documentation Project book called Linux Network
  Administrator's Guide by Olaf Kirch is pretty mandatory for anyone
  that will set up and maintain anything involving TCP/IP and Internet

  ftp://sunsite.unc.edu/pub/Linux/docs/linux-doc-project/network-
  guide/nag-1.0.ascii.tar.gz

  The documentation that follows each software package will normally
  give you all the detailed information you need, if not always the
  overview. The man-pages will be the first place to look. Try for
  instance:


       man pppd



  You will also find some documentation about certain programs in the
  this is not always well structured.

  The following HOWTOs will be highly relevant:



  o  Installation-HOWTO will get the basics sorted.

  o  NET-2-HOWTO is a very thorough description of installation and
     setup of the NET code.  Much of this should already have been done
     if you use a standard Linux distribution (e.g. Slackware, Red Hat,
     Debian).  But many sections on setup and troubleshooting will be
     very worthwhile.

  o  Mail-HOWTO explains how to configure various tools.  Again, much of
     this will already have been done for you when you install a
     standard Linux distribution.

  o  News-HOWTO is for setting up a (conventional) news spool.

  o  Tiny-News covers yet another alternative for collecting news.

  o  PPP-HOWTO is a good description of problems you may encounter when
     setting up a PPP connection.

  o  Serial-HOWTO contains everything you need to know about setting up
     serial ports.

  o  Mail-Queue tells you how to send up sendmail to always queue remote
     mail but deliver local mail at once.

  Red Hat has a mailing list for PPP issues; to join send an email to

  redhat-ppp-list-request with the subject line


       subscribe



  8.2.  Thanks to

  Information here is collected from many sources. Thanks to the
  following that either indirectly or directly have contributed:



  Adam Holt <holt@graphics.lcs.mit.edu>
  Arne Coucheron <arneco@oslonett.no>
  Arne Riiber <riiber@oslonett.no>
  Arnt Gulbrandsen <agulbra@troll.no>
  Bjorn Steensrud <bjornst@powertech.no>
  Gisle Hannemyr <gisle@a.sn.no>
  Hans Amund Rosbach <haro@sesam.dnv.no>
  Hans Peter Verne <hpv@ulrik.uio.no>
  Harald T Alvestrand <Harald.T.Alvestrand@uninett.no>
  Harald Terkelsen  <Harald.Terkelsen@adm.hioslo.no>
  Haavard Engum <hobbes@interlink.no>
  James Youngman <JYoungman@vggas.com>
  Johan S. Seland <johanss@sn.no>
  John Phillips <john@linux.demon.co.uk>
  Jorn Lokoy <jorn@oslonett.no>
  Kenneth Tjostheim <kenneth.tjostheim@asplanviak.no>
  Kjell M. Myksvoll <kjell.myksvoll@fou.telenor.no>
  Kjetil T. Homme <kjetilho@math.uio.no>
  Michael Meissner <meissner@cygnus.com>
  N J Bailey <N.J.Bailey@leeds.ac.uk>
  Nicolai Langfeldt <janl@math.uio.no>
  Ove Ruben R Olsen <Ove.R.Olsen@ub.uib.no>
  R. Bardarson <ronb@powernet.net>
  Steinar Fremme <steinar@fremme.no>
  Sverre H. Huseby <sverrehu@ifi.uio.no>
  Trond Eivind Glomsrod <teg@stud.imf.unit.no>
  Tommy Larsen <tommy@mix.hive.no>
  Yves Bellefeuille <yan@storm.ca>



  "Pocket" ISP based on RedHat Linux
  Anton Chuvakin, anton@chuvakin.org
  v1.0.1 4 April 2000

  This document outlines the setup of a single RedHat box for dialins,
  virtual web hosting, virtual email, POP3 and ftp servers. Why anybody
  might need this in one box is beyond the scope of this document. The
  idea is a complete ISP solution based on RedHat Linux. Any part of
  this setup can be implemented separately though. I will try to empha-
  size all the commands so one can just paste them to configure his own
  box.  The list of documents that I borrowed from and some further
  reading is below (see References section).  I will try to keep secu-
  rity in mind on all stages of the setup and to make clear all the
  security limitations of this setup.  I should add that assets that are
  to be protected in this case are considered not very valuable (e.g.
  personal pages etc) thus efforts spent on securing the setup are
  allowed to be limited.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Changes from 1.0.0 to 1.0.1

  3. TODO Tue Apr  4 15:23:11 EDT 2000

     3.1 New versions of this document
     3.2 Feedback
     3.3 Standard disclaimer
     3.4 Copyright information

  4. Step by step guide

     4.1 Get RH
     4.2 Install RH
     4.3 Some install tips
     4.4 Some preliminary security configuration
     4.5 Remove unnecessary services
     4.6 Enable multiple IP addresses
     4.7 Configure DNS
     4.8 Configure httpd
     4.9 Configure sendmail
     4.10 Configure POP3
     4.11 Configure FTP server
     4.12 Configure dialin
        4.12.1 Linux setup
        4.12.2 Windows setup
     4.13 Open access

  5. Conclusion

  6. References



  ______________________________________________________________________

  1.  Introduction

  The guide assumes some familiarity with Linux functionality and
  general Linux/UNIX setup procedure (although not very detailed). Fully
  functional brain is also required for some stages of the procedure.
  All setup would be done manually (without the use of linuxconf or
  other tools). Not that those are bad or that there is anything wrong
  with them. The reasons for that are: 1) it is comparatively hard to
  give step by step directions that produce predictable results as these
  tools pretend they are intelligent and "know better" (Windows
  syndrome) 2) layout of tools changes with time and is different in
  some distributions 3) manual setup gives better understanding of
  system works (not that it is always required though) 4)some tools
  allow only limited configuration of Linux system or do not keep up
  with updated features.  While many improvements are possible to this
  setup they might be described in later editions of this document - I
  just outline one possible way (accidentally, the one I used). The
  writeup is aimed at RedHat Linux, but with trivial changes can be used
  on any modern Linux distribution.  The resulting configuration loosely
  follows the setup of some particular machines built by the author..


  2.  Changes from 1.0.0 to 1.0.1


  o  Many errors corrected (both spelling and factual)

  o  References section updated

  o  Minor changes in wording and syntax to improve clarity

  o  More security info added to several sections

  o  Windows configuration for dialup added


  3.  TODO Tue Apr  4 15:23:11 EDT 2000


  o  Finish ftp permission considerations and possible variations of the
     setup (like, no uploads at all etc)

  o  Add more meat to dialin section (troubleshooting is necessary) and
     describe setup of Windows boxes to use it (really, nothing special)
     and investigate variations of the setup (simplify?)

  o  More on security of all the services we install (clear text
     password, DoS by overflowing partition in mail and ftp, http access
     configs etc)

  o  Add info on POP3 and ftp tunneling via ssh (just for fun)

  o  Add troubleshooting subsections in various sections



  3.1.  New versions of this document

  New versions of this document can be found at

  http://www.chuvakin.org/ispdoc


  3.2.  Feedback

  All comments, error reports, additional information (very much
  appreciated!!!) and criticism of all sorts should be directed to:
  anton@chuvakin.org

  http://www.chuvakin.org/

  My PGP key is located at http://www.chuvakin.org/pgpkey

  Please direct spelling error comments to your friendly local spell
  checker.

  3.3.  Standard disclaimer

  No liability for the contents of this document can be accepted.  Use
  the concepts, examples and other content at your own risk.
  Additionally, this is an early version, with many possibilities for
  inaccuracies and errors.

  One of many possible setups will be described. In the Linux world,
  there is usually a number of ways in which to accomplish things.

  As far as I know, only programs that under certain terms may be used
  or evaluated for personal purposes will be described. Most of the
  programs will be available complete with source under GNU-like terms.


  3.4.  Copyright information

  This document is copyrighted (c) 2000 Anton Chuvakin and distributed
  under the following terms:


  o  Linux HOWTO documents may be reproduced and distributed in whole or
     in part, in any medium physical or electronic, as long as this
     copyright notice is retained on all copies. Commercial
     redistribution is allowed and encouraged; however, the author would
     like to be notified of any such distributions.

  o  All translations, derivative works, or aggregate works
     incorporating any Linux HOWTO documents must be covered under this
     copyright notice.  That is, you may not produce a derivative work
     from a HOWTO and impose additional restrictions on its
     distribution. Exceptions to these rules may be granted under
     certain conditions; please contact the Linux HOWTO coordinator at
     the address given below.

  o  If you have questions, please contact Greg Hankins, the Linux HOWTO
     coordinator, at

     gregh@sunsite.unc.edu


  4.  Step by step guide


  Ingredients needed:

  o  RedHat Linux distribution (the instructions are exactly applicable
     to RedHat 6.1 or 6.0 (I think, 6.2, as well, since there are no
     major changes) and with some minor changes to 5.x versions)

  o  compatible hardware (also known as a PC), that includes network
     card and modem (at least one)

  o  3-256 IP addresses (as the machine will give out some IP addresses
     for modem callers and use others for virtual hosting more than 1 is
     needed, the upper number is the maximum number of IP-based virtual
     hosts allowed without recompiling the stock RedHat kernel, lower is
     one real IP, one modem and one virtual IP).

  o  some sort of permanent network connection (using some modems for
     dialin while providing the Internet access via another modem is
     considered weird and not recommended)

  Here follows the procedure:


  4.1.  Get RH

  Purchase or otherwise procure the RedHat 6.1 (further referred as RH,
  latest version number is 6.1 at the time of writing) distribution and
  compatible hardware.  One can get a full RH CDROM for about $2.00
  including shipping and handling at http://www.cheapbytes.com. This
  version will not contain such luxuries as secure web server and extra
  software. For those you should turn to RedHat website.  Or probably
  buying the PC with Linux RH pre-installed is  an option for some.



  4.2.  Install RH

  Install the RH following the *instructions on the package* (might be
  added here later). CDROM install is very easy to perform. I suggest
  using text-mode setup, in my case their new graphical one failed
  miserably. When asked about the installation type
  (Server/Workstation/Custom) choose Server or Custom (if you know what
  you are doing)-you can always add software later. Some other important
  installation decisions are outlined further.


  4.3.  Some install tips

  If you hardware really is compatible the installation process will
  detect and configure it correctly. Otherwise, refer to corresponding
  documentation for troubleshooting network card, modem, video card, etc
  problems (mostly HOWTOs and mini-HOWTOs, some are in References
  section below).

  If you network card is detected properly you will be asked for an IP
  address of your machine, gateway address and network mask and the
  address of the DNS server (might be your own machine if you plan to
  set it up this way). Have all this info handy.  Also you will be asked
  for a machine name and domain name.  We will use a sample domain name
  you.com and the machine will be named ns (that gives us a fully
  qualified domain name (FQDN) ns.you.com). You should use whatever
  domain you registered (see Setting Up Your New Domain Mini-HOWTO, link
  in References section below) and intend to use as you primary domain
  (not a virtual).  For the gateway address we will use a sample
  111.222.333.111 address. Gateway is likely the router that connects
  your machine (or your LAN) to the outside world.

  Enable shadow and MD5 passwords for greater security.  First of those
  makes the file that contains encrypted passwords readable only to root
  user and the second allows longer and harder to crack passwords.  As
  it will be a standalone machine do not enable NIS/NFS.

  After installation finishes and machine reboots you will see the login
  prompt.  Enter login and password (for the root account) and start
  configuring you new Linux station.


  4.4.  Some preliminary security configuration

  First (and fast), add a line: ALL:ALL to your /etc/hosts.deny file.
  That would (to some known extent) prevent other people from accessing
  your machine while you are doing the configuration. That will also
  prevent you from doing the same. For further configuration efforts
  (that can be done remotely, by the way) secure shell is recommended.
  Download the RPM package for RH from one of the many sites and install
  it (as root) using:  rpm -U ssh*rpm or similar command (depends upon
  the version). You will have to get both client and server packages (if
  you want to ssh from this machines as well as to this machine). Upon
  installation all necessary post-installation commands (like server key
  generation) are run automatically by the RPM package. You will have to
  start server manually using command /etc/rc.d/init.d/sshd start.Some
  early versions of ssh-1 and also all versions of ssh-1 compiled with
  RSAREF library contain a buffer-overflow bug. Use ssh-2 or the latest
  version of ssh-1 without RSAREF. If you do this you will have to allow
  access using ssh from some trusted machine (described later) in
  /etc/hosts.allow file.

  If you want to be really rigorous in you configuration pursuits go to
  single use mode by giving the command init 1, in this case all work is
  to be done locally and you would not be able to test you network-
  related configuration as network is not available in this mode.

  To further enhance your security ipchains software (that is usually
  part of your Linux distribution) can be used (for that refer to
  IPCHAINS HOWTO, link in References).  It takes quite a bit more
  efforts to configure it than TCP wrappers, although some automated
  tools are available for that too.


  4.5.  Remove unnecessary services

  Now lets deal with unnecessary services. Please note that my idea of
  "unnecessary" might not be 100% same as yours.

  1. Services started from /etc/inetd.conf:

     comment out all the lines, but those


       ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  in.ftpd -L -l -i -a
       telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  in.telnetd



  Check this by using the command: grep -v '\#' /etc/inetd.conf

  If you will be using the secure shell (ssh), telnet is also not
  necessary and can be removed. Secure shell can either be started as a
  daemon on system startup or as a service from /etc/inetd.conf. Default
  configuration (used by the RPM package) is to start is as a daemon.
  Sshd can be compiled to refer to /etc/hosts.allow file for access
  control. In this case, while you will not have it in your
  /etc/inetd.conf, it will still use the settings from /etc/hosts.allow
  and /etc/hosts.deny. The advantages of this method is faster
  connection as the sshd will not have to regenerate server key every
  time somebody connects. On the other hand, if you start it from
  /etc/inetd.conf it will be more isolated from the outside world.  More
  lines will be added to /etc/inetd.conf as necessary (POP3 is one of
  those).


  2. Services started on system startup from /etc/rc.d directory:

     Check what services are running by using: ps ax. You will get
     something similar to the sample output below:



      PID TTY      STAT   TIME COMMAND
      1 ?        S      0:04 init
      2 ?        SW     0:30 [kflushd]
      3 ?        SW     0:32 [kupdate]
      4 ?        SW     0:00 [kpiod]
      5 ?        SW     0:03 [kswapd]
      6 ?        SW<    0:00 [mdrecoveryd]
    296 ?        SW     0:00 [apmd]
    349 ?        S      0:00 syslogd -m 0
    360 ?        S      0:00 klogd
    376 ?        S      0:00 /usr/sbin/atd
    392 ?        S      0:00 crond
    412 ?        S      0:00 inetd
    454 ttyS0    S      0:00 gpm -t ms
    533 tty2     SW     0:00 [mingetty]
    534 tty3     SW     0:00 [mingetty]
    535 tty4     SW     0:00 [mingetty]
    536 tty5     SW     0:00 [mingetty]
    537 tty6     SW     0:00 [mingetty]
    667 tty1     SW     0:00 [mingetty]
   4540 ?        S      0:00 httpd
   5176 ?        S      0:00 httpd
   5177 ?        S      0:00 httpd
   5178 ?        S      0:00 httpd
   5179 ?        S      0:00 httpd
   5180 ?        S      0:00 httpd
   5181 ?        S      0:00 httpd
   5182 ?        S      0:00 httpd
   5183 ?        S      0:00 httpd
   7321 ?        S      0:00 /usr/sbin/sshd                 <<<<< only after you installed sshd to run on startup
   7323 pts/0    S      0:00 -bash
   7336 pts/0    R      0:00 ps ax



  Lets concentrate on processes that listen to network, such as lpd.
  Since we do not plan to use our server for printing (we sure might, I
  just don't describe it here), I suggest we remove the printer daemon
  by: rpm -e lpd . If rpm complains about any dependencies (like, in my
  case, printfilter and rhprinttool), add them to your rpm -e command
  and repeat it. Other services that might be removed are NFS, NIS,
  samba etc, if they got installed by mistake. Again, these are useful
  things, I am just following the *golden rule* "remove the software you
  don't currently use". And, with RH RPM it is really easy to add it any
  time in the future.



  Some more basic security settings can be obtained from Armoring Linux
  paper. As suggested there, lets make a wheel group with trusted users
  (in our case, only user youwill be able to do /bin/su and to run cron
  jobs (together with root).

  o  wheel group for sensitive commands:


     1. vi /etc/group, add a line (if it doesn't exist):

        wheel:x:10:root,you


     as shown.  You don't have to use vi (and I understand it very
     well), just use your favorite editor (for a nice reasonably user-
     friendly editor try pico, distributed together with mail program
     pine, the latter is part of most Linux distributions)
     2.

        /bin/chgrp wheel /bin/su


     wheel group on /bin/su

     3.

        /bin/chmod 4750 /bin/su



  o  restrict cron:

     To only allow  root and you to submit cron jobs create a file
     called /etc/cron.allow that contains usernames that you want to be
     able to run cron jobs. This file might look like this:


       root
       you



  I suggest you do not install X Windows as it will bring new concern
  that you might not be prepared to deal with.


  4.6.  Enable multiple IP addresses

  Now we are ready to enable our machine to handle multiple IP addresses
  for virtual hosting. At that point, the IP Aliasing HOWTO might come
  handy (see link in References).  For several reasons, IP-based virtual
  hosting is better (if you have enough IP addresses, that is). For
  instance, reverse lookups would succeed, if done from the browser
  side. It might also be needed for hosting cryptographically enabled
  websites (commonly known as "secure websites").  Older browsers (not
  supporting HTTP 1.1) will get unhappy too.

  The changes would be concentrated in /etc/rc.d/ directory.  To enable
  multiple IP addresses you kernel should support this. On a freshly
  installed RH Linux it does. To verify it one should look into the
  config file that was used to compile the kernel. In my case, it was
  /usr/src/linux/configs/kernel-2.2.12-i686.config since the machine has
  Pentium II processor.  This file exists, if the kernel-source RPM
  package was installed. If line CONFIG_IP_ALIAS=y is present in the
  file than you are OK.  While we are here, we can also confirm the
  ability to forward IP packets (needed for dialup users PPP). This
  ability is present, but not turned on by default. Also needed is the
  support for PPP protocol (line CONFIG_PPP=m, this means PPP support is
  compiled as a kernel loadable module, CONFIG_PPP=y is also OK)

  The examples will use the ridiculous IP addresses
  111.222.333.444-111.222.333.777 from C block 111.222.333.0.
  111.222.333.444 is a real host IP (that is configured during RH
  installation), 111.222.333.555-777 are virtual addresses and
  111.222.333.888 is a dialin user address (can be more of those).


  Lets assume we want to configure 3 virtual hosts.

  Two sets of commands will be used:


  1.


       /sbin/ifconfig eth0:0 111.222.333.555
       /sbin/ifconfig eth0:1 111.222.333.666
       /sbin/ifconfig eth0:2 111.222.333.777



  These will bind the IP addresses to (virtual) interfaces
  eth0:0-eth0:2.


  2.


       /sbin/route add -host  111.222.333.555 dev eth0
       /sbin/route add -host  111.222.333.666 dev eth0
       /sbin/route add -host  111.222.333.777 dev eth0



  These commands will add routes for those addresses and connect those
  to real interface eth0 (ethernet card).

  After doing them the ifconfig command output (ifconfig) will look like
  this:


       eth0      Link encap:Ethernet  HWaddr 02:60:8C:4D:24:CE
                 inet addr:111.222.333.444  Bcast:255.255.255.255  Mask:255.255.255.0
                 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                 RX packets:901597 errors:33 dropped:0 overruns:0 frame:823
                 TX packets:433589 errors:0 dropped:0 overruns:0 carrier:0
                 collisions:128327 txqueuelen:100
                 Interrupt:5 Base address:0x280

       eth0:0    Link encap:Ethernet  HWaddr 02:60:8C:4D:24:CE
                 inet addr:111.222.333.555  Bcast:111.222.333.255  Mask:255.255.255.0
                 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                 Interrupt:5 Base address:0x280

       eth0:1    Link encap:Ethernet  HWaddr 02:60:8C:4D:24:CE
                 inet addr:111.222.333.666  Bcast:111.222.333.255  Mask:255.255.255.0
                 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                 Interrupt:5 Base address:0x280

       eth0:2    Link encap:Ethernet  HWaddr 02:60:8C:4D:24:CE
                 inet addr:111.222.333.777  Bcast:111.222.333.255  Mask:255.255.255.0
                 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                 Interrupt:5 Base address:0x280

       lo        Link encap:Local Loopback
                 inet addr:127.0.0.1  Mask:255.0.0.0
                 UP LOOPBACK RUNNING  MTU:3924  Metric:1
                 RX packets:26232 errors:0 dropped:0 overruns:0 frame:0
                 TX packets:26232 errors:0 dropped:0 overruns:0 carrier:0
                 collisions:0 txqueuelen:0



  All commands can be added to the bottom of /etc/rc.d/rc.local so that
  the changes are saved after reboot. Strictly speaking, rebooting
  machine is not required for adding new IP addresses. Please, do docu-
  ment all changes you do to your machines. Many a good sysadmin (or,
  should I say not-so-good?)  were burned on that at some point in their
  careers.


  4.7.  Configure DNS

  Now we are ready to configure DNS.  The easiest way would be to add
  the hostnames (real and all the virtual) that we want to be seen by
  the world to the configuration of some machine that already has bind
  (DNS daemon) running. But, since we are setting up ISP-in-a-box we
  might not be able to avoid "DNS fun".

  Now, let me also try to defend the (well, questionable) choice of
  "outdated" version of bind 4.9.7 (last of the pre-8 series). I know
  that my arguments can be beaten, but I consider bind 4.9.7 much more
  time-tested and stable. The arguments for upgrading to 8.x (provided
  http://www.acmebw.com/askmrdns/00444.htm and
  http://www.dns.net/dnsrd/servers.html and, I guess, at many other
  places) still didn't seem to convince many people. And, lets not
  forget the "exploit of 1999" - ADMROCKS, that gives remote root access
  to almost any Linux machine running bind prior to 8.1.2 patch 3.
  Judging by the INCIDENTS mailing list, this is still a very popular
  way to attack RH versions 5.0-6.1 if no recommended upgrades are
  installed.

  Here are the instructions, loosely following the DNS book from O'Reily
  (a good one, highly recommended to all, but very casual DNS user).


  1. Find and install bind 4.9.7 either from RPM package (RH 4.2, if I
     am not mistaken - for that you can use RPMFIND.net, personally I
     didn't try this and so I am somewhat skeptical about installing RH
     4.2 package on RH 6.1 system, but it might work) or from source
     (bind 4.9.7, compiling it is a bit troublesome, but reading all the
     README files in the archive will definitely help)

  2. Create files and directories needed for bind:

  o  /etc/named.boot

  o  /etc/namedb

  o  /etc/namedb/db.you

  o  /etc/namedb/db.111.222.333

  o  /etc/namedb/db.127.0.0

  o  /etc/namedb/db.yoursite1

  o  /etc/namedb/db.yoursite2

  o  /etc/namedb/db.yoursite3

     This will be used for 3 virtual domains:
     yoursite1.com,yoursite2.com and yoursite3.com. One more important
     comment refers to secondary DNS issue.  As all your domains and all
     their services will be hosted on the same machine, DNS backup in
     the form of secondary server doesn't make much sense: if your
     primary DNS is down everything else (mail, www, ftp, pop, etc) is
     down as well. But you do have to have a secondary DNS to register a
     domain.  Try to convince somebody to put you in as a secondary or
     use a free DNS service (link is in Setting Up Your New Domain Mini-
     HOWTO).

  3.

     That is how they look like (if you are unfamiliar with bind 4.x
     configuration file format, please, do read either the O'Reily DNS
     book or any of the HOWTOs or documents at bind pages, or, better,
     all of the above.  You also have an option of using them without
     understanding, but this is a bad idea in general):

     /etc/named.boot

     This is the main config file for bind 4.9.x.


       directory /etc/namedb

       ;cache-obtained from internic, usually
       cache   .                               db.cache

       ;main config files
       primary you.com                         db.you
       ;reverse lookups
       primary 333.222.111.in-addr.arpa        db.111.222.333
       ;localhost.localnet configs
       primary 0.0.127.in-addr.arpa            db.127.0.0

       ;virtual Domains
       primary yoursite1.net                     db.yoursite1
       primary yoursite2.net                     db.yoursite2
       primary yoursite3.net                     db.yoursite3



  4.

     /etc/namedb/db.you



       ; defines our local hosts at you.com, just one in our case, and its aliases
       @                       IN      SOA     ns.you.com. root.ns.you.com. (
                                               2000012190 7200 1800 3600000 7200 )
       ;name servers and mail servers
                               IN      NS      ns.you.com.
                               IN      MX      10 ns.you.com.
                               IN      A       111.222.333.444
       ns                      IN      A       111.222.333.444

       ;address of the canonical names
       localhost               IN      A       127.0.0.1
       gateway                 IN      A       111.222.333.111

       ;aliases (to use in ftp: ftp ftp.you.com etc, for clarity)
       www                     CNAME   ns
       mail                    CNAME   ns
       ftp                     CNAME   ns
       pop3                    CNAME   ns



  5.

     /etc/namedb/db.111.222.333



       ;reverse mapping of our IP addresses
       .
       ;origin is 333.222.111.in-addr.arpa
       333.222.111.in-addr.arpa. IN    SOA     ns.you.com. root.ns.you.com. (
                                               1999121501 7200 1800 3600000 7200 )
       ;name Servers
                               IN      NS      ns.you.com.

       ;addresses point to canonical name
       444.333.222.111.in-addr.arpa.   IN      PTR     ns.you.com.
       ;dialups
       888                             IN      PTR     dialup.you.com.

       ;virtual hosts
       555                             IN      PTR    yoursite1.com.
       666                             IN      PTR    yoursite2.com.
       777                             IN      PTR    yoursite3.com.



  6. /etc/namedb/db.127.0.0



       ;local loop config file
       0.0.127.in-addr.arpa.   IN      SOA     ns.you.com. root.ns.you.com. (
                                               1997072200 7200 1800 3600000 7200 )
                               IN      NS      ns.you.com.
       1                       IN      PTR     localhost.



  7. /etc/namedb/db.yoursite1



       ; yoursite1.com
       @                       IN      SOA     virtual root.virtual (
                                               1999092201      ; Serial: update each time the file is changed
                                               7200            ; refresh, sec
                                               1800            ; retry, sec
                                               3600000         ; expire, sec
                                               7200 )          ; minimum TTL
       ;name Servers
                               IN      NS      ns.you.com.
                               IN      MX      10 virtual
                               IN      A       111.222.333.555
       ;address of the canonical names
       localhost               IN      A       127.0.0.1
       gateway                 IN      A       111.222.333.111
       virtual                 IN      A       111.222.333.555
                               IN      MX      10 virtual
       ;aliases
       www                     CNAME   virtual
       mail                    CNAME   virtual
       ftp                     CNAME   virtual
       pop3                    CNAME   virtual



  8. /etc/namedb/db.yoursite2



       ; yoursite2.com
       @                       IN      SOA     virtual root.virtual (
                                               1999092201      ; Serial: update each time the file is changed
                                               7200            ; refresh, sec
                                               1800            ; retry, sec
                                               3600000         ; expire, sec
                                               7200 )          ; minimum TTL
       ;name Servers
                               IN      NS      ns.you.com.
                               IN      MX      10 virtual
                               IN      A       111.222.333.666
       ;address of the canonical names
       localhost               IN      A       127.0.0.1
       gateway                 IN      A       111.222.333.111
       virtual                 IN      A       111.222.333.666
                               IN      MX      10 virtual
       ;aliases
       www                     CNAME   virtual
       mail                    CNAME   virtual
       ftp                     CNAME   virtual
       pop3                    CNAME   virtual



  9. /etc/namedb/db.yoursite3



       ; yoursite3.com
       @                       IN      SOA     virtual root.virtual (
                                               1999092201      ; Serial: update each time the file is changed
                                               7200            ; refresh, sec
                                               1800            ; retry, sec
                                               3600000         ; expire, sec
                                               7200 )          ; minimum TTL
       ;name Servers
                               IN      NS      ns.you.com.
                               IN      MX      10 virtual
                               IN      A       111.222.333.777
       ;address of the canonical names
       localhost               IN      A       127.0.0.1
       gateway                 IN      A       111.222.333.111
       virtual                 IN      A       111.222.333.777
                               IN      MX      10 virtual
       ;aliases
       www                     CNAME   virtual
       mail                    CNAME   virtual
       ftp                     CNAME   virtual
       pop3                    CNAME   virtual



  These configuration files will allow you to host these three virtual
  domains and you real domain you.com.



  4.8.  Configure httpd

  To server html pages httpd daemon is used. RH 6.1 comes with Apache
  1.3.9 (latest version is currently 1.3.12).  At that point it is wise
  to check RH site or its mirrors (RH Mirrors) for updates.

  Most changes that we are about to make concentrate in
  /etc/httpd/httpd.conf (RH standard location for Apache configuration).
  Default location for html pages (shown when you go to www.you.com) is
  /home/httpd/html. You can allocate directories for virtual hosts
  within the same  /home/httpd, shown below are the following locations
  for them: /home/httpd/yoursite1, /home/httpd/yoursite2 and
  /home/httpd/yoursite3.

  Below I provide the minimum necessary changes for your
  /etc/httpd/httpd.conf file:



       <VirtualHost 111.222.333.555>
       ServerAdmin webmaster@you.com
       DocumentRoot /home/httpd/yoursite1
       ServerName www.yoursite1.com
       ErrorLog yoursite1-error_log
       TransferLog yoursite1-access_log
       </VirtualHost>


       <VirtualHost 111.222.333.666>
       ServerAdmin webmaster@you.com
       DocumentRoot /home/httpd/yoursite2
       ServerName www.yoursite2.com
       ErrorLog yoursite2-error_log
       TransferLog yoursite2-access_log
       </VirtualHost>

       <VirtualHost 111.222.333.777>
       ServerAdmin webmaster@you.com
       DocumentRoot /home/httpd/yoursite3
       ServerName www.yoursite3.com
       ErrorLog yoursite3-error_log
       TransferLog yoursite3-access_log
       </VirtualHost>



  That configuration will cause all logs to be stored in one directory
  (whatever is specified as such) for all sites. If that is not desired
  the ErrorLog and TransferLog directives can be changed to point to the
  proper location separately for each virtual host. The pages for the
  "real" www.you.com will be stored in default location
  /home/httpd/html.


  For more information, look at http://www.apache.org, Apache http
  server homepage. They have a lot of support pages, including those for
  virtual hosting setup (both IP-based and name-based [uses just 1 IP
  address]). Also useful is Linux WWW HOWTO (link in References
  section), section on virtual hosting.



  4.9.  Configure sendmail

  Now we will deal with sendmail. Again, proposed are the minimum
  necessary changes to the stock RH /etc/sendmail.cf and
  /etc/sendmail.cw.

  1. look for the lines that starts from Dj$w.foo.com and change it to
     point to your main ("real", not virtual) server name (you.com, so
     it will looks like this Dj$w.you.com).

  2. locate file /etc/sendmail.cw and make it look like this


       # sendmail.cw - include all aliases for your machine here.
       you.com
       ns.you.com
       mail.you.com
       yoursite1.com
       mail.yoursite1.com
       yoursite2.com
       mail.yoursite2.com
       yoursite3.com
       mail.yoursite3.com



  These are necessary so that sendmail accepts mail for these domains.

  This does not address the issue of user@yoursite1.com and
  user@yoursite2.com mail getting to different mailboxes. For that look
  into /etc/mail/virtusertable  functionality (appropriate line in
  /etc/sendmail.cw is Kvirtuser hash -o /etc/mail/virtusertable,
  detailed info may be added here later).  Excellent documentation on
  that is on http://www.sendmail.org/virtual, sendmail reference on
  virtual hosting.

  It is worthwhile to add that linuxconf proposes a somewhat different
  scheme for virtual email with separate spool directories for all
  domains (that cleanly solves the above "name-conflict" issue"), but
  that requires a special virtual-aware POP/IMAP server (included with
  RH) and is somewhat more complicated. It is recommended for bigger
  email volume sites with many users within each domain.

  A few words about sendmail, it is a good idea (good from a security
  standpoint) to have sendmail run from inetd.conf and not as a
  standalone daemon. For that we need to add it to /etc/inetd.conf,
  remove it from /etc/rc.d/init.d, add the sendmail queue processing to
  cron. Here is what you have to do:

  1. Add the following line to /etc/inetd.conf:

     smtp  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/sendmail -bs



  2.  Edit /etc/rc.d/init.d/sendmail to have  exit 0  somewhere in the
     very beginning (might not be the best way, be sure to document the
     changes you do to these files) so that this file does nothing
     instead of starting sendmail

  3.  By editing your (root's) crontab (to edit do crontab -e) add a
     line like this



     */20 * * * * /usr/sbin/sendmail -q



  That would process sendmail queue every 20 min (if it exists).  The
  described steps will simplify sendmail access control and will let you
  regulate who can talk to you 25 port, not just who can send email
  through you.  The lines in /etc/hosts.allow that let all machines from
  .com and .org domains send you email are as follows

  sendmail: .com .org


  Please, note, that the daemon name, not protocol name is used here
  (sendmail, NOT smtp).

  That would allow your system to handle email for all those domains.


  4.10.  Configure POP3

  POP3 configuration is easy (no "virtualization" is required for this
  setup). RH comes equipped with imapd IMAP server. If you do not want
  to use IMAP functionality or do not like this particular
  implementation (buffer overflow bugs were discovered in it at some
  point) the good idea is to use qpopper, free POP3 daemon from Eudora
  http://www.eudora.com/freeware/qpop.html. At the time of writing they
  release the "stable" version (qpopper 2.53) and "public beta" (
  qpopper 3.0, release 34, now called "final beta").  It is important to
  note that versions earlier than 2.5 contain a buffer overflow error
  that allows remote root exploit to be executed. Same problem plagues
  "public betas" up to 3.0 release 21. Use either 2.53 or the latest 3.0
  beta (the former is better audited and the latter is better suited for
  RH - seamlessly works with PAM authentication). I suggest using 3.0,
  so the instructions below apply to that case.


  1. wget
     ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper3.0b34.tar.Z

     Retrieve the archive from Eudora site.

  2. tar zxvf qpopper3.0b34.tar.Z

     Uncompress and untar the contents.

  3. cd qpopper

     If you need explanation for this step, please, discontinue reading
     the document.

  4. ./configure --enable-specialauth --with-pam --enable-log-login
     --enable-shy

     The options here are:

     --enable-specialauth : allows MD5 and shadow passwords

     --with-pam: allows the use of RH Pluggable Authentication Modules
     (PAM) technology

     --enable-log-login: log successful logins, not only failures (not
     really that useful as it will use tcpd wrappers logging anyway)

     --enable-shy: conceal version number (yeah, a little pesky
     manifestation of "security through obscurity")
  5. make

     That compiles the popper

  6.

     /bon/cp popper/popper /usr/local/bin



  Now copy it to /usr/local/bin and set the mode to

  -rwx------   1 root     root       297008 Feb 16 15:41 /usr/local/lib/popper


  by using the command:

  chmod 700 /usr/local/bin/popper



  7. Add a line to /etc/inetd.conf

     pop3  stream tcp        nowait root /usr/sbin/tcpd /usr/local/bin/popper -s


  That would cause the tcpd wrapper to control access to popper.

  The lines to add in /etc/hosts.allow are

  popper: .good.com .nice.org


  That will allow people from domains good.com and nice.org to read
  email via POP3 client from your machine.

  To cause qpopper to use PAM authentication one must create a file for
  POP3 service in /etc/pam.d/ directory. File should be named "pop3"
  (same as line in /etc/services and qpopper compile-time option). The
  file looks like this:



       auth       required     /lib/security/pam_pwdb.so shadow
       account    required     /lib/security/pam_pwdb.so
       password   required     /lib/security/pam_cracklib.so
       password   required     /lib/security/pam_pwdb.so nullok use_authtok md5 shadow
       session    required     /lib/security/pam_pwdb.so



  8. For whatever reason stock RH lists line in /etc/services file for
     POP3 protocol as "pop-3". And since qpopper prefers to see "pop3",
     it should be edited to be:

     pop3            110/tcp         # pop3 service



  That would allow all user to get their email via any reasonable mail
  client.



  4.11.  Configure FTP server

  We will use only anonymous ftp and will not allow any non-anonymous
  user any access.  Here we describe the anonymous ftp server setup that
  allows anonymous uploads.  Any self-respecting guide on the subject
  will tell you that "this is a bad thing". But how is it worse than
  allowing users to ftp from untrusted location and transfer their
  passwords in clear text? Not everybody (especially, using Windows) can
  easily setup an ftp tunnel via ssh.

  I suggest using the stock RH wu-ftpd (version 2.6.0 at the time of
  writing). While it is rumored that there are "more secure" ftp daemons
  (Pro-FTP?), wu-ftp appears to be one most commonly used.

  RH installs the wu-ftpd (package wu-ftpd-2.6.0-1) by default in server
  configuration. You are encouraged to check for updates as running ftp
  is an important security concern. There is also a separate rpm package
  that creates a separate directory for anonymous ftp home
  (anonftp-2.8-1).  As anonymous ftp always does a chroot() system call
  (puts the user in the restricted file system) all necessary binaries
  and libraries are required. The typical directory looks like this
  (output of ls -lRa in /home/ftp):



  .:
  total 20
  d--x--x--x   2 root     root         4096 Feb 15 06:22 bin
  d--x--x--x   2 root     root         4096 Feb 15 06:22 etc
  drwxrws-wt   2 root     wheel        4096 Feb 18 19:51 incoming
  drwxr-xr-x   2 root     root         4096 Feb 15 06:22 lib
  drwxr-sr-x   3 root     ftp          4096 Feb 15 23:34 pub

  bin:
  total 344
  ---x--x--x   1 root     root        15204 Mar 21  1999 compress
  ---x--x--x   1 root     root        52388 Mar 21  1999 cpio
  ---x--x--x   1 root     root        50384 Mar 21  1999 gzip
  ---x--x--x   1 root     root        29308 Mar 21  1999 ls
  ----------   1 root     root        62660 Mar 21  1999 sh
  ---x--x--x   1 root     root       110668 Mar 21  1999 tar
  lrwxrwxrwx   1 root     root            4 Feb 15 06:22 zcat -> gzip

  etc:
  total 40
  -r--r--r--   1 root     root           53 Mar 21  1999 group
  -rw-r--r--   1 root     root        31940 Mar 21  1999 ld.so.cache
  -r--r--r--   1 root     root           79 Mar 21  1999 passwd

  incoming:
  total 0

  lib:
  total 1212
  -rwxr-xr-x   1 root     root        77968 Mar 21  1999 ld-2.1.1.so
  lrwxrwxrwx   1 root     root           11 Feb 15 06:22 ld-linux.so.2 -> ld-2.1.1.so
  -rwxr-xr-x   1 root     root      1031004 Mar 21  1999 libc-2.1.1.so
  lrwxrwxrwx   1 root     root           13 Feb 15 06:22 libc.so.6 -> libc-2.1.1.so
  -rwxr-xr-x   1 root     root        77196 Mar 21  1999 libnsl-2.1.1.so
  lrwxrwxrwx   1 root     root           15 Feb 15 06:22 libnsl.so.1 -> libnsl-2.1.1.so
  -rwxr-xr-x   1 root     root        33596 Mar 21  1999 libnss_files-2.1.1.so
  lrwxrwxrwx   1 root     root           21 Feb 15 06:22 libnss_files.so.2 -> libnss_fi
  les-2.1.1.so

  pub:
  total 0



  Notice though, that for whatever reason, RH puts a copy of /bin/sh in
  /home/ftp/bin.  I do not feel good about having it there, so it is
  chmoded to 0 by chmod 0 sh (can also be removed completely, but RPM
  might be slightly unhappy if you attempt to remove the package
  afterwards).

  Permissions on /home/ftp directories and files should be carefully
  considered. In the above example, all of the system files are owned by
  root and are only readable (executable where necessary) by all. Files
  in bin are only executable (as is the directory itself to prevent
  listing of its contents).

  The interesting part is permissions on pub and incoming.


  Below follows the configuration file for ftp daemon (/etc/ftpaccess).
  It is well commented to the degree of being self-explanatory:



  #ideas from <htmlurl url="ftp://ftp.wu-ftpd.org/pub/wu-ftpd/upload.configuration.HOWTO" name="ftp://ftp.wu-ftpd.org/pub/wu-ftpd/upload.configuration.HOWTO">
  #only allow anonymous users-no other classes defined
  class anonftp anonymous *

  #number of users restriction with message shown when too many
  limit   remote  10  Any                 /toomany.msg

  #prevent uploads everywhere (for now)
  upload /home/ftp * no

  #display the contents of some files upon login/cd
  readme  README*    login
  readme  README*    cwd=*
  message /welcome.msg            login
  message .message                cwd=*

  #log all file transfers DISABLED
  #log transfers anonymous

  #prevent these file operations for anon users
  delete          no      anonymous
  overwrite       no      anonymous

  #fast cd and aliasing for the same reason (not really necessary, but convenient)
  alias   inc:    /incoming
  cdpath  /incoming
  cdpath  /pub
  cdpath  /

  #what is allowed in paths
  path-filter  anonymous  /etc/pathmsg  ^[-A-Za-z0-9_\.]*$  ^\.  ^-

  #prevent the retrieval of some file
  noretrieve .notar

  #allow upload with NO subdirectory creation by anon users
  upload    /home/ftp    /incoming   yes root wheel 0400 nodirs

  #allow upload with subdirectory creation by anon users DISABLED
  #upload    /home/ftp    /incoming   yes root wheel 0400 dirs

  #prevent anon users to GET files from incoming (you might not like it, but it
  #is a good idea-to prevent some people from using you ftp server to store
  #their own stuff, pics, warez etc)
  noretrieve /home/ftp/incoming



  That would allow only anonymous users to do downloads and uploads in
  somewhat (!)  controlled manner.



  4.12.  Configure dialin

  Now the fun part starts. We want the machine to allow dial-in access
  via attached (inserted?) modem or modems. It will provide either
  regular shell or restricted shell (that only executes pppd daemon).
  Windows 95/98 users should be able to effortlessly dial in using all
  default settings of their computers.



  4.12.1.  Linux setup

  To handle login via serial line some version of getty program is
  needed. This program  monitors the serial line (/dev/ttyS1 will be
  used throughout the document, see serial HOWTO for details) and upon
  connection shown the login prompt or starts a program.

  I suggest using the mgetty program (as it has more features and is
  easier to setup than some of the competitors).

  RH comes with mgetty-1.1.21-2, that also has extensions to receive
  faxes and voice mail (if the modem supports this). Check whether
  mgetty is installed by doing: rpm -qa | grep mgetty.

  After installing mgetty some reconfiguration is necessary.  The files
  that should be changed and the details follow:


  1. /etc/inittab

     That enables mgetty to start when system is booted and be respawned
     accordingly.  These lines should be added in the end.



       #for dialins use mgetty
       #note this S1 in the beginning of the line and ttyS1 in the end
       S1:2345:respawn:/sbin/mgetty ttyS1



  2. /etc/ppp/options

     This file controls the pppd daemon whenever it is started.  Some of
     the options here are optional (hey, that why they are called
     options, right?).



       auth -chap +pap login modem crtscts debug proxyarp lock
       ms-dns 111.222.333.444



  Here is their brief meaning:


  o  auth : use some sort of authentication for dialin clients

  o  -chap: not CHAP

  o   +pap: use PAP

  o   login : use the  system  password file for authenticating the
     client using PAP and record the user in the system wtmp  file,
     /etc/ppp/pap-secrets should still be present (see below)

  o  modem : use the modem control lines (for carrier detection and
     other stuff)

  o   crtscts : use hardware flow control


  o  debug : log extra info (might be removed after everything is fine)

  o   proxyarp : this is needed to connect from the client to the
     Internet, not just to the LAN you dialed into

  o  lock: pppd should create a lock  file  for the serial device

  o  ms-dns 111.222.333.444: this info is provided to Windows box as a
     default DNS server

     Look at pppd man page for all the juicy details (parts of the above
     info is adapted from there)


  3. /etc/ppp/options.ttyS1

     This file serves purpose similar to the previous one, but only
     applies to particular modem line. It specifies the IP address given
     to the remote machine (dynamic, in some sense, if you have more
     than one line) and the local IP as well.



       111.222.333.444:111.222.333.888



  4. /etc/mgetty+sendfax/login.config


     This file is the main mgetty control file. Mgetty is Windows-PPP-
     aware, so it has provisions to start pppd automatically upon
     receiving connect from the Windows machine.

     These lines should be present:



       /AutoPPP/ -     -       /usr/sbin/pppd



  Before adding them, check that some other version of similar command
  is absent there (commented out by default).


  5. /etc/ppp/pap-secrets

     This is similar to /etc/password file, but only used for dialins
     and contains plain text passwords (apparently, only visible to
     root). All users that you want to be able to dialin must have their
     usernames and password listed in this file. They should enter the
     same username and password into Windows Dial Up Networking
     configuration.



       # Secrets for authentication using PAP
       # these two users below can use dialin
       # client        server  secret pword   remote IP addresses
       dialinuser1     *       b1ab1a!?         111.222.333.888
       dialinuser2     *       p8sSw0rD         111.222.333.888

  Check that mgetty is running by looking for similar line in the output
  of ps ax command.



        4625 ?        S      0:00 /sbin/mgetty ttyS1



  Now this machine will allow modem calls from any Windows 95/98 box.

  4.12.2.  Windows setup

  This is really straightforward.

  1. Click on My Computer

  2. Click on Dial Up networking

  3. Click on Make New Connection

  4. Proceed according to directions, enter the phone number etc

  5. After a new connection is created click on it and enter the
     username and password (same as mentioned in /etc/passwd and
     /etc/ppp/pap-secrets)

  6. Click Connect and it should work (it did in my case ;-) )


  4.13.  Open access


  Now, after testing all the services, we are ready to open the access
  to this machine. The main access control facility in our case is TCP
  wrappers (tcpd). Their behavior is controlled by 2 files
  /etc/hosts.allow and /etc/hosts.deny, as was mentioned in the sections
  devoted to various network services. TCP wrappers configuration can be
  done in 2 distinct ways and we will employ the simplest.

  Let our /etc/hosts.deny contain ALL:ALL clause, thus denying the
  access to all services (started from /etc/inetd.conf ) for all hosts
  and all users on them. Now we can allow what we need explicitly in
  /etc/hosts.allow, thus following the philosophy "what is not expressly
  allowed is denied".

  Lets assume we want to allow people to read and send email, we want
  some trusted hosts to update contents of the web pages and we want
  admin workstation to have full access. So we arrive at the following
  /etc/hosts.allow:


       #
       # hosts.allow   This file describes the names of the hosts which are
       #               allowed to use the local INET services, as decided
       #               by the '/usr/sbin/tcpd' server.
       #
       ALL: 127.0.0.1 adminbox.some.net
       #we rely on anti-relaying features of sendmail 8.9.x to fight spam
       #and also restrict some sites that we don't want to see email from
       sendmail: ALL EXCEPT .kr
       popper: .com .edu .gov .mil
       #these people can upload/download stuff
       in.ftpd: .this.net .that.net

  5.  Conclusion

  There must be the conclusion, right?


  6.  References

  Useful LDP HOWTOs (well, actually, all others are useful too)

  1. Setting Up Your New Domain Mini-HOWTO., really good guide of DNS
     setup and general network setup (recommended reading)

  2. Linux WWW HOWTO, provides more details on Apache setup, including
     virtual hosting

  3. Red Hat Linux 6.X as an Internet Gateway for a Home Network, some
     hints on network setup

  4. IP Aliasing On A Linux Machine, used for multiple IP on the same
     interface

  5. Ethernet HOWTO, look here in case of network card trouble

  6. IPCHAINS HOWTO, turn to this if more security is desired

  7. Serial HOWTO, serial ports, lines, modems and related stuff

  8. PPP HOWTO,some notes on PPP server setup

  Software (used or mentioned) websites


  1. Eudora POP3 server

  2. WU-FPTD ftp server

  3. Sendmail MTA

  4. Mgetty pages

  5. Apache httpd server

  Other documents

  1. Armoring Linux

  2. Setting Up POP/PPP server

  3. Mgetty and Windows dialin info

  4. Using RedHat 5.1 to Start an ISP, the short article on how to start
     an ISP if all you have is a Linux RH ;-)

  Resources, not related to the topic of the document ;-)


  1. I also maintain a list of computer/network security related books
     with (where available) reviews and online availability. It is
     posted at http://www.chuvakin.org/books.  If you have a book that I
     don't list please use the form on the page and I will add it to the
     list and maybe review it later.




Ingres II HOWTO

Pal Domokos

   pal.domokos@usa.net
   
   Copyright  1999, 2000 by Pal Domokos
   
   V1.1, 20 June, 2000
   Revision History
   Revision V1.1 20 June, 2000 Revised by: pd
   Extended with material on the full version of Ingres II 2.0
   Revision V1.01 23 December, 1999 Revised by: pd
   Minor fixes
   Revision V1.0 7 November, 1999 Revised by: pd
   Original version
   
   This document helps install the Ingres II Relational Database
   Management System on Linux. It covers the setup of both the free
   Software Development Kit and the full version of Ingres. Further
   sections try to make it easier to start working with Ingres.
     _________________________________________________________________
   
   Table of Contents
   1. [1]Introduction
          
        1.1. [2]Copyright
        1.2. [3]Disclaimer
        1.3. [4]New Versions of the HOWTO
        1.4. [5]Credits
        1.5. [6]Audience
                
   2. [7]Ingres
          
        2.1. [8]University Ingres and Commercial Ingres
        2.2. [9]The Software Development Kit
        2.3. [10]The Beta Version
        2.4. [11]The Ingres II Full Edition
        2.5. [12]The Unicenter TNG Framework
                
   3. [13]System Requirements
          
        3.1. [14]Hardware
        3.2. [15]Software
        3.3. [16]Kernel Parameters
        3.4. [17]The ingres User and II_SYSTEM
                
   4. [18]Preparing for the Installation
          
        4.1. [19]Ingres Environment Variables
        4.2. [20]II_LOG_FILE and II_DUAL_LOG
        4.3. [21]Database Locations
        4.4. [22]The iidbdb Database
        4.5. [23]II_DATABASE
        4.6. [24]II_CHECKPOINT
        4.7. [25]II_DUMP
        4.8. [26]II_JOURNAL
        4.9. [27]II_WORK
        4.10. [28]Other Ingres Environment Variables
                
   5. [29]The Installation Process
          
        5.1. [30]Starting the Installation Program
        5.2. [31]Express Install
        5.3. [32]Manual Install
        5.4. [33]Completing the Initial Configuration
        5.5. [34]Re-installation
        5.6. [35]Command Line Install (SDK)
        5.7. [36]Client Installation (Full Version)
        5.8. [37]The Installer's Log
        5.9. [38]Checking the Installation
                
   6. [39]Basic System and Database Administration
          
        6.1. [40]Starting and Stopping Ingres
        6.2. [41]New Ingres Users and Locations
        6.3. [42]Creating and Destroying Databases
        6.4. [43]Collation Sequences
        6.5. [44]Backup and Recovery
        6.6. [45]Configuring Ingres
        6.7. [46]Monitoring Ingres
        6.8. [47]Message Files
                
   7. [48]Ingres/Net
          
        7.1. [49]User Authentication
        7.2. [50]Login Account Passwords
        7.3. [51]Installation Passwords
        7.4. [52]ingvalidpw
        7.5. [53]Setting up the Client
        7.6. [54]Setting up the Server
        7.7. [55]Using Net
                
   8. [56]ICE (Internet Commerce Enabled)
          
        8.1. [57]Configuring Apache
        8.2. [58]ICE Setup
                
   9. [59]Miscellaneous Topics
          
        9.1. [60]Automatic Startup and Shutdown
        9.2. [61]ingmenu
        9.3. [62]Circumventing Ingres Net
        9.4. [63]Forms-Based Development Tools
        9.5. [64]Ingperl and Perl DBI
        9.6. [65]Ingres links
                
1. Introduction

1.1. Copyright

   Copyright  1999, 2000 by Pal Domokos.
   
   Please freely copy and distribute (sell or give away) this document in
   any format. It is requested that corrections and/or comments be
   forwarded to the document maintainer. You may create a derivative work
   and distribute it provided that you:
   
    1. Send your derivative work (in the most suitable format such as
       SGML) to the LDP ([66]Linux Documentation Project) or the like for
       posting on the Internet. If not the LDP, then let the LDP know
       where it is available.
    2. License the derivative work with this same license or use GPL.
       Include a copyright notice and at least a pointer to the license
       used.
    3. Give due credit to previous authors and major contributors. If you
       are considering making a derived work other than a translation, it
       is requested that you discuss your plans with the current
       maintainer.
     _________________________________________________________________
   
1.2. Disclaimer

   To put it briefly: there is no warranty about the validity of any
   other statement in this document. Read and use at your own risk.
   
   Furthermore, I am not an employee of Computer Associates International
   and I have no official links with CA. This HOWTO is not official
   documentation.
   
   All copyrights are held by their respective owners. Use of a term in
   this document should not be regarded as affecting the validity of any
   trademark or service mark.
     _________________________________________________________________
   
1.3. New Versions of the HOWTO

   The latest version of this HOWTO can always be found on the [67]Linux
   Documentation Project's site, in various formats:
   
     * [68]HTML - multiple pages
     * [69]HTML - multiple pages: tarred and gzipped
     * [70]HTML - single page
     * [71]PDF
     * [72]PostScript - gzipped
     * [73]Text
     * [74]SGML (DocBook) source - gzipped
       
   The LDP has many mirrors around the world, as listed on
   [75]http://www.linuxdoc.org/mirrors.html. Some of these mirrors may be
   out of date, though. Therefore I suggest you check [76]LDP's primary
   site for new versions.
   
   HOWTOs are also bundled with most Linux distributions. If you are
   reading this HOWTO from your Linux CD, also take a look at [77]LDP's
   main site to check if a newer version exists.
     _________________________________________________________________
   
1.4. Credits

   I would like to thank for all the feedback I have received so far. I
   found especially valuable the contributions of Jorgen Heesche (on
   forms-based development tools), and Gerhard Hofmann (on the automatic
   startup and shutdown of Ingres).
   
   Last, but not least, my thanks go to CA for making it possible for me
   to examine the Ingres II 2.0 Enterprise Edition for Linux.
   
   Naturally, I continue to welcome any comments, criticisms and
   suggestions. Just email me at <[78]pal.domokos@usa.net>.
     _________________________________________________________________
   
1.5. Audience

   This HOWTO aims to help install Ingres II on (Intel) Linux. As always,
   help is useful for those who need it and can utilize it as well.
   
   Therefore:
   
     * If you are an Ingres pro familiar with Linux then you do not
       really need to read this HOWTO. Skim through it though if you have
       time.
     * If you have no previous background in relational database
       management (experience with at least one real RDBMS, not some
       dBase-like file management system), you do not know UNIX and have
       just started using Linux, this HOWTO will not make an easy reading
       for you. Even then, I do not want to persuade you not to try to
       install and use Ingres. Do not give up easy!
       
   If you are not a novice in database management and have some working
   knowledge of Linux, this HOWTO is for you! We are not going to discuss
   the basics of relational database management or SQL in this document,
   neither are we going to elaborate on how to edit text files on Linux.
   You can find as much information on these topics as you want in
   numerous places. This HOWTO is not an Ingres guide, either: the Ingres
   manuals serve that purpose.
   
   The objective of this HOWTO is that the reader can prepare for, then
   implement the installation of Ingres II on Linux, through simple and
   understandable steps. It also gives starting points for basic Ingres
   system and database administration.
   
   I can only hope that the HOWTO reaches its goal.
     _________________________________________________________________
   
2. Ingres

   In this section the Ingres II Relational Database Management System is
   introduced and you come to know how to get it.
     _________________________________________________________________
   
2.1. University Ingres and Commercial Ingres

   Let us start with an important fact: there are two different types of
   Ingres. The original one, which was designed and developed in the
   seventies by a research group led by Michael Stonebraker at the
   University of California, Berkeley, was the first open source
   relational database management system: it was free to use and
   distribute, source code included. In fact, it is still free software,
   although its development stopped in 1989. Its last version (version
   8.9) made it into some Linux distributions as well. If you are
   interested in it, you can download it from, say, the SuSE site. The
   packages are:
   
     * [79]The main software
     * [80]The tools
       
   In 1979, with the foundation of Relational Technology, the career of
   Commercial Ingres started. Since 1995 it has been distributed by
   Computer Associates. Its latest version is Ingres II 2.0. This HOWTO
   deals with the installation of this type of Ingres.
     _________________________________________________________________
   
2.2. The Software Development Kit

   Ingres, being commercial software, is not free to use. However, CA,
   like most RDBMS vendors, offers a free version of it (the Software
   Development Kit) to everyone who is interested in learning Ingres. The
   SDK has two variants, one for Windows NT and one for Linux. These
   variants are not quite the same as far as the included components are
   concerned. Obviously, we are engaged in installing the SDK for Linux
   here. This contains the following elements:
   
     * Intelligent DBMS: the database engine.
     * Internet Commerce Enabled (ICE): Ingres' propriatery CGI solution
       to connect a database to the Web.
     * Enhanced Security: the tool supporting mandatory access control.
     * C2 Security Auditing: the possibility of C2 level auditing.
     * Terminal Monitors: forms-based and command line SQL interfaces.
     * Querying and Reporting Tools: forms-based querying, report-writing
       and report-running tools plus a forms editor.
     * Querying and Reporting Runtime: like the previous one, but without
       the forms editor.
     * Vision Pro: integrated, forms-based development environment with a
       code generator.
     * Embedded SQL Precompilers: precompilers for embedding SQL
       statements in 3GL applications. Supported languages are: C, C++,
       COBOL, and Fortran.
       
   You can order a free copy of the Ingres SDK CD on
   [81]http://www.cai.com/registration/cd_ingres.htm.
   
   Remember that you are not allowed to use the SDK in a business
   environment. It is for evaluating Ingres and prototyping applications
   only.
   
   The SDK CD contains both the Windows NT and the Linux versions of the
   Software Development Kit. You can find the Linux files in the
   following directories:
   
     * /doc: the manuals in PDF format, together with the Linux version
       of Acrobat Reader (linux-ar-40.tar.gz). The installer will not
       copy the documentation to hard disk. These manuals are also
       available on
       [82]http://www.cai.com/products/ingres/documentation_set.htm. I
       will reference some of them later in this document.
     * /int_lnx: this directory contains ingres.tar, the tarball to be
       installed. ingres.tar can be installed directly from the CD or you
       can copy it to hard disk first.
       
   Do not forget to read the Readme file in the root directory on the CD.
     _________________________________________________________________
   
2.3. The Beta Version

   The freshest beta version of the SDK can always be downloaded from
   [83]http://www.cai.com/products/betas/ingres_linux/ingres_linux.htm.
   
     Note: At the time of writing, the version of the downloadable beta
     is 2.5. The next revision of the HOWTO will cover the installation
     of this version, too. The 2.0 beta is still available on
     [84]ftp://ftp.cai.com/pub/marketing/ingres/ingresII9808libc6.tar.
     _________________________________________________________________
   
2.4. The Ingres II Full Edition

   In February 2000 Computer Associates announced the general
   availability of Ingres II 2.0 for Linux. Besides the components found
   in the SDK, the full edition contains more modules, such as:
   
     * Net: this component makes possible for Ingres utilities and user
       applications to access databases residing on different
       installations.
     * Replicator: support for replication functions.
     * Star: for handling distributed databases.
     * Enterprise Access: communication with different database
       management systems and other, non-relational data sources (used to
       be called Gateways).
     * Protocol Bridge: for communicating with clients on different types
       of networks.
     * Spatial Object Library: for handling two-dimensional spatial
       objects.
       
   The CD, besides the /doc and /int_lnx directories that are common with
   the SDK, contains install.sh, the general Ingres installer and its
   files. More on install.sh later, in subsection [85]Starting the
   Installation Program.
     _________________________________________________________________
   
2.5. The Unicenter TNG Framework

   At last, let me note that the Linux version of CA's Unicenter TNG
   Framework also includes Ingres as its embedded database management
   system. For this reason, knowing Ingres may come in handy when using
   Unicenter, too. You can order a free Unicenter TNG Framework CD on
   
     * [86]http://www.cai.com/registration/tng_framework_linux/index.htm
       for RedHat, or
     * [87]http://www.cai.com/registration/tng_framework_linux/suse_linux
       .htm for SuSE.
     _________________________________________________________________
   
3. System Requirements

   In this section you will see what hardware and software requirements
   must be met before you can install Ingres. The ingres user, owner of
   the installation, makes a debut, too.
     _________________________________________________________________
   
3.1. Hardware

   The minimal hardware capable of running Ingres is:
   
     * 486x33 processor, Pentium recommended.
     * 16 Mb RAM, with 32 Mb swap space (64 Mb RAM recommended).
     * 200 Mb disk space if you install everything (150 Mb will do for
       the SDK). You do not need to have this space in one file system:
       we will discuss the possibilities in the section [88]Preparing for
       the Installation.
       
     Note: This is the minimum recommended configuration. Ingres, like
     most other RDBMSs, is a fairly resource-hungry application. While
     your development system will probably run beatifully on a 166 MHz
     Pentium with 64 Mb RAM, a live system with potentially many
     concurrent users would require more iron.
     _________________________________________________________________
   
3.2. Software

   The following software must be present for Ingres to run:
   
     * kernel 2.0.34 or higher.
     * libcrypt.so - this library is not included in every Linux
       distribution. If this is the case with your system, check your
       distribution's Web site: they must have it somewhere.
     * uncompress - certain Linux distributions (such as Caldera's Open
       Linux 2.2) do not contain the ncompress package. Again, check your
       distribution's Web site if you do not have it.
       
   Working glibc versions:
   
   glibc SDK Full Version
   glibc 2.07 (eg RedHat 5.2) Yes. No.
   glibc 2.1 (eg RedHat 6.0) Yes but you need the RedHat compatibility
   packages and an Ingres patch to be able to use the forms-based
   development tools. See [89]Forms-Based Development Tools for details.
   Yes.
   glibc 2.1.1, 2.1.2 (eg RedHat 6.1) No. Yes.
   glibc 2.1.3 (eg RedHat 6.2) See glibc 2.1. Yes.
   
   If you are unsure of the version of your glibc, check the /lib
   directory:
# ls -l /lib/libc*so
        
   The output should be something like:
-rwxr-xr-x  ...  /lib/libc-2.1.3.so
        
   The version of my glibc is apparently 2.1.3.
   
     Note: There is no guarantee that if your system meets the above
     requirements you will be able to install Ingres on it. Sticking to
     a distribution that is explicitly mentioned in the release notes of
     your Ingres version is the best way to avoid installation problems.
     _________________________________________________________________
   
3.3. Kernel Parameters

   The default settings of the Linux kernel are adequate for a
   development Ingres environment. For a live system, however, probably
   to increase the size of the database cache(s), you may want to change
   the built-in value of the SHMMAX parameter. This parameter sets the
   maximum size of a shared memory segment. By default, it is 32 Mb which
   allows for a somewhat lesser buffer cache.
   
   You have two choices to change the value of SHMMAX:
   
   As root, simply echo the new value into /proc/sys/kernel/shmmax:
#echo 83886080 > /proc/sys/kernel/shmmax
        
   In the example above, we set the value of SHMMAX to 80 Mb. The change
   takes effect immediately but after a reboot, the original value is
   restored.
   
   The other possibility is to change SHMMAX's default value in the
   kernel source (the relevant header file is
   /usr/src/linux/include/asm/shmparam.h if you have installed the
   source). In this case, you may also have to modify other parameters in
   the file, then rebuild the kernel. I suggest you do it only if you
   know what you are doing. For information on how to configure and
   compile the kernel see [90]The Linux Kernel HOWTO by Brian Ward.
     _________________________________________________________________
   
3.4. The ingres User and II_SYSTEM

   We need an account called ingres to install and run Ingres. He will
   own the installed software and only he can perform system management
   tasks such as starting and stopping Ingres.
   
   The ingres user may belong to any group. In the following example, we
   will create a separate group for him.
   
   The verified (therefore, recommended) shell for the ingres user is
   bash. All examples in this paper apply to this shell. If you use some
   other shell (which is probably just as fine), take into account the
   differences in syntax.
   
   The binaries, shared libraries, configuration files and other files
   which make up the Ingres software, will be located in a tree structure
   after installation. You will set the root of this tree via the shell
   variable II_SYSTEM in the environment of the ingres user (to be exact,
   the root directory will be $II_SYSTEM/ingres).
   
   If you plan to install the whole software, either the SDK, or the full
   version, make sure you have the following free space under
   $II_SYSTEM/ingres:
   
   SDK Full Version
   70 Mb 90 Mb
   
   10 Mb extra free space is needed during installation.
   
     Tip: If this is the first time you install Ingres (I hope you start
     with the SDK, not a live system), I suggest you keep the whole
     installation (the Ingres software, databases, backups, sort areas,
     etc.) in one place so that you can find every component easily. If
     you have at least 150-200 Mb free space under $II_SYSTEM/ingres and
     you do not plan to create large databases (at least, not for some
     time), your system will work without problems. Should you at any
     later time run out of space, you will always have the possibility
     to relocate some of your databases to other partitions.
     
   In the following, I will assume that II_SYSTEM is set to /opt.
   
   Logging in as root, execute the tasks mentioned above:
# useradd -d /opt/ingres -s /bin/bash ingres
# chmod 755 /opt/ingres
# passwd ingres
        
   The useradd command creates a group with the same name as the new user
   if you do not specify the group on the command line. It also creates
   the user's home directory.
   
   We set the home directory of ingres to /opt/ingres
   ($II_SYSTEM/ingres). This is not mandatory but convenient.
   
   Finally, append the following lines to the .bashrc file of ingres:
umask 022
export II_SYSTEM=/opt
export PATH=$II_SYSTEM/ingres/bin:$II_SYSTEM/ingres/utility:$PATH
export LD_LIBRARY_PATH=/lib:/usr/lib:$II_SYSTEM/ingres/lib
export ING_EDIT=/bin/vi
if [ -n "$DISPLAY" ]
then
        export TERM_INGRES=vt100fx
else
        export TERM_INGRES=vt100f
fi
        
   ING_EDIT sets the editor that can be called from Ingres utilities or
   application programs. Naturally, you can use any editor, not just vi.
   You must, however, specify the whole access path to the program. (If
   you stick to vi, check if it is under /bin: it may be somewhere else
   in your system.)
   
     Note: If the EDITOR shell variable is set, it overrides the value
     of ING_EDIT.
     
   Setting TERM_INGRES is necessary for the terminal to work properly.
   Forms-based Ingres utilities, such as the installer itself, and also
   applications created with traditional Ingres development tools (ABF,
   Vision) make heavy use of function keys. The .bashrc above sets
   TERM_INGRES according to the terminal type (X, or VT100-like).
   
   These settings must be included in the .bashrc file of every Ingres
   user.
     _________________________________________________________________
   
4. Preparing for the Installation

   This is the longest section and so it should be: after careful
   planning the installation itself should be an easy task.
     _________________________________________________________________
   
4.1. Ingres Environment Variables

   You will use Ingres environment variables to determine where to put
   further elements (besides the software itself) of the Ingres
   installation. These variables, unlike II_SYSTEM, are not shell
   variables but rather parameters of Ingres stored in a file. Some of
   them can be changed at any time after the installation, but altering
   the value of others requires a whole re-install. Later you will see
   which of them are of this "stable" nature.
   
   During installation, you can choose between setting these variables
   manually or letting the installer set them to their default values
   (Express Install option).
   
   In the following, we will take the relevant Ingres environment
   variables one by one and see what each of them is good for. It may
   help if you put their planned values on paper. You can find an
   Installation Worksheet in the Getting Started Guide which you can
   print out and use for this purpose.
     _________________________________________________________________
   
4.2. II_LOG_FILE and II_DUAL_LOG

   Ingres uses an installation-wide transaction log file to record
   information on all changes made to any database. This information
   broadly consists of:
   
     * Before images of updated or deleted rows. These are necessary for
       rolling back uncommitted transactions, should it be required
       (undo).
     * The changes made to database objects. Recording them makes it
       possible to redo committed transactions after a system crash if
       the new data had not been written to the database prior the crash.
       
   The transaction log resides in the II_LOG_FILE/ingres/log directory,
   where II_LOG_FILE is an Ingres environment variable. The name of the
   log file is ingres_log.
   
   Express Install creates a log file of the minimum possible size, 16
   Mb. Such a log file may not be large enough even in a development
   system. If you have free disk space and choose manual install (in
   which case you can specify the size of the log), set it to something
   much larger.
   
   Both the location and the size of the log file can be changed at any
   time after installation. The method of doing this is described in the
   System Reference Guide.
   
   You also have to decide if you want dual logging (mirroring the
   transaction log). If the log gets corrupted for any reason, Ingres
   stops and you have to recover your databases from backup. Therefore,
   in a live system, it is almost compulsory either to have some type of
   RAID protection of the log or to have it mirrored by Ingres. If you
   use dual logging, the copy of the log file can be found under
   II_DUAL_LOG/ingres/log. Its name is dual_log.
   
   In a development or test environment, mirroring the log is not always
   necessary.
     _________________________________________________________________
   
4.3. Database Locations

   There can be any number of databases in an Ingres installation. A
   database, on the other hand, consists of files of different types.
   These are:
   
     * Control file: it stores certain basic information about the
       database. You can see this information with the infodb command
       after you have completed the installation.
     * Data files: every system table, user table, and also every index
       goes in a separate file.
     * Checkpoint files: checkpoint is the term Ingres uses for a
       database backup. A backup can consist of more than file.
     * Dump files: online backups are possible in Ingres, that is, the
       database may be in use while the backup program is running. For
       this reason, the database may change while it is being
       checkpointed. Ingres, so that it can restore the database to the
       state it was in at the beginning of the backup, saves the before
       images of those data blocks (pages) that have changed during the
       backup process. These pages are saved in the dump files.
     * Journal files: from time to time, Ingres writes the records of
       committed transactions from the log file to journal files (at
       least, this is the default behavior: journalling may be set off at
       the database or table level). The frequency of the journalling
       activity is a tunable function of the amount of information that
       is written to the transaction log. Journalling protects the
       installation against media failures: if the disk containing the
       database crashes, you can restore the last (just before the
       failure occurred) committed state of the database using a backup
       (checkpoint) of the database and the journals created after that
       checkpoint was taken. If you lose the log disk, you can restore
       the last committed state the database was in at the time the last
       journal file was written.
     * Work files: Ingres, if it needs to sort large volumes of data,
       creates temporary files on disk.
       
   The files constituting a database reside in different directories,
   according to their types. These directories are specified indirectly,
   by means of Ingres locations.
   
   There are five location types:
   
     * Data location: place for data files of a database. A database can
       have more than one data location (adding data locations to a
       database is called extending the database). However, every
       database has a primary data location. The system tables and the
       control file always reside in the primary location. When creating
       a table, if you do not specify the location(s) to put it in, it
       will be placed in the primary data location of the database.
     * Checkpoint location: by default, backups are created here. Not
       necessarily, however: the ckpdb command allows you to specify an
       arbitrary place for the backup, this way you can checkpoint a
       database directly to tape as well.
     * Dump location: for dump files.
     * Journal location: this is where the journal files for a database
       reside.
     * Work location: Ingres creates temporary sort files in this
       location. Just like with data locations, a database may have more
       than one work location. If this is the case, Ingres, by default,
       uses all of them for each sort operation.
       
   Let us see how these locations work in practice. Say we have a
   database, called test, with the following locations:
   
     * DATALOC1: data location --> /opt
     * CKPLOC: checkpoint location --> /opt
     * DMPLOC: dump location --> /opt
     * JRNLLOC: journal location --> /opt
     * WORKLOC1: work location --> /opt
       
   Every location of the test database points to the /opt directory.
   Elements of the database go in these directories:
   
     * data files: /opt/ingres/data/default/test
     * checkpoint files: /opt/ingres/ckp/default/test
     * dump files: /opt/ingres/dmp/default/test
     * journal files: /opt/ingres/jnl/default/test
     * temporary files: /opt/ingres/work/default/test
       
   Let us suppose now, that we extend the database to the following
   locations:
   
     * DATALOC2: data location --> /opt
     * DATALOC3: data location --> /disk2
     * WORKLOC2: work location --> /disk2
       
   The database is effectively extended to the following directories:
   
     * data files: /disk2/ingres/data/default/test
     * temporary files: /disk2/ingres/work/default/test
       
   DATALOC2 points to /opt, just like DATALOC1. Tables to be created in
   location DATALOC2 will go to /opt/ingres/data/default/test, the same
   directory where tables created in location DATALOC1 reside.
   
   As is apparent from the example, we could have created just one
   location for DATALOC1, DATALOC2, CKPLOC, DMPLOC, JRNLLOC, and
   WORKLOC1.
   
   Summarizing the main points about locations:
   
     * Every location points to the root of a directory tree.
     * More than one location can point to the same directory.
     * A location can be used for storing different types of files.
     * Databases can share locations. You can see from the example why
       this is true: the name of the database becomes part of the
       directory tree, hence files of different databases never mix.
     _________________________________________________________________
   
4.4. The iidbdb Database

   Every Ingres installation has a master database called iidbdb. Ingres
   stores information about users, locations and user databases in this
   database. iidbdb is created by the installer.
   
   You have to set the locations for iidbdb during installation. These
   locations are stored in the following Ingres environment variables:
   
     * II_DATABASE: data location
     * II_CHECKPOINT: checkpoint location
     * II_DUMP: dump location
     * II_JOURNAL: journal location
     * II_WORK: work location
       
   These variables determine the default locations for every user
   database as well, if you do not override them when creating those
   databases. See [91]Creating and Destroying Databases for more
   information.
   
   Warning
   
   Changing the value of II_DATABASE, II_CHECKPOINT, II_DUMP, II_JOURNAL,
   or II_WORK requires a complete re-install of Ingres.
   
   Let us see these variables one by one.
     _________________________________________________________________
   
4.5. II_DATABASE

   II_DATABASE determines the data location of iidbdb. Its default value
   is $II_SYSTEM (in case of a manual install you can enter a different
   value for II_DATABASE, while Express Install inevitably sets it to
   $II_SYSTEM).
   
   The size of iidbdb after the installation is somewhat more than 5 Mb.
   It can only grow significantly if you create hundreds of Ingres users,
   databases or locations.
     _________________________________________________________________
   
4.6. II_CHECKPOINT

   II_CHECKPOINT contains the value for the checkpoint location of
   iidbdb. By default, it is also set to $II_SYSTEM.
   
   The size of a checkpoint is just about the same as that of the
   database itself (at least until you modify the template file of the
   checkpoint program: it is possible, as you will see in [92]Backup and
   Recovery). The installer takes the first checkpoint of iidbdb.
   
   If you plan to place checkpoints of user databases under II_CHECKPOINT
   then you have to provide for more space here.
   
   A further factor that must be taken into account is how long you want
   to keep backups. When starting the checkpoint program, you can request
   the deletion of older backups if you do not have too much free space.
     _________________________________________________________________
   
4.7. II_DUMP

   II_DUMP determines the dump location of the iidbdb database. By
   default, its value equals to that of II_CHECKPOINT.
   
   By the end of the installation process, II_DUMP will contain a very
   small amount of data. If you always create checkpoints off-line then
   you will not need much space here.
     _________________________________________________________________
   
4.8. II_JOURNAL

   II_JOURNAL contains the value for the journal location of the iidbdb
   database. Its default value is the same as II_CHECKPOINT's.
   
   The first checkpoint, taken by the installer causes the first, small
   journal file to appear here. If you do not use different journal
   locations for user databases then the necessary amount of free space
   under II_JOURNAL depends on three factors:
   
     * Whether you want Ingres to journal at all. If you take checkpoints
       of your databases regularly and do not mind losing the changes you
       have made to them since the latest checkpoint, you may switch off
       journalling. Naturally, running a live system without journalling
       is usually not acceptable.
     * If journalling is switched on, then the growth rate of the journal
       area is determined by the volume of changes made to the databases.
       Frequent, large updates require quite a bit of space under
       II_JOURNAL.
     * The third factor is, how long you wish to keep old journal files.
       If, when taking a checkpoint, you instruct ckpdb to delete the old
       checkpoints, then previous journal files will be removed as well.
     _________________________________________________________________
   
4.9. II_WORK

   II_WORK determines the work location of the iidbdb database. It also
   defaults to II_CHECKPOINT.
   
   The problem of sizing the work location only arises if II_WORK serves
   as a work location for user databases as well. It is next to
   impossible to estimate the temporary disk space that will be needed
   here; however, having the size of the largest table multiplied by
   three should work as a starting point.
   
   Remember that a database can have more than one work location. If the
   original location turns out too small, you can always extend the
   database to further work locations.
     _________________________________________________________________
   
4.10. Other Ingres Environment Variables

   Besides the Ingres environment variables that determine locations
   there are a couple more that you have to set during installation (or
   have Express Install set them to their default value). These are:
   
     * II_INSTALLATION: a two-character code, identifying the
       installation. Every Ingres installation on a machine must have its
       own, unique, installation code. The default value for
       II_INSTALLATION is II. Once set, it cannot be changed.
     * II_NUM_OF_PROCESSORS: number of processors in the machine. By
       default, it is 1. If you set it to a higher value, Ingres will use
       spin-locks when accessing the database cache. If you do not know
       what spin-locks are, do not bother. The point is to set
       II_NUM_OF_PROCESSORS to 2 if you have a multiprocessor machine.
       Its value can be changed at any time later.
     * II_CHARSET: this variable determines the code set of all character
       data stored in all databases you will create in the installation.
       Its default value is ISO88591. Perhaps it is not surprising that
       changing it to a different value after installation may corrupt
       data stored in your existing databases. Since the iidbdb database
       is created by the installer program, you should not choose Express
       Install if ISO88591 does not suit you.
     * II_TIMEZONE_NAME: name of the time zone, by default NA-PACIFIC.
       During manual install you can select its value from a list of
       valid codes. Ingres stores all date and time values in GMT and
       adjusts them according to II_TIMEZONE_NAME when communicating with
       the client. Therefore, if you set II_TIMEZONE_NAME to a different
       value, you will see all date-time values in the databases change.
       For this reason, set this variable to its final value before
       creating the first user database.
       
   The (manual) installer prompts you for the value of two further
   parameters which are not Ingres environment variables:
   
     * Expected number of concurrent users in the system: this is 32 by
       default. Based on this number, the installer sets the value of a
       number of other parameters, such as the size of the database
       cache. These derived parameters can later be adjusted.
     * SQL-92 compatible databases: by default, Ingres databases differ
       from the SQL-92 standard in some ways. For example, object names
       not protected by single or double quotes are converted to lower
       case rather than upper case. You can find the other differences in
       the SQL Reference Guide.
       
   After you have made up your mind on the values of all installation
   parameters, you know whether the default values for those variables
   that cannot be changed after installation are acceptable to you. If
   they are, you can choose Express Install.
     _________________________________________________________________
   
5. The Installation Process

   In this section, the actual installation of Ingres takes place.
     _________________________________________________________________
   
5.1. Starting the Installation Program

   In the following I will presume that you install directly from the CD
   which is mounted under /cdrom. Depending on whether you install the
   SDK or the full version of Ingres, you have to start the installation
   differently.
   
   For the SDK:
   
    1. Log in as ingres.
    2. cd to $II_SYSTEM/ingres if it is not your home directory.
    3. Unpack the install subdirectory from the tar file.
    4. Start the ingbuild program.
       
$ cd $II_SYSTEM/ingres
$ tar xf /cdrom/int_lnx/ingres.tar install
$ install/ingbuild
        
   For the full version:
   
    1. Log in as root.
    2. Start the installer.
       
# /cdrom/install.sh
        
   In this latter case, you have to let the installer know the owner of
   the installation (ingres), and the value of II_SYSTEM. After that,
   install.sh starts ingbuild for you.
   
   From this point on, the installation process is the same for both
   options.
   
   On the starting screen of ingbuild you have to specify the path to the
   tar file and select the type of install: Custom or Package. I suggest
   you go for Custom Install to be able to choose exactly those elements
   you want to install.
   
   After choosing Custom Install, a table on the next screen shows all
   components of your Ingres version together with their respective
   sizes. Because of common parts in different components, the sizes
   added up indicate much more disk space than is really needed for the
   installation.
   
   By default every component is set to be installed. If you want to
   exclude some of them, write "No" in their "Install?" field.
   
   You had previously decided if the default values for the "stable"
   Ingres environment variables were acceptable for your installation. If
   this is the case, you can choose Express Install here. Remember that
   you can alter the value of II_LOG_FILE as well as the size of the
   transaction log at any time later.
   
     Tip: If this is your first Ingres install, you have the necessary
     space under $II_SYSTEM/ingres and the "stable" parameters' default
     values are OK, I suggest you choose Express Install.
     
   Therefore, let us see this option first.
     _________________________________________________________________
   
5.2. Express Install

   In the case of Express Install, the installer executes the following
   tasks:
   
     * It untars all chosen components from the ingres.tar file to the
       $II_SYSTEM/ingres/install/tmp directory.
     * Checks the integrity of the components.
     * Puts the components in appropriate subdirectories under
       $II_SYSTEM/ingres.
     * Sets the Ingres environment variables to their default values.
     * Starts Ingres.
     * Creates the iidbdb database.
     * Takes a checkpoint of iidbdb.
     * Stops Ingres.
     * Sets up those components that require this (ABF, Enhanced
       Security, etc).
       
   If the installation process went OK, the program tells you that every
   installed component is ready to use. In the table on the screen the
   "Install?" column shows "Ready" for every selected component.
   
   Ingres is installed on your machine. Jump to [93]Completing the
   Initial Configuration.
     _________________________________________________________________
   
5.3. Manual Install

   If you choose Install rather than Express Install, the installer
   untars ingres.tar, checks the integrity of the components and puts
   them in their respective directories. Then it asks you if you want to
   setup these components now.
   
   If you decide to do the setup later, the installer stops. In the table
   containing the components the "Install?" column shows "Not Set Up" for
   every selected component. You can run ingbuild again at any time and
   choose one of the options Setup All or Setup to set up all or one of
   the components. A component cannot be used until it has been set up.
   
   Let us see what happens if you choose to set up the components.
   
   First, you have to set up the DBMS server. On the screens to follow
   you will see a fair amount of explanatory text about the parameters we
   have covered earlier.
   
   During the setup phase, the installer prompts you for the values of
   the Ingres environment variables and the other necessary parameters:
   
     * II_INSTALLATION.
     * II_DATABASE.
     * II_CHECKPOINT: if you set it to the same value as II_DATABASE, the
       installer warns you of the dangers of losing a database and its
       backup at the same time. You have to repeat II_CHECKPOINT's value
       for the program to accept it.
     * II_JOURNAL.
     * II_DUMP.
     * II_WORK.
     * II_LOG_FILE: the installer reminds you of Ingres' capability of
       mirroring the transaction log. Naturally, it only makes sense if
       the mirrored log file is on a different disk than the primary log
       file. The installer asks you if you want to disable dual logging.
       Then you have to specify the size of the log (16 Mb by default,
       make it bigger if you have free disk space as I suggested
       earlier). After this you have to tell the installer where to put
       the primary log file, and, if you did not switch off dual logging,
       the dual log file (II_DUAL_LOG).
     * II_NUM_OF_PROCESSORS.
     * II_TIMEZONE_NAME.
     * II_CHARSET.
     * Expected number of concurrent users.
     * SQL-92 compatible databases.
       
   At every prompt, enter the appropriate parameter's previously decided
   value.
   
   The installer may also ask you about other components you have chosen
   to install. Accept the defaults for these.
   
   Full Version
   If you requested the installation of Net, make ingbuild set it up. Do
   not bother setting an installation password, unless you know what it
   is: we will complete Net's configuration later, in its own section
   ([94]Ingres/Net).
     _________________________________________________________________
   
5.4. Completing the Initial Configuration

   After an Express Install (but perhaps after a manual install as well),
   you may want to change the values of some of the Ingres environment
   variables. You will see how to do this here. Stay logged in as ingres.
   
   You can view the current values of Ingres environment variables with
   the ingprenv command:
$ ingprenv
        
   You can change the value of any variable with the ingsetenv command:
$ ingsetenv II_TIMEZONE_NAME GMT1
        
   In the example we set II_TIMEZONE_NAME to GMT1 (Greenwich Mean Time +
   1 hour), which happens to be the time zone Hungary is placed in. You
   can find all possible values for II_TIMEZONE_NAME in the file
   $II_SYSTEM/ingres/files/tz.crs (look for the lists beginning with the
   word VALID).
   
   You can change the value of any other Ingres environment variable in a
   similar way. ingprenv and ingsetenv do not require a running Ingres
   server.
   
   The System Reference Guide contains the description of every Ingres
   environment variable. Let me mention two of those that we have not
   covered yet.
   
   II_DATE_FORMAT determines the display format of dates. By default, its
   value is US which provides the format dd-mmm-yy.
   
     Note: The setting of II_DATE_FORMAT has no effect on the way dates
     are stored in the database. Ingres always stores full date values,
     century included. Hence, you can change the setting of
     II_DATE_FORMAT without the risk of corrupting data. In order to
     avoid Y2K problems in your applications, you should use a date
     format that contains the century, such as MULTINATIONAL4
     (dd/mm/yyyy) or FINLAND (yyyy-mm-dd). The latter seems especially
     proper under Linux :-)
     
   Another Ingres environment variable that has a good chance to be
   changed from its default value is II_MONEY_FORMAT. This one is
   responsible for how values of money type are displayed.
   
     Note: Just like with dates, the value of II_MONEY_FORMAT has no
     impact on the storage format of money columns.
     
   II_MONEY_FORMAT consists of two parts: the first part tells whether
   the currency sign precedes the amount (L = Leading or T = Trailing),
   the second part describes the currency itself ($, DM, Ft, etc.: this
   part is a string of maximum 4 characters). The two parts are separated
   by a colon. II_MONEY_FORMAT defaults to L:$.
   
   Only the ingres user is allowed to use ingsetenv, since these Ingres
   environment variables apply to the whole installation. However, some
   Ingres environment variables (including II_DATE_FORMAT and
   II_MONEY_FORMAT) can be overridden in the users' shell, via Linux
   variables of the same name. You can check the System Reference Guide
   about which other variables fall into this category.
   
   Warning
   
   Be careful: Ingres will not prevent you from changing the value of any
   Ingres environment variable, including II_DATABASE, II_CHECKPOINT,
   II_CHARSET, etc. (the "stable" parameters as we saw earlier). However,
   if you change one of these, prepare for the nastiest possible
   consequences, the mildest one of which is that Ingres will not run.
   
   You can find information on how to setup Net and ICE in separate
   sections ([95]Ingres/Net, and [96]ICE, respectively).
     _________________________________________________________________
   
5.5. Re-installation

   If you want to re-install Ingres for any reason, remember to do the
   following first:
   
     * Backup everything you need from $II_SYSTEM/ingres (user databases,
       source code of applications stored there, etc.). Also backup any
       other databases you want to keep that are stored in different
       locations. You can use the unloaddb utility for creating portable
       copies of databases. On unloaddb see the System Reference Guide.
     * Stop Ingres.
     * Remove everything under $II_SYSTEM/ingres. Also remove the
       contents of every other location where you stored any part of any
       database.
       
   Warning
   
   Databases that are not completely removed can cause problems when you
   try to re-create them.
     _________________________________________________________________
   
5.6. Command Line Install (SDK)

   For installing the SDK, you can run ingbuild in batch mode as well.
   The easiest way to do an Express Install is to start ingbuild in the
   following way (logged in as ingres):
$ cd $II_SYSTEM/ingres
$ tar xf /cdrom/int_lnx/ingres.tar install
$ install/ingbuild -express /cdrom/int_lnx/ingres.tar
        
   In this case a regular Express Install takes place without having to
   press another key.
     _________________________________________________________________
   
5.7. Client Installation (Full Version)

   If you have the full Ingres version, you may want to set up a client
   installation. If your application will run on a different machine than
   the database server, all you need on the application server is a
   client Ingres installation.
   
   For a client install, choose PackageInstall in ingbuild, then mark
   "Ingres Networked Client" to be installed. After the installation has
   been finished, go to section [97]Ingres/Net to set up Net.
     _________________________________________________________________
   
5.8. The Installer's Log

   No matter which type of install you have chosen (Express or Manual),
   you can find all of ingbuild's messages in
   $II_SYSTEM/ingres/files/install.log. I suggest you check this file
   after an Express Install to see what happened during the installation
   process. On the other hand, if ingbuild stops with an error message,
   also check this log for possible clues to the cause of the error.
     _________________________________________________________________
   
5.9. Checking the Installation

   After you have installed and configured Ingres, it is time to check if
   it works properly. Supposing you are still logged in as ingres, start
   the Ingres system:
$ ingstart
        
   Create a new database:
$ createdb test
        
   Start the command line SQL interface:
$ sql test
        
   Create a table, insert a row into it and query the table's contents:
create table t1 (col1 char(10));
insert into t1 values ('abcde');
select * from t1;
\g
        
   If everything went OK, you should see something like the following:
$ sql test
INGRES TERMINAL MONITOR Copyright (c) 1981, 1998 Computer Associates Intl, Inc.
Ingres Linux Version II 2.0/9808 (lnx.us5/95)libc6 login
Sun Oct 3 03:43:54 1999

continue
* create table t1 (col1 char(10));
* insert into t1 values ('abcde');
* select * from t1;
* \g
Executing . . .

(1 row)


col1

abcde

(1 row)
continue
*
        
   You can leave sql with the command \q.
     _________________________________________________________________
   
6. Basic System and Database Administration

   In this section I outline some of the basic tasks of the Ingres system
   administrator and the Ingres database administrator. You will also see
   what tools Ingres provides to perform these tasks. In the following I
   suppose you are logged in as ingres.
     _________________________________________________________________
   
6.1. Starting and Stopping Ingres

   You have already seen how to start Ingres:
$ ingstart
        
   To stop Ingres, use the ingstop command:
$ ingstop
        
   ingstop only stops Ingres if the are no active user sessions. If you
   want to stop the system regardless of user sessions, use the following
   form:
$ ingstop -force
        
   In this case, after you have killed Ingres, check if it released all
   shared memory segments and semaphores it had used:
$ ipcs -a
        
   If you see shared memory segments or semaphores in ipcs's output that
   are still attached to the ingres user, release them with Ingres'
   ipcclean utility:
$ ipcclean
        
   Warning
   
   Take care: forcing Ingres to stop might make your databases
   inconsistent.
     _________________________________________________________________
   
6.2. New Ingres Users and Locations

   In order for any user to have access to the Ingres installation, you
   have to define them as Ingres users with the accessdb utility.
   
   Start accessdb:
$ accessdb
        
   Select the Users option, then Create.
   
   Here, enter the name of the user. You do not have to modify
   permissions.
   
   Save, then End, and End.
   
   You can also use accessdb to create new locations, change their types
   or extend databases to new locations. The usage of accessdb is covered
   in the System Reference Guide and in the Database Administrator's
   Guide.
   
   As an alternative to accessdb, you can maintain users and locations by
   running SQL commands on iidbdb (create user, create location, etc.).
   The syntax of these commands can be found in the SQL Reference Guide.
   
   Warning
   
   Since the ingres user has unlimited power of changing and possibly
   destroying any element of an Ingres installation, it is highly
   advisable that you only use this account for carrying out
   administrative tasks. Create another Linux user and set its
   environment to that of ingres. Register it as an Ingres user via
   accessdb and use this account for everyday work.
     _________________________________________________________________
   
6.3. Creating and Destroying Databases

   In subsection [98]Checking the Installation you created a new
   database. You did not specify any options in the
$ createdb test
        
   command. Therefore the values stored in II_DATABASE, II_CHECKPOINT,
   etc., became locations for the test database. You could have specified
   each location explicitly:
$ createdb test -d<data location> -c<checkpoint location> -j<journal location>
-b<dump location> -w<work location>
        
   You can remove a database with the destroydb command:
$ destroydb test
        
   Warning
   
   Be careful, because Ingres will not prompt you before destroying the
   database.
     _________________________________________________________________
   
6.4. Collation Sequences

   The collation sequence determines which of any two character strings
   should be considered less than the other. In Ingres, every database
   can have its own sort order. You can specify the collation sequence
   when creating the database:
createdb test -lhun
        
   If you omit the -l parameter, the database will have the default
   collation sequence which is determined by the implicit sort order of
   the code set of the Ingres installation (II_CHARSET).
   
   If you want to use your own collation sequence (it is hun in the
   example above), you have to create a definition file first. The
   structure of this file must obey to simple rules by which you specify
   the absolute or relative ordering of letters and/or strings in your
   language. This file must then be compiled by the aducompile utility
   for Ingres to be able to use it.
   
   The Spanish collation sequence and the collation based on the DEC
   Multinational Character Set are available both in source (spanish.dsc
   and multi.dsc), and compiled form (spanish and multi).
   
   You specify these collation sequences in the following way:
createdb test -lspanish
        
   or
createdb test -lmulti
        
   The compiled definition files for a collation sequence must be in the
   $II_SYSTEM/ingres/file/collation directory. The syntax rules of the
   definition files can be found in the System Reference Guide. It may
   also be useful to examine the definition files for the Spanish and the
   DEC Multinational collations.
     _________________________________________________________________
   
6.5. Backup and Recovery

   You can back up an Ingres database or certain tables in it with the
   ckpdb utility. The following command backs up the test database:
$ ckpdb test
        
     Note: Checkpoints can be taken online.
     
   Restoring a database can be done with the rollforwarddb command:
$ rollforwarddb test
        
   By default, rollforwarddb, using the latest checkpoint and all journal
   files created since that checkpoint, restores the database to its last
   committed state. However, you can specify a point in time to restore
   the database to the state it was in at that time. You can go back as
   far as 16 checkpoints (Ingres stores data for the last 16 checkpoints
   in the control file of the database).
   
   Both ckpdb and rollforwarddb accept many parameters. You can read more
   about these commands in the System Reference Guide. Besides, you
   should read Michael Leo's paper on Ingres backup and recovery at
   [99]http://www.naiua.org/papers/backup99.zip.
   
   Both ckpdb and rollforwarddb use a template file
   ($II_SYSTEM/ingres/files/cktmpl.def). By modifying this file, you can
   customize the Linux commands that do the physical backup and restore
   of the data files. Consult the Database Administrator's Guide for the
   syntax of this file.
     _________________________________________________________________
   
6.6. Configuring Ingres

   Most Ingres parameters can be set via the cbf utility. This is the
   program by which you can specify the number of DBMS servers, the sizes
   of different caches and a lot of other variables. The usage of cbf is
   detailed in the System Reference Guide.
     _________________________________________________________________
   
6.7. Monitoring Ingres

   You can use the ipm utility to monitor a running Ingres system (Visual
   DBA only runs on Win32). With ipm, you can monitor and manage user
   sessions, and also the locking and logging subsystems.
     _________________________________________________________________
   
6.8. Message Files

   The Ingres message files reside in the $II_SYSTEM/ingres/files
   directory. The most important of these is errlog.log. Should any
   problems arise during the running of Ingres, this is the file to check
   first.
     _________________________________________________________________
   
7. Ingres/Net

   Ingres/Net is not part of the SDK. You only get it with the full
   version of Ingres. It allows applications (Ingres utilities and user
   programs alike) to access Ingres databases on other installations
   (usually on different machines as well). On the machine where the
   application runs, a client Ingres installation must be set up. We
   covered the installation of the client in subsection [100]Client
   Installation. (Naturally, the client can also be a full Ingres
   installation.)
   
   In this section you will see how to set up Net on both the client and
   server to provide remote access to the DBMS server. For a complete
   description of Ingres/Net I suggest you consult the Ingres/Net User
   Guide.
   
   Before starting with Net, however, we need some information on how
   Ingres authenticates its users.
     _________________________________________________________________
   
7.1. User Authentication

   We saw earlier that only valid Ingres users can access an Ingres
   installation. Ingres keeps information on its users in the iidbdb
   database. But how does Ingres authenticate users?
   
   In case of local access, the answer is simple: Ingres asks the
   operating system who the user is.
   
   There is an exception to this rule: certain users may be granted the
   privilige to impersonate other Ingres users when starting an Ingres
   utility or application. That is why it is not necessary for every
   Ingres user to have an OS account. This privilege, however, can only
   be granted as all-or-none: if you give it to somebody, he/she will be
   able to impersonate any other Ingres user, including the ingres
   account. Therefore, never grant it to anyone.
   
   Leaving the authentication of users to the operating system works fine
   for local access. But what about users who want to use the database
   from a remote machine? They do not log in to the machine the database
   resides on (the server), therefore the server's operating system will
   not authenticate them (they may not even have an OS account on the
   server machine).
   
   There are two possible ways Ingres can authenticate these users. We
   will cover them in the next two subsections.
     _________________________________________________________________
   
7.2. Login Account Passwords

   The first solution to the remote user authentication problem is to
   require that the client provides a local (to the server machine) user
   name and password. Then the Ingres server authenticates these through
   standard OS facilities, just like the operating system would do with
   real local accounts.
   
   In this case, you do not have to set anything in Net on the server.
   The only thing you will need is the ingvalidpw Ingres utility. It will
   check (by using the getspnam and crypt OS functions) if the user's
   name and password are valid on the server machine. On how to install
   ingvalidpw, see subsection [101]ingvalidpw.
     _________________________________________________________________
   
7.3. Installation Passwords

   The other way of authenticating remote users is that the server
   accepts their user ID on the client machine. In this case, the remote
   users do not have to be known to the OS on the server.
   
   How will the server validate clients in this case? It is obvious that
   we need some kind of authentication: anybody can create an ingres
   account on a client machine, then he/she could connect to the
   installation as the ingres super-user.
   
   This is where the installation password comes in: you set an
   installation password on the server. You then set this password on the
   client machines for those accounts that you want to allow to access
   the server under their name on the client.
   
   The Ingres server can then authenticate the client by simply checking
   its installation password.
     _________________________________________________________________
   
7.4. ingvalidpw

   As ingbuild apparently does not bother installing ingvalidpw, you have
   to build it yourself.
   
   Login as root, set the environment as that of ingres, then simply type
# mkvalidpw
        
   This script builds and installs ingvalidpw.
     _________________________________________________________________
   
7.5. Setting up the Client

   You will use the netutil utility to set up Net on the client side,
   and, in the case of installation passwords, also on the server. Let us
   see the client side first. Log in as the account you want to grant
   access to, or ingres, if you want to set up general access. Then type:
$ netutil
        
   You can see three tables on netutil's screen. Let us see what fields
   each of them contains:
   
     * Virtual Node Name: this is the name by which you identify the
       remote Ingres installation, similarly as you would define an ODBC
       data source name. The name is of local scope and has nothing to do
       either with the server machine's name or the remote installation's
       code.
     * Login/Password Data: one or two entries of the following:
          + Type: can be Global, or Private. If Private, the entry will
            only pertain to the current account. If Global, it will be
            used for all users on the client machine, except for those
            with a Private entry.
          + Login: the user account on the server machine. In case of an
            installation password, it should be *.
          + Password: the password on the server machine (the above
            user's password, or the installation password).
     * Connection Data: at least one entry of the following:
          + Type: can be Global, or Private. The same applies as in
            Login/Password Data.
          + Network Address: the server machine's address.
          + Protocol: the network protocol. On Linux, it is probably
            tcp_ip.
          + Listen Address: listen address of the communication server as
            set up by cbf. By default, it is the same as the installation
            code.
     _________________________________________________________________
   
7.6. Setting up the Server

   If you want to use an installation password, you have to configure Net
   on the server, too. In netutil, create a virtual node with the
   following data:
   
     * Virtual Node Name: must be the machine's name.
     * Login/Password Data
          + Type: Global.
          + Login: *.
          + Password: enter the installation password.
     * Connection Data: you do not have to enter any data here.
     _________________________________________________________________
   
7.7. Using Net

   After you have configured Net with netutil on the client, and, if
   necessary, on the server, use netutil's Test menu option to see if the
   connection works. If it does, you can access a remote database in the
   following manner (let us suppose the name of the database is test, the
   virtual node name for the remote Ingres installation is ingserv1):
$ sql ingserv1::test
     _________________________________________________________________
   
8. ICE (Internet Commerce Enabled)

   ICE is Ingres' proprietary gateway to the Web. Basically, it is a CGI
   program that can talk to an Ingres server through the native Ingres
   API. ICE supports a couple of macro commands which you can embed in
   HTML documents. When rendering such a document, ICE first executes the
   macros then outputs the resulting web page.
   
   On other platforms you can configure ICE as a server extension to the
   Spyglass web server which is bundled with Ingres. The Linux version of
   Ingres does not include Spyglass. Therefore, in this section I will
   show you how to setup ICE as a standalone CGI program under Apache,
   the world's most popular web server.
   
   You need the ingvalidpw program for ICE to work. See subsection
   [102]ingvalidpw on how to install it.
     _________________________________________________________________
   
8.1. Configuring Apache

   Building, installing and configuring Apache is beyond the scope of
   this HOWTO. (You had better learn Apache if you are putting your
   databases on the Web, with ICE or otherwise.)
   
   I suggest to download the newest stable version of Apache in source
   and build it yourself for maximum flexibility. I also suggest you keep
   a separate Apache installation just for ICE.
   
   In this subsection I will only cover those parameters of Apache that
   are important from ICE's point of view.
   
   Things to watch out for:
   
     * The installed software should be owned by the ingres user. This is
       not strictly necessary but will make things easier.
     * Compile the mod_env module into the server, preferably statically
       (do not use DSOs unless you have to: they make Apache slower).
       
   After you have compiled and installed Apache, set the following
   parameters in httpd.conf:
Port 8000 -- must be greater than 1023
User ingres -- all server processes run as ingres
Group ingres -- the ingres user's group
PassEnv II_SYSTEM
PassEnv LD_LIBRARY_PATH
        
   The last two lines must be added to httpd.conf. These variables will
   be passed from the environment of the ingres user to the environment
   of CGI programs started by Apache (specifically iceinst and ice, the
   two executables of ICE).
     _________________________________________________________________
   
8.2. ICE Setup

   Now you can configure ICE and its Tutorials. You can do this with a
   browser and the iceinst program. Let us suppose that your CGI
   directory is /opt/ingres/apache/cgi-bin and Apache is listening on
   port 8000. Let the name of your machine be ingserv1. Then you can
   start iceinst in the following manner:
$ iceinst -d/opt/ingres/apache/cgi-bin -u/cgi-bin -shttp://ingserv1:8000
-b/opt/netscape/netscape
        
   Option -d is the full path to the CGI directory, -u is this
   directory's address within the site, -s is the Internet address of the
   server, while -b is the full path to the browser. If you omit option
   -b and write -remote instead, then iceinst will not try to start the
   browser. You can configure ICE from another machine then, directing
   your browser to [103]http://ingserv1/cgi-bin/iceinst.
   
   First the program asks for the value of II_SYSTEM. Then you should
   visit every screen and set all parameters presented on them. Have
   iceinst install the Dynamic SQL Tutorial and the Macro Processor
   Tutorial as well. These show the usage of ICE via applications and a
   database (icedb by default).
   
   It is important to create a directory under Apache's DocumentRoot
   where ICE can store the output it creates for clients' requests. ICE
   will not start until you create this directory and specify its name in
   iceinst.
   
   After you have completed every form, choose the Install option. If you
   have set everything properly, the configuration of ICE and the
   installation of the tutorials take place. ICE is ready to use.
     _________________________________________________________________
   
9. Miscellaneous Topics

   Further hints to the use of Ingres.
     _________________________________________________________________
   
9.1. Automatic Startup and Shutdown

   If you want Ingres to start automatically whenever Linux boots and
   stop when you shutdown or reboot the system, do the following:
   
   Log in as root.
   
   Check if your Linux variant has System V or BSD style init (init's man
   page will tell that).
   
   If your system conforms to System V, the /etc/rc.d/init.d directory
   must exist. Create a file there (call it ingres or any other name you
   wish). The file should contain at least the following:
#!/bin/sh

case $1 in
  start)
    echo "Starting Ingres"
    su - ingres -c "ingstart"
    ;;

  stop)
    echo "Stopping Ingres"
    su - ingres -c "ingstop"
    ;;

  *)
    echo "Usage: ingres {start|stop}"
    exit 1
    ;;
esac

exit 0
        
   Link the file as K01ingres to the directories that correspond to the
   run levels in which Ingres should stop:
# ln -s /etc/rc.d/init.d/ingres /etc/rc.d/rc0.d/K01ingres
# ln -s /etc/rc.d/init.d/ingres /etc/rc.d/rc1.d/K01ingres
# ln -s /etc/rc.d/init.d/ingres /etc/rc.d/rc6.d/K01ingres
        
   Also link it as S99ingres to the directories that correspond to the
   run levels in which Ingres should start:
# ln -s /etc/rc.d/init.d/ingres /etc/rc.d/rc2.d/S99ingres
# ln -s /etc/rc.d/init.d/ingres /etc/rc.d/rc3.d/S99ingres
# ln -s /etc/rc.d/init.d/ingres /etc/rc.d/rc4.d/S99ingres
# ln -s /etc/rc.d/init.d/ingres /etc/rc.d/rc5.d/S99ingres
        
   It is not important to call the links K01ingres and S99ingres, the
   point is that the name starting with K should contain a small number
   (so that Ingres stops early when changing to a lower runlevel) and the
   name starting with S should contain a large number (so that Ingres
   starts after everything else has started). Naturally, the file names
   must not clash with names of existing files.
   
   If you have a BSD style init, put the following lines into
   /etc/rc.d/rc.local:
echo "Starting Ingres"
su - ingres -c "ingstart"
        
   This will start Ingres. (As a matter of fact, you can use
   /etc/rc.d/rc.local even if you have a System V style init.)
   
   To stop Ingres automatically, create a file in /etc/shutdown.d (call
   it, say, ingres) that contains the commands:
echo "Stopping Ingres"
su - ingres -c "ingstop"
        
   No matter which type your system is, the files you create must be
   executable files, owned by root.
   
   Naturally, if your system provides a utility for configuring programs
   to start and stop automatically (such as chkconfig in RedHat), use
   that if you wish.
     _________________________________________________________________
   
9.2. ingmenu

   The easiest way to access an Ingres database (at least, for beginners)
   is via the ingmenu program. From ingmenu, you can reach Ingres'
   forms-based utilities, by which you can create, update and query
   tables, create, edit and run reports and ABF or Vision applications.
   Its usage is:
$ ingmenu test
        
   Test is the name of the database.
     _________________________________________________________________
   
9.3. Circumventing Ingres Net

   Without Ingres/Net, in theory it is not possible for Ingres
   applications to access databases on different machines. However, there
   exists a method, not supported by CA, by which sometimes you can come
   around this problem.
   
   Let us suppose your application runs on host ingdev and the database
   (called test) you would like to update or query resides on host
   ingserv. Your first task is to find out the port number of the
   appropriate DBMS server running on ingserv. You can use ipm for this
   purpose: as ingres, start ipm on ingserv and choose option Server
   List. In the list of servers select one that is of type INGRES and
   handles the test database (you have to see either test or ALL in
   column Connecting to Databases). You find the port number of the DBMS
   server in the first column. Let us suppose it is 1259.
   
   On machine ingdev, set the shell variable II_DBMS_SERVER in the
   following way:
$ export II_DBMS_SERVER='ingserv::1259'
        
   Now run the command:
$ sql test
        
   If it works, you have access to the test database on host ingserv.
   
   This solution is applicable only if both machines are of the same
   architecture, the same operating system is running on both of them,
   the character set is the same in both Ingres installations, and so on:
   I do not know the full list of necessary conditions. Therefore, I
   cannot guarantee that this trick will work.
   
   On the other hand, if you restart Ingres on host ingserv, the DBMS
   server process will get a different TCP/IP port, therefore you
   probably have to automate the fetching of the current port number to
   the application server. You can use the show command of the iinamu
   utility for this purpose. The following command line gives the port
   number of the DBMS server if there is only one server running:
$ echo show | iinamu | grep INGRES | tr -s ' ' '\t' | cut -f4
     _________________________________________________________________
   
9.4. Forms-Based Development Tools

   The Ingres installation includes a sample application, created by ABF,
   the traditional development tool of Ingres. You can load it with the
   abfdemo command. Unfortunately, the manuals of ABF and Vision cannot
   be found either on the Ingres CD or on the CA site.
   
   There is a problem with the SDK under glibc 2.1: applications created
   by ABF or Vision cannot be either compiled or run directly from the
   database. This problem is solved in the full Ingres version. For the
   SDK, install the RedHat glibc 2.0 compatibility packages. If you do
   not have RedHat, download them from the following URLs:
   
     * [104]ftp://ftp.redhat.com/pub/redhat/redhat-6.0/i386/RedHat/RPMS/c
       ompat-binutils-5.2-2.9.1.0.23.1.i386.rpm
     * [105]ftp://ftp.redhat.com/pub/redhat/redhat-6.0/i386/RedHat/RPMS/c
       ompat-egcs-5.2-1.0.3a.1.i386.rpm
     * [106]ftp://ftp.redhat.com/pub/redhat/redhat-6.0/i386/RedHat/RPMS/c
       ompat-glibc-5.2-2.0.7.1.i386.rpm
     * [107]ftp://ftp.redhat.com/pub/redhat/redhat-6.0/i386/RedHat/RPMS/c
       ompat-libs-5.2-1.i386.rpm
       
   Besides the compatibility packages, you need an Ingres patch. It was
   posted on the [108]Ingres newsgroup in September, 1999. I have a copy
   of it, email me if you wish to install it.
   
   The compatibility packages and the patch probably do not work for all
   Linux distributions. I only tested them on RedHat and Caldera Open
   Linux.
     _________________________________________________________________
   
9.5. Ingperl and Perl DBI

   Previous Perl versions, version 4 included, made Ingres access
   possible via libraries known as ingperl. You can find information on
   ingperl at [109]http://www.contrib.andrew.cmu.edu/~lfm/ingperl.html.
   
   In Perl 5 a new, unified database interface, called Perl DBI,
   appeared. Its site is
   [110]http://www.symbolstone.org/technology/perl/DBI/index.html.
   
   You can download the Ingres module of DBI from that site.
     _________________________________________________________________
   
9.6. Ingres links

   I leave you with a few pointers to important Ingres sites:
   
     * [111]http://www.cai.com/ingres/: home page of the Ingres RDBMS on
       CA's site.
     * [112]http://support.cai.com/ingressupp.html: Ingres Technical
       Support.
     * [113]http://www.cai.com/ingres/inquire/: inquire_ingres: Ingres
       technical magazine.
     * [114]http://www.naiua.org: the North American Ingres Users
       Association's site. Check the FAQ page, and the /papers directory.
     * [115]news:comp.databases.ingres: the Ingres newsgroup.
     * [116]http://www.deja.com/group/comp.databases.ingres: the archived
       Ingres newsgroup on Deja.
     * [117]http://munkora.cs.mu.oz.au/~yuan/Ingres/ingres.html: William
       Yuan's Ingres Reference Page with lots of Ingres information.
     * [118]http://www.mercurie.co.uk/ingres/: Prijesh Patel's Unofficial
       Ingres Web Page with edited posts from the Ingres newsgroup.
       
   Have fun!

References

   1. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INTRO
   2. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#COPY
   3. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#DISCL
   4. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#NEWVER
   5. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#CREDITS
   6. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#AUD
   7. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INGRES
   8. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#UNIV
   9. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#SDK
  10. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#BETA
  11. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#FULL
  12. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#TNG
  13. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#SYSREQ
  14. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#HARDWARE
  15. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#SOFTWARE
  16. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#KERNEL
  17. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INGUSER
  18. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#PREP
  19. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INGENV
  20. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#IILOG
  21. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#LOC
  22. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#IIDBDB
  23. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#IIDATAB
  24. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#IICHECK
  25. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#IIDUMP
  26. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#IIJRNL
  27. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#IIWORK
  28. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#OTHER
  29. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INSTALL
  30. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#START
  31. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#EXPRESS
  32. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#MANUAL
  33. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#COMPL
  34. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#REINST
  35. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#COMMAND
  36. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#CLIINST
  37. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INSTLOG
  38. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#CHECK
  39. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#ADMIN
  40. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#STARTSTP
  41. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#NEWUSERS
  42. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#CREATEDB
  43. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#COLL
  44. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#BACKUP
  45. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#CONFIG
  46. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#MONIT
  47. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#MESSAGE
  48. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#NET
  49. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#USERAUTH
  50. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#LOGACCT
  51. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INSTPASS
  52. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INGVALID
  53. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#CLISET
  54. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#SERVSET
  55. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#USINGN
  56. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#ICE
  57. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#APACHE
  58. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#ICESETUP
  59. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#MISC
  60. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#AUTOM
  61. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INGMENU
  62. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#CIRCUM
  63. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#FORMS
  64. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#PERL
  65. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#LINKS
  66. http://www.linuxdoc.org/
  67. http://www.linuxdoc.org/
  68. http://www.linuxdoc.org/HOWTO/IngresII-HOWTO/index.html
  69. http://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/html/IngresII-HOWTO-html.tar.gz
  70. http://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/html_single/IngresII-HOWTO.html
  71. http://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/pdf/IngresII-HOWTO.pdf
  72. http://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/ps/IngresII-HOWTO.ps.gz
  73. http://metalab.unc.edu/pub/Linux/docs/HOWTO/IngresII-HOWTO
  74. http://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/docbook/IngresII-HOWTO.sgml.gz
  75. http://www.linuxdoc.org/mirrors.html
  76. http://www.linuxdoc.org/
  77. http://www.linuxdoc.org/
  78. mailto:pal.domokos@usa.net
  79. ftp://ftp.suse.com/pub/suse/i386/current/suse/ap1/ingres.rpm
  80. ftp://ftp.suse.com/pub/suse/i386/current/suse/ap1/ingrtool.rpm
  81. http://www.cai.com/registration/cd_ingres.htm
  82. http://www.cai.com/products/ingres/documentation_set.htm
  83. http://www.cai.com/products/betas/ingres_linux/ingres_linux.htm
  84. ftp://ftp.cai.com/pub/marketing/ingres/ingresII9808libc6.tar
  85. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#START
  86. http://www.cai.com/registration/tng_framework_linux/index.htm
  87. http://www.cai.com/registration/tng_framework_linux/suse_linux.htm
  88. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#PREP
  89. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#FORMS
  90. http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html
  91. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#CREATEDB
  92. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#BACKUP
  93. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#COMPL
  94. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#NET
  95. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#NET
  96. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#ICE
  97. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#NET
  98. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#CHECK
  99. http://www.naiua.org/papers/backup99.zip
 100. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#CLIINST
 101. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INGVALID
 102. file://localhost/export/sunsite/users/gferg/howto/00_IngresII-HOWTO.html#INGVALID
 103. http://ingserv1/cgi-bin/iceinst
 104. ftp://ftp.redhat.com/pub/redhat/redhat-6.0/i386/RedHat/RPMS/compat-binutils-5.2-2.9.1.0.23.1.i386.rpm
 105. ftp://ftp.redhat.com/pub/redhat/redhat-6.0/i386/RedHat/RPMS/compat-egcs-5.2-1.0.3a.1.i386.rpm
 106. ftp://ftp.redhat.com/pub/redhat/redhat-6.0/i386/RedHat/RPMS/compat-glibc-5.2-2.0.7.1.i386.rpm
 107. ftp://ftp.redhat.com/pub/redhat/redhat-6.0/i386/RedHat/RPMS/compat-libs-5.2-1.i386.rpm
 108. news:comp.databases.ingres
 109. http://www.contrib.andrew.cmu.edu/~lfm/ingperl.html
 110. http://www.symbolstone.org/technology/perl/DBI/index.html
 111. http://www.cai.com/ingres/
 112. http://support.cai.com/ingressupp.html
 113. http://www.cai.com/ingres/inquire/
 114. http://www.naiua.org/faqs.html
 115. news:comp.databases.ingres
 116. http://www.deja.com/group/comp.databases.ingres
 117. http://munkora.cs.mu.oz.au/~yuan/Ingres/ingres.html
 118. http://www.mercurie.co.uk/ingres/
  The Linux Installation HOWTO
  by Eric S. Raymond
  v4.23, 26 May 2000

  This document describes how to obtain and install Linux software.  It
  is the first document which a new Linux user should read to get
  started.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Purpose of this document
     1.2 Other sources of information
     1.3 New versions of this document
     1.4 Feedback and Corrections

  2. Recent Changes

  3. The Easiest Option: Buy, Don't Build

  4. Before You Begin

     4.1 Hardware requirements
     4.2 Space requirements and coexistence

  5. Time requirements

     5.1 Choosing a Linux distribution

  6. Installation Overview

     6.1 First Installation Steps: The Easy Way
     6.2 First Installation Steps: The Hard Way
     6.3 Continuing the Installation
     6.4 Basic Parts of an Installation Kit

  7. Installation In Detail

     7.1 Getting prepared for installation
     7.2 Creating the boot and root floppies
     7.3 Repartitioning your DOS/Windows drives
     7.4 Creating partitions for Linux
        7.4.1 Partition basics
        7.4.2 Sizing partitions
     7.5 Booting the installation disk
        7.5.1 Choosing EGA or X installation
        7.5.2 Using
        7.5.3 Post-partition steps
     7.6 Installing software packages
     7.7 After package installations
        7.7.1 LILO, the LInux LOader
        7.7.2 Making a production boot disk (optional)
        7.7.3 Miscellaneous system configuration

  8. Booting Your New System

  9. After Your First Boot

     9.1 Beginning System Administratration
     9.2 Custom LILO Configuration

  10. Administrivia

     10.1 Terms of Use
     10.2 Acknowledgements


  ______________________________________________________________________

  1.  Introduction



  1.1.  Purpose of this document

  Linux is a freely-distributable implementation of Unix for inexpensive
  personal machines (it was developed on 386s, and now supports 486,
  586, Pentium, PowerPC, Sun Sparc, ARM and DEC Alpha hardware, and even
  the IBM System 390 mainframe!). It supports a wide range of software,
  including X Windows, Emacs, TCP/IP networking (including SLIP), and
  many applications.

  This document assumes that you have heard of and know about Linux, and
  now want to get it running.  It focuses on the Intel base version,
  which is the most popular, but much of the advice applies on Power
  PCs, Sparcs and Alphas as well.


  1.2.  Other sources of information

  If you are new to Linux, there are several sources of basic
  information about the system. The best place to find these is at the
  Linux Documentation Project home page at  <http://www.linuxdoc.org>.
  You can find the latest, up-to-date version of this document there, as
  <http://www.linuxdoc.org/HOWTO/Installation-HOWTO.html>

  You should probably start by browsing the resources under General
  Linux Information; the Linux INFO-SHEET
  <http://www.linuxdoc.org/HOWTO/INFO-SHEET.html> and the Linux META-FAQ
  <http://www.linuxdoc.org/HOWTO/META-FAQ.html>.  The `Linux Frequently
  Asked Questions' document contains many common questions (and
  answers!) about Linux---it is a ``must read'' for new users.

  You can find help for common problems on the USENET newsgroups
  comp.os.linux.help and comp.os.linux.announce.

  The Linux Documentation Project is writing a set of manuals and books
  about Linux, all of which are freely distributable on the net and
  available from the LDP home page.

  The book ``Linux Installation and Getting Started'' is a complete
  guide to getting and installing Linux, as well as how to use the
  system once you've installed it. It contains a complete tutorial to
  using and running the system, and much more information than is
  contained here.  You can browse it, or download a copy, from the LDP
  home page.

  Finally, there is a rather technical Guide to x86 Bootstrapping
  <http://www.paranoia.com/~vax/boot.html>.  This document is NetBSD-
  rather than Linux-oriented, but contains useful material on disk
  configuration and boot managers for multi-OS setups.

  Please do not email me asking for installation help.  Even if I had
  the time to handle such requests, troubleshooting by mail is much less
  efficient than asking help from your local Linux user's group.  You
  can find worldwide contact information for Linux user groups on the
  LDP site <http://www.linuxdoc.org/>.


  1.3.  New versions of this document

  New versions of the Linux Installation HOWTO will be periodically
  posted to comp.os.linux.help and comp.os.linux.announce and
  news.answers.  They will also be uploaded to various Linux WWW and FTP
  sites, including the LDP home page.

  You can also view the latest version of this on the World Wide Web via
  the URL <http://www.linuxdoc.org/HOWTO/Installation-HOWTO.html>.

  1.4.  Feedback and Corrections

  If you have questions or comments about this document, please feel
  free to mail Eric S. Raymond, at esr@thyrsus.com. I welcome any
  suggestions or criticisms. If you find a mistake with this document,
  please let me know so I can correct it in the next version. Thanks.

  Please do not mail me questions about how to solve hardware problems
  encountered during installation.  Consult ``Linux Installation and
  Getting Started'', bug your vendor, or consult the Linux newsgroup
  comp.os.linux.setup.  This HOWTO is intended to be rapid, painless
  guide to normal installation -- a separate HOWTO on hardware problems
  and diagnosis is in preparation.


  2.  Recent Changes


    Added the `Buy, Don't Build'.

    Added the material on booting from CD-ROM.


  3.  The Easiest Option: Buy, Don't Build

  Linux has now matured enough that there are now system integrators who
  will assemble a workstation for you, install and configure a Linux,
  and do an intensive burn-in to test it before it's shipped to you.  If
  you have more money than time, or you have stringent reliability or
  performance requirements, these integrators provide a valuable service
  by making sure you won't get hardware that's flaky or dies two days
  out of the box.

  There are several firms of this kind (and I'll list them here as I
  learn more about them).  The only such outfit I know about personally
  is VA Research <http://www.varesearch.com>; in 1998 I became a member
  of VA's Board of Directors.  VA builds high-end, high quality Linux
  workstations with a nifty Tux-the-penguin logo on the front.  They
  have intimate ties to the Linux community; SourceForge, the GNU site,
  and the Debian project all live on a machine in their back room, and
  Linus's personal machine is one of their boxes.

  For those of us without a champagne budget, the rest of this HOWTO is
  about how to install Linux yourself.


  4.  Before You Begin

  Before you can install Linux, you'll need to be sure your machine is
  Linux-capable, and choose a Linux to install.  The Linux Pre-
  installation checklist <http://members.tripod.com/~algolog/lnxchk.htm>
  may help you organize configuration data before you begin.


  4.1.  Hardware requirements

  What kind of system is needed to run Linux? This is a good question;
  the actual hardware requirements for the system change periodically.
  The Linux Hardware-HOWTO,  <http://www.linuxdoc.org/HOWTO/Hardware-
  HOWTO.html>, gives a (more or less) complete listing of hardware
  supported by Linux. The Linux INFO-SHEET,
  <http://www.linuxdoc.org/HOWTO/INFO-SHEET.html>, provides another
  list.

  For the Intel versions, a hardware configuration that looks like the
  following is required:
  Any 80386, 80486, Pentium or Pentium II processor will do.  Non-Intel
  clones of the 80386 and up will generally work. You do not need a math
  coprocessor, although it is nice to have one.

  The ISA, EISA, VESA Local Bus and PCI bus architectures are supported.
  The MCA bus architecture (found on IBM PS/2 machines) has been
  minimally supported since the 2.1.x kernels, but may not be ready for
  prime time yet.

  You need at least 4 megabytes of memory in your machine. Technically,
  Linux will run with only 2 megs, but most installations and software
  require 4. The more memory you have, the happier you'll be. I suggest
  an absolute minimum of 16 megabytes if you're planning to use X-
  Windows; 64 is better.

  Of course, you'll need a hard drive and an AT-standard drive
  controller. All MFM, RLL, and IDE drives and controllers should work.
  Many SCSI drives and adaptors are supported as well; the Linux SCSI-
  HOWTO contains more information on SCSI.  If you are assembling a
  system from scratch to run Linux, the small additional cost of SCSI is
  well worth it for the extra performance and reliability it brings.

  You will need a 3.5" floppy drive.  While 5.25" floppies are supported
  under Linux, they are little-enough used that you should not count on
  disk images necessarily fitting on them.  (A stripped-down Linux can
  actually run on a single floppy, but that's only useful for
  installation and certain troubleshooting tasks.)

  You also need an MDA, Hercules, CGA, EGA, VGA, or Super VGA video card
  and monitor.  In general, if your video card and monitor work under
  MS-DOS then it should work under Linux. However, if you wish to run
  the X window system, there are other restrictions on the supported
  video hardware. The Linux XFree86-HOWTO,
  <http://www.linuxdoc.org/HOWTO/XFree86-HOWTO.html>, contains more
  information about running X and its requirements.

  You'll want a CD-ROM drive.  If it's ATAPI, SCSI, or true IDE you
  should have no problem making it work (but watch for cheap drives
  advertising "IDE" interfaces that aren't true IDE).  If your CD-ROM
  uses a proprietary interface card, it's possible the installation
  kernel you're going to boot from floppy won't be able to see it -- and
  an inaccessible CD-ROM is a installation show-stopper.  Also, CD-ROMs
  that attach to your parallel port won't work at all.  If you're in
  doubt, consult the Linux CD-ROM HOWTO,
  <http://www.linuxdoc.org/HOWTO/CDROM-HOWTO.html> for a list and
  details of supported hardware.

  So-called "Plug'n'Play" jumperless cards can be a problem.  Support
  for these is under active development, but not there yet in the 2.0.25
  kernel.  Fortunately this is only likely to be a problem with sound or
  Ethernet cards.

  If you're running on a box that uses one of the Motorola 68K
  processors (including Amiga, Atari, or VMEbus machines), see the
  Linux/m68k FAQ at  <http://www.linux-m68k.org/pub/faq/faq.html> for
  information on minimum requirements and the state of the port.  The
  FAQ now says m68k Linux is as stable and usable as the Intel versions.


  4.2.  Space requirements and coexistence

  You'll need free space for Linux on your hard drive. The amount of
  space needed depends on how much software you plan to install. Today
  most installations require somewhere in the ballpark of a gigabyte of
  space.  This includes space for the software, swap space (used as
  virtual RAM on your machine), and free space for users, and so on.
  It's conceivable that you could run a minimal Linux system in 80 megs
  or less (this used to be common when Linux distributions were
  smaller), and it's conceivable that you could use two gigabytes or
  more for all of your Linux software. The amount varies greatly
  depending on the amount of software you install and how much space you
  require. More about this later.

  Linux will co-exist with other operating systems, such as MS-DOS,
  Microsoft Windows, or OS/2, on your hard drive. (In fact you can even
  access MS-DOS files and run some MS-DOS programs from Linux.)  In
  other words, when partitioning your drive for Linux, MS-DOS or OS/2
  live on their own partitions, and Linux exists on its own. We'll go
  into more detail about such ``dual-boot'' systems later.

  You do NOT need to be running MS-DOS, OS/2, or any other operating
  system to use Linux. Linux is a completely different, stand-alone
  operating system and does not rely on other OSs for installation and
  use.

  In all, the minimal setup for Linux is not much more than is required
  for most MS-DOS or Windows 3.1 systems sold today (and it's a good
  deal less than the minimum for Windows 95!).  If you have a 386 or 486
  with at least 4 megs of RAM, then you'll be happy running Linux. Linux
  does not require huge amounts of diskspace, memory, or processor
  speed.  Matt Welsh, the originator of this HOWTO, used to run Linux on
  a 386/16 MHz (the slowest machine you can get) with 4 megs of RAM, and
  was quite happy. The more you want to do, the more memory (and faster
  processor) you'll need. In our experience a 486 with 16 megabytes of
  RAM running Linux outdoes several models of expensive workstations.


  5.  Time requirements

  Start to finish, a modern Linux installation from CD-ROM can be
  expected to take from ninety minutes to three hours.


  5.1.  Choosing a Linux distribution

  Before you can install Linux, you need to decide on one of the
  ``distributions'' of Linux which are available. There is no single,
  standard release of the Linux software---there are many such releases.
  Each release has its own documentation and installation instructions.

  Linux distributions are available both via anonymous FTP and via mail
  order on diskette, tape, and CD-ROM. The Linux Distribution HOWTO,
  <http://www.linuxdoc.org/HOWTO/Distribution-HOWTO.html>, includes
  descriptions of many Linux distributions available via FTP and mail
  order.

  In the dim and ancient past when this HOWTO was first written
  (1992-93), most people got Linux by tortuous means involving long
  downloads off the Internet or a BBS onto their DOS machines, followed
  by an elaborate procedure which transferred the downloads onto
  multiple floppy disks.  One of these disks would then be booted and
  used to install the other dozen.  With luck (and no media failures)
  you'd finish your installation many hours later with a working Linux.
  Or maybe not.

  While this path is still possible (and you can download any one of
  several distributions from
  <http://metalab.unc.edu/pub/Linux/distributions/>), there are now much
  less strenuous ways. The easiest is to buy one of the high-quality
  commercial Linux distributions distributed on CD-ROM, such as Red Hat,
  Debian, Linux Pro, or WGS.  These are typically available for less
  than $50 at your local bookstore or computer shop, and will save you
  many hours of aggravation.

  You can also buy anthology CD-ROMs such as the InfoMagic Linux
  Developer's Resource set. These typically include several Linux
  distributions and a recent dump of major Linux archive sites, such as
  metalab or tsx-11.

  In the remainder of this HOWTO we will focus on the steps needed to
  install from an anthology CD-ROM, or one of the lower-end commercial
  Linuxes that doesn't include a printed installation manual.  If your
  Linux includes a paper manual some of this HOWTO may provide useful
  background, but you should consult the manual for detailed
  installation instructions.


  6.  Installation Overview


  It's wise to collect configuration information on your hardware before
  installing.  Know the vendor and model number of each card in your
  machine; collect the IRQs and DMA channel numbers.  You probably won't
  need this information -- but if it turns out you do, you'll need it
  very badly.

  If you want to run a "dual-boot" system (Linux and DOS or Windows or
  both), rearrange (repartition) your disk to make room for Linux.  If
  you're wise, you'll back up everything first!


  6.1.  First Installation Steps: The Easy Way

  If you have an EIDE/ATAPI CDROM (normal these days), check your
  machine's BIOS settings to see if it has the capability to boot from
  CD-ROM.  Most machines made after mid-1997 can do this.

  If yours is among them, change the settings so that the CD-ROM is
  checked first.  This is often in a 'BIOS FEATURES' submenu of the BIOS
  configuration menus.

  Then insert the installation CD-ROM.  Reboot.  You're started.

  If you have a SCSI CDROM you can often still boot from it, but it gets
  a little more motherboard/BIOS dependent.  Those who know enough to
  spend the extra dollars on a SCSI CDROM drive probably know enough to
  figure it out.


  6.2.  First Installation Steps: The Hard Way


  1. Make installation floppies.

  2. Boot an installation mini-Linux from the floppies in order to get
     access to the CD-ROM.


  6.3.  Continuing the Installation


  1. Prepare the Linux filesystems.  (If you didn't edit the disk
     partition table earlier, you will at this stage.)

  2. Install a basic production Linux from the CD-ROM.

  3. Boot Linux from the hard drive.

  4. (Optional) Install more packages from CD-ROM.


  6.4.  Basic Parts of an Installation Kit

  Here are the basic parts of an installable distribution:


    The README and FAQ files.  These will usually be located in the
     top-level directory of your CD-ROM and be readable once the CD-ROM
     has been mounted under Linux.  (Depending on how the CD-ROM was
     generated, they may even be visible under DOS/Windows.) It is a
     good idea to read these files as soon as you have access to them,
     to become aware of important updates or changes.

    A number of bootdisk images (often in a subdirectory).  If your CD-
     ROM is not bootable, one of these is the file that you will write
     to a floppy to create the boot disk.  You'll select one of the
     above bootdisk images, depending on the type of hardware that you
     have in your system.

  The issue here is that some hardware drivers conflict with each other
  in strange ways, and instead of attempting to debug hardware problems
  on your system it's easier to use a boot floppy image with only the
  drivers you need enabled.  (This will have the nice side effect of
  making your kernel smaller.)


    A rescue disk image.  This is a disk containing a basic kernel and
     tools for disaster recovery in case something trashes the kernel or
     boot block of your hard disk.

    RAWRITE.EXE. This is an MS-DOS program that will write the contents
     of a file (such as a bootdisk image) directly to a floppy, without
     regard to format.

  You only need RAWRITE.EXE if you plan to create your boot and root
  floppies from an MS-DOS system. If you have access to a UNIX
  workstation with a floppy drive instead, you can create the floppies
  from there, using the `dd' command, or possibly a vendor-provided
  build script.  See the man page for dd(1) and ask your local UNIX
  gurus for assistance.  There's a dd example later in this document.


    The CD-ROM itself.  The purpose of the boot disk is to get your
     machine ready to load the root or installation disks, which in turn
     are just devices for preparing your hard disk and copying portions
     of the CD-ROM to it.  If your CD-ROM is bootable, you can boot it
     and skip right to preparing your disk.


  7.  Installation In Detail

  7.1.  Getting prepared for installation

  Linux makes more effective use of PC hardware than MS-DOS, Windows or
  NT, and is accordingly less tolerant of misconfigured hardware.  There
  are a few things you can do before you start that will lessen your
  chances of being stopped by this kind of problem.

  First, collect any manuals you have on your hardware -- motherboard,
  video card, monitor, modem, etc. -- and put them within easy reach.

  Second, gather detailed information on your hardware configuration.
  One easy way to do this, if you're running MS-DOS 5.0, or up, is to
  print a report from the Microsoft diagnostic utility msd.exe (you can
  leave out the TSR, driver, memory-map, environment-strings and OS-
  version parts).  Among other things, this will guarantee you full and
  correct information on your video card and mouse type, which will be
  helpful in configuring X later on.

  Third, check your machine for configuration problems with supported
  hardware that could cause an un-recoverable lockup during Linux
  installation.


    It is possible for a DOS/Windows system using IDE hard drive(s) and
     CD ROM to be functional even with the master/slave jumpers on the
     drives incorrectly set.  Linux won't fly this way.  If in doubt,
     check your master-slave jumpers!

    Is any of your peripheral hardware designed with neither
     configuration jumpers nor non-volatile configuration memory?  If
     so, it may require boot-time initialization via an MS-DOS utility
     to start up, and may not be easily accessible from Linux.  CD-ROMs,
     sound cards, Ethernet cards and low-end tape drives can have this
     problem.  If so, you may be able to work around this with an
     argument to the boot prompt; see the Linux Boot Prompt HOWTO,
     <http://www.linuxdoc.org/HOWTO/BootPrompt-HOWTO.html> for details).

    Some other operating systems will allow a bus mouse to share an IRQ
     with other devices.  Linux doesn't support this; in fact, trying it
     may lock up your machine.  If you are using a bus mouse, see the
     Linux Bus Mouse HOWTO,  <http://www.linuxdoc.org/HOWTO/Busmouse-
     HOWTO.html>, for details.

  If possible, get the telephone number of an experienced Linux user you
  can call in case of emergency.  Nine times out of ten you won't need
  it, but it's comforting to have.

  Budget time for installation.  That will be about one hour on a bare
  system or one being converted to all-Linux operation.  Or up to three
  hours for a dual-boot system (they have a much higher incidence of
  false starts and hangups).


  7.2.  Creating the boot and root floppies

  (This step is only needed if you can't boot from a CD-ROM.)

  Your Linux CD-ROM may come with installation aids that will take you
  through the process of building boot, root, and rescue disks with
  interactive prompts.  These may be an MS-DOS installation program
  (such as the Red Hat redhat.exe program) or a Unix script, or both.

  If you have such a program and can use it, you should read the rest of
  this subsection for information only.  Run the program to do actual
  installation -- its authors certainly knew more about the specific
  distribution than I, and you'll avoid many error-prone hand-entry
  steps.

  More detailed information on making bootdisks, see the Linux Bootdisk
  HOWTO at  <http://www.linuxdoc.org/HOWTO/Bootdisk-HOWTO.html>.

  Your first step will be to select a boot-disk image to fit your
  hardware.  If you must do this by hand, you'll generally find that
  either (a) the bootdisk images on your CD-ROM are named in a way that
  will help you pick a correct one, or (b) there's an index file nearby
  describing each image.

  Next, you must create floppies from the bootdisk image you selected,
  and optionally from the rescue disk images.  This is where the MS-DOS
  program RAWRITE.EXE comes into play.

  Next, you must have two or three high-density MS-DOS formatted
  floppies.  (They must be of the same type; that is, if your boot
  floppy drive is a 3.5" drive, both floppies must be high-density 3.5"
  disks.) You will use RAWRITE.EXE to write the bootdisk images to the
  floppies.

  Invoke it with no arguments, like this:


       C:\> RAWRITE


  Answer the prompts for the name of the file to write and the floppy to
  write it to (such as A:). RAWRITE will copy the file, block-by-block,
  directly to the floppy. Also use RAWRITE for the root disk image (such
  as COLOR144). When you're done, you'll have two floppies: one
  containing the boot disk, the other containing the root disk. Note
  that these two floppies will no longer be readable by MS-DOS (they are
  ``Linux format'' floppies, in some sense).

  You can use the dd(1) commands on a UNIX system to do the same job.
  (For this, you will need a UNIX workstation with a floppy drive, of
  course.)  For example, on a Sun workstation with the floppy drive on
  device /dev/rfd0, you can use the command:



       $ dd if=bare of=/dev/rfd0 obs=18k



  You must provide the appropriate output block size argument (the `obs'
  argument) on some workstations (e.g., Suns) or this will fail. If you
  have problems the man page for dd(1) may be be instructive.

  Be sure that you're using brand-new, error-free floppies. The floppies
  must have no bad blocks on them.

  Note that you do not need to be running Linux or MS-DOS in order to
  install Linux.  However, running Linux or MS-DOS makes it easier to
  create the boot and root floppies from your CD-ROM. If you don't have
  an operating system on your machine, you can use someone else's Linux
  or MS-DOS just to create the floppies, and install from there.


  7.3.  Repartitioning your DOS/Windows drives

  On most used systems, the hard drive is already dedicated to
  partitions for MS-DOS, OS/2, and so on.  You'll need to resize these
  partitions in order to make space for Linux.  If you're going to run a
  dual-boot system, it's strongly recommended that you read one or more
  of the following mini-HOWTOS, which describe different dual-boot
  configurations.


    The DOS-Win95-OS2-Linux mini-HOWTO,
     <http://www.linuxdoc.org/HOWTO/mini/Linux+DOS+Win95+OS2.html>.

    The Linux+Win95 mini-HOWTO,
     <http://www.linuxdoc.org/HOWTO/mini/Linux+Win95.html>

    The Linux+NT-Loader mini-HOWTO,
     <http://www.linuxdoc.org/HOWTO/mini/Linux+NT-Loader.html>
  Even if they are not directly applicable to your system, they will
  help you understand the issues involved.

  NOTE: Some Linuxes will install to a directory on your MS-DOS
  partition. (This is different than installing from an MS-DOS
  partition.) Instead, you use the ``UMSDOS filesystem'', which allows
  you to treat a directory of your MS-DOS partition as a Linux
  filesystem. In this way, you don't have to repartition your drive.

  I only suggest using this method if your drive already has four
  partitions (the maximum supported by DOS) and repartitioning would be
  more trouble than it's worth (it slows down your Linux due to filename
  translation overhead).  Or, if you want to try out Linux before
  repartitioning, this is a good way to do so. But in most cases you
  should re-partition, as described here. If you do plan to use UMSDOS,
  you are on your own---it is not documented in detail here. From now
  on, we assume that you are NOT using UMSDOS, and that you will be
  repartitioning.

  A partition is just a section of the hard drive set aside for a
  particular operating system to use. If you only have MS-DOS installed,
  your hard drive probably has just one partition, entirely for MS-DOS.
  To use Linux, however, you'll need to repartition the drive, so that
  you have one partition for MS-DOS, and one (or more) for Linux.

  Partitions come in three flavors: primary, extended, and logical.
  Briefly, primary partitions are one of the four main partitions on
  your drive. However, if you wish to have more than four partitions per
  drive, you need to replace the last primary partition with an extended
  partition, which can contain many logical partitions.  You don't store
  data directly on an extended partition---it is used only as a
  container for logical partitions. Data is stored only on either
  primary or logical partitions.

  To put this another way, most people use only primary partitions.
  However, if you need more than four partitions on a drive, you create
  an extended partition. Logical partitions are then created on top of
  the extended partition, and there you have it---more than four
  partitions per drive.

  Note that you can easily install Linux on the second drive on your
  system (known as D: to MS-DOS). You simply specify the appropriate
  device name when creating Linux partitions. This is described in
  detail below.

  Back to repartitioning your drive. It used to be that there was no way
  to resize partitions without destroying the data on them.  Nowadays
  there are partitioning utilities that can resize non-destructively;
  they know about the structure of file systems, can find the free space
  on a file system, and can move file data around on the partition to
  move free space where it needs to be in order for a resize to work
  properly.  It's still suggested that you make a full backup before
  using one of these, in case of program or human error.

  Under Linux GNU parted <http://www.gnu.org/software/parted> allows you
  to create, destroy, resize and copy partitions.  It supports ext2,
  FAT16, and FAT32 filesystems, Linux swap devices; it also knows about
  MS-DOS disk labels. Parted is useful for creating space for new
  operating systems, reorganising disk usage, copying data between hard
  disks, and disk imaging.  It is relatively new code, but is reported
  to work well and not trash data.

  There is a non-destructive disk repartitioner available for MS-DOS,
  called FIPS. Look at
  <http://metalab.unc.edu/pub/Linux/system/install>. With FIPS, a disk
  optimizer (such as Norton Speed Disk), and a little bit of luck, you
  should be able to resize MS-DOS partitions without destroying the data
  on them.

  The older method of resizing a partition, if you don't have one of
  these resizing partition editors available, is to delete the
  partition(s), and re-create them with smaller sizes.  If you use this
  method, you absolutely must make a backup in order to save any of your
  data.

  The classic way to modify partitions is with the program FDISK. For
  example, let's say that you have an 80 meg hard drive, dedicated to
  MS-DOS. You'd like to split it in half---40 megs for MS-DOS and 40
  megs for Linux. In order to do this, you run FDISK under MS-DOS,
  delete the 80 meg MS-DOS partition, and re-create a 40 meg MS-DOS
  partition in its place. You can then format the new partition and
  reinstall your MS-DOS software from backups. 40 megabytes of the drive
  is left empty. Later, you create Linux partitions on the unused
  portion of the drive.

  In short, you should do the following to resize MS-DOS partitions with
  FDISK:

  1. Make a full backup of your system.

  2. Create an MS-DOS bootable floppy, using a command such as

       FORMAT /S A:


  3. Copy the files FDISK.EXE and FORMAT.COM to this floppy, as well as
     any other utilities that you need. (For example, utilities to
     recover your system from backup.)

  4. Boot the MS-DOS system floppy.

  5. Run FDISK, possibly specifying the drive to modify (such as C: or
     D:).

  6. Use the FDISK menu options to delete the partitions which you wish
     to resize. This will destroy all data on the affected partitions.

  7. Use the FDISK menu options to re-create those partitions, with
     smaller sizes.

  8. Exit FDISK and re-format the new partitions with the FORMAT
     command.

  9. Restore the original files from backup.

  Note that MS-DOS FDISK will give you an option to create a ``logical
  DOS drive''. A logical DOS drive is just a logical partition on your
  hard drive. You can install Linux on a logical partition, but you
  don't want to create that logical partition with MS-DOS fdisk. So, if
  you're currently using a logical DOS drive, and want to install Linux
  in its place, you should delete the logical drive with MS-DOS FDISK,
  and (later) create a logical partition for Linux in its place.

  The mechanism used to repartition for OS/2 and other operating systems
  is similar. See the documentation for those operating systems for
  details.


  7.4.  Creating partitions for Linux

  After repartitioning your drive, you need to create partitions for
  Linux. Before describing how to do that, we'll talk about partitions
  and filesystems under Linux.


  7.4.1.  Partition basics

  Linux requires at least one partition, for the root filesystem, which
  will hold the Linux kernel itself.

  You can think of a filesystem as a partition formatted for Linux.
  Filesystems are used to hold files. Every system must have a root
  filesystem, at least. However, many users prefer to use multiple
  filesystems---one for each major part of the directory tree. For
  example, you may wish to create a separate filesystem to hold all
  files under the /usr directory.  (Note that on UNIX systems, forward
  slashes are used to delimit directories, not backslashes as with MS-
  DOS.) In this case you have both a root filesystem, and a /usr
  filesystem.

  Each filesystem requires its own partition. Therefore, if you're using
  both root and /usr filesystems, you'll need to create two Linux
  partitions.

  In addition, most users create a swap partition, which is used for
  virtual RAM. If you have, say, 4 megabytes of memory on your machine,
  and a 10-megabyte swap partition, as far as Linux is concerned you
  have 14 megabytes of virtual memory.

  When using swap space, Linux moves unused pages of memory out to disk,
  allowing you to run more applications at once on your system.
  However, because swapping is often slow, it's no replacement for real
  physical RAM. But applications that require a great deal of memory
  (such as the X window system) often rely on swap space if you don't
  have enough physical RAM.

  Nearly all Linux users employ a swap partition.  If you have 4
  megabytes of RAM or less, a swap partition is required to install the
  software. It is strongly recommended that you have a swap partition
  anyway, unless you have a great amount of physical RAM.

  The size of your swap partition depends on how much virtual memory you
  need. It's often suggested that you have at least 16 megabytes of
  virtual memory total. Therefore, if you have 8 megs of physical RAM,
  you might want to create an 8-megabyte swap partition.  Note that swap
  partitions can be no larger than 128 megabytes in size. Therefore, if
  you need more than 128 megs of swap, you must create multiple swap
  partitions. You may have up to 16 swap partitions in all.

  You can find more on the theory of swap space layout and disk
  partitioning in the Linux Partition mini-HOWTO (
  <http://www.linuxdoc.org/HOWTO/mini/Partition.html>).

  Note: it is possible, though a bit tricky, to share swap partitions
  between Linux and Windows 95 in a dual-boot system.  For details, see
  the Linux Swap Space Mini-HOWTO,
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/unmaintained/mini/Swap-
  Space>.

  Gotcha #1: If you have an EIDE drive with a partition that goes above
  504MB, your BIOS may not allow you to boot to a Linux installed there.
  So keep your root partition below 504MB. This shouldn't be a problem
  for SCSI drive controllers, which normally have their own drive BIOS
  firmware.  For technical details, see the Large Disk Mini-HOWTO,
  <http://www.linuxdoc.org/HOWTO/mini/Large-Disk.html>.

  Gotcha #2: Are you mixing IDE and SCSI drives?  Then watch out.  Your
  BIOS may not allow you to boot directly to a SCSI drive.
  7.4.2.  Sizing partitions

  Besides your root and swap partitions, you'll want to set up one or
  more partitions to hold your software and home directories.

  While, in theory, you could run everything off a single huge root
  partition, almost nobody does this.  Having multiple partitions has
  several advantages:


    It often cuts down the time required for boot-time file-system
     checks.

    Files can't grow across partition boundaries.  Therefore you can
     use partition boundaries as firebreaks against programs (like
     Usenet news) that want to eat huge amounts of disk, to prevent them
     from crowding out file space needed by your kernel and the rest of
     your applications.

    If you ever develop a bad spot on your disk, formatting and
     restoring a single partition is less painful than having to redo
     everything from scratch.

  On today's large disks, a good basic setup is to have a small root
  partition (less than 80 meg), a medium-sized /usr partition (up to 300
  meg or so) to hold system software, and a /home partition occupying
  the rest of your available space for home directories.

  You can get more elaborate.  If you know you're going to run Usenet
  news, for example, you may want to give it a partition of its own to
  control its maximum possible disk usage.  Or create a /var partition
  for mail, news, and temporary files all together.  But in today's
  regime of very cheap, very large hard disks these complications seem
  less and less necessary for your first Linux installation.  For your
  first time, especially, keep it simple.


  7.5.  Booting the installation disk

  The first step is to boot the bootdisk you generated.  Normally you'll
  be able to boot hands-off; the boot kernel prompt will fill itself in
  after 10 seconds.  This is how you'll normally boot from an IDE disk.

  What's actually happening here is this: the boot disk provides a
  miniature operating system which (because the hard drive isn't
  prepared) uses a portion of your RAM as a virtual disk (called,
  logically enough, a `ramdisk').

  The boot disk loads onto the ramdisk a small set of files and
  installation tools which you'll use to prepare your hard drive and
  install a production Linux on it from your CD-ROM.

  (In times past this was a two-stage-process, involving a second disk
  called a `root disk'; this changed when kernel modules were
  introduced.)

  By giving arguments after the kernel name, you can specify various
  hardware parameters, such as your SCSI controller IRQ and address, or
  drive geometry, before booting the Linux kernel.  This may be
  necessary if Linux does not detect your SCSI controller or hard drive
  geometry, for example.

  In particular, many BIOS-less SCSI controllers require you to specify
  the port address and IRQ at boot time. Likewise, IBM PS/1, ThinkPad,
  and ValuePoint machines do not store drive geometry in the CMOS, and
  you must specify it at boot time.  (Later on, you'll be able to
  configure your production system to supply such parameters itself.)

  Watch the messages as the system boots. They will list and describe
  the hardware your installation Linux detects.  In particular, if you
  have a SCSI controller, you should see a listing of the SCSI hosts
  detected.  If you see the message



       SCSI: 0 hosts



  Then your SCSI controller was not detected, and you will have to
  figure out how to tell the kernel where it is.

  Also, the system will display information on the drive partitions and
  devices detected. If any of this information is incorrect or missing,
  you will have to force hardware detection.

  On the other hand, if all goes well and your hardware seems to be
  detected, you can skip to the following section, ``Loading the root
  disk.''

  To force hardware detection, you must enter the appropriate parameters
  at the boot prompt, using the following syntax:



       linux <parameters...>



  There are a number of such parameters available; we list some of the
  most common below.  Modern Linux boot disks will often give you the
  option to look at help screen describing kernel parameters before you
  boot.


    hd=cylinders,heads,sectors Specify the drive geometry.  Required
     for systems such as the IBM PS/1, ValuePoint, and ThinkPad.  For
     example, if your drive has 683 cylinders, 16 heads, and 32 sectors
     per track, enter



       linux hd=683,16,32



    tmc8xx=memaddr,irq Specify address and IRQ for BIOS-less Future
     Domain TMC-8xx SCSI controller. For example,



       linux tmc8xx=0xca000,5



  Note that the 0x prefix must be used for all values given in hex. This
  is true for all of the following options.

    st0x=memaddr,irq Specify address and IRQ for BIOS-less Seagate ST02
     controller.

    t128=memaddr,irq Specify address and IRQ for BIOS-less Trantor
     T128B controller.

    ncr5380=port,irq,dma Specify port, IRQ, and DMA channel for generic
     NCR5380 controller.

    aha152x=port,irq,scsi_id,1 Specify port, IRQ, and SCSI ID for BIOS-
     less AIC-6260 controllers. This includes Adaptec 1510, 152x, and
     Soundblaster-SCSI controllers.

  If you have questions about these boot-time options, please read the
  Linux SCSI HOWTO, which should be available on any Linux FTP archive
  site (or from wherever you obtained this document).  The SCSI HOWTO
  explains Linux SCSI compatibility in much more detail.


  7.5.1.  Choosing EGA or X installation

  Older Linuxes (including Slackware) gave you a shell at this point and
  required you to enter installation commands by hand in a prescribed
  sequence.  This is still possible, but newer ones start by running a
  screen-oriented installation program which tries to interactively walk
  you through these steps, giving lots of help.

  You will probably get the option to try to configure X right away so
  the installation program can go graphical.  If you choose this route,
  the installation program will quiz you about your mouse and monitor
  type before getting to the installation proper.  Once you get your
  production Linux installed, these settings will be saved for you.  You
  will be able to tune your monitor's performance later, so at this
  stage it makes sense to settle for a basic 640x480 SVGA mode.

  X isn't necessary for installation, but (assuming you can get past the
  mouse and monitor configuration) many people find the graphical
  interface easier to use.  And you're going to want to bring up X
  anyway, so trying it early makes some sense.

  Just follow the prompts in the program.  It will take you through the
  steps necessary to prepare your disk, create initial user accounts,
  and install software packages off the CD-ROM.

  In the following subsections we'll describe some of the tricky areas
  in the installation sequence as if you were doing them by hand.  This
  should help you understand what the installation program is doing, and
  why.


  7.5.2.  Using fdisk  and cfdisk

  Your first installation step once the root-disk Linux is booted will
  be to create or edit the partition tables on your disks.  Even if you
  used FDISK to set up partitions earlier, you'll need to go back to the
  partition table now and insert some Linux-specific information now.

  To create or edit Linux partitions, we'll use the Linux version of the
  fdisk program, or its screen-oriented sibling cfdisk.

  Generally the installation program will look for a preexisting
  partition table and offer to run fdisk or cfdisk on it for you.  Of
  the two, cfdisk is definitely easier to use, but current versions of
  it are also less tolerant of a nonexistent or garbled partition table.
  Therefore you may find (especially if you're installing on virgin
  hardware) that you need to start with fdisk to get to a state that
  cfdisk can deal with.  Try running cfdisk; if it complains, run fdisk.
  (A good way to proceed if you're building an all-Linux system and
  cfdisk complains is to use fdisk to delete all the existing partions
  and then fire up cfdisk to edit the empty table.)

  A few notes apply to both fdisk and cfdisk.  Both take an argument
  which is the name of the drive that you wish to create Linux
  partitions on. Hard drive device names are:


    /dev/hda First IDE drive

    /dev/hdb Second IDE drive

    /dev/sda First SCSI drive

    /dev/sdb Second SCSI drive

  For example, to create Linux partitions on the first SCSI drive in
  your system, you will use (or your installation program might generate
  from a menu choice) the command:


       cfdisk /dev/sda


  If you use fdisk or cfdisk without an argument, it will assume
  /dev/hda.

  To create Linux partitions on the second drive on your system, simply
  specify either /dev/hdb (for IDE drives) or /dev/sdb (for SCSI drives)
  when running fdisk.

  Your Linux partitions don't all have to be on the same drive.  You
  might want to create your root filesystem partition on /dev/hda and
  your swap partition on /dev/hdb, for example. In order to do so just
  run fdisk or cfdisk once for each drive.

  In Linux, partitions are given a name based on the drive which they
  belong to. For example, the first partition on the drive /dev/hda is
  /dev/hda1, the second is /dev/hda2, and so on. If you have any logical
  partitions, they are numbered starting with /dev/hda5, /dev/hda6 and
  so on up.

  NOTE: You should not create or delete partitions for operating systems
  other than Linux with Linux fdisk or cfdisk. That is, don't create or
  delete MS-DOS partitions with this version of fdisk; use MS-DOS's
  version of FDISK instead. If you try to create MS-DOS partitions with
  Linux fdisk, chances are MS-DOS will not recognize the partition and
  not boot correctly.

  Here's an example of using fdisk. Here, we have a single MS-DOS
  partition using 61693 blocks on the drive, and the rest of the drive
  is free for Linux. (Under Linux, one block is 1024 bytes. Therefore,
  61693 blocks is about 61 megabytes.)  We will create just two
  partitions in this tutorial example, swap and root.  You should
  probably extend this to four Linux partitions in line with the
  recommendations above: one for swap, one for the root filesystem, one
  for system software, and a home directory area.

  First, we use the ``p'' command to display the current partition
  table.  As you can see, /dev/hda1 (the first partition on /dev/hda) is
  a DOS partition of 61693 blocks.

  Command (m for help):   p
  Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
  Units = cylinders of 608 * 512 bytes

       Device Boot  Begin   Start     End  Blocks   Id  System
    /dev/hda1   *       1       1     203   61693    6  DOS 16-bit >=32M

  Command (m for help):



  Next, we use the ``n'' command to create a new partition. The Linux
  root partition will be 80 megs in size.



       Command (m for help):  n
       Command action
           e   extended
           p   primary partition (1-4)
       p



  Here we're being asked if we want to create an extended or primary
  partition. In most cases you want to use primary partitions, unless
  you need more than four partitions on a drive. See the section
  ``Repartitioning'', above, for more information.



       Partition number (1-4): 2
       First cylinder (204-683):  204
       Last cylinder or +size or +sizeM or +sizeK (204-683): +80M



  The first cylinder should be the cylinder AFTER where the last
  partition left off. In this case, /dev/hda1 ended on cylinder 203, so
  we start the new partition at cylinder 204.

  As you can see, if we use the notation ``+80M'', it specifies a
  partition of 80 megs in size. Likewise, the notation ``+80K'' would
  specify an 80 kilobyte partition, and ``+80'' would specify just an 80
  byte partition.



       Warning: Linux cannot currently use 33090 sectors of this partition



  If you see this warning, you can ignore it. It is left over from an
  old restriction that Linux filesystems could only be 64 megs in size.
  However, with newer filesystem types, that is no longer the case...
  partitions can now be up to 4 terabytes in size.

  Next, we create our 10 megabyte swap partition, /dev/hda3.



  Command (m for help): n
  Command action
      e   extended
      p   primary partition (1-4)
  p

  Partition number (1-4): 3
  First cylinder (474-683):  474
  Last cylinder or +size or +sizeM or +sizeK (474-683):  +10M



  Again, we display the contents of the partition table. Be sure to
  write down the information here, especially the size of each partition
  in blocks. You need this information later.



       Command (m for help): p
       Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
       Units = cylinders of 608 * 512 bytes

            Device Boot  Begin   Start     End  Blocks   Id  System
         /dev/hda1   *       1       1     203   61693    6  DOS 16-bit >=32M
         /dev/hda2         204     204     473   82080   83  Linux native
         /dev/hda3         474     474     507   10336   83  Linux native



  Note that the Linux swap partition (here, /dev/hda3) has type ``Linux
  native''. We need to change the type of the swap partition to ``Linux
  swap'' so that the installation program will recognize it as such. In
  order to do this, use the fdisk ``t'' command:



       Command (m for help): t
       Partition number (1-4): 3
       Hex code (type L to list codes): 82



  If you use ``L'' to list the type codes, you'll find that 82 is the
  type corresponding to Linux swap.

  To quit fdisk and save the changes to the partition table, use the
  ``w'' command. To quit fdisk WITHOUT saving changes, use the ``q''
  command.

  After quitting fdisk, the system may tell you to reboot to make sure
  that the changes took effect. In general there is no reason to reboot
  after using fdisk---modern versions of fdisk and cfdisk are smart
  enough to update the partitions without rebooting.


  7.5.3.  Post-partition steps

  After you've edited the partition tables, your installation program
  should look at them and offer to enable your swap partition for you.
  Tell it yes.

  (This is made a question, rather than done automatically, on the off
  chance that you're running a dual-boot system and one of your non-
  Linux partitions might happen to look like a swap volume.)

  Next the program will ask you to associate Linux filesystem names
  (such as /, /usr, /var, /tmp, /home, /home2, etc.) with each of the
  non-swap partitions you're going to use.

  There is only one hard and fast rule for this.  There must be a root
  filesystem, named /, and it must be bootable.  You can name your other
  Linux partitions anything you like.  But there are some conventions
  about how to name them which will probably simplify your life later
  on.

  Earlier on I recommended a basic three-partition setup including a
  small root, a medium-sized system-software partition, and a large
  home-directory partition.  Traditionally, these would be called /,
  /usr, and /home.  The counterintuitive `/usr' name is a historical
  carryover from the days when (much smaller) Unix systems carried
  system software and user home directories on a single non-root
  partition.  Some software depends on it.

  If you have more than one home-directory area, it's conventional to
  name them /home, /home2, /home3, etc.  This may come up if you have
  two physical disks.  On my personal system, for example, the layout
  currently looks like this:



       Filesystem         1024-blocks  Used Available Capacity Mounted on
       /dev/sda1              30719   22337     6796     77%   /
       /dev/sda3             595663  327608   237284     58%   /usr
       /dev/sda4            1371370    1174  1299336      0%   /home
       /dev/sdb1            1000949  643108   306130     68%   /home2



  The second disk (sdb1) isn't really all /home2; the swap partitions on
  sda and sdb aren't shown in this display.  But you can see that /home
  is the large free area on sda and /home2 is the user area of sdb.

  If you want to create an partition for scratch, spool, temporary,
  mail, and news files, call it /var.  Otherwise you'll probably want to
  create a /usr/var and create a symbolic link named /var that points
  back to it (the installation program may offer to do this for you).


  7.6.  Installing software packages

  Once you've gotten past preparing your partitions, the remainder of
  the installation should be almost automatic.  Your installation
  program (whether EGA or X-based) will guide you through a series of
  menus which allow you to specify the CD-ROM to install from, the
  partitions to use, and so forth.

  Here we're not going to document many of the specifics of this stage
  of installation.  It's one of the parts that varies most between Linux
  distributions (vendors traditionally compete to add value here), but
  also the simplest part.  And the installation programs are pretty much
  self-explanatory, with good on-screen help.


  7.7.  After package installations

  After installation is complete, and if all goes well, the installation
  program will walk you through a few options for configuring your
  system before its first boot from hard drive.
  7.7.1.  LILO, the LInux LOader

  LILO (which stands for LInux LOader) is a program that will allow you
  to boot Linux (as well as other operating systems, such as MS-DOS)
  from your hard drive.

  You may be given the option of installing LILO on your hard drive.
  Unless you're running OS/2, answer `yes'.  OS/2 has special
  requirements; see ``Custom LILO Configuration'' below.

  Installing LILO as your primary loader makes a separate boot diskette
  unnecessary; instead, you can tell LILO at each boot time which OS to
  boot.


  7.7.2.  Making a production boot disk (optional)

  You may also be given the chance to create a ``standard boot disk'',
  which you can use to boot your newly-installed Linux system.  (This is
  an older and slightly less convenient method which assumes that you
  will normally boot DOS, but use the boot disk to start Linux.)

  For this you will need a blank, high-density MS-DOS formatted diskette
  of the type that you boot with on your system. Simply insert the disk
  when prompted and a boot diskette will be created.  (This is not the
  same as an installation bootdisk, and you can't substitute one for the
  other!)


  7.7.3.  Miscellaneous system configuration

  The post-installation procedure may also take you through several menu
  items allowing you to configure your system. This includes specifying
  your modem and mouse device, as well as your time zone.  Follow the
  menu options.

  It may also prompt you to create user accounts or put a password on
  the root (administration) account.  This is not complicated and you
  can usually just walk through the screen instructions.


  8.  Booting Your New System

  If everything went as planned, you should now be able to boot Linux
  from the hard drive using LILO.  Alternatively, you should be able to
  boot your Linux boot floppy (not the original bootdisk floppy, but the
  floppy created after installing the software).  After booting, login
  as root. Congratulations! You have your very own Linux system.

  If you are booting using LILO, try holding down shift or control
  during boot. This will present you with a boot prompt; press tab to
  see a list of options. In this way you can boot Linux, MS-DOS, or
  whatever directly from LILO.


  9.  After Your First Boot

  You should now be looking at the login prompt of a new Linux, just
  booted from your hard drive.  Congratulations!


  9.1.  Beginning System Administratration

  Depending on how the installation phase went, you may need to create
  accounts, change your hostname, or (re)configure X at this stage.
  There are many more things you could set up and configure, including
  backup devices, SLIP/PPP links to an Internet Service Provider, etc.

  A good book on UNIX systems administration should help. (I suggest
  Essential Systems Administration from O'Reilly and Associates.)  You
  will pick these things up as time goes by. You should read various
  other Linux HOWTOs, such as the NET-3-HOWTO and Printing-HOWTO, for
  information on other configuration tasks.


  9.2.  Custom LILO Configuration

  LILO is a boot loader, which can be used to select either Linux, MS-
  DOS, or some other operating system at boot time.  Chances are your
  distribution automatically configured LILO for you during the
  installation phase (unless you're using OS/2, this is what you should
  have done).  If so, you can skip the rest of this section.

  If you installed LILO as the primary boot loader, it will handle the
  first-stage booting process for all operating systems on your drive.
  This works well if MS-DOS is the only other operating system that you
  have installed. However, you might be running OS/2, which has its own
  Boot Manager. In this case, you want OS/2's Boot Manager to be the
  primary boot loader, and use LILO just to boot Linux (as the secondary
  boot loader).

  An important gotcha for people using EIDE systems: due to a BIOS
  limitation, your boot sectors for any OS have to live on one of the
  first two physical disks.  Otherwise LILO will hang after writing
  "LI", no matter where you run it from.

  If you have to configure LILO manually, this will involve editing the
  file /etc/lilo.conf. Below we present an example of a LILO
  configuration file, where the Linux root partition is on /dev/hda2,
  and MS-DOS is installed on /dev/hdb1 (on the second hard drive).



       # Tell LILO to install itself as the primary boot loader on /dev/hda.
       boot = /dev/hda
       # The boot image to install; you probably shouldn't change this
       install = /boot/boot.b

       # The stanza for booting Linux.
       image = /vmlinuz       # The kernel is in /vmlinuz
         label = linux        # Give it the name "linux"
         root = /dev/hda2     # Use /dev/hda2 as the root filesystem
         vga = ask            # Prompt for VGA mode
         append = "aha152x=0x340,11,7,1"  # Add this to the boot options,
          # for detecting the SCSI controller

       # The stanza for booting MS-DOS
       other = /dev/hdb1      # This is the MS-DOS partition
         label = msdos        # Give it the name "msdos"
         table = /dev/hdb     # The partition table for the second drive



  Once you have edited the /etc/lilo.conf file, run /sbin/lilo as root.
  This will install LILO on your drive. Note that you must rerun
  /sbin/lilo anytime that you recompile your kernel in order to point
  the boot loader at it properly (something that you don't need to worry
  about just now, but keep it in mind).

  Note how we use the append option in /etc/lilo.conf to specify boot
  parameters as we did when booting the bootdisk.
  You can now reboot your system from the hard drive. By default LILO
  will boot the operating system listed first in the configuration file,
  which in this case is Linux. In order to bring up a boot menu, in
  order to select another operating system, hold down shift or ctrl
  while the system boots; you should see a prompt such as

       Boot:


  Here, enter either the name of the operating system to boot (given by
  the label line in the configuration file; in this case, either linux
  or msdos), or press tab to get a list.

  Now let's say that you want to use LILO as the secondary boot loader;
  if you want to boot Linux from OS/2's Boot Manager, for example.  In
  order to boot a Linux partition from OS/2 Boot Manager, unfortunately,
  you must create the partition using OS/2's FDISK (not Linux's), and
  format the partition as FAT or HPFS, so that OS/2 knows about it.
  (That's IBM for you.)

  In order to have LILO boot Linux from OS/2 Boot Manager, you only want
  to install LILO on your Linux root filesystem (in the above example,
  /dev/hda2). In this case, your LILO config file should look something
  like:



       boot = /dev/hda2
       install = /boot/boot.b
       compact

       image = /vmlinuz
         label = linux
         root = /dev/hda2
         vga = ask



  Note the change in the boot line. After running /sbin/lilo you should
  be able to add the Linux partition to Boot Manager. This mechanism
  should work for boot loaders used by other operating systems as well.


  10.  Administrivia


  10.1.  Terms of Use

  This document is copyright 1998 by Eric S. Raymond. You may use,
  disseminate, and reproduce it freely, provided you:


    Do not omit or alter this copyright notice (you may translate it).

    Do not omit or alter or omit the version number and date.

    Do not omit or alter the document's pointer to the current WWW
     version.

    Clearly mark any condensed, altered or versions as such.

  These restrictions are intended to protect potential readers from
  stale or mangled versions.  If you think you have a good case for an
  exception, ask me.

  10.2.  Acknowledgements

  My grateful acknowledgement to Matt D. Welsh, who originated this
  HOWTO.  I removed much of the Slackware-specific content and refocused
  the remainder of the document on CD-ROM installation, but a
  substantial part of the content is still his.

  The 4.1 version was substantially improved by some suggestions from
  David Shao <dshao@best.com>.



  The Linux Intranet Server HOWTO
  Pramod Karnad, karnad@indiamail.com
  v2.11, 7 August 1997

  This document describes how to setup an Intranet using Linux as the
  server which binds Unix, Netware, NT and Windows together. Hence by
  just establishing the connection to the Linux box you are provided
  transparent access to all the various platforms. Detailed explanations
  are provided for setting up HTTP using the NCSA server and connect to
  it using TCP/IP clients from Novell, Microsoft under Windows3.1,
  WFWG,Win95 and WinNT and MacTCP on the Apple PowerMac.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 What is required
     1.2 New versions of this document
     1.3 Feedback

  2. Install the HTTP server

     2.1 Preparation before downloading
        2.1.1 The Operating System
        2.1.2 Process type (ServerType)
        2.1.3 Binding Port (Port)
        2.1.4 Server user identity (User)
        2.1.5 Server group identity (Group)
        2.1.6 Server administrator email address (ServerAdmin)
        2.1.7 Location of server directory (ServerRoot)
        2.1.8 Location of HTML files (DocumentRoot)
     2.2 Compiling HTTPd

  3. Testing HTTPd

  4. Connecting to the Linux Server

     4.1 Setup the Linux server
     4.2 Setup the Netware server
     4.3 Setup the Netware Client
        4.3.1 Windows 3.x
        4.3.2 Windows 95
     4.4 Setup Microsoft Client
        4.4.1 Windows for Workgroups
        4.4.2 Windows 95
        4.4.3 Windows NT
     4.5 Setup TCP/IP on Macintosh
        4.5.1 MacTCP

  5. Setting up the Intranet

     5.1 NCPFS
        5.1.1 Installation
        5.1.2 Mounting NCPFS
     5.2 SMBFS
        5.2.1 Installation
        5.2.2 Mounting SMBFS
     5.3 NFS

  6. Accessing the Web

     6.1 Accessing the mounted filesystems
     6.2 Connecting to the Internet
     6.3 Other uses

  7. More things to do

  8. Credits and Legalities

     8.1 Thanks
     8.2 Copyright information


  ______________________________________________________________________

  1.  Introduction

  In simple terms, the Intranet is the descriptive term being used for
  the implementation of Internet technologies within a corporate
  organisation, rather than for external connection to the global
  Internet. This implementation is performed in such a way as to
  transparently deliver the immense informational resources of an
  organisation to each individuals desktop with minimal cost, time and
  effort. This document attempts to explain in simple terms how to setup
  an Intranet using tools which are readily available and are generally
  costing little or are free.

  This document assumes that you already know how to install TCP/IP on
  your Linux server and connect it physically to your LAN using an
  Ethernet network card. This also assumes you have some basic knowledge
  of Netware, WinNT and Mac systems. The configuration of the Netware
  server has been shown using version 3.1x as the basis. You can also
  use INETCFG to achieve the same result. On the client side the
  discussion is with respect to Windows 3.1x, Windows for Workgroups and
  Win95, WinNT and the Apple PowerMac.

  I am using the private network addresses (RFC-1918) of 172.16.0.0 and
  172.17.0.0 only as examples. You may choose suitable addresses
  depending on your configuration.



              Linux       Netware      WFWG/WinNT
              Server      Server       Server
             172.16.0.1   172.16.0.2   172.16.0.3
                |           |           |    172.16.0.0
          ------+-----+-----+--------+--+--------------
                      |              | 172.16.0.254
                    W/S 1          Router
                  172.16.0.5         | 172.17.0.254
                                     |
                           ----------+-------+--------
                      172.17.0.0             |
                                           W/S 2
                                         172.17.0.5



  1.1.  What is required

  You will need the following software before attempting the
  installation.

  o  the HTTP server software which can be downloaded from OneStep NCSA
     HTTPd Downloader at
     http://hoohoo.ncsa.uiuc.edu/docs/setup/OneStep.html page.

  o  The Novell Netware Client available from HTTP://support.novell.com/
     (The TCP/IP files are included with the client).

  o  The Microsoft TCP/IP client available from
     HTTP://www.microsoft.com/

  o  The Apple MacTCP client available from HTTP://www.apple.com/

  o  WWW Browsers like Netscape at HTTP://home.netscape.com/ or MS
     Internet Explorer at HTTP://www.microsoft.com/ or NCSA Mosaic from
     http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/NCSAMosaicHome.html


  1.2.  New versions of this document

  New versions of the Linux Intranet Server HOWTO will be periodically
  posted to comp.os.linux.announce and comp.os.linux.help. They will
  also be uploaded to various Linux FTP sites, including
  sunsite.unc.edu.

  The Latest version of this document is available in HTML format at
  http://www.inet.co.th/cyberclub/karnadp/http.html


  1.3.  Feedback

  If you have questions or comments about this document, please feel
  free to mail Pramod Karnad, at karnad@indiamail.com. Suggestions,
  criticism and mail are always welcome. If you find a mistake with this
  document, please let me know so I can correct it in the next version.
  Thanx.


  2.  Install the HTTP server

  When you download the server you have two options: To get the source
  and compile it yourself, or get the precompiled binaries. The
  precompiled binaries for Linux (ELF) version are available at NCSA but
  not the older versions.


  2.1.  Preparation before downloading

  The server at NCSA will guide you through the steps for configuration
  options and prepare the various files for you. But before you attempt
  to download HTTPd be prepared with answers to the following questions


  2.1.1.  The Operating System

  First, you must choose whether to download the source or a pre-
  compiled version of the software. If your particular system doesn't
  appear in the menu, then you will have to get the default source, and
  compile it yourself.

  To check the version of your Linux go to the command prompt on your
  Linux machine and type


         linux:~$  uname -a



  which will respond with a line which looks similar to this


          linux:~$  uname -a
          Linux linux 2.0.29 #4 Tue Sep 13 04:05:51 CDT 1994 i586
          linux:~$



  The version of Linux is 2.0.29.

  The remaining parameters can be specified before downloading or
  configured later by modifying the file srm.conf in the
  /usr/local/etc/httpd/conf directory. The names of the actual
  directives that appear in the file httpd.conf are shown in brackets.
  The only exception is the directive DocumentRoot which appears in the
  file srm.conf

  2.1.2.  Process type (ServerType)

  This specifies how your machine will run your HTTPd server. The
  preferred method is "standalone". This makes the HTTP daemon to be
  running constantly. If you choose to load HTTPd under "inetd", the
  server binary will be reloaded into memory for every request, which
  may slow your server down.


  2.1.3.  Binding Port (Port)

  This specifies which port of your machine that the HTTPd daemon will
  bind to and listen for HTTP requests. If you can login as "root", use
  the default setting of 80.  Otherwise choose a setting between 1025
  and 65535.


  2.1.4.  Server user identity (User)

  This is the user id the server will change to when answering requests
  and acting on files.This question needs to be answered only if you are
  running the server as "standalone".  If you are someone without root
  permissions, just use your own login name. If you are system
  administrator, you might want to create a special user so you can
  control file permissions.


  2.1.5.  Server group identity (Group)

  This is the group id the server will change to when answering requests
  and acting on files. This is similar to Server User identity and is
  applicable only if you are running the server as standalone.

  If you do not have root permissions, just use the name of your primary
  group. You can find out your group by typing groups at the Linux
  command prompt.


  2.1.6.  Server administrator email address (ServerAdmin)

  This is the email address that the user should send an email message
  to when reporting a problem with the server. You can put your personal
  e-mail address.


  2.1.7.  Location of server directory (ServerRoot)

  This is where the server resides on your system. If you have root
  permissions leave it in its recommended location /usr/local/etc/httpd.
  If you cannot login as root, choose a subdirectory in your home path.
  You can find out the path of your home directory with the pwd command.


  2.1.8.  Location of HTML files (DocumentRoot)

  This is where the HTML files to be served are located. The default
  location is /usr/local/etc/httpd/htdocs.  You could however set it to
  be the home directory of the special user you chose in Server user
  identity, or a subdirectory in your home directory if you can't login
  as root.

  When in doubt, use the default settings. Now that you have answers to
  the above questions you can Download NCSA HTTPd at
  http://hoohoo.ncsa.uiuc.edu/docs/setup/OneStep.html.  You should read
  the HTTPd Documentation at http://hoohoo.ncsa.uiuc.edu/docs/ before
  you attempt installation. If you are planning to compile the code then
  you need to modify the makefiles in each of the th ree directories
  support, src, cgi-src. If your version of Linux is already supported
  then you just have to type make linux at the top level directory (i.e.
  /usr/local/etc/httpd)


  2.2.  Compiling HTTPd

  Compiling is simple, just type make linux at the prompt in the server
  root directory.  Note: Users of pre-ELF Linux have to uncomment
  #define NO_PASS in file portability.h and set DBM_LIBS= -ldbm in the
  Makefile before compiling HTTPd.


  3.  Testing HTTPd

  After you have installed HTTPd, login as root and start it by typing
  httpd & . (assuming you have installed as standalone) You should now
  be able to see it in the list generated by ps. The simplest way to
  test HTTPd is by Telnet. At the Linux command prompt type


          linux:~$  telnet 172.16.0.1 80



  where 80 is the default port for HTTP. If you have configured "Port"
  as something different then type that number instead. You should get a
  response which looks like this


          Trying 172.16.0.1...
          Connected to linux.mydomain.
          Escape character is '^]'.



  Now if you type in any character and press Enter you should get a
  response similar to the one shown below.


          HTTP/1.0 400 Bad Request
          Date: Wed, 10 Jan 1996 10:24:37 GMT
          Server: NCSA/1.5
          Content-type: text/html

          <HEAD><TITLE>400 Bad Request < /TITLE> < /HEAD>
          <BODY><H1>400 Bad Request < /H1>
          Your client sent a query that this server could
          not understand.<P>
          Reason: Invalid or unsupported method.<P>
          < /BODY>



  Now we are ready to connect to this server using another PC and a WWW
  Browser.


  4.  Connecting to the Linux Server

  Please refer to the diagram shown in the chapter ``Introduction'' for
  the addressing scheme used. Workstation 1 (W/S1) is on network
  172.16.0.0 and can access the Linux server directly whereas
  Workstation 2 (W/S2) is on network 172.17.0.0 and needs to use the
  gateway (router) 172.17.0.254 to access the Linux box. This gateway
  information needs to be provided while configuring the clients only on
  W/S2. Netware refers to the gateway as 'ip_router'.

  I am using W/S2 to illustrate the client setup. To setup W/S1 just
  change the address 172.17.0.5 to 172.16.0.5 and ignore all references
  to the gateway/router.

  If you do not have a router you can skip the next section and proceed
  to

  o  ``Setup Netware Server'' if you use a Netware server.

  o  ``Setup MS Windows Client'' if you use the Microsoft Client.


  4.1.  Setup the Linux server

  You may skip this section if you do not have a router.

  You have to configure the Linux server to recognise the router thus
  allowing Workstation 2 to connect to the Web server. In order to setup
  the Linux server you should login as root. At the server prompt type


          route add gw default 172.16.0.254



  To use this gateway everytime you boot the Linux server edit the file
  /etc/rc.d/rc.inet1 and change the line containing the gateway defini-
  tion to GATEWAY = "172.16.0.254". Make sure the line for adding the
  gateway is not commented out.

  ALT: You can add routes to the networks on the other side of the
  router. This would be done as


          route add -net 172.17.0.0 gw 172.16.0.254



  To add this route everytime you boot Linux add the command to your
  /etc/rc.d/rc.local file.



  4.2.  Setup the Netware server

  In order to setup the Netware server you should have Supervisor
  permissions or atleast Console operator permissions. If these cannot
  be got, try asking your Network Administrator to help you with the
  setup.  At the Server enable the Ethernet_II frame type on the LAN by
  typing these commands or include them in the AUTOEXEC.ncf file.


          load NE2000 frame=Ethernet_II name=IPNET
          load TCPIP
          bind IP to IPNET addr=172.16.0.2 mask=FF.FF.FF.0



  You might have to specify the slot or board number while loading the
  NE2000 driver depending on your machine configuration. (eg: load
  NE2000 slot=3 frame=.....)


  4.3.  Setup the Netware Client

  On the PC you have the choice of Win3.1,WFWG or Win95. The
  installation procedure differs between Win95 and the older windows if
  you are using the 32bit client from Microsoft or Novell. If you are
  going to use the 16bit client, the procedure is the same and you can
  refer to the Windows 3.x installation instructions. For installing the
  32bit client for Win95 skip to ``Windows 95 installation''.


  4.3.1.  Windows 3.x

  If you are using Win3.1 or WFWG you can install the Netware Client
  (VLMs) and some additional files which are provided with the TCP/IP
  diskette, namely

  TCPIP.exe, VTCPIP.386, WINSOCK.dll and WLIBSOCK.dll

  Note that the WINSOCK.dll file is different from the ones provided
  with Win95 and Trumpet. Install the Netware Client with the support
  for windows. Copy VTCPIP.386, WINSOCK.dll and WLIBSOCK.dll to the
  SYSTEM directory and TCPIP.exe to the NWCLIENT directory. Now modify
  the STARTNET.bat in the NWCLIENT directory to


          lsl
          ne2000     ---> your network card driver
          c:\windows\odihlp.exe     ---->if you are using WFWG
          ipxodi
          tcpip        ---> add this line
          nwip         ---> if you use Netware/IP
          vlm



  Create a subdirectory (say) \NET\TCP and copy the files HOSTS,
  NETWORKS, PROTOCOLS and SERVICES from /etc on your Linux server or the
  directory SYS:ETC on your Netware server. Edit the copied HOSTS file
  to add the line for your new Linux server. This will enable you to
  refer to the Linux server as http://linux.mydomain/ instead of
  http://172.16.0.1/in your WWW browser


          127.0.0.1      localhost
          172.16.0.1      linux.mydomain



  Edit the NET.cfg file in NWCLIENT directory



     Link Driver NE2000
         port 300
         int 3
         MEM D0000
         FRAME Ethernet_802.2

  ; ---- add these lines ----

        FRAME Ethernet_II

     Protocol TCPIP
        PATH TCP_CFG C:\NET\TCP
        ip_address  172.17.0.5
        ip_netmask  255.255.255.0
        ip_router   172.17.0.254     ---> add the address of your gateway only
                                    ---> if you have to use this
                                    ---> gateway to reach your HTTP server

     Link Support
        MemPool 6192       ---> the minimum is 1024. Try with different values
        Buffers 10 1580    ---> this again can be fine tuned

  ;---------------------------------
  ; You may need to add lines like these if you are using Netware/IP
  ;
     NWIP
        NWIP_DOMAIN_NAME  mydomain
        NSQ_BROADCAST   ON
        NWIP1_1 COMPATIBILITY   OFF
        AUTORETRIES     1
        AUTORETRY SECS  10



  Edit the SYSTEM.ini file in the WINDOWS directory and add this entry
  for VTCPIP.386


          [386Enh]
          .....
          network=*vnetbios, vipx.386, vnetware.386, VTCPIP.386
          .....



  Reboot your PC, run STARTNET.bat and you can now use your favorite WWW
  browser to access your Web pages. You need not login to Netware and
  you don't have to run TCPMAN (if you use Trumpet Winsock).


  4.3.2.  Windows 95

  This section explains how to install the 32bit client on Win95.
  Firstly you must install the following


          Client for Netware Networks (from Microsoft or Novell)
          Microsoft TCP/IP Protocol
          Network Adapter



  To install these items, click on My Computer, Control Panel, Networks.
  Click Add. You will now be in a window that displays Client, Adapter,
  Protocol and Service.  To install the Client for Netware Networks:


         1. DoubleClick on Client
         2. Click on Microsoft or Novell
         3. DoubleClick on Client for Netware Networks



  To install the TCP/IP Protocol:


         1. DoubleClick on Protocol
         2. Click on Microsoft
         3. DoubleClick on TCP/IP



  Windows 95 by default installs several other protocols automatically.
  Remove them by clicking on them and clicking the Remove button.
  Typically Win95 installs the Microsoft NetBeui protocol, and IPX/SPX
  compatible protocol. You can delete the NetBEUI protocol, but you will
  need the IPX/SPX protocol if you wish to login to the Netware Server.

  To setup TCP/IP click on TCP/IP, click on Properties, click on the tab
  IP address


         Enter your IP address in the "Specify an IP address "
                               box as 172.17.0.5
         In the Subnet Mask box enter 255.255.255.0



  select the tab Gateway


         Enter your gateway (router) address in the box New gateway
            as 172.17.0.254
         Click the Add button



  The gateway address should now appear under the installed gateways
  box. Now Click OK.

  You should get a message to reboot. Do so. You should now be able to
  use the Browser to connect to your HTTP Server.


  4.4.  Setup Microsoft Client

  If you are using the Microsoft Client for accessing your network, then
  this section details how to install TCP/IP for

  o  ``Windows for Workgroups (WFWG)''

  o  ``Windows 95''


  o  ``Windows NT 4.0''

     Note: To enable you to refer to the Linux server as
     http://linux.mydomain/ instead of http://172.16.0.1/ in the WWW
     browser and all your intranet commands you need to edit the hosts
     file. You can add more entries for each of your other hosts
     (Netware, Unix, WinNT) as well. The Windows family keeps its HOSTS
     file in \WINDOWS or in \WINDOWS\SYSTEM depending on the version.
     Edit this file and add a line for your Linux server as:


          127.0.0.1      localhost
          172.16.0.1     linux.mydomain

          172.16.0.2     netware.mydomain
          172.16.0.3     winNT.mydomain
          172.16.0.5     ws_1



  4.4.1.  Windows for Workgroups

  This section explains how to install the 32bit client on WFWG. Firstly
  you must download the TCP/IP drivers for Windows from Microsoft. The
  current version is 3.11b and is available at ftp://ftp.microsoft.com
  or other sites as tcp32b.exe. Make sure that you have load Win32s
  before trying to load the TCP/IP-32bit driver.

  Having expanded the TCP/IP files into a temporary directory (say
  C:\TEMP), check your \WINDOWS\SYSTEM directory for copies of
  OEMSETUP.INF. If there are any, rename them. Now copy the OEMSETUP.INF
  file from the TEMP directory to the \WINDOWS\SYSTEM directory. If you
  have loaded any other TCP/IP stacks on your system, please remove them
  before you proceed.

  Start Network Setup or Windows Setup/Change Network settings


           Click the Networks button
           Click Install Microsoft Windows Network.
             Choose support for additional networks (if required)
           Click OK



  You should be prompted for your network adapter - select the appropri-
  ate one. If you are not prompted, then


            Click the Adapter button
                select an adapter (say NE2000)
                Click OK
            Click the Protocol button
                select the MS TCP/IP-32 protocol
                click OK



  You will now be prompted to configure the TCP/IP protocol stack. You
  can always reconfigure this by highlighting the TCP/IP protocol shown
  in the box Adapters and clicking the Setup button.

     In the IP address box enter 172.17.0.5
     In the Subnet Mask box enter 255.255.255.0
     Enter your gateway (router) address in the box default gateway
       as 172.17.0.254



  Click OK. The computer will ask you to restart. Do so. You should now
  be able to use the Browser to connect to your HTTP Server.


  4.4.2.  Windows 95

  This section explains how to install the 32bit client for Microsoft on
  Win95. Firstly you must install the following


          Client for Microsoft Networks
          Microsoft TCP/IP Protocol
          Network Adapter



  To install these items, click on My Computer, Control Panel, Networks.
  Click Add. You will now be in a window that displays Client, Adapter,
  Protocol and Service.  To install the Client for Microsoft Networks:


         1. DoubleClick on Client
         2. Click on Microsoft
         3. DoubleClick on Client for Microsoft Networks



  To install the TCP/IP Protocol:


         1. DoubleClick on Protocol
         2. Click on Microsoft
         3. DoubleClick on TCP/IP



  Windows 95 by default installs several protocols automatically. Remove
  them by clicking on them and clicking the Remove button. Typically
  Win95 installs the Microsoft NetBeui protocol.

  To setup TCP/IP click on TCP/IP, click on Properties, click on the tab
  IP address


         Enter your IP address in the "Specify an IP address "
                               box as 172.17.0.5
         In the Subnet Mask box enter 255.255.255.0



  select the tab Gateway



    Enter your gateway (router) address in the box New gateway
       as 172.17.0.254
    Click the Add button



  The gateway address should now appear under the installed gateways
  box. Now Click OK.

  You should get a message to reboot. Do so. You should now be able to
  use the Browser to connect to your HTTP Server.


  4.4.3.  Windows NT

  This section details how to Install the TCP/IP client for WinNT 4.0.
  Start Control Panel/ Network


           Select the Adapter tab.
               Click Add to add a new adapter (if you don't have one)



  You should be prompted for your network adapter - select the appropri-
  ate one. To add the protocols.


           Select the Protocols tab
               Click Add
               Select the TCP/IP protocol
               Click OK



  You will now be prompted to configure the TCP/IP protocol stack. You
  can always reconfigure this by highlighting the TCP/IP protocol and
  clicking the Properties button.


          Select the tab IP Address
             Mark the checkbox 'Specify an IP address'
             In the IP address box enter 172.17.0.5
             In the Subnet Mask box enter 255.255.255.0
             Enter your gateway (router) address in the box Default Gateway
                 as 172.17.0.254



  Click OK. The computer will ask you to restart. You can now use any
  Browser to connect to your HTTP Server.


  4.5.  Setup TCP/IP on Macintosh

  If you are using the Macintosh for accessing your network, then this
  section details how to install MacTCP for the PowerMacs.

  Note: To enable you to refer to the Linux server as
  http://linux.mydomain/ instead of http://172.16.0.1/ in the WWW
  browser and all your intranet commands you need to edit the hosts
  file. The format of the hosts file is different from the one used in
  Unix. The Mac hosts file is based on RFC-1035. You can add more
  entries for each of your other hosts (Netware, Unix, WinNT) as well.
  The MacOS  keeps its HOSTS file in the Preferences folder under the
  System folder. Edit this file and add a line for your Linux server as:


         linux.mydomain    A  172.16.0.1

         netware.mydomain  A  172.16.0.2
         winNT.mydomain    A  172.16.0.3
         ws_1              A  172.16.0.5



  4.5.1.  MacTCP

  This section explains how to install MacTCP. Firstly you must download
  the MacTCP files from Apple or install it from the Internet Connection
  CD.  To configure MacTCP, click the Apple Menu/ Control Panels/
  TCP/IP. In the screen change the setting for 'Connect via:' to
  'Ethernet'

  Change the 'Configure' setting to 'Manually'


         In the IP address box enter 172.17.0.5
         In the Subnet Mask box enter 255.255.255.0
         Enter your gateway (router) address in the box
           Router address as 172.17.0.254



  Click OK. You should now be able to use the Browser to connect to your
  HTTP Server.



  5.  Setting up the Intranet

  An Intranet cannot be complete without sharing the resources on the
  different platforms. You will need support for other filesystems, so
  that you can access the data available on them. This document provides
  instructions to connect Linux to the following popular filesystems.

  o  ``NCP filesystem for Netware''

  o  ``SMB filesystem for Windows''

  o  ``NFS filesystem for Unix''

  These filesystems can be compiled into the Linux kernel or added as
  modules, depending on the version of Linux. If you are not familiar
  with compiling the kernel you can refer to the Kernel HOWTO
  http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html and the Module
  HOWTO http://sunsite.unc.edu/mdw/HOWTO/Module-HOWTO.html for compiling
  the kernel with modules.



  5.1.  NCPFS

  To share the files on the Netware server you will need support for NCP
  (ncpfs). NCPFS works with kernel version 1.2.x and 1.3.71 upwards. It
  does not work with any earlier 1.3.x kernel. It cannot access the NDS
  database in Netware 4.x, but can make use of the bindery. If you are
  using Netware 4.x you can enable bindery support for specific
  containers using the command Set Bindery Context at the console as:



         set Bindery Context = CORP.MYDOM;WEBUSER.MYDOM



  In the above example two containers have bindery support enabled.

  You will need to download the NCP filesystem utilities using the URL
  ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/ncpfs.tgz
  (currently ncpfs-2.0.10) from Sunsite.


  5.1.1.  Installation

  To install the ncpfs utilities, type


          zcat ncpfs.tgz | tar xvf -



  to expand the files into its own directory. In this case you will get
  a directory ncpfs-2.0.10 Change your directory to this ncpfs directory
  before proceeding with the installation. Read the README and edit the
  Makefile if necessary.

  The installation of ncpfs depends on the kernel version you are using.
  For kernel 1.2, you should simply type 'make'. Subsequently typing
  'make install' will install the executables and man pages.

  If you use Kernel 1.3.71 or later, you might have to recompile your
  kernel. With these kernels, the kernel part of ncpfs is already
  included in the main source tree. To check if the kernel needs to be
  recompiled type


          cat /proc/filesystems



  It should show you a line saying that the kernel knows ncpfs.

  If ncpfs is not there, you can either recompile the kernel or add
  ncpfs as a module. For recompiling the kernel you should type 'make
  config' and when it asks you for

  The IPX protocol (CONFIG_IPX) [N/y/?]

  simply answer 'y'. Probably you do not need the full internal net that
  you are asked for next. Once the kernel is successfully installed,
  reboot, check /proc/filesystems and if everything is OK proceed with
  the installation of the ncpfs utilities. Change directory to the
  location holding your downloaded ncpfs files, and type 'make'. After
  the compilation is finished type 'make install' to install the various
  utilities and man pages.


  5.1.2.  Mounting NCPFS

  To check the installation type


          ipx_configure --auto_interface=on --auto_primary=on

       ....wait for 10 seconds and type

          slist



  You should be able to see a list of your Netware servers. Now we are
  ready to share files from the Netware server.

  Suppose we need to access HTML files from directory \home\htmldocs on
  volume VOL1: on the server MYDOM_NW, I recommend that you create a new
  user (say) 'EXPORT' with password 'EXP123' on this server to whom you
  grant appropriate access rights to this directory using SYSCON or
  NWADMIN.

  On the Linux machine create a new directory /mnt/MYDOM_NW. Now type
  the command


          ncpmount -S MYDOM_NW -U EXPORT -P EXP123 /mnt/MYDOM_NW



  to mount the netware file system. Typing the command


          ls /mnt/MYDOM_NW/vol1/home/htmldocs



  will show you a list of all the files in MYDOM_NW/VOL1:\HOME\HTMLDOCS
  (using Netware file notation). If you have any problems please read
  the IPX HOWTO at http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html for
  more insights into the IPX system.



  5.2.  SMBFS

  To share the files on the Windows server you will need support for SMB
  (smbfs).

  You will need to download the SMB filesystem utilities from
  ftp://sunsite.unc.edu/pub/Linux/system/filesystems/smbfs/smbfs.tgz
  (currently smbfs-2.0.1) from Sunsite.


  5.2.1.  Installation

  To install the smbfs utilities, type


          zcat smbfs.tgz | tar xvf -



  to expand the files into its own directory. In this case you will get
  a directory smbfs-2.0.1 Change your directory to this smbfs directory
  before proceeding with the installation. Read the README and edit the
  Makefile if necessary.

  The installation of smbfs depends on the kernel version you are using.
  For kernel 1.2, you should simply type 'make'. Subsequently typing
  'make install' will install the executables and man pages.

  If you use Kernel 2.0 or later, you might have to recompile your
  kernel. With these kernels, the kernel part of smbfs is already
  included in the main source tree. To check if the kernel needs to be
  recompiled type


          cat /proc/filesystems



  It should show you a line saying that the kernel knows smbfs.

  If smbfs is not there, you can either recompile the kernel or add
  smbfs as a module. For recompiling the kernel you should type 'make
  config' and when it asks you for adding SMB filesystem support simply
  answer yes. Once the kernel is successfully installed, reboot, check
  /proc/filesystems and if everything is OK proceed with the
  installation of the smbfs utilities. Change directory to the location
  holding your downloaded smbfs files, and type 'make'. After the
  compilation is finished type 'make install' to install the various
  utilities and man pages.


  5.2.2.  Mounting SMBFS

  In our example let us assume that the WinNT server is called
  'MYDOM_NT' and is sharing its directory C:\PUB\HTMLDOCS with a share
  name of 'HTMLDOCS' without a password. On the Linux machine create a
  new directory /mnt/MYDOM_NT. Now type the command


          smbmount //MYDOM_NT/HTMLDOCS /mnt/MYDOM_NT -n



  to mount the SMB (windows share) file system. If this does not work
  try


          smbmount //MYDOM_NT/COMMON /mnt/MYDOM_NT -n -I 172.16.0.3



  Typing the command


          ls /mnt/MYDOM_NT



  will show you a list of all the files in bsol;bsol;MYDOM_NT\PUB\HTML-
  DOCS (using Windows file notation).

  5.3.  NFS

  First you will need a kernel with the NFS file system either compiled
  in or available as a module.

  Suppose you have a Unix host running NFS with the name MYDOM_UNIX and
  an IP address of 172.16.0.4. You can check the directories that are
  being exported (shared) by this host by typing the command



          showmount -e 172.16.0.4



  Once we know the exported directories you can mount them by entering a
  appropriate mount command. I recommend that you create a subdirectory
  under '/mnt' (say) 'MYDOM_UNIX' and use that as your mount point.



          mount -o rsize=1024,wsize=1024 172.16.0.4:/pub/htmldocs /mnt/MYDOM_UNIX



  The rsize and wsize may have to be changed depending on your environ-
  ment.

  If you have any problems please read the NFS HOWTO at
  http://sunsite.unc.edu/mdw/HOWTO/NFS-HOWTO.html for more insights into
  the NFS system.



  6.  Accessing the Web

  Now that we have setup the HTTP server, the clients and interconnected
  the Linux server with the other servers, we need to make some small
  adjustments on the Linux server to be able to access these mounted
  filesystems from the Web Browser.


  6.1.  Accessing the mounted filesystems

  To access the mounted directories in your HTML pages you have two
  methods:

  o  Create a link in DocumentRoot (/usr/local/etc/httpd/htdocs) to
     refer to the mounted directory as


          ln -s /mnt/MYDOM_NW/vol1/home/htmldocs netware
                            or

          ln -s /mnt/MYDOM_NT    winNT
                            or

          ln -s /mnt/MYDOM_UNIX    unix



  o  to edit the file srm.conf in your /usr/local/etc/httpd/conf
     directory and add a new alias.
         # Alias fakename realname
         Alias /icons/     /usr/local/etc/httpd/icons/

         # alias for netware server
         Alias /netware/   /mnt/MYDOM_NW/vol1/home/htmldocs/
         Alias /winNT/     /mnt/MYDOM_NT/
         Alias /unix/      /mnt/MYDOM_UNIX



  And restart your HTTPd. You can access the documents on the netware
  server by referring to them as http://linux.mydomain/netware/index.htm
  for the netware files and similar notations for the others.


  6.2.  Connecting to the Internet

  You can finally connect your Intranet to the Internet to access E-Mail
  and all the wonderful information out there. I propose to write a
  brief note on how to do this in a future revision. Detailed
  explanations are available in the ISP Hookup HOWTO from
  http://sunsite.unc.edu/mdw/HOWTO/ISP-Hookup-HOWTO.html and Diald mini
  HOWTO at http://sunsite.unc.edu/mdw/HOWTO/mini/Diald for setting up
  these connections.


  6.3.  Other uses

  The HTTP server can be used in the office to provide transparent
  access to information residing on different servers, at several
  locations and directories. The data can be simple documents in Word,
  Lotus spreadsheets, or complex databases.

  The application of this technology is being typically used as
  follows:-


  o  Publishing corporate documents

     These documents can include newsletters, annual reports, maps,
     company facilities, price lists, product information literature,
     and any document which is of value within the corporate entity.

  o  Access into searchable directories

     Rapid access to corporate phone books and the like. This data can
     be mirrored at a Web site or, via CGI scripts, the Web server can
     serve  as a gateway to back-end pre-existing or new applications.
     This means that, using the same standard access mechanisms,
     information can be made more widely available and in a simpler
     manner.  This means that it can be used to create an interface with
     RDBMS  like ORACLE and SYBASE for generating real-time information.
     Here is a list of links to such sites on the Web.

     - Web Access -
     http://cscsun1.larc.nasa.gov/~beowulf/db/web_access.html - CGI
     gateways - HTTP://www.w3.org/hypertext/WWW/RDBGate/Overview.html


  o  Corporate/Department/Individual pages

     As cultures change within organistions to the point where even each
     department moves towards their own individual mission statements,
     the Intranet technology provides the ideal medium to communicate
     current information to the Department or Individual. Powerful
     search engines provide the means for people to find the group or
     individual who has the answers to the continuous questions which
     arise in the normal day-to-day course of doing business.

  o  Simple Groupware applications

     With HTML forms support, sites can provide sign-up sheets, surveys
     and simple scheduling.

  o  Software distribution

     Administrators can use the Intranet to deliver software and up-
     dates on-demand to users across the corporate network . This can be
     done with 'Java' which allows the creation and transparent
     distribution of objects on-demand rather than just data or
     applications. This is indeed possible more easily with the newer
     versions of Linux which has builtin support for Java.

  o  Mail

     With the move to the use of Intranet mail products with standard
     and simple methods for attachment of documents, sound, vision and
     other multimedia between individuals, mail is being pushed further
     forward as a simple, de facto communications method. Mail is
     essentially individual to individual, or individual to small group,
     communication. Several utilities are available on the Linux
     platform to setup an E-mail system like sendmail, pop3d, imapd.


  o  User Interface

     The Intranet technology is evolving so rapidly that the tools
     available, in particular HTML, can be used to dramatically change
     the way we interface with systems. With HTML you can build an
     Interface which is only limited by the creators imagination. The
     beauty about using Intranet technologies for this is that it is so
     simple. Clicking a hyperlink from HTML can take you to another
     page, it could ring an alarm, run a yearend procedure or anything
     else that a computer program can do.


  7.  More things to do

  Here is a list of other interesting things to do with your Linux
  Intranet server. All the software mentioned below is freeware or
  shareware.

  o  Browse the Linux server using Network Neighbourhood in Win95/ NT;
     Setup a WINS like NBT server. Check out the SAMBA Web page at
     http://lake.canberra.edu.au/pub/samba/samba.html

  o  Implement a search engine on your Intranet. Connect to ht://Dig at
     http://htdig.sdsu.edu/

  o  Use CUSeeMe by setting up a local reflector. Refer to their page at
     Cornell http://cu-seeme.cornell.edu/

  o  Setup Web Conferencing. Use COW from http://thecity.sfsu.edu/COW/

  o  Deploy a SQL database. Refer to the mSQL Home page at
     http://Hughes.com.au/

  o  Setup FTP,Gopher,Finger,Bootp servers on the Netware server. Get
     them at http://mft.ucs.ed.ac.uk/


  o  Emulate a Netware server. Check out the NCP Utilities at
     ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/

     If you find other interesting things to do with your Linux Intranet
     server, please feel free to mail me.


  8.  Credits and Legalities



  8.1.  Thanks

  Thanks to the people at NCSA for providing such excellent
  documentation, David Anderson and all others for trying out this HOWTO
  and sending in their comments. The details on Netware/IP are courtesy
  Romel Flores (rom@mnl.sequel.net).



  8.2.  Copyright information

  This document is copyrighted (C) 1996,1997 Pramod Karnad and
  distributed under the following terms:


  o  Linux HOWTO documents may be reproduced and distributed in whole or
     in part, in any medium physical or electronic, as long as this
     copyright notice is retained on all copies. Commercial
     redistribution is allowed and encouraged; however, the author would
     like to be notified of any such distributions.

  o  All translations, derivative works, or aggregate works
     incorporating any Linux HOWTO documents must be covered under this
     copyright notice.  That is, you may not produce a derivative work
     from a HOWTO and impose additional restrictions on its
     distribution. Exceptions to these rules may be granted under
     certain conditions; please contact the Linux HOWTO coordinator at
     the address given below.

  o  If you have questions, please contact Tim Bynum, the Linux HOWTO
     coordinator, at linux-howto@sunsite.unc.edu  Finger for phone
     number and snail mail address.



  Java CGI HOWTO
  by David H. Silber javacgi-document@orbits.com
  v0.5, 1 December 1998

  This HOWTO document explains how to set up your server to allow CGI
  programs written in Java and how to use Java to write CGI programs.
  Although HOWTO documents are targetted towards use with the Linux
  operating system, this particular one is not dependant on the particu-
  lar version of unix used.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Prior Knowledge
     1.2 This Document
     1.3 The Package
     1.4 The Mailing List

  2. Setting Up Your Server to Run Java CGI Programs (With Explanations)

     2.1 System Requirements
     2.2 Java CGI Add-On Software
     2.3 Unpacking the Source
     2.4 Decide On Your Local Path Policies
     2.5 Testing your installation.

  3. Setting Up Your Server to Run Java CGI Programs (The Short Form)

  4. Executing a Java CGI Program

     4.1 Obstacles to Running Java Programs Under the CGI Model
        4.1.1 You can't run Java programs like ordinary executables.
        4.1.2 Java does not have general access to the environment.
     4.2 Overcoming Problems in Running Java CGI Programs
        4.2.1 The java.cgi script.
        4.2.2 Invoking java.cgi from an HTML form.

  5. Using the Java CGI Classes.

     5.1 CGI
        5.1.1 Class Syntax
        5.1.2 Class Description
        5.1.3 Member Summary
        5.1.4 See Also
        5.1.5 CGI()
        5.1.6 getNames()
        5.1.7 getValue()
     5.2 CGI_Test
        5.2.1 Member Summary
        5.2.2 See Also
        5.2.3 main()
     5.3 Email
        5.3.1 Class Syntax
        5.3.2 Class Description
        5.3.3 Member Summary
        5.3.4 See Also
        5.3.5 Email()
        5.3.6 send()
        5.3.7 sendTo()
        5.3.8 subject()
     5.4 Email_Test
        5.4.1 Member Summary
        5.4.2 See Also
        5.4.3 main()
     5.5 HTML
        5.5.1 Class Syntax
        5.5.2 Class Description
        5.5.3 Member Summary
        5.5.4 See Also
        5.5.5 HTML()
        5.5.6 author()
        5.5.7 definitionList()
        5.5.8 definitionListTerm()
        5.5.9 endList()
        5.5.10 listItem()
        5.5.11 send()
        5.5.12 title()
     5.6 HTML_Test
        5.6.1 Member Summary
        5.6.2 See Also
        5.6.3 main()
     5.7 Text
        5.7.1 Class Syntax
        5.7.2 Class Description
        5.7.3 Member Summary
        5.7.4 See Also
        5.7.5 add()
        5.7.6 addLineBreak()
        5.7.7 addParagraph()

  6. Future Plans

  7. Changes

     7.1 Changes from 0.4 to 0.5
     7.2 Changes from 0.3 to 0.4
     7.3 Changes from 0.2 to 0.3
     7.4 Changes from 0.1 to 0.2


  ______________________________________________________________________

  1.  Introduction

  Because of the way that Java is designed the programmer does not have
  easy access to the system's environment variables.  Because of the way
  that the Java Development Kit (JDK) is set up, it is necessary to use
  multiple tokens to invoke a program, which does not mesh very well
  with the standard HTML forms/CGI manner of operations.  There are ways
  around these limitations, and I have implemented one of them.  Read
  further for details.

  Since I wrote the previous paragraph in 1996, there have been many
  changes in the Java technology.  It is likely that a better solution
  to running server-side Java programs is now available -- perhaps you
  should take a look at servlets.



  1.1.  Prior Knowledge

  I am assuming that you have a general knowledge of HTML and CGI
  concepts and at least a minimal knowledge of your HTTP server.  You
  should also know how to program in Java, or a lot of this will not
  make sense.



  1.2.  This Document

  The latest version of this document can be read at
  http://www.orbits.com/software/Java_CGI.html.



  1.3.  The Package

  The latest version of the package described here can be accessed via
  anonymous FTP at ftp://ftp.orbits.com/pub/software/java_cgi-0.5.tgz.
  The package distribution includes SGML source for this document.
  The package is distributed under the terms of the GNU Library General
  Public License.  This document can be distributed under the terms of
  the Linux HOWTO copyright notice.

  If you use this software, please make some reference to
  http://www.orbits.com/software/Java_CGI.html, so that others will be
  able to find the Java CGI classes.

  I have run out of time to maintain and support this package, so this
  will probably be its final release.  If anyone out there is
  sufficiently enamoured of this software that they wish to take over
  the maintenace of it, please contact me at javacgi-
  document@orbits.com.



  1.4.  The Mailing List

  I have created a majordomo list to allow people to help each-other
  work through their mutual problems in installing and using this
  software.  Send a message to javacgi-request@orbits.com, containing
  the word subscribe.



  2.  Setting Up Your Server to Run Java CGI Programs (With Explana-
  tions)

  This section will lead you through installing my Java CGI package with
  copious explanations so that you know what the effects of your actions
  will be.  If you just want to install the programs and don't care
  about the whys & wherefores, skip to ``Setting Up Your Server to Run
  Java CGI Programs (The Short Form)''.



  2.1.  System Requirements

  This software should work on any unix-like web server that has the
  Java Development Kit installed.  I am using it on a Debian Linux
  system running apache as the HTTP daemon.  If you find that it does
  not run on your server, please contact the mailing list.  See ``The
  Mailing List'' for details.

  Unfortunatly, the Java run-time interpreter seems to be something of a
  memory hog -- you may want to throw another few megabytes of RAM onto
  your server if you will be using Java CGI programs a lot.



  2.2.  Java CGI Add-On Software

  The software that I wrote to aid in this is called Java CGI.  You can
  get it from ftp://ftp.orbits.com/pub/software/java_cgi-0.5.tgz.  (The
  version number may have changed.)



  2.3.  Unpacking the Source

  Find a convenient directory to unpack this package into.  (If you
  don't already have a standard place to put packages, I suggest that
  you use /usr/local/src.)  Unpack the distribution with this command:

  gzip -dc java_cgi-0.5.tgz | tar -xvf -


  This will create a directory called java_cgi-0.5.  In there you will
  find the files referenced in the rest of this document.  (If the ver-
  sion number has changed, use the instructions from within that distri-
  bution from this point on.)



  2.4.  Decide On Your Local Path Policies

  You need to decide where you want your Java CGI programs to live.
  Generally, you will want to put them in a directory in parallel with
  your cgi-bin directory.  My apache server came configured to use
  /var/www/cgi-bin as the cgi-bin directory, so I use /var/www/javacgi
  as the directory to put Java CGI programs in.  You probably do not
  want to put your Java CGI programs into one of the existing CLASSPATH
  directories.  Edit the Makefile to reflect your system configuration.
  Make sure that you are logged in as the root user and run make
  install.  This will compile the Java programs, modify the java.cgi
  script to fit in with your system and install the programs in the
  appropriate places.  If you want the HTML version of this
  documentation and an HTML test document in addition, run make all
  instead.



  2.5.  Testing your installation.

  Installed from the distribution are HTML documents called
  javacgitest.html, javaemailtest.html and javahtmltest.html.  If you
  installed all in the previous section, it will be in the directory you
  specified for WEBDIR in the Makefile.  If you didn't, you can run make
  test to build them from javacgitest.html-dist, javaemailtest.html-dist
  and javahtmltest.html-dist.

  When you are sure that your installation is working correctly, you may
  wish to remove CGI_Test.class, Email_Test.class and HTML_Test.class
  from your JAVACGI directory and javacgitest.html, javaemailtest.html
  and javahtmltest.html from your WEBDIR directory as they show the user
  information that is normally only available to the server.



  3.  Setting Up Your Server to Run Java CGI Programs (The Short Form)


  o  Get the Java CGI package from
     ftp://ftp.orbits.com/pub/software/java_cgi-0.5.tgz.  (The version
     number may have changed.)

  o  Unpack the distribution with this command:

     gzip -dc java_cgi-0.5.tgz | tar -xvf -


  (If the version number has changed, use the instructions from within
  that distribution from this point on.)

  o  Edit the Makefile you will find in the newly created directory
     java_cgi-0.5 as appropriate to your system.

  o  As root, run make install.  This will compile the Java programs,
     apply your system-specific information and install the various
     files.  If you want the HTML version of this documentation and an
     HTML test document, run make all instead.

  o  You should be ready to go.



  4.  Executing a Java CGI Program



  4.1.  Obstacles to Running Java Programs Under the CGI Model

  There are two main problems in running a Java program from a web
  server:



  4.1.1.  You can't run Java programs like ordinary executables.

  You need to run the Java run-time interpreter and provide the initial
  class (program to run) on the command-line.  With an HTML form, there
  is no provision for sending a command-line to the web server.



  4.1.2.  Java does not have general access to the environment.

  Every environment variable that will be needed by the Java program
  must be explicitly passed in.  There is no method similar to the C
  getenv() function.



  4.2.  Overcoming Problems in Running Java CGI Programs

  To deal with these obstacles, I wrote a shell CGI program that
  provides the information needed by the Java interpreter.



  4.2.1.  The java.cgi script.

  This shell script manages the interaction between the HTTP daemon and
  the Java CGI program that you wish to use.  It extracts the name of
  the program that you want to run from the server-provided data.  It
  collects all of the environment data into a temporary file.  Then, it
  runs the Java run-time interpreter with the name of the file of
  environment information and the program name added to the command-
  line.

  The java.cgi script was configured and installed in ``Decide On Your
  Local Path Policies''.



  4.2.2.  Invoking java.cgi from an HTML form.

  My forms that use Java CGI programs specify a form action as follows:

  <form action="/cgi-bin/java.cgi/CGI_Test" method="POST">


  Where /cgi-bin/ is your local CGI binary directory, java.cgi is the
  Java front-end that allows us to run Java programs over the web and
  CGI_Test is an example of the name of the Java program to run.



  5.  Using the Java CGI Classes.

  There are currently three main classes supported -- ``CGI'', ``Email''
  and ``HTML''.  I am considering adding classes to deal with MIME-
  formatted input and output -- MIMEin & MIMEout, respectively.

  There are also a few support and test classes.  ``CGI_Test'',
  ``Email_Test'' and ``HTML_Test'' are intended to be used to test your
  installation.  They can also be used as a starting-point for your own
  Java programs which use this class library.  The ``Text'' class is the
  superclass for both the Email and the HTML classes.



  5.1.  CGI



  5.1.1.  Class Syntax

  public class CGI



  5.1.2.  Class Description

  The CGI class holds the ``CGI Information'' -- Environment variables
  set by the web server and the name/value sent from a form when its
  submit action is selected.  All information is stored in a Properties
  class object.

  This class is in the ``Orbits.net'' package.



  5.1.3.  Member Summary



  ______________________________________________________________________
          CGI()         //  Constructor.
          getNames()    //  Get the list of names.
          getValue()    //  Get form value by specifying name.
  ______________________________________________________________________



  5.1.4.  See Also

  CGI_Test.



  5.1.5.  CGI()


     Purpose
        Constructs an object which contains the available CGI data.

     Syntax
        public CGI()

     Description
        When a CGI object is constructed, all available CGI information
        is sucked-up into storage local to the new object.



  5.1.6.  getNames()


     Purpose
        List the names which are defined to have corresponding values.

     Syntax
        public Enumeration getKeys ()

     Description
        Provides the full list of names for which coresponding values
        are defined.

     Returns
        An Enumeration of all the names defined.



  5.1.7.  getValue()


     Purpose
        Retrieves the value associated with the name specified.

     Syntax
        public String getValue ( String name )

     Description
        This method provides the corespondence between the names and
        values sent from an HTML form.

     Parameter

        name
           The key by which values are selected.

     Returns
        A String containing the value.



  5.2.  CGI_Test

  This class provides both an example of how to use the CGI class and a
  test program which can be used to confirm that the Java CGI package is
  functioning correctly.



  5.2.1.  Member Summary


  ______________________________________________________________________
          main()      //  Program main().
  ______________________________________________________________________



  5.2.2.  See Also

  CGI.



  5.2.3.  main()


     Purpose
        Provide a main() method.

     Syntax
        public static void main( String argv[] )

     Description
        This is the entry point for a CGI program which does nothing but
        return a list of the available name/value pairs and their
        current values.

     Parameter

        argv[]
           Arguments passed to the program by the java.cgi script.
           Currently unused.



  5.3.  Email



  5.3.1.  Class Syntax

  public class Email extends Text



  5.3.2.  Class Description

  Messages are built up with the Text class add*() methods and the e-
  mail-specific methods added by this class.  When complete, the message
  is sent to its destination.

  This class is in the ``Orbits.net'' package.



  5.3.3.  Member Summary


  ______________________________________________________________________
          Email()      //  Constructor.
          send()       //  Send the e-mail message.
          sendTo()     //  Add a destination for message.
          subject()    //  Set the Subject: for message.
  ______________________________________________________________________



  5.3.4.  See Also

  Email_Test, Text.



  5.3.5.  Email()


     Purpose
        Constructs an object which will contain an email message.

     Syntax
        public Email()

     Description
        Sets up an empty message to be completed by the Email methods.

     See Also
        Text.



  5.3.6.  send()


     Purpose
        Send the e-mail message.

     Syntax
        public void send ()
     Description
        This formats and sends the message.  If no destination address
        has been set, there is no action taken.



  5.3.7.  sendTo()


     Purpose
        Add a destination for this message.

     Syntax
        public String sendTo ( String address )

     Description
        Add address to the list of destinations for this method.  There
        is no set limit to the number of destinations an e-mail message
        may have.  I'm sure that if you build up the list large enough,
        you can exceed the size of the parameter list that the Mail
        Transport Agent can accept or use up your memory.

     Parameter/

        address
           A destination to send this message to.



  5.3.8.  subject()


     Purpose
        Set the subject for this message.

     Syntax
        public void subject ( String subject )

     Description
        This method sets the text for the e-mail's Subject: line.  If
        called more than once, the latest subject set is the one that is
        used.

     Parameter

        subject
           The text of this message's Subject: line.



  5.4.  Email_Test

  This class provides both an example of how to use the Email class and
  a test program which can be used to confirm that the Java CGI package
  is functioning correctly.



  5.4.1.  Member Summary



  ______________________________________________________________________
          main()      //  Program main().
  ______________________________________________________________________



  5.4.2.  See Also

  Email.



  5.4.3.  main()


     Purpose
        Provide a main() method.

     Syntax
        public static void main( String argv[] )

     Description
        This is the entry point for a CGI program which returns a list
        of the available name/value pairs and their current values.  It
        will also send this list to the address specified in the Email
        variable.

     Parameter

        argv[]
           Arguments passed to the program by the java.cgi script.
           Currently unused.



  5.5.  HTML



  5.5.1.  Class Syntax

  public class HTML extends Text



  5.5.2.  Class Description

  Messages are built up with the Text class add*() methods and the HTML-
  specific methods added by this class.  When complete, the message is
  sent to its destination.

  Currently, there is no error checking to confirm that the list-
  building methods are being used in a correct order, so the  programmer
  must take pains not to violate HTML syntax.

  This class is in the ``Orbits.net'' package.


  5.5.3.  Member Summary


  ______________________________________________________________________
          HTML()                  //  Constructor.
          author()                //  Set the name of the document author.
          definitionList()        //  Start a definition list.
          definitionListTerm()    //  Add a term to a definition list.
          endList()               //  End a list.
          listItem()              //  Add an entry to a list.
          send()                  //  Send the HTML message.
          title()                 //  Set the text for the document title.
  ______________________________________________________________________



  5.5.4.  See Also

  HTML_Test, Text.



  5.5.5.  HTML()


     Purpose
        Constructs an object which will contain an HTML message.

     Syntax
        public HTML()

     Description
        Sets up an empty message to be completed by the HTML methods.

     See Also
        Text.



  5.5.6.  author()


     Purpose
        Set the name of the document author.

     Syntax
        public void author ( String author )

     Description
        Set the name of the document author to author.

     Parameter/

        author
           The text to use as the author of this message.

     See Also
        title().



  5.5.7.  definitionList()


     Purpose
        Start a definition list.

     Syntax
        public void definitionList ()

     Description
        Start a definition list.  A definition list is a list
        specialized so that each entry in the list is a term followed by
        the definition text for that term.  The start of a definition
        list should be followed by the creation of (at least) one
        term/text pair and a call to the endList() method.  Note that,
        currently, lists cannot be nested.

     See Also
        definitionListTerm(), endList(), listItem().



  5.5.8.  definitionListTerm()


     Purpose
        Add a term to a definition list.

     Syntax
        public void definitionListTerm ()

     Description
        Add a term to a definition list.  The text for the term part of
        the current list entry should be appended to the message after
        this method is called and before a corresponding listItem method
        is called.

     See Also
        definitionList(), listItem().



  5.5.9.  endList()


     Purpose
        End a list.

     Syntax
        public void endList ()

     Description
        End a list.  This method closes out a list.  Note that,
        currently, lists cannot be nested.

     See Also
        definitionList().



  5.5.10.  listItem()


     Purpose
        Add an entry to a list.

     Syntax
        public void listItem ()

        public void listItem ( String item )

        public boolean listItem ( String term, String item )

     Description
        Add an entry to a list.  If the first form is used, the text for
        the current list item should be appended to the message after
        this method is called and before any other list methods are
        called.  In the second and third forms, the item text is
        specified as a parameter to the method instead of (or in
        addition to) being appended to the message.  The third form is
        specific to definition lists and provides both the term and the
        definition of the list entry.

     Parameters

        item
           The text of this list entry.

        term
           The text of this definition list entry's term part.

     See Also
        definitionList(), definitionListTerm(), endList().



  5.5.11.  send()


     Purpose
        Send the HTML message.

     Syntax
        public void send ()

     Description
        Send the HTML message.



  5.5.12.  title()


     Purpose
        Set the text for the document title.

     Syntax
        public void title ( String title )

     Description
        Set the text for the document title.

     Parameter

        title
           The text of this message's title.

     See Also
        author().



  5.6.  HTML_Test

  This class provides both an example of how to use the HTML class and a
  test program which can be used to confirm that the Java CGI package is
  functioning correctly.



  5.6.1.  Member Summary


  ______________________________________________________________________
          main()      //  Program main().
  ______________________________________________________________________



  5.6.2.  See Also

  HTML.



  5.6.3.  main()


     Purpose
        Provide a main() method.

     Syntax
        public static void main( String argv[] )

     Description
        This is the entry point for a CGI program which returns a list
        of the available name/value pairs in an HTML document, with each
        name/value pair displayed in a definition list element.

     Parameter

        argv[]
           Arguments passed to the program by the java.cgi script.
           Currently unused.



  5.7.  Text



  5.7.1.  Class Syntax

  public abstract class Text



  5.7.2.  Class Description

  This class is the superclass of the Email and HTML classes.  Messages
  are built up with the methods in this class and completed and
  formatted with the methods in subclasses.

  This class is in the ``Orbits.text'' package.



  5.7.3.  Member Summary


  ______________________________________________________________________
          Text()            //  Constructor.
          add()             //  Add text to this object.
          addLineBreak()    //  Add a line break.
          addParagraph()    //  Add a paragraph break.
  ______________________________________________________________________



  5.7.4.  See Also

  Email, HTML.



  5.7.5.  add()


     Purpose
        Add text to this item.

     Syntax
        public void add ( char addition )

        public void add ( String addition )

        public void add ( StringBuffer addition )

     Description
        Add addition to the contents of this text item.

     Parameter

        addition
           Text to be added to the text item.

     See Also
        addLineBreak(), addParagraph().



  5.7.6.  addLineBreak()


     Purpose
        Force a line break at this point in the text.

     Syntax
        public void addLineBreak ()

     Description
        Add a line break to the text at the current point.

     See Also
        add(), addParagraph().



  5.7.7.  addParagraph()


     Purpose
        Start a new paragaph.

     Syntax
        public void add ()

     Description
        Start a new paragraph at this point in the text flow.

     See Also
        add(), addLineBreak().



  6.  Future Plans


  o  Add to the Email class:

     Email( int capacity )
        Used when we know how much space the message will need to have
        allocated.

     sendTo( String [] address )
        Add a list of primary destinations to the e-mail message.

     sendCc( String address )
        Add a Carbon-Copy destination to the e-mail message.

     sendCc( String [] address )
        Add a list of Carbon-Copy destinations to the e-mail message.

     sendBcc( String address )
        Add a Blind Carbon-Copy destination to the e-mail message.

     sendBcc( String [] address )
        Add a list of Blind Carbon-Copy destinations to the e-mail
        message.

  o  Add to the HTML class:

     HTML( int capacity )
        Used when we know how much space the message will need to have
        allocated.
     public void unorderedList()
        Start an unordered list.

     public void orderedList()
        Start an ordered list.

     public void directoryList()
        Start a directory list.

     public void menuList()
        Start a menu list.

     void anchor( String anchorName )
        Specify an anchor.

     void link( String url, String text )
        Specify a link.

     void applet( String url, String altText )
        Specify an applet link.

  o  Allow HTML lists to be nested.

  o  Add error checking code to enforce correct ordering of HTML list
     formatting codes.

  o  The location of the file of environment data should be configurable
     from the Makefile.

  o  Get rid of the spurious empty name/value pair that appears in the
     list when we are dealing with the GET method of data transfer.

  o  Consider having CGI implement the java.util.Enumeration interface
     to successively provide variable names.

  o  Add a Test class, which would use every method in this package.

  o  Document how CGI_Test, Email_Test and HTML_Test build on each other
     to provide incremental tests for debugging purposes.

  o  Document how Test uses every feature available in this package.



  7.  Changes



  7.1.  Changes from 0.4 to 0.5


  o  Changed documentation and comments to reflect the final nature of
     this release.



  7.2.  Changes from 0.3 to 0.4


  o  Fleshed out the HTML class to provide minimal functionality.


  o  Wrote the HTML_Test class and javahtmltest.html-dist.

  o  Added the HTML methods to deal with a definition list.



  7.3.  Changes from 0.2 to 0.3


  o  Added the Text and Email classes.  HTML was also added, but it is
     merely a stub at this point.

  o  Put the various classes into packages.  The main classes are in
     Orbits.net.*, the support class Text is in Orbits.text.Text.

  o  Changed CGItest to CGI_Test.

  o  Added the Email_Test class.



  7.4.  Changes from 0.1 to 0.2


  o  The environment variables are put into a temportary file instead of
     being crammed into the Java inperpreter command-line.  The CGI
     class and java.cgi had to be modified.

  o  The javacgitest.html document is made part of the distribution.

  o  The text files which are modified by make upon installation are
     provided with names that end with -dist.




Linux on the Sun JavaStation NC HOWTO

Robert S. Dubinski

   2000-Jun-16
   
   This is a HOWTO document describing how to enable the GNU/Linux OS on
   the Sun JavaStation NC.
     _________________________________________________________________
   
   Table of Contents
   1. [1]META Information
          
        1.1. [2]The Purpose of this Document
        1.2. [3]Acknowledgments
        1.3. [4]Document Contributors
        1.4. [5]History of this document
        1.5. [6]Document Copyright and Licenses
        1.6. [7]Location of the Latest Version and Source
                
   2. [8]What is a JavaStation?
          
        2.1. [9]What is a JavaStation NC?
        2.2. [10]Definition of an NC including the Differentiation from
                PC's
                
        2.3. [11]Description of the JavaStation Model Line including
                Hardware Specs
                
        2.4. [12]Reasons for Running Linux and NC Myths Dispelled
        2.5. [13]Why JavaStations are No Longer Produced
        2.6. [14]Where to Purchase a JavaStation
                
   3. [15]Background Requirements for Linux on a JavaStation
          
        3.1. [16]Complete Hardware Requirements
        3.2. [17]Network Service Requirements
        3.3. [18]Understand the JavaStation Boot Sequence
        3.4. [19]Additional Software Requirements: Replacement Firmware
                (PROLL)
                
        3.5. [20]Decide on your Filesystem: NFS-Root, or Embedded?
        3.6. [21]Support Sites to Check Out: Metabyte
                
   4. [22]Build Your Kernel
          
        4.1. [23]Before you begin
        4.2. [24]Make sure you use 32-bit mode
        4.3. [25]Supported Linux Kernel Versions
        4.4. [26]Required Kernel Configuration Options
        4.5. [27]Necessary Patch for "Embedded-Root" FS Configurations
        4.6. [28]Build the JavaStation-Ready Kernel
        4.7. [29]JavaStation-Ready Kernel Images, System.map and
                ".config" File Samples
                
   5. [30]Build A JavaStation-Ready FileSystem
          
        5.1. [31]Preparing Yourself to Build Your Own Filesystem
        5.2. [32]Contents of the "/etc/fstab" File
        5.3. [33]The "Embedded-Root" Image Creation Procedure
        5.4. [34]Sample FileSystems
                
   6. [35]Set up Your Server
          
        6.1. [36]Preface
        6.2. [37]Setting up the RARP service
        6.3. [38]Setting up the DHCP service
        6.4. [39]Set up NFS service ("NFS-Root Options" Only)
        6.5. [40]Setting up for Boot with TFTP
        6.6. [41]The Last Configuration Step
        6.7. [42]What to See When Booting Linux
                
   7. [43]Troubleshooting
          
        7.1. [44]When booting, the message "The file just loaded does not
                appear to be executable." Why?
                
        7.2. [45]When booting, the message "no a.out magic" appears and
                halts the boot. Why?
                
        7.3. [46]I tried booting a Krups but JavaOS comes up. I don't
                even have JavaOS!
                
        7.4. [47]Cannot Boot an "Embedded-Root" image > 10 MB on my
                JavaStation. Why?
                
        7.5. [48]After Booting, Typing Anything Yields Garbage
                Characters. Why?
                
        7.6. [49]In X Sessions to a Solaris server, the font server "xfs"
                crashes. Why?
                
        7.7. [50]Performing Indirect XDMCP to a Solaris Server Results in
                Session Login Failures. Why?
                
        7.8. [51]TFTPd config doesn't work on SUSE. Why?
                
   8. [52]Answers to Miscellaneous Questions
          
        8.1. [53]Regarding RARP: Is it Needed or Not?
        8.2. [54]Can One Use the Smart Card Reader on the Espresso
                models?
                
        8.3. [55]Can One Use the Solaris DHCP server instead of ISC?
        8.4. [56]Can One Pass Arguments to "/sbin/init" in a Diskless
                Boot like This?
                
        8.5. [57]Enabling X on the JavaStation
        8.6. [58]Is There Mailing List Help?
        8.7. [59]Can One Boot a JavaStation from Onboard Flash Memory?
                
   9. [60]Unanswered Questions
          
        9.1. [61]Does "Piggyback" work for the x86 too?
        9.2. [62]Where Can One Find Espressos for Sale?
        9.3. [63]Do Tools Exist to Configure Net Boot Entries Quickly?
        9.4. [64]What can one use the Krups Flash memory for?
                
   10. [65]Appendix
          
        10.1. [66]Mr. Coffee Jumper Info
        10.2. [67]Krups Jumper Info
        10.3. [68]JavaStation Photo Gallery
                
1. META Information

   This section lists the meta-information of this document. The hows,
   whys, location and changes to the structure of the document are
   documented here. The main content begins in the next chapter.
     _________________________________________________________________
   
1.1. The Purpose of this Document

   This document is to serve as a comprehensive HOWTO and FAQ collection
   regarding the Sun JavaStation NC and enabling the GNU/Linux OS on it.
   
   The intended audience of this document is anyone who has an interest
   in enabling Linux on the Sun JavaStations. The document structure is
   laid out to serve as either a top-to-bottom read for a newcomer, or as
   quick reference on a single topic for advanced users. Pointers to
   sample files submitted by users are included for extremely hurried
   readers.
   
   The author of this document is Robert Dubinski
   <[69]dubinski@mscs.mu.edu>, Computer Technician and UNIX systems
   administrator for [70]Marquette University's [71]Math, Statistics and
   Computer Science Department. In the MU MSCS department, 125
   JavaStations are currently running Linux, configured using the
   information, techniques and files presented in this document.
   
   In early 1999, Eric Brower <[72]ebrower@usa.net> wrote the first
   informal HOWTO for the JavaStation. Parts of this document are
   inspired by his work, and all unique information presented there have
   since been merged into this document.
   
   This HOWTO also aims to serve as a member document of the Linux
   Documentation Project. The LDP can be reached at:
   [73]http://www.linuxdoc.org
     _________________________________________________________________
   
1.2. Acknowledgments

   Enabling Linux on the JavaStations, and allowing this HOWTO to come to
   be would never have been possible without the fine work of the
   following people:
   
     * Pete Zaitcev <[74]zaitcev@metabyte.com> (JavaStation kernel mod
       author)
     * Eric Brower <[75]ebrower@usa.net> (XFree mods and author of the
       original embedded-build HOWTO)
     * Varol Kaptan <[76]varol@ulakbim.gov.tr> (made available his Krups
       images and patches. Backported kernel support to 2.2.x series)
     * David Miller <[77]davem@redhat.com> (the original Linux/SPARC
       kernel porter)
     * The Linux/SPARC kernel porters and mailing list
     * The thousands of contributors to the Linux kernel
       
   The HOWTO author wishes to give a second thank-you to Pete and Eric
   for their work:
   
   
   Pete got me going with Linux on the JavaStation in December 1998, has
   been the main kernel programmer adding in support for the JavaStation
   line, and despite his busy work schedule was nice enough to find time
   to answer all my email queries for help over the last 15 months.
   
   Eric worked on bringing X support to the JavaStation when it had none.
   He had been working on a dedicated server for the JavaStation in early
   1999, and kept me informed of his progress. In mid-1999, he switched
   tactics and sent a working framebuffer example to test out. He also
   wrote the first comprehensive mini-HOWTO for the JavaStations,
   answered my email questions, and got me interested in the embedded
   solution which I employ here at Marquette.
   
   Thank-you Pete and Eric!
   
   --Robert Dubinski
     _________________________________________________________________
   
1.3. Document Contributors

   The following people have contributed to this specific document:
   
     * Pete Zaitcev <[78]zaitcev@metabyte.com> (Proofreading and factual
       corrections of initial drafts)
     * Eric Brower <[79]ebrower@usa.net> (Proofreading and factual
       corrections of initial drafts)
     * Magdalena Wodzinska <[80]magdalena.wodzinska@marquette.edu>
       (Proofreading and document layout suggestions)
     * Richard Tomlinson <[81]Richard.Tomlinson@one2one.co.uk> (Document
       reader, Krups tester, feedback)
     * Michael R. Eckhoff <[82]foobar@null.net> (feedback on sample
       kernel)
       
   If you contributed a tidbit of info and are not listed, please email
   the document author to get yourself listed.
     _________________________________________________________________
   
1.4. History of this document

   Revision History
   Revision 1.05 16 Jun 2000
   Requested Format Changes and Fixes
   Revision 1.04 13 Jun 2000
   Suggested Fixes and Added Requests
   Revision 1.03 04 May 2000
   Minor Fixes, Requests
   Revision 1.02 28 Apr 2000
   Small fixes.
   Revision 1.01 25 Apr 2000
   "Brown Paper Bag" Revision.
   Revision 1.0 24 Apr 2000
   First submission to the LDP.
   Revision 0.9 18 Apr 2000
   Continued reorganization and final merges.
   Revision 0.7 15 Apr 2000
   Migration from LinuxDoc DTD to Docbook DTD.
   Revision 0.71 14 Apr 2000
   Received word doc was forwarded inside Sun.
   Revision 0.7 14 Apr 2000
   Linked on Metabyte Website.
   Revision 0.6 9 Apr 2000
   First semi-public release.
   Revision 0.4 24 Mar 2000
   First move to comprehensive HOWTO.
   Revision 0.2 15 Oct 1999
   More notes collected and merged.
   Revision 0.1 24 Jun 1999
   Initial scraps put together.
     _________________________________________________________________
   
1.5. Document Copyright and Licenses

   This particular document and its source as a whole is Copyright
   1999-2000, Robert Dubinski <[83]dubinski@mscs.mu.edu>. You may mirror
   or redistribute this document as a whole or in part for either public
   or commercial purposes provided the following: 1) you do not make any
   modifications to this work , 2) retain this license information and
   author copyright section, even when redistributing just a part of this
   document, and 3) include acknowledgement of where this document as a
   whole may be obtained . This ensures that any comments written by the
   document author do not get taken out of context or modified
   incorrectly, acknowledges the work of the author, allows for inclusion
   in commercial projects, and points readers to where they may find
   potentially updated versions of the information presented.
   
   The document author makes no warranties that all the information
   presented here is completely accurate, and cannot be held liable to
   any loss you experience as a result of the information you use from
   here.
   
   Best efforts have been made to ensure everything included is accurate
   as of the publication date listed at the beginning of this document,
   but there is always a possibility something may be wrong. In this
   case, doublecheck with alternative sources first before considering
   implementing anything at a production-level. If you find something
   wrong, drop the author a line at <[84]dubinski@mscs.mu.edu> or send me
   a patch to the document source, and corrections will be made
   immediately.
   
   In the future, this document may be re-released under the Open Content
   or other Free Document license, but for now all Open Documentation
   licenses are currently being investigated by the author. If you have
   comments into this legal matter, drop the author a line at
   <[85]dubinski@mscs.mu.edu>. As it stands, the license presented above
   captures the spirit of the LDP boilerplate license without
   specifically mentioning it.
   
   This document is a member document of the [86]Linux Documentation
   Project.
     _________________________________________________________________
   
1.6. Location of the Latest Version and Source

   The latest online version of this document can be found at:
   [87]http://www.mscs.mu.edu/~tech/Linux_on_JS .
   
   The pre-processed SGML source to this document, written to the Docbook
   DTD, is available from:
   [88]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/JavaStation-HOWTO.s
   gml
   
   Copies of this document are also available from the Linux
   Documentation Project at:
   [89]http://www.linuxdoc.org/HOWTO/JavaStation-HOWTO.
     _________________________________________________________________
   
2. What is a JavaStation?

   This chapter explains to the reader what the JavaStation line is, its
   components, NC concepts, how to get one, and why one would choose the
   Linux OS for it.
     _________________________________________________________________
   
2.1. What is a JavaStation NC?

   The JavaStation NC is a model line of network computers built and sold
   by [90]Sun Microsystems between November 1996 and March 2000. The
   JavaStation line was Sun's low-cost terminal option during that
   timeframe.
   
   The JavaStation hardware ran Sun's own JavaOS and either Sun's Hotjava
   web browser, Sun's HotJava Views task-manager software, or custom Java
   applications of the customer's choice.
   
   The JavaStation was originally billed in November 1996 sneak previews
   as a low-cost desktop terminal, providing customers access to hot new
   Java applications, "legacy" X applications, and "legacy" MS Windows
   apps. During its lifetime, The JavaStation's marketed functionality
   was changed twice from "desktop terminal" to "single-app desktop
   device" to finally a "browser-based kiosk device".
   
   At no time did Sun market the JavaStation as capable of running its
   flagship [91]Solaris operating system or the [92]Linux OS.
     _________________________________________________________________
   
2.2. Definition of an NC including the Differentiation from PC's

   A network computer, or NC, was hailed as "the next big thing" in
   computing from late 1995 to early 1998. Conventional PC's, called "fat
   clients", were expected to be minimized in businesses by thin-client
   NC's.
   
   Thin-clients get their OS, applications, and data files entirely
   through the network. They are different from dumb-terminals; they run
   full-scale graphical applications. Thin-clients are also different
   than graphical X-terminals. X-terminals typically run an X server and
   display the client programs of a remote server. Thin clients generally
   run full-scale graphical programs locally, such as a web browser, a
   Java application, or a "legacy-connectivity program", which enables
   the thin-client to display X apps or MS Windows apps which run on more
   powerful servers.
   
   Advantages of NC's include:
   
     * "Zero-Administration". (Add a new NC and it will get everything it
       needs off the network, without an admin ever needing to visit it.)
     * Lower Total-Cost-of-Ownership (TCO) (No internal hard drives,
       floppy drives or CD players reduces form-factor, repair expenses,
       selling price and thus total-cost-of-ownership.)
     * Access to all web-based apps as well as "legacy" X and MS Windows
       apps.
     * Quick upgrades (just upgrade your server and the changes propogate
       throughout)
     * Longer lifespan (just upgrade the software, growing hard disk and
       memory requirements is not an issue)
     * Smaller OS footprint (when running brower-based apps)
       
   Disadvantages of NC's:
   
     * No local access to data files (all your files stored on a remote
       server)
     * Requires fast, stable networks
     _________________________________________________________________
   
2.3. Description of the JavaStation Model Line including Hardware Specs

   Depending on who you talk to, the number of JavaStation models that
   were created is anywhere from one to six. The descriptions below will
   explain why.
     _________________________________________________________________
   
2.3.1. JavaStation-1 [ "Mr. Coffee"] ["the brick"] [Sun Option No. JJ-xx]

   This model is the most prevalent JavaStation model you are likely to
   find, although it wasn't the one and only JavaStation model Sun wished
   to sell to the public. The JavaStation-1 was the first generation
   JavaStation, released in November 1996 to pilot deployments as Sun's
   "proof of concept" of the Java NC design.
   
   Hardware-wise, the JavaStation-1 is a Sun4M architecture machine. It
   is based on the SPARCStation-4 design, with some deletions and PC-like
   modifications. It is powered by a 110 Mhz MicroSPARC IIe CPU and has
   no SCSI, internal disks, floppy, CD or expansion slots. The Mr. Coffee
   motherboard is Sun Part No. 501-3141.
   
   Instead of using the Sun-type keyboard and mice, JavaStation-1 uses
   PC-like PS2 parts instead. One of the original marketing highlights of
   the JavaStation was that it would use standard PC parts wherever
   possible to keep overall price down.
   
   The "brick" has four PC-like SIMM slots. The SIMMs taken are
   industry-standard 60ns, 32-bit, 72-pin, 5V fast page SIMMs, installed
   in pairs. Each slot is capable of holding up to a 16MB SIMM, bringing
   the maximum total capacity of the unit to 64MB. The "xx" in the Sun
   Option# of the unit indicated how much memory the unit shipped with.
   
   For video display, the JavaStation-1 utilizes the Sun TCX framebuffer,
   capable of 1024x768@70Hz in 8-bit color. The port connector however,
   is a standard VGA jack, enabling the user to use standard PC monitors
   if desired (again, low cost in mind). The on-board audio is a Crystal
   CS4231 chip, and the network interface is the Sun Lance 10Mbps
   interface. In addition, the "brick" also came with a 9-pin serial port
   and 1/8" audio out jack on its back.
   
   The JavaStation-1 was fitted into the Sun "unidisk" form factor case,
   and has been seen in a number of color schemes. JavaStations have been
   fitted with casings in the white with light blue trim scheme used in
   Sun workstations, as well as the dark blue-grey "new desktop" scheme.
   Some say "JavaStation" and have the Java coffee cup logo written on
   it, others do not. Collectors may wish to collect all case variations.
   
   The JavaStation-1 was used in early Sun demos, and sold to pilot
   sites. When first brought out, the cost to pilot sites was $699US.
   This was at a time when PC's were still higher than $1000US. By the
   end of the pilot run, Sun was selling any remaining or used units for
   $299-$399US, in anticipation for its "real" JavaStation model.
   
   See the JavaStation-1 at:
   [93]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_front_vie
   w.jpg
     _________________________________________________________________
   
2.3.2. JavaStation-NC ["JavaStation-10"] ["Krups"] ["the tower"] ["the
percolator"] [ Sun Option No. JK-xx]

   This model is the second most prevalent JavaStation model you are
   likely to find. When you talk to industry folks about the
   "JavaStation", this is typically the model remembered first. Delayed
   numerous times, the Krups model officially went on sale to the general
   public Mar. 26, 1998 at the annual JavaOne conference.
   
   Though generation two of the JavaStation line, the Krups model was the
   JavaStation . Sporting a completely different board design than
   JavaStation-1, Krups establishes what was to be the characteristic
   JavaStation architecture.
   
   Krups is powered by a 100Mhz MicroSPARC IIep chip, (note the 'p'). Its
   mainboard had the internal addition of a PCI bus, about a year before
   this standard bus made its well-publicized appearance on the Sun Ultra
   workstation line. The Krups motherboard is Sun Part no. 501-4267.
   
   Krups keeps the PS2 keyboard and PS2 mouse ports from JavaStation-1,
   keeping in mind the low-cost, interoperable goal of generation 1.
   
   With the new board design, came new memory chip sockets. Instead of
   SIMMs, the "tower" moved to 168-pin DIMMs. DIMMs had begun to make
   their way from the workstation realm to PC's in the time between
   generations one and two of the JavaStation line, so it was fitting for
   Sun to switch to it in anticipation of their status low-cost commodity
   memory chips. The DIMMs accepted by the "tower" are 168pin, 3.3V
   unbuffered EDO DIMMs (not SDRAM). With two sockets capable of holding
   a 32MB DIMM each, the Krups has a maximum capacity of 64MB RAM. As
   with the JavaStation-1, the number "xx" in the Sun option number
   refers to the amount of memory shipped with the unit.
   
   For video display, the JavaStation-NC utilizes the PCI-based IGS C1682
   framebuffer, capable of 1280x1024@80Hz in 24-bit "true color". This is
   a step up from the 8-bit display on JavaStation-1. The port connector
   remained a standard VGA jack like JavaStation-1, enabling the user to
   use standard PC monitors if desired. The on-board audio remains a
   Crystal CS4231 chip like JavaStation-1. The network interface on Krups
   is the Sun HappyMeal 10/100 Mbps interface, another step up from the
   original offering of JavaStation-1.
   
   The "tower" came with the 9-pin serial port and 1/8" audio out jack as
   JavaStation-1, but it also added a 1/8" audio-in jack, to do sound
   recording with.
   
   Another addition in the JavaStation-NC is a flash memory SIMM. This
   allows one to load the current revision of the OS onboard, increasing
   boot-speed tremendously.
   
   Perhaps the thing most memorable about the JavaStation-NC is its case
   design. The Krups comes in an aesthetically appealing casing. The
   mainboard is mounted vertically, and the shell entraps it, giving it
   the "tower" or "percolator" shape referred to. With the streamlined
   case, the power supply is moved outside to small transformer. The
   Krups unit gives off so little heat that there are no onboard cooling
   fans, making the Krups a dead-silent machine. Imagine the difference
   in noise when replacing a lab of traditional desktops with the Krups!
   This case design earned Krups a"1998 Industrial Design Excellence
   Award" from the Industrial Designers Society of America. This award
   announcement is archived for read at:
   [94]http://www.idsa.org/whatis/seewhat/idea98/winners/javastation.htm"
   
   The Krups had an initial base price of $599US, $100US cheaper than Mr.
   Coffee's rollout price. Due to it being the only model formally sold
   by Sun to the general public, this is how Krups is sometimes referred
   to as the only JavaStation, and not one model of a product line.
   
   See the JavaStation-NC at:
   [95]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/krups_front_view.jp
   g
     _________________________________________________________________
   
2.3.3. JavaStation-E ["Espresso"] [Sun Option No. JE-xx]

   This model is extremely rare to find. It was never available for sale
   in quantities to either the general public or the initial JavaStation
   deployments, limiting the model's production quantity. To call this
   "Generation Three" of the JavaStation may be improper, as Espresso is
   nothing like the generation three JavaStation written about in early
   Sun literature.
   
   The Espresso was designed as an extension of the Krups. It was geared
   to sites that wanted a little bit more functionality and expansion
   capability from their JavaStations: a cross between an NC and a
   workstation.
   
   Espresso is powered by the same 110Mhz MicroSPARC IIep chip as Krups.
   It's mainboard is similar to Krups, with the addition of PCI slots and
   an IDE channel for local hard disks. The IDE on Espresso was not
   enabled in the demo units. Those who have tried to make it work have
   concluded the wiring is incorrect, and it requires a hardware rework
   to get working.
   
   Espresso continues with the PS2 keyboard and PS2 mouse ports from Mr.
   Coffee and Krups.
   
   Espresso uses the same 168-pin, 3.3V unbuffered EDO DIMMs as Krups.
   The maximum amount of memory for Espresso is reported to be 96MB. As
   with the Mr. Coffee and Krups, the number "xx" in the Sun option
   number refers to the amount of memory shipped with the unit.
   
   For video display, the Espresso uses the PCI-based IGS C2000
   framebuffer, along with the same standard VGA port connector as Krups
   and Mr. Coffee. The on-board audio remains a Crystal CS4231 chip like
   Krups, and the network interface remains a Sun HappyMeal 10/100 Mbps
   interface like Krups as well.
   
   Espresso came with the 9-pin serial port and 1/8" audio out and 1/8"
   audio in jacks of Krups, and a new addition of a parallel port, and a
   second 9-pin serial port. Espresso also comes with the flash memory to
   load your OS on and bypass the network boot cycle.
   
   One new addition to the Espresso is a smart card slot.
   
   The Espresso comes in a "pizza box" style case like the old Sun
   SparcStations, only a little taller, and not quite as wide.
   
   The Espresso was never sold to the public. There was an internal
   testing period at Sun, but the units never went into mass-production.
   
   One Espresso user mentioned he now uses his unit as both a server and
   router, with the addition of an IDE disk and 3C905 ethenet card,
   demonstrating the expandability of this unit.
   
   See the JavaStation-E at:
   [96]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/espresso_front_view
   .jpg
     _________________________________________________________________
   
2.3.4. JavaEngine-1 ["JE-1"]

   Like the Espresso, this unit is also an extremely rare find.
   
   This unit is supposed to be of similar board design to the Krups, but
   in an ATX form factor, with soldered onboard flash memory, and with a
   regular SVGA video chipset.
   
   Gleb Raiko <[97]raiko@niisi.msk.ru)> with the help of Vladimir Roganov
   <[98]roganov@niisi.msk.ru> did initial the Linux kernel support on
   "JE-1". Pete Zaitcev <[99]zaitcev@metabyte.com> later obtained a
   "JE-1" unit and restored full support in Linux kernel 2.3.x+.
   
   As the author of this document has never seen a "JE-1", submissions
   from the public are welcome.
   
   See the JavaEngine-1 at:
   [100]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/je1_overhead_view.
   jpg
     _________________________________________________________________
   
2.3.5. The "Dover" JavaStation model

   This is another box which does not exist officially outside of Sun.
   Little is known of it.
   
   A nice speculation would be that the next step in the JavaStation
   evolution was more of a low-cost NC based on PC boards. The PCI, PS2,
   and SVGA (as in "JE-1") was already present. The next step would have
   been a non-proprietary, industry-standard mainboard. Since nobody's
   talking, this is all speculation.
   
   However, the document author has been informed it is fully supported
   by the Linux kernel, should you be lucky enough to find one.
     _________________________________________________________________
   
2.3.6. The Generation 3 "Super JavaStation"

   Sun originally envisioned three generation models of the JavaStation:
   Mr. Coffee, the Krups, and the "Super JavaStation". Generation Three
   was billed in early literature as going to be the fastest JavaStation
   offerred, with a high-speed CPU and a JavaChip co-processor to
   translate Java-bytecode in hardware.
   
   All indications are that it never got beyond the mental stage, and was
   more of a marketing myth than anything else.
   
   First, consider that the cost of higher performance CPU as a factor.
   If Sun packaged a high-performance CPU into a JavaStation, the
   low-cost advantage of an NC goes away.
   
   Next, Sun did have their PicoJava chip available to decode Java
   bytecode, but word is the performance was not as good as expected, and
   the JavaChip project was shelved in the Summer of 1998, not long after
   Krups was formally released. The "Dover" project was being worked on,
   but the "Corona" project which would go on to become the Sun Ray was
   the final nail in the JavaStation 's coffin.
   
   So all indications are that this model is a piece of "vaporware". It
   is included here though, for the sake of completeness.
     _________________________________________________________________
   
2.3.7. The Early JavaStation Prototype?

   After the original publishing of this HOWTO, word of one more
   "JavaStation" model has surfaced. John of bodoman.com, a reseller of
   JavaStation equipment, chimed in that he has a motherboard of a
   pre-JavaStation machine. The board used a 68040 CPU. Apparently the
   company that produced it was bought out by Sun and its design became a
   basis for the JavaStation line.
   
   As this is the first mention of this prototype machine, any further
   info is appreciated.
     _________________________________________________________________
   
2.4. Reasons for Running Linux and NC Myths Dispelled

   It turns out that Linux makes the JavaStations perform more than
   adequately on the desktop. Thanks to the dedicated work of the Linux
   developer community, the JavaStations offer users the low-cost,
   zero-admin, versatile desktop NC's they were originally billed to be,
   but with the added freedom granted by the Linux OS.
   
   While low-cost PC's now eclipse the JavaStation in terms of default
   CPU speed and RAM size, the JavaStations running Linux are still
   well-suited for a number of tasks:
   
     * Diskless X-Terminal. (Gives the JavaStations the capability of the
       Sun Xterminal 1 hardware that they replaced).
     * The NC solution, Linux-style: local X + a java-capable browser can
       make the JavaStations perform like they did with JavaOS/HotJava,
       only many times faster.
     * A beowulf node, or a dedicated RC5/SETI@HOME client. The
       JavaStation running Linux makes a stable, long-lasting number
       cruncher.
     * A small, standalone machine. While a task more suited on today's
       low-cost machines, there's not much that prevents the JavaStation
       from performing as a full-fleged standalone UNIX machine by
       itself. Just remember to set your expectations appropriately when
       doing so; they were "low-budget" clients when they were sold, and
       should not be directly compared to today's workstation offerings.
     * A small router and server, particularly with the Espresso model
       decked out with added IDE disks and NIC.
       
   In all of the above scenarios, there is little to no maintenance of
   the machine once configured properly. Such is the advantage of the NC
   hardware.
   
   JavaStations run so much better with Linux than JavaOS, one would
   think that even Sun should have offered it as an option.
   Unfortunately, Sun has killed the line in favor of the Sun Ray. While
   the performance of the Sun Ray is good, keep in mind it is not a
   dedicated computing device and is little more than a graphics display
   hanging off your Sun server, which can give you some unexpected
   features (translation: "brand-name product lock"). The performance on
   the JavaStations with Linux will be similar to what you can get with a
   Sun Ray, but if ever you want to do something different with your
   machines, you have the flexibility to do so with the JavaStations.
   
   Lastly, if you're thinking of switching to diskless Xterminals on your
   network, you might consider the JavaStations over stripped down PC's.
   The hardware is standardized, smaller, and you do not need to worry
   about burning boot PROM's and the like.
     _________________________________________________________________
   
2.5. Why JavaStations are No Longer Produced

   Sun's official stance is that the JavaStation line was terminated in
   favor of the new Sun Ray line. A trip to the former JavaStation
   section of Sun's website at [101]http://www.sun.com/javastation
   verifies this formal positioning.
   
   As the Sun Ray is not an NC in the traditional sense (it is merely a
   framebuffer, and not a computing device itself), there is no
   explanation why the two do not co-exist.
   
   In talking to the users of the JavaStations in the pre-Linux era, you
   will find strong opinions as to why the JavaStations are no more. The
   common thread in almost all opinions collected is that the software
   provided by Sun was inadequete for a production environment. Here are
   collected opinions from users of the Sun-provided software, included
   with their permission:
   
   
   I only used the Java Stations last summer while teaching 51 and
   55/154. GoJoe was incredibly slow and I seem to remember having to
   login to several different screens and browsers just to be able to
   start anything.
   
   I had to apologize to my students for the slow and inconvenient
   machines --- I remember making some jokes about technological
   progress.
   
   --Dr. Alex Ryba, Professor at Marquette University
   <[102]alexr@mscs.mu.edu>
   
   
   
   Well, of course the old JavaStations were practically unusable. It's
   not a matter of just my opinion; we used to have CU 310 full of
   students using the Xterms all the time. As soon as the JavaStations
   appeared there were NO STUDENTS in there at all. The JavaStations
   killed CU 310. Now that the JavaStations are (thanks to you) back up
   to speed, students are beginning to come back, but they've gotten out
   of the habit of working in our lab, and are used to working on their
   own in the dorms. I think this is a big loss -- they don't learn
   anything from talking to each other in the labs anymore.
   
   Ghostview was slow, etc, but even vi was too slow. I am used to typing
   quickly, and when the cursor can't keep up with me, I can't handle it.
   I would also have worked at home if I didn't have to be here. And
   there were those annoying red squares left all over the Xterm window
   when you were in vi. I had to type ^L every few lines to get rid of
   them to see what I was typing... The pits. The whole setup made me
   lose a lot of respect for Sun (although I try to separate the
   different product lines as much as possible); I also think Sun will
   not get respect for hyping a product like the JavaStation so strongly,
   and then just dumping it. I would wonder why anyone would not just
   dump Sun...
   
   BTW, the JavaStations, now that they are fast, are quite fine. I
   really like mine, and don't see why they aren't a viable product.
   
   --Dr. Mark Barnard, Professor at Marquette University
   <[103]markb@mscs.mu.edu>
   
   
   
   I believe that it was the triple combination of Sun's JavaOS, the
   Hotjava software, and GraphOn's GoJoe X-connectivity software which
   ultimately doomed the JavaStation line.
   
   JavaOS was always sluggish in performance for us. It was rated as
   having one of the slowest Java VMs by a ZDNet Online Magazane review
   at [104]http://www.zdnet.com/pcmag/features/javaguide/hfgr10.htm . I
   speculate this was the the main cause of delaying the JavaStation's
   formal public release to April 1998.
   
   JavaOS also always lagged behind the current Java developer spec (ie
   running Java 1.0 when Java 1.1 was prevalent, and Java 1.1 when Java
   1.2 was issued). It was tough explaining to students why the books
   they were buying were all using the new event-model of Java 1.1, but
   they could not program to it and have it run on "the Java machine".
   There were also some implementation problems with some of the AWT
   peers which sometimes made programming across platforms difficult.
   
   These performance and implementation problems were never addressed in
   subsequent build of JavaOS for the duration we ran it. I believe the
   last edition we had used a Java 1.1.4 runtime, when we had a Java 1.2
   development kit on the server.
   
   The HotJava browser software suffered from not being able to handle
   web standards HTML4, cascading style-sheets, or the ECMA javascript.
   All of these standards were employed in commercial sites at the time,
   resulting in many sites that weren't viewable by the JavaStations. The
   Hotjava Browser engine also had serious printing problems with certain
   webpages, some of which appeared on Sun's own website!
   
   The HotJava Views task selector software also was rough. Users could
   have multiple apps running, but only one displayed at a time.
   Manipulation of multiple window panes was difficult (no minimization,
   no quick list to all apps, resizing not always possible). Flexibility
   users had grown accustomed to was tossed out in favor of this
   task-selector approach. On Sun's Java website there was a page
   boasting of a committee formed that decided this was the "right way"
   to make a desktop. Tell that to our users.
   
   The GraphOn Go-Joe software was by far the most damaging piece of
   software to the JavaStation line. This was an X-connectivity software
   Sun licensed from GraphOn to give users access to the Solaris servers'
   X apps. The connectivity worked via a daemon installed on the Solaris
   server, which was connected to by a Java connectivity applet on the NC
   side. This small applet (only about 250K) simply threw up the latest
   display state and sent back to the daemon the mouse and keyboard
   strokes of the user. Unlike Xterminals though, the actual Xserver
   process was spawned and communicated with on the remote server-side by
   the daemon. Communication between the GraphOn client applet and the
   server daemon was supposedly done by a patented protocol to compress
   communication and speed things up. However, the performance of X under
   Go-Joe was terribly sluggish, with horrible refresh rates (10-seconds
   for some page scroll refreshes). Many sites operators I spoke to
   elected to not run the Go-Joe software past a trial period for this
   reason. We had to run it though, as our users were heavily X
   dependant. Alternatives like Weird/X were not available at this time,
   and VNC proved not up to snuff given the slow JavaOS VM.
   
   This performance in Go-Joe alone was enough to give uninformed users
   the impression that the JavaStation was an underpowered machine,
   especially when placed side-by-side with the low-cost, end-of-lifed
   Sun Xterminal 1 hardware it was meant to replace. Our students left
   labs in droves, faculty were upset, and giving demos to outsiders was
   downright embarrassing. In reality the hardware was solid and stable,
   but was hampered by this new, untested OS and new, untested
   applications running on a new, untested hardware architecture. This
   triple-threat combination, and Sun's timeline for fixing the problems
   is what I feel truly doomed the JavaStation.
   
   I remember that in 1998, Sun publicized that it had rolled out 3000 of
   these machines in-house, including one on Scott McNealy's desk. One
   who has used the JavaStations with the Sun software would have to
   wonder whether he ever turned it on and used it solely for a day? Had
   he done so, I'm sure he'd demand things be done differently. Why Sun
   never ported and released its tried and tested XTerminal software to
   the JavaStation, or even a mini-Solaris, remained a mystery to us the
   whole time before we switched to Linux. It was only after we moved to
   Linux and the JavaStation line was formally killed by Sun when we
   learned from some inside Sun sources that Solaris actually was ported
   to Mr. Coffee, but released only internally at Sun. As a heavily
   invested customer site who had begged for help, this was not only
   disheartening, but insulting to discover.
   
   Lastly, the customer support we received at the time was horrible. We
   pled our case on more than a few occassions, but requests always
   seemed to fall on deaf ears. Calling up SunSolve for JavaStation help
   always resulted in a transfer to a Java Language engineer. If the Sun
   employees do not know their own products, that's a problem!
   
   >From our view, there no doubt was politics involved in this, and as
   customers, we were the ones to bear the results of this. We continue
   using Sun equipment when it comes to the proven models like the
   Enterprise-class servers and diskarrays, but on the latest low-cost
   desktop offerings, we will be forever cautious given the JavaStation
   history.
   
   Linux now proves the JavaStations are adequate machines, and Sun could
   take this bait and go with it. If they sell the JavaStations for $250
   a piece and the JavaStation running a proven OS like Linux (or
   Solaris) with proven apps (X), the JavaStation makes for a great
   network appliance. The recent NetPliance I-Opener Linux hack and
   subsequent controversy proves there certainly is a market for this
   type of low-cost device.
   
   --Robert Dubinski, Computer Systems Technician at Marquette University
   <[105]tech@mscs.mu.edu>
   
   More comments and rebuttal statements by Sun employees are always
   welcome.
     _________________________________________________________________
   
2.6. Where to Purchase a JavaStation

   Since Sun has canceled production of the JavaStation line, it no
   longer sells them through their official channels. It should be
   possible to order any remaining JavaStation stock from the Sun Spares
   site at [106]http://www.sunspares.com.
   
   Your best bet to get JavaStations though is out on the open market.
   Educational institutions which received a handful from Sun as demo
   units are now trying to offload them any way they can. Search around
   the auction sites like Ebay and Yahoo Auctions, and you should be able
   to turn some up.
   
   Lastly, a great resource for JavaStations is "Bodoman's JavaStation
   site" at: [107]http://www.bodoman.com/javastation/javastation.html .
   Here you can find Mr. Coffee and Krups models. As of June 15th 2000,
   Bodoman was selling out of Krups models and was thinking about selling
   all remaining Mr. Coffees to a different reseller. If you want a
   JavaStation from BodoMan, contact him now!
   
   The current going price as of June 2000 for a Mr. Coffee model without
   memory or monitor is about $50-100US, while the Krups goes for about
   $85-100US. Anything more is typically due to memory pre-installed.
   Since the Taiwanese earthquake of 1999, memory prices have fluctuated
   on a near daily basis, making it difficult to pin a price range down
   in this manner.
   
   You might also get lucky and stumble on someone who wants to get rid
   of JavaStations cheap. One reader reported finding a 32-MB Krups for
   $75 in a pristine unopened box.
     _________________________________________________________________
   
3. Background Requirements for Linux on a JavaStation

   This chapter describes the base hardware and software requirements for
   enabling Linux on the JavaStation.
     _________________________________________________________________
   
3.1. Complete Hardware Requirements

   For hardware, you will need one or more JavaStation clients and a
   server to feed it its Linux image from, all networked on the same net
   segment.
   
   This server you use can be any server which supports DHCP and TFTP,
   and RARP. These are the base protocols needed to perform a network
   boot of the JavaStations. You may also need NFS service as well, but
   it is not necessary in one type of configuration this HOWTO describes.
   Also, you can get by without RARP on both the Krups and Espresso
   models.
   
   This document will describe how to set up serving the network Linux OS
   image to the JavaStation from a Sun server running SparcLinux. While
   you do not need a Sun server to serve your Linux image off of, the Sun
   SparcLinux server is needed should you wish to compile a kernel of
   your own, or prototype a new filesystem for your JavaStations to use.
   Otherwise, you will need to use prepackaged kernels and filesystems
   somebody else has pre-built and made publicly available for use.
   
   Your network can be a simple 10 Mbps ethernet LAN, but when you begin
   using more than 50 JavaStations at once, a switched 100 Mbps network
   becomes desirable for your server to handle multiple concurrent boot
   requests.
   
   This HOWTO includes example kernels and filesystems for you to use,
   eliminating your need of a Linux/SPARC server, but you still need a
   server of some type to feed the image to the JavaStations as they
   boot.
     _________________________________________________________________
   
3.2. Network Service Requirements

   As discussed in the last section, the JavaStation boot cycle will make
   use of DHCP and TFTP with possibly NFS and RARP. To understand why,
   read up on the JavaStation boot sequence in the next section.
     _________________________________________________________________
   
3.3. Understand the JavaStation Boot Sequence

   The JavaStations follow a typical diskless workstation boot sequence.
   
   When powered on, the JavaStation sends out a broadcast request for its
   IP. It gets its IP info via RARP or DHCP. With a DHCP response, it
   gets information about the network it is on and where to go download
   its boot image from via TFTP.
   
   There are subtle variations in diskless boots from one diskless
   machine to the next. For instance, BOOTP may sometimes be substituted
   where DHCP is, and RARP may be eliminated in favor of either of the
   two. But in general, the sequence is typically the same between the
   client and the server:
   
    1. C: "Who am I?"
    2. S: "You are xxx"
    3. C: "Where do I go for my boot image?"
    4. S: "You go here."
    5. C: "Give me my image from here...Please?"
    6. S: "Here's your image."
       
   After the kernel is finished loading, your diskless client typically
   mounts its root filesystem from the network via NFS. Alternatively, it
   may load and mount it from a RAMdisk.
     _________________________________________________________________
   
3.4. Additional Software Requirements: Replacement Firmware (PROLL)

   JavaStations came with two different PROMs installed in them. Version
   2.30 shipped with the earliest Mr. Coffee models, and was updated by
   latter versions of the Sun Netra J software environment to 3.11. Krups
   and Espresso came with 3.x versions of the PROM by default.
   
   It turns out the later 3.x series of PROMs is not conducive to booting
   Linux upon. Fortunately, a complete PROM replacement called PROLL now
   exists to get by this limitation.
   
   PROLL becomes the first image your JavaStation grabs by TFTP. It then
   will load your true kernel image and boot into Linux.
   
   No matter what PROM revision you have, get PROLL. This can make
   troubleshooting new installs easier.
   
   The current, master version of PROLL is available from the Metabyte
   website at: [108]http://www.metabyte.com/~zaitcev/linux.
   
   The current version at the time of this writing is "13".
   
   PROLL can also be found mirrored on "VGER", and also on this HOWTO's
   distribution site at:
   [109]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/proll_13.tar.bz2
   (HOWTO website mirror - version 13)
     _________________________________________________________________
   
3.5. Decide on your Filesystem: NFS-Root, or Embedded?

   Before you begin, you must decide upon the root-filesystem type you
   wish to use for your diskless JavaStation.
     _________________________________________________________________
   
3.5.1. "NFS-Root" Filesystem

   In this setup, after the boot kernel is retrieved off the network, the
   running JavaStation makes an NFS connection for its root filesystem.
   The root directory "/" is mounted off the network for the duration of
   the current session.
   
   The "NFS-Root" solution is the recommended way to go for beginners, as
   it is easier to troubleshoot if there are problems. It also makes it
   easier to prototype the proper filesystem, as any changes you make on
   a running system can be propogated for the next boot cycle (so long as
   you are in read-write mode, of course).
     _________________________________________________________________
   
3.5.2. "Embedded-Root" Filesystem

   In this setup, the root filesystem is loaded directly into RAM and
   accessed from there.
   
   The advantage of this setup is that there is no NFS traffic to worry
   about, resulting in a clean solution.
   
   The disadvantage of this configuration is that you can no longer do
   rapid prototyping of your filesystem, as any changes you make to a
   running system are lost. If you have no "NFS-Root" setup available,
   you develop an embedded filesystem by making small tweaks and
   performing reboots to test.
   
   First time users will want to set up an "NFS-Root" configuration. When
   you have things stabilized, move to "Embedded-Root" and make use of
   its advantages.
     _________________________________________________________________
   
3.6. Support Sites to Check Out: Metabyte

   One website to keep on reference when you begin thinking about putting
   Linux on your JavaStation is Pete Zaitcev's website at:
   [110]http://www.metabyte.com/~zaitcev/linux, referenced throughout
   this document as the "Metabyte server". Here you will find the latest
   version of PROLL and many low-level details about dealing with the
   JavaStations.
     _________________________________________________________________
   
4. Build Your Kernel

4.1. Before you begin

   This chapter assumes you wish to compile your own Linux kernel for the
   JavaStation. It assumes you already know how to compile Linux kernels
   in general, perhaps on PC, a SPARC server running Linux, or any of the
   other Linux ports. If not, read the Kernel-HOWTO and the README file
   of your kernel source.
   
   Compiling a kernel for a JavaStation is not much different than
   compiling a Linux kernel elsewhere. You just need to know the right
   options to pick. In general, you're compiling for a Sun4M class
   architecture, and enabling JavaStation-specific options. The following
   sections in this chapter will take you through the steps.
   
   While it may be possible to compile the JavaStation -enabled kernel on
   alternate platforms, this HOWTO assumes you do it on a Linux/Sparc
   based server running in 32-bit mode.
     _________________________________________________________________
   
4.2. Make sure you use 32-bit mode

   When compiling your own JavaStation-capable kernel, you need to make
   sure the Sun server you are working on is set to 32-bit mode. So, if
   you're on an Ultra-class machine, be sure you first switch to 32-bit
   mode before you begin compiling.
   
   To check what mode you're in, do a uname -a. If it says "sparc",
   you're in 32-bit mode and don't have to do anything. If it reports
   "sparc64", then you should perform a sparc32 bash first to switch to
   32-bit mode. A subsequent uname -a should reflect the change.
     _________________________________________________________________
   
4.3. Supported Linux Kernel Versions

   The kernel source revision you should use depends on which model of
   JavaStation you have.
   
   Mr. Coffee support has worked since about kernel version 2.2.5, and
   definitely works out of the box with the RedHat 6.0+/SPARC
   distribution kernels.
   
   Krups support did not work well out of the box until the latter 2.3.x
   kernel cycle. Pete Zaitcev <[111]zaitcev@metabyte.com> added Krups
   support in the early 2.3.x sequence, but the MMU changes to the 32-bit
   SPARC kernel kept it from compiling cleanly until later on. The kernel
   is known to compile cleanly with the Mar. 17 CVS kernel, and should
   compile cleanly with any 2.3.99pre3+ version kernel. Krups support has
   been backported by Varol Kapton <[112]varol@ulakbim.gov.tr>, and it is
   fully supported in the 2.2.15-prepatch versions.
   
   By the time this document gets widespread exposure, it is hoped that
   the 2.4.x stable kernel cycle will be ready, at which time any 2.4.x
   kernel should compile cleanly with support for the entire JavaStation
   line.
   
   If you can not get a kernel to compile, you should try the samples
   pointed to by this document.
     _________________________________________________________________
   
4.4. Required Kernel Configuration Options

   When you do your make config command to enter the kernel configuration
   stage, there are a few things you are required to enable:
   
   For all JavaStations, you want to enable PCI support:
CONFIG_PCI=y

   Don't forget your mouse:
CONFIG_BUSMOUSE=y
CONFIG_SUN_MOUSE=y

   You'll want video, done with the Linux framebuffer interface:
CONFIG_FB_TCX=y (for Mr. Coffee)
CONFIG_FB_PCI=y
CONFIG_FB_IGA=y (for Krups/Espresso)

   Audio is done with the Crystal Audio 4231 chipset:
CONFIG_SPARCAUDIO=y
CONFIG_SPARCAUDIO_CS4231=y

   Don't forget your network interface:
CONFIG_SUNLANCE=y (Mr. Coffee)
CONFIG_HAPPYMEAL=y (Krups/Espresso)

   You'll no doubt need to support a filesystem:
CONFIG_EXT2_FS=y

   You'll want IP autoconfiguration, and RARP/BOOTP support:
CONFIG_IP_PNP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y

   When doing the "NFS-Root" filesystem configuration, you will need both
   NFS and NFS-Root support:
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y

   When doing the "Embedded-Root" filesystem, configure both RAM disks
   and "initial ramdisk" support:
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_INITRD=y

   You can get a working ".config" file which has these options set later
   in this chapter.
     _________________________________________________________________
   
4.5. Necessary Patch for "Embedded-Root" FS Configurations

   If you have decided to go with the "Embedded-Root" filesystem option,
   you will want to make a patch to the RAMdisk driver source first.
   
   The default size of a RAM disk when using the RAMdisk driver is 4 MB.
   Chances are that you will want an embedded filesystem of more than
   that size, particularly when you start thinking about running an X
   server, or including a Java runtime.
   
   You can do this change by yourself, or by using the patch pointed to
   below. The change is a one-line edit in the file
   <LINUXROOT>/drivers/block/rd.c . Look for a line that says:
int rd_size = 4096; /* Size of the RAM disks */

   and change it to the size of the RAMdisk you wish. Typically, most
   embedded systems are under 16 MB, so a common edit is to change the
   line to:
int rd_size = 4 * 4096; /* Size of the RAM disks */

   If you can not do this, the patch below makes the edit for you.
   
   4MB to 16MB kernel patch file is at:
   [113]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/ramdisk_patch
   
   It should be noted in this section that there is currently a limit on
   the size of Linux boot image for all JavaStation models, due to the
   implementation of PROLL. This limit is technically 8 MB. This topic is
   mentioned again in the "TroubleShooting" section of this document.
     _________________________________________________________________
   
4.6. Build the JavaStation-Ready Kernel

   To build the kernel, you type make vmlinux. If you come from an x86
   Linux background, you might be surprised that you do not perform a
   make bzImage or make zImage. Do not be alarmed: this command is
   correct.
   
   When the compile is finished, you will find a file named "vmlinux" in
   the kernel source root directory. You are almost ready to put this
   kernel to use.
   
   You need to make one more change to your kernel before it is ready for
   use. You need to convert it from ELF to AOUT executable format. You
   can do this with the "elftoaout" utility included in most Linux/SPARC
   distributions.
   
   To convert your kernel image to the AOUT executable format, you issue
   the command:
elftoaout -o vmlinux.aout vmlinux 

   You will probably now want to rename the image file to a longer name
   which includes the current date and kernel revision you used, so as
   not to get confused with when you have multiple boot kernel images
   down the road.
     _________________________________________________________________
   
4.7. JavaStation-Ready Kernel Images, System.map and ".config" File Samples

   Here are some sample ".config" and JavaStation-ready kernel images.
   They have been donated by Linux-running JavaStation users.
     _________________________________________________________________
   
4.7.1. Sample ".config" Files

   [114]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/kernel_embedded_co
   nfig_2_3_99pre3_mar_17
   
   This is a ".config" file donated by Robert Dubinski
   <[115]dubinski@mscs.mu.edu>. It was used at Marquette University to
   build an embedded boot image from the Mar. 17, 2000 CVS kernel
   version. This includes support for both Mr. Coffee and Krups in an
   "Embedded-Root" filesystem configuration. These options should be
   valid for newer kernels as well; Perform a make oldconfig when using
   with latter kernels.
   
   [116]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/kernel_nfsroot_con
   fig_2_3_99pre3_mar_17
   
   This is an nfs-root capable version of the above ".config" file.
     _________________________________________________________________
   
4.7.2. Sample JavaStation-Ready Kernel Files

   [117]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/vmlinux_embedded_2
   _3_99pre3_mar_17
   
   This is a kernel file donated by Robert Dubinski
   <[118]dubinski@mscs.mu.edu>. It was built for Marquette University and
   is based off the Mar. 17, 2000 CVS kernel version.
   
   This kernel image includes support for both Mr. Coffee and Krups
   models in an "Embedded-Root" filesystem configuration.
   
   This boot kernel image has already been converted to the required AOUT
   executable format.
   
   [119]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/vmlinux_nfsroot_2_
   3_99pre3_mar_17
   
   This is the nfs-root version of the above kernel.
   
   [120]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/system.map_embedde
   d_2_3_99pre3_mar_17
   
   The System.map for the embedded kernel image.
   
   [121]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/system.map_nfsroot
   _2_3_99pre3_mar_17
   
   The System.map for the nfsroot kernel image.
     _________________________________________________________________
   
5. Build A JavaStation-Ready FileSystem

   This chapter details how one constructs a filesystem suitable for use
   on the Linux-running JavaStations.
     _________________________________________________________________
   
5.1. Preparing Yourself to Build Your Own Filesystem

   Building a filesystem for use with the JavaStations is a
   time-consuming, but rewarding task for those who undertake it. You
   will learn more about library dependencies than you ever thought you
   could, all the time while trying to keep the overall image size as
   small as possible.
   
   There are two common approaches one can take when rolling a new
   JavaStation-ready filesystem.
   
    1. Start with an established distribution's filesystem and whittle
       down to the core.
    2. Start with an established distribution's "rescue disk" filesystem
       and add desired functionality.
       
   Which path you take, of course, is entirely up to you. The "rescue
   disk" build procedure seems to work best though, as more base commands
   in a rescue disk are statically linked, increasing the starting image
   size but causing less initial library headaches.
   
   Obviously when building a filesystem in the context of the
   JavaStation, you will be basing off of an existing Linux/SPARC
   filesystem. The filesystems that come with the RedHat and Debian
   distributions are good starting points.
   
   Warning
   
   In the future, you will also need to make sure you base off a
   filesystem built with compiled 32-bit mode executables, as a 64-bit
   userland project is presently in progress for 64-bit SPARC Linux
   kernels.
     _________________________________________________________________
   
5.2. Contents of the "/etc/fstab" File

   The configuration lines placed into "/etc/fstab" depend on whether you
   will be using the "NFS-Root" or "Embedded-Root" filesystem
   configuration.
     _________________________________________________________________
   
5.2.1. "NFS-Root" Filesystem fstab

   Here is an example of an "/etc/fstab" for an "NFS-Root" boot option.
###
#
your.nfs.server:/path/to/filesystem  /  nfs defaults,rsize=8192,wsize=8192 1 1
#
none                    /proc                   proc    defaults        0 0
###
     _________________________________________________________________
   
5.2.2. "Embedded-Root" Filesystem fstab

   Here is an example of an "/etc/fstab" for an "Embedded-Root" boot
   option.
###
#
/dev/ram /     ext2  defaults
#
/proc    /proc    proc  defaults
###
     _________________________________________________________________
   
5.3. The "Embedded-Root" Image Creation Procedure

   Prepping up the "Embedded-Root" boot image requires a number of extra
   steps. Due to these extra steps, the "NFS-Root" filesystem option is
   recommended for beginners to Linux on the JavaStation. You might also
   try the samples pointed to in this document. Should you still wish to
   build and embedded image on your own, this section outlines the basic
   instructions.
   
   Creating the "Embedded-Root" boot image is a 5-Step Procedure:
   
    1. Prototype Your Filesystem
       This whole chapter deals with rolling your own filesystem. In this
       step, it is assumed you create your own filesystem, perhaps by
       prototyping one on a working "NFS-Root" filesystem configuration.
       One thing to keep in mind is that unlike your "NFS-Root"
       filesystem, the "Embedded-Root" filesystem must fit within the
       confines of your allocated RAMdisk, generally 4-16 MB. Your
       maximum size is dependant on the setting of the RAMdisk driver.
    2. Create an Empty File for Your FileSystem
       You now need to create a file-based filesystem "container". This
       is just a file that is the size of your RAMdisk.
       To create this, try the dd command:
       
dd if=/dev/zero of=./fs_test.img bs=1k count=8000 

       Using this example, you now should have an 8 MB file named
       "fs_test.img". Note: Be sure the count you use matches the RAMdisk
       size you allocated for in the kernel's RAMdisk driver!
    3. Format your Filesystem "Container"
       Now that you have a "container" for your filesystem, it is time to
       format it and place a bare filesystem on it.
       In our kernel phase, we added in support for the ext2 filesystem.
       We'll now format our "container" with this filesystem type.
       
mkfs.ext2 ./fs_test.img

       Ignore any warnings about the file not being a block device, and
       proceed anyway. This is an expected warning message.
    4. Mount the Filesystem "Container" and Write to It
       Now that you have your filesystem container, you can mount it and
       load your prototyped filesystem on it.
       To mount the container, use the kernel loopback device. Make sure
       your server's kernel has loopback support enabled and issue a:
       
mount -o loop ./fs_test.img /mnt

       Copy your files to the filesystem, and make sure "/etc/fstab" has
       the RAMdisk entries as described elsewhere in this document.
       To avoid symbolic links being changed into actual copies of files,
       use a copy tool like "tar" or "cpio" instead of a "cp".
    5. Unmount and Compress the Root Filesystem
       Unmount the root filesystem you just created.
       
umount /mnt

       Compress the filesystem file with maximum "gzip" compression
       levels.
       
gzip -v9 ./fs_test.img

       You should now have "fs_test.img.gz" file.
    6. Hook the Root-Filesystem Onto the Back of Your Kernel Image
       Now you must append the filesystem image onto your kernel.
       You do this with a utility program called "piggyback". The
       piggyback program takes care of the task of appending the two and
       letting the kernel know where both it and the filesystem begins
       and ends.
       The "piggyback" program is found in your kernel source tree under
       <LINUXROOT>/arch/sparc/boot. It might also be found on your
       favorite ftp.kernel.org site.
       For piggyback to work, it needs your AOUT format kernel image, the
       System.map file from your kernel source root directory, and the
       compressed root-filesystem you just created.
       We put it all together with a:
       
piggyback vmlinux.aout System.map fs_test.img.gz

       Be sure to backup your kernel image first, as piggyback used the
       same "vmlinux.aout" filename for output. Check the filesize of
       your "vmlinux.aout" file after giving this command and you can
       verify the filesystem has indeed been appended.
       
   Congratulations! You've created an "Embedded-Root" kernel/filesystem
   boot image.
     _________________________________________________________________
   
5.4. Sample FileSystems

   Here are some sample filesystems for you to start with.
   
   A filesystem image contributed by Varol Kapton
   <[122]varol@ulakbim.gov.tr> is at:
   [123]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/jsroot_varol.tar.g
   z
     _________________________________________________________________
   
6. Set up Your Server

   This chapter describes the configuration steps necessary for the
   server machine to hand-off your JavaStation boot image.
     _________________________________________________________________
   
6.1. Preface

   It is now time to setup your server to deliver the OS and filesystem
   to the JavaStation.
   
   In our examples here, we configure a Linux/SPARC server "lnxserv" at
   private IP 192.168.128.100 to deliver a boot image to JavaStation
   "java01" at private IP 192.168.128.1. Both are on private network
   192.168.128/24. When using an "NFS-Root" Filesystem, the location on
   the server of the filesystem in our sample is at "/path/to/nfsroot".
     _________________________________________________________________
   
6.2. Setting up the RARP service

   We first need to set up RARP service on our server, so the JavaStation
   can auto-configure its IP.
   
   First, populate the "/etc/ethers" file with the mapping of the mac
   address of the JavaStation to its hostname:
### /etc/ethers
8:0:20:82:7a:21  lnxserv  # 192.168.128.100 (server is not necessary,)
#                         #                 (just for completeness)
#
#
08:00:20:81:C2:ae java01   # 192.168.128.1 (JavaStation)
#
###

   Next, populate the "/etc/hosts" file with the IP to hostname maps:
### /etc/hosts
192.168.128.100 lnxserv
192.168.128.1 java01
###

   Lastly, configure the RARP cache to fill at start-up (Linux/SPARC has
   no RARP daemon, per se):
### Part of rc.local
#
# If necessary, first load the rarp module to be able to fill the cache.
# /sbin/insmod rarp
#
# Now we fill the rarp cache.  You better have the rarp command available.
if [ -f /sbin/rarp ]; then
        /sbin/rarp -f
fi
###
     _________________________________________________________________
   
6.3. Setting up the DHCP service

   You now need to configure your server to deliver DHCP service. This
   will help identify the JavaStation, the network it is on, and where to
   get its boot image from.
   
   The following is a sample "dhcpd.conf" file for the ISC DHCP server
   software which ships with most Linux/SPARC distributions.
### Sample /etc/dhcpd.conf file for ISC DHCPD
#
deny unknown-clients;
#
subnet 192.168.128.0 netmask 255.255.255.0
{
   range 192.168.128.1 192.168.128.150;
}

group
{
   host java01
   {
      hardware ethernet 08:00:20:81:C2:ae;
      filename "C0A88003";        # "/tftpboot/xxx"
      fixed-address java01;       # 192.168.128.1
   }
}
#
### End dhcpd.conf file

   Note: Some early versions of ISC DHCPD are reported to not work well.
   It is recommended you use ISC DHCPD Version 2.0 and above.
   
   A longer [124]dhcpd.conf from the Metabyte server is mirrored here for
   demonstration purposes.
     _________________________________________________________________
   
6.4. Set up NFS service ("NFS-Root Options" Only)

   When you are serving up an "NFS-Root" filesystem, you need to share
   the filesystem you created to the JavaStation client. You do this with
   the "/etc/exports" file.
###/etc/exports
/path/to/nfsroot        java01(rw,no_root_squash)
###

   Be sure your NFS server gets properly started up at boot-time.
     _________________________________________________________________
   
6.5. Setting up for Boot with TFTP

   Now we need to set up the last step on our server: the TFTP
   configuration. For this step, you will need the kernel you created
   (using the "NFS-Root" option) or the piggybacked kernel/fs boot image
   (using the "Embedded-Root" option), the appropriate PROLL, and some
   knowledge of hexadecimal numbering.
   
   The first thing you need to do is verify that "TFTPd" is enabled in
   your "/etc/inetd.conf" file:
tftp    dgram   udp     wait    root    /usr/sbin/tcpd  in.tftpd

   Now, you move your copy of proll for your JavaStation architecture,
   along your kernel or piggybacked kernel image to /tftpboot.
   
   Now, you create of symbolic link from the hexidecimal version of your
   IP to your PROLL image, and a map from "HEXIP.PROL" to your real
   kernel image. If you are using "Embedded-Root" option, you point to
   your "Embedded-Root" Filesystem plus Kernel image. If you are using
   the "NFS-Root" option, you need to point to the normal "vmlinux.aout"
   image, plus have a separate map of IP->nfsroot location. For sake of
   completeness, you might also want a "HEXIP.SUN4M" -> "HEXIP" map, as
   that is the custom way of dealing with net boot situations with the
   Sun.
   
   Example for java01 booting from "NFS-Root":
  $ ls -ld /tftpboot
  -rw-r--r--   1 root     root        89608 Mar 20 10:15 proll.aout.krups.11
  -rw-r--r--   1 root     root        52732 Mar 17 11:52 proll.aout.mrcoffee.11
  lrwxrwxrwx   1 root     root           19 Mar 20 10:16 proll.krups -> proll.a
out.krups.11
  lrwxrwxrwx   1 root     root           22 Mar 17 11:54 proll.mrcoffee -> prol
l.aout.mrcoffee.11
  lrwxrwxrwx   1 root     root           10 Apr  1 13:00 C0A88001.SUN4M -> COA8
8001
  lrwxrwxrwx   1 root     root           10 Apr  1 13:00 C0A88001 -> proll.mrco
ffee
  lrwxrwxrwx   1 root     root           12 Apr  1 13:00 C0A88001.PROL -> vmlin
ux.aout
  -rw-r--r--   1 root     root      1456189 May 21 12:53 vmlinux.aout
  -rw-r--r--   1 root     root      6743821 Apr  1 12:53 vmlinux_embed.aout
  lrwxrwxrwx   1 root     root           18 Apr  1 12:53 192.168.128.1 -> /path
/to/nfsroot

   Example for java01 booting from "Embedded-Root" boot image:
  $ ls -ld /tftpboot
  -rw-r--r--   1 root     root        89608 Mar 20 10:15 proll.aout.krups.11
  -rw-r--r--   1 root     root        52732 Mar 17 11:52 proll.aout.mrcoffee.11
  lrwxrwxrwx   1 root     root           19 Mar 20 10:16 proll.krups -> proll.a
out.krups.11
  lrwxrwxrwx   1 root     root           22 Mar 17 11:54 proll.mrcoffee -> prol
l.aout.mrcoffee.11
  lrwxrwxrwx   1 root     root           10 Apr  1 13:00 C0A88001.SUN4M -> COA8
8001
  lrwxrwxrwx   1 root     root           10 Apr  1 13:00 C0A88001 -> proll.mrco
ffee
  lrwxrwxrwx   1 root     root           12 Apr  1 13:00 C0A88001.PROL -> vmlin
ux_embed.aout
  -rw-r--r--   1 root     root      1456189 May 21 12:53 vmlinux.aout
  -rw-r--r--   1 root     root      6743821 Apr  1 12:53 vmlinux_embed.aout
     _________________________________________________________________
   
6.6. The Last Configuration Step

   The last step to configuring your Linux-running JavaStation: boot it
   and cross your fingers!
   
     Tip: Report of success are also heard of where one or more of these
     configuration steps have been used: knocking on a wooden surface,
     booting during a full moon, walking under ladders, breaking of
     mirrors, throwing salt over one's shoulder, hunting black cats and
     sacrificing chickens (KFC will suffice).
     _________________________________________________________________
   
6.7. What to See When Booting Linux

   When you boot things properly, your JavaStation will start up with the
   normal white background screen with the PROM banner at the top, and
   you will get the black "exclamation mark in triangle" logo, signalling
   the system doesn't yet know who it is. When contact is made with the
   DHCP server, the logo goes away and changes to the Java coffee cup
   logo. After this, a black background window opens. This is the PROLL
   window. It'll show status of the TFTP download in progress, and give
   stats on the size of the file downloaded. Next, the whole screen
   should go black, you should see a picture of Tux the penguin in the
   upper left hand of the screen, and have the normal Linux kernel
   messages printed before you. Any mistakes from this point are due to
   the filesystem you are using, the filesystem mounting, or missing
   kernel drivers which should have been compiled in.
     _________________________________________________________________
   
7. Troubleshooting

   This chapter is intended to provide solutions to frequently and
   infrequently encountered problems in enabling Linux on the
   JavaStations.
     _________________________________________________________________
   
7.1. When booting, the message "The file just loaded does not appear to be
executable." Why?

   On systems that have the older OpenBoot version 2.3, and are not set
   up to use PROLL, you will get this message when attempting to boot up
   a kernel image that is not in AOUT format. Be sure to run elftoaout on
   your kernel image.
     _________________________________________________________________
   
7.2. When booting, the message "no a.out magic" appears and halts the boot.
Why?

   On systems that are set up to use PROLL, you will see this message
   when attempting to boot up a kernel image that is not in AOUT format.
   Be sure to run elftoaout on your kernel image.
     _________________________________________________________________
   
7.3. I tried booting a Krups but JavaOS comes up. I don't even have JavaOS!

   This likely means you have a copy of JavaOS loaded on your flash SIMM.
   Remove the SIMM and the problem should go away.
     _________________________________________________________________
   
7.4. Cannot Boot an "Embedded-Root" image > 10 MB on my JavaStation. Why?

   There is a known limit of 8 MB when using the "Embedded-Root" boot
   image option.
   
   The cause of this is the current version of the PROLL software, which
   map only 8 MB of low memory. Any more and banking support would need
   to be added to it.
   
   This limit can be fixed if needed by someone, as the source to PROLL
   has been released under the General Public License GPL.
   
   So in reality, the embedded image size limit is really 8 MB , not 10
   MB. If 10 MB somehow works for you, it is by "luck"!
     _________________________________________________________________
   
7.5. After Booting, Typing Anything Yields Garbage Characters. Why?

   There are a few possibilities for this. Among them:
   
    1. You have an incorrect device # for tty0.
    2. A "keytable" loaded is incorrect. Make sure you use "sun" instead
       of "PC" if you use the keytable program. Look for the keytable
       configuration file if it exists.
     _________________________________________________________________
   
7.6. In X Sessions to a Solaris server, the font server "xfs" crashes. Why?

   If you do X sessions to a Solaris server, and you find that your
   sessions are no longer opening up new windows, chances are the font
   server on the Solaris host has crashed. This is a known bug in Solaris
   2.6 and 2.7 when you have about 2 dozen X terminals sessions running.
   
   The fix is to move the font server to a different architecture and
   point your JavaStations there, or to upgrade your Solaris to the 2.7
   11/99 maintenance release or Solaris 8 which both have fixes to this
   problem.
     _________________________________________________________________
   
7.7. Performing Indirect XDMCP to a Solaris Server Results in Session Login
Failures. Why?

   Congratulations! You must have one of patch numbers 107180-12 through
   107180-19 installed on a Solaris 7 server. You need to upgrade to
   107180-20 or above to fix this problem.
   
   
   Here's a little rant:
   
   I reported this problem to Sun in November 1999, at which time I was
   told a fix was not scheduled to be made, since I was using an
   "unsupported configuration.". Never mind the client was a piece of
   hardware made by Sun itself. Also never mind that indirect XDMCP
   queries is a standard itself which was broken by Sun. A call back in
   late January 2000, and I learn that the record of my previous call was
   non-existant, but a fix was now on its way. The fix finally was made
   available in April 2000, five months after first reporting the
   problem. Considering revisions to this patch during the broken XDMCP
   period dealt with fixing system security issues, we were forced to run
   the older insecure software for five months while waiting for a fix to
   a problem which should have been patched immediately.
   
   The moral of the story: test your JavaStation configuration against an
   upgraded server that is not in production mode.
   
   --Robert Dubinski, Computer Systems Technician at Marquette University
   <[125]tech@mscs.mu.edu>
     _________________________________________________________________
   
7.8. TFTPd config doesn't work on SUSE. Why?

   This was reported by a user after this document was first released.
   
   In SUSE 6.3, using the tftpd from the 'a' package of the netkit rpm,
   you must be sure your tftpd line in /etc/inetd.conf has the -s flag.
   Otherwise you need to specify a full path.
   
   Also, it is not necessary to run tftpd as root, so the suggested
   username and group for tftpd on SUSE 6.3 is 'nobody' and 'nogroup'
     _________________________________________________________________
   
8. Answers to Miscellaneous Questions

   This chapter aims to answer some miscellaneous questions about Linux
   and the JavaStations.
     _________________________________________________________________
   
8.1. Regarding RARP: Is it Needed or Not?

   RARP is not needed with the Krups or Espresso models and recent PROLL
   software. RARP is required for Mr. Coffee, however.
   
   This document explains how to set up kernel-level RARP for the
   remaining models. In kernel versions 2.3.x/2.4.x, kernel-level RARP
   support is removed. The Metabyte server holds a version of ANK
   userland RARP from Andi Klein of SuSE that will work with Linux/SPARC.
   It is available from:
   [126]http://corp.metabyte.com/~zaitcev/linux/rarpd-ap1.tar.bz2. The
   command to use then is rarpd-ank -e eth0. "-e" makes it ignore
   /tftpboot checking, and "eth0" is needed if you are behind a firewall.
     _________________________________________________________________
   
8.2. Can One Use the Smart Card Reader on the Espresso models?

   This is not currently supported, but the reader follows an ISO
   standard (ISO 7816-3). On Espresso, if you look into PROLL, there are
   definitions for the GPIO smartcard data/clock in "eeprom.c". So a
   programmer should technically be able to get the Smart Card slot
   running.
     _________________________________________________________________
   
8.3. Can One Use the Solaris DHCP server instead of ISC?

   Yes, this is possible. Earlier ISC daemons had problems, while the
   Solaris server was more robust. Here is how to configure it:
   
   First, fill in your /var/dhcp/"networks" file, populating it with
   ethernet to IP info, and the appropriate leastime.
# This example uses "infinite" leastime
#
0108002081C2AE 03 192.168.128.1  192.168.128.100 java01  # JavaStation
010800208E4CF6 03 192.168.128.2  192.168.128.100 java02  # JavaStation

   Next, fill in your /var/dhcp/dhcptab file with entries similar to:
##
# First, some network info
#
Locale   m  :UTCoffst=21600:
www  m  :Include=Locale:Timeserv=192.168.128.100:DNSdmain=my.own.net:DNSserv=19
2.168.128.100:
192.168.128.0  m  :Broadcst=192.168.128.255:Subnet=255.255.255.0:MTU=1500:BootS
rvA=192.168.128.100:Router=192.168.128.101:NISdmain=my.own.net:NISservs=192.168
.128.100:
#
#  note: BootServA can point to a different TFTP server to get the kernel image
#        off of.
#
#
##
# Now we define the JavaStation TFTPboot parameters
#
SUNW.Linux m :Include=www:JOSchksm=0x155dbf97:Rootpath=/tftpboot:BootFile=proll
.mrcoffee:BootSrvA=192.168.128.100:TFTPsrvN=lnxserv:
SUNW.Linux.Krups m :Include=www:Rootpath=/tftpboot:BootFile=proll.krups:BootSrv
A=192.168.128.100:TFTPsrvN=lnxserv:
#
#
#  note: different classes are defined for the different PROLL images.
#
##
# Lastly, we list our hosts and which boot class each one gets.
java01  m  :LeaseTim=-1:Include=SUNW.Linux:
java02  m  :LeaseTim=-1:Include=SUNW.Linux.Krups:
#
#
#
###
     _________________________________________________________________
   
8.4. Can One Pass Arguments to "/sbin/init" in a Diskless Boot like This?

   PROLL ships with DHCP options disabled, but it could be changed. You
   would then do something like "/tftpboot/0A0A0000.ARGS" to get those
   parameters in.
   
   If you boot from flash memory, PROLL picks up SILO options (where SILO
   is > version 0.9.6 and PROLL is >= version 11)
     _________________________________________________________________
   
8.5. Enabling X on the JavaStation

   Enabling X on the JavaStation is possible.
   
   First, be sure you have enabled the appropriate framebuffer device in
   your kernel's configuration (as described elsewhere in this document).
   
   Next, you'll want to use the generic Sun Framebuffer X server and
   "XF86Config" file. You can build this yourself, or you can try
   someone's prebuilt binaries, like the samples pointed to below.
   
   As of this time, XFree 4.0 does not work on the SPARC line. You'll
   need to use an XFree 3.3.x variant in the meantime. The new driver
   model of 4.0 will provide the path necessary to provide a dedicated
   accellerated X server for the JavaStations.
   
   Sample XFree Sun Frambuffer X Server File is at:
   [127]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/XF86_FBDev
   
   Sample XFree JavaStation-Ready XF86Config File is at:
   [128]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/XF86Config
     _________________________________________________________________
   
8.6. Is There Mailing List Help?

   There is a mailing devoted exclusively to running Linux on SPARC
   processor based machines like the JavaStations.
   
   The mailing list address is "sparclinux@vger.rutgers.edu". You should
   first subscribe to it by sending a message to
   "majordomo@vger.rutgers.edu" with a subject and body line of
   "subscribe sparclinux <your_email_address>". You can leave out your
   email address, but it is helpful to put it in if you have multiple
   valid addresses at your site.
   
   Archives of the Linux/Sparc mailing list are kept at:
   [129]http://www.progressive-comp.com/Lists/?l=linux-sparc&r=1&w=2"
     _________________________________________________________________
   
8.7. Can One Boot a JavaStation from Onboard Flash Memory?

   It is possible to boot a JavaStation-NC from flash, but requires too
   much arcane knowledge at the moment to be recommended.
     _________________________________________________________________
   
9. Unanswered Questions

   This chapter lists questions which have been asked by the author or
   others, but as of now have no answers to.
     _________________________________________________________________
   
9.1. Does "Piggyback" work for the x86 too?

   Enquiring minds want to know.
     _________________________________________________________________
   
9.2. Where Can One Find Espressos for Sale?

   Enquiring minds want to know.
     _________________________________________________________________
   
9.3. Do Tools Exist to Configure Net Boot Entries Quickly?

   Enquiring minds want to know.
     _________________________________________________________________
   
9.4. What can one use the Krups Flash memory for?

   Though it is not supported without some experimental patches from
   Metabyte, the question arises as to what uses one might put the flash
   to use for, aside from booting?
     _________________________________________________________________
   
10. Appendix

   This section is a collection of various reference documents which do
   not belong in any other section.
     _________________________________________________________________
   
10.1. Mr. Coffee Jumper Info

Mr. Coffee Jumper Assignments

J0206                   JTAG header, perhaps JSCC compatible.
J0904   1-2 shortened   Enter POST - output ttya, input ttya
        1-2 open        Skip POST - output screen, input ttya
        3-4             Unused
        5-6             Unused
        7-8             Unused
J1101   1-2 open (dflt) TPE squelch
        1-2 short       Reduced squelch threshold
J1102   1-2 open (dflt) 100 Ohm TPE termination
            short       150 Ohm TPE termination
J1602                   Manufacturing test of unknown sort
J1603   1-2             PROM select (unfortunately PROM socket is emply)
        2-3 (default)   Flash select
J1604   1-2             FPROM write disable
        2-3 (default)   FPROM write enable

J0904 block is a bit block of pullup resistors which a user may shorten.
They may be read from the keyboard controller with a command 0xDD.
     _________________________________________________________________
   
10.2. Krups Jumper Info

Krups Jumper Assignments

J1202   1-2     Use Flash
        2-3     Select optional diagnostic FLASH PROM in socket J1203
                (this does not sound quite right ...)
J1300   1-2     Software debug use
        3-4     Factory use - PROM switch??
        5-6     Unused
        7-8     Flash update recovery
J0500           JTAG
     _________________________________________________________________
   
10.3. JavaStation Photo Gallery

   This section contains links to pictures of the JavaStation line.
   
   Front view of Mr. Coffee is at:
   [130]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_front_vi
   ew.jpg
   
   Top view of Mr. Coffee is at:
   [131]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_top_view
   .jpg
   
   Inside view of Mr. Coffee is at:
   [132]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_inside_v
   iew.jpg
   
   Mr. Coffee white case variation #1 at:
   [133]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_white_ca
   se_1.jpg
   
   Mr. Coffee white case variation #2 at:
   [134]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_white_ca
   se_2.jpg
   
   Front view of krups is at:
   [135]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/krups_front_view.j
   pg
   
   Side view of krups is at:
   [136]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/krups_side_view.jp
   g
   
   Top view of krups is at:
   [137]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/krups_top_view.jpg
   
   Front view of Espresso is at:
   [138]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/espresso_front_vie
   w.jpg
   
   Side view of Espresso is at:
   [139]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/espresso_side_view
   .jpg
   
   Rear view of Espresso is at:
   [140]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/espresso_rear_view
   .jpg
   
   Inside view of Espresso is at:
   [141]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/espresso_inside_vi
   ew.jpg
   
   See the JavaEngine-1 at:
   [142]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/je1_overhead_view.
   jpg
   
   View of the JavaStation mousepad is at:
   [143]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/javastation_mousep
   ad.jpg
   
   View of a Lab of JavaStations running Linux is at:
   [144]http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/lab_of_javastation
   s.jpg

References

   1. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#METAINFOCHAPTER
   2. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#DOCUMENTPURPOSESECTION
   3. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#DOCUMENTACKNOWLEDGEMENTSSECTION
   4. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#DOCUMENTCONTRIBUTORSSECTION
   5. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#DOCUMENTHISTORYSECTION
   6. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#DOCUMENTCOPYRIGHTSECTION
   7. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#DOCUMENTLOCATIONSECTION
   8. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#WHATISCHAPTER
   9. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#WHATISJAVASTATIONSECTION
  10. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#WHATISNCSECTION
  11. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#JAVASTATIONMODELSSECTION
  12. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#WHYLINUXSECTION
  13. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#JAVASTATIONDEATHSECTION
  14. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#WHEREPURCHASESECTION
  15. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#BACKGROUNDREQUIREMENTSCHAPTER
  16. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#HARDWAREREQUIREMENTSSECTION
  17. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#NETWORKSERVICEREQUIREMENTS
  18. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#JAVASTATIONBOOTDESCSECTION
  19. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#PROLLDESCSECTION
  20. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#FSTYPEDESCSECTION
  21. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#SUPPORTSITESSECTION
  22. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#KERNELBUILDCHAPTER
  23. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#BEFOREBEGINNINGSECTION
  24. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#WORKIN32BITMODESECTION
  25. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#KERNELVERSIONSUPPORTSECTION
  26. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#REQUIREDKERNELCONFIGOPTIONSSECTION
  27. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#EMBEDDEDROOTFSPATCHSECTION
  28. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#BUILDTHEKERNELSECTION
  29. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#KERNELSAMPLESSECTION
  30. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#BUILDFILESYSTEMCHAPTER
  31. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#FSBUILDINTROSECTION
  32. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#FSTABDESCSECTION
  33. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#EMBEDDEDROOTPROCEDURESECTION
  34. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#SAMPLEFILESYSTEMSSECTION
  35. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#SERVERSETUPCHAPTER
  36. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#SERVERPREFACESECTION
  37. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#CONFIGURERARPSECTION
  38. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#CONFIGUREDHCPSECTION
  39. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#CONFIGURENFSSECTION
  40. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#CONFIGURETFTPSECTION
  41. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#LASTCONFIGURESTEPSECTION
  42. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#BOOTVISUALSSECTION
  43. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#TROUBLESHOOTINGCHAPTER
  44. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#NOTEXECUTABLETSSECTION
  45. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#NOMAGICTSSECTION
  46. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#FLASHTSSECTION
  47. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#TENMBLIMITTSSECTION
  48. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#KEYGARBLESTSSECTION
  49. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#FONTSERVTSSECTION
  50. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#XDMCPTSSECTION
  51. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#SUSETFTPTSSECTION
  52. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#MISCANSWERSCHAPTER
  53. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#RARPFAQSECTION
  54. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#ESPRESSOCARDREADERFAQSECTION
  55. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#SOLARISDHCPFAQSECTION
  56. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#BOOTOPTIONSFAQSECTION
  57. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#ENABLINGXFAQSECTION
  58. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#MAILINGLISTFAQSECTION
  59. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#FLASHBOOTFAQSECTION
  60. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#UNANSWEREDQUESTIONSCHAPTER
  61. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#PIGGYBACKUNANSWERED
  62. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#ESPRESSOAVAILABILITYUNANSWERED
  63. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#NETBOOTTOOLSUNANSWERED
  64. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#FLASHUSEUNANSWERED
  65. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#APPENDIXCHAPTER
  66. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#MRCOFFEEJUMPERSSECTION
  67. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#KRUPSJUMPERSECTION
  68. file://localhost/export/sunsite/users/gferg/howto/00_JavaStation-HOWTO.html#JAVASTATIONPHOTOGALLERY
  69. mailto:dubinski@mscs.mu.edu
  70. http://www.marquette.edu/
  71. http://www.mscs.mu.edu/
  72. mailto:ebrower@usa.net
  73. http://www.linuxdoc.org/
  74. mailto:zaitcev@metabyte.com
  75. mailto:ebrower@usa.net
  76. mailto:varol@ulakbim.gov.tr
  77. mailto:davem@redhat.com
  78. mailto:zaitcev@metabyte.com
  79. mailto:ebrower@usa.net
  80. mailto:magdalena.wodzinska@marquette.edu
  81. mailto:Richard.Tomlinson@one2one.co.uk
  82. mailto:foobar@null.net
  83. mailto:dubinski@mscs.mu.edu
  84. mailto:dubinski@mscs.mu.edu
  85. mailto:dubinski@mscs.mu.edu
  86. http://www.linuxdoc.org/
  87. http://www.mscs.mu.edu/%CB%9Ctech/Linux_on_JS
  88. http://www.mscs.mu.edu/%CB%9Ctech/Linux_on_JS/Files/JavaStation-HOWTO.sgml
  89. http://www.linuxdoc.org/HOWTO/JavaStation-HOWTO/
  90. http://www.sun.com/
  91. http://www.sun.com/solaris
  92. http://www.linux.com/
  93. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_front_view.jpg
  94. http://www.idsa.org/whatis/seewhat/idea98/winners/javastation.htm
  95. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/krups_front_view.jpg
  96. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/espresso_front_view.jpg
  97. mailto:raiko@niisi.msk.ru)
  98. mailto:roganov@niisi.msk.ru
  99. mailto:zaitcev@metabyte.com
 100. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/je1_overhead_view.jpg
 101. http://www.sun.com/javastation
 102. mailto:alexr@mscs.mu.edu
 103. mailto:markb@mscs.mu.edu
 104. http://www.zdnet.com/pcmag/features/javaguide/jfgr10.htm
 105. mailto:tech@mscs.mu.edu
 106. http://www.sunspares.com/
 107. http://www.bodoman.com/javastation/javastation.html
 108. http://www.metabyte.com/~zaitcev/linux/
 109. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/proll_13.tar.bz2
 110. http://www.metabyte.com/~zaitcev/linux
 111. mailto:zaitcev@metabyte.com
 112. mailto:varol@ulakbim.gov.tr
 113. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/ramdisk_patch
 114. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/kernel_embedded_config_2_3_99pre3_mar_17
 115. mailto:dubinski@mscs.mu.edu
 116. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/kernel_nfsroot_config_2_3_99pre3_mar_17
 117. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/vmlinux_embedded_2_3_99pre3_mar_17
 118. mailto:dubinski@mscs.mu.edu
 119. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/vmlinux_nfsroot_2_3_99pre3_mar_17
 120. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/system.map_embedded_2_3_99pre3_mar_17
 121. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/system.map_nfsroot_2_3_99pre3_mar_17
 122. mailto:varol@ulakbim.gov.tr
 123. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/jsroot_varol.tar.gz
 124. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/petes_dhcpd.conf.txt
 125. mailto:tech@mscs.mu.edu
 126. http://corp.metabyte.com/~zaitcev/linux/rarpd-ap1.tar.bz2
 127. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/XF86_FBDev
 128. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/XF86Config
 129. http://www.progressive-comp.com/Lists/?l=linux-sparc&r=1&w=2
 130. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_front_view.jpg
 131. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_top_view.jpg
 132. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_inside_view.jpg
 133. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_white_case_1.jpg
 134. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/mr_coffee_white_case_2.jpg
 135. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/krups_front_view.jpg
 136. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/krups_side_view.jpg
 137. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/krups_top_view.jpg
 138. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/espresso_front_view.jpg
 139. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/espresso_side_view.jpg
 140. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/espresso_rear_view.jpg
 141. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/espresso_inside_view.jpg
 142. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/je1_overhead_view.jpg
 143. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/javastation_mousepad.jpg
 144. http://www.mscs.mu.edu/~tech/Linux_on_JS/Files/lab_of_javastations.jpg
  Jaz-drive HOWTO
  Herbert S. DaSilva
  v1.8, 12 January 2000

  This HOWTO covers the configuration and use of the 1Gb and 2Gb Iomega
  Jaz drives under Linux.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 History
     1.2 Latest Version
        1.2.1 Version History
     1.3 Copyrights and Trademarks
     1.4 Acknowledgements and Thanks

  2. Jaz Hardware

     2.1 The Jaz Drives
     2.2 The Jaz "Disks"
     2.3 The Jaz Jet Host Adapter
     2.4 Other SCSI Host Adapters
     2.5 Kernel Driver Issues

  3. Identifying the Jaz Drive

     3.1 During Power-On Test
     3.2 During Boot
     3.3 Device Name

  4. Using a Jaz Disk

     4.1 DOS Formatted Disks
     4.2 Repartitioned DOS Jaz Disks
     4.3 Linux-Native Jaz Disks
     4.4 Checking Linux-Native Jaz Disks
     4.5 Using the fstab to Make Things Easier
        4.5.1 DOS Format Disks
        4.5.2 Linux Format Disks
        4.5.3 Automatic Mount at Boot Time
     4.6 The Jaz "tools" Disk

  5. Linux Utilities for Jaz Drives

     5.1 jaztool
        5.1.1 Ejecting a Cartridge
        5.1.2 Password Protection
     5.2 jaZip

  6. Booting from a Jaz Cartridge

     6.1 BIOS Issues
     6.2 Installing Linux on a Jaz Cartridge


  ______________________________________________________________________

  1.  Introduction

  The Iomega Jaz drive is a removable-media disk drive whose disks have
  a capacity of 1 or 2 Gigabytes. Unlike the Zip drive, the Jaz is only
  available as a SCSI device (internal or external), so a SCSI interface
  card and driver are required to use these drives.
  1.1.  History

  Much of this HOWTO evolved from what was created by the previous
  author, Bob Willmot, (who can now be reached at bob@willmot.com
  <mailto:bob@willmot.com>), who maintained the HOWTO through version
  1.6, with contributions and information from the following people:


  o  Grant Gunther, grant@torque.net

  o  Tom Poindexter, tpoindex@nyx.net

  o  Todd Woods, woods@cs.uiowa.edu

  o  Richard B. Melrose, rbm@math.mit.edu

  o  Phil Howard, phil@charon.milepost.com

  o  Rick Niess, rniess@ocean.st.usm.edu

  1.2.  Latest Version

  The latest version of this document can be found on my homepage
  http://www.ultranet.com/~hsd/HOWTO/
  <http://www.ultranet.com/~hsd/HOWTO/> where you will find the HTML
  version, suitable for browsing, a PostScript version, suitable for
  printing, and the SGML source.  Other versions may be found in
  different formats at the LDP homepage http://www.linuxdoc.org/
  <http://www.linuxdoc.org/>.

  1.2.1.  Version History

  v1.8, 12 January 2000

  o  Fixed an incorrect HTTP link

  o  Added clarification to jaztool code for 2Gb drives

  v1.7, 18 November 1999

  o  Converted to SGML

  o  Added info for 2Gb drives

  o  Added fstab entry examples

  o  General freshening up

  If you have any comments/suggestions/corrections please send them to:
  Herb DaSilva at Home <mailto:hsd@ma.ultranet.com> or (if you must have
  fast response) at Work <mailto:herb@aoainc.com>.

  1.3.  Copyrights and Trademarks

  Copyright (C) 2000,1999 Herbert S. DaSilva

  This manual may be reproduced in whole or in part, without fee,
  subject to the following restrictions:


  o  The copyright notice above and this permission notice must be
     preserved complete on all complete or partial copies

  o  Any translation or derived work must be approved by the author in
     writing before distribution.

  o  If you distribute this work in part, instructions for obtaining the
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

  o  Small portions may be reproduced as illustrations for reviews or
     quotes in other works without this permission notice if proper
     citation is given.

  Exceptions to these rules may be granted for academic purposes: Write
  to the author and ask. These restrictions are here to protect us as
  authors, not to restrict you as learners and educators. All source
  code in this document is placed under the GNU General Public License,
  available via anonymous FTP from the GNU archive site
  <ftp://prep.ai.mit.edu/pub/GNU/COPYING>.

  1.4.  Acknowledgements and Thanks

  Thanks to Stephan Burlot, stephan.burlot@edicom.ch, for pointing out
  the error (or lack of clarity) in the 2Gb patch to jaztool that was
  fixed in version 1.8.

  My thanks go out to Mark F. Komarinski for his "HOWTO-HOWTO" - This
  LDP author was helped Mark, you did your job.  ;-)

  2.  Jaz Hardware

  2.1.  The Jaz Drives

  Jaz drives are SCSI devices and are available as an external drive
  with a 50-pin SCSI-2 self-terminating interface or an internal 3-1/2
  format drive with a 50-pin header interface.

  Both the internal and external devices are available in either 1 or 2
  Gigabyte capacity, so there are four different Jaz drives available.

  2.2.  The Jaz "Disks"

  Jaz disks are a cartridge-style removable media containing a stack of
  three 3.5" platters.  From here out, I'll be using the terms
  "cartridge" and "disk" interchangeably to mean the Jaz media.

  The 1Gb and 2Gb cartridges appear similar, but there is actually a
  subtle difference in their shape which prevents a 2Gb cartridge from
  being fully inserted into a 1Gb drive.  Obviously, this means that you
  can't use a 2Gb cartridge in a 1Gb drive.

  The 2-Gb capacity Jaz drives can read, write, and format both 2-Gb and
  1-Gb Jaz cartridges.

  2.3.  The Jaz Jet Host Adapter

  Iomega markets a SCSI host adapter under the name Jaz Jet.  However,
  there are at least two different SCSI chipsets that are used.  For
  this reason, the Jaz Jet isn't necessarily the best SCSI adapter to
  buy if you need one for your Jaz drive.  You're better off getting a
  card that you know your Linux distribution will support (see the next
  section).


  One of the Jaz Jet cards is based on the Adaptec 7800 family of
  adapters.  Linux 2.0 supports this adapter with the aic7xxx driver.
  This driver is built into most of the standard 2.x SCSI-capable
  kernels supplied with most Linux distributions.

  The other adapter is based on the Advanced Systems chipset.  At boot
  time the board gives a message like:
  Jaz Jet PCI SCSI adapter Copyright Advanced Systems 1996

  Depending on your Linux distribution, you may need to build a custom
  kernel (with the CONFIG_SCSI_ADVANSYS variable set) to use this
  adapter.

  Personally, I don't like surprises, so if I were going to buy an
  adapter card, I would get a name-brand card with a 50-pin connector,
  so that I knew that what I was getting was supported.

  2.4.  Other SCSI Host Adapters

  If you're using an Ultra-Wide SCSI card with a 68-pin connector,
  you'll need to get an adapter or another cable. The adapters do indeed
  work just fine with the Jaz drive, but can be rather pricey, so if
  you're buying a SCSI card primarily for the purpose of connecting the
  Jaz drive, you're better off picking up a card with a 50pin connector
  on it.

  If you're looking for a suggestion, I like the Adaptec AHA-2930U -
  it's cheap, it's fast, and the Jaz drive just plugs right in using the
  supplied cable with no adapter hassles.  Unfortunately, support for
  this card is fairly new, so unless you have a fairly new Linux
  distribution (2.2.x kernel), it probably isn't supported.  There are
  patches to the aic7xxx driver for 2.0.36 kernels that support this
  card, however.  The AHA-2940U is an excellent choice as well, and it
  has been supported for a lot longer, it's just more expensive.

  2.5.  Kernel Driver Issues

  As always, be sure that your Linux distribution supports a particular
  card EXPLICITLY before making a purchase.  Many manufacturers, like
  Adaptec, have cards with numbers and letters similar to each other
  that are actually completely different chipsets, and therefore use
  completely different drivers.

  Configuring the Linux kernel for a SCSI card is the subject of a
  complete document in itself, so I won't go into that here.

  Info on rebuilding the kernel should be found in
  /usr/src/linux/README, or in /usr/src/linux/Documentation/ directory
  for the 2.x kernels.  If these files don't exist, make sure that you
  have installed the kernel package source for your distribution.

  You can also check out Brian Ward's Kernel-HOWTO
  <http://metalab.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>

  3.  Identifying the Jaz Drive

  3.1.  During Power-On Test

  With a SCSI controller installed, when the machine is powered up or
  reset the SCSI controller will scan the SCSI bus looking for attached
  devices before booting the operating system.

  If your SCSI card is correctly installed, and your Jaz drive is
  attached and powered on, you should see the drive listed as something
  like "Iomega Jaz 1GB" or "Iomega Jaz 2GB" during this time.

  If the drive doesn't show up, there's no sense booting Linux.  Power
  down the PC and Jaz drive, and check everything again.  In particular,
  unplug the cables and make sure none of the the pins are bent, then
  replug them and ensure they are completely seated against the
  connector.  If you have multiple SCSI devices, make sure they all have
  different ID numbers, and that the last device in the SCSI chain is
  terminated.
  When the drive shows up in the power-on test, you're half way home.

  3.2.  During Boot

  When Linux boots the SCSI driver should display information about your
  SCSI adapter and what devices are attached to the SCSI bus.

  Boot messages will vary depending on your driver and adapter, and are
  logged to the /var/log/messages (or /var/adm/messages) file as well as
  appearing on the screen during boot.  You can also 'replay' the
  messages since your last boot from the command prompt with the dmesg
  command.

  Here's the kernel booting output from a 2.0.36 kernel with an Adaptec
  2940 controller (using the aic7xxx driver):


      (scsi0) <Adaptec AHA-2940A Ultra SCSI host adapter> found at PCI 14/0
      (scsi0) Narrow Channel, SCSI ID=7, 3/255 SCBs
      (scsi0) Warning - detected auto-termination
      (scsi0) Please verify driver detected settings are correct.
      (scsi0) If not, then please properly set the device termination
      (scsi0) in the Adaptec SCSI BIOS by hitting CTRL-A when prompted
      (scsi0) during machine bootup.
      (scsi0) Cables present (Int-50 NO, Ext-50 YES)
      (scsi0) Downloading sequencer code... 419 instructions downloaded
      scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.1.2/3.2.4
             <Adaptec AHA-2940A Ultra SCSI host adapter>
      scsi : 1 host.
        Vendor: iomega    Model: jaz 2GB           Rev: E.17
        Type:   Direct-Access                      ANSI SCSI revision: 02
      Detected scsi removable disk sda at scsi0, channel 0, id 4, lun 0
      scsi : detected 1 SCSI disks total.
      (scsi0:0:4:0) Synchronous at 10.0 Mbyte/sec, offset 15.
      sda : READ CAPACITY failed.
      sda : status = 1, message = 00, host = 0, driver = 28
      sda : extended sense code = 2
      sda : block size assumed to be 512 bytes, disk size 1GB.



  If something resembling these lines doesn't appear, then your kernel
  is probably not configured correctly (or you picked the wrong pre-
  built kernel).

  If the "scsi0 :" line does not appear, then you have not configured
  your driver correctly.  Some drivers will give you a hint about what
  is wrong.  If a drive name is not assigned, you probably forgot to
  include SCSI disk support when you built the kernel.

  Note the READ CAPACITY failed.  Most SCSI drivers (like this one) will
  detect that the drive is a removable media type, and not get all
  flustered when it can't read the partition table.  However, some SCSI
  cards aren't as graceful.  If your PC hangs during boot, try booting
  with a cartridge in the drive.

  Check the README files in /usr/src/linux/drivers/scsi and the Kernel
  HOWTO for other debugging hints.

  3.3.  Device Name

  In the log output in the previous section note the raw SCSI device
  name, which in this case is "sda", the full name being /dev/sda.  If
  the Jaz drive is the only SCSI disk on your system, it will typically
  be /dev/sda.  If your primary hard drive is SCSI, or you have a SCSI
  CD-ROM drive, it could be sdb, sdc, etc.
  Whatever the drive name is, you will need this name to access the
  drive, as explained in later sections.

  4.  Using a Jaz Disk

  4.1.  DOS Formatted Disks

  Jaz disks come pre-formatted from Iomega with a single partition using
  the DOS FAT16 file system.  The single partition is usually the 4th
  disk partition (for Mac compatibility - the Mac requires data to be on
  the 4th partition, but the PC doesn't care which partition data is
  on).

  Linux is perfectly happy reading and writing a FAT16 file system, so
  you can use the disk as is.  In order to use the disk, you need to
  mount it, so the first thing you need to do is create a mount point.
  For this document, we'll mount all our DOS Jaz drives under /dos_jaz,
  so let's create that mount point (you'll need to be root for most of
  this stuff).  You'll only need to do this once:

  mkdir /dos_jaz

  In a previous section, I mentioned you'd need to remember the Jaz
  drive's raw SCSI device name.  You need that now.  If your drive is
  /dev/sda then all these examples will work for you.  If not, you'll
  need to replace "sda" with the device ID of your Jaz drive.  Since you
  need to issue these commands as root, you'll want to be sure you have
  the correct names.

  If you have a 2.0 kernel, or have added VFAT support, you can mount
  the Jaz disk this way, and have long filenames under FAT16:


  mount -t vfat /dev/sda4 /dos_jaz

  Note that although VFAT allows you to use long filenames, those
  filenames are still case in-sensitive, and although 'ls' lists
  permissions, you can't actually change permissions on any of the
  files.

  If the "vfat" format is not recognized by the mount command, then
  you'll use this command to mount the Jaz disk:

  mount -t msdos /dev/sda4 /dos_jaz

  Once you have issued either of the mount commands, files from the disk
  will appear under the /dos_jaz directory.  While the disk is mounted,
  you will not be able to eject it.

  When you are done with the disk, you can unmount it with the command:

  umount /dos_jaz

  Once unmounted, you can press the button on the front of the drive to
  eject the cartridge.

  4.2.  Repartitioned DOS Jaz Disks

  Since a Jaz disk is simply a disk, it can be repartitioned and
  reformatted like a fixed disk.  If this is done, you need to know
  which partition numbers were used during repartitioning to be able to
  mount the disk.

  For instance, if the partition table was wiped, and a single new
  partition was created as the first partition, the two mount commands
  from the previous section would be:
  mount -t vfat /dev/sda1 /dos_jaz

  and

  mount -t msdos /dev/sda1 /dos_jaz

  4.3.  Linux-Native Jaz Disks

  Linux-Native Jaz disks allow files to be stored with standard Unix
  permissions and case-sensitive filenames.  The only drawback to Linux-
  Native disks is that they can no longer be used on DOS/Windows
  machines.

  A Jaz disk looks the same as a hard drive to Linux, so for those of
  you familiar with the Linux disk management tools, none of the
  following will be a surprise.


  If you want to erase a Jaz disk and make a Linux native file system on
  it, you use fdisk on the entire disk.  Please be very careful using
  fdisk, especially if you have a SCSI hard drive - we wouldn't want to
  have any "accidents".  :-)  In particular, make sure you are operating
  on the correct device before making changes.  In most cases, you'll
  use:

  fdisk /dev/sda

  and delete the existing partitions (with the d command).  Then create
  a new partition with the n command, make it primary partition number 1
  (using all the cylinders), use w to write the partition table to disk,
  and quit with q.

  Once the partition has been created, format it with:

  mke2fs /dev/sda1

  (The 1 is the number that you gave this partition in fdisk).  I prefer
  to create a separate mount point for Linux native Jaz disks, and
  you'll see why a little later when we talk about the fstab. So let's
  create that mount point now, and then mount the disk:

  mkdir /jaz

  mount -t ext2 /dev/sda1 /jaz

  As usual, when the Jaz disk is mounted, it cannot be ejected.  When
  you're done using the Jaz disk, you unmount it with:

  umount /jaz

  Once unmounted, you can press the button on the front of the drive to
  eject the cartridge.

  4.4.  Checking Linux-Native Jaz Disks

  Like your other disk drives, once a Linux Jaz disk has been mounted
  and unmounted a certain number of times, the system will mark the disk
  as "dirty".  When this happens, you'll get a message like:

  Mounting unchecked filesystem, /dev/sda1.  Recommend running e2fsck.

  Once you see this message, it's a good idea to go ahead and check the
  disk.  The disk must be unmounted in order to check it.
  Unfortunately, you only get the "dirty" message when you mount it, so
  you can either check the disk when you're done using it, or unmount
  it, check it, then re-mount it.  Use the following command to check
  the disk (assuming the partition to be checked is the first one):

  e2fsck /dev/sda1

  4.5.  Using the fstab to Make Things Easier

  Up to now, we've had to be root to mount and unmount the Jaz disks,
  and we've had to type quite a bit to mount the Jaz disks.  By adding a
  couple of entries to the file /etc/fstab, we can make using the Jaz
  drive much easier.

  4.5.1.  DOS Format Disks

  If you've got preformatted DOS disks, and you've created the /dos_jaz
  mount point, you can add this line to the file /etc/fstab:

  /dev/sda4 /dos_jaz vfat defaults,user,nosuid,noauto 0 0

  With this line in the fstab, any user can mount and unmount a DOS-
  format Jaz cartridge with the following commands:

  mount /dos_jaz

  umount /dos_jaz

  This is because we have told Linux what the Jaz device ID and media
  type are in the fstab, plus we have given the user option to allow any
  user to mount and unmount the disk.  Naturally, if your Jaz drive is
  other than sda, you'll need to change that, and this won't work for
  DOS cartridges that have been repartitioned without another entry in
  the fstab that uses a separate mount point (e.g. /dos_jaz2).

  4.5.2.  Linux Format Disks

  If you've got Linux formatted disks, and you've created the /jaz mount
  point, you can add this line to the fstab:

  /dev/sda1 /jaz ext2 defaults,user,exec,nosuid,noauto 0 0

  With this line in the fstab, any user can mount and unmount a Linux-
  format Jaz cartridge with the following commands:

  mount /jaz

  umount /jaz

  Once again, we have told Linux what the Jaz device ID and media type
  are in the fstab, plus we have given the user option to allow any user
  to mount and unmount the disk.  Some system administrators may not
  wish to have the exec option present, as there are some security risks
  with letting any user run an executable of unknown origin from the
  drive, but with the nosuid option present, these risks are minimal.

  4.5.3.  Automatic Mount at Boot Time

  Both of the fstab examples above have the option noauto in them to
  prevent the disk from being automatically mounted at boot time.  In
  general, this is a good idea because if there is no disk in the drive
  when the computer boots, or the drive is powered off, it can cause
  varying amounts of trouble, depending on which SCSI driver you are
  using.

  If you're sure you want to mount the jaz drive at boot time, simply
  remove the noauto option, and make sure the drive is on, and a
  cartridge is inserted before booting.  Note that you can only have one
  fstab entry for jaz drive that will auto-mount, or you may encounter
  the same problems as if there was no cartridge in the drive.

  4.6.  The Jaz "tools" Disk

  With some Jaz drives, the software to run the drive is supplied on a
  Jaz cartridge instead of on CD-ROM.  The "problem" with these disks is
  that software-controlled write protection is enabled on the disk, so
  that the user can't wipe the disk until after the tools are installed
  at least once.

  There are several ways you can reclaim the Jaz tools disk:

  o  Install the tools on a DOS/Windows computer.

  o  Use a DOS/Windows computer with the Jaz tools already installed to
     remove the password protection.

  o  Use one of the Linux Utilities mentioned in a later section to
     remove the password protection.

  If you have access to one of the password protection removal programs,
  all you need is the password that Iomega uses, and it is:

  APlaceForYourStuff

  Note that capitalization is important.

  5.  Linux Utilities for Jaz Drives

  5.1.  jaztool

  jaztool is a Linux utility written by Bob Willmot to support some of
  the Jaz drive's features (including software controlled ejection and
  write protection).  I like jaztool because its commands can be
  embedded in alias commands and scripts.  It's also easy to compile and
  install.

  The original source code for jaztool can be found at
  http://www.willmot.com/jaztool/ <http://www.willmot.com/jaztool/> and
  is also mirrored at my site at
  http://www.ultranet.com/~hsd/HOWTO/index.shtml#jaztool
  <http://www.ultranet.com/~hsd/HOWTO/index.shtml#jaztool>

  Note that to use jaztool with a 2Gb Jaz drive, you must change ONE
  line of code.  Change line 188 from this:

  return(!strncasecmp(id,"IOMEGA  JAZ 1GB",15));

  to this:

  return(!strncasecmp(id,"IOMEGA  JAZ",11));

  NOTE: There are two spaces between IOMEGA and JAZ in the previous two
  lines of code.  SGML (or maybe just HTML) apparently removes the extra
  whitespace.

  After building jaztool and installing it, it must be suid root, or run
  as root, or it won't work.

  I use jaztool regularly, so if you have a question about it, I would
  be happy to try and answer it.

  5.1.1.  Ejecting a Cartridge

  Use the following command to eject a cartridge:

  jaztool /dev/sda eject

  This might seem like a lot to type, but it's easy to make a slick
  alias like this:

  alias jazej 'umount /jaz; jaztool /dev/sda eject'

  5.1.2.  Password Protection

  There are two password protection modes on a Jaz, and both are
  controlled through software.  One is Write Protected and the other is
  Read/Write Protected.  jaztool will allow you to unlock a Write
  Protected disk, but under Linux, a device that cannot be read cannot
  be mounted, so Read/Write Protected is not supported.

  If the cartridge is Write Protected (such as a Jaz Tools disk), use
  the following command to unlock it (the disk must not be mounted):

  jaztool /dev/sda rw

  jaztool prompts for a password, and if the password is correct, the
  disk is unlocked and ejected.  This must be done to cause the SCSI
  driver to pick up the new mode when the cartridge is re-inserted.

  To make the disk Write Protected again, use the following command:

  jaztool /dev/sda ro

  jaztool again prompts for a password, and the disk is locked and
  ejected.

  Note that jaztool doesn't support the "Unprotect until Eject" feature
  found in the Windows world.  If you remove the password protection, it
  is removed until you put it back on.

  5.2.  jaZip

  If you'd prefer a nice, slick, graphical user interface to control
  your Jaz (and Zip!) drive, there's the jaZip tool.  Check it out at:
  http://www.scripps.edu/~jsmith/jazip/
  <http://www.scripps.edu/~jsmith/jazip/>

  I haven't used jaZip myself, so please contact the author directly
  with questions on jaZip.  Contact information is on the website listed
  above.

  6.  Booting from a Jaz Cartridge

  6.1.  BIOS Issues

  If the Jaz drive co-exists with other SCSI harddrives, most BIOSes
  will want to boot the disk that has the lowest SCSI Id.  The Jaz drive
  can be set to SCSI Ids 0-6, and typically come out of the box set to
  SCSI Id 5.  Some BIOSes detect and skip removable devices like the
  Jaz.  If your BIOS will boot from a Jaz, you can set your main SCSI
  harddrive to SCSI Id 1, then you can change the Jaz from SCSI Id 5 to
  0 when you want to boot from the Jaz.

  More typically, the Jaz drive co-exists with an IDE harddrive.  Nearly
  every BIOS will want to boot the first IDE harddrive.  Some BIOSes
  will allow you change a setting in the BIOS setup to boot from a SCSI
  device first.  Others may require you to disable the IDE drives in the
  BIOS setup.  Still others may require detaching the IDE drives
  physically or disabling the IDE interface.


  6.2.  Installing Linux on a Jaz Cartridge

  Although running Linux from a Jaz cartridge is much slower than
  running from a harddrive, the Jaz drive makes an excellent ERD
  (Emergency Repair Disk).  It's also fun to be able to just pop in some
  new Linux system or to try Linux on someone else's Jaz-equipped
  machine.

  By far the easiest way to install Linux on the Jaz cartridge is simply
  to follow the install procedure for your favorite distribution with
  the Jaz drive being the only drive on the system.  I've done this with
  RedHat 5.2, and it works perfectly.  If you're not completely
  comfortable with doing weird, wild stuff with LILO, it's the only way
  to go.

  If you want to do an "install" from your running system, you can often
  succeed in "building" a bootable system on a Jaz cartridge.


  o  Partition the drive and make the filesystems.  You probably need to
     have a swap partition, too, but if you have lots of RAM then maybe
     not.  Mount the new root as /jaz and any additional partitions
     within that directory as appropriate.

  o  Copy all the files into place.  Be sure all the /dev files are
     copied.  Be sure all permissions, ownership and group ids are
     retained.

  o  Modify the files on the Jaz cartridge to suit the circumstances of
     booting from it.  In particular be sure to change /jaz/etc/fstab to
     mount the Jaz cartridge partition(s) as appropriate.  Also change
     /jaz/etc/lilo.conf to match as well.

  o  There are two alternatives for installing the LILO boot loader:

  o  Make a kernel image floppy and use rdev to make it mount the Jaz
     cartridge as root.  Boot from the floppy when ready the first time
     then run LILO to make the Jaz MBR bootable.

  o  You can run LILO from your non-Jaz root running system to install
     the bootable MBR on the Jaz cartridge.  For more information on
     this option, check out Alessandro Rubini's LILO mini-HOWTO
     <http://metalab.unc.edu/mdw/HOWTO/mini/LILO.html>



  The Linux Kernel HOWTO
  Brian Ward, bri@cs.uchicago.edu
  v1.0, 5 June 1999

  This is a detailed guide to kernel configuration, compilation,
  upgrades, and troubleshooting for ix86-based systems.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Read this first! (I mean it)
     1.2 A word on style

  2. Important questions and their answers

     2.1 What does the kernel do, anyway?
     2.2 Why would I want to upgrade my kernel?
     2.3 What kind of hardware do the newer kernels support?
     2.4 What version of gcc and libc do I need?
     2.5 What's a loadable module?
     2.6 How much disk space do I need?
     2.7 How long does it take?

  3. How to actually configure the kernel

     3.1 Getting the source
     3.2 Unpacking the source
     3.3 Configuring the kernel
        3.3.1 Kernel math emulation (Processor type and features)
        3.3.2 Enhanced (MFM/RLL) disk and IDE disk/cdrom support (Block Devices)
        3.3.3 Networking support (General Setup)
        3.3.4 System V IPC (General Setup)
        3.3.5 Processor family (Processor type and features)
        3.3.6 SCSI support
        3.3.7 Network device support
        3.3.8 Filesystems
           3.3.8.1 But I don't know which filesystems I need!
        3.3.9 Character devices
        3.3.10 Sound
        3.3.11 Other configuration options
        3.3.12 Kernel hacking
     3.4 Now what? (The Makefile)

  4. Compiling the kernel

     4.1 Cleaning and depending
     4.2 Compile time
     4.3 Other ``make''ables
     4.4 Installing the kernel

  5. Patching the kernel

     5.1 Applying a patch
     5.2 If something goes wrong
     5.3 Getting rid of the .orig files
     5.4 Other patches

  6. Additional packages

     6.1 kbd
     6.2 util-linux
     6.3 hdparm
     6.4 gpm

  7. Some pitfalls

     7.1 make clean
     7.2 Huge or slow kernels
     7.3 The parallel port doesn't work/my printer doesn't work
     7.4 Kernel doesn't compile
     7.5 New version of the kernel doesn't seem to boot
     7.6 You forgot to run LILO, or system doesn't boot at all
     7.7 It says `warning: bdflush not running'
     7.8 I can't get my IDE/ATAPI CD-ROM drive to work
     7.9 It says weird things about obsolete routing requests
     7.10 Firewalling not working in 1.2.0
     7.11 ``Not a compressed kernel Image file''
     7.12 Problems with console terminal after upgrade to 1.3.x
     7.13 Can't seem to compile things after kernel upgrade
     7.14 Increasing limits

  8. Note for upgrade to version 2.0.x, 2.2.x

  9. Modules

     9.1 Installing the module utilities
     9.2 Modules distributed with the kernel

  10. Tips and tricks

     10.1 Redirecting output of the make or patch commands
     10.2 Conditional kernel install
     10.3 Kernel updates

  11. Other relevant HOWTOs that might be useful

  12. Misc

     12.1 Author
     12.2 To do
     12.3 Contributions
     12.4 Copyright notice, License, and all that stuff


  ______________________________________________________________________

  1.  Introduction


  Should you read this document? Well, see if you've got any of the
  following symptoms:



  o  ``Arg! This wizzo-46.5.6 package says it needs kernel release
     2.8.193 and I still only have release 1.0.9!''

  o  There's a device driver in one of the newer kernels that you just
     gotta have

  o  You really have no idea at all how to compile a kernel

  o  ``Is this stuff in the README really the whole story?''

  o  You came, you tried, it didn't work

  o  You need something to give to people who insist on asking you to
     install their kernels for them


  1.1.  Read this first! (I mean it)

  Some of the examples in this document assume that you have GNU tar,
  find, and xargs. These are quite standard; this should not cause
  problems. It is also assumed that you know your system's filesystem
  structure; if you don't, it is critical that you keep a written copy
  of the mount command's output during normal system operation (or a
  listing of /etc/fstab, if you can read it). This information is
  important, and does not change unless you repartition your disk, add a
  new one, reinstall your system, or something similar.
  The latest ``production'' kernel version at the time of this writing
  was 2.2.9, meaning that the references and examples correspond to that
  release. Even though I try to make this document as version-
  independent as possible, the kernel is constantly under development,
  so if you get a newer release, it will inevitably have some
  differences. Again, this should not cause major problems, but it may
  create some confusion.


  There are two versions of the linux kernel source, ``production'' and
  ``development.'' Production releases are the even-minor-numbered
  releases; 1.2.x was production, 2.0.x is production, as well as 2.2.x.
  These kernels are considered to be the most stable, bug-free versions
  available at the time of release. The development kernels (2.1.x,
  2.3.x, etc) are meant as testing kernels, for people willing to test
  out new and possibly very buggy kernels. You have been warned.



  1.2.  A word on style

  Text that looks like this is either something that appears on your
  screen, a filename, or something that can be directly typed in, such
  as a command, or options to a command (if you're looking at a plain-
  text file, it doesn't look any different). Commands and other input
  are frequently quoted (with ` '), which causes the following classic
  punctuation problem: if such an item appears at the end of a sentence
  in quotes, people often type a `.' along with the command, because the
  American quoting style says to put the period inside of the quotation
  marks. Even though common sense (and unfortunately, this assumes that
  the one with the ``common sense'' is used to the so-called American
  style of quotation) should tell one to strip off the punctuation
  first, many people simply do not remember, so I will place it outside
  the quotation marks in such cases. In other words, when indicating
  that you should type ``make config'' I would write `make config', not
  `make config.'



  2.  Important questions and their answers



  2.1.  What does the kernel do, anyway?


  The Unix kernel acts as a mediator for your programs and your
  hardware.  First, it does (or arranges for) the memory management for
  all of the running programs (processes), and makes sure that they all
  get a fair (or unfair, if you please) share of the processor's cycles.
  In addition, it provides a nice, fairly portable interface for
  programs to talk to your hardware.


  There is certainly more to the kernel's operation than this, but these
  basic functions are the most important to know.



  2.2.  Why would I want to upgrade my kernel?


  Newer kernels generally offer the ability to talk to more types of
  hardware (that is, they have more device drivers), they can have
  better process management, they can run faster than the older
  versions, they could be more stable than the older versions, and they
  fix silly bugs in the older versions. Most people upgrade kernels
  because they want the device drivers and the bug fixes.



  2.3.  What kind of hardware do the newer kernels support?


  See the Hardware-HOWTO. Alternatively, you can look at the `config.in'
  file in the linux source, or just find out when you try `make config'.
  This shows you all hardware supported by the standard kernel
  distribution, but not everything that linux supports; many common
  device drivers (such as the PCMCIA drivers and some tape drivers) are
  loadable modules maintained and distributed separately.



  2.4.  What version of gcc and libc do I need?


  Linus recommends a version of gcc in the README file included with the
  linux source. If you don't have this version, the documentation in the
  recommended version of gcc should tell you if you need to upgrade your
  libc.  This is not a difficult procedure, but it is important to
  follow the instructions.



  2.5.  What's a loadable module?


  These are pieces of kernel code which are not linked (included)
  directly in the kernel. One compiles them separately, and can insert
  and remove them into the running kernel at almost any time. Due to its
  flexibility, this is now the preferred way to code certain kernel
  features. Many popular device drivers, such as the PCMCIA drivers and
  the QIC-80/40 tape driver, are loadable modules.



  2.6.  How much disk space do I need?


  It depends on your particular system configuration. First, the
  compressed linux source is nearly 14 megabytes large at version 2.2.9.
  Many sites keep this even after unpacking.  Uncompressed and built
  with a moderate configuration, it takes up another 67 MB.



  2.7.  How long does it take?

  With newer machines, the compilation takes dramatically less time than
  older ones; an AMD K6-2/300 with a fast disk can do a 2.2.x kernel in
  about four minutes. As for old Pentiums, 486s, and 386s, if you plan
  to compile one, be prepared to wait, possibly hours, days..

  If this troubles you, and you happen to have a faster machine around
  to compile on, you can build on the fast machines (assuming you give
  it the right parameters, that your ulilities are up-to-date, and so
  on), and then transfer the kernel image to the slower machine.



  3.  How to actually configure the kernel



  3.1.  Getting the source


  You can obtain the source via anonymous ftp from ftp.kernel.org in
  /pub/linux/kernel/vx.y, where x.y is the version (eg 2.2), and as
  mentioned before, the ones that end with an odd number are development
  releases and may be unstable.  It is typically labelled linux-
  x.y.z.tar.gz, where x.y.z is the version number. The sites also
  typically carry ones with a suffix of .bz2, which have been compressed
  with bzip2 (these files will be smaller and take less time to
  transfer).

  It's best to use ftp.xx.kernel.org where xx is your country code;
  examples being ftp.at.kernel.org for Austria, and ftp.us.kernel.org
  for the United States.



  3.2.  Unpacking the source


  Log in as or su to `root', and cd to /usr/src.  If you installed
  kernel source when you first installed linux (as most do), there will
  already be a directory called `linux' there, which contains the entire
  old source tree.  If you have the disk space and you want to play it
  safe, preserve that directory. A good idea is to figure out what
  version your system runs now and rename the directory accordingly. The
  command `uname -r' prints the current kernel version.  Therefore, if
  `uname -r' said `1.0.9', you would rename (with `mv') `linux' to
  `linux-1.0.9'.  If you feel mildly reckless, just wipe out the entire
  directory. In any case, make certain there is no `linux' directory in
  /usr/src before unpacking the full source code.


  Now, in /usr/src, unpack the source with `tar zxpvf linux-
  x.y.z.tar.gz' (if you've just got a .tar  file with no .gz at the end,
  `tar xpvf linux-x.y.z.tar' works.).  The contents of the source will
  fly by. When finished, there will be a new `linux' directory in
  /usr/src. cd to linux and look over the README  file.  There will be a
  section with the label `INSTALLING the kernel'.  Carry out the
  instructions when appropriate -- symbolic links that should be in
  place, removal of stale .o files, etc.

  If you have a .bz2 file and the bzip2 program (read about it at
  http://www.muraroa.demon.co.uk/), do this:


       bz2cat linux-x.y.z.tar.bz2 | tar xvf -



  3.3.  Configuring the kernel


  Note: Some of this is reiteration/clarification of a similar section
  in Linus' README file.


  The command `make config' while in /usr/src/linux starts a configure
  script which asks you many questions. It requires bash, so verify that
  bash is /bin/bash, /bin/sh, or $BASH.
  However, there are some much more pleasant alternatives to `make
  config' and you may very well find them easier and more comfortable to
  use.  `make menuconfig' is probably the most widely-used. Whatever you
  choose, it's best to get familiar with the interface because you may
  find yourself back at it sooner than you think.  For those ``running
  X,'' you can try `make xconfig' if you have Tk installed (`click-o-
  rama' - Nat). `make menuconfig' is for those who have (n)curses and
  would prefer a text-based menu. These interfaces have a rather clear
  advantage: If you goof up and make a wrong choice during
  configuration, it is simple to go back and fix it.


  The configuration options will appear in hierarchies with `make
  menuconfig' and `make xconfig'.


  You are ready to answer the questions, usually with `y' (yes) or `n'
  (no). Device drivers typically have an `m' option.  This means
  ``module,'' meaning that the system will compile it, but not directly
  into the kernel, but as a loadable module. A more comical way to
  describe it is as ``maybe.'' Some of the more obvious and non-critical
  options are not described here; see the section ``Other configuration
  options'' for short descriptions of a few others.  With `make
  menuconfig', the space bar toggles the selection.


  In 2.0.x and later, there is a `?' option, which provides a brief
  description of the configuration parameter. That information is likely
  to be the most up-to-date. Here are a listing of some of the important
  features, which hierarchy they are in, and brief description.



  3.3.1.  Kernel math emulation (Processor type and features)

  If you don't have a math coprocessor (you have a bare 386 or 486SX),
  you must say `y' to this. If you do have a coprocessor and you still
  say `y', don't worry too much -- the coprocessor is still used and the
  emulation ignored. For any halfway modern machine, the answer will be
  no, but don't worry if you say yes accidentally; if not needed, it is
  not used.



  3.3.2.  Enhanced (MFM/RLL) disk and IDE disk/cdrom support (Block
  Devices)


  You probably need to support this; it means that the kernel will
  support standard PC hard disks, which most people have. This driver
  does not include SCSI drives; they come later in the configuration.

  You will then be asked about the ``old disk-only'' and ``new IDE''
  drivers.  You want to choose one of them; the main difference is that
  the old driver only supports two disks on a single interface, and the
  new one supports a secondary interface and IDE/ATAPI cdrom drives. The
  new driver is 4k larger than the old one and is also supposedly
  ``improved,'' meaning that aside from containing a different number of
  bugs, it might improve your disk performance, especially if you have
  newer (EIDE-type) hardware.



  3.3.3.  Networking support (General Setup)


  In principle, you would only say `y' if your machine is on a network
  such as the internet, or you want to use SLIP, PPP, term, etc to dial
  up for internet access. However, as many packages (such as the X
  window system) require networking support even if your machine does
  not live on a real network, you should say `y'. Later on, you will be
  asked if you want to support TCP/IP networking; again, say `y' here if
  you are not absolutely sure.



  3.3.4.  System V IPC (General Setup)


  One of the best definitions of IPC (Interprocess Communication) is in
  the Perl book's glossary. Not surprisingly, some Perl programmers
  employ it to let processes talk to each other, as well as many other
  packages (DOOM, most notably), so it is not a good idea to say n
  unless you know exactly what you are doing.



  3.3.5.  Processor family (Processor type and features)

  (in older kernels: Use -m486 flag for 486-specific optimizations)


  Traditionally, this compiled in certain optimizations for a particular
  processor; the kernels ran fine on other chips, but the kernel was
  perhaps a bit larger. In newer kernels, however, this is no longer
  true, so you should enter the processor for which you are compiling
  the kernel. A ``386'' kernel will work on all machines.



  3.3.6.  SCSI support


  If you have SCSI devices, say `y'. You will be prompted for further
  information, such as support for CD-ROM, disks, and what kind of SCSI
  adapter you have. See the SCSI-HOWTO for greater detail.



  3.3.7.  Network device support


  If you have a network card, or you would like to use SLIP, PPP, or a
  parallel port adapter for connecting to the Internet, say `y'. The
  config script will prompt for which kind of card you have, and which
  protocol to use.



  3.3.8.  Filesystems


  The configure script then asks if you wish to support the following
  filesystems:


  Standard (minix) - Newer distributions don't create minix filesystems,
  and many people don't use it, but it may still be a good idea to
  configure this one. Some ``rescue disk'' programs use it, and still
  more floppies may have a minix filesystem, since the minix filesystem
  is less painful to use on a floppy.


  Second extended - This is the standard Linux filesystem. You almost
  definitely have one of these, and need to say `y'.


  msdos - If you want to use your MS-DOS hard disk partitions, or mount
  MS-DOS formatted floppy disks, say `y'.


  There are various other foreign operating system filesystem types
  available.


  /proc - (idea from Bell Labs, I guess). One doesn't make a proc
  filesystem on a disk; this is a filesystem interface to the kernel and
  processes. Many process listers (such as `ps') use it. Try `cat
  /proc/meminfo' or `cat /proc/devices' sometime.  Some shells (rc, in
  particular) use /proc/self/fd  (known as /dev/fd on other systems) for
  I/O. You should almost certainly say `y' to this; many important linux
  tools depend on it.


  NFS - If your machine lives on a network and you want to use
  filesystems which reside on other systems with NFS, say `y'.


  ISO9660 - Found on most CD-ROMs. If you have a CD-ROM drive and you
  wish to use it under Linux, say `y'.



  3.3.8.1.  But I don't know which filesystems I need!


  Ok, type `mount'. The output will look something like this:



           blah# mount
           /dev/hda1 on / type ext2 (defaults)
           /dev/hda3 on /usr type ext2 (defaults)
           none on /proc type proc (defaults)
           /dev/fd0 on /mnt type msdos (defaults)



  Look at each line; the word next to `type' is the filesystem type. In
  this example, my /  and /usr filesystems are second extended, I'm
  using /proc, and there's a floppy disk mounted using the msdos (bleah)
  filesystem.

  You can try `cat /proc/filesystems' if you have /proc currently
  enabled; it will list your current kernel's filesystems.

  The configuration of rarely-used, non-critical filesystems can cause
  kernel bloat; see the section on modules for a way to avoid this and
  the ``Pitfalls'' section on why a bloated kernel is undesirable.



  3.3.9.  Character devices


  Here, you enable the drivers for your printer (parallel printer, that
  is), busmouse, PS/2 mouse (many notebooks use the PS/2 mouse protocol
  for their built-in trackballs), some tape drives, and other such
  ``character'' devices. Say `y' when appropriate.


  Note: gpm is a program which allows the use of the mouse outside of
  the X window system for cut and paste between virtual consoles. It's
  fairly nice if you have a serial mouse, because it coexists well with
  X, but you need to do special tricks for others.



  3.3.10.  Sound


  If you feel a great desire to hear biff bark, say `y', and you can
  tell the configuration program all about your sound board. (A note on
  sound card configuration: when it asks you if you want to install the
  full version of the driver, you can say `n' and save some kernel
  memory by picking only the features which you deem necessary.)


  If you are serious about sound card support, have a look at both the
  free drivers at http://www.linux.org.uk/OSS/ and the commercial Open
  Sound System at http://www.opensound.com/.



  3.3.11.  Other configuration options

  Not all of the configuration options are listed here because they
  change too often or fairly self-evident (for instance, 3Com 3C509
  support to compile the device drive for this particular ethernet
  card).  There exists a fairly comprehensive list of all the options
  (plus a way to place them into the Configure script) in an effort
  started and maintained by Axel Boldt (boldt@math.ucsb.edu) and it's
  the online help. It's also available as one big file at the
  Documentation/Configure.help in your Linux kernel source tree as of
  version 2.0.



  3.3.12.  Kernel hacking


  >From Linus' README:

  the ``kernel hacking'' configuration details usually result in a
  bigger or slower kernel (or both), and can even make the kernel less
  stable by configuring some routines to actively try to break bad code
  to find kernel problems (kmalloc()).  Thus you should probably answer
  `n' to the questions for a ``production'' kernel.



  3.4.  Now what? (The Makefile)


  After you finish configuration, a message tells you that your kernel
  has been configured, and to ``check the top-level Makefile for
  additional configuration,'' etc.

  So, look at the Makefile. You probably will not need to change it, but
  it never hurts to look. You can also change its options with the
  `rdev' command once the new kernel is in place. If you're feel lost
  when you look at the file, then don't worry about it.



  4.  Compiling the kernel



  4.1.  Cleaning and depending


  When the configure script ends, it also tells you to `make dep' and
  (possibly) `clean'.  So, do the `make dep'. This insures that all of
  the dependencies, such the include files, are in place. It does not
  take long, unless your computer is fairly slow to begin with.  For
  older versions of the kernel, when finished, you should do a `make
  clean'.  This removes all of the object files and some other things
  that an old version leaves behind. In any case, do not forget this
  step before attempting to recompile a kernel.



  4.2.  Compile time


  After depending and cleaning, you may now `make bzImage' or `make
  bzdisk' (this is the part that takes a long time.).  `make bzImage'
  will compile the kernel, and leave a file in arch/i386/boot called
  `bzImage' (among other things). This is the new compressed kernel.
  `make bzdisk' does the same thing, but also places the new bzImage on
  a floppy disk which you hopefully put in drive ``A:''.  `bzdisk' is
  fairly handy for testing new kernels; if it bombs (or just doesn't
  work right), just remove the floppy and boot with your old kernel. It
  can also be a handy way to boot if you accidentally remove your kernel
  (or something equally as dreadful). You can also use it to install new
  systems when you just dump the contents of one disk onto the other
  (``all this and more! NOW how much would you pay?'').


  All even halfway reasonably recent kernels are compressed, hence the
  `bz' in front of the names. A compressed kernel automatically
  decompresses itself when executed.

  In older kernels, you don't have the option to build a bzImage; it was
  simply a zImage. That option is at the moment still available,
  however, given the code size of newer kernels, it is now more or less
  mandatory to build a bzImage because the older methods can't handle a
  kernel that's just too large.



  4.3.  Other ``make''ables


  `make mrproper' will do a more extensive `clean'ing.  It is sometimes
  necessary; you may wish to do it at every patch. `make mrproper' will
  also delete your configuration file, so you might want to make a
  backup of it (.config) if you see it as valuable.


  `make oldconfig' will attempt to configure the kernel from an old
  configuration file; it will run through the `make config' process for
  you. If you haven't ever compiled a kernel before or don't have an old
  config file, then you probably shouldn't do this, as you will most
  likely want to change the default configuration.


  See the section on modules for a description of `make modules'.



  4.4.  Installing the kernel

  After you have a new kernel that seems to work the way you want it to,
  it's time to install it. Most people use LILO (Linux Loader) for this.
  `make bzlilo' will install the kernel, run LILO on it, and get you all
  ready to boot, BUT ONLY if lilo is configured in the following way on
  your system: kernel is /vmlinuz, lilo is in /sbin, and your lilo
  config (/etc/lilo.conf) agrees with this.


  Otherwise, you need to use LILO directly. It's a fairly easy package
  to install and work with, but it has a tendency to confuse people with
  the configuration file.  Look at the config file (either
  /etc/lilo/config for older versions or /etc/lilo.conf for new
  versions), and see what the current setup is. The config file looks
  like this:



      image = /vmlinuz
          label = Linux
          root = /dev/hda1
          ...



  The `image =' is set to the currently installed kernel.  Most people
  use /vmlinuz. `label' is used by lilo to determine which kernel or
  operating system to boot, and `root' is the / of that particular
  operating system. Make a backup copy of your old kernel and copy the
  bzImage which you just made into place (you would say `cp bzImage
  /vmlinuz' if you use `/vmlinuz').  Then, rerun lilo -- on newer
  systems, you can just run `lilo', but on older stuff, you might have
  to do an /etc/lilo/install or even an /etc/lilo/lilo -C
  /etc/lilo/config.


  If you would like to know more about LILO's configuration, or you
  don't have LILO, get the newest version from your favorite ftp site
  and follow the instructions.


  To boot one of your old kernels off the hard disk (another way to save
  yourself in case you screw up the new kernel), copy the lines below
  (and including) `image = xxx' in the LILO config file to the bottom of
  the file, and change the `image = xxx' to `image = yyy', where `yyy'
  is the full pathname of the file you saved your backup kernel to.
  Then, change the `label = zzz' to `label = linux-backup' and rerun
  lilo. You may need to put a line in the config file saying `delay=x',
  where x is an amount in tenths of a second, which tells LILO to wait
  that much time before booting, so that you can interrupt it (with the
  shift key, for example), and type in the label of the backup boot
  image (in case unpleasant things happen).



  5.  Patching the kernel



  5.1.  Applying a patch


  Incremental upgrades of the kernel are distributed as patches. For
  example, if you have version 1.1.45, and you notice that there's a
  `patch46.gz' out there for it, it means you can upgrade to version
  1.1.46 through application of the patch. You might want to make a
  backup of the source tree first (`make clean' and then `cd /usr/src;
  tar zcvf old-tree.tar.gz linux' will make a compressed tar archive for
  you.).


  So, continuing with the example above, let's suppose that you have
  `patch46.gz' in /usr/src. cd to /usr/src  and do a `zcat patch46.gz |
  patch -p0' (or `patch -p0 < patch46' if the patch isn't compressed).
  You'll see things whizz by (or flutter by, if your system is that
  slow) telling you that it is trying to apply hunks, and whether it
  succeeds or not. Usually, this action goes by too quickly for you to
  read, and you're not too sure whether it worked or not, so you might
  want to use the -s flag to patch, which tells patch to only report
  error messages (you don't get as much of the ``hey, my computer is
  actually doing something for a change!'' feeling, but you may prefer
  this..). To look for parts which might not have gone smoothly, cd to
  /usr/src/linux  and look for files with a .rej extension. Some
  versions of patch (older versions which may have been compiled with on
  an inferior filesystem) leave the rejects with a # extension. You can
  use `find' to look for you;

      find .  -name '*.rej' -print


  prints all files who live in the current directory or any subdirecto-
  ries with a .rej extension to the standard output.


  If everything went right, do a `make clean', `config', and `dep' as
  described in sections 3 and 4.


  There are quite a few options to the patch command. As mentioned
  above, patch -s will suppress all messages except the errors. If you
  keep your kernel source in some other place than /usr/src/linux, patch
  -p1 (in that directory) will patch things cleanly. Other patch options
  are well-documented in the manual page.



  5.2.  If something goes wrong


  (Note: this section refers mostly to quite old kernels)


  The most frequent problem that used to arise was when a patch modified
  a file called `config.in' and it didn't look quite right, because you
  changed the options to suit your machine. This has been taken care of,
  but one still might encounter it with an older release.  To fix it,
  look at the config.in.rej  file, and see what remains of the original
  patch.  The changes will typically be marked with `+' and `-' at the
  beginning of the line. Look at the lines surrounding it, and remember
  if they were set to `y' or `n'. Now, edit config.in, and change `y' to
  `n' and `n' to `y' when appropriate. Do a
      patch -p0 < config.in.rej


  and if it reports that it succeeded (no fails), then you can continue
  on with a configuration and compilation. The config.in.rej file will
  remain, but you can get delete it.


  If you encounter further problems, you might have installed a patch
  out of order. If patch says `previously applied patch detected: Assume
  -R?', you are probably trying to apply a patch which is below your
  current version number; if you answer `y', it will attempt to degrade
  your source, and will most likely fail; thus, you will need to get a
  whole new source tree (which might not have been such a bad idea in
  the first place).


  To back out (unapply) a patch, use `patch -R' on the original patch.


  The best thing to do when patches really turn out wrong is to start
  over again with a clean, out-of-the-box source tree (for example, from
  one of the linux-x.y.z.tar.gz  files), and start again.



  5.3.  Getting rid of the .orig files


  After just a few patches, the .orig  files will start to pile up. For
  example, one 1.1.51 tree I had was once last cleaned out at 1.1.48.
  Removing the .orig files saved over a half a meg.

      find .  -name '*.orig' -exec rm -f {} ';'


  will take care of it for you. Versions of patch which use # for
  rejects use a tilde instead of .orig.

  There are better ways to get rid of the .orig files, which depend on
  GNU xargs:

      find .  -name '*.orig' | xargs rm


  or the ``quite secure but a little more verbose'' method:

      find . -name '*.orig' -print0 | xargs --null rm --



  5.4.  Other patches


  There are other patches (I'll call them ``nonstandard'') than the ones
  Linus distributes. If you apply these, Linus' patches may not work
  correctly and you'll have to either back them out, fix the source or
  the patch, install a new source tree, or a combination of the above.
  This can become very frustrating, so if you do not want to modify the
  source (with the possibility of a very bad outcome), back out the
  nonstandard patches before applying Linus', or just install a new
  tree. Then, you can see if the nonstandard patches still work. If they
  don't, you are either stuck with an old kernel, playing with the patch
  or source to get it to work, or waiting (possibly begging) for a new
  version of the patch to come out.


  How common are the patches not in the standard distribution? You will
  probably hear of them. I used to use the noblink patch for my virtual
  consoles because I hate blinking cursors (This patch is (or at least
  was) frequently updated for new kernel releases.). With most newer
  device drivers being developed as loadable modules, though, the
  frequecy of ``nonstandard'' patches is decreasing significantly.



  6.  Additional packages

  Your linux kernel has many features which are not explained in the
  kernel source itself; these features are typically utilized through
  external packages. Some of the most common are listed here.



  6.1.  kbd

  The linux console probably has more features than it deserves. Among
  these are the ability to switch fonts, remap your keyboard, switch
  video modes (in newer kernels), etc. The kbd package has programs
  which allow the user to do all of this, plus many fonts and keyboard
  maps for almost any keyboard, and is available from the same sites
  that carry the kernel source.



  6.2.  util-linux

  Rik Faith (faith@cs.unc.edu) put together a large collection of linux
  utilities which are, by odd coincidence, called util-linux. These are
  now maintained by Andries Brouwer (util-linux@math.uio.no).  Available
  via anonymous ftp from sunsite.unc.edu in /pub/Linux/system/misc, it
  contains programs such as setterm, rdev, and ctrlaltdel, which are
  relevant to the kernel. As Rik says, do not install without thinking;
  you do not need to install everything in the package, and it could
  very well cause serious problems if you do.



  6.3.  hdparm

  As with many packages, this was once a kernel patch and support
  programs.  The patches made it into the official kernel, and the
  programs to optimize and play with your hard disk are distributed
  separately.



  6.4.  gpm

  gpm stands for general purpose mouse. This program allows you to cut
  and paste text between virtual consoles and do other things with a
  large variety of mouse types.



  7.  Some pitfalls



  7.1.  make clean

  If your new kernel does really weird things after a routine kernel
  upgrade, chances are you forgot to make clean before compiling the new
  kernel. Symptoms can be anything from your system outright crashing,
  strange I/O problems, to crummy performance. Make sure you do a make
  dep, too.



  7.2.  Huge or slow kernels

  If your kernel is sucking up a lot of memory, is too large, and/or
  just takes forever to compile even when you've got your new
  Quadbazillium-III/4400 working on it, you've probably got lots of
  unneeded stuff (device drivers, filesystems, etc) configured. If you
  don't use it, don't configure it, because it does take up memory.  The
  most obvious symptom of kernel bloat is extreme swapping in and out of
  memory to disk; if your disk is making a lot of noise and it's not one
  of those old Fujitsu Eagles that sound like like a jet landing when
  turned off, look over your kernel configuration.


  You can find out how much memory the kernel is using by taking the
  total amount of memory in your machine and subtracting from it the
  amount of ``total mem'' in /proc/meminfo  or the output of the command
  `free'.



  7.3.  The parallel port doesn't work/my printer doesn't work

  Configuration options for PCs are: First, under the category `General
  Setup', select `Parallel port support' and `PC-style hardware'. Then
  under `Character devices', select `Parallel printer support'.

  Then there are the names. Linux 2.2 names the printer devices
  differently than previous releases. The upshot of this is that if you
  had an lp1 under your old kernel, it's probably an lp0 under your new
  one.  Use `dmesg' or look through the logs in /var/log to find out.



  7.4.  Kernel doesn't compile


  If it does not compile, then it is likely that a patch failed, or your
  source is somehow corrupt. Your version of gcc also might not be
  correct, or could also be corrupt (for example, the include files
  might be in error). Make sure that the symbolic links which Linus
  describes in the README are set up correctly. In general, if a
  standard kernel does not compile, something is seriously wrong with
  the system, and reinstallation of certain tools is probably necessary.


  In some cases, gcc can crash due to hardware problems. The error
  message will be something like ``xxx exited with signal 15'' and it
  will generally look very mysterious. I probably would not mention
  this, except that it happened to me once - I had some bad cache
  memory, and the compiler would occasionally barf at random. Try
  reinstalling gcc first if you experience problems. You should only get
  suspicious if your kernel compiles fine with external cache turned
  off, a reduced amount of RAM, etc.



  It tends to disturb people when it's suggested that their hardware has
  problems. Well, I'm not making this up. There is an FAQ for it -- it's
  at http://www.bitwizard.nl/sig11/.



  7.5.  New version of the kernel doesn't seem to boot


  You did not run LILO, or it is not configured correctly. One thing
  that ``got'' me once was a problem in the config file; it said `boot =
  /dev/hda1' instead of `boot = /dev/hda' (This can be really annoying
  at first, but once you have a working config file, you shouldn't need
  to change it.).



  7.6.  You forgot to run LILO, or system doesn't boot at all


  Ooops! The best thing you can do here is to boot off of a floppy disk
  or CDROM and prepare another bootable floppy (such as `make zdisk'
  would do).  You need to know where your root (/) filesystem is and
  what type it is (e.g. second extended, minix). In the example below,
  you also need to know what filesystem your /usr/src/linux source tree
  is on, its type, and where it is normally mounted.


  In the following example, / is /dev/hda1, and the filesystem which
  holds /usr/src/linux is /dev/hda3, normally mounted at /usr. Both are
  second extended filesystems. The working kernel image in
  /usr/src/linux/arch/i386/boot is called bzImage.


  The idea is that if there is a functioning bzImage, it is possible to
  use that for the new floppy. Another alternative, which may or may not
  work better (it depends on the particular method in which you messed
  up your system) is discussed after the example.


  First, boot from a boot/root disk combo or rescue disk, and mount the
  filesystem which contains the working kernel image:



      mkdir /mnt
      mount -t ext2 /dev/hda3 /mnt



  If mkdir tells you that the directory already exists, just ignore it.
  Now, cd to the place where the working kernel image was. Note that

  /mnt + /usr/src/linux/arch/i386/boot - /usr = /mnt/src/linux/arch/i386/boot


  Place a formatted disk in drive ``A:'' (not your boot or root disk!),
  dump the image to the disk, and configure it for your root filesystem:



      cd /mnt/src/linux/arch/i386/boot
      dd if=bzImage of=/dev/fd0
      rdev /dev/fd0 /dev/hda1


  cd to / and unmount the normal /usr filesystem:


      cd /
      umount /mnt



  You should now be able to reboot your system as normal from this
  floppy.  Don't forget to run lilo (or whatever it was that you did
  wrong) after the reboot!


  As mentioned above, there is another common alternative. If you
  happened to have a working kernel image in / (/vmlinuz for example),
  you can use that for a boot disk. Supposing all of the above
  conditions, and that my kernel image is /vmlinuz, just make these
  alterations to the example above: change /dev/hda3 to /dev/hda1 (the /
  filesystem), /mnt/src/linux to /mnt, and if=bzImage to if=vmlinuz. The
  note explaining how to derive /mnt/src/linux may be ignored.


  Using LILO with big drives (more than 1024 cylinders) can cause
  problems.  See the LILO mini-HOWTO or documentation for help on that.



  7.7.  It says `warning: bdflush not running'


  This can be a severe problem. Starting with a kernel release after 1.0
  (around 20 Apr 1994), a program called `update' which periodically
  flushes out the filesystem buffers, was upgraded/replaced. Get the
  sources to `bdflush' (you should find it where you got your kernel
  source), and install it (you probably want to run your system under
  the old kernel while doing this). It installs itself as `update' and
  after a reboot, the new kernel should no longer complain.



  7.8.  I can't get my IDE/ATAPI CD-ROM drive to work

  Strangely enough, lots of people cannot get their ATAPI drives
  working, probably because there are a number of things that can go
  wrong.

  If your CD-ROM drive is the only device on a particular IDE interface,
  it must be jumpered as ``master'' or ``single.'' Supposedly, this is
  the most common error.

  Creative Labs (for one) has put IDE interfaces on their sound cards
  now.  However, this leads to the interesting problem that while some
  people only have one interface to being with, many have two IDE
  interfaces built-in to their motherboards (at IRQ15, usually), so a
  common practice is to make the soundblaster interface a third IDE port
  (IRQ11, or so I'm told).

  This causes problems with linux in that versions 1.2.x don't support a
  third IDE interface (there is support in starting somewhere in the
  1.3.x series but that's development, remember, and it doesn't auto-
  probe). To get around this, you have a few choices.


  If you have a second IDE port already, chances are that you are not
  using it or it doesn't already have two devices on it. Take the ATAPI
  drive off the sound card and put it on the second interface. You can
  then disable the sound card's interface, which saves an IRQ anyway.

  If you don't have a second interface, jumper the sound card's
  interface (not the sound card's sound part) as IRQ15, the second
  interface. It should work.



  7.9.  It says weird things about obsolete routing requests


  Get new versions of the route program and any other programs which do
  route manipulation.  /usr/include/linux/route.h  (which is actually a
  file in /usr/src/linux) has changed.



  7.10.  Firewalling not working in 1.2.0

  Upgrade to at least version 1.2.1.



  7.11.  ``Not a compressed kernel Image file''

  Don't use the vmlinux file created in /usr/src/linux as your boot
  image; [..]/arch/i386/boot/bzImage is the right one.



  7.12.  Problems with console terminal after upgrade to 1.3.x

  Change the word dumb to linux in the console termcap entry in
  /etc/termcap. You may also have to make a terminfo entry.



  7.13.  Can't seem to compile things after kernel upgrade

  The linux kernel source includes a number of include files (the things
  that end with .h) which are referenced by the standard ones in
  /usr/include. They are typically referenced like this (where xyzzy.h
  would be something in /usr/include/linux):

      #include <linux/xyzzy.h>


  Normally, there is a link called linux in /usr/include to the
  include/linux directory of your kernel source
  (/usr/src/linux/include/linux in the typical system). If this link is
  not there, or points to the wrong place, most things will not compile
  at all. If you decided that the kernel source was taking too much room
  on the disk and deleted it, this will obviously be a problem. Another
  way it might go wrong is with file permissions; if your root has a
  umask which doesn't allow other users to see its files by default, and
  you extracted the kernel source without the p (preserve filemodes)
  option, those users also won't be able to use the C compiler. Although
  you could use the chmod command to fix this, it is probably easier to
  re-extract the include files. You can do this the same way you did the
  whole source at the beginning, only with an additional argument:


      blah# tar zxvpf linux.x.y.z.tar.gz linux/include



  Note: ``make config'' will recreate the /usr/src/linux link if it
  isn't there.



  7.14.  Increasing limits

  The following few example commands may be helpful to those wondering
  how to increase certain soft limits imposed by the kernel:

  echo 4096 > /proc/sys/kernel/file-max
  echo 12288 > /proc/sys/kernel/inode-max
  echo 300 400 500 > /proc/sys/vm/freepages



  8.  Note for upgrade to version 2.0.x, 2.2.x

  Kernel versions 2.0.x and 2.2.x introduced quite a bit of changes for
  kernel installation. The file Documentation/Changes in the 2.0.x
  source tree contains information that you should know when upgrading
  to either of these versions. You will most likely need to upgrade
  several key packages, such as gcc, libc, and SysVInit, and perhaps
  alter some system files, so expect this. Don't panic, though.



  9.  Modules

  Loadable kernel modules can save memory and ease configuration. The
  scope of modules has grown to include filesystems, ethernet card
  drivers, tape drivers, printer drivers, and more.



  9.1.  Installing the module utilities

  The module utilities are available from wherever you got your kernel
  source as modutils-x.y.z.tar.gz; choose the highest patchlevel x.y.z
  that is equal to or below that of your current kernel. Unpack it with
  `tar zxvf modutils-x.y.z.tar.gz', cd to the directory it creates
  (modutils-x.y.z), look over the README, and carry out its installation
  instructions (which is usually something simple, such as make
  install). You should now have the programs insmod, rmmod, ksyms,
  lsmod, genksyms, modprobe, and depmod in /sbin. If you wish, test out
  the utilities with the ``hw'' example driver in insmod; look over the
  INSTALL file in that subdirectory for details.

  insmod inserts a module into the running kernel. Modules usually have
  a .o extension; the example driver mentioned above is called
  drv_hello.o, so to insert this, one would say `insmod drv_hello.o'. To
  see the modules that the kernel is currently using, use lsmod. The
  output looks like this:

      blah# lsmod
      Module:        #pages:  Used by:
      drv_hello          1


  `drv_hello' is the name of the module, it uses one page (4k) of mem-
  ory, and no other kernel modules depend on it at the moment. To remove
  this module, use `rmmod drv_hello'. Note that rmmod wants a module
  name, not a filename; you get this from lsmod's listing. The other
  module utilities' purposes are documented in their manual pages.
  9.2.  Modules distributed with the kernel

  As of version 2.0.30, most of everything is available as a loadable
  modules. To use them, first make sure that you don't configure them
  into the regular kernel; that is, don't say y to it during `make
  config'.  Compile a new kernel and reboot with it. Then, cd to
  /usr/src/linux again, and do a `make modules'. This compiles all of
  the modules which you did not specify in the kernel configuration, and
  places links to them in /usr/src/linux/modules.  You can use them
  straight from that directory or execute `make modules_install', which
  installs them in /lib/modules/x.y.z, where x.y.z is the kernel
  release.


  This can be especially handy with filesystems. You may not use the
  minix or msdos filesystems frequently. For example, if I encountered
  an msdos (shudder) floppy, I would insmod
  /usr/src/linux/modules/msdos.o, and then rmmod msdos when finished.
  This procedure saves about 50k of RAM in the kernel during normal
  operation. A small note is in order for the minix filesystem: you
  should always configure it directly into the kernel for use in
  ``rescue'' disks.



  10.  Tips and tricks



  10.1.  Redirecting output of the make or patch commands


  If you would like logs of what those `make' or `patch' commands did,
  you can redirect output to a file. First, find out what shell you're
  running: `grep root /etc/passwd' and look for something like
  `/bin/csh'.


  If you use sh or bash,

      (command) 2>&1 | tee (output file)


  will place a copy of (command)'s output in the file `(output file)'.


  For csh or tcsh, use

      (command) |& tee (output file)



  For rc (Note: you probably do not use rc) it's

      (command) >[2=1] | tee (output file)



  10.2.  Conditional kernel install

  Other than using floppy disks, there are several methods of testing
  out a new kernel without touching the old one. Unlike many other Unix
  flavors, LILO has the ability to boot a kernel from anywhere on the
  disk (if you have a large (500 MB or above) disk, please read over the
  LILO documentation on how this may cause problems). So, if you add
  something similar to

      image = /usr/src/linux/arch/i386/boot/bzImage
          label = new_kernel


  to the end of your LILO configuration file, you can choose to run a
  newly compiled kernel without touching your old /vmlinuz (after run-
  ning lilo, of course). The easiest way to tell LILO to boot a new ker-
  nel is to press the shift key at bootup time (when it says LILO on the
  screen, and nothing else), which gives you a prompt.  At this point,
  you can enter `new_kernel' to boot the new kernel.

  If you wish to keep several different kernel source trees on your
  system at the same time (this can take up a lot of disk space; be
  careful), the most common way is to name them /usr/src/linux-x.y.z,
  where x.y.z is the kernel version. You can then ``select'' a source
  tree with a symbolic link; for example, `ln -sf linux-1.2.2
  /usr/src/linux' would make the 1.2.2 tree current. Before creating a
  symbolic link like this, make certain that the last argument to ln is
  not a real directory (old symbolic links are fine); the result will
  not be what you expect.



  10.3.  Kernel updates

  Russell Nelson (nelson@crynwr.com) summarizes the changes in new
  kernel releases. These are short, and you might like to look at them
  before an upgrade. They are available with anonymous ftp from
  ftp.emlist.com in pub/kchanges or through the URL

      http://www.crynwr.com/kchanges



  11.  Other relevant HOWTOs that might be useful


  o  Sound-HOWTO: sound cards and utilities

  o  SCSI-HOWTO: all about SCSI controllers and devices

  o  NET-2-HOWTO: networking

  o  PPP-HOWTO: PPP networking in particular

  o  PCMCIA-HOWTO: about the drivers for your notebook

  o  ELF-HOWTO: ELF: what it is, converting..

  o  Hardware-HOWTO: overview of supported hardware

  o  Module mini-HOWTO: more on kernel modules

  o  Kerneld mini-HOWTO: about kerneld

  o  BogoMips mini-HOWTO: in case you were wondering



  12.  Misc



  12.1.  Author


  The author and maintainer of the Linux Kernel-HOWTO is Brian Ward
  (bri@cs.uchicago.edu). Please send me any comments, additions,
  corrections (Corrections are, in particular, the most important to
  me.).


  You can take a look at my `home page' at one of these URLs:

      http://www.math.psu.edu/bri/
      http://blah.math.tu-graz.ac.at/~bri/



  Even though I try to be attentive as possible with mail, please
  remember that I get a lot of it every day, so it may take a little
  time to get back to you. Especially when emailing me with a question,
  please try extra hard to be clear and detailed in your message. If
  you're writing about non-working hardware (or something like that), I
  need to know what your hardware configureation is. If you report an
  error, don't just say ``I tried this but it gave an error;'' I need to
  know what the error was.  I would also like to know what versions of
  the kernel, gcc, and libc you're using. If you just tell me you're
  using this-or-that distribution, it won't tell me much at all. I don't
  care if you ask simple questions; remember, if you don't ask, you may
  never get an answer! I'd like to thank everyone who has given me
  feedback.

  If your question does not relate to the kernel, or is in some language
  that I don't understand, I may not answer.


  If you mailed me and did not get an answer within a resonable amount
  of time (three weeks or more), then chances are that I accidentally
  deleted your message or something (sorry). Please try again.


  I get a lot of mail about thing which are actually hardware problems
  or issues. That's OK, but please try to keep in mind that I'm not
  familiar with all of the hardware in the world. I use AMD processors,
  Adaptec and Sybios SCSI controllers, and IBM SCSI disks.


  Version -0.1 was written on October 3, 1994. This document is
  available in SGML, PostScript, TeX, roff, and plain-text formats.



  12.2.  To do

  The ``Tips and tricks'' section is a little small. I hope to expand on
  it with suggestions from others.

  So is ``Additional packages.''

  More debugging/crash recovery info needed.



  12.3.  Contributions

  A small part of Linus' README (kernel hacking options) is inclusive.
  (Thanks, Linus!)

  uc@brian.lunetix.de (Ulrich Callmeier): patch -s and xargs.

  quinlan@yggdrasil.com (Daniel Quinlan): corrections and additions in
  many sections.

  nat@nat@nataa.fr.eu.org (Nat Makarevitch): mrproper, tar -p, many
  other things

  boldt@math.ucsb.edu (Axel Boldt): collected descriptions of kernel
  configuration options on the net; then provided me with the list

  lembark@wrkhors.psyber.com (Steve Lembark): multiple boot suggestion

  kbriggs@earwax.pd.uwa.edu.au (Keith Briggs): some corrections and
  suggestions

  rmcguire@freenet.columbus.oh.us (Ryan McGuire): makeables additions

  dumas@excalibur.ibp.fr (Eric Dumas): French translation

  simazaki@ab11.yamanashi.ac.jp (Yasutada Shimazaki): Japanese
  translation

  jjamor@lml.ls.fi.upm.es (Juan Jose Amor Iglesias): Spanish translation

  mva@sbbs.se (Martin Wahlen): Swedish translation

  jzp1218@stud.u-szeged.hu (Zoltan Vamosi): Hungarian translation

  bart@mat.uni.torun.pl (Bartosz Maruszewski): Polish translation

  donahue@tiber.nist.gov (Michael J Donahue): typos, winner of the
  ``sliced bread competition''

  rms@gnu.ai.mit.edu (Richard Stallman): ``free'' documentation
  concept/distribution notice

  dak@Pool.Informatik.RWTH-Aachen.DE (David Kastrup): NFS thing

  esr@snark.thyrsus.com (Eric Raymond): various tidbits


  The people who have sent me mail with questions and problems have also
  been quite helpful.



  12.4.  Copyright notice, License, and all that stuff

  Copyright (C) Brian Ward, 1994-1999.

  Permission is granted to make and distribute copies of this manual
  provided the copyright notice and this permission notice are preserved
  on all copies.


  Permission is granted to copy and distribute modified versions of this
  manual under the conditions for verbatim copying, provided that the
  derived work is distributed under the terms of a permission notice
  identical to this one. Translations fall under the catagory of
  ``modified versions.''
  Warranty: None.


  Recommendations: Commercial redistribution is allowed and encouraged;
  however, it is strongly recommended that the redistributor contact the
  author before the redistribution, in the interest of keeping things
  up-to-date (you could send me a copy of the thing you're making while
  you're at it). Translators are also advised to contact the author
  before translating. The printed version looks nicer. Recycle.



  The Linux keyboard and console HOWTO
  Andries Brouwer, aeb@cwi.nl
  v2.8, 25 February 1998

  This note contains some information about the Linux keyboard and con-
  sole, and the use of non-ASCII characters.  It describes Linux 2.0.
  ______________________________________________________________________

  Table of Contents



  1. Useful programs

  2. Keyboard generalities

  3. Console generalities

  4. Resetting your terminal

     4.1 Keyboard hardware reset

  5. Delete and Backspace

     5.1 How to tell Unix what character you want to use to delete the last typed character
        5.1.1 `Getty used to do the right thing with DEL and BS but is broken now?'
        5.1.2 `Login behaves differently at the first and second login attempts?'
     5.2 How to tell Linux what code to generate when a key is pressed
        5.2.1 `Why doesn't the Backspace key generate BackSpace by default?'
     5.3 How to tell X to interchange Delete and Backspace
     5.4 How to tell emacs what to do when it receives a Delete or Backspace
     5.5 How to tell emacs to interchange Delete and Backspace
     5.6 How to tell kermit to interchange Delete and Backspace
     5.7 How to tell xterm about your favourite tty modes
     5.8 How to tell xmosaic that the Backspace key generates a DEL
     5.9 A better solution for Motif-using programs, like netscape
     5.10 What about termcap and terminfo?

  6. The console character sets

  7. Console switching

     7.1 Changing the number of Virtual Consoles

  8. Ctrl-Alt-Del and other special key combinations

     8.1 Ctrl-Alt-Del (Boot)
     8.2 Other combinations
     8.3 X Combinations
     8.4 Dosemu Combinations
     8.5 Composing symbols
     8.6 The SysRq key

  9. How to get out of raw mode

  10. The keyboard LEDs

  11. The TERM variable

     11.1 Terminfo

  12. How to make other programs work with non-ASCII chars

  13. What precisely does XFree86-2.1 do when it initializes its keymap?

  14. Unusual keys and keyboards

  15. Examples of use of loadkeys and xmodmap

     15.1 `I can use only one finger to type with'

  16. Changing the video mode

     16.1 Instructions for the use of resizecons

  17. Changing the keyboard repeat rate

  18. Scrolling
  19. Screensaving

  20. Screen dumps

  21. Some properties of the VT100 - application key mode

  22. Hardware incompatibility

  23. Copyright



  ______________________________________________________________________

  1.  Useful programs


  The following packages contain keyboard or console related programs.

  kbd-0.95.tar.gz contains loadkeys, dumpkeys, showkey, setmetamode,
  setleds, setfont, showfont, mapscrn, kbd_mode, loadunimap, chvt,
  resizecons, deallocvt, getkeycodes, setkeycodes.

  util-linux-2.6 contains setterm, kbdrate.  (Yes, the more in util-
  linux-2.6 dumps core due to a name conflict. Preserve your old copy,
  or use util-linux-2.5, or change `savetty' to `my_savetty' in more.c.)

  sh-utils-1.12 contains stty.

  open-1.4.tgz contains open (that should be renamed to openvt). (See
  also dynamic-vc-1.1.tar.gz.)

  SVGATextMode-1.8.tar.gz contains SVGATextMode, a program that
  obsoletes resizecons.

  The X distribution contains xmodmap, xset, kbd_mode.  (See also
  X386keybd(1) for the situation under XFree86 1.3, and Xserver(1) for
  the XKEYBOARD extension under X11R6.)

  termcap-2.0.8.tar.gz contains termcap, an old terminal capabilities
  data base. ncurses-1.9.9e.tar.gz contains the termlib data base which
  obsoletes termcap. (However, there are still many programs using
  termcap.)

  See loadkeys(1), setleds(1) and setmetamode(1) for the codes generated
  by the various keys and the setting of leds when not under X. Under X,
  see xmodmap(1) and xset(1).

  See setfont(8) for loading console fonts. Many people will want to
  load a font like iso01.f16 because the default font is the hardware
  font of the video card, and often is a `Code Page 437' font missing
  accented characters and other Latin-1 symbols.

  See setterm(1) and kbdrate(8) for properties such as foreground and
  background colors, screen blanking and character repeat rate when not
  under X.  Under X, see xset(1), also for key click and bell volume.

  The file /etc/termcap defines the escape sequences used by many
  programs addressing the console (or any other terminal).  See
  termcap(5).  A more modern version is found in /usr/lib/terminfo.  See
  terminfo(5). Terminfo files are compiled by the terminfo compiler
  /usr/lib/terminfo/tic, see tic(1).  Their contents can be examined
  using the program infocmp, see infocmp(1).  The Linux console
  sequences are documented in console_codes(4).


  2.  Keyboard generalities


  You press a key, and the keyboard controller sends scancodes to the
  kernel keyboard driver. Some keyboards can be programmed, but usually
  the scancodes corresponding to your keys are fixed.  The kernel
  keyboard driver just transmits whatever it receives to the application
  program when it is in scancode mode, like when X is running.
  Otherwise, it parses the stream of scancodes into keycodes,
  corresponding to key press or key release events.  (A single key press
  can generate up to 6 scancodes.)  These keycodes are transmitted to
  the application program when it is in keycode mode (as used, for
  example, by showkey).  Otherwise, these keycodes are looked up in the
  keymap, and the character or string found there is transmitted to the
  application, or the action described there is performed.  (For
  example, if one presses and releases the a key, then the keyboard
  produces scancodes 0x1e and 0x9e, this is converted to keycodes 30 and
  158, and then transmitted as 0141, the ASCII or latin-1 code for `a';
  if one presses and releases Delete, then the keyboard produces
  scancodes 0xe0 0x53 0xe0 0xd3, these are converted to keycodes 111 and
  239, and then transmitted as the 4-symbol sequence ESC [ 3 ~, all
  assuming a US keyboard and a default keymap. An example of a key
  combination to which an action is assigned is Ctrl-Alt-Del.)

  The translation between unusual scancodes and keycodes can be set
  using the utility setkeycodes - only very few people will need it.
  The translation between keycodes and characters or strings or actions,
  that is, the keymap, is set using the utilities loadkeys and
  setmetamode.  For details, see getkeycodes(8), setkeycodes(8),
  dumpkeys(1), loadkeys(1), setmetamode(1). The format of the files
  output by dumpkeys and read by loadkeys is described in keytables(5).

  Where it says `transmitted to the application' in the above
  description, this really means `transmitted to the terminal driver'.
  That is, further processing is just like that of text that comes in
  over a serial line.  The details of this processing are set by the
  program stty.


  3.  Console generalities


  Conversely, when you output something to the console, it first
  undergoes the standard tty processing, and then is fed to the console
  driver.  The console driver emulates a VT100, and parses the input in
  order to recognize VT100 escape sequences (for cursor movement, clear
  screen, etc.).  The characters that are not part of an escape sequence
  are first converted into Unicode, using one of four mapping tables if
  the console was not in UTF-8 mode to start with, then looked up in the
  table describing the correspondence between Unicode values and font
  positions, and the obtained 8- or 9-bit font indices are then written
  to video memory, where they cause the display of character shapes
  found in the video card's character ROM.  One can load one's own fonts
  into character ROM using setfont, load the corresponding Unicode map
  with loadunimap, and load a user mapping table using mapscrn.  More
  details will be given below.

  There are many consoles (called Virtual Consoles or Virtual Terminals,
  abbreviated VCs or VTs) that share the same screen. You can use them
  as independent devices, either to run indendent login sessions, or
  just to send some output to, perhaps from top, or the tail of the
  system log or so.  See below (`Console switching') on how to set them
  up and switch between them.



  4.  Resetting your terminal


  There is garbage on the screen, or all your keystrokes are echoed as
  line drawing characters. What to do?

  Many programs will redraw the screen when ^L is typed. This might help
  when there is some modem noise or broadcast message on your screen.
  The command clear will clear the screen.

  The command reset will reset the console driver. This helps when the
  screen is full of funny graphic characters, and also if it is reduced
  to the bottom line. If you don't have this command, or if it does
  something else, make your own by putting the following two lines in an
  executable file reset in your PATH:


               #!/bin/sh
               echo -e \\033c



  that is, you want to send the two characters ESC c to the console.

  Why is it that the display sometimes gets confused and gives you a
  24-line or 1-line screen, instead of the usual 25 lines?  Well, the
  main culprit is the use of TERM=vt100 (or some other entry with 24
  lines) instead of TERM=linux when logged in remotely.  If this happens
  on /dev/tty2 then typing


               % cat > /dev/tty2
               ^[c
               ^D



  on some other VT (where 4 symbols are typed to cat: ESC, c, ENTER,
  Ctrl-D) and refreshing the screen on /dev/tty2 (perhaps using ^L) will
  fix things. Of course the permanent fix is to use the right termcap or
  terminfo entry.

  Why is it that you sometimes get a lot of line-drawing characters,
  e.g., after catting a binary to the screen?  Well, there are various
  character set changing escape sequences, and by accident your binary
  might contain some of these.  The ESC c is a general reset, a cure for
  all, but if you know precisely what went wrong you can repair it
  without resetting other console attributes. For example, after


               % cat
               ^N
               ^D



  your shell prompt will be all line-drawing characters.  Now do (typing
  blindly)



          % cat
          ^O
          ^D



  and all is well again. (Three symbols typed to each cat: ^N (or ^O),
  ENTER, Ctrl-D.) To understand what is happening, see `The console
  character sets' below.

  If you loaded some strange font, and want to return to the default,


               % setfont



  will do (provided you stored the default font in the default place).
  If this default font does not contain an embedded Unicode map (and
  gives the wrong symbols for accented characters), then say


               % loadunimap



  For example, if I do


               % loadkeys de-latin1



  then I have a German keyboard, and the key left of the Enter key gives
  me a-umlaut. This works, because the a-umlaut occurs on the CP437 code
  page and the kernel Unicode map is initialized to CP437, and my video
  card has a CP437 font built-in.  If I now load an ISO 8859-1 font with


               % setfont iso01.f16



  then everything still works, because setfont invalidates the kernel
  Unicode map (if there is no Unicode map attached to the font), and
  without map the kernel goes directly to the font, and that is pre-
  cisely correct for an ISO 8859-1 system with iso01.f16 font.  But
  going back to the previous font with


               % setfont



  gives capital Sigma's instead of a-umlaut - all accented letters are
  mixed up because also this font has no embedded Unicode map. After


               % loadunimap

  which loads the default Unicode map (which is right for the default
  font) all works correctly again. Usually loadunimap is not invoked
  directly, but via setfont. Thus, the previous two commands may be
  replaced by


               % setfont -u def



  The Ethiopian fonts and the lat1u*.psf fonts have embedded Unicode
  code map. Most of the others don't.

  On old terminals output involving tabs may require a delay, and you
  have to say


               % stty tab3



  (see stty(1)).

  You can change the video mode using resizecons or SVGATextMode.  This
  usually settles the output side.  On the input side there are many
  things that might be wrong. If X or DOOM or some other program using
  raw mode crashed, your keyboard may still be in raw (or mediumraw)
  mode, and it is difficult to give commands.  (See "How to get out of
  raw mode" below.)  If you loaded a bad keymap, then


               % loadkeys -d



  loads the default map again, but it may well be difficult to type `-'!
  An alternative is


               % loadkeys defkeymap



  Sometimes even the letters are garbled. It is useful to know that
  there are four main types of keyboards: QWERTY, QWERTZ, AZERTY and
  DVORAK.  The first three are named after the first six letter keys,
  and roughly represent the English, German and French speaking coun-
  tries.  Compared to QWERTY, the QWERTZ map interchanges Y and Z.  Com-
  pared to QWERTY, the AZERTY map interchanges Q and A, W and Z, and has
  its M right of the L, at the semicolon position.  DVORAK has an
  entirely different letter ordering.


  4.1.  Keyboard hardware reset


  Things may be wrong on a lower level than Linux knows about.  There
  are at least two distinct lower levels (keyboard and keyboard
  controller) where one can give the command "keyboard disable" to the
  keyboard hardware.  Keyboards can often be programmed to use one out
  of three different sets of scancodes.

  However, I do not know of cases where this turned out to be a problem.

  Some keyboards have a remapping capability built in.  Stormy Henderson
  (stormy@Ghost.Net) writes: `If it's your keyboard accidently being
  reprogrammed, you can (on a Gateway AnyKey keyboard) press control-
  alt-suspend_macro to reset the keys to normal.'


  5.  Delete and Backspace


  Getting Delete and Backspace to work just right is nontrivial,
  especially in a mixed environment, where you talk to console, to X, to
  bash, to emacs, login remotely, etc.  You may have to edit several
  configuration files to tell all of the programs involved precisely
  what you want.  On the one hand, there is the matter of which keys
  generate which codes (and how these codes are remapped by e.g. kermit
  or emacs), and on the other hand the question of what functions are
  bound to what codes.

  People often complain `my backspace key does not work', as if this key
  had a built-in function `delete previous character'.  Unfortunately,
  all this key, or any key, does is producing a code, and one only can
  hope that the kernel tty driver and all application programs can be
  configured such that the backspace key indeed does function as a
  `delete previous character' key.

  Most Unix programs get their tty input via the kernel tty driver in
  `cooked' mode, and a simple stty command determines the erase
  character. However, programs like bash and emacs and X do their own
  input handling, and have to be convinced one-by-one to do the right
  thing.


  5.1.  How to tell Unix what character you want to use to delete the
  last typed character



               % stty erase ^?



  If the character is erased, but in a funny way, then something is
  wrong with your tty settings. If echoprt is set, then erased charac-
  ters are enclosed between \ and /.  If echoe is not set, then the
  erase char is echoed (which is reasonable when it is a printing char-
  acter, like #).  Most people will want stty echoe -echoprt. Saying
  stty sane will do this and more. Saying stty -a shows your current
  settings.  How come this is not right by default? It is, if you use
  the right getty.

  Note that many programs (like bash, emacs etc.) have their own
  keybindings (defined in ~/.inputrc, ~/.emacs etc.) and are unaffected
  by the setting of the erase character.

  The standard Unix tty driver does not recognize a cursor, or keys
  (like the arrow keys) to move the current position, and hence does not
  have a command `delete current character' either. But for example you
  can get bash on the console to recognize the Delete key by putting



          set editing-mode emacs
          "\e[3~":delete-char



  into ~/.inputrc.


  5.1.1.  `Getty used to do the right thing with DEL and BS but is bro-
  ken now?'


  Earlier, the console driver would do BS Space BS (\010\040\010) when
  it got a DEL (\177).  Nowadays, DEL's are ignored (as they should be,
  since the driver emulates a vt100). Get a better getty, i.e., one that
  does not output DEL.


  5.1.2.  `Login behaves differently at the first and second login
  attempts?'


  At the first attempt, you are talking to getty. At the second attempt,
  you are talking to login, a different program.


  5.2.  How to tell Linux what code to generate when a key is pressed


  On the console, or, more precisely, when not in (MEDIUM)RAW mode, use


               % loadkeys mykeys.map



  and under X use


               % xmodmap mykeys.xmap



  Note that (since XFree86-2.1) X reads the Linux settings of the
  keymaps when initialising the X keymap. Although the two systems are
  not 100% compatible, this should mean that in many cases the use of
  xmodmap has become superfluous.

  For example, suppose that you would like the Backspace key to send a
  BackSpace (^H, octal 010) and the grey Delete key a DEL (octal 0177).
  Add the following to /etc/rc.local (or wherever you keep your local
  boot-time stuff):


               /usr/bin/loadkeys << EOF
               keycode 14 = BackSpace
               keycode 111 = Delete
               EOF



  Note that this will only change the function of these keys when no
  modifiers are used. (You need to specify a keymaps line to tell which
  keymaps should be affected if you want to change bindings on more
  keymaps.)  The Linux kernel default lets Ctrl-Backspace generate
  BackSpace - this is sometimes useful as emergency escape, when you
  find you can only generate DELs.

  The left Alt key is sometimes called the Meta key, and by default the
  combinations AltL-X are bound to the symbol MetaX.  But what character
  sequence is MetaX?  That is determined (per-tty) by the Meta flag, set
  by the command setmetamode. The two choices are: ESC X or X or-ed with
  0200.


  5.2.1.  `Why doesn't the Backspace key generate BackSpace by default?'


  (i) Because the VT100 had a Delete key above the Enter key.

  (ii) Because Linus decided so.


  5.3.  How to tell X to interchange Delete and Backspace



               % xmodmap -e "keysym BackSpace = Delete" -e "keysym Delete = BackSpace"



  Or, if you just want the Backspace key to generate a BackSpace:


               % xmodmap -e "keycode 22 = BackSpace"



  Or, if you just want the Delete key to generate a Delete:


               % xmodmap -e "keycode 107 = Delete"



  (but usually this is the default binding already).


  5.4.  How to tell emacs what to do when it receives a Delete or
  Backspace


  Put in your .emacs file lines like


               (global-set-key "\?" 'help-command)
               (global-set-key "\C-h" 'delete-backward-char)



  Of course you can bind other commands to other keys in the same way.
  Note that various major and minor modes redefine keybindings.  For
  example, in incremental search mode one finds the code
               (define-key map "\177" 'isearch-delete-char)
               (define-key map "\C-h" 'isearch-mode-help)



  This means that it may be a bad idea to use the above two global-set-
  key commands. There are too many places where there are built-in
  assumptions about ^H = help and DEL = delete.  That doesn't mean that
  you have to setup keys so that Backspace generates DEL. But if it
  doesn't then it is easiest to remap them at the lowest possible level
  in emacs.


  5.5.  How to tell emacs to interchange Delete and Backspace


  Put in your .emacs file lines


               (setq keyboard-translate-table (make-string 128 0))
               (let ((i 0))
                 (while (< i 128)
                   (aset keyboard-translate-table i i)
                   (setq i (1+ i))))
               (aset keyboard-translate-table ?\b ?\^?)
               (aset keyboard-translate-table ?\^? ?\b)



  Recent versions of emacs have a function keyboard-translate and one
  may simplify the above to


               (keyboard-translate ?\C-h ?\C-?)
               (keyboard-translate ?\C-? ?\C-h)



  Note that under X emacs can distinguish between Ctrl-h and the
  Backspace key (regardless of what codes these produce on the console),
  and by default emacs will view the Backspace key as DEL (and do dele-
  tion things, as bound to that character, rather than help things,
  bound to ^H). One can distinguish Backspace and Delete, e.g. by


               (global-unset-key [backspace] )
               (global-set-key [backspace] 'delete-backward-char)
               (global-unset-key [delete] )
               (global-set-key [delete] 'delete-char)



  5.6.  How to tell kermit to interchange Delete and Backspace


  Put in your .kermrc file the lines


               set key \127 \8
               set key \8 \127

  5.7.  How to tell xterm about your favourite tty modes


  Normally xterm will inherit the tty modes from its invoker.  Under
  xdm, the default erase and kill characters are # and @, as in good old
  Unix Version 6.  If you don't like that, you might put something like


               XTerm*ttymodes: erase ^? kill ^U intr ^C quit ^\ eof ^D \
                               susp ^Z start ^Q stop ^S eol ^@



  in /usr/lib/X11/app-defaults/XTerm or in $HOME/.Xresources, assuming
  that you have a line


               xrdb $HOME/.Xresources



  in your $HOME/.xinitrc or $HOME/.xsession.


  5.8.  How to tell xmosaic that the Backspace key generates a DEL


  Putting


               *XmText.translations: #override\n\
                  <Key>osfDelete: delete-previous-character()
               *XmTextField.translations: #override\n\
                  <Key>osfDelete: delete-previous-character()



  in your $HOME/.Xresources helps.

  The netscape FAQ, however, says:

          Why doesn't my Backspace key work in text fields?
          By default, Linux and XFree86 come with the Backspace and Delete keys
          misconfigured. All Motif programs (including, of course, Netscape
          Navigator) will malfunction in the same way.

          The Motif spec says that Backspace is supposed to delete the previous
          character and Delete is supposed to delete the following character.
          Linux and XFree86 come configured with both the Backspace and Delete
          keys generating Delete.

          You can fix this by using any one of the xmodmap, xkeycaps, or
          loadkeys programs to make the key in question generate the BackSpace
          keysym instead of Delete.

          You can also fix it by having a .motifbind file; see the man page
          for VirtualBindings(3).

          Note: Don't use the *XmText.translations or *XmTextField.translations
          resources to attempt to fix this problem. If you do, you will blow
          away Netscape Navigator's other text-field key bindings.


  5.9.  A better solution for Motif-using programs, like netscape


  Ted Kandell (ted@tcg.net) suggests the following:

  Somewhere in your .profile add the following:


       stty erase ^H



  If you are using bash, add the following lines to your .inputrc:


       "\C-?": delete-char
       "\C-h": backward-delete-char



  Add the following lines to your .xinitrc file:


       xmodmap <<-EOF
       keycode 22  =  BackSpace osfBackSpace
       keycode 107 =  Delete
       EOF

       # start your window manager here,  for example:
       #(fvwm) 2>&1 | tee /dev/tty /dev/console

       stty sane
       stty erase ^H
       loadmap <<-EOF
       keycode 14  = BackSpace
       keycode 111 = Delete
       EOF



  This will definitely work for a PC 101 or 102 key keyboard with any
  Linux/XFree86 layout.

  The important part to making Motif apps like Netscape work properly is
  adding osfBackSpace to keycode 22 in addition to BackSpace.

  Note that there must be spaces on either side of the = sign.



  5.10.  What about termcap and terminfo?


  When people have problems with backspace, they tend to look at their
  termcap (or terminfo) entry for the terminal, and indeed, there does
  exist a kb (or kbs) capability describing the code generated by the
  Backspace key.  However, not many programs use it, so unless you are
  having problems with one particular program only, probably the fault
  is elsewhere.  Of course it is a good idea anyway to correct your
  termcap (terminfo) entry.  See also below under "The TERM variable".



  6.  The console character sets


  The kernel first tries to figure out what symbol is meant by any given
  user byte, and next where this symbol is located in the current font.

  The kernel knows about 5 translations of bytes into console-screen
  symbols.  In Unicode (UTF-8) mode, the UTF-8 code is just converted
  directly into Unicode. The assumption is that almost all symbols one
  needs are present in Unicode, and for the cases where this does not
  hold the codes 0xff** are reserved for direct font access.  When not
  in Unicode mode, one of four translation tables is used.  The four
  tables are: a) Latin1 -> Unicode,  b) VT100 graphics -> Unicode, c) PC
  -> Unicode, d) user-defined.

  There are two character sets, called G0 and G1, and one of them is the
  current character set. (Initially G0.)  Typing ^N causes G1 to become
  current, ^O causes G0 to become current.

  These variables G0 and G1 point at a translation table, and can be
  changed by the user. Initially they point at tables a) and b),
  respectively.  The sequences ESC ( B and ESC ( 0 and ESC ( U and ESC (
  K cause G0 to point at translation table a), b), c) and d),
  respectively.  The sequences ESC ) B and ESC ) 0 and ESC ) U and ESC )
  K cause G1 to point at translation table a), b), c) and d),
  respectively.

  The sequence ESC c causes a terminal reset, which is what you want if
  the screen is all garbled. The oft-advised echo ^V^O will only make G0
  current, but there is no guarantee that G0 points at table a).  In
  some distributions there is a program reset(1) that just does echo
  ^[c.  If your termcap entry for the console is correct (and has an
  entry :rs=\Ec:), then also setterm -reset will work.

  The user-defined mapping table can be set using mapscrn(8).  The
  result of the mapping is that if a symbol c is printed, the symbol s =
  map[c] is sent to the video memory. The bitmap that corresponds to s
  is found in the character ROM, and can be changed using setfont(8).


  7.  Console switching


  By default, console switching is done using Alt-Fn or Ctrl-Alt-Fn.
  Under X (or recent versions of dosemu), only Ctrl-Alt-Fn works.  Many
  keymaps will allow cyclic walks through all allocated consoles using
  Alt-RightArrow and Alt-LeftArrow.

  XFree86 1.3 does not know that Alt is down when you switch to the X
  window. Thus, you cannot switch immediately to some other VT again but
  have to release Alt first.  In the other direction this should work:
  the kernel always keeps track of the up/down status of all keys. (As
  far as possible: on some keyboards some keys do not emit a scancode
  when pressed (e.g.: the PFn keys of a FOCUS 9000) or released (e.g.:
  the Pause key of many keyboards).)

  XFree86 1.3 saves the fonts loaded in the character ROMs when started,
  and restores it on a console switch. Thus, the result of setfont on a
  VT is wiped out when you go to X and back.  Using setfont under X will
  lead to funny results.

  One can change VT under program control using the chvt command.



  7.1.  Changing the number of Virtual Consoles


  This question still comes up from time to time, but the answer is: you
  already have enough of them.  Since kernel version 1.1.54, there are
  between 1 and 63 virtual consoles. A new one is created as soon as it
  is opened. It is removed by the utility deallocvt (but it can be
  removed only when no processes are associated to it anymore, and no
  text on it has been selected by programs like selection or gpm).

  For older kernels, change the line


               #define NR_CONSOLES     8



  in include/linux/tty.h (don't increase this number beyond 63), and
  recompile the kernel.

  If they do not exist yet, create the tty devices with MAKEDEV or mknod
  ttyN c 4 N where N denotes the tty number. For example,


               for i in 9 10 11 12; do mknod /dev/tty$i c 4 $i; done



  or, better (since it also takes care of owner and permissions),


               for i in 9 10 11 12; do /dev/MAKEDEV tty$i; done



  If you want the new VCs to run getty, add lines in /etc/inittab.  (But
  it is much better to have only two getty's running, and to create more
  consoles dynamically as the need arises.  That way you'll have more
  memory when you don't use all these consoles, and also more consoles,
  in case you really need them.  Edit /etc/inittab and comment out all
  getty's except for the first two.)

  When the consoles are allocated dynamically, it is usually easiest to
  have only one or two running getty. More are opened by open -l -s
  bash. Unused consoles (without associated processes) are deallocated
  using deallocvt (formerly disalloc).  But, you say, I am involved in
  activities when I suddenly need more consoles, and do not have a bash
  prompt available to give the open command.  Fortunately it is possible
  to create a new console upon a single keystroke, regardless of what is
  happening at the current console.

  If you have spawn_login from kbd-0.95.tar.gz and you put


               loadkeys << EOF
               alt keycode 103 = Spawn_Console
               EOF
               spawn_login &



  in /etc/rc.local, then typing Alt-UpArrow will create a fresh VC
  running login (and switch to it). With spawn_console & instead of
  spawn_login & you'll have bash running there.  See also open-1.4.tgz
  and dynamic-vc-1.1.tar.gz.

  What action should be taken upon this Spawn_Console keypress can also
  be set in /etc/inittab under kbrequest, if you have a recent init. See
  inittab(5).

  (This action can be something entirely different - I just called the
  key Spawn_Console because that is what I used it for.  When used for
  other purposes it is less confusing to use its synonym KeyboardSignal.
  For example, some people like to put the lines


               kb::kbrequest:/sbin/shutdown -h now



  in /etc/inittab, and


               control alt keycode 79 = KeyboardSignal
               control alt keycode 107 = KeyboardSignal



  in their keymap. Now Ctrl-Alt-End will do a system shutdown.)

  You can only login as "root" on terminals listed in /etc/securetty.
  There exist programs that read terminal settings from files /etc/ttys
  and /etc/ttytype. If you have such files, and create additional
  consoles, then it might be a good idea to also add entries for them in
  these files.


  8.  Ctrl-Alt-Del and other special key combinations



  8.1.  Ctrl-Alt-Del (Boot)


  If you press Ctrl-Alt-Del (or whatever key was assigned the keysym
  Boot by loadkeys) then either the machine reboots immediately (without
  sync), or init is sent a SIGINT. The former behaviour is the default.
  The default can be changed by root, using the system call reboot(),
  see ctrlaltdel(8).  Some init's change the default. What happens when
  init gets SIGINT depends on the version of init used - often it will
  be determined by the pf entry in /etc/inittab (which means that you
  can run an arbitrary program in this case).  In the current kernel
  Ctrl-AltGr-Del is no longer by default assigned to Boot.


  8.2.  Other combinations



  Name            Default binding
  -------------------------------
  Show_Memory     Shift-Scrollock
  Show_Registers  AltGr-ScrollLock
  Show_State      Ctrl-ScrollLock
  Console_n       Alt-Fn and Ctrl-Alt-Fn  (1 <= n <= 12)
  Console_{n+12}  AltGr-Fn                (1 <= n <= 12)
  Incr_Console    Alt-RightArrow
  Decr_Console    Alt-LeftArrow
  Last_Console    Alt[Gr]-PrintScreen
  Scroll_Backward Shift-PageUp
  Scroll_Forward  Shift-PageDown
  Caps_On                                 (CapsLock is a toggle; this key sets)
  Compose         Ctrl-.



  8.3.  X Combinations



  Ctrl-Alt-Fn     Switch to VT n
  Ctrl-Alt-KP+    Next mode
  Ctrl-Alt-KP-    Previous mode
  Ctrl-Alt-Backspace      Kill X


  On some motherboards, Ctrl-Alt-KP- and Ctrl-Alt-KP+ will be equivalent
  to pressing the Turbo button. That is, both will produce the scancodes
  1d 38 4a ca b8 9d and 1d 38 4e ce b8 9d, and both will switch between
  Turbo (>= 25MHz) and non-Turbo (8 or 12 MHz).  (Often these key combi-
  nations only function this way when enabled by jumpers on the mother-
  board.)

  Perry F Nguyen (pfnguyen@netcom22.netcom.com) writes: AMI BIOS has a
  feature that locks up the keyboard and flashes the LED's if the Ctrl-
  Alt-Backspace combination is pressed while a BIOS password is enabled,
  until the CMOS/BIOS password is typed in.


  8.4.  Dosemu Combinations



  Ctrl-Alt-Fn     Switch to VT n (from version 0.50; earlier Alt-Fn)
  Ctrl-Alt-PgDn   Kill dosemu (when in RAW keyboard mode)
  (and many other combinations - see the dosemu documentation)



  8.5.  Composing symbols


  One symbol may be constructed using several keystrokes.

  o  LeftAlt-press, followed by a decimal number typed on the keypad,
     followed by LeftAlt-release, yields the symbol with code given by
     this number.  (In Unicode mode this same mechanism, but then with 4
     hexadecimal digits, may be used to define a Unicode symbol.)

  o  A dead diacritic followed by a symbol, yields that symbol adorned
     with that diacritic. If the combination is undefined, both keys are
     taken separately.  Which keys are dead diacritics is user-settable;
     none is by default.  Five (since 2.0.25 six) dead diacritics can be
     defined (using loadkeys(1)): dead_grave, dead_acute,
     dead_circumflex, dead_tilde, dead_diaeresis (and dead_cedilla).
     Precisely what this adorning means is also user-settable: dead-
     diacritic, symbol is equivalent to Compose + diacritic + symbol.

  o  Compose followed by two symbols yields a combination symbol. These
     combinations are user-settable. Today there are 68 combinations
     defined by default; you can see them by saying "dumpkeys | grep
     compose".

  o  Then there are `Sticky' modifier keys (since 1.3.33). For example,
     one can type ^C as SControl, C and Ctrl-Alt-BackSpace as SControl,
     SAlt, BackSpace.

  Note that there are at least three such composition mechanisms:

  1. The Linux keyboard driver mechanism, used in conjunction with
     loadkeys.

  2. The X mechanism - see X386keybd(1), later XFree86kbd(1).  Under
     X11R6: edit /usr/X11R6/lib/X11/locale/iso8859-1/Compose.

     See also Andrew D. Balsa's comments at
     http://wauug.erols.com/~balsa/linux/deadkeys/index.html.

  3. The emacs mechanism obtained by loading "iso-insert.el" or calling
     `iso-accents-mode'.

     For X the order of the two symbols is arbitrary: both Compose-,-c
     and Compose-c-, yield a c-cedilla; for Linux and emacs only the
     former sequence works by default. For X the list of compose
     combinations is fixed. Linux and emacs are flexible.  The three
     default lists are somewhat similar, but the details are different.


  8.6.  The SysRq key

  In case your kernel was compiled with CONFIG_MAGIC_SYSRQ enabled (a
  feature that is present since Linux 2.1.43) there is a single key
  (defined in <linux/keyboard.h>) to which special system functions are
  attached, regardless of the current keyboard mode. For the PC
  architecture this special key is, naturally, the Alt+SysRq key, and
  any of the two Alt keys will work.  (Note that if CONFIG_MAGIC_SYSRQ
  was not enabled, the default action of this key is to return to the
  previous console.)

  If you press this key, do not release it, and hit another key, a
  corresponding action is performed. The action is performed whether
  anybody is logged in or not, is root or not. For the details, see
  drivers/char/sysrq.c. Since this feature is meant only for kernel
  hackers, that should suffice. Still, let me add a few remarks.

  For the key r the keyboard mode is reset to K_XLATE.  For the key k a
  SAK and console reset is done.  For the key b the machine is rebooted
  immediately.  (See, not something you want to have enabled on a
  production machine.)  For the key o the power is turned off (when the
  machine is capable of that).  For the key s an emergency sync is
  scheduled.  For the key u an emergency read-only remount is scheduled.
  For the keys p,t,m various information is shown (namely the same
  information also shown for RAlt,RCtrl,RShift+ScrollLock).  For the
  keys e,i,l all processes get a SIG_TERM or SIG_KILL, respectively; for
  l even the init process is killed.  Digits set the log level. Anything
  else prints a short summary: SysRq: unRaw saK Boot Off Sync Unmount
  showPc showTasks showMem loglevel0-8 tErm kIll killalL.


  Note: These are very dangerous actions! And they do not use your
  keymap - indeed, are meant for emergency cases where the state of your
  keymap, or even of the entire kernel, is uncertain.  If you use a
  dvorak keyboard - bad luck! Most other people will be able to survive:
  the dangerous letters A,M,Q,W,Y,Z that are differently placed on
  English, French and German keyboards, are not used for actions.


  9.  How to get out of raw mode


  If some program using K_RAW keyboard mode exits without restoring the
  keyboard mode to K_XLATE, then it is difficult to do anything - not
  even Ctrl-Alt-Del works. However, it is sometimes possible to avoid
  hitting the reset button.  (And desirable as well: your users may get
  angry if you kill their Hack game by rebooting; you might also damage
  your file system.)  Easy solutions involve logging in from another
  terminal or another machine and doing kbd_mode -a.  The procedure
  below assumes that no X is running, that the display is in text mode,
  and that you are at your bash prompt, that you are using a US keyboard
  layout, and that your interrupt character is Ctrl-C.

  Step 1. Start X.  As follows: press 2 (and don't release), press F12
  (and don't release) and immediately afterwards press = . This starts
  X.  (Explanation: if a key press produces keycode K, then the key
  release produces keycode K+128. Probably your shell does not like
  these high characters, so we avoid generating them by not releasing
  any key.  However, we have to be quick, otherwise key repeat starts.
  The digit 2 produces a Ctrl-C that discards previous junk, the F12
  produces an X and the = a Return.)  Probably your screen will be grey
  now, since no .xinitrc was specified.  However, Ctrl-Alt-Fn will work
  and you can go to another VT.  (Ctrl-Alt-Backspace also works, but
  that exits X, and gets you back into the previous state, which is not
  what you want.)

  Step 2. Setup to change the keyboard mode.  (For example, by sleep 5;
  kbd_mode -a.)

  Step 3. Leave X again.  Alt-Fx (often Alt-F7) brings you back to X,
  and then Ctrl-Alt-Backspace exits X. Within 5 seconds your keyboard
  will be usable again.

  If you want to prepare for the occasion, then make \215A\301 (3
  symbols) an alias for kbd_mode -a.  Now just hitting = F7 = (3
  symbols) will return you to sanity.


  10.  The keyboard LEDs


  1. There are per-tty keyboard flags: each VC has its own NumLock,
  CapsLock, ScrollLock.  By default these keyboard flags are shown in
  the LEDs.  The usual way to change them is by pressing the
  corresponding key.  (Side remark: pressing the NumLock key when in
  application key mode will not change the NumLock status, but produce
  an escape sequence.  If you want the NumLock key to always change the
  Numlock status, bind it to Bare_Num_Lock.)

  2. Next, there are per-tty default keyboard flags, to initialize the
  keyboard flags when a reset occurs.  Thus if you want NumLock on all
  the time, that is possible.  The usual way to change them is by
  `setleds -D ...'.

  3. There is the possibility that the leds do not reflect the keyboard
  flags, but something else.

  3A. This something else can be three bits somewhere in the kernel -
  which can be used if you want to monitor some hardware or software
  status bit(s). If you want this, edit the kernel source to call
  register_leds() somewhere.

  3B. This something else can also be whatever some user program wants
  to show in the LEDs. Thus, people who like such things can make nice
  patterns of lights. If you want this, use the KDSETLED ioctl.

  This latter use is not per-tty, but the choice between former and
  latter use is per-tty.

  Summarizing: Each tty has a flag kbd->ledmode.  If this has the value
  LED_SHOW_FLAGS then the keyboard flags (NumLock etc.) of that tty are
  shown.  If this has the value LED_SHOW_MEM then three selected memory
  addresses are shown.  If this has the value LED_SHOW_IOCTL then the
  leds show whatever value was last assigned to them using the KDSETLED
  ioctl.

  One may add that X uses ioctl's to set the LEDs, but fails to reset
  its VT when it exits, so after using X there may be one VT that is not
  in the default LED_SHOW_FLAGS state.  This can be fixed by doing
  `setleds -L' on that VT.  See setleds(1).


  11.  The TERM variable


  Many programs use the TERM variable and the database /etc/termcap or
  /usr/lib/terminfo/* to decide which strings to send for clear screen,
  move cursor, etc., and sometimes also to decide which string is sent
  by the users backspace key, function keys etc.  This value is first
  set by the kernel (for the console).  Usually, this variable is re-set
  by getty, using /etc/ttytype or the argument specified in
  /etc/inittab.  Sometimes, it is also set in /etc/profile.

  Older systems use TERM=console or TERM=con80x25. Newer systems (with
  ncurses 1.8.6) use the more specific TERM=linux or TERM=linux-80x25.
  However, old versions of setterm test for TERM=con* and hence fail to
  work with TERM=linux.

  Since kernel version 1.3.2, the kernel default for the console is
  TERM=linux.

  If you have a termcap without entry for linux, add the word linux to
  the entry for the console:


               console|con80x25|linux:\



  and make /usr/lib/terminfo/l/linux a copy of or symbolic link to
  /usr/lib/terminfo/c/console.


  11.1.  Terminfo


  The terminfo entry for the linux console from ncurses 1.8.6 misses the
  entry kich1=\E[2~, needed by some programs.  Edit the file and tic it.



  12.  How to make other programs work with non-ASCII chars


  In the bad old days this used to be quite a hassle. Every separate
  program had to be convinced individually to leave your bits alone.
  Not that all is easy now, but recently a lot of gnu utilities have
  learned to react to LC_CTYPE=iso_8859_1 or LC_CTYPE=iso-8859-1.  Try
  this first, and if it doesn't help look at the hints below.  Note that
  in recent versions of libc the routine setlocale() only works if you
  have installed the locale files (e.g. in /usr/lib/locale).

  First of all, the 8-th bit should survive the kernel input processing,
  so make sure to have stty cs8 -istrip -parenb set.

  A. For emacs the details strongly depend on the version.  The
  information below is for version 19.34. Put lines


               (set-input-mode nil nil 1)
               (standard-display-european t)
               (require 'iso-syntax)



  into your $HOME/.emacs.  The first line (to be precise: the final 1)
  tells emacs not to discard the 8-th bit from input characters.  The
  second line tells emacs not to display non-ASCII characters as octal
  escapes.  The third line specifies the syntactic properties and case
  conversion table for the Latin-1 character set These last two lines
  are superfluous if you have something like LC_CTYPE=ISO-8859-1 in your
  environment.  (The variable may also be LC_ALL or even LANG.  The
  value may be anything with a substring `88591' or `8859-1' or
  `8859_1'.)

  This is a good start.  On a terminal that cannot display non-ASCII ISO
  8859-1 symbols, the command


               (load-library "iso-ascii")



  will cause accented characters to be displayed comme {,c}a.  If your
  keymap does not make it easy to produce non-ASCII characters, then


               (load-library "iso-transl")



  will make the 2-character sequence Ctrl-X 8 a compose character, so
  that the 4-character sequence Ctrl-X 8 , c produces c-cedilla.  Very
  inconvenient.

  The command


               (iso-accents-mode)



  will toggle ISO-8859-1 accent mode, in which the six characters ', `,
  ", ^, ~, / are dead keys modifying the following symbol.  Special com-
  binations: ~c gives a c with cedilla, ~d gives an Icelandic eth, ~t
  gives an Icelandic thorn, "s gives German sharp s, /a gives a with
  ring, /e gives an a-e ligature, ~< and ~> give guillemots, ~! gives an
  inverted exclamation mark, ~? gives an inverted question mark, and ''
  gives an acute accent.  This is the default mapping of accents.  The
  variable iso-languages is a list of pairs (language name, accent map-
  ping), and a non-default mapping can be selected using


               (iso-accents-customize LANGUAGE)



  Here LANGUAGE can be one of "portuguese", "irish", "french",
  "latin-2", "latin-1".

  Since the Linux default compose character is Ctrl-.  it might be
  convenient to use that everywhere. Try


               (load-library "iso-insert.el")
               (define-key global-map [?\C-.] 8859-1-map)



  The latter line will not work under xterm, if you use emacs -nw, but
  in that case you can put


               XTerm*VT100.Translations:       #override\n\
                     Ctrl <KeyPress> . : string("\0308")



  in your .Xresources.)

  B. For less, put LESSCHARSET=latin1 in the environment.  This is also
  what you need if you see \255 or <AD> in man output: some versions of
  less will render the soft hyphen (octal 0255, hex 0xAD) this way when
  not given permission to output Latin-1.

  C. For ls, give the option -N. (Probably you want to make an alias.)

  D. For bash (version 1.13.*), put


               set meta-flag on
               set convert-meta off



  and, according to the Danish HOWTO,


               set output-meta on



  into your $HOME/.inputrc.

  E. For tcsh, use


               setenv LANG     US_en
               setenv LC_CTYPE iso_8859_1



  If you have nls on your system, then the corresponding routines are
  used.  Otherwise tcsh will assume iso_8859_1, regardless of the values
  given to LANG and LC_CTYPE. See the section NATIVE LANGUAGE SYSTEM in
  tcsh(1).  (The Danish HOWTO says: setenv LC_CTYPE ISO-8859-1; stty
  pass8)

  F. For flex, give the option -8 if the parser it generates must be
  able to handle 8-bit input. (Of course it must.)

  G. For elm, set displaycharset to ISO-8859-1.  (Danish HOWTO: LANG=C
  and LC_CTYPE=ISO-8859-1)

  H. For programs using curses (such as lynx) David Sibley reports: The
  regular curses package uses the high-order bit for reverse video mode
  (see flag _STANDOUT defined in /usr/include/curses.h).  However,
  ncurses seems to be 8-bit clean and does display iso-latin-8859-1
  correctly.

  I. For programs using groff (such as man), make sure to use -Tlatin1
  instead of -Tascii. Old versions of the program man also use col, and
  the next point also applies.

  J. For col, make sure 1) that it is fixed so as to do
  setlocale(LC_CTYPE,""); and 2) put LC_CTYPE=ISO-8859-1 in the
  environment.

  K. For rlogin, use option -8.

  L. For joe,
  sunsite.unc.edu:/pub/Linux/apps/editors/joe-1.0.8-linux.tar.gz is said
  to work after editing the configuration file. Someone else said: joe:
  Put the -asis option in /isr/lib/joerc in the first column.

  M. For LaTeX: \documentstyle[isolatin]{article}.  For LaTeX2e:
  \documentclass{article}\usepackage{isolatin} where isolatin.sty is
  available from ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit.

  A nice discussion on the topic of ISO-8859-1 and how to manage 8-bit
  characters is contained in the file grasp.insa-
  lyon.fr:/pub/faq/fr/accents (in French). Another fine discussion (in
  English) can be found in ftp.vlsivie.tuwien.ac.at:/pub/8bit/FAQ-
  ISO-8859-1, which is mirrored in rtfm.mit.edu:pub/usenet-by-
  group/comp.answers/character-sets/iso-8859-1-faq.

  If you need to fix a program that behaves badly with 8-bit characters,
  one thing to keep in mind is that if you have a signed char type then
  characters may be negative, and using them as an array index will
  fail.  Several programs can be fixed by judiciously adding (unsigned
  char) casts.


  13.  What precisely does XFree86-2.1 do when it initializes its
  keymap?


  Since version 2.1, XFree86 will initialize its keymap from the Linux
  keymap, as far as possible. However, Linux had 16 entries per key (one
  for each combination of the Shift, AltGr, Ctrl, Alt modifiers) and
  presently has 256 entries per key, while X has 4 entries per key (one
  for each combination of Shift, Mod), so some information is
  necessarily lost.

  First X reads the Xconfig file, where definitions of the LeftAlt,
  RightAlt, RightCtl, ScrollLock keys as Meta, ModeShift, Compose,
  ModeLock or ScrollLock might be found - see X386keybd(1), later
  XFree86kbd(1).

  For Mod the LeftAlt key is taken, unless RightCtl was defined as
  ModeShift or ModeLock, in which case RightCtl is taken, or RightAlt
  was so defined, in which case RightAlt is taken.  This determines how
  the 4 XFree86 meanings of a key are selected from the 16 Linux
  meanings.  Note that Linux today does not distinguish by default
  between the two Ctrl keys or between the two Shift keys. X does
  distinguish.

  Now the kernel keymap is read and the usually obvious corresponding X
  bindings are made. The bindings for the "action keys" Show_Memory,
  Show_State, Show_Registers, Last_Console, Console_n, Scroll_Backward,
  Scroll_Forward, Caps_On and Boot are ignored, as are the dead
  diacriticals, and the locks (except for ShiftLock), and the "ASCII-x"
  keys.

  Next, the definitions in the Xconfig file are used. (Thus, a
  definition of Compose in Xconfig will override its value as found in
  the Linux keymap.)

  What happens to the strings associated with the function keys?
  Nothing, X does not have such a concept. (But it is possible to define
  strings for function keys in xterm - note however that the window
  manager gets the keys first.)

  I don't know how to convince xterm that it should use the X keymap
  when Alt is pressed; it seems just to look at its resource
  eightBitInput, and depending on whether that is true or false either
  set the high order bit of the character, or generate an additional
  Escape character (just like setmetamode(1) does for the console).


  14.  Unusual keys and keyboards


  The two keys PrintScrn/SysRq and Pause/Break are special in that they
  have two keycodes: the former has keycode 84 when Alt is pressed
  simultaneously, and keycode 99 otherwise; the latter has keycode 101
  when Ctrl is pressed simultaneously, and keycode 119 otherwise.
  (Thus, it makes no sense to bind functions to Alt keycode 99 or Ctrl
  keycode 119.)

  If you have strange keys, that do not generate any code under Linux
  (or generate messages like "unrecognized scancode"), and your kernel
  is 1.1.63 or later, then you can use setkeycodes(1) to tell the kernel
  about them. They won't work under X, however.  Once they have gotten a
  keycode from setkeycodes, they can be assigned a function by loadkeys.


  15.  Examples of use of loadkeys and xmodmap


  Switching Caps Lock and Control on the keyboard (assuming you use
  keymaps 0-15; check with dumpkeys | head -1)



          % loadkeys
          keymaps 0-15
          keycode 58 = Control
          keycode 29 = Caps_Lock
          %



  Switching them under X only:


               % xmodmap .xmodmaprc



  where .xmodmaprc contains lines


               remove Lock = Caps_Lock
               remove Control = Control_L
               keysym Control_L = Caps_Lock
               keysym Caps_Lock = Control_L
               add Lock = Caps_Lock
               add Control = Control_L



  What is this about the key numbering? Backspace is 14 under Linux, 22
  under X?  Well, the numbering can best be regarded as arbitrary; the
  Linux number of a key can be found using showkey(1), and the X number
  using xev(1). Often the X number will be 8 more than the Linux number.

  Something else people like to change are the bindings of the function
  keys.  Suppose that you want to make F12 produce the string "emacs ".
  Then


               % loadkeys
               keycode 88 = F12
               string F12 = "emacs "
               %



  will do this. More explicitly, the procedure is like this: (i) find
  the keycodes of the keys to be remapped, using showkey(1).  (ii) save
  the current keymap, make a copy and edit that:


               % dumpkeys > my_keymap
               % cp my_keymap trial_keymap
               % emacs trial_keymap
               % loadkeys trial_keymap
               %



  The format of the table can be guessed by looking at the output of
  dumpkeys, and is documented in keytables(5).  When the new keymap
  functions as desired, you can put an invocation

          loadkeys my_new_keymap



  in /etc/rc.local or so, to execute it automatically at boot-up.  Note
  that changing modifier keys is tricky, and a newbie can easily get
  into a situation only an expert can get out of.

  The default directory for keymaps is /usr/lib/kbd/keytables.  The
  default extension for keymaps is .map.  Thus, loadkeys uk would
  probably load /usr/lib/kbd/keytables/uk.map.

  (On my machine) /dev/console is a symbolic link to /dev/tty0, and the
  kernel regards /dev/tty0 as a synonym for the current VT.  XFree86 1.3
  changes the owner of /dev/tty0, but does not reset this after
  finishing. Thus, loadkeys or dumpkeys might fail because someone else
  owns /dev/tty0; in such a case you might run X first.  Note that you
  cannot change keyboard mappings when not at the console (and not
  superuser).


  15.1.  `I can use only one finger to type with'


  "Can the Shift, Ctrl and Alt keys be made to behave as toggles?"

  Yes, after saying


               % loadkeys
               keymaps 0-15
               keycode 29 = Control_Lock
               keycode 42 = Shift_Lock
               keycode 56 = Alt_Lock
               %



  the left Control, Shift and Alt keys will act as toggles.  The numbers
  involved are revealed by showkey (and usually are 29, 97, 42, 54, 56,
  100 for left and right control, shift and alt, respectively), and the
  functions are Control_Lock, Shift_Lock, Alt_Lock, ALtGr_Lock.

  "What about `sticky' modifier keys?"

  Since version 1.3.33, the kernel knows about `sticky' modifier keys.
  These act on the next key pressed. So, where one earlier needed the
  3-symbol sequence Shift_Lock a Shift_Lock to type `A', one can now use
  the 2-symbol sequence SShift_Lock a.  Versions of the kbd package
  older than 0.93 do not yet include code for these sticky modifiers,
  and have to invoke them using their hexadecimal codes. For example,


               % loadkeys
               keymaps 0-15
               keycode 54 = 0x0c00
               keycode 97 = 0x0c02
               keycode 100 = 0x0c03
               %



  will make the right Shift, Ctrl, Alt sticky versions of the left ones.
  >From 0.93 on you can say


               % loadkeys
               keymaps 0-15
               keycode 54 = SShift
               keycode 97 = SCtrl
               keycode 100 = SAlt
               %



  to obtain the same result.  This will allow you to type Ctrl-Alt-Del
  in three keystrokes with one hand.

  The keymaps line in these examples should cover all keymaps you have
  in use.  You find what keymaps you have in use by


               % dumpkeys | head -1



  16.  Changing the video mode


  As far as I know there are 6 ways to change resolution:

  1. At compile time: change the line


               SVGA_MODE=      -DSVGA_MODE=NORMAL_VGA



  in /usr/src/linux/Makefile.

  1A. After compilation: use rdev -v - a terrible hack, but it exists.

  2. At boot time: put vga=ask in the lilo config file, and lilo will
  ask you what video mode you want. Once you know, put vga=mypreference.

  3. At run time: A. Use the resizecons command. (This is a very
  primitive wrapper around the VT_RESIZE ioctl.)  B. Use the
  SVGATextMode command. (This is a less primitive wrapper around the
  VT_RESIZE ioctl.)

  4. Not "on the console": Under dosemu, or with svgalib etc. you can
  change the hardware video mode without the console driver being aware
  of it. Sometimes this is useful in getting resizecons or SVGATextMode
  set up: use dosemu and some DOS program to get into the desired
  videomode, dump (say from another VT) the contents of all video
  hardware registers, and use that in the initialization that resizecons
  and SVGATextMode require.  In some cases where the video mode has
  gotten into some unusable state, starting dosemu, relying on the BIOS
  to set up the video mode, and then killing dosemu (with kill -9), is
  the easiest way to get into shape again.



  16.1.  Instructions for the use of resizecons


  Get svgalib and compile the program restoretextmode.  Boot up your
  machine in all possible video modes (using vga=ask in the lilo config
  file), and write the video hardware register contents to files CxR
  (C=cols, R=rows), e.g., 80x25, 132x44, etc.  Put these files in
  /usr/lib/kbd/videomodes.  Now resizecons 132x44 will change videomode
  for you (and send SIGWINCH to all processes that need to know about
  this, and load another font if necessary).

  At present, resizecons only succeeds when there is memory enough for
  both the old and the new consoles at the same time.


  17.  Changing the keyboard repeat rate


  At startup, the Linux kernel sets the repeat rate to its maximal
  value.  For most keyboards this is reasonable, but for some it means
  that you can hardly touch a key without getting three copies of the
  corresponding symbol. Use the program kbdrate(8) to change the repeat
  rate, or, if that doesn't help, edit or remove the section

  ______________________________________________________________________
       ! set the keyboard repeat rate to the max

           mov     ax,#0x0305
           xor     bx,bx           ! clear bx
           int     0x16
  ______________________________________________________________________


  of /usr/src/linux/[arch/i386/]boot/setup.S.


  18.  Scrolling


  There are two ways to get a screen to scroll.  The first, called `hard
  scrolling', is to leave the text in video memory as it is, but change
  the viewing origin. This is very fast.  The second, called `soft
  scrolling', involves moving all screen text up or down. This is much
  slower.  The kernel console driver will write text starting at the top
  of the video memory, continuing to the bottom, then copy the bottom
  part to the top again, and continue, all the time using hard scrolling
  to show the right part on the screen.  You can scroll back until the
  top op the video memory by using Shift-PageUp (the grey PageUp) and
  scroll down again using Shift-PageDown (the grey PageDown), assuming a
  default keymap.  The amount of scrollback is thus limited to the
  amount of video memory you happen to have and you cannot increase this
  amount.  If you need more scrollback, use some program that buffers
  the text, like less or screen - by using a buffer on disk you can go
  back to what you did last week.  (One can set the amount of scrollback
  for xterm by adding a line like XTerm*saveLines: 2500 in .Xresources.)

  Upon changing virtual consoles, the screen content of the old VT is
  copied to kernel memory, and the screen content of the new VT is
  copied from kernel memory to video memory. Only the visible screen is
  copied, not all of video memory, so switching consoles means losing
  the scrollback information.

  Sometimes, hard scrolling is undesirable, for example when the
  hardware does not have the possibility to change viewing origin. The
  first example was a Braille machine that would render the top of video
  memory in Braille. There is a kernel boot-time option no-scroll to
  tell the console driver not to use hard scrolling.  See bootparam(7).


  19.  Screensaving


  setterm -blank nn will tell the console driver to blank the screen
  after nn minutes of inactivity. (With nn = 0, screensaving is turned
  off. In some old kernels this first took effect after the next
  keyboard interrupt.)

  The s option of xset(1) will set the X screensaving parameters: xset s
  off turns off the screensaver, xset s 10 blanks the screen after 10
  minutes.

  The video hardware powersaving modes can be enabled/disabled using the
  setvesablank program given in the starting comment of
  /usr/src/linux/drivers/char/vesa_blank.c.


  20.  Screen dumps


  setterm -dump N will dump the contents of the screen of /dev/ttyN to a
  file screen.dump in the current directory. See setterm(1).

  The current contents of the screen of /dev/ttyN can be accessed using
  the device /dev/vcsN (where `vcs' stands for `virtual console
  screen').  For example, you could have a clock program that displays
  the current time in the upper right hand corner of the console screen
  (see the program vcstime in kbd-0.95.tar.gz).  Just dumping the
  contents goes with cat /dev/vcsN.  These device files /dev/vcsN do not
  contain newlines, and do not contain attributes, like colors. From a
  program it is usually better to use /dev/vcsaN (`virtual console
  screen with attributes') instead - it starts with a header giving the
  number of rows and columns and the location of the cursor.  See
  vcs(4).


  21.  Some properties of the VT100 - application key mode


  : Sometimes my cursor keys or keypad keys produce strange codes?

  When the terminal is in application cursor key mode the cursor keys
  produce  Esc O x  and otherwise  Esc [ x  where x is one of A,B,C,D.
  Certain programs put the terminal in application cursor key mode; if
  you kill them with kill -9, or if they crash, then the mode will not
  be reset.

          % echo -e '\033c'


  resets all properties of the current VC. Just changing the cursor
  application key mode is done by

          % echo -e '\033[?1h'


  (set) and

          % echo -e '\033[?1l'


  (clear).

  When the terminal is in application keypad key mode the keypad keys
  produce  Esc O y  and otherwise  Esc [ z ~  for certain y and z.
  Setting application keypad key mode is done by

          % echo -e '\033='


  and

          % echo -e '\033>'


  clears it again.


  22.  Hardware incompatibility


  Several people have noticed that they lose typed characters when a
  floppy disk is active. It seems that this might be a problem with
  Uni-486WB motherboards.  (Please mail me (aeb@cwi.nl) to confirm [yes,
  I have the same problem], deny [no, nothing wrong with my Uni-486WB],
  modify [My Xyzzy machine has the same problem].)

  Tjalling Tjalkens (tjalling@ei.ele.tue.nl) reports very similar
  problems with "a no-brand GMB-486 UNP Vesa motherboard with AMD
  486DX2-66 CPU" - during floppy activity some keystrokes are lost,
  during floppy tape streamer (Conner C 250 MQ) activity many keystrokes
  are lost.

  Some people experience sporadic lockups - sometimes associated to hard
  disk activity or other I/O.

  Ulf Tietz (ulf@rio70.bln.sni.de) wrote: `I have had the same problems,
  when I had my motherboard tuned too fast.  So I reset all the timings
  ( CLK, wait statements etc ) to more conventional values, and the
  problems are gone.'

  Bill Hogan (bhogan@crl.com) wrote: `If you have an AMI BIOS, you might
  try setting the Gate A20 emulation parameter to "chipset" (if you have
  that option). Whenever I have had that parameter set to any of the
  other options on my machine ("fast", "both", "disabled") I have had
  frequent keyboard lockups.'


  23.  Copyright

  Copyright (c) 1993-1998 by Andries Brouwer.  This document may be
  distributed under the terms set forth in the LDP license at
  http://sunsite.unc.edu/LDP/COPYRIGHT.html or
  ftp://www.win.tue.nl/pub/linux/LDP/COPYRIGHT.txt.

  Additions and corrections are welcome.  Andries Brouwer - aeb@cwi.nl



  RedHat Linux KickStart HOWTO
  Martin Hamilton <martinh@gnu.org>
  v0.2, 11 January 1999

  This HOWTO briefly describes how to use the RedHat Linux KickStart
  system to rapidly install large numbers of identical Linux boxes.  For
  advanced users, we describe how to modify the KickStart installation
  procedure to do your own thing, and give a quick guide to building RPM
  packages of your own.
  ______________________________________________________________________

  Table of Contents


  1. Copyright

  2. Homepage

  3. Introduction

  4. Prerequisites

  5. Setting up a boot floppy

  6. The KickStart config file

     6.1 System info
     6.2 Packages to install
     6.3 Post-installation shell commands

  7. Installation itself

  8. Mounting the boot/supp disks

  9. Modifying the RedHat installer

  10. FAQs/Wish list

  11. Credits

  12. Appendix A - Configuring BOOTP/DHCP and NFS

  13. Appendix B - Making your own RPMs

  14. Appendix C - Munging your own RPMs into the distribution



  ______________________________________________________________________

  1.  Copyright


  Copyright (c) 1998 Martin Hamilton, All rights reserved.  This is free
  documentware; you can redistribute it and/or modify it under the terms
  of version 2 or later of the GNU General Public License
  <http://www.gnu.org/copyleft/gpl.html>.



  2.  Homepage


  If you got this document from a Linux HOWTO mirror site or a CD-ROM,
  you might want to check back to the KickStart HOWTO home page
  <http://wwwcache.ja.net/dev/kickstart/> to see if there's a newer
  version around.



  3.  Introduction


  RedHat Linux version 5 comes with a a little-known (and until now, not
  hugely documented) feature called KickStart.  This lets you automate
  most/all of a RedHat Linux installation, including:



  o  Language selection

  o  Network configuration and distribution source selection

  o  Keyboard selection

  o  Boot loader installation (e.g. lilo)

  o  Disk partitioning and filesystem creation

  o  Mouse selection

  o  X Window system server configuration

  o  Timezone selection

  o  Selection of an (initial) root password

  o  Which packages to install


  Eagle eyed RedHat users will probably have realised by now that these
  are essentially the main steps involved in the manual installation of
  a RedHat Linux system.  KickStart makes it possible for you to script
  the regular installation process, by putting the information you would
  normally type at the keyboard into a configuration file.


  But wait - there's more :-)


  Having finished the normal installation process, KickStart also lets
  you specify a list of shell level commands which you would like to be
  executed.  This means that you can automatically install extra local
  software not distributed as part of RedHat Linux (yes, there are even
  more free software programs than the ones you get with the RedHat
  distribution.  Some can't be distributed by RedHat on legal grounds,
  e.g. the ssh and PGP encryption systems) and carry out any tidying up
  you may need to do in order to get a fully operational system.



  4.  Prerequisites


  There are two approaches to a KickStart install - one is to simply
  copy your KickStart configuration file to a RedHat boot floppy.  The
  other is to use a regular boot floppy and get your KickStart config
  file off the network.

  In both cases, you'll need:


  1. Intel (i386) class machines - KickStart appears to only work on
     these at the time of writing.

  2. KickStart config file - we'll talk about this in the next section.

  3. RedHat boot disk - preferably from the updates directory, to take
     advantage of any fixes/driver updates.

  4. DNS entries for the IP addresses you'll be using - optional, but
     will stop the installation from prompting you for your machine's
     domain name.


  If you want to fetch your config file over the network, you'll need to
  export it via NFS - this is the only access method supported at the
  moment.  The config file lets you specify a different NFS server to
  fetch the RedHat distribution itself from.


  You can configure a static IP address for your machine - e.g. a
  special one reserved for KickStart installations.  Alternatively, if
  you don't want to hard code an IP address in the config file you can
  tell KickStart to use a BOOTP/DHCP server to fetch this.  Some servers
  will allocate new addresses in a given range automatically, e.g. the
  CMU BOOTP server with dynamic addressing extensions
  <ftp://ftp.ntplx.net/pub/networking/bootp>.


  More information on NFS and BOOTP/DHCP is in Appendix A.



  5.  Setting up a boot floppy


  Essentially, all you have to do is copy your KickStart config file to
  /ks.cfg on the RedHat boot floppy, e.g.



         mcopy ks.cfg a:



  However - the RedHat boot floppy is pretty full, and you may find that
  you have to delete some of the other files to make room for the
  KickStart config file.  I was able to make enough room for mine by
  deleting the various message files normally displayed by the SYSLINUX
  boot loader, e.g.



         mdel a:\*.msg



  Another approach would be to throw away the drivers for some of the
  hardware you don't have - see the section on modifying the boot floppy
  below.


  You may also want to edit syslinux.cfg, the SYSLINUX config file.
  This also lives in the top level directory of the RedHat boot floppy.
  For instance, the following syslinux.cfg will cause KickStart mode to
  be entered into automatically as the machine boots up, without the
  normal delay:



         default ks
         prompt 0
         label ks
           kernel vmlinuz
           append ks=floppy initrd=initrd.img



  Note that you almost probably want to base your boot and supplementary
  floppies on the most recent disk images available in the updates/i386
  on your local RedHat mirror site.  Older images may be buggy or have
  driver support for less hardware.



  6.  The KickStart config file


  There are three main sections to the config file:



  1. System info, e.g. disk partitioning and network config

  2. RedHat packages to install

  3. Post-installation shell commands to run


  There are some other possibilities which we won't talk about here, but
  might work.  For more information check out the sample KickStart
  config in misc/src/install/ks.samp and doc/README.ks under the top
  level i386 RedHat distribution directory on your CD-ROM or local
  RedHat mirror site.



  6.1.  System info


  The available directives which I've been using are:



     lang
        Language configuration, e.g. for English


     lang en



     network
        Network configuration, e.g. to use BOOTP/DHCP


          network --bootp



     nfs
        NFS server and directory to install from, e.g.


          nfs --server chicken.swedish-chef.org /mnt/cdrom



     to use the NFS server chicken.swedish-chef.org and try to mount the
     RedHat distribution from the directory /mnt/cdrom.

     keyboard
        Select keyboard type, e.g. for UK keyboards


          keyboard uk



     zerombr
        Clear the Master Boot Record - removes any existing operating
        system boot loader from your disk

     clearpart
        Clear existing partitions - e.g. to remove all existing disk
        partitions prior to installation


          clearpart --all



     part
        Partition the disk, e.g. to make a root filesystem of 500MB


          part / --size 500



     install
        Make a fresh installation of RedHat Linux.

     mouse
        Set the mouse being used, e.g. for a PS/2 or compatible "bus
        mouse"


     mouse ps/2



     timezone
        Set the timezone, e.g. for local time in the UK


          timezone --utc Europe/London



     rootpw
        Set the initial root password, based on a previously derived
        encrypted password


          rootpw --iscrypted XaacoeGPmf/A.



     lilo
        Install the LILO boot loader, e.g. in the Master Boot Record


          lilo --location mbr



     %packages
        Packages to install - see below.

     %post
        Post-installation shell commands - see below.


  Note that the directory where KickStart is looking for the RedHat
  distribution should have a subdirectory RedHat, which contains the
  RedHat distribution tree for the platform in question.  In the above
  example, we should see something like the following files and
  directories:



       /mnt/cdrom/RedHat
       /mnt/cdrom/RedHat/base
       /mnt/cdrom/RedHat/contents
       /mnt/cdrom/RedHat/i386
       /mnt/cdrom/RedHat/instimage
       /mnt/cdrom/RedHat/RPMS
       /mnt/cdrom/RPM-PGP-KEY



  If you're installing off a CD-ROM rather than off the network, the
  contents should look something like this:



       RedHat
       RedHat/base
       RedHat/contents
       RedHat/i386
       RedHat/instimage
       RedHat/RPMS
       RPM-PGP-KEY



  If you have the RedHat distribution for multiple architectures (e.g.
  on an NFS server - they're too big to fit more than one architecture's
  version onto a single CD-ROM), you'll notice that each distribution
  has the same files and directories under a subdirectory, e.g.



       alpha/RPM-PGP-KEY
       i386/RPM-PGP-KEY
       sparc/RPM-PGP-KEY



  There should be a file architecture/Redhat/architecture, e.g.
  i386/Redhat/i386.


  If you want to create your own encrypted passwords, it's very easy
  using Perl, e.g.



       % perl -e 'print crypt("schmurrdegurr", "Xa") . "\n";'p



  Other options (or mooted options), which I've not tried:



     cdrom
        Install off CD-ROM rather than network.

     device
        Explicitly declare device details, e.g.


          device ethernet 3c509 --opts "io=0x330, irq=7"



     Alternative values of device include scsi for SCSI controllers and
     cdrom for proprietary CD-ROM drives.

     upgrade
        Upgrade an existing installation rather than make a fresh
        installation.
     xconfig
        Configure X Window server, graphics card and monitor.  e.g.


          xconfig --server "Mach64" --monitor "tatung cm14uhe"



  I've not delved too deeply into this last one, because I'm not ever
  planning to run X on the console of any of my KickStarted machines.
  I'm told that running xconfig within KickStart itself is a bit flaky,
  but the same functionality is also available from the command line via
  Xconfigurator - so you might be best off leaving this to the post-
  installation script.


  Here's how this first part of a KickStart config file looks when we
  put all the bits together:



       lang en
       network --static --ip 198.168.254.253 --netmask 255.255.255.0
         --gateway 198.168.254.1 --nameserver 198.168.254.2
       nfs --server chicken.swedish-chef.org /mnt/cdrom
       keyboard uk
       zerombr yes
       clearpart --all
       part / --size 500
       part swap --size 120
       install
       mouse ps/2
       timezone --utc Europe/London
       rootpw --iscrypted XaacoeGPmf/A.
       lilo --location mbr



  Note that some of the RedHat documentation refers to an invocation of
  the network directive which doesn't actually work in practice: network
  --option.  The correct invocation is to put network followed by
  --static, --bootp or --dhcp.  Be aware that the BOOTP and DHCP options
  are different - to the extent that they even use different code.


  You can add the --grow parameter to a part directive to indicate that
  it's OK to grow the partition beyond the size you specify.  It
  probably only makes sense to have one partition tagged with --grow.



  6.2.  Packages to install


  The start of the packages section of the KickStart config file is
  indicated by the presence of a %packages directive on a line of its
  own.  This is followed by one or both of two types of package
  specifier - individual packages may be installed by giving the name of
  their RPM (excluding the version and platform information), and groups
  of packages may be installed by giving their group name.
  Here's a sample packages section for a KickStart config file:



       %packages
       @ Base
       netkit-base
       bind-utils
       ncftp
       rdate
       tcp_wrappers
       traceroute
       cmu-snmp



  So, what are these groups ?  Well, there are a number of groups
  defined by default in a file called base/comps under the RedHat
  distribution's top level directory.  Here are the ones which were
  current at the time of writing:



  o  Base

  o  Printer Support

  o  X Window System

  o  Mail/WWW/News Tools

  o  DOS/Windows Connectivity

  o  File Managers

  o  Graphics Manipulation

  o  X Games

  o  Console Games

  o  X multimedia support

  o  Console Multimedia

  o  Print Server

  o  Networked Workstation

  o  Dialup Workstation

  o  News Server

  o  NFS Server

  o  SMB (Samba) Connectivity

  o  IPX/Netware(tm) Connectivity

  o  Anonymous FTP/Gopher Server

  o  Web Server


  o  DNS Name Server

  o  Postgres (SQL) Server

  o  Network Management Workstation

  o  TeX Document Formatting

  o  Emacs

  o  Emacs with X windows

  o  C Development

  o  Development Libraries

  o  C++ Development

  o  X Development

  o  Extra Documentation


  You'll notice that they correspond to the various configurations which
  you're prompted for during a manual installation.  Note that some of
  the packages in a given package group are duplicated in other groups,
  and that you can install multiple groups of packages without this
  causing problems.  Each group's entry in the comps listing looks
  similar to this:



       0 Extra Documentation
       sag
       lpg
       howto
       faq
       man-pages
       end



  It seems that groups with a 1 next to their name (the first line
  above) are selected for installation by default.  You can customise
  the Linux installation process even further by creating your own
  groups or redefine existing ones by editing this file.



  6.3.  Post-installation shell commands


  This is probably the best feature of all, and something which there is
  no direct equivalent to in the manual installation process.  What we
  can do here is specify a sequence of shell level commands which should
  be executed after the main installation (disk partitioning, package
  installation, and so on) is complete.


  The beginning of this section is signified by the %post directive in
  the KickStart config file.  In what follows you can take advantage of
  all of the utilities which have been installed on your newly built
  Linux system, e.g.



       %post
       ln -s /etc/rc.d/init.d /etc/init.d
       ln -s /etc/rc.d/rc.local /etc/rc.local
       ln -s /usr/bin/md5sum /usr/bin/md5
       ln -s /usr/bin/perl /usr/local/bin/perl
       chmod ug-s /bin/linuxconf
       mkdir /var/tmp/tmp
       perl -spi -e 's!image=/boot/vmlinuz-.*!image=/boot/vmlinuz!' /etc/lilo.conf
       rm /etc/rc.d/rc*.d/*sendmail



  You can also use I/O redirection and here documents:



       cat <<EOF >>/etc/passwd
       squid:*:102:3500:Squid Proxy:/usr/squid:/bin/bash
       EOF

       cat <<EOF >>/etc/group
       cache:x:3500:
       EOF



  Modify the run-time startup scripts:



       cat <<EOF >>/etc/rc.local
       echo 8192 > /proc/sys/kernel/file-max
       echo 32768 > /proc/sys/kernel/inode-max

       [ -x /usr/sbin/sshd ] && /usr/sbin/sshd
       [ -x /usr/sbin/cfd ] && /usr/sbin/cfd

       EOF



  Set up crontab entries:



  cat <<EOF >/tmp/crontab.root
  # Keep the time up to date
  0,15,30,45 * * * * /usr/sbin/ntpdate -s eggtimer 2>&1 >/dev/null
  # Recycle Exim log files
  1 0 * * * /usr/exim/bin/exicyclog
  # Flush the Exim queue
  0,15,30,45 * * * * /usr/exim/bin/exim -q
  EOF

  crontab /tmp/crontab.root
  rm /tmp/crontab.root



  And even install other RPMs which you made yourself:



       rpm -i ftp://chicken.swedish-chef.org/rpms/squid.rpm
       rpm -i ftp://chicken.swedish-chef.org/rpms/ssh.rpm
       rpm -i ftp://chicken.swedish-chef.org/rpms/exim.rpm
       rpm -i ftp://chicken.swedish-chef.org/rpms/cfengine.rpm
       rpm -i ftp://chicken.swedish-chef.org/rpms/linux.rpm

       ssh-keygen -b 1024 -f /etc/ssh_host_key -N ""
       depmod -a



  Note that you can achieve the same effect by making your own RPMs
  containing the commands you want executed - see below for more
  information.  Give them a carefully chosen name and you can force them
  to be installed first (e.g. name starts with 'aaa') or last (e.g.
  name starts with 'zzz').


  Be aware that a less painful way of doing root crontab entries is to
  create them as files in one or more of the directories
  /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly and
  /etc/cron.monthly.


  More information about making your own RPMs is available in Appendix
  B.



  7.  Installation itself


  Boot the to-be-installed machine off your RedHat boot floppy as usual,
  but instead of pressing RETURN at the SYSLINUX prompt, type linux ks.


  If you're lucky, this will be all you have to type!


  If you customised your RedHat boot floppy as outlined above, you won't
  even need to do this bit :-)

  Since we're really just automating the normal steps involved in a
  RedHat installation, the normal dialogs may appear if/when KickStart
  gets confused about what to do next.  The most likely case is that
  your network interface won't be detected automatically, and you'll be
  prompted for its IRQ and I/O address space.  KickStart tends to need
  help for ISA bus cards, but detects PCI bus cards automatically.


  You can keep an eye on what KickStart is doing by by switching virtual
  consoles as usual:



  o  Alt-F1 - installation dialog

  o  Alt-F2 - shell prompt

  o  Alt-F3 - install log (messages from install program)

  o  Alt-F4 - system log (messages from kernel, etc.)

  o  Alt-F5 - other messages



  8.  Mounting the boot/supp disks


  The RedHat boot disk boot.img is in MS-DOS format, using the SYSLINUX
  program to boot up.  The supplementary disk supp.img is a Linux ext2
  filesystem.  If you have support for the loopback filesystem in your
  Linux kernel, you can mount both of these files in your filesystem and
  hack at them:



       # mkdir -p /mnt/boot /mnt/supp
       # mount -o loop -t msdos boot.img /mnt/boot
       # mount -o loop supp.img /mnt/supp



  Now you should be able to see and manipulate the files on the boot and
  supplementary disk under /mnt/boot and /mnt/supp respectively.  Phew!
  Note that older versions of mount may not be able to handle the -o
  loop option.  In these cases you'll need to explicitly use losetup to
  configure the loopback device for each file, e.g.



       # losetup /dev/loop0 boot.img
       # mount -t msdos /dev/loop0 /mnt/boot



  You might also need to explicitly use the -t ext2 option when mounting
  an ext2 filesystem like the one on the supplementary disk.  But, it
  looks like people with modern Linux distributions shouldn't have to
  worry about this.
  Of course, if you don't want to mess around too much, you can cut a
  corner and manipulate actual floppy disks rather than these floppy
  disk images.  If time is important, you'll probably prefer to use the
  loopback devices, since you can hack around with the disk images
  without incurring the latency associated with a genuine floppy disk
  read/write.



  9.  Modifying the RedHat installer


  If you want to mess around with the installation procedure itself, the
  source code can be found on the RedHat CD-ROM or your local RedHat
  mirror site.  It's in misc/src/install under the i386 distribution top
  level directory.


  If you examine the RedHat boot disk you'll see that, in addition to
  the Linux kernel vmlinuz, there's a large file initrd.img:



       - -rwxr-xr-x   1 root     root          559 May 11 15:48 boot.msg
       - -rwxr-xr-x   1 root     root          668 May 11 15:48 expert.msg
       - -rwxr-xr-x   1 root     root          986 May 11 15:48 general.msg
       - -rwxr-xr-x   1 root     root       968842 May 11 15:48 initrd.img
       - -rwxr-xr-x   1 root     root         1120 May 11 15:48 kickit.msg
       - -r-xr-xr-x   1 root     root         5352 May 11 15:48 ldlinux.sys
       - -rwxr-xr-x   1 root     root          875 May 11 15:48 param.msg
       - -rwxr-xr-x   1 root     root         1239 May 11 15:48 rescue.msg
       - -rwxr-xr-x   1 root     root          402 May 11 15:48 syslinux.cfg
       - -rwxr-xr-x   1 root     root       444602 May 11 15:48 vmlinuz



  You guessed it, this is another ext2 filesystem saved as a file - -
  but with a twist.  It's actually compressed as well.  You can
  uncompress it and then mount the result, e.g.



       # gzip -dc /mnt/boot/initrd.img >/tmp/initrd.ext2
       # mkdir /mnt/initrd
       # mount -o loop /tmp/initrd.ext2 /mnt/initrd



  Probably the most important part of this filesystem is the collection
  of loadable kernel modules which are included with the boot disk.  If
  you need to merge in a new version of a driver, you'll need to either
  replace vmlinuz with a new kernel which has this statically linked, or
  replace it in the modules collection.  What's more, you may need to
  throw other modules away to make room.


  The modules collection is the file modules/modules.cgz.  Wondering
  what that might be ?  It's actually a compressed cpio archive, believe
  it or not!  And you thought nobody used cpio any more...  Actually RPM
  itself uses cpio internally, too.  Here's how to hack around with it:



       # gzip -dc /mnt/initrd/modules/modules.cgz >/tmp/modules.cpio
       # cpio -itv <modules.cpio >modules.listing
       # mkdir modules
       # cpio -idumv <../modules.cpio



  I don't believe that there is currently a way under Linux (at least in
  mainstream distributions) to transparently access compressed
  filesystems.  Let me know if you know better!


  If you change anything, remember to:



  1. Use cpio to recreate the archive.  How to do this is left as an
     exercise for the reader...

  2. Use gzip to compress the resulting archive.

  3. Copy it to /mnt/initrd, or wherever you put the uncompressed
     initrd.img archive.

  4. Unmount /mnt/initrd (or whatever you called it).

  5. Compress the new initrd.img using gzip again.

  6. Copy the resulting archive onto the boot disk image -
     /mnt/boot/initrd.img in our example.

  7. Unmount the boot disk image, e.g. /mnt/boot.


  Finally, you can now create new boot floppies using this modified boot
  disk setup, e.g.



       # cat boot.img >/dev/fd0



  10.  FAQs/Wish list


  Q: After KickStart installation, my machine won't boot up.  The BIOS
  complains with a message like Missing operating system.


  A: Sounds like the partition with the root filesystem on isn't
  bootable.  Use fdisk to toggle its bootable status.


  Q: After the floppy boots, I get the message: Error opening files for
  kickstart copy: File exists.


  A: Use a more recent version of boot.img and supp.img - look in the
  updates directory of your local RedHat mirror site.  There was a bug
  in some older versions of these for RedHat 5.1.


  Q: Can you have all outstanding patches (update RPMs) applied
  automatically too ?  How ?


  A1: Copy the RPMs you want installing to the RPMS directory from which
  the installation is going to take place, get rid of the older RPMs,
  and update the file RedHat/base/hdlist with the new RPM details.  See
  Appendix C for a script from Eric Doutreleau to do this for you.  If
  you do this yourself, remember to run genhdlist afterwards!


  A2: Try this Perl script: patchup
  <http://wwwcache.ja.net/dev/patchup/>.  This compares the RPMs your
  system has installed with those in a nominated directory and reports
  on the ones it thinks need updating.  It can even install them for you
  if you trust it to.


  A3: rpm2hml <http://rufus.w3.org/linux/rpm2html/> has a much more
  powerful (12MB of C code vs. a page of Perl!) version of A2.


  Q: A single config file on the install server for all of the clients,
  perhaps as a fallback after trying IPADDR-kickstart ?


  A1: Use the BOOTP/DHCP 'boot file' parameter bf to set the filename.


  A2: Add a a record bf=/kickstart/ks.cfg to the relevant entry in
  /etc/bootptab.

  Q: More flexibility when things go wrong - e.g. prompt for alternate
  locations if distribution not found on CD-ROM.


  A: ?


  Q: Explicit exclusion of packages - e.g. everything apart from
  sendmail.


  A: Rebuild the BASE package without sendmail.


  Q: Choose which services are started automatically on boot-up by the
  run-level scripts under /etc/rc.d/.


  A: The chkconfig utility lets you configure which services are run
  automatically on boot-up.  You can run this in your post-installation
  script section, e.g. to run ypbind in run levels 3, 4 and 5:



  chkconfig --level 345 ypbind on



  and it will start the ypbind level on the 345 level.

  Q: When executing the shell commands in the %post section, bring any
  output up in another virtual console rather than overwriting the main
  screen.  Could be done in the shell commands section using open?.


  A: No problem - do something like this:



         exec >/dev/tty5



  Q: Does the filesystem creation code check for bad blocks ?


  A: If you switch to the virtual console where the filesystem creation
  output is being displayed, you won't see any mention of the


  Q: Can I arrange things so some of my machines are configured
  differently from others ?


  A: You could move the host dependent stuff into the scripted section
  of the KickStart config - e.g. only install a given RPM if on a given
  machine.  It would be useful to have a conditional installation
  feature in the packages section of the config file, e.g. switching on
  architecture, or hostname/domain name/IP address.


  Q: Are there any changes between RedHat 5.1 and 5.2 ?


  A1: Lots of changes in the installer, but mostly bug fixes or cosmetic
  improvements.  No impact on KickStart as far as I can tell - from a
  diff -rcs of the two misc/src/install directories.


  A2: RH5.2 now apparently includes the automatic IP allocation/DHCP
  patches to bootpd, but they have left out the documentation which
  tells you how to use it.

  Q: (How) can you clear a specific partition or partitions ?  e.g. to
  leave /home but zap /.


  A: You can't - yet!


  Q: Can you arrange to have your partitions created across multiple
  drives ?  e.g. / on sda and /home on sdb.



  A: Don't think so - looks like you only get access to the first drive
  from the partitioning tool.


  Q: Is it possible to specify existing partitions to be included in the
  mount table, or is it only possible to specify the creation of new
  partitions that will then be included?


  A: ?


  Q: After running mkkickstart, where is the file it creates?


  A: It doesn't create a file - it dumps the KickStart config to stdout.


  Q: In virtual console 4 (Alt-F4) I get Unable to load NLS charset
  cp437(nls_cp437).  What does this mean ?  Should I be worried ?


  A: Sounds like you're trying to mount a CD-ROM burned with the Joliet
  (Unicode extensions to ISO 9660.  In theory the filenames on the CD-
  ROM might get munched and not make it through to Linux correctly.  In
  practice it doesn't seem to cause any problems - could be a spurious
  dependency ?


  Q: Why am i getting the X Window System installed ? I didn't put it in
  my list of packages.


  A: The XFree86-VGA16 RPM is a 'base' component, and as such always
  gets installed - unless you change the definition of the base class.


  Q: In my post-installation script, can I use the packages which have
  been installed by now to do funky things not possible with the limited
  tools on the floppies ?


  A: Yep - e.g. if you chose to install Perl when you put your KickStart
  config together, almost anything is possible in about five lines :-)



  11.  Credits


  Thanks to Eric Doutreleau for the info about chkconfig, the SYSLINUX
  config file hack, and the Perl script for updating your distribution
  server's RPMs.  Thanks to Robert Kaminsky for extensive
  investigations.  Thanks to Piete Brooks, Flavia Regina Munhoz, Tom
  Toffoli, Bob Robbins, Charlie Brady and Ragen Herrington, for their
  comments and questions.



  12.  Appendix A - Configuring BOOTP/DHCP and NFS


  If you're wondering what on earth this BOOTP and DHCP stuff is, more
  information is available at the DHCP WWW site <http://www.dhcp.org/>.
  NFS is documented separately in detail in the NFS HOWTO, and there's a
  DHCP mini-HOWTO too.  I've tried to provide enough details here to
  help you get started, whilst not treating the topics in depth - let me
  know if you think this is overkill.


  In the BOOTP/DHCP + NFS configuration we're discussing, the KickStart
  config file should be NFS mountable by the machine being installed
  from /kickstart/IPADDR-kickstart on the BOOTP/DHCP server, where
  IPADDR is the IP address of the new machine, e.g.
  /kickstart/198.168.254.254-kickstart for the machine 198.168.254.254.


  You should be able to override this location by returning the bf
  parameter (boot file) in your BOOTP/DHCP response.  It may even be
  possible to have this NFS mounted off another machine entirely.


  To NFS export some directories from an existing Linux box, create the
  file /etc/exports with contents something like:



       /kickstart *.swedish-chef.org(ro,no_root_squash)
       /mnt/cdrom *.swedish-chef.org(ro,no_root_squash)



  Note that if you didn't register the IP addresses you're going to be
  using in the DNS, you may be told to get lost by the NFS server and/or
  the RPC portmapper.  In this you can probably get away with putting IP
  address/netmask pairs in the config files, e.g.



       /kickstart 198.168.254.0/255.255.255.0(ro,no_root_squash)



  and in /etc/hosts.allow:



       ALL: 194.82.103.0/255.255.255.0: ALLOW



  This is because most Linux distributions use TCP wrappers to do access
  control for some or all of the NFS related daemons.  Be aware that the
  /etc/exports syntax tends to be different on other Unix variants - the
  NFS servers bundled with Linux distributions tend to offer a much
  wider range of options than the ones shipped with other versions of
  Unix.

  Be aware that if you include a root password in your KickStart config
  file, or NFS export directories containing sensitive information, you
  should take care to expose this information to as few people as
  possible.  This can be done by making the NFS export permissions as
  fine grained as you can, e.g. by specifying a particular host or
  subnet to export to rather than a whole domain.  If you keep a special
  IP address free for KickStart installations, everything's nice and
  simple, but you'll have to change it later - or reconfigure the
  machine to get its IP address via BOOTP/DHCP.


  Most NFS servers require you to tell mountd and nfsd (on some versions
  of Unix they're prefixed with a rpc.) that the /etc/exports file has
  changed - usually by sending a SIGHUP.  There's often a program or
  script called exportfs, which will do this for you, e.g.



       # exportfs -a



  If you didn't have NFS up and running when this machine was booted,
  the directories may not be exported automatically.  Try rebooting, or
  running the following programs as root:



       # portmap
       # rpc.nfsd
       # rpc.mountd



  As noted, on some systems the rpc. prefix isn't used.  In most modern
  Unix distributions, these programs can be found in the /usr/sbin or
  /usr/libexec directories.  These might not be in your path already,
  e.g. if you used su to become root.  The portmap program is also
  sometimes called rpcbind, e.g. on Solaris, some versions of nfsd
  require a command line argument specifying the number of instances of
  the server to run, and you may find you also need to run another
  daemon called biod.  The above should suffice on most (all?)  Linux
  systems.


  If you're using the CMU BOOTP server with DHCP and dynamic addressing
  extensions referred to earlier, a sample /etc/bootptab entry
  (/etc/bootptab is the normal location of the BOOTP/DHCP configuration
  file) would look something like this:



         .dynamic-1:ip=198.168.254.128:T254=0x30:T250="ds=198.168.254.2:
         dn=swedish-chef.org:sm=255.255.255.0:gw=198.168.254.1:
         dl=0xFFFFFFFF":



  (wrapped for clarity)

  This says to allocate IP addresses dynamically on encountering new
  machines, starting at 198.168.254.128 and continuing for the next 48
  (the hexadecimal value 30) addresses.  Each client will be passed back
  the value of T250.  In this case that sets:



  o  the DNS server ds to 198.168.254.2

  o  the domain name dn to swedish-chef.org

  o  the subnet mask sm to 255.255.255.0

  o  the default gateway gw to 198.168.254.1

  o  the lease length dl (how long the address is valid for) to
     "forever"


  There seem to be a number of other versions of this server kicking
  around which do not support dynamic addressing.  For these, you would
  have to list the hardware (typically Ethernet MAC) address of each to-
  be-installed machine in /etc/bootptab, and the entries would look
  something like this:



       bork.swedish-chef.org:ip=198.168.254.128:ha=0000E8188E56:
         ds=198.168.254.2:dn=swedish-chef.org:sm=255.255.255.0:
         gw=198.168.254.1:dl=0xFFFFFFFF":



  (wrapped for clarity)


  Note that the parameter ha corresponds to the hardware address of the
  machine being installed.



  13.  Appendix B - Making your own RPMs


  The RPM package format is already very well documented, particularly
  in the book Maximum RPM by Ed Bailey, which you can download from the
  RPM WWW site <http://www.rpm.org/> - also available from all good book
  stores!  This is just a couple of quick hints for people in a hurry.


  RPM packages are built from a spec file.  This consists (in a similar
  fashion to the KickStart config file) of a recipe of steps that need
  to be taken in order to build the package - it's expected that you'll
  have to build it from source, potentially for multiple platforms, and
  may need to apply patches before compiling.  Once built and installed,
  a binary RPM will be created from the files and directories you
  specify as being associated with the package.  It's important to note
  that RPM has no idea of which files and directories are related to a
  given package - you have to tell it.

  Here's a sample specification for a custom RPM of the Squid WWW cache
  server <http://squid.nlanr.net/>:
       Summary: Squid Web Cache server
       Name: squid
       Version: 1.NOVM.22
       Release: 1
       Copyright: GPL/Harvest
       Group: Networking/Daemons
       Source: squid-1.NOVM.22-src.tar.gz
       Patch: retry-1.NOVM.20.patch
       %description
       This is just a first attempt to package up the Squid Web Cache for easy
       installation on our RedHat Linux servers

       %prep
       %setup
       %build
       configure --prefix=/usr/squid
       perl -spi -e 's!#( -DALLOW_HOSTNAME_UNDERSCORES)!$1!' src/Makefile
       make

       %install
       make install

       %files
       /usr/squid



  Here's how to build this RPM:



       % mkdir -p SOURCES BUILD SRPMS RPMS/i386
       % cp ~/squid-1.NOVM.22-src.tar.gz SOURCES
       % cp ~/retry-1.NOVM.20.patch SOURCES
       % rpm -ba squid-1.NOVM.22+retry-1.spec



  This will automatically create a subdirectory under the BUILD
  directory, into which it'll unpack the source code and then apply the
  patch (there are a number of options available for patching - check
  the book for details).  Now, RPM will automatically build the package
  by running configure and then make, install it using make install, and
  take a snapshot of the files under /usr/squid.  It's the latter which
  will form the binary RPM of the Squid software.


  Note that we can insert arbitrary shell commands into the unpacking,
  building and installing processes, e.g. the call to perl which tweaks
  one of Squid's compile-time parameters.


  The final binary RPM will be left under the RPMS directory in the
  platform specific subdirectory i386.  In this case it will be called
  squid-1.NOVM.22-1.i386.rpm.  Note that the filename is created by
  concatenating the values of the following parameters from the spec
  file: Name, Version and Release - plus the hardware platform in
  question, i386 in this case.  Try to bear this in mind when creating
  your own RPMs, to avoid giving them overly long or painful names!


  It's also worth bearing in mind that you can build RPMs without having
  to rebuild the whole software package, e.g.



       Summary: Linux 2.0.36 kernel + filehandle patch + serial console patch
       Name: linux
       Version: 2.0.36+filehandle+serial_console
       Release: 1
       Copyright: GPL
       Group: Base/Kernel
       Source: linux-2.0.36+filehandle+serial_console.tar.gz
       %description
       This is just a first attempt to package up the Linux kernel with patches
       for installation on our RedHat Linux servers

       %prep
       echo

       %setup
       echo

       %build
       echo

       %install
       echo

       %post
       /sbin/lilo

       %files
       /lib/modules/2.0.36
       /boot/vmlinuz



  In this case we simply create an RPM based on the /boot/vmlinuz file
  and the contents of the directory /lib/modules/2.0.36, and execute
  /sbin/lilo after the package has been installed on a target machine.
  Let me know if you know much neater way of writing the spec file than
  this.



  14.  Appendix C - Munging your own RPMs into the distribution


  Here is Eric's script for munging updated RPMs into the RedHat
  distribution area:



  #!/usr/bin/perl
  #
  $redhatdir="/cdrom/i386";
  $rpmdir="/cdrom/i386/RedHat/RPMS/";
  $updatedir="/cdrom/updates/";
  @OTHERDIR=($updatedir);
  foreach $dir (@OTHERDIR)
          {
          print "update for $dir\n";
          system(" find $dir -name \"*.rpm\" -exec cp {} $rpmdir \\; ");
          }
  chdir($contribdir) || die "peux pas aller dans $contribdir $!\n";
  system("chmod -R 755 $redhatdir");
  chdir($rpmdir) || die "problem to go in $rpmdir $!\n";
  #
  # remove the old file
  #
  opendir(DIR,'.');
  @package=grep(/\.rpm$/,readdir(DIR));
  foreach $file (@package)
          {
          $file =~ /(.*)\-([\d+|\.]+\w*)\-(\d+)\.[i386|noarch].*/;
          $nom=$1;
          $version=$2;
          $buildvers=$3;
          if ($NOM{$nom})
                  {
                  $version2=$VERSION{$nom};
                  $buildver2=$BUILDVERS{$nom};
                  $file2=$FILE{$nom};
                  $nom2=$NOM{$nom};
                  if ( $version2 gt $version )
                          {
                          print "$file2 is newer than $file\n";
                          unlink($file);
                          }
                  else
                          {
                          if ( $version2 lt $version )
                                  {
                                  print "$file is newer than $file2\n";
                                  unlink($file2);
                                  $VERSION{$nom}=$version;
                                  $BUILDVERS{$nom}=$buildvers;
                                  $FILE{$nom}=$file;
                                  $NOM{$nom}=$nom;
                                  }
                          else
                                  {
                                  if ( $buildver2 > $buildvers )
                                                  {
                                             print "$file2 : $buildver2 est mieux que $file : $buildvers\n";
                                             unlink($file);
                                                  }
                                  else
                                                  {
                                          print "$file2 : $buildver2 is older than $file : $buildvers\n";
                                              unlink($file2);
                                              $VERSION{$nom}=$version;
                                              $BUILDVERS{$nom}=$buildvers;
                                              $FILE{$nom}=$file;
                                              $NOM{$nom}=$nom;
                                                  }
                                  }
                          }
                  }
          else
                  {
                  $VERSION{$nom}=$version;
                  $BUILDVERS{$nom}=$buildvers;
                  $FILE{$nom}=$file;
                  $NOM{$nom}=$nom;
                  }
          }

  # we do the hard thing here
  #
  system("$redhatdir/misc/src/install/genhdlist $redhatdir");



  Kiosk HOWTO
  Gene Wilburn, ITS Dept, Royal Ontario Museum
  <genew@rom.on.ca>
  v1.0, October 1999

  This document provides a guide for setting up a WWW-based kiosk using
  Linux, X11R6, FVWM2, Netscape Navigator 4.X, and a customized track-
  ball. It outlines the methods that were used to create a public kiosk
  for the Hands On Biodiversity Gallery at the Royal Ontario Museum,
  Toronto.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright, license and terms of usage
     1.2 Acknowledgements

  2. Overview

  3. Building a Kiosk Environment

     3.1 FVWM2
        3.1.1 /etc/X11/fvwm2/system.fvwm2rc
     3.2 Netscape Navigator
     3.3 Overlay Masks for Navigator
        3.3.1 Creating the Graphical Masks
     3.4 /root/kiosk.xinitrc
     3.5 /root/xkiosk

  4. Initializing the Kiosk

     4.1 /etc/inittab modifications
     4.2 /etc/rc.d/rc.4/S99xkiosk runlevel script
     4.3 Booting normally from the console

  5. Other Considerations

     5.1 Screensavers
        5.1.1 /.xscreensaver
     5.2 Sound Files
     5.3 Trackballs
     5.4 Designing or modifying HTML pages for kiosks

  6. Future Directions

     6.1 Remote Kiosks
     6.2 Touchscreens
     6.3 Keyboards
     6.4 Collaboration


  ______________________________________________________________________

  1.  Introduction

  Information display kiosks are useful in libraries, galleries and
  museums, educational institutions, municipal offices, visitor
  information booths, conferences, shopping malls, airports---in short
  any location where simple, easy access to information is desirable.
  Kiosks are normally set up with touchscreens or pointing devices such
  as trackballs, to allow people to select and view information that is
  attractively displayed and up to date.

  There are many ways to create kiosks, from expensive solutions based
  on proprietary software to HTML-based open-source solutions. Browser-
  based technologies are particularly attractive because they are
  inherently multimedia, offering text, graphics, sound and streaming
  media, and the content is highly portable.

  Linux provides a flexible and interesting platform for kiosk
  development. Linux is inexpensive to set up and it offers a wide range
  of options, from diskless display stations to self-contained,
  database-driven web servers. Due to the versatility of the underlying
  operating system, a well-designed Linux kiosk can be placed in a
  remote location and administered via a telephone or network link.

  This HOWTO explores one method of setting up Linux as a standalone
  information kiosk, using Netscape Navigator 4.X and FVWM2 on a Red Hat
  Linux 6.X system. It is based on a kiosk I set up for use in the
  Hands-on Biodiversity Gallery in the Royal Ontario Museum (
  <http://www.rom.on.ca>), Toronto, Canada. The kiosk outlined in this
  HOWTO incorporates a trackball rather than a more expensive
  touchscreen. There are undoubtedly many other ways to create a Linux-
  based kiosk, but this one has worked reliably for us and it may
  provide a useful starting point for your own kiosk project.


  1.1.  Copyright, license and terms of usage

  Copyright Gene Wilburn 1999. All rights reserved.

  The author disclaims all warranties with regard to this document,
  including all implied warranties of merchantability and fitness for a
  certain purpose; in no event shall the author be liable for any
  special, indirect or consequential damages or any damages whatsoever
  resulting from loss of use, data or profits, whether in an action of
  contract, negligence or other tortuous action, arising out of or in
  connection with the use of this document.

  This legalese means use at your own risk.


  1.2.  Acknowledgements

  Our Linux kiosk derives heavily from the work done by the City of
  Charlotte, North Carolina, for their municipal website, Charlotte's
  Web (see  <http://www.charweb.org/webinfo/kiosk/>). The Charlotte's
  Web kiosk project, which employs a touchscreen monitor, was set up in
  1996 using an early version of Slackware Linux, Netscape Navigator
  2.X, and FVWM. The webmasters at Charlotte have created a very useable
  kiosk implementation and have shared their complete setup via their
  website. This HOWTO, to a certain degree, represents an update of
  their work, altering the details to work with Red Hat 6.X, Netscape
  Navigator 4.X, FVWM2, and a custom-made trackball.

  I worked with Debra Luneau (debral@rom.on.ca), the Royal Ontario
  Museum webmaster, to create the graphics overlays for Netscape. The
  examples we distribute at our ftp site are her work---and are the ones
  we use on the kiosk in the Biodiversity Gallery.

  The Ontario Biodiversity section of the ROM website was designed by
  Hopscotch Interactive (www.hopscotch.ca). The original application was
  converted from a flat-file database system to a MySQL-database driven
  system by Gord Howells (gordonh@rom.on.ca), the ROM's database
  designer and programmer. The non-kiosk version of this mini-site may
  be viewed at  <http://www.rom.on.ca/ontario/>.



  2.  Overview

  Setting up Linux for use as a web-based kiosk is similar to setting up
  Linux as a graphical workstaion, with a few extra considerations. If
  the machine is to be a standalone unit, it must boot straight into
  kiosk mode. Furthermore, the browser environment must be modified in
  to disable standard dialog screens and to eliminate parts of the
  browser that allow inappropriate interaction, such as the Location Bar
  in Netscape.

  Essentially a kiosk website is self-contained. Users navigate through
  the site via clicks with a pointing device. The pointing device can be
  a touchscreen, a trackball, or a mouse. Mice are difficult to secure
  in a public area.

  A Linux kiosk can be connected back to a home site via a direct
  network or PPP link, requesting pages from the home site, or it can be
  a self-contained website, running Apache and any corresponding CGI
  modules.


  3.  Building a Kiosk Environment



  3.1.  FVWM2

  FVWM2 (FVWM, version 2 -- www.fvwm.org) is a flexible, reliable, and
  lightweight X Window manager that provides excellent configurability
  for creating a kiosk environment. For kiosk use you must change some
  of its default settings. You need to modify the system.fvwm2rc file to
  remove things like virtual desktops, title bars, exit controls, etc,
  leaving a relatively minimalist FVWM environment. Because the kiosk is
  a standalone unit, modifying the system-wide settings does not present
  a problem.

  You can also take advantage of FVWM's settable object properties to
  use X Window bitmaps (xpm files) to mask the parts of Netscape
  Navigator you don't want users to access.

  The FVWM2 file you need to modify is /etc/X11/fvwm2/system.fvwm2rc.
  (If you use a different distribution than Red Hat, this file may be
  located elsewhere.) You may have to poke around in this file to find
  the sections listed below.


  3.1.1.  /etc/X11/fvwm2/system.fvwm2rc

  In /etc/X11/fvwm2/system.fvwm2rc change



       DeskTopSize 2X2



  to



       DeskTopSize 1X1



  This eliminates the virtual desktops.

  Next, in the Default Styles section, change



       Style "*"           BorderWidth 7, HandleWidth 7



  to



       Style "*"           BorderWidth 0, HandleWidth 0, notitle, nohandles



  This will disable most of the normal windowing controls.

  Add the following two lines to the Default Styles section:



       Style "xdaliclock"  StaysOnTop
       Style "sxpm"        StaysOnTop



  The Default Styles part of the file should look something like this
  when you finish:



       # default Styles:
       #Style "*"           BorderWidth 7, HandleWidth 7
       Style "*"           BorderWidth 0, HandleWidth 0, notitle, nohandles
       Style "*"           Icon unknown1.xpm, Color lightgrey/dimgrey
       Style "*"           MWMFunctions, MWMDecor, HintOverride
       Style "*"           DecorateTransient, NoPPosition
       Style "*"           IconBox 0 -10 -280 -1
       Style "*"           FocusFollowsMouse
       Style "*"           RandomPlacement, SmartPlacement
       Style "xdaliclock"  StaysOnTop
       Style "sxpm"        StaysOnTop



  You can use the xdaliclock and sxpm programs to cover up parts of
  Netscape Navigator. The ``StaysOnTop'' attribute is the active
  ingredient.

  Next, find the following four lines and comment them out as shown:



       #AddToFunc InitFunction         "I" Module FvwmButtons
       #+                      "I" exec xsetroot -mod 2 2 -fg \#554055 -bg \#705070

       #AddToFunc RestartFunction "I" Module FvwmButtons
       #+                      "I" exec xsetroot -mod 2 2 -fg \#554055 -bg \#705070

  Commenting out these lines will eliminate the nice task launcher from
  FVWM2, which is okay because you're after as simple an environment as
  you can create.



  3.2.  Netscape Navigator

  Netscape Navigator is a better choice for setting up a kiosk than
  Netscape Communicator. Being simpler, there are fewer objects to hide.

  Under Microsoft Windows, Netscape Navigator has a kiosk mode that
  eliminates most of the Navigator controls but there is, at the time of
  this writing, no built-in kiosk mode for the Unix version of
  Navigator.

  The Unix version can, however, be invoked with a -geometry argument
  that allows us to always start Netscape full screen. This forms part
  of our strategy for a Netscape-based kiosk.

  You need to decide on our kiosk screen resolution. Using a 19- or
  20-inch monitor, we found 640x480 too large, 1024x768 too small, and
  800x600 just about right for public viewing (you may decide
  differently). Once you decide on the resolution, you are ready to
  begin adjusting Navigator. For the rest of this HOWTO we assume
  800x600 resolution. You'll need to adjust accordingly if you select a
  different resolution.

  Note: Navigator is going to be invoked by root during bootup, so make
  all of the Netscape adjustments under the root account in the
  /root/.netscape directory.

  Invoke Netscape and click into the Edit, Preferences dialog. Under
  Appearance check ``Show Toolbar as Text Only.''  Under Appearance,
  Fonts adjust both fixed- and variable-width fonts to at least 14pt or
  the screen display will be too small for comfortable reading.

  Under Preferences, Navigator insert the URL of your kiosk home page.
  If you're running a local version of Apache or another web server,
  make this http://localhost/ for top level access, or deeper into the
  html doctree if desired.

  Save these options, then click View on the Navigator menu bar.
  Deselect Personal Toolbar and Location Bar.

  Notice how much more kiosk-like the interface has become? When you
  exit Navigator, these settings will be saved.


  3.3.  Overlay Masks for Navigator

  If you look closely at your adjusted Navigator screen, you'll see four
  areas that need to be covered and protected from mouse or trackball
  clicks:


  1. The Toolbar at the top

  2. The twister at the left-hand side of the navigation toolbar

  3. The rest of the navbar to the right of Home

  4. The security key in the lower left-hand corner of Navigator.

  Here's a rough schematic of the areas you need to mask:

       +---------------------------------------+
       |            # 1 Toolbar                |
       +--+------------+-----------------------+
       |#2|            |  #3 Navbar            |
       +--+            +-----------------------+
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       +--------+                              |
       |#4 Key  |                              |
       +---------------------------------------+



  To mask over the top areas (#1-3), we'll need three graphic images. To
  mask the security key (#4) we'll use xdaliclock.


  3.3.1.  Creating the Graphical Masks

  The easiest way to create graphical masks to cover areas #1-3 is to
  grab a screenshot of Navigator in full 800x600 mode and then crop out
  areas that correspond to #1-3. I used GIMP for this.

  You can then re-design the basic graphics, changing the colors if you
  wish, or putting your own logo on them. Save them as:


  1. topbar.xpm

  2. navleft.xpm

  3. navright.xpm

  The xpm format is the native X Window bitmap format. You will use the
  X Window program sxpm to place them on the screen.

  Creating the masks with just the right number of pixels and just the
  right placement on the monitor requires some experimentation. For your
  convenience, I have placed the xpm files we created plus our
  configuration files in at the following web site:
  <http://www.rom.on.ca/kiosk/HOWTO/>. You may find it simpler to
  download our masks and use them as a starting point for your own
  graphics.


  3.4.  /root/kiosk.xinitrc

  Just as you would normally create a .xinitrc file for your personal
  use, you must create an X Window session initialization file for our
  kiosk application. The following script implements a number of
  features:


  o  Screensaver initialization (optional)

  o  Placement of graphic bitmap over Navigator menu bar (topnav.xpm)

  o  Placement of graphic bitmap over navigation bar twiser
     (navleft.xpm)

  o  Placement of graphic bitmap over rest of navbar (navright.xpm)

  o  Xdaliclock placement over Navigator security key (adjusted for
     800x600 screen resolution)

  o  Netscape startup and loop checks to make sure Navigator is running,
     and to re-run it if it isn't.

  This is the main file that runs the kiosk.


  ______________________________________________________________________
  #!/bin/sh
  # kiosk.xinitrc -- Initialization script for kiosk X Window session

  # Start screensaver
  /usr/X11R6/bin/xscreensaver-command -exit
  /usr/X11R6/bin/xscreensaver &

  # Overlay over Navigator (mask #1)
  sxpm /root/navtop.xpm &

  # Overlay small graphic over Toolbar twister - left-hand side (mask #2)
  sxpm -g +0+23 /root/navleft.xpm &

  # Overlay larger graphic to cover everything to the right of
  # Home on the Toolbar (mask #3)
  sxpm -g +275+23 /root/navright.xpm &

  # Place xdaliclock over top of Netscape security key, lower lhc (mask #4)
  /usr/X11R6/bin/xdaliclock -g 38x20+0+578 -font fixed -noseconds \
  -bg gray -fg black &

  sleep 2

  # Start fvwm2 window manager
  fvwm2 &

  # restart netscape if it ever exits
  while true ; do
          if [ -f /.netscape/lock] ; then
                  rm /.netscape/lock
          fi
          /usr/bin/netscape -geometry 800x600
  done

  # This should never be reached
  ______________________________________________________________________



  3.5.  /root/xkiosk

  You can now start testing your kiosk setup. Since you will need to do
  this repeatedly, manually, as well as from an initialization script,
  create the following as a shell script named /root/xkiosk:



  ______________________________________________________________________
  /usr/X11R6/bin/xinit /root/kiosk.xinitrc -- /usr/X11R6/bin/X \
  -xf86config /root/kiosk.XF86Config bc
  ______________________________________________________________________



  Because you will be testing often, and reusing this later when you
  automate the startup, create this command as a shell script called
  /root/xkiosk. Be sure to chmod ug+x it.


  4.  Initializing the Kiosk

  Under normal (i.e. kiosk) conditions, Linux should boot straight into
  Kiosk mode. In the event of a power failure, accidental reboot, or
  scheduled reboot, you need to configure the system to do this.

  For our kiosk we elected to use init level 4, which is normally
  unused, for kiosk mode. We made the following adjustment to
  /etc/inittab:


  4.1.  /etc/inittab modifications


  ______________________________________________________________________
  # Default runlevel. The runlevels used by RHS are:
  #   0 - halt (Do NOT set initdefault to this)
  #   1 - Single user mode
  #   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
  #   3 - Full multiuser mode
  #   4 - Kiosk mode
  #   5 - X11
  #   6 - reboot (Do NOT set initdefault to this)
  #
  id:4:initdefault:
  ______________________________________________________________________



  4.2.  /etc/rc.d/rc.4/S99xkiosk runlevel script

  To initialize the kiosk after everything else has been initialized,
  including, in our case, Apache and MySQL, create the file
  /etc/rc.d/rc.4/S99xkiosk:



  ______________________________________________________________________
  #!/bin/bash
  #
  # S99xkiosk   Initialization of kiosk for runlevel 4
  #
  # Author:           Gene Wilburn <genew@rom.on.ca>
  #

  # Display message on console
  echo "Starting up the X Window Kiosk ... "

  if [ -f /.netscape/lock] ; then
     rm /.netscape/lock
  fi

  # Logging of X activity
  echo %%%%%%%%%%%%%Reboot%%%%%%%%%% >> /var/log/xlog
  /root/xkiosk

  # This point should only be reached by pressing Ctrl-Backspace
  /sbin/shutdown -r now

  # All done.
  ______________________________________________________________________



  Once this file has been created and inittab has been adjusted to boot
  into init level 4, Linux will boot directly into kiosk mode. On our
  kiosk we disable telnet and ftp and install ssh so we can maintain and
  administer the kiosk remotely across the network with ssh and scp.


  4.3.  Booting normally from the console

  There are times, especially during testing, when you'd like to work
  from the console in a normal init level 3 mode. To do this, press
  Ctrl-Backspace to reboot the system. When LILO: appears type:



       LILO: linux init 3



  and log in as usual.


  5.  Other Considerations



  5.1.  Screensavers

  Depending on where you deploy your kiosk, you may not want all the
  default xscreensaver images to appear. For our Hands-On Biodiversity
  Gallery we wanted to display only the animated fractal images that
  suggested life science themes.

  After testing out several screensaver images, we decided that we to
  select randomly between two choices: coral and forest.

  To limit xscreensaver to displaying these two, we created the file
  .xscreensaver in the filesystem root (/) with the following options:

  5.1.1.  /.xscreensaver


  ______________________________________________________________________
  programs: \
          coral -root \n\
          forest -root \n
  ______________________________________________________________________



  5.2.  Sound Files

  Our kiosk machine contains a Sound Blaster AWE64 card with attached
  speakers. We chose this card specifically because it works well with
  Linux sound drivers.

  The MySQL database that drives our Biodiversity Gallery kiosk points
  to a collection of sound files that a visitor may listen to, including
  a ``bird song quiz.'' The downside of using Linux Netscape for a kiosk
  is that some of the multimedia aspects are primitive, compared to
  Windows and Macintosh.

  To enable sound, we implemented a Unix Netscape plugin called Xswallow
  written by Caolan McNamara (
  <http://skynet.csn.ul.ie/~caolan/docs/XSwallow.html>). All the sound
  plugins we tested create a separate web page as the sound is being
  played (unless the sound file is embedded). Of the programs we tested,
  Xswallow worked the best and had the cleanest display page.

  Although the extra page is inconvenient, we decided that having the
  stability of Linux was more important than the extra click required to
  return to the previous screen.

  An additional problem is that when a sound is selected, the Xswallow
  page displays ``Click to Abort Swallow of type audio/basic''. Clicking
  merely returns a blank page. I made a slight change to the author's
  source code for UnixShell.c, changing



       char *text2 = "Click to Abort Swallow";



  to read



       char *text2 = "Click BACK Button to return from playing file";



  The phrase ``of type audio/basic'' appears to come directly from
  Netscape rather than Xswallow.

  After recompiling, I added the plugin to Netscape.

  A last note about sound files: the original set of files we received
  were a mix of .au and .wav files. Our experience was that the .au
  files worked the most reliably in Linux and we converted all sound
  files to .au format.
  5.3.  Trackballs

  Not having the funding for a touchscreen display, we opted for a
  trackball (and no keyboard) for our kiosk navigation. Our colleague,
  Andy Rauer at the Ontario Science Centre in Toronto, tipped us off to
  using ``industry-strength'' trackball components from Happ Conrols
  Inc., Elk Grove Village, Illinois  <http://www.happcontrols.com/>
  (check under their Interactives section).

  One of the things we needed to do was disable any right-mouse button
  click equivalents from being used in Netscape Navigator because right-
  click events invoke user dialogs.

  By building our own trackball, we were able to wire it any way we
  wanted. We wired in two push-button controls, both with a left-mouse
  button equivalent. The buttons are arranged on either side of the
  trackball, allowing ease of use from right-handed and left-handed
  visitors. Our gallery designers then took the trackball parts and
  built them into the gallery's kiosk enclosure.

  For our kiosk we purchased the following components for building a
  heavy-duty trackball designed to withstand visitor use (and abuse):


  o  A 2 1/4-inch Atari Trackball Assembly (we selected red)

  o  Trackball Interface Kit for IBM (Microsoft serial mouse compatible)

  o  Illuminated Push Buttons (red)

  From a local electronics vendor, we purchased a Hammond Manufacturing
  plastic handy case (Cat no. 1591ABK) for housing the electronics board
  for the trackball.

  Anticipating additional kiosks, and potential part failure, we ordered
  four sets of each of the above for spare parts and testing.


  5.4.  Designing or modifying HTML pages for kiosks

  In the best of all possible worlds, you will have the opporunity to
  design your kiosk pages from scratch. Bearing in mind that using a
  kiosk is a different experience from sitting at a desk browsing the
  web from a personal workstation, the following guidelines are useful
  design principles:


  o  Keep text passages very short and use large fonts.

  o  Avoid screens that require scrolling.

  o  Use colorful, large, eye-catching images on every page

  o  Create embedded navigation if possible, e.g., return to previous
     page, go to next page, go to kiosk menu, etc., should all be
     designed right into the pages themselves.

  o  Avoid anything that requires a keyboard. Design for clicking.

  o  If you use sound files, keep the duration short. Embed them into
     the page if possible.

  o  Make everything punchy and snappy. Design for short attention spans
     and pass-through traffic. Save your theses and exegeses for
     elsewhere.

  Unforunately you will sometimes inherit pages that were designed for
  web browsing rather than kiosk browsing. In these cases it may be too
  time-consuming or too difficult to redesign them as kiosk pages. When
  implementing standard web pages for a kiosk display:


  o  Remove all external A HREF's, including MAILTO's.

  o  Remove all unnecessary verbiage, logos, etc. from the pages.

  o  Check font sizes and increase if necessary.

  o  Remove any animated GIF's that don't pertain directly to the pages
     being viewed.

  o  Actually, remove any animated GIF's, period.

  o  Do anything else you can to simplify the page design.

  o  Check into using server-side includes to add some fundamental
     navigation or a consistent graphic to tie the pages together.



  6.  Future Directions

  Our previous attempts at creating browser-based kiosks with Windows-
  based PC's were unsatisfactory. The units were unstable, freezing up
  frequently. The Linux approach has given us a reliable, robust kiosk
  in a public gallery that has stood up well to visitor usage. Our
  success with this project has led us to consider other kiosk
  possibilities.


  6.1.  Remote Kiosks

  One of our future goals is to implement remote kiosks in the greater
  Toronto area where people can browse some of our site information and,
  hopefully, be attracted enough by it to visit the ROM in person. These
  might be deployed at places such as conventions, trade shows, shopping
  malls or special exhibits. We are also thinking in terms of deploying
  kiosks in more distant locations, perhaps in public libraries.

  For this project we would likely implement modem-based Linux boxes
  that could ``call home'' to update files on a routine basis and could
  be dialled into for maintenance and updates.


  6.2.  Touchscreens

  When the technology gets cheaper, we would like to experiment with
  flat-panel touchscreen displays for kiosks. The combination of flat-
  panel display and very small PC units would enable us to deploy kiosks
  with a very small footprint.


  6.3.  Keyboards

  Ultimately we may need to deploy kiosks that utilize keyboards. This
  will present a new set of challenges in terms of blocking unwanted
  keystrokes. If anyone would like to contribute information on this, or
  to any other aspect of the Kiosk-HOWTO, please email me at
  genew@rom.on.ca or my alternative email address njo@interlog.com.



  6.4.  Collaboration

  I would be very interested in collaborating with other kiosk builders
  to extend the Kiosk-HOWTO for other situations. Kiosks are a bit like
  Perl: ``There is more than one way to do it.''



  Kodak Digital Camera HOWTO
  David M. Burley, khemicals@stampede.org <mailto:khemi-
  cals@stampede.org>

  v0.0.7, 20 February 2000

  Getting a Kodak digital camera working under GNU/Linux.

  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 History
     1.2 New Versions
     1.3 Copyright and Trademarks
        1.3.1 Copyright
        1.3.2 Trademarks
     1.4 Acknowledgments and Thanks
     1.5 Author Contact Information

  2. Background

     2.1 Digital Camera Technology--How Things Work
     2.2 Kodak Digital Camera Product Line
        2.2.1 DC290
        2.2.2 DC280
        2.2.3 DC265
        2.2.4 DC260 (discontinued)
        2.2.5 DC240 / DC240i
        2.2.6 DC220 (discontinued)
        2.2.7 DC215 / DC215 Metallics
        2.2.8 DC210 (discontinued)
        2.2.9 DC210 Plus
        2.2.10 DC200 (discontinued)
        2.2.11 DC200 Plus
        2.2.12 DC120 (discontinued)
        2.2.13 DC50 (discontinued)
        2.2.14 DC40 (discontinued)
        2.2.15 DC25 (discontinued)
        2.2.16 DC20 (discontinued)
     2.3 Communicating With Digital Cameras
        2.3.1 RS232 Communications In a Nutshell
        2.3.2 USB Communications In a Nutshell
        2.3.3 IrDA Communications In a Nutshell

  3. Communicating With the DC-Series Cameras

     3.1 DC265
        3.1.1 Serial Camera Control
        3.1.2 2.2.14 Kernel USB Support
        3.1.3 2.3.46 kernel USB Support
        3.1.4 Kernel Devices
     3.2 Compact Flash PC Card Adapter

  4. Software Support

     4.1 OpenDiS (Open Digita Services)
        4.1.1 Compiling, extracting and installing OpenDiS
        4.1.2 Usage
        4.1.3 Usage Examples
     4.2 Digita Operating Environment- Command Device Protocol Python Script
     4.3 gPhoto

  5. Additional Online Resources

     5.1 Kodak Digital Camera Mailing Lists
        5.1.1 Kodak Digita Camera
        5.1.2 Kodak DC240/DC280
        5.1.3 Kodak DC215
     5.2 Other Useful Mailing Lists
        5.2.1 Linux-USB
        5.2.2 Linux-kernel
        5.2.3 gPhoto-Kodak
     5.3 Useful Web Sites / Other Resources
        5.3.1 Linux-USB Project
        5.3.2 Linux USB for DC-2xx Cameras
        5.3.3 OpenDiS (Open Digita Services)
        5.3.4 gPhoto
        5.3.5 Digital Photography Review

  6. FAQ

  7. TODO

  8. Appendix

     8.1 Drivers and other utilities for alternate Operating Systems
        8.1.1 DC265


  ______________________________________________________________________

  1.  Introduction

  1.1.  History

  This HOWTO was created in an attempt to document installation of a
  Kodak DC-265 Camera.

  Revision History:

  February 20, 2000--


  o  Major clean up of general issues

  o  Addition and rearrangement of sections

  o  Additional mailing list and web resources added

  February 17, 2000--


  o  Major revision with lots of changes...

  o  Updated for new backport and devel kernels

  o  Rearranged for easier reading and flow

  o  Updated for new OpenDiS release and the Python script.

  January 18, 2000--


  o  TODO added

  o  Removal of kernel 2.2.13 section due to new USB backport release
     for 2.2.14.  Replaced with a section for kernel 2.2.14. Please view
     previous HOWTO versions for information regarding older kernels

  o  Removal of kernel 2.3.36 section due to newer developmental
     kernels, replaced with kernel 2.3.39. Please view previous HOWTO
     versions for information regarding older kernels.

  o  Added a section detailing use of a Compact Flash PC Card Adapter

  January 9, 2000--


  o  Document modified for release of OpenDiS 0.0.3-pre6


  January 4, 2000--


  o  Support for DC-265 under kernels 2.2.13, 2.2.14, and 2.3.35 via USB
     draft completed.

  o  History written

  o  FAQ started

  o  Background written

  o  Lots of other fun stuff

  January 3, 2000--


  o  Initial research and work done to start writing HOWTO and thus it
     was born.

  1.2.  New Versions

  New versions of this HOWTO will be available on
  http://mh.netpedia.net/HOWTO/kodak/.  Copies of this HOWTO will be
  provided in a number of formats, including SGML, HTML and ASCII text.
  The authoritative master of this document will be the SGML-formatted
  copy.

  February 20, 2000--

  v0.0.7 released (public)

  v0.0.6 released (non-public)

  February 17, 2000--

  v0.0.4 released and v0.0.5 released (non-public)

  January 18, 2000--

  v0.0.3 released (non-public)

  January 9, 2000--

  v0.0.2 released (non-public)

  January 4, 2000--

  v0.0.1 released (non-public)

  1.3.  Copyright and Trademarks

  1.3.1.  Copyright

  Copyright (c) 2000 David M. Burley

  This manual may be reproduced in whole or in part, without fee,
  subject to the following restrictions:


  o  The copyright notice above and this permission notice must be
     preserved complete on all complete or partial copies Any
     translation or derived work must be approved by the author in
     writing before distribution.


  o  If you distribute this work in part, instructions for obtaining the
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

  o  Small portions may be reproduced as illustrations for reviews or
     quotes in other works without this permission notice if proper
     citation is given.

  Exceptions to these rules may be granted for academic purposes: Write
  to the author and ask. These restrictions are here to protect us as
  authors, not to restrict you as learners and educators. All source
  code in this document is placed under the GNU General Public License,
  available via anonymous FTP from the GNU archive site. Please contact
  the author via email before distribution or inclusion of this HOWTO in
  any works. This is to make sure that the most recent and most accurate
  version is used.

  1.3.2.  Trademarks

  Linux is a registered trademark of Linus Torvalds.

  Kodak is a registered trademark of the Eastman Kodak Company.

  Digita is a registered trademark of Flashpoint Technology, Inc.

  Dell is a registered trademark of Dell Computer Corporation.

  Windows is a registered trademark of Microsoft Corporation.

  All other trademarks are the property of their respective owner.

  1.4.  Acknowledgments and Thanks

  I would like to thank the Marble Horse Free Software Group for their
  support of my efforts, specifically Jacob Moorman for his direction
  and help with this and many of my other endeavors. I would also like
  to thank the rest of the Linux community, especially those working on
  USB and digital camera support.  Know that there are people out there
  who are using your code and would like you to continue.

  1.5.  Author Contact Information

  David Burley can be reached via email at the following address:
  khemicals@stampede.org

  GPG Key ID: 60ACD148

  FPR1: 76CE FFCA F637 DFD0 BAA5

  FPR2: 1079 BCB1 3CDD 60AC D148

  2.  Background

  2.1.  Digital Camera Technology--How Things Work

  Digital cameras work with the same basic concept as a traditional
  camera.  They have a viewfinder or LCD screen to show the image prior
  to taking a photograph, a lens with a shudder behind it to allow the
  light from the subject to hit a light sensative material. However,
  this is where most of the similarities end.

  Digital cameras use a CCD (Charged Coupled Device) to sense the colors
  of the light and their intensity. The CCD can be likened to a very
  find piece of graphing paper, with thousands of little squares
  (transistors) to which sense the differences between the colors. There
  are three types of transistors used in commonplace CCDs, red, green
  and blue. Each transistor then passes the color and intensity it
  sensed to and Analog-to-digital converter (ADC).  The ADC then
  converts the information passed to it by the transistors into a
  digital format, or binary 1's and 0's. The digital output of the ADC
  is then passed to a Digital Signal Processor (DSP). The DSP adjusts
  the contrast and other image details to get the perfect look and then
  compresses the data into a file format like JPEG (Joint Photographics
  Expert Group).

  Digital cameras may also have the ability to do an optical or a
  digital zoom on an image. An optical zoom is when a lens is used to
  get a closer look at the subject. A digital zoom is used to enhance
  the optical zoom for a larger image even though the maximum size has
  been attained via optical zoom. Even though an image can be resized
  later, it is suggested to use the built in digital zoom of the camera
  at this point before any compression has been done to the image. File
  formats like JPEG tend to degrade in quality when resized more so then
  when the image is resized by the camera's software. This is due to
  artifacts left behind due to the compression.

  A good resource for definitions of the terms used above is Digital
  Photography Review. <http://photo.askey.net/articles/glossary/> Please
  refer there for more information. Kodak also has a good site with much
  information on how things work, Kodak Digital Learning Center
  <http://www.kodak.com/US/en/digital/dlc/>.

  2.2.  Kodak Digital Camera Product Line

  Awaiting permission from Kodak to use their technical specifications
  from the Kodak web site for this information. It is copywritten.

  2.2.1.  DC290

  2.2.2.  DC280

  2.2.3.  DC265

  2.2.4.  DC260 (discontinued)

  2.2.5.  DC240 / DC240i

  2.2.6.  DC220 (discontinued)

  2.2.7.  DC215 / DC215 Metallics

  2.2.8.  DC210 (discontinued)

  2.2.9.  DC210 Plus

  2.2.10.  DC200 (discontinued)

  2.2.11.  DC200 Plus

  2.2.12.  DC120 (discontinued)

  2.2.13.  DC50 (discontinued)

  2.2.14.  DC40 (discontinued)

  2.2.15.  DC25 (discontinued)

  2.2.16.  DC20 (discontinued)



  2.3.  Communicating With Digital Cameras

  2.3.1.  RS232 Communications In a Nutshell

  2.3.2.  USB Communications In a Nutshell

  2.3.3.  IrDA Communications In a Nutshell

  3.  Communicating With the DC-Series Cameras

  3.1.  DC265

  The DC265 provides mechanisms for data transfer via standard RS232
  serial port, USB (Universal Serial Bus) and IrDA (infrared) interface.
  Additionally, images may be offloaded from the camera through the
  removal of the camera's Compact Flash Card and use of a Compact Flash
  PC Card Adapter in a PC Card reader or notebook PC Card slot.
  Currently this camera is supported by OpenDiS for USB and Serial data
  transfer.

  3.1.1.  Serial Camera Control

  Additional notes regarding transfer of data from the DC265 camera
  using RS232 serial support will be added in a future version of this
  HOWTO. See the OpenDiS subsection of the Software section of the HOWTO
  for information regarding serial camera control.

  3.1.2.  2.2.14 Kernel USB Support

  At the moment the USB implementation in the 2.2.x series is
  insufficient and substantially out of date. As such, most USB devices
  are unsupported natively with the included drivers. However there is a
  patch available for the 2.2.14 kernel.

  What software is needed (if not already present):


  1. usb-2.3.44-for-2.2.14.diff.gz <http://www.suse.cz/development/usb-
     backport/usb-2.3.44-for-2.2.14.diff.gz>

  2. Linux Kernel 2.2.14
     <ftp://ftp.us.kernel.org/pub/linux/kernel/v2.2/linux-2.2.14.tar.gz>

  3. OpenDiS 0.0.3 <http://ods.sourceforge.net/dl/opendis-0.0.3.tar.gz>

  This document assumes a working knowledge of kernel and program
  compiling.  If unfamiliar with the process please go and read the
  Kernel-HOWTO <http://howto.tucows.com/LDP/HOWTO/Kernel-HOWTO.html>.

  Applying the patch:


  cp usb-2.3.44-for-2.2.14.diff.gz /usr/src
  gunzip /usr/src/usb-2.3.44-for-2.2.14.diff.gz
  cd /usr/src
  patch -p0 < usb-2.3.44-for-2.2.14.diff



  Select the following to be built as either modules or part of your
  kernel:


  1. Support for your USB controller (It is suggested that all of these
     be compiled as modules unless the controller type is known.).
  2. USB Kodak DC-2xx Camera Support.

  3. Preliminary USB Device Filesystem.

  Reboot the system and then load the created modules if the support is
  not compiled into the kernel. To load the modules do the following:


  /sbin/insmod /lib/modules/2.2.14/usb/usbcore.o



  Use the following if the USB controller uses either an Intel or a VIA
  chipset.  Some others may also be supported:


  /sbin/insmod /lib/modules/2.2.14/usb/usb-uhci.o



  Use the following if the above did not work and this is the controller
  type:


  /sbin/insmod /lib/modules/2.2.14/usb/uhci.o



  Use this if the USB controller uses an SiS chipset, is a Compaq, or
  because the above two didn't seem to work and this is the only option
  left to try.


  /sbin/insmod /lib/modules/2.2.14/usb/usb-ohci-hcd.o



  Load the module for Kodak Digital Camera support:


  /sbin/insmod /lib/modules/2.2.14/usb/dc2xx.o



  Mount the USB Device Filesystem:


  mount -t usbdevfs ignored /proc/bus/usb



  3.1.3.  2.3.46 kernel USB Support

  The 2.3.x kernel series is the developmental branch of the kernel. As
  such it is suggested not to run this kernel series unless the backport
  of the USB driver does not work.

  What software is needed (if not already present.):


  Linux Kernel 2.3.46
  <ftp://ftp.us.kernel.org/pub/linux/kernel/v2.3/linux-2.3.46.tar.gz>

  This document assumes a working knowledge of kernel and program
  compiling.  If unfamiliar with the process please go and read the
  Kernel-HOWTO <http://howto.tucows.com/LDP/HOWTO/Kernel-HOWTO.html>.

  Select the following to be built as either modules or part of your
  kernel:


  1. Support for the USB controller (It is suggested to compile all of
     these as modules if the controller type is unknown.).

  2. USB Kodak DC-2xx Camera Support.

  3. Preliminary USB Device Filesystem.

  Reboot your system and then load the created modules if not compiled
  into the kernel. To load the modules do the following:


  /sbin/insmod /lib/modules/2.3.46/usb/usbcore.o



  Use this if the USB controller uses either an Intel or a VIA chipset.
  Some others may also be supported.


  /sbin/insmod /lib/modules/2.3.46/usb/usb-uhci.o



  Use the following if the above did not work and it is your controller
  type:


  /sbin/insmod /lib/modules/2.3.46/usb/uhci.o



  Use this if the USB controller uses and SiS chipset, is a Compaq, or
  because the above two didn't seem to work and there is only one option
  left to try.


  /sbin/insmod /lib/modules/2.3.46/usb/usb-ohci-hcd.o



  Load the module for Kodak Digital Camera support:


  /sbin/insmod /lib/modules/2.3.46/usb/dc2xx.o



  Mount the USB Device Filesystem:


  mount -t usbdevfs ignored /proc/bus/usb



  3.1.4.  Kernel Devices

  The following is a bash shell script designed to create all 16 Kodak
  devices for use with both the current 2.3.x kernel series and 2.2.14
  with the current USB backport. Copy the text below into a file named
  MakeKodakDev, then make that file executable by typing 'chmod +x
  MakeKodakDev' and then run the script ./MakeKodakDev as root (or su'd
  to root) it will create the devices so they don't have to be made
  individually by hand.

  It creates as per the dc2xx.txt file in the kernel documentation the
  following 16 devices:

  /dev/kodak00 type=character major=180 minor=80

  ...

  /dev/kodak15 type=character major=180 minor=95


  # Filename: MakeKodakDev
  # Last Modified February 16, 2000
  # Please see the Kodak Digital Camera HOWTO for more information
  # http://mh.netpedia.net/HOWTO/kodak/
  #!/bin/sh
  export scrapvar=0
  while [ $scrapvar -lt 17 ];
  do
      if [ $scrapvar -lt 10 ];
      then
          mknod -m 0666 /dev/kodak0$scrapvar c 180 $(( $scrapvar + 80))
      else
          mknod -m 0666 /dev/kodak$scrapvar c 180 $(( $scrapvar + 80 ))
      fi
  scrapvar=$(( $scrapvar + 1 ))
  done
  # EOF



  3.2.  Compact Flash PC Card Adapter

  This section is for those who wish to utilize maximum data transfer
  rate and save the battery power in the camera's batteries. This method
  of picture access only allows for storage, retrieval, and deletion of
  images on a Compact Flash Card. These instructions are tested with a
  Kodak 16 MB Picture Card and a SanDisk CompactFlash PC Card Adapter on
  a Dell Inspiron 7000 notebook computer.

  What software is needed (if not already present):


  1. PCMCIA-CS-3.1.11 <ftp://sourceforge.org/pcmcia/pcmcia-
     cs-3.1.11.tar.gz>

  This document assumes a working knowledge of kernel and program
  compiling.  If unfamiliar with the process it is strongly suggested to
  go and read the Kernel-HOWTO
  <http://howto.tucows.com/LDP/HOWTO/Kernel-HOWTO.html>.

  Select the following to be built as either modules or part of your
  kernel:


  1. DOS FAT fs support

  2. VFAT (Windows-95) fs support

  Reboot the system and then load the created modules each time access
  to the compact flash card is desired if the support is not compiled
  into the kernel.  To load the modules do the following:


  /sbin/insmod /lib/modules/$(uname -r)/fat.o
  /sbin/insmod /lib/modules/$(uname -r)/vfat.o



  Compile and configure PCMCIA-CS. This part of the process is beyond
  the scope of this document, however there is a document with such
  information that can be found in the PCMCIA-HOWTO.
  <ftp://sourceforge.org/pcmcia/doc/PCMCIA-HOWTO.html> There is also
  most likely a pre-packaged version for the distribution of GNU/Linux
  the computer running. This step can be greatly simplified if a pre-
  packaged version is used.

  Using the Compact Flash PC Card Adapter:

  Create a directory to mount the Compact Flash Card to.


  mkdir /flashcard



  Insert the Compact Flash Card into the Compact Flash PC Card Adapter
  (both should face the same direction).

  Insert the Compact Flash PC Card Adapter into the PC-Card slot of the
  notebook computer.

  Mount the Compact Flash Card PC Card Adapter to /flashcard (The
  Compact Flash Card PC Card Adapter is assigned its device by figuring
  out how many IDE controllers are on the system, and then assigning it
  the next device. For example, if a system were to have 2 IDE
  controllers, and would thus have /dev/hda /dev/hdb /dev/hdc and
  /dev/hdd assigned to the current controllers, the Compact Flash Card
  PC Card Adapter would be assigned /dev/hde1.).


  mount -t vfat /dev/hde1 /flashcard



  From this point the files can be copied, moved, deleted, and renamed
  as done on a normal filesystem. Information regarding file management
  commands may be found in the documentation included with the OS
  distribution used, such as man pages. The manual pages which list the
  commands to use to do the above procedures can be accesses by typing
  the following to get the command's respective manual page entry: 'man
  cp', 'man mv', 'man rm'. Before removing the Compact Flash Card PC
  Card Adapter remember to unmount it with the following command.

  umount /flashcard



  The Compact Flash Card PC Card Adapter can be removed from the PC Card
  Reader and the Compact Flash Card and be removed from the Compact
  Flash Card PC Card Adapter.

  4.  Software Support

  4.1.  OpenDiS (Open Digita Services)

  What is needed: OpenDiS 0.0.3
  <http://ods.sourceforge.net/dl/opendis-0.0.3.tar.gz>

  4.1.1.  Compiling, extracting and installing OpenDiS

  Run the following commands to compile, extract and install OpenDiS


  tar -zxvf opendis-0.0.3.tar.gz
  cd opendis-0.0.3
  ./configure
  make
  make install



  4.1.2.  Usage

  The following usage section is taken directly from the output of the
  ks command.



  Usage: ks [OPTION]... [COMMAND]...
  Connect to camera and perform COMMANDs.
  Updated: 0.0.3

  Development note: currently some COMMANDs are supported; default
  action is to display this help.  However, all listed
  OPTIONS are now supported.

    -d DEV, --device=DEV       Look for camera at device DEV.  Defaults
                               to /dev/ttyS0.
    -r RATE, --rate=RATE       Use bit-rate RATE for serial device.  Defaults
                               to 9600.  Not applicable to USB or IrDA.
    -t TYPE, --type=TYPE       Specifies device type, one of: "serial"
                               "usb", or "irda".  Normally, device type
                               can be deduced from DEV and need not be
                               specified
    -i, --irda                 Same as --type=irda
    -s, --serial               Same as --type=serial
    -u, --usb                  Same as --type=usb

    -v  --verbose              More output.
    -q  --quiet                Less output.

    -l, --list                 List supported commands
    -h, --help                 Display this help and exit.
  Currently following commands are supported:
    delall        Delete all files in the camera
    download      Download pictures
    thumbs        Download thumbnails
    gettime       Get camera's date/time
    settime       Set camera clock according to computer's clock
    shoot         Take a picture
    status        Show pictures taken, available and raw count
    getpowermode  Checks if camera is on
    poweroff      Turn the camera off



  4.1.3.  Usage Examples

  USB:

  Special USB notes. The USB stack has been ever changing in the
  developmental kernels and as such works differently from time to time.
  In playing with the latest developmental kernel released the camera
  tends to show up on /dev/kodak00 or /dev/kodak01, independent of the
  fact that only one camera is connected.  The support for these devices
  is all fairly new, so expect to have to play with it to get it
  working. The following should allow one to download all images from
  the camera to the working directory with a USB connection. Make sure
  that the camera is in connect mode.


  ks -d /dev/kodak00 download



  Serial:

  Serial support does work and as such the following command should
  allow one to download all images from the camera into their current
  working directory.  Modify the serial port device name as necessary.


  ks -d /dev/ttyS0 download



  IrDA:

  Infrared support is not yet supported by OpenDiS. As such no example
  can be provided. The reason it is not supported yet is that the
  protocol differs from that of the USB/serial protocols. USB and Serial
  use very similar if not the same protocol for their functionality.

  4.2.  Digita Operating Environment- Command Device Protocol Python
  Script

  This Python script written by Sai Lai Lo of AT&T Cambridge
  Laboratories allows for download of images from Kodak Digital Cameras
  running DigitaOS and using USB for transfer. Some have problems with
  this script and some don't.  However it is nice to cover all bases.

  Here a working copy of the Command Device Protocol Python Script
  <http://mh.netpedia.net/HOWTO/kodak/v0.0.5/cdp.py> can be attained.
  The original Command Device Protocol Python Script
  <http://home.pacbell.net/david-b/digicam/dc290.txt> for which the one
  above is derived has to be edited to remove leading text to work.

  The script depends on /dev/kodak existing due to the way older kernels
  accessed the Kodak Digital Camera USB Device. A symbolic link must be
  created between the actual device the camera is on and /dev/kodak. If
  the camera is on /dev/kodak00 the symbolic link needed can be created
  with the following command:


  ln -s /dev/kodak00 /dev/kodak



  Be sure to substitute in the proper device name instead of kodak00 if
  the camera was not assigned kodak00. To list all files on the camera
  run the following command:


  python cdp.py



  To download a single image from the camera run the following command:


  python cdp.py 2:DC265_01/P0000748.JPG



  That command will download the image P0000748.JPG to the directory
  DC265_01 in the current directory. A quick and easy command to
  download all the images from the camera would be:


  for file in $(python cdp.py); do python cdp.py $file; done



  This is just a few of the many ways such a script can work. It is
  possible to use the above command in a larger shell script to automate
  downloading the images from the camera, converting the images to
  another format, resizing the images, creating a web page
  automatically, and many many others. The options are endless when it
  comes to scripts like this.

  4.3.  gPhoto

  5.  Additional Online Resources

  5.1.  Kodak Digital Camera Mailing Lists

  5.1.1.  Kodak Digita Camera

  Kodak Digita Camera Mailing List <http://www.egroups.com/group/kodak-
  digita-camera/>

  This list contains information about DigitaOS enabled Kodak Digital
  Cameras.  This includes the Kodak DC220, DC260, DC265 and DC290. This
  is the place to go for all of your questions regarding how to use your
  camera, Digita scripting questions and anything else that pertains to
  the DigitaOS enabled cameras.  To subscribe to the mailing list send a
  blank email to kodak-digita-camera-subscribe@egroups.com.  To
  unsubscribe from the list send a blank email to kodak-digita-camera-
  unsubscribe@egroups.com.  Alternately, go to
  http://www.egroups.com/register?method=displayregistrationform&url=/www
  and sign up for an account there. Once the account is created one will
  have the ability to search through the archive and post messages.

  5.1.2.  Kodak DC240/DC280

  Kodak DC240/DC280 Mailing list
  <http://www.egroups.com/group/kodak240-280>

  Owners of the Kodak DC240 and DC280 camera models can use this as
  their forum to discuss issues with other users of the same cameras.
  This is an open list and its contents can be searched through and
  viewed at the above URL.  To join the list send a blank email to
  kodak240-280-subscribe@egroups.com.  To unsubscribe send a blank email
  to kodak240-280-unsubscribe@egroups.com.

  5.1.3.  Kodak DC215

  Kodak DC215 Mailing List <http://www.egroups.com/group/kodakdc215/>

  Owners and people interesting in contacting other users of the Kodak
  DC215 digital camera can use this forum to ask and answer questions.
  This list is specifically oriented towards the Kodak DC215 camera.

  5.2.  Other Useful Mailing Lists

  5.2.1.  Linux-USB

  Linux-USB <http://lists.suse.com/archives/linux-usb/>

  The Linux-USB mailing list is a very active mailing list pertaining to
  all aspects of USB and Linux. Here one will find the most recent
  patches for the USB code in the Linux kernel. There is also good
  discussion on support of digital cameras from time to time. Overall a
  great list to peek at every week or so.

  To subscribe to this list send a blank email to linux-usb-
  subscribe@suse.com.  A confirmation email that must be replied to will
  then be sent back. Either send a reply to the email address in the
  reply-to: section of the email, or the address listed in the
  confirmation message itself. To unsubscribe from the list send a blank
  email to linux-usb-unsubscribe@suse.com. This action will then have to
  be confirmed with the same method used for confirming subscription to
  the mailing list. For a list of other useful commands send an email to
  linux-usb-info@suse.com.

  5.2.2.  Linux-kernel

  Linux-kernel <http://www.mail-archive.com/linux-
  kernel%40vger.rutgers.edu/>

  The linux-kernel mailing list is a very high traffic mailing list
  detailing all aspects of the Linux kernel. This list is only for those
  who wish to have more information than the Linux-USB list and the
  gPhoto-Kodak lists contain.  However, it covers much more of a broad
  spectrum of topics than Kodak digital camera support under Linux.

  Before posting or subscribing to the Linux-kernel mailing list is is
  highly suggested reading the Linux-kernel mailing list FAQ
  <http://www.tux.org/lkml/>. It could save much time and embarrassment.
  It also contains useful information on who certain individuals are in
  the Linux community in relation to their standing on the list.

  To subscribe to the list (remember, it is about 200 emails a day) send
  an email to majordomo@vger.rutgers.edu with "subscribe linux-kernel
  username@mailserver" in the body of the message where username is the
  email account to be used and mailserver is the name of the mail
  server. Remember to omit the quotation marks.

  An alternative to joining the list would be to get the list in digest
  format.  This is a better format to many as it is a few emails a day
  rather than several hundred. One drawback of this is that it is not as
  easy to discuss the issues with the mailing list as most mail clients
  don't know how to deal with the digest in its format besides dealing
  with it like plain text. To subscribe to the digest send an email to
  majordomo@vger.rutgers.edu with the line "subscribe linux-kernel-
  digest username@mailserver" in the body of the message. Where username
  is the email account username to be used and mailserver is the name of
  the mail server. Remember to omit the quotation marks.

  Unsubscribing from the mail list is as easy as subscribing. Just send
  an email to majordomo@vger.rutgers.edu with the line "unsubscribe
  linux-kernel" in the body of the message, or alternately "unsubscribe
  linux-kernel-digest" if subscribed to the digest. And again, remember
  to omit the quotation marks.

  Rather than subscribing to this list it would be highly suggested to
  search through the archive which is accessible via the URL listed
  above. Another alternative is the Kernel Traffic
  <http://kt.linuxcare.com/>site. It contains a good overview of the
  weeks kernel developmental works and discussions in a summary format.

  5.2.3.  gPhoto-Kodak

  gPhoto-Kodak <http://lists.styx.net/archives/public/gphoto-kodak/>

  This list contains much information regarding gPhoto and Kodak
  cameras.  It also contains much discussion on the OpenDiS
  <http://digitalux.netpedia.net/> project and their releases. The
  latest version of OpenDiS is usually announced on this mailing list
  and allows one to try out the new functions. Instructions and the form
  to join the mailing list are at the following URL:
  http://lists.styx.net/mailman/listinfo/gphoto-kodak.
  <http://lists.styx.net/mailman/listinfo/gphoto-kodak>


  5.3.  Useful Web Sites / Other Resources

  5.3.1.  Linux-USB Project

  Linux USB Project <http://www.linux-usb.org/>

  The Linux-USB Project's web page contains much information pertaining
  to Linux and USB in general. Although not all information is pertinent
  to this HOWTO, a large portion of it is. It contains links to the
  latest USB support, driver maintainers and device working status. Take
  a look here and in the Linux-USB mail archive if having a problem
  getting USB working. Chances are one of the later developmental
  kernels or the source on the CVS will solve the issue.


  5.3.2.  Linux USB for DC-2xx Cameras

  Linux USB for DC-2xx Cameras <http://home.pacbell.net/david-
  b/digicam/>

  This website is maintained by David Brownell, author of the Kodak
  DC-2xx kernel support. It contains some information not included in
  this HOWTO as of yet and holds the latest information regarding
  configuring USB support.  Look here for new developments in supporting
  the Kodak DC-2xx camera series.

  5.3.3.  OpenDiS (Open Digita Services)

  OpenDiS (Open Digita Services) <http://ods.sourceforge.net>

  The Open Digita Services web site is the main source of information on
  the support of cameras running Digita which include the Kodak DC-220,
  DC-260, DC-265, DC-290, the Minolta EX-1500 and the HP PhotoSmart
  C500.

  5.3.4.  gPhoto

  gPhoto <http://www.gphoto.org/>

  gPhoto is free software for digital cameras licensed under the GNU
  GPL.  It currently supports more than 90 camera models from various
  vendors. gPhoto has a command line and a GTK+ graphical interface.
  Many people swear by this program. Installation, configuration and
  usage information will be added.

  5.3.5.  Digital Photography Review

  Digital Photography Review <http://photo.askey.net/>

  Trying to decide which digital camera is best? Digital Photography
  Review is the most comprehensive website available for all anyone
  wants to know about digital cameras. This site is not limited to just
  the Kodak product line and offers great reviews of the newest and
  older digital cameras. Take a look through the online photo gallery
  with detailed information pertaining to the camera used and its
  setting for each and every photograph.

  6.  FAQ

  Q: Why aren't there any entries but this one in the FAQ?

  A: Because the HOWTO is currently is a non-public release state and
  thus there was no time for anyone to ask any questions! So email your
  questions off to David Burley <khemicals@stampede.org> and lets add to
  it.

  7.  TODO

  The following TODO list is nowhere near complete. It is simply a list
  of things meant to added in the future that others have suggested. If
  anyone has any suggestions for new entries into the HOWTO please email
  them to David Burley <mailto:khemicals@stampede.org>.


  1. Differences between different camera models.

  2. Interesting digital camera uses (aerial/under water photography
     among others).

  3. Additional support of more Kodak digital cameras (gPhoto support
     with those).

  4. Support for non-Kodak digital cameras (most likely not anytime in
     the near future. this is out of the scope of the current
     document.).

  5. Additional camera interfacing methods.

  6. Updating Firmware (current format for firmware is an Install Shield
     file....  useless under GNU/Linux).

  8.  Appendix

  This section is to provide valuable information which may not directly
  apply to the use of Kodak digital cameras under the GNU/Linux
  operating system.  It is meant to help those who need information in a
  binge on their digital camera and find this document. The scope of
  this section may change as the HOWTO matures.

  8.1.  Drivers and other utilities for alternate Operating Systems

  8.1.1.  DC265

  Drivers: Currently Kodak has not released any drivers online for the
  camera.  To support the camera under Windows 95/98/NT use either the
  included CD-ROM that came with the camera, or call Kodak to order a
  new CD-ROM.



  LDAP Linux HOWTO
  Luiz Ernesto Pinheiro Malere, malere@yahoo.com
  v1.01, 15 February 2000

  Information about installing, configuring, running and maintaining a
  LDAP (Lightweight Directory Access Protocol) Server on a Linux machine
  is presented on this document. There are also details about how to
  create LDAP databases, how to update and delete information on the
  database, how to implement roaming access and how to use Netscape
  Address Book. This document is mostly based on the University of
  Michigan LDAP information pages.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 What's LDAP ?
     1.2 What's a Directory Service ?
     1.3 How does LDAP work ?
     1.4 LDAP backends, objects and attributes
     1.5 New Versions of this Document
     1.6 Opinions and Sugestions
     1.7 Acknowledgments
     1.8 Copyright and Disclaimer

  2. Installing the LDAP Server

     2.1 Downloading the package
     2.2 Unpacking the server
     2.3 Configuring the software
     2.4 Building the server

  3. Configuring the LDAP Server

     3.1 Configuration File Format
     3.2 Global Options
     3.3 General Backend Options
     3.4 LDBM Backend-Specific Options
     3.5 Access Control Examples

  4. Running the LDAP Server

     4.1 Command Line Options
     4.2 Running slapd as a Stand Alone Daemon
     4.3 Running slapd from inetd

  5. Database Creation and Maintenance

     5.1 Creating a Database online
     5.2 Creating a Database offline
     5.3 More on the LDIF format
     5.4 The ldapsearch, ldapdelete and ldapmodify utilities

  6. Aditional Informations and Features

     6.1 Roaming Access
     6.2 Netscape Address Book
     6.3 LDAP Migration Tools
     6.4 Authentication using LDAP
     6.5 Graphical LDAP tools
     6.6 Killing the LDAP server
     6.7 Logs

  7. References

     7.1 URLs
     7.2 Books
     7.3 RFCs


  ______________________________________________________________________

  1.  Introduction

  The main purpose of this document is to setup and use a LDAP Directory
  Server on your Linux machine.You will learn how to install, configure,
  run and maintain the LDAP server. After you also learn how you can
  store, retrieve and update information on your Directory using the
  LDAP clients and utilities.  The daemon for the LDAP directory server
  is called slapd and it runs on many different UNIX platforms.
  There is another daemon that cares for replication between LDAP
  servers. It's called slurpd and for the moment you don't need to worry
  about it. In this document you run a slapd which provides directory
  service for your local domain only, without replication, so without
  slurpd.

  This is a simple configuration for the server, good for starting but
  easy to upgrade to another configuration later if you want.  The
  information presented on this document represents a nice
  initialization on using the LDAP protocol. Possibly after reading this
  document you would feel encouraged to expand the capabilities of your
  server and even write your own clients, using the already avaiable C,
  C++ and Java Development Kits.


  1.1.  What's LDAP ?

  LDAP is a client-server protocol for accessing a directory service.
  It was initially used as a front-end to X.500, but can also be used
  with stand-alone and other kinds of directory servers.


  1.2.  What's a Directory Service ?

  A directory is like a database, but tends to contain more descriptive,
  attribute-based information. The information in a directory is
  generally read much more often than it is written. As a consequence,
  directories don't usually implement the complicated transaction or
  roll-back schemes that regular databases use for doing high-volume
  complex updates. Directory updates are typically simple all-or-nothing
  changes, if they are allowed at all.

  Directories are tuned to give quick-response to high-volume lookup or
  search operations. They may have the ability to replicate information
  widely in order to increase availability and reliability, while
  reducing response time. When directory information is replicated,
  temporary inconsistencies between the replicas may be OK, as long as
  they get in sync eventually.

  There are many different ways to provide a directory service.
  Different methods allow different kinds of information to be stored in
  the directory, place different requirements on how that information
  can be referenced, queried and updated, how it is protected from
  unauthorized access, etc. Some directory services are local, providing
  service to a restricted context (e.g., the finger service on a single
  machine). Other services are global, providing service to a much
  broader context.


  1.3.  How does LDAP work ?

  LDAP directory service is based on a client-server model. One or more
  LDAP servers contain the data making up the LDAP directory tree or
  LDAP backend database. An LDAP client connects to an LDAP server and
  asks it a question. The server responds with the answer, or with a
  pointer to where the client can get more information (typically,
  another LDAP server). No matter which LDAP server a client connects
  to, it sees the same view of the directory; a name presented to one
  LDAP server references the same entry it would at another LDAP server.
  This is an important feature of a global directory service, like LDAP.


  1.4.  LDAP backends, objects and attributes

  Slapd comes with three different backend databases you can choose
  from. They are LDBM, a high-performance disk-based database; SHELL, a
  database interface to arbitrary UNIX commands or shell scripts; and
  PASSWD, a simple password file database.

  In this document I assume that you choose the LDBM database.

  The LDBM database works by assigning a compact four-byte unique
  identifier to each entry in the database. It uses this identifier to
  refer to entries in indexes. The database consists of one main index
  file, called id2entry, which maps from an entry's unique identifier
  (EID) to a text representation of the entry itself. Other index files
  are maintained as well.

  To import and export directory information between LDAP-based
  directory servers, or to describe a set of changes which are to be
  applied to a directory, the file format known as LDIF, for LDAP Data
  Interchange Format, is typically used. An LDIF file stores information
  in object-oriented hierarchies of entries. The LDAP software package
  you're going to get comes with an utility to convert LDIF files to the
  LDBM format

  A common LDIF file looks like this :



       dn: o=TUDelft, c=NL
       o: TUDelft
       objectclass: organization
       dn: cn=Luiz Malere, o=TUDelft, c=NL
       cn: Luiz Malere
       sn: Malere
       mail: malere@yahoo.com
       objectclass: person



  As you can see each entry is uniquely identified by a distinguished
  name, or DN. the DN consists of the name of the entry plus a path of
  names tracing the entry back to the top of the directory hierarchy.

  In LDAP, an object class defines the collection of attributes that can
  be used to define an entry. The LDAP standard provides these basic
  types of object classes:

  o  Groups in the directory, including unordered lists of individual
     objects or groups of objects.

  o  Locations, such as the country name and description.

  o  Organizations in the directory.

  o  People in the directory.

  An entry can belong to more than one object class. For example, the
  entry for a person is defined by the person object class, but may also
  be defined by attributes in the inetOrgPerson, groupOfNames, and
  organization objectclasses. The server's object class structure (its
  schema) determines the total list of required and allowed attributes
  for a particular entry.

  Directory data is represented as attribute-value pairs. Any specific
  piece of information is associated with a descriptive attribute.

  For instance, the commonName, or cn, attribute is used to store a
  person's name. A person named Jonas Salk can be represented in the
  directory as
       cn: Jonas Salk



  Each person entered in the directory is defined by the collection of
  attributes in the person object class. Other attributes used to define
  this entry could include:


       givenname: Jonas
       surname: Salk
       mail: jonass@airius.com



  Required attributes include the attributes that must be present in
  entries using the object class. All entries require the objectClass
  attribute, which lists the object classes to which an entry belongs.

  Allowed attributes include the attributes that may be present in
  entries using the object class. For example, in the person object
  class, the cn and sn attributes are required. The description,
  telephoneNumber, seeAlso, and userpassword attributes are allowed but
  are not required.

  Each attribute has a corresponding syntax definition. The syntax
  definition describes the type of information provided by the attribute
  :

  o  bin binary

  o  ces case exact string (case must match during comparisons)

  o  cis case ignore string (case is ignored during comparisons)

  o  tel telephone number string (like cis but blanks and dashes `- '
     are ignored during comparisons)

  o  dn distinguished name


  Go to the first paragraph of ``section 3'' to know where the
  objectclass and attribute definitions lay on your system.


  1.5.  New Versions of this Document

  This document may receive corrections and updates based on the
  feedback received by the readers. You should look at :

  http://dutedin.et.tudelft.nl/~malere/LDAP-Linux-HOWTO.html
  <http://dutedin.et.tudelft.nl/~malere/LDAP-Linux-HOWTO.html>

  for new versions of this HOWTO.


  1.6.  Opinions and Sugestions

  If you have any kind of doubt about some information avaiable on this
  document,please contact me on the following email address :

  malere@yahoo.com <mailto:malere@yahoo.com>


  If you have commentaries and/or sugestions, please let me know too !


  1.7.  Acknowledgments

  This Howto was result of an internship made by me on the TUDelft
  University - Netherlands. I would like to thank the persons that
  encouraged me to write this document : Rene van Leuken and Wim Tiwon.
  Thank you very much. They are also Linux fans, just like me.


  1.8.  Copyright and Disclaimer

  The LDAP Linux HOWTO is Copyrighted 1999 by Luiz Ernesto Pinheiro
  Malere. It can be distributed freely. It cannot be modified. If you
  have any kind of sugestion, please send me an email (I will update the
  document if the sugestion proceeds).

  If you want a translation, for example to Portuguese, you can send me
  an email about it too.

  No liability for the contents of this document can be accepted. I have
  no responsability about the consequences of following the steps
  provided in this document.

  If you have questions, please contact, the Linux HOWTO coordinator, at

  linux-howto@metalab.unc.edu <linux-howto@metalab.unc.edu>


  2.  Installing the LDAP Server

  Four steps are necessary to install the server : Download the package,
  Unpack the software, Configure the Makefiles and Build the server.


  2.1.  Downloading the package

  There are two free distributed LDAP servers : University of Michigan
  LDAP server and OpenLDAP server. There's also the Netscape Directory
  Server, which is free only under some conditions (educational
  institutions get it free, for example).The OpenLDAP server is based on
  the latest version of the University of Michigan Server and there are
  mailing lists and aditional documentation avaiable for it. This
  document supposes that you are using the OpenLDAP server.

  It's latest tar gziped version is avaiable on the following address :

  http://www.openldap.org <http://www.openldap.org>

  If you want to get the latest version of University of Michigan
  Server, go to this address :

  ftp://terminator.rs.itd.umich.edu/ldap
  <ftp://terminator.rs.itd.umich.edu/ldap>

  To write this document, I used the OpenLDAP latest stable version and
  OpenLDAP 1.2.8 on a Slackware Linux machine with kernel 2.2.6. On the
  OpenLDAP site you can find the latest development and stable versions
  of the OpenLDAP server. By the time this document was updated, the
  latest stable version was openldap-stable-990918.tgz, also available
  through the link openldap-stable.tgz. The latest development version
  was openldap-1_2_8.tgz.



  2.2.  Unpacking the server

  Now that you have the tar gziped package on your local machine you can
  unpack it.

  First copy the package to a desirable directory, for example
  /usr/local.

  Then use the following command :



       tar xvzf openldap-stable.tgz



  You can use this command too, as well :



       gunzip openldap-stable.tgz | tar xvf -



  2.3.  Configuring the software

  There are several options that you should like to customize so you can
  build the best software to your site.

  To configure the software you just need 2 steps :

  o  Edit the file ldapconfig.h.edit, located on the subdirectory
     include beneath the directory where you unpacked the software.

  o  Run the configure script (if you are a tough guy, you can also edit
     the Make-common file instead of running the configure script :^)

  In the file include/ldapconfig.h.edit you can set options like the
  location of the slapd and slurpd daemons. The file itself is well
  commented and it's default settings also reflect the most common
  administrator choices so, if you are in a hurry you can skip this
  step, and run directly:



       vi include/ldapconfig.h.edit



  The OpenLDAP server sources are distributed with a configuration
  script for setting options like instalation directories, compiler and
  linker flags. Type the following command on the directory where you
  unpacked the software :


       ./configure --help



  This will print all options that you can customize with the configure
  script before you build the software. Some usefull options are
  --prefix=pref , --exec-prefix=eprefix and --bindir=dir, for setting
  instalation directories. Normally if you run configure without
  options, it will auto-detect the appropriate settings and prepar to
  build things on the default common location. So just type :


       ./configure



  And watch the output to see if all went well


  2.4.  Building the server

  After configuring the software you can start building it. First build
  the dependencies, using the command :


       make depend



  After build the server, using the command :


       make



  If all goes well, the server will build as configured.  If not, return
  to the previous step to review the configuration settings. You should
  check the platform specific hints, they are located in the path
  doc/install/hints under the directory you unpacked the software.

  Now install the binaries and man pages.  You may need to be superuser
  to do this (depending on where you are installing things):


       su
       make install



  That's all, now you have the binary of the server and the binaries of
  several other utilities. Go to the ``next'' section to see how to con-
  figure the operation of your LDAP server.


  If before learning how to configure your LDAP server you would like to
  test the recently built binaries, the latest versions of the OpenLDAP
  server come with a test script. When this document was updated the
  test script was not 100% stable for all diagnostics that it performed.
  Anyway you can try to run it and, if anything goes wrong with the
  script you can just abort it hitting Ctrl-C. In my case before the
  script stopped working I could see some successfull messages about the
  results of the most common diagnostics. To run the test script, go to
  the subdirectory /test beneath the path where you unpacked the
  software and type :



  make



  3.  Configuring the LDAP Server

  Once the software has been installed and built, you are ready to
  configure it for use at your site. All slapd runtime configuration is
  accomplished through the slapd.conf file, installed in the prefix
  directory you specified in the configuration script or by default in
  /usr/local/etc/openldap.

  In this directory you will also find the files slapd.oc.conf and
  slapd.at.conf which are included on the slad.conf file (see include
  option on ``section 3.2'') and that hold respectively the
  objectclasses and attributes definitions for the LDAP database
  backend.  Next comes a description of the general format of the config
  file, followed by a detailed description of each config file option.


  3.1.  Configuration File Format

  The slapd.conf file consists of a series of global configuration
  options that apply to slapd as a whole (including all database
  backends), followed by zero or more database backend definitions that
  contain information specific to a backend instance.

  Global options can be overridden in a backend (for options that appear
  more than once, the last appearance in the slapd.conf file is used).
  Blank lines and comment lines beginning with a ``#'' character are
  ignored. If a line begins with white space, it is considered a
  continuation of the previous line. The general format of slapd.conf is
  as follows:


            # comment - these options apply to every database
            <global config options>
            # first database definition & config options
            database <backend 1 type>
            <config options specific to backend 1>
            # second database definition & config options
            database <backend 2 type>
            <config options specific to backend 2>
            # subsequent database definitions & config options
            ...



  Configuration line arguments are separated by white space. If an
  argument contains white space, the argument should be enclosed in
  double quotes "like this". If an argument contains a double quote or a
  backslash character `\', the character should be preceded by a
  backslash character `\', (e.g. `\\d')..

  The distribution contains an example configuration file that will be
  installed in the configuration prefix directory. Also provided are
  slapd.at.conf, which contains many commonly used attribute
  definitions, and slapd.oc.conf, which contains many commonly used
  object class definitions.



  3.2.  Global Options

  Options described in this section apply to all backends, unless
  specifically overridden in a backend definition. Option arguments that
  should be replaced by actual text are shown in brackets <>.

  access to <what> [ by <who> <accesslevel> ]+


       This option grants access (specified by <accesslevel>) to a set of entries and/or attributes (specified by
       <what>) by one or more requesters (specified by <who>). See the Access Control Examples for more details.



  attribute <name> [<name2>] { bin | ces | cis | tel | dn }


       This option associates a syntax with an attribute name. By default, an attribute is assumed to have
       syntax cis. An optional alternate name can be given for an attribute. The possible syntaxes and their
       meanings are :

       bin : binary
       ces : case exact string (case must match during comparisons)
       cis : case ignore string (case is ignored during comparisons)
       tel : telephone number string (like cis but blanks and dashes `-' are ignored during comparisons)
       dn : distinguished name



  defaultaccess { none | compare | search | read | write }


       This option specifies the default access to grant requesters not matched by any other access line (take a look on
       Access Control examples down). Note that an access level implies all lesser access levels (e.g., write access
       implies read, search and compare).
       Default:
       defaultaccess read



  include <filename>


       This option specifies that slapd should read additional configuration information from the given file before
       continuing with the next line of the current file. The included file should follow the normal slapd config file
       format. You can use this option to include the files that contain the objectclass and attribute definitions of
       your backend database. The LDAP software package comes with the files slapd.oc.conf and slapd.at.conf

       Note: You should be careful when using this option - there is no small limit on the number of nested include
       options, and no loop detection is done.



  loglevel <integer>



  This option specifies the level at which debugging statements and operation statistics should be syslogged
  (currently logged to the syslogd(8) LOCAL4 facility). You must have
  compiled slapd with - DLDAP_DEBUG for this to work (except for the two stats levels, which are always enabled).
  Log levels are additive. To display what numbers correspond to what kind of debugging, invoke slapd with
  the - ? flag or consult the table below. The possible values for <integer> are:

  1 trace function calls
  2 debug packet handling
  4 heavy trace debugging
  8 connection management
  16 print out packets sent and received
  32 search filter processing
  64 configuration file processing
  128 access control list processing
  256 stats log connections/operations/results
  512 stats log entries sent
  1024 print communication with shell backends
  2048 print entry parsing debugging

  Example:
  loglevel 255
  This will cause lots and lots of debugging information to be syslogged.
  Default:
  loglevel 256



  objectclass <name> [ requires <attrs> ] [ allows <attrs> ]


       This option defines the schema rules for the given object class. Used in conjunction with the schemacheck
        option.



  referral <url>


       This option specifies the referral to pass back when slapd cannot find a local database to handle a request.
       Example:
       referral ldap://ldap.itd.umich.edu
       This will refer non-local queries to the LDAP server at the University of Michigan. Smart LDAP clients can
       re-ask their query at that server, but note that most of these clients are only going to know how to handle
       simple LDAP URLs that contain a host part and optionally a distinguished name part.



  schemacheck { on | off }


       This option turns schema checking on or off. If schema checking is on, entries added or modified will be
       checked to ensure they obey the schema rules implied by their object class(es) as defined by the corresponding
       objectclass option(s). If schema checking is off this check is not done.
       Default:
       schemacheck off



  sizelimit <integer>



  This option specifies the maximum number of entries to return from a search operation.
  Default:
  sizelimit 500



  srvtab <filename>


       This option specifies the srvtab file in which slapd can find the kerberos keys necessary for authenticating
       clients using kerberos. This option is only meaningful if you are using kerberos authentication, which must
       be enabled at compile time by including the appropriate definitions in the Make-common file.
       Default:
       srvtab /etc/srvtab



  timelimit <integer>


       This option specifies the maximum number of seconds (in real time) slapd will spend answering a search request.
       If a request is not finished in this time, a result indicating an exceeded timelimit will be returned.
       Default:
       timelimit 3600



  3.3.  General Backend Options

  Options in this section only apply to the backend in which they are
  defined. They are supported by every type of backend.

  database <databasetype>


       This option marks the beginning of a new database instance definition. <databasetype> should be one of
       ldbm, shell, or passwd, depending on which backend will serve the database.
       Example:
       database ldbm
       This marks the beginning of a new LDBM backend database instance definition.



  lastmod { on | off }


       This option controls whether slapd will automatically maintain the modifiersName, modifyTimestamp, creatorsName,
       and createTimestamp attributes for entries.
       Default:
       lastmod off



  readonly { on | off }



  This option puts the database into "read-only" mode. Any attempts to modify the database will return an
  "unwilling to perform" error.
  Default:
  readonly off



  replica host=<hostname>[:<port>] "binddn=<DN>" bindmethod={ simple |
  kerberos } [credentials=<password>] [srvtab=<filename>]


       This option specifies a replication site for this database. The host= parameter specifies a host and
       optionally a port where the slave slapd instance can be found. Either a domain name or IP address may be
       used for <hostname>. If <port> is not given, the standard LDAP port number (389) is used.
       The binddn parameter gives the DN to bind as for updates to the slave slapd. It should be a DN which has
       read/write access to the slave slapd's database, typically given as a "rootdn" in the slave's config file.
       It must also match the updatedn option in the slave slapd's config file. Since DNs are likely to contain
       embedded spaces, the entire "binddn=<DN>" string should be enclosed in quotes.
       bindmethod is either simple or kerberos, depending on whether simple password-based authentication or kerberos
       authentication is to be used when connecting to the slave slapd. Simple authentication requires a valid password
       be given. Kerberos authentication requires a valid srvtab file.
       The credentials= parameter, which is only required if using simple authentication, gives the password for
       binddn on the slave slapd.
       The srvtab= parameter, which is only required if using kerberos, specifies the filename which holds the kerberos
       key for the slave slapd. If omitted, /etc/srvtab is used.



  replogfile <filename>


       This option specifies the name of the replication log file to which slapd will log changes. The replication log
       is typically written by slapd and read by slurpd. Normally, this option is only used if slurpd is being used
       to replicate the database. However, you can also use it to generate a transaction log, if slurpd is not running.
       In this case, you will need to periodically truncate the file, since it will grow indefinitely otherwise.



  rootdn <dn>


       This option specifies the DN of an entry that is not subject to access control or administrative limit restrictions
       for operations on this database.
       Example:
       rootdn "cn=Manager, o=U of M, c=US"



  rootkrbname <kerberosname>


       This option specifies a kerberos name for the DN given above that will always work, regardless of whether an
       entry with the given DN exists or has a krbName attribute. This option is usefull when creating a database and
       also when using slurpd to provide replication service.
       Example:
       rootkrbname admin@umich.edu



  rootpw <password>


       This option specifies a password for the DN given above that will always work, regardless of whether an entry
       with the given DN exists or has a password. This option is usefull when creating a database and also when using
       slurpd to provide replication service. Avoid having cleartext password on this option. At least provide an
       crypto (you can use an entry of Unix /etc/passwd file) password. Slapd supports other types of encryption
       methods too.
       Example:
       rootpw secret
       rootpw {crypto}encrypted_password_here



  suffix <dn suffix>


       This option specifies the DN suffix of queries that will be passed to this backend database. Multiple suffix
       lines can be given, and at least one is required for each database definition.
       Example:
       suffix "o=University of Michigan, c=US"
       Queries with a DN ending in "o=University of Michigan, c=US" will be passed to this backend.
       Note: when the backend to pass a query to is selected, slapd looks at the suffix line(s) in each database
       definition in the order they appear in the file. Thus, if one database suffix is a prefix of another, it
       must appear after it in the config file.



  updatedn <dn>


       This option is only applicable in a slave slapd. It specifies the DN allowed to make changes to the replica
       (typically, this is the DN slurpd binds as when making changes to the replica).



  3.4.  LDBM Backend-Specific Options

  Options in this category only apply to the LDBM backend database. That
  is, they must follow a "database ldbm" line and come before any other
  "database" line.

  cachesize <integer>


       This option specifies the size in entries of the in-memory cache maintained by the LDBM backend database
       instance.
       Default:
       cachesize 1000



  dbcachesize <integer>


       This option specifies the size in bytes of the in-memory cache associated with each open index file. If not
       supported by the underlying database method, this option is ignored without comment. Increasing this number
       uses more memory but can cause a dramatic performance increase, especially during modifies or when building
       indexes.
       Default:
       dbcachesize 100000

  directory <directory>


       This option specifies the directory where the LDBM files containing the database and associated indexes live.
       Default:
       directory /usr/tmp



  index {<attrlist> | default} [pres,eq,approx,sub,none]


       This option specifies the indexes to maintain for the given attribute. If only an <attrlist> is given,
       all possible indexes are maintained.
       Example:
       index cn
       index sn,uid eq,sub,approx
       index default none

       This example causes all indexes to be maintained for the cn attribute; equality, substring, and approximate
       indexes for the sn and uid attributes; and no indexes for all other attributes.



  mode <integer>


       This option specifies the file protection mode that newly created database index files should have.
       Default:
       mode 0600



  3.5.  Access Control Examples

  The access control facility presented on ``section 3.2'' is quite
  powerful. This section shows some examples of its use. First, some
  simple examples:


       access to * by * read



  This access directive grants read access to everyone. If it appears
  alone it is the same as the following defaultaccess line.


       defaultaccess read



  The following example shows the use of a regular expression to select
  the entries by DN in two access directives where ordering is
  significant.



  access to dn=".*, o=U of M, c=US"
  by * search
  access to dn=".*, c=US"
  by * read



  Read access is granted to entries under the c=US subtree, except for
  those entries under the "o=University of Michigan, c=US" subtree, to
  which search access is granted. If the order of these access
  directives was reversed, the U-M-specific directive would never be
  matched, since all U-M entries are also c=US entries.

  The next example again shows the importance of ordering, both of the
  access directives and the "by" clauses. It also shows the use of an
  attribute selector to grant access to a specific attribute and various
  <who> selectors.


       access to dn=".*, o=U of M, c=US" attr=homePhone
       by self write
       by dn=".*, o=U of M, c=US" search
       by domain=.*\.umich\.edu read
       by * compare
       access to dn=".*, o=U of M, c=US"
       by self write
       by dn=".*, o=U of M, c=US" search
       by * none



  This example applies to entries in the "o=U of M, c=US" subtree. To
  all attributes except homePhone, the entry itself can write them,
  other U-M entries can search by them, anybody else has no access. The
  homePhone attribute is writable by the entry, searchable by other U-M
  entries, readable by clients connecting from somewhere in the
  umich.edu domain, and comparable by everybody else.

  Sometimes it is usefull to permit a particular DN to add or remove
  itself from an attribute. For example, if you would like to create a
  group and allow people too add and remove only their own DN from the
  member attribute, you could accomplish it with an access directive
  like this:


       access to attr=member,entry
       by dnattr=member selfwrite



  The dnattr <who> selector says that the access applies to entries
  listed in the member attribute. The selfwrite access selector says
  that such members can only add or delete their own DN from the
  attribute, not other values. The addition of the entry attribute is
  required because access to the entry is required to access any of the
  entry's attributes.

  Note that the attr=member construct in the <what> clause is a
  shorthand for the clause "dn=* attr=member" (i.e., it matches the
  member attribute in all entries).



  4.  Running the LDAP Server

  Slapd can be run in two different modes, stand-alone or from inetd(8).
  Stand-alone operation is recommended, especially if you are using the
  LDBM backend. This allows the backend to take advantage of caching and
  avoids concurrency problems with the LDBM index files. If you are
  running only a PASSWD or SHELL backend, running from inetd is an
  option.


  4.1.  Command Line Options

  Slapd supports the following command-line options.

  -d <level> | ?


       This option sets the slapd debug level to <level>. When level is a `?' character, the various debugging
       levels are printed and slapd exits, regardless of any other options you give it. Current debugging levels are

       1 trace function calls
       2 debug packet handling
       4 heavy trace debugging
       8 connection management
       16 print out packets sent and received
       32 search filter processing
       64 configuration file processing
       128 access control list processing
       256 stats log connections/operations/results
       512 stats log entries sent
       1024 print communication with shell backends
       2048 print entry parsing debugging
       65535 enable all debugging

       Debugging levels are additive. That is, if you want to trace function calls and watch the config file being
       processed, you would set level to the sum of those two levels (in this case, 65). Consult the <ldap.h> file
       for more details.
       Note that slapd must have been compiled with -DLDAP_DEBUG defined for any debugging information beyond the
       two stats levels to be available.



  -f <filename>


       This option specifies an alternate configuration file for slapd.



  -i


       This option tells slapd that it is running from inetd instead of as a stand-alone server. On the following section
       about running slapd from inetd you will find more details.



  -p <port>


       This option specifies an alternate TCP port on which slapd should listen for connections. The default port
       is 389.

  4.2.  Running slapd as a Stand Alone Daemon

  In general, slapd is run like this:

  $(ETCDIR)/slapd [<option>]*

  where ETCDIR has the value you gave in the Make-common file or
  configure script during the pre-build configuration, and <option> is
  one of the options described above.  Unless you have specified a
  debugging level, slapd will automatically fork and detach itself from
  its controlling terminal and run in the background. Any of the options
  given above can be given to slapd to point it at a different
  configuration file, listen on another port, etc.

  See this example of starting slapd :

  $(ETCDIR)/slapd -f /home/malere/myslapd.conf -d 255


  4.3.  Running slapd from inetd

  First, make sure that running from inetd(8) is a good idea. If you are
  using the LDBM backend, it is not. If you are in a high-volume
  environment, the overhead of running from inetd also makes it a bad
  idea. Otherwise, you may proceed with the two steps necessary.

  Step 1 is to add a line like this to your /etc/services file:


       ldap 389 # ldap directory service



  Step 2 is to add a line like this to your /etc/inetd.conf file:


       ldap stream tcp nowait nobody $(ETCDIR)/slapd slapd -i



  where ETCDIR has the value you gave it in the Make-common file or
  configure script during pre-build configuration. Finally, send inetd a
  HUP signal, and you should be all set.


  5.  Database Creation and Maintenance

  This section tells you how to create a slapd database from scratch.
  There are two ways to create a database. First, you can create the
  database on-line using LDAP. With this method, you simply start up
  slapd and add entries using the LDAP client of your choice. This
  method is fine for relatively small databases (a few hundred or
  thousand entries, depending on your requirements).

  The second method of database creation is to do it off-line, using the
  index generation tools. This method is best if you have many thousands
  of entries to create, which would take an unacceptably long time using
  the LDAP method, or if you want to ensure the database is not accessed
  while it is being created.



  5.1.  Creating a Database online

  The OpenLDAP software package comes with an utility called ldapadd,
  used to add entries while the LDAP server is running. If you choose to
  create the Database online, you can use the ldapadd tool to add
  entries. After adding the first entries, you can still use ldapadd to
  add more entries. You should be sure to set the following
  configuration options on your sladp.conf file before starting slapd:

  suffix <dn>

  As described in the ``section 3'', this option says what entries are
  to be held by this database. You should set this to the DN of the root
  of the subtree you are trying to create. For example :

  suffix "o=TUDelft, c=NL"

  You should be sure to specify a directory where the index files should
  be created:

  directory <directory>

  For example:

  directory /usr/local/tudelft

  You need to make it so you can connect to slapd as somebody with
  permission to add entries. This is done through the following two
  options in the database definition:

  rootdn <dn>

  rootpw <passwd>   /* Remember to use crypto password here !!! */

  These options specify a DN and password that can be used to
  authenticate as the "superuser" entry of the database (i.e., the entry
  allowed to do anything). The DN and password specified here will
  always work, regardless of whether the entry named actually exists or
  has the password given. This solves the chicken-and-egg problem of how
  to authenticate and add entries before any entries yet exist.

  Finally, you should make sure that the database definition contains
  the index definitions you want:

  index {<attrlist> | default} [pres,eq,approx,sub,none]

  For example, to index the cn, sn, uid and objectclass attributes the
  following index configuration lines could be used.

  index cn,sn,uid

  index objectclass pres,eq

  index default none

  Once you have configured things to your liking, start up slapd,
  connect with your LDAP client, and start adding entries. For example,
  to add a the TUDelft entry followed by a Postmaster entry using the
  ldapadd tool, you could create a file called /tmp/newentry with the
  contents:



  o=TUDelft, c=NL
  objectClass=organization
  description=Technical University of Delft Netherlands

  cn=Postmaster, o=TUDelft, c=NL
  objectClass=organizationalRole
  cn=Postmaster
  description= TUDelft postmaster - postmaster@tudelft.nl



  and then use a command like this to actually create the entry:


       ldapadd -f /tmp/newentry -D "cn=Manager, o=TUDelft, c=NL" -w secret



  The above command assumes that you have set rootdn to "cn=Manager,
  o=TUDelft, c=NL" and rootpw to "secret".  If you don't want to type
  the password on the command line, use the -W option for the ldapadd
  command instead of -w "password". You will be prompted to enter the
  password :


       ldapadd -f /tmp/newentry -D "cn=Manager, o=TUDelft, c=NL" -W
       Enter LDAP Password :



  5.2.  Creating a Database offline

  The second method of database creation is to do it off-line, using the
  index generation tools described below. This method is best if you
  have many thousands of entries to create, which would take an
  unacceptably long time using the LDAP method described above. These
  tools read the slapd configuration file and an input LDIF file
  containing a text representation of the entries to add.  They produce
  the LDBM index files directly. There are several important
  configuration options you will want to be sure and set in the config
  file database definition first:

  suffix <dn>

  As described in the preceding section, this option says what entries
  are to be held by this database. You should set this to the DN of the
  root of the subtree you are trying to create. For example :

  suffix "o=TUDelft, c=NL"

  You should be sure to specify a directory where the index files should
  be created:

  directory <directory>

  For example:

  directory /usr/local/tudelft

  Next, you probably want to increase the size of the in-core cache used
  by each open index file. For best performance during index creation,
  the entire index should fit in memory.  If your data is too big for
  this, or your memory too small, you can still make it pretty big and
  let the paging system do the work. This size is set with the following
  option:

  dbcachesize <integer>

  For example:

  dbcachesize 50000000

  This would create a cache 50 MB big, which is pretty big (at
  University of Michigan, the database has about 125K entries, and the
  biggest index file is about 45 MB). Experiment with this number a bit,
  and the degree of parallelism (explained below), to see what works
  best for your system. Remember to turn this number back down once your
  index files are created and before you run slapd.

  Finally, you need to specify which indexes you want to build. This is
  done by one or more index options.

  index {<attrlist> | default} [pres,eq,approx,sub,none]

  For example:

  index cn,sn,uid pres,eq,approx

  index default none

  This would create presence, equality and approximate indexes for the
  cn, sn, and uid attributes, and no indexes for any other attributes.
  See the configuration file on ``section 3'' for more information on
  this option.

  Once you've configured things to your liking, you create the indexes
  by running the ldif2ldbm program:

  ldif2ldbm -i <inputfile> -f <slapdconfigfile> [-d <debuglevel>] [-j
  <integer>] [-n <databasenumber>] [-e <etcdir>]

  The arguments have the following meanings:

  -i <inputfile>

  Specifies the LDIF input file containing the entries to add in text
  form.

  -f <slapdconfigfile>

  Specifies the slapd configuration file that tells where to create the
  indexes, what indexes to create, etc.

  -d <debuglevel>

  Turn on debugging, as specified by <debuglevel>. The debug levels are
  the same as for slapd (see ``section 4.1'').

  -j <integer>

  An optional argument that specifies that at most <integer> processes
  should be started in parallel when building the indexes. The default
  is 1. If set to a value greater than one, ldif2ldbm will create at
  most that many subprocesses at a time when building the indexes. A
  separate subprocess is created to build each attribute index. Running
  these processes in parallel can speed things up greatly, but beware of
  creating too many processes, all competing for memory and disk
  resources.
  -n <databasenumber>

  An optional argument that specifies the configuration file database
  for which to build indices. The first database listed is "1", the
  second "2", etc. By default, the first ldbm database in the
  configuration file is used.

  -e <etcdir>

  An optional argument that specifies the directory where ldif2ldbm can
  find the other database conversion tools it needs to execute
  (ldif2index and friends). The default is the installation directory
  set on the configure script. Look an example of using the ldif2ldbm
  command :

  /usr/local/sbin/ldif2ldbm -i new_entries -f myslapd.conf


  5.3.  More on the LDIF format

  The LDAP Data Interchange Format (LDIF) is used to represent LDAP
  entries in a simple text format. The basic form of an entry is:


       [<id>]
       dn: <distinguished name>
       <attrtype>: <attrvalue>
       <attrtype>: <attrvalue>
       ...



  where <id> is the optional entry ID (a positive decimal number).
  Normally, you would not supply the <id>, allowing the database
  creation tools to do that for you. The ldbmcat program, however,
  produces an LDIF format that includes <id> so that new indexes created
  will be consistent.

  A line may be continued by starting the next line with a single space
  or tab character. e.g.,


       dn: cn=Barbara J Jensen, o=University of Michigan, c=US



  Multiple attribute values are specified on separate lines. e.g.,


       cn: Barbara J Jensen
       cn: Babs Jensen



  If an <attrvalue> contains a non-printing character, or begins with a
  space or a colon `:', the <attrtype> is followed by a double colon and
  the value is encoded in base 64 notation. e.g., the value " begins
  with a space" would be encoded like this:


       cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=


  Multiple entries within the same LDIF file are separated by blank
  lines. Here's an example of an LDIF file containing three entries.


       dn: cn=Barbara J Jensen, o=University of Michigan, c=US
       cn: Barbara J Jensen
       cn: Babs Jensen
       objectclass: person
       sn: Jensen

       dn: cn=Bjorn J Jensen, o=University of Michigan, c=US
       cn: Bjorn J Jensen
       cn: Bjorn Jensen
       objectclass: person
       sn: Jensen

       dn: cn=Jennifer J Jensen, o=University of Michigan, c=US
       cn: Jennifer J Jensen
       cn: Jennifer Jensen
       objectclass: person
       sn: Jensen
       jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
       A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
       ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
       ...



  Notice that the jpegPhoto in Jennifer Jensen's entry is encoded using
  base 64. The ldif program that comes with the OpenLDAP package can be
  used to produce the LDIF format.

  NOTE: Trailing spaces are not trimmed from values in an LDIF file. Nor
  are multiple internal spaces compressed. If you don't want them in
  your data, don't put them there.


  5.4.  The ldapsearch, ldapdelete and ldapmodify utilities

  ldapsearch - ldapsearch is a shell accessible interface to the
  ldap_search(3) library call. Use this utility to search for entries on
  our LDAP databse backend.

  The synopsis to call ldapsearch is the following (take a look at the
  ldapsearch man page to see what each option mean) :


       ldapsearch  [-n]  [-u]  [-v]  [-k]  [-K]  [-t]  [-A] [-B] [-L] [-R] [-d debuglevel] [-F sep] [-f file]
       [-D binddn]  [-W]  [-w bindpasswd]  [-h ldaphost]  [-p ldapport]   [-b searchbase]   [-s base|one|sub]
       [-a never|always|search|find] [-l timelimit] [-z sizelimit] filter [attrs...]



  ldapsearch opens a connection to an LDAP server, binds, and performs a
  search using the filter filter. The filter should conform to the
  string representation for LDAP filters as defined in RFC 1558. If
  ldapsearch finds one or more entries, the attributes specified by
  attrs are retrieved and the entries and values are printed to standard
  output. If no attrs are listed, all attributes are returned.

  Here are some examples of use of ldapsearch :



  ldapsearch -b 'o=TUDelft,c=NL' 'objectclass=*'

  ldapsearch -b 'o=TUDelft,c=NL' 'cn=Rene van Leuken'

  ldasearch -u -b 'o=TUDelft,c=NL' 'cn=Luiz Malere' sn mail



  The -b option stands for searchbase (initial search point) and the -u
  option stands for userfriendly output information.

  ldapdelete - ldapdelete is a shell accessible interface to the
  ldap_delete(3) library call. Use this utility to delete entries on our
  LDAP databse backend.

  The synopsis to call ldapdelete is the following (take a look at the
  ldapdelete man page to see what each option mean) :


       ldapdelete   [-n]   [-v]  [-k]  [-K]  [-c]  [-d debuglevel]  [-f file]  [-D binddn]  [-W]  [-w passwd]
       [-h ldaphost] [-p ldapport] [dn]...



  ldapdelete opens a connection to an LDAP server, binds, and deletes
  one or more entries. If one or more dn arguments are provided, entries
  with those Distinguished Names are deleted. Each dn should be a
  string-represented DN as defined in RFC 1779. If no dn arguments are
  provided, a list of DNs is read from standard input (or from file if
  the -f flag is used).

  Here are some examples of use of ldapdelete :


       ldapdelete 'cn=Luiz Malere,o=TUDelft,c=NL'

       ldapdelete -v 'cn=Rene van Leuken,o=TUDelft,c=NL' -D 'cn=Luiz Malere,o=TUDelft,c=NL' -W



  The -v option stands for verbose mode, the -D option stands for Binddn
  (the dn to authenticate against) and the -W option stands for password
  prompt.

  ldapmodify - ldapmodify is a shell accessible interface to the
  ldap_modify(3) and ldap_add(3) library calls. Use this utility to
  modify entries on our LDAP databse backend.

  The synopsis to call ldapmodify is the following (take a look at the
  ldapmodify man page to see what each option mean) :


       ldapmodify   [-a]  [-b]  [-c]  [-r]  [-n]  [-v]  [-k]  [-d debuglevel]  [-D binddn]  [-W]  [-w passwd]
       [-h ldaphost] [-p ldapport] [-f file]

       ldapadd [-b] [-c] [-r] [-n] [-v]  [-k]  [-K]  [-d debuglevel]  [-D binddn]  [-w passwd]  [-h ldaphost]
       [-p ldapport] [-f file]



  ldapadd is implemented as a hard link to the ldapmodify tool.  When
  invoked as ldapadd the -a  (add  new entry) flag of ldapmodify is
  turned on automatically.  ldapmodify  opens  a  connection  to  an
  LDAP server, binds, and modifies or adds entries.  The entry
  information is read from standard input or from file through the use
  of the -f option.

  Here are some examples of use of ldapmodify :

  Assuming that the file /tmp/entrymods exists and has the contents:


       dn: cn=Modify Me, o=University of Michigan, c=US
       changetype: modify
       replace: mail
       mail: modme@terminator.rs.itd.umich.edu
       -
       add: title
       title: Grand Poobah
       -
       add: jpegPhoto
       jpegPhoto: /tmp/modme.jpeg
       -
       delete: description
       -



  The command:


       ldapmodify -b -r -f /tmp/entrymods



  will  replace  the  contents  of the "Modify Me" entry's mail
  attribute with the value "modme@terminator.rs.itd.umich.edu", add a
  title of "Grand Poobah", and the contents of the file /tmp/modme.jpeg
  as a jpegPhoto, and completely remove the description attribute.

  The same modifications as above can be performed using the older
  ldapmodify input format:


       cn=Modify Me, o=University of Michigan, c=US
       mail=modme@terminator.rs.itd.umich.edu
       +title=Grand Poobah
       +jpegPhoto=/tmp/modme.jpeg
       -description



  And plus the command bellow:


       ldapmodify -b -r -f /tmp/entrymods



  Assuming that the file /tmp/newentry exists and has the contents:



  dn: cn=Barbara Jensen, o=University of Michigan, c=US
  objectClass: person
  cn: Barbara Jensen
  cn: Babs Jensen
  sn: Jensen
  title: the world's most famous manager
  mail: bjensen@terminator.rs.itd.umich.edu
  uid: bjensen



  The command:


       ldapadd -f /tmp/entrymods



  Assuming that the file /tmp/newentry exists and has the contents:


       dn: cn=Barbara Jensen, o=University of Michigan, c=US
       changetype: delete



  The command:


       ldapmodify -f /tmp/entrymods



  will remove Babs Jensen's entry.

  The -f option stands for file (read the modification information from
  a file instead of standard input), the -b option stands for binary
  (any values starting with a '/' on the input file are interpreted as
  binaries), the -r stands for replace (replace existing values by
  default).


  6.  Aditional Informations and Features

  On this section you will find information about the Netscape Address
  Book, a LDAP client that can be used to query your Directory. Also is
  presented details on how to implement Roaming Access using the
  Netscape Navigator, version 4.5 or above and your LDAP server. There
  have been a lot of talk on the OpenLDAP mailing lists about the
  Roaming Access, since this is a feature that is not totally
  implemented. Most part of the people don't like the way Netscape
  Navigator operates with the LDAP server while making downloads and
  uploads to it. So, if after reading this you find that the Roaming
  Access is not working the way you would like, nevermind, a lot of
  people passed through this situation already. The purpose of
  introducing this feature here is more for giving people an idea about
  the capabilities of the LDAP protocol. To finish you will see some
  information about killing safely the slapd process and about slapd
  logs.



  6.1.  Roaming Access

  The goal of Roaming Access is that wherever you are on the Net, you
  can retrieve your bookmarks, preferences, mail filters, etc. using a
  Netscape Navigator and a LDAP server.  This is a very nice feature,
  imagine that wherever you access the Web, you can have your own
  settings on the browser. If you will travell and you need to access
  that currency site that is stored on your local bookmarks, don't
  worry, upload the bookmarks and other configuration files to a LDAP
  server and you can retrieve them all later independent of the place
  you will be.

  To implement the Roaming Access you have to follow these steps :

  o  Change your attributes description file

  o  Change your objectclass description file

  o  Change the LDIF file to include profiles

  o  Configure Netscape Navigator to use the LDAP server as a Roaming
     Access Server

  o  Restart the LDAP server with the new settings.

  - Changing the attributes file : You need to add new attributes on the
  attribute list present on the file slapd.at.conf (this is a file you
  include on your slapd.conf and it's normally located at
  /usr/local/etc/openldap) :


       attribute       nsLIPtrURL              ces
       attribute       nsLIPrefs               ces
       attribute       nsLIProfileName         cis
       attribute       nsLIData                bin
       attribute       nsLIElementType         cis
       attribute       nsLIServerType          cis
       attribute       nsLIVersion             cis



  - Changing the objectclass file : You also have to add some new
  classes to your slapd.oc.conf (this is another file you include on
  your slapd.conf and it's normally located at /usr/local/etc/openldap)
  in order to enable the roaming access :



  objectclass nsLIPtr
  requires
          objectclass
  allows
          nsliptrurl,
          owner

  objectclass nsLIProfile
  requires
          objectclass,
          nsliprofilename
  allows
          nsliprefs,
          uid,
          owner

  objectclass nsLIProfileElement
  requires
          objectclass,
          nslielementtype
  allows
          owner,
          nslidata,
          nsliversion

  objectclass nsLIServer
  requires
          objectclass,
          serverhostname
  allows
          description,
          cn,
          nsserverport,
          nsliservertype,
          serverroot



  - Changing the LDIF file : Now you have to modify your LDIF file,
  adding profiles entries to each user that wish to try the Roaming
  Access feature of Netscape. Look an example of a simple LDIF file with
  profiles entries :


       dn: o=myOrg,c=NL
       o: myOrg
       objectclass: organization

       dn: cn=seallers,ou=People,o=myOrg,c=NL
       cn: seallers
       userpassword: myPassword
       objectclass: top
       objectclass: person

       dn: nsLIProfileName=seallers,ou=Roaming,o=myOrg,c=NL
       changetype: add
       objectclass: top
       owner: cn=seallers,ou=People,o=myOrg,c=NL
       objectclass: top
       objectclass: nsLIProfile



  The next step is to configure Netscape to enable the Roaming Access
  against your LDAP server. Just follow the sequence :

  - Go to Menu Edit -> Preferences -> Roaming User

  Now you have to first Enable the Roaming Access for this profile,
  clicking on the checkbox correspondent to this option.

  - Fill the username box with an appropiate value, for instance john

  Pull down the arrow of the Roaming User option on the left side of the
  Preferences Window, so see the suboptions of Roaming Access.

  - Click on Server Information and enable the option LDAP Server and
  fill the boxes with the following information :

  Address: ldap://myHost/nsLIProfileName=$USERID,ou=Roaming,o=myOrg,c=NL

  User DN: cn=$USERID,ou=People,o=myOrg,c=NL

  IMPORTANT : Netscape automatically substitutes the $USERID variable
  for the name of the profile you selected before running the browser.
  So if you selected the profile seallers, it will substitute $USERID
  for seallers, if you selected profile gonzales, if will substitute
  $USERID for gonzales. If you are not familiar with profiles, run the
  Profile Manager aplication that comes on the Netscape Comunicator
  package. It's an application designed to satisfy the multiple users of
  a browser on the same machine, so each one can have their on settings
  on the browser.

  The final step is to restart the server, take a look on the ``section
  6.6'' to see how you do that safely and on ``section 4'' to see how to
  start it again.


  6.2.  Netscape Address Book

  Once you have your LDAP server up and running, you can access it with
  many diferent clients (e.g. ldapsearch command line utility). A very
  interesting one is the Netscape Address Book. It's avaiable from
  version 4.x of Netscape but you have to use the 4.5 or above version
  for a stable interoperation with your LDAP server.

  Just follow the sequence :

  Open Netscape Navigator -> Go to Communicator Menu -> Address Book

  The Netscape Address Book will be launched with some default LDAP
  directories. You have to add your own LDAP directory too !

  Go to File Menu -> New Directory

  Fill the boxes with your server information. For example :

  - Description : TUDelft

  - LDAP Server : dutedin.et.tudelft.nl

  - Server Root : o=TUDelft, c=NL

  The default LDAP port is 389, don't change it, at least if you changed
  this option while building your server.

  Now, make simple queries to your server, using the box Show Names
  Containing, or advanced queries, using the Search for button.


  6.3.  LDAP Migration Tools

  The LDAP Migration Tools are a collection of Perl scripts used to
  convert configuration files to the LDIF format. The scripts are
  provided by PADL Software Ltd and I recommend you to take a look on
  the license terms before using them, even being free. If you plan to
  use your LDAP server to authenticate users, this tools may be very
  usefull. Use the Migration Tools to convert your NIS or password
  archives to the LDIF format, making these files compatible with your
  LDAP Server. Apply also these Perl Scripts to migrate users, groups,
  aliases, hosts, netgroups, networks, protocols, RPCs and services from
  existing nameservices (NIS, flat files and NetInfo) to the LDIF
  format.  To download the LDAP Migration Tools and get more
  information, go to the following address:



       http://www.padl.com/tools.html



  The package comes with a README file and the name of the script files
  are intuitive. Take a first look on the README file and then start
  aplying the scripts.


  6.4.  Authentication using LDAP

  Your LDAP server can authenticate users using a mechanism called PAM
  (Pluggable Authentication Modules). Since the beginnings of UNIX,
  authenticating a user has been accomplished via the user entering a
  password and the system checking if the entered password corresponds
  to the encrypted official password that is stored in /etc/passwd.


  That was in the beginning. Since then, a number of new ways for
  authenticating users became popular, including more complicated
  replacements for the /etc/passwd file and hardware devices called
  Smart cards. The problem is that each time a new authentication schema
  is developed, it requires all the necessary programs (login, ftpd
  etc...) to be rewritten to support it. PAM provides a way to develop
  programs that are independent of authentication scheme. These programs
  need "authentication modules" to be attatched to them at run-time in
  order to work.


  The authentication module for LDAP is available as a tar ball on the
  following address :



       http://www.padl.com/pam_ldap.html



  Here I assume that your Linux distribution is already PAM prepared. If
  not take a look on this url : http://www.kernel.org/pub/linux/libs/pam
  <http://www.kernel.org/pub/linux/libs/pam>. Actually, the various
  Linux distributions use different standard settings related to PAM.
  Usually, the configuration PAM files reside on the /etc/pam.d/
  directory. There you can find a file for each service running on your
  box. As an example, if you want to use the LDAP server for logging
  users in after your Linux boot up, you should make your Linux PAM
  compatible (as described on the begin of this paragraph), install the
  LDAP PAM module and edit a file called login on the PAM configuration
  directory (/etc/pam.d/) with the following content :
       #%PAM-1.0
       auth       required     /lib/security/pam_securetty.so
       auth       required     /lib/security/pam_nologin.so
       auth       sufficient   /lib/security/pam_ldap.so
       auth       required     /lib/security/pam_unix_auth.so try_first_pass
       account    sufficient   /lib/security/pam_ldap.so
       account    required     /lib/security/pam_unix_acct.so
       password   required     /lib/security/pam_cracklib.so
       password   required     /lib/security/pam_ldap.so
       password   required     /lib/security/pam_pwdb.so use_first_pass
       session    required     /lib/security/pam_unix_session.so



  6.5.  Graphical LDAP tools


  o  Kldap



       Kldap is a graphical LDAP client wrote for the KDE desktop environ-
       ment. Kldap has a nice interface and is able to show all the informa-
       tion tree stored on your Directory. You can check some screenshots
       from the application and download it at:



       http://www.mountpoint.ch/oliver/kldap



  o  GQ



       GQ is another graphical LDAP client with a simpler interface and that
       was wrote for the Gnome environment. It also runs under KDE, the same
       way Kldap runs under Gnome. The address for downloading and getting
       more information is :



       http://biot.com/gq/



  6.6.  Killing the LDAP server

  To kill off slapd safely, you should give a command like this

  kill -TERM `cat $(ETCDIR)/slapd.pid`

  Killing slapd by a more drastic method may cause its LDBM databases to
  be corrupted, as it may need to flush various buffers before it exits.
  Note that slapd writes its pid to a file called slapd.pid in the
  directory you configured in slapd.conf file, for example :
  /usr/local/var/slapd.pid

  You can change the location of this pid file by changing the
  SLAPD_PIDFILE variable in include/ldapconfig.h.edit
  Slapd will also write its arguments to a file called slapd.args in the
  directory you configured in slapd.conf file, for example
  /usr/local/var/slapd.args

  You can change the location of the args file by changing the
  SLAPD_ARGSFILE variable in include/ldapconfig.h.edit.


  6.7.  Logs

  Slapd uses the syslog(8) facility to generate logs. The default user
  of the syslog(8) facility is LOCAL4, but values from LOCAL0, LOCAL1,
  up to LOCAL7 are allowed.

  In order to enable the generation of logs you have to edit your
  syslog.conf file, usually located at /etc directory.

  Create a line like this :

  local4.*     /usr/adm/ldalog

  This will use the default user LOCAL4 for the syslog facility. If you
  are not familiar with the sintax of this line, take a look at the man
  pages of syslog, syslog.conf and syslogd. If you want to change the
  default user or to specify the level of the logs generated, you have
  the following options while starting slapd :

  -s syslog-level This option tells slapd at what level debugging
  statements should be logged to the syslog(8) facility. The level
  describes the severity of the message, and is a keyword from the
  following ordered list (higher to lower): emerg, alert, crit, err,
  warning, notice, info, and debug.  Ex : slapd -f myslapd.conf -s debug

  -l syslog-local-user Selects  the local user of the syslog(8)
  facility. Values can be LOCAL0, LOCAL1, and so on, up to LOCAL7. The
  default is LOCAL4. However, this option is only permitted on systems
  that support local users with the syslog(8) facility.

  Now take a look at the logs generated, they can help you a lot to
  solve problems with queries, updates, binding, etc.


  7.  References

  On this section you will find aditional documentation about LDAP :
  usefull Urls, cool Books and definition RFCs.


  7.1.  URLs

  Here are the URLs that contain very usefull information about LDAP.
  From this URLs this howto was made, so if after reading this document
  you need more specific information, you probably will find here :

  o  University of Michigan LDAP Page :

     http://www.umich.edu/~dirsvcs/ldap/index.html
     <http://www.umich.edu/~dirsvcs/ldap/index.html>

  o  University of Michigan LDAP Documentation Page :

     http://www.umich.edu/~dirsvcs/ldap/doc/
     <http://www.umich.edu/~dirsvcs/ldap/doc/>

  o  Manually Implementing Roaming Access

     http://help.netscape.com/products/client/communicator/manual_roaming2.html
     <http://help.netscape.com/products/client/communicator/manual_roaming2.html>

  o  Customizing LDAP Settings for Communicator 4.5 :

     http://developer.netscape.com/docs/manuals/communicator/ldap45.htm
     <http://developer.netscape.com/docs/manuals/communicator/ldap45.htm>

  o  Linux Directory Service

     http://www.rage.net/ldap/ <http://www.rage.net/ldap/>


  7.2.  Books

  These are the most popular and usefull books about LDAP :


  o  Implementing LDAP by Mark Wilcox

  o  LDAP: Programming Directory-Enabled Applications with Lightweight
     Directory Access Protocol by Howes and Smith

  o  Understanding and Deploying LDAP Directory Servers by Howes, Smith,
     and Good


  7.3.  RFCs

  The RFCs that support the LDAP development efforts :

  o  RFC 1558: A String Representation of LDAP Search Filters

  o  RFC 1777: Lightweight Directory Access Protocol

  o  RFC 1778: The String Representation of Standard Attribute Syntaxes

  o  RFC 1779: A String Representation of Distinguished Names

  o  RFC 1781: Using the OSI Directory to Achieve User Friendly Naming

  o  RFC 1798: Connectionless LDAP

  o  RFC 1823: The LDAP Application Programming Interface

  o  RFC 1959: An LDAP URL Format

  o  RFC 1960: A String Representation of LDAP Search Filters

  o  RFC 2251: Lightweight Directory Access Protocol (v3)

  o  RFC 2307: LDAP as a Network Information Service



  Logical Volume Manager HOWTO
  bert hubert <ahu@ds9a.nl>
  Richard Allen <ra@ra.is>
  Version 0.0.2 $Date: 2000/04/28 01:27:32 $

  A very hands-on HOWTO for Linux LVM
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Disclaimer & License
     1.2 Prior knowledge
     1.3 Housekeeping notes
     1.4 Access, CVS & submitting updates
     1.5 Layout of this document

  2. What is LVM?

  3. Basic principles

     3.1 Show & Tell
     3.2 Active and Inactive: kernel space and user space

  4. Prerequisites

     4.1 Kernel
        4.1.1 Linux 2.4
        4.1.2 Linux 2.3.99.*
        4.1.3 Linux 2.2
        4.1.4 Linux 2.3
     4.2 Userspace

  5. Growing your filesystem

     5.1 With e2fsadm
     5.2 Growing your Logical Volume
     5.3 Growing your Volume Group
     5.4 Growing your filesystem
        5.4.1 ext2 off-line with ext2resize
        5.4.2 ext2 on-line

  6. Replacing disks

     6.1 When it's too late

  7. Making snapshots for consistent backups

     7.1 How does it work?

  8. Redundancy & Performance

     8.1 Why stripe?
     8.2 Why not
     8.3 LVM native striping
        8.3.1 Performance notices
     8.4 Hardware RAID
     8.5 Linux software RAID

  9. Cookbook

     9.1 Moving LVM disks between computers
     9.2 Rebuilding /etc/lvmtab and /etc/lvmtab.d

  10. Further reading

  11. Acknowledgements & Thanks to



  ______________________________________________________________________



  1.  Introduction

  Welcome, gentle reader.

  This document is written to help enlighten you on what LVM is, how it
  works, and how you can use it to make your life easier. While there is
  an LVM FAQ, and even a German HOWTO, this document is written from a
  different perspective. It is a true 'HOWTO' in that it is very hands-
  on, while also imparting understanding (hopefully).

  I should make it clear that I am not an author of the Linux Logical
  Volume Manager. I have great respect for the people who are, and hope
  to be able to cooperate with them.

  It's even weirder, I don't even know the developers of LVM. I hope
  this will change soon. I apologise in advance for stepping on peoples
  toes.

  1.1.  Disclaimer & License

  This document is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  If your disks melt and your company fires you - it's never our fault.
  Sorry.  Make frequent backups and do your experiments on non-mission
  critical systems.

  Furthermore, Richard Allen does not speak for his employer.

  Linux is a registered trademark of Linus Torvalds.

  1.2.  Prior knowledge

  Not much. If you have ever installed Linux and made a filesystem
  (fdisk/mkfs), you should be all set.  As always when operating as
  root, caution is advised.  Incorrect commands or any operation on
  device files may damage your existing data.

  If you know how to configure HP/UX LVM you are almost done, Linux
  works almost exactly like the HP implementation.

  1.3.  Housekeeping notes

  There are several things which should be noted about this document.
  While I wrote most of it, I really don't want it to stay that way. I
  am a strong believer in Open Source, so I encourage you to send
  feedback, updates, patches etcetera. Do not hesitate to inform us of
  typos or plain old errors.

  If you feel to you are better qualified to maintain a section, or
  think that you can author and maintain new sections, you are welcome
  to do so. The SGML of this HOWTO is available via CVS.  I envision
  this being a collaborative project.

  In aid of this, you will find lots of FIXME notices. Patches are
  always welcome! Wherever you find a FIXME, you should know that you
  are treading unknown territory. This is not to say that there are no
  errors elsewhere, but be extra careful. If you have validated
  something, please let us know so I can remove the FIXME notice.


  1.4.  Access, CVS & submitting updates

  The canonical location for the HOWTO is http://www.ds9a.nl/lvm-howto/
  <http://www.ds9a.nl/lvm-howto/>.
  We now have anonymous CVS access available for the world at large.
  This allows you to easily obtain the latest version of this HOWTO and
  to provide your changes and enhancements.

  If you want to grab a copy of the HOWTO via CVS, here is how to do so:


       $ export CVSROOT=:pserver:anon@outpost.ds9a.nl:/var/cvsroot
       $ cvs login
       CVS password: [enter 'cvs' (without 's)]
       $ cvs co lvm-howto
       cvs server: Updating lvm-howto
       U lvm-howto/lvm-howto.sgml



  If you spot an error, or want to add something, just fix it locally,
  and run "cvs diff -u", and send the result off to us.

  A Makefile is supplied which should help you create postscript, dvi,
  pdf, html and plain text. You may need to install sgml-tools,
  ghostscript and tetex to get all formats.


  1.5.  Layout of this document

  We will initially be explaining some basic stuff which is needed to do
  things. We do try however to include examples where this would aid
  comprehension.


  2.  What is LVM?

  Historically, a partition size is static.  This requires a system
  installer to have to consider not the question of "how much data will
  I store on this partition", but rather "how much data will I *EVER*
  store on this partition".  When a user runs out of space on a
  partition, they either have to re-partition (which may involve an
  entire operating system reload) or use kludges such as symbolic links.

  The notion that a partition was a sequential series of blocks on a
  physical disc has since evolved.  Most Unix-like systems now have the
  ability to break up physical discs into some number of units.  Storage
  units from multiple drives can be pooled into a "logical volume",
  where they can be allocated to partitions.  Additionally, units can be
  added or removed from partitions as space requirements change.

  This is the basis of a Logical Volume Manager (LVM).

  For example, say that you have a 1GB disc and you create the "/home"
  partition using 600MB.  Imagine that you run out of space and decide
  that you need 1GB in "/home".  Using the old notion of partitions,
  you'd have to have another drive at least 1GB in size.  You could then
  add the disc, create a new /home, and copy the existing data over.

  However, with an LVM setup, you could simply add a 400MB (or larger)
  disc, and add it's storage units to the "/home" partition.  Other
  tools allow you to resize an existing file-system, so you simply
  resize it to take advantage of the larger partition size and you're
  back in business.

  As a very special treat, LVM can even make 'snapshots' of itself which
  enable you to make backups of a non-moving target. We return to this
  exciting possibility, which has lots of other real-world applications,
  later on.
  In the next section we explain the basics of LVM, and the multitude of
  abstractions it uses.


  3.  Basic principles

  Ok, don't let this scare you off, but LVM comes with a lot of jargon
  which you should understand lest you endanger your filesystems.

  We start at the bottom, more or less.


     The physical media
        You should take the word 'physical' with a grain of salt, though
        we will initially assume it to be a simple hard disk, or a
        partition. Examples, /dev/hda, /dev/hda6, /dev/sda. You can turn
        any consecutive number of blocks on a block device into a ...

     Physical Volume (PV)
        A PV is nothing more than a physical medium with some
        administrative data added to it - once you have added this, LVM
        will recognise it as a holder of ...

     Physical Extents (PE)
        Physical Extents are like really big blocks, often with a size
        of megabytes.  PEs can be assigned to a...

     Volume Group
        A VG is made up of a number of Physical Extents (which may have
        come from multiple Physical Volumes or hard drives).  While it
        may be tempting to think of a VG as being made up of several
        hard drives (/dev/hda and /dev/sda for example), it's more
        accurate to say that it contains PEs which are provided by these
        hard drives.

        >From this Volume Group, PEs can be assigned to a ...

     Logical Volume (LV)
        Yes, we're finally getting somewhere. A Logical Volume is the
        end result of our work, and it's there that we store our
        information. This is equivalent to the historic idea of
        partitions.

        As with a regular partition, on this Logical Volume you would
        typically build a ...

     Filesystem
        This filesystem is whatever you want it to be: the standard
        ext2, ReiserFS, NWFS, XFS, JFX, NTFS, etc...  To the linux
        kernel, there is no difference between a regular partition and a
        Logical Volume.

  I've attempted some ASCII art which may help you visualise this.



  A Physical Volume, containing Physical Extents:

    +-----[ Physical Volume ]------+
    | PE | PE | PE | PE | PE | PE  |
    +------------------------------+

  A Volume Group, containing 2 Physical Volumes (PVs) with 6 Physical Extents:

    +------[ Volume Group ]-----------------+
    |  +--[PV]--------+  +--[PV]---------+  |
    |  | PE | PE | PE |  | PE | PE | PE  |  |
    |  +--------------+  +---------------+  |
    +---------------------------------------+

  We now further expand this:

    +------[ Volume Group ]-----------------+
    |  +--[PV]--------+  +--[PV]---------+  |
    |  | PE | PE | PE |  | PE | PE | PE  |  |
    |  +--+---+---+---+  +-+----+----+---+  |
    |     |   |   | +-----/     |    |      |
    |     |   |   | |           |    |      |
    |   +-+---+---+-+      +----+----+--+   |
    |   |  Logical  |      |  Logical   |   |
    |   |  Volume   |      |   Volume   |   |
    |   |           |      |            |   |
    |   |  /home    |      |    /var    |   |
    |   +-----------+      +------------+   |
    +---------------------------------------+



  This shows us two filesystems, spanning two disks. The /home
  filesystem contains 4 Physical Extents, the /var filesystem 2.

  bert hubert is writing a tool <http://ds9a.nl/lvm-viewer> to represent
  LVM more visually, a screenshot <http://ds9a.nl/lvm-
  howto/screenshot.gif> is provided. Looks better than the ASCII art.


  3.1.  Show & Tell

  Ok, this stuff is hard to assimilate ('We are LVM of Borg...'), so
  here is a very annotated example of creating a Logical Volume. Do NOT
  paste this example onto your console because you WILL destroy data,
  unless it happens that on your computer /dev/hda3 and /dev/hdb2 aren't
  used.

  When in doubt, view the ASCIIgram above.

  You should first set the partition types of /dev/hda3 and /dev/hdb2 to
  0x8e, which is 'Linux LVM'. Please note that your version of fdisk may
  not yet know this type, so it will be listed as 'Unknown':



  # fdisk /dev/hda

  Command (m for help): p

  Disk /dev/hda: 255 heads, 63 sectors, 623 cylinders
  Units = cylinders of 16065 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1             1         2     16033+  83  Linux
  /dev/hda2             3       600   4803435   83  Linux
  /dev/hda3           601       607     56227+  83  Linux
  /dev/hda4           608       614     56227+  83  Linux

  Command (m for help): t
  Partition number (1-4): 3
  Hex code (type L to list codes): 8e

  Command (m for help): p

  Disk /dev/hda: 255 heads, 63 sectors, 623 cylinders
  Units = cylinders of 16065 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1             1         2     16033+  83  Linux
  /dev/hda2             3       600   4803435   83  Linux
  /dev/hda3           601       607     56227+  8e  Unknown
  /dev/hda4           608       614     56227+  83  Linux

  Command (m for help): w



  We do the same for /dev/hdb2, but we don't display it here. This is
  needed so that LVM is able to reconstruct things should you lose your
  configuration.

  Now, this shouldn't be necessary, but some computers require a reboot
  at this point. So if the following examples don't work, try rebooting.

  We then create our Physical Volumes, like this:


       # pvcreate  /dev/hda3
       pvcreate -- physical volume "/dev/hda3" successfully created
       # pvcreate  /dev/hdb2
       pvcreate -- physical volume "/dev/hdb2" successfully created



  We than add these two PVs to a Volume Group called 'test':


       # vgcreate test /dev/hdb2 /dev/hda3
       vgcreate -- INFO: using default physical extent size 4 MB
       vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte
       vgcreate -- doing automatic backup of volume group "test"
       vgcreate -- volume group "test" successfully created and activated



  So we now have an empty Volume Group, let's examine it a bit:


       # vgdisplay -v test
       --- Volume group ---
       VG Name               test
       VG Access             read/write
       VG Status             available/resizable
       VG #                  0
       MAX LV                256
       Cur LV                0
       Open LV               0
       MAX LV Size           255.99 GB
       Max PV                256
       Cur PV                2
       Act PV                2
       VG Size               184 MB
       PE Size               4 MB
       Total PE              46
       Alloc PE / Size       0 / 0
       Free  PE / Size       46 / 184 MB

       --- No logical volumes defined in test ---


       --- Physical volumes ---
       PV Name (#)           /dev/hda3 (2)
       PV Status             available / allocatable
       Total PE / Free PE    13 / 13

       PV Name (#)           /dev/hdb2 (1)
       PV Status             available / allocatable
       Total PE / Free PE    33 / 33



  Lots of data here - most of it should be understandable by now. We see
  that there are no Logical Volumes defined, so we should work to remedy
  that. We try to generate a 50 megabyte volume called 'HOWTO' in the
  Volume Group 'test':



       # lvcreate -L 50M -n HOWTO test
       lvcreate -- rounding up size to physical extent boundary "52 MB"
       lvcreate -- doing automatic backup of "test"
       lvcreate -- logical volume "/dev/test/HOWTO" successfully created



  Ok, we're nearly there, let's make a filesystem:



  # mke2fs /dev/test/HOWTO
  mke2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
  Filesystem label=
  OS type: Linux
  Block size=1024 (log=0)
  Fragment size=1024 (log=0)
  13328 inodes, 53248 blocks
  2662 blocks (5.00%) reserved for the super user
  First data block=1
  7 block groups
  8192 blocks per group, 8192 fragments per group
  1904 inodes per group
  Superblock backups stored on blocks:
          8193, 24577, 40961

  Writing inode tables: done
  Writing superblocks and filesystem accounting information: done
  # mount /dev/test/HOWTO /mnt
  # ls /mnt
  lost+found



  And we're done! Let's review our Volume Group, because it should be
  filled up a bit by now:



  # vgdisplay test -v
  --- Volume group ---
  VG Name               test
  VG Access             read/write
  VG Status             available/resizable
  VG #                  0
  MAX LV                256
  Cur LV                1
  Open LV               1
  MAX LV Size           255.99 GB
  Max PV                256
  Cur PV                2
  Act PV                2
  VG Size               184 MB
  PE Size               4 MB
  Total PE              46
  Alloc PE / Size       13 / 52 MB
  Free  PE / Size       33 / 132 MB

  --- Logical volume ---
  LV Name               /dev/test/HOWTO
  VG Name               test
  LV Write Access       read/write
  LV Status             available
  LV #                  1
  # open                1
  LV Size               52 MB
  Current LE            13
  Allocated LE          13
  Allocation            next free
  Read ahead sectors    120
  Block device          58:0


  --- Physical volumes ---
  PV Name (#)           /dev/hda3 (2)
  PV Status             available / allocatable
  Total PE / Free PE    13 / 13

  PV Name (#)           /dev/hdb2 (1)
  PV Status             available / allocatable
  Total PE / Free PE    33 / 20



  Well, it is. /dev/hda3 is completely unused, but /dev/hdb2 has 13
  Physical Extents in use.

  3.2.  Active and Inactive: kernel space and user space

  As with all decent operating systems, Linux is divided in two parts:
  kernel space and user space. Userspace is sometimes called userland,
  which would also be a good name for a theme park, 'Userland'.

  Discovery, creation and modification of things pertaining to Logical
  Volume Management is done in user space, and then communicated to the
  kernel. Once a volume group or logical volume is reported to the
  kernel, it is called 'Active'. Certain changes can only be performed
  when an entity is active, others only when it is not.


  4.  Prerequisites

  There is a wide range of kernels where LVM is available on. In Linux
  2.4, LVM will be fully integrated. From kernel 2.3.47 and onwards, LVM
  is in the process of being merged into the main kernel.


  4.1.  Kernel

  4.1.1.  Linux 2.4

  Will contain everything you need. It is expected that most
  distributions will release with LVM included as a module. If you need
  to compile, just tick off the LVM option when selecting your block
  devices.

  4.1.2.  Linux 2.3.99.*

  Once things have calmed down on the kernel development front, this
  section will vanish. For now, the gory details.

  As we write this, Linux 2.3.99pre5 is current and it still needs a
  very tiny patch to get LVM working.

  For Linux 2.3.99pre3, two patches were released:

  The patch was posted on linux-kernel, and is available here
  <http://ds9a.nl/lvm-howto/2.3.99pre3>.

  Andrea Arcangeli improved on that patch, and supplied an incremental
  patch <http://ds9a.nl/lvm-howto/andrea.patch>, which should be applied
  on top of the 2.3.99pre3 LVM patch above.

  For Linux 2.3.99pre5, bert hubert rolled these two patches into one
  and ported it to 2.3.99pre5. Patch <http://ds9a.nl/lvm-
  howto/2.3.99-pre5.lvm.patch>. Use with care.

  2.3.99pre6-1, yes, a prerelease of a prepatch, features for the first
  time complete LVM support! It stil misses Andreas patch but we have
  been assured that it is in the queue to be released real soon.

  2.3.99pre4-ac1 has the tiny LVM patch in by default, and working. It
  does not contain Andreas patch though.


  4.1.3.  Linux 2.2

  FIXME: write this

  4.1.4.  Linux 2.3

  FIXME: write this

  4.2.  Userspace

  You need the tools available from the LVM site
  <http://lvm.msede.com/lvm>. Compiling them on glibc2.1 systems
  requires a tiny patch, and even then gives errors on Debian 2.2.



  5.  Growing your filesystem

  You can do this with a provided script which does a lot of work for
  you, or you can do it by hand if needed.

  5.1.  With e2fsadm

  If there is room within your volume group, and you use the ext2
  filesystem (most people do), you can use this handy tool.
  The e2fsadm command uses the commercial resize2fs tool. While people
  feel that this is good software, it is not very widely installed.

  If you want to use the FSF's ext2resize command, you need to inform
  e2fsadm of this:



       # export E2FSADM_RESIZE_CMD=ext2resize
       # export E2FSADM_RESIZE_OPTS=""



  The rest is easy, e2fsadm is a lot like the other LVM commands:



       # e2fsadm /dev/test/HOWTO -L+50M
       e2fsadm -- correcting size 102 MB to physical extent boundary 104 MB
       e2fsck 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
       Pass 1: Checking inodes, blocks, and sizes
       Pass 2: Checking directory structure
       Pass 3: Checking directory connectivity
       Pass 4: Checking reference counts
       Pass 5: Checking group summary information
       /dev/test/HOWTO: 11/25688 files (0.0% non-contiguous), 3263/102400 blocks
       lvextend -- extending logical volume "/dev/test/howto" to 104 MB
       lvextend -- doing automatic backup of volume group "test"
       lvextend -- logical volume "/dev/test/HOWTO" successfully extended

       ext2_resize_fs
       ext2_grow_fs
       ext2_block_relocate
       ext2_block_relocate_grow
       ext2_grow_group
       ext2_add_group
       ext2_add_group
       ext2_add_group
       ext2_add_group
       ext2_add_group
       ext2_add_group
       direct hits 4096 indirect hits 0 misses 1
       e2fsadm -- ext2fs in logical volume "/dev/test/HOWTO" successfully extended to 104 MB



  5.2.  Growing your Logical Volume

  The e2fsadm command takes care of this for you. However, it may be
  useful to understand how to do this manually:

  If you have room within your Volume Group, this is a one liner:


       # lvextend -L+12M /dev/test/HOWTO
       lvextend -- rounding size to physical extent boundary
       lvextend -- extending logical volume "/dev/test/HOWTO" to 116 MB
       lvextend -- doing automatic backup of volume group "test"
       lvextend -- logical volume "/dev/test/HOWTO" successfully extended



  5.3.  Growing your Volume Group

  This is done with the vgextend utility, and is easy as pie. You first
  need to create a physical volume. This is done with the pvcreate
  utility. With this tool, you convert any block device into a physical
  volume.

  After that is done, vgextend does the rest:


       # pvcreate /dev/sda1
       pvcreate -- physical volume "/dev/sda1" successfully created
       # vgextend webgroup /dev/sda1
       vgextend -- INFO: maximum logical volume size is 255.99 Gigabyte
       vgextend -- doing automatic backup of volume group "webgroup"
       vgextend -- volume group "webgroup" successfully extended



  Please note that in order to do this, your Volume Group needs to be
  active. You can make it by executing 'vgchange -a y webgroup'.


  5.4.  Growing your filesystem

  If you want to do this manually, there are a couple of ways to do
  this.

  5.4.1.  ext2 off-line with ext2resize

  By off-line, we mean that you have to unmount the file-system to make
  these changes.  The file-system and it's data will be unavailable
  while doing this.  Note this means you must use other boot media if
  extending the size of the root or other important partitions.

  The ext2resize tool is available on the GNU ftp size, but most
  distributions carry it as a package. The syntax is very
  straightforward:


       # ext2resize /dev/HOWTO/small 40000



  Where 40000 is the number of blocks the filesystem should have after
  growing or shrinking.


  5.4.2.  ext2 on-line

  FIXME: write this


  6.  Replacing disks

  This is one of the benefits of LVM. Once you start seeing errors on a
  disk, it is high time to move your data. With LVM this is easy as pie.
  We first do the obvious replacement example where you add a disk to
  the system that's at least as large as the one you want to replace.

  To move data, we move Physical Extents of a Volume Group to another
  disk, or more precisely, to another Physical Volume. For this, LVM
  offers us the pvmove utility.

  Let's say that our suspicious disk is called /dev/hda1 and we want to
  replace it by /dev/sdb3. We first add /dev/sdb3 to the Volume Group
  that contains /dev/hda1.

  It appears advisable to unmount any filesystems on this Volume Group
  before doing this. Having a full backup might not hurt either.

  FIXME: is this necessary?

  We then execute pvmove. In its simplest invocation, we just mention
  the disk we want to remove, like this:



       # pvmove /dev/hda1
       pvmove -- moving physical extents in active volume group "test1"
       pvmove -- WARNING: moving of active logical volumes may cause data loss!
       pvmove -- do you want to continue? [y/n] y
       pvmove -- doing automatic backup of volume group "test1"
       pvmove -- 12 extents of physical volume "/dev/hda1" successfully moved



  Please heed this warning. Also, it appears that at least some kernels
  or LVM versions have trouble with this command. I tested it with
  2.3.99pre6-2, and it works, but be warned.

  Now that /dev/hda1 contains no Physical Extents anymore, we can reduce
  it from the Volume Group:



       # vgreduce test1 /dev/hda1
       vgreduce -- doing automatic backup of volume group "test1"
       vgreduce -- volume group "test1" successfully reduced by physical volume:
       vgreduce -- /dev/hda1



  FIXME: we need clarity on a few things. Should the volume group be
  active?  When do we get data loss?


  6.1.  When it's too late

  If a disk fails without warning and you are unable to move the
  Physical Extents off it to a different Physical Volume you will have
  lost data unless the Logical Volumes on the PV that failed was
  mirrored. The correct course of action is to replace the failed PV
  with an identical one or at least a partition of the same size.

  The directory /etc/lvmconf contains backups of the LVM data and
  structures that make the disks into Physical Volumes and list which
  Volume Groups that PV belongs to and what Logical Volumes are in the
  Volume Group.

  After replacing the faulty disk you can use the vgcfgrestore command
  to recover the LVM data to the new PV. This restores the Volume Group
  and all it's info, but it does not restore the data that was in the
  Logical Volumes.  This is why most LVM commands make backups
  automatically of the LVM data when doing changes.



  7.  Making snapshots for consistent backups

  This is one of the more incredible possibilities. Let's say you have a
  busy server, with lots of things happening. For a useful backup, you
  need to shut down a large number of programs because otherwise you end
  up with inconsistencies.

  The canonical example is moving a file from /tmp to /root, where /root
  was being backed up first. When /root was read, the file wasn't there
  yet. By the time /tmp was backed up, the file was gone.

  Another story goes for saving databases or directories. We have no
  clue if a file is in any usable state unless we give the application
  time to do a clean shutdown.

  Which is where another problem pops up. We shut down out applications,
  make our backup, and restart them again. This is all fine as long as
  the backup only takes a few minutes, but gets to be real painful if it
  takes hours, or if you're not even sure how long it takes.

  LVM to the rescue.

  With LVM we can make a snapshot picture of a Logical Volume which is
  instantaneous, and then mount that and make a backup of it.

  Let's try this out:



       # mount /dev/test/HOWTO /mnt
       # echo > /mnt/a.test.file
       # ls /mnt/
       a.test.file  lost+found
       # ls -l /mnt/
       total 13
       -rw-r--r--    1 root     root            1 Apr  2 00:28 a.test.file
       drwxr-xr-x    2 root     root        12288 Apr  2 00:28 lost+found



  Ok, we now have something to work with. Let's make the snapshot:



       # lvcreate --size 16m --snapshot --name snap /dev/test/HOWTO
       lvcreate -- WARNING: all snapshots will be disabled if more than 16 MB are changed
       lvcreate -- INFO: using default snapshot chunk size of 64 KB
       lvcreate -- doing automatic backup of "test"
       lvcreate -- logical volume "/dev/test/HOWTO" successfully created



  More on the '--size' parameter later. Let's mount the snapshot:



       # mount /dev/test/snap /snap
       # ls /snap
       total 13
       -rw-r--r--    1 root     root            1 Apr  2 00:28 a.test.file
       drwxr-xr-x    2 root     root        12288 Apr  2 00:28 lost+found



  Now we erase a.test.file from the original, and check if it's still
  there in the snapshot:


       # rm /mnt/a.test.file
       # ls /snap
       total 13
       -rw-r--r--    1 root     root            1 Apr  2 00:28 a.test.file
       drwxr-xr-x    2 root     root        12288 Apr  2 00:28 lost+found



  Amazing Mike!

  7.1.  How does it work?

  Remember that we had to set the '--size' parameter? What really
  happens is that the 'snap' volume needs to have a copy of all blocks
  or 'chunks' as LVM calls them, which are changed in the original.

  When we erased a.test.file, it's inode was removed. This caused 64 KB
  to be marked as 'dirty' - and a copy of the original data was written
  to the than 16MB of "chunks" are modified, the snapshot will be
  deactivated.

  To determine the correct size for a snapshot partition, you will have
  to guess based on usage patterns of the primary LV, and the amount of
  time the snapshot will be active.  For example, an hour-long backup in
  the middle of the night when nobody is using the system may require
  very little space.

  Please note that snapshots are not persistent. If you unload LVM or
  reboot, they are gone, and need to be recreated.


  8.  Redundancy & Performance

  For performance reasons, it is possible to spread data in a 'stripe'
  over multiple disks. This means that block 1 is on Physical Volume A,
  and block 2 is on PV B, while block 3 may be on PV A again. You can
  also stripe over more than 2 disks.

  This arrangement means that your have more disk bandwidth available.
  It also means that more 'spindles' are involved. More on this later.

  Besides increasing performance, it is also possible to have your data
  in copies on multiple disks. This is called mirroring. Currently, LVM
  does not support this natively but there are ways to achieve this.


  8.1.  Why stripe?

  Disk performance is influenced by three things, at least. The most
  obvious is the speed at which data on a disk can be read or written
  sequentially.  This is the limiting factor when reading or writing a
  large file on a SCSI/IDE bus with only a single disk on it.

  Then there is the bandwidth available TO the disk. If you have 7 disks
  on a SCSI bus, this may well be less than the writing speed of your
  disk itself.  If you spend enough money, you can prevent this
  bottleneck from being a problem.

  Then there is the latency. As the saying goes, latency is always bad
  news.  And even worse, you can't spend more money to get lower
  latency! Most disks these days appear to have a latency somewhere
  around 7ms. Then there is the SCSI latency, which used to be something
  like 25ms.

  FIXME: need recent numbers!

  What does this mean? The combined latency would be around 30ms in a
  typical case. You can therefore perform only around 33 disk operations
  per second.  If you want to be able to do many thousands of queries
  per second, and you don't have a massive cache, you are very much out
  of luck.

  If you have multiple disks, or 'spindles', working in parallel, you
  can have multiple commands being performed concurrently, which nicely
  circumvents your latency problem. Some applications, like a huge news
  server, don't even work anymore without striping or other IO
  smartness.

  This is what striping does. And, if your bus is up to it, even
  sequential reading and writing may go faster.

  8.2.  Why not

  Striping without further measures raises your fault chance, on a 'per
  bit' basis. If any of your disks dies, your entire Logical Volume is
  gone. If you just concatenate data, only part of your filesystem is
  gone.

  The ultimate option is the mirrored stripe.

  FIXME: make a mirrored stripe with LVM and md

  8.3.  LVM native striping

  Specifying stripe configuration is done when creating the Logical
  Volume with lvcreate. There are two relevant parameters. With -i we
  tell LVM how many Physical Volumes it should use to scatter on.
  Striping is not really done on a bit-by-bit basis, but on blocks. With
  -I we can specify the granulation in kilobytes. Note that this must be
  a power of 2, and that the coarsest granulation is 128Kbyte.

  Example:


       # lvcreate -n stripedlv -i 2 -I 64 mygroup -L 20M
       lvcreate -- rounding 20480 KB to stripe boundary size 24576 KB / 6 PE
       lvcreate -- doing automatic backup of "mygroup"
       lvcreate -- logical volume "/dev/mygroup/stripedlv" successfully created



  8.3.1.  Performance notices

  The performance 'gain' may well be very negative if you stripe over 2
  partitions of the same disk - take care to prevent that. Striping with
  two disks on a single IDE bus also appears useless - unless IDE has
  improved beyond what I remember.

  FIXME: is this still true?

  Older motherboards may have two IDE buses, but the second one used to
  be castrated, dedicated to serving a slow cdrom drive. You can perform
  benchmarks with several tools, the most noteworthy being 'Bonnie'. The
  ReiserFS people have released Bonnie++
  <http://www.coker.com.au/bonnie++/> which may be used to measure
  performance data.


  8.4.  Hardware RAID

  Many high end Intel x86 servers have Hardware RAID controlers. Most of
  them have atleast 2 independant SCSI channels. Fortunatly, his has
  very little bearing on LVM. Before Linux can see anything on such a
  controler the administrator must define a Logical drive within the
  raid controler itself. As an example [s]he could choose to stripe
  together two disks on SCSI channel A and then mirror them onto two
  disks on channel B. This is a typical RAID 0/1 configuration that
  maximises performance and data security. When Linux boots on a machine
  with this configuration it can only 'see' one disk on the RAID
  controler and that is the Logical drive that contains the four disks
  in the RAID 0/1 stripeset.  This means, as far as LVM is concerned,
  that there is just one disk in the machine and it is to be used as
  such. If one of the disks fails, LVM wont even know. When the
  administrator replaces the disk (even on the fly with HotSwap
  hardware) LVM wont know about that either and the controler will
  resync the mirrored data and all will be well.  This is where most
  people take a step back and ask "Then what good does LVM do for me
  with this RAID controler?" The easy answer is, in most cases, after
  you define a logical drive in the RAID controler you cant add more
  disks to that drive later. So if you miscalculate the space
  requirements or you simply need more space you cant add a new disk or
  set of disks into a pre-exsisting stripeset. This means you must
  create a new RAID stripset in the controler and then with LVM you can
  simply extend the LVM Logical volume so that it seamlessly spans both
  stripesets in the RAID controler.

  FIXME: Is there more needed on this subject ?


  8.5.  Linux software RAID

  Linux 2.4 comes with very good RAID in place. Linux 2.2 by default, as
  released by Alan Cox, features an earlier RAID version that's not well
  regarded. The reason that 2.2 still features this earlier release is
  the the kernel people don't want to make changes within a stable
  version that require userland updates.

  Most people, which included Red Hat, Mandrake and SuSE, chose to
  replace it with the 0.90 version which appears to be excellent.

  We will only treat the 0.90 version here.

  FIXME: write more of this


  9.  Cookbook


  9.1.  Moving LVM disks between computers

  With all this new technology, simple tasks like moving disks from one
  machine to another can get a bit tricky. Before LVM users only had to
  put the disk into the new machine and mount the filesystems. With LVM
  there is a bit more to it. The LVM structures are saved both on the
  disks and in the /etc/lvmconf directory so the only thing that has to
  be done to move a disk or a set of disks that contain a Volume Group
  is to make sure the machine that the VG belonged to will not miss it.
  That is accomplished with the vgexport command. vgexport simply
  removes the structures for the VG from /etc/lvmconf, but does not
  change anything on the disks. Once the disks are in the new machine
  (they don't have to have the same ID's) the only thing that has to be
  done is to update /etc/lvmconf. Thats done with vgimport.

  Example:

  On machine #1:


       vgchange -a n vg01
       vgexport vg01



  On machine #2:


       vgimport vg01 /dev/sda1 /dev/sdb1
       vgchange -a y vg01



  Notice that you don't have to use the same name for the Volume Group.
  If the vgimport command did not save a configuration backup use
  vgcfgbackup to do it.


  9.2.  Rebuilding /etc/lvmtab and /etc/lvmtab.d


  FIXME: write about more neat stuff


  10.  Further reading


     LVM site <http://lvm.msede.com/lvm/>
        The main LVM resource available

     German LVM HOWTO <http://litefaden.com/lite00/lvm/>
        If you can read German, this already contains a lot of
        information

     Translation of the German HOWTO <ftp://linux.msede.com/howto/>
        Peter.Wuestefeld@resnova.de is translating the German HOWTO into
        English. It appears that they will soon be investing lots of
        time in it. If you doubt our HOWTO or miss something, please try
        their effort.

     HP/UX Managing Disks Guide <http://docs.hp.com/cgi-
        bin/omcgi/omdoc?action=getcon&ID=7425>
        Since the Linux LVM is almost an exact workalike of the HP/UX
        implementation, their documentation is very useful to us as
        well. Very good stuff.


  11.  Acknowledgements & Thanks to

  We try to list everybody here who helped make this HOWTO. This
  includes people who send in updates, fixes or contributions, but also
  people who have aided our understanding of the subject.

    Axel Boldt <axel@uni-paderborn.de>

    Sean Reifschneider <jafo@tummy.com>

    Alexander Talos <at@atat.at>

    Eric Maryniak <e.maryniak@pobox.com>



  Linux Laptop-HOWTO
  Werner Heuser <wehe@snafu.de>
  v2.2, 2 December 1999

  Laptops are different from desktops/towers. They use certain hardware
  such as PCMCIA cards, infrared ports, batteries, docking stations.
  Often their hardware is more limited (e.g. disk space, CPU speed),
  though the performance gap is becoming smaller. In many instances,
  laptops can become a desktop replacement.  Hardware support for Linux
  (and other operating systems) on laptops is sometimes more limited
  (e.g. graphic chips, internal modems). Laptops often use specialized
  hardware, hence finding a driver can be more difficult.  Laptops are
  often used in changing environments, so there is a need for multiple
  configurations and additional security strategies.  Though there are
  laptop related HOWTOs available already, this HOWTO contains a concise
  survey of laptop related documents. Also, laptop related Linux fea-
  tures, such as installation methods for laptops (via PCMCIA, without
  CD drive, etc.), laptop hardware features and configurations for dif-
  ferent (network) environments are described. Besides there are some
  notes on PDAs, Handheld PCs and other mobile computer devices (digital
  cameras, cellular phones, calculators).  And though some caveats Linux
  is a better choice for laptops, than most other operating systems.
  Because it supports numerous installation methods, works in many het-
  erogenoues environments and needs smaller resources.
  ______________________________________________________________________

  Table of Contents



  1. Preface

     1.1 About the Author
     1.2 Sponsoring
     1.3 About the Document (Mirrors, Translations, Versions, Formats, URLs)
     1.4 Contact

  2. Copyright, Disclaimer and Trademarks

  3. Which Laptop to Buy?

     3.1 Introduction
     3.2 Portables, Laptops/Notebooks, Sub/Mini-Notebooks, Palmtops, PDAs/HPCs
        3.2.1 Portables
        3.2.2 Laptops/Notebooks
        3.2.3 Sub-Notebooks/Mini-Notebooks
        3.2.4 Palmtops
        3.2.5 Personal Digital Assistants (PDAs)/Handheld PCs (HPCs)
        3.2.6 Wearables
     3.3 Linux Features
     3.4 Main Hardware Features
        3.4.1 Weight
        3.4.2 Display
        3.4.3 Batteries
        3.4.4 CPU
           3.4.4.1 Supported CPU Families
           3.4.4.2 Miscellaneous
        3.4.5 Cooling
        3.4.6 Keyboard Quality
        3.4.7 Price
        3.4.8 Power Supply
     3.5 Sources of More Information
     3.6 Linux Compatibility Check
        3.6.1 Related HOWTOs
        3.6.2 Check Methods in General
     3.7 Writing a Device Driver
     3.8 Buying a Second Hand Laptop
     3.9 No Hardware Recommendations

  4. Laptop Distribution

     4.1 Requirements
     4.2 Recommendation

  5. Installation

     5.1 Related HOWTOs
     5.2 Prerequisites - Partitioning
     5.3 Linux Tools to Repartition a Hard Disk
        5.3.1 GNU parted
        5.3.2 ext2resize
        5.3.3 fixdisktable
        5.3.4 Caveats
        5.3.5 Multi Boot
     5.4 Installation Methods
     5.5 From a Boot Floppy plus CD-ROM - The Usual Way
     5.6 From a DOS or Windows Partition at the Same Machine
     5.7 From a Second Machine With a Micro Linux On a Floppy
        5.7.1 Introduction
        5.7.2 Prerequisites
        5.7.3 Source Machine
        5.7.4 Destination Machine
        5.7.5 Configuration of the Destination Machine after the Transfer
        5.7.6 Miscellaneous
     5.8 From a Second Machine With a 2.5" Hard Disk Adapter
     5.9 From a PCMCIA Device
     5.10 From a Parallel Port Device (ZIP Drive, CD Drive)
     5.11 From a Second Machine Using the Parallel Port - PLIP Network Install
     5.12 Installing Linux on Small Machines

  6. Hardware In Detail

     6.1 PCMCIA Controller
        6.1.1 Linux Compatibility Check
        6.1.2 Related HOWTOs
        6.1.3 PCMCIA Configuration - Survey
           6.1.3.1 Software
           6.1.3.2 PCMCIA Controller
           6.1.3.3 PCMCIA Card
     6.2 Infrared Port
        6.2.1 Linux Compatibility Check
           6.2.1.1 SIR
           6.2.1.2 FIR
           6.2.1.3 Hardware Survey
        6.2.2 Related HOWTOs
        6.2.3 IrDA Configuration - Survey
           6.2.3.1 IrDA
              6.2.3.1.1 Kernel
              6.2.3.1.2 Software
              6.2.3.1.3 Hardware
           6.2.3.2 Linux Remote Control - LiRC
     6.3 Graphic Chip
        6.3.1 Linux Compatibility Check
           6.3.1.1 Video Mode
           6.3.1.2 Text Mode
        6.3.2 Related HOWTOs
        6.3.3 Survey X-Servers
        6.3.4 Resources
        6.3.5 External Monitor
        6.3.6 Miscellaneous
     6.4 Sound
        6.4.1 Linux Compatibility Check
        6.4.2 Related HOWTOs
        6.4.3 Survey Sound Drivers
     6.5 Keyboard
        6.5.1 Linux Compatibility Check
        6.5.2 External (Second) Keyboard
     6.6 Pointing Devices - Mice and Their Relatives
        6.6.1 Linux Compatibility Check
        6.6.2 Related HOWTOs
        6.6.3 Mice Species
        6.6.4 PS/2 Mice
        6.6.5 Touchpad
        6.6.6 Touchscreen
        6.6.7 COMPAQ Concerto Pen
        6.6.8 External Mouse
     6.7 Advanced Power Management - APM
        6.7.1 Linux Compatibility Check
        6.7.2 Introduction
           6.7.2.1 Kernel Land
           6.7.2.2 User Land
        6.7.3 Caveats
        6.7.4 Troubleshooting
        6.7.5 APM and PCMCIA
        6.7.6 APM and Resuming X Windows
        6.7.7 Modularization of APM
        6.7.8 APM Resume Options
        6.7.9 APM and Sound
        6.7.10 Software Suspend
     6.8 ACPI
     6.9 Batteries
     6.10 Memory
     6.11 Plug-and-Play Devices (PnP)
     6.12 Docking Station / Port Replicator
        6.12.1 Definitions
        6.12.2 Other Solutions
        6.12.3 Connection Methods
     6.13 Network Connections
        6.13.1 Related HOWTOs
        6.13.2 Connection Methods
           6.13.2.1 PCMCIA Network Card
           6.13.2.2 Serial Null Modem Cable
           6.13.2.3 Parallel Port NIC (Pocket Adaptor)
           6.13.2.4 Parallel "Null" Modem Cable
           6.13.2.5 Docking Station NIC
     6.14 Modem
        6.14.1 Modem Types
        6.14.2 Caveats
     6.15 SCSI
        6.15.1 Hardware Compatibility Check
        6.15.2 Related HOWTOs
        6.15.3 Survey
     6.16 Universal Serial Bus - USB
        6.16.1 Linux Compatibility Check
        6.16.2 Miscelleaneous
     6.17 Floppy Drive
        6.17.1 Linux Compatibility Check
     6.18 CD Drive
     6.19 DVD Drive
     6.20 Harddisk
        6.20.1 Linux Compatibility Check
        6.20.2 Miscellaneous
        6.20.3 Form Factors
     6.21 Video Port / ZV Port

  7. Palmtops, Personal Digital Assistants - PDAs, Handheld PCs - HPCs

  8. Cellular Phones, Pagers, Calculators, Digital Cameras, Wearable Computing

     8.1 Cellular Phones
     8.2 Pagers - SMS Messages
     8.3 Digital Cameras
     8.4 Calculators
     8.5 Wearable Computing
     8.6 Watches

  9. Accessories

     9.1 PCMCIA Cards
        9.1.1 Card Families
        9.1.2 Linux Compatibility Check
     9.2 SmartCards
     9.3 Memory Technology Devices - RAM and Flash Cards
     9.4 Printers
     9.5 Power and Phone Plugs, Power Supply
     9.6 Bags and Suitcases

  10. Different Environments - On the Road

     10.1 Related HOWTOs
     10.2 Configuration Tools
        10.2.1 NetEnv
        10.2.2 divine
        10.2.3 Mobile IP
           10.2.3.1 Resources
        10.2.4 DHCP/BootP
        10.2.5 PPPD Options
        10.2.6 /etc/init.d
        10.2.7 PCMCIA - Schemes
        10.2.8 Bootloaders
           10.2.8.1 LILO
           10.2.8.2 Other Bootloaders
        10.2.9 X-Windows
        10.2.10 E-Mail
           10.2.10.1 Features
           10.2.10.2 Configuration of sendmail
           10.2.10.3 Configuration for fetchmail on Laptop
           10.2.10.4 Forward E-Mail to the Laptop
           10.2.10.5 Processing Incomming E-Mail with procmail
        10.2.11 Email with UUCP
        10.2.12 More Info
     10.3 Data Transport Between Different Machines
        10.3.1 Hardware
        10.3.2 Software
           10.3.2.1 Version Management Software
           10.3.2.2 CODA Filesystem
           10.3.2.3 WWWsync
           10.3.2.4 rsync
           10.3.2.5 Xfiles - file tree synchronization and cross-validation
           10.3.2.6 sitecopy
           10.3.2.7 KBriefcase
     10.4 Security in Different Environments
        10.4.1 Introduction
        10.4.2 Means of Security
     10.5 Dealing with Down Times (Cron Jobs)
     10.6 Noise Reduction
        10.6.1 Console (Shell) and X
        10.6.2 PCMCIA
        10.6.3 Miscellaneous Applications

  11. Other Resources

  12. Repairing the Hardware

  13. Solutions with Laptops

     13.1 Introduction
     13.2 Mobile Network Analyzer
     13.3 Mobile Router
     13.4 Hacking and Cracking Networks
     13.5 Lectures
     13.6 Mobile Data Collecting
        13.6.1 Related HOWTOs
        13.6.2 Applications
        13.6.3 Specific Environments
     13.7 Mobile Office
     13.8 Connection to Digital Camera
     13.9 Connection to QuickCam (Video)
     13.10 Connection to Television Set
     13.11 Connection to Cellular Phone
     13.12 Connection to Global Positioning System (GPS)
     13.13 Connection via Amateur Radio (HAM)
     13.14 Satellite Watching
     13.15 Aviation
     13.16 Blind or Visually Impaired Users

  14. Other Operating Systems

     14.1 DOS/Windows9x/NT
        14.1.1 Introduction
        14.1.2 AID CDATA dostools
        14.1.3 Partition Sharing
        14.1.4 Installation without CD Drive
        14.1.5 Miscellaneous
     14.2 BSD Unix
     14.3 OS/2
     14.4 NOVELL Netware
     14.5 Debian GNU/Hurd (hurd-i386)

  15. ToDo

  16. Revision History

  17. Credits

  18. Appendix A - Survey about Micro Linuxes

  19. Appendix B - Dealing with Limited Resources or Tuning the System

     19.1 Related HOWTOs
     19.2 Introduction
     19.3 Small Space
        19.3.1 Introduction
        19.3.2 Techniques
     19.4 Harddisk Speed
     19.5 Small Memory
        19.5.1 Related HOWTOs
        19.5.2 Techniques
     19.6 Low CPU Speed
     19.7 Power Saving Techniques
     19.8 Kernel
        19.8.1 Related HOWTOs
     19.9 Tiny Applications and Distributions
     19.10 Hardware Upgrade

  20. Appendix C - NeoMagic Chip NM20xx

     20.1 Introduction
     20.2 Textmode 100x37
        20.2.1 Survey
        20.2.2 More Details
           20.2.2.1 Enabling Linux to Boot in 800x600
           20.2.2.2 Running
           20.2.2.3 Now the Key Point
        20.2.3 Road Map

  21. Appendix D - Annotated Bibliography

  22. Appendix E - Resources for Specific Laptops

     22.1 IBM ThinkPad
     22.2 Toshiba Laptops
     22.3 COMPAQ Concerto Aero
     22.4 DELL Laptops


  ______________________________________________________________________

  1.  Preface

  Life is the first gift, love is the second, and understanding is the
  third. -- Marge Piercy <http://www.capecod.net/~tmpiercy/>


  1.1.  About the Author

  People like either laptops or desktops. I like to work with laptops
  rather than with desktops. I like Linux too. My first HOWTO was the
  Linux/IR-HOWTO <http://www.snafu.de/~wehe/index_li.html> about
  infrared support for Linux. My second is this one and my third the
  Ecology-HOWTO, about some ways to use Linux in an ecology aware
  manner.

  Also I have written some pages about Linux with certain laptops:
  Olivetti Echos 133 DM (German)
  <http://www.snafu.de/~wehe/echos133.html> (together with Kurt
  Saetzler), HP OmniBook 800CT <http://www.snafu.de/~wehe/hp800e.html>,
  HP OmniBook 3100 <http://www.snafu.de/~wehe/hp3100e.html> (together
  with Friedhelm Kueck) COMPAQ Armada 1592 DT
  <http://www.snafu.de/~wehe/armada1592dte.html> and COMMODORE C286LT
  <http://www.snafu.de/~wehe/c286lte.html>.

  During the work with the Laptop-HOWTO I have collected some surveys
  about laptop related hardware: graphic chips
  <http://www.snafu.de/~wehe/graphic_linux.html>, unofficially supported
  PCMCIA cards <http://www.snafu.de/~wehe/pcmcia_linux.html>, internal
  modems <http://www.snafu.de/~wehe/modem_linux.html> and infrared chips
  <http://www.snafu.de/~wehe/ir_misc.html>.

  But I don't claim to be a laptop guru, I just had the opportunity to
  install Linux on some laptops and I simply want to share the
  information I collected.

  Since I don't own a non-Intel based machine, this HOWTO might not
  contain all the details for non-Intel systems or may contain
  inaccuracies. Sorry.


  1.2.  Sponsoring

  This HOWTO is free of charge and free in the sense of the General
  Public Licence - GPL. Though it requires much work and could gain more
  quality if I would have some more hardware. So if you have a spare
  laptop, even an old one or one which requires repair, please let me
  know. Especially I need one with infrared port, USB port, DVD drive,
  WinModem and a non Intel machine. The according chapters need a major
  rewrite. For the curious, this HOWTO is written on a HP OmniBook 800CT
  5/100 <http://www.snafu.de/~wehe/hp800e.html>.

  Or sponsor a banner ad at my WWW pages LiLAC - Linux with Laptop
  Computers <http://www.snafu.de/~wehe/index_li.html>.

  You can hire me for readings or workshops on Linux with Laptops,
  Repairing of Laptops and other Linux topics, too.


  1.3.  About the Document (Mirrors, Translations, Versions, Formats,
  URLs)

  Many times I have mentioned MetaLab formerly known as SunSite. This
  site carries a heavy load, so do yourself a favor, use one of the
  MetaLab mirrors <http://metalab.unc.edu/pub/Linux/MIRRORS.html> .

  For Debian/GNU Linux the mirror URLs are organized in this scheme
  http://www.<country code, e.g. uk>.debian.org .

  This text is included in the LINUX DOCUMENTATION PROJECT - LDP
  <http://linuxdoc.org/> .

  Richard Worwood mirrors this HOWTO at
  http://www.felch01.demon.co.uk/laptop-howto.html
  <http://www.felch01.demon.co.uk/laptop-howto.html> .

  Lionel, "trollhunter" Bouchpan-Lerust-Juery, <trollhunter@linuxfr.org>
  provides a translation into French. You can download or browse it at
  http://infonomade.linuxfr.org/portables/ressourcesfr.html#howto
  <http://infonomade.linuxfr.org/portables/ressourcesfr.html#howto> .
  And he mirrors the English version at
  http://infonomade.linuxfr.org/portables/ressourcesen.html#howto
  <http://infonomade.linuxfr.org/portables/ressourcesen.html#howto>

  He has also written a HOWTO about portables and wearables, please look
  at his pages http://infonomade.linuxfr.org/index.html
  <http://infonomade.linuxfr.org/index.html> (French version)
  http://infonomade.linuxfr.org/indexen.html
  <http://infonomade.linuxfr.org/indexen.html> (English version).

  Translations into Japanese (Ryoichi Sato <rsato@ipf.de>), Italian
  (Alessandro Grillo <Alessandro_Grillo@tivoli.com>), Portuguese
  (Gledson Evers <pulga_linux@bol.com.br> the translation will be
  announced at LinuxALL <http://www.linuxall.org>) and Greek (Vassilis
  Rizopoulos <mscyvr@scs.leeds.ac.uk>) are under construction.

  Please contact me before starting a translation to avoid double work.
  Since a translation is a great amount of work, I recommend to do this
  work as a group.

  Nearly all of the programms I mention are available as Debian/GNU
  Linux <http://www.debian.org> packages, or as RPM packages, look up
  your favorite RPM server, for instance RUFUS
  <http://rufus.w3.org/linux/RPM/ByName.html> .

  The latest version of this document is available in different formats
  at LiLAC - Linux with Laptop Computers
  <http://www.snafu.de/~wehe/index_li.html> .


  1.4.  Contact

  This document isn't ready yet. If you like to write a chapter or even
  a smaller part by yourself, please feel free to contact me. Also your
  suggestions and recommendations and critics are welcome. But please
  don't expect me to solve your laptop related problems if the solution
  is already documented. Please read all according manual pages, HOWTOs
  and WWW sites first, than you may consider to contact me or the other
  resources mentioned below.

  Since I want to write much more stuff about mobile computing and Linux
  I'm thinking about turning this HOWTO into a book.

  Werner Heuser <wehe@snafu.de>


  2.  Copyright, Disclaimer and Trademarks

  Copyright (C) 1999 by Werner Heuser. This document may be distributed
  under the terms set forth in the LDP license
  <http://metalab.unc.edu/LDP/COPYRIGHT.html> .

  This is free documentation. It is distributed in the hope that it will
  be useful, but without any warranty. The information in this document
  is correct to the best of my knowledge, but there's a always a chance
  I've made some mistakes, so don't follow everything too blindly,
  especially if it seems wrong. Nothing here should have a detrimental
  effect on your computer, but just in case I take no responsibility for
  any damages incurred from the use of the information contained herein.

  Some laptop manufacturers don't like to see a broken laptop with an
  operating system other than the one shipped with it, and may reload
  MS-Windows if you complain of a hardware problem. They may even
  declare the warranty void. Though IMHO this isn't legal or at least
  not fair. Always have a backup of both the original configuration and
  your Linux installation if you have to get your laptop repaired.

  Though I hope trademarks will be superfluous sometimes (you may see
  what I mean at Open Source Definition
  <http://www.opensource.org/osd.html>) : If certain words are
  trademarks, the context should make it clear to whom they belong. For
  example "MS Windows NT" implies that "Windows NT" belongs to Microsoft
  (MS). Mac is a trademark by Apple Computer. All trademarks belong to
  their respective owners.


  3.  Which Laptop to Buy?


  3.1.  Introduction

  Portable computers may be divided into different categories. This is a
  subjective decision, but I try to do so. My groupings roughly follow
  the generally accepted marketing categories. The criteria could be:


  1. Weight: Often expressed in terms like Portables, Laptops/Notebooks,
     Sub/Mini-Notebooks, Palmtops/PDAs. There is no standard method to
     define the weight of a laptop, therefore the data provided by the
     manufacturers (and which are given below) have to be considered as
     approximations. The question is how the power supply (wether
     external or internal) or swappable parts like CD and floppy drive,
     are included in the weight.

     Most peripheral cables are appallingly heavy. If you get a
     subnotebook and carry it around with a bunch of external drives,
     cables, and port expander dongles and power converter, you may be
     lugging a heavier bag than if it were all in one box. Subnotebooks
     are useful mainly if you can afford to leave all the other junk
     behind.

  2. Supported Operations Systems: proprietary versus open

  3. Price: NoName versus Brand

  4. Hardware Features: display size, harddisk size, CPU speed, battery
     type, etc.

  5. Linux Support: graphic chip, sound card, infrared controller
     (IrDA), internal modem, etc.


  3.2.  Portables, Laptops/Notebooks, Sub/Mini-Notebooks, Palmtops,
  PDAs/HPCs


  3.2.1.  Portables

  Weight greater than 4.0 kg (9 lbs). Features like a PC, but in a
  smaller box and with LCD display. Examples: lunchbox or ruggedized
  laptops (e.g., http://www.bsicomputer.com/
  <http://www.bsicomputer.com/>)


  3.2.2.  Laptops/Notebooks

  Weight between 1.7 and 4.0 kg (4 to 9 lbs). Features custom hardware
  and usually a special CPU. Examples: HP OmniBook 3100, COMPAQ Armada
  1592DT. The terms laptop and notebook seem equivalent to me.


  3.2.3.  Sub-Notebooks/Mini-Notebooks

  Weight between 1.3 and 1.7 kg (3 to 4 lbs). Features: external floppy
  drive, external CD drive. Examples: HP OmniBook 800CT, Toshiba
  Libretto 100, COMPAQ Aero, SONY VAIO 505.


  3.2.4.  Palmtops

  Weight between 0.7 and 1.3 kg (1.5 to 3 lbs). Features: proprietary
  commercial operating systems. Examples: HP200LX.


  3.2.5.  Personal Digital Assistants (PDAs)/Handheld PCs (HPCs)

  Weight below 0.7 kg (1.5 lbs). Features: proprietary commercial
  operating systems and often non-Intel CPU with commercial operating
  systems like PalmOS, EPOC32, GEOS, Windows CE. Examples: Newton
  Message Pad, Palm III (former Pilot), Psion Series 3 and 5, CASIO
  Z-7000.


  3.2.6.  Wearables

  Watches, digital pens, calculators, digital cameras, cellular phones
  and other wearables.


  3.3.  Linux Features

  Due to a lack of support by some hardware manufacturers, not every
  feature of a laptop is always supported or fully operational. The main
  devices which may cause trouble are: graphic chip, IrDA port, sound
  card, PCMCIA controller , PnP devices and internal modem. Please try
  to get as much information about these topics before buying a laptop.
  But often it isn't quite easy to get the necessary information.
  Sometimes even the specifications or the hotline of the manufacturer
  aren't able to provide the information. Therefore I have included a
  Linux Compatibility Check chapter in the Hardware In Detail sections
  below.

  Depending on your needs, you might investigate one of the vendors that
  provide laptops pre-loaded with Linux. By purchasing a pre-loaded
  Linux laptop, much of the guesswork and time spent downloading
  additional packages could be avoided. See Kenneth E. Harker's page for
  a list of vendors http://www.cs.utexas.edu/users/kharker/linux-laptop/
  <http://www.cs.utexas.edu/users/kharker/linux-laptop/>.


  3.4.  Main Hardware Features

  Besides its Linux features, there often are some main features which
  have to be considered when buying a laptop. For Linux features please
  see the Hardware In Detail section below.


  3.4.1.  Weight

  Don't underestimate the weight of a laptop. This weight is mainly
  influenced by:


  1. screen size

  2. battery type

  3. internal components, such as CD drive, floppy drive

  4. power supply

  5. material used for the case, usually they are either from plastics
     or from magnesium.


  3.4.2.  Display

  Laptops come with one of two types of displays: active matrix (TFT)
  and passive matrix (DSTN). Active matrix displays have better color
  and contrast, but usually cost more and use more power. Also consider
  the screen size. Laptops may be purchased with screens up to 15". A
  bigger screen weighs more, costs more, and is harder to carry, but is
  good for a portable desktop replacement.


  3.4.3.  Batteries

  The available battery types are Lithium Ion (LiIon), Nickel Metal
  Hydride ( NiMH) and Nickel Cadmium (NiCd).

  LiIon batteries are the most expensive ones but a lot lighter than
  NiCd for the same energy content, and have minimal -- but present --
  memory effects. NiMH is better than NiCd, but still rather heavy and
  does suffer some (although less than NiCd) memory effects.

  Unfortenately most laptops come with a proprietary battery size. So
  they are not interchangeable between different models.


  3.4.4.  CPU


  3.4.4.1.  Supported CPU Families

  For details about systems which are supported by the Linux Kernel, see
  the Linux FAQ <http://www.cl.cam.ac.uk/users/iwj10/linux-faq/> . See
  also Current ports of Linux OS
  <http://www.ctv.es/USERS/xose/linux/linux_ports.html>


  1. i286: Linux doesn't support this CPU family yet. But there are some
     efforts at ELKS <http://www.elks.ecs.soton.ac.uk/>. If you like,
     you may use Minix <http://www.cs.vu.nl/~ast/minix.html> one of the
     predecessors of Linux. Minix supports 8088 to 286 with as little as
     640K memory. Actually there are some laptops with ELKS around, for
     instance the Commodore C286LT
     <http://www.snafu.de/~wehe/c286lte.html>

  2. i386: This covers PCs based on Intel-compatible processors,
     including Intel's 386, 486, Pentium, Pentium Pro and Pentium II,
     and compatible processors by AMD, Cyrix and others. Most of the
     currently available laptops use Intel compatible CPUs and have
     quite good Linux support.

  3. m68k: This covers Amigas and Ataris having a Motorola 680x0
     processor for x>=2; with MMU. And the early Apple/Macintosh
     computers.

     There was a long series of Apple PowerBooks and other laptops based
     on the m68k chip. Macintosh Portable (an ugly 16-pound first
     attempt); PowerBook 100, 140, 170, 145, 160, 180c, 165c, 520c,
     540c, 550c, 190; Duo 210, 230, 250, 270c, 280. The PowerBook Duos
     were available at the same time as the PowerBooks, they were a sort
     of subnotebook, but were designed so that you could plug them into
     a base station (a DuoDock) with more RAM, peripherals, etcetera, so
     that they could also act as a desktop computer. The first PowerPC
     PowerBooks were the ill-starred PowerBook 5300 (after the 190) and
     the Duo 2300c.

     For a complete list of all Macintosh computers ever made, with
     specifications, see Apple-History <http://www.apple-
     history.com/gallery.html>.

     Note also that readers should *not* go to www.linuxppc.org for
     hardware compatibility with 68k laptops--as the name implies,
     LinuxPPC is only for PowerPC machines. The proper place to go for
     information on running Linux on m68k Macintoshes is: linux-m68k
     <http://www.mac.linux-m68k.org/>.

     In particular, their hardware compatibility list is at: linux-m68k-
     status <http://www.mac.linux-m68k.org/status/sysreq.html> and it
     states in regards to laptops:

     "Much like laptops of the Intel/Linux world, Mac laptops have
     generally different setups that can be very hard to figure out.
     Also, because of a general lack of machines to test, we are only
     aware of boots on the Powerbook 145, Powerbook 150, Powerbook 170,
     Powerbook 180, and Powerbook 190. Even if it boots, we currently
     have no support for Powerbook-style ADB, the APM support, or just
     about anything else on them. This means the only way to log in is
     with a terminal hooked up to the serial interface, this has been
     tested on the 170."

     "Several Powerbooks have internal IDE which is supported. PCMCIA
     drivers will be forthcoming if someone can supply the necessary
     hardware information to write a driver. As always, an FPU is needed
     also. Many of the later models have the 68LC040 processor without
     FPU, and many of these processors are broken with respect to the
     FPU trap mechanism so they can't run regular Linux binaries even
     with FPU emulation. Current status on Powerbooks 140, 160, 165,
     165c, 180c, 190, 520 and Duos 210, 230, 250, 270c, 280, and 280c is
     unknown."


     Also there are two Atari laptops, for which I don't have enough
     information. The following quotations are from the Atari Gallery
     <http://capybara.sk-pttsc.lj.edus.si/yescrew/eng/atari.htm>.

     "The STacy was released shortly after the Mega ST to provide a
     portable means of Atari computing. STacy computers were shipped
     with TOS v1.04.

     Designed to replace the STacy as the defacto portable ST computer,
     the ST Book brought the basic computing power of an ST to a
     lightweight notebook computer. This machine was only released in
     Europe and Atari only shipped a very small quantity. The ST Book
     was shipped with TOS v2.06."

     Is there an Amiga notebook?


  4. PowerPC (PPC): Although some driver support present in Intel based
     Linux is still missing for Linux PPC, it is a fully usable system
     for Macintosh PowerBooks. See LinuxPPC
     <http://www.linuxppc.org/hardware/> for a current list of supported
     machines.

     BTW: The team at iMac Linux <http://www.imaclinux.net> has managed
     to get the iMac DV to boot Linux to a usable point. You may get
     information about the iBook there as well.


  5. Alpha, Sparc, Sparc64 architectures: These are currently under
     construction. AFAIK there are only the Tadpole SPARC and ALPHA
     laptops, and some other ALPHA laptops available. For a current
     survey look at Kenneth E. Harker's Linux on Laptops without x86
     Family Processors at http://www.cs.utexas.edu/users/kharker/linux-
     laptop/non-intel.html
     <http://www.cs.utexas.edu/users/kharker/linux-laptop/non-
     intel.html> .

  6. StrongARM: a very low-power CPU found in Rebel.com's popular
     NetWinder (some kind of mobile computer, too), and actively
     supported in the Debian project, it is also in several WinCE
     machines, such as HP's Jornadas. Only the lack of tech specs
     prevents Linux from being ported to these tiny, long-battery-life
     machines. A full-scale StrongARM-based laptop would make a superb
     Linux platform, but none exists yet.

     For PDAs with ARM/StrongARM CPU see the PDA chapter below.


  7. MIPS: Used in SGI mainframes and Cobalt Micro intranet appliances,
     chips based on this architecture are used in many Wince machines.
     Linux has been ported to a few of these, including the lovely
     little Vadem Clio. Vadem has been admirably cooperative.

     More about Linux on Wince boxes may be found at LinuxCE-FAQ
     <http://www.2gn.com/~jjorgens/linuxce_faq.html>.



  3.4.4.2.  Miscellaneous

  At higher speed, a CPU consumes more power and generates more heat.
  Therefore, in many laptops a special low-power CMOS CPU is used.
  Usually, this special CPU doesn't use as much power as a similar
  processor used in a desktop. These special CPUs are also more
  expensive. As a side effect you may find that laptops with a desktop
  CPU often have a fan which seems quite loud.


  3.4.5.  Cooling

  An enormously important issue.  Anything based on PPC or Pentium will
  generate enormous amounts of heat which must be dissipated.Generally,
  this means either a fan, or a heat sink the size of the case.If it's a
  fan, the air path had better not ever get blocked, or it will overhead
  and burn out.This means machines with a fan mounted in the bottom are
  a big, big mistake: you can't use them on a soft surface.


  3.4.6.  Keyboard Quality

  Though you might use your desktop computer to do longer writings, a
  good keyboard can save you some headaches and finger-aches. Look
  especially for the location of special keys like: <ESC>, <TAB>,
  <Pos1>, <End>, <PageDown>, <PageUp> and the cursor keys.



  3.4.7.  Price

  Laptops are quite expensive if you compare them with desktops. So you
  may decide between a brand or no-name product. Though I would like to
  encourage you to take a no-name product, there are some caveats. I
  have experienced that laptops break often, so you are better off, when
  you have an after sales warranty, which is usually only offered with
  brand products. Or you may decide to take a second hand machine. When
  I tried this, I discovered that the laptop market is changing quite
  often.  A new generation is released approximately every three months
  (compared by CPU speed, harddisk capacity, screen size etc.). So
  laptops become old very quick. But this scheme often isn't followed by
  the prices for second hand laptops. They seem too expensive to me.
  Anyway if you plan on purchasing a second hand machine, review my
  recommendations on checking the machine. For German readers there is
  an online market place at http://www.hardware.de
  <http://www.hardware.de>, which offers a good survey about current
  prices for second hand machines.


  3.4.8.  Power Supply

  If you travel abroad pay attention to the voltage levels which are
  supported by the power supply. Also the power supply is often one of
  the heavier parts of a laptop.


  3.5.  Sources of More Information

  Specifications, manuals and manufacturer support often are not
  helpful. Therefore you should retrieve information from other sources
  too:


  1. Highly recommended is the survey by Kenneth E. Harker
     http://www.cs.utexas.edu/users/kharker/linux-laptop/
     <http://www.cs.utexas.edu/users/kharker/linux-laptop/> .

  2. ftp://tsx-11.mit.edu/pub/linux/packages/laptops/
     <ftp://tsx-11.mit.edu/pub/linux/packages/laptops/> .

  3. Hardware-HOWTO

  4. open hardware - The Open Hardware Certification Program
     http://www.debian.org/OpenHardware/
     <http://www.debian.org/OpenHardware/>

  5. HARDWARE.doa.org - dedicated to the hardware aspects of (Linux)
     computing  http://hardware.doa.org/ <http://hardware.doa.org/>

  6. How to Build a PC FAQ - excellent hardware overview by Billy Newsom
     http://www.motherboards.org/build.html
     <http://www.motherboards.org/build.html>

  7. Last but not least the WWW itself.


  3.6.  Linux Compatibility Check


  3.6.1.  Related HOWTOs



  1. Hardware-HOWTO

  2. Kernel-HOWTO

  3. PCMCIA-HOWTO

  4. PCI-HOWTO

  5. Plug-and-Play-mini-HOWTO


  3.6.2.  Check Methods in General

  If you can't find the necessary information through the above
  mentioned sources, you are on your own. Luckily, Linux provides many
  means to help. For details see the Hardware on Detail section below.
  In general you may use:


  1. First of all the kernel itself. Look up what kind of hardware is
     detected by the kernel. You get this information during boot time
     or usually by dmesg or by looking into /var/log/messages.

  2. If your kernel supports the /proc file system you may get detailed
     information about PCI devices by cat /proc/pci Please read the
     kernel documentation pci.txt. You may get further information about
     unknown PCI devices at the database from Craig Hart at
     http://members.hyperlink.net.au/~chart
     <http://members.hyperlink.net.au/~chart>. From 2.1.82 kernels on
     you may use the lspci command from the pci-utils package.

  3. To retrieve information about Plug-and-Play (PNP) devices use
     isapnp-tools .

  4. Use scsi_info by David Hinds for SCSI devices or scsiinfo.

  If you don't want to install a complete Linux you may retrieve this
  information by using a micro Linux ( see appendix A). The package
  muLinux provides even a small systest program and TomsRtBt comes with
  memtest. To use memtest you have to copy it on a floppy dd
  if=/usr/lib/memtest of=/dev/fd0 and to reboot from this floppy.

  If your laptop came with Windows, you may determine a lot of hardware
  settings from the installation. Boot into DOS or Windows to get the
  information you need.

  Using Windows9x/NT to get hardware settings, basically boot Windows,
  then Start -> Settings -> Control Panel -> System -> Device Manager
  and write down everything, or make a hardcopy from the display using
  the <PRINT> key, plus keep a log of settings, hardware, memory, etc.

  Using MS-DOS and Windows3.1x you can use the command msd, which is an
  akronym for MicroSoft Diagnostics. Or you might try one of the
  numerous DOS shareware utilities: CHECK-IT, DR.HARD and others.

  Sometimes it's difficult to know what manufacturer has built the
  machine or parts of it actually. The FCC <http://www.fcc.gov/fcc-
  bin/ead> "Federal Communications Commission On-line Equipment
  Authorization Database may be used, if you are having problems
  identifying the manufacturer of a laptop or notebook computer (or
  other electronic device,) this site lets you search the FCC database
  based on the FCC ID number you can usually find on the equipment if it
  was marketed in the United States of America."

  The Lothar Project <http://www.linux-mandrake.com/lothar/> is a
  Mandrake-related project to provide a GUIed interface to get at
  hardware configuration information on Linux-based systems. It provides
  a library for different system informations, too.

  Many laptops are no more compatible with Windows than Linux. David
  Hinds, author of the PCMCIA drivers, points out that Toshiba notebooks
  use a proprietary Toshiba PCMCIA bridge chip that exhibits the same
  bugs under Windows as under Linux. IBM Thinkpads have serious BIOS
  problems that affect delivery of events to the power management daemon
  apmd. These bugs also affect MS-Windows, and are listed in IBM's
  documentation as considerations.

  Some incompatibilities are temporary, for instance laptops that have
  Intel's USB chip will probably get full USB support, eventually.


  3.7.  Writing a Device Driver

  If you encounter a device which is not yet supported by Linux, don't
  forget it's also possible to write a driver by yourself. You may look
  at the book from Alessandro Rubini, Andy Oram: Linux Device Drivers.



  3.8.  Buying a Second Hand Laptop

  Some recommendations to check an used laptop, before buying it:


  1. Review the surface of the case for visible damages.

  2. Check the display for pixel faults. Maybe it's useful to take a
     magnifying glass therefore.

  3. Do an IO stress-test, .e.g. with the tool bonnie.

  4. You may use memtest and crashme to achieve a memory test.

  5. Do a CPU stress test, e.g. with the tool Byte or by compiling a
     kernel.

  6. Check the floppy drive by formatting a floppy.

  7. Check the CD drive by reading a CD.

  8. To check the battery seems difficult, because it needs some time:
     one charge and one work cycle.

  9. To check the surface of the harddisk you may take e2fsck. There is
     also a Linux tool dosfsck or the other fsck tools.

  10.
     To test the entire disk (non-destructively), time it for
     performance, and determine its size, as root do: time dd
     if=/dev/hda of=/dev/null bs=1024k .

  11.
     Check wether the machine seems stolen. I have provided a survey of
     databases for stolen laptops
     <http://www.snafu.de/~wehe/stolen_laptops.html>.

  AFAIK there is no Linux tool like the DOS tools CHECK-IT, DR. HARD,
  SYSDIAG and others. These tools include many of the tests in one
  integrated suite. One of the best IMHO is the tool PC Diagnostics 95
  made by Craig Hart http://members.hyperlink.net.au/~chart
  <http://members.hyperlink.net.au/~chart> . Despite the 95 in its name
  it's plain DOS, tiny (76KB programm and 199KB data) reliable and free.
  Unfortenately it contains no check for the IrDA port.

  Please note this quotation from the disclaimer: "This program is
  written with the target audience being a trained, experienced
  technician. It is NOT designed to be used by those ignorant of
  computer servicing. Displays are not pretty but functional.
  Information is not explained since we are not trying to educate. This
  software should be considered to be just like any other tool in a
  tech's toolbox. It is to be applied with care, in the right situation,
  in order to find answers to specific problems. If you are an end user
  who is less than confident of dealing with computer hardware, this is
  probably not a program for you."

  Laptop computers, unlike desktop machines, really do get used up.
  Lithium batteries are good for no more than 400 recharge cycles,
  sometimes much fewer. Keyboards wear out. LCD screen backlighting
  grows dim. Mouse buttons fail. Worst of all, connectors get loose as a
  result of vibration, causing intermittent failures (e.g. only when you
  hit the <Enter> key). We have heard of a machine used on the table in
  a train being shaken to unusability in one trip.


  3.9.  No Hardware Recommendations

  It's difficult to give any recommendations for a certain laptop model
  in general. Your personal needs have to be taken into account. Also
  the market is changing very quickly. I guess every three months a new
  generation of laptops (according to harddisk space, CPU speed, display
  size, etc.) comes into the market. So I don't give any model or brand
  specific recommendations.


  4.  Laptop Distribution


  4.1.  Requirements

  From the Battery-HOWTO I got this recommendation (modified by WH):

  A Message to Linux Distributors

  If you happen to be a Linux distributor, thank you for reading all
  this. Laptops are becoming more and more popular, but still most Linux
  distributions are not very well prepared for portable computing.
  Please make this section of this document obsolete, and make a few
  changes in your distribution.

  The installation routine should include a configuration, optimized for
  laptops. The minimal install is often not lean enough. There are a lot
  of things that a laptop user does not need on the road. Just a few
  examples. There is no need for three different versions of vi (as
  found in Suse Linux). Most portable systems do not need printing
  support (they will never be connected to a printer, printing is
  usually done with the desktop system at home). Quite a few laptops do
  not need any network support at all.

  Don't forget to describe laptop-specific installation problems, e. g.
  how to install your distribution without a cd-rom drive or how to
  setup the plip network driver.

  Add better power management and seamless PCMCIA support to your
  distribution. Add a recompiled kernel and an alternative set of PCMCIA
  drivers with apm support that the user can install on demand. Include
  a precompiled apmd package with your distribution.

  Add support for dynamically switching network configurations. Most
  Linux laptops travel between locations with different network settings
  (e. g. the network at home, the network at the office and the network
  at the university) and have to change the network ID very often.
  Changing a Linux system's network ID is a pain with most
  distributions.

  Add a convenient PPP dialer with an address book, that does not try to
  start multiple copies of the PPP daemon if you click on the button
  twice (e.g., the RedHat usernet tool). It would be nice to have the
  PPP dialer also display the connection speed and some statistics. One
  nice command line dialer that autodetects modems and PPP services is
  wvdial from Worldvisions http://www.worldvisions.ca/wvdial/
  <http://www.worldvisions.ca/wvdial/>.


  4.2.  Recommendation

  The Debian/GNU Linux <http://www.debian.org> has most of the desired
  features for a laptop installation. The distribution has a quite
  flexible installation tool. The installation process is well
  documented, especially concerning the methods which are useful at
  laptops. All the binaries are tiny, because they are stripped. A
  mailing list debian-laptop including a searchable archiv is provided.
  And Debian/GNU Linux is free.

  At the end of August 1999 the Debian Laptop Distribution - Proposal
  <http://www.snafu.de/~wehe/debian_linux.html> was issued. And some
  more laptop related packages and a Debian meta-package dedicated to
  laptops are on the way.

  Note: I know other Linux distributions work well with laptops, too. I
  even tried some of them, see my pages about certain laptops mentioned
  above.


  5.  Installation


  5.1.  Related HOWTOs


  1. CDROM-HOWTO

  2. Config-HOWTO

  3. Diskless-mini-HOWTO

  4. Installation-HOWTO

  5. Pre-Installation-Checklist-mini-HOWTO

  6. Update-mini-HOWTO

  7. Hard-Disk-Upgrade-mini-HOWTO

  8. Installation and getting started by Matt Welsh and others available
     at the LINUX DOCUMENTATION PROJECT http://metalab.unc.edu/LDP
     <http://metalab.unc.edu/LDP>

  9. Installing Debian Linux 2.1 For x86 by Bruce Perens, Sven Rudolph,
     Igor Grobman, James Treacy, Adam P. Harris
     ftp://ftp.debian.org/debian/dists/slink/main/disks-
     i386/current/install.html
     <ftp://ftp.debian.org/debian/dists/slink/main/disks-
     i386/current/install.html>

  10.
     Install-From-Zip-mini-HOWTO

  11.
     ZIP-Drive-mini-HOWTO  <http://www.torque.net/~campbell>

  5.2.  Prerequisites - Partitioning

  Partitioning can be done in a very sophisticated way. Currently I have
  only some first thoughts. I assume that with laptops there are still
  some reasons (e.g. updating the firmware of PCMCIA cards and BIOS) to
  share Linux and Windows9x/NT. Depending on your needs and the features
  of your laptop you could create the following partitions:


  o  BIOS, some current BIOSes use a separate partition

  o  suspend to disk, some laptops support this feature

  o  swap space Linux

  o  swap space Windows9x/NT

  o  Linux base

  o  Linux /home or data

  o  common data between Linux and Windows9x/NT

  Note this chapter isn't ready yet. Please read the according HOWTOs
  first.


  5.3.  Linux Tools to Repartition a Hard Disk


  5.3.1.  GNU parted

  GNU parted <http://www.alphalink.com.au/~clausen/parted/> allows you
  to create, destroy, resize and copy partitions. It currently supports
  ext2 and fat (fat16 and fat32) filesystems, and MS-DOS disklabels.
  This program can destroy data, and is not yet safe for general use.
  parted is currently in its early developement stage.


  5.3.2.  ext2resize

  ext2resize <http://www.dsv.nl/~buytenh/ext2resize/> is a program
  capable of resizing (shrinking and growing) ext2 filesystems. Checks
  whether the new size the user gave is feasible (i.e. whether the fs
  isn't too occupied to shrink it), connected to the parted project.


  5.3.3.  fixdisktable

  Something was recently published on the <linux-
  kernel@vger.rutgers.edu> mailing list about a partition recovery
  program. I have not used this, nor examined it, nor read much about it
  (except for the HTML page.) It may be useful to some of you if you
  have problems with FIPS, Ranish Partition Manager/Utility or Partition
  Magic destroying your partition information. You can find information
  on this partition-fixer named "fixdisktable" at
  http://bmrc.berkeley.edu/people/chaffee/fat32.html
  <http://bmrc.berkeley.edu/people/chaffee/fat32.html>. It is quite a
  ways down in that page. Or look for it via ftp in
  ftp://bmrc.berkeley.edu/pub/linux/rescue/
  <ftp://bmrc.berkeley.edu/pub/linux/rescue/> and locate the latest
  "fixdisktable" in that ftp directory. (Source and binary dist should
  be available.)



  5.3.4.  Caveats

  Before repartitioning your harddisk take care about the disk layout.
  Especially look for hidden disk space or certain partitions used for
  suspend to disk or hibernation mode. Some laptops come with a
  partition which contains some BIOS programs (e.g. COMPAQ Armada
  1592DT). Search the manual carefully for tools like PHDISK.EXE,
  Suspend to Disk, Diagnostic TOOLS.

  Please see chapter ``DOS Tools to Repartition a Hard Disk'', too.

  By Nathan Myers from LL - LinuxLaptops <http://www.linuxlaptops.com>:
  "I partitioned a 10G Thinkpad drive last week and then none of fdisk,
  cfdisk, or sfdisk would read the partition table any more. It turns
  out I had created a partition that started on cylinder 1024, and
  there's a bug common to all three programs that makes them fail in
  that case. (I didn't try Disk Druid.) So, maybe you should add some
  advice about not starting partitions on that cylinder."


  5.3.5.  Multi Boot

  Please see the Different Environments chapter, for information about
  booting different operating systems from the same harddisk.


  5.4.  Installation Methods

  From the Battery-HOWTO:"Installing and using Linux on a laptop is
  usually no problem at all, so go ahead and give it a try. Unlike some
  other operating systems, Linux still supports and runs well on even
  very old hardware, so you might give your outdated portable a new
  purpose in life by installing Linux on it."

  One of the great benefits of Linux are its numerous and flexible
  installation features, which I don't want to describe in detail.
  Instead I try to focus on laptop specific methods, which are necessary
  only in certain circumstances.

  Most current distributions support installation methods which are
  useful for laptops, including installation from CD-ROM, via PCMCIA and
  NFS (or maybe SMB). Please see the documents which are provided with
  these distributions for further details or take a look at the above
  mentioned manuals and HOWTOs.


  5.5.  From a Boot Floppy plus CD-ROM - The Usual Way

  With modern laptops, the usual Linux installation (one Boot Floppy,
  one Support Floppy, one Packages CD-ROM) should be no problem, if
  there is are floppy drive and a CD-ROM drive available. Though with
  certain laptops you might get trouble if you can not simultaneously
  use the floppy drive and CD-ROM drive , or if the floppy drive is only
  available as a PCMCIA device, as with the Toshiba Libretto 100. Some
  laptops support also booting and therefore installation completely
  from a CD drive, as reported for the SONY VAIO in the VAIO-HOWTO.
  Note: Check the BIOS for the CD boot option and make sure your Linux
  distribution comes on a bootable CD.

  Certain laptops will only boot zImage kernels. bzImage kernels won't
  work. This is a known problem with the IBM Thinkpad 600 and Toshiba
  Tecra series, for instance. Some distributions provide certain boot
  floppies for these machines or for machines with limited memory
  resources, Debian/GNU Linux http://www.debian.org
  <http://www.debian.org> for instance.

  5.6.  From a DOS or Windows Partition at the Same Machine

  This is a short description of how to install from a CD-ROM under DOS
  without using boot or supplemental floppy diskettes. This is
  especially useful for notebooks with swappable floppy and CD-ROM
  components (if both are mutually exclusive) or if they are only
  available as PCMCIA devices. I have taken this method from "Installing
  Debian GNU/Linux 2.1 For Intel x86 - Chapter 5 Methods for Installing
  Debian" http://www.debian.org <http://www.debian.org> :


  1. Get the following files from your nearest Debian FTP mirror and put
     them into a directory on your DOS partition: resc1440.bin
     drv1440.bin base2_1.tgz root.bin linux install.bat and loadlin.exe.

  2. Boot into DOS (not Windows) without any drivers being loaded. To do
     this, you have to press <F8> at exactly the right moment.

  3. Execute install.bat from that directory in DOS.

  4. Reboot the system and install the rest of the distribution, you may
     now use all the advanced features such as PCMCIA, PPP and others.

  This should work for other distributions with similar changes. For
  RedHat see How to Install from CD-ROM without Boot and Supplemental
  Disks <http://www.cs.utexas.edu/users/kharker/linux-
  laptop/install_advice.html> .

  Some new laptops may be able to boot a Linux distribution on a
  bootable CD-ROM (e.g., RedHat). This would allow installation without
  a floppy disk drive.


  5.7.  From a Second Machine With a Micro Linux On a Floppy


  5.7.1.  Introduction

  Because of their small or non-existent footprint, micro-Linuxes are
  especially suited to run on laptops, particularly if you use a
  company-provided laptop running Windows9x/NT. Or for installation
  purposes using another non Linux machine. There are several micro
  Linux distributions out there that boot from one or two floppies and
  run off a ramdisk. See appendix A for a listing of distributions.

  I tried the following with muLinux http://mulinux.firenze.linux.it/
  <http://mulinux.firenze.linux.it/> to clone my HP OmniBook 800 to a
  COMPAQ Armada 1592DT. Thanks to Michele Andreoli, maintainer of
  muLinux for his support. Since muLinux doesn't support PCMCIA yet, you
  may use TomsRtBt instead. In turn TomsRtBt doesn't support PPP but
  provides slip. Note: Since version 7.0 muLinux provides an Add-On with
  PCMCIA support.

  I have described how to copy an already existing partition, but it
  might be also possible to achieve a customized installation. Note:
  Usually you would try to achieve an installation via NFS, which is
  supported by many distributions. Or if your sources are not at a Linux
  machine you might try the SMB protocol with SAMBA, which is also
  supported by muLinux .


  5.7.2.  Prerequisites

  You need two machines equipped with Linux. With the laptop
  (client/destination) on which you want to install Linux use the
  muLinux floppy. The other machine (server/source) may be a usual Linux
  box or also using muLinux. Though its low transfer rate I use a serial
  null modem cable because its cheap. You may apply the according method
  using a PCMCIA network card and a crossover network cable or a HUB, or
  a parallel "null modem" cable and PLIP. As the basic protocol I used
  PPP, but you may also use SLIP. For the data-transfer I used nc. Note:
  this is an abbrevation for netcat, some distributions use this as the
  program name. You may use ftp, tftp, rsh, ssh, dd, rcp, kermit, NFS,
  SMB and other programs instead.

  Basic requirements are:


  1. A good knowledge about using Linux. You have to know exactly what
     you are doing, if not you might end destroying former
     installations.

  2. A nullmodem serial cable.


  5.7.3.  Source Machine

  At your source machine issue the following commands (attention: IP
  address, port number, partition and tty are just examples!):


  1. Edit /etc/ppp/options, it should contain only:

     ___________________________________________________________________
     /dev/ttyS0
     115200
     passive
     ___________________________________________________________________



  2. With muLinux versions 3.x you may even use the convenient command
     setup -f ppp .

  3. Start PPP: pppd .

  4. Configure the PPP network device: ifconfig ppp0 192.168.0.1 .

  5. Add the default route: route add default gw 192.168.0.1 .

  6. Check the network connection: ping 192.168.0.2, though the
     destination machine isn't up yet.

  7. Start the transfer from another console, remember <LEFT-ALT><Fx>:
     cat /dev/hda2 | gzip -c | nc -l -p 5555 .

  8. After the transfer (there are no more harddisk writings) stop the
     ping: killall ping .


  5.7.4.  Destination Machine

  At the destination machine issue:


  1. Edit /etc/ppp/options, it should contain only:



     ___________________________________________________________________
     /dev/ttyS0
     115200
     passive
     ___________________________________________________________________



  2. With muLinux versions >= 3.x you may even use the convenient
     command setup -f ppp .

  3. Start PPP: pppd .

  4. Configure the PPP network device: ifconfig ppp0 192.168.0.2 .

  5. Add the default route: route add default gw 192.168.0.2 .

  6. Check the network connection, by pinging to the source machine:
     ping 192.168.0.1 .

  7. Change to another console and get the data from the server: nc
     192.168.0.1 5555 | gzip -dc >/dev/hda4 .

  8. 400 MB may take app. 6 hours, but YMMV.

  9. Stop the transfer, when it is finished with: <CTL><C> . This can
     probably be avoided (but I didn't test it) by adding a timeout of 3
     seconds using the -w 3 parameter for nc at the destination machine
     nc -w 3 192.168.0.1 5555 | gzip -dc >/dev/hda4

  10.
     After the transfer is completed, stop the ping: killall ping .


  5.7.5.  Configuration of the Destination Machine after the Transfer



  1. Edit /etc/fstab .

  2. Edit /etc/lilo.conf and /etc/lilo.msg and start lilo .

  3. Set the new root device to the kernel: rdev image root_device .


  5.7.6.  Miscellaneous



  1. You may use bzip2 the same way as gzip (untested).

  2. Since rshd, sshd, ftpd daemons are not available with muLinux you
     have to build your own daemon with nc aka netcat, as described
     above.

  3. I had to set up both PPP sides very quick or the connection broke,
     I don't know why.

  4. Speed optimization has to be done, asyncmap 0 or local?

  5. I checked this only with a destination partition greater than the
     source partition. Please check dd instead of cat therefore.

     Or do the following (untested): At the destination machine cd into
     the root directory / and do nc -l -p 5555 | bzip2 -dc | tar xvf -.
     At the source machine machine cd into the root directory / and do
     tar cvf - . | bzip2 | nc -w 3 192.168.0.2 5555. This should shorten
     the time needed for the operation, too. Because only the allocated
     blocks need to be transfered.


  6. Don't mount the destination partition.


  5.8.  From a Second Machine With a 2.5" Hard Disk Adapter

  From Adam Sulmicki adam@cfar.unc.edu I got this hint: Most but not all
  harddisks in laptops are removable, but this might be not an easy
  task. You could just buy one of those cheap 2.5" IDE
  converters/adapters which allow you to connect this harddisk
  temporarily to a PC with IDE subsystem, and install Linux as usual
  using that PC. You may do so using the harddisk as the first IDE drive
  or besides as the second IDE drive. But than you need to be sure that
  lilo writes to the right partition. Also you have to make sure that
  you use the same translation style as your laptop is going to use
  (i.e. LBA vs. LARGE vs. CHS ). You find additional information in the
  Hard-Disk-Upgrade-mini-HOWTO. You might copy an existing partition,
  but it is also possible to achieve a customized installation.


  5.9.  From a PCMCIA Device

  Since I don't have a laptop which comes with a PCMCIA floppy drive
  (for instance Toshiba Libretto 100), I couldn't check this method.
  Please see the chapter Booting from a PCMCIA Device in the PCMCIA-
  HOWTO. Also I couldn't check whether booting from a PCMCIA harddisk is
  possible.

  Anyway, when you are able to boot from a floppy and the laptop
  provides a PCMCIA slot, it should be possible to use different PCMCIA
  cards to connect to another machine, to an external SCSI device,
  different external CD and ZIP drives and others. Usually these methods
  are described in the documentation which is provided with the
  distribution.


  5.10.  From a Parallel Port Device (ZIP Drive, CD Drive)

  I couldn't check this method by myself, because I don't have such a
  device. Please check the according Install-From-Zip-mini-HOWTO and CD-
  HOWTO. Also I don't know how much these installation methods are
  supported by the Linux distributions or the micro Linuxes. I suppose
  you have to fiddle around a bit to get this working.


  5.11.  From a Second Machine Using the Parallel Port - PLIP Network
  Install

  I got this courtesy by Nathan Myers <ncm@cantrip.org>: "Many
  distributions support installing via a network, using FTP, HTTP, or
  NFS. It is increasingly common for laptops to have only a single
  PCMCIA slot, already occupied by the boot floppy drive. Usually the
  boot floppy image has drivers for neither the floppy drive itself, nor
  the PCMCIA subsystem. Thus, the only network interface available may
  be the parallel port.

  Installation via the parallel port using the PLIP protocol has been
  demonstrated on, at least, Red Hat. All you need is a Laplink parallel
  cable, cheap at any computer store. See the PLIP-mini-HOWTO for
  details on setting up the connection. Note that (uniquely) the RedHat
  installation requires that the other end of the PLIP connection be
  configured to use ARP (apparently because RedHat uses the DOS driver
  in their installer). On the host, either export your CD file system on
  NFS, or mount it where the ftp or web daemon can find it, as needed
  for the installation."

  The PLIP Install HOWTO by Gilles Lamiral describes how to install the
  Debian GNU-Linux distribution on a computer without ethernet card, nor
  cdrom, but just a local floppy drive and a remote nfs server attached
  by a Null-Modem parallel cable. The nfs server has a cdrom drive
  mounted and exported.


  5.12.  Installing Linux on Small Machines

  If you have less than 8MB memory and want to install via NFS you may
  get the message "fork: out of memory". To handle this problem, use
  fdisk to make a swap partition (fdisk should be on the install floppy
  or take one of the mini Linuxes described above). Then try to boot
  from the install floppy again. Before configuring the NFS connection
  change to another console (for instance by pressing <ALT><2>) and
  issue swapon /dev/xxx   (xxx = swap partition ). Thanks to Thomas
  Schmaltz.


  6.  Hardware In Detail


  6.1.  PCMCIA Controller


  6.1.1.  Linux Compatibility Check

  With the probe command, which is included in the PCMCIA-CS package by
  David Hinds you can get the type of the PCMCIA controller. Often this
  shows also up with cat /proc/pci .


  6.1.2.  Related HOWTOs



  1. PCMCIA-HOWTO


  6.1.3.  PCMCIA Configuration - Survey

  In the mailing lists where I'm a member, the question "How can I set
  up PCMCIA support, after the Linux installation?" comes up sometimes.
  Therefore I try to give a short survey. But the authoritative source
  for the latest information about the PCMCIA Card Services for Linux,
  including documentation, files, and generic PCMCIA information is the
  Linux PCMCIA Information Page <http://pcmcia.sourceforge.org> . For
  problems with PCMCIA and APM see the APM chapter.


  6.1.3.1.  Software


  1. Read the PCMCIA HOWTO, usually included in the PCMCIA-CS package.

  2. Install the newest available PCMCIA-CS package, if you take a rpm
     or deb package it is quite easy.

  3. If necessary, install a new kernel. Note: With 2.2.x kernels PCMCIA
     kernel support seems no longer necessary. I had no time to look
     this up yet. Please read the according documents.

  4. Make sure your kernel has module support and PCMCIA support enabled
     (and often APM support)

  5. Make sure your kernel also includes support for the cards you want
     to use, e.g. network support for a NIC card, serial support for a
     modem card, SCSI support for a SCSI card and so on.

  6. If you have a custom made kernel, don't forget to compile the
     PCMCIA-CS source against your kernel.


  6.1.3.2.  PCMCIA Controller



  1. Use the probe command to get information whether your PCMCIA
     controller is detected or not.

  2. Edit the file /etc/sysconfig/pcmcia. It should include PCMCIA=y and
     the type of your PCMCIA controller, e.g. PCIC=i82365.

  3. Start the PCMCIA services typically via /etc/init.d/pcmcia start.
     If you get two high beeps, everything should be fine.

  4. If something doesn't work, check the messages in /var/log/messages
     .


  6.1.3.3.  PCMCIA Card


  1. Check your card with cardctl ident .

  2. If your card is not in /etc/pcmcia/config, edit the file
     /etc/pcmcia/config.opts accordingly. Take an entry in the first
     file as a model. You may try every driver, just in case it might
     work, for instance the pcnet_cs supports many NE2000 compatible
     PCMCIA network cards.

  3. A list of supported cards is included in the PCMCIA-CS package. The
     current list you may find at
     http://hyper.stanford.edu/~dhinds/pcmcia/ftp/SUPPORTED.CARDS
     <http://hyper.stanford.edu/~dhinds/pcmcia/ftp/SUPPORTED.CARDS>.

     Since there are not all cards mentioned I have set up a page PCMCIA
     Cards "Unofficially" Supported by Linux
     <http://www.snafu.de/~wehe/index_li.html> .


  4. If you use X, you can use cardinfo to insert, suspend, or restart a
     PCMCIA card via a nice graphical interface.


  6.2.  Infrared Port


  6.2.1.  Linux Compatibility Check

  To get the IrDA port of your laptop working with Linux/IrDA you may
  use StandardInfraRed (SIR) or FastInfraRed (FIR).


  6.2.1.1.  SIR

  Up to 115.200bps, the infrared port emulates a serial port like the
  16550A UART. This will be detected by the kernel serial driver at boot
  time, or when you load the serial module. If infrared support is
  enabled in the BIOS, for most laptops you will get a kernel message
  like:


  ______________________________________________________________________
  Serial driver version 4.25 with no serial options enabled
  ttyS00 at 0x03f8 (irq = 4) is a 16550A     #first serial port /dev/ttyS0
  ttyS01 at 0x3000 (irq = 10) is a 16550A    #e.g. infrared port
  ttyS02 at 0x0300 (irq = 3) is a 16550A     #e.g. PCMCIA modem port
  ______________________________________________________________________



  6.2.1.2.  FIR

  If you want to use up to 4Mbps, your machine has to be equipped with a
  certain FIR chip. You need a certain Linux/IrDA driver to support this
  chip. Therefore you need exact information about the FIR chip. You may
  get this information in one of the following ways:


  1. Read the specification of the machine, though it is very rare that
     you will find enough and reliable information there.

  2. Try to find out wether the FIR chip is a PCI device. Do a cat
     /proc/pci . The according files for 2.2.x kernels are in
     /proc/bus/pci . Though often the PCI information is incomplete. You
     may find the latest information about PCI devices and vendor
     numbers in the kernel documentation usually in
     /usr/src/linux/Documentation or at the page of Craig Hart
     http://members.hyperlink.net.au/~chart
     <http://members.hyperlink.net.au/~chart> . From kernel 2.1.82 on,
     you may use lspci from the pci-utils package, too.

  3. Use the DOS tool CTPCI330.EXE provided in ZIP format by the German
     computer magazine CT  http://www.heise.de/ct/ftp/pci.shtml
     <http://www.heise.de/ct/ftp/pci.shtml> . The information provided
     by this program is sometimes better than that provided by the Linux
     tools.

  4. Try to get information about Plug-and-Play (PnP) devices. Though I
     didn't use them for this purpose yet, the isapnp tools, could be
     useful.

  5. If you have installed the Linux/IrDA software load the FIR modules
     and watch the output of dmesg, whether FIR is detected or not.

  6. Another way how to figure it out explained by Thomas Davis
     (modified by WH): "Dig through the FTP site of the vendor, find the
     Windows9x FIR drivers, and they have (for a SMC chip):


     ___________________________________________________________________
     -rw-rw-r--   1 ratbert  ratbert       743 Apr  3  1997 smcirlap.inf
     -rw-rw-r--   1 ratbert  ratbert     17021 Mar 24  1997 smcirlap.vxd
     -rw-rw-r--   1 ratbert  ratbert      1903 Jul 18  1997 smcser.inf
     -rw-rw-r--   1 ratbert  ratbert     31350 Jun  7  1997 smcser.vxd
     ___________________________________________________________________



  If in doubt, always look for the .inf/.vxd drivers for Windows95. Win-
  dows95 doesn't ship with _ANY_ FIR drivers. (they are all third party,
  mostly from Counterpoint, who was assimilated by ESI)."
  7. Also Thomas Davis found a package of small DOS utilities made by
     SMC. Look at http://www.smsc.com/ftppub/chips/appnote/ir_utils.zip
     <http://www.smsc.com/ftppub/chips/appnote/ir_utils.zip> . The
     package contains FINDCHIP.EXE. And includes a FIRSETUP.EXE utility
     that is supposed to be able to set all values except the chip
     address. Furthermore it contains BIOSDUMP.EXE, which produces this
     output:

     Example 1 (from a COMPAQ Armada 1592DT)


     ___________________________________________________________________
          In current devNode:
                Size      = 78
                Handle    = 14
                ID        = 0x1105D041 = 'PNP0511' -- Generic IrDA SIR
                Types:  Base = 0x07, Sub = 0x00,  Interface = 0x02
                     Comm. Device, RS-232, 16550-compatible
                Attribute = 0x80
                     CAN be disabled
                     CAN be configured
                     BOTH Static & Dynamic configuration
           Allocated Resource Descriptor Block TAG's:
                TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                        Min=0x03E8, Max=0x03E8
                                        Align=0x00, Range=0x08
                TAG=0x22, Length=2 IRQ Tag, Mask=0x0010
                TAG=0x79, Length=1 END Tag, Data=0x2F
     ___________________________________________________________________



  Result 1:

  Irq Tag, Mask (bit mapped - ) = 0x0010 = 0000 0000 0000 0001 0000 so,
  it's IRQ 4. (start at 0, count up ..), so this is a SIR only device,
  at IRQ=4, IO=x03e8.


  Example 2 (from an unknown machine)


  ______________________________________________________________________
       In current devNode:
            Size      = 529
            Handle    = 14
            ID        = 0x10F0A34D = 'SMCF010' -- SMC IrCC
            Types:  Base = 0x07, Sub = 0x00,  Interface = 0x02
                 Comm. Device, RS-232, 16550-compatible
            Attribute = 0x80
                 CAN be disabled
                 CAN be configured
                 BOTH Static & Dynamic configuration

       Allocated Resource Descriptor Block TAG's:
            TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                    Min=0x02F8, Max=0x02F8
                                    Align=0x00, Range=0x08
            TAG=0x22, Length=2 IRQ Tag, Mask=0x0008
            TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                    Min=0x02E8, Max=0x02E8
                                    Align=0x00, Range=0x08
            TAG=0x2A, Length=2 DMA Tag, Mask=0x02, Info=0x08
            TAG=0x79, Length=1 END Tag, Data=0x00
  ______________________________________________________________________

  Result 2:

  a) it's a SMC IrCC chip

  b) one portion is at 0x02f8, has an io-extent of 8 bytes; irq = 3

  c) another portion is at 0x02e8, io-extent of 8 bytes; dma = 1 (0x02
  =0000 0010)


  Thomas Davis has placed some device information at
  http://www.jps.net/tadavis/irda/devids.txt
  <http://www.jps.net/tadavis/irda/devids.txt> .

  WARNING: The package is not intended for the end user, and some of the
  utilities could be harmful. The only documentation in the package is
  in M$ Word format. Linux users may read this with catdoc, available at
  http://www.fe.msk.ru/~vitus/catdoc/
  <http://www.fe.msk.ru/~vitus/catdoc/> .


  8. Use the Device Manager of Windows9x/NT.

  9. You may also use the hardware surveys mentioned below.

  10.
     And as a last ressort, you may even open the laptop and look at the
     writings at the chipsets themselfs.


  6.2.1.3.  Hardware Survey

  I have made a hardware survey at http:/www.snafu.de/~wehe/ir_misc.html
  <http://www.snafu.de/~wehe/ir_misc.html>. This list also contains
  information about infrared capable devices which are not mentioned
  here (mice, printers, remote control, transceivers, etc.).

  To make this list more valuable, it is necessary to collect more
  information about the infrared devices in different hardware. You can
  help by sending me a short e-mail containing the exact name of the
  hardware you have and which type of infrared controller is used.

  Please let me know also how well Linux/IrDA worked (at which tty, port
  and interrupt it works and the corresponding infrared device, e.g.
  printer, cellular phone).

  Also you can help by contributing detailed technological information
  about some infrared devices, which is necessary for the development of
  drivers for Linux.


  6.2.2.  Related HOWTOs



  1. Linux/IR-HOWTO


  6.2.3.  IrDA Configuration - Survey


  6.2.3.1.  IrDA

  The Linux infrared support is still experimental, but rapidly
  improving. I try to describe the installation in a short survey.
  Please read my Linux/IR-HOWTO http://www.snafu.de/~wehe/index_li.html
  <http://www.snafu.de/~wehe/index_li.html> for detailed information.


  6.2.3.1.1.  Kernel



  1. Get a 2.2.x kernel.

  2. Compile it with all IrDA options enabled.

  3. Also enable experimental, sysctl, serial and network support.


  6.2.3.1.2.  Software



  1. Get the Linux/IrDA software irda-utils at The Linux IrDA Project
     <http://www.cs.uit.no/linux-irda/> .

  2. Untar the package.

  3. Do a make depend; make all; make install


  6.2.3.1.3.  Hardware



  1. Enable the IrDA support in the BIOS.

  2. Check for SIR or FIR support, as described above.

  3. Start the Linux/IrDA service with irmanager -d 1 .

  4. Watch the kernel output with dmesg .


  6.2.3.2.  Linux Remote Control - LiRC

  Linux Remote Control http://fsinfo.cs.uni-sb.de/~columbus/lirc/
  <http://fsinfo.cs.uni-sb.de/~columbus/lirc/> is maintained by
  Christoph Bartelmus. "Lirc is a package that supports receiving and
  sending IR signals of the most common IR remote controls. It contains
  a device driver for hardware connected to the serial port, a daemon
  that decodes and sends IR signals using this device driver, a mouse
  daemon that translates IR signals to mouse movements and a couple of
  user programs that allow to control your computer with a remote
  control." I don't have valid information about how much infrared
  remote control is working with laptop infrared devices.


  6.3.  Graphic Chip


  6.3.1.  Linux Compatibility Check


  6.3.1.1.  Video Mode

  The tool SuperProbe is part of XFree86 and is able to check many
  graphic chips. Please read the documentation carefully, because it
  might crash your hardware. From man SuperProbe:


  "SuperProbe is a a program that will attempt to determine the type of
  video hardware installed in an EISA/ISA/VLB-bus system by checking for
  known registers in various combinations at various locations
  (MicroChannel and PCI machines may not be fully supported; many work
  with the use of the -no_bios option). This is an error-prone process,
  especially on Unix (which usually has a lot more esoteric hardware
  installed than MS-DOS system do), so SuperProbe may likely need help
  from the user.

  ...

  At this time, SuperProbe can identify MDA, Hercules, CGA, MCGA, EGA,
  VGA, and an entire horde of SVGA chipsets (see the -info option,
  below). It can also identify several HiColor/True-color RAMDACs in use
  on SVGA boards, and the amount of video memory installed (for many
  chipsets). It can identify 8514/A and some derivatives, but not XGA,
  or PGC (although the author intends to add those capabilities). Nor
  can it identify other esoteric video hardware (like Targa, TIGA, or
  Microfield boards).":

  For testing reasons start the X server with X 2> <error.msg>. And try
  to change the resolution by typing <CTL><ALT><+> or <CTL><ALT><->.
  Note: the + or - sign have to be taken from the numeric pad, which can
  be emulated at the letter pad by some laptops.


  6.3.1.2.  Text Mode

  Just watch the display and determine if it works properly. If not, try
  to enable different video modes at startup time. Setting up X can
  sometimes be an exercise in trial and error.


  6.3.2.  Related HOWTOs



  1. XFree86-HOWTO

  2. XFree86-Video-Timings-HOWTO

  3. XFree86-XInside-HOWTO

  4. X-Big-Cursor-mini-HOWTO (useful when running X on a notebook with
     low contrast LCD)

  5. Keyboard-and-Console-HOWTO

  6. vesafb-mini-HOWTO


  6.3.3.  Survey X-Servers

  You might discover that some features of your laptop are not supported
  by XFree86, e.g. high resolutions, accelerated X or an external
  monitor. Therefore I give a survey of available X servers.


  1. XFree86 http://www.xfree86.org <http://www.xfree86.org>

  2. VESA Frame-Buffer-Device, available with 2.2.x kernels and XFree86
     3.3.2

  3. Xinside aka AcceleratedX http://www.xig.com <http://www.xig.com> ,
     commercial

  4. SciTech http://www.scitechsoft.com <http://www.scitechsoft.com> ,
     commercial

  5. Metro-X at  http://www.metrolink.com <http://www.metrolink.com>,
     commercial .

  If you can't get an appropriate X server working, but don't want to
  effort a commercial X server you may try the VGA16 or the mono server
  included in XFree86.


  6.3.4.  Resources

  You may find a survey about X windows resources at Kenneth E. Harker's
  page Linux on Laptops <http://www.cs.utexas.edu/users/kharker/linux-
  laptop/> and a survey about current graphic chips used in laptops at
  LiLAC - Linux with Laptop Computers
  <http://www.snafu.de/~wehe/index_li.html>.


  6.3.5.  External Monitor

  There are several different methods to activate support for an
  external monitor: as a BIOS option or during runtime with a keystroke
  e.g. <Fn>+<F4>. Maybe you have to edit /etc/XF86Config by configuring
  int_disp and ext_disp. If you can't get this to work with XFree, try a
  demo version of the commercial X servers mentioned above. Also check
  with the RedHat and SuSE WWW sites as they may have new, binary-only,
  X servers that may work with your laptop.


  6.3.6.  Miscellaneous

  Sometimes you may encounter a display not working properly in text
  mode. Currently I don't have any recommendations, please see Keyboard-
  Console-HOWTO.

  Take care of the backlight AFAIK this device can only bear a limited
  number of uptime circles. So avoid using screensavers too much.

  For problems with X windows and APM please see the APM chapter.


  6.4.  Sound


  6.4.1.  Linux Compatibility Check

  The only way I know to check this, is to compile the different sound
  drivers into the kernel and check whether they are detected or not.
  The best way to do so, is to compile them as modules because it's
  easier to load different parameters such as interrupts and IO ports
  than. For the new 2.2.x kernels, read the
  /usr/src/linux/Documentation/sound/Introduction document by Wade
  Hampton. This document may help you get started with sound. Also, you
  might try one of the commercial sound drivers mentionend below.

  6.4.2.  Related HOWTOs



  1. Sound-HOWTO

  2. Visual-Bell-mini-HOWTO


  6.4.3.  Survey Sound Drivers

  Many new laptops come with 16-bit sound. But MWave and some other
  sound technologies won't work or are very hard to get working, e.g.
  booting to DOS, loading a driver, then using the soundcard as a
  standard SB-PRO. So you might need a commercial sound driver. With the
  recent announcement of Linux support by IBM, it would be GREAT if IBM
  supported the MWave under Linux (hint, hint...). As a last ressort you
  may try the speaker module pcsnd, which tries to emulate a soundcard.


  1. Kernel Sound Driver by Hannu Savolainen

  2. ALSA Advanced Linux Sound Architecture <http://alsa.jcu.cz> ,
     commercial or at least non-GPL (since I found a Debian/GNU Linux
     package I'm not sure anymore, about the commercial status)

  3. OSS UNIX Sound System Lite / OSS <http://www.4front-
     tech.com/usslite/ossfree.html>, commercial or at least non-GPL
     (since the 2.2.x kernels I'm not sure about the commercial status),
     also available from http://www.opensound.com
     <http://www.opensound.com> .


  6.5.  Keyboard


  6.5.1.  Linux Compatibility Check

  Usually there are no problems with Linux and the keyboard. Though
  there are two minor caveats: First the setleds program might not work.
  Second the key mapping might not fit your needs. Some Unix users and
  vi users expect to find the <CONTROL> key to the left of the <A> key.
  Many PC-type keyboards have the <CAPS-LOCK> key there. You may use
  xmodmap or loadkeys to re-map the keyboard. Some laptops (e.g.,
  Toshiba) allow you to swap the <CAPS-LOCK> and <CONTROL> keys. Mark
  Alexander offered this solution in the linux-laptop mailing list: On
  RedHat, it's a one-line patch to /usr/lib/kbd/keytables/us.map , or
  whatever file is referenced in /etc/sysconfig/keyboard:


  ______________________________________________________________________
  *** us.map~     Tue Oct 31 14:00:07 1995
  --- us.map      Thu Aug 28 13:36:03 1997
  ***************
  *** 113,119 ****
    keycode  57 = space            space
          control keycode  57 = nul
          alt     keycode  57 = Meta_space
  ! keycode  58 = Caps_Lock
    keycode  59 = F1               F11              Console_13
          control keycode  59 = F1
          alt     keycode  59 = Console_1
  --- 113,119 ----
    keycode  57 = space            space
          control keycode  57 = nul
          alt     keycode  57 = Meta_space
  ! keycode  58 = Control
    keycode  59 = F1               F11              Console_13
          control keycode  59 = F1
          alt     keycode  59 = Console_1
  ______________________________________________________________________



  6.5.2.  External (Second) Keyboard

  A second (or external) keyboard can be attached using the PS/2 port (I
  suppose this is not possible via the serial port, since there is no
  keyboard controller for the serial port). Also there is one laptop
  with a detachable keyboard the Siemens Scenic Mobile 800. This machine
  uses an infrared connection to the keyboard, but I don't know whether
  this works with Linux. WARNING: Don't plug the external keyboard in
  while the laptop is booted, or plug the mouse in the keyboard port and
  the keyboard in the mouse port. On a Toshiba, this caused one user to
  have to completely shutdown the laptop, remove the keyboard/mouse, and
  do a cold reboot.

  For PS/2 ports there are so called Y-Cable available, which make it
  possible to use external mouse and external keyboard at the same time
  if your laptop supports this feature.

  Parport to AUX port adapter <http://www.suse.cz/development/input/> In
  some cases one kbd port and one aux port is not enough and you may
  want to add another keyboard or mouse. You can use this adapter,
  together with the parkbd.c module for that.

  On some laptops a splitter works to allow both mouse and keyboard to
  be plugged in; on others it doesn't work at all.If you might want to
  use both you had better check that it works, or you may find yourself
  waiting anxiously for USB support.

  Sun keyboard to PC serial port adapter
  <http://www.suse.cz/development/input/>: Many people have dreamed
  having their Sun Type 5 keyboard attached to their Linux box up to
  now. And with this adapter, it is finally possible. Because the
  standard Sun keyboards use TTL RS232 at 1200 bps to talk to the Suns,
  it's very easy to make them talk to any non-Sun computer by converting
  this to true RS232. All what you need is a MAX232 chip that'll take
  care about the correct voltage levels, and also some chip to invert
  the signals (CD4049 in the pic, I've used a 7400 quad-nand myself),
  since the MAX232 inverts them as well, and we don't need this. This
  all easily fits into a 25-pin serial connector.


  6.6.  Pointing Devices - Mice and Their Relatives


  6.6.1.  Linux Compatibility Check

  You may check your mouse with the mev command from the GPM package.

  6.6.2.  Related HOWTOs



  1. 3-Button-Mouse-mini-HOWTO for serial mice

  2. Bus-Mouse-HOWTO

  3. Kernel-HOWTO


  6.6.3.  Mice Species



  1. Trackpad, Touchpad, used with the majority of current laptops

  2. Trackball, e.g. COMPAQ LTE

  3. Pop-up-Mouse, e.g. HP OmniBook 800

  4. Trackpoint, Mouse-Pin, e.g. IBM ThinkPad and Toshiba

  5. 3 Button Mice, e.g. IBM Thinkpads at least the 600s. I have heard
     rumor about a 3 button mouse for Texas Instruments Travelmates, but
     couldn't verify this yet.


  6.6.4.  PS/2 Mice

  Most of the mice used in laptops are PS/2 mice (actually I don't know
  one with another mouse protocol). You may communicate with the PS/2
  mouse through /dev/psaux or /dev/psmouse. If you use X windows this
  device and the protocol has to be set in /etc/XF86Config, too. In
  earlier releases, sometimes the GPM mouse manager and X windows had
  trouble sharing a mouse when enabled at the same time. But AFAIK this
  is no problem anymore for the latest versions.

  Speaking of Emulate3Buttons, 100ms is usually better than the 50ms
  allowed in most default setups of /etc/X11/XF86Config.

  ______________________________________________________________________
  Section "Pointer"
  Protocol    "PS/2"
  Device      "/dev/psaux"
  Emulate3Buttons
  Emulate3Timeout    100
  EndSection
  ______________________________________________________________________



  6.6.5.  Touchpad

  Usually a touchpad works with the PS/2 mouse driver. A tip: I've heard
  that tipping with one , two or three fingers on the touchpad
  simultaneously results in pressing the left, middle and respectively
  the right mouse-button (by Martin Hoffmann <mh@rrz.uni-hamburg.de> for
  an IPC-Radiance 900).

  There is also a dedicated touchpad driver available. The Synaptics
  Touchpad Linux Driver
  <http://www.pdos.lcs.mit.edu/~cananian/Synaptics/> supports pointing
  devices used in notebooks by Acer, Compaq, Dell, Gateway, Olivetti,
  Texas Instruments, Winbook, and others. Other URL N.N.
  <http://compass.com/synaptics/>.

  The recent gpm package (gpm >=1.8 <ftp://ftp.prosa.it/pub/gpm/>)
  includes the above mentioned synaptics touchpad device driver. This
  device driver has been developed by H. Davies <hdavies@ameritech.net>.
  Instead of using the PS/2 compatibility mode of touchpad devices, you
  can now use native touchpad mode with some pretty impressive features.

  In addition to translating finger motion into mouse motion and
  supporting the buttons, this support currently has several features
  (from the README):


  o  a "tap" on the TouchPad causes a left mouse click

  o  a "tap" followed quickly by a finger motion causes a left button
     drag type action.


  o  a "tap" in one of the corners causes an action the default
     configuration is upper right causes middle mouse click and lower
     right causes right mouse click

  o  more pressure on the touch pad speeds the motion of the cursor

  o  a "tap" with a motion component (default > 2mm) initiates a toss
     and catch sequence. This is terminated by a finger touch on the pad
     (the toss also ends after 1 sec since that is the idle timeout
     period for the touchpad).

  o  if the finger moves close to an edge then the mouse motion will be
     continued in that direction so that you don't need to pick up your
     finger and start moving again. This continued motion is pressure
     sensitive (more pressure is faster motion).

  These features can be enabled/disabled and many of them have time and
  speed parameters which can be adjusted to the taste of the user.

  It seems gpm is best known as a console biased tool. This is true, but
  you may use it as an X input device. gpm is used as a repeater device.
  In this way you can use both the built-in synaptics touchpad with all
  the features and at the same time a serial mouse (with three buttons).
  This all works smoothly together. X reads the mouse events from a
  named pipe /dev/gpmdata in a protocol it understands, which in my case
  is Mouse-Systems-Compatible (5bytes). Most 3-button mice use the
  default protocol. So a simple reconfiguration in XF86Config is all
  that is required, after starting gpm in an appropriate way, of course.

  gpm could be started on your laptop with the following arguments :
  /usr/bin/gpm -t synps2 -M -t ms -m /dev/ttyS0 . Both touchpad and
  serial mouse work in console and X mode. You do have to create the
  named pipe /dev/gpmdata yourself.

  Tapping with two fingers simultaneously to simulate a middle mouse
  button works on Logitech touchpads used in a few machines.

  Thanks to Geert Van der Plas for most of the touchpad chapter.


  6.6.6.  Touchscreen

  The only laptop I know which includes a touchscreen is the Fujitsu
  Biblo 112. It may work in PS/2 or serial mouse compatibility mode. But
  I couldn't check this yet.


  6.6.7.  COMPAQ Concerto Pen

  The latest version of the Linux Compaq Concerto Pen Driver
  <http://www.cs.nmsu.edu/~pfeiffer/#pen> is available from Joe
  Pfeiffer's home page.


  6.6.8.  External Mouse

  For better handling, e.g. with a 3 button mouse you may use an
  external mouse. This usually a serial mouse or a PS/2 mouse, according
  to the port your laptop offers. Usually this is no problem.

  For PS/2 ports there are so called Y-Cable available, which make it
  possible to use external mouse and external keyboard at the same time
  if your laptop supports this feature.

  WARNING: Don't plug in the external mouse while powered up. If you
  have separate mouse and keyboard ports, make sure you plug the mouse
  in the mouse port and the keyboard in the keyboard port. If you don't,
  you may have to do a hard reboot of the laptop to get it to recover.


  6.7.  Advanced Power Management - APM


  6.7.1.  Linux Compatibility Check

  From the Battery-Powered-mini-HOWTO " .. for APM to work on any
  notebook or energy-conscious desktop, the system BIOS ROM in the
  machine must support the APM Specification standard. Furthermore, for
  APM to work with the Linux operating system, the system BIOS ROM must
  support either the 1.0 or 1.1 version of the APM standard, and it must
  also support 32-bit protected mode connections. A system that supports
  APM 1.1 is preferred, as it provides more features that the device
  driver and supporting utilities can take advantage of."

  You may get information about the APM version with the dmesg command
  and in the /proc/apm file.


  6.7.2.  Introduction

  Features of APM according to Documentation/Configure.help: "The system
  time will be reset after a USER RESUME operation, the /proc/apm device
  will provide battery status information, and user-space programs will
  receive notification of APM events (e.g., battery status change). "

  APM support consists of two parts: kernel support and user-land
  support.


  6.7.2.1.  Kernel Land

  For kernel support, enable the parameters in the corresponding kernel
  section. Some features need special tweaking with certain machines
  (e.g. IBM ThinkPad) or even don't work, ("TI 4000M TravelMate and the
  ACER 486/DX4/75 because they don't have compliant BIOSes"). Currently
  all distributions I know don't provide a kernel with APM support
  enabled. So you usually have to compile your custom kernel. Please see
  Kernel-HOWTO or distribution manual for details. The available APM
  options are (please see Documentation/Configure.help in the kernel
  source tree for more details):


  o  CONFIG_APM_IGNORE_USER_SUSPEND Just a workaround for some NEC Versa
     M series laptops.

  o  CONFIG_APM_DO_ENABLE Enable APM features at boot time.

  o  CONFIG_APM_CPU_IDLE. Puts CPU in power save mode, if there is
     nothing to do for the kernel.

  o  CONFIG_APM_DISPLAY_BLANK Some laptops can use this to turn off the
     LCD backlight when the screen blanker of the Linux virtual console
     blanks the screen. Note that this is only used by the virtual
     console screen blanker, and won't turn off the backlight when using
     the X Window system.

  o  CONFIG_APM_POWER_OFF Turns the machine completely down, when using
     halt. This feature works with most laptops without problems.

  o  CONFIG_APM_IGNORE_MULTIPLE_SUSPEND Just a workaround for IBM
     ThinkPad 560.

  o  CONFIG_APM_IGNORE_SUSPEND_BOUNCE Just a workaround for Dell
     Inspiron 3200 and other notebooks.

  o  CONFIG_APM_RTC_IS_GMT Stores time in Greenwich Mean Time format. It
     is in fact recommended to store GMT in your real time clock (RTC)
     in the BIOS.

  o  CONFIG_APM_ALLOW_INTS Resolves some problems with Suspend to Disk
     for some laptops, for instance many newer IBM ThinkPads.

  Joey Hess <joey@kitenet.net> wrote at debian-laptop@lists.debian.org
  "I just installed kernel 2.2.12 on my laptop, and was having some
  trouble getting apm working. it said apm disabled on user request at
  boot time.  Well, some grepping the kernel sources found that passing
  apm=on to the kernel at boot time enables it now. I can't find any
  record or docs of this change.


  6.7.2.2.  User Land


  The utilities for userland support may be found at
  http://worldvisions.ca/~apenwarr/apmd/
  <http://worldvisions.ca/~apenwarr/apmd/>. APMD is a set of programs
  that control the Advanced Power Management system found in most modern
  laptop computers. If you run a 2.2.x kernel and want to experiment,
  Gabor Kuti <seasons@falcon.sch.bme.hu> has made a kernel patch that
  allows you to hibernate any Linux system to disk, even if your
  computers APM BIOS doesn't support it directly. IMHO you don't need
  this features if your laptop provides a function key to invoke suspend
  mode directly.

  When you first install Linux, you will probably have to recompile the
  kernel. The kernel that came with your distribution probably does not
  have APM enabled.

  Please see the Battery Powered Linux Mini-HOWTO by <kontakt@hanno.de>
  Hanno Mueller <http://www.hanno.de> and the page of Kenneth E. Harker
  <http://www.cs.utexas.edu/users/kharker/linux-laptop/> for detailed
  information.


  README apmd?:On laptop computers, the APM support provides access to
  battery status information and may help you to conserve battery power,
  depending on your laptop and the APM implementation.

  Rik Faith <faith@acm.org> has transferred maintenance of the Linux
  apmd package over to me, Avery Pennarun <apenwarr@worldvisions.ca> and
  I'm finally getting around to making a release with the many updates
  we've collected since the last release back in 1996.

  Here's what apmd can do:


  o  apmd(8): logs the battery status to syslog every now and then and
     handles background power management tasks;

  o  apm(1): a command-line tool to print the current battery status or
     suspend the computer;

  o  xapm(1x): provides a battery meter for X;

  o  libapm.a: a library for writing similar APM applications.

  Richard Gooch wrote: I'have had a look at the beta version of apmd,
  and I still don't like it, because:
  o  Only supports one command to run at suspend time.

  o  Doesn't distinguish between user and system suspends.

  o  doesn't provide a way to disable policy (the sync(); sleep(0) ;
     sync(); sleep(1); sequence)

  o  Does not document extra features.

  o  And I'm not sure that what we want is a single super daemon. A
     collection of smaller daemons might be better, since it allows
     people to pick and choose. A super daemon is bloat for those who
     only want one small feature.

  Though this topic was discussed controversly Richard Gooch has put
  together a package suspendd at http://www.atnf.csiro.au/~rgooch/linux/
  <http://www.atnf.csiro.au/~rgooch/linux/> .

  Also, have a look at apmcd (apm based crontab) at
  ftp://ftp.binary9.net/pub/linux/ <ftp://ftp.binary9.net/pub/linux/> .
  A tool made by Nicolas J. Leon <nicholas@binary9.net>
  http://mrnick.binary9.net/ <http://mrnick.binary9.net/>.

  Note: I didn't check wether this features are merged into one package
  (apmd eventually) already.


  6.7.3.  Caveats

  If you have another operating system preinstalled or use another
  operating system at the same disk, make sure there is no "hibernation"
  or "suspend" tool installed, which could severely interfere with
  Linux, e.g. it might use disk space which is occupied by Linux or vice
  versa.


  6.7.4.  Troubleshooting

  If your machine worked with 2.0.x kernels but not with the 2.2.x
  series, take this advice from Klaus Franken kfr@klaus.franken.de :
  "The default changed in 2.2. Search in the init-scripts for halt and
  change it to halt -p or poweroff. See man halt , if you don't have
  this option you need a newer version of halt." You may find it in the
  SysVinit package.

  On some new machines (for instance HP Omnibook 4150 - 366 MHz model)
  when accessing /proc/apm, you may get a kernel fault general
  protection fault: f000. Stephen Rothwell
  <Stephen.Rothwell@canb.auug.org.au> http://www.canb.auug.org.au/~sfr/
  <http://www.canb.auug.org.au/~sfr/> explaines: "This is your APM BIOS
  attempting to use a real mode segment while in protected mode, i.e. it
  is a bug in your BIOS. .. We have seen a few of these recently, except
  all the others are in the power off code in the BIOS wher we can work
  around it by returning to real mode before attempting to power off.
  Here we cannot do this."

   apmd-rhcn-2.4phil-1 by RedHat ftp://rhcn.redhat.com/pub/rhcn/
  <ftp://rhcn.redhat.com/pub/rhcn/> contains an unofficial patch for
  shutting down the PCMCIA sockets before a suspend and patches for
  multiple batteries.

  According to Documentation/Configure.help: "Some other things you
  should try when experiencing seemingly random, weird problems:



  1. make sure that you have enough swap space and that it is enabled.

  2. pass the no-hlt option to the kernel.

  3. switch on floating point emulation in the kernel and pass the no387
     option to the kernel.

  4. pass the floppy=nodma option to the kernel.

  5. pass the mem=4M option to the kernel (thereby disabling all but the
     first 4 MB of RAM).

  6. make sure that the CPU is not over clocked.

  7. read the sig11 FAQ at http://www.bitwizard.nl/sig11/
     <http://www.bitwizard.nl/sig11/> .

  8. disable the cache from your BIOS settings.

  9. install a fan for the video card or exchange video RAM.

  10.
     install a better fan for the CPU.

  11.
     exchange RAM chips.

  12.
     exchange the motherboard.


  6.7.5.  APM and PCMCIA

  PCMCIA Card Services and Advanced Power Management (from the PCMCIA-
  HOWTO):

  "Card Services can be compiled with support for APM (Advanced Power
  Management) if you've configured your kernel with APM support. ...
  The PCMCIA modules will automatically be configured for APM if a
  compatible version is detected on your system. Whether or not APM is
  configured, you can use cardctl suspend before suspending your laptop,
  and cardctl resume after resuming, to cleanly shut down and restart
  your PCMCIA cards.  This will not work with a modem that is in use,
  because the serial driver isn't able to save and restore the modem
  operating parameters. APM seems to be unstable on some systems. If you
  experience trouble with APM and PCMCIA on your system, try to narrow
  down the problem to one package or the other before reporting a bug.
  Some drivers, notably the PCMCIA SCSI drivers, cannot recover from a
  suspend/resume cycle.  When using a PCMCIA SCSI card, always use
  cardctl eject prior to suspending the system.".


  6.7.6.  APM and Resuming X Windows

  "Many (most?) BIOSes fail to save and restore display controller chip
  registers, and X has no protocol to be notified of resume events, so
  on many systems suspend/resume is more-or-less incompatible with X."
  Linux Laptops has created a fix for this problem.

  Sometimes X windows and APM don't work smoothly together, the machine
  might even hang. A recommendation from Steve Rader: Some linux systems
  have their X server hang when doing apm -s. Folks with this affliction
  might want switch to the console virtual terminal then suspend chvt 1;
  apm -s as root, or, more appropiately.sudo chvt 1; sudo apm -s. I have
  these commands in a script, say, my-suspend and then do xapmload
  --click-command my-suspend .
  6.7.7.  Modularization of APM

  As far as I remember this is controversly discussed, but I don't
  remember the URL. It isn't a kernel feature yet.


  6.7.8.  APM Resume Options

  The new 3.0beta versions add a new feature to apmd:  it can run
  arbitrary commands (like cardctl suspend) when you suspend or resume
  your system.  It also supports BIOS clocks that are set to UTC time.


  6.7.9.  APM and Sound

  Lots of BIOSes fail to restore sound chip registers, so you may get a
  squeal of feedback when you wake up the machine.  A script in
  /etc/apm/event.d can use aumix to save and restore sound mixer
  settings.


  6.7.10.  Software Suspend

  Software suspend enables the possibilty of suspendig machine. It
  doesn't need APM. You may suspend your machine by either pressing
  Sysrq-d or with 'swsusp' or 'shutdown -z (patch for sysvinit needed).
  It creates an image which is saved in your active swaps. By the next
  booting the kernel detects the saved image, restores the memory from
  it and then it continues to run as before you've suspended. If you
  don't want the previous state to continue use the 'noresume' kernel
  option.


  6.8.  ACPI

  ACPI stands for Advanced Configuration and Power Interface. This is a
  specification by Toshiba, Intel and Microsoft. Besides many other
  things it also defines power management. This is why it is often
  compared to APM.

  The ACPI4Linux project has started at the beginning of 1999. The
  ACPI4Linux project is a kernel driver project aimed at implementing
  full ACPI support for Linux, including fan control, dock/undock
  detection and a WindowMaker dockable temperature meter. You may reach
  it at ACPI4Linux <http://phobos.fachschaften.tu-muenchen.de/acpi/>.


  6.9.  Batteries

  For information about available battery types, take a look at the
  Hardware Features chapter above.

  Please see Battery Powered Linux Mini-HOWTO by Hanno Mueller
  <kontakt@hanno.de> http://www.hanno.de <http://www.hanno.de/> Power
  Supplies for Laptops - (Draft)
  <http://www.snafu.de/~wehe/energy_laptops.html> for further
  information.

  Stephen Rothwell http://www.canb.auug.org.au/~sfr/
  <http://www.canb.auug.org.au/~sfr/> is currently integrating a patch
  that will add multiple battery support to the kernel APM.

  From the mobile-update page (modified by WH): Discharge the battery.
  If your battery runs only for about 20 minutes, you probably suffer
  from memory effects. Most laptops do not discharge the battery
  properly. With low powered devices like old computer fans they can be
  discharged completely. This removes memory effects. You should do so
  even with LiIon batteries, though they don't suffer much from memory
  effext (the manual of an IBM Thinkpad says to cycle the batteries
  through a full charge/discharge cycle 3 times every few months or so).

  WARNING: Try this at your own risk! Make sure the voltage of the fans
  is compatible to your battery. It works for me.

  In the US, this company has most batteries for anything and can
  rebuild many that are no longer manufactured: Batteries Plus, 2045
  Pleasant Hill Road, Duluth, GA 30096 +1 770 495 1644.


  6.10.  Memory

  Unfortenately most laptops come with a proprietary memory chips. So
  they are not interchangeable between different models. But this seems
  changing.


  6.11.  Plug-and-Play Devices (PnP)

  The Plug and Play driver project for Linux is a project to create
  support within the Linux kernel (see Linux.Org for more information)
  for handling Plug and Play (and other semi-PnP) devices in a clean,
  consistent way. It aims to allow a driver of any type of hardware to
  have this hardware configured by the PnP driver in the kernel. This
  driver is then notified when the device is reconfigured, or even
  removed from the system, so as to allow for graceful action in these
  circumstances http://www.io.com/~cdb/mirrors/lpsg/pnp-linux.html
  <http://www.io.com/~cdb/mirrors/lpsg/pnp-linux.html> .

  ISA PnP tools is another useful package.

  And there is a project at RedHat
  http://www.redhat.com/pnp/overview.html
  <http://www.redhat.com/pnp/overview.html> .

  The latest PCMCIA driver package (>>3.1.0) has utilities lspnp and
  setpnp to manipulate PNP settings. Note that in 3.1.0 you may need
  this patch to compile them:

  ______________________________________________________________________
  -#ifdef __GLIBC__
  +#if 0 /* def __GLIBC__ */
   #include <byteswap.h>
   #else
  ______________________________________________________________________



  6.12.  Docking Station / Port Replicator


  6.12.1.  Definitions

  First some definitions. There is a difference between docking station
  and port replicator.

  I use the term docking station for a box which contains slots to put
  some interface cards in, and space to put a harddisk, etc. in. This
  box can be permanently connected to a PC. A port replicator is just a
  copy of the laptop ports which may be connected permanently to a PC.


  6.12.2.  Other Solutions

  I don't use a docking station. They seem really expensive and I can't
  see any usefulness. OK you have to mess up with some more cables, but
  is it worth so much money? Docking stations are useful in an office
  environment when you have a permanent network connection, or need the
  docking station's SCSI adaptor (e.g., for a CD-R).

  Also all docking stations I know are proprietary models, so if you
  change your laptop you have to change this device, too. I just found
  one exception a docking station which connects to your laptop via IrDA
  the IRDocking IR-660 by Tekram
  http://www.tekram.com/Hot_Products.asp?Product=IR-660
  <http://www.tekram.com/Hot_Products.asp?Product=IR-660> . It supports
  these connectors: 10Base-T (RJ-45); PS/2 Keyboard; PS/2 Mouse; 25-Pin
  Printer Port (LPT); IR Transceiver; Power (6 VDC). So it seems that a
  VGA port and a port to connect a desktop PC directly are missing. This
  device should work with Linux/IrDA, though I couldn't check it out.

  I would prefer to buy a PC instead and connect it via network to the
  laptop.

  Or use an external display, which usually works well as described
  above, and an external keyboard and mouse. If your laptop supports an
  extra PS/2 port you may use a cheap solution a Y cable, which connects
  the PS/2 port to an external keyboard and an external monitor. Note:
  Your laptop probably has support for the Y cable feature, e.g. the
  COMPAQ Armada 1592DT.


  6.12.3.  Connection Methods

  AFAIK there are three solutions to connect a laptop to a docking
  station:


  1. SCSI port

  2. parallel port

  3. (proprietary) docking port

  From Martin J. Evans martin@mjedev.demon.co.uk
  <http://www.mjedev.demon.co.uk/index.html> "The main problem with
  docking stations is getting the operating system to detect you are
  docked. Fortunately, if you configure your kernel with the /proc file
  system (does anyone not do this?) you can examine the devices
  available and thus detect a docked state. With this in mind a few
  simple scripts is all you need to get your machine configured
  correctly in a docked state.

  You may want to build support for the docking station hardware as
  modules instead of putting it directly into the kernel. This will save
  space in your kernel but your choice probably largely depends on how
  often you are docked.

  1) Supporting additional disks on the docking station SCSI card

  To my mind the best way of doing this is to:


  1. Either build support for the SCSI card into the kernel or build it
     as a module.

  2. Put the mount points into /etc/fstab but use the "noauto" flag to
     prevent them from being mounted automatically with the mount -a
     flag. In this way, when you are docked you can explicitly mount the
     partitions off any disk connected to the docking station SCSI card.

  2) Supporting additional network adaptors in the docking station

  You can use a similar method to that outlined above for the graphics
  card. Check the /proc filesystem in your rc scripts to see if you are
  docked and then set up your network connections appropriately. "

  Once you determine this information, you may use a script, similar to
  the following example, to configure the connection to your docking
  station at startup. The script is provided by Friedhelm Kueck:



  ______________________________________________________________________
  # check, if Laptop is in docking-station (4 PCMCIA slots available)
  # or if it is standalone (2 slots available)
  # Start after cardmgr has started
  #
  # Friedhelm Kueck mailto:fk@impress.de
  # 08-Sep-1998
  #
  # Find No. of Sockets
  SOCKETS=`tail -1 /var/run/stab | cut -d ":" -f 1`

  case "$SOCKETS" in

  "Socket 3")
  echo Laptop is in Dockingstation ...
  echo Disabeling internal LCD Display for X11
  echo
  cp /etc/XF86Config_extern /etc/XF86Config
  #
  # Setup of PCMCIA Network Interface after start of cardmge
  #
  echo
  echo "Setting up eth0 for use at Network ..."
  echo
  /sbin/ifconfig eth0 10.1.9.5 netmask 255.255.0.0 broadcast 10.1.255.255
  /sbin/route add -net 10.1.0.0 gw 10.1.9.5
  /sbin/route add default gw 10.1.10.1
  ;;

  "Socket 1")
  echo Laptop is standalone
  echo Disabling external Monitor for X11
  cp /etc/XF86Config_intern /etc/XF86Config
  echo
  echo Network device NOT setup
  ;;
  esac
  ______________________________________________________________________



  6.13.  Network Connections


  6.13.1.  Related HOWTOs



  1. PLIP-mini-HOWTO

  2. NET-3-HOWTO

  3. Ethernet-HOWTO

  4. Term-Firewall-mini-HOWTO


  6.13.2.  Connection Methods


  6.13.2.1.  PCMCIA Network Card

  If your laptop supports PCMCIA this is the easiest and fastest way to
  get network support. Make sure your card is supported before buying
  one.


  6.13.2.2.  Serial Null Modem Cable

  Probably the cheapest way to connect your laptop to another computer,
  but quite slow. You may use PPP or SLIP to start the connection.


  6.13.2.3.  Parallel Port NIC (Pocket Adaptor)

  Accton Pocket Ethernet and Linux <http://www.unix-ag.uni-
  siegen.de/~nils/accton_linux.html> This ethernet adaptor uses a
  parallel port and delivers approximately 110k Bytes/s throughput for
  those notebooks that do not have PCMCIA slots.

  Linux and Linksys Ethernet Adaptors
  <http://www.cs.utexas.edu/users/kharker/linux-laptop/linksys.html> A
  short note on the use of the Linksys parallel-port ethernet adaptor
  under Linux. This is a widely available networking adaptor that
  doesn't require a PCMCIA slot.


  6.13.2.4.  Parallel "Null" Modem Cable

  Offers more speed than a serial connection. Some laptops use chipsets
  that will not work with PLIP. Please see PLIP-HOWTO for details.


  6.13.2.5.  Docking Station NIC

  I don't have experience with a NIC in a docking station yet.


  6.14.  Modem


  6.14.1.  Modem Types

  There are three kinds of modems available: internal, PCMCIA card or
  external serial port modems. But some internal modems will NOT work
  with Linux such as the MWave modems (IBM) or if the laptop has a
  WinModem. This is caused by non-standard hardware. So you have to use
  either a PCMCIA card modem or an external modem.

  Quotation from the Kernel-FAQ: "9.Why aren't WinModems supported?
  (REG, quoting Edward S. Marshall) The problem is the lack of
  specifications for this hardware. Most companies producing so-called
  WinModems refuse to provide specifications which would allow non-
  Microsoft operating systems to use them. The basic issue is that they
  don't work like a traditional modem; they don't have a DSP, and make
  the CPU do all the work. Hence, you can't talk to them like a
  traditional modem, and you -need- to run the modem driver as a
  realtime task, or you'll have serious data loss issues under any kind
  of load. They're simply a poor design."

  "Win modems are lobotomized modems which expect Windows to do some of
  their thinking for them. If you do not have Windows, you do not have a
  connection. "

  Anyway, I have set up a page collecting information on laptops with
  internal modems at http://www.snafu.de/~wehe/index_li.html
  <http://www.snafu.de/~wehe/index_li.html> . Maybe it's possible to run
  such modems with MS-Windows9x/NT emulators like wine or VMware, but I
  don't know it.

  Recently there is a driver for Lucent WinModems (alpha) available at
  SuSE - Labs <http://www.suse.cz/development/ltmodem/> and LTModem
  diagnostic tool <http://www.close.u-net.com>.


  6.14.2.  Caveats

  WARNING: Pay attention to the different kinds of phone lines: analog
  and ISDN. You can't connect an analog modem to an ISDN port and vice
  versa. Though there might be hybrid modems available. Connecting to
  the wrong port may even destroy your modem. Trick: If you are looking
  for an analog phone port in an office building which is usually wired
  with ISDN, take a look at the fax lines, they are often analog lines.

  For tracking the packets on PPP you may use pppstats. Or pload this
  provides a graphical view of the traffic (in and out) of the PPP
  connection. It is based on athena widgets hence is very portable. It
  also uses very little CPU time. The home of pload is
  http://www.engr.utk.edu/~mdsmith/pload/
  <http://www.engr.utk.edu/~mdsmith/pload/> .


  6.15.  SCSI


  6.15.1.  Hardware Compatibility Check

  If unsure about the right SCSI support, compile a kernel with all
  available SCSI drivers as modules. Load each module step by step until
  you get the right one.


  6.15.2.  Related HOWTOs



  1. SCSI-HOWTO


  6.15.3.  Survey

  AFAIK there is no laptop yet with a SCSI harddisk. Though there are
  two models with a built in SCSI port: Texas Instruments TI 4000 and HP
  OmniBook 800. Maybe the PowerBook G3 has a SCSI disk, but I didn't
  check this yet. The old Apple Powerbook Duo models had a SCSI hard
  disk.

  For other models, if you need SCSI support you may get it by using a
  SCSI-PCMCIA card or via a SCSI adapter in a docking station.



  6.16.  Universal Serial Bus - USB


  6.16.1.  Linux Compatibility Check

  You should get information about the USB controller with cat /proc/pci
  and about USB devices with cat /proc/bus/usb/devices.


  6.16.2.  Miscelleaneous

  Newer laptops come with the Universal Serial Bus (USB). I haven't
  tried it on any of my systems because I don't have any USB devices.

  Visit http://peloncho.fis.ucm.es/~inaky/uusbd-www/
  <http://peloncho.fis.ucm.es/~inaky/uusbd-www/> for the USB Linux home
  page. Also I have set up a page collecting information about laptops
  and USB at LiLAC - Linux with Laptop Computers
  <http://www.snafu.de/~wehe/index_li.html> .


  6.17.  Floppy Drive


  6.17.1.  Linux Compatibility Check

  Usually there are no problems connecting a floppy drive to a Linux
  laptop. But with a laptop floppy drive you may sometimes not be able
  to use every feature. I encountered the superformat command (from the
  fdutils package) couldn't format more than 1.44MB with my HP OmniBook
  800. You may also have difficulty when the floppy drive and CD drive
  are mutually exclusive, or when the floppy drive is a PCMCIA device
  (as with the Toshiba Libretto 100). With older laptops, there might be
  a minor problem if they use a 720K drive. AFAIK all distributions come
  with support for 1.44M (and sometimes 1.2M) floppies only. Though it's
  possible to install Linux anyway. Please see Installation chapter.
  Please see kernel documentation for boot time parameters concerning
  certain laptop floppy drives, for instance IBM ThinkPad. Or man
  bootparam .


  6.18.  CD Drive

  Most notebooks today come with CD drives. If floppy and CD drive are
  swappable they are usually mutually exclusive. Sometimes they come as
  PCMCIA devices. Or as SCSI device (HP OmniBook 800). AFAIK there are
  discmans available which have a port to connect them to a computer or
  even a SCSI port. I found an article published by Ziff-Davis
  Publishing Company (September 1996 issue, but missed to note the URL)
  written by Mitt Jones: "Portable PC Card CD-ROM drives transform
  laptops into mobile multimedia machines", which listed: Altec Lansing
  AMC2000 Portable Multimedia CD-ROM Center; Axonix ProMedia 6XR; CMS
  PlatinumPortable; EXP CDS420 Multimedia Kit; H45 QuickPCMCIA CD;
  Liberty 115CD; Panasonic KXL-D740; Sony PRD-250WN CD-ROM Discman.


  6.19.  DVD Drive

  The Linux Video and DVD Project <http://livid.on.openprojects.net> has
  made great headway since its start last February. They have just
  released the source code ( http://livid.on.openprojects.net/css.tgz)
  so that a DVD decoder card can unlock and read the DVD. Also provided
  on the site are links to various documents discussing DVD chipset
  specifications. The Linux Video and DVD Project is avidly seeking help
  from the opensource community for development.

  Universal Disk Format (UDF) Driver
  <http://www.trylinux.com/projects/udf/index.html>: "UDF is a newer
  CDROM filesystem standard that's required for DVD roms. It's meant to
  be a replacement for the ISO9660 filesystem used on today's CDROMs,
  but the immediate impact for most will be DVD. DVD multimedia cdroms
  use the UDF filesystem to contain MPEG audio and video streams.   To
  access DVD cdroms you would need a DVD cdrom drive, the kernel driver
  for the cdrom drive, some kind of MPEG video support, and a UDF
  filesystem driver (like this one). Some DVD cdroms may contain both
  UDF filesystems and ISO9660 filesystems. In that case, you could get
  by without UDF support."


  6.20.  Harddisk


  6.20.1.  Linux Compatibility Check

  Useful programms are hdparm, dmesg, fsck and fdisk .


  6.20.2.  Miscellaneous

  Be careful when using your laptop abroad. I have heard about some
  destroyed harddisks due to a magnetic field emitted from the magnetic-
  holds at the backresttable of the seats in a german railway waggon.

  Though I am quite satisfied with the quality of the harddisk in my
  laptop, when I removed it from the case I unintendedly dropped it, I
  recommend to be very careful.


  6.20.3.  Form Factors

  AFAIK there is only one form factor for harddisks used in laptops the
  2.5" format. This format seems to be available in different heights
  (Please note I couldn't verify this information yet):


  o  18mm: laptops build before 1996 usually have drives 18mm high

  o  12.7mm: I got a report about such disks but without a notebook
     model or manufacturer name

  o  11mm: since 1996 the drives are 11mm high

  o  9mm: many laptops, including the subnotebooks, now use a 9mm-high
     disk drive. The largest available in this format in late 1999 is
     IBM 12GN.

  o  9.5mm: Toshiba Libretto L70 and L100 have a 9.5mm HD

  o  8.45mm: Toshiba Libretto 20, 30, 50 and 60 have 8.45mm tall HDs

  o  6.35mm: Toshiba Libretto L1000 has a 6.35mm HD

  It might be possible to use a hard disk wich doesn't fit with some
  case modifications.

  Some laptops come with a removable hard disk in a tray, for instance
  the KAPOK 9600D. There seem to be no SCSI drives for laptops
  available.



  6.21.  Video Port / ZV Port

  Some high end laptops come with a video or ZV port (NTSC/PAL). Since I
  don't have a laptop with a ZV or video port yet, I can provide only
  some URLs  http://www.thp.uni-koeln.de/~rjkm/linux/bttv.html
  <http://www.thp.uni-koeln.de/~rjkm/linux/bttv.html> (driver)
  http://www.mathematik.uni-kl.de/~wenk/xwintv.html
  <http://www.mathematik.uni-kl.de/~wenk/xwintv.html> (tvviewer). For
  further information see video4linux at
  http://roadrunner.swansea.uk.linux.org/v4l.shtml <
  http://roadrunner.swansea.uk.linux.org/v4l.shtml>. To collect
  information about laptops with video port I have setup a page at
  http://www.snafu.de/~wehe/index_li.html
  <http://www.snafu.de/~wehe/index_li.html> . Alternatively to the ZV
  port you might use the USB port.


  7.  Palmtops, Personal Digital Assistants - PDAs, Handheld PCs - HPCs

  Palmtops and PDAs are currently not much covered in this HOWTO. Anyway
  it may be useful therefore, too. I just include some links, most of
  them are from Kenneth E. Harker's page
  <http://www.cs.utexas.edu/users/kharker/linux-laptop/> :


  1. Highly recommended is the page by Russell King  ARM Linux
     <http://www.arm.uk.linux.org/~rmk/> about PDAs with ARM CPU and
     with links to other Linux related PDA sites.

  2. PalmOS-HOWTO (former Pilot-HOWTO) by David H. Silber.

  3. Newton and Linux Mini-HOWTO
     <http://privat.swol.de/ReinholdSchoeb/Newton/> .

  4. Newtl: Newton/Linux Communications System
     <http://www.tcel.com/~aehall/newtl/> Newtl allows a Linux machine
     to communicate with a Newton PDA. Automatically send e-mail, print,
     and fax outboxes through your Linux machine, and more.

  5. PilotLink and XCoPilot <ftp://ryeham.ee.ryerson.ca/pub/PalmOS/>
     PilotLink is an utility that performs data transfers from 3com
     PalmPilot handheld computers to your Linux machine. XCoPilot is an
     emulator of the PalmPilot operating system that runs under Linux.

  6. PalmVNC <http://www.icsi.berkeley.edu/~minenko/PalmVNC> is an
     implementation of the Virtual Network Client architecture that will
     allow you to use a Linux or other UNIX machine to put up a (tiny) X
     Window on a 3COM PalmPilot.

  7. PDAs and infrared remote control, see Hiromu Okada
     <http://hp.vector.co.jp/authors/VA005810/remocon/remocone.htm>

  8. AFAIK you can run Linux on the IBM PC110 (a tiny PC handheld that's
     no longer manufactured). There's a HOWTO on it running around
     somewhere but I don't have an URL, instead I found a description in
     LINUX REDUX July 1997
     <http://boardwatch.internet.com/mag/97/jul/bwm70.html> by Alan Cox.

  9. For more information on Virtual Network Computing, see VNC
     <http://www.uk.research.att.com/vnc> .

  10.
     There is also the Handheld Systems(TM) On-line Archives
     <http://www.cdpubs.com/hhsys/archives.html> and a search engine
     about palmtop related topics Palmtop.Net/ <http://www.palmtop.net/>
     .
  11.
     I have setup a small page about Linux with PDAs and Handheld PCs
     <http://www.snafu.de/~wehe/pda_linux.html>, too.


  8.  Cellular Phones, Pagers, Calculators, Digital Cameras, Wearable
  Computing

  Though in my opinion related to the topic, these devices are not much
  covered in this text, yet. For general information about Embedded
  Systems, see http://www.embedded.com  <http://www.embedded.com>. For
  Linux information, see ELKS <http://www.elks.ecs.soton.ac.uk/> and the
  uCLinux <http://ryeham.ee.ryerson.ca/uClinux> project. See
  news:comp.arch.embedded


  8.1.  Cellular Phones

  For NOKIA cellular phones see GNOKII project
  <http://multivac.fatburen.org/gnokii/> . And Linux Nserver
  <http://www.users.globalnet.co.uk/~syrinx/nserver/index.html>. This
  project aim is to produce a GPL replacement for Nokia's Windows
  Nserver, and maybe improve upon it along the way. Initially it will
  emulate the Windows 3.1 version (ie. allow backup, restore and
  install).

  openWAP <http://www.openwap.org/> is an open source project for the
  implementation of the Wireless Application Protocol (WAP) for use with
  browsers, servers and tools. WAP is used by PDA devices, cell phones,
  pagers and other wireless devices to transmit internet content to
  these devices. The project is still in its early stages and nothing
  can be downloaded yet.

  GSMLIB <http://www.pxh.de/fs/gsmlib/download/> is a library to access
  GSM mobile phones through GSM modems. Features include: modification
  of phonebooks stored in the mobile phone or on the SIM card, reading
  and writing of SMS messages stored in the mobile phone, sending and
  reception of SMS messages. Additionally, some simple command line
  programs are provided to use these features.


  8.2.  Pagers - SMS Messages

  QuickPage <http://www.qpage.org/> is a client/server software package
  that enables you to send messages to an alphanumeric pager. The client
  accepts a message from the user and forwards it to a server using
  SNPP. The server uses a modem to transmit the message to the
  recipient's paging service using the TAP protocol (also known as the
  IXO protocol).

  mail2sms <http://www.fts.frontec.se/~dast/mail2sms/> converts a (MIME)
  mail to a short message, allowing search/replace, conditional rules,
  date/time dependent actions, customizing the output format, etc. The
  output defaults to 160 characters, which is perfectly suitable for
  sending the text to a GSM telephone as an SMS message. This software
  does not include any code for actually sending the text to anything
  else but another program or stdout.

  email2sms <http://www.new.ox.ac.uk/~adam/computing/email2sms/> is a
  filter written in Perl which converts an e-mail into a form suitable
  for sending as an SMS message. Its main advantage over the
  alternatives is that it uses the CPAN module Lingua::EN::Squeeze to
  compress the text down to as little as 40% of its original size, so
  you can get much more of your e-mail into the 160 character limit
  imposed by SMS. It is fully MIME compatible, and has many configurable
  options, including removal of quoted text. Ideal for use with
  procmail. A Perl script for sending the output to a typical e-mail to
  SMS web gateway is included.

  SMSLink <http://www.styx.demon.co.uk/smslink/> implements a
  client/server gateway to the SMS protocol (short messages on the
  mobile phones). It requires the use of dedicated hardware though (a
  serial GSM module). Both SMS emission and reception are supported. The
  server only runs under Linux at the present time and also supports
  interactive mode via telnet. The command-line client already exists
  for Linux, Solaris and HP-UX. A basic web interface is provided. A
  Win32 client is in the works.

  nmsms <http://lide.pruvodce.cz/~wayne/> is a very simple program to
  announce incoming email to an SMS address (email address) defined at
  compile time. The original From: and Subject: header are included in
  each mail announced.

  mepl <http://www.hof-berlin.de/mepl/> is a software for
  3COM/USRobotics Messagemodems to control the self-employed-mode. This
  program can be used for downloading the messages and saving or mailing
  them in gsm or fax-format.


  8.3.  Digital Cameras

  For information about cellular phones and digital cameras see some
  links at my page about Linux with Infrared Devices
  <http://www.snafu.de/~wehe/ir_misc.html> and my IR-HOWTO.

  Newsgroup: rec.photo.digital .

  The Flashpath adapter is a diskette like device which is used to
  transfer data from a digital camera to a computer. See Flashpath for
  Linux <http://www.schou.dk/flashpath/> and James Radley's flashpath
  homepage <http://www.susie.demon.co.uk/flashpath.html>.


  8.4.  Calculators

  Information about calculators e.g. HP-48 is at HP-Calculator.Org
  <http://www.hpcalc.org> and Keith's HP-48 Page
  <http://www.gmi.edu/~madd0118/hp48/>. HP-48 Kermit Hints and Tips
  <http://www.columbia.edu/kermit/hp48.html> shows how to talk to the
  HP48 via its serial-line Kermit protocol. The HP-48 may also be used
  as a Linux terminal <http://panic.et.tudelft.nl/~costar/hp48>.

  See also at my page about Linux with Infrared Devices
  <http://www.snafu.de/~wehe/ir_misc.html>.

  Backup utility for the CASIO diary
  <http://www.tunbury.demon.co.uk/casio/>. It is a package ported from
  DOS to allow communication to the CASIO series of hand-held
  organizers.  It allows backup from CASIO to your computer and restore
  a backup file from your computer to the CASIO. It can also output
  human readable file from CASIO. Currently supports: phone, calendar,
  schedule, memo, and reminder. See also http://www.aloha.net/ alank/
  http://www.casioworld.com , http://home.t-
  online.de/home/Milan.Urosevic/ and
  http://sunsite.unc.edu/pub/Linux/apps/

  GtkTiLink <http://www.multimania.com/rlievin/> is a program which
  allows you to transfer data between a Texas Instruments calculator and
  a computer. It works with all cables (parallel, serial, Black and Gray
  TI Graph Link). It supports the TI82, TI89, TI92 and TI92+
  calculators. It can send/receive data and backups, make a capture of
  the calculator screen and do remote control.
  8.5.  Wearable Computing

  Also related to this topic but not covered yet seems wearable
  computing, see http://lcs.www.media.mit.edu/projects/wearables/
  <http://lcs.www.media.mit.edu/projects/wearables/> , the page of
  Lionel, "trollhunter" Bouchpan-Lerust-Juery,
  http://infonomade.linuxfr.org/indexen.html
  <http://infonomade.linuxfr.org/indexen.html> for further information
  and http://wearables.blu.org <http://wearables.blu.org> and
  http://www.wearcomp.org/ <http://www.wearcomp.org/>.

  Sulawesi <http://wearables.essex.ac.uk/sulawesi/> was developed due to
  the problems running a desktop GUI on a wearable computer. It has been
  designed and implemented to tackle what has been considered to be
  important challenges in a wearable user interface, the ability to
  accept input from any number of input devices, such as machine vision,
  speech recognition, portable keyboards, GPS devices, infra-red, etc.
  and to allow services to manipulate the information and generate a
  suitable output such as speech generation, graphics using a
  headmounted display, vibrotactile stimuli, etc. The Gili user
  interface has been updated, more documentation has been added, and the
  Spatial Reminder has been introduced.


  8.6.  Watches

  The datalink library <http://datalink.fries.net/> allows sending
  information to the Timex DataLink watches. The original datalink
  library supports the model 150 and possibly the model 70 watch. This
  version has been extended to work with the DataLink Ironman Triathlon
  watch. It has been tested with the SVGA output on the Ironman watch
  only, other output devices and other watches may or may not work, I
  have no reports either way. The display must be a CRT display (not a
  LCD).


  9.  Accessories


  9.1.  PCMCIA Cards


  9.1.1.  Card Families



  1. Ethernet adapter

  2. Token Ring adapter

  3. Ethernet + Modem / GSM

  4. Fax-Modem / GSM adapter

  5. SCSI adapter

  6. I/O cards: RS232, LPT, RS422, RS485, GamePort, IrDA, Radio, Video

  7. Memory cards

  8. harddisks

  9. 2.5" harddisk adapters

  For desktops there are PCMCIA slots for ISA and PCI bus available.

  Source: http://www.lapshop.de <http://www.lapshop.de>


  9.1.2.  Linux Compatibility Check

  With the command cardctl ident you may get information about your
  card. Put this information into /etc/pcmcia/config.opts if necessary.
  But this may not be enough to get the card to work, but works
  sometimes for no-name network cards or modem cards. If you get a card
  to work or have written a new driver please don't forget to announce
  this to the developer of the PCMCIA-CS package David Hinds
  <http://pcmcia.sourceforge.org> . Look the current issue of his file
  SUPPORTED.CARDS < http://pcmcia.sourceforge.org> to get information
  about supported cards.

  Since there are not all cards mentioned I have set up a page PCMCIA
  Cards "Unofficially" Supported by Linux
  <http://www.snafu.de/~wehe/index_li.html> .


  9.2.  SmartCards

  SmartCard reader, see Project Muscle - Movement for the Use of Smart
  Cards in a Linux Environment
  <http://www.linuxnet.com/smartcard/index.html>


  9.3.  Memory Technology Devices - RAM and Flash Cards

  The Linux Memory Technology Device <http://www.linux-
  mtd.infradead.org/> project aims to provide a unified subsystem for
  handling RAM and Flash cards (Memory Technology Devices). It is
  intended to be compatible with the Linux PCMCIA code, to prevent
  duplication of code and effort, yet its main target is small embedded
  systems, so it will be possible to compile the drivers into the kernel
  for use as a root filesystem, and a close eye will be kept on the
  memory footprint.


  9.4.  Printers

  Survey about small mobile printers:


  1. CANON: BJC-80, for infrared connections to this printer see the
     links at my page about Linux and Infrared Devices
     <http://www.snafu.de/~wehe/ir_misc.html>

  2. CANON: BJ-30

  3. HP: DeskJet 340Cbi. This is a small, portable, low-duty-cycle
     printer. It prints either black, or color (3 color). I have had
     some problems with it loading paper. Overall, the small size and
     portability make it a nice unit for use with laptops. I use the HP
     500/500C driver with Linux.

  4. Olivetti: JP-90

  AFAIK only the HP and the BJC-80 machine have an infrared port. Pay
  attention to the supplied voltage of the power supply if you plan to
  travel abroad. Source: http://www.lapshop.de <http://www.lapshop.de>



  9.5.  Power and Phone Plugs, Power Supply

  When travelling abroad you might consider to take a set of different
  power and phone plugs with you. Also, it's useful if you can change
  the input voltage of the power supply, for instance from 110V in the
  US to 220V in Germany. There also power supplies for 12V batteries
  from cars.

  Some models of power plugs:

  ______________________________________________________________________
                  ____
                 / () \          _   _              _
  frontal view: |()  ()|        (_)=(_)            (_)           N.N.
                 ------

  abbrevation.:    C13             C8              ??            PS/2

  symbol......:    ??              ??              -O)-          N.N.
  ______________________________________________________________________


  Caveats: Though some -O)- plug may seem to be compatible to your lap-
  top, because of the according physical size, take extremely care it
  uses the same plus-minus voltage scheme, for instance plus for the
  inner ring and minus for the outer one. Often but not always there are
  the according symbols near the plug.


  9.6.  Bags and Suitcases

  You probably wonder, why I include this topic here. But shortly after
  using my COMPAQ Armada 1592DT I recognized that the rear side of the
  machine (where the ports are arranged) was slightly damaged. Though I
  have taken much care when transporting the laptop, this was caused by
  putting the bag on the floor. It seems that the laptop has so much
  weight, that it bounces inside the bag on its own rear side. So I
  decided to put a soft pad into the bag before loading the laptop. A
  good bag is highly recommended if you take your laptop on trips, or
  take it home every night.

  Laptops computers are frequently demolished in their carrying bag.
  The two main causes of demolition are poking the LC display and
  banging the edges.A good case has very stiff sides to spread out
  pokes, and lots of energy-absorbent padding around the edges to help
  when you whack it on the door jamb.Few cases actually have either of
  these features.

  More laptops are lost to theft than damage, so camouflage is a wise
  too.  Emerson, Tom # El Monte <TOMEMERSON@ms.globalpay.com> wrote: "I
  use for a laptop travelling bag: a Pyrex casserole carrier bag. Yup,
  you might think it odd to use a casserole bag for a laptop, but it
  turns out it has several advantages:


  o  The one I use has a microwavable heating pad in it -- while I don't
     actually heat this pad (it's meant to keep food warm while in
     transport), it does provide padding underneath the laptop.  The
     carrier I have only has a lower  - heating - pad, but there is also
     a similar carrier that has both a lower  - heating - pad and an
     upper  - cooling - pad - placed in the freezer to get it cold - --
     the intent is that you keep one or the other in the bag to keep
     your food hot or cold as desired.  A secondary advantage to the  -
     cooling pad - pad is that if you've  - chilled - it before taking
     the computer out for the day, it will keep the CPU cooler while
     you're running the laptop...
  o  the top of the bag has a zipper on three sides, so it  - opens -
     the same way as my laptop -- I don't even need to take it out of
     the carrier to use the laptop

  o  there is enough room at the side of the bag to store the external
     power supply, a regular Logitech mouseman, and the network  -
     dongle - with BNC/TP ports - and if I had it, the modem/phone port
     as well -

  o  there is enough clearance on top of the machine to include a
     handful of CD's or diskettes, if needed...

  o  when it's left - unattended -  in a car, it's less likely to be
     stolen -- think about it, if you were a thief walking through a
     parking lot and eyeing the contents of cars, a  - laptop bag -  is
     instantly recognizable as holding a laptop computer -- something
     that can be fenced at a pretty hefty profit, but if you saw a
     casserole carrier in the front seat of a car, would you think it
     contained anything OTHER than a casserole? - and probably half-
     eaten, at that... - Unless you are a hungry thief, chances are
     you'll skip this and move on...

  o  likewise, I've heard that keeping a laptop computer in a diaper bag
     is another good - camouflage - technique -- who in their right mind
     is going to steal a bag of - dirty - diapers?"


  10.  Different Environments - On the Road


  10.1.  Related HOWTOs



  1. Security-HOWTO

  2. Multiboot-with-LILO-mini-HOWTO

  3. Ethernet-HOWTO

  4. NET-3-HOWTO

  5. Offline-Mailing-mini-HOWTO

  6. Plip-mini-HOWTO

  7. Slip-PPP-Emulator-mini-HOWTO


  10.2.  Configuration Tools


  10.2.1.  NetEnv

  Do you use your laptop in different network environments? At home? In
  the office? At a customers site?

  If yes, the small package "netenv" might be useful for you. When
  booting your laptop it provides you with a simple interface from which
  you can choose the current network environment. The first time in a
  new environment, you can enter the basic data and save it for later
  reuse.

  Netenv sets up a file containing variable assignments which describe
  the current environment. This can be used by the PCMCIA setup scheme,
  e.g. like the one that comes with Debian/GNU Linux and perhaps others.
  The netenv data can be used for things like:


  1. Network Device: Configure the network device for different
     environments.

  2. Choose a proper XF86Config: Think of using your laptop standalone
     with touchpad vs. connected to a CRT monitor along with an external
     mouse. For example, a wheel mouse could be used when docked, but
     the driver is not compatible with the normal trackpoint or
     touchpad.

  3. Windowmanager: You can set up your windowmanager according to the
     current location of your machine.

  4. Printing Environment: The netenv data can easily be used to set up
     the printing environment.

  Netenv is available as Debian/GNU Linux package as well as tarball. It
  depends on dialog(1) for the menu system. It is developed by Gerd
  Bavendiek bav@rw.sni.de you may get it at http://www.uni-
  bielefeld.de/~portgym/net/netenv.html <http://www.uni-
  bielefeld.de/~portgym/net/netenv.html> .


  10.2.2.  divine

  divine <http://www.fefe.de/divine/> is an utility for people who use
  their machines in different networks all the time. "The idea is this:


  o  you describe the possible networks in /etc/divine.conf, including
     one or more machines that are probably up (routers and NIS servers
     come to mind).

  o  at boot time, you run divine.

  o  divine starts a thread that injects fake arp requests into the
     network.  The thread will try again up to three times, pausing 1
     second between retries.  If the last try times out again, the
     thread will print an error message, leave the interface in the
     original state and exit cleanly.

  o  the main thread just looks for arp replies and exits if one is
     found.

  o  You have one resolv.conf per network, for example
     /etc/resolv.conf.default and /etc/resolv.conf.work, and divine will
     symlink one of them to /etc/resolv.conf for you.

  o  You can specify a proxy server plus port and divine will write the
     proxy server to /etc/proxy. This can be evaluated inside your shell
     startup script, like this (zsh):


     ___________________________________________________________________
     export http_proxy="http://`</etc/proxy`/"
     ___________________________________________________________________


  The included perl script edit-netscape-proxy.pl will edit the proxy
  settings in your Netscape 4 preferences file.

  o  You can even specify an additional script to be run for each
     selection.  You can use this to edit /etc/printcap or /etc/issue or
     do something else I forgot.
  The point about divine in contrast to other solutions is that other
  solutions normally use ping or something like that. divine can check a
  large number of networks instantaneously, assuming that the machines
  you ping answer within one second (.4 seconds are normal on
  Ethernets). And pinging an unknown address will do an arp request
  anyway, so why not do an arp request in the first place?"


  10.2.3.  Mobile IP

  From the NET3-4-HOWTO: "The term IP Mobility describes the ability of
  a host that is able to move its network connection from one point on
  the Internet to another without changing its IP address or losing
  connectivity. Usually when an IP host changes its point of
  connectivity it must also change its IP address. IP Mobility overcomes
  this problem by allocating a fixed IP address to the mobile host and
  using IP encapsulation (tunneling) with automatic routing to ensure
  that datagrams destined for it are routed to the actual IP address it
  is currently using."

  HUT Mobile IP <http://www.cs.hut.fi/Research/Dynamics/Dynamics> is a
  dynamical, hierarchical Mobile IP system for Linux operating system.
  The implementation enables a hierarchical model for IP mobility, thus
  decreasing the location update times as a mobile host moves. Dynamics
  system has been designed Wireless LAN technology in mind, and the
  system has optimized functionality for mobility in WLAN. There is now
  a mailing list available. You can join it by sending subscribe on the
  subject line to <dynamics-user-request@cs.hut.fi> - or you can simply
  check the  mail archive
  <http://www.cs.hut.fi/Research/Dynamics/mail/user>.


  10.2.3.1.  Resources



  1. Linux Mobile-IP <http://anchor.cs.binghamton.edu/~mobileip/>

  2. Linux Mobile IP from HP Labs Bristol by Manuel Rodriguez
     <http://hplbwww.hpl.hp.com/people/jt/MobileIP/index.html>

  3. MosquitoNet Mobile IP
     <http://mosquitonet.Stanford.EDU/software/mip.html>

  4. Mobile IP at NUS <http://mip.ee.nus.sg/>

  5. Linux Mobile-IP <http://anchor.cs.binghamton.edu/~mobileip/>

  6. Bay Area Research Wireless Access Network (BARWAN)
     <http://http.cs.berkeley.edu/~randy/Daedalus/BARWAN/>

  Sources: Kenneth E. Harker and Dag Brattli


  10.2.4.  DHCP/BootP

  DHCP and BootP are also useful for working in different environments.
  Please see the DHCP-HOWTO and BootP-HOWTO.


  10.2.5.  PPPD Options

  The pppd command can be configured via several different files: pppd
  file /etc/ppp/<your_options> .


  10.2.6.  /etc/init.d

  You may even choose to do your configuration by editing the
  /etc/init.d files manually.


  10.2.7.  PCMCIA - Schemes

  How can I have separate PCMCIA device setups for home and work? This
  is fairly easy using PCMCIA scheme support. Use two configuration
  schemes, called home and work. For details please read the according
  chapter in the PCMCIA-HOWTO by David Hinds.


  10.2.8.  Bootloaders


  10.2.8.1.  LILO

  From http://www.mjedev.demon.co.uk/index.html
  <http://www.mjedev.demon.co.uk/index.html> <Martin J. Evans
  martin@mjedev.demon.co.uk> I have taken this recommendation: The first
  point to note is that init will take any arguments of the form
  name=value as environment variable assignments if they are not
  recognized as something else. This means you can set environment
  variables from the LILO boot prompt before your rc scripts run. I set
  the LOCATION environment variable depending on where I am when I boot
  Linux. e.g.

  ______________________________________________________________________
  LILO: linux LOCATION=home
  ______________________________________________________________________


  Or

  ______________________________________________________________________
  LILO: linux LOCATION=work
  ______________________________________________________________________


  Or simply

  ______________________________________________________________________
  LILO: linux
  ______________________________________________________________________


  where failing to set LOCATION means the same as LOCATION=home (i.e. my
  default). Instead of typing LOCATION=place each time you boot you can
  add an entry to your /etc/lilo.conf file and use the append instruc-
  tion. e.g.



  ______________________________________________________________________
  # Linux bootable partition for booting Linux at home
  #
  image = /vmlinuz
  root = /dev/hda3
  label = linux
  read-only
  # Linux bootable partition config ends
  #
  # Linux bootable partition for booting Linux at work
  #
  image = /vmlinuz
  root = /dev/hda3
  label = work
  read-only
  append="LOCATION=work"
  # Linux bootable partition config ends
  ______________________________________________________________________


  With the example above you can use "linux" for booting at home and
  "work" for booting at work.

  Armed with the facility above, you can now edit the relevant rc
  scripts to test ENVIRONMENT before running ifconfig, setting up route
  etc.


  10.2.8.2.  Other Bootloaders

  There are several other bootloaders which are often overlooked.
  Besides LILO, have a look at loadlin, CHooseOS (CHOS) (not GPL), GRand
  Unified Bootloader (GRUB), System Commander and take a look at
  ftp://metalab.unc.edu/pub/Linux/system/boot/loaders/
  <ftp://metalab.unc.edu/pub/Linux/system/boot/loaders/>. The NT boot
  loader or OS/2 boot loader may even be used.


  10.2.9.  X-Windows

  From Steve <steve@cygnet.co.uk> I got a configuration for X windows
  with an external monitor: Note that I have introduced a neat trick!
  For my nice 17" monitor I start X with no options and get the default
  16-bit 1152x864 display - but when using the LCD screen I specify a
  15-bit display (startx -- -bpp 15) and get the correct 800x600
  resolution automatically. This saves having to have two XConfig files.


  10.2.10.  E-Mail

  A short introduction about how to setup email on a laptop used at home
  (dial-up) and work (ethernet) by Peter Englmaier <ppe@pa.uky.edu>:


  10.2.10.1.  Features

  As a laptop user, I have special demands for my email setup. The setup
  described below, enables me to:


  o  Read my email from home using a POP email server, which is supplied
     by my university, but could also be setup on a work place computer.

  o  Write email from home with the right return address in the email
     (which does not mention my computer name).

  o  Read/write my email while working on a workstation without access
     to my laptop or the POP email server (as a backup).

  o  Read my email while working on my laptop connected to the ethernet
     of our institut.

  o  Direct email while connected via ethernet (faster than the
     fetchmail method).

  o  Indirect email (over pop mail server) while not connected to the
     ethernet at work (either at home via modem or somewhere else via
     ethernet).

  o  Use any emailer, e.g. elm or the simple mail command.

  o  Sort incomming email, delete spam, split email-collections
     (digests) into seperate emails

  The configuration is based on sendmail, fetchmail, and a remote pop
  account for email.


  10.2.10.2.  Configuration of sendmail

  This is the most complicated part. Having installed the sendmail-cf
  package, I created a file named /usr/lib/sendmail-cf/laptop.mc:


  ______________________________________________________________________
  divert(-1)
  include(`../m4/cf.m4')
  define(`confDEF_USER_ID',''8:12'')
  define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')
  define(`confDOMAIN_NAME',''pa.uky.edu'')   <---- here you define your domain
  OSTYPE(`linux')
  undefine(`UUCP_RELAY')
  undefine(`BITNET_RELAY')
  define(`SMART_HOST',`server1.pa.uky.edu')  <---- there we send outgoing email
  define(`LUSER_RELAY',`server1.pa.uky.edu') <---- there we send mail to users my laptop does not know
  MASQUERADE_AS(pa.uky.edu)                  <---- again the domain, we want to be seen as
  FEATURE(allmasquerade)
  FEATURE(nouucp)
  FEATURE(nodns)
  FEATURE(nocanonify)
  FEATURE(redirect)
  FEATURE(always_add_domain)
  FEATURE(use_cw_file)
  FEATURE(local_procmail)
  MAILER(procmail)
  MAILER(smtp)
  HACK(check_mail3,`hash -a@JUNK /etc/mail/deny')
  HACK(use_ip,`/etc/mail/ip_allow')
  HACK(use_names,`/etc/mail/name_allow')
  HACK(use_relayto,`/etc/mail/relay_allow')
  HACK(check_rcpt4)
  HACK(check_relay3)
  ______________________________________________________________________



  This looks more complicated as it is. All it does is, that it
  redirectes outbound mail to server1 (SMART_HOST) and also mail for
  local users which are not known (LUSER_RELAY). That way, I can write
  email to my colleques without using their full email address. More
  important: the From line in my email points back to my MASQUARADE_AS
  domain and not directly to my laptop. If this where not the case,
  email returned with the reply button might not reach me. You must
  restart sendmail for changes to take effect. Note: this configuration
  is for Redhat 5.2 systems. You may have to change some details.

  Now, all what is needed is to generate the /etc/sendmail.cf file m4
  laptop.mc >/etc/sendmail.cf and to add all possible domain names my
  laptop should respond to in /etc/sendmail.cw:


  ______________________________________________________________________
  # sendmail.cw - include all aliases for your machine here.
  laptop
  laptop.pa.uky.edu
  128.17.18.30
  guest1
  guest1.somewhere.org
  ______________________________________________________________________



  It is important to have all aliases in this file, otherwise sendmail
  will not accept the mail (and will reply we don't relay to the
  sender). Finally, you must now test the setup by sending email,
  replying to mail for all possible configurations. Any
  missconfiguration can result in loss of email.


  10.2.10.3.  Configuration for fetchmail on Laptop

  One method to get the email into your machine is through fetchmail.
  Fetchmail periodically checks for new email at one or more remote mail
  servers. I use the following fetchmail configuration file (in my user
  home directory): fetchmailrc


  ______________________________________________________________________
  set postmaster "myusername"
  set daemon 900
  poll pop.uky.edu with proto POP3
        user "mypopusername" there with password "mypoppassword" is mylaptopusername here
  ______________________________________________________________________



  Fetchmail will just get the the email and send it to sendmail which
  will it deliver into your /var/spool/mail/$USER file.


  10.2.10.4.  Forward E-Mail to the Laptop

  On my work station I have the following .forward file:


  ______________________________________________________________________
  me@pop.acount.edu,me@server1
  ______________________________________________________________________



  Here server1 is the machine where I keep my mailbox. All email is send
  to the pop account to be picked up later by my laptop (using
  fetchmail). However, when my laptop is connected via ethernet, I want
  my email to go directly to the laptop, instead of pop:



  ______________________________________________________________________
  me@laptop,me@server1
  ______________________________________________________________________



  In both cases, a backup of my email is send to server1 (where I also
  can read it, in case I cannot get my laptop). I keep/store all email
  on the laptop.

  Switching is done by three script files and a crontab file (on the
  workstation):

  forward_pop


  ______________________________________________________________________
  #!/bin/sh
  echo "me@pop.acount.edu,me@server1" > ${HOME}/.forward
  ______________________________________________________________________



  forward_laptop


  ______________________________________________________________________
  #!/bin/sh
  echo "ppe@laptop,ppe@server1" > ${HOME}/.forward
  crontab ${HOME}/mycrontab
  ${HOME}/utl/check_laptop
  ______________________________________________________________________



  check_laptop


  ______________________________________________________________________
  #!/bin/sh
  if /usr/sbin/ping -c 1 laptop  >/dev/null 2>&1 ; then
     :
  else
     # redirect mail to pop
     ${HOME}/utl/forward_pop
     sleep 10
     if /usr/sbin/ping -c 1 laptop  >/dev/null 2>&1 ; then
        # back to normal
        ${HOME}/utl/forward_laptop
     else
        # deactivate crontab check
        /bin/crontab -l | grep -v check_laptop >${HOME}/tmp/mycrontab.tmp
        /bin/crontab ${HOME}/tmp/mycrontab.tmp
        rm -f ${HOME}/tmp/mycrontab.tmp
     fi
  fi
  ______________________________________________________________________



  mycrontab



  ______________________________________________________________________
  # mycrontab
  0,10,20,30,40,50 * * * * ${HOME}/utl/check_laptop
  ______________________________________________________________________



  Each time I connect the laptop to the ethernet, I have to run
  forward_laptop, and each time I disconnect I run forward_pop. In case
  I forget to run forward_pop, the crontab job runs it for me less then
  10 minutes later. To do all that automatically, I change the network
  script files on my laptop as follows:

  /sbin/ifdown (this script runs, whenever a network device is stopped,
  new stuff between BEGIN and END)


  ______________________________________________________________________
  ...
  fi

  # BEGIN new stuff
  # turn off forwarding email
  mail ppe <<EOF
  turning off forwarding email
  device = ${DEVICE}
  hostname = `hostname`
  EOF
  if [ "${DEVICE}" = "eth0" -a "`hostname`"
  = "laptop" ]; then
    su -lc "ssh -l myusername server1
  utl/forward_pop" myusername >& /dev/null
  fi
  # END new stuff

  ifconfig ${DEVICE} down
  exec /etc/sysconfig/network-scripts/ifdown-post $CONFIG
  ______________________________________________________________________



  Note, that the script checks for the value of hostname. In case, I am
  connected to a foreign ethernet, my hostname and ip-address will be
  something else, e.g. guest1.

  /etc/sysconfig/network-scripts/ifup-post (this script is run, whenever
  a network device is started)



  ______________________________________________________________________
  # Notify programs that have requested notification
  do_netreport

  # BEGIN new stuff
  # check for email -- I'm using fetchmail for this
  if [ "${DEVICE}" = "eth0" -o "${DEVICE}"
  = "ppp0" ]; then
     su -lc fetchmail myusername >& /dev/null &
  fi

  # set clock if connected to ethernet, redirect email
  if [ "${DEVICE}" = "eth0" -a dquot;`hostname`" = "zaphod" ]; then
     ( rdate -s server1 ; hwclock --systohc --utc ) >& /dev/null &
     # forward email
     su -lc "ssh -l myusername gradj utl/forward_laptop" myusername >& /dev/null &
  fi
  # END new stuff

  exit 0
  ______________________________________________________________________



  10.2.10.5.  Processing Incomming E-Mail with procmail

  This step is completely optional. The above described sendmail
  configuration calls procmail for each received email, but you could
  have called procmail using the .forward file (see the procmail man
  page). Procmail is a handy tool to block spam and to sort incomming
  email.

  You need to setup a .procmailrc file to use procmail. See the man page
  for procmail, procmailrc, and procmailex (examples). My setup
  demonstrates, how to ignore certain email messages and split email-
  collections (digest) into pieces:



  ______________________________________________________________________
  # -- mail filtering -- procmail is called by sendmail --
  PATH=/bin:/usr/bin
  MAILDIR=$HOME/Mail
  LOGFILE=$MAILDIR/from
  # keep in mind:
  # use ":0:" when writing to a file
  # use ":0"  when writing to a device, e.g. /dev/null, or send email

  # - make first a backup of *all* incomming email (but ignore mail tagged below) -
  :0 c:
  *! ^Sissa-Repro
  backup

  # - keep only last 50 messages
  :0 ic
  | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,50d`

  # - delete email comming through the 'postdocs' email list, when
  # it is not of any interest
  :0
  * ^From.*postdocs
  * ^From.*Ernst Richter
  /dev/null
  :0
  * ^From.*postdocs
  * ^Subject.*card charge
  /dev/null

  # Split mailing list from the sissa preprint server into individual emails
  # - this is quite complicated :(   I can flip through the list much
  #   faster and ignore preprints which have uninteresting titles. Instead of
  #   having to browse through the whole list, my mailer will just present a
  #   list of papers.
  # 1. split it in individual messages
  :0
  * ^From no-reply@xxx.lanl.gov
  | formail +1 -de -A "Sissa-Repro: true" -s procmail

  # 2. reformat messages a bit
  # 2.1. extract 'Title:' from email-Body and add to email-header
  as 'Subject:'
  :0 b
  * ^Sissa-Repro
  *! ^Subject
  TITLE=| formail -xTitle:
  :0 a
  |formail -A "Subject: $TITLE " -s procmail

  # 2.2. store in my incomming sissa-email folder. Here, we could
  #      also reject (and thereafter delete) uninteresting 'Subjects'
  #      we could also mark more interesting subjects as urgend or send a copy
  #      to regular mail box.
  :0:
  * ^Sissa-Repro
  * ^Subject
  *! ^replaced with
  sissa
  ______________________________________________________________________



  BTW, there is a tk GUI tool to configure procmail (I think it is
  called dotfiles).


  10.2.11.  Email with UUCP

  Another possible solution for Email is to use UUCP. This software was
  made for disconnected machines, and is by far the easiest solution if
  you have several users on your laptop (we are talking about Unix,
  remember?), each with his/her own account.

  Unlike what most people think, UUCP does not need a serial connection:
  it works fine over TCP/IP, so your UUCP partner can be any machine on
  the Internet, if it is reachable from your network attachment point.
  Here is the UUCP sys for a typical laptop:



       system mylaptop
       time any
       chat "" \d\d\r\c ogin: \d\L word: \P
       address uucp.mypartner.org
       port TCP



  10.2.12.  More Info

  Using a Laptop in Different Environments
  <http://www.ssc.com/lg/issue20/laptop.html> by Gerd Bavendiek . This
  article appeared in the August, 1997 issue of the Linux Gazette
  <http://www.ssc.com/lg/>. This is an excellent, short technical
  article describing an easy way to setup your Linux notebook to boot
  into different network and printing configurations, especially useful
  for those who use their machines at home as well as other locations
  such as in the office, at school, or at a customer site.


  10.3.  Data Transport Between Different Machines

  I don't have experience with this topic yet. So just a survey about
  some means of data transport and maintaining data consistency between
  different machines.


  10.3.1.  Hardware



  1. external harddisks

  2. ZIP drive

  Wade Hampton wrote: "You may use MS-DOS formatted ZIP and floppy discs
  for data transfer. You may be able to also use LS120. If you have
  SCSI, you could use JAZ, MO or possibly DVD-RAM (any SCSI disc that
  you could write to). I have the internal ZIP for my Toshiba 700CT. It
  works great (I use automount to mount it). I use VFAT on the ZIP disks
  so I can move them to Windows boxes, Linux boxes, NT, give them to
  coworkers, etc. One problem, I must SHUTDOWN to swap the internal CD
  with the ZIP."


  10.3.2.  Software



  10.3.2.1.  Version Management Software

  Although it is certainly not their main aim, version management
  software like CVS (Concurrent Version System) are a perfect tool when
  you work on several machines and you have trouble keeping them in sync
  (something which is often called "disconnected filesystems" in the
  computer science literature).  Unlike programs like rsync, which are
  assymetric (one side is the master and its files override those of the
  slave), CVS accept that you make changes on several machines, and try
  afterwards to merge them. Assymetric tools are good only when you can
  respect a strict discipline, when you switch from one machine to
  another. On the contrary, tools like CVS are more forgetful.

  To synchronize two or more machines (typically a desktop and a
  laptop), just choose a CVS repository somewhere on the network. It can
  be on one of the machines you want to synchronize or on a third host.
  Anyway, this machine should be easily reachable via the network and
  have good disks.

  Then, cvs co the module you want to work on, edit it, and cvs commit
  when you reached a synch point and are connected. If you made changes
  on both hosts, CVS will try to merge them (it typically succeeds
  automatically) or give in and ask you to resolve it by hand.

  The typical limits of this solution: CVS does not deal well with
  binary files, so this solution is more for users of vi or emacs than
  for GIMP fans. CVS has trouble with some Unix goodies like symbolic
  links.

  For more information on CVS, see the Web page. The CVS documentation
  is excellent (in info format).


  10.3.2.2.  CODA Filesystem

  The Coda File System is a descendant of the Andrew File System. Like
  AFS, Coda offers location-transparent access to a shared Unix file
  name-space that is mapped on to a collection of dedicated file
  servers. But Coda represents a substantial improvement over AFS
  because it offers considerably higher availability in the face of
  server and network failures. The improvement in availability is
  achieved using the complementary techniques of server replication and
  disconnected operation. Disconnected operation proven especially
  valuable in supporting portable computers  http://www.coda.cs.cmu.edu/
  <http://www.coda.cs.cmu.edu/> .


  10.3.2.3.  WWWsync

  This is a program written in Perl that will update your web pages by
  ftp from your local pages. This was originally written for updating
  Demon home-pages, but will work with other providers which provide
  direct FTP access to your web pages. I didn't check this for laptop
  purposes yet. You may get the program at
  http://www.alfie.demon.co.uk/wwwsync/
  <http://www.alfie.demon.co.uk/wwwsync/> .


  10.3.2.4.  rsync

  rsync is a program that allows files to be copied to and from remote
  machines in much the same way as rcp. It has many more options than
  rcp, and uses the rsync remote-update protocol to greatly speedup file
  transfers when the destination file already exists. The rsync remote-
  update protocol allows rsync to transfer just the differences between
  two sets of files across the network link.
  10.3.2.5.  Xfiles - file tree synchronization and cross-validation

  Xfiles is an interactive utility for comparing and merging one file
  tree with another over a network. It supports freeform work on several
  machines (no need to keep track of what files are changed on which
  machine). Xfiles can also be used as a cross-validating disk <-gt;
  disk backup strategy (portions of a disk may go bad at any time, with
  no simple indication of which files were affected. Cross-validate
  against a second disk before backup to make sure you aren't backing up
  bad data).

  A client/server program (GUI on the client) traverses a file tree and
  reports any files that are missing on the server machine, missing on
  the client machine, or different. For each such file, the file
  size/sizes and modification date(s) are shown, and a comparison (using
  Unix diff) can be obtained. For files that are missing from one tree,
  similarly named files in that tree are reported. Inconsistent files
  can then be copied in either direction or deleted on either machine.
  The file trees do not need to be accessible via nfs. Files checksums
  are computed in parallel, so largely similar trees can be compared
  over a slow network link. The client and server processes can also be
  run on the same machine. File selection and interaction with a
  revision control system such as RCS can be handled by scripting using
  jpython. Requirements Java1.1 or later and JFC/Swing1.1 are needed.
  Xfiles <http://www.idiom.com/~zilla>.


  10.3.2.6.  sitecopy

  Sitecopy is for copying locally stored websites to remote web servers.
  The program will upload files to the server which have changed
  locally, and delete files from the server which have been removed
  locally, to keep the remote site synchronized with the local site,
  with a single command. The aim is to remove the hassle of uploading
  and deleting individual files using an FTP client. sitecopy
  <http://www.lyra.org/sitecopy> .


  10.3.2.7.  KBriefcase

  The KDE tool Kbriefcase <http://netnow.micron.net/~mrolig/kbriefcase/>
  tries to achieve a similar goal as the Windows briefcase, but in a
  different way. Rather than pulling your files from the desktop, they
  are pushed to the laptop. You drag a file from the local location to
  the briefcase. You are then asked for the remote path to copy it to.
  It will then copy the file to the remote location and make the
  original read-only. When you restore and remove, the file is copied
  back and write permissions are given back. The read-only status, of
  course, makes sure you don't start editing the file again before
  you've brought your changes back from the remote location.


  10.4.  Security in Different Environments


  10.4.1.  Introduction

  I am not a computer security expert. Please read the Security-HOWTO
  for more information. I just collected some information below. Note,
  these means are just small steps to additional security, though I
  recommend that you use them.


  LASG Please read Linux Administrator's Security Guide (LASG) - FAQ
  <https://www.seifried.org/lasg/> by Kurt Seifried.

  10.4.2.  Means of Security



  1. International Kernel Patch: The idea of the International Kernel
     Patch <http://www.kerneli.org/> is to collect all crypto patches so
     that using crypto in the kernel will be easier than today. The
     patch includes a number of crypto patches including a crypto API
     including Blowfish, CAST-128, DES, DFC, IDEA, MARS, RC6, Rijndael,
     Safer, Serpent, and Twofish, an encrypted filesystem loopback
     device using the crypto API, CIPE VPN and EnSKIP patches.

  2. Kennsington Lock: AFAIK proprietary lock solution with different
     laptops http://www.kennsington.com  <http://www.kennsington.com>

  3. SmartCards: by DESKO  http://www.desko.de  <http://www.desko.de>
     are not available for Linux yet. The only available laptop with a
     SmartCard builtin is the Siemens Scenic Mobile 800.

  4. User passwords: can be easily bypassed if the intruder gets
     physical access to your machine

  5. BIOS passwords: are also easily crackable, though sometimes harder
     than with desktops

  6. Name plates: to reduce the possibility of theft, you may want to
     have a nameplate made and affixed to the cover of the laptop. A
     nice one will cost you about $12, and can be made by any good
     trophy shop. They'll glue it on for you too. You could use double-
     sided tape instead, but glue is more permanent. You may even make
     an engravement into the laptop cover.

  7. Boot loader: a boot loader may be used to put your name and phone
     number (or whatever text you choose) into the boot sequence before
     the operating system is loaded. This provides a label that can't be
     removed by editing files or even doing a simple format of the
     harddisk.

  8. Antivirus policy: I have seen an antivir RPM somewhere. Check the
     BIOS for an option to disable writing at the boot sector.

  9. Database of stolen laptops: I have provided a survey of databases
     for stolen laptops <http://www.snafu.de/~wehe/stolen_laptops.html>.

  10.
     Laptop as a security risk itself: Since a laptop can easily be used
     to intrude a network, it seems a good policy to ask the system
     administrator for permission before connecting a laptop to a
     network.

  11.
     Secure Protocol: When connecting to a remote server always use a
     secure protocol.


  10.5.  Dealing with Down Times (Cron Jobs)

  A cron-like program that doesn't go by time: anacron (like
  "anac(h)ronistic") is a periodic command scheduler. It executes
  commands at intervals specified in days. Unlike cron, it does not
  assume that the system is running continuously. It can therefore be
  used to control the execution of daily, weekly and monthly jobs (or
  anything with a period of n days), on systems that don't run 24 hours
  a day. When installed and configured properly, anacron will make sure
  that the commands are run at the specified intervals as closely as
  machine-uptime permits.
  hc-cron This program is a modified version of Paul Vixie's
  <paul@vixie.com> widely used cron daemon. Like the original program it
  runs specified jobs at periodic intervals. However, the original crond
  relies on the computer running continuously, otherwise jobs will be
  missed. This problem is addressed by hc-cron, that is indended for use
  on home-computers that are typically turned off several times a day;
  hc-cron will remember the time when it was shut down and catch up jobs
  that have occurred during down time when it is started again. Felix
  Braun <fbraun@atdot.org> is the author of the programm, it is
  available at http://metalab.unc.edu /pub/Linux/system/daemons/cron
  <http://metalab.unc.edu /pub/Linux/system/daemons/cron> .


  10.6.  Noise Reduction

  Due to the proliferation of cellular phones and walkmans it's not
  quite common in our days to take care of a quiet environment. Anyway I
  want to give some recommendations for the polite ones.


  10.6.1.  Console (Shell) and X

  For the console setterm -blength 0 and for X xset b off turns the bell
  off. See also PCMCIA-HOWTO, and much more details in the Visible-Bell-
  mini-Howto by Alessandro Rubini.


  10.6.2.  PCMCIA

  When starting your laptop with PCMCIA-CS configured correctly, this
  will be shown by two high beeps. If you want to avoid this put
  CARDMGR_OPTS="-q" into the PCMCIA configuration file, e.g.
  /etc/pcmcia.conf for Debian/GNU Linux.

  To avoid the dialtones during the modem dialing add


  ______________________________________________________________________
       module "serial_cs" opts "do_sound=0"
  ______________________________________________________________________



  to /etc/pcmcia/config.opts (from man serial_cs). This will disable
  speaker output completely, but the ATM command should let you
  selectively control when the speaker is active.


  10.6.3.  Miscellaneous Applications

  You may configure vi with the flash option, so it will use a flash in
  case of an error, instead of a bell.

  For at least one laptop series, the Toshiba models, there seems to be
  a Linux package available to control the fan and other features.


  11.  Other Resources

  Kenneth E. Harker maintains a quite valuable database at
  http://www.cs.utexas.edu/users/kharker/linux-laptop/
  <http://www.cs.utexas.edu/users/kharker/linux-laptop/ > . Please have
  a look at his site to get current information about laptop related
  mailing lists, newsgroups, magazines and newsletters, WWW sites and a
  big database about many different laptop pages.

  To join the Linux-Laptop-Mailing-List write a mail to
  <majordomo@vger.rutgers.edu> with subscribe linux-laptop in the
  subject. You will get a confirmation message than, which you have to
  reply accordingly.

  There is now a debian-laptop mailing list. Any questions or
  discussions concerning running the Debian/GNU Linux operating
  system(s) on laptops are welcome. Send mail to <debian-laptop-
  request@lists.debian.org> with a subject of subscribe. Or visit
  thehttp://www.debian.org <http://www.debian.org> site and use the
  online form.

  Also recently founded was Running Linux on IBM ThinkPads, to join send
  an email to linux-thinkpad-subscribe@topica.com, to post send mail to
  linux-thinkpad@topica.com . See http://www.topica.com/lists/linux-
  thinkpad/ <http://www.topica.com/lists/linux-thinkpad/>.

  Lionel, "trollhunter" Bouchpan-Lerust-Juery, <trollhunter@linuxfr.org>
  has written a similar HOWTO, please look at his laptop pages
  http://infonomade.linuxfr.org/index.html
  <http://infonomade.linuxfr.org/index.html> (French version)
  http://infonomade.linuxfr.org/indexen.html
  <http://infonomade.linuxfr.org/indexen.html> (English version).

  Newsgroups are comp.os.linux.portable, comp.sys.laptops .


  12.  Repairing the Hardware

  There are several different reasons that could make it necessary to
  open the case of a laptop.


  1. repairing broken hardware

  2. get some hardware info, which isn't available otherwise

  3. remove the speakers (speakerrektomie, as described in Visual-Bell-
     mini-HOWTO)

  4. install overdrive for CPU

  5. change BIOS battery

  6. upgrade harddisk

  7. upgrade memory

  Repairing a laptop can be quite expensive if you don't have a
  manufacturer's warranty. Sometimes professional support is bad. But
  opening a laptop case can be difficult. Often the procedures to
  upgrade the memory and the harddisk are described in the manual. For
  further details, you should try to get the maintainance/technical
  manual. Just be extremely careful and make notes as to where each
  screw goes. You must get most of them back in the right hole or you
  could ruin the machine by damaging the system board. Also after you
  get all the screws to an assembly out (some will be hidden) the parts
  are usually held together with plastic clips molded in, so you still
  must exercise care to separate them. Sometimes you need certain tools,
  for instance TORX screw drivers or a solder kit. Good luck.

  WARNING: Usually laptop manufacturers declare the warranty to be void
  if the case was opened by people other than their own staff.



  13.  Solutions with Laptops


  13.1.  Introduction

  The power and capabilities of laptops are sometimes limited as
  described above. But in turn, they have a feature which desktops don't
  have, their mobility. I try to give a survey about applications which
  make sense in connection with laptops. Since I couldn't try all of
  them, there is currently little documentation. If you can provide
  further material, please contact me.


  13.2.  Mobile Network Analyzer

  I'm not an expert in this field, so I just mention the tools I know.
  Please check also for other applications. Besides the usual tools
  tcpdump, netcat, there are two applications I prefer, which may be
  used to analyze network traffic:

  The Multi Router Traffic Grapher (MRTG) is a tool to monitor the
  traffic load on network-links. MRTG generates HTML pages containing
  GIF images which provide a LIVE visual representation of this traffic.
  Check  http://www.ee.ethz.ch/stats/mrtg/
  <http://www.ee.ethz.ch/stats/mrtg/> for an example. MRTG is based on
  Perl and C and works under UNIX and Windows NT.

  Network Top - ntop http://www-serra.unipi.it/~ntop/ <http://www-
  serra.unipi.it/~ntop/> is a Unix tool that shows the network usage,
  similar to what the popular top Unix command does. ntop is based on
  libpcap and it has been written in a portable way in order to
  virtually run on every Unix platform and on Win32 as well. ntop can be
  used in both interactive or web mode. In the first case, ntop displays
  the network status on the user's terminal. In web mode a web browser
  (e.g. netscape) can attach to ntop (that acts as a web server) and get
  a dump of the network status. In the latter case, ntop can be seen as
  a simple RMON-like agent with an embedded web interface.


  13.3.  Mobile Router

  Though designed to work from a single floppy, the Linux Router Project
  (LRP) , seems useful in combination with a laptop, too.


  13.4.  Hacking and Cracking Networks

  When thinking about the powers of laptops, hacking and cracking
  networks may come into mind. Though I don't want to handle this topic
  here, but instead recommend the Security-HOWTO.


  13.5.  Lectures

  If you are giving lectures, readings or presentations in different
  places, a laptop might suit your needs. You can combine it with an
  overhead display, a beamer or a second monitor. For a second monitor
  or a beamer make sure it is supported by your laptop.

  Though Microsoft's PowerPoint is often used for such things, there are
  also Linux solutions:


  o  pdftex <http://www.tug.org/applications/pdftex/> creates PDF files
     from Tex files, which can be used toghether with certain LaTeX
     pakcages for presentations, see the example screen designed users
     manual.

  o  The Web and Exerquiz Packages
     <http://www.math.uakron.edu/~dpstory/webeq.html> also a
     sophisticated method to create presentations with LaTex.

  o  PPower <http://www-sp.iti.informatik.tu-
     darmstadt.de/software/ppower4/>

  o  Dia <http://www.lysator.liu.se/~alla/dia/> is a program for
     creating diagrams of all kinds. The current version can do UML
     class diagrams, Entity-Relationship modeling, network diagrams, and
     much more. The engine is very flexible and dynamically loads
     diagram-types from disk. It can currently export to postscript and
     load/save in an xml format.

  o  See also the software maps at KDE (K-Office) http://www.kde.org
     <http://www.kde.org> for the program KPresenter and others. And
     GNOME http://www.gnome.org/ <http://www.gnome.org/> .

  o  MagicPoint or mgp, is an X11-based presentation tool. The home page
     is http://www.Mew.org/mgp <http://www.Mew.org/mgp> or
     ftp://ftp.Mew.org/pub/MagicPoint/
     <ftp://ftp.Mw.org/pub/MagicPoint/> or http://jiji.mew.org/mgp/
     <http://jiji.mew.org/mgp/> .

  o  Commercial packages are: Applixware
     http://www.applix.com/appware/linux/slideshow/gfx011.html
     <http://www.applix.com/appware/linux/slideshow/gfx011.html> and
     Staroffice, see article 15 in LinuxFocus
     http://vesta.astro.amu.edu.pl/Library/Linux/LinFocus/May1998/
     <http://vesta.astro.amu.edu.pl/Library/Linux/LinFocus/May1998/>.



  13.6.  Mobile Data Collecting


  13.6.1.  Related HOWTOs



  1. Coffee-mini-HOWTO

  2. AX-25-HOWTO

  3. HAM-HOWTO

  4. Serial-HOWTO

  5. Serial-Programming-HOWTO


  13.6.2.  Applications

  A Linux laptop can be used to collect data outside an office, e.g.
  geodesy data, sales data, network checks, patient data in a hospital
  and others. There is support for wireless data connections via
  cellular phone modems and amateur radio. I am not sure whether PCMCIA
  radio cards are supported, see Aironet Wireless Communications
  http://www.aironet.com/ <http://www.aironet.com/>.



  13.6.3.  Specific Environments

  There are laptops available with cases build for a rugged environment
  (even waterproof laptops). In some environments, for instance in
  hospitals, take care of the Electro-Magnetic-Compatibility of the
  laptop. This is influenced by many factors, for instance by the
  material used to build the case. Usually magnesium cases shield better
  than the ones made of plastics.


  13.7.  Mobile Office

  With KDE http://www.kde.org <http://www.kde.org> (K-Office), GNOME,
  http://www.gnome.org/ <http://www.gnome.org/> and the commercial
  products WordPerfect, Staroffice and Applixware
  http://www.applix.com/ <http://www.applix.com/> Linux has more and
  more business software applications.  With the corresponding hardware,
  e.g. a portable printer and a cellular phone which connects to your
  laptop, you will have a very nice mobile office.


  13.8.  Connection to Digital Camera

  AFAIK there are currently three methods to connect a digital camera to
  a laptop: the infrared port (IrDA), serial port and maybe USB. There
  are also some auxiliary programs for conversion of pictures, etc.

  Eric <dago@tkg.att.ne.jp> wrote: "I finally succeeded in downloading
  pictures from my digital camera, but not exactly the way I expected,
  i.e. not through USB port but using pcmcia card port and memory stick
  device, part of digital camera hardware. Anyway, some interesting
  things to mention:

  Sony (pretending using a standard) uses the msdos format to store
  images as JPEG files ; so the best way to have your OS recognizing
  them is to mount the raw device like a msdos filesystem; using mount
  directly doesn't work (don't know why) but an entry in the /etc/fstab
  file allows you to mount the device correctly. i.e.:

  ______________________________________________________________________
          /dev/hde1    /mnt/camera    msdos     user,noauto,ro    0    0
  ______________________________________________________________________


  Of course, newfs before mount works too, but there is nothing to see
  at all ;-) I think both noauto and ro are important flags; I tried
  without it and it didn't work. Somehow the mount I got seems buggy .
  And if ro is missing, the camera doesn't recognize back the memory
  stick and it needs to be msdos-formatted.

  According to the camera documentation , both pcmcia and USB port
  behave the same (for Mac and Windoze - i.e. you see a file system auto
  mounted) - I deduce for Linux it should be the same thing too, as long
  as the USB driver is installed. I think now that mounting USB raw
  device the way I did with pcmcia should work, but I still couldn't
  find which device to use."

  OpenDiS (Open Digita Support) <http://digitalux.netpedia.net/> is a
  library and utility program for cameras such as the Kodak DC-220,
  DC-260, DC-265, and DC-280, that run Flashpoint's Digita operating
  system. The library is a unix implementation of the Digita Host
  Interface Specification, intended for embedding Digita support in
  other products such as gPhoto. The utility is a simple command-line
  program for standalone downloading of photos from the cameras.


  gPhoto <http://www.gphoto.org/> enables you to take a photo from any
  digital camera, load it onto your PC running a free operating system
  like GNU/Linux, print it, email it, put it on your web site, save it
  on your storage media in popular graphics formats or just view it on
  your monitor. gPhoto sports a new HTML engine that allows the creation
  of gallery themes (HTML templates with special tags) making publishing
  images to the world wide web a snap. A directory browse mode is
  implemented making it easy to create an HTML gallery from images
  already on your computer. Support for the Canon PowerShot A50, Kodak
  DC-240/280 USB, and Mustek MDC-800 digital cameras.

  photopc <http://www.lightner.net/lightner/bruce/ppc_use.html> is is a
  library and a command-line frontend to manipulate digital still
  cameras based on Fujitsu chipset and Siarra Imaging firmware. The
  program is known to work with Agfa, Epson and Olympus cameras. Should
  also work with Sanyo, but this is untested. The cameras typically come
  with software for Windows and for Mac, and no description of the
  protocol. With this tool, they are manageable from a UNIX box. Bruce
  D. Lightner <lightner@metaflow.com> has added support for Win32 and
  DOS platforms. Note that the program does not have any GUI, it is
  plain command-line even on Windows. For a GUI, check out the phototk
  program.


  13.9.  Connection to QuickCam (Video)

  AFAIK there are currently two methods to connect a video camera to a
  laptop: a ZV port and maybe USB, but I don't know how this works with
  Linux. I have heard rumors about using a sound card for video data
  transfer to a Linux box, see http://worldvisions.ca/~apenwarr/
  <http://worldvisions.ca/~apenwarr/> . I have heard rumors about a
  Linux-QuickCam-mini-HOWTO, but couldn't find a reliable URL yet. Check
  the sane package which is build for scanner support, this should
  contain support for still-grabbers as well.

  kmc_remote
  <http://rainbow.uchicago.edu/~muet/linux/kmc/kmc_utils.html> provides
  a graphical interface for controlling Kodak Motion Corder fast digital
  cameras over a serial connection. kmc_remote is built on the
  kmc_serial library, part of the kmc_utils package. kmc_remote provides
  a virtual button panel and simple one-touch commands for changing
  system variables which would involve multiple button operations on the
  real camera button console. Buttons, record settings (image size,
  record rate, shutter speed, trigger mode, burst mode), and playback
  rate control should be fully functional. All camera models are
  supported, as well as both PAL and NTSC video.

  Intel PC Camera Pro Pack < http://www.intel.com/PCcamera/> is one of
  the first webcams with USB ports. Also SONY has announced a webcam
  with USB port. See a survey at Steve's Digicams <http://www.steves-
  digicams.com/text_navigator.html>.


  13.10.  Connection to Television Set

  If you have a ZV port in the laptop, it should be easy to connect it
  to a TV set, using either NSCA or PAL, but I don't know whether either
  works with Linux.


  13.11.  Connection to Cellular Phone

  AFAIK there are two methods to connect a cellular phone to a laptop:
  via the infrared port (IrDA) or via the serial port. See the
  Linux/IrDA project for the current status of IrDA connections. AFAIK
  only the Ericsson SH888, the Nokia 8110 and the Siemens S25 provide
  infrared support.


  13.12.  Connection to Global Positioning System (GPS)

  From the Hardware-HOWTO I know there is Trimble Mobile GPS available.
  You may also connect a GPS via a serial port. Most GPS receivers have
  a data port and can connect to a PC with a special serial cable.


  o  dgpsip provides correct GPS location with DGPS signal from
     internet.

  o  gpsd <http://www.mayko.com/gpsd.html> is a daemon that listens to a
     GPS or Loran receiver and translates the positional data to
     simplified format that can be more easily used by other programs,
     like chart plotters. The package comes with a sample client that
     plots the location of the currently visible GPS satellites (if
     available) and a speedometer. Added support for the DeLame
     EarthMate as well as a new 'speedometer' mini client.

  o  The QtGPS <http://www.gbdirect.co.uk/> package contains a piece of
     software for Unix/Linux/X and a GPS receiver. It performs logging
     and replaying of a journey, supporting a moving-map display. QtGPS
     works with Lat/Long and British OSGB (Ornance Survey) co-ordinate
     systems.

  o  GRASS <http://www.geog.uni-hannover.de/grass/welcome.html>
     (Geographic Resources Analysis Support System) is a free software
     raster and vector based GIS, image processing system, graphics
     production system, and spatial modeling system.


  13.13.  Connection via Amateur Radio (HAM)

  AFAIK laptops are used in HAM contests. Please see HAM-HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html> by Terry Dawson,
  VK2KTJ, <terry@perf.no.itg.telstra.com.au> .


  13.14.  Satellite Watching

  Together with an antenna and software like seesat or sattrack you can
  use a laptop to locate a satellite for visual observation. You could
  also use xephem on a laptop when stargazing.


  13.15.  Aviation

  Many people are using laptops for aviation related topics. The
  Aviation HOWTO <http://metalab.unc.edu/fplan/Aviation-HOWTO/> is an
  FAQ, HOWTO like document that provides pointers to software packages
  that run under the Linux operating system and are useful to private,
  commercial, or military pilots. The ultimate goal is to enable pilots
  to use the Linux operating system for all their aviation related
  computing needs.


  13.16.  Blind or Visually Impaired Users

  There are some groups of which could gain a specific profit by using
  laptops. For instance blind or visually impaired people (I explicitly
  avoid to say handicapped people). See ACCESS-HOWTO and Blinux - Linux
  for blind people <http://leb.net/blinux/> for more information. BRLTTY
  is a program which supports different braille terminals. Festival is a
  speech synthesis system. Screen and cursor magnifiers are available.
  14.  Other Operating Systems


  14.1.  DOS/Windows9x/NT


  14.1.1.  Introduction

  Unfortunately, there are a few reasons which might make it necessary
  to put DOS/Windows and Linux together on one laptop. Often the support
  for the flash ROM of PCMCIA cards and modems is not available for
  Linux, or you have to retrieve hardware information, which is not
  visible with Linux, due to a lack of support by some hardware
  manufacturers. I'm not sure wether this tasks can be achieved under an
  emulation like DOS-EMU or WINE.

  If you want Linux with X, Netscape, etc., and Windows95, things will
  be tight in a 1GB harddisk. Though I do so with a 810MB disk.


  14.1.2.  DOS Tools to Repartition a Hard Disk

  Often you get a preinstalled version of Windows on your laptop. If you
  just want to shrink the Windows partition, you need a tool to resize
  the partition. Or you can remove the partition first, repartition,
  then reinstall. Most of the following information I found at the page
  of Michael Egan <Michael.Egan@sonoma.edu> at
  http://libweb.sonoma.edu/mike/fujitsu/
  <http://libweb.sonoma.edu/mike/fujitsu/> .

  A well known and reliable, but commercial product is Partition Magic
  http://www.powerquest.com/product/pm/index.html
  <http://www.powerquest.com/product/pm/index.html> from Power Quest.

  Many people have used FIPS 15c (which may support FAT-32)
  http://bmrc.berkeley.edu/people/chaffee/fips/fips.html
  <http://bmrc.berkeley.edu/people/chaffee/fips/fips.html> for
  repartitioning FAT partition sizes.) Also, another version from a
  different source is FIPS 2.0 (claims to support FAT-32)
  http://www.igd.fhg.de/~aschaefe/fips/
  <http://www.igd.fhg.de/~aschaefe/fips/> for repartitioning FAT
  partition sizes.)

  One more "newer" utility for repartitioning and resizing FAT
  partitions is Ranish Partition Manager/Utility (FAT-32 support is
  claimed for this as well, Linux support is taken into account.)
  http://www.users.intercom.com/~ranish/part/
  <http://www.users.intercom.com/~ranish/part/> .


  14.1.3.  Partition Sharing

  You may share your swap space between Linux and Windows. Please see
  "Dealing with Limited Resources" section. Also with Linux you can
  mount any kind of DOS/Windows partition. The other way round there are
  also some tools, for instance at
  http://uranus.it.swin.edu.au/~jn/linux/
  <http://uranus.it.swin.edu.au/~jn/linux/> , which provides a tool to
  read and write ext2 partitions from Windows9x/NT.

  Also you can mount DOS drives of the type msdos, vfat and even
  compressed drives (Drivespace, etc.). For long file names use vfat and
  if you like autoconversion ( a nice feature for text files), you may
  do so by using the conv=auto option. I have used this in my
  /etc/fstab, but be aware this might cause some strange behaviour
  sometimes, look at the kernel docs for further details.
  ______________________________________________________________________
  /dev/hda8    /dos/d    vfat    user,exec,nosuid,nodev,conv=auto    0    2
  ______________________________________________________________________



  14.1.4.  Installation without CD Drive

  You may use the CD drive of a desktop (or copy the content of the CD
  to the hard disk) and connect both machines with a nullmodem cable.
  Than use a DOS boot floppy and the program INTERLNK.EXE to connect
  both machines.


  14.1.5.  Miscellaneous

  http://www.travsoft.com

  Windows/NT offers: RAS - Remote Access Service

  Windows/9x/NT offers the PPTP protocol to connect to remote sites via
  a TCP/IP tunnel. This protocol is also supported by Linux.  PoPToP
  <http://www.moretonbay.com/vpn/pptp.html> is the PPTP server solution
  for Linux allowing Linux servers to function seamlessly in the PPTP
  VPN environment. This enables administrators to leverage the
  considerable benefits of both Microsoft clients and Linux servers. The
  current pre-release version supports Windows 95/98/NT PPTP clients and
  PPTP Linux clients. The PoPToP pre-release server is not yet fully
  optimised. On release, PoPToP will be fully compliant with IETF PPTP
  Internet Draft and it will seamlessly support Windows PPTP clients
  with the full range of encryption and authentication features.


  14.2.  BSD Unix



  1. PicoBSD is a one floppy version of FreeBSD 3.0-current, which in
     its different variations allows you to have secure dialup access,
     small diskless router or even a dial-in server. And all this on
     only one standard 1.44MB floppy. It runs on a minimum 386SX CPU
     with 8MB of RAM (no HDD required!). You probably may also use it to
     install BSD on a laptop as described with micro Linuxes above. You
     get PicoBSD at  http://www.freebsd.org/~picobsd/
     <http://www.freebsd.org/~picobsd/>

  2. PAO: FreeBSD Mobile Computing Package
     <http://www.jp.FreeBSD.org/PAO/> FreeBSD is a version of the UNIX
     operating system that runs on PC hardware. It uses a different set
     of support for PCMCIA devices, APM, and other mobility related
     issues.

  3. The CMU Monarch Project <http://www.monarch.cs.cmu.edu/>
     Implementations of Mobile-IPv4 and Mobile-IPv6 for FreeBSD

  4. XF86Config Archive <http://www.yy.cs.keio.ac.jp/~sanpei/note-
     list.html>. A database of XF86Config files used by Linux and
     FreeBSD users. If you need an XF86Config file for your notebook or
     laptop, check out this site. (Some documents available in Japanese
     only.)

  5. AFAIK there is no IrDA support yet.



  14.3.  OS/2

  At The Notebook/2 Site <http://o2ss.com/users/DrMartinus/> by Dr.
  Martinus you may find information about different notebooks and PCMCIA
  cards working with OS/2.


  14.4.  NOVELL Netware

  The client side with DOS/Windows9x style operating systems seems to be
  no problem, since there are many PCMCIA cards with drivers for Netware
  available. For Linux connections see the mars_nwe package. Also the
  Caldera Linux distribtion is well known for its Novell support.

  I hadn't time to build a Netware server on a laptop yet and couldn't
  check wether there are network connections possible (PCMCIA driver for
  Netware server).


  14.5.  Debian GNU/Hurd (hurd-i386)

  The GNU Hurd is a totally new operating system being put together by
  the GNU group. In fact, the GNU Hurd is the final component which
  makes it possible to built an entirely GNU OS -- and Debian GNU/Hurd
  is going to be one such (possibly even the first) GNU OS. The current
  project is founded on the i386 architecture, but expect the others to
  follow soon.

  The GNU Hurd Hardware Compatibility Guide
  <http://www.urbanophile.com/arenn/hacking/hurd/hurd-hardware.html>
  states that Hurd should work on laptops, but PCMCIA support isn't
  ready yet.


  15.  ToDo



  1. mention the corresponding kernel options in the Linux Compatibility
     Check sections

  2. write more Hardware sections


  16.  Revision History

  v0.1 13 January 1999, first draft

  v0.2 15 January 1999, minor changes

  v0.3 28 January 1999, APM chapter started, minor changes

  v0.4 8 February, APM chapter rewritten, removed some lint

  v0.5 17 February 1999, added small USB chapter, added Dealing with
  Limited Resources chapter, added Solutions with Laptops chapter, minor
  editorial changes, released draft to the public

  v1.0 19 February 1999, added Sound and Keyboard chapter, minor
  changes, release to the LDP

  v1.1 28 February 1999, spelling, grammar, style checked and many
  additional information added by W. Wade Hampton, added CD Drive,
  Harddisk and Kernel chapters, many minor changes


  v1.2 5 March 1999, added Debian-Laptop-Mailing-List, added information
  about apmcd and suspendd to APM chapter, changed some URLs, minor
  changes

  v1.3 8 March 1999, minor changes

  v1.4 25 March 1999, added ACPI information, added chapters Appendix C
  - NeoMagic Chip NM20xx by Cedric Adjih and Appendix D - Annotated
  Bibliography , minor changes

  v1.5 4 April 1999, added chapters about setting up E-Mail by Peter
  Englmaier and Noise Reduction, minor changes

  v1.6 26 June 1999, rewrite of APM chapter, added install method via
  LapLink cable, URLs changed or added, spell checking, minor changes

  v1.7 28 September 1999, changed <htmlurl ..> SGML tags to <url ..>,
  ACPI chapter separated, touchpad chapter separated and improved,
  preface rewritten, added information about divine, noflushd and
  parted, new chapter Linux Tools to Repartition a Hard Disk, added
  appendix E about specific laptops, some URLs updated, minor changes

  v2.0 2 October 1999, added information about gphoto, kmc_utils, Memory
  Technology Devices and HUT Mobile IP; changed structur of document
  (moved chapters Accessories, Laptop Distribution and chapter about
  partitioning), new DVD chapter, started Aviation chapter, started OS/2
  chapter, started Blind and Visually Impaired Users chapter, changed
  entity &tilde; in URLs to ~ to improve SGML-Tools PS output (otherwise
  ~ is missing), link to new Lucent WinModem driver, minor additions and
  changes

  v2.1 2 November 1999, added information about email with UUCP, the use
  of CVS and other tools to synchronize two machines, the noatime mount
  option, GPS systems, presentation tools, and hard disk form factors,
  started chapter about the Hurd, changed URL of PCMCIA-CS package and
  LDP, reworked credits chapter, reworked APM chapter, minor changes

  v2.2 2 December 1999, reorganized the chapters about Cellular Phones,
  Pagers, Calculators, Digital Cameras, Wearable Computing and Noise
  Reduction, many minor changes and bug fixes


  17.  Credits

  I would like to thank the many people who assisted with corrections
  and suggestions. Their contributions have made this work far better
  than I could ever have done alone. Especially I would like to thank,
  in order of appearance:


  o  First of all Kenneth E. Harker <kharker@cs.utexas.edu>, from his
     page Linux on Laptops
     <http://www.cs.utexas.edu/users/kharker/linux-laptop/> I have
     included much material into this HOWTO, but didn't always quote him
     verbatim.

  o  The other HOWTO authors from the LINUX DOCUMENTATION PROJECT - LDP
     <http://linuxdoc.org/>.

  o  The members of the Linux/IrDA Project <http://www.cs.uit.no/linux-
     irda/>.

  o  The members of the Linux-Laptop Mailing List.

  o  The members of the Debian-Laptop Mailing List.

  o  The visitors and contributors of my LiLAC - Linux with Laptop
     Computers <http://www.snafu.de/~wehe/index_li.html> pages.

  o  David Hinds, the maintainer of the PCMCIA-CS
     <http://pcmcia.sourceforge.org> package.

  o  Frank Schneider <SPATZ1@T-ONLINE.DE>.

  o  Stefan Martig <martig@iamexwi.unibe.ch>.

  o  Michele Andreoli, maintainer of muLinux
     <http://mulinux.firenze.linux.it/>.

  o  Klaus Franken <kfr@klaus.franken.de>.

  o  W. Wade, Hampton <whampton@staffnet.com>, did much of spell,
     grammar and style checking and added many valuable information.

  o  Anderson MacKay <mackay@rice.edu>, RLUG - Rice University Linux
     User Group  <http://linux.rice.edu>, gave many different detailed
     recommendations.

  o  Sean 'Shaleh' Perry, <shaleh@livenet.net>, Debian maintainer of
     anacron and other packages, for Debian support.

  o  Bob Toxen <bob@cavu.com>.

  o  Peter Sprenger <spre@lugs.ch>.

  o  Felix Braun <fbraun@atdot.org>.

  o  Steve Rader <rader@wiscnet.net>.

  o  Richard Worwood <http://www.felch01.demon.co.uk/laptop-howto.html>
     <richard@felch01.demon.co.uk>, for mirroring of the HOWTO.

  o  Marcel Ovidiu Vlad <marceluc@leland.Stanford.EDU>.

  o  Ludger Berse <lberse01@cityweb.de>.

  o  Cedric Adjih <cedric.adjih@inria.fr>, wrote the chapter about the
     NeoMagic chipset.

  o  Peter Englmaier <ppe@pa.uky.edu>, provided the chapter about a
     sophisticated email setup.

  o  Michael Wiedmann <mw@miwie.in-berlin.de>, PIA - X11 based PalmPilot
     Address Manager <http://www.in-berlin.de/User/miwie/pia/> , found
     many spelling errors and more.

  o  Adam Spiers <adam@thelonious.new.ox.ac.uk>.

  o  Lionel, "trollhunter" Bouchpan-Lerust-Juery,
     <trollhunter@linuxfr.org>, for providing the French translation
     <http://infonomade.linuxfr.org/portables/ressourcesfr.html#howto>
     and information about wearables
     <http://infonomade.linuxfr.org/indexen.html> .

  o  Nathan Myers <ncm@linuxlaptops.com>, from LL - LinuxLaptops
     <http://www.linuxlaptops.com> for numerous additions.

  o  Ben Attias <hfspc002@csun.edu>.

  o  Igor Pesando <ipesando@to.infn.it>.


  o  Geert Van der Plas <Geert.VanderPlas@esat.kuleuven.ac.be>, provided
     information about the touchpad driver included in the GPM.

  o  Chandran Shukla <chandran@xmission.com>.

  o  Harald Milz <hm@suse.de>, from SuSE <http://www.suse.de> provided
     numerous additions.

  o  Ingo Dietzel <http://www.snafu.de/~ingo.dietzel/>
     <ingo.dietzel@berlin.snafu.de>, for his patience with the project.

  o  Emerson, Tom # El Monte <TOMEMERSON@ms.globalpay.com>, for his idea
     about laptop bags.

  o  Thomas Traber <traber@inetmail.de>.

  o  Bill Gjestvang <datawolf@ibm.net>.

  o  Leandro Noferin <lnoferin@cybervalley.org>, for proofreading the
     italian parts.

  o  Stephane Bortzmeyer <stephane@sources.org> for his suggestions
     about email with UUCP, the use of CVS or related tools to
     synchronize two machines, and the noatime mount option.

  o  Peter Teuben <teuben@astro.umd.edu>, for some suggestions about
     hard disks.

  o  Guido Germano <http://www.guido.germano.com> <guido@germano.com>,
     for information about the Macintosh Powerbook 145B.

  o  Joel Eriksson <joel.eriksson@alfa.telenordia.se>, for information
     about Atari laptops.

  o  Gilles Lamiral <lamiral@mail.dotcom.fr> for providing the PLIP
     Install-HOWTO.

  o  Alessandro Grillo <Alessandro_Grillo@tivoli.com>, started the
     Italian translation.

  o  Gledson Evers <pulga_linux@bol.com.br>, started the Portuguese
     translation.

  o  Dan Kegel <dank@alumni.caltech.edu>, pointed me to the Toshiba
     Linux page.

  o  Jaime Robles <http://www.geocities.com/SiliconValley/5161>
     <ea4abw@amsat.org>, gave me some information about the HAM-HOWTO.

  o  LuftHans <http://home.pages.de/~lufthans/> <LuftHans@asu.edu>,
     announced this HOWTO to the maintainer of the Hardware-HOWTO.

  o  Jari Malinen <http://www.cs.hut.fi/~jtm> <jtm@mart2.cs.hut.fi>, for
     support with HUT Mobile IP.

  o  John Beimler <john@radiomind.com>, provided the URL of photopc.

  o  Steven G. Johnson <stevenj@MIT.EDU>, provided the information about
     Apple/Macintosh m86k machines.

  o  Ulrich Oelmann <ulrich.oelmann@tu-clausthal.de>, gave valuable
     additions about the installation with muLinux.

  o  Lucio Pileggi <lucio@ing.unipi.it>, provided information about the
     Siemens S25 cellular phone.

  o  Eric <dago@tkg.att.ne.jp> wrote how to transfer pictures from a
     digital camera.

  o  Sorry, but probably I have forgotten to mention everybody who
     helped.


  18.  Appendix A - Survey about Micro Linuxes

  Because of their small or non-existent footprint, micro-Linuxes are
  especially suited to run on laptops -- particularly if you use a
  company-provided laptop running Windows9x/NT. Or for installation
  purposes using another non Linux machine. There are several micro
  Linux distributions out there that boot from one or two floppies and
  run off a ramdisk.

  See  http://www.linuxhq.com  <http://www.linuxhq.com> or
  http://www.txdirect.net/users/mdfranz/tinux.html
  <http://www.txdirect.net/users/mdfranz/tinux.html> for details. You
  may find a FAQ and a mailing list about boot-floppies at
  http://os.inf.tu-dresden.de/~sr1/boot-floppies/faq.html
  <http://os.inf.tu-dresden.de/~sr1/boot-floppies/faq.html>. Also a
  BootDisk-HOWTO is available. Thanks to Matthew D. Franz maintainer of
  Trinux for this tips and collecting most of the following URLs. See
  also the content of Console/Mini Distributions at FreshMeat
  <http://ma.us.mirrors.freshmeat.net/appindex/console/mini-
  distributions.html>.


  1. MuLinux < http://mulinux.firenze.linux.it/> by Michele Andreoli

  2. tomsrtbt  http://www.toms.net/~toehser/rb/
     <http://www.toms.net/~toehser/rb/> "The most Linux on one floppy.
     (distribution or panic disk)." by Tom Oehser

  3. Trinux  http://www.trinux.org  <http://www.trinux.org> "A Linux
     Security Toolkit" by Matthew D. Franz

  4. LRP "Linux Router Project" http://www.psychosis.com/linux-router/
     <http://www.psychosis.com/linux-router/>

  5. hal91 http://home.sol.no/~okolaas/hal91.html
     <http://home.sol.no/~okolaas/hal91.html>

  6. floppyfw http://www.zelow.no/floppyfw/
     <http://www.zelow.no/floppyfw/> by Thomas Lundquist

  7. minilinux  http://alberti.crs4.it/softw are/mini-linux/
     <http://alberti.crs4.it/softw are/mini-linux/> (seems no more
     valid) or  http://www.kiarchive.ru/pub/linux/mini-linux/
     <http://www.kiarchive.ru/pub/linux/mini-linux/>

  8. monkey  http://www.spsselib.hiedu.cz/monkey/docs/english.htm
     <http://www.spsselib.hiedu.cz/monkey/docs/english.htm>

  9. DLX http://www.wu-wien.ac.at/usr/h93/h9301726/dlx.html
     <http://www.wu-wien.ac.at/usr/h93/h9301726/dlx.html> by Erich Boem

  10.
     C-RAMDISK  http://metalab.unc.edu/pub/Linux/kernel/images/
     <http://metalab.unc.edu/pub/Linux/kernel/images/>

  11.
     BABEL  http://celsius-software.hypermart.net/babel/
     <http://celsius-software.hypermart.net/babel/> "A mini-distribution
     to run games"
  12.
     Xdenu  http://xdenu.tcm.hut.fi/ <http://xdenu.tcm.hut.fi/> ,
     quotating Alan Cox: "Xdenu is a small distribution program that
     installs as a set of DOS zips onto a DOS partition and gives you a
     complete X11 client workstation."

  13.
     LOAF  http://www.ecks.org/loaf/ <http://www.ecks.org/loaf/>

  14.
     pocket-linux  http://pocket-linux.coven.vmh.net/ <http://pocket-
     linux.coven.vmh.net/>

  15.
     FLUF  http://www.upce.cz/~kolo/fluf.htm
     <http://www.upce.cz/~kolo/fluf.htm>

  16.
     YARD  http://www.croftj.net/~fawcett/yard/
     <http://www.croftj.net/~fawcett/yard/>

  17.
     TLinux  http://members.xoom.com/ror4/tlinux/
     <http://members.xoom.com/ror4/tlinux/>

  18.
     ODL  http://linux.apostols.org/guru/wen/
     <http://linux.apostols.org/guru/wen/>

  19.
     SmallLinux by Steven Gibson  http://smalllinux.netpedia.net/
     <http://smalllinux.netpedia.net/> Three disk micro-distribution of
     Linux and utilities. Based on kernel 1.2.11. Root disk is ext2
     format and has fdisk and mkfs.ext2 so that a harddisk install can
     be done. Useful to boot up on old machines with less than 4MB of
     RAM.

  20.
     cLIeNUX by Rick Hohensee client-use-oriented Linux distribution
     ftp://ftp.blueznet.com /pub/colorg <ftp://ftp.blueznet.com
     /pub/colorg>

  21.
     linux-lite by Paul Gortmaker for very small systems with less than
     2MB RAM and 10MB harddisk space (1.x.x kernel)
     http://metalab.unc.edu/pub/Linux/kernel
     <http://metalab.unc.edu/pub/Linux/kernel>

  22.
     See also the packages at MetaLab formerly known as SunSite
     http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html
     <http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html> and
     the Boot-Disk-HOWTO

  23.
     You may also consider some of the boot floppies provided by various
     distributions falling into this category, e.g. the boot/rescue
     floppy of Debian/GNU Linux.

  24.
     If you like to build your own flavour of a boot floppy you may do
     so manually, as described in the BootDisk-HOWTO or using some
     helper tools, for instance mkrboot (provided at least as a
     Debian/GNU Linux package) or pcinitrd, which is part of the PCMCIA-
     CS package by David Hinds.

  25.
     Also you might try to build your Linux system on a ZIP drive. This
     is described in the ZIP-Install-mini-HOWTO.


  19.  Appendix B - Dealing with Limited Resources or Tuning the System


  19.1.  Related HOWTOs



  1. LBX-HOWTO

  2. Small-Memory-HOWTO


  19.2.  Introduction

  As mentioned in the introduction laptops sometimes have less resources
  if you compare them to desktops. To deal with limited space, memory,
  CPU speed and battery power, I have written this chapter.


  19.3.  Small Space


  19.3.1.  Introduction

  There are different types of techniques to gain more disk space, such
  as sharing of space, freeing unused or redundant space, filesystem
  tuning and compression. Note: some of these techniques use memory
  instead of space. As you will see, there are many small steps
  necessary to free some space.


  19.3.2.  Techniques



  1. Stripping: Though many distributions come with stripped binaries
     today it is useful to check this. For details see man strip. To
     find every unstripped file you can use the file command or more
     convenient the tool findstrip. Attention: don't strip libraries,
     sometimes the wrong symbols are removed due to a bad programming
     technique. Or use the --strip-unneeded option.

  2. Perforation: zum(1)reads a file list on stdin and attempts to
     perforate these files. Perforation means, that series of null bytes
     are replaced by lseek, thus giving the file system a chance of not
     allocating real disk space for those bytes. Example: find . -type f
     | xargs zum

  3. Remove Odd Files and Duplicates: Check your system for core files,
     emacs recovery files <#FILE#> vi recovery files <FILE>.swp, RPM
     recovery files <FILE>.rpmorig and patch recovery files. Find
     duplicates, you may try finddup. Choose a system to name your
     backup, temporary and test files, e.g. with a signature at the end.

  4. Clean Temporary Files: , e.g. /tmp, there is even a tool tmpwatch.

  5. Shorten the Log Files: usually the files in /var/log.

  6. Remove Files: Remove files which are not "necessary" under all
     circumstances such as man pages, documentation /usr/doc and sources
     e.g. /usr/src .
  7. Unnecessary Libraries: You may use the binstats package to find
     unused libraries (Thanks to Tom Ed White).

  8. Filesystem: Choose a filesystem which treats disk space
     economically e.g. rsfs. Tune your filesystem e.g. tune2fs. Choose
     an appropriate partition and block size.

  9. Reduce Kernel Size: Either by using only the necessary kernel
     features and/or making a compressed kernel image bzImage.

  10.
     Compression: I didn't check this but AFAIK you may compress your
     filesystem with gzip and decompress it on the fly. Alternatively
     you may choose to compress only certain files. You can even execute
     compressed files with zexec

  11.
     Compressed Filesystems:

     - For e2fs filesystems there is a compression version available
     e2compr , see http://debs.fuller.edu/e2compr/
     <http://debs.fuller.edu/e2compr/> .

     - DMSDOS which enables your machine to access Windows95 compressed
     drives (drivespace, doublestacker). If you don't need DOS/Windows95
     compatibility, i.e. if you want to compress Linux-only data, this
     is really discouraged by the author of the program. See
     http://fb9nt-ln.uni-duisburg.de/mitarbeiter/gockel/software/dmsdos/
     <http://fb9nt-ln.uni-
     duisburg.de/mitarbeiter/gockel/software/dmsdos/> .

  12.
     Partition Sharing: You may share swap-space (see Swap-Space-HOWTO)
     or data partitions between different OS (see mount). For mounting
     MS-DOS Windows95 compressed drives (doublespace, drivespace) you
     may use dmsdos
     http://metalab.unc.edu/pub/Linux/system/filesystems/dosfs/
     <http://metalab.unc.edu/pub/Linux/system/filesystems/dosfs/>.

  13.
     Libraries: Take another (older) library, for instance libc5 , this
     library seems to be smaller than libc6 aka glibc2 .

  14.
     Kernel: If your needs are fitted with an older kernel version, you
     can save some space.

  15.
     GUI: Avoid as much Graphical User Interface (GUI) as possible.

  16.
     Tiny Distributions: There are some distributions available which
     fit from one 3.5" floppy to 10MB disk space and fit for small
     memories, too. See appendix A and below.

  17.
     External Storage Devices (Hard Disks, ZIP Drives, NFS, SAMBA):
     Since many notebooks may be limited in their expandability, using
     the parallel port is an attractive option. There are external
     harddisks and ZIP Drives available. Usually they are also
     connectable via PCMCIA. Another way is using the resources of
     another machine through NFS or SAMBA etc.



  19.4.  Harddisk Speed

  Use the tool hdparm to set up better harddisk performance. Though I
  have seen laptop disk enabled with striping, I can't see a reason to
  do so, because IMHO aka RAID0 striping needs at least two different
  disks to increase performance.

  See UNIX and LINUX Computing Journal: Tunable Filesystem Parameters in
  /proc <http://www.diverge.org/ulcj/199910tfsp.shtml> How to increase,
  decrease and reconfigure filsystem behavior from within /proc.


  19.5.  Small Memory


  19.5.1.  Related HOWTOs



  1. Small-Memory-mini-HOWTO by Todd Burgess <tburgess@uoguelph.ca >
     http://eddie.cis.uoguelph.ca/~tburgess
     <http://eddie.cis.uoguelph.ca/~tburgess>

  2. Modules-mini-HOWTO

  3. Kerneld-mini-HOWTO


  19.5.2.  Techniques

  Check the memory usage with free and top.

  Mergemem Project  <http://www.complang.tuwien.ac.at/ulrich/mergemem/>.
  Many programs contain memory areas of the same content that remain
  undetected by the operating system. Typically, these areas contain
  data that have been generated on startup and remain unchanged for
  longer periods. With mergemem such areas are detected and shared. The
  sharing is performed on the operating system level and is invisible to
  the user level programs. mergemem is particularily useful if you run
  many instances of interpreters and emulators (like Java or Prolog)
  that keep their code in private data areas. But also other programs
  can take advantage albeit to a lesser degree.

  You may also reduce the kernel size as much as possible by removing
  any feature which is not necessary for your needs and by modularizing
  the kernel as much as possible.

  Also you may shutdown every service or daemon which is not needed,
  e.g. lpd, mountd, nfsd and close some virtual consoles. Please see
  Small-Memory-mini-HOWTO for details.

  And of coarse use swap space, when possible.

  If possible you use the resources of another machine, for instance
  with X, VNC or even telnet. For more information on Virtual Network
  Computing (VNC), see http://http://www.uk.research.att.com/vnc/
  <http://www.uk.research.att.com/vnc> .


  19.6.  Low CPU Speed

  You may want to overdrive the CPU speed but this can damage your
  hardware and I don't have experience with it. For some examples look
  at Adorable Toshiba Libretto - Overclocking
  http://www.cerfnet.com/~adorable/libretto.html
  <http://www.cerfnet.com/~adorable/libretto.html>.
  19.7.  Power Saving Techniques



  1. If you don't need infrared support, disable it in the BIOS or
     shutdown the IrDA device driver. There are also some IrDA features
     of the kernel which are useful for saving power.

  2. PCMCIA services consume much power, so shut them down if you don't
     need them.

  3. I'm not sure to which extend the backlight consumes power. WARNING:
     AFAIK this device can only bear a limited number of uptime circles.
     So avoid using screensavers.

  4. For some examples to build batteries with increased uptime up to 8
     hours look at Adorable Toshiba Libretto
     http://www.cerfnet.com/~adorable/libretto.html
     <http://www.cerfnet.com/~adorable/libretto.html>.

  5. For information about APM look at the APM chapter above.

  6. A hacked rclock  <http://www-leland.stanford.edu/~bbense/toys/>.
     Booker C. Bense has hacked the rclock program to include a simple
     battery power meter on the clock face.

  7. xbatstat <http://www.jaist.ac.jp/~daisuke/Linux/xbatstat.html>. A
     battery level status checker for Linux and X.

  8. The "noatime" option when mouting filesystems tells the kernel to
     not update the access time information of the file. This
     information, although sometimes useful, is not used by most people
     (do you know that ls -lu gives you the access time?). Therefore,
     you can safely disable it, then preventing disk access each time
     you cat a file. Here is an example of a /etc/fstab with this power-
     saving option:


       /dev/hda7 /var ext2 defaults,noatime 0 2



  9. hdparm
     <ftp://tsx-11.mit.edu/pub/linux/sources/sbin/hdparm-3.0.tar.gz>
     hdparm is a Linux IDE disk utility that lets you set spin-down
     timeouts and other disk parameters. It works also for some SCSI
     features.

  10.
     Mobile Update Daemon
     <http://www.complang.tuwien.ac.at/ulrich/linux/tips.html> This is a
     drop-in replacement for the standard update daemon, mobile-update
     minimizes disk spin ups and reduces disk uptime. It flushes buffers
     only when other disk activity is present. To ensure a consistent
     file system call sync manually. Otherwise files may be lost on
     power failure. mobile-update does not use APM. So it works also on
     older systems.

  11.
     noflushd <http://www.tuebingen.linux.de/kobras/noflushd/>: noflushd
     monitors disk activity and spins down disks that have been idle for
     more than <timeout> seconds. It requires a kernel >=2.2.11 . Useful
     in combination with hdparm and mount with noatime option to bring
     down disk activity.
  12.
     Toshiba Linux Utilities
     <http://www2.prestel.co.uk/hex/toshiba.html> This is a set of Linux
     utilities for controlling the fan, supervisor passwords, and hot
     key functions of Toshiba Pentium notebooks. There is a KDE package
     Klibreta, too.

  13.
     At Kenneth E. Harker's page there is a recommendation for LCDproc
     LCDProc <http://lcdproc.omnipotent.net/> . "LCDproc is a small
     piece of software that will enable your Linux box to display live
     system information on a 20x4 line backlit LCD display. This program
     shows, among other things, battery status on notebooks." I tried
     this package and found that it connects only to the external
     Matrix-Orbital 20x4 LCD display http://www.matrix-orbital.com/
     <http://www.matrix-orbital.com/>, which is a LCD display connected
     to a serial port. I can't see any use for a laptop yet.

  14.
     Diald: Dial Daemon  <http://www.loonie.net/~eschenk/diald.html> .
     The Diald daemon provides on demand Internet connectivity using the
     SLIP or PPP protocols. Diald can automatically dial in to a remote
     host when needed or bring down dial-up connections that are
     inactive.

  15.
     KDE http://www.kde.org <http://www.kde.org> provides KAPM, Kbatmon
     and Kcmlaptop. Written by Paul Campbell kcmlaptop is a set of KDE
     control panels that implements laptop computer support functions,
     it includes a dockable battery status monitor for laptops - in
     short a little icon in the KDE status bar that shows how much
     battery time you have left. It also will warn you when power is
     getting low and allows you to configure power saving options.

     Similar packages you may find at the GNOME project
     http://www.gnome.org/ <http://www.gnome.org/> . See the software
     maps at both sites.

  16.
     Please see Battery Powered Linux Mini-HOWTO by Hanno Mueller,
     hanno@lava.de http://www.lava.de/~hanno/
     <http://www.lava.de/~hanno/> for more information.


  19.8.  Kernel


  19.8.1.  Related HOWTOs


  o  Kernel-HOWTO

  o  BootPrompt-HOWTO


  Many kernel features are related to laptops. For instance APM, IrDA,
  PCMCIA and some options for certain laptops, e.g. IBM ThinkPads. In
  some distributions they not configured. And the kernel is usually
  bigger than necessary. So it's seems a good idea to customize the
  kernel. Though this task might seem difficult for the beginner it is
  highly recommended. Since this involves dangerous operations you need
  to be careful. But, if you can install a better kernel successfully,
  you've earned your intermediate Linux sysadmin merit badge. - Since
  this topic is already covered in other documents I want handle this
  here.

  19.9.  Tiny Applications and Distributions

  A small collection yet, but I'm looking for more information.


  1. BOA - "Lightweight and High Performance WebServer. boa is a single-
     tasking HTTP server. That means that unlike traditional web
     servers, it does not fork for each incoming connection, nor does it
     fork many copies of itself to handle multiple connections. It
     internally multiplexes all of the ongoing HTTP connections, and
     forks only for CGI programs (which must be separate processes.)
     Preliminary tests show boa is capable of handling several hundred
     hits per second on a 100 MHz Pentium."

  2. MGR - a graphical windows system, which uses much less resources
     than X.

  3. Low Bandwidth X:

     Alan Cox in LINUX REDUX February 1998 " .. there are two that
     handle normal applications very nicely. LBX (Low Bandwidth X) is
     the official application of the X Consortium (now OpenGroup
     www.opengroup.org). Dxpc http://ccwf.cc.utexas.edu/~zvonler/dxpc
     <http://ccwf.cc.utexas.edu/~zvonler/dxpc> is the alternative most
     people prefer. These systems act as proxy X11 servers and compress
     datastreams by well over 50 percent for normal requests, often
     reaching a reduction to 25 percent of the original bandwidth usage.
     With dxpc, X windows applications are quite usable over a 28.8
     modem link or across the Internet."


  4. blackbox - "This is a window manager for X. It is similar in many
     respects to such popular packages as Window Maker, Enlightenment,
     and FVWM2. You might be interested in this package if you are tired
     of window managers that are a heavy drain on your system resources,
     but you still want an attractive and modern-looking interface."

  5. xfce - xfce <http://www.xfce.org> is a lightweight and stable
     desktop environment for various UNIX systems.

  6. linux-lite - distribution based on a 1.x.x kernel for systems with
     only 2MB memory and 10MB harddisk. URL see above.

  7. smallLinux -  http://smalllinux.netpedia.net/
     <http://smalllinux.netpedia.net/> . Three disk micro-distribution
     of Linux and utilities. Based on kernel 1.2.11. Root disk is ext2
     format and has fdisk and mkfs.ext2 so that a harddisk install can
     be done. Useful to boot up on old machines with less than 4MB of
     RAM.

  8. cLIeNUX - client-use-oriented Linux distribution.

  9. minix - not a Linux but a UNIX useful for very small systems, such
     as 286 CPU and 640K RAM http://www.cs.vu.nl/~ast/minix.html
     <http://www.cs.vu.nl/~ast/minix.html> . There is even X support
     named mini-x by David I. Bell
     ftp://ftp.linux.org.uk/pub/linux/alan/
     <ftp://ftp.linux.org.uk/pub/linux/alan/> .

  10.
     screen - tiny but powerful console manager. John M. Fisk
     <fiskjm@ctrvax.vanderbilt.edu> in LINUX GAZETTE July 1, 1996 :"It's
     a GUI, GUI, GUI, GUI world! " -- or so the major OS manufacturers
     would have you belief. Truth is, that while this is increasingly
     the case, there are times when the command line interface (CLI) is
     still a very good choice for getting things done. It's fast,
     generally efficient, and is a good choice on memory or CPU
     constrained machines. And don't forget that there are still a lot
     of very nifty things that can be done at the console."

  11.
     tinyirc - "A tiny, stripped down IRC Client. Doesn't have most of
     the more advance commands in the ircII family of IRC Clients, nor
     does it have any color, but it works, and it's tiny."


  19.10.  Hardware Upgrade

  You may also take into account to upgrade the hardware itself, though
  this may have some caveats, see chapter Open a Laptop Case above. If
  you need a survey about the possibilities, you can take a look at
  http://www.upgrade.de <http://www.upgrade.de>, this page is also
  available in French and English.


  20.  Appendix C - NeoMagic Chip NM20xx


  20.1.  Introduction

  Hence the NeoMagic chipset series NM20xx is one of the most used
  graphic chips in laptops in our times, I will spent a few words on
  them. Though a long time this chip was only supported by commercial X
  servers, since the middle of 1998 RedHat provided a binary X server
  manufactured by PrecisionInsight. Since version 3.3.3 this X server is
  also available by XFree86.


  20.2.  Textmode 100x37

  This chapter is a courtesy of Cedric Adjih < cedric.adjih@inria.fr >.
  I changed some minor parts.

  An apparently little known fact about the Neomagic chipset NM20xx is
  that you can run text mode in 100x37 (i.e. 800x600). This text mode is
  very nice (as opposed to the 80x25 which is ugly). I tried this with a
  HP OmniBook 800 and suppose it might work with other laptops using the
  NeoMagic chip, too. The following that I wrote was much longer than I
  expected so I wrote it as a kind of mini-howto :-) :

  The main problem is that is a bit difficult to set up, and if you're
  going wrong with SVGATextMode/restoretextmode some results on the LCD
  might be frightening. Although I didn't manage to break my LCD with
  many many attempts going wrong, DISCLAMER: THIS MIGHT DAMAGE YOUR
  HARDWARE. YOU HAVE BEEN WARNED. FOLLOW THE FOLLOWING INSTRUCTIONS AT
  YOUR OWN RISKS. I'M NOT RESPONSIBLE IF SOMETHING BAD HAPPENS.


  20.2.1.  Survey

  You need to do three main steps:

  1. Enable Linux to boot in 800x600 textmode. The problem is that you
     won't see any text before the following two steps aren't done.

  2. Automatically run restoretextmode with correct register data.

  3. Automatically run SVGATextMode.



  20.2.2.  More Details

  All the files I have modified, are available for now at
  http://starship.python.net/crew/adjih/data/cda-omni-trick.tar.gz
  <http://starship.python.net/crew/adjih/data/cda-omni-trick.tar.gz>


  20.2.2.1.  Enabling Linux to Boot in 800x600

  Recent kernels (2.2.x) need to be compiled with CONFIG_VIDEO_GFX_HACK
  defined. Default is off. (look in
  /usr/src/linux-2.2.x/arch/i386/boot/video.S)

  This is done by passing the parameter vga=770 to older kernels or
  vga=7 to 2.2.x kernels. Example with lilo.conf:


  ______________________________________________________________________
  image=/boot/bzImage-modif
  label=22
  append="svgatextmode=100x37x8_SVGA" #explained later
  vga=7
  read-only
  ______________________________________________________________________



  20.2.2.2.  Running restoretextmode  and SVGATextMode  at Boot Time

  You must arrange to run restoretextmode <name of some textreg.dat
  file> and SVGATextMode 100x37x8_SVGA at boot time.

  An example textreg.dat for restoretextmode (obtained using
  savetextmode) is in my tar archive in tmp/, and an example
  /etc/TextConfig.

  Since I'm lazy, I've simply put SVGATextMode and restoretextmode in
  the /etc/rc.boot/kbd file from my Debian/GNU Linux which get executed
  at boot time (also available in the tar archive).


  20.2.2.3.  Now the Key Point

  Annoying things will be displayed if you don't use the right
  SVGATextMode in the right video text mode: this is why I also pass the
  environmental variable "svgatextmode=100x37x8_SVGA" (arbitrary name)
  to the kernel (using append=xxx in lilo.conf) when I also set vga=7:
  the script /etc/rc.boot/kbd tests this variable and calls
  restoretextmode and SVGATextMode IF AND ONLY IF.


  20.2.3.  Road Map


  1. Recompile the kernel 2.2.x with CONFIG_VIDEO_GFX_HACK

  2. Insert the restoretextmode with the correct parameter in the
     initialisation script, with no other changes.

  3. Boot with normal text mode (80x25) but restoretextmode: you should
     see the screen going to 100x37, but with only 80x25 usable. Don't
     use SVGATextMode yet.

  4. It is much better to conditionnalize your initialize code as I did,
     to keep the possibility of booting in both modes: you may test this
     now with some reboots (starting restoretextmode or not).

  5. Boot with 100x37 text mode using parameter vga=7 (lilo.conf), you
     should see white background at some point, but the characters will
     be black on black. This is ok. You'll have to reboot blindly now.

  6. Insert the <path>/SVGATextMode 100x37x8_SVGA after the
     restoretextmode in initialization scripts.

  7. Reboot with vga=7 (lilo.conf)

  8. Should be OK now. Enjoy.


  21.  Appendix D - Annotated Bibliography


  o  Linux guides and HOWTOs, available at the Linux Documentation
     Project (LDP) http://metalab.unc.edu/LDP
     <http://metalab.unc.edu/LDP> . These sources of information are
     highly recommended.

  o  I found two books about PC hardware which contain a dedicated
     chapter about repairing laptops.

     Author: Scott Mueller

     Title: Upgrading and Repairing PCs

     Publisher: QUE Corporation.

     Author: Marc Misani

     Title: The Complete Hardware Upgrade and Maintainance Guide

     Publisher: unknown

     Both books don't know about Linux and both are quite short about
     laptops. The book by Marc Minasi provides a little more information
     about laptops.

  o  Authors: Alessandro Rubini, Andy Oram Title: Linux Device Drivers

  o  Author: Stephen J. Bigelow

     Title: Maintain and Repair Your Notebook, Palmtop, or Pen Computer

     Publisher: McGraw Hill Text, September 1993

     Review by Booknews, Inc. , January 1, 1994: A guide to performing
     routine maintenance and simple repairs to notebook, palmtop and pen
     computers. Covers such topics as how to diagnose and replace faulty
     LCD and plasma displays, and how to protect circuitry from
     electrostatic damage. Written with beginners in mind -- but some
     hardware experience would be helpful in understanding the
     subtleties and cautions involved. Annotation copyright Book News,
     Inc. Portland, Or. Though this book seems outdated I don't know a
     newer one.

  o  Author: Frank van Gilluwe

     Title: The Undocumented PC

     Publisher: Addison Wesley Developers Press

     Review by Craig Hart: There are two editions. Edition 1 has a
     purple cover, edition 2 has a grey marble background photo with
     brown-on-yellow text panel. Edition 2 is not much better than
     edition one - only about 10%; of the information has changed,
     although a lot of typographical errors have been corrected. This is
     an excellent book, because it not only lists the raw data required
     to program something, but it has lot's of explanations, how-to's
     and example programs.

  o  Authors: Gerald Reischl <http://www.reischl.com> / Heinz Sundt

     Title: Die mobile Revolution

     Publisher: Frankfurt: Ueberreuter 1999

     Some speculations about the future of mobile communication.


  22.  Appendix E - Resources for Specific Laptops

  Certain laptops have found some more enthusiastic Linux users, than
  other models. This list is probably not comprehensive:


  22.1.  IBM ThinkPad

  ThinkPad Configuration Tool for Linux tpctl
  <http://jhunix.hcf.jhu.edu/~thood/tpctlhome.htm>

  Mailing list linux-thinkpad <http://www.topica.com/lists/linux-
  thinkpad/>.


  22.2.  Toshiba Laptops

  Toshiba Linux Utilities  <http://www2.prestel.co.uk/hex/toshiba.html>
  This is a set of Linux utilities for controlling the fan, supervisor
  passwords, and hot key functions of Toshiba Pentium notebooks. There
  is a KDE package Klibreta, too.

  See also Toshiba Linux Utilities <http://www.buzzard.org.uk/toshiba/>

  Mailing lists: linux-on-portege
  <http://www.onelist.com/subscribe.cgi/linux-on-portege> , Linux on
  Toshiba Satellite 40xx linux-tosh-40xx <majordomo@geekstuff.co.uk>.

  Toshiba itself offers now  Toshiba Linux Support
  <http://www.tce.co.jp/linux/>.


  22.3.  COMPAQ Concerto Aero

  COMPAQ Concerto Fan's Home Page
  <http://www.inetdirect.net/stg/pen/chris/concerto.html> and Aero-FAQ
  <http://www.reed.edu/~pwilk/aero/aero.faq>.

  The latest version of the Linux Compaq Concerto Pen Driver
  <http://www.cs.nmsu.edu/~pfeiffer/#pen> is available from Joe
  Pfeiffer's home page.


  22.4.  DELL Laptops

  Mailing list at linux-dell-laptops
  <http://www.egroups.com/group/linux-dell-laptops>



  Large Disk HOWTO
  Andries Brouwer, aeb@cwi.nl
  v2.2m, 15 February 2000

  All about disk geometry and the 1024 cylinder limit for disks.

  1.  The problem

  Suppose you have a disk with more than 1024 cylinders.  Suppose
  moreover that you have an operating system that uses the old INT13
  BIOS interface to disk I/O.  Then you have a problem, because this
  interface uses a 10-bit field for the cylinder on which the I/O is
  done, so that cylinders 1024 and past are inaccessible.

  Fortunately, Linux does not use the BIOS, so there is no problem.

  Well, except for two things:

  (1) When you boot your system, Linux isn't running yet and cannot save
  you from BIOS problems.  This has some consequences for LILO and
  similar boot loaders.

  (2) It is necessary for all operating systems that use one disk to
  agree on where the partitions are.  In other words, if you use both
  Linux and, say, DOS on one disk, then both must interpret the
  partition table in the same way.  This has some consequences for the
  Linux kernel and for fdisk.

  Below a rather detailed description of all relevant details.  Note
  that I used kernel version 2.0.8 source as a reference.  Other
  versions may differ a bit.



  2.  Summary

  You got a new large disk. What to do? Well, on the software side: use
  fdisk (or, better, cfdisk) to create partitions, and then mke2fs to
  create a filesystem, and then mount to attach the new filesystem to
  the big file hierarchy.

  A year ago or so I could write: You need not read this HOWTO since
  there are no problems with large hard disks these days. The great
  majority of apparent problems is caused by people who think there
  might be a problem and install a disk manager, or go into fdisk expert
  mode, or specify explicit disk geometries to LILO or on the kernel
  command line.

  However, typical problem areas are: (i) ancient hardware, (ii) several
  operating systems on the same disk, and sometimes (iii) booting.

  These days the situation is a bit worse. Maybe 2.3.21 and later will
  be good for all disks again.

  Advice:

  For large SCSI disks: Linux has supported them from very early on.  No
  action required.

  For large IDE disks (over 8.4 GB): get a recent stable kernel (2.0.34
  or later). Usually, all will be fine now, especially if you were wise
  enough not to ask the BIOS for disk translations like LBA and the
  like.

  For very large IDE disks (over 33.8 GB): see ``IDE problems with 34+
  GB disks'' below.
  If LILO hangs at boot time, also specify ``linear'' in the
  configuration file /etc/lilo.conf.  (And if you did have linear, try
  without it.)

  There may be geometry problems that can be solved by giving an
  explicit geometry to kernel/LILO/fdisk.

  If you have an old fdisk and it warns about ``overlapping''
  partitions: ignore the warnings, or check using cfdisk that really all
  is well.

  If you think something is wrong with the size of your disk, make sure
  that you are not confusing binary and decimal ``'', and realize that
  the free space that df reports on an empty disk is a few percent
  smaller than the partition size, because there is administrative
  overhead.

  Now, if you still think there are problems, or just are curious, read
  on.


  3.  Units and Sizes

  A kilobyte (kB) is 1000 bytes.  A megabyte (MB) is 1000 kB.  A
  gigabyte (GB) is 1000 MB.  A terabyte (TB) is 1000 GB.  This is the SI
  norm.  However, there are people that use 1 MB=1024000 bytes and talk
  about 1.44 MB floppies, and people who think that 1 MB=1048576 bytes.
  Here I follow the recent standard and write Ki, Mi, Gi, Ti for the
  binary units, so that these floppies are 1440 KiB (1.47 MB, 1.41 MiB),
  1 MiB is 1048576 bytes (1.05 MB), 1 GiB is 1073741824 bytes (1.07 GB)
  and 1 TiB is 1099511627776 bytes (1.1 TB).

  Quite correctly, the disk drive manufacturers follow the SI norm and
  use the decimal units. However, Linux boot messages and some fdisk-
  type programs use the symbols MB and GB for binary, or mixed binary-
  decimal units. So, before you think your disk is smaller than was
  promised when you bought it, compute first the actual size in decimal
  units (or just in bytes).

  Concerning terminology and abbreviation for binary units, Knuth has an
  alternative proposal, namely to use KKB, MMB, GGB, TTB, PPB, EEB, ZZB,
  YYB and to call these large kilobyte, large megabyte, ... large
  yottabyte.  He writes: `Notice that doubling the letter connotes both
  binary-ness and large-ness.' This is a good proposal - `large
  gigabyte' sounds better than `gibibyte'. For our purposes however the
  only important thing is to stress that a megabyte has precisely
  1000000 bytes, and that some other term and abbreviation is required
  if you mean something else.


  3.1.  Sectorsize

  In the present text a sector has 512 bytes. This is almost always
  true, but for example certain MO disks use a sectorsize of 2048 bytes,
  and all capacities given below must be multiplied by four.  (When
  using fdisk on such disks, make sure you have version 2.9i or later,
  and give the `-b 2048' option.)


  3.2.  Disksize

  A disk with C cylinders, H heads and S sectors per track has C*H*S
  sectors in all, and can store C*H*S*512 bytes.  For example, if the
  disk label says C/H/S=4092/16/63 then the disk has 4092*16*63=4124736
  sectors, and can hold 4124736*512=2111864832 bytes (2.11 GB).  There
  is an industry convention to give C/H/S=16383/16/63 for disks larger
  than 8.4 GB, and the disk size can no longer be read off from the
  C/H/S values reported by the disk.


  4.  Disk Access

  In order to read or write something from or to the disk, we have to
  specify a position on the disk, for example by giving a sector or
  block number.  If the disk is a SCSI disk, then this sector number
  goes directly into the SCSI command and is understood by the disk.  If
  the disk is an IDE disk using LBA, then precisely the same holds.  But
  if the disk is old, RLL or MFM or IDE from before the LBA times, then
  the disk hardware expects a triple (cylinder,head,sector) to designate
  the desired spot on the disk.

  The correspondence between the linear numbering and this 3D notation
  is as follows: for a disk with C cylinders, H heads and S
  sectors/track position (c,h,s) in 3D or CHS notation is the same as
  position c*H*S + h*S + (s-1) in linear or LBA notation.  (The minus
  one is because traditionally sectors are counted from 1, not 0, in
  this 3D notation.)

  Consequently, in order to access a very old non-SCSI disk, we need to
  know its geometry, that is, the values of C, H and S.


  4.1.  BIOS Disk Access and the 1024 cylinder limit

  Linux does not use the BIOS, but some other systems do.  The BIOS,
  which predates LBA times, offers with INT13 disk I/O routines that
  have (c,h,s) as input.  (More precisely: AH selects the function to
  perform, CH is the low 8 bits of the cylinder number, CL has in bits
  7-6 the high two bits of the cylinder number and in bits 5-0 the
  sector number, DH is the head number, and DL is the drive number (80h
  or 81h).  This explains part of the layout of the partition table.)

  Thus, we have CHS encoded in three bytes, with 10 bits for the
  cylinder number, 8 bits for the head number, and 6 bits for the track
  sector number (numbered 1-63).  It follows that cylinder numbers can
  range from 0 to 1023 and that no more than 1024 cylinders are BIOS
  addressable.

  DOS and Windows software did not change when IDE disks with LBA
  support were introduced, so DOS and Windows continued needing a disk
  geometry, even when this was no longer needed for the actual disk I/O,
  but only for talking to the BIOS. This again means that Linux needs
  the geometry in those places where communication with the BIOS or with
  other operating systems is required, even on a modern disk.

  This state of affairs lasted for four years or so, and then disks
  appeared on the market that could not be addressed with the INT13
  functions (because the 10+8+6=24 bits for (c,h,s) can address not more
  than 8.5 GB) and a new BIOS interface was designed: the so-called
  Extended INT13 functions, where DS:SI points at a 16-byte Disk Address
  Packet that contains an 8-byte starting absolute block number.

  Very slowly the Microsoft world is moving towards using these Extended
  INT13 functions. Probably a few years from now no modern system on
  modern hardware will need the concept of `disk geometry' anymore.


  4.2.  History of BIOS and IDE limits


     ATA Specification (for IDE disks) - the 137 GB limit
        At most 65536 cylinders (numbered 0-65535), 16 heads (numbered
        0-15), 255 sectors/track (numbered 1-255), for a maximum total
        capacity of 267386880 sectors (of 512 bytes each), that is,
        136902082560 bytes (137 GB).  This is not yet a problem (in
        1999), but will be a few years from now.


     BIOS Int 13 - the 8.5 GB limit
        At most 1024 cylinders (numbered 0-1023), 256 heads (numbered
        0-255), 63 sectors/track (numbered 1-63) for a maximum total
        capacity of 8455716864 bytes (8.5 GB). This is a serious
        limitation today.  It means that DOS cannot use present day
        large disks.


     The 528 MB limit
        If the same values for c,h,s are used for the BIOS Int 13 call
        and for the IDE disk I/O, then both limitations combine, and one
        can use at most 1024 cylinders, 16 heads, 63 sectors/track, for
        a maximum total capacity of 528482304 bytes (528MB), the
        infamous 504 MiB limit for DOS with an old BIOS.  This started
        being a problem around 1993, and people resorted to all kinds of
        trickery, both in hardware (LBA), in firmware (translating
        BIOS), and in software (disk managers).  The concept of
        `translation' was invented (1994): a BIOS could use one geometry
        while talking to the drive, and another, fake, geometry while
        talking to DOS, and translate between the two.


     The 2.1 GB limit (April 1996)
        Some older BIOSes only allocate 12 bits for the field in CMOS
        RAM that gives the number of cylinders. Consequently, this
        number can be at most 4095, and only 4095*16*63*512=2113413120
        bytes are accessible.  The effect of having a larger disk would
        be a hang at boot time.  This made disks with geometry
        4092/16/63 rather popular. And still today many large disk
        drives come with a jumper to make them appear 4092/16/63.  See
        also over2gb.htm. Other BIOSes would not hang but just detect a
        much smaller disk, like 429 MB instead of 2.5 GB.


     The 3.2 GB limit
        There was a bug in the Phoenix 4.03 and 4.04 BIOS firmware that
        would cause the system to lock up in the CMOS setup for drives
        with a capacity over 3277 MB. See over3gb.htm.


     The 4.2 GB limit (Feb 1997)
        Simple BIOS translation (ECHS=Extended CHS, sometimes called
        `Large disk support' or just `Large') works by repeatedly
        doubling the number of heads and halving the number of cylinders
        shown to DOS, until the number of cylinders is at most 1024.
        Now DOS and Windows 95 cannot handle 256 heads, and in the
        common case that the disk reports 16 heads, this means that this
        simple mechanism only works up to 8192*16*63*512=4227858432
        bytes (with a fake geometry with 1024 cylinders, 128 heads, 63
        sectors/track).  Note that ECHS does not change the number of
        sectors per track, so if that is not 63, the limit will be
        lower.  See over4gb.htm.


     The 7.9 GB limit
        Slightly smarter BIOSes avoid the previous problem by first
        adjusting the number of heads to 15 (`revised ECHS'), so that a
        fake geometry with 240 heads can be obtained, good for
        1024*240*63*512=7927234560 bytes.

     The 8.4 GB limit

        Finally, if the BIOS does all it can to make this translation a
        success, and uses 255 heads and 63 sectors/track (`assisted LBA'
        or just `LBA') it may reach 1024*255*63*512=8422686720 bytes,
        slightly less than the earlier 8.5 GB limit because the
        geometries with 256 heads must be avoided.  (This translation
        will use for the number of heads the first value H in the
        sequence 16, 32, 64, 128, 255 for which the total disk capacity
        fits in 1024*H*63*512, and then computes the number of cylinders
        C as total capacity divided by (H*63*512).)


     The 33.8 GB limit (August 1999)

        The next hurdle comes with a size over 33.8 GB.  The problem is
        that with the default 16 heads and 63 sectors/track this
        corresponds to a number of cylinders of more than 65535, which
        does not fit into a short. Most BIOSes in existence today can't
        handle such disks. (See, e.g., Asus upgrades for new flash
        images that work.)  Linux kernels older than 2.2.14 / 2.3.21
        need a patch.  See ``IDE problems with 34+ GB disks'' below.

  For another discussion of this topic, see Breaking the Barriers, and,
  with more details, IDE Hard Drive Capacity Barriers.

  Hard drives over 8.4 GB are supposed to report their geometry as
  16383/16/63.  This in effect means that the `geometry' is obsolete,
  and the total disk size can no longer be computed from the geometry.



  5.  Booting

  When the system is booted, the BIOS reads sector 0 (known as the MBR -
  the Master Boot Record) from the first disk (or from floppy or CDROM),
  and jumps to the code found there - usually some bootstrap loader.
  These small bootstrap programs found there typically have no own disk
  drivers and use BIOS services.  This means that a Linux kernel can
  only be booted when it is entirely located within the first 1024
  cylinders.

  This problem is very easily solved: make sure that the kernel (and
  perhaps other files used during bootup, such as LILO map files) are
  located on a partition that is entirely contained in the first 1024
  cylinders of a disk that the BIOS can access - probably this means the
  first or second disk.

  Thus: create a small partition, say 10 MB large, so that there is room
  for a handful of kernels, making sure that it is entirely contained
  within the first 1024 cylinders of the first or second disk. Mount it
  on /boot so that LILO will put its stuff there.



  5.1.  LILO and the `linear' option

  Another point is that the boot loader and the BIOS must agree as to
  the disk geometry.  LILO asks the kernel for the geometry, but more
  and more authors of disk drivers follow the bad habit of deriving a
  geometry from the partition table, instead of telling LILO what the
  BIOS will use. Thus, often the geometry supplied by the kernel is
  worthless. In such cases it helps to give LILO the `linear' option.
  The effect of this is that LILO does not need geometry information at
  boot loader install time (it stores linear addresses in the maps) but
  does the conversion of linear addresses at boot time. Why is this not
  the default?  Well, there is one disadvantage: with the `linear'
  option, LILO no longer knows about cylinder numbers, and hence cannot
  warn you when part of the kernel was stored above the 1024 cylinder
  limit, and you may end up with a system that does not boot.


  5.2.  A LILO bug

  With LILO versions below v21 there is another disadvantage: the
  address conversion done at boot time has a bug: when c*H is 65536 or
  more, overflow occurs in the computation.  For H larger than 64 this
  causes a stricter limit on c than the well-known c < 1024; for
  example, with H=255 and an old LILO one must have c < 258. (c=cylinder
  where kernel image lives, H=number of heads of disk)


  5.3.  1024 cylinders is not 1024 cylinders

  Tim Williams writes: `I had my Linux partition within the first 1024
  cylinders and still it wouldnt boot. First when I moved it below 1 GB
  did things work.' How can that be? Well, this was a SCSI disk with
  AHA2940UW controller which uses either H=64, S=32 (that is, cylinders
  of 1 MiB = 1.05 MB), or H=255, S=63 (that is, cylinders of 8.2 MB),
  depending on setup options in firmware and BIOS. No doubt the BIOS
  assumed the former, so that the 1024 cylinder limit was found at 1
  GiB, while Linux used the latter and LILO thought that this limit was
  at 8.4 GB.


  6.  Disk geometry, partitions and `overlap'

  If you have several operating systems on your disks, then each uses
  one or more disk partitions.  A disagreement on where these partitions
  are may have catastrophic consequences.


  The MBR contains a partition table describing where the (primary)
  partitions are.  There are 4 table entries, for 4 primary partitions,
  and each looks like


       struct partition {
               char active;    /* 0x80: bootable, 0: not bootable */
               char begin[3];  /* CHS for first sector */
               char type;
               char end[3];    /* CHS for last sector */
               int start;      /* 32 bit sector number (counting from 0) */
               int length;     /* 32 bit number of sectors */
       };



  (where CHS stands for Cylinder/Head/Sector).

  This information is redundant: the location of a partition is given
  both by the 24-bit begin and end fields, and by the 32-bit start and
  length fields.

  Linux only uses the start and length fields, and can therefore handle
  partitions of not more than 2^32 sectors, that is, partitions of at
  most 2 TiB.  That is sixty times larger than the disks available
  today, so maybe it will be enough for the next seven years or so.
  (So, partitions can be very large, but there is a serious restriction
  in that a file in an ext2 filesystem on hardware with 32-bit integers
  cannot be larger than 2 GiB.)

  DOS uses the begin and end fields, and uses the BIOS INT13 call to
  access the disk, and can therefore only handle disks of not more than
  8.4 GB, even with a translating BIOS. (Partitions cannot be larger
  than 2.1 GB because of restrictions of the FAT16 file system.) The
  same holds for Windows 3.11 and WfWG and Windows NT 3.*.

  Windows 95 has support for the Extended INT13 interface, and uses
  special partition types (c, e, f instead of b, 6, 5) to indicate that
  a partition should be accessed in this way.  When these partition
  types are used, the begin and end fields contain dummy information
  (1023/255/63).  Windows 95 OSR2 introduces the FAT32 file system
  (partition type b or c), that allows partitions of size at most 2 TiB.

  What is this nonsense you get from fdisk about `overlapping'
  partitions, when in fact nothing is wrong?  Well - there is something
  `wrong': if you look at the begin and end fields of such partitions,
  as DOS does, they overlap.  (And that cannot be corrected, because
  these fields cannot store cylinder numbers above 1024 - there will
  always be `overlap' as soon as you have more than 1024 cylinders.)
  However, if you look at the start and length fields, as Linux does,
  and as Windows 95 does in the case of partitions with partition type
  c, e or f, then all is well.  So, ignore these warnings when cfdisk is
  satisfied and you have a Linux-only disk. Be careful when the disk is
  shared with DOS.  Use the commands cfdisk -Ps /dev/hdx and cfdisk -Pt
  /dev/hdx to look at the partition table of /dev/hdx.



  7.  Translation and Disk Managers

  Disk geometry (with heads, cylinders and tracks) is something from the
  age of MFM and RLL. In those days it corresponded to a physical
  reality. Nowadays, with IDE or SCSI, nobody is interested in what the
  `real' geometry of a disk is.  Indeed, the number of sectors per track
  is variable - there are more sectors per track close to the outer rim
  of the disk - so there is no `real' number of sectors per track.
  Quite the contrary: the IDE command INITIALIZE DRIVE PARAMETERS (91h)
  serves to tell the disk how many heads and sectors per track it is
  supposed to have today.  It is quite normal to see a large modern disk
  that has 2 heads report 15 or 16 heads to the BIOS, while the BIOS may
  again report 255 heads to user software.

  For the user it is best to regard a disk as just a linear array of
  sectors numbered 0, 1, ..., and leave it to the firmware to find out
  where a given sector lives on the disk. This linear numbering is
  called LBA.

  So now the conceptual picture is the following.  DOS, or some boot
  loader, talks to the BIOS, using (c,h,s) notation.  The BIOS converts
  (c,h,s) to LBA notation using the fake geometry that the user is
  using. If the disk accepts LBA then this value is used for disk I/O.
  Otherwise, it is converted back to (c',h',s') using the geometry that
  the disk uses today, and that is used for disk I/O.

  Note that there is a bit of confusion in the use of the expression
  `LBA': As a term describing disk capabilities it means `Linear Block
  Addressing' (as opposed to CHS Addressing). As a term in the BIOS
  Setup, it describes a translation scheme sometimes called `assisted
  LBA' - see above under ```'''.

  Something similar works when the firmware doesn't speak LBA but the
  BIOS knows about translation.  (In the setup this is often indicated
  as `Large'.)  Now the BIOS will present a geometry (C,H,S) to the
  operating system, and use (C',H',S') while talking to the disk
  controller.  Usually S = S', C = C'/N and H = H'*N, where N is the
  smallest power of two that will ensure C' <= 1024 (so that least
  capacity is wasted by the rounding down in C' = C/N).  Again, this
  allows access of up to 8.4 GB (7.8 GiB).

  (The third setup option usually is `Normal', where no translation is
  involved.)

  If a BIOS does not know about `Large' or `LBA', then there are
  software solutions around.  Disk Managers like OnTrack or EZ-Drive
  replace the BIOS disk handling routines by their own.  Often this is
  accomplished by having the disk manager code live in the MBR and
  subsequent sectors (OnTrack calls this code DDO: Dynamic Drive
  Overlay), so that it is booted before any other operating system.
  That is why one may have problems when booting from a floppy when a
  Disk Manager has been installed.

  The effect is more or less the same as with a translating BIOS - but
  especially when running several different operating systems on the
  same disk, disk managers can cause a lot of trouble.

  Linux does support OnTrack Disk Manager since version 1.3.14, and EZ-
  Drive since version 1.3.29.  Some more details are given below.



  8.  Kernel disk translation for IDE disks

  If the Linux kernel detects the presence of some disk manager on an
  IDE disk, it will try to remap the disk in the same way this disk
  manager would have done, so that Linux sees the same disk partitioning
  as for example DOS with OnTrack or EZ-Drive.  However, NO remapping is
  done when a geometry was specified on the command line - so a
  `hd=cyls,heads,secs' command line option might well kill compatibility
  with a disk manager.

  If you are hit by this, and know someone who can compile a new kernel
  for you, find the file linux/drivers/block/ide.c and remove in the
  routine ide_xlate_1024() the test if (drive->forced_geom) { ...;
  return 0; }.

  The remapping is done by trying 4, 8, 16, 32, 64, 128, 255 heads
  (keeping H*C constant) until either C <= 1024 or H = 255.

  The details are as follows - subsection headers are the strings
  appearing in the corresponding boot messages.  Here and everywhere
  else in this text partition types are given in hexadecimal.


  8.1.  EZD

  EZ-Drive is detected by the fact that the first primary partition has
  type 55.  The geometry is remapped as described above, and the
  partition table from sector 0 is discarded - instead the partition
  table is read from sector 1.  Disk block numbers are not changed, but
  writes to sector 0 are redirected to sector 1.  This behaviour can be
  changed by recompiling the kernel with
   #define FAKE_FDISK_FOR_EZDRIVE  0 in ide.c.


  8.2.  DM6:DDO

  OnTrack DiskManager (on the first disk) is detected by the fact that
  the first primary partition has type 54.  The geometry is remapped as
  described above and the entire disk is shifted by 63 sectors (so that
  the old sector 63 becomes sector 0).  Afterwards a new MBR (with
  partition table) is read from the new sector 0.  Of course this shift
  is to make room for the DDO - that is why there is no shift on other
  disks.


  8.3.  DM6:AUX

  OnTrack DiskManager (on other disks) is detected by the fact that the
  first primary partition has type 51 or 53.  The geometry is remapped
  as described above.


  8.4.  DM6:MBR

  An older version of OnTrack DiskManager is detected not by partition
  type, but by signature.  (Test whether the offset found in bytes 2 and
  3 of the MBR is not more than 430, and the short found at this offset
  equals 0x55AA, and is followed by an odd byte.) Again the geometry is
  remapped as above.


  8.5.  PTBL

  Finally, there is a test that tries to deduce a translation from the
  start and end values of the primary partitions: If some partition has
  start and end sector number 1 and 63, respectively, and end heads 31,
  63, 127 or 254, then, since it is customary to end partitions on a
  cylinder boundary, and since moreover the IDE interface uses at most
  16 heads, it is conjectured that a BIOS translation is active, and the
  geometry is remapped to use 32, 64, 128 or 255 heads, respectively.
  However, no remapping is done when the current idea of the geometry
  already has 63 sectors per track and at least as many heads (since
  this probably means that a remapping was done already).


  9.  Consequences

  What does all of this mean?  For Linux users only one thing: that they
  must make sure that LILO and fdisk use the right geometry where
  `right' is defined for fdisk as the geometry used by the other
  operating systems on the same disk, and for LILO as the geometry that
  will enable successful interaction with the BIOS at boot time.
  (Usually these two coincide.)

  How does fdisk know about the geometry?  It asks the kernel, using the
  HDIO_GETGEO ioctl.  But the user can override the geometry
  interactively or on the command line.

  How does LILO know about the geometry?  It asks the kernel, using the
  HDIO_GETGEO ioctl.  But the user can override the geometry using the
  `disk=' option in /etc/lilo.conf (see lilo.conf(5)).  One may also
  give the linear option to LILO, and it will store LBA addresses
  instead of CHS addresses in its map file, and find out of the geometry
  to use at boot time (by using INT 13 Function 8 to ask for the drive
  geometry).

  How does the kernel know what to answer?  Well, first of all, the user
  may have specified an explicit geometry with a `hda=cyls,heads,secs'
  kernel command line option (see bootparam(7)), perhaps by hand, or by
  asking the boot loader to supply such an option to the kernel.  For
  example, one can tell LILO to supply such an option by adding an
  `append = "hda=cyls,heads,secs"' line in /etc/lilo.conf (see
  lilo.conf(5)).  And otherwise the kernel will guess, possibly using
  values obtained from the BIOS or the hardware.

  It is possible (since Linux 2.1.79) to change the kernel's ideas about
  the geometry by using the /proc filesystem.  For example


       # sfdisk -g /dev/hdc
       /dev/hdc: 4441 cylinders, 255 heads, 63 sectors/track
       # cd /proc/ide/ide1/hdc
       # echo bios_cyl:17418 bios_head:128 bios_sect:32 > settings
       # sfdisk -g /dev/hdc
       /dev/hdc: 17418 cylinders, 128 heads, 32 sectors/track
       #



  9.1.  Computing LILO parameters

  Sometimes it is useful to force a certain geometry by adding
  `hda=cyls,heads,secs' on the kernel command line. Almost always one
  wants secs=63, and the purpose of adding this is to specify heads.
  (Reasonable values today are heads=16 and heads=255.)  What should one
  specify for cyls? Precisely that number that will give the right total
  capacity of C*H*S sectors.  For example, for a drive with 71346240
  sectors (36529274880 bytes) one would compute C as
  71346240/(255*63)=4441 (for example using the program bc), and give
  boot parameter hdc=4441,255,63.  How does one know the right total
  capacity? For example,


       # hdparm -g /dev/hdc | grep sectors
        geometry     = 4441/255/63, sectors = 71346240, start = 0
       # hdparm -i /dev/hdc | grep LBAsects
        CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=71346240



  gives two ways of finding the total number of sectors 71346240.  The
  kernel output


       # dmesg | grep hdc
       ...
       hdc: Maxtor 93652U8, 34837MB w/2048kB Cache, CHS=70780/16/63
        hdc: [PTBL] [4441/255/63] hdc1 hdc2 hdc3! hdc4 < hdc5 > ...



  tells us about (at least) 34837*2048=71346176 and about (at least)
  70780*16*63=71346240 sectors. In this case the second value happens to
  be precisely correct, but in general both may be rounded down.  This
  is a good way to approximate the disk size when hdparm is unavailable.
  Never give a too large value for cyls!  In the case of SCSI disks the
  precise number of sectors is given in the kernel boot messages:


       SCSI device sda: hdwr sector= 512 bytes. Sectors= 17755792 [8669 MB] [8.7 GB]



  (and MB, GB are rounded, not rounded down, and `binary').


  10.  Details


  10.1.  IDE details - the seven geometries

  The IDE driver has five sources of information about the geometry.
  The first (G_user) is the one specified by the user on the command
  line.  The second (G_bios) is the BIOS Fixed Disk Parameter Table (for
  first and second disk only) that is read on system startup, before the
  switch to 32-bit mode.  The third (G_phys) and fourth (G_log) are
  returned by the IDE controller as a response to the IDENTIFY command -
  they are the `physical' and `current logical' geometries.

  On the other hand, the driver needs two values for the geometry: on
  the one hand G_fdisk, returned by a HDIO_GETGEO ioctl, and on the
  other hand G_used, which is actually used for doing I/O.  Both G_fdisk
  and G_used are initialized to G_user if given, to G_bios when this
  information is present according to CMOS, and to G_phys otherwise.  If
  G_log looks reasonable then G_used is set to that.  Otherwise, if
  G_used is unreasonable and G_phys looks reasonable then G_used is set
  to G_phys.  Here `reasonable' means that the number of heads is in the
  range 1-16.

  To say this in other words: the command line overrides the BIOS, and
  will determine what fdisk sees, but if it specifies a translated
  geometry (with more than 16 heads), then for kernel I/O it will be
  overridden by output of the IDENTIFY command.

  Note that G_bios is rather unreliable: for systems booting from SCSI
  the first and second disk may well be SCSI disks, and the geometry
  that the BIOS reported for sda is used by the kernel for hda.
  Moreover, disks that are not mentioned in the BIOS Setup are not seen
  by the BIOS. This means that, e.g., in an IDE-only system where hdb is
  not given in the Setup, the geometries reported by the BIOS for the
  first and second disk will apply to hda and hdc.


  10.2.  SCSI details

  The situation for SCSI is slightly different, as the SCSI commands
  already use logical block numbers, so a `geometry' is entirely
  irrelevant for actual I/O.  However, the format of the partition table
  is still the same, so fdisk has to invent some geometry, and also uses
  HDIO_GETGEO here - indeed, fdisk does not distinguish between IDE and
  SCSI disks.  As one can see from the detailed description below, the
  various drivers each invent a somewhat different geometry.  Indeed,
  one big mess.

  If you are not using DOS or so, then avoid all extended translation
  settings, and just use 64 heads, 32 sectors per track (for a nice,
  convenient 1 MiB per cylinder), if possible, so that no problems arise
  when you move the disk from one controller to another.  Some SCSI disk
  drivers (aha152x, pas16, ppa, qlogicfas, qlogicisp) are so nervous
  about DOS compatibility that they will not allow a Linux-only system
  to use more than about 8 GiB.  This is a bug.

  What is the real geometry?  The easiest answer is that there is no
  such thing.  And if there were, you wouldn't want to know, and
  certainly NEVER, EVER tell fdisk or LILO or the kernel about it.  It
  is strictly a business between the SCSI controller and the disk.  Let
  me repeat that: only silly people tell fdisk/LILO/kernel about the
  true SCSI disk geometry.

  But if you are curious and insist, you might ask the disk itself.
  There is the important command READ CAPACITY that will give the total
  size of the disk, and there is the MODE SENSE command, that in the
  Rigid Disk Drive Geometry Page (page 04) gives the number of cylinders
  and heads (this is information that cannot be changed), and in the
  Format Page (page 03) gives the number of bytes per sector, and
  sectors per track.  This latter number is typically dependent upon the
  notch, and the number of sectors per track varies - the outer tracks
  have more sectors than the inner tracks.  The Linux program scsiinfo
  will give this information.  There are many details and complications,
  and it is clear that nobody (probably not even the operating system)
  wants to use this information.  Moreover, as long as we are only
  concerned about fdisk and LILO, one typically gets answers like
  C/H/S=4476/27/171 - values that cannot be used by fdisk because the
  partition table reserves only 10 resp. 8 resp. 6 bits for C/H/S.

  Then where does the kernel HDIO_GETGEO get its information from?
  Well, either from the SCSI controller, or by making an educated guess.
  Some drivers seem to think that we want to know `reality', but of
  course we only want to know what the DOS or OS/2 FDISK (or Adaptec
  AFDISK, etc) will use.

  Note that Linux fdisk needs the numbers H and S of heads and sectors
  per track to convert LBA sector numbers into c/h/s addresses, but the
  number C of cylinders does not play a role in this conversion.  Some
  drivers use (C,H,S) = (1023,255,63) to signal that the drive capacity
  is at least 1023*255*63 sectors.  This is unfortunate, since it does
  not reveal the actual size, and will limit the users of most fdisk
  versions to about 8 GiB of their disks - a real limitation in these
  days.

  In the description below, M denotes the total disk capacity, and C, H,
  S the number of cylinders, heads and sectors per track.  It suffices
  to give H, S if we regard C as defined by M / (H*S).

  By default, H=64, S=32.


     aha1740, dtc, g_NCR5380, t128, wd7000:
        H=64, S=32.


     aha152x, pas16, ppa, qlogicfas, qlogicisp:
        H=64, S=32 unless C > 1024, in which case H=255, S=63, C =
        min(1023, M/(H*S)).  (Thus C is truncated, and H*S*C is not an
        approximation to the disk capacity M.  This will confuse most
        versions of fdisk.)  The ppa.c code uses M+1 instead of M and
        says that due to a bug in sd.c M is off by 1.


     advansys:
        H=64, S=32 unless C > 1024 and moreover the `> 1 GB' option in
        the BIOS is enabled, in which case H=255, S=63.


     aha1542:
        Ask the controller which of two possible translation schemes is
        in use, and use either H=255, S=63 or H=64, S=32.  In the former
        case there is a boot message "aha1542.c: Using extended bios
        translation".


     aic7xxx:
        H=64, S=32 unless C > 1024, and moreover either the "extended"
        boot parameter was given, or the `extended' bit was set in the
        SEEPROM or BIOS, in which case H=255, S=63.  In Linux 2.0.36
        this extended translation would always be set in case no SEEPROM
        was found, but in Linux 2.2.6 if no SEEPROM is found extended
        translation is set only when the user asked for it using this
        boot parameter (while when a SEEPROM is found, the boot
        parameter is ignored).  This means that a setup that works under
        2.0.36 may fail to boot with 2.2.6 (and require the `linear'
        keyword for LILO, or the `aic7xxx=extended' kernel boot
        parameter).


     buslogic:
        H=64, S=32 unless C >= 1024, and moreover extended translation
        was enabled on the controller, in which case if M < 2^22 then
        H=128, S=32; otherwise H=255, S=63.  However, after making this
        choice for (C,H,S), the partition table is read, and if for one
        of the three possibilities (H,S) = (64,32), (128,32), (255,63)
        the value endH=H-1 is seen somewhere then that pair (H,S) is
        used, and a boot message is printed "Adopting Geometry from
        Partition Table".


     fdomain:
        Find the geometry information in the BIOS Drive Parameter Table,
        or read the partition table and use H=endH+1, S=endS for the
        first partition, provided it is nonempty, or use H=64, S=32 for
        M < 2^21 (1 GiB), H=128, S=63 for M < 63*2^17 (3.9 GiB) and
        H=255, S=63 otherwise.


     in2000:
        Use the first of (H,S) = (64,32), (64,63), (128,63), (255,63)
        that will make C <= 1024.  In the last case, truncate C at 1023.


     seagate:
        Read C,H,S from the disk.  (Horrors!)  If C or S is too large,
        then put S=17, H=2 and double H until C <= 1024.  This means
        that H will be set to 0 if M > 128*1024*17 (1.1 GiB).  This is a
        bug.


     ultrastor and u14_34f:
        One of three mappings ((H,S) = (16,63), (64,32), (64,63)) is
        used depending on the controller mapping mode.


  If the driver does not specify the geometry, we fall back on an edu-
  cated guess using the partition table, or using the total disk capac-
  ity.

  Look at the partition table.  Since by convention partitions end on a
  cylinder boundary, we can, given end = (endC,endH,endS) for any
  partition, just put H = endH+1 and S = endS.  (Recall that sectors are
  counted from 1.)  More precisely, the following is done.  If there is
  a nonempty partition, pick the partition with the largest beginC.  For
  that partition, look at end+1, computed both by adding start and
  length and by assuming that this partition ends on a cylinder
  boundary.  If both values agree, or if endC = 1023 and start+length is
  an integral multiple of (endH+1)*endS, then assume that this partition
  really was aligned on a cylinder boundary, and put H = endH+1 and S =
  endS.  If this fails, either because there are no partitions, or
  because they have strange sizes, then look only at the disk capacity
  M.  Algorithm: put H = M/(62*1024) (rounded up), S = M/(1024*H)
  (rounded up), C = M/(H*S) (rounded down).  This has the effect of
  producing a (C,H,S) with C at most 1024 and S at most 62.



  11.  The Linux IDE 8 GiB limit

  The Linux IDE driver gets the geometry and capacity of a disk (and
  lots of other stuff) by using an ATA IDENTIFY request.  Until recently
  the driver would not believe the returned value of lba_capacity if it
  was more than 10% larger than the capacity computed by C*H*S. However,
  by industry agreement large IDE disks (with more than 16514064
  sectors) return C=16383, H=16, S=63, for a total of 16514064 sectors
  (7.8 GB) independent of their actual size, but give their actual size
  in lba_capacity.

  Recent Linux kernels (2.0.34, 2.1.90) know about this and do the right
  thing. If you have an older Linux kernel and do not want to upgrade,
  and this kernel only sees 8 GiB of a much larger disk, then try
  changing the routine lba_capacity_is_ok in
  /usr/src/linux/drivers/block/ide.c into something like


       static int lba_capacity_is_ok (struct hd_driveid *id) {
               id->cyls = id->lba_capacity / (id->heads * id->sectors);
               return 1;
       }



  For a more cautious patch, see 2.1.90.


  11.1.  BIOS complications

  As just mentioned, large disks return the geometry C=16383, H=16, S=63
  independent of the actual size, while the actual size is returned in
  the value of LBAcapacity.  Some BIOSes do not recognize this, and
  translate this 16383/16/63 into something with fewer cylinders and
  more heads, for example 1024/255/63 or 1027/255/63. So, the kernel
  must not only recognize the single geometry 16383/16/63, but also all
  BIOS-mangled versions of it.  Since 2.2.2 this is done correctly (by
  taking the BIOS idea of H and S, and computing C = capacity/(H*S)).
  Usually this problem is solved by setting the disk to Normal in the
  BIOS setup (or, even better, to None, not mentioning it at all to the
  BIOS). If that is impossible because you have to boot from it or use
  it also with DOS/Windows, and upgrading to 2.2.2 or later is not an
  option, use kernel boot parameters.

  If a BIOS reports 16320/16/63, then this is usually done in order to
  get 1024/255/63 after translation.

  There is an additional problem here. If the disk was partitioned using
  a geometry translation, then the kernel may at boot time see this
  geometry used in the partition table, and report hda: [PTBL]
  [1027/255/63]. This is bad, because now the disk is only 8.4 GB. This
  was fixed in 2.3.21. Again, kernel boot parameters will help.


  11.2.  Jumpers that select the number of heads

  Many disks have jumpers that allow you to choose between a 15-head an
  a 16-head geometry. The default settings will give you a 16-head disk.
  Sometimes both geometries address the same number of sectors,
  sometimes the 15-head version is smaller.  There may be a good reason
  for this setup: Petri Kaukasoina writes: `A 10.1 Gig IBM Deskstar 16
  GP (model IBM-DTTA-351010) was jumpered for 16 heads as default but
  this old PC (with AMI BIOS) didn't boot and I had to jumper it for 15
  heads. hdparm -i tells RawCHS=16383/15/63 and LBAsects=19807200. I use
  20960/15/63 to get the full capacity.'  For the jumper settings, see
  http://www.storage.ibm.com/techsup/hddtech/hddtech.htm.


  11.3.  Jumpers that clip total capacity

  Many disks have jumpers that allow you to make the disk appear smaller
  than it is. A silly thing to do, and probably no Linux user ever wants
  to use this, but some BIOSes crash on big disks. The usual solution is
  to keep the disk entirely out of the BIOS setup. But this may be
  feasible only if the disk is not your boot disk.

  The first serious limit was the 4096 cylinder limit (that is, with 16
  heads and 63 sectors/track, 2.11 GB).  For example, a Fujitsu
  MPB3032ATU 3.24 GB disk has default geometry 6704/15/63, but can be
  jumpered to appear as 4092/16/63, and then reports LBAcapacity 4124736
  sectors, so that the operating system cannot guess that it is larger
  in reality.  In such a case (with a BIOS that crashes if it hears how
  big the disk is in reality, so that the jumper is required) one needs
  boot parameters to tell Linux about the size of the disk.

  That is unfortunate. Most disks can be jumpered so as to appear as a 2
  GB disk and then report a clipped geometry like 4092/16/63 or
  4096/16/63, but still report full LBAcapacity. Such disks will work
  well, and use full capacity under Linux, regardless of jumper
  settings.


  A more recent limit is ``the 33.8 GB limit''.  Linux kernels older
  than 2.3.21 need a patch to be able to cope with IDE disks larger than
  this.  Some disks larger than this limit can be jumpered to appear as
  a 33.8 GB disk.  For example, the IBM Deskstar 37.5 GB (DPTA-353750)
  with 73261440 sectors (corresponding to 72680/16/63, or 4560/255/63)
  can be jumpered to appear as a 33.8 GB disk, and then reports geometry
  16383/16/63 like any big disk, but LBAcapacity 66055248 (corresponding
  to 65531/16/63, or 4111/255/63).  Unfortunately the jumper seems to be
  too effective - it not only influences what the drive reports to the
  system, but it also influences actual I/O: Petr Soucek reports that
  for this particular disk boot parameters do not help - with jumper
  present every access to sector 66055248 or more gives an I/O error.
  Thus, on a motherboard with Award 4.51PG BIOS one cannot use this disk
  as boot disk and also use the disk to full capacity.  See also the
  BIOS 33.8 GB limit.



  12.  The Linux 65535 cylinder limit

  The HDIO_GETGEO ioctl returns the number of cylinders in a short.
  This means that if you have more than 65535 cylinders, the number is
  truncated, and (for a typical SCSI setup with 1 MiB cylinders) a 80
  GiB disk may appear as a 16 GiB one.  Once one recognizes what the
  problem is, it is easily avoided.

  12.1.  IDE problems with 34+ GB disks

  Drives larger than 33.8 GB will not work with kernels older than
  2.3.21.  The details are as follows.  Suppose you bought a new IBM-
  DPTA-373420 disk with a capacity of 66835440 sectors (34.2 GB).
  Pre-2.3.21 kernels will tell you that the size is 769*16*63 = 775152
  sectors (0.4 GB), which is a bit disappointing. And giving command
  line parameters hdc=4160,255,63 doesn't help at all - these are just
  ignored.  What happens? The routine idedisk_setup() retrieves the
  geometry reported by the disk (which is 16383/16/63) and overwrites
  what the user specified on the command line, so that the user data is
  used only for the BIOS geometry. The routine current_capacity() or
  idedisk_capacity() recomputes the cylinder number as
  66835440/(16*63)=66305, but since this is stored in a short, it
  becomes 769. Since lba_capacity_is_ok() destroyed id->cyls, every
  following call to it will return false, so that the disk capacity
  becomes 769*16*63.  For several kernels a patch is available.  A patch
  for 2.0.38 can be found at ftp.kernel.org.  A patch for 2.2.12 can be
  found at www.uwsg.indiana.edu (some editing may be required to get rid
  of the html markup).  The 2.2.14 kernels do support these disks.  In
  the 2.3.* kernel series, there is support for these disks since
  2.3.21.  One can also `solve' the problem in hardware by ``using a
  jumper'' to clip the size to 33.8 GB.  In many cases a ``BIOS
  upgrade'' will be required if one wants to boot from the disk.


  13.  Extended and logical partitions

  ``Above,'' we saw the structure of the MBR (sector 0): boot loader
  code followed by 4 partition table entries of 16 bytes each, followed
  by an AA55 signature.  Partition table entries of type 5 or F or 85
  (hex) have a special significance: they describe extended partitions:
  blobs of space that are further partitioned into logical partitions.
  (So, an extended partition is only a box, it cannot be used itself,
  one uses the logical partitions inside.)  Only the location of the
  first sector of an extended partition is important. This first sector
  contains a partition table with four entries: one a logical partition,
  one an extended partition, and two unused. In this way one gets a
  chain of partition table sectors, scattered over the disk, where the
  first one describes three primary partitions and the extended
  partition, and each following partition table sector describes one
  logical partition and the location of the next partition table sector.

  It is important to understand this: When people do something stupid
  while partitioning a disk, they want to know: Is my data still there?
  And the answer is usually: Yes. But if logical partitions were created
  then the partition table sectors describing them are written at the
  beginning of these logical partitions, and data that was there before
  is lost.

  The program sfdisk will show the full chain. E.g.,



  # sfdisk -l -x /dev/hda

  Disk /dev/hda: 16 heads, 63 sectors, 33483 cylinders
  Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

     Device Boot Start     End   #cyls   #blocks   Id  System
  /dev/hda1          0+    101     102-    51376+  83  Linux
  /dev/hda2        102    2133    2032   1024128   83  Linux
  /dev/hda3       2134   33482   31349  15799896    5  Extended
  /dev/hda4          0       -       0         0    0  Empty

  /dev/hda5       2134+   6197    4064-  2048224+  83  Linux
      -           6198   10261    4064   2048256    5  Extended
      -           2134    2133       0         0    0  Empty
      -           2134    2133       0         0    0  Empty

  /dev/hda6       6198+  10261    4064-  2048224+  83  Linux
      -          10262   16357    6096   3072384    5  Extended
      -           6198    6197       0         0    0  Empty
      -           6198    6197       0         0    0  Empty
  ...
  /dev/hda10     30581+  33482    2902-  1462576+  83  Linux
      -          30581   30580       0         0    0  Empty
      -          30581   30580       0         0    0  Empty
      -          30581   30580       0         0    0  Empty

  #



  It is possible to construct bad partition tables.  Many kernels get
  into a loop if some extended partition points back to itself or to an
  earlier partition in the chain.  It is possible to have two extended
  partitions in one of these partition table sectors so that the
  partition table chain forks.  (This can happen for example with an
  fdisk that does not recognize each of 5, F, 85 as an extended
  partition, and creates a 5 next to an F.)  No standard fdisk type
  program can handle such situations, and some handwork is required to
  repair them.  The Linux kernel will accept a fork at the outermost
  level.  That is, you can have two chains of logical partitions.
  Sometimes this is useful - for example, one can use type 5 and be seen
  by DOS, and the other type 85, invisible for DOS, so that DOS FDISK
  will not crash because of logical partitions past cylinder 1024.
  Usually one needs sfdisk to create such a setup.



  14.  Problem solving

  Many people think they have problems, while in fact nothing is wrong.
  Or, they think that the problems they have are due to disk geometry,
  while in fact disk geometry has nothing to do with the matter.  All of
  the above may have sounded complicated, but disk geometry handling is
  extremely easy: do nothing at all, and all is fine; or perhaps give
  LILO the keyword `linear' if it doesn't get past `LI' when booting.
  Watch the kernel boot messages, and remember: the more you fiddle with
  geometries (specifying heads and cylinders to LILO and fdisk and on
  the kernel command line) the less likely it is that things will work.
  Roughly speaking, all is fine by default.

  And remember: nowhere in Linux is disk geometry used, so no problem
  you have while running Linux can be caused by disk geometry.  Indeed,
  disk geometry is used only by LILO and by fdisk.  So, if LILO fails to
  boot the kernel, that may be a geometry problem.  If different
  operating systems do not understand the partition table, that may be a
  geometry problem. Nothing else. In particular, if mount doesnt seem to
  work, never worry about disk geometry - the problem is elsewhere.


  14.1.  Problem: My IDE disk gets a bad geometry when I boot from SCSI.

  It is quite possible that a disk gets the wrong geometry.  The Linux
  kernel asks the BIOS about hd0 and hd1 (the BIOS drives numbered 80H
  and 81H) and assumes that this data is for hda and hdb.  But on a
  system that boots from SCSI, the first two disks may well be SCSI
  disks, and thus it may happen that the fifth disk, which is the first
  IDE disk hda, gets assigned a geometry belonging to sda.  Such things
  are easily solved by giving boot parameters `hda=C,H,S' for the
  appropriate numbers C, H and S, either at boot time or in
  /etc/lilo.conf.



  14.2.  Nonproblem: Identical disks have different geometry?

  `I have two identical 10 GB IBM disks. However, fdisk gives different
  sizes for them. Look:


       # fdisk -l /dev/hdb
       Disk /dev/hdb: 255 heads, 63 sectors, 1232 cylinders
       Units = cylinders of 16065 * 512 bytes

          Device Boot  Start      End   Blocks   Id  System
       /dev/hdb1           1     1232  9896008+  83  Linux native
       # fdisk -l /dev/hdd
       Disk /dev/hdd: 16 heads, 63 sectors, 19650 cylinders
       Units = cylinders of 1008 * 512 bytes

          Device Boot  Start      End   Blocks   Id  System
       /dev/hdd1           1    19650  9903568+  83  Linux native



  How come?'

  What is happening here? Well, first of all these drives really are
  10gig: hdb has size 255*63*1232*512 = 10133544960, and hdd has size
  16*63*19650*512 = 10141286400, so, nothing is wrong and the kernel
  sees both as 10.1 GB.  Why the difference in size? That is because the
  kernel gets data for the first two IDE disks from the BIOS, and the
  BIOS has remapped hdb to have 255 heads (and 16*19650/255=1232
  cylinders).  The rounding down here costs almost 8 MB.

  If you would like to remap hdd in the same way, give the kernel boot
  parameters `hdd=1232,255,63'.


  14.3.  Nonproblem: fdisk sees much more room than df?

  fdisk will tell you how many blocks there are on the disk.  If you
  make a filesystem on the disk, say with mke2fs, then this filesystem
  needs some space for bookkeeping - typically something like 4% of the
  filesystem size, more if you ask for a lot of inodes during mke2fs.
  For example:



  # sfdisk -s /dev/hda9
  4095976
  # mke2fs -i 1024 /dev/hda9
  mke2fs 1.12, 9-Jul-98 for EXT2 FS 0.5b, 95/08/09
  ...
  204798 blocks (5.00%) reserved for the super user
  ...
  # mount /dev/hda9 /somewhere
  # df /somewhere
  Filesystem         1024-blocks  Used Available Capacity Mounted on
  /dev/hda9            3574475      13  3369664      0%   /mnt
  # df -i /somewhere
  Filesystem           Inodes   IUsed   IFree  %IUsed Mounted on
  /dev/hda9            4096000      11 4095989     0%  /mnt
  #



  We have a partition with 4095976 blocks, make an ext2 filesystem on
  it, mount it somewhere and find that it only has 3574475 blocks -
  521501 blocks (12%) was lost to inodes and other bookkeeping.  Note
  that the difference between the total 3574475 and the 3369664 avail-
  able to the user are the 13 blocks in use plus the 204798 blocks
  reserved for root. This latter number can be changed by tune2fs.  This
  `-i 1024' is only reasonable for news spools and the like, with lots
  and lots of small files. The default would be:


       # mke2fs /dev/hda9
       # mount /dev/hda9 /somewhere
       # df /somewhere
       Filesystem         1024-blocks  Used Available Capacity Mounted on
       /dev/hda9            3958475      13  3753664      0%   /mnt
       # df -i /somewhere
       Filesystem           Inodes   IUsed   IFree  %IUsed Mounted on
       /dev/hda9            1024000      11 1023989     0%  /mnt
       #



  Now only 137501 blocks (3.3%) are used for inodes, so that we have 384
  MB more than before. (Apparently, each inode takes 128 bytes.)  On the
  other hand, this filesystem can have at most 1024000 files (more than
  enough), against 4096000 (too much) earlier.



  Linux From Scratch
  Gerard Beekmans

  Version 2.2, April 3rd, 2000

  This document describes the process of creating your own Linux system
  from scratch from an already installed Linux distribution, using noth-
  ing but the source code of software that we need

  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 What's this all about?
     1.2 New versions
     1.3 Version history
     1.4 Mailinglists
        1.4.1 Subscribing
        1.4.2 Unsubscribing
     1.5 Contact info

  2. Conventions used in this document

     2.1 About $LFS
     2.2 How to download the software
     2.3 How to install the software

  3. Packages you need to download

     3.1 Mandatory software
     3.2 Optional software

  4. Preparing the new system

     4.1 How we are going to do things
     4.2 Creating a new partition
     4.3 Creating an ext2 file system on the new partition
     4.4 Mounting the new partition
     4.5 Creating directories
     4.6 Copying the /dev directory

  5. Making the LFS system bootable

     5.1 Installing Sysvinit
     5.2 Configuring Sysvinit
     5.3 Creating passwd & group files
     5.4 Installing the Bash shell
     5.5 Adding an entry to LILO
     5.6 Testing the system

  6. Installing a kernel

     6.1 Note on ftp.kernel.org
     6.2 Configuring the kernel
     6.3 Updating LILO
     6.4 Testing the system

  7. Installing basic system software

     7.1 About debugging symbols
     7.2 Preparing LFS system for installing basic system software
        7.2.1 Installing Binutils
        7.2.2 Installing Bzip2
        7.2.3 Install Diffutils
        7.2.4 Installing Fileutils
        7.2.5 Installing GCC on the normal system if necessary
        7.2.6 Installing GCC on the LFS system
           7.2.6.1 Creating necessary symlinks
        7.2.7 Installing Glibc
           7.2.7.1 Copying old NSS Library files
        7.2.8 Installing grep
        7.2.9 Installing gzip
        7.2.10 Installing Make
        7.2.11 Installing Sed
        7.2.12 Installing Sh-utils
        7.2.13 Installing Tar
        7.2.14 Installing Textutils
        7.2.15 Installing Util-linux
     7.3 Installing basic systsem software
        7.3.1 Remounting partition and activating swap
        7.3.2 Installing GCC
        7.3.3 Installing Bison
        7.3.4 Installing Mawk
        7.3.5 Installing Findutils
        7.3.6 Installing Termcap
        7.3.7 Installing Ncurses
        7.3.8 Installing Less
        7.3.9 Installing Perl
        7.3.10 Installing M4
        7.3.11 Installing Texinfo
        7.3.12 Installing Autoconf
        7.3.13 Installing Automake
        7.3.14 Installing Bash
        7.3.15 Installing Flex
        7.3.16 Installing Binutils
        7.3.17 Installing Bzip2
        7.3.18 Installing Diffutils
        7.3.19 Installing E2fsprogs
        7.3.20 Installing File
        7.3.21 Installing Fileutils
        7.3.22 Installing Grep
        7.3.23 Installing Groff
        7.3.24 Installing Gzip
        7.3.25 Installing Ld.so
        7.3.26 Installing Libtool
        7.3.27 Installing Linux86
        7.3.28 Installing Lilo
        7.3.29 Installing Make
        7.3.30 Instaling Sh-Utils
        7.3.31 Installing Shadow Password Suite
        7.3.32 Installing Man
        7.3.33 Installing Modutils
        7.3.34 Installing Procinfo
        7.3.35 Installing Procps
        7.3.36 Installing Psmisc
        7.3.37 Installing Sed
        7.3.38 Installing start-stop-daemon
        7.3.39 Installing Sysklogd
        7.3.40 Installing Sysvinit
        7.3.41 Install Tar
        7.3.42 Installing Textutils
        7.3.43 Installing Vim
        7.3.44 Installing Util-linux
     7.4 Removing old NSS Library files
     7.5 Configuring the software
        7.5.1 Configuring Glib
        7.5.2 Configuring LILO
        7.5.3 Configuring Sysklogd
        7.5.4 Configuring Shadow Password Suite
        7.5.5 Configuring Sysvinit
        7.5.6 Creating /var/run/utmp file

  8. Creating system boot scripts

     8.1 Preparing the directories and master files
     8.2 Creating the reboot script
     8.3 Creating the halt script
     8.4 Creating the mountfs script
     8.5 Creating the umountfs script
     8.6 Creating the sendsignals script
     8.7 Creating the checkroot bootscript
     8.8 Creating the Sysklogd bootscript
     8.9 Setting up symlinks and permissions
     8.10 Creating the /etc/fstab file

  9. Setting up basic networking

     9.1 Installing Netkit-base
     9.2 Installing Net-tools
        9.2.1 Creating the /etc/init.d/localnet bootscript
        9.2.2 Setting up permissions and symlink
        9.2.3 Creating the /etc/hostname file
        9.2.4 Creating the /etc/hosts file
        9.2.5 Creating the /etc/init.d/ethnet file
        9.2.6 Setting up permissions and symlink for /etc/init.d/ethnet
        9.2.7 Testing the network setup
     9.3 Testing the system

  10. Installing Network Daemons

     10.1 Setting up SMTP
        10.1.1 Creating groups and user
        10.1.2 Creating directory
        10.1.3 Installing Sendmail
        10.1.4 Configuring Sendmail
        10.1.5 Installing Procmail
        10.1.6 Creating /etc/init.d/sendmail bootscript
        10.1.7 Setting up permissions and symlinks
     10.2 Setting up FTP
        10.2.1 Creating groups and users
        10.2.2 Installing Proftpd
        10.2.3 Creating the /etc/init.d/proftpd bootscript
        10.2.4 Setting up permissions and symlinks
     10.3 Setting up HTTP
        10.3.1 Installing Apache
        10.3.2 Configuring Apache
        10.3.3 Creating /etc/init.d/apache bootscript
        10.3.4 Setting up permissions and symlinks
     10.4 Setting up Telnet
        10.4.1 Installing telnet daemon + client
        10.4.2 Creating the /etc/inetd.conf configuration file
        10.4.3 Creating the /etc/init.d/inetd bootscript
        10.4.4 Setting up permissions and symlinks
     10.5 Setting up PPP
        10.5.1 Configuring the Kernel
        10.5.2 Creating group
        10.5.3 Installing PPP
        10.5.4 Creating /etc/resolv.conf
        10.5.5 Creating /etc/ppp/peers/provider
        10.5.6 Creating /etc/chatscripts/provider
        10.5.7 Note on password authentication

  11. Installing Network Clients

     11.1 Installing Email clients
        11.1.1 Installing Mailx
        11.1.2 Installing Mutt
        11.1.3 Installing Fetchmail
        11.1.4 Testing the email system
     11.2 Installing FTP client
        11.2.1 Installing Netkit-ftp
        11.2.2 Testing FTP system
     11.3 Installing HTTP client
        11.3.1 Installing Zlib
        11.3.2 Installing Lynx
        11.3.3 Testing HTTP system
     11.4 Installing Telnet client
        11.4.1 Testing Telnet system
     11.5 Installing PPP clients
        11.5.1 Creating the connect script
        11.5.2 Creating the disconnect script
        11.5.3 Testing PPP system

  12. Installing X Window System

     12.1 Installing X
     12.2 Creating /etc/ld.so.conf
     12.3 Creating the /usr/include/X11 symlink
     12.4 Creating the /usr/X11 symlink
     12.5 Adding /usr/X11/bin to the $PATH environment variable
     12.6 Configuring X
     12.7 Testing X
     12.8 Installing Window Maker
     12.9 Preparing the system for the Window Maker installation
        12.9.1 Installing libPropList
        12.9.2 Installing libXpm
        12.9.3 Installing libpng
        12.9.4 Installing libtiff
        12.9.5 Installing libjpeg
        12.9.6 Installing libungif
        12.9.7 Installing WindowMaker
     12.10 Updating dynamic loader cache
     12.11 Configuring WindowMaker
     12.12 Testing WindowMaker

  13. Resources

     13.1 Books
     13.2 HOWTOs
     13.3 Other

  14. The End

  15. Copyright & Licensing Information



  ______________________________________________________________________

  1.  Introduction

  1.1.  What's this all about?

  Having used a number of different Linux distributions, I was never
  fully satisfied with either of those. I didn't like the way the
  bootscripts were arranged, or I didn't like the way certain programs
  were configured by default and more of those things. I came to realize
  that when I want to be totally satisfied with a Linux system, I have
  to build my own Linux system from scratch.  Ideally only using the
  source code. No pre-compiled packages of any kind. No help from some
  sort of cdrom or bootdisk that would install some basic utilities.
  You would use your current Linux system and use that one to build your
  own.

  This, at one time, wild idea seemed very difficult and at times almost
  impossible. The reason for most problems were due to my lack of
  knowledge about certain programs and procedures. After sorted out all
  kinds of dependency problems, compilation problems, etcetera, a
  manually Linux system was created and fully operational. I called this
  system and LFS system which stands for LinuxFromScratch.

  1.2.  New versions

  The latest version of the document can always be found at
  http://www.linuxfromscratch.org
  1.3.  Version history

  2.1.5 - March 26th, 2000

  This is not a full list of modified things. Because v2.0 is a major
  release, only the major changes are mentioned and not the minor ones.


  o  Directory structure modified - LFS is FHS compliant now. Perhaps
     not 100%, but getting there.

  o  New Glibc installation method

  o  New GCC installation method

  o  Eliminated the need for the pre-compiled Debian packages.

  o  Totally revised software installation method - eliminated the need
     of all the statically linked packages in former chapter 6.1.

  o  Various bugs fixed in software installation

  o  Installed a few more programs from the util-linux package

  o  Added the installation of the Bzip2 program

  o  Explained in greater detail what the $LFS is all about - how to and
     how not to use it.

  o  Simplified installation procedures for all packages in chapters 5
     through 9.1

  o  Moved the installation of Glibc and GCC to chapter 7 in stead of
     having their own chapters which isn't necessary.

  o  Modified Internet servers chapter: separated into Network Daemons
     and Network Clients chapter. Internet chapter has merged with these
     two new chapters.

  o  Switched chapters 13 and 14 (X and Internet) and merged the
     chapters about X and Window Maker into chapter 14.

  o  We're using a new Man program. This one is easier to use and
     configure than the man-db one we previously used. Both versions
     perform nearly the same jobs.

  o  Added new chapter 13: Resources. This chapter contains a number of
     books and HOWTOs you'll find useful to read during or after
     building an LFS system.

  o  Chapter 3: Fixed bzip2 link

  o  Chapter 7.2.42: Simplified Util-Linux installation method

  o  Chapter 3.1: Changed procps location

  o  Chapter 7.2: Switched installation of Vim and Util-Linux (as we
     need an editor to install Util-Linux)

  o  Chapter 7.3.33: Fixed procps installation.

  o  Chapter 5.2: stripped inittab file so it won't complain about
     missing files at boot time.

  o  Chapter 6: Rewrote kernel installation

  o  Chapter 10.3: Fixed Apache bootscript

  o  Chapter 10.3.2: Removed section about modifying the httpd.conf
     file. No longer necessary. Added the addition of /usr/apache/man to
     the /usr/share/misc/man.conf file

  o  Chapter 11.1: Provided a fixed mailx package with a working
     Makefile file to simplify the installation procedure

  o  Chapter 11.3.1: Added the --shared switch to configure so that Zlib
     is installed as a dynamic library rather than a static one.

  o  Chapter 11.6: Have Lynx link against the Ncurses library in stead
     of the Slang.

  o  Chapter 12: The newer man-db already has the X11/man directory in
     it's man_db.config file

  2.2 - April 3rd, 2000


  o  The linuxfromscratch.org and linuxfromscratch.com domains are now
     operational.  All former links to huizen.dds.nl/~glb and
     tts.ookhoi.dds.nl have been replaced by the appropriate links on
     www.linuxfromscratch.org

  o  After the reboot in chapter 7.3, the swap partition is made active
     before we start compiling software.

  1.4.  Mailinglists

  There are two mailing lists you can subscribe to. The lfs-discuss and
  the lfs-announce list. The former is an open non-moderated list
  discussing anything that has got anything to do with this document.
  The latter is an open moderated list. Anybody can subscribe to it, but
  you cannot post messages to it (only the moderator(s) can do this).
  This list is primarily used for announcements of new versions of this
  document.

  If you're subscribed to the lfs-discuss list you don't need to be
  subscribed to the lfs-announce list as well. Everything that is sent
  over the lfs-announce list is also sent over the lfs-discuss list.

  1.4.1.  Subscribing

  To subscribe to a list, send an email to majordomo@fist.org and type
  in the body either subscribe lfs-discuss or subscribe lfs-announce

  Majordomo will send you a confirmation-request email. This email will
  contain an authentication code. Once you send this email back to
  Majordomo (instructions are provided in that email) you will be
  subscribed.

  1.4.2.  Unsubscribing

  To unsubscribe from a list, send an email to majordomo@fist.org and
  type in the the body either unsubscribe lfs-discuss or unsubscribe
  lfs-announce

  1.5.  Contact info

  Direct all your questions preferably to the mailing list. If you need
  to reach me personally, send an email to gerard@linuxfromscratch.org



  2.  Conventions used in this document

  2.1.  About $LFS

  Please read the following carefully: throughout this document you will
  frequently see the variable name $LFS. $LFS must at all times be
  replaced by the directory where the partition that contains the LFS
  system is mounted. How to create and where to mount the partition will
  be explained later on in full detail in chapter 4. In my case the LFS
  partition is mounted on /mnt/hda5. If I read this document myself and
  I see $LFS somewhere, I will pretend that I read /mnt/hda5. If I read
  that I have to run this command: cp inittab $LFS/etc I actually will
  run this: cp inittab /mnt/hda5/etc

  It's important that you do this no matter where you read it; be it in
  commands you enter on the prompt, or in some file you edit or create.

  If you want, you can set the environment variable LFS. This way you
  can literally enter $LFS in stead of replacing it by something like
  /mnt/hda5.  This is accomplished by running: export LFS=/mnt/hda5

  If I read cp inittab $LFS/etc, I literally can type cp inittab
  $LFS/etc and the shell will replace this command by cp inittab
  /mnt/hda5/etc automatically.

  Do not forget to set the LFS variable at all times. If you haven't set
  the variable and you use it in a command, $LFS will be ignored and
  whatever is left will be executed. The command cp inittab $LFS/etc
  without the LFS variable set, will result in copying the inittab file
  to the /etc directory which will overwrite your system's inittab. A
  file like inittab isn't that big a problem as it can easily be
  restored, but if you would make this mistake during the installation
  of the C Library, you can break your system badly and might have to
  reinstall it if you don't know how to repair it. So that's why I
  strongly advise against using the LFS variable. You better replace
  $LFS yourself by something like /mnt/hda5. If you make a typo while
  entering /mnt/hda5, the worst thing that can happen is that you'll get
  an error saying "no such file or directory" but it won't break your
  system. Don't say I didn't warn you ;)

  2.2.  How to download the software

  Throughout this document I will assume that you have stored all the
  packages you have downloaded in a subdirectory under $LFS/usr/src.

  I myself have use the convention of having a $LFS/usr/src/sources
  directory. Under sources you'll find the directory 0-9 and the
  directories a through z. A package as sysvinit-2.78.tar.gz is stored
  under $LFS/usr/src/sources/s/ A package as bash-3.02.tar.gz is stored
  under $LFS/usr/src/sources/b/ and so forth. You don't have to follow
  this convention of course, I was just giving an example. It's better
  to keep the packages out of $LFS/usr/src and move them to a
  subdirectory, so we'll have a clean $LFS/usr/src directory in which we
  will unpack the packages and work with them.

  The next chapter contains the list of all the packages you need to
  download, but the partition that is going to contain our LFS system
  isn't created yet.  Therefore store the files temporarily somewhere
  where you want and remember to copy them to
  $LFS/usr/src/<somesubdirectory> when you have finished chapter 4.

  2.3.  How to install the software

  Before you can actually start doing something with a package, you need
  to unpack it first. Often you will find the package files being tar'ed
  and gzip'ed (you can see this from a .tar.gz or .tgz extension). I'm
  not going to write down every time how to ungzip and how to untar an
  archive. I will tell you how to that once, in this paragraph. There is
  also the possibility that you have the possibility of downloading a
  .tar.bz2 file. Such a file is tar'ed and compressed with the bzip2
  program. Bzip2 achieves a better compression than the commonly used
  gzip does. In order to use bz2 archives you need to have the bzip2
  program installed. Most if not every distribution comes with this
  program so chances are high it is already installed on your system. If
  not, install it using your distribution's installation tool.


  o  Start by copying the package from wherever you have stored it to
     the $LFS/usr/src directory

  o  When you have a file that is tar'ed and gzip'ed, you unpack it by
     running: tar xvfz filename.tar.gz; rm filename.tar.gz or tar xvfz
     filename.tgz; rm filename.tgz

  o  When you have a file that is tar'ed and bzip'ed, you unpack it by
     running: tar --use-compress-prog=bzip2 -xvf filename.tar.bz2; rm
     filename.tar.bz2

  o  When you have a file that is only tar'ed, you unpack it by running
     tar xvf filename.tar; rm filename.tar

  Note that immediately after we have unpacked the archive, we delete
  the package file as we don't need it anymore. That's why you have to
  copy the file and not move it. If you move it and then delete it, you
  will need to re-download it when you need it again.

  When the archive is unpacked a new directory will be created under the
  current directory (and this document assumes that you unpack the
  archives under the $LFS/usr/src directory). You have to enter that new
  directory before you continue with the installation instructions. All
  the above will be summarized as 'Unpack the xxx archive'. So, when you
  read it, you copy the package to $LFS/usr/src, you run the tar program
  to ungzip/unbzip and untar it, then you enter the directory that was
  created and then you read the next line of the installation
  instructions.

  After you have installed a package you can do two things with it. You
  can either delete the directory that contains the sources or you can
  keep it. If you decide to keep it, that's fine by me. But if you need
  the same package again in a later chapter (all software up to chapter
  7.2 will be re-installed in chapter 7.3) you need to delete the
  directory first before using it again.  If you don't do this, you
  might end up in trouble because old settings will be used (settings
  that apply to your normal Linux system but which don't apply anymore
  when you have restarted your computer into the LFS system). Doing a
  simple make clean does not always guarantee a totally clean source
  tree. The configure script also has files lying around in various
  subdirectories which are rarely removed by the make clean process.

  3.  Packages you need to download

  Below is a list of all the software that you need to download for use
  in this document. I display the sites and directories where you can
  download the software, but it is up to you to make sure you download
  the source archive and the latest version. The version numbers
  correspondent to versions of the software that is known to work and
  which this document is going to be based on. If you experience
  problems which you can't solve yourself, download the version that is
  assumed in this document (in case you download a newer version).



  3.1.  Mandatory software

  Sysvinit (2.78) : ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/

  Bash (2.03) : ftp://ftp.gnu.org/gnu/bash/

  Linux Kernel (2.2.14) : ftp://ftp.kernel.org/pub/linux/kernel/

  Binutils (2.9.1) : ftp://ftp.gnu.org/gnu/binutils/

  Bzip2 (0.9.5d) : http://sourceware.cygnus.com/bzip2/

  Diff Utils (2.7) : ftp://ftp.gnu.org/gnu/diffutils/

  File Utils (4.0) : ftp://ftp.gnu.org/gnu/fileutils/

  GCC (2.95.2) : ftp://ftp.gnu.org/gnu/gcc/

  Glibc (2.1.3) : ftp://ftp.gnu.org/gnu/glibc/

  Glibc-crypt (2.1.2) : ftp://ftp.gwdg.de/pub/linux/glibc/

  Glibc-linuxthreads (2.1.3) : ftp://ftp.gnu.org/gnu/glibc/

  Grep (2.4) : ftp://ftp.gnu.org/gnu/grep/

  Gzip (1.2.4) : ftp://ftp.gnu.org/gnu/gzip/

  Make (3.78.1) : ftp://ftp.gnu.org/gnu/make/

  Sed (3.02) : ftp://ftp.gnu.org/gnu/sed/

  Shell Utils (2.0) : ftp://ftp.gnu.org/gnu/sh-utils/

  Tar (1.13) : ftp://ftp.gnu.org/gnu/tar/

  Text Utils (2.0) : ftp://ftp.gnu.org/gnu/textutils/

  Util Linux (2.10f) : ftp://ftp.win.tue.nl/pub/linux/utils/util-linux/

  Bison (1.28) : ftp://ftp.gnu.org/gnu/bison/

  Mawk (1.3.3) : ftp://ftp.whidbey.net/pub/brennan/

  Find Utils (4.1) : ftp://ftp.gnu.org/gnu/findutils/

  Ncurses (5.0) : ftp://ftp.gnu.org/gnu/ncurses/

  Less (340) : ftp://ftp.gnu.org/gnu/less/

  Perl (5.005_03) : ftp://ftp.gnu.org/gnu/perl/

  M4 (1.4) : ftp://ftp.gnu.org/gnu/m4/

  Texinfo (4.0) : ftp://ftp.gnu.org/gnu/texinfo/

  Autoconf (2.13) : ftp://ftp.gnu.org/gnu/autoconf/

  Automake (1.4) : ftp://ftp.gnu.org/gnu/automake/

  Flex (2.5.4a) : ftp://ftp.gnu.org/gnu/flex/

  E2fsprogs (1.18) : ftp://tsx-11.mit.edu/pub/linux/packages/ext2fs/

  File (3.26) :
  http://www.linuxfromscratch.org/download/file-3.26-lfs.tar.gz
  Groff (1.15) : ftp://ftp.gnu.org/gnu/groff/

  Ld.so (1.9.9) : ftp://tsx-11.mit.edu/pub/linux/packages/GCC/

  Libtool (1.3.4) : ftp://ftp.gnu.org/gnu/libtool/

  Linux86 (0.14.3) :
  http://www.linuxfromscratch.org/download/linux86-0.14.3-lfs.tar.gz

  Lilo (21) : ftp://sunsite.unc.edu/pub/Linux/system/boot/lilo/

  Shadow Password Suite (19990827) :
  ftp://piast.t19.ds.pwr.wroc.pl/pub/linux/shadow/

  Man (1.5h1) : ftp://ftp.win.tue.nl/pub/linux-local/utils/man/

  Modutils (2.3.9) : ftp://ftp.ocs.com.au/pub/modutils/

  Termcap (1.3) : ftp://ftp.gnu.org/gnu/termcap/

  Procinfo (17) : ftp://ftp.cistron.nl/pub/people/svm/

  Procps (2.0.6) : ftp://people.redhat.com/johnsonm/procps/

  Psmisc (19) : ftp://lrcftp.epfl.ch/pub/linux/local/psmisc/

  Start-stop-daemon (0.4.1) :
  http://www.linuxfromscratch.org/download/ssd-0.4.1-lfs.tar.gz

  Sysklogd (1.3.31) : ftp://sunsite.unc.edu/pub/Linux/system/daemons/

  Vim (5.6) : ftp://ftp.vim.org/pub/editors/vim/unix/

  3.2.  Optional software

  All software below is used in sections 13 and above and are not
  strictly necessary. You have to determine for yourself if you want to
  install certain packages. If, for example, you don't intend to go
  online with the LFS system, you might not want to install the email,
  telnet, ftp, www, etc. utilities.


  Netkit-base (0.17) :
  ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/

  Net-tools (1.54) : http://www.tazenda.demon.co.uk/phil/net-tools/

  Procmail (3.14) : ftp://ftp.procmail.org/pub/procmail/

  Sendmail (8.9.3) : ftp://ftp.sendmail.org/pub/sendmail/

  Mailx (8.1.1) :
  http://www.linuxfromscratch.org/download/mailx-8.1.1-fixed.tar.gz

  Mutt (1.0i) : ftp://ftp.mutt.org/pub/mutt/

  Fetchmail (5.2.0) : http://www.tuxedo.org/~esr/fetchmail/

  Netkit-telnet (0.17) :
  ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/

  Proftpd (1.2.0pre9) : ftp://ftp.tos.net/pub/proftpd/

  Netkit-ftp (0.17) :
  ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/

  Apache (1.3.11) : http://www.apache.org/dist/

  Zlib Library (1.1.3) : http://www.cdrom.com/pub/infozip/zlib/

  Lynx (2.8.2) : http://www.slcc.edu/lynx/release/

  PPP (2.3.11) : ftp://cs.anu.edu.au/pub/software/ppp/

  Xfree86 (3.3.5) : ftp://ftp.xfree86.org/pub/XFree86/

  libPropList (0.9.1) : ftp://ftp.windowmaker.org/pub/libs/

  libXpm (4.7) : ftp://sunsite.unc.edu/pub/Linux/libs/X/

  libpng (1.0.3) : http://www.cdrom.com/pub/png/

  libtiff (3.4) : ftp://ftp.sgi.com/graphics/tiff/

  libjpeg (6b) : http://www.ijg.org/

  libungif (4.1.0) : ftp://prtr-13.ucsc.edu/pub/libungif/

  WindowMaker (0.61.1) : ftp://ftp.windowmaker.org/pub/release/

  4.  Preparing the new system

  4.1.  How we are going to do things

  We are going to build the LFS system using an already installed Linux
  distribution such as Debian, SuSe, Slackware, Mandrake, RedHat, etc.
  You don't need to have any kind of bootdisk. We will use an existing
  Linux system as the base (since we need a compiler, linker, text
  editor and other tools).

  If you don't have Linux installed yet, you won't be able to put this
  document to use right away. I suggest you first install a Linux
  distribution. It really doesn't matter which one you install. It also
  doesn't need to be the latest version, though it shouldn't be a too
  old one. If it is about a year old or newer it'll do just fine. You
  will safe yourself a lot of trouble if your normal system uses
  glibc-2.0 or newer. Libc5 can cause some problems and is not supported
  in this document as I don't have access to such a machine anymore.

  4.2.  Creating a new partition

  Before we can build our new Linux system, we need to have an empty
  Linux partition on which we can build our new system. I recommend a
  partition size of at least 5 00 MB. You can get away with around 250MB
  for a bare system with no extra whistles and bells (such as software
  for emailing, networking, Internet, X Window System and such). If you
  already have a Linux Native partition available, you can skip this
  subsection.

  Start the fdisk program (or some other fdisk program if you prefer)
  with the appropriate hard disk as the option (like /dev/hda if you
  want to create a new partition on the primary master IDE disk). Create
  a Linux Native partition, write the partition table and exit the fdisk
  program. If you get the message that you need to reboot your system to
  ensure that that partition table is updated, then please reboot your
  system now before continuing. Remember what your new partition's
  designation is. It could be something like hda5 (as it is in my case).
  This newly created partition will be referred to as the LFS partition
  in this document.



  4.3.  Creating an ext2 file system on the new partition

  Once the partition is created, we have to create a new ext2 file
  system on that partition. To create a new ext2 file system we use the
  mke2fs command.  Enter the new partition as the only option and the
  file system will be created.  If your partition was hda5, you would
  run the command as mke2fs /dev/hda5

  4.4.  Mounting the new partition

  Once we have created the ext2 file system, it is ready for use. All we
  have to do to be able to access it (as in reading from and writing
  date to it) is mounting it. If you mount it under /mnt/hda5, you can
  access this partition by going to the /mnt/hda5 directory and then do
  whatever you need to do. This document will assume that you have
  mounted the partition on a subdirectory under /mnt. It doesn't matter
  which subdirectory you choose (or you can use just the /mnt directory
  as the mounting point), but a good practice is to create a directory
  with the same name as the partition's designation. In my case the LFS
  partition is called hda5 and therefore I mount it on /mnt/hda5


  o  Create the /mnt directory if it doesn't exist yet

  o  Create the /mnt/xxx directory where xxx is to be replaced by your
     LFS partition's designation.

  o  Mount the LFS partition by running: mount /dev/xxx /mnt/xxx and
     replace xxx by your LFS partition's designation.

  This directory (/mnt/xxx) is the $LFS you have read about earlier.  So
  if you read somewhere to "cp inittab $LFS/etc" you actually will type
  "cp inittab /mnt/xxx/etc" where xxx is replaced by your partition's
  designation.

  4.5.  Creating directories

  Let's create the directory tree on the LFS partition according to the
  FHS standard which can be found at http://www.pathname.com/fhs/.
  Issuing the following commands will create the necessary directories.


  cd $LFS
  mkdir bin boot dev etc home lib mnt proc root sbin tmp usr var
  cd $LFS/usr
  mkdir bin include lib sbin share src
  ln -s share/man man
  ln -s share/doc doc
  ln -s . local
  ln -s ../etc etc
  ln -s ../var var
  cd $LFS/usr/share
  mkdir dict doc info locale man nls misc terminfo zoneinfo
  cd $LFS/usr/share/man
  mkdir man1 man2 man3 man4 man5 man6 man7 man8
  cd $LFS/var
  mkdir lock log run spool tmp



  Now that the directories are created, copy the source files you have
  downloaded in chapter 3 to some subdirectory under $LFS/usr/src (you
  will need to create this subdirectory yourself).


  4.6.  Copying the /dev directory

  We can create every single file that we need to be in the $LFS/dev
  directory using the mknod command, but that just takes up a lot of
  time. I choose to just simply copy the current /dev directory to the
  $LFS partition.  Use this command to copy the entire directory while
  preserving original rights, symlinks and ownerships:


  cp -av /dev $LFS
  chown root.root $LFS/dev/*



  5.  Making the LFS system bootable

  5.1.  Installing Sysvinit

  Under normal circumstances, after the kernel is done loading and
  initializing various system components, it attempts to load a program
  called init which will finalize the system boot process. The package
  found on most if not every single Linux system is called Sysvinit and
  that's the program we're going to install on our LFS system.


  o  Unpack the Sysvinit archive

  o  Enter the src directory

  o  Edit the Makefile file

  o  Somewhere in this file, but before the rule all: put this line:
     ROOT = $LFS

  o  Precede every /dev on the last four lines in this file by $(ROOT)

  After applying the $(ROOT) parts to the last four lines, they should
  look like this:


     @if [! -p $(ROOT)/dev/initctl ]; then \
     echo "Creating $(ROOT)/dev/initctl"; \
     rm -f $(ROOT)/dev/initctl; \
     mknod -m 600 $(ROOT)/dev/initctl p; fi



  o  Install the package by running:


  make -e LDFLAGS=-static; make install



  5.2.  Configuring Sysvinit

  In order for Sysvinit to work, we need to create it's configuration
  file.  Create the $LFS/etc/inittab file containing the following:



  # Begin /etc/inittab

  id:2:initdefault:

  ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

  1:2345:respawn:/sbin/sulogin

  # End /etc/inittab



  5.3.  Creating passwd & group files

  As you can see from the inittab file, when we boot the system, init
  will start the sulogin program and sulogin will ask you for user
  root's password.  This means we need to have at least a passwd file
  present on the LFS system.


  o  Create the $LFS/etc/passwd file containing the following:
     root:s394ul1Bkvmq2:0:0:root:/root:/bin/bash

  o  Create the $LFS/etc/group file containing the following: root::0:

  The encoded password string above is: lfs123

  When you logon to your LFS system, enter lfs123 when asked to enter
  user root's password.

  5.4.  Installing the Bash shell

  When sulogin asks you for the root password and you've entered the
  password, a shell needs to be started. Usually this is the bash shell.
  Since there are no libraries installed yet, we need to link bash
  statically, just like we did with Sysvinit.


  o  Unpack the Bash archive

  o  Install Bash by running:


  ./configure --enable-static-link
  make; make -e prefix=$LFS/usr install
  mv $LFS/usr/bin/bash $LFS/bin
  cd $LFS/bin; ln -s bash sh



  5.5.  Adding an entry to LILO

  In order to being able to boot from this partition, we need to update
  our /etc/lilo.conf file. Add the following lines to lilo.conf:


  image=<currently used image>
     label=<label>
     root=$LFS
     read-only



  Replace <currently used image> by the kernel image file that you are
  using to boot your normal Linux system. <label> can be anything you
  want it to be. I named the label "lfs" What you enter as <label> is
  what you enter at the LILO-prompt when you choose with system to boot.

  Now run the lilo program to update the boot loader.

  5.6.  Testing the system

  After you've completed this section, we can test the system by
  rebooting into LFS and see if we can log on to it. When you reboot and
  are at the LILO prompt, enter the label you have entered in the
  lilo.conf file to start the LFS system. Then enter root's password and
  you should be on the bash-prompt now. You won't be able to shutdown
  the system with a program like shutdown.  Although the program is
  present, it will give you the following error: "You don't exist. Go
  away." when you try to use the program. The meaning of this error is
  that the system isn't able to locate the password file. Although the
  shutdown program is statically linked against the libraries it needs,
  it still depends on the NSS Library (Name Server Switch) which is part
  of the GNU C Library, which will be installed in a later chapter. This
  NSS library passes on information where (in this case) the passwd file
  can be found.

  For now you can reboot the system using the reboot -f command. This
  will bypass shutting down the system using the shutdown program and
  reboot immediately.  Since the file system is mounted read-only this
  will not harm our system in any way (though you might get a warning
  next time you try to mount the system that it wasn't unmounted cleanly
  the last time and that you should run e2fsck to make sure the file
  system is still intact).

  6.  Installing a kernel

  6.1.  Note on ftp.kernel.org

  In section 2 above I mentioned you can download a new kernel from
  ftp://ftp.kernel.org/ However, this site is often too busy to get
  through and the maintainers of this site encourage you to download the
  kernel from a location near you. You can access a mirror site by going
  to ftp://ftp.<country code>.kernel.org/ (like ftp.ca.kernel.org).

  6.2.  Configuring the kernel


  o  Rename the current /usr/src/linux directory to something else
     (/usr/src/linux can be a symlink rather than an actual directory.
     Either way, rename it) by running mv /usr/src/linux /usr/src/linux-
     old

  o  Remove /usr/include/linux and /usr/include/asm by running rm -r
     /usr/include/linux /usr/include/asm

  o  Unpack the Kernel archive in the /usr/src/ directory (this will
     create a new /usr/src/linux directory)

  o  Create the /usr/include/linux and /usr/include/asm symlinks by
     running:


  cd /usr/include
  ln -s ../src/linux/include/linux linux
  ln -s ../src/linux/include/asm-<cpu> asm



  Look in the /usr/src/linux/include directory and see which asm-*
  directories are present. Choose the correct one for your platform. If
  you're on an Intel platform, you'd run ln -s ../src/linux/include/asm-
  i386 asm


  o  Choose a method to configure the kernel (see the README file for
     more details on configuration methods) and make sure you don't
     configure anything as modules at this point. This is because we
     won't have the necessary software available to load kernel modules
     for a while.

  o  After you're done with your kernel configuration, run make dep

  o  Compile the kernel by running make bzImage

  o  Copy the arch/<cpu>/boot/bzImage file to the /boot directory (or
     some place else if your Linux system uses a different convention
     where kernel images and the like are stored)

  o  Optionally you can rename the /boot/bzImage file to something like
     /boot/lfskernel

  o  Copy the entire kernel source tree to the LFS partition by running:
     cp -av /usr/src/linux $LFS/usr/src

  o  Create the $LFS/usr/include/linux and $LFS/usr/include/asm symlinks
     by running:


  cd $LFS/usr/include
  ln -s ../src/linux/include/linux linux
  ln -s ../src/linux/include/asm asm



  6.3.  Updating LILO


  o  Edit the /etc/lilo.conf file and go to the LFS section

  o  Change the image name to lfskernel (or whatever you've named the
     originally called bzImage file)

  o  Run lilo to update the boot loader.

  6.4.  Testing the system

  Reboot your system and start your LFS system. Verify that the newly
  installed kernel doesn't perform out-of-the-ordinary actions (such as
  crashing).

  7.  Installing basic system software

  In this chapter we will install all the software that belongs to a
  basic Linux system. After you're done with this chapter you have a
  fully working Linux system. The remaining chapters deals with optional
  issues such as setting up networking, Internet servers + clients
  (telnet, ftp, http, email), setting up Internet itself and the X
  Window System. You can skip chapters at your own discretion. If you
  don't plan on going online with the LFS system there's little use to
  setup Internet for example.

  There are a number of packages that need to be already installed
  before we can start installing all the basic system software. A
  typical configure scripts needs programs like rm, grep, sed, mv, cat,
  cp, diff. You need to be able to ungzip and untar archives, you need
  to link programs after you have compiled the objects files. All these
  (and a few more) programs needs to be available before we can install
  anything else. These programs are going to be linked statically. The
  reasoning behind this is that your normal Linux system may have a
  different C Library version than the LFS system is going to have.  The
  programs you install in this section will be linked against the C
  Library of your normal Linux system. This may cause library conflicts
  if you run those programs on the LFS system. Therefore we have to link
  those programs statically.  During the installation of the basic
  system software set, we will re-install the statically linked software
  so that they are linked dynamically against the C library on the LFS
  system.

  7.1.  About debugging symbols

  Every program and library is default compiled with debugging symbols.
  This means you can run a program or library through a debugger and the
  debugger's output will be more user friendly. These debugging symbols
  also enlarge the program or binary significantly. This document will
  not install software without debugging symbols (as I don't know if the
  majority of readers do or don't debug software). In stead, you can
  remove those symbols manually if you want with the strip program.

  To remove debugging symbols from a binary (must be an a.out or ELF
  binary) run strip --strip-debug filename You can use wild cards if you
  need to strip debugging symbols from multiple files (use something
  like strip --strip-debug $LFS/usr/bin/*).

  Before you wonder if these debugging symbols would make a big
  difference, here are some statistics:


  o  A static Bash binary with debugging symbols: 2.3MB

  o  A static Bash binary without debugging symbols: 645KB

  o  A dynamic Bash binary with debugging symbols: 1.2MB

  o  A dynamic Bash binary without debugging symbols: 478KB

  o  $LFS/usr/lib (glibc and gcc files) with debugging symbols: 87MB

  o  $LFS/usr/lib (glibc and gcc files) without debugging symbols: 16MB

  Sizes may vary depending on which compiler has been used and which C
  library version is used to link dynamic programs against, but your
  results will be very similar if you compare programs with and without
  debugging symbols. After I was done with this chapter and stripped all
  debugging symbols from all LFS binaries and libraries I regained a
  little over 102 MB of disk space. Quite the difference. The difference
  would be even greater when I would do this at the end of this document
  when everything is installed.

  7.2.  Preparing LFS system for installing basic system software

  7.2.1.  Installing Binutils


  o  Unpack the binutils archive

  o  Install the package by running:



  ./configure
  make -e LDFLAGS=-all-static
  make -e prefix=$LFS/usr install



  7.2.2.  Installing Bzip2


  o  Unpack the Bzip2 archive

  o  Edit the Makefile file in a text editor

  o  Find the lines that start with : $(CC) $(CFLAGS) -o

  o  Replace those parts with: $(CC) $(CFLAGS) $(LDFLAGS) -o

  o  Install the package by running:


  make -e LDFLAGS=-static
  make -e PREFIX=$LFS/usr install
  cd $LFS/usr/bin
  mv bunzip2 bzip2 $LFS/bin



  7.2.3.  Install Diffutils


  o  Unpack the diffutils archive

  o  Install the package by running:


  ./configure
  make -e LDFLAGS=-static
  make -e prefix=$LFS/usr install



  This package is known to cause static linking problems on certain
  platforms.  If you're having trouble compiling this package as well,
  you can download a fixed package from
  http://www.linuxfromscratch.org/download/diffutils-2.7-fixed.tar.gz

  7.2.4.  Installing Fileutils


  o  Unpack the fileutils archive

  o  Install the package by running:


  ./configure --disable-nls
  make -e LDFLAGS=-static
  make -e prefix=$LFS/usr install
  cd $LFS/usr/bin
  mv chgrp chmod chown cp dd df ln ls mkdir mknod mv rm rmdir sync $LFS/bin



  7.2.5.  Installing GCC on the normal system if necessary

  In order to compile Glibc-2.1.3 you need to have gcc-2.95.2 installed.
  Any version from 2.8 and up would do, but 2.95.2 is recommended. Many
  glibc-2.0 based systems have gcc-2.7.2.3 installed and you can't
  compile glibc-2.1 with that compiler. Therefore we will install
  gcc-2.95.2. also on the normal system, but without overwriting the
  existing compiler. Before you install gcc on your normal system, make
  sure whether you need it or not. Run gcc --version and check if the
  version number it reports equals or is higher than 2.8. If not, you
  need to install gcc-2.95.2. If you experience difficulties compiling
  glibc later on, you might want to install gcc-2.95.2 anyways.


  o  Unpack the GCC archive

  o  Install the package by running:


  mkdir $LFS/usr/src/gcc-build; cd $LFS/usr/src/gcc-build
  ../gcc-2.95.2/configure --prefix=/usr/gcc2952 \
  --with-local-prefix=/usr/gcc2952 --with-gxx-include-dir=/usr/gcc2952/include/g++ \
  --enable-shared --enable-languages=c,c++
  make bootstrap; make install



  7.2.6.  Installing GCC on the LFS system


  o  Unpack the GCC archive

  o  Install the package by running:


  mkdir $LFS/usr/src/gcc-build;cd $LFS/usr/src/gcc-build
  ../gcc-2.95.2/configure --enable-languages=c --disable-nls
  make -e LDFLAGS=-static bootstrap
  make -e prefix=$LFS/usr local_prefix=$LFS/usr install



  7.2.6.1.  Creating necessary symlinks

  The system needs a few symlinks to ensure every program is able to
  find the compiler and the pre-processor. Some programs run the cc
  program, others run the gcc program, some programs expect the cpp
  program to be in /lib (which is /usr/lib on the LFS system) and others
  expect to find it in /usr/bin.


  o  Create those symlinks by running:


  cd $LFS/lib; ln -s ../usr/lib/gcc-lib/<host>/2.95.2/cpp cpp
  cd $LFS/usr/lib; ln -s gcc-lib/<host>/2.95.2/cpp cpp
  cd $LFS/usr/bin; ln -s gcc cc



  Replace <host> with the directory where the gcc-2.95.2 files were
  installed (i686-unknown-linux in my case). You will most likely find
  two different directories.
  7.2.7.  Installing Glibc

  A note on the glibc-crypt package:


  -*-*-*-*-*-
  The add-on is not included in the main distribution of the GNU
  C library because some governments, mostly notable those of
  France, Russia and the US, have very restrictive rules
  governing the distribution and use of encryption software.
  Please read the node "Legal Problems" in the manual for more
  details.

  In particular, the US does not allow export of this software
  without a license, including via the Internet. So please do not
  download it from the main FSF FTP site at ftp.gnu.org if you
  are outside of the US. This software was completely developed
  outside the US.
  -*-*-*-*-*-



  "This software" refers to the glibc-crypt package at
  ftp://ftp.gwdg.de/pub/linux/glibc/.  This law only affects people who
  don't live in the US. It's not prohibited to import DES software, so
  if you live in the US you can import it from that German site.


  o  Unpack the Glibc archive

  o  Copy the glibc-crypt and glibc-linuxthreads archives into the
     unpacked glibc directory

  o  Unpack the glibc-crypt and glibc-linuxthreads there, but don't
     enter these directories. Just ungzip and untar them.

  o  Create a new file configparms containing:


  # Begin configparms
  slibdir=/lib
  sysconfdir=/etc
  # End configparms



  o  If your normal system already had a gcc version suitable to compile
     glibc with, install the package by running:


  mkdir $LFS/usr/src/glibc-build;cd $LFS/usr/src/glibc-build
  ../glibc-2.1.3/configure --enable-add-ons
  make; make install_root=$LFS install



  o  If your normal didn't had a suitable gcc version and you installed
     gcc-2.95.2 on your normal system, install the package by running:



  mkdir $LFS/usr/src/glibc-build; cd $LFS/usr/src/glibc-build
  CC=/usr/gcc2952/bin/gcc ../glibc-2.1.3/configure --enable-add-ons
  make; make install_root=$LFS install



  7.2.7.1.  Copying old NSS Library files

  If your normal Linux system runs libc-2.0.x, you need to copy the NSS
  library files to the LFS partition. Certain statically linked programs
  still depend on the NSS library, especially programs that need to
  lookup usernames, userid's and groupid's. You can check which C
  Library version your normal Linux system uses by running: ls -l
  libc.so.*

  Your system uses glibc-2.0 if the output looks like: /lib/libc.so.6 ->
  libc-2.0.7.so

  Your system uses glibc-2.1 is the output looks like: /lib/libc.so.6 ->
  libc-2.1.2.so

  If your have a libc-2.0.x.so file (where x is the micro version number
  such as 7) copy the NSS Library files by running: cp -av /lib/*nss*
  $LFS/lib

  7.2.8.  Installing grep


  o  Unpack the grep archive

  o  Install the package by running:


  ./configure --disable-nls
  make -e LDFLAGS=-static
  make -e prefix=$LFS/usr install



  This package is known to cause static linking problems on certain
  platforms.  If you're having trouble compiling this package as well,
  you can download a fixed package from
  http://www.linuxfromscratch.org/download/grep-2.4-fixed.tar.gz

  7.2.9.  Installing gzip


  o  Unpack the gzip archive

  o  Install the package by running:


  ./configure
  make -e LDFLAGS=-static
  make -e prefix=$LFS/usr install
  cd $LFS/usr/bin
  mv gunzip gzip $LFS/bin



  This package is known to cause compilation problems on certain
  platforms.  If you're having trouble compiling this package as well,
  you can download a fixed package from
  http://www.linuxfromscratch.org/download/gzip-1.2.4-fixed.tar.gz

  7.2.10.  Installing Make


  o  Unpack the Make archive

  o  Install the package by running:


  ./configure
  make -e LDFLAGS=-static
  make -e prefix=$LFS/usr install



  7.2.11.  Installing Sed


  o  Unpack the sed archive

  o  Install the package by running:


  ./configure
  make -e LDFLAGS=-static
  make -e prefix=$LFS/usr install
  mv $LFS/usr/bin/sed $LFS/bin



  This package is known to cause static linking problems on certain
  platforms.  If you're having trouble compiling this package as well,
  you can download a fixed package from
  http://www.linuxfromscratch.org/download/sed-3.02-fixed.tar.gz

  7.2.12.  Installing Sh-utils


  o  Unpack the sh-utils archive

  o  Install the package by running:


  ./configure --disable-nls
  make -e LDFLAGS=-static
  make -e prefix=$LFS/usr install
  cd $LFS/usr/bin
  mv date echo false pwd stty su true uname hostname $LFS/bin



  7.2.13.  Installing Tar


  o  Unpack the tar archive

  o  Install the package by running:



  ./configure --disable-nls
  make -e LDFLAGS=-static
  make -e prefix=$LFS/usr install
  mv $LFS/usr/bin/tar $LFS/bin



  7.2.14.  Installing Textutils


  o  Unpack the textutils archive

  o  Install the package by running:


  ./configure --disable-nls
  make -e LDFLAGS=-static
  make -e prefix=$LFS/usr install
  mv $LFS/usr/bin/cat $LFS/bin



  7.2.15.  Installing Util-linux


  o  Unpack the util-linux archive

  o  Install the package by running:


  ./configure
  cd lib;make
  cd ../mount;make -e LDFLAGS=-static
  cp mount umount $LFS/bin
  cp swapon $LFS/sbin



  7.3.  Installing basic systsem software

  The installation of all the software is pretty straightforward and
  you'll think it's so much easier and shorter to give the generic
  installation instructions for each package and only explain how to
  install something if a certain package requires an alternate
  installation method. Although I agree with you on this aspect, I,
  however, choose to give the full instructions for each and every
  package. This is simply to avoid any possible confusion and errors.
  Before you continue with this document you have to restart your system
  and boot into the LFS system. But before you do that, you need to
  determine which partition is used as your swap partition. This
  information can usually be found in the /etc/fstab file. Check this
  file for a line similar to this one: /dev/hda6 none swap sw 0 0

  The 4th field in a line must contain 'sw'. That line represents a swap
  partition. All you need to remember is it's designation (which is
  /dev/hda6 in my case but this will probably be different on your
  system). When you have determined which partition is the swap
  partition, you can reboot your computer now and continue from here.

  7.3.1.  Remounting partition and activating swap

  Before the software can be installed we need to remount the partition
  in read-write mode. Also, we need to activate the swap partition so
  that we won't risk running out of memory during large compilation
  processes (such as compiling gcc):


  mount -o remount,rw / /
  /sbin/swapon <swap device>



  7.3.2.  Installing GCC


  o  Unpack the GCC archive and install it by running:


  mkdir $LFS/usr/src/gcc-build;cd $LFS/usr/src/gcc-build
  ../gcc-2.95.2/configure --with-gxx-include-dir=/usr/include/g++ \
  --enable-shared --enable-languages=c,c++
  make bootstrap; make install



  7.3.3.  Installing Bison


  o  Unpack the bison archive and install it by running:


  ./configure --datadir=/usr/share/bison
  make; make install



  7.3.4.  Installing Mawk


  o  Unpack the mawk archive and install it by running:


  ./configure
  make; make install
  cd /usr/bin; ln -s mawk awk



  7.3.5.  Installing Findutils


  o  Unpack the findutils archive and install it by running:


  ./configure
  make; make install



  This package is known to cause compilation problems. If you're having
  trouble compiling this package as well, you can download a fixed
  package from
  http://www.linuxfromscratch.org/download/findutils-4.1-fixed.tar.gz

  7.3.6.  Installing Termcap


  o  Unpack the Termcap archive and install it by running:


  ./configure
  make; make install



  7.3.7.  Installing Ncurses


  o  Unpack the ncurses archive and install it by running:


  ./configure --with-shared
  make; make install



  7.3.8.  Installing Less


  o  Unpack the Less archive and install it by running:


  ./configure
  make; make install
  mv /usr/bin/less /bin



  7.3.9.  Installing Perl


  o  Unpack the Perl archive and install it by running:


  ./Configure
  make; make install



  Note that we skip the 'make test' step. This is because at this moment
  the system isn't ready yet for running the perl test. At this time
  we'll trust that perl compiled fine.

  7.3.10.  Installing M4


  o  Unpack the M4 archive and install it by running:


  ./configure
  make; make install



  7.3.11.  Installing Texinfo


  o  Unpack the Texinfo archive and install it by running:


  ./configure
  make; make install



  7.3.12.  Installing Autoconf


  o  Unpack the Autoconf archive and install it by running:


  ./configure
  make; make install



  7.3.13.  Installing Automake


  o  Unpack the Automake archive and install it by running:


  ./configure
  make install



  7.3.14.  Installing Bash


  o  Unpack the Bash archive and install it by running:


  ./configure
  make; make install
  mv /usr/bin/bash /bin



  7.3.15.  Installing Flex


  o  Unpack the Flex archive and install it by running:


  ./configure
  make; make install



  7.3.16.  Installing Binutils


  o  Unpack the Binutils archive and install it by running:

  ./configure
  make; make install



  7.3.17.  Installing Bzip2


  o  Unpack the Bzip2 archive and install it by running:


  make; make install
  cd /usr/bin; mv bunzip2 bzip2 /bin



  7.3.18.  Installing Diffutils


  o  Unpack the Diffutils archive and install it by running:


  ./configure
  make; make install



  7.3.19.  Installing E2fsprogs


  o  Unpack the E2fsprogs archive and install it by running:


  ./configure
  make; make install
  mv /usr/sbin/mklost+found /sbin



  7.3.20.  Installing File


  o  Unpack the File archive and install it by running:


  ./configure
  make; make install



  7.3.21.  Installing Fileutils


  o  Unpack the Fileutils archive and install it by running:



  ./configure
  make; make install
  cd /usr/bin
  mv chgrp chmod chown cp dd df ln ls mkdir mknod mv rm rmdir sync /bin



  7.3.22.  Installing Grep


  o  Unpack the Grep archive and install it by running:


  ./configure
  make; make install



  7.3.23.  Installing Groff


  o  Unpack the Groff archive and install it by running:


  ./configure
  make; make install



  7.3.24.  Installing Gzip


  o  Unpack the Gzip archive and install it by running:


  ./configure
  make; make install
  cd /usr/bin; mv z* gunzip gzip /bin



  7.3.25.  Installing Ld.so


  o  Unpack the Ld.so archive and install it by running:


  cd util; make ldd ldconfig
  cp ldd /bin; cp ldconfig /sbin
  rm /usr/bin/ldd



  7.3.26.  Installing Libtool


  o  Unpack the Libtool archive and install it by running:



  ./configure
  make; make install



  7.3.27.  Installing Linux86


  o  Unpack the Linux86 archive and install it by running:


  cd as
  make; make install
  cd ../ld
  make ld86; make install



  7.3.28.  Installing Lilo


  o  Unpack the Lilo archive and install it by running:


  make; make install



  7.3.29.  Installing Make


  o  Unpack the Make archive and install it by running:


  ./configure
  make; make install



  7.3.30.  Instaling Sh-Utils


  o  Unpack the Sh-utils archive and install it by running:


  ./configure
  make; make install
  cd /usr/bin
  mv date echo false pwd stty su true uname hostname /bin



  7.3.31.  Installing Shadow Password Suite


  o  Unpack the Shadow archive and install it by running:



  ./configure
  make; make install
  cd etc
  cp limits login.access login.defs.linux shells suauth /etc
  mv /etc/login.defs.linux /etc/login.defs
  cd /usr/sbin
  mv chpasswd dpasswd groupadd groupdel groupmod logoutd mkpasswd \
  newusers useradd userdel usermod grpck pwck vipw grpconv grpunconv \
  pwconv pwunconv /sbin



  7.3.32.  Installing Man


  o  Unpack the Man archive and install it by running:


  ./configure -default
  make all; make install



  7.3.33.  Installing Modutils


  o  Unpack the Modutils archive and install it by running:


  ./configure
  make; make install



  7.3.34.  Installing Procinfo


  o  Unpack the Procinfo archive and install it by running:


  make; make install



  7.3.35.  Installing Procps


  o  Unpack the Procps archive and install it by running:


  gcc -O3 -Wall -Wno-unused -c watch.c
  make; make -e XSCPT="" install
  mv /usr/bin/kill /bin



  7.3.36.  Installing Psmisc


  o  Unpack the Psmisc archive and install it by running:

  make; make install



  7.3.37.  Installing Sed


  o  Unpack the Sed archive and install it by running:


  ./configure
  make; make install
  mv /usr/bin/sed /bin



  7.3.38.  Installing start-stop-daemon


  o  Unpack the start-stop-daemon archive and install it by running:


  make start-stop-daemon
  cp start-stop-daemon /sbin
  cp start-stop-daemon.8 /usr/share/man/man8



  7.3.39.  Installing Sysklogd


  o  Unpack the Sysklogd archive and install it by running:


  make; make install



  7.3.40.  Installing Sysvinit


  o  Unpack the Sysvinit archive and install it by running:


  cd src
  make; make install



  7.3.41.  Install Tar


  o  Unpack the Tar archive and install it by running:


  ./configure
  make; make install
  mv /usr/bin/tar /bin



  7.3.42.  Installing Textutils


  o  Unpack the Textutils archive and install it by running:


  ./configure
  make; make install
  mv /usr/bin/cat /bin



  7.3.43.  Installing Vim


  o  Unpack the Vim-rt and Vim-src archives and install it by running:


  ./configure
  make; make install



  7.3.44.  Installing Util-linux


  o  Unpack the Util-linux package

  o  Edit the MCONFIG file, find and modify the following variables as
     follows:


  HAVE_PASSWD=yes
  HAVE_SLN=yes
  HAVE_TSORT=yes



  o  Install the package by running:


  groupadd -g 5 tty
  ./configure
  make; make install



  7.4.  Removing old NSS Library files

  If you have copied the NSS Library files from your normal Linux system
  to the LFS system (because your normal system runs glibc-2.0) it's
  time to remove them now by running:


  rm /lib/libnss*.so.1 /lib/libnss*2.0*



  7.5.  Configuring the software

  Now that all software is installed, all that we need to do to get a
  few programs running properly is to create their configuration files.

  7.5.1.  Configuring Glib

  We need to create the /etc/nsswitch.conf file. Although glibc should
  provide defaults when this file is missing or corrupt, it's defaults
  don't work work well with networking which will be dealt with in a
  later chapter. Also, our timezone needs to be setup.


  o  Create a new file /etc/nsswitch.conf containing:


  # Begin /etc/nsswitch.conf
  passwd: files
  group: files
  shadow: files

  hosts: files dns
  networks: files

  protocols: db files
  services: db files
  ethers: db files
  rpc: db files

  netgroup: db files
  # End /etc/nsswitch.conf



  o  Run the tzselect script and answer the questions regarding your
     timezone

  o  When you're done, the program will give you the file location you
     need.

  o  Create the localtime symlink by running: ln -s
     /usr/share/zoneinfo/<tzselect's output> /etc/localtime

  tzselect's output can be something like "EST5EDT" or "Canada/Eastern".
  The symlink you would create with that information would be ln -s
  /usr/share/zoneinfo/EST5EDT /etc/localtime or ln -s
  /usr/share/zoneinfo/Canada/Eastern /etc/localtime

  7.5.2.  Configuring LILO

  We're not going to create lilo's configuration file from scratch, but
  we'll use the file from your normal Linux system. This file is
  different on every machine and thus I can't create it here. Since you
  would want to have the same options regarding lilo as you have when
  you're using your normal Linux system you would create the file
  exactly as it is on the normal system.


  o  Create the /mnt/original directory

  o  Mount your normal Linux system on this mount point by running mount
     /dev/xxx /mnt/original (replace /dev/xxx with your normal
     partition's designation).

  o  Copy the lilo configuration file and kernel images that lilo uses
     by running:


  cp /mnt/original/etc/lilo.conf /etc
  cp /mnt/original/boot/* /boot



  If your normal Linux system does not have (all of) it's kernel images
  in /mnt/original/boot, then check your /etc/lilo.conf file for the
  location of those files and copy those as well to the location where
  /etc/lilo.conf expects them to be. Or you can copy them to /boot
  regardless and modify the /etc/lilo.conf file so it contains the new
  paths for the images as you have them on the LFS system. Either way
  works fine, it's up to you how you want to do it.

  7.5.3.  Configuring Sysklogd


  o  Create the /var/log directory by running: mkdir /var/log

  o  Create the /etc/syslog.conf file containing the following:


  # Begin /etc/syslog.conf

  auth,authpriv.* -/var/log/auth.log
  *.*;auth,authpriv.none -/var/log/sys.log
  daemon.* -/var/log/daemon.log
  kern.* -/var/log/kern.log
  mail.* -/var/log/mail.log
  user.* -/var/log/user.log
  *.emerg *

  # End /etc/syslog.conf



  7.5.4.  Configuring Shadow Password Suite

  This package contains the utilities to modify user's passwords, add
  new users/groups, delete users/groups and more. I'm not going to
  explain to you what 'password shadowing' means. You can read all about
  that in the doc/HOWTO file. There's one thing you should keep in mind,
  if you decide to use shadow support, that programs that need to verify
  passwords (examples are xdm, ftp daemons, pop3d, etc) need to be
  'shadow-compliant', eg. they need to be able to work with shadowed
  passwords.

  If you decide you don't want to use shadowed passwords (after you're
  read the doc/HOWTO document), you still use this archive since the
  utilities in this archive are also used on system which have shadowed
  passwords disabled.  You can read all about this in the HOWTO. Also
  note that you can switch between shadow and non-shadow at any point
  you want.

  Now is a very good moment to read section #5 of the doc/HOWTO file.
  You can read how you can test if shadowing works and if not, how to
  disable it. If it doesn't work and you haven't tested it, you'll end
  up with an unusable system after you logout of all your consoles,
  since you won't be able to login anymore. You can easily fix this by
  passing the init=/sbin/sulogin parameter to the kernel, unpack the
  util-linux archive, go to the login-utils directory, build the login
  program and replace the /bin/login by the one in the util-linux
  package. Things are never hopelessly messed up (at least not under
  Linux), but you can avoid a hassle by testing properly and reading
  manuals ;)

  7.5.5.  Configuring Sysvinit

  After you have made the following modification to the /etc/inittab
  file, you will be able to logon to it as you are used to (using the
  agetty and login programs). Sulogin won't be used anymore for normal
  logins.


  o  Edit the /etc/inittab file and modify it so it contains the
     following:


  # Begin /etc/inittab

  id:2:initdefault:

  si::sysinit:/etc/init.d/rcS

  su:S:wait:/sbin/sulogin

  l0:0:wait:/etc/init.d/rc 0
  l1:1:wait:/etc/init.d/rc 1
  l2:2:wait:/etc/init.d/rc 2
  l3:3:wait:/etc/init.d/rc 3
  l4:4:wait:/etc/init.d/rc 4
  l5:5:wait:/etc/init.d/rc 5
  l6:6:wait:/etc/init.d/rc 6

  ft:6:respawn:/sbin/sulogin

  ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

  1:2345:respawn:/sbin/agetty /dev/tty1 9600
  2:2345:respawn:/sbin/agetty /dev/tty2 9600
  3:2345:respawn:/sbin/agetty /dev/tty3 9600
  4:2345:respawn:/sbin/agetty /dev/tty4 9600
  5:2345:respawn:/sbin/agetty /dev/tty5 9600
  6:2345:respawn:/sbin/agetty /dev/tty6 9600

  # End /etc/inittab



  7.5.6.  Creating /var/run/utmp file

  Programs like login, shutdown and others want to write to the
  /var/run/utmp file. This file contains information about who is
  currently logged in. It also contains information on when the computer
  was last shutdown.


  o  Create the /var/run/utmp file by running: touch /var/run/utmp

  o  Give it the proper file permissions by running: chmod 644
     /var/run/utmp

  8.  Creating system boot scripts

  These bootscripts are started at system boot time. The scripts are
  responsible for mounting the root file system in read-write mode,
  activating swap, setting up some system settings and starting the
  various daemons that our system needs.

  8.1.  Preparing the directories and master files

  You need the Sysvinit package again for this section.


  o  Create the necessary directories by running:


     cd /etc
     mkdir rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d init.d rcS.d



  o  Go to the unpacked Sysvinit source directory

  o  Copy the Debian/etc/init.d/rc file to: /etc/init.d

  o  Go to the /etc/init.d directory

  o  Create a new file rcS containing the following:


     #!/bin/sh
     # Begin /etc/init.d/rcS

     runlevel=S
     prevlevel=N
     umask 022
     export runlevel prevlevel

     trap ":" INT QUIT TSTP

     for i in /etc/rcS.d/S??*
     do
        [ ! -f  "$i" ] && continue;
        $i start
     done

     # End /etc/init.d/rcS



  8.2.  Creating the reboot script


  o  Create a new file reboot containing the following:


     #!/bin/sh
     # Begin /etc/init.d/reboot

     echo -n "System reboot in progress..."

     /sbin/reboot -d -f -i

     # End /etc/init.d/reboot



  8.3.  Creating the halt script


  o  Create a new file halt containing the following:


     #!/bin/sh
     # Begin /etc/init.d/halt

     /sbin/halt -d -f -i -p

     # End /etc/init.d/halt



  8.4.  Creating the mountfs script


  o  Create a new file mountfs containing the following:


  #!/bin/sh
  # Begin /etc/init.d/mountfs

  check_status()
  {
    if [ $? = 0 ]
    then
      echo "OK"
    else
      echo "FAILED"
    fi
  }

  echo -n "Remounting root file system in read-write mode..."
  /bin/mount -n -o remount,rw /
  check_status

  > /etc/mtab
  /bin/mount -f -o remount,rw /

  echo -n "Mounting proc file system..."
  /bin/mount proc
  check_status

  # End /etc/init.d/mountfs



  8.5.  Creating the umountfs script


  o  Create a new file umountfs containing the following:



  #!/bin/sh
  # Begin /etc/init.d/umountfs

  check_status()
  {
    if [ $? = 0 ]
    then
      echo "OK"
    else
      echo "FAILED"
    fi
  }

  echo "Deactivating swap..."
  /bin/swapoff -av
  check_status

  echo -n "Unmounting file systems..."
  /bin/umount -a -r
  check_status

  # End /etc/init.d/umountfs



  8.6.  Creating the sendsignals script


  o  Create a new file sendsignals containing the following:


  #!/bin/sh
  # Begin /etc/init.d/sendsignals

  check_status()
  {
    if [ $? = 0 ]
    then
      echo "OK"
    else
      echo "FAILED"
    fi
  }
  echo -n "Sending all processes the TERM signal..."
  /sbin/killall5 -15
  check_status

  echo -n "Sending all processes the KILL signal..."
  /sbin/killall5 -9
  check_status



  8.7.  Creating the checkroot bootscript


  o  Create a file /etc/init.d/checkroot containing the following:



  #!/bin/sh
  # Begin /etc/init.d/checkroot

  echo "Activating swap..."
  /sbin/swapon -av

  if [ -f /fastboot ]
  then
    echo "Fast boot, no file system check"
  else
    /bin/mount -n -o remount,ro /
    if [ $? = 0 ]
    then
      if [ -f /forcecheck ]
      then
        force="-f"
      else
        force=""
      fi

      echo "Checking root file system..."
      /sbin/fsck $force -a /

      if [ $? -gt 1 ]
      then
        echo
        echo "fsck failed. Please repair your file system manually by"
        echo "running fsck without the -a option"

        echo "Please note that the file system is currently mounted in"
        echo "read-only mode."
        echo
        echo "I will start sulogin now. CTRL+D will reboot your system."
        /sbin/sulogin
        /reboot -f
      fi
    else
      echo "Cannot check root file system because it is not mounted in"
      echo "read-only mode."
    fi
  fi

  # End /etc/init.d/checkroot



  8.8.  Creating the Sysklogd bootscript


  o  Create a new file /etc/init.d/sysklogd containing the following:



  #!/bin/sh
  # Begin /etc/init.d/sysklogd

  check_status()
  {
    if [ $? = 0 ]
    then
      echo "OK"
    else
      echo "FAILED"
    fi
  }

  case "$1" in
    start)
      echo -n "Starting system log daemon..."
      start-stop-daemon -S -q -o -x /usr/sbin/syslogd -- -m 0
      check_status

      echo -n "Starting kernel log daemon..."
      start-stop-daemon -S -q -o -x /usr/sbin/klogd
      check_status
      ;;

    stop)
      echo -n "Stopping kernel log daemon..."
      start-stop-daemon -K -q -o -p  /var/run/klogd.pid
      check_status

      echo -n "Stopping system log daemon..."
      start-stop-daemon -K -q -o -p /var/run/syslogd.pid
      check_status
      ;;

    reload)
      echo -n "Reloading system load daemon configuration file..."
      start-stop-daemon -K -q -o -s 1 -p /var/run/syslogd.pid
      check_status
      ;;

    restart)
      echo -n "Stopping kernel log daemon..."
      start-stop-daemon -K -q -o -p /var/run/klogd.pid
      check_status

      echo -n "Stopping system log daemon..."
      start-stop-daemon -K -q -o -p /var/run/syslogd.pid
      check_status

      sleep 1

      echo -n "Starting system log daemon..."
      start-stop-daemon -S -q -o -x /usr/sbin/syslogd -- -m 0
      check_status

      echo -n "Starting kernel log daemon..."
      start-stop-daemon -S -q -o -x /usr/sbin/klogd
      check_status
      ;;

    *)
      echo "Usage: $0 {start|stop|reload|restart}"
      exit 1
      ;;
  esac

  # End /etc/init.d/sysklogd



  8.9.  Setting up symlinks and permissions


  o  Set the proper file permissions and symlinks by running:


  chmod 755 rcS reboot halt mountfs umountfs sendsignals checkroot sysklogd
  cd ../rc0.d
  ln -s ../init.d/sysklogd K90sysklogd
  ln -s ../init.d/sendsignals S80sendsignals
  ln -s ../init.d/umountfs S90umountfs
  ln -s ../init.d/halt S99halt
  cd ../rc6.d
  ln -s ../init.d/sysklogd K90sysklogd
  ln -s ../init.d/sendsignals S80sendsignals
  ln -s ../init.d/umountfs S90umountfs
  ln -s ../init.d/reboot S99reboot
  cd ../rcS.d
  ln -s ../init.d/checkroot S05checkroot
  ln -s ../init.d/mountfs S10mountfs
  cd /etc/rc2.d
  ln -s ../init.d/sysklogd S03sysklogd



  8.10.  Creating the /etc/fstab file


  o  Create a file /etc/fstab containing the following:


     /dev/<LFS-partition designation> / ext2 defaults 0 1
     /dev/<swap-partition designation> none swap sw 0 0
     proc /proc proc defaults 0 0



  9.  Setting up basic networking

  9.1.  Installing Netkit-base


  o  Unpack the Netkit-base archive and install it by running:


  ./configure
  make; make install
  cd etc.sample; cp services protocols /etc
  mv /usr/bin/ping /bin



  9.2.  Installing Net-tools


  o  Unpack the Net-tools archive and install it by running:


  make; make install
  mv /usr/bin/netstat /bin
  cd /usr/sbin; mv ifconfig route /sbin



  9.2.1.  Creating the /etc/init.d/localnet bootscript


  o  Create a new file /etc/init.d/localnet containing the following:


  #!/bin/sh
  # Begin /etc/init.d/localnet

  check_status()
  {
    if [ $? = 0 ]
    then
      echo "OK"
    else
      echo "FAILED"
    fi
  }

  echo -n "Setting up loopback device..."
  /sbin/ifconfig lo 127.0.0.1
  check_status

  echo -n "Setting up hostname..."
  /bin/hostname --file /etc/hostname
  check_status

  # End /etc/init.d/localnet



  9.2.2.  Setting up permissions and symlink


  o  Set the proper permissions by running chmod 755
     /etc/init.d/localnet

  o  Create the proper symlinks by running cd /etc/rcS.d; ln -s
     ../init.d/localnet S03localnet

  9.2.3.  Creating the /etc/hostname file

  Create a new file /etc/hostname and put the hostname in it. This is
  not the FQDN (Fully Qualified Domain Name). This is the name you wish
  to call your computer in a network.

  9.2.4.  Creating the /etc/hosts file

  If you want to configure a network card, you have to decide on the IP-
  address, FQDN and possible aliases for use in the /etc/hosts file. An
  example is:


  <myip> myhost.mydomain.org aliases



  Make sure the IP-address is in the private network IP-address range.
  Valid ranges are:


  Class Networks
  A     10.0.0.0
  B     172.16.0.0 through 172.31.0.0
  C     192.168.0.0 through 192.168.255.0



  A valid IP address could be 192.168.1.1. A valid FQDN for this IP
  could be me.linuxfromscratch.org

  If you're not going to use a network card, you still need to come up
  with a FQDN. This is necessary for programs like Sendmail to operate
  correctly (in fact; Sendmail won't run when it can't determine the
  FQDN).

  Here's the /etc/hosts file if you don't configure a network card:


  # Begin /etc/hosts (no network card version)
  127.0.0.1 me.lfs.org <contents of /etc/hostname> localhost
  # End /etc/hosts (no network card version)



  Here's the /etc/hosts file if you do configure a network card:


  # Begin /etc/hosts (network card version)
  127.0.0.1 localhost
  192.168.1.1 me.lfs.org <contents of /etc/hostname>
  # End /etc/hosts (network card version)



  Of course, change the 192.168.1.1 and me.lfs.org to your own liking
  (or requirements if you are assigned an IP-address by a network/system
  administrator and you plan on connecting this machine to that
  network).

  9.2.5.  Creating the /etc/init.d/ethnet file

  This sub section only applies if you are going to configure a network
  card.  If not, skip this sub section and read on.

  Create a new file /etc/init.d/ethnet containing the following:



  #!/bin/sh
  # Begin /etc/init.d/ethnet

  check_status()
  {
    if [ $? = 0 ]
    then
      echo "OK"
    else
      echo "FAILED"
    fi
  }

  /sbin/ifconfig eth0 <ipaddress>
  check_status

  # End /etc/init.d/ethnet



  9.2.6.  Setting up permissions and symlink for /etc/init.d/ethnet


  o  Set the proper permissions by running chmod 755 ethnet

  o  Create the proper symlinks by running cd ../rc2.d; ln -s
     ../init.d/ethnet S10ethnet

  9.2.7.  Testing the network setup


  o  Start the just created localnet script by running
     /etc/init.d/localnet

  o  Start the just created ethnet script if you have one by running
     /etc/init.d/ethnet

  o  Test if /etc/hosts is properly setup by running:


  ping <your FQDN>
  ping <what you choose for hostname>
  ping localhost
  ping 127.0.0.1
  ping 192.168.1.1 (only when you configured your network card)



  All these five ping command's should work without failures. If so, the
  basic network is working.

  9.3.  Testing the system

  Now that all software has been installed, bootscripts have been
  written and the local network is setup, it's time for you to reboot
  your computer and test these new scripts to verify that they actually
  work. You first want to execute them manually from the /etc/init.d
  directory so you can fix the most obvious problems (typos, wrong paths
  and such). When those scripts seem to work just fine manually they
  should also work during a system start or shutdown.  There's only one
  way to test that. Shutdown your system with shutdown -r now and reboot
  into LFS. After the reboot you will have a normal login prompt like
  you have on your normal Linux system (unless you use XDM or some sort
  of other Display Manger (like KDM - KDE's version of XDM).
  At this point your basic LFS system is ready for use. Everything else
  that follows now is optional, so you can skip packages at your own
  discretion. But do keep in mind that if you skip packages (especially
  libraries) you can break dependencies of other packages. For example,
  when the Lynx browser is installed, the zlib library is installed as
  well. You can decide to skip the zlib library, but this library isn't
  used by Lynx alone. Other packages require this library too. The same
  may apply to other libraries and programs.

  10.  Installing Network Daemons

  10.1.  Setting up SMTP

  10.1.1.  Creating groups and user

  Create the groups needed by Sendmail by running:


  groupadd -g 1 bin
  groupadd -g 2 kmem
  groupadd -g 3 mail
  useradd -u 1 -g bin -d /bin -s /bin/sh bin



  10.1.2.  Creating directory

  Outgoing mail processed by Sendmail is put in the /var/spool/mqueue
  directory.  Incoming mail is forwarded to Procmail by Sendmail so we
  need to have an incoming mail directory as well which is /var/mail.
  We'll create these directories and give them the proper permissions:


  mkdir /var/spool
  mkdir /var/mail
  cd /var/spool; ln -s ../mail mail
  chmod 700 /var/spool/mqueue
  chmod 775 /var/mail
  chgrp mail /var/mail
  chmod 1777 /tmp



  10.1.3.  Installing Sendmail


  o  Unpack the Sendmail archive and install it by running:


  cd src
  ./Build; ./Build install



  10.1.4.  Configuring Sendmail

  Configuring Sendmail isn't as easily said as done. There are a lot of
  things you need to consider while configuring Sendmail and I can't
  take everything into account. That's why at this time we'll create a
  very basic and standard setup. If you want to tweak Sendmail to your
  own liking, go right ahead, but this is not the right article. You
  could always use your existing /etc/sendmail.cf (or
  /etc/mail/sendmail.cf) file if you need to use certain features.
  o  Go to the cf directory

  o  Create a new file cf/lfs.mc containing the following:


  OSTYPE(LFS)
  FEATURE(nouucp)
  define(`LOCAL_MAILER_PATH', /usr/bin/procmail)
  MAILER(local)
  MAILER(smtp)



  o  Create an empty file ostype/LFS.m4 by running touch ostype/LFS.m4

  o  Compile the lfs.mc file by running m4 m4/cf.m4 cf/lfs.mc >
     cf/lfs.cf

  o  Copy the cf/lfs.cf to /etc/sendmail.cf

  o  Create an empty /etc/aliases file by running touch /etc/aliases

  o  Initialize this (empty) alias database by running sendmail -v -bi

  10.1.5.  Installing Procmail


  o  Unpack the Procmail archive and install it by running:


  make; make install; make install-suid



  10.1.6.  Creating /etc/init.d/sendmail bootscript


  o  Create a new file /etc/init.d/sendmail containing the following:



  #!/bin/sh
  # Begin /etc/init.d/sendmail

  check_status()
  {
    if [ $? = 0 ]
    then
      echo "OK"
    else
      echo "FAILED"
    fi
  }

  case "$1" in
    start)
      echo -n "Starting Sendmail..."
      start-stop-daemon -S -q -o -x /usr/sbin/sendmail -- -bd
      check_status
      ;;

    stop)
      echo -n "Stopping Sendmail..."
      start-stop-daemon -K -q -o -p /var/run/sendmail.pid
      check_status
      ;;

    reload)
      echo -n "Reloading Sendmail configuration file..."
      start-stop-daemon -K -q -s 1 -p /var/run/sendmail.pid
      check_status
      ;;

    restart)
      echo -n "Stopping Sendmail..."
      start-stop-daemon -K -q -o -p /var/run/sendmail.pid
      check_status

      sleep 1

      echo -n "Starting Sendmail..."
      start-stop-daemon -S -q -o -x /usr/sbin/sendmail -- -bd
      check_status
      ;;

    *)
      echo "Usage: $0 {start|stop|reload|restart}"
      exit 1
      ;;

  esac

  # End /etc/init.d/sendmail



  10.1.7.  Setting up permissions and symlinks


  o  Set the proper permissions by running chmod 755
     /etc/init.d/sendmail

  o  Create the proper symlinks by running:



  cd /etc/init.d/rc2.d; ln -s ../init.d/sendmail S20sendmail
  cd ../rc0.d; ln -s ../init.d/sendmail K20sendmail
  cd ../rc6.d; ln -s ../init.d/sendmail K20sendmail



  10.2.  Setting up FTP

  10.2.1.  Creating groups and users


  o  Create the necessary groups by running:


  groupadd -g 65534 nogroup
  groupadd -g 4 ftp



  o  Create the necessary users by running:


  useradd -u 65534 -g nogroup -d /home nobody
  useradd -u 4 -g ftp -s /bin/sh -m ftp



  10.2.2.  Installing Proftpd


  o  Unpack the Proftpd archive and install it by running:


  ./configure
  make; make install



  10.2.3.  Creating the /etc/init.d/proftpd bootscript


  o  Create a new file /etc/init.d/proftpd containing the following:



  #!/bin/sh
  # Begin /etc/init.d/proftpd

  check_status()
  {
    if [ $? = 0 ]
    then
      echo "OK"
    else
      echo "FAILED"
    fi
  }

  case "$1" in
    start)
      echo -n "Starting Pro FTP daemon..."
      start-stop-daemon -S -q -o -x /usr/sbin/proftpd
      check_status
      ;;

    stop)
      echo -n "Stopping Pro FTP daemon..."
      start-stop-daemon -K -q -o -x /usr/sbin/proftpd
      check_status
      ;;

    restart)
      echo -n "Stopping Pro FTP daemon..."
      start-stop-daemon -K -q -o -x /usr/sbin/proftpd
      check_status

      sleep 1

      echo -n "Starting Pro FTP daemon..."
      start-stop-daemon -S -q -o -x /usr/sbin/proftpd
      check_status
      ;;

    *)
      echo "Usage: $0 {start|stop|restart}"
      ;;

  esac

  # End /etc/init.d/proftpd



  10.2.4.  Setting up permissions and symlinks


  o  Set the proper permissions by running chmod 755 /etc/init.d/proftpd

  o  Create the necessary symlinks by running:


  cd /etc/rc2.d; ln -s ../init.d/proftpd S40proftpd
  cd ../rc0.d; ln -s ../init.d/proftpd K40proftpd
  cd ../rc6.d; ln -s ../init.d/proftpd K40proftpd



  10.3.  Setting up HTTP

  10.3.1.  Installing Apache


  o  Unpack the Apache archive and install it by running:


  ./configure
  make; make install



  10.3.2.  Configuring Apache

  There's not much that needs to be configured. The only thing we need
  to do is to add the /usr/apache/man path to /usr/share/misc/man.conf


  o  Edit the /usr/share/misc/man.conf file

  o  Add this line underneath the other lines that start with MANPATH:
     MANPATH /usr/apache/man

  10.3.3.  Creating /etc/init.d/apache bootscript


  o  Create a new file /etc/init.d/apache containing the following:



  #!/bin/sh
  # Begin /etc/init.d/apache

  case "$1" in
    start)
      echo -n "Starting Apache HTTP daemon..."
      /usr/apache/bin/apachectl start
      ;;

    stop)
      echo -n "Stopping Apache HTTP daemon..."
      /usr/apache/bin/apachectl stop
      ;;

    restart)
      echo -n "Restarting Apache HTTP daemon..."
      /usr/apache/bin/apachectl restart
      ;;

    force-restart)
      echo -n "Stopping Apache HTTP daemon..."
      /usr/apache/bin/apachectl stop

      sleep 1

      echo -n "Starting Apache HTTP daemon..."
      /usr/apache/bin/apachectl start
      ;;

    *)
      echo "Usage: $0 {start|stop|restart|force-restart}"
      ;;

  esac

  # End /etc/init.d/apache



  10.3.4.  Setting up permissions and symlinks


  o  Set the proper permissions by running chmod 755 /etc/init.d/apache

  o  Create the necessary symlinks by running:


  cd /etc/rc2.d; ln -s ../init.d/apache S50apache
  cd ../rc0.d; ln -s ../init.d/apache K50apache
  cd ../rc6.d; ln -s ../init.d/apache K50apache



  10.4.  Setting up Telnet

  10.4.1.  Installing telnet daemon + client


  o  Unpack the Netkit-telnet archive and install it by running:



  ./configure
  make; make install



  10.4.2.  Creating the /etc/inetd.conf configuration file


  o  Create a new file /etc/inetd.conf containing the following:


  # Begin /etc/inetd.conf

  telnet stream tcp nowait root /usr/sbin/in.telnetd

  # End /etc/inetd.conf



  10.4.3.  Creating the /etc/init.d/inetd bootscript


  o  Create a new file /etc/init.d/inetd containing the following:



  #!/bin/sh
  # Begin /etc/init.d/inetd

  check_status()
  {
    if [ $? = 0 ]
    then
      echo "OK"
    else
      echo "FAILED"
    fi
  }

  case "$1" in
    start)
      echo -n "Starting Internet Server daemon..."
      start-stop-daemon -S -q -o -x /usr/sbin/inetd
      check_status
      ;;

    stop)
      echo -n "Stopping Internet Server daemon..."
      start-stop-daemon -K -q -o -p /var/run/inetd.pid
      check_status
      ;;

    reload)
      echo -n "Reloading Internet Server configuration file..."
      start-stop-daemon -K -q -s 1 -p /var/run/inetd.pid
      check_status
      ;;

    restart)
      echo -n "Stopping Internet Server daemon..."
      start-stop-daemon -K -q -o -p /var/run/inetd.pid
      check_status

      sleep 1

      echo -n "Starting Internet Server daemon..."
      start-stop-daemon -S -q -o -x /usr/sbin/inetd
      check_status
      ;;

    *)
      echo "Usage: $0 {start|stop|reload|restart}"
      ;;

  esac

  # End /etc/init.d/inetd



  10.4.4.  Setting up permissions and symlinks


  o  Set the proper permissions by running chmod 755 /etc/init.d/inetd

  o  Create the necessary symlinks by running



  cd /etc/rc2.d; ln -s ../init.d/inetd S30inetd
  cd ../rc0.d; ln -s ../init.d/inetd K30inetd
  cd ../rc6.d; ln -s ../init.d/inetd K30 inetd



  10.5.  Setting up PPP

  10.5.1.  Configuring the Kernel

  Before you can logon to the Internet, the kernel must be ppp-aware.
  You can accomplish this by compiling ppp-support directly into the
  kernel, or compiling the ppp drivers are modules which you load when
  you need them. Whatever you prefer, do it now by re-configuring the
  kernel if necessary. If your LFS kernel is already ppp-aware than you
  don't have to re-configure the kernel.

  10.5.2.  Creating group


  o  Create the daemon group by running groupadd -g7 daemon

  10.5.3.  Installing PPP


  o  Unpack the PPP archive and install it by running:


  ./configure
  make; make install



  10.5.4.  Creating /etc/resolv.conf


  o  Create a new file /etc/resolv.conf containing the following:


  # Begin /etc/resolv.conf

  nameserver <IP address of your ISP's primary DNS server>
  nameserver <IP address of your ISP's secundary DNS server>

  # End /etc/resolv.conf



  10.5.5.  Creating /etc/ppp/peers/provider


  o  Create the /etc/ppp/peers directory

  o  Create a new file /etc/ppp/peers/provider containing the following:



  # Begin /etc/ppp/peers/provider

  noauth
  connect "/usr/sbin/chat -v -f /etc/chatscripts/provider"
  /dev/ttyS1
  115200
  defaultroute
  noipdefault

  # End /etc/ppp/peers/provider



  10.5.6.  Creating /etc/chatscripts/provider


  o  Create the /etc/chatscripts directory

  o  Create a new file /etc/chatscripts/provider containing the
     following:


  # Begin /etc/chatscripts/provider

  ABORT BUSY
  ABORT "NO CARRIER"
  ABORT VOICE
  ABORT "NO DIALTONE"
  ABORT "NO ANSWER"
  "" ATZ
  OK ATDT <ISP's phonenumber>
  TIMEOUT 35
  CONNECT ''
  TIMEOUT 10
  ogin: \q<username>
  TIMEOUT 10
  assword: \q<mysecretpassword>

  # End /etc/chatscripts/provider



  10.5.7.  Note on password authentication

  As you see from the sample scripts (these are the actual scripts I use
  when I'm not using X) above I logon to my ISP using this chatscripts
  in stead of authenticating via pap or chap. Though my ISP supports
  pap, I choose to do it this slightly different way which has it's
  disadvantages and advantages.  In my case the advantages outweigh the
  disadvantages. This way I have more control over my logon procedure
  and I can see closer what is happening when.

  For example most times when I connect I have a window running tail -f
  /var/log/syslog so I can keep an eye on when (with my provider it's
  mostly 'if') things like the username and password are sent.

  11.  Installing Network Clients

  11.1.  Installing Email clients

  11.1.1.  Installing Mailx



  o  Unpack the Mailx archive and install it by running


  make; make install



  11.1.2.  Installing Mutt

  My favorite email client is Mutt, so that's why we're installing this
  one.  Feel free to skip the installation of Mutt and install your own
  favorite client.  After all, this is going to be your system. Not
  mine.

  If your favorite client is an X Window client (such as Netscape Mail)
  then you'll have to sit tight a little while till we've installed X.


  o  Unpack the Mutt archive and install it by running:


  ./configure
  make; make install



  11.1.3.  Installing Fetchmail


  o  Unpack the Fetchmail archive and install it by running:


  ./configure
  make; make install



  11.1.4.  Testing the email system

  It's time to test the email system now.


  o  Start Sendmail by running /usr/sbin/sendmail -bd (you need to start
     sendmail using the full path. If you don't, you can't let sendmail
     reload the sendmail.cf by running kill -1 <sendmail pid>).

  o  Send yourself an email by running echo "this is an email test" |
     mail -s test root

  o  Start the mail program and you should see your email there.

  o  Create a new user by running useradd -m testuser; passwd testuser

  o  Send an email to testuser by running echo "test mail to testuser" |
     mail -s test testuser

  o  Login as testuser, try to obtain that email (using the mail
     program) and send an email to root in the same way as you send an
     email to testuser.

  If this all worked just fine, you have a working email system for
  local email. It's not necessarily ready for Internet yet. You can
  remove the testuser by running userdel -r testuser
  11.2.  Installing FTP client

  11.2.1.  Installing Netkit-ftp


  o  Unpack the Netkit-ftp archive and install it by running:


  ./configure
  make; make install



  11.2.2.  Testing FTP system


  o  Start the Pro ftp daemon by running /etc/init.d/proftpd start

  o  Start a ftp session to localhost by running ftp localhost

  o  Login as user anonymous and logout again.

  11.3.  Installing HTTP client

  11.3.1.  Installing Zlib

  Zlib is a compression library, used by programs like PKware's zip and
  unzip utilities. Lynx can use this library to compress certain files.


  o  Unpack the Zlib archive and install it by running:


  ./configure --shared
  make; make install



  11.3.2.  Installing Lynx


  o  Unpack the Lynx archive and install it by running:


  ./configure --libdir=/etc --with-zlib
  make; make install
  make install-help; make install-doc



  11.3.3.  Testing HTTP system


  o  Start the Apache http daemon by running /etc/init.d/apache start

  o  Start a http session to localhost by running lynx http://localhost

  o  Exit lynx.

  11.4.  Installing Telnet client

  The Telnet client has already been installed when we installed the
  Telnet daemon in the previous chapter.
  11.4.1.  Testing Telnet system


  o  Start the Internet Server daemon (and with it telnetd) by running
     /etc/init.d/inetd start

  o  Start a telnet session to localhost by running telnet localhost

  o  Login and logout again.

  11.5.  Installing PPP clients

  11.5.1.  Creating the connect script


  o  Create a new file /usr/bin/pon file containing the following:


  #!/bin/sh
  # Begin /usr/bin/pon

  /usr/sbin/pppd call provider

  # End /usr/bin/pon



  11.5.2.  Creating the disconnect script


  o  Create a new file /usr/bin/poff file containing the following:


  #!/bin/sh
  # Begin /usr/bin/poff

  set -- `cat /var/run/ppp*.pid`

  case $# in
    0)
      kill -15 `ps axw|grep "pppd call [[allnum:]]+"|grep -v grep|awk '{print $1}'`
      exit 0
      ;;
    1)
      kill -15 $1
      exit 0
      ;;
  esac

  # End /usr/bin/poff



  11.5.3.  Testing PPP system


  o  Connect to the Internet by running pon

  o  Try to connect to a site like http://www.linuxfromscratch.org

  o  Disconnect from the Internet by running poff



  12.  Installing X Window System

  12.1.  Installing X


  o  Unpack the X archive and install it by running:


  make World
  make install; make install.man



  During the compilation process you will encounter a few errors about
  the "makedepend" script not being able to find the stddef.h stdarg.h
  and float.h header files. The script just isn't as smart as the
  compiler is apparently, since the compilation itself does work fine
  without compilation errors. Though, creating a few temporary symlinks
  won't solve the problem; they only will cause more problems.

  So you just ignore the many makedepend errors you most likely will be
  getting.  Also errors similar to "pointer targets in passing arg x of
  somefunction differ in signedness". You can rewrite those files if you
  feel like it. I won't do it.

  12.2.  Creating /etc/ld.so.conf

  Create a new file /etc/ld.so.conf containing the following:


  # Begin /etc/ld.so.conf

  /lib
  /usr/lib
  /usr/X11R6/lib

  # End /etc/ld.so.conf



  o  Update the dynamic loader cache by running ldconfig

  12.3.  Creating the /usr/include/X11 symlink


  o  In order for the pre-processor to find the X11/*.h files (which you
     encounter in #include statements in source code) create the
     following symlink: ln -s /usr/X11R6/include/X11 /usr/include/X11

  12.4.  Creating the /usr/X11 symlink

  Often software copies files to /usr/X11 so it doesn't have to know
  which release of X you are using. This symlink hasn't been created by
  the X installation, so we have to create it by ourselves.


  o  Create the /usr/X11 symlink by running ln -s /usr/X11R6 /usr/X11

  12.5.  Adding /usr/X11/bin to the $PATH environment variable

  There are a few ways to add the /usr/X11/bin path to the $PATH
  environment variable. One way of doing so is the following:

  o  Create a new file /root/.bashrc with it's contents as follows:
     export PATH=$PATH:/usr/X11/bin

  You need to login again for this change to become effective. Or you
  can update the path by running export PATH=$PATH:/usr/X11/bin manually

  12.6.  Configuring X


  o  Configure the X server by running xf86config

  If the XF86Config file created by xf86config doesn't suffice, then you
  better copy the already existing XF86Config from your normal Linux
  system to /etc. Cases wherein you need to make special changes to the
  file which aren't supported by the xf86config program force you to do
  this. You can always modify the created XF86Config file by hand. This
  can be very time consuming, especially if you don't quite remember
  what needs to be changed.

  12.7.  Testing X

  Now that X is properly configured it's time for our first test run.


  o  Start the X server by running startx

  The X server should start and display 3 xterm's on your screen. If
  this is true in your case, X is running fine.

  12.8.  Installing Window Maker

  I choose to install Window Maker as the Window Manager. This is
  because I've used WindowMaker for quite a while now and I'm very
  satisfied with it.  As usual, you don't have to do what I'm doing;
  install whatever you want. As you might know, you can install several
  Window Managers simultaneously and choose which one to start by
  specifying it in the $HOME/.xinitrc (or $HOME/.xsession in case you
  decide to use xdm) file.

  12.9.  Preparing the system for the Window Maker installation

  12.9.1.  Installing libPropList


  o  Unpack the libPropList archive and install it by running:


  ./configure
  make; make install



  12.9.2.  Installing libXpm


  o  Unpack the libXpm archive and install it by running:


  xmkmf; make Makefiles; make includes; make depend
  cd lib; make; make install
  cd ..; make; make install



  This slightly different installation is necessary due to a bug in one
  of the Makefiles. It depends on files in the lib directory which
  aren't installed yet and it's not searching for them in the lib
  directory, so we have to install those files first before compiling
  the actual package.

  12.9.3.  Installing libpng


  o  Unpack the libpng archive and install it by running:


  make -f scripts/makefile.lnx; make -f scripts/makefile.lnx install



  12.9.4.  Installing libtiff


  o  Unpack the libtiff archive and install it by running:


  ./configure
  make; make install



  12.9.5.  Installing libjpeg


  o  Unpack the libjpeg archive and install it by running:


  ./configure --enable-shared --enable-static
  make; make install



  12.9.6.  Installing libungif


  o  Unpack the libungif archive and install it by running:


  ./configure
  make; make install



  12.9.7.  Installing WindowMaker


  o  Unpack the WindowMaker archive and install it by running:


  ./configure
  make; make install



  12.10.  Updating dynamic loader cache


  o  Update the dynamic loader cache by running: ldconfig

  12.11.  Configuring WindowMaker

  Every user who wishes to use WindowMaker has to run the wmaker.inst
  script before he or she can use it. This script will copy the
  necessary files into the user's home directory and modify the
  $HOME/.xinitrc file (or create it if it's not there yet).


  o  Setup WindowMaker for yourself by running wmaker.inst

  12.12.  Testing WindowMaker


  o  Start the X server and see if the WindowMaker Window Manager starts
     properly by running startx

  13.  Resources

  A list of books, HOWTOs and other documents you might find useful to
  download or buy follows. This list is just a small list to start with.
  We hope to be able to expand this list in time as we come across more
  useful documents or books.

  13.1.  Books


  o  Sendmail published by O'Reilly. ISBN: 1-56592-222-0

  o  Linux Network Administrator's Guide published by O'Reilly. ISBN:
     1-56592-087-2

  o  Running Linux published by O'Reilly. ISBN: 1-56592-151-8

  13.2.  HOWTOs


  o  ISP-Hookup-HOWTO at http://ww.linuxdoc.org

  o  Linux Network Administrator's Guide online at
     http://www.linuxdoc.org

  13.3.  Other


  o  The various manual and info pages that come with packages

  14.  The End

  You have reached the end of the Linux From Scratch HOWTO. I hope this
  experience helped you getting to know Linux better. If you have
  anything that you think needs to be mentioned in here (be it a bug
  fix, extra software which has been forgotten but which you consider
  important) let us know. Together with your help and suggestions this
  HOWTO can be improved significantly.

  15.  Copyright & Licensing Information

  Copyright (C) 1999 by Gerard Beekmans. This document may be
  distributed only subject to the terms and conditions set forth in the
  LDP License at http://www.linuxdoc.org/COPYRIGHT.html.

  It is not necessary to display the license notice, as described in the
  LDP License, when only a small part of this document (the HOWTO) is
  quoted for informational or similar purposes. However, I do require
  you to display with the quotation(s) a line similar to the following
  line: "Quoted from the LFS-HOWTO at http://huizen.dds.nl/~glb/



  LinuxDoc+Emacs+Ispell-HOWTO
  Author: Philippe MARTIN (feloy@wanadoo.fr)
  Translator: Sebastien Blondeel (Sebastien.Blondeel@lifl.fr)

  v0.4, 27 February 1998

  This document is aimed at writers and translators of Linux HOWTOs or
  any other paper for the Linux Documentation Project. It gives them
  hints at using tools including Emacs and Ispell.

  ______________________________________________________________________

  Table of Contents


  1. Preamble

     1.1 Copyright
     1.2 Credits
     1.3 Comments
     1.4 Versions

  2. Introduction

     2.1 SGML
     2.2 The
     2.3 (TT

  3. Your first document.

     3.1 From a text document

  4. Configuring

     4.1 Accented Characters
        4.1.1 The displaying of 8-bit characters
        4.1.2 The typing of 8-bit characters
           4.1.2.1 The
           4.1.2.2 The
        4.1.3 The displaying of 8-bit SGML characters
     4.2 SGML mode
     4.3 PSGML mode
     4.4 Miscellaneous
        4.4.1 auto-fill mode

  5. Ispell

     5.1 Choosing your default dictionaries
     5.2 Selecting special dictionaries for certain files
     5.3 Spell-checking your document
     5.4 Personal dictionary versus local file dictionary
     5.5 Typing spell-checking

  6. Dirty Tricks

     6.1 Inserting a header automatically
        6.1.1 by inserting a file
        6.1.2 by running a routine

  7. An



  ______________________________________________________________________


  1.

  Preamble

  1.1.

  Copyright

  Copyright Philippe Martin 1998
  You may redistribute and/or modify this document as long as you comply
  with the terms of the GNU General Public Licence, version 2 or later.


  1.2.

  Credits

  Special thanks go to Sebastien Blondeel, who is a nasty bugger and
  asked me so much about Emacs setup. His clever questions have allowed
  me to understand it better and pass the knowledge to you through this
  document.


  1.3.

  Comments

  Do not hesitate to tell me any thing you think will help make this
  document better. I will examine your critics thoroughly.
  Do not hesitate as well to ask me any questions related to topics
  discussed here. I will be more than happy to answer them, as they may
  help me further improve this document. (-- Translator note: If the
  English is ugly, well then that goes to me!--)


  1.4.

  Versions

  This paper is about the following versions:

  o  Sgml-tools version 0.99,

  o  Emacs version 19.34,

  o  Ispell version 3.1,

  o  All Emacs libraries referred to in this document are distributed
     with the above Emacs version, apart from iso-sgml, which is
     distributed with XEmacs, and psgml, which is a stand-alone library.



  2.

  Introduction

  2.1.

  SGML

  Standard Generalised Mark-up Language, or SGML, is a language to
  define document types.

  For instance, one may define the document type recipe, with a first
  part presenting the ingredients, a second part introducing the
  accessories, a third part giving step by step instructions for baking
  the cake, and a nice final picture to show the outcome of it all.


  This is called a Document Type Definition.  It does not define what
  the final product will look like, it only defines what it may contain.


  To use the same example again, I'm sure that upon reading my idea of a
  recipe, you recognised yours, or your favourite cook's. Nevertheless,
  they actually look different: mine have a picture in the upper left
  corner of the bathroom cupboard, and the ingredients list can be found
  in the back garden, between the swimming pool and the barbecue. Yours?


  Thanks to this standard definition, one can write a document, without
  taking into account what it will look like in the end to the reader.


  2.2.

  The LinuxDoc  Type Definition

  This type is used to write, as you might have guessed, documents
  related to Linux.

  Such documents are generally built as follows: they start with a title
  followed by the name of the author, and the version number and date.
  Then comes the abstract (so you don't have to browse through it before
  realizing it isn't what you were looking for after all), then the
  contents which show the structure so that those in a rush can go
  directly to the part they want to read.

  Then comes a list of chapters, sections, paragraphs. Among these, one
  can insert bits of programs, change the font to emphasise a word or a
  sentence, insert lists, refer to another part of the document, etc.

  To write such a document, you just need to specify at the right time
  the title, the author, the date, and the document version, the
  chapters and sections, say when a list is to be inserted, what its
  elements are etc.


  2.3.

  SGML-Tools

  SGML-Tools will turn the specification of a document into the final
  result in the form you prefer. If you want it in your personal
  library, you will choose PostScript. If you want to share it with the
  world through the Web, it will be HTML. If you can't help it and must
  read it under Windows, you can turn it into RTF to be able to read it
  with any word processor. Or maybe use all three formats to accommodate
  your changing moods.

  SGML-Tools are available via anonymous FTP at
  ftp://ftp.lip6.fr/pub/sgml-tools/


  3.

  Your first document.



  3.1.

  From a text document

  If you want to turn a text document into SGML to port it to other
  formats, this is the way to go:


  1. Add the following lines at the very beginning:


             <!doctype linuxdoc system>
              <article>
               <title>Title Goes Here</title>
               <author>
                name of author, author's e-mail, etc.
               </author>
               <date>
                version and date
               </date>



  2. If you describe briefly the contents of the document in the
     beginning, surround that paragraph with the <abstract> and
     </abstract> tags.


  3. Then insert the <toc> tag, which stands for Table Of Contents.

  4. At the beginning of each new chapter, replace the line giving the
     number and title of the chapter with:


            <sect>The Title Of The Chapter



  and add the </sect> tag at the end of the chapter.

  Note : You don't have to put the chapter number, this is done
  automatically.


  5. Proceed in the same way for sections. You need to delete their
     numbers and tag their titles with <sect1> and they end with
     </sect1>.

  6. You can also define as many as 4 levels of nesting in the sections,
     using <sectn> and </sectn> where n= 2, 3, or 4 in a similar way.

  7. In the beginning of each paragraph, insert the <p> tag.

  8. If you need to emphasise some parts, tag them with <it> and </it>
     (italics), <bf> and </bf> (bold face), or <tt> and </tt>
     (typewriter style).

  9. To insert a list like the following one:



             This is a four lines list:

              - first line goes here
              - second line comes next
              - yet another one
              - that's it.



  you must replace it with:


          This is a four lines list:
         <itemize>
         <item>first line goes here
         <item>second line come next
         <item>yet another one
         <item>that's it.
         </itemize>



  10.
     When a whole block is a part of a program, or something else that
     needs to stick out:


            <verb>
             10 REM Oh my God what's this?
             20 REM I thought this had long disappeared!
             30 PRINT "I am back to";
             40 PRINT "save the world."
             50 INPUT "From whom, do you reckon? ",M$
             60 IF M$="Bill" THEN PRINT "Thou art wise.":GOTO PARADISE
             70 ELSE PRINT "You ain't got a clue...":GOTO RICHMOND
             </verb>



  11.
     Thus far, your SGML formating skills are fairly decent. If you want
     to refine your document, you may have a look at the user's guide
     for SGML-Tools, which gives more details about the LinuxDoc
     document type.

  4.

  Configuring Emacs


  4.1.

  Accented Characters

  If you want to write documents in French or in any other western
  European language, you will need 8-bit characters. This is how to set
  Emacs up to tell it to accept such characters.


  4.1.1.

  The displaying of 8-bit characters

  To let Emacs display 8-bit characters, you will need the following
  lines in your .emacs file:

         (standard-display-european 1)
         (load-library "iso-syntax")



  If you are using Emacs on a terminal which has no 8-bit support, you
  can use the iso-ascii library ((load-library "iso-ascii")), which
  tells Emacs to display such characters to its best approximation.


  4.1.2.

  The typing of 8-bit characters

  If your keyboard allows you to enter accented characters, no problem.
  If not here are some remedies:


  4.1.2.1.

  The iso-acc  library

  The Emacs iso-acc library will let you type 8-bit characters from a
  7-bit keyboard.

  To use it, insert the following in your .emacs file:

        (load-library "iso-acc")



  Then, upon running Emacs and opening the file you need to edit, type
  Meta-x iso-accents-mode.

  You can then enter the e of the French word cafe typing ' then e. More
  generally, you will type an accented character typing the accent
  first, then the letter to accent (upper or lower case). The following
  are the accents you may use:



  ` : Grave

  ^ : Circumflex

  " : Dieresis

  ~ : Tilde, cedilla, and other particular cases (cf iso-acc.el).

  / : To bar a letter, etc.

  If you need one of these characters and not an accented letter, type a
  space next to it. For instance, to type l'elephant, type l ' <spc> ' e
  l ' e ...

  You will find all the possible combinations in the iso-acc.el file.



  4.1.2.2.

  The<Meta> key

  Some terminals will let you type 8-bit characters with the <Meta> (or
  <Alt>) key. For example, pressing <Meta>-i will get you the e
  character.

  But Emacs reserved the <Meta> key for other uses, and I know of no
  library which lets you use it for accented characters.

  This is a solution:


        (global-set-key "\ei" '(lambda () (interactive) (insert ?\351)))
                           _                                      ___



  Such a line, if inserted in your .emacs file, will let you type e
  using the <Meta>-i keystroke.  You can redefine in such a way the
  combinations you need if you replace i with the right key and 351 with
  the right code (the code being taken from the ISO-8859-1 character
  set).

  Warning! Some local modes may redefine such key combinations.


  4.1.3.  The displaying of 8-bit SGML characters

  Under SGML, you can type accented characters with macros. For example,
  the e key is &eacute;. Generally, the applications that need to read
  SGML can read 8-bit characters and there is no need to use these
  macros. But some may not be able to do so. Given that there is a way
  to solve this problem, it would be a waste to let these crash.

  The iso-sgml library will let you type accented characters under
  Emacs, like always, but upon saving your file to the disk, it will
  turn these 8-bit characters into their SGML equivalent.

  It is therefore easy, thanks to this library, to type and reread your
  document under Emacs, and you can be sure a non 8-bit clean
  application will accept you document.

  To use this library, you just need to add the following lines to your
  .emacs file:


        (setq sgml-mode-hook
        '(lambda () "Defaults for SGML mode."
         (load-library "iso-sgml")))



  4.2.

  SGML mode

  Upon loading a file with the .sgml extension, Emacs enters the sgml
  mode automatically. If it doesn't, you can tell it to do so manually
  by typing Meta-x sgml-mode, or automatically by adding the following
  lines to your .emacs file:

        (setq auto-mode-alist
        (append '(("\.sgml$"  . sgml-mode))
                  auto-mode-alist))



  This mode will let you choose how to insert 8-bit characters for
  example. With Meta-x sgml-name-8bit-mode (or the menu item SGML/Toggle
  8-bit insertion), you can choose to type 8-bit characters as is, or in
  SGML form, i.e. in the form &...;.

  It will as well let you hide or show SGML tags, with Meta-x sgml-tags-
  invisible (or the menu item SGML/Toggle Tag Visibility).



  4.3.

  PSGML mode

  PSGML mode helps a lot to edit SGML documents with Emacs.

  The psgml-linuxdoc documentation explains how to install this mode and
  use it with LinuxDoc.


  4.4.

  Miscellaneous


  4.4.1.

  auto-fill mode

  In the normal mode, when you type a paragraph and get to the end of
  the line, you must use the <Return> key yourself to get to the next
  line, or else your line goes on through the whole paragraph.  When you
  use <Return> to get to the next line, you get a paragraph with ragged
  right margins.

  If you let some lines go beyond a reasonable width, you won't be able
  to see them with some editors.

  The auto-fill mode automates this boring task: when you go further
  than a certain column (the 70th by default), you are automatically
  taken to the next line.

  This is how to use this mode, and set the width of your lines to 80:


         (setq sgml-mode-hook
               '(lambda () "Defaults for SGML mode."
                   (auto-fill-mode)
                   (setq fill-column 80)))



  5.

  Ispell


  If you want to spell-check your document from within Emacs, you may
  use the Ispell package and its Emacs mode.


  5.1.

  Choosing your default dictionaries

  You can set up Emacs so that upon loading a file, it chooses
  automatically which dictionaries to use (you can use several). The
  first one, certainly the most important, is the main dictionary,
  distributed with Ispell. You can choose among several languages. The
  second one is your personal dictionary, where Ispell will insert words
  it couldn't find in the main dictionary but you told it to remember.

  If you wish to use as a default dictionary the French dictionary that
  comes with Ispell, and if you wish to use the file .ispell-dico-perso
  in your home directory as a personal dictionary, insert the following
  lines in your .emacs file:


         (setq sgml-mode-hook
         '(lambda () "Defauts for SGML mode."
         (setq ispell-personal-dictionary "~/.ispell-dico-perso")
         (ispell-change-dictionary "francais")
         ))



  5.2.  Selecting special dictionaries for certain files

  You may have a little problem if you do not spell-check documents in
  the same language at all times. If you translate documents, it is very
  likely that you swap languages (and dictionaries) very often.


  I don't know of any Lisp way of selecting, either automatically, or
  with a single mouse click, the main and personal dictionaries
  associated to the language currently being used. (If you do, please
  tell me!)


  However, it is possible to indicate, at the end of the file, which
  dictionaries you want to use for the current file (and only this one).
  It suffices to add them as commentaries, so that Ispell can read them
  upon launching a spell-check:


        <!-- Local IspellDict: english -->
        <!-- Local IspellPersDict: ~/emacs/.ispell-english -->



  If you have previously defined, in your .emacs file, that your default
  dictionaries are the French dictionaries, then you can add these lines
  in the end of any file written in English.


  5.3.

  Spell-checking your document


  To spell-check the whole of your document, use, from anywhere in the
  document the Meta-x ispell-buffer command. You may as well only run
  the checking on a region in your document:


  o  Mark the beginning of the region with Ctrl-Spc (mark-set-command),

  o  Go to the end of the region to check,

  o  type Meta-x ispell-region.

  Emacs then runs Ispell. Upon meeting an unknown word, this one shows
  you said word (usually highlighted) and prompts you for a key:


  o  spc accepts the word, this time only,

  o  i accepts the word and inserts it in your personal dictionary,

  o  a accepts the word for this session,

  o  A accepts the word for this file, and inserts it in the local file
     dictionary

  o  r allows you to correct the word by hand

  o  R allows you to correct all the occurrences of the misspelled word,

  o  x stops the checking, and puts the cursor back in place,

  o  X stops the checking and leaves the cursor where it is, letting you
     correct your file; you will be able to continue the spell-checking
     later if you type Meta-x ispell-continue,

  o  ? gives you online help.

  If ispell finds one or several words close to the unknown one, it will
  show them in a little window, each one of them preceded by a digit.
  Just type this digit to replace the misspelled word with the
  corresponding word.


  5.4.

  Personal dictionary versus local file dictionary

  The i key will let you insert a word in your personal dictionary,
  whereas A will let you insert a word in the local file dictionary.


  The local file dictionary is a sequence of words inserted at the end
  of the file, as comments, reread by Ispell each time it is run on the
  file. This way, you can accept some words, acceptable in this file,
  but not necessarily acceptable in other files.


  As far as I am concerned, I think it is better that the personal
  dictionary be reserved for words the main dictionary doesn't know but
  which belong to the language (like hyphenated words), plus some common
  words like proper nouns or others (like Linux), if they don't look too
  much like a real word of the main dictionary; adding too many words in
  the personal dictionary, such as first names, may be dangerous,
  because they may look like a word of the language (one can imagine
  Ispell being mystified on the following: `When the going gets tof, the
  tof get going (-- Tof is a French abbreviation for the first name
  Christophe.--)
  5.5.

  Typing spell-checking

  Ispell can spell-check your file while you're typing. You need to use
  ispell-minor-mode for this. To start it or stop it, type Meta-x
  ispell-minor-mode. Ispell will beep you each time you type a word it
  doesn't know.


  If those beeps hassle you (or your roommate is taking a nap), you can
  replace those annoying beeps with a flash on the screen, with the
  command Meta-x set-variable RET visible-bell RET t RET. You can add
  the following line in your .emacs and silence Emacs forever:


         (setq visible-bell t)



  6.

  Dirty Tricks

  6.1.

  Inserting a header automatically

  Emacs allows you to hook some actions to any event (opening of a file,
  saving, running a new mode, etc).


  The autoinsert library uses this feature: when you open a new file
  under Emacs, this library inserts, according to the type of the file,
  a standard header.


  In our case, this standard header could well be the part declaring the
  document type (LinuxDoc), the title, the author, and the date.


  I will describe here two ways to insert such a header. You could
  insert a template file containing the information to insert, or you
  could run an elisp routine.


  6.1.1.

  by inserting a file

  You must first tell Emacs to run the auto-insert when opening a file,
  then to read the autoinsert library which declares the auto-insert-
  alist list which we need to change. This list defines the header to
  insert for each file type. By default, the file to insert must be in
  the ~/insert/ directory, but it is possible to redefine the auto-
  insert-directory variable if you want to put it somewhere else.


  Add the following lines to your .emacs file to insert the
  ~/emacs/sgml-insert.sgml file each time you open a new SGML file:



        (add-hook 'find-file-hooks 'auto-insert)
        (load-library "autoinsert")
        (setq auto-insert-directory "~/emacs/")
        (setq auto-insert-alist
              (append '((sgml-mode .  "sgml-insert.sgml"))
                      auto-insert-alist))



  You can then write in the ~/emacs/sgml-insert.sgml file your
  customised header, then re-run Emacs and open some foobar.sgml file.
  Emacs should ask you to confirm the automatic insertion, and if you
  answer yes, insert your header.


  6.1.2.

  by running a routine

  This works like before, but instead of setting the auto-insert-alist
  to a file to insert, you need to set it to a function to execute. This
  is how to proceed, taking for granted you want to write this function
  in a file named ~/emacs/sgml-header.el.  (there's no need to burden
  your .emacs file with such a function, as it may turn out to be quite
  long):


        (add-hook 'find-file-hooks 'auto-insert)
        (load-library "autoinsert")
        (add-to-list 'load-path "~/emacs")
        (load-library "sgml-header")
        (setq auto-insert-alist
              (append '(((sgml-mode .  "SGML Mode") . insert-sgml-header))
                      auto-insert-alist))



  You will find in ``appendix'' an example of insert-sgml-header
  function.



  G.

  An insert-sgml-header  function

  This function will let the user insert a customised header for a Linux
  Documentation Project document in a file. It can be called
  automatically when one opens a new file, or explicitly, by the user.


  This function prompts the user, through the mini-buffer, for some
  pieces of information, some of which are necessary, some of which are
  not.

  First comes the title. If none is given, the function returns
  immediately, and inserts nothing. Then comes the date, the author, his
  e-mail and home page (these last two are optional).

  Then comes a request for the name of the translator. If there is none,
  just type Return, and no further prompting about a hypothetical
  translator will be done. If there is one, you are asked for his e-mail
  and home page (optional as well).

  This function then prints your request to the current buffer,
  including of course all the information you typed in a set up form,
  and including as well the tags which will serve for the abstract and
  the first chapter. It finally puts the cursor in the place where the
  abstract needs to be typed.


  (defun insert-sgml-header ()
    "Inserts the header for a LinuxDoc document"
    (interactive)
    (let (title author email home translator email-translator home-translator date
                starting-point)
      (setq title (read-from-minibuffer "Title: "))
      (if (> (length title) 0)
          (progn
            (setq date (read-from-minibuffer "Date: ")
                  author (read-from-minibuffer "Author: ")
                  email (read-from-minibuffer "Author e-mail: ")
                  home (read-from-minibuffer "Author home page: http://")
                  translator (read-from-minibuffer "Translator: "))
            (insert "<!doctype linuxdoc system>\n<article>\n<title>")
            (insert title)
            (insert "</title>\n<author>\nAuthor: ") (insert author) (insert "<newline>\n")
            (if (> (length email) 0)
                (progn
                  (insert "<htmlurl url=\"mailto:")
                  (insert email) (insert "\" name=\"") (insert email)
                  (insert "\"><newline>\n")))
            (if (> (length home) 0)
                (progn
                  (insert "<htmlurl url=\"http://")
                  (insert home) (insert "\" name=\"") (insert home)
                  (insert "\">\n<newline>")))
            (if (> (length translator) 0)
                (progn
                  (setq email-translator (read-from-minibuffer "Translator e-mail: ")
                        home-translator (read-from-minibuffer "Translator home page: http://"))
                  (insert "Translator : ")
                  (insert translator)
                  (insert "<newline>\n")
                  (if (> (length email-translator) 0)
                      (progn
                        (insert "<htmlurl url=\"mailto:")
                        (insert email-translator) (insert "\" name=\"")
                        (insert email-translator)
                        (insert "\"><newline>\n")))
                  (if (> (length home-translator) 0)
                      (progn
                        (insert "<htmlurl url=\"http://")
                        (insert home-translator) (insert "\" name=\"")
                        (insert home-translator)
                        (insert "\"><newline>\n")))))
            (insert "</author>\n<date>\n")
            (insert date)
            (insert "\n</date>\n\n<abstract>\n")
            (setq point-beginning (point))
            (insert "\n</abstract>\n<toc>\n\n<sect>\n<p>\n\n\n</sect>\n\n</article>\n")
            (goto-char point-beginning)
            ))))



  Loopback Encrypted Filesystem HOWTO
  Copyright by Ryan T. Rhea, rhear@cs.winthrop.edu
  v1.1, 29 November 1999

  This document explains how to setup and then use a filesystem that,
  when mounted by a user, dynamically and transparently encrypts its
  contents.  The filesystem is stored in a regular file, which can be
  hidden or named non-conspicuously such that it would most likely be
  overlooked.  This allows for a high level of secure storage of data.
  ______________________________________________________________________

  Table of Contents


  1. Before you begin

  2. Introduction

  3. Summary

  4. Details



  ______________________________________________________________________

  1.  Before you begin

  This process requires the kernel source code, knowledge of compiling
  this code, and a lot of patience.  I highly recommend having a boot
  disk ready.  Also, be sure to have a backup before you permanently
  store your important data on the encrypted filesystem - it can be
  corrupted like any other filesystem.

  As a minimum, you will have to patch to at least version 2.2.9 of the
  linux kernel before continuing.  There are further instructions on
  applying patches in the ``'' section later in this document.

  Kernel source can be found at:


       <ftp://ftp.kerneli.org/>


  There is a HOWTO on the process of recompiling kernels at:


       <http://metalab.unc.edu/LDP/HOWTO/>


  This document may be reproduced and distributed in whole or in part,
  without fee, subject to the following conditions:


  o  The copyright notice and this permission notice must be preserved
     complete on all complete or partial copies.

  o  Any translation or derived work must be approved by the author in
     writing before distribution.

  o  If you distribute this work in part, instructions for obtaining he
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

  o  All source code in this document is placed under the GNU General
     Public License, available via anonymous FTP from:
       <ftp://prep.ai.mit.edu/pub/gnu/COPYING/>



  2.  Introduction

  The process uses the device '/dev/loop*' (where * can be 0-7 on most
  installations) to mount a loopback filesystem.  The same process can
  be used without encryption to store a linux filesystem on a non-linux
  partition.  There is a HOWTO on this at the LDP site mentioned
  previously.

  Different types of encryption can be used, including XOR, DES,
  twofish, blowfish, cast128, serpent, MARS, RC6, DFC, and IDEA.  The
  program 'losetup' (loopback setup) is what associates your encrypted
  file with a filesystem and it's cipher type.  According to Alexander
  Kjeldaas, who maintains kerneli.org and the international crypto
  patches, DES and losetup are currently incompatible.  This is due to
  differences in the way the two handle parity bits.  There are no plans
  to support DES as it is much more insecure than the other ciphers.

  Twofish, blowfish, cast128, and serpent are all licensed free for any
  use.  The others may or may not have licensing restrictions.  Several
  of them are candidates for the AES standard.  The finalists will
  provide royalty free use of their ciphers worldwide.

  This document uses the serpent algorithm because it is strong yet
  remarkably fast, and it's freely distributable under the GPL.
  According to it's documentation, serpent uses a 128-bit block cipher
  designed by Ross Anderson, Eli Biham and Lars Knudsen.  It provides
  users with the highest practical level of assurance that no shortcut
  attacks will be found.  The documentation on serpent as well as the
  source code can be found at:


       <http://www.cl.cam.ac.uk/~rja14/serpent.html>


  Also, this document assumes that the ciphers are compiled directly
  into the kernel.  You may install them as modules, but the technique
  is not discussed in this document.  You will have to edit the file
  process is discussed in detail in the kernel compilation HOWTO
  referenced previously.


  3.  Summary

  There are many steps involved in the process.  I will provide ``'' for
  these steps in the next section. I thought it would be nice to provide
  a summary first to provide reference (if you are experienced with
  unix/linux you probably don't need the details anyway).  Here they are
  summarized as follows:


  1. Download the newest international crypto patch (I used



       <http://ftp.kerneli.org/pub/kerneli/>



  2. Patch the kernel


  3. Run 'config' (or 'menuconfig' or 'xconfig') to configure your are
     scattered.  First of all, before you will see any other options you
     must enable 'Prompt for development and/or incomplete code/drivers'
     under 'Code Maturity level options'.  Under 'Crypto options' enable
     'crypto ciphers' and serpent, but try whatever you want.  Remember
     that DES is known to be incompatible as of 2.2.10.4 - it may never
     be supported at all.  There are several important options to select
     under 'Block Devices'.  These include device support', 'Use
     relative block numbers as basis for transfer functions
     (RECOMMENDED)', and 'General encryption support'.  DO NOT select
     the crypto options under the various network categories.  I will
     not go  any further into configuration of the kernel, it is out of
     the scope of this document and can be found at the LDP site.



  4. Compile the new kernel.



  5. Edit '/etc/lilo.conf' to add the new kernel image.  Run add the
     kernel to the boot loader.



  6. Download the source for the newest 'util-linux' (I used



       <ftp://ftp.kernel.org/pub/linux/utils/util-linux/>



  7. Extract the 'util-linux' source.



  8. Apply the corresponding patch found in your



  9. CAREFULLY read the 'INSTALL' file!  This package contains the
     sources for many system dependent files (important tools such as
     MCONFIG file before compiling these sources have a boot disk and/or
     shotgun ready because your system will be quite confused.
     Basically you want to set almost all of the 'HAVE_*' fields equal
     to yes so that the important authentication tools are not compiled
     and written over.  The tools you do want rebuilt are 'mount' and
     'losetup' to accommodate the new encryption schemes.  I suggest
     that you refer to the ``'' section below for this step.



  10.
     Compile and install the 'util-linux' source



  11.
     Reboot the machine with the new kernel.



  12.
     Edit '/etc/fstab', adding an entry for your mount point as follows:
       ______________________________________________________________________
       /dev/loop0  /mnt/crypt  ext2  user,noauto,rw,loop 0 0
       ______________________________________________________________________



  13.
     Create the directory that will hold your filesystem, as in



  14.
     As the user, create your encrypted file as follows:



       dd if=/dev/urandom of=/etc/cryptfile bs=1M count=10



  15.
     Run losetup as follows:



       losetup -e serpent /dev/loop0 /etc/cryptfile



  You only have one chance to enter the password, be careful.  If you
  want to double-check your password, you can use the command:



       losetup -d /dev/loop0



  This will deactivate your loop device.  Next you will run losetup
  again to test your password, as follows:



       losetup -e serpent /dev/loop0 /etc/cryptfile



  16.
     Make your ext2 filesystem as follows:


       mkfs -t ext2 /dev/loop0



  17.
     Now you can mount the encrypted filesystem with:



       mount -t ext2 /dev/loop0 /mnt/crypt



  18.
     When your done, you want to unmount and protect your filesystem as
     follows:



       umount /dev/loop0
       losetup -d /dev/loop0



  4.  Details

  Kernel Patches:

  You can upgrade from '2.2.x' releases by patching.  Each patch that is
  released for '2.2.x' contains bugfixes.  New features will be added to
  the Linux '2.3.x' development kernel.  To install by patching, get all
  the newer patch files and do the following:



       cd /usr/src
       gzip -cd patchXX.gz | patch -p0



  Repeat xx for all versions bigger than the version of your current
  source tree, IN ORDER.

  The default directory for the kernel source is '/usr/src/linux'.  If
  your source is installed somewhere else, I would suggest using a
  symbolic link from '/usr/src/linux'.



  Editing 'MCONFIG' for the 'util-linux' package compilation:

  The following are excerpts from the 'MCONFIG' file I used to compile
  the 'util-linux' package.  Note that this is fairly specific for my
  setup, which is loosely based on RedHat 5.2.  The point is to make
  sure you don't overwrite any important system tools such as 'login',
  'getty', or 'passwd'.  Anyway, here are the important lines as
  follows:



       ______________________________________________________________________
       CPU=$(shell uname -m | sed s/I.86/intel/)

       LOCALEDIR=/usr/share/locale

       HAVE_PAM=no

       HAVE_SHADOW=yes

       HAVE_PASSWD=yes

       REQUIRE_PASSWORD=yes

       ONLY_LISTED_SHELLS=yes

       HAVE_SYSVINIT=yes

       HAVE_SYSVINIT_UTILS=yes

       HAVE_GETTY=yes

       USE_TTY_GROUP=yes

       HAVE_RESET=yes

       HAVE_SLN=yes

       CC=gcc
       ______________________________________________________________________



  Suggestions:

  Note that you could use any of the eight loopback devices, from to
  '/dev/loop7'.  Use an inconspicuous directory for the mount point.  I
  would suggest creating a folder with 700 permissions inside your home
  folder.  The same goes for the file that holds the data.  I use a
  filename like 'sysfile' or 'config.data' inside the '/etc' folder.
  This will usually get overlooked.

  I created very simple Perl scripts to mount and unmount the filesystem
  with one command.  Write these, make them executable (chmod u+x), and
  store them somewhere in your path.



       ______________________________________________________________________
       #!/usr/bin/perl -w
       #
       #minimal utility to setup loopback encryption filesystem
       #Copyright 1999 by Ryan T. Rhea
       `losetup -e serpent /dev/loop0 /etc/cryptfile`;
       `mount /mnt/crypt`;
       ______________________________________________________________________


  Name the above script 'loop', and then you can be on your way with one
  command ('loop') and a password.



       ______________________________________________________________________
       #!/usr/bin/perl -w
       #
       #minimal utility to deactivate loopback encryption filesystem
       #Copyright 1999 by Ryan T. Rhea
       `umount /mount/crypt`;
       `losetup -d /dev/loop0`;
       ______________________________________________________________________



  Name the second one 'unloop', and then typing 'unloop' will quickly
  deactivate your filesystem.



  Linux Meta-FAQ
  Michael K. Johnson <johnsonm@redhat.com>
  v4.7, 25 October 1997

  This is the Meta-FAQ for Linux.  It is mainly a list of valuable
  sources of information.  Check these sources out if you want to learn
  more about Linux, or have problems and need help.

  1.  Introduction


     What is Linux?
        Linux is an independent implementation of the POSIX operating
        system specification, with SYSV and BSD extensions, that has
        been written entirely from scratch (this means it looks and acts
        just like Unix).  It has no proprietary code in it.  Linux is
        freely distributable under the GNU General Public License.

        Linux works on IBM PC compatibles with an ISA or EISA bus
        (including local bus variants VLB and PCI) and a 386 or higher
        processor.  Some Amiga and Atari computers with MMU's are also
        supported.  This means 68020 with an external MMU, 68030, 68040,
        or 68060.  Support for the Digital Alpha is now stable.  Red Hat
        and Craftworks have Alpha distributions of Linux.  Support for
        Sparc is stable, and Red Hat Linux is available for Sparc.
        Support for PowerPC is in development for multiple platforms,
        including Nubus and PCI Macintosh, Motorola Powerstack, IBM 830
        and 850, and other platforms.  Support for ARM, StrongARM, and
        MIPS is in various stages of completion, but don't hold your
        breath.  Read comp.os.linux.announce instead.

        See the Linux INFO-SHEET for more technical information on these
        ports, and the Hardware Compatibility HOWTO for more exact
        hardware requirements.

        The Linux kernel is written by Linus Torvalds
        <torvalds@transmeta.com> and other volunteers.  Most of the
        programs running under Linux are generic Unix freeware, many of
        them from the GNU project.


     The Linux INFO-SHEET
        More specific technical information on Linux.  Includes pointers
        to information on the various ports, a feature list, information
        about how to get Linux, and more.


     The Linux HOWTO's
        These are somewhat like FAQ's, but instead of answering common
        questions, they explain how to do common tasks, like ordering a
        release of Linux, setting up print services under Linux, setting
        up a basic UUCP feed, etc.  See
        <http://sunsite.unc.edu/LDP/HOWTO/HOWTO-INDEX.html> or
        <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/> for the definitive
        versions of all the HOWTO's.  Other sites with up-to-date copies
        of the HOWTOs are ftp.cc.gatech.edu and tsx-11.mit.edu.

        In addition, there are many short, free-form documents called
        "mini-HOWTOs".  These documents cover very specific subjects,
        such as BogoMIPS or Color-ls.  These are available at
        <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/> and at
        <http://sunsite.unc.edu/LDP/HOWTO/HOWTO-INDEX.html>.


     Linux newsgroups
        There are several Usenet newsgroups for Linux.  It is a good
        idea to follow at least comp.os.linux.announce if you use Linux.
        comp.os.linux.announce is moderated by Lars Wirzenius.  To make
        submissions to the newsgroup, send mail to linux-
        announce@news.ornl.gov.  You may direct questions about
        comp.os.linux.announce to Lars Wirzenius <wirzeniu@iki.fi>

        The newsgroup comp.os.linux.announce is a moderated newsgroup
        for announcements about Linux (new programs, bug fixes, etc).

        The newsgroup comp.os.linux.answers is a moderated newsgroup to
        which the Linux FAQ, HOWTO documents, and other documentation
        postings are made.

        The newsgroup comp.os.linux.setup is an unmoderated newsgroup
        for discussion of issues and problems involved in setting up
        Linux systems.

        The newsgroup comp.os.linux.admin is an unmoderated newsgroup
        for discussion of administration of Linux systems.

        The newsgroup comp.os.linux.development.system is an unmoderated
        newsgroup specifically for discussion of Linux kernel
        development.  The only application development questions that
        should be discussed here are those that are intimately
        associated with the kernel.  All other development questions are
        probably generic Unix development questions and should be
        directed to a comp.unix group instead, unless they are very
        Linux-specific applications questions, in which case they should
        be directed at comp.os.linux.development.apps.

        The newsgroup comp.os.linux.development.apps is an unmoderated
        newsgroup specifically for discussion of Linux-related
        applications development.  It is not for discussion of where to
        get applications for Linux, nor a discussion forum for those who
        would like to see applications for Linux.

        The newsgroup comp.os.linux.hardware is for Linux-specific
        hardware questions.

        The newsgroup comp.os.linux.networking is for Linux-specific
        networking development and setup questions.

        The newsgroup comp.os.linux.x is for Linux-specific X Windows
        questions.

        The newsgroup comp.os.linux.misc is an unmoderated newsgroup for
        any Linux discussion that doesn't belong anywhere else.

        In general, do not crosspost between the Linux newsgroups.  The
        only crossposting that is appropriate is an occasional posting
        between one unmoderated group and comp.os.linux.announce.  The
        whole point of splitting the old comp.os.linux group into many
        groups was to reduce traffic in each.  Those that do not follow
        this rule will be flamed without mercy...


     Other newsgroups
        Do not assume that all your questions are appropriate for a
        Linux newsgroup just because you are running Linux.  Is your
        question really about shell programming under any unix or unix
        clone?  Then ask in comp.unix.shell.  Is it about GNU Emacs?
        Then try asking in gnu.emacs.help.  Also, if you don't know
        another group to ask in, but think there might be, politely ask
        in your post if there is another group that would be more
        appropriate for your question.  At least the groups
        comp.unix.{questions,shell,programming,bsd,admin} and
        comp.windows.x.i386unix should be useful for a Linux user.


     The World-Wide Web
        Greg Hankins <gregh@cc.gatech.edu> maintains the home WWW page
        for the Linux project.  The URL is
        <http://sunsite.unc.edu/LDP/>


     Linux Journal
        A magazine called Linux Journal was launched several years ago.
        It includes articles intended for almost all skill levels, and
        is intended to be helpful to all Linux users.  Subscriptions are
        $22 in the U.S., $27 in Canada and Mexico, and $32 elsewhere
        around the world, all payable in U.S. funds. Subscription
        inquiries can be sent via email to subs@ssc.com or faxed to
        (U.S.)  1-206-782-7191 or mailed to Linux Journal, PO Box 85867,
        Seattle, WA 98145-1867 USA.  SSC has a PGP public key if you
        wish to send your credit card number via encrypted email: finger
        info@ssc.com


     The Linux Software Map
        Information on free software available for Linux can be found in
        the Linux Software Map, which can be found at
        <http://www.execpc.com/~lsm/>



  2.  Getting Linux

  2.1.  Linux FTP sites

  A more complete list of Linux FTP sites is in the Linux INFO-SHEET,
  which can always be found at <http://sunsite.unc.edu/LDP/HOWTO/INFO-
  SHEET.html> The most important sites are listed here; please see the
  INFO-SHEET for a site nearer to you (there are many mirrors).



       textual name             numeric addr    Linux directory
       =======================  ==============  ===============
       tsx-11.mit.edu           18.86.0.44      /pub/linux
       sunsite.unc.edu          152.2.22.81     /pub/Linux
       ftp.kernel.org           206.184.214.34  /pub/linux




  These sites are the main ``home'' sites for Linux where most uploads
  take place. There are many mirror sites; please use the closest
  (network-wise) site to you.


  2.2.  Linux on physical media

  Linux is distributed on physical media, mainly CD-ROM, by several
  commercial vendors.  Please read the distribution HOWTO, posted
  regularily to comp.os.linux.announce, and available at
  <http://sunsite.unc.edu/LDP/HOWTO/Distribution-HOWTO.html>


  2.3.  AFS

  Linux is available over AFS by mounting the volume project.linux from
  sipb.mit.edu
  2.4.  Commercial networks

  Compu$erve has some Linux archives.


  2.5.  Mailservers and such

  Sunsite offers ftp-mail service --- mail <ftpmail@sunsite.unc.edu>.


  3.  Linux distributions

  Linux is distributed by its author only as a kernel.  Other people
  have put together ``distributions'' that pair the Linux kernel with
  utilities and application software to make a complete working package.

  There are several distributions of Linux, which are available at
  various sites.  Sunsite mirrors many of the distributions at
  <ftp://sunsite.unc.edu/pub/Linux/distributions/>.  The most commonly-
  recommended freely-available distributions are Red Hat
  <http://www.redhat.com> and Debian  <http://www.debian.org>.  These
  are available for free over the internet, and are also sold on CD-ROM.

  There are other distributions of Linux as well. Most commercial
  distributors of Linux advertise in Linux Journal.


  4.  Linux mailing-lists

  Used mostly for discussion between developers of new features and
  testers of pre-release versions.  See addresses in the FAQ.  Send mail
  to majordomo@vger.rutgers.edu with the single word help in the body of
  the message , and you will get mail explaining how to subscribe to the
  many Linux mailing lists there.  Save this mail, as it tells you how
  to unsubscribe from the lists, and if you post annoying messages to
  the list complaining about not being able to get off the list (because
  you didn't follow instructions and save the mail telling you how to
  unsubscribe), you will likely be flamed for wasting international
  bandwidth and money.


  5.  Documentation for various programs

  Many programs come with some sort of documentation, often in a file
  called README or something similar.  It is a VERY good idea to read
  them with care.  It is boring to see (and answer) questions that are
  answered in the documentation.  Most programs also have ``man pages'';
  use the command man programname to get documentation on a program
  named programname.  To get help using the man program, use man man.

  Most distributions put other documentation about programs in the
  directory /usr/doc/; your distribution should include documentation on
  how to access that documentation.


  6.  More Documentation

  The Linux Documentation Project is working on a lot of documentation.
  Already, over 3000 pages of book-style documentation has been released
  to the general public, and another 2000 or so printed pages of man
  pages have also been released, with more to follow.  Check
  <http://sunsite.unc.edu/LDP/> for documents written by the LDP.




  7.  Keeping track of current releases

  Important new releases, programs, and ports are usually announced in
  comp.os.linux.announce.


  8.  This Document

  The latest version of this document should always be available from
  <http://sunsite.unc.edu/LDP/HOWTO/META-FAQ.html>


  9.  Legalese

  Trademarks are owned by their owners.  Satisfaction not guaranteed.
  No warranties about this document. Void where prohibited.

  The content of this document is placed in the public domain, but if
  you quote it, please be polite and attribute your source.

  Lars Wirzenius <wirzeniu@iki.fi> wrote the first version of this
  document; it is now maintained by Michael K. Johnson
  <johnsonm@redhat.com>.  Mail me if you have any questions about this
  document.










































  The MGR Window System HOWTO
  Vincent Broman
  Draft, 30 May 1996
  ____________________________________________________________

  Table of Contents


  1. This HOWTO

     1.1 Archiving
     1.2 Authentication
     1.3 Credit for the HOWTO

  2. What is the MGR window system?

     2.1 Function
     2.2 Requirements
     2.3 How do MGR, X11, and 8.5 compare?

  3. Installing MGR

  4. Running MGR

     4.1 Applications not aware of MGR
     4.2 MGR Applications (clients) distributed with the server
     4.3 MGR-aware clients distributed separately, see "SUPPORT" file

  5. Programming for MGR

  6. More documentation

  7. Credit for MGR



  ______________________________________________________________________

  1.  This HOWTO


                      Copyright Vincent Broman 1995.
         Permission granted to make and distribute copies of this HOWTO
            under the conditions of the GNU General Public License.



  1.1.  Archiving

  This HOWTO is archived in ftp://archimedes.nosc.mil/pub/Mgr/MGR-
  HOWTO.sgml, and also distributed from
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/MGR-HOWTO.  In nearby
  directories the same document may appear in alternate formats like
  MGR-HOWTO.txt.

  1.2.  Authentication

  Copies of the MGR distribution due to Broman should be accompanied by
  PGP signature files, signed by "Vincent Broman <broman@nosc.mil>".

  1.3.  Credit for the HOWTO

  While Vincent Broman first put together this HOWTO, much of the
  information and text was obtained from FAQs, READMEs, etc. written by
  Stephen Uhler, Michael Haardt, and other public-spirited net-persons.
  Email corrections and suggested changes to broman@nosc.mil.
  Uhler was the main architect of MGR -- see the Credit section below.


  2.  What is the MGR window system?


  2.1.  Function

  MGR (ManaGeR) is a graphical window system.  The MGR server provides a
  builtin window manager and windowed graphics terminal emulation on
  color and monochrome bitmap displays.  MGR is controlled by mousing
  pop-up menus, by keyboard interaction, and by escape sequences written
  on pseudo-terminals by client software.

  MGR provides each client window with: termcap-style terminal control
  functions, graphics primitives such as line and circle drawing;
  facilities for manipulating bitmaps, fonts, icons, and pop-up menus;
  commands to reshape and position windows; and a message passing
  facility enabling client programs to rendezvous and exchange messages.
  Client programs may ask to be informed when a change in the window
  system occurs, such as a reshaped window, a pushed mouse button, or a
  message sent from another client program.  These changes are called
  events.  MGR notifies a client program of an event by sending it an
  ASCII character string in a format specified by the client program.
  Existing applications can be integrated into the windowing environment
  without modification by having MGR imitate keystrokes in response to
  user defined menu selections or other events.


  2.2.  Requirements

  MGR currently runs on Linux, FreeBSD, Sun 3/4 workstations with SunOS,
  and Coherent.  Various older versions of MGR run on the Macintosh,
  Atari ST MiNT, Xenix, 386-Minix, DEC 3100, and the 3b1 Unix-pc.  Many
  small, industrial, real-time systems under OS9 or Lynx in Europe use
  (another variant of) Mgr for their user interface.  The programming
  interface is implemented in C and in ELisp, although supporting
  clients written in other languages is quite easy.

  Running MGR requires much less in resources than X, or even gcc.  It
  does not have the user-base, software repertory, or high-level
  libraries of X or MS-Windows, say, but it is quite elegant and
  approachable.

  It has been said that MGR is to X as Unix was to Multics.


  2.3.  How do MGR, X11, and 8.5 compare?

  MGR consists of a server with builtin window manager and terminal
  emulator, and clients which run in this terminal emulator and use it
  to communicate with the server.  No resource multiplexing is done.

  X11 consists of a server and clients, which usually connect to the
  server using a socket.  All user visible things like terminal
  emulators, window managers etc are done using clients.  No resource
  multiplexing is done.

  8.5, the Plan 9 window system, is a resource multiplexer, as each
  process running in a window can access /dev/bitblt, /dev/mouse and
  /dev/kbd in its own namespace.  These are multiplexed to the
  /dev/bitblit, /dev/mouse and /dev/kbd in the namespace of 8.5.  This
  approach allows one to run 8.5 in an 8.5 window, a very clean design.
  8.5 further has an integrated window manager and terminal emulator.


  3.  Installing MGR

  The latest source distribution can be FTPed from the directory
  ftp://archimedes.nosc.mil/pub/Mgr/69 or Mosaiced from
  http://archimedes.nosc.mil/Mgr/69.  The same should be found at
  ftp://sunsite.unc.edu/pub/Linux/apps/MGR and its mirrors.  Older
  versions of this distribution from Haardt can be found on
  tsx-11.mit.edu and perhaps elsewhere.  Pre-Linux versions of MGR from
  Uhler and others have been found at ftp://bellcore.com/pub/mgr, but I
  think they are gone now.  I have saved a copy of everything about MGR
  seen on the Internet, but I am not aware of anything weighty that is
  missing from this Linux/Sun distribution.  MGR has been through a lot
  of versions and releases, but the current *Linux* version number is
  0.69.  This version number could jump to 1.0 when stable 256-color VGA
  code for Linux appears (for more than one video card type).  RCS
  version numbers have increased from Bellcore's 4.3 up to our 4.13 now.

  Required tools to build this distribution of MGR are m4 (GNU, or
  perhaps another supporting the -D option), make (GNU, or perhaps
  another supporting include) and *roff for the docs.  Also sh, awk, and
  POSIX install.  Binary distributions are not assembled often so you
  need an ANSI C compiler environment, e.g. gcc.

  A Linux installation requires Linux 0.99.10 or better (1.2.13 is what
  I actually test on now), an HGC, EGA, VGA, or SVGA graphics card, and
  a mouse.  Mouses supported are: serial Microsoft mouse, serial
  MouseSystems 3 and 5 byte mouse, serial MMSeries mouse, serial
  Logitech mouse, PS/2 mouse, or a bus mouse.  With Buckey (Meta) hot
  keys enabled, even a mouseless system could do a certain amount of
  useful work under MGR.  The VGA 640x480 monochrome graphics mode is
  supported out of the box, as is 640x350 and 640x200.  To run 800x600,
  or other modes that your BIOS can initialize and which do not require
  bank-switching, you need to run a small program (supplied as
  src/vgamisc/regs.exe) under DOS or an emulator to read the VGA
  registers and write a header file which you place in the directory
  src/libbitblit/linux, so that it can be #include'd by the vga.c file
  there.  Samples of these files are supplied, but please create your
  own.  Some VGA cards can use 128k windows, and these might run higher
  monochrome resolutions.

  The Linux-colorport code also runs in the standard 320x200x256 color
  VGA mode without difficulty, because no bank switching is required.
  If you think of how few 64000 pixels is, you would realize this color
  mode is quite limited.  Non-fast, but simple, bank-switching code has
  been added in version 0.65, and it works with a Tseng ET4000 card in
  640x480x256 and 800x600x256 modes.  The S3 code does not work in super
  VGA resolutions, yet.  Supporting new super VGA cards requires writing
  one function to switch banks and then making sure that the desired
  screen mode can be initialized from a register dump, possibly with
  hand-tweaking.  The Linux color servers generally mangle the screen
  fonts, necessitating use of restorefont as in runx.  If someone were
  to extract the VGA initialization code out of X, this might make MGR
  work on a lot more color systems.

  Suns with SunOS 4.1.2+ and bwtwo, cgthree, or cgsix frame buffers are
  supported.  Their speed handling color is good.  Coherent
  installations should refer to the Versions/README.Coh file in the
  source distribution.  Porting the latest-and-greatest MGR to another
  POSIX-like system which provides select() and pty's and direct access
  to a bitmapped frame-buffer ought to be straightforward, just
  implementing the libbitblit library based on the sunmono or colorport
  code, say.

  If you want to install everything, you need 7 MB disk space for
  binaries, fonts, manual pages etc.  The sources are about 4.5 MB, plus
  object files during compilation.
  Normally, /usr/mgr should be either the directory or a link to the
  directory where you install MGR stuff for runtime use.  Typing


       cd /usr/mgr; tar xvfz whereveryouputit/mgrusr-0.69.tgz



  and optionally


       cd /usr/mgr; tar xvfz wherever/morefonts-0.69.tgz



  will unpack these.  The source can be put anywhere, e.g. typing


       cd /usr/src/local/mgr; tar xvfz wherever/mgrsrc-0.69.tgz



  to unpack the sources from archimedes.nosc.mil.

  The source tree can be compiled from one top-level Makefile which
  invokes lower-level Makefiles, all of which "include" a "Configfile"
  at the top level.  The Configfile is created by an interactive sh
  script named Configure, which asks you questions, then runs m4 on a
  Configfile.m4.  So you type something like this:



       chdir /usr/src/local/mgr
       sh ./Configure
       make first
       make depend
       make install
       make clean



  It might be wise, before running make, to eyeball the Configfile
  generated by the Configure script, checking that it looks reasonable.
  (At least one m4 poops out (Sun /usr/bin/m4), creating a very short
  Configfile.  If this happens, try hand editing a copy of
  Configfile.sun or Configfile.lx) One can also make all in any
  directory with a Makefile as soon as the libraries have been compiled
  and installed.  The server, libraries, and some clients have been
  linted, but several clients are K&R C code that generates many
  compiler warnings.

  Several flags in MGRFLAGS can be added/omitted in the Configfile to
  change some optional features in the server, viz:

     -DWHO
        muck utmp file so "who" works

     -DVI
        code for clicking the mouse in vi moving the cursor

     -DDEBUG
        enable debugging output selectable with -d options.
     -DFASTMOUSE
        XOR the mouse track

     -DBUCKEY
        for hot-key server commands without mousing

     -DPRIORITY
        for priority window scheduling instead of round-robin; the
        active window gets higher priority

     -DCUT
        for cut/paste between windows and a global snarf buffer

     -DMGR_ALIGN
        forces window alignment for fast scrolling (monochrome)

     -DKILL
        kills windows upon tty i/o errors

     -DSHRINK
        use only some of the screen ($MGRSIZE in environment)

     -DNOSTACK
        don't permit event stacking

     -DBELL
        audibly ring the bell

     -DKBD
        read mgr input from the sun kbd, instead of stdin.  This permits
        redirection of console msgs to a window.

     -DFRACCHAR
        fractional character movement for proportional fonts

     -DXMENU
        extended menu stuff (experimental)

     -DMOVIE
        movie making extension which logs all operations to a file for
        later replay -- not quite working under Linux

     -DEMUMIDMSBUT
        Emulate a missing middle mouse button by chording

  Not all combinations of these options have been tested on all systems.

  The BITBLITFLAGS macro should contain -DBANKED if you're trying out
  the super VGA color.

  C code for the static variables in the server containing icons and
  fonts is generated by a translator from icon and font files.

  Not all the clients are compiled and installed by the Makefiles.
  Clients found under src/clients having capitalized names or not
  compiled by the supplied Makefiles may have problems compiling and/or
  running, but they may be interesting to hack on.  Most of the screen
  drivers found under the libbitblit directory are of mainly
  archeological interest. Grave robbing can be profitable.

  At some point check that your /etc/termcap and/or terminfo file
  contain entries for MGR terminals such as found in the misc directory.
  If all your software checks $TERMCAP in the environment, this is not
  needed, as long as you run eval `set_termcap` in each window.


  MGR works better if run setuid root, because it wants to chown ptys
  and write in the utmp file.  This helps the ify iconifier client work
  better and the event passing mechanism be more secure.  On Linux, root
  permissions are required in order to do in/out on the screen device.
  Otherwise, you decide whether to trust it.

  In versions around 0.62 there are troubles on the Sun with using the
  csh as the default shell.  Programs seem to run in a different process
  group than the foreground process group of the window's pty, in
  contradiction to man pages and posix specs.  There is no trouble with
  bash, sh, or rc.  Ideas why?


  4.  Running MGR

  The only file required in an MGR installation is the server itself.
  That would give you terminal emulator windows with shells running in
  them and cutting and pasting with the mouse, but no nice clocks, extra
  fonts, fancy graphics, etc.  Depending on options, a monochrome server
  needs about 200K of RAM plus dynamic space for windows, bitmaps, etc.

  If /usr/mgr/bin is in your PATH, then just type "mgr" to start up.
  After enjoying the animated startup screen, press any key.  When the
  hatched background and mouse pointer appear, hold down the left mouse
  button, highlight the "new window" menu item, and release the button.
  Then drag the mouse from corner to corner where you want a window to
  appear.  The window will have your default shell running in it.  Hold
  down the left mouse button over an existing window to see another menu
  for doing things to that window.  Left-clicking on an obscured window
  raises it to the top.  The menu you saw that pops-up over the empty
  background includes the quit command.  For people with a two button
  mouse: press both buttons together to emulate the missing middle
  button used by some clients.

  The quit submenu includes the "really quit" option, a suspend option
  which should only be used if you run a job-control shell, and a screen
  saver and locker option, which waits for you to type your login
  password when you come back to your machine.

  When trying to run MGR, if you get:

     can't find the screen
        make sure you have a /dev entry for your display device, e.g. on
        a Sun /dev/bwtwo0.  If not, as root cd to /dev, and type
        "MAKEDEV bwtwo0".  Otherwise, you might need the -S/dev/bwtwo0
        or (on Linux) the -S640x480 command line option when starting
        mgr.  On Linux, you might also make sure that /usr/mgr/bin/mgr
        was installed setuid root.


     can't find the mouse
        make sure /dev/mouse exists, usually as a symbolic link to the
        real device name for your mouse.  If you haven't permission to
        write in /dev, then something like a -m/dev/cua0 option can be
        given when starting mgr.  Also, make sure you've supplied the
        right mouse protocol choice when you configured mgr.  The mouse
        may speak Microsoft, even if that is not the brand name.


     can't get a pty
        make sure all of /dev/[tp]ty[pq]?  are owned by root, mode 666,
        and all programs referenced with the "shell" option in your
        .mgrc startup file (if any) exist and are executable.



     none but the default font
        make sure MGR is looking in the right place for its fonts.
        Check the Configfile in the source or see whether a
        -f/usr/mgr/font option to mgr fixes the problem.


     completely hung (not even the mouse track moves)
        login to your machine from another terminal (or rlogin) and kill
        the mgr process.  A buckey-Q key can quit MGR if the keyboard
        still works.


  4.1.  Applications not aware of MGR

  Any tty-oriented application can be run in an MGR window without
  further ado.  Screen-oriented applications using termcap or curses can
  get the correct number of lines and columns in the window by your
  using shape(1) to reshape the window or using set_termcap(1) to obtain
  the correct termcap entry.


  4.2.  MGR Applications (clients) distributed with the server


     bdftomgr
        converts some BDF fonts to MGR fonts

     browse
        an icon browser

     bury
        bury this window

     c_menu
        vi menus from C compiler errors

     clock
        digital display of time of day

     clock2
        analog display of time of day

     close
        close this window, iconify

     color
        set the foreground and background color for text in this window

     colormap
        read or write in the color lookup table

     cursor
        change appearance of the character cursor

     cut
        cut text from this window into the cut buffer

     cycle
        display a sequence of icons

     dmgr
        crude ditroff previewer

     fade
        fade a home movie script from one scene to another

     font
        change to a new font in this window

     gropbm
        a groff to PBM driver using Hershey fonts

     hpmgr
        hp 2621 terminal emulator

     ico
        animate an icosahedron or other polyhedron

     iconmail
        notification of mail arrival

     iconmsgs
        message arrival notification

     ify
        iconify and deiconify windows

     loadfont
        load a font from the file system

     maze
        a maze game

     mclock
        micky mouse clock

     menu
        create or select a pop-up menu

     mgr
        bellcore window system server and window manager

     mgrbd
        boulder-dash game

     mgrbiff
        watch mailbox for mail and notify

     mgrload
        graph of system load average

     mgrlock
        lock the console

     mgrlogin
        graphical login controller

     mgrmag
        magnify a part of the screen, optionally dump to file

     mgrmail
        notification of mail arrival

     mgrmode
        set or clear window modes

     mgrmsgs
        message arrival notification

     mgrplot
        Unix "plot" graphics filter

     mgrsclock
        sandclock

     mgrshowfont
        browse through mgr fonts

     mgrsketch
        a sketching/drawing program

     mgrview
        view mgr bitmap images

     mless
        start up less/more in separate window, menu added for less

     mnew
        startup up any program in a separate, independent window

     mphoon
        display the current phase of the moon

     mvi
        start up vi in a separate window, with mouse pointing

     oclose
        (old) close a window

     omgrmail
        (old) notification of mail arrival

     pbmrawtomgr, pgmrawtomgr, ppmrawtomgr
        convert raw PBM/PGM/PPM image files to mgr bitmap format

     pbmstream
        split out a stream of bitmaps

     pbmtoprt
        printer output from PBM

     pgs
        ghostscript patch and front end, a PS viewer

     pilot
        a bitmap browser, or image viewer

     resetwin
        cleanup window state after client crashes messily

     rotate
        rotate a bitmap 90 degrees.

     screendump
        write graphics screen dump to a bitmap file

     set_console
        redirect console messages to this window

     set_termcap
        output an appropriate TERM and TERMCAP setting

     setname
        name a window, for messages and iconifying

     shape
        reshape this window

     square
        square this window

     squeeze
        compress mgr bitmap using run-length encoding

     startup
        produce a skeleton startup file for current window layout

     texmgr
        TeX dvi file previewer

     text2font, font2text
        convert between mgr font format and text dump

     unsqueeze
        uncompress mgr bitmap using run length encoding

     vgafont2mgr, mgrfont2vga
        convert between mgr font format and VGA

     window_print
        print an image of a window

     zoom
        an icon editor

     bounce, grav, grid, hilbert, mgreyes, stringart, walk
        graphics demos


  4.3.  MGR-aware clients distributed separately, see "SUPPORT" file


     calctool
        on-screen calculator

     chess
        frontend to /usr/games/chess

     gnu emacs
        editor with lisp/term/mgr.el mouse & menu support

     gnuplot
        universal scientific data plotting

     metafont
        font design and creation

     origami
        folding editor

     pbmplus
        portable bitmap format conversions, manipulations

     plplot
        slick scientific data plotting

  The Emacs support in misc/mgr.el and misc/mailcap includes very usable
  MIME support, via Rmail and metamail.

  A general image viewer could be cobbled together from pilot and the
  netPBM filters, but I have not taken the time to do it.



  5.  Programming for MGR

  The MGR programmers manual, the C language applications interface, is
  found in the doc directory in troff/nroff form.  It covers general
  concepts, the function/macro calls controlling the server, a sample
  application, with an index and glossary.

  Porting client code used with older versions of MGR sometimes requires
  the substitution of


           #include <mgr/mgr.h>



  for


           #include <term.h>
           #include <dump.h>



  and clients using old-style B_XOR, B_CLEAR, et al instead of BIT_XOR,
  BIT_CLR, et al can be accommodated by writing


           #define OLDMGRBITOPS
           #include <mgr/mgr.h>



  Compiling client code generally requires compiler options like the
  following.


           -I/usr/mgr/include   -L/usr/mgr/lib -lmgr



  One can get some interactive feel for the MGR server functions by
  reading and experimenting with the mgr.el terminal driver for GNU
  Emacs which implements the MGR interface library in ELisp.

  The usual method of inquiring state from the server has the potential
  of stumbling on a race condition if the client also expects a large
  volume of event notifications.  The problem arises if an
  (asynchronous) event notification arrives when a (synchronous) inquiry
  response was expected.  If this arises in practice (unusual) then the
  MGR state inquiry functions would have to be integrated with your
  event handling loop.

  The only major drawing function missing from the MGR protocol, it
  seems, is an area fill for areas other than upright rectangles.  There
  is new code for manipulating the global colormap, as well as
  (advisory) allocation and freeing of color indices owned by windows.

  If you are thinking of hacking on the server, you can find the mouse
  driver in mouse.* and mouse_get.*, the grotty parts of the keyboard
  interface in kbd.c, and the interface to the display in the
  src/libbitblit/* directories.  The main procedure, much
  initialization, and the top level input loop are in mgr.c, and the
  interpretation of escape sequences is in put_window.c.


  6.  More documentation

  The programmer's manual is essential for concepts.

  Nearly all the clients supplied come with a man page which is
  installed into /usr/mgr/man/man1 or man6.  Other useful man pages are
  bitblit.3, font.5, and bitmap.5.  There is some ambiguity in the docs
  in distinguishing the internal bitmap format found in your frame-
  buffer and the external bitmap format found in files, e.g. icons.

  The mgr.1 man page covers command line options, commands in the
  ~/.mgrc startup file, mouse and menu interaction with the server, and
  hot-key shortcuts available on systems with such hot-keys.

  Many of the fonts in /usr/mgr/font/* are described to some extent in
  /usr/mgr/font/*.txt, e.g. /usr/mgr/font/FONTDIR.txt gives X-style font
  descriptions for the fonts obtained in .bdf format.  Font names end in
  WxH, where W and H are the decimal width and height in pixels of each
  character box.


  7.  Credit for MGR

  Stephen Uhler, with others working at Bellcore, was the original
  designer and implementer of MGR, so Bellcore has copyrighted much of
  the code and documentation for MGR under the following conditions.


      * Permission is granted to copy or use this program, EXCEPT that it
      * may not be sold for profit, the copyright notice must be reproduced
      * on copies, and credit should be given to Bellcore where it is due.



  One required showing of the copyright notice is the startup title
  screen.

  Other credits to:

  o  Stephen Hawley for his wonderful icons.

  o  Tommy Frandsen for the VGA linux library.

  o  Tom Heller for his Gasblit library.

  o  Andrew Haylett for the Mouse driver code.

  o  Dan McCrackin for his gasblit->linux patches.

  o  Dave Gymer, dgymer@gdcarc.co.uk, for the Startrek effect fix.

  o  Alex Liu for first releasing a working Linux version of MGR.

  o  Lars Aronsson (aronsson@lysator.liu.se) for text2font and an
     ISO8859-1 8-bit font.

  o  Harry Pulley (hcpiv@grumpy.cis.uoguelph.ca,
     hcpiv@snowhite.cis.uoguelph.ca) for the Coherent port.

  o  Vance Petree & Grant Edwards & Udo Munk for their work on Hercules.

  o  Udo Munk for his work on serial mouse initialization & select.

  o  Norman Bartek & Hal Snyder at Mark Williams Co.  for their help
     with some bugs & with Coherent device drivers.

  o  Extra thanks to Zeyd Ben Halim for lots of helpful patches,
     especially the adaptation of selection.

  o  Bradley Bosch, brad@lachman.com, for lots of patches from his 3b1
     port, which fix bugs and implement new and desirable features.

  o  Andrew Morton, applix@runxtsa.runx.oz.au, who first wrote the cut-
     word code.

  o  Kapil Paranjape, kapil@motive.math.tifr.res.in, for the EGA
     support.

  o  Michael Haardt for MOVIE support fixes, bug fixes, separation of
     the libbitblit code into output drivers, expansion of the libmgr,
     and origami folding of the code.

  o  Yossi Gil for many fonts.

  o  Carsten Emde, carsten@thlmak.pr.net.ch, for mphoon.

  o  Vincent Broman for middle mouse-button emulation, linting, Sun
     cgsix support, VGA colormap acess, integration of the sunport code
     into Haardt's layering scheme, font gathering, the screen saver,
     and continued maintenance.

  o  Kenneth Almquist, ka@socrates.hr.att.com, for helpful bug reports.

  o  Tim Pierce, twpierce@midway.uchicago.edu, for the port to FreeBSD
     2.0R with Trident VGA.

  All bitmap fonts from any source are strictly public domain in the
  USA.  The 583 fixed-width fonts supplied with MGR were obtained from
  Uhler, the X distribution, Yossi Gil, and elsewhere.  The Hershey
  vector fonts and the code for rendering them are probably freely
  redistributable.



  Alpha Miniloader Howto
  David A. Rusling, david.rusling@reo.mts.dec.com
  v0.84, 6 December 1996

  This document describes the Miniloader, a program for Alpha based sys-
  tems that can be used to initialize the machine and load Linux.  The
  Alpha Linux Miniloader (to give it it's full name) is also known as
  MILO.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright
     1.2 New Versions of this Document

  2. What is MILO?

  3. Pre-Built Standard MILO Images.

  4. How To Build MILO

  5. How To Load MILO

     5.1 Loading MILO from the Windows NT ARC firmware
     5.2 Loading MILO from the Evaluation Board Debug Monitor
     5.3 Loading MILO from a Failsafe Boot Block Floppy
     5.4 Loading MILO from Flash
     5.5 Loading MILO from the SRM Console
     5.6 System Specific Information
        5.6.1 AxpPCI33 (Noname)
        5.6.2 AlphaPC64 (Cabriolet)
        5.6.3 EB66+
        5.6.4 EB64+/Aspen Alpine
        5.6.5 Universal Desktop Box (Multia)
        5.6.6 EB164
        5.6.7 PC164
        5.6.8 XL266
        5.6.9 Platform2000

  6. MILO's User Interface

     6.1 The ''help'' Command
     6.2 Booting Linux
     6.3 Rebooting Linux
     6.4 The ''bootopt'' command

  7. Running the Flash Management Utility

     7.1 The ''help'' command
     7.2 The ''list'' command
     7.3 The ''program'' command
     7.4 The ''environment'' command
     7.5 The ''bootopt'' command
     7.6 The ''quit'' command

  8. Restrictions.

  9. Problem Solving.

  10. Acknowledgements.



  ______________________________________________________________________

  1.  Introduction

  This document describes the Miniloader for Linux on Alpha AXP (MILO).
  This firmware is used to initialize Alpha AXP based systems, load and
  start Linux and, finally, provide PALcode for Linux.


  1.1.  Copyright

  The Alpha Miniloader (MILO) HOWTO is copyright (C) 1995, 1996 David A
  Rusling.


  Copyright. Like all Linux HOWTO documents, it may be reproduced and
  distributed in whole or in part, in any medium, physical or
  electronic, so long as this copyright notice is retained on all
  copies.  Commercial redistribution is allowed and encouraged; however
  the author would like to be notified of such distributions.  You may
  translate this HOWTO into any language whatsover provided that you
  leave this copyright statement and disclaimer intact, and that you
  append a notice stating who translated the document.


  Disclaimer. While I have tried to include the most correct and up to
  date information available to me, I cannot guarantee that usage of
  information in this document does not result in loss of data or
  equipment.   I provide NO WARRENTY about the information in the HOWTO
  and I cannot be made liable for any consequences resulting from using
  the information in this HOWTO.


  1.2.  New Versions of this Document

  The latest version of this document can be found in
  <ftp://gatekeeper.dec.com/pub/Digital/Linux-Alpha/Miniloader/docs> and
  David Mosberger-Tang is kind enough to include the html form of it in
  his excellent Linux Alpha FAQ site
  <http://www.azstarnet.com/~axplinux>.


  2.  What is MILO?

  On Intel based PC systems, the BIOS firmware sets up the system and
  then loads the image to be run from the boot block of a DOS file
  system.  This is more or less what MILO does on an Alpha based system,
  however there are several interesting differences between BIOS
  firmware and MILO, not least of which is that MILO includes and uses
  standard Linux device drivers unmodified.  MILO is firmware, unlike
  LILO, which relies on the BIOS firmware to get itself loaded.  The
  main functional parts of MILO are:


  1. PALcode,

  2. Memory set up code (builds page tables and turns on virtual
     addressing),

  3. Video code (BIOS emulation code and TGA (21030)),

  4. Linux kernel code.  This includes real Linux kernel code (for
     example, the interrupt handling) and ersatz or mock Linux kernel,

  5. Linux block device drivers (for example, the floppy driver),

  6. File system support (ext2, MS-DOS and ISO9660),

  7. User inteface code (MILO),

  8. Kernel interface code (sets up the HWRPB and memory map for linux),

  9. NVRAM code for managing environment variables.


  The following paragraphs describe these functional parts in more
  detail.


  PALcode can be thought of as a tiny software layer that tailors the
  chip to a particular operating system.  It runs in a special mode
  (PALmode) which has certain restrictions but it uses the standard
  Alpha instruction set with just five extra instructions.  In this way,
  the Alpha chip can run such diverse operating systems as Windows NT,
  OpenVMS, Digital Unix and, of course, Linux.  The PALcode that MILO
  uses (and therefore Linux itself) is, like the rest of MILO, freeware.
  It is derived from Digital's Evaluation Board software example Digital
  Unix PALcode..  The differences between the different PALcodes are
  because of differences in address mapping and interrupt handling that
  exist between the Alpha chips (21066 based systems have a different
  I/O map to 21064+2107x systems) and different Alpha based systems.


  For MILO to operate properly it needs to know what memory is
  available, where Linux will eventually be running from and it must be
  able to allocate temporary memory for the Linux device drivers.  The
  code maintains a memory map that has entries for permanent and
  temporary allocated pages.  As it boots, MILO uncompresses itself into
  the correct place in physical memory.   When it passes control to the
  Linux kernel, it reserves memory for the compressed version of itself,
  the PALcode (which the kernel needs) and some data structures.  This
  leaves most of the memory in the system for Linux itself.


  The final act of the memory code is to set up and turn on virtual
  addressing so that the data structures that Linux expects to see are
  at the correct place in virtual memory.


  MILO contains video code that initialises and uses the video device
  for the system.  It will detect and use a VGA device if there is one,
  otherwise it will try to use a TGA (21030) video device.  Failing
  that, it will assume that there is no graphics device.  The BIOS
  emulation that the standard, pre-built, images include is Digital's
  own BIOS emulation which supports most, if not all, of the standard
  graphics devices available.


  Linux device drivers live within the kernel and expect certain
  services from the kernel.  Some of these services are provided
  directly by Linux kernel code, for example the interrupt handling and
  some is provided by kernel look-alike routines.


  MILO's most powerful feature is that you can embed unaltered Linux
  device drivers into it.  This gives it the potential to support every
  device that Linux does.  MILO includes all of the block devices that
  are configured into the Linux kernel that it is built against as well
  as a lot of the block device code (for example, ll_rw_blk()).



  MILO loads the Linux kernel from real file systems rather than  from
  boot blocks and other strange places.  It understands MSDOS, EXT2 and
  ISO9660 filesystems.  Gzip'd files are supported and these are
  recommended, particularly if you are loading from floppy which is
  rather slow.  MILO recognises these by their .gz suffix.


  Built into MILO is a simple keyboard driver which, together with an
  equally simple video driver allows it to have a simple user interface.
  That interface allows you to list file systems on configured devices,
  boot Linux or run flash update utilities and set environment variables
  that control the system's booting.  Like LILO, you can pass arguments
  to the Kernel.


  MILO must tell the Linux kernel what sort of system this is, how much
  memory there is and which of that memory is free.  It does this using
  the HWRPB (Hardware Restart Parameter Block) data structure and
  associated memory cluster descriptions.  These are placed at the
  appropriate place in virtual memory just before control is passed to
  the Linux kernel.


  3.  Pre-Built Standard MILO Images.

  If you are planning to run Linux on a standard Alpha based system,
  then there are pre-built "standard" MILO images that you might use.
  These (along with the sources and other interesting stuff) can be
  found in <ftp://gatekeeper.dec.com/pub/Digital/Linux-
  Alpha/Miniloader>.


  The images subdirectory contains a directory per standard system (eg
  AlphaPC64) with MILO images having the following naming convention:


  1. MILO - Miniloader executable image, this image can be loaded in a
     variety of ways,

  2. fmu.gz - Flash management utility,

  3. MILO.dd - Boot block floppy disk image.  These should be written
     using rawrite.exe or dd on Linux.


  The test-images, like the images subdirectory contains a directory per
  standard system.   These images are somewhat experimental but tend to
  contain all the latest features.


  4.  How To Build MILO

  You build MILO seperately from the Kernel.  As MILO requires parts of
  the kernel to function (for example interrupt handling) you must first
  configure and build the kernel that matches with MILO that you want to
  build.  Mostly this means building the kernel with the same version
  number.  So, MILO-2.0.25.tar.gz will build against
  linux-2.0.25.tar.gz.  MILO may build against a higher version of the
  kernel, but there again it may not.  Also, now that ELF shared
  libraries are fully supported, there are two versions of the MILO
  sources.  To build under an ELF system you must first unpack the
  standard MILO sources and then patch those sources with the same
  version numbered ELF patch.  In the remainder of this discussion, I
  assume that your kernel sources and object files are stored in the
  subtree at /usr/src/linux and that the linux kernel has been fully
  built with the command make boot
  To build MILO, change your working directory to the MILO source
  directory and invoke make with:


       $    make KSRC=/usr/src/linux config



  Just like the Linux kernel, you will be asked a series of questions



            Echo output to the serial port (MINI_SERIAL_ECHO) [y]



  It's a good idea to echo kernel printk to /dev/ttyS0 if you can.  If
  you can (and want to), then type "y", otherwise "n".  All of the
  standard, pre-built, MILO images include serial port I/O using COM1.



            Use Digital's BIOS emulation code (not free) (MINI_DIGITAL_BIOS_EMU) [y]



  This code is included as a library which is freely distributable so
  long as it is used on an Alpha based system.  The sources are not
  available.   If you answer n then the freeware alternative BIOS
  emulation will be built.  It's sources are included with MILO.  Note
  that you cannot right now build choose Digital's BIOS emulation code
  in an ELF system (the library is not yet ready) and so you must answer
  no to this question.



            Build PALcode from sources (Warning this is dangerous) (MINI_BUILD_PALCODE_FROM_SOURCES) [n]



  You should only do this if you have changed the PALcode sources,
  otherwise use the standard, pre-built PALcode included with MILO.


  You are now all set to build the MILO image itself:


       $    make KSRC=/usr/src/linux



  When the build has successfully completed, the MILO image is in the
  file called milo.  There are a lot of images called milo.*, these
  should be ignored.

  5.  How To Load MILO

  The most commonly supported method of loading MILO is from the Windows
  NT ARC firmware as most shipping systems support this.  However, there
  are a wide variety of  loading MILO.   It may be loaded from:

  o  a failsafe boot block floppy,

  o  the Windows NT ARC firmware,

  o  Digital's SRM console,

  o  an Alpha Evaluation Board Debug Monitor,

  o  flash/ROM.


  5.1.  Loading MILO from the Windows NT ARC firmware

  Most, if not all, Alpha AXP based systems include the Windows NT ARC
  firmware and this is the prefered method of booting MILO and thus
  Linux.  Once the Windows NT firmware is running and you have the
  correct MILO image for your system, this method is completely generic.


  The Windows NT ARC firmware is an environment in which programs can
  run and make callbacks into the firmware to perform actions.  The
  Windows NT OSLoader is a program that does exactly this.   Linload.exe
  is a much simpler program which does just enough to load and execute
  MILO.  It loads the appropriate image file into memory at 0x00000000
  and then makes a swap-PAL PALcall to it.  MILO, like Linux, uses a
  different PALcode to Windows NT which is why the swap has to happen.
  MILO relocates itself to 0x200000 and continues on through the PALcode
  reset entry point as before.


  Before you add a Linux boot option, you will need to copy linload.exe
  and the appropriate MILO that you wish to load to someplace that the
  Windows NT ARC firmware can read from.  In the following example, I
  assume that you are booting from a DOS format floppy disk:


  1. At the boot menu, select "Supplementary menu..."

  2. At the "Supplementary menu", select "Set up the system..."

  3. At the "Setup menu", select "Manage boot selection menu..."

  4. In the "Boot selections menu", choose "Add a boot selection"

  5. Choose "Floppy Disk 0"

  6. Enter "linload.exe" as the osloader directory and name

  7. Say "yes" to the operating system being on the same partition as
     the osloader

  8. Enter "\" as the operating system root directory

  9. I usually enter "Linux" as the name for this boot selection

  10.
     Say "No" you do not want to initialise the debugger at boot time

  11.
     You should now be back in the "Boot selections menu", choose the
     "Change a boot selection option" and pick the selection you just
     created as the one to edit

  12.
     Use the down arrow to get "OSLOADFILENAME" up and then type in the
     name of the MILO image that you wish to use, for example
     "noname.arc" followed by return.

  13.
     Press ESC to get back to the "Boot Selections menu"

  14.
     Choose "Setup Menu" (or hit ESC again) and choose "Supplementary
     menu, and save changes" option

  15.
     ESC will get you back to the "Boot menu" and you can attempt to
     boot MILO.  If you do not want Linux as the first boot option, then
     you can alter the order of the boot options in the "Boot selections
     menu".


  At the end of all this, you should have a boot selection that looks
  something like:



       LOADIDENTIFIER=Linux
       SYSTEMPARTITION=multi(0)disk(0)fdisk(0)
       OSLOADER=multi(0)disk(0)fdisk(0)\linload.exe
       OSLOADPARTITION=multi(0)disk(0)fdisk(0)
       OSLOADFILENAME=\noname.arc
       OSLOADOPTIONS=



  You can now boot MILO (and then Linux).  You can load linload.exe and
  MILO directly from a file system that Windows NT understands such as
  NTFS or DOS on a hard disk.


  The contents OSLOADOPTIONS are passed to MILO which interprets it as a
  command.   So, in order to boot Linux directly from Windows NT without
  pausing in MILO, you could pass the following in OSLOADOPTIONS:



       boot sda2:vmlinux.gz root=/dev/sda2



  See ``MILO's User Interface'' for more information on the commands
  available.


  Another (rather sneaky) way of loading of loading MILO via the WNT ARC
  firmware is to put MILO onto an MS-DOS floppy and call it fwupdate.exe
  and then choose the "Upgrade Firmware" option.



  5.2.  Loading MILO from the Evaluation Board Debug Monitor

  Evaluation boards (and often designs cloned from them) include support
  for the Alpha Evaluation Board Debug Monitor.   Consult your system
  document before considering this method of booting MILO.   The
  following systems are known to include Debug Monitor support:

  o  AlphaPC64 (Section ``AlphaPC64'')

  o  EB64+ (Section ``EB64+'')

  o  EB66+ (Section ``EB66+'')

  o  EB164 (Section ``EB164'')

  o  PC164 (Section ``PC164'')


  Before you consider this method, you should note that the early
  versions of the Evaluation Board Debug Monitor did not include video
  or keyboard drivers and so you must be prepared to connect another
  system via the serial port so that you can use the Debug Monitor.  Its
  interface is very simple and typing help shows a whole heap of
  commands.  The ones that are most interesting include the word boot or
  load in them.


  The Evaluation Board Debug Monitor can load an image either via the
  network (netboot) or via a floppy (flboot).  In either case, set the
  boot address to 0x200000 (> bootadr 200000) before booting the image.


  If the image is on floppy (and note that only DOS formatted floppies
  are supported), then you will need to type the following command:



            AlphaPC64> flboot <MILO-image-name>



  5.3.  Loading MILO from a Failsafe Boot Block Floppy

  Only the AxpPCI33 is known to include failsafe boot block floppy
  support (Section < id="noname-section" name="Noname">).


  If you do not have a standard pre-built MILO .dd image, then you may
  need to build an SRM boot block floppy.  Once you have built MILO, you
  need to do the following on Digital Unix box:



            fddisk -fmt /dev/rfd0a
            cat mboot bootm > /dev/rfd0a
            disklabel -rw rfd0a 'rx23' mboot bootm



  Or on a Linux box:


            cat mboot bootm > /dev/fd0



  If you have a standard MILO image available (say MILO.dd) then you
  would build a boot block floppy using the following command:



            dd if=MILO.dd of=/dev/fd0



  5.4.  Loading MILO from Flash

  There are a number of systems where MILO can be blown into flash and
  booted directly (instead of via the Windows NT ARC firmware):

  o  AlphaPC64 (Section ``AlphaPC64'')

  o  Noname (Section ``Noname'')

  o  EB66+ (Section ``EB66+'')

  o  EB164 (Section ``EB164'')

  o  PC164 (Section ``PC164'')


  5.5.  Loading MILO from the SRM Console

  The SRM (short for System Reference Manual) Console knows nothing
  about filesystems or disk-partitions, it simply expects that the
  secondary bootstrap loader occupies a consecutive range of physical
  disk sectors starting from a given offset.   The information
  describing the secondary bootstrap loader (its size and offset) is
  given in the first 512 byte block.   To load MILO via the SRM you must
  generate that structure on a device which the SRM can access (such as
  a floppy disk).  This is what mboot and bootm, mboot is the first
  block (or boot description) and mboot is the MILO image rounded up to
  a 512 byte boundary.


  To load MILO from a boot block device, either build mboot and bootm
  and push them onto the boot device using the following command:



               $ cat mboot bootm > /dev/fd0



  Or, grab the appropriate MILO.dd from a web site and write it onto the
  boot device using either RAWRITE.EXE or dd.


  Once you have done that you can boot the SRM console and use one of
  its many commands to boot MILO.   For example, to boot MILO from a
  boot block floppy you would use the following command:


               >>>boot dva0
               (boot dva0.0.0.0.1 -flags 0)
               block 0 of dva0.0.0.0.1 is a valid boot block
               reading 621 blocks from dva0.0.0.0.1
               bootstrap code read in
               base = 112000, image_start = 0, image_bytes = 4da00
               initializing HWRPB at 2000
               initializing page table at 104000
               initializing machine state
               setting affinity to the primary CPU
               jumping to bootstrap code
               MILO Stub: V1.1
               Unzipping MILO into position
               Allocating memory for unzip
               ####...



  The following systems are known to have SRM Console support:

  o  Noname (Section ``Noname'')

  o  AlphaPC64 (Section ``AlphaPC64'')

  o  EB164 (Section ``EB164'')

  o  PC164 (Section ``PC164'')


  5.6.  System Specific Information

  5.6.1.  AxpPCI33 (Noname)

  The Noname board can load MILO from the Windows NT ARC firmware
  (Section ``booting from Windows NT ARC firmware''), from the SRM
  Console (Section ``Loading MILO from the SRM Console'').  and from a
  failsafe boot block floppy (Section ``Loading from a Failsafe Boot
  Block Floppy'').  A flash management utility, runnable from MILO is
  available so that once MILO is running, it can be blown into flash
  (Section ``running the flash management utility'').  However, be
  warned that once you have done this you will lose the previous image
  held there as there is only room for one image.


  The way that Noname boots is controlled by a set of jumpers on the
  board, J29 and J28.  These look like:


                           4
               J29     2 x x x 6
                       1 x x x 5

               J28     2 x x x 6
                       1 x x x 5
                           3



  The two options that we're interested in are J28, pins 1-3 which boots
  the console/loader from flash and J29, pins 1-3 which boots the
  console/loader from a boot block floppy.  The second option is the one
  that you need to first boot MILO on the Noname board.

  Once you've selected the boot from floppy option via the jumpers, put
  the SRM boot block floppy containing MILO into the floppy and reboot.
  In a few seconds (after the floppy light goes out) you should see the
  screen blank to white and MILO telling you what's going on.


  If you are really interested in technical stuff, the Noname loads
  images off of the floppy into physical address 0x104000 and images
  from flash into 0x100000.  For this reason, MILO is built with it's
  PALcode starting at 0x200000.  When it is first loaded, it moves
  itself to the correct location (see relocate.S).


  5.6.2.  AlphaPC64 (Cabriolet)

  The AlphaPC64 includes the Windows NT ARC firmware (Section ``booting
  from Windows NT ARC firmware''), the SRM Console (Section ``Loading
  MILO from the SRM Console'') and the Evaluation Debug Monitor (Section
  ``Loading from the Debug Monitor'').  These images are in flash and
  there is room to add MILO so that you can boot MILO directly from
  flash.  A flash management utility, runnable from MILO is available so
  that once MILO is running, it can be blown into flash (Section
  ``running the flash management utility'').  This system supports MILO
  environment variables.


  You select between the boot options (and MILO when it is been put into
  flash) using a combination of jumpers and a boot option which is saved
  in the NVRAM of the TOY clock.

  The jumper is J2, SP bits 6 and 7 have the following meanings:

  o  SP bit 6 should always be out.  If this jumper is set then the SROM
     mini-debugger gets booted,

  o  SP bit 7 in is boot image selected by the boot option byte in the
     TOY clock,

  o  SP bit 7 out is boot first image in flash.


  So, with bit 7 out, the Debug Monitor will be booted as it is always
  the first image in flash.  With bit 7 in, the image selected by the
  boot option in the TOY clock will be selected.  The Debug Monitor, the
  Windows NT ARC firmware and MILO all support setting this boot option
  byte but you must be very careful using it.  In particular, you cannot
  set the boot option so that next time the system boots MILO when you
  are running the Windows NT ARC firmware, it only allows you to set
  Debug Monitor or Windows NT ARC as boot options.


  To get MILO into flash via the Evaluation Board Debug Monitor, you
  will need a flashable image.  The build proceedures make MILO.rom, but
  you can also make a rom image using the makerom tool in the Debug
  Monitor software that comes with the board:


      > makerom -v -i7 -l200000 MILO -o mini.flash



  (type makerom to find out what the arguments mean, but 7 is a flash
  image id used by the srom and -l200000 gives the load address for the
  image as 0x200000).

  Load that image into memory (via the Debug Monitor commands flload,
  netload, and so on) at 0x200000 and then blow the image into flash:



            AlphaPC64> flash 200000 8



  (200000 is where the image to be blown is in memory and 8 is the
  segment number where you put the image.   There are 16 1024*64 byte
  segments in the flash and the Debug Monitor is at seg 0 and the
  Windows NT ARC firmware is at seg 4).


  Set up the image that the srom will boot by writing the number of the
  image into the TOY clock.



            AlphaPC64> bootopt 131



  (131 means boot the 3rd image, 129 = 1st, 130 = 2nd and so on).


  Power off, put jumper 7 on and power on and you should see the MILO
  burst into life.  If you don't then take jumper 7 back off and reboot
  the Debug Monitor.


  5.6.3.  EB66+

  The EB66+, like all of the Alpha Evaluation Boards built by Digital
  contains the Evaluation Board Debug Monitor and so this is available
  to load MILO (Section ``Loading from the Debug Monitor'').  Quite
  often (although not always) boards whose design is derived from these
  include the Debug Monitor also.  Usually, these boards include the
  Windows NT ARC firmware (Section ``booting from Windows NT ARC
  firmware'').  A flash management utility, runnable from MILO is
  available so that once MILO is running, it can be blown into flash
  (Section ``running the flash management utility'').  This system
  supports MILO environment variables.


  These systems have several boot images in flash controlled by jumpers.
  The two jumper banks are J18 and J16 and are located at the bottom of
  the board in the middle (if the Alpha chip is at the top).  You select
  between the boot options (and MILO when it is been put into flash)
  using a combination of jumpers and a boot option which is saved in the
  NVRAM of the TOY clock.


  Jumper 7-8 of J18 in means boot the image described by the boot
  option.   Jumper 7-8 of J18 out means boot the Evaluation Board Debug
  Monitor.


  Blowing an image into flash via the Evaluation Board Debug Monitor is
  exactly the same proceedure as for the AlphaPC64 (Section
  ``AlphaPC64'').

  5.6.4.  EB64+/Aspen Alpine

  This system is quite like the AlphaPC64 except that it does not
  contain flash which MILO can be loaded from.  The EB64+ has two ROMs,
  one of which contains the Windows NT ARC firmware (Section ``booting
  from Windows NT ARC firmware'').  and the other contains the
  Evaluation Board Debug Monitor (Section ``Loading from the Debug
  Monitor'').


  The Aspen Alpine is a little different in that it only has one ROM;
  this contains the Windows NT ARC firmware.


  5.6.5.  Universal Desktop Box (Multia)

  This is a very compact pre-packaged 21066 based system that includes a
  TGA (21030) graphics device.   Although you can just fit a half height
  PCI graphics card in the box you are better off waiting for full TGA
  support in XFree86.   It includes the Windows NT ARC firmware and so
  booting from that is the prefered method (Section ``Loading from
  Windows NT'').


  5.6.6.  EB164

  The EB164, like all of the Alpha Evaluation Boards built by Digital
  contains the Evaluation Board Debug Monitor and so this is available
  to load MILO (Section ``Loading from the Debug Monitor'').  Quite
  often (although not always) boards whose design is derived from these
  include the Debug Monitor also.  Usually, these boards include the
  Windows NT ARC firmware (Section ``booting from Windows NT ARC
  firmware'').  The SRM console is also available (Section ``Loading
  MILO from the SRM Console'').  A flash management utility, runnable
  from MILO is available so that once MILO is running, it can be blown
  into flash (Section ``running the flash management utility'').  This
  system supports MILO environment variables.


  These systems have several boot images in flash controlled by jumpers.
  The two jumper bank is J1 and is located at the bottom of the board on
  the left (if the Alpha chip is at the top).  You select between the
  boot options (and MILO when it is been put into flash) using a
  combination of jumpers and a boot option which is saved in the NVRAM
  of the TOY clock.


  Jumper SP-11 of J1 in means boot the image described by the boot
  option.   Jumper SP-11 of J1 out means boot the Evaluation Board Debug
  Monitor.


  Blowing an image into flash via the Evaluation Board Debug Monitor is
  exactly the same proceedure as for the AlphaPC64 (Section
  ``AlphaPC64'').


  5.6.7.  PC164

  The PC164, like all of the Alpha Evaluation Boards built by Digital
  contains the Evaluation Board Debug Monitor and so this is available
  to load MILO (Section ``Loading from the Debug Monitor'').  Quite
  often (although not always) boards whose design is derived from these
  include the Debug Monitor also.  Usually, these boards include the
  Windows NT ARC firmware (Section ``booting from Windows NT ARC
  firmware'').  The SRM console is also available (Section ``Loading
  MILO from the SRM Console'').  A flash management utility, runnable
  from MILO is available so that once MILO is running, it can be blown
  into flash (Section ``running the flash management utility'').  This
  system supports MILO environment variables.


  These systems have several boot images in flash controlled by jumpers.
  The main jumper block, J30, contains the system configuration jumpers
  and jumper CF6 in means that the system will boot the Debug Monitor,
  the default is out.


  Blowing an image into flash via the Evaluation Board Debug Monitor is
  exactly the same proceedure as for the AlphaPC64 (Section
  ``AlphaPC64'').


  5.6.8.  XL266

  The XL266 is one of a family of systems that are known as Avanti.  It
  has a riser card containing the Alpha chip and cache which plugs into
  the main board at right angles.   This board can replace the
  equivalent Pentium board.


  Some of these systems ship with the SRM console but others, notably
  the XL266 ship with only the Windows NT ARC firmware (Section
  ``booting from Windows NT ARC firmware'').


  Here is my list of compatible systems:

  o  AlphaStation 400 (Avanti),

  o  AlphaStation 250,

  o  AlphaStation 200 (Mustang),

  o  XL.  There are two flavours, XL266 and XL233 with the only
     difference being in processor speed and cache size.


  Note The system that I use to develop and test MILO is an XL266 and so
  this is the only one that I can guarentee will work.  However,
  technically, all of the above systems are equivalent; they have the
  same support chipsets and the same interrupt handling mechanisms.


  5.6.9.  Platform2000

  This is a 233Mhz 21066 based system.


  6.  MILO's User Interface

  Once you have correctly installed/loaded/run MILO you will see the
  MILO (for MIniLOader) prompt displayed on your screen.  There is a
  very simple interface that you must use in order to boot a particular
  Linux kernel image.  Typing "help" is a good idea as it gives a useful
  summary of the commands.


  6.1.  The ''help'' Command

  Probably the most useful command that MILO has:

       MILO> help
       MILO command summary:

       ls [-t fs] [dev:[dir]]
                           - List files in directory on device
       boot [-t fs] [dev:file] [boot string]
                           - Boot Linux from the specified device and file
       run [-t fs] dev:file
                           - Run the standalone program dev:file
       show                - Display all known devices and file systems
       set VAR VALUE       - Set the variable VAR to the specified VALUE
       unset VAR           - Delete the specified variable
       reset               - Delete all variables
       print               - Display current variable settings
       help [var]          - Print this help text

       Devices are specified as: fd0, hda1, hda2, sda1...
       Use the '-t filesystem-name' option if you want to use
         anything but the default filesystem  ('ext2').
       Use the 'show' command to show known devices and filesystems.
       Type 'help var' for a list of variables.



  Note that the bootopt command only appears on AlphaPC64 (and similar)
  systems.  Refer to the board's dcoumentation to find out just what it
  means.


  Devices.  Until you use a command that needs to make use of a device,
  no device inititalisation will take place.   The first show, ls, boot
  or run commands all cause the devices within MILO to be initialised.
  Devices are named in the same way (exactly) that Linux itself will
  name them.  So, the first IDE disk will be called 'hda' and it's first
  partition will be 'hda1'.  Use the show command to show what devices
  are available.


  File Systems.   MILO supports three file systems, MSDOS, EXT2 and
  ISO9660.  So long as a device is available to it, MILO can listboot or
  run an image stored on one of these file systems.  MILO's default file
  system is EXT2 and so you have tell MILO that the file system is
  something other than that.  All of the commands that use filenames
  allow you to pass the file system using the -t [filesystem]option.
  So, if you wanted to list the contents of a SCSI CD ROM, you might
  type the following:



            MILO> ls -t iso9660 scd0:



  Variables.  MILO contains some settable variables that help the boot
  process.  If you are loading via the Windows NT ARC firmware, then
  MILO makes use of the boot option environment variables set up by that
  firmware.  For some systems, MILO (for example, the AlphaPC64)
  maintains its own set of environment variables that do not change from
  boot to boot.  These variables are:



  MILO> help var
  Variables that MILO cares about:
    MEMORY_SIZE      - System memory size in megabytes
    BOOT_DEV         - Specifies the default boot device
    BOOT_FILE        - Specifies the default boot file
    BOOT_STRING      - Specifies the boot string to pass to the kernel
    SCSIn_HOSTID     - Specifies the host id of the n-th SCSI controller.
    AUTOBOOT         - If set, MILO attempts to boot on powerup
                       and enters command loop only on failure.
    AUTOBOOT_TIMEOUT - Seconds to wait before auto-booting on powerup.



  6.2.  Booting Linux

  The boot command boots a linux kernel from a device.  You will need to
  have a linux kernel image on an EXT2 formated disk (SCSI, IDE or
  floppy) or an ISO9660 formatted CD available to MILO.  The image can
  be gzip'd and in this case MILO will recognise that it is gzip'd by
  the .gz suffix.


  You should note that the version of MILO does not usually have to
  match the version of the Linux kernel that you are loading.  You boot
  Linux using the following command syntax:



            MILO> boot [-t file-system] device-name:file-name [[boot-option] [boot-option] ...]



  Where device-name is the name of the device that you wish to use and
  file-name is the name of the file containing the Linux kernel.   All
  arguments supplied after the file name are passed directly to the
  Linux kernel.


  If you are installing Red Hat, then you will need to specify a root
  device and so on.  So you would use:



            MILO> boot fd0:vmlinux.gz root=/dev/fd0 load_ramdisk=1



  MILO will automatically contain the block devices that you configure
  into your vmlinux.  I have tested the floppy driver, the IDE driver
  and a number of SCSI drivers (for example, the NCR 810), and these
  work fine.  Also, it is important to set the host id of the SCSI
  controller to a reasonable value.  By default, MILO will initialize it
  to the highest possible value (7) which should normally work just
  fine.  However, if you wish, you can explicitly set the host id of the
  n-th SCSI controller in the system by setting environment variable
  SCSIn_HOSTID to the appropriate value.  For example, to set the hostid
  of the first SCSI controller to 7, you can issue the following command
  at the MILO prompt:


            setenv SCSI0_HOSTID 7



  6.3.  Rebooting Linux

  You may want to reboot a running Linux system using the shutdown -r
  now command.  In this case, the Linux kernel returns control to MILO
  (via the HALT CallPAL entrypoint).  MILO leaves a compressed copy of
  itself in memory for just this reason and detects that the system is
  being rebooted from information held in the HWRPB (Hardware Restart
  Parameter Block).  In this case it starts to reboot using exactly the
  same command that was used to boot the Linux kernel the last time.
  There is a 30 second timeout that allows you to interrupt this process
  and boot whatever kernel you wish in whatever way you wish.


  6.4.  The ''bootopt'' command

  For flash based systems such as the AlphaPC64, EB164 and the EB66+,
  there are a number of possible boot options and these are changed
  using the bootopt command.  This has one argument, a decimal number
  which is the type of the image to be booted the next time the system
  is power cycled or reset:


  0 Boot the Evaluation Board Debug Monitor,

  1 Boot the Windows NT ARC firmware.


  In order to tell the boot code to boot the MILO firmware from flash
  then you need a boot option that means boot the N'th image.  For this,
  you need to 128 plus N, so if MILO is the third image, you would use
  the command:



            MILO> bootopt 131



  Note: Be very careful with this command.   A good rule is never to set
  bootopt to 0 (the Evaluation Board Debug Monitor), but instead use the
  system's jumpers to achieve the same thing.


  7.  Running the Flash Management Utility

  The run command is used to run the flash management utility.  Before
  you start you will need a device available to MILO that contains the
  updateflash program.  This (like vmlinux) can be gzip'd.  You need to
  run the flash management utility  program from the MILO using the
  (run) command:



            MILO> run fd0:fmu.gz



  Once it has loaded and initialised, the flash management utility will
  tell you some information about the flash device and give you a
  command prompt.  Again the help command is most useful.



       Linux MILO Flash Management Utility V1.0

       Flash device is an Intel 28f008SA
         16 segments, each of 0x10000 (65536) bytes
       Scanning Flash blocks for usage
       Block 12 contains the environment variables
       FMU>



  Note that on systems where environment variables may be stored and
  where there is more than one flash block (for example, the AlphaPC64)
  the flash management utility will look for a block to hold MILO's
  environment variables.  If such a block already exists, the flash
  management utility will tell you where it is.  Otherwise, you must use
  the environment command to set a block and initialise it.  In the
  above example, flash block 12 contains MILO's environment variables.


  7.1.  The ''help'' command



       FMU> help
       FMU command summary:

       list                - List the contents of flash
       program             - program an image into flash
       quit                - Quit
       environment         - Set which block should contain the environment variables
       bootopt num         - Select firmware type to use on next power up
       help                - Print this help text
       FMU>



  Note that the environment and bootopt commands are only available on
  the EB66+, the AlphaPC64, EB164 and PC164 systems (and their clones).


  7.2.  The ''list'' command

  The ''list'' command shows the current usage of the flash memory.
  Where there is more than one flash block, the usage of each flash
  block is shown.   In the example below you can see that Windows NT ARC
  is using blocks 4:7 and block 15.



  FMU> list
  Flash blocks:  0:DBM  1:DBM  2:DBM  3:WNT  4:WNT  5:WNT  6:WNT  7:WNT  8:MILO
          9:MILO 10:MILO 11:MILO 12:MILO 13:U 14:U 15:WNT
  Listing flash Images
    Flash image starting at block 0:
      Firmware Id:  0 (Alpha Evaluation Board Debug Monitor)
      Image size is 191248 bytes (3 blocks)
      Executing at 0x300000
    Flash image starting at block 3:
      Firmware Id:  1 (Windows NT ARC)
      Image size is 277664 bytes (5 blocks)
      Executing at 0x300000
    Flash image starting at block 8:
      Firmware Id:  7 (MILO/Linux)
      Image size is 217896 bytes (4 blocks)
      Executing at 0x200000
  FMU>



  7.3.  The ''program'' command

  The flash management utility contains a compressed copy of a flash
  image of MILO.  The ''program'' command allows you to blow this image
  into flash.  The command allows you to back out, but before you run it
  you should use the ''list'' command to see where to put MILO.  If MILO
  is already in flash, then the flash management utility will offer to
  overwrite it.



       FMU> program
       Image is:
           Firmware Id:  7 (MILO/Linux)
           Image size is 217896 bytes (4 blocks)
           Executing at 0x200000
       Found existing image at block 8
       Overwrite existing image? (N/y)? y
       Do you really want to do this (y/N)? y
       Deleting blocks ready to program: 8 9 10 11
       Programming image into flash
       Scanning Flash blocks for usage
       FMU>



  Wait until it has completed before powering off your system.


  Note: I cannot emphasise just how careful you must be here not to
  overwrite an existing flash image that you might need or render your
  system useless.   A very good rule is never to overwrite the Debug
  Monitor.


  7.4.  The ''environment'' command

  This selects a flash block to contain MILO's environment variables.



  7.5.  The ''bootopt'' command

  This is just the same as MILO's ''bootopt'' command, see (Section
  ``The ''bootopt'' command'').


  7.6.  The ''quit'' command

  This is really pretty meaningless.  The only way back to MILO (or
  anything else) once the flash management utility has run is to reboot
  the system.


  8.  Restrictions.

  Unfortunately this is not a perfect world and there, as always, some
  restrictions that you should be aware of.


  MILO is not meant to load operating systems other than Linux, although
  it can load images linked to run at the same place in memory as Linux
  (which is 0xFFFFFC0000310000).  This is how the flash management
  utilities can be run.


  The PALcode sources included in miniboot/palcode/blah are correct,
  however there are problems when they are built using the latest gas.
  They do build if you use the ancient a.out gas that's supplied in the
  Alpha Evaluation Board toolset (and that's how they were built).  I'm
  trying to get someone to fix the new gas.  Meanwhile, as a workaround,
  I have provided pre-built PALcode for the supported boards and David
  Mosberger-Tang has a fixed gas on his ftp site.


  9.  Problem Solving.

  Here are some common problems that people have seen, together with the
  solutions.


  Reading MS-DOS floppies from the Evaluation Board Debug Monitor.

  Some of the older versions of the Evaluation Board Debug Monitor (pre-
  version 2.0) have a problem with DOS format flopies generated from
  Linux.  Usually, the Debug Monitor can load the first few sectors all
  right, but then goes into an endless loop complaining about "bad
  sectors."  Apparently, there is an incompatibility between the DOS
  file system as expected by the Debug Monitor and the Linux
  implementation of DOSFS.  To make the long story short: if you run
  into this problem, try using DOS to write the floppy disk.  For
  example, if loading the file MILO.cab doesn't work, use a DOS machine,
  insert the floppy and then do:



            copy a:MILO.cab c:
            copy c:MILO.cab a:
            del c:MILO.cab



  Then try booting from that floppy again.  This normally solves the
  problem.

  MILO displays a long sequence of O> and does not accept input.

  This usually happens when MILO was built to use COM1 as a secondary
  console device.   In such a case, MILO echo output to COM1 and accepts
  input from there also.   This is great for debugging but not so great
  if you have a device other than a terminal connected.  If this
  happens, disconnect the device or power it down until the Linux kernel
  has booted.  Once Linux is up and running, everything will work as
  expected.


  MILO complains that the kernel image has the wrong magic number

  Older versions of MILO did not support the ELF object file format and
  so could not recognise an ELF image and this might be your problem.
  If this is reported, upgrade to the latest MILO that you can find.
  All 2.0.20 and beyond MILOs support ELF.  On the other hand it could
  be that the image is indeed damaged.  You should also note that MILO
  does not yet automatically distinquish between GZIP'd and non-GZIP'd
  images; you need to add the ".gz" suffix to the file name.


  MILO prints "...turning on virtual addressing and jumping to the Linux
  Kernel" and nothing else happens

  One obvious problem is that the kernel image is wrongly built or is
  built for another Alpha system altogether.  Another is that the video
  board is a TGA (Zlxp) device and the kernel has been built for a VGA
  device (or vice versa).  It is worth building the kernel to echo to
  COM1 and then connecting a terminal to that serial port or retrying
  the kernel that came with the Linux distribution that you installed.


  MILO does not recognise the SCSI device

  The standard MILO images include as many device drivers as are known
  to be stable for Alpha (as of now that includes the NCR 810, QLOGIC
  ISP, Buslogic and Adaptec 2940s and 3940 cards).  If your card is not
  included, it may be that the driver is not stable enough on an Alpha
  system yet.  Again, the latest MILO images are worth trying.  You can
  tell which SCSI devices a MILO image has built into it by using the
  "show" command.


  10.  Acknowledgements.

  I would like to thank:

  o  Eric Rasmussen and Eilleen Samberg the authors of the PALcode,

  o  Jim Paradis for the keyboard driver and the original MILO
     interface,

  o  Jay Estabrook for his help and bugfixes,

  o  David Mosberger-Tang for the freeware BIOS emulation and his
     support and encouragement,

  o  Last (and not least) Linus Torvalds for the timer code and his
     kernel.


  There are a number of things that still need doing to MILO, if you
  want to add something yourself, then do let me know
  david.rusling@reo.mts.dec.com <mailto:david.rusling@reo.mts.dec.com>
  so that we do not duplicate our efforts.
  Finally, a big thank you to Digital for producing such a wonderful
  chip (and paying me to do this).



  Linux/MIPS HOWTO
  Ralf Bchle, ralf@gnu.org
  June 24, 2000

  This FAQ describes the MIPS port of the Linux operating system, common
  problems and their solutions, availability and more.  It also tries to
  be a little helpful to other people who might read this FAQ in an
  attempt to find information that actually should be covered elsewhere.
  ______________________________________________________________________

  Table of Contents



  1. What is Linux/MIPS?

  2. Getting this FAQ

  3. What hardware does Linux/MIPS support?

     3.1 Hardware platforms
        3.1.1 Acer PICA
        3.1.2 Baget/MIPS series
        3.1.3 Cobalt Qube and Raq
        3.1.4 NEC machines
        3.1.5 NEC VR41xx-based platforms
        3.1.6 Toshiba TMPR39xx/Philips PR31700 platforms
        3.1.7 Netpower 100
        3.1.8 Nintendo 64
        3.1.9 Silicon Graphics Challenge S
        3.1.10 Silicon Graphics Indigo
        3.1.11 Silicon Graphics Indigo2
        3.1.12 Silicon Graphics Indy
           3.1.12.1 Strange numbers of available memory
           3.1.12.2 Indy PROM related problems
           3.1.12.3 ELF support in old PROM versions
           3.1.12.4 Why is so much memory reserved on my Indy?
        3.1.13 Silicon Graphics Origin 200 and 2000
        3.1.14 Silicon Graphics Onyx 2
        3.1.15 Silicon Graphics Power Series
        3.1.16 Serial console on SGI machines
        3.1.17 Other Silicon Graphics machines
        3.1.18 Sony Playstation
        3.1.19 SNI RM200C
        3.1.20 SNI RM200
        3.1.21 SNI RM300C
        3.1.22 SNI RM400
        3.1.23 SNI RW320
        3.1.24 Algorithmics P4032
        3.1.25 Algorithmics P5064
        3.1.26 DECstation series
        3.1.27 Mips Magnum 4000 / Olivetti M700-10
        3.1.28 MIPS Magnum 4000SC
     3.2 Processor types
        3.2.1 R2000, R3000 family
        3.2.2 R6000
        3.2.3 R4000 and R5000 family
        3.2.4 R8000
        3.2.5 R10000
     3.3 Hardware we're never going to support
        3.3.1 IBM RS6000
        3.3.2 VaxStation
        3.3.3 SGI VisPC
        3.3.4 Motorola 68k based machines like the Iris 3000

  4. Linux distributions.

     4.1 RedHat
     4.2 Debian

  5. Linux/MIPS net resources.

     5.1 Anonymous FTP servers.
     5.2 Anonymous CVS servers.
     5.3 Web servers.
     5.4 Web CVS server.
     5.5 Mailing lists.
     5.6 IRC channel.

  6. Installation of Linux/MIPS and common problems.
     6.1 NFS booting fails.
     6.2 Self compiled kernels crash when booting.
     6.3 Booting the kernel on the Indy fails with PROM error messages
     6.4 Where can I get the little endian firmware for my SNI?
     6.5 ld dies with signal 6
     6.6 My machine doesn't download the kernel when I try to netboot
     6.7 Bug in DHCP version 2

  7. Milo

     7.1 Building Milo
     7.2 Pandora

  8. Loadable Modules

  9. How do I setup a crosscompiler?

     9.1 Available binaries
     9.2 Building your own crosscompiler
     9.3 Diskspace requirements
     9.4 Byte order
     9.5 Configuration names
     9.6 Installation of GNU Binutils.
     9.7 Assert.h
     9.8 Installing the kernel sources
     9.9 First installation of egcs
     9.10 Test what you've done so far
     9.11 Installing GNU libc
     9.12 Building egcs again
     9.13 Should I build the C++, Objective C or F77 compilers?
     9.14 Known problem when crosscompiling
        9.14.1 IRIX crashes
        9.14.2 Resource limits on System V based hosts
     9.15 GDB

  10. Related Literature

     10.1 See MIPS Run
     10.2 The MIPS Programmer's Handbook
     10.3 Computer Architecture - A Quantitative Approach
     10.4 UNIX System V ABI MIPS Processor Supplement


  ______________________________________________________________________

  1.  What is Linux/MIPS?

  Linux/MIPS is a port of the widespread UNIX clone Linux to the MIPS
  architecture.  Linux/MIPS is running on a large number of technically
  very different systems ranging from little embedded systems and
  servers to large desktop machines and servers that, at least at the
  time when they were introduced into the market, were the best of their
  class.


  Linux/MIPS advantages over other operating systems at this time are

    The entire Linux system consists only of Free Software.

    Excellent Price/Performance ratio.

    Availability of large amounts of software of which a large part
     again is Free Software.

    Binary compatibility across a growing number of platforms.

    Small footprint making Linux/MIPS suitable for many embedded
     systems.

  In short, Linux has been designed and ships with Fahrvergngen.
  However as usual your mileage may vary and you should examine Linux's
  suitability for your purpose which purpose this document tries to
  serve.



  2.  Getting this FAQ

  You can download this document in various formats:


    The HTML version <http://oss.sgi.com/mips/mips-howto.html>

    The text version <http://oss.sgi.com/mips/mips-howto.txt>

    The Postscript version <http://oss.sgi.com/mips/mips-howto.ps>

    The Linux-Doc SGML version.  <http://oss.sgi.com/mips/mips-
     howto.sgml>

  This FAQ is also available as SGML source code via anonymous CVS from
  oss.sgi.com.  The archive also has a Makefile which will translate it
  into various formats.  An ASCII version is regularly being posted via
  comp.os.linux.answers and the other Linux HOWTO channels.


  3.  What hardware does Linux/MIPS support?

  3.1.  Hardware platforms


  Many machines are available with a number of different CPU options of
  which not all are currently supported.  Please check section
  ``Processor Types'' to make sure your CPU type is supported.  This is
  a listing of machines that are running Linux/MIPS, systems to which
  Linux/MIPS could be ported or systems that people have an interest in
  running Linux/MIPS.


  3.1.1.  Acer PICA

  The Acer PICA is derived from the Mips Magnum 4000 design.  It has a
  R4400PC CPU running at 133Mhz or optionally 150Mhz plus a 512kb
  (optionally 2mb) second level cache; the Magnum's G364 gfx card was
  replaced with a S3 968 based one.  The system is supported with the
  exception of the X server.


  3.1.2.  Baget/MIPS series

  The Baget series includes several boxes which have R3000 processors:
  Baget 23, Baget 63, and Baget 83.  Baget 23 and 63 have BT23-201 or
  BT23-202 motherboards with R3500A (which is basically a R3000A chip)
  at 25 MHz and R3081E at 50 MHz respectively.  The BT23-201 board has
  VME bus and VIC068, VAC068 chips as system controllers.  The BT23-202
  board has PCI as internal bus and VME as internal.  Support for
  BT23-201 board has been done by Gleb Raiko (rajko@mech.math.msu.su)
  and Vladimir Roganov (vroganov@msiu.ru) with a bit help from Serguei
  Zimin (zimin@msiu.ru).  Support for BT23-202 is under development
  along with Baget 23B which consists of 3 BT23-201 boards with shared
  VME bus.

  Baget 83 is mentioned here for completeness only. It has only 2mb RAM
  and it's too small to run Linux.  The Baget/MIPS code has been merged
  with the DECstation port; source for both is available at
  <http://decstation.unix-ag.org/>.


  3.1.3.  Cobalt Qube and Raq

  The Cobalt Qube product series are low cost headless server systems
  based on a IDT R5230.  Cobalt has developed its own Linux/MIPS variant
  to fit the special requirements of the Qube as well as possible.
  Basically the Qube kernel has been derived from Linux/MIPS 2.1.56,
  then backported to 2.0.30 for stability's sake, then optimized.
  Cobalt kernels are available from Cobalt's ftp site
  <http://www.cobaltnet.com>.  The Cobalt Qube support has never been
  integrated into the official Linux/MIPS 2.1.x kernels.


  3.1.4.  NEC machines

  The NEC uniprocessor machines are OEM Acer PICA systems, see that
  section for details.  The SMP systems are different from that.  The
  Linux/MIPS developers have no technical documentation as necessary to
  write an OS.  As long as this does not change this will pretty much
  stay a show stopper preventing a port to NEC's SMP systems.


  3.1.5.  NEC VR41xx-based platforms

  The Linux VR project is porting Linux to devices based on the NEC
  VR41xx microprocessors.  Many of these devices were originally
  designed to run Windows CE.  The project has produced working kernels
  with basic drivers for the Vadem Clio, Casio E-105, Everex Freestyle,
  and more.  For more information please see  <http://linux-vr.org/>.


  3.1.6.  Toshiba TMPR39xx/Philips PR31700 platforms

  Similar to the VR41xx, devices with these processors were originally
  intended for running Windows CE. However, there are working kernels
  with basic drivers for Sharp Mobilon and the Compaq C-Series. Support
  for more devices is under construction. The code is part of the Linux
  VR project and as such more information can be found at
  <http://linux-vr.org/>.


  3.1.7.  Netpower 100

  The Netpower 100 is apparently an Acer PICA in disguise.  It should
  therefore be supported but this is untested.  If there is a problem
  then it is probably the machine detection.


  3.1.8.  Nintendo 64

  The Nintendo 64 is R4300 based game console with 4mb RAM.  Its
  graphics chips were developed by Silicon Graphics for Nintendo.  Right
  now this port has pipe dream status and will continue to be in that
  state until Nintendo decides to publish the necessary technical
  information.  The question remains as to whether this is a good idea.


  3.1.9.  Silicon Graphics Challenge S

  This machine is very similar to the Indy; the difference is that it
  doesn't have a keyboard and a GFX card but has an additional SCSI
  WD33C95 based adapter.  This WD33C95 hostadapter is currently not
  supported.


  3.1.10.  Silicon Graphics Indigo

  This machine is only being mentioned here because occasionally people
  have confused it with Indys or the Indigo 2.  The Indigo is a
  different, R3000 based architecture however and not yet unsupported.


  3.1.11.  Silicon Graphics Indigo2

  This machine is the successor to the Indigo and is very similar to the
  Indy.  It is now supported, however it is lacking in several areas.
  You will have to use serial console. If you have a Indigo2 and still
  want to run Linux on it, contact either Florian Lohoff
  (flo@rfc822.org) or Klaus Naumann (spock@mgnet.de) .


  3.1.12.  Silicon Graphics Indy

  The Indy is currently the only (mostly) supported Silicon Graphics
  machine.  The only supported graphics card is the Newport card aka
  ``XL'' graphics.  The Indy is available with a large number of CPU
  options at various clock rates all of which are supported.  There's
  also a X server available now written by Guido Guenther
  (guido.guenther@gmx.net).  If you're able to use the Newport console
  on your Indy it should be possible to also use this X server. It's
  based on XFree86 4.0 and currently running at snail speed but seems to
  work quite ok.  If you want to try it take a look at
  <http://honk.physik.uni-konstanz.de/~agx/mipslinux/x/> .


  3.1.12.1.  Strange numbers of available memory

  On bootup the kernel on the Indy will report available memory with a
  message like

     Memory: 27976k/163372k available (1220k kernel code, 2324k data)



  The large difference between the first pair of numbers is caused by a
  128mb area in the Indy's memory address space which mirrors up to the
  first 128mb of memory.  The difference between the two numbers will
  always be about 128mb and does not indicate a problem of any kind.
  Kernels since 2.3.23 don't count this 128mb gap any longer.


  3.1.12.2.  Indy PROM related problems

  Several people have reported these problems with their machines after
  upgrading them typically from surplus parts.  There are several PROM
  versions for the Indy available.  Machines with old PROM versions
  which have been upgraded to newer CPU variants like a R4600SC or
  R5000SC module can crash during the self test with an error message
  like



     Exception: <vector=Normal>
     Status register: 0x30004803<CU1,CU0,IM7,IM4,IPL=???,MODE=KERNEL,EXL,IE>
     Cause register: 0x4000<CE=0,IP7,EXC=INT>
     Exception PC: 0xbfc0b598
     Interrupt exception
     CPU Parity Error Interrupt
     Local I/O interrupt register 1: 0x80 <VR/GIO2>
     CPU parity error register: 0x80b<B0,B1,B3,SYSAD_PAR>
     CPU parity error: address: 0x1fc0b598
     NESTED EXCEPTION #1 at EPC: 9fc3df00; first exception at PC: bfc0b598



  In that case you'll have to upgrade your machine's PROMs to a newer
  version or go back to an older CPU version.  Usually R4000SC or
  R4400SC modules should work in that case.  Just to be clear, this is a
  problem which is unrelated to Linux.  It's only mentioned here because
  several Linux users have asked about it.



  3.1.12.3.  ELF support in old PROM versions

  Old PROM versions don't know about the ELF binary format which the
  Linux kernel uses, that is can't boot Linux directly.  The preferable
  solution for this is of course a PROM upgrade.  Alternatively you can
  use Sash of IRIX 5 or newer to boot the kernel.  Sash knows how to
  load ELF binaries and doesn't care if it's an IRIX or Linux kernel.
  Simply type ``Sash'' to the prom monitor.  You should get another
  shell prompt, this time from Sash.  Now launch Linux as usual.

  Sash can read EFS or XFS filesystems or read the kernel from bootp /
  tftp.  That means if you intend to use Sash for booting the kernel
  from local disk you'll still have to have a minimal IRIX installation
  on your system.


  3.1.12.4.  Why is so much memory reserved on my Indy?

  On bootup the `Memory: ...' message on an Indy says that there is
  128mb of RAM reserved.  That is ok; just like the PC architecture has
  a gap in its memory address space between 640kb and 1024kb, the Indy
  has a 128mb-sized area in its memory map where the first 128mb of its
  memory is mirrored.  Linux knows about it and just ignores that
  memory, thus this message.



  3.1.13.  Silicon Graphics Origin 200 and 2000

  Ralf Bchle (ralf@gnu.org) and a team of SGI employees are currently
  working on a port to the Origin 200.  While still in it's early stages
  it's running in uniprocessor and multiprocessor mode and has drivers
  for the builtin IOC3 Ethernet and SCSI hostadapters.  The code is
  available in the Linux/MIPS CVS tree.



  3.1.14.  Silicon Graphics Onyx 2

  The Onyx 2 is basically an Origin 2000 with additional graphics
  hardware.  As of now about Linux support for the graphics hardware has
  not yet been decieded.  Aside of that Linux should run just as well as
  on a normal headless Origin 2000 configuration.


  3.1.15.  Silicon Graphics Power Series

  This is a very old series of R3000 SMP systems.  There is no hardware
  documentation for these machines, few of them exist anymore, the
  hardware is weird.  In short, chances that Linux will ever run on them
  are approximating zero.  Not that we want to disencourage takers ...


  3.1.16.  Serial console on SGI machines

  Make sure the kernel you're using includes the appropriate driver for
  a serial interface and serial console.  Set the console ARC
  environment variable to either the value d1 or d2 for Indy and
  Challenge S depending on which serial interface you're going to use as
  console.


  If you have the problem that all kernel messages appear on the serial
  console on bootup but everything is missing from the point when init
  starts, then you probably have the wrong setup for your /dev/console.
  You can find more information about this in the Linux kernel source
  documentation; it's in /usr/src/linux/Documentation/serial-console.txt
  if you have the kernel source installed.


  3.1.17.  Other Silicon Graphics machines

  At this time no other Silicon Graphics machine is supported.  This
  also applies to the very old Motorola 68k based systems.


  3.1.18.  Sony Playstation

  The Sony Playstation is based on an R3000 derivative and uses a set of
  graphics chips developed by Sony themselves.  While the machine in
  theory would be capable of running Linux, a port is difficult, since
  Sony so far hasn't provided the necessary technical information.  This
  still leaves the question of whether the port would be worthwhile.  So
  in short, nothing has happend yet even though many people have shown
  their interest in trying Linux on a Playstation so far.


  3.1.19.  SNI RM200C

  In contrast to the RM200 (see below) this machine has EISA and PCI
  slots.  The RM200 is supported with the exception of the availability
  of the onboard NCR53c810A SCSI controller.


  3.1.20.  SNI RM200

  If your machine has both EISA and PCI slots, then it is an RM200C;
  please see above.  Due to the slight architectural differences of the
  RM200 and the RM200C this machine isn't currently supported in the
  official sources.  Michael Engel (engel@numerik.math.uni-siegen.de)
  has managed to get his RM200 working partially but the patches haven't
  yet been included in the official Linux/MIPS sources.


  3.1.21.  SNI RM300C

  The RM300 is technically very similar to the RM200C.  It should be
  supported by the current Linux kernel, but we haven't yet received any
  reports.


  3.1.22.  SNI RM400

  The RM400 isn't supported.


  3.1.23.  SNI RW320

  This machine is a OEM variant of the SGI Indigo and therefore also
  still unsupported.


  3.1.24.  Algorithmics P4032

  The Algorithmics P4032 port is at the time of this writing still
  running Linux 2.1.36.


  3.1.25.  Algorithmics P5064

  The P5064 is basically an R5000-based 64bit variant of the P4032.  A
  port is ongoing.


  3.1.26.  DECstation series

  During the late 80's and the early 90's Digital (now Compaq) built
  MIPS based Workstations named DECstation resp. DECsystem. Other x86
  and Alpha based machines were sold under the name DECstation, but
  these are obviously not subject of this FAQ. Support for DECstations
  is still under development, started by Paul M. Antoine. These days
  most of the work is done by Harald Koerfgen
  (Harald.Koerfgen@home.ivm.de) and others. On the Internet, DECstation-
  related information can be found at <http://decstation.unix-ag.org/>.

  The DECstation family ranges from the DECstation 2100 with an
  R2000/R2010 chipset at 12 Mhz to the DECstation 5000/260 with a 60 MHz
  R4400SC.

  The following DECstation models are actively supported:

    2100, codename PMAX

    5000/xx (Personal DECstation), codename MAXine

    5000/1xx, codename 3MIN

    5000/200, codename 3MAX

    5000/2x0, codename 3MAX+

    5900/2x0 (identical to the 3MAX+).


  These DECstation models are orphaned because nobody is working on
  them, but support for these should be relatively easy to achieve.

    3100, identical to the 2100 except the R2000A/R2010A @ 16 MHz

    5100, codename MIPSMATE, almost identical to the 2100 but with an
     R3000/R3010 chipset.

  The other members of the DECstation family, besides the x86 based
  ones, should be considered as VAXen with the CPU replaced by a MIPS
  CPU.  There is absolutely no information available about these
  machines and support for them is unlikely to happen ever unless the
  VAXLinux port comes to a new life. These are:
    5400, codename MIPSFAIR

    5500, codename MIPSFAIR2

    5800, codename ISIS



  3.1.27.  Mips Magnum 4000 / Olivetti M700-10

  These two machines are almost completely identical.  Back during the
  ACE initiative Olivetti licensed the Jazz design and marketed the
  machine with Windows NT as OS.  MIPS Computer Systems, Inc. itself
  bought the Jazz design and marketed it as the MIPS Magnum 4000 series
  of machines.  Magnum 4000 systems were marketed with Windows NT and
  RISC/os as operating systems.


  The firmware on the machine depended on the operating system which was
  installed.  Linux/MIPS supports only the little endian firmware on
  these two types of machines.  Since the M700-10 was only marketed as
  an NT machine all M700-10 machines have this firmware installed.  The
  MIPS Magnum case is somewhat more complex.  If your machine has been
  configured big endian for RISC/os then you need to reload the little
  endian firmware.  This firmware was originally included on a floppy
  with the delivery of every Magnum.  If you don't have the floppy
  anymore you can download it via anonymous ftp from
  <ftp://ftp.fnet.fr>.


  It is possible to reconfigure the M700 for headless operation by
  setting the firmware environment variables ConsoleIn and ConsoleOut to
  multi()serial(0)term().  Also try the command listdev which will show
  the available ARC devices.

  In some cases, like where the G364 graphics card is missing but the
  console is still configured to use normal graphics it will be
  necessary to set the configuration jumper JP2 on the board.  After the
  next reset the machine will reboot with the console on COM2.


  3.1.28.  MIPS Magnum 4000SC

  The Mips Magnum 4000SC is the same as a Magnum 4000 (see above) with
  the exception that it uses an R4000SC CPU.


  3.2.


  Processor types

  3.2.1.  R2000, R3000 family

  The R2000 is the original MIPS processor.  It's a 32 bit processor
  which was clocked at 8MHz back in '85 when the first MIPS processors
  came to the market.  Later versions were clocked faster:  for
  instance, the R3000 is a 100% compatible redesign of the R2000, just
  clocked faster.  Because of their high compatibility, where this
  document mentions the R3000, in most cases the same facts also apply
  to the R2000.  The R3000A is basically an R2000 plus an R3010 FPU and
  64k cache running at up to 40Mhz and integrated into the same chip.


  Harald Koerfgen (Harald.Koerfgen@home.ivm.de) and Gleb O. Raiko
  (raiko@niisi.msk.ru) have both independently worked on patches for
  R3000 processors.  The work has been merged and is integrated into the
  official Linux/MIPS sources since July 1999. Actually Linux supports
  R3000 processors including some derivatives like the R3081 and the
  TMPR3912/PR31700



  3.2.2.  R6000

  Sometimes people confuse the R6000, a MIPS processor, with RS6000, a
  series of workstations made by IBM.  So if you're reading this in hope
  of finding out more about Linux on IBM machines you're reading the
  wrong document.


  The R6000 is currently not supported.  It is a 32-bit MIPS ISA 2
  processor and a pretty interesting and weird piece of silicon.  It was
  developed and produced by a company named BIT Technology.  Later NEC
  took over the semiconductor production.  It was built in ECL
  technology, the same technology that was and still is being used to
  build extremely fast chips like those used in some Cray computers.
  The processor had its TLB implemented as part of the last couple of
  lines of the external primary cache, a technology called TLB slice.
  That means its MMU is substantially different from those of the R3000
  or R4000 series, which is also one of the reasons why the processor
  isn't supported.


  3.2.3.  R4000 and R5000 family

  Linux supports many of the members of the R4000 family.  Currently
  these are R4000PC, R4400PC, R4300, R4600, R4700, R5000, R5230, R5260.
  Many others are probably working as well.

  Not supported are R4000MC and R4400MC CPUs (that is multiprocessor
  systems) as well as R5000 systems with a CPU controlled second level
  cache.  This means where the cache is controlled by the R5000 itself
  in contrast to some external external cache controller.  The
  difference is important because, unlike other systems, especially PCs,
  on MIPS the cache is architecturally visible and needs to be
  controlled by software.

  Special credit goes to Ulf Carlsson (ulfc@engr.sgi.com) who provided
  the CPU module for debugging the R4000SC / R4400SC support.


  3.2.4.  R8000

  The R8000 is currently unsupported partly because this processor is
  relatively rare and has only been used in a few SGI machines, partly
  because the Linux/MIPS developers don't have such a machine.

  The R8000 is a pretty interesting piece of silicon.  Unlike the other
  members of the MIPS family it is a set of seven chips.  It's cache and
  TLB architecture are pretty different from the other members of the
  MIPS family.  It was born as a quick hack to get the floating point
  crown back to Silicon Graphics before the R10000 is finished.


  3.2.5.  R10000

  The R10000 is supported as part of the mips64 kernel which currently
  is supported on the IP22 (SGI Indy, Challenge S and Indigo 2) and
  Origin.


  Due to the very hard to handle way this processor works in non-
  cachecoherent systems it's probably still taking some time until we
  support this processor in such systems.  As of today these systems are
  the SGI O2 and Indigo



  3.3.  Hardware we're never going to support


  3.3.1.  IBM RS6000

  As the name say these are IBM machines which are based on the RS6000
  processor series and as such they're not subject of the Linux/MIPS
  project.  People frequently confuse the IBM RS6000 with the MIPS R6000
  architecture.  However the Linux/PPC project might do so.  Checkout
  <http://www.linuxppc.org/> for further information.


  3.3.2.  VaxStation

  As the name already implies this machine is a member of Digital
  Equipment's VAX family.  It's mentioned here because people often
  confuse it with Digital's MIPS based DECstation family due to the
  similar type numbers. These two families of architectures share little
  technical similarities.  Unfortunately the VaxStation, like the entire
  VAX family, is currently unsupported.


  3.3.3.  SGI VisPC

  This is actually an x86 based system, therefore not covered by this
  FAQ.  But to make your search for answers simple, here it is.  Ken
  Klingman (kck@mailbox.esd.sgi.com) posted on January 17, 1999 to SGI's
  Linux mailing list:

     We are working on it.  We're actually close to getting
     the base level system support into the 2.2 release.
     Software-only X and OpenGL should follow relatively
     shortly, but hardware-accelerated OpenGL is still
     some time off.  See www.precisioninsight.com for
     news about hardware-accelerated OpenGL.



  For more information see the Documentation/ of Linux kernel versions
  from 2.2.0 and newer.  There is additional information available on
  the web on <http://oss.sgi.com/>.  Note that the SGI/MIPS and
  SGI/Intel people are working independently of each other, therefore
  the sources in the anonymous CVS on oss.sgi.com may or may not work
  for Intel machines; we don't test this.


  3.3.4.  Motorola 68k based machines like the Iris 3000

  These are very old machines, probably more than ten years old by now.
  As these machines are not based on MIPS processors this document is
  the wrong place to search for information.  However, in order to make
  things easy, these machines are currently not supported.


  4.  Linux distributions.



  4.1.  RedHat

  For MIPSeb, there's Rough Cuts Linux, previously known as Hard Hat
  Linux, which is most of Red Hat Linux 5.1 ported for MIPSeb.  You can
  get this at <ftp://oss.sgi.com/pub/hardhat>.

  It is also bundled along with M68k, UltraSparc and PowerPC in a
  package called "Rough Cuts" pressed by Red Hat, and available wherever
  Red Hat products are sold.  This is a very convenient way to get it
  without having to download 280MB.  You can order Rough Cuts directly
  from Red Hat at <http://www.redhat.com/product.phtml/RC1000>.

  As well, there's a distribution based on Red Hat 5.2 that's targetting
  the Cobalt Qubes; those binaries will work perfectly on other MIPSel
  architectures available at <ftp://intel.cleveland.lug.net/pub/Mipsel>.
  <ftp://bolug.uni-bonn.de/mips> has various rpm packages from
  Redhat 6.0 and 6.1.


  4.2.  Debian

  A Debian port is underway.  Current efforts are being bootstrapped
  using SGI/Linux as a base, and dpkg compiles natively with few
  changes.  In addition to the SGI version, some interest has been shown
  in little endian platforms.  Keep an eye on the Debian-MIPS Port page,
  <http://www.debian.org/ports/mips/> for developments.


  5.  Linux/MIPS net resources.


  5.1.  Anonymous FTP servers.

  The two primary anonymous FTP servers for Linux/MIPS are

     oss.sgi.com
        This server should satisfy almost all your Linux/MIPS related
        ftp desires.  Really.


     ftp.fnet.fr
        This server is currently pretty outdated; it's included here
        mostly for completeness and for people with interest in
        prehistoric software.

  On all these ftp servers there is a list of mirror sites you may want
  to use for faster access.


  Another source for little endian MIPS binaries is
  ftp://intel.cleveland.lug.net/pub/Mipsel which carries mostly newer
  versions of binaries for the Redhat flavour shipping with the
  Cobalt's.



  5.2.  Anonymous CVS servers.

  For those who always want to stay on the bleeding edge and want to
  avoid having to download patch files or full tarballs we also have an
  anonymous CVS server.  Using CVS you can checkout the Linux/MIPS
  source tree with the following commands:



     cvs -d :pserver:cvs@oss.sgi.com:/cvs login
     (Only needed the first time you use anonymous CVS, the password is "cvs")
     cvs -d :pserver:cvs@oss.sgi.com:/cvs co <repository>



  where you insert linux, libc, gdb or faq for <repository>.

  The other important CVS archive of the Linux community is
  vger.rutgers.edu where a lot of code is being collected before being
  sent to Linus for distribution.  Although vger itself no longer offers
  anonymous access, there are mirror sites which do provide anonymous
  access.  For details how to access them see
  <http://cvs.on.openprojects.net/>.  The modules which are of interest
  are ``linux'', ``modutils'', ``pciutils'', ``netutils''.


  5.3.  Web servers.

  The two primary web servers for Linux/MIPS are

      <http://oss.sgi.com/mips>
        This server covers most of Linux/MIPS; it's somewhat SGI centric
        but since Linux/MIPS tries to be the same on every platform most
        of its information is of interest to all users.

      <http://lena.fnet.fr>
        This server is currently pretty outdated; it's included here
        mostly for completeness.

  All these servers have mirrors scattered all over the world; you may
  want to use one for best performance.


  5.4.  Web CVS server.

  Via  <http://oss.sgi.com/mips/cvsweb> you have directs access the new
  Linux/MIPS kernel sources and a few other projects hosted in the same
  CVS archive.  The intuitive interface allows you to follow the
  development at the click of your mouse.


  5.5.  Mailing lists.

  There are three Linux/MIPS oriented mailing lists:

     linux-mips@fnet.fr
        This mailing list is used for most non-SGI related communication
        of all kinds.  Subscription is handled by a human; send your
        subscription requests to linux-mips-request@fnet.fr.  You can
        unsubscribe from this mailing list by sending unsubscribe <your-
        email-address> to the same address.


     linux-mips@oss.sgi.com
        This mailing list currently has the most traffic.  It's somewhat
        SGI-centric but is nevertheless of interest especially to
        developers as a good number of SGI engineers are subscribed to
        this list.  Subscription to this list is handled via Majordomo
        (majordomo@oss.sgi.com); just send an email with the words
        subscribe linux.  In order to unsubscribe send unsubscribe
        linux.  Note that you have to be subscribed if you want to post;
        the growth of spam forced us into that policy.  For more
        information see also  <http://oss.sgi.com/mips/email.html>.


     linux-mips@vger.rutgers.edu
        This mailing list has only very low traffic as most people tend
        to use one of the above mailing lists.  Subscription is handled
        via Majordomo (majordomo@vger.rutgers.edu); just send an email
        with the words subscribe linux-mips.  In order to unsubscribe
        send unsubscribe linux-mips.


  5.6.  IRC channel.

  There is a IRC channel named #mipslinux for Linux/MIPS which may be
  found on irc.openprojects.net.


  6.  Installation of Linux/MIPS and common problems.



  6.1.  NFS booting fails.

  Usually the reason for this is that people have unpacked the tar
  archive under IRIX, not Linux.  Since the representation of device
  files over NFS is not standardized between various Unices, this fails.
  The symptom is that the system dies with the error message ``Warning:
  unable to open an initial console.'' right after mounting the NFS
  filesystem.


  For now the workaround is to use a Linux system (doesn't need to be
  MIPS) to unpack the installation archive onto the NFS server.  The NFS
  server itself may be any type of UNIX.



  6.2.  Self compiled kernels crash when booting.

  When I build my own kernel, it crashes.  On an Indy the crash message
  looks like the following; the same problem hits other machines as well
  but may look completely different.


     Exception: <vector=UTLB Miss>
     Status register: 0x300004803<CU1,CU0,IM4,IPL=???,MODE=KERNEL,EXL,IE>
     Cause register: 0x8008<CE=0,IP8,EXC=RMISS>
     Exception PC: 0x881385cc, Exception RA: 0x88002614
     exception, bad address: 0x47c4
     Local I/O interrupt register 1: 0x80 <VR/GIO2>
     Saved user regs in hex (&gpda 0xa8740e48, &_regs 0xa8741048):
       arg: 7 8bfff938 8bfffc4d 880025dc
       tmp: 8818c14c 8818c14c 10 881510c4 14 8bfad9e0 0 48
       sve: 8bfdf3e8 8bfffc40 8bfb2720 8bfff938 a8747420 9fc56394 0 9fc56394
       t8 48 t9 8bfffee66 at 1 v0 0 v1 8bfff890 k1 bad11bad
       gp 881dfd90 fp 9fc4be88 sp 8bfff8b8 ra 88002614

     PANIC: Unexpected exception



  This problem is caused by a still unfixed bug in Binutils newer than
  version 2.7.  As a workaround, change the following line in
  arch/mips/Makefile from:



     LINKFLAGS       = -static -N



  to:


     LINKFLAGS       = -static



  6.3.  Booting the kernel on the Indy fails with PROM error messages


     >> boot bootp()/vmlinux
     73264+592+11520+331680+27848d+3628+5792 entry: 0x8df9a960
     Setting $netaddres to 192.168.1.5 (from server deadmoon)
     Obtaining /vmlinux from server deadmoon

     Cannot load bootp()/vmlinux
     Illegal f_magic number 0x7f45, expected MIPSELMAGIC or MIPSEBMAGIC.



  This problem only happens for Indys with very old PROM versions which
  cannot handle the ELF binary format which Linux uses.  A solution for
  this problem is in the works.


  6.4.  Where can I get the little endian firmware for my SNI?


  SNI's system can be operated in both big and little endian modes.  At
  this time Linux/MIPS only supports the little endian firmware.  This
  is somewhat unlucky since SNI hasn't shipped that firmware for quite
  some time, since they dropped NT.

  When running in big endian mode the firmware looks similar to an SGI
  Indy which is already supported, therefore fixing the SNI support will
  be relativly easy.  Interested hackers should contact Ralf Bchle
  (ralf@gnu.org).


  6.5.  ld dies with signal 6


     collect2: ld terminated with signal 6 [Aborted]



  This is a known bug in older binutils versions.  You will have to
  upgrade to binutils 2.8.1 plus very current patches.


  6.6.  My machine doesn't download the kernel when I try to netboot


  Your machine is replying to the BOOTP packets (you may verify this
  using a packet sniffer like tcpdump or ethereal) but doesn't download
  the kernel from your BOOTP server. This is happens if your boot server
  is running a kernel of the 2.3 series or higher. The problem may be
  circumvented by doing a "echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc"
  as root on your boot server.


  6.7.  Bug in DHCP version 2

  When using DHCP version 2 you might see the following problem: Your
  machines receives it's BOOTP reply 3 times but refuses to start TFTP.
  You can fix this by doing a "unsetenv netaddr" in the PROM command
  monitor before you boot your system. DHCP version 3 fixes that
  problem.


  7.  Milo

  Milo is the boot loader used to boot the little endian MIPS systems
  with ARC firmware, currently the Jazz family and the SNI RM 200.
  While Milo uses the same name and has a similar purpose to the Alpha
  version of Milo, these two Milos have nothing else in common.  They
  were developed by different people, don't share any code, and work on
  different hardware platforms.  The fact that both have the same name
  is just a kind of historic ``accident''.

  Plans are to remove the need for Milo in the near future.



  7.1.  Building Milo

  The building procedure of Milo is described in detail in the README
  files in the Milo package.  Since Milo has some dependencies to kernel
  header files which have changed over time Milo often cannot be built
  easily; however the Milo distribution includes binaries for both Milo
  and Pandora.


  7.2.  Pandora

  Pandora is a simple debugger.  It has been primarily developed in
  order to analyze undocumented systems.  Pandora includes a
  dissassembler, memory dump functions and more.  If you only want to
  use Linux there is no need to install Pandora.  It's small though.


  8.  Loadable Modules

  Using modules on Linux/MIPS is quite easy; it should work as expected
  for people who have used it on other Linux systems.  If you want to
  run a module-based system then you should have at least kernel version
  980919 and modutils newer than version 2.1.121 installed.  Older
  versions won't work.


  9.  How do I setup a crosscompiler?


  9.1.  Available binaries

  The easist thing to setup a crosscompiler is to just download the
  binaries.  For Linux/i386 hosts and big endian targets this are the
  packages:



    binutils-mips-linux-2.8.1-1.i386.rpm
    egcs-c++-mips-linux-1.0.3a-1.i386.rpm
    egcs-g77-mips-linux-1.0.3a-1.i386.rpm
    egcs-libstdc++-mips-linux-2.8.0-1.i386.rpm
    egcs-mips-linux-1.0.3a-1.i386.rpm
    egcs-objc-mips-linux-1.0.3a-1.i386.rpm



  And this is the list of packages for little endian targets:

    binutils-mipsel-linux-2.8.1-1.i386.rpm
    egcs-c++-mipsel-linux-1.0.3a-1.i386.rpm
    egcs-g77-mipsel-linux-1.0.3a-1.i386.rpm
    egcs-libstdc++-mipsel-linux-2.8.0-1.i386.rpm
    egcs-mipsel-linux-1.0.3a-1.i386.rpm
    egcs-objc-mipsel-linux-1.0.3a-1.i386.rpm



  It's not necessary that you install all these packages; most people
  can just omit the C++, Objective C and Fortran 77 compilers.  The
  Intel binaries have been linked against GNU libc 2.1, so you may have
  to install that as well when upgrading.


  9.2.  Building your own crosscompiler

  First of all go and download the following source packages and
  patches:

    binutils-2.8.1.tar.gz

    binutils-2.8.1-2.diff.gz

    egcs-1.0.3a.tar.gz

    egcs-1.0.3a-1.diff.gz

    glibc-2.0.6.tar.gz

    glibc-crypt-2.0.6.tar.gz

    glibc-localedata-2.0.6.tar.gz

    glibc-linuxthreads-2.0.6.tar.gz

     These are the currently recommended versions.  Older versions may
     or may not be working.  If you're trying to use older versions
     please don't send bug reports; we don't care.  When installing
     please install things in the order binutils, egcs, then glibc.
     Unless you have older versions already installed, changing the
     order will fail.  The installation description below mentions a
     number of patches which you can get from the respective SRPM
     packages on oss.sgi.com.  However since these SRPM packages are
     intended to be compiled natively it's not possible to just rebuild
     them.


  9.3.  Diskspace requirements

  For the installation you'll have to choose a directory for
  installation.  I'll refer to that directory below with <prefix>.  To
  avoid a certain problem it's best to use the same value for <prefix>
  as your native gcc.  For example if your gcc is installed in
  /usr/bin/gcc then choose /usr for <prefix>.  You must use the same
  <prefix> value for all the packages that you're going to install.

  During compilation you'll need about 31mb diskspace for binutils; for
  installation you'll need 7mb diskspace for on <prefix>'s partition.
  Building egcs requires 71mb and installation 14mb.  GNU libc requires
  149mb diskspace during compilation and 33mb for installation.  Note
  these numbers are just a guideline and may differ significantly for
  different processor and operating system architectures.


  9.4.  Byte order

  One of the special features of the MIPS architecture is that all
  processors except the R8000 can be configured to run either in big or
  in little endian mode.  Byte order means the way the processor stores
  multibyte numbers in memory.  Big endian machines store the byte with
  the highest value digits at the lowest address while little endian
  machines store it at the highest address.  Think of it as writing
  multi-digit numbers from left to right or vice versa.

  In order to setup your crosscompiler correctly you have to know the
  byte order of the crosscompiler target.  If you don't already know,
  check the section ``Hardware Platforms'' for your machine's byteorder.


  9.5.  Configuration names

  Many of the packages based on autoconf support many different
  architectures and operating systems.  In order to differentiate
  between these many configurations, names are constructed with
  <cpu>-<company>-<os> or even <cpu>-<company>-<kernel>-<os>.  Expressed
  this way the configuration names of Linux/MIPS are mips-unknown-linux-
  gnu for big endian targets or mipsel-unknown-linux-gnu for little
  endian targets.  These names are a bit long and are allowed to be
  abbreviated to mips-linux or mipsel-linux.  You must use the same
  configuration name for all packages that comprise your
  crosscompilation environment.  Also, while other names like mips-sni-
  linux or mipsel-sni-linux are legal configuration names, use mips-
  linux or mipsel-linux instead; these are the configuration names known
  to other packages like the Linux kernel sources and they'd otherwise
  have to be changed for crosscompilation.

  I'll refer to the target configuration name below with <target>.


  9.6.  Installation of GNU Binutils.

  This is the first and simplest part - at least as long as you're
  trying to install on any halfway-sane UNIX flavour.  Just cd into a
  directory with enough free space and do the following:

     gzip -cd binutils-<version>.tar.gz | tar xf -
     cd binutils-<version>
     patch -p1 < ../binutils-<version>-mips.patch
     ./configure --prefix=<prefix> --target=<target>
     make CFLAGS=-O2
     make install



  This usually works very easily.  On certain machines using GCC 2.7.x
  as compiler is known to dump core.  This is a known bug in GCC and can
  be fixed by upgrading to GCC 2.8.1 or egcs.

  9.7.  Assert.h

  Some people have an old assert.h headerfile installed, probably a
  leftover from an old crosscompiler installation.  This file may cause
  autoconf scripts to fail silently; it was never necessary and was only
  installed because of a bug in older GCC versions.  Check to see if the
  file <prefix>/<target>/include/assert.h exists in your installation.
  If so, just delete the it: it should never have been installed for any
  version of the crosscompiler and will cause trouble.


  9.8.  Installing the kernel sources

  Installing the kernel sources is simple.  Just place them into some
  directory of your choice and configure them.  Configuring them is
  necessary such that files which are generated by the procedure will be
  installed.  Make shure you enable CONFIG_CROSSCOMPILE near the end of
  the configuration process.  The only problem you may run into is that
  you may need to install some required GNU programs like bash or have
  to override the manufacturer-provided versions of programs by placing
  the GNU versions earlier in the PATH variable.  Now go to the
  directory <prefix>/<target>/include and create two symbolic links
  named asm and linux pointing to include/asm rsp. include/linux within
  your just installed and configured kernel sources.  These are
  necessary such that necessary header files will be found during the
  next step.


  9.9.  First installation of egcs

  Now the not-so-funny part begins:  there is a so-called bootstrap
  problem.  In our case that means the installation process of egcs
  needs an already- installed glibc, but we cannot compile glibc because
  we don't have a working crosscompiler yet.  Luckily you'll only have
  to go through this once when you install a crosscompiler for the first
  time.  Later when you already have glibc installed things will be much
  smoother.  So now do:

     gzip -cd egcs-1.0.3a.tar.gz | tar xf -
     cd egcs-<version>
     patch -p1 < ../egcs-1.0.3a-mips.patch
     ./configure --prefix=<prefix> --with-newlib --target=<target>
     make SUBDIRS="libiberty texinfo gcc" ALL_TARGET_MODULES= \
             CONFIGURE_TARGET_MODULES= INSTALL_TARGET_MODULES= LANGUAGES="c"



  Note that we deliberately don't build gcov, protoize, unprotoize and
  the libraries.  Gcov doesn't make sense in a crosscompiler environment
  and protoize and unprotoize might even overwrite your native programs
  - this is a bug in the gcc makefiles.  Finally we cannot build the
  libraries because we don't have glibc installed yet.  If everything
  went successfully, install with:

     make SUBDIRS="libiberty texinfo gcc" INSTALL_TARGET_MODULES= \
             LANGUAGES="c" install



  If you only want the crosscompiler for building the kernel, you're
  done.  Crosscompiling libc is only required to be able to compile user
  applications.



  9.10.  Test what you've done so far

  Just to make shure that what you've done so far is actually working
  you may now try to compile the kernel.  Cd to the MIPS kernel's
  sources and type ``make clean; make dep; make''.  If everything went
  ok do ``make clean'' once more to clean the sources.


  9.11.  Installing GNU libc

  Do:

     gzip -cd glibc-2.0.6.tar.gz | tar xf -
     cd glibc-2.0.6
     gzip -cd glibc-crypt-2.0.6.tar.gz | tar xf -
     gzip -cd glibc-localedata-2.0.6.tar.gz | tar xf -
     gzip -cd glibc-linuxthreads-2.0.6.tar.gz | tar xf -
     patch -p1 < ../glibc-2.0.6-mips.patch
     mkdir build
     cd build
     CC=<target>-gcc BUILD_CC=gcc AR=<target>-ar RANLIB=<target>-ranlib \
           ../configure --prefix=/usr --host=<target> \
           --enable-add-ons=crypt,linuxthreads,localedata --enable-profile
     make



  You now have a compiled GNU libc which still needs to be installed.
  Do not just type make install.  That would overwrite your host sys
  tem's files with Linux/MIPS-specific files with disastrous effects.
  Instead install GNU libc into some other arbitrary directory <somedir>
  from which we'll move the parts we need for crosscompilation into the
  actual target directory:

     make install_root=<somedir> install



  Now cd into <somedir> and finally install GNU libc manually:

     cd usr/include
     find . -print | cpio -pumd <prefix>/<target>/include
     cd ../../lib
     find . -print | cpio -pumd <prefix>/<target>/lib
     cd ../usr/lib
     find . -print | cpio -pumd <prefix>/<target>/lib



  GNU libc also contains extensive online documentation.  Your systems
  might already have a version of this documentation installed, so if
  you don't want to install the info pages, which will save you a less
  than a megabyte, or already have them installed, skip the next step:

     cd ../info
     gzip -9 *.info*
     find . -name \*.info\* -print | cpio -pumd <prefix>/info



  If you're not bootstrapping your installation is now finished.



  9.12.  Building egcs again

  The first attempt of building egcs was stopped by lack of a GNU libc.
  Since we now have libc installed we can rebuild egcs but this time as
  complete as a crosscompiler installation can be:

     gzip -cd egcs-<version>.tar.gz | tar xf -
     cd egcs-<version>
     patch -p1 < ../egcs-1.0.3a-mips.patch
     ./configure --prefix=<prefix> --target=<target>
     make LANGUAGES="c c++ objective-c f77"



  As you can see the procedure is the same as the first time with the
  exception that we dropped the --with-newlib option.  This option was
  necessary to avoid the libgcc build breaking due to the lack of libc.
  Now install with:

     make LANGUAGES="c c++ objective-c f77" install



  You're almost finished.  If you think you don't need the Objective C
  or F77 compilers you can omit them from above commands; each will save
  you about 3mb.  Do not build gcov, protoize or unprotoize.


  9.13.  Should I build the C++, Objective C or F77 compilers?

  The answer to this question largely depends on your use of your
  crosscompiler environment.  If you only intend to rebuild the Linux
  kernel then you have no need for the full blown setup and can safely
  omit the Objective C and F77 compilers.  You must, however, build the
  C++ compiler, because building the libraries included with the egcs
  distribution requires C++.


  9.14.  Known problem when crosscompiling


  9.14.1.  IRIX crashes

  Origin 200 running IRIX 6.5.1 may crash when running ``make depend''
  on the Linux kernel sources.  IRIX 6.5 on Indy and IRIX 6.5.4 on
  Origin 200 are known to work.  Further reports on that help isulating
  the problematic configuration are welcome.


  9.14.2.  Resource limits on System V based hosts

  Typical System V based Unices like IRIX or Solaris have limits for the
  maximum number of arguments to be passed to a child process which may
  be exceeded when crosscompiling some software like the Linux kernel or
  GNU libc.  For IRIX systems the maximum length of the argument list
  defaults to 20kb while Linux defaults to at least 128kb.  This size
  can be modified by the command ``systune ncargs 131072'' as root.


  9.15.  GDB

  Building GDB as crossdebugger is only of interest to kernel
  developers; for them GDB may be a life saver.  Such a remote debugging
  setup always consists of two parts:  the remote debugger GDB running
  on one machine and the target machine running the Linux/MIPS kernel
  being debugged.  The machines are typically interconnected with a
  serial line.  The target machine's kernel needs to be equipped with a
  ``debugging stub'' which communicates with the GDB host machine using
  the remote serial protocol.


  Depending on the target's architecture you may have to implement the
  debugging stub yourself.  In general you'll only have to write very
  simple routines for serial.  The task is further simplified by the
  fact that most machines are using similar serial hardware typically
  based on the 8250, 16450 or derivatives.



  10.  Related Literature


  10.1.  See MIPS Run

  author Dominic Sweetman, published Morgan Kaufmann, ISBN
  1-55860-410-3.

  This is intended as a pretty comprehensive guide to programming MIPS,
  wherever it's different from programming any other 32-bit CPU.  It's
  the first time anyone tried to write a readable and comprehensive
  explanation and account of the wide range of MIPS CPUs available, and
  should be very helpful for anyone programming MIPS who isn't insulated
  by someone else's operating system.  And the author is a free-unix
  enthusiast who subscribes to the Linux/MIPS mailing list!

  John Hennessey, father of the MIPS architecture, was kind enough to
  write in the foreword: ``... this book is the best combination of
  completeness and readability of any book on the MIPS architecture
  ...'';

  It includes some context about RISC CPUs, a description of the
  architecture and instruction set including the "co-processor 0"
  instructions used for CPU control; sections on caches, exceptions,
  memory management and floating point.  There's a detailed assembly
  language guide, some stuff about porting, and some fairly heavy-duty
  software examples.

  Available from:


    <http://www.algor.co.uk/algor/info/seemipsrun.html> (europe)

    <http://www.mkp.com/books_catalog/1-55860-410-3.asp> (US)

  and from good bookshops anywhere.  It's 512 pages and costs around $50
  in the US, 39.95 in the UK.

  I'd be inclined to list two other books too, both from Morgan Kaufmann
  and available from www.mkp.com or any good bookshop:


  10.2.  The MIPS Programmer's Handbook

  authors Farquhar and Bunce, published by Morgan Kaufmann,
  ISBN 1-55860-297-6.

  A readable introduction to the practice of programming MIPS at the low
  level, by the author of PMON.  Strengths: lots of examples; weakness:
  leaves out some big pieces of the architecture (such as memory
  management, floating point and advanced caches) because they didn't
  feature in the LSI ``embedded''; products this book was meant to
  partner.


  10.3.  Computer Architecture - A Quantitative Approach

  authors Hennessy & Patterson, published Morgan Kaufmann,
  ISBN 1-55860-329-8.

  The bible of modern computer architecture and a must-read if you want
  to understand what makes programs run slow or fast.  Is it about MIPS?
  Well, it's mostly about something very like MIPS...  Its sole defect
  is its size and weight - but unlike most big books it's worth every
  page.


  10.4.  UNIX System V ABI MIPS Processor Supplement

  by Prentice Hall, published 05/1991, ISBN 0-13880-170-3.  This book
  defines many of the MIPS specific technical standards like calling
  conventions, ELF properties and much more that are being used by
  Linux/MIPS.  Unfortunately it's out of print.  Similarly the site
  "http://www.mipsabi.org/" is offline.



  The Linux MP3-HOWTO
  By Phil Kerr, phil@plus24.com
  v1.40, April 2000

  This document describes the hardware, software and procedures needed
  to encode, play, mix and stream MP3 sound files under Linux.
  ______________________________________________________________________

  Table of Contents



  1. Introduction.

  2. Copyright of this document.

  3. Where to get this document.

     3.1 Translations

  4. Acknowledgments.

  5. Disclaimer.

  6. Hardware Requirements & Performance Issues.

  7. Software Requirements.

     7.1 Rippers & WAV Recorders
     7.2 Encoders
     7.3 Players
     7.4 Streaming Servers
     7.5 Mixing
     7.6 Misc

  8. Setting up your system.

     8.1 Setting up for Analogue Audio Capture
     8.2 Setting up for CD-ROM Audio Capture
     8.3 Additional Setting up

  9. Encoding from Audio.

  10. Encoding from CD-ROM.

     10.1 Command Line encoding
        10.1.1 RipEnc
     10.2 GUI Based Encoders
     10.3 Encoder Performance

  11. Streaming MP3's

     11.1 Icecast
        11.1.1 Shout
        11.1.2 LiveIce
     11.2 Fluid
     11.3 Bandwith considerations
     11.4 Copyright Issues

  12. Listening to MP3's.

     12.1 Playing from File
     12.2 Playing from MP3 Streams
     12.3 Mixing
        12.3.1 eMixer

  13. Feedback.



  ______________________________________________________________________

  1.  Introduction.

  This document describes the hardware, software and procedures needed
  to encode, play, mix and stream MP3 sound files under Linux.


  It covers:

  Encoding MP3's from a live or external source.

  Encoding MP3's from audio CD's.

  Streaming MP3's over a network.

  Listening to MP3's.

  Mixing MP3's

  2.  Copyright of this document.

  This HOWTO is copyrighted 2000 Phil Kerr.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO co-ordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO co-
  ordinator, at linux-howto@metalab.unc.edu via email.


  3.  Where to get this document.

  The most recent official version of this document can be obtained from
  the Linux Documentation Project  <http://www.linuxdoc.org/>.

  The homepage for this HOWTO is:   <http://www.mp3-howto.com>


  3.1.  Translations

  This HOWTO has been translated into the following languages:

  Please note that translations may be slightly out of date from this
  document as, naturally enough, the translations take time.

  Korean

  <http://kldp.org/HOWTO/MP3-HOWTO> By Lee,So-min <animator@nownuri.net>

  French

  <http://www.freenix.org/unix/linux/HOWTO/MP3-HOWTO.html> By Arnaud
  Gomes-do-Vale <arnaud@carrosse.frmug.org>

  Hungarian


  <http://free.netlap.hu/howto/MP3-HOGYAN.html> By Andras Timar
  <atimar@itp.hu>

  Italian

  <ftp://ftp.pluto.linux.it/pub/pluto/ildp/HOWTO/MP3-HOWTO> By Mariani
  Dario <darkpand@uni.net>

  Spanish

  <http://www.insflug.org/documentos/MP3-Como> By Arielo
  <larocka@yahoo.com>

  Dutch

  <http://nl.linux.org/doc/HOWTO/MP3-HOWTO-NL.html> By Reggy Ekkebus
  <reggy@zeelandnet.nl>

  Japanese

  <http://www.linux.or.jp/JF/JFdocs/MP3-HOWTO.html> By Saito Kan <can-
  s@geocities.co.jp>

  Many thanks to the above translators.  If you can translate this
  HOWTO, please drop the author an email. Also please state the URL
  where the translation will be housed.


  4.  Acknowledgments.

  In writing this HOWTO I have had to draw heavily on the Sound-HOWTO By
  Jeff Tranter, and the Sound-Playing-HOWTO By Yoo C. Chung.

  Thanks also to the other HOWTO authors whose works I have referenced:

  Linux System Administrators Guide By Lars Wirzenius.

  Linux Network Administrators Guide By Olaf Kirch.

  Multi Disk System Tuning HOWTO By Stein Gjoen.

  Also a big thank-you to all who have sent in feedback, comments and
  bug-reports.

  Special thanks to all my colleagues at WebSentric AG, especially Mark
  S. Fischer & Peter Conrad for their comments, feedback and support.

  5.  Disclaimer.

  Use the information in this document at your own risk.

  I disavow any potential liability for the contents of this document.

  Use of the concepts, examples, and/or other content of this document
  is entirely at your own risk.

  All copyrights are owned by their owners, unless specifically noted
  otherwise.

  Use of a term in this document should not be regarded as affecting the
  validity of any trademark or service mark.

  Naming of particular products or brands should not be seen as
  endorsements.


  You are strongly recommended to take a backup of your system before
  major installation and backups at regular intervals.


  6.  Hardware Requirements & Performance Issues.

  Digital Audio processing is a resource intensive task that relies
  heavily on the processing and I/O capabilities of a system.  I would
  strongly recommend a Pentium class machine as a minimum.

  If you are going to be encoding from an analogue audio source via the
  line or microphone input, a PCI soundcard will give the best results.
  The I/O performance difference between an ISA and PCI based card is
  significant, over 132 MBytes/sec for PCI (quote taken from the PCI-
  HOWTO).  Naturally, the better the quality of the soundcard in terms
  of its signal-to-noise ratio, the better the encoded MP3.  I've been
  using the Soundblaster PCI128 and just switched over to a Soundblaster
  Live Value; both cards give good audio performance, but the Live has
  significantly better S/N ratios, good enough for semi-pro audio work.
  Remember the old data processing maxim:- garbage in - garbage out!

  Creative have a Beta driver for the Soundblaster Live! which can be
  downloaded from:

  <http://developer.soundblaster.com/linux/>

  When recording analogue audio to a hard disk, more commonly referred
  to as direct to disk or d2d recording, the performance of the disk,
  and its interface is critical.  If you are using an IDE based based
  system, mode 4 or UDMA is preferable as the transfer rate is
  sufficiently high enough to provide reliable data transfer without
  problems.

  The ideal solution would be to use a SCSI based system as the drives
  and interface have far better throughput capabilities, a sustained
  5mbits/sec for SCSI 1 through to 80mbits/sec for ultra/wide SCSI. IDE
  can peak at anything from 8.3 MB/s to 33 MB/s for Ultra-ATA but these
  speeds are peak, average transfer rates will be slower.  If you can
  find, or afford, an AV SCSI drive, go for it.  AV drives have had the
  read/write head system optimised for continuous data transference;
  other SCSI and IDE drives normally cannot sustain continuous data
  transfer as the write head heats up!

  Naturally a drive that has cache will give more consistent results
  than one that doesn't, as the cache will act as a buffer if the heads
  do lift or it cannot handle the throughput.

  If your drive isn't up to spec, your recording will suffer from
  dropouts and glitches, where the drive failed to record the signal.
  If you are recording one-off events, such as live performances invest
  in a good SCSI based disk system.

  Another cause of d2d dropouts is a heavily loaded system.  Background
  tasks can cause the system to momentarily glitch.  Its recommended to
  run as few background services as you can, especially networked based
  services. For more information about setting network services, and
  startup scripts please refer to the SAG and NAG guides.

  Virtual memory paging will also cause glitches, so run with as much
  physical RAM as you can, I'd recommend at least 32 Mb, but you may
  well need more.

  For those wanting to extract the most out of their system, optimising
  the kernel probably wouldn't do any harm either.


  While the hardware specifications above will give you a decent system
  to encode audio data, don't discount using older, lower spec kit if
  that's all you have access to.

  It'll be a good challenge for a sys-admin to tweak a low-spec system
  to give good results, and the end result will probably be a happier
  Linux box.

  Another important issue is the audio cabling.  Cheap, poor quality
  cables and connectors will result in poor recording quality.  If your
  soundcard has the option to use phono, sometimes referred to as RCA
  connectors, use them.  Gold plated contacts will also help maintain
  audio quality, as will keeping audio cables away from data cables as
  there will be a chance of interference between them.

  But don't forget, spending a fortune on the best audio cabling will be
  lost if the rest of the system hasn't been optimised.

  For encoding MP3's from CD-ROM, the speed or type of drive will
  determine the time taken to read the raw information from it.  A
  single speed drive will probably be too slow for all but the most
  patient.

  Your CD-ROM must be connected to your soundcard if you want to hear
  what you are recording, either using the internal connector or by
  connecting headphone's to the headphone output, although you will not
  be able to listen to MP3's through the CD-ROM headphone socket!

  For detailed instructions on setting up soundcards, now would be an
  excellent time to read the Sound-HOWTO.


  7.  Software Requirements.

  Converting audio to MP3's is normally a 2 stage process, first the
  audio is recorded into a WAV format, then the WAV is then converted
  into an MP3. Some utilities will do both processes in one go for you.

  The format you wish to encode audio from, CD or direct audio, will
  determine what software tools you need to produce the WAV file.

  If you are wanting to encode from audio input, you will need a program
  that will record from your soundcard's input and save the results in a
  WAV format. Below are some useful utilities (most of the comments are
  taken from the respective website of the app.)


  7.1.  Rippers & WAV Recorders

  To grab from analog audio line-in.  Wavrec

  Wavrec is distributed as part of wavplay, which can be downloaded
  from:-

  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/>

  To convert CD audio data to WAV format, sometimes known as CD ripping:

  CDDA2WAV

  <http://metalab.unc.edu/pub/Linux/apps/sound/cdrom/>

  Cdparanoia

  Cdparanoia is a Compact Disc Digital Audio (CDDA) extraction tool,
  commonly known on the net as a 'ripper'. The application is built on
  top of the Paranoia library, which is doing the real work (the
  Paranoia source is included in the cdparanoia source distribution).
  Like the original cdda2wav, cdparanoia package reads audio from the
  CDROM directly as data, with no analog step between, and writes the
  data to a file or pipe in WAV, AIFC or raw 16 bit linear PCM. Compared
  to cdda2wav, it's much slower but really gets the best results you can
  get even from CDs that are difficult to rip for scratches or other
  read-errors.

  <http://www.xiph.org/paranoia/index.html>

  RipEnc

  RipEnc is a bourne shell script frontend to Cdparanoia, cdda2wav,
  tosha and Bladeenc, 8hz-mp3, l3enc. It utilizes CDDB lookups to
  automate the naming of songs as they are ripped. A manual naming
  option is also available. The entire CD can be ripped or you can pick
  the songs to rip. ID3 tags are also supported.

  <http://www.asde.com/~mjparme/index.htm>

  RipperX

  RipperX is a GTK program to rip CD audio and encode mp3s. It has
  plugins for cdparanoia, BladeEnc, Lame Mp3 encoder, XingMp3enc, 8hz-
  mp3, lame, and the ISO v2 encoder. It also has support for CDDB and
  ID3 tags.

  <http://www.digitallabyrinth.com/linux/ripperX/>

  Grip

  Grip is a GTK-based CD-player and CD-ripper/MP3-encoder. It has the
  ripping capabilities of cdparanoia built in, but can also use external
  rippers (such as cdda2wav). It also provides an automated frontend for
  MP3 encoders, letting you take a disc and transform it easily straight
  into MP3s. The CDDB protocol is supported for retrieving track
  information from disc database servers.  Grip works with DigitalDJ to
  provide a unified "computerized" version of your music collection.

  <http://www.nostatic.org/grip/>


  7.2.  Encoders

  To convert the WAV file to MP3 format you will need an encoder:

  Blade's MP3 Encoder

  BladeEnc is a freeware MP3 encoder. It is based on the same ISO
  compression routines as mpegEnc, so you can expect roughly the same,
  or better, quality . The main difference is the appearance and speed.
  BladeEnc doesn't have a nice, user-friendly interface like mpegEnc,
  but it is more than three times faster, and it works with several
  popular front-end graphical user interfaces.

  <http://bladeenc.cjb.net>

  Lame

  In the great history of GNU naming, LAME stands for LAME Ain't an Mp3
  Encoder.  LAME is not an mp3 encoder.  It is a GPL'd patch against the
  dist10 ISO demonstration source.  LAME is totally incapable of
  producing an mp3 stream. It is incapable of even being compiled by
  itself. You need the ISO source for this software to work.  The ISO
  demonstration source is also freely available, but any commercial use
  (including distributing free encoders) may require a license agreement
  from FhG (Fraunhofer Gesellschaft, Germany).

  <http://www.sulaco.org/mp3/>

  Gogo

  This is a very fast MP3 encoder for x86-CPU, which is based on LAME
  ver 3.29beta and optimized by PEN@MarineCat, Keiichi SAKAI, URURI, kei
  and shigeo.  (You will also need to download NASM to compile the
  source, which can be found  <http://www.web-sites.co.uk/nasm/>)

  <http://homepage1.nifty.com/herumi/gogo_e.html>


  7.3.  Players

  To play the MP3's you will naturally need a player:

  Xmms (Formerly known as X11Amp)

  This player has most of the features as Winamp  from Windows 95/98/NT
  but it will of course feature some specials only available for the
  linux version.

  <http://www.xmms.org>

  Xaudio

  Xaudio is a very fast and very robust multiplatform solution for
  Digital Audio playback, especially targeted at MPEG Audio (MP1, MP2
  and MP3) decoding.

  <http://www.xaudio.com>

  AlsaPlayer

  AlsaPlayer is a new type of PCM player. It is heavily multi-threaded
  and tries to exercise the ALSA library and driver quite a bit. It has
  some very interesting features unique to Linux/Unix players. The goal
  is to create a fully pluggable framework for playback of all sorts of
  media with the focus on PCM audio data.  Full speed (pitch) control,
  positive *and* negative! First Linux- and only GPL player that does
  this!! MP3's and CD's do varispeed :)

  <http://www.alsa-project.org/~andy/>

  mpg123

  What is mpg123? It is a fast, free and portable MPEG audio player for
  Unix.  It supports MPEG 1.0/2.0 layers 1, 2 and 3 (those famous "mp3"
  files), and it has been tested on a wide variety of platforms,
  including Linux, FreeBSD, NetBSD, SunOS, Solaris, IRIX, HP-UX and
  others. For full CD quality playback (44 kHz, 16 bit, stereo) a
  Pentium (or fast 486), SPARCstation10, DEC Alpha or similar CPU is
  required. Mono and/or reduced quality playback (22 kHz or 11 kHz) is
  even possible on slower 486 CPUs.

  <http://dorifer.heim3.tu-clausthal.de/~olli/mpg123/>

  Freeamp

  FreeAmp is an extensible, cross-platform audio player. It features an
  optimized version of the GPLed Xing MPEG decoder which makes it one of
  the fastest and best sounding players available. FreeAmp provides a
  number of the most common features users have come to expect in a
  clean, easy to use interface.

  <http://www.freeamp.org/>


  7.4.  Streaming Servers


  Streaming servers allow you to 'broadcast' MP3's across a network,
  whether this is your intranet or the internet itself.

  Icecast

  Welcome! icecast is a Mpeg Layer III Audio broadcasting system brought
  to you by the linuxpower.org team.  Icecast comes bundled with
  iceplay, and icedir. iceplay is a playlist streamer that will allow
  you to send pre-encoded files to your icecast server.

  <http://www.icecast.org/>

  Fluid

  Fluid Streaming Server is a program for streaming media over networks
  and in its current form using the mp3 format.

  <http://www.subside.com/fluid/> (old site)
  <http://fluid.sourceforge.net/> (new site)



  7.5.  Mixing


  LiveIce

  LiveIce is the source client for Icecast which encodes an mpeg stream
  for broadcast as it is created. Unlike clients such as Shout and IceDJ
  this permits the broadcast of live audio, rather than prerecorded
  mp3's.

  LiveIce is bundled with Icecast, newer versions together with
  documentation may be found at the website below:

  <http://star.arm.ac.uk/~spm/software/liveice.html>

  eMixer

  eMixer is an easy-to-use front-end to mpg123 that allows you to play
  and mix two mp3 streams together. The ability to mix two mp3s makes
  eMixer act like a cross-fader, effectively giving the user DJ-like
  capabilities from the computer console. eMixer is also very able in a
  "real time" party environment. eMixer is based on the original mp3
  mixing code upon which liveice's mixing component is built.

  <http://emixer.linuxave.net/>


  7.6.  Misc

  Volume normalization

  Wavnorm

  If you have encoded live audio, or have encoded from older cd's you
  may find variations in the overall sound level.

  To change the encoded volume levels of the MP3's you will need to
  normalise them using wavnorm.

  <http://www.zog.net.au/computers/wavnorm/>


  Sox is a very handy sound conversion utility which I'd recommend
  having, and you will need it if you wish to use wavnorm.

  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/>


  You may also need a mixer program; Xmixer works well and is included
  with most distributions.


  8.  Setting up your system.

  This section will describe the basics of setting up your Linux system
  to record audio from either an analogue or CD-ROM source.

  I'm basing this section around my Intel based Linux system which is
  running Redhat, but should be reasonably distribution neutral. I'll be
  working on the Sparc platform version shortly. (if you have any
  success in using this HOWTO on other hardware, please get in touch).

  Naturally a reasonable prerequisite is a working soundcard.  At this
  point in the HOWTO, I invite you to read the excellent Linux Sound
  HOWTO, by Jeff Tranter.  After which a good read of the Linux Sound
  Playing HOWTO, by Yoo C. Chung.  Both of the above mentioned HOWTO's
  cover the details of getting a sound system working under Linux far
  better than I could.


  8.1.  Setting up for Analogue Audio Capture

  Firstly, set up your audio.  There are a multitude of ways to route
  audio before it gets to your Linux box, some common ones are:

  Line out to Soundcard Line in.  Most audio devices have a Line output
  sockets.  Line level is a standard that specifies what voltage the
  audio device will send out. If I remember correctly it is 500mV for
  domestic and Semi Pro devices, and 750mV for Pro audio devices.  I
  would guess that the standard set for most soundcards will be 500mV,
  but some of the newer Pro audio may be to the higher standard  It
  shouldn't make too much difference unless you are recording at very
  high levels.

  The Line level output is normally used to connect HI-FI equipment to
  an amplifier, so things such as Tape Decks, Radio Tuners, CD players,
  DAT machines and Mini-Disc players should connect without problem.
  Turntables can be more of a problem, see below for more information.

  You could capture audio from VCR's as well.  Most VCR's will either
  have Line out for sound, or you can Get a Line out from a SCART socket
  if your VCR has one.

  Amplifier Tape out to Soundcard Line in,  Soundcard Line out to
  Amplifier Tape in.  This configuration is essentially replacing a
  traditional tape recorder connected to your HI-FI amplifier with your
  Linux system.  The Soundcard Line out to Tape in allows monitoring of
  the recording levels.

  Mike to Soundcard Mike in.  The voltages generated by microphones is
  very much smaller than those used in Line level devices.  If you were
  to plug a Microphone into the Soundcard Line in, chances are you would
  never record anything.

  WARNING, doing the reverse, plugging a Line level device into the
  Soundcards Microphone input, can damage your soundcard!!

  Turntable to Mike in.

  Many thanks to Mark Tranchant for the following.

  The raw output from a record deck cartridge is very low level.
  However, you cannot plug it directly into a microphone input and
  expect good results. The output requires equalization, as records are
  mastered with less bass and more treble to optimize the physics of the
  moving needle. This equalization is carefully defined and referred to
  as RIAA equalization. You *need* to run the output through a phono
  preamp first, and then into a line input.

  Music keyboards & synths should be connected to the Soundcards Line
  in, with guitars connecting to Line in via a DI (Direct Injection,
  used to convert the signal to Line level) box.

  Before you plug in anything into your soundcard, make sure the volume
  levels are turned down to minimum, or if using microphones they are
  either turned off or away from speakers.


  8.2.  Setting up for CD-ROM Audio Capture

  Setting up your Linux system to extract audio data from CD-ROM is
  reasonably straight forward.

  If you can hear a track playing from your CD-ROM through your speakers
  or amplifier, connected to your soundcard, then there's a reasonable
  chance you should be able to record from it.


  8.3.  Additional Setting up

  Log in as per normal to your system, then using a mixer program set
  the recording levels that are loud enough to give you a decent
  recording level, but aren't too loud and distorting.  I normally just
  judge this by ear, after a while you'll get to know what levels are
  best for your kit.

  I recommend either turning off all unnecessary services or switching
  to the single user runlevel, especially when encoding from an audio
  source. This is to ensure that the bare minimum of services are
  running and thus minimising system glitches when recording.

  I've set up a separate SCSI drive, exclusively to record the audio to,
  which I'll refer to as /mp3.  I've done this mainly for the
  performance gains in using a SCSI drive.  Also, recording onto a
  dedicated drive, where you are almost certain the head isn't going to
  suddenly skip to another part of the drive as you are writing audio
  data to it, is a good thing :)

  For details on setting up a Linux system with multiple disk drives, a
  good read of the Multi-Disk-HOWTO, by Stein Gjoen may be useful.


  9.  Encoding from Audio.

  Firstly, make sure you have enough space on your drive.  At CD
  quality, 44.1 Khz 16 Bit stereo, 1 minute takes nearly 10 Mb (5 MB per
  channel).

  I normally record at DAT quality, which is 48 Khz 16 Bit stereo.

  Using wavrec I use the following syntax:

  /usr/local/bin/wavrec -t 60 -s 48000 -S /mp3/temp.wav

  The first part is an explicit path to wavrec.  The '-t 60' specifies
  the length of time to record for, in seconds.

  The third option, -s 48000 refers to the sample rate in samples/sec.
  (48000 is the rate for DAT, 44100 is CD)

  The last option is the path to the output file.

  To see the full set of options, run waverec -help, or see it's man
  page.

  This will produce your WAV file  Next you will need to encode it into
  MP3 format.

  Use bladdenc with the following command line.

  /usr/local/bin/bladeenc [source file] [destination file] -br 256000

  The -br option  sets the bit rate, in this case I've set the rate to
  the maximum rate of 256k bits/s.  The path to bladeenc may also be
  different on your system to the one I've used in my example.

  To see the full set of options, run bladeenc -help, actually this is
  an invalid option, but will display the list of options.

  The same encoding using Lame (as well as Gogo as it is based on Lame)
  would need the command line

  /usr/local/bin/lame [source file] [destination file] -b 256


  10.  Encoding from CD-ROM.

  In a similar way to encoding from audio, encoding from CD is a 2 stage
  process.  Firstly the audio data is extracted from the cd and
  converted into a wav file.  Then the wav file is converted into MP3.

  There are basically 2 types of encoders, console based and X based.
  Both do the same job, but the X based are easier to use (and look
  nicer).

  Again, before you start to encode, check you will have enough drive
  space on your system.


  10.1.  Command Line encoding


  I've written a very simple Perl script that will rip and encode tracks
  from a CD.



  ______________________________________________________________________
  #!/usr/bin/perl

  if ($ARGV[0] ne "") {

  $count = 1;

  do {

  $cdcap = system("cdparanoia", $count, "/mp3/cdda.wav");
  $track = "$ARGV[1]/track".$count.".mp3";
  $enc = system("bladeenc  /mp3/cdda.wav $track -br 256000");
  $count++;

  }
  until $count > $ARGV[0];
  exit;
  }

  else {
  print "Usage cdriper [no of tracks] [destination directory]\n\n";
  }
  ______________________________________________________________________


  Please note: The above script is very basic and has nothing fancy,
  like error checking or CDDB.  Improve at your leisure :)

  The main lines of interest are:


  ______________________________________________________________________
  $cdcap = system("cdparanoia", $count, "/mp3/cdda.wav");
  ______________________________________________________________________



  This line calls the CD ripper, cdparanoia.  Cdparanoia converts raw CD
  audio data to WAV format.

  I'm using Cdparanoia, but if you wish to use CDDA2WAV, the command
  line would be:


  ______________________________________________________________________
  $cdcap = system("cdda2wav", $count, "/mp3/cdda.wav");
  ______________________________________________________________________



  The salient options are $count, which is the number of tracks to rip,
  and then the path for the outputted WAV file.  In my example this will
  go to a tmp directory on my MP3 SCSI drive.

  The WAV file is then converted into a MP3 file using Bladeenc.

  I've written this Perl script in order to rip a CD without having to
  rip and encode each track, and without having to use the batch mode of
  Cdparanoia.  This cuts down on free disk space needed as Cdparanoia's
  batch mode will rip the whole disk, and take up anything upto 600 Meg.

  If you wanted to use Lame or Gogo, replace the encoder line with:



  ______________________________________________________________________
  $enc = system("lame  /mp3/cdda.wav $track -b 256");
  ______________________________________________________________________


  or

  ______________________________________________________________________
  $enc = system("gogo  /mp3/cdda.wav $track -b 256");
  ______________________________________________________________________



  Here is a dump of the available option for each of the encoders.

  Bladeenc

  ______________________________________________________________________
  BladeEnc 0.91    (c) Tord Jansson          Homepage: http://bladeenc.mp3.no
  ===============================================================================
  BladeEnc is free software, distributed under the Lesser General Public License.
  See the file COPYING, BladeEnc's homepage or www.fsf.org for more details.

  Usage: bladeenc [global switches] input1 [output1 [switches]] input2 ...

  General switches:
    -[kbit], -br [kbit]  Set MP3 bitrate. Default is 128 (64 for mono output).
    -crc                 Include checksum data in MP3 file.
    -delete, -del        Delete sample after successful encoding.
    -private, -p         Set the private-flag in the output file.
    -copyright, -c       Set the copyright-flag in the output file.
    -copy                Clears the original-flag in the output file.
    -mono, -dm           Produce mono MP3 files by combining stereo channels.
    -leftmono, -lm       Produce mono MP3 files from left stereo channel only.
    -rightmono, -rm      Produce mono MP3 files from right stereo channel only.
    -swap                Swap left and right stereo channels.
    -rawfreq=[freq]      Specify frequency for RAW samples. Default is 44100.
    -rawbits=[bits]      Specify bits per channel for RAW samples. Default is 16.
    -rawmono             Specifies that RAW samples are in mono, not stereo.
    -rawstereo           Specifies that RAW samples are in stereo (default).
    -rawsigned           Specifies that RAW samples are signed (default).
    -rawunsigned         Specifies that RAW samples are unsigned.
    -rawbyteorder=[order]Specifies byteorder for RAW samples, LITTLE or BIG.
    -rawchannels=[1/2]   Specifies number of channels for RAW samples. Does
                         the same as -rawmono and -rawstereo respectively.

  Global only switches:
    -quit, -q            Quit without waiting for keypress when finished.
    -outdir=[dir]        Save MP3 files in specified directory.
    -quiet               Disable screen output.
    -nocfg               Don't take settings from the config-file.
    -prio=[prio]         Sets the task priority for BladeEnc. Valid settings are
                         HIGHEST, HIGHER, NORMAL, LOWER, LOWEST(default) and IDLE
    -refresh=[rate]      Refresh rate for progress indicator. 1=fastest, 2=def.
    -progress=[0-8]      Which progress indicator to use. 0=Off, 1=Default.

  Input/output files can be replaced with STDIN and STDOUT respectively.
  ______________________________________________________________________



  Lame



  ______________________________________________________________________
  LAME version 3.50 (www.sulaco.org/mp3)
  GPSYCHO: GPL psycho-acoustic model version 0.74.

  USAGE   :  lame [options] <infile> [outfile]

  <infile> and/or <outfile> can be "-", which means stdin/stdout.

  OPTIONS :
      -m mode         (s)tereo, (j)oint, (f)orce or (m)ono  (default j)
                      force = force ms_stereo on all frames. Faster and
                      uses special Mid & Side masking thresholds
      -b <bitrate>    set the bitrate, default 128kbps
                      (for VBR, this sets the allowed minimum bitrate)
      -s sfreq        sampling frequency of input file(kHz) - default 44.1
    --resample sfreq  sampling frequency of output file(kHz)- default=input sfreq
    --mp3input        input file is a MP3 file
    --voice           experimental voice mode

      -v              use variable bitrate (VBR)
      -V n            quality setting for VBR.  default n=4
                      0=high quality,bigger files. 9=smaller files
      -t              disable Xing VBR informational tag
      --nohist        disable VBR histogram display

      -h              use (maybe) quality improvements
      -f              fast mode (low quality)
      -k              disable sfb=21 cutoff
      -d              allow channels to have different blocktypes
    --athonly         only use the ATH for masking

      -r              input is raw pcm
      -x              force byte-swapping of input
      -a              downmix from stereo to mono file for mono encoding
      -e emp          de-emphasis n/5/c  (obsolete)
      -p              error protection.  adds 16bit checksum to every frame
                      (the checksum is computed correctly)
      -c              mark as copyright
      -o              mark as non-original
      -S              don't print progress report, VBR histograms

    Specifying any of the following options will add an ID3 tag
       --tt <title>     title of song (max 30 chars)
       --ta <artist>    artist who did the song (max 30 chars)
       --tl <album>     album where it came from (max 30 chars)
       --ty <year>      year in which the song/album was made (max 4 chars)
       --tc <comment>   additional info (max 30 chars)


  MPEG1 samplerates(kHz): 32 44.1 48
  bitrates(kbs): 32 48 56 64 80 96 112 128 160 192 224 256 320

  MPEG2 samplerates(kHz): 16 22.05 24
  bitrates(kbs): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
  ______________________________________________________________________



  Gogo



  ______________________________________________________________________
  GOGO-no-coda ver. 2.24 (Feb 12 2000)
  Copyright (C) 1999 PEN@MarineCat and shigeo
            Special thanks to Keiichi SAKAI, URURI, Noisyu and Kei
  This is based on LAME3.29beta and distributed under the LGPL
  usage
  gogo inputPCM [outputPCM] [options]

   inputPCM is input  wav file
  if input.wav is `stdin' then stdin-mode
  outputPCM is output mp3 file (omissible)

  options
  -b  kbps     bitrate [kpbs]
  -br bps      bitrate [ bps]
  -silent      dont' print progress report
  -off         {3dn,mmx,kni(sse),e3dn}
  -v {0,..,9}  VBR [0:high quality 9:high compression]
               You should combine this with -b option
  for only RAW-PCM input
  -offset bytes skip header size
    -8bit       8bit-PCM [dflt 16bit-PCM]
    -mono       mono-PCM [dflt stereo-PCM]
    -bswap      low, high byte swapping for 16bitPCM
    -s kHz      freq of PCM [dflt 44.1kHz]
  -nopsy       disable psycho-acoustics
  -m  {s,m,j}  output format s:stereo, m:mono, j:j-stereo
  -d  kHz      change sampling-rate of output MP3
  -emh {n,c,5} de-emphasis
  -lpf {on,off} 16kHz filter [dflt use if <= 128kbps; not use if >= 160kbps]
  -test        benchmark mode
  -delete      delete input file, after encoding
  ______________________________________________________________________



  10.1.1.  RipEnc

  RipEnc performs the same task as the code above, but is written in
  shell and is easier to use :)

  Here's what it looks like.



  ______________________________________________________________________
  RipEnc version 0.7, Copyright (C) 1999  Michael J. Parmeley
  <mjparme@asde.com>, RipEnc comes with ABSOLUTELY NO WARRANTY


  There is currently NO encoding process running in the background
  Your encode.log file is 982607 bytes long.

  <Enter 'd' for details, 'v' to view the encode log, or 'del' to delete the encode log>


  1) Change working directory....................[/megajukebox/tmp]
  2) Choose encoder..............................[lame]
  3) Choose ripper...............................[cdparanoia]
  4) Choose id3 tool.............................[none]
  5) Toggle between Manual and CDDB naming.......[manual]
  6) Setup XMCD_LIBDIR variable for CDA..........[/var/X11R6/lib/xmcd]
  7) Set preferred naming convention.............[artist-name_of_song.mp3]
  8) Rip whole CD?...............................[no]
  9) Set small hard drive option?................[no]
  10) Please select your Cd-Rom device...........[/dev/cdrom]
  11) Set the Bitrate for the encoded MP3's......[256]
  12) List the files in your working directory
  13) Start
  14) About
  15) Exit
  ?
  ______________________________________________________________________



  10.2.  GUI Based Encoders


  GUI based encoders offer all the functionality of console based
  encoding, but wrap it all up in a nice easy to use interface. Grip and
  RipperX are similar in operation, both offer you the ability to select
  one, several or all tracks on a CD and convert them.  They also offer
  CDDB support which allows you  to retrieve the album and track
  information from a server and saves you having to enter the
  information by hand.


  10.3.  Encoder Performance

  In the encoding sections I've mentioned 3 different encoders,
  bladeenc, lame and gogo.  The main difference is their performance in
  encoding (although there are differences in the available options
  which were listed earlier).

  A little example.  I ripped a track from a CD and then encoded it with
  the different encoders. All encoders were run with the same system
  conditions and all produced stereo out mp3's.



  ______________________________________________________________________
  [dj@megajukebox]$ ls -l cdda.wav
  -rw-rw-r--   1 dj       dj       59823164 Feb 10 00:56 cdda.wav

  [dj@megajukebox]$ bladeenc cdda.wav -br 256

  BladeEnc 0.91    (c) Tord Jansson          Homepage: http://bladeenc.mp3.no
  ===============================================================================
  BladeEnc is free software, distributed under the Lesser General Public License.
  See the file COPYING, BladeEnc's homepage or www.fsf.org for more details.

  Files to encode: 1

  Encoding:  ../test.wav
  Input:     44.1 kHz, 16 bit, stereo.
  Output:    128 kBit, stereo.

  Completed. Encoding time: 00:05:58 (0.78X)

  All operations completed. Total encoding time: 00:05:58

  --------------------------------------------------------------------------------

  [dj@megajukebox]$ lame cdda.wav -b 256
  LAME version 3.50 (www.sulaco.org/mp3)
  GPSYCHO: GPL psycho-acoustic model version 0.74.
  Encoding ../test.wav to ../test.wav.mp3
  Encoding as 44.1 kHz 128 kbps j-stereo MPEG1 LayerIII file
      Frame          |  CPU/estimated  |  time/estimated | play/CPU |   ETA
   10756/ 10756(100%)| 0:02:28/ 0:02:28| 0:02:29/ 0:02:29|    1.9074| 0:00:00

  --------------------------------------------------------------------------------

  [dj@megajukebox]$ gogo cdda.wav -m s -b 256
  GOGO-no-coda ver. 2.24 (Feb 12 2000)
  Copyright (C) 1999 PEN@MarineCat and shigeo
            Special thanks to Keiichi SAKAI, URURI, Noisyu and Kei
  MPEG 1, layer 3 stereo
  inp sampling-freq=44.1kHz out sampling-freq=44.1kHz bitrate=256kbps
  inp sampling-freq=44.1kHz out sampling-freq=44.1kHz bitrate=128kbps
  input  file `../test.wav'
  output file `../test.mp3'
  {  10751/  10755} 100.0% (  2.94x)  re:[00:00:00.03] to:[00:01:35.42]
  End of encoding
  time=  95.430sec
  ______________________________________________________________________



  It would appear that Gogo has a much optimised algorithm for encoding
  than Bladeenc and Lame.


  11.  Streaming MP3's

  A streaming server allows you to transmit MP3 files over a TCP based
  network.  This can be the Internet itself or your local network /
  intranet.

  The connection principal is very similar to that of a web server,
  files are streamed when a client (the MP3 player) connects to the
  server.

  Setting-up a streaming server is reasonably straight forward, I'll
  focus on Icecast first, then Fluid.

  11.1.  Icecast


  After downloading and untaring, a good look around the doc/ directory
  would be a good thing, the HTML manual is very helpful and
  comprehensive.

  If you have downloaded the source code, follow the instructions
  regarding compiling pertinent to your system.

  Icecast will not work correctly unless you correctly set the
  servername in the config file, icecast.conf, which is located in the
  etc directory. It must match the name that resolves to your IP address
  exactly.

  If you see the following line when Icecast starts-up you have
  problems:

  ______________________________________________________________________
  -> [05/Jan/2000:17:21:04] WARNING: Resolving the server name [your.server.name] does not work!
  ______________________________________________________________________



  Edit icecast.conf which is located in the etc directory and locate the
  line containing the entry for "server_name" and enter your servers
  name.  If you are unsure you can find out by using the hostname
  command, or by cat'ing /etc/hosts.

  Once you've made the neccesary changes you'll need to either copy the
  conf file to the bin directory, or start icecast with the -c option
  and specify the location, like so:

  ______________________________________________________________________
  ./icecast -c ../etc/icecast.conf
  ______________________________________________________________________



  If everything has been configured correctly, you should see something
  similar to the following:

  ______________________________________________________________________
  [dj@megajukebox bin]$ ./icecast -c ../etc/icecast.conf -d /home/dj/mp3/icecast/
  Icecast Version 1.3.0 Starting...
  Icecast comes with NO WARRANTY, to the extent permitted by law.
  You may redistribute copies of Icecast under the terms of the
  GNU General Public License.
  For more information about these matters, see the file named COPYING.

  [05/Jan/2000:18:36:30] Icecast Version 1.3.0 Starting..
  [05/Jan/2000:18:36:30] Using stdin as icecast operator console
  [05/Jan/2000:18:36:30] Tailing file to icecast operator console
  [05/Jan/2000:18:36:30] Server started...
  [05/Jan/2000:18:36:30] Listening on port 8000...
  [05/Jan/2000:18:36:30] Using [megajukebox] as servername...
  [05/Jan/2000:18:36:30] Max values: 1000 clients, 1000 clients per source, 10 sources, 5 admins
  -> [05/Jan/2000:18:36:30] [Bandwidth: 0.000000MB/s] [Sources: 0] [Clients: 0] [Admins: 1] [Uptime: 0 seconds]
  ______________________________________________________________________



  The -d option sets the directory for log files and templates.

  Below is the list of command-line options:

  ______________________________________________________________________
          -c [filename]

  Parse as a configuration file. Please note that any command line
  parameters you supply after this override whatever is in file. Also note that
  icecast.conf in the current directory is already parsed when you specify
  this file, so anything in icecast.conf not overridden by the new configuration
  file will be used by the server.

          -P [port]

  This is the port used for all client, source, and admin connections. It's set
  to 8000 by default.

          -m [max clients]

  Allow this number of client connections. When this number is reached, all
  client connections will be refused with 'HTTP/1.0 504 Server Full'

          -p [encoder password]

  This sets the password that the encoder must use to be allowed to stream
  to the server. Note that if you have compiled the server with crypt()
  support, this argument must be an encrypted string.

          -b

  This will send the icecast server into the background (i.e daemon process).
  To use the admin commands now, you have to connect to the server as an
  admin, using some sort of telnet client.

          -d [directory]

  Make all log files created by icecast, and all templates that icecast looks
  for be relative to this directory.
  ______________________________________________________________________



  So, thats the server started, but you now need to connect an MP3
  source to the server.

  You can choose from two applications which deliver MP3 data to the
  server, Shout and LiveIce.


  11.1.1.  Shout

  Shout provides Icecast with a static playlist of MP3's to stream and
  is included with Icecast.

  You create the playlist if the MP3 files you want to stream with the
  following:

  ______________________________________________________________________
  find [MP3 directory] -name *.mp3 -print > playlist
  ______________________________________________________________________



  At it's most basic level, to start the shout service, issue the
  following:



  ______________________________________________________________________
  [dj@megajukebox bin]# ./shout megajukebox -P hackme -p playlist
  ______________________________________________________________________



  The -P option specifies the password needed to add a mount-point to
  Icecast, this is the aptly set as hackme..... I strongly suggest you
  change it otherwise someone may :)  The -p option specifies the
  location of the playlist file.  Below is a list of all of the command
  line options:


  ______________________________________________________________________
  [dj@megajukebox bin]# ./shout
  Usage: shout <host> [options] [[-b <bitrate] file.mp3]...
  Options:
          -B <directory>  - Use directory for all shout's files.
          -C <file>       - Use file as configuration file
          -D <dj_file>    - Run this before every song (system())
          -P <password>   - Use specified password
          -S              - Display all settings and exit
          -V              - Use verbose output
          -X <desc>       - Use specified description.
          -a              - Turn on automatic bitrate (transfer) correction
          -b <bitrate>    - Start using specified bitrate
          -d              - Activate the dj.
          -e <port>       - Connect to port on server.
          -f              - Skip files that don't match the specified bitrate
          -g <genre>      - Use specified genre
          -h              - Show this text
          -i              - Use old icy headers
          -k              - Don't truncate the internal playlist (continue)
          -l              - Go on forever (loop)
          -m <mount>      - Use specified mount point
          -n <name>       - Use specified name
          -o              - Turn of the bitrate autodetection.
          -p <playlist>   - Use specified file as a playlist
          -r              - Shuffle playlist (random play)
          -s              - (Secret) Don't send meta data to the directory server
          -u <url>        - Use specified url
          -v              - Show version
          -x              - Don't update the cue file (saves cpu)
          -z              - Go into the background (Daemon mode)
          -t              - Enable title streaming
  ______________________________________________________________________



  11.1.2.  LiveIce


  LiveIce can work in 2 modes, it can pass a playlist to Icecast or can
  pass live audio from the soundcard.

  After untaring and reading the README concerning building the package,
  make sure you have mpg123 installed and available as LiveIce requires
  it.

  There are two ways of configuring LiveIce editing the config file with
  vi/emacs/or whatever or by using the TK based configuration tool,
  which is a pretty way of editing it :)

  The best place for describing the internals of liveice.cfg can be
  found at LiveIce's homepage where Scott covers all of the options.
  This is a copy of my config file with LiveIce set to mixer mode
  (stream from a list of MP3's)

  NOTE:  I've added comments to the file, so if you cut and paste make
  sure the comments haven't wrapped around to a new line otherwise
  LiveIce will not work :)

  ______________________________________________________________________
  # liveice configuration file
  # Automatically generated

  SERVER megajukebox              # Your server name * MUST BE THE NAME THE SERVER RESOLVES TO *
  PORT 8000                       # The port Icecast is running on

  NAME Megajukebox                # Information regarding the name of your server which is sent to MP3 players, and
                                  # to directory servers.
                                  # Examples 'Sarah FM' or 'ThisTown: Loud and Heavy Jazz - Internet Radio 24/7'

  GENRE Live                      # Information regarding the genre.  Examples 'Talk' or 'Dance'

  DESCRIPTION                     # Information regarding the station.  Example 'The best for reggae in the North'

  URL http://megajukebox:8000     # The URL and port of the server.

  PUBLIC 0                        # Set this to 1 if you want Icecast to announce your station and list it's details
                                  # on a directory server, otherwise leave 0

  XAUDIOCAST_LOGIN                # can be either ICY_LOGIN or X_AUDIOCAST_LOGIN.  X_AUDIOCAST is better.

  MOUNTPOINT /techno              # Sets the mountpoint name of the stream for Icecast.  Only used if X_AUDIOCAST is used
                                  # otherwise defaults to icy_0

  PASSWORD hackme                 # Icecast's admin password

  SAMPLE_RATE 44100               # The sample rate of the stream
  STEREO                          # Can be MONO or STEREO

  NO_SOUNDCARD                    # See below

  HALF_DUPLEX                     # Sets the soundcard duplex mode.  Can be HALF_DUPLEX or FULL_DUPLEX
  USE_GOGO                        # Sets the encoder to use.  Check the README for the list
  BITRATE 128000                  # Sets the bit rate of the stream (see below)
  VBR_QUALITY 1                   # Sets the variable bit rate quality.

  MIXER                           # See below

  PLAYLIST /megajukebox/playlist  # Location of the playlist (see details on the find command later in this chapter)

  TRACK_LOGFILE track.log         # Filename and location to dump list of MP3's streamed
  ______________________________________________________________________


  Once you have your config file you start LiveIce like so:



  ______________________________________________________________________
  [dj@megajukebox liveice]$ ./liveice
  /megajukebox/playlist
  1
  opening connection to megajukebox 8000
  Attempting to Contact Server
  connection successful: forking process
  opening pipe!...
  writing password
  Setting up Interface
  Soundcard Reopened For Encoding
  Input Format: 16Bit 44100Hz Stereo
  Output Format: 256000 Bps Mpeg Audio
  IceCast Server: megajukebox:8000
  Mountpoint: /techno
  Name: megajukebox - this and that radio - broadcasting 24/7
  Genre: Techno
  Url: http://megajukebox
  Description: a load of digital noise -> but i know you like it :)

   Press '+' to Finish
  adding /megajukebox/demotunes/track_1.mp3
  adding /megajukebox/demotunes/track_2.mp3
  adding /megajukebox/demotunes/track_3.mp3
  adding /megajukebox/demotunes/track_4.mp3
  /megajukebox/demotunes/track_4.mp3
  Adding New Channel 1
  Adding New Channel 2
  Channel 1 selecting
   /megajukebox/demotunes/track_1.mp3
  Channel 2 selecting
   /megajukebox/demotunes/track_1.mp3
  Playing track_1.mp3
  searching for Id3v2
  searching for Id3v1
  copying the data
  fixing the nulls
  adding the url
  closing input file
  Using log track.log
  ______________________________________________________________________



  The last line is a peak meter.

  These are the keyboard controls for mixer mode:

  ______________________________________________________________________
  Action                          Channel 1 Key   Channel 2 Key
  ~~~~~~                          ~~~~~~~~~~~~~   ~~~~~~~~~~~~~
  Select next track on channel    1               a
  Select prev track on channel    q               z
  Start/Stop channel              2               s
  Reset channel                   w               x
  Increase volume on channel      3               d
  Decrease volume on channel      e               c
  Increase speed on channel       4               f
  Decrease speed on channel       r               v
  Sticky mode On/Random/Off       5               g
  Preview channel                 t               b
  Random Track                    u               m
  ______________________________________________________________________



  The above liveice.cfg is for mixermode.  To use LiveIce in audio mode
  change the line relating to MIXER to NOMIXER and set NO_SOUNDCARD to
  SOUNDCARD and restart LiveIce.

  Forgetting to set the correct options will lead to some interesting
  warning ;)

  ______________________________________________________________________
     946:Error: Line In mode *and* no soundcard??????? Eeejit!
  ______________________________________________________________________



  Once you have it all correctly set up and have plugged in an external
  source, you should be able to stream =:)


  ______________________________________________________________________
  [dj@megajukebox liveice]$ ./liveice
  /megajukebox/playlist
  0
  Initialising Soundcard
  16Bit 22050Hz Stereo Full Duplex
  opening connection to megajukebox 8000
  Attempting to Contact Server
  connection successful: forking process
  opening pipe!...
  writing password
  Setting up Interface
  Soundcard Reopened For Encoding
  Input Format: 16Bit 22050Hz Stereo
  Output Format: 32000 Bps Mpeg Audio
  IceCast Server: megajukebox:8000
  Mountpoint: /daves_band_live_at_the_club
  Name: megajukebox - Dave and the Dynamite - Live at the Roxy
  Genre: Live/Rock
  Url: http://megajukebox
  Description: megajukebox::Louder than a frog in a trashcan..... and almost as musical

   Press '+' to Finish
  Lvl: L:   8704 R:  11776
  ______________________________________________________________________



  The last line is a signal level meter, if the input signal is too high
  you will get a *clip* warning.  If you do turn down the gain of the
  input source.

  The keen eyed amongst you may of noticed that in liveice.cfg the first
  comment lines point out that the file is automatically generated.  If
  you are using the TK based GUI liveiceconfigure.tk and you've made
  manual changes, you will lose them when you save.  Either use the GUI
  or learn vi/emacs :)


  11.2.  Fluid

  After untaring the bundle cd to the directory, then read the README :)

  Fluid has three basic modes of operation, transmit, relay and forward.
  I'll only focus on transmit.

  The config files associated for transmit are located in
  config/MP3TX.cfg.  To test the server run with the following, at this
  point the default config settings should be ok:
  java Fluid TX

  Naturally enough you'll need Java of some form installed first.  You
  can use either the Blackdown port of JDK available from
  <http://www.blackdown.org> or if you are using Redhat, Kaffe.

  Fluid comes with a few sample MP3 files, so if everything is working
  you should see something similar to this (I've started the server
  using Kaffe in this example, you may have to start it using java):

  ______________________________________________________________________
  [dj@megajukebox Fluid-Beta2J]$ kaffe Fluid tx
  ------- Fluid Streaming Server Beta 2 -------
  This program is ShareWare(tm) and it will not
  be crippled in any way because of it. However
  if you do like the program and will use it
  commercial purposes, we ask of you to contact
  us at the address below for pricing info:

   Eldean AB                  E-mail:
   Sjoangsvagen 7             fluid@subside.com
   S-192 72 Sollentuna
   SWEDEN

     Fluid is Copyright Subside (C) 1998
         written by Lars Samuelsson
           http://www.subside.com
  ---------------------------------------------

  * Transmission mode *
  Reading config from: config/MP3TX.cfg
  Reading playlist: playlist.m3u
  Server started on port: 2711
  Accepting administrator login on port: 2710
  P| Dr. Nick - Hello Everybody
  ______________________________________________________________________


  If you get this far, it looks like things are working, but I'm sure
  you'll want to stream more than the demo files!

  You'll need to compile a playlist of the MP3's you want to stream.
  This will be a static list users will not be able to alter this list
  or make requests.  This playlist is named playlist.m3u and is located
  by default in the root directory.

  To compile a playlist of all MP3's in a particular directory (or disk)
  use the following command:

  ______________________________________________________________________
  find [MP3 directory] -name *.mp3 -print > playlist.m3u
  ______________________________________________________________________


  By default the server uses port 2711, which is where your listeners
  will connect to, if you need to change this this can be done in the
  config file.

  The server can be remotely administered by telneting to it's admin
  port, by default port 2710 like so:



  ______________________________________________________________________
  [dj@megajukebox Fluid-Beta2J]$ telnet localhost 2710
  Trying 127.0.0.1..megajukebox
  Connected to localhost.localdomain.
  Escape character is '^]'.
  jaguar
  You are connected to the -Fluid- Streaming Server
  Type "help" for a command reference
  help
  The following commands are available:
   help conn curr exit
  curr
  Information about the currently broadcasted song:
  Title:   Beer Talk
  Artist:  Homer Simpson
  Album:   The Simpsons
  Year:    1996
  Comment: Borrowed this as an example
  Genre:   Comedy
  ______________________________________________________________________


  The reference to "jaguar" is the admin password, this is the default.
  There is no prompt for the password so please don't sit there waiting
  for one! I suggest that you change the password from the default oth
  erwise you will invite a hack! This can be changed in the config file,
  which looks like this:

  ______________________________________________________________________
  [dj@megajukebox config]$ cat MP3TX.cfg
  2711
  2710
  5
  4096
  32
  1000
  jaguar
  playlist.m3u
  current.txt

  # --- The lines are ---
  # 1. PORT number (the server will use)
  # 2. PORT number (for maintaining the server remotely)
  # 3. Maximum number of connections (the server will accept)
  # 4  Packetsize when reading/sending (in bytes)
  # 5. Bitrate of the mp3s in kbit/s (all mp3s must have same bitrate)
  # 6. Delay between songs (in milliseconds)
  # 7. Password for remote administration
  # 8. Playlist name (list in .m3u format)
  # 9. Name of the file to write song info to (from ID3-tag)
  ______________________________________________________________________


  The reference to the playlist being in m3u format means that it is in
  the same format as produced by the find command mentioned earlier.


  11.3.  Bandwith considerations

  Streaming audio can consume vast quantities of bandwidth if the MP3
  servers' bit-rate is set too high.

  Consider this scenario.  A T1 link has a capacity of approx. 1.55
  Mb/Sec.  If you stream your MP3's at 128K/Bps stereo, each connecting
  player will use 256K/Bps, so only 6 users could connect to your MP3
  server at any time without problems. And at 256K/Bps, you will not get
  too many modem users connecting!

  So you must make a decision at what to set your stream rates not only
  on what your server's internet connection is rated at, but what your
  users will be connecting at.  24K/Bps Stereo will give a reasonable
  quality signal that 56K modem users will be able to connect to, and
  for the same T1 line would allow approx. 32 simultaneous connections.


  If your server is running on an Intranet, bandwidth issues will still
  have to be considered especially if your network is running 10M/Sec.

  But please let either your ISP or sys admin know you are going to
  stream otherwise you may be in for a shock. Some ISP's will charge you
  for bandwidth over a certain limit and sys admins like to know why
  their network is now running slow :)


  11.4.  Copyright Issues


  I think it's reasonable to assume that record companies will not like
  you streaming material without their permission or payment of some
  kind! So what can you stream?

  This is an area where you will need to be aware of the legal
  ramifications, because it will be you who will be liable.

  Below are two links, one for the Electronic Frontier Foundation who
  are advocates of freeing restrictions surrounding the technology.  The
  other link is to the Recording Industry Association of America, which
  seeks to protect the rights of artists from piracy.

  I strongly suggest visiting both of the sites, and any others relevant
  to where you are physically based.

  <http://www.eff.org/cafe/>

  <http://www.riaa.com/weblic/weblic.htm>


  12.  Listening to MP3's.

  So, hopefully, you should now have some MP3 files ready to listen to,
  and have the choice of paying from file or stream.


  12.1.  Playing from File



  Playing from file is reasonably straight-forward with all players. The
  only big difference is some are command-line based and some are X
  based.

  Playing an MP3 file from file requires you to pass the mp3 file as a
  parameter, like so:



  ______________________________________________________________________
  [dj@megajukebox]$ mpg123 /mp3_files/SampleFile.mp3

  or

  [dj@megajukebox]$ xaudio /mp3_files/SampleFile.mp3
  ______________________________________________________________________



  If you want to play a series of files, pass them in as a list:


  ______________________________________________________________________
  [dj@megajukebox]$ alsaplayer /mp3_files/SampleFile1.mp3 /mp3_files/SampleFile2.mp3
  ______________________________________________________________________



  To play all the tracks in a directory, just wildcard the file
  selected, like so:


  ______________________________________________________________________
  [dj@megajukebox]$ xmms /mp3_files/*.mp3
  ______________________________________________________________________



  12.2.  Playing from MP3 Streams


  Playing from a MP3 stream is quite easy, just replace the file with
  the streams url and port number:


  ______________________________________________________________________
  mpg123 http://localhost:8000

  or

  freeamp http://megajukebox:2711
  ______________________________________________________________________



  12.3.  Mixing



  12.3.1.  eMixer


  eMixer gives you the ability to mix MP3's in a simllar manner to a
  DJ's mixing desk.

  Newer versions support 2 sound cards so you can output your mix on one
  card and monitor or cue the next track on another.

  As usual once untaring, read the readme on how to build the package.

  You will need to create a playlist of MP3 files, do this with the find
  command mentioned in the Streaming section.

  You will need mpg123 installed before you can run eMixer.

  Here are the contol keys (taken from the readme)


  ______________________________________________________________________
  KEYBOARD CONTROLS
  "up, down"              scroll thru playlist
  "page up, page down"    scroll thru playlist screen full at a time
  "enter"                 start/stop track
  "tab"                   change channel
  "}","]"                 toggle between volume and speed controls/windows
  "space"                 restart active track
  "left, right"           fader controls
  "insert"                decrease volume/speed in channel one
  "home"                  increase volume/speed in channel one
  "delete"                decrease volume/speed in channel two
  "end"                   increase volume/speed in channel two
  "< , / , >"             left, centre & right positions of fader
  " + , = "       (NEW)   switch between faders
  " q "                   start/stop channel channel one
  " w "                   start/stop channel channel two
  " p "                   toggle between playmodes - single, loop, continous, random
  " a "                   stop all channels
  " f "                   file menu
  " u "                   util menu
  " h "                   help menu
  " ~, ` "                cancel menu drop down
  " s "                   turn SIM Play on
                          (SIM Play starts the same track in both channels
                          simultaneously )
  ______________________________________________________________________



  13.  Feedback.

  New hardware and software is being released all the time.   If you are
  using newer versions of the hardware and / or software listed within
  this document, or can add to anything within this area, please send
  your information for inclusion to phil@plus24.com and I'll include it
  in the next release.

  While I'd like to reply to every question, please note that on
  occasions I will not be able to reply quickly due to work.

  Happy MP3'ing!!



  The Linux Electronic Mail Administrator HOWTO
  Guylhem Aznar <guylhem at oeil.qc.ca>
  v3.2, January 2000

  This document describes the setup, care and feeding of Electronic Mail
  (e-mail) under Linux.  It is primarily intended for administrators,
  rather than users.  (See the Mail-User's-HOWTO for information on user
  issues and user agents.)  You need to read this if you plan to commu-
  nicate locally or to remote sites via electronic mail.  You probably
  do *not* need to read this document if don't exchange electronic mail
  with other users on your system or with other sites.
  ______________________________________________________________________

  Table of Contents



  1. Introduction, copyright and standard disclaimer

     1.1 Email and spamming
     1.2 Goals
     1.3 New versions
     1.4 Feedback
     1.5 Copyright
     1.6 Limited warranty

  2. Other sources of information

     2.1 Mail User's HOWTO There is a Mail User's HOWTO, which focuses on user issues. It is currently maintained by Eric S. Raymond; you should be able to view it on the World Wide Web at
     2.2 USENET
     2.3 Mailing Lists
     2.4 Other documents from LDP
     2.5 Books

  3. How Electronic Mail Works

     3.1 Mail between full-time Internet machines
     3.2 Notifiers
     3.3 Mail to part-time Internet machines
     3.4 Remote mail and remote-mail protocols
     3.5 Mailbox formats

  4. Requirements

     4.1 Hardware

  5. Choosing a Mail Transport Agent

     5.1 sendmail
     5.2 smail v3.2
     5.3 qmail
     5.4 exim

  6. Installing Transport Software

     6.1 Qmail v1.03
        6.1.1 Getting qmail
        6.1.2 Uncompressing sources
        6.1.3 Preparing for compilation
        6.1.4 Configuring qmail
           6.1.4.1 defaultdomain, me, plusdomain
           6.1.4.2 locals, rcpthosts
           6.1.4.3 virtualdomains
        6.1.5 Testing qmail
        6.1.6 Removing your other MTA
        6.1.7 That's all, folks!
     6.2 Smail v3.1
        6.2.1 Configuring smail
           6.2.1.1 "config" file
           6.2.1.2 "directors" file
           6.2.1.3 "fidopaths" file
           6.2.1.4 "routers" file
           6.2.1.5 "transports" file
           6.2.1.6 "maps/" directory
        6.2.2 Other good examples
        6.2.3 Restarting inetd
        6.2.4 Smail with smtp
     6.3 OUTDATED SECTION: Sendmail+IDA
        6.3.1 Source installation
        6.3.2 The sendmail.m4 file
        6.3.3 Defining a local mailer
        6.3.4 The sendmail+IDA dbm tables
        6.3.5 So which entries are really required?
     6.4 Sendmail 8.x
        6.4.1 A sample 8.7.x mc file
        6.4.2 Sendmail v8 tidbits
     6.5 Local Delivery Agents

  7. User Agent Administration

     7.1 Mutt
     7.2 Elm
     7.3 Mailx

  8. Handling remote mail

     8.1 History
     8.2 Getting mail
     8.3 Sending mail
     8.4 Reading mail
     8.5 Testing
     8.6 Using

  9. Acknowledgements



  ______________________________________________________________________

  1.  Introduction, copyright and standard disclaimer



  1.1.  Email and spamming


  To send mail to anyone mentioned in this document, convert "at" in
  email addresses to "@".

  This conversion is simple for humans, but not spammers' address
  harvesters; therefore it's useful to protect generous contributors
  from being spammed!


  1.2.  Goals


  The intent of this document is to answer some of the questions and
  comments that appear to meet the definition of "frequently asked
  questions" about e-mail software under Linux in general and the
  version in the Linux Debian and RedHat distributions in particular.


  1.3.  New versions


  New versions of this document will be periodically posted to
  comp.os.linux.announce, comp.answers and mail.answers.  They will also
  be added to the various anonymous ftp sites who archive such
  information including sunsite.unc.edu:/pub/Linux/docs/HOWTO.

  In addition, you should be generally able to find this document on the
  Linux WorldWideWeb home page at http://sunsite.unc.edu/mdw/linux.html.


  1.4.  Feedback



  I am interested in any feedback, positive or negative, regarding the
  content of this document via e-mail.  Definitely contact me if you
  find errors or obvious omissions.

  I read, but do not necessarily respond to, all e-mail I receive.
  Requests for enhancements will be considered and acted upon based on
  that day's combination of available time, merit of the request and
  daily blood pressure :-)

  Flames will quietly go to /dev/null so don't bother.

  Feedback concerning the actual format of the document should go to the
  HOWTO coordinator : Tim Bynum (howto at wallybox.cei.net).


  1.5.  Copyright


  The Mail-Administrator HOWTO is copyrighted (c) 1998 Guylhem Aznar.
  Distributed under LDP copyright license.  If you have questions,
  please contact the Linux HOWTO coordinator, at howto at
  wallybox.cei.net.


  1.6.  Limited warranty


  Of course, I disavow any potential liability for the contents of this
  document.  Use of the concepts, examples, and/or other content of this
  document is entirely at your own risk.


  2.  Other sources of information



  2.1.  There is a Mail User's HOWTO, which focuses on user issues.  It
  is currently maintained by Eric S. Raymond; you should be able to view
  it on the World Wide Web at urlnam <http://meta-
  lab.unc.edu/LDP/HOWTO/Mail-User-HOWTO.html>.  Mail User's HOWTO

  2.2.  USENET


  There is nothing special about configuring and running mail software
  under Linux (any more).  Accordingly, you almost certainly do NOT want
  to be posting generic mail-related questions to the comp.os.linux.*
  newsgroups.

  Don't post in comp.os.linux hierarchy unless it's really linux
  specific, for example : "Which options was Debian 1.2 sendmail
  compiled with ?" or "RedHat 5.0 smail crashes when I run it".

  Let me repeat that.

  There is virtually no reason to post anything mail-related in the
  comp.os.linux hierarchy any more.  There are existing newsgroups in
  the comp.mail.* hierarchy to handle *ALL* your questions.

  IF YOU POST TO COMP.OS.LINUX.* FOR NON-LINUX-SPECIFIC QUESTIONS, YOU
  ARE LOOKING IN THE WRONG PLACE FOR HELP.  THE MAIL EXPERTS HANG OUT IN
  THE PLACES INDICATED ABOVE AND GENERALLY DO NOT RUN LINUX.

  POSTING TO THE LINUX HIERARCHY FOR NON-LINUX-SPECIFIC QUESTIONS WASTES
  YOUR TIME AND EVERYONE ELSE'S AND IT FREQUENTLY DELAYS YOUR GETTING
  THE ANSWER TO YOUR QUESTION.
  GOOD PLACES are :

             comp.mail.elm           the ELM mail system.
             comp.mail.mh            The Rand Message Handling system.
             comp.mail.mime          Multipurpose Internet Mail Extensions.
             comp.mail.misc          General discussions about computer mail.
             comp.mail.multi-media   Multimedia Mail.
             comp.mail.mush          The Mail User's Shell (MUSH).
             comp.mail.sendmail      the BSD sendmail agent.
             comp.mail.smail         the smail mail agent.
             comp.mail.uucp          Mail in the uucp environment.



  2.3.  Mailing Lists


  There are many sendmail, smail and qmail mailing lists.

  You can find addresses in /usr/doc/the_one_you_have_chosen.


  2.4.  Other documents from LDP


  There is plenty of excellent material provided in the other Linux
  HOWTO documents and from the Linux DOC project.

  In particular, you might want to take a look at the following:


  o  on your own computer in /usr/doc/ :-)

  o  the Linux Networking Administrators' Guide

  o  the Mail Users HOWTO

  o  the Serial Communications HOWTO

  o  the Ethernet HOWTO

  o  the UUCP HOWTO if you're fed via UUCP


  2.5.  Books


  The following is a non-inclusive set of books that will help:


  o  "Managing UUCP and USENET" from O'Reilly and Associates is in my
     opinion the best book out there for figuring out the programs and
     protocols involved in being a USENET site.

  o  "Unix Communications" from The Waite Group contains a nice
     description of all the pieces (and more) and how they fit together.

  o  "Sendmail" from O'Reilly and Associates looks to be the definitive
     reference on sendmail-v8 and sendmail+IDA.  It's a "must have" for
     anybody hoping to make sense out of sendmail without bleeding in
     the process.

  o  "The Internet Complete Reference" from Osborne is a fine reference
     book that explains the various services available on Internet and
     is a great source for information on news, mail and various other
     Internet resources.

  o  "The Linux Networking Administrators' Guide" from Olaf Kirch of the
     Linux Documentation Project is available on the net and is also
     published by (at least) O'Reilly and SSC.

     It makes a fine one-stop shop to learn about everything you ever
     imagined you'd need to know about Unix networking.



  3.  How Electronic Mail Works

  Now we'll explain the flow of information that typically takes place
  when two people to communicate by email.  Let us suppose that Alice,
  on her machine wonderland.com, wants to send mail to Bob, on his
  machine dobbs.com.  Both machines are connected to the Internet.

  It helps to know that an Internet mail message consists of two parts;
  mail headers and a mail body, separated by a blank line.  The mail
  headers contain the source and destination of the mail, a user-
  supplied subject line, the date it was sent, and various other kinds
  of useful information.  The body is the actual content of the message.
  Here's an example:


  From: "Alice" <alice@wonderland.com>
  Message-Id: <199711131704.MAA18447@wonderland.com>
  Subject: Have you seen my white rabbit?
  To: bob@dobbs.org (Bob)
  Date: Thu, 13 Nov 1997 12:04:05 -0500 (EST)
  Content-Type: text

  I'm most concerned.  I fear he may have fallen down a hole.
  --
                                                  >>alice>>



  The arrangement and meaning of Internet mail headers are defined by an
  Internet standard called RFC822 <ftp://ftp.isi.edu/in-
  notes/rfc822.txt>.


  3.1.  Mail between full-time Internet machines

  Here's a diagram of the whole process -- I'll explain all the stages
  and terminology below.



  ______________________________________________________________________
                     +---------+          +-------+
  +-------+  types   | sending |  calls   |sending|
  | Alice |--------->|   MUA   |--------->|  MTA  |::::>::::
  +-------+          |         |          |       |       ::   on the
                     +---------+          +-------+       ::   sending
                                                          ::   machine
  .......................................................................
                               SMTP                       ::
   ::::::::::::::::::::::::::::<::::::::::::::::::::::::::::
   ::
   ::   +---------+          +-----+                +-------+
   ::   |receiving|  calls   |     |  delivers to   | Bob's |
   ::::>|   MTA   |--------->| LDA |===============>|mailbox|  on the
        |         |          |     |                |       |  receiving
        +---------+          +-----+                +-------+  machine
                                                      |   |
                                                      |   |
                       +----------------<-------------+   |
                       |                                  |
                  +---------+         +-------+           |
                  |  Bob's  |         | Bob's |<----------+
                  | notifier|         |  MUA  |
                  +---------+         +-------+
                       |                  |
                       |      +-----+     |
                       +----->| Bob |<----+
                              +-----+
  ______________________________________________________________________



  To send mail, Alice will invoke a program called a mail user agent (or
  MUA for short).  The MUA is what users think of as `the mailer'; it
  helps her compose the message, usually by calling out to a text editor
  of her choice.  When she hits the MUA `send' button, her part of the
  process is done.  Later in this HOWTO we will survey popular MUAs.

  The MUA she uses immediately hands her message to a program called a
  mail transport agent (or MTA). Usually this program will be sendmail,
  though some alternative MTAs are gaining popularity and may appear in
  future Linux distributions.  Later in this HOWTO we will also survey
  MTAs.

  The MTA's job is to pass the mail to an MTA on Bob's machine.  It
  determines Bob's machine by analyzing the To header and seeing the
  dobbs.com on the right-hand side of Bob's address.  It uses that
  address to open an Internet connection to Bob's machine.  The
  mechanics of making that connection are a whole other topic; for this
  explanation, it's enough to know that that connection is a way for
  Alice's MTA to send text commands to Bob's machine and receive replies
  to those commands.

  The MTA's commands don't go to a shell.  Instead they go to a service
  port on Alice's machine.  A service port is a sort of rendezvous, a
  known place where Internet service programs listen for incoming
  requests.  Service ports are numbered, and Alice's MTA knows that it
  needs to talk to port 25 on Bob's machine to pass mail.

  On port 25, Bob's machine has its own MTA listening for commands
  (probably another copy of sendmail).  Alice's MTA will go through a
  dialogue with Bob's using Simple Mail Transfer Protocol (or SMTP).
  Here is what an SMTP dialogue looks like.  Lines sent by Alice's
  machine are shown with S:, responses from Bob's machine are shown with
  R:.

        S: MAIL FROM:<alice@wonderland.com>
        R: 250 OK
        S: RCPT TO:<bob@dobbs.com>
        R: 250 OK
        S: DATA
        R: 354 Start mail input; end with <CRLF>.<CRLF>
        S: From: "Alice" <alice@wonderland.com>
        S: Message-Id: <199711131704.MAA18447@wonderland.com>
        S: Subject: Have you seen my white rabbit?
        S: To: bob@dobbs.org (Bob)
        S: Date: Thu, 13 Nov 1997 12:04:05 -0500 (EST)
        S: Content-Type: text
        S:
        S: I'm most concerned.  I fear he may have fallen down a hole.
        S: --
        S:                                                 >>alice>>
        S: .
        R: 250 OK



  Usually an SMTP command is a single text line and so is its response.
  The DATA command is an exception; after seeing that, the SMTP listener
  accepts message lines until it sees a period on a line by itself.
  (SMTP is defined by the Internet standard RFC821
  <ftp://ftp.isi.edu/in-notes/rfc821.txt>.)

  Now Bob's MTA has Alice's message.  It will add a header to the
  message that looks something like this:


  Received: (from alice@wonderland.com)
          by mail.dobbs.com (8.8.5/8.8.5) id MAA18447
          for bob@dobbs.com; Thu, 13 Nov 1997 12:04:05 -0500



  This is for tracking purposes in case of mail errors (sometimes a
  message has to be relayed through more than one machine and will have
  several of these).  Bob's MTA will pass the modified message to a
  local delivery agent or LDA.  On Linux systems the LDA is usually a
  program called procmail, though others exist.

  The LDA's job is to append the message to Bob's mailbox.  It's
  separate from the MTA so that both programs can be simpler, and so the
  MTA can concentrate on doing Internet things without worrying about
  local details like where the user mailboxes live.

  Bob's mailbox will normally be a file called /usr/spool/mail/bob or
  /var/mail/bob.  When he reads mail, he runs his own MUA (mail user
  agent) to look at and edit that file.


  3.2.  Notifiers

  There's yet another kind of program that is important in the mail
  chain, though it does not itself read or transmit mail.  It's a mail
  notifier, a program that watches your email in-box for activity and
  signals you when new mail is present.

  The original notifier was a pair of Unix programs called biff(1) and
  comsat(8). The biff program is a front end that enables you to turn on
  the comsat service.  When this service is on, the header of new mail
  will be dumped to your terminal as it arrived.  This facility was
  designed for people using line-oriented programs on CRTs; it's not
  really a good idea in today's environment.
  Most Unix shells have built-in mailcheck facilities that allow them to
  function as notifiers in a rather less intrusive way (by emitting a
  message just before the prompt when new mail is detected).  Typically
  you can enable this by setting environment variables documented on the
  shell's manual page.  For shells in the sh/ksh/bash family, see the
  MAIL and MAILPATH variables

  Systems supporting X come with one of several little desktop gadgets
  that check for new mail periodically and give you both visible and
  audible indication of new mail.  The oldest and most widely used of
  these is called xbiff; if your Linux has a preconfigured X desktop
  setup, xbiff is probably on it.  See the xbiff(1) manual page for
  details.


  3.3.  Mail to part-time Internet machines

  If you were reading carefully, you may have noticed that the
  information flow we described above depends on Alice's machine being
  able to talk to Bob's machine immediately.  What happens if Bob's
  machine is down, or is up but not connected to the Internet?

  If Alice's MTA can't reach Bob's immediately, it will stash Alice's
  message in a mail queue on wonderland.com.  It will then retry sending
  the mail at intervals until an expiration time is reached, at which
  point a bounce message notifying Alice of the failure will be sent
  back to her.  In the default configuration of the most popular MTA
  (sendmail), the retry interval is 15 minutes and the expiration time
  is 4 days.


  3.4.  Remote mail and remote-mail protocols

  Many Linux users nowadays are connected to the Internet via ISPs
  (Internet Service Providers) and don't have their own Internet
  domains.  Instead they have accounts on an ISP machine.  Their mail
  gets delivered to a mailbox on that ISP machine.  But typically these
  users want to read and reply to their mail using their own machines,
  which connect to the ISP intermittently using SLIP or PPP.  Linux
  supports remote mail protocols to support this.

  Note how this is different from the scenario we discussed in the last
  section.  Mail sitting in a queue awaiting retransmission is not the
  same as mail dispatched to a server mailbox; mail in a queue is not
  considered to have been delivered and is subject to expiration, but
  mail delivered to an ISP server mailbox is considered `delivered' and
  can sit there indefinitely.

  A remote-mail protocol allows mail on a server to be pulled across a
  network link by a client program (this is the opposite of normal
  delivery in which an MTA pushes mail to a receiving MTA).  There are
  two remote-mail protocols in common use; POP3 (defined by the Internet
  standard RFC1939 <ftp://ftp.isi.edu/in-notes/rfc1939.txt>) and IMAP
  (defined by the Internet standard RFC2060 <ftp://ftp.isi.edu/in-
  notes/rfc2060.txt>).  Effectively all ISPs support POP3; a growing
  number support IMAP (which is more powerful).

  Here is what an example POP3 session looks like:



        S: <client connects to service port 110>
        R:    +OK POP3 server ready <1896.697170952@mailgate.dobbs.org>
        S:    USER bob
        R:    +OK bob
        S:    PASS redqueen
        R:    +OK bob's maildrop has 2 messages (320 octets)
        S:    STAT
        R:    +OK 2 320
        S:    LIST
        R:    +OK 2 messages (320 octets)
        R:    1 120
        R:    2 200
        R:    .
        S:    RETR 1
        R:    +OK 120 octets
        R:    <the POP3 server sends message 1>
        R:    .
        S:    DELE 1
        R:    +OK message 1 deleted
        S:    RETR 2
        R:    +OK 200 octets
        R:    <the POP3 server sends message 2>
        R:    .
        S:    DELE 2
        R:    +OK message 2 deleted
        S:    QUIT
        R:    +OK dewey POP3 server signing off (maildrop empty)
        S:  <client hangs up>



  An IMAP session uses different commands and responses, but is
  logically very similar.


  To take advantage of POP3 or IMAP, you need a remote mail client
  program to pull your mail.  Some mail user agents have client
  capabilities built in (which one supports which is noted below), and
  the Netscape browser's mail facility supports both POP and IMAP
  natively.

  The main drawback of POP client facilities built into MUAs is that you
  have to explicitly tell your mailer to poll the server; you don't get
  notified by xbiff(1) or equivalent, as you would for mail that is
  either local or delivered by a conventional SMTP `push' connection.
  Also, of course, not all MUAs can do POP/IMAP, so you may find
  yourself compromising on other features.

  Your Linux probably comes with a program called fetchmail
  <http://www.tuxedo.org/~esr/fetchmail> that is designed specifically
  to talk to remote-mail servers, fetch mail, and feed it into your
  normal mail delivery path by speaking SMTP to your listener.

  Unless you need to keep your mail on the server (for example, because
  you move around between client machines a lot) fetchmail is probably a
  better solution than whatever POP/IMAP features your user agent has.
  Fetchmail can be told to run in background and poll your server
  periodically, so your xbiff(1) or other mail-notifier program will
  work as it would for SMTP mail.  Also, fetchmail is rather more
  tolerant of various idiosyncracies and nonstandard server quirks than
  the clients in MUAs, and has better error recovery.

  Here's a diagram showing how both cases (with and without fetchmail)
  work:


  ______________________________________________________________________
                     +---------+          +-------+
  +-------+  types   | sending |  calls   |sending|
  | Alice |--------->|   MUA   |--------->|  MTA  |::::>::::
  +-------+          |         |          |       |       ::
                     +---------+          +-------+       ::   on the
                                                          ::   sending
                               SMTP                       ::   machine
   ::::::::::::::::::::::::::::<::::::::::::::::::::::::::::
   ::
  .::.......................................................................
   ::
   ::   +---------+          +-----+             +-------+
   ::   |receiving|  calls   |     |  delivers   | Bob's |
   ::::>|   MTA   |--------->| LDA |============>|server |::::>::::
        |         |          |     |    to       |mailbox|       ::  on the
        +---------+          +-----+             +-------+       ::   mail
                                                                 ::  server
                            POP or IMAP                          ::
   ::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::
   ::
  .::........................................................................
   ::
   ::                  +-----------+
   ::                  |           |
   :::::::>::::::::::::| fetchmail |::::::::               on the
   ::                  |           |      ::              receiving
   ::                  +-----------+      ::               machine,
   ::                                     ::             with fetchmail
   ::   ::::::::::::::::<:::::::::::::::::::
   ::   ::
   ::   ::   +---------+          +-----+                +-------+
   ::   ::   |receiving|  calls   |     |  delivers to   | Bob's |
   ::   ::::>|   MTA   |--------->| LDA |===============>|mailbox|
   ::        |         |          |     |                |       |
   ::        +---------+          +-----+                +-------+
   ::                                                      |   |
   ::                                                      |   |
   ::                       +----------------<-------------+   |
   ::                       |                                  |
   ::                  +---------+         +-------+           |
   ::                  |  Bob's  |         | Bob's |<----------+
   ::                  | notifier|         |  MUA  |
   ::                  +---------+         +-------+
   ::                       |                  |
  .::........................................................................
   ::                   .   |                  |
   ::     without       .   |                  |
   ::    fetchmail      .   |                  |
   ::                   .   |      +-----+     |
   ::   +----------+    .   +----->|     |<----+
   ::   |  Bob's   |    .          | Bob |
   :::::| POP/IMAP |----.--------->|     |
        |   MUA    |    .          +-----+
        +----------+    .
  ______________________________________________________________________



  3.5.  Mailbox formats

  When incoming mail gets appended to a mailbox, it's up to the MTA to
  provide some kind of delimiters that tell where one message stops and
  the next begins.
  Under Unix, the convention almost all mailers use is that each line
  beginning with ``From '' (the space is significant) begins a new
  message.  If ``From '' occurs at the beginning of a line in text, a
  Unix MTA will generally prefix it with a greater-than sign, so it
  looks like ``>From ''.  RFC822 headers follow this From line (which
  usually continues with the sender name and receipt date).

  This convention originated with Unix Version 7, so this kind of
  mailbox is referred to as a ``V7 mailbox''; it is also sometimes
  called ``mbox format''.  Unless otherwise noted, all programs
  mentioned in this HOWTO expect this format.  It is not, however, quite
  universal, and tools expecting and generating different formats can
  confuse each other badly.

  The four other formats to know about (and beware of!) are BABYL, MMDF,
  MH, and qmail maildir.  Of these, MMDF is the simplest; it uses a
  delimiter line consisting four control-As (ASCII 001) characters
  followed by CR-LF.  MMDF was an early and rather crude Internet mail
  transport; a descendant is still in use on SCO systems.

  BABYL is another survival, from an early mail system at MIT.  It is
  still used by Emacs's mail-reader mode.

  MH and qmail maildir are `mailbox' formats which actually burst each
  mailbox into a directory of files, one per message.  Running grep on
  such a `mailbox' will get you nowhere, since all grep will see are the
  directory bits.

  Microsoft Outlook Express .mbx mailboxes can be converted to RFC822
  format with mbx2mbox app.


  4.  Requirements



  4.1.  Hardware


  There are no specific hardware requirements for mail under Linux.

  You'll need some sort of 'transport' software to connect to remote
  systems, which means either TCP/IP or uucp.

  This could mean that you need a modem or ethernet card, depending on
  your setup.  In most cases, you'll want the fastest modem you can
  afford, i.e. V90 57 600 bps currently.  In general, you want to have a
  16550 UART on your serial board or built into your modem to handle
  speeds of above 9600 baud.

  If you don't know what that last sentence means, please consult the
  comp.dcom.modems group or the various fine modem and serial
  communications FAQs and periodic postings on USENET.


  5.  Choosing a Mail Transport Agent

  Mail transport agents are the software that transfers mail from your
  local system to remote systems.  It is very seldom necessary to mess
  with or replace your MTA on a modern Linux, and you're better off not
  fixing what isn't broken.  Nevertheless, here's a survey to get you
  started on understanding what the tradeoffs are if you decide you need
  more security or performance than your system's default can offer.

  (There are other Unix MTAs besides these, but you are quite unlikely
  to encounter them on a Linux box.)
  Each has its own unique features, but the best compromise is qmail. It
  features high security (even if vmail is more secure), high speed
  (even if smail is faster for local uses) and ease of configuration.
  Of course, feel free to choose any mail software. The information
  provided here is intended to help you choose well.

  Sendmail can be nice for many sites with complicated options, but I
  think its configuration is too hard for beginners while it is not very
  secure or very fast, so there is only a really outdated sendmail
  section in this HOWTO.

  If you know what you're doing, choose sendmail (and you shouldn't be
  reading this HOWTO!); otherwise I generally recommend qmail.

  Detailed descriptions of these programs follow.


  5.1.  sendmail

  BSD sendmail is the grandaddy of Internet MTAs.  It has outlasted a
  few would-be successors.  Most Linux distributions now use it and have
  it preinstalled.


  Sendmail has a long-standing reputation for being an administrator's
  nightmare -- hard to understand, tricky to configure, rife with
  security holes.  As Internet technology and standards have stabilized,
  however, many of the sendmail options and configurable rules that gave
  rise to this reputation have ceased to require per-site tweaking (the
  effective demise of non-TCP/IP network layers like UUCP has helped a
  lot).  Also, recent sendmail versions have an improved configuration
  system that insulates you from the legendary hideousness of the
  sendmail.cf configuration file.  Most importantly, sendmail now
  normally comes preconfigured, and you should never need to touch it
  unless you have unusual requirements (such as needing to route mail
  over a non-TCP/IP network).


  There is a sendmail home page at  <http://www.sendmail.org>.  It
  includes references to extensive documentation of sendmail, should you
  actually need to wrestle with custom-configuring it.


  Other MTAs, if called as `sendmail', may mimic the semantics of
  sendmail's command-line options.  This is convenient for mail user
  agents, which often assume they are talking to sendmail.



  5.2.  smail v3.2

  Smail was the first serious attempt to replace sendmail.  It has a
  simpler and much more comprehensible configuration system than
  sendmail's, and it's fairly secure.  Some Linux distributions
  preinstall it rather than sendmail.


  At one time smail's excellent support for mixed TCP/IP and UUCP sites
  was a major selling point for it, but as UUCP has declined, so has
  smail.  Also, smail is less efficient than sendmail on high-volume
  connections.


  As with sendmail, it is unlikely that you will need to tweak a
  preinstalled smail configuration.

  (Very occasionally you might run across references to an `smail 2.5'.
  This program has been obsolete for a long time.  Don't bother with
  it.)


  5.3.  qmail

  The qmail program is a sendmail-compatible MTA designed specifically
  for high security.  The author has a standing reward of $500 for
  publication of the first verifiable security hole; this reward has
  gone unclaimed since March 1997.

  The qmail home page is at  < http://pobox.com/~djb/qmail.html>.


  5.4.  exim

  The exim program is similar to smail3, but with more features.  It
  advertises particular strengths in spam-blocking and support of
  several virtual hosts (virtual DNS domains) on the same host.

  The exim home page is at  < http://www.exim.org/>.

  I tried it on my own computer, it looks like a nice merge between
  smail configuration system and qmail security, moreover it has the
  advantage of being GPL.

  A section explaining how to replace your current MTA by exim will be
  added soon.


  6.  Installing Transport Software



  6.1.  Qmail v1.03


  Secured, fast and easy to use, this is my preferred MTA (mail
  transport agent).

  Currently, no distribution comes with qmail preinstalled.  We will
  focus on compiling and installing qmail, since this is the only tricky
  part: configuration is really straightforward.


  6.1.1.  Getting qmail


  Go to www.qmail.org to download the latest version.


  6.1.2.  Uncompressing sources


  Then decompress it by running:


       mv qmail.tar.gz /usr/local/src
       cd /usr/local/src ; tar -zxvf qmail.tar.gz



  If you find a bz2 version (new and better compression format), just
  replace tar with:
       bunzip2 qmail.tar.bz2
       tar -xvf qmail.tar



  6.1.3.  Preparing for compilation


  Now enter the qmail directory to examine the configuration defaults:


       cd qmail; more conf-*



  You shouldn't need to change any defaults, but you could (for example)
  specify an alternate installation directory or better compilation
  flags.

  Now run:


       mkdir /var/qmail



  to create target dir.

  If you haven't installed a Debian distribution, you'll need to add
  several user IDs for qmail's use: qmail's high security depends on
  that.

  The fact that qmail is divided into modules running each under their
  own UID makes it much harder for an intruder to break your whole mail
  system or gain root access by abusing it.

  So run:


          # groupadd nofiles
          # useradd -g nofiles -d /var/qmail/alias alias
          # useradd -g nofiles -d /var/qmail qmaild
          # useradd -g nofiles -d /var/qmail qmaill
          # useradd -g nofiles -d /var/qmail qmailp
          # groupadd qmail
          # useradd -g qmail -d /var/qmail qmailq
          # useradd -g qmail -d /var/qmail qmailr
          # useradd -g qmail -d /var/qmail qmails



  or hand-edit /etc/passwd and /etc/group to add these users by
  yourself.

  Evan E. reported he had to use "-g groupid" parameter for a vanilla
  groupadd (Caldera 1.2), else groupadd reported this error : "A group
  with that name already exists."

  For example you can respectively add:


               qmail:*:2107:
               nofiles:*:2108:



  &



               alias:*:7790:2108::/var/qmail/alias:/bin/true
               qmaild:*:7791:2108::/var/qmail:/bin/true
               qmaill:*:7792:2108::/var/qmail:/bin/true
               qmailp:*:7793:2108::/var/qmail:/bin/true
               qmailq:*:7794:2107::/var/qmail:/bin/true
               qmailr:*:7795:2107::/var/qmail:/bin/true
               qmails:*:7796:2107::/var/qmail:/bin/true



  Now you can run


       make setup check



  to check your configuration, then :


       ./config



  to configure qmail.

  Attention, your server has to be resolvable by DNS or ./config will
  get confused.

  If you don't have DNS access, you can give your server name directly
  via :


       ./config-fast foo.bar.com



  Now you must install some aliases, since /etc/alias is not used by
  qmail unless you compile and install an optional package.

  Here's my setup :



  File : ".qmail-MAILER-DAEMON"
  &postmaster
  File : ".qmail-bin"
  &root
  File : ".qmail-daemon"
  &root
  File : ".qmail-decode"
  &root
  File : ".qmail-dumper"
  &root
  File : ".qmail-games"
  &root
  File : ".qmail-ingres"
  &root
  File : ".qmail-mailer-daemon"
  &postmaster
  File : ".qmail-manager"
  &root
  File : ".qmail-news"
  &root
  File : ".qmail-nobody"
  &root
  File : ".qmail-operator"
  &root
  File : ".qmail-postmaster"
  &root
  File : ".qmail-root"
  &guylhem
  File : ".qmail-system"
  &root
  File : ".qmail-toor"
  &root
  File : ".qmail-uucp"
  &root
  File : ".qmail-uucp-default"
  |preline -dr /usr/bin/uux - -r -gC -a"${SENDER:-MAILER-DAEMON}" lm!rmail "($DEFAULT@$HOST)"



  You need to create each of these file in ~alias, replacing &guylhem in
  .qmail-root by your own login to get root mail.

  ATTENTION UUCP USERS !

  DO NOT TRUST THE QMAIL FAQ FOR UUCP, USE MY .qmail-uucp-default
  INSTEAD!  ELSE YOU WILL NOT BE ABLE TO SEND ANY MAIL BY YOUR UUCP
  CONNEXION!

  Now you'll need to decide in which format your users will get their
  mail.

  Here's my suggestion :

  o  For NFS mounted home dirs, use MAILDIR format with a patch for
     local mail readers (patchs are available on www.qmail.org)

  o  If no patch is available, prefer MAILFILE format : any mail reader
     can read a file containing mail, people will only need to create an
     alias (for bash) or a setenv (for csh) for their mail reader

  o  Avoid /var/spool/mail/$USER format, too insecure

  To fix the default format, read each file in /var/qmail/boot then copy
  the one you best like to /var/qmail/rc.

  home or proc are safe choices, but prefer home for security reasons.


  6.1.4.  Configuring qmail


  In /var/qmail/control, edit:


  6.1.4.1.  defaultdomain, me, plusdomain



  o  me is you local FQDN (full qualified domain name), for example on
     my machine it is barberouge.linux.lmm.com

  o  defaultdomain will be added to any host name without dots,
     including defaulthost, for example you can set it to localnetwork
     so any mail sent to joe@hisbox will be completed to be sent to
     joe@hisbox.localnetwork instead

  o  plusdomain is the exception: it is added to any host name that ends
     with a plus sign, including defaulthost (set in me) if it ends with
     a plus sign.

  These 3 examples show you the power and ease of configuration of
  qmail!


  6.1.4.2.  locals, rcpthosts


  If you want to support virtual domain names, just put additional names
  in these files. Any mail you receive for these names will be handled
  locally.

  The difference between locals and rcpthosts is the latter isn't
  considered as a local alias, which is useful if you receive mail from
  some free email address like yahoo.com or lemel.fr while you also send
  mail to other users of these non local services, i.e. you don't want
  to handle locally mail send to someone@yahoo.com!


  6.1.4.3.  virtualdomains


  There can you specify default outgoing mode, for example :


       #:alias-uucp



  if you don't want to send outgoing mail by uucp but by smtp (default)
  or


       :alias-ucp



  if you send your outgoing mail by uucp.


  6.1.5.  Testing qmail


  Now it is configured, try:


       sh -cf '/var/qmail/rc &'



  to launch qmail (it won't interfere with your local MTA), then:



       echo to: mylogin | /var/qmail/bin/qmail-inject



  You should receive this mail in the format you've chosen in
  /var/qmail/boot/.


  6.1.6.  Removing your other MTA


  If this test was successful, just kill your previous MTA:

  killall -STOP daemon_name ; if any children are running, you should
  killall -CONT their_name, wait, killall -STOP again, and repeat ad
  nauseam.

  If there aren't any children, killall -TERM and then killall -CONT.

  Remove it (how you can do this depends on the distribution you
  installed, for example rpm -e --nodeps on RedHat, Caldera and Suse, or
  dpkg -r --force-depends on Debian) then run:


       # ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
       # ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail



  Now set up qmail-smtpd in /etc/inetd.conf (all on one line):


       smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env tcp-env /var/qmail/bin/qmail-smtpd



  If you are using a old non-SYSV-init distribution like redhat, just
  add to your boot scripts:


       sh -cf '/var/qmail/rc &'



  Usually this should be /etc/rc.local but your mileage may vary.


  For actual SYSV-init compliant distributions (RedHat, Caldera, Suse,
  Debian), add this script to /etc/init.d/ or /etc/rc.d/init.d/ :

  DEBIAN version:



       #!/bin/sh

       test -x /var/qmail/rc || exit 0

       case "$1" in
         start)
            echo -n "Starting mta: "
            sh -cf '/var/qmail/rc &'
            echo "qmail."
            ;;
         stop)
            echo -n "Stopping mta: "
            killall qmail-lspawn
            echo "qmail."
            ;;
         restart)
            echo -n "Restarting mta: "
            killall -HUP qmail-lspawn
            killall -ALRM qmail-lspawn
            echo "qmail."
            ;;
         *)
            echo "Usage: /etc/init.d/qmail {start|stop|restart}"
            exit 1
       esac

       exit 0



  REDHAT version:



  #!/bin/sh
  #
  # qmail      This shell script takes care of starting and stopping qmail.
  #
  # description: qmail is a Mail Transport Agent, which is the program \
  #              that moves mail from one machine to another.
  # processname: qmail
  # config: /var/qmail/control/

  # Source function library.
  . /etc/rc.d/init.d/functions

  # Source networking configuration.
  . /etc/sysconfig/network

  export PATH=$PATH:/var/qmail/bin

  # Check that networking is up.
  [ ${NETWORKING} = "no" ] && exit 0

  [ -f /usr/sbin/sendmail ] || exit 0

  # See how we were called.
  case "$1" in
    start)
          # Start daemons.
          echo -n "Starting qmail: "
          qmail-start '|preline procmail' splogger qmail &
          touch /var/lock/subsys/qmail
          echo
          ;;
    stop)
          # Stop daemons.
          echo -n "Shutting down qmail: "
          killproc qmail-lspawn
          echo
          rm -f /var/lock/subsys/qmail
          ;;
    restart)
          $0 stop
          $0 start
          ;;
    status)
          status qmail
          ;;
    *)
          echo "Usage: qmail {start|stop|restart|status}"
          exit 1
  esac

  exit 0



  And make symlinks to each /etc/rc.d/rcN.d/, for example:


       ln -sf /etc/init.d/qmail /etc/rc1.d/K19qmail



  If the first letter is K, you will kill qmail on this runlevel (1 for
  single mode or 6 for boot), but if the first letter is S, you will
  start qmail on this runlevel (each others runlevel).
  o  How to decide whether you should put a K or a S?  Do what the
     majority of daemons in this runlevel do!

  o  What number should you put after K or S?  The number next to your
     network daemon.

     That means the MTA will be started and stopped respectively after
     and before the network daemon.

     Without this, your network will be unreachable while the MTA would
     expect it to work.

  RedHat, Caldera and Suse will use /etc/rc.d/ instead of plain /etc/
  for Debian distribution, i.e. /etc/rc.d/rc1.d or /etc/rc.d/init.d for
  example.


  6.1.7.  That's all, folks!


  No need to reboot (remember, you're using linux, not some other cheap
  OS!) for the modifications to take effect, just run:



       killall inetd
       init 1



  To go to single user mode, then:


       init 2



  to go back to your default runlevel (indicated in /etc/inittab with
  initdefault label).

  You could also hand-start qmail script but "init" method will show you
  if qmail script is well positioned, i.e. launched after network
  scripts but before any program which depends on email to warn you
  (like inn).


  6.2.  Smail v3.1


  Smail3.1 seems to be a de-facto standard transport agent for uucp-only
  sites and for some smtp sites. It's easy to configure, it compiles
  without patching from the sources and it's fairly secure.


  6.2.1.  Configuring smail


  Install the smail binary from your distribution (I recommend you
  choose this) or get the smail sources and build smail. If you're
  building smail from sources, you need to have the following in your
  os/linux file so that 'sed' gives you shell scripts that work
  properly.


  CASE_NO_NEWLINES=true



  Once it's installed, config. files will certainly go in /etc/smail
  (but your mileage may vary if you use old distributions); let's start
  editing them!


  6.2.1.1.  "config" file



       # From
       smart_path=polux
       smart_transport=uux

       # To
       hostname=barberouge
       domains=linux.lmm.com

       visible_name=barberouge.linux.lmm.com
       uucp_name=barberouge.linux.lmm.com

       # max_message_size=512k
       # auth_domains=foo.bar
       # more_hostnames=barberouge.polux.freenix.fr



  Well, first, who is feeding you? I'm fed by "polux" via uucp (i.e.
  uux transport); naturally you need to change this file according to
  your own situation. For example, you could by fed by
  "bargw.bar.foobar.com" via "smtp", in that case you don't need a
  transport file and can define "-transport_file " to indicate you don't
  need one.

  You can also use "postmaster_address = yourname", hide the network
  topology in outgoing addresses (if you're a gateway) using
  "visible_name", set which aliases address can also be used for the
  email you receive, using "more_hostnames".

  See smail documentation for more details or the examples in
  /usr/doc/smail/examples to see if any match your situation.


  6.2.1.2.  "directors" file



  # aliasinclude - expand ":include:filename" addresses produced by alias files
  # This entry and the next one are pretty much boiler-plate.  Reasons
  # for making significant changes are few.  The sole purpose of these
  # is to match and expand addresses of the form:
  #       :include:pathname
  # which may occur in alias files or mailing-list/forward files
  # (produced by any director with a driver of forwardfile).
  aliasinclude:
          driver = aliasinclude,          # use this special-case driver
          nobody;                         # associate nobody user with addresses
                                          #  when mild permission violations
                                          #  are encountered
          copysecure,                     # get permissions from alias director
          copyowners,                     # get owners from alias director



  # forwardinclude - expand ":include:filename" addrs produced by forward files
  forwardinclude:
          driver = forwardinclude,        # use this special-case driver
          nobody;
          copysecure,                     # get perms from forwarding director
          copyowners,                     # get owners from forwarding director


  # aliases - search for alias expansions stored in a database
  # This is the standard aliases file.  It is used for generic things,
  # like mapping root, postmaster, MAILER-DAEMON and uucp to site
  # admins, creating some small system alias expansions, and such.  In
  # this site configuration, the aliases file is used mostly for
  # machine-specific aliasing/forwarding information.  Global forwarding
  # information should be put in the "forward" database.
  aliases:
          driver=aliasfile,               # general-purpose aliasing director
          -nobody,                        # all addresses are associated
                                          # with nobody by default, so setting
                                          # this is not useful.
          sender_okay,                    # don't remove sender from expansions
          owner=owner-$user;              # problems go to an owner address
          file=/etc/aliases,
          modemask=002,                   # should not be globally writable
          optional,                       # ignore if file does not exist
          proto=lsearch,                  # unsorted ASCII file


  # forward - search for expansions stored in a forwarding database
  # This is the subdomain-wide user forwarding database.  Entries are
  # maintained here for current or past users, to forward their mail to
  # their preferred mail-reading machine.  The forward database is
  # shipped around the TCP/IP network as changes are made, to keep the
  # network consistent.
  #forward:
  #       driver = aliasfile,             # general-purpose aliasing director
  #       -nobody,                        # all addresses are associated
  #                                       # with nobody by default, so setting
  #                                       # this is not useful.
  #       owner = real-$user;             # problems go to an owner address
  #
  #       file = /etc/forward,
  #       modemask = 002,
  #       proto = dbm,                    # use dbm(3X) library for access


  # dotforward - expand .forward files in user home directories
  # For users that have an entry in the "forward" database, a ".forward"
  # file is only used if it is on the "home" machine, as identified in
  # the forward database.  If used, it is treated as a list of addresses
  # to which mail should be delivered, rather than (or in addition to)
  # the user identified in the local address.
  dotforward:
          driver = forwardfile,           # general-purpose forwarding director
          owner = postmaster, nobody, sender_okay;

          file = ~/.forward,              # .forward file in home directories
          checkowner,                     # the user can own this file
          owners = root,                  # or root can own the file
          modemask = 002,                 # it should not be globally writable
          caution = daemon:root,          # don't run things as root or daemon
          # be extra careful of remotely accessible home directories
          unsecure = "~uucp:/tmp:/usr/tmp:/var/tmp"


  # forwardto - expand a "Forward to " in user mailbox files
  # This emulates the V6/V7/System-V forwarding mechanism which uses a
  # line of forward addresses stored at the beginning of user mailbox files
  # prefixed with the string "Forward to "
  forwardto:
          driver = forwardfile,
          owner = postmaster, nobody, sender_okay;

          file = /var/spool/mail/${lc:user},      # point at user mailbox files
          forwardto,                      # enable "Forward to " function
          checkowner,                     # the user can own this file
          owners = root,                  # or root can own the file
          modemask = 0002,                # under System V, group mail can write
          caution = daemon:root           # don't run things as root or daemon


  # user - match users on the local host with delivery to their mailboxes
  user:   driver = user;                  # driver to match usernames
          transport = local               # local transport goes to mailboxes


  # real_user - match usernames when prefixed with the string "real-"
  # This is useful for allowing an address which explicitly delivers to a
  # user's mailbox file.  For example, errors in a .forward file expansion
  # could be delivered here, or forwarding loops between multiple machines
  # can be resolved by using a real-username address.  Also, users that
  # wish to use mail as a means of transferring data to a machine that
  # is not their "home" machine can mail to real-login-name@remote.host.
  real_user:
          driver = user;
          transport = local,
          prefix = "real-"            # for example, match real-root


  # lists - expand mailing lists stored in a list directory
  # mailing lists can be created simply by creating a file in the
  # /etc/smail/lists directory.
  lists:  driver = forwardfile,
          caution,                        # flag all addresses with caution
          nobody,                         # and then associate the nobody user
          owner = owner-$user;            # system V sites may wish to use
                                          # o-$user, as owner-$user may be
                                          # too long for a 14-char filename.
          file = lists/${lc:user}         # lists is under $smail_lib_dir


  # owners - expand mailing lists stored in a list owner directory
  # mailing lists owner lists can be created simply by creating a file
  # in the /etc/smail/lists/owner directory.  Mailing list owners
  # are sent locally generated errors dealing with a mailing list of the
  # same name.  To create an owner list for a mailing list, create a
  # file with the name of the list in /etc/smail/lists/owner.  This
  # will create a list address of owner-listname, as is used by the
  # "lists" director above.
  owners: driver = forwardfile,
          caution,                        # flag all addresses with caution
          nobody,                         # and then associate the nobody user
          owner = postmaster;             # system V sites may wish to use
                                          # o-$user, as owner-$user may be
                                          # too long for a 14-char filename.
          prefix = "owner-",
          file = lists/owner/${lc:user}   # lists is under $smail_lib_dir


  # request - expand mailing lists stored in a list request directory
  # mailing lists request lists can be created simply by creating a file
  # in the /etc/smail/lists/request directory.  Request addresses
  # are typically used as a standard address for queries about a mailing
  # list.  For example, requests for additions or deletions to a list
  # will generally be sent to "list-request", which should be set up to
  # forward to the appropriate person or persons.
  request: driver = forwardfile,
          caution,                        # flag all addresses with caution
          nobody,                         # and then associate the nobody user
          owner = postmaster;             # system V sites may wish to use
                                          # o-$user, as owner-$user may be
                                          # too long for a 14-char filename.
          suffix = "-request",
          file = lists/request/${lc:user} # lists is under $smail_lib_dir



  You shouldn't need to change anything here, only mailing list options
  if you intend to run some using smail, or forwards options if, for
  example, you want to disable forwarding.


  6.2.1.3.  "fidopaths" file



       .f105.n324.z2.fidonet.org     f105.n324.z2.fidonet.org!%s
       .n324.z2.fidonet.org          f105.n324.z2.fidonet.org!%s
       .z2.fidonet.org                       f105.n324.z2.fidonet.org!%s
       .fidonet.org                  f105.n324.z2.fidonet.org!%s



  Create such a file only if you're using ifmail and FIDO.


  6.2.1.4.  "routers" file



  # forces - force certain paths
  # This database exists as a means of hardcoding the paths to various
  # machines or domains.  It is for use in creating temporary tweaks to
  # the other routing databases.  To change the database, edit the file
  # maps/force.path and type "make" in the maps/ subdirectory.
  forces:
          driver = pathalias,             # router to search paths file
          method = /etc/smail/maps/table; # transports are in this file
          file = forcepaths,              # file containing force path info
          proto = lsearch,                # use the sorted path file
          optional,
          reopen                          # close when not being used


  uucp_neighbors:
          driver=uuname,                  # use a program which returns neighbors
          transport=uux;
          cmd="/usr/bin/uuname -a",       # specifically, use the uuname program
  #        domain=uucp                    # strip ending ".uucp"


  # smart_host - a partially specified smarthost director
  # If the config file attribute smart_path is defined as a path from the
  # local host to a remote host, then hostnames not matched otherwise will
  # be sent off to the stated remote host.  The config file attribute
  # smart_transport can be used to specify a different transport.
  # If the smart_path attribute is not defined, this router is ignored.
  smart_host:
          driver = smarthost,             # special-case driver
          transport = uux                 # by default deliver over UUCP
  #       path=phreak


  # ifmail - to send mails to fidonet and vice versa
  ifmail:
          driver=pathalias,
          transport=ifmail;
          file=fidopaths,
          proto=lsearch



  You should only include ifmail chapter if you use ifmail for FIDO
  mails. Note you can also change transport mode from "uux" (ie UUCP)
  to, for example, "smtp" or even 'hardcode the paths to various
  machines or domains' in "/etc/smail/maps/table".

  This is useful if you want outgoing mail for your local network to be
  delivered immediately, since there's no need for it to be routed to
  your uucp connexion of your internet access.


  6.2.1.5.  "transports" file



  # local - deliver mail to local users
  # Tell smail to append directly to user mailbox files in the /var/spool/mail
  # directory.
  #local: driver = appendfile,            # append message to a file
  #       -return_path,                   # include a Return-Path: field
  #       local,                          # use local forms for delivery
  #       from,                           # supply a From_ envelope line
  #       unix_from_hack;                 # insert > before From in body
  #
  #       file = /var/spool/mail/${lc:user},      # use this location for Linux
  #                                               # Note, mail spool must be 1777
  #       file = ~/mailfile,              # use this location for better security
  #       group = mail,                   # group to own file for System V
  #       mode = 0660,                    # under System V, group mail can access
  #       suffix = "\n",                     # append an extra newline
  #       append_as_user,


  # This allows each user to have a ~/.procmailrc file to control filtering
  # of mail and saving mail from mail lists in separate mailboxes if they wish.
  local:  +inet,
          -uucp,
          driver = pipe,                  # append message to a file
          return_path,                    # include a Return-Path: field
          local,                          # use local forms for delivery
          from,                           # supply a From_ envelope line
          unix_from_hack;                 # insert > before From in body

          cmd = "/usr/bin/procmail",  # use procmail for local delivery
          parent_env,                     # environment info from parent addr
          pipe_as_user,                   # use user-id associated with address
          umask = 0022,                   # umask for child process
  #       -ignore_status,                 # exit status should be believed
  #       -ignore_write_errors,           # retry on broken pipes


  # pipe - deliver mail to shell commands
  # This is used implicitly when smail encounters addresses which begin with
  # a vertical bar character, such as "|/usr/lib/news/recnews talk.bizarre".
  # The vertical bar is removed from the address before being given to the
  # transport.
  #pipe:  driver = pipe,                  # pipe message to another program
  #       return_path, local, from, unix_from_hack;
  #
  #       cmd = "/bin/sh -c $user",   # send address to the Bourne Shell
  #       parent_env,                     # environment info from parent addr
  #       pipe_as_user,                   # use user-id associated with address
  #       umask = 0022,                   # umask for child process
  #       -log_output,                    # do not log stdout/stderr
  #       ignore_status,                  # exit status may be bogus, ignore it
  #       ignore_write_errors,            # ignore broken pipes


  # file - deliver mail to files
  # This is used implicitly when smail encounters addresses which begin with
  # a slash or squiggle character, such as "/usr/info/list_messages" or
  # perhaps "~/Mail/inbox".
  #file:  driver = appendfile,
  #       return_path, local, from, unix_from_hack;
  #
  #       file = $user,                   # file is taken from address
  #       append_as_user,                 # use user-id associated with address
  #       expand_user,                    # expand ~ and $ within address
  #       check_path,
  #       suffix = "\n",
  #       mode = 0644
  # uux - deliver to the rmail program on a remote UUCP site
  #
  # As many as five recipient addresses will be delivered to the remote
  # host in one UUCP transaction.
  uux:    driver = pipe,
          -uucp,
          inet,
  #       uucp,                           # use UUCP-style addressing forms
          from,                           # supply a From_ envelope line
          max_addrs = 5,                  # at most 5 addresses per invocation
          max_chars = 200;                # at most 200 chars of addresses
  # the -r flag prevents immediate delivery, parentheses around the
  # $user variable prevent special interpretation by uux.
          cmd = "/usr/bin/uux - -r -g$grade $host!rmail $((${strip:user})$)",
  #        cmd="/usr/bin/uux - $host!rmail $(($user)$)",
          ignore_write_errors,            # ignore broken pipes
          umask = 0022,
  #       pipe_as_sender,


  # uux_one_addr - deliver mail over UUCP to a remote host that can take
  #                one address at a time.
  # This is often necessary when delivering to a site running an unmodified
  # version of 4.1BSD.
  uux_one_addr:
          driver = pipe,
          uucp,                           # use UUCP-style addressing forms
          from;                           # supply a From_ envelope line
  # the -r flag prevents immediate delivery
          cmd = "/usr/bin/uux - -r -g$grade $host!rmail (${strip:user})",
          umask = 0022,
          pipe_as_sender


  queueonly:
          driver = pipe;                  # send the message to a pipe
          cmd = "/usr/lib/sendmail -Q -f $sender -bm $user",
                                          # use getmail for local delivery
          user=root,                      # execute getmail as "root"
          group=mail,                     # execute getmail as "mail"
          parent_env,                     # environment info from parent addr
          -pipe_as_user,                  # use user-id associated with address
          umask = 0007,                   # umask for child process

  # to deliver the message.  The smtp transport is included only if BSD
  # networking exists.
  # The uucp attribute can be specified for transfers within the UUCP
  # zone.  The inet attribute must be specified for transfers within the
  # Internet.
  # NOTE: This is hardly optimal, a backend should exist which can handle
  #       multiple messages per connection.
  # ALSO: It may be necessary to restrict max_addrs to 100, as this is the
  #       lower limit SMTP requires an implementation to handle for one
  #       message.
  smtp:   driver=tcpsmtp,
          inet,                           # if UUCP_ZONE is not defined
  #       uucp,                           # if UUCP_ZONE is defined
          -max_addrs, -max_chars;         # no limit on number of addresses

          short_timeout=5m,               # timeout for short operations
          long_timeout=2h,                # timeout for longer SMTP operations
          service=smtp,                   # connect to this service port
  # For internet use: uncomment the below 4 lines
         use_bind,                       # resolve MX and multiple A records
         defnames,                       # use standard domain searching
         defer_no_connect,               # try again if the nameserver is down
         local_mx_okay,                  # fail an MX to the local host


  ifmail:
          from,received,max_addrs=5,max_chars=200,
          driver=pipe;
          pipe_as_sender,
          cmd="/usr/local/bin/ifmail -x9 -r$host $((${strip:user})$)"



  You should include an ifmail chapter only if you use ifmail for FIDO
  mail. Apart from that, you shouldn't need to edit anything in this
  file which defines transport agents (like uux, smtp ...) you can use
  as parameters in other config. files.

  Note I commented out some parts, like "pipes" or "file", to enhance
  security.


  6.2.1.6.  "maps/" directory


  It contains map and table files:

  First, map file



       #N      foo.bar foo2.bar2
       #S      AT 486/RedHat Linux 1.2.13
       #O      organization
       #C      contact
       #E      administration (email)
       #T      phone
       #P      address
       #R
       #U      hosts connected via uucp
       #W      created/edited by
       #
       hname polux

       hname linux.eu.org

       hname = polux
       hname = polux.linux.eu.org



  Once again, edit this file to match you situation (I'm fed by
  polux.linux.eu.org).

  Now table file



       *       uux



  You can define different transports to different paths, for example
  "smtp" for the machines in your local network, "uux" (i.e. uucp) for
  the rest of the world or vice-versa (I'm using uucp for any outgoing
  mail, therefore I use "*"!).


  6.2.2.  Other good examples


  The previous files are the one I currently use for my site, you
  shouldn't encounter any problem using them as samples/basis for your
  own files.

  The following files are provided only as good examples to configure
  smail a different way.



  #ident "@(#) transports,v 1.2 1990/10/24 05:20:46 tron Exp"

  # See smail(5) for a complete description of the contents of this file.

  # local - deliver mail to local users
  #
  # Tell smail to append directly to user mailbox files in the /usr/mail
  # directory.
  local:  driver = appendfile,            # append message to a file
          return_path,                    # include a Return-Path: field
          local,                          # use local forms for delivery
          from,                           # supply a From_ envelope line
          unix_from_hack;                 # insert > before From in body

          file = /usr/mail/${lc:user},    # use this location for System V
          group = mail,                   # group to own file for System V
          mode = 0660,                    # under System V, group mail can access
          suffix = "\n",                     # append an extra newline
          append_as_user,

  # pipe - deliver mail to shell commands
  #
  # This is used implicitly when smail encounters addresses which begin with
  # a vertical bar character, such as "|/usr/lib/news/recnews talk.bizarre".
  # The vertical bar is removed from the address before being given to the
  # transport.
  pipe:   driver = pipe,                  # pipe message to another program
          return_path, local, from, unix_from_hack;

          cmd = "/bin/sh -c $user",   # send address to the Bourne Shell
          parent_env,                     # environment info from parent addr
          pipe_as_user,                   # use user-id associated with address
          umask = 0022,                   # umask for child process
          -log_output,                    # do not log stdout/stderr
          ignore_status,                  # exit status may be bogus, ignore it
          ignore_write_errors,            # ignore broken pipes

  # file - deliver mail to files
  #
  # This is used implicitly when smail encounters addresses which begin with a
  # slash or squiggle character, such as "/usr/info/list_messages" or perhaps
  # "~/Mail/inbox".
  file:   driver = appendfile,
          return_path, local, from, unix_from_hack;

          file = $user,                   # file is taken from address
          append_as_user,                 # use user-id associated with address
          expand_user,                    # expand ~ and $ within address
          suffix = "\n",
          mode = 0644

  # uux - deliver to the rmail program on a remote UUCP site
  #
  # As many as five recipient addresses will be delivered to the remote host in
  # one UUCP transaction.
  uux:    driver = pipe,
          uucp,                           # use UUCP-style addressing forms
          from,                           # supply a From_ envelope line
          max_addrs = 5,                  # at most 5 addresses per invocation
          max_chars = 200;                # at most 200 chars of addresses

          # the -r flag prevents immediate delivery, parentheses around the
          # $user variable prevent special interpretation by uux.
          cmd = "/usr/bin/uux - -r -g$grade $host!rmail $((${strip:user})$)",
          umask = 0022,
          pipe_as_sender
  # uux_one_addr - deliver mail over UUCP to a remote host that can take one
  # address at a time.
  #
  # This is often necessary when delivering to a site running an unmodified
  # version of 4.1BSD.
  uux_one_addr:
          driver = pipe,
          uucp,                           # use UUCP-style addressing forms
          from;                           # supply a From_ envelope line

          # the -r flag prevents immediate delivery
          cmd = "/usr/bin/uux - -r -g$grade $host!rmail (${strip:user})",
          umask = 0022, pipe_as_sender

  # demand - deliver to a remote rmail program, polling on demand
  demand: driver = pipe,
          uucp, from, max_addrs = 5, max_chars = 200;

          # with no -r flag, try to contact remote site immediately
          cmd = "/usr/bin/uux - -g$grade $host!rmail $(($user)$)",
          umask = 0022, pipe_as_sender

  # uusmtp - deliver to the rsmtp program on a remote UUCP site
  #
  # Deliver using a simple Batched SMTP protocol to the remote machine.
  # This allows much more arbitrary addresses to be used.  It also
  # removes the limit on recipient addresses per invocation of uux.
  uusmtp: driver = pipe,
          bsmtp,                          # send batched SMTP commands
          -max_addrs,                     # there is no limit on the number or
          -max_chars;                     #   total size of recipient addresses.

          # supply -r to prevent immediate delivery, the recipient addresses
          # are stored in the data sent to the standard input of rsmtp.
          cmd = "/usr/bin/uux - -r -g$grade $host!rsmtp",
          umask = 0022, pipe_as_sender

  # demand_uusmtp - deliver to a remote rsmtp program, polling on demand
  demand_uusmtp:
          driver = pipe,
          bsmtp, -max_addrs, -max_chars;

          # with no -r flag, try to contact remote site immediately
          cmd = "/usr/bin/uux - -g$grade $host!rsmtp",
          umask = 0022, pipe_as_sender

  # smtp - deliver using SMTP over TCP/IP
  #
  # Connect to a remote host using TCP/IP and initiate an SMTP conversation to
  # deliver the message.  The smtp transport is included only if BSD networking
  # exists.

  # NOTE: It may be necessary to restrict max_addrs to 100, as this is the
  #       lower limit SMTP requires an implementation to handle for one
  #       message.
  smtp:   driver = smtp,
          -max_addrs,
          -max_chars



  #ident "@(#) table,v 1.2 1990/10/24 05:20:31 tron Exp"

  # This file names the transports that are to be used in delivering
  # to specific hosts from bargw.

  #host           transport
  #--------       ---------
  curdsgw         demand_uusmtp   # deliver using batched SMTP
  oldbsd          uux_one_addr    # 4.1BSD sites cannot take more than one addr
  sun             demand          # call sun when their is mail to send
  *               uux             # for all others, poll at intervals



  6.2.3.  Restarting inetd


  To run smail as a smtp daemon, add one of the following to
  /etc/inetd.conf:

           smtp stream tcp nowait  root  /usr/bin/smtpd smtpd

  or:

           smtp stream tcp nowait  root  /usr/sbin/tcpd  /usr/sbin/in.smtpd



  Outgoing mail gets sent automatically, when using elm.


  6.2.4.  Smail with smtp


  Generally, ISPs use smtp, therefore you shouldn't have any problems
  sending your mail. If your internet link is down when you send mail,
  then the mail sits in "/var/spool/smail/input". When the link next
  comes up, "runq" is run which causes the mail to be sent. However,
  receiving mail is the problem since your provider has many clients to
  look after, not only you!

  Usually, you can retrieve your mail via the POP protocol, see POP
  section below.


  6.3.  OUTDATED SECTION: Sendmail+IDA


  For big sites, sendmail is worth choosing, due to the "incredible ease
  of use", (very relative feeling when you know qmail) but you must
  decide which you want between sendmail+IDA and sendmail 8.x:


  o  If you use an old kernel (1.0): sendmail+IDA

  o  If you use a not so old kernel (1.2): sendmail+IDA and source code
     editing

  o  Recent kernel (2.0) will choose sendmail 8.x

  Remember, linux newbies or people concerned by security / ease of
  configuration should rather try using smail or qmail, which are easier
  to use and safer.
  6.3.1.  Source installation


  If your distribution doesn't provide you with a ready-to-install
  sendmail package (.rpm for RedHat, Caldera and Suse, .deb for Debian)
  just download the sources and run:


  o  cd / ; tar -zxvf sendmail5.67b+IDA1.5.tgz


  o  cd to /usr/local/lib/mail/CF and copy the sample.m4 local.m4 file
     to "yourhostname.m4".

  Edit out the distributed hostname, aliases, smarthost and put in the
  correct one for your site. The default file is for a uucp-only site
  (no longer in 8.x) who has domainized headers and who talks to a smart
  host.  Then "make yourhostname.cf" and move the resulting file to
  /etc/sendmail.cf


  o  if you are uucp-only, you do *NOT* need to create any of the tables
     mentioned in the README.linux file.

  You'll just have to touch the files so that the Makefile works. Just
  edit the .m4 file, make sendmail.cf and start testing it.


  o  if you're uucp-only and you talk to sites in addition to your
     "smart-host", you'll need to add uucpxtable entries for each (or
     mail to them will also go through the smart host) and run dbm
     against the revised uucpxtable.


  o  If you run Rich Braun's original binary distribution of 5.67a,
     you'll need to freeze the configuration if you change your .cf file
     with "/usr/lib/sendmail -bz" to make the changes take effect.

  You should also update your version to at least 5.67b since there is a
  nasty security hole in 5.67a and earlier. Another nice thing is that
  if you have mail.debug set and you run syslogd, your incoming and
  outgoing mail messages will get logged. See the "/etc/syslog.conf"
  file for details.

  The sources for sendmail+IDA can be found at vixen.cso.uiuc.edu ; they
  require no patching to run under Linux if you're running something
  like a kernel of 1.00.

  If you're running a kernel > 1.1.50, you get the fun of reversing most
  of the Linux-specific patches that are now in the vanilla sources.  (I
  *did* told you this sendmail was only for old kernels:-)

  It's extremely obvious where this needs to be done: just type "make"
  and when it blows up, go to that line in the sources and comment out
  the Linux-specific code that's in there.

  If you're going to run sendmail+IDA, I strongly recommend you go to
  the sendmail5.67b+IDA1.5 version since all required Linux-specific
  patches are now in the vanilla sources and several security holes have
  been plugged that WERE (!!!) in the older version you may have grabbed
  or built before about December 1st, 1993.

  Now linux kernel is 2.0, you should use sendmail 8.x instead of
  sendmail+IDA, but I already told you'd better choose sendmail 8.x:-)


  6.3.2.  The sendmail.m4 file


  Sendmail+IDA requires you to set up a sendmail.m4 file rather than
  editing the sendmail.cffile directly.  The nice thing about this is
  that it is simple to set up mail configurations that are extremely
  difficult (if not totally impossible for most people to set up
  correctly) in smail or traditional sendmail.

  The sendmail.m4 file that corresponds to the above smail example looks
  like the following:


    dnl #------------------ SAMPLE SENDMAIL.M4 FILE ------------------
    dnl #
    dnl # (the string 'dnl' is the m4 equivalent of commenting out a line)
    dnl # (well, not exactly, but use it for this purpose if you must :-)
    dnl # you generally don't want to override LIBDIR from the compiled in paths
    dnl #define(LIBDIR,/usr/local/lib/mail)dnl    # where all support files go
    define(LOCAL_MAILER_DEF, mailers.linux)dnl    # mailer for local delivery
    define(POSTMASTERBOUNCE)dnl                   # postmaster gets bounces
    define(PSEUDODOMAINS, BITNET UUCP)dnl         # don't try DNS on these
    dnl #
    dnl #-------------------------------------------------------------
    dnl #
    dnl # names we're known by
    define(PSEUDONYMS, myhostname.subdomain.domain myhostname.UUCP)
    dnl #
    dnl # our primary name
    define(HOSTNAME, myhostname.subdomain.domain)
    dnl #
    dnl # our uucp name
    define(UUCPNAME, myhostname)dnl
    dnl #
    dnl #-------------------------------------------------------------
    dnl #
    define(UUCPNODES, |uuname|sort|uniq)dnl       # our uucp neighbors
    define(BANGIMPLIESUUCP)dnl                    # make certain that uucp
    define(BANGONLYUUCP)dnl                       #  mail is treated correctly
    define(RELAY_HOST, my_uucp_neighbor)dnl       # our smart relay host
    define(RELAY_MAILER, UUCP-A)dnl               # we reach moria via uucp
    dnl #
    dnl #--------------------------------------------------------------------
    dnl #
    dnl # the various dbm lookup tables
    dnl #
    define(ALIASES, LIBDIR/aliases)dnl            # system aliases
    define(DOMAINTABLE, LIBDIR/domaintable)dnl    # domainize hosts
    define(PATHTABLE, LIBDIR/pathtable)dnl        # paths database
    define(GENERICFROM, LIBDIR/generics)dnl       # generic from addresses
    define(MAILERTABLE, LIBDIR/mailertable)dnl    # mailers per host or domain
    define(UUCPXTABLE, LIBDIR/uucpxtable)dnl      # paths to hosts we feed
    define(UUCPRELAYS, LIBDIR/uucprelays)dnl      # short-circuit paths
    dnl #
    dnl #--------------------------------------------------------------------
    dnl #
    dnl # include the 'real' code that makes it all work
    dnl # (provided with the source code)
    dnl #
    include(Sendmail.mc)dnl                         # REQUIRED ENTRY!!!
    dnl #
    dnl #------------ END OF SAMPLE SENDMAIL.M4 FILE -------



  6.3.3.  Defining a local mailer

  Unlike most Unix distributions, Linux did not come with a local mail
  delivery agent by default.

  Slackware did!  Well at least it is offered by the easy-to-use-but-
  longwinded installation script.  It uses procmail.

  Now, deliver or procmail is generally installed, with a default
  sendmail setup to handle local mail, so no complexity will be added to
  this already very complex setup. I recommend using the commonly
  available deliver or procmail programs, which can be optional packages
  in a some Linux distributions.

  In order to do so, you need to define a LOCAL_MAILER_DEF in the
  sendmail.m4 file that points to a file that looks like:


    # -- /usr/local/lib/mail/mailers.linux --
    #     (local mailers for use on Linux )
    Mlocal, P=/usr/bin/deliver, F=SlsmFDMP, S=10, R=25/10, A=deliver $u
    Mprog,  P=/bin/sh,       F=lsDFMeuP,   S=10, R=10, A=sh -c $u



  There is a also built-in default for deliver in the Sendmail.mc file
  that gets included into the sendmail.cf file. To specify it, you would
  not use the mailers.linux file but would instead define the following
  in your sendmail.m4 file:


     dnl --- (in sendmail.m4) ---
     define(LOCAL_MAILER_DEF, DELIVER)dnl       # mailer for local delivery



  Unfortunately, Sendmail.mc assumes deliver is installed in /bin, which
  is not the case with Slackware1.1.1 (which installs it in /usr/bin).
  In that case you'd need to either fake it with a link or rebuild
  deliver from sources so that it resides in /bin. Please note procmail
  is generally better than deliver, for example for mail filtering.


  6.3.4.  The sendmail+IDA dbm tables


  Setting up special behavior for sites or domains is done through a
  number of optional dbm tables rather than editing the sendmail.cf file
  directly.

  Refer to the July-1994 issue of Linux Journal (if you can still find
  it:-), to the docs in the sources, or to the sendmail chapter in the
  newest version of the Linux Documentation Project Networking
  Administration Guide which will be available real-soon-now for more
  details.


  o  mailertable   - defines special behavior for remote hosts or
     domains.

  o  uucpxtable    - forces UUCP delivery of mail to hosts that are in
     DNS format.

  o  pathtable     - defines UUCP bang-paths to remote hosts or domains.


  o  uucprelays    - short-circuits the pathalias path to well-known
     remote hosts.

  o  genericfrom   - converts internal addresses into generic ones
     visible to the outside world.

  o  xaliases      - converts generic addresses to/from valid internal
     ones.

  o  decnetxtable  - converts RFC-822 addresses to DECnet-style
     addresses.


  6.3.5.  So which entries are really required?

  When not using any of the optional dbm tables, sendmail delivers mail
  via the RELAY_HOST and RELAY_MAILER) defined in the sendmail.m4 file
  used to generate sendmail.cf. It is easily possible to override this
  behavior through entries in the domaintable or uucpxtable.

  A generic site that is on Internet and speaks Domain Name Service, or
  one that is UUCP-only and forwards all mail via UUCP through a smart
  RELAY_HOST, probably does not need any specific table entries at all.

  Virtually all systems should set the DEFAULT_HOST and PSEUDONYMS
  macros, which define the canonical site name and aliases it is known
  by.

  If all you have is a relay host and relay mailer, you don't need to
  set these defaults since it works automagically. UUCP hosts will
  probably also need to set UUCPNAME to their official UUCP name.

  They will also probably set RELAY_MAILER and RELAY_HOST which enable
  smart-host routing through a mail relay.

  The mail transport to be used is defined in RELAY_MAILER and should
  usually be UUCP-A for UUCP sites. If your site is SMTP-only and talks
  `Domain Name Service', you would change the RELAY_MAILER.

  If you're a SLIP site, you might want to take the easy way out and
  just forward all outgoing mail to your service provider to do the
  right thing with.  To do so, you'd want to define ISOLATED_DOMAINS and
  VALIDATION_DOMAINS to be your domain, you'd also want to define
  RELAY_HOST to be your service provider and RELAY_MAILER to be TCP. Of
  course, you want to ask permission before you set any system up as
  your general purpose relay.


  6.4.  Sendmail 8.x


  Sendmail 8.7.x from Berkeley was the latest major revision after
  sendmail5. It had wonderful built-in support for building under Linux
  : just "make linux" and all was set.

  You'll probably be best served by grabbing one of the various binary
  distributions off of the usual Linux archive sites rather than
  fighting things like Berkeley dbm yourself.

  There's a nice distribution of sendmail 8.6.12 from Jason Haar -
  j.haar at lazerjem.demon.co.uk  on sunsite.unc.edu in
  /pub/Linux/system/Mail/delivery/sendmail-8.6.12-bin.tgz that has the
  source documentation and a very nice quickie description of how to run
  sendmail v8 for common configurations.


  The bottom line with sendmail v8 is that you want to configure the
  bare minimum necessary to get the job done ; the following is an
  example that should get you close at least.


  6.4.1.  A sample 8.7.x mc file


  Much like sendmail+IDA, sendmail v8 uses m4 to process a config file
  into a full sendmail.cf that sendmail uses.  The following is my
  current mc file for my site (ppp to Internet for outgoing mail, uucp
  for incoming mail).


          dnl divert(-1)
          #---------------------------------------------------------------------
          #
          # this is the .mc file for a linux host that's set up as follows:
          #
          #       - connected to Internet for outbound mail (ppp here)
          #       - connected via UUCP for incoming mail
          #       - domainized headers
          #       - no local mailer (use 'deliver' instead)
          #       - no DNS running so don't canonicalize outgoing via DNS
          #       - all non-local outbound mail goes to the RELAY_HOST over smtp
          #           (we run ppp and let our service provider do the work)
          #
          #                                       vds 3/31/95
          #
          #---------------------------------------------------------------------
          include(`../m4/cf.m4')
          VERSIONID(`linux nodns relays to slip service provider smarthost')dnl
          Cwmyhostname.myprimary.domain myhostname.UUCP localhost
          OSTYPE(linux)
          FEATURE(nodns)dnl
          FEATURE(always_add_domain)dnl
          FEATURE(redirect)
          FEATURE(nocanonify)
          dnl MAILER(local)dnl
          MAILER(smtp)dnl
          MAILER(uucp)dnl
          define(`RELAY_HOST', smtp:my.relay.host.domain)
          define(`SMART_HOST', smtp:my.relay.host.domain)
          define(`UUCP_RELAY', smtp:my.relay.host.domain)
          define(`LOCAL_MAILER_PATH', `/bin/deliver')
          define(`LOCAL_MAILER_ARGS', `deliver $u')



  6.4.2.  Sendmail v8 tidbits


  There are a few differences I suppose to the 'IDA bigots' among us.
  So far, I've found the following:


  Instead of 'runq', you type 'sendmail -q' to run the queue!



  6.5.  Local Delivery Agents


  Unlike most operating systems, Linux did not have mail "built-in": you
  needed a program to deliver the local mail, like "lmail", "procmail"
  or "deliver".

  However, every recent distribution includes a local mailer now!

  Documentation for how to use either for local delivery is in the
  sendmail5.67b+IDA1.5 binary release (on sunsite) mentioned above.


  7.  User Agent Administration



  7.1.  Mutt


  You should have no problem compiling, installing, or running mutt.
  Users of qmail can either get the patch or run it with -f flag to read
  their local mail folder.

  If mutt bothers you with an "unknown terminal error" after a
  distribution upgrading, just recompile it.


  7.2.  Elm


  Elm compiles, installs and runs flawlessly under Linux. For more
  information, see the elm sources and installation instructions. Elm
  and filter need to be mode 2755 (group mail) with /var/spool/mail mode
  775 and group mail.

  Qmail users can get a patch to use nifty qmail features, or will run
  elm with the -f flag to point to their local mail folder.

  One thing you want to be aware of is that if you have Elm compiled to
  be MIME-able, you need metamail installed and in the standard path or
  Elm will not be able to read MIME mail you've received.  Metamail is
  available on thumper.bellcore.com and of course via "archie".

  If you use a binary distribution, you'll need to create a
  "/usr/local/lib/elm/elm.rc" file to override the compiled-in hostname
  and domain information:


  o  replace "subdomain.domain" with your domain name replace

  o  "myhostname" with you un-domainized hostname replace


          #---------- /usr/local/lib/elm/elm.rc ------------------
          #
          # this is the unqualified hostname
          hostname = myhostname
          #
          # this is the local domain
          hostdomain = subdomain.domain
          #
          # this is the fully qualified hostname
          hostfullname = myhostname.subdomain.domain
          #
          #--------------------------------------------------------



  One thing you want to be aware of is that if you have Elm compiled to
  be MIME enabled, you need metamail installed and in your path or Elm
  will not be able to read MIME mail you've received. Metamail is
  available on thumper.bellcore.com and of course via "archie".

  In the "too cool to be true" category, there is a distribution of
  Elm-2.4.24 that is "PGP-aware". To try it, grab the file
  ftp://ftp.viewlogic.com/pub/elm-2.4pl24pgp3.tar.gz, which is elm2.4.24
  with PGP hooks added. You configure and build it the same way you do
  normal Elm, which means you probably need to add the patches mentioned
  above. For what it's worth, I run it here and like it a lot. Of
  course, there must be more recent versions available, including elm-
  ME+.

  While this item is not Linux-specific, it's perceived (wrongly) to be
  a nagging Elm bug nevertheless.  We've heard that Elm sometimes fails
  with a message that it's unable to malloc() some massive number of
  bytes.  The identified workaround is to remove the post-processed
  global mail aliases (aliases.dir and aliases.pag).

  THIS IS NOT A BUG IN ELM, it's an error in configuration of Elm by
  whomever you got your binary distribution of Elm from.

  Elm has an enhanced and non-compatible, format for aliases ; you need
  to ensure that the path Elm uses for aliases is different from the
  path sendmail/smail uses. From the volume of reports of this problem,
  it's apparent that at least one major distribution 'on the street' has
  in the past been misconfigured. (from  scot at catzen.gun.de (Scot W.
  Stevenson) )

  The current metamail package requires csh for some of its scripts.
  Failure to have csh (or tcsh) will cause most interesting errors...


  7.3.  Mailx


  If you don't have a local mailx program, save yourself the pain --
  just go and grab the mailx kit from Slackware 2.1.0 or later, which
  has a nice implementation of mailx5.5. If you're into building from
  sources, mailx v5.5 compiles without patching under Linux if you have
  "pmake" installed.

  If anybody is still using it, I strongly recommend removing the old
  "edmail" stuff from SLS1.00 and replacing it with mailx.


  8.  Handling remote mail


  This section describes using POP or IMAP to handle remote mail.

  Other options include nfs-mounting the spool partition on client
  machines (Danger Will Robinson! Is everyone using the same lock
  method?) or using a mail-to-web gateway (quite popular now).


  8.1.  History


  On a workstation network, mail has always been a problem:


  o  Either you use "user@computer.foo.com" with problems when
     "computer" is down, making your network known to the people
     outside, having different addresses for a same person switching to
     another computer, ...

  o  Or you take a mail hub, "mailhost.foo.com" with rules for
     rewriting, so every user seems to post from the same address, even
     if they are on different computers.

  But in that case, how can users read their mail?

  Using a rsh with elm? :-)

  It would overload our mail hub!  One method was forwarding or UUCP,
  smtp, etc. but it's too complicated.

  Then came POP/IMAP, both with security problems at the beginning, (now
  fixed using ssh on new versions): a mail program has sometimes to be
  set locally (like qmail, smail or vmail if, for example, you use elm,
  but mozilla will avoid that!) however, getting and sending Email is
  simpler.


  8.2.  Getting mail


  Here come POP's main drawbacks:


  o  the password is sent as a clear text on the network,

  o  you must choose a POP-aware mailer; many do now (like Pine, Emacs,
     Mozilla, Netscape, Mutt, IE, Pegasus, Eudora, Claris...),

  o  when a user may roam (read mail from different machines) having e-
     mail popped on the computer used yesterday can be a nuisance,

  o  some POP servers (e.g. qpopper, ipop3d) on high-use servers can
     load the machine significantly. Consider controlling options (such
     as not leaving mail on the server) and/or changing the pop server
     (e.g. cucipop), as well as avoiding running it from inetd.

  The password problem can be solved creating a crypted "channel" to
  have POP on it or using APOP or RPOP extensions. The mail reader
  problem can be solved either by changing mail reader (don't
  underestimate the effort required to re-educate users!) or by using a
  POP "mail sucker" with a local mail program.

  IMAP can be preferable to POP in various situations like remote (and
  especially roaming) access, while you restrict POP to a LAN where
  snooping of passwords isn't so much of a concern.  Mark Aitchison
  reported a solution here is to use hosts.deny and hosts.allow files
  (please see Net-3 HOWTO ; this assumes you are starting pop from
  inet).

  The policy of leaving mail on the server or not has implications for
  server disk space and easier backup/security of the mail, as well as
  allowing roaming, so the best solution depends on the type of
  organization. Of course, this will not ensure your mail can't be read,
  but nobody will be able to delete it ; if all your mail is pgp
  encrypted this is a better solution.

  Here are some pop programs worth trying:


  o  gwpop (a Good Way to POP) is very protected since it creates a
     crypted "channel" and puts mail directly in the "spool" ; however,
     it depends on Perl.

  o  popclient, simple to use:

     For example if your login is john and your password PrettySecret,
     you will run:



       $ popclient -3 -v mail.acme.net -u john -p "PrettySecret" -k -o JOHN-INET-MAIL



  It is strongly discouraged in case of multi-user machine; other user
  can see your password by, for example with "ps auxw"

  o  fetchmail, which is actively supported and incredibly simple to
     use: it is configured in ~/.fetchmailrc, so you only need to run
     fetchmail when you want to retrive your mail.

     Here's my .fetchmailrc:


       poll mail.server protocol pop3:
               forcecr
               password PrettySecret;



  Don't forget to "chmod 600  /.fetchmailrc" or fetchmail will ask for
  it.

  Please note that the forcecr option is needed to use fetchmail with
  qmail, which strictly respects RFCs.


  8.3.  Sending mail


  For this, you must use smtp-aware mail software, like qmail, smail,
  vmail or mozilla (this one does everything: mail reader, POP receive,
  smtp send!)

  Go to one of the previous sections to install and configure the one
  you like best. Then, when you will reach "Testing", try to send some
  mail to a local account on the mail hub.


  8.4.  Reading mail


  If your program doesn't do everything itself, you can install elm,
  pgp, mush, pine ... many good programs are freely available for linux
  platforms!


  8.5.  Testing


  To check whether your mail server has pop, try:



       $ telnet mailhost 110


  If it works, you will get something like "OK Pop server (...)
  starting": type "quit"!

  To install a ssh crypted "channel", first test your mail server
  typing:



       $ ssh mailhost date



  If you get the date, you should be OK. Please note ssh will not ask
  for a password, therefore you must create a ".shosts" file on the mail
  server, containing client's name. To test ssh port redirection (which
  gwpop uses), type:



       $ ssh -n -f -L 12314:localhost:110 mailhost sleep 30

       then

       $ telnet localhost 12314



  Then will you hopefully see mail hub's pop banner. If you don't use
  ssh, don't forget to comment out $ssh on gwpop script. To check
  whether procmail is running, try "procmail -v"


  8.6.  Using


  Now you can edit gwpop Perl script to check everything is ok, then run
  gwpop:



       $ gwpop -v your-username
       POP password on mailhost: yoursecretpasword



  If gwpop "error messages" are normal, the mail from mail hub will be
  downloaded to your local machine wherever you told gwpop to put it.
  (please test with some mail!).

  You can also use gwpop as a daemon:



       $ gwpop -d $HOME/tmp your-username



  gwpop messages are then sent to syslog and gwpop will run endlessly ;
  a "HUP" signal will force gwpop to get your mail.

  You can get POP software here used on:

  ftp://ftp.unina.it/pub/Unix/pkgs/network/mail/gwpop
  ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail
  http://www.cs.hut.fi/ssh/



  9.  Acknowledgements


  The following people have helped in the assembly of the information
  and experience that helped make this document possible:

  Steve Robbins, Ian Kluft, Rich Braun, Ian Jackson, Syd Weinstein, Ralf
  Sauther, Martin White, Matt Welsh, Ralph Sims, Phil Hughes, Scot
  Stevenson, Neil Parker, Stephane Bortzmayer and especially many thanks
  to Vince Skahan for his huge contribution.

  Eric S. Raymond edited this document, correcting some mistakes and
  transplanting the section on ``How Electronic Mail Works'' from his
  Mail User's HOWTO.

  Hitoshi Hayakawa checked qmail section, Jun Morimoto added various
  notes about popclient & fetchmail and Takeo Nakano ispell'ed the
  document :-)


  If I forgot anybody, my apologies: just email me!



  The Linux Mail User HOWTO
  Eric S. Raymond, <esr@thyrsus.com>
  v2.2, 07 May 1999

  This document is an introduction to the world of electronic mail
  (email) under Linux. It focuses on user-level issues and typical con-
  figurations for Linux home and small-business machines connected to
  the net via an ISP.  You need to read this if you plan to communicate
  locally or to remote sites via electronic mail.  You probably do not
  need to read this document if don't exchange electronic mail with
  other users on your system or with other sites.  For information on
  configuring and administering mail, see the Mail Administrator HOWTO.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 New versions of this document
     1.2 Hardware requirements for email programs
     1.3 Software sources for email programs

  2. Mail User Agents

     2.1 Setting your mail editor
     2.2 mutt
     2.3 elm
     2.4 pine
     2.5 Netscape
     2.6 Emacs rmail/smail and vm.
     2.7 BSD mail
     2.8 Other user agents

  3. Advanced topics

     3.1 Aliases
     3.2 Forwarding
     3.3 Auto-answering
     3.4 Mailing lists
     3.5 Mail filters
     3.6 Coping with spam

  4. Other sources of information

     4.1 USENET
     4.2 Books
     4.3 Periodic USENET Postings
     4.4 Where

  5. Administrivia

     5.1 Feedback
     5.2 Copyright Information
     5.3 Standard Disclaimer
     5.4 Acknowledgements


  ______________________________________________________________________

  1.  Introduction

  The intent of this document is to explain how email works, and answer
  some of the questions that appear to meet the definition of
  `frequently asked questions' about e-mail software under Linux.

  Modern Linux distributions give you a usable, preconfigured setup for
  electronic mail out of the box, usually featuring a late version of
  sendmail-v8.  This HOWTO will assume that you have such a setup and a
  working Internet connection.

  (For information on how to set up a PPP or SLIP link to an ISP, see
  the ISP Hookup HOWTO <http://metalab.unc.edu/LDP/HOWTO/ISP-Hookup-
  HOWTO.html>.)

  Accordingly, unlike Vince Skahan's 1.x versions, this HOWTO focuses on
  user issues and architecture; most technical hair about UUCP, IDA
  sendmail and other formerly important topics has been dropped.


  1.1.  New versions of this document

  This document will be posted monthly to the newsgroup
  comp.os.linux.answers <news:comp.os.linux.answers> You should also be
  able to view the latest version of this HOWTO on the World Wide Web at
  <http://metalab.unc.edu/LDP/HOWTO/Mail-User-HOWTO.html>.


  1.2.  Hardware requirements for email programs

  There are no specific hardware requirements for mail under Linux.  If
  you have the hardware necessary to connect to the Internet, it can
  support email over that link.


  1.3.  Software sources for email programs

  The software you will need for email support is probably preinstalled
  in your Linux distribution.  You will find updates on the Metalab
  Linux Archive <http://metalab.unc.edu/pub/Linux>, especially in the
  mail subdirectory <http://metalab.unc.edu/pub/Linux/system/mail>.


  2.  Mail User Agents

  This section contains information related to user agents, which means
  the software the user sees and uses.  This software relies on the
  transport agents described in the Mail Administrator's HOWTO (which
  also include user=agent configuration and troubleshooting tips for
  administrators).


  2.1.  Setting your mail editor

  Mail user agents call out to some editor to assist composition of
  mail.  Which editor is the default varies.  Most of them respect a
  convention going back to Unix's early days; the contents of the
  environment variable VISUAL, if it exists, is taken as the name of
  your preferred editor.  If VISUAL is not set, the variable EDITOR is
  checked.

  Popular values for EDITOR include `vi' and `emacs'.  But if you are,
  like me, the sort who always has an Emacs running, the most useful way
  to set EDITOR is to the value `emacsclient'.  Use this with the
  following lines in your .emacs file:


  ______________________________________________________________________
  (autoload 'server-edit "server" nil t)
  (server-edit)
  ______________________________________________________________________

  The emacsclient program, when it runs, tries to establish
  communication with an Emacs instance you already have running and hand
  the mail message temporary file to that Emacs to be edited.  The
  effect of this will be that when your mailer calls out for an editor,
  a mail composition window pops open inside your Emacs.

  When you are ready to hand the file back to the mailer for sending,
  type C-x #.  The mail buffer will leave your display and the
  emacsclient instance your mailer called will return, handing control
  back to the mailer.

  It is possible to have more than one emacsclient instance open at once
  without confusing Emacs.  However, calling up another Emacs while an
  emacsclient session is running can confuse emacsclient enough that it
  won't be able to find either instance afterwards.  If this happens,
  shut down all your Emacs instances and restart just one.


  2.2.  mutt

  This is what I use and recommend.  It is descended from elm and has
  similar commands by default, but is much more powerful and
  configurable.  It can be a POP3 or IMAP client, and includes excellent
  support for MIME and PGP.  There is a Mutt home page at
  http://www.mutt.org <http://www.mutt.org>.

  Mutt respects the EDITOR/VISUAL convention.


  2.3.  elm

  Elm was the first modern, screen-oriented Unix mailer, but has been
  stagnant for years now and is being displaced by Mutt.  Some versions
  of elm have POP3 support built in. For more information, see the elm
  sources and installation instructions in the Metalab mail user agents
  directory <http://metalab.unc.edu/pub/Linux/system/mail>.  Here are a
  few points that occasionally trip people up:

  No, stock elm is not PGP-aware.  There are PGP support patches, but
  Mutt's PGP support is superior.  If you want to use PGP, I recommend
  Mutt.

  Elm respects the EDITOR/VISUAL convention.


  2.4.  pine

  Pine is a user agent designed for novices; it includes news-reading
  capability and built-in support for the IMAP remote-mail protocol.  A
  lot of people swear by it for new users.  I find its impoverished
  command set, limited configurability and native editor hard to take.
  It has excellent built-in IMAP support, however.  If you want to check
  it out, the distribution is available at
  http://www.washington.edu/pine <http://www.washington.edu/pine>.

  Pine respects the EDITOR/VISUAL convention.


  2.5.  Netscape

  The Netscape browser has POP3 and IMAP remote-mail capability built
  into it, so it can be used as a mail user agent.  I don't recommend
  this; it doesn't specialize in being an MUA, and therefore does not
  offer many of the services that real MUAs do (such as aliases and PGP
  handling).

  Neetscape supplies its own mini-editor, the same one used throughout
  the browser (e.g. for text fields in forms).


  2.6.  Emacs rmail/smail and vm.

  Emacs has a mode called smail that can send mail, and another called
  rmail that can read mail.  The smail mode can be quite useful, as you
  get to compose mail inside a full Emacs environment (but see also the
  discussion of ``emacsclient'' elsewhere in this document).

  The rmail mode, on the other hand, is not recommended.  Every time you
  run it, it converts your inbox to BABYL format; ordinary mail tools
  will choke on that.  (If this happens to you, do M-x unrmail from the
  Emacs command line.)

  There is a mailreader for emacs called `vm' that writes and reads
  standard V7 mailboxes.  It is not distributed with GNU Emacs, but you
  can find its home page at http://www.wonderworks.com/vm/
  <http://www.wonderworks.com/vm/>.

  Emacs smail/rmail/vm do not respect the EDITOR/VISUAL convention.
  Instead, you use the Emacs they're embedded in.


  2.7.  BSD mail

  If you simply type `mail' to the shell on a Linux or any other modern
  Unix, you will invoke some variant of the BSD Mail program.  It has a
  line-oriented interface originally designed for use on TTYs.  It is,
  at this point, only of historical interest.

  BSD Mail invented the EDITOR/VISUAL convention.


  2.8.  Other user agents

  The following also are known to run under Linux.  Consult `archie' to
  find them...

  o  mush      - mail user's shell, very powerful for filtering and
     batch processing

  o  mh      - mail handler, yet another mail user agent

  I don't know enough about mh or mush to describe them in detail.  They
  both have rather complex interfaces and are designed for sophisticated
  mail users.


  3.  Advanced topics


  3.1.  Aliases

  An `alias' is a way to set up a pseudo-address that simply directs
  mail to another (single) address.  There are two kinds of aliases: MUA
  aliases and MTA aliases.

  An MUA alias is one you set up in your MUA as a kind of personal
  shorthand.  Other people will not be able to see or use this alias.
  For example, you could write



  ______________________________________________________________________
  alias esr       Eric S. Raymond <esr@thyrsus.com>
  ______________________________________________________________________



  in your mutt configuration file.  This would tell mutt that when it
  sees `esr' in an address line, it should behave as through you had
  typed `esr@thyrsus.com',  Or you can type `mutt esr' and the expanded
  address will be automatically filled in on the `to' line.

  An MTA alias is one your MTA expands; it will be usable by everyone,
  both on your machine and remotely.  To create MTA aliases you must
  modify a system file, usually but not always /etc/aliases (the
  location depends on your MTA).  It may be instructive for you to look
  at the /etc/aliases on your system; it should contain a number of
  standard aliases such as `postmaster'.

  Your MTA may also allow the target of an alias to be a filename, which
  will be treated as a mailbox the mail is to be appended to (this is
  useful for archiving mail).  It may also allow the target of an alias
  to be a program, in which case mail to that alias will be passed to an
  instance of the program on its standard input.


  3.2.  Forwarding

  MTA aliases usually require administrator privileges to set up.  But
  it is desirable for mail users to be able to set up forwarding of
  their own mail without administrator intervention.

  To support this, most MTAs follow sendmail's lead and look for a file
  called .forward in your home directory.  The contents of this file is
  interpreted like the target of an alias which should receive all your
  mail.  The most common use for this facility is to redirect your mail
  to an account on another machine.


  3.3.  Auto-answering

  Another common use for the .forward facility is to pass your mail to a
  `vacation' program.  A vacation program reads incoming mail and
  automatically generates a canned reply to it; they are so called
  because the most common form of canned reply is to inform the sender
  that you are on vacation and will not be reachable until a given date.

  There is no one standard vacation program that is in universal use.
  There are two good reasons for this: one, that such a program is very
  easy to write as a shellscript of filter rule (see below); and two,
  that vacation programs interact badly with mailing lists.

  You should temporarily unsubscribe from all mailing lists you are on
  before setting up auto-answering; otherwise, all members of the
  mailing lists mail find they are being flooded with canned messages by
  your vacation program.  This is considered very rude behavior and will
  guarantee you quite a frosty reception on your return.


  3.4.  Mailing lists

  A mailing list is a pseudo-address that sends mail to more than one
  user.

  In its simplest form, mailing list is just an MTA alias with more than
  one recipient. Some small mailing lists are maintained this way.
  Sendmail assists by supporting a syntax in /etc/aliases that includes
  the contents of a given mailing list file in the target side of an
  alias.  It looks like this:


  ______________________________________________________________________
  admin-list:     ":include:/usr/home/admin/admin-list"
  ______________________________________________________________________



  with the advantage that the admin-list file can live in unprivileged-
  user space somewhere (root is only needed to set up the original
  inclusion). Some other MTAs have similar features.

  These simple lists are commonly called `mail reflectors'.  There are a
  couple of problems with mail reflectors.  One is that bounce messages
  from failed attempts to broadcast goes to all users.  Another is that
  all subscriptions and unsubscriptions have to be done manually by the
  mailing list administrator.

  A kind of software called a mailing list manager has evolved to
  address these problems and other related ones.  Its most important
  function is to permit mailing list users to subscribe and unscubscribe
  without going through the list maintainer.

  A mailing-list manager keeps its own user-list information and hooks
  up to the MTA through a program alias in /etc/aliases.  For example,
  if the admin-list above were going through the mailing list manager
  called SmartList on a sendmail system, a portion of /etc/aliases might
  look like this:


  ______________________________________________________________________
  admin-list: "|/usr/home/smartlist/bin/flist admin-list"
  admin-list-request: "|/usr/home/smartlist/bin/flist admin-list-request"
  ______________________________________________________________________



  Note that this is a pair of aliases.  It is conventional for real
  mailing lists to have a request address to be used for user
  subscription and unsubscription requests.  It is considered rude and
  ignorant to send subscription/unsubscription requests to the main
  address of such a list -- don't do it.

  The robot sitting behind the request address may offer other features
  besides just subscription/unsubscription.  It may respond to help
  requests, allow you to query who is on the list, or give you automated
  access to list archives.  It may also allow list administrators to
  restrict posting to known members, set the list to auto-subscribe
  nonmembers when they first post, or set various security policy
  options.  Mailing-list managers differ primarily in the design and
  range of these secondary features.

  Unfortunately, the format for sending commands to mailing-list request
  robots is not standard.  Some expect commands in the subject line,
  some ignore the subject line and expect commands in the message body.
  You need to pay attention to the response mail you get when you first
  subscribe; it's a good idea to save such mail to a subscriptions
  mailbox for later reference.

  The most important mailing-list managers to know about are majordomo,
  listserv, listproc, and smartlist; majordomo is the most popular by a
  considerable margin.  There is a rather comprehensive list
  <http://www.catalog.com/vivian/mailing-list-software.html> of such
  packages on the Web.
  For more about mailing list managers, consult the resources at the
  List-Managers Mailing List <http://www.greatcircle.com/list-
  managers/>, including the FAQ (note: this list is not appropriate for
  how-to questions).


  3.5.  Mail filters

  A mail filter is a program that sits between your local delivery agent
  and you, automatically dispatching or rejecting mail before you see
  it.

  Mail filters have a number of uses.  The most important are spam
  filtering, dispatching to multiple mailboxes by topic or sender, and
  auto-answering mail.

  Typically, you set up mail filtering by putting a program alias for
  the filter program in your .forward file, and writing a file of
  filtering rules.  The format and location of the filter rules file
  varies between filter programs.

  There are good feature summaries of the three major mail filters
  (procmail, mailagent, and deliver) in part 3
  <http://www.faqs.org/faqs/mail/setup/unix/part3/index.html> of Chris
  Lewis's Email Software Survey.  The most popular of these is (despite
  its rather nasty rule syntax) procmail, which is universally present
  on Linux systems (and, indeed, is generally used as the system's local
  delivery agent).


  3.6.  Coping with spam

  Spam is sometimes known as `UCE' (Unsolicited Commercial Email) or
  `UBE' (Unsolicited Bulk Email).  As these names imply, it is an
  obnoxious form of advertising that stuffs your mailbox with form
  letters.  (The term `spam' comes from a Monty Python's Flying Circus
  skit in which a choir of Vikings endlessly repeats the chant "Spam
  spam spam spam...").

  Most spam seems to consist of solicitations for pyramid schemes, ads
  for pornography, or (annoyingly) attempts to sell spam-sending
  programs.  A few individual spams (like MAKE MONEY FAST or the Craig
  Shergold postcard hoax) have been so persistent as to become
  legendary.  Spam tends to be both verbose and illiterate.  It's a
  waste of time and a huge waste of network bandwidth.

  The spam epidemic seems to have peaked in mid-1997 and been slowly in
  decline since, but it can still be a serious annoyance.  If you're
  being deluged with spam, get educated.  Browse the Fight Spam on the
  Internet! <http://spam.abuse.net/> page.  The Death To Spam!
  <http://www.mindworkshop.com/alchemy/nospam.html> page is particularly
  effective on methods  for stopping or backtracking spam.


  4.  Other sources of information



  4.1.  USENET

  There are a number of Usenet groups devoted to electronic-mail
  technical issues:


  o  comp.mail.elm the ELM mail system.

  o  comp.mail.mh The Rand Message Handling system.

  o  comp.mail.mime Multipurpose Internet Mail Extensions.

  o  comp.mail.misc General discussions about computer mail.

  o  comp.mail.multi-media Multimedia Mail.

  o  comp.mail.mush The Mail User's Shell (MUSH).

  o  comp.mail.sendmail the BSD sendmail agent.

  o  comp.mail.smail the smail mail agent.

  o  comp.mail.uucp Mail in the uucp environment.


  4.2.  Books


  The following is a non-inclusive set of books that will help...


  o  ``Sendmail" from O'Reilly and Associates is the definitive
     reference on sendmail-v8 and sendmail+IDA.  It's a ``must have''
     for anybody hoping to make sense out of sendmail without bleeding
     in the process.

  o  "The Internet Complete Reference" from Osborne is a fine reference
     book that explains the various services available on Internet and
     is a great source for information on news, mail, and various other
     Internet resources.

  o  "The Linux Networking Administrators' Guide" from Olaf Kirch of the
     LDP is available on the net and is also published by (at least)
     O'Reilly and SSC.  It makes a fine one-stop shopping guide to learn
     about everything you ever imagined you'd need to know about Unix
     networking.


  4.3.  Periodic USENET Postings

  Also worth mentioning, is Chris Lewis' periodic posting on unix e-mail
  software, which is available on
  <ftp://rtfm.mit.edu/pub/usenet/comp.mail.misc> as the files named
  ``UNIX_Email_Software_Survey_*''.  An HTMLized version is at
  http://www.faqs.org/faqs/mail/setup/unix/
  <http://www.faqs.org/faqs/mail/setup/unix/>.  At time writing in 1999
  this posting has not been seriously updated since 1996, however.


  4.4.  Where NOT  to look for help

  There is no longer anything special about configuring and running mail
  under Linux, relative to other Unixes.  Accordingly, you almost
  certainly do NOT want to be posting generic mail-related questions to
  the comp.os.linux.* newsgroups.

  Unless your posting is truly Linux-specific (ie, ``please tell me what
  routers are already compiled into the SLS1.03 version of
  smail3.1.28'') you should be asking your questions in one of the
  newsgroups or mailing lists referenced above.

  Let me repeat that.


  There is virtually no reason to post anything mail-related in the
  comp.os.linux hierarchy any more.  There are existing newsgroups in
  the comp.mail.* hierarchy to handle ALL your questions.

  If you post to comp.os.linux.* for non-Linux-specific questions, you
  are looking in the wrong place for help.  The electronic mail experts
  hang out in the places indicated above and generally not in the Linux
  groups.

  Posting to the Linux hierarchy for non-linux-specific questions wastes
  your time and everybody else's...and it frequently delays you from
  getting the answer to your question.


  5.  Administrivia


  5.1.  Feedback


  (Vince wrote this section, but my policy is the same.)

  I am interested in any feedback, positive or negative, regarding the
  content of this document via e-mail.  Definitely contact me if you
  find errors or obvious omissions.

  I read, but do not necessarily respond to, all e-mail I receive.
  Requests for enhancements will be considered and acted upon based on
  that day's combination of available time, merit of the request, and
  daily blood pressure :-)

  Flames will quietly go to /dev/null so don't bother.

  In particular, the Linux filesystem standard for pathnames is an
  evolving thing.  What's in this document is there for illustration
  only based on the current standard at the time that part of the
  document was written and in the paths used in the distributions or
  `kits' I've personally seen.  Please consult your particular Linux
  distribution(s) for the paths they use.

  Feedback concerning the actual format of the document should go to the
  HOWTO coordinator - mail to linux-howto@metalab.unc.edu <mailto:linux-
  howto@metalab.unc.edu>).


  5.2.  Copyright Information


  The Mail-HOWTO is copyrighted (c)1999 Eric S. Raymond.  Copyright is
  retained for the purpose of enforcing the Linux Documentation Project
  license terms.

  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author.  Translations
  are similarly permitted without express permission if it includes a
  notice on who translated it.

  Short quotes may be used without prior consent by the author.
  Derivative work and partial distributions of the Mail-HOWTO must be
  accompanied with either a verbatim copy of this file or a pointer to
  the verbatim copy.

  Commercial redistribution is allowed and encouraged; however, the
  maintainer would appreciate being notified of any such distributions
  (as a courtesy).

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents.

  We further want that all information provided in the HOWTOS is
  disseminated.  If you have questions, please contact the Linux HOWTO
  coordinator, at linux-howto@metalab.unc.edu.


  5.3.  Standard Disclaimer


  Of course, we disavow any potential liability for the contents of this
  document.  Use of the concepts, examples, and/or other content of this
  document is entirely at your own risk.


  5.4.  Acknowledgements

  This was originally authored by Vince Skahan.  I have rewritten it for
  the modern ISP-centric world in which UUCP is little more than a
  memory.

  In May 1999, the name was changed from "The Linux Electronic Mail
  HOWTO" to avoid a collision with Guylhem Aznar's Mail HOWTO, which
  will become the Mail Administrator HOWTO.



  Majordomo and MajorCool HOWTO
  John Archie, johnarchie@emeraldis.com
  v1.0, 10 November 1999

  This document is intended to guide a user through an installation of
  the Majordomo Mailing List Software and MajorCool.  MajorCool is a
  utility for managing Majordomo lists via a CGI script; many people who
  are unfamiliar with Majordomo's text-based nature prefer the more user
  friendly web-based interface of MajorCool.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Credits
     1.2 References

  2. Sendmail

     2.1 Aliases
     2.2 Editing
        2.2.1 Another Aliases File
        2.2.2 Undesirable Sendmail Security Features
        2.2.3 Sendmail Trusted Users
        2.2.4 Sendmail Restricted Shell
        2.2.5 Group Write Permission
     2.3 Configuring
        2.3.1 Creating Another Aliases File
        2.3.2 Making Majordomo a Trusted User
        2.3.3 Disabling Sendmail Secure Shell
        2.3.4 Disabling Security Features
     2.4 Sendmail Security Concerns
        2.4.1 Consequences of Unsafe Group Writes
        2.4.2 Consequences of Making Majordomo a Trusted User
        2.4.3 Consequences of Unsafe Group Writable Directory Paths
        2.4.4 Protecting Subscribers' Privacy

  3. Majordomo

     3.1 Preparing to Install
     3.2 Editing the Installation Files
     3.3 Installing Majordomo
     3.4 Creating the Majordomo Aliases
     3.5 Testing the Configuration
     3.6 Creating Lists
     3.7 Further Testing of the Configuration
     3.8 Creating Better Aliases

  4. MajorCool

     4.1 Extracting MajorCool
     4.2 Edit the
     4.3 Installing MajorCool

  5. List of Terms



  ______________________________________________________________________

  1.  Introduction

  This HOWTO is divided into several sections.  The Sendmail portion of
  this HOWTO is a general discussion about Majordomo and how it
  interfaces with Sendmail, as well as the various ways Majordomo can be
  set up and the consequences of such decisions.  In contrast, the rest
  of the HOWTO is set up like a tutorial guiding a user through a plain
  installation process of Majordomo.  I recommend going over the generic
  installation process described in the sections after Sendmail,
  referencing the appropriate portions of the Sendmail section when
  necessary (the appropriate sections are mentioned in the appropriate
  places).  Then, read the Sendmail section carefully and decide exactly
  how to configure your system.  Finally, a List of Terms provides
  definitions for some of the more abstruse terms.

  Also, when downloading any of the software mentioned in this document,
  if any of the official sites are down, the tarballs can be downloaded
  from my site--http://philosophy.lander.edu/~jarchie/majordomo/.

  1.1.  Credits

  Thanks go out (in alphabetical order) to a few people for their
  invaluable help.

  o  Lee Archie for proofreading

  o  James Bruce and Bill Poston for the opportunity to set up my first
     permanent machine running Majordomo

  o  Joseph D. Sloan for reading the Sendmail portion and making helpful
     suggestions

  1.2.  References

  Although I have tried to make this HOWTO as complete as possible, it
  is always a good idea to look at more than one source.  Below is a
  list of the resources that I found helpful when trying to configure
  Majordomo for the first time.

  Books:

  1. Bryan Costales with Eric Allman, sendmail.  Cambridge: O'Reilly,
     1997.

  2. Alan Schwartz, Managing Mailing Lists.  Cambridge: O'Reilly, 1998.

     Free resources:

  1. the documentation that comes with Sendmail especially README.cf

  2. the documentation that comes with Majordomo especially INSTALL and
     NEWLIST

  3. the Majordomo-Users Mailing List Archive
     (http://www.hpc.uh.edu/majordomo-users/)

  4. the documentation that comes with MajorCool

  2.  Sendmail

  Since Majordomo is responsible for managing E-mail lists, Majordomo
  relies heavily on a MTA such as Sendmail.  There are other MTA's such
  as Smail and Qmail out there; however, Sendmail is the oldest and most
  common.  This section introduces the reader to the areas of Sendmail
  that are useful or necessary to configure when using Majordomo.

  2.1.  Aliases

  The Sendmail aliases file (usually /etc/aliases) is used for making
  aliases for E-mail addresses.  For example, once Majordomo is
  installed, usually an entry in the aliases file reads:


       majordomo-owner:        jarchie



  This entry means that all mail addressed to majordomo-owner@host.com
  will actually be sent to jarchie@host.com.  Notice it is unnecessary
  to append the @host.com to jarchie because both users are on the same
  host.  If it were desired to redirect the message to a different user
  on a different host, one would have to add the @host.com portion.

  Another type of entry in the aliases file allows an E-mail to be
  redirected to multiple addresses people listed in a file:


       testlist:               :include:/usr/local/majordomo-1.94.4/lists/testlist



  This entry states that any message sent to testlist@host.com will be
  redirected to all the addresses listed in the file /usr/local/major-
  domo-1.94.4/lists/testlist.  The testlist file might look something
  like this:


       johnarchie@emeraldis.com
       srobirds@yahoo.com
       acreswell@geocities.com



  Majordomo is able to add or subtract addresses from a list by taking
  advantage of this feature.  When a subscribe request is processed, the
  user's E-mail address is appended to the testlist file; when an unsub-
  scribe request is processed, the user's E-mail address is removed from
  the testlist file.  One can also add or subtract addresses manually
  simply by editing the file with a text editor such as vi.

  Since Majordomo needs to be able to process commands sent to it via E-
  mail, Sendmail must be able to execute the Majordomo program and pass
  the message to it.  This is done by adding another type of entry to
  the aliases file:


       majordomo:              "|/usr/local/majordomo-1.94.4/wrapper majordomo"



  The program /usr/local/majordomo-1.94.4/wrapper is a wrapper (SUID
  majordomo and SGID majordomo or daemon depending on the configuration)
  that runs the Majordomo program.  The quotation marks around the sec-
  ond part of the alias entry are used to tell Sendmail that this part
  of the entry is all one statement; the quotation marks would be unnec-
  essary if there wasn't a space between wrapper and majordomo.  The |
  is known as a "pipe"; it is used to tell Sendmail to send the E-mail
  to the wrapper via the standard input.  (Since all the wrapper does
  here is to call majordomo, the E-mail is actually being sent to Major-
  domo.)  The wrapper accepts one parameter--the parameter of the pro-
  gram it is supposed to execute.  (Any parameters after the first will
  be passed to the program the wrapper is executing.)  For security
  reasons, the wrapper only executes programs located in the Majordomo
  directory, /usr/local/majordomo-1.94.4/.  This restriction prevents a
  programmer from using the wrapper to run programs that should not have
  Majordomo privileges.  (For example, wrapper /bin/vi would allow any
  user to edit any Majordomo configuration file.)  When a message is
  sent to majordomo@host.com, Sendmail starts up the wrapper which, in
  turn, starts up majordomo, and Sendmail sends the message to the
  majordomo script via the standard input.  Majordomo then extracts the
  commands out of the message and responds appropriately.

  2.2.  Editing sendmail.cf

  Due to its arcane syntax, sendmail.cf is perhaps the most feared of
  all configuration files.  In the installation of majordomo, it is not
  absolutely necessary to edit sendmail.cf; however, a couple of
  features are extremely useful.  Unless major changes have to be made
  to sendmail.cf (which, thankfully, Majordomo does not require),
  editing the file is not that difficult.  All that need be done is
  adding extra lines to the file.

  2.2.1.  Another Aliases File

  Creating a separate file for the Majordomo aliases, such as
  /usr/local/majordomo-1.94.4/majordomo.aliases, is often a good idea.
  This can be done rather easily by adding a line to the end of the
  sendmail.cf file


       OA/usr/local/majordomo-1.94.4/majordomo.aliases



  To have a /usr/local/majordomo-1.94.4/majordomo.aliases, Sendmail must
  be able to generate a database (/usr/local/majordomo-1.94.4/major-
  domo.aliases.db).  The easiest way to accomplish this is to go ahead
  and create an empty database for Sendmail to overwrite.


       ______________________________________________________________________
       [root@kes majordomo-1.94.4]# touch majordomo.aliases.db
       [root@kes majordomo-1.94.4]# chmod 644 majordomo.aliases.db
       ______________________________________________________________________



  Another method to get around this issue is simply to create the major-
  domo.aliases file in the /etc/ directory, rather than the Majordomo
  home directory.

  2.2.2.  Undesirable Sendmail Security Features

  For certain setups, some security measures that Sendmail uses can
  prevent Majordomo from working properly.  Obviously, these security
  features must be turned off.

  2.2.3.  Sendmail Trusted Users

  Sendmail is programmed to make it difficult for people to make
  "perfect" forgeries of E-mail.  For example, when a user sends a
  message via SMTP, the source IP address is typically logged, and when
  a user sends a message by giving it directly to Sendmail and
  specifying the sender using sendmail -f, Sendmail puts a warning
  message in the header specifying the user who really sent the message.
  However, some programs need to be able to send messages masquerading
  as other users, and having this extra security line appended to the
  header is annoying.  Sendmail handles this problem by having trusted
  users.  Majordomo must run as a Sendmail trusted user since the
  program needs to send mail as other users.  This feature can be set up
  in two ways.  The easiest way is to just add Majordomo to the daemon
  group.  To add the majordomo user to the daemon group, edit the line
  in the /etc/group file from something that appears similar to


       daemon::2:root,bin,daemon



  to


       daemon::2:root,bin,daemon,majordomo



  Another way is to make Majordomo a trusted user by adding the line


       Tmajordomo



  to the sendmail.cf file.


  2.2.4.  Sendmail Restricted Shell

  If Sendmail is using smrsh, then the only programs that can be
  executed are those under the /etc/smrsh/ directory.  Perhaps the best
  solution to run the wrapper from the aliases file is to create a
  symbolic link from /etc/smrsh/wrapper to
  /usr/local/majordomo-1.94.4/wrapper.


       ______________________________________________________________________
       [root@kes smrsh]# ln -s /usr/local/majordomo-1.94.4/wrapper wrapper
       ______________________________________________________________________



  A second solution is actually moving the wrapper into the /etc/smrsh/
  directory.


       ______________________________________________________________________
       [root@kes smrsh]# mv /usr/local/majordomo/wrapper ./
       ______________________________________________________________________



  If security is not a major concern, the secure shell can be disabled.
  One fairly crude method is simply to delete /usr/sbin/smrsh, and copy
  or link /bin/sh in its place.



  ______________________________________________________________________
  [root@kes sbin]# rm -f smrsh
  [root@kes sbin]# ln -s /bin/sh smrsh
  ______________________________________________________________________



  A better (but more difficult) method is to edit sendmail.cf.  Change
  the reference from /usr/sbin/smrsh


       Mprog,          P=/usr/sbin/smrsh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/,
                       T=X-Unix,
                       A=sh -c $u



  to /bin/sh


       Mprog,          P=/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/,
                       T=X-Unix,
                       A=sh -c $u



  2.2.5.  Group Write Permission

  If you plan on having a non-root user add and manage mailing lists,
  you will need to make the majordomo.aliases file that is group
  writable.  However, Sendmail will not allow this configuration for
  security reasons (see the section on ``Sendmail Security Issues'').
  To disable this security feature, add the line


       O DontBlameSendmail=GroupWritableAliasFile



  to the sendmail.cf file.  Also, the lists directory must be group
  writable in order to add a list, but Sendmail will not allow this
  setup for similar reasons.  To disable this security feature, adding
  the line


       O DontBlameSendmail=IncludeFileInGroupWritableDirPath



  to the sendmail.cf configuration file is necessary.


  2.3.  Configuring sendmail.cf  Using the M4 Configuration

  For administrators who do not want to edit the sendmail.cf file
  directly, it is possible to use M4 to create the file; this section
  describes how to make the changes discussed in the previous section to
  the mc file instead of the cf file.

  The purpose of the M4 configuration is to provide an easy way to
  create the sendmail.cf file.  The idea is that the created mc file is
  easier to understand than the sendmail.cf file.  By running the m4
  preprocessor, a sendmail.cf file is generated:


       ______________________________________________________________________
       [root@kes etc]# m4 /etc/sendmail.mc > /etc/sendmail.cf
       ______________________________________________________________________



  2.3.1.  Creating Another Aliases File

  Add the line


       define(`ALIAS_FILE',`/etc/aliases,/usr/local/majordomo/majordomo.aliases')



  to the sendmail.mc file.

  2.3.2.  Making Majordomo a Trusted User

  Add the line


       define(`confTRUSTED_USERS',`majordomo')



  to the sendmail.mc file.

  2.3.3.  Disabling Sendmail Secure Shell

  Delete the line that reads


       FEATURE(smrsh)



  in the sendmail.mc file.

  2.3.4.  Disabling Security Features

  To disable the group write permission security check on the aliases
  file, add the line


       define(`confDONT_BLAME_SENDMAIL',`GroupWritableAliasFile')



  to the sendmail.mc file.

  To disable the path write permission security check for the include
  files, add the line


       define(`confDONT_BLAME_SENDMAIL',`IncludeFileInGroupWritableDirPath')

  To enable both of these options, use


       define(`confDONT_BLAME_SENDMAIL',`GroupWritableAliasFile,IncludeFileInGroupWritableDirPath')



  Adding the last statement is equivalent to writing


       O DontBlameSendmail=GroupWritableAliasFile,IncludeFileInGroupWritableDirPath



  in sendmail.cf, and this entry is the same as writing the entries on
  separate lines:


       O DontBlameSendmail=GroupWritableAliasFile
       O DontBlameSendmail=IncludeFileInGroupWritableDirPath



  2.4.  Sendmail Security Concerns

  Security is inversely proportional to convenience; the only secure
  machine is one that cannot be accessed by anyone.  By disabling some
  of Sendmail's security features, a machine will inevitably become less
  secure.  However, it is important to understand the basic security
  risks in order to determine if the convenience is worth possible
  breaches of security.

  2.4.1.  Consequences of Unsafe Group Writes

  If a user has write permission to access an aliases file, she should
  be a trusted user.  By putting an entry into the aliases file (such as
  the one used to execute wrapper) a user can execute any program with
  the privileges of Sendmail (daemon or, in older versions, root).  The
  gaffe of this would allow people to remove or change the permissions
  of files that belong to daemon (using the rm or chmod commands in the
  aliases file).  To some extent, this possibility is avoided by using
  smrsh; however, one must still be careful as to what files are in the
  /etc/smrsh/ directory.

  Another issue that arises is that the user who can access the aliases
  file can append or write to files that belong to daemon by using file
  redirection (a >> or > instead of a |).  Even so, this breach too can
  be countered by adding a line to the sendmail.cf file that limits what
  files can be written to through the aliases file.  Add the line


       O SaveFileEnvironment=/path/to/safe/files



  to the sendmail.cf file or add


       define(`confSAFE_FILE_ENV',`/path/to/safe/files')



  to the sendmail.mc file.  However, this maneuver only leaves a thin
  layer of security between the user and daemon.  A much better idea
  would be to have the aliases file only writable by root and to create
  an SUID root program to automatically add and remove the Majordomo
  related aliases.

  In the case of include or .forward files, commands or redirections are
  run as the user who owns  the file.  Therefore, if a file is group
  writable, a member of the group can execute commands as the user who
  owns the file.  In other words, any user in the majordomo group could
  execute commands as Majordomo.  However, since the majordomo user is
  created without a shell, commands or redirections will not be
  processed in include files owned by majordomo.

  2.4.2.  Consequences of Making Majordomo a Trusted User

  If majordomo is a trusted user, then users added to the majordomo
  group will have the privileges of a trusted user.  If majordomo is a
  member of the daemon group, users in the majordomo group will not be
  trusted.  It may be a good idea to make majordomo a member of the
  daemon group, and create a separate group called majordomo for people
  managing the Majordomo lists in order to avoid making majordomo a
  trusted user.  Also, by making majordomo a member of the daemon group,
  the wrapper need not be executable by world.  (The wrapper can be
  executable by the group daemon, and Sendmail can execute it through
  the aliases file since it executes binaries as daemon.)  This added
  security prevents users on the system from "feeding" Majordomo false
  letters through the wrapper.

  2.4.3.  Consequences of Unsafe Group Writable Directory Paths

  If a user has group write permission to a directory, for example
  /etc/, the user could simply move any file and create a new one in its
  place.  An attack might go something like this


       ______________________________________________________________________
       [mallory@kes etc]$ mv aliases ...
       [mallory@kes etc]$ vi aliases
       ______________________________________________________________________



  The user can then make her own aliases!  This attack, however, could
  be prevented by Sendmail's security checking for unsafe group writable
  paths.  Such an attack also would work with include and .forward files
  having unsafe paths.

  In the case of Majordomo, the user in the majordomo group already has
  access to the include files, so this does not really compromise
  security.  However, an administrator should be careful to prevent
  these undesirable unsafe group writable directory paths from occurring
  in the future because Sendmail will not check for them.

  2.4.4.  Protecting Subscribers' Privacy

  Unfortunately, sophisticated spammers can expand mail lists using the
  EXPN SMTP command.  For this reason, administrators should disable
  this feature when serving mailing lists.  Add the line


       O PrivacyOptions=noexpn



  to the sendmail.cf file or


       define(`confPRIVACY_FLAGS',`noexpn')



  to the sendmail.mc file.

  3.  Majordomo

  Majordomo is, of course, the piece of code that this document revolves
  around; it consists of a collection of Perl scripts with the sole
  purpose of managing mailing lists.

  3.1.  Preparing to Install

  Download the gzipped source distribution of the latest version of
  Majordomo from http://www.greatcircle.com/majordomo/ and uncompress it


       ______________________________________________________________________
       [jarchie@kes jarchie]$ zcat majordomo-1.94.4.tar.Z | tar xvf -
       ______________________________________________________________________



  This will create a subdirectory with all of the files necessary to
  install Majordomo; this directory cannot be the same directory in
  which Majordomo is to be installed.

  Majordomo must run under a specific UID and GID so when any of the
  scripts are run, they will run under Majordomo's UID.  Thus, it is
  necessary to decide what UID and GID Majordomo should run under.
  Also, Majordomo must be a Sendmail trusted user.  (See ``Consequences
  of Making Majordomo a Trusted User'')

  Check the /etc/passwd and /etc/group files to find a UID and GID that
  are not taken.  For this example, a UID of 16 and a GID of 16 was
  chosen.  You have to decide on the location where the Majordomo
  scripts will reside; in this HOWTO, the directory
  /usr/local/majordomo-1.94.4/ was chosen.  If you are using a shadowed
  password file add entries similar to


       majordomo:x:16:16:Majordomo List Manager:/usr/local/majordomo-1.9.4:



  to your /etc/passwd and add an appropriate entry to /etc/shadow.


       majordomo:*:10883:0:88888:7:::



  Use the other entries in these files as a guide for exactly what
  should be added.  These are only the values for my system.  If you are
  not using shadowed passwords, only an entry in the /etc/passwd file is
  necessary.


  To create a Majordomo group, add the line


       majordomo:x:16:jarchie,majordomo



  to your /etc/group file.  This will give you access to the Majordomo
  files that are group writable.  Also, you might want to add majordomo
  to the daemon group to make it a trusted user (See ``Sendmail Trusted
  Users''); to do this, change the line that looks something like


       daemon:x:2:root,bin,daemon



  to


       daemon:x:2:root,bin,daemon,majordomo



  3.2.  Editing the Installation Files

  The Makefile contains all the information needed to install Majordomo;
  it is usually necessary to edit lines in the Makefile that refer to
  system specific settings so Majordomo will be able to install cleanly
  on your system.  Most of the default settings are correct; however,
  the following settings, almost invariably, need to be changed on a per
  system basis.


       ______________________________________________________________________
       [jarchie@kes majordomo-1.94.4]$ vi Makefile
       ______________________________________________________________________



  The settings


       PERL = /bin/perl
       CC = cc
       W_HOME = /usr/test/majordomo-$(VERSION)
       MAN = $(W_HOME)/man
       W_USER = 123
       W_GROUP = 45



  should be changed to something more appropriate for your system.  For
  example, in my setup, the values were changed to



  PERL = /usr/bin/perl
  CC = gcc
  W_HOME = /usr/local/majordomo-1.94.4
  MAN = /usr/man
  W_USER = 16
  W_GROUP = 16



  Also the majordomo.cf file must be created.  An easy way to create
  this file is to copy the provided sample.cf file to majordomo.cf and
  edit it.


       ______________________________________________________________________
       [jarchie@kes majordomo-1.94.4]$ cp sample.cf majordomo.cf
       [jarchie@kes majordomo-1.94.4]$ vi majordomo.cf
       ______________________________________________________________________



  Again, most of the settings are correct by default, but the following
  lines might need to be changed for your system from


       $whereami = "example.com";
       $whoami = "Majordomo\@$whereami";
       $whoami_owner = "Majordomo-Owner\@$whereami";
            $homedir = "/usr/test/majordomo";
       $digest_work_dir = "/usr/local/mail/digest";
       $sendmail_command = "/usr/lib/sendmail";



  to something more appropriate such as


       $whereami = "kes.emeraldis.com";
       $whoami = "majordomo\@$whereami";
       $whoami_owner = "majordomo-owner\@$whereami";
            $homedir = "/usr/local/majordomo-1.94.4";
       $digest_work_dir = "/usr/local/majordomo-1.94.4/digest";
       $sendmail_command = "/usr/sbin/sendmail";



  $whoami and $whoami_owner do not need to be changed for Majordomo to
  work; however, I changed them because I like to avoid typing capital
  letters.  $digest_work_dir is a temporary directory where digest files
  should be placed; this directory should be assigned to wherever you
  want digests to be stored.  If you do not plan to use digested lists,
  do not worry about this option.  $whereami, $homedir, and $send-
  mail_command should be changed to appropriate values for your system.
  Unlike the Makefile, these options can always be changed after Major-
  domo is installed by editing majordomo.cf in the directory where
  Majordomo was installed.  (The configuration file is simply copied
  during setup.)

  3.3.  Installing Majordomo

  The next step is to compile the Majordomo wrapper.  The wrapper is the
  only Majordomo component that needs to be compiled because everything
  else is a collection of perl scripts and, therefore, is not compiled.


       [jarchie@kes majordomo-1.94.4]$ make wrapper



  To install the Majordomo files, execute the commands


       [jarchie@kes majordomo-1.94.4]# make install
       [jarchie@kes majordomo-1.94.4]# make install-wrapper



  The first command can be done as the Majordomo user, but the second
  command needs to be done as root so the installation script can SUID
  root the Majordomo wrapper.  (Since, majordomo was created without a
  login shell or password, if you want to execute the first command as
  majordomo, you will need to su majordomo as root in order to become
  majordomo.)

  3.4.  Creating the Majordomo Aliases

  Sendmail aliases must be created for Majordomo so commands sent to
  Majordomo can be processed by Majordomo and the majordomo owner in
  order that people can E-mail you through the standard owner-majordomo
  address.  Add the following entries to your aliases file.  (See
  ``Aliases'')


       majordomo:       "|/usr/local/majordomo-1.94.4/wrapper majordomo"
       owner-majordomo: jarchie
       majordomo-owner: jarchie



  3.5.  Testing the Configuration

  As a regular user (not as majordomo or as root), run


       ______________________________________________________________________
       [jarchie@kes jarchie]$ /usr/local/majordomo-1.94.4/wrapper config-test
       ______________________________________________________________________



  This program can detect most problems in the Majordomo installation.

  3.6.  Creating Lists

  To create a list, create a file with the name of the list in the
  Majordomo lists directory.  For example, to create a list called test,
  create a test file as Majordomo


       ______________________________________________________________________
       [root@kes /]# su majordomo
       [majordomo@kes /]$ touch /usr/local/majordomo-1.94.4/lists/test
       ______________________________________________________________________

  and add the related aliases


       test:          :include:/usr/local/majordomo-1.94.4/lists/test
       owner-test:    jarchie
       test-request:  "|/usr/local/majordomo-1.94.4/wrapper request-answer test"
       test-approval: jarchie



  3.7.  Further Testing of the Configuration

  Now test the operation of the list by issuing a lists command to
  majordomo.


       ______________________________________________________________________
       [jarchie@kes jarchie]$ echo lists | mail majordomo
       ______________________________________________________________________



  It should only take a second for majordomo to reply with a message
  containing all the lists which are currently set up.  Next, try issu-
  ing a help command.


       ______________________________________________________________________
       [jarchie@kes jarchie]$ echo help | mail majordomo
       ______________________________________________________________________



  Majordomo should reply with a list of all commands that Majordomo
  accepts.  It might be a good idea to save the message for future ref-
  erence.

  To see if the aliases are working properly, try subscribing and
  unsubscribing yourself to the list.


       ______________________________________________________________________
       [jarchie@kes jarchie]$ echo subscribe test | mail majordomo
       ______________________________________________________________________



  You will receive an E-mail message containing instructions on how to
  confirm your subscription as well as a letter confirming that your
  command was successful.  After sending back your confirmation, Major-
  domo should send back two letters--one letter stating that your sub-
  scribe request was successful and another letter welcoming you to the
  test list.  The owner of the list will also be sent a message stating
  that you have subscribed to the list.

  To unsubscribe from a list, send a unsubscribe command


       ______________________________________________________________________
       [jarchie@kes jarchie]$ echo unsubscribe test | mail majordomo
       ______________________________________________________________________

  You should be sent back a letter stating that your command was suc-
  cessful.

  3.8.  Creating Better Aliases

  For some lists, it may be desirable to have Majordomo process messages
  before they reach the list.  For example, Majordomo has an option
  automatically to filter messages based on content (such as taboo
  words), or Majordomo can catch people trying to send Majordomo
  commands to the list.  To use these options, it is necessary to use a
  better set of aliases such as


       test:        "|/usr/local/majordomo-1.94.4/wrapper resend -l test test-list"
       test-list:   :include:/usr/local/majordomo-1.94.4/lists/test
       owner-test:  jarchie
       test-owner:  jarchie
       test-request:  "|/usr/local/majordomo-1.94.4/wrapper majordomo -l test"



  The last entry allows someone simply to send a message to test-
  request@kes.emeraldis.com with the text subscribe rather than sending
  a letter to majordomo@kes.emeraldis.com with the text subscribe test.

  4.  MajorCool

  MajorCool is a web-based interface to Majordomo allowing users to add
  and delete themselves from lists and manage lists that they own.  The
  installation is fairly straightforward; all that need be done is to
  unzip the files, edit one line in the Configure script, and execute
  the script.

  4.1.  Extracting MajorCool

  The latest files can be downloaded from
  http://ncrinfo.ncr.com/pub/contrib/unix/MajorCool/majorcool.tar.gz.


       ______________________________________________________________________
       [jarchie@kes jarchie]$ mkdir majorcool
       [jarchie@kes jarchie]$ mv majorcool.tar.gz ./majorcool/
       [jarchie@kes majorcool]$ zcat majorcool.tar.gz | tar xvf -
       ______________________________________________________________________



  4.2.  Edit the Configure  Script

  Open Configure and


       ______________________________________________________________________
       [jarchie@kes majorcool]$ vi Configure
       ______________________________________________________________________



  change the line that reads


       PERLBIN="/usr/local/bin/perl"       # How to start a perl script

  to the proper location of perl


       PERLBIN="/usr/bin/perl"             # How to start a perl script



  otherwise, MajorCool will not be installed properly.

  4.3.  Installing MajorCool

  When running the Configure script, if the default choice for an option
  is okay, simply pressing Enter will accept the default.


       ______________________________________________________________________
       [root@kes majorcool]# ./Configure
       ______________________________________________________________________



  The Configure script will ask you to hit Enter a few times, and then
  it will ask for the location of Majordomo and some more questions
  about the setup of your web server.


       ______________________________________________________________________
       What is the installation directory of Majordomo?
               []: /usr/local/majordomo-1.94.4
       Will place the MajorCool programs in /usr/local/majordomo-1.94.4.

       What is the path to your Majordomo configuration file?
               [/usr/local/majordomo-1.94.4/majordomo.cf]:
       Using configuration file name '/usr/local/majordomo-1.94.4/majordomo.cf'

       Where would you like temp files created when MajorCool runs?
               [/tmp]:

       MajorCool needs to install CGI programs, support files, and icons in
       your Web server directories.

       What is the root directory for your Web server?
               []: /home/httpd

       Where is the cgi-bin directory for your Web server?
               [/home/httpd/cgi-bin]:
       Will place the programs in /home/httpd/cgi-bin.

       What is your server's URL for '/home/httpd/cgi-bin'?
               [/cgi-bin]:

       Where is the image directory for your Web server?
               [/home/httpd/icons]:
       Will place the icons in /home/httpd/icons.

       What is your server's URL for '/home/httpd/icons'?
               [/images]: /icons

       Where is the root directory for documents on your Web server?
               []: /home/httpd/html
       ______________________________________________________________________



  The Configure script will ask other questions that are less critical.
  (The defaults are fine, but you might want to change a few settings to
  fit your preferences.  Unlike some of the web-server questions, the
  meanings should be obvious from the context.)  When the configuration
  file that the script generated from your answers is displayed, you
  should accept the new version.


       ______________________________________________________________________
       Accept the new version? [yes|no|list|edit|diff]? y
       ______________________________________________________________________



  The installation script will install the MajorCool files and run the
  majordomo cgi script which outputs the html file to the console.
  Check to see if the installation worked by viewing the majordomo cgi
  script from the web.


       ______________________________________________________________________
       [jarchie@kes jarchie]$ lynx http://localhost/cgi-bin/majordomo
       ______________________________________________________________________



  5.  List of Terms


     digest
        a collection of new messages mailed to the members of an
        archived list as one message.  A list is called digested when it
        is archived and, periodically, a digest is sent out.

     GID
        (Group ID) an identification number assigned to files,
        directories, and processes to restrict access--similar to UID
        except multiple people can be a member of a group.  On Unix type
        systems, groups can be set up (defined in the /etc/group file).
        When a user name is a member of a group, she can access files
        created with that GID (assuming permissions allow it).

     MTA
        (Mail Transfer Agent) a program, such as Sendmail, responsible
        for passing mail from one location to another.

     SGID
        (Set Group ID) a file attribute which allows a program to run
        with specific group privileges no matter who executes it.

     smrsh
        (SendMail Restricted SHell) the shell that Sendmail uses to
        execute programs.  smrsh puts restrictions on the programs that
        can be run to make it safer than using a regular shell such as
        the Bourne Shell.

     SUID
        (Set User ID) a file attribute which allows a program to run as
        a specific user no matter who executes it.

     UID
        (User ID) an identification number assigned to files
        directories, and processes--similar to GID except every user has
        a unique UID.  Every process must run under a UID (the one-to-
        one relationship between the UID and user name is defined in
        /etc/passwd).  The process' UID determines what the program can
        access.  In general a regular user can change the permissions on
        files that she owns unless the UID is 0 (the root user).  In
        that case, root can modify any files on the system.

     wrapper
        a program used to start another program; usually a wrapper is
        SUID or SGID so it can bestow privileges onto another program
        that the other program would not normally have.



  Modem-HOWTO
  David S.Lawyer    <mailto:dave@lafn.org>
  v0.11, June 2000

  Help with selecting, connecting, configuring, trouble-shooting, and
  understanding modems for a PC.  See Serial-HOWTO for multiport serial
  boards.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 DSL, Cable, and ISDN Modems in other HOWTOs
     1.2 Also not covered: PCMCIA Modems, PPP
     1.3 Copyright, Disclaimer, Trademarks, & Credits
        1.3.1 Copyright
        1.3.2 Disclaimer
        1.3.3 Trademarks.
        1.3.4 Credits
     1.4 Contacting the Author
     1.5 New Versions of this HOWTO
     1.6 New in this Version
     1.7 What is a Modem ?
     1.8 Quick Install
        1.8.1 External Modem Install
        1.8.2 Internal Modems (on ISA bus)
        1.8.3 All Modems

  2. Modems for a Linux PC

     2.1 External vs. Internal
     2.2 External Modems
        2.2.1 PnP External Modems
        2.2.2 Cabling & Installation
        2.2.3 What the Lights (LED's) Mean
     2.3 Internal Modems
     2.4 Software (Internal) Modems (mostly winmodems)
     2.5 PCI Modems
     2.6 Which Internal Modems might not work with Linux
        2.6.1 MWave and DSP Modems
        2.6.2 Rockwell (RPI) Drivers

  3. Modem Pools, Digital Modems

     3.1 Analog Modem Pools, Multiport Modem Cards
     3.2 Digital Modems

  4. Serial Port and Modem Basics

     4.1 Modem Converts Digital to Analog (and conversely)
     4.2 What is a Serial Port ?
        4.2.1 Intro to Serial
        4.2.2 Pins and Wires
        4.2.3 Internal Modem Contains Serial Port
     4.3 IO Address & IRQ
     4.4 Names: ttyS0, ttyS1, etc.
     4.5 Interrupts
     4.6 Data Compression (by the Modem)
     4.7 Error Correction
     4.8 Data Flow (Speeds)
     4.9 Flow Control
        4.9.1 Example of Flow Control
        4.9.2 Hardware vs. Software Flow Control
        4.9.3 Symptoms of No Flow Control
        4.9.4 Modem-to-Modem Flow Control
     4.10 Data Flow Path; Buffers
     4.11 Modem Commands
     4.12 Serial Software: Device Driver Module

  5. Configuring Overview

  6. Configuring the Serial Port

     6.1 PCI Bus Support Underway
     6.2 Configuring Overview
     6.3 Common mistakes made re low-level configuring
     6.4 I/O Address & IRQ: Boot-time messages
     6.5 What is the current IO address and IRQ of my Serial Port ?
        6.5.1 What does the device driver think?
        6.5.2 What is set in my serial port hardware ?
        6.5.3 What is set in my PnP serial port hardware ?
     6.6 Choosing Serial IRQs
        6.6.1 IRQ 0 is not an IRQ
        6.6.2 Interrupt sharing and Kernels 2.2+
        6.6.3 What IRQs to choose?
     6.7 Choosing Addresses --Video card conflict with ttyS3
     6.8 Set IO Address & IRQ in the hardware (mostly for PnP)
        6.8.1 Using a PnP BIOS to I0-IRQ Configure
     6.9 Giving the IRQ and IO Address to Setserial
     6.10 Other Configuring
        6.10.1 Configuring Hardware Flow Control (RTS/CTS)

  7. Modem Configuration (excluding serial port)

     7.1 Finding Your Modem
     7.2 AT Commands
     7.3 Init Strings: Saving and Recalling
     7.4 Other Modem Commands

  8. Serial Port Devices /dev/ttyS2, etc.

     8.1 Serial Port Device Names & Numbers
     8.2 Link ttySN to /dev/modem ?
     8.3 The cua Device

  9. Interesting Programs You Should Know About

     9.1 What is setserial ?
        9.1.1 Introduction
        9.1.2 Probing
        9.1.3 Boot-time Configuration
        9.1.4 Configuration Scripts/Files
        9.1.5 Edit a script (after version 2.15: perhaps not)
        9.1.6 New configuration method using /etc/serial.conf
        9.1.7 IRQs
     9.2 What is isapnp ?
     9.3 What is wvdialconf ?
     9.4 What is stty ?

  10. Trying Out Your Modem (Dialing Out)

     10.1 Are You Ready to Dial Out ?
     10.2 Dialing Out with Minicom
     10.3 Dialing Out with Kermit

  11. Dial-In

     11.1 Overview
     11.2 Getty
        11.2.1 About mgetty
        11.2.2 About uugetty
        11.2.3 About getty_em
        11.2.4 About agetty and mingetty
     11.3 What Happens when Someone Dials In ?
     11.4 Why Manual Answer is Best
     11.5 Callback
     11.6 Voice Mail

  12. Uugetty for Dial-In (from the old Serial-HOWTO)

     12.1 Installing getty_ps
     12.2 Setting up uugetty
        12.2.1 Modern Modems
        12.2.2 Old slow modems
        12.2.3 Login Banner
     12.3 Customizing uugetty

  13. What Speed Should I Use with My Modem?

     13.1 Speed and Data Compression
     13.2 Where do I Set Speed ?
     13.3 Can't Set a High Enough Speed
        13.3.1 How speed is set in hardware: the divisor and baud_base
        13.3.2 Work-arounds for setting speed
        13.3.3 Crystal frequency is not baud_base
     13.4 Speed Table

  14. Communications Programs And Utilities

     14.1 Minicom vs. Kermit
     14.2 List of Communication Software
        14.2.1 Least Popular Dialout
        14.2.2 Most Popular Dialout
        14.2.3 Fax
        14.2.4 Voicemail Software
        14.2.5 Dial-in (uses getty)
        14.2.6 Other
     14.3 SLiRP and term

  15. What Are UARTs?  How Do They Affect Performance?

     15.1 Introduction to UARTS
     15.2 Two Types of UARTs
     15.3 FIFOs
     15.4 UART Model Numbers

  16. Troubleshooting

     16.1 My Modem is Physically There but Can't be Found
        16.1.1 No response to AT
     16.2 "Modem busy"
     16.3 I can't get near 56k on my 56k modem
     16.4 Uploading (downloading) files is broken/slow
     16.5 For Dial-in I Keep Getting "line NNN of inittab invalid"
     16.6 I Keep Getting: ``Id "S3" respawning too fast: disabled for 5 minutes''
     16.7 My Modem is Hosed after Someone Hangs Up, or uugetty doesn't respawn
     16.8 uugetty Still Doesn't Work
     16.9 (The following subsections are in both the Serial and Modem HOWTOs)
     16.10 My Serial Port is Physically There but Can't be Found
     16.11 Extremely Slow: Text appears on the screen slowly after long delays
     16.12 Somewhat Slow: I expected it to be a few times faster
     16.13 The Startup Screen Show Wrong IRQs for the Serial Ports.
     16.14 "Cannot open /dev/ttyS?: Permission denied"
     16.15 "Operation not supported by device" for ttyS?
     16.16 "Cannot create lockfile. Sorry"
     16.17 "Device /dev/ttyS? is locked."
     16.18 "/dev/ttyS?: Device or resource busy"
     16.19 Troubleshooting Tools

  17. Flash Upgrades

  18. Other Sources of Information

     18.1 Misc
     18.2 Books
     18.3 HOWTOs
     18.4 Usenet newsgroups
     18.5 Web Sites
  19. Appendix A:  How Analog Modems Work (technical) (unfinished)

     19.1 Modulation Details
        19.1.1 Intro to Modulation
        19.1.2 Frequency Modulation
        19.1.3 Amplitude Modulation
        19.1.4 Phase Modulation
        19.1.5 Combination Modulation
     19.2 56k Modems (v.90)
     19.3 Full Duplex on One Circuit
     19.4 Echo Cancellation

  20. Appendix B: Digital Modem Signal Processing (not done)

  21. Appendix C: "baud" vs. "bps"

     21.1 A simple example
     21.2 Real examples

  22. Appendix D: Terminal Server Connection

  23. Appendix E:  Other Types of Modems

     23.1 Digital-to-Digital "Modems"
     23.2 ISDN "Modems"
     23.3 Digital Subscriber Line (DSL)
     23.4 56k Digital-Modems
     23.5 Leased Line Modems

  24. Appendix F: Fax pixels (dots)



  ______________________________________________________________________

  1.  Introduction

  1.1.  DSL, Cable, and ISDN Modems in other HOWTOs

  This HOWTO covers conventional modems for PC's, mainly modems on the
  ISA bus.  However each new version usually finds more info added about
  modems for the PCI bus.


    DSL modems: see the mini-howto: ADSL

    Cable-Modems-HOWTO (was once a LDP mini-Howto)
     <http://www.cs.unm.edu/~vuksan/linux/Cable-Modem.html>

    ISDN Howto (not a LDP Howto)
     <http://sdb.suse.de/sdb/en/html/isdn.html>: drivers for ISDN
     "Modems".  Much related info on this is in German.  For a tutorial
     on ISDN see  <http://public.swbell.net/ISDN/overview.html>

     See also ``Appendix D:  Other Types of Modems''


  1.2.  Also not covered: PCMCIA Modems, PPP

  For modems on the PCMCIA bus see the PCMCIA-HOWTO: PCMCIA serial and
  modem devices.  This HOWTO doesn't cover PPP (used to connect to the
  Internet via a modem) or communication programs.  Except it does show
  how to use communication programs to test that your modem works OK and
  can make phone calls.  If you want to use a modem to connect to the
  Internet then you need to set up PPP.  There's a lot of documentation
  for PPP (including a PPP-HOWTO which is being revised).  Some of it
  might be found in /usr/doc/ppp or the like.


  1.3.  Copyright, Disclaimer, Trademarks, & Credits

  1.3.1.  Copyright

  Copyright (c) 1998-2000 by David S. Lawyer  <mailto:dave@lafn.org>

  Please freely copy and distribute (sell or give away) this document in
  any format.  Forward any corrections and comments to the document
  maintainer.  You may create a derivative work and distribute it
  provided that you:


  1. Send your derivative work (in the most suitable format such as
     sgml) to the LDP (Linux Documentation Project) or the like for
     posting on the Internet.  If not the LDP, then let the LDP know
     where it is available.  Except for a translation, send a copy to
     the previous maintainer's url as shown in the latest version.

  2. License the derivative work in the spirit of this license or use
     GPL.  Include a copyright notice and at least a pointer to the
     license used.

  3. Give due credit to previous authors and major contributors.

  If you're considering making a derived work other than a translation,
  it's requested that you discuss your plans with the current
  maintainer.


  1.3.2.  Disclaimer

  While I haven't intentionally tried to mislead you, there are likely a
  number of errors in this document.  Please let me know about them.
  Since this is free documentation, it should be obvious that I cannot
  be held legally responsible for any errors.


  1.3.3.  Trademarks.

  Any brand names (starts with a capital letter) should be assumed to be
  a trademark).  Such trademarks belong to their respective owners.


  "Hayes" is a trademark of Microcomputer Products Inc.  I use
  "winmodem" to mean any modem which requires MS-Windows and not in the
  trademark sense.


  1.3.4.  Credits

  The following is only a rough approximation of how this this document
  (as of 2000) was created:  About 1/4 of the material here was lifted
  directly from Serial-HOWTO v. 1.11 by Greg Hankins.
  <mailto:gregh@cc.gatech.edu> (with his permission).  About another 1/4
  was taken from that Serial-HOWTO and revised.  The remaining 1/2 is
  newly created by the author: David S. Lawyer  <mailto:dave@lafn.org>.


  1.4.  Contacting the Author

  Please don't email me asking which modem to buy or asking if a certain
  modem will work under Linux.  Look at the huge list at ``Software
  (Internal) Modems'' Also, please don't ask me how to configure a modem
  unless you've looked over this HOWTO and still can't do it.

  Please let me know of any errors in facts, opinions, logic, spelling,
  grammar, clarity, links, etc.  But first, if the date is over a month
  old, check to see that you have the latest version.  Please send me
  any other info that you think belongs in this document.


  1.5.  New Versions of this HOWTO

  New versions of this Modem-HOWTO come out every month or so since
  modem situation is rapidly changing (and since I'm still learning).
  Your problem might be solved in the latest version.  It will be
  available to browse and/or download at LDP mirror sites.  For a list
  of such sites see:  <http://metalab.unc.edu/LDP/mirrors.html> If you
  only want to quickly check the date of the latest version go to
  <http://metalab.unc.edu/LDP/HOWTO/Modem-HOWTO.html> and compare it to
  the version you are currently reading: v0.11, June 2000


  1.6.  New in this Version



  1.7.  What is a Modem ?

  A modem is a device that lets one send digital signals over ordinary
  telephone lines not designed for digital signals.  If telephone lines
  were all digital then you wouldn't need a modem.  It permits your
  computer to connect to and communicate with the rest of the world.
  When you use a modem, you normally use a communication program or web
  browser (which includes such a program) to utilize the modem and dial-
  out on a telephone line.  Advanced modem users can set things up so
  that others may phone in to them and use their computer.  This is
  called "dial-in".

  There are two basic types of modems for a PC: external and internal.
  The external sets on your desk outside the PC while the internal is
  not visible since it's inside the PC.  The external modem plugs into a
  connector on the back of the PC known as a "serial port".  The
  internal modem is a card that is inserted inside the computer and has
  an (invisible) serial port built into it.  For a more detailed
  comparison see ``External vs. Internal''.  Thus when you get an
  internal modem, you also get a dedicated serial port (which can only
  be used with the modem and not with anything else such as another
  modem or a printer).  In Linux, the serial ports are named ttyS0,
  ttyS1, etc. (usually corresponding respectively to COM1, COM2, etc. in
  Dos/Windows).

  The serial port is not to be confused with the "Universal Serial Bus"
  (USB) which uses a special modular connector and may be used with
  modems in the future.  See ``Modem & Serial Port Basics'' for more
  details on modems and serial ports.

  Modems often include the ability to send Faxes (Fax Modems).  See
  ``Fax'' for a list of fax software.  "Voice" modems can work like an
  automatic answering machine and handle voicemail.  See ``Voicemail''.


  1.8.  Quick Install

  1.8.1.  External Modem Install

  With a straight-thru or modem cable, connect the modem to an unused
  serial port on the PC.  Make sure you know the name of the serial
  port: in most cases COM1 is ttyS0, COM2 is ttyS1, etc.  You may need
  to check the BIOS setup menu to determine this.  Plug in the power
  cord to provide power to the modem.  See ``All Modems'' for further
  instructions.


  1.8.2.  Internal Modems (on ISA bus)

  (For the PCI bus see ``PCI Bus Support Underway'' and ``PCI Modems''.)
  If the modem says it will only work under MS Windows, you may be out
  of luck.  If you already have 2 serial ports, make the modem the 3rd
  serial port (ttyS2 = COM3).  Find an unused IRQ number to use.  In the
  past IRQ 5 was often used but today IRQ 5 is also used for sound
  cards.  Then set the jumpers (or the like) on the internal modem to
  the unused IRQ and IO address such as 3E8 for ttyS2.

  "Or the like" (in the previous sentence) may be a bit tricky.  If the
  modem is a Plug and Play (PnP) for the ISA bus, the equivalent
  probably can be done using the "isapnp" program which comes with
  "isapnptools".  See "man isapnp" or the FAQ for it.  See also "Plug-
  and-Play-HOWTO.  With a PnP-BIOS you may be able to tell the CMOS
  setup menu that you don't have a PnP OS and then the BIOS may set a
  suitable IRQ and IO address in the modem card.  If you want to "force"
  the BIOS to set a certain IRQ and/or IO then you may be able to do
  this using Windows9x on the same PC.  It can set them into the PnP
  BIOS's flash memory where they will be used to configure for Linux as
  well as Windows.  See "Plug-and-Play-HOWTO and search for "forced"
  (occurs in several places).  For Windows3.x you can do the same thing
  using the ICU under Windows 3.x.  There may even be a way to disable
  PnP using software (under Windows) that came with the modem.

  Finally you must also find the file where "setserial" is run and add a
  line something like: "setserial /dev/ttyS2 irq5".  Except for
  setserial v2.15 and later you may (if you distribution lets you) just
  run "setserial" on the command line and the results are saved to a
  configuration file.  See ``What is Setserial'' for more info.  See the
  next subsection ``All Modems'' for further instructions on quick
  installation.


  1.8.3.  All Modems

  Plug the modem into a telephone line.  Then start up a communication
  program such as minicom and go to the configuration menu for the
  serial port.  Assign it a high baud rate a few times higher than the
  bit rate of your modem.  See ``Speed Table'' for the "best" speeds to
  use.  Tell it the full name of your serial port such as /dev/ttyS1.
  Set hardware flow control (RTS/CTS).  Now you need to save these
  settings and exit minicom.  Then start minicom again, type AT to see
  if your modem is there and responds with OK.  Then go to the dial
  directory (or menu) and dial a number.


  2.  Modems for a Linux PC

  2.1.  External vs. Internal

  A modem for a PC may be either internal or external.  The internal one
  is installed inside of your PC (you must remove screws, etc. to
  install it) and the external one just plugs into a serial port
  connector on a PC.  Internal modems are less expensive, are less
  likely to to suffer data loss due to buffer overrun, usually use less
  electricity, and use up no space on your desk.

  External modems are much easier to install and require less
  configuration.  They have lights which may give you a clue as to what
  is happening and aid in troubleshooting.  The fact that the serial
  port and modem can be physically separated also aids in
  troubleshooting.  External modems are easy to move to another
  computer.

  Unfortunately most external modems have no switch to turn off the
  power supply when not in use and thus are likely to consume a little
  electricity even when turned off (unless you unplug the power supply
  from the wall).  Each watt they draw costs you about $1/yr.  Another
  possible disadvantage of an external is that you will be forced to use
  an existing serial port which may not support a speed of over 115,200
  k (although as of late 1998 most new internal modems don't either
  --but some do).  If a new internal modem had a 16650 UART it would put
  less load on the CPU (but almost none do as of late 1998).

  Internal modems present a special problem for Linux, but will work
  just as well as external modems provided you avoid the high percentage
  of them that will work only for MS Windows, and also provided that you
  spend time (sometimes a lot of time) to configure them correctly.
  Some of the modems which will work only under MS Windows are,
  unfortunately, not labeled as such.  If you buy a new one, make sure
  that you can return it for a refund if it will not work under Linux.

  While most new modems are plug-and-play you have various ways to deal
  with them:

    Use the "isapnp" program

    Have a PnP BIOS do the configuring

    Patch the kernel to create a PnP Linux (not currently available)

     Each of the above has shortcomings.  Isapnp documentation is
     difficult to understand although reading the Plug-and-Play-HOWTO
     (at present incomplete) will aid in understanding it.  If you want
     the PnP BIOS to do the configuring, all you need to do is to make
     sure that it knows you don't have a PnP operating system.  But it
     may not do it correctly.  To find out what it's done see ``What is
     set in my serial port hardware?''.   Patching the kernel has worked
     in the past but no patch seems to be currently available.  Check
     out the website for it.

  There are many Linux users that say that it's a lot simpler just to
  get an external modem and plug it in.  But since new peripherals are
  mostly PnP today, you may eventually need to deal with it, so why
  delay the inevitable?  Still, the most expedient (and expensive)
  solution is an external modem (if you have a free serial port).


  2.2.  External Modems

  2.2.1.  PnP External Modems

  Many external modems are labeled "Plug and Play" (PnP) but they should
  all work fine as non-PnP modems.  Since you usually plug the modem
  into a serial port which has its own IRQ number and IO address, the
  modem needs no PnP features to set these up.  However, the serial port
  itself may need to be configured (IRQ number and IO address) unless
  the default configuration is OK.

  How can an external modem be called PnP since it can't be configured
  by PnP?   Well, it has a special PnP identification built into it that
  can be read (thru the serial port) by a PnP operating system.  Such an
  operating system would then know that you have a modem on a certain
  port and would also know the model number.  Then you might not need to
  configure application programs by telling them what port the modem is
  on (such as /dev/ttyS2 or COM3).  But since you don't have such a PnP
  operating system you will need to configure your application program
  manually by giving it the /dev id (such as /dev/ttyS2).


  2.2.2.  Cabling & Installation

  Connecting an external modem is simple compared to connecting most
  other devices to a serial port that require various types of "null
  modem" cables.  Modems use straight through cable, with no pins
  crossed over.  Most computer stores should have these.  Make sure you
  get the correct gender.  If you are using the DB9 or DB25 serial port
  at your computer, it will always be male which means that the
  connector on the cable should be female.  Hook up your modem to one of
  your serial ports.  If you are willing to accept the default IRQ and
  IO address of the port you connect it to, then you are ready to start
  your communication program and configure the modem itself.


  2.2.3.  What the Lights (LED's) Mean


    TM Test Modem

    AA Auto Answer (If on, your modem will answer an incoming call)

    RD Receive Data line = RxD

    SD Send Data line = TxD

    TR data Terminal Ready = DTR (set by your PC)

    RI Ring Indicator (If on, someone is "ringing" your modem)

    OH Off Hook (If off, your modem has hung up the phone line)

    MR Modem Ready = DSR ??

    EC Error Correction

    DC Data Compression

    HS High Speed (for this modem)


  2.3.  Internal Modems

  An internal modem is installed in a PC by taking off the cover of the
  PC and inserting the modem card into a vacant slot on the motherboard.
  There are modems for the ISA slots and others for the PCI slots.
  While external modems plug into the serial port (via a short cable)
  the internal modems have the serial port built into the modem.  In
  other words, the modem card is both a serial port and a modem.

  Setting the IO address and IRQ for a serial port was formerly done by
  jumpers on the card.  These are little black rectangular "cubes" about
  5x4x2 mm in size which push in over pins on the card.  Plug-and-Play
  modems (actually the serial port part of the modems) don't use jumpers
  for setting these but instead are configured by sending configuration
  commands to them (via IO address space on the ISA bus inside the
  computer).  Such configuration commands can be sent by a PnP BIOS, the
  isapnp program (for the ISA bus only) or by a PnP operating system.
  The configuring of them is built into Windows 95/98 OSs.  Under Linux
  you have a choice of ways (none of which is always easy) to io-irq
  configure them:

  1. Use "isapnp" which may be run automatically at every boot-time

  2. Use a PnP BIOS alone (which runs at every boot-time)

  3. Patch Linux to make it a PnP operating system


  2.4.  Software (Internal) Modems (mostly winmodems)

  Software modems turn over much (or even almost all) of the work of the
  modem to the main processor (CPU) chip of your computer (such as a
  Pentium chip).  Complex proprietary software programs (drivers) do
  this work on the CPU.  A majority of internal modems made after about
  mid-1998 don't work with Linux since they are software modems which
  only work under Windows and are often called "winmodems".  Although a
  few volunteers were willing to try writing Linux drivers for these
  modems, specs were not made available so this couldn't be done.  Prior
  to about 2000, no software modem could be used with Linux due to no
  drivers for them under Linux.

  See the new (April 2000) Winmodems-and-Linux-HOWTO for details of how
  to get some winmodems to work under Linux.

  Finally in late 1999 two software modems appeared that could work
  under Linux.  Lucent Technologies unofficially released a Linux
  binary-only code to support its PCI software modems but bugs were
  reported in early versions.   PC-TEL introduced a new software modem
  for Linux.  Will other companies follow these leads and thus create
  "linmodems"?  For a list of modems which work/don't_work under Linux
  see modem list <http://www.o2.net/~gromitkc/winmodem.html>.  A project
  to get winmodems to work under Linux is at  <http://linmodems.org>.
  They also have a mailing list.  There is some effort underway at
  reverse-engineering with at least one report of a winmodem that has
  been made to work under Linux (but not yet with full functionality).
  So by the time you read this there may be more linmodems.

  If code is made available to operate a "winmodem" under Linux, then
  one may call it a "linmodem".  Is it still a "winmodem"?  Perhaps it
  is since it also works under MS Windows.  The term "Winmodem" is a
  trademark for a certain type of "winmodem".

  Here is some more precise terminology regarding software modems.  HSP
  (Host Signal Processor) means that the host processor (your CPU chip)
  creates the code needed to produce the electrical signal on the phone
  line.  The modem itself just creates whatever electrical waveshape the
  CPU tells it to.  In contrast to this, a "controllerless" modem can
  create the waveshapes on its own (but can't control the modem).  It
  contains no facilities to deal with bytes being sent and received.  It
  can't compress strings of bytes; it can't check for errors; it can't
  put them into packets.  In other words it can't control the modem but
  instead has the CPU do all this work using software.  The Rockwell HCF
  (Host Controlled Family) does this.  If the software that does all
  this could be ported to Linux and then there wouldn't be this problem.
  Besides the above, a modem which doesn't simulate a serial port will
  not work under Linux.

  How do you determine if an internal modem will work under Linux?
  First see if the name or description of it indicates it's a software
  modem: HSP, HCF, HSF, controllerless, host-controlled, host-based, and
  soft-...  modem.  If it's a software modem it will only work for the
  rare cases (so far) where a Linux driver is available.  If you don't
  know the model of the modem and you also have Windows on your Linux
  PC, click on the "Modem" icon in the "Control Panel".  Then check out
  the modem list on the Web mentioned 4 paragraphs above.  If the above
  doesn't work (or isn't feasible), you can look at the package it came
  in (or a manual) find the section on the package that says something
  like "Minimum System Requirements" or just "System Requirements".  It
  may be in fine print.  Read it closely.  If Windows or a Pentium CPU
  is listed as one of the requirements then it will likely not work
  under Linux.

  Otherwise, it may work under Linux if it fails to state explicitly
  that you must have Windows.  By saying it's "designed for Windows" it
  may only mean that it fully supports Microsoft's plug-and-play which
  is OK since Linux uses the same plug-and-play specs (but it's harder
  to configure under Linux).  Being "designed for Windows" thus gives no
  clue as to whether or not it will work under Linux.  You might check
  the Website of the manufacturer or inquire via email.  I once saw a
  web-page that specifically stated that one model worked under Linux
  while implying that another model didn't.

  Besides the problems of getting a driver, what are the pros and cons
  of software modems?  Since the software modem uses the CPU to do much
  of its work, the software modem requires less on-board electronics and
  thus costs less.  At the same time, the CPU is heavily loaded by the
  modem which may result in slower operation.  This is especially true
  if other CPU-intensive tasks are running at the same time.  Of course
  when you're not using the software modem there is no degradation in
  performance at all.  Is the cost savings worth it?  In some cases yes,
  especially if you seldom use the modem or are not running any other
  CPU intensive tasks when the modem is in use.  Thus there are cases
  where use of a software modem is economically justified.  The savings
  in modem cost could be used for a better CPU which would speed things
  up a little.  But the on-board electronics of a modem can do the job
  much more efficiently than a general purpose CPU.  So if you use the
  modem a lot it's probably better to avoid software modems (and then
  you can use a less powerful CPU :-).


  2.5.  PCI Modems

  A PCI modem card is one which inserts into a PCI-bus slot on the
  motherboard of a PC.  Unfortunately, it seems that most PCI modems
  will not work under Linux but efforts are underway to support some of
  them.  See ``PCI Bus Support Underway''


  2.6.  Which Internal Modems might not work with Linux



    ``Software (Internal) Modems'' only work in rare cases where a
     Linux driver is available.

    ``PCI Modems'' most don't work yet under Linux

    ``MWave and DSP Modems'' might work, but only if you first start
     Windows/Dos each time you power on your PC

    Modems with ``RPI (Rockwell)'' drivers work but with reduced
     performance


  2.6.1.  MWave and DSP Modems

  Such modems use DSP's (Digital Signal Processors) which are programmed
  by algorithms which must be downloaded from the hard disk to the DSP's
  memory just before using the modem.  Unfortunately, the downloading is
  often done by Dos/Windows programs so one can't do it from Linux.
  Ordinary modems that work with Linux often have a DSP too (and may
  mention this on the packaging), but the program that runs it is stored
  inside the modem.  This is not a "DSP modem" in the sense of this
  section and should work OK under Linux.  An example of a DSP modem is
  IBM's Aptiva MWAVE.

  If a DSP modem modem simulates a serial port, then it is usable with
  Linux which communicates with modems via the serial port.  If you also
  have Dos/Windows on the same PC you may be able to use the modem: You
  first install the driver under DOS (using DOS and not Window drivers).
  Then start Dos/Windows and start the driver for the modem so as to
  program the DSP.  Then without turning off the computer, go into
  Linux.

  One may write a "batch" file (actually a script) to do this.  Here is
  an example but you must modify it to suit your situation.



       rem mwave is a batch file supplied by the modem maker
       call c:\mww\dll\mwave start
       rem loadlin.exe is a DOS program that will boot Linux from DOS (See
       rem Config-HOWTO).
       c:\linux\loadlin f:\vmlinuz root=/dev/hda3 ro



  One may create an icon for the Window's desktop which points to such a
  batch file and set the icon properties to "Run in MSDOS Mode".  Then
  by clicking on this icon one sets up the modem and goes to Linux.
  Another possible way to boot Linux from DOS is to press CTRL-ALT-DEL
  and tell it to reboot (assuming that you have set things up so that
  you can boot directly into Linux).  The modem remains on the same com
  port (same IO address) that it used under DOS.

  The Newcom ifx modem needs a small kernel patch to work correctly
  since its simulation of a serial port is non-standard.  The patch and
  other info for using this modem with Linux is at
  <http://maalox.pharmacy.ohio-state.edu/~ejolson/linux/newcom.html>.


  2.6.2.  Rockwell (RPI) Drivers

  Modems that require Rockwell RPI (Rockwell Protocol Interface) drivers
  can still be used with Linux even though the driver software works
  only under Windows.  This is because the Windows software which you
  don't have does only compression and error correction.  If you are
  willing to operate the modem without compression and error correction
  then it's feasible to use it with Linux.  To do this you will need to
  disable RPI by sending the modem (via the initialization string) a
  "RPI disable" command each time you power on your modem.  On my modem
  this command is +H0.  Not having data compression available may not be
  much of a handicap since most long files which you download from the
  Internet are already compressed and attempts at further compression
  may only slow things down a bit.


  3.  Modem Pools, Digital Modems

  A modem pool is a number of modems on the same card (such as a
  multiport modem card) or many modems in an external chassis (something
  like an external modem).  The modems may be analog modems similar to
  modems used for home/office PCs (can't send at 56k even if they are
  "56k modems").  They also could be "digital modems" which can send at
  56k.  By 56k I actually mean all speeds above 33.6k as the 56k modem
  can't quite do a true 56k speed.  The "digital modems" require a
  digital connection to the telephone line and don't use any serial
  ports at all.  All of these modem pools will require that you install
  special drivers for them.


  3.1.  Analog Modem Pools, Multiport Modem Cards

  These are just several (or more) analog modems (the common home/office
  modem) provided either on a plug-in card or in an external chassis.
  Each modem comes with a built-in serial port.  There is usually a
  system of sharing interrupts or of handling interrupts by their own
  electronics, thus removing much of the burden on the CPU.  Note that
  these modems are not "digital modems" and will thus not be able to use
  56k for people who dial-in.

  Here is a list of some companies that make multiport modem cards.  8
  modems/card is common.  The cards listed claim to work with Linux and
  the websites should point you to a driver for them.

  Multiport Modem Cards:

    MultiModemISI by Multi-Tech Systems.  56k or 33.6k, PCI or ISA, 4
     or 8 ports.  ISDN/56k hybrids.
     <http://www.multitech.com/products/>

    RAStel by Moreton Bay Products. 56k PCI or ISA, 4 or 8 ports.  Also
     2 modems + 2 vacant serial ports.
     <http://www.moretonbay.com.au/MBWEB/product/rastel/rastel.htm>

    RocketModem by Comtrol.  ISA 33.6k, 4 or 8 port.
     <http://www.comtrol.com/SALES/SPECS/Rmodem.htm>

    AccelePort (RAS Family) by Digi.
     <http:/www.dgii.com/digi.cfm?p=940564.pi.prd.00000046>


  3.2.  Digital Modems

  "digital modems" are much different than the analog modems that most
  people use in their PCs.  They require a digital connection to the
  telephone line and don't use serial ports for the interface to the
  computer.  Instead, they interface directly to the PC bus via a
  special card (which may also contain the "digital modems").  They are
  able to send at 56k, something no analog modem can do.  They are often
  a component of "remote access servers" or "digital modem pools"

  The cables from the phone company that carry digital signals have been
  designed for high bandwidth so that the same cable carries multiple
  telephone calls.  It's done by "time-division multiplexing".  So the
  first task to be done is to separate the phone calls and send each
  phone call to its own "digital modem".  There is also the task in the
  reverse direction of combining all of the calls onto a single line.
  These tasks are done by what is sometimes called a "...
  concentrator".

  The digital modem takes the digital signal from the telephone company
  and after processing it, puts it on the PC's bus (likely sending it to
  a buffer in memory).  Likewise, it handles sending digital signals in
  the opposite direction to a digital telephone line.  Thus it only
  makes digital-to-digital conversions and doesn't deal in analog at
  all.  It thus is not really a modem at all since it doesn't modulate
  any analog carrier.  So the name "digital modem" is a misnomer but it
  does do the job formerly done by modems.  Thus Some "serial modems"
  call themselves "digital signal processors", "remote access servers",
  etc. and may not even mention the word "modem".  This is technically
  correct terminology.

  Such a system may be a stand-alone proprietary server, a chassis
  containing digital modems that connects to a PC via a special
  interface card, or just a card itself.  Digi calls one such card a
  "remote access server concentrator adapter".   One incomplete
  description of what is needed to become an ISP is: See What do I need
  to be an ISP?.  Cyclades promotes their own products here so please do
  comparison shopping before buying anything.



  4.  Serial Port and Modem Basics

  You don't have to understand the basics to use and install a modem.
  But understanding it may help to determine what is wrong if you run
  into problems.  After reading this section, if you want to understand
  it even better you may want to see ``How Modems Work'' in this
  document (not yet complete).  More details on the serial port
  (including much of this section) will be found in Serial-HOWTO.


  4.1.  Modem Converts Digital to Analog (and conversely)

  Most all telephone main lines are digital already but the lines
  leading to your house (or business) are usually analog which means
  that they were designed to transmit a voltage wave which is an exact
  replica of the sound wave coming out of your mouth.  Such a voltage
  wave is called "analog".  If viewed on an oscilloscope it looks like a
  sine wave of varying frequency and amplitude.  A digital signal is
  like a square wave.  For example 3 v (volts) might be a 1-bit and 0 v
  could be a 0-bit.  For most serial ports (used by external modems) +12
  v is a 0-bit and -12 v is a 1-bit (some are + or - 5 v).

  To send data from your computer over the phone line, the modem takes
  the digital signal from your computer and converts it to "analog".  It
  does this by both creating an analog sine wave and then "MODulating"
  it.  Since the result still represents digital data, it could also be
  called a digital signal instead of analog.  But it looks something
  like an analog signal and almost everyone calls it analog.  At the
  other end of the phone line another modem "DEModulates" this signal
  and the pure digital signal is recovered.  Put together the "mod" and
  "dem" parts of the two words above and you get "modem" (if you drop
  one of the two d's).  A "modem" is thus a MODulator-DEModulator.  Just
  what modulation is may be found in the section ``Modulation Details''.



  4.2.  What is a Serial Port ?

  4.2.1.  Intro to Serial

  The serial port is an I/O (Input/Output) device.  Since modems have a
  serial port between them and the computer, it's necessary to
  understand the serial port as well as the modem.

  Most PC's have one or two serial ports.  Each has a 9-pin connector
  (sometimes 25-pin) on the back of the computer.  Computer programs can
  send data (bytes) to the transmit pin (output) and receive bytes from
  the receive pin (input).  The other pins are for control purposes and
  ground.

  The serial port is much more than just a connector.  It converts the
  data from parallel to serial and changes the electrical representation
  of the data.  Inside the computer, data bits flow in parallel (using
  many wires at the same time).  Serial flow is a stream of bits over a
  single wire (such as on the transmit or receive pin of the serial
  connector).  For the serial port to create such a flow, it must
  convert data from parallel (inside the computer) to serial on the
  transmit pin (and conversely).

  Most of the electronics of the serial port is found in a computer chip
  (or a section of a chip) known as a UART.  For more details on UARTs
  see the section ``What Are UARTs?  How Do They Affect Performance?''.
  But you may want to finish this section first so that you will
  hopefully understand how the UART fits into the overall scheme of
  things.


  4.2.2.  Pins and Wires

  Old PC's used 25 pin connectors but only about 9 pins were actually
  used so today most connectors are only 9-pin.  Each of the 9 pins
  usually connects to a wire.  Besides the two wires used for
  transmitting and receiving data, another pin (wire) is signal ground.
  The voltage on any wire is measured with respect to this ground.  Thus
  the minimum number of wires to use for 2-way transmission of data is
  3.  Except that it has been known to work with no signal ground wire
  but with degraded performance and sometimes with errors.

  There are still more wires which are for control purposes (signalling)
  only and not for sending bytes.  All of these signals could have been
  shared on a single wire, but instead, there is a separate dedicated
  wire for every type of signal.  Some (or all) of these control wires
  are called "modem control lines".  Modem control wires are either in
  the asserted state (on) of +12 volts or in the negated state (off) of
  -12 volts.  One of these wires is to signal the computer to stop
  sending bytes out the serial port cable.  Conversely, another wire
  signals the device attached to the serial port to stop sending bytes
  to the computer.  If the attached device is a modem, other wires may
  tell the modem to hang up the telephone line or tell the computer that
  a connection has been made or that the telephone line is ringing
  (someone is attempting to call in).  See the Serial-HOWTO: Pinout and
  Signals for more details.


  4.2.3.  Internal Modem Contains Serial Port

  For an internal modem there is no 9-pin connector but the behavior is
  almost exactly as if the above mentioned cable wires existed.  Instead
  of a a 12 volt signal in a wire giving the state of a modem control
  line, the internal modem may just use a status bit in its own memory
  (a register) to determine the state of this non-existent "wire".  The
  internal modem's serial port looks just like a real serial port to the
  computer.  It even includes the speed limits that one may set at
  ordinary serial ports such as 115200 bits/sec.  Unfortunately for
  Linux, many internal modems today don't work exactly this way but
  instead use software (running on the CPU) to do much of the modem's
  work.  Unfortunately, such software is often only available for the MS
  Windows OS (it hasn't been ported to Linux).  Thus you can't use most
  of these modems with Linux See ``Software (Internal) Modems''.



  4.3.  IO Address & IRQ

  Since the computer needs to communicate with each serial port, the
  operating system must know that each serial port exists and where it
  is (its I/O address).  It also needs to know which wire (IRQ number)
  the serial port must use to request service from the computer's CPU.
  It requests service by sending an interrupt on this wire.  Thus every
  serial port device must store in its non-volatile memory both its I/O
  address and its Interrupt ReQuest number: IRQ.  See ``Interrupts''.
  For the PCI bus it doesn't work exactly this way since the PCI bus has
  its own system of interrupts.  But since the PCI-aware BIOS sets up
  chips to map these PCI interrupts to IRQs, it seemingly behaves just
  as described above except that sharing of interrupts is allowed (2 or
  more devices may use the same IRQ number).

  I/O addresses are not the same as memory addresses.  When an I/O
  addresses is put onto the computer's address bus, another wire is
  energized.  This both tells main memory to ignore the address and
  tells all devices which have I/O addresses (such as the serial port)
  to listen to the address to see if it matches the device's.  If the
  address matches, then the I/O device reads the data on the data bus.


  4.4.  Names: ttyS0, ttyS1, etc.

  The serial ports are named ttyS0, ttyS1, etc. (and usually correspond
  respectively to COM1, COM2, etc. in DOS/Windows).  The /dev directory
  has a special file for each port.  Type "ls /dev/ttyS*" to see them.
  Just because there may be (for example) a ttyS3 file, doesn't
  necessarily mean that there exists a physical serial port there.

  Which one of these names (ttyS0, ttyS1, etc.) refers to which physical
  serial port is determined as follows.  The serial driver (software)
  maintains a table showing which I/O address corresponds to which ttyS.
  This mapping of names (such as ttyS1) to I/O addresses (and IRQ's) may
  be both set and viewed by the "setserial" command.  See ``What is
  Setserial''.  This does not set the I/O address and IRQ in the
  hardware itself (which is set by jumpers or by plug-and-play
  software).  Thus what physical port corresponds to say ttyS1 depends
  both on what the serial driver thinks (per setserial) and what is set
  in the hardware.  If a mistake has been made, the physical port may
  not correspond to any name (such as ttyS2) and thus it can't be used.
  See ``Serial Port Devices /dev/ttyS2, etc.'' for more details>


  4.5.  Interrupts


  Bytes come in over the phone line to the modem, are converted from
  analog to digital by the modem and passed along to the serial port on
  their way to their destination inside your computer.  When the serial
  port receives a number of bytes (may be set to 1, 4, 8, or 14) into
  its FIFO buffer, it signals the CPU to fetch them by sending an
  electrical signal known as an interrupt on a certain wire normally
  used only by that port.  Thus the FIFO waits for a number of bytes and
  then issues an interrupt.

  However, this interrupt will also be sent if there is an unexpected
  delay while waiting for the next byte to arrive (known as a timeout).
  Thus if the bytes are being received slowly (such as someone typing on
  a terminal keyboard) there may be an interrupt issued for every byte
  received.  For some UART chips the rule is like this: If 4 bytes in a
  row could have been received, but none of these 4 show up, then the
  port gives up waiting for more bytes and issues an interrupt to fetch
  the bytes currently in the FIFO.  Of course, if the FIFO is empty, no
  interrupt will be issued.

  Each interrupt conductor (inside the computer) has a number (IRQ) and
  the serial port must know which conductor to use to signal on.  For
  example, ttyS0 normally uses IRQ number 4 known as IRQ4 (or IRQ 4).  A
  list of them and more will be found in "man setserial" (search for
  "Configuring Serial Ports").  Interrupts are issued whenever the
  serial port needs to get the CPU's attention.  It's important to do
  this in a timely manner since the buffer inside the serial port can
  hold only 16 (1 in old serial ports) incoming bytes.  If the CPU fails
  to remove such received bytes promptly, then there will not be any
  space left for any more incoming bytes and the small buffer may
  overflow (overrun) resulting in a loss of data bytes.

  For an external modem, there is no way (such as flow control) to stop
  the flow rapidly enough to prevent this.  For an internal modem the
  16-byte FIFO buffer is on the same card and a good modem will not
  write to it if it's full.  Thus a good internal modem will not overrun
  the 16-byte buffers but it may need to use ``Modem-to-Modem Flow
  Control'' to prevent the modem itself from being overrun.  This is one
  advantage of an internal modem over an external.

  Interrupts are also issued when the serial port has just sent out all
  16 of its bytes from its small transmit buffer out the external cable.
  It then has space for 16 more outgoing bytes.  The interrupt is to
  notify the CPU of that fact so that it may put more bytes in the small
  transmit buffer to be transmitted.  Also, when a modem control line
  changes state an interrupt is issued.

  The buffers mentioned above are all hardware buffers.  The serial port
  also has large buffers in main memory.  This will be explained later

  Interrupts convey a lot of information but only indirectly.  The
  interrupt itself just tells a chip called the interrupt controller
  that a certain serial port needs attention.  The interrupt controller
  then signals the CPU.  The CPU runs a special program to service the
  serial port.  That program is called an interrupt service routine
  (part of the serial driver software).  It tries to find out what has
  happened at the serial port and then deals with the problem such a
  transferring bytes from (or to) the serial port's hardware buffer.
  This program can easily find out what has happened since the serial
  port has registers at IO addresses known to the the serial driver
  software.  These registers contain status information about the serial
  port.  The software reads these registers and by inspecting the
  contents, finds out what has happened and takes appropriate action.


  4.6.  Data Compression (by the Modem)

  Before continuing with the basics of the serial port, one needs to
  understand about something done by the modem: data compression.  In
  some cases this task is actually done by software run on the
  computer's CPU but unfortunately at present, such software only works
  for MS Windows.  The discussion here will be for the case where the
  modem itself does the compression since this is what must happen in
  order for the modem to work under Linux.

  In order to send data faster over the phone line, one may compress
  (encode it) using a custom encoding scheme which itself depends on the
  data.  The encoded data is smaller than the original (less bytes) and
  can be sent over the Internet in less time.  This process is called
  "data compression".

  If you download files from the Internet, they are likely already
  compressed and it is not feasible for the modem to try to compress
  them further.  Your modem may sense that what is passing thru has
  already been compressed and refrain from trying a compress it any
  more.  If you are receiving data which has been compressed by the
  other modem, your modem will decompress it and create many more bytes
  than were sent over the phone line.  Thus the flow of data from your
  modem into your computer will be higher than the flow over the phone
  line to you.  The ratio of this flow is called the compression ratio.
  Compression ratios as high as 4 are possible, but not very likely.


  4.7.  Error Correction

  Similar to data compression, modems may be set to do error correction.
  While there is some overhead cost involved which slows down the
  byte/sec flow rate, the fact that error correction strips off start
  and stop bits actually increases the data byte/sec flow rate.

  For the serial port's interface with the external world, each 8-bit
  byte has 2 extra bits added to it: a start-bit and a stop-bit.
  Without error correction, these extra start and stop bits usually go
  right thru the modem and out over the phone lines.  But when error
  correction is enabled, these extra bits are stripped off and the 8-bit
  bytes are put into packets.  This is more efficient and results in
  higher byte/sec flow in spite of the fact that there are a few more
  bytes added for packet headers and error correction purposes.


  4.8.  Data Flow (Speeds)

  Data (bytes representing letters, pictures, etc.) flows from your
  computer to your modem and then out on the telephone line (and
  conversely).  Flow rates (such as 56k (56000) bits/sec) are
  (incorrectly) called "speed".  But almost everyone says "speed"
  instead of "flow rate".  If there were no data compression the flow
  rate from the computer to the modem would be about the same as the
  flow rate over the telephone line.

  Actually there are two different speeds to consider at your end of the
  phone line:


    The speed on the phone line itself (DCE speed) modem-to-modem

    The speed from your computer's serial port to your modem (DTE
     speed)

  When you dial out and connect to another modem on the other end of the
  phone line, your modem often sends you a message like "CONNECT 28800"
  or "CONNECT 115200".  What do these mean?  Well, its either the DCE
  speed or the DTE speed. If it's higher than the advertised modem speed
  it must be the DTE modem-to-computer speed.  This is the case for the
  115200 speed shown above.  The 28800 must be a DCE (modem-to-modem)
  speed since the serial port has no such speed.  One may configure the
  modem to report either speed.  Some modems report both speeds and
  report the modem-to-modem speed as (for example): CARRIER 28800.

  If you have an internal modem you would not expect that there would be
  any speed limit on the DTE speed from your modem to your computer
  since you modem is inside your computer and is almost part of your
  computer.  But there is since the modem contains a dedicated serial
  port within it.

  It's important to understand that the average speed is often less than
  the specified speed, especially on the short DTE computer-to-modem
  line.  Waits (or idle time) result in a lower average speed.  These
  waits may include long waits of perhaps a second due to ``Flow
  Control''.  At the other extreme there may be very short waits (idle
  time) of several micro-seconds separating the end of one byte and the
  start of the next byte.  In addition, modems will fallback to lower
  speeds if the telephone line conditions are less than pristine.

  For a discussion of what DTE speed is best to use see section ``What
  Speed Should I Use''.



  4.9.  Flow Control

  Flow control means the ability to stop the flow of bytes in a wire.
  It also includes provisions to restart the flow without any loss of
  bytes.  Flow control is needed for modems to allow a jump in
  instantaneous flow rates.


  4.9.1.  Example of Flow Control

  For example, consider the case where you connect a 36.6k external
  modem via a short cable to your serial port.  The modem sends and
  receives bytes over the phone line at  36.6k bits per second (bps).
  It's not doing any data compression or error correction.  You have set
  the serial port speed to 115,200 bits/sec (bps), and you are sending
  data from your computer to the phone line.  Then the flow from the
  your computer to your modem over the short cable is at 115.2k bps.
  However the flow from your modem out the phone line is only 33.6k bps.
  Since a faster flow (115.2k) is going into your modem than is coming
  out of it, the modem is storing the excess flow (115.2k -33.6k = 81.6k
  bps) in one of its buffers.  This buffer would eventually overrun (run
  out of free storage space) unless the 115.2k flow is stopped.

  But now flow control comes to the rescue.  When the modem's buffer is
  almost full, the modem sends a stop signal to the serial port.  The
  serial port passes on the stop signal on to the device driver and the
  115.2k bps flow is halted.  Then the modem continues to send out data
  at 33.6k bps drawing on the data it previous accumulated in its
  buffer.  Since nothing is coming into the buffer, the level of bytes
  in it starts to drop.  When almost no bytes are left in the buffer,
  the modem sends a start signal to the serial port and the 115.2k flow
  from the computer to the modem resumes.  In effect, flow control
  creates an average flow rate in the short cable (in this case 33.6k)
  which is significantly less than the "on" flow rate of 115.2k bps.
  This is "start-stop" flow control.

  The above is a simple example of flow control for flow from the
  computer to a modem , but there is also flow control which is used for
  the opposite direction of flow: from a modem (or other device) to a
  computer.  Each direction of flow involve 3 buffers: 1. in the modem
  2. in the UART chip (called FIFOs) 3. in main memory managed by the
  serial driver.  Flow control protects certain buffers from
  overflowing.  The small UART FIFO buffers are not protected in this
  way but rely instead on a fast response to the interrupts they issue.
  FIFO stand for "First In, First Out" which is the way it handles
  bytes.  All the 3 buffers use the FIFO rule but only one of them also
  uses it as a name.  This is the essence of flow control but there are
  still some more details.

  You don't often need flow control in the direction from the modem to a
  PC.  For complex example of a case where it's needed see "Complex Flow
  Control Example" in the Serial-HOWTO.  But if you don't have a high
  enough speed set between the modem and the computer (serial port
  speed) then you do need to slow down the flow from the modem to the
  PC.  To do this you must stop the incoming flow of bytes over the
  telephone line.   Your modem must tell the other modem to stop
  sending.  See ``Modem-to-Modem Flow Control''



  4.9.2.  Hardware vs. Software Flow Control

  If feasible it's best to use "hardware" flow control that uses two
  dedicated "modem control" wires to send the "stop" and "start"
  signals.  Modern modems almost always use hardware flow control
  between the modem and the serial port.

  Software flow control uses the main receive and transmit wires to send
  the start and stop signals.  It uses the ASCII control characters DC1
  (start) and DC3 (stop) for this purpose.  They are just inserted into
  the regular stream of data.  Software flow control is not only slower
  in reacting but also does not allow the sending of binary data unless
  special precautions are taken.  Since binary data will likely contain
  DC1 and DC3, special means must be taken to distinguish between a DC3
  that means a flow control stop and a DC3 that is part of the binary
  code.  Likewise for DC1.  To get software flow control to work for
  binary data requires both modem (hardware) and software support


  4.9.3.  Symptoms of No Flow Control

  Understanding flow-control theory can be of practical use.  For
  example I used my modem to access the Internet and it seemed to work
  fine.  But after a few months I tried to send long files from my PC to
  an ISP and a huge amount of retries and errors resulted (but
  eventually Kermit could send a long file after many retries).
  Receiving in the other direction (from my ISP to me) worked fine.  The
  problem turned out to be a hardware defect in my modem that had
  resulted in disabling flow control.  My modem's buffer was overflowing
  (overrunning) on long outgoing files since no "stop" signal was ever
  sent to the computer to halt sending to the modem.  There was no
  problem in the direction from the modem to my computer since the
  capacity (say 115.2k) was always higher than the flow over the
  telephone line.  The fix was to enable flow control by putting into
  the init string an enable-flow-control command for the modem (It
  should have been enabled by default but something was wrong).


  4.9.4.  Modem-to-Modem Flow Control

  This is the flow control of the data sent over the telephone lines
  between two modems.  Practically speaking, it only exists when you
  have error correction enabled.  Actually, even without error
  correction it's possible to enable software flow control between
  modems but it may interfere with sending binary data so it's not often
  used.


  4.10.  Data Flow Path; Buffers

  Although much has been explained about this including flow control, a
  pair of 16-byte FIFO buffers (in the hardware), and a pair of larger
  buffers inside a modem there is still another pair of buffers.  These
  are large buffers (perhaps 8k) in main memory also known as serial
  port buffers.  When an application program sends bytes to the serial
  port (and modem) they first get stashed in the the transmit serial
  port buffer in main memory.  The pair consists of both this transmit
  buffer and a receive buffer for the opposite direction of byte-flow.

  The serial device driver takes out say 16 bytes from this transmit
  buffer, one byte at a time and puts them into the 16-byte transmit
  buffer in the serial hardware for transmission.  Once in that transmit
  buffer, there is no way to stop them from being transmitted.  They are
  then transmitted to the modem which also has a fair sized (say 1k)
  buffer.  When the device driver (on orders from flow control) stops
  the flow of outgoing bytes from the computer, what it actually stops
  is the flow of outgoing bytes from the large transmit buffer in main
  memory.  Even after this has happened and the flow to the modem has
  stopped, an application program may keep sending bytes to the 8k
  transmit buffer until it becomes fill.

  When it gets fill, the application program can't send any more bytes
  to it (a "write" statement in a C_program blocks) and the application
  program temporarily stops running and waits until some buffer space
  becomes available.  Thus a flow control "stop" is ultimately able to
  stop the program that is sending the bytes.  Even though this program
  stops, the computer does not necessarily stop computing.  It may
  switch to running other processes while it's waiting at a flow control
  stop.  The above was a little oversimplified since there is another
  alternative of having the application program itself do something else
  while it is waiting to "write".


  4.11.  Modem Commands

  Commands to the modem are sent to it from the communication software
  over the same conductor as used to send data.  The commands are short
  ASCII strings.  Examples are "AT&K3" for enabling hardware flow
  control (RTS/CTS) between your computer and modem; and "ATDT5393401
  for Dialing the number 5393401.  Note all commands are prefaced by
  "AT".   Some commands such as enabling flow control help configure the
  modem.  Other commands such as dialing a number actually do something.
  There are about a hundred or so different possible commands.  When
  your communication software starts running, it first sends an "init"
  string of commands to the modem to configure it.  All commands are
  sent on the ordinary data line before the modem dials (or receives a
  call).

  Once the modem is connected to another modem (on-line mode),
  everything that is sent from your computer to your modem goes directly
  to the other modem and is not interpreted by the modem as a command.
  There is a way to "escape" from this mode of operation and go back to
  command mode where everything sent to the modem will be interpreted as
  a command.  The computer just sends "+++" with a specified time
  spacing before and after it.  If this time spacing is correct, the
  modem reverts to command mode.  Another way to do this is by a signal
  on a certain modem control line.

  There are a number of lists of modem commands on the Internet.  The
  section ``Web Sites'' has links to a couple of such web-sites.
  Different models and brands of modems do not use exactly the same set
  of such commands.  So what works for one modem might not work for
  another.  Some common command (not guaranteed to work on all modems)
  are listed in this HOWTO in the section ``Modem Configuration''



  4.12.  Serial Software: Device Driver Module

  The device driver for the serial port is the software that operates
  the serial port.  It is now provided as a serial module.  This module
  will normally get loaded automatically if it's needed.  The kernel 2.2
  + will do this.  In earlier kernels, you had to have kerneld running
  in order to do auto-load modules on demand.  Otherwise the serial
  module needed to be explicitly listed in /etc/modules.  Before modules
  became popular with Linux, the serial driver was usually built into
  the kernel.  If it's still built into the kernel (you might have
  selected this when you compiled the kernel) don't let the serial
  module load.  If you do and wind up with two serial drivers, it's
  reported that you can't use the serial ports and get an "I/O error" if
  an attempt is made to open them.

  When the serial module is loaded it displays a message on the screen
  about the existing serial ports (often showing a wrong IRQ).  But once
  the module is used by setserial to tell the device driver the
  (hopefully) correct IRQ then you should see a second display similar
  to the first but with the correct IRQ, etc. See ``What is Setserial''
  for more info on setserial. )

  One may modify the driver by editing the kernel source code.  Much of
  the serial driver is found in the file serial.c.  For details
  regarding writing of programs for the serial port see Serial-
  Programming-HOWTO (currently being revised by Vern Hoxie).



  5.  Configuring Overview

  If you want to use a modem only for MS Windows/Dos, then you can just
  install almost any modem and it will work OK.  With a Linux PC it's
  not usually this easy unless you use an external modem.  All external
  modems should work OK (even if they are labeled "Plug and Play")  But
  most new internal modems are Plug-and-Play (PnP) and have PnP serial
  ports.  If it's an ISA modem may need to use the Linux "isapnp"
  program to configure these PnP serial ports.  See the Plug-and-Play-
  HOWTO for more information.

  Since each modem has an associated serial port there are two parts to
  configuring a modem:


    Configuring the modem itself: Done by the communication program

    Configuring the modem's serial port: Done only *partly* by the
     communication program

  Most of the above configuring (but not necessarily most of the effort)
  is done by the communication program that you use with the modem such
  as minicom, seyon, wvdial (for PPP).  If you use the modem for dial-
  in, then the getty program which you use to present outsiders with a
  login-prompt, will help configure.  Thus to configure the modem (and
  much of the serial port) you need to configure the communication
  program (such as the PPP dialer or getty).

  Unfortunately the above configuring doesn't do the low-level
  configuring of the serial port: setting its IO address and IRQ in both
  the hardware and the driver.  If you are lucky, this will happen
  automatically when you boot Linux.  Setting these in the hardware was
  formerly done by jumpers but today it's done by "Plug-and-Play"
  software.

  But there's a serious problem: Linux (as of late 1999) is not a Plug-
  and-Play operating system but it does have Plug-and-Play tools which
  you may use to set up the configuration although they are not always
  very user friendly.  This may create a difficult problem for you.  The
  next section will go into this in much more detail.


  6.  Configuring the Serial Port

  6.1.  PCI Bus Support Underway

  The kernel 2.2 serial driver contains no special support for the PCI
  bus.  But kernels 2.3 and 2.4 will eventually support some PCI serial
  cards (and modem cards).  Many PCI cards need special support in the
  driver.  The driver will read the id number digitally stored on the
  card to determine how (or if) to support the card.  If you have a PCI
  card which you are convinced is not a winmodem but it will not work,
  you can help in attempting to create a driver for it.  To do this
  you'll need to contact the maintainer of the serial driver, Theodore
  (Ted) Y. Ts'o.  But first check out the modem list site
  <http://www.o2.net/~gromitkc/winmodem.html> for the latest info on PCI
  modems and related topic.

  You will need to email Ted Ts'o a copy of the output of "lspci -vv"
  with full information about the model and manufacturer of the PCI
  modem (or serial port).  Then he will try to point you to a test
  driver which might work for it.  You will then need to get it, compile
  it and possibly recompile your kernel.  Then you will test the driver
  to see if it works OK for you and report the results to Ted Ts'o.  If
  you are willing to do all the above (and this is the latest version of
  this HOWTO) then email the needed info to him at:
  <mailto:tytso@mit.edu>.

  PCI modems are not well standardized.  Some use main memory for
  communication with the PC.  It you see 8-digit hexadecimal addresses
  it's not likely to work with Linux.  Some require special enabling of
  the IRQ.  The output of "lspci" can help determine if one can be
  supported.  If you see a 4-digit IO port and no long memory address,
  the modem might work by just telling "setserial" the IO port and the
  IRQ.  Some people have gotten a 3COM 3CP5610 PCI Modem to work that
  way.


  6.2.  Configuring Overview

  In many cases, configuring will happen automatically and you have
  nothing to do.  But sometimes you need to configure (or just want to
  check out the configuration).  If so, first you need to know about the
  two parts to configuring the serial port under Linux:

  The first part (low-level configuring) is assigning it an IO address,
  IRQ, and name (such as ttyS2).  This IO-IRQ pair must be set in both
  the hardware and told to the serial driver.  We might just call this
  "io-irq" configuring for short.  The setserial is used to tell the
  driver.  PnP methods, jumpers, etc, are used to set the hardware.
  Details will be supplied later.  If you need to configure but don't
  understand certain details it's easy to get into trouble.

  The second part (high-level configuring) is assigning it a speed (such
  as 38.4k bits/sec), selecting flow control, etc.  This is often done
  by communication programs such as PPP, minicom, or by getty (which you
  may run on the port so that others may log into your computer).
  However you will need to tell these programs what speed you want, etc.
  by using a menu or a configuration file.  This high-level configuring
  may also be done with the stty program.  stty is also useful to view
  the current status if you're having problems.  See also the Serial-
  HOWTO section: "Stty".  When Linux starts, some effort is made to
  detect and configure (low-level) a few serial ports.  Exactly what
  happens depends on your BIOS, hardware, Linux distribution, etc.  If
  the serial ports work OK, there may be no need for you to do any
  configuring.  Application programs often do the high-level configuring
  but you may need to supply them with the required information.  With
  Plug-and-Play serial ports (often built into an internal modem), the
  situation has become more complex.  Here are cases when you need to do
  low-level configuring (set IRQ and IO addresses):


    Plan to use more than 2 serial ports

    Installing a new serial port (such as an internal modem)

    Having problems with serial port(s)

  For kernel 2.2+ you may be able to use more that 2 serial ports
  without low-level configuring by sharing interrupts.  This only works
  if the serial hardware supports it and may be no easier than low-level
  configuring.  See ``Interrupt sharing and Kernels 2.2+''
  The low-level configuring (setting the IRQ and IO address) seems to
  cause people more trouble (than high-level), although for many it's
  fully automatic and there is no configuring to be done.  Thus most all
  of this section is on that topic.  Until the serial driver knows the
  correct IRQ and IO address the port will not work at all.  It may not
  even be found by Linux.  Even if it can be found, it may work
  extremely slow if the IRQ is wrong.  See ``Extremely Slow: Text
  appears on the screen slowly after long delays''.

  In the Wintel world, the IO address and IRQ are called "resources" and
  we are thus configuring certain resources.  But there are many other
  types of "resources" so the term has many other meanings.  In review,
  the low-level configuring consists of putting two values (an IRQ
  number and IO address) into two places:


  1. the device driver (often by running "setserial" at boot-time)

  2. memory registers of the serial port hardware itself

  You may watch the start-up (= boot-time) messages.  They are usually
  correct.  But if you're having problems, there's a good chance that
  some of these messages don't show the true configuration of the
  hardware (and they are not supposed to).  See ``I/O Address & IRQ:
  Boot-time messages''.


  6.3.  Common mistakes made re low-level configuring

  Here are some common mistakes people make:

    setserial command: They run it (without the "autoconfig" option)
     and think it has checked out the hardware (it hasn't).

    setserial messages:  They see them displayed on the screen at boot-
     time, and erroneously think that the result shows how their
     hardware is actually configured.

    /proc/interrupts: When their serial device isn't in use they don't
     see its interrupt there, and erroneously conclude that their serial
     port can't be found (or doesn't have an interrupt set).

    /proc/ioports: People think this shows the hardware configuration
     when it only shows about the same data (possibly erroneous) as
     setserial.


  6.4.  I/O Address & IRQ: Boot-time messages

  In many cases your ports will automatically get low-level configured
  at boot-time (but not always correctly).  To see what is happening,
  look at the start-up messages on the screen.  Don't neglect to check
  the messages from the BIOS before Linux is loaded (no examples shown
  here).  These BIOS messages may be frozen by pressing the Pause key.
  Use Shift-PageUp to go back to all the messages after they have flash
  by.  Shift-PageDown will scroll in the opposite direction.  The dmesg
  command may be used at any time to view some of the messages but it
  often misses important ones.  Here's an example of the start-up
  messages (as of mid 1999).  Note that ttyS00 is the same as
  /dev/ttyS0.



  At first you see what was detected (but the irq is only a wild guess):

  Serial driver version 4.27 with no serial options enabled
  ttyS00 at 0x03f8 (irq = 4) is a 16550A
  ttyS01 at 0x02f8 (irq = 3) is a 16550A
  ttyS02 at 0x03e8 (irq = 4) is a 16550A

  Later you see what was saved, but it's not necessarily correct either:

  Loading the saved-state of the serial devices...
  /dev/ttyS0 at 0x03f8 (irq = 4) is a 16550A
  /dev/ttyS1 at 0x02f8 (irq = 3) is a 16550A
  /dev/ttyS2 at 0x03e8 (irq = 5) is a 16550A



  Note that there is a slight disagreement: The first message shows
  ttyS2 at irq=4 while the second shows it at irq=5.  Your may only have
  the first message.  In most cases the last message is the correct one.
  But if your having trouble it may be misleading.  Before reading the
  explanation of all of this complexity in the rest of this section, you
  might just try using your serial port and see if it works OK.  If so
  it may not be essential to read further.

  The second message is from the setserial program being run at boot-
  time.  It shows what the device driver thinks is the correct
  configuration.  But this too could be wrong.  For example, the irq
  could actually be set to irq=8 in the hardware (both messages wrong).
  The irq=5 could be there because someone incorrectly put this into a
  configuration file (or the like).  The fact that Linux sometimes gets
  IRQs wrong is because it doesn't probe for IRQs.  It just assumes the
  "standard" ones (first message) or accepts what you told it when you
  configured it (second message).  Neither of these is necessarily
  correct.  If the serial driver has the wrong IRQ the serial port is
  very slow or doesn't seem to work at all.

  The first message is a result of Linux probing the serial ports but it
  doesn't probe for IRQs.  If a port shows up here it exists but the IRQ
  may be wrong.  Linux doesn't check IRQs because doing so is not
  foolproof.  It just assumes the IRQs are as shown because they are the
  "standard" values.  Your may check them manually with setserial using
  the autoconfig and auto_irq options but this isn't guaranteed to be
  correct.

  The data shown by the BIOS messages (which you see at first) is what
  is set in the hardware.  If your serial port is Plug-and-Play PnP then
  it's possible that the isapnp will run and change these settings.
  Look for messages about this after Linux starts.  The last serial port
  message shown in the example above should agree with the BIOS messages
  (as possibly modified by isapnp).  If they don't agree then you either
  need to change the setting in the port hardware or use setserial to
  tell the driver what is actually set in the hardware.

  Also, if you have Plug-and-Play (PnP) serial ports, Linux will not
  find them unless the IRQ and IO has been set inside the hardware by
  Plug-and-Play software.  This is a common reason why the start-up
  messages do not show a serial port that physically exists.  The PC
  hardware (a PnP BIOS) may automatically low-level configure this.  PnP
  configuring will be explained later.


  6.5.  What is the current IO address and IRQ of my Serial Port ?

  The previous section indicated how to attempt to do this by looking at
  the start-up messages.  If they give you sufficient info then you may
  not need to read this section.  If they don't then there are some
  other ways to look into this.

  There are really two answers to the question "What is my IO and IRQ?"
  1. What the device driver thinks has been set (This is what setserial
  usually sets and shows).  2. What is actually set in the hardware.
  They both should be the same.  If they're not it spells trouble since
  the driver has incorrect info on the physical serial port.  If the
  driver has the wrong IO address it will try to send data to a non-
  existing serial port --or even worse, to an actual device that is not
  a serial port.  If it has the wrong IRQ the driver will not get
  interrupt service requests from the serial port, resulting in a very
  slow or no response.  See ``Extremely Slow: Text appears on the screen
  slowly after long delays''.  If it has the wrong model of UART there
  is also apt to be trouble.  To determine if both I0-IRQ pairs are
  identical you must find out how they are set in both the driver and
  the hardware.


  6.5.1.  What does the device driver think?

  This is easy to find out.  Just look at the start-up messages or type
  "setserial -g /dev/ttyS*".   If everything works OK then what it tells
  you is likely also set in the hardware.  There are some other ways to
  find this info by looking at "files" in the /proc directory.  An
  important reason for understanding these other ways is to warn you
  that they only show what the device driver thinks.  Some people view
  certain "files" in the /proc directory and erroneously think that what
  they see is set in the hardware but "it ain't necessarily so".

  /proc/ioports will show the IO addresses that the drivers are using.
  /proc/interrupts shows the IRQs that are used by drivers of currently
  running processes (that have devices open).  It shows how many
  interrupts have actually be issued.  /proc/tty/driver/serial shows
  most of the above, plus the number of bytes that have been received
  and sent (even if the device is not now open).

  Note that for the IO addresses and IRQ assignments, you are only
  seeing what the driver thinks and not necessarily what is actually set
  in the hardware.  The data on the actual number of interrupts issued
  and bytes processed is real however.  If you see a large number of
  interrupts and/or bytes then it probably means that the device is (or
  was in the case of bytes) working.  If there are no bytes received
  (rx:0) but bytes were transmitted (tx:3749 for example), then only one
  direction of flow is working (or being utilized).

  Sometimes a showing of just a few interrupts doesn't mean that the
  interrupt is actually being physically generated by any serial port.
  Thus if you see almost no interrupts for a port that you're trying to
  use, that interrupt might not be set in the hardware and it implies
  that the driver is using the wrong interrupt.  To view
  /proc/interrupts to check on a program that you're currently running
  (such as "minicom") you need to keep the program running while you
  view it.  To do this, try to jump to a shell without exiting the
  program.


  6.5.2.  What is set in my serial port hardware ?

  How do you find out what IO address and IRQ are actually set in the
  device hardware?  Perhaps the BIOS messages will tell you some info
  before Linux starts booting.  Use the shift-PageUp key to step back
  thru the boot-time messages and look at the very first ones which are
  from the BIOS.  This is how it was before Linux started.  Setserial
  can't change it but isapnp or pciutils can.

  One crude method is try probing with setserial using the "autoconfig"
  option.  You'll need to guess the addresses to probe at.  See ``What
  is Setserial''.  For a PCI serial port, use the "lspci" command (for
  kernels <2.2 look at /proc/pci).  If your serial port is is Plug-and-
  Play see the next two subsections.

  For a port set with jumpers, its how the jumpers were set.  If the
  port is not Plug-and-Play (PnP) but has been setup by using a DOS
  program then it's set at whatever the person who ran that program set
  it to.


  6.5.3.  What is set in my PnP serial port hardware ?

  PnP ports don't store their configuration in the hardware when the
  power is turned off.  This is in contrast to Jumpers (non-PnP) which
  remain the same with the power off.  If you have an ISA PnP port, it
  can reach a state where it doesn't have any IO address or IRQ and is
  in effect disabled.  It should still be possible to find the port
  using the pnpdump program.

  For Plug-and-Play (PnP) on the ISA bus one may try the pnpdump program
  (part of isapnptools).  If you use the --dumpregs option then it
  should tell you the actual IO address and IRQ set in the port.  The
  address it "trys" is not the device's IO address, but a special

  For PnP ports checking on how it's configured under DOS/Windows may
  not be of much help.  Windows stores its configuration info in its
  Registry which is not used by Linux.  It may supply the BIOS's non-
  volatile memory with some info but it may not be kept in sync with the
  current Window configuration in the Registry ??  If you let a PnP BIOS
  automatically do the configuring when you start Linux (and have told
  the BIOS that you don't have a PnP operating system when running
  Linux) then Linux should use whatever configuration is in the BIOS's
  non-volatile memory.


  6.6.  Choosing Serial IRQs

  If you have a true Plug-and-Play set up where either the OS or a PnP
  BIOS configures all your devices, then you don't choose your IRQs.
  PnP determines what it thinks is best and assigns them.  But if you
  use the tools in Linux for Plug-and-Play (isapnp and pcitools) then
  you have to choose.  If you already know what IRQ you want to use you
  could skip this section except that you may want to know that IRQ 0
  has a special use (see the following paragraph).


  6.6.1.  IRQ 0 is not an IRQ

  While IRQ 0 is actually the timer (in hardware) it has a special
  meaning for setting a serial port with setserial.  It tells the driver
  that there is no interrupt for the port and the driver then will use
  polling methods.  This is quite inefficient but can be tried if there
  is an interrupt conflict or mis-set interrupt.  The advantage of
  assigning this is that you don't need to know what interrupt is set in
  the hardware.  It should be used only as a temporary expedient until
  you are able to find a real interrupt to use.


  6.6.2.  Interrupt sharing and Kernels 2.2+

  The general rule is that every device should use a unique IRQ and not
  share them.  But there are situations where sharing is permitted such
  as with most multi-port boards.  Even when it is permitted, it may not
  be as efficient since every time a shared interrupt is given a check
  must be made to determine where it came from.  Thus if it's feasible,
  it's nice to allocate every device its own interrupt.

  Prior to kernel 2.2, serial IRQs could be shared with each other only
  for most multiport boards.  Starting with kernel 2.2 serial IRQs may
  be sometimes shared between all serial ports.  In order for sharing to
  work in 2.2 the kernel must have been compiled with
  CONFIG_SERIAL_SHARE_IRQ, and the serial port hardware must support
  sharing (so that if two serial cards put different voltages on the
  same interrupt wire, only the voltage that means "this is an
  interrupt" will prevail).  Thus even if you have 2.2, it may be best
  to avoid sharing.


  6.6.3.  What IRQs to choose?

  The serial hardware often has only a limited number of IRQs it can be
  set at.  Also you don't want IRQ conflicts.  So there may not be much
  of a choice.  Your PC may normally come with ttyS0 and ttyS2 at IRQ 4,
  and ttyS1 and ttyS3 at IRQ 3.  Looking at /proc/interrupts will show
  which IRQs are being used by programs currently running.  You likely
  don't want to use one of these.  Before IRQ 5 was used for sound
  cards, it was often used for a serial port.

  Here is how Greg (original author of Serial-HOWTO) set his up in
  /etc/rc.d/rc.serial.  rc.serial is a file (shell script) which runs at
  start-up (it may have a different name of location).  For versions of
  "setserial" after 2.15 it's not always done this way anymore but this
  example does show the choice of IRQs.



       /sbin/setserial /dev/ttyS0 irq 3        # my serial mouse
       /sbin/setserial /dev/ttyS1 irq 4        # my Wyse dumb terminal
       /sbin/setserial /dev/ttyS2 irq 5        # my Zoom modem
       /sbin/setserial /dev/ttyS3 irq 9        # my USR modem



  Standard IRQ assignments:

          IRQ  0    Timer channel 0 (May mean "no interrupt".  See below.)
          IRQ  1    Keyboard
          IRQ  2    Cascade for controller 2
          IRQ  3    Serial port 2
          IRQ  4    Serial port 1
          IRQ  5    Parallel port 2, Sound card
          IRQ  6    Floppy diskette
          IRQ  7    Parallel port 1
          IRQ  8    Real-time clock
          IRQ  9    Redirected to IRQ2
          IRQ 10    not assigned
          IRQ 11    not assigned
          IRQ 12    not assigned
          IRQ 13    Math coprocessor
          IRQ 14    Hard disk controller 1
          IRQ 15    Hard disk controller 2



  There is really no Right Thing to do when choosing interrupts.  Just
  make sure it isn't being used by the motherboard, or any other boards.
  2, 3, 4, 5, 7, 10, 11, 12 or 15 are possible choices.  Note that IRQ 2
  is the same as IRQ 9.  You can call it either 2 or 9, the serial
  driver is very understanding.  If you have a very old serial board it
  may not be able to use IRQs 8 and above.

  Make sure you don't use IRQs 1, 6, 8, 13 or 14!  These are used by
  your motherboard.  You will make her very unhappy by taking her IRQs.
  When you are done, double-check /proc/interrupts when programs that
  use interrupts are being run and make sure there are no conflicts.


  6.7.  Choosing Addresses --Video card conflict with ttyS3

  The IO address of the IBM 8514 video board (and others like it) is
  allegedly 0x?2e8 where ? is 2, 4, 8, or 9.  This may conflict with the
  IO address of ttyS3 at 0x02e8.  Your may think that this shouldn't
  happen since the addresses are different in the high order digit (the
  leading 0 in 02e8).  You're right, but a poorly designed serial port
  may ignore the high order digit and respond to any address that ends
  in 2e8.  That is bad news if you try to use ttyS3 at this IO address.

  In most cases you should use the default addresses if feasible.
  Addresses shown represent the first address of an 8-byte range.  For
  example 3f8 is really the range 3f8-3ff.  Each serial device (as well
  as other types of devices that use IO addresses) needs its own unique
  address range.  There should be no overlaps (conflicts).  Here are the
  default addresses for commonly used serial ports:



       ttyS0 address 0x3f8
       ttyS1 address 0x2f8
       ttyS2 address 0x3e8
       ttyS3 address 0x2e8



  Suppose there is an address conflict (as reported by setserial -g
  /dev/ttyS*) between a real serial port and another port which does not
  physically exist (and shows UART: unknown).  Such a conflict shouldn't
  cause problems but it sometimes does in older kernels.  To avoid this
  problem don't permit such address conflicts or delete /dev/ttyS? if it
  doesn't physically exist.


  6.8.  Set IO Address & IRQ in the hardware (mostly for PnP)

  After it's set in the hardware don't forget to insure that it also
  gets set in the driver by using setserial.  For non-PnP serial ports
  they are either set in hardware by jumpers or by running a DOS program
  ("jumperless") to set them (it may disable PnP).  The rest of this
  subsection is only for PnP serial ports.  Here's a list of the
  possible methods of configuring PnP serial ports:


    Using a PnP BIOS CMOS setup menu (usually only for external modems
     on ttyS0 (Com1) and ttyS1 (Com2))

    Letting a PnP BIOS automatically configure a PnP serial port See
     ``Using a PnP BIOS to I0-IRQ Configure''

    Doing nothing if you have both a PnP serial port and a PnP Linux
     operating system (see Plug-and-Play-HOWTO).

    Using isapnp for a PnP serial port non-PCI)


    Using pciutils (pcitools) for the PCI bus

  The IO address and IRQ must be set (by PnP) in their registers each
  time the system is powered on since PnP hardware doesn't remember how
  it was set when the power is shut off.  A simple way to do this is to
  let a PnP BIOS know that you don't have a PnP OS and the BIOS will
  automatically do this each time you start.  This might cause problems
  in Windows (which is a PnP OS) if you start Windows with the BIOS
  thinking that Windows is not a PnP OS.  See Plug-and-Play-HOWTO.

  Plug-and-Play was designed to automate this io-irq configuring, but
  for Linux at present, it has made life more complicated.  The standard
  kernels for Linux don't support plug-and-play very well.  If you use a
  patch to the Linux kernel to covert it to a plug-and-play operating
  system, then all of the above should be handled automatically by the
  OS.  But when you want to use this to automate configuring devices
  other that the serial port, you may find that you'll still have to
  configure the drivers manually since many Linux drivers are not
  written to support a Linux PnP OS.  If you use isapnptools or the BIOS
  for configuring plug-and-play this will only put the two values into
  the registers of the serial port section of the modem card and you
  will likely still need to set up setserial.  None of this is easy or
  very well documented as of early 1999.  See Plug-and-Play-HOWTO and
  the isapnptools FAQ.


  6.8.1.  Using a PnP BIOS to I0-IRQ Configure

  While the explanation of how to use a PnP OS or isapnp for io-irq
  configuring should come with such software, this is not the case if
  you want to let a PnP BIOS do such configuring.  Not all PnP BIOS can
  do this.  The BIOS usually has a CMOS menu for setting up the first
  two serial ports.  This menu may be hard to find and for an "Award"
  BIOS it was found under "chipset features setup"  There is often
  little to choose from.  Unless otherwise indicated in a menu, these
  first two ports normally get set at the standard IO addresses and
  IRQs.  See ``Serial Port Device Names & Numbers''

  Whether you like it or not, when you start up a PC a PnP BIOS starts
  to do PnP (io-irq) configuring of hardware devices.  It may do the job
  partially and turn the rest over to a PnP OS (which you probably don't
  have) or if thinks you don't have a PnP OS it may fully configure all
  the PnP devices but not configure the device drivers.  This is what
  you want but it's not always easy to figure out exactly what the PnP
  BIOS has done.

  If you tell the BIOS that you don't have a PnP OS, then the PnP BIOS
  should do the configuring of all PnP serial ports --not just the first
  two.  An indirect way to control what the BIOS does (if you have
  Windows 9x on the same PC) is to "force" a configuration under
  Windows.  See Plug-and-Play-HOWTO and search for "forced".  It's
  easier to use the CMOS BIOS menu which may override what you "forced"
  under Windows.  There could be a BIOS option that can set or disable
  this "override" capability.

  If you add a new PnP device, the BIOS should change its PnP
  configuration to accommodate it.  It could even change the io-irq of
  existing devices if required to avoid any conflicts.  For this
  purpose, it keeps a list of non-PnP devices provided that you have
  told the BIOS how these non-PnP devices are io-irq configured.  One
  way to tell the BIOS this is by running a program called ICU under
  DOS/Windows.

  But how do you find out what the BIOS has done so that you set up the
  device drivers with this info?  The BIOS itself may provide some info,
  either in its setup menus of via messages on the screen when you turn
  on your computer.  See ``What is set in my serial port hardware?''

  6.9.  Giving the IRQ and IO Address to Setserial

  Once you've set the IRQ and IO address in the hardware (or arranged
  for it to be done by PnP) you also need to insure that the "setserial"
  command is run each time you start Linux.  See the subsection ``Boot-
  time Configuration''



  6.10.  Other Configuring

  6.10.1.  Configuring Hardware Flow Control (RTS/CTS)

  See ``Flow Control'' for an explanation of it.  You should always use
  hardware flow control if possible.  Your communication program or
  "getty" should have an option for setting it (and if you're in luck it
  might be enabled by default).  It needs to be set both inside your
  modem (by an init string or default) and in the device driver.  Your
  communication program should set both of these (if you configure it
  right).

  If none of the above will fully enable hardware flow control.  Then
  you must do it yourself.  For the modem, make sure that it's either
  done by the init string or is on by default.  If you need to tell the
  device driver to do it is best done on startup by putting a file that
  runs at boot-time.  See the subsection ``Boot-time Configuration'' You
  need to add the following to such a file for each serial port (example
  is ttyS2) you want to enable hardware flow control on:



       stty crtscts < /dev/ttyS2



  If you want to see if flow control is enabled do the following:  In
  minicom (or the like) type AT&V to see how the modem is configured and
  look for &K3 which means hardware flow control.  Then see if the
  device driver knows about it by typing: stty -a < /dev/ttyS2  Look for
  "crtscts" (without a disabling minus sign).


  7.  Modem Configuration (excluding serial port)

  7.1.  Finding Your Modem

  Before spending a lot of time configuring your modem, you need to make
  sure it can be found and that AT commands and the like can be sent to
  it.  So I suggest you first give it a very simple configuration using
  the communication program you will be using on the port and see it it
  works.  If so, then it's been found.  If not then see ``My Modem is
  Physically There but Can't be Found''.  A winmodem may be hard to find
  and will not work under Linux.


  7.2.  AT Commands

  While the serial port on which a modem resides requires configuring,
  so does the modem itself.  The modem is configured by sending AT
  commands (or the like) to it on the same serial line that is used to
  send data.
  Most modems use an AT command set.  These are cryptic and short ASCII
  commands where all command strings are prefaced by the letters AT.
  For example: ATZ&K3<return>  There are two commands here: Z and &K3.
  The command string is terminated by a return character (use the
  <enter> key if you are manually typing it).  Unfortunately there are
  many different variations of the AT command set so that what works for
  one modem may or may not work for another modem.  Thus there is no
  guarantee that the AT commands given in this section will work on your
  modem.

  Such command strings are either automatically sent to the modem by
  communication programs or are manually typed in by you.  Most
  communication programs provide a screen where you may type such
  commands.  You may type in some commands to create the configuration
  you want and then save this this configuration (profile) for later
  use.  It gets saved inside the modem itself.

  If you have a manual for your modem you can likely look up the AT
  command set.  Otherwise, you may try to find it on the Internet.  One
  may use a search engine and include some actual commands in the search
  terms to avoid finding sites that just talk about such commands but
  fail to list them.  You might also try a few of the sites listed in
  the subsection ``Web Sites''


  7.3.  Init Strings: Saving and Recalling

  The examples given in this subsection are from the Hayes AT modem
  command set.  All command strings must be prefaced by the two letters
  AT.  For example: AT&C1&D3^M (^M is the return character).  When a
  modem is powered on, it automatically configures itself with one of
  the several configurations it has stored in its non-volatile memory.
  If this configuration is satisfactory there is nothing further to do.

  If it's not satisfactory, then one may either alter the stored
  configuration or configure the modem each time you use it by sending
  it a string of commands known as an "init string" (= initialization
  string).  Normally, a a communication program does this.  What it
  sends will depend on how you configured the communications program.
  You can usually edit the init string your communication program uses
  and change it to whatever you want.  Sometimes the communications
  program will let you select the model of your modem and then it will
  use an init string that it thinks is best for that modem.

  The configuration of the modem when it's first powered on may be
  expressed by an init string.  You might think of this as the default
  "string" (called a profile).  If your communications program sends the
  modem another string (the init string), then this string will modify
  the default configuration.  For example, if the init string only
  contains two commands, then only those two items will be changed.
  However, some commands will recall a stored profile from inside the
  modem so a single such command in the init string can thereby change
  everything in the configuration.

  Modern modems have a few different stored profiles to choose from that
  are stored in the modem's non-volatile memory (it's still there when
  you turn it off).  In my modem there are two factory profiles (0 and
  1, neither of which you can change) and two user defined profiles (0
  and 1) that the user may set and store.  Your modem may have more.  To
  view some of these profiles send the command &V.  At power-up one of
  the user-defined profiles is loaded.  For example, if you type the
  command &Y0 then in the future profile 0 will be used at power-on.

  There are also commands to load (activate) any of the stored profiles.
  Such a load command may be put in an init string.  Of course if it
  loads the same profile that was automatically loaded at power-up,
  nothing is changed (unless the active profile has been modified since
  power-up).  Since it could have been modified it's a good idea to use
  some kind of an init string even if it does nothing more than load a
  stored profile.

  Examples of loading saved profiles:
  Z0 loads user-defined profile 0 and resets (hangs up, etc.)
  &F1 loads factory profile 1

  Once you have sent commands to the modem to configure it the way you
  want (such as loading a factory profile and modifying it a little) you
  may save this as a user-defined profile:
  &W0 saves the current configuration to user-profile 0

  Many people don't bother saving a good configuration in their modem,
  but instead, send the modem a longer init string each time the modem
  is used.  Another method is to restore the factory default by &F1 at
  the start of the init string and then modify it a little by adding a
  few other commands to the end of the init string.  By doing it this
  way no one can cause problems by modifying the user-defined profile
  which is loaded at power-on.

  You may choose an init string supplied by someone else that they think
  is right for your modem.  Some communication programs have a library
  of init strings to select from.  The most difficult method (and one
  which will teach you the most about modems) is to study the modem
  manual and write one yourself.  You could save this configuration
  inside the modem so that you don't need an init string.  A third
  alternative is to start with an init string that someone else wrote,
  but modify it to suit your purposes.

  If you look at init strings used by communication programs you may see
  symbols which are not valid modem commands.  These symbols are
  commands to the communication program itself and will not be sent to
  the modem.  For example,   means to pause briefly.


  7.4.  Other Modem Commands

  Future editions of Modem-HOWTO may contain more AT commands but the
  rest of this section is mostly what was in the old Serial-HOWTO.  All
  strings must start with AT.  Here's a few Hayes AT codes that should
  be in the string (if they are not set by using a factory default or by
  a saved configuration).



       E1       command echo ON
       Q0       result codes are reported
       V1       result codes are verbose
       S0=0     never answer (uugetty does this with the WAITFOR option)



  Here's some more codes concerning modem control lines DCD and DSR:


       &C1     DCD is on only after connect
       &S0     DSR is always on



  These affect what your modem does when calls start and end.  What DTR
  does may also be set up but it's more complicated since it depends on
  both the &D and &Q commands.


  Greg Hankins has a collection of modem setups for different types of
  modems.  If you would like to send him your working configuration,
  please do so:  <mailto:gregh@cc.gatech.edu> You can get these setups
  at ftp://ftp.cc.gatech.edu/pub/people/gregh/modem-configs.


  Note: to get his USR Courier V.34 modem to reset correctly when DTR
  drops, Greg Hankins had to set &D2 and S13=1 (this sets bit 0 of
  register S13).  This has been confirmed to work on USR Sportster V.34
  modems as well.


  Note: some Supra modems treat DCD differently than other modems.  If
  you are using a Supra, try setting &C0 and not &C1.  You must also set
  &D2 to handle DTR correctly.


  8.  Serial Port Devices /dev/ttyS2, etc.

  For creating devices in the device directory see the Serial-HOWTO:
  "Creating Devices In the /dev directory".



  8.1.  Serial Port Device Names & Numbers

  Devices in Linux have major and minor numbers.  Each serial port may
  have 2 possible names in the /dev directory: ttyS and cua.   Their
  drivers behave slightly differently.  The cua device is deprecated and
  will not be used in the future. See ``The cua Device''.


  Dos/Windows use the COM name while the setserial program uses tty00,
  tty01, etc.  Don't confuse these with dev/tty0, dev/tty1, etc.  which
  are used for the console (your PC monitor) but are not serial ports.
  The table below is for the "standard" case (but yours could be
  different).



                                                         IO
        dos            major minor       major minor  address
       COM1  /dev/ttyS0  4,  64;  /dev/cua0  5,  64      3F8
       COM2  /dev/ttyS1  4,  65;  /dev/cua1  5,  65      2F8
       COM3  /dev/ttyS2  4,  66;  /dev/cua2  5,  66      3E8
       COM4  /dev/ttyS3  4,  67;  /dev/cua3  5,  67      2E8



  Note that all distributions should come with ttyS devices (and many
  distributions have the obsolete cua device).  You can verify this by
  typing (don't feel bad if you don't find any obsolete cua devices):



       linux% ls -l /dev/cua*
       linux% ls -l /dev/ttyS*



  8.2.  Link ttySN to /dev/modem ?

  On some installations, two extra devices will be created, /dev/modem
  for your modem and /dev/mouse for your mouse.  Both of these are
  symbolic links to the appropriate device in /dev which you specified
  during the installation (unless you have a bus mouse, then /dev/mouse
  will point to the bus mouse device).

  There has been some discussion on the merits of /dev/mouse and
  /dev/modem.  The use of these links is discouraged.  In particular, if
  you are planning on using your modem for dialin you may run into
  problems because the lock files may not work correctly if you use
  /dev/modem.  However, if you change or remove this link, some
  applications might need reconfiguration.



  8.3.  The cua Device

  Each ttyS device has a corresponding cua device.  But the cua device
  is deprecated so it's best to use ttyS (unless cua is required).
  There is a difference between cua and ttyS but a savvy programmer can
  make a ttyS port behave just like a cua port so there is no real need
  for the cua anymore.  Except that some older programs may need to use
  the cua.

  What's the difference?  The  main difference between cua and ttyS has
  to do with what happens in a C-program when an ordinary "open" command
  tries to open the port. If a cua port has been set to check modem
  control signals, the port can be opened even if the DCD modem control
  signal says not to.  Astute programming (by adding additional lines to
  the program) can force a ttyS port to behave this way also.  But a cua
  port can be more easily programmed to open for dialing out on a modem
  even when the modem fails to assert DCD (since no one has called into
  it and there's no carrier).  That's why cua was once used for dial-out
  and ttyS used for dial-in.

  Starting with Linux kernel 2.2, a warning message is put in the kernel
  log when one uses cua.  This is an omen that cua is defunct and should
  be avoided if possible.


  9.  Interesting Programs You Should Know About

  9.1.  What is setserial ?

  This part is in 3 HOWTOs: Modem, Serial, and Text-Terminal.  There are
  some minor differences, depending on which HOWTO it appears in.


  9.1.1.  Introduction

  Don't ever use setserial with Laptops (PCMCIA).  setserial is a
  program which allows you to tell the device driver software the I/O
  address of the serial port, which interrupt (IRQ) is set in the port's
  hardware, what type of UART you have, etc.  It can also show how the
  driver is currently set.  In addition, it can be made to probe the
  hardware and try to determine the UART type and IRQ, but this has
  severe limitations.  See ``Probing''.  Note that it can't set the IRQ
  or the port address in the hardware of PnP serial ports.

  If you only have one or two built-in serial ports, they will usually
  get set up correctly without using setserial.  Otherwise (or if there
  are problems with the serial port) you will likely need to deal with
  setserial.  Besides the man page for setserial, check out info in
  /usr/doc/setserial.../ or /usr/share/doc/setserial.  It should tell
  you how setserial is handled in your distribution of Linux.

  Setserial is often run automatically at boot-time by a start-up shell-
  script for the purpose of assigning IRQs, etc. to the driver.
  Setserial will only work if the serial module is loaded (or if the
  equivalent was compiled into your kernel).  If you should (for some
  reason) unload the serial module later on, the changes previously made
  by setserial will be forgotten by the kernel.  So setserial must be
  run again to reestablish them.  In addition to running via a start-up
  script, something akin to setserial also runs earlier when the serial
  module is loaded (or the like).  Thus when you watch the start-up
  messages on the screen it may look like it ran twice, and in fact it
  has.

  Setserial can set the time that the port will keep operating after
  it's closed (in order to output any characters still in its buffer in
  main RAM).  This is needed at slow baud rates of 1200 or lower.  It's
  also needed at higher speeds if there are a lot of "flow control"
  waits.  See "closing_wait" in the man pg.


  Setserial does not set either IRQ's nor I/O addresses in the serial
  port hardware itself.  That is done either by jumpers or by plug-and-
  play.  You must tell setserial the identical values that have been set
  in the hardware.  Do not just invent some values that you think would
  be nice to use and then tell them to setserial.  However, if you know
  the I/O address but don't know the IRQ you may command setserial to
  attempt to determine the IRQ.

  You can see a list of possible commands by just typing setserial with
  no arguments.  This fails to show you the one-letter options such as
  -v for verbose which you should normally use when troubleshooting.
  Note that setserial calls an IO address a "port".  If you type:


       setserial -g /dev/ttyS*



  you'll see some info about how that device driver is configured for
  your ports.  Note that where it says "UART: unknown" it probably means
  that no uart exists.  In other words you probably have no such serial
  port and the other info shown about the port is meaningless and should
  be ignored.  If you really do have such a serial port, setserial
  doesn't recognize it and that needs to be fixed.

  If you add -a to the option -g you will see more info although few
  people need to deal with (or understand) this additional info since
  the default settings you see usually work fine.  In normal cases the
  hardware is set up the same way as "setserial" reports, but if you are
  having problems there is a good chance that "setserial" has it wrong.
  In fact, you can run "setserial" and assign a purely fictitious I/O
  port address, any IRQ, and whatever uart type you would like to have.
  Then the next time you type "setserial ..." it will display these
  bogus values without complaint.  Of course the serial port driver will
  not work correctly (if at all) if you attempt to use such a port.
  Thus when giving parameters to "setserial" anything goes.  It gives
  you no warning if what you tell it is incorrect and will allow you to
  create conflicts in IRQs and I/O port addresses that will have
  disastrous results later on.

  While assignments made by setserial are lost when the PC is powered
  off, a configuration file may restore them (or a previous
  configuration) when the PC is started up again.  In newer versions,
  what you change by setserial gets automatically saved to a
  configuration file.  In older versions, the configuration file only
  changes if you edit it manually so the configuration remains the same
  from boot to boot.  See ``Configuration Scripts/Files''


  9.1.2.  Probing

  With appropriate options, setserial can probe (at a given I/O address)
  for a serial port but you must guess the I/O address.  If you ask it
  to probe for /dev/ttyS2 for example, it will only probe at the address
  it thinks ttyS2 is at (2F8).  If you tell setserial that ttyS2 is at a
  different address, then it will probe at that address, etc.  See
  ``Probing''

  The purpose of this is to see if there is a uart there, and if so,
  what its IRQ is.  Use "setserial" mainly as a last resort as there are
  faster ways to attempt it such as wvdialconf to detect modems, looking
  at very early boot-time messages, or using pnpdump --dumpregs.  To try
  to detect the physical hardware use the -v (verbose) and autoconfig
  command to setserial.  If the resulting message shows a uart type such
  as 16550A, then you're OK.  If instead it shows "unknown" for the uart
  type, then there is supposedly no serial port at all at that I/O
  address.  Some cheap serial ports don't identify themselves correctly
  so if you see "unknown" you still might have a serial port there.

  Besides auto-probing for a uart type, setserial can auto-probe for
  IRQ's but this doesn't always work right either.  In versions of
  setserial >= 2.15, the results of your last probe test may be saved
  and put into the configuration file /etc/serial.conf which will be
  used next time you start Linux.  At boot-time when the serial module
  loads (or the like), a probe for UARTs is made automatically and
  reported on the screen.  But the IRQs shown may be wrong.  The second
  report of the same is the result of a script which usually does no
  probing and thus provides no reliable information as to how the
  hardware is actually set.  It only shows configuration date someone
  wrote into the script or data that got saved in /etc/serial.conf.

  It may be that two serial ports both have the same IO address set in
  the hardware.  Of course this is not permitted but it sometimes
  happens anyway.  Probing detects one serial port when actually there
  are two.  However if they have different IRQs, then the probe for IRQs
  may show IRQ = 0.  For me it only did this if I first used setserial
  to give the IRQ a ficticious value.


  9.1.3.  Boot-time Configuration

  When the kernel loads the serial module (or if the "module equivalent"
  is built into the kernel) then only ttyS{0-3} are auto-detected and
  the driver is set to use only IRQs 4 and 3 (regardless of what IRQs
  are actually set in the hardware).  You see this as a boot-time
  message just like as if setserial had been run.  If you use 3 or more
  ports, this may result in IRQ conflicts.

  To fix such conflicts by telling setserial the true IRQs (or for other
  reasons) there may be a file somewhere that runs setserial again.
  This happens early at boot-time before any process uses the serial
  port.  In fact, your distribution may have set things up so that the
  setserial program runs automatically from a start-up script at boot-
  time.  More info about how to handle this situation for your
  particular distribution might be found in file named "setserial..." or
  the like located in directory /usr/doc/ or /usr/share/doc/.



  9.1.4.  Configuration Scripts/Files

  Your objective is to modify (or create) a script file in the /etc tree
  that runs setserial at boot-time.  Most distributions provide such a
  file (but it may not initially reside in the /etc tree).  In addition,
  setserial 2.15 and higher often have an /etc/serial.conf file that is
  used by the above script so that you don't need to directly edit the
  script that runs setserial.  In addition just using setserial on the
  command line (2.15+) may ultimately alter this configuration file.

  So prior to version 2.15 all you do is edit a script.  After 2.15 you
  may need to either do one of three things: 1. edit a script.  2. edit
  /etc/serial.conf or 3. run "setserial" on the command line which will
  result in /etc/serial.conf automatically being edited.  Which one of
  these you need to do depends on both your particular distribution, and
  how you have set it up.


  9.1.5.  Edit a script (after version 2.15: perhaps not)

  Prior to setserial 2.15 (1999) there was no /etc/serial.conf file to
  configure setserial.   Thus you need to find the file that runs
  "setserial" at boot time and edit it.  If it doesn't exist, you need
  to create one (or place the commands in a file that runs early at
  boot-time).  If such a file is currently being used it's likely
  somewhere in the /etc directory-tree.  But Redhat <6.0 has supplied it
  in /usr/doc/setserial/ but you need to move it to the /etc tree before
  using it.   You might use "locate" to try to find such a file.  For
  example, you could type: locate "*serial*".

  The script /etc/rc.d/rc.serial was commonly used in the past.  The
  Debian distribution used /etc/rc.boot/0setserial.  Another file once
  used was /etc/rc.d/rc.local but it's not a good idea to use this since
  it may not be run early enough.  It's been reported that other
  processes may try to open the serial port before rc.local runs
  resulting in serial communication failure.

  If such a file is supplied, it should contain a number of commented-
  out examples.  By uncommenting some of these and/or modifying them,
  you should be able to set things up correctly.  Make sure that you are
  using a valid path for setserial, and a valid device name.  You could
  do a test by executing this file manually (just type its name as the
  super-user) to see if it works right.  Testing like this is a lot
  faster than doing repeated reboots to get it right.  Of course you can
  also test a single setserial command by just typing it on the command
  line.

  If you want setserial to automatically determine the uart and the IRQ
  for ttyS3 you would add something like:



       /sbin/setserial /dev/ttyS3 auto_irq skip_test autoconfig



  Do this for every serial port you want to auto configure.  Be sure to
  give a device name that really does exist on your machine.  In some
  cases this will not work right due to the hardware so if you know what
  the uart and irq actually are, may want to assign them explicitly with
  "setserial".  For example:



  /sbin/setserial /dev/ttyS3 irq 5 uart 16550A  skip_test



  For versions >= 2.15 (provided your distribution implemented the
  change, Redhat didn't) it may be more tricky to do since the file that
  runs setserial on startup, /etc/init.d/setserial or the like was not
  intended to be edited by the user.  See ``New configuration method
  using /etc/serial.conf''.



  9.1.6.  New configuration method using /etc/serial.conf

  Prior to setserial version 2.15, the way to configure setserial was to
  manually edit the shell-script that ran setserial at boot-time.  See
  ``Edit a script (after version 2.15: perhaps not)''.  Starting with
  version 2.15 (1999) of setserial this shell-script is not edited but
  instead gets its data from a configuration file: /etc/serial.conf.
  Furthermore you may not even need to edit serial.conf because using
  the "setserial" command on the command line may automatically cause
  serial.conf to be edited appropriately.

  This was intended to make it so that you don't need to edit any file
  in order to set up (or change) setserial so it will do the right thing
  each time that Linux is booted.  But there are serious pitfalls
  because it's not really "setserial" that edits serial.conf.  Confusion
  is compounded because different distributions handle this differently.
  In addition, you may modify it so it works differently.

  What often happens is this:  When you shut down your PC the script
  that runs "setserial" at boot-time is run again, but this time it only
  does what the part for the "stop" case says to do:  It uses
  "setserial" to find out what the current state of "setserial" is and
  puts that info into the serial.conf file.  Thus when you run
  "setserial" to change the serial.conf file, it doesn't get changed
  immediately but only when and if you shut down normally.

  Now you can perhaps guess what problems might occur.  Suppose you
  don't shut down normally (someone turns the power off, etc.) and the
  changes don't get saved.  Suppose you experiment with "setserial" and
  forget to run it a final time to restore the original state (or make a
  mistake in restoring the original state).  Then your "experimental"
  settings are saved.

  If you manually edit serial.conf, then your editing is destroyed when
  you shut down because it gets changed back to the state of setserial
  at shutdown.  There is a way to disable the changing of serial.conf at
  shutdown and that is to remove "###AUTOSAVE###" or the like from first
  line of serial.conf.  In at least one distribution, the removal of
  "###AUTOSAVE###" from the first line is automatically done after the
  first time you shutdown just after installation.  The serial.conf file
  will hopefully contain some comments to help you out.

  The file most commonly used to run setserial at boot-time (in
  conformance with the configuration file) is now /etc/init.d/setserial
  (Debian) or /etc/init.d/serial (Redhat), or etc.,  but it should not
  normally be edited.  For 2.15 Redhat 6.0 just had a file
  /usr/doc/setserial-2.15/rc.serial which you have to move to
  /etc/init.d/ if you want setserial to run at boot-time.

  To disable a port, use setserial to set it to "uart none".  The format
  of /etc/serial.conf appears to be just like that of the parameters
  placed after "setserial" on the command line with one line for each
  port.  If you don't use autosave, you may edit /etc/serial.conf
  manually.

  BUG: As of July 1999 there is a bug/problem since with ###AUTOSAVE###
  only the setserial parameters displayed by "setserial -Gg /dev/ttyS*"
  get saved but the other parameters don't get saved.  Use the -a flag
  to "setserial" to see all parameters.  This will only affect a small
  minority of users since the defaults for the parameters not saved are
  usually OK for most situations.  It's been reported as a bug and may
  be fixed by now.

  In order to force the current settings set by setserial to be saved to
  the configuration file (serial.conf) without shutting down, do what
  normally happens when you shutdown: Run the shell-script
  /etc/init.d/{set}serial stop.  The "stop" command will save the
  current configuration but the serial ports still keep working OK.

  In some cases you may wind up with both the old and new configuration
  methods installed but hopefully only one of them runs at boot-time.
  Debian labeled obsolete files with "...pre-2.15".


  9.1.7.  IRQs

  By default, both ttyS0 and ttyS2 will share IRQ 4, while ttyS1 and
  ttyS3 share IRQ 3.  But actually sharing serial interrupts (using them
  in running programs) is not permitted unless you: 1. have kernel 2.2
  or better, and 2. you've complied in support for this, and 3. your
  serial hardware supports it.  See


  ``Interrupt sharing and Kernels 2.2+'' If you only have two serial
  ports, ttyS0 and ttyS1, you're still OK since IRQ sharing conflicts
  don't exist for non-existent devices.

  If you add an internal modem and retain ttyS0 and ttyS1, then you
  should attempt to find an unused IRQ and set it both on your serial
  port (or modem card) and then use setserial to assign it to your
  device driver.  If IRQ 5 is not being used for a sound card, this may
  be one you can use for a modem.  To set the IRQ in hardware you may
  need to use isapnp, a PnP BIOS, or patch Linux to make it PnP.  To
  help you determine which spare IRQ's you might have, type "man
  setserial" and search for say: "IRQ 11".



  9.2.  What is isapnp ?

  isapnp is a program to configure Plug-and-Play (PnP) devices on the
  ISA bus including internal modems.  It comes in a package called
  "isapnptools" and includes another program, "pnpdump" which finds all
  your ISA PnP devices and shows you options for configuring them in a
  format which may be added to the PnP configuration file:
  /etc/isapnp.conf.  It may also be used with the --dumpregs option to
  show the current IO address and IRQ of the modem's serial port.  The
  isapnp command may be put into a startup file so that it runs each
  time you start the computer and thus will configure ISA PnP devices.
  It is able to do this even if your BIOS doesn't support PnP.  See
  Plug-and-Play-HOWTO.



  9.3.  What is wvdialconf ?

  wvdialconf will try to find which serial port (ttyS?) has a modem on
  it.  It also creates a configuration program for the wvdial program.
  wvdial is used for simplified dialing out using the PPP protocol to an
  ISP.  But you don't need to install PPP in order to use wvdialconf.
  It will only find  modems which are not in use.  It will also
  automatically devise a "suitable" init strings but sometimes gets it
  wrong.  Since this command has no options, it's simple to use but you
  must give it the name of a file to put the init string (and other
  data) into.  For example type: wvdialconf my_config_file_name.


  9.4.  What is stty ?

  stty is like setserial but it sets the baud rate and other parameters
  of a serial port.  Typing "stty -a < /dev/ttyS2" should show you how
  ttyS2 is configured.  Most of the settings are for things that you
  never need to use with modems (such as some used only for old
  terminals of the 1970s).  Your communication package should
  automatically set up all the setting correctly for modems.  But stty
  is sometimes useful for trouble-shooting.

  Two items set by stty are: 1. Hardware flow control by "crtscts" and
  2. Ignore the DCD signal from the modem: "clocal".  If the modem is
  not sending a DCD signal and clocal is disabled (stty shows -clocal)
  then a program may not be able to open the serial port.  If the port
  can't open, the program may just hang, waiting (often in vain) for a
  DCD signal from the modem.

  Minicom sets clocal automatically when it starts up so there is no
  problem.  But version 6.0.192 of Kermit hung when I set -clocal and
  tried to "set line ..." If -clocal is set and there is no DCD signal
  then even the "stty" command will hang and there is seemingly no way
  to set clocal (except by running minicom).  But minicom will restore
  -clocal when it exits.  One way to get out of this is to use minicom
  to send the "AT&C" to the modem (to get the DCD signal) and then exit
  minicom with no reset so that the DCD signal remains on.  Then you may
  use stty again.


  10.  Trying Out Your Modem (Dialing Out).

  10.1.  Are You Ready to Dial Out ?

  Once you've plugged in your modem and know which serial port it's on
  you're ready to try using it.  Before you try to get the Internet on
  it or have people call in to you, you could first try something
  simpler like dialing out to some number to see if your modem is
  working OK.  Find a phone number that is connected to a modem.  If you
  don't know what number to call, ask at computer stores for such phone
  numbers of bulletin boards, etc. or see if a local library has a phone
  number for their on-line catalog.

  Then make sure you are ready to phone.  Do you know what serial port
  (such as ttyS2) your modem is on?  You should have found this out when
  you io-irq configured your serial ports.  Have you decided what speed
  you are going to use for this port?  See ``Speed Table'' for a quick
  selection or ``What Speed Should I Use'' for more details.  If you
  have no idea what speed to set, just set it a few times faster than
  the advertised speed of your modem.  Also remember that if you see a
  menu where an option is "hardware flow control" and/or "RTS/CTS" or
  the like, select it.  Is a live telephone cable plugged in to your
  modem?  You may want to connect the cable to a real telephone to make
  sure that it can produce a dial tone.

  Now you need to select a communication (dialing) program to use to
  dial out.  Dialing programs include: minicom, seyon (X-windows), and
  kermit.  See section ``Communications Programs'' about some
  communications programs.  Two examples are presented next: ``Dialing
  Out with Minicom'' and ``Dialing Out with Kermit''



  10.2.  Dialing Out with Minicom

  Minicom comes with most Linux distributions.  To configure it you
  should be the root user.  Type "minicom -s" to configure.  This will
  take you directly to the configuration (set-up) menus.  Alternatively
  you could just run "minicom" and then type ^A to see the bottom status
  line.  This shows to type ^A Z for help (you've already typed the ^A
  so just type z).  From the help menu go to the Configuration menu.

  Most of the options don't need to be set for just simply dialing out.
  To configure you have to supply a few basic items: the name of the
  serial port your modem is on such as /dev/ttyS2 and the speed such as
  115200.  These are set at the serial port menu.  Go to it and set
  them.  Also (if possible) set hardware flow control (RTS/CTS).  Then
  save them.  When typing in the speed, you should also see something
  like "8N1" which you should leave alone.  It means: 8-bit bytes, No
  parity, 1 stop-bit appended to each byte.  If you can't find the speed
  you want, a lower speed will always work for a test.   Exit (hit
  return) when done and save the configuration as default (dfl) using
  the menu.  You may want to exit minicom and start it again so it can
  now find the serial port and initialize the modem, or you could go to
  help and tell minicom to initialize the modem.

  Now you are ready to dial.  But first at the main screen you get after
  you first type "minicom" make sure there's a modem there by typing AT
  and then hit the <enter> key.  It should display OK.  If it doesn't
  something is wrong and there is no point of trying to dial.

  If you got the "OK" go back to help and select the dialing directory.
  You may edit it and type in a phone number, etc. into the directory
  and then select "dial" to dial it.  Alternatively, you may just dial
  manually (by selecting "manual" and then type the number at the
  keyboard).  If it doesn't work, carefully note any error messages and
  try to figure out what went wrong.


  10.3.  Dialing Out with Kermit

  You can find the latest version of kermit at
  http://www.columbia.edu/kermit/.  For example, say your modem was on
  ttyS3, and its speed was 115200 bps.  You would do the following:



  linux# kermit
  C-Kermit 6.0.192, 6 Sep 96, for Linux
   Copyright (C) 1985, 1996,
    Trustees of Columbia University in the City of New York.
  Default file-transfer mode is BINARY
  Type ? or HELP for help.
  C-Kermit>set line /dev/ttyS3
  C-Kermit>set carrier-watch off
  C-Kermit>set speed 115200
  /dev/ttyS3, 115200 bps
  C-Kermit>c
  Connecting to /dev/ttyS3, speed 115200.
  The escape character is Ctrl-\ (ASCII 28, FS)
  Type the escape character followed by C to get back,
  or followed by ? to see other options.
  ATE1Q0V1                           ; you type this and then the Enter key
  OK                                 ; modem should respond with this



  If your modem responds to AT commands, you can assume your modem is
  working correctly on the Linux side.  Now try calling another modem by
  typing:


       ATDT7654321



  where 7654321 is a phone number.  Use ATDP instead of ATDT if you have
  a pulse line.  If the call goes through, your modem is working.

  To get back to the kermit prompt, hold down the Ctrl key, press the
  backslash key, then let go of the Ctrl key, then press the C key:


       Ctrl-\-C
       (Back at linux)
       C-Kermit>quit
       linux#



  This was just a test using the primitive "by-hand" dialing method.
  The normal method is to let kermit do the dialing for you with its
  built-in modem database and automatic dialing features, for example
  using a US Robotics (USR) modem:



  linux# kermit
  C-Kermit 6.0.192, 6 Sep 1997, for Linux
   Copyright (C) 1985, 1996,
    Trustees of Columbia University in the City of New York.
  Default file-transfer mode is BINARY
  Type ? or HELP for help
  C-Kermit>set modem type usr        ; Select modem type
  C-Kermit>set line /dev/ttyS3       ; Select communication device
  C-Kermit>set speed 115200          ; Set the dialing speed
  C-Kermit>dial 7654321              ; Dial
   Number: 7654321
   Device=/dev/ttyS3, modem=usr, speed=115200
   Call completed.<BEEP>
  Connecting to /dev/ttyS3, speed 115200
  The escape character is Ctrl-\ (ASCII 28, FS).
  Type the escape character followed by C to get back,
  or followed by ? to see other options.

  Welcome to ...

  login:



  11.  Dial-In

  11.1.  Overview

  Dial-in is where you set up your PC so that others may dial in to your
  phone number and use your PC.  The "point of view" is your PC.  When
  you dial out from your PC you are also dialing in to another computer
  (but not dialing in to your own computer)

  Dial-in works like this.  Someone with a modem dials your telephone
  number.  Your modem answers the call and connects.  Once the caller is
  connected, your PC (via the getty program) starts the login process
  for the caller.  The original method was to send a login prompt to the
  caller's screen (manual login).  But a more modern method (if you use
  mgetty) is to start PPP (pppd) and let PPP automatically login the
  caller (no need to manually type in a name or password).  See the PPP-
  HOWTO (new revision expected soon) and docs for mgetty  for more
  details.

  After the caller has logged in, the caller uses your PC.  Using your
  PC may mean that the caller has a shell account and can use your PC
  just as if they logged in at the console (or from a text-terminal).
  It could also mean that they get connected to the Internet thru your
  PC (via PPP).  The program that you use at your PC to handle dialin is
  called getty or mgetty.  See ``About mgetty''.

  If you expect that people will be able to dial-in to you at 56k, it
  can't be done unless:

  1. You have a digital connection to the telephone company such as a
     trunkside-T1 or ISDN line

  2. You use special digital modems (see ``Digital Modems'')

  3. You have a "... concentrator", or the like to interface your
     digital-modems to the digital lines of the telephone company.

     A "... concentrator" may  be called a "modem concentrator" or a
     "remote access concentrator" or it could be included in a "remote
     access server" which includes the digital modems, etc.  This type
     of setup is used by ISPs (Internet Service Providers).


  11.2.  Getty

  getty is the program you run for dialin.  You don't need it for
  dialout.  In addition to presenting a login prompt, it also answers
  the telephone.  Originally getty was used for logging in to a computer
  from a dumb terminal.  It's currently used for logging in to a Linux
  console).  There are a few different getty programs with slightly
  different names.  Only certain ones work with modems for dialin.  This
  getty program is usually started at boot-time.  It must be called from
  the /etc/inittab file.  You may find an example in this file of a call
  to getty which you will likely need to edit a bit.  If you use a
  different getty program than the one shown in such an example, then
  you will need to edit it quite a bit since the options will have a
  different format.


  There are four different getty programs to choose from that may be
  used with modems for dialin: mgetty, uugetty, getty_em, and agetty.  A
  few details are given in the following subsections.  agetty is the
  simplest (and weakest) of the four and some consider it mainly for use
  with directly connected text-terminals. mgetty has support for fax and
  voice mail but Uugetty doesn't.  mgetty allegedly lacks a few of the
  features of uugetty.  getty_em is a simplified version of uugetty.
  Thus mgetty is likely your best choice unless you are already familiar
  with uugetty (or find it difficult to get mgetty).  The syntax for
  these getty programs differs, so be sure to check that you are using
  the correct syntax in /etc/inittab for whichever getty you use.


  11.2.1.  About mgetty

  mgetty was written as a replacement for uugetty which was in existence
  long before mgetty.  Both are for use with modems.  Although mgetty
  may be also used for directly connected terminals the documentation
  for this is hard to pinpoint and mgetty will not (as of mid 1999)
  support software flow control (used on many terminals) without
  recompiling.  This defect is listed as a bug.  In addition to allowing
  dialup logins, mgetty also provides FAX support and auto PPP
  detection.  There is a supplemental program called vgetty which
  handles voicemail for some modems.  mgetty documentation is good
  (except for voice mail), and does not need supplementing .  Please
  refer to it for installation instructions.  You can find the latest
  information on mgetty at http://www.leo.org/~doering/mgetty/ and
  <http://alpha.greenie.net/mgetty>


  11.2.2.  About uugetty


  getty_ps  contains two programs: getty is used for console and
  terminal devices, and uugetty for modems.  Greg Hankins (former author
  of Serial-HOWTO) used uugetty so his writings about it are included
  here.  See ``Uugetty''.  The other gettys are well covered by the
  documentation that comes with them.


  11.2.3.  About getty_em

  This is a simplified version of ``uugetty''.  It was written by Vern
  Hoxie after he became fully confused with complex support files needed
  for getty_ps and uugetty.


  It is part of the collection of serial port utilities and information
  by Vern Hoxie available via ftp from  <scicom.alphacdc.com/pub/linux>.
  The name of the collection is ``serial_suite.tgz''.  When logging into
  ``scicom'' as "anonymous", you must use your full e-mail address as
  the password.  For example: greg.hankins@cc.gatech.edu


  11.2.4.  About agetty and mingetty

  agetty is a simple, completely functional implementation of getty
  which is best suited for virtual consoles or terminals rather than
  modems.  But it works fine with modems under favorable conditions
  (except you cannot dial out when agetty is running and waiting for a
  call).  agetty in the Debian distribution is just named getty.

  mingetty is a small getty that will work only for consoles (monitors)
  so you can't use it with modems for dialin.


  11.3.  What Happens when Someone Dials In ?

  The caller runs some sort of communication program that dials your
  telephone number and your telephone rings.  There are two different
  ways that your PC can answer the phone.  One way is for the modem to
  automatically answer the call.  The other way is for getty to sense
  the ringing and send a command to the modem to answer the call.  Once
  the call is answered, your modem sends tones to the other modem (and
  conversely).  The two modems negotiate how they will communicate and
  when this is done your modem sends a "CONNECTed" message (or the like)
  to getty.  When getty gets this message, it sends a login prompt out
  the serial port.  Sometimes getty just calls on a program named login
  to handle the logging in.  getty usually starts running at boot-time
  but it must wait until a connection is made before sending out a
  "login" prompt.

  Now for more details on the two methods of answering the call.  By
  setting the S0 register of the modem to 3, the modem will
  automatically answer on the 3rd ring.  If it's set to 0 then the modem
  will only answer the call if getty sends it an "A" (= Answer) command
  while the phone is ringing.  Actually an "ATA" is sent since all modem
  commands are prefixed by "AT".  You might think it best to utilize the
  ability of the modem to automatically answer the call, but it's
  actually better if getty answers it.  If the modem doesn't
  automatically answer, it's called manual answer (even though getty
  automatically handles it).

  For the "manual" answer case, getty opens the port at boot-time and
  listens.  When the phone rings, a "RING" message is sent to the
  listening getty.  Then if getty wants to answer this ring, it sends
  the modem an "ATA" command.  The modem then makes a connection and
  sends a "CONNECT ..." message to getty which then sends a login prompt
  to the caller.

  The automatic answer case uses the CD (Carrier Detect) wire from the
  modem to the serial port to detect when a connection is made.  It
  works like this.  At boot-time getty tries to open the serial port but
  the attempt fails since there is normally no CD signal from the modem.
  Then the getty program waits at the open statement in the program
  until a CD signal appears.  When a CD signal arrives (perhaps hours
  later) then the port is opened and getty sends the login prompt.
  While getty is waiting (sleeping) at the open statement, other
  processes can run since Linux is a multiprocessing operating system.
  What actually wakes getty up is an interrupt which is issued when the
  CD line from the modem changes state to on.


  You may wonder how getty is able to open the serial port in the
  manual-answer case since there is no CD signal.  Well, there's a way
  to write a program to force the port to open even if there is no CD
  signal present.


  11.4.  Why Manual Answer is Best

  The difference between the two ways of answering will show itself when
  the computer happens to be down but the modem is still working.  For
  the manual case, the "RING" message is sent to getty but since the
  computer is down, getty isn't there and the phone never gets answered.
  There are no telephone charges when there is no answer.  For the
  automatic answer case, the phone is answered but no login message is
  ever sent since the computer is down.  The phone bill runs up as the
  waiting continues.  If the phone call is toll-free, it doesn't make
  much difference, although it may be frustrating waiting for a login
  prompt that never arrives.  mgetty uses manual answer.  Uugetty can do
  this too using a configuration script.


  11.5.  Callback

  Callback is where someone first dials in to your modem.  Then, you get
  a little info from the caller and then call it right back.  Why would
  you want to do this?  One reason is to save on telephone bills if you
  can call the caller cheaper than the caller can call you.  Another is
  to make sure that the caller really is who it claims to be.  If a
  caller calls you and claims to be calling from its usual phone number,
  then one way to verify this is to actually place a new call to that
  number.

  There's a program for Linux called "callback" that works with mgetty.
  It's at  <ftp://ftp.icce.rug.nl/pub/unix/>.  Step-by-step instructions
  on how someone installed it (and PPP) is at
  <http://www.stokely.com/unix.serial.port.resources/callback.html>


  11.6.  Voice Mail

  Voice mail is like an answering machine run by a computer.  To do this
  you must have a modem that supports "voice" and supporting software.
  Instead of storing the messages on tape, they are stored in digital
  format on a disk.  When a person phones you, they hear a "greeting"
  message and can then leave a message for you.  More advanced systems
  would have caller-selectable mail boxes and caller-selectable messages
  to listen to.  Free software is available in Linux for simple
  answering, but doesn't seem to be available yet for the more advanced
  stuff.

  I know of two different voicemail packages for Linux.  One is a very
  minimal package (see ``Voicemail Software'').  The other, more
  advanced, but currently poorly documented, is vgetty.  It's an
  optional addition to the well documented and widely distributed mgetty
  program.  It supports ZyXEL-like voice modem commands.  In the Debian
  distribution, you must get the mgetty-voice package in addition to the
  mgetty package and mgetty-doc package.  Obsolete documentation has
  been removed from mgetty but replacement documentation is lacking
  (except if you use the -h (help) option when running certain programs,
  etc.).  But one sees postings about using it on the mgetty newsgroup.
  See ``About mgetty''.  It seems that vgetty is currently not very
  stable but it's successfully being used and development of it
  continues.  If this is the latest version of this HOWTO can someone
  who is familiar with vgetty please let me know its current status.


  12.  Uugetty for Dial-In (from the old Serial-HOWTO)

  Be aware that you could use mgetty as a (better?) alternative to
  uugetty.  mgetty is newer and more popular than uugetty.  See ``What
  is getty?'' for a brief comparison of these 2 gettys.


  12.1.  Installing getty_ps

  Since uugetty is part of getty_ps you'll first have to install
  getty_ps.  If you don't have it, get the latest version from
  metalab.unc.edu:/pub/Linux/system/serial.  In particular, if you want
  to use high speeds (57600 and 115200 bps), you must get version 2.0.7j
  or later.  You must also have libc 5.x or greater.


  By default, getty_ps will be configured to be Linux FSSTND (File
  System Standard) compliant, which means that the binaries will be in
  /sbin, and the config files will be named /etc/conf.{uu}getty.ttySN.
  This is not apparent from the documentation!  It will also expect lock
  files to go in /var/lock.  Make sure you have the /var/lock directory.

  If you don't want FSSTND compliance, binaries will go in /etc, config
  files will go in /etc/default/{uu}getty.ttySN, and lock files will go
  in /usr/spool/uucp.  I recommend doing things this way if you are
  using UUCP, because UUCP will have problems if you move the lock files
  to where it isn't looking for them.


  getty_ps can also use syslogd to log messages.  See the man pages for
  syslogd(1) and syslog.conf(5) for setting up syslogd, if you don't
  have it running already.  Messages are logged with priority LOG_AUTH,
  errors use LOG_ERR, and debugging uses LOG_DEBUG.  If you don't want
  to use syslogd you can edit tune.h in the getty_ps source files to use
  a log file for messages instead, namely /var/adm/getty.log by default.


  Decide on if you want FSSTND compliance and syslog capability.  You
  can also choose a combination of the two.  Edit the Makefile, tune.h
  and config.h to reflect your decisions.  Then compile and install
  according to the instructions included with the package.


  12.2.  Setting up uugetty


  With uugetty you may dial out with your modem while uugetty is
  watching the port for logins.  uugetty does important lock file
  checking.  Update /etc/gettydefs to include an entry for your modem.
  For help with the meaning of the entries that you put into
  /etc/gettydefs, see the "serial_suite" collected by Vern Hoxie.  How
  to get it is in section See``About getty_em''.  When you are done
  editing /etc/gettydefs, you can verify that the syntax is correct by
  doing:



       linux# getty -c /etc/gettydefs



  12.2.1.  Modern Modems

  If you have a 9600 bps or faster modem with data compression, you can
  lock your serial port to one speed.  For example:


       # 115200 fixed speed
       F115200# B115200 CS8 # B115200 SANE -ISTRIP HUPCL #@S @L @B login: #F115200



  If you have your modem set up to do RTS/CTS hardware flow control, you
  can add CRTSCTS to the entries:


       # 115200 fixed speed with hardware flow control
       F115200# B115200 CS8 CRTSCTS # B115200 SANE -ISTRIP HUPCL CRTSCTS #@S @L @B login: #F115200



  12.2.2.  Old slow modems

  If you have a slow modem (under 9600 bps) Then, instead of one line
  for a single speed, your need several lines to try a number of speeds.
  Note the these lines are linked to each other by the last "word" in
  the line such as #38400.  Blank lines are needed between each entry.



       # Modem entries
       115200# B115200 CS8 # B115200 SANE -ISTRIP HUPCL #@S @L @B login: #57600

       57600# B57600 CS8 # B57600 SANE -ISTRIP HUPCL #@S @L @B login: #38400

       38400# B38400 CS8 # B38400 SANE -ISTRIP HUPCL #@S @L @B login: #19200

       19200# B19200 CS8 # B19200 SANE -ISTRIP HUPCL #@S @L @B login: #9600

       9600# B9600 CS8 # B9600 SANE -ISTRIP HUPCL #@S @L @B login: #2400

       2400# B2400 CS8 # B2400 SANE -ISTRIP HUPCL #@S @L @B login: #115200



  12.2.3.  Login Banner

  If you want, you can make uugetty print interesting things in the
  login banner.  In Greg's  examples, he has the system name, the serial
  line, and the current bps rate.  You can add other things:



         @B    The current (evaluated at the time the @B is seen) bps rate.
         @D    The current date, in MM/DD/YY.
         @L    The serial line to which uugetty is attached.
         @S    The system name.
         @T    The current time, in HH:MM:SS (24-hour).
         @U    The number of currently signed-on users.  This is  a
               count of the number of entries in the /etc/utmp file
               that have a non-null ut_name field.
         @V    The value of VERSION, as given in the defaults file.
         To display a single '@' character, use either '\@' or '@@'.



  12.3.  Customizing uugetty

  There are lots of parameters you can tweak for each port you have.
  These are implemented in separate config files for each port.  The
  file /etc/conf.uugetty will be used by all instances of uugetty, and
  /etc/conf.uugetty.ttySN will only be used by that one port.  Sample
  default config files can be found with the getty_ps source files,
  which come with most Linux distributions.  Due to space concerns, they
  are not listed here.  Note that if you are using older versions of
  uugetty (older than 2.0.7e), or aren't using FSSTND, then the default
  file will be /etc/default/uugetty.ttySN.  Greg's
  /etc/conf.uugetty.ttyS3 looked like this:


       # sample uugetty configuration file for a Hayes compatible modem to allow
       # incoming modem connections
       #
       # line to initialize
       INITLINE=ttyS3
       # timeout to disconnect if idle...
       TIMEOUT=60
       # modem initialization string...
       # format: <expect> <send> ... (chat sequence)
       INIT="" AT\r OK\r\n
       WAITFOR=RING
       CONNECT="" ATA\r CONNECT\s\A
       # this line sets the time to delay before sending the login banner
       DELAY=1
       #DEBUG=010



  Add the following line to your /etc/inittab, so that uugetty is run on
  your serial port, substituting in the correct information for your
  environment - run-levels (2345 or 345, etc.)  config file location,
  port, speed, and default terminal type:



       S3:2345:respawn:/sbin/uugetty -d /etc/default/uugetty.ttyS3 ttyS3 F115200 vt100



  Restart init:


       linux# init q


  For the speed parameter in your /etc/inittab, you want to use the
  highest bps rate that your modem supports.

  Now Linux will be watching your serial port for connections.  Dial in
  from another machine and login to you Linux system.


  uugetty has a lot more options, see the man page for uugetty) (often
  just called getty) for a full description.  Among other things there
  is a scheduling feature, and a ringback feature.


  13.  What Speed Should I Use with My Modem?

  By "speed" we really mean the "data flow rate" but almost everybody
  incorrectly calls it speed.  For all modern modems you have no choice
  of the speed that the modem uses on the telephone line since it will
  automatically choose the highest possible speed that is possible under
  the circumstances.  But you do have a choice as to what speed will be
  used between your modem and your computer.  This is sometimes called
  "DTE speed" where "DTE" stands for Data Terminal Equipment (Your
  computer is a DTE.)  You need to set this speed high enough so this
  part of the signal path will not be a bottleneck.  The setting for the
  DTE speed is the maximum speed of this link.  Most of the time it will
  likely operate at lower speeds.

  For an external modem, DTE speed is the speed (in bits/sec) of the
  flow over the cable between you modem and PC.  For an internal modem,
  it's the same idea since the modem also emulates a serial port.  It
  may seem ridiculous having a speed limit on communication between a
  computer and a modem card that is directly connected inside the
  computer to a much higher speed bus.  But it's that way since the
  modem card probably includes a dedicated serial port which does have
  speed limits (and settable speeds).


  13.1.  Speed and Data Compression

  What speed do you choose?  If it were not for "data compression" one
  might try to choose a DTE speed exactly the same as the modem speed.
  Data compression takes the bytes sent to the modem from your computer
  and encodes them into a fewer number of bytes.  For example, if the
  flow (speed) from the PC to the modem was 20,000 bytes/sec (bps) and
  the compression ratio was 2 to 1, then only 10,000 bytes/sec would
  flow over the telephone line.  Thus for a 2:1 compression ratio you
  need to set the speed double the maximum modem speed on the phone
  line.  If the compression ratio is 3 to 1 you need to set it 3 times
  faster.


  13.2.  Where do I Set Speed ?

  This DTE speed is normally set by a menu in your communications
  program or by an option given to the getty command if someone is
  dialing in.  You can't set the DCE modem-to-modem speed.


  13.3.  Can't Set a High Enough Speed

  You need to find out the highest speed supported by your hardware.  As
  of late 1998 most hardware only supported speeds up to 115.2k bps.  A
  few 56k internal modems support 230.4k bps.  Recent Linux kernels
  support high speeds (over 115.2k) but you might have difficulty using
  it because of one or both of the following reasons:


  1. The application program (or stty) will not accept the high speed.

  2. Setserial has a default speed of 115,200 (but this default is easy
     to change)


  13.3.1.  How speed is set in hardware: the divisor and baud_base

  Here's a list of commonly used divisors and their corresponding speeds
  (assuming a maximum speed of 115,200): 1 (115.2k), 2 (57.6k), 3
  (38.4k), 6 (19.2k), 12 (9.6k), 24 (4.8k), 48 (2.4k), 96 (1.2k), etc.
  The serial driver sets the speed in the hardware by sending the
  hardware only a "divisor" (a positive integer).  This "divisor"
  divides the maximum speed of the hardware resulting in a slower speed
  (except a divisor of 1 obviously tells the hardware to run at maximum
  speed).

  Normally, if you specify a speed of 115.2k (in your communication
  program or by stty) then the serial driver sets the port hardware to
  divisor 1 which obviously sets the highest speed.  If you happen to
  have hardware with a maximum speed of say 230.4k, then specifying
  115.2k will result in divisor 1 and will actually give you 230.4k.
  This is double the speed that you set.  In fact, for any speed you
  set, the actual speed will be double.  If you had hardware that could
  run at 460.8k then the actual speed would be quadruple what you set.


  13.3.2.  Work-arounds for setting speed

  To correct this accounting (but not always fix the problem) you may
  use "setserial" to change the baud_base to the actual maximal speed of
  your port such as 230.4k.  Then if you set the speed (by your
  application or by stty) to 230.4k, a divisor of 1 will be used and
  you'll get the same speed as you set.  PROBLEM: stty and many
  communication programs (as of mid 1999) still have 115.2k as their
  maximum speed setting and will not let you set 230.4k, etc.  So in
  these cases one solution is not to change anything with setserial but
  mentally keep in mind that the actual speed is always double what you
  set.

  There's another work-around which is not much better.  To use it you
  set the baud_base (with setserial) to the maximal speed of your
  hardware.  This corrects the accounting so that if you set say 115.2k
  you actually get 115.2k.  Now you still have to figure out how to set
  the highest speed if your communication program (or the like) will not
  let you do it.  Fortunately, setserial has a way to do this: use the
  "spd_cust" parameter with "divisor 1".  Then when you set the speed to
  38400 in a communication program, the divisor will be set to 1 in the
  port and it will operate at maximum speed.  For example:
  setserial /dev/ttyS2 spd_cust baud_base 230400 divisor 1
  Don't try using "divisor" for any other purpose other than the special
  use illustrated above (with spd_cust).

  If there are two or more high speeds that you want to use that your
  communication program can't set, then it's not quite as easy as above.
  But the same principles apply.   You could just keep the default
  baud_base and understand that when you set a speed you are really only
  setting a divisor.  So your actual speed will always be your maximum
  speed divided by whatever divisor is set by the serial driver.  See
  ``How speed is set in hardware: the divisor and baud_base''


  13.3.3.  Crystal frequency is not baud_base

  Note that the baud_base setting is usually much lower than the
  frequency of the crystal oscillator in the hardware since the crystal
  frequency is often divided by 16 in the hardware to get the actual top
  speed.  The reason the crystal frequency needs to be higher is so that
  this high crystal speed can be used to take a number of samples of
  each  bit to determine if it's a 1 or a 0.



  13.4.  Speed Table

  It's best to have at least a 16650 UART for a 56k modem but few modems
  support it.  Second best is a 16550 that has been tweaked to give
  230,400 bps.  Here are some suggested speeds to set your serial line
  if your modem speed is:

    56k (V.90) use 115200 bps or 230400 bps (a few % faster ?)

    28.8k (V.34), 33.6k (V.34) use 115200 bps

    14400 bps (V.32bis), with V.42bis data compression, use 57600 bps

    9600 bps (V.32), with V.42bis data compression, use 38400 bps

    slower than a 9600 bps (V.32) modem, set your speed to the highest
     speed your modem supports.


  14.  Communications Programs And Utilities

  PPP is by far the most widely used.  It's used for Internet access.
  For dialing out to public libraries, bulletin boards, etc.  minicom is
  the most popular followed by Seyon (X-Windows only) and Kermit.


  14.1.  Minicom vs. Kermit

  Minicom is only a communications program while Kermit is both a
  communications program and a file transfer protocol.  But one may use
  the Kermit protocol from within Minicom (provided one has Kermit
  installed on one's PC) .  Minicom is menu based while Kermit is
  command line based (interactive at the special Kermit prompt).  While
  the Kermit program is free software, the documentation is not all
  free.  There is no detailed manual supplied and it is suggested that
  you purchase a book as the manual.  However Kermit has interactive
  online help which tells all but lacks tutorial explanations for the
  beginner.  Commands may be put in a script file so you don't have to
  type them over again each time.  Kermit (as a communications program)
  is more powerful than Minicom.

  Although all Minicom documentation is free, it's not as extensive as
  Kermit's.  Since permission is required to include Kermit in a
  commercial distribution, and since the documentation is not entirely
  free, some distributions don't include Kermit.  In my opinion it's
  easier to set up Minicom and there is less to learn.


  14.2.  List of Communication Software

  Here is a list of some communication software you can choose from, If
  they didn't come with your distribution they should be available via
  FTP, .  I would like comparative comments on the dialout programs.
  Are the least popular ones obsolete?



  14.2.1.  Least Popular Dialout



    ecu - a communications program

    pcomm - procomm-like communications program with zmodem

    xc - xcomm communication package


  14.2.2.  Most Popular Dialout



    ppp dialers for getting on the internet: chat, wvdial

    minicom - telix-like communications program.  Supports scripts,
     zmodem, kermit

    C-Kermit <http://www.columbia.edu/kermit/> - portable, scriptable,
     serial and TCP/IP communications including file transfer,
     character-set translation, and zmodem support

    seyon - X based communication program


  14.2.3.  Fax



    efax a small fax program

    hylafax a large fax program based on the client-server model.

    mgetty+fax handles fax stuff and login for dial-ins


  14.2.4.  Voicemail Software



    mvm < http://www-internal.alphabet.ch/~schaefer/mvm/> is a Minimal
     VoiceMail for Linux

    vgetty is an extension to mgetty that handles voicemail for some
     modems.  It should come with recent releases of mgetty.


  14.2.5.  Dial-in (uses getty)



    mgetty+fax is for modems and is well documented (except for
     voicemail as of early 1999).  It also handles fax stuff and
     provides an alternative to uugetty.  It's incorporating voicemail
     (using vgetty) features.  See ``About mgetty''

    uugetty is also for modems.  It comes as a part of the ps_getty
     package.  See ``About getty_ps''


  14.2.6.  Other



    callback is where you dial out to a remote modem and then that
     modem hangs up and calls you back (to save on phone bills).

    SLiRP and term provide a PPP-like service that you can run in user
     space on a remote computer with a shell account.  See ``term and
     SLiRP'' for more details

    ZyXEL is a control program for ZyXEL U-1496 modems.  It handles
     dialin, dialout, dial back security, FAXing, and voice mailbox
     functions.

    SLIP and PPP software can be found at
      ftp://metalab.unc.edu/pub/Linux/system/network/serial.

    Other things can be found on
     ftp://metalab.unc.edu/pub/Linux/system/serial and
     ftp://metalab.unc.edu/pub/Linux/apps/serialcomm or one of the many
     mirrors.  These are the directories where serial programs are kept.


  14.3.  SLiRP and term

  SLiRP and term are programs which are of use if you only have a dial-
  up shell account on a Unix-like machine and want to get the equivalent
  of a PPP account (or the like) without being authorized to have it
  (possibly because you don't want to pay extra for it, etc.).  SLiRP is
  more popular than term which is almost obsolete.

  To use SLiRP you install it in your shell account on the remote
  computer.  Then you dial up the account and run SLiRP on the remote
  and PPP on your local PC.  You now have a PPP connection over which
  you may run a web browser on your local PC such as Netscape, etc.
  There may be some problems as SLiRP is not as good as a real PPP
  account.  Some accounts may provide SLiRP since it saves on IP
  addresses (You have no IP address while using SLiRP).

  term is something like SLiRP only you need to run term on both the
  local and remote computer.  There is no PPP on the phone line since
  term uses its own protocol.  To use term from your PC you need to use
  a term-aware version of ftp to do ftp, etc.  Thus it's easier to use
  SLiRP since the ordinary version of ftp works fine with SLiRP.  There
  is an unmaintained Term HOWTO.


  15.  What Are UARTs?  How Do They Affect Performance?

  15.1.  Introduction to UARTS

  (This section is also in the Serial-HOWTO)

  UARTs (Universal Asynchronous Receiver Transmitter) are serial chips
  on your PC motherboard (or on an internal modem card).   The UART
  function may also be done on a chip that does other things as well.
  On older computers like many 486's, the chips were on the disk IO
  controller card.  Still older computer have dedicated serial boards.

  The UART's purpose is to convert bytes from the PC's parallel bus to a
  serial bit-stream.  The cable going out of the serial port is serial
  and has only one wire for each direction of flow.  The serial port
  sends out a stream of bits, one bit at a time.  Conversely, the bit
  stream that enters the serial port via the external cable is converted
  to parallel bytes that the computer can understand.  UARTs deal with
  data in byte sized pieces, which is conveniently also the size of
  ASCII characters.


  Say you have a terminal hooked up to your PC.  When you type a
  character, the terminal gives that character to its transmitter (also
  a UART).  The transmitter sends that byte out onto the serial line,
  one bit at a time, at a specific rate.  On the PC end, the receiving
  UART takes all the bits and rebuilds the (parallel) byte and puts it
  in a buffer.

  Along with converting between serial and parallel, the UART does some
  other things as a byproduct (side effect) of its primary task.  The
  voltage used to represent bits is also converted (changed).  Extra
  bits (called start and stop bits) are added to each byte before it is
  transmitted.  See the Serial-HOWTO section, ``Voltage Waveshapes'' for
  details.  Also, while the flow rate (in bytes/sec) on the parallel bus
  inside the computer is very high, the flow rate out the UART on the
  serial port side of it is much lower.  The UART has a fixed set of
  rates (speeds) which it can use at its serial port interface.


  15.2.  Two Types of UARTs

  There are two basic types of UARTs: dumb UARTS and FIFO UARTS.  Dumb
  UARTs are the 8250, 16450, early 16550, and early 16650.  They are
  obsolete but if you understand how they work it's easy to understand
  how the modern ones work with FIFO UARTS ( late 16550, 16550A, 16c552,
  late 16650, 16750, and 16C950).

  There is some confusion regarding 16550.  Early models had a bug and
  worked properly only as 16450's (no FIFO).  Later models with the bug
  fixed were named 16550A but many manufacturers did not accept the name
  change and continued calling it a 16550.  Most all 16550's in use
  today are like 16550A's.  Linux will report it as being a 16550A even
  though your hardware manual (or a label note) says it's a 16550.  A
  similar situation exists for the 16650 (only it's worse since the
  manufacturer allegedly didn't admit anything was wrong).  Linux will
  report a late 16650 as being a 16650V2.  If it reports it as 16650 it
  is bad news and only is used as if it had a one-byte buffer.


  15.3.  FIFOs

  To understand the differences between dumb and FIFO (First In, First
  Out queue discipline) first let's examine what happens when a UART has
  sent or received a byte.  The UART itself can't do anything with the
  data passing thru it, it just receives and sends it.  For the original
  dumb UARTS, the CPU gets an interrupt from the serial device every
  time a byte has been sent or received.  The CPU then moves the
  received byte out of the UART's buffer and into memory somewhere, or
  gives the UART another byte to send.  The 8250 and 16450 UARTs only
  have a 1 byte buffer.  That means, that every time 1 byte is sent or
  received, the CPU is interrupted.  At low transfer rates, this is OK.
  But, at high transfer rates, the CPU gets so busy dealing with the
  UART, that is doesn't have time to adequately tend to other tasks.  In
  some cases, the CPU does not get around to servicing the interrupt in
  time, and the byte is overwritten, because they are coming in so fast.
  This is called an "overrun" or "overflow".

  That's where the FIFO UARTs are useful.  The 16550A (or 16550) FIFO
  chip comes with 16 byte FIFO buffers.  This means that it can receive
  up to 14 bytes (or send 16 bytes) before it has to interrupt the CPU.
  Not only can it wait for more bytes, but the CPU then can transfer all
  14 (or more) bytes at a time.  This is a significant advantage over
  the other UARTs, which only have 1 byte buffers.  The CPU receives
  less interrupts, and is free to do other things.  Data is not lost,
  and everyone is happy.  Note that the interrupt threshold of FIFO
  buffers (trigger level) may be set at less than 14.  1, 4 and 8 are
  other possible choices.
  While most PC's only have a 16550 with 16-byte buffers, better UARTS
  have even larger buffers.  Note that the interrupt is issued slightly
  before the buffer get full (at say a "trigger level" of 14 bytes for a
  16-byte buffer).  This allows room for a few more bytes to be received
  during the time that the interrupt is being serviced.  The trigger
  level may be set to various permitted values by kernel software.  A
  trigger level of 1 will be almost like a dumb UART (except that it
  still has room for 15 more bytes after it issues the interrupt).

  If you type something while visiting a BBS, the characters you type go
  out thru the serial port.  Your typed characters that you see on the
  screen are what was echoed back thru the telephone line thru your
  modem and then thru your serial port to the screen.  If you had a
  16-byte buffer on the serial port which held back characters until it
  had 14 of them, you would need to type many characters before you
  could see what you typed (before they appeared on the screen).  This
  would be very confusing but there is a "timeout" to prevent this.
  Thus you normally see a character on the screen just as soon as you
  type it.

  The "timeout" works like this for the receive UART buffer: If
  characters arrive one after another, then an interrupt is issued only
  when say the 14th character reaches the buffer.  But if a character
  arrives and the next character doesn't arrive soon thereafter, then an
  interrupt is issued.  This happens even though there are not 14
  characters in the buffer (there may only be one character in it).
  Thus when what you type goes thru this buffer, it acts almost like a
  1-byte buffer even though it is actually a 16-byte buffer (unless your
  typing speed is a hundred times faster than normal).  There is also
  "timeout" for the transmit buffer as well.


  15.4.  UART Model Numbers

  Here's a list of UARTs.  TL is Trigger Level

    8250, 16450, early 16550: Obsolete with 1-byte buffers

    16550, 16550A, 16c552: 16-byte buffers, TL=1,4,8,14

    16650:  32-byte buffers. Speed up to 460.8 kbps

    16750:  64-byte buffer for send, 56-byte for receive.  Speed up to
     921.6 kbps

    Hayes ESP: 1k-byte buffers.

  The obsolete ones are only good for modems no higher than 14.4k (DTE
  speeds up to 38400 bps).  For modern modems you need at least a 16550
  (and not an early 16550).  For V.90 56k modems, it may be a several
  percent faster with a 16650 (especially if you are downloading
  uncompressed files).  The main advantage of the 16650 is its larger
  buffer size as the extra speed isn't needed unless the modem
  compression ratio is high.  Some 56k internal modems may come with a
  16650 ??

  Non-UART, and intelligent multiport boards use DSP chips to do
  additional buffering and control, thus relieving the CPU even more.
  For example, the Cyclades Cyclom, and Stallion EasyIO boards use a
  Cirrus Logic CD1400 RISC UART, and many boards use 80186 CPUs or even
  special RISC CPUs, to handle the serial IO.

  Most newer PC's (486's, Pentiums, or better) come with 16550A's
  (usually called just 16550's).  If you have something really old the
  chip may unplug so that you may be able to upgrade by buying a 16550A
  chip and replacing your existing 16450 UART.  If the functionality has
  been put on another type of chip, you are out of luck.  If the UART is
  socketed, then upgrading is easy (if you can find a replacement).  The
  new and old are pin-to-pin compatible.  It may be more feasible to
  just buy a new serial board on the Internet (few retail stores stock
  them today).



  16.  Troubleshooting

  16.1.  My Modem is Physically There but Can't be Found

  The error messages could be something like "No modem detected", "Modem
  not responding", or (strange) "You are already online" (from Minicom).
  If you have installed an internal modem (serial port is builtin) or
  are using an external one and don't know what serial port it's
  connected to then the problem is to find the serial port.  See ``My
  Serial Port is Physically There but Can't be Found''.  This section is
  about finding out which serial port has the modem on it.

  There's a program that looks for modems on commonly used serial ports
  called "wvdialconf".  Just type "wvdialconf <a-new-file-name>".  It
  will create the new file as a configuration file but you don't need
  this file unless you are going to use "wvdial" for dialing.  See
  ``What is wvdialconf ?''  Unfortunately, if your modem is in "online
  data" mode, wvdialconf will report "No modem detected"  See ``No
  response to AT''

  Your problem could be due to a winmodem (or the like) which can't be
  used with Linux.  See ``Avoid most software modems'' The "setserial
  program may be used to detect serial ports but will not detect modems
  on them.  Thus "wvdialconf" is best to try first.

  Another way try to find out if there's a modem on a port is to start
  "minicom" on the port (after first setting up minicom for the correct
  serial port --you will need to save the setup and then exit minicom
  and start it again).  Then type "AT" and you should see OK (or 0 if
  it's set for "digit result codes").  The results may be:

    No response.  See ``No response to AT''

    It takes many seconds to get an expected truncated response
     (including only the cursor moving down one line).  See ``Extremely
     Slow: Text appears on the screen slowly after long delays''

    Some strange characters appear but they are not in response to AT.
     This likely means that your modem is still connected to something
     at the other end of the phone line which is sending some cryptic
     packets or the like.


  16.1.1.  No response to AT

  The modem should send you "OK" in response to your "AT" which you type
  to the modem (using minicom or the like).  If you don't see "OK" (and
  in most cases don't even see the "AT" you typed either) then the modem
  is not responding (often because what you type doesn't even get to the
  modem).

  A common cause is that there is no modem on the serial port you are
  typing to.  For the case of an internal modem, that serial port likely
  doesn't exist either.  That's because the PnP modem card (which has a
  built-in serial port) has either not been configured (by isapnp or the
  like) or has been configured incorrectly.  See ``My Serial Port is
  Physically There but Can't be Found''.

  If what you type is really getting thru to a modem, then the lack of
  response could be due to the modem being in "online data" mode where
  it can't accept any AT commands.  You may have been using the modem
  and then abruptly disconnected (such as killing the process with
  signal 9).  In that case your modem did not get reset to "command
  mode" where it can interact to AT commands.  Thus the message from
  minicom "You are already online.  Hangup first."  Well, you are sort
  of online but you are may not be connected to anything over the phone
  line.  Wvdial will report "modem not responding" for the same
  situation.

  To fix this as a last resort you could reboot the computer.  Another
  way to try to fix this is to send +++ to the modem to tell it to
  escape back to "command mode" from "online data mode".  On both sides
  of the +++ sequence there must be about 1 second of delay (nothing
  sent during "guard time").  This may not work if another process is
  using the modem since the +++ sequence could wind up with other
  characters inserted in between them or after the +++ (during the guard
  time).  Ironically, even if the modem line is idle, typing an
  unexpected +++ is likely to set off an exchange of control packets
  (that you never see) that will violate the required guard time so that
  the +++ doesn't do what you wanted.  +++ is usually in the string that
  is named "hangup string" so if you command minicom (or the like) to
  hangup it might work.  Another way to do this is to just exit minicom
  and then run minicom again.


  16.2.  "Modem busy"

  The modem could actually be in use (busy).  Another cause reported for
  the SuSE distribution is that there may be two serial drivers present
  instead of one.  Both try to work at the same time with confusing
  results.  One driver may run ahead of the other and the second driver
  finds the modem "busy" since the first driver is trying (in vain) to
  use it.  If serial driver support is built-in, don't also compile it
  in.  Also, don't let the serial module load if serial support is
  already built-in (or compiled-in).  There are likely other causes for
  a false "modem busy".


  16.3.  I can't get near 56k on my 56k modem

  There must be very low noise on the line for it to work at even close
  to 56k.  Some phone lines are so bad that the speeds obtainable are
  much slower than 56k (like 28.8k or even slower).  Sometimes extension
  phones connected to the same line can cause problems.  To test this
  you might connect your modem directly at the point where the telephone
  line enters the building with the feeds for everything else on that
  line disconnected (if others can tolerate such a test).


  16.4.  Uploading (downloading) files is broken/slow

  Flow control (both at your PC and/or modem-to-modem) may not be
  enabled.  For the uploading case: If you have set a high DTE speed
  (like 115.2k) then flow from your modem to your PC may work OK but
  uploading flow in the other direction will not all get thru due to the
  telephone line bottleneck.  This will result in many errors and the
  resending of packets.  It may thus take far too long to send a file.
  In some cases, files don't make it thru at all.

  For the downloading case: If you're downloading long uncompressed
  files or web pages (and your modem uses data compression) or if you've
  set a low DTE speed, then downloading may also be broken due to no
  flow control.

  16.5.  For Dial-in I Keep Getting "line NNN of inittab invalid"

  Make sure you are using the correct syntax for your version of init.
  The different init's that are out there use different syntax in the
  /etc/inittab file.  Make sure you are using the correct syntax for
  your version of getty.



  16.6.  I Keep Getting: ``Id "S3" respawning too fast: disabled for 5
  minutes''

  Id "S3" is just an example.  In this case look on the line which
  starts with "S3" in /etc/inittab.  This is causing the problem.  Make
  sure the syntax for this line is correct and that the device (ttyS3)
  exists and can be found.

  Make sure your modem is configured correctly.  Look at registers E and
  Q.  This can occur when your modem is chatting with getty.

  If you use uugetty, verify that your /etc/gettydefs syntax is correct
  by doing the following:


       linux# getty -c /etc/gettydefs



  This can also happen when the uugetty initialization is failing.  See
  section ``uugetty Still Doesn't Work''.



  16.7.  My Modem is Hosed after Someone Hangs Up, or uugetty doesn't
  respawn


  This can happen when your modem doesn't reset when DTR is dropped.
  Greg Hankins saw his RD and SD LEDs go crazy when this happened.  You
  need to have your modem reset.  Most Hayes compatible modems do this
  with &D3, but on his USR Courier, he had to set &D2 and S13=1.  Check
  your modem manual (if you have one).


  16.8.  uugetty Still Doesn't Work

  There is a DEBUG option that comes with getty_ps.  Edit your config
  file /etc/conf.{uu}getty.ttySN and add DEBUG=NNN.  Where NNN is one of
  the following combination of numbers according to what you are trying
  to debug:


       D_OPT   001            option settings
       D_DEF   002            defaults file processing
       D_UTMP  004            utmp/wtmp processing
       D_INIT  010            line initialization (INIT)
       D_GTAB  020            gettytab file processing
       D_RUN   040            other runtime diagnostics
       D_RB    100            ringback debugging
       D_LOCK  200            uugetty lockfile processing
       D_SCH   400            schedule processing
       D_ALL   777            everything


  Setting DEBUG=010 is a good place to start.

  If you are running syslogd, debugging info will appear in your log
  files.  If you aren't running syslogd info will appear in
  /tmp/getty:ttySN for debugging getty and /tmp/uugetty:ttySN for
  uugetty, and in /var/adm/getty.log.  Look at the debugging info and
  see what is going on.  Most likely, you will need to tune some of the
  parameters in your config file, and reconfigure your modem.

  You could also try mgetty.  Some people have better luck with it.


  16.9.  (The following subsections are in both the Serial and Modem
  HOWTOs)

  16.10.  My Serial Port is Physically There but Can't be Found

  If a device (such as a modem) give evidence of working, then the
  serial port that it's on has been found.  If it doesn't work at all,
  then you need to make sure your serial port can be found.

  Check the BIOS menus and BIOS messages.  For the PCI bus use lspci or
  scanpci.  If it's an ISA bus PnP serial port, try "pnpdump --dumpregs"
  and/or see Plug-and-Play-HOWTO.  Using "scanport" will scan all ISA
  bus ports and may discover an unknown port that could be a serial port
  (but it doesn't probe the port).  It could hang your PC.  You may try
  probing with setserial.  See ``Probing''.  If nothing seems to get
  thru the port it may be accessible but have a bad interrupt.  See
  ``Extremely Slow: Text appears on the screen slowly after long
  delays''.  Use setserial -g to see what the serial driver thinks and
  check for IRQ and I0 address conflicts.  Even if you see no conflicts
  the driver may have incorrect information and conflicts may still
  exist.

  If two ports have the same IO address then probing it will erroneously
  indicate only one port.  Plug-and-play detection will find both ports
  so this should only be a problem if at least one port is not plug-and-
  play.  All sorts of errors may be reported/observed for devices
  illegally "sharing" a port but the fact that there are two devices on
  the same a port doesn't seem to get detected (except hopefully by
  you).  In the above case, if the IRQs are different then probing for
  IRQs with setserial might "detect" this situation by failing to detect
  any IRQ.  See ``Probing''.


  16.11.  Extremely Slow: Text appears on the screen slowly after long
  delays

  It's likely mis-set/conflicting interrupts.  Here are some of the
  symptoms which will happen the first time you try to use a modem,
  terminal, or printer.  In some cases you type something but nothing
  appears on the screen until many seconds later.  Only the last
  character typed may show up.  It may be just an invisible <return>
  character so all you notice is that the cursor jumps down one line.
  In other cases where a lot of data should appear on the screen, only a
  batch of about 16 characters appear.  Then there is a long wait of
  many seconds for the next batch of characters.  You might also get
  "input overrun" error messages (or find them in logs).

  For more details on the symptoms and why this happens see the Serial-
  HOWTO section: "Interrupt Problem Details".

  If it involves Plug-and-Play devices, see also Plug-and-Play-HOWTO.

  As a quick check to see if it really is an interrupt problem, set the
  IRQ to 0 with "setserial".  This will tell the driver to use polling
  instead of interrupts.  If this seems to fix the "slow" problem then
  you had an interrupt problem.  You should still try to solve the
  problem since polling uses excessive computer resources and sometimes
  drastically decreases your thruput.

  Checking to find the interrupt conflict may not be easy since Linux
  supposedly doesn't permit any interrupt conflicts and will send you a
  ``/dev/ttyS?: Device or resource busy'' error message if it thinks you
  are attempting to create a conflict.  But a real conflict can be
  created if "setserial" has incorrect information.  Thus using
  "setserial" will not reveal the conflict (nor will looking at
  /proc/interrupts which bases its info on "setserial").  You still need
  to know what "setserial" thinks so that you can pinpoint where it's
  wrong and change it when you determine what's really set in the
  hardware.

  What you need to do is to check how the hardware is set by checking
  jumpers or using PnP software to check how the hardware is actually
  set.  For PnP run either "pnpdump --dumpregs" (if ISA bus) or run
  "lspci" (if PCI bus).  Compare this to how Linux (e.g. "setserial")
  thinks the hardware is set.


  16.12.  Somewhat Slow: I expected it to be a few times faster

  One reason may be that whatever is on the serial port (such as a
  modem, terminal, printer) doesn't work as fast as you thought it did.
  A 56k Modem seldom works at 56k and the Internet often has congestion
  and bottlenecks that slow things down.  If the modem on the other end
  does not have a digital connection to the phone line (and uses a
  special "digital modem" not sold in most computer stores), then speeds
  above 33.6k are not possible.

  Another possible reason is that the serial driver thinks you have an
  obsolete serial port (UART 8250,16450 or early 16550).  See ``What Are
  UARTs?''.  Use "setserial -g /dev/ttyS*".  If it shows anything less
  than a 16550A, this is likely your problem.  Then if "setserial" has
  it wrong, change it.  See ``What is Setserial'' for more info.  Of
  course if you really do have an obsolete serial port, lying about it
  to setserial will only make things worse.


  16.13.  The Startup Screen Show Wrong IRQs for the Serial Ports.

  Linux does not do any IRQ detection on startup.  When the serial
  module loads it only does serial device detection.  Thus, disregard
  what it says about the IRQ, because it's just assuming the standard
  IRQs.  This is done, because IRQ detection is unreliable, and can be
  fooled.  But if and when setserial runs from a start-up script, it
  changes the IRQ's and displays the new (and hopefully correct) state
  on on the startup screen.  If the wrong IRQ is not corrected by a
  later display on the screen, then you've got a problem.

  So, even though I have my ttyS2 set at IRQ 5, I still see


       ttyS02 at 0x03e8 (irq = 4) is a 16550A



  at first when Linux boots.  (Older kernels may show "ttyS02" as
  "tty02") You have to use setserial to tell Linux the IRQ you are
  using.


  16.14.  "Cannot open /dev/ttyS?: Permission denied"

  Check the file permissions on this port with "ls -l /dev/ttyS?"_ If
  you own the ttyS? then you need read and write permissions: crw with
  the c (Character device) in col. 1.  It you don't own it then it
  should show rw- in cols. 8 & 9 which means that everyone has read and
  write permission on it.  Use "chmod" to change permissions.  There are
  more complicated ways to get access like belonging to a "group" that
  has group permission.


  16.15.  "Operation not supported by device" for ttyS?

  This means that an operation requested by setserial, stty, etc.
  couldn't be done because the kernel doesn't support doing it.
  Formerly this was often due to the "serial" module not being loaded.
  But with the advent of PnP, it may likely mean that there is no modem
  (or other serial device) at the address where the driver (and
  setserial) thinks it is.  If there is no modem there, commands (for
  operations) sent to that address obviously don't get done.  See ``What
  is set in my serial port hardware?''

  If the "serial" module wasn't loaded but "lsmod" shows you it's now
  loaded it might be the case that it's loaded now but wasn't loaded
  when you got the error message.  In many cases the module will
  automatically loaded when needed (if it can be found).  To force
  loading of the "serial" module it may be listed in the file:
  /etc/modules.conf or /etc/modules.  The actual module should reside
  in: /lib/modules/.../misc/serial.o.


  16.16.  "Cannot create lockfile. Sorry"

  When a port is "opened" by a program a lockfile is created in
  /var/lock/.  Wrong permissions for the lock directory will not allow a
  lockfile to be created there.  Use "ls -ld /var/lock" to see if the
  permissions are OK: usually rwx for everyone (repeated 3 times).  If
  it's wrong, use "chmod" to fix it.  Of course, if there is no "lock"
  directory no lockfile can be created there.  For more info on
  lockfiles see the Serial-HOWTO subsection: "What Are Lock Files".


  16.17.  "Device /dev/ttyS? is locked."

  This means that someone else (or some other process) is supposedly
  using the serial port.  There are various ways to try to find out what
  process is "using" it.  One way is to look at the contents of the
  lockfile (/var/lock/LCK...).  It should be the process id.  If the
  process id is say 261 type "ps 261" to find out what it is.  Then if
  the process is no longer needed, it may be gracefully killed by "kill
  261".  If it refuses to be killed use "kill -9 261" to force it to be
  killed, but then the lockfile will not be removed and you'll need to
  delete it manually.  Of course if there is no such process as 161 then
  you may just remove the lockfile but in most cases the lockfile should
  have been automatically removed if it contained a stale process id
  (such as 261).


  16.18.  "/dev/ttyS?: Device or resource busy"

  This means that the device you are trying to access (or use) is
  supposedly busy (in use) or that a resource it needs (such as an IRQ)
  is supposedly being used by another device.  Sometimes it actually is
  "busy" but in other cases it erroneously appears to be "busy".


  The ``resource busy'' part often means (example for ttyS2) ``You can't
  use ttyS2 since another device is using ttyS2's interrupt.'' The
  potential interrupt conflict is inferred from what "setserial" thinks.
  A more accurate error message would be ``Can't use ttyS2 since the
  setserial data (and kernel data) indicates that another device is
  using ttyS2's interrupt''.  If two devices use the same IRQ and you
  start up only one of the devices, everything is OK because there is no
  conflict yet.  But when you next try to start the second device
  (without quitting the first device) you get a "... resource busy"
  error message.  This is because the kernel only keeps track of what
  IRQs are actually in use and conflicts don't happen unless the devices
  are in use (open).

  There are two possible cases when you see this message:

  1. There may be a real interrupt conflict that is being avoided.

  2. Setserial has it wrong and the only reason ttyS2 can't be used is
     that setserial erroneously predicts a conflict.

  What you need to do is to find the interrupt setserial thinks ttyS2 is
  using.  This is easier said than done since you can't use the
  "setserial" command for ttyS2 since the IRQ for ttyS2 is supposedly
  "busy" and you will get the same "... busy" error message.  To fix
  this either reboot or: exit or gracefully kill all likely conflicting
  processes.   If you reboot: 1. Watch the boot-time messages for the
  serial ports.  2. Hope that the file that runs "setserial" at boot-
  time doesn't (by itself) create the same conflict again.

  If you think you know what IRQ ttyS2 is using then you may look at
  /proc/interrupts to find what else (besides another serial port) is
  currently using this IRQ.  You might also want to double check that
  any suspicious IRQs shown here (and by "setserial") are correct (the
  same as set in the hardware).  A way to test whether or not it is a
  potential interrupt conflict is to set the IRQ to 0 (polling) using
  "setserial".  Then if the busy message goes away, it was likely a
  potential interrupt conflcit.  It's not a good idea to leave it
  permanently set at 0 since more CPU resources will be used.

  This paragraph is mainly for the case when a modem is used for both
  dial-in and dial-out.  If the DCD signal is sent to a port, that port
  will think it's busy.  This problem can arise when you are trying to
  dial out with a modem when DCD or DTR are not implemented correctly.
  DCD should only be on (asserted) when there is an actual connection
  (ie someone has dialed in), not when getty is watching the port.
  Check to make sure that your modem is configured to only assert DCD
  when there is a connection.  DTR should be on (asserted) whenever
  something is using, or watching the line, like getty, kermit, or some
  other comm program.


  16.19.  Troubleshooting Tools

  These are some of the programs you might want to use in
  troubleshooting:

    "lsof /dev/ttyS*" will list serial ports which are open.

    "setserial" shows and sets the low-level hardware configuration of
     a port (what the driver thinks it is).  See ``What is Setserial''

    "stty" shows and sets the configuration of a port (except for that
     handled by "setserial").  See the Serial-HOWTO section: "Stty".

    "modemstat" or "statserial" will show the current state of various
     modem signal lines (such as DTR, CTS, etc.)
    "irqtune" will give serial port interrupts higher priority to
     improve performance.

    "hdparm" for hard-disk tuning may help some more.

    "lspci" shows the actual IRQs, etc. of hardware on the PCI bus.

    "pnpdump --dumpregs" shows the actual IRQs, etc. of hardware for
     PnP devices on the ISA bus.

    Some "files" in the /proc tree (such as ioports and interrupts).



  17.  Flash Upgrades

  Many modems can be upgraded by reprogramming their flash memories with
  an upgrade program which you get from the Internet.  By sending this
  "program" from the PC via the serial port to the modem, the modem will
  store this program in its non-volatile memory (it's still there when
  the power is turned off).  The instructions on installing it are
  usually on how to do in under Windows so you'll need to figure out how
  to do the equivalent under Linux (unless you want to install the
  upgrade under Windows).  Sending the program to the modem is often
  called a download.

  If the latest version of this HOWTO still contains this request (see
  ``New Versions of this HOWTO'') please send me your experiences with
  installing such upgrades that will be helpful to others.

  Here's the general idea of doing an upgrade.  First, there may be a
  command that you need to send your modem to tell it that what follows
  is a flash ROM upgrade.  In one case this was AT**  You can do this by
  starting a communications program (such as minicom) and type.  First
  type AT <enter> to see if your modem is there and answers "OK".

  Next, you need to send an file (sometimes two files) directly to the
  modem.  Communication programs (such as minicom) often use zmodem or
  kermit to send files to the modem (and beyond) but these put the file
  into packets which append headers and you want the exact file sent to
  the modem, not a modified one.  But the kermit communications program
  has a "transmit" command that will send the file directly (without
  using the kermit packets) so this is one way to send a file directly.
  Minicom didn't have this feature in 1998.

  Another way to send the file(s) would be to escape from the
  communications program to the shell (in minicom this is ^AJ) and then:
  cat upgrade_file_name > /dev/ttyS2  (if your serial port is ttyS2).
  Then go back to the communication program (type fg at the command line
  prompt in minicom) to see what happened.

  Here's an example session for a certain Rockwell modem (C-a is ^A):

  - Run minicom
  - Type AT** : see "Download initiated .."
  - C-a J
  - cat FLASH.S37 > /dev/modem
  - fg : see "Download flash code .."
  - C-a J
  - cat 283P1722.S37 > /dev/modem
  - fg : see "Device successfully programmed"



  18.  Other Sources of Information

  18.1.  Misc


    man pages for: agetty(8), getty(1m), gettydefs(5), init(1),
     isapnp(8), login(1), mgetty(8), setserial(8)

    Your modem manual (if it exists).  Some modems come without
     manuals.

    Serial  Suite <ftp://scicom.alphacdc.com/pub/linux> by Vern Hoxie
     is a collection of blurbs about the care and feeding of the Linux
     serial port plus some simple programs.

    The Linux serial mailing list.  To subscribe, send email to
     majordomo@vger.rutgers.edu, with ``subscribe linux-serial'' in the
     message body.  If you send ``help'' in the message body, you get a
     help message.  The server also serves many other Linux lists.  Send
     the ``lists'' command for a list of mailing lists.


  18.2.  Books

  I've been unable to find a good up-to-date book on modems.

    The Complete Modem Reference by Gilbert Held, 1997.  Contains too
     much info about obsolete topics.  More up-to-date info may be found
     on the Internet.

    Modems For Dummies by Tina Rathbone, 1996.  (Have never seen it.)

    Ultimate Modem Handbook by Cass R. Lewart, 1998.


  18.3.  HOWTOs



    Cable-Modem mini-howto

    ISDN Howto (not a LDP Howto)
     <http://www.suse.de/Support/sdb_e/isdn.html>: drivers for ISDN
     "Modems".  Much related info on this is in German.

    Linux-Modem-Sharing mini-howto.  Computers on a network share a
     single modem for dial-out (like a shared printer).

    Modems-HOWTO: In French (Not used in creating this Modem-HOWTO)

    NET-3-4-HOWTO: all about networking, including SLIP, CSLIP, and PPP

    PPP-HOWTO: help with PPP including modem set-up

    Serial-HOWTO has info on Multiport Serial Cards used for both
     terminals and banks of modems.  Covers the serial port in more
     detail than in the HOWTO.

    Serial-Programming-HOWTO: for some aspects of serial-port
     programming

    Text-Terminal-HOWTO: (including connecting up with modems)

    UUCP-HOWTO: for information on setting up UUCP


  18.4.  Usenet newsgroups



    comp.os.linux.answers FAQs, How-To's, READMEs, etc. about Linux.

    comp.os.linux.hardware Hardware compatibility with the Linux
     operating system.

    comp.os.linux.setup Linux installation and system administration.

    comp.dcom.modems Modems for all OS's


  18.5.  Web Sites



    Modem List of modems which work/don't_work under Linux
     <http://www.o2.net/~gromitkc/winmodem.html>

    Hayes AT modem commands Technical Reference for Hayes (tm) Modem
     Users <http://www.hayes.com/TechSupport/techref/>

    Rockwell-based modem commands
     <http://www.rss.rockwell.com/techinfo/>

    Modem FAQs:
     Navas 28800 Modem FAQ
     <http://web.aimnet.com/~jnavas/modem/faq.html>

    Curt's High Speed Modem Page
     <http://www.teleport.com/~curt/modems.html>

    Much info on 56k modems 56k Modem = v.Unreliable
     <http://808hi.com/56k/>

    Links to modem manufacturers
     <http://www.56k.com/links/Modem_Manufacturers/>

    Identifying modems by FCC ID
     <http://www.sbsdirect.com/fccenter.html>


  19.  Appendix A:  How Analog Modems Work (technical) (unfinished)

  19.1.  Modulation Details

  19.1.1.  Intro to Modulation

  This part describes the modulation methods used for conventional
  modems.  It doesn't cover the high speed methods (modulus conversion)
  sometimes used by ``56k Modems (v.90)''.  But 56k modems also use the
  modulation methods described here.

  Modulation is the conversion of a digital signal represented by binary
  binary (0 or 1) into an analog signal something like a sine wave.  The
  modulated signal consists pure sine wave "carrier" signal which is
  modified to convey information.  A pure carrier sine wave, unchanging
  in frequency and voltage, provides no flow of information at all
  (except that a carrier is present).  To make it convey information we
  modify (or modulate) this carrier.  There are 3 basic types of
  modulation: frequency, amplitude, and phase.  They will be explained
  next.


  19.1.2.  Frequency Modulation

  The simplest modulation method is frequency modulation.  Frequency is
  measured in cycles per second (of a sine wave).  It's the count of the
  number of times the sine wave shape repeats itself in a second.  This
  is the same as the number of times it reaches it peak value during a
  second.  The word "Hertz" (abbreviated Hz) is used to mean "cycles per
  second".

  A simple example of frequency modulation is where one frequency means
  a binary 0 and another means a 1.  For example, for some obsolete 300
  baud modems 1070 Hz meant a binary 0 while 1270 Hz meant a binary 1.
  This was called "frequency shift keying".  Instead of just two
  possible frequencies, more could be used to allow more information to
  be transmitted.  If we had 4 different frequencies (call them A, B, C,
  and D) then each frequency could stand for a pair of bits.  For
  example, to send 00 one would use frequency A.  To send 01, use
  frequency B; for 10 use C; for 11 use D.  In like manner, by using 8
  different frequencies we could send 3 bits with each shift in
  frequency.  Each time we double the number of possible frequencies we
  increase the number of bits it can represent by 1.


  19.1.3.  Amplitude Modulation

  Once one understands frequency modulation example above including the
  possibilities of representing a few bits by a single shift in
  frequency, it's easier to understand both amplitude modulation and
  phase modulation.  For amplitude modulation, one just changes the
  height (voltage) of the sine wave analogous to changing the frequency
  of the sine wave.  For a simple case there could only be 2 allowed
  amplitude levels, one representing a 0-bit and another representing a
  1-bit.  As explained for the case of frequency modulation, having more
  possible amplitudes will result in more information being transmitted
  per change in amplitude.


  19.1.4.  Phase Modulation

  To change the phase of a sine wave at a certain instant of time, we
  stop sending this old sine wave and immediately begin sending a new
  sine wave of the same frequency and amplitude.  If we started sending
  the new sine wave at the same voltage level (and slope) as existed
  when we stopped sending the old sine wave, there would be no change in
  phase (and no detectable change at all).  But suppose that we started
  up the new sine wave at a different point on the sine wave curve.
  Then there would likely be a sudden voltage jump at the point in time
  where the old sine wave stopped and the new sine wave began.  This is
  a phase shift and it's measured in degrees (deg.)  A 0 deg. (or a 360
  deg.) phase shift means no change at all while a 180 deg. phase shift
  just reverses the voltage (and slope) of the sine wave.  Put another
  way, a 180 deg. phase shift just skips over a half-period (180 deg.)
  at the point of transition.  Of course we could just skip over say 90
  deg. or 135 deg. etc.  As in the example for frequency modulation, the
  more possible phase shifts, the more bits a single shift in phase can
  represent.


  19.1.5.  Combination Modulation

  Instead of just selecting either frequency, amplitude, or phase
  modulation, we may chose to combine modulation methods.  Suppose that
  we have 256 possible frequencies and thus can send a byte (8 bits) for
  each shift in frequency (since 2 to the 8 power is 256).  Suppose also
  that we have another 256 different amplitudes so that each shift in
  amplitude represents a byte.  Also suppose there are 256 possible
  phase shifts.  Then a certain points in time we may make a shift in
  all 3 things: frequency, amplitude and phase.  This would send out 3
  bytes for each such transition.

  No modulation method in use today actually does this.  It's not
  practical due to the relatively long time it would take to detect all
  3 types of changes.  The main problem is that frequent shifts in phase
  can make it appear that a shift in frequency has happened when it
  actually didn't.

  To avoid this difficulty one may simultaneous change only the phase
  and amplitude (with no change in frequency).  This is called phase-
  amplitude modulation (sometimes also called quadrature amplitude
  modulation = QAM).  This method is used today for the common modem
  speeds of 14.4k, 28.8k, and 33.6k.  The only significant case where
  this modulation method is not used today is for 56k modems.  But even
  56k modems exclusively use QAM (phase-amplitude modulation) in the
  direction from your PC out the telephone line.  Sometimes even the
  other direction will also fall back to QAM when line conditions are
  not good enough.  Thus QAM (phase-amplitude modulation) still remains
  the most widely used method on ordinary telephone lines.


  19.2.  56k Modems (v.90)

  The "modulation" method used above 33.6k is entirely different than
  the common phase-amplitude modulation.  Since ordinary telephone calls
  are converted to digital signals at the local offices of the telephone
  company, the fastest speed that you can send digital data by an
  ordinary telephone call is the same speed that the telephone company
  uses over its digital portion of the phone call transmission.  What is
  this speed?  Well, it's close to 64kbps.  It would be 64k but
  sometimes bits are "stolen" for signalling purposes.  But if the phone
  Co. knows that the link is not for voice, bits may not get stolen.
  The case of 64k will be presented and then it will be explained why
  the actual speed is lower (56k or less --usually significantly less).

  Thus 64k is the absolute top speed possible for an ordinary telephone
  call using the digital portion of the circuit that was designed to
  send digital encodings of the human voice.  In order to use 64k, the
  modem must know exactly how the telephone company is doing its digital
  encoding of the analog signals.  This task is far too complicated if
  both sides of a telephone call have only an analog interface to the
  telephone company.  But if one side has a digital interface, then it's
  possible (at least in one direction).  Thus if your ISP has a digital
  interface to the phone company, the ISP may send out a certain digital
  signal over the phone lines toward your PC.  The digital signal from
  the ISP gets converted to analog at the local telephone office near
  your PC's location (perhaps near your home).  Then it's your modem's
  task to try to figure out exactly what that digital signal was.  If it
  could do this then transmission at 64k (the speed of the telephone
  company's digital signal) is possible in this direction.

  What method does the telephone company use to digitally encode analog
  signals?  It uses a method of sampling the amplitude of the analog
  signal at a rate of 8000 samples per second.  Each sample amplitude is
  encoded as a 8-bit (ASCII-like) byte.  (Note: 8 x 8000 = 64k)  This is
  called "Pulse Code Modulation" = PCM.  These bytes are then sent
  digitally on the telephone company's digital circuits where many calls
  share a single circuit using a time-sharing scheme known as "time
  division multiplexing".  Then finally at the local telephone office
  near your home, the digital signal is de-multiplexed resulting in the
  same digital signal as was originally created by PCM.  This signal is
  then converted back to analog and sent to your home.  Each 8-bit byte
  creates a certain amplitude of the analog signal.  Your modem's task
  is to determine just what that PCM 8-bit byte was based on the analog
  amplitude it detects.

  This is (sort of) "amplitude demodulation" but not really.  It's not
  amplitude demodulation because there is no carrier.  Actually, it's
  called "modulus conversion" which is the inverse of PCM.  In order to
  determine the digital codes the telephone Co. used to create the
  analog signal, the modem must sample this analog signal amplitude at
  exactly the same points in time the phone Co. used when it created the
  analog signal.  To do this a timing signal is generated from a
  residual 4kHz signal on the analog phone line.  The creation of
  amplitudes to go out to your home/office at 8k amplitudes/sec sort of
  creates a 4kHz signal.  Suppose every other amplitude was of opposite
  polarity.  Then there would be a 4kHz sine-like wave created.  Each
  amplitude is in a sense a 8-bit symbol and when to sample amplitudes
  is known as "symbol timing".

  Now the encoding of amplitudes in PCM is not linear.  At low
  amplitudes an increment of 1 in the PCM byte represents a much smaller
  increment in analog signal amplitude than would be the case if the
  amplitude being sampled were higher.  Thus for low amplitudes it's
  difficult to distinguish between adjacent byte values.  To make it
  easier to do this certain PCM codes representing very low amplitudes
  are not used.  This give a larger delta between possible amplitudes
  and makes correct detection of them by your modem easier.  Thus half
  the amplitude levels are not used by v.90.  This is tantamount to each
  symbol (allowed amplitude level) representing 7 bits instead of 8.
  This is where 56k comes from: 7 bits/symbol x 8k symbols/sec = 56k
  bps.  Of course each symbol is actually generated by 8-bits but only
  128 bytes of the possible 256 bytes are actually used.  There is a
  code table mapping these 128 8-bit bytes to 128 7-bit bytes.

  But it's a little more complicated that this.  If the line conditions
  are not nearly perfect, then even fewer possible levels (symbols) are
  used resulting in speeds under 56k.  Also due to US government rules
  prohibiting high power levels on phone lines, certain high amplitudes
  levels can't be used resulting in only about 53.3k at best for "56k"
  modems.

  Note that the digital part of the telephone network is bi-directional.
  Two such circuits are used for a phone call, one in each direction.
  The 56k signal is only used in one of these directions: from your ISP
  to your PC.  The other direction, from your home/office to the ISP,
  uses the conventional phase-amplitude modulation scheme with a maximum
  of 36.6kbps (and not 53.3kbps).  Yet due to sophisticated cancellation
  methods (not explained here) it's able to send simultaneously in both
  directions.


  19.3.  Full Duplex on One Circuit

  Modern modems are able to both send and receive signals
  simultaneously.  One could call this "bidirectional" or "full duplex".
  This was once done by using one frequency for sending and another for
  receiving.  Today, the same frequency is used for both sending and
  receiving.  How this works is not easy to comprehend.

  Most of the telephone system "main lines" are digital with two
  channels in use when you make a telephone call.  What you say goes
  over one digital channel and what the other person says goes over the
  other (reverse) digital channel.  Unfortunately, the part of the
  telephone system which goes to homes (and many offices) is not digital
  but only a single analog channel.  If both modems were directly
  connected to the digital part of the phone system then bidirectional
  communication (sending and receiving at the same time) would be no
  problem because two channels would be available.

  But the end portions of the signal path go over just one circuit.  How
  can there be two-way communication on it simultaneously?  It works
  something like this.  Suppose your modem is receiving a signal from
  the other modem and is not transmitting.  Then there's no problem.
  But if it were to start transmitting (with the other received signal
  still flowing into the modem) it would drown out the received signal.
  If the transmitted signal was a "solid" voltage wave applied to the
  end of the line then there is no way any received signal could be
  present at that point.

  But the transmitter has "internal impedance" and the transmitted
  signal applied to the end of the line is not solid (or strong enough)
  to completely eliminate the received signal coming from the other end.
  Thus while the voltage at the end of the line is mostly the stronger
  transmitted signal a small part of it is the desired received signal.
  All that is needed is to filter out this stronger transmitted signal
  and then what remains will be the signal from the other end which we
  want.  To do this, one only needs to get the pure transmitted signal
  directly from the transmitter (before it's applied to the line)
  amplify it a determined amount, and then subtract it from the total
  signal present at the end of the line.  Doing this in the receiver
  circuits leaves a signal which mostly came from the other end of the
  line.


  19.4.  Echo Cancellation

  A signal traveling down a line in one direction may encounter changes
  in the line that will cause part of the signal to echo back in the
  opposite direction.  Since the same circuit is used for bi-directional
  flow of data such echos will result in garbled reception.  One way to
  ameliorate this problem is to send training signals once in a while to
  determine the echo characteristic of the line.  This will enable one
  to predict the echos that will be generated by any given signal.  Then
  this prediction method is used to predict what echos the transmitted
  signal will cause.   Then this predicted echo signal is subtracted
  from the received signal.  This cancels out the echoes.


  20.  Appendix B: Digital Modem Signal Processing (not done)

  21.  Appendix C: "baud" vs. "bps"

  21.1.  A simple example

  ``baud'' and ``bps'' are perhaps one of the most misused terms in the
  computing and telecommunications field.  Many people use these terms
  interchangeably, when in fact they are not!  bps is simply the number
  of bits transmitted per second.  The baud rate is a measure of how
  many times per second a signal changes (or could change).  For a
  typical serial port a 1-bit is -12 volts and a 0-bit is +12 v (volts).
  If the bps is 38,400 a sequence of 010101... would also be 38,400 baud
  since the voltage shifts back and forth from positive to negative to
  positive ... and there are 38,400 shifts per second.  For another
  sequence say 111000111... there will be fewer shifts of voltage since
  for three 1's in sequence the voltage just stays at -12 volts yet we
  say that its still 38,400 baud since there is a possibility that the
  number of changes per second will be that high.

  Looked at another way, put an imaginary tic mark separating each bit
  (even though the voltage may not change).  38,400 baud then means
  38,400 tic marks per second.  The tic marks at at the instants of
  permitted change and are actually marked by a synchronized clock
  signal generated in the hardware but not sent over the external cable.


  Suppose that a "change" may have more than the two possible outcomes
  of the previous example (of +- 12 v).  Suppose it has 4 possible
  outcomes, each represented by a unique voltage level.  Each level may
  represent a pair of bits (such as 01).  For example, -12v could be 00,
  -6v 01, +6v 10 and +12v 11.  Here the bit rate is double the baud
  rate.  For example, 3000 changes per second will generate 2 bits for
  each change resulting in 6000 bits per second (bps).  In other words
  3000 baud results in 6000 bps.


  21.2.  Real examples

  The above example is overly simple.  Real examples are more
  complicated but based on the same idea.  This explains how a modem
  running at 2400 baud, can send 14400 bps (or higher).  The modem
  achieves a bps rate greater than baud rate by encoding many bits in
  each signal change (or transition).  Thus, when 2 or more bits are
  encoded per baud, the bps rate exceeds the baud rate. If your modem-
  to-modem connection is at 14400 bps, it's going to be sending 6 bits
  per signal transition (or symbol) at 2400 baud.  A speed of 28800 bps
  is obtained by 3200 baud at 9 bits/baud.  When people misuse the word
  baud, they may mean the modem speed (such as 33.6k).

  Common modem bps rates were formerly  50, 75, 110, 300, 1200, 2400,
  9600.  These were also the bps rates over the serial_port-to-modem
  cables.  Today the bps modem-to-modem (maximum) rates are 14.4k,
  28.8k, 33.6k, and 56k, but the common rates over the serialPort-to-
  modem cables are not the same but are: 19.2k, 38.4k, 57.6k, 115.2k.
  Using modems with V.42bis compression (max 4:1 compression), rates up
  to 115.2k bps are possible for 33.6k modems (230.4k is possible for
  56k modems).

  Except for 56k modems, most modems run at 2400, 3000, or 3200 baud.
  Even the 56k modems use these bauds for transmission and sometimes
  fall back to them for reception.  Because of the bandwidth limitations
  on voice-grade phone lines, baud rates greater than 2400 are harder to
  achieve, and only work under conditions of good phone line quality.

  How did this confusion between bps and baud start?  Well, back when
  antique low speed modems were high speed modems, the bps rate actually
  did equal the baud rate.  One bit would be encoded per phase change.
  People would use bps and baud interchangeably, because they were the
  same number.  For example, a 300 bps modem also had a baud rate of
  300. This all changed when faster modems came around, and the bit rate
  exceeded the baud rate.  ``baud'' is named after Emile Baudot, the
  inventor of the asynchronous telegraph printer.  One way this problem
  gets resolved is to use the term "symbol rate" instead of "baud" and
  thus avoid using the term "baud".  However when talking about the
  "speeds" between the modem and the serial port (DTE speed) baud and
  the symbol rate are the same.  And even "speed" is a misnomer since we
  really mean flow rate.


  22.  Appendix D: Terminal Server Connection

  This section was adapted from Text-Terminal-HOWTO.

  A terminal server is something like an intelligent switch that can
  connect many modems (or terminals) to one or more computers.  It's not
  a mechanical switch so it may change the speeds and protocols of the
  streams of data that go thru it.  A number of companies make terminal
  servers: Xyplex, Cisco, 3Com, Computone, Livingston, etc.  There are
  many different types and capabilities.  Another HOWTO is needed to
  compare and describe them (including the possibility of creating your
  own terminal server with a Linux PC).  Most are used for modem
  connections rather than directly connected terminals.
  One use for them is to connect many modems (or terminals) to a high
  speed network which connects to host computers.  Of course the
  terminal server must have the computing power and software to run
  network protocols so it is in some ways like a computer.  The terminal
  server may interact with the user and ask what computer to connect to,
  etc. or it may connect without asking.  One may sometimes send jobs to
  a printer thru a terminal server.

  A PC today has enough computing power to act like a terminal server
  except that each serial port should have its own hardware interrupt.
  PC's only have a few spare interrupts for this purpose and since they
  are hard-wired you can't create more by software.  A solution is to
  use an advanced multiport serial card which has its own system of
  interrupts (or on lower cost models, shares one of the PC's interrupts
  between a number of ports).  See Serial-HOWTO for more info.  If such
  a PC runs Linux with getty running on many serial ports it might be
  thought of as a terminal server.  It is in effect a terminal server if
  it's linked to other PC's over a network and if its job is mainly to
  pass thru data and handle the serial port interrupts every 14 (or so)
  bytes.  Software called "radius" is sometimes used.

  Today real terminal servers serve more than just terminals.  They also
  serve PC's which emulate terminals, and are sometimes connected to a
  bank of modems connected to phone lines.  Some even include built-in
  modems.  If a terminal (or PC emulating one) is connected directly to
  a modem, the modem at the other end of the line could be connected to
  a terminal server.  In some cases the terminal server by default
  expects the callers to use PPP packets, something that real text
  terminals don't generate.


  23.  Appendix E:  Other Types of Modems

  This HOWTO currently only deals with the common type of modem used to
  connect PC's to ordinary analog telephone lines.  There are various
  other types of modems, including devices called modems that are not
  really modems.


  23.1.  Digital-to-Digital "Modems"

  The standard definition of a modem is sometimes broadened to include
  "digital" modems.  Today direct digital service is now being provided
  to many homes and offices so a computer there sends out digital
  signals directly (well almost) into the telephone lines.  But a device
  is still needed to convert the computer digital signal into the type
  allowed on telephone circuits and this device is sometimes called a
  modem.  This HOWTO doesn't cover such modems but some links to
  documents that do may be found at the start of this HOWTO.  The next 3
  sections: ISDN, DSL and 56k, concern digital-to-digital "modems".


  23.2.  ISDN "Modems"

  The "modem" is  really a Terminal Adapter (TA).  A Debian package
  "isdnutils" is available.  There is a ISDN Howto in German with an
  English translation:  <http://www.suse.de/Support/sdb_e/isdn.html>.
  It's put out by the SuSE distribution of Linux and likely is about
  drivers available in that distribution.  There is an isdn4linux
  package and a newsgroup: de.alt.comm.isdn4linux.  Many of the postings
  are in German.  You might try using a search engine (such as DejaNews)
  to find "isdn4linux".



  23.3.  Digital Subscriber Line (DSL)

  DSL uses the existing twisted pair line from your home (etc.) to the
  local telephone office.  This can be used if your telephone line can
  accept higher speeds than an ordinary modem (say 56k) sends over it.
  It replaces the analog-to-digital converter at the local telephone
  office with a converter which can accept a much faster flow of data
  (in a different format of course).  The device which converts the
  digital signals from your computer to the signal used to represent
  digital data on the local telephone line is also called a modem.


  23.4.  56k Digital-Modems

  For any 56k modem to work as a 56k modem in your home or office the
  other end must be connected directly to the digital system of the
  telephone company.  Thus ISPs at the other end of the line must obtain
  special digital modems to provide customers with 56k service.  There's
  more to it than this since banks of many modems are multiplexed onto a
  high capacity telephone cable that transports a large number of phone
  calls simultaneously (such as a T1, E1, ISDN PRI, or better line).
  This requires a concentrator or "remote access server".  This has
  usually been done by stand-alone units (like PC's but they cost much
  more and have proprietary OSs).  Now there are some cards one may
  insert into a PC's PCI bus to do this.


  23.5.  Leased Line Modems

  These are analog and not digital modems.  These special modems are
  used on lines leased from the telephone company or sometimes on just a
  long direct wire hookup.  Ordinary modems for a telephone line will
  not normally work on such a line.  An ordinary telephone line has
  about 40-50 volts (know as the "battery) on it when not in use and the
  conventional modem uses this voltage for transmission.  Furthermore,
  the telephone company has special signals indicating a ring, line
  busy, etc.  Conventional modems expect and respond to these signals.
  Connecting two such modems by a long cable will not provide the
  telephone signals on the cable and thus the modems will not work.

  A common type of leased line used two pairs of wires (one for each
  direction) using V.29 modulation at 9600 baud.  Some brands of leased
  line modems are incompatible with other brands.


  24.  Appendix F: Fax pixels (dots)



       A4 paper:    216mm (horizontal) * 297mm (vertical)
       normal mode       8dots/mm      * 3.85dots/mm
       fine   mode                     * 7.7dots/mm
       extra fine mode                 *15.4dots/mm



  Each dot is either white or black and thus 1 bit.  One sheet of A4
  paper using fine mode is (216*8) * (297*7.7) = about 4 million dots.
  With a compression ratio of 8:1 it takes about 50 seconds at 9600bps
  for transmission.

  END OF Modem-HOWTO



  HOWTO: Multi Disk System Tuning
  Stein Gjoen, sgjoen@nyx.net
  v0.23d, 7 November 1999

  This document describes how best to use multiple disks and partitions
  for a Linux system. Although some of this text is Linux specific the
  general approach outlined here can be applied to many other multi
  tasking operating systems.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Copyright
     1.2 Disclaimer
     1.3 News
     1.4 Credits
     1.5 Translations

  2. Structure

     2.1 Logical structure
     2.2 Document structure
     2.3 Reading plan

  3. Drive Technologies

     3.1 Drives
     3.2 Geometry
     3.3 Media
        3.3.1 Magnetic Drives
        3.3.2 Optical Drives
        3.3.3 Solid State Drives
     3.4 Interfaces
        3.4.1 MFM and RLL
        3.4.2 ESDI
        3.4.3 IDE and ATA
        3.4.4 EIDE, Fast-ATA and ATA-2
        3.4.5 Ultra-ATA
        3.4.6 ATAPI
        3.4.7 SCSI
     3.5 Cabling
     3.6 Host Adapters
     3.7 Multi Channel Systems
     3.8 Multi Board Systems
     3.9 Speed Comparison
        3.9.1 Controllers
        3.9.2 Bus Types
     3.10 Benchmarking
     3.11 Comparisons
     3.12 Future Development
     3.13 Recommendations

  4. File System Structure

     4.1 File System Features
        4.1.1 Swap
        4.1.2 Temporary Storage (
        4.1.3 Spool Areas (
        4.1.4 Home Directories (
        4.1.5 Main Binaries (
        4.1.6 Libraries (
        4.1.7 Boot
        4.1.8 Root
        4.1.9 DOS etc.
     4.2 Explanation of Terms
        4.2.1 Speed
        4.2.2 Reliability
        4.2.3 Files

  5. File Systems

     5.1 General Purpose File Systems
        5.1.1 (TT
        5.1.2 (TT
        5.1.3 (TT
        5.1.4 (TT
        5.1.5 (TT
        5.1.6 (TT
        5.1.7 (TT
        5.1.8 (TT
        5.1.9 (TT
     5.2 Microsoft File Systems
        5.2.1 (TT
        5.2.2 (TT
        5.2.3 (TT
        5.2.4 (TT
     5.3 Logging and Journaling File Systems
     5.4 Read-only File Systems
        5.4.1 (TT
        5.4.2 (TT
        5.4.3 (TT
        5.4.4 (TT
        5.4.5 Trivia
        5.4.6 (TT
     5.5 Networking File Systems
        5.5.1 (TT
        5.5.2 (TT
        5.5.3 Coda
        5.5.4 (TT
        5.5.5 GFS
     5.6 Special File Systems
        5.6.1 (TT
        5.6.2 (TT
        5.6.3 (TT
        5.6.4 (TT
     5.7 File System Recommendations

  6. Technologies

     6.1 RAID
        6.1.1 SCSI-to-SCSI
        6.1.2 PCI-to-SCSI
        6.1.3 Software RAID
        6.1.4 RAID Levels
     6.2 Volume Management
     6.3 Linux
     6.4 Compression
     6.5 ACL
     6.6 (TT
     6.7 Translucent or Inheriting File Systems
     6.8 Physical Track Positioning
        6.8.1 Disk Speed Values
     6.9 Stacking
     6.10 Recommendations

  7. Other Operating Systems

     7.1 DOS
     7.2 Windows
     7.3 OS/2
     7.4 NT
     7.5 Sun OS
        7.5.1 Sun OS 4
        7.5.2 Sun OS 5 (aka Solaris)
        7.5.3 BeOS

  8. Clusters

  9. Mount Points

  10. Considerations and Dimensioning

     10.1 Home Systems
     10.2 Servers
        10.2.1 Home Directories
        10.2.2 Anonymous FTP
        10.2.3 WWW
        10.2.4 Mail
        10.2.5 News
        10.2.6 Others
        10.2.7 Server Recommendations
     10.3 Pitfalls

  11. Disk Layout

     11.1 Selection for Partitioning
     11.2 Mapping Partitions to Drives
     11.3 Sorting Partitions on Drives
     11.4 Optimizing
        11.4.1 Optimizing by Characteristics
        11.4.2 Optimizing by Drive Parallelising
     11.5 Compromises

  12. Implementation

     12.1 Drives and Partitions
     12.2 Partitioning
     12.3 Repartitioning
     12.4 Microsoft Partition Bug
     12.5 Multiple Devices (
     12.6 Formatting
     12.7 Mounting
     12.8 (TT
     12.9 Recommendations

  13. Maintenance

     13.1 Backup
     13.2 Defragmentation
     13.3 Deletions
     13.4 Upgrades
     13.5 Recovery

  14. Advanced Issues

     14.1 Hard Disk Tuning
     14.2 File System Tuning
     14.3 Spindle Synchronizing

  15. Further Information

     15.1 News groups
     15.2 Mailing Lists
     15.3 HOWTO
     15.4 Mini-HOWTO
     15.5 Local Resources
     15.6 Web Pages
     15.7 Search Engines

  16. Getting Help

  17. Concluding Remarks

     17.1 Coming Soon
     17.2 Request for Information
     17.3 Suggested Project Work

  18. Questions and Answers
  19. Bits and Pieces

     19.1 Swap Partition: to Use or Not to Use
     19.2 Mount Point and
     19.3 Power and Heating
     19.4 Deja

  20. Appendix A: Partitioning Layout Table: Mounting and Linking

  21. Appendix B: Partitioning Layout Table: Numbering and Sizing

  22. Appendix C: Partitioning Layout Table: Partition Placement

  23. Appendix D: Example: Multipurpose Server

  24. Appendix E: Example: Mounting and Linking

  25. Appendix F: Example: Numbering and Sizing

  26. Appendix G: Example: Partition Placement

  27. Appendix H: Example II

  28. Appendix I: Example III: SPARC Solaris

  29. Appendix J: Example IV: Server with 4 Drives

  30. Appendix K: Example V: Dual Drive System

  31. Appendix L: Example VI: Single Drive System



  ______________________________________________________________________

  1.  Introduction

  For unclear reasons this brand new release is codenamed the
  Sauchiehall release.

  New code names will appear as per industry standard guidelines to
  emphasize the state-of-the-art-ness of this document.


  This document was written for two reasons, mainly because I got hold
  of 3 old SCSI disks to set up my Linux system on and I was pondering
  how best to utilise the inherent possibilities of parallelizing in a
  SCSI system. Secondly I hear there is a prize for people who write
  documents...

  This is intended to be read in conjunction with the Linux Filesystem
  Structure Standard (FSSTND). It does not in any way replace it but
  tries to suggest where physically to place directories detailed in the
  FSSTND, in terms of drives, partitions, types, RAID, file system (fs),
  physical sizes and other parameters that should be considered and
  tuned in a Linux system, ranging from single home systems to large
  servers on the Internet.


  The followup to FSSTND is called the Filesystem Hierarchy Standard
  (FHS) and covers more than Linux alone. FHS version 2.0 has been
  released but there are still a few issues to be dealt with and even
  longer before this new standard will have an impact on actual
  distributions. FHS is not yet used in any distributions but Debian has
  announced they will use it in Debian 2.1 which is their next
  distribution.
  It is also a good idea to read the Linux Installation guides
  thoroughly and if you are using a PC system, which I guess the
  majority still does, you can find much relevant and useful information
  in the FAQs for the newsgroup comp.sys.ibm.pc.hardware especially for
  storage media.

  This is also a learning experience for myself and I hope I can start
  the ball rolling with this HOWTO and that it perhaps can evolve into a
  larger more detailed and hopefully even more correct HOWTO.


  First of all we need a bit of legalese. Recent development shows it is
  quite important.


  1.1.  Copyright


  This HOWTO is copyrighted 1996 Stein Gjoen.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact the Linux HOWTO coordinator, at
  linux-howto@metalab.unc.edu via email.


  1.2.  Disclaimer


  Use the information in this document at your own risk. I disavow any
  potential liability for the contents of this document. Use of the
  concepts, examples, and/or other content of this document is entirely
  at your own risk.

  All copyrights are owned by their owners, unless specifically noted
  otherwise.  Use of a term in this document should not be regarded as
  affecting the validity of any trademark or service mark.

  Naming of particular products or brands should not be seen as
  endorsements.

  You are strongly recommended to take a backup of your system before
  major installation and backups at regular intervals.



  1.3.  News



  This release features a major restructuring and more additions than I
  can list here especially on added file system support.

  This HOWTO now uses indexing and is based on SGMLtools version 1.0.5
  and the old version will therefore not format this document properly.

  Also quite new is a number of new translations available.  Now a
  Chinese and also an Italian translation are under way.

  On the development front people are concentrating their energy towards
  completing Linux 2.2 and until that is released there is not going to
  be much news on disk technology for Linux.


  Also now the document is available in postscript both for US letter as
  well as European A4 formats.

  The latest version number of this document can be gleaned from my plan
  entry if you finger
  <http://www.cs.indiana.edu/finger/nox.nyx.net/sgjoen> my Nyx account.

  Also, the latest version will be available on my web space on Nyx in a
  number of formats:

  o  HTML <http://www.nyx.net/~sgjoen/disk.html>.

  o  plain ASCII text <http://www.nyx.net/~sgjoen/disk.txt>.

  o  compressed postscript US letter format
     <http://www.nyx.net/~sgjoen/disk-US.ps.gz>.

  o  compressed postscript European A4 format
     <http://www.nyx.net/~sgjoen/disk-A4.ps.gz>.

  o  SGML source <http://www.nyx.net/~sgjoen/disk.sgml>.


  A European mirror of the Multi Disk HOWTO
  <http://home.sol.no/~gjoen/stein/disk.html> just went on line.



  1.4.  Credits

  In this version I have the pleasure of acknowledging even more people
  who have contributed in one way or another:



  ronnej (at ) ucs.orst.edu
  cm (at) kukuruz.ping.at
  armbru (at) pond.sub.org
  R.P.Blake (at) open.ac.uk
  neuffer (at) goofy.zdv.Uni-Mainz.de
  sjmudd (at) redestb.es
  nat (at) nataa.fr.eu.org
  sundbyk (at) oslo.geco-prakla.slb.com
  ggjoeen (at) online.no
  mike (at) i-Connect.Net
  roth (at) uiuc.edu
  phall (at) ilap.com
  szaka (at) mirror.cc.u-szeged.hu
  CMckeon (at) swcp.com
  kris (at) koentopp.de
  edick (at) idcomm.com
  pot (at) fly.cnuce.cnr.it
  earl (at) sbox.tu-graz.ac.at
  ebacon (at) oanet.com
  vax (at) linkdead.paranoia.com
  tschenk (at) theoffice.net
  pjfarley (at) dorsai.org
  jean (at) stat.ubc.ca
  johnf (at) whitsunday.net.au
  clasen (at) unidui.uni-duisburg.de
  eeslgw (at) ee.surrey.asc.uk
  adam (at) onshore.com
  anikolae (at) wega-fddi2.rz.uni-ulm.de
  cjaeger (at) dwave.net
  eperezte (at) c2i.net
  yesteven (at) ms2.hinet.net
  cj (at) samurajdata.se
  tbotond (at) netx.hu
  russel (at) coker.com.au
  lars (at) iar.se
  GALLAGS3 (at) labs.wyeth.com



  1.5.  Translations


  Special thanks go to nakano (at) apm.seikei.ac.jp for doing the
  Japanese translation <http://www.linux.or.jp/JF/JFdocs/Multi-Disk-
  HOWTO.html>, general contributions as well as contributing an example
  of a computer in an academic setting, which is included at the end of
  this document.

  There are now many new translations available and special thanks go to
  the translators for the job and the input they have given:


  o  German Translation <http://> by chewie (at) nuernberg.netsurf.de

  o  Swedish Translation  <http://www.swe-doc.linux.nu> by jonah (at)
     swipnet.se

  o  French Translation <http://www.lri.fr/~loisel/howto/> by
     Patrick.Loiseleur (at) lri.fr


  o  Chinese Translation <http://> by yesteven (at ) ms2.hinet.net

  o  Italian Translation <http://> by bigpaul (at) flashnet.it



  Also DPT is acknowledged for sending me documentation on their
  controllers as well as permission to quote from the material. These
  quotes have been approved before appearing here and will be clearly
  labelled. No quotes as of yet but that is coming.

  Not many still, so please read through this document, make a
  contribution and join the elite. If I have forgotten anyone, please
  let me know.

  New in this version is an appendix with a few tables you can fill in
  for your system in order to simplify the design process.

  Any comments or suggestions can be mailed to my mail address on Nyx:
  sgjoen@nyx.net.


  So let's cut to the chase where swap and /tmp are racing along hard
  drive...



  2.  Structure

  As this type of document is supposed to be as much for learning as a
  technical reference document I have rearranged the structure to this
  end. For the designer of a system it is more useful to have the
  information presented in terms of the goals of this exercise than from
  the point of view of the logical layer structure of the devices
  themselves. Nevertheless this document would not be complete without
  such a layer structure the computer field is so full of, so I will
  include it here as an introduction to how it works.

  It is a long time since the mini in mini-HOWTO could be defended as
  proper but I am convinced that this document is as long as it needs to
  be in order to make the right design decisions, and not longer.


  2.1.  Logical structure

  This is based on how each layer access each other, traditionally with
  the application on top and the physical layer on the bottom.  It is
  quite useful to show the interrelationship between each of the layers
  used in controlling drives.


               ___________________________________________________________
               |__     File structure          ( /usr /tmp etc)        __|
               |__     File system             (ext2fs, vfat etc)      __|
               |__     Volume management       (AFS)                   __|
               |__     RAID, concatenation     (md)                    __|
               |__     Device driver           (SCSI, IDE etc)         __|
               |__     Controller              (chip, card)            __|
               |__     Connection              (cable, network)        __|
               |__     Drive                   (magnetic, optical etc) __|
               -----------------------------------------------------------

  In the above diagram both volume management and RAID and concatenation
  are optional layers. The 3 lower layers are in hardware.  All parts
  are discussed at length later on in this document.


  2.2.  Document structure

  Most users start out with a given set of hardware and some plans on
  what they wish to achieve and how big the system should be. This is
  the point of view I will adopt in this document in presenting the
  material, starting out with hardware, continuing with design
  constraints before detailing the design strategy that I have found to
  work well.  I have used this both for my own personal computer at
  home, a multi purpose server at work and found it worked quite well.
  In addition my Japanese co-worker in this project have applied the
  same strategy on a server in an academic setting with similar success.

  Finally at the end I have detailed some configuration tables for use
  in your own design. If you have any comments regarding this or notes
  from your own design work I would like to hear from you so this
  document can be upgraded.


  2.3.  Reading plan

  Although not the biggest HOWTO it is nevertheless rather big already
  and I have been requested to make a reading plan to make it possible
  to cut down on the volume


     Expert
        (aka the elite). If you are familiar with Linux as well as disk
        drive technologies you will find most of what you need in the
        appendices. Additionally you are recommended to read the FAQ and
        the ``Bits'n'pieces'' chapter.


     Experienced
        (aka Competent). If you are familiar with computers in general
        you can go straight to the chapters on ``technologies'' and
        continue from there on.


     Newbie
        (mostly harmless). You just have to read the whole thing.
        Sorry. In addition you are also recommended to read all the
        other disk related HOWTOs.



  3.  Drive Technologies

  A far more complete discussion on drive technologies for IBM PCs can
  be found at the home page of The Enhanced IDE/Fast-ATA FAQ
  <http://thef-nym.sci.kun.nl/~pieterh/storage.html> which is also
  regularly posted on Usenet News.  There is also a site dedicated to
  ATA and ATAPI Information and Software <http://ata-atapi.com>.

  Here I will just present what is needed to get an understanding of the
  technology and get you started on your setup.


  3.1.  Drives

  This is the physical device where your data lives and although the
  operating system makes the various types seem rather similar they can
  in actual fact be very different. An understanding of how it works can
  be very useful in your design work. Floppy drives fall outside the
  scope of this document, though should there be a big demand I could
  perhaps be persuaded to add a little here.


  3.2.  Geometry

  Physically disk drives consists of one or more platters containing
  data that is read in and out using sensors mounted on movable heads
  that are fixed with respects to themselves. Data transfers therefore
  happens across all surfaces simultaneously which defines a cylinder of
  tracks. The drive is also divided into sectors containing a number of
  data fields.

  Drives are therefore often specified in terms of its geometry: the
  number of Cylinders, Heads and Sectors (CHS).

  For various reasons there is now a number of translations between

  o  the physical CHS of the drive itself

  o  the logical CHS the drive reports to the BIOS or OS

  o  the logical CHS used by the OS

  Basically it is a mess and a source of much confusion. For more
  information you are strongly recommended to read the Large Disk mini-
  HOWTO


  3.3.  Media

  The media technology determines important parameters such as
  read/write rates, seek times, storage size as well as if it is
  read/write or read only.


  3.3.1.  Magnetic Drives

  This is the typical read-write mass storage medium, and as everything
  else in the computer world, comes in many flavours with different
  properties. Usually this is the fastest technology and offers
  read/write capability. The platter rotates with a constant angular
  velocity (CAV) with a variable physical sector density for more
  efficient magnetic media area utilisation.  In other words, the number
  of bits per unit length is kept roughly constant by increasing the
  number of logical sectors for the outer tracks.

  Typical values for rotational speeds are 4500 and 5400 RPM, though
  7200 is also used. Very recently also 10000 RPM has entered the mass
  market.  Seek times are around 10 ms, transfer rates quite variable
  from one type to another but typically 4-40 MB/s.  With the extreme
  high performance drives you should remember that performance costs
  more electric power which is dissipated as heat, see the point on
  ``Power and Heating''.


  Note that there are several kinds of transfers going on here, and that
  these are quoted in different units. First of all there is the
  platter-to-drive cache transfer, usually quoted in Mbits/s. Typical
  values here is about 50-250 Mbits/s. The second stage is from the
  built in drive cache to the adapter, and this is typically quoted in
  MB/s, and typical quoted values here is 3-40 MB/s. Note, however, that
  this assumed data is already in the cache and hence for maximum
  readout speed from the drive the effective transfer rate will decrease
  dramatically.



  3.3.2.  Optical Drives

  Optical read/write drives exist but are slow and not so common. They
  were used in the NeXT machine but the low speed was a source for much
  of the complaints. The low speed is mainly due to the thermal nature
  of the phase change that represents the data storage. Even when using
  relatively powerful lasers to induce the phase changes the effects are
  still slower than the magnetic effect used in magnetic drives.

  Today many people use CD-ROM drives which, as the name suggests, is
  read-only. Storage is about 650 MB, transfer speeds are variable,
  depending on the drive but can exceed 1.5 MB/s. Data is stored on a
  spiraling single track so it is not useful to talk about geometry for
  this. Data density is constant so the drive uses constant linear
  velocity (CLV). Seek is also slower, about 100 ms, partially due to
  the spiraling track. Recent, high speed drives, use a mix of CLV and
  CAV in order to maximize performance. This also reduces access time
  caused by the need to reach correct rotational speed for readout.

  A new type (DVD) is on the horizon, offering up to about 18 GB on a
  single disk.


  3.3.3.  Solid State Drives

  This is a relatively recent addition to the available technology and
  has been made popular especially in portable computers as well as in
  embedded systems. Containing no movable parts they are very fast both
  in terms of access and transfer rates. The most popular type is flash
  RAM, but also other types of RAM is used. A few years ago many had
  great hopes for magnetic bubble memories but it turned out to be
  relatively expensive and is not that common.

  In general the use of RAM disks are regarded as a bad idea as it is
  normally more sensible to add more RAM to the motherboard and let the
  operating system divide the memory pool into buffers, cache, program
  and data areas. Only in very special cases, such as real time systems
  with short time margins, can RAM disks be a sensible solution.

  Flash RAM is today available in several 10's of megabytes in storage
  and one might be tempted to use it for fast, temporary storage in a
  computer. There is however a huge snag with this: flash RAM has a
  finite life time in terms of the number of times you can rewrite data,
  so putting swap, /tmp or /var/tmp on such a device will certainly
  shorten its lifetime dramatically.  Instead, using flash RAM for
  directories that are read often but rarely written to, will be a big
  performance win.

  In order to get the optimum life time out of flash RAM you will need
  to use special drivers that will use the RAM evenly and minimize the
  number of block erases.

  This example illustrates the advantages of splitting up your directory
  structure over several devices.

  Solid state drives have no real cylinder/head/sector addressing but
  for compatibility reasons this is simulated by the driver to give a
  uniform interface to the operating system.



  3.4.  Interfaces

  There is a plethora of interfaces to chose from widely ranging in
  price and performance. Most motherboards today include IDE interface
  which are part of modern chipsets.

  Many motherboards also include a SCSI interface chip made by Symbios
  (formerly NCR) and that is connected directly to the PCI bus.  Check
  what you have and what BIOS support you have with it.


  3.4.1.  MFM and RLL

  Once upon a time this was the established technology, a time when 20
  MB was awesome, which compared to todays sizes makes you think that
  dinosaurs roamed the Earth with these drives. Like the dinosaurs these
  are outdated and are slow and unreliable compared to what we have
  today. Linux does support this but you are well advised to think twice
  about what you would put on this. One might argue that an emergency
  partition with a suitable vintage of DOS might be fitting.


  3.4.2.  ESDI

  Actually, ESDI was an adaptation of the very widely used SMD interface
  used on "big" computers to the cable set used with the ST506
  interface, which was more convenient to package than the 60-pin +
  26-pin connector pair used with SMD.  The ST506 was a "dumb" interface
  which relied entirely on the controller and host computer to do
  everything from computing head/cylinder/sector locations and keeping
  track of the head location, etc. ST506 required the controller to
  extract clock from the recovered data, and control the physical
  location of detailed track features on the medium, bit by bit. It had
  about a 10-year life if you include the use of MFM, RLL, and ERLL/ARLL
  modulation schemes. ESDI, on the other hand, had intelligence, often
  using three or four separate microprocessors on a single drive, and
  high-level commands to format a track, transfer data, perform seeks,
  and so on. Clock recovery from the data stream was accomplished at the
  drive, which drove the clock line and presented its data in NRZ,
  though error correction was still the task of the controller.  ESDI
  allowed the use of variable bit density recording, or, for that
  matter, any other modulation technique, since it was locally generated
  and resolved at the drive. Though many of the techniques used in ESDI
  were later incorporated in IDE, it was the increased popularity of
  SCSI which led to the demise of ESDI in computers. ESDI had a life of
  about 10 years, though mostly in servers and otherwise "big" systems
  rather than PC's.



  3.4.3.  IDE and ATA

  Progress made the drive electronics migrate from the ISA slot card
  over to the drive itself and Integrated Drive Electronics was borne.
  It was simple, cheap and reasonably fast so the BIOS designers
  provided the kind of snag that the computer industry is so full of. A
  combination of an IDE limitation of 16 heads together with the BIOS
  limitation of 1024 cylinders gave us the infamous 504 MB limit.
  Following the computer industry traditions again, the snag was patched
  with a kludge and we got all sorts of translation schemes and BIOS
  bodges. This means that you need to read the installation
  documentation very carefully and check up on what BIOS you have and
  what date it has as the BIOS has to tell Linux what size drive you
  have. Fortunately with Linux you can also tell the kernel directly
  what size drive you have with the drive parameters, check the
  documentation for LILO and Loadlin, thoroughly. Note also that IDE is
  equivalent to ATA, AT Attachment.  IDE uses CPU-intensive Programmed
  Input/Output (PIO) to transfer data to and from the drives and has no
  capability for the more efficient Direct Memory Access (DMA)
  technology. Highest transfer rate is 8.3 MB/s.


  3.4.4.  EIDE, Fast-ATA and ATA-2

  These 3 terms are roughly equivalent, fast-ATA is ATA-2 but EIDE
  additionally includes ATAPI. ATA-2 is what most use these days which
  is faster and with DMA. Highest transfer rate is increased to 16.6
  MB/s.



  3.4.5.  Ultra-ATA

  A new, faster DMA mode that is approximately twice the speed of EIDE
  PIO-Mode 4 (33 MB/s). Disks with and without Ultra-ATA can be mixed on
  the same cable without speed penalty for the faster adapters. The
  Ultra-ATA interface is electrically identical with the normal Fast-ATA
  interface, including the maximum cable length.

  The newest development is the 66 MB/s version, DMA/66.


  3.4.6.  ATAPI

  The ATA Packet Interface was designed to support CD-ROM drives using
  the IDE port and like IDE it is cheap and simple.


  3.4.7.  SCSI

  The Small Computer System Interface is a multi purpose interface that
  can be used to connect to everything from drives, disk arrays,
  printers, scanners and more. The name is a bit of a misnomer as it has
  traditionally been used by the higher end of the market as well as in
  work stations since it is well suited for multi tasking environments.

  The standard interface is 8 bits wide and can address 8 devices.
  There is a wide version with 16 bit that is twice as fast on the same
  clock and can address 16 devices. The host adapter always counts as a
  device and is usually number 7.  It is also possible to have 32 bit
  wide busses but this usually requires a double set of cables to carry
  all the lines.

  The old standard was 5 MB/s and the newer fast-SCSI increased this to
  10 MB/s. Recently ultra-SCSI, also known as Fast-20, arrived with 20
  MB/s transfer rates for an 8 bit wide bus.  New low voltage
  differential (LVD) signalling allows these high speeds as well as much
  longer cabling than before.

  Even more recently an even faster standard has been introduced: SCSI
  160 (originally named SCSI 160/m) which is capable of a monstrous 160
  MB/s over a 16 bit wide bus. Support is scarce yet but for a few 10000
  RPM drives that can transfer 40 MB/s sustained.  Putting 6 such drives
  on a RAID will keep such a bus saturated and also saturate most PCI
  busses. Obviously this is only for the very highest end servers per
  today. More information on this standard is available at The Ultra 160
  SCSI home page <http://www.ultra160-scsi.com/>

  Adaptec just announced a Linux driver for their SCSI 160 host adapter.
  More information will come when more information becomes available.


  The higher performance comes at a cost that is usually higher than for
  (E)IDE. The importance of correct termination and good quality cables
  cannot be overemphasized. SCSI drives also often tend to be of a
  higher quality than IDE drives. Also adding SCSI devices tend to be
  easier than adding more IDE drives: Often it is only a matter of
  plugging or unplugging the device; some people do this without
  powering down the system. This feature is most convenient when you
  have multiple systems and you can just take the devices from one
  system to the other should one of them fail for some reason.

  There is a number of useful documents you should read if you use SCSI,
  the SCSI HOWTO as well as the SCSI FAQ posted on Usenet News.

  SCSI also has the advantage you can connect it easily to tape drives
  for backing up your data, as well as some printers and scanners. It is
  even possible to use it as a very fast network between computers while
  simultaneously share SCSI devices on the same bus. Work is under way
  but due to problems with ensuring cache coherency between the
  different computers connected, this is a non trivial task.

  SCSI numbers are also used for arbitration. If several drives request
  service, the drive with the lowest number is given priority.



  3.5.  Cabling


  I do not intend to make too many comments on hardware but I feel I
  should make a little note on cabling. This might seem like a
  remarkably low technological piece of equipment, yet sadly it is the
  source of many frustrating problems. At todays high speeds one should
  think of the cable more of a an RF device with its inherent demands on
  impedance matching. If you do not take your precautions you will get a
  much reduced reliability or total failure. Some SCSI host adapters are
  more sensitive to this than others.

  Shielded cables are of course better than unshielded but the price is
  much higher. With a little care you can get good performance from a
  cheap unshielded cable.


  o  For Fast-ATA and Ultra-ATA, the maximum cable length is specified
     as 45cm (18"). The data lines of both IDE channels are connected on
     many boards, though, so they count as one cable. In any case EIDE
     cables should be as short as possible. If there are mysterious
     crashes or spontaneous changes of data, it is well worth
     investigating your cabling.  Try a lower PIO mode or disconnect the
     second channel and see if the problem still occurs.

  o  Use as short cable as possible, but do not forget the 30 cm minimum
     separation for ultra SCSI and 60 cm separation for differential
     SCSI.

  o  Avoid long stubs between the cable and the drive, connect the plug
     on the cable directly to the drive without an extension.

  o  SCSI Cabling limitations:



  Bus Speed (MHz)         |    Max Length (m)
  --------------------------------------------------
   5                      |        6
  10  (fast)              |        3
  20  (fast-20 / ultra)   |        3 (max 4 devices), 1.5 (max 8 devices)
  xx  (differential)      |       25 (max 16 devices
  --------------------------------------------------



  o  Use correct termination for SCSI devices and at the correct
     positions: both ends of the SCSI chain. Remember the host adapter
     itself may have on board termination.

  o  Do not mix shielded or unshielded cabling, do not wrap cables
     around metal, try to avoid proximity to metal parts along parts of
     the cabling. Any such discontinuities can cause impedance
     mismatching which in turn can cause reflection of signals which
     increases noise on the cable.  This problems gets even more severe
     in the case of multi channel controllers.  Recently someone
     suggested wrapping bubble plastic around the cables in order to
     avoid too close proximity to metal, a real problem inside crowded
     cabinets.

  More information on SCSI cabling and termination can be found at other
  <http://resource.simplenet.com/files/68_50_n.htm> web pages around the
  net.



  3.6.  Host Adapters


  This is the other end of the interface from the drive, the part that
  is connected to a computer bus. The speed of the computer bus and that
  of the drives should be roughly similar, otherwise you have a
  bottleneck in your system. Connecting a RAID 0 disk-farm to a ISA card
  is pointless. These days most computers come with 32 bit PCI bus
  capable of 132 MB/s transfers which should not represent a bottleneck
  for most people in the near future.

  As the drive electronic migrated to the drives the remaining part that
  became the (E)IDE interface is so small it can easily fit into the PCI
  chip set. The SCSI host adapter is more complex and often includes a
  small CPU of its own and is therefore more expensive and not
  integrated into the PCI chip sets available today. Technological
  evolution might change this.

  Some host adapters come with separate caching and intelligence but as
  this is basically second guessing the operating system the gains are
  heavily dependent on which operating system is used. Some of the more
  primitive ones, that shall remain nameless, experience great gains.
  Linux, on the other hand, have so much smarts of its own that the
  gains are much smaller.

  Mike Neuffer, who did the drivers for the DPT controllers, states that
  the DPT controllers are intelligent enough that given enough cache
  memory it will give you a big push in performance and suggests that
  people who have experienced little gains with smart controllers just
  have not used a sufficiently intelligent caching controller.



  3.7.  Multi Channel Systems

  In order to increase throughput it is necessary to identify the most
  significant bottlenecks and then eliminate them. In some systems, in
  particular where there are a great number of drives connected, it is
  advantageous to use several controllers working in parallel, both for
  SCSI host adapters as well as IDE controllers which usually have 2
  channels built in. Linux supports this.

  Some RAID controllers feature 2 or 3 channels and it pays to spread
  the disk load across all channels. In other words, if you have two
  SCSI drives you want to RAID and a two channel controller, you should
  put each drive on separate channels.


  3.8.  Multi Board Systems

  In addition to having both a SCSI and an IDE in the same machine it is
  also possible to have more than one SCSI controller. Check the SCSI-
  HOWTO on what controllers you can combine. Also you will most likely
  have to tell the kernel it should probe for more than just a single
  SCSI or a single IDE controller. This is done using kernel parameters
  when booting, for instance using LILO.  Check the HOWTOs for SCSI and
  LILO for how to do this.

  Multi board systems can offer significant speed gains if you configure
  your disks right, especially for RAID0. Make sure you interleave the
  controllers as well as the drives, so that you add drives to the md
  RAID device in the right order.  If controller 1 is connected to
  drives sda and sdc while controller 2 is connected to drives sdb and
  sdd you will gain more paralellicity by adding in the order of sda -
  sdc - sdb - sdd rather than sda - sdb - sdc - sdd because a read or
  write over more than one cluster will be more likely to span two
  controllers.

  The same methods can also be applied to IDE. Most motherboards come
  with typically 4 IDE ports:

  o  hda primary master

  o  hdb primary slave

  o  hdc secondary master

  o  hdd secondary slave

     where the two primaries share one flat cable and the secondaries
     share another cable. Modern chipsets keep these independent.
     Therefore it is best to RAID in the order hda - hdc - hdb - hdd as
     this will most likely parallelise both channels.


  3.9.  Speed Comparison

  The following tables are given just to indicate what speeds are
  possible but remember that these are the theoretical maximum speeds.
  All transfer rates are in MB per second and bus widths are measured in
  bits.



  3.9.1.  Controllers



  IDE             :        8.3 - 16.7
  Ultra-ATA       :       33 - 66

  SCSI            :
                          Bus width (bits)

  Bus Speed (MHz)         |        8      16      32
  --------------------------------------------------
   5                      |        5      10      20
  10  (fast)              |       10      20      40
  20  (fast-20 / ultra)   |       20      40      80
  40  (fast-40 / ultra-2) |       40      80      --
  --------------------------------------------------



  3.9.2.  Bus Types



       ISA             :        8-12
       EISA            :       33
       VESA            :       40    (Sometimes tuned to 50)

       PCI
                               Bus width (bits)

       Bus Speed (MHz)         |       32      64
       --------------------------------------------------
       33                      |       132     264
       66                      |       264     528
       --------------------------------------------------



  3.10.  Benchmarking

  This is a very, very difficult topic and I will only make a few
  cautious comments about this minefield. First of all, it is more
  difficult to make comparable benchmarks that have any actual meaning.
  This, however, does not stop people from trying...

  Instead one can use benchmarking to diagnose your own system, to check
  it is going as fast as it should, that is, not slowing down.  Also you
  would expect a significant increase when switching from a simple file
  system to RAID, so a lack of performance gain will tell you something
  is wrong.

  When you try to benchmark you should not hack up your own, instead
  look up iozone and bonnie and read the documentation very carefully.
  In particular make sure your buffer size is bigger than your RAM size,
  otherwise you test your RAM rather than your disks which will give you
  unrealistically high performance.

  A very simple benchmark can be obtained using hdparm -tT which can be
  used both on IDE and SCSI drives.

  For more information on benchmarking and software for a number of
  platforms, check out ACNC <http://www.acnc.com/benchmarks.html>
  benchmark page as well as this one
  <http://www.spin.ch/~tpo/bench.html> and also The Benchmarking-HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/Benchmarking-HOWTO.html>.

  There are also official home pages for bonnie
  <http://www.textuality.com/bonnie/>, bonnie++
  <http://www.coker.com.au/bonnie++> and iozone <http://www.iozone.org>.

  Trivia: Bonnie is intended to locate bottlenecks, the name is a
  tribute to Bonnie Raitt, "who knows how to use one" as the author puts
  it.


  3.11.  Comparisons

  SCSI offers more performance than EIDE but at a price.  Termination is
  more complex but expansion not too difficult.  Having more than 4 (or
  in some cases 2) IDE drives can be complicated, with wide SCSI you can
  have up to 15 per adapter.  Some SCSI host adapters have several
  channels thereby multiplying the number of possible drives even
  further.

  For SCSI you have to dedicate one IRQ per host adapter which can
  control up to 15 drives. With EIDE you need one IRQ for each channel
  (which can connect up to 2 disks, master and slave) which can cause
  conflict.

  RLL and MFM is in general too old, slow and unreliable to be of much
  use.



  3.12.  Future Development


  SCSI-3 is under way and will hopefully be released soon. Faster
  devices are already being announced, recently an 80 MB/s and then a
  160 MB/s monster specification has been proposed and also very
  recently became commercially available.  These are based around the
  Ultra-2 standard (which used a 40 MHz clock) combined with a 16 bit
  cable.

  Some manufacturers already announce SCSI-3 devices but this is
  currently rather premature as the standard is not yet firm. As the
  transfer speeds increase the saturation point of the PCI bus is
  getting closer. Currently the 64 bit version has a limit of 264 MB/s.
  The PCI transfer rate will in the future be increased from the current
  33 MHz to 66 MHz, thereby increasing the limit to 528 MB/s.

  Another trend is for larger and larger drives. I hear it is possible
  to get 55 GB on a single drive though this is rather expensive.
  Currently the optimum storage for your money is about 6.4 GB but also
  this is continuously increasing. The introduction of DVD will in the
  near future have a big impact, with nearly 20 GB on a single disk you
  can have a complete copy of even major FTP sites from around the
  world. The only thing we can be reasonably sure about the future is
  that even if it won't get any better, it will definitely be bigger.

  Addendum: soon after I first wrote this I read that the maximum useful
  speed for a CD-ROM was 20x as mechanical stability would be too great
  a problem at these speeds. About one month after that again the first
  commercial 24x CD-ROMs were available... Currently you can get 40x and
  no doubt higher speeds are in the pipeline.



  3.13.  Recommendations

  My personal view is that EIDE or Ultra ATA is the best way to start
  out on your system, especially if you intend to use DOS as well on
  your machine.  If you plan to expand your system over many years or
  use it as a server I would strongly recommend you get SCSI drives.
  Currently wide SCSI is a little more expensive. You are generally more
  likely to get more for your money with standard width SCSI. There is
  also differential versions of the SCSI bus which increases maximum
  length of the cable. The price increase is even more substantial and
  cannot therefore be recommended for normal users.

  In addition to disk drives you can also connect some types of scanners
  and printers and even networks to a SCSI bus.

  Also keep in mind that as you expand your system you will draw ever
  more power, so make sure your power supply is rated for the job and
  that you have sufficient cooling. Many SCSI drives offer the option of
  sequential spin-up which is a good idea for large systems.  See also
  ``Power and Heating''.



  4.  File System Structure

  Linux has been multi tasking from the very beginning where a number of
  programs interact and run continuously. It is therefore important to
  keep a file structure that everyone can agree on so that the system
  finds data where it expects to. Historically there has been so many
  different standards that it was confusing and compatibility was
  maintained using symbolic links which confused the issue even further
  and the structure ended looking like a maze.

  In the case of Linux a standard was fortunately agreed on early on
  called the File Systems Standard (FSSTND) which today is used by all
  main Linux distributions.

  Later it was decided to make a successor that should also support
  operating systems other than just Linux, called the Filesystem
  Hierarchy Standard (FHS) at version 2.1 currently.  This standard is
  under continuous development and will soon be adopted by Linux
  distributions.

  I recommend not trying to roll your own structure as a lot of thought
  has gone into the standards and many software packages comply with the
  standards. Instead you can read more about this at the FHS home page
  <http://www.pathname.com/fhs>.

  This HOWTO endeavours to comply with FSSTND and will follow FHS when
  distributions become available.



  4.1.  File System Features

  The various parts of FSSTND have different requirements regarding
  speed, reliability and size, for instance losing root is a pain but
  can easily be recovered. Losing /var/spool/mail is a rather different
  issue. Here is a quick summary of some essential parts and their
  properties and requirements. Note that this is just a guide, there can
  be binaries in etc and lib directories, libraries in bin directories
  and so on.

  4.1.1.  Swap


     Speed
        Maximum! Though if you rely too much on swap you should consider
        buying some more RAM. Note, however, that on many old Pentium PC
        motherboards the cache will not work on RAM above 128 MB.


     Size
        Similar as for RAM. Quick and dirty algorithm: just as for tea:
        16 MB for the machine and 2 MB for each user. Smallest kernel
        run in 1 MB but is tight, use 4 MB for general work and light
        applications, 8 MB for X11 or GCC or 16 MB to be comfortable.
        (The author is known to brew a rather powerful cuppa tea...)

        Some suggest that swap space should be 1-2 times the size of the
        RAM, pointing out that the locality of the programs determines
        how effective your added swap space is. Note that using the same
        algorithm as for 4BSD is slightly incorrect as Linux does not
        allocate space for pages in core.

        A more thorough approach is to consider swap space plus RAM as
        your total working set, so if you know how much space you will
        need at most, you subtract the physical RAM you have and that is
        the swap space you will need.

        There is also another reason to be generous when dimensioning
        your swap space: memory leaks. Ill behaving programs that do not
        free the memory they allocate for themselves are said to have a
        memory leak.  This allocation remains even after the offending
        program has stopped so this is a source of memory consumption.
        Once all physical RAM and swap space are exhausted the only
        solution is to reboot and start over.  Thankfully such programs
        are not too common but should you come across one you will find
        that extra swap space will buy you extra time between reboots.

        Also remember to take into account the type of programs you use.
        Some programs that have large working sets, such as finite
        element modeling (FEM) have huge data structures loaded in RAM
        rather than working explicitly on disk files. Data and computing
        intensive programs like this will cause excessive swapping if
        you have less RAM than the requirements.

        Other types of programs can lock their pages into RAM. This can
        be for security reasons, preventing copies of data reaching a
        swap device or for performance reasons such as in a real time
        module. Either way, locking pages reduces the remaining amount
        of swappable memory and can cause the system to swap earlier
        then otherwise expected.

        In man 8 mkswap it is explained that each swap partition can be
        a maximum of just under 128 MB in size for 32-bit machines and
        just under 256 MB for 64-bit machines.

        This however changed with kernel 2.2.0 after which the limit is
        2 GB.  The man page has been updated to reflect this change.



     Reliability
        Medium. When it fails you know it pretty quickly and failure
        will cost you some lost work. You save often, don't you?



     Note 1
        Linux offers the possibility of interleaved swapping across
        multiple devices, a feature that can gain you much. Check out
        "man 8 swapon" for more details. However, software raiding swap
        across multiple devices adds more overheads than you gain.

        Thus the /etc/fstab file might look like this:


          /dev/sda1       swap            swap    pri=1           0       0
          /dev/sdc1       swap            swap    pri=1           0       0



     Remember that the fstab file is very sensitive to the formatting
     used, read the man page carefully and do not just cut and paste the
     lines above.


     Note 2
        Some people use a RAM disk for swapping or some other file
        systems. However, unless you have some very unusual requirements
        or setups you are unlikely to gain much from this as this cuts
        into the memory available for caching and buffering.


     Note 2b
        There is once exception: on a number of badly designed
        motherboards the on board cache memory is not able to cache all
        the RAM that can be addressed. Many older motherboards could
        accept 128 MB RAM but only cache the lower 64 MB. In such cases
        it would improve the performance if you used the upper
        (uncached) 64 MB RAM for RAMdisk based swap or other temporary
        storage.



  4.1.2.  Temporary Storage ( /tmp  and /var/tmp )


     Speed
        Very high. On a separate disk/partition this will reduce
        fragmentation generally, though ext2fs handles fragmentation
        rather well.


     Size
        Hard to tell, small systems are easy to run with just a few MB
        but these are notorious hiding places for stashing files away
        from prying eyes and quota enforcement and can grow without
        control on larger machines. Suggested: small home machine: 8 MB,
        large home machine: 32 MB, small server: 128 MB, and large
        machines up to 500 MB (The machine used by the author at work
        has 1100 users and a 300 MB /tmp directory). Keep an eye on
        these directories, not only for hidden files but also for old
        files. Also be prepared that these partitions might be the first
        reason you might have to resize your partitions.


     Reliability
        Low. Often programs will warn or fail gracefully when these
        areas fail or are filled up. Random file errors will of course
        be more serious, no matter what file area this is.

     Files
        Mostly short files but there can be a huge number of them.
        Normally programs delete their old tmp files but if somehow an
        interruption occurs they could survive. Many distributions have
        a policy regarding cleaning out tmp files at boot time, you
        might want to check out what your setup is.


     Note1
        In FSSTND there is a note about putting /tmp on RAM disk. This,
        however, is not recommended for the same reasons as stated for
        swap. Also, as noted earlier, do not use flash RAM drives for
        these directories. One should also keep in mind that some
        systems are set to automatically clean tmp areas on rebooting.


     Note2
        Older systems had a /usr/tmp but this is no longer recommended
        and for historical reasons a symbolic link now makes it point to
        one of the other tmp areas.



  (* That was 50 lines, I am home and dry! *)


  4.1.3.  Spool Areas ( /var/spool/news  and /var/spool/mail )


     Speed
        High, especially on large news servers. News transfer and
        expiring are disk intensive and will benefit from fast drives.
        Print spools: low. Consider RAID0 for news.


     Size
        For news/mail servers: whatever you can afford. For single user
        systems a few MB will be sufficient if you read continuously.
        Joining a list server and taking a holiday is, on the other
        hand, not a good idea.  (Again the machine I use at work has 100
        MB reserved for the entire /var/spool)


     Reliability
        Mail: very high, news: medium, print spool: low. If your mail is
        very important (isn't it always?) consider RAID for reliability.


     Files
        Usually a huge number of files that are around a few KB in size.
        Files in the print spool can on the other hand be few but quite
        sizable.


     Note
        Some of the news documentation suggests putting all the
        .overview files on a drive separate from the news files, check
        out all news FAQs for more information.  Typical size is about
        3-10 percent of total news spool size.



  4.1.4.  Home Directories ( /home )



     Speed
        Medium. Although many programs use /tmp for temporary storage,
        others such as some news readers frequently update files in the
        home directory which can be noticeable on large multiuser
        systems. For small systems this is not a critical issue.


     Size
        Tricky! On some systems people pay for storage so this is
        usually then a question of finance. Large systems such as
        Nyx.net <http://www.nyx.net/> (which is a free Internet service
        with mail, news and WWW services) run successfully with a
        suggested limit of 100 KB per user and 300 KB as enforced
        maximum. Commercial ISPs offer typically about 5 MB in their
        standard subscription packages.

        If however you are writing books or are doing design work the
        requirements balloon quickly.


     Reliability
        Variable. Losing /home on a single user machine is annoying but
        when 2000 users call you to tell you their home directories are
        gone it is more than just annoying. For some their livelihood
        relies on what is here. You do regular backups of course?


     Files
        Equally tricky. The minimum setup for a single user tends to be
        a dozen files, 0.5 - 5 KB in size. Project related files can be
        huge though.


     Note1
        You might consider RAID for either speed or reliability. If you
        want extremely high speed and reliability you might be looking
        at other operating system and hardware platforms anyway.  (Fault
        tolerance etc.)


     Note2
        Web browsers often use a local cache to speed up browsing and
        this cache can take up a substantial amount of space and cause
        much disk activity. There are many ways of avoiding this kind of
        performance hits, for more information see the sections on
        ``Home Directories'' and ``WWW''.


     Note3
        Users often tend to use up all available space on the /home
        partition. The Linux Quota subsystem is capable of limiting the
        number of blocks and the number of inode a single user ID can
        allocate on a per-filesystem basis. See the Linux Quota mini-
        HOWTO <http://metalab.unc.edu/LDP/mini> by Albert M.C. Tam
        bertie (at) scn.org for details on setup.



  4.1.5.  Main Binaries ( /usr/bin  and /usr/local/bin )


     Speed
        Low. Often data is bigger than the programs which are demand
        loaded anyway so this is not speed critical. Witness the
        successes of live file systems on CD ROM.
     Size
        The sky is the limit but 200 MB should give you most of what you
        want for a comprehensive system. A big system, for software
        development or a multi purpose server should perhaps reserve 500
        MB both for installation and for growth.


     Reliability
        Low. This is usually mounted under root where all the essentials
        are collected. Nevertheless losing all the binaries is a pain...


     Files
        Variable but usually of the order of 10 - 100 KB.



  4.1.6.  Libraries ( /usr/lib  and /usr/local/lib )


     Speed
        Medium. These are large chunks of data loaded often, ranging
        from object files to fonts, all susceptible to bloating. Often
        these are also loaded in their entirety and speed is of some use
        here.


     Size
        Variable. This is for instance where word processors store their
        immense font files. The few that have given me feedback on this
        report about 70 MB in their various lib directories.  A rather
        complete Debian 1.2 installation can take as much as 250 MB
        which can be taken as an realistic upper limit.  The following
        ones are some of the largest disk space consumers: GCC, Emacs,
        TeX/LaTeX, X11 and perl.


     Reliability
        Low. See point ``Main binaries''.


     Files
        Usually large with many of the order of 1 MB in size.


     Note
        For historical reasons some programs keep executables in the lib
        areas. One example is GCC which have some huge binaries in the
        /usr/lib/gcc/lib hierarchy.


  4.1.7.  Boot


     Speed
        Quite low: after all booting doesn't happen that often and
        loading the kernel is just a tiny fraction of the time it takes
        to get the system up and running.


     Size
        Quite small, a complete image with some extras fit on a single
        floppy so 5 MB should be plenty.



     Reliability
        High. See section below on Root.


     Note 1
        The most important part about the Boot partition is that on many
        systems it must reside below cylinder 1023. This is a BIOS
        limitation that Linux cannot get around.



  4.1.8.  Root


     Speed
        Quite low: only the bare minimum is here, much of which is only
        run at startup time.


     Size
        Relatively small. However it is a good idea to keep some
        essential rescue files and utilities on the root partition and
        some keep several kernel versions. Feedback suggests about 20 MB
        would be sufficient.


     Reliability
        High. A failure here will possibly cause a fair bit of grief and
        you might end up spending some time rescuing your boot
        partition. With some practice you can of course do this in an
        hour or so, but I would think if you have some practice doing
        this you are also doing something wrong.

        Naturally you do have a rescue disk? Of course this is updated
        since you did your initial installation? There are many ready
        made rescue disks as well as rescue disk creation tools you
        might find valuable.  Presumably investing some time in this
        saves you from becoming a root rescue expert.


     Note 1
        If you have plenty of drives you might consider putting a spare
        emergency boot partition on a separate physical drive. It will
        cost you a little bit of space but if your setup is huge the
        time saved, should something fail, will be well worth the extra
        space.


     Note 2
        For simplicity and also in case of emergencies it is not
        advisable to put the root partition on a RAID level 0 system.
        Also if you use RAID for your boot partition you have to
        remember to have the md option turned on for your emergency
        kernel.


     Note 3
        For simplicity it is quite common to keep Boot and Root on the
        same partition. If you do that, then in order to boot from LILO
        it is important that the essential boot files reside wholly
        within cylinder 1023. This includes the kernel as well as files
        found in /boot.



  4.1.9.  DOS etc.

  At the danger of sounding heretical I have included this little
  section about something many reading this document have strong
  feelings about.  Unfortunately many hardware items come with setup and
  maintenance tools based around those systems, so here goes.


     Speed
        Very low. The systems in question are not famed for speed so
        there is little point in using prime quality drives.
        Multitasking or multi-threading are not available so the command
        queueing facility found in SCSI drives will not be taken
        advantage of. If you have an old IDE drive it should be good
        enough. The exception is to some degree Win95 and more notably
        NT which have multi-threading support which should theoretically
        be able to take advantage of the more advanced features offered
        by SCSI devices.


     Size
        The company behind these operating systems is not famed for
        writing tight code so you have to be prepared to spend a few
        tens of MB depending on what version you install of the OS or
        Windows. With an old version of DOS or Windows you might fit it
        all in on 50 MB.


     Reliability
        Ha-ha. As the chain is no stronger than the weakest link you can
        use any old drive. Since the OS is more likely to scramble
        itself than the drive is likely to self destruct you will soon
        learn the importance of keeping backups here.

        Put another way: "Your mission, should you choose to accept it,
        is to keep this partition working. The warranty will self
        destruct in 10 seconds..."

        Recently I was asked to justify my claims here. First of all I
        am not calling DOS and Windows sorry excuses for operating
        systems. Secondly there are various legal issues to be taken
        into account. Saying there is a connection between the last two
        sentences are merely the ravings of the paranoid. Surely.
        Instead I shall offer the esteemed reader a few key words: DOS
        4.0, DOS 6.x and various drive compression tools that shall
        remain nameless.



  4.2.  Explanation of Terms

  Naturally the faster the better but often the happy installer of Linux
  has several disks of varying speed and reliability so even though this
  document describes performance as 'fast' and 'slow' it is just a rough
  guide since no finer granularity is feasible. Even so there are a few
  details that should be kept in mind:



  4.2.1.  Speed

  This is really a rather woolly mix of several terms: CPU load,
  transfer setup overhead, disk seek time and transfer rate. It is in
  the very nature of tuning that there is no fixed optimum, and in most
  cases price is the dictating factor. CPU load is only significant for
  IDE systems where the CPU does the transfer itself but is generally
  low for SCSI, see SCSI documentation for actual numbers. Disk seek
  time is also small, usually in the millisecond range. This however is
  not a problem if you use command queueing on SCSI where you then
  overlap commands keeping the bus busy all the time. News spools are a
  special case consisting of a huge number of normally small files so in
  this case seek time can become more significant.

  There are two main parameters that are of interest here:


     Seek
        is usually specified in the average time take for the read/write
        head to seek from one track to another. This parameter is
        important when dealing with a large number of small files such
        as found in spool files.  There is also the extra seek delay
        before the desired sector rotates into position under the head.
        This delay is dependent on the angular velocity of the drive
        which is why this parameter quite often is quoted for a drive.
        Common values are 4500, 5400 and 7200 RPM (rotations per
        minute). Higher RPM reduces the seek time but at a substantial
        cost.  Also drives working at 7200 RPM have been known to be
        noisy and to generate a lot of heat, a factor that should be
        kept in mind if you are building a large array or "disk farm".
        Very recently drives working at 10000 RPM has entered the market
        and here the cooling requirements are even stricter and minimum
        figures for air flow are given.


     Transfer
        is usually specified in megabytes per second.  This parameter is
        important when handling large files that have to be transferred.
        Library files, dictionaries and image files are examples of
        this. Drives featuring a high rotation speed also normally have
        fast transfers as transfer speed is proportional to angular
        velocity for the same sector density.

  It is therefore important to read the specifications for the drives
  very carefully, and note that the maximum transfer speed quite often
  is quoted for transfers out of the on board cache (burst speed) and
  not directly from the platter (sustained speed).  See also section on
  ``Power and Heating''.



  4.2.2.  Reliability

  Naturally no-one would want low reliability disks but one might be
  better off regarding old disks as unreliable. Also for RAID purposes
  (See the relevant information) it is suggested to use a mixed set of
  disks so that simultaneous disk crashes become less likely.

  So far I have had only one report of total file system failure but
  here unstable hardware seemed to be the cause of the problems.

  Disks are cheap these days yet people still underestimate the value of
  the contents of the drives. If you need higher reliability make sure
  you replace old drives and keep spares. It is not unusual that drives
  can work more or less continuous for years and years but what often
  kills a drive in the end is power cycling.


  4.2.3.  Files

  The average file size is important in order to decide the most
  suitable drive parameters. A large number of small files makes the
  average seek time important whereas for big files the transfer speed
  is more important.  The command queueing in SCSI devices is very handy
  for handling large numbers of small files, but for transfer EIDE is
  not too far behind SCSI and normally much cheaper than SCSI.



  5.  File Systems

  Over time the requirements for file systems have increased and the
  demands for large structures, large files, long file names and more
  has prompted ever more advanced file systems, the system that accesses
  and organises the data on mass storage.  Today there is a large number
  of file systems to choose from and this section will describe these in
  detail.

  The emphasis is on Linux but with more input I will be happy to add
  information for a wider audience.



  5.1.  General Purpose File Systems

  Most operating systems usually have a general purpose file system for
  every day use for most kinds of files, reflecting available features
  in the OS such as permission flags, protection and recovery.


  5.1.1.  minix

  This was the original fs for Linux, back in the days Linux was hosted
  on minix machines. It is simple but limited in features and hardly
  ever used these days other than in some rescue disks as it is rather
  compact.


  5.1.2.  xiafs  and extfs

  These are also old and have fallen in disuse and are no longer
  recommended.


  5.1.3.  ext2fs

  This is the established standard for general purpose in the Linux
  world.  It is fast, efficient and mature and is under continuous
  development and features such as ACL and transparent compression are
  on the horizon.

  For more information check the ext2fs
  <http://web.mit.edu/tytso/www/linux/ext2.html> home page.



  5.1.4.  ext3fs

  This is the name for the upcoming successor to ext2fs due to enter
  development kernel in the near future. Many features will be added to
  ext2fs but to avoid confusion over the name after such a radical
  upgrade the name will be changed too. You may have heard of it already
  but source code is not yet available.



  5.1.5.  ufs

  This is the fs used by BSD and variants thereof. It is mature but also
  developed for older types of disk drives where geometries were known.
  The fs uses a number of tricks to optimise performance but as disk
  geometries are translated in a number of ways the net effect is no
  longer so optimal.



  5.1.6.  efs

  The Extent File System (efs) is Silicon Graphics' early file system
  widely used on IRIX before version 6.0 after which xfs has taken over.
  While migration to xfs is encouraged efs is still supported and much
  used on CDs.

  There is a Linux driver available in early beta stage, available at
  Linux extent file system <http://aeschi.ch.eu.org/efs/> home page.



  5.1.7.  XFS

  Silicon Graphics Inc (sgi) <http://www.sgi.com/> has started porting
  its mainframe grade file system to Linux.  Source is not yet available
  as they are busily cleaning out legal encumberance but once that is
  done they will provide the source code under GPL.

  More information is already available on the XFS project page
  <http://www.sgi.com/projects/xfs/> at SGI.



  5.1.8.  reiserfs

  As of July, 23th 1997 Hans Reiser reiser (at) RICOCHET.NET has put up
  the source to his tree based reiserfs <http://devlinux.com/namesys/>
  on the web. While his filesystem has some very interesting features
  and is much faster than ext2fs and is in use by a number of people.
  Hopefully it will be ready for kernel 2.4.0 which might be ready at
  the end of the year.



  5.1.9.  enh-fs

  The Enhanced File System project is now dead.



  5.2.  Microsoft File Systems

  This company is responsible for a lot, including a number of
  filesystems that has at the very least caused confusions.



  5.2.1.  fat

  Actually there are 2 fats out there, fat12 and fat16 depending on the
  partition size used but fortunately the difference is so minor that
  the whole issue is transparent.

  On the plus side these are fast and simple and most OSes understands
  it and can both read and write this fs. And that is about it.

  The minus side is limited safety, severely limited permission flags
  and atrocious scalability. For instance with fat you cannot have
  partitions larger than 2 GB.



  5.2.2.  fat32

  After about 10 years Microsoft realised fat was about, well, 10 years
  behind the times and created this fs which scales reasonably well.

  Permission flags are still limited.  NT 4.0 cannot read this file
  system but Linux can.



  5.2.3.  vfat

  At the same time as Microsoft launched fat32 they also added support
  for long file names, known as vfat.

  Linux reads vfat and fat32 partitions by mounting with type vfat.



  5.2.4.  ntfs

  This is the native fs of Win-NT but as complete information is not
  available there is limited support for other OSes.



  5.3.  Logging and Journaling File Systems

  These take a radically different approach to file updates by logging
  modifications for files in a log and later at some time checkpointing
  the logs.

  Reading is roughly as fast as traditional file systems that always
  update the files directly.  Writing is much faster as only updates are
  appended to a log.  All this is transparent to the user. It is in
  reliability and particularly in checking file system integrity that
  these file systems really shine.  Since the data before last
  checkpointing is known to be good only the log has to be checked, and
  this is much faster than for traditional file systems.

  Note that while logging filesystems keep track of changes made to both
  data and inodes, journaling filesystems keep track only of inode
  changes.

  Linux has quite a choice in such file systems but none are yet in
  production quality. Some are also on hold.


  o  Adam Richter from Yggdrasil posted some time ago that they have
     been working on a compressed log file based system but that this
     project is currently on hold. Nevertheless a non-working version is
     available on their FTP server. Check out the Yggdrasil ftp server
     <ftp://ftp.yggdrasil.com/private/adam> where special patched
     versions of the kernel can be found.

  o  Another project is the Linux log-structured Filesystem Project
     <http://collective.cpoint.net/lfs/> which sadly also is on hold.
     Nevertheless this page contains much information on the topic.

  o  Finally there is the dtfs -- A Log-Structured Filesystem For Linux
     <http://www.complang.tuwien.ac.at/czezatke/lfs.html> which seems to
     be going strong. Still in alpha but sufficiently complete to make
     programs run off this file system



  5.4.  Read-only File Systems

  Read-only media has not escaped the ever increasing complexities seen
  in more general file systems so again there is a large choice to
  choose from with corresponding opportunities for exciting mistakes.

  Note that ext2fs works quite well on a CD-ROM and seems to save space
  while offering the normal file system features such as long file names
  and permissions that can be retained when copying files across to
  read-write media. Also having /dev on a CD-ROM is possible.

  Most of these are used with the CD-ROM media but also the new DVD can
  be used and you can even use it through the loopback device on a hard
  disk file for verifying an image before burning a ROM.

  There is a read-only romfs for Linux but as that is not disk related
  nothing more will be said about it here.


  5.4.1.  High Sierra

  This was one of the earliest standards for CD-ROM formats, supposedly
  named after the hotel where the final agreement took place.

  High Sierra was so limited in features that new extensions simply had
  to appear and while there has been no end to new formats the original
  High Sierra remains the common precursor and is therefore still widely
  supported.



  5.4.2.  iso9660

  The International Standards Organisation made their extensions and
  formalised the standard into what we know as the iso9660 standard.

  The Linux iso9660 file system supports both High Sierra as well as
  Rock Ridge extensions.



  5.4.3.  Rock Ridge

  Not everyone accepts limits like short filenames and lack of
  permissions so very soon the Rock Ridge extensions appeared to rectify
  these shortcomings.



  5.4.4.  Joliet

  Microsoft, not be be outdone in the standards extension game, decided
  it should extend CD-ROM formats with some internationalisation
  features and called it Joliet.

  Linux supports this standards in kernels 2.0.34 or newer.  You need to
  enable NLS in order to use it.



  5.4.5.  Trivia

  Joliet is a city outside Chicago; best known for being the site of the
  prison where Jake was locked up in the movie "Blues Brothers." Rock
  Ridge (the UNIX extensions to ISO 9660) is named after the (fictional)
  town in the movie "Blazing Saddles."



  5.4.6.  UDF

  With the arrival of DVD with up to about 17 GB of storage capacity the
  world seemingly needed another format, this time ambitiously named
  Universal Disk Format (UDF).  This is intended to replace iso9660 and
  will be required for DVD.

  Currently this is not in the standard Linux kernel but a project is
  underway to make a UDF driver
  <http://trylinux.com/projects/udf/index/htm> for Linux. Patches and
  documentation are available.

  More information is also available at the Linux and DVDs
  <http://atv.ne.mediaone.net/linux-dvd/> page.



  5.5.  Networking File Systems

  There is a large number of networking technologies available that lets
  you distribute disks throughout a local or even global networks.  This
  is somewhat peripheral to the topic of this HOWTO but as it can be
  used with local disks I will cover this briefly. It would be best if
  someone (else) took this into a separate HOWTO...


  5.5.1.  NFS

  This is one of the earliest systems that allows mounting a file space
  on one machine onto another. There are a number of problems with NFS
  ranging from performance to security but it has nevertheless become
  established.


  5.5.2.  AFS

  This is a system that allows efficient sharing of files across large
  networks. Starting out as an academic project it is now sold by
  Transarc <http://www.transarc.com> whose home page gives you more
  details.

  Derek Atkins, of MIT, ported AFS to Linux and has also set up the
  Linux AFS mailing List ( linux-afs@mit.edu) for this which is open to
  the public.  Requests to join the list should go to linux-afs-
  request@mit.edu and finally bug reports should be directed to linux-
  afs-bugs@mit.edu.

  Important: as AFS uses encryption it is restricted software and cannot
  easily be exported from the US.


  IBM who owns Transarc, has announced the availability of the latest
  version of client as well as server for Linux.

  Arla is a free AFS implementation, check the Arla homepage
  <http://www.stacken.kth.se/projekt/arla> for more information as well
  as documentation.



  5.5.3.  Coda

  Work has started on a free replacement of AFS and is called Coda
  <http://coda.cs.cmu.edu/>.



  5.5.4.  nbd

  The Network Block Device <http://atrey.karlin.mff.cuni.cz/~pavel>
  (nbd) is available in Linux kernel 2.2 and later and offers reportedly
  excellent performance. The interesting thing here is that it can be
  combined with RAID (see later).



  5.5.5.  GFS

  The Global File System <http://gfs.lcse.umn.edu/> is a new file system
  designed for storage across a wide area network.  It is currently in
  the early stages and more information will come later.



  5.6.  Special File Systems

  In addition to the general file systems there is also a number of more
  specific ones, usually to provide higher performance or other
  features, usually with a tradeoff in other respects.



  5.6.1.  tmpfs  and swapfs

  For short term fast file storage SunOS offers tmpfs which is about the
  same as the swapfs on NeXT.  This overcomes the inherent slowness in
  ufs by caching file data and keeping control information in memory.
  This means that data on such a file system will be lost when rebooting
  and is therefore mainly suitable for /tmp area but not /var/tmp which
  is where temporary data that must survive a reboot, is placed.

  SunOS offers very limited tuning for tmpfs and the number of files is
  even limited by total physical memory of the machine.

  Linux does not have an equivalent to such file system and it is felt
  by many that ext2fs is fast enough to eliminate the need.



  5.6.2.  userfs

  The user file system (userfs) allows a number of extensions to
  traditional file system use such as FTP based file system, compression
  (arcfs) and fast prototyping and many other features. The docfs is
  based on this filesystem.  Check the userfs homepage
  <http://www.goop.org/~jeremy/userfs/> for more information.
  5.6.3.  devfs

  When disks are added, removed or just fail it is likely that disk
  device names of the remaining disks will change.  For instance if sdb
  fails then the old sdc becomes sdb, the old sdc becomes sdb and so on.
  Note that in this case hda, hdb etc will remain unchanged.  Likewise
  if a new drive is added the reverse may happen.

  There is no guarantee that SCSI ID 0 becomes sda and that adding disks
  in increasing ID order will just add a new device name without
  renaming previous entries, as some SCSI drivers assign from ID 0 and
  up while others reverse the scanning order.  Likewise adding a SCSI
  host adapter can also cause renaming.

  Generally device names are assigned in the order they are found.

  The source of the problem lies in the limited number of bits available
  for major and minor numbering in the device files used to describe the
  device itself. You an see these in the /dev directory, info on the
  numbering and allocation can be found in man MAKEDEV.  Currently there
  are 2 solutions to this problem in various stages of development:

     scsidev
        works by creating a database of drives and where they belong,
        check  man scsifs for more information

     devfs
        is a more long term project aimed at getting around the whole
        business of device numbering by making the /dev directory a
        kernel file system in the same way as /procfs is.  More
        information will appear as it becomes available.



  5.6.4.  smugfs

  For a number of reasons it is currently difficult to have files bigger
  than 2 GB. One file system that tries to overcome this limit is smugfs
  which is very fast but also simple. For instance there are no
  directories and the block allocation is simple.

  It is available as compressed tarred source code
  <http://atrey.karlin.mff.cuni.cz/pub/local/mj/linux/smugfs-0.0.tar.gz>
  and while it worked with kernel version 2.1.85 it is quite possible
  some work is required to make it fit into newer kernels. Also the low
  version number (0.0) suggests extra care is required.



  5.7.  File System Recommendations

  There is a jungle of choices but generally it is recommended to use
  the general file system that comes with your distribution.  If you use
  ufs and have some kind of tmpfs available you should first start off
  with the general file system to get an idea of the space requirements
  and if necessary buy more RAM to support the size of tmpfs you need.
  Otherwise you will end up with mysterious crashes and lost time.

  If you use dual boot and need to transfer data between the two OSes
  one of the simplest ways is to use an appropriately sized partition
  formatted with fat as most systems can reliably read and write this.
  Remember the limit of 2 GB for fat partitions.

  For more information of file system interconnectivity you can check
  out the file system <http://www.ceid.upatras.gr/~gef/fs/> page.

  That guide is being superseded by a HOWTO which is underway and a link
  will be added when it is ready.

  To avoid total havoc with device renaming if a drive fails check out
  the scanning order of your system and try to keep your root system on
  hda or sda and removable media such as ZIP drives at the end of the
  scanning order.



  6.  Technologies

  In order to decide how to get the most of your devices you need to
  know what technologies are available and their implications. As always
  there can be some tradeoffs with respect to speed, reliability, power,
  flexibility, ease of use and complexity.

  Many of the techniques described below can be stacked in a number of
  ways to maximise performance and reliability, though at the cost of
  added complexity.



  6.1.  RAID

  This is a method of increasing reliability, speed or both by using
  multiple disks in parallel thereby decreasing access time and
  increasing transfer speed. A checksum or mirroring system can be used
  to increase reliability.  Large servers can take advantage of such a
  setup but it might be overkill for a single user system unless you
  already have a large number of disks available. See other documents
  and FAQs for more information.

  For Linux one can set up a RAID system using either software (the md
  module in the kernel), a Linux compatible controller card (PCI-to-
  SCSI) or a SCSI-to-SCSI controller. Check the documentation for what
  controllers can be used. A hardware solution is usually faster, and
  perhaps also safer, but comes at a significant cost.

  A summary of available hardware RAID solutions for Linux is available
  at Linux Consulting <http://www.Linux-
  Consulting.com/Raid/Docs/raid_hw.txt>.



  6.1.1.  SCSI-to-SCSI

  SCSI-to-SCSI controllers are usually implemented as complete cabinets
  with drives and a controller that connects to the computer with a
  second SCSI bus. This makes the entire cabinet of drives look like a
  single large, fast SCSI drive and requires no special RAID driver. The
  disadvantage is that the SCSI bus connecting the cabinet to the
  computer becomes a bottleneck.

  A significant disadvantage for people with large disk farms is that
  there is a limit to how many SCSI entries there can be in the /dev
  directory. In these cases using SCSI-to-SCSI will conserve entries.

  Usually they are configured via the front panel or with a terminal
  connected to their on-board serial interface.



  Some manufacturers of such systems are CMD <http://www.cmd.com> and
  Syred <http://www.syred.com> whose web pages describe several systems.



  6.1.2.  PCI-to-SCSI

  PCI-to-SCSI controllers are, as the name suggests, connected to the
  high speed PCI bus and is therefore not suffering from the same
  bottleneck as the SCSI-to-SCSI controllers. These controllers require
  special drivers but you also get the means of controlling the RAID
  configuration over the network which simplifies management.

  Currently only a few families of PCI-to-SCSI host adapters are
  supported under Linux.



     DPT
        The oldest and most mature is a range of controllers from DPT
        <http://www.dpt.com> including SmartCache I/III/IV and SmartRAID
        I/III/IV controller families.  These controllers are supported
        by the EATA-DMA driver in the standard kernel. This company also
        has an informative home page <http://www.dpt.com> which also
        describes various general aspects of RAID and SCSI in addition
        to the product related information.

        More information from  the author of the DPT controller drivers
        (EATA* drivers) can be found at his pages on SCSI
        <http://www.uni-mainz.de/~neuffer/scsi> and DPT <http://www.uni-
        mainz.de/~neuffer/scsi/dpt>.

        These are not the fastest but have a good track record of proven
        reliability.

        Note that the maintenance tools for DPT controllers currently
        run under DOS/Win only so you will need a small DOS/Win
        partition for some of the software. This also means you have to
        boot the system into Windows in order to maintain your RAID
        system.



     ICP-Vortex
        A very recent addition is a range of controllers from ICP-Vortex
        <http://www.icp-vortex.com> featuring up to 5 independent
        channels and very fast hardware based on the i960 chip. The
        Linux driver was written by the company itself which shows they
        support Linux.

        As ICP-Vortex supplies the maintenance software for Linux it is
        not necessary with a reboot to other operating systems for the
        setup and maintenance of your RAID system. This saves you also
        extra downtime.



     Mylex DAC-960
        This is one of the latest entries which is out in early beta.
        More information as well as drivers are available at Dandelion
        Digital's Linux DAC960 Page
        <http://www.dandelion.com/Linux/DAC960.html>.



     Compaq Smart-2 PCI Disk Array Controllers
        Another very recent entry and currently in beta release is the
        Smart-2 <http://www.insync.net/~frantzc/cpqarray.html> driver.


     IBM ServeRAID
        IBM has released their driver
        <http://www.developer.ibm.com/welcome/netfinity/serveraid_beta.html>
        as GPL.



  6.1.3.  Software RAID

  A number of operating systems offer software RAID using ordinary disks
  and controllers. Cost is low and performance for raw disk IO can be
  very high.  As this can be very CPU intensive it increases the load
  noticeably so if the machine is CPU bound in performance rather then
  IO bound you might be better off with a hardware PCI-to-RAID
  controller.

  Real cost, performance and especially reliability of software vs.
  hardware RAID is a very controversial topic. Reliability on Linux
  systems have been very good so far.

  The current software RAID project on Linux is the md system (multiple
  devices) which offers much more than RAID so it is described in more
  details later.



  6.1.4.  RAID Levels

  RAID comes in many levels and flavours which I will give a brief
  overview of this here. Much has been written about it and the
  interested reader is recommended to read more about this in the
  Software RAID HOWTO <http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/>.


  o  RAID 0 is not redundant at all but offers the best throughput of
     all levels here. Data is striped across a number of drives so read
     and write operations take place in parallel across all drives. On
     the other hand if a single drive fail then everything is lost. Did
     I mention backups?

  o  RAID 1 is the most primitive method of obtaining redundancy by
     duplicating data across all drives. Naturally this is massively
     wasteful but you get one substantial advantage which is fast
     access.  The drive that access the data first wins. Transfers are
     not any faster than for a single drive, even though you might get
     some faster read transfers by using one track reading per drive.

     Also if you have only 2 drives this is the only method of achieving
     redundancy.

  o  RAID 2 and 4 are not so common and are not covered here.

  o  RAID 3 uses a number of disks (at least 2) to store data in a
     striped RAID 0 fashion. It also uses an additional redundancy disk
     to store the XOR sum of the data from the data disks. Should the
     redundancy disk fail, the system can continue to operate as if
     nothing happened. Should any single data disk fail the system can
     compute the data on this disk from the information on the
     redundancy disk and all remaining disks. Any double fault will
     bring the whole RAID set off-line.

     RAID 3 makes sense only with at least 2 data disks (3 disks
     including the redundancy disk). Theoretically there is no limit for
     the number of disks in the set, but the probability of a fault
     increases with the number of disks in the RAID set. Usually the
     upper limit is 5 to 7 disks in a single RAID set.

     Since RAID 3 stores all redundancy information on a dedicated disk
     and since this information has to be updated whenever a write to
     any data disk occurs, the overall write speed of a RAID 3 set is
     limited by the write speed of the redundancy disk. This, too, is a
     limit for the number of disks in a RAID set. The overall read speed
     of a RAID 3 set with all data disks up and running is that of a
     RAID 0 set with that number of data disks. If the set has to
     reconstruct data stored on a failed disk from redundant
     information, the performance will be severely limited: All disks in
     the set have to be read and XOR-ed to compute the missing
     information.

  o  RAID 5 is just like RAID 3, but the redundancy information is
     spread on all disks of the RAID set. This improves write
     performance, because load is distributed more evenly between all
     available disks.

  There are also hybrids available based on RAID 0 or 1 and one other
  level. Many combinations are possible but I have only seen a few
  referred to. These are more complex than the above mentioned RAID
  levels.

  RAID 0/1 combines striping with duplication which gives very high
  transfers combined with fast seeks as well as redundancy. The
  disadvantage is high disk consumption as well as the above mentioned
  complexity.

  RAID 1/5 combines the speed and redundancy benefits of RAID5 with the
  fast seek of RAID1. Redundancy is improved compared to RAID 0/1 but
  disk consumption is still substantial. Implementing such a system
  would involve typically more than 6 drives, perhaps even several
  controllers or SCSI channels.



  6.2.  Volume Management

  Volume management is a way of overcoming the constraints of fixed
  sized partitions and disks while still having a control of where
  various parts of file space resides. With such a system you can add
  new disks to your system and add space from this drive to parts of the
  file space where needed, as well as migrating data out from a disk
  developing faults to other drives before catastrophic failure occurs.

  The system developed by Veritas <http://www.veritas.com> has become
  the defacto standard for logical volume management.

  Volume management is for the time being an area where Linux is
  lacking.

  One is the virtual partition system project VPS
  <http://www.uiuc.edu/ph/www/roth> that will reimplement many of the
  volume management functions found in IBM's AIX system. Unfortunately
  this project is currently on hold.

  Another project is the Logical Volume Manager
  <http://linux.msede.com/lvm/> project that is similar to a project by
  HP.



  6.3.  Linux md  Kernel Patch

  The Linux Multi Disk (md) provides a number of block level features in
  various stages of development.

  RAID 0 (striping) and concatenation are very solid and in production
  quality and also RAID 4 and 5 are quite mature.

  It is also possible to stack some levels, for instance mirroring (RAID
  1) two pairs of drives, each pair set up as striped disks (RAID 0),
  which offers the speed of RAID 0 combined with the reliability of RAID
  1.

  In addition to RAID this system offers (in alpha stage) block level
  volume management and soon also translucent file space.  Since this is
  done on the block level it can be used in combination with any file
  system, even for fat using Wine.

  Think very carefully what drives you combine so you can operate all
  drives in parallel, which gives you better performance and less wear.
  Read more about this in the documentation that comes with md.

  Unfortunately the documentation is rather old and in parts misleading
  and only refers to md version 0.35 which uses old style setup.  The
  new system is very different and will soon be released as version 1.0
  but is currently undocumented. If you wish to try it out you should
  follow the linux-raid mailing list.

  Documentation is improving and a Software RAID HOWTO
  <http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/> is in progress.

  A patch for online growth of <tt/ext2fs/ <http://www-
  mddsp.enel.ucalgary.ca/People/adilger.online-ext/> is available in
  early stages.

  Hint: if you cannot get it to work properly you have forgotten to set
  the persistent-block flag. Your best documentation is currently the
  source code.



  6.4.  Compression

  Disk compression versus file compression is a hotly debated topic
  especially regarding the added danger of file corruption. Nevertheless
  there are several options available for the adventurous
  administrators. These take on many forms, from kernel modules and
  patches to extra libraries but note that most suffer various forms of
  limitations such as being read-only. As development takes place at
  neck breaking speed the specs have undoubtedly changed by the time you
  read this. As always: check the latest updates yourself. Here only a
  few references are given.


  o  DouBle features file compression with some limitations.

  o  Zlibc adds transparent on-the-fly decompression of files as they
     load.

  o  there are many modules available for reading compressed files or
     partitions that are native to various other operating systems
     though currently most of these are read-only.

  o  dmsdos <http://bf9nt.uni-
     duisburg.de/mitarbeiter/gockel/software/dmsdos/> (currently in
     version 0.9.2.0) offer many of the compression options available
     for DOS and Windows. It is not yet complete but work is ongoing and
     new features added regularly.

  o  e2compr is a package that extends ext2fs with compression
     capabilities. It is still under testing and will therefore mainly
     be of interest for kernel hackers but should soon gain stability
     for wider use.  Check the e2compr homepage
     <http://netspace.net.au/~reiter/e2compr.html> for more information.
     I have reports of speed and good stability which is why it is
     mentioned here.



  6.5.  ACL

  Access Control List (ACL) offers finer control over file access on a
  user by user basis, rather than the traditional owner, group and
  others, as seen in directory listings (drwxr-xr-x). This is currently
  not available in Linux but is expected in kernel 2.3 as hooks are
  already in place in ext2fs.



  6.6.  cachefs

  This uses part of a hard disk to cache slower media such as CD-ROM.
  It is available under SunOS but not yet for Linux.



  6.7.  Translucent or Inheriting File Systems

  This is a copy-on-write system where writes go to a different system
  than the original source while making it look like an ordinary file
  space. Thus the file space inherits the original data and the
  translucent write back buffer can be private to each user.

  There is a number of applications:

  o  updating a live file system on CD-ROM, making it flexible, fast
     while also conserving space,

  o  original skeleton files for each new user, saving space since the
     original data is kept in a single space and shared out,

  o  parallel project development prototyping where every user can
     seemingly modify the system globally while not affecting other
     users.

  SunOS offers this feature and this is under development for Linux.
  There was an old project called the Inheriting File Systems (ifs) but
  this project has stopped.  One current project is part of the md
  system and offers block level translucence so it can be applied to any
  file system.

  Sun has an informative page <http://www.sun.ca/white-papers/tfs.html>
  on translucent file system.


  6.8.  Physical Track Positioning

  This trick used to be very important when drives were slow and small,
  and some file systems used to take the varying characteristics into
  account when placing files. Although higher overall speed, on board
  drive and controller caches and intelligence has reduced the effect of
  this.

  Nevertheless there is still a little to be gained even today.  As we
  know, "world dominance" is soon within reach but to achieve this
  "fast" we need to employ all the tricks we can use .

  To understand the strategy we need to recall this near ancient piece
  of knowledge and the properties of the various track locations.  This
  is based on the fact that transfer speeds generally increase for
  tracks further away from the spindle, as well as the fact that it is
  faster to seek to or from the central tracks than to or from the inner
  or outer tracks.

  Most drives use disks running at constant angular velocity but use
  (fairly) constant data density across all tracks. This means that you
  will get much higher transfer rates on the outer tracks than on the
  inner tracks; a characteristics which fits the requirements for large
  libraries well.

  Newer disks use a logical geometry mapping which differs from the
  actual physical mapping which is transparently mapped by the drive
  itself.  This makes the estimation of the "middle" tracks a little
  harder.

  In most cases track 0 is at the outermost track and this is the
  general assumption most people use. Still, it should be kept in mind
  that there are no guarantees this is so.



     Inner
        tracks are usually slow in transfer, and lying at one end of the
        seeking position it is also slow to seek to.

        This is more suitable to the low end directories such as DOS,
        root and print spools.


     Middle
        tracks are on average faster with respect to transfers than
        inner tracks and being in the middle also on average faster to
        seek to.

        This characteristics is ideal for the most demanding parts such
        as swap, /tmp and /var/tmp.


     Outer
        tracks have on average even faster transfer characteristics but
        like the inner tracks are at the end of the seek so
        statistically it is equally slow to seek to as the inner tracks.

        Large files such as libraries would benefit from a place here.


  Hence seek time reduction can be achieved by positioning frequently
  accessed tracks in the middle so that the average seek distance and
  therefore the seek time is short. This can be done either by using
  fdisk or cfdisk to make a partition on the middle tracks or by first
  making a file (using dd) equal to half the size of the entire disk
  before creating the files that are frequently accessed, after which
  the dummy file can be deleted. Both cases assume starting from an
  empty disk.

  The latter trick is suitable for news spools where the empty directory
  structure can be placed in the middle before putting in the data
  files.  This also helps reducing fragmentation a little.

  This little trick can be used both on ordinary drives as well as RAID
  systems. In the latter case the calculation for centring the tracks
  will be different, if possible. Consult the latest RAID manual.

  The speed difference this makes depends on the drives, but a 50
  percent improvement is a typical value.


  6.8.1.  Disk Speed Values

  The same mechanical head disk assembly (HDA) is often available with a
  number of interfaces (IDE, SCSI etc) and the mechanical parameters are
  therefore often comparable. The mechanics is today often the limiting
  factor but development is improving things steadily. There are two
  main parameters, usually quoted in milliseconds (ms):


  o  Head movement - the speed at which the read-write head is able to
     move from one track to the next, called access time.  If you do the
     mathematics and doubly integrate the seek first across all possible
     starting tracks and then across all possible target tracks you will
     find that this is equivalent of a stroke across a third of all
     tracks.

  o  Rotational speed - which determines the time taken to get to the
     right sector, called latency.

  After voice coils replaced stepper motors for the head movement the
  improvements seem to have levelled off and more energy is now spent
  (literally) at improving rotational speed. This has the secondary
  benefit of also improving transfer rates.

  Some typical values:



                                Drive type


       Access time (ms)        | Fast  Typical   Old
       ---------------------------------------------
       Track-to-track             <1       2       8
       Average seek               10      15      30
       End-to-end                 10      30      70



  This shows that the very high end drives offer only marginally better
  access times then the average drives but that the old drives based on
  stepper motors are significantly worse.



  Rotational speed (RPM)  |  3600 | 4500 | 4800 | 5400 | 7200 | 10000
  -------------------------------------------------------------------
  Latency          (ms)   |    17 |   13 | 12.5 | 11.1 |  8.3 |   6.0



  As latency is the average time taken to reach a given sector, the
  formula is quite simply


       latency (ms) = 60000 / speed (RPM)



  Clearly this too is an example of diminishing returns for the efforts
  put into development. However, what really takes off here is the power
  consumption, heat and noise.



  6.9.  Stacking

  One of the advantages of a layered design of an operating system is
  that you have the flexibility to put the pieces together in a number
  of ways.  For instance you can cache a CD-ROM with cachefs that is a
  volume striped over 2 drives. This in turn can be set up translucently
  with a volume that is NFS mounted from another machine.  RAID can be
  stacked in several layers to offer very fast seek and transfer in such
  a way that it will work if even 3 drives fail.  The choices are many,
  limited only by imagination and, probably more importantly, money.



  6.10.  Recommendations

  There is a near infinite number of combinations available but my
  recommendation is to start off with a simple setup without any fancy
  add-ons. Get a feel for what is needed, where the maximum performance
  is required, if it is access time or transfer speed that is the bottle
  neck, and so on. Then phase in each component in turn. As you can
  stack quite freely you should be able to retrofit most components in
  as time goes by with relatively few difficulties.

  RAID is usually a good idea but make sure you have a thorough grasp of
  the technology and a solid back up system.



  7.  Other Operating Systems

  Many Linux users have several operating systems installed, often
  necessitated by hardware setup systems that run under other operating
  systems, typically DOS or some flavour of Windows. A small section on
  how best to deal with this is therefore included here.


  7.1.  DOS

  Leaving aside the debate on weather or not DOS qualifies as an
  operating system one can in general say that it has little
  sophistication with respect to disk operations. The more important
  result of this is that there can be severe difficulties in running
  various versions of DOS on large drives, and you are therefore
  strongly recommended in reading the Large Drives mini-HOWTO. One
  effect is that you are often better off placing DOS on low track
  numbers.

  Having been designed for small drives it has a rather unsophisticated
  file system (fat) which when used on large drives will allocate
  enormous block sizes. It is also prone to block fragmentation which
  will after a while cause excessive seeks and slow effective transfers.

  One solution to this is to use a defragmentation program regularly but
  it is strongly recommended to back up data and verify the disk before
  defragmenting. All versions of DOS have chkdsk that can do some disk
  checking, newer versions also have scandisk which is somewhat better.
  There are many defragmentation programs available, some versions have
  one called defrag. Norton Utilities have a large suite of disk tools
  and there are many others available too.

  As always there are snags, and this particular snake in our drive
  paradise is called hidden files. Some vendors started to use these for
  copy protection schemes and would not take kindly to being moved to a
  different place on the drive, even if it remained in the same place in
  the directory structure. The result of this was that newer
  defragmentation programs will not touch any hidden file, which in turn
  reduces the effect of defragmentation.

  Being a single tasking, single threading and single most other things
  operating system there is very little gains in using multiple drives
  unless you use a drive controller with built in RAID support of some
  kind.

  There are a few utilities called join and subst which can do some
  multiple drive configuration but there is very little gains for a lot
  of work. Some of these commands have been removed in newer versions.

  In the end there is very little you can do, but not all hope is lost.
  Many programs need fast, temporary storage, and the better behaved
  ones will look for environment variables called TMPDIR or TEMPDIR
  which you can set to point to another drive. This is often best done
  in autoexec.bat.


  ______________________________________________________________________
  SET TMPDIR=E:/TMP
  SET TEMPDIR=E:/TEMP
  ______________________________________________________________________



  Not only will this possibly gain you some speed but also it can reduce
  fragmentation.

  There have been reports about difficulties in removing multiple
  primary partitions using the fdisk program that comes with DOS. Should
  this happen you can instead use a Linux rescue disk with Linux fdisk
  to repair the system.

  Don't forget there are other alternatives to DOS, the most well known
  being DR-DOS <http://www.caldera/dos/> from Caldera
  <http://www.caldera/>.  This is a direct descendant from DR-DOS from
  Digital Research.  It offers many features not found in the more
  common DOS, such as multi tasking and long filenames.

  Another alternative which also is free is Free DOS
  <http://www.freedos.org/> which is a project under development. A
  number of free utilities are also available.

  7.2.  Windows

  Most of the above points are valid for Windows too, with the exception
  of Windows95 which apparently has better disk handling, which will get
  better performance out of SCSI drives.

  A useful thing is the introduction of long filenames, to read these
  from Linux you will need the vfat file system for mounting these
  partitions.


  Disk fragmentation is still a problem. Some of this can be avoided by
  doing a defragmentation immediately before and immediately after
  installing large programs or systems. I use this scheme at work and
  have found it to work quite well. Purging unused files and emptying
  the waste basket first can improve defragmentation further.

  Windows also use swap drives, redirecting this to another drive can
  give you some performance gains. There are several mini-HOWTOs telling
  you how best to share swap space between various operating systems.



  The trick of setting TEMPDIR can still be used but not all programs
  will honour this setting. Some do, though. To get a good overview of
  the settings in the control files you can run sysedit which will open
  a number of files for editing, one of which is the autoexec file where
  you can add the TEMPDIR settings.

  Much of the temporary files are located in the /windows/temp directory
  and changing this is more tricky. To achieve this you can use regedit
  which is rather powerful and quite capable of rendering your system in
  a state you will not enjoy, or more precisely, in a state much less
  enjoyable than windows in general.  Registry database error is a
  message that means seriously bad news.  Also you will see that many
  programs have their own private temporary directories scattered around
  the system.

  Setting the swap file to a separate partition is a better idea and
  much less risky. Keep in mind that this partition cannot be used for
  anything else, even if there should appear to be space left there.

  It is now possible to read ext2fs partitions from Windows, either by
  mounting the partition using FSDEXT2 <http://www.yipton.demon.co.uk/>
  or by using a file explorer like tool called Explore2fs
  <http://uranus.it.swin.edu.au/~jn/linux/Explore2fs.html>.



  7.3.  OS/2

  The only special note here is that you can get a file system driver
  for OS/2 that can read an ext2fs partition.


  7.4.  NT

  This is a more serious system featuring most buzzwords known to
  marketing.  It is well worth noting that it features software striping
  and other more sophisticated setups. Check out the drive manager in
  the control panel.  I do not have easy access to NT, more details on
  this can take a bit of time.

  One important snag was recently reported by acahalan at cs.uml.edu :
  (reformatted from a Usenet News posting)
  NT DiskManager has a serious bug that can corrupt your disk when you
  have several (more than one?) extended partitions.  Microsoft provides
  an emergency fix program at their web site. See the knowledge base
  <http://www.microsoft.com/kb/> for more.  (This affects Linux users,
  because Linux users have extra partitions)

  You can now read ext2fs partitions from NT using Explore2fs
  <http://uranus.it.swin.edu.au/~jn/linux/Explore2fs.html>.



  7.5.  Sun OS

  There is a little bit of confusion in this area between Sun OS vs.
  Solaris.  Strictly speaking Solaris is just Sun OS 5.x packaged with
  Openwindows and a few other things. If you run Solaris, just type
  uname -a to see your version. Parts of the reason for this confusion
  is that Sun Microsystems used to use an OS from the BSD family,
  albeight with a few bits and pieces from elsewhere as well as things
  made by themselves. This was the situation up to Sun OS 4.x.y when
  they did a "strategic roadmap decision" and decided to switch over to
  the official Unix, System V, Release 4 (aka SVR5), and Sun OS 5 was
  created.  This made a lot of people unhappy. Also this was bundled
  with other things and marketed under the name Solaris, which currently
  stands at release 7 which just recently replaced version 2.6 as the
  latest and greatest.  In spite of the large jump in version number
  this is actually a minor technical upgrade but a giant leap for
  marketing.



  7.5.1.  Sun OS 4

  This is quite familiar to most Linux users.  The last release is 4.1.4
  plus various patches.  Note however that the file system structure is
  quite different and does not conform to FSSTND so any planning must be
  based on the traditional structure. You can get some information by
  the man page on this: man hier. This is, like most man pages, rather
  brief but should give you a good start. If you are still confused by
  the structure it will at least be at a higher level.


  7.5.2.  Sun OS 5 (aka Solaris)

  This comes with a snazzy installation system that runs under
  Openwindows, it will help you in partitioning and formatting the
  drives before installing the system from CD-ROM. It will also fail if
  your drive setup is too far out, and as it takes a complete
  installation run from a full CD-ROM in a 1x only drive this failure
  will dawn on you after too long time. That is the experience we had
  where I used to work. Instead we installed everything onto one drive
  and then moved directories across.

  The default settings are sensible for most things, yet there remains a
  little oddity: swap drives. Even though the official manual recommends
  multiple swap drives (which are used in a similar fashion as on Linux)
  the default is to use only a single drive. It is recommended to change
  this as soon as possible.

  Sun OS 5 offers also a file system especially designed for temporary
  files, tmpfs. It offers significant speed improvements over ufs but
  does not survive rebooting.



  The only comment so far is: beware! Under Solaris 2.0 it seem that
  creating too big files in /tmp can cause an out of swap space kernel
  panic trap. As the evidence of what has happened is as lost as any
  data on a RAMdisk after powering down it can be hard to find out what
  has happened. What is worse, it seems that user space processes can
  cause this kernel panic and unless this problem is taken care of it is
  best not to use tmpfs in potentially hostile environments.

  Also see the notes on ``tmpfs''.

  Trivia: There is a movie also called Solaris, a science fiction movie
  that is very, very long, slow and incomprehensible. This was often
  pointed out at the time Solaris (the OS) appeared...



  7.5.3.  BeOS

  This operating system is one of the more recent one to arrive and it
  features a file system that has some database like features.

  There is a BFS file system driver being developed for Linux and is
  available in alpha stage. For more information check the Linux BFS
  page <http://hp.vector.co.jp/authors/VA008030/bfs> where patches also
  are available.



  8.  Clusters

  In this section I will briefly touch on the ways machines can be
  connected together but this is so big a topic it could be a separate
  HOWTO in its own right, hint, hint. Also, strictly speaking, this
  section lies outside the scope of this HOWTO, so if you feel like
  getting fame etc. you could contact me and take over this part and
  turn it into a new document.

  These days computers gets outdated at an incredible rate. There is
  however no reason why old hardware could not be put to good use with
  Linux. Using an old and otherwise outdated computer as a network
  server can be both useful in its own right as well as a valuable
  educational exercise. Such a local networked cluster of computers can
  take on many forms but to remain within the charter of this HOWTO I
  will limit myself to the disk strategies.  Nevertheless I would hope
  someone else could take on this topic and turn it into a document on
  its own.

  This is an exciting area of activity today, and many forms of
  clustering is available today, ranging from automatic workload
  balancing over local network to more exotic hardware such as Scalable
  Coherent Interface (SCI) which gives a tight integration of machines,
  effectively turning them into a single machine. Various kinds of
  clustering has been available for larger machines for some time and
  the VAXcluster is perhaps a well known example of this. Clustering is
  done usually in order to share resources such as disk drives, printers
  and terminals etc, but also processing resources equally transparently
  between the computational nodes.

  There is no universal definition of clustering, in here it is taken to
  mean a network of machines that combine their resources to serve
  users. Admittedly this is a rather loose definition but this will
  change later.

  These days also Linux offers some clustering features but for a
  starter I will just describe a simple local network. It is a good way
  of putting old and otherwise unusable hardware to good use, as long as
  they can run Linux or something similar.

  One of the best ways of using an old machine is as a network server in
  which case the effective speed is more likely to be limited by network
  bandwidth rather than pure computational performance. For home use you
  can move the following functionality off to an older machine used as a
  server:

  o  news

  o  mail

  o  web proxy

  o  printer server

  o  modem server (PPP, SLIP, FAX, Voice mail)

  You can also NFS mount drives from the server onto your workstation
  thereby reducing drive space requirements. Still read the FSSTND to
  see what directories should not be exported. The best candidates for
  exporting to all machines are /usr and /var/spool and possibly
  /usr/local but probably not /var/spool/lpd.

  Most of the time even slow disks will deliver sufficient performance.
  On the other hand, if you do processing directly on the disks on the
  server or have very fast networking, you might want to rethink your
  strategy and use faster drives. Searching features on a web server or
  news database searches are two examples of this.

  Such a network can be an excellent way of learning system
  administration and building up your own toaster network, as it often
  is called. You can get more information on this in other HOWTOs but
  there are two important things you should keep in mind:

  o  Do not pull IP numbers out of thin air. Configure your inside net
     using IP numbers reserved for private use, and use your network
     server as a router that handles this IP masquerading.

  o  Remember that if you additionally configure the router as a
     firewall you might not be able to get to your own data from the
     outside, depending on the firewall configuration.

  The Nyx network provides an example of a cluster in the sense defined
  here.  It consists of the following machines:

     nyx
        is one of the two user login machines and also provides some of
        the networking services.

     nox
        (aka nyx10) is the main user login machine and is also the mail
        server.

     noc
        is a dedicated news server. The news spool is made accessible
        through NFS mounting to nyx and nox.

     arachne
        (aka www) is the web server. Web pages are written by NFS
        mounting onto nox.

  There are also some more advanced clustering projects going, notably


  o  The Beowulf Project
     <http://cesdis.gsfc.nasa.gov/linux/beowulf/beowulf.html>

  o  The Genoa Active Message Machine (GAMMA)
     <http://www.disi.unige.it/project/gamma/>


  High-tech clustering requires high-tech interconnect, and SCI is one
  of them.  To find out more you can either look up the home page of
  Dolphin Interconnect Solutions <http://www.dolphinics.no/> which is
  one of the main actors in this field, or you can have a look at scizzl
  <http://www.scizzl.com/>.


  Centralised mail servers using IMAP are becoming more and more popular
  as disks become large enough to keep all mail stored indefinitely and
  also cheap enough to make it a feasible option.  Unfortunately it has
  become clear that NFS mounting the mail archives from another machine
  can cause corruption of the IMAP database as the server software does
  not handle NFS timeouts too well, and NFS timeouts are a rather common
  occurrence.  Keep therefore the mail archive local to the IMAP server.



  9.  Mount Points

  In designing the disk layout it is important not to split off the
  directory tree structure at the wrong points, hence this section.  As
  it is highly dependent on the FSSTND it has been put aside in a
  separate section, and will most likely have to be totally rewritten
  when FHS is adopted in a Linux distribution.  In the meanwhile this
  will do.

  Remember that this is a list of where a separation can take place, not
  where it has to be. As always, good judgement is always required.

  Again only a rough indication can be given here. The values indicate



       0=don't separate here
       1=not recommended
        ...
       4=useful
       5=recommended



  In order to keep the list short, the uninteresting parts are removed.



  Directory   Suitability
  /
  |
  +-bin       0
  +-boot      0
  +-dev       0
  +-etc       0
  +-home      5
  +-lib       0
  +-mnt       0
  +-proc      0
  +-root      0
  +-sbin      0
  +-tmp       5
  +-usr       5
  | \
  | +-X11R6     3
  | +-bin       3
  | +-lib       4
  | +-local     4
  | | \
  | | +bin        2
  | | +lib        4
  | +-src       3
  |
  +-var       5
    \
    +-adm       0
    +-lib       2
    +-lock      1
    +-log       0
    +-preserve  1
    +-run       1
    +-spool     4
    | \
    | +-mail      3
    | +-mqueue    3
    | +-news      5
    | +-smail     3
    | +-uucp      3
    +-tmp       5



  There is of course plenty of adjustments possible, for instance a home
  user would not bother with splitting off the /var/spool hierarchy but
  a serious ISP should. The key here is usage.

  QUIZ! Why should /etc never be on a separate partition?  Answer:
  Mounting instructions during boot is found in the file /etc/fstab so
  if this is on a separate and unmounted partition it is like the key to
  a locked drawer is inside that drawer, a hopeless situation. (Yes,
  I'll do nearly anything to liven up this HOWTO.)



  10.  Considerations and Dimensioning

  The starting point in this will be to consider where you are and what
  you want to do. The typical home system starts out with existing
  hardware and the newly converted Linux user will want to get the most
  out of existing hardware. Someone setting up a new system for a
  specific purpose (such as an Internet provider) will instead have to
  consider what the goal is and buy accordingly. Being ambitious I will
  try to cover the entire range.

  Various purposes will also have different requirements regarding file
  system placement on the drives, a large multiuser machine would
  probably be best off with the /home directory on a separate disk, just
  to give an example.

  In general, for performance it is advantageous to split most things
  over as many disks as possible but there is a limited number of
  devices that can live on a SCSI bus and cost is naturally also a
  factor. Equally important, file system maintenance becomes more
  complicated as the number of partitions and physical drives increases.


  10.1.  Home Systems

  With the cheap hardware available today it is possible to have quite a
  big system at home that is still cheap, systems that rival major
  servers of yesteryear. While many started out with old, discarded
  disks to build a Linux server (which is how this HOWTO came into
  existence), many can now afford to buy 20 GB disks up front.

  Size remains important for some, and here are a few guidelines:


     Testing
        Linux is simple and you don't even need a hard disk to try it
        out, if you can get the boot floppies to work you are likely to
        get it to work on your hardware. If the standard kernel does not
        work for you, do not forget that often there can be special boot
        disk versions available for unusual hardware combinations that
        can solve your initial problems until you can compile your own
        kernel.


     Learning
        about operating system is something Linux excels in, there is
        plenty of documentation and the source is available. A single
        drive with 50 MB is enough to get you started with a shell, a
        few of the most frequently used commands and utilities.


     Hobby
        use or more serious learning requires more commands and
        utilities but a single drive is still all it takes, 500 MB
        should give you plenty of room, also for sources and
        documentation.


     Serious
        software development or just serious hobby work requires even
        more space. At this stage you have probably a mail and news feed
        that requires spool files and plenty of space. Separate drives
        for various tasks will begin to show a benefit. At this stage
        you have probably already gotten hold of a few drives too. Drive
        requirements gets harder to estimate but I would expect 2-4 GB
        to be plenty, even for a small server.


     Servers
        come in many flavours, ranging from mail servers to full sized
        ISP servers. A base of 2 GB for the main system should be
        sufficient, then add space and perhaps also drives for separate
        features you will offer. Cost is the main limiting factor here
        but be prepared to spend a bit if you wish to justify the "S" in
        ISP. Admittedly, not all do it.

        Basically a server is dimensioned like any machine for serious
        use with added space for the services offered, and tends to be
        IO bound rather than CPU bound.

        With cheap networking technology both for land lines as well as
        through radio nets, it is quite likely that very soon home users
        will have their own servers more or less permanently hooked onto
        the net.



  10.2.  Servers

  Big tasks require big drives and a separate section here. If possible
  keep as much as possible on separate drives. Some of the appendices
  detail the setup of a small departmental server for 10-100 users. Here
  I will present a few consideration for the higher end servers. In
  general you should not be afraid of using RAID, not only because it is
  fast and safe but also because it can make growth a little less
  painful. All the notes below come as additions to the points mentioned
  earlier.

  Popular servers rarely just happens, rather they grow over time and
  this demands both generous amounts of disk space as well as a good net
  connection.  In many of these cases it might be a good idea to reserve
  entire SCSI drives, in singles or as arrays, for each task. This way
  you can move the data should the computer fail. Note that transferring
  drives across computers is not simple and might not always work,
  especially in the case of IDE drives. Drive arrays require careful
  setup in order to reconstruct the data correctly, so you might want to
  keep a paper copy of your fstab file as well as a note of SCSI IDs.


  10.2.1.  Home Directories

  Estimate how many drives you will need, if this is more than 2 I would
  recommend RAID, strongly. If not you should separate users across your
  drives dedicated to users based on some kind of simple hashing
  algorithm.  For instance you could use the first 2 letters in the user
  name, so jbloggs is put on /u/j/b/jbloggs where /u/j is a symbolic
  link to a physical drive so you can get a balanced load on your
  drives.


  10.2.2.  Anonymous FTP

  This is an essential service if you are serious about service. Good
  servers are well maintained, documented, kept up to date, and
  immensely popular no matter where in the world they are located. The
  big server ftp.funet.fi <ftp://ftp.funet.fi> is an excellent example
  of this.

  In general this is not a question of CPU but of network bandwidth.
  Size is hard to estimate, mainly it is a question of ambition and
  service attitudes. I believe the big archive at ftp.cdrom.com
  <ftp://ftp.cdrom.com> is a *BSD machine with 50 GB disk. Also memory
  is important for a dedicated FTP server, about 256 MB RAM would be
  sufficient for a very big server, whereas smaller servers can get the
  job done well with 64 MB RAM.  Network connections would still be the
  most important factor.



  10.2.3.  WWW

  For many this is the main reason to get onto the Internet, in fact
  many now seem to equate the two. In addition to being network
  intensive there is also a fair bit of drive activity related to this,
  mainly regarding the caches. Keeping the cache on a separate, fast
  drive would be beneficial. Even better would be installing a caching
  proxy server. This way you can reduce the cache size for each user and
  speed up the service while at the same time cut down on the bandwidth
  requirements.

  With a caching proxy server you need a fast set of drives, RAID0 would
  be ideal as reliability is not important here. Higher capacity is
  better but about 2 GB should be sufficient for most. Remember to match
  the cache period to the capacity and demand. Too long periods would on
  the other hand be a disadvantage, if possible try to adjust based on
  the URL. For more information check up on the most used servers such
  as Harvest, Squid <http://www.nlanr.net/Squid> and the one from
  Netscape <http://www.netscape.com>.



  10.2.4.  Mail

  Handling mail is something most machines do to some extent. The big
  mail servers, however, come into a class of their own. This is a
  demanding task and a big server can be slow even when connected to
  fast drives and a good net feed. In the Linux world the big server at
  vger.rutgers.edu is a well known example. Unlike a news service which
  is distributed and which can partially reconstruct the spool using
  other machines as a feed, the mail servers are centralised. This makes
  safety much more important, so for a major server you should consider
  a RAID solution with emphasize on reliability. Size is hard to
  estimate, it all depends on how many lists you run as well as how many
  subscribers you have.

  Big mail servers can be IO limited in performance and for this reason
  some use huge silicon disks connected to the SCSI bus to hold all mail
  related files including temporary files.  For extra safety these are
  battery backed and filesystems like udf are preferred since they
  always flush metadata to disk.  This added cost to performance is
  offset by the very fast disk.

  Note that these days more and more switch over from using POP to pull
  mail to local machine from mail server and instead use IMAP to serve
  mail while keeping the mail archive centralised.  This means that mail
  is no longer spooled in its original sense but often builds up,
  requiring huge disk space. Also more and more (ab)use mail attachments
  to send all sorts of things across, even a small word processor
  document can easily end up over 1 MB. Size your disks generously and
  keep an eye on how much space is left.



  10.2.5.  News

  This is definitely a high volume task, and very dependent on what news
  groups you subscribe to. On Nyx there is a fairly complete feed and
  the spool files consume about 17 GB. The biggest groups are no doubt
  in the alt.binary.* hierarchy, so if you for some reason decide not to
  get these you can get a good service with perhaps 12 GB. Still others,
  that shall remain nameless, feel 2 GB is sufficient to claim ISP
  status.  In this case news expires so fast I feel the spelling IsP is
  barely justified. A full newsfeed means a traffic of a few GB every
  day and this is an ever growing number.

  10.2.6.  Others

  There are many services available on the net and even though many have
  been put somewhat in the shadows by the web. Nevertheless, services
  like archie, gopher and wais just to name a few, still exist and
  remain valuable tools on the net. If you are serious about starting a
  major server you should also consider these services. Determining the
  required volumes is hard, it all depends on popularity and demand.
  Providing good service inevitably has its costs, disk space is just
  one of them.



  10.2.7.  Server Recommendations

  Servers today require large numbers of large disks to function
  satisfactorily in commercial settings. As mean time between failure
  (MTBF) decreases rapidly as the number of components increase it is
  advisable to look into using RAID for protection and use a number of
  medium sized drives rather than one single huge disk. Also look into
  the High Availability (HA) project for more information.  More
  information is available at

  High Availability HOWTO <http://metalab.unc.edu/pub/Linux/ALPHA/linux-
  ha/High-Availability-HOWTO.html> and also at related web pages
  <http://www.henge.com/~alanr/ha/index.html>.



  10.3.  Pitfalls

  The dangers of splitting up everything into separate partitions are
  briefly mentioned in the section about volume management. Still,
  several people have asked me to emphasize this point more strongly:
  when one partition fills up it cannot grow any further, no matter if
  there is plenty of space in other partitions.

  In particular look out for explosive growth in the news spool
  (/var/spool/news). For multi user machines with quotas keep an eye on
  /tmp and /var/tmp as some people try to hide their files there, just
  look out for filenames ending in gif or jpeg...

  In fact, for single physical drives this scheme offers very little
  gains at all, other than making file growth monitoring easier (using
  'df') and physical track positioning. Most importantly there is no
  scope for parallel disk access. A freely available volume management
  system would solve this but this is still some time in the future.
  However, when more specialised file systems become available even a
  single disk could benefit from being divided into several partitions.



  11.  Disk Layout

  With all this in mind we are now ready to embark on the layout. I have
  based this on my own method developed when I got hold of 3 old SCSI
  disks and boggled over the possibilities.

  The tables in the appendices are designed to simplify the mapping
  process. They have been designed to help you go through the process of
  optimizations as well as making an useful log in case of system
  repair. A few examples are also given.


  11.1.  Selection for Partitioning

  Determine your needs and set up a list of all the parts of the file
  system you want to be on separate partitions and sort them in
  descending order of speed requirement and how much space you want to
  give each partition.

  The table in ``Appendix A'' section is a useful tool to select what
  directories you should put on different partitions. It is sorted in a
  logical order with space for your own additions and notes about
  mounting points and additional systems. It is therefore NOT sorted in
  order of speed, instead the speed requirements are indicated by
  bullets ('o').

  If you plan to RAID make a note of the disks you want to use and what
  partitions you want to RAID. Remember various RAID solutions offers
  different speeds and degrees of reliability.

  (Just to make it simple I'll assume we have a set of identical SCSI
  disks and no RAID)



  11.2.  Mapping Partitions to Drives

  Then we want to place the partitions onto physical disks. The point of
  the following algorithm is to maximise parallelizing and bus capacity.
  In this example the drives are A, B and C and the partitions are
  987654321 where 9 is the partition with the highest speed requirement.
  Starting at one drive we 'meander' the partition line over and over
  the drives in this way:



               A : 9 4 3
               B : 8 5 2
               C : 7 6 1



  This makes the 'sum of speed requirements' the most equal across each
  drive.

  Use the table in ``Appendix B'' section to select what drives to use
  for each partition in order to optimize for paralellicity.

  Note the speed characteristics of your drives and note each directory
  under the appropriate column. Be prepared to shuffle directories,
  partitions and drives around a few times before you are satisfied.


  11.3.  Sorting Partitions on Drives

  After that it is recommended to select partition numbering for each
  drive.

  Use the table in ``Appendix C'' section to select partition numbers in
  order to optimize for track characteristics.  At the end of this you
  should have a table sorted in ascending partition number. Fill these
  numbers back into the tables in appendix A and B.

  You will find these tables useful when running the partitioning
  program (fdisk or cfdisk) and when doing the installation.


  11.4.  Optimizing

  After this there are usually a few partitions that have to be
  'shuffled' over the drives either to make them fit or if there are
  special considerations regarding speed, reliability, special file
  systems etc. Nevertheless this gives what this author believes is a
  good starting point for the complete setup of the drives and the
  partitions. In the end it is actual use that will determine the real
  needs after we have made so many assumptions. After commencing
  operations one should assume a time comes when a repartitioning will
  be beneficial.

  For instance if one of the 3 drives in the above mentioned example is
  very slow compared to the two others a better plan would be as
  follows:



               A : 9 6 5
               B : 8 7 4
               C : 3 2 1



  11.4.1.  Optimizing by Characteristics

  Often drives can be similar in apparent overall speed but some
  advantage can be gained by matching drives to the file size
  distribution and frequency of access. Thus binaries are suited to
  drives with fast access that offer command queueing, and libraries are
  better suited to drives with larger transfer speeds where IDE offers
  good performance for the money.



  11.4.2.  Optimizing by Drive Parallelising

  Avoid drive contention by looking at tasks: for instance if you are
  accessing /usr/local/bin chances are you will soon also need files
  from /usr/local/lib so placing these at separate drives allows less
  seeking and possible parallel operation and drive caching. It is quite
  possible that choosing what may appear less than ideal drive
  characteristics will still be advantageous if you can gain parallel
  operations. Identify common tasks, what partitions they use and try to
  keep these on separate physical drives.

  Just to illustrate my point I will give a few examples of task
  analysis here.



     Office software
        such as editing, word processing and spreadsheets are typical
        examples of low intensity software both in terms of CPU and disk
        intensity. However, should you have a single server for a huge
        number of users you should not forget that most such software
        have auto save facilities which cause extra traffic, usually on
        the home directories. Splitting users over several drives would
        reduce contention.


     News
        readers also feature auto save features on home directories so
        ISPs should consider separating home directories

        News spools are notorious for their deeply nested directories
        and their large number of very small files. Loss of a news spool
        partition is not a big problem for most people, too, so they are
        good candidates for a RAID 0 setup with many small disks to
        distribute the many seeks among multiple spindles. It is
        recommended in the manuals and FAQs for the INN news server to
        put news spool and .overview files on separate drives for larger
        installations.

        There is also a web page dedicated to INN optimising
        <http://www.spinne.com/usenet/inn-perf.html> well worth reading.



     Database
        applications can be demanding both in terms of drive usage and
        speed requirements. The details are naturally application
        specific, read the documentation carefully with disk
        requirements in mind. Also consider RAID both for performance
        and reliability.


     E-mail
        reading and sending involves home directories as well as in- and
        outgoing spool files. If possible keep home directories and
        spool files on separate drives. If you are a mail server or a
        mail hub consider putting in- and outgoing spool directories on
        separate drives.

        Losing mail is an extremely bad thing, if you are managing an
        ISP or major hub. Think about RAIDing your mail spool and
        consider frequent backups.


     Software development
        can require a large number of directories for binaries,
        libraries, include files as well as source and project files. If
        possible split as much as possible across separate drives. On
        small systems you can place /usr/src and project files on the
        same drive as the home directories.


     Web browsing
        is becoming more and more popular. Many browsers have a local
        cache which can expand to rather large volumes. As this is used
        when reloading pages or returning to the previous page, speed is
        quite important here. If however you are connected via a well
        configured proxy server you do not need more than typically a
        few megabytes per user for a session.  See also the sections on
        ``Home Directories'' and ``WWW''.



  11.5.  Compromises

  One way to avoid the aforementioned ``pitfalls'' is to only set off
  fixed partitions to directories with a fairly well known size such as
  swap, /tmp and /var/tmp and group together the remainders into the
  remaining partitions using symbolic links.

  Example: a slow disk (slowdisk), a fast disk (fastdisk) and an
  assortment of files. Having set up swap and tmp on fastdisk; and /home
  and root on slowdisk we have (the fictitious) directories /a/slow,
  /a/fast, /b/slow and /b/fast left to allocate on the partitions
  /mnt.slowdisk and /mnt.fastdisk which represents the remaining
  partitions of the two drives.

  Putting /a or /b directly on either drive gives the same properties to
  the subdirectories. We could make all 4 directories separate
  partitions but would lose some flexibility in managing the size of
  each directory. A better solution is to make these 4 directories
  symbolic links to appropriate directories on the respective drives.

  Thus we make



       /a/fast point to /mnt.fastdisk/a/fast   or   /mnt.fastdisk/a.fast
       /a/slow point to /mnt.slowdisk/a/slow   or   /mnt.slowdisk/a.slow
       /b/fast point to /mnt.fastdisk/b/fast   or   /mnt.fastdisk/b.fast
       /b/slow point to /mnt.slowdisk/b/slow   or   /mnt.slowdisk/b.slow



  and we get all fast directories on the fast drive without having to
  set up a partition for all 4 directories. The second (right hand)
  alternative gives us a flatter files system which in this case can
  make it simpler to keep an overview of the structure.

  The disadvantage is that it is a complicated scheme to set up and plan
  in the first place and that all mount points and partitions have to be
  defined before the system installation.

  Important: note that the /usr partition must be mounted directly onto
  root and not via an indirect link as described above.  The reason for
  this are the long backward links used extensively in X11 that go from
  deep within /usr all the way to root and then down into /etc
  directories.



  12.  Implementation

  Having done the layout you should now have a detailled description on
  what goes where. Most likely this will be on paper but hopefully
  someone will make a more automated system that can deal with
  everything from the design, through partitioning to formatting and
  installation. This is the route one will have to take to realise the
  design.

  Modern distributions come with installation tools that will guide you
  through partitioning and formatting and also set up /etc/fstab for you
  automatically. For later modifications, however, you will need to
  understand the underlying mechanisms.



  12.1.  Drives and Partitions

  When you start DOS or the like you will find all partitions labeled C:
  and onwards, with no differentiation on IDE, SCSI, network or whatever
  type of media you have. In the world of Linux this is rather
  different. During booting you will see partitions described like this:



  ______________________________________________________________________
  Dec  6 23:45:18 demos kernel: Partition check:
  Dec  6 23:45:18 demos kernel:  sda: sda1
  Dec  6 23:45:18 demos kernel:  hda: hda1 hda2
  ______________________________________________________________________



  SCSI drives are labelled sda, sdb, sdc etc, and (E)IDE drives are
  labelled hda, hdb, hdc etc.  There are also standard names for all
  devices, full information can be found in /dev/MAKEDEV and
  /usr/src/linux/Documentation/devices.txt.

  Partitions are labelled numerically for each drive hda1, hda2 and so
  on.  On SCSI drives there can be 15 partitions per drive, on EIDE
  drives there can be 63 partitions per drive. Both limits exceed what
  is currently useful for most disks.

  These are then mounted according to the file /etc/fstab before they
  appear as a part of the file system.



  12.2.  Partitioning


  It feels so good / It's a marginal risk / when I clear off / windows
  with fdisk!  (the Dustbunny in an issue
  <http://www.userfriendly.org/cartoons/archives/99feb/19990221.html> of
  User Friendly <http://www.userfriendly.org/> in the song "Refund
  this")

  First you have to partition each drive into a number of separate
  partitions.  Under Linux there are two main methods, fdisk and the
  more screen oriented cfdisk. These are complex programs, read the
  manual very carefully. For the experts there is now also sfdisk.


  Partitions come in 3 flavours, primary, extended and logical.  You
  have to use primary partitions for booting, but there is a maximum of
  4 primary partitions. If you want more you have to define an extended
  partition within which you define your logical partitions.

  Each partition has an identifier number which tells the operating
  system what it is, for Linux the types swap(82) and ext2fs(83) are the
  ones you will need to know.  If you want to use RAID with autostart
  you have to check the documentation for the appropriate type number
  for the RAID partition.

  There is a readme file that comes with fdisk that gives more in-depth
  information on partitioning.

  Someone has just made a Partitioning HOWTO which contains excellent,
  in depth information on the nitty-gritty of partitioning. Rather than
  repeating it here and bloating this document further, I will instead
  refer you to it instead.

  Redhat has written a screen oriented utility called Disk Druid which
  is supposed to be a user friendly alternative to fdisk and cfdisk and
  also automates a few other things. Unfortunately this product is not
  quite mature so if you use it and cannot get it to work you are well
  advised to try fdisk or cfdisk.

  The Ranish Partition Manager
  <http://www.users.intercom.com/~ranish/part/> is another free
  alternative, while Partition Magic <http://www.powerquest.com> is a
  popular commercial alternative which also offers some support for
  resizing ext2fs partitions.

  Note that Windows will complain if it finds more than one primary
  partition on a drive.  Also it appears to assign drive letters to
  primary partitions as it finds disks before starting over from the
  first disk to assign subsequent drive names to logical partitions.

  If you want DOS/Windows on your system you should make that partition
  first, a primary one to boot to, made with the DOS fdisk program.
  Then if you want NT you put that one in.  Finally, for Linux, you
  create those partitions with the Linux fdisk program or equivalents.
  Linux is flexible enough to boot from both primary as well as logical
  partitions.

  In depth information on DOS fdisk can be found at Fdisk.com
  <http://www.fdisk.com/fdisk> and MS-DOS 5.00 - 7.10 Undocumented,
  Secret + Hidden Features <http://members.aol.com/axcel216/secrets.htm>
  which details even more bugs and pitfalls.


  12.3.  Repartitioning

  Sometimes it is necessary to change the sizes of existing partitions
  while keeping the contents intact. One way is of course to back up
  everything, recreate new partitions and then restore the old contents,
  and while this gives your back up system a good test it is also rather
  time consuming.

  Partition resizing is a simpler alternative where a file system is
  first shrunk to desired volume and then the partition table is updated
  to reflect the new end of partition position. This process is
  therefore very file system sensitive.

  Repartitioning requires there to be free space at the end of the file
  space so to ensure you are able to shrink the size you should first
  defragment your drive and empty any wastebaskets.

  Using fips <http://www.igd.fgh.de/~aschaefe/fips/> you can resize a
  fat partition, and the latest version 1.6 of fips or fips 2.0 are also
  able to resize fat32 partition.  Note that these programs actually run
  under DOS.

  Resizing other file systems are much more complicated but one popular
  commercial system Partition Magic <http://www.powerquest.com> is able
  to resize more file system types, including ext2fs using the resize2fs
  program. Make sure you get the latest updates to this program as
  recent versions had problems with large disks.


  In order to get the most out of fips you should first delete
  unnecessary files, empty wastebaskets etc.  before defragmenting your
  drive.  This way you can allocate more space to other partitions.  If
  the program complains there are still files at the end of your drive
  it is probably hidden files generated by Microsoft Mirror or Norton
  Image.  These are probably called image.idx and image.dat and contain
  backups of some system files.

  There are reports that in some Windows defragmentation programs you
  should make sure the box "allow Windows to move files around" is not
  checked, otherwise you will end up with some files in the last
  cylinder of the partition which will prevent FIPS from reclaiming
  space.

  If you still have unmovable files at the end of your DOS partition you
  should get the DOS program showfat
  <http://www8.pair.com/dmurdoch/programs/showfat.htm> version 3.0 or
  higher.  This shows you what files are where so you can deal with them
  directly.

  A freeware alternative is Partition Resizer
  <http://member.xoom.com/Zeleps> which can shrink, grow and move
  partitions.

  Some versions of DOS / Windows have a hidden flag for defrag, "/P that
  causes defrag to move even hidden files. Use at own risk.


  Repartitioning is as dangerous process as any other partitioning so
  you are advised to have a fresh backup handy.



  12.4.  Microsoft Partition Bug

  In Microsoft products all the way up to Win 98 there is a tricky bug
  that can cause you a bit of trouble: if you have several primary fat
  partitions and the last extended partition is not a fat partition the
  Microsoft system will try to mount the last partition as if it were a
  FAT partition in place of the last primary FAT partition.

  There is more information <http://www.v-
  com.com/support/osinstalls/notes/95Notes.html> available on the net on
  this.

  To avoid this you can place a small logical fat partition at the very
  end of your disk.

  More information on multi OS installations are available at V
  Communications <http://www.v-com.com/>.


  Since some hardware comes with setup software that is available under
  DOS only this could come in handy anyway. Notable examples are RAID
  controllers from DPT and a number of networking cards.


  12.5.  Multiple Devices ( md )

  Being in a state of flux you should make sure to read the latest
  documentation on this kernel feature. It is not yet stable, beware.

  Briefly explained it works by adding partitions together into new
  devices md0, md1 etc. using mdadd before you activate them using
  mdrun. This process can be automated using the file /etc/mdtab.

  The latest md system uses a /etc/raidtab and a different syntax. Make
  sure your RAID-tools package matches the md version as the internal
  protocol has changed.

  Then you then treat these like any other partition on a drive. Proceed
  with formatting etc. as described below using these new devices.

  There is now also a HOWTO in development for RAID using md you should
  read.



  12.6.  Formatting

  Next comes partition formatting, putting down the data structures that
  will describe the files and where they are located. If this is the
  first time it is recommended you use formatting with verify. Strictly
  speaking it should not be necessary but this exercises the I/O hard
  enough that it can uncover potential problems, such as incorrect
  termination, before you store your precious data. Look up the command
  mkfs for more details.

  Linux can support a great number of file systems, rather than
  repeating the details you can read the man page for fs which describes
  them in some details. Note that your kernel has to have the drivers
  compiled in or made as modules in order to be able to use these
  features. When the time comes for kernel compiling you should read
  carefully through the file system feature list. If you use make
  menuconfig you can get online help for each file system type.

  Note that some rescue disk systems require minix, msdos and ext2fs to
  be compiled into the kernel.

  Also swap partitions have to be prepared, and for this you use mkswap.

  Some important notes on formatting with DOS and Windows can be found
  in MS-DOS 5.00 - 7.10 Undocumented, Secret + Hidden Features
  <http:/members.aol.com/axcel216/secrets.htm>.


  12.7.  Mounting

  Data on a partition is not available to the file system until it is
  mounted on a mount point. This can be done manually using mount or
  automatically during booting by adding appropriate lines to
  /etc/fstab. Read the manual for mount and pay close attention to the
  tabulation.



  12.8.  fstab

  During the booting process the system mounts all partitions as
  described in the fstab file which can look something like this:



       # <file system>   <mount point>   <type>  <options>   <dump>  <pass>
       /dev/hda2          /               ext2    defaults    0       1
       None               none            swap    sw          0       0
       proc               /proc           proc    defaults    0       0
       /dev/hda1          /dosc           vfat    defaults    0       1



  This file is somewhat sensitive to the formatting used so it is best
  and also most convenient to edit it using one of the editing tools
  made for this purpose.

  Briefly, the fields are partition name, where to mount the partition,
  type of file system, mount options, when to dump for backup and when
  to do fsck.

  Linux offers the possibility of parallel file checking (fsck) but to
  be efficient it is important not to fsck more than one partition on a
  drive at a time.

  For more information refer to the man page for mount and fstab.


  12.9.  Recommendations

  Having constructed and implemented your clever scheme you are well
  advised to make a complete record of it all, on paper.  After all
  having all the necessary information on disk is no use if the machine
  is down.

  Partition tables can be damaged or lost, in which case it is
  excruciatingly important that you enter the exact same numbers into
  fdisk so you can rescue your system.  You can use the program printpar
  to make a clear record of the tables. Also write down the SCSI numbers
  or IDE names for each disk so you can put the system together again in
  the right order.



  13.  Maintenance

  It is the duty of the system manager to keep an eye on the drives and
  partitions. Should any of the partitions overflow, the system is
  likely to stop working properly, no matter how much space is available
  on other partitions, until space is reclaimed.

  Partitions and disks are easily monitored using df and should be done
  frequently, perhaps using a cron job or some other general system
  management tool.

  Do not forget the swap partitions, these are best monitored using one
  of the memory statistics programs such as free, procinfo or top.

  Drive usage monitoring is more difficult but it is important for the
  sake of performance to avoid contention - placing too much demand on a
  single drive if others are available and idle.

  It is important when installing software packages to have a clear idea
  where the various files go. As previously mentioned GCC keeps binaries
  in a library directory and there are also other programs that for
  historical reasons are hard to figure out, X11 for instance has an
  unusually complex structure.

  When your system is about to fill up it is about time to check and
  prune old logging messages as well as hunt down core files. Proper use
  of ulimit in global shell settings can help saving you from having
  core files littered around the system.



  13.1.  Backup

  The observant reader might have noticed a few hints about the
  usefulness of making backups. Horror stories are legio about accidents
  and what happened to the person responsible when the backup turned out
  to be non-functional or even non existent. You might find it simpler
  to invest in proper backups than a second, secret identity.

  There are many options and also a mini-HOWTO ( Backup-With-MSDOS )
  detailling what you need to know. In addition to the DOS specifics it
  also contains general information and further leads.

  In addition to making these backups you should also make sure you can
  restore the data. Not all systems verify that the data written is
  correct and many administrators have started restoring the system
  after an accident happy in the belief that everything is working, only
  to discover to their horror that the backups were useless. Be careful.

  13.2.  Defragmentation

  This is very dependent on the file system design, some suffer fast and
  nearly debilitating fragmentation. Fortunately for us, ext2fs does not
  belong to this group and therefore there has been very little talk
  about defragmentation tools. It does in fact exist but is hardly ever
  needed.

  If for some reason you feel this is necessary, the quick and easy
  solution is to do a backup and a restore. If only a small area is
  affected, for instance the home directories, you could tar it over to
  a temporary area on another partition, verify the archive, delete the
  original and then untar it back again.



  13.3.  Deletions

  Quite often disk space shortages can be remedied simply by deleting
  unnecessary files that accumulate around the system. Quite often
  programs that terminate abnormally cause all kinds of mess lying
  around the oddest places. Normally a core dump results after such an
  incident and unless you are going to debug it you can simply delete
  it. These can be found everywhere so you are advised to do a global
  search for them now and then.  The locate command is useful for this.

  Unexpected termination can also cause all sorts of temporary files
  remaining in places like /tmp or /var/tmp, files that are
  automatically removed when the program ends normally. Rebooting cleans
  up some of these areas but not necessary all and if you have a long
  uptime you could end up with a lot of old junk. If space is short you
  have to delete with care, make sure the file is not in active use
  first. Utilities like file can often tell you what kind of file you
  are looking at.

  Many things are logged when the system is running, mostly to files in
  the /var/log area. In particular the file /var/log/messages tends to
  grow until deleted. It is a good idea to keep a small archive of old
  log files around for comparison should the system start to behave
  oddly.

  If the mail or news system is not working properly you could have
  excessive growth in their spool areas, /var/spool/mail and
  /var/spool/news respectively. Beware of the overview files as these
  have a leading dot which makes them invisible to ls -l, it is always
  better to use ls -Al which will reveal them.

  User space overflow is a particularly tricky topic. Wars have been
  waged between system administrators and users. Tact, diplomacy and a
  generous budget for new drives is what is needed. Make use of the
  message-of-the-day feature, information displayed during login from
  the /etc/motd file to tell users when space is short.  Setting the
  default shell settings to prevent core files being dumped can save you
  a lot of work too.

  Certain kinds of people try to hide files around the system, usually
  trying to take advantage of the fact that files with a leading dot in
  the name are invisible to the ls command.  One common example are
  files that look like ... that normally either are not seen, or, when
  using ls -al disappear in the noise of normal files like . or .. that
  are in every directory.  There is however a countermeasure to this,
  use ls -Al that suppresses . or .. but shows all other dot-files.



  13.4.  Upgrades

  No matter how large your drives, time will come when you will find you
  need more. As technology progresses you can get ever more for your
  money. At the time of writing this, it appears that 6.4 GB drives
  gives you the most bang for your bucks.

  Note that with IDE drives you might have to remove an old drive, as
  the maximum number supported on your mother board is normally only 2
  or some times 4. With SCSI you can have up to 7 for narrow (8-bit)
  SCSI or up to 15 for wide (15 bit) SCSI, per channel. Some host
  adapters can support more than a single channel and in any case you
  can have more than one host adapter per system. My personal
  recommendation is that you will most likely be better off with SCSI in
  the long run.

  The question comes, where should you put this new drive? In many cases
  the reason for expansion is that you want a larger spool area, and in
  that case the fast, simple solution is to mount the drive somewhere
  under /var/spool. On the other hand newer drives are likely to be
  faster than older ones so in the long run you might find it worth your
  time to do a full reorganizing, possibly using your old design sheets.

  If the upgrade is forced by running out of space in partitions used
  for things like /usr or /var the upgrade is a little more involved.
  You might consider the option of a full re-installation from your
  favourite (and hopefully upgraded) distribution. In this case you will
  have to be careful not to overwrite your essential setups. Usually
  these things are in the /etc directory. Proceed with care, fresh
  backups and working rescue disks. The other possibility is to simply
  copy the old directory over to the new directory which is mounted on a
  temporary mount point, edit your /etc/fstab file, reboot with your new
  partition in place and check that it works.  Should it fail you can
  reboot with your rescue disk, re-edit /etc/fstab and try again.

  Until volume management becomes available to Linux this is both
  complicated and dangerous. Do not get too surprised if you discover
  you need to restore your system from a backup.

  The Tips-HOWTO gives the following example on how to move an entire
  directory structure across:

  ______________________________________________________________________
  (cd /source/directory; tar cf - . ) | (cd /dest/directory; tar xvfp -)
  ______________________________________________________________________



  While this approach to moving directory trees is portable among many
  Unix systems, it is inconvenient to remember. Also, it fails for
  deeply nested directory trees when pathnames become to long to handle
  for tar (GNU tar has special provisions to deal with long pathnames).

  If you have access to GNU cp (which is always the case on Linux
  systems), you could as well use


  ______________________________________________________________________
  cp -av /source/directory /dest/directory
  ______________________________________________________________________



  GNU cp knows specifically about symbolic links, FIFOs and device files
  and will copy them correctly.

  Remember that it might not be a good idea to try to transfer /dev or
  /proc.



  13.5.  Recovery

  System crashes come in many and entertaining flavours, and partition
  table corruption always guarantees plenty of excitement.  A recent and
  undoubtedly useful tool for those of us who are happy with the normal
  level of excitement, is gpart <http://www.stud.uni-
  hannover.de/user/76201/gpart> which means "Guess PC-Type hard disk
  partitions". Useful.



  14.  Advanced Issues

  Linux and related systems offer plenty of possibilities for fast,
  efficient and devastating destruction. This document is no exception.
  With power comes dangers and the following sections describe a few
  more esoteric issues that should not be attempted before reading and
  understanding the documentation, the issues and the dangers. You
  should also make a backup. Also remember to try to restore the system
  from scratch from your backup at least once.  Otherwise you might not
  be the first to be found with a perfect backup of your system and no
  tools available to reinstall it (or, even more embarrassing, some
  critical files missing on tape).

  The techniques described here are rarely necessary but can be used for
  very specific setups. Think very clearly through what you wish to
  accomplish before playing around with this.


  14.1.  Hard Disk Tuning

  The hard drive parameters can be tuned using the hdparms utility. Here
  the most interesting parameter is probably the read-ahead parameter
  which determines how much prefetch should be done in sequential
  reading.

  If you want to try this out it makes most sense to tune for the
  characteristic file size on your drive but remember that this tuning
  is for the entire drive which makes it a bit more difficult. Probably
  this is only of use on large servers using dedicated news drives etc.

  For safety the default hdparm settings are rather conservative. The
  disadvantage is that this mean you can get lost interrupts if you have
  a high frequency of IRQs as you would when using the serial port and
  an IDE disk as IRQs from the latter would mask other IRQs. This would
  be noticeable as less then ideal performance when downloading data
  from the net to disk. Setting hdparm -u1 device would prevent this
  masking and either improve your performance or, depending on hardware,
  corrupt the data on your disk. Experiment with caution and fresh
  backups.


  14.2.  File System Tuning

  Most file systems come with a tuning utility and for ext2fs there is
  the tune2fs utility. Several parameters can be modified but perhaps
  the most useful parameter here is what size should be reserved and who
  should be able to take advantage of this which could help you getting
  more useful space out of your drives, possibly at the cost of less
  room for repairing a system should it crash.


  14.3.  Spindle Synchronizing

  This should not in itself be dangerous, other than the peculiar fact
  that the exact details of the connections remain unclear for many
  drives. The theory is simple: keeping a fixed phase difference between
  the different drives in a RAID setup makes for less waiting for the
  right track to come into position for the read/write head. In practice
  it now seems that with large read-ahead buffers in the drives the
  effect is negligible.

  Spindle synchronisation should not be used on RAID0 or RAID 0/1 as you
  would then lose the benefit of having the read heads over different
  areas of the mirrored sectors.



  15.  Further Information

  There is wealth of information one should go through when setting up a
  major system, for instance for a news or general Internet service
  provider.  The FAQs in the following groups are useful:


  15.1.  News groups

  Some of the most interesting news groups are:

  o  Storage <news:comp.arch.storage>.

  o  PC storage <news:comp.sys.ibm.pc.hardware.storage>.

  o  AFS <news:alt.filesystems.afs>.

  o  SCSI <news:comp.periphs.scsi>.

  o  Linux setup <news:comp.os.linux.setup>.

  Most newsgroups have their own FAQ that are designed to answer most of
  your questions, as the name Frequently Asked Questions indicate. Fresh
  versions should be posted regularly to the relevant newsgroups. If you
  cannot find it in your news spool you could go directly to the FAQ
  main archive FTP site <ftp://rtfm.mit.edu>. The WWW versions can be
  browsed at FAQ main archive WWW site <http://www.cis.ohio-
  state.edu/hypertext/faq/usenet/FAQ-List.html>.

  Some FAQs have their own home site, of particular interest here are

  o  SCSI FAQ <http://www.paranoia.com/~filipg/HTML/LINK/F_SCSI.html>
     and

  o  comp.arch.storage FAQ
     <http://alumni.caltech.edu/~rdv/comp_arch_storage/FAQ-1.html>.



  15.2.  Mailing Lists

  These are low noise channels mainly for developers. Think twice before
  asking questions there as noise delays the development.  Some relevant
  lists are linux-raid, linux-scsi and linux-ext2fs.  Many of the most
  useful mailing lists run on the vger.rutgers.edu server but this is
  notoriously overloaded, so try to find a mirror. There are some lists
  mirrored at The Redhat Home Page <http://www.redhat.com>.  Many lists
  are also accessible at linuxhq <http://www.linuxhq.com/lnxlists>, and
  the rest of the web site is a gold mine of useful information.

  If you want to find out more about the lists available you can send a
  message with the line lists to the list server at vger.rutgers.edu (
  majordomo@vger.rutgers.edu).  If you need help on how to use the mail
  server just send the line help to the same address.  Due to the
  popularity of this server it is likely it takes a bit to time before
  you get a reply or even get messages after you send a subscribe
  command.

  There is also a number of other majordomo list servers that can be of
  interest such as the EATA driver list ( linux-eata@mail.uni-mainz.de)
  and the Intelligent IO list linux-i2o@dpt.com.

  Mailing lists are in a state of flux but you can find links to a
  number of interesting lists from the Linux Documentation Homepage
  <http://metalab.unc.edu/LDP/>.



  15.3.  HOWTO

  These are intended as the primary starting points to get the
  background information as well as show you how to solve a specific
  problem.  Some relevant HOWTOs are Bootdisk, Installation,  SCSI and
  UMSDOS.  The main site for these is the LDP archive
  <http://metalab.unc.edu/LDP/> at Metalab (formerly known as Sunsite).

  There is a a new HOWTO out that deals with setting up a DPT RAID
  system, check out the DPT RAID HOWTO homepage
  <http://www.ram.org/computing/linux/dpt_raid.html>.



  15.4.  Mini-HOWTO

  These are the smaller free text relatives to the HOWTOs.  Some
  relevant mini-HOWTOs are Backup-With-MSDOS, Diskless, LILO, Large
  Disk, Linux+DOS+Win95+OS2, Linux+OS2+DOS, Linux+Win95, NFS-Root,
  Win95+Win+Linux, ZIP Drive .  You can find these at the same place as
  the HOWTOs, usually in a sub directory called mini. Note that these
  are scheduled to be converted into SGML and become proper HOWTOs in
  the near future.

  The old Linux Large IDE mini-HOWTO is no longer valid, instead read
  /usr/src/linux/drivers/block/README.ide or
  /usr/src/linux/Documentation/ide.txt.


  15.5.  Local Resources

  In most distributions of Linux there is a document directory
  installed, have a look in the /usr/doc directory.  where most packages
  store their main documentation and README files etc.  Also you will
  here find the HOWTO archive ( /usr/doc/HOWTO) of ready formatted
  HOWTOs and also the mini-HOWTO archive ( /usr/doc/HOWTO/mini
  <file:///usr/doc/HOWTO/mini>) of plain text documents.

  Many of the configuration files mentioned earlier can be found in the
  /etc directory. In particular you will want to work with the
  /etc/fstab file that sets up the mounting of partitions and possibly
  also /etc/mdtab file that is used for the md system to set up RAID.


  The kernel source in /usr/src/linux <file:///usr/src/linux> is, of
  course, the ultimate documentation. In other words, use the source,
  Luke.  It should also be pointed out that the kernel comes not only
  with source code which is even commented (well, partially at least)
  but also an informative documentation directory
  <file:///usr/src/linux/Documentation>.  If you are about to ask any
  questions about the kernel you should read this first, it will save
  you and many others a lot of time and possibly embarrassment.

  Also have a look in your system log file ( /var/log/messages) to see
  what is going on and in particular how the booting went if too much
  scrolled off your screen. Using tail -f /var/log/messages in a
  separate window or screen will give you a continuous update of what is
  going on in your system.

  You can also take advantage of the /proc file system that is a window
  into the inner workings of your system.  Use cat rather than more to
  view the files as they are reported as being zero length. Reports are
  that less works well here.



  15.6.  Web Pages

  There is a huge number of informative web pages out there and by their
  very nature they change quickly so don't be too surprised if these
  links become quickly outdated.

  A good starting point is of course the Metalab LDP archive
  <http://metalab.unc.edu/LDP/> that is a information central for
  documentation, project pages and much, much more.



  o  Mike Neuffer, the author of the DPT caching RAID controller
     drivers, has some interesting pages on SCSI <http://www.uni-
     mainz.de/~neuffer/scsi> and DPT <http://www.uni-
     mainz.de/~neuffer/scsi/dpt>.

  o  Software RAID development information can be found at Linux Kernel
     site <http://www.kernel.org/> along with patches and utilities.

  o  Disk related information on benchmarking, RAID, reliability and
     much, much more can be found at Linas Vepstas <http://linas.org>
     project page.

  o  There is also information available on how to RAID the root
     partition <ftp://ftp.bizsystems.com/pub/raid/Root-RAID-HOWTO.html>
     and what software packages are needed to achieve this.

  o  In depth documentation on ext2fs
     <http://step.polymtl.ca/~ldd/ext2fs/ext2fs_toc.html> is also
     available.



  o  People who looking for information on VFAT, FAT32 and Joliet could
     have a look at the development page
     <http://bmrc.berkeley.edu/people/chaffee/index.html>.  These
     drivers are now in the 2.1.x kernel development series as well as
     in 2.0.34 and later.


  o  For more information on booting and also some BSD information have
     a look at booting information
     <http://www.paranoia.com/~vax/boot.html> page.

  For diagrams and information on all sorts of disk drives, controllers
  etc. both for current and discontinued lines The Ref
  <http://theref.aquascape.com/theref.html> is the site you need. There
  is a lot of useful information here, a real treasure trove.

  Please let me know if you have any other leads that can be of
  interest.



  15.7.  Search Engines

  Remember you can also use the web search engines and that some, like

  o  Altavista <http://www.altavista.digital.com>

  o  Excite <http://www.excite.com>

  o  Hotbot <http://www.hotbot.com>

     can also search Usenet News.

  Also remember that Deja <http://www.deja.com>, formerly known as
  Dejanews, is a dedicated news searcher that keeps a news spool from
  early 1995 and onwards.


  If you have to ask for help you are most likely to get help in the
  Linux Setup <news:comp.os.linux.setup> news group.  Due to large
  workload and a slow network connection I am not able to follow that
  newsgroup so if you want to contact me you have to do so by e-mail.



  16.  Getting Help


  In the end you might find yourself unable to solve your problems and
  need help from someone else. The most efficient way is either to ask
  someone local or in your nearest Linux user group, search the web for
  the nearest one.

  Another possibility is to ask on Usenet News in one of the many, many
  newsgroups available. The problem is that these have such a high
  volume and noise (called low signal-to-noise ratio) that your question
  can easily fall through unanswered.

  No matter where you ask it is important to ask well or you will not be
  taken seriously. Saying just my disk does not work is not going to
  help you and instead the noise level is increased even further and if
  you are lucky someone will ask you to clarify.

  Instead describe your problems in some detail that will enable people
  to help you. The problem could lie somewhere you did not expect.
  Therefore you are advised to list up the following information on your
  system:


     Hardware

     o  Processor


     o  DMA

     o  IRQ

     o  Chip set (LX, BX etc)

     o  Bus (ISA, VESA, PCI etc)

     o  Expansion cards used (Disk controllers, video, IO etc)


     Software

     o  BIOS (On motherboard and possibly SCSI host adapters)

     o  LILO, if used

     o  Linux kernel version as well as possible modifications and
        patches

     o  Kernel parameters, if any

     o  Software that shows the error (with version number or date)


     Peripherals

     o  Type of disk drives with manufacturer name, version and type

     o  Other relevant peripherals connected to the same busses


  As an example of how interrelated these problems are: an old chip set
  caused problems with a certain combination of video controller and
  SCSI host adapter.

  Remember that booting text is logged to /var/log/messages which can
  answer most of the questions above. Obviously if the drives fail you
  might not be able to get  the log saved to disk but you can at least
  scroll back up the screen using the SHIFT and PAGE UP keys. It may
  also be useful to include part of this in your request for help but do
  not go overboard, keep it brief as a complete log file dumped to
  Usenet News is more than a little annoying.



  17.  Concluding Remarks

  Disk tuning and partition decisions are difficult to make, and there
  are no hard rules here. Nevertheless it is a good idea to work more on
  this as the payoffs can be considerable. Maximizing usage on one drive
  only while the others are idle is unlikely to be optimal, watch the
  drive light, they are not there just for decoration. For a properly
  set up system the lights should look like Christmas in a disco. Linux
  offers software RAID but also support for some hardware base SCSI RAID
  controllers. Check what is available. As your system and experiences
  evolve you are likely to repartition and you might look on this
  document again. Additions are always welcome.

  Finally I'd like to sum up my recommendations:

  o  Disks are cheap but the data they contain could be much more
     valuable, use and test your backup system.

  o  Work is also expensive, make sure you get large enough disks as
     refitting new or repartitioning old disks takes time.
  o  Think reliability, replace old disks before they fail.

  o  Keep a paper copy of your setup, having it all on disk when the
     machine is down will not help you much.

  o  Start out with a simple design with a minimum of fancy technology
     and rather fit it in later. In general adding is easier than
     replacing, be it disks, technology or other features.



  17.1.  Coming Soon

  There are a few more important things that are about to appear here.
  In particular I will add more example tables as I am about to set up
  two fairly large and general systems, one at work and one at home.
  These should give some general feeling on how a system can be set up
  for either of these two purposes. Examples of smooth running existing
  systems are also welcome.

  There is also a fair bit of work left to do on the various kinds of
  file systems and utilities.

  There will be a big addition on drive technologies coming soon as well
  as a more in depth description on using fdisk, cfdisk and sfdisk.  The
  file systems will be beefed up as more features become available as
  well as more on RAID and what directories can benefit from what RAID
  level.


  There is some minor overlapping with the Linux Filesystem Structure
  Standard and FHS that I hope to integrate better soon, which will
  probably mean a big reworking of all the tables at the end of this
  document.

  As more people start reading this I should get some more comments and
  feedback. I am also thinking of making a program that can automate a
  fair bit of this decision making process and although it is unlikely
  to be optimum it should provide a simpler, more complete starting
  point.


  17.2.  Request for Information

  It has taken a fair bit of time to write this document and although
  most pieces are beginning to come together there are still some
  information needed before we are out of the beta stage.


  o  More information on swap sizing policies is needed as well as
     information on the largest swap size possible under the various
     kernel versions.

  o  How common is drive or file system corruption? So far I have only
     heard of problems caused by flaky hardware.

  o  References to speed and drives is needed.

  o  Are any other Linux compatible RAID controllers available?

  o  What relevant monitoring, management and maintenance tools are
     available?

  o  General references to information sources are needed, perhaps this
     should be a separate document?

  o  Usage of /tmp and /var/tmp has been hard to determine, in fact what
     programs use which directory is not well defined and more
     information here is required. Still, it seems at least clear that
     these should reside on different physical drives in order to
     increase paralellicity.


  17.3.  Suggested Project Work

  Now and then people post on comp.os.linux.*, looking for good project
  ideas. Here I will list a few that comes to mind that are relevant to
  this document. Plans about big projects such as new file systems
  should still be posted in order to either find co-workers or see if
  someone is already working on it.



     Planning tools
        that can automate the design process outlines earlier would
        probably make a medium sized project, perhaps as an exercise in
        constraint based programming.


     Partitioning tools
        that take the output of the previously mentioned program and
        format drives in parallel and apply the appropriate symbolic
        links to the directory structure. It would probably be best if
        this were integrated in existing system installation software.
        The drive partitioning setup used in Solaris is an example of
        what it can look like.


     Surveillance tools
        that keep an eye on the partition sizes and warn before a
        partition overflows.


     Migration tools
        that safely lets you move old structures to new (for instance
        RAID) systems. This could probably be done as a shell script
        controlling a back up program and would be rather simple. Still,
        be sure it is safe and that the changes can be undone.



  18.  Questions and Answers

  This is just a collection of what I believe are the most common
  questions people might have. Give me more feedback and I will turn
  this section into a proper FAQ.


  o  Q:How many physical disk drives (spindles) does a Linux system
     need?

     A: Linux can run just fine on one drive (spindle).  Having enough
     RAM (around 32 MB, and up to 64 MB) to support swapping is a better
     price/performance choice than getting a second disk.  (E)IDE disk
     is usually cheaper (but a little slower) than SCSI.


  o  Q: I have a single drive, will this HOWTO help me?

     A: Yes, although only to a minor degree. Still, section ``Physical
     Track Positioning'' will offer you some gains.

  o  Q: Are there any disadvantages in this scheme?

     A: There is only a minor snag: if even a single partition overflows
     the system might stop working properly. The severity depends of
     course on what partition is affected. Still this is not hard to
     monitor, the command df gives you a good overview of the situation.
     Also check the swap partition(s) using free to make sure you are
     not about to run out of virtual memory.


  o  Q: OK, so should I split the system into as many partitions as
     possible for a single drive?

     A: No, there are several disadvantages to that. First of all
     maintenance becomes needlessly complex and you gain very little in
     this. In fact if your partitions are too big you will seek across
     larger areas than needed.  This is a balance and dependent on the
     number of physical drives you have.


  o  Q: Does that mean more drives allows more partitions?

     A: To some degree, yes. Still, some directories should not be split
     off from root, check out the file system standards for more
     details.


  o  Q: What if I have many drives I want to use?

     A: If you have more than 3-4 drives you should consider using RAID
     of some form. Still, it is a good idea to keep your root partition
     on a simple partition without RAID, see section ``RAID'' for more
     details.


  o  Q: I have installed the latest Windows95 but cannot access this
     partition from within the Linux system, what is wrong?

     A: Most likely you are using FAT32 in your windows partition. It
     seems that Microsoft decided we needed yet another format, and this
     was introduced in their latest version of Windows95, called OSR2.
     The advantage is that this format is better suited to large drives.

     You might also be interested to hear that Microsoft NT 4.0 does not
     support it yet either.


  o  Q: I cannot get the disk size and partition sizes to match,
     something is missing. What has happened?

     A:It is possible you have mounted a partition onto a mount point
     that was not an empty directory. Mount points are directories and
     if it is not empty the mounting will mask the contents. If you do
     the sums you will see the amount of disk space used in this
     directory is missing from the observed total.

     To solve this you can boot from a rescue disk and see what is
     hiding behind your mount points and remove or transfer the contents
     by mounting the offending partition on a temporary mounting point.
     You might find it useful to have "spare" emergency mounting points
     ready made.


  o  Q: It doesn't look like my swap partition is in use, how come?

     A: It is possible that it has not been necessary to swap out,
     especially if you have plenty of RAM. Check your log files to see
     if you ran out of memory at one point or another, in that case your
     swap space should have been put to use. If not it is possible that
     either the swap partition was not assigned the right number, that
     you did not prepare it with mkswap or that you have not done swapon
     or added it to your fstab.



  o  Q: What is this Nyx that is mentioned several times here?

     A: It is a large free Unix system with currently about 10000 users.
     I use it for my web pages for this HOWTO as well as a source of
     ideas for a setup of large Unix systems. It has been running for
     many years and has a quite stable setup. For more information you
     can view the Nyx homepage <http://www.nyx.net> which also gives you
     information on how to get your own free account.



  19.  Bits and Pieces

  This is basically a section where I stuff all the bits I have not yet
  decided where should go, yet that I feel is worth knowing about. It is
  a kind of transient area.



  19.1.  Swap Partition: to Use or Not to Use

  In many cases you do not need a swap partition, for instance if you
  have plenty of RAM, say, more than 64 MB, and you are the sole user of
  the machine. In this case you can experiment running without a swap
  partition and check the system logs to see if you ran out of virtual
  memory at any point.

  Removing swap partitions have two advantages:

  o  you save disk space (rather obvious really)

  o  you save seek time as swap partitions otherwise would lie in the
     middle of your disk space.

  In the end, having a swap partition is like having a heated toilet:
  you do not use it very often, but you sure appreciate it when you
  require it.


  19.2.  Mount Point and /mnt

  In an earlier version of this document I proposed to put all
  permanently mounted partitions under /mnt. That, however, is not such
  a good idea as this itself can be used as a mount point, which leads
  to all mounted partitions becoming unavailable. Instead I will propose
  mounting straight from root using a meaningful name like
  /mnt.descriptive-name.

  Lately I have become aware that some Linux distributions use mount
  points at subdirectories under /mnt, such as /mnt/floppy and
  /mnt/cdrom, which just shows how confused the whole issue is.
  Hopefully FHS should clarify this.



  19.3.  Power and Heating

  Not many years ago a machine with the equivalent power of a modern PC
  required 3-phase power and cooling, usually by air conditioning the
  machine room, some times also by water cooling. Technology has
  progressed very quickly giving not only high speed but also low power
  components. Still, there is a definite limit to the technology,
  something one should keep in mind as the system is expanded with yet
  another disk drive or PCI card. When the power supply is running at
  full rated power, keep in mind that all this energy is going
  somewhere, mostly into heat. Unless this is dissipated using fans you
  will get a serious heating inside the cabinet followed by a reduced
  reliability and also life time of the electronics.  Manufacturers
  state minimum cooling requirements for their drives, usually in terms
  of cubic feet per minute (CFM). You are well advised to take this
  serious.

  Keep air flow passages open, clean out dust and check the temperature
  of your system running. If it is too hot to touch it is probably
  running too hot.

  If possible use sequential spin up for the drives. It is during spin
  up, when the drive platters accelerate up to normal speed, that a
  drive consumes maximum power and if all drives start up simultaneously
  you could go beyond the rated power maximum of your power supply.


  19.4.  Deja

  This is an Internet system that no doubt most of you are familiar
  with.  It searches and serves Usenet News articles from 1995 and to
  the latest postings and also offers a web based reading and posting
  interface.  There is a lot more, check out Deja <http://www.deja.com>
  for more information. It changed name from Dejanews.

  What perhaps is less known, is that they use about 120 Linux SMP
  computers many of which use the md module to manage between 4 and 24
  Gig of disk space (over 1200 Gig altogether) for this service.  The
  system is continuously growing but at the time of writing they use
  mostly dual Pentium Pro 200MHz and Pentium II 300 MHz systems with 256
  MB RAM or more.

  A production database machine normally has 1 disk for the operating
  system and between 4 and 6 disks managed by the md module where the
  articles are archived.  The drives are connected to BusLogic Model
  BT-946C and BT-958 PCI SCSI adapters, usually one to a machine.

  For the production systems (which are up 365 days a year) the downtime
  attributable to disk errors is less than 0.25 % (that is a quarter of
  1%, not 25%).

  Just in case: this is not an advertisement, it is stated as an example
  of how much is required for what is a major Internet service.



  20.  Appendix A: Partitioning Layout Table: Mounting and Linking

  The following table is designed to make layout a simpler paper and
  pencil exercise. It is probably best to print it out (using NON
  PROPORTIONAL fonts) and adjust the numbers until you are happy with
  them.

  Mount point is what directory you wish to mount a partition on or the
  actual device. This is also a good place to note how you plan to use
  symbolic links.

  The size given corresponds to a fairly big Debian 1.2.6 installation.
  Other examples are coming later.

  Mainly you use this table to select what structure and drives you will
  use, the partition numbers and letters will come from the next two
  tables.



       Directory       Mount point     speed   seek    transfer        size    SIZE


       swap            __________      ooooo   ooooo   ooooo           32      ____

       /               __________      o       o       o               20      ____

       /tmp            __________      oooo    oooo    oooo                    ____

       /var            __________      oo      oo      oo              25      ____
       /var/tmp        __________      oooo    oooo    oooo                    ____
       /var/spool      __________                                              ____
       /var/spool/mail __________      o       o       o                       ____
       /var/spool/news __________      ooo     ooo     oo                      ____
       /var/spool/____ __________      ____    ____    ____                    ____

       /home           __________      oo      oo      oo                      ____

       /usr            __________                                      500     ____
       /usr/bin        __________      o       oo      o               250     ____
       /usr/lib        __________      oo      oo      ooo             200     ____
       /usr/local      __________                                              ____
       /usr/local/bin  __________      o       oo      o                       ____
       /usr/local/lib  __________      oo      oo      ooo                     ____
       /usr/local/____ __________                                              ____
       /usr/src        __________      o       oo      o               50      ____

       DOS             __________      o       o       o                       ____
       Win             __________      oo      oo      oo                      ____
       NT              __________      ooo     ooo     ooo                     ____

       /mnt._________  __________      ____    ____    ____                    ____
       /mnt._________  __________      ____    ____    ____                    ____
       /mnt._________  __________      ____    ____    ____                    ____
       /_____________  __________      ____    ____    ____                    ____
       /_____________  __________      ____    ____    ____                    ____
       /_____________  __________      ____    ____    ____                    ____



       Total capacity:



  21.  Appendix B: Partitioning Layout Table: Numbering and Sizing

  This table follows the same logical structure as the table above where
  you decided what disk to use. Here you select the physical tracking,
  keeping in mind the effect of track positioning mentioned earlier in
  ``Physical Track Positioning''.
  The final partition number will come out of the table after this.



         Drive           sda     sdb     sdc     hda     hdb     hdc     ___

       SCSI ID         |  __   |  __   |  __   |

       Directory
       swap            |       |       |       |       |       |       |

       /               |       |       |       |       |       |       |

       /tmp            |       |       |       |       |       |       |

       /var            :       :       :       :       :       :       :
       /var/tmp        |       |       |       |       |       |       |
       /var/spool      :       :       :       :       :       :       :
       /var/spool/mail |       |       |       |       |       |       |
       /var/spool/news :       :       :       :       :       :       :
       /var/spool/____ |       |       |       |       |       |       |

       /home           |       |       |       |       |       |       |

       /usr            |       |       |       |       |       |       |
       /usr/bin        :       :       :       :       :       :       :
       /usr/lib        |       |       |       |       |       |       |
       /usr/local      :       :       :       :       :       :       :
       /usr/local/bin  |       |       |       |       |       |       |
       /usr/local/lib  :       :       :       :       :       :       :
       /usr/local/____ |       |       |       |       |       |       |
       /usr/src        :       :       :       :

       DOS             |       |       |       |       |       |       |
       Win             :       :       :       :       :       :       :
       NT              |       |       |       |       |       |       |

       /mnt.___/_____  |       |       |       |       |       |       |
       /mnt.___/_____  :       :       :       :       :       :       :
       /mnt.___/_____  |       |       |       |       |       |       |
       /_____________  :       :       :       :       :       :       :
       /_____________  |       |       |       |       |       |       |
       /_____________  :       :       :       :       :       :       :


       Total capacity:



  22.  Appendix C: Partitioning Layout Table: Partition Placement

  This is just to sort the partition numbers in ascending order ready to
  input to fdisk or cfdisk. Here you take physical track positioning
  into account when finalizing your design. Unless you get specific
  information otherwise, you can assume track 0 is the outermost track.

  These numbers and letters are then used to update the previous tables,
  all of which you will find very useful in later maintenance.

  In case of disk crash you might find it handy to know what SCSI id
  belongs to which drive, consider keeping a paper copy of this.


               Drive :   sda     sdb     sdc     hda     hdb     hdc     ___

       Total capacity: |  ___  |  ___  |  ___  |  ___  |  ___  |  ___  |  ___
       SCSI ID         |  __   |  __   |  __   |

       Partition

       1               |       |       |       |       |       |       |
       2               :       :       :       :       :       :       :
       3               |       |       |       |       |       |       |
       4               :       :       :       :       :       :       :
       5               |       |       |       |       |       |       |
       6               :       :       :       :       :       :       :
       7               |       |       |       |       |       |       |
       8               :       :       :       :       :       :       :
       9               |       |       |       |       |       |       |
       10              :       :       :       :       :       :       :
       11              |       |       |       |       |       |       |
       12              :       :       :       :       :       :       :
       13              |       |       |       |       |       |       |
       14              :       :       :       :       :       :       :
       15              |       |       |       |       |       |       |
       16              :       :       :       :       :       :       :



  23.  Appendix D: Example: Multipurpose Server

  The following table is from the setup of a medium sized multipurpose
  server where I once worked. Aside from being a general Linux machine
  it will also be a network related server (DNS, mail, FTP, news,
  printers etc.)  X server for various CAD programs, CD ROM burner and
  many other things.  The files reside on 3 SCSI drives with a capacity
  of 600, 1000 and 1300 MB.

  Some further speed could possibly be gained by splitting /usr/local
  from the rest of the /usr system but we deemed the further added
  complexity would not be worth it. With another couple of drives this
  could be more worthwhile. In this setup drive sda is old and slow and
  could just a well be replaced by an IDE drive. The other two drives
  are both rather fast. Basically we split most of the load between
  these two. To reduce dangers of imbalance in partition sizing we have
  decided to keep /usr/bin and /usr/local/bin in one drive and /usr/lib
  and /usr/local/lib on another separate drive which also affords us
  some drive parallelizing.

  Even more could be gained by using RAID but we felt that as a server
  we needed more reliability than was then afforded by the md patch and
  a dedicated RAID controller was out of our reach.


  24.  Appendix E: Example: Mounting and Linking



  Directory       Mount point     speed   seek    transfer        size    SIZE


  swap            sdb2, sdc2      ooooo   ooooo   ooooo           32      2x64

  /               sda2            o       o       o               20       100

  /tmp            sdb3            oooo    oooo    oooo                     300

  /var            __________      oo      oo      oo                      ____
  /var/tmp        sdc3            oooo    oooo    oooo                     300
  /var/spool      sdb1                                                     436
  /var/spool/mail __________      o       o       o                       ____
  /var/spool/news __________      ooo     ooo     oo                      ____
  /var/spool/____ __________      ____    ____    ____                    ____

  /home           sda3            oo      oo      oo                       400

  /usr            sdb4                                            230      200
  /usr/bin        __________      o       oo      o               30      ____
  /usr/lib        -> libdisk      oo      oo      ooo             70      ____
  /usr/local      __________                                              ____
  /usr/local/bin  __________      o       oo      o                       ____
  /usr/local/lib  -> libdisk      oo      oo      ooo                     ____
  /usr/local/____ __________                                              ____
  /usr/src        ->/home/usr.src o       oo      o               10      ____

  DOS             sda1            o       o       o                        100
  Win             __________      oo      oo      oo                      ____
  NT              __________      ooo     ooo     ooo                     ____

  /mnt.libdisk    sdc4            oo      oo      ooo                      226
  /mnt.cd         sdc1            o       o       oo                       710


  Total capacity: 2900 MB



  25.  Appendix F: Example: Numbering and Sizing

  Here we do the adjustment of sizes and positioning.



  Directory         sda     sdb     sdc


  swap            |       |   64  |   64  |

  /               |  100  |       |       |

  /tmp            |       |  300  |       |

  /var            :       :       :       :
  /var/tmp        |       |       |  300  |
  /var/spool      :       :  436  :       :
  /var/spool/mail |       |       |       |
  /var/spool/news :       :       :       :
  /var/spool/____ |       |       |       |

  /home           |  400  |       |       |

  /usr            |       |  200  |       |
  /usr/bin        :       :       :       :
  /usr/lib        |       |       |       |
  /usr/local      :       :       :       :
  /usr/local/bin  |       |       |       |
  /usr/local/lib  :       :       :       :
  /usr/local/____ |       |       |       |
  /usr/src        :       :       :       :

  DOS             |  100  |       |       |
  Win             :       :       :       :
  NT              |       |       |       |

  /mnt.libdisk    |       |       |  226  |
  /mnt.cd         :       :       :  710  :
  /mnt.___/_____  |       |       |       |


  Total capacity: |  600  | 1000  | 1300  |



  26.  Appendix G: Example: Partition Placement

  This is just to sort the partition numbers in ascending order ready to
  input to fdisk or cfdisk. Remember to optimize for physical track
  positioning (not done here).



               Drive :   sda     sdb     sdc

       Total capacity: |   600 |  1000 |  1300 |

       Partition

       1               |   100 |   436 |   710 |
       2               :   100 :    64 :    64 :
       3               |   400 |   300 |   300 |
       4               :       :   200 :   226 :



  27.  Appendix H: Example II


  The following is an example of a server setup in an academic setting,
  and is contributed by nakano (at) apm.seikei.ac.jp. I have only done
  minor editing to this section.

  /var/spool/delegate is a directory for storing logs and cache files of
  an WWW proxy server program, "delegated". Since I don't notice it
  widely, there are 1000--1500 requests/day currently, and average disk
  usage is 15--30% with expiration of caches each day.

  /mnt.archive is used for data files which are big and not frequently
  referenced such a s experimental data (especially graphic ones),
  various source archives, and Win95 backups (growing very fast...).

  /mnt.root is backup root file system containing rescue utilities. A
  boot floppy is also prepared to boot with this partition.



  =================================================
  Directory               sda      sdb     hda

  swap                    |    64 |    64 |       |
  /                       |       |       |    20 |
  /tmp                    |       |       |   180 |

  /var                    :   300 :       :       :
  /var/tmp                |       |   300 |       |
  /var/spool/delegate     |   300 |       |       |

  /home                   |       |       |   850 |
  /usr                    |   360 |       |       |
  /usr/lib                -> /mnt.lib/usr.lib
  /usr/local/lib          -> /mnt.lib/usr.local.lib

  /mnt.lib                |       |   350 |       |
  /mnt.archive            :       :  1300 :       :
  /mnt.root               |       |    20 |       |

  Total capacity:            1024    2034    1050


  =================================================
          Drive :           sda     sdb     hda
  Total capacity:         |  1024 |  2034 |  1050 |

  Partition
  1                       |   300 |    20 |    20 |
  2                       :    64 :  1300 :   180 :
  3                       |   300 |    64 |   850 |
  4                       :   360 :   ext :       :
  5                       |       |   300 |       |
  6                       :       :   350 :       :


  Filesystem         1024-blocks  Used Available Capacity Mounted on
  /dev/hda1              19485   10534     7945     57%   /
  /dev/hda2             178598      13   169362      0%   /tmp
  /dev/hda3             826640  440814   343138     56%   /home
  /dev/sda1             306088   33580   256700     12%   /var
  /dev/sda3             297925   47730   234807     17%   /var/spool/delegate
  /dev/sda4             363272  170872   173640     50%   /usr
  /dev/sdb5             297598       2   282228      0%   /var/tmp
  /dev/sdb2            1339248  302564   967520     24%   /mnt.archive
  /dev/sdb6             323716   78792   228208     26%   /mnt.lib



  Apparently /tmp and /var/tmp is too big. These directories shall be
  packed together into one partition when disk space shortage comes.

  /mnt.lib is also seemed to be, but I plan to install newer TeX and
  ghostscript archives, so /usr/local/lib may grow about 100 MB or so
  (since we must use Japanese fonts!).

  Whole system is backed up by Seagate Tapestore 8000 (Travan TR-4,
  4G/8G).



  28.  Appendix I: Example III: SPARC Solaris


  The following section is the basic design used at work for a number of
  Sun SPARC servers running Solaris 2.5.1 in an industrial development
  environment. It serves a number of database and cad applications in
  addition to the normal services such as mail.

  Simplicity is emphasized here so /usr/lib has not been split off from
  /usr.

  This is the basic layout, planned for about 100 users.



          Drive:        SCSI 0                      SCSI 1

          Partition     Size (MB)   Mount point    Size (MB)   Mount point

            0           160         swap           160         swap
            1           100         /tmp           100         /var/tmp
            2           400         /usr
            3           100         /
            4            50         /var
            5
            6           remainder   /local0        remainder   /local1



  Due to specific requirements at this place it is at times necessary to
  have large partitions available on a short notice. Therefore drive 0
  is given as many tasks as feasible, leaving a large /local1 partition.

  This setup has been in use for some time now and found satisfactorily.

  For a more general and balanced system it would be better to swap /tmp
  and /var/tmp and then move /var to drive 1.


  29.  Appendix J: Example IV: Server with 4 Drives

  This gives an example of using all techniques described earlier, short
  of RAID. It is admittedly rather complicated but offers in return high
  performance from modest hardware. Dimensioning are skipped but
  reasonable figures can be found in previous examples.



       Partition       sda             sdb             sdc             sdd
                       ----            ----            ----            ----
               1       root            overview        lib             news
               2       swap            swap            swap            swap
               3       home            /usr            /var/tmp        /tmp
               4                       spare root      mail            /var



  Setup is optimised with respect to track positioning but also for
  minimising drive seeks.

  If you want DOS or Windows too you will have to use sda1 for this and
  move the other partitions after that. It will be advantageous to use
  the swap partitions on sdb2, sdc2 and sdd2 for Windows swap, TEMPDIR
  and Windows temporary directory under these sessions. A number of
  other HOWTOs describe how you can make several operating systems
  coexist on your machine.


  For completeness a 4 drive example using several types of RAID is also
  given which is even more complex than the example above.



       Partition       sda             sdb             sdc             sdd
                       ----            ----            ----            ----
               1       boot            overview        news            news
               2       overview        swap            swap            swap
               3       swap            lib             lib             lib
               4       lib             overview        /tmp            /tmp
               5       /var/tmp        /var/tmp        mail            /usr
               6       /home           /usr            /usr            mail
               7       /usr            /home           /var
               8       / (root)        spare root



  Here all duplicates are parts of a RAID 0 set with two exceptions,
  swap which is interleaved and home and mail which are implemented as
  RAID 1 for safety.

  Note that boot and root are separated: only the boot file with the
  kernel has to reside within the 1023 cylinder limit. The rest of the
  root files can be anywhere and here they are placed on the slowest
  outermost partition. For simplicity and safety the root partition is
  not on a RAID system.

  With such a complicated comes an equally complicated fstab file.  The
  large number of partitions makes it important to do the fsck passes in
  the right order, otherwise the process can take perhaps ten times as
  long time to complete as the optimal solution.



       /dev/sda8       /               ?       ?               1 1 (a)
       /dev/sdb8       /               ?       noauto          1 2 (b)
       /dev/sda1       boot            ?       ?               1 2 (a)
       /dev/sdc7       /var            ?       ?               1 2 (c)
       /dev/md1        news            ?       ?               1 3 (c+d)
       /dev/md2        /var/tmp        ?       ?               1 3 (a+b)
       /dev/md3        mail            ?       ?               1 4 (c+d)
       /dev/md4        /home           ?       ?               1 4 (a+b)
       /dev/md5        /tmp            ?       ?               1 5 (c+d)
       /dev/md6        /usr            ?       ?               1 6 (a+b+c+d)
       /dev/md7        /lib            ?       ?               1 7 (a+b+c+d)



  The letters in the brackets indicate what drives will be active for
  each fsck entry and pass. These letters are not present in a real
  fstab file.  All in all there are 7 passes.



  30.  Appendix K: Example V: Dual Drive System

  A dual drive system offers less opportunity for clever schemes but the
  following should provide a simple starting point.
       Partition       sda             sdb
                       ----            ----
               1       boot            lib
               2       swap            news
               3       /tmp            swap
               4       /usr            /var/tmp
               5       /var            /home
               6       / (root)



  If you use a dual OS system you have to keep in mind that many other
  systems must boot from the first partition on the first drive. A
  simple DOS / Linux system could look like this:



       Partition       sda             sdb
                       ----            ----
               1       DOS             lib
               2       boot            news
               3       swap            swap
               4       /tmp            /var/tmp
               5       /usr            /home
               6       /var            DOSTEMP
               7       / (root)



  Also remember that DOS and Windows prefer there to be just a single
  primary partition which has to be the first one where it boots from.
  As Linux can happily exist in logical partitions this is not a big
  problem.



  31.  Appendix L: Example VI: Single Drive System

  Although this falls somewhat outside the scope of this HOWTO it cannot
  be denied that recently some rather large drives have become very
  affordable. Drives with 10 - 20 GB are becoming common and the
  question often is how best to partition such monsters. Interestingly
  enough very few seem to have any problems in filling up such drives
  and the future looks generally quite rosy for manufacturers planning
  on even bigger drives.

  Opportunities for optimisations are of course even smaller than for 2
  drive systems but some tricks can still be used to optimise track
  positions while minimising head movements.



  Partition       hda             Size estimate (MB)
                  ----            ------------------
           1      DOS             500
           2      boot            20
           3      Winswap         200
           4      data            The bulk of the drive
           5      lib             50 - 500
           6      news            300+
           7      swap            128     (Maximum size for 32-bit CPU)
           8      tmp             300+    (/tmp and /var/tmp)
           9      /usr            50 - 500
          10      /home           300+
          11      /var            50 - 300
          12      mail            300+
          13      dosdata         10      ( Windows bug workaround!)



  Remember that the dosdata partition is a DOS filesystem that must be
  the very last partition on the drive, otherwise Windows gets confused.



  Managing Multiple Operating Systems HOWTO
  Robert W. Schultz
  v0.4, 17 Feb 2000

  This HOWTO covers the procedures for using  removable hard disks to
  install and manage multiple alternative operating systems while leav-
  ing a single fixed disk to permanently house and protect the primary
  operating system. It is very scalable and offers a good degree of pro-
  tection to and a stable disk environment for the primary operating
  system.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright
     1.2 New Versions of this HOWTO
     1.3 Feedback

  2. Purpose and goals:

  3. Background:

  4. System requirements:

  5. How it works (a scenario):

  6. The installation:

     6.1 Installing the primary operating system
     6.2 Installing alternative operating systems
     6.3 Final BIOS and LILO configuration:

  7. Cost and  gotcha's:

     7.1 Cost:
     7.2 Gotcha's


  ______________________________________________________________________

  1.  Introduction

  1.1.  Copyright

  Copyright (c) 2000 by Robert W. Schultz.

  Please freely copy and distribute (sell or give away) this document in
  any format. It's requested that corrections and/or comments be
  forwarded to the document maintainer. You may create a derivative work
  and distribute it provided that you:


  1.Send your derivative work (in the most suitable format such as sgml)
  to the LDP (Linux Documentation Project) or the like for posting on
  the Internet. If not the LDP, then let the LDP know where it is
  available.

  2.License the derivative work with this same license or use GPL.
  Include a copyright notice and at least a pointer to the license used.

  3.Give due credit to previous authors and major contributors.


  If you're considering making a derived work other than a translation,
  it's requested that you discuss your plans with the current
  maintainer.



  1.2.  New Versions of this HOWTO

  New versions of the Managing Multiple Operating Systems HOWTO will be
  available to browse and/or download at LDP mirror sites.  For a list
  of mirror sites see:

  <http://metalab.unc.edu/LDP/mirrors.html>.

  Various formats are available.  If you only want to quickly check the
  date of the latest version look at

  <http://www.linuxdoc.org/HOWTO/MultiOS-HOWTO.html>

  and compare it to this version: v0.4, 17 February 2000


  1.3.  Feedback

  Please send any questions, comments, or suggestions to   (Robert W.
  Schultz).  I am very willing to help others with problems directly
  relating to this HOWTO and will entertain any suggestions for
  changes/modifications and/or improvements.  However, having set up my
  system to my satisfaction, this HOWTO won't be significantly improved
  without reader input.


  2.  Purpose and goals:

  The purpose of this HOWTO is to describe a methodology for managing
  multiple operating systems on a single computer system.  It is
  intended for Linux users who have a basic familiarity with both Linux
  and LILO installations.  Nothing here is terribly complex however,
  considering the amount of time it takes to install some operating
  systems it can be relatively time consuming.


  It is different from other methods in that it doesn't require multiple
  operating systems on the boot disk.  Instead it uses a fixed internal
  disk containing a single primary operating system and a selection of
  removable disks with one or more operating systems installed on each
  of them.  If you absolutely have to have two, three, or four different
  operating systems on a single disk and are trying to get them to
  behave with each other, this HOWTO is not for you.


  Its specific goals are:


  * - A primary/operational disk that once configured and installed is
  rarely changed.  This includes not having to repartition or otherwise
  modify the disk it resides on.


  * - Easy selection of multiple alternative operating systems at boot
  time without having to go through more than one or two menu
  selections.



  * - No need to modify the BIOS, LILO, or any other configuration to
  access an O/S once it is installed.


  * - Easy addition/removal of operating systems depending on
  requirements at the moment.


  * - Inexpensive and scalable to allow for an increasing number of
  operating systems and versions as time goes on.


  I think I succeeded admirably in the first three of these
  requirements.  You can form your own opinions on the last two.


  3.  Background:

  Even though Linux is becoming much more user friendly and widely
  accepted, most of us still need access to other operating systems.  I
  use Linux about 75% of the time but I still need access to Win 9x for
  those few applications that I haven't found acceptable alternatives
  for in Linux.  My wife uses MS Office at work and wants to have access
  to it at home. Other people want to have access to alternative O/S
  just for fun, training, or to keep current in their job.


  I tend to treat new O/S's as you would a game; I actually don't do
  anything productive with them but installing and learning how to
  control them is just as challenging and interesting to me as Quake or
  SimCity.  Further, being a Computer Scientist, it keeps me current on
  evolving technology and has helped me solve a multitude of problems at
  work.  At any rate, for new Linux users, computer professionals, and
  those just trying to migrate from one operating system to another, I
  believe using multiple operating systems is the norm rather than the
  exception.


  4.  System requirements:

  BIOS - Any bios that allows automatic identification of disk drive
  geometry and allows you to select the sequence of devices to boot from
  should work.  I successfully built systems based on both PhoenixBIOS
  4.0 and AMI Plug and Play Flash BIOS.


  DISKS - One fixed internal disk dedicated to Linux. (first disk) One
  Removable drive enclosure, with any number of drives. (second disk)


  Since a lot of this HOWTO has to do with disks, from now on I will
  generally use the terms "first disk" and "second disk".  The first
  disk is the one initially accessed when the machine is turned on,
  commonly known as the boot disk.  It has LILO installed in the MBR and
  is dedicated to a single operating system, specifically Linux.  The
  second disk is a removable disk that contains one or more alternative
  operating systems which may or may not have a boot loader in the MBR
  or elsewhere.


  There are no other hardware/firmware requirements.  Any other
  requirements would be dictated by the specific O/S.  For instance,
  even though you could install it, Solaris 7 is not going to run well
  on an old 90MHz machine!  The configuration and methodology described
  here should however work equally well regardless of the CPU speed or
  other installed peripherals.
  Operating Systems - I have tested this process with Linux (Redhat and
  Suse), Solaris 7, BeOS, Win 98 and even MSDOS 6.22. I see no reason
  why it wouldn't work with Win 95, O/S 2, or FreeBSD.  I am not
  familiar with Windows NT or 2000 so I don't know how they would react
  to this kind of setup.


  Boot loader - I used LILO on the first disk and BeOS bootman on the
  second disks.  I used LILO on the first disk because it was the only
  boot loader that allowed me to select the MBR on the second disk as an
  acceptable boot partition.  Any relatively robust boot loader should
  work on the second disk.


  5.  How it works (a scenario):

  Prior to ignition, I insert a disk, preloaded with an operating system
  in the removable drive.  When I turn on the machine, I am presented at
  the LILO prompt (by pressing <tab>) with "Linux" and "Disk2" as
  options.  Linux is the default and would automatically boot if I did
  nothing.  When selected, Disk2 either boots directly into the single
  O/S stored on the second disk or presents me with a second boot menu
  if there is more than one O/S on that disk.  If I power down, replace
  the second disk with another and power back up, I still get the
  initial Linux/Disk 2 menu and, if I select Disk2, a new menu
  appropriate to the newly inserted disk.  Once installed, I never have
  to modify the LILO configuration on the first disk, I never have to
  change BIOS setting to boot from the second disk and I never have to
  go through more than two menu selections to get my selected O/S up and
  running.


  6.  The installation:

  There are three distinct parts to the installation, first building the
  primary O/S on its own dedicated drive.  Second, building a second
  disk with whatever alternative O/S you selected. Finally,
  reconfiguring the BIOS and LILO to support both disks.


  6.1.  Installing the primary operating system

  Installation of the primary/operational O/S is fairly straight
  forward.  Treat the system as if it were a single drive system
  dedicated to Linux.  Refer to the documentation that came with your
  distribution or see <http://www.linuxdoc.org/HOWTO/Installation-
  HOWTO.html> for details on installing Linux.


  Because this is ultimately a multiple disk installation, there a few
  steps that need to be taken to trick the install routines into
  thinking that it is, during the installation process, a single disk
  system.


  First, Remove the removable Hard Drive and make sure the remaining
  drive is identified in the BIOS as the secondary boot device (after
  the floppy).  The operating system install program should only see one
  disk, the one you are going to install to.  That way, there is no
  question as to where it will be installed.  Also, it will install
  everything appropriate to a single disk system.


  When asked, tell the install program to use the entire disk for your
  operating system.  I accepted the default RedHat partitioning and
  installed the generic LILO on the MBR.
  Once the installation is complete, shutdown and reboot to confirm that
  your system works properly.  At this point you should have a fully
  functional machine that boots directly into Linux.

  6.2.  Installing alternative operating systems

  Now that you have a fully functional system, you can move on to
  building a second disk with your alternative operating systems.


  Select an operating system or two for installation on the second disk.
  I decided on, for no good reason, Windows 98 and BeOS for my initial
  test case.  I partitioned an 8GB drive into two 4GB primary partitions
  and installed Windows 98 in the first partition and BeOS in the
  second.


  Do the same things with this install that you did with the first.
  Disable the first disk in the BIOS so that this installer will not
  even see it.  This is very important.  If you can physically remove or
  disconnect the first disk, do it!  This will protect your primary
  system from any errors on your part or overly greedy operating systems
  that want to take over all the disks they see during the second
  installation.  If at some time in the future you decide to create
  another removable disk make sure and repeat this step.


  Once this is done install your chosen operating systems as if you were
  installing them on a single drive system.


  If you are only installing one operating system on the second disk,
  just plug in the installation disk and let it do its thing.  Windows
  95 or 98 or just about any other operating system, including a second
  Linux should install just fine this way.  Allow Windows 9x to write to
  the MBR.  If installing Linux, select MBR as the location to install
  LILO.


  I decided to install two operating systems on the second disk so that
  I could confirm the functionality of cascading boot loaders.


  I first installed Windows 98 because it automatically overwrites the
  MBR and would have overwritten any boot loader code I eventually
  placed there.  Next, I installed BeOS in the second partition and ran
  bootman, the BeOS boot loader.  With it I built a boot menu for the
  second disk and intentionally overwrote the Windows 98 MBR.



  Bootman was not essential, I could have used any MBR based boot loader
  but it was available and it works quite will.


  Reboot frequently to make sure that everything works properly as a
  single disk system.  I rebooted after each O/S installation to make
  sure it worked properly and also to make sure that the boot loader
  menu worked properly.


  6.3.  Final BIOS and LILO configuration:

  Next, reconfigure the BIOS so that it again recognizes the first disk
  (physically reconnect it if you disconnected it earlier) as the boot
  disk and so that it also recognizes the second disk. How to do this is
  very system specific and dependent on your BIOS and whether you have a
  SCSI/IDE or IDE/IDE setup.  I haven't tried a SCSI/SCSI setup because
  SCSI disks and removable frames are significantly more expensive than
  IDE disks and frames.  I wanted performance for my primary O/S but
  could accept cheap on the other ones.


  Make sure and set the second disk type to "Auto" or "Automatic".  This
  will force the BIOS to dynamically determine the disk type at boot
  time.  I have been able to successfully use an ancient 512MB disk, a
  4GB, an 8GB, and even a 100MB IDE Zip disk as the second disk.  All
  recognized automatically by the BIOS.


  Reboot the system and get back to Linux.  At this point, even though
  there are at least two operating systems installed, this LILO only
  knows about the original Linux and should boot to it automatically.
  Watch the boot process and you should see a message about
  automatically identifying a disk.  Once booted, check dmesg to make
  sure Linux recognized the second disk.


  Once this is done, you need to reconfigure LILO on the first disk to
  make it aware of the second disk. Here are two different lilo.conf
  files, one for a SCSI/IDE and another for an IDE/IDE system.  Each has
  some strengths and weaknesses...



  # lilo.conf file for an internal SCSI disk and a removable disk
  # configured as a master on the primary IDE connection

  disk = /dev/sda         #  These four lines are necessary
     bios = 0x80          #  to get the SCSI disk re-mapped as
  disk = /dev/hda         #  the primary drive even though it
     bios = 0x81          #  is selected in the BIOS as the
                          #  boot device.  This might be a BIOS
                          #  specific problem.

  # Without them you get the following errors from LILO:
  #
  #  LILO version 21, Copyright 1992-1998 Werner Almesberger
  #
  # ading boot sector from /dev/sda
  # Warning: /dev/sda is not on the first disk
  # And LILO either hangs at LI or repeats endless "01 "'s across the screen

  boot=/dev/sda
  map=/boot/map
  install=/boot/boot.b
  prompt
  timeout=50
  image=/boot/vmlinuz-2.2.12-20smp
     label=Linux
     root=/dev/sda1
     initrd=/boot/initrd-2.2.12-20smp.img
     read-only
  other = /dev/hda
  # other = /dev/hda is the key element.  Instead of redirecting lilo to
  # a specific partition, it redirects it to the MBR on the second disk.
  # that way, LILO doesn't have to know anything about the second disk and
  # we can replace it with another because LILO always goes to the same place
  # regardless of which specific disk is installed.  LILO was the only boot
  # loader I found that would do this.
     label = Disk2
     map-drive = 0x80
        to = 0x81
     map-drive = 0x81
        to = 0x80
  # The map-drive lines are necessary to make the second disk think it is
  # actually the boot disk.



  # lilo.conf file for a system with two IDE drives.  Both are masters,
  # /dev/hda on the primary connector and /dev/hdc on the secondary.
  # /dev/hdb is a CDROM slave on the primary IDE connector.
  # disk = /dev/hda       # These lines are not necessary for the
  #    bios = 0x80        # IDE/IDE installation because the BIOS
  # disk = /dev/hdc       # already knows what order they are in
  #    bios = 0x81
  boot=/dev/hda
  map=/boot/map
  install=/boot/boot.b
  prompt
  timeout=50
  image=/boot/vmlinuz-2.2.5-15
          label=linux
          root=/dev/hda4
          read-only
  other = /dev/hdc
  # other = /dev/hdc is again the key.  This just redirects LILO to the
  # MBR of the second disk.  Whatever is there gets control.
     label = Disk2
     map-drive = 0x80
        to = 0x81
     map-drive = 0x81
        to = 0x80



  The /dev, boot, map and image entries are system specific and yours
  will probably be different that mine.  The entries in your initial
  /etc/lilo.conf file should give you an accurate guide for your system.
  I copied the "Linux" entry from the original install generated
  lilo.conf file directly into the new lilo.conf.  This should allow you
  to boot into "Linux" and modify your lilo.conf even if the "Disk2"
  entry fails totally.


  Finally, run lilo -vvv to make sure it agrees with everything you are
  trying to do.


  7.  Cost and  gotcha's:

  7.1.  Cost:

  I found a Frame and 1 drawer removable drive mount for $20.00.  It is
  the  "SNT MOBILE RACK".  Disks didn't cost me anything because I had
  several old or small IDE drives around from upgrades etc.  Even if you
  have to buy them, 2GB IDE drives are cheap.


  7.2.  Gotcha's

  1.  Once you decide whether your removable drive is going to be a
  master or slave, make sure and jumper it properly before securing it
  in its case.  If you forget this step it can take quit a while to
  trace booting problems back to an improper jumper setting.


  2.  Make sure that O/S installation routines can ONLY see the drive
  they are installing to.  RedHat refused to let me install LILO to the
  SCSI MBR if it could see the IDE drive.  So, to install to an internal
  SCSI drive, I had to physically remove the IDE.  To install to the
  IDE, I had to disable SCSI support in the BIOS.


  3. If an O/S installation routine tells you it is going to repartition
  ALL your drives and overwrite EVERYTHING believe it.


  4.  It is very easy to install an IDE cable backwards.


  5.  I only tested an IDE master/master set up.  I am not sure how a
  master/slave would work.


  6.  Installing the removable disk frame does require opening up the
  computer case.  If you are uncomfortable with this get a friend to
  help.


  7.  If you set the removable disk to a specific disk type in the BIOS
  it will work fine until you replace it with another disk of a
  different type.  Then you will get errors or warnings and the system
  might not boot.

  8.  Plan everything in advance.


  9. With a quick change to the BIOS, the second disk becomes your boot
  disk.  This means that you can have a fully functional O/S available
  as your emergency/recovery disk.



  Multicast over TCP/IP HOWTO
  Juan-Mariano de Goyeneche <jmseyas@dit.upm.es>
  v1.0, 20 March 1998

  This HOWTO tries to cover most aspects related to multicast over
  TCP/IP networks. So, a lot of information within it is not Linux-spe-
  cific (just in case you don't use GNU/Linux... yet). Multicast is cur-
  rently an active area of research and, at the time of writing, many of
  the "standards" are merely drafts. Keep it in mind while reading the
  lines that follow.
  ______________________________________________________________________

  Table of Contents



  1. Introduction.

     1.1 What is Multicast.
     1.2 The problem with Unicast.

  2. Multicast Explained.

     2.1 Multicast addresses.
     2.2 Levels of conformance.
     2.3 Sending Multicast Datagrams.
        2.3.1 TTL.
        2.3.2 Loopback.
        2.3.3 Interface selection.
     2.4 Receiving Multicast Datagrams.
        2.4.1 Joining a Multicast Group.
        2.4.2 Leaving a Multicast Group.
        2.4.3 Mapping of IP Multicast Addresses to Ethernet/FDDI addresses.

  3. Kernel requirements and configuration.

  4. The MBone.

  5. Multicast applications.

  6. Multicast programming.

     6.1 IP_MULTICAST_LOOP.
     6.2 IP_MULTICAST_TTL.
     6.3 IP_MULTICAST_IF.
     6.4 IP_ADD_MEMBERSHIP.
     6.5 IP_DROP_MEMBERSHIP.

  7. The internals.

     7.1 IGMP.
        7.1.1 IGMP version 1.
        7.1.2 IGMP version 2.
     7.2 Kernel corner.

  8. Routing Policies and Forwarding Techniques.

  9. Multicast Transport Protocols.

  10. References.

     10.1 RFCs.
     10.2 Internet Drafts.
     10.3 Web pages.
     10.4 Books.

  11. Copyright and Disclaimer.

  12. Acknowledgements.



  ______________________________________________________________________

  1.  Introduction.

  I'll try to give here the most wide range, up to date and accurate
  information related to multicasting over TCP/IP networks that I can.
  Any feedback is very welcome. If you find any mistakes in this
  document, have any comments about its contents or an update or
  addition, please send them to me at the address listed at the top of
  this howto.
  1.1.  What is Multicast.

  Multicast is... a need. Well, at least in some scenarios. If you have
  information (a lot of information, usually) that should be transmitted
  to various (but usually not all) hosts over an internet, then
  Multicast is the answer. One common situation in which it is used is
  when distributing real time audio and video to the set of hosts which
  have joined a distributed conference.

  Multicast is much like radio or TV in the sense that only those who
  have tuned their receivers (by selecting a particular frequency they
  are interested on) receive the information. That is: you hear the
  channel you are interested in, but not the others.



  1.2.  The problem with Unicast.

  Unicast is anything that is not broadcast nor multicast. All right,
  the definition is not very bright... When you send a packet and there
  is only one sender process -yours- and one recipient process (the one
  you are sending the packet to), then this is unicast. TCP is, by its
  own nature, unicast oriented. UDP supports a lot more paradigms, but
  if you are sending UDP packets and there is only one precess supposed
  to receive them, this is unicast too.

  For years unicast transmissions proved to be enough for the Internet.
  It was not until 1993 when the first implementation of multicast saw
  the light in the 4.4 BSD release. It seems nobody needed it until
  then. Which were those new problems that multicast addressed?

  Needless to say that the Internet has changed a lot since the "early
  days". Particularly, the appearance of the Web strongly transformed
  the situation: people didn't just want connections to remote hosts,
  mail and FTP. First they wanted to see the pictures people placed in
  their home pages, but later they also wanted to see and hear that
  people.

  With today's technology it is possible to afford the "cost" of making
  a unicast connection with everyone who wants to see your web page.
  However, if you are to send audio and video, which needs a huge amount
  of bandwidth compared with web applications, you have -you had, until
  multicast came into scene- two options: to establish a separate
  unicast connection with each of the recipients, or to use broadcast.
  The first solution is not affordable: if we said that a single
  connection sending audio/video consumes a huge bandwidth, imagine
  having to establish hundreds or, may be, thousands of those
  connections.  Both the sending computer and your network would
  collapse.

  Broadcast seems to be a solution, but it's not certainly the solution.
  If you want all the hosts in your LAN to attend the conference, you
  may use broadcast. Packets will be sent only once and every host will
  receive them as they are sent to the broadcast address. The problem is
  that perhaps only a few of the hosts and not all are interested in
  those packets. Furthermore: perhaps some hosts are really interested
  in your conference, but they are outside of your LAN, a few routers
  away.  And you know that broadcast works fine inside a LAN, but
  problems arise when you want broadcast packets to be routed across
  different LANs.

  The best solution seems to be one in which you send packets to a
  certain special address (a certain frequency in radio/TV
  transmissions). Then, all hosts which have decided to join the
  conference will be aware of packets with that destination address,
  read them when they traverse the network, and pass them to the IP
  layer to be demultiplexed. This is similar to broadcasting in that you
  send only one broadcast packet and all the hosts in the network
  recognize and read it; it differs, however, in that not all multicast
  packets are read and processed, but only those that were previously
  registered in the kernel as being "of interest".

  Those special packets are routed at kernel level like any packet
  because they are IP packets. The only difference might reside in the
  routing algorithm which tells the kernel where to route or not to
  route them.



  2.  Multicast Explained.

  2.1.  Multicast addresses.

  As you probably know, the range of IP addresses is divided into
  "classes" based on the high order bits of a 32 bits IP address:


  ______________________________________________________________________
     Bit -->  0                           31            Address Range:
             +-+----------------------------+
             |0|       Class A Address      |       0.0.0.0 - 127.255.255.255
             +-+----------------------------+
             +-+-+--------------------------+
             |1 0|     Class B Address      |     128.0.0.0 - 191.255.255.255
             +-+-+--------------------------+
             +-+-+-+------------------------+
             |1 1 0|   Class C Address      |     192.0.0.0 - 223.255.255.255
             +-+-+-+------------------------+
             +-+-+-+-+----------------------+
             |1 1 1 0|  MULTICAST Address   |     224.0.0.0 - 239.255.255.255
             +-+-+-+-+----------------------+
             +-+-+-+-+-+--------------------+
             |1 1 1 1 0|     Reserved       |     240.0.0.0 - 247.255.255.255
             +-+-+-+-+-+--------------------+
  ______________________________________________________________________



  The one which concerns us is the "Class D Address". Every IP datagram
  whose destination address starts with "1110" is an IP Multicast
  datagram.

  The remaining 28 bits identify the multicast "group" the datagram is
  sent to. Following with the previous analogy, you have to tune your
  radio to hear a program that is transmitted at some specific
  frequency, in the same way you have to "tune" your kernel to receive
  packets sent to an specific multicast group. When you do that, it's
  said that the host has joined that group in the interface you
  specified. More on this later.

  There are some special multicast groups, say "well known multicast
  groups", you should not use in your particular applications due the
  special purpose they are destined to:


  o  224.0.0.1 is the all-hosts group. If you ping that group, all
     multicast capable hosts on the network should answer, as every
     multicast capable host must join that group at start-up on all it's
     multicast capable interfaces.


  o  224.0.0.2 is the all-routers group. All multicast routers must join
     that group on all it's multicast capable interfaces.

  o  224.0.0.4 is the all DVMRP routers, 224.0.0.5 the all OSPF routers,
     224.0.013 the all PIM routers, etc.

  All this special multicast groups are regularly published in the
  "Assigned Numbers" RFC.

  In any case, range 224.0.0.0 through 224.0.0.255 is reserved for local
  purposes (as administrative and maintenance tasks) and datagrams
  destined to them are never forwarded by multicast routers. Similarly,
  the range 239.0.0.0 to 239.255.255.255 has been reserved for
  "administrative scoping" (see section 2.3.1 for information on
  administrative scoping).



  2.2.  Levels of conformance.

  Hosts can be in three different levels of conformance with the
  Multicast specification, according to the requirements they meet.

  Level 0 is the "no support for IP Multicasting" level. Lots of hosts
  and routers in the Internet are in this state, as multicast support is
  not mandatory in IPv4 (it is, however, in IPv6). Not too much
  explanation is needed here: hosts in this level can neither send nor
  receive multicast packets. They must ignore the ones sent by other
  multicast capable hosts.

  Level 1 is the "support for sending but not receiving multicast IP
  datagrams" level. Thus, note that it is not necessary to join a
  multicast group to be able to send datagrams to it. Very few additions
  are needed in the IP module to make a "Level 0" host "Level
  1-compliant", as shown in section 2.3.

  Level 2 is the "full support for IP multicasting" level. Level 2 hosts
  must be able to both send and receive multicast traffic. They must
  know the way to join and leave multicast groups and to propagate this
  information to multicast routers. Thus, they must include an Internet
  Group Management Protocol (IGMP) implementation in their TCP/IP stack.



  2.3.  Sending Multicast Datagrams.

  By now, it should be obvious that multicast traffic is handled at the
  transport layer with UDP, as TCP provides point-to-point connections,
  not feasibles for multicast traffic. (Heavy research is taking place
  to define and implement new multicast-oriented transport protocols.
  See section ``Multicast Transport Protocols'' for details).

  In principle, an application just needs to open a UDP socket and fill
  with a class D multicast address the destination address where it
  wants to send data to.  However, there are some operations that a
  sending process must be able to control.



  2.3.1.  TTL.

  The TTL (Time To Live) field in the IP header has a double
  significance in multicast. As always, it controls the live time of the
  datagram to avoid it being looped forever due to routing errors.
  Routers decrement the TTL of every datagram as it traverses from one
  network to another and when its value reaches 0 the packet is dropped.
  The TTL in IPv4 multicasting has also the meaning of "threshold". Its
  use becomes evident with an example: suppose you set a long, bandwidth
  consuming, video conference between all the hosts belonging to your
  department. You want that huge amount of traffic to remain in your
  LAN. Perhaps your department is big enough to have various LANs. In
  that case you want those hosts belonging to each of your LANs to
  attend the conference, but in any case you want to collapse the entire
  Internet with your multicast traffic. There is a need to limit how
  "long" multicast traffic will expand across routers. That's what the
  TTL is used for. Routers have a TTL threshold assigned to each of its
  interfaces, and only datagrams with a TTL greater than the interface's
  threshold are forwarded. Note that when a datagram traverses a router
  with a certain threshold assigned, the datagram's TTL is not
  decremented by the value of the threshold. Only a comparison is made.
  (As before, the TTL is decremented by 1 each time a datagram passes
  across a router).

  A list of TTL thresholds and their associated scope follows:


  ______________________________________________________________________
  TTL     Scope
  ----------------------------------------------------------------------
     0    Restricted to the same host. Won't be output by any interface.
     1    Restricted to the same subnet. Won't be forwarded by a router.
   <32    Restricted to the same site, organization or department.
   <64    Restricted to the same region.
  <128    Restricted to the same continent.
  <255    Unrestricted in scope. Global.
  ______________________________________________________________________



  Nobody knows what "site" or "region" mean exactly. It is up to the
  administrators to decide what this limits apply to.

  The TTL-trick is not always flexible enough for all needs, specially
  when dealing with overlapping regions or trying to establish
  geographic, topologic and bandwidth limits simultaneously. To solve
  this problems, administratively scoped IPv4 multicast regions were
  established in 1994.  (see D. Meyer's "Administratively Scoped IP
  Multicast" Internet draft).  It does scoping based on multicast
  addresses rather than on TTLs. The range 239.0.0.0 to 239.255.255.255
  is reserved for this administrative scoping.



  2.3.2.  Loopback.

  When the sending host is Level 2 conformant and is also a member of
  the group datagrams are being sent to, a copy is looped back by
  default.  This does not mean that the interface card reads its own
  transmission, recognizes it as belonging to a group the interface
  belongs to, and reads it from the network. On the contrary, is the IP
  layer which, by default, recognizes the to-be-sent datagram and copies
  and queues it on the IP input queue before sending it.

  This feature is desirable in some cases, but not in others. So the
  sending process can turn it on and off at wish.



  2.3.3.  Interface selection.

  Hosts attached to more than one network should provide a way for
  applications to decide which network interface will be used to output
  the transmissions. If not specified, the kernel chooses a default one
  based on system administrator's configuration.



  2.4.  Receiving Multicast Datagrams.

  2.4.1.  Joining a Multicast Group.

  Broadcast is (in comparison) easier to implement than multicast. It
  doesn't require processes to give the kernel some rules regarding what
  to do with broadcast packets. The kernel just knows what to do: read
  and deliver all of them to the proper applications.

  With multicast, however, it is necessary to advise the kernel which
  multicast groups we are interested in. That is, we have to ask the
  kernel to "join" those multicast groups. Depending on the underlying
  hardware, multicast datagrams are filtered by the hardware or by the
  IP layer (and, in some cases, by both). Only those with a destination
  group previously registered via a join are accepted.

  Essentially, when we join a group we are telling the kernel: "OK. I
  know that, by default, you ignore multicast datagrams, but remember
  that I am interested in this multicast group. So, do read and deliver
  (to any process interested in them, not only to me) any datagram that
  you see in this network interface with this multicast group in its
  destination field".

  Some considerations: first, note that you don't just join a group.
  You join a group on a particular network interface. Of course, it is
  possible to join the same group on more than one interface. If you
  don't specify a concrete interface, then the kernel will choose it
  based on its routing tables when datagrams are to be sent. It is also
  possible that more than one process joins the same multicast group on
  the same interface.  They will all receive the datagrams sent to that
  group via that interface.

  As said before, any multicast-capable hosts join the all-hosts group
  at start-up , so "pinging" 224.0.0.1 returns all hosts in the network
  that have multicast enabled.

  Finally, consider that for a process to receive multicast datagrams it
  has to ask the kernel to join the group and bind the port those
  datagrams were being sent to. The UDP layer uses both the destination
  address and port to demultiplex the packets and decide which socket(s)
  deliver them to.



  2.4.2.  Leaving a Multicast Group.

  When a process is no longer interested in a multicast group, it
  informs the kernel that it wants to leave that group. It is important
  to understand that this doesn't mean that the kernel will no longer
  accept multicast datagrams destined to that multicast group. It will
  still do so if there are more precesses who issued a "multicast join"
  petition for that group and are still interested. In that case the
  host remains member of the group, until all the processes decide to
  leave the group.

  Even more: if you leave the group, but remain bound to the port you
  were receiving the multicast traffic on, and there are more processes
  that joined the group, you will still receive the multicast
  transmissions.

  The idea is that joining a multicast group only tells the IP and data
  link layer (which in some cases explicitly tells the hardware) to
  accept multicast datagrams destined to that group. It is not a per-
  process membership, but a per-host membership.



  2.4.3.  Mapping of IP Multicast Addresses to Ethernet/FDDI addresses.

  Both Ethernet and FDDI frames have a 48 bit destination address field.
  In order to avoid a kind of multicast ARP to map multicast IP
  addresses to ethernet/FDDI ones, the IANA reserved a range of
  addresses for multicast: every ethernet/FDDI frame with its
  destination in the range 01-00-5e-00-00-00 to 01-00-5e-ff-ff-ff (hex)
  contains data for a multicast group. The prefix 01-00-5e identifies
  the frame as multicast, the next bit is always 0 and so only 23 bits
  are left to the multicast address. As IP multicast groups are 28 bits
  long, the mapping can not be one-to-one. Only the 23 least significant
  bits of the IP multicast group are placed in the frame.  The remaining
  5 high-order bits are ignored, resulting in 32 different multicast
  groups being mapped to the same ethernet/FDDI address. This means that
  the ethernet layer acts as an imperfect filter, and the IP layer will
  have to decide whether to accept the datagrams the data-link layer
  passed to it. The IP layer acts as a definitive perfect filter.

  Full details on IP Multicasting over FDDI are given in RFC 1390:
  "Transmission of IP and ARP over FDDI Networks". For more information
  on mapping IP Multicast addresses to ethernet ones, you may consult
  draft-ietf-mboned-intro-multicast-03.txt: "Introduction to IP
  Multicast Routing".

  If you are interested in IP Multicasting over Token-Ring Local Area
  Networks, see RFC 1469 for details.



  3.  Kernel requirements and configuration.

  Linux is, of course (you doubted it?), full Level-2 Multicast-
  Compliant.  It meets all requirements to send, receive and act as a
  router (mrouter) for multicast datagrams.

  If you want just to send and receive, you must say yes to "IP:
  multicasting" when configuring your kernel. If you also want your
  Linux box to act as a multicast router (mrouter) you also need to
  enable multicast routing in the kernel by selecting "IP:
  forwarding/gatewaying", "IP: multicast routing" and "IP: tunneling",
  the latter because new versions of mrouted relay on IP tunneling to
  send multicast datagrams encapsulated into unicast ones. This is
  necessary when establishing tunnels between multicast hosts separated
  by unicast-only networks and routers.  (The mrouted is a daemon that
  implements the multicast routing algorithm -the routing policy- and
  instructs the kernel on how to route multicast datagrams).

  Some kernel versions label multicast routing as "EXPERIMENTAL", so you
  should enable "Prompt for development and/or incomplete code/drivers"
  in the "Code maturity level options" section.

  If, when running the mrouted, traffic generated in the same network
  your Linux box is connected to is correctly forwarded to the other
  network, but you can't see the other's network traffic on your local
  network, check whether you are receiving ICMP protocol error messages.
  Almost sure you forgot to turn on IP tunneling in your Linux router.
  It's a kind of stupid error when you know it but, believe me, its
  quite time-consuming when you don't, and there is no apparent reason
  that explains what is going wrong. A sniffer proves to be quite useful
  in these situations!

  (You can see more on multicast routing on section ``Routing Policies
  and Forwarding Techniques''; mrouted and tunnels are also explained in
  sections ``The MBone'' and ``Multicast applications'').

  Once you have compiled and installed your new kernel, you should
  provide a default route for multicast traffic. The goal is to add a
  route to the network 224.0.0.0.

  The problem most people seem to face in this stage of the
  configuration is with the value of the mask to supply. If you have
  read Terry Dawson's excellent NET-3-HOWTO, it should not be difficult
  to guess the correct value, though. As explained there, the netmask is
  a 32 bit number filled with all-1s in the network part of your IP
  address, and with all-0s in the host part. Recall from section 2.1
  that a class D multicast address has no netwok/host sections. Instead
  it has a 28-bit group identifier and a 4-bit class D identifier. Well,
  this 4 bits are the network part and the remaining 28 the host part.
  So the netmask needed is 11110000000000000000000000000000 or, easier
  to read: 240.0.0.0.  Then, the full command should be:


       route add 224.0.0.0 netmask 240.0.0.0 dev eth0



  Depending on how old your route program is, you might need to add the
  -net flag after the add.

  Here we supposed that eth0 was multicast-capable and that, when not
  otherwise specified, we wanted multicast traffic to be output there.
  If this is not your case, change the dev parameter as appropriate.

  The /proc filesystem proves here to be useful once again: you can
  check /proc/net/igmp to see the groups your host is currently
  subscribed to.



  4.  The MBone.

  Using a new technology usually carries some advantages and
  disadvantages.  The advantages of multicast are -I think- clear. The
  main disadvantage is that hundreds of hosts and, specially, routers
  don't support it yet. As a consequence, people who started working on
  multicast, bought new equipment, modified their operating systems, and
  built multicast islands in their local places. Then they discovered
  that it was difficult to communicate with people doing similar things
  because if only one of the routers between them didn't support
  multicast there was nothing to do...

  The solution was clear: they decided to build a virtual multicast
  network in the top of the Internet. That is: sites with multicast
  routers between them could communicate directly. But sites joined
  across unicast routers would send their island's multicast traffic
  encapsulated in unicast packets to other multicast islands. Routers in
  the middle would not have problems, as they would be dealing with
  unicast traffic. Finally, in the receiving site, traffic would be de-
  encapsulated, and sent to the island in the original multicast way.
  Two ends converting from multicast to unicast, and then again to
  multicast define what is called a multicast tunnel.

  The MBone or Multicast Backbone is that virtual multicast network
  based on multicast islands connected by multicast tunnels.

  Several activities take place in the MBone daily, but it deserves to
  be remarked the profusion of tele-conferences with real time audio and
  video taking place across the whole Internet. As an example, it was
  recently transmitted (live) the talk Linus Torvalds gave to the
  Silicon Valley Linux Users Group.

  For more information on the MBone, see:

  <http://www.mediadesign.co.at/newmedia/more/mbone-faq.html>



  5.  Multicast applications.

  Most people dealing with multicast, sooner or later decide to connect
  to the MBone, and then they usually need an mrouted. You'll also need
  it if you don't have a multicast-capable router and you want multicast
  traffic generated in one of your subnets to be "heard" on another.
  mrouted does circunvect the problem of sending multicast traffic
  across unicast routers -it encapsulates multicast datagrams into
  unicast ones (IP into IP)- but this is not the only feature it
  provides. Most important, it instructs the kernel on how to route (or
  not-to-route) multicast datagrams based on their source and
  destination. So, even having a multicast capable router, mrouted can
  be used to tell it what to do with the datagrams (note I said what,
  and not how; mrouted says "forward this to the network connected to
  that interface", but actual forwarding is performed by the kernel).
  This distinction between actual-forwarding and the algorithm that
  decides who and how to forward is very useful as it allows to write
  forwarding code only once and place it into the kernel. Forwarding
  algorithms and policies are then implemented in user space daemons, so
  it is very easy to change from one policy to another without the need
  of kernel re-compilation.

  You can get a version of mrouted ported to Linux from:

  <ftp://www.video.ja.net/mice/mrouted/Linux/>. This site is mirrored
  all across the world. Be sure to read the
  <ftp://www.video.ja.net/mice/README.mirrors> file to choose the one
  nearest you.

  Next, we'll focus specially on multicast applications written to
  connect to the MBone, which have been ported to Linux. The list is
  picked up from Michael Esler's "Linux Multicast Information" page
  <http://www.cs.virginia.edu/~mke2e/multicast/>. I recommend you that
  page for lots of information and resources on multicast and Linux.


  Audio Conferencing

  o  NeVoT - Network Voice Terminal <http://www.fokus.gmd.de/step/nevot>

  o  RAT - UCL Robust-Audio Tool <http://www-mice.cs.ucl.ac.uk/mice/rat>

  o  vat - LBL visual audio tool <http://www-nrg.ee.lbl.gov/vat/>

  Video Conferencing

  o  ivs - Inria video conferencing system
     <http://www.inria.fr/rodeo/ivs.html>

  o  nv - Network video tool <ftp://ftp.parc.xerox.com/pub/net-
     research/>
  o  nv w/ Meteor - Release of nv w/ support for the Matrox Meteor (UVa)
     <ftp://ftp.cs.virginia.edu/pub/gwtts/Linux/nv-meteor.tar.gz>

  o  vic - LBL video conferencing tool <http://www-nrg.ee.lbl.gov/vic/>

  o  vic w/ Meteor - Release of vic w/ support for the Matrox Meteor
     (UVa)
     <ftp://ftp.cs.virginia.edu/pub/gwtts/Linux/vic2.7a38-meteor.tar.gz>

  Other Utilities

  o  mmphone Multimedia phone service
     <http://www.eit.com/software/mmphone/phoneform.html>

  o  wb - LBL shared white board <http://www-nrg.ee.lbl.gov/wb/>

  o  webcast - Reliable multicast application for linking Mosaic
     browsers
     <http://www.ncsa.uiuc.edu/SDG/Software/XMosaic/CCI/webcast.html>

  Session Tools

  I placed session tools later because I think they deserve some
  explanation.  When a conference takes places, several multicast groups
  and ports are assigned to each service you want for your conference
  (audio, video, shared white-boards, etc...) Announces of the
  conferences that will take place, along with information on multicast
  groups, ports and programs that will be used (vic, vat, ...) are
  periodically multicasted to the MBone. Session tools "hear" this
  information and present you in an easy way which conferences are
  taking (or will take) place, so you can decide which interest you.
  Also, they facilitate the task of joining a session. Instead of
  launching each program that will be used and telling which multicast
  group/port to join, you usually just need to click and the session
  tool launches the proper programs suppling them all information needed
  to join the conference.  Session tools usually let you announce your
  own conferences on the MBone.


  o  gwTTS - University of Virginia tele-tutoring system
     <http://www.cs.Virginia.EDU/~gwtts>

  o  isc - Integrated session controller
     <http://www.fokus.gmd.de/step/isc>

  o  mmcc - Multimedia conference control
     <ftp://ftp.isi.edu/confctrl/mmcc>

  o  sd - LBL session directory tool
     <ftp://ftp.ee.lbl.gov/conferencing/sd>

  o  sd-snoop - Tenet Group session directory snoop utility
     <ftp://tenet.berkeley.edu/pub/software>

  o  sdr - UCL's next generation session directory
     <ftp://cs.ucl.ac.uk/mice/sdr>



  6.  Multicast programming.

  Multicast programming... or writing your own multicast applications.

  Several extensions to the programming API are needed in order to
  support multicast. All of them are handled via two system calls:
  setsockopt() (used to pass information to the kernel) and getsockopt()
  (to retrieve information regarded multicast behavior). This does not
  mean that 2 new system calls were added to support multicast. The pair
  setsockopt()/getsockopt() has been there for years. Since 4.2 BSD at
  least. The addition consists on a new set of options (multicast
  options) that are passed to these system calls, that the kernel must
  understand.

  The following are the setsockopt()/getsockopt() function prototypes:


       int getsockopt(int s, int level, int optname, void* optval, int* optlen);

       int setsockopt(int s, int level, int optname, const void* optval, int optlen);



  The first parameter, s, is the socket the system call applies to.  For
  multicasting, it must be a socket of the family AF_INET and its type
  may be either SOCK_DGRAM or SOCK_RAW. The most common use is with
  SOCK_DGRAM sockets, but if you plan to write a routing daemon or
  modify some existing one, you will probably need to use SOCK_RAW ones.

  The second one, level, identifies the layer that is to handle the
  option, message or query, whatever you want to call it. So, SOL_SOCKET
  is for the socket layer, IPPROTO_IP for the IP layer, etc...  For
  multicast programming, level will always be IPPROTO_IP.

  optname identifies the option we are setting/getting. Its value
  (either supplied by the program or returned by the kernel) is optval.
  The optnames involved in multicast programming are the following:


  ______________________________________________________________________
                          setsockopt()            getsockopt()
  IP_MULTICAST_LOOP           yes                     yes
  IP_MULTICAST_TTL            yes                     yes
  IP_MULTICAST_IF             yes                     yes
  IP_ADD_MEMBERSHIP           yes                      no
  IP_DROP_MEMBERSHIP          yes                      no
  ______________________________________________________________________



  optlen carries the size of the data structure optval points to.  Note
  that in getsockopt() it is a value-result rather than a value: the
  kernel writes the value of optname in the buffer pointed by optval and
  informs us of that value's size via optlen.

  Both setsockopt() and getsockopt() return 0 on success and -1 on
  error.



  6.1.  IP_MULTICAST_LOOP.

  You have to decide, as the application writer, whether you want the
  data you send to be looped back to your host or not. If you plan to
  have more than one process or user "listening", loopback must be
  enabled. On the other hand, if you are sending the images your video
  camera is producing, you probably don't want loopback, even if you
  want to see yourself on the screen. In that latter case, your
  application will probably receive the images from a device attached to
  the computer and send them to the socket. As the application already
  "has" that data, it is improbable it wants to receive it again on the
  socket.  Loopback is by default enabled.

  Regard that optval is a pointer. You can't write:


       setsockopt(socket, IPPROTO_IP, IP_MULTICAST_LOOP, 0, 1);



  to disable loopback. Instead write:


       u_char loop;
       setsockopt(socket, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop));



  and set loop to 1 to enable loopback or 0 to disable it.

  To know whether a socket is currently looping-back or not use
  something like:


       u_char loop;
       int size;

       getsockopt(socket, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, &size)



  6.2.  IP_MULTICAST_TTL.

  If not otherwise specified, multicast datagrams are sent with a
  default value of 1, to prevent them to be forwarded beyond the local
  network.  To change the TTL to the value you desire (from 0 to 255),
  put that value into a variable (here I name it "ttl") and write
  somewhere in your program:


       u_char ttl;
       setsockopt(socket, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));



  The behavior with getsockopt() is similar to the one seen on
  IP_MULTICAST_LOOP.



  6.3.  IP_MULTICAST_IF.

  Usually, the system administrator specifies the default interface
  multicast datagrams should be sent from. The programmer can override
  this and choose a concrete outgoing interface for a given socket with
  this option.


       struct in_addr interface_addr;
       setsockopt (socket, IPPROTO_IP, IP_MULTICAST_IF, &interface_addr, sizeof(interface_addr));

  >From now on, all multicast traffic generated in this socket will be
  output from the interface chosen. To revert to the original behavior
  and let the kernel choose the outgoing interface based on the system
  administrator's configuration, it is enough to call setsockopt() with
  this same option and INADDR_ANY in the interface field.

  In determining or selecting outgoing interfaces, the following ioctls
  might be useful: SIOCGIFADDR (to get an interface's address),
  SIOCGIFCONF (to get the list of all the interfaces) and  SIOCGIFFLAGS
  (to get an interface's flags and, thus, determine whether the
  interface is multicast capable or not -the IFF_MULTICAST flag-).

  If the host has more than one interface and the IP_MULTICAST_IF option
  is not set, multicast transmissions are sent from the default
  interface, although the remainding interfaces might be used for
  multicast forwarding if the host is acting as a multicast router.



  6.4.  IP_ADD_MEMBERSHIP.

  Recall that you need to tell the kernel which multicast groups you are
  interested in. If no process is interested in a group, packets
  destined to it that arrive to the host are discarded. In order to
  inform the kernel of your interests and, thus, become a member of that
  group, you should first fill a ip_mreq structure which is passed later
  to the kernel in the optval field of the setsockopt() system call.

  The ip_mreq structure (taken from /usr/include/linux/in.h) has the
  following members:


       struct ip_mreq
       {
               struct in_addr imr_multiaddr;   /* IP multicast address of group */
               struct in_addr imr_interface;   /* local IP address of interface */
       };



  (Note: the "physical" definition of the structure is in the file above
  specified.  Nonetheless, you should not include <linux/in.h> if you
  want your code to be portable. Instead, include <netinet/in.h> which,
  in turn, includes <linux/in.h> itself).

  The first member, imr_multiaddr, holds the group address you want to
  join.  Remember that memberships are also associated with interfaces,
  not just groups. This is the reason you have to provide a value for
  the second member: imr_interface. This way, if you are in a multihomed
  host, you can join the same group in several interfaces. You can
  always fill this last member with the wildcard address (INADDR_ANY)
  and then the kernel will deal with the task of choosing the interface.

  With this structure filled (say you defined it as: struct ip_mreq
  mreq;) you just have to call setsockopt() this way:


       setsockopt (socket, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));



  Notice that you can join several groups to the same socket, not just
  one. The limit to this is IP_MAX_MEMBERSHIPS and, as of version
  2.0.33, it has the value of 20.
  6.5.  IP_DROP_MEMBERSHIP.

  The process is quite similar to joining a group:


       struct ip_mreq mreq;
       setsockopt (socket, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq));



  where mreq is the same structure with the same data used when joining
  the group. If the imr_interface member is filled with INADDR_ANY, the
  first matching group is dropped.

  If you have joined a lot of groups to the same socket, you don't need
  to drop memberships in all of them in order to terminate. When you
  close a socket, all memberships associated with it are dropped by the
  kernel. The same occurs if the process that opened the socket is
  killed.

  Finally, keep in mind that a process dropping membership for a group
  does not imply that the host will stop receiving datagrams for that
  group. If another socket joined that group in that same interface
  previously to this IP_DROP_MEMBERSHIP, the host will keep being a
  member of that group.

  Both ADD_MEMBERSHIP and DROP_MEMBERSHIP are nonblocking operations.
  They should return immediately indicating either success or failure.



  7.  The internals.

  This section's aim is to provide some information, not needed to reach
  a basic understanding on how multicast works nor to be able to write
  multicast programs, but which is very interesting, gives some insight
  on the underlying multicast protocols and implementations, and may be
  useful to avoid common errors and misunderstandings.



  7.1.  IGMP.

  When talking about IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP, we said
  that the information provided by this "commands" was used by the
  kernel to choose which multicast datagrams accept or discard. This is
  true, but it is not all the truth. Such a simplification would imply
  that multicast datagrams for all multicast groups around the world
  would be received by our host, and then it would check the memberships
  issued by processes running on it to decide whether to pass the
  traffic to them or to throw it out. As you can imagine, this is a
  complete bandwidth waste.

  What actually happens is that hosts instruct their routers telling
  them which multicast groups they are interested in; then, those
  routers tell their up-stream routers they want to receive that
  traffic, and so on. Algorithms employed for making the decision of
  when to ask for a group's traffic or saying that it is not desired
  anymore, vary a lot. There's something, however, that never changes:
  how this information is transmitted. IGMP is used for that. It stands
  for Internet Group Management Protocol. It is a new protocol, similar
  in many aspects to ICMP, with a protocol number of 2, whose messages
  are carried in IP datagrams, and which all level 2-compliant host are
  required to implement.
  As said before, it is used both by hosts giving membership information
  to its routers, and by routers to communicate between themselves. In
  the following I'll cover only the hosts-routers relationships, mainly
  because I was unable to find information describing router to router
  communication other than the mrouted source code (rfc 1075 describing
  the Distance Vector Multicast Routing Protocol is now obsoleted, and
  mrouted implements a modified DVMRP not yet documented).

  IGMP version 0 is specified in RFC-988 which is now obsoleted. Almost
  no one uses version 0 now.

  IGMP version 1 is described in RFC-1112 and, although it is updated by
  RFC-2236 (IGMP version 2) it is in wide use still. The Linux kernel
  implements the full IGMP version 1 and parts of version 2
  requirements, but not all.

  Now I'll try to give an informal description of the protocol. You can
  check RFC-2236 for an in-proof formal description, with lots of state
  diagrams and time-out boundaries.

  All IGMP messages have the following structure:

  ______________________________________________________________________
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |      Type     | Max Resp Time |           Checksum            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                         Group Address                         |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ______________________________________________________________________



  IGMP version 1 (hereinafter IGMPv1) labels the "Max Resp Time" as
  "Unused", zeroes it when sent, and ignores it when received. Also, it
  brakes the "Type" field in two 4-bits wide fields: "Version" and
  "Type". As IGMPv1 identifies a "Membership Query" message as 0x11
  (version 1, type 1) and IGMPv2 as 0x11 too, the 8 bits have the same
  effective interpretation.

  I think it is more instructive to give first the IGMPv1 description
  and next point out the IGMPv2 additions, as they are mainly that,
  additions.

  For the following discussions it is important to remember that
  multicast routers receive all IP multicast datagrams.



  7.1.1.  IGMP version 1.

  Routers periodically send IGMP Host Membership Queries to the all-
  hosts group (224.0.0.1) with a TTL of 1 (once every minute or two).
  All multicast-capable hosts hear them, but don't answer immediately to
  avoid an IGMP Host Membership Report storm.  Instead, they start a
  random delay timer for each group they belong to on the interface they
  received the query.

  Sooner or later, the timer expires in one of the hosts, and it sends
  an IGMP Host Membership Report (also with TTL 1) to the multicast
  address of the group being reported. As it is sent to the group, all
  hosts that joined the group -and which are currently waiting for their
  own timer to expire- receive it, too. Then, they stop their timers and
  don't generate any other report. Just one is generated -by the host
  that chose the smaller timeout-, and that is enough for the router. It
  only needs to know that there are members for that group in the
  subnet, not how many nor which.

  When no reports are received for a given group after a certain number
  of queries, the router assumes that no members are left, and thus it
  doesn't have to forward traffic for that group on that subnet. Note
  that in IGMPv1 there are no "Leave Group messages".

  When a host joins a new group, the kernel sends a report for that
  group, so that the respective process needs not to wait a minute or
  two until a new membership query is received. As you can see this IGMP
  packet is generated by the kernel as a response to the
  IP_ADD_MEMBERSHIP command, seen in section ``IP_ADD_MEMBERSHIP''.
  Note the emphasis in the adjective "new": if a process issues an
  IP_ADD_MEMBERSHIP command for a group the host is already a member of,
  no IGMP packets are sent as we must already be receiving traffic for
  that group; instead, a counter for that group's use is incremented.
  IP_DROP_MEMBERSHIP generates no datagrams in IGMPv1.

  Host Membership Queries are identified by Type 0x11, and Host
  Membership Reports by Type 0x12.

  No reports are sent for the all-hosts group. Membership in this group
  is permanent.



  7.1.2.  IGMP version 2.

  One important addition to the above is the inclusion of a Leave Group
  message (Type 0x17). The reason is to reduce the bandwidth waste
  between the time the last host in the subnet drops membership and the
  time the router times-out for its queries and decides there are no
  more members present for that group (leave latency). Leave Group
  messages should be addressed to the all-routers group (224.0.0.2)
  rather than to the group being left, as that information is of no use
  for other members (kernel versions up to 2.0.33 send them to the
  group; although it does no harm to the hosts, it's a waste of time as
  they have to process them, but don't gain useful information).  There
  are certain subtle details regarding when and when-not to send Leave
  Messages; if interested, see the RFC.

  When an IGMPv2 router receives a Leave Message for a group, it sends
  Group-Specific Queries to the group being left. This is another
  addition. IGMPv1 has no group-specific queries. All queries are sent
  to the all-hosts group. The Type in the IGMP header does not change
  (0x11, as before), but the  "Group Address" is filled with the address
  of the multicast group being left.

  The "Max Resp Time" field, which was set to 0 in transmission and
  ignored on reception in IGMPv1, is meaningful only in "Membership
  Query" messages. It gives the maximum time allowed before sending a
  report in units of 1/10 second. It is used as a tune mechanism.

  IGMPv2 adds another message type: 0x16. It is a "Version 2 Membership
  Report" sent by IGMPv2 hosts if they detect an IGMPv2 router is
  present (an IGMPv2 host knows an IGMPv1 router is present when it
  receives a query with the "Max Response" field set to 0).

  When more than one router claims to act as querier, IGMPv2 provides a
  mechanism to avoid "discussions": the router with the lowest IP
  address is designed to be querier. The other routers keep timeouts. If
  the router with lower IP address crashes or is shutdown, the decision
  of who will be the querier is taken again after the timers expire.


  7.2.  Kernel corner.

  This sub-section gives some start-points to study the multicast
  implementation of the Linux kernel. It does not explain that
  implementation. It just says where to find things.

  The study was carried over version 2.0.32, so it could be a bit
  outdated by the time you read it (network code seems to have changed A
  LOT in 2.1.x releases, for instance).

  Multicast code in the Linux kernel is always surrounded by #ifdef
  CONFIG_IP_MULTICAST / #endif pairs, so that you can include/ exclude
  it from your kernel based on your needs (this inclusion/exclusion is
  done at compile time, as you probably know if reading that section...
  #ifdefs are handled by the preprocessor.  The decision is made based
  in what you selected when doing either a make config, make menuconfig
  or make xconfig).

  You might want multicast features, but if your Linux box is not going
  to act as a multicast router you will probably not want multicast
  router features included in your new kernel. For this you have the
  multicast routing code surrounded by #ifdef CONFIG_IP_MROUTE / #endif
  pairs.

  Kernel sources are usually placed in /usr/src/linux. However, the
  place may change so, both for accuracy and brevity, I will refer to
  the root directory of the kernel sources as just LINUX. Then,
  something like LINUX/net/ipv4/udp.c should be the same as
  /usr/src/linux/net/ipv4/udp.c if you unpacked the kernel sources in
  the /usr/src/linux directory.

  All multicast interfaces with user programs shown in the section
  devoted to multicast programming were driven across the setsockopt()/
  getsockopt() system calls. Both of them are implemented by means of
  functions that make some tests to verify the parameters passed to them
  and which, in turn, call another function that makes some additional
  tests, demultiplexes the call based on the level parameter to either
  system call, and then calls another function which... (if interested
  in all this jumps, you can follow them in LINUX/net/socket.c
  (functions sys_socketcall() and sys_setsockopt(),
  LINUX/net/ipv4/af_inet.c (function inet_setsockopt()) and
  LINUX/net/ipv4/ip_sockglue.c (function ip_setsockopt()) ).

  The one which interests us is LINUX/net/ipv4/ip_sockglue.c. Here we
  find ip_setsockopt() and ip_getsockopt() which are mainly a switch
  (after some error checking) verifying each possible value for optname.
  Along with unicast options, all multicast ones seen here are handled:
  IP_MULTICAST_TTL, IP_MULTICAST_LOOP, IP_MULTICAST_IF,
  IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. Previously to the switch, a
  test is made to determine whether the options are multicast router
  specific, and if so, they are routed to the ip_mroute_setsockopt() and
  ip_mroute_getsockopt() functions (file LINUX/net/ipv4/ipmr.c).

  In LINUX/net/ipv4/af_inet.c we can see the default values we talked
  about in previous sections (loopback enabled, TTL=1) provided when the
  socket is created (taken from function inet_create() in this file):



  ______________________________________________________________________

  #ifdef CONFIG_IP_MULTICAST
          sk->ip_mc_loop=1;
          sk->ip_mc_ttl=1;
          *sk->ip_mc_name=0;
          sk->ip_mc_list=NULL;
  #endif
  ______________________________________________________________________



  Also, the assertion of "closing a socket makes the kernel drop all
  memberships this socket had" is corroborated by:

  ______________________________________________________________________
  #ifdef CONFIG_IP_MULTICAST
                  /* Applications forget to leave groups before exiting */
                  ip_mc_drop_socket(sk);
  #endif
  ______________________________________________________________________


  taken from inet_release(), on the same file as before.

  Device independent operations for the Link Layer are kept in
  LINUX/net/core/dev_mcast.c.

  Two important functions are still missing: the processing of input and
  output multicast datagrams. As any other datagrams, incoming datagrams
  are passed from the device drivers to the ip_rcv() function
  (LINUX/net/ipv4/ip_input.c).  In this function is where the perfect
  filtering is applied to multicast packets that crossed the devices
  layer (recall that lower layers only perform best-effort filtering and
  is IP who 100% knows whether we are interested in that multicast group
  or not). If the host is acting as a multicast router, this function
  decides too whether the datagram should be forwarded and calls
  ipmr_forward() appropriately. (ipmr_forward() is implemented in
  LINUX/net/ipv4/ipmr.c).

  Code in charge of out-putting packets is kept in
  LINUX/net/ipv4/ip_output.c.  Here is where the IP_MULTICAST_LOOP
  option takes effect, as it is checked to see whether to loop back the
  packets or not (function ip_queue_xmit()).  Also the TTL of the
  outgoing packet is selected based on whether it is a multicast or
  unicast one. In the former case, the argument passed to the
  IP_MULTICAST_TTL option is used (function (ip_build_xmit()).

  While working with mrouted (a program which gives the kernel
  information about how to route multicast datagrams), we detected that
  all multicast packets originated on the local network were properly
  routed..., except the ones from the Linux box that was acting as the
  multicast router!! ip_input.c was working OK, but it seemed
  ip_output.c wasn't.  Reading the source code for the output functions,
  we found that outgoing datagrams were not being passed to
  ipmr_forward(), the function that had to decide whether they should be
  routed or not. The packets were outputed to the local network but, as
  network cards are usually unable to read their own transmissions,
  those datagrams were never routed.  We added the necessary code to the
  ip_build_xmit() function and everything was OK again.  (Having the
  sources for your kernel is not a luxury or pedantry; it's a need!)

  ipmr_forward() has been mentioned a couple of times. It is an
  important function as it solves one important misunderstanding that
  appears to be widely expanded. When routing multicast traffic, it is
  not mrouted who makes the copies and sends them to the proper
  recipients. mrouted receives all multicast traffic and, based on that
  information, computes the multicast routing tables and tells the
  kernel how to route: "datagrams for this group coming from that
  interface should be forwarded to those interfaces". This information
  is passed to the kernel by calls to setsockopt() on a raw socket
  opened by the mrouted daemon (the protocol specified when the raw
  socket was created must be IPPROTO_IGMP). This options are handled in
  the ip_mroute_setsockopt() function from LINUX/net/ipv4/ipmr.c. The
  first option (would be better to call them commands rather than
  options) issued on that socket must be MRT_INIT.  All other commands
  are ignored (returning -EACCES) if MRT_INIT is not issued first. Only
  one instance of mrouted can be running at the same time in the same
  host.  To keep track of this, when the first MRT_INIT is received, an
  important variable, struct sock* mroute_socket, is pointed to the
  socket MRT_INIT was received on. If mroute_socket is not null when
  attending an MRT_INIT this means another mrouted is already running
  and -EADDRINUSE is returned. All resting commands (MRT_DONE,
  MRT_ADD_VIF, MRT_DEL_VIF, MRT_ADD_MFC, MRT_DEL_MFC and MRT_ASSERT)
  return -EACCES if they come from a socket different than
  mroute_socket.

  As routed multicast datagrams can be received/sent across either
  physical interfaces or tunnels, a common abstraction for both was
  devised: VIFs, Virtual InterFaces. mrouted passes vif structures to
  the kernel, indicating physical or tunnel interfaces to add to its
  routing tables, and multicast forwarding entries saying where to
  forward datagrams.

  VIFs are added with MRT_ADD_VIF and deleted with MRT_DEL_VIF. Both
  pass a struct vifctl to the kernel (defined in
  /usr/include/linux/mroute.h) with the following information:

  ______________________________________________________________________
  struct vifctl {
          vifi_t  vifc_vifi;              /* Index of VIF */
          unsigned char vifc_flags;       /* VIFF_ flags */
          unsigned char vifc_threshold;   /* ttl limit */
          unsigned int vifc_rate_limit;   /* Rate limiter values (NI) */
          struct in_addr vifc_lcl_addr;   /* Our address */
          struct in_addr vifc_rmt_addr;   /* IPIP tunnel addr */
  };
  ______________________________________________________________________



  With this information a vif_device structure is built:

  ______________________________________________________________________
  struct vif_device
  {
          struct device   *dev;                   /* Device we are using */
          struct route    *rt_cache;              /* Tunnel route cache */
          unsigned long   bytes_in,bytes_out;
          unsigned long   pkt_in,pkt_out;         /* Statistics */
          unsigned long   rate_limit;             /* Traffic shaping (NI) */
          unsigned char   threshold;              /* TTL threshold */
          unsigned short  flags;                  /* Control flags */
          unsigned long   local,remote;           /* Addresses(remote for tunnels)*/
  };
  ______________________________________________________________________



  Note the dev entry in the structure. The device structure is defined
  in /usr/include/linux/netdevice.h file. It is a big structure, but the
  field that interests us is:
  ______________________________________________________________________
    struct ip_mc_list*    ip_mc_list;   /* IP multicast filter chain    */
  ______________________________________________________________________



  The ip_mc_list structure -defined in /usr/include/linux/igmp.h- is as
  follows:

  ______________________________________________________________________
  struct ip_mc_list
  {
          struct device *interface;
          unsigned long multiaddr;
          struct ip_mc_list *next;
          struct timer_list timer;
          short tm_running;
          short reporter;
          int users;
  };
  ______________________________________________________________________



  So, the ip_mc_list member from the dev structure is a pointer to a
  linked list of ip_mc_list structures, each containing an entry for
  each multicast group the network interface is a member of. Here again
  we see membership is associated to interfaces.
  LINUX/net/ipv4/ip_input.c traverses this linked list to decide whether
  the received datagram is destined to any group the interface that
  received the datagram belongs to:

  ______________________________________________________________________
  #ifdef CONFIG_IP_MULTICAST
                  if(!(dev->flags&IFF_ALLMULTI) && brd==IS_MULTICAST
                     && iph->daddr!=IGMP_ALL_HOSTS
                     && !(dev->flags&IFF_LOOPBACK))
                  {
                          /*
                           *      Check it is for one of our groups
                           */
                          struct ip_mc_list *ip_mc=dev->ip_mc_list;
                          do
                          {
                                  if(ip_mc==NULL)
                                  {
                                          kfree_skb(skb, FREE_WRITE);
                                          return 0;
                                  }
                                  if(ip_mc->multiaddr==iph->daddr)
                                          break;
                                  ip_mc=ip_mc->next;
                          }
                          while(1);
                  }
  #endif
  ______________________________________________________________________



  The users field in the ip_mc_list structure is used to implement what
  was said in section ``IGMP version 1'': if a process joins a group and
  the interface is already a member of that group (ie, another process
  joined that same group in that same interface before) only the count
  of members (users) is incremented. No IGMP messages are sent, as you
  can see in the following code (taken from ip_mc_inc_group(), called by
  ip_mc_join_group(), both in LINUX/net/ipv4/igmp.c):

  ______________________________________________________________________
          for(i=dev->ip_mc_list;i!=NULL;i=i->next)
          {
                  if(i->multiaddr==addr)
                  {
                          i->users++;
                          return;
                  }
          }
  ______________________________________________________________________



  When dropping memberships, the counter is decremented and additional
  operations are performed only when the count reaches 0
  (ip_mc_dec_group()).

  MRT_ADD_MFC and MRT_DEL_MFC set or delete forwarding entries in the
  multicast routing tables. Both pass a struct mfcctl to the kernel
  (also defined in /usr/include/linux/mroute.h) with this information:

  ______________________________________________________________________
  struct mfcctl
  {
          struct in_addr mfcc_origin;             /* Origin of mcast      */
          struct in_addr mfcc_mcastgrp;           /* Group in question    */
          vifi_t  mfcc_parent;                    /* Where it arrived     */
          unsigned char mfcc_ttls[MAXVIFS];       /* Where it is going    */
  };
  ______________________________________________________________________



  With all this information in hand, ipmr_forward() "walks" across the
  VIFs, and if a matching is found it duplicates the datagram and calls
  ipmr_queue_xmit() which, in turn, uses the output device specified by
  the routing table and the proper destination address if the packet is
  to be sent across a tunnel (ie, the unicast destination address of the
  other end of the tunnel).

  Function ip_rt_event() (not directly related to output, but which is
  in ip_output.c too) receives events related to a network device, like
  the device going up. This function assures that then the device joins
  the ALL-HOSTS multicast group.

  IGMP functions are implemented in LINUX/net/ipv4/igmp.c. Important
  information for that functions appears in /usr/include/linux/igmp.h
  and /usr/include/linux/mroute.h. The IGMP entry in the /proc/net
  directory is created with ip_init() in LINUX/net/ipv4/ip_output.c.



  8.  Routing Policies and Forwarding Techniques.

  One trivial algorithm to make worldwide multicast traffic available
  everywhere could be to send it... everywhere, despite someone wants it
  or not. As this does not seem quite optimized, several routing
  algorithms and forwarding techniques have been implemented.

  DVMRP (Distance Vector Multicast Routing Protocol) is, perhaps, the
  one most multicast routers use now. It is a dense mode routing
  protocol, that is, it performs well in environments with high
  bandwidth and densely distributed members. However, in sparse mode
  scenarios, it suffers from scalability problems.

  Together with DVMRP we can find other dense mode routing protocols,
  such as MOSPF (Multicast Extensions to OSPF -Open Shortest Path
  First-) and PIM-DM (Protocol-Independent Multicast Dense Mode).

  To perform routing in sparse mode environments, we have PIM-SM
  (Protocol Independent Multicast Sparse Mode) and CBT (Core Based
  Trees).

  OSPF version 2 is explained in RFC 1583, and MOSPF in RFC 1584.  PIM-
  SM and CBT specifications can be found in RFC 2117 and 2201,
  respectively.

  All this routing protocols use some type of multicast forwarding, such
  as flooding, Reverse Path Broadcasting (RPB), Truncated Reverse Path
  Broadcasting (TRPB), Reverse Path Multicasting (RPM) or Shared Trees.

  It would be too long to explain them here and, as short descriptions
  for them are publicly available, I'll just recommend reading the
  draft-ietf-mboned-in.txt text. You can find it in the same places RFCs
  are available, and it explains in some detail all the above techniques
  and policies.



  9.  Multicast Transport Protocols.

  So far we have been talking about multicast transmissions using UDP.
  This is the usual practice, as it is impossible to do it with TCP.
  However, intense research is taking place since a couple of years in
  order to develop some new multicast transport protocols.

  Several of these protocols have been implemented and are being tested.
  A good lesson from them is that it seems no multicast transport
  protocol is general and good enough for all types of multicast
  applications.

  If transport protocols are complex and difficult to tune, imagine
  dealing with delays (in multimedia conferences), data loss, ordering,
  retransmissions, flow and congestion control, group management, etc,
  when the receiver is not one, but perhaps hundreds or thousands of
  sparse hosts.  Here scalability is an issue, and new techniches are
  implemented, such as not giving acknowledges for every packet received
  but, instead, send negative acknowledges (NACKs) for data not
  received. RFC 1458 gives the proposed requirements for multicast
  protocols.

  Giving descriptions of those multicast protocols is out of the scope
  of this section. Instead, I'll give you the names of some of them and
  point you to some sources of information: Real-Time Transport Protocol
  (RTP) is concerned with multi-partite multimedia conferences, Scalable
  Reliable Multicast (SRM) is used by the wb (the distributed White-
  Board tool, see section ``Multicast applications''), Uniform Reliable
  Group Communication Protocol (URGC) enforces reliable and ordered
  transactions based in a centralized control, Muse was developed as an
  application specific protocol: to multicast news articles over the
  MBone, the Multicast File Transfer Protocol (MFTP) is quite
  descriptive by itself and people "join" to file transmission
  (previously announced) much in the same way they would join a
  conference, Log-Based Receiver-reliable Multicast (LBRM) is a curious
  protocol that keeps track of all packets sent in a logging server that
  tells the sender whether it has to retransmit the data or can drop it
  safely as all receivers got it. One protocol with a funny name
  -especially for a multicast protocol- is STORM (STructure-Oriented
  Resilient Multicast). Lots and lots of multicast protocols can be
  found searching the Web, along with some interesting papers proposing
  new activities for multicast (for instance, www page distribution
  using multicast).

  A good page providing comparisons between reliable multicast protocols
  is

  <http://www.tascnets.com/mist/doc/mcpCompare.html>.

  A very good and up-to-date site, with lots of interesting links
  (Internet drafts, RFCs, papers, links to other sites) is:

  <http://research.ivv.nasa.gov/RMP/links.html>.

  <http://hill.lut.ac.uk/DS-Archive/MTP.html> is also a good source of
  information on the subject.

  Katia Obraczka's "Multicast Transport Protocols: A Survey and
  Taxonomy" article gives short descriptions for each protocol and tries
  to classify them according to different features. You can read it in
  the IEEE Communications magazine, January 1998, vol. 36, No. 1.



  10.  References.

  10.1.  RFCs.


  o  RFC 1112 "Host Extensions for IP Multicasting". Steve Deering.
     August 1989.

  o  RFC 2236 "Internet Group Management Protocol, version 2". W.
     Fenner.  November 1997.

  o  RFC 1458 "Requirements for Multicast Protocols". Braudes, R and
     Zabele, S.  May 1993.

  o  RFC 1469 "IP Multicast over Token-Ring Local Area Networks". T.
     Pusateri.  June 1993.

  o  RFC 1390 "Transmission of IP and ARP over FDDI Networks". D. Katz.
     January 1993.

  o  RFC 1583 "OSPF Version 2". John Moy. March 1994.

  o  RFC 1584 "Multicast Extensions to OSPF". John Moy. March 1994.

  o  RFC 1585 "MOSPF: Analysis and Experience". John Moy. March 1994.

  o  RFC 1812 "Requirements for IP version 4 Routers". Fred Baker,
     Editor. June 1995

  o  RFC 2117 "Protocol Independent Multicast-Sparse Mode (PIM-SM):
     Protocol Specification". D. Estrin, D. Farinacci, A. Helmy, D.
     Thaler; S. Deering, M. Handley, V. Jacobson, C. Liu, P. Sharma, and
     L. Wei. July 1997.

  o  RFC 2189 "Core Based Trees (CBT version 2) Multicast Routing".  A.
     Ballardie. September 1997.

  o  RFC 2201 "Core Based Trees (CBT) Multicast Routing Architecture".
     A. Ballardie. September 1997.



  10.2.  Internet Drafts.


  o  "Introduction to IP Multicast Routing". draft-ietf-mboned-intro-
     multicast- 03.txt. T. Maufer, C. Semeria. July 1997.

  o  "Administratively Scoped IP Multicast". draft-ietf-mboned-admin-ip-
     space-03.txt. D. Meyer. June 10, 1997.



  10.3.  Web pages.


  o  Linux Multicast Homepage.
     <http://www.cs.virginia.edu/~mke2e/multicast.html>

  o  Linux Multicast FAQ.  <http://andrew.triumf.ca/pub/linux/multicast-
     FAQ>

  o  Multicast and MBONE on Linux.
     <http://www.teksouth.com/linux/multicast/>

  o  Christian Daudt's MBONE-Linux Page.
     <http://www.microplex.com/~csd/linux/mbone.html>

  o  Reliable Multicast Links
     <http://research.ivv.nasa.gov/RMP/links.html>

  o  Multicast Transport Protocols  <http://hill.lut.ac.uk/DS-
     Archive/MTP.html>



  10.4.  Books.


  o  "TCP/IP Illustrated: Volume 1 The Protocols". Stevens, W. Richard.
     Addison Wesley Publishing Company, Reading MA, 1994

  o  "TCP/IP Illustrated: Volume 2, The Implementation". Wright, Gary
     and W. Richard Stevens. Addison Wesley Publishing Company, Reading
     MA, 1995

  o  "UNIX Network Programming Volume 1. Networking APIs: Sockets and
     XTI". Stevens, W. Richard. Second Edition, Prentice Hall, Inc.
     1998.

  o  "Internetworking with TCP/IP Volume 1 Principles, Protocols, and
     Architecture". Comer, Douglas E. Second Edition, Prentice Hall,
     Inc.  Englewood Cliffs, New Jersey, 1991



  11.  Copyright and Disclaimer.

  Copyright 1998 Juan-Mariano de Goyeneche.

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This document is distributed in the hope that it will be useful, but
  without any warranty; without even the implied warranty of
  merchantability or fitness for a particular purpose.  See the GNU
  General Public License for more details.

  You can obtain a copy of the GNU General Public License by writing to
  the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  02111-1307, USA.

  If you publish this document on a CD-ROM or in hardcopy form, a
  complimentary copy would be appreciated; mail me for my postal
  address. Also consider making a donation to the Linux Documentation
  Project or the Free Software Foundation to help support free
  documentation for GNU/Linux. Contact the Linux HOWTO coordinator, Tim
  Bynum linux-howto@sunsite.unc.edu, for more information.



  12.  Acknowledgements.

  This is the best opportunity I've ever had to thank so many people I
  feel grateful to. So, I'm afraid this is going to be a large
  section... It is, in any case, the most important one of this paper
  (for me, at least...).

  First, I want to thank Elena Apolinario Fernndez de Sousa (yes, Elena
  is the first name; the REST is THE surname ;-) ). I tried to reflect
  in this Howto all the knowledge I collected while working with her in
  connecting our Department to the MBone and debugging problems with
  locally generated CSCW software across multicast tunnels. She was of
  invaluable help in finding and correcting network problems,
  discovering and fixing kernel bugs that puzzled us for days, ... and
  keeping the sense of humor alive while problems appeared and appeared,
  but solutions didn't. She also read and corrected the drafts for this
  document and provided important ideas and suggestions. If this howto
  is here and is usefull for somebody, it will be, in many aspects,
  thanks to her. Thanks, Elena!

  There is something I have been lucky enough to find all my (still-not-
  too-long) live, but, despite being repetitive, has never stopped
  amazing me.  I'm talking about people that altruistically employ part
  of their time and/or resources to help other people learn new things;
  and, what is better, they enjoy doing it. This is not only (but also,
  too) explain things they already know, but lend their books, provide
  access to their sources and facilitate you the way to learn all things
  they know; sometimes, even more... I know quite a few of that people,
  and I'd like to thank them for all their help.

  Pablo Basterrechea was my "first source of documentation" while I was
  in my pre-Internet stage. I learned assembly and advanced structured
  programming entirely from his books (well, the latter also from his
  programs...).  Thanks for all, Pablo.

  In my first course at the University that "primary source of
  documentation" moved to Pepe Maas. He was teaching then Computer
  Programming there, and soon I became addict to his bookshelf. He lent
  me his books lots of times without asking for a minimum sign that
  could assure that I was going to return them back to him, not even my
  name! My first approach to TCP/IP was also by his hand: he lent me
  Comer's "Internetworking with TCP/IP, Volume 1" for the whole summer.
  He did not even know my name by then, but he lent me the book...  That
  book influenced me a lot, and TCP/IP has become one of my primary
  fields of interest since that summer.

  If there are two persons I must thank most, these are (in alphabetic
  order ;-) ), Jos Manuel and Paco Moya. Nobody I asked more things more
  times (C, C++, Linux, security, Web, OSs, signals & systems,
  electronics, ... anything!) and, despite my persistence, I always got
  throughly and friendly responses and help. If I'm using GNU/Linux now,
  this is, again, thanks to them. I feel particularly lucky with friends
  like them. THANKS.

  Iigo Mascaraque also helped (from him I got my first System
  Administration book) and encouraged me in my beginnings, but never
  stopped reminding me that, although this was a fascinating world and
  an important part of my career, I should not forget the other, less-
  interesting, parts. (I don't forget, I$!).

  As I am on the topic, I'd like to thank my parents, too. They always
  tried to make the best opportunities available for me. Many thanks for
  all.

  I also feel grateful to Joaqun Seoane, the first who trusted me enough
  to give me a root password in the time I was learning system
  administration by myself, and Santiago Pavn, the one who gave me my
  first opportunity here at DIT.

  W. Richard Stevens' books have been a real revelation for me (it's a
  pity they are so expensive...). If he ever reads this paper, I'd like
  to thank him for them, and encourage him to keep on writing. Anything
  that comes out of his hands will -undoubtedly- be good for all of us.

  Finally I'd like to thank Richard Stallman, Linus Torvalds, Alan Cox
  and all contributors to the Linux kernel and the free software in
  general, for giving us such a great OS.

  I'm sure I'm forgetting someone here... Sorry. I'm certain they know
  I'm grateful to them too, so if they tell me, everybody will know
  it... :-)



  Mutt-i, GnuPG and PGP Howto
  Andrs Seco AndresSH@ctv.es and J.Horacio M.G.
  homega@ciberia.es
  v1.2, February 2000

  This document briefly explains how to configure Mutt-i, PGP and GnuPG
  in its diferents versions (2.6.x, 5.x and GnuPG), noting the common
  problems that can occur while sending signed or encrypted mail to be
  read by mail clients not PGP/MIME compliants as defined in RFC2015 and
  in other operating systems. It also includes an example of procmail
  configuration to send the public keys automatically to received e-
  mails asking for it, as a key servers does.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Copyright and discharge of responsability

  3. Sending mail to and receiving mail from the internet

  4. Mutt configuration

  5. PGP and GnuPG

     5.1 PGP2
     5.2 PGP5
     5.3 GnuPG

  6. PGP and Mutt integration

     6.1 Optional configuration files
     6.2 General Configuration Variables
     6.3 PGP2 configuration variables
     6.4 PGP5 configuration variables
     6.5 GnuPG configuration variables
     6.6 Mixed configuration variables

  7. Interesting Macros for Mutt

     7.1 Signing on the message body without using PGP/MIME with PGP5
     7.2 Signing on the message body without using PGP/MIME with GnuPG
     7.3 Modifying the alias file and reloading it
     7.4 More macro examples

  8. Procmail notes and tips

     8.1 Configuring Procmail to send automatically your public keys
     8.2 Verify and decrypt automatically messages without PGP/MIME
     8.3 Change MIME type for messages with keys inside without PGP/MIME

  9. Interchanging signed/encrypted messages with different MUAs and platforms

  10. Programs and versions used

  11. More information



  ______________________________________________________________________



  1.  Introduction

  This document explains how to configure Mutt-i, PGP and GnuPG in its
  diferents versions (2.6.x, 5.x and GnuPG) to quickly start using a
  mail reader with encryption and digital signing capabilities.

  For this purpose, example configuration files will be included to help
  you starting with it. To obtain maximum performance and to use all the
  features of the programs that we will be using, it will be necesary to
  read its documentation and to reconfigure the example files.

  Also, some problems derived from not using RFC2015 about PGP/MIME by
  many mail user agents in Linux and other operating systems will be
  comented.

  An aditional procmail configuration example will be showed to enable
  our mail client to send a public key on request.

  This document has been translated from the Spanish original by Andrs
  Seco AndresSH@ctv.es, and revised and corrected by Jordi Mallach Prez
  jordi-sd@softhome.net and J.Horacio M.G. homega@ciberia.es. It was
  finished in October 1999. We would like to thanks Roland Rosenfeld
  roland@spinnaker.de, Christophe Pernod xtof.pernod@wanadoo.fr, Denis
  Alan Hainsworth denis@cs.brandeis.edu and Angel Carrasco
  acarrasco@jet.es for their corrections and suggestions.


  2.  Copyright and discharge of responsability

  This document is copyright (C) 1999 Andres Seco and J.Horacio M.G.,
  and it's free. You can distribute it under the terms of the GNU
  General Public License, which you can get at
  http://www.gnu.org/copyleft/gpl.html. You can get unofficial
  translated issues somewhere in the internet, as well as the Spanish
  translated copy at http://visar.csustan.edu/~carlos/gpl-es.html or
  Lucas http://www.lucas.org.

  Information and other contents in this document are the best of our
  knowledge. However, we may have make errors. So you should determine
  if you want to follow the instructions given in this document.

  Nobody is responsible for any damage in your computers and any other
  loss derived from the use of the information contained herein.

  THE AUTHORS AND MAINTAINERS ARE NOT RESPONSIBLE FOR ANY DAMAGE
  INCURRED DUE TO ACTIONS TAKEN BASED ON INFORMATION CONTAINED IN THIS
  DOCUMENT.

  Of course, we are open to all type of suggestions and corrections on
  the content of this document.


  3.  Sending mail to and receiving mail from the internet

  This document does not deal with exchanging mail messages between
  local machine and other nodes (inside a local area network or over the
  internet). This exchange should be carried out by messages transfer
  agents (MTAs) such as sendmail http://www.sendmail.org, qmail
  http://www.qmail.org, exim http://www.exim.org, smail
  ftp://ftp.planix.com/pub/Smail, etc.

  In this document it is presupposed that this method of send/receive
  messages outside of the local computer is already installed and
  working in a correct way. If you can send a message and read your mail
  with the mail command from the command line in your computer,

       $ mail -s <subject> <user@domain.net>
       write here the text, and finish with an alone point in the next line
       .


  you must have installed any type of MTA that is doing the messages
  transfer. In other way, you can get documentation about setting it up
  in the manual pages of smail:


       $ man smail


  or the MTA that you have, and fetchmail:


       $ man fetchmail


  or in other similar document that makes reference to those programs.


  4.  Mutt configuration

  Next file is a valid example to start using Mutt in a basic way,
  including paths for alias file, sent messages and postponed messages.
  You can further personalize it attending to the Mutt manual
  indications and /usr/doc/mutt/ or /usr/doc/mutt-i/.

  Simple example of ~/.muttrc:



       set folder=~/Mail
       set alias_file=.alias
       set postponed=.postponed
       set record=SendMessages
       set signature=.signature
       my_hdr From: Name Surname <Name@domain.com>
       source =.alias



  It is necesary that the directory ~/Mail exists, that is the one that
  appears as an "equal to" sign in the configuration file .muttrc (that
  is, =.alias is to Mutt as ~/Mail/.alias, and =.postponed is to Mutt
  ~/Mail/.postponed). Nevertheless it is possible to have these files in
  another directory provided we indicate the complete path in ~/.muttrc,
  and we have the necesary permissions to work in this directory.

  It is also necesary to personalize the my_hdr line with the name and
  electronic mail address you need. In the ~/Mail/.signature file you
  caninclude the signature that will appear in all the messages that are
  sent.

  This configuration file can end up being made very big, so it is
  common to separate some of its commands in different files. For the
  time being, the PGP or GnuPG configuration lines are easily
  detachable, and the keyboard macros that we will personalize. To do
  that, it will be necesary to add the following lines to the ~/.muttrc
  file:



  source = ~/Mail/.mutt.macros
  source = ~/Mail/.gnupgp.mutt



  and to use the ~/Mail/.mutt.macros and ~/Mail/.gnupgp.mutt files to
  put in them the keyboard macros and the PGP or GnuPG configuration
  that are commented forward.

  To get a more extensive and complete information over the use and
  configuration of Mutt, and about advanced features, see the Mutt
  manual http://www.mutt.org.


  5.  PGP and GnuPG

  To use anyone of the versions of PGP with Mutt-i, first it will be
  necesary to configure PGP properly in the way that the public keys
  file (public keys ring) and the private keys file (private keys ring)
  will exist. It is convenient to previously test PGP from the command
  line to assure that it signs and encrypt correctly.

  Remember that the PGP versions that exist for Unix are 2.6.3(i) and
  5.0(i), that we call PGP2 and PGP5 respectively forward. GnuPG is a
  new encrypt system, being developed in these days, in an advanced
  state of development, open source and free, in many aspects better
  than PGP (see GnuPG mini howto http://www.dewinter.com/gnupg_howto).

  We will also clarify that PGP, as being a program developed in the US,
  is restricted by certain exporting laws about programs that include
  cryptographic code; this is the reason for the existance of an
  international version to almost all binary versions, and it is noted
  with the "i" letter (pgp - pgpi).


  5.1.  PGP2

  PGP2 generates keys with the RSA http://www.rsa.com,algorithm and it
  uses IDEA http://www.ascom.ch as the encryption algorithm. Both are
  propietary algorithms and its use is restricted by its respectives
  patents.

  To run it correctly, you must have it installed, as well as having a
  directory called ~/.pgp, containing the configuration file pgp-i.conf
  and the private and public keys rings files, pubring.pgp and
  secring.pgp respectively.


  5.2.  PGP5

  The keys generated by PGP5 are DSS/DH (Digital Signature Standard /
  Diffie-Helman). PGP5 uses CAST, Triple-DES, and IDEA as encrypt
  algorithms. PGP5 can work with encrypted or signed data with RSA
  (PGP2), and use that keys to sign or encrypt (with the keys generated
  with PGP2, because PGP5 can not generate that type of keys). In the
  other hand, PGP2 can not use the DSS/DH keys from PGP5; this creates
  incompatibility problems, because many users continue using PGP2 with
  Unix/Linux.

  To run PGP5 correctly, in the ~/.pgp directory you will have the
  public and private key rings (pubring.pkr and secring.skr
  respectively), and the configuration file pgp.cfg.

  In the case that you have installed the both versions of PGP (PGP2
  installed and configured before PGP5), we will create the
  configuration file ~/.pgp/pgp.cfg of PGP5 as a simbolic link to the
  ~/.pgp/pgp-i.conf configuration file,


       ~/.pgp$ ln -s pgp-i.conf pgp.cfg


  adding the following lines at the end of the file ~/.pgp/pgp-i.conf:



       PubRing = "~/.pgp/pubring.pkr"
       SecRing = "~/.pgp/secring.skr"
       RandSeed = "~/.pgp/randseed.bin"



  The files with the keys rings of the different versions can cohexist
  without any problem in the same directory.


  5.3.  GnuPG

  GnuPG is a program with the same functions that the previous. The
  difference with PGP, GnuPG do not uses algorithms with restrictive
  patents. PGP is free for personal uses but not comercial jobs and its
  development is closed. GnuPG is free to be used in any job and it is
  open source, as our favorite operating system (also its implementation
  and development is made mainly in Linux).

  The keys generated by GnuPG are of the type DSA/ElGamal (Digital
  Signature Algorithm, also known as DSS). Is totaly compatible with
  PGP, except with the use of restricted patents algorithms RSA and
  IDEA. Anyway, it is posible to implement certain compatibility with
  that (see GnuPG mini howto http://www.dewinter.com/gnupg_howto to get
  it interacting with PGP2 and PGP5).


  6.  PGP and Mutt integration

  The operation to carry out in the outgoing messages (sign, encrypt or
  both) is chosen exactly before presing "y" to send the message, inside
  the option menu that is visible with the "p" option. Once you have
  choosen the operation to carry out, only the line PGP in the message
  header showed in the screen will change, but until you send the
  message with "y" you won't be asked to insert the pass phrase to
  activate the sign of the message or the public keys to use to encrypt
  in the case that no receptors were found in our public keys ring.

  NOTE: In the case that the pass phrase was mistyped when it was asked
  for, Mutt seems to be "hung", but that's not true, it is waiting for
  it to be retyped. To do this, push the <Enter> key and delete the pass
  phrase from memory with <Ctrl>F. Next we repeat the message sending
  with ("y") and retype the pass phrase.

  Through this procedure, Mutt will use PGP/MIME to send the message,
  and one more file will appear in the list of files to be sent with the
  sign (if we only select to sign) or it will encrypt the complete
  message (all its MIME parts) and it will only leave two MIME parts,
  the first with the PGP/MIME version and the second with the encrypted
  message (with all its MIME parts inside) and signed (if we selected to
  do it).

  Note: By some reasons, if the receptor mail user agent can not use
  MIME, we may need that the sign will be included inside the message
  body. See section about application/pgp with ``PGP5'' and with
  ``GnuPG''.

  Mutt will try to verify the sign or decrypt automatically the incoming
  messages that use PGP/MIME. See section ``Procmail notes and tips'',
  in which it is commented how to change the MIME type automatically to
  the incoming messages that do not set its MIME type correctly.


  6.1.  Optional configuration files

  In the next sections you can find modifications to the Mutt
  configuration file to use ``PGP2'', ``PGP5'', and ``GnuPG'' easily.

  To do that, a new configuration file that we called .gnupgp.mutt
  (that's our name, you can call it any other name setting the name of
  this file into the main configuration file ~/.muttrc).

  This can be done including the complete path (its location) of the
  configuration file .gnupgp.mutt, in a line at the end of the ~/.muttrc
  file. The directory in which we put this and other optional
  configuration files can be anywhere, if we have correct permissions
  (in a previous section we included it inside the ~/Mail/) directory,
  or any other inside our home directory, with any name:


       ~$ mkdir mutt.varios


  in which we copy (or create) the optional configuration file
  .gnupgp.mutt, and next we set the origin of this file in the .muttrc
  file with the source command, like the following:



       source ~/mutt.varios/.gnupgp.mutt



  Now Mutt will accept configuration variables in .gnupgp.mutt as if it
  were in .muttrc directly.

  This method is a good way to avoid having a very big, unsorted
  configuration file, and can be used to set any other group of
  configuration variables in other separate file. For example, as
  before, if we use vim as the default editor in Mutt, we can tell to
  .muttrc to use a different configuration file .vimrc that we use when
  using vim from the command line. First, copy ~/.vimrc to our optional
  configuration files directory ~/mutt.varios/ and set it with other
  name (ex.  vim.mutt):


       $ cd /home/user ~$ cp .vimrc mutt.varios/vim.mutt


  next change the configuration variables that we want to be different
  in vim as the Mutt editor, and finally modify .muttrc to reflect this
  change:



       set editor="/usr/bin/vim -u ~/mutt.varios/vim.mutt"



  With this last line we are setting Mutt to use an external editor,
  Vim, with the needed configuration options.


  6.2.  General Configuration Variables

  There are some variables that we will use globally with the three
  public key encrypt programs with Mutt. These variables are boolean,
  and can be set (activated) or unset (deactivated).

  In the configuration file (~/.muttrc, or ~/mutt.varios/.gnupgp.mutt,
  or whatever you use), the sign (#) is a comment and will be ignored.
  So, we will use it from here in advance to comment each variable:


     unset pgp_autosign
        # if this variables is set, Mutt will ask to sign all the
        # outbound messages. ``(1)''


     unset pgp_autoencrypt
        # if this variable is set, Mutt will ask to encrypt all the
        # outbound messages. ``(1)''


     set pgp_encryptself
        # save an encrypted copy of all sent messages that we want to
        encrypt
        # (need the general configuration variable set copy=yes).


     set pgp_replysign
        # when you answer a signed message, the response message will be
        # signed too.


     set pgp_replyencrypt
        # when you answer an encrypted message, the response message
        # will be encrypted too.


     set pgp_verify_sig=yes
        # Do you want to automatically verify incoming signed messages?
        # Of course!


     set pgp_timeout=<n>
        # delete pass phrase from the memory cache <n> seconds
        # after typing it.``(2)''


     set pgp_sign_as=
     # what key do you want to use to sign outgoing messages?
     # Note: it is posible to set it to the user id, but
     # this can be confuse if you have the same user id with different
     keys.


     set pgp_strict_enc
     # use "quoted-printable" when PGP requires it.


     unset pgp_long_ids
     # Do not use 64 bits key ids, use 32 bits key ids.


     set pgp_sign_micalg=<some>
     # message integrity check algorithm, where
     # <some> is something from the next:``(3)''


     o
     pgp-mda5
     to RSA keys

     o
     pgp-sha1
     to DSS (DSA) keys

     o
     pgp-rmd160

  In the three next sections the configuration variables to each of the
  PGP versions will be explained. The fourth section will explain how to
  modify the variables if you use more than one PGP version.

  (1) as Mutt requires to type the passphrase every time you want to
  sign or select the receipts if you want to encrypt, it may be
  unconvenient to set this variable. Possibly you may want to unset this
  variable. This is specially true encrypting messages, as you don't
  have all the public keys of the message receipts.

  (2) depending on the number of messages that we sign or decrypt, we
  would like to maintain the pass phrase in cache memory more or less
  time. This option avoid you from type the pass phrase each time you
  sign a new message or decrypt an incoming message. Warning:
  maintaining the pass phrase in cache memory is not secure, specially
  in network connected systems.

  (3) this is only necesary with the key that we use to sign. When the
  key is selected from the compose menu, Mutt will calculate the
  algoritm.


  6.3.  PGP2 configuration variables

  To use PGP2 with Mutt-i you need to add the following lines to the
  ~/mutt.varios/.gnupgp.mutt file:



       set pgp_default_version=pgp2
       set pgp_key_version=default
       set pgp_receive_version=default
       set pgp_send_version=default
       set pgp_sign_micalg=pgp-md5
       set pgp_v2=/usr/bin/pgp
       set pgp_v2_pubring=~/.pgp/pubring.pgp
       set pgp_v2_secring=~/.pgp/secring.pgp



  As you know, the ~/.pgp/pubring.pgp and secring.pgp files must exist.
  More information on PGP2 with the man pgp command.


  6.4.  PGP5 configuration variables

  To use PGP5 with Mutt-i you need to add the following lines to the
  ~/mutt.varios/.gnupgp.mutt file:

       set pgp_default_version=pgp5
       set pgp_key_version=default
       set pgp_receive_version=default
       set pgp_send_version=default
       set pgp_sign_micalg=pgp-sha1
       set pgp_v5=/usr/bin/pgp
       set pgp_v5_pubring=~/.pgp/pubring.pkr
       set pgp_v5_secring=~/.pgp/secring.skr



  As you know, the ~/.pgp/pubring.pkr and secring.pkr files must exist.
  More information on PGP 5 with the man pgp5 command.


  6.5.  GnuPG configuration variables

  To use GnuPG with Mutt-i you need to add the following lines to the
  ~/mutt.varios/.gnupgp.mutt file:



       set pgp_default_version=gpg
       set pgp_key_version=default
       set pgp_receive_version=default
       set pgp_send_version=default
       set pgp_sign_micalg=pgp-sha1
       set pgp_gpg=/usr/bin/gpg
       set pgp_gpg_pubring=~/.gnupg/pubring.gpg
       set pgp_gpg_secring=~/.gnupg/secring.gpg



  As you know, the ~/.gnupg/pubring.gpg and secring.gpg files must
  exist. More information on GnuPG with the man gpg.gnupg, man gpgm, and
  man gpg commands.


  6.6.  Mixed configuration variables

  If you want to use more than one PGP software you need to modify some
  of the variables that we have commented previously. Really, it is only
  to remove the redundant version variables.

  If, for example, you want to use GnuPG as the default signing tool,
  all menu commands in Mutt to use GnuPG/PGP would call to this program
  to the signing, decrypting, encrypting, verifying, etc... operations
  To do that you must set the configuration variable $set_pgp_default
  once, so:



       set pgp_default_version=gpg



  now, to use the all three programs, the ~/mutt.varios/.gnupgp.mutt
  file could be like this:



  set pgp_default_version=gpg     # default version to use

  set pgp_key_version=default     # default key to use
                                  # in this case, gnupg defines it

  set pgp_receive_version=default # default version to decrypt will be the default
  set pgp_send_version=default    # version defined in the first line (gpg)

  set pgp_gpg=/usr/bin/gpg        # where to find the GnuPG binary
  set pgp_gpg_pubring=~/.gnupg/pubring.gpg        # public key file to GnuPG
  set pgp_gpg_secring=~/.gnupg/secring.gpg        # secret key file to GnuPG

  set pgp_v2=/usr/bin/pgp         # where to find the PGP2 binary
  set pgp_v2_pubring=~/.pgp/pubring.pgp           # public key file to PGP2
  set pgp_v2_secring=~/.pgp/secring.pgp           # secret key file to PGP2

  set pgp_v5=/usr/bin/pgp         # where to find the PGP5 binary
  set pgp_v5_pubring=~/.pgp/pubring.pkr           # public key file to PGP5
  set pgp_v5_secring=~/.pgp/secring.skr           # secret key file to PGP5



  7.  Interesting Macros for Mutt

  Mutt is highly configurable and its working mode can be modified in a
  very flexible manner if the configuration variables inside .muttrc are
  well configured.

  Here you can see some macros that help you to generate signed messages
  avoiding the PGP/MIME standard, to send it to receipts that don't
  support this type of signed messages following the PGP/MIME standard,
  and to edit the alias file and reload it without exiting Mutt (this
  last macro is not related to PGP/GnuPG, it is presented only as an
  example to show the macro power in Mutt).

  It is possible to tell Mutt the key bindings you want to use with
  PGP/GnuPG. Even when some of this options are yet configured, we can
  change it or add others easily modifiying the configuration file.


  7.1.  Signing on the message body without using PGP/MIME with PGP5

  Before existing PGP/MIME, the signature in a message was included in
  the message body. This is a very common form of sending signed
  messages in many mail user agents.

  If we want to sign like this, we have two options, leave the MIME type
  of the message or modify it as application/pgp.

  To implement this two forms of signing in Mutt, we will add the
  following lines to the ~/mutt.varios/mutt.macros file.  Previously, we
  have to set this option file path in the .muttrc main configuration
  file (see ``Optional configuration files''):



       macro   compose \Cp    "F/usr/bin/pgps\ny"
       macro   compose S       "F/usr/bin/pgps\ny^T^Uapplication/pgp; format=text; x-action=sign\n"



  and now, pressing <Ctrl>p or S we can include the signature into the
  message part that has the cursor on it, just before send the message.
  7.2.  Signing on the message body without using PGP/MIME with GnuPG

  As in the previous case, but with GnuPG. The macros are:



       macro   compose \CP    "Fgpg --clearsign\ny"
       macro   compose \CS    "Fgpg --clearsign\ny^T^Uapplication/pgp; format=text; x-action=sign\n"



  7.3.  Modifying the alias file and reloading it

  With this macro included in ~/mutt.varios/macros.mutt you can edit
  with vi (changing the line you can use other editor) the alias file
  without exiting Mutt pressing <Alt>a.



       macro   index   \ea    "!vi ~/Mail/.alias\n:source =.alias\n"



  7.4.  More macro examples

  The next listing has been obtained from Roland Rosenfeld and it shows
  macros to change the default signing/encrypting software and to sign
  without PGP/MIME with GnuPG:



  # ~/Mail/.muttrc.macros
  # keyboard configuration file for Mutt-i
  # copied, modified and translated from the original:
  #
  ################################################################
  # The ultimative Key-Bindings for Mutt                         #
  #                                                              #
  # (c) 1997-1999 Roland Rosenfeld <roland@spinnaker.rhein.de>   #
  #                                                              #
  # $ Id: keybind,v 1.36 1999/02/20 19:36:28 roland Exp roland $ #
  ################################################################
  #
  # To use it, add the next line to ~/.muttrc:
  # source ~/Mail/.muttrc.macros
  #

  # Generic keybindings
  # (for all the Mutt menus, except the pager!)
  # With the next three we can change the encrypting default selected software:

  # <ESC>1 to use GnuPG
  macro   generic \e1     ":set pgp_default_version=gpg ?pgp_default_version\n"\
  "Switch to GNU-PG"

  # <ESC>2 to use PGP2
  macro   generic \e2     ":set pgp_default_version=pgp2 ?pgp_default_version\n"\
  "Switch to PGP 2.*"

  # <ESC>5 to use PGP5
  macro   generic \e5     ":set pgp_default_version=pgp5 ?pgp_default_version\n"\
  "Switch to PGP 5.*"

  #NOTE: Be careful with the last backspace at the end of the previous
  macros. If you write that line and the next in the same line, do not write
  it.

  # index, OpMain, MENU_MAIN
  # (Main menu)
  # The next macro only runs from the main menu (the one that appears when
  # you starts Mutt). The keys <CTRL>K permit us to extract the public keys
  # from a message if it has (this is known because it has the K letter in
  # the message line):

  macro  pager   \Ck     ":set pipe_decode pgp_key_version=pgp2\n\e\ek:set pgp_key_version=pgp5\n\e\ek:set pgp_key_version=gpg\n\e\ek:set pgp_key_version=default nopipe_decode\n"\ "Extract PGP keys to PGP2, PGP 5, and GnuPG keyrings"


  # pager, OpPager, MENU_PAGER
  # (Pager menu)
  # It permits the same operations that previous, with the same key combinations,
  # but in this case from the pager menu:

  macro   pager   \e1     ":set pgp_default_version=gpg ?pgp_default_version\n"\
  "switch to GNUPG"

  macro   pager   \e2     ":set pgp_default_version=pgp2 ?pgp_default_version\n"\
  "switch to PGP 2.*"

  macro   pager   \e5     ":set pgp_default_version=pgp5 ?pgp_default_version\n"\
  "switch to PGP 5.*"


  # compose, OpCompose+OpGerneric, MENU_COMPOSE
  # (Compose menu)
  # The next operations are used from the compose menu.
  # That is, after you have composed your message and you close it to send it,
  # just before pressing the "Y" key that allows us to send it to the MTA.
  # In this case, we create a menu that appears when you press "P".
  # The options in this menu are going to be bound to MENU_PGP. This are the
  # main use options (encryption and signing).

  bind    compose p       pgp-menu

  # As many programs can't use PGP/MIME (especially from M$), the <CTRL>P key
  # will allow us to sign "as in the old times" (Application/PGP):

  macro   compose \CP    "Fgpg --clearsign\ny"

  # The next, <CTRL>S will allow us to sign using PGP/MIME with the private key
  # that we have defined as default. This macro is not necesary, as we can
  # do the same from the "P" menu:
  macro   compose \CS    "Fgpg --clearsign\ny^T^Uapplication/pgp; format=text; x-action=sign\n"



  You can add more macros, and some other are yet configured as default
  in newer versions of Mutt. Some other options include:


  o  <CTRL>K (extract public keys from a message)

  o  <ESC>K (adjunt a public key to a message)

  o  <CTRL>F (when using the key phrase to sign or decrypt a message, it
     is still in memory. With this you can delete it from memory)

  o  etc...

  To see what other options are activated, you must go to the help menu
  (?)  from the menu where you were.


  8.  Procmail notes and tips

  8.1.  Configuring Procmail to send automatically your public keys

  As this is not the objetive of this Howto, we will comment that the
  securest way to get the public key from anybody is that he gives it to
  us directly by hand.

  As many times this is not an easy method (how long they are) the
  people can send the public key by electronic mail, or searching it in
  a key server, but none of those methods assure that the obtained key
  is really from whom it seems to be. If you use other communication
  media considered "secure" (searching the owner in the phone listing
  and asking him to read his key "fingerprint" to contrast with the
  fingerprint from the key we have obtained from the non-secure path).

  What we are going to see is a "tip" to put into the .procmailrc from
  the Procmail mail processor to get back automatically your publick key
  to the remitent when you get a message with a determined text in the
  Subject line:



       :0 h
       * ^Subject:[    ]+\/(|send)[   ]+key pub\>.*
       | mutt -s "Re: $MATCH" `formail -rtzxTo:` </clau/mykey.asc



  What it is said in the previous paragraph is: we have a copy in ASCII
  of our public key, in any directory (in this case the /clau directory)
  in a file named mykey.asc; when procmail gets a message that include
  "send key pub" in the Subject: line, send the file to the remitent.

  IMPORTANT: what you have between the brackets is an space and a tab.


  8.2.  Verify and decrypt automatically messages without PGP/MIME

  When you receive a signed message that uses PGP/MIME and you open it
  with your preferred MUA (Mutt, isn't it?), it recognizes the message
  as PGP/MIME and checks the signature if you have the remitent public
  key.  These messages are the ones that have the "S" in the first part
  of the message line in Mutt:



       36  S  05/09 Andres Seco Her ( 12K) Al fin



  while the encrypted messages have the "P":



       12  P  03/24 Andres Seco Her (6,3K) Re: FW: Re: Mutt - pgp/gnupg



  But if the message is signed and has the "application/pgp" MIME type,
  when you open it Mutt doesn't check its sign, and this sign is into
  the message body, as here:



       -----BEGIN PGP SIGNED MESSAGE-----

       Date: Tue, 25 May 1999 13:04:26 +0200
       From: La Corporacin <bill@reboot.com>
       Subject: Actualizacin S.O.
       To: Sufrido Usuario <pepe@casa.es>


       Sufrido usuario:

       le comunicamos que puede usted adquirir la ltima actualizacin del
       programa O.E. con la adquisicin de nuestro sistema operativo reboot99
       por el mdico precio de ... etc.


       -----BEGIN PGP SIGNATURE-----
       Version: 2.6.3ia
       Charset: noconv

       iKBGNpUBX0235VapRBUy1KklAQGl9wQA3SBMio0bbbajHAnyKMOlx3tcgNG7/UVC
       AbqXcUnyGGOo13Nbas95G34Fee3wsXIFo1obEfgiRzqPzZPLWoZdAnyTlZyTwCHe
       6ifVpLTuaXvcn9/76rXoI6u9svN2cqHCgHuNASKHaK9034uq81PSdW4QdGLgLoeB
       vnGmxE+tGg32=
       =Xidf
       -----END PGP SIGNATURE-----



  To verify it, you must save it and use the command line. But, it is
  possible to convert this MIME messages type with Procmail to allow
  Mutt to recognize it as PGP/MIME. You only need to add this to
  .procmailrc:



       :0
       * !^Content-Type: message/
       * !^Content-Type: multipart/
       * !^Content-Type: application/pgp
       {
           :0 fBw
           * ^-----BEGIN PGP MESSAGE-----
           * ^-----END PGP MESSAGE-----
           | formail \
               -i "Content-Type: application/pgp; format=text; x-action=encrypt"

           :0 fBw
           * ^-----BEGIN PGP SIGNED MESSAGE-----
           * ^-----BEGIN PGP SIGNATURE-----
           * ^-----END PGP SIGNATURE-----
           | formail \
               -i "Content-Type: application/pgp; format=text; x-action=sign"
       }



  As you can see, this is valid to signed messages and to encrypted
  messages with application/pgp.


  8.3.  Change MIME type for messages with keys inside without PGP/MIME

  When you receive a public key block from a non PGP/MIME compliant MUA,
  you must save the message body in your disk and then insert it into
  your public key ring, but, including this lines into your .procmailrc
  file, you can include it directly from mutt.



           :0 fBw
           * ^-----BEGIN PGP PUBLIC KEY BLOCK-----
           * ^-----END PGP PUBLIC KEY BLOCK-----
           | formail -i "Content-Type: application/pgp-keys; format=text;"



  Thanks to Denis Alan for this procmail note.


  9.  Interchanging signed/encrypted messages with different MUAs and
  platforms

  In the first days, the PGP sign was included inside the text to sign.
  Later, it was included the application/pgp MIME type to show that the
  next attach was the sign or the encrypted PGP message, and finally,
  with the PGP/MIME specification, it was possible to isolate the sign
  from the original affected, to not modify absolutelly and somebody
  that didn't have PGP could view the message as it was originally (only
  for signed messages), without any added text in the beginning or in
  the end from PGP.


  The actual situation is that only a few mail user agents (MUAs) are
  capable to integrate PGP to use the PGP/MIME standard, and it is
  necesary to send messages using the old time PGP sign when you know
  that the recipient doesn't recognize PGP/MIME.

  In Linux, the available mail user agents that are PGP/MIME compliant
  are mutt-i and pine. In Windows, only the Eudora mail client versions
  3.x and 4.x can use PGP/MIME. If you know any other mail user agent
  that supports it, tell us by mail, to include it here.


  10.  Programs and versions used

  To write this document we have used the next Mutt versions:


  o  Mutt 0.93i - you can not use GnuPG with this version.

  o  Mutt 0.95.3i - all PGP and GnuPG versions can be used.

  And the next PGP and GnuPG versions:


  o  PGPi 5.0

  o  GnuPG 0.4.3

  o  GnuPG 0.9.4


  11.  More information

  The original documentation from where this document has been obtained
  can be found in the man pages from "mutt", "pgp", "pgp5", "gnupg",
  "procmail", in the respectives directories in /usr/doc and in the
  world wide web sites:


  o  Mutt Official Home Page - http://www.mutt.org

  o  GnuPG Main Page - http://www.gnupg.org

  o  PGP International Page - http://www.pgpi.com

  o  Procmail Official Home Page - http://www.procmail.org

  The recommendations (request for comments, RFC) that are referenced in
  this document are:


  o  1847 - Security Multiparts for MIME: Multipart/signed and
     Multipart/encripted

  o  1848 - MIME Object Security Services

  o  1991 - PGP Message Exchange Formats

  o  2015 - MIME Security with Pretty Good Privacy (PGP)

  o  2440 - OpenPGP Message Format

  and can be found in /usr/doc/doc-rfc and in various sites in the world
  wide web, like http://metalab.unc.edu and http://nic.mil. You can get
  information from RFCs in RFC-INFO@ISI.EDU



  Linux Netstation  HOWTO
  Kris Buytaert, Kris.Buytaert@advalvas.be
  v1p00, 24 June, 2000

  This document tries to describe how to hook up a IBM Netstation to
  your local network using a Linux box as server.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 What's this document
     1.2 Latest versions
     1.3 Copyright
     1.4 Disclaimer

  2. Requirements

     2.1 Hardware
     2.2 Changes in the new versions.
     2.3 Software
        2.3.1 IBM Software.
        2.3.2 NFS Server.
        2.3.3 X Server.
        2.3.4 DHCP Server If you have multiple NC's, you may wish to distribute the IP Adresses by using a DHCP Server how to obtain and configure a DHCP server can be read in the

  3. Setting up the Server side

     3.1 AIX License
     3.2 Not using the AIX binaries.
     3.3 The Linux Part
        3.3.1 Setting up the nfs server
        3.3.2 Setting up the X server

  4. Configuring the Thin Client

     4.1 Older Versions
        4.1.1 Setting up TCP/IP
        4.1.2 Setting Up the Boot Parameters
        4.1.3 Setting Up the Monitor
        4.1.4 Further Configuration
     4.2 Newer Versions

  5. Misc Stuff

     5.1 Experiences
     5.2 Connecting through a network into the NC         The network station allows configuration access via telnet sessions on several ports. The ones I know are by default configured like this:
        5.2.1 Port 5978
        5.2.2 Port 5999 CONFIGD Use this port to do remote configuration for the NC by an telnet session (telnet NC-IPaddr 5999).
     5.3 Port 161/udp - SNMP Access
        5.3.1 Some general statement
        5.3.2 How to configure network management ?
        5.3.3 How to start managing?
        5.3.4 What do you manage?
     5.4 IBM Software Releases
     5.5 NetworkStation Manager
     5.6 Configuration file statements
     5.7 Printing
     5.8 PCMCIA Memory Cards
     5.9 Setup
     5.10 Images
     5.11 Time Sync
     5.12 Test Network
     5.13 BIOS
     5.14 Features

  6. Other Useful Documentation

     6.1 The IBM Website
     6.2 Mailing Lists
     6.3 Linux on the PPC40X

  7. FAQ

  8. Credits
  9. History



  ______________________________________________________________________

  1.  Introduction

  1.1.  What's this document

  Some unused piece of delicious hardware floating around on my desk.
  Screaming to be used. 40 MB of ram and a 403 PPC inside.

  So I decided to give it a try and connect it to my local Linux
  network.  I want to thank the company I work for because they gave me
  the chance to experiment with it.

  In this Howto we'll be dealing with an IBM Network Station model
  8361-100, other models may be featured in the future.

  We also have some additional info about the other 2 models. The
  8361-200 (Model 300)  and the 8362-A23 (Model 1000).  More info can be
  found at http://www.pc.ibm.com/networkstation/products/(choose your
  region here)


  I'm trying to describe how I setup the NC, there are probably lots of
  other ways to set up this machine, however this one works fine.  Any
  other remarks you might have from your own experience are welcome.
  (Free Hardware too ;-))

  This Howto is not trying to be the Bible on NC's and Linux, it's
  trying to get you started.  Contributions to this NC are most welcome.

  During the past year I have received numerous comments on the HOWTO
  and lots of help from other people (suprisingly a lot from inside
  IBM).   I've been busy therefore now is the first time that I'm trying
  to do a real update of the HOWTO.  Most people are asking me about
  Linux binaries to extract the AIX distribution file.  I have heard
  about an internal IBM project that is going on there but I have no
  accurate info on that matter yet.



  Things we still have to implement in this Howto

    How to export your homedir

    How to run applications

    How to run Java Applets

  Help is appreciated ;-)



  This howto does not describe the more recent units like the 2200 and
  the 2800 , maliny because I haven't had any experience with them yet
  (hint), and because they run Linux out of the box.



  1.2.  Latest versions

  Latest versions of this document can be found on the main website
  <http://www.ipng.be/howto/nchowto/>.


  1.3.  Copyright


  This HOWTO is copyrighted 1998-2000  Kris Buytaert

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact the Linux HOWTO coordinator, at
  linux-howto@metalab.unc.edu via email.


  1.4.  Disclaimer


  Use the information in this document at your own risk. I disavow any
  potential liability for the contents of this document. Use of the
  concepts, examples, and/or other content of this document is entirely
  at your own risk.

  All copyrights are owned by their owners, unless specifically noted
  otherwise.  Use of a term in this document should not be regarded as
  affecting the validity of any trademark or service mark.

  Naming of particular products or brands should not be seen as
  endorsements.

  You are strongly recommended to take a backup of your system before
  major installation and backups at regular intervals.


  2.  Requirements

  2.1.  Hardware


  An NC, connected to your local Network, most likely by a UTP
  connection , thus via a cross-cable or HUB connecting to an Server -
  in this case a Linux Box Basically the NC is Made to work with either
  AS/400 , Windows NT or AIX Servers. These are all expensive solutions,
  however working with thin clients doesnt have to cost that much.

  The model I have at my disposal is an IBM Network Station model
  8361-100, On the inside you can find an 403PPC chip, some S3 vga
  components, an PCMCIA slot, and normal 72 pin (parity ??) sims.  I
  found 8+32 Mb in my edition.

  Actually those 40Mb were major overkill.  In full operation modes
  with lot's of configuration panels a couple of telnet sessions and a X
  -query open only took up about 4Mb of ram.  )   So taking out the 32Mb
  showed absolutely no significant loss of speed.


  Well, after working more with the Netstation, specially with Navio I
  found out Navio uses  as much 27-30 Mb.  So those 40 Mb`s really
  aren`t that much hoverkill



  We proved it was no problem setting it up on a Linux only network.
  You'll need a server that can provide you both with about 25Mb of free
  diskspace for the software, and the capacities to run an X -query.
  In the setup overhere we used a 486DX50 with 8Mb as a fileserver and I
  switch between another  486DX266 (PS/2 85) with 32Mb, and my Multia
  with 48Mb as the X server Of course, the fatster machines the better.


  2.2.  Changes in the new versions.


  The new version comes with a new kernel and some changes in the
  applications.  The kernel  can now be downloaded as a compressed file
  which speeds up the process.

  Starting with the Network Station 3.0, you need a new Boot Monitor or
  boot PROM (aka Firmware) with the version 3.0.x or later. Your
  NetworkStation won't work with a older boot PROM (aka Firmware) and
  the new Network Station 3.x kernel.  If you buy a new NetworkStation,
  you always get one of the latest PROMs Older versions can be
  automatically updated from a boot server, from which the new boot PROM
  get's downloaded. (Could somebody please confirm me that these devices
  are the 110 versions with a PPC 403GC(X) in it)


  There also is a new layout of the Setup Utility where you define you
  basic network settings of your Network Station.



  2.3.  Software



  2.3.1.  IBM Software.


  NC kernel, fonts etc.

  In order to boot the NC you will need its Kernel and fonts.  About
  25Mb of files are needed on the server.  They can be found on an AIX
  4.X with the Netstation modules installed.  Or from the IBM Netstation
  Download Page



  2.3.2.  NFS Server.

  A working NFS server, like in every default Linux distribution.
  Approx 85Mb of diskspace has to be exported to the NC. (this includes
  a lot of documentation which you don't acutally need)



  2.3.3.  X Server.

  Any machine running XDM with enough memory, processor power will do.
  You don't need to have X configured on the machine itselve, it can be
  a monitor-less server. Basic X Windows install will provide you with
  the necessary deamons.



  There is the possibility to run a local X11 server which may avoid
  some network traffic.  The new version supports a standard X11  and a
  Motif X11 server.  Using  a configurable menu or by allowing telnet
  sessions you may access other computers/servers on the network.

  You may also be able to export applications to your Netstation display
  withouth actually using XDM . You might want to run an extra window
  manager.  This can be done by telnetting into the remote box and
  typing export DISPLAY=nc_ipnr:0 and afterwards running the application
  you want to use.



  Optional


  2.3.4.  If you have multiple NC's, you may wish to distribute the IP
  Adresses by using a DHCP Server how to obtain and configure a DHCP
  server can be read in the DHCP Mini Howto on sunsite DHCP Server



  3.  Setting up the Server side

  You found all the software you needed.  Now let's install them.

  3.1.  AIX License

  Before making the tarball on the aix machine, make sure you run
  /usr/netstation/bin/agree in order to make the kernel in a usable
  format.  Probably you will have to do the same thing with the tarball
  you get from the IBM website.  So finding the kernel separatly might
  be another solution.  Find a drive with about 25Mb of free diskspace,
  I use /usr/netstation/, and unpack the tarbal either from the IBM
  website or from an AIX machine.  There is no need in using the approx
  60Mb from /usr/netstation/doc on the disk if you don't have enough
  diskspace.

  3.2.  Not using the AIX binaries.

  This section has been contributed by Ken Collins and still have to be
  crosschecked by me.



    Download nsmsetup.exe from

     http://techsupport.services.ibm.com/nc/pcserver/index2.shtml

    I don't have NT set up, so I moved it over into a Win98 partition
     and tried executing nsmsetup.exe. It extracted properly, then
     choked on the install and removed all the install files. Then I
     tried opening it with WinZip, and that worked. I just extracted
     everything into my Windows partition under the directory
     C:/netstation.

    I then copied everything from C:/netstation/prodbase to my linux
     box. I set everything up in /usr/netstation, which I think was a
     mistake. I ran strings on parts of the package, and it looks like
     /netstation/prodbase is compiled into various programs. I'm going
     to try it again with installing in /netstation/prodbase

    Booting the kernel worked fine. I'm not sure how much of the rest
     of it worked, since I've never seen a working netstation. I'm
     getting a lot of error messages, but an X server comes up, and I'm
     able to telnet and start Mwm.  I was able to set up xdm and log
     into my Linux server, until I botched something. Now I get an IBM
     login screen that doesn't allow me to log in.


  3.3.  The Linux Part



  3.3.1.  Setting up the nfs server

  Edit your /etc/exports, add the line

  /usr/netstation   10.0.0.50(rw)


  Where 10.0.0.50 is the IP address you want to give to the NC.  Restart
  your nfs deamon.



  [root@velvet sdog]# ps auxf |grep rpc<p>
  sdog      4145  0.0  5.8   828   384  p1 S   03:55   0:00          \_ grep rpc
  root      3120  0.0  5.7   944   380  ?  S  Feb 27   0:00 rpc.mountd
  root      3129  0.0  1.5   880   100  ?  S  Feb 27   0:10 rpc.nfsd
  [root@velvet sdog]# kill -9 3120 3129 ; /usr/sbin/rpc.mountd ; /usr/sbin/rpc.nfsd



  or on a RedHat-like system easier



  [root@velvet init.d]# pwd
  /etc/rc.d/init.d
  [root@velvet init.d]# ./nfs restart
  Restarting NFS services: rpc.nfsd rpc.mountd done.
  [root@velvet init.d]#



  Your NC should now be able to mount the /usr/netsation by NFS.

  Bascially if you don`t need X-Windows this is as far as it gets.  You
  can easily telnet from your NC with nothing more installed.  However
  the beauty of this thing is it`s X capability.


  3.3.2.  Setting up the X server

  Next we have to set up the X server.  Basically I didn't need to set
  up anything, all of my machines that ran X-Windows were configured to
  accept connections.  I just started up the NC for the first time and
  it showed me all the machines that ran an XDM (cfr running an X
  -indirect).  So any machine that can run xdm can be used as X Server.
  Just make sure XDM is So any machine that can run xdm can be used as X
  Server.  Just make sure XDM is started.

  Everything on the server side should be setup now.  Lets try the NC
  side.



  4.  Configuring the Thin Client

  4.1.  Older Versions

  Unplug the network cable from the NC. Then boot it up.

  After checking its Memory, VGA etc, it will boot into the  IBM Network
  Station Setup Utility.  Basically you can manage everything from this
  menu system.  The main parts will be described here.

  4.1.1.  Setting up TCP/IP

  Section 5 (F5) : Your network setup should look something like this :



  IP Addressed From                                NVRAM
  Network Station IP Adress                        10.0.0.50
  First Boot Host IP Adress                        10.0.0.1
  Second Boot Host IP Adress                       10.0.0.11
  Third Boot Host IP Adress                        0.0.0.0
  Gateway IP Adress                                10.0.0.1
  Subnet Mask                                      255.255.255.0
  Broadcast IP Adress                              10.0.0.255
  Ethernet Standard                                Version 2



  Resembles my setup.  The NC itself has 10.0.0.50 While 10.0.0.1 is the
  NFS Server, 10.0.0.11 is a secondary NFS server, just in case.



  4.1.2.  Setting Up the Boot Parameters

  Section 6 (F6): Looks like this in my setup.



  Boot file                               kernel
  TFTP Boot Directory                     /usr/netstation/
  NFS Boot Directory                      /usr/netstation/
  Configuration File                      /usr/netstation/configs/standard.nsm
  Configuration Directory                 /usr/netstation/configs
  TFTP Order                              2
  NFS Order                               1
  MOP Order                               Disabled
  Local Order                             Disabled



  Where /usr/netstation is the directory export on 10.0.0.1


  4.1.3.  Setting Up the Monitor

  Section 7 (F7): You can choose the right resolution / refresh rate
  from a nice menu.  I have mine running on an old 14" VGA Screen
  running in 1024x768 @60Hz


  Basically that's all you need to install.

  Just plug in your Network cable again. And Reboot the NC.  After
  testing the  Video / DRAM, the NC will search the Host system and
  request the startup information, download the Kernel from the NFS and
  boot up.

  In some cases, the NC might download an updated Firmware from the
  host.



  When starting the graphical Console you should get a menu bar and a
  screen where you can select the X Hosts.  You are now in the CLE
  (Common Login Environment): it's a desktop from where you can start
  all sessions, either telnet or X .  It uses a local window manager
  which is a small window manager based on MWM.


  Your NC is  now setup. Congratulations !


  4.1.4.  Further Configuration

  Further configuration of the NC can be done e.g. be setting the
  colors, window sizes, default keymaps etc.  I'm not going to describe
  these in detail.  If you have troubles finding your way through the
  menu system. The IBM Network Station Runtime Environment for RS/6000
  User's Guide  which can be found in either .pdf or .ps at
  http://www.as400.ibm.com/networkstation/rs6000/ and will provide you
  with detailed information.



  4.2.  Newer Versions



  Newer versions of the Setup screen might look like this


    F2 = View Hardware Configuration

    F3 = Set Network Parameters

    F4 = Set Boot Parameters

    F5 = Set Configuration Parameters

    F6 = Set Monitor Parameters

    F7 = Set Language Parameters

    F10 = Set Verbose Diagnostic Message Disabled

  With F3 you get a panel to set the IP adresses of the Station, the
  boot server and the gateways as well as the subnet mask. With F4 you
  get a panel to set the boot kernel name and path and method (tftp or
  NFS). F5 brings you to a panel to set your configuration files and
  paths.



  5.  Misc Stuff



  5.1.  Experiences

  Using the NC as a plain terminal with multiple consoles.  The Built-in
  Motif extensions are a lot easier to use than the default setup ;-)
  Pressing the Pause/Break key will pop up the NC Menu at any time.


  5.2.  The network station allows configuration access via telnet ses
  sions on several ports. The ones I know are by default configured like
  this: Connecting through a network into the NC


    port 87,     service SerialSD,  (raw - serial daemon)

    port 5964,   service ParallelD, (raw - parallel daemon)

    port 5976,   service FILED,     (raw - file manager)

    port 5977,   service PREFD,     (raw - user preferences)

    port 5978,   service DIAG,      (raw - diagnostics)

    port 5979,   service CONFIGD,   (raw - configuration)

    port 5996,   service FILED,     (telnet - file manager)

    port 5997,   service PREFD,     (telnet - user preferences)

    port 5998,   service DIAG,      (telnet - diagnostics)

    port 5999,   service CONFIGD,   (telnet - configuration)

  You can easliy access the TCP ports by using a telnet session telnet
  NC-IPaddr port.  Be careful whether there is a password check enabled.
  The passphrase 'public' (without quotes) worked for me.

  5.2.1.  Port 5978

  Remote Logging It's the same as the messages console in your CLE.

  The format of each entry stretches over 2 lines.

  + DD:HH:MM:SS NSKxxxx: ...

  The first line covers date using the string that counts days, hours,
  minutes and seconds since boot time. The second line starts with an
  message identifier and the english plain text message after a
  separating colon, e.g.:


  [...]  + 25:17:31:43 NSK5641: unable to get current time from
  10.10.90.149 + 26:03:29:10 NSK4708: automatic powerdown to Suspend
  state after 40 minutes idle time + 26:03:49:10 NSK4708: automatic
  powerdown to Powerdown state after 60 minutes idle time + 26:07:22:38
  NSK8001: accepting DIAGD connection from 10.10.90.150 [...]



  5.2.2.  Use this port to do remote configuration for the NC by an tel
  net session (telnet NC-IPaddr 5999).  Port 5999 CONFIGD



  Here are some first commands and hints that seemed to me to be useful.
  You can apparently configure the NC remotely - online.  The
  configuration files use the same format, but do allow only an offline
  configuration.  As an alternative you may use the the setup function
  from the NC menu window.

  First of all you will need to login if you defined a password.
  Logging into the NC should show you a sequence like:

  *** NCD X Terminal Configuration *** Password: Invalid Password
  Password: public

  Being logged in, you can start configurating.  The configuration
  syntax is identical to /usr/netstation/configs/  the setup files.  Be
  aware that the behaviour within this command line interface is the
  same as using the gui, i.e. when you set (you may omit this keyword)
  some parameter you need to apply it.  Otherwise you will not see any
  effect.  There is a /usr/netstation/configs/configd.doc documentation
  file (- more precisely I would call it a reference script -) delivered
  with the netstation software.  (The links are configured for the
  RS/6000 installation.)


  You probably want to start straight into the matter.  So for learning
  it the hard way, I recommend some commands to start with:.


    help - shows you all possible commands with some really short
     explanation.  Some commands concerning locking should be used with
     care.

    get groups -  tells you which groups of configuration options are
     available.  These are the subjects in the setup browser of the NC
     menu.  You may think of them as section headers.  These group names
     are also the first token in the name of the configurable items
     within it.

    get boot ... slow in answering and shows you how the boot
     parameters of the NC are currently set.

    get tftp - again some basic boot parameters.  On my NC all are read
     only statistics

    get tcpip -  most useful for reading some TCP statistics, less
     useful for changing the IP setup, i.e. name servers, local DNS
     cache, ARP configuration.

    get file - again slow response.  A long list of parameters.  Most
     of them are again self explaining.  Be careful when changing the
     port parameters, since you might have problems to find them later
     on. Also some important boot parameters can be found here.

    get nfs - shows NFS configuration.  You most likely will only need
     it, if you use a memory PCMCIA card.  Otherwise you will have
     little to import or export.

    info - shows you NAME, ACCESS, and PROTECTION of a given or all
     variables.  Helpful, if you work with protect


  5.3.  Port 161/udp - SNMP Access


  You need some network management software to work with it.  Among the
  most famous commercial ones are (Tivoli) NetView and HP OpenView.
  They provide an easy-to-use user interfaces.  For linux you usually
  use cmu-snmp for command line and TCL/TK-based scotty for visual
  frontend.  (I like command line and that's what I am going to explain)



  5.3.1.  Some general statement

  The network station is completely configurable as already noted.  In
  allows examinations and alterations while being used.  The changes
  take effect either immediately, at session startup, or at boot time
  (see configd.doc).  All reads from the network station do not unveal
  the users display contents, and therefore the users' privacy is
  respected (if the application itself respects it as well).  Only the
  configuration may be retrieved, but not the window contents (at least
  not this way).

  5.3.2.  How to configure network management ?

  There is a file in ASN.1 called  snmpmib.txt  in the installation
  directory of the recent releases that allows your network management
  console resolve the mib symbols.  Otherwise you see dot-separated
  sequences of numbers only.  So best is to append this file (comments
  start with double minus "--") to the  mib.txt file of your SNMP
  software.  You can use snmpwalk, snmpget, snmpset to browse and modify
  the symbols you have retrieved.


  5.3.3.  How to start managing?

  Simplest way to start managing is to execute the commands

  snmpwalk NC-IPaddr public system snmpget NC-IPaddr public
  system.sysDescr.0 snmpset NC-IPaddr public system.sysContact.0
  s"MailTo:Kris.Buytaert@advalvas.b$ snmpwalk NC-IPaddr public system


  Sit back and think a little bit about it.  It is easy to work with.

  If you never had experience with SNMP commands you should read some
  SNMP documentation, take reference to configd.doc.  For more details
  refer to SNMP-HowTos.

  5.3.4.  What do you manage?



  It works nearly the same way as the telnet session to the
  configuration port, except that each command is transferred separately
  to the NC using UDP.  The advantage is that you do not have to work
  interactively, you work with UDP instead of TCP, which avoids retries
  to network stations that are down.  you must have the privileges for
  being successful - 'public' is a good community for reading...



  5.4.  IBM Software Releases

  IBM Has a special program for upgrades and documentation about the IBM
  Netststation releases.  It includes CDs and printed documentation

  It can  be ordered freely from IBM from the following url
  service.boulder.ibm.com/nc/pcserver/cd_order.shtml.



  (Thnx to Herman Bos (hermanb@xs4allnl) for this info)



  5.5.  NetworkStation Manager


  The NetworkStation Manager is a piece of software running on the boot
  server. It has a web interface and allows you to administrate all your
  NetworkStations from a single point.  You can define users and groups
  and provide a customised desktop for each of them.

  This is required if you don't use a windowmanager provided by Linux.
  It basically works by parsing and writing the configuration files.
  However, Linux is not a supported plattform of this software. So as a
  workaround you have to change the configuration files by hand or have
  an OS/390, an AIX or a Windows NT do the job for you. Please be aware,
  that for the personalisation in users and groups of your
  NetworkStation Desktop, you need the login daemon running on your boot
  server. This daemon is not available on Linux. So personalisation has
  to be done by naming the configuration files according to the user
  sitting at the Station.


  There is an actual Redbook about the Network Station,

  Network Station Manager V2R1

  , IBM PubNumber SG24-5844-00.  For the use with Linux it may be
  helpful for you to read IBM Network Station - RS/6000 Notebook, IBM
  PubNumber SG24-2016-01.  It explains the use with the RS/600 AIX
  System (an interesting flavour of Unix).

  5.6.  Configuration file statements

  Here are some configuration file statements that I found useful:

  set boot-prom-force-update = true With this setting, the Network
  Station will check for a new boot PROM (aka Firmware) and download it
  if available.

  set xserver-access-control-enabled = false Will allow all XClients to
  connect to the XServer running on that Network Station.



  5.7.  Printing

  There is a Redbook about printing, 'IBM Network Station Printing
  Guide', IBM PubNumber SG24-5212-00. Redbooks can be found at
  http://www.redbooks.ibm.com/



  5.8.  PCMCIA Memory Cards


  I have tested memory cards manufactured by Centennial (IBM gives you a
  more complete list of memory cards that work with the NC).  I
  recommend a minimum capacity of 20 MB.  If you have less you will have
  less functionality on the card.  Even 20MB is hardly sufficient.  Once
  a NC is installed with a memory card it can serve as peer booting host
  for other NCs in its network vicinity.

  You need to connect to the file manager port 5996.  Keep a eye on your
  access protections in your configuration files.  If you use the memory
  card with the network station for the first time, you need to format
  it.  You should mount it and export it.  once you have exported it
  (showmount -e NC-IPaddr) you can mount it to your boot server (mount
  NC-IPaddr:/local /mnt) and transfer  the setup directory( cp -r
  /usr/netstation/* /mnt).  Be careful not to forget some necessary
  files, particularily some X11 files are needed.  The full directory
  will not fit on the card.  Avoid erasing on the chip card, claiming
  the freed space isn't easy and wastes space.

  For more detailed information you have place an PRPQ at IBM (whatever
  this means), contact some IBM representative or contact

  ANeuper@antaris.de the author of this paraphrase.

  5.9.  Setup

  It seems the "user preferences" are stored in NVRAM, while "quick
  setup" and "setup parameters" are read from the boot server (in NFS,
  /netstation/prodbase/configs/standard.nsm).

  5.10.  Images

  The screensaver and background reads XBM images, Linux/BSD/*nix users
  can use XV to export to this format.  The screensaver image shown will
  be inverted.

  5.11.  Time Sync

  The units don't use NTP, instead inetd's built-in unix time (37/udp)
  support, I'd personally recommend using xinetd.

  5.12.  Test Network

  This is User Sevices Console version of ping.

  5.13.  BIOS

  Setting a global password will password-protect the "BIOS" setup.
  Note: I'm unaware of any recovery procedure for lost passwords.  If
  you can't access the User Services Console to change the password
  (unit is not booting up correctly), you're also screwed.

  5.14.  Features

  Most units (8361-110 for sure) features not only support for X (as an
  Xterminal) and NC (Windows NT Terminal Server) usage, it's built-in
  console also has support for serial (locally attached and dial-up
  using PPP/SLIP, also telnet connections.

  6.  Other Useful Documentation


  6.1.  The IBM Website

  The IBM Website lots of documentation on the NC, most of it can be
  found in PDF  format.

  The latest updates can be found at
  http://www.as4000.ibm.com/networkstation/rs6000/ including

    IBM Network Station Runtime Environment for RS/6000 Users's Guide

    IBM Network Station Runtime Environment for RS/6000 System
     Administrator's Guide

    IBM Network Station Runtime Environment for RS/6000 System Navio NC
     Navigator Browser Guide

     Or from http://www.ibm.com/nc/pubs/

    IBM Network Station Setup and Use

  6.2.  Mailing Lists

  There is a mailing list available called The NetVista thin Client
  Linux Forum it can be found on
  http://techconnect.ease.lsoft.com/archives/netvista_thin_client_forum/network.htm
  , the archives can also be found there.


  6.3.  Linux on the PPC40X

  There are a lot of new resources online about Linux on the PPC40X.
  Here is a small list of them.  http://www.lcse.umn.edu/~grant/Linux/
  it seems like some of the Netstations contain a 403GC[X] on this page
  you can find a Linux kernel for that PPC.  If anybody succeeds please
  contacte me !  http://www.mvista.com/products/405gp_status/main.html
  Montavista Software is doing a nice job in porting the Linux kernel to
  the IBM PowerPC 405GP based Walnut System:

  7.  FAQ



    Q: Can you run a Linux kernel on the Netstation A:  Depending on
     the type you have you can get linux running.  Both 2200 and 2800
     models are running Linux out of the box.  I'm waiting for feedback
     on the 110, 300 and 1000 types.  And the 100 is not running linux
     at the moment, it has no MMU so therefore the Linux port is a bit
     more difficult.

    Q: Are there any mailing lists about the Netstation A: Take a look
     to the Other Usefull Documentation part in this howto ..

    Q: I have a 2200 or a 2800 and the instructions in your HOWTO don't
     work QM  The 2200 and 2800 are not based on the PPC architecture
     anymore , they have a more frequently used chipset which is
     supported by Linux and these things run Linux natively.

    Q: I have no AIX available how can I unpack the kernel A: There is
     a new section in the howto that describes how to use another way to
     do this.

    Q:  I get an Invalid Kernel Type while trying to boot the NC.  A:
     You didn't run the agree script on your aix machine.

    Q: I log in at the remote host and my keyboard settings are
     incorrect.  A: I use no  /.Xmodap when working on the NC.  This
     keeps my keyboardsettings perfect.



  8.  Credits



  Lots of thanks must go out to Wouter Cloetens,
  wcloeten@raleigh.ibm.com for getting me started , additional info from
  Boas Betzler, Andreas Neuper and Herman Bos.   Thanks for updates in
  v1.00 must go to Matt Peterson and Ken Collins for the setup using a
  Win98 machine in stead of an AIX box.

  and to Bart Geens ,Bart.Geens@advalvas.be for rereading this howto and
  findin uot lost of splelling errosr


  Also thanks to all the different people that wrote me with hints and
  help although I might have forgotten to include some of their
  comments,  if you think your part is missing, please mail me ;-)



  9.  History


    v0.98p14 19980222   First Release

    v0.99p15 19990501   Some fixes


    v0.99p16 19991004   Major updates including feedback from Boas
     Betzler,  Andreas Neuper and Herman Bos

    v0.99p18 19991226   Updates after feedback from readers.

    v1.00    20000624   Updates but now also a sollution without AIX,
     this might be a good time for 1.0 ;-) It Also seems like the howto
     is not listed under mini anymore



  Linux NCD mini-HOWTO
  Bart Geens & Kris Buytaert, bart.geens@advalvas.be
  v0.99p15, Sept 1999

  This document tries to describe how to hook up a NCD ThinSTAR to your
  local network using a Linux box as server.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Requirements

     2.1 Hardware
     2.2 Software
        2.2.1 X Server.
        2.2.2 DHCP Server (optionally) If you have multiple NCD's, you may wish to distribute the IP Adresses by using a DHCP Server how to obtain and configure a DHCP server can be read in the

  3. Other Usefull Documentation

  4. Setting up the Serverside

     4.1 Setting up the X server

  5. Configuring the Thin Client

  6. Credits

  7. History



  ______________________________________________________________________

  1.  Introduction

  We could play around with a NCD ThinSTAR for a while.  Although MS NT
  Terminal and Citrix Meta- & Winframe are the only supported OS systems
  ("Powered by Windows CE" is on the cover ...), it works fine with
  Linux too.  This is how !

  The machine we had, was a NCD ThinkSTAR 200.  It is powered by a
  100MHz MIPS 4300 processor and had the default 8MB of RAM memory.  NCD
  has a also other products in the ThinSTAR family.  These might also
  work, but we haven't the opportunity to check those.  If you have any
  of those, feel free to add any comments. Or send them to us to
  experiment.


  This HOWTO will present one way to setup your ThinSTAR to be used in a
  Linux environment.  This isn't much of a big deal, but for what it's
  worth I'll descripe the needed steps here.

  This MINI Howto is not trying to be the Bible on NC's and Linux, its
  trying to be something for you to get started from nowhere.
  Contributions to this NC are welcome.  In fact this HOWTO is fully
  based on the NC-HOWTO by Kris Buytaert in which he describes how to
  setup the IBM Network Station.


  2.  Requirements



  2.1.  Hardware


  An NC, connected to your local Network, most likely by UTP, thus by a
  cross-cable or HUB connecting to an X Server. Herafter called the
  Linux Box. The NC can be used as an X-terminal, and in this way can be
  used to replace an Windows Terminal server or simular application.

  The NCD-ThinSTAR 200 is in way related to the IBM Network Station
  model 8361-100.  Both machines share a lot of components such as some
  S3 vga components, IO , network and and normal 72pins (parity ??)
  sims.  The motherboard is also from the same manufacturer.

  The NCD worked quit fine on my network at home, but we had some
  trouble to get it running again on an other location.  After a while
  we found out that the problem where the monitors.  The NC does not
  seem to support all older monitors, even at low resolutions and
  refresh rates.

  The Linux box does not require any special tricks: any X-server with
  xdm, gdm or something similar will do.  We will use xdm.

  2.2.  Software

  2.2.1.  X Server.

  Any machine running XDM with enough memory, processor power will do.
  You don't need to have X configured on the machine itselve, it can
  perfectly be a headless server. Basic X Windows install will provide
  you with the necessary deamons.


  2.2.2.  If you have multiple NCD's, you may wish to distribute the IP
  Adresses by using a DHCP Server how to obtain and configure a DHCP
  server can be read in the DHCP Mini Howto on sunsite DHCP Server
  (optionally)



  3.  Other Usefull Documentation

  Mainly the NCD website at  http://www.ncd.com.



  4.  Setting up the Serverside


  4.1.  Setting up the X server

  Next we have to set up the X server.  Basically I didn`t need to set
  up anything, all of my machines that ran X-Windows were configured to
  accept connections.  I just started up the NC for the first time and
  it showed me all the machines that ran an XDM (cfr running an X
  -indirect).  So any machine that can run xdm can be used as X Server.
  Just make sure XDM is So any machine that can run xdm can be used as X
  Server.  Just make sure XDM is started.


  Everything on the server side should be setup now.  Lets try the NC
  side.



  5.  Configuring the Thin Client

  Unplug the network cable from the NC. Then boot it up.

  It will boot and display that fine NCD ThinSTAR logo but alse the ugly
  Windows CE stuff :-)).  After the NC has booted, it displays the NCD
  ThinSTAR setup wizard (if you already have been using the NC, it will
  not show the wizard, but by pressing ALT-CTRL-F2 you can still
  reconfigure the system).  The first selection is the most important
  one: Client selection.  Be sure to change this to NCD ThinSTAR X
  Client.

  Then you have to setup the NC's IP address.  We did pick a static IP.
  You can also specify a DNS server, but this is not needed.  To finish
  pick your monitors resolution.  The NC should be restarted now.
  (Windows CE Remember ;-) )

  After a while you will see the NCD ThinSTAR Connection Manager on your
  screen.  First you can continue configuring your system by pressing
  ALT+CTRL+F2.  Things to be configured are: keyboard and mouse.  This
  panel also allows you to reconfigure other parts of your NC.  Press OK
  to commit changes, and you will return to the NCD ThinSTAR Connection
  Manager.

  The NCD ThinSTAR Connection Manager gives 2 options: connections and
  configure.  So lets configure the system first.  Pick 'X terminal'
  from the menu and press the edit or add button.

  The NCD ThinSTAR X Connection Properties allows you to configure the
  name, connection options, host and color.  We prefer the these
  settings: * Connection Option : XDM Query * Host: specify when
  connection is made * (other settings are not important) You could also
  specify a fixed X server but the broadcast option is easier.

  Basicly your done now and you should be able to start a session by
  double-clicking the connection you just edited or added.  You should
  get a list with all the X servers you are using.


  6.  Credits



  A lot of thanks go to Kris Buytaert ,kris.buytaert@advalvas.be for
  rereading this howto and findin uot lost of splelling errosr.



  7.  History


  19990812   first draft 19990829   typos fixed 19990901   release



  Linux Networking-HOWTO (Previously the Net-3 Howto)
  Current Author: {Poet} poet@linuxports.com
  v1.5, August 1999

  Original Authors: Terry Dawson (main author), VK2KTJ; Alessandro
  Rubini (maintainer)

  The Linux Operating System boasts kernel based networking support
  written almost entirely from scratch. The performance of the tcp/ip
  implementation in recent kernels makes it a worthy alternative to even
  the best of its peers.  This document aims to describe how to install
  and configure the Linux networking software and associated tools.


  ______________________________________________________________________

  Table of Contents



  1. Introduction.

  2. Document History

     2.1 Feedback

  3. How to use this HOWTO.

     3.1 Conventions used in this document

  4. General Information about Linux Networking.

     4.1 A brief history of Linux Networking Kernel Development.
     4.2 Linux Networking Resources.
     4.3 Where to get some non-linux-specific network information.

  5. Generic Network Configuration Information.

     5.1 What do I need to start ?
        5.1.1 Current Kernel source(Optional).
        5.1.2 Current Network tools.
        5.1.3 Network Application Programs.
        5.1.4 IP Addresses, an Explanation.
     5.2 Where should I put the configuration commands ?
     5.3 Creating your network interfaces.
     5.4 Configuring a network interface.
     5.5 Configuring your Name Resolver.
        5.5.1 What's in a name ?
        5.5.2 What information you will need.
        5.5.3 /etc/resolv.conf
        5.5.4 /etc/host.conf
        5.5.5 /etc/hosts
        5.5.6 Running a name server
     5.6 Configuring your loopback interface.
     5.7 Routing.
        5.7.1 So what does the
     5.8 Configuring your network servers and services.
        5.8.1 (TT
           5.8.1.1 An example
        5.8.2 (TT
           5.8.2.1 An example
     5.9 Other miscellaneous network related configuration files.
        5.9.1 (TT
        5.9.2 (TT
     5.10 Network Security and access control.
        5.10.1 /etc/ftpusers
        5.10.2 /etc/securetty
        5.10.3 The
           5.10.3.1 /etc/hosts.allow
           5.10.3.2 /etc/hosts.deny
        5.10.4 /etc/hosts.equiv
        5.10.5 Configure your
        5.10.6 Network Firewalling.
        5.10.7 Other suggestions.

  6. IP- and Ethernet-Related Information

     6.1 Ethernet
     6.2 EQL - multiple line traffic equaliser
     6.3 IP Accounting (for Linux-2.0)
     6.4 IP Accounting (for Linux-2.2)
     6.5 IP Aliasing
     6.6 IP Firewall (for Linux-2.0)
     6.7 IP Firewall (for Linux-2.2)
     6.8 IPIP Encapsulation
        6.8.1 A tunneled network configuration.
        6.8.2 A tunneled host configuration.
     6.9 IP Masquerade
     6.10 IP Transparent Proxy
     6.11 IPv6
     6.12 Mobile IP
     6.13 Multicast
     6.14 NAT - Network Address Translation
     6.15 Traffic Shaper - Changing allowed bandwidth
     6.16 Routing in Linux-2.2

  7. Using common PC hardware

     7.1 ISDN
     7.2 PLIP for Linux-2.0
     7.3 PLIP for Linux-2.2
     7.4 PPP
        7.4.1 Maintaining a permanent connection to the net with
     7.5 SLIP client
        7.5.1 dip
        7.5.2 slattach
        7.5.3 When do I use which ?
        7.5.4 Static SLIP server with a dialup line and DIP.
        7.5.5 Dynamic SLIP server with a dialup line and DIP.
        7.5.6 Using DIP.
        7.5.7 Permanent SLIP connection using a leased line and slattach.
     7.6 SLIP server.
        7.6.1 Slip Server using
           7.6.1.1 Where to get
           7.6.1.2 Configuring
           7.6.1.3 Configuring
           7.6.1.4 Configuring the
           7.6.1.5 Configuring the
           7.6.1.6 Configuring the
        7.6.2 Slip Server using
           7.6.2.1 Configuring
        7.6.3 SLIP server using the

  8. Other Network Technologies

     8.1 ARCNet
     8.2 Appletalk (
        8.2.1 Configuring the Appletalk software.
        8.2.2 Exporting a Linux filesystems via Appletalk.
        8.2.3 Sharing your Linux printer across Appletalk.
        8.2.4 Starting the appletalk software.
        8.2.5 Testing the appletalk software.
        8.2.6 Caveats of the appletalk software.
        8.2.7 More information
     8.3 ATM
     8.4 AX25 (
     8.5 DECNet
     8.6 FDDI
     8.7 Frame Relay
     8.8 IPX (
     8.9 NetRom (
     8.10 Rose protocol (
     8.11 SAMBA - `NetBEUI', `NetBios', `CIFS' support.
     8.12 STRIP support (Starmode Radio IP)
     8.13 Token Ring
     8.14 X.25
     8.15 WaveLan Card

  9. Cables and Cabling

     9.1 Serial NULL Modem cable
     9.2 Parallel port cable (PLIP cable)
     9.3 10base2 (thin coax) Ethernet Cabling
     9.4 Twisted Pair Ethernet Cable

  10. Glossary of Terms used in this document.

  11. Linux for an ISP ?

  12. Acknowledgements

  13. Copyright.



  ______________________________________________________________________



  1.  Introduction.

  This is the first release since LinuxPorts has become the author of
  this document. First let me say that we hope that over the next few
  months you will find this document to be of use and that we are able
  to provide accurate and timely information in regards to networking
  issues with Linux.

  This document like the other howto's that we manage is going to become
  very different, this document will shortly become the Networking-HOWTO
  not just the Net-3(4) Howto. We will cover such items as PPP, VPN, and
  others...


  2.  Document History

  The original NET-FAQ was written by Matt Welsh and Terry Dawson to
  answer frequently asked questions about networking for Linux at a time
  before the Linux Documentation Project had formally started. It
  covered the very early development versions of the Linux Networking
  Kernel. The NET-2-HOWTO superceded the NET-FAQ and was one of the
  original LDP HOWTO documents, it covered what was called version 2 and
  later version 3 of the Linux kernel Networking software. This document
  in turn supercedes it and relates only to version 4 of the Linux
  Networking Kernel or more specifically kernel releases 2.x and 2.2.x.

  Previous versions of this document became quite large because of the
  enormous amount of material that fell within its scope. To help reduce
  this problem a number of HOWTO's dealing with specific networking
  topics have been produced. This document will provide pointers to them
  where relevant and cover those areas not yet covered by other
  documents.

  2.1.  Feedback

  We are always interested in feedback. Please contact us at:
  poet@linuxports.com.

  Again, if you find anything erroneous or anything you would like to
  see added, please contact us.

  3.  How to use this HOWTO.

  This document is organized top-down. The first sections include
  informative material and can be skipped if you are not interested;
  what follows is a generic discussion of networking issues, and you
  must ensure you understand this before proceeding to more specific
  parts. The rest, ``technology specific'' information is grouped in
  three main sections: Ethernet and IP-related information, technologies
  pertaining to widespread PC hardware and seldom-used technologies.

  The suggested path through the document is thus the following:



     Read the generic sections
        These sections apply to every, or nearly every, technology
        described later and so are very important for you to understand.
        On the other hand, I expect many of the readers to be already
        confident with this material.


     Consider your network
        You should know how your network is, or will be, designed and
        exactly what hardware and technology types you will be
        implementing.


     Read the ``Ethernet and IP'' section if you are directly connected
        a LAN or the Internet" This section describes basic Ethernet
        configuration and the various features that Linux offers for IP
        networks, like firewalling, advanced routing and so on.


     Read the next section if you are interested in low-cost local
        networks or dial-up connections" The section describes PLIP,
        PPP, SLIP and ISDN, the widespread technologies used on personal
        workstations.


     Read the technology specific sections related to your
        requirements" If your needs differ from IP and/or common
        hardware, the final section covers details specific to non-IP
        protocols and peculiar communication hardware.


     Do the configuration work
        You should actually try to configure your network and take
        careful note of any problems you have.


     Look for further help if needed
        If you experience problems that this document does not help you
        to resolve then read the section related to where to get help or
        where to report bugs.


     Have fun!
        Networking is fun, enjoy it.


  3.1.  Conventions used in this document

  No special convention is used here, but you must be warned about the
  way commands are shown. Following the classic Unix documentation, any
  command you should type to your shell is prefixed by a prompt. This
  howto shows "user%" as the prompt for commands that do not require
  superuser privileges, and "root#" as the prompt for commands that need
  to run as root. I chose to use "root#" instead of a plain "#" to
  prevent confusion with snapshots from shell scripts, where the hash
  mark is used to define comment lines.

  When ``Kernel Compile Options'' are shown, they are represented in the
  format used by menuconfig. They should be understandable even if you
  (like me) are not used to menuconfig. If you are in doubt about the
  options' nesting, running the program once can't but help.

  Note that any link to other HOWTO's is local to help you browsing your
  local copy of the LDP documents, in case you are using the html
  version of this document. If you don't have a complete set of
  documents, every HOWTO can be retrieved from metalab.unc.edu
  (directory /pub/Linux/HOWTO) and its countless mirrors.

  4.  General Information about Linux Networking.


  4.1.  A brief history of Linux Networking Kernel Development.

  Developing a brand new kernel implementation of the tcp/ip protocol
  stack that would perform as well as existing implementations was not
  an easy task.  The decision not to port one of the existing
  implementations was made at a time when there was some uncertainty as
  to whether the existing implementations may become encumbered by
  restrictive copyrights because of the court case put by U.S.L. and
  when there was a lot of fresh enthusiasm for doing it differently and
  perhaps even better than had already been done.

  The original volunteer to lead development of the kernel network code
  was Ross Biro <biro@yggdrasil.com>. Ross produced a simple and
  incomplete but mostly usable implementation set of routines that were
  complemented by an ethernet driver for the WD-8003 network interface
  card.  This was enough to get many people testing and experimenting
  with the software and some people even managed to connect machines in
  this configuration to live internet connections. The pressure within
  the Linux community driving development for networking support was
  building and eventually the cost of a combination of some unfair
  pressure applied to Ross and his own personal commitments outweighed
  the benefit he was deriving and he stepped down as lead developer.
  Ross's efforts in getting the project started and accepting the
  responsibility for actually producing something useful in such
  controversial circumstances were what catalyzed all future work and
  were therefore an essential component of the success of the current
  product.

  Orest Zborowski <obz@Kodak.COM> produced the original BSD socket
  programming interface for the Linux kernel. This was a big step
  forward as it allowed many of the existing network applications to be
  ported to linux without serious modification.

  Somewhere about this time Laurence Culhane <loz@holmes.demon.co.uk>
  developed the first drivers for Linux to support the SLIP protocol.
  These enabled many people who did not have access to Ethernet
  networking to experiment with the new networking software. Again, some
  people took this driver and pressed it into service to connect them to
  the Internet. This gave many more people a taste of the possibilities
  that could be realized if Linux had full networking support and grew
  the number of users actively using and experimenting with the
  networking software that existed.

  One of the people that had also been actively working on the task of
  building networking support was Fred van Kempen
  <waltje@uwalt.nl.mugnet.org>.  After a period of some uncertainty
  following Ross's resignation from the lead developer position Fred
  offered his time and effort and accepted the role essentially
  unopposed. Fred had some ambitious plans for the direction that he
  wanted to take the Linux networking software and he set about
  progressing in those directions. Fred produced a series of networking
  code called the `NET-2' kernel code (the `NET' code being Ross's)
  which many people were able to use pretty much usefully. Fred formally
  put a number of innovations on the development agenda, such as the
  dynamic device interface, Amateur Radio AX.25 protocol support and a
  more modularly designed networking implementation.  Fred's NET-2 code
  was used by a fairly large number of enthusiasts, the number
  increasing all the time as word spread that the software was working.
  The networking software at this time was still a large number of
  patches to the standard release of kernel code and was not included in
  the normal release.  The NET-FAQ and subsequent NET-2-HOWTO's
  described the then fairly complex procedure to get it all working.
  Fred's focus was on developing innovations to the standard network
  implementations and this was taking time. The community of users was
  growing impatient for something that worked reliably and satisfied the
  80% of users and, as with Ross, the pressure on Fred as lead developer
  rose.

  Alan Cox <iialan@www.uk.linux.org> proposed a solution to the problem
  designed to resolve the situation. He proposed that he would take
  Fred's NET-2 code and debug it, making it reliable and stable so that
  it would satisfy the impatient user base while relieving that pressure
  from Fred allowing him to continue his work. Alan set about doing
  this, with some good success and his first version of Linux networking
  code was called `Net-2D(ebugged)'. The code worked reliably in many
  typical configurations and the user base was happy. Alan clearly had
  ideas and skills of his own to contribute to the project and many
  discussions relating to the direction the NET-2 code was heading
  ensued. There developed two distinct schools within the Linux
  networking community, one that had the philosophy of `make it work
  first, then make it better' and the other of `make it better first'.
  Linus ultimately arbitrated and offered his support to Alan's
  development efforts and included Alan's code in the standard kernel
  source distribution.  This placed Fred in a difficult position. Any
  continued development would lack the large user base actively using
  and testing the code and this would mean progress would be slow and
  difficult. Fred continued to work for a short time and eventually
  stood down and Alan came to be the new leader of the Linux networking
  kernel development effort.

  Donald Becker <becker@cesdis.gsfc.nasa.gov> soon revealed his talents
  in the low level aspects of networking and produced a huge range of
  ethernet drivers, nearly all of those included in the current kernels
  were developed by Donald. There have been other people that have made
  significant contributions, but Donald's work is prolific and so
  warrants special mention.

  Alan continued refining the NET-2-Debugged code for some time while
  working on progressing some of the matters that remained unaddressed
  on the `TODO' list.  By the time the Linux 1.3.* kernel source had
  grown its teeth the kernel networking code had migrated to the NET-3
  release on which current versions are based. Alan worked on many
  different aspects of the networking code and with the assistance of a
  range of other talented people from the Linux networking community
  grew the code in all sorts of directions. Alan produced dynamic
  network devices and the first standard AX.25 and IPX implementations.
  Alan has continued tinkering with the code, slowly restructuring and
  enhancing it to the state it is in today.

  PPP support was added by Michael Callahan <callahan@maths.ox.ac.uk>
  and Al Longyear <longyear@netcom.com> this too was critical to
  increasing the number of people actively using linux for networking.

  Jonathon Naylor <jsn@cs.nott.ac.uk> has contributed by significantly
  enhancing Alan's AX.25 code, adding NetRom and Rose protocol support.
  The AX.25/NetRom/Rose support itself is quite significant, because no
  other operating system can boast standard native support for these
  protocols beside Linux.

  There have of course been hundreds of other people who have made
  significant contribution to the development of the Linux networking
  software. Some of these you will encounter later in the technology
  specific sections, other people have contributed modules, drivers,
  bug-fixes, suggestions, test reports and moral support. In all cases
  each can claim to have played a part and offered what they could. The
  Linux kernel networking code is an excellent example of the results
  that can be obtained from the Linux style of anarchic development, if
  it hasn't yet surprised you, it is bound to soon enough, the
  development hasn't stopped.

  4.2.  Linux Networking Resources.

  There are a number of places where you can find good information about
  Linux networking.

  There are a wealth of Consultants available. A listing can be found at
  LinuxPorts Consultants Database

  Alan Cox, the current maintainer of the Linux kernel networking code
  maintains a world wide web page that contains highlights of current
  and new developments in linux Networking at: www.uk.linux.org.

  Another good place is a book written by Olaf Kirch entitled the
  Network Administrators Guide. It is a work of the Linux Documentation
  Project and you can read it interactively at Network Administrators
  Guide HTML version or you can obtain it in various formats by ftp from
  the metalab.unc.edu LDP ftp archive. Olaf's book is quite
  comprehensive and provides a good high level overview of network
  configuration under linux.

  There is a newsgroup in the Linux news hierarchy dedicated to
  networking and related matters, it is: comp.os.linux.networking

  There is a mailing list to which you can subscribe where you may ask
  questions relating to Linux networking. To subscribe you should send a
  mail message:


       To: majordomo@vger.rutgers.edu
       Subject: anything at all
       Message:

       subscribe linux-net



  On the various IRC networks there are often #linux channels on which
  people will be able to answer questions on linux networking.

  Please remember when reporting any problem to include as much relevant
  detail about the problem as you can. Specifically you should specify
  the versions of software that you are using, especially the kernel
  version, the version of tools such as pppd or dip and the exact nature
  of the problem you are experiencing. This means taking note of the
  exact syntax of any error messages you receive and of any commands
  that you are issuing.

  4.3.  Where to get some non-linux-specific network information.

  If you are after some basic tutorial information on tcp/ip networking
  generally, then I recommend you take a look at the following
  documents:



     tcp/ip introduction
        this document comes as both a text version and a postscript
        version.


     tcp/ip administration
        this document comes as both a text version and a postscript
        version.


  If you are after some more detailed information on tcp/ip networking
  then I highly recommend:


       Internetworking with TCP/IP, Volume 1: principles, protocols
       and architecture, by Douglas E. Comer, ISBN 0-13-227836-7,
       Prentice Hall publications, Third Edition, 1995.



  If you are wanting to learn about how to write network applications in
  a Unix compatible environment then I also highly recommend:


       Unix Network Programming, by W. Richard Stevens, ISBN
       0-13-949876-1, Prentice Hall publications, 1990.



  A second edition of this book is appearing on the bookshelves; the new
  book is made up of three volumes: check Prenice-Hall's web site to
  probe further.

  You might also try the comp.protocols.tcp-ip newsgroup.

  An important source of specific technical information relating to the
  Internet and the tcp/ip suite of protocols are RFC's. RFC is an
  acronym for `Request For Comment' and is the standard means of
  submitting and documenting Internet protocol standards. There are many
  RFC repositories. Many of these sites are ftp sites and other provide
  World Wide Web access with an associated search engine that allows you
  to search the RFC database for particular keywords.

  One possible source for RFC's is at Nexor RFC database.

  5.  Generic Network Configuration Information.

  The following subsections you will pretty much need to know and
  understand before you actually try to configure your network. They are
  fundamental principles that apply regardless of the exact nature of
  the network you wish to deploy.

  5.1.  What do I need to start ?

  Before you start building or configuring your network you will need
  some things. The most important of these are:

  5.1.1.  Current Kernel source(Optional).

  Please note:

  The majority of current distributions come with networking enabled,
  therefore it may not be required to recompile the kernel. If you are
  running well known hardware you should be just fine. For example: 3COM
  NIC, NE2000 NIC, or a Intel NIC. However if you find yourself in the
  position that you do need to update the kernel, the following
  information is provided.

  Because the kernel you are running now might not yet have support for
  the network types or cards that you wish to use you will probably need
  the kernel source so that you can recompile the kernel with the
  appropriate options.

  For users of the major distributions such as Redhat, Caldera, Debian,
  or Suse this no longer holds true. As long as you stay within the
  mainstream of hardware there should be no need to recompile your
  kernel unless there is a very specific feature that you need.

  You can always obtain the latest kernel source from ftp.cdrom.com.
  This is not the official site but they have LOTS of bandwidth and ALOT
  of users allowed. The official site is kernel.org but please use the
  above if you can. Please remember that ftp.kernel.org is seriously
  overloaded. Use a mirror.

  Normally the kernel source will be untarred into the /usr/src/linux
  directory. For information on how to apply patches and build the
  kernel you should read the Kernel-HOWTO.  For information on how to
  configure kernel modules you should read the ``Modules mini-HOWTO''.
  Also, the README file found in the kernel sources and the
  Documentation directory are very informative for the brave reader.

  Unless specifically stated otherwise, I recommend you stick with the
  standard kernel release (the one with the even number as the second
  digit in the version number). Development release kernels (the ones
  with the odd second digit) may have structural or other changes that
  may cause problems working with the other software on your system. If
  you are uncertain that you could resolve those sorts of problems in
  addition to the potential for there being other software errors, then
  don't use them.

  On the other hand, some of the features described here have been
  introduced during the development of 2.1 kernels, so you must take
  your choice: you can stick to 2.0 while wait for 2.2 and an updated
  distribution with every new tool, or you can get 2.1 and look around
  for the various support programs needed to exploit the new features.
  As I write this paragraph, in August 1998, 2.1.115 is current and 2.2
  is expected to appear pretty soon.

  5.1.2.  Current Network tools.

  The network tools are the programs that you use to configure linux
  network devices. These tools allow you to assign addresses to devices
  and configure routes for example.

  Most modern linux distributions are supplied with the network tools,
  so if you have installed from a distribution and haven't yet installed
  the network tools then you should do so.

  If you haven't installed from a distribution then you will need to
  source and compile the tools yourself. This isn't difficult.

  The network tools are now maintained by Bernd Eckenfels and are
  available at: ftp.inka.de and are mirrored at: ftp.uk.linux.org.

  You can also get the latest RedHat packages from net-
  tools-1.51-3.i386.rpm

  Be sure to choose the version that is most appropriate for the kernel
  you wish to use and follow the instructions in the package to install.

  To install and configure the version current at the time of the
  writing you need do the following:
               user% tar xvfz net-tools-1.33.tar.gz
               user% cd net-tools-1.33
               user% make config
               user% make
               root# make install



  Or to use the Redhat packahges:



               root# rpm -U net-tools-1.51-3.i386.rpm



  Additionally, if you intend configuring a firewall or using the IP
  masquerade feature you will require the ipfwadm command. The latest
  version of it may be obtained from: ftp.xos.nl. Again there are a
  number of versions available. Be sure to pick the version that most
  closely matches your kernel. Note that the firewalling features of
  Linux changed during 2.1 development and has been superceded by
  ipchains in v2.2 of the kernel. ipfwadm only applies to version 2.0 of
  the kernel. The following are known to be distributions with version
  2.0 or below of the kernel.



               Redhat 5.2 or below
               Caldera pre version 2.2
               Slackware pre version 4.x
               Debian pre version 2.x



  To install and configure the version current at the time of this
  writing you need to read the IPChains howto located at The Linux
  Documentation Project

  Note that if you run version 2.2 (or late 2.1) of the kernel, ipfwadm
  is not the right tool to configure firewalling. This version of the
  NET-3-HOWTO currently doesn't deal with the new firewalling setup. If
  you need more detailed information on ipchains please refer to the
  above.

  5.1.3.  Network Application Programs.

  The network application programs are programs such as telnet and ftp
  and their respective server programs. David Holland has been managing
  a distribution of the most common of these, which is now maintained by
  netbug@ftp.uk.linux.org.  You may obtain the distribution from:
  ftp.uk.linux.org.

  5.1.4.  IP Addresses, an Explanation.

  Internet Protocol Addresses are composed of four bytes. The convention
  is to write addresses in what is called `dotted decimal notation'. In
  this form each byte is converted to a decimal number (0-255) dropping
  any leading zero's unless the number is zero and written with each
  byte separated by a `.' character. By convention each interface of a
  host or router has an IP address. It is legal for the same IP address
  to be used on each interface of a single machine in some circumstances
  but usually each interface will have its own address.

  Internet Protocol Networks are contiguous sequences of IP addresses.
  All addresses within a network have a number of digits within the
  address in common. The portion of the address that is common amongst
  all addresses within the network is called the `network portion' of
  the address. The remaining digits are called the `host portion'. The
  number of bits that are shared by all addresses within a network is
  called the netmask and it is role of the netmask to determine which
  addresses belong to the network it is applied to and which don't. For
  example, consider the following:



               -----------------  ---------------
               Host Address       192.168.110.23
               Network Mask       255.255.255.0
               Network Portion    192.168.110.
               Host portion                  .23
               -----------------  ---------------
               Network Address    192.168.110.0
               Broadcast Address  192.168.110.255
               -----------------  ---------------



  Any address that is 'bitwise anded' with its netmask will reveal the
  address of the network it belongs to. The network address is therefore
  always the lowest numbered address within the range of addresses on
  the network and always has the host portion of the address coded all
  zeroes.

  The broadcast address is a special address that every host on the
  network listens to in addition to its own unique address. This address
  is the one that datagrams are sent to if every host on the network is
  meant to receive it. Certain types of data like routing information
  and warning messages are transmitted to the broadcast address so that
  every host on the network can receive it simultaneously. There are two
  commonly used standards for what the broadcast address should be. The
  most widely accepted one is to use the highest possible address on the
  network as the broadcast address.  In the example above this would be
  192.168.110.255. For some reason other sites have adopted the
  convention of using the network address as the broadcast address. In
  practice it doesn't matter very much which you use but you must make
  sure that every host on the network is configured with the same
  broadcast address.

  For administrative reasons some time early in the development of the
  IP protocol some arbitrary groups of addresses were formed into
  networks and these networks were grouped into what are called classes.
  These classes provide a number of standard size networks that could be
  allocated. The ranges allocated are:



          ----------------------------------------------------------
          | Network | Netmask       | Network Addresses            |
          | Class   |               |                              |
          ----------------------------------------------------------
          |    A    | 255.0.0.0     | 0.0.0.0    - 127.255.255.255 |
          |    B    | 255.255.0.0   | 128.0.0.0  - 191.255.255.255 |
          |    C    | 255.255.255.0 | 192.0.0.0  - 223.255.255.255 |
          |Multicast| 240.0.0.0     | 224.0.0.0  - 239.255.255.255 |
          ----------------------------------------------------------



  What addresses you should use depends on exactly what it is that you
  are doing. You may have to use a combination of the following
  activities to get all the addresses you need:



     Installing a linux machine on an existing IP network
        If you wish to install a linux machine onto an existing IP
        network then you should contact whoever administers the network
        and ask them for the following information:


     o  Host IP Address

     o  IP network address

     o  IP broadcast address

     o  IP netmask

     o  Router address

     o  Domain Name Server Address


        You should then configure your linux network device with those
        details.  You can not make them up and expect your configuration
        to work.


     Building a brand new network that will never connect to the
        Internet" If you are building a private network and you never
        intend that network to be connected to the Internet then you can
        choose whatever addresses you like.  However, for safety and
        consistency reasons there have been some IP network addresses
        that have been reserved specifically for this purpose. These are
        specified in RFC1597 and are as follows:



             -----------------------------------------------------------
             |         RESERVED PRIVATE NETWORK ALLOCATIONS            |
             -----------------------------------------------------------
             | Network | Netmask       | Network Addresses             |
             | Class   |               |                               |
             -----------------------------------------------------------
             |    A    | 255.0.0.0     | 10.0.0.0    - 10.255.255.255  |
             |    B    | 255.255.0.0   | 172.16.0.0  - 172.31.255.255  |
             |    C    | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 |
             -----------------------------------------------------------



     You should first decide how large you want your network to be and
     then choose as many of the addresses as you require.


  5.2.  Where should I put the configuration commands ?

  There are a few different approaches to Linux system boot procedures.
  After the kernel boots, it always executes a program called `init'.
  The init program then reads its configuration file called /etc/inittab
  and commences the boot process. There are a few different flavours of
  init around, although everyone is now converging to the System V
  (Five) flavor, developed by Miguel van Smoorenburg.

  Despite the fact that the init program is always the same, the setup
  of system boot is organized in a different way by each distribution.

  Usually the /etc/inittab file contains an entry looking something
  like:



               si::sysinit:/etc/init.d/boot



  This line specifies the name of the shell script file that actually
  manages the boot sequence. This file is somewhat equivalent to the
  AUTOEXEC.BAT file in MS-DOS.

  There are usually other scripts that are called by the boot script and
  often the network is configured within one of many of these.

  The following table may be used as a guide for your system:



       ---------------------------------------------------------------------------
       Distrib. | Interface Config/Routing          | Server Initialization
       ---------------------------------------------------------------------------
       Debian   | /etc/init.d/network               | /etc/rc2.d/*
       ---------------------------------------------------------------------------
       Slackware| /etc/rc.d/rc.inet1                | /etc/rc.d/rc.inet2
       ---------------------------------------------------------------------------
       RedHat   | /etc/rc.d/init.d/network          | /etc/rc.d/rc3.d/*
       ---------------------------------------------------------------------------



  Note that Debian and Red Hat use a whole directory to host scripts
  that fire up system services (and usually information does not lie
  within these files, for example Red Hat systems store all of system
  configuration in files under /etc/sysconfig, whence it is retrieved by
  boot scripts). If you want to grasp the details of the boot process,
  my suggestion is to check /etc/inittab and the documentation that
  accompanies init. Linux Journal is also going to publish an article
  about system initialization, and this document will point to it as
  soon as it is available on the web.

  Most modern distributions include a program that will allow you to
  configure many of the common sorts of network interfaces. If you have
  one of these then you should see if it will do what you want before
  attempting a manual configuration.



               -----------------------------------------
               Distrib   | Network configuration program
               -----------------------------------------
               RedHat    | /usr/bin/netcfg
               Slackware | /sbin/netconfig
               -----------------------------------------



  5.3.  Creating your network interfaces.

  In many Unix operating systems the network devices have appearances in
  the /dev directory. This is not so in Linux. In Linux the network
  devices are created dynamically in software and do not require device
  files to be present.

  In the majority of cases the network device is automatically created
  by the device driver while it is initializing and has located your
  hardware. For example, the ethernet device driver creates eth[0..n]
  interfaces sequentially as it locates your ethernet hardware. The
  first ethernet card found becomes eth0, the second eth1 etc.

  In some cases though, notably slip and ppp, the network devices are
  created through the action of some user program. The same sequential
  device numbering applies, but the devices are not created
  automatically at boot time. The reason for this is that unlike
  ethernet devices, the number of active slip or ppp devices may vary
  during the uptime of the machine. These cases will be covered in more
  detail in later sections.

  5.4.  Configuring a network interface.

  When you have all of the programs you need and your address and
  network information you can configure your network interfaces. When we
  talk about configuring a network interface we are talking about the
  process of assigning appropriate addresses to a network device and to
  setting appropriate values for other configurable parameters of a
  network device. The program most commonly used to do this is the
  ifconfig (interface configure) command.

  Typically you would use a command similar to the following:



          root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up



  In this case I'm configuring an ethernet interface `eth0' with the IP
  address `192.168.0.1' and a network mask of `255.255.255.0'.  The `up'
  that trails the command tells the interface that it should become
  active, but can usually be omitted, as it is the default. To shutdown
  an interface, you can just call ``ifconfig eth0 down''.

  The kernel assumes certain defaults when configuring interfaces. For
  example, you may specify the network address and broadcast address for
  an interface, but if you don't, as in my example above, then the
  kernel will make reasonable guesses as to what they should be based on
  the netmask you supply and if you don't supply a netmask then on the
  network class of the IP address configured.  In my example the kernel
  would assume that it is a class-C network being configured on the
  interface and configure a network address of `192.168.0.0' and a
  broadcast address of `192.168.0.255' for the interface.

  There are many other options to the ifconfig command. The most
  important of these are:


     up this option activates an interface (and is the default).

     down
        this option deactivates an interface.

     [-]arp
        this option enables or disables use of the address resolution
        protocol on this interface

     [-]allmulti
        this option enables or disables the reception of all hardware
        multicast packets. Hardware multicast enables groups of hosts to
        receive packets addressed to special destinations. This may be
        of importance if you are using applications like desktop
        videoconferencing but is normally not used.

     mtu N
        this parameter allows you to set the MTU of this device.

     netmask <addr>
        this parameter allows you to set the network mask of the network
        this device belongs to.

     irq <addr>
        this parameter only works on certain types of hardware and
        allows you to set the IRQ of the hardware of this device.

     [-]broadcast [addr]
        this parameter allows you to enable and set the accepting of
        datagrams destined to the broadcast address, or to disable
        reception of these datagrams.

     [-]pointopoint [addr]
        this parameter allows you to set the address of the machine at
        the remote end of a point to point link such as for slip or ppp.

     hw <type> <addr>
        this parameter allows you to set the hardware address of certain
        types of network devices. This is not often useful for ethernet,
        but is useful for other network types such as AX.25.


  You may use the ifconfig command on any network interface. Some user
  programs such as pppd and dip automatically configure the network
  devices as they create them, so manual use of ifconfig is unnecessary.

  5.5.  Configuring your Name Resolver.

  The `Name Resolver' is a part of the linux standard library. Its prime
  function is to provide a service to convert human-friendly hostnames
  like `ftp.funet.fi' into machine friendly IP addresses such as
  128.214.248.6.

  5.5.1.  What's in a name ?

  You will probably be familiar with the appearance of Internet host
  names, but may not understand how they are constructed, or
  deconstructed. Internet domain names are hierarchical in nature, that
  is, they have a tree-like structure. A `domain' is a family, or group
  of names. A `domain' may be broken down into `subdomain'. A `toplevel
  domain' is a domain that is not a subdomain. The Top Level Domains are
  specified in RFC-920. Some examples of the most common top level
  domains are:


     COM
        Commercial Organizations

     EDU
        Educational Organizations

     GOV
        Government Organizations

     MIL
        Military Organizations

     ORG
        Other organizations

     NET
        Internet-Related Organizations

     Country Designator
        these are two letters codes that represent a particular country.


  For historical reasons most domains belonging to one of the non-
  country based top level domains were used by organizations within the
  United States, although the United States also has its own country
  code `.us'. This is not true any more for .com and .org domains, which
  are commonly used by non-us companies.

  Each of these top level domains has subdomains. The top level domains
  based on country name are often next broken down into subdomains based
  on the com, edu, gov, mil and org domains. So for example you end up
  with: com.au and gov.au for commercial and government organizations in
  Australia; note that this is not a general rule, as actual policies
  depend on the naming authority for each domain.

  The next level of division usually represents the name of the
  organization.  Further subdomains vary in nature, often the next level
  of subdomain is based on the departmental structure of the
  organization but it may be based on any criterion considered
  reasonable and meaningful by the network administrators for the
  organization.

  The very left-most portion of the name is always the unique name
  assigned to the host machine and is called the `hostname', the portion
  of the name to the right of the hostname is called the `domainname'
  and the complete name is called the `Fully Qualified Domain Name'.

  To use Terry's host as an example, the fully qualified domain name is
  `perf.no.itg.telstra.com.au'. This means that the host name is `perf'
  and the domain name is `no.itg.telstra.com.au'. The domain name is
  based on a top level domain based on his country, Australia and as his
  email address belongs to a commercial organization, `.com' is there as
  the next level domain. The name of the company is (was) `telstra' and
  their internal naming structure is based on organizational structure,
  in this case the machine belongs to the Information Technology Group,
  Network Operations section.

  Usually, the names are fairly shorter; for example, my ISP is called
  ``systemy.it'' and my non-profit organization is called ``linux.it'',
  without any com and org subdomain, so that my own host is just called
  ``morgana.systemy.it'' and rubini@linux.it is a valid email address.
  Note that the owner of a domain has the rights to register hostnames
  as well as subdomains; for example, the LUG I belong to uses the
  domain pluto.linux.it, because the owners of linux.it agreed to open a
  subdomain for the LUG.

  5.5.2.  What information you will need.

  You will need to know what domain your hosts name will belong to. The
  name resolver software provides this name translation service by
  making requests to a `Domain Name Server', so you will need to know
  the IP address of a local nameserver that you can use.

  There are three files you need to edit, I'll cover each of these in
  turn.

  5.5.3.  /etc/resolv.conf

  The /etc/resolv.conf is the main configuration file for the name
  resolver code. Its format is quite simple. It is a text file with one
  keyword per line. There are three keywords typically used, they are:


     domain
        this keyword specifies the local domain name.

     search
        this keyword specifies a list of alternate domain names to
        search for a hostname

     nameserver
        this keyword, which may be used many times, specifies an IP
        address of a domain name server to query when resolving names


  An example /etc/resolv.conf might look something like:



               domain maths.wu.edu.au
               search maths.wu.edu.au wu.edu.au
               nameserver 192.168.10.1
               nameserver 192.168.12.1



  This example specifies that the default domain name to append to
  unqualified names (ie hostnames supplied without a domain) is
  maths.wu.edu.au and that if the host is not found in that domain to
  also try the wu.edu.au domain directly. Two nameservers entry are
  supplied, each of which may be called upon by the name resolver code
  to resolve the name.

  5.5.4.  /etc/host.conf

  The /etc/host.conf file is where you configure some items that govern
  the behaviour of the name resolver code. The format of this file is
  described in detail in the `resolv+' man page. In nearly all
  circumstances the following example will work for you:



               order hosts,bind
               multi on



  This configuration tells the name resolver to check the /etc/hosts
  file before attempting to query a nameserver and to return all valid
  addresses for a host found in the /etc/hosts file instead of just the
  first.

  5.5.5.  /etc/hosts

  The /etc/hosts file is where you put the name and IP address of local
  hosts. If you place a host in this file then you do not need to query
  the domain name server to get its IP Address. The disadvantage of
  doing this is that you must keep this file up to date yourself if the
  IP address for that host changes. In a well managed system the only
  hostnames that usually appear in this file are an entry for the
  loopback interface and the local hosts name.



               # /etc/hosts
               127.0.0.1      localhost loopback
               192.168.0.1    this.host.name



  You may specify more than one host name per line as demonstrated by
  the first entry, which is a standard entry for the loopback interface.

  5.5.6.  Running a name server

  If you want to run a local nameserver, you can do it easily. Please
  refer to the DNS-HOWTO and to any documents included in your version
  of BIND (Berkeley Internet Name Domain).

  5.6.  Configuring your loopback interface.

  The `loopback' interface is a special type of interface that allows
  you to make connections to yourself. There are various reasons why you
  might want to do this, for example, you may wish to test some network
  software without interfering with anybody else on your network. By
  convention the IP address `127.0.0.1' has been assigned specifically
  for loopback. So no matter what machine you go to, if you open a
  telnet connection to 127.0.0.1 you will always reach the local host.

  Configuring the loopback interface is simple and you should ensure you
  do (but note that this task is usually performed by the standard
  initialization scripts).



               root# ifconfig lo 127.0.0.1
               root# route add -host 127.0.0.1 lo



  We'll talk more about the route command in the next section.

  5.7.  Routing.

  Routing is a big topic. It is easily possible to write large volumes
  of text about it. Most of you will have fairly simple routing
  requirements, some of you will not. I will cover some basic
  fundamentals of routing only.  If you are interested in more detailed
  information then I suggest you refer to the references provided at the
  start of the document.

  Let's start with a definition. What is IP routing ? Here is one that
  I'm using:


       IP Routing is the process by which a host with multiple net-
       work connections decides where to deliver IP datagrams it
       has received.



  It might be useful to illustrate this with an example. Imagine a
  typical office router, it might have a PPP link off the Internet, a
  number of ethernet segments feeding the workstations and another PPP
  link off to another office. When the router receives a datagram on any
  of its network connections, routing is the mechanism that it uses to
  determine which interface it should send the datagram to next. Simple
  hosts also need to route, all Internet hosts have two network devices,
  one is the loopback interface described above and the other is the one
  it uses to talk to the rest of the network, perhaps an ethernet,
  perhaps a PPP or SLIP serial interface.

  Ok, so how does routing work ? Each host keeps a special list of
  routing rules, called a routing table. This table contains rows which
  typically contain at least three fields, the first is a destination
  address, the second is the name of the interface to which the datagram
  is to be routed and the third is optionally the IP address of another
  machine which will carry the datagram on its next step through the
  network. In linux you can see this table by using the following
  command:



               user% cat /proc/net/route



  or by using either of the following commands:



               user% /sbin/route -n
               user% netstat -r



  The routing process is fairly simple: an incoming datagram is
  received, the destination address (who it is for) is examined and
  compared with each entry in the table. The entry that best matches
  that address is selected and the datagram is forwarded to the
  specified interface. If the gateway field is filled then the datagram
  is forwarded to that host via the specified interface, otherwise the
  destination address is assumed to be on the network supported by the
  interface.

  To manipulate this table a special command is used. This command takes
  command line arguments and converts them into kernel system calls that
  request the kernel to add, delete or modify entries in the routing
  table.  The command is called `route'.

  A simple example. Imagine you have an ethernet network. You've been
  told it is a class-C network with an address of 192.168.1.0. You've
  been supplied with an IP address of 192.168.1.10 for your use and have
  been told that 192.168.1.1 is a router connected to the Internet.

  The first step is to configure the interface as described earlier. You
  would use a command like:



               root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up



  You now need to add an entry into the routing table to tell the kernel
  that datagrams for all hosts with addresses that match 192.168.1.*
  should be sent to the ethernet device. You would use a command similar
  to:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0



  Note the use of the `-net' argument to tell the route program that
  this entry is a network route. Your other choice here is a `-host'
  route which is a route that is specific to one IP address.

  This route will enable you to establish IP connections with all of the
  hosts on your ethernet segment. But what about all of the IP hosts
  that aren't on your ethernet segment ?


  It would be a very difficult job to have to add routes to every
  possible destination network, so there is a special trick that is used
  to simplify this task. The trick is called the `default' route. The
  default route matches every possible destination, but poorly, so that
  if any other entry exists that matches the required address it will be
  used instead of the default route. The idea of the default route is
  simply to enable you to say "and everything else should go here". In
  the example I've contrived you would use an entry like:



               root# route add default gw 192.168.1.1 eth0



  The `gw' argument tells the route command that the next argument is
  the IP address, or name, of a gateway or router machine which all
  datagrams matching this entry should be directed to for further
  routing.

  So, your complete configuration would look like:



               root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# route add default gw 192.168.1.1 eth0



  If you take a close look at your network `rc' files you will find that
  at least one of them looks very similar to this. This is a very common
  configuration.

  Let's now look at a slightly more complicated routing configuration.
  Let's imagine we are configuring the router we looked at earlier, the
  one supporting the PPP link to the Internet and the lan segments
  feeding the workstations in the office. Lets imagine the router has
  three ethernet segments and one PPP link. Our routing configuration
  would look something like:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# route add -net 192.168.2.0 netmask 255.255.255.0 eth1
               root# route add -net 192.168.3.0 netmask 255.255.255.0 eth2
               root# route add default ppp0



  Each of the workstations would use the simpler form presented above,
  only the router needs to specify each of the network routes separately
  because for the workstations the default route mechanism will capture
  all of them letting the router worry about splitting them up
  appropriately. You may be wondering why the default route presented
  doesn't specify a `gw'.  The reason for this is simple, serial link
  protocols such as PPP and slip only ever have two hosts on their
  network, one at each end. To specify the host at the other end of the
  link as the gateway is pointless and redundant as there is no other
  choice, so you do not need to specify a gateway for these types of
  network connections. Other network types such as ethernet, arcnet or
  token ring do require the gateway to be specified as these networks
  support large numbers of hosts on them.

  5.7.1.  So what does the routed  program do ?

  The routing configuration described above is best suited to simple
  network arrangements where there are only ever single possible paths
  to destinations.  When you have a more complex network arrangement
  things get a little more complicated. Fortunately for most of you this
  won't be an issue.

  The big problem with `manual routing' or `static routing' as
  described, is that if a machine or link fails in your network then the
  only way you can direct your datagrams another way, if another way
  exists, is by manually intervening and executing the appropriate
  commands. Naturally this is clumsy, slow, impractical and hazard
  prone. Various techniques have been developed to automatically adjust
  routing tables in the event of network failures where there are
  alternate routes, all of these techniques are loosely grouped by the
  term `dynamic routing protocols'.

  You may have heard of some of the more common dynamic routing
  protocols. The most common are probably RIP (Routing Information
  Protocol) and OSPF (Open Shortest Path First Protocol). The Routing
  Information Protocol is very common on small networks such as small-
  medium sized corporate networks or building networks. OSPF is more
  modern and more capable at handling large network configurations and
  better suited to environments where there is a large number of
  possible paths through the network. Common implementations of these
  protocols are: `routed' - RIP and `gated' - RIP, OSPF and others.  The
  `routed' program is normally supplied with your Linux distribution or
  is included in the `NetKit' package detailed above.

  An example of where and how you might use a dynamic routing protocol
  might look something like the following:



      192.168.1.0 /                         192.168.2.0 /
         255.255.255.0                         255.255.255.0
       -                                     -
       |                                     |
       |   /-----\                 /-----\   |
       |   |     |ppp0   //    ppp0|     |   |
  eth0 |---|  A  |------//---------|  B  |---| eth0
       |   |     |     //          |     |   |
       |   \-----/                 \-----/   |
       |      \ ppp1             ppp1 /      |
       -       \                     /       -
                \                   /
                 \                 /
                  \               /
                   \             /
                    \           /
                     \         /
                      \       /
                       \     /
                    ppp0\   /ppp1
                       /-----\
                       |     |
                       |  C  |
                       |     |
                       \-----/
                          |eth0
                          |
                     |---------|
                     192.168.3.0 /
                        255.255.255.0



  We have three routers A, B and C. Each supports one ethernet segment
  with a Class C IP network (netmask 255.255.255.0). Each router also
  has a PPP link to each of the other routers. The network forms a
  triangle.

  It should be clear that the routing table at router A could look like:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# route add -net 192.168.2.0 netmask 255.255.255.0 ppp0
               root# route add -net 192.168.3.0 netmask 255.255.255.0 ppp1



  This would work just fine until the link between router A and B should
  fail.  If that link failed then with the routing entry shown above
  hosts on the ethernet segment of A could not reach hosts on the
  ethernet segment on B because their datagram would be directed to
  router A's ppp0 link which is broken. They could still continue to
  talk to hosts on the ethernet segment of C and hosts on the C's
  ethernet segment could still talk to hosts on B's ethernet segment
  because the link between B and C is still intact.

  But wait, if A can talk to C and C can still talk to B, why shouldn't
  A route its datagrams for B via C and let C send them to B ? This is
  exactly the sort of problem that dynamic routing protocols like RIP
  were designed to solve. If each of the routers A, B and C were running
  a routing daemon then their routing tables would be automatically
  adjusted to reflect the new state of the network should any one of the
  links in the network fail.  To configure such a network is simple, at
  each router you need only do two things. In this case for Router A:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# /usr/sbin/routed



  The `routed' routing daemon automatically finds all active network
  ports when it starts and sends and listens for messages on each of the
  network devices to allow it to determine and update the routing table
  on the host.

  This has been a very brief explanation of dynamic routing and where
  you would use it. If you want more information then you should refer
  to the suggested references listed at the top of the document.

  The important points relating to dynamic routing are:


  1. You only need to run a dynamic routing protocol daemon when your
     Linux machine has the possibility of selecting multiple possible
     routes to a destination.  An example of this would be if you plan
     to use IP Masquerading.


  2. The dynamic routing daemon will automatically modify your routing
     table to adjust to changes in your network.

  3. RIP is suited to small to medium sized networks.


  5.8.  Configuring your network servers and services.

  Network servers and services are those programs that allow a remote
  user to make user of your Linux machine. Server programs listen on
  network ports.  Network ports are a means of addressing a particular
  service on any particular host and are how a server knows the
  difference between an incoming telnet connection and an incoming ftp
  connection. The remote user establishes a network connection to your
  machine and the server program, the network daemon program, listening
  on that port accepts the connection and executes. There are two ways
  that network daemons may operate. Both are commonly employed in
  practice. The two ways are:



     standalone
        the network daemon program listens on the designated network
        port and when an incoming connection is made it manages the
        network connection itself to provide the service.


     slave to the inetd server
        the inetd server is a special network daemon program that
        specializes in managing incoming network connections. It has a
        configuration file which tells it what program needs to be run
        when an incoming connection is received. Any service port may be
        configured for either of the tcp or udp protcols. The ports are
        described in another file that we will talk about soon.


  There are two important files that we need to configure. They are the
  /etc/services file which assigns names to port numbers and the
  /etc/inetd.conf file which is the configuration file for the inetd
  network daemon.

  5.8.1.  /etc/services

  The /etc/services file is a simple database that associates a human
  friendly name to a machine friendly service port. Its format is quite
  simple. The file is a text file with each line representing and entry
  in the database. Each entry is comprised of three fields separated by
  any number of whitespace (tab or space) characters. The fields are:


    name      port/protocol        aliases     # comment



     name
        a single word name that represents the service being described.


     port/protocol
        this field is split into two subfields.



     port
        a number that specifies the port number the named service will
        be available on. Most of the common services have assigned
        service numbers. These are described in RFC-1340.


     protocol
        this subfield may be set to either tcp or udp.

        It is important to note that an entry of 18/tcp is very
        different from an entry of 18/udp and that there is no technical
        reason why the same service needs to exist on both. Normally
        common sense prevails and it is only if a particular service is
        available via both tcp and udp that you will see an entry for
        both.


     aliases
        other names that may be used to refer to this service entry.


  Any text appearing in a line after a `#' character is ignored and
  treated as a comment.

  5.8.1.1.  An example /etc/services  file.

  All modern linux distributions provide a good /etc/services file.
  Just in case you happen to be building a machine from the ground up,
  here is a copy of the /etc/services file supplied with an old Debian
  distribution:


  # /etc/services:
  # $Id: services,v 1.3 1996/05/06 21:42:37 tobias Exp $
  #
  # Network services, Internet style
  #
  # Note that it is presently the policy of IANA to assign a single well-known
  # port number for both TCP and UDP; hence, most entries here have two entries
  # even if the protocol doesn't support UDP operations.
  # Updated from RFC 1340, ``Assigned Numbers'' (July 1992).  Not all ports
  # are included, only the more common ones.

  tcpmux          1/tcp                           # TCP port service multiplexer
  echo            7/tcp
  echo            7/udp
  discard         9/tcp           sink null
  discard         9/udp           sink null
  systat          11/tcp          users
  daytime         13/tcp
  daytime         13/udp
  netstat         15/tcp
  qotd            17/tcp          quote
  msp             18/tcp                          # message send protocol
  msp             18/udp                          # message send protocol
  chargen         19/tcp          ttytst source
  chargen         19/udp          ttytst source
  ftp-data        20/tcp
  ftp             21/tcp
  ssh             22/tcp                          # SSH Remote Login Protocol
  ssh             22/udp                          # SSH Remote Login Protocol
  telnet          23/tcp
  # 24 - private
  smtp            25/tcp          mail
  # 26 - unassigned
  time            37/tcp          timserver
  time            37/udp          timserver
  rlp             39/udp          resource        # resource location
  nameserver      42/tcp          name            # IEN 116
  whois           43/tcp          nicname
  re-mail-ck      50/tcp                          # Remote Mail Checking Protocol
  re-mail-ck      50/udp                          # Remote Mail Checking Protocol
  domain          53/tcp          nameserver      # name-domain server
  domain          53/udp          nameserver
  mtp             57/tcp                          # deprecated
  bootps          67/tcp                          # BOOTP server
  bootps          67/udp
  bootpc          68/tcp                          # BOOTP client
  bootpc          68/udp
  tftp            69/udp
  gopher          70/tcp                          # Internet Gopher
  gopher          70/udp
  rje             77/tcp          netrjs
  finger          79/tcp
  www             80/tcp          http            # WorldWideWeb HTTP
  www             80/udp                          # HyperText Transfer Protocol
  link            87/tcp          ttylink
  kerberos        88/tcp          kerberos5 krb5  # Kerberos v5
  kerberos        88/udp          kerberos5 krb5  # Kerberos v5
  supdup          95/tcp
  # 100 - reserved
  hostnames       101/tcp         hostname        # usually from sri-nic
  iso-tsap        102/tcp         tsap            # part of ISODE.
  csnet-ns        105/tcp         cso-ns          # also used by CSO name server
  csnet-ns        105/udp         cso-ns
  rtelnet         107/tcp                         # Remote Telnet
  rtelnet         107/udp
  pop-2           109/tcp         postoffice      # POP version 2
  pop-2           109/udp
  pop-3           110/tcp                         # POP version 3
  pop-3           110/udp
  sunrpc          111/tcp         portmapper      # RPC 4.0 portmapper TCP
  sunrpc          111/udp         portmapper      # RPC 4.0 portmapper UDP
  auth            113/tcp         authentication tap ident
  sftp            115/tcp
  uucp-path       117/tcp
  nntp            119/tcp         readnews untp   # USENET News Transfer Protocol
  ntp             123/tcp
  ntp             123/udp                         # Network Time Protocol
  netbios-ns      137/tcp                         # NETBIOS Name Service
  netbios-ns      137/udp
  netbios-dgm     138/tcp                         # NETBIOS Datagram Service
  netbios-dgm     138/udp
  netbios-ssn     139/tcp                         # NETBIOS session service
  netbios-ssn     139/udp
  imap2           143/tcp                         # Interim Mail Access Proto v2
  imap2           143/udp
  snmp            161/udp                         # Simple Net Mgmt Proto
  snmp-trap       162/udp         snmptrap        # Traps for SNMP
  cmip-man        163/tcp                         # ISO mgmt over IP (CMOT)
  cmip-man        163/udp
  cmip-agent      164/tcp
  cmip-agent      164/udp
  xdmcp           177/tcp                         # X Display Mgr. Control Proto
  xdmcp           177/udp
  nextstep        178/tcp         NeXTStep NextStep       # NeXTStep window
  nextstep        178/udp         NeXTStep NextStep       # server
  bgp             179/tcp                         # Border Gateway Proto.
  bgp             179/udp
  prospero        191/tcp                         # Cliff Neuman's Prospero
  prospero        191/udp
  irc             194/tcp                         # Internet Relay Chat
  irc             194/udp
  smux            199/tcp                         # SNMP Unix Multiplexer
  smux            199/udp
  at-rtmp         201/tcp                         # AppleTalk routing
  at-rtmp         201/udp
  at-nbp          202/tcp                         # AppleTalk name binding
  at-nbp          202/udp
  at-echo         204/tcp                         # AppleTalk echo
  at-echo         204/udp
  at-zis          206/tcp                         # AppleTalk zone information
  at-zis          206/udp
  z3950           210/tcp         wais            # NISO Z39.50 database
  z3950           210/udp         wais
  ipx             213/tcp                         # IPX
  ipx             213/udp
  imap3           220/tcp                         # Interactive Mail Access
  imap3           220/udp                         # Protocol v3
  ulistserv       372/tcp                         # UNIX Listserv
  ulistserv       372/udp
  #
  # UNIX specific services
  #
  exec            512/tcp
  biff            512/udp         comsat
  login           513/tcp
  who             513/udp         whod
  shell           514/tcp         cmd             # no passwords used
  syslog          514/udp
  printer         515/tcp         spooler         # line printer spooler
  talk            517/udp
  ntalk           518/udp
  route           520/udp         router routed   # RIP
  timed           525/udp         timeserver
  tempo           526/tcp         newdate
  courier         530/tcp         rpc
  conference      531/tcp         chat
  netnews         532/tcp         readnews
  netwall         533/udp                         # -for emergency broadcasts
  uucp            540/tcp         uucpd           # uucp daemon
  remotefs        556/tcp         rfs_server rfs  # Brunhoff remote filesystem
  klogin          543/tcp                         # Kerberized `rlogin' (v5)
  kshell          544/tcp         krcmd           # Kerberized `rsh' (v5)
  kerberos-adm    749/tcp                         # Kerberos `kadmin' (v5)
  #
  webster         765/tcp                         # Network dictionary
  webster         765/udp
  #
  # From ``Assigned Numbers'':
  #
  #> The Registered Ports are not controlled by the IANA and on most systems
  #> can be used by ordinary user processes or programs executed by ordinary
  #> users.
  #
  #> Ports are used in the TCP [45,106] to name the ends of logical
  #> connections which carry long term conversations.  For the purpose of
  #> providing services to unknown callers, a service contact port is
  #> defined.  This list specifies the port used by the server process as its
  #> contact port.  While the IANA can not control uses of these ports it
  #> does register or list uses of these ports as a convenience to the
  #> community.
  #
  ingreslock      1524/tcp
  ingreslock      1524/udp
  prospero-np     1525/tcp                # Prospero non-privileged
  prospero-np     1525/udp
  rfe             5002/tcp                # Radio Free Ethernet
  rfe             5002/udp                # Actually uses UDP only
  bbs             7000/tcp                # BBS service
  #
  #
  # Kerberos (Project Athena/MIT) services
  # Note that these are for Kerberos v4 and are unofficial.  Sites running
  # v4 should uncomment these and comment out the v5 entries above.
  #
  kerberos4       750/udp         kdc     # Kerberos (server) udp
  kerberos4       750/tcp         kdc     # Kerberos (server) tcp
  kerberos_master 751/udp                 # Kerberos authentication
  kerberos_master 751/tcp                 # Kerberos authentication
  passwd_server   752/udp                 # Kerberos passwd server
  krb_prop        754/tcp                 # Kerberos slave propagation
  krbupdate       760/tcp         kreg    # Kerberos registration
  kpasswd         761/tcp         kpwd    # Kerberos "passwd"
  kpop            1109/tcp                # Pop with Kerberos
  knetd           2053/tcp                # Kerberos de-multiplexor
  zephyr-srv      2102/udp                # Zephyr server
  zephyr-clt      2103/udp                # Zephyr serv-hm connection
  zephyr-hm       2104/udp                # Zephyr hostmanager
  eklogin         2105/tcp                # Kerberos encrypted rlogin
  #
  # Unofficial but necessary (for NetBSD) services
  #
  supfilesrv      871/tcp                 # SUP server
  supfiledbg      1127/tcp                # SUP debugging
  #
  # Datagram Delivery Protocol services
  #
  rtmp            1/ddp                   # Routing Table Maintenance Protocol
  nbp             2/ddp                   # Name Binding Protocol
  echo            4/ddp                   # AppleTalk Echo Protocol
  zip             6/ddp                   # Zone Information Protocol
  #
  # Debian GNU/Linux services
  rmtcfg          1236/tcp                # Gracilis Packeten remote config server
  xtel            1313/tcp                # french minitel
  cfinger         2003/tcp                # GNU Finger
  postgres        4321/tcp                # POSTGRES
  mandelspawn     9359/udp        mandelbrot      # network mandelbrot

  # Local services



  In the real world, the actual file is always growing as new services
  are being created. If you fear your own copy is incomplete, I'd
  suggest to copy a new /etc/services from a recent distribution.

  5.8.2.  /etc/inetd.conf

  The /etc/inetd.conf file is the configuration file for the inetd
  server daemon. Its function is to tell inetd what to do when it
  receives a connection request for a particular service. For each
  service that you wish to accept connections for you must tell inetd
  what network server daemon to run and how to run it.

  Its format is also fairly simple. It is a text file with each line
  describing a service that you wish to provide. Any text in a line
  following a `#' is ignored and considered a comment. Each line
  contains seven fields separated by any number of whitespace (tab or
  space) characters. The general format is as follows:



         service  socket_type  proto  flags  user  server_path  server_args



     service
        is the service relevant to this configuration as taken from the
        /etc/services file.


     socket_type
        this field describes the type of socket that this entry will
        consider relevant, allowable values are: stream, dgram, raw,
        rdm, or seqpacket. This is a little technical in nature, but as
        a rule of thumb nearly all tcp based services use stream and
        nearly all udp based services use dgram. It is only very special
        types of server daemons that would use any of the other values.


     proto
        the protocol to considered valid for this entry. This should
        match the appropriate entry in the /etc/services file and will
        typically be either tcp or udp. Sun RPC (Remote Procedure Call)
        based servers will use rpc/tcp or rpc/udp.


     flags
        there are really only two possible settings for this field.
        This field setting tells inetd whether the network server
        program frees the socket after it has been started and therefore
        whether inetd can start another one on the next connection
        request, or whether inetd should wait and assume that any server
        daemon already running will handle the new connection request.
        Again this is a little tricky to work out, but as a rule of
        thumb all tcp servers should have this entry set to nowait and
        most udp servers should have this entry set to wait. Be warned
        there are some notable exceptions to this, so let the example
        guide you if you are not sure.


     user
        this field describes which user account from /etc/passwd will be
        set as the owner of the network daemon when it is started. This
        is often useful if you want to safeguard against security risks.
        You can set the user of an entry to the nobody user so that if
        the network server security is breached the possible damage is
        minimized.  Typically this field is set to root though, because
        many servers require root privileges in order to function
        correctly.


     server_path
        this field is pathname to the actual server program to execute
        for this entry.


     server_args
        this field comprises the rest of the line and is optional. This
        field is where you place any command line arguments that you
        wish to pass to the server daemon program when it is launched.


  5.8.2.1.  An example /etc/inetd.conf

  As for the /etc/services file all modern distributions will include a
  good /etc/inetd.conf file for you to work with. Here, for completeness
  is the /etc/inetd.conf file from the Debian distribution.



  # /etc/inetd.conf:  see inetd(8) for further informations.
  #
  # Internet server configuration database
  #
  #
  # Modified for Debian by Peter Tobias <tobias@et-inf.fho-emden.de>
  #
  # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
  #
  # Internal services
  #
  #echo           stream  tcp     nowait  root    internal
  #echo           dgram   udp     wait    root    internal
  discard         stream  tcp     nowait  root    internal
  discard         dgram   udp     wait    root    internal
  daytime         stream  tcp     nowait  root    internal
  daytime         dgram   udp     wait    root    internal
  #chargen        stream  tcp     nowait  root    internal
  #chargen        dgram   udp     wait    root    internal
  time            stream  tcp     nowait  root    internal
  time            dgram   udp     wait    root    internal
  #
  # These are standard services.
  #
  telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.telnetd
  ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.ftpd
  #fsp    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.fspd
  #
  # Shell, login, exec and talk are BSD protocols.
  #
  shell   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd
  login   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind
  #exec   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rexecd
  talk    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.talkd
  ntalk   dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.ntalkd
  #
  # Mail, news and uucp services.
  #
  smtp    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.smtpd
  #nntp   stream  tcp     nowait  news    /usr/sbin/tcpd  /usr/sbin/in.nntpd
  #uucp   stream  tcp     nowait  uucp    /usr/sbin/tcpd  /usr/lib/uucp/uucico
  #comsat dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.comsat
  #
  # Pop et al
  #
  #pop-2  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop2d
  #pop-3  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop3d
  #
  # `cfinger' is for the GNU finger server available for Debian.  (NOTE: The
  # current implementation of the `finger' daemon allows it to be run as `root'.)
  #
  #cfinger stream tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.cfingerd
  #finger stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.fingerd
  #netstat        stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/netstat
  #systat stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/ps -auwwx
  #
  # Tftp service is provided primarily for booting.  Most sites
  # run this only on machines acting as "boot servers."
  #
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /boot
  #bootps dgram   udp     wait    root    /usr/sbin/bootpd        bootpd -i -t 120
  #
  # Kerberos authenticated services (these probably need to be corrected)
  #
  #klogin         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k
  #eklogin        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k -x
  #kshell         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd -k
  #
  # Services run ONLY on the Kerberos server (these probably need to be corrected)
  #
  #krbupdate      stream tcp      nowait  root    /usr/sbin/tcpd  /usr/sbin/registerd
  #kpasswd        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/kpasswdd
  #
  # RPC based services
  #
  #mountd/1       dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.mountd
  #rstatd/1-3     dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rstatd
  #rusersd/2-3    dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rusersd
  #walld/1        dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rwalld
  #
  # End of inetd.conf.
  ident           stream  tcp     nowait  nobody  /usr/sbin/identd        identd -i



  5.9.  Other miscellaneous network related configuration files.

  There are a number of miscellaneous files relating to network
  configuration under linux that you might be interested in. You may
  never have to modify these files, but it is worth describing them so
  you know what they contain and what they are for.

  5.9.1.  /etc/protocols

  The /etc/protocols file is a database that maps protocol id numbers
  against protocol names. This is used by programmers to allow them to
  specify protocols by name in their programs and also by some programs
  such as tcpdump to allow them to display names instead of numbers in
  their output. The general syntax of the file is:



         protocolname  number  aliases



  The /etc/protocols file supplied with the Debian distribution is as
  follows:



  # /etc/protocols:
  # $Id: protocols,v 1.1 1995/02/24 01:09:41 imurdock Exp $
  #
  # Internet (IP) protocols
  #
  #       from: @(#)protocols     5.1 (Berkeley) 4/17/89
  #
  # Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992).

  ip      0       IP              # internet protocol, pseudo protocol number
  icmp    1       ICMP            # internet control message protocol
  igmp    2       IGMP            # Internet Group Management
  ggp     3       GGP             # gateway-gateway protocol
  ipencap 4       IP-ENCAP        # IP encapsulated in IP (officially ``IP'')
  st      5       ST              # ST datagram mode
  tcp     6       TCP             # transmission control protocol
  egp     8       EGP             # exterior gateway protocol
  pup     12      PUP             # PARC universal packet protocol
  udp     17      UDP             # user datagram protocol
  hmp     20      HMP             # host monitoring protocol
  xns-idp 22      XNS-IDP         # Xerox NS IDP
  rdp     27      RDP             # "reliable datagram" protocol
  iso-tp4 29      ISO-TP4         # ISO Transport Protocol class 4
  xtp     36      XTP             # Xpress Tranfer Protocol
  ddp     37      DDP             # Datagram Delivery Protocol
  idpr-cmtp       39      IDPR-CMTP       # IDPR Control Message Transport
  rspf    73      RSPF            # Radio Shortest Path First.
  vmtp    81      VMTP            # Versatile Message Transport
  ospf    89      OSPFIGP         # Open Shortest Path First IGP
  ipip    94      IPIP            # Yet Another IP encapsulation
  encap   98      ENCAP           # Yet Another IP encapsulation



  5.9.2.  /etc/networks

  The /etc/networks file has a similar function to that of the
  /etc/hosts file. It provides a simple database of network names
  against network addresses. Its format differs in that there may be
  only two fields per line and that the fields are coded as:



         networkname networkaddress



  An example might look like:



               loopnet    127.0.0.0
               localnet   192.168.0.0
               amprnet    44.0.0.0



  When you use commands like the route command, if a destination is a
  network and that network has an entry in the /etc/networks file then
  the route command will display that network name instead of its
  address.

  5.10.  Network Security and access control.

  Let me start this section by warning you that securing your machine
  and network against malicious attack is a complex art. I do not
  consider myself an expert in this field at all and while the following
  mechanisms I describe will help, if you are serious about security
  then I recommend you do some research of your own into the subject.
  There are many good references on the Internet relating to the
  subject, including the Security-HOWTO

  An important rule of thumb is: `Don't run servers you don't intend to
  use'.  Many distributions come configured with all sorts of services
  configured and automatically started. To ensure even a minimum level
  of safety you should go through your /etc/inetd.conf file and comment
  out (place a `#' at the start of the line) any entries for services
  you don't intend to use.  Good candidates are services such as: shell,
  login, exec, uucp, ftp and informational services such as finger,
  netstat and systat.

  There are all sorts of security and access control mechanisms, I'll
  describe the most elementary of them.

  5.10.1.  /etc/ftpusers

  The /etc/ftpusers file is a simple mechanism that allows you to deny
  certain users from logging into your machine via ftp. The
  /etc/ftpusers file is read by the ftp daemon program (ftpd) when an
  incoming ftp connection is received. The file is a simple list of
  those users who are disallowed from logging in. It might looks
  something like:



               # /etc/ftpusers - users not allowed to login via ftp
               root
               uucp
               bin
               mail



  5.10.2.  /etc/securetty

  The /etc/securetty file allows you to specify which tty devices root
  is allowed to login on. The /etc/securetty file is read by the login
  program (usually /bin/login). Its format is a list of the tty devices
  names allowed, on all others root login is disallowed:



               # /etc/securetty - tty's on which root is allowed to login
               tty1
               tty2
               tty3
               tty4



  5.10.3.  The tcpd  hosts access control mechanism.

  The tcpd program you will have seen listed in the same /etc/inetd.conf
  provides logging and access control mechanisms to services it is
  configured to protect.

  When it is invoked by the inetd program it reads two files containing
  access rules and either allows or denies access to the server it is
  protecting accordingly.

  It will search the rules files until the first match is found. If no
  match is found then it assumes that access should be allowed to
  anyone. The files it searches in sequence are: /etc/hosts.allow,
  /etc/hosts.deny.  I'll describe each of these in turn. For a complete
  description of this facility you should refer to the appropriate man
  pages (hosts_access(5) is a good starting point).

  5.10.3.1.  /etc/hosts.allow

  The /etc/hosts.allow file is a configuration file of the
  /usr/sbin/tcpd program. The hosts.allow file contains rules describing
  which hosts are allowed access to a service on your machine.

  The file format is quite simple:



               # /etc/hosts.allow
               #
               # <service list>: <host list> [: command]



     service list
        is a comma delimited list of server names that this rule applies
        to.  Example server names are: ftpd, telnetd and fingerd.


     host list
        is a comma delimited list of host names. You may also use IP
        addresses here. You may additionally specify hostnames or
        addresses using wildcard characters to match groups of hosts.
        Examples include: gw.vk2ktj.ampr.org to match a specific host,
        .uts.edu.au to match any hostname ending in that string, 44. to
        match any IP address commencing with those digits.  There are
        some special tokens to simplify configuration, some of these
        are: ALL matches every host, LOCAL matches any host whose name
        does not contain a `.' ie is in the same domain as your machine
        and PARANOID matches any host whose name does not match its
        address (name spoofing). There is one last token that is also
        useful. The EXCEPT token allows you to provide a list with
        exceptions. This will be covered in an example later.


     command
        is an optional parameter. This parameter is the full pathname of
        a command that would be executed everytime this rule is matched.
        It could for example run a command that would attempt to
        identify who is logged onto the connecting host, or to generate
        a mail message or some other warning to a system administrator
        that someone is attempting to connect. There are a number of
        expansions that may be included, some common examples are: %h
        expands to the name of the connecting host or address if it
        doesn't have a name, %d the daemon name being called.


  An example:



         # /etc/hosts.allow
         #
         # Allow mail to anyone
         in.smtpd: ALL
         # All telnet and ftp to only hosts within my domain and my host at home.
         telnetd, ftpd: LOCAL, myhost.athome.org.au
         # Allow finger to anyone but keep a record of who they are.
         fingerd: ALL: (finger @%h | mail -s "finger from %h" root)



  5.10.3.2.  /etc/hosts.deny

  The /etc/hosts.deny file is a configuration file of the /usr/sbin/tcpd
  program. The hosts.deny file contains rules describing which hosts are
  disallowed access to a service on your machine.

  A simple sample would look something like this:



         # /etc/hosts.deny
         #
         # Disallow all hosts with suspect hostnames
         ALL: PARANOID
         #
         # Disallow all hosts.
         ALL: ALL



  The PARANOID entry is really redundant because the other entry traps
  everything in any case. Either of these entry would make a reasonable
  default depending on your particular requirement.

  Having an ALL: ALL default in the /etc/hosts.deny and then
  specifically enabling on those services and hosts that you want in the
  /etc/hosts.allow file is the safest configuration.

  5.10.4.  /etc/hosts.equiv

  The hosts.equiv file is used to grant certain hosts and users access
  rights to accounts on your machine without having to supply a
  password. This is useful in a secure environment where you control all
  machines, but is a security hazard otherwise. Your machine is only as
  secure as the least secure of the trusted hosts. To maximize security,
  don't use this mechanism and encourage your users not to use the
  .rhosts file as well.



  5.10.5.  Configure your ftp  daemon properly.

  Many sites will be interested in running an anonymous ftp server to
  allow other people to upload and download files without requiring a
  specific userid. If you decide to offer this facility make sure you
  configure the ftp daemon properly for anonymous access. Most man pages
  for ftpd(8) describe in some length how to go about this. You should
  always ensure that you follow these instructions. An important tip is
  to not use a copy of your /etc/passwd file in the anonymous account
  /etc directory, make sure you strip out all account details except
  those that you must have, otherwise you will be vulnerable to brute
  force password cracking techniques.

  5.10.6.  Network Firewalling.

  Not allowing datagrams to even reach your machine or servers is an
  excellent means of security. This is covered in depth in the Firewall-
  HOWTO, and (more concisely) in a later section of this document.

  5.10.7.  Other suggestions.

  Here are some other, potentially religious suggestions for you to
  consider.



     sendmail
        despite its popularity the sendmail daemon appears with
        frightening regularity on security warning announcements. Its up
        to you, but I choose not to run it.


     NFS and other Sun RPC services
        be wary of these. There are all sorts of possible exploits for
        these services. It is difficult finding an option to services
        like NFS, but if you configure them, make sure you are careful
        with who you allow mount rights to.


  6.  IP- and Ethernet-Related Information

  This section covers information specific to Ethernet and IP. These
  subsections have been grouped together because I think they are the
  most interesting ones in the formerly-called ``Technology Specific''
  Section. Anyone with a LAN should be able to benefit from these
  goodies.

  6.1.  Ethernet

  Ethernet device names are `eth0', `eth1', `eth2' etc. The first card
  detected by the kernel is assigned `eth0' and the rest are assigned
  sequentially in the order they are detected.

  By default, the Linux kernel only probes for one Ethernet device, you
  need to pass command line arguments to the kernel in order to force
  detection of furter boards.

  To learn how to make your ethernet card(s) working under Linux you
  should refer to the Ethernet-HOWTO.

  Once you have your kernel properly built to support your ethernet card
  then configuration of the card is easy.

  Typically you would use something like (which most distributions
  already do for you, if you configured them to support your ethernet):

               root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
               root# route add -net 192.168.0.0 netmask 255.255.255.0 eth0



  Most of the ethernet drivers were developed by Donald Becker,
  becker@CESDIS.gsfc.nasa.gov.


  6.2.  EQL - multiple line traffic equaliser

  The EQL device name is `eql'. With the standard kernel source you may
  have only one EQL device per machine. EQL provides a means of
  utilizing multiple point to point lines such as PPP, slip or plip as a
  single logical link to carry tcp/ip. Often it is cheaper to use
  multiple lower speed lines than to have one high speed line installed.

  Kernel Compile Options:


               Network device support  --->
                   [*] Network device support
                   <*> EQL (serial line load balancing) support



  To support this mechanism the machine at the other end of the lines
  must also support EQL. Linux, Livingstone Portmasters and newer dial-
  in servers support compatible facilities.

  To configure EQL you will need the eql tools which are available from:
  metalab.unc.edu.

  Configuration is fairly straightforward. You start by configuring the
  eql interface. The eql interface is just like any other network
  device. You configure the IP address and mtu using the ifconfig
  utility, so something like:



               root# ifconfig eql 192.168.10.1 mtu 1006



  Next you need to manually initiate each of the lines you will use.
  These may be any combination of point to point network devices. How
  you initiate the connections will depend on what sort of link they
  are, refer to the appropriate sections for further information.

  Lastly you need to associate the serial link with the EQL device, this
  is called `enslaving' and is done with the eql_enslave command as
  shown:



          root# eql_enslave eql sl0 28800
          root# eql_enslave eql ppp0 14400



  The `estimated speed' parameter you supply eql_enslave doesn't do
  anything directly. It is used by the EQL driver to determine what
  share of the datagrams that device should receive, so you can fine
  tune the balancing of the lines by playing with this value.

  To disassociate a line from an EQL device you use the eql_emancipate
  command as shown:



               root# eql_emancipate eql sl0



  You add routing as you would for any other point to point link, except
  your routes should refer to the eql device rather than the actual
  serial devices themselves, typically you would use:



               root# route add default eql



  The EQL driver was developed by Simon Janes, simon@ncm.com.

  6.3.  IP Accounting (for Linux-2.0)

  The IP accounting features of the Linux kernel allow you to collect
  and analyze some network usage data. The data collected comprises the
  number of packets and the number of bytes accumulated since the
  figures were last reset. You may specify a variety of rules to
  categorize the figures to suit whatever purpose you may have. This
  option has been removed in kernel 2.1.102, because the old ipfwadm-
  based firewalling was replaced by ``ipfwchains''.

  Kernel Compile Options:


               Networking options  --->
                   [*] IP: accounting



  After you have compiled and installed the kernel you need to use the
  ipfwadm command to configure IP accounting. There are many different
  ways of breaking down the accounting information that you might
  choose.  I've picked a simple example of what might be useful to use,
  you should read the ipfwadm man page for more information.
  Scenario: You have a ethernet network that is linked to the internet
  via a PPP link. On the ethernet you have a machine that offers a
  number of services and that you are interested in knowing how much
  traffic is generated by each of  ftp and world wide web traffic, as
  well as total tcp and udp traffic.

  You might use a command set that looks like the following, which is
  shown as a shell script:



               #!/bin/sh
               #
               # Flush the accounting rules
               ipfwadm -A -f
               #
               # Set shortcuts
               localnet=44.136.8.96/29
               any=0/0
               # Add rules for local ethernet segment
               ipfwadm -A in  -a -P tcp -D $localnet ftp-data
               ipfwadm -A out -a -P tcp -S $localnet ftp-data
               ipfwadm -A in  -a -P tcp -D $localnet www
               ipfwadm -A out -a -P tcp -S $localnet www
               ipfwadm -A in  -a -P tcp -D $localnet
               ipfwadm -A out -a -P tcp -S $localnet
               ipfwadm -A in  -a -P udp -D $localnet
               ipfwadm -A out -a -P udp -S $localnet
               #
               # Rules for default
               ipfwadm -A in  -a -P tcp -D $any ftp-data
               ipfwadm -A out -a -P tcp -S $any ftp-data
               ipfwadm -A in  -a -P tcp -D $any www
               ipfwadm -A out -a -P tcp -S $any www
               ipfwadm -A in  -a -P tcp -D $any
               ipfwadm -A out -a -P tcp -S $any
               ipfwadm -A in  -a -P udp -D $any
               ipfwadm -A out -a -P udp -S $any
               #
               # List the rules
               ipfwadm -A -l -n
               #



  The names ``ftp-data'' and ``www'' refer to lines in /etc/services.
  The last command lists each of the Accounting rules and displays the
  collected totals.

  An important point to note when analyzing IP accounting is that totals
  for all rules that match will be incremented so that to obtain
  differential figures you need to perform appropriate maths. For
  example if I wanted to know how much data was not ftp nor www I would
  substract the individual totals from the rule that matches all ports.



  root# ipfwadm -A -l -n
  IP accounting rules
   pkts bytes dir prot source               destination          ports
      0     0 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 20
      0     0 out tcp  44.136.8.96/29       0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 80
     10   572 out tcp  44.136.8.96/29       0.0.0.0/0            80 -> *
    252 10943 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> *
    231 18831 out tcp  44.136.8.96/29       0.0.0.0/0             * -> *
      0     0 in  udp  0.0.0.0/0            44.136.8.96/29       * -> *
      0     0 out udp  44.136.8.96/29       0.0.0.0/0            * -> *
      0     0 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 20
      0     0 out tcp  0.0.0.0/0            0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 80
     10   572 out tcp  0.0.0.0/0            0.0.0.0/0            80 -> *
    253 10983 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> *
    231 18831 out tcp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 in  udp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 out udp  0.0.0.0/0            0.0.0.0/0            * -> *



  6.4.  IP Accounting (for Linux-2.2)

  The new accounting code is accessed via ``IP Firewall Chains''.  See
  the IP chains home page for more information.  Among other things,
  you'll now need to use ipchains instead of ipfwadm to configure your
  filters. (From Documentation/Changes in the latest kernel sources).

  6.5.  IP Aliasing

  There are some applications where being able to configure multiple IP
  addresses to a single network device is useful. Internet Service
  Providers often use this facility to provide a `customized' to their
  World Wide Web and ftp offerings for their customers. You can refer to
  the ``IP-Alias mini-HOWTO'' for more information than you find here.

  Kernel Compile Options:


               Networking options  --->
                   ....
                   [*] Network aliasing
                   ....
                   <*> IP: aliasing support



  After compiling and installing your kernel with IP_Alias support
  configuration is very simple. The aliases are added to virtual network
  devices associated with the actual network device. A simple naming
  convention applies to these devices being <devname>:<virtual dev num>,
  e.g. eth0:0, ppp0:10 etc. Note that the the ifname:number device can
  only be configured after the main interface has been set up.

  For example, assume you have an ethernet network that supports two
  different IP subnetworks simultaneously and you wish your machine to
  have direct access to both, you could use something like:



          root# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
          root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0

          root# ifconfig eth0:0 192.168.10.1 netmask 255.255.255.0 up
          root# route add -net 192.168.10.0 netmask 255.255.255.0 eth0:0



  To delete an alias you simply add a `-' to the end of its name and
  refer to it and is as simple as:



               root# ifconfig eth0:0- 0



  All routes associated with that alias will also be deleted
  automatically.

  6.6.  IP Firewall (for Linux-2.0)

  IP Firewall and Firewalling issues are covered in more depth in the
  Firewall-HOWTO. IP Firewalling allows you to secure your machine
  against unauthorized network access by filtering or allowing datagrams
  from or to IP addresses that you nominate. There are three different
  classes of rules, incoming filtering, outgoing filtering and
  forwarding filtering. Incoming rules are applied to datagrams that are
  received by a network device. Outgoing rules are applied to datagrams
  that are to be transmitted by a network device. Forwarding rules are
  applied to datagrams that are received and are not for this machine,
  ie datagrams that would be routed.

  Kernel Compile Options:


               Networking options  --->
                   [*] Network firewalls
                   ....
                   [*] IP: forwarding/gatewaying
                   ....
                   [*] IP: firewalling
                   [ ] IP: firewall packet logging



  Configuration of the IP firewall rules is performed using the ipfwadm
  command. As I mentioned earlier, security is not something I am expert
  at, so while I will present an example you can use, you should do your
  own research and develop your own rules if security is important to
  you.

  Probably the most common use of IP firewall is when you are using your
  linux machine as a router and firewall gateway to protect your local
  network from unauthorized access from outside your network.


  The following configuration is based on a contribution from Arnt
  Gulbrandsen, <agulbra@troll.no>.

  The example describes the configuration of the firewall rules on the
  Linux firewall/router machine illustrated in this diagram:



       -                                   -
        \                                  | 172.16.37.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |  172.16.174.30 | Linux |      |
       NET =================|  f/w  |------|    ..37.19
           |    PPP         | router|      |  --------
          /                 ---------      |--| Mail |
         /                                 |  | /DNS |
        /                                  |  --------
       -                                   -



  The following commands would normally be placed in an rc file so that
  they were automatically started each time the system boots. For
  maximum security they would be performed after the network interfaces
  are configured, but before the interfaces are actually brought up to
  prevent anyone gaining access while the firewall machine is rebooting.



          #!/bin/sh

          # Flush the 'Forwarding' rules table
          # Change the default policy to 'accept'
          #
          /sbin/ipfwadm -F -f
          /sbin/ipfwadm -F -p accept
          #
          # .. and for 'Incoming'
          #
          /sbin/ipfwadm -I -f
          /sbin/ipfwadm -I -p accept

          # First off, seal off the PPP interface
          # I'd love to use '-a deny' instead of '-a reject -y' but then it
          # would be impossible to originate connections on that interface too.
          # The -o causes all rejected datagrams to be logged. This trades
          # disk space against knowledge of an attack of configuration error.
          #
          /sbin/ipfwadm -I -a reject -y -o -P tcp -S 0/0 -D 172.16.174.30

          # Throw away certain kinds of obviously forged packets right away:
          # Nothing should come from multicast/anycast/broadcast addresses
          #
          /sbin/ipfwadm -F -a deny -o -S 224.0/3 -D 172.16.37.0/24
          #
          # and nothing coming from the loopback network should ever be
          # seen on a wire
          #
          /sbin/ipfwadm -F -a deny -o -S 127.0/8 -D 172.16.37.0/24

          # accept incoming SMTP and DNS connections, but only
          # to the Mail/Name Server
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 0/0 -D 172.16.37.19 25 53
          #
          # DNS uses UDP as well as TCP, so allow that too
          # for questions to our name server
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 -D 172.16.37.19 53
          #
          # but not "answers" coming to dangerous ports like NFS and
          # Larry McVoy's NFS extension.  If you run squid, add its port here.
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 53 \
                  -D 172.16.37.0/24 2049 2050

          # answers to other user ports are okay
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 53 \
                  -D 172.16.37.0/24 53 1024:65535

          # Reject incoming connections to identd
          # We use 'reject' here so that the connecting host is told
          # straight away not to bother continuing, otherwise we'd experience
          # delays while ident timed out.
          #
          /sbin/ipfwadm -F -a reject -o -P tcp -S 0/0 -D 172.16.37.0/24 113

          # Accept some common service connections from the 192.168.64 and
          # 192.168.65 networks, they are friends that we trust.
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 192.168.64.0/23 \
                  -D 172.16.37.0/24 20:23

          # accept and pass through anything originating inside
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 172.16.37.0/24 -D 0/0

          # deny most other incoming TCP connections and log them
          # (append 1:1023 if you have problems with ftp not working)
          #
          /sbin/ipfwadm -F -a deny -o -y -P tcp -S 0/0 -D 172.16.37.0/24

          # ... for UDP too
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 -D 172.16.37.0/24



  Good firewall configurations are a little tricky. This example should
  be a reasonable starting point for you. The ipfwadm manual page offers
  some assistance in how to use the tool. If you intend to configure a
  firewall, be sure to ask around and get as much advice from sources
  you consider reliable and get someone to test/sanity check your
  configuration from the outside.

  6.7.  IP Firewall (for Linux-2.2)

  The new firewalling code is accessed via ``IP Firewall Chains''.  See
  the IP chanins home page for more information.  Among other things,
  you'll now need to use ipchains instead of ipfwadm to configure your
  filters. (From Documentation/Changes in the latest kernel sources).

  We are aware that this is a sorely out of date statement and we are
  currently working on getting this section more current. You can expect
  a newer version in August of 1999.


  6.8.  IPIP Encapsulation

  Why would you want to encapsulate IP datagrams within IP datagrams? It
  must seem an odd thing to do if you've never seen an application of it
  before.  Ok, here are a couple of common places where it is used:
  Mobile-IP and IP-Multicast. What is perhaps the most widely spread use
  of it though is also the least well known, Amateur Radio.

  Kernel Compile Options:


               Networking options  --->
                   [*] TCP/IP networking
                   [*] IP: forwarding/gatewaying
                   ....
                   <*> IP: tunneling



  IP tunnel devices are called `tunl0', `tunl1' etc.

  "But why ?". Ok, ok. Conventional IP routing rules mandate that an IP
  network comprises a network address and a network mask. This produces
  a series of contiguous addresses that may all be routed via a single
  routing entry.  This is very convenient, but it means that you may
  only use any particular IP address while you are connected to the
  particular piece of network to which it belongs. In most instances
  this is ok, but if you are a mobile netizen then you may not be able
  to stay connected to the one place all the time. IP/IP encapsulation
  (IP tunneling) allows you to overcome this restriction by allowing
  datagrams destined for your IP address to be wrapped up and redirected
  to another IP address. If you know that you're going to be operating
  from some other IP network for some time you can set up a machine on
  your home network to accept datagrams to your IP address and redirect
  them to the address that you will actually be using temporarily.

  6.8.1.  A tunneled network configuration.



        192.168.1/24                          192.168.2/24

            -                                     -
            |      ppp0 =            ppp0 =       |
            |  aaa.bbb.ccc.ddd  fff.ggg.hhh.iii   |
            |                                     |
            |   /-----\                 /-----\   |
            |   |     |       //        |     |   |
            |---|  A  |------//---------|  B  |---|
            |   |     |     //          |     |   |
            |   \-----/                 \-----/   |
            |                                     |
            -                                     -



  The diagram illustrates another possible reason to use IPIP encapsula-
  tion, virtual private networking. This example presupposes that you
  have two machines each with a simple dial up internet connection. Each
  host is allocated just a single IP address. Behind each of these
  machines are some private local area networks configured with reserved
  IP network addresses. Suppose that you want to allow any host on net-
  work A to connect to any host on network B, just as if they were prop-
  erly connected to the Internet with a network route. IPIP encapsula-
  tion will allow you to do this. Note, encapsulation does not solve the
  problem of how you get the hosts on networks A and B to talk to any
  other on the Internet, you still need tricks like IP Masquerade for
  that.  Encapsulation is normally performed by machine functioning as
  routers.

  Linux router `A' would be configured with a script like the following:



          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=fff.ggg.hhh.iii
          #
          # Ethernet configuration
          ifconfig eth0 192.168.1.1 netmask $mask up
          route add -net 192.168.1.0 netmask $mask eth0
          #
          # ppp0 configuration (start ppp link, set default route)
          pppd
          route add default ppp0
          #
          # Tunnel device configuration
          ifconfig tunl0 192.168.1.1 up
          route add -net 192.168.2.0 netmask $mask gw $remotegw tunl0



  Linux router `B' would be configured with a similar script:



               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=aaa.bbb.ccc.ddd
               #
               # Ethernet configuration
               ifconfig eth0 192.168.2.1 netmask $mask up
               route add -net 192.168.2.0 netmask $mask eth0
               #
               # ppp0 configuration (start ppp link, set default route)
               pppd
               route add default ppp0
               #
               # Tunnel device configuration
               ifconfig tunl0 192.168.2.1 up
               route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0



  The command:



               route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0



  reads: `Send any datagrams destined for 192.168.1.0/24 inside an IPIP
  encap datagram with a destination address of aaa.bbb.ccc.ddd'.

  Note that the configurations are reciprocated at either end. The
  tunnel device uses the `gw' in the route as the destination of the IP
  datagram in which it will place the datagram it has received to route.
  That machine must know how to decapsulate IPIP datagrams, that is, it
  must also be configured with a tunnel device.

  6.8.2.  A tunneled host configuration.

  It doesn't have to be a whole network you route. You could for example
  route just a single IP address. In that instance you might configure
  the tunl device on the `remote' machine with its home IP address and
  at the A end just use a host route (and Proxy Arp) rather than a
  network route via the tunnel device. Let's redraw and modify our
  configuration appropriately. Now we have just host `B' which to want
  to act and behave as if it is both fully connected to the Internet and
  also part of the remote network supported by host `A':



        192.168.1/24

            -
            |      ppp0 =                ppp0 =
            |  aaa.bbb.ccc.ddd      fff.ggg.hhh.iii
            |
            |   /-----\                 /-----\
            |   |     |       //        |     |
            |---|  A  |------//---------|  B  |
            |   |     |     //          |     |
            |   \-----/                 \-----/
            |                      also: 192.168.1.12
            -



  Linux router `A' would be configured with:



               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=fff.ggg.hhh.iii
               #
               # Ethernet configuration
               ifconfig eth0 192.168.1.1 netmask $mask up
               route add -net 192.168.1.0 netmask $mask eth0
               #
               # ppp0 configuration (start ppp link, set default route)
               pppd
               route add default ppp0
               #
               # Tunnel device configuration
               ifconfig tunl0 192.168.1.1 up
               route add -host 192.168.1.12 gw $remotegw tunl0
               #
               # Proxy ARP for the remote host
               arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub



  Linux host `B' would be configured with:



          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=aaa.bbb.ccc.ddd
          #
          # ppp0 configuration (start ppp link, set default route)
          pppd
          route add default ppp0
          #
          # Tunnel device configuration
          ifconfig tunl0 192.168.1.12 up
          route add -net 192.168.1.0 netmask $mask gw $remotegwtunl0



  This sort of configuration is more typical of a Mobile-IP application.
  Where a single host wants to roam around the Internet and maintain a
  single usable IP address the whole time. You should refer to the
  Mobile-IP section for more information on how that is handled in
  practice.

  6.9.  IP Masquerade

  Many people have a simple dialup account to connect to the Internet.
  Nearly everybody using this sort of configuration is allocated a
  single IP address by the Internet Service Provider. This is normally
  enough to allow only one host full access to the network. IP
  Masquerade is a clever trick that enables you to have many machines
  make use of that one IP address, by causing the other hosts to look
  like, hence the term masquerade, the machine supporting the dialup
  connection. There is a small caveat and that is that the masquerade
  function nearly always works only in one direction, that is the
  masqueraded hosts can make calls out, but they cannot accept or
  receive network connections from remote hosts. This means that some
  network services do not work such as talk and others such as ftp must
  be configured to operate in passive (PASV) mode to operate.
  Fortunately the most common network services such as telnet, World
  Wide Web and irc do work just fine.

  Kernel Compile Options:


               Code maturity level options  --->
                   [*] Prompt for development and/or incomplete code/drivers
               Networking options  --->
                   [*] Network firewalls
                   ....
                   [*] TCP/IP networking
                   [*] IP: forwarding/gatewaying
                   ....
                   [*] IP: masquerading (EXPERIMENTAL)



  Normally you have your linux machine supporting a slip or PPP dialup
  line just as it would if it were a standalone machine. Additionally it
  would have another network device configured, perhaps an ethernet,
  configured with one of the reserved network addresses. The hosts to be
  masqueraded would be on this second network. Each of these hosts would
  have the IP address of the ethernet port of the linux machine set as
  their default gateway or router.

  A typical configuration might look something like this:



       -                                   -
        \                                  | 192.168.1.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |                | Linux | .1.1 |
       NET =================| masq  |------|
           |    PPP/slip    | router|      |  --------
          /                 ---------      |--| host |
         /                                 |  |      |
        /                                  |  --------
       -                                   -



  Masquerading with IPFWADM

  The most relevant commands for this configuration are:



               # Network route for ethernet
               route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               #
               # Default route to the rest of the internet.
               route add default ppp0
               #
               # Cause all hosts on the 192.168.1/24 network to be masqueraded.
               ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0



  Masquerading with IPCHAINS

  This is similar to using IPFWADM but the command structure has
  changed:



               # Network route for ethernet
               route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               #
               # Default route to the rest of the internet.
               route add default ppp0
               #
               # Cause all hosts on the 192.168.1/24 network to be masqueraded.
               ipchains -A forward -s 192.168.1.0/24 -j MASQ



  You can get more information on the Linux IP Masquerade feature from
  the IP Masquerade Resource Page. Also, a very detailed document about
  masquesrading is the ``IP-Masquerade mini-HOWTO'' (which also intructs
  to configure other OS's to run with a Linux masquerade server).
  6.10.  IP Transparent Proxy

  IP transparent proxy is a feature that enables you to redirect servers
  or services destined for another machine to those services on this
  machine.  Typically this would be useful where you have a linux
  machine as a router and also provides a proxy server. You would
  redirect all connections destined for that service remotely to the
  local proxy server.

  Kernel Compile Options:


               Code maturity level options  --->
                       [*] Prompt for development and/or incomplete code/drivers
               Networking options  --->
                       [*] Network firewalls
                       ....
                       [*] TCP/IP networking
                       ....
                       [*] IP: firewalling
                       ....
                       [*] IP: transparent proxy support (EXPERIMENTAL)



  Configuration of the transparent proxy feature is performed using the
  ipfwadm command

  An example that might be useful is as follows:



               root# ipfwadm -I -a accept -D 0/0 telnet -r 2323



  This example will cause any connection attempts to port telnet (23) on
  any host to be redirected to port 2323 on this host. If you run a
  service on that port, you could forward telnet connections, log them
  or do whatever fits your need.

  A more interesting example is redirecting all http traffic through a
  local cache. However, the protocol used by proxy servers is different
  from native http: where a client connects to www.server.com:80 and
  asks for /path/page, when it connects to the local cache it contacts
  proxy.local.domain:8080 and asks for www.server.com/path/page.

  To filter an http request through the local proxy, you need to adapt
  the protocol by inserting a small server, called transproxy (you can
  find it on the world wide web). You can choose to run transproxy on
  port 8081, and issue this command:



               root# ipfwadm -I -a accept -D 0/0 80 -r 8081



  The transproxy program, then, will receive all connections meant to
  reach external servers and will pass them to the local proxy after
  fixing protocol differences.


  6.11.  IPv6

  Just when you thought you were beginning to understand IP networking
  the rules get changed! IPv6 is the shorthand notation for version 6 of
  the Internet Protocol. IPv6 was developed primarily to overcome the
  concerns in the Internet community that there would soon be a shortage
  of IP addresses to allocate. IPv6 addresses are 16 bytes long (128
  bits). IPv6 incorporates a number of other changes, mostly
  simplifications, that will make IPv6 networks more managable than IPv4
  networks.

  Linux already has a working, but not complete, IPv6 implementation in
  the 2.2.* series kernels.

  If you wish to experiment with this next generation Internet
  technology, or have a requirement for it, then you should read the
  IPv6-FAQ which is available from www.terra.net.

  6.12.  Mobile IP

  The term "IP mobility" describes the ability of a host that is able to
  move its network connection from one point on the Internet to another
  without changing its IP address or losing connectivity. Usually when
  an IP host changes its point of connectivity it must also change its
  IP address.  IP Mobility overcomes this problem by allocating a fixed
  IP address to the mobile host and using IP encapsulation (tunneling)
  with automatic routing to ensure that datagrams destined for it are
  routed to the actual IP address it is currently using.

  A project is underway to provide a complete set of IP mobility tools
  for Linux.  The Status of the project and tools may be obtained from
  the: Linux Mobile IP Home Page.

  6.13.  Multicast

  IP Multicast allows an arbitrary number of IP hosts on disparate IP
  networks to have IP datagrams simultaneously routed to them. This
  mechanism is exploited to provide Internet wide "broadcast" material
  such as audio and video transmissions and other novel applications.

  Kernel Compile Options:


       Networking options  --->
               [*] TCP/IP networking
               ....
               [*] IP: multicasting



  A suite of tools and some minor network configuration is required.
  Please check the Multicast-HOWTO for more information on Multicast
  support in Linux.

  6.14.  NAT - Network Address Translation

  The IP Network Address Translation facility is pretty much the
  standardized big brother of the Linux IP Masquerade facility. It is
  specified in some detail in RFC-1631 at your nearest RFC archive. NAT
  provides features that IP-Masquerade does not that make it eminently
  more suitable for use in corporate firewall router designs and larger
  scale installations.

  An alpha implementation of NAT for Linux 2.0.29 kernel has been
  developed by Michael.Hasenstein, Michael.Hasenstein@informatik.tu-
  chemnitz.de. Michaels documentation and implementation are available
  from:

  Linux IP Network Address Web Page

  Newer Linux 2.2.x kernels also include some NAT functionality in the
  routing algorithm.

  6.15.  Traffic Shaper - Changing allowed bandwidth

  The traffic shaper is a driver that creates new interface devices,
  those devices are traffic-limited in a user-defined way, they rely on
  physical network devices for actual transmission and can be used as
  outgoing routed for network traffic.

  The shaper was introduced in Linux-2.1.15 and was backported to
  Linux-2.0.36 (it appeared in 2.0.36-pre-patch-2 distributed by Alan
  Cox, the author of the shaper device and maintainer of Linux-2.0).

  The traffic shaper can only be compiled as a module and is configured
  by the shapecfg program with commands like the following:



               shapecfg attach shaper0 eth1
               shapecfg speed shaper0 64000



  The shaper device can only control the bandwidth of outgoing traffic,
  as packets are transmitted via the shaper only according to the
  routing tables; therefore, a ``route by source address'' functionality
  could help in limiting the overall bandwidth of specific hosts using a
  Linux router.

  Linux-2.2 already has support for such routing, if you need it for
  Linux-2.0 please check the patch by Mike McLagan, at ftp.invlogic.com.
  Refer to Documentationnetworking/shaper.txt for further information
  about the shaper.

  If you want to try out a (tentative) shaping for incoming packets, try
  out rshaper-1.01 (or newer), from ftp.systemy.it.

  6.16.  Routing in Linux-2.2

  The latest versions of Linux, 2.2 offer a lot of flexibility in
  routing policy. Unfortunately, you have to wait for the next version
  of this howto, or go read the kernel sources.


  7.  Using common PC hardware


  7.1.  ISDN

  The Integrated Services Digital Network (ISDN) is a series of
  standards that specify a general purpose switched digital data
  network. An ISDN `call' creates a synchronous point to point data
  service to the destination. ISDN is generally delivered on a high
  speed link that is broken down into a number of discrete channels.
  There are two different types of channels, the `B Channels' which will
  actually carry the user data and a single channel called the `D
  channel' which is used to send control information to the ISDN
  exchange to establish calls and other functions. In Australia for
  example, ISDN may be delivered on a 2Mbps link that is broken into 30
  discrete 64kbps B channels with one 64kbps D channel. Any number of
  channels may be used at a time and in any combination. You could for
  example establish 30 separate calls to 30 different destinations at
  64kbps each, or you could establish 15 calls to 15 different
  destinations at 128kbps each (two channels used per call), or just a
  small number of calls and leave the rest idle. A channel may be used
  for either incoming or outgoing calls. The original intention of ISDN
  was to allow Telecommunications companies to provide a single data
  service which could deliver either telephone (via digitised voice) or
  data services to your home or business without requiring you to make
  any special configuration changes.

  There are a few different ways to connect your computer to an ISDN
  service.  One way is to use a device called a `Terminal Adaptor' which
  plugs into the Network Terminating Unit that you telecommunications
  carrier will have installed when you got your ISDN service and
  presents a number of serial interfaces. One of those interfaces is
  used to enter commands to establish calls and configuration and the
  others are actually connected to the network devices that will use the
  data circuits when they are established. Linux will work in this sort
  of configuration without modification, you just treat the port on the
  Terminal Adaptor like you would treat any other serial device.
  Another way, which is the way the kernel ISDN support is designed for
  allows you to install an ISDN card into your Linux machine and then
  has your Linux software handle the protocols and make the calls
  itself.

  Kernel Compile Options:


               ISDN subsystem  --->
                       <*> ISDN support
                       [ ] Support synchronous PPP
                       [ ] Support audio via ISDN
                       < > ICN 2B and 4B support
                       < > PCBIT-D support
                       < > Teles/NICCY1016PC/Creatix support



  The Linux implementation of ISDN supports a number of different types
  of internal ISDN cards. These are those listed in the kernel
  configuration options:


  o  ICN 2B and 4B

  o  Octal PCBIT-D

  o  Teles ISDN-cards and compatibles


  Some of these cards require software to be downloaded to them to make
  them operational. There is a separate utility to do this with.


  Full details on how to configure the Linux ISDN support is available
  from the /usr/src/linux/Documentation/isdn/ directory and an FAQ
  dedicated to isdn4linux is available at www.lrz-muenchen.de.  (You can
  click on the english flag to get an english version).

  A note about PPP. The PPP suite of protocols will operate over either
  asynchronous or synchronous serial lines. The commonly distributed PPP
  daemon for Linux `pppd' supports only asynchronous mode. If you wish
  to run the PPP protocols over your ISDN service you need a specially
  modified version. Details of where to find it are available in the
  documentation referred to above.

  7.2.  PLIP for Linux-2.0

  PLIP device names are `plip0', `plip1 and plip2.

  Kernel Compile Options:


               Network device support  --->
                   <*> PLIP (parallel port) support



  plip (Parallel Line IP), is like SLIP, in that it is used for
  providing a point to point network connection between two machines,
  except that it is designed to use the parallel printer ports on your
  machine instead of the serial ports (a cabling diagram in included in
  the cabling diagram section later in this document). Because it is
  possible to transfer more than one bit at a time with a parallel port,
  it is possible to attain higher speeds with the plip interface than
  with a standard serial device.  In addition, even the simplest of
  parallel ports, printer ports, can be used in lieu of you having to
  purchase comparatively expensive 16550AFN UART's for your serial
  ports. PLIP uses a lot of CPU compared to a serial link and is most
  certainly not a good option if you can obtain some cheap ethernet
  cards, but it will work when nothing else is available and will work
  quite well.  You should expect a data transfer rate of about 20
  kilobytes per second when a link is running well.

  The PLIP device drivers competes with the parallel device driver for
  the parallel port hardware. If you wish to use both drivers then you
  should compile them both as modules to ensure that you are able to
  select which port you want to use for PLIP and which ports you want
  for the printer driver.  Refer to the ``Mudules mini-HOWTO'' for more
  information on kernel module configuration.

  Please note that some laptops use chipsets that will not work with
  PLIP because they do not allow some combinations of signals that PLIP
  relies on, that printers don't use.

  The Linux plip interface is compatible with the Crynwyr Packet Driver
  PLIP and this will mean that you can connect your Linux machine to a
  DOS machine running any other sort of tcp/ip software via plip.

  In the 2.0.* series kernel the plip devices are mapped to i/o port and
  IRQ as follows:



          device  i/o     IRQ
          ------  -----   ---
          plip0   0x3bc   5
          plip1   0x378   7
          plip2   0x278   2



  If your parallel ports don't match any of the above combinations then
  you can change the IRQ of a port using the ifconfig command using the
  `irq' parameter (be sure to enable IRQ's on your printer ports in your
  ROM BIOS if it supports this option). As an alternative, you can
  specify ``io='' annd ``irq='' options on the insmod command line, if
  you use modules. For example:



               root# insmod plip.o io=0x288 irq=5



  PLIP operation is controlled by two timeouts, whose default values are
  probably ok in most cases. You will probably need to increase them if
  you have an especially slow computer, in which case the timers to
  increase are actually on the other computer.  A program called
  plipconfig exists that allows you to change these timer settings
  without recompiling your kernel. It is supplied with many Linux
  distributions.

  To configure a plip interface, you will need to invoke the following
  commands (or add them to your initialization scripts):



               root# /sbin/ifconfig plip1 localplip pointopoint remoteplip
               root# /sbin/route add remoteplip plip1



  Here, the port being used is the one at I/O address 0x378; localplip
  amd remoteplip are the names or IP addresses used over the PLIP cable.
  I personally keep them in my /etc/hosts database:



               # plip entries
               192.168.3.1   localplip
               192.168.3.2   remoteplip



  The pointopoint parameter has the same meaning as for SLIP, in that it
  specifies the address of the machine at the other end of the link.

  In almost all respects you can treat a plip interface as though it
  were a SLIP interface, except that neither dip nor slattach need be,
  nor can be, used.

  Further information on PLIP may be obtained from the ``PLIP mini-
  HOWTO''.

  7.3.  PLIP for Linux-2.2

  During development of the 2.1 kernel versions, support for the
  parallel port was changed to a better setup.

  Kernel Compile Options:


               General setup  --->
                   [*] Parallel port support
               Network device support  --->
                   <*> PLIP (parallel port) support



  The new code for PLIP behaves like the old one (use the same ifconfig
  and route commands as in the previous section, but initialization of
  the device is different due to the advanced parallel port support.

  The ``first'' PLIP device is always called ``plip0'', where first is
  the first device detected by the system, similarly to what happens for
  Ethernet devices. The actual parallel port being used is one of the
  available ports, as shown in /proc/parport. For example, if you have
  only one parallel port, you'll only have a directory called
  /proc/parport/0.

  If your kernel didn't detect the IRQ number used by your port,
  ``insmod plip'' will fail; in this case just write the right number to
  /proc/parport/0/irq and reinvoke insmod.

  Complete information about parallel port management is available in
  the file Documentation/parport.txt, part of your kernel sources.

  7.4.  PPP

  PPP devices names are `ppp0', `ppp1, etc. Devices are numbered
  sequentially with the first device configured receiving `0'.

  Kernel Compile Options:


               Networking options  --->
                   <*> PPP (point-to-point) support



  PPP configuration is covered in detail in the PPP-HOWTO.

  7.4.1.  Maintaining a permanent connection to the net with pppd .

  If you are fortunate enough to have a semi permanent connection to the
  net and would like to have your machine automatically redial your PPP
  connection if it is lost then here is a simple trick to do so.
  Configure PPP such that it can be started by the root user by issuing
  the command:


       # pppd



  Be sure that you have the `-detach' option configured in your
  /etc/ppp/options file. Then, insert the following line into your
  /etc/inittab file, down with the getty definitions:


       pd:23:respawn:/usr/sbin/pppd



  This will cause the init program to spawn and monitor the pppd program
  and automatically restart it if it dies.

  7.5.  SLIP client

  SLIP devices are named `sl0', `sl1' etc. with the first device
  configured being assigned `0' and the rest incrementing sequentially
  as they are configured.

  Kernel Compile Options:


               Network device support  --->
                   [*] Network device support
                   <*> SLIP (serial line) support
                   [ ]  CSLIP compressed headers
                   [ ]  Keepalive and linefill
                   [ ]  Six bit SLIP encapsulation



  SLIP (Serial Line Internet Protocol) allows you to use tcp/ip over a
  serial line, be that a phone line with a dialup modem, or a leased
  line of some sort.  Of course to use SLIP you need access to a SLIP-
  server in your area. Many universities and businesses provide SLIP
  access all over the world.

  Slip uses the serial ports on your machine to carry IP datagrams. To
  do this it must take control of the serial device. Slip device names
  are named sl0, sl1 etc. How do these correspond to your serial devices
  ? The networking code uses what is called an ioctl (i/o control) call
  to change the serial devices into SLIP devices. There are two programs
  supplied that can do this, they are called dip and slattach

  7.5.1.  dip

  dip (Dialup IP) is a smart program that is able to set the speed of
  the serial device, command your modem to dial the remote end of the
  link, automatically log you into the remote server, search for
  messages sent to you by the server and extract information for them
  such as your IP address and perform the ioctl necessary to switch your
  serial port into SLIP mode. dip has a powerful scripting ability and
  it is this that you can exploit to automate your logon procedure.

  You can find it at: metalab.unc.edu.

  To install it, try the following:



               user% tar xvzf dip337o-uri.tgz
               user% cd dip-3.3.7o
               user% vi Makefile
               root# make install



  The Makefile assumes the existence of a group called uucp, but you
  might like to change this to either dip or SLIP depending on your
  configuration.

  7.5.2.  slattach

  slattach as contrasted with dip is a very simple program, that is very
  easy to use, but does not have the sophistication of dip.  It does not
  have the scripting ability, all it does is configure your serial
  device as a SLIP device. It assumes you have all the information you
  need and the serial line is established before you invoke it. slattach
  is ideal to use where you have a permanent connection to your server,
  such as a physical cable, or a leased line.

  7.5.3.  When do I use which ?

  You would use dip when your link to the machine that is your SLIP
  server is a dialup modem, or some other temporary link. You would use
  slattach when you have a leased line, perhaps a cable, between your
  machine and the server and there is no special action needed to get
  the link working. See section `Permanent Slip connection' for more
  information.

  Configuring SLIP is much like configuring an Ethernet interface (read
  section `Configuring an ethernet device' above). However there are a
  few key differences.

  First of all, SLIP links are unlike ethernet networks in that there is
  only ever two hosts on the network, one at each end of the link.
  Unlike an ethernet that is available for use as soon are you are
  cabled, with SLIP, depending on the type of link you have, you may
  have to initialize your network connection in some special way.

  If you are using dip then this would not normally be done at boot
  time, but at some time later, when you were ready to use the link.  It
  is possible to automate this procedure. If you are using slattach then
  you will probably want to add a section to your rc.inet1 file.  This
  will be described soon.

  There are two major types of SLIP servers: Dynamic IP address servers
  and static IP address servers. Almost every SLIP server will prompt
  you to login using a username and password when dialing in. dip can
  handle logging you in automatically.

  7.5.4.  Static SLIP server with a dialup line and DIP.

  A static SLIP server is one in which you have been supplied an IP
  address that is exclusively yours. Each time you connect to the
  server, you will configure your SLIP port with that address. The
  static SLIP server will answer your modem call, possibly prompt you
  for a username and password, and then route any datagrams destined for
  your address to you via that connection. If you have a static server,
  then you may want to put entries for your hostname and IP address
  (since you know what it will be) into your /etc/hosts. You should also
  configure some other files such as: rc.inet2, host.conf, resolv.conf,
  /etc/HOSTNAME and rc.local. Remember that when configuring rc.inet1,
  you don't need to add any special commands for your SLIP connection
  since it is dip that does all of the hard work for you in configuring
  your interface. You will need to give dip the appropriate information
  and it will configure the interface for you after commanding the modem
  to establish the call and logging you into your SLIP server.

  If this is how your SLIP server works then you can move to section
  `Using Dip' to learn how to configure dip appropriately.

  7.5.5.  Dynamic SLIP server with a dialup line and DIP.

  A dynamic SLIP server is one which allocates you an IP address
  randomly, from a pool of addresses, each time you logon. This means
  that there is no guarantee that you will have any particular address
  each time, and that address may well be used by someone else after you
  have logged off.  The network administrator who configured the SLIP
  server will have assigned a pool of address for the SLIP server to
  use, when the server receives a new incoming call, it finds the first
  unused address, guides the caller through the login process and then
  prints a welcome message that contains the IP address it has allocated
  and will proceed to use that IP address for the duration of that call.

  Configuring for this type of server is similar to configuring for a
  static server, except that you must add a step where you obtain the IP
  address that the server has allocated for you and configure your SLIP
  device with that.

  Again, dip does the hard work and new versions are smart enough to not
  only log you in, but to also be able to automatically read the IP
  address printed in the welcome message and store it so that you can
  have it configure your SLIP device with it.

  If this is how your SLIP server works then you can move to section
  `Using Dip' to learn how to configure dip appropriately.

  7.5.6.  Using DIP.

  As explained earlier, dip is a powerful program that can simplify and
  automate the process of dialing into the SLIP server, logging you in,
  starting the connection and configuring your SLIP devices with the
  appropriate ifconfig and route commands.

  Essentially to use dip you'll write a `dip script', which is basically
  a list of commands that dip understands that tell dip how to perform
  each of the actions you want it to perform. See sample.dip that comes
  supplied with dip to get an idea of how it works. dip is quite a
  powerful program, with many options.  Instead of going into all of
  them here you should look at the man page, README and sample files
  that will have come with your version of dip.

  You may notice that the sample.dip script assumes that you're using a
  static SLIP server, so you know what your IP address is beforehand.
  For dynamic SLIP servers, the newer versions of dip include a command
  you can use to automatically read and configure your SLIP device with
  the IP address that the dynamic server allocates for you. The
  following sample is a modified version of the sample.dip that came
  supplied with dip337j-uri.tgz and is probably a good starting point
  for you.  You might like to save it as /etc/dipscript and edit it to
  suit your configuration:

       #
       # sample.dip    Dialup IP connection support program.
       #
       #               This file (should show) shows how to use the DIP
       #       This file should work for Annex type dynamic servers, if you
       #       use a static address server then use the sample.dip file that
       #       comes as part of the dip337-uri.tgz package.
       #
       #
       # Version:      @(#)sample.dip  1.40    07/20/93
       #
       # Author:       Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
       #

       main:
       # Next, set up the other side's name and address.
       # My dialin machine is called 'xs4all.hacktic.nl' (== 193.78.33.42)
       get $remote xs4all.hacktic.nl
       # Set netmask on sl0 to 255.255.255.0
       netmask 255.255.255.0
       # Set the desired serial port and speed.
       port cua02
       speed 38400

       # Reset the modem and terminal line.
       # This seems to cause trouble for some people!
       reset

       # Note! "Standard" pre-defined "errlevel" values:
       #  0 - OK
       #  1 - CONNECT
       #  2 - ERROR
       #
       # You can change those grep'ping for "addchat()" in *.c...

       # Prepare for dialing.
       send ATQ0V1E1X4\r
       wait OK 2
       if $errlvl != 0 goto modem_trouble
       dial 555-1234567
       if $errlvl != 1 goto modem_trouble

       # We are connected.  Login to the system.
       login:
       sleep 2
       wait ogin: 20
       if $errlvl != 0 goto login_trouble
       send MYLOGIN\n
       wait ord: 20
       if $errlvl != 0 goto password_error
       send MYPASSWD\n
       loggedin:

       # We are now logged in.
       wait SOMEPROMPT 30
       if $errlvl != 0 goto prompt_error

       # Command the server into SLIP mode
       send SLIP\n
       wait SLIP 30
       if $errlvl != 0 goto prompt_error

       # Get and Set your IP address from the server.
       #   Here we assume that after commanding the SLIP server into SLIP
       #   mode that it prints your IP address
       get $locip remote 30
  if $errlvl != 0 goto prompt_error

  # Set up the SLIP operating parameters.
  get $mtu 296
  # Ensure "route add -net default xs4all.hacktic.nl" will be done
  default

  # Say hello and fire up!
  done:
  print CONNECTED $locip ---> $rmtip
  mode CSLIP
  goto exit

  prompt_error:
  print TIME-OUT waiting for sliplogin to fire up...
  goto error

  login_trouble:
  print Trouble waiting for the Login: prompt...
  goto error

  password:error:
  print Trouble waiting for the Password: prompt...
  goto error

  modem_trouble:
  print Trouble occurred with the modem...
  error:
  print CONNECT FAILED to $remote
  quit

  exit:
  exit



  The above example assumes you are calling a dynamic SLIP server, if
  you are calling a static SLIP server, then the sample.dip file that
  comes with dip337j-uri.tgz should work for you.

  When dip is given the get $local command it searches the incoming text
  from the remote end for a string that looks like an IP address, ie
  strings numbers separated by `.' characters. This modification was put
  in place specifically for dynamic SLIP servers, so that the process of
  reading the IP address granted by the server could be automated.

  The example above will automatically create a default route via your
  SLIP link, if this is not what you want, you might have an ethernet
  connection that should be your default route, then remove the default
  command from the script.  After this script has finished running, if
  you do an ifconfig command, you will see that you have a device sl0.
  This is your SLIP device.  Should you need to, you can modify its
  configuration manually, after the dip command has finished, using the
  ifconfig and route commands.

  Please note that dip allows you to select a number of different
  protocols to use with the mode command, the most common example is
  cSLIP for SLIP with compression. Please note that both ends of the
  link must agree, so you should ensure that whatever you select agrees
  with what your server is set to.

  The above example is fairly robust and should cope with most errors.
  Please refer to the dip man page for more information. Naturally you
  could, for example, code the script to do such things as redial the
  server if it doesn't get a connection within a prescribed period of
  time, or even try a series of servers if you have access to more than
  one.

  7.5.7.  Permanent SLIP connection using a leased line and slattach.

  If you have a cable between two machines, or are fortunate enough to
  have a leased line, or some other permanent serial connection between
  your machine and another, then you don't need to go to all the trouble
  of using dip to set up your serial link. slattach is a very simple to
  use utility that will allow you just enough functionality to configure
  your connection.

  Since your connection will be a permanent one, you will want to add
  some commands to your rc.inet1 file. In essence all you need to do for
  a permanent connection is ensure that you configure the serial device
  to the correct speed and switch the serial device into SLIP mode.
  slattach allows you to do this with one command. Add the following to
  your rc.inet1 file:



               #
               # Attach a leased line static SLIP connection
               #
               #  configure /dev/cua0 for 19.2kbps and cslip
               /sbin/slattach -p cslip -s 19200 /dev/cua0 &
               /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
               #
               # End static SLIP.



  Where:


     IPA.IPA.IPA.IPA
        represents your IP address.


     IPR.IPR.IPR.IPR
        represents the IP address of the remote end.


  slattach allocates the first unallocated SLIP device to the serial
  device specified. slattach starts with sl0. Therefore the first
  slattach command attaches SLIP device sl0 to the serial device
  specified and sl1 the next time, etc.

  slattach allows you to configure a number of different protocols with
  the -p argument. In your case you will use either SLIP or cSLIP
  depending on whether you want to use compression or not.  Note: both
  ends must agree on whether you want compression or not.

  7.6.  SLIP server.

  If you have a machine that is perhaps network connected, that you'd
  like other people be able to dial into and provide network services,
  then you will need to configure your machine as a server. If you want
  to use SLIP as the serial line protocol, then currently you have three
  options as to how to configure your Linux machine as a SLIP server. My
  preference would be to use the first presented, sliplogin, as it seems
  the easiest to configure and understand, but I will present a summary
  of each, so you can make your own decision.

  7.6.1.  Slip Server using sliplogin .

  sliplogin is a program that you can use in place of the normal login
  shell for SLIP users that converts the terminal line into a SLIP line.
  It allows you to configure your Linux machine as either a static
  address server, users get the same address everytime they call in, or
  a dynamic address server, where users get an address allocated for
  them which will not necessarily be the same as the last time they
  called.

  The caller will login as per the standard login process, entering
  their username and password, but instead of being presented with a
  shell after their login, sliplogin is executed which searches its
  configuration file (/etc/slip.hosts) for an entry with a login name
  that matches that of the caller. If it locates one, it configures the
  line as an 8bit clean line, and uses an ioctl call to convert the line
  discipline to SLIP. When this process is complete, the last stage of
  configuration takes place, where sliplogin invokes a shell script
  which configures the SLIP interface with the relevant ip address,
  netmask and sets appropriate routing in place.  This script is usually
  called /etc/slip.login, but in a similar manner to getty, if you have
  certain callers that require special initialization, then you can
  create configuration scripts called /etc/slip.login.loginname that
  will be run instead of the default specifically for them.

  There are either three or four files that you need to configure to get
  sliplogin working for you. I will detail how and where to get the
  software and how each is configured in detail. The files are:


  o  /etc/passwd, for the dialin user accounts.

  o  /etc/slip.hosts, to contain the information unique to each dial-in
     user.

  o  /etc/slip.login, which manages the configuration of the routing
     that needs to be performed for the user.

  o  /etc/slip.tty, which is required only if you are configuring your
     server for dynamic address allocation and contains a table of
     addresses to allocate

  o  /etc/slip.logout, which contains commands to clean up after the
     user has hung up or logged out.


  7.6.1.1.  Where to get sliplogin

  You may already have the sliplogin package installed as part of your
  distribution, if not then sliplogin can be obtained from:
  metalab.unc.edu.  The tar file contains both source, precompiled
  binaries and a man page.

  To ensure that only authorized users will be able to run sliplogin
  program, you should add an entry to your /etc/group file similar to
  the following:



        ..
       slip::13:radio,fred
        ..


  When you install the sliplogin package, the Makefile will change the
  group ownership of the sliplogin program to slip, and this will mean
  that only users who belong to that group will be able to execute it.
  The example above will allow only users radio and fred to execute
  sliplogin.

  To install the binaries into your /sbin directory and the man page
  into section 8, do the following:



       # cd /usr/src
       # gzip -dc .../sliplogin-2.1.1.tar.gz | tar xvf -
       # cd sliplogin-2.1.1
       # <..edit the Makefile if you don't use shadow passwords..>
       # make install



  If you want to recompile the binaries before installation, add a make
  clean before the make install. If you want to install the binaries
  somewhere else, you will need to edit the Makefile install rule.

  Please read the README files that come with the package for more
  information.

  7.6.1.2.  Configuring /etc/passwd  for Slip hosts.

  Normally you would create some special logins for Slip callers in your
  /etc/passwd file. A convention commonly followed is to use the
  hostname of the calling host with a capital `S' prefixing it. So, for
  example, if the calling host is called radio then you could create a
  /etc/passwd entry that looked like:



       Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin



  It doesn't really matter what the account is called, so long as it is
  meaningful to you.

  Note: the caller doesn't need any special home directory, as they will
  not be presented with a shell from this machine, so /tmp is a good
  choice.  Also note that sliplogin is used in place of the normal login
  shell.

  7.6.1.3.  Configuring /etc/slip.hosts

  The /etc/slip.hosts file is the file that sliplogin searches for
  entries matching the login name to obtain configuration details for
  this caller. It is this file where you specify the ip address and
  netmask that will be assigned to the caller and configured for their
  use. Sample entries for two hosts, one a static configuration for host
  radio and another, a dynamic configuration for user host albert might
  look like:



  #
  Sradio   44.136.8.99   44.136.8.100  255.255.255.0  normal      -1
  Salbert  44.136.8.99   DYNAMIC       255.255.255.0  compressed  60
  #



  The /etc/slip.hosts file entries are:


  1. the login name of the caller.

  2. ip address of the server machine, ie this machine.

  3. ip address that the caller will be assigned. If this field is coded
     DYNAMIC then an ip address will be allocated based on the
     information contained in your /etc/slip.tty file discussed later.
     Note: you must be using at least version 1.3 of sliplogin for this
     to work.

  4. the netmask assigned to the calling machine in dotted decimal
     notation eg 255.255.255.0 for a Class C network mask.

  5. the slip mode setting which allows you to enable/disable
     compression and slip other features. Allowable values here are
     "normal" or "compressed".

  6. a timeout parameter which specifies how long the line can remain
     idle (no datagrams received) before the line is automatically
     disconnected. A negative value disables this feature.

  7. optional arguments.


  Note: You can use either hostnames or IP addresses in dotted decimal
  notation for fields 2 and 3. If you use hostnames then those hosts
  must be resolvable, that is, your machine must be able to locate an ip
  address for those hostnames, otherwise the script will fail when it is
  called. You can test this by trying trying to telnet to the hostname,
  if you get the `Trying nnn.nnn.nnn...' message then your machine has
  been able to find an ip address for that name. If you get the message
  `Unknown host', then it has not. If not, either use ip addresses in
  dotted decimal notation, or fix up your name resolver configuration
  (See section Name Resolution).

  The most common slip modes are:


     normal
        to enable normal uncompressed SLIP.


     compressed
        to enable van Jacobsen header compression (cSLIP)


  Naturally these are mutually exclusive, you can use one or the other.
  For more information on the other options available, refer to the man
  pages.

  7.6.1.4.  Configuring the /etc/slip.login  file.

  After sliplogin has searched the /etc/slip.hosts and found a matching
  entry, it will attempt to execute the /etc/slip.login file to actually
  configure the SLIP interface with its ip address and netmask.

  The sample /etc/slip.login file supplied with the sliplogin package
  looks like this:



       #!/bin/sh -
       #
       #       @(#)slip.login  5.1 (Berkeley) 7/1/90
       #
       # generic login file for a SLIP line.  sliplogin invokes this with
       # the parameters:
       #     $1       $2       $3    $4, $5, $6 ...
       #   SLIPunit ttyspeed   pid   the arguments from the slip.host entry
       #
       /sbin/ifconfig $1 $5 pointopoint $6 mtu 1500 -trailers up
       /sbin/route add $6
       arp -s $6 <hw_addr> pub
       exit 0
       #



  You will note that this script simply uses the ifconfig and route com-
  mands to configure the SLIP device with its ipaddress, remote ip
  address and netmask and creates a route for the remote address via the
  SLIP device. Just the same as you would if you were using the slattach
  command.

  Note also the use of Proxy ARP to ensure that other hosts on the same
  ethernet as the server machine will know how to reach the dial-in
  host.  The <hw_addr> field should be the hardware address of the
  ethernet card in the machine. If your server machine isn't on an
  ethernet network then you can leave this line out completely.

  7.6.1.5.  Configuring the /etc/slip.logout  file.

  When the call drops out, you want to ensure that the serial device is
  restored to its normal state so that future callers will be able to
  login correctly.  This is achieved with the use of the
  /etc/slip.logout file. It is quite simple in format and is called with
  the same argument as the /etc/slip.login file.



               #!/bin/sh -
               #
               #               slip.logout
               #
               /sbin/ifconfig $1 down
               arp -d $6
               exit 0
               #



  All it does is `down' the interface which will delete the manual route
  previously created. It also uses the arp command to delete any proxy
  arp put in place, again, you don't need the arp command in the script
  if your server machine does not have an ethernet port.
  7.6.1.6.  Configuring the /etc/slip.tty  file.

  If you are using dynamic ip address allocation (have any hosts
  configured with the DYNAMIC keyword in the /etc/slip.hosts file, then
  you must configure the /etc/slip.tty file to list what addresses are
  assigned to what port. You only need this file if you wish your server
  to dynamically allocate addresses to users.

  The file is a table that lists the tty devices that will support dial-
  in SLIP connections and the ip address that should be assigned to
  users who call in on that port.

  Its format is as follows:


       # slip.tty    tty -> IP address mappings for dynamic SLIP
       # format: /dev/tty?? xxx.xxx.xxx.xxx
       #
       /dev/ttyS0      192.168.0.100
       /dev/ttyS1      192.168.0.101
       #



  What this table says is that callers that dial in on port /dev/ttyS0
  who have their remote address field in the /etc/slip.hosts file set to
  DYNAMIC will be assigned an address of 192.168.0.100.

  In this way you need only allocate one address per port for all users
  who do not require an dedicated address for themselves. This helps you
  keep the number of addresses you need down to a minimum to avoid
  wastage.

  7.6.2.  Slip Server using dip .

  Let me start by saying that some of the information below came from
  the dip man pages, where how to run Linux as a SLIP server is briefly
  documented. Please also beware that the following has been based on
  the dip337o-uri.tgz package and probably will not apply to other
  versions of dip.

  dip has an input mode of operation, where it automatically locates an
  entry for the user who invoked it and configures the serial line as a
  SLIP link according to information it finds in the /etc/diphosts file.
  This input mode of operation is activated by invoking dip as diplogin.
  This therefore is how you use dip as a SLIP server, by creating
  special accounts where diplogin is used as the login shell.

  The first thing you will need to do is to make a symbolic link as
  follows:



       # ln -sf /usr/sbin/dip /usr/sbin/diplogin



  You then need to add entries to both your /etc/passwd and your
  /etc/diphosts files. The entries you need to make are formatted as
  follows:

  To configure Linux as a SLIP server with dip, you need to create some
  special SLIP accounts for users, where dip (in input mode) is used as
  the login shell. A suggested convention is that of having all SLIP
  accounts begin with a capital `S', eg `Sfredm'.

  A sample /etc/passwd entry for a SLIP user looks like:



       Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
       ^^         ^^        ^^  ^^   ^^   ^^   ^^
       |          |         |   |    |    |    \__ diplogin as login shell
       |          |         |   |    |    \_______ Home directory
       |          |         |   |    \____________ User Full Name
       |          |         |   \_________________ User Group ID
       |          |         \_____________________ User ID
       |          \_______________________________ Encrypted User Password
       \__________________________________________ Slip User Login Name



  After the user logs in, the login program, if it finds and verifies
  the user ok, will execute the diplogin command. dip, when invoked as
  diplogin knows that it should automatically assume that it is being
  used a login shell. When it is started as diplogin the first thing it
  does is use the getuid() function call to get the userid of whoever
  has invoked it. It then searches the /etc/diphosts file for the first
  entry that matches either the userid or the name of the tty device
  that the call has come in on and configures itself appropriately.  By
  judicious decision as to whether to give a user an entry in the
  diphosts file, or whether to let the user be given the default
  configuration you can build your server in such a way that you can
  have a mix of static and dynamically assigned address users.

  dip will automatically add a `Proxy-ARP' entry if invoked in input
  mode, so you do not need to worry about manually adding such entries.

  7.6.2.1.  Configuring /etc/diphosts

  /etc/diphosts is used by dip to lookup preset configurations for
  remote hosts. These remote hosts might be users dialing into your
  linux machine, or they might be for machines that you dial into with
  your linux machine.

  The general format for /etc/diphosts is as follows:



        ..
       Suwalt::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
       ttyS1::145.71.34.3:145.71.34.2:255.255.255.0:Dynamic ttyS1:CSLIP,296
        ..



  The fields are:

  1. login name: as returned by getpwuid(getuid()) or tty name.

  2. unused: compat. with passwd

  3. Remote Address: IP address of the calling host, either numeric or
     by name
  4. Local Address: IP address of this machine, again numeric or by name

  5. Netmask: in dotted decimal notation

  6. Comment field: put whatever you want here.

  7. protocol: Slip, CSlip etc.

  8. MTU: decimal number


     An example /etc/net/diphosts entry for a remote SLIP user might be:



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296



  which specifies a SLIP link with remote address of 145.71.34.1 and MTU
  of 296, or:



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006



  which specifies a cSLIP-capable link with remote address 145.71.34.1
  and MTU of 1006.

  Therefore, all users who you wish to be allowed a statically allocated
  dial-up IP access should have an entry in the /etc/diphosts. If you
  want users who call a particular port to have their details
  dynamically allocated then you must have an entry for the tty device
  and do not configure a user based entry. You should remember to
  configure at least one entry for each tty device that your dialup
  users use to ensure that a suitable configuration is available for
  them regardless of which modem they call in on.

  When a user logs in they will receive a normal login and password
  prompt at which they should enter their SLIP-login userid and
  password. If these verify ok then the user will see no special
  messages and they should just change into SLIP mode at their end. The
  user should then be able to connect ok and be configured with the
  relevant parameters from the diphosts file.

  7.6.3.  SLIP server using the dSLIP  package.

  Matt Dillon <dillon@apollo.west.oic.com> has written a package that
  does not only dial-in but also dial-out SLIP. Matt's package is a
  combination of small programs and scripts that manage your connections
  for you. You will need to have tcsh installed as at least one of the
  scripts requires it. Matt supplies a binary copy of the expect utility
  as it too is needed by one of the scripts. You will most likely need
  some experience with expect to get this package working to your
  liking, but don't let that put you off.

  Matt has written a good set of installation instructions in the README
  file, so I won't bother repeating them.


  You can get the dSLIP package from its home site at:

  apollo.west.oic.com


       /pub/linux/dillon_src/dSLIP203.tgz



  or from:

  metalab.unc.edu


       /pub/Linux/system/Network/serial/dSLIP203.tgz



  Read the README file and create the /etc/passwd and /etc/group entries
  before doing a make install.


  8.  Other Network Technologies

  The following subsections are specific to particular network
  technologies.  The information contained in these sections does not
  necessarily apply to any other type of network technology. The topics
  are sorted alphabetically.

  8.1.  ARCNet

  ARCNet device names are `arc0e', `arc1e', `arc2e' etc. or `arc0s',
  `arc1s', `arc2s' etc. The first card detected by the kernel is
  assigned `arc0e' or `arc0s' and the rest are assigned sequentially in
  the order they are detected. The letter at the end signifies whether
  you've selected ethernet encapsulation packet format or RFC1051 packet
  format.

  Kernel Compile Options:


               Network device support  --->
                   [*] Network device support
                   <*> ARCnet support
                   [ ]   Enable arc0e (ARCnet "Ether-Encap" packet format)
                   [ ]   Enable arc0s (ARCnet RFC1051 packet format)



  Once you have your kernel properly built to support your ethernet card
  then configuration of the card is easy.

  Typically you would use something like:



          root# ifconfig arc0e 192.168.0.1 netmask 255.255.255.0 up
          root# route add -net 192.168.0.0 netmask 255.255.255.0 arc0e



  Please refer to the /usr/src/linux/Documentation/networking/arcnet.txt
  and /usr/src/linux/Documentation/networking/arcnet-hardware.txt files
  for further information.

  ARCNet support was developed by Avery Pennarun, apenwarr@foxnet.net.

  8.2.  Appletalk ( AF_APPLETALK )

  The Appletalk support has no special device names as it uses existing
  network devices.

  Kernel Compile Options:


               Networking options  --->
                   <*> Appletalk DDP



  Appletalk support allows your Linux machine to interwork with Apple
  networks.  An important use for this is to share resources such as
  printers and disks between both your Linux and Apple computers.
  Additional software is required, this is called netatalk. Wesley Craig
  netatalk@umich.edu represents a team called the `Research Systems Unix
  Group' at the University of Michigan and they have produced the
  netatalk package which provides software that implements the Appletalk
  protocol stack and some useful utilities.  The netatalk package will
  either have been supplied with your Linux distribution, or you will
  have to ftp it from its home site at the University of Michigan

  To build and install the package do something like:



               user% tar xvfz .../netatalk-1.4b2.tar.Z
               user% make
               root# make install



  You may want to edit the `Makefile' before calling make to actually
  compile the software. Specifically, you might want to change the
  DESTDIR variable which defines where the files will be installed
  later.  The default of /usr/local/atalk is fairly safe.

  8.2.1.  Configuring the Appletalk software.

  The first thing you need to do to make it all work is to ensure that
  the appropriate entries in the /etc/services file are present. The
  entries you need are:


    rtmp  1/ddp   # Routing Table Maintenance Protocol
    nbp   2/ddp   # Name Binding Protocol
    echo  4/ddp   # AppleTalk Echo Protocol
    zip   6/ddp   # Zone Information Protocol



  The next step is to create the Appletalk configuration files in the
  /usr/local/atalk/etc directory (or wherever you installed the
  package).

  The first file to create is the /usr/local/atalk/etc/atalkd.conf file.
  Initially this file needs only one line that gives the name of the
  network device that supports the network that your Apple machines are
  on:



         eth0



  The Appletalk daemon program will add extra details after it is run.

  8.2.2.  Exporting a Linux filesystems via Appletalk.

  You can export filesystems from your linux machine to the network so
  that Apple machine on the network can share them.

  To do this you must configure the
  /usr/local/atalk/etc/AppleVolumes.system file. There is another
  configuration file called /usr/local/atalk/etc/AppleVolumes.default
  which has exactly the same format and describes which filesystems
  users connecting with guest privileges will receive.

  Full details on how to configure these files and what the various
  options are can be found in the afpd man page.

  A simple example might look like:



         /tmp Scratch
         /home/ftp/pub "Public Area"



  Which would export your /tmp filesystem as AppleShare Volume `Scratch'
  and your ftp public directory as AppleShare Volume `Public Area'.  The
  volume names are not mandatory, the daemon will choose some for you,
  but it won't hurt to specify them anyway.

  8.2.3.  Sharing your Linux printer across Appletalk.

  You can share your linux printer with your Apple machines quite
  simply.  You need to run the papd program which is the Appletalk
  Printer Access Protocol Daemon. When you run this program it will
  accept requests from your Apple machines and spool the print job to
  your local line printer daemon for printing.

  You need to edit the /usr/local/atalk/etc/papd.conf file to configure
  the daemon. The syntax of this file is the same as that of your usual
  /etc/printcap file. The name you give to the definition is registered
  with the Appletalk naming protocol, NBP.

  A sample configuration might look like:



         TricWriter:\
            :pr=lp:op=cg:



  Which would make a printer named `TricWriter' available to your
  Appletalk network and all accepted jobs would be printed to the linux
  printer `lp' (as defined in the /etc/printcap file) using lpd. The
  entry `op=cg' says that the linux user `cg' is the operator of the
  printer.

  8.2.4.  Starting the appletalk software.

  Ok, you should now be ready to test this basic configuration. There is
  an rc.atalk file supplied with the netatalk package that should work
  ok for you, so all you should have to do is:



               root# /usr/local/atalk/etc/rc.atalk



  and all should startup and run ok. You should see no error messages
  and the software will send messages to the console indicating each
  stage as it starts.

  8.2.5.  Testing the appletalk software.

  To test that the software is functioning properly, go to one of your
  Apple machines, pull down the Apple menu, select the Chooser, click on
  AppleShare, and your Linux box should appear.

  8.2.6.  Caveats of the appletalk software.



  o  You may need to start the Appletalk support before you configure
     your IP network. If you have problems starting the Appletalk
     programs, or if after you start them you have trouble with your IP
     network, then try starting the Appletalk software before you run
     your /etc/rc.d/rc.inet1 file.

  o  The afpd (Apple Filing Protocol Daemon) severely messes up your
     hard disk. Below the mount points it creates a couple of
     directories called ``.AppleDesktop'' and Network Trash Folder.
     Then, for each directory you access it will create a .AppleDouble
     below it so it can store resource forks, etc. So think twice before
     exporting /, you will have a great time cleaning up afterwards.

  o  The afpd program expects clear text passwords from the Macs.
     Security could be a problem, so be very careful when you run this
     daemon on a machine connected to the Internet, you have yourself to
     blame if somebody nasty does something bad.

  o  The existing diagnostic tools such as netstat and ifconfig don't
     support Appletalk. The raw information is available in the
     /proc/net/ directory if you need it.


  8.2.7.  More information

  For a much more detailed description of how to configure Appletalk for
  Linux refer to Anders Brownworth Linux Netatalk-HOWTO page at
  thehamptons.com.

  8.3.  ATM

  Werner Almesberger <werner.almesberger@lrc.di.epfl.ch> is managing a
  project to provide Asynchronous Transfer Mode support for Linux.
  Current information on the status of the project may be obtained from:
  lrcwww.epfl.ch.

  8.4.  AX25 ( AF_AX25 )

  AX.25 device names are `sl0', `sl1', etc. in 2.0.* kernels or `ax0',
  `ax1', etc. in 2.1.* kernels.

  Kernel Compile Options:


               Networking options  --->
                   [*] Amateur Radio AX.25 Level 2



  The AX25, Netrom and Rose protocols are covered by the AX25-HOWTO.
  These protocols are used by Amateur Radio Operators world wide in
  packet radio experimentation.

  Most of the work for implementation of these protocols has been done
  by Jonathon Naylor, jsn@cs.nott.ac.uk.

  8.5.  DECNet

  Support for DECNet is currently being worked on. You should expect it
  to appear in a late 2.1.* kernel.

  8.6.  FDDI

  FDDI device names are `fddi0', `fddi1', `fddi2' etc. The first card
  detected by the kernel is assigned `fddi0' and the rest are assigned
  sequentially in the order they are detected.

  Larry Stefani, lstefani@ultranet.com, has developed a driver for the
  Digital Equipment Corporation FDDI EISA and PCI cards.

  Kernel Compile Options:



          Network device support  --->
              [*] FDDI driver support
              [*] Digital DEFEA and DEFPA adapter support



  When you have your kernel built to support the FDDI driver and
  installed, configuration of the FDDI interface is almost identical to
  that of an ethernet interface. You just specify the appropriate FDDI
  interface name in the ifconfig and route commands.

  8.7.  Frame Relay

  The Frame Relay device names are `dlci00', `dlci01' etc for the DLCI
  encapsulation devices and `sdla0', `sdla1' etc for the FRAD(s).

  Frame Relay is a new networking technology that is designed to suit
  data communications traffic that is of a `bursty' or intermittent
  nature. You connect to a Frame Relay network using a Frame Relay
  Access Device (FRAD).  The Linux Frame Relay supports IP over Frame
  Relay as described in RFC-1490.

  Kernel Compile Options:


               Network device support  --->
                   <*> Frame relay DLCI support (EXPERIMENTAL)
                   (24)   Max open DLCI
                   (8)   Max DLCI per device
                   <*>   SDLA (Sangoma S502/S508) support



  Mike McLagan, mike.mclagan@linux.org, developed the Frame Relay
  support and configuration tools.

  Currently the only FRAD supported are the Sangoma Technologies S502A,
  S502E and S508.

  To configure the FRAD and DLCI devices after you have rebuilt your
  kernel you will need the Frame Relay configuration tools. These are
  available from ftp.invlogic.com.  Compiling and installing the tools
  is straightforward, but the lack of a top level Makefile makes it a
  fairly manual process:



               user% tar xvfz .../frad-0.15.tgz
               user% cd frad-0.15
               user% for i in common dlci frad; make -C $i clean; make -C $i; done
               root# mkdir /etc/frad
               root# install -m 644 -o root -g root bin/*.sfm /etc/frad
               root# install -m 700 -o root -g root frad/fradcfg /sbin
               rppt# install -m 700 -o root -g root dlci/dlcicfg /sbin



  Note that the previous commands use sh syntax, if you use a csh
  flavour instead (like tcsh), the for loop will look different.

  After installing the tools you need to create an /etc/frad/router.conf
  file. You can use this template, which is a modified version of one of
  the example files:



  # /etc/frad/router.conf
  # This is a template configuration for frame relay.
  # All tags are included. The default values are based on the code
  # supplied with the DOS drivers for the Sangoma S502A card.
  #
  # A '#' anywhere in a line constitutes a comment
  # Blanks are ignored (you can indent with tabs too)
  # Unknown [] entries and unknown keys are ignored
  #

  [Devices]
  Count=1                 # number of devices to configure
  Dev_1=sdla0             # the name of a device
  #Dev_2=sdla1            # the name of a device

  # Specified here, these are applied to all devices and can be overridden for
  # each individual board.
  #
  Access=CPE
  Clock=Internal
  KBaud=64
  Flags=TX
  #
  # MTU=1500              # Maximum transmit IFrame length, default is 4096
  # T391=10               # T391 value    5 - 30, default is 10
  # T392=15               # T392 value    5 - 30, default is 15
  # N391=6                # N391 value    1 - 255, default is 6
  # N392=3                # N392 value    1 - 10, default is 3
  # N393=4                # N393 value    1 - 10, default is 4

  # Specified here, these set the defaults for all boards
  # CIRfwd=16             # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511


  #
  #
  # Device specific configuration
  #
  #

  #
  # The first device is a Sangoma S502E
  #
  [sdla0]
  Type=Sangoma            # Type of the device to configure, currently only
                          # SANGOMA is recognized
  #
  # These keys are specific to the 'Sangoma' type
  #
  # The type of Sangoma board - S502A, S502E, S508
  Board=S502E
  #
  # The name of the test firmware for the Sangoma board
  # Testware=/usr/src/frad-0.10/bin/sdla_tst.502
  #
  # The name of the FR firmware
  # Firmware=/usr/src/frad-0.10/bin/frm_rel.502
  #
  Port=360                # Port for this particular card
  Mem=C8                  # Address of memory window, A0-EE, depending on card
  IRQ=5                   # IRQ number, do not supply for S502A
  DLCIs=1                 # Number of DLCI's attached to this device
  DLCI_1=16               # DLCI #1's number, 16 - 991
  # DLCI_2=17
  # DLCI_3=18
  # DLCI_4=19
  # DLCI_5=20
  #
  # Specified here, these apply to this device only,
  # and override defaults from above
  #
  # Access=CPE            # CPE or NODE, default is CPE
  # Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
  # Clock=Internal        # External or Internal, default is Internal
  # Baud=128              # Specified baud rate of attached CSU/DSU
  # MTU=2048              # Maximum transmit IFrame length, default is 4096
  # T391=10               # T391 value    5 - 30, default is 10
  # T392=15               # T392 value    5 - 30, default is 15
  # N391=6                # N391 value    1 - 255, default is 6
  # N392=3                # N392 value    1 - 10, default is 3
  # N393=4                # N393 value    1 - 10, default is 4

  #
  # The second device is some other card
  #
  # [sdla1]
  # Type=FancyCard        # Type of the device to configure.
  # Board=                # Type of Sangoma board
  # Key=Value             # values specific to this type of device


  #
  # DLCI Default configuration parameters
  # These may be overridden in the DLCI specific configurations
  #
  CIRfwd=64               # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511

  #
  # DLCI Configuration
  # These are all optional. The naming convention is
  # [DLCI_D<devicenum>_<DLCI_Num>]
  #

  [DLCI_D1_16]
  # IP=
  # Net=
  # Mask=
  # Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=64
  # Bc_fwd=512
  # Be_fwd=0
  # CIRbak=64
  # Bc_bak=512
  # Be_bak=0

  [DLCI_D2_16]
  # IP=
  # Net=
  # Mask=
  # Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=16
  # Bc_fwd=16
  # Be_fwd=0
  # CIRbak=16
  # Bc_bak=16
  # Be_bak=0



  When you've built your /etc/frad/router.conf file the only step
  remaining is to configure the actual devices themselves. This is only
  a little trickier than a normal network device configuration, you need
  to remember to bring up the FRAD device before the DLCI encapsulation
  devices. These commands are best hosted in a shell script, due to
  their number:



               #!/bin/sh
               # Configure the frad hardware and the DLCI parameters
               /sbin/fradcfg /etc/frad/router.conf || exit 1
               /sbin/dlcicfg file /etc/frad/router.conf
               #
               # Bring up the FRAD device
               ifconfig sdla0 up
               #
               # Configure the DLCI encapsulation interfaces and routing
               ifconfig dlci00 192.168.10.1 pointopoint 192.168.10.2 up
               route add -net 192.168.10.0 netmask 255.255.255.0 dlci00
               #
               ifconfig dlci01 192.168.11.1 pointopoint 192.168.11.2 up
               route add -net 192.168.11.0 netmask 255.255.255.0 dlci00
               #
               route add default dev dlci00
               #



  8.8.  IPX ( AF_IPX )

  The IPX protocol is most commonly utilized in Novell NetWare(tm) local
  area network environments. Linux includes support for this protocol
  and may be configured to act as a network endpoint, or as a router for
  IPX.

  Kernel Compile Options:


               Networking options  --->
                   [*] The IPX protocol
                   [ ] Full internal IPX network



  The IPX protocol and the NCPFS are covered in greater depth in the
  IPX-HOWTO.


  8.9.  NetRom ( AF_NETROM )

  NetRom device names are `nr0', `nr1', etc.

  Kernel Compile Options:


               Networking options  --->
                   [*] Amateur Radio AX.25 Level 2
                   [*] Amateur Radio NET/ROM



  The AX25, Netrom and Rose protocols are covered by the AX25-HOWTO.
  These protocols are used by Amateur Radio Operators world wide in
  packet radio experimentation.

  Most of the work for implementation of these protocols has been done
  by Jonathon Naylor, jsn@cs.nott.ac.uk.

  8.10.  Rose protocol ( AF_ROSE )

  Rose device names are `rs0', `rs1', etc. in 2.1.* kernels.  Rose is
  available in the 2.1.* kernels.

  Kernel Compile Options:


               Networking options  --->
                   [*] Amateur Radio AX.25 Level 2
                   <*> Amateur Radio X.25 PLP (Rose)



  The AX25, Netrom and Rose protocols are covered by the AX25-HOWTO.
  These protocols are used by Amateur Radio Operators world wide in
  packet radio experimentation.

  Most of the work for implementation of these protocols has been done
  by Jonathon Naylor, jsn@cs.nott.ac.uk.

  8.11.  SAMBA - `NetBEUI', `NetBios', `CIFS' support.

  SAMBA is an implementation of the Session Management Block protocol.
  Samba allows Microsoft and other systems to mount and use your disks
  and printers.

  SAMBA and its configuration are covered in detail in the SMB-HOWTO.

  8.12.  STRIP support (Starmode Radio IP)

  STRIP device names are `st0', `st1', etc.

  Kernel Compile Options:



          Network device support  --->
                  [*] Network device support
                  ....
                  [*] Radio network interfaces
                  < > STRIP (Metricom starmode radio IP)



  STRIP is a protocol designed specifically for a range of Metricom
  radio modems for a research project being conducted by Stanford
  University called the MosquitoNet Project.  There is a lot of
  interesting reading here, even if you aren't directly interested in
  the project.

  The Metricom radios connect to a serial port, employ spread spectrum
  technology and are typically capable of about 100kbps.  Information on
  the Metricom radios is available from the: Metricom Web Server.

  At present the standard network tools and utilities do not support the
  STRIP driver, so you will have to download some customized tools from
  the MosquitoNet web server. Details on what software you need is
  available at the: MosquitoNet STRIP Page.

  A summary of configuration is that you use a modified slattach program
  to set the line discipline of a serial tty device to STRIP and then
  configure the resulting `st[0-9]' device as you would for ethernet
  with one important exception, for technical reasons STRIP does not
  support the ARP protocol, so you must manually configure the ARP
  entries for each of the hosts on your subnet. This shouldn't prove too
  onerous.

  8.13.  Token Ring

  Token ring device names are `tr0', `tr1' etc. Token Ring is an IBM
  standard LAN protocol that avoids collisions by providing a mechanism
  that allows only one station on the LAN the right to transmit at a
  time.  A `token' is held by one station at a time and the station
  holding the token is the only station allowed to transmit. When it has
  transmitted its data it passes the token onto the next station. The
  token loops amongst all active stations, hence the name `Token Ring'.

  Kernel Compile Options:


               Network device support  --->
                       [*] Network device support
                       ....
                       [*] Token Ring driver support
                       < > IBM Tropic chipset based adaptor support



  Configuration of token ring is identical to that of ethernet with the
  exception of the network device name to configure.

  8.14.  X.25

  X.25 is a circuit based packet switching protocol defined by the
  C.C.I.T.T. (a standards body recognized by Telecommunications
  companies in most parts of the world). An implementation of X.25 and
  LAPB are being worked on and recent 2.1.* kernels include the work in
  progress.

  Jonathon Naylor jsn@cs.nott.ac.uk is leading the development and a
  mailing list has been established to discuss Linux X.25 related
  matters.  To subscribe send a message to: majordomo@vger.rutgers.edu
  with the text "subscribe linux-x25" in the body of the message.

  Early versions of the configuration tools may be obtained from
  Jonathon's ftp site at ftp.cs.nott.ac.uk.

  8.15.  WaveLan Card

  Wavelan device names are `eth0', `eth1', etc.

  Kernel Compile Options:


       Network device support  --->
               [*] Network device support
               ....
               [*] Radio network interfaces
               ....
               <*> WaveLAN support



  The WaveLAN card is a spread spectrum wireless lan card. The card
  looks very like an ethernet card in practice and is configured in much
  the same way.

  You can get information on the Wavelan card from Wavelan.com.

  9.  Cables and Cabling

  Those of you handy with a soldering iron may want to build your own
  cables to interconnect two linux machines. The following cabling
  diagrams should assist you in this.

  9.1.  Serial NULL Modem cable

  Not all NULL modem cables are alike. Many null modem cables do little
  more than trick your computer into thinking all the appropriate
  signals are present and swap transmit and receive data. This is ok but
  means that you must use software flow control (XON/XOFF) which is less
  efficient than hardware flow control. The following cable provides the
  best possible signalling between machines and allows you to use
  hardware (RTS/CTS) flow control.


       Pin Name  Pin                               Pin
       Tx Data    2  -----------------------------  3
       Rx Data    3  -----------------------------  2
       RTS        4  -----------------------------  5
       CTS        5  -----------------------------  4
       Ground     7  -----------------------------  7
       DTR        20 -\---------------------------  8
       DSR        6  -/
       RLSD/DCD   8  ---------------------------/-  20
                                                \-  6



  9.2.  Parallel port cable (PLIP cable)

  If you intend to use the PLIP protocol between two machines then this
  cable will work for you irrespective of what sort of parallel ports
  you have installed.


       Pin Name    pin            pin
       STROBE      1*
       D0->ERROR   2  ----------- 15
       D1->SLCT    3  ----------- 13
       D2->PAPOUT  4  ----------- 12
       D3->ACK     5  ----------- 10
       D4->BUSY    6  ----------- 11
       D5          7*
       D6          8*
       D7          9*
       ACK->D3     10 ----------- 5
       BUSY->D4    11 ----------- 6
       PAPOUT->D2  12 ----------- 4
       SLCT->D1    13 ----------- 3
       FEED        14*
       ERROR->D0   15 ----------- 2
       INIT        16*
       SLCTIN      17*
       GROUND      25 ----------- 25



  Notes:

  o  Do not connect the pins marked with an asterisk `*'.

  o  Extra grounds are 18,19,20,21,22,23 and 24.

  o  If the cable you are using has a metallic shield, it should be
     connected to the metallic DB-25 shell at one end only.

     Warning: A miswired PLIP cable can destroy your controller card. Be
     very careful and double check every connection to ensure you don't
     cause yourself any unnecessary work or heartache.

  While you may be able to run PLIP cables for long distances, you
  should avoid it if you can. The specifications for the cable allow for
  a cable length of about 1 metre or so. Please be very careful when
  running long plip cables as sources of strong electromagnetic fields
  such as lightning, power lines and radio transmitters can interfere
  with and sometimes even damage your controller. If you really want to
  connect two of your computers over a large distance you really should
  be looking at obtaining a pair of thin-net ethernet cards and running
  some coaxial cable.

  9.3.  10base2 (thin coax) Ethernet Cabling

  10base2 is an ethernet cabling standard that specifies the use of 52
  ohm coaxial cable with a diameter of about 5 millimeters. There are a
  couple of important rules to remember when interconnecting machines
  with 10base2 cabling.  The first is that you must use terminators at
  both ends of the cabling.  A terminator is a 52 ohm resistor that
  helps to ensure that the signal is absorbed and not reflected when it
  reaches the end of the cable. Without a terminator at each end of the
  cabling you may find that the ethernet is unreliable or doesn't work
  at all. Normally you'd use `T pieces' to interconnect the machines, so
  that you end up with something that looks like:
        |==========T=============T=============T==========T==========|
                   |             |             |          |
                   |             |             |          |
                 -----         -----         -----      -----
                 |   |         |   |         |   |      |   |
                 -----         -----         -----      -----



  where the `|' at either end represents a terminator, the `======' rep-
  resents a length of coaxial cable with BNC plugs at either end and the
  `T' represents a `T piece' connector. You should keep the length of
  cable between the `T piece' and the actual ethernet card in the PC as
  short as possible, ideally the `T piece' will be plugged directly into
  the ethernet card.

  9.4.  Twisted Pair Ethernet Cable

  If you have only two twisted pair ethernet cards and you wish to
  connect them you do not require a hub. You can cable the two cards
  directly together.  A diagram showing how to do this is included in
  the Ethernet-HOWTO

  10.  Glossary of Terms used in this document.

  The following is a list of some of the most important terms used in
  this document.


     ARP
        This is an acronym for the Address Resolution Protocol and this
        is how a network machine associates an IP Address with a
        hardware address.


     ATM
        This is an acronym for Asynchronous Transfer Mode.  An ATM
        network packages data into standard size blocks which it can
        convey efficiently from point to point. ATM is a circuit
        switched packet network technology.


     client
        This is usually the piece of software at the end of a system
        where the user is. There are exceptions to this, for example, in
        the X11 window system it is actually the server with the user
        and the client runs on the remote machine. The client is the
        program or end of a system that is receiving the service
        provided by the server. In the case of peer to peer systems such
        as slip or ppp the client is taken to be the end that initiates
        the connection and the remote end, being called, is taken to be
        the server.


     datagram
        A datagram is a discrete package of data and headers which
        contain addresses, which is the basic unit of transmission
        across an IP network. You might also hear this called a
        `packet'.


     DLCI
        The DLCI is the Data Link Connection Identifier and is used to
        identify a unique virtual point to point connection via a Frame
        Relay network. The DLCI's are normally assigned by the Frame
        Relay network provider.


     Frame Relay
        Frame Relay is a network technology ideally suited to carrying
        traffic that is of bursty or sporadic nature. Network costs are
        reduced by having many Frame Relay customer sharing the same
        network capacity and relying on them wanting to make use of the
        network at slightly different times.


     Hardware address
        This is a number that uniquely identifies a host in a physical
        network at the media access layer. Examples of this are Ethernet
        Addresses and AX.25 Addresses.


     ISDN
        This is an acronym for Integrated Services Digital Network. ISDN
        provides a standardized means by which Telecommunications
        companies may deliver either voice or data information to a
        customers premises.  Technically ISDN is a circuit switched data
        network.


     ISP
        This is an acronym of Internet Service Provider. These are
        organizations or companies that provide people with network
        connectivity to the Internet.


     IP address
        This is a number that uniquely identifies a TCP/IP host on the
        network. The address is 4 bytes long and is usually represented
        in what is called the "dotted decimal notation", where each byte
        is represented in decimal from with dots `.' between them.


     MSS
        The Maximum Segment Size (MSS) is the largest quantity of data
        that can be transmitted at one time. If you want to prevent
        local fragmentation MSS would equal MTU-IP header.


     MTU
        The Maximum Transmission Unit (MTU) is a parameter that
        determines the largest datagram than can be transmitted by an IP
        interface without it needing to be broken down into smaller
        units. The MTU should be larger than the largest datagram you
        wish to transmit unfragmented. Note, this only prevents
        fragmentation locally, some other link in the path may have a
        smaller MTU and the datagram will be fragmented there. Typical
        values are 1500 bytes for an ethernet interface, or 576 bytes
        for a SLIP interface.


     route
        The route is the path that your datagrams take through the
        network to reach their destination.


     server
        This is usually the piece of software or end of a system remote
        from the user. The server provides some service to one or many
        clients.  Examples of servers include ftp, Networked File
        System, or Domain Name Server. In the case of peer to peer
        systems such as slip or ppp the server is taken to be the end of
        the link that is called and the end calling is taken to be the
        client.


     window
        The window is the largest amount of data that the receiving end
        can accept at a given point in time.

  11.  Linux for an ISP ?

  If you are interested in using Linux for ISP purposes the I recommend
  you take a look at the Linux ISP homepage for a good list of pointers
  to information you might need and use.

  12.  Acknowledgements

  I'd like to thank the following people for their contributions to this
  document (in no particular order): Terry Dawson, Axel Boldt, Arnt
  Gulbrandsen, Gary Allpike, Cees de Groot, Alan Cox, Jonathon Naylor,
  Claes Ensson, Ron Nessim, John Minack, Jean-Pierre Cocatrix, Erez
  Strauss.

  13.  Copyright.


  Copyright Information


  The NET-3-HOWTO, information on how to install and configure
  networking support for Linux. Copyright (c) 1997 Terry Dawson, 1998
  Alessandro Rubini, 1999 {POET} - LinuxPorts

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version. This program is distributed in the
  hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  PURPOSE. See the GNU General Public License for more details. You
  should have received a copy of the GNU General Public License along
  with this program; if not, write to the: Free Software Foundation,
  Inc., 675 Mass Ave, Cambridge, MA 02139, USA.



  NFS HOWTO
  Nicolai Langfeldt janl@linpro.no
  v1.0, 1 October 1999

  HOWTO set up NFS clients and servers.
  ______________________________________________________________________

  Table of Contents



  1. Preamble

     1.1 Legal stuff
     1.2 Disclaimer
     1.3 Feedback
     1.4 Other stuff
     1.5 Dedication

  2. README.first

  3. Setting up a NFS server

     3.1 Prerequisites
     3.2 First step
     3.3 The portmapper
     3.4 Mountd and nfsd

  4. Setting up a NFS client

     4.1 Mount options
     4.2 Optimizing NFS

  5. NFS over slow lines

  6. Security and NFS

     6.1 Client Security
     6.2 Server security: nfsd
     6.3 Server security: the portmapper
     6.4 NFS and firewalls
     6.5 Summary

  7. Mount Checklist

  8. FAQs

  9. Exporting filesystems

     9.1 IRIX, HP-UX, Digital-UNIX, Ultrix, SunOS 4 (Solaris 1), AIX
     9.2 Solaris 2

  10. NFS under Linux 2.2

     10.1 The client
     10.2 The server

  11. NFS server on a floppy

     11.1 Introduction
     11.2 Expectations
     11.3 Requirements
     11.4 Server Setup
        11.4.1 Boot the temporary NFS server
        11.4.2 Mount the floppy and cdrom
        11.4.3 Set up networking on the temporary server.
        11.4.4 Set up the NFS share.
     11.5 Run the NFS server
        11.5.1 Complete, start the install.
     11.6 Troubleshooting
        11.6.1 Nothing Here Yet.
     11.7 To Do
        11.7.1 DOS Disk.
        11.7.2 rpc commands.

  12. PC-NFS

  ______________________________________________________________________

  1.  Preamble

  1.1.  Legal stuff

  (C)opyright 1997-1999 Nicolai Langfeldt and Ron Peters.  Do not modify
  without amending copyright, distribute freely but retain this
  paragraph.  The FAQ section is based on a NFS FAQ compiled by Alan
  Cox.  The Checklist section is based on a mount problem checklist
  compiled by the IBM Corporation.  The nfs-server-on-a-floppy section
  was written by Ron Peters.


  1.2.  Disclaimer

  Neither Nicolai Langfeldt, Ron Peters, nor their employers, or anyone
  else, take any responsebility for what might happen if you follow the
  instructions in this document.  If you choose to follow the
  instructions in any case, good luck!


  1.3.  Feedback

  This will never be a finished document, please send me mail about your
  problems and successes, it can make this a better HOWTO.  Please send
  money, comments and/or questions to janl@math.uio.no,or
  rpeters@hevanet.com in the case of NFS server on a floppy things.  If
  you send E-mail and want an answer please show the simple courtecy of
  making sure that the return address is correct and working.  You have
  no idea how many answers have bounced.


  1.4.  Other stuff

  If you want to translate this HOWTO please notify me so I can keep
  track of what languages I have been published in :-).


  Curses and Thanks to Olaf Kirch who got me to write this and then gave
  good suggestions for it :-)


  1.5.  Dedication

  This HOWTO is dedicated to Anne Line Norheim Langfeldt.  Though she
  will probably never read it since she's not that kind of girl. -
  Nicolai



  2.  README.first

  NFS, the Network File System has three important characteristics:


  o  It makes sharing of files over a network possible.

  o  It mostly works well enough.

  o  It opens a can of security risks that are well understood by
     crackers, and easily exploited to get access (read, write and
     delete) to all your files.

  I'll say something on both issues in this HOWTO.  Please make sure you
  read the security section of this HOWTO, and you will be vulnerable to
  fewer silly security risks.  The passages about security will at times
  be pretty technical and require some knowledge about IP networking and
  the terms used.  If you don't recognize the terms you can either go
  back and check the networking HOWTO, wing it, or get a book about
  TCP/IP network administration to familiarize yourself with TCP/IP.
  That's a good idea anyway if you're administrating UNIX/Linux
  machines.  A very good book on the subject is TCP/IP Network
  Administration by Craig Hunt, published by O'Reilly & Associates, Inc.
  And after you've read it and understood it you'll have higher value on
  the job market, you can't loose ;-)


  There are two sections to help you troubleshoot NFS, called Mount
  Checklist and FAQs.  Please refer to them if something dosen't work as
  advertized.


  The home-site for the Linux 2.0 nfsd is ftp.mathematik.th-
  darmstadt.de:/pub/linux/okir, in case you want/need to get it and
  compile it yourself.


  For information about NFS under Linux 2.2 please see ``the Linux 2.2
  section''.


  3.  Setting up a NFS server

  3.1.  Prerequisites

  Before you continue reading this HOWTO you will need to be able to
  telnet back and forth between the machine you're using as server and
  the client.  If that does not work you need to check the
  networking/NET-3 HOWTO and set up networking properly.


  3.2.  First step

  Before we can do anything else we need a NFS server set up.  If you're
  part of a department or university network there are likely numerous
  NFS servers already set up.  If they will let you get access to them,
  or indeed, if you're reading this HOWTO to get access to one of them
  you obviously don't need to read this section and can just skip ahead
  to ``the section on setting up a NFS client''


  If you need to set up a non-Linux box as server you will have to read
  the system manual(s) to discover how to enable NFS serving and export
  of file systems through NFS.  There is a separate section in this
  HOWTO on how to do it on many different systems.  After you have
  figured all that out you can continue reading the next section of this
  HOWTO.  Or read more of this section since some of the things I will
  say are relevant no matter what kind of machine you use as server.


  If you're running please see ``the Linux 2.2 section'' before you
  continue reading this.


  Those of you still reading will need to set up a number of programs.



  3.3.  The portmapper

  The portmapper on Linux is called either portmap or rpc.portmap.  The
  man page on my system says it is a "DARPA port to RPC program number
  mapper".  It is the first security hole you'll open reading this
  HOWTO.  Description of how to close one of the holes is in ``the
  security section''.  Which I, again, urge you to read.


  Start the portmapper.  It's either called portmap or rpc.portmap and
  it should live in the /usr/sbin directory (on some machines it's
  called rpcbind).  You can start it by hand now, but it will need to be
  started every time you boot your machine so you need to make/edit the
  rc scripts.  Your rc scripts are explained more closely in the init
  man page, they usually reside in /etc/rc.d, /etc/init.d or
  /etc/rc.d/init.d.  If there is a script called something like inet
  it's probably the right script to edit.  But, what to write or do is
  outside the scope of this HOWTO.  Start portmap, and check that it
  lives by running ps aux and then rpcinfo -p.  It does?  Good.


  Oh, one thing.  Remote access to your portmapper is regulated by the
  contents of your /etc/hosts.allow and /etc/hosts.deny files.  If
  rpcinfo -p fails, but your portmapper is running please examine these
  files.  See ``the security section'' for details on these files.


  3.4.  Mountd and nfsd

  The next programs we need running are mountd and nfsd.  But first
  we'll edit another file.  /etc/exports this time.  Say I want the file
  system /mn/eris/local which lives on the machine eris to be available
  to the machine called apollon.  Then I'd put this in /etc/exports on
  eris:


  ______________________________________________________________________
  /mn/eris/local  apollon(rw)
  ______________________________________________________________________



  The above line gives apollon read/write access to /mn/eris/local.
  Instead of rw it could say ro which means read only (if you put
  nothing it defaults to read only).  There are other options you can
  give it, and I will discuss some security related ones later.  They
  are all enumerated in the exports man page which you should have read
  at least once in your life.  There are also better ways than listing
  all the hosts in the exports file.  You can for example use net groups
  if you are running NIS (or NYS) (NIS was known as YP), and always
  specify domain wild cards and IP-subnets as hosts that are allowed to
  mount something.  But you should consider who can get access to the
  server in unauthorized ways if you use such blanket authorizations.

  Note: This exports file is not the same syntax that other Unixes use.
  There is a separate section in this HOWTO about other Unixes exports
  files.


  Now we're set to start mountd (or maybe it's called rpc.mountd and
  then nfsd (which could be called rpc.nfsd).  They will both read the
  exports file.


  If you edit /etc/exports you will have to make sure nfsd and mountd
  knows that the files have changed.  The traditonal way is to run
  exportfs.  Many Linux distributions lack a exportfs program.  If
  you're exportfs-less you can install this script on your machine:


  ______________________________________________________________________
  #!/bin/sh
  killall -HUP /usr/sbin/rpc.mountd
  killall -HUP /usr/sbin/rpc.nfsd
  echo re-exported file systems
  ______________________________________________________________________



  Save it in, say, /usr/sbin/exportfs, and don't forget to chmod a+rx
  it.  Now, whenever you change your exports file, you run exportfs
  after, as root.


  Now you should check that mountd and nfsd are running properly.  First
  with rpcinfo -p.  It should show something like this:


  ______________________________________________________________________
     program vers proto   port
      100000    2   tcp    111  portmapper
      100000    2   udp    111  portmapper
      100005    1   udp    745  mountd
      100005    1   tcp    747  mountd
      100003    2   udp   2049  nfs
      100003    2   tcp   2049  nfs
  ______________________________________________________________________



  As you see the portmapper has announced it's services, and so has
  mountd and nfsd.


  If you get rpcinfo: can't contact portmapper: RPC: Remote system error
  - Connection refused, RPC_PROG_NOT_REGISTERED or something similar
  instead then the portmapper isn't running.  OR you might have
  something in /etc/hosts.{allow,deny} that forbids the portmapper from
  answering, please see ``the security section'' for details on these
  files.  If you get No remote programs registered. then either the
  portmapper doesn't want to talk to you, or something is broken.  Kill
  nfsd, mountd, and the portmapper and try the ignition sequence again.


  After checking that the portmapper reports the services you can check
  with ps too.  The portmapper will continue to report the services even
  after the programs that extend them have crashed.  So a ps check can
  be smart if something seems broken.


  Of course, you will need to modify your system rc files to start
  mountd and nfsd as well as the portmapper when you boot.  It is very
  likely that the scripts already exist on your machine, you just have
  to uncomment the critical section or activate it for the correct init
  run levels.


  Man pages you should be familiar with now: portmap, mountd, nfsd, and
  exports.


  Well, if you did everything exactly like I said you should you're all
  set to start on the NFS client.


  4.  Setting up a NFS client

  First you will need a kernel with the NFS file system either compiled
  in or available as a module.  This is configured before you compile
  the kernel.  If you have never compiled a kernel before you might need
  to check the kernel HOWTO and figure it out.  If you're using a very
  cool distribution (like Red Hat) and you've never fiddled with the
  kernel or modules on it (and thus ruined it ;-), nfs is likely
  automagicaly available to you.


  You can now, at a root prompt, enter a appropriate mount command and
  the file system will appear.  Continuing the example in the previous
  section we want to mount /mn/eris/local from eris.  This is done with
  this command:


  ______________________________________________________________________
  mount -o rsize=1024,wsize=1024 eris:/mn/eris/local /mnt
  ______________________________________________________________________



  (We'll get back to the rsize and wsize options.)  The file system is
  now available under /mnt and you can cd there, and ls in it, and look
  at the individual files.  You will notice that it's not as fast as a
  local file system, but a lot more convenient than ftp.  If, instead of
  mounting the file system, mount produces a error message like mount:
  eris:/mn/eris/local failed, reason given by server: Permission denied
  then the exports file is wrong, or you forgot to run exportfs after
  editing the exports file.  If it says mount clntudp_create: RPC:
  Program not registered it means that nfsd or mountd is not running on
  the server.  Or you have the hosts.{allow,deny} problem mentioned
  earlier.


  To get rid of the file system you can say


  ______________________________________________________________________
  umount /mnt
  ______________________________________________________________________



  To make the system mount a nfs file system upon boot you edit
  /etc/fstab in the normal manner.  For our example a line such as this
  is required:


  ______________________________________________________________________
  # device      mountpoint     fs-type     options              dump fsckorder
  ...
  eris:/mn/eris/local  /mnt    nfs        rsize=1024,wsize=1024 0    0
  ...
  ______________________________________________________________________



  That's all there is too it, almost.  Read on please.


  4.1.  Mount options

  There are some options you should consider adding at once.  They
  govern the way the NFS client handles a server crash or network
  outage.  One of the cool things about NFS is that it can handle this
  gracefully.  If you set up the clients right.  There are two distinct
  failure modes:


     soft
        The NFS client will report an error to the process accessing a
        file on a NFS mounted file system.  Some programs can handle
        this with composure, most won't.  I cannot recommend using this
        setting, it is a recepie for corrupted files and lost data.  You
        should especially not use this for mail disks --- if you value
        your mail that is.


     hard
        The program accessing a file on a NFS mounted file system will
        hang when the server crashes.  The process cannot be interrupted
        or killed unless you also specify intr.  When the NFS server is
        back online the program will continue undisturbed from where it
        were.  This is probably what you want.  I recommend using
        hard,intr on all NFS mounted file systems.



  Picking up the previous example, this is now your fstab entry:


  ______________________________________________________________________
  # device      mountpoint     fs-type    options                  dump fsckorder
  ...
  eris:/mn/eris/local  /mnt    nfs        rsize=1024,wsize=1024,hard,intr 0 0
  ...
  ______________________________________________________________________



  4.2.  Optimizing NFS

  Normally, if no rsize and wsize options are specified NFS will read
  and write in chunks of 4096 or 8192 bytes.  Some combinations of Linux
  kernels and network cards cannot handle that large blocks, and it
  might not be optimal, anyway.  So we'll want to experiment and find a
  rsize and wsize that works and is as fast as possible.  You can test
  the speed of your options with some simple commands.  Given the mount
  command above and that you have write access to the disk you can do
  this to test the sequential write performance:


  ______________________________________________________________________
  time dd if=/dev/zero of=/mnt/testfile bs=16k count=4096
  ______________________________________________________________________



  This creates a 64Mb file of zeroed bytes (which should be large enough
  that caching is no significant part of any performance perceived, use
  a larger file if you have a lot of memory).  Do it a couple (5-10?)
  of times and average the times.  It is the `elapsed' or `wall clock'
  time that's most interesting in this connection.  Then you can test
  the read performance by reading back the file:


  ______________________________________________________________________
  time dd if=/mnt/testfile of=/dev/null bs=16k
  ______________________________________________________________________



  do that a couple of times and average.  Then umount, and mount again
  with a larger rsize and wsize.  They should probably be multiples of
  1024, and not larger than 16384 bytes since that's the maximum size in
  NFS version 2.  Directly after mounting with a larger size cd into the
  mounted file system and do things like ls, explore the fs a bit to
  make sure everything is as it should.  If the rsize/wsize is too large
  the symptoms are very odd and not 100% obvious.  A typical symptom is
  incomplete file lists when doing 'ls', and no error messages.  Or
  reading files failing mysteriously with no error messages.  After
  establishing that the given rsize/wsize works you can do the speed
  tests again.  Different server platforms are likely to have different
  optimal sizes.  SunOS and Solaris is reputedly a lot faster with 4096
  byte blocks than with anything else.


  Newer Linux kernels (since 1.3 sometime) perform read-ahead for rsizes
  larger or equal to the machine page size.  On Intel CPUs the page size
  is 4096 bytes.  Read ahead will significantly increase the NFS read
  performance.  So on a Intel machine you will want 4096 byte rsize if
  at all possible.


  Remember to edit /etc/fstab to reflect the rsize/wsize you found.


  A trick to increase NFS write performance is to disable synchronous
  writes on the server.  The NFS specification states that NFS write
  requests shall not be considered finished before the data written is
  on a non-volatile medium (normally the disk).  This restricts the
  write performance somewhat, asynchronous writes will speed NFS writes
  up.  The Linux nfsd has never done synchronous writes since the Linux
  file system implementation does not lend itself to this, but on non-
  Linux servers you can increase the performance this way with this in
  your exports file:


  ______________________________________________________________________
  /dir    -async,access=linuxbox
  ______________________________________________________________________



  or something similar.  Please refer to the exports man page on the
  machine in question.  Please note that this increases the risk of data
  loss.



  5.  NFS over slow lines

  Slow lines include Modems, ISDN and quite possibly other long distance
  connections.

  This section is based on knowledge about the used protocols but no
  actual experiments.  Please let me hear from you if try this ;-)


  The first thing to remember is that NFS is a slow protocol.  It has
  high overhead.  Using NFS is almost like using kermit to transfer
  files.  It's slow.  Almost anything is faster than NFS.  FTP is
  faster. HTTP is faster.  rcp is faster.  ssh is faster.


  Still determined to try it out?  Ok.


  NFS' default parameters are for quite fast, low latency, lines.  If
  you use these default parameters over high latency, slow, lines it can
  cause NFS to report errors, abort operations, pretend that files are
  shorter than they really are, and act mysteriously in other ways.


  The first thing to do is not to use the soft mount option.  This will
  cause timeouts to return errors to the software, which will, most
  likely not handle the situation at all well.  This is a good way to
  get mysterious failures.  Instead use the hard mount option.  When
  hard is active timeouts causes infinite retries instead of aborting
  whatever it was the software wanted to do.  This is what you want.
  Really.


  The next thing to do is to tweak the timeo and retrans mount options.
  They are described in the nfs(5) man page, but here is a copy:


  ______________________________________________________________________
         timeo=n        The  value  in  tenths  of  a second before
                        sending the first retransmission  after  an
                        RPC timeout.  The default value is 7 tenths
                        of a second.  After the first timeout,  the
                        timeout  is  doubled  after each successive
                        timeout until a maximum timeout of 60  sec-
                        onds  is  reached or the enough retransmis-
                        sions have occured to cause a  major  time-
                        out.   Then,  if  the  filesystem  is  hard
                        mounted, each new timeout cascade  restarts
                        at  twice the initial value of the previous
                        cascade, again doubling at each retransmis-
                        sion.   The  maximum  timeout  is always 60
                        seconds.  Better overall performance may be
                        achieved  by  increasing  the  timeout when
                        mounting on  a  busy  network,  to  a  slow
                        server, or through several routers or gate-
                        ways.

         retrans=n      The number of minor timeouts  and  retrans-
                        missions  that  must  occur  before a major
                        timeout occurs.  The default is 3 timeouts.
                        When a major timeout occurs, the file oper-
                        ation is either aborted or  a  "server  not
                        responding"  message is printed on the con-
                        sole.
  ______________________________________________________________________



  In other words: If a reply is not received within the 0.7 second
  (700ms) timeout the NFS client will repeat the request and double the
  timeout to 1.4 seconds.  If the reply does not appear within the 1.4
  seconds the request is repeated again and the timeout doubled again,
  to 2.8 seconds.


  A lines speed can be measured with ping with the same packet size as
  your rsize/wsize options.


  ______________________________________________________________________
  $ ping -s 8192 lugulbanda
  PING lugulbanda.uio.no (129.240.222.99): 8192 data bytes
  8200 bytes from 129.240.222.99: icmp_seq=0 ttl=64 time=15.2 ms
  8200 bytes from 129.240.222.99: icmp_seq=1 ttl=64 time=15.9 ms
  8200 bytes from 129.240.222.99: icmp_seq=2 ttl=64 time=14.9 ms
  8200 bytes from 129.240.222.99: icmp_seq=3 ttl=64 time=14.9 ms
  8200 bytes from 129.240.222.99: icmp_seq=4 ttl=64 time=15.0 ms

  --- lugulbanda.uio.no ping statistics ---
  5 packets transmitted, 5 packets received, 0% packet loss
  round-trip min/avg/max = 14.9/15.1/15.9 ms
  ______________________________________________________________________



  The time here is how long the ping packet took to get back and forth
  to lugulbanda.  15ms is quite fast.  Over a 28.000 bps line you can
  expect something like 4000-5000ms, and if the line is otherwise loaded
  this time will be even higher, easily double.  When this time is high
  we say that there is 'high latency'.  Generally, for larger packets
  and for more loaded lines the latency will tend to increase.  Increase
  timeo suitably for your line and load.  And since the latency
  increases when you use the line for other things: If you ever want to
  use FTP and NFS at the same time you should try measuring ping times
  while using FTP to transfer files and increase timeo to match your
  line latency.



  6.  Security and NFS

  I am by no means a computer security expert.  But I do have a little
  advice for the security conscious.  But be warned: This is by no means
  a complete list of NFS related problems and if you think you're safe
  once you're read and implemented all this I have a bridge I want to
  sell you.


  This section is probably of no concern if you are on a closed network
  where you trust all the users, and no-one you don't trust can get
  access to machines on the network. I.e., there should be no way to
  dial into the network, and it should in no way be connected to other
  networks where you don't trust everyone using it as well as the
  security.  Do you think I sound paranoid?  I'm not at all paranoid.
  This is just basic security advice.  And remember, the things I say
  here is just the start of it.  A secure site needs a diligent and
  knowledgeable admin that knows where to find information about current
  and potential security problems.


  NFS has a basic problem in that the client, if not told otherwise,
  will trust the NFS server and vice versa.  This can be bad.  It means
  that if the server's root account is broken into it can be quite easy
  to break into the client's root account as well.  And vice versa.
  There are a couple of coping strategies for this, which we'll get back
  to.


  Something you should read is the CERT advisories on NFS, most of the
  text below deals with issues CERT has written advisories about.  See
  ftp.cert.org:/01-README for a up to date list of CERT advisories.
  Here are some NFS related advisories:


  ______________________________________________________________________
  CA-91:21.SunOS.NFS.Jumbo.and.fsirand                            12/06/91
       Vulnerabilities concerning Sun Microsystems, Inc. (Sun) Network
       File System (NFS) and the fsirand program.  These vulnerabilities
       affect SunOS versions 4.1.1, 4.1, and 4.0.3 on all architectures.
       Patches are available for SunOS 4.1.1.  An initial patch for SunOS
       4.1 NFS is also available. Sun will be providing complete patches
       for SunOS 4.1 and SunOS 4.0.3 at a later date.

  CA-94:15.NFS.Vulnerabilities                                    12/19/94
       This advisory describes security measures to guard against several
       vulnerabilities in the Network File System (NFS). The advisory was
       prompted by an increase in root compromises by intruders using tools
       to exploit the vulnerabilities.

  CA-96.08.pcnfsd                                                 04/18/96
       This advisory describes a vulnerability in the pcnfsd program (also
       known as rpc.pcnfsd). A patch is included.
  ______________________________________________________________________



  6.1.  Client Security

  On the client we can decide that we don't want to trust the server too
  much a couple of ways with options to mount.  For example we can
  forbid suid programs to work off the NFS file system with the nosuid
  option.  This is a good idea and you should consider using this with
  all NFS mounted disks.  It means that the server's root user cannot
  make a suid-root program on the file system, log in to the client as a
  normal user and then use the suid-root program to become root on the
  client too.  We could also forbid execution of files on the mounted
  file system altogether with the noexec option.  But this is more
  likely to be impractical than nosuid since a file system is likely to
  at least contain some scripts or programs that needs to be executed.
  You enter these options in the options column, with the rsize and
  wsize, separated by commas.


  6.2.  Server security: nfsd

  On the server we can decide that we don't want to trust the client's
  root account.  We can do that by using the root_squash option in
  exports:


  ______________________________________________________________________
  /mn/eris/local apollon(rw,root_squash)
  ______________________________________________________________________



  Now, if a user with UID 0 on the client attempts to access (read,
  write, delete) the file system the server substitutes the UID of the
  servers `nobody' account.  Which means that the root user on the
  client can't access or change files that only root on the server can
  access or change.  That's good, and you should probably use
  root_squash on all the file systems you export.  "But the root user on
  the client can still use 'su' to become any other user and access and
  change that users files!" say you.  To which the answer is: Yes, and
  that's the way it is, and has to be with Unix and NFS.  This has one
  important implication: All important binaries and files should be
  owned by root, and not bin or other non-root account, since the only
  account the clients root user cannot access is the servers root
  account.  In the NFSd man page there are several other squash options
  listed so that you can decide to mistrust whomever you (don't) like on
  the clients.  You also have options to squash any UID and GID range
  you want to.  This is described in the Linux NFSd man page.


  root_squash is in fact the default with the Linux NFSd, to grant root
  access to a filesystem use no_root_squash.


  Another important thing is to ensure that nfsd checks that all it's
  requests comes from a privileged port.  If it accepts requests from
  any old port on the client a user with no special privileges can run a
  program that's is easy to obtain over the Internet. It talks nfs
  protocol and will claim that the user is anyone the user wants to be.
  Spooky.  The Linux nfsd does this check by default, on other OSes you
  have to enable this check yourself.  This should be described in the
  nfsd man page for the OS.


  Another thing.  Never export a file system to 'localhost' or
  127.0.0.1.  Trust me.


  6.3.  Server security: the portmapper

  The basic portmapper, in combination with nfsd has a design problem
  that makes it possible to get to files on NFS servers without any
  privileges.  Fortunately the portmapper that most Linux distributions
  use is relatively secure against this attack, and can be made more
  secure by configuring up access lists in two files.


  Not all Linux distributions were created equal.  Some seemingly up-to-
  date distributions does not include a securable portmapper, even
  today, many years since the vulnerability became common knowledge.  At
  least one distribution even contains the manpage for a securable
  portmapper but the actual portmapper is not secureable.  The easy way
  to check if your portmapper is good or not is to run strings(1) and
  see if it reads the relevant files, /etc/hosts.deny and
  /etc/hosts.allow.  Assuming your portmapper is /usr/sbin/portmap you
  can check it with this command: strings /usr/sbin/portmap | grep
  hosts.  On my machine it comes up with this:


  ______________________________________________________________________
  /etc/hosts.allow
  /etc/hosts.deny
  @(#) hosts_ctl.c 1.4 94/12/28 17:42:27
  @(#) hosts_access.c 1.20 96/02/11 17:01:27
  ______________________________________________________________________



  First we edit /etc/hosts.deny.  It should contain the line

  ______________________________________________________________________
  portmap: ALL
  ______________________________________________________________________



  which will deny access to everyone.  While it is closed thus run
  rpcinfo -p just to check that your portmapper really reads and obeys
  this file.  rpcinfo should give no output, or possebly a errormessage.
  Restarting the portmapper should not be necessary.


  Closing the portmapper for everyone is a bit drastic, so we open it
  again by editing /etc/hosts.allow.  But first we need to figure out
  what to put in it.  It should basically list all machines that should
  have access to your portmapper.  On a run of the mill Linux system
  there are very few machines that need any access for any reason.  The
  portmapper administrates nfsd, mountd, ypbind/ypserv, pcnfsd, and 'r'
  services like ruptime and rusers.  Of these only nfsd, mountd,
  ypbind/ypserv and perhaps pcnfsd are of any consequence.  All machines
  that needs to access services on your machine should be allowed to do
  that.  Let's say that your machines address is 129.240.223.254 and
  that it lives on the subnet 129.240.223.0 should have access to it
  (those are terms introduced by the networking HOWTO, go back and
  refresh your memory if you need to).  Then we write


  ______________________________________________________________________
  portmap: 129.240.223.0/255.255.255.0
  ______________________________________________________________________



  in hosts.allow.  This is the same as the network address you give to
  route and the subnet mask you give to ifconfig.  For the device eth0
  on this machine ifconfig should show


  ______________________________________________________________________
  ...
  eth0      Link encap:10Mbps Ethernet  HWaddr 00:60:8C:96:D5:56
            inet addr:129.240.223.254  Bcast:129.240.223.255  Mask:255.255.255.0
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:360315 errors:0 dropped:0 overruns:0
            TX packets:179274 errors:0 dropped:0 overruns:0
            Interrupt:10 Base address:0x320
  ...
  ______________________________________________________________________



  and netstat -rn should show


  ______________________________________________________________________
  Kernel routing table
  Destination     Gateway         Genmask         Flags Metric Ref Use    Iface
  ...
  129.240.223.0   0.0.0.0         255.255.255.0   U     0      0   174412 eth0
  ...
  ______________________________________________________________________



  (Network address in first column).

  The hosts.deny and hosts.allow files are described in the manual pages
  of the same names.


  IMPORTANT: Do not put anything but IP NUMBERS in the portmap lines of
  these files.  Host name lookups can indirectly cause portmap activity
  which will trigger host name lookups which can indirectly cause
  portmap activity which will trigger...


  The above things should make your server tighter.  The only remaining
  problem (Yeah, right!) is someone breaking root (or boot MS-DOS) on a
  trusted machine and using that privilege to send requests from a
  secure port as any user they want to be.


  6.4.  NFS and firewalls

  It's a very good idea to firewall the nfs and portmap ports in your
  router or firewall.  The nfsd operates at port 2049, both udp and tcp
  protocols.  The portmapper at port 111, tcp and udp, and mountd at
  port 745 and and 747, tcp and udp.  Normally.  You should check the
  ports with the rpcinfo -p command.


  If on the other hand you want NFS to go through a firewall there are
  options for newer NFSds and mountds to make them use a specific
  (nonstandard) port which can be open in the firewall.


  6.5.  Summary

  If you use the hosts.allow/deny, root_squash, nosuid and privileged
  port features in the portmapper/nfs software you avoid many of the
  presently known bugs in nfs and can almost feel secure about that at
  least.  But still, after all that: When an intruder has access to your
  network, s/he can make strange commands appear in your .forward or
  read your mail when /home or /var/spool/mail is NFS exported.  For the
  same reason, you should never access your PGP private key over nfs.
  Or at least you should know the risk involved.  And now you know a bit
  of it.


  NFS and the portmapper makes up a complex subsystem and therefore it's
  not totally unlikely that new bugs will be discovered, either in the
  basic design or the implementation we use.  There might even be holes
  known now, which someone is abusing.  But that's life.  To keep
  abreast of things like this you should at least read the newsgroups
  comp.os.linux.announce and comp.security.announce at a absolute
  minimum.


  7.  Mount Checklist

  This section is based on IBM Corp.s ``NFS mount problem checklist''.
  Many thanks to them for making it available for this HOWTO.  If you
  experience a problem mounting a NFS filesystem please refer to this
  list before posting your problem.  Each item describes a failure mode
  and the fix.


  1. Mount keeps saying RPC:  Program not registered


     Is the portmapper running?

     Fix: Start it.

     Is mountd running?

     Fix: Start it.

     Is nfsd running?

     Fix: Start it.

     Is the portmapper forbidden to answer by /etc/hosts.deny?

     Fix: Either remove the rule in hosts.deny or add a rule to
     hosts.allow such that the portmapper is allowed to talk to you.


  2. File system not exported, or not exported to the client in
     question.


     Fix: Export it


  3. Name resolution doesn't jibe with the exports list.


     e.g.: export list says export to johnmad but johnmad's name is
     resolved as johnmad.austin.ibm.com.  mount permission is denied.


     Fix: Export to both forms of the name.


     It can also happen if the client has two interfaces with different
     names for each of the two and the export file only specifies one.


     Fix: export both interfaces.


     This can also happen if the server can't do a lookuphostbyname or
     lookuphostbyaddr (these are library functions) on the client.  Make
     sure the client can do host <name>; host <ip_addr>; and that both
     shows the same machine.


     Fix: straighten out name resolution.


  4. The file system was mounted after NFS was started (on that server).
     In that case the server is exporting underlying mount point, not
     the mounted filesystem.


     Fix: Shut down NFSd and then restart it.


     Note: The clients that had the underlying mount point mounted will
     get problems accessing it after the restart.


  5. The date is wildly off on one or both machines (this can mess up
     make)


     Fix: Get the date set right.
     The HOWTO author recommends using NTP to synchronize clocks.  Since
     there are export restrictions on NTP in the US you have to get NTP
     for Debian, Red Hat or Slackware from
     ftp://ftp.hacktic.nl/pub/replay/pub/linux or a mirror.


  6. The server can not accept a mount from a user that is in more than
     8 groups.


     Fix: decrease the number of groups the user is in or mount via a
     different user.



  8.  FAQs

  This is the FAQ section.  It is partly based on a old NFS FAQ by Alan
  Cox.


  If you have a problem mounting a filesystem please see if your problem
  is described in the ``Mount Checklist'' section.


  1. I get a lot of ``stale nfs handle'' errors when using Linux as a
     nfs server.


     This is caused by a bug in some old nfsd versions.  It is fixed in
     nfs-server2.2beta16 and later.


  2. When I try to mount a file system I get



         can't register with portmap: system error on send



  You are probably using a Caldera system.  There is a bug in the rc
  scripts.  Please contact Caldera to obtain a fix.


  3. Why can't I execute a file after copying it to the NFS server?


     The reason is that nfsd caches open file handles for performance
     reasons (remember, it runs in user space).  While nfsd has a file
     open (as is the case after writing to it), the kernel won't allow
     you to execute it.  Nfsds newer than  spring 95 release open files
     after a few seconds, older ones would cling to them for days.


  4. My NFS files are all read only


     The Linux NFS server defaults to read only.  Please read the
     section about ``Mountd and nfsd'' and ``Exporting filesystems'' in
     this HOWTO, and refer to the ``exports'' and ``nfsd'' manual pages.
     You will need to alter /etc/exports.
  5. I mount from a Linux NFS server and while ls works I can't read or
     write files.


     On older versions of Linux you must mount a NFS servers with
     rsize=1024,wsize=1024.


  6. I mount from a Linux NFS server with a block size of between
     3500-4000 and it crashes the Linux box regularly


     Basically don't do it then.  This does not happen with 2.0 and 2.2
     kernels.  As far as I recall there is no problem with 1.2 either.


  7. Can Linux do NFS over TCP


     No, not at present.


  8. I get loads of strange errors trying to mount a machine from a
     Linux box.


     Make sure your users are in 8 groups or less. Older servers require
     this.


  9. When I reboot my machine it sometimes hangs when trying to unmount
     a hung NFS server.


     Do not unmount NFS servers when rebooting or halting, just ignore
     them, it will not hurt anything if you don't unmount them.  The
     command is umount -avt nonfs.


  10.
     Linux NFS clients are very slow when writing to Sun and BSD systems


     NFS writes are normally synchronous (you can disable this if you
     don't mind risking losing data).  Worse still BSD derived kernels
     tend to be unable to work in small blocks. Thus when you write 4K
     of data from a Linux box in the 1K packets it uses BSD does this



               read 4K page
               alter 1K
               write 4K back to physical disk
               read 4K page
               alter 1K
               write 4K page back to physical disk
               etc..



  11.
     When I connect many clients to a Linux NFS server the performance
     suddenly drops.
     The NFS protocol uses fragmented UDP packets.  The kernel has a
     limit of how many fragments of incomplete packets it can have
     before it starts throwing away packets.  In 2.2 this is runtime
     tuneable via the /proc filesystem:
     /proc/sys/net/ipv4/ipfrag_high_thresh and ipfrag_low_thresh.  In
     2.0 these are compile-time constants defined in
     .../linux/net/ipv4/ip_fragment.c, IPFRAG_HIGH_THRESH and
     IPFRAG_LOW_THRESH.  The meaning of these values is that once the
     memory consumption of unassembled UDP fragments reaches the
     ``ipfrag_high_thresh'' in bytes (256K by default in 2.2.3 and
     2.0.36) it is cut down to ``ipfrag_low_tresh'' at once.  This is
     done by throwing away fragments.  This will look almost like packet
     loss, and if the high threshold is reached your server performance
     drops a lot.


     256K is enough for up to 30 clients.  If you have 60, double it.
     And double the low threshold also.


  12.
     I'm using Linux 2.2 (or later) with knfsd and I can't get my AIX,
     IRIX, Solaris, DEC-Unix, ... machine to mount it.


     Knfsd announces that it implements NFS version 3.  It does not.
     There is an option to stop it from announcing it.  Use it.  Or you
     can put "vers=2" in the mount option list on the clients.


  13.
     My AIX 4 machine cannot mount my Linux NFS server.  It says



               mount: 1831-011 access denied for server:/dir
               mount: 1831-008 giving up on:
               server:/dir
               The file access permissions do not allow the specified action.



  or something like that instead.


  AIX 4.2 used reserved ports (<1024) for NFS.  AIX 4.2.1 and 4.3 are
  not constrained to reserved ports.  Also, AIX 4.2.1 and 4.3 try to
  mount using NFS3, then NFS/TCP, then fiannly NFS/UDP.


  Adding


  ______________________________________________________________________
  nfso -o nfs_use_reserved_ports=1
  ______________________________________________________________________



  to the end of rc.tcpip will force it to use reserved ports again.
  (This tip was supplied by Brian Gorka)

  9.  Exporting filesystems

  The way to export filesytems with NFS is not completely consistent
  across platforms of course.  In this case Linux and Solaris 2 are the
  deviants.  This section lists, superficially, the way to do it on most
  systems.  If the kind of system you have is not covered you must check
  your OS man-pages.  Keywords are: nfsd, system administration tool, rc
  scripts, boot scripts, boot sequence, /etc/exports, exportfs.  I'll
  use one example throughout this section: How to export /mn/eris/local
  to apollon read/write.


  9.1.  IRIX, HP-UX, Digital-UNIX, Ultrix, SunOS 4 (Solaris 1), AIX

  These OSes use the traditional Sun export format.  In /etc/exports
  write:


  ______________________________________________________________________
  /mn/eris/local -rw=apollon
  ______________________________________________________________________



  The complete documentation is in the exports man page.  After editing
  the file run exportfs -av to export the filesystems.


  How strict the exportfs command is about the syntax varies.  On some
  OSes you will find that previously entered lines reads:


  ______________________________________________________________________
  /mn/eris/local apollon
  ______________________________________________________________________



  or even something degenerate like:


  ______________________________________________________________________
  /mn/eris/local rw=apollon
  ______________________________________________________________________



  I recommend being formal.  You risk that the next version of exportfs
  if much stricter and then suddenly everything will stop working.


  9.2.  Solaris 2

  Sun completely re-invented the wheel when they did Solaris 2.  So this
  is completely different from all other OSes.  What you do is edit the
  file /etc/dfs/dfstab.  In it you place share commands as documented in
  the share(1M) man page.  Like this:


  ______________________________________________________________________
  share -o rw=apollon -d "Eris Local" /mn/eris/local
  ______________________________________________________________________



  After editing run the program shareall to export the filesystems.


  10.  NFS under Linux 2.2

  As I write this Linux 2.2.12 is the current kernel version and to use
  NFS under it can be a bit of a chore.  Or not.


  What the status of NFS in Linux 2.4 will be i unknown.


  The new big thing in Linux 2.2 is support for a in-kernel nfs server
  demon, called knfsd in 2.2.  This way of implementing nfsd has some
  advantages, the main one is speed.  A Linux 2.2 machine with knfsd is
  a respectable nfs server.  You can still use the old nfsd with Linux
  2.2 though, and there are some advantages to using this, mainly
  simplicity.


  If you use a kernel source or binary package made by someone like
  RedHat (6.0 and later), SuSE (6.1 or later, I belive) or some other
  professional system integrator they have likely integrated full
  "knfsd" functionality in their kernel and you need not worry, it will
  work.  Mostly.  Until you want to compile a kernel yourself.  If you
  use a stock Linux 2.2 kernel (up to 2.2.12 at least) knfsd will break.


  To get this on the air yourself you need to get H.J. Lus knfsd
  package.  This is a collection of patches, and the needed utilities
  for 2.2 that Lu is maintaining in his spare time.  You can get it from
  your local kernel mirror, the master site is
  ftp.kernel.org:/pub/linux/devel/gcc/.  This is not meant for general
  consumption.  If you find this package confusing please don't try to
  do this yourself.  Wait until a kernel package from your favourite
  system integrator (e.g., Red Hat, SuSE or ...) appears.


  Also, please don't send me questions about this, I can't help you.  I
  do not have any knfsd based servers running.  If you find errors or
  omissions in this documentation, please write to me and I'll revise
  this HOWTO and release it again.


  Still reading?  Ok.  H.J.Lu posts about new versions of this package
  on the linux-kernel mailing list.  Other issues pertaining to NFS in
  2.2 is also posted about there.  Read it.


  There is one interesting thing to note about the knfsd package.  It
  announces that it supports NFS version 3.  However it does not support
  it.  There is an option you can give to stop it from announcing NFS3,
  or on the clients you can specify "vers=2" in the mount option list.


  10.1.  The client

  The client is almost simple.  To get propper locking you need to get
  statd (from the knfsd package) compiled, installed and started from
  your boot-scripts.  Do that.  Statd needs a directory called
  /var/lib/nfs to function otherwise it will just abort with no error
  message, so that directory needs to be created before it will run.


  Once statd is running you can use the testlk program (in
  tools/locktest to test if locking of a file on a NFS mounted
  filesystem works.  It should.  If it prints No locks available statd
  is not working.


  Actually, you can also avoid locking entierly (not that I recomend
  this), by giving "nolock" in the mount option list.


  As far as I know this is all that's needed to get the client working.


  Oh, if you have a Sparc or Alpha NFS server you will find that the nfs
  client in Linux 2.2 absolutely sucks.  The transfer rates to and from
  the server is so bad that ... you can't imagine.  It's far worse than
  under Linux 2.0.  Far.  But there is a fix for this of course.  The
  Alan Cox series of 2.2 kernels (which are a bit more experimental than
  the normal 2.2 kernels from Linus) include a patch to make Linux 2.2
  perform when used with Alpha and Sparc servers.  If you want to use
  the Alan Cox 2.2 kernels you should be reading the linux-kernel
  mailing list and if you do you know where the patch can be found.
  There home site of this patch is  <http://www.uio.no/~trondmy/src/>,
  in case you want to try to apply it to a stock 2.2 kernel.  This patch
  will probably not be in Linux 2.4 either, because it requires too many
  changes in the kernel to be accepted in the current development cycle.
  Wait for Linux 2.5.


  trondmy also has patches to make Linux use NFS version 3, this will
  also enable you to use tcp as transport mechanism instead of UDP.
  NFSv3 is is very good for long-haul networks and other networks where
  the packet loss is non-zero or the latencies are high.


  The reason you should read the linux-kernel mailing list to use these
  patches is that sometimes there are bad bugs discovered in them.  Bugs
  that eat your files.  So please beware.


  10.2.  The server

  The nfs server demon under Linux 2.2 and later is called "knfsd".  It
  is tricky to set it up.  You have to figure this out all by yourself,
  or stick to what SuSE, Red Hat and others are releasing in the way of
  2.2 kernel packages. Sorry.  You can still use the old nfsd under
  Linux 2.2 though.  It's slow but easy to set up.


  11.  NFS server on a floppy

  This section was written by Ron Peters, rpeters@hevanet.com It
  explains how to set up an NFS server when booting up from floppy.  It
  was originally devised to be able to NFS share a cdrom from another
  non-Linux/UNIX machine to install Linux on a machine that does not
  have a cdrom.


  11.1.  Introduction

  This document is being created for those who will run into the same
  problem I had recently.  I was building a Linux server on a machine
  that didn't have a cdrom and has no facility for adding one except for
  possibly an external SCSI or the like.  Now that it is getting less
  and less likely that you will be installing on a machine like that,
  this document may not be that valuable.  However, I would have
  appreciated it when I was trying to build my machine.

  Since my machine didn't have a cdrom drive, I thought I would go find
  an NFS server for Win95 and share the cdrom for long enough to install
  the box and get it on my network.  Of the two products I found, (I'm
  not mentioning names but one was freeware and the other was a 14 day
  limited license), one didn't work out of the box, and the other
  couldn't handle the Linux naming convention well enough to complete
  the install.

  I then settled on trying to boot my Win95 machine with the boot/root
  set of disks and then use a suplimentary floppy to set up the NFS
  server.

  This was remarkably simple, and the procedure is probably easier than
  reading this introduction but I believe that putting the whole
  procedure in one place will be value added.



  11.2.  Expectations

  This document was derived using the boot/root disks from one of the
  current InfoMagic developer distributions of Slackware.  I used kernel
  version 2.0.34 for the boot/root disks, but the NFS server programs
  were taken from a 2.0.30 server.  I have always used the Slakware
  installation method, not because it is any easier or better or worse,
  just that I am comfortable with it and I haven't taken the time to try
  another method.

  I don't believe that there will be many problems using this document
  in relation to OS version.  I would recommend using something
  relatively current.  Since it is likely that this will be used for
  installation, a current boot/root set will likely be used.

  Your mileage may vary.



  11.3.  Requirements


  o  Network capable system and boot disk.  The system that is to be the
     NFS server must have a network card and it must be recognized by
     the during the boot process.  More information on this can be found
     in the Networking HOWTO.

  o  Secondary floppy that contains rpc.portmap, rpc.mountd and
     rpc.nfsd.  These files should be easily found from an ftpsearch off
     the web.

  o  Slackware (or other) source media (assumed to be cd).


  11.4.  Server Setup


  11.4.1.  Boot the temporary NFS server

  Boot the NFS server system from boot floppy and make sure the network
  card is recognized.  It is also necessary that the CDROM be
  recognized.  I will use eth0 as the example network card.


  11.4.2.  Mount the floppy and cdrom

  Once the system is booted up, the boot/root floppies are not needed.
  The system is fully contained in RAM.
  Replace the root floppy with the suplimentary disk.  Mount the floppy:

  mount /dev/fd0 /floppy

  This assumes that the floppy is an ext2 file system type.  I imaging
  that the suplimentary disk could be a DOS floppy with the files on it,
  but I haven't tried that yet.  I imagine that this would be easier
  that a disk image.  In this case, it would be a mount -t msdos ...etc.
  This should probably be put in the todo section.

  Mount the cdrom:

  mount -t iso9660 /dev/hdc /cdrom

  The floppy and cdrom devices are the ones I used.  These may be
  different depending on application.  The mount points /floppy and
  /cdrom exist on the root floppy disk image so they can be used.  If
  they don't, create them or you could use any mount points you like.


  11.4.3.  Set up networking on the temporary server.

  This is where the temporary NFS server is set up to talk on the
  network.  There are only a few commands to run.  There are a few items
  of information that you will need before running the commands (values
  are examples):

  IPADDR:172.16.5.100  #This is the address of the temporary server.

  NETMASK:255.255.255.0  #This is the netmask.

  BROADCAST:172.16.5.255 #The last number (255) is significant from
  IPADDR.

  ETHNETWORK:172.16.5.0 #Once again, slightly different from IPADDR.

  GATEWAY:172.16.5.251 #Only needed if you have a gateway.  You will
  probably know.  Most home networks won't have a gateway.

  The commands to get on the network.  Insert values from above:

  ifconfig eth0 inet IPADDR arp netmask NETMASK broadcast BROADCAST

  route add -net ETHNETWORK netmask NETMASK eth0

  Only use next command if you have a gateway and need to go through it:

  route add default gw GATEWAY netmask 0.0.0.0 eth0

  If all goes well, you are now on the network and should be able to
  ping other nodes.


  11.4.4.  Set up the NFS share.

  Determine the directory that you want to NFS share.  In the case of
  the my example, I used the /cdrom/slakware directory.  Put this
  directory in the /etc/exports file:

  echo "/cdrom/slakware" > /etc/exports


  11.5.  Run the NFS server

  Go to /floppy/usr/sbin and run:

  ./rpc.portmap

  ./rpc.mountd

  ./rpc.nfsd


  11.5.1.  Complete, start the install.

  This should share the "/cdrom/slakware" directory in the /etc/exports
  file.  Once this is done, you can now boot up the machine to be
  installed from boot/root floppies (I used same ones that I booted NFS
  server with) and start the installation.

  Once you are ready to choose the media source location, choose the NFS
  server option.  It will ask about the ip address of the server.  Give
  it the IP address that you used as IPADDR for the server.  It will
  also ask for the directory to be mounted.  This is the directory you
  put in the /etc/exports on the NFS server.

  The system will then NFS mount the server.  Watch for any error
  messages.  All should be complete and you can continue the
  installation.


  11.6.  Troubleshooting


  11.6.1.  Nothing Here Yet.

  I don't have any troubleshooting info yet.  Perhaps as people use this
  procedure, there will be more tips and hints available.


  11.7.  To Do


  11.7.1.  DOS Disk.

  Check out a DOS disk for the suplimentary disk.


  11.7.2.  rpc commands.

  Check out specific order of running rpc.* commands and if all or just
  some of the command needs to be run.



  12.  PC-NFS

  You don't want to run PC-NFS.  You want to run samba.


  samba is far better than PC-NFS and it works with Windows 3 for
  Workgroups and later versions of Windows.  It's faster and more secure
  too.  Use it.  Really.



  The Linux NIS(YP)/NYS/NIS+ HOWTO
  Thorsten Kukuk
  v1.0, 9 March 1999

  This document describes how to configure Linux as NIS(YP) or NIS+
  client and how to install as NIS server.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 New Versions of this Document
     1.2 Disclaimer
     1.3 Feedback and Corrections
     1.4 Acknowledgements

  2. Glossary and General Information

     2.1 Glossary of Terms
     2.2 Some General Information

  3. NIS, NYS or NIS+ ?

     3.1 libc 4/5 with traditional NIS or NYS ?
     3.2 glibc 2 and NIS/NIS+
     3.3 NIS or NIS+ ?

  4. How it works

     4.1 How NIS works
     4.2 How NIS+ works

  5. The RPC Portmapper

  6. What do you need to set up NIS?

     6.1 Determine whether you are a Server, Slave or Client.
     6.2 The Software
     6.3 The ypbind daemon
     6.4 Setting up a NIS Client using Traditional NIS
     6.5 Setting up a NIS Client using NYS
     6.6 Setting up a NIS Client using glibc 2.x
     6.7 The nsswitch.conf File
     6.8 Shadow Passwords with NIS
        6.8.1 Linux
        6.8.2 Solaris
        6.8.3 PAM

  7. What do you need to set up NIS+ ?

     7.1 The Software
     7.2 Setting up a NIS+ client
     7.3 NIS+, keylogin, login and PAM
     7.4 The nsswitch.conf File

  8. Setting up a NIS Server

     8.1 The Server Program ypserv
     8.2 The Server Program yps
     8.3 The Program rpc.ypxfrd
     8.4 The Program rpc.yppasswdd

  9. Verifying the NIS/NYS Installation

  10. Common Problems and Troubleshooting NIS

  11. Frequently Asked Questions



  ______________________________________________________________________



  1.  Introduction

  More and more, Linux machines are installed as part of a network of
  computers. To simplify network administration, most networks (mostly
  Sun-based networks) run the Network Information Service. Linux
  machines can take full advantage of existing NIS service or provide
  NIS service themselves. Linux machines can also act as full NIS+
  clients, this support is in beta stage.

  This document tries to answer questions about setting up NIS(YP) and
  NIS+ on your Linux machine. Don't forget to read the section ``The RPC
  Portmapper''.

  The NIS-Howto is edited and maintained by



               Thorsten Kukuk, <kukuk@suse.de>



  The primary source of the information for the initial NIS-Howto was
  from:



       Andrea Dell'Amico       <adellam@ZIA.ms.it>
       Mitchum DSouza          <Mitch.DSouza@NetComm.IE>
       Erwin Embsen            <erwin@nioz.nl>
       Peter Eriksson          <peter@ifm.liu.se>



  who we should thank for writing the first versions of this document.


  1.1.  New Versions of this Document

  You can always view the latest version of this document on the World
  Wide Web via the URL http://www.suse.de/~kukuk/linux/HOWTO/NIS-
  HOWTO.html <http://www.suse.de/~kukuk/linux/HOWTO/NIS-HOWTO.html>.

  New versions of this document will also be uploaded to various Linux
  WWW and FTP sites, including the LDP home page.

  Links to translations of this document could be found at
  http://www.suse.de/~kukuk/linux/nis-howto.html
  <http://www.suse.de/~kukuk/linux/nis-howto.html>.

  1.2.  Disclaimer

  Although this document has been put together to the best of my
  knowledge it may, and probably does contain errors. Please read any
  README files that are bundled with any of the various pieces of
  software described in this document for more detailed and accurate
  information. I will attempt to keep this document as error free as
  possible.


  1.3.  Feedback and Corrections

  If you have questions or comments about this document, please feel
  free to mail Thorsten Kukuk, at kukuk@suse.de. I welcome any
  suggestions or criticisms. If you find a mistake with this document,
  please let me know so I can correct it in the next version. Thanks.

  Please do not mail me questions about special problems with your Linux
  Distribution! I don't know every Linux Distribution. But I will try to
  add every solution you send me.


  1.4.  Acknowledgements

  We would like to thank all the people who have contributed (directly
  or indirectly) to this document. In alphabetical order:



       Byron A Jeff            <byron@cc.gatech.edu>
       Markus Rex              <msrex@suse.de>
       Miquel van Smoorenburg  <miquels@cistron.nl>



  Theo de Raadt is responsible for the original yp-clients code.  Swen
  Thuemmler ported the yp-clients code to Linux and also ported the yp-
  routines in libc (again based on Theo's work).  Thorsten Kukuk has
  written the NIS(YP) and NIS+ routines for GNU libc 2.x from scratch.


  2.  Glossary and General Information

  2.1.  Glossary of Terms

  In this document a lot of acronyms are used. Here are the most
  important acronyms and a brief explanation:


     DBM
        DataBase Management, a library of functions which maintain key-
        content pairs in a data base.


     DLL
        Dynamically Linked Library, a library linked to an executable
        program at run-time.


     domainname
        A name "key" that is used by NIS clients to be able to locate a
        suitable NIS server that serves that domainname key. Please note
        that this does not necessarily have anything at all to do with
        the DNS "domain" (machine name) of the machine(s).


     FTP
        File Transfer Protocol, a protocol used to transfer files
        between two computers.


     libnsl
        Name services library, a library of name service calls
        (getpwnam, getservbyname, etc...) on SVR4 Unixes. GNU libc uses
        this for the NIS (YP) and NIS+ functions.


     libsocket
        Socket services library, a library for the socket service calls
        (socket, bind, listen, etc...) on SVR4 Unixes.
     NIS
        Network Information Service, a service that provides
        information, that has to be known throughout the network, to all
        machines on the network. There is support for NIS in Linux's
        standard libc library, which in the following text is referred
        to as "traditional NIS".


     NIS+
        Network Information Service (Plus :-), essentially NIS on
        steroids. NIS+ is designed by Sun Microsystems Inc. as a
        replacement for NIS with better security and better handling of
        _large_ installations.


     NYS
        This is the name of a project and stands for NIS+, YP and Switch
        and is managed by Peter Eriksson <peter@ifm.liu.se>. It contains
        among other things a complete reimplementation of the NIS (= YP)
        code that uses the Name Services Switch functionality of the NYS
        library.


     NSS
        Name Service Switch. The /etc/nsswitch.conf file determines the
        order of lookups performed when a certain piece of information
        is requested.


     RPC
        Remote Procedure Call. RPC routines allow C programs to make
        procedure calls on other machines across the network.  When
        people talk about RPC they most often mean the Sun RPC variant.


     YP Yellow Pages(tm), a registered trademark in the UK of British
        Telecom plc.


     TCP-IP
        Transmission Control Protocol/Internet Protocol. It is the data
        communication protocol most often used on Unix machines.



  2.2.  Some General Information

  The next four lines are quoted from the Sun(tm) System & Network
  Administration Manual:



           "NIS was formerly known as Sun Yellow Pages (YP) but
            the name Yellow Pages(tm) is a registered trademark
            in the United Kingdom of British Telecom plc and may
            not be used without permission."



  NIS stands for Network Information Service. Its purpose is to provide
  information, that has to be known throughout the network, to all
  machines on the network. Information likely to be distributed by NIS
  is:


  o  login names/passwords/home directories (/etc/passwd)

  o  group information (/etc/group)

  If, for example, your password entry is recorded in the NIS passwd
  database, you will be able to login on all machines on the network
  which have the NIS client programs running.

  Sun is a trademark of Sun Microsystems, Inc. licensed to SunSoft, Inc.



  3.  NIS, NYS or NIS+ ?

  3.1.  libc 4/5 with traditional NIS or NYS ?

  The choice between "traditional NIS" or the NIS code in the NYS
  library is a choice between laziness and maturity vs. flexibility and
  love of adventure.

  The "traditional NIS" code is in the standard C library and has been
  around longer and sometimes suffers from its age and slight
  inflexibility.

  The NIS code in the NYS library requires you to recompile the libc
  library to include the NYS code into it (or maybe you can get a
  precompiled version of libc from someone who has already done it).

  Another difference is that the traditional NIS code has some support
  for NIS Netgroups, which the NYS code doesn't. On the other hand the
  NYS code allows you to handle Shadow Passwords in a transparent way.
  The "traditonal NIS" code doesn't support Shadow Passwords over NIS.


  3.2.  glibc 2 and NIS/NIS+

  Forgot all this if you use the new GNU C Library 2.x (aka libc6). It
  has real NSS (name switch service) support, which makes it very
  flexible, and contains support for the following NIS/NIS+ maps:
  aliases, ethers, group, hosts, netgroups, networks, protocols,
  publickey, passwd, rpc, services and shadow. The GNU C Library has no
  problems with shadow passwords over NIS.


  3.3.  NIS or NIS+ ?

  The choice between NIS and NIS+ is easy - use NIS if you don't have to
  use NIS+ or have severe security needs. NIS+ is _much_ more
  problematic to administer (it's pretty easy to handle on the client
  side, but the server side is horrible). Another problem is that the
  support for NIS+ under Linux is still under developement - you need
  the latest glibc 2.1.  There is an unsupported port of the glibc NIS+
  support for libc5 as dropin replacement.



  4.  How it works

  4.1.  How NIS works

  Within a network there must be at least one machine acting as a NIS
  server. You can have multiple NIS servers, each serving different NIS
  "domains" - or you can have cooperating NIS servers, where one is the
  master NIS server, and all the other are so-called slave NIS servers
  (for a certain NIS "domain", that is!) - or you can have a mix of
  them...
  Slave servers only have copies of the NIS databases and receive these
  copies from the master NIS server whenever changes are made to the
  master's databases.  Depending on the number of machines in your
  network and the reliability of your network, you might decide to
  install one or more slave servers.  Whenever a NIS server goes down or
  is too slow in responding to requests, a NIS client connected to that
  server will try to find one that is up or faster.

  NIS databases are in so-called DBM format, derived from ASCII
  databases.  For example, the files /etc/passwd and /etc/group can be
  directly converted to DBM format using ASCII-to-DBM translation
  software ("makedbm", included with the server software). The master
  NIS server should have both, the ASCII databases and the DBM
  databases.

  Slave servers  will be notified of any change to the NIS maps, (via
  the "yppush" program), and automatically retrieve the necessary
  changes in order to synchronize their databases. NIS clients do not
  need to do this since they always talk to the NIS server to read the
  information stored in it's DBM databases.

  Old ypbind versions do a broadcast to find a running NIS server.  This
  is insecure, due the fact that anyone may install a NIS server and
  answer the broadcast queries. Newer Versions of ypbind (ypbind-3.3 or
  ypbind-mt) are able to get the server from a configuration file - thus
  no need to broadcast.


  4.2.  How NIS+ works

  NIS+ is a new version of the network information nameservice from Sun.
  The biggest difference between NIS and NIS+ is that NIS+ has support
  for data encryption and authentication over secure RPC.

  The  naming  model of NIS+ is based upon a tree structure. Each node
  in the tree corresponds to an NIS+ object, from which we have six
  types: directory, entry, group, link, table and private.

  The NIS+ directory that forms the root of the NIS+ namespace is called
  the root directory. There are two special NIS+ directories: org_dir
  and groups_dir. The org_dir directory consists of all administration
  tables, such as passwd, hosts, and mail_aliases. The groups_dir
  directory consists of NIS+ group objects which are used for access
  control. The collection of org_dir, groups_dir and their parent
  directory is referred to as an NIS+ domain.


  5.  The RPC Portmapper

  To run any of the software mentioned below you will need to run the
  program /usr/sbin/portmap. Some Linux distributions already have the
  code in the /sbin/init.d/ or /etc/rc.d/ files to start up this daemon.
  All you have to do is to activate it and reboot your Linux machine.
  Read your Linux Distribution Documentation how to do this.

  The RPC portmapper (portmap(8)) is a server that converts RPC program
  numbers into TCP/IP (or UDP/IP) protocol port numbers. It must be
  running in order to make RPC calls (which is what the NIS/NIS+ client
  software does) to RPC servers (like a NIS or NIS+ server) on that
  machine.  When an RPC server is started, it will tell portmap what
  port number it is listening to, and what RPC program numbers it is
  prepared to serve.  When a client wishes to make an RPC call to a
  given program number, it will first contact portmap on the server
  machine to determine the port number where RPC packets should be sent.


  Normally, standard RPC servers are started by inetd(8), so portmap
  must be running before inetd is started.

  For secure RPC, the portmapper needs the Time service. Make sure, that
  the Time service is enabled in /etc/inetd.conf on all hosts:


       #
       # Time service is used for clock syncronization.
       #
       time    stream  tcp     nowait  root    internal
       time    dgram   udp     wait    root    internal



  IMPORTANT: Don't forget to restart inetd after changes on its
  configuration file !



  6.  What do you need to set up NIS?

  6.1.  Determine whether you are a Server, Slave or Client.

  To answer this question you have to consider two cases:


  1. Your machine is going to be part of a network with existing NIS
     servers

  2. You do not have any NIS servers in the network yet

  In the first case, you only need the client programs (ypbind, ypwhich,
  ypcat, yppoll, ypmatch). The most important program is ypbind. This
  program must be running at all times, which means, it should always
  appear in the list of processes. It is a daemon process and needs to
  be started from the system's startup file (eg. /etc/init.d/nis,
  /sbin/init.d/ypclient, /etc/rc.d/init.d/ypbind, /etc/rc.local).  As
  soon as ypbind is running your system has become a NIS client.

  In the second case, if you don't have NIS servers, then you will also
  need a NIS server program (usually called ypserv). Section ``Setting
  up a NIS Server''  describes how to set up a NIS server on your Linux
  machine using the "ypserv" implementation by Peter Eriksson and
  Thorsten Kukuk.  Note that from version 0.14 this implementation
  supports the master-slave concept talked about in section 4.1.

  There is also another free NIS server available, called "yps", written
  by Tobias Reber in Germany which does support the master-slave
  concept, but has other limitations and isn't supported since a long
  time.



  6.2.  The Software

  The system library "/usr/lib/libc.a" (version 4.4.2 and better) or the
  shared library "/lib/libc.so.x" contain all necessary system calls to
  succesfully compile the NIS client and server software. For the GNU C
  Library 2 (glibc 2.x), you also need /lib/libnsl.so.1.

  Some people reported that NIS only works with "/usr/lib/libc.a"
  version 4.5.21 and better so if you want to play it safe don't use
  older libc's.  The NIS client software can be obtained from:

         Site                  Directory                        File Name

         ftp.kernel.org        /pub/linux/utils/net/NIS         yp-tools-2.2.tar.gz
         ftp.kernel.org        /pub/linux/utils/net/NIS         ypbind-mt-1.4.tar.gz
         ftp.kernel.org        /pub/linux/utils/net/NIS         ypbind-3.3.tar.gz
         ftp.kernel.org        /pub/linux/utils/net/NIS         ypbind-3.3-glibc5.diff.gz
         ftp.uni-paderborn.de  /linux/local/yp                  yp-clients-2.2.tar.gz



  Once you obtained the software, please follow the instructions which
  come with the software. yp-clients 2.2 are for use with libc4 and
  libc5 until 5.4.20. libc 5.4.21 and glibc 2.x needs yp-tools 1.4.1 or
  later.  The new yp-tools 2.2 should work with every Linux libc. Since
  there was a bug in the NIS code, you shouldn't use libc 5.4.21-5.4.35.
  Use libc 5.4.36 or later instead, or the most YP programs will not
  work.  ypbind 3.3 will work with all libraries, too. If you use gcc
  2.8.x or greater, egcs or glibc 2.x, you should add the
  ypbind-3.3-glibc5.diff patch to ypbind 3.3. Please never use the
  ypbind from yp-clients 2.2.  ypbind-mt is a new, multithreaded daemon.
  It needs a Linux 2.2 kernel, and glibc 2.1 or later.


  6.3.  The ypbind daemon

  After you have succesfully compiled the software you are now ready to
  install it. A suitable place for the ypbind daemon is the directory
  /usr/sbin. Some people may tell you that you don't need ypbind on a
  system with NYS. This is wrong. ypwhich and ypcat need it always.

  You must do this as root of course. The other binaries (ypwhich,
  ypcat, yppasswd, yppoll, ypmatch) should go in a directory accessible
  by all users, normally /usr/bin.

  Newer ypbind versions have a configuration file called /etc/yp.conf.
  You can hardcode a NIS server there - for more info see the manual
  page for ypbind(8).  You also need this file for NYS.  An example:


         ypserver voyager
         ypserver defiant
         ypserver ds9



  If the system cam resolv the hostnames without NIS, you may use the
  name, otherwise you have to use the IP address. ypbind 3.3 has a bug
  and will only use the last entry (ypserver ds9 in the example). All
  other entries are ignored. ypbind-mt handle this correct and uses that
  one, which answerd at first.

  It might be a good idea to test ypbind before  incorporating it in the
  startup files. To test ypbind do the following:


  o  Make sure you have your YP-domain name set. If it is not set then
     issue the command:



                   /bin/domainname nis.domain



  where nis.domain should be some string _NOT_ normally associated with
  the DNS-domain name of your machine! The reason for this is that it
  makes it a little harder for external crackers to retreive the pass-
  word database from your NIS servers. If you don't know what the NIS
  domain name is on your network, ask your system/network administrator.

  o  Start up "/usr/sbin/portmap" if it is not already running.

  o  Create the directory "/var/yp" if it does not exist.

  o  Start up "/usr/sbin/ypbind"

  o  Use the command "rpcinfo -p localhost" to check if ypbind was able
     to register its service with the portmapper. The output should look
     like:



              program vers proto   port
               100000    2   tcp    111  portmapper
               100000    2   udp    111  portmapper
               100007    2   udp    637  ypbind
               100007    2   tcp    639  ypbind



  or



              program vers proto   port
               100000    2   tcp    111  portmapper
               100000    2   udp    111  portmapper
               100007    2   udp    758  ypbind
               100007    1   udp    758  ypbind
               100007    2   tcp    761  ypbind
               100007    1   tcp    761  ypbind



  Depending on the ypbind version you are using.

  o  You may also run "rpcinfo -u localhost ypbind". This command should
     produce something like:



               program 100007 version 2 ready and waiting



  or



          program 100007 version 1 ready and waiting
          program 100007 version 2 ready and waiting



  The output depends on the ypbind version you have installed.  Impor-
  tant is only the "version 2" message.

  At this point you should be able to use NIS client programs like
  ypcat, etc...  For example, "ypcat passwd.byname" will give you the
  entire NIS password database.

  IMPORTANT: If you skipped the test procedure then make sure you have
  set the domain name, and created the directory



           /var/yp



  This directory MUST exist for ypbind to start up succesfully.

  To check if the domainname is set correct, use the /bin/ypdomainname
  from yp-tools 2.2. It uses the yp_get_default_domain() function which
  is more restrict. It doesn't allow for example the "(none)"
  domainname, which is the default under Linux and makes a lot of
  problems.

  If the test worked you may now want to change your startupd files so
  that ypbind will be started at boot time and your system will act as a
  NIS client. Make sure that the domainname will be set before you start
  ypbind.

  Well, that's it. Reboot the machine and watch the boot messages to see
  if ypbind is actually started.



  6.4.  Setting up a NIS Client using Traditional NIS

  For host lookups you must set (or add) "nis" to the lookup order line
  in your /etc/host.conf file. Please read the manpage "resolv+.8" for
  more details.

  Add the following line to /etc/passwd on your NIS clients:



       +::::::



  You can also use the + and - characters to include/exclude or change
  users. If you want to exclude the user guest just add -guest to your
  /etc/passwd file.  You want to use a different shell (e.g. ksh) for
  the user "linux"?  No problem, just add "+linux::::::/bin/ksh"
  (without the quotes) to your /etc/passwd. Fields that you don't want
  to change have to be left empty. You could also use Netgroups for user
  control.

  For example, to allow login-access only to miquels, dth and ed, and
  all members of the sysadmin netgroup, but to have the account data of
  all other users available use:



             +miquels:::::::
             +ed:::::::
             +dth:::::::
             +@sysadmins:::::::
             -ftp
             +:*::::::/etc/NoShell



  Note that in Linux you can also override the password field, as we did
  in this example. We also remove the login "ftp", so it isn't known any
  longer, and anonymous ftp will not work.

  The netgroup would look like


       sysadmins (-,software,) (-,kukuk,)



  IMPORTANT: The netgroup  feature is implemented starting from libc
  4.5.26.  If you have a version of libc earlier than 4.5.26, every user
  in the NIS password database can access your linux machine if you run
  "ypbind" !



  6.5.  Setting up a NIS Client using NYS

  All that is required is that the NIS configuration file (/etc/yp.conf)
  points to the correct server(s) for its information.  Also, the Name
  Services Switch configuration file (/etc/nsswitch.conf) must be
  correctly set up.

  You should install ypbind. It isn't needed by the libc, but the
  NIS(YP) tools need it.

  If you wish to use the include/exclude user feature
  (+/-guest/+@admins), you have to use "passwd: compat" and "group:
  compat" in nsswitch.conf.  Note that there is no "shadow: compat"! You
  have to use "shadow: files nis" in this case.

  The NYS sources are part of the libc 5 sources. When run configure,
  say the first time "NO" to the "Values correct" question, then say
  "YES" to "Build a NYS libc from nys".


  6.6.  Setting up a NIS Client using glibc 2.x

  The glibc uses "traditional NIS", so you need to start ypbind. The
  Name Services Switch configuration file (/etc/nsswitch.conf) must be
  correctly set up. If you use the compat mode for passwd, shadow or
  group, you have to add the "+" at the end of this files and you can
  use the include/exclude user feature. The configuration is excatly the
  same as under Solaris 2.x.



  6.7.  The nsswitch.conf File

  The Network Services switch file /etc/nsswitch.conf determines the
  order of lookups performed when a certain piece of information is
  requested, just like the /etc/host.conf file which determines the way
  host lookups are performed. For example, the line



           hosts: files nis dns



  specifies that host lookup functions should first look in the local
  /etc/hosts file, followed by a NIS lookup and finally through the
  domain name service (/etc/resolv.conf and named), at which point if no
  match is found an error is returned. This file must be readable for
  every user! You can find more information in the man-page nsswitch.5
  or nsswitch.conf.5.

  A good /etc/nsswitch.conf file for NIS is:



  #
  # /etc/nsswitch.conf
  #
  # An example Name Service Switch config file. This file should be
  # sorted with the most-used services at the beginning.
  #
  # The entry '[NOTFOUND=return]' means that the search for an
  # entry should stop if the search in the previous entry turned
  # up nothing. Note that if the search failed due to some other reason
  # (like no NIS server responding) then the search continues with the
  # next entry.
  #
  # Legal entries are:
  #
  #       nisplus                 Use NIS+ (NIS version 3)
  #       nis                     Use NIS (NIS version 2), also called YP
  #       dns                     Use DNS (Domain Name Service)
  #       files                   Use the local files
  #       db                      Use the /var/db databases
  #       [NOTFOUND=return]       Stop searching if not found so far
  #

  passwd:     compat
  group:      compat
  # For libc5, you must use shadow: files nis
  shadow:     compat

  passwd_compat: nis
  group_compat: nis
  shadow_compat: nis

  hosts:      nis files dns

  services:   nis [NOTFOUND=return] files
  networks:   nis [NOTFOUND=return] files
  protocols:  nis [NOTFOUND=return] files
  rpc:        nis [NOTFOUND=return] files
  ethers:     nis [NOTFOUND=return] files
  netmasks:   nis [NOTFOUND=return] files
  netgroup:   nis
  bootparams: nis [NOTFOUND=return] files
  publickey:  nis [NOTFOUND=return] files
  automount:  files
  aliases:    nis [NOTFOUND=return] files



  passwd_compat, group_compat and shadow_compat are only supported by
  glibc 2.x.  If there are no shadow rules in /etc/nsswitch.conf, glibc
  will use the passwd rule for lookups. There are some more lookup
  module for glibc like hesoid.  For more information, read the glibc
  documentation.


  6.8.  Shadow Passwords with NIS

  Shadow passwords over NIS are always a bad idea. You loose the
  security, which shadow gives you, and it is supported by only some few
  Linux C Libraries. A good way to avoid shadow passwords over NIS is,
  to put only the local system users in /etc/shadow. Remove the NIS user
  entries from the shadow database, and put the password back in passwd.
  So you can use shadow for the root login, and normal passwd for NIS
  user. This has the advantage that it will work with every NIS client.


  6.8.1.  Linux

  The only Linux libc which supports shadow passwords over NIS, is the
  GNU C Library 2.x. Linux libc5 has no support for it. Linux libc5
  compiled with NYS enabled has some code for it. But this code is badly
  broken in some cases and doesn't work with all correct shadow entries.


  6.8.2.  Solaris

  Solaris does not support shadow passwords over NIS.


  6.8.3.  PAM

  PAM does not support Shadow passwords over NIS, especially
  pam_pwdb/libpwdb. This is a big problem for RedHat 5.x users. If you
  have glibc and PAM, you need to change the /etc/pam.d/* entries.
  Replace all pam_pwdb rules through pam_unix_* modules. Due a bug in
  the pam_unix_auth.so module this will not always work.

  An example /etc/pam.d/login file looks like:



       #%PAM-1.0
       auth       required     /lib/security/pam_securetty.so
       auth       required     /lib/security/pam_unix_auth.so
       auth       required     /lib/security/pam_nologin.so
       account    required     /lib/security/pam_unix_acct.so
       password   required     /lib/security/pam_unix_passwd.so
       session    required     /lib/security/pam_unix_session.so



  For auth you need to use the pam_unix_auth.so module, for account the
  pam_unix_acct.so, for password the pam_unix_passwd.so and for session
  the pam_unix_session.so module.


  7.  What do you need to set up NIS+ ?

  7.1.  The Software

  The Linux NIS+ client code was developed for the GNU C library 2.
  There is also a port for Linux libc5, since most commercial
  Applications are linked against this library, and you cannot recompile
  them for using glibc. There are problems with libc5 and NIS+: static
  programs cannot be linked with it, and programs compiled with this
  library will not work with other libc5 versions.


  You need to retrieve and compile the GNU C Library 2.1 for Intel based
  platforms, or GNU C Library 2.1.1 for 64bit platforms.  As base System
  you need a glibc based Distribution like Debian 2.x, RedHat 5.x or
  SuSE Linux 6.x.

  For every distribution, you need to recompile the gcc/g++ compiler,
  libstdc++ and ncures. For Redhat, you need to make a lot of changes of
  the PAM configuration. For SuSE Linux 6.0, you need to recompile the
  shadow package.

  The NIS+ client software can be obtained from:


    Site             Directory                     File Name

    ftp.funet.fi     /pub/gnu/funet                libc-*, glibc-crypt-*,
                                                   glibc-linuxthreads-*
    ftp.kernel.org   /pub/linux/utils/net/NIS+     nis-utils-19990223.tar.gz
    ftp.kernel.org   /pub/linux/utils/net/NIS+     pam_keylogin-1.2.tar.gz



  Distributions based on glibc can be fetched from:


         Site                   Directory

         ftp.debian.org         /pub/debian/dists/slink
         ftp.redhat.com         /pub/redhat/redhat-5.2
         ftp.suse.de            /pub/SuSE-Linux/6.0



  For compilation of the GNU C Library please follow the instructions
  which come with the software. You cam find the patched libc5, based on
  NYS, and the sources as drop in replacement for the standart libc5 at:



         Site               Directory                  File Name

         ftp.kernel.org     /pub/linux/utils/net/NIS+  libc-5.4.44-nsl-0.4.10.tar.gz



  You should also have a look at
  http://www.suse.de/~kukuk/linux/nisplus.html
  <http://www.suse.de/~kukuk/linux/nisplus.html> for more information
  and the latest sources.


  7.2.  Setting up a NIS+ client

  IMPORTANT: For setting up a NIS+ client read your Solaris NIS+ docs
  what to do on the server side! This document only describes what to do
  on the client side!

  After installing the new libc and nis-tools, create the credentials
  for the new client on the NIS+ server. Make sure portmap is running.
  Then check if your Linux PC has the same time as the NIS+ Server. For
  secure RPC, you have only a small window from about 3 minutes, in
  which the credentials are valid. A good idea is to run xntpd on every
  host. After this, run



       domainname nisplus.domain.
       nisinit -c -H <NIS+ server>



  to initialize the cold start file. Read the nisinit man page for more
  options. Make sure that the domainname will always be set after a
  reboot.  If you don't know what the NIS+ domain name is on your
  network, ask your system/network administrator.
  Now you should change your /etc/nsswitch.conf file. Make sure that the
  only service after publickey is nisplus ("publickey: nisplus"), and
  nothing else!

  Then start keyserv and make sure, that it will always be started as
  first daemon after portmap at boot time. Run


       keylogin -r



  to store the root secretkey on your system. (I hope you have added the
  publickey for the new host on the NIS+ Server?).

  "niscat passwd.org_dir" should now show you all entries in the passwd
  database.



  7.3.  NIS+, keylogin, login and PAM

  When the user logs in, he need to set his secretkey to keyserv. This
  is done by calling "keylogin". The login from the shadow package will
  do this for the user, if it was compiled against glibc 2.1. For a PAM
  aware login, you have to install pam_keylogin-1.2.tar.gz and change
  the /etc/pam.d/login file to use pam_unix_auth, not pwdb, which
  doesn't support NIS+. An example:



       #%PAM-1.0
       auth       required     /lib/security/pam_securetty.so
       auth       required     /lib/security/pam_keylogin.so
       auth       required     /lib/security/pam_unix_auth.so
       auth       required     /lib/security/pam_nologin.so
       account    required     /lib/security/pam_unix_acct.so
       password   required     /lib/security/pam_unix_passwd.so
       session    required     /lib/security/pam_unix_session.so



  7.4.  The nsswitch.conf File

  The Network Services switch file /etc/nsswitch.conf determines the
  order of lookups performed when a certain piece of information is
  requested, just like the /etc/host.conf file which determines the way
  host lookups are performed. For example, the line



           hosts: files nisplus dns



  specifies that host lookup functions should first look in the local
  /etc/hosts file, followed by a NIS+ lookup and finally through the
  domain name service (/etc/resolv.conf and named), at which point if no
  match is found an error is returned.


  A good /etc/nsswitch.conf file for NIS+ is:


       #
       # /etc/nsswitch.conf
       #
       # An example Name Service Switch config file. This file should be
       # sorted with the most-used services at the beginning.
       #
       # The entry '[NOTFOUND=return]' means that the search for an
       # entry should stop if the search in the previous entry turned
       # up nothing. Note that if the search failed due to some other reason
       # (like no NIS server responding) then the search continues with the
       # next entry.
       #
       # Legal entries are:
       #
       #       nisplus                 Use NIS+ (NIS version 3)
       #       nis                     Use NIS (NIS version 2), also called YP
       #       dns                     Use DNS (Domain Name Service)
       #       files                   Use the local files
       #       db                      Use the /var/db databases
       #       [NOTFOUND=return]       Stop searching if not found so far
       #

       passwd:     compat
       # for libc5: passwd: files nisplus
       group:      compat
       # for libc5: group: files nisplus
       shadow:     compat
       # for libc5: shadow: files nisplus

       passwd_compat: nisplus
       group_compat:  nisplus
       shadow_compat: nisplus

       hosts:      nisplus files dns

       services:   nisplus [NOTFOUND=return] files
       networks:   nisplus [NOTFOUND=return] files
       protocols:  nisplus [NOTFOUND=return] files
       rpc:        nisplus [NOTFOUND=return] files
       ethers:     nisplus [NOTFOUND=return] files
       netmasks:   nisplus [NOTFOUND=return] files
       netgroup:   nisplus
       bootparams: nisplus [NOTFOUND=return] files
       publickey:  nisplus
       automount:  files
       aliases:    nisplus [NOTFOUND=return] files



  8.  Setting up a NIS Server

  8.1.  The Server Program ypserv

  This document only describes how to set up the "ypserv" NIS server.

  The NIS server software can be found on:


         Site               Directory                    File Name

         ftp.kernel.org     /pub/linux/utils/net/NIS     ypserv-1.3.6.tar.gz



  You could also look at http://www.suse.de/~kukuk/linux/nis.html
  <http://www.suse.de/~kukuk/linux/nis.html> for more information.

  The server setup is the same for both traditional NIS and NYS.

  Compile the software to generate the ypserv and makedbm programs. You
  can configure ypserv to use the securenets file or the tcp_wrappers.
  The tcp_wrapper is much more flexible, but a lot of people have big
  problems with it. And some configuration files for tcp_wrappers may
  cause a memory leak. If you have problems with ypserv compiled for
  tcp_wrapper, recompile it using the securenets file.  ypserv --version
  tells you, which version you have.

  If you run your server as master, determine what files you require to
  be available via NIS and then add or remove the appropriate entries to
  the "all" rule in /var/yp/Makefile. You always should look at the
  Makefile and edit the Options at the beginning of the file.

  There was one big change between ypserv 1.1 and ypserv 1.2. Since
  version 1.2, the file handles are cached. This means you have to call
  makedbm always with the -c option if you create new maps. Make sure,
  you are using the new /var/yp/Makefile from ypserv 1.2 or later, or
  add the -c flag to makedbm in the Makefile. If you don't do that,
  ypserv will continue to use the old maps, and not the updated one.

  Now edit /var/yp/securenets and /etc/ypserv.conf.  For more
  information, read the ypserv(8) and ypserv.conf(5) manual pages.

  Make sure the portmapper (portmap(8)) is running, and start the server
  ypserv. The command



           % rpcinfo -u localhost ypserv



  should output something like



           program 100004 version 1 ready and waiting
           program 100004 version 2 ready and waiting



  The "version 1" line could be missing, depending on the ypserv version
  and configuration you are using. It is only necessary if you have old
  SunOS 4.x clients.

  Now generate the NIS (YP) database. On the master, run



           % /usr/lib/yp/ypinit -m


  On a slave make sure that ypwhich -m works. This means, that your
  slave must be configured as NIS client before you could run


           % /usr/lib/yp/ypinit -s masterhost



  to install the host as NIS slave.


  That's it, your server is up and running.

  If you have bigger problems, you could start ypserv and ypbind in
  debug mode on different xterms. The debug output should show you what
  goes wrong.

  If you need to update a map, run make in the /var/yp directory on the
  NIS master. This will update a map if the source file is newer, and
  push the files to the slave servers. Please don't use ypinit for
  updating a map.

  You might want to edit root's crontab *on the slave* server and add
  the following lines:



             20 *    * * *    /usr/lib/yp/ypxfr_1perhour
             40 6    * * *    /usr/lib/yp/ypxfr_1perday
             55 6,18 * * *    /usr/lib/yp/ypxfr_2perday



  This will ensure that most NIS maps are kept up-to-date, even if an
  update is missed because the slave was down at the time the update was
  done on the master.

  You can add a slave at every time later. At first, make sure that the
  new slave server has permissions to contact the NIS master. Then run


           % /usr/lib/yp/ypinit -s masterhost



  on the new slave. On the master server, add the new slave server name
  to /var/yp/ypservers and run make in /var/yp to update the map.


  If you want to restrict access for users to your NIS server, you'll
  have to setup the NIS server as a client as well by running ypbind and
  adding the plus-entries to /etc/passwd _halfway_ the password file.
  The library functions will ignore all normal entries after the first
  NIS entry, and will get the rest of the info through NIS. This way the
  NIS access rules are maintained. An example:



       root:x:0:0:root:/root:/bin/bash
       daemon:*:1:1:daemon:/usr/sbin:
       bin:*:2:2:bin:/bin:
       sys:*:3:3:sys:/dev:
       sync:*:4:100:sync:/bin:/bin/sync
       games:*:5:100:games:/usr/games:
       man:*:6:100:man:/var/catman:
       lp:*:7:7:lp:/var/spool/lpd:
       mail:*:8:8:mail:/var/spool/mail:
       news:*:9:9:news:/var/spool/news:
       uucp:*:10:50:uucp:/var/spool/uucp:
       nobody:*:65534:65534:noone at all,,,,:/dev/null:
       +miquels::::::
       +:*:::::/etc/NoShell
       [ All normal users AFTER this line! ]
       tester:*:299:10:Just a test account:/tmp:
       miquels:1234567890123:101:10:Miquel van Smoorenburg:/home/miquels:/bin/zsh



  Thus the user "tester" will exist, but have a shell of /etc/NoShell.
  miquels will have normal access.

  Alternatively, you could edit the /var/yp/Makefile file and set NIS to
  use another source password file. On large systems the NIS password
  and group files are usually stored in /etc/yp/. If you do this the
  normal tools to administrate the password file such as passwd, chfn,
  adduser will not work anymore and you need special homemade tools for
  this.

  However, yppasswd, ypchsh and ypchfn will work of course.


  8.2.  The Server Program yps

  To set up the "yps" NIS server please refer to the previous paragraph.
  The "yps" server setup is similar, _but_ not exactly the same so
  beware if you try to apply the "ypserv" instructions to "yps"!  "yps"
  is not supported by any author, and contains some security leaks.  You
  really shouldn't use it !

  The "yps" NIS server software can be found on:



         Site                  Directory                   File Name

         ftp.lysator.liu.se    /pub/NYS/servers            yps-0.21.tar.gz
         ftp.kernel.org        /pub/linux/utils/net/NIS    yps-0.21.tar.gz



  8.3.  The Program rpc.ypxfrd

  rpc.ypxfrd is used for speed up the transfer of very large NIS  maps
  from a NIS master to NIS slave servers. If a NIS slave server receives
  a message that there is  a  new map,  it  will  start  ypxfr  for
  transfering the new map.  ypxfr will read the contents of  a  map
  from  the  master server  using the yp_all() function. This process
  can take several minutes when there are very large maps which  have to
  store by the database library.


  The  rpc.ypxfrd  server  speeds up the transfer process by allowing
  NIS slave  servers  to  simply  copy  the  master server's  map  files
  rather  than building their own from scratch.  rpc.ypxfrd uses an RPC-
  based file transfer  protocol, so that there is no need for building a
  new map.


  rpc.ypxfrd can be started by inetd. But since it starts very slow, it
  should be started with ypserv. You need to start rpc.ypxfrd only on
  the NIS master server.


  8.4.  The Program rpc.yppasswdd

  Whenever users change their passwords, the NIS password database and
  probably other NIS databases, which depend on the NIS password
  database, should be updated.  The program "rpc.yppasswdd" is a server
  that handles password changes and makes sure that the NIS information
  will be updated accordingly. rpc.yppasswdd is now integrated in
  ypserv. You don't need the older, separate yppasswd-0.9.tar.gz or
  yppasswd-0.10.tar.gz, and you shouldn't use them any longer. The
  rpc.yppasswdd in ypserv 1.3.2 has full shadow support. yppasswd is now
  part of yp-tools-2.2.tar.gz.

  You need to start rpc.yppasswdd only on the NIS master server. By
  default, users are not allowed to change their full name or the login
  shell.  You can allow this with the -e chfn or -e chsh option.

  If your passwd and shadow files are not in another directory then
  /etc, you need to add the -D option. For example, if you have put all
  source files in /etc/yp and wish to allow the user to change his
  shell, you need to start rpc.yppasswdd with the following parameters:



          rpc.yppasswdd -D /etc/yp -e chsh



  or



          rpc.yppasswdd -s /etc/yp/shadow -p /etc/yp/passwd -e chsh



  There is nothing more to do. You just need to make sure, that
  rpc.yppasswdd uses the same files as /var/yp/Makefile.  Errors will be
  logged using syslog.


  9.  Verifying the NIS/NYS Installation

  If everything is fine (as it should be), you should be able to verify
  your installation with a few simple commands. Assuming, for example,
  your passwd file is being supplied by NIS, the command



           % ypcat passwd



  should give you the contents of your NIS passwd file. The command



           % ypmatch userid passwd



  (where userid is the login name of an arbitrary user) should give you
  the user's entry in the NIS passwd file. The "ypcat" and "ypmatch"
  programs should be included with your distribution of traditional NIS
  or NYS.

  If a user cannot log in, run the following program on the client:


       #include <stdio.h>
       #include <pwd.h>
       #include <sys/types.h>

       int
       main(int argc, char *argv[])
       {
         struct passwd *pwd;

         if(argc != 2)
           {
             fprintf(stderr,"Usage: getwpnam username\n");
             exit(1);
           }

         pwd=getpwnam(argv[1]);

         if(pwd != NULL)
           {
             printf("name.....: [%s]\n",pwd->pw_name);
             printf("password.: [%s]\n",pwd->pw_passwd);
             printf("user id..: [%d]\n", pwd->pw_uid);
             printf("group id.: [%d]\n",pwd->pw_gid);
             printf("gecos....: [%s]\n",pwd->pw_gecos);
             printf("directory: [%s]\n",pwd->pw_dir);
             printf("shell....: [%s]\n",pwd->pw_shell);
           }
         else
           fprintf(stderr,"User \"%s\" not found!\n",argv[1]);

         exit(0);
       }



  Running this program with the username as parameter will print all the
  information the getpwnam function gives back for this user. This
  should show you which entry is incorrect. The most common problem is,
  that the password field is overwritten with a "*".

  GNU C Library 2.1 (glibc 2.1) comes with a tool called getent. Use
  this program instead the above on such a system. You could try:


          getent passwd



  or


          getent passwd login



  10.  Common Problems and Troubleshooting NIS

  Here are some common problems reported by various users:


  1. The libraries for 4.5.19 are broken. NIS won't work with it.

  2. If you upgrade the libraries from 4.5.19 to 4.5.24 then the su
     command breaks. You need to get the su command from the slackware
     1.2.0 distribution. Incidentally that's where you can get the
     updated libraries.

  3. When a NIS server goes down and comes up again ypbind starts
     complaining with messages like:


              yp_match: clnt_call:
                          RPC: Unable to receive; errno = Connection refused



  and logins are refused for those who are registered in the NIS
  database. Try to login as root and kill ypbind and start it up again.
  An update to ypbind 3.3 or higher should also help.

  4. After upgrading the libc to a version greater then 5.4.20, the YP
     tools will not work any longer. You need yp-tools 1.2 or later for
     libc >= 5.4.21 and glibc 2.x. For earlier libc version you need yp-
     clients 2.2. yp-tools 2.x should work for all libraries.

  5. In libc 5.4.21 - 5.4.35 yp_maplist is broken, you need 5.4.36 or
     later, or some YP programs like ypwhich will segfault.

  6. libc 5 with traditional NIS doesn't support shadow passwords over
     NIS.  You need libc5 + NYS or glibc 2.x.

  7. ypcat shadow doesn't show the shadow map. This is correct, the name
     of the shadow map is shadow.byname, not shadow.

  8. Solaris doesn't use always privileged ports. So don't use password
     mangling if you have a Solaris client.



  11.  Frequently Asked Questions

  Most of your questions should be answered by now. If there are still
  questions unanswered you might want to post a message to



           comp.os.linux.networking



  Linux Networking-HOWTO:
  Author: Joshua Drake poet@linuxports.com
  v1.6.5, March 22, 2000

  A www.linuxports.com document for the Linux Documentation Project

  1.  Introduction.

  New versions of this document can always be found first at
  http://www.linuxports.com/.

  Previously the document was called the Net3/4 and Net-3 Howto's. I
  believe that may not have been obvious enough for certain readers. So,
  I have renamed it the Networking-HOWTO.

  This document has an auto contribute function located at
  LinuxPorts.Com.  (www.linuxports.com/howto/networking/updates.phtml)
  If you have something that you like like to add to this document you
  may do so at LinuxPorts.Com page.
  (www.linuxports.com/howto/networking/updates.phtml)


  2.  Document History

  The original NET-FAQ was written by Matt Welsh and Terry Dawson to
  answer frequently asked questions about networking for Linux at a time
  before the Linux Documentation Project had formally started. It
  covered the very early development versions of the Linux Networking
  Kernel. The NET-2-HOWTO superceded the NET-FAQ and was one of the
  original LDP HOWTO documents, it covered what was called version 2 and
  later version 3 of the Linux kernel Networking software. This document
  in turn supercedes it and relates only to version 4 of the Linux
  Networking Kernel or more specifically kernel releases 2.x and 2.2.x.

  Previous versions of this document became quite large because of the
  enormous amount of material that fell within its scope. To help reduce
  this problem a number of HOWTO's dealing with specific networking
  topics have been produced. This document will provide pointers to them
  where relevant and cover those areas not yet covered by other
  documents.


  2.1.  Feedback

  We are always interested in feedback. Please contact us at:
  poet@linuxports.com.

  Again, if you find anything erroneous or anything you would like to
  see added, please contact us.

  3.  How to use this HOWTO.

  This document is organized top-down. The first sections include
  informative material and can be skipped if you are not interested;
  what follows is a generic discussion of networking issues, and you
  must ensure you understand this before proceeding to more specific
  parts. The rest, ``technology specific'' information is grouped in
  three main sections: Ethernet and IP-related information, technologies
  pertaining to widespread PC hardware and seldom-used technologies.

  The suggested path through the document is thus the following:



     Read the generic sections
        These sections apply to every, or nearly every, technology
        described later and so are very important for you to understand.
        On the other hand, I expect many of the readers to be already
        confident with this material.


     Consider your network
        You should know how your network is, or will be, designed and
        exactly what hardware and technology types you will be
        implementing.


     Read the ``Ethernet and IP'' section if you are directly connected
        a LAN or the Internet" This section describes basic Ethernet
        configuration and the various features that Linux offers for IP
        networks, like firewalling, advanced routing and so on.


     Read the next section if you are interested in low-cost local
        networks or dial-up connections" The section describes PLIP,
        PPP, SLIP and ISDN, the widespread technologies used on personal
        workstations.


     Read the technology specific sections related to your
        requirements" If your needs differ from IP and/or common
        hardware, the final section covers details specific to non-IP
        protocols and peculiar communication hardware.


     Do the configuration work
        You should actually try to configure your network and take
        careful note of any problems you have.


     Look for further help if needed
        If you experience problems that this document does not help you
        to resolve then read the section related to where to get help or
        where to report bugs.


     Have fun!
        Networking is fun, enjoy it.


  3.1.  Conventions used in this document

  No special convention is used here, but you must be warned about the
  way commands are shown. Following the classic Unix documentation, any
  command you should type to your shell is prefixed by a prompt. This
  howto shows "user%" as the prompt for commands that do not require
  superuser privileges, and "root#" as the prompt for commands that need
  to run as root. I chose to use "root#" instead of a plain "#" to
  prevent confusion with snapshots from shell scripts, where the hash
  mark is used to define comment lines.

  When ``Kernel Compile Options'' are shown, they are represented in the
  format used by menuconfig. They should be understandable even if you
  (like me) are not used to menuconfig. If you are in doubt about the
  options' nesting, running the program once can't but help.

  4.  General Information about Linux Networking.



  4.1.  Linux Networking Resources.

  There are a number of places where you can find good information about
  Linux networking.

  There are a wealth of Consultants available. A searchable listing can
  be found at http://www.linuxports.com/

  Alan Cox, the current maintainer of the Linux kernel networking code
  maintains a world wide web page that contains highlights of current
  and new developments in linux Networking at: www.uk.linux.org.

  There is a newsgroup in the Linux news hierarchy dedicated to
  networking and related matters, it is: comp.os.linux.networking

  There is a mailing list to which you can subscribe where you may ask
  questions relating to Linux networking. To subscribe you should send a
  mail message:


               To: majordomo@vger.rutgers.edu
               Subject: anything at all
               Message:
               subscribe linux-net



  Please remember when reporting any problem to include as much relevant
  detail about the problem as you can. Specifically you should specify
  the versions of software that you are using, especially the kernel
  version, the version of tools such as pppd/ or dip and the exact
  nature of the problem you are experiencing. This means taking note of
  the exact syntax of any error messages you receive and of any commands
  that you are issuing.

  4.2.  Where to get some non-linux-specific network information.

  If you are after some basic tutorial information on tcp/ip networking
  generally, then I recommend you take a look at the following
  documents:



     tcp/ip introduction
        this document comes as both a text version and a postscript
        version.


     tcp/ip administration
        this document comes as both a text version and a postscript
        version.


  If you are after some more detailed information on tcp/ip networking
  then I highly recommend:


       Internetworking with TCP/IP, Volume 1: principles, protocols
       and architecture, by Douglas E. Comer, ISBN 0-13-227836-7,
       Prentice Hall publications, Third Edition, 1995.



  If you are wanting to learn about how to write network applications in
  a Unix compatible environment then I also highly recommend:


       Unix Network Programming, by W. Richard Stevens, ISBN
       0-13-949876-1, Prentice Hall publications, 1990.



  A second edition of this book is appearing on the bookshelves; the new
  book is made up of three volumes: check Prenice-Hall's web site to
  probe further.

  You might also try the comp.protocols.tcp-ip newsgroup.

  An important source of specific technical information relating to the
  Internet and the tcp/ip suite of protocols are RFC's. RFC is an
  acronym for `Request For Comment' and is the standard means of
  submitting and documenting Internet protocol standards. There are many
  RFC repositories. Many of these sites are ftp sites and other provide
  World Wide Web access with an associated search engine that allows you
  to search the RFC database for particular keywords.

  One possible source for RFC's is at Nexor RFC database.

  5.  Generic Network Configuration Information.

  The following subsections you will pretty much need to know and
  understand before you actually try to configure your network. They are
  fundamental principles that apply regardless of the exact nature of
  the network you wish to deploy.

  5.1.  What do I need to start ?

  Before you start building or configuring your network you will need
  some things. The most important of these are:

  5.1.1.  Current Kernel source(Optional).

  Please note:

  The majority of current distributions come with networking enabled,
  therefore it may not be required to recompile the kernel. If you are
  running well known hardware you should be just fine. For example: 3COM
  NIC, NE2000 NIC, or a Intel NIC. However if you find yourself in the
  position that you do need to update the kernel, the following
  information is provided.

  Because the kernel you are running now might not yet have support for
  the network types or cards that you wish to use you will probably need
  the kernel source so that you can recompile the kernel with the
  appropriate options.

  For users of the major distributions such as Redhat, Caldera, Debian,
  or Suse this no longer holds true. As long as you stay within the
  mainstream of hardware there should be no need to recompile your
  kernel unless there is a very specific feature that you need.

  You can always obtain the latest kernel source from ftp.cdrom.com.
  This is not the official site but they have LOTS of bandwidth and
  capacity.  The official site is kernel.org but please use the above if
  you can. Please remember that ftp.kernel.org is seriously overloaded.
  Use a mirror.

  Normally the kernel source will be untarred into the /usr/src/linux
  directory. For information on how to apply patches and build the
  kernel you should read the Kernel-HOWTO.  For information on how to
  configure kernel modules you should read the ``Modules mini-HOWTO''.
  Also, the README file found in the kernel sources and the
  Documentation directory are very informative for the brave reader.

  Unless specifically stated otherwise, I recommend you stick with the
  standard kernel release (the one with the even number as the second
  digit in the version number). Development release kernels (the ones
  with the odd second digit) may have structural or other changes that
  may cause problems working with the other software on your system. If
  you are uncertain that you could resolve those sorts of problems in
  addition to the potential for there being other software errors, then
  don't use them.

  5.1.2.  IP Addresses, an Explanation.

  Internet Protocol Addresses are composed of four bytes. The convention
  is to write addresses in what is called `dotted decimal notation'. In
  this form each byte is converted to a decimal number (0-255) dropping
  any leading zero's unless the number is zero and written with each
  byte separated by a `.' character. By convention each interface of a
  host or router has an IP address. It is legal for the same IP address
  to be used on each interface of a single machine in some circumstances
  but usually each interface will have its own address.

  Internet Protocol Networks are contiguous sequences of IP addresses.
  All addresses within a network have a number of digits within the
  address in common. The portion of the address that is common amongst
  all addresses within the network is called the `network portion' of
  the address. The remaining digits are called the `host portion'. The
  number of bits that are shared by all addresses within a network is
  called the netmask and it is role of the netmask to determine which
  addresses belong to the network it is applied to and which don't. For
  example, consider the following:



               -----------------  ---------------
               Host Address       192.168.110.23
               Network Mask       255.255.255.0
               Network Portion    192.168.110.
               Host portion                  .23
               -----------------  ---------------
               Network Address    192.168.110.0
               Broadcast Address  192.168.110.255
               -----------------  ---------------



  Any address that is 'bitwise anded' with its netmask will reveal the
  address of the network it belongs to. The network address is therefore
  always the lowest numbered address within the range of addresses on
  the network and always has the host portion of the address coded all
  zeroes.

  The broadcast address is a special address that every host on the
  network listens to in addition to its own unique address. This address
  is the one that datagrams are sent to if every host on the network is
  meant to receive it. Certain types of data like routing information
  and warning messages are transmitted to the broadcast address so that
  every host on the network can receive it simultaneously. There are two
  commonly used standards for what the broadcast address should be. The
  most widely accepted one is to use the highest possible address on the
  network as the broadcast address.  In the example above this would be
  192.168.110.255. For some reason other sites have adopted the
  convention of using the network address as the broadcast address. In
  practice it doesn't matter very much which you use but you must make
  sure that every host on the network is configured with the same
  broadcast address.

  For administrative reasons some time early in the development of the
  IP protocol some arbitrary groups of addresses were formed into
  networks and these networks were grouped into what are called classes.
  These classes provide a number of standard size networks that could be
  allocated. The ranges allocated are:



               --------------------------------------------------------------------------------
               | Network           | Netmask       | Network Addresses                 |
               | Class                         |                                |                                                                    |
               --------------------------------------------------------------------------------
               |    A    | 255.0.0.0                                   | 0.0.0.0    - 127.255.255.255   |
               |    B    | 255.255.0.0                         | 128.0.0.0  - 191.255.255.255 |
               |    C    | 255.255.255.0                       | 192.0.0.0  - 223.255.255.255 |
               |Multicast| 240.0.0.0                           | 224.0.0.0  - 239.255.255.255 |
               --------------------------------------------------------------------------------



  What addresses you should use depends on exactly what it is that you
  are doing. You may have to use a combination of the following
  activities to get all the addresses you need:



     Installing a linux machine on an existing IP network
        If you wish to install a linux machine onto an existing IP
        network then you should contact whoever administers the network
        and ask them for the following information:


     o  Host IP Address

     o  IP network address

     o  IP broadcast address

     o  IP netmask

     o  Router address

     o  Domain Name Server Address


        You should then configure your linux network device with those
        details.  You can not make them up and expect your configuration
        to work.


     Building a brand new network that will never connect to the
        Internet" If you are building a private network and you never
        intend that network to be connected to the Internet then you can
        choose whatever addresses you like.  However, for safety and
        consistency reasons there have been some IP network addresses
        that have been reserved specifically for this purpose. These are
        specified in RFC1597 and are as follows:

                  -----------------------------------------------------------
                  |         RESERVED PRIVATE NETWORK ALLOCATIONS            |
                  -----------------------------------------------------------
                  | Network | Netmask       | Network Addresses             |
                  | Class   |               |                               |
                  -----------------------------------------------------------
                  |    A    | 255.0.0.0     | 10.0.0.0    - 10.255.255.255  |
                  |    B    | 255.255.0.0   | 172.16.0.0  - 172.31.255.255  |
                  |    C    | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 |
                  -----------------------------------------------------------



     You should first decide how large you want your network to be and
     then choose as many of the addresses as you require.


  5.2.  Where should I put the configuration commands ?

  There are a few different approaches to Linux system boot procedures.
  After the kernel boots, it always executes a program called `init'.
  The init program then reads its configuration file called /etc/inittab
  and commences the boot process. There are a few different flavours of
  init around, although everyone is now converging to the System V
  (Five) flavor, developed by Miguel van Smoorenburg.

  Despite the fact that the init program is always the same, the setup
  of system boot is organized in a different way by each distribution.

  Usually the /etc/inittab file contains an entry looking something
  like:



               si::sysinit:/etc/init.d/boot



  This line specifies the name of the shell script file that actually
  manages the boot sequence. This file is somewhat equivalent to the
  AUTOEXEC.BAT file in MS-DOS.

  There are usually other scripts that are called by the boot script and
  often the network is configured within one of many of these.

  The following table may be used as a guide for your system:



       ---------------------------------------------------------------------------
       Distrib. | Interface Config/Routing          | Server Initialization
       ---------------------------------------------------------------------------
       Debian   | /etc/init.d/network               | /etc/rc2.d/*
       ---------------------------------------------------------------------------
       Slackware| /etc/rc.d/rc.inet1                | /etc/rc.d/rc.inet2
       ---------------------------------------------------------------------------
       RedHat   | /etc/rc.d/init.d/network          | /etc/rc.d/rc3.d/*
       ---------------------------------------------------------------------------



  Note that Debian and Red Hat use a whole directory to host scripts
  that fire up system services (and usually information does not lie
  within these files, for example Red Hat systems store all of system
  configuration in files under /etc/sysconfig, whence it is retrieved by
  boot scripts). If you want to grasp the details of the boot process,
  my suggestion is to check /etc/inittab and the documentation that
  accompanies init. Linux Journal is also going to publish an article
  about system initialization, and this document will point to it as
  soon as it is available on the web.

  Most modern distributions include a program that will allow you to
  configure many of the common sorts of network interfaces. If you have
  one of these then you should see if it will do what you want before
  attempting a manual configuration.



               -----------------------------------------
               Distrib   | Network configuration program
               -----------------------------------------
               RedHat    | /usr/bin/netcfg
               Slackware | /sbin/netconfig
               -----------------------------------------



  5.3.  Creating your network interfaces.

  In many Unix operating systems the network devices have appearances in
  the /dev directory. This is not so in Linux. In Linux the network
  devices are created dynamically in software and do not require device
  files to be present.

  In the majority of cases the network device is automatically created
  by the device driver while it is initializing and has located your
  hardware. For example, the ethernet device driver creates eth[0..n]
  interfaces sequentially as it locates your ethernet hardware. The
  first ethernet card found becomes eth0, the second eth1 etc.

  In some cases though, notably slip and ppp, the network devices are
  created through the action of some user program. The same sequential
  device numbering applies, but the devices are not created
  automatically at boot time. The reason for this is that unlike
  ethernet devices, the number of active slip or ppp devices may vary
  during the uptime of the machine. These cases will be covered in more
  detail in later sections.

  5.4.  Configuring a network interface. Kernels 2.0 and 2.2

  When you have all of the programs you need and your address and
  network information you can configure your network interfaces. When we
  talk about configuring a network interface we are talking about the
  process of assigning appropriate addresses to a network device and to
  setting appropriate values for other configurable parameters of a
  network device. The program most commonly used to do this is the
  ifconfig (interface configure) command.

  Typically you would use a command similar to the following:



          root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up



  In this case I'm configuring an ethernet interface `eth0' with the IP
  address `192.168.0.1' and a network mask of `255.255.255.0'.  The `up'
  that trails the command tells the interface that it should become
  active, but can usually be omitted, as it is the default. To shutdown
  an interface, you can just call ``ifconfig eth0 down''.

  The kernel assumes certain defaults when configuring interfaces. For
  example, you may specify the network address and broadcast address for
  an interface, but if you don't, as in my example above, then the
  kernel will make reasonable guesses as to what they should be based on
  the netmask you supply and if you don't supply a netmask then on the
  network class of the IP address configured.  In my example the kernel
  would assume that it is a class-C network being configured on the
  interface and configure a network address of `192.168.0.0' and a
  broadcast address of `192.168.0.255' for the interface.

  There are many other options to the ifconfig command. The most
  important of these are:


     up this option activates an interface (and is the default).

     down
        this option deactivates an interface.

     [-]arp
        this option enables or disables use of the address resolution
        protocol on this interface

     [-]allmulti
        this option enables or disables the reception of all hardware
        multicast packets. Hardware multicast enables groups of hosts to
        receive packets addressed to special destinations. This may be
        of importance if you are using applications like desktop
        videoconferencing but is normally not used.

     mtu N
        this parameter allows you to set the MTU of this device.

     netmask <addr>
        this parameter allows you to set the network mask of the network
        this device belongs to.

     irq <addr>
        this parameter only works on certain types of hardware and
        allows you to set the IRQ of the hardware of this device.

     [-]broadcast [addr]
        this parameter allows you to enable and set the accepting of
        datagrams destined to the broadcast address, or to disable
        reception of these datagrams.

     [-]pointopoint [addr]
        this parameter allows you to set the address of the machine at
        the remote end of a point to point link such as for slip or ppp.

     hw <type <addr>
        this parameter allows you to set the hardware address of certain
        types of network devices. This is not often useful for ethernet,
        but is useful for other network types such as AX.25.


  With the release of Kernel 2.2 there are a number of options available
  that are not listed above. Some of the most interesting are tunneling
  and IPV6 options. The ifconfig paramaters for kernel 2.2 are listed
  below.


     interface
        The  name  of  the  interface.   This  is usually a driver name
        followed by a unit number, for  example eth0 for the first
        Ethernet interface.

     up This flag causes the interface to be activated. It is implicitly
        specified if an address  is  assigned to the interface.

     down
        This  flag  causes the driver for this interface to be shut
        down.

     [-]arp
        Enable or disable the use of the  ARP  protocol  on this
        interface.

     [-]promisc
        Enable  or  disable  the  promiscuous  mode  of the interface.
        If selected, all packets on the network will be received by the
        interface.

     [-]allmulti
        Enable or disable all-multicast mode.  If selected, all
        multicast  packets  on  the  network  will  be received by the
        interface.

     metric N
        This parameter sets the interface metric.

     mtu N
        This parameter sets the Maximum Transfer Unit (MTU) of an
        interface.

     dstaddr addr
        Set the remote IP address for a point-to-point link (such  as
        PPP).  This keyword is now obsolete; use the pointopoint keyword
        instead.

     netmask addr
        Set the IP network mask for this  interface.   This value
        defaults to the usual class A, B or C network mask (as derived
        from the  interface  IP  address), but it can be set to any
        value.

     add addr prefixlen
        Add an IPv6 address to an interface.


     del addr prefixlen
        Remove an IPv6 address from an interface.

     tunnel aa.bb.cc.dd
        Create  a new SIT (IPv6-in-IPv4) device, tunnelling to the given
        destination.

     irq addr
        Set the interrupt line used by  this  device.   Not all  devices
        can dynamically change their IRQ set- ting.

     io_addr addr
        Set the start address in I/O space for this device.

     mem_start addr
        Set  the  start  address  for shared memory used by this device.
        Only a few devices need this.

     media type
        Set the physical port or medium type to be used  by the device.
        Not all devices can change this set- ting, and those that can
        vary in what  values  they support.  Typical values for type are
        10base2 (thin Ethernet), 10baseT (twisted-pair 10Mbps
        Ethernet), AUI  (external transceiver) and so on.  The special
        medium type of auto can be used to tell the  driver to  auto-
        sense  the  media.  Again, not all drivers can do this.

     [-]broadcast [addr]
        If the address argument is given, set the  protocol broadcast
        address  for this interface.  Otherwise, set (or  clear)  the
        IFF_BROADCAST  flag  for  the interface.

     [-]pointopoint [addr]
        This  keyword enables the point-to-point mode of an interface,
        meaning that it is a direct link between two machines with
        nobody else listening on it.  If the address argument is also
        given, set the pro- tocol address of the other side of the
        link,  just like the obsolete dstaddr keyword does.  Otherwise,
        set or  clear  the  IFF_POINTOPOINT  flag  for  the interface.

     hw class address
        Set  the hardware address of this interface, if the device
        driver supports this operation.  The keyword must  be followed
        by the name of the hardware class and the printable ASCII
        equivalent of the  hardware address.    Hardware  classes
        currently  supported include ether (Ethernet), ax25 (AMPR
        AX.25), ARCnet and netrom (AMPR NET/ROM).

     multicast
        Set  the  multicast  flag  on  the  interface. This should not
        normally be needed as  the  drivers  set the flag correctly
        themselves.

     address
        The IP address to be assigned to this interface.

     txqueuelen length
        Set the length of the transmit queue of the device.  It is
        useful to set this to small values for slower devices  with a
        high latency (modem links, ISDN) to prevent fast bulk transfers
        from disturbing  inter- active traffic like telnet too much.


        You may use the ifconfig command on any network interface. Some
        user programs such as pppd and dip automatically configure the
        network devices as they create them, so manual use of ifconfig
        is unnecessary.

  5.5.  Configuring your Name Resolver.

  The `Name Resolver' is a part of the linux standard library. Its prime
  function is to provide a service to convert human-friendly hostnames
  like `ftp.funet.fi' into machine friendly IP addresses such as
  128.214.248.6.

  5.5.1.  What's in a name ?

  You will probably be familiar with the appearance of Internet host
  names, but may not understand how they are constructed, or
  deconstructed. Internet domain names are hierarchical in nature, that
  is, they have a tree-like structure. A `domain' is a family, or group
  of names. A `domain' may be broken down into `subdomain'. A `toplevel
  domain' is a domain that is not a subdomain. The Top Level Domains are
  specified in RFC-920. Some examples of the most common top level
  domains are:


     COM
        Commercial Organizations

     EDU
        Educational Organizations

     GOV
        Government Organizations

     MIL
        Military Organizations

     ORG
        Other organizations

     NET
        Internet-Related Organizations

     Country Designator
        these are two letters codes that represent a particular country.


  For historical reasons most domains belonging to one of the non-
  country based top level domains were used by organizations within the
  United States, although the United States also has its own country
  code `.us'. This is not true any more for .com and .org domains, which
  are commonly used by non-us companies.

  Each of these top level domains has subdomains. The top level domains
  based on country name are often next broken down into subdomains based
  on the com, edu, gov, mil and org domains. So for example you end up
  with: com.au and gov.au for commercial and government organizations in
  Australia; note that this is not a general rule, as actual policies
  depend on the naming authority for each domain.

  The next level of division usually represents the name of the
  organization.  Further subdomains vary in nature, often the next level
  of subdomain is based on the departmental structure of the
  organization but it may be based on any criterion considered
  reasonable and meaningful by the network administrators for the
  organization.

  The very left-most portion of the name is always the unique name
  assigned to the host machine and is called the `hostname', the portion
  of the name to the right of the hostname is called the `domainname'
  and the complete name is called the `Fully Qualified Domain Name'.

  To use Terry's host as an example, the fully qualified domain name is
  `perf.no.itg.telstra.com.au'. This means that the host name is `perf'
  and the domain name is `no.itg.telstra.com.au'. The domain name is
  based on a top level domain based on his country, Australia and as his
  email address belongs to a commercial organization, `.com' is there as
  the next level domain. The name of the company is (was) `telstra' and
  their internal naming structure is based on organizational structure,
  in this case the machine belongs to the Information Technology Group,
  Network Operations section.

  Usually, the names are fairly shorter; for example, my ISP is called
  ``systemy.it'' and my non-profit organization is called ``linux.it'',
  without any com and org subdomain, so that my own host is just called
  ``morgana.systemy.it'' and rubini@linux.it is a valid email address.
  Note that the owner of a domain has the rights to register hostnames
  as well as subdomains; for example, the LUG I belong to uses the
  domain pluto.linux.it, because the owners of linux.it agreed to open a
  subdomain for the LUG.

  5.5.2.  What information you will need.

  You will need to know what domain your hosts name will belong to. The
  name resolver software provides this name translation service by
  making requests to a `Domain Name Server', so you will need to know
  the IP address of a local nameserver that you can use.

  There are three files you need to edit, I'll cover each of these in
  turn.

  5.5.3.  /etc/resolv.conf

  The /etc/resolv.conf is the main configuration file for the name
  resolver code. Its format is quite simple. It is a text file with one
  keyword per line. There are three keywords typically used, they are:


     domain
        this keyword specifies the local domain name.

     search
        this keyword specifies a list of alternate domain names to
        search for a hostname

     nameserver
        this keyword, which may be used many times, specifies an IP
        address of a domain name server to query when resolving names


  An example /etc/resolv.conf might look something like:



               domain maths.wu.edu.au
               search maths.wu.edu.au wu.edu.au
               nameserver 192.168.10.1
               nameserver 192.168.12.1



  This example specifies that the default domain name to append to
  unqualified names (ie hostnames supplied without a domain) is
  maths.wu.edu.au and that if the host is not found in that domain to
  also try the wu.edu.au domain directly. Two nameservers entry are
  supplied, each of which may be called upon by the name resolver code
  to resolve the name.

  5.5.4.  /etc/host.conf

  The /etc/host.conf file is where you configure some items that govern
  the behaviour of the name resolver code. The format of this file is
  described in detail in the `resolv+' man page. In nearly all
  circumstances the following example will work for you:



               order hosts,bind
               multi on



  This configuration tells the name resolver to check the /etc/hosts
  file before attempting to query a nameserver and to return all valid
  addresses for a host found in the /etc/hosts file instead of just the
  first.

  5.5.5.  /etc/hosts

  The /etc/hosts file is where you put the name and IP address of local
  hosts. If you place a host in this file then you do not need to query
  the domain name server to get its IP Address. The disadvantage of
  doing this is that you must keep this file up to date yourself if the
  IP address for that host changes. In a well managed system the only
  hostnames that usually appear in this file are an entry for the
  loopback interface and the local hosts name.



               # /etc/hosts
               127.0.0.1      localhost loopback
               192.168.0.1    this.host.name



  You may specify more than one host name per line as demonstrated by
  the first entry, which is a standard entry for the loopback interface.

  5.5.6.  Running a name server

  If you want to run a local nameserver, you can do it easily. Please
  refer to the DNS-HOWTO and to any documents included in your version
  of BIND (Berkeley Internet Name Domain).

  5.6.  Configuring your loopback interface.

  The `loopback' interface is a special type of interface that allows
  you to make connections to yourself. There are various reasons why you
  might want to do this, for example, you may wish to test some network
  software without interfering with anybody else on your network. By
  convention the IP address `127.0.0.1' has been assigned specifically
  for loopback. So no matter what machine you go to, if you open a
  telnet connection to 127.0.0.1 you will always reach the local host.

  Configuring the loopback interface is simple and you should ensure you
  do (but note that this task is usually performed by the standard
  initialization scripts).



          root# ifconfig lo 127.0.0.1
          root# route add -host 127.0.0.1 lo



  We'll talk more about the route command in the next section.

  5.7.  Routing.

  Routing is a big topic. It is easily possible to write large volumes
  of text about it. Most of you will have fairly simple routing
  requirements, some of you will not. I will cover some basic
  fundamentals of routing only.  If you are interested in more detailed
  information then I suggest you refer to the references provided at the
  start of the document.

  Let's start with a definition. What is IP routing ? Here is one that
  I'm using:


       IP Routing is the process by which a host with multiple net-
       work connections decides where to deliver IP datagrams it
       has received.



  It might be useful to illustrate this with an example. Imagine a
  typical office router, it might have a PPP link off the Internet, a
  number of ethernet segments feeding the workstations and another PPP
  link off to another office. When the router receives a datagram on any
  of its network connections, routing is the mechanism that it uses to
  determine which interface it should send the datagram to next. Simple
  hosts also need to route, all Internet hosts have two network devices,
  one is the loopback interface described above and the other is the one
  it uses to talk to the rest of the network, perhaps an ethernet,
  perhaps a PPP or SLIP serial interface.

  Ok, so how does routing work ? Each host keeps a special list of
  routing rules, called a routing table. This table contains rows which
  typically contain at least three fields, the first is a destination
  address, the second is the name of the interface to which the datagram
  is to be routed and the third is optionally the IP address of another
  machine which will carry the datagram on its next step through the
  network. In linux you can see this table by using the following
  command:



               user% cat /proc/net/route



  or by using either of the following commands:



               user% /sbin/route -n
               user% netstat -r


  The routing process is fairly simple: an incoming datagram is
  received, the destination address (who it is for) is examined and
  compared with each entry in the table. The entry that best matches
  that address is selected and the datagram is forwarded to the
  specified interface. If the gateway field is filled then the datagram
  is forwarded to that host via the specified interface, otherwise the
  destination address is assumed to be on the network supported by the
  interface.

  To manipulate this table a special command is used. This command takes
  command line arguments and converts them into kernel system calls that
  request the kernel to add, delete or modify entries in the routing
  table.  The command is called `route'.

  A simple example. Imagine you have an ethernet network. You've been
  told it is a class-C network with an address of 192.168.1.0. You've
  been supplied with an IP address of 192.168.1.10 for your use and have
  been told that 192.168.1.1 is a router connected to the Internet.

  The first step is to configure the interface as described earlier. You
  would use a command like:



               root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up



  You now need to add an entry into the routing table to tell the kernel
  that datagrams for all hosts with addresses that match 192.168.1.*
  should be sent to the ethernet device. You would use a command similar
  to:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0



  Note the use of the `-net' argument to tell the route program that
  this entry is a network route. Your other choice here is a `-host'
  route which is a route that is specific to one IP address.

  This route will enable you to establish IP connections with all of the
  hosts on your ethernet segment. But what about all of the IP hosts
  that aren't on your ethernet segment ?

  It would be a very difficult job to have to add routes to every
  possible destination network, so there is a special trick that is used
  to simplify this task. The trick is called the `default' route. The
  default route matches every possible destination, but poorly, so that
  if any other entry exists that matches the required address it will be
  used instead of the default route. The idea of the default route is
  simply to enable you to say "and everything else should go here". In
  the example I've contrived you would use an entry like:



          root# route add default gw 192.168.1.1 eth0



  The `gw' argument tells the route command that the next argument is
  the IP address, or name, of a gateway or router machine which all
  datagrams matching this entry should be directed to for further
  routing.

  So, your complete configuration would look like:



               root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# route add default gw 192.168.1.1 eth0



  If you take a close look at your network `rc' files you will find that
  at least one of them looks very similar to this. This is a very common
  configuration.

  Let's now look at a slightly more complicated routing configuration.
  Let's imagine we are configuring the router we looked at earlier, the
  one supporting the PPP link to the Internet and the lan segments
  feeding the workstations in the office. Lets imagine the router has
  three ethernet segments and one PPP link. Our routing configuration
  would look something like:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# route add -net 192.168.2.0 netmask 255.255.255.0 eth1
               root# route add -net 192.168.3.0 netmask 255.255.255.0 eth2
               root# route add default ppp0



  Each of the workstations would use the simpler form presented above,
  only the router needs to specify each of the network routes separately
  because for the workstations the default route mechanism will capture
  all of them letting the router worry about splitting them up
  appropriately. You may be wondering why the default route presented
  doesn't specify a `gw'.  The reason for this is simple, serial link
  protocols such as PPP and slip only ever have two hosts on their
  network, one at each end. To specify the host at the other end of the
  link as the gateway is pointless and redundant as there is no other
  choice, so you do not need to specify a gateway for these types of
  network connections. Other network types such as ethernet, arcnet or
  token ring do require the gateway to be specified as these networks
  support large numbers of hosts on them.

  5.7.1.  So what does the routed  program do ?

  The routing configuration described above is best suited to simple
  network arrangements where there are only ever single possible paths
  to destinations.  When you have a more complex network arrangement
  things get a little more complicated. Fortunately for most of you this
  won't be an issue.

  The big problem with `manual routing' or `static routing' as
  described, is that if a machine or link fails in your network then the
  only way you can direct your datagrams another way, if another way
  exists, is by manually intervening and executing the appropriate
  commands. Naturally this is clumsy, slow, impractical and hazard
  prone. Various techniques have been developed to automatically adjust
  routing tables in the event of network failures where there are
  alternate routes, all of these techniques are loosely grouped by the
  term `dynamic routing protocols'.

  You may have heard of some of the more common dynamic routing
  protocols. The most common are probably RIP (Routing Information
  Protocol) and OSPF (Open Shortest Path First Protocol). The Routing
  Information Protocol is very common on small networks such as small-
  medium sized corporate networks or building networks. OSPF is more
  modern and more capable at handling large network configurations and
  better suited to environments where there is a large number of
  possible paths through the network. Common implementations of these
  protocols are: `routed' - RIP and `gated' - RIP, OSPF and others.  The
  `routed' program is normally supplied with your Linux distribution or
  is included in the `NetKit' package detailed above.

  An example of where and how you might use a dynamic routing protocol
  might look something like the following:



           192.168.1.0 /                         192.168.2.0 /
              255.255.255.0                         255.255.255.0
            -                                     -
            |                                     |
            |   /-----\                 /-----\   |
            |   |     |ppp0   //    ppp0|     |   |
       eth0 |---|  A  |------//---------|  B  |---| eth0
            |   |     |     //          |     |   |
            |   \-----/                 \-----/   |
            |      \ ppp1             ppp1 /      |
            -       \                     /       -
                     \                   /
                      \                 /
                       \               /
                        \             /
                         \           /
                          \         /
                           \       /
                            \     /
                         ppp0\   /ppp1
                            /-----\
                            |     |
                            |  C  |
                            |     |
                            \-----/
                               |eth0
                               |
                          |---------|
                          192.168.3.0 /
                             255.255.255.0



  We have three routers A, B and C. Each supports one ethernet segment
  with a Class C IP network (netmask 255.255.255.0). Each router also
  has a PPP link to each of the other routers. The network forms a
  triangle.

  It should be clear that the routing table at router A could look like:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# route add -net 192.168.2.0 netmask 255.255.255.0 ppp0
               root# route add -net 192.168.3.0 netmask 255.255.255.0 ppp1



  This would work just fine until the link between router A and B should
  fail.  If that link failed then with the routing entry shown above
  hosts on the ethernet segment of A could not reach hosts on the
  ethernet segment on B because their datagram would be directed to
  router A's ppp0 link which is broken. They could still continue to
  talk to hosts on the ethernet segment of C and hosts on the C's
  ethernet segment could still talk to hosts on B's ethernet segment
  because the link between B and C is still intact.

  But wait, if A can talk to C and C can still talk to B, why shouldn't
  A route its datagrams for B via C and let C send them to B ? This is
  exactly the sort of problem that dynamic routing protocols like RIP
  were designed to solve. If each of the routers A, B and C were running
  a routing daemon then their routing tables would be automatically
  adjusted to reflect the new state of the network should any one of the
  links in the network fail.  To configure such a network is simple, at
  each router you need only do two things. In this case for Router A:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# /usr/sbin/routed



  The `routed' routing daemon automatically finds all active network
  ports when it starts and sends and listens for messages on each of the
  network devices to allow it to determine and update the routing table
  on the host.

  This has been a very brief explanation of dynamic routing and where
  you would use it. If you want more information then you should refer
  to the suggested references listed at the top of the document.

  The important points relating to dynamic routing are:


  1. You only need to run a dynamic routing protocol daemon when your
     Linux machine has the possibility of selecting multiple possible
     routes to a destination.  An example of this would be if you plan
     to use IP Masquerading.


  2. The dynamic routing daemon will automatically modify your routing
     table to adjust to changes in your network.
  3. RIP is suited to small to medium sized networks.


  5.8.  Configuring your network servers and services.

  Network servers and services are those programs that allow a remote
  user to make user of your Linux machine. Server programs listen on
  network ports.  Network ports are a means of addressing a particular
  service on any particular host and are how a server knows the
  difference between an incoming telnet connection and an incoming ftp
  connection. The remote user establishes a network connection to your
  machine and the server program, the network daemon program, listening
  on that port accepts the connection and executes. There are two ways
  that network daemons may operate. Both are commonly employed in
  practice. The two ways are:



     standalone
        the network daemon program listens on the designated network
        port and when an incoming connection is made it manages the
        network connection itself to provide the service.


     slave to the inetd server
        the inetd server is a special network daemon program that
        specializes in managing incoming network connections. It has a
        configuration file which tells it what program needs to be run
        when an incoming connection is received. Any service port may be
        configured for either of the tcp or udp protcols. The ports are
        described in another file that we will talk about soon.


  There are two important files that we need to configure. They are the
  /etc/services file which assigns names to port numbers and the
  /etc/inetd.conf file which is the configuration file for the inetd
  network daemon.

  5.8.1.  /etc/services

  The /etc/services file is a simple database that associates a human
  friendly name to a machine friendly service port. Its format is quite
  simple. The file is a text file with each line representing and entry
  in the database. Each entry is comprised of three fields separated by
  any number of whitespace (tab or space) characters. The fields are:


    name      port/protocol        aliases     # comment



     name
        a single word name that represents the service being described.


     port/protocol
        this field is split into two subfields.



     port
        a number that specifies the port number the named service will
        be available on. Most of the common services have assigned
        service numbers. These are described in RFC-1340.


     protocol
        this subfield may be set to either tcp or udp.

        It is important to note that an entry of 18/tcp is very
        different from an entry of 18/udp and that there is no technical
        reason why the same service needs to exist on both. Normally
        common sense prevails and it is only if a particular service is
        available via both tcp and udp that you will see an entry for
        both.


     aliases
        other names that may be used to refer to this service entry.


  Any text appearing in a line after a `#' character is ignored and
  treated as a comment.

  5.8.1.1.  An example /etc/services  file.

  All modern linux distributions provide a good /etc/services file.
  Just in case you happen to be building a machine from the ground up,
  here is a copy of the /etc/services file supplied with an old Debian
  distribution:



  # /etc/services:
  # $Id: services,v 1.3 1996/05/06 21:42:37 tobias Exp $
  #
  # Network services, Internet style
  #
  # Note that it is presently the policy of IANA to assign a single well-known
  # port number for both TCP and UDP; hence, most entries here have two entries
  # even if the protocol doesn't support UDP operations.
  # Updated from RFC 1340, ``Assigned Numbers'' (July 1992).  Not all ports
  # are included, only the more common ones.

  tcpmux          1/tcp                           # TCP port service multiplexer
  echo            7/tcp
  echo            7/udp
  discard         9/tcp           sink null
  discard         9/udp           sink null
  systat          11/tcp          users
  daytime         13/tcp
  daytime         13/udp
  netstat         15/tcp
  qotd            17/tcp          quote
  msp             18/tcp                          # message send protocol
  msp             18/udp                          # message send protocol
  chargen         19/tcp          ttytst source
  chargen         19/udp          ttytst source
  ftp-data        20/tcp
  ftp             21/tcp
  ssh             22/tcp                          # SSH Remote Login Protocol
  ssh             22/udp                          # SSH Remote Login Protocol
  telnet          23/tcp
  # 24 - private
  smtp            25/tcp          mail
  # 26 - unassigned
  time            37/tcp          timserver
  time            37/udp          timserver
  rlp             39/udp          resource        # resource location
  nameserver      42/tcp          name            # IEN 116
  whois           43/tcp          nicname
  re-mail-ck      50/tcp                          # Remote Mail Checking Protocol
  re-mail-ck      50/udp                          # Remote Mail Checking Protocol
  domain          53/tcp          nameserver      # name-domain server
  domain          53/udp          nameserver
  mtp             57/tcp                          # deprecated
  bootps          67/tcp                          # BOOTP server
  bootps          67/udp
  bootpc          68/tcp                          # BOOTP client
  bootpc          68/udp
  tftp            69/udp
  gopher          70/tcp                          # Internet Gopher
  gopher          70/udp
  rje             77/tcp          netrjs
  finger          79/tcp
  www             80/tcp          http            # WorldWideWeb HTTP
  www             80/udp                          # HyperText Transfer Protocol
  link            87/tcp          ttylink
  kerberos        88/tcp          kerberos5 krb5  # Kerberos v5
  kerberos        88/udp          kerberos5 krb5  # Kerberos v5
  supdup          95/tcp
  # 100 - reserved
  hostnames       101/tcp         hostname        # usually from sri-nic
  iso-tsap        102/tcp         tsap            # part of ISODE.
  csnet-ns        105/tcp         cso-ns          # also used by CSO name server
  csnet-ns        105/udp         cso-ns
  rtelnet         107/tcp                         # Remote Telnet
  rtelnet         107/udp
  pop-2           109/tcp         postoffice      # POP version 2
  pop-2           109/udp
  pop-3           110/tcp                         # POP version 3
  pop-3           110/udp
  sunrpc          111/tcp         portmapper      # RPC 4.0 portmapper TCP
  sunrpc          111/udp         portmapper      # RPC 4.0 portmapper UDP
  auth            113/tcp         authentication tap ident
  sftp            115/tcp
  uucp-path       117/tcp
  nntp            119/tcp         readnews untp   # USENET News Transfer Protocol
  ntp             123/tcp
  ntp             123/udp                         # Network Time Protocol
  netbios-ns      137/tcp                         # NETBIOS Name Service
  netbios-ns      137/udp
  netbios-dgm     138/tcp                         # NETBIOS Datagram Service
  netbios-dgm     138/udp
  netbios-ssn     139/tcp                         # NETBIOS session service
  netbios-ssn     139/udp
  imap2           143/tcp                         # Interim Mail Access Proto v2
  imap2           143/udp
  snmp            161/udp                         # Simple Net Mgmt Proto
  snmp-trap       162/udp         snmptrap        # Traps for SNMP
  cmip-man        163/tcp                         # ISO mgmt over IP (CMOT)
  cmip-man        163/udp
  cmip-agent      164/tcp
  cmip-agent      164/udp
  xdmcp           177/tcp                         # X Display Mgr. Control Proto
  xdmcp           177/udp
  nextstep        178/tcp         NeXTStep NextStep       # NeXTStep window
  nextstep        178/udp         NeXTStep NextStep       # server
  bgp             179/tcp                         # Border Gateway Proto.
  bgp             179/udp
  prospero        191/tcp                         # Cliff Neuman's Prospero
  prospero        191/udp
  irc             194/tcp                         # Internet Relay Chat
  irc             194/udp
  smux            199/tcp                         # SNMP Unix Multiplexer
  smux            199/udp
  at-rtmp         201/tcp                         # AppleTalk routing
  at-rtmp         201/udp
  at-nbp          202/tcp                         # AppleTalk name binding
  at-nbp          202/udp
  at-echo         204/tcp                         # AppleTalk echo
  at-echo         204/udp
  at-zis          206/tcp                         # AppleTalk zone information
  at-zis          206/udp
  z3950           210/tcp         wais            # NISO Z39.50 database
  z3950           210/udp         wais
  ipx             213/tcp                         # IPX
  ipx             213/udp
  imap3           220/tcp                         # Interactive Mail Access
  imap3           220/udp                         # Protocol v3
  ulistserv       372/tcp                         # UNIX Listserv
  ulistserv       372/udp
  #
  # UNIX specific services
  #
  exec            512/tcp
  biff            512/udp         comsat
  login           513/tcp
  who             513/udp         whod
  shell           514/tcp         cmd             # no passwords used
  syslog          514/udp
  printer         515/tcp         spooler         # line printer spooler
  talk            517/udp
  ntalk           518/udp
  route           520/udp         router routed   # RIP
  timed           525/udp         timeserver
  tempo           526/tcp         newdate
  courier         530/tcp         rpc
  conference      531/tcp         chat
  netnews         532/tcp         readnews
  netwall         533/udp                         # -for emergency broadcasts
  uucp            540/tcp         uucpd           # uucp daemon
  remotefs        556/tcp         rfs_server rfs  # Brunhoff remote filesystem
  klogin          543/tcp                         # Kerberized `rlogin' (v5)
  kshell          544/tcp         krcmd           # Kerberized `rsh' (v5)
  kerberos-adm    749/tcp                         # Kerberos `kadmin' (v5)
  #
  webster         765/tcp                         # Network dictionary
  webster         765/udp
  #
  # From ``Assigned Numbers'':
  #
  #> The Registered Ports are not controlled by the IANA and on most systems
  #> can be used by ordinary user processes or programs executed by ordinary
  #> users.
  #
  #> Ports are used in the TCP [45,106] to name the ends of logical
  #> connections which carry long term conversations.  For the purpose of
  #> providing services to unknown callers, a service contact port is
  #> defined.  This list specifies the port used by the server process as its
  #> contact port.  While the IANA can not control uses of these ports it
  #> does register or list uses of these ports as a convenience to the
  #> community.
  #
  ingreslock      1524/tcp
  ingreslock      1524/udp
  prospero-np     1525/tcp                # Prospero non-privileged
  prospero-np     1525/udp
  rfe             5002/tcp                # Radio Free Ethernet
  rfe             5002/udp                # Actually uses UDP only
  bbs             7000/tcp                # BBS service
  #
  #
  # Kerberos (Project Athena/MIT) services
  # Note that these are for Kerberos v4 and are unofficial.  Sites running
  # v4 should uncomment these and comment out the v5 entries above.
  #
  kerberos4       750/udp         kdc     # Kerberos (server) udp
  kerberos4       750/tcp         kdc     # Kerberos (server) tcp
  kerberos_master 751/udp                 # Kerberos authentication
  kerberos_master 751/tcp                 # Kerberos authentication
  passwd_server   752/udp                 # Kerberos passwd server
  krb_prop        754/tcp                 # Kerberos slave propagation
  krbupdate       760/tcp         kreg    # Kerberos registration
  kpasswd         761/tcp         kpwd    # Kerberos "passwd"
  kpop            1109/tcp                # Pop with Kerberos
  knetd           2053/tcp                # Kerberos de-multiplexor
  zephyr-srv      2102/udp                # Zephyr server
  zephyr-clt      2103/udp                # Zephyr serv-hm connection
  zephyr-hm       2104/udp                # Zephyr hostmanager
  eklogin         2105/tcp                # Kerberos encrypted rlogin
  #
  # Unofficial but necessary (for NetBSD) services
  #
  supfilesrv      871/tcp                 # SUP server
  supfiledbg      1127/tcp                # SUP debugging
  #
  # Datagram Delivery Protocol services
  #
  rtmp            1/ddp                   # Routing Table Maintenance Protocol
  nbp             2/ddp                   # Name Binding Protocol
  echo            4/ddp                   # AppleTalk Echo Protocol
  zip             6/ddp                   # Zone Information Protocol
  #
  # Debian GNU/Linux services
  rmtcfg          1236/tcp                # Gracilis Packeten remote config server
  xtel            1313/tcp                # french minitel
  cfinger         2003/tcp                # GNU Finger
  postgres        4321/tcp                # POSTGRES
  mandelspawn     9359/udp        mandelbrot      # network mandelbrot

  # Local services



  In the real world, the actual file is always growing as new services
  are being created. If you fear your own copy is incomplete, I'd
  suggest to copy a new /etc/services from a recent distribution.

  5.8.2.  /etc/inetd.conf

  The /etc/inetd.conf file is the configuration file for the inetd
  server daemon. Its function is to tell inetd what to do when it
  receives a connection request for a particular service. For each
  service that you wish to accept connections for you must tell inetd
  what network server daemon to run and how to run it.

  Its format is also fairly simple. It is a text file with each line
  describing a service that you wish to provide. Any text in a line
  following a `#' is ignored and considered a comment. Each line
  contains seven fields separated by any number of whitespace (tab or
  space) characters. The general format is as follows:



         service  socket_type  proto  flags  user  server_path  server_args



     service
        is the service relevant to this configuration as taken from the
        /etc/services file.


     socket_type
        this field describes the type of socket that this entry will
        consider relevant, allowable values are: stream, dgram, raw,
        rdm, or seqpacket. This is a little technical in nature, but as
        a rule of thumb nearly all tcp based services use stream and
        nearly all udp based services use dgram. It is only very special
        types of server daemons that would use any of the other values.


     proto
        the protocol to considered valid for this entry. This should
        match the appropriate entry in the /etc/services file and will
        typically be either tcp or udp. Sun RPC (Remote Procedure Call)
        based servers will use rpc/tcp or rpc/udp.


     flags
        there are really only two possible settings for this field.
        This field setting tells inetd whether the network server
        program frees the socket after it has been started and therefore
        whether inetd can start another one on the next connection
        request, or whether inetd should wait and assume that any server
        daemon already running will handle the new connection request.
        Again this is a little tricky to work out, but as a rule of
        thumb all tcp servers should have this entry set to nowait and
        most udp servers should have this entry set to wait. Be warned
        there are some notable exceptions to this, so let the example
        guide you if you are not sure.


     user
        this field describes which user account from /etc/passwd will be
        set as the owner of the network daemon when it is started. This
        is often useful if you want to safeguard against security risks.
        You can set the user of an entry to the nobody user so that if
        the network server security is breached the possible damage is
        minimized.  Typically this field is set to root though, because
        many servers require root privileges in order to function
        correctly.


     server_path
        this field is pathname to the actual server program to execute
        for this entry.


     server_args
        this field comprises the rest of the line and is optional. This
        field is where you place any command line arguments that you
        wish to pass to the server daemon program when it is launched.


  5.8.2.1.  An example /etc/inetd.conf

  As for the /etc/services file all modern distributions will include a
  good /etc/inetd.conf file for you to work with. Here, for completeness
  is the /etc/inetd.conf file from the Debian distribution.



  # /etc/inetd.conf:  see inetd(8) for further informations.
  #
  # Internet server configuration database
  #
  #
  # Modified for Debian by Peter Tobias <tobias@et-inf.fho-emden.de>
  #
  # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
  #
  # Internal services
  #
  #echo           stream  tcp     nowait  root    internal
  #echo           dgram   udp     wait    root    internal
  discard         stream  tcp     nowait  root    internal
  discard         dgram   udp     wait    root    internal
  daytime         stream  tcp     nowait  root    internal
  daytime         dgram   udp     wait    root    internal
  #chargen        stream  tcp     nowait  root    internal
  #chargen        dgram   udp     wait    root    internal
  time            stream  tcp     nowait  root    internal
  time            dgram   udp     wait    root    internal
  #
  # These are standard services.
  #
  telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.telnetd
  ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.ftpd
  #fsp    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.fspd
  #
  # Shell, login, exec and talk are BSD protocols.
  #
  shell   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd
  login   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind
  #exec   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rexecd
  talk    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.talkd
  ntalk   dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.ntalkd
  #
  # Mail, news and uucp services.
  #
  smtp    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.smtpd
  #nntp   stream  tcp     nowait  news    /usr/sbin/tcpd  /usr/sbin/in.nntpd
  #uucp   stream  tcp     nowait  uucp    /usr/sbin/tcpd  /usr/lib/uucp/uucico
  #comsat dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.comsat
  #
  # Pop et al
  #
  #pop-2  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop2d
  #pop-3  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop3d
  #
  # `cfinger' is for the GNU finger server available for Debian.  (NOTE: The
  # current implementation of the `finger' daemon allows it to be run as `root'.)
  #
  #cfinger stream tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.cfingerd
  #finger stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.fingerd
  #netstat        stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/netstat
  #systat stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/ps -auwwx
  #
  # Tftp service is provided primarily for booting.  Most sites
  # run this only on machines acting as "boot servers."
  #
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /boot
  #bootps dgram   udp     wait    root    /usr/sbin/bootpd        bootpd -i -t 120
  #
  # Kerberos authenticated services (these probably need to be corrected)
  #
  #klogin         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k
  #eklogin        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k -x
  #kshell         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd -k
  #
  # Services run ONLY on the Kerberos server (these probably need to be corrected)
  #
  #krbupdate      stream tcp      nowait  root    /usr/sbin/tcpd  /usr/sbin/registerd
  #kpasswd        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/kpasswdd
  #
  # RPC based services
  #
  #mountd/1       dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.mountd
  #rstatd/1-3     dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rstatd
  #rusersd/2-3    dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rusersd
  #walld/1        dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rwalld
  #
  # End of inetd.conf.
  ident           stream  tcp     nowait  nobody  /usr/sbin/identd        identd -i



  5.9.  Other miscellaneous network related configuration files.

  There are a number of miscellaneous files relating to network
  configuration under linux that you might be interested in. You may
  never have to modify these files, but it is worth describing them so
  you know what they contain and what they are for.

  5.9.1.  /etc/protocols

  The /etc/protocols file is a database that maps protocol id numbers
  against protocol names. This is used by programmers to allow them to
  specify protocols by name in their programs and also by some programs
  such as tcpdump to allow them to display names instead of numbers in
  their output. The general syntax of the file is:



         protocolname  number  aliases



  The /etc/protocols file supplied with the Debian distribution is as
  follows:



  # /etc/protocols:
  # $Id: protocols,v 1.1 1995/02/24 01:09:41 imurdock Exp $
  #
  # Internet (IP) protocols
  #
  #       from: @(#)protocols     5.1 (Berkeley) 4/17/89
  #
  # Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992).

  ip      0       IP              # internet protocol, pseudo protocol number
  icmp    1       ICMP            # internet control message protocol
  igmp    2       IGMP            # Internet Group Management
  ggp     3       GGP             # gateway-gateway protocol
  ipencap 4       IP-ENCAP        # IP encapsulated in IP (officially ``IP'')
  st      5       ST              # ST datagram mode
  tcp     6       TCP             # transmission control protocol
  egp     8       EGP             # exterior gateway protocol
  pup     12      PUP             # PARC universal packet protocol
  udp     17      UDP             # user datagram protocol
  hmp     20      HMP             # host monitoring protocol
  xns-idp 22      XNS-IDP         # Xerox NS IDP
  rdp     27      RDP             # "reliable datagram" protocol
  iso-tp4 29      ISO-TP4         # ISO Transport Protocol class 4
  xtp     36      XTP             # Xpress Tranfer Protocol
  ddp     37      DDP             # Datagram Delivery Protocol
  idpr-cmtp       39      IDPR-CMTP       # IDPR Control Message Transport
  rspf    73      RSPF            # Radio Shortest Path First.
  vmtp    81      VMTP            # Versatile Message Transport
  ospf    89      OSPFIGP         # Open Shortest Path First IGP
  ipip    94      IPIP            # Yet Another IP encapsulation
  encap   98      ENCAP           # Yet Another IP encapsulation



  5.9.2.  /etc/networks

  The /etc/networks file has a similar function to that of the
  /etc/hosts file. It provides a simple database of network names
  against network addresses. Its format differs in that there may be
  only two fields per line and that the fields are coded as:



         networkname networkaddress



  An example might look like:



               loopnet    127.0.0.0
               localnet   192.168.0.0
               amprnet    44.0.0.0



  When you use commands like the route command, if a destination is a
  network and that network has an entry in the /etc/networks file then
  the route command will display that network name instead of its
  address.

  5.10.  Network Security and access control.

  Let me start this section by warning you that securing your machine
  and network against malicious attack is a complex art. I do not
  consider myself an expert in this field at all and while the following
  mechanisms I describe will help, if you are serious about security
  then I recommend you do some research of your own into the subject.
  There are many good references on the Internet relating to the
  subject, including the Security-HOWTO

  An important rule of thumb is: `Don't run servers you don't intend to
  use'.  Many distributions come configured with all sorts of services
  configured and automatically started. To ensure even a minimum level
  of safety you should go through your /etc/inetd.conf file and comment
  out (place a `#' at the start of the line) any entries for services
  you don't intend to use.  Good candidates are services such as: shell,
  login, exec, uucp, ftp and informational services such as finger,
  netstat and systat.

  There are all sorts of security and access control mechanisms, I'll
  describe the most elementary of them.

  5.10.1.  /etc/ftpusers

  The /etc/ftpusers file is a simple mechanism that allows you to deny
  certain users from logging into your machine via ftp. The
  /etc/ftpusers file is read by the ftp daemon program (ftpd) when an
  incoming ftp connection is received. The file is a simple list of
  those users who are disallowed from logging in. It might looks
  something like:



               # /etc/ftpusers - users not allowed to login via ftp
               root
               uucp
               bin
               mail



  5.10.2.  /etc/securetty

  The /etc/securetty file allows you to specify which tty devices root
  is allowed to login on. The /etc/securetty file is read by the login
  program (usually /bin/login). Its format is a list of the tty devices
  names allowed, on all others root login is disallowed:



               # /etc/securetty - tty's on which root is allowed to login
               tty1
               tty2
               tty3
               tty4



  5.10.3.  The tcpd  hosts access control mechanism.

  The tcpd program you will have seen listed in the same /etc/inetd.conf
  provides logging and access control mechanisms to services it is
  configured to protect.

  When it is invoked by the inetd program it reads two files containing
  access rules and either allows or denies access to the server it is
  protecting accordingly.

  It will search the rules files until the first match is found. If no
  match is found then it assumes that access should be allowed to
  anyone. The files it searches in sequence are: /etc/hosts.allow,
  /etc/hosts.deny.  I'll describe each of these in turn. For a complete
  description of this facility you should refer to the appropriate man
  pages (hosts_access(5) is a good starting point).

  5.10.3.1.  /etc/hosts.allow

  The /etc/hosts.allow file is a configuration file of the
  /usr/sbin/tcpd program. The hosts.allow file contains rules describing
  which hosts are allowed access to a service on your machine.

  The file format is quite simple:



               # /etc/hosts.allow
               #
               # <service list>: <host list> [: command]



     service list
        is a comma delimited list of server names that this rule applies
        to.  Example server names are: ftpd, telnetd and fingerd.


     host list
        is a comma delimited list of host names. You may also use IP
        addresses here. You may additionally specify hostnames or
        addresses using wildcard characters to match groups of hosts.
        Examples include: gw.vk2ktj.ampr.org to match a specific host,
        .uts.edu.au to match any hostname ending in that string, 44. to
        match any IP address commencing with those digits.  There are
        some special tokens to simplify configuration, some of these
        are: ALL matches every host, LOCAL matches any host whose name
        does not contain a `.' ie is in the same domain as your machine
        and PARANOID matches any host whose name does not match its
        address (name spoofing). There is one last token that is also
        useful. The EXCEPT token allows you to provide a list with
        exceptions. This will be covered in an example later.


     command
        is an optional parameter. This parameter is the full pathname of
        a command that would be executed everytime this rule is matched.
        It could for example run a command that would attempt to
        identify who is logged onto the connecting host, or to generate
        a mail message or some other warning to a system administrator
        that someone is attempting to connect. There are a number of
        expansions that may be included, some common examples are: %h
        expands to the name of the connecting host or address if it
        doesn't have a name, %d the daemon name being called.


  An example:



         # /etc/hosts.allow
         #
         # Allow mail to anyone
         in.smtpd: ALL
         # All telnet and ftp to only hosts within my domain and my host at home.
         telnetd, ftpd: LOCAL, myhost.athome.org.au
         # Allow finger to anyone but keep a record of who they are.
         fingerd: ALL: (finger @%h | mail -s "finger from %h" root)



  5.10.3.2.  /etc/hosts.deny

  The /etc/hosts.deny file is a configuration file of the /usr/sbin/tcpd
  program. The hosts.deny file contains rules describing which hosts are
  disallowed access to a service on your machine.

  A simple sample would look something like this:



         # /etc/hosts.deny
         #
         # Disallow all hosts with suspect hostnames
         ALL: PARANOID
         #
         # Disallow all hosts.
         ALL: ALL



  The PARANOID entry is really redundant because the other entry traps
  everything in any case. Either of these entry would make a reasonable
  default depending on your particular requirement.

  Having an ALL: ALL default in the /etc/hosts.deny and then
  specifically enabling on those services and hosts that you want in the
  /etc/hosts.allow file is the safest configuration.

  5.10.4.  /etc/hosts.equiv

  The hosts.equiv file is used to grant certain hosts and users access
  rights to accounts on your machine without having to supply a
  password. This is useful in a secure environment where you control all
  machines, but is a security hazard otherwise. Your machine is only as
  secure as the least secure of the trusted hosts. To maximize security,
  don't use this mechanism and encourage your users not to use the
  .rhosts file as well.



  5.10.5.  Configure your ftp  daemon properly.

  Many sites will be interested in running an anonymous ftp server to
  allow other people to upload and download files without requiring a
  specific userid. If you decide to offer this facility make sure you
  configure the ftp daemon properly for anonymous access. Most man pages
  for ftpd(8) describe in some length how to go about this. You should
  always ensure that you follow these instructions. An important tip is
  to not use a copy of your /etc/passwd file in the anonymous account
  /etc directory, make sure you strip out all account details except
  those that you must have, otherwise you will be vulnerable to brute
  force password cracking techniques.

  5.10.6.  Network Firewalling.

  Not allowing datagrams to even reach your machine or servers is an
  excellent means of security. This is covered in depth in the Firewall-
  HOWTO, and (more concisely) in a later section of this document.

  5.10.7.  Other suggestions.

  Here are some other, potentially religious suggestions for you to
  consider.



     sendmail
        despite its popularity the sendmail daemon appears with
        frightening regularity on security warning announcements. Its up
        to you, but I choose not to run it.


     NFS and other Sun RPC services
        be wary of these. There are all sorts of possible exploits for
        these services. It is difficult finding an option to services
        like NFS, but if you configure them, make sure you are careful
        with who you allow mount rights to.


  6.  Ethernet Information

  This section covers information specific to Ethernet and the
  configuring of Ethernet Cards.


  6.1.  Supported Ethernet Cards


  6.1.1.  3Com


  o  3Com 3c501 - `avoid like the plague'' (3c501 driver)

  o  3Com 3c503 (3c503 driver), 3c505 (3c505 driver), 3c507 (3c507
     driver), 3c509/3c509B (ISA) / 3c579 (EISA)

  o  3Com Etherlink III Vortex Ethercards (3c590, 3c592, 3c595, 3c597)
     (PCI), 3Com Etherlink XL Boomerang (3c900, 3c905) (PCI) and Cyclone
     (3c905B, 3c980) Ethercards (3c59x driver) and 3Com Fast EtherLink
     Ethercard (3c515) (ISA) (3c515 driver)

  o  3Com 3ccfe575 Cyclone Cardbus (3c59x driver)

  o  3Com 3c575 series Cardbus (3c59x driver) (ALL PCMCIA ??)


  6.1.2.  AMD, ATT, Allied Telesis, Ansel, Apricot


  o  AMD LANCE (79C960) / PCnet-ISA/PCI (AT1500, HP J2405A,
     NE1500/NE2100)

  o  ATT GIS WaveLAN

  o  Allied Telesis AT1700

  o  Allied Telesis LA100PCI-T

  o  Allied Telesyn AT2400T/BT ("ne" module)

  o  Ansel Communications AC3200 (EISA)

  o  Apricot Xen-II / 82596

  6.1.3.  Cabletron, Cogent, Crystal Lan


  o  Cabletron E21xx

  o  Cogent EM110

  o  Crystal Lan CS8920, Cs8900

  6.1.4.  Danpex, DEC, Digi, DLink


  o  Danpex EN-9400

  o  DEC DE425 (EISA) / DE434/DE435 (PCI) / DE450/DE500 (DE4x5 driver)

  o  DEC DE450/DE500-XA (dc21x4x) (Tulip driver)

  o  DEC DEPCA and EtherWORKS

  o  DEC EtherWORKS 3 (DE203, DE204, DE205)

  o  DECchip DC21x4x "Tulip"

  o  DEC QSilver's (Tulip driver)

  o  Digi International RightSwitch

  o  DLink DE-220P, DE-528CT, DE-530+, DFE-500TX, DFE-530TX

  6.1.5.  Fujitsu, HP, ICL, Intel


  o  Fujitsu FMV-181/182/183/184

  o  HP PCLAN (27245 and 27xxx series)

  o  HP PCLAN PLUS (27247B and 27252A)

  o  HP 10/100VG PCLAN (J2577, J2573, 27248B, J2585) (ISA/EISA/PCI)

  o  ICL EtherTeam 16i / 32 (EISA)

  o  Intel EtherExpress

  o  Intel EtherExpress Pro


  6.1.6.  KTI, Macromate, NCR NE2000/1000, Netgear, New Media


  o  KTI ET16/P-D2, ET16/P-DC ISA (work jumperless and with hardware-
     configuration options)

  o  Macromate MN-220P (PnP or NE2000 mode)

  o  NCR WaveLAN

  o  NE2000/NE1000 (be careful with clones)

  o  Netgear FA-310TX (Tulip chip)

  o  New Media Ethernet

  6.1.7.  PureData, SEEQ, SMC


  o  PureData PDUC8028, PDI8023

  o  SEEQ 8005

  o  SMC Ultra / EtherEZ (ISA)

  o  SMC 9000 series

  o  SMC PCI EtherPower 10/100 (DEC Tulip driver)

  o  SMC EtherPower II (epic100.c driver)

  6.1.8.  Sun Lance, Sun Intel, Schneider, WD, Zenith, IBM, Enyx


  o  Sun LANCE adapters (kernel 2.2 and newer)

  o  Sun Intel adapters (kernel 2.2 and newer)

  o  Schneider and Koch G16

  o  Western Digital WD80x3

  o  Zenith Z-Note / IBM ThinkPad 300 built-in adapter

  o  Znyx 312 etherarray (Tulip driver)


  6.2.  General Ethernet Information

  Ethernet devices names are `eth0', `eth1', `eth2' etc. The first card
  detected by the kernel is assigned `eth0' and the rest are assigned
  sequentially in the order they are detected.

  Once you have your kernel properly built to support your ethernet card
  then configuration of the card is easy.

  Typically you would use something like (which most distributions
  already do for you, if you configured them to support your ethernet):



               root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
               root# route add -net 192.168.0.0 netmask 255.255.255.0 eth0



  Most of the ethernet drivers were developed by Donald Becker


  6.3.  Using 2 or more Ethernet Cards in the same machine


  6.3.1.  If your driver is a module (Normal with newer distros)

  The module will typically can detect all of the installed cards.

  Information fromt he detection is  stored in the file:

  /etc/conf.modules.

  Consider that a user has 3 NE2000 cards, one at 0x300 one at 0x240,
  and one at 0x220. You would add the following lines to the
  /etc/conf.modules file:



               alias eth0 ne
               alias eth1 ne
               alias eth2 ne
               options ne io=0x220,0x240,0x300



  What this does is tell the program modprobe to look for 3 NE based
  cards at the following addresses. It also states in which order they
  should be found and the device they should be assigned.

  Most ISA modules can take multiple comma separated I/O values.  For
  example:



               alias eth0 3c501
               alias eth1 3c501
               options eth0 -o 3c501-0 io=0x280 irq=5
               options eth1 -o 3c501-1 io=0x300 irq=7



  The -o option allows for a unique name to be assigned to each module.
  The reason for this is that you can not have two copies of the same
  module loaded.

  The irq= option is used to specify the hardware IRQ and the io= to
  specify the different io ports.


  By default, the Linux kernel only probes for one Ethernet device, you
  need to pass command line arguments to the kernel in order to force
  detection of furter boards.

  To learn how to make your ethernet card(s) working under Linux you
  should refer to the Ethernet-HOWTO.

  7.  IP Related Information

  This section covers information specific to IP.

  7.1.  DHCP and DHCPD

  DHCP is an acronym for Dynamic Host Configuration Protocol.  The
  creation of DHCP has made configuring the network on multiple hosts
  extremely simple. Instead of having to configure each host separately
  you can assign all of the commonly used parameters by the hosts using
  a DHCP server.

  Each time the host boots up it will broadcast a packet to the network.
  This packet is a call to any DHCP servers that are located on the same
  segment to configure the host.

  DHCP is extermely useful in assigning items such as the IP address,
  Netmask, and gateway of each host.


  7.2.  DHCP Client Setup for users of LinuxConf

  Under linux as the user root start the program linuxconf.  This
  program comes with all versions of redhat and works with X as well as
  the console. It also works for SuSe, and Caldera.



       Select Networking
       ----------------->Basic Host Information
       ----------------->Select Enable
       ----------------->Set Config Mode DHCP



  7.3.  DHCP Server Setup for Linux

  Retrieve DHCPD if your machine does not already have it installed.
  Get DHCPD

  Quick Note: MAKE SURE YOU HAVE MULTICAST ENABLED IN THE KERNEL.

  If there is not a binary distribution for your version of linux you
  will have to compile DHCPD.

  Edit your /etc/rc.d/rc.local to reflect an addition of a route for
  255.255.255.255.

  Quoted from DHCPd README:


  In order for dhcpd to work correctly with picky DHCP clients (e.g.,
  Windows 95), it must be able to send packets with an IP destination
  address of 255.255.255.255.  Unfortunately, Linux insists on changing
  255.255.255.255 into the local subnet broadcast address (here, that's
  192.5.5.223).  This results in a DHCP protocol violation, and while
  many DHCP clients don't notice the problem, some (e.g., all Microsoft
  DHCP clients) do.  Clients that have this problem will appear not to
  see DHCPOFFER messages from the server.

  Type the following as root:

  route add -host 255.255.255.255 dev eth0

  If the message appears:

  255.255.255.255: Unknown host

  Try adding the following entry to your /etc/hosts file:

  255.255.255.255 dhcp

  Then, try:

  route add -host dhcp dev eth0


  7.3.1.  Options for DHCPD

  Now you need to configure DHCPd. In order to do this you will have to
  create or edit /etc/dhcpd.conf. There is a graphical interface for
  dhcpd configuration under linuxconf. This makes configuring and
  managing DHCPD extremely simple.

  If you want to configure it by hand follow instructions below. I
  suggest configuring it by hand at least once. It will help in the
  diagnostics that a GUI can't give you. Unfortunately Micrsoft doesn't
  believe this.

  The easiest thing to do is assign IP addresses randomly.  Below is a
  sample configuration file that shows this type of setup.



       # Sample /etc/dhcpd.conf
       # (add your comments here)
       default-lease-time 1200;
       max-lease-time 9200;
       option subnet-mask 255.255.255.0;
       option broadcast-address 192.168.1.255;
       option routers 192.168.1.254;
       option domain-name-servers 192.168.1.1, 192.168.1.2;
       option domain-name "mydomain.org";

       subnet 192.168.1.0 netmask 255.255.255.0 {
       range 192.168.1.10 192.168.1.100;
       range 192.168.1.150 192.168.1.200;
       }



  This will allow the  DHCP server to assign the  client an IP address
  from the range 192.168.1.10-192.168.1.100 or
  192.168.1.150-192.168.1.200.

  It will lease an IP address for 1200 seconds if the client doesn't
  request a longer time frame. Otherwise the maximum (allowed) lease the
  server will allow is 9200 seconds. The server send the following
  paramaters to the client:

  Use 255.255.255.0 as your subnet mask Use 192.168.1.255 as your
  broadcast address Use 192.168.1.254 as your default gateway USE
  192.168.1.1 and  192.168.1.2 as your DNS servers.

  If you specify a WINS server for your Windows clients you need to
  include the following option in the dhcpd.conf file.

  option netbios-name-servers 192.168.1.1;

  You can also assign specific IP addresses based on clients ethernet
  MAC address e.g.
         host haagen {
            hardware ethernet 08:00:2b:4c:59:23;
            fixed-address 192.168.1.222;
       }



  This will assign IP address 192.168.1.222 to a client with ethernet
  MAC address of 08:00:2b:4c:59:23.


  7.3.2.  Starting the server

  In most cases the DHCP installation doesn't create a dhcpd.leases
  file.  Therefore before you start the server you must type to create
  an empty file:

  touch /var/state/dhcp/dhcpd.leases

  To start the DHCP server, simply type (or include in the bootup
  scripts)

   /usr/sbin/dhcpd

  This will start dhcpd on eth0 device. If you need to start it on
  another device simply supply it on the command line e.g.

   /usr/sbin/dhcpd eth1

  If you wish to test the configuration for any oddities you can start
  dhcpd with the debugging mode. Typing the command below will allow you
  to see exactly what is going on with the server.

    /usr/sbin/dhcpd -d -f

  Boot up a client take a look at the console of the server.  You will
  see a number of debugging messages come up.

  Your done


  7.4.  EQL - multiple line traffic equaliser

  The EQL device name is `eql'. With the standard kernel source you may
  have only one EQL device per machine. EQL provides a means of
  utilizing multiple point to point lines such as PPP, slip or plip as a
  single logical link to carry tcp/ip. Often it is cheaper to use
  multiple lower speed lines than to have one high speed line installed.

  Kernel Compile Options:


               Network device support  --->
                   [*] Network device support
                   <*> EQL (serial line load balancing) support



  To support this mechanism the machine at the other end of the lines
  must also support EQL. Linux, Livingstone Portmasters and newer dial-
  in servers support compatible facilities.

  To configure EQL you will need the eql tools which are available from:
  metalab.unc.edu.

  Configuration is fairly straightforward. You start by configuring the
  eql interface. The eql interface is just like any other network
  device. You configure the IP address and mtu using the ifconfig
  utility, so something like:



               root# ifconfig eql 192.168.10.1 mtu 1006



  Next you need to manually initiate each of the lines you will use.
  These may be any combination of point to point network devices. How
  you initiate the connections will depend on what sort of link they
  are, refer to the appropriate sections for further information.

  Lastly you need to associate the serial link with the EQL device, this
  is called `enslaving' and is done with the eql_enslave command as
  shown:



               root# eql_enslave eql sl0 28800
               root# eql_enslave eql ppp0 14400



  The `estimated speed' parameter you supply eql_enslave doesn't do
  anything directly. It is used by the EQL driver to determine what
  share of the datagrams that device should receive, so you can fine
  tune the balancing of the lines by playing with this value.

  To disassociate a line from an EQL device you use the eql_emancipate
  command as shown:



               root# eql_emancipate eql sl0



  You add routing as you would for any other point to point link, except
  your routes should refer to the eql device rather than the actual
  serial devices themselves, typically you would use:



               root# route add default eql



  The EQL driver was developed by Simon Janes, simon@ncm.com.


  7.5.  IP Accounting (for Linux-2.0)

  The IP accounting features of the Linux kernel allow you to collect
  and analyze some network usage data. The data collected comprises the
  number of packets and the number of bytes accumulated since the
  figures were last reset. You may specify a variety of rules to
  categorize the figures to suit whatever purpose you may have. This
  option has been removed in kernel 2.1.102, because the old ipfwadm-
  based firewalling was replaced by ``ipfwchains''.

  Kernel Compile Options:


               Networking options  --->
                   [*] IP: accounting



  After you have compiled and installed the kernel you need to use the
  ipfwadm command to configure IP accounting. There are many different
  ways of breaking down the accounting information that you might
  choose.  I've picked a simple example of what might be useful to use,
  you should read the ipfwadm man page for more information.

  Scenario: You have a ethernet network that is linked to the internet
  via a PPP link. On the ethernet you have a machine that offers a
  number of services and that you are interested in knowing how much
  traffic is generated by each of  ftp and world wide web traffic, as
  well as total tcp and udp traffic.

  You might use a command set that looks like the following, which is
  shown as a shell script:



          #!/bin/sh
          #
          # Flush the accounting rules
          ipfwadm -A -f
          #
          # Set shortcuts
          localnet=44.136.8.96/29
          any=0/0
          # Add rules for local ethernet segment
          ipfwadm -A in  -a -P tcp -D $localnet ftp-data
          ipfwadm -A out -a -P tcp -S $localnet ftp-data
          ipfwadm -A in  -a -P tcp -D $localnet www
          ipfwadm -A out -a -P tcp -S $localnet www
          ipfwadm -A in  -a -P tcp -D $localnet
          ipfwadm -A out -a -P tcp -S $localnet
          ipfwadm -A in  -a -P udp -D $localnet
          ipfwadm -A out -a -P udp -S $localnet
          #
          # Rules for default
          ipfwadm -A in  -a -P tcp -D $any ftp-data
          ipfwadm -A out -a -P tcp -S $any ftp-data
          ipfwadm -A in  -a -P tcp -D $any www
          ipfwadm -A out -a -P tcp -S $any www
          ipfwadm -A in  -a -P tcp -D $any
          ipfwadm -A out -a -P tcp -S $any
          ipfwadm -A in  -a -P udp -D $any
          ipfwadm -A out -a -P udp -S $any
          #
          # List the rules
          ipfwadm -A -l -n
          #



  The names ``ftp-data'' and ``www'' refer to lines in /etc/services.
  The last command lists each of the Accounting rules and displays the
  collected totals.

  An important point to note when analyzing IP accounting is that totals
  for all rules that match will be incremented so that to obtain
  differential figures you need to perform appropriate maths. For
  example if I wanted to know how much data was not ftp nor www I would
  substract the individual totals from the rule that matches all ports.



  root# ipfwadm -A -l -n
  IP accounting rules
   pkts bytes dir prot source               destination          ports
      0     0 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 20
      0     0 out tcp  44.136.8.96/29       0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 80
     10   572 out tcp  44.136.8.96/29       0.0.0.0/0            80 -> *
    252 10943 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> *
    231 18831 out tcp  44.136.8.96/29       0.0.0.0/0             * -> *
      0     0 in  udp  0.0.0.0/0            44.136.8.96/29       * -> *
      0     0 out udp  44.136.8.96/29       0.0.0.0/0            * -> *
      0     0 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 20
      0     0 out tcp  0.0.0.0/0            0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 80
     10   572 out tcp  0.0.0.0/0            0.0.0.0/0            80 -> *
    253 10983 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> *
    231 18831 out tcp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 in  udp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 out udp  0.0.0.0/0            0.0.0.0/0            * -> *



  7.5.1.  IP Accounting (for Linux-2.2)

  The new accounting code is accessed via ``IP Firewall Chains''.  See
  the IP chains home page for more information.  Among other things,
  you'll now need to use ipchains instead of ipfwadm to configure your
  filters. (From Documentation/Changes in the latest kernel sources).

  7.6.  IP Aliasing

  There are some applications where being able to configure multiple IP
  addresses to a single network device is useful. Internet Service
  Providers often use this facility to provide a `customized' to their
  World Wide Web and ftp offerings for their customers. You can refer to
  the ``IP-Alias mini-HOWTO'' for more information than you find here.

  Kernel Compile Options:


               Networking options  --->
                   ....
                   [*] Network aliasing
                   ....
                   <*> IP: aliasing support



  After compiling and installing your kernel with IP_Alias support
  configuration is very simple. The aliases are added to virtual network
  devices associated with the actual network device. A simple naming
  convention applies to these devices being <devname>:<virtual dev num>,
  e.g. eth0:0, ppp0:10 etc. Note that the the ifname:number device can
  only be configured after the main interface has been set up.

  For example, assume you have an ethernet network that supports two
  different IP subnetworks simultaneously and you wish your machine to
  have direct access to both, you could use something like:



          root# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
          root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0

          root# ifconfig eth0:0 192.168.10.1 netmask 255.255.255.0 up
          root# route add -net 192.168.10.0 netmask 255.255.255.0 eth0:0



  To delete an alias you simply add a `-' to the end of its name and
  refer to it and is as simple as:



               root# ifconfig eth0:0- 0



  All routes associated with that alias will also be deleted
  automatically.

  7.7.  IP Firewall (for Linux-2.0)

  IP Firewall and Firewalling issues are covered in more depth in the
  Firewall-HOWTO. IP Firewalling allows you to secure your machine
  against unauthorized network access by filtering or allowing datagrams
  from or to IP addresses that you nominate. There are three different
  classes of rules, incoming filtering, outgoing filtering and
  forwarding filtering. Incoming rules are applied to datagrams that are
  received by a network device. Outgoing rules are applied to datagrams
  that are to be transmitted by a network device. Forwarding rules are
  applied to datagrams that are received and are not for this machine,
  ie datagrams that would be routed.

  Kernel Compile Options:


               Networking options  --->
                   [*] Network firewalls
                   ....
                   [*] IP: forwarding/gatewaying
                   ....
                   [*] IP: firewalling
                   [ ] IP: firewall packet logging



  Configuration of the IP firewall rules is performed using the ipfwadm
  command. As I mentioned earlier, security is not something I am expert
  at, so while I will present an example you can use, you should do your
  own research and develop your own rules if security is important to
  you.

  Probably the most common use of IP firewall is when you are using your
  linux machine as a router and firewall gateway to protect your local
  network from unauthorized access from outside your network.


  The following configuration is based on a contribution from Arnt
  Gulbrandsen, <agulbra@troll.no>.

  The example describes the configuration of the firewall rules on the
  Linux firewall/router machine illustrated in this diagram:



       -                                   -
        \                                  | 172.16.37.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |  172.16.174.30 | Linux |      |
       NET =================|  f/w  |------|    ..37.19
           |    PPP         | router|      |  --------
          /                 ---------      |--| Mail |
         /                                 |  | /DNS |
        /                                  |  --------
       -                                   -



  The following commands would normally be placed in an rc file so that
  they were automatically started each time the system boots. For
  maximum security they would be performed after the network interfaces
  are configured, but before the interfaces are actually brought up to
  prevent anyone gaining access while the firewall machine is rebooting.



          #!/bin/sh

          # Flush the 'Forwarding' rules table
          # Change the default policy to 'accept'
          #
          /sbin/ipfwadm -F -f
          /sbin/ipfwadm -F -p accept
          #
          # .. and for 'Incoming'
          #
          /sbin/ipfwadm -I -f
          /sbin/ipfwadm -I -p accept

          # First off, seal off the PPP interface
          # I'd love to use '-a deny' instead of '-a reject -y' but then it
          # would be impossible to originate connections on that interface too.
          # The -o causes all rejected datagrams to be logged. This trades
          # disk space against knowledge of an attack of configuration error.
          #
          /sbin/ipfwadm -I -a reject -y -o -P tcp -S 0/0 -D 172.16.174.30

          # Throw away certain kinds of obviously forged packets right away:
          # Nothing should come from multicast/anycast/broadcast addresses
          #
          /sbin/ipfwadm -F -a deny -o -S 224.0/3 -D 172.16.37.0/24
          #
          # and nothing coming from the loopback network should ever be
          # seen on a wire
          #
          /sbin/ipfwadm -F -a deny -o -S 127.0/8 -D 172.16.37.0/24

          # accept incoming SMTP and DNS connections, but only
          # to the Mail/Name Server
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 0/0 -D 172.16.37.19 25 53
          #
          # DNS uses UDP as well as TCP, so allow that too
          # for questions to our name server
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 -D 172.16.37.19 53
          #
          # but not "answers" coming to dangerous ports like NFS and
          # Larry McVoy's NFS extension.  If you run squid, add its port here.
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 53 \
                  -D 172.16.37.0/24 2049 2050

          # answers to other user ports are okay
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 53 \
                  -D 172.16.37.0/24 53 1024:65535

          # Reject incoming connections to identd
          # We use 'reject' here so that the connecting host is told
          # straight away not to bother continuing, otherwise we'd experience
          # delays while ident timed out.
          #
          /sbin/ipfwadm -F -a reject -o -P tcp -S 0/0 -D 172.16.37.0/24 113

          # Accept some common service connections from the 192.168.64 and
          # 192.168.65 networks, they are friends that we trust.
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 192.168.64.0/23 \
                  -D 172.16.37.0/24 20:23

          # accept and pass through anything originating inside
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 172.16.37.0/24 -D 0/0

          # deny most other incoming TCP connections and log them
          # (append 1:1023 if you have problems with ftp not working)
          #
          /sbin/ipfwadm -F -a deny -o -y -P tcp -S 0/0 -D 172.16.37.0/24

          # ... for UDP too
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 -D 172.16.37.0/24



  Good firewall configurations are a little tricky. This example should
  be a reasonable starting point for you. The ipfwadm manual page offers
  some assistance in how to use the tool. If you intend to configure a
  firewall, be sure to ask around and get as much advice from sources
  you consider reliable and get someone to test/sanity check your
  configuration from the outside.

  7.7.1.  IP Firewall (for Linux-2.2)

  The new firewalling code is accessed via ``IP Firewall Chains''.  See
  the IP chanins home page for more information.  Among other things,
  you'll now need to use ipchains instead of ipfwadm to configure your
  filters. (From Documentation/Changes in the latest kernel sources).

  We are aware that this is a sorely out of date statement and we are
  currently working on getting this section more current. You can expect
  a newer version in sometime 1999.


  7.8.  IPIP Encapsulation

  Why would you want to encapsulate IP datagrams within IP datagrams? It
  must seem an odd thing to do if you've never seen an application of it
  before.  Ok, here are a couple of common places where it is used:
  Mobile-IP and IP-Multicast. What is perhaps the most widely spread use
  of it though is also the least well known, Amateur Radio.

  Kernel Compile Options:


               Networking options  --->
                   [*] TCP/IP networking
                   [*] IP: forwarding/gatewaying
                   ....
                   <*> IP: tunneling



  IP tunnel devices are called `tunl0', `tunl1' etc.

  "But why ?". Ok, ok. Conventional IP routing rules mandate that an IP
  network comprises a network address and a network mask. This produces
  a series of contiguous addresses that may all be routed via a single
  routing entry.  This is very convenient, but it means that you may
  only use any particular IP address while you are connected to the
  particular piece of network to which it belongs. In most instances
  this is ok, but if you are a mobile netizen then you may not be able
  to stay connected to the one place all the time. IP/IP encapsulation
  (IP tunneling) allows you to overcome this restriction by allowing
  datagrams destined for your IP address to be wrapped up and redirected
  to another IP address. If you know that you're going to be operating
  from some other IP network for some time you can set up a machine on
  your home network to accept datagrams to your IP address and redirect
  them to the address that you will actually be using temporarily.

  7.8.1.  A tunneled network configuration.



        192.168.1/24                          192.168.2/24

            -                                     -
            |      ppp0 =            ppp0 =       |
            |  aaa.bbb.ccc.ddd  fff.ggg.hhh.iii   |
            |                                     |
            |   /-----\                 /-----\   |
            |   |     |       //        |     |   |
            |---|  A  |------//---------|  B  |---|
            |   |     |     //          |     |   |
            |   \-----/                 \-----/   |
            |                                     |
            -                                     -



  The diagram illustrates another possible reason to use IPIP encapsula-
  tion, virtual private networking. This example presupposes that you
  have two machines each with a simple dial up internet connection. Each
  host is allocated just a single IP address. Behind each of these
  machines are some private local area networks configured with reserved
  IP network addresses. Suppose that you want to allow any host on net-
  work A to connect to any host on network B, just as if they were prop-
  erly connected to the Internet with a network route. IPIP encapsula-
  tion will allow you to do this. Note, encapsulation does not solve the
  problem of how you get the hosts on networks A and B to talk to any
  other on the Internet, you still need tricks like IP Masquerade for
  that.  Encapsulation is normally performed by machine functioning as
  routers.

  Linux router `A' would be configured with a script like the following:



          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=fff.ggg.hhh.iii
          #
          # Ethernet configuration
          ifconfig eth0 192.168.1.1 netmask $mask up
          route add -net 192.168.1.0 netmask $mask eth0
          #
          # ppp0 configuration (start ppp link, set default route)
          pppd
          route add default ppp0
          #
          # Tunnel device configuration
          ifconfig tunl0 192.168.1.1 up
          route add -net 192.168.2.0 netmask $mask gw $remotegw tunl0



  Linux router `B' would be configured with a similar script:



               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=aaa.bbb.ccc.ddd
               #
               # Ethernet configuration
               ifconfig eth0 192.168.2.1 netmask $mask up
               route add -net 192.168.2.0 netmask $mask eth0
               #
               # ppp0 configuration (start ppp link, set default route)
               pppd
               route add default ppp0
               #
               # Tunnel device configuration
               ifconfig tunl0 192.168.2.1 up
               route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0



  The command:



               route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0



  reads: `Send any datagrams destined for 192.168.1.0/24 inside an IPIP
  encap datagram with a destination address of aaa.bbb.ccc.ddd'.

  Note that the configurations are reciprocated at either end. The
  tunnel device uses the `gw' in the route as the destination of the IP
  datagram in which it will place the datagram it has received to route.
  That machine must know how to decapsulate IPIP datagrams, that is, it
  must also be configured with a tunnel device.

  7.8.2.  A tunneled host configuration.

  It doesn't have to be a whole network you route. You could for example
  route just a single IP address. In that instance you might configure
  the tunl device on the `remote' machine with its home IP address and
  at the A end just use a host route (and Proxy Arp) rather than a
  network route via the tunnel device. Let's redraw and modify our
  configuration appropriately. Now we have just host `B' which to want
  to act and behave as if it is both fully connected to the Internet and
  also part of the remote network supported by host `A':



        192.168.1/24

            -
            |      ppp0 =                ppp0 =
            |  aaa.bbb.ccc.ddd      fff.ggg.hhh.iii
            |
            |   /-----\                 /-----\
            |   |     |       //        |     |
            |---|  A  |------//---------|  B  |
            |   |     |     //          |     |
            |   \-----/                 \-----/
            |                      also: 192.168.1.12
            -



  Linux router `A' would be configured with:



               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=fff.ggg.hhh.iii
               #
               # Ethernet configuration
               ifconfig eth0 192.168.1.1 netmask $mask up
               route add -net 192.168.1.0 netmask $mask eth0
               #
               # ppp0 configuration (start ppp link, set default route)
               pppd
               route add default ppp0
               #
               # Tunnel device configuration
               ifconfig tunl0 192.168.1.1 up
               route add -host 192.168.1.12 gw $remotegw tunl0
               #
               # Proxy ARP for the remote host
               arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub



  Linux host `B' would be configured with:



          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=aaa.bbb.ccc.ddd
          #
          # ppp0 configuration (start ppp link, set default route)
          pppd
          route add default ppp0
          #
          # Tunnel device configuration
          ifconfig tunl0 192.168.1.12 up
          route add -net 192.168.1.0 netmask $mask gw $remotegwtunl0



  This sort of configuration is more typical of a Mobile-IP application.
  Where a single host wants to roam around the Internet and maintain a
  single usable IP address the whole time. You should refer to the
  Mobile-IP section for more information on how that is handled in
  practice.

  7.9.  IP Masquerade

  Many people have a simple dialup account to connect to the Internet.
  Nearly everybody using this sort of configuration is allocated a
  single IP address by the Internet Service Provider. This is normally
  enough to allow only one host full access to the network. IP
  Masquerade is a clever trick that enables you to have many machines
  make use of that one IP address, by causing the other hosts to look
  like, hence the term masquerade, the machine supporting the dialup
  connection. There is a small caveat and that is that the masquerade
  function nearly always works only in one direction, that is the
  masqueraded hosts can make calls out, but they cannot accept or
  receive network connections from remote hosts. This means that some
  network services do not work such as talk and others such as ftp must
  be configured to operate in passive (PASV) mode to operate.
  Fortunately the most common network services such as telnet, World
  Wide Web and irc do work just fine.

  Kernel Compile Options:


               Code maturity level options  --->
                   [*] Prompt for development and/or incomplete code/drivers
               Networking options  --->
                   [*] Network firewalls
                   ....
                   [*] TCP/IP networking
                   [*] IP: forwarding/gatewaying
                   ....
                   [*] IP: masquerading (EXPERIMENTAL)



  Normally you have your linux machine supporting a slip or PPP dialup
  line just as it would if it were a standalone machine. Additionally it
  would have another network device configured, perhaps an ethernet,
  configured with one of the reserved network addresses. The hosts to be
  masqueraded would be on this second network. Each of these hosts would
  have the IP address of the ethernet port of the linux machine set as
  their default gateway or router.

  A typical configuration might look something like this:



       -                                   -
        \                                  | 192.168.1.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |                | Linux | .1.1 |
       NET =================| masq  |------|
           |    PPP/slip    | router|      |  --------
          /                 ---------      |--| host |
         /                                 |  |      |
        /                                  |  --------
       -                                   -



  7.9.1.  Masquerading with IPFWADM (Kernels 2.0.x)

  The most relevant commands for this configuration are:



               # Network route for ethernet
               route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               #
               # Default route to the rest of the internet.
               route add default ppp0
               #
               # Cause all hosts on the 192.168.1/24 network to be masqueraded.
               ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0



  7.9.2.  Masquerading with IPCHAINS

  This is similar to using IPFWADM but the command structure has
  changed:



               # Network route for ethernet
               route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               #
               # Default route to the rest of the internet.
               route add default ppp0
               #
               # Cause all hosts on the 192.168.1/24 network to be masqueraded.
               ipchains -A forward -s 192.168.1.0/24 -j MASQ



  You can get more information on the Linux IP Masquerade feature from
  the IP Masquerade Resource Page. Also, a very detailed document about
  masquesrading is the ``IP-Masquerade mini-HOWTO'' (which also intructs
  to configure other OS's to run with a Linux masquerade server).


  7.10.  IP Transparent Proxy

  IP transparent proxy is a feature that enables you to redirect servers
  or services destined for another machine to those services on this
  machine.  Typically this would be useful where you have a linux
  machine as a router and also provides a proxy server. You would
  redirect all connections destined for that service remotely to the
  local proxy server.

  Kernel Compile Options:


               Code maturity level options  --->
                       [*] Prompt for development and/or incomplete code/drivers
               Networking options  --->
                       [*] Network firewalls
                       ....
                       [*] TCP/IP networking
                       ....
                       [*] IP: firewalling
                       ....
                       [*] IP: transparent proxy support (EXPERIMENTAL)



  Configuration of the transparent proxy feature is performed using the
  ipfwadm command

  An example that might be useful is as follows:



               root# ipfwadm -I -a accept -D 0/0 telnet -r 2323



  This example will cause any connection attempts to port telnet (23) on
  any host to be redirected to port 2323 on this host. If you run a
  service on that port, you could forward telnet connections, log them
  or do whatever fits your need.

  A more interesting example is redirecting all http traffic through a
  local cache. However, the protocol used by proxy servers is different
  from native http: where a client connects to www.server.com:80 and
  asks for /path/page, when it connects to the local cache it contacts
  proxy.local.domain:8080 and asks for www.server.com/path/page.

  To filter an http request through the local proxy, you need to adapt
  the protocol by inserting a small server, called transproxy (you can
  find it on the world wide web). You can choose to run transproxy on
  port 8081, and issue this command:



               root# ipfwadm -I -a accept -D 0/0 80 -r 8081


  The transproxy program, then, will receive all connections meant to
  reach external servers and will pass them to the local proxy after
  fixing protocol differences.


  7.11.  IPv6

  Just when you thought you were beginning to understand IP networking
  the rules get changed! IPv6 is the shorthand notation for version 6 of
  the Internet Protocol. IPv6 was developed primarily to overcome the
  concerns in the Internet community that there would soon be a shortage
  of IP addresses to allocate. IPv6 addresses are 16 bytes long (128
  bits). IPv6 incorporates a number of other changes, mostly
  simplifications, that will make IPv6 networks more managable than IPv4
  networks.

  Linux already has a working, but not complete, IPv6 implementation in
  the 2.2.* series kernels.

  If you wish to experiment with this next generation Internet
  technology, or have a requirement for it, then you should read the
  IPv6-FAQ which is available from www.terra.net.

  7.12.  Mobile IP

  The term "IP mobility" describes the ability of a host that is able to
  move its network connection from one point on the Internet to another
  without changing its IP address or losing connectivity. Usually when
  an IP host changes its point of connectivity it must also change its
  IP address.  IP Mobility overcomes this problem by allocating a fixed
  IP address to the mobile host and using IP encapsulation (tunneling)
  with automatic routing to ensure that datagrams destined for it are
  routed to the actual IP address it is currently using.

  A project is underway to provide a complete set of IP mobility tools
  for Linux.  The Status of the project and tools may be obtained from
  the: Linux Mobile IP Home Page.

  7.13.  Multicast

  IP Multicast allows an arbitrary number of IP hosts on disparate IP
  networks to have IP datagrams simultaneously routed to them. This
  mechanism is exploited to provide Internet wide "broadcast" material
  such as audio and video transmissions and other novel applications.

  Kernel Compile Options:


       Networking options  --->
               [*] TCP/IP networking
               ....
               [*] IP: multicasting



  A suite of tools and some minor network configuration is required.
  Please check the Multicast-HOWTO for more information on Multicast
  support in Linux.


  7.14.  Traffic Shaper - Changing allowed bandwidth

  The traffic shaper is a driver that creates new interface devices,
  those devices are traffic-limited in a user-defined way, they rely on
  physical network devices for actual transmission and can be used as
  outgoing routed for network traffic.

  The shaper was introduced in Linux-2.1.15 and was backported to
  Linux-2.0.36 (it appeared in 2.0.36-pre-patch-2 distributed by Alan
  Cox, the author of the shaper device and maintainer of Linux-2.0).


  The traffic shaper can only be compiled as a module and is configured
  by the shapecfg program with commands like the following:



               shapecfg attach shaper0 eth1
               shapecfg speed shaper0 64000



  The shaper device can only control the bandwidth of outgoing traffic,
  as packets are transmitted via the shaper only according to the
  routing tables; therefore, a ``route by source address'' functionality
  could help in limiting the overall bandwidth of specific hosts using a
  Linux router.

  Linux-2.2 already has support for such routing, if you need it for
  Linux-2.0 please check the patch by Mike McLagan, at ftp.invlogic.com.
  Refer to Documentationnetworking/shaper.txt for further information
  about the shaper.

  If you want to try out a (tentative) shaping for incoming packets, try
  out rshaper-1.01 (or newer), from ftp.systemy.it.

  8.  Advanced Networking with Kernel 2.2

  Kernel 2.2 has advanced the routing capabilities of Linux quite a bit.
  Unfortunately the documentation for using these new capabilities is
  almost impossible to find, even if it does exist.

  I have put some time into it and have been able to do a little with
  it. I will add more as I have time and help to figure out what it all
  means.

  In kernel 2.0 and below Linux used the standard route command to place
  routes in a single routing table. If you were to type netstat -rn at
  the Linux prompt you could see and example.

  In the newer kernels (2.1 and above) you have another option. This
  option is rule based and allows you to have multiple routing tables.
  The new rules allow a great deal of flexibility in deciding how a
  packet is handled. You can choose between routes based not only on the
  destination address, but the source address, TOS, or incoming device.


  8.1.  The Basics

  Listing the Routing Table:

  ip route

  Now on my machine this equates to the following output:



  207.149.43.62 dev eth0  scope link
  207.149.43.0/24 dev eth0  proto kernel  scope link  src 207.149.43.62
  default via 207.149.43.1 dev eth0



  The first line:

  207.149.43.62 dev eth0 scope link is the route for the interface

  The second line:

  207.149.43.0/24 dev eth0 proto kernel scope link src 207.149.43.62 Is
  the route that says everything that goes to 207.149.43.0 needs to go
  out 207.149.43.62.

  The third line:

  default via 207.149.43.1 dev eth0 is the default route.


  8.1.1.  Using the information

  Now that we have walked through a basic routing table. Lets see how we
  use it. First read the Policy routing text. If you get confused, don't
  worry -- it is a confusing text.  It will give you the run down on
  everything that the new routing code can do.


  8.2.  Adding a route with the new ip tools

  In the previous section we spoke about listing the routing table and
  what the basics of that listing meant. Well, luckily the output is
  very similar to the syntax that you would use to implement that exact
  routing table on your own.



       ip route add 207.149.43.62 dev eth0  scope link
       ip route add 207.149.43.0/24 dev eth0 proto kernel scope link src 207.149.43.62
       ip route add 127.0.0.0/8 dev lo  scope link
       ip route add default via 207.149.43.1 dev eth0



  As you can see the output and input are almost exact except for the
  adding of the ip route add in front of the line.

  Note: We are aware that the documentation on Routing with 2.2 is
  sorely lacking. In fact, I think EVERYONE is aware of it. If you have
  any experience in this please contact us at poet@linuxports.com we
  would like to get information you have to help further document this.


  8.3.  Using NAT with Kernel 2.2

  The IP Network Address Translation facility is pretty much the
  standardized big brother of the Linux IP Masquerade facility. It is
  specified in some detail in RFC-1631 at your nearest RFC archive. NAT
  provides features that IP-Masquerade does not that make it eminently
  more suitable for use in corporate firewall router designs and larger
  scale installations.


  An alpha implementation of NAT for Linux 2.0.29 kernel has been
  developed by Michael.Hasenstein, Michael.Hasenstein@informatik.tu-
  chemnitz.de. Michaels documentation and implementation are available
  from:

  Linux IP Network Address Web Page

  The much improved TCP/IP stack of Linux 2.2 kernel has NAT
  functionality built-in. This facility seems to obsolete the work by
  Michael Hasenstein (Michael.Hasenstein@informatik.tu-chemnitz.de).

  To get it work you need kernel with enabled CONFIG_IP_ADVANCED_ROUTER,
  CONFIG_IP_MULTIPLE_TABLES (aka policy routing) and CONFIG_IP_ROUTE_NAT
  (aka fast NAT). Also, if you want to use finer grained NAT rules, you
  may also want to turn on firewalling (CONFIG_IP_FIREWALL) and
  CONFIG_IP_ROUTE_FWMARK.  To actually operate these kernel features you
  will need the "ip" program by Alexey Kuznyetsov from
  ftp://ftp.inr.ac.ru/ip-routing/.

  Incoming datagrams NAT

  Now, to translate addresses of incoming datagrams, following command
  is used:



                  ip route add nat <ext-addr>[/<masklen>] via <int-addr>



  This will make incoming packet destined to "ext-addr" (the address
  visible from outside internet) to have its destination address field
  rewritten to "int-addr" (the address in your internal network, behind
  your gateway/firewall). The packet is then routed further according
  local routing table. You can translate either single host addresses,
  or complete blocks.  Examples:



               ip route add nat 195.113.148.34 via 192.168.0.2
               ip route add nat 195.113.148.32/27 via 192.168.0.0



  First command will make internal address 192.168.0.2 accessible as
  195.113.148.34. The second example shows remapping block
  192.168.0.0-31 to 195.113.148.32-63.


  9.  Kernel 2.2 IP Command Reference (Work In Progress)


  9.1.  ip

  If you have the iproute2 tools installed, executing the ip command
  will allow the basic syntax to be displayed.



  [root@jd Net4]# ip
  Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
  where  OBJECT := { link | addr | route | rule | neigh | tunnel |
                     maddr | mroute | monitor }
         OPTIONS := { -V[ersion] | -s[tatistics] | -r[esolve] |
                      -f[amily] { inet | inet6 | dnet | link } | -o[neline] }



  There are also several options available:

  -V, -Version -- print the version of the ip utility you are using and
  exit.

  -s, -stats, -statistics -- obtain more output on the speficied device.
  You can issue this option more than once to increase the amount of
  information being displayed.

  -f, -family followed by a protocol family identifier such as: inet,
  inet6 or link. -- Specify the exact  protocol family to use, inet uses
  the standard IPv4 (e.g.; current internet standard), inet6 uses IPv6
  (ground breadking, never to be implemented internet standard), and
  link (a physical link). If you do not present the option the protocol
  family is guessed and if not enough information is present it will
  fallback to the default setting.

  -o, -oneline Show the output each device record in a single line.

  -r, -resolve Use the system resolver (e.g.; DNS) to print actual names
  versus IP numbers.

  OBJECT Is the object/device to manage or get information about.  The
  current device types understood by the current implementation are:



  o  link -- The network device e.g.; eth0 or ppp0 .

  o  address -- The IP (IP or IPv6) address on the specified device.

  o  neigh -- The ARP or NDISC cache entry.

  o  route -- The routing table entry.

  o  rule -- The rule in routing policy database.

  o  maddress -- The multicast address.

  o  mroute -- The multicast route cache entry.

  o  tunnel -- Whether or not to tunnel over IP.

  The amount of possible options allowed on each object type depend on
  the type of action being taken. As a basic rule it is possible to add,
  delete, or to show the object(s), but not all object will allow
  additional commands to be used. Of course, command help is available
  for all objects and when used will print out a list of available
  sytanx conventions for the given object.

  If you do not give a command, the default command will be assumed.
  Typically the default command is to list the objects or if the the
  objects can not be listed to provide the standard help output.

  ARGUMENTS is the list of arguments that can be passed to the command.
  The number of arguments depend on the command and object being used.
  There is two types of arguments:

  flags consist of a keyword followed by a value. For convenience each
  command has some default parameters, which can be left out for easier
  use. For example, the paramater dev> defaults to an ip link.

  Mistakes... thank god for smart coders.  All the operations within the
  ip commands are dynamic. If the sytanx of the ip utility fails, it
  will not change the configuration of the system.  As always, there is
  an exception to this rule, the ip link command which is used to change
  part of a device parameters.

  It is difficult to list all the error messages (especially, about
  syntax errors), however as rule their meaning is clear in the context
  of the command.  The most common mistakes are: 1.  Netlink is not
  configured in the kernel. The message is: Cannot open netlink socket:
  Invalid value

  2.  RTNETLINK is not configured in the kernel. In this case one of the
  following messages may be printed, depending on the command: Cannot
  talk to rtnetlink: Connection refused Cannot send dump request:
  Connection refused

  3.  Option CONFIG_IP_MULTIPLE_TABLES was not selected when configuring
  kernel. In this case any attempt to use commandip rule will fail,
  e.g.;

  jd@home $ ip rule list RTNETLINK error: Invalid argument dump
  terminated


  10.  Using common PC hardware


  10.1.  ISDN

  The Integrated Services Digital Network (ISDN) is a series of
  standards that specify a general purpose switched digital data
  network. An ISDN `call' creates a synchronous point to point data
  service to the destination. ISDN is generally delivered on a high
  speed link that is broken down into a number of discrete channels.
  There are two different types of channels, the `B Channels' which will
  actually carry the user data and a single channel called the `D
  channel' which is used to send control information to the ISDN
  exchange to establish calls and other functions. In Australia for
  example, ISDN may be delivered on a 2Mbps link that is broken into 30
  discrete 64kbps B channels with one 64kbps D channel. Any number of
  channels may be used at a time and in any combination. You could for
  example establish 30 separate calls to 30 different destinations at
  64kbps each, or you could establish 15 calls to 15 different
  destinations at 128kbps each (two channels used per call), or just a
  small number of calls and leave the rest idle. A channel may be used
  for either incoming or outgoing calls. The original intention of ISDN
  was to allow Telecommunications companies to provide a single data
  service which could deliver either telephone (via digitised voice) or
  data services to your home or business without requiring you to make
  any special configuration changes.

  There are a few different ways to connect your computer to an ISDN
  service.  One way is to use a device called a `Terminal Adaptor' which
  plugs into the Network Terminating Unit that you telecommunications
  carrier will have installed when you got your ISDN service and
  presents a number of serial interfaces. One of those interfaces is
  used to enter commands to establish calls and configuration and the
  others are actually connected to the network devices that will use the
  data circuits when they are established. Linux will work in this sort
  of configuration without modification, you just treat the port on the
  Terminal Adaptor like you would treat any other serial device.
  Another way, which is the way the kernel ISDN support is designed for
  allows you to install an ISDN card into your Linux machine and then
  has your Linux software handle the protocols and make the calls
  itself.

  Kernel Compile Options:


               ISDN subsystem  --->
                       <*> ISDN support
                       [ ] Support synchronous PPP
                       [ ] Support audio via ISDN
                       < > ICN 2B and 4B support
                       < > PCBIT-D support
                       < > Teles/NICCY1016PC/Creatix support



  The Linux implementation of ISDN supports a number of different types
  of internal ISDN cards. These are those listed in the kernel
  configuration options:


  o  ICN 2B and 4B

  o  Octal PCBIT-D

  o  Teles ISDN-cards and compatibles


  Some of these cards require software to be downloaded to them to make
  them operational. There is a separate utility to do this with.

  Full details on how to configure the Linux ISDN support is available
  from the /usr/src/linux/Documentation/isdn/ directory and an FAQ
  dedicated to isdn4linux is available at www.lrz-muenchen.de.  (You can
  click on the english flag to get an english version).

  A note about PPP. The PPP suite of protocols will operate over either
  asynchronous or synchronous serial lines. The commonly distributed PPP
  daemon for Linux `pppd' supports only asynchronous mode. If you wish
  to run the PPP protocols over your ISDN service you need a specially
  modified version. Details of where to find it are available in the
  documentation referred to above.


  10.2.  PLIP for Linux-2.0

  PLIP device names are `plip0', `plip1 and plip2.

  Kernel Compile Options:


               Network device support  --->
                   <*> PLIP (parallel port) support



  plip (Parallel Line IP), is like SLIP, in that it is used for
  providing a point to point network connection between two machines,
  except that it is designed to use the parallel printer ports on your
  machine instead of the serial ports (a cabling diagram in included in
  the cabling diagram section later in this document). Because it is
  possible to transfer more than one bit at a time with a parallel port,
  it is possible to attain higher speeds with the plip interface than
  with a standard serial device.  In addition, even the simplest of
  parallel ports, printer ports, can be used in lieu of you having to
  purchase comparatively expensive 16550AFN UART's for your serial
  ports. PLIP uses a lot of CPU compared to a serial link and is most
  certainly not a good option if you can obtain some cheap ethernet
  cards, but it will work when nothing else is available and will work
  quite well.  You should expect a data transfer rate of about 20
  kilobytes per second when a link is running well.

  The PLIP device drivers competes with the parallel device driver for
  the parallel port hardware. If you wish to use both drivers then you
  should compile them both as modules to ensure that you are able to
  select which port you want to use for PLIP and which ports you want
  for the printer driver.  Refer to the ``Mudules mini-HOWTO'' for more
  information on kernel module configuration.

  Please note that some laptops use chipsets that will not work with
  PLIP because they do not allow some combinations of signals that PLIP
  relies on, that printers don't use.

  The Linux plip interface is compatible with the Crynwyr Packet Driver
  PLIP/ and this will mean that you can connect your Linux machine to a
  DOS machine running any other sort of tcp/ip software via plip.

  In the 2.0.* series kernel the plip devices are mapped to i/o port and
  IRQ as follows:



               device  i/o     IRQ
               ------  -----   ---
               plip0   0x3bc   5
               plip1   0x378   7
               plip2   0x278   2



  If your parallel ports don't match any of the above combinations then
  you can change the IRQ of a port using the ifconfig command using the
  `irq' parameter (be sure to enable IRQ's on your printer ports in your
  ROM BIOS if it supports this option). As an alternative, you can
  specify ``io='' annd ``irq='' options on the insmod command line, if
  you use modules. For example:



               root# insmod plip.o io=0x288 irq=5



  PLIP operation is controlled by two timeouts, whose default values are
  probably ok in most cases. You will probably need to increase them if
  you have an especially slow computer, in which case the timers to
  increase are actually on the other computer.  A program called
  plipconfig exists that allows you to change these timer settings
  without recompiling your kernel. It is supplied with many Linux
  distributions.

  To configure a plip interface, you will need to invoke the following
  commands (or add them to your initialization scripts):



               root# /sbin/ifconfig plip1 localplip pointopoint remoteplip
               root# /sbin/route add remoteplip plip1



  Here, the port being used is the one at I/O address 0x378; localplip
  amd remoteplip are the names or IP addresses used over the PLIP cable.
  I personally keep them in my /etc/hosts database:



               # plip entries
               192.168.3.1   localplip
               192.168.3.2   remoteplip



  The pointopoint parameter has the same meaning as for SLIP, in that it
  specifies the address of the machine at the other end of the link.

  In almost all respects you can treat a plip interface as though it
  were a SLIP interface, except that neither dip nor slattach need be,
  nor can be, used.

  Further information on PLIP may be obtained from the ``PLIP mini-
  HOWTO''.

  10.2.1.  PLIP for Linux-2.2

  During development of the 2.1 kernel versions, support for the
  parallel port was changed to a better setup.

  Kernel Compile Options:


               General setup  --->
                   [*] Parallel port support
               Network device support  --->
                   <*> PLIP (parallel port) support



  The new code for PLIP behaves like the old one (use the same ifconfig
  and route commands as in the previous section, but initialization of
  the device is different due to the advanced parallel port support.


  The ``first'' PLIP device is always called ``plip0'', where first is
  the first device detected by the system, similarly to what happens for
  Ethernet devices. The actual parallel port being used is one of the
  available ports, as shown in /proc/parport. For example, if you have
  only one parallel port, you'll only have a directory called
  /proc/parport/0.

  If your kernel didn't detect the IRQ number used by your port,
  ``insmod plip'' will fail; in this case just write the right number to
  /proc/parport/0/irq and reinvoke insmod.

  Complete information about parallel port management is available in
  the file Documentation/parport.txt, part of your kernel sources.

  10.3.  PPP

  Many people have problems with Linux and PPP, with the increasing
  amount of technologies being used to authenticate it is becoming more
  difficult to manage PPP links. Although the following information is
  detailed it may be overdone if you are just looking to set up a basic
  dialup link. The majority of ISP's out there use PAP (Plain Text
  Authentication Protocol). Since this is the case I STRONGLY suggest
  that you look at the following programs to help manage your links.


     Linuxconf COAS

  Both of these programs provide menu based configuration for PPP. I
  again suggest that you use the programs listed above. It will make
  your life much easier. LinuxConf works with most distributions and it
  is distributed with RedHat. COAS comes with Caldera and SUSE has a
  program called YAST. I have no experience with YAST, if someone sends
  me a (blatant hint)machine I will load SUSE and document YAST.

  PPP devices names are `ppp0', `ppp1, etc. Devices are numbered
  sequentially with the first device configured receiving `0'.

  Kernel Compile Options:


               Networking options  --->
                   <*> PPP (point-to-point) support



  PPP configuration is covered in detail in the PPP-HOWTO. The PPP Howto
  is severly outdated and I will try to get more information for the
  manual PPP configuration as soon as I can.

  10.3.1.  Maintaining a permanent connection to the net with pppd .

  If you are fortunate enough to have a semi permanent connection to the
  net and would like to have your machine automatically redial your PPP
  connection if it is lost then here is a simple trick to do so.

  Configure PPP such that it can be started by the root user by issuing
  the command:


       # pppd



  Be sure that you have the `-detach' option configured in your
  /etc/ppp/options file. Then, insert the following line into your
  /etc/inittab file, down with the getty definitions:


       pd:23:respawn:/usr/sbin/pppd



  This will cause the init program to spawn and monitor the pppd program
  and automatically restart it if it dies.

  10.4.  SLIP client - (Antiquated)

  SLIP devices are named `sl0', `sl1' etc. with the first device
  configured being assigned `0' and the rest incrementing sequentially
  as they are configured.

  Kernel Compile Options:


               Network device support  --->
                   [*] Network device support
                   <*> SLIP (serial line) support
                   [ ]  CSLIP compressed headers
                   [ ]  Keepalive and linefill
                   [ ]  Six bit SLIP encapsulation



  SLIP (Serial Line Internet Protocol) allows you to use tcp/ip over a
  serial line, be that a phone line with a dialup modem, or a leased
  line of some sort.  Of course to use SLIP you need access to a SLIP-
  server in your area. Many universities and businesses provide SLIP
  access all over the world.

  Slip uses the serial ports on your machine to carry IP datagrams. To
  do this it must take control of the serial device. Slip device names
  are named sl0, sl1 etc. How do these correspond to your serial devices
  ? The networking code uses what is called an ioctl (i/o control) call
  to change the serial devices into SLIP devices. There are two programs
  supplied that can do this, they are called dip and slattach

  10.4.1.  dip

  dip (Dialup IP) is a smart program that is able to set the speed of
  the serial device, command your modem to dial the remote end of the
  link, automatically log you into the remote server, search for
  messages sent to you by the server and extract information for them
  such as your IP address and perform the ioctl necessary to switch your
  serial port into SLIP mode. dip has a powerful scripting ability and
  it is this that you can exploit to automate your logon procedure.

  You can find it at: metalab.unc.edu.

  To install it, try the following:



          user% tar xvzf dip337o-uri.tgz
          user% cd dip-3.3.7o
          user% vi Makefile
          root# make install



  The Makefile assumes the existence of a group called uucp, but you
  might like to change this to either dip or SLIP depending on your
  configuration.

  10.4.2.  slattach

  slattach as contrasted with dip is a very simple program, that is very
  easy to use, but does not have the sophistication of dip.  It does not
  have the scripting ability, all it does is configure your serial
  device as a SLIP device. It assumes you have all the information you
  need and the serial line is established before you invoke it. slattach
  is ideal to use where you have a permanent connection to your server,
  such as a physical cable, or a leased line.

  10.4.3.  When do I use which ?

  You would use dip when your link to the machine that is your SLIP
  server is a dialup modem, or some other temporary link. You would use
  slattach when you have a leased line, perhaps a cable, between your
  machine and the server and there is no special action needed to get
  the link working. See section `Permanent Slip connection' for more
  information.

  Configuring SLIP is much like configuring an Ethernet interface (read
  section `Configuring an ethernet device' above). However there are a
  few key differences.

  First of all, SLIP links are unlike ethernet networks in that there is
  only ever two hosts on the network, one at each end of the link.
  Unlike an ethernet that is available for use as soon are you are
  cabled, with SLIP, depending on the type of link you have, you may
  have to initialize your network connection in some special way.

  If you are using dip then this would not normally be done at boot
  time, but at some time later, when you were ready to use the link.  It
  is possible to automate this procedure. If you are using slattach then
  you will probably want to add a section to your rc.inet1 file.  This
  will be described soon.

  There are two major types of SLIP servers: Dynamic IP address servers
  and static IP address servers. Almost every SLIP server will prompt
  you to login using a username and password when dialing in. dip can
  handle logging you in automatically.

  10.4.4.  Static SLIP server with a dialup line and DIP.

  A static SLIP server is one in which you have been supplied an IP
  address that is exclusively yours. Each time you connect to the
  server, you will configure your SLIP port with that address. The
  static SLIP server will answer your modem call, possibly prompt you
  for a username and password, and then route any datagrams destined for
  your address to you via that connection. If you have a static server,
  then you may want to put entries for your hostname and IP address
  (since you know what it will be) into your /etc/hosts. You should also
  configure some other files such as: rc.inet2, host.conf, resolv.conf,
  /etc/HOSTNAME and rc.local. Remember that when configuring rc.inet1,
  you don't need to add any special commands for your SLIP connection
  since it is dip that does all of the hard work for you in configuring
  your interface. You will need to give dip the appropriate information
  and it will configure the interface for you after commanding the modem
  to establish the call and logging you into your SLIP server.

  If this is how your SLIP server works then you can move to section
  `Using Dip' to learn how to configure dip appropriately.

  10.4.5.  Dynamic SLIP server with a dialup line and DIP.

  A dynamic SLIP server is one which allocates you an IP address
  randomly, from a pool of addresses, each time you logon. This means
  that there is no guarantee that you will have any particular address
  each time, and that address may well be used by someone else after you
  have logged off.  The network administrator who configured the SLIP
  server will have assigned a pool of address for the SLIP server to
  use, when the server receives a new incoming call, it finds the first
  unused address, guides the caller through the login process and then
  prints a welcome message that contains the IP address it has allocated
  and will proceed to use that IP address for the duration of that call.

  Configuring for this type of server is similar to configuring for a
  static server, except that you must add a step where you obtain the IP
  address that the server has allocated for you and configure your SLIP
  device with that.

  Again, dip does the hard work and new versions are smart enough to not
  only log you in, but to also be able to automatically read the IP
  address printed in the welcome message and store it so that you can
  have it configure your SLIP device with it.

  If this is how your SLIP server works then you can move to section
  `Using Dip' to learn how to configure dip appropriately.

  10.4.6.  Using DIP.

  As explained earlier, dip is a powerful program that can simplify and
  automate the process of dialing into the SLIP server, logging you in,
  starting the connection and configuring your SLIP devices with the
  appropriate ifconfig and route commands.

  Essentially to use dip you'll write a `dip script', which is basically
  a list of commands that dip understands that tell dip how to perform
  each of the actions you want it to perform. See sample.dip that comes
  supplied with dip to get an idea of how it works. dip is quite a
  powerful program, with many options.  Instead of going into all of
  them here you should look at the man page, README and sample files
  that will have come with your version of dip.

  You may notice that the sample.dip script assumes that you're using a
  static SLIP server, so you know what your IP address is beforehand.
  For dynamic SLIP servers, the newer versions of dip include a command
  you can use to automatically read and configure your SLIP device with
  the IP address that the dynamic server allocates for you. The
  following sample is a modified version of the sample.dip that came
  supplied with dip337j-uri.tgz and is probably a good starting point
  for you.  You might like to save it as /etc/dipscript and edit it to
  suit your configuration:



  #
  # sample.dip    Dialup IP connection support program.
  #
  #               This file (should show) shows how to use the DIP
  #       This file should work for Annex type dynamic servers, if you
  #       use a static address server then use the sample.dip file that
  #       comes as part of the dip337-uri.tgz package.
  #
  #
  # Version:      @(#)sample.dip  1.40    07/20/93
  #
  # Author:       Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  #

  main:
  # Next, set up the other side's name and address.
  # My dialin machine is called 'xs4all.hacktic.nl' (== 193.78.33.42)
  get $remote xs4all.hacktic.nl
  # Set netmask on sl0 to 255.255.255.0
  netmask 255.255.255.0
  # Set the desired serial port and speed.
  port cua02
  speed 38400

  # Reset the modem and terminal line.
  # This seems to cause trouble for some people!
  reset

  # Note! "Standard" pre-defined "errlevel" values:
  #  0 - OK
  #  1 - CONNECT
  #  2 - ERROR
  #
  # You can change those grep'ping for "addchat()" in *.c...

  # Prepare for dialing.
  send ATQ0V1E1X4\r
  wait OK 2
  if $errlvl != 0 goto modem_trouble
  dial 555-1234567
  if $errlvl != 1 goto modem_trouble

  # We are connected.  Login to the system.
  login:
  sleep 2
  wait ogin: 20
  if $errlvl != 0 goto login_trouble
  send MYLOGIN\n
  wait ord: 20
  if $errlvl != 0 goto password_error
  send MYPASSWD\n
  loggedin:

  # We are now logged in.
  wait SOMEPROMPT 30
  if $errlvl != 0 goto prompt_error

  # Command the server into SLIP mode
  send SLIP\n
  wait SLIP 30
  if $errlvl != 0 goto prompt_error

  # Get and Set your IP address from the server.
  #   Here we assume that after commanding the SLIP server into SLIP
  #   mode that it prints your IP address
  get $locip remote 30
  if $errlvl != 0 goto prompt_error

  # Set up the SLIP operating parameters.
  get $mtu 296
  # Ensure "route add -net default xs4all.hacktic.nl" will be done
  default

  # Say hello and fire up!
  done:
  print CONNECTED $locip ---> $rmtip
  mode CSLIP
  goto exit

  prompt_error:
  print TIME-OUT waiting for sliplogin to fire up...
  goto error

  login_trouble:
  print Trouble waiting for the Login: prompt...
  goto error

  password:error:
  print Trouble waiting for the Password: prompt...
  goto error

  modem_trouble:
  print Trouble occurred with the modem...
  error:
  print CONNECT FAILED to $remote
  quit

  exit:
  exit



  The above example assumes you are calling a dynamic SLIP server, if
  you are calling a static SLIP server, then the sample.dip file that
  comes with dip337j-uri.tgz should work for you.

  When dip is given the get $local command it searches the incoming text
  from the remote end for a string that looks like an IP address, ie
  strings numbers separated by `.' characters. This modification was put
  in place specifically for dynamic SLIP servers, so that the process of
  reading the IP address granted by the server could be automated.

  The example above will automatically create a default route via your
  SLIP link, if this is not what you want, you might have an ethernet
  connection that should be your default route, then remove the default
  command from the script.  After this script has finished running, if
  you do an ifconfig command, you will see that you have a device sl0.
  This is your SLIP device.  Should you need to, you can modify its
  configuration manually, after the dip command has finished, using the
  ifconfig and route commands.

  Please note that dip allows you to select a number of different
  protocols to use with the mode command, the most common example is
  cSLIP for SLIP with compression. Please note that both ends of the
  link must agree, so you should ensure that whatever you select agrees
  with what your server is set to.

  The above example is fairly robust and should cope with most errors.
  Please refer to the dip man page for more information. Naturally you
  could, for example, code the script to do such things as redial the
  server if it doesn't get a connection within a prescribed period of
  time, or even try a series of servers if you have access to more than
  one.

  10.4.7.  Permanent SLIP connection using a leased line and slattach.

  If you have a cable between two machines, or are fortunate enough to
  have a leased line, or some other permanent serial connection between
  your machine and another, then you don't need to go to all the trouble
  of using dip to set up your serial link. slattach is a very simple to
  use utility that will allow you just enough functionality to configure
  your connection.

  Since your connection will be a permanent one, you will want to add
  some commands to your rc.inet1 file. In essence all you need to do for
  a permanent connection is ensure that you configure the serial device
  to the correct speed and switch the serial device into SLIP mode.
  slattach allows you to do this with one command. Add the following to
  your rc.inet1 file:



               #
               # Attach a leased line static SLIP connection
               #
               #  configure /dev/cua0 for 19.2kbps and cslip
               /sbin/slattach -p cslip -s 19200 /dev/cua0 &
               /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
               #
               # End static SLIP.



  Where:


     IPA.IPA.IPA.IPA
        represents your IP address.


     IPR.IPR.IPR.IPR
        represents the IP address of the remote end.


  slattach allocates the first unallocated SLIP device to the serial
  device specified. slattach starts with sl0. Therefore the first
  slattach command attaches SLIP device sl0 to the serial device
  specified and sl1 the next time, etc.

  slattach allows you to configure a number of different protocols with
  the -p argument. In your case you will use either SLIP or cSLIP
  depending on whether you want to use compression or not.  Note: both
  ends must agree on whether you want compression or not.

  10.4.8.  SLIP server.

  If you have a machine that is perhaps network connected, that you'd
  like other people be able to dial into and provide network services,
  then you will need to configure your machine as a server. If you want
  to use SLIP as the serial line protocol, then currently you have three
  options as to how to configure your Linux machine as a SLIP server. My
  preference would be to use the first presented, sliplogin, as it seems
  the easiest to configure and understand, but I will present a summary
  of each, so you can make your own decision.

  10.4.9.  Slip Server using sliplogin .

  sliplogin is a program that you can use in place of the normal login
  shell for SLIP users that converts the terminal line into a SLIP line.
  It allows you to configure your Linux machine as either a static
  address server, users get the same address everytime they call in, or
  a dynamic address server, where users get an address allocated for
  them which will not necessarily be the same as the last time they
  called.

  The caller will login as per the standard login process, entering
  their username and password, but instead of being presented with a
  shell after their login, sliplogin is executed which searches its
  configuration file (/etc/slip.hosts) for an entry with a login name
  that matches that of the caller. If it locates one, it configures the
  line as an 8bit clean line, and uses an ioctl call to convert the line
  discipline to SLIP. When this process is complete, the last stage of
  configuration takes place, where sliplogin invokes a shell script
  which configures the SLIP interface with the relevant ip address,
  netmask and sets appropriate routing in place.  This script is usually
  called /etc/slip.login, but in a similar manner to getty, if you have
  certain callers that require special initialization, then you can
  create configuration scripts called /etc/slip.login.loginname that
  will be run instead of the default specifically for them.

  There are either three or four files that you need to configure to get
  sliplogin working for you. I will detail how and where to get the
  software and how each is configured in detail. The files are:


  o  /etc/passwd, for the dialin user accounts.

  o  /etc/slip.hosts, to contain the information unique to each dial-in
     user.

  o  /etc/slip.login, which manages the configuration of the routing
     that needs to be performed for the user.

  o  /etc/slip.tty, which is required only if you are configuring your
     server for dynamic address allocation and contains a table of
     addresses to allocate

  o  /etc/slip.logout, which contains commands to clean up after the
     user has hung up or logged out.


  10.4.10.  Where to get sliplogin

  You may already have the sliplogin package installed as part of your
  distribution, if not then sliplogin can be obtained from:
  metalab.unc.edu.  The tar file contains both source, precompiled
  binaries and a man page.

  To ensure that only authorized users will be able to run sliplogin
  program, you should add an entry to your /etc/group file similar to
  the following:



        ..
       slip::13:radio,fred
        ..


  When you install the sliplogin package, the Makefile will change the
  group ownership of the sliplogin program to slip, and this will mean
  that only users who belong to that group will be able to execute it.
  The example above will allow only users radio and fred to execute
  sliplogin.

  To install the binaries into your /sbin directory and the man page
  into section 8, do the following:



       # cd /usr/src
       # gzip -dc .../sliplogin-2.1.1.tar.gz | tar xvf -
       # cd sliplogin-2.1.1
       # <..edit the Makefile if you don't use shadow passwords..>
       # make install



  If you want to recompile the binaries before installation, add a make
  clean before the make install. If you want to install the binaries
  somewhere else, you will need to edit the Makefile install rule.

  10.4.11.  Configuring /etc/passwd  for Slip hosts.

  Normally you would create some special logins for Slip callers in your
  /etc/passwd file. A convention commonly followed is to use the
  hostname of the calling host with a capital `S' prefixing it. So, for
  example, if the calling host is called radio then you could create a
  /etc/passwd entry that looked like:



       Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin



  It doesn't really matter what the account is called, so long as it is
  meaningful to you.

  Note: the caller doesn't need any special home directory, as they will
  not be presented with a shell from this machine, so /tmp is a good
  choice.  Also note that sliplogin is used in place of the normal login
  shell.

  10.4.12.  Configuring /etc/slip.hosts

  The /etc/slip.hosts file is the file that sliplogin searches for
  entries matching the login name to obtain configuration details for
  this caller. It is this file where you specify the ip address and
  netmask that will be assigned to the caller and configured for their
  use. Sample entries for two hosts, one a static configuration for host
  radio and another, a dynamic configuration for user host albert might
  look like:



       #
       Sradio   44.136.8.99   44.136.8.100  255.255.255.0  normal      -1
       Salbert  44.136.8.99   DYNAMIC       255.255.255.0  compressed  60
       #

  The /etc/slip.hosts file entries are:


  1. the login name of the caller.

  2. ip address of the server machine, ie this machine.

  3. ip address that the caller will be assigned. If this field is coded
     DYNAMIC then an ip address will be allocated based on the
     information contained in your /etc/slip.tty file discussed later.
     Note: you must be using at least version 1.3 of sliplogin for this
     to work.

  4. the netmask assigned to the calling machine in dotted decimal
     notation eg 255.255.255.0 for a Class C network mask.

  5. the slip mode setting which allows you to enable/disable
     compression and slip other features. Allowable values here are
     "normal" or "compressed".

  6. a timeout parameter which specifies how long the line can remain
     idle (no datagrams received) before the line is automatically
     disconnected. A negative value disables this feature.

  7. optional arguments.


  Note: You can use either hostnames or IP addresses in dotted decimal
  notation for fields 2 and 3. If you use hostnames then those hosts
  must be resolvable, that is, your machine must be able to locate an ip
  address for those hostnames, otherwise the script will fail when it is
  called. You can test this by trying trying to telnet to the hostname,
  if you get the `Trying nnn.nnn.nnn...' message then your machine has
  been able to find an ip address for that name. If you get the message
  `Unknown host', then it has not. If not, either use ip addresses in
  dotted decimal notation, or fix up your name resolver configuration
  (See section Name Resolution).

  The most common slip modes are:


     normal
        to enable normal uncompressed SLIP.


     compressed
        to enable van Jacobsen header compression (cSLIP)


  Naturally these are mutually exclusive, you can use one or the other.
  For more information on the other options available, refer to the man
  pages.

  10.4.13.  Configuring the /etc/slip.login  file.

  After sliplogin has searched the /etc/slip.hosts and found a matching
  entry, it will attempt to execute the /etc/slip.login file to actually
  configure the SLIP interface with its ip address and netmask.

  The sample /etc/slip.login file supplied with the sliplogin package
  looks like this:



  #!/bin/sh -
  #
  #       @(#)slip.login  5.1 (Berkeley) 7/1/90
  #
  # generic login file for a SLIP line.  sliplogin invokes this with
  # the parameters:
  #     $1       $2       $3    $4, $5, $6 ...
  #   SLIPunit ttyspeed   pid   the arguments from the slip.host entry
  #
  /sbin/ifconfig $1 $5 pointopoint $6 mtu 1500 -trailers up
  /sbin/route add $6
  arp -s $6 <hw_addr> pub
  exit 0
  #



  You will note that this script simply uses the ifconfig and route com-
  mands to configure the SLIP device with its ipaddress, remote ip
  address and netmask and creates a route for the remote address via the
  SLIP device. Just the same as you would if you were using the slattach
  command.

  Note also the use of Proxy ARP to ensure that other hosts on the same
  ethernet as the server machine will know how to reach the dial-in
  host.  The <hw_addr> field should be the hardware address of the
  ethernet card in the machine. If your server machine isn't on an
  ethernet network then you can leave this line out completely.

  10.4.14.  Configuring the /etc/slip.logout  file.

  When the call drops out, you want to ensure that the serial device is
  restored to its normal state so that future callers will be able to
  login correctly.  This is achieved with the use of the
  /etc/slip.logout file. It is quite simple in format and is called with
  the same argument as the /etc/slip.login file.



               #!/bin/sh -
               #
               #               slip.logout
               #
               /sbin/ifconfig $1 down
               arp -d $6
               exit 0
               #



  All it does is `down' the interface which will delete the manual route
  previously created. It also uses the arp command to delete any proxy
  arp put in place, again, you don't need the arp command in the script
  if your server machine does not have an ethernet port.

  10.4.15.  Configuring the /etc/slip.tty  file.

  If you are using dynamic ip address allocation (have any hosts
  configured with the DYNAMIC keyword in the /etc/slip.hosts file, then
  you must configure the /etc/slip.tty file to list what addresses are
  assigned to what port. You only need this file if you wish your server
  to dynamically allocate addresses to users.

  The file is a table that lists the tty devices that will support dial-
  in SLIP connections and the ip address that should be assigned to
  users who call in on that port.

  Its format is as follows:


       # slip.tty    tty -> IP address mappings for dynamic SLIP
       # format: /dev/tty?? xxx.xxx.xxx.xxx
       #
       /dev/ttyS0      192.168.0.100
       /dev/ttyS1      192.168.0.101
       #



  What this table says is that callers that dial in on port /dev/ttyS0
  who have their remote address field in the /etc/slip.hosts file set to
  DYNAMIC will be assigned an address of 192.168.0.100.

  In this way you need only allocate one address per port for all users
  who do not require an dedicated address for themselves. This helps you
  keep the number of addresses you need down to a minimum to avoid
  wastage.

  10.4.16.  Slip Server using dip .

  Let me start by saying that some of the information below came from
  the dip man pages, where how to run Linux as a SLIP server is briefly
  documented. Please also beware that the following has been based on
  the dip337o-uri.tgz package and probably will not apply to other
  versions of dip.

  dip has an input mode of operation, where it automatically locates an
  entry for the user who invoked it and configures the serial line as a
  SLIP link according to information it finds in the /etc/diphosts file.
  This input mode of operation is activated by invoking dip as diplogin.
  This therefore is how you use dip as a SLIP server, by creating
  special accounts where diplogin is used as the login shell.

  The first thing you will need to do is to make a symbolic link as
  follows:



       # ln -sf /usr/sbin/dip /usr/sbin/diplogin



  You then need to add entries to both your /etc/passwd and your
  /etc/diphosts files. The entries you need to make are formatted as
  follows:

  To configure Linux as a SLIP server with dip, you need to create some
  special SLIP accounts for users, where dip (in input mode) is used as
  the login shell. A suggested convention is that of having all SLIP
  accounts begin with a capital `S', eg `Sfredm'.

  A sample /etc/passwd entry for a SLIP user looks like:

       Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
       ^^         ^^        ^^  ^^   ^^   ^^   ^^
       |          |         |   |    |    |    \__ diplogin as login shell
       |          |         |   |    |    \_______ Home directory
       |          |         |   |    \____________ User Full Name
       |          |         |   \_________________ User Group ID
       |          |         \_____________________ User ID
       |          \_______________________________ Encrypted User Password
       \__________________________________________ Slip User Login Name



  After the user logs in, the login program, if it finds and verifies
  the user ok, will execute the diplogin command. dip, when invoked as
  diplogin knows that it should automatically assume that it is being
  used a login shell. When it is started as diplogin the first thing it
  does is use the getuid() function call to get the userid of whoever
  has invoked it. It then searches the /etc/diphosts file for the first
  entry that matches either the userid or the name of the tty device
  that the call has come in on and configures itself appropriately.  By
  judicious decision as to whether to give a user an entry in the
  diphosts file, or whether to let the user be given the default
  configuration you can build your server in such a way that you can
  have a mix of static and dynamically assigned address users.

  dip will automatically add a `Proxy-ARP' entry if invoked in input
  mode, so you do not need to worry about manually adding such entries.

  10.4.17.  Configuring /etc/diphosts

  /etc/diphosts is used by dip to lookup preset configurations for
  remote hosts. These remote hosts might be users dialing into your
  linux machine, or they might be for machines that you dial into with
  your linux machine.

  The general format for /etc/diphosts is as follows:



        ..
       Suwalt::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
       ttyS1::145.71.34.3:145.71.34.2:255.255.255.0:Dynamic ttyS1:CSLIP,296
        ..



  The fields are:

  1. login name: as returned by getpwuid(getuid()) or tty name.

  2. unused: compat. with passwd

  3. Remote Address: IP address of the calling host, either numeric or
     by name

  4. Local Address: IP address of this machine, again numeric or by name

  5. Netmask: in dotted decimal notation

  6. Comment field: put whatever you want here.


  7. protocol: Slip, CSlip etc.

  8. MTU: decimal number


     An example /etc/net/diphosts entry for a remote SLIP user might be:



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296



  which specifies a SLIP link with remote address of 145.71.34.1 and MTU
  of 296, or:



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006



  which specifies a cSLIP-capable link with remote address 145.71.34.1
  and MTU of 1006.

  Therefore, all users who you wish to be allowed a statically allocated
  dial-up IP access should have an entry in the /etc/diphosts. If you
  want users who call a particular port to have their details
  dynamically allocated then you must have an entry for the tty device
  and do not configure a user based entry. You should remember to
  configure at least one entry for each tty device that your dialup
  users use to ensure that a suitable configuration is available for
  them regardless of which modem they call in on.

  When a user logs in they will receive a normal login and password
  prompt at which they should enter their SLIP-login userid and
  password. If these verify ok then the user will see no special
  messages and they should just change into SLIP mode at their end. The
  user should then be able to connect ok and be configured with the
  relevant parameters from the diphosts file.

  10.4.18.  SLIP server using the dSLIP  package.

  Matt Dillon <dillon@apollo.west.oic.com> has written a package that
  does not only dial-in but also dial-out SLIP. Matt's package is a
  combination of small programs and scripts that manage your connections
  for you. You will need to have tcsh installed as at least one of the
  scripts requires it. Matt supplies a binary copy of the expect utility
  as it too is needed by one of the scripts. You will most likely need
  some experience with expect to get this package working to your
  liking, but don't let that put you off.

  Matt has written a good set of installation instructions in the README
  file, so I won't bother repeating them.

  You can get the dSLIP package from its home site at:

  apollo.west.oic.com


       /pub/linux/dillon_src/dSLIP203.tgz

  or from:

  metalab.unc.edu


       /pub/Linux/system/Network/serial/dSLIP203.tgz



  Read the README file and create the /etc/passwd and /etc/group entries
  before doing a make install.


  11.  Other Network Technologies

  The following subsections are specific to particular network
  technologies.  The information contained in these sections does not
  necessarily apply to any other type of network technology. The topics
  are sorted alphabetically.

  11.1.  ARCNet

  ARCNet device names are `arc0e', `arc1e', `arc2e' etc. or `arc0s',
  `arc1s', `arc2s' etc. The first card detected by the kernel is
  assigned `arc0e' or `arc0s' and the rest are assigned sequentially in
  the order they are detected. The letter at the end signifies whether
  you've selected ethernet encapsulation packet format or RFC1051 packet
  format.

  Kernel Compile Options:


               Network device support  --->
                   [*] Network device support
                   <*> ARCnet support
                   [ ]   Enable arc0e (ARCnet "Ether-Encap" packet format)
                   [ ]   Enable arc0s (ARCnet RFC1051 packet format)



  Once you have your kernel properly built to support your ethernet card
  then configuration of the card is easy.

  Typically you would use something like:



               root# ifconfig arc0e 192.168.0.1 netmask 255.255.255.0 up
               root# route add -net 192.168.0.0 netmask 255.255.255.0 arc0e



  Please refer to the /usr/src/linux/Documentation/networking/arcnet.txt
  and /usr/src/linux/Documentation/networking/arcnet-hardware.txt files
  for further information.

  ARCNet support was developed by Avery Pennarun, apenwarr@foxnet.net.

  11.2.  Appletalk ( AF_APPLETALK )

  The Appletalk support has no special device names as it uses existing
  network devices.

  Kernel Compile Options:


               Networking options  --->
                   <*> Appletalk DDP



  Appletalk support allows your Linux machine to interwork with Apple
  networks.  An important use for this is to share resources such as
  printers and disks between both your Linux and Apple computers.
  Additional software is required, this is called netatalk. Wesley Craig
  netatalk@umich.edu represents a team called the `Research Systems Unix
  Group' at the University of Michigan and they have produced the
  netatalk package which provides software that implements the Appletalk
  protocol stack and some useful utilities.  The netatalk package will
  either have been supplied with your Linux distribution, or you will
  have to ftp it from its home site at the University of Michigan

  To build and install the package do something like:



               user% tar xvfz .../netatalk-1.4b2.tar.Z
               user% make
               root# make install



  You may want to edit the `Makefile' before calling make to actually
  compile the software. Specifically, you might want to change the
  DESTDIR variable which defines where the files will be installed
  later.  The default of /usr/local/atalk is fairly safe.

  11.2.1.  Configuring the Appletalk software.

  The first thing you need to do to make it all work is to ensure that
  the appropriate entries in the /etc/services file are present. The
  entries you need are:



         rtmp  1/ddp   # Routing Table Maintenance Protocol
         nbp   2/ddp   # Name Binding Protocol
         echo  4/ddp   # AppleTalk Echo Protocol
         zip   6/ddp   # Zone Information Protocol



  The next step is to create the Appletalk configuration files in the
  /usr/local/atalk/etc directory (or wherever you installed the
  package).
  The first file to create is the /usr/local/atalk/etc/atalkd.conf file.
  Initially this file needs only one line that gives the name of the
  network device that supports the network that your Apple machines are
  on:



         eth0



  The Appletalk daemon program will add extra details after it is run.

  11.2.2.  Exporting a Linux filesystems via Appletalk.

  You can export filesystems from your linux machine to the network so
  that Apple machine on the network can share them.

  To do this you must configure the
  /usr/local/atalk/etc/AppleVolumes.system file. There is another
  configuration file called /usr/local/atalk/etc/AppleVolumes.default
  which has exactly the same format and describes which filesystems
  users connecting with guest privileges will receive.

  Full details on how to configure these files and what the various
  options are can be found in the afpd man page.

  A simple example might look like:



         /tmp Scratch
         /home/ftp/pub "Public Area"



  Which would export your /tmp filesystem as AppleShare Volume `Scratch'
  and your ftp public directory as AppleShare Volume `Public Area'.  The
  volume names are not mandatory, the daemon will choose some for you,
  but it won't hurt to specify them anyway.

  11.2.3.  Sharing your Linux printer across Appletalk.

  You can share your linux printer with your Apple machines quite
  simply.  You need to run the papd program which is the Appletalk
  Printer Access Protocol Daemon. When you run this program it will
  accept requests from your Apple machines and spool the print job to
  your local line printer daemon for printing.

  You need to edit the /usr/local/atalk/etc/papd.conf file to configure
  the daemon. The syntax of this file is the same as that of your usual
  /etc/printcap file. The name you give to the definition is registered
  with the Appletalk naming protocol, NBP.

  A sample configuration might look like:



    TricWriter:\
       :pr=lp:op=cg:



  Which would make a printer named `TricWriter' available to your
  Appletalk network and all accepted jobs would be printed to the linux
  printer `lp' (as defined in the /etc/printcap file) using lpd. The
  entry `op=cg' says that the linux user `cg' is the operator of the
  printer.

  11.2.4.  Starting the appletalk software.

  Ok, you should now be ready to test this basic configuration. There is
  an rc.atalk file supplied with the netatalk package that should work
  ok for you, so all you should have to do is:



               root# /usr/local/atalk/etc/rc.atalk



  and all should startup and run ok. You should see no error messages
  and the software will send messages to the console indicating each
  stage as it starts.

  11.2.5.  Testing the appletalk software.

  To test that the software is functioning properly, go to one of your
  Apple machines, pull down the Apple menu, select the Chooser, click on
  AppleShare, and your Linux box should appear.

  11.2.6.  Caveats of the appletalk software.



  o  You may need to start the Appletalk support before you configure
     your IP network. If you have problems starting the Appletalk
     programs, or if after you start them you have trouble with your IP
     network, then try starting the Appletalk software before you run
     your /etc/rc.d/rc.inet1 file.

  o  The afpd (Apple Filing Protocol Daemon) severely messes up your
     hard disk. Below the mount points it creates a couple of
     directories called ``.AppleDesktop'' and Network Trash Folder.
     Then, for each directory you access it will create a .AppleDouble
     below it so it can store resource forks, etc. So think twice before
     exporting /, you will have a great time cleaning up afterwards.

  o  The afpd program expects clear text passwords from the Macs.
     Security could be a problem, so be very careful when you run this
     daemon on a machine connected to the Internet, you have yourself to
     blame if somebody nasty does something bad.

  o  The existing diagnostic tools such as netstat and ifconfig don't
     support Appletalk. The raw information is available in the
     /proc/net/ directory if you need it.


  11.2.7.  More information

  For a much more detailed description of how to configure Appletalk for
  Linux refer to Anders Brownworth Linux Netatalk-HOWTO page at
  thehamptons.com.

  11.3.  ATM

  Werner Almesberger <werner.almesberger@lrc.di.epfl.ch> is managing a
  project to provide Asynchronous Transfer Mode support for Linux.
  Current information on the status of the project may be obtained from:
  lrcwww.epfl.ch.

  11.4.  AX25 ( AF_AX25 )

  AX.25 device names are `sl0', `sl1', etc. in 2.0.* kernels or `ax0',
  `ax1', etc. in 2.1.* kernels.

  Kernel Compile Options:


               Networking options  --->
                   [*] Amateur Radio AX.25 Level 2



  The AX25, Netrom and Rose protocols are covered by the AX25-HOWTO.
  These protocols are used by Amateur Radio Operators world wide in
  packet radio experimentation.

  Most of the work for implementation of these protocols has been done
  by Jonathon Naylor, jsn@cs.nott.ac.uk.


  11.5.  DECNet

  Support for DECNet is currently being worked on. You should expect it
  to appear in a late 2.1.* kernel.


  11.6.  FDDI

  FDDI device names are `fddi0', `fddi1', `fddi2' etc. The first card
  detected by the kernel is assigned `fddi0' and the rest are assigned
  sequentially in the order they are detected.

  Larry Stefani, lstefani@ultranet.com, has developed a driver for the
  Digital Equipment Corporation FDDI EISA and PCI cards.

  Kernel Compile Options:


               Network device support  --->
                   [*] FDDI driver support
                   [*] Digital DEFEA and DEFPA adapter support



  When you have your kernel built to support the FDDI driver and
  installed, configuration of the FDDI interface is almost identical to
  that of an ethernet interface. You just specify the appropriate FDDI
  interface name in the ifconfig and route commands.

  11.7.  Frame Relay

  The Frame Relay device names are `dlci00', `dlci01' etc for the DLCI
  encapsulation devices and `sdla0', `sdla1' etc for the FRAD(s).

  Frame Relay is a new networking technology that is designed to suit
  data communications traffic that is of a `bursty' or intermittent
  nature. You connect to a Frame Relay network using a Frame Relay
  Access Device (FRAD).  The Linux Frame Relay supports IP over Frame
  Relay as described in RFC-1490.

  Kernel Compile Options:


               Network device support  --->
                   <*> Frame relay DLCI support (EXPERIMENTAL)
                   (24)   Max open DLCI
                   (8)   Max DLCI per device
                   <*>   SDLA (Sangoma S502/S508) support



     Mike McLagan, mike.mclagan@linux.org, developed the Frame Relay
     support and configuration tools.

     Currently the only FRAD I know of that are supported are the
     Sangoma Technologies S502A, S502E and S508.  and the Emerging
     Technologies. The Emerging Technologies website is here.


     I would like to state something here. I have personal experience
     with Emerging Technologies and I do not reccomend them. I found
     them to be very unprofessional and extremely rude. If anyone else
     has had a good experience with them I would like to know. I will
     say this for them, their product is flexible and appears to be
     stable.

     To configure the FRAD and DLCI devices after you have rebuilt your
     kernel you will need the Frame Relay configuration tools. These are
     available from ftp.invlogic.com.

     Compiling and installing the tools is straightforward, but the lack
     of a top level Makefile makes it a fairly manual process:



                  user% tar xvfz .../frad-0.15.tgz
                  user% cd frad-0.15
                  user% for i in common dlci frad; make -C $i clean; make -C $i; done
                  root# mkdir /etc/frad
                  root# install -m 644 -o root -g root bin/*.sfm /etc/frad
                  root# install -m 700 -o root -g root frad/fradcfg /sbin
                  rppt# install -m 700 -o root -g root dlci/dlcicfg /sbin



     Note that the previous commands use sh syntax, if you use a csh
     flavour instead (like tcsh), the for loop will look different.

     After installing the tools you need to create an
     /etc/frad/router.conf file. You can use this template, which is a
     modified version of one of the example files:



     # /etc/frad/router.conf
     # This is a template configuration for frame relay.
     # All tags are included. The default values are based on the code
     # supplied with the DOS drivers for the Sangoma S502A card.
     #
     # A '#' anywhere in a line constitutes a comment
     # Blanks are ignored (you can indent with tabs too)
     # Unknown [] entries and unknown keys are ignored
     #

     [Devices]
     Count=1                 # number of devices to configure
     Dev_1=sdla0             # the name of a device
     #Dev_2=sdla1            # the name of a device

     # Specified here, these are applied to all devices and can be overridden for
     # each individual board.
     #
     Access=CPE
     Clock=Internal
     KBaud=64
     Flags=TX
     #
     # MTU=1500              # Maximum transmit IFrame length, default is 4096
     # T391=10               # T391 value    5 - 30, default is 10
     # T392=15               # T392 value    5 - 30, default is 15
     # N391=6                # N391 value    1 - 255, default is 6
     # N392=3                # N392 value    1 - 10, default is 3
     # N393=4                # N393 value    1 - 10, default is 4

     # Specified here, these set the defaults for all boards
     # CIRfwd=16             # CIR forward   1 - 64
     # Bc_fwd=16             # Bc forward    1 - 512
     # Be_fwd=0              # Be forward    0 - 511
     # CIRbak=16             # CIR backward  1 - 64
     # Bc_bak=16             # Bc backward   1 - 512
     # Be_bak=0              # Be backward   0 - 511


     #
     #
     # Device specific configuration
     #
     #

     #
     # The first device is a Sangoma S502E
     #
     [sdla0]
     Type=Sangoma            # Type of the device to configure, currently only
                             # SANGOMA is recognized
     #
     # These keys are specific to the 'Sangoma' type
     #
     # The type of Sangoma board - S502A, S502E, S508
     Board=S502E
     #
     # The name of the test firmware for the Sangoma board
     # Testware=/usr/src/frad-0.10/bin/sdla_tst.502
     #
     # The name of the FR firmware
     # Firmware=/usr/src/frad-0.10/bin/frm_rel.502
     #
     Port=360                # Port for this particular card
     Mem=C8                  # Address of memory window, A0-EE, depending on card
     IRQ=5                   # IRQ number, do not supply for S502A
     DLCIs=1                 # Number of DLCI's attached to this device
     DLCI_1=16               # DLCI #1's number, 16 - 991
     # DLCI_2=17
     # DLCI_3=18
     # DLCI_4=19
     # DLCI_5=20
     #
     # Specified here, these apply to this device only,
     # and override defaults from above
     #
     # Access=CPE            # CPE or NODE, default is CPE
     # Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
     # Clock=Internal        # External or Internal, default is Internal
     # Baud=128              # Specified baud rate of attached CSU/DSU
     # MTU=2048              # Maximum transmit IFrame length, default is 4096
     # T391=10               # T391 value    5 - 30, default is 10
     # T392=15               # T392 value    5 - 30, default is 15
     # N391=6                # N391 value    1 - 255, default is 6
     # N392=3                # N392 value    1 - 10, default is 3
     # N393=4                # N393 value    1 - 10, default is 4

     #
     # The second device is some other card
     #
     # [sdla1]
     # Type=FancyCard        # Type of the device to configure.
     # Board=                # Type of Sangoma board
     # Key=Value             # values specific to this type of device


     #
     # DLCI Default configuration parameters
     # These may be overridden in the DLCI specific configurations
     #
     CIRfwd=64               # CIR forward   1 - 64
     # Bc_fwd=16             # Bc forward    1 - 512
     # Be_fwd=0              # Be forward    0 - 511
     # CIRbak=16             # CIR backward  1 - 64
     # Bc_bak=16             # Bc backward   1 - 512
     # Be_bak=0              # Be backward   0 - 511

     #
     # DLCI Configuration
     # These are all optional. The naming convention is
     # [DLCI_D<devicenum>_<DLCI_Num>]
     #

     [DLCI_D1_16]
     # IP=
     # Net=
     # Mask=
     # Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
     # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
     # CIRfwd=64
     # Bc_fwd=512
     # Be_fwd=0
     # CIRbak=64
     # Bc_bak=512
     # Be_bak=0

     [DLCI_D2_16]
     # IP=
     # Net=
     # Mask=
     # Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
     # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
     # CIRfwd=16
     # Bc_fwd=16
     # Be_fwd=0
     # CIRbak=16
     # Bc_bak=16
     # Be_bak=0



     When you've built your /etc/frad/router.conf file the only step
     remaining is to configure the actual devices themselves. This is
     only a little trickier than a normal network device configuration,
     you need to remember to bring up the FRAD device before the DLCI
     encapsulation devices. These commands are best hosted in a shell
     script, due to their number:



                  #!/bin/sh
                  # Configure the frad hardware and the DLCI parameters
                  /sbin/fradcfg /etc/frad/router.conf || exit 1
                  /sbin/dlcicfg file /etc/frad/router.conf
                  #
                  # Bring up the FRAD device
                  ifconfig sdla0 up
                  #
                  # Configure the DLCI encapsulation interfaces and routing
                  ifconfig dlci00 192.168.10.1 pointopoint 192.168.10.2 up
                  route add -net 192.168.10.0 netmask 255.255.255.0 dlci00
                  #
                  ifconfig dlci01 192.168.11.1 pointopoint 192.168.11.2 up
                  route add -net 192.168.11.0 netmask 255.255.255.0 dlci00
                  #
                  route add default dev dlci00
                  #



  11.8.  IPX ( AF_IPX )

  The IPX protocol is most commonly utilized in Novell NetWare(tm) local
  area network environments. Linux includes support for this protocol
  and may be configured to act as a network endpoint, or as a router for
  IPX.

  Kernel Compile Options:


               Networking options  --->
                   [*] The IPX protocol
                   [ ] Full internal IPX network



  The IPX protocol and the NCPFS are covered in greater depth in the
  IPX-HOWTO.



  11.9.  NetRom ( AF_NETROM )

  NetRom device names are `nr0', `nr1', etc.

  Kernel Compile Options:


               Networking options  --->
                   [*] Amateur Radio AX.25 Level 2
                   [*] Amateur Radio NET/ROM



  The AX25, Netrom and Rose protocols are covered by the AX25-HOWTO.
  These protocols are used by Amateur Radio Operators world wide in
  packet radio experimentation.

  Most of the work for implementation of these protocols has been done
  by Jonathon Naylor, jsn@cs.nott.ac.uk.

  11.10.  Rose protocol ( AF_ROSE )

  Rose device names are `rs0', `rs1', etc. in 2.1.* kernels.  Rose is
  available in the 2.1.* kernels.

  Kernel Compile Options:


               Networking options  --->
                   [*] Amateur Radio AX.25 Level 2
                   <*> Amateur Radio X.25 PLP (Rose)



  The AX25, Netrom and Rose protocols are covered by the AX25-HOWTO.
  These protocols are used by Amateur Radio Operators world wide in
  packet radio experimentation.

  Most of the work for implementation of these protocols has been done
  by Jonathon Naylor, jsn@cs.nott.ac.uk.

  11.11.  SAMBA - `NetBEUI', `NetBios', `CIFS' support.

  SAMBA is an implementation of the Session Management Block protocol.
  Samba allows Microsoft and other systems to mount and use your disks
  and printers.

  SAMBA and its configuration are covered in detail in the SMB-HOWTO.

  11.12.  STRIP support (Starmode Radio IP)

  STRIP device names are `st0', `st1', etc.

  Kernel Compile Options:



          Network device support  --->
                  [*] Network device support
                  ....
                  [*] Radio network interfaces
                  < > STRIP (Metricom starmode radio IP)



  STRIP is a protocol designed specifically for a range of Metricom
  radio modems for a research project being conducted by Stanford
  University called the MosquitoNet Project.  There is a lot of
  interesting reading here, even if you aren't directly interested in
  the project.

  The Metricom radios connect to a serial port, employ spread spectrum
  technology and are typically capable of about 100kbps.  Information on
  the Metricom radios is available from the: Metricom Web Server.

  At present the standard network tools and utilities do not support the
  STRIP driver, so you will have to download some customized tools from
  the MosquitoNet web server. Details on what software you need is
  available at the: MosquitoNet STRIP Page.

  A summary of configuration is that you use a modified slattach program
  to set the line discipline of a serial tty device to STRIP and then
  configure the resulting `st[0-9]' device as you would for ethernet
  with one important exception, for technical reasons STRIP does not
  support the ARP protocol, so you must manually configure the ARP
  entries for each of the hosts on your subnet. This shouldn't prove too
  onerous.

  11.13.  Token Ring

  Token ring device names are `tr0', `tr1' etc. Token Ring is an IBM
  standard LAN protocol that avoids collisions by providing a mechanism
  that allows only one station on the LAN the right to transmit at a
  time.  A `token' is held by one station at a time and the station
  holding the token is the only station allowed to transmit. When it has
  transmitted its data it passes the token onto the next station. The
  token loops amongst all active stations, hence the name `Token Ring'.

  Kernel Compile Options:


               Network device support  --->
                       [*] Network device support
                       ....
                       [*] Token Ring driver support
                       < > IBM Tropic chipset based adaptor support



  Configuration of token ring is identical to that of ethernet with the
  exception of the network device name to configure.

  11.14.  X.25

  X.25 is a circuit based packet switching protocol defined by the
  C.C.I.T.T. (a standards body recognized by Telecommunications
  companies in most parts of the world). An implementation of X.25 and
  LAPB are being worked on and recent 2.1.* kernels include the work in
  progress.

  Jonathon Naylor jsn@cs.nott.ac.uk is leading the development and a
  mailing list has been established to discuss Linux X.25 related
  matters.  To subscribe send a message to: majordomo@vger.rutgers.edu
  with the text "subscribe linux-x25" in the body of the message.

  Early versions of the configuration tools may be obtained from
  Jonathon's ftp site at ftp.cs.nott.ac.uk.

  11.15.  WaveLan Card

  Wavelan device names are `eth0', `eth1', etc.

  Kernel Compile Options:


       Network device support  --->
               [*] Network device support
               ....
               [*] Radio network interfaces
               ....
               <*> WaveLAN support



  The WaveLAN card is a spread spectrum wireless lan card. The card
  looks very like an ethernet card in practice and is configured in much
  the same way.

  You can get information on the Wavelan card from Wavelan.com.

  12.  Cables and Cabling

  Those of you handy with a soldering iron may want to build your own
  cables to interconnect two linux machines. The following cabling
  diagrams should assist you in this.

  12.1.  Serial NULL Modem cable

  Not all NULL modem cables are alike. Many null modem cables do little
  more than trick your computer into thinking all the appropriate
  signals are present and swap transmit and receive data. This is ok but
  means that you must use software flow control (XON/XOFF) which is less
  efficient than hardware flow control. The following cable provides the
  best possible signalling between machines and allows you to use
  hardware (RTS/CTS) flow control.


       Pin Name  Pin                               Pin
       Tx Data    2  -----------------------------  3
       Rx Data    3  -----------------------------  2
       RTS        4  -----------------------------  5
       CTS        5  -----------------------------  4
       Ground     7  -----------------------------  7
       DTR        20 -\---------------------------  8
       DSR        6  -/
       RLSD/DCD   8  ---------------------------/-  20
                                                \-  6



  12.2.  Parallel port cable (PLIP cable)

  If you intend to use the PLIP protocol between two machines then this
  cable will work for you irrespective of what sort of parallel ports
  you have installed.


       Pin Name    pin            pin
       STROBE      1*
       D0->ERROR   2  ----------- 15
       D1->SLCT    3  ----------- 13
       D2->PAPOUT  4  ----------- 12
       D3->ACK     5  ----------- 10
       D4->BUSY    6  ----------- 11
       D5          7*
       D6          8*
       D7          9*
       ACK->D3     10 ----------- 5
       BUSY->D4    11 ----------- 6
       PAPOUT->D2  12 ----------- 4
       SLCT->D1    13 ----------- 3
       FEED        14*
       ERROR->D0   15 ----------- 2
       INIT        16*
       SLCTIN      17*
       GROUND      25 ----------- 25



  Notes:

  o  Do not connect the pins marked with an asterisk `*'.

  o  Extra grounds are 18,19,20,21,22,23 and 24.

  o  If the cable you are using has a metallic shield, it should be
     connected to the metallic DB-25 shell at one end only.

     Warning: A miswired PLIP cable can destroy your controller card. Be
     very careful and double check every connection to ensure you don't
     cause yourself any unnecessary work or heartache.

  While you may be able to run PLIP cables for long distances, you
  should avoid it if you can. The specifications for the cable allow for
  a cable length of about 1 metre or so. Please be very careful when
  running long plip cables as sources of strong electromagnetic fields
  such as lightning, power lines and radio transmitters can interfere
  with and sometimes even damage your controller. If you really want to
  connect two of your computers over a large distance you really should
  be looking at obtaining a pair of thin-net ethernet cards and running
  some coaxial cable.

  12.3.  10base2 (thin coax) Ethernet Cabling

  10base2 is an ethernet cabling standard that specifies the use of 50
  ohm coaxial cable with a diameter of about 5 millimeters. There are a
  couple of important rules to remember when interconnecting machines
  with 10base2 cabling.  The first is that you must use terminators at
  both ends of the cabling.  A terminator is a 50 ohm resistor that
  helps to ensure that the signal is absorbed and not reflected when it
  reaches the end of the cable. Without a terminator at each end of the
  cabling you may find that the ethernet is unreliable or doesn't work
  at all. Normally you'd use `T pieces' to interconnect the machines, so
  that you end up with something that looks like:
        |==========T=============T=============T==========T==========|
                   |             |             |          |
                   |             |             |          |
                 -----         -----         -----      -----
                 |   |         |   |         |   |      |   |
                 -----         -----         -----      -----



  where the `|' at either end represents a terminator, the `======' rep-
  resents a length of coaxial cable with BNC plugs at either end and the
  `T' represents a `T piece' connector. You should keep the length of
  cable between the `T piece' and the actual ethernet card in the PC as
  short as possible, ideally the `T piece' will be plugged directly into
  the ethernet card.

  12.4.  Twisted Pair Ethernet Cable

  If you have only two twisted pair ethernet cards and you wish to
  connect them you do not require a hub. You can cable the two cards
  directly together.  A diagram showing how to do this is included in
  the Ethernet-HOWTO

  13.  Glossary of Terms used in this document.

  The following is a list of some of the most important terms used in
  this document.


     ARP
        This is an acronym for the Address Resolution Protocol and this
        is how a network machine associates an IP Address with a
        hardware address.


     ATM
        This is an acronym for Asynchronous Transfer Mode.  An ATM
        network packages data into standard size blocks which it can
        convey efficiently from point to point. ATM is a circuit
        switched packet network technology.


     client
        This is usually the piece of software at the end of a system
        where the user is. There are exceptions to this, for example, in
        the X11 window system it is actually the server with the user
        and the client runs on the remote machine. The client is the
        program or end of a system that is receiving the service
        provided by the server. In the case of peer to peer systems such
        as slip or ppp the client is taken to be the end that initiates
        the connection and the remote end, being called, is taken to be
        the server.


     datagram
        A datagram is a discrete package of data and headers which
        contain addresses, which is the basic unit of transmission
        across an IP network. You might also hear this called a
        `packet'.


     DLCI
        The DLCI is the Data Link Connection Identifier and is used to
        identify a unique virtual point to point connection via a Frame
        Relay network. The DLCI's are normally assigned by the Frame
        Relay network provider.


     Frame Relay
        Frame Relay is a network technology ideally suited to carrying
        traffic that is of bursty or sporadic nature. Network costs are
        reduced by having many Frame Relay customer sharing the same
        network capacity and relying on them wanting to make use of the
        network at slightly different times.


     Hardware address
        This is a number that uniquely identifies a host in a physical
        network at the media access layer. Examples of this are Ethernet
        Addresses and AX.25 Addresses.


     ISDN
        This is an acronym for Integrated Services Digital Network. ISDN
        provides a standardized means by which Telecommunications
        companies may deliver either voice or data information to a
        customers premises.  Technically ISDN is a circuit switched data
        network.


     ISP
        This is an acronym of Internet Service Provider. These are
        organizations or companies that provide people with network
        connectivity to the Internet.


     IP address
        This is a number that uniquely identifies a TCP/IP host on the
        network. The address is 4 bytes long and is usually represented
        in what is called the "dotted decimal notation", where each byte
        is represented in decimal from with dots `.' between them.


     MSS
        The Maximum Segment Size (MSS) is the largest quantity of data
        that can be transmitted at one time. If you want to prevent
        local fragmentation MSS would equal MTU-IP header.


     MTU
        The Maximum Transmission Unit (MTU) is a parameter that
        determines the largest datagram than can be transmitted by an IP
        interface without it needing to be broken down into smaller
        units. The MTU should be larger than the largest datagram you
        wish to transmit unfragmented. Note, this only prevents
        fragmentation locally, some other link in the path may have a
        smaller MTU and the datagram will be fragmented there. Typical
        values are 1500 bytes for an ethernet interface, or 576 bytes
        for a SLIP interface.


     route
        The route is the path that your datagrams take through the
        network to reach their destination.


     server
        This is usually the piece of software or end of a system remote
        from the user. The server provides some service to one or many
        clients.  Examples of servers include ftp, Networked File
        System, or Domain Name Server. In the case of peer to peer
        systems such as slip or ppp the server is taken to be the end of
        the link that is called and the end calling is taken to be the
        client.


     window
        The window is the largest amount of data that the receiving end
        can accept at a given point in time.

  14.  Authors


  14.1.  Current

  Joshua D. Drake

  14.2.  Past

  Terry Dawson Alessandro Rubini

  15.  Copyright.

  Copyright Information

  The NET-3/4-HOWTO,NET-3, and Networking-HOWTO, information on how to
  install and configure networking support for Linux. Copyright (c) 1997
  Terry Dawson, 1998 Alessandro Rubini, 1999 Joshua D. Drake {POET} -
  http://www.linuxports.com/

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version. This program is distributed in the
  hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  PURPOSE. See the GNU General Public License for more details. You
  should have received a copy of the GNU General Public License along
  with this program; if not, write to the: Free Software Foundation,
  Inc., 675 Mass Ave, Cambridge, MA 02139, USA.



  The Linux Networking Overview HOWTO
  Daniel Lopez Ridruejo, ridruejo@rawbyte.com
  v0.32, 8 July 2000

  The purpose of this document is to give an overview of the networking
  capabilities of the Linux Operating System and to provide pointers for
  further information and implementation details.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

  2. Linux.

     2.1 What is Linux?
     2.2 What makes Linux different?

  3. Networking protocols

     3.1 TCP/IP
     3.2 TCP/IP version 6
     3.3 IPX/SPX
     3.4 AppleTalk Protocol Suite
     3.5 WAN Networking: X.25, Frame-relay, etc...
     3.6 ISDN
     3.7 PPP, SLIP, PLIP
     3.8 Amateur Radio
     3.9 ATM

  4. Networking hardware supported

  5. File Sharing and Printing

     5.1 Apple environment
     5.2 Windows Environment
     5.3 Novell Environment
     5.4 Unix Environment

  6. Internet/Intranet

     6.1 Mail
        6.1.1 Mail servers
        6.1.2 Remote access to mail
        6.1.3 Mail User Agents
        6.1.4 Mailing list software
        6.1.5 Fetchmail
     6.2 Web Servers
     6.3 Web Browsers
     6.4 FTP Servers and clients
     6.5 News service
     6.6 Domain Name System
     6.7 DHCP, bootp
     6.8 NIS
     6.9 Authentication

  7. Remote execution of applications

     7.1 Telnet
     7.2 Remote commands
     7.3 The X Window System
     7.4 VNC

  8. Network Interconnection

     8.1 Router
     8.2 Bridge
     8.3 IP Masquerade
     8.4 IP Accounting
     8.5 IP aliasing
     8.6 Traffic Shaping
     8.7 Firewall
     8.8 Port forwarding
     8.9 Load Balancing
     8.10 EQL
     8.11 Proxy Server
     8.12 Diald on demand
     8.13 Tunnelling, mobile IP and virtual private networks

  9. Network Management

     9.1 Network management applications
     9.2 SNMP

  10. Enterprise Linux Networking

     10.1 High Availability
     10.2 RAID
     10.3 Redundant networking

  11. Sources of Information

  12. Document history

  13. Acknowledgements and disclaimer



  ______________________________________________________________________

  1.  Introduction


  The purpose of this document is to give an overview of the networking
  capabilities of the Linux operating system. Although one of the
  strengths of Linux is that plenty of information exists for nearly
  every component of it, most of this information is focused on
  implementation. New Linux users, particularly those coming from a
  Windows environment, are often unaware of the networking possibilities
  of Linux. This document aims to show a general picture of such
  possibilities with a brief description of each one and pointers for
  further information. The information has been gathered from many
  sources: HOWTOs, faqs, projects' web pages and my own hands-on
  experience. Full credit is given to the authors of these other
  sources. Without them and their programs this document would have not
  been possible or necessary.


  2.  Linux.


  2.1.  What is Linux?

  The primary author of Linux is Linus Torvalds. Since his original
  versions, it has been improved by countless numbers of people. It is a
  clone, written entirely from scratch, of the Unix operating system.
  One of the more interesting facts about Linux is that its development
  occurs simultaneously around the world.

  Linux has been copyrighted under the terms of the GNU General Public
  License (GPL). This is a license written by the Free Software
  Foundation (FSF) that is designed to prevent people from restricting
  the distribution of software. In brief, it says that although money
  can be charged for a copy, the person who received the copy can not be
  prevented from giving it away for free. It also means that the source
  code must be available. This is useful for programmers. Anybody can
  modify Linux and even distribute his/her modifications, provided that
  they keep the code under the same copyright.



  2.2.  What makes Linux different?

  Why work on Linux? Linux is generally cheaper (or at least no more
  expensive) than other operating systems and is frequently less
  problematic than many commercial systems. But what makes Linux
  different is not its price (after all, why would anyone want an OS -
  even a free one - if it is not good enough?) but its outstanding
  capabilities:


    Linux is a true 32-bit multitasking operating system, robust and
     capable enough to be used in organizations ranging from
     universities to large corporations.

    It runs on hardware ranging from low-end 386 boxes to massive
     ultra-parallel machines in research centres.

    Out-of-the-box versions are available for Intel, Sparc, and Alpha
     architectures, and experimental support exists for Power PC and
     embedded systems, among others such as SGI, Ultra Sparc, AP1000+,
     Strong ARM, and MIPS R3000/R4000.

    Finally, when it comes to networking, Linux is choice. Not only
     because networking is tightly integrated with the OS itself and a
     plethora of applications is freely available, but for the
     robustness under heavy loads that can only be achieved after years
     of debugging and testing in an Open Source project.


  3.  Networking protocols


  Linux supports many different networking protocols:


  3.1.  TCP/IP


  The Internet Protocol was originally developed two decades ago for the
  United States Department of Defense (DoD), mainly for the purpose of
  interconnecting different-brand computers. The TCP/IP suite of
  protocols allowed, through its layered structure, to insulate
  applications from networking hardware.

  Although it is based on a layered model, it is focused more on
  delivering interconnectivity than on rigidly adhering to functional
  layers. This is one of the reasons why TCP/IP has become the de facto
  standard internetworking protocol as opposed to OSI.

  TCP/IP networking has been present in Linux since its beginnings. It
  has been implemented from scratch. It is one of the most robust, fast
  and reliable implementations and is one of the key factors of the
  success of Linux.

  Related HOWTO: http://metalab.unc.edu/mdw/HOWTO/NET3-4-HOWTO.html


  3.2.  TCP/IP version 6


  IPv6, sometimes also referred to as IPng (IP Next Generation) is an
  upgrade to the IPv4 protocol in order to address many issues. These
  issues include: shortage of available IP addresses, lack of mechanisms
  to handle time-sensitive traffic, lack of network layer security, etc.


  The larger name space will be accompanied by an improved addressing
  scheme, which will have a great impact on routing performance.  A beta
  implementation exists for Linux, and a production version is expected
  for the 2.2.0 Linux kernel release.

    Linux IPv6 HOWTO:http://www.wcug.wwu.edu/ipv6/faq/


  3.3.  IPX/SPX

  IPX/SPX (Internet Packet Exchange/Sequenced Packet Exchange) is a
  proprietary protocol stack developed by Novell and based on the Xerox
  Network Systems (XNS) protocol. IPX/SPX became prominent during the
  early 1980s as an integral part of Novell, Inc.'s NetWare. NetWare
  became the de facto standard network operating system (NOS) of first
  generation LANs. Novell complemented its NOS with a business-oriented
  application suite and client-side connection utilities.

  Linux has a very clean IPX/SPX implementation, allowing it to be
  configured as an:

    IPX router

    IPX bridge

    NCP client and/or NCP Server (for sharing files)

    Novell Print Client, Novell Print Server

     And to:

    Enable PPP/IPX, allowing a Linux box to act as a PPP server/client

    Perform IPX tunnelling through IP, allowing the connection of two
     IPX networks through an IP only link

  Additionally, Caldera <http://www.caldera.com> offers commercial
  support for Novell NetWare under Linux. Caldera provides a fully
  featured Novell NetWare client built on technology licensed from
  Novell Corporation. The client provides full client access to Novell
  3.x and 4.x fileservers and includes features such as NetWare
  Directory Service (NDS) and RSA encryption.


    IPX HOWTO: http://metalab.unc.edu/mdw/HOWTO/IPX-HOWTO.html


  3.4.  AppleTalk Protocol Suite

  Appletalk is the name of Apple's internetworking stack. It allows a
  peer-to-peer network model which provides basic functionality such as
  file and printer sharing. Each machine can simultaneously act as a
  client and a server, and the software and hardware necessary are
  included with every Apple computer.

  Linux provides full Appletalk networking. Netatalk is a kernel-level
  implementation of the AppleTalk Protocol Suite, originally for BSD-
  derived systems. It includes support for routing AppleTalk, serving
  Unix and AFS filesystems over AFP (AppleShare), serving Unix printers
  and accessing AppleTalk printers over PAP.

  See section 5.1 for more information.



  3.5.  WAN Networking: X.25, Frame-relay, etc...

  Several third parties provide T-1, T-3, X.25 and Frame Relay products
  for Linux. Generally special hardware is required for these types of
  connections. Vendors that provide the hardware also provide the
  drivers with protocol support.


    WAN resources for Linux:
     http://www.secretagent.com/networking/wan.html



  3.6.  ISDN

  The Linux kernel has built-in ISDN capabilies. Isdn4linux controls
  ISDN PC cards and can emulate a modem with the Hayes command set ("AT"
  commands). The possibilities range from simply using a terminal
  program to connections via HDLC (using included devices) to full
  connection to the Internet with PPP to audio applications.


    FAQ for isdn4linux: http://ww.isdn4linux.de/faq/



  3.7.  PPP, SLIP, PLIP

  The Linux kernel has built-in support for PPP (Point-to-Point-
  Protocol), SLIP (Serial Line IP) and PLIP (Parallel Line IP). PPP is
  the most popular way individual users access their ISPs (Internet
  Service Providers). PLIP allows the cheap connection of two machines.
  It uses a parallel port and a special cable, achieving speeds of
  10kBps to 20kBps.


    Linux PPP HOWTO <http://metalab.unc.edu/mdw/HOWTO/PPP-HOWTO.html>

    PPP/SLIP emulator <http://metalab.unc.edu/mdw/HOWTO/mini/SLIP-PPP-
     Emulator.html>

    PLIP information can be found in The Network Administrator Guide
     <http://metalab.unc.edu/mdw/LDP/nag/nag.html>


  3.8.  Amateur Radio

  The Linux kernel has built-in support for amateur radio protocols.

  Especially interesting is the AX.25 support. The AX.25 protocol offers
  both connected and connectionless modes of operation, and is used
  either by itself for point-point links, or to carry other protocols
  such as TCP/IP and NetRom.

  It is similar to X.25 level 2 in structure, with some extensions to
  make it more useful in the amateur radio environment.

    Amateur radio on Linux web site <http://radio.linux.org.au/>


  3.9.  ATM

  ATM support for Linux is currently in pre-alpha stage. There is an
  experimental release, which supports raw ATM connections (PVCs and
  SVCs), IP over ATM, LAN emulation...
    Linux ATM-Linux home page <http://lrcwww.epfl.ch/linux-atm/>


  4.  Networking hardware supported

  Linux supports a great variety of networking hardware, including some
  obsolete equipment.

  Some interesting documents:

    Hardware HOWTO <http://metalab.unc.edu/mdw/HOWTO/Hardware-
     HOWTO.html>

    Ethernet HOWTO <http://metalab.unc.edu/mdw/HOWTO/Ethernet-
     HOWTO.html>


  5.  File Sharing and Printing

  The primary purpose of many PC based Local Area Networks is to provide
  file and printer sharing services to the users. Linux as a corporate
  file and print server turns out to be a great solution.


  5.1.  Apple environment

  As outlined in previous sections, Linux supports the Appletalk family
  of protocols. Linux netatalk allows Macintosh clients to see Linux
  Systems as another Macintosh on the network, share files and use
  printers connected to Linux servers.

  Netatalk faq and HOWTO:

    http://thehamptons.com/anders/netatalk/

    http://www.umich.edu/~rsug/netatalk/

    http://www.umich.edu/~rsug/netatalk/faq.html


  5.2.  Windows Environment

  Samba is a suite of applications that allow most Unices (and in
  particular Linux) to integrate into a Microsoft network both as a
  client and a server. Acting as a server it allows Windows 95, Windows
  for Workgroups, DOS and Windows NT clients to access Linux files and
  printing services. It can completely replace Windows NT for file and
  printing services, including the automatic downloading of printer
  drivers to clients. Acting as a client allows the Linux workstation to
  mount locally exported windows file shares.

  According to the SAMBA Meta-FAQ:



       "Many users report that compared to other SMB implementations Samba is more stable,
       faster, and compatible with more clients. Administrators of some large installations say
       that Samba is the only SMB server available which will scale to many tens of thousands
       of users without crashing"



    Samba project home page <http://samba.anu.edu.au/samba/>

    SMB HOWTO <http://metalab.unc.edu/mdw/HOWTO/SMB-HOWTO.html>

    Printing HOWTO <http://metalab.unc.edu/mdw/HOWTO/Printing-
     HOWTO.html>


  5.3.  Novell Environment

  As stated in previous sections, Linux can be configured to act as an
  NCP client or server, thus allowing file and printing services over a
  Novell network for both Novell and Unix clients.


    IPX HOWTO <http://metalab.unc.edu/mdw/HOWTO/IPX-HOWTO.html>


  5.4.  Unix Environment

  The preferred way to share files in a Unix networking environment is
  through NFS. NFS stands for Network File Sharing and it is a protocol
  originally developed by Sun Microsystems. It is a way to share files
  between machines as if they were local. A client "mounts" a filesystem
  "exported" by an NFS server. The mounted filesystem will appear to the
  client machine as if it was part of the local filesystem.

  It is possible to mount the root filesystem at startup time, thus
  allowing diskless clients to boot up and access all files from a
  server. In other words, it is possible to have a fully functional
  computer without a hard disk.

  Coda is a network filesystem (like NFS) that supports disconnected
  operation, persistant caching, among other goodies.  It's included in
  2.2.x kernels. Really handy for slow or unreliable networks and
  laptops.

  NFS-related documents:

    http://metalab.unc.edu/mdw/HOWTO/mini/NFS-Root.html

    http://metalab.unc.edu/mdw/HOWTO/Diskless-HOWTO.html

    http://metalab.unc.edu/mdw/HOWTO/mini/NFS-Root-Client-mini-
     HOWTO/index.html

    http://www.redhat.com/support/docs/rhl/NFS-Tips/NFS-Tips.html

    http://metalab.unc.edu/mdw/HOWTO/NFS-HOWTO.html

     CODA can be found at: http://www.coda.cs.cmu.edu/

  6.  Internet/Intranet

  Linux is a great platform to act as an Intranet / Internet server. The
  term Intranet refers to the application of Internet technologies
  inside an organisation mainly for the purpose of distributing and
  making available information inside the company. Internet and Intranet
  services offered by Linux include mail, news, WWW servers and many
  more that will be outlined in the next sections.


  6.1.  Mail



  6.1.1.  Mail servers

  Sendmail is the de facto standard mail server program (called an MTA,
  or Mail Transport Agent) for Unix platforms. It is robust, scalable,
  and properly configured and with the necessary hardware, can handle
  loads of thousands of users without blinking.  Alternative mail
  servers, such as smail and qmail, are also available.


    Sendmail web site <http://www.sendmail.org/>

    Smail faq <http://www.sbay.org/smail-faq.html>

    Qmail web site <http://www.qmail.org>

     Mail HOWTOs:

    http://metalab.unc.edu/mdw/HOWTO/Mail-User-HOWTO.html

    http://metalab.unc.edu/mdw/HOWTO/mini/Qmail+MH.html

    http://metalab.unc.edu/mdw/HOWTO/mini/Sendmail+UUCP.html

    http://metalab.unc.edu/mdw/HOWTO/mini/Mail-Queue.html


  6.1.2.  Remote access to mail

  In an organisation or ISP, users will likely access their mail
  remotely from their desktops. Several alternatives exist in Linux,
  including POP (Post Office Protocol) and IMAP (Internet Message Access
  Protocol) servers. The POP protocol is usually used to transfer
  messages from the server to the client. IMAP permits also manipulation
  of the messages in the server, remote creation and deletion of folders
  in the server, concurrent access to shared mail folders, etc.


    Brief comparison IMAP and POP
     <http://www.imap.org/imap.vs.pop.brief.html>

     Mail related HOWTOs:

    http://metalab.unc.edu/mdw/HOWTO/Mail-User-HOWTO.html

    http://metalab.unc.edu/mdw/HOWTO/Cyrus-IMAP.html


  6.1.3.  Mail User Agents

  There are a number of MUA (Mail User Agents) in Linux, both graphical
  and text mode. The most widely used ones include: pine, elm, mutt and
  Netscape.


    List of mail related software
     <http://www.linuxlinks.com/Software/Internet/Mail/>

    http://metalab.unc.edu/mdw/HOWTO/mini/TkRat.html


  6.1.4.  Mailing list software

  There are many MLM (Mail List Management) programs available for Unix
  in general and for Linux in particular.


    A good comparison of existing MLMs may be found
     at:ftp://ftp.uu.net/usenet/news.answers/mail/list-admin/

    Listserv <http://www.lsoft.com/>

    Majordomo home page <http://www.greatcircle.com/majordomo/>


  6.1.5.  Fetchmail

  One userful mail-related utility is fetchmail. Fetchmail is a free,
  full-featured, robust, well-documented remote-mail retrieval and
  forwarding utility intended to be used over on-demand TCP/IP links
  (such as SLIP or PPP connections). It supports every remote-mail
  protocol now in use on the Internet. It can even support IPv6 and
  IPSEC.

  Fetchmail retrieves mail from remote mail servers and forwards it via
  SMTP, so it can then be be read by normal mail user agents such as
  mutt, elm or BSD Mail. It allows all the system MTA's filtering,
  forwarding, and aliasing facilities to work just as they would on
  normal mail.

  Fetchmail can be used as a POP/IMAP-to-SMTP gateway for an entire DNS
  domain, collecting mail from a single drop box on an ISP and SMTP-
  forwarding it based on header addresses.

  A small company may centralise its mail in a single mailbox, configure
  fetchmail to collect all outgoing mail, send it via a single mailbox
  at their ISP and retrieve all incoming mail from the same mailbox.


    Fetchmail home page <http://www.tuxedo.org/~esr/fetchmail/>


  6.2.  Web Servers

  Most Linux distributions include Apache <http://www.apache.org>.
  Apache is the number one server on the internet according to
  http://www.netcraft.co.uk/survey/ . More than a half of all internet
  sites are running Apache or one of it derivatives. Apache's advantages
  include its modular design, stability and speed. Given the appropriate
  hardware and configuration it can support the highest loads: Yahoo,
  Altavista, GeoCities, and Hotmail are based on customized versions of
  this server.

  Optional support for SSL (which enables secure transactions) is also
  available at:

    http://www.apache-ssl.org/

    http://raven.covalent.net/

    http://www.c2.net/

  Related HOWTOs:

    http://metalab.unc.edu/mdw/HOWTO/WWW-HOWTO.html

    http://metalab.unc.edu/mdw/HOWTO/Virtual-Services-HOWTO.html

    http://metalab.unc.edu/mdw/HOWTO/Intranet-Server-HOWTO.html

    Web servers for Linux
     <http://www.linuxlinks.com/Software/Internet/WebServers/>

  6.3.  Web Browsers

  A number of web browsers exist for the Linux platform. Netscape
  Navigator has been one of the choices from the very beginning and the
  upcoming Mozilla (http://www.mozilla.org) will have a Linux version.
  Another popular text based web browser is lynx. It is fast and handy
  when no graphical environment is available.


    Browser software for Linux
     <http://www.linuxlinks.com/Software/Internet/WebBrowsers/>

    http://metalab.unc.edu/mdw/HOWTO/mini/Public-Web-Browser.html


  6.4.  FTP Servers and clients

  FTP stands for File Transfer Protocol. An FTP server allows clients to
  connect to it and retrieve (download) files. Many ftp servers and
  clients exist for Linux and are included with most distributions.
  There are text-based clients as well as GUI based ones. FTP related
  software (servers and clients) for Linux may be found at:
  http://metalab.unc.edu/pub/Linux/system/network/file-transfer/


  6.5.  News service

  Usenet (also known as news) is a big bulletin board system that covers
  all kinds of topics and it is organised hierarchically. A network of
  computers across the internet (Usenet) exchange articles through the
  NNTP protocol. Several implementations exist for Linux, either for
  heavily loaded sites or for small sites receiving only a few
  newsgroups.

    INN home page <http://www.isc.org/>

    Linux news related software
     <http://www.linuxlinks.com/Software/Internet/News/>


  6.6.  Domain Name System

  A DNS server has the job of translating names (readable by humans) to
  IP addresses. A DNS server does not know all the IP addresses in the
  world; rather, it is able to request other servers for the unknown
  addresses. The DNS server will either return the wanted IP address to
  the user or report that the name cannot be found in the tables.

  Name serving on Unix (and on the vast majority of the Internet) is
  done by a program called named.  This is a part of the bind package of
  The Internet Software Consortium.

    BIND <http://www.isc.org/>

    DNS HOWTO <http://metalab.unc.edu/mdw/HOWTO/DNS-HOWTO.html>


  6.7.  DHCP, bootp

  DHCP and bootp are protocols that allow a client machine to obtain
  network information (such as their IP number) from a server. Many
  organisations are starting to use it because it eases network
  administration, especially in large networks or networks which have
  lots of mobile users.


  Related documents:

    DHCP mini-HOWTO
     <http://metalab.unc.edu/mdw/HOWTO/mini/DHCP/index.html>


  6.8.  NIS

  The Network Information Service (NIS) provides a simple network lookup
  service consisting of databases and processes. Its purpose is to
  provide information that has to be known throughout the network to all
  machines on the network. For example, it enables an administrator to
  allow users access to any machine in a network running NIS without a
  password entry existing on each machine; only the main database needs
  to be maintained.

  Related HOWTO:

    NIS HOWTO <http://metalab.unc.edu/mdw/HOWTO/NIS-HOWTO.html>


  6.9.  Authentication

  There are also various ways of authenticating users in mixed networks.

    For Linux/Windows NT:http://www.mindware.com.au/ftp/smb-NT-
     verify.1.1.tar.gz

    The PAM (pluggable authentication module) which is a flexible
     method of Unix authentication: PAM library
     <http://www.kernel.org/pub/linux/libs/pam/index.html>.

    Finally, LDAP in Linux
     <http://www.umich.edu/~dirsvcs/ldap/index.html>

  7.  Remote execution of applications

  One of the most amazing features of Unix (yet one of the most unknown
  to new users) is its great support for remote and distributed
  execution of applications.


  7.1.  Telnet

  Telnet is a program that allows a person to use a remote computer as
  if that person were actually at the remote site. Telnet is one of the
  most powerful tools for Unix, allowing for true remote administration.
  It is also an interesting program from the point of view of users,
  because it allows remote access to all their files and programs from
  anywhere in the Internet. Combined with an X server, there is no
  difference (apart from the delay) between being at the console or on
  the other side of the planet. Telnet daemons and clients are available
  with most Linux distributions.

  Encrypted remote shell sessions are available through SSH
  (http://www.ssh.fi/sshprotocols2/index.html
  <http://www.ssh.fi/sshprotocols2/index.html>) thus effectively
  allowing secure remote administration.


    Telnet related software
     <http://metalab.unc.edu/pub/Linux/system/network/telnet/>



  7.2.  Remote commands

  In Unix, and in particular in Linux, remote commands exist that allow
  for interaction with other computers from the shell prompt. Examples
  are: rlogin, which allows for login in a remote machine in a similar
  way to telnet, rcp, which allows for the remote transfer of files
  among machines, etc. Finally, the remote shell command rsh allows the
  execution of a command on a remote machine without actually logging
  onto that machine.


  7.3.  The X Window System

  The X Window System was developed at MIT in the late 1980s, rapidly
  becoming the industry standard windowing system for Unix graphics
  workstations. The software is freely available, very versatile, and is
  suitable for a wide range of hardware platforms. Any X environment
  consists of two distinct parts, the X server and one or more X
  clients. It is important to realise the distinction between the server
  and the client. The server controls the display directly and is
  responsible for all input/output via the keyboard, mouse or display.
  The clients, on the other hand, do not access the screen directly -
  they communicate with the server, which handles all input and output.
  It is the clients which do the "real" computing work - running
  applications or whatever. The clients communicate with the server,
  causing the server to open one or more windows to handle input and
  output for that client.

  In short, the X Window System allows a user to log in into a remote
  machine, execute a process (for example, open a web browser) and have
  the output displayed on his own machine. Because the process is
  actually being executed on the remote system, very little CPU power is
  needed in the local one. Indeed, computers exist whose primary purpose
  is to act as pure X servers.  Such systems are called X terminals.

  A free port of the X Window System exists for Linux and can be found
  at: Xfree <http://www.xfree86.org/>. It is included in most Linux
  distributions.

  Related HOWTO:

    Remote X Apps HOWTO <http://metalab.unc.edu/mdw/HOWTO/mini/Remote-
     X-Apps.html>



  7.4.  VNC

  VNC stands for Virtual Network Computing. It is, in essence, a remote
  display system which allows one to view a computing 'desktop'
  environment not only on the machine where it is running, but from
  anywhere on the Internet and from a wide variety of machine
  architectures. Both clients and servers exist for Linux as well as for
  many other platforms. It is possible to execute MS-Word in a Windows
  NT or 95 machine and have the output displayed in a Linux machine. The
  opposite is also true; it is possible to execute an application in a
  Linux machine and have the output displayed in any other Linux or
  Windows machine. One of the available clients is a Java applet,
  allowing the remote display to be run inside a web browser. Another
  client is a port for Linux using the SVGAlib graphics library,
  allowing 386s with as little as 4 MB of RAM to become fully functional
  X-Terminals.



    VNC web site <http://www.orl.co.uk/vnc/>


  8.  Network Interconnection

  Linux networking is rich in features. A Linux box can be configured so
  it can act as a router, bridge, etc... Some of the available options
  are described below.


  8.1.  Router

  The Linux kernel has built-in support for routing functions. A Linux
  box can act either as an IP or IPX router for a fraction of the cost
  of a commercial router. Recent kernels include special options for
  machines acting primarily as routers:

    Multicasting:  Allows the Linux machine to act as a router for IP
     packets that have several destination addresses. It is needed on
     the MBONE, a high bandwidth network on top of the Internet which
     carries audio and video broadcasts.

    IP policy routing:  Normally a router decides what to do with a
     received packet based solely on the packet's final destination
     address, but routing can also take into account the originating
     address and the network device from which the packet reached it.

  There are some related projects which include one aiming at building a
  complete, running Linux router on a floppy disk: Linux router project
  <http://www.linuxrouter.org>


  8.2.  Bridge

  The Linux kernel has built-in support for acting as an Ethernet
  bridge, which means that the different Ethernet segments it is
  connected to will appear as one Ethernet to the participants. Several
  bridges can work together to create even larger networks of Ethernets
  using the IEEE802.1 spanning tree algorithm. As this is a standard,
  Linux bridges will interoperate properly with other third party bridge
  products. Additional packages allow filtering based on IP, IPX or MAC
  addresses.

  Related HOWTOs:

    Bridge+Firewall
     <http://metalab.unc.edu/mdw/HOWTO/mini/Bridge+Firewall.html>

    Bridge <http://metalab.unc.edu/mdw/HOWTO/mini/Bridge.html>


  8.3.  IP Masquerade

  IP Masquerade is a developing networking function in Linux. If a Linux
  host is connected to the Internet with IP Masquerade enabled, then
  computers connecting to it (either on the same LAN or connected with
  modems) can reach the Internet as well, even though they have no
  officially assigned IP addresses. This allows for reduction of costs,
  since many people may be able to access the Internet using a single
  modem connection as well as contributes to increased security (in some
  way the machine is acting as a firewall, since unofficially assigned
  addresses cannot be accessed outside of that network).

  IP masquerade related pages and documents:


    http://ipmasq.home.ml.org/

    http://www.indyramp.com/masq/links.pfhtml

    http://metalab.unc.edu/mdw/HOWTO/IP-Masquerade-HOWTO.html


  8.4.  IP Accounting

  This option of the Linux kernel keeps track of IP network traffic,
  performs packet logging and produces some statistics. A series of
  rules may be defined so when a packet matches a given pattern, some
  action is performed: a counter is increased, it is accepted/rejected,
  etc.


  8.5.  IP aliasing

  This feature of the Linux kernel provides the possibility of setting
  multiple network addresses on the same low-level network device driver
  (e.g two IP addresses in one Ethernet card). It is typically used for
  services that act differently based on the address they listen on
  (e.g. "multihosting" or "virtual domains" or "virtual hosting
  services".

  Related HOWTO:

    IP Aliasing HOWTO <http://metalab.unc.edu/mdw/HOWTO/mini/IP-
     Alias.html>


  8.6.  Traffic Shaping

  The traffic shaper is a virtual network device that makes it possible
  to limit the rate of outgoing data flow over another network device.
  This is especially useful in scenarios such as ISPs, where it is
  desirable to control and enforce policies regarding how much bandwidth
  is used by each client. Another alternative (for web services only)
  may be certain Apache modules which restrict the number of IP
  connections by client or the bandwidth used.

    http://metalab.unc.edu/mdw/HOWTO/NET3-4-HOWTO-6.html#ss6.15

  8.7.  Firewall

  A firewall is a device that protects a private network from the public
  part (the internet as a whole). It is designed to control the flow of
  packets based on the source, destination, port and packet type
  information contained in each packet.

  Different firewall toolkits exist for Linux as well as built-in
  support in the kernel. Other firewalls are TIS and SOCKS. These
  firewall toolkits are very complete and combined with other tools
  allow blocking/redirection of all kinds of traffic and protocols.
  Different policies can be implemented via configuration files or GUI
  programs.


    TIS home page <http://www.tis.com>

    SOCKS <http://www.socks.nec.com/socksfaq.html>

    Firewall HOWTO <http://metalab.unc.edu/mdw/HOWTO/Firewall-
     HOWTO.html>


  8.8.  Port forwarding

  An increasing number of web sites are becoming interactive by having
  cgi-bins or Java applets that access some database or other service.
  Since this access may pose a security problem, the machine containing
  the database should not be directly connected to the Internet.

  Port Forwarding can provide an almost ideal solution to this access
  problem. On the firewall, IP packets that come in to a specific port
  number can be re-written and forwarded to the internal server
  providing the actual service. The reply packets from the internal
  server are re-written to make it appear that they came from the
  firewall.

  Port forwarding information may be found here
  <http://www.ox.compsoc.net/~steve/portforwarding.html>


  8.9.  Load Balancing

  Demand for load balancing usually arises in database/web access when
  many clients make simultaneous requests to a server. It would be
  desirable to have multiple identical servers and redirect requests to
  the less loaded server. This can be achieved through Network Address
  Translation techniques (NAT) of which IP masquerading is a subset.
  Network administrators can replace a single server providing Web
  services - or any other application - with a logical pool of servers
  sharing a common IP address. Incoming connections are directed to a
  particular server using one load-balancing algorithm. The virtual
  server rewrites incoming and outgoing packets to give clients the
  appearance that only one server exists.

  Linux IP-NAT information may be found  here <http://www.csn.tu-
  chemnitz.de/HyperNews/get/linux-ip-nat.html>


  8.10.  EQL

  EQL is integrated into the Linux kernel. If two serial connections
  exist to some other computer (this usually requires two modems and two
  telephone lines) and  SLIP or PPP (protocols for sending Internet
  traffic over telephone lines) are used on them, it is possible to make
  them behave like one double speed connection using this driver.
  Naturally, this has to be supported at the other end as well.


    http://metalab.unc.edu/mdw/HOWTO/NET3-4-HOWTO-6.html#ss6.2


  8.11.  Proxy Server

  The term proxy means "to do something on behalf of someone else." In
  networking terms, a proxy server computer can act on the behalf of
  several clients. An HTTP proxy is a machine that receives requests for
  web pages from another machine (Machine A). The proxy gets the page
  requested and returns the result to Machine A. The proxy may have a
  cache with the requested pages, so if another machine asks for the
  same page the copy in the cache will be returned instead. This allows
  efficient use of bandwidth resources and less response time. As a side
  effect, as client machines are not directly connected to the outside
  world this is a way of securing the internal network. A well-
  configured proxy can be as effective as a good firewall.

  Several proxy servers exist for Linux. One popular solution is the
  Apache proxy module. A more complete and robust implementation of an
  HTTP proxy is SQUID.
    Apache <http://www.apache.org>

    Squid <http://squid.nlanr.net/>



  8.12.  Diald on demand

  The purpose of dial on demand is to make it transparently appear that
  the users have a permanent connection to a remote site.  Usually,
  there is a daemon who monitors the traffic of packets and where an
  interesting packet (interesting is defined usually by a set of
  rules/priorities/permissions) arrives it establishes a connection with
  the remote end. When the channel is idle for a certain period of time,
  it drops the connection.


    Diald HOWTO <http://metalab.unc.edu/mdw/HOWTO/Diald-HOWTO.html>


  8.13.  Tunnelling, mobile IP and virtual private networks

  The Linux kernel allows the tunnelling (encapsulation) of protocols.
  It can do IPX tunnelling through IP, allowing the connection of two
  IPX networks through an IP only link. It can also do IP-IP tunnelling,
  which it is essential for mobile IP support, multicast support and
  amateur radio. (see
  http://metalab.unc.edu/mdw/HOWTO/NET3-4-HOWTO-6.html#ss6.8)

  Mobile IP specifies enhancements that allow transparent routing of IP
  datagrams to mobile nodes in the Internet.  Each mobile node is always
  identified by its home address, regardless of its current point of
  attachment to the Internet.  While situated away from its home, a
  mobile node is also associated with a care-of address, which provides
  information about its current point of attachment to the Internet.
  The protocol provides for registering the care-of address with a home
  agent.  The home agent sends datagrams destined for the mobile node
  through a tunnel to the care-of address.  After arriving at the end of
  the tunnel, each datagram is then delivered to the mobile node.

  Point-to-Point Tunneling Protocol (PPTP) is a networking technology
  that allows the use of the Internet as a secure virtual private
  network (VPN). PPTP is integrated with the Remote Access Services
  (RAS) server which is built into Windows NT Server. With PPTP, users
  can dial into a local ISP, or connect directly to the Internet, and
  access their network as if they were at their desks. PPTP is a closed
  protocol and its security has recently being compromised. It is highly
  recomendable to use other Linux based alternatives, since they rely on
  open standards which have been carefully examined and tested.


    A client implementation of the PPTP for Linux is available  here
     <http://www.pdos.lcs.mit.edu/~cananian/Projects/PPTP/>

    More on Linux PPTP can be found here
     <http://bmrc.berkeley.edu/people/chaffee/linux_pptp.html>

     Mobile IP:

    http://www.hpl.hp.com/personal/Jean_Tourrilhes/MobileIP/mip.html

    http://metalab.unc.edu/mdw/HOWTO/NET3-4-HOWTO-6.html#ss6.12

     Virtual Private Networks related documents:


    http://metalab.unc.edu/mdw/HOWTO/mini/VPN.html

    http://sites.inka.de/sites/bigred/devel/cipe.html



  9.  Network Management


  9.1.  Network management applications

  There is an impressive number of tools focused on network management
  and remote administration.  Some interesting remote administration
  projects are linuxconf and webmin:

    Webmin <http://www.webmin.com/webmin/>

    Linuxconf <http://www.solucorp.qc.ca/linuxconf/>

  Other tools include network traffic analysis tools, network security
  tools, monitoring tools, configuration tools, etc. An archive of many
  of these tools may be found at Metalab
  <http://www.metalab.unc.edu/pub/Linux/system/network/>


  9.2.  SNMP

  The Simple Network Management Protocol is a protocol for Internet
  network management services. It allows for remote monitoring and
  configuration of routers, bridges, network cards, switches, etc...
  There is a large amount of libraries, clients, daemons and SNMP based
  monitoring programs available for Linux. A good page dealing with SNMP
  and Linux software may be found at : http://linas.org/linux/NMS.html


  10.  Enterprise Linux Networking

  In certain situations it is necessary for the networking
  infrastructure to have proper mechanisms to guarantee network
  availability nearly 100% of the time. Some related techniques are
  described in the following sections. Most of the following material
  can be found at the excellent Linas website:
  http://linas.org/linux/index.html and in the Linux High-Availability
  HOWTO <http://metalab.unc.edu/pub/Linux/ALPHA/linux-ha/High-
  Availability-HOWTO.html>


  10.1.  High Availability

  Redundancy is used to prevent the overall IT system from having single
  points of failure. A server with only one network card or a single
  SCSI disk has two single points of failure. The objective is to mask
  unplanned outages from users in a manner that lets users continue to
  work quickly. High availability software is a set of scripts and tools
  that automatically monitor and detect failures, taking the appropriate
  steps to restore normal operation and to notifying system
  administrators.


  10.2.  RAID

  RAID, short for Redundant Array of Inexpensive Disks, is a method
  whereby information is spread across several disks, using techniques
  such as disk striping (RAID Level 0) and disk mirroring (RAID level 1)
  to achieve redundancy, lower latency and/or higher bandwidth for
  reading and/or writing, and recoverability from hard-disk crashes.
  Over six different types of RAID configurations have been defined.
  There are three types of RAID solution options available to Linux
  users: software RAID, outboard DASD boxes, and RAID disk controllers.


    Software RAID: Pure software RAID implements the various RAID
     levels in the kernel disk (block device) code.

    Outboard DASD Solutions: DASD (Direct Access Storage Device) are
     separate boxes that come with their own power supply, provide a
     cabinet/chassis for holding the hard drives, and appear to Linux as
     just another SCSI device. In many ways, these offer the most robust
     RAID solution.

    RAID Disk Controllers: Disk Controllers are adapter cards that plug
     into the ISA/EISA/PCI bus. Just like regular disk controller cards,
     a cable attaches them to the disk drives. Unlike regular disk
     controllers, the RAID controllers will implement RAID on the card
     itself, performing all necessary operations to provide various RAID
     levels.

  Related HOWTOs:

    http://metalab.unc.edu/mdw/HOWTO/mini/DPT-Hardware-RAID.html

    http://metalab.unc.edu/mdw/HOWTO/Root-RAID-HOWTO.html

    http://metalab.unc.edu/mdw/HOWTO/Software-RAID-HOWTO.html

  RAID at linas.org:

    http://linas.org/linux/raid.html


  10.3.  Redundant networking

  IP Address Takeover (IPAT). When a network adapter card fails, its IP
  address should be taken by a working network card in the same node or
  in another node. MAC Address Takeover: when an IP takeover occurs, it
  should be made sure that all the nodes in the network update their ARP
  caches (the mapping between IP and MAC addresses).

  See the High-Availability HOWTO for more details:
  http://metalab.unc.edu/pub/Linux/ALPHA/linux-ha/High-Availability-
  HOWTO.html


  11.  Sources of Information

  If you have networking problems with Linux, please do not e-mail the
  questions to me. I just simply do not have the time to answer them.
  You have better chances to obtain help if you post a question in the
  comp.os.linux.networking newsgroup (which you can access through
  http://www.dejanews.com). Before posting there, make sure that you
  have read the relevant documentation.  Then search the news archive,
  because chances are that somebody, sometime made the same question
  (and somebody answered).  When posting, remember to explain all the
  steps you have followed and the error messages you got.  Where to get
  further information:

    Linux: http://www.linux.org

    Linux Documentation Project: http://metalab.unc.edu/mdw/linux.html
     (check out the Linux Network Administrator Guide)


    Freshmeat: The latest releases of Linux Software.
     http://www.freshmeat.net

    Linux links: http://www.linuxlinks.com/Networking/


  12.  Document history


    0.32 Updated many links that have changed. Special thanks go here
     to Kontiki <mailto:kontiki@lares.dtui.ne.jp> for his careful review
     and detailed description of what needed to change. Many thanks also
     to Anne <mailto:annabell@ixos.de> and Mathias
     <hessler@isdn4linux.de> who pointed out other links that were no
     longer valid.

    0.31 (17 Sept 1999) Changed address for linux router project
     (thanks to John Ellis) and added another PPTP link (thanks to
     Benjamin Smith)

    0.30 (6 April 1999)  Included section on CODA (thanks to  Brian
     Ristuccia <mailto:brianr@osiris.978.org>

    0.2-0.29 Bugfixes  :-)  (see acknowledgements, at the end of this
     document)

    0.1 (5 june 1998)


  13.  Acknowledgements and disclaimer

  This document is based on the work of many other people who have made
  it possible for Linux to be what it is now: one of the best network
  operating systems. All credit is theirs. A lot of effort has been put
  into this document to make it simple but accurate and complete but not
  excessively long. Nevertheless, no liability will be assumed by the
  author under any circumstance. Use the information contained here at
  your own risk. Please feel free to e-mail me suggestions, corrections
  or general comments about the document so I can improve it. Other
  topics that will probably be included in futures revisions of this
  document may include radius, web/ftp mirroring tools such as wget,
  traffic analyzers, CORBA... and many others that may be suggested and
  suitable. You can reach me at daniel@rawbyte.com.

  Finally I would like to thank  Finnbjorn av Teigum, Cesar Kant,
  Mathieu Arnold and specially Hisakuni Nogami and Phil Garcia for their
  careful reviews and comments on this HOWTO. Their help is greatly
  appreciated.

  You can find a version of this document at http://www.rawbyte.com/lno/
  <http://www.rawbyte.com/lno>.

  Daniel Lopez Ridruejo  8 July 2000



  Online Troubleshooting Resources HOWTO
  Howard Mann, howardm@xmission.com
  v0.5, 18 September 1999

  This document will direct Linux users to resources available on the
  Internet that provide access to a vast amount of Linux-related infor-
  mation useful in troubleshooting problems.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Document updates
     1.2 Copyright and License
     1.3 Feedback and Corrections

  2. HOWTO's and mini-HOWTO's

  3. Frequently-Asked-Questions ( FAQ's)

  4. Online Support Sections

  5. Usenet Newsgroup Archives

     5.1 Power Search at deja.com
     5.2 Searchlinux.com (CNET Linux Help)

  6. Internet Search Engines

     6.1 Google.com

  7. Mailing List Archives

  8. Online User's Manuals

  9. Online Unix Tutorials

  10. Miscellaneous Resources

     10.1 Release Notes and Available Documentation related to the XFree86 X - Window Server.
     10.2 GNU Texinfo pages
     10.3 GNU Software and Manuals
     10.4 Glossary of Linux-related terms
     10.5 An online dictionary of computer and technology terms
     10.6 A detailed Guide to Personal Computers
     10.7 Gary's Encyclopedia

  11. Concluding Comments



  ______________________________________________________________________

  1.  Introduction

  The traditional means of troubleshooting computer-related problems
  involves consulting user's manuals, books, friends - probably enticed
  with goodies - and, when all the former do not yield a solution,
  calling the technical support service of the vendor of the product in
  question.  And, we all know pleasant and reliably efficacious the
  latter stratagem is. Unfortunately, this is the norm in the sphere of
  commercial proprietary products.


  In contradistinction, Linux, and related distributions, utilities and
  applications software, has largely  been developed according to the
  Open Source <http://www.opensource.org> model, wherein developers have
  used  electronic  communication over the Internet - typically in the
  form of  publically-accessible Mailing Lists-  to collaborate with
  their peers in the refinement of the associated source code. Such
  collaboration has also traditionally  involved the online publication
  of user's manuals, lists of Frequently-Asked-Questions  ( FAQ's ) ,
  knowledge bases, release notes, formal guides such as this document
  (HOWTO's) and tutorials. In addition, users often assist others
  through the forum of Usenet and other newsgroups and the posted
  messages are readily  accessible in the form of searchable archives.
  These linux-related newsgroups are renowned for their  high level of
  user participation. In significant measure, Linux may be considered a
  product of the Internet.

  Considered together, these resources enable access to a large, ever-
  expanding factual database, and my intent is to encourage and direct
  the reader to utilize these repositories when faced with an issue not
  addressed in the documentation that is included with each distribution
  of Linux. Linux veterans who assist newcomers through the forum of
  Usenet soon become aware of the frequency with which certain technical
  questions are repeatedly posted - questions the answers to which are
  readily available in one or  more of the existent online repositories.
  So, to diminish the likelihood of being "flamed" in response to your
  posted question on Usenet or irc , read further!

  Armed with a browser, Linux users may rapidly become adept at
  troubleshooting their systems. The key is knowing how and where to
  look. My objective is to guide the user - particularly the Linux
  newbie -  in this quest.


  1.1.  Document updates

  The latest version of this document will always be available at
  <http://www.newbielinux.com>, my website for Linux newbies.


  1.2.  Copyright and License

  Copyright (c) 1999 , by Howard Mann.

  This document is governed by the provisions of the LDP Copying
  License, the  terms of which are detailed here:
  <http://www.linuxdoc.org/copyright.html>


  1.3.  Feedback and Corrections

  I always welcome feedback and constructive criticism.In particular, I
  wish to be notified about any errors in this document and resources
  deserving of mention, but not presently covered herein.  In
  anticipation, Thanks.


  2.  HOWTO's and mini-HOWTO's

  These documents are associated with the Linux Documentation Project
  <http://www.linuxdoc.org>. There is an Index page
  <http://www.linuxdoc.org/HOWTO/HOWTO-INDEX-3.html> that I suggest you
  bookmark in your browser.

  These HOWTO's are written by Linux users and are periodically updated
  by the authors. Many authors provide the latest version at a personal
  website and a hyperlink to the latter is typically provided in the
  document . This version may be newer than that available at the LDP
  website.  The document may be published online before its inclusion
  into the LDP database.

  Note also that other HOWTO's are available, the authors of which have
  not submitted them to the LDP. It is definitely worthwhile trying to
  find these using an Internet search engine as I describe in a
  subsequent section.

  These documents are particularly useful when you decide to provide or
  access a new service with your Linux system, or when you embark on a
  technically complex project. For example, you may have the option of
  accessing the 'net with an ADSL or Cable Modem service - excellent
  guides are available in the form of HOWTO's.

  In addition, authors often include references and links to sites that
  they have found useful. You may find the information  you need at one
  of these hyperlinked sites rather than in the HOWTO itself. For
  example, I found Linux Network Drivers
  <http://cesdis1.gsfc.nasa.gov/linux/drivers/> , the primary site for
  information about Network Interface Card drivers , in the Ethernet
  HOWTO.


  3.  Frequently-Asked-Questions ( FAQ's)

  A list of FAQ's is a traditional accompaniment to Linux-related
  applications, utilities, and the like. An FAQ is typically provided
  online by the developer/s of the product in question, and enterprising
  users sometimes host an "unofficial" FAQ as well. Search for the
  latter with an Internet search engine.

  The FAQ is the first document to peruse when troubleshooting a
  particular application. In addition, FAQ's exist for Linux
  distributions, window managers, and the so-called desktop environments
  ( KDE and Gnome ).

  For Linux newbies, I provide links to three FAQ's that collectively
  address many of the questions posted to the Usenet newsgroups :


  1. The Linux FAQ at  <http://www.fokus.gmd.de/linux/FAQ/Linux-
     FAQ.html>

  2. The XFree86 X - Window System FAQ at  <http://www.xfree86.org/FAQ>

  3. The Linux Kernel mailing list FAQ at  <http://www.tux.org/lkml/>


  4.  Online Support Sections

  These sections are typically found at the websites of Linux
  distributions, and often contain a variety of helpful documents with
  information not easily encompassed within a FAQ. Look for sections
  with one or more of the following titles:


  o  Installation Support

  o  Knowledge or Solutions Databases.

  o  Tips and Tricks

  o  Errata, Fixes and Updates


  o  White Papers

  o  Technical Guides

  o  Hardware Guide or Compatibility List

  o  Security Information

  Some websites provide a site search engine that will facilitate your
  quest for a solution.

  If you have a problem with a newly installed distribution, look here
  first as bugs and their fixes are typically posted here. You may find
  a detailed guide that will help you accomplish a task such as
  upgrading your kernel or the version of the XFree86 X - Window System
  you are using.

  I recommend you spend some time at the website familiarizing yourself
  with what is available.



  5.  Usenet Newsgroup Archives

  The ability to search for and retrieve information from archived posts
  to the linux-related (Usenet) newsgroups represents a powerful means
  of troubleshooting in Linux.

  Search engines permit one to search the archives by stipulating the
  forum, keywords, authors, dates, language and combinations thereof.
  Because the number of linux-related newsgroups is large, the
  likelihood of finding useful information is high.

  I would like to relate a brief anecdote to demonstrate the efficacy of
  this approach. The first time I attempted to build a kernel, I was
  presented  with this error message when I invoked a "make" command:



       make[1]: as86: Command not found
       make[1]: *** [bootsect.o] Error 127
       make[1]: Leaving directory `/usr/src/linux/arch/i386/boot'
       make: *** [zImage] Error 2



  I had no idea what as86 was, but I entered it as the keyword in the
  SUBJECT field of the Power Search utility at deja.com ( see below) ,
  and was presented with a large number of posts from folks who had
  encountered the same problem.  Respondents had provided the reason and
  solution: I did not have an assembler/linker necessary to create
  machine code, and the bin86 package provided it. I downloaded and
  installed a RPM package of the latter and was on my way. This entire
  process took about 10 minutes ( I do have an ADSL connection to the

  There are two websites that provide access to Usenet archives using a
  search engine as described in the following sections.


  5.1.  Power Search at deja.com

  This is the pre-eminent site for all things Usenet, and the Power
  Search utility is at : <http://www.deja.com/home_ps.shtml>. Spend some
  time at this site learning how to use the search engine effectively,
  including an appreciation of the Search Language
  <http://www.deja.com/help/help_lang.shtml> nuances. In particular,
  note the value of using the wildcard symbol.  You will be repaid time
  and again for your efforts. I typically enter the following for a
  "routine" search:



       LANGUAGE : English
       SUBJECT :  try different keywords, thinking of a subject line you would use for a post.
       FORUM    :  *linux* or comp.os.linux.*



  There is another nice interface to the Power Search utility at :
  <http://www.exit109.com/~jeremy/news/deja.html>. Customize this page
  to your liking ( I like the " DejaClassic" option ), and then choose "
  Save Settings."

  You may also be interested in using the DejaSearch utility, available
  at :   <http://homemade.hypermart.net/dejasearch/> , that will print
  out the retrieved posts in one HTML file for your perusal. By using
  this, you will not have to page back and forth in your browser.


  5.2.  Searchlinux.com (CNET Linux Help)

  This is a relatively new site with many of the same features as
  deja.com. It has "basic" and "advanced" search options. The latter
  does not have as many options as the Power Search feature at deja.com.
  It has a nice one-click option whereby one may view one's own posts
  and associated replies. It is found at :  <http://www.searchlinux.com>


  6.  Internet Search Engines

  I frequently use a Search Engine to retrieve helpful or necessary
  information from the 'net.  These engines catalogue pages from
  commercial, personal and academic websites, as well as Mailing Lists
  and the like.

  Of course, there are a large number of available Search Engines, and I
  suggest you try several before giving up on a particular quest.
  Research has shown that any one of them catalogues but a small portion
  of existent web pages. It is worthwhile becoming  very familiar with
  the operational details of at least one non-directory engine to
  maximize the efficiency and efficacy of your search efforts. You
  probably already have a favorite - I like Google.com, and will discuss
  it in a little more detail.


  6.1.  Google.com

  This engine has several novel features that are described at :
  <http://www.google.com/why_use.html>. In particular, the engine often
  returns the most useful pages first ; in fact, I have often found that
  the first listed page contains the information I need. Because it
  caches web pages, it is relatively fast at displaying requested items.
  It has a so-called GoogleScout (TM) feature that  provides additional
  relevant links with each item returned.

  In addition, it has a specialized Linux search engine at :
  <http://www.google.com/linux> that I use as my primary Internet search
  tool. It searches the database of linux-related pages at Google.com
  further promoting search efficiency. Try it- I am confident you will
  bookmark it immediately.
  7.  Mailing List Archives

  As you might expect, there are a very large number of linux-related
  Mailing Lists that enable developers and users to communicate and
  collaborate on projects. These Lists cover every conceivable aspect of
  Linux, from the technical arcana of kernel development to the
  relatively unfocused discussion of issues at the newbie level.
  Subscribers to a particular Mailing List are generally very
  knowledgeable in the List's topic, and detailed and useful information
  is often retrievable. The communications are publically accessible
  through Internet search engines and in the form of online Mailing List
  Archives. You will typically see archived pages when you conduct a
  search using an Internet search engine.

  Not all Mailing Lists are associated with an online archive, but this
  is increasingly the case. Similarly, not all archives have an
  associated search engine.

  Initially, try locate the Mailing List Archive you are interested in
  by typing a keyword/s and "mailing list archive" in an Internet search
  engine.

  For a listing of linux-related Mailing Lists, peruse websites such as
  the Linux Resource Exchange at :
  <http://www.linuxrx.com/Lists/Lists.perl> and the Linux Online Mailing
  Lists at:  <http://www.linux.org/help/lists.html>.

  You may also find Mailing List archives at the following locations :


  1. The website of the distribution of Linux you use.

  2. The website/s of the Window Manager and/or Desktop Environment you
     use.

  3. The website dedicated to the application or project  in question.

  4. The Mail Archive at :  <http://www.mail-archive.com/lists.html>

  5. Mailing List Archives at : <http://www.uwsg.indiana.edu/hypermail/>

  6. Linux Mailing List Archives at : <http://kernelnotes.org/lnxlists/>

  7. Tux Mailing List Archives at : <http://www.tux.org/hypermail/>

  This is not a complete listing of archives and you may find additional
  sites with an Internet search engine. But, this should certainly get
  you going.


  8.  Online User's Manuals

  Some of the major Linux distributions and Window Managers/Desktop
  Environments publish their user's manual online. If the entire manual
  is not online, installation and configuration guides are typically
  found at the relevant website . This also applies to major
  applications like the Gimp ( GNU Image Manipulation Program).

  So, for those users who do not have the printed manual, a wealth of
  installation and configuration guidance is generally available online.


  9.  Online Unix Tutorials

  As Linux is a Unix-like operating system, a general familiarity with
  fundamental Unix concepts such as the Unix directory hierarchy and
  file permissions is essential. Fortunately, there are many Unix
  tutorials online that collectively cover everything a user might need
  to know to use Linux. I suggest you bookmark the following as an
  online reference library :


  1. A large well-organized reference at :
     <http://www.dicamp.univ.trieste.it/du96/unix/TOC.html>

  2. Unixhelp at  <http://www.ucs.ed.ac.uk/~unixhelp/servers.html>

  3. Unix is a Four Letter Word... at
     <http://www.linuxbox.com/~taylor/4ltrwrd/title.html>


  10.  Miscellaneous Resources

  In this section, I provide a number of links to websites that I have
  found useful while learning to use Linux. This is an eclectic
  collection, but keep these handy.


  10.1.  Release Notes and Available Documentation related to the
  XFree86 X - Window Server.

  This documentation accompanies each version of XFree86, and is
  available at: <http://www.xfree86.org/>. Whenever you have trouble
  with your X environment, peruse the notes applicable to your
  videocard/chipset. These typically provide details about the
  configuration of the X - window system relative to your card, and will
  enumerate any "options" you have to include in the XF86Config file
  that governs X.


  10.2.  GNU Texinfo pages

  A great collection of pages is available at : <http://www.geek-
  girl.com/unix.html#texinfo>. Included are links to pages on the
  following:


  o  Bash    - The Bourne-again shell

  o  Configure    - used when compiling programs from source code

  o  G++    - the GNU C++  compiler

  o  Gcc  - the C compiler

  o  Libc  - the GNU C library

  o  Make  - a program for directing recompilation

  Note that some of these are included in the "docs" that come with
  Linux distributions. In general, these are detailed technical
  documents of particular interest to developers. However, if like me,
  you are not a programmer, you may peruse the introductory sections of
  these documents to get insight, for example,  into those configureand
  make commands you use when installing applications from source code.


  10.3.  GNU Software and Manuals

  Many important programs that are frequently utilized by the Linux user
  are GNU utilities -  for example, the tar (archive) and gzip (
  compression ) programs. Descriptions of these programs are located at
  :
  <http://www.gnu.org/software/software.html#DescriptionsOfGNUSoftware>
  and online manuals for many of these are found at :
  <http://www.gnu.org/manual/manual.html>.

  These manuals typically provide a lot more information than is found
  in the corresponding man page on your system. For example , compare
  the man page and online manual for the tar utility.


  10.4.  Glossary of Linux-related terms

  This online guide at : <http://www.firstlinux.com/guide/> has a nice
  collection of terms and definitions, sorted alphabetically. Go here if
  you encounter a term that you have not seen before or do not
  understand.


  10.5.  An online dictionary of computer and technology terms

  The Webopedia website at :  <http://www.pcwebopedia.com/> consists of
  a large online dictionary of computer-related terms and a search
  engine that provides links to documents that discuss each item in more
  detail. For example, I used this site to learn the differences between
  ISA and PCI buses.


  10.6.  A detailed Guide to Personal Computers

  The Topic Index to this voluminous hardware guide at :
  <http://www.PCguide.com/topic.html> will give you a great idea of the
  contents of this website. I used it quite frequently when first
  installing Linux and configuring the X Window System. I learnt a lot
  about videocards and monitors, including the concepts of screen
  resolution, color depth etc., useful when troubleshooting X - display
  problems.


  10.7.  Gary's Encyclopedia

  Gary Momarison's website at
  <http://members.aa.net/~swear/pedia/index.html> contains a very large
  number of sorted Linux-related links. You may use the "find" function
  in your browser to find links in a particular category. Peruse this
  website to appreciate what it has to offer.


  11.  Concluding Comments

  If you are a Linux newbie, you may want to create a Troubleshooting
  folder in your browser's bookmark list, into which you put the
  hyperlinks I have included in this document, as well as those
  pertinent to the distribution of Linux and  the Window Manager/Desktop
  Environment you use.

  As you use these links , you will quickly become adept at
  troubleshooting online.

  Cheers and happy searching !



  Linux - Optical Disk HOWTO
  Skip Rye, abr@preferred.com
  v1.6, 11 December 1998

  This document describes the installation and configuration of optical
  disk drives for Linux. Please, if any one has experiences with optical
  storage under Linux, send it and I will update it in SGML and forward
  it to the Linux community. Please let me know if it's OK to include
  your E-mail address!
  ______________________________________________________________________

  Table of Contents


  1. Disclaimer

  2. Copyright

     2.1 LF1000 mini-HOWTO
     2.2 Optical Disk-HOWTO

  3. Phase Change Optical Technology

     3.1 Introduction
     3.2 Panasonic LF1000
        3.2.1 POINTS OF INTEREST
        3.2.2 THINGS YOU SHOULD KNOW
        3.2.3 Installation
        3.2.4 Installation steps
        3.2.5 Usage hints
     3.3 Additional Configuration concerns by Jeff Rooze

  4. Magneto Optical Technology

     4.1 Introduction
     4.2 Olympus, Epson, Mitsubishi MK230LK3 - Stephan Shuichi Haupt
     4.3 Fujitsu DynaMO 640 - Phil Garcia
     4.4 Panasonic LF-7010 - Philip Kerr

  5. Optical jukeboxes

     5.1 Maxoptix 520 - Zed Shaw
        5.1.1 Zed's Origional E-Mail - Feb 13 1998
        5.1.2 Corrospondance with Zed on Mon, 16 Feb 1998:


  ______________________________________________________________________


  1.  Disclaimer


  Neither the author nor the distributors, or any other contributor of
  this HOWTO are in any way responsible for physical, financial, moral
  or any other type of damage incurred by following the suggestions in
  this text.



  2.  Copyright

  The "Optical Disk-HOWTO" and "LF1000 mini-HOWTO" are copyrighted.



  2.1.  LF1000 mini-HOWTO

  (C) 1996,1997 by Skip Rye, abr@brspc_0064.msd.ray.com

  2.2.  Optical Disk-HOWTO

  (C) 1997,1998 by Skip Rye, abr@preferred.com

  Linux HOWTO documents may be reproduced and distributed in whole or in
  part, in any medium physical or electronic, as long as this copyright
  notice is retained on all copies. Commercial redistribution is allowed
  and encouraged. The author, however, would like to be notified of any
  such distributions. All translations, derivative works, or aggregate
  works incorporating any Linux HOWTO documents must be covered under
  this copyright notice. In other words, you may not produce a
  derivative work from a HOWTO and impose additional restrictions on its
  distribution.  Exceptions to these rules may be granted under certain
  conditions. In short we wish to promote dissemination of this
  information through as many channels as possible. However, we do wish
  to retain copyright on the HOWTO documents, and would like to be
  notified of any plans to redistribute the HOWTOs. Should you have any
  questions, please contact Greg Hankins, the Linux HOWTO coordinator,
  at gregh@sunsite.unc.edu.  You may finger his address for phone number
  and additional contact information.


  3.  Phase Change Optical Technology


  3.1.  Introduction

  Optical Phase Change technology is used to create "In Phase" or "Out
  of Phase" bits on a special media for phase change writing. The drive
  uses a LASER of different power levels or LASER intensities to produce
  this effect.  One power level allows the media to flow into a
  crystalline form while the other creates an "Out of Phase" condition.
  The crystallized areas reflect the read Lasers beam with a different
  coefficient of reflectivity than the non-crystallized areas. Thus,
  data can be read from the disk.


  What makes the phase change optical disk special is that it the disk
  is formated with concentric cylinders or tracks with each track being
  sectored much like a magnetic disk or read/write optical disk. The
  tracks are very close so a lot of data can be stored on a disk. This
  is different from a CD-ROM in that it gives your system the look and
  feel of a magnetic disk. CD-ROMs have a spiraling track much like a
  audio record. Having tracks and sectors alone would not make the phase
  change drive special from optical disk but the drive has some very
  special properties; The phase change drive allows for direct overwrite
  of data which magneto optical can't do inexpensively and the media has
  the very special property of NOT being susceptible to magnetic fields
  or as sensitive to static discharge which gives the media a very long
  shelf life.


  3.2.  Panasonic LF1000


  3.2.1.  POINTS OF INTEREST


  o  Read/Write optical disk.

  o  Can read CD-ROMs at 4X speed.

  o  Can read Kodak PhotoCDs.

  o  Media has a 15 Year shelf life.

  o  SCSI-2 Interface.

  o  Track/sector format as opposed to CD-ROMs spiraling record format.

  o  165ms access time - much better than a tape file restore.

  o  650Mb data storage per diskette.

  o  Diskettes are about $50 each.


  3.2.2.  THINGS YOU SHOULD KNOW


  o  Optical disk format not compatible with any other disk drive.

  o  Vendors don't seem to support UNIX very well - marketing is
     targeted for DOS/Windows and Macintosh.

  o  Do NOT purchase the PD drive which uses the parallel port interface
     - To my knowledge there is no Linux driver for it.


  3.2.3.  Installation

  The LF1000 is SCSI-2 compatible device. It features a block size of
  512 bytes and is compatible with the Linux SCSI drivers. This drive
  was installed on a PC compatible AMD 100MHZ 486 with an Adaptec 1542C
  SCSI bus-master controller. To install and mount a disk the following
  steps were taken;


  3.2.4.  Installation steps


  o  Install the drive and set the SCSI address to not interfere with
     other SCSI devices. Reconnect all cabling.

  o  Boot the computer. Your SCSI controller should note the new drive.

  o  During the Linux kernel boot, you should see an additional SCSI
     device. In my case, having a magnetic system disk for device
     /dev/sda it shows up as /dev/sdb.

  o  I did NOT partition the device because fdisk issued an overwrite
     warning and I did not want to change anything from a dosemu
     standpoint.

  o  mkfs -t ext2 /dev/sdb

  o  mkdir /pd

  o  mount -t ext2 -o ro,suid,dev,exec,auto,nouser,async /dev/sdb /pd -
     Read only

  o  mount -t ext2 -o defaults /dev/sdb /pd - Mount drive W/R

  Your ready to "Rock'n'Roll"



  3.2.5.  Usage hints


  o  The media which comes with the drive is reported be re-writable
     about 500,000 times. This means that it is not advisable to install
     a live operating system such as Linux on the phase change optical
     drive. These live operating systems tend to cache processes to and
     from disk. Over time this can easily approach the phase change
     media life.

  o  Mount drive read only as much as possible.

  o  When writing to the drive do so in large chunks. This will help
     reduce any file fragmentation which will require more read seeks.


  o  This is however an excellent media for backups, gifs, mpeg or
     storing large programs which you don't use that often. The restore
     from backup is much faster that tape. Backups can be performed
     using the cp -rp command without the need for the ftape driver.
     This however, will replace symbolic links with the actual file.

  o  If while using the PD for writing, You find that the file you just
     wrote to the disk are not there, chances are that the disk write
     protect tab is in write protect mode and you mounted it in
     read/write mode.


  3.3.  Additional Configuration concerns by Jeff Rooze

  Hello,

  I read your article on configuring the Panasonic LF-1000 for Linux. I
  have configured my system so that the optical drive has its own device
  name and the CD-ROM has its own device name.  This has allowed me to
  mount either media at any time. I do not require any media in the
  drive when I boot Linux. Also I am using the optical drive as an ext2
  formatted media.

  I had a couple of minor difficulties in doing so.


  First, I had configured my hard drive at SCSI ID 6 and my PD at SCSI
  ID 4. (I wanted to have the hard drive at a higher priority that the
  PD). This caused a problem with the Linux SCSI driver. The driver
  scans the SCSI devices from the Lower SCSI id's to the higher (eg: 0
  .. 6).  Consequently my logical device names were assigned differently
  depending on which type of media was installed in the PD drive. This
  caused a big problem. My Linux partition is on my SCSI hard drive and
  the root device name would change! I corrected this problem by
  modifying the software in the kernel SCSI driver to scan the devices
  in reverse order.

  Second, the distribution Linux kernel does not scan all SCSI LUNS.
  The PD/CD drive has a mode that establishes the CD-ROM at LUN 1 and
  the PD at LUN 0. This mode is selected by the configuration switches
  on the PD/CD drive. Switch #2 should be down (off?). If this switch is
  up (on?), the signature of the device is dependent upon the media that
  is installed and it only reports this device on LUN 0. If no media is
  installed I think it defaults to CD-ROM.  I am using an Future Domain
  16-xx SCSI interface card and the software in Linux kernel driver
  supports an optical device signature when scanning the LUNS. I assume
  that this is standard for most of the SCSI drivers. I reconfigured the
  kernel to enable the "scan all LUNS" switch. The kernel then assigns
  different device names for each device. The following is an excerpt
  from by boot log. You will note a series of errors in this log. This
  is because I did not have the optical media installed in the drive and
  the driver was attempting to look at the partition table to determine
  the block size. Fortunately it defaults to 512. I am planning on
  modifying the Future Domain SCSI driver to not do this when it detects
  the optical device.


       >  scsi0 <fdomain>: BIOS version 3.2 at 0xde000 using scsi id 7
       >  scsi0 <fdomain>: TMC-18C50 chip at 0x140 irq 12
       >  scsi0 : Future Domain TMC-16x0 SCSI driver, version 5.28
       >  scsi : 1 host.
       >    Vendor: CONNER    Model: CP30545 545MB3.5  Rev: A9AF
       >    Type:   Direct-Access                      ANSI SCSI revision: 02
       >  Detected scsi disk sda at scsi0, id 6, lun 0
       >    Vendor: MATSHITA  Model: PD-1 LF-1000      Rev: A109
       >    Type:   Optical Device                     ANSI SCSI revision: 02
       >  Detected scsi disk sdb at scsi0, id 4, lun 0
       >    Vendor: MATSHITA  Model: PD-1 LF-1000      Rev: A109
       >    Type:   CD-ROM                             ANSI SCSI revision: 02
       >  Detected scsi CD-ROM sr0 at scsi0, id 4, lun 1
       >  fdomain: Selection failed
       >  scsi : detected 1 SCSI cdrom 2 SCSI disks total.
       >  SCSI Hardware sector size is 512 bytes on device sda
       >  fdomain: REQUEST SENSE Key = 2, Code = 3a, Qualifier = 0
       >  last message repeated 3 times
       >  sdb : READ CAPACITY failed.
       >  sdb : status = 0, message = 00, host = 0, driver = 28
       >  sdb : extended sense code = 2
       >  sdb : block size assumed to be 512 bytes, disk size 1GB.
       >  .
       >  .
       >  .
       >  Partition check:
       >    sda: sda1 sda2 sda3
       >  scsidisk I/O error: dev 0810, sector 0
       >    unable to read partition table of device 0810



  Third, I modified my file system table (/etc/fstab) to list each
  device but do not attempt to auto mount when booting. I have included
  an excerpt from my fstab. The most important options are the noauto,
  rw(ro), and the checkpass flag.

  To create a ext2 file system on the PD, I used the command "mkfs.ext2
  -i 2048 /dev/sdb".



       # fstab - List of file systems
       #
       # device  mount   type          options              dumpfrequency
       checkpass
       /dev/sdb /optd    ext2   rw,user,suid,noauto,sync,exec,dev,umask=0 0 2
       /dev/sr0 /dist  iso9660  ro,user,suid,noauto,sync,exec,dev 0 2



  After making these changes, I have had no problems with mounting
  either media. All I need to do is to load the media and type "mount
  /optd" or "mount /dist" and the system does all the rest.


  I hope this information is useful.



       Jeff
       --
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       \ Jeff Rooze -- http://www.treknet.net/~jrooze -- jrooze@treknet.net /
       /  If builders built buildings the way some programmers write        \
       \  programs, then the first woodpecker that came along would destroy /
       /  civilization.                                     GERALD WEINBERG \
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



  I tried Jeff's suggestion. Here are the steps I performed;

  o  Modify my kernel using "make xconfig" in the /usr/src/linux
     directory and installed it.

  o  Change the mode jumper on the PD drive to non-DOS mode. I soldered
     a switch across the mode jumper connections and routed it the the
     back panel. I figured out which switch position was the open
     position and labeled this one for DOS.  The other position is of
     course Linux.  So before I boot my system I decide which OS I'll be
     using and set the switch accordingly. History shows it staying in
     the Linux position more and more.

  o  Reboot your system. You should now see multiple LUN show up during
     boot for the PD SCSI device number - It works great!!! If you have
     an older kernel modify the "/usr/src/linux/drivers/scsi/config.in"
     file.

  o  Update the fstab for both CD and PD drives.

  o  Use appropriate mount command.

  o  "df" to make sure your ready.

  I did try moving my primary SCSI drive to 6 but experienced some
  difficulties. Can't remember exactly what it was but it may have been
  that my controller "Adaptec 1542" with "Corel SCSI" requires a
  bootable disk and SCSI 0 for the BIOS install to work properly with
  DOS. So I switched it back and enjoyed playing with my properly
  install PD drive! With this configuration "workman" - the audio CD
  player util - works fine.


  4.  Magneto Optical Technology


  4.1.  Introduction

  Magneto optical drives use a "Far field" magnetic field and a laser to
  change polarization of a magnetic media. The media is of such a nature
  that it must be heated to the appropriate temperature before a
  polarization change can happen - this is where the laser comes into
  play. A high power write laser is used to heat the disk surface to the
  appropriate temperature at which time the "Far field" can set the
  polarization on the disk magnetic surface. After a short period of
  time the disk surface cools and "locks" the polarization into place.
  The read back I'm a little fuzzy on - someone please send me the
  proper wording.  I think a low power laser is used for read back and
  the "H" field of the disk polarization interacts with the "E" and "H"
  field of the incident laser to produce a reflective polarization which
  will correspond to the disk bit polarization - I hope this is in the
  ball-park, it's certainly no home run. Maybe a total strike out.

  The use of a laser for polarization change allows the disk bit and
  track densities to be higher than conventional "Flying" magnetic
  heads. The "far field" means no more "head crashes" - that is assuming
  your disk label doesn't peal off during the load or you don't leave
  one of those sticky pads on the disk cartridge. Most media allows 650
  Megs per platter and on some models both sides of the media is used
  yielding 1.3Gig storage media - you must remove the media and flip it
  over to use the other 650Megs though.


  4.2.  Olympus, Epson, Mitsubishi MK230LK3 - Stephan Shuichi Haupt

  Stephan Shuichi Haupt <stephan@bios.t.u-tokyo.ac.jp>



  Hi

  I have noticed that there is not much information about
  magneto-optical disks in the howto, which may be due to the fact that
  these are not very popular in general. In Japan, MO drives are very
  common, especially the 3.5' variety with media in 128MB (maybe not
  available anymore), 230MB, and recently 640MB sizes. I suppose there
  is plenty of info on usage of these drives with Linux in Japanese -
  but that does not help most people for some reason ;-) MODs can be
  used very much like any removable media and are handy for smaller
  backups as the media are relatively inexpensive (about 10US$ / 640MB
  as of 10-98). I can only comment on the usage of 230MB drives with
  SCSI interface.

  Drives used: several, no problems encountered (Olympus, Epson, currently
  Mitsubishi MK230LK3). Drives may have strange jumper setting like "Mac
  Mode" or such - naturally, disable.
  If you decide to get a drive, pay attention the the
  cache size - It can speed things up enormously, still speed will be
  soso compared to hard disks, of course.

  SCSI controllers: NCR53C810-based (Asus PCI-200), Adaptec APA-1460A,
  Adaptec AHA2940.

  Just install the drive as you would do with an additional SCSI hard
  disk. It will show up as such. You don't need a disk in the drive when
  booting.

  There are two ways to format the disks:
  a) A bit like a floppy. Just run mkfs on the raw device i.e. something like
  sdb or sdc. I don't recommend this in general (see below).
  b) Like a hard disk. Do fdisk on the raw device and then mkfs on the
  partition as you would for a hard disk (like sdc0, I have never made
  multiple partitions on a MOD).

  What I have not tried is to boot from MOD, yet I cannot see why it
  should not work. I would only recommend it for emergency system
  recovery, however, due to MO drive performance.

  Note: Purchased disks for Doze or Windog may be formatted "like
  floppies" and cannot be used with either O(gre)S right away while MODs
  formatted under linux as hard disks (partition FAT16 / type 6 and
  mkdosfs) will work fine (only tested with NT 3.5/4.0).  Fdisk will
  issue a warning upon exit that concerned FAT16 partitions and you do
  better to take it seriously (look at the fdisk man-page).  The sector
  size will not be automatically set properly for mkdosfs. Use "mkdosfs
  -s 8". That came from some Japanese Web site in mid 1995 (Thanks to Ken
  Kawabata for finding and deciphering it). Using the vfat file-system
  with the disks works fine. I have only used FAT/DOSfs or Linux/ext2
  formatted disks so far.

  Additional Note: The media are probably a bit sensitive. Of course to
  magnetic fields, but also to mechanical stress, some formats seem
  to be more fragile than others (Mac format seemingly worst, data loss has
  occurred when dropping disks during sneaker net traffic).


  Though this does not steer anyone through particularly dense
  jungle, it may be nice for completeness.


          Steve

  --
  ***********************cut*here*or*do*not********************************
          S. Shuichi Haupt
          email stephan@bios.t.u-tokyo.ac.jp
          http://www.bios.t.u-tokyo.ac.jp/~stephan/

  ---------------- December 11 1998 update from Steve -------------------

  OK, some problems will arise with MO disks occasionally. the safest
  way to avoid them is not to use the disks "off the shelf".  trying to
  mount disks can even result in kernel panics. i accidentally tried to
  mount a 640MB disk (format windows95 it said, so maybe FAT32) as -t
  vfat, this is not a thing to try.

  also, 2.0.x kernels don't support 2048b block size (also 640MB disks).
  a patch for 2.0.3x kernels seems to float around somewhere in Japan,
  but i have not yet gotten hold of it.  here a link that certainly has
  an English description:
  http://elektra.e-technik.uni-ulm.de/~mbuck/linux/patches.html
  or search the u-tokyo.ac.jp domain. the page of the developers is
  hidden somewhere.

  the best way to use these 640MB disks is therefore to do fdisk and
  mkfs first. i have only done this with mke2fs on type 83 partitions:
  mke2fs -b 2048 /dev/sdxy

  i will check it out for FAT16 partitions and mkdosfs when i have some
  spare time and disks.

  my kernel version used is 2.1.124 (for all of the above).

  Steve
  --
  ***********************cut*here*or*do*not********************************
          Stephan Shuichi
  office: Dept. for Mechano-Informatics, Yoshizawa Lab.
          Faculty for Engineering, University of Tokyo
          Tel 03-3812-2111 ext 6390, FAX 03-5802-2957
          email stephan@bios.t.u-tokyo.ac.jp
          http://www.bios.t.u-tokyo.ac.jp/~stephan/
  private: --



  4.3.  Fujitsu DynaMO 640 - Phil Garcia

  pgarcia@execpc.com

    You've probably already received a number of messages regarding the
  Fujitsu DynaMO 640 - I have the 640SZI, which is the internal version;
  the model number given in a SCSI probe is M2513-MCC3064SS.  I recently
  installed this drive practically without a hitch.  I say practically
  because the sector size of the 640 MB disks is 2048 bytes, which is
  not supported in the Linux 2.0.x kernel but is supported in the
  development kernels.  A patch for 2.0.x is available at
  http://wwwcip.informatik.uni-erlangen.de/~orschaer/mo/
  -- also at this site is a patched fdisk to use in conjunction with it.

  Otherwise, installing the drive was no different from installing a
  SCSI hard drive.  It runs well, and I'm very happy with it.

  Phil Garcia



  4.4.  Panasonic LF-7010 - Philip Kerr

  philip_kerr_at_wmc__brsf2@wmcmail.wmc.ac.uk



       Dear Skip

       In your Optical HOWTO, you asked for anyone else's experiences of
       installing optical drives under Linux.

       Please find below details of how I managed to get a Panasonic LF-7010
       (SCSI) working on my Sparc Classic.

       I'm using Redhat, 4.2 and 5.1

       Regards

       Philip Kerr
       philip.kerr@wmc.ac.uk


       ps I'm now trying to get the drive to work under Solaris 2.6... it's
       not an easy a job as it was under Linux!!
       ------------------------


       plugged the drive in (on id5)...

       powered up the Sparc...


       the following came up....

       scsi0 : Sparc ESP100A-FAST
       scsi : 1 host.
       Vendor: SAMSUNG   Model: WN32162U          Rev: 0100
       Type:   Direct-Access                      ANSI SCSI revision: 02

       Detected scsi disk sda at scsi0, channel 0, id 3, lun 0
       Vendor: MATSHITA  Model: LF-7010  (00:06)  Rev: 1.42
       Type:   Optical Device                     ANSI SCSI revision: 02
       Detected scsi removable disk sdb at scsi0, channel 0, id 5, lun 0 scsi
       : detected 2 SCSI disks total.
       esp0: target 3 [period 100ns offset 15 10.00MHz FAST SCSI-II]
       SCSI device sda: hdwr sector= 512 bytes. Sectors= 4236661 [2068 MB]
       [2.1 GB]
       esp0: target 5 [period 248ns offset 4 4.03MHz synchronous SCSI] sdb :
       READ CAPACITY failed.
       sdb : status = 0, message = 00, host = 0, driver = 28 sdb : extended
       sense code = 2
       sdb : block size assumed to be 512 bytes, disk size 1GB.
       sunlance.c:v1.9 21/Aug/96 Miguel de Icaza (miguel@nuclecu.unam.mx)
       eth0: LANCE 08:00:20:04:3d:cf
       eth0: using auto-carrier-detection.
       Partition check:
       sda: sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8
       sdb:scsidisk I/O error: dev 08:10, sector 0, absolute sector 0 unable
       to read partition table

       I edited my fstab, adding the entry for the drive (on sdb)

       ==========
       /etc/fstab
       ==========
       /dev/sda1          /                       ext2    defaults        1 1
       /dev/sda2          swap                    swap    defaults        0 0
       /dev/fd0           /mnt/floppy             msdos   noauto,user     0 0
       /dev/sr0           /mnt/cdrom              iso9660 noauto,ro,user  0 0
       /dev/sdb           /mnt/optical            ext2    noauto,rw,user  0 0
       none               /proc                   proc    defaults        0 0

       Then mkfs'ed a blank disc as follows...

       [root@localhost me]# /sbin/mkfs -t ext2 /dev/sdb

       mke2fs 1.10, 24-Apr-97 for EXT2 FS 0.5b, 95/08/09 /dev/sdb is entire
       device, not just one partition! Proceed anyway? (y,n) y
       Linux ext2 filesystem format
       Filesystem label=
       118320 inodes, 472448 blocks
       23622 blocks (5.00%) reserved for the super user First data block=1
       Block size=1024 (log=0)
       Fragment size=1024 (log=0)
       58 block groups
       8192 blocks per group, 8192 fragments per group 2040 inodes per group
       Superblock backups stored on blocks:
       8193, 16385, 24577, 32769, 40961, 49153, 57345, 65537, 73729, 81921,
       90113, 98305, 106497, 114689, 122881, 131073, 139265,
       147457,
       155649, 163841, 172033, 180225, 188417, 196609, 204801,
       212993, 221185,
       229377, 237569, 245761, 253953, 262145, 270337, 278529,
       286721, 294913,
       303105, 311297, 319489, 327681, 335873, 344065, 352257,
       360449, 368641,
       376833, 385025, 393217, 401409, 409601, 417793, 425985,
       434177, 442369,
       450561, 458753, 466945

       Writing inode tables: done
       Writing superblocks and filesystem accounting information: done

       rebooted...

       mounted the drive...

       I've since then edited the fstab, adding the following mount-point...

       /dev/sdb           /mnt/dostical          msdos   noauto,rw,user 0 0

       I can now mount ext2 or dos formatted optical carts by mounting either
       optical or dostical.



  5.  Optical jukeboxes

  I have no experience with optical jukeboxes with Linux!!!!  I have had
  experiences with Optical jukeboxes under HP-UX. In this setup the the
  jukebox had a SCSI address of it's own. Each slot in the jukebox had
  an associated LUN number. A device name was assigned for each disk
  slot A side and B side. The mount command was run against the
  appropriate device name. I had a jukebox with just one drive and 16
  optical disk slots - 20 Gig. I thought it was going to be a real
  hassle to write a disk mount manager to share this drive among users
  until I discovered you can mount as many disk as you want and the
  jukebox driver takes care of arbitration - what a nice feature.
  Granted, you only want archive type data here and your overall system
  configuration to be such that not too many processes will be accessing
  the jukebox at the same time. The disk spin down, carriage load,
  carriage move, carriage unload, carriage move to the next disk,
  carriage next disk load, carriage move, optical drive load, and spin
  up takes about 12 seconds - "seek-from-hell".

  5.1.  Maxoptix 520 - Zed Shaw

  shawz@imap1.asu.edu

  5.1.1.  Zed's Origional E-Mail - Feb 13 1998


  Hi,

  I was reading your howto (a life saver, thanks) and I was wondering what
  kind of jukebox you were running?  I have a Maxoptix 520 Jukebox (20
  disks at 2.6G each, nice!) and I would like to connect it to a Linux box
  and serve the drives up to my users, but I'm having problems accessing
  the individual drives.   Currently I can only access the two drives and
  something called MAXLYB which I think is a controller device of some
  sort.

  Basically, I'm wondering if the jukebox you had was the same or similar
  and how you set it up.  I know that you did it under HP-UX, but any help
  right now would be nice.  Hey, I'll even let you log into my linux
  server if you want to take a look at the jukebox and see what it does.
  You can't beat 52Gig of storage!

  Anyway, I'd really appreciate your help.


  Zed A. Shaw
  Application Systems Analyst
  Arizona State University



  5.1.2.  Corrospondance with Zed on Mon, 16 Feb 1998:



  > It sounds like your Maxoptix 520 is a jukebox with two physical disk.
  Yep, that's the one.

  >
  > All jukeboxes have a carriage controller. This is probably your MAXLYB
  > device.
  > ...

  What I've come to find out is that Maxoptix is pretty stingy when it
  comes to drivers.  Apparently, they don't make driver software for any of
  their Jukebox carriage controller interfaces!  I don't know how some of
  these companies stay in business.  I'm going to pester them again soon,
  but you are right, this thing will need a carriage controller driver to
  operate.  The cool thing is that this MX520 (that's the model number of
  the juke) emulates a whole slew of other carriage controllers, so maybe
  one of those other guys has a driver.  I'll be looking into that too.


  >
  > You might want to get a-hold of Maxoptix and see if they have a install
  > package for your linux kernel version. If not ask them for the programmers
  > specification for the carriage controller and maybe we can write one!
  >

  Hey, if I can't find any driver software, and I can convince Maxoptix to
  give me the specs, I'd be more than glad to write a driver.  I'd could
  sure use the help too since I haven't got enough time to do it on my
  own.  Also, do you know of anyone else doing this that we might be able
  to hack off of?


  > Any information you find, let me know and we will roll the information
  > into the Optical HOWTO, acknowledgments of course!
  >

  Sure, but let me get some new information first.  So far things are
  looking pretty bleak.

  >
  > >Basically, I'm wondering if the jukebox you had was the same or similar
  > >and how you set it up.  I know that you did it under HP-UX, but any help
  > >right now would be nice.  Hey, I'll even let you log into my linux
  > >server if you want to take a look at the jukebox and see what it does.
  > >You can't beat 52Gig of storage!
  >
  > Nice. At home I can use PPP to mount my 84 platter HP-UX jukebox.
  > It's slow though - I wish I had it at home.

  Oh, I don't have this thing at home.  There's no way I could afford the
  $30,000 my boss paid for this thing.  But he's stuck with it and has had
  it sitting around collecting dust for a year, so he's letting me play
  with it and try to find a use for it.

  I'll get back with you when I have some more information.  It should be
  sometime this week when I find out if I can get it to work or not.

  Zed



  Oracle Database HOWTO
  Paul Haigh, paul@nailed.demon.co.uk
  v1.2, 4 August 1998

  A guide to installing and configuring the Oracle Database Server on a
  Linux system
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Version History
     1.2 Copyright
     1.3 Disclaimer
     1.4 Aim of the HOWTO
     1.5 Requirements
     1.6 News From Oracle Corporation

  2. Installing the Oracle Software

     2.1 Server Preparation
        2.1.1 Creating an Oracle User
     2.2 Installing from CDROM
     2.3 Post Installation Tasks
        2.3.1 Tasks for Root
        2.3.2 Tasks for Oracle
        2.3.3 Things you can remove

  3. Creating a Database

     3.1 Create the Initialisation File
     3.2 Creating the Database Install Script
     3.3 Running the Database Installation Script
     3.4 Starting the Database
     3.5 Stopping the Database
     3.6 Create a Default User

  4. Configuring SQL*Net on the Server

     4.1 (TT
     4.2 (TT
     4.3 (TT
     4.4 Starting and Stopping the Listeners

  5. Client Configuration

     5.1 Windows Clients
     5.2 Unix Clients

  6. Automatic Startup and Shutdown

     6.1 (TT
     6.2 (TT

  7. Other Bits

     7.1 Intelligent Agent

  8. Troubleshooting

     8.1 I cannot create a database when using Oracle 7.2.x.
     8.2 I'm getting segmentation faults in

  9. Credits



  ______________________________________________________________________

  1.  Introduction

  1.1.  Version History



  o  v0.1 - 21 Feb 1998 - Paul Haigh - Original Version.

  o  v0.2 - 01 Mar 1998 - Paul Haigh - Comments From Proofreaders Added.

  o  v1.0 - 10 Mar 1998 - Paul Haigh - First Release to LDP.

  o  v1.1 - 20 Jun 1998 - Paul Haigh - Added troubleshooting section &
     general tidyup.

  o  v1.2 - 04 Aug 1998 - Paul Haigh - Added Oracle Corp News & Removed
     Section on Future Enhancements.

  1.2.  Copyright

  The Oracle Database HOWTO copyright (c) 1998, Paul Haigh.

  Like all Linux HOWTO documents, this may be reproduced and distributed
  in whole or in part, in any medium, physical or electronic, so long as
  this copyright notice is retained on all copies.

  Commercial redistribution is allowed and encouraged; however the
  author would like to be notified of such distributions. You may
  translate this HOWTO into any language whatsoever provided that you
  leave this copyright statement and disclaimer intact, and that you
  append a notice stating who translated the document.

  1.3.  Disclaimer

  While I have tried to include the most correct and up to date
  information available to me, I cannot guarantee that usage of
  information in this document does not result in loss of data or
  equipment. I provide NO WARRANTY about the information in the HOWTO
  and I cannot be made liable for any consequences resulting from using
  the information in this HOWTO.

  1.4.  Aim of the HOWTO

  In this HOWTO I will attempt to cover installation and basic admin of
  an Oracle database running on a Linux machine.  In particular I will
  cover Oracle server installation, SQL*Net configuration and client
  configuration.


  This document is not an in depth tutorial on using or administering an
  Oracle database, if that is what you are looking for there are great
  books on those subjects published by O'Reilly and others.


  I am also not going to cover the development of Oracle programs under
  UNIX.  If this is absolutley necessary to you then I would recommend
  that you purchase the SCO development system (with OpenServer 5.x)
  from SCO, which I am told can be obtained for a very reasonable US
  $19, from www.sco.com.

  1.5.  Requirements

  I am assuming a number of items that you will need for following the
  HOWTO.

  o  Oracle Server CD for SCO Openserver (Version 7.3.3.0.0.)

        This must be a legal copy.  Remember that Oracle are a profit
        making company and charge for their products.  If you want a
        free SQL compliant database use PostgresSQL or similar.

        It is also possible to install oracle, using a 60 day evaluation
        licence, from a downloadable tar file from the Oracle web site.
        I have not personally tried this and it is completely
        unverified.



  o  A Linux Server


        You wouldn't be reading this without one...would you?



  o  Kernel 2.0.30+


        I cannot guarantee that these instructions will be accurate for
        any other Kernel.  (Not that I am guaranteeing it for 2.0.30
        either...).



  o  iBCS


        It is very important to have this installed and working with the
        latest possible version for your platform.  (I am using
        iBCS-2.0-10.i386.rpm from Redhat Linux).



  o  Lots of disc space


        600 Mb+ is a reasonable amount.  It is possible to install with
        less but you need to make some sacrifices, and I never like
        starting with those.  However, I will attempt to point out areas
        in which space can be freed up.



  o  32Mb+ Ram


        I know that this sounds like a lot, especially in Linux terms,
        but remember that Oracle is a complex piece of software.  You
        wouldn't have the same reservations on SCO!


        I am not saying that Oracle doesn't work with less, just that it
        is less than Oracle recommend and I wouldn't suggest it.



  o  Licenses from Oracle


        I know that I have already mentioned this but I want to be clear
        that this is important.  Using software from Oracle without a
        license is illegal.



  1.6.  News From Oracle Corporation

  Oracle have bowed into pressure from the Linux community.  Oracle
  Corporation have decided to officially support Oracle 8 on the Linux
  (i386) platform.  This should be released in December 1998, according
  to the Oracle website.


  Better still Oracle will also be porting Oracle Applications to the
  linux platform.  This should be available in the first half of 1999,
  according to the Oracle website.

  References:

  o  http://www.oracle.com/html/linux.html

  o  http://www.news.com/News/Item/0,4,24436,00.html

  o  http://www.zdnet.com/pcweek/news/0720/20morac.html


  2.  Installing the Oracle Software

  2.1.  Server Preparation

  2.1.1.  Creating an Oracle User

  Unsurprisingly we require a user to hold the Oracle database.  Since
  we have no desire to relink the Oracle kernel (more about that later)
  we have to accept the Oracle defaults for user name and group name.
  This includes the user ORACLE and the group DBA.


  1. Login as Root


  2. Create the oracle user and the group dba.


       ______________________________________________________________________
       $ groupadd dba
       $ useradd  oracle
       ______________________________________________________________________



  3. Ensure a home directory is created for the user oracle.


       ______________________________________________________________________
       $ mkdir /home/oracle
       $ mkdir /home/oracle/7.3.3.0.0 (Version of Oracle)
       $ chown -R oracle.dba /home/oracle
       ______________________________________________________________________



  2.2.  Installing from CDROM

  Unfortunately the Oracle Installer on the SCO disc will not work.  A
  variety of problems can be experienced, from core dumps to hangs.  As
  a result we need to copy the files from the CDROM manually and
  uncompress them:
  (Ensure the CDROM is mounted on the system).

  1. Log on as Oracle

  2. Change directory to /home/oracle/7.3.3.0.0.

  3. Copy all install files from CDROM


       ______________________________________________________________________
       $ cp -a /mnt/cdrom/* .
       ______________________________________________________________________



  4. Un-compress all Oracle files on CDROM.


       ______________________________________________________________________
       $ find . -name *_ -exec ~/7.3.3.0.0/orainst/oiuncomp {} \;
       ______________________________________________________________________



  2.3.  Post Installation Tasks

  2.3.1.  Tasks for Root

  Add the following lines to /etc/profile or add to the .profile for
  each user who is going to use Oracle.


       ______________________________________________________________________
       # Oracle Specific
       ORACLE_HOME=/home/oracle/7.3.3.0.0
       ORACLE_SID=orcl
       ORACLE_TERM=vt100
       export ORACLE_HOME ORACLE_SID ORACLE_TERM

       # Alter path for Oracle
       PATH="$PATH:$ORACLE_HOME/bin"
       ______________________________________________________________________



  We also need to change the owner and permissions of the Oracle ulimit
  increase utility.


       ______________________________________________________________________
       $ chown root.root $ORACLE_HOME/bin/osh
       $ chmod u+s $ORACLE_HOME/bin/osh
       ______________________________________________________________________



  2.3.2.  Tasks for Oracle

  Change permissions for the Oracle files to ensure correct operation.


       ______________________________________________________________________
       $ chmod +x $ORACLE_HOME/bin/*
       $ chmod u+s $ORACLE_HOME/bin/oracle
       ______________________________________________________________________



  Oracle tools require the messages to be in the
  $ORACLE_HOME/tool_name/mesg directory.  So, move the msb files from
  the msg_ship directories to the mesg directories.


       ______________________________________________________________________
       $ mv $ORACLE_HOME/plsql/mesg/mesg_ship/* $ORACLE_HOME/plsql/mesg/.
       $ mv $ORACLE_HOME/rdbms/mesg/mesg_ship/* $ORACLE_HOME/rdbms/mesg/.
       $ mv $ORACLE_HOME/svrmgr/mesg/mesg_ship/* $ORACLE_HOME/svrmgr/mesg/.
       ______________________________________________________________________



  Create the following directories if they do not exist:


       ______________________________________________________________________
       $ mkdir $ORACLE_HOME/rdbms/log
       $ mkdir $ORACLE_HOME/rdbms/audit
       $ mkdir $ORACLE_HOME/network/log
       ______________________________________________________________________



  2.3.3.  Things you can remove

  The following directories can safely be removed:

  o  $ORACLE_HOME/guicommon2/

  o  $ORACLE_HOME/ctx/

  o  $ORACLE_HOME/md/

  o  $ORACLE_HOME/mlx/

  o  $ORACLE_HOME/precomp/

  o  $ORACLE_HOME/slax/

  3.  Creating a Database

  Now the Oracle server is installed we need to create a database to
  test the installation.

  If you are using Oracle 7.2.x or earlier, please read the
  troubleshooting section below.



  3.1.  Create the Initialisation File

  Copy the $ORACLE_HOME/dbs/init.ora to $ORACLE_HOME/dbs/initorcl.ora:


       ______________________________________________________________________
       $ cd $ORACLE_HOME/dbs
       $ cp init.ora initorcl.ora
       ______________________________________________________________________



  Modify it by adding the following lines:


       ______________________________________________________________________
       db_name = orcl
       COMPATIBLE=7.3.3.0.0
       ______________________________________________________________________



  3.2.  Creating the Database Install Script

  Create a script file called makedb.sql in the $ORACLE_HOME/dbs
  directory:


       ______________________________________________________________________
       connect internal
       startup nomount
       set echo on
       spool makedb.log
       create database orcl
               maxinstances 1
               maxlogfiles  8
               datafile '$ORACLE_HOME/dbs/orcl_syst_01.dbf' size 40M reuse
               logfile
                       '$ORACLE_HOME/dbs/orcl_redo_01.dbf' size 1M reuse,
                       '$ORACLE_HOME/dbs/orcl_redo_02.dbf' size 1M reuse,
                       '$ORACLE_HOME/dbs/orcl_redo_03.dbf' size 1M reuse;
       @$ORACLE_HOME/rdbms/admin/catalog.sql
       create tablespace rollback
               datafile '$ORACLE_HOME/dbs/orcl_roll_01.dbf' size 8.5M reuse;
       create tablespace temp
               datafile '$ORACLE_HOME/dbs/orcl_temp_01.dbf' size 5M reuse
               temporary;
       create tablespace users
               datafile '$ORACLE_HOME/dbs/orcl_user_01.dbf' size 10M reuse;
       create rollback segment r1 tablespace rollback
               storage ( optimal 5M );
       alter rollback segment r1 online;
       connect system/manager
       @$ORACLE_HOME/rdbms/admin/catdbsyn.sql
       connect internal
       @$ORACLE_HOME/rdbms/admin/catproc.sql
       connect system/manager
       @$ORACLE_HOME/sqlplus/admin/pupbld.sql
       spool off
       exit
       ______________________________________________________________________

  3.3.  Running the Database Installation Script

  Start svrmgrl and run the script:


       ______________________________________________________________________
       $ cd $ORACLE_HOME/dbs
       $ svrmgrl

       Oracle Server Manager Release 2.3.3.0.0 - Production

       Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.

       Oracle7 Server Release 7.3.3.0.0 - Production Release
       PL/SQL Release 2.3.3.0.0 - Production

       SVRMGR> connect internal
       Connected.
       SVRMGR> startup nomount
       ORACLE instance started.
       Total System Global Area       4313312 bytes
       Fixed Size                       41876 bytes
       Variable Size                  4140364 bytes
       Database Buffers                122880 bytes
       Redo Buffers                      8192 bytes
       SVRMGR> @makedb
       <loads of messages>
       SVRMGR> exit
       Server Manager complete.
       ______________________________________________________________________



  3.4.  Starting the Database

  Firstly, we need to bring up the database by hand (we will automate
  this later on).  To startup an Oracle database we need to issue the
  startup command when connected internally:


       ______________________________________________________________________
       $ svrmgrl

       Oracle Server Manager Release 2.3.3.0.0 - Production

       Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.

       Oracle7 Server Release 7.3.3.0.0 - Production Release
       PL/SQL Release 2.3.3.0.0 - Production

       SVRMGR> connect internal
       Connected.
       SVRMGR> startup
       ORACLE instance started.
       Total System Global Area       4313316 bytes
       Fixed Size                       41876 bytes
       Variable Size                  4140368 bytes
       Database Buffers                122880 bytes
       Redo Buffers                      8192 bytes
       Database mounted.
       Database opened.
       SVRMGR> exit
       Server Manager complete.
       ______________________________________________________________________

  3.5.  Stopping the Database

  It is worth mentioning here that restarting a Linux server without
  shutting down the Oracle database first there is a high risk of
  corrupting the database.

  So, before we issue the Linux shutdown command it is wise to bring
  down the database:


       ______________________________________________________________________
       $ svrmgrl

       Oracle Server Manager Release 2.3.3.0.0 - Production

       Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.

       Oracle7 Server Release 7.3.3.0.0 - Production Release
       PL/SQL Release 2.3.3.0.0 - Production

       SVRMGR> connect internal
       Connected.
       SVRMGR> shutdown
       Database closed.
       Database dismounted.
       ORACLE instance shut down.
       SVRMGR> exit
       Server Manager complete.
       ______________________________________________________________________



  3.6.  Create a Default User

  The database, as created, has a two special users which are
  automatically created.  These are:


       ______________________________________________________________________
       Username                Password

       SYSTEM                  MANAGER
       SYS                     change_on_install
       ______________________________________________________________________



  These users are typically used to hold the standard data dictionary
  information for the database.  It is a good idea to change the
  passwords from the defaults as soon as possible.

  This can be achieved by:



  ______________________________________________________________________
  sqlplus system/manager

  SQL*Plus: Release 3.3.3.0.0 - Production on Sat Feb 21 12:43:33 1998

  Copyright (c) Oracle Corporation 1979, 1996.  All rights reserved.


  Connected to:
  Oracle7 Server Release 7.3.3.0.0 - Production Release

  SQL> alter user system identified by <newpassword>;

  User altered.

  SQL> alter user sys identified by <newpassword>;

  User altered.

  SQL> exit;
  Disconnected from Oracle7 Server Release 7.3.3.0.0 - Production Release
  PL/SQL Release 2.3.3.0.0 - Production
  ______________________________________________________________________



  Since the user system/manager is similar to using root on a UNIX
  machine, we need to create a user with less ability to cause damage.
  (remember to bring up the database before attempting to create a user)

  Connect to SQL*Plus and create a user:


       ______________________________________________________________________
       $ sqlplus system/manager

       SQL*Plus: Release 3.3.3.0.0 - Production on Sat Feb 21 12:43:33 1998

       Copyright (c) Oracle Corporation 1979, 1996.  All rights reserved.


       Connected to:
       Oracle7 Server Release 7.3.3.0.0 - Production Release
       PL/SQL Release 2.3.3.0.0 - Production

       SQL> create user <user> identified by <psw>
         2  default tablespace users
         3  temporary tablespace temp;

       User created.

       SQL> grant connect, resource to <user>

       Grant succeeded.

       SQL> exit
       Disconnected from Oracle7 Server Release 7.3.3.0.0 - Production Release
       PL/SQL Release 2.3.3.0.0 - Production
       ______________________________________________________________________



  Now that you have a new user on the system you can play with the new
  system.  To login to the Oracle database:


       ______________________________________________________________________
       $ sqlplus <user>/<password>
       ______________________________________________________________________



  If this completes with no error messages then you have a working
  Oracle database.  If you never want to connect to this database from
  anywhere but this server then the job is complete, enjoy!

  If, however, like most people you want to configure the networking
  software so that you can connect from other machines, keep on reading.

  4.  Configuring SQL*Net on the Server

  All of these files configure the Oracle networking software (SQL*Net,
  aka Net8 for Oracle8).  These files should all be created on the
  server in the $ORACLE_HOME/network/admin directory.

  4.1.  tnsnames.ora

  The TNSNAMES.ORA file identifies services available from the machine.
  On our instance here we will describe all databases that the server
  has mounted.  For each database instance on your server add a section
  like below:


       ______________________________________________________________________
       orcl.world =
         (DESCRIPTION =
           (ADDRESS_LIST =
               (ADDRESS =
                 (COMMUNITY = tcp.world)
                 (PROTOCOL = TCP)
                 (Host = <INSERT HOST NAME OF SERVER HERE> )
                 (Port = 1521)
               )
               (ADDRESS =
                 (COMMUNITY = tcp.world)
                 (PROTOCOL = TCP)
                 (Host = <INSERT HOST NAME OF SERVER HERE> )
                 (Port = 1526)
               )
           )
           (CONNECT_DATA = (SID = ORCL)
           )
         )
       ______________________________________________________________________



  4.2.  listener.ora

  The listener.ora file contains the descriptions of the services that
  other machines are allowed to connect to and any configuration that is
  required for the server listener.

  It contains sections for the listener name, listener address,
  databases served by the listener and configuration parameters.

  Here is an example:


       ______________________________________________________________________
       # Name of listener and addresses to listen on
       LISTENER =
               ( ADDRESS_LIST =
                       (ADDRESS =
                               (PROTOCOL=tcp)
                               (HOST=<INSERT HOST>)
                               (PORT=1521)
                               (COMMUNITY=UK_SUP_TCPIP)
                       )
                       (ADDRESS =
                               (PROTOCOL=ipc)
                               (KEY=700)
                               (COMMUNITY=UK_SUP_TCPIP)
                       )
               )

       # List of services served by this listener
       SID_LIST_LISTENER=
               (SID_LIST=
                       (SID_DESC=
                               (SID_NAME=orcl)
                               (ORACLE_HOME=/home/oracle/7.3.3.0.0)
                       )
               )

       # Start of configuration parameters.
       TRACE_LEVEL_LISTENER=OFF
       TRACE_FILE_LISTENER = "listener"
       LOG_FILE_LISTENER = "listener"
       CONNECT_TIMEOUT_LISTENER = 10
       STOP_LISTENER = YES
       DBA_GROUP = dba
       ______________________________________________________________________



  4.3.  sqlnet.ora

  The sqlnet.ora file contains configuration for the particular node of
  the network.  This is independent of the number of databases or the
  number of listeners.  The most important thing in this file is the
  Dead Connection Timeout configuration variable.

  Dead connection timeout checks every incoming process to a database
  instance and ensures that the client end of it is still responding.
  If the client (of whatever type) is not responding then the Oracle
  server shadow process is killed.

  This is very useful if you have many clients accessing a database,
  especially during a developmental phase when those clients are more
  likely to be failing to exit cleanly from the Oracle database.

  Below is a copy of my own sqlnet.ora file for you to puruse:



  ______________________________________________________________________
  TRACE_LEVEL_CLIENT = OFF
  sqlnet.expire_time = 30         # The number of seconds between client checks.
  names.default_domain = world
  name.default_zone = world
  ______________________________________________________________________



  4.4.  Starting and Stopping the Listeners

  Now that the configuration of the listeners and SQL*Net is complete we
  can attempt to connect to the database using the networking software.
  (Before we were using direct links to the database, whereas here we
  are simulating a connection from a remote client machine).

  To start the listener using the above configuration:


       ______________________________________________________________________
       $ lsnrctl

       LSNRCTL for SCO System V/386: Version 2.3.3.0.0 - Production on 23-FEB-98 20:38:25

       Copyright (c) Oracle Corporation 1994.  All rights reserved.

       Welcome to LSNRCTL, type "help" for information.

       LSNRCTL> start
       Starting /home/oracle/7.3.3.0.0/bin/tnslsnr: please wait...

       TNSLSNR for SCO System V/386: Version 2.3.3.0.0 - Production
       System parameter file is /home/oracle/7.3.3.0.0/network/admin/listener.ora
       Log messages written to /home/oracle/7.3.3.0.0/network/log/listener.log
       Listening on: (ADDRESS=(PROTOCOL=tcp)(DEV=6)(HOST=192.168.1.1)(PORT=1521))
       Listening on: (ADDRESS=(PROTOCOL=ipc)(DEV=10)(KEY=700))

       Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=magic.com)(PORT=1521)(COMMUNITY=UK_SUP_TCPIP))
       STATUS of the LISTENER
       ------------------------
       Alias                     LISTENER
       Version                   TNSLSNR for SCO System V/386: Version 2.3.3.0.0 - Production
       Start Date                23-FEB-98 20:38:50
       Uptime                    0 days 0 hr. 0 min. 0 sec
       Trace Level               off
       Security                  OFF
       SNMP                      ON
       Listener Parameter File   /home/oracle/7.3.3.0.0/network/admin/listener.ora
       Listener Log File         /home/oracle/7.3.3.0.0/network/log/listener.log
       Services Summary...
         orcl          has 1 service handler(s)
       The command completed successfully
       LSNRCTL> exit
       ______________________________________________________________________



  To stop the listeners:



  ______________________________________________________________________
  $ lsnrctl

  LSNRCTL for SCO System V/386: Version 2.3.3.0.0 - Production on 23-FEB-98 20:43:20

  Copyright (c) Oracle Corporation 1994.  All rights reserved.

  Welcome to LSNRCTL, type "help" for information.

  LSNRCTL> stop
  Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=magic.com)(PORT=1521)(COMMUNITY=UK_SUP_TCPIP))
  The command completed successfully
  LSNRCTL> exit
  ______________________________________________________________________



  If you have a DNS setup which doesn't return the IP address for the
  hostname specified then starting and stopping the listener can take
  some time (2-3 mins. dependant on the DNS timeout variable).  If this
  is the case, don't worry, be patient.



  5.  Client Configuration

  5.1.  Windows Clients

  SQL*Net configuration on the PC using newer versions of the Oracle
  Client Software is very easy.  The best (and easiest) way of achiving
  a fully working client installation is to use the SQL*Net Easy
  Configuration tool supplied by Oracle.

  This toolhas a wizard type interface to take you through the
  installation of the tnsnames.ora and sqlnet.ora files.

  Select "Add Database Alias" and enter a name for the alias when
  prompted.  This alias is the name you will refer to the database
  instance as, and as such should be the same as the instance name (orcl
  in this case).

  Select TCP/IP as the protocol, and when prompted the hostname of the
  machine hosting the database and the instance name of the database.

  That's it.

  However, if you do not have the SQL*Net Easy Configuration Tool then
  don't worry.  You can simply create the tnsnames.ora and the
  sqlnet.ora files in the $ORACLE_HOME/network/admin directory on the
  client exactly as they are on the server.  This will provide an alias
  the same as on the server (always a good idea anyway).

  5.2.  Unix Clients

  UNIX clients are not very different that windows clients.  If you have
  the Network Manager from Oracle then user that in the same way as
  above, if not then you can, again, just use the same configuration
  files as the server in the $ORACLE_HOME/network/admin directory.

  6.  Automatic Startup and Shutdown

  6.1.  dbstart  & dbstop

  The automatic startup and shutdown of the Oracle database can be
  achieved (in 7.3.3.0.0) with the files dbstart and dbshut both
  provided by Oracle.  These files rely on the existance of the file
  /etc/oratab to work (although by altering the dbshut and dbstart files
  this can be moved).

  The format of the /etc/oratab file is as follows:


       ______________________________________________________________________
       SID:ORACLE_HOME:AUTO
       ______________________________________________________________________



  An example:


       ______________________________________________________________________
       orcl:/home/oracle/7.3.3.0.0:Y
       leaveup:/home/oracle/7.3.2.1.0:N
       ______________________________________________________________________



  6.2.  init.d  & rc.d

  To start and stop the database when the machine comes up and goes down
  by modifying the startup routines for the Linux machine.  This is
  quite easy, although I should point out here that this may change
  depending on which flavour of Linux (slackware, debian, redhat, etc).
  I will show examples which work for Redhat Linux 5.0.  To modify these
  for your own flavour of Linux, please see your Linux documentation
  sets.  (Although it should hold true for any Sys V type UNIX).

  Firstly, we need to create the script which will run dbshut and
  dbstart in the /etc/rc.d/init.d directory.  Create the following file
  as /etc/rc.d/init.d/oracle:



  ______________________________________________________________________
  #!/bin/sh
  #
  # /etc/rc.d/init.d/oracle
  # Description: Starts and stops the Oracle database and listeners
  # See how we were called.
  case "$1" in
    start)
          echo -n "Starting Oracle Databases: "
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Starting Oracle Databases as part of system up." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          su - oracle -c dbstart >> /var/log/oracle
          echo "Done."
          echo -n "Starting Oracle Listeners: "
          su - oracle -c "lsnrctl start" >> /var/log/oracle
          echo "Done."
          echo ""
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Finished." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          touch /var/lock/subsys/oracle
          ;;
    stop)
          echo -n "Shutting Down Oracle Listeners: "
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Shutting Down Oracle Databases as part of system down." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          su - oracle -c "lsnrctl stop" >> /var/log/oracle
          echo "Done."
          rm -f /var/lock/subsys/oracle
          echo -n "Shutting Down Oracle Databases: "
          su - oracle -c dbshut >> /var/log/oracle
          echo "Done."
          echo ""
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Finished." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          ;;
    restart)
          echo -n "Restarting Oracle Databases: "
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Restarting Oracle Databases as part of system up." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          su - oracle -c dbstop >> /var/log/oracle
          su - oracle -c dbstart >> /var/log/oracle
          echo "Done."
          echo -n "Restarting Oracle Listeners: "
          su - oracle -c "lsnrctl stop" >> /var/log/oracle
          su - oracle -c "lsnrctl start" >> /var/log/oracle
          echo "Done."
          echo ""
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Finished." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          touch /var/lock/subsys/oracle
          ;;
    *)
          echo "Usage: oracle {start|stop|restart}"
          exit 1
  esac
  ______________________________________________________________________



  It is worth checking that this file actually correctly stops and
  starts the databases for your system.  Check the log file,
  /var/log/oracle for error messages.

  Once this script is working we need to create start and kill symbolic
  links in the appropriate runlevel directories /etc/rc.d/rcX.d.

  The following commands will ensure that the databases will come up in
  runlevels 2,3 and 4:


       ______________________________________________________________________
       $ ln -s ../init.d/oracle /etc/rc.d/rc2.d/S99oracle
       $ ln -s ../init.d/oracle /etc/rc.d/rc3.d/S99oracle
       $ ln -s ../init.d/oracle /etc/rc.d/rc4.d/S99oracle
       ______________________________________________________________________



  To stop the databases on reboot or restart we need the following
  links:


       ______________________________________________________________________
       $ ln -s ../init.d/oracle /etc/rc.d/rc0.d/K01oracle          # Halting
       $ ln -s ../init.d/oracle /etc/rc.d/rc6.d/K01oracle          # Rebooting
       ______________________________________________________________________



  7.  Other Bits

  7.1.  Intelligent Agent

  If you have a need for the Oracle Intelligent Agent, I found that you
  can run it without any configuration changes.  To start the IA try:


       ______________________________________________________________________
       $ lsnrctl dbsnmp_start
       ______________________________________________________________________



  To stop the IA try:


       ______________________________________________________________________
       $ lsnrctl dbsnmp_stop
       ______________________________________________________________________



  There do not appear to be any messages indicating a sucessful or
  otherwise start or stop of the intelligent agent.  However, the IA
  responded to Enterprise manager on the client side so I can only
  assume that it is working.



  8.  Troubleshooting

  See below for various troubleshooting hints.

  8.1.  I cannot create a database when using Oracle 7.2.x.

  The files shipped by Oracle in the 7.2.x product are incorrect in
  assuming that you want to setup a parallel server configuration.  The
  shipped init.ora file has the following line in it:


       ______________________________________________________________________
       # define parallel server (multi-instance) parameters
       ifile = ora_system:initps.ora
       ______________________________________________________________________



  To fix the problem simply comment it out:


       ______________________________________________________________________
       # define parallel server (multi-instance) parameters
       #ifile = ora_system:initps.ora
       ______________________________________________________________________



  8.2.  I'm getting segmentation faults in svrmgrl  under version
  7.3.4.x.

  I've had this problem reported to me by a number of people.  Gerald
  Weber gerald_weber@master.co.at solved it:



  ______________________________________________________________________
  Hi Paul,

  first of all thanks for your help,but none of the possible problems you are
  thinking about were responsible for my problem.
  The problem is the iBCS-emulator itself.
  It seems that Oracle performs an sysconf-calls which isn't supported in the
  current version of iBCS.
  Look at the trace :

  <7>[22]615 sysconf(34)
  <7>iBCS2 unsupported sysconf call 34
  <7>[22]615 sysconf error return linux=-22 -> ibcs=22 <Invalid argument>
  <7>[24]615 sysconf(34)
  <7>iBCS2 unsupported sysconf call 34
  <7>[24]615 sysconf error return linux=-22 -> ibcs=22 <Invalid argument>

  Solution:  patching the iBCS-source.apply the following diff-pach :


  --- sysconf.c   Sun Apr 19 19:19:15 1998
  +++ sysconf.c.ori       Sun Apr 19 19:28:45 1998
  @@ -60,7 +60,6 @@
   #define _SC_JOB_CONTROL        5
   #define _SC_SAVED_IDS  6
   #define _SC_VERSION    7
  -#define _SC_HACK_FOR_ORACLE 34

   #define _SC_PAGESIZE   11

  @@ -97,11 +96,6 @@
                  case _SC_SAVED_IDS: {
                          return (1);
                  }
  -
  -               case _SC_HACK_FOR_ORACLE: {
  -                 return (1);
  -               }
  -

                  case _SC_PAGESIZE: {
                    return PAGE_SIZE;
  ______________________________________________________________________



  9.  Credits

  This document was based on a document written by Bob Withers,
  bwit@pobox.com.  Additional information taken from documents written
  by Georg Rehfeld, rehfeld@wmd.de and David Mansfield,
  david@claremont.com.

  Additional proof reading done by Bob Withers, Mark Watling,
  mwatling@mjw-ltd.demon.co.uk, Peter Sodhi, petersodhi@unn.unisys.com
  and Greg Hankins, greg.hankins@cc.gatech.edu.

  My thanks go to the tremendous support from all the people involved in
  this document and the research that has gone into it.  Particular
  thanks to Bob Withers and Mark Watling for the additional comments and
  help they have provided.



  Oracle for Linux Installation HOWTO
  Stephen Darlington, <stephen@zx81.org.uk>
  $Revision: 1.14 $, $Date: 2000/06/19 21:07:43 $

  With this HOWTO, and a little luck, you will be able to get "Oracle 8i
  Enterprise Edition for Linux" installed, create a database and connect
  to it from a remote machine. The main focus of this guide is RedHat
  Linux 6.0, although it should work more-or-less unchanged for any
  other recent distribution.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 What's in here?
     1.2 Who is this HOWTO for?
     1.3 New versions of this document
     1.4 Disclaimer
     1.5 Credits and Thanks
     1.6 Licence

  2. Starting off

     2.1 Overview
     2.2 Prerequisites
        2.2.1 Hardware
     2.3 Linux setup
        2.3.1 Choice of distribution
        2.3.2 Distribution Setup
        2.3.3 Kernel parameters
        2.3.4 Users and groups
        2.3.5 Installing the right Java Virtual Machine
     2.4 Starting off questions and answers
        2.4.1 Do I really need 128Mb RAM?
        2.4.2 Does it work with RedHat 6.1 or above?
        2.4.3 Does it work with Debian/SuSE/Mandrake/some other distribution?
        2.4.4 Does it work with development kernels?
        2.4.5 Where do I get Oracle from?

  3. The installer

     3.1 How?
     3.2 What do I tell the installation program?
     3.3 Installing the patch
     3.4 Setting up your environment
     3.5 Installations questions and answers
        3.5.1 The installation program exits with 'CreateOUIProcess()'
        3.5.2 The installer just flashes on the screen and then vanishes
        3.5.3 Strange Java errors when I start the installation program?
        3.5.4 The installation program 'Segmentation Fault's
        3.5.5 Problems loading shared libraries
        3.5.6 Pro*C doesn't work
        3.5.7 I installed the patch but it made things worse!
        3.5.8 Oracle thinks I don't have enough disk space

  4. Creating a database

     4.1 Overview
     4.2 Step-by-step guide
     4.3 Questions and answers
        4.3.1 Is it really that easy?
        4.3.2 Is it really necessary to put all the files on different disks?
        4.3.3 I can't start dbassist
        4.3.4 I get "ORA-01034: ORACLE not available"
        4.3.5 I get "ORA-01012: Not logged in"
        4.3.6 Can datafiles only be 1Gb in size?

  5. Configuration

     5.1 Overview
     5.2 Connecting as another user
     5.3 Connecting from another machine
     5.4 Connecting to another machine
     5.5 Questions and answers
        5.5.1 I can't start 'netasst'

  6. Final Words

     6.1 Useful Software
     6.2 Useful Books
     6.3 Useful Internet resources


  ______________________________________________________________________

  1.  Introduction

  1.1.  What's in here?

  Linux is well known for being difficult and, generally, user hostile.
  Being a bit of a Unix fan I'm not sure whether I agree with that or
  not.

  Oracle is similar I guess. Initially it's difficult to get to grips
  with, but it's difficult to work with any other RDBMS when you're used
  to it.

  Combine the two, remember that 8i is only the second production
  release, and you realise that this isn't going to be straight-forward,
  even if you're familiar with both.

  I am, but I had problems. Many problems were my own stupidity or
  hubris, but I document them for completeness.


  1.2.  Who is this HOWTO for?

  First, this document is for people who want to install Oracle 8i
  version 8.1.5 on Linux. It does not cover any earlier versions,
  although it should work with similar later versions such as 8.1.6.

  If you want to install 8.0, I recommend you try Linux Journals guide
  <http://www2.linuxjournal.com/lj-issues/issue67/3572.html>, and if you
  want to install any of the previous versions you're going to have to
  use the SCO version and follow Paul Haigh's Oracle Database HOWTO
  <http://www.linuxdoc.org/HOWTO/Oracle-HOWTO.html>.

  If you're trying to install the 'right' version, what level of
  background knowledge will you need?

  Perhaps the easiest way is if I explain a little of my background,
  clearly if yours is similar we're going to be on the same wave-length.
  I've used a lot of Unix and Oracle over the last few years. At home
  I've been running Linux since 1994 and I've been using Solaris and HP-
  UX on-and-off since 1992. I first came across Oracle in 1996 and have
  worked with both versions 7 and 8. I'm mainly a developer, but I have
  done DBA and sysadmin-type work.

  In summary, I can find my way around a Unix box and I know much of the
  Oracle terminology. You'll need both to brave the rest of this
  document. But don't worry if you have a different background, follow
  this guide closely and keep asking questions. The Linux community are
  a helpful bunch, just don't expect an answer if you haven't at least
  made an effort to solve the problem yourself.


  1.3.  New versions of this document

  Things move quickly in the world of Linux and Oracle, meaning that
  this document can quickly get out of date. If this document is more
  than a month or two old, I suggest you take a look at my web site
  <http://www.zx81.org.uk/computing/oracle/oracle-howto/> for an update.


  1.4.  Disclaimer

  You get what you pay for. I offer no warranty of any kind, implied or
  otherwise.  I'll help you where I can but legally you're on your own.


  1.5.  Credits and Thanks

  This HOWTO has been written by Stephen Darlington. It couldn't have
  been created without the constant stream of questions and answers on
  Oracle Technet and the Usenet news-groups. So thanks to the people
  that keep posting and sorry that I can't credit you all individually!

  Thanks to the following people, in no particular order, for their
  contributions to this document: Ton Haver, Guy Cole, Iain Frerichs,
  Albert Braun, Steve Morando, Krill Kokoshka, Brain Slesinsky, Galen G
  Burk and Bill Gathen.

  I welcome any constructive feedback on this HOWTO and any general
  Linux or Oracle issues. Email me at stephen@zx81.org.uk
  <mailto:stephen@zx81.org.uk>.


  1.6.  Licence

  This document is copyright 2000 Stephen Darlington. You may use,
  disseminate and reproduce it freely, provided you:


    Do not omit or alter this copyright notice.

    Do not omit or alter the version number and date.

    Do not omit or alter the document's pointer to the current WWW
     version.

    Clearly mark any condensed, altered or versions as such.

  These restrictions are intended to protect potential readers from
  stale or mangled versions. If you think you have a good case for an
  exception, ask me.

  (This copyright notice has been lifted from Eric Raymond's
  Distribution HOWTO.)


  2.  Starting off

  2.1.  Overview

  In this section, we'll set up Linux so that you're in a position to
  get Oracle 8i from the CD that they sent you into your hard-disk.

  The Oracle installation process begins when you've built your PC,
  installed Linux, configured it and connected it to your network.


  2.2.  Prerequisites

  2.2.1.  Hardware

  I think that the most important part of the prerequisites is not to
  underestimate them. Oracle is a very big and complex application and
  you won't get the best out of it if you skimp too much on the
  hardware.

  My biggest mistake was to assume that Oracle were joking when they
  said that you need 128Mb of RAM. I've installed Oracle a couple of
  times on Sun servers with that much, why would I need more on a CISC
  machine?

  Believe Oracle not my gut. My machine with 32Mb of Ram ground on for
  less than half an hour before I realised that it was hopeless.

  I was trying to use the bare minimum of hardware, and that's generally
  a bad idea. If you can't afford the hardware you certainly won't be
  able to afford the licences!

  Things to look for on a production server are many disks, possibly
  RAIDed, and fast CPU's. Database access is relatively easy to break
  down into smaller parallel phases so having a number of processors
  really does help.

  On the other hand, any machine that can run Linux and that has enough
  memory should be in with a chance. My other machine, the one I used
  for the rest of this document, is fine as a development machine. It is
  a Celeron 466Mhz with 128Mb of memory, an 8Gb hard disk, an Intel
  graphics card and a DM9102 network card.


  2.3.  Linux setup

  2.3.1.  Choice of distribution

  Oracle seem to have done most of their development on RedHat Linux
  6.0. For a fuss-free installation, do the same. I've heard horror
  stories about trying to get it installed on other distributions.

  However, anything like RedHat should also do the trick. A recent
  version of Mandrake or SuSE should be fine (SuSE, in fact, are fairly
  active in supporting Oracle), and newer versions of RH pose no
  problems either.


  2.3.2.  Distribution Setup

  Now that you've decided on which RedHat-like distribution you're going
  to use, you'll need to work out which options to set and which of the
  vast number of packages need to be installed to make Oracle work.

  Firstly you need two to three times the amount of memory you have for
  your swap space. (You'll need around 200Mb of memory, real or virtual,
  just to run the installer!) Note that contrary to popular opinion,
  Linux swap partitions can be larger than 128Mb.

  The arrangements of your other partitions can also be important. Make
  sure that the Oracle software is on a different partition to your
  operating system, and make sure that the Oracle datafiles are on yet
  another partition.  The idea here is to make sure that your datafiles
  do not get fragmented. (In a live environment, you're likely to have a
  number of disk with Oracle spread across them. There are a number of
  good books that you consult for more information on this.)

  As for the software, I took the easy option and installed just about
  everything. You certainly need all the 'base' packages, X Windows (the
  installation routine is a Java GUI) and the development tools
  regardless of whether you intend doing any coding or not. Compared to
  the size of Oracle and your databases a Linux distribution is tiny,
  probably less than a gigabyte. It's worth installing it all for an
  easy life!


  2.3.3.  Kernel parameters

  The documentation suggests that you make changes to the Linux kernel
  so you can get more shared memory. Since this is so difficult in Linux
  (unlike most commercial Unix's you have to recompile the kernel), the
  approach I took was to go ahead with the installation anyway. The
  default RedHat Linux settings worked, although you may have to change
  them for a larger development or production system.

  Note that some people have had to recompile the kernel to get Oracle
  to work at all. I guess it must depend on the other software that
  you're running on the same machine.

  Follow the instructions in the Oracle documentation (on the
  installation CD in HTML format) and the Linux Kernel HOWTO
  <http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html> to build your new
  kernel.


  2.3.4.  Users and groups

  Using LinuxConf (or whatever other method you feel comfortable with),
  you need to add a new group called "dba" and a new user called
  "oracle", which should belong to your newly created "dba" group.

  You can make any other user a DBA by putting them in the DBA group. If
  you have several DBA's this is probably a good idea for auditing
  purposes.


  2.3.5.  Installing the right Java Virtual Machine

  If you check the official documentation, you'll find that Oracle
  recommend the Blackdown Java Runtime Environment version 1.1.6v5.
  That's what they mean. Don't think 'newer versions will be less buggy'
  as the installer probably won't work. And don't think, 'I'll be
  developing software so I'll just get the JDK,' as that won't work
  either.

  There is one caveat to using this version of the JRE: the Oracle
  installer seems to be hard-coded to expect the JRE executable to be at
  /usr/local/jre/bin/jre. While this is inconvenient, it does not mean
  that you have to install it there.

  I performed the following steps to get a working copy of the JRE:


  1. Download the Java Runtime Environment from the Blackdown website
     <http://www.blackdown.org>

  2. Move to where you want to install the JRE:


     cd /usr/local



  3. Uncompress the archive:


     bzip2 -d -c jre-1.1.6-v5-glibc-x86.tar.bz2 | tar xvf -



  4. Create a symbolic link between where Oracle thinks it is and where
     it actually is:
     ln -s jre116_v5 jre



  2.4.  Starting off questions and answers

  2.4.1.  Do I really need 128Mb RAM?

  I would recommend that you do use 128Mb of RAM or more. I think it
  would be difficult to get any serious work done with less.

  However, if you disable the Java option and set all the shared memory
  settings to be relatively small, there's no reason why it shouldn't
  work. I've heard success stories with 64Mb. You're probably not going
  to get away with 32Mb, though.

  There is a caveat. You may only need half of what Oracle recommends to
  run the thing, but to install it their number starts to make sense.
  I've heard reports of the installer using 150Mb of memory and I've
  seen it well over 120Mb myself. If you have 64Mb or less of memory,
  make sure you have lots of swap space and patience.

  An alternative if you absolutely can't add more memory: install Oracle
  on another, bigger machine and copy across the $ORACLE_HOME directory.
  You'll need to make sure that you have all the same users and groups
  (preferably with the same numeric codes) and take special care with
  SUID executables like $ORACLE_HOME/bin/oracle/.


  2.4.2.  Does it work with RedHat 6.1 or above?

  I'm still running 6.0 myself, so all I can say is that a number of
  people have claimed success with this configuration.

  At the time of writing, Oracle 8i has been certified with RedHat 6.0
  and "Certification for other distributions is currently in progress"
  (Oracle 8i Patch FAQ).


  2.4.3.  Does it work with Debian/SuSE/Mandrake/some other distribu
  tion?

  Oracle specify the Linux kernel version 2.2 or above and GLIBC version
  2.1 with any window manager. In theory, any distribution that meets
  these requirements should work.

  In practice, Oracle may not support it and you may have more problems
  trying to complete the installation. Unless you have a very good
  reason to do otherwise I suggest you stick to RedHat 6.0 with all the
  patches you can get hold of.


  2.4.4.  Does it work with development kernels?

  There's no obvious reason why it shouldn't work -- I used 2.3.19 for a
  while because it supported my network card and the stable kernel at
  the time didn't -- but unless there's a pressing need it's certainly
  safest to stay well clear. I switched back to the stable series as
  soon as the driver was included.


  2.4.5.  Where do I get Oracle from?

  Firstly, if you're brave, have a very fast Internet connection or
  inexhaustible patience (and unmetered access) you can download it from
  Oracle Technet <http://technet.oracle.com/>. Beware: it's nearly
  200Mb, and 8.1.6 is even bigger.

  A better option is to get the CD. Oracle sometimes offer to send you a
  free development CD when you join Technet. It's certainly worth
  spending some time looking round their web site for that.
  Alternatively, you can buy them from the Oracle Store for around $40.
  It includes lots of other software too and comes on 15 discs.


  3.  The installer

  3.1.  How?

  Generally, following the documentation is a good idea. It's not that
  bad and you'll get much better support from Oracle if you have. (I
  ended up breaking things -- and knowing it would -- by following the
  documentation for Oracle Applications. It was the only way to get
  decent support.)

  This document is going to give an overview, but you should still have
  their documentation available.


  3.2.  What do I tell the installation program?

  As part of the installation Oracle will ask a number of questions.
  Generally they're not too difficult but let's see what I entered and
  why.


  1. Many people make the mistake of following Oracle's documentation
     and, therefore, fail at the first hurdle. Don't execute
     runInstaller as it almost always fails. Instead move to
     install/linux on the CD and run runIns.sh while logged in as
     'oracle'.

  2. It should show a title screen. Click 'Next.'

  3. It should ask you to enter the source directory of the installation
     files ('jar' file) and your Oracle installation directory. You
     should be able to leave the former alone. The Oracle home directory
     is where you want to install the software. According to the
     installation documentation is should be somewhere on /u01, but I
     ignored that and put it in /home/oracle. Oracles advice, in this
     respect, is usually worth following. Click 'Next' when you've
     entered the details.

  4. Now it should ask you for the DBA group. This is the Unix group you
     created in the last section and is probably 'dba'. Enter the
     details and click 'Next.'

  5. This time it wants you to log in as 'root' and run
     /tmp/OraInstall/orainstRoot.sh. Do as it says. (You may have to run
     pdksh or bash in the 'Bourne compatibility mode' to get it to
     complete successfully.) When you're done click 'Retry.'

  6. You're now given the option of what to install. Your best bet here
     is 'Oracle Enterprise Edition,' as this includes just about
     everything (table 3.1 in the Oracle documentation tells you exactly
     what it installs).  Make sure the right radio button is selected
     and click 'Next.'

  7. It should now allow you to choose what you install with much finer
     granularity. Unless you're particularly constrained by disk space
     or know exactly what you need, I'd recommend leaving it exactly as
     it is and clicking 'Next.' The Universal Installer won't let you
     make any silly choices so don't worry too much if you unselect
     something. You can always add it back in later.

  8. For any products that you've asked it to install, the installer
     will allow you to change where it puts them. Again, only if you
     have a good reason to should you change it. Click 'Next' when
     you're done.

  9. It now goes away and installs all the pieces of software you asked
     it to. This will probably take quite a while and will use far more
     memory than is reasonable.

  10.
     It should ask you if you want to create a database. Select when it
     does, it's very slow (it seems to fire up another JVM, leaving X,
     the Oracle back-end and two virtual machines in memory; not good
     with 128Mb of memory).

  11.
     The installer should now ask you about the network protocols that
     you want Oracle to support. The boxes all came up blank for me. I
     don't know what's supposed to be in there, but I clicked 'Next' and
     found that everything worked.

  12.
     All the hard stuff is complete now. All the products you want
     should be installed and are ready to go. Congratulations.


  3.3.  Installing the patch

  Unfortunately, the CD that Oracle sent you was probably version
  8.1.5.0.0. As with almost all first releases there are problems with
  that version (problems include empty files, so they're quite serious)
  and a patch, to version 8.1.5.0.2 is essential. You'll certainly need
  it to progress to the "Configuration" section of this HOWTO. The patch
  described here is a cumulative patch, i.e., it includes all the files
  required to move from version 8.1.5.0.0 to 8.1.5.0.2.

  The file you need is on the Oracle web site
  <http://technet.oracle.com/software/products/oracle8i/software_index.htm>
  and is relatively easy to install.


  1. This is probably the first of many patches, so create a directory
     called "patches" somewhere convenient (mine is in $ORACLE_HOME).

  2. Download the file into it.

  3. Create somewhere to put the files:

     mkdir /tmp/orapatch
     cd /tmp/orapatch



  4. Uncompress the file:

     tar zvxf $ORACLE_HOME/patches/linux815patches.tgz



  5. Run the shell script that's now in the current directory:


     ./linux_815patches.sh



  Note that it's important not to uncompress the file in the current
  directory. The patch installer checks that the correct number of files
  are present and fails if there are not the right number. Of course, if
  it finds the patch archive it finds too many files!


  3.4.  Setting up your environment

  Add the following lines to your ".profile" (or whatever the equivalent
  is for your shell):


  . oraenv
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib



  Quite why the Oracle installer doesn't do this I have no idea.

  If you see "[: integer expression expected before -lt" the next time
  you log in, it's because 'oraenv' is expecting your ULIMIT to be an
  integer rather than the default 'unlimited.' I've seen no ill effects
  by ignoring the error, but you can fix it by setting the ULIMIT to
  something finite.


  3.5.  Installations questions and answers

  3.5.1.  The installation program exits with 'CreateOUIProcess()'

  Firstly, make sure that you're running the right version of the JVM. I
  don't know what Oracle do with their software, but it's very dependent
  on the version you use.

  Secondly, it might help if, instead of running runInstaller from the
  root of the CD, you move into install/linux and run the runInst.sh
  shell script instead.

  This problem seems more common on RedHat 6.1 than 6.0 and could be
  something to do with a newer C library.

  I've also heard reports that if you have the wrong version of Gnome's
  usual window manager, Enlightenment, you might get this problem.
  Upgrade or switch to another environment such as KDE or Fvwm2.


  3.5.2.  The installer just flashes on the screen and then vanishes

  This is not an uncommon occurrence. Usually it means that you're
  running an old version of Enlightenment. Upgrading or switching to
  another environment should fix the problem.

  A similar problem is the installation program vanishing at some later
  point in the process, often around 80% of the way through. The
  consensus seems to be that Oracle ran out of memory. You should
  increase the amount of swap space your machine has, anything over
  200Mb should be sufficient.



  3.5.3.  Strange Java errors when I start the installation program?

  Which version of the Java Virtual Machine are you using? People have
  claimed success with other versions, but most of the problems that I
  had disappeared when I downgraded to JRE 1.1.6v5, the one that Oracle
  recommends in their documentation.

  Two other things that are worth mentioning: make sure you use the JRE
  and not the JDK and, secondly, you should be using "green" threads.
  Unless you've set THREADS_FLAG to 'native' you almost certainly have
  the correct setting.


  3.5.4.  The installation program 'Segmentation Fault's

  You do have GLIBC 2.1 don't you?


  3.5.5.  Problems loading shared libraries

  The error message that I'm talking about looks a bit like this:


  error in loading shared libraries: libclntsh.so.8.0: cannot open
  shared object file: No such file or directory



  This is the same as NT complaining that it can't find a DLL. It's very
  easy to fix. Simply add the following line to the end of your
  ".profile" if you're using a Bourne-like shell (ask a local guru if
  you don't know):


  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib



  Or use the following line if you're using a CSH-like shell:


  setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH
  $ORACLE_HOME/lib"



  I don't use the C-Shell, so independent verification of this command
  would be appreciated.


  3.5.6.  Pro*C doesn't work

  The answer to this took quite a bit of tracking down, although the
  answer is on the Oracle web site if you look hard enough.

  The default configuration of Pro*C doesn't know where to find all its
  libraries, so you need to tell it. After installation
  $ORACLE_HOME/precomp/admin/pcscfg.cfg is empty, but it needs to
  contain the following:



  sys_include=(/home/oracle/precomp/public, /usr/include,
  /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/,
  /usr/include, /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include,
  /usr/include)
  include=(/home/oracle/precomp/public)
  include=(/home/oracle/rdbms/demo)
  include=(/home/oracle/network/public)
  include=(/home/oracle/plsql/public)
  ltype=short



  (The first four lines above, from sys_include to include) should all
  be on the same line in the file.)

  The Oracle documentation doesn't mention this, but you also need to
  edit $ORACLE_HOME/precomp/lib/env_precomp.mk. On the line that defines
  CCPSYSINCLUDE, put the following:


  CCPSYSINCLUDE=sys_include='($(ORACLE_HOME)/precomp/public,
  /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include,
  /usr/include/g++-2, /usr/include)'



  This works for RedHat 6.0, but may need tweaking for other
  distributions or later versions of RH.


  3.5.7.  I installed the patch but it made things worse!

  This is tricky, barely documented by Oracle and common across all
  their products and installation programs. It's about time they did
  something about it!

  Often what happens is as follows: you install Oracle Enterprise
  Edition and, as Oracle tells you, you dash off and install all the
  available patches. Then you decide you need the pre-compilers and
  install Oracle Programmer from the same CD.

  Before you installed Pro*C your database worked, and now it doesn't.

  The problem is that the versions of the pre-compilers that you
  installed were not patched and some of the Oracle server code relies
  on the fixes; Oracle's installer is so stupid that it will overwrite
  newer version of the same code.

  The solution is not pretty. Since you can't extract an individual file
  from the CD you need to install the whole thing again, this time
  adding Oracle Programmer before the patch.


  3.5.8.  Oracle thinks I don't have enough disk space

  There's something wrong with the installation program. Assuming you do
  have enough space it will install okay.


  4.  Creating a database

  4.1.  Overview

  Hopefully you followed the advice from the previous section and didn't
  create a database.

  For most people, I can probably outline the process in a couple of
  words: "Run 'dbassist'." Unless this is the first time you've ever run
  Oracle, none of the questions should really phase you.

  For completeness, I'll document what I did but I'd best say what I was
  aiming for first. Bottom line: this is neither a production system nor
  a 'serious' (i.e., several people, full time) development box. I
  installed 8i to play around and see what was new or different from 8
  and older versions.

  This means that when 'dbassist' offered an easy option I took it. And
  when it suggested using a different disk, or at least a different
  partition, I declined. My $ORACLE_HOME is /home/oracle. All the data
  files and software are in there, all on one partition.


  4.2.  Step-by-step guide


  1. Bring up a command prompt and type:

     dbassist



  2. My machine tells me that "JNLS Exception:
     oracle.ntpg.jnls.JNLSException. Unable to find any National
     Character Sets." According to Oracles 8i Patch FAQ, this is a known
     problem (884001) and can safely be ignored.

  3. Select the "Create a database" radio button and press "Next"

  4. There are two options: Typical and Custom. If you knew exactly what
     you were doing you probably wouldn't be reading this and could
     comfortably select Custom. I'm not going to cover that. Instead
     I'll assume you select "Typical" and press "Next"

  5. Next it asks whether you want to copy the database from your CD or
     to create the data files. Whenever I tried the first option, Oracle
     couldn't find my CD player (you just installed from it!). So I
     recommend choosing the second option. It's not difficult, it
     probably just takes longer

  6. It's probably safe to select 'Hybrid' when it asks you what
     environment the database will operate in

  7. Now it asks you how many users will be using your database at any
     given time. I put five.

  8. Next it asks you what products you want to install in your new
     database. Again, you know what you want better than me!

  9. Oracle needs a "Global Database Name" and a "SID" now. The database
     name is like a fully qualified domain name (but different). If
     you're the Oracle guru you'll know what to put, if not your
     organisation might have some conventions. I called mine 'dev1'
     (both the SID and database name).

  10.
     Now, do you want to create the database 'now' or should you let it
     save the information to a shell script? With 128Mb of RAM I found
     the former option painful.

     I created the shell script, quit out of X and anything else using a
     lot of memory and then ran the script. Much more snappy.

  11.
     I didn't notice this in any of the documentation, but your database
     won't work properly without it! The database that 'dbassist'
     creates is fine, but by default the user rollback segments are left
     off-line. (Read: non-system users can't perform any operation that
     requires transactions.)

     Type:

     cd $ORACLE_HOME/dbs



  You now need to edit a file called "init<SID>.ora" ("initdev1.ora" in
  my case).

  About half-way down the file is a commented out line looking something
  like this:


  # rollback_segments = (r01, r02, r03, r04)



  Uncomment this line (remove the hash), save the file and you're done.

  12.
     This is a kind of meta-step. You have a database and you should be
     able to start it up, but you probably don't know what any of the
     system passwords are!

     There are two that you need to know. The first is the SYSTEM
     password. This defaults to 'MANAGER'. (It seems to be conventional
     to put Oracle passwords in uppercase. In fact passwords are not
     case sensitive.) I recommend you change it straight away by typing
     password at the SQL*Plus prompt. (For people expecting an ALTER
     USER command, this is new to the version of SQL*Plus supplied with
     8i.)

     The other password that you need to know is the one for SYS. It
     defaults to 'CHANGE_ON_INSTALL' and you should do exactly what it
     says!

  13.
     Final step. This one gets rid of the annoying 'no profile' warnings
     you get when you log into SQL*Plus.

     Log into SQL*Plus as user 'system' (sqlplus system/<password>).
     Then type:


     @?/sqlplus/admin/pupbld.sql



  The question-mark is an alias for the $ORACLE_HOME directory.

  14.
     This is an optional step used to define the default editor for
     SQL*Plus (it defaults to ed so you do!). Open
     $ORACLE_HOME/sqlplus/admin/glogin.sql in your favourite editor and
     add define_editor=<editor name> to the end.

  And that's it. You should now have an operational database that you
  can log into using SQL*Plus.

  4.3.  Questions and answers

  4.3.1.  Is it really that easy?

  Yes and no. If you're just playing around, building a database for
  yourself to learn the new features of 8i, then 'yes.' The database the
  above instructions will build is complete and will work fine.

  However, if you know anything about Oracle, you will quickly realise
  that the default configuration is appallingly bad. If you're making a
  serious, production system I recommend you use the "Custom" option.

  Even for my toy system I did some tweaking. I increased the sizes of
  most of the table-spaces and changed them so that they didn't grow
  automatically (I hate software when it tries to be too clever).


  4.3.2.  Is it really necessary to put all the files on different
  disks?

  No and it will work fine if you don't, but I don't recommend putting
  all your files on the same disk nevertheless.

  Spreading the files over a number of disks, even it's just the data
  files on one and the rollback segments on another, will have a
  significant performance advantage. Read an Oracle DBA book if you need
  further information.


  4.3.3.  I can't start dbassist

  Caused by several zero-length files in the initial installation.
  Following the patch procedure will fix this problem.


  4.3.4.  I get "ORA-01034: ORACLE not available"

  To cut a long story short, your $ORACLE_SID is probably set
  incorrectly or not at all. Make sure it's set to the same value you
  gave 'dbassist' and that it's value is exported (i.e., export
  ORACLE_SID in any Bourne compatible shell).


  4.3.5.  I get "ORA-01012: Not logged in"

  This is a very common error, and there are a number of different
  things that cause it.

  Firstly you'll want to make sure that you're not creating a Shared
  Server configuration (sometimes known as MTS). Create a database using
  Dedicated Server and convert it later.

  If that's not it, check your NLS_LANG environment variable. The
  easiest option is to unset it. If you really want to use it, make sure
  that you have it exactly right. Make sure you don't transpose any '1's
  (one's) for 'l's (the twelfth letter of the alphabet)!


  4.3.6.  Can datafiles only be 1Gb in size?

  this to be a bug as Linux has no problem with files up to 2Gb.



  5.  Configuration

  5.1.  Overview

  Congratulations, you have Oracle running on your Linux box. You have
  created a database and can connect to it using SQL*Plus.

  Of course, this is not the end of it. Ideally, you'd be able to
  connect to it as another Unix user or from a completely different
  machine. That is what this section is for.


  5.2.  Connecting as another user

  Some of the details in this section are a little sketchy as this is
  not a configuration that I personally use. However, performing one of
  the following steps should work:


  

     . oraenv


  or pdksh)

  

     source coraenv



  When running "oraenv" I get an error if I use 'bash', the default
  Linux shell. It seems not to cause any problems so don't worry. You
  can always use 'pdksh' if it does worry you.


  5.3.  Connecting from another machine

  I remember this being very complex with earlier versions of Oracle,
  but just seemed to work here. I'm sure that must mean that I did
  something wrong, forgot something I did or that there's a massive
  security hole.

  This is what I remember doing:


  1. Logging into Linux as user 'oracle'

  2. Make sure that "oraenv" has been executed (i.e., your $ORACLE_HOME
     is set correctly)

  3. Type:

     lsnrctl start



  On your client machine all you need to do now is point it at the right
  machine and database instance.

  If you want more control over the process, the "Net8 Configuration
  Assistant" ('netec') should be able to help.



  5.4.  Connecting to another machine

  This used to be very difficult in many earlier version of Oracle,
  involving editing many text files, most of which had an fantastically
  complex syntax.

  But in 8i, if you've got your JVM working, then all you need is the
  "Net8 Easy Config" program. Follow these steps to allow your machine
  to connect to a database on another machine:


  1. Start "Net8 Easy Config" by typing netec at the command prompt
     while logged in as 'oracle.'

  2. After a short delay while Java gets its act together, the welcome
     screen appears. It should be asking what you want to do. Leave the
     radio buttons on the left alone (the default is 'create') and enter
     the name of the database in the text box. Click 'Next' when you're
     done.

  3. Select one of the protocols it offers. Unless you know differently,
     this should probably be 'TCP/IP' which is the default. Press
     'Next.'

  4. Enter the hostname (or IP address) of the remote machine. The port
     number probably doesn't need changing. Press 'Next.'

  5. Select the type of database (8i or other) using the radio buttons
     and enter the name in the appropriate text box. Press 'Next.'

  6. You can now test that the information you've enter makes sense to
     Oracle. I found that 'netec' has a tendency to crash if some of the
     details are wrong. Press 'Next' when you're sure that it all works.
     You can keep pressing the 'Back' button to go back and correct any
     information.

  7. If you're happy with all the information you've entered, you can
     press the 'Finish' button and that's it!

  If you want more control over the process, you may need to use the
  "Net8 Assistant" -- a big window with many confusing options -- which
  can be started with the netasst command.


  5.5.  Questions and answers

  5.5.1.  I can't start 'netasst'

  The problem is with a couple of zero-length files. Installing the
  patch should fix this problem.


  6.  Final Words

  6.1.  Useful Software

  Now that you've managed to get Oracle installed, you'll want to try
  and use it. Although it's possible to do everything from your server
  PC, it's generally best to user the client-server facilities and use
  another machine to access your database.

  Naturally Oracle have a large collection of, largely, pretty good
  client software, however there's not much for Linux at this time. Of
  the Oracle software, I recommend getting hold of the following:


    Oracle Enterprise Manager. It's much easier not to have to remember
     all those obscure ALTER USER and ALTER SYSTEM commands.

    Oracle WebDB. It can be quite difficult to install, but it can
     allow people to build impressive web-sites without knowing any
     HTML.

  But most of the best software comes from other places...


    Tool for Oracle Application Development (T.O.A.D.). This used to be
     free but is now owned by Quest Software <http://www.quest.com>. You
     can download a free version (if you're prepared to do it every
     couple of months) or you can pay for it. It's significantly more
     expensive than free but is not bad value.

    SQLNavigator. Also by Quest Software <http://www.quest.com>. I've
     not really used it but it's been highly recommended by all who
     have.

    Orac <http://www.kkitts.com/orac-dba/>. Another that I've not used
     much, but has been described as a nice, configurable DBA-tool by a
     number of people.


  6.2.  Useful Books

  I seem to get most of my Oracle information from colleagues and books.
  I'm not able to give away my colleagues, but the books I recommend are
  as follows:


  

     "Oracle Performance Tuning," Mark Gurry and Peter Corrigan,
     O'Reilly and Associates, ISBN 1-56592-237-9.

  

     "Oracle Design," Dave Ensor and Ian Stevenson, O'Reilly and
     Associates, ISBN 1-56592-268-9.

  

     "PL/SQL Programming," Steven Feuerstein, O'Reilly and Associates,
     ISBN 1-56592-335-9.

  

     "PL/SQL Built-in Packages," Steven Feuerstein, O'Reilly and
     Associates, ISBN 1-56592-375-8.

  You'll note a bit of an O'Reilly <http://www.ora.com> theme there.
  I've not found a bad O'Reilly book yet. Similarly, I've never found a
  good Oracle Press book.


  6.3.  Useful Internet resources

  There's a lot of useful stuff on the web.


    Oracle Technet <http://technet.oracle.com>. This is Oracle's public
     and free support website. Lot's of very useful information there.


    Oracle Metalink <http://support.oracle.com>. Oracle's private (you
     need a support contract) support website. Only slightly more useful
     than Technet!

    Oracle Fans <http://www.orafans.com>. Editorials and support
     forums. No official connection to Oracle (so the information there
     is less biased!).

    OraFaq <http://www.orafaq.org>. A site full of questions and
     answers regarding Oracle on all platforms.

    Oracle Linux mailing list (Send a mail to ListGuru@fatcity.com
     <mailto:ListGuru@fatcity.com> with the words 'SUBSCRIBE ORACLE-
     LINUX-L' in the body.

    And don't forget my website <http://www.zx81.org.uk>!



  Linux PCI-HOWTO
  by Michael Will, Michael.Will@student.uni-tuebingen.de
  v0.6g, 30 March 1997

  Information on what works with Linux and PCI-boards and what does not.
  Please get the latest version of this document at The Linux Documenta-
  tion Project <http://sunsite.unc.edu/LDP/linux.html>
  ______________________________________________________________________

  Table of Contents



  1. Introduction

  2. Why PCI?

     2.1 General overview
     2.2 Performance
     2.3 The onboard-SCSI-II-chip NCR53c810
     2.4 Drew Eckhardt on PCI-SCSI:
     2.5 New Alpha Version of the NCR driver
     2.6 The EATA-DMA driver and the PCI SCSI controllers from DPT
     2.7 BT-946C fully supported with kernel 1.3.x and newer
     2.8 Future Domain TMC-3260 PCI SCSI
     2.9 other thoughts on scsi

  3. ASUS-Boards

     3.1 ASUS and the NMI (Parity) -- impact on Gravis-Ultrasound
     3.2 Various types of ASUS Boards
        3.2.1 ASUS SP3 with saturn chipset I (rev. 2) for 486,
        3.2.2 ASUS SP3G with saturn chipset II (rev. 4) for 486,
        3.2.3 ASUS SP3-SiS chipset, for 486
        3.2.4 ASUS AP4, for 486, with PCI/ISA/VesaLocalbus
        3.2.5 ASUS SP4-SiS, for Pentium90, PCI/ISA
        3.2.6 ASUS TP4 with Triton chipset and EDO-Support
        3.2.7 ASUS TP4XE with Triton chipset and additional SRAM/EDORAM support
        3.2.8 ...and many others now.
     3.3 Benchmarks on ASUS Mainboards
        3.3.1 ASUS SP3 with amd486DX4-100
        3.3.2 ASUS SP3 with amd486DX4-120
        3.3.3 ASUS SP3 with intel486DX2-66
        3.3.4 ASUS TP4/XE with intel586-90
        3.3.5 ASUS TP4/XE with intel586-100
     3.4 Detailed information on the old ASUS PCI-I-SP3 with saturn chipset from heinrich@zsv.gmd.de:
     3.5 Pat Dowler (dowler@pt1B1106.FSH.UVic.CA) with ASUS SP3G

  4. confusion about saturn chipsets

  5. Video-Cards

  6. Ethernet Cards

     6.1 3com-3c590-tpo
     6.2 DEC435 PCI NIC

  7. Motherboards

     7.1 ASUS
     7.2 Micronics P54i-90
     7.3 SA486P AIO-II
     7.4 Sirius SPACE
     7.5 Gateway-2000
     7.6 Intel-Premiere
     7.7 DELL Poweredge SP4100 gbelow@pmail.sams.ch - successful
     7.8 DELL OptiPlex Gl+ 575 torsten@videonetworks.com - successful when turning off plug and play
     7.9 Comtrade Best Buy PCI / PCI48X MB Rev 1.0
     7.10 IDeal PCI / PCI48X MB Rev 1.0
     7.11 CMD Tech. PCI IDE / CSA-6400C
     7.12 GA-486iS (Gigabyte)
     7.13 GA-586-ID (Gigabyte) 90 Mhz Pentium PCI/EISA Board
     7.14 ESCOM 486dx2/66 - which board?
     7.15 J-Bond with i486dx2/66
     7.16 super micro 011895 03:50 SUPER P54CI-PCI rev 1.3 (Opti)

  8. reports on success

     8.1 GigaByte GA486-AM with AMD Am5x86-133-WB @ 160MHz (40MHz PCI)
     8.2 California Graphics - Sunray II Pro
     8.3 Micronics P54i-90 (root@intellibase.gte.com)
     8.4 Angelo Haritsis (ah@doc.ic.ac.uk) about SA486P AIO-II:
     8.5 bill.foster@mccaw.com about his Micronics M5Pi
     8.6 Simon Karpen (karpens@ncssm-server.ncssm.edu) with Micronics M54pi
     8.7 Goerg von Below (gbelow@pmail.sams.ch) about DELL Poweredge
     8.8 zenon@resonex.com about Gateway2000 P-66
     8.9 James D. Levine (jdl@netcom.com) with Gateway2000
     8.10 hi86@rz.uni-karlsruhe.de with SPACE
     8.11 grif@cs.ucr.edu with INTEL
     8.12 Jermoe Meyers (jeromem@amiserv.xnet.com) with Intel Premiere
     8.13 Timothy Demarest (demarest@rerf.or.jp) Intel Plato Premiere II
        8.13.1 Flash Bios upgrades
        8.13.2 NCR 53c810 BIOSless PCI SCSI
        8.13.3 apart from that - plug and play!
     8.14 heinrich@zsv.gmd.de with ASUS
     8.15 CARSTEN@AWORLD.aworld.de with ASUS
     8.16 Lars Heinemann (lars@uni-paderborn.de) with ASUS
     8.17 Ruediger.Funck@Physik.TU-Muenchen.DE with ASUS
     8.18 robert logan (rl@de-montfort.ac.uk with GW/2000)
     8.19 archie@CS.Berkeley.EDU and his friend use ASUS
     8.20 Michael Will with ASUS-SP3 486 (the old one)
     8.21 Mike Frisch (mfrisch@saturn.tlug.org) Giga-Byte 486IM
     8.22 Karl Keyte (kkeyte@esoc.bitnet) Gigabyte GA586 Pentium
     8.23 kenf@clark.net with G/W 2000
     8.24 Joerg Wedeck (jw@peanuts.informatik.uni-tuebingen.de) / ESCOM
     8.25 Ulrich Teichert / ASUS

  9. Reports of problems

     9.1 Compaq PCI systems, especially Presarios
     9.2 VLSI Wildcat PCI chipset like in Zeos P120 box
     9.3 dmarples@comms.eee.strathclyde.ac.uk G/W 2000
     9.4 cip574@wpax01.physik.uni-wuerzburg.de (Frank Hofmann) / ASUS
     9.5 axel@avalanche.cs.tu-berlin.de (Axel Mahler) / ASUS
     9.6 Frank Strauss (strauss@dagoba.escape.de) / ASUS
     9.7 egooch@mc.com / ASUS
     9.8 Stefan.Dalibor@informatik.uni-erlangen.de / GigaByte
     9.9 Steve Durst (sdurst@burns.rl.af.mil) with UMC 8500 mainboard
     9.10 Tom Drabenstott (tldraben@Teleport.Com) with Comtrade / PCI48IX

  10. General tips for PCI-Motherboard + Linux NCR PCI SCSI

     10.1 DON'Ts:
     10.2 SIMM slots
     10.3 Praised PCI Pentium motherboard
     10.4 irq-lines
     10.5 Info about the different NCR 8xx family scsi chips:
        10.5.1 53C810
        10.5.2 53C815
        10.5.3 53C825
     10.6 future of 53c8xx
     10.7 Performance of the 53c810
     10.8 News about NCR53c825 support
     10.9 Frederic POTTER (Frederic.Potter@masi.ibp.fr) about Pentium+NCR+Strap_bug
     10.10 PCIprobe in the latest Linux Kernels by Frederic Potter
     10.11 Other PCI Devices
        10.11.1 Cyclades: a 16-port PCI RISC-based multiport card.

  11. Conclusion

  12. Thanks

  13. copyright/legalese

  14. GPL - Gnu Public License
  ______________________________________________________________________

  1.  Introduction


  Many people, including me, would like to run Linux on a PCI-based
  machine.  Since it is not obvious which PCI motherboards and PCI cards
  will work with Linux and which do not, I conducted a survey and spent
  some hours to compile the information contained herein.

  If you have information to add, please mail me. If you have questions,
  feel free to ask.

  Help with my style/grammar/language is welcome as well. I am not a
  native- speaker of English and expect to make occasional mistakes.

  Note: "on-board chip" refers to a SCSI chip integrated onto the
  motherboard rather than on a PCI expansion card.

  Also, "quotes" herein may have slight context editing.


  2.  Why PCI?



  2.1.  General overview

  The PC-architecture has several BUS-Systems to choose from:

     ISA
        16 or 8bit, cheap, slow (usually 8Mhz), standard, many cards
        available>

     EISA
        32bit, expensive, fast, few cards available, fading>

     MCA
        32 or 16bit ex-IBM-proprietary, fast, becoming rare>

     VESA-Local-Bus
        32bit, based on 486 architecture, cheap, fast, many cards
        available>

     PCI-Local-Bus
        32bit (64 bit coming), cheap, fast, many cards available,
        nowadays standard>


  MCA worked fine, but never achieved much market, being used on only
  some early IBM PS/2 machines. There were very few cards.

  EISA was reliable, but rather expensive, and intended more for
  servers, than for the average user. It has the next fewest cards
  available.

  VESA-Local-Bus (VLB) had some problems with high bus-speeds, and was
  not very reliable, but mainly due to its low price and better-than-ISA
  performance, sold very well. Technically, it's almost a direct map of
  the 486 processor bus.  Most VESA boards should be stable by now.  At
  the beginning of 1996, many 486 motherboards still support VESA, but
  PCI is growing.  VESA busses are tied directly to the speed of the
  memory bus for 486's, or half the speed for Pentiums.

  PCI now has the advantage. Like EISA it is not proprietary. It is as
  faster than EISA or MCA, and cheaper.  Most current Pentium
  motherboards use the PCI bus; VESA is fading.  Virtualy all PCI
  motherboards and cards sold at the beginning of 1996 are 32 bit, and
  run at 0-33 MHz.

  Currently, most Pentium motherboards run the PCI bus at 1/2 the memory
  speed (ie: 33 MHz for the 66 MHz memory bus on the P66,P100,P133,P166;
  30 MHz for the 60 MHz memory bus on the P60,P90,P120,P150; and 25 Mhz
  on the 50 MHz memory bus of the P75).  This is probably true of Cyrix
  6x86 motherboards too.  NexGen 5x86 implemention isn't known.  The PCI
  spec does allow the PCI bus to be run asynchronously from the
  processor, (eg: 33 Mhz bus on P75), but this is not common yet.

  PCI 2.1 has been defined, allowing 64 bit PCI, and/or 0-66 MHz
  operations, but no x86 chipsets yet support these options.  64 bit PCI
  will probably appear first, in 32/64 bit dual compatible versions.
  That is, you will be able to mix 32 and 64 bit cards.  66 MHz PCI will
  take longer, as it's technically demanding, can only support one or
  maybe two slots per bridge, and may not work well with 33 MHz cards.

  PCI is not processor dependent like the VESA Local-Bus. This means you
  can use the winner-1000-PCI in an Alpha-driven-PCI computer as well as
  in a i486/Pentium-driven PCI computer, with the appropriate BIOS and
  software.  Beside Intel and DEC Alpha platforms, PCI is used on some
  PowerPC's.

  Some PCI variations to be aware of: some implementations support "Bus
  Master" cards in all PCI slots, some in only one slot, and some not at
  all; some implementations support "bridging" on cards and some do not.


  2.2.  Performance

  taken from Craig Sutphin's early Pro-PCI-Propaganda


       Unlike some local buses, which are aimed at speeding up
       graphics alone, the PCI Local Bus is a total system solu-
       tion, providing increased performance for networks, disk
       drives, full-motion video, graphics and the full range of
       high-speed peripherals. At 33 MHz, the synchronous PCI Local
       Bus transfers 32 bits of data at up to 132 Mbytes/sec. A
       transparent 64-bit extension of the 32-bit data and address
       buses can double the bus bandwidth (264 Mbytes/sec) and
       offer forward and backwards compatibility for 32 and 64-bit
       PCI Local Bus peripherals. Because it is processor-indepen-
       dent, the PCI Local Bus is optimized for I/O functions,
       enabling the local bus to operate concurrent with the pro-
       cessor/memory subsystem.  For users of high-end desktop
       PC's, PCI makes high reliability, high performance and ease
       of use more affordable than ever before; no trivial task at
       33 MHz bus-clock rates. Variable length linear or toggle
       mode bursting for both reads and writes improves write
       dependent graphics performance. By comprehending the loading
       and frequency requirements of the local bus at the component
       level, buffers and glue logic are eliminated.


  See the chapter about Benchmarks for some crude (and perhaps
  meaningless) benchmarks on ASUS PCI Boards with 486 and 586.


  2.3.  The onboard-SCSI-II-chip NCR53c810

  One very nice feature of some PCI mother boards is the NCR onboard-
  SCSI-II-chip, which is said to be as fast as the EISA-Adaptec-1742,
  but much cheaper. Drivers for DOS/OS2 are available. Drew Eckard has
  released his version of his NCR53c810-driver, which is in the standard
  kernel since v1.2.

  This works so well I sold my adaptec-1542B-ISA soon after I bought the
  ASUS SP3-saturn-chipset II PCI board, and found the onboard NCR-SCSI
  controller to be much faster.

  The NCR53c810-chip is onboard on some PCI-motherboards.  There are
  add-on-boards available too, for about US$ 70.00.

  There is only one thing I noticed did not work with the NCR-drivers
  when I tried them. Disconnect/Reconnect did not work, so using a SCSI-
  tape could be a pain, especially when using "mt erase" or the like
  blocks the whole SCSI-bus until it has finished. Since this was very
  unsatisfying for me, I bought one of these nice but expensive DPT PCI
  SCSI controller and had no such problems anymore.

  People have reported this problem has been solved by Drew by now.

  FreeBSD does support the NCR53c810 for quite a long time already,
  including Tagged Command Queues, FAST, WIDE and Disconnect for NCR
  53c810, 815, 825. Drew said, it would be possible to adapt the FreeBSD
  driver to Linux. I somewhere saw some patches to do exactly this, any
  pointer to the location?

  I personaly have the impression there are some important wheels
  invented more than once because of the differently evolving of FreeBSD
  and Linux. Some more cooperation could do both systems very well...


  2.4.  Drew Eckhardt on PCI-SCSI:


  Drew said on end of March 95 about the SCSI on PCI: (slightly edited
  for clarity in context)

  The Adaptec 2940, Buslogic BT946, BT946W, DPT PCI boards, Future
  Domain 3260, NCR53c810, NCR53c815, NCR53c820, and NCR53c825 all work
  for some definition of the word works.


  o  The Adaptec 2940 suffers from the same cabling sensitivity that
     plagues all recent boards, but otherwise works fine.

  o  The Future Domain boards are not busmasters, and the driver doesn't
     support multiple simultaenous commands.  If you don't (currently)
     need multiple simultaneous commands, get a NCR board, which will be
     cheaper and is busmastering.  If you need multiple simultaneous
     commands, get a Buslogic.

  o  The Buslogic BT956W will do WIDE SCSI with the Linux drivers
     (although you can't use targets 8-15), the Adaptec 2940W (with one
     line patch to the 2940 driver) won't, nor will the NCR53c820 and
     NCR53c825.

  o  The NCR boards are dirt cheap (< $ 70 US), are generally quite
     fast, but the driver currently doesn't support multiple
     simultaenous commands. Alpha which do neat things like
     disconnect/reconnect and synchronous transfer are now publicly
     available, see below.

  o  Emulux, Forex, and other unmentioned PCI SCSI controllers will not
     work.



  2.5.  New Alpha Version of the NCR driver


  Well, this is not exactly *that* new anymore, please try to he
  versions which are in the kernel by version 2.0.x before going for
  this entry.

  Alpha versions of the NCR driver which do neat things like
  disconnect/reconnect and synchronous transfers are now publically
  available.  Any one interested in playing with them should

  o  Join the NCR mailing list, by sending mail to
     majordomo@colorado.edu with subscribe ncr53c810 in the text.

  o  Get all of the readmes, and latest diffs file from
     ftp://tsx-11.mit.edu/pub/ALPHA/linux/SCSI/ncr53c810


  2.6.  The EATA-DMA driver and the PCI SCSI controllers from DPT


  The EATA-DMA scsi driver has undergone extensive changes and now also
  supports PCI SCSI controllers, multiple controllers and all SCSI
  channels on the multichannel SmartCache/Raid boards in all
  combinations of WIDE, FAST-20 (ULTRA) and DIFFERENTIAL.


  The driver supports all EATA-DMA Protocol (CAM document CAM/89-004
  rev. 2.0c) compliant SCSI controllers and has been tested with many of
  those controllers in mixed combinations.


  Those are:             (ISA)   (EISA) (PCI)
        DPT Smartcache: PM2011  PM2012B
        Smartcache III: PM2021  PM2022  PM2024
                                PM2122  PM2124
                                PM2322
        Smartcache IV:  PM2041  PM2042  PM2044
                                PM2142  PM2144
                                PM2322
        SmartRAID     : PM3021  PM3122
                                PM3222  PM3224
                                        PM3334
        and some controllers from NEC, AT&T, SNI, AST, Olivetti and Alphatronix.



  On a "base" DPT card (no caching or RAID module), a MC680x0 controls
  the bus-mastering DMA chip(s) and the SCSI controller chip.  The DPT
  SCSI card almost works like a SCSI coprocessor.

  The DPT card also will emulate an IDE controller/drive (ST506
  interface), which enables you to use it with all operating systems
  even if they don't have an EATA driver.

  On a card with the caching module, the 680x0 maintains and manages the
  on-board cacheing.  The DPT card supports up to 64 MB RAM for disk-
  cacheing.

  On a card with the RAID module, the 680x0 also performs the management
  of the RAID, doing the mirroring on RAID-1, doing the striping and ECC
  info generation on RAID-5, etc.

  The entry level boards utilize a Motorola 68000, the high-end, more
  raid specific DPT cards use a 68020, 68030 or 68040/40MHz processor.

  Official list prices range from $ 265 to $1.645 (January 18, 1996)


  Since I've been asked numerous times where you can buy those boards in
  Europe, I asked DPT to send me a list of their official European
  distributors. Here is a small excerpt:



  Austria: Macrotron GmbH            Tel:+43 1 408 15430   Fax:+43 1 408 1545
  Denmark: Tallgrass Technologies A/S Tel:+45 86 14 7000   Fax:+45 86 14 7333
  Finland: Computer 2000 Finnland OY Tel:+35 80 887 331    Fax:+35 80 887 333 43
  France : Chip Technologies         Tel:+33 1 49 60 1011  Fax:+33 1 49 599350
  Germany: Akro Datensysteme GmbH    Tel:+49 (0)89 3178701 Fax:+49 (0)89 31787299
  Russia : Soft-tronik               Tel:+7 812 315 92 76  Fax:+7 812 311 01 08
  U.K.   : Ambar Systems Ltd.        Tel:+44 1296 311 300  Fax:+44 296 479 461



  "IMHO, the DPT cards are the best-designed SCSI cards available for a
  PC.  And I've written code for just about every type of SCSI card for
  the PC.  (Although, in retrospect, I don't know why!) ;-)" Jon R.
  Taylor (jtaylor@magicnet.net) President, Visionix, Inc.

  The latest version of the EATA-DMA driver and a Slackware bootdisk is
  available on: ftp.i-Connect.Net:/pub/Local/EATA


  Since patchlevel 1.1.81 the driver is included in the standard kernel
  distribution.

  The author can be reached under these addresses: neuffer@mail.uni-
  mainz.de or mike@i-Connect.Net


  2.7.  BT-946C fully supported with kernel 1.3.x and newer


  There is a driver in the 1.3.x kernels (available as a patch for the
  1.2.13 kernel) written by someone associated with buslogic that fully
  supports the 946C and ALL of it's features including strict round
  robin, tagged queueing, multiple scatter/gather, multiple mailboxes,
  IRQ sharing, and yes, 15 devices on Fast/Wide.  It is no longer
  necessary to use any ISA emulation with the driver (no DMA channel, no
  ISA address), and the driver is /fast/ and /stable/ (it's out of BETA
  and into full release).

  The driver is available on ftp.dandelion.com (the newest version can
  always be got by doing "get BusLogic*").  It supports ALL BusLogic
  controllers with the exception of the FlashPoint LT, which uses a
  different interface.  The driver is included in the 1.3.x kernels as
  standard for BusLogic devices.



  2.8.  Future Domain TMC-3260 PCI SCSI


  Rik Faith (faith@cs.unc.edu) informed me on Wed, 1 Feb 1995 about the
  Future Domain TMC-3260 PCI SCSI card being supported by the Future
  Domain 16x0 SCSI driver.  Newer information might be contained in the
  SCSI-HOWTO.


  o  Detection is not done well, and does not use standard PCI BIOS
     detection methods (someone who has a PCI board needs to send me
     patches to fix this problem).  So, you might have to fiddle with
     the detection routine in the kernel to get it detected.

  o  The driver still does not support multiple outstanding commands, so
     your system will hang while your tape rewinds.

  o  The driver does not support the enhanced pseudo-32bit transfer mode
     supported by recent Future Domain chips, so you will not get
     transfer rates as high as under DOS.

  o  The driver only supports the SCSI-I protocol, so your really fast
     hard disks will not get used at the highest possible throughput.
     (Again, fixes for all these problems are solicited -- no one is
     working on them at this time.)



  2.9.  other thoughts on scsi


  James Soutter (J.K.Soutter1@lut.ac.uk) asked me to add the following
  information on Fast-Wide-SCSI-2:


       Fast Wide SCSI-2 is sometimes incorrectly called SCSI-3. It
       differs from the normal Fast SCSI-2 (like the Adapted
       1542B?) because it uses a 16 bit data bus rather than the
       more usual 8 bit bus. This improves the maximum transfer
       rate from 10 MB/s to 20 MB/s but requires the use of special
       Fast Wide SCSI-2 drives.

       The added performance of Fast Wide SCSI-2 will not
       necessarily improve the speed of your system.  Most hard
       disk drives have a maximum internal transfer rate of less
       than 10 MB/s and so one drive alone can not flood a FAST
       SCSI-2 bus.

       In Seagate's Oct 1993 product overview, only one Fast Wide
       SCSI-2 drive has an internal transfer rate of more than 10
       MB/s (the ST12450W).  Most of the drives have a maximum
       internal transfer rate of 6 MB/s or less, although the
       ST12450W is not the only exception to the rule.  In
       conclusion, Fast Wide SCSI is designed for the file server
       market and will not necessarily benefit a single user
       workstation style system.

       Rather than buying a PCI system with a SCSI interface on the
       motherboard, or rather than waiting for the NCR driver, you
       could purchase a separate PCI based SCSI card. According to
       Drew, the only PCI SCSI option that stands a chance of
       working is the Buslogic 946. It purports to be Adaptec 1540
       compatible, like the EISA/VESA/ISA boards in the series.

       Drew commented that other PCI based SCSI controllers are
       unlikely to be supported under Linux or the BSD's because
       the NCR based controllers are cheaper and more prevalent.


  I definitly recommend reading the SCSI HOWTO in regards to newer
  information about PCI SCSI drivers.

  Ernst Kloecker (ernst@cs.tu-berlin.de) wrote: (edited)

       Talus Corporation has finished a NS/FIP driver for PCI
       boards with NCR SCSI. It will be shipping very soon, might
       even be free because a third party might pay for the work
  and donate the driver to NeXT.


  Not every PCI-Board has got the chip. The old ASUS do, and one of the
  J-Bond boards does, too. (Most of the boards nowadays (6/95) do expect
  you to buy the NCR53c810 seperately.) Some vendors provide an
  alternative as you can read in Drew's text...

  The NCR-Chip is clever enough to work with drives formatted by other
  controllers, and should be no problem.


  3.  ASUS-Boards

  3.1.  ASUS and the NMI (Parity) -- impact on Gravis-Ultrasound

  The newer trition PCI-Mainboards in 1995 did not seem to support
  parity-SIMMS anymore. Since I usualy took the cheaper nonparity-SIMMS
  anyway, I did not consider this a problem until I put the Gravis-
  Ultrasound into my machine. Under DOS the SBOS-Driver and Setup/Test
  utility does complain about "nmi procedure disabled on this p.c.". The
  manual says I'd better get a better mainboard in that case, not very
  helpful.

  The gravis-ultrasound did work nice in the ASUS-SP3 and ASUS-SP4,
  inspite of this, but the gravis-ultrasound-max I have here got gmod to
  kernel panic on both boards, and sometimes when playing au-files via
  /dev/audio did strange things, like playing the rest of an older,
  previously played sound after the new one. The sounddriver does
  recommend a buffer of 65536 with the GUS Max instead of the small one
  like the GUS - why I do not know. I do not have such a problem with
  the newer ASUS TP4 XE boards, though.  Both are equipped with 1M DRAM
  onboard. These problems are probably not related to the NMI-problem,
  but because of the sounddriver?

  I heard not only ASUS but most of the newer PCI-Mainboards are lacking
  in parity/NMI-support.

  Strange enough - the ASUS-TP4 (Trition Chipset) does work with the GUS
  Max - it does load the SBOS-Driver. I have to admit, I am confused.


  3.2.  Various types of ASUS Boards



  3.2.1.  ASUS SP3 with saturn chipset I (rev. 2) for 486,


  o  2 x rs232 with 16550

  o  NCR53c810 onboard,

  o  slightly broken saturn-chipset I (rev. 2)


  3.2.2.  ASUS SP3G with saturn chipset II (rev. 4) for 486,

  like SP3, but less buggy saturn chipset


  3.2.3.  ASUS SP3-SiS chipset, for 486

  like AP4, but newer, SiS chipset, green functions and all the EIDE,
  rs232 with 2 16550 and centronics.  Only 2 SIMM Slots,  Does seem to
  work with AMD486DX4/120, but was not very reliably on NCR53c810 and
  various operating systems (Windows-NT, Windows95, OS2), after
  upgrading to a PentiumBoard ASUS SP4, all the problems vanished, so it
  must have been the board.  Still does seem to work nice for Linux,
  though.


  3.2.4.  ASUS AP4, for 486, with PCI/ISA/VesaLocalbus

  green functions, 1VL, 3 ISA, 4 PCI slots, only EIDE onboard, no fd-
  controller, no rs232/centronics. Very small size.

  does recognice AMD486DX2/66 as DX4/100 only. This can be corrected
  with soldering one pin (which?) to ground, but I would not recommend a
  board like this anyway.

  The one I tested was broken for OS2 and Linux, but people are said to
  use it for both.

  The VesaLocalbus-Slot is expected to be slower than the normal vesa-
  localbus boards because of the PCI2VL bridge, but without penalty to
  the PCI section.


  3.2.5.  ASUS SP4-SiS, for Pentium90, PCI/ISA

  like SP3-SiS, but for Pentium90/100.


  3.2.6.  ASUS TP4 with Triton chipset and EDO-Support

  has the Triton-Chipset for better performance and supports normal
  PS2-Simms as well as Fast-Page-Mode and EDO modules.


  3.2.7.  ASUS TP4XE with Triton chipset and additional SRAM/EDORAM sup-
  port

  supports the new EDORAM and upcoming SRAM standards. At least SRAM is
  said to considerabely increase performance. Did for some reason not
  accept the 8M PS2-SIMMS working ok in ASUS SP4, after changing them
  against others, bigger looking ones, (16 chips instead of 8 if I
  remember right) it worked ok. Has been tested with P90 and P100.


  3.2.8.  ...and many others now.

  if you have new information on problems with them, please report.


  3.3.  Benchmarks on ASUS Mainboards

  I tried to compare the speed of CPUs in two ASUS Mainboards: for 486 I
  tested the SP3 SiS (the one with one vesa-local-bus slot) and for 586
  I tested the ASUS TP4/XE, each with 16M RAM, always the same unloaded
  system with another CPU, with whetstone and dhrystone.

  I must admit, I have not read the benchmarks-faq yet, and will
  probably edit the section a loot soon. If you have any comments,
  please mail me.

  I am especially confused about the amd486DX4/100 being faster on
  dhrystones than the DX4/120 version? I did not see that kind of
  inconsistency on comparing the P90 and P100.


  Perhaps this was at fault: when I plugged in the amdDX4-100, I had the
  board jumpered for DX2-66. While the BIOS did report it as an DX4-100,
  the board might have used the wrong clockspeeds... but since DX2-66
  uses 33Mhz * 2 and DX4 uses 33Mhz * 3, this would have been correct?

  The board running with DX4-120 is jumpered to 40Mhz * 3 = 120 Mhz.

  Another thing I wonder about is why the whetstones-result does yield
  so even numbers on some machines?


  3.3.1.  ASUS SP3 with amd486DX4-100


  o  Dhrystone time for 500000 passes = 7 by 63559 dhrystones/second

  o  Whetstone time for 1000 passes = 5 by 200.0000 Whetstones/second


  3.3.2.  ASUS SP3 with amd486DX4-120


  o  Dhrystone time for 500000 passes = 8 by 56074 dhrystones/second

  o  Whetstone time for 1000 passes =  4 by 250.0000 Whetstones/second


  3.3.3.  ASUS SP3 with intel486DX2-66


  o  Dhrystone time for 500000 passes = 9 by 50761 dhrystones/second

  o  Whetstone time for 1000 passes = 7 by 142.8571 Whetstones/second


  3.3.4.  ASUS TP4/XE with intel586-90


  o  Dhrystone time for 500000 passes = 4 by 101010 dhrystones/second

  o  Whetstone time for 1000 passes = 3 by 333.3333 Whetstones/second


  3.3.5.  ASUS TP4/XE with intel586-100


  o  Dhrystone time for 500000 passes = 4 by 102040 dhrystones/second

  o  Whetstone time for 1000 passes = 2  by 500.0000 Whetstones/second


  3.4.  Detailed information on the old ASUS PCI-I-SP3 with saturn
  chipset from heinrich@zsv.gmd.de:



  o  3 PCI, 4 ISA Slots (3x16, 1x8 Bit)

  o  ZIF Socket for the CPU

  o  room for 4 72pin-SIMMs (max. 128M)

  o  Award BIOS in Flash-Eprom

  o  Onboard: NCR-SCSI, 1par, 2ser (with FIFO), AT-Bus, Floppy

  The board does like most in that price class -- write-through cache,
  no write-back. This should not be significant, maybe 3% of
  performance.

  The BIOS supports scsi-drives under DOS/Windows without additional
  drivers, but with the board come additional drivers which are said to
  give better performance, for DOS/Windows(ASPI), OS2, Windows-NT, SCO-
  Unix, Netware (3.11 and 4, if interpreted correctly)

  Gert Doering (gert@greenie.muc.de) was saying the SCO-Unix-driver for
  the onboard-SCSI-Chip was not working properly. After two or three
  times doing: "time dd if=/dev/rhd20 of=/dev/null bs=100k count=500" it
  kernel-paniced...

  The trouble some people experienced with this board might be due to
  them using an outboard Adaptec-SCSI-Controller with "sync negotiation"
  turned on. (This predates the NCR driver release; hence the use of the
  Adaptec.) Please check that in the BIOS-Setup of the Adaptec-1542C if
  you use one and have problems with occasional hangups!

  There is a new version of the ASUS-Board which should have definitely
  less problems. It is called ASUS-PCI-I/SP3G, the G is important. It
  has the new Saturn-chipset rev. 4 and the bugs should be gone.  They
  use the Saturn-ZX-variant and the new SP3G has fully PCI conforming
  level-triggered (thus shareable), BIOS-configurable interrupts.  It
  has an on-board PS/2-mouseport, EPA-power-saving-modes and
  DX4-support, too. It performs excellently. If you can get the German
  computer magazine C't from July (?), you will find a test report where
  the ASUS-Board is the best around.

  Latest information about ASUS-SP3-G: You might experience crashes when
  using PCI-to-Memory-Posting. If you disable this, all works perfect.
  jw@peanuts.informatik.uni-tuebingen.de said he believed it to be a
  problem of the current Linux-kernel  rather than the hardware, because
  part of the system still works when crashing, looking like a deadlock
  in the swapper, and OS2/DOS/WINDOZE don't crash at all.

  Someone else with a very old ASUS-SP3 (saturn-I chipset) reported
  crashes with using XFree86, which went away when he installed the very
  latest betaversion which seems to work around a bit of the problems.


  3.5.  Pat Dowler (dowler@pt1B1106.FSH.UVic.CA) with ASUS SP3G



  o  ASUS SP3G board (it is rev.4 == saturn II)

  o  AMD DX4-100 CPU (need to set jumper 36 to 1&2 rather than 2&3,
     otherwise it's set the same as other 486DXn chips)

  o  256K cache (comes with 15ns cache :-)

  o  16meg RAM (2x8meg)

  o  ET4000 ISA video card

  o  quantum IDE hard drive

  o  SMC Elitel16 combo ethernet card

  Unlike some other reports, I find the mouse pointer moves very smoothy
  under X (just like the ol' 386)  - it is jumpy under some, but not
  all, DOS games though...


  Performance is great!! I ran some large floating point tests and found
  the performance in 3x33 (100MHz) mode to be almost 1.5x that in 2x
  (66MHz) mode (large being 500x500 doubles - 4meg or so)... I was a
  little dubious about clock-tripling but I seem to be getting full
  benefit :-)

  The heavily configurable energy star stuff doesn't work with the
  current AMD DX4 chips - you need an SL chip

  I really need a SCSI disk and a PCI video card :-)

  (I had a phonecall by a person who had this problem with the buggy SMC
  FIFO chipset, after using X-window they hung.)


  4.  confusion about saturn chipsets


  Pat Duffy (duffy@theory.chem.ubc.ca) said:


  Saturn I:  these are revisions 1 and 2 of the Saturn chipsets.
  Saturn II:  This is also called rev. 4 of the Saturn chipsets.

  As far as I know, rev. 3 never actually shipped, and (from a few people who
  have it) the SP3G now has rev. 4 (or Saturn II) in it.

  Confused?  Well, the only real definitive answer is to get ahold of the board
  and run the debug script in the PCI chipset list on it.  As far as I know,
  though, the SP3G board is indeed shipping with rev. 4 (Saturn II).



  5.  Video-Cards

  Linux people have successfully used # 9 XGE Level 12, ELSA Winner
  1000, and S3-928 video cards. The XFree86(tm)-3.1.1 does support
  boards with the tseng et4000/w32 in accelerated mode, as well as S3
  Vision 864 and 964 chipsets including boards like the ELSA Winner
  1000Pro and 2000Pro, Number Nine GXE64 and GXE64Pro, Miro Crystal
  20SV). Support in the S3 Server for the Chrontel8391 clock chip has
  been added.

  Trio32 and Trio64 S3 Boards like the SPEA V7 Mirage P64 PCI and  MIRO
  Crystal 40SV, are also supported, the Mach32 and Mach64 are supported
  in accelerated mode, too.

  The SVGA Driver

  16bpp mode (65K colors instead of the usual 256) support for Mach32
  boards as well as 32bpp for some S3 boards and the P9000 boards has
  been added.


  tldraben@teleport.com reported:


  o  Diamond Stealth W32 (et4000/W32) -- Text mode works, X11 suffered
     from "pixel dust", unbearable never got it to work and returned it.

  o  # 9GXE L12 -- Works, virtual consoles corrupted when switched,
     fixed this with disabling the "fast dram mode" feature in his BIOS.
     Does not get a dot clock above 85, though.


  Genoa Phantom 8900PCI card seems to work well.  Genoa Phantom/W32 2MB
  does not work in an ASUS-Board.  Tseng 3000/W32i chipset seems to work
  well.  Spea-v7 mercury-lite works perfectly since XFree86(tm)-2.1.

  Spea V7 Mirage P64 PCI 2M with Trio64 works nice since
  XFree86(tm)-3.1.1


  ATI Graphics Ultra Pro for PCI with 2MB VRAM and an ATI68875C DAC run
  well as dem@skyline.dayton.oh.us tells us: "It's humming right along
  at 1280x1024 w/256 colors @74Hz non-interlaced. Looks great."

  Paradise WD90C33 PCI did lock up on screensaver/X - this has been
  solved in the newer versions of the kernel.  jbauer@badlands.NoDak.edu
  (John Edward Bauer)

  miroChrystal 8S/PCI (1MB) S3 - no problem.

  Stephen Tweedie reported his Cirrus Logics 5434 PCI card works well.
  It is a 64bit with 2M and runs perfectly with the SVGA driver in 8, 16
  and 32 bit per pixel.



  6.  Ethernet Cards

  Of course the ISA-ethernet-cards still work, but people are asking for
  PCI-based ones. The author of many (if not most) ethernet- drivers
  said the following some time ago (unfortunately I have not managed to
  contact him about new information):


       From: Donald Becker (becker@cesdis.gsfc.nasa.gov) Subject:
       PCI ethernet cards supported?

       The LANCE code has been extended to handle the PCI version.
       I hope to get the PCI probe code (about a dozen extra lines
       in the LANCE driver) into the next kernel version.  I'm
       working on the 32 bit mode code.  I haven't yet started the
       21040 code.

       I'll write drivers for the PCnet32 mode and the DEC 21040.
       That will cover most of the PCI ethercard market.

       file://cesdis.gsfc.nasa.gov/pub/people/becker/whoiam.html


  In the new testkernels of 1.1.50 and above, the AMD-singlechip
  ethernetadapters are supported. With a pentium, they ought to then see
  900K/second ftps +(assuming an NCR PCI scsi controller) at about 20%
  cpu load. (AMD Lance).

  Anything based on the AMD PCnet/PCI chip should work at the time
  being. In the US the Boca board costs under US$ 70

  Geoffry Coram reported in the news that he got his 3com 590 TPO to
  work. He had to get the alpha driver from
  http://cesdis.gsfc.nasa.gov/linux/drivers.  Other drivers would be
  there as well.  Note
  http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html

  Donald Holmgren said he successfully attached his DEC DE435 (PCI) card
  to the local network on thin coax (BNC).  The DE435 driver checks the
  twisted pair connection first, then switches to the alternate port
  (jumper selectable as AUI or BNC) if the 10BaseT port fails.
  Jim Cusick uses the Boca BEN 1PI card on a thin coax network.  It
  works just fine.  You might want to check out:
  http://cesdis.gsfc.nasa.gov/linux/misc/boca-failure.html for details
  on the early failures of this card.  My second card, after sending one
  back for replacement, was marked "PN 4186".  The old one that did not
  work was "PN 4185".  Mandate this newer model when you order from you
  vendor.  At $ 70, the card is a good deal.

  Dave Platt recommends to stay off the Boca BEN1PI card at all costs.
  It would be unreliable due to design flaws, and Boca seems unable to
  really fix the problem. The 3Com 3c590 "Vortex" PCI card is available
  in a combo version (10BaseT, thin coax, and AUI).  The Linux driver
  for this card is not yet part of the release kernel, but is available
  from http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html and can be
  patched into the later 1.2.x kernels (as well as 1.3.x) without much
  difficulty.  The Linux driver does not support the interface
  autodetect feature of this card - you must use the DOS utility to
  configure the card for the interface you wish to use (thin coax in
  this case).  Once you've done that, the Linux driver will use the
  correct interface.

  He has been using a 3c590 for several weeks, and it is working fine.

  Dave Kennedy said he got two of the above Boca boards and they work
  fine under light load, but under heavy work like ftping two 16M files
  into both directions, they failed. He sent the boards back to Boca for
  a hardwarefix. After they soldered a couple of things
  (diodes/resistors) onto the card and sent them back, the cards worked
  fine regardless of load. The two cards have been in 7/24 use in two
  P90 systems without problems for 6 months now.

  Craig does not recommend it since Boca seems not to follow the AMD
  specs but he has been running them for 2 weeks without problems. He
  tested his NFS performance and has been moving large files to and from
  server (16M, 8M).  He also tried to do all his workin localy using his
  data files mounted by NFS and has had no problems. Performance seems
  to be 100 percent better (wrt to NFS performance) over his NE2000 ISA
  board. (editors note: but so would probably have been the ISA SMC
  Elite Ultra?)


  6.1.  3com-3c590-tpo


  Someone on usenet mentioned ht used the 3Com-3C590-TPO (EtherLink III
  - PCI).  He had to get the "3c59x.c" driver and "vortex.patch" to make
  it work with his 1.2.8 Linux kernel.


  6.2.  DEC435 PCI NIC


  The DEC435 PCI NIC is said to work great with the drivers included in
  the Slackwaredistribution - I'd say they are in the standard-kernel?


  7.  Motherboards

  The people who answered were using the following boards:


  7.1.  ASUS


  o  Ruediger.Funck@Physik.TU-Muenchen.DE - successful.

  o  strauss@dagoba.escape.de - half-successful, works, but...

  o  krypton@netzservice.de (Ulrich Teichert), - successful.

  o  heinrich@zsv.gmd.de - successful

  o  CARSTEN@AWORLD.aworld.de - successful

  o  egooch@mc.com - successful - but trouble with the serial port

  o  archie@CS.Berkeley.EDU and his friend - successful after solving
     IDE-puzzle

  o  Lars Heinemann (lars@uni-paderborn.de) successful

  o  Michael Will (Michael.Will@student.uni-tuebingen.de) - successful.


  7.2.  Micronics P54i-90


  root@intellibase.gte.com succesful bill.foster@mccaw.com successful
  karpens@ncssm-server.ncssm.edu successful


  7.3.  SA486P AIO-II


  ah@doc.ic.ac.uk successful



  7.4.  Sirius SPACE


  hi86@rz.uni-karlsruhe.de - successful


  7.5.  Gateway-2000

  kenf@clark.net - no problems except the soundcard he tries to swap
  dmarples@comms.eee.strathclyde.ac.uk - successful, but...  robert
  logan (rl@de-montfort.ac.uk) - flawless.  James D. Levine
  (jdl@netcom.com) - flawless.


  7.6.  Intel-Premiere

  grif@cs.ucr.edu - successful jeromem@amiserv.xnet.com - successful
  demarest@rerf.or.jp - successful (Premier-II)


  7.7.  DELL Poweredge SP4100 gbelow@pmail.sams.ch - successful

  7.8.  torsten@videonetworks.com - successful when turning off plug and
  play DELL OptiPlex Gl+ 575

  7.9.  Comtrade Best Buy PCI / PCI48X MB Rev 1.0

  tldraben@Teleport.Com - "Works, I believe it has buggy Saturn chipset.
  I would also like to add: I strongly recommend not buying from
  Contrade.  Their service is horrible. "



  7.10.  IDeal PCI / PCI48X MB Rev 1.0

  tldraben@Teleport.Com - "Did not work with PCI48X motherboard"


  7.11.  CMD Tech. PCI IDE / CSA-6400C

  tldraben@TelePort.com - "Works"


  7.12.  GA-486iS (Gigabyte)

  Stefan.Dalibor@informatik.uni-erlangen.de - success with problems.


  7.13.  GA-586-ID (Gigabyte) 90 Mhz Pentium PCI/EISA Board

  kkeyte@esoc.bitnet - succesful


  7.14.  ESCOM 486dx2/66 - which board?

  Works perfect except the ftape-streamer (archive)


  7.15.  J-Bond with i486dx2/66

  Drew Eckhardt (drew@kinglear.cs.Colorado.EDU) uses Diamond Stealth 64
  VRAM with 4M of memory (964 based). It works great, he usualy runs it
  at 1024x768 72hz in 32bpp; 16 and 8bpp also work. He needed to get the
  X311u2S3.tgz server from ftp.xfree86.org; people with 968 based
  Diamond boards will definately need to do this.



  7.16.  super micro 011895 03:50 SUPER P54CI-PCI rev 1.3 (Opti)


  Manuel de Vega Barreiro

  o  board    super micro 011895 03:50 SUPER P54CI-PCI rev 1.3

  o  Opti chipset: 82c557,82c556,82c558,82c621.

  o  4 PCI, 4 ISA Slots (4x16 Bit)

  o  ZIF Socket for CPU (120,100,90,75 mHz)

  o  4 72 pin-SIMMs (max 128Mb)

  o  cache 256,512,1024 Kb L2-cache

  o  Ami WinBIOS in Flash-Eprom (101094-VIPER-P)

  o  onboard: EIDE for 4 drives

  o  Pentium with 90Mhz, 8M (now 16M) RAM and 256K L2-cache.

  o  1 maxtor 540 Mb, 1 st3122A 1Gb

  o  Number Nine 9GXE64pro with 2Mb

  o  Sound blaster 16 + cdrom Matsushita

  o  17" microscan 5ep ADI monitor

     I run  linux 1.1.57  (now 1.2.1) without problems.  dosemu0.53 work
     fine (com. software like kermit and xtalk) XFree86 3.1 at 1024x768
     resolution



  8.  reports on success



  8.1.  GigaByte GA486-AM with AMD Am5x86-133-WB @ 160MHz (40MHz PCI)


  GigaByte GA486-AM


  o  AMD Am5x86-133-WB @ 160MHz (40MHz PCI)

  o  BIOS as of 11/07/95 (Rev.A)

  o  256KB 2nd level cache (15ns)

  o  48MB RAM (Mixed 60/70ns)

  Hercules Terminator 64/VIDEO (S3 765 or "Trio 64V+")

  Sound Blaster 16

  o  Panasonic CR563 CD-ROM drive

  Silicon 4Ser/3Par I/O

  o  Mouse

  o  Terminal

  o  Terminal

  o  Modem (14k4)

  o  HP Laserjet III

  Mitsumi CD-ROM controller

  o  FX001D drive

  Longshine 1MBit Floppy controller

  o  IOMega Tape Insider 250

  o  3,5" Floppy

  o  5,25" Floppy

  No Network card, because the 4 ISA slots are full, and I don't have a
  PCI card.  I (now) use kernel 2.0.22 with APM enabled, and the hard
  drives power down and up properly without panics.  The system is 24hrs
  up a day and still running. Kernel compilation takes between 5 and 7
  minutes, depending on options.



  8.2.  California Graphics - Sunray II Pro


  Guido Trentalancia (guido@gulliver.unian.it) reported the California
  Graphics - Sunray II Pro with Triton chipset to work well with
  Pentium100, Hd: Conner cfs420a, Conner cfs210a, crunching numbers at
  147492 dhrystones/second.


  8.3.  Micronics P54i-90 (root@intellibase.gte.com)


  Pentium with 90Mhz, 32M RAM and 512K L2-cache. Works extremely well (a
  kernel recompile takes 10 minutes :-).


  The board includes:

  o  UART - two 16550A high speed UARTS

  o  ECP - one enhanced parallel port

  o  Onboard IDE controller

  o  Onboard floppy controller

  Pros: Currently, I'm using it with an Adaptec 1542CF and a 1G Seagate
  drive, No problems. Graphics is ATI Graphics Pro Turbo (PCI). Very
  fast. The serial ports can keep up with a TeleBit T3000 modem (38400)
  without overruns.  Caching above 16M does occur. There are 3 banks of
  SIMM slots (2 SIMM's per bank), with each bank capable of 64M each (2
  32M 72-pin SIMM's). Each bank must be filled completely to be used
  (I'm only using bank 0 with 2 16Mx72-pin SIMM's). The CPU socket is a
  ZIF type socket. The BIOS is Phoenix, FLASH type.

  Drawbacks: RAM is expandable to 192M, but the L2 cache is maxed at
  512K. While the graphics are very fast, there is currently no XF86
  server for the Mach64 (well, actually there is, but it doesn't use any
  of the accelerator features; it's just an SVGA server). I don't know
  if the onboard IDE hard drive controller works; I'm prejudiced against
  a standard that won't allow my peripherals to operate across
  platforms, so I didn't buy an IDE disk; instead, I got a Seagate
  31200N and a NEC 3Xi.

  Mitch


  8.4.  Angelo Haritsis (ah@doc.ic.ac.uk) about SA486P AIO-II:

  The motherboard I eventually bought (in the UK) is one supporting 486
  SX/DX/DX2/DX4 chips. It is called SA486P AIO-II. Features include:


  o  Intel Saturn v2 chipset

  o  Phoenix BIOS (flash eprom option)

  o  NCR scsi BIOS v 3.04.00

  o  256K 15ns cache (max 512) write back and write through

  o  4 72-pin SIMM slots in 2 banks

  o  3 PCI slots, 4 ISA


  o  On-board NCR 53c810 scsi controller

  o  On-board IDE / floppy / 2 x 16550A uarts / enhanced parallel

  I bought it from a company (UK) called ICS, (note I have no
  connections whatsoever with the company, just a happy customer). I use
  a 486/DX2-66 CPU.

  Before I had a VLB 486 m/board with a buslogic BT-445S controller that
  I was borrowing. I have 2 scsi devices: 1 barracuda 2.1GB ST12550N
  disk and a Wangtek 5525ES tape drive.  I was expecting a lot of
  adventures by switching to the new motherboard, esp after hearing all
  these non-success stories on the net. To my surprise everything worked
  flawlessly on the 1st boot! (1.1.50). And it has been doing so for
  about a month now. I did not even have to repartition the disk:
  apparently the disk geometry bios translation of the 2 controllers is
  the same.  Linux has had no problems at all. SCSI is visibly much
  faster as well (sorry, I have no actual performance measurements).

  The only problems (related to Drew's linux ncr53c7,810 scsi driver -
  thanks for the good work Drew!) are:

  o  no synchronous transfers are yet supported => performance hit

  o  disconnect/reconnect is disabled => disk scsi ops "hold" during
     certain slow scsi device opeartions (eg tape rewind)

  o  tagged queuing is not there (?) => performance hit

  If you get Windows complainingg about 32-bit disk driver problems,
  just disable 32-bit disk access via Control Panel. This should not
  hurt performance. (What I did is remove the WDCTRL driver from my
  SYSTEM.INI).

  All else is fine. I tried the serial ports with some dos/windows s/w
  and worked ok. The IDE/floppy work ok as well. I have not tried the
  parallel yet. The motherboard is quite fast and so far I am very
  pleased with the upgrade. I have not yet tried a PCI graphics board. I
  will later on. I am using an old ISA S3 which is fine at the moment.

  PS: the NCR drivers in the 2.0.x kernels should have no problems of
  that kind anymore. please consult the SCSI-HOWTO for further and
  hopefully more uptodate information.


  8.5.  bill.foster@mccaw.com about his Micronics M5Pi

  Micronics M5Pi motherboard with 60 MHz Pentium, PCI bus having the
  following components:


  16Mb RAM/512k cache
  onboard IDE, parallel, 16550A UARTS
  2 X 340MB Maxtor IDE Hard Drives
  Soundblaster 16 SCSI-II
  Toshiba 3401B SCSI CD-ROM
  Archive Viper 525MB SCSI Tape Drive
  Viewsonic 17 monitor
  Cardex Challenger PCI video card (ET4000/W32P)
  A4-Tech Serial Mouse



  Everything works great, Slackware installation was very easy, I can
  run Quicken 7 for DOS under DOSEMU. I run X at 1152x900 resolution at
  67Hz.
  8.6.  Simon Karpen (karpens@ncssm-server.ncssm.edu) with Micronics
  M54pi

  I have had no problems with the above board, the on-board PCI IDE
  (hopefully soon will also have SCSI), and an ATI Mach32 (GUP) with 2MB
  of VRAM.


  8.7.  Goerg von Below (gbelow@pmail.sams.ch) about DELL Poweredge



  - Intel 486DX4/100
  - 16 MB RAM
  - DELL SCSI array (DSA) with Firmware A07, DSA-Manager 1.7
  - 1 GB SCSI HD DIGITAL
  - NEC SCSI CD-ROM
  - 2 GB internal SCSI streamer
  - 3-Com C579 EISA Ethernet card
  - ATI 6800AX PCI VGA subsystem, 1024 MB RAM

  CAVE! DELL SCSI Array controller (DSA) runs only with firmware Rev. A07 !
  A06 is buggy, impossible to reboot !
  To get it: ftp dell.com , file is /dellbbs/dsa/dsaman17.zip



  Apart from this firmware-problem there where no problems for the last
  2 months, running with linux 1.1.42 as primary nameserver, newsserver
  and www-server on internet.


  8.8.  zenon@resonex.com about Gateway2000 P-66

  Gateway2000's P5-66 system with Intel's PCI motherboard, with 5 ISA
  slots and 3 PCI slots.  The only PCI card I am using is the # 9 GXe
  level 12 PCI card (2 MB VRAM and 1 MB DRAM). This card was bought from
  Dell. Under Linux I am using the graphics in the 80x25 mode only (I am
  waiting for some XFree86 refinements before using it in 1280x1024
  resolution), but under DOS/Windows I have used the card in
  1280x1024x256 mode without problems. Etherlink 3C509 Ethernet card,
  Mitsumi bus-interface card, Adaptec 1542C SCSI interface card and
  additional serial/parallel ports card (which makes the total of serial
  ports 3).

  I have total of 32 MB RAM (recognized and used by both Linux and DOS).
  There is also a bus mouse (Microsoft in the PS2 mode).

  No problems so far.


  8.9.  James D. Levine (jdl@netcom.com) with Gateway2000

  Gateway 2000 P5-60 with an Intel Mercury motherboard, AMI-Flash-BIOS,
  (1.00.03.AF1, (c)'92) 16M RAM, on-board IDE controller and an ATI AX0
  (Mach32 Ultra XLR) PCI display adapter. He had absolutely no problems
  with the hardware so far but has not tried anything fancy, such as
  accelerated IDE drivers or SCSI support.


  8.10.  hi86@rz.uni-karlsruhe.de with SPACE

  SPACE-board, 8MB RAM, S3 805 1MB DRAM PCI 260MB Seagate IDE-hard disk
  because of lack of NCR53c810-Driver, 0.99pl15d, does seem to work
  well.

  8.11.  grif@cs.ucr.edu with INTEL

  17 machines running a 60Mhz-i586 on Intel-Premier-PCI-Board


  8.12.  Jermoe Meyers (jeromem@amiserv.xnet.com) with Intel Premiere


  Motherboard - Intel Premiere Plato-babyAT 90mhz with Buslogic bt946c
  w/4.86 mcode w/4.22 autoSCSI firmware, (note, mine came with 4.80
  mcode and 4.17 autoSCSI firmware. (interrupt pins A,B,C conform to
  respective PCI slots!) ATI Xpression (Mach64) - using driver from
  sunsite, (running AcerView 56L monitor).

  The motherboard has 4 IDE drives, Linux (Slackware 2.0) sees the first
  two and everything on the Buslogic as it emulates an adaptec 1542.
  Uh, yes, Dos sees them all.  Buslogic is VERY accomodating in regards
  to shipping upgraded chips (you will have to know how to change PLCC
  (plastic leaded chip carrier) chips, 3 of them.  Though, don't let
  that scare you :-) it's not that tough.  Get a low end PLCC removal
  tool, and your in business.  You also might want to "flash upgrade
  your system bios from Intel's IPAN BBS, a trivial process.  Whats even
  more interesting is I also have a Sound Blaster SCSI-2 running a scsi
  CDROM drive off it's adaptech 1522 onboard controller.  So thats 4 IDE
  drives (2 under Linux) and 2 SCSI-2 controllers.


  I hope this helps others who are struggling with PCI technology use
  Linux!  Jerry (jeromem@xnet.com)


  8.13.  Timothy Demarest (demarest@rerf.or.jp) Intel Plato Premiere II

  My system is configured as follows:  16Mb 60ns RAM, 3Com Etherlink-III
  53C809 ethernet card (using 10base2), ATI Mach 64 2Mb VRAM, Toshiba 2x
  SCSI CDROM, NCR 53c810 PCI SCSI, Syquest 3270 270Mb Cartridge Drive,
  Viewsonic 17 monitor, Pentium-90 (FDIV Bug Free).  Running Slackware
  2.1.0, Kernel 1.2.0, with other misc patches/upgrades.

  Everything is functioning flawlessly.  I dont recommend the Syquest
  drives.  I have used the 3105 and the 3270 and both a very, very
  fragile.  Also, the cartridges are easily damaged and I have had
  frequent problems with them.  I am in the process of looking for
  alternative removable storage (MO, Zip, Minidisc, etc).

  Some information you might need:


  8.13.1.  Flash Bios upgrades

  Flash Bios updates can be ftp'd from
  wuarchive.wustl.edu:/pub/MSDOS_UPLOADS/plato. The current version is
  1.00.12.AX1.  The BIOS upgrades *must* be done in order.  1.00.03.AZ1
  to 1.00.06.AX1 to 1.00.08.AX1 to 1.00.10.AX1 to 1.00.12.AX1.  The
  Flash BIOS updates can also be downloaded from the Intel BBS.  I do
  not have that number right now.


  8.13.2.  NCR 53c810 BIOSless PCI SCSI

  If you are using an NCR 53c810 BIOSless PCI SCSI card in the Plato,
  you may have trouble getting the card to be recognized.  I had to
  change one of the jumpers on the NCR card:  the jumper that controls
  whether there is 1 or 2 NCR SCSI cards in your system must be set to
  "2".  I dont know why, but this is how I got it to work.  The other
  jumper controls the INT setting (A,B,C,D).  I left mine at A (the
  default).


  8.13.3.  apart from that - plug and play!

  There are no settings in the motherboard BIOS for setting the NCR
  53c810.  Dont worry - once the card is jumpered correctly, it will be
  recognized!  So much for PCI Plug-n-Play!


  8.14.  heinrich@zsv.gmd.de with ASUS

  ASUS-PCI-Board (SP3) having:



  o  -- Asus PCI-Board with AMD 486/dx2-66 and 16M RAM

  o  -- Fujitsu 2196ESA 1G SCSI-II

  o  -- Future Domain 850MEX Controller (cheap-SCSI-Controller, almost a
     clone to Seagate's ST01... want's to use ncr53c810 as soon as the
     driver comes out

  o  -- ATI Graphics Ultra (the older one with Mach-8 Chip, ISA-Bus)

  o  -- Slackware 1.1.1

  He just exchanged the boards, plugged his cards in, connected the
  cables, and it worked perfect. He does not use any PCI-Cards yet,
  though.


  8.15.  CARSTEN@AWORLD.aworld.de with ASUS

  ASUS-PCI-Board with 486DX66/2, miro-crystal 8s PCI driven by the
  S3-drivers of XFree86-2.0, using the onboard SCSI-Chip. No problems
  with compatibility at all.



  8.16.  Lars Heinemann (lars@uni-paderborn.de) with ASUS

  ASUS PCI/I-486SP3 Motherboard w/ 486DX2/66 and 16M RAM (2x8),
  miroChrystal 8S/PCI (1MB) S3, Soundblaster PRO, Adaptec 1542b (3.20
  ROM) SCSI host adapter with two hard disks (Fujitsu M2694ESA u.
  Quantum LPS52) and a QIC-150 Streamer attached.  No problems at all!


  8.17.  Ruediger.Funck@Physik.TU-Muenchen.DE with ASUS

  ASUS PCI/I-486SP3 / i486DX2-66 / 8 MB PS/2 70 ns BIOS: Award v 4.50
  CPU TO DRAM write buffer: enabled CPU TO PCI write buffer: enabled PCI
  TO DRAM write buffer: disabled, unchangeable CPU TO PCI burst write:
  enabled Miro Crystal 8s PCI - S3 P86C805 - 1MB DRAM

  Quantum LPS 540S SCSI-Harddisk on NCR53c810-controller.


  8.18.  robert logan (rl@de-montfort.ac.uk with GW/2000)


  Gateway 2000 4DX2-66P 16 Megs RAM, PCI ATI AX0 2MB DRAM (ATI GUP).  WD
  2540 Hard Disk (528 Megs) CrystalScan 1776LE 17inch. (Runs up to
  1280x1024) Slackware 1.1.2 (0.99pl15f)

  It is giving no problems. He uses SLIP for networking and an Orchid-
  Soundwave-32 for niceties, awaiting the NCR-Driver.  The only problem
  he has is that the IDE-Drive could be much faster on the PCI-IDE. It
  is one of the new Western Digital fast drives and in DOS/WfW it
  absolutely screams - on Linux it is just as slow as a good IDE-Drive.


  8.19.  archie@CS.Berkeley.EDU and his friend use ASUS

  Archie and his friend have rather similar configurations:


  o  ASUS PCI-SP3 board (4 ISA, 3 PCI)

  o  Intel 486DX2/66

  o  Genoa Phantom 8900PCI card (friend: Tseng 3000/W32i chipset)

  o  Maxtor 345 MB IDE hard drive

  o  Supra 14.4 internal modem

  o  ViewSonic 6e monitor (Archie)

  o  NEC Multisync 4fge (friend)

  o  Slackware 1.2.0

  The onboard-SCSI is disabled. First there were problems with the IDE-
  drive: ``on the board there's a jumper which selects whether IRQ14
  comes from the ISA bus or the PCI bus. The manual has an example where
  they show connecting it to PCI INT-A. Well, we did that just like the
  example... but then later our IDE drive would not work (the IDE
  controller is on board). Had to take it back. The guys at NCA were
  puzzled, then traced it back to this jumper. I guess the IDE
  controller uses IRQ14 or something? That's not documented anywhere in
  the manual. Other than that, seems to be kicking ass nicely now.
  Running X, modeming, etc. (for the Supra you have to explicitly tell
  the kernel that the COM port has a 16550A using setserial (in
  Slackware /etc/rc.d/rc.serial))''.


  8.20.  Michael Will with ASUS-SP3 486 (the old one)


  used the following:


  o  ASUS PCI-SP3-Board with 486dx2/66 and 16M RAM

  o  NCR53c810-SCSI-II chip driving a 1GB-Seagate-SCSI-II disk and a
     Wangtec-tape

  o  ATI-GUP PCI Mach32 Graphics card with 2M VRAM running perfectly
     with XFree86(tm)-3.1 8bpp and 16bpp

  o  Linux kernel 1.1.69

  It runs perfectly and I am content with the speed, the ATI-GUP-PCI
  (Mach32) does not give as good benchmarks as expected, though. Since I
  got the money by now, I got me an ASUS-SP4 with P90 which gives me
  better throughput on Mach32-PCI...  If I had even more money I'd get
  me another 16M of RAM and a Mach64-PCI with 4M RAM, though... I still
  keep on dreaming :-)


  8.21.  Mike Frisch (mfrisch@saturn.tlug.org) Giga-Byte 486IM



  o  Motherboard: Giga-Byte 486IM

  o  Configuration: 4 ISA slots (2 double as VLB) and 4 PCI slots

  o  CPU: Intel 486DX/33

  o  BIOS: Award 4.50G

  o  PCI EIDE Disk Controller: Giga-Byte GA-107 (CMD 640x PCI Multi-I/O)

  o  PCI Video card: ATI Graphics eXpression PCI 2MB DRAM

  o  Linux Kernel: 1.2.9

  o  Linux Dist'n: Highly modified Slackware 2.2.0

  I have been running this board 24 hours a day for the past 5-6 months.
  It has worked flawlessly for me under DOS/Windows, OS/2 Warp, and
  Linux (with Linux being run usually 24 hours a day).



  8.22.  Karl Keyte (kkeyte@esoc.bitnet) Gigabyte GA586 Pentium


  o  PCI/EISA Board Gigabyte GA586-ID 90MHz Pentium (dual processor, one
     fitted)

  o  32M RAM

  o  SCSI - no scsi-NCR-chip on-board, using Adaptec 1542C,

  o  PCI ATI GUP 2M VRAM

  o  Adaptec 1742 EISA SCSI controller

  o  Soundblaster 16

  o  usual I/O


  Everything under DOS AND Linux works perfectly.  No problem
  whatsoever.  A VERY fast machine!  BYTE Unix benchmarks place it about
  the same as a Sun SuperSPARC-20 running Solaris 2.3.  The PC is faster
  for integer arithmetic and process stuff (including context
  switching).  The SPARC is faster for floating point and one of the
  disk benchmarks.



  8.23.  kenf@clark.net with G/W 2000

  He uses a Gateway 2000 with no problems, except the soundcard (which
  one?). He is trading it in for a genuine soundblaster in hopes that
  will help.


  8.24.  Joerg Wedeck (jw@peanuts.informatik.uni-tuebingen.de) / ESCOM

  originaly buyed a 486 DX2/66 from ESCOM (which board?) with onboard
  IDE and without (!) onboard NCR-SCSI-chip. ISA-adaptec 1542cf scsi-
  controller instead spea v7 mercury lite (s3, PCI, 1MB), ISA-
  Soundblaster-16, mitsumi-cdrom (the slower one).  Everything except
  the archive-streamer works with no problems.  The spea-v7 works
  perfectly since XFree86-2.1

  He abandoned the Intel-board in favour of an ASUS-SP3-g and has some
  problems with PCI-to-Memory burstmode which is crashing only on Linux,
  "looking like a deadlock in the swapper". If you have any information
  on this, please eMail the maintainer of the PCI-HOWTO.

  After turning off the PCI-to-Memory posting feature it just works
  perfect.

  Rather than sending him mail please read his http-homepage at
  "http://wsiserv.informatik.uni-tuebingen.de/ jw" where he keeps
  information about his PCI-system, too.


  8.25.  Ulrich Teichert / ASUS


  ASUS-PCI board with AMD486dx40 (but actually running at 33Mhz?!)  His
  ISA-ET3000 Optima 1024A ISA works nice. No problems with Quantum540S
  SCSI Harddisk attached to the onboard NCR53c810.



  9.  Reports of problems



  9.1.  Compaq PCI systems, especially Presarios


  Patrick Yaner (p_yaner@eos.ncsu.edu) reported a Compaq-speciality to
  me. It seems they are mapping the PCI BIOS data area to an obscure
  area of memory, one that Linux (or OS2) cannot access. It can usually
  find it, but it can't get in, and gives a message on startup
  (something like "pcibios_init: entry in high memory area, unable to
  access").  Although this is alright with the display (which is on the
  PCI bus) and the IDE controller (also PCI), it means any other PCI
  devices -- such as an Ethernet card -- cannot be detected by Linux.

  Compaq offers a driver for DOS at
  ftp://ftp.compaq.com/pub/softpaq/Drivers/SP1116.ZIP

  but using this with linux would mean using the program that boots
  linux from DOS, instead of LILO.  Note that Compaq occasionally
  updates the software in this archive, so the file
  ftp://ftp.compaq.com/pub/softpaq/allfiles.html (also available as
  allfiles.txt) might be handy in checking to see that they haven't
  upgraded.

  Oddly, this information can also be found in the SCSI HOWTO, although
  the Pressarios come with IDE built in.


  9.2.  VLSI Wildcat PCI chipset like in Zeos P120 box


  Paul Bame (bame@sde.hp.com) reported:

  The Wildcat PCI chipset works fine in late 1.3 and all 2.0 kernels.



  9.3.  dmarples@comms.eee.strathclyde.ac.uk G/W 2000


  Gateway 2000 G/W 2000 4DX2/66 PCI ATI-Graphics-Ultra-Pro IDE of
  indeterminate make

  It works well - only the IDE-Card runs in ISA-compatibility-mode, and
  works a lot faster when switched into PCI-Mode by a DOS-program...
  thus it's not that fast in Linux, and a patch would be nice.


  9.4.  cip574@wpax01.physik.uni-wuerzburg.de (Frank Hofmann) / ASUS


  He uses the ASUS-board with 16MB-RAM, ISA-based S3/928, and the
  onboard-IDE-controller with a Seagate ST4550A harddisk. He's had no
  trouble with the newer Linux-kernels.

  His problem:

       using X, my mouse is not responding the way I was used to before. It's
       sometimes behind movement and makes jumps if moved quickly. I think
       this was discussed In a Linux newsgroup before (I don't know which
       one) and is due to the use of 16550 serial chips for the onboard
       serial interfaces. After two weeks, I got used to it :-)


  Reducing the threshold of the 16550 should help. There should be a
  patch to setserial available somewhere, but I do not know where.



  9.5.  axel@avalanche.cs.tu-berlin.de (Axel Mahler) / ASUS


  ASUS PCI/I-486SP3 Motherboard (Award BIOS 4.50), 16 MB RAM the on-
  Board NCR Chip is disabled, he had the Genoa Phantom/W32 2MB for PCI
  and a Adaptec AHA-1542CF (BIOS v2.01) connected to:

  o  an IBM 1.05 GB Harddisk

  o  a Toshiba CD-ROM (XM4101-B)

  o  a HP DAT-Streamer (2GB)

  when creating the filesystems, 'mke2fs' (0.4, v. 1.11.93) hung and
  installation was impossible. After replacing the Genoa Phantom/W32 2MB
  PCI with an ELSA Winner 1000 2MB PCI it worked perfectly.  He tested
  it with an old Eizo VGA-ISA and it worked as well, so the problem was
  in the Genoa-PCI-card.


  9.6.  Frank Strauss (strauss@dagoba.escape.de) / ASUS

  ASUS SP3 Board i486DX2/66 NCR53c810 disabled Adaptec 1542B in ISA Slot
  with 2 hard drives (200MB Maxtor, 420MB Fijutsu), SyQuest 88MB and
  Tandberg Streamer ELSA Winner 1000 PCI, 1MB-VRAM Soundblaster Pro in
  ISA Slot at IRQ 5 Onboard IDE disabled Onboard serial, parallel, FD
  enabled

  After a reset, the machine sometimes 'hangs' (soft and hard-reset the
  same) - this is probably not related to the Adaptec and the Soundcard,
  because even without these the system sometimes fails to come up. But
  if it runs, (and the ELSA-WINNER-1000-PCI-message appears) it runs ok.


  The two serial ports are detected as 16550 as they should, but at some
  mailbox-sessions there was heavy data-loss at V42bis... The problem
  seems to be in the hardware...


  CPU>-PCI-Burst seems to work well with DOS/MS-Windows

  CPU->PCI-Burst does not work properly with linux0.99p15, Messing up
  when switching the virtual-consoles, crashing completely when calling
  big apps like ghostview, or xdvi, leaving the SCSI-LED on (!).

  (I suspect these apps would be using a lot of CPU->PCI-burst because
  of the big heap of data to transmit to the PCI-Winner-1000)

  After disabling CPU->PCI-Burst, it works well, the Winner-1000 at
  1152x846 (not much font cache with 1MB) does 93k xstones. OpaqueMove
  with twm is more than just endureable :-)

  He has got a SATURN.EXE which he loads under DOS before starting
  Linux, helping to turn on burst without hangs...

  Someone stated that these problems might go away when turning off
  "sync negotiation" on the Adaptec - I do not know if this is possible
  with the adaptec1542B too? But I guess so.

  With CPU->PCI-Burst it yielded 95k xstones, so he considers it as not
  too grave to do without. His only problem is that he would like to run
  his Winner-1000 at 1152x900 which fails because it seems to take any
  x-resolution higher than 1024pixels as a 1280pixel-resolution, thus
  wasting a lot end resulting in a y-resolution of 816pixels... but this
  is probably no PCI-related problem. It should have gone away with
  XFree86-2.1


  9.7.  egooch@mc.com / ASUS



  o  BOARD  ASUS PCI/I-486 SP3      RAM: 16MB (4x4M-SIMM)

  o  CPU    486DX33 CPU

  o  BIOS   Ver. 4.50 (12/30/93)

  o  Floppy         Two floppy drives (1.2 and 1.44), using ASUS on-
     board floppy controller

  o  SCSI tried both WD7000 SCSI controller and Adaptec 1542CF and
     worked.

  o  Two SCSI 320M hard drives

  o  SCSI NEC84 CDROM drive

  o  SCSI QIC150 Archive tape drive

  o  Video - Tseng ET4000 ISA graphics card

  o  Sound PAS16 sound card

  o  Printer attached to on-board ASUS parallel port

  He has nothing in the PCI-Slots yet, but wants to buy a PCI-Video-
  Card, currently uses WD7000 SCSI controller but will switch to the
  NCR-Chip onboard as soon as the driver is out.

  Everything works perfectly - the first serial port which has a 14.4K-
  Modem attached does hang occasionally when reconnecting with the modem
  after having used it previously.  He says that would not be unique to
  ASUS but rather a bug in the SMC-LSI device with its 16550UART. The
  logitech-serial-mouse on the second port works fine. Setting down the
  threshold of the 16550 for the mouseport would definitely help, one
  does seem to need a special patched setserial for that? I have not got
  the information yet, please contact me if you know more!



  9.8.  Stefan.Dalibor@informatik.uni-erlangen.de / GigaByte


  o  Board - GA-486iS from Gigabyte w/ 256Kb 2L-Cache, i486-DX2

  o  Bios - AMI, 93/8

  o  SCSI - no scsi-NCR-chip on-board, using Adaptec 1542C,

  o  Video - ELSA Winner 1000

  o  Linux 0.99pl14 + SCSI-Clustering-Patches / Slackware 1.1.1


  All seems to go well, but he has not tried neither networking,
  printing or a streamer yet. Before applying the clustering- patches he
  had some problems with hangs triggered by "find", but this no longer
  is the case - perhaps it was an older kernel-bug.

  The ELSA-Winner-1000 sometimes hangs, with very strange patterns on
  the screen resolved only by rebooting... The dealer has told him it
  was a bug in the ELSA-Card, but the manufacturer claims it had solved
  the problem. The bug is not reproducible so he does not plan to take
  any action at the moment.

  All in all the machine seems to work very well under heavy text
  processing (emacs, LaTeX, xfig, ghostview) usage.  Interaction is
  surprisingly responsive, little difference between it and the 3-4X as
  expensive Sun he works on...

  CPU->PCI-Burst is still disabled because the bios does not support the
  PCI-things well?

  A problem with his new modem (v32 terbo) arose: it looses characters.
  Especially when using SLIP it complains a lot about RX and TX errors.
  As soon as he runs X it gets unusable. He said he activated FIFO and
  RTS/CTS with stty, but to no avail...



  9.9.  Steve Durst (sdurst@burns.rl.af.mil) with UMC 8500 mainboard

  Running Linux 1.2.12 on the UMC8500-100Mhz motherboard with the
  dreaded CMD PCIO640B (E)IDE controller, when booting the screen
  wiggles a few seconds, as if the Diamond Stealth64-DRAM (S3 864) has
  to warm up first, but he can live with that.



  9.10.  Tom Drabenstott (tldraben@Teleport.Com) with Comtrade / PCI48IX


  PCI48IX Motherboard Rev. 1.0. Made by ??? documentation copyrighted by
  "exrc". The BIOS says not very much about PCI.

  His E-315E Super IDE UMC (863+865) ISA-Controller-card does have
  problems. (It is a multifunction controller-card). It seems to work
  well under DOS/OS2 but not under Linux.


  10.  General tips for PCI-Motherboard + Linux NCR PCI SCSI


  This was compiled by Angelo Haritsis (ah@doc.ic.ac.uk) from various
  people's postings:


  10.1.  DON'Ts:


  Do *NOT* go for combination VLB/PCI motherboards. They usually have a
  lot of problems. Get a plain PCI version (with ISA slots as well of
  course).  A lot of bad things have been heard about OPTI chipset PCI
  motherboards.  Someone hints: "Avoid the OPTi (82C596/82C597/82C822)
  chipset based motherboards like the TMC PCI54PV".

  (I know of at least one person having no problems with his TMC PCI54PV
  motherboard. He just had to put the NCR53c810 addonboard into slot-A
  which is the only slot capable of busmastering as it seems.)

  Rumours say that Intel chipset PCI motherboards will have problems
  with more than one bus-mastering PCI board. I have not tried this one
  yet on mine and have nothing to suggest. I also heard that the Saturn
  II chipset is problematic, but this is the one I use and it is
  perfectly ok! Advice: Try to negotiate a 1-2 week money back agreement
  with your supplier, in case the motherboard you get has problems with
  the use you plan for it.


  10.2.  SIMM slots


  Go for 72-pin only SIMMs for speed: Some (all?) of the mainboards
  which take 30 pin SIMMs use a 32 bit main memory interface, and will
  be significantly slower than the Intel based boards which all use a 64
  bit or permantly interleaved memory interface.  You might want to keep
  that in mind.


  10.3.  Praised PCI Pentium motherboard


  The P90 Intel motherboard with the Intel Premiere II chipset (aka
  Plato). Get the latest BIOS which has concatenated NCR scsi BIOS
  3.04.00. Otherwise DOS won't see your scsi disk(s) if you use a BIOS-
  less 53c810 based controller.  NCR SCSI BIOS exists in the AMI BIOS of
  the plato after version 1.00.08 (or maybe verion 1.00.06). This BIOS
  is FLASH upgradeable so you should be able to get the upgrade on a
  floppy from your supplier. The current version is 1.00.10 and has all
  early problems fixed.

  (Bios files should be available at ftp.demon.co.uk:/pub/ibmpc/intel,
  but I did not check that myself. the Autor.)


  10.4.  irq-lines


  The value in the interrupt line PCI configuration register is usually
  set manually (for compatability with legacy ISA boards) in the
  extended CMOS setup screens on a per-slot or per-device basis.  Older
  PCI mainboards also force you to set jumpers for each PCI slot/device
  which select how PCI INTA and perhaps INTB, INTC, and INTD are mapped
  to an 8259 IRQ line, Obviously, if these jumpers exist on your board,
  they must match the settings in the extended CMOS setup.  Also note
  that some boards (notably Viglens) have silkscreens and instruction
  manuals which disagree with the wiring, and some experimentation may
  be in order.


  10.5.  Info about the different NCR 8xx family scsi chips:


  All NCR 8XX Chips are dircet connect PCI bus mastering devices, that
  have no preformance difference wether on motherboard or add in option
  card.  All devices comply with PCI 2.0 Specification, and can burst 32
  bit data at the full 33 MHz (133Mbytes/Sec)


  10.5.1.  53C810

  53C810 = 8 bit Fast SCSI-2 (10 MB/Sec) Single ended only Requires
  Integrated Mother board BIOS 100 pin Quad Flat Pack (PQFP) Worlds
  first PCI SCSI Chip, Volumes make it the most inexpensive.


  10.5.2.  53C815

  53C815 = 8 bit Fast SCSI-2 (10 MB/Sec) Single Ended only Support ROM
  BIOS interface, which makes it ideal for add-in card Designs. 128 Pin
  QFP


  10.5.3.  53C825

  53C825 = 8 bit Fast SCSI-2, Single ended or Differential 16 bit Fast
  SCSI-2 (20 MB/Sec), Single ended or Differetial Also has support for
  external Rom, making it a good candidate for add in cards. 160 pin QFP
  Not supported by linux yet. (See section below on news about the 825).
  Must have devices with wide or differential scsi to use these
  features.



  10.6.  future of 53c8xx

  There are 4 new devices planned for announcement late this year and
  into early next year.  Footprint compitible with 810 and 825 with some
  new features.

  All the Chips require a BIOS in DOS/Intel applications.  The 810 is
  the only chip that needs it resident on the motherboard. Latest NCR
  SCSI BIOS version: 3.04.00 The bios supports disks >1GB, indeed up to
  8G under MS-LOSS.


  10.7.  Performance of the 53c810

  C't magazine's DOS benchmarks showed that it was significantly faster
  than the Buslogic BT-946, one user noted a 10-15% performance increase
  versus an Adaptec 2940, and with a very fast disk it may be 2.5X as
  fast as an Adaptec 1540.



  10.8.  News about NCR53c825 support

  works. period.


  10.9.  Frederic POTTER (Frederic.Potter@masi.ibp.fr) about Pen-
  tium+NCR+Strap_bug

  On some Intel Plato board,  the NCR bios doesn't recognize the board,
  because it needs to see the board as a "secondary SCSI controller",
  and because on most SCSI board the jumper to select between
  primary/secondary has been ironed to primary (to spare 1 cent,
  presumably).

  Solution:

  near the NCR chip, they are 3 via ( kind of holes ) with a strap like
  that
                  O--O  O

          this mean primary is selected as default setting. For the Plato Intel
          Mainboard, it should be like that

                  O  O--O

          The best solution is to get rid of the strap and to put a 2 position
          jumper instead.



  10.10.  PCIprobe in the latest Linux Kernels by Frederic Potter


  Frederic Potter has added a PCI-Probe into the latest kernels. If you
  do a "cat /proc/pci" it should list all your cards. If you own cards
  which are not properly recogniced, please contact him via mail as
  "Frederic.Potter@masi.ibp.fr".

  See arch/i386/kernel/bios32.c and include/linux/pci.h in the kernel
  source for more information on PCI-Probe-Stuff.


  10.11.  Other PCI Devices

  What other PCI-cards are supported? Apart from various graphicscards,
  I would like to know about other cards like ethernet, framegrabber, or
  the TSET boards Cyclades is about to beta-test at the moment:


  10.11.1.  Cyclades: a 16-port PCI RISC-based multiport card.



  The product is called Cyclom-Ye, and has the following
  characteristics:


  o  PCI host card based on the PLX chip-set. This host card supports 8
     to 32 serial ports, utilizing 8 or 16-port external boxes.

  o  SCSI II cable.

  o  8 or 16-port external boxes with RJ45 or DB25 connectors (your
     choice).  You can start with 8 ports and expand to 32, by just
     adding more boxes. Each external box contains 2 or 4 CD-1400 RISC
     Serial controllers (each CD-1400 controls 4 serial ports).

  o  Up to 4 Host cards can be installed in the PC system, allowing a
     maximum of 128 serial ports per system.


  The product is being in the beta-test phase at July the 26th, 1995,
  and should be available by Octobre or something. eMail them at
  sales@cyclades.com.



  11.  Conclusion


  If you have some moneny to put into your machine, you'd be well off
  with a Pentium90, ASUS-SP4, which is what I use at the moment. If you
  can afford 32M RAM that would be much better than 16M RAM.

  Real soon now the upcoming standard will be the Triton Chipset with
  support for special SIMMS called EDODRAM, and SRAM. Both will be more
  expensive than PS2-RAM, and at the time of writing (28-June-1995) SRAM
  is not available. While EDO-DRAM is more expensive, this is not
  because of the production costs, they are said to be the same.

  For a highperformance system I would still choose an ASUS-TP4/XE with
  EDO-DRAM, but if you do not need to use it at the moment, I d rather
  wait some more.

  For Graphic-boards I'd say the best cheap board fitting perfectly on a
  good Multisync-15 like the Samsung SyncMaster 15Gli, is the SPEA V7
  Mirage P64 with Trio64 Chipset and 2M DRAM. For more sophisticated
  Display like the Iiyama-IDEK 8617A-T I think the PCI Mach64 ATI-GUP-
  Turbo (not the cheaper GUP-Turbo-Windows) would be a good choice, with
  4M RAM you can have truecolor in higher resolutions. It is well
  supported in the XFree86(tm)-3.1.1, and there are commercial X-Servers
  available of which I'd recommend Accelerated/X by Roell, which
  supports the Mach64 very well and fast.

  For SCSI I'd take the DPT rather than the (much cheaper and very fast)
  NCR53c810 in case you plan to use SCSI-Tapes a lot. The NCR53c810
  driver on Linux does lack disconnect/reconnect support, thus blocking
  the SCSIbus on operations like "mt rewind", "mt fsf" etc. It bears a
  performance penalty on tar-operations - but check out Drews new alpha
  drivers before making a decision, perhaps it does solve all the
  problems.

  For building servers, the DPT would be the controller of choice anyway
  because of all the nifty hardware cache (with elevator sorting on
  accesses, so cache it is not a silly thing even in a Linux enviroment
  where the OS does the caching) and RAID-Support up to raid level 5.

  If you do not want to spend that much money on computer equipment
  (e.g.: you are having a life) you might go for an ASUS-SP3-SiS with
  AMD-DX2/66 or DX4/100. The SPEA V7 Mirage P64 PCI with 2M DRAM would
  be a good choice, since it uses the Trio64 S3 Chip, which is well
  supported by XFree86(tm)-3.1.1, quite cheap to buy and fast, too.

  Another fine card since XFree86(tm)-3.1 is the fast and cheap
  et4000/w32-PCI-card.


  12.  Thanks

  I want to thank the following people for supporting this document:

  o  David Lesher (wb8foz@netcom.com) for extensive help with the
     english language

  o  Nathanael MAKAREVITCH (nat@nataa.frmug.fr.net) for translating into
     french

  o  Jun Morimoto (morimoto@lab.imagica.co.jp) for translating into
     japanese

  o  Marco Melgazzi (marco@vcldec1.polito.it) for translating into
     italian

  o  Donald Becker (becker@cesdis.gsfc.nasa.gov) for ethernet-
     informations

  o  Drew Eckhardt (drew@kinglear.cs.Colorado.EDU) for SCSI-informations

  o  Zhahai Stewart (zhahai@hisys.com) for help with the intro section

  and many more peole adding information mostly by mail and by posts,
  some of them will be named here:

  CARSTEN@AWORLD.aworld.de,
  dmarples@comms.eee.strathclyde.ac.uk,
  drew@kinglear.cs.Colorado.EDU (Working at the PCI-NCR53c810-Driver),
  duncan@spd.eee.strathclyde.ac.uk,
  fm3@irz.inf.tu-dresden.de,
  grif@ucrengr.ucr.edu,
  heinrich@zsv.gmd.de,
  hm@ix.de (iX-Magazine),
  hm@seneca.ix.de,
  kebsch.pad@sni.de,
  kenf@clark.net,
  matthias@penthouse.boerde.de,
  ortloff@omega.informatik.uni-dortmund.de,
  preberle@cip.informatik.uni-erlangen.de,
  rob@me62.lbl.gov,
  rsi@netcom.com,
  sk001sp@unidui.uni-duisburg.de,
  strauss@dagoba.escape.de,
  strauss@dagoba.priconet.de,
  hi86@rz.uni-karlsruhe.de,
  Ulrich Teichert, krypton@netzservice.de,
  Stefan.Dalibor@informatik.uni-erlangen.de,
  tldraben@teleport.com
  mundkur@eagle.ece.uci.edu,
  ooch@jericho.mc.com,
  Gert Doering (gert@greenie.muc.de),
  James D. Levine (jdl@netcom.com),
  Georg von Below (gbelow@pmail.sams.ch),
  Jerome Meyers (jeromem@quake.xnet.com),
  Angelo Haritsis (ah@doc.ic.ac.uk),
  archie@CS.Berkeley.EDU and his friend kenf@clark.net.



  13.  copyright/legalese

  (c)opyright 1993,94 by Michael Will - the GPL (Gnu Public License)
  applies. See last section about this.

  If you sell this HOWTO on a CD or in a book I would be happy to have a
  copy for reference.


  (Michael.Will@student.uni-tuebingen.de)

  Contact me, either via eMail or call +49-7071-969063.

  Trademarks are owned by their owners. There is no warranty on the
  information in this document.

  For german users I am offering tested, preinstalled / preconfigured
  and supported Linux-PCI-machines. Call me at 07071-969063.


  14.  GPL - Gnu Public License



                      GNU GENERAL PUBLIC LICENSE
                         Version 2, June 1991

   Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                            675 Mass Ave, Cambridge, MA 02139, USA
   Everyone is permitted to copy and distribute verbatim copies
   of this license document, but changing it is not allowed.

                              Preamble

    The licenses for most software are designed to take away your
  freedom to share and change it.  By contrast, the GNU General Public
  License is intended to guarantee your freedom to share and change free
  software--to make sure the software is free for all its users.  This
  General Public License applies to most of the Free Software
  Foundation's software and to any other program whose authors commit to
  using it.  (Some other Free Software Foundation software is covered by
  the GNU Library General Public License instead.)  You can apply it to
  your programs, too.

    When we speak of free software, we are referring to freedom, not
  price.  Our General Public Licenses are designed to make sure that you
  have the freedom to distribute copies of free software (and charge for
  this service if you wish), that you receive source code or can get it
  if you want it, that you can change the software or use pieces of it
  in new free programs; and that you know you can do these things.

    To protect your rights, we need to make restrictions that forbid
  anyone to deny you these rights or to ask you to surrender the rights.
  These restrictions translate to certain responsibilities for you if you
  distribute copies of the software, or if you modify it.

    For example, if you distribute copies of such a program, whether
  gratis or for a fee, you must give the recipients all the rights that
  you have.  You must make sure that they, too, receive or can get the
  source code.  And you must show them these terms so they know their
  rights.

    We protect your rights with two steps: (1) copyright the software, and
  (2) offer you this license which gives you legal permission to copy,
  distribute and/or modify the software.

    Also, for each author's protection and ours, we want to make certain
  that everyone understands that there is no warranty for this free
  software.  If the software is modified by someone else and passed on, we
  want its recipients to know that what they have is not the original, so
  that any problems introduced by others will not reflect on the original
  authors' reputations.

    Finally, any free program is threatened constantly by software
  patents.  We wish to avoid the danger that redistributors of a free
  program will individually obtain patent licenses, in effect making the
  program proprietary.  To prevent this, we have made it clear that any
  patent must be licensed for everyone's free use or not licensed at all.

    The precise terms and conditions for copying, distribution and
  modification follow.

                      GNU GENERAL PUBLIC LICENSE
     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

    0. This License applies to any program or other work which contains
  a notice placed by the copyright holder saying it may be distributed
  under the terms of this General Public License.  The "Program", below,
  refers to any such program or work, and a "work based on the Program"
  means either the Program or any derivative work under copyright law:
  that is to say, a work containing the Program or a portion of it,
  either verbatim or with modifications and/or translated into another
  language.  (Hereinafter, translation is included without limitation in
  the term "modification".)  Each licensee is addressed as "you".

  Activities other than copying, distribution and modification are not
  covered by this License; they are outside its scope.  The act of
  running the Program is not restricted, and the output from the Program
  is covered only if its contents constitute a work based on the
  Program (independent of having been made by running the Program).
  Whether that is true depends on what the Program does.

    1. You may copy and distribute verbatim copies of the Program's
  source code as you receive it, in any medium, provided that you
  conspicuously and appropriately publish on each copy an appropriate
  copyright notice and disclaimer of warranty; keep intact all the
  notices that refer to this License and to the absence of any warranty;
  and give any other recipients of the Program a copy of this License
  along with the Program.

  You may charge a fee for the physical act of transferring a copy, and
  you may at your option offer warranty protection in exchange for a fee.

    2. You may modify your copy or copies of the Program or any portion
  of it, thus forming a work based on the Program, and copy and
  distribute such modifications or work under the terms of Section 1
  above, provided that you also meet all of these conditions:

      a) You must cause the modified files to carry prominent notices
      stating that you changed the files and the date of any change.

      b) You must cause any work that you distribute or publish, that in
      whole or in part contains or is derived from the Program or any
      part thereof, to be licensed as a whole at no charge to all third
      parties under the terms of this License.

      c) If the modified program normally reads commands interactively
      when run, you must cause it, when started running for such
      interactive use in the most ordinary way, to print or display an
      announcement including an appropriate copyright notice and a
      notice that there is no warranty (or else, saying that you provide
      a warranty) and that users may redistribute the program under
      these conditions, and telling the user how to view a copy of this
      License.  (Exception: if the Program itself is interactive but
      does not normally print such an announcement, your work based on
      the Program is not required to print an announcement.)

  These requirements apply to the modified work as a whole.  If
  identifiable sections of that work are not derived from the Program,
  and can be reasonably considered independent and separate works in
  themselves, then this License, and its terms, do not apply to those
  sections when you distribute them as separate works.  But when you
  distribute the same sections as part of a whole which is a work based
  on the Program, the distribution of the whole must be on the terms of
  this License, whose permissions for other licensees extend to the
  entire whole, and thus to each and every part regardless of who wrote it.

  Thus, it is not the intent of this section to claim rights or contest
  your rights to work written entirely by you; rather, the intent is to
  exercise the right to control the distribution of derivative or
  collective works based on the Program.

  In addition, mere aggregation of another work not based on the Program
  with the Program (or with a work based on the Program) on a volume of
  a storage or distribution medium does not bring the other work under
  the scope of this License.
    3. You may copy and distribute the Program (or a work based on it,
  under Section 2) in object code or executable form under the terms of
  Sections 1 and 2 above provided that you also do one of the following:

      a) Accompany it with the complete corresponding machine-readable
      source code, which must be distributed under the terms of Sections
      1 and 2 above on a medium customarily used for software interchange; or,

      b) Accompany it with a written offer, valid for at least three
      years, to give any third party, for a charge no more than your
      cost of physically performing source distribution, a complete
      machine-readable copy of the corresponding source code, to be
      distributed under the terms of Sections 1 and 2 above on a medium
      customarily used for software interchange; or,

      c) Accompany it with the information you received as to the offer
      to distribute corresponding source code.  (This alternative is
      allowed only for noncommercial distribution and only if you
      received the program in object code or executable form with such
      an offer, in accord with Subsection b above.)

  The source code for a work means the preferred form of the work for
  making modifications to it.  For an executable work, complete source
  code means all the source code for all modules it contains, plus any
  associated interface definition files, plus the scripts used to
  control compilation and installation of the executable.  However, as a
  special exception, the source code distributed need not include
  anything that is normally distributed (in either source or binary
  form) with the major components (compiler, kernel, and so on) of the
  operating system on which the executable runs, unless that component
  itself accompanies the executable.

  If distribution of executable or object code is made by offering
  access to copy from a designated place, then offering equivalent
  access to copy the source code from the same place counts as
  distribution of the source code, even though third parties are not
  compelled to copy the source along with the object code.

    4. You may not copy, modify, sublicense, or distribute the Program
  except as expressly provided under this License.  Any attempt
  otherwise to copy, modify, sublicense or distribute the Program is
  void, and will automatically terminate your rights under this License.
  However, parties who have received copies, or rights, from you under
  this License will not have their licenses terminated so long as such
  parties remain in full compliance.

    5. You are not required to accept this License, since you have not
  signed it.  However, nothing else grants you permission to modify or
  distribute the Program or its derivative works.  These actions are
  prohibited by law if you do not accept this License.  Therefore, by
  modifying or distributing the Program (or any work based on the
  Program), you indicate your acceptance of this License to do so, and
  all its terms and conditions for copying, distributing or modifying
  the Program or works based on it.

    6. Each time you redistribute the Program (or any work based on the
  Program), the recipient automatically receives a license from the
  original licensor to copy, distribute or modify the Program subject to
  these terms and conditions.  You may not impose any further
  restrictions on the recipients' exercise of the rights granted herein.
  You are not responsible for enforcing compliance by third parties to
  this License.

    7. If, as a consequence of a court judgment or allegation of patent
  infringement or for any other reason (not limited to patent issues),
  conditions are imposed on you (whether by court order, agreement or
  otherwise) that contradict the conditions of this License, they do not
  excuse you from the conditions of this License.  If you cannot
  distribute so as to satisfy simultaneously your obligations under this
  License and any other pertinent obligations, then as a consequence you
  may not distribute the Program at all.  For example, if a patent
  license would not permit royalty-free redistribution of the Program by
  all those who receive copies directly or indirectly through you, then
  the only way you could satisfy both it and this License would be to
  refrain entirely from distribution of the Program.

  If any portion of this section is held invalid or unenforceable under
  any particular circumstance, the balance of the section is intended to
  apply and the section as a whole is intended to apply in other
  circumstances.

  It is not the purpose of this section to induce you to infringe any
  patents or other property right claims or to contest validity of any
  such claims; this section has the sole purpose of protecting the
  integrity of the free software distribution system, which is
  implemented by public license practices.  Many people have made
  generous contributions to the wide range of software distributed
  through that system in reliance on consistent application of that
  system; it is up to the author/donor to decide if he or she is willing
  to distribute software through any other system and a licensee cannot
  impose that choice.

  This section is intended to make thoroughly clear what is believed to
  be a consequence of the rest of this License.

    8. If the distribution and/or use of the Program is restricted in
  certain countries either by patents or by copyrighted interfaces, the
  original copyright holder who places the Program under this License
  may add an explicit geographical distribution limitation excluding
  those countries, so that distribution is permitted only in or among
  countries not thus excluded.  In such case, this License incorporates
  the limitation as if written in the body of this License.

    9. The Free Software Foundation may publish revised and/or new versions
  of the General Public License from time to time.  Such new versions will
  be similar in spirit to the present version, but may differ in detail to
  address new problems or concerns.

  Each version is given a distinguishing version number.  If the Program
  specifies a version number of this License which applies to it and "any
  later version", you have the option of following the terms and conditions
  either of that version or of any later version published by the Free
  Software Foundation.  If the Program does not specify a version number of
  this License, you may choose any version ever published by the Free Software
  Foundation.

    10. If you wish to incorporate parts of the Program into other free
  programs whose distribution conditions are different, write to the author
  to ask for permission.  For software which is copyrighted by the Free
  Software Foundation, write to the Free Software Foundation; we sometimes
  make exceptions for this.  Our decision will be guided by the two goals
  of preserving the free status of all derivatives of our free software and
  of promoting the sharing and reuse of software generally.

                              NO WARRANTY

    11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  REPAIR OR CORRECTION.

    12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGES.

                       END OF TERMS AND CONDITIONS

          Appendix: How to Apply These Terms to Your New Programs

    If you develop a new program, and you want it to be of the greatest
  possible use to the public, the best way to achieve this is to make it
  free software which everyone can redistribute and change under these terms.

    To do so, attach the following notices to the program.  It is safest
  to attach them to the start of each source file to most effectively
  convey the exclusion of warranty; and each file should have at least
  the "copyright" line and a pointer to where the full notice is found.

      <one line to give the program's name and a brief idea of what it does.>
      Copyright (C) 19yy  (name of author)

      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 2 of the License, or
      (at your option) any later version.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
      along with this program; if not, write to the Free Software
      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  Also add information on how to contact you by electronic and paper mail.

  If the program is interactive, make it output a short notice like this
  when it starts in an interactive mode:

      Gnomovision version 69, Copyright (C) 19yy name of author
      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
      This is free software, and you are welcome to redistribute it
      under certain conditions; type `show c' for details.

  The hypothetical commands `show w' and `show c' should show the appropriate
  parts of the General Public License.  Of course, the commands you use may
  be called something other than `show w' and `show c'; they could even be
  mouse-clicks or menu items--whatever suits your program.

  You should also get your employer (if you work as a programmer) or your
  school, if any, to sign a "copyright disclaimer" for the program, if
  necessary.  Here is a sample; alter the names:

    Yoyodyne, Inc., hereby disclaims all copyright interest in the program
    `Gnomovision' (which makes passes at compilers) written by James Hacker.

    (signature of Ty Coon), 1 April 1989
    Ty Coon, President of Vice

  This General Public License does not permit incorporating your program into
  proprietary programs.  If your program is a subroutine library, you may
  consider it more useful to permit linking proprietary applications with the
  library.  If this is what you want to do, use the GNU Library General
  Public License instead of this License.



  Linux PCMCIA HOWTO
  David Hinds, dhinds@pcmcia.sourceforge.org.
  v2.46, 1 December 1999

  This document describes how to install and use PCMCIA Card Services
  for Linux, and answers some frequently asked questions.  The latest
  version of this document can always be found at <ftp://source-
  forge.org/pcmcia/doc>.  An HTML version is at  <http://pcmcia.source-
  forge.org>.
  ______________________________________________________________________

  Table of Contents



  1. General information and hardware requirements

     1.1 Introduction
     1.2 Copyright notice and disclaimer
     1.3 What is the latest version, and where can I get it?
     1.4 What systems are supported?
     1.5 What cards are supported?
     1.6 When will my favorite (unsupported) card become supported?
     1.7 Mailing lists and other information sources
     1.8 Why don't you distribute binaries?
     1.9 Why is the package so darned big?

  2. Compilation and installation

     2.1 Prerequisites and kernel setup
     2.2 Installation
     2.3 Startup options
     2.4 System resource settings
     2.5 Notes about specific Linux distributions
        2.5.1 Debian
        2.5.2 Red Hat, Caldera, Mandrake
        2.5.3 Slackware
        2.5.4 SuSE

  3. Resolving installation and configuration problems

     3.1 Base PCMCIA kernel modules do not load
     3.2 Some client driver modules do not load
     3.3 Interrupt scan failures
     3.4 IO port scan failures
     3.5 Memory probe failures
     3.6 Failure to detect card insertions and removals
     3.7 System resource starvation
     3.8 Resource conflict only with two cards inserted
     3.9 Device configuration does not complete

  4. Usage and features

     4.1 Tools for configuring and monitoring PCMCIA devices
        4.1.1 The cardmgr configuration daemon
        4.1.2 The socket status file, stab
        4.1.3 The cardctl and cardinfo utilities
        4.1.4 Inserting and ejecting cards
        4.1.5 Card Services and Advanced Power Management
        4.1.6 Shutting down the PCMCIA system
     4.2 Overview of the PCMCIA configuration scripts
     4.3 PCMCIA network adapters
        4.3.1 Network device parameters
        4.3.2 Comments about specific cards
        4.3.3 Diagnosing problems with network adapters
     4.4 PCMCIA serial and modem devices
        4.4.1 Serial device parameters
        4.4.2 Comments about specific cards
        4.4.3 Diagnosing problems with serial devices
     4.5 PCMCIA parallel port devices
        4.5.1 Parallel device parameters
        4.5.2 Diagnosing problems with parallel port devices
     4.6 PCMCIA SCSI adapters
        4.6.1 SCSI device parameters
        4.6.2 Comments about specific cards
        4.6.3 Diagnosing problems with SCSI adapters
     4.7 PCMCIA memory cards
        4.7.1 Memory device parameters
        4.7.2 Using linear flash memory cards
     4.8 PCMCIA ATA/IDE card drives
        4.8.1 ATA/IDE fixed-disk device parameters
        4.8.2 Diagnosing problems with ATA/IDE adapters
     4.9 Multifunction cards

  5. Advanced topics

     5.1 Resource allocation for PCMCIA devices
     5.2 How can I have separate device setups for home and work?
     5.3 Booting from a PCMCIA device
        5.3.1 The pcinitrd helper script
        5.3.2 Creating an initrd boot floppy
        5.3.3 Installing an initrd image on a non-Linux drive

  6. Dealing with unsupported cards

     6.1 Configuring unrecognized cards
     6.2 Adding support for an NE2000-compatible ethernet card
     6.3 PCMCIA floppy interface cards

  7. Debugging tips and programming information

     7.1 Submitting useful bug reports
     7.2 Interpreting kernel trap reports
     7.3 Low level PCMCIA debugging aids
     7.4 /proc/bus/pccard
     7.5 Writing Card Services drivers for new cards
     7.6 Guidelines for PCMCIA client driver authors
     7.7 Guidelines for Linux distribution maintainers


  ______________________________________________________________________

  1.  General information and hardware requirements

  1.1.  Introduction

  Card Services for Linux is a complete PCMCIA or ``PC Card'' support
  package.  It includes a set of loadable kernel modules that implement
  a version of the Card Services applications program interface, a set
  of client drivers for specific cards, and a card manager daemon that
  can respond to card insertion and removal events, loading and
  unloading drivers on demand.  It supports ``hot swapping'' of most
  card types, so cards can be safely inserted and ejected at any time.

  This software is continually under development.  It probably contains
  bugs, and should be used with caution.  I'll do my best to fix
  problems that are reported to me, but if you don't tell me, I may
  never know.  If you use this code, I hope you will send me your
  experiences, good or bad!

  If you have any suggestions for how this document could be improved,
  please let me know (dhinds@pcmcia.sourceforge.org).


  1.2.  Copyright notice and disclaimer

  Copyright (c) 1998 David A. Hinds

  This document may be reproduced or distributed in any form without my
  prior permission.  Modified versions of this document, including
  translations into other languages, may be freely distributed, provided
  that they are clearly identified as such, and this copyright is
  included intact.

  This document may be included in commercial distributions without my
  prior consent.  While it is not required, I would like to be informed
  of such usage.  If you intend to incorporate this document in a
  published work, please contact me to make sure you have the latest
  available version.

  This document is provided ``AS IS'', with no express or implied
  warranties.  Use the information in this document at your own risk.


  1.3.  What is the latest version, and where can I get it?

  The current major release of Card Services is version 3.1, and minor
  updates or bug fixes are numbered 3.1.1, 3.1.2, and so on.

  Source code for the latest version is available from sourceforge.org
  in the /pcmcia directory, as pcmcia-cs-3.1.?.tar.gz.  There will
  usually be several versions here.  I generally only keep the latest
  minor release for a given major release.  New major releases may
  contain relatively untested code, so I also keep the latest version of
  the previous major release as a relatively stable fallback; the
  current fallback is 3.0.14.  It is up to you to decide which version
  is more appropriate, but the CHANGES file will summarize the most
  important differences.

  sourceforge.org is mirrored at sunsite.unc.edu (and all sunsite mirror
  sites) in /pub/Linux/kernel/pcmcia.

  If you do not feel up to compiling the drivers from scratch, pre-
  compiled drivers are included with current releases of most of the
  major Linux distributions, including Slackware, Debian, Red Hat,
  Caldera, SuSE, and Yggdrasil, among others.


  1.4.  What systems are supported?

  This package should run on almost Intel-based Linux-capable laptop.
  It also runs on Alpha-based platforms (i.e., the DEC Multia).  Work is
  being done to make the package fully dual-endian, so that it will also
  support PowerPC-based platforms (i.e., Apple Powerbooks).  Most common
  socket controllers are supported.  Card docks for desktop systems
  should work as long as they use a supported controller, and are
  plugged directly into the ISA or PCI bus, as opposed to SCSI-to-PCMCIA
  or IDE-to-PCMCIA adapters.  The following controllers are recognized
  by the supplied socket drivers:


  o  Cirrus Logic PD6710, PD6720, PD6722, PD6729, PD6730, PD6732, PD6832

  o  Intel i82365sl B, C, and DF steps, 82092AA

  o  O2Micro OZ6729, OZ6730, OZ6832, OZ6833, OZ6836, OZ6860, OZ6812

  o  Omega Micro 82C365G, 82C092G

  o  Ricoh RF5C296, RF5C396, RL5C465, RL5C466, RL5C475, RL5C476, RL5C478

  o  SMC 34C90

  o  Texas Instruments PCI1130, PCI1131, PCI1210, PCI1220, PCI1221,
     PCI1225, PCI1250A, PCI1251A, PCI1251B, PCI1450

  o  Toshiba ToPIC95, ToPIC97 (experimental, incomplete)

  o  Vadem VG465, VG468, VG469

  o  VLSI Technologies 82C146, VCF94365


  o  VIA VT83C469

  o  Databook DB86082, DB86082A, DB86084, DB86084A, DB86072, DB86082B

  Other controllers that are register compatible with the Intel i82365sl
  will generally work, as well.

  Support for 32-bit CardBus cards is still somewhat experimental.
  Drivers prior to version 3.0 only support 16-bit cards in CardBus
  sockets.  Due to the rapid pace of technological change for laptop
  hardware, new controllers appear frequently, and there may be delays
  between when a new model appears on the market, and when driver
  support becomes available.

  Toshiba has made available some documentation for their ToPIC95 and
  ToPIC97 chipsets, however the information they have provided has not
  really been adequate.  Despite conflicting reports to the contrary,
  Toshiba has not made any effective effort to remedy this situation.
  There are serious bugs in Linux support for the ToPIC chipsets, that
  cannot be resolved until better documentation or help from Toshiba
  becomes available.  I do not recommend use of Toshiba laptops at this
  time.  For use of 16-bit cards, I recommend setting the bridge mode to
  ``PCIC'' in the BIOS setup; for CardBus cards, you are on your own.

  The Motorola 6AHC05GA controller used in some Hyundai laptops is not
  supported.  The custom host controller in the HP Omnibook 600 is also
  unsupported.


  1.5.  What cards are supported?

  The current release includes drivers for a variety of ethernet cards,
  a driver for modem and serial port cards, several SCSI adapter
  drivers, a driver for ATA/IDE drive cards, and memory card drivers
  that should support most SRAM cards and some flash cards.  The
  SUPPORTED.CARDS file included with each release of Card Services lists
  all cards that are known to work in at least one actual system.

  The likelihood that a card not on the supported list will work depends
  on the type of card.  Essentially all modems should work with the
  supplied driver.  Some network cards may work if they are OEM versions
  of supported cards.  Other types of IO cards (frame buffers, sound
  cards, etc) will not work until someone writes the appropriate
  drivers.


  1.6.  When will my favorite (unsupported) card become supported?

  Unfortunately, they usually don't pay me to write device drivers, so
  if you would like to have a driver for your favorite card, you are
  probably going to have to do at least some of the work.  Ideally, I'd
  like to work towards a model like the Linux kernel, where I would be
  responsible mainly for the ``core'' driver code and other authors
  would contribute and maintain client drivers for specific cards.  The
  SUPPORTED.CARDS file mentions some cards for which driver work is
  currently in progress.  I will try to help where I can, but be warned
  that debugging kernel device drivers by email is not particularly
  effective.

  Manufacturers interested in helping provide Linux support for their
  products can contact me about consulting arrangements.



  1.7.  Mailing lists and other information sources

  I used to maintain a database and mailing list of Linux PCMCIA users.
  More recently, I've turned my web page for Linux PCMCIA information
  into a ``HyperNews'' site, with a set of message lists for Linux
  PCMCIA issues.  There are lists for installation and configuration
  issues, for different types of cards, and for programming and
  debugging issues.  The Linux PCMCIA information page is at
  <http://pcmcia.sourceforge.org>.  Users can request email notification
  of new responses to particular questions, or notification for all new
  messages in a given category.  I hope that this will become a useful
  repository of information, for questions that go beyond the scope of
  the HOWTO.

  There is a Linux mailing list devoted to laptop issues, the ``linux-
  laptop'' list.  For more information, send a message containing the
  word ``help'' to majordomo@vger.rutgers.edu.  To subscribe, send a
  message containing ``subscribe linux-laptop'' to the same address.
  This mailing list might be a good forum for discussion of Linux PCMCIA
  issues.

  The Linux Laptop Home Page at
  <http://www.cs.utexas.edu/users/kharker/linux-laptop> has links to
  many sites that have information about configuring specific types of
  laptops for Linux.  There is also a searchable database of system
  configuration information.


  1.8.  Why don't you distribute binaries?

  For me, distributing binaries would be a significant hassle.  It is
  complicated because some features can only be selected at compile
  time, and because the modules are somewhat dependent on having the
  ``right'' kernel configuration.  So, I would probably need to
  distribute precompiled modules along with matching kernels.  Beyond
  this, the greatest need for precompiled modules is when installing
  Linux on a clean system.  This typically requires setting up drivers
  so they can be used in the installation process for a particular Linux
  distribution.  Each Linux distribution has its own ideosyncracies, and
  it is not feasible for me to provide boot and root disks for even just
  the common combinations of drivers and distributions.

  PCMCIA is now a part of many of the major Linux distributions,
  including Red Hat, Caldera, Slackware, Yggdrasil, Craftworks, and
  Nascent Technology.


  1.9.  Why is the package so darned big?

  Well, first of all, it isn't actually that large.  All the driver
  modules together take up about 500K of disk space.  The utility
  programs add up to about 70K, and the scripts in /etc/pcmcia are about
  50K.  The core driver modules take up about 55K of system memory.  The
  cardmgr daemon will generally be swapped out except when cards are
  inserted or removed.  The total package size is comparable to
  DOS/Windows Card Services implementations.

  Compared to DOS ``point enablers'', this may still seem like a lot of
  overhead, especially for people that don't plan on using many of the
  features of PCMCIA, such as power management or hot swapping.  Point
  enablers can be tiny because they generally support only one or a
  small set of cards, and also generally support a restricted set of
  host controllers.  If someone were to write a genuinely ``generic''
  modem enabler, it would end up incorporating much of the functionality
  of Card Services, to handle cards from different vendors and the full
  range of host controller variants.
  2.  Compilation and installation

  2.1.  Prerequisites and kernel setup

  Before starting, you should think about whether you really need to
  compile the PCMCIA package yourself.  All common Linux distributions
  come with pre-compiled driver packages.  Generally, you only need to
  install the drivers from scratch if you need a new feature of the
  current drivers, or if you've updated and/or reconfigured your kernel
  in a way that is incompatible with the drivers included with your
  Linux distribution.  While compiling the package is not technically
  difficult, it does require some general Linux familiarity.

  The following things should be installed on your system before you
  begin:

  o  A 2.0.*, 2.1.*, or 2.2.* series kernel source tree.

  o  An appropriate set of module utilities.

  o  (Optional) the ``XForms'' X11 user interface toolkit.

  You need to have a complete linux source tree for your kernel, not
  just an up-to-date kernel image.  The driver modules contain some
  references to kernel source files.  While you may want to build a new
  kernel to remove unnecessary drivers, installing PCMCIA does not
  require you to do so.

  Current ``stable'' kernel sources and patches are available from
  <ftp://sunsite.unc.edu/pub/Linux/kernel/v2.0>, or from
  <ftp://tsx-11.mit.edu/pub/linux/sources/system/v2.0>.  Development
  kernels can be found in the corresponding v2.1 subdirectories.
  Current module utilities can be found in the same locations.

  In the Linux kernel source tree, the Documentation/Changes file
  describes the versions of all sorts of other system components that
  are required for that kernel release.  You may want to check through
  this and verify that your system is up to date, especially if you have
  updated your kernel.  If you are using a development kernel, be sure
  that you are using the right combination of shared libraries and
  module tools.

  When configuring your kernel, if you plan on using a PCMCIA ethernet
  card, you should turn on networking support but turn off the normal
  Linux network card drivers, including the ``pocket and portable
  adapters''.  The PCMCIA network card drivers are all implemented as
  loadable modules.  Any drivers compiled into your kernel will only
  waste space.

  If you want to use SLIP, PPP, or PLIP, you do need to either configure
  your kernel with these enabled, or use the loadable module versions of
  these drivers.  There is an unfortunate deficiency in the kernel
  config process in 1.2.X kernels, in that it is not possible to set
  configuration options (like SLIP compression) for a loadable module,
  so it is probably better to just link SLIP into the kernel if you need
  it.

  In order to use a PCMCIA token ring adapter, your kernel should be
  configured with ``Token Ring driver support'' (CONFIG_TR) enabled,
  though you should leave CONFIG_IBMTR off.

  If you want to use a PCMCIA IDE adapter, your kernel should be
  configured with CONFIG_BLK_DEV_IDE_PCMCIA enabled, for 2.0.*  through
  2.1.7 kernels.  Older kernels do not support removeable IDE devices;
  newer kernels do not require a special configuration setting.

  If you will be using a PCMCIA SCSI adapter, then enable CONFIG_SCSI
  when configuring your kernel.  Also, enable any top level drivers
  (SCSI disk, tape, cdrom, generic) that you expect to use.  All low-
  level drivers for particular host adapters should be disabled, as they
  will just take up space.

  If you want to modularize a driver that is needed for a PCMCIA device,
  you must modify /etc/pcmcia/config to specify what modules need to be
  loaded for what card types.  For example, if the serial driver is
  modularized, then the serial device definition should be:



       device "serial_cs"
         class "serial" module "misc/serial", "serial_cs"



  This package includes an X-based card status utility called cardinfo.
  This utility is based on a freely distributed user interface toolkit
  called the XForms Library.  This library is available as a separate
  package with most Linux distributions.  If you would like to build
  cardinfo, you should install XForms and all the normal X header files
  and libraries before configuring the PCMCIA package.


  2.2.  Installation

  Here is a synopsis of the installation process:


  o  Unpack pcmcia-cs-3.1.?.tar.gz in /usr/src.

  o  Run ``make config'' in the new pcmcia-cs-3.1.? directory.

  o  Run ``make all'', then ``make install''.

  o  Customize the startup script and the option files in /etc/pcmcia
     for your site, if needed.

  If you plan to install any contributed client drivers not included in
  the core PCMCIA distribution, unpack each of them in the top-level
  directory of the PCMCIA source tree.  Then follow the normal build
  instructions.  The extra drivers will be compiled and installed
  automatically.

  Running ``make config'' prompts for a few configuration options, and
  checks out your system to verify that it satisfies all prerequisites
  for installing PCMCIA support.  In most cases, you'll be able to just
  accept all the default configuration options.  Be sure to carefully
  check the output of this command in case there are problems.  The
  following options are available:


     Alternate target install directory?
        If you are compiling the package for installation on another
        machine, specify an alternate target directory when prompted.
        This should be an absolute path.  All files will be installed
        relative to this directory.  You will then be able to tar this
        directory tree and copy to your target machine, and unpack
        relative to its root directory to install everything in the
        proper places.



     Build 'trusting' versions of card utilities?
        Some of the support utilities (cardctl and cardinfo) can be
        compiled either in ``safe'' or ``trusting'' forms.  The ``safe''
        forms prevent non-root users from modifying card configurations.
        The ``trusting'' forms permit ordinary users to issue commands
        to suspend and resume cards, reset cards, and change the current
        configuration scheme.  The default is to build the safe forms.


     Include 32-bit (CardBus) card support?
        This option must be selected if you wish to use 32-bit CardBus
        cards.  It is not required for CardBus bridge support, if you
        only plan to use 16-bit PC Cards.


     Include PnP BIOS resource checking?
        This builds additional code into the PCMCIA core module to
        communicate with a system's PnP BIOS to obtain resource
        information for built-in ``motherboard'' devices (serial and
        parallel ports, sound, etc), to help avoid resource conflicts.
        If enabled, some extra resource files will be created under
        /proc/bus/pccard, and the lspnp and setpnp tools can be used to
        view and manipulate PnP BIOS devices.  However, this setting
        causes problems on some laptops and is not turned on by default.


     How to set kernel-specific options?
        There are a few kernel configuration options that affect the
        PCMCIA tools.  The configuration script can deduce these from
        the running kernel (the default and most common case).
        Alternatively, if you are compiling for installation on another
        machine, it can read the configuration from a kernel source
        tree, or each option can be set interactively.


  The Configure script can also be executed non-interactively, for
  automatic builds or to quickly reconfigure after a kernel update.
  Some additional less-frequently-used options can be only be set from
  the command line.  Running ``Configure --help'' lists all available
  options.

  Running ``make all'' followed by ``make install'' will build and then
  install the kernel modules and utility programs.  Kernel modules are
  installed under /lib/modules/<version>/pcmcia.  The cardmgr and
  cardctl programs are installed in /sbin.  If cardinfo is built, it is
  installed in /usr/bin/X11.

  Configuration files will be installed in the /etc/pcmcia directory.
  If you are installing over an older version, your old config scripts
  will be backed up before being replaced.  The saved scripts will be
  given an *.O extension.

  If you don't know what kind of host controller your system uses, you
  can use the probe utility in the cardmgr/ subdirectory to determine
  this.  There are two major types: the Databook TCIC-2 type and the
  Intel i82365SL-compatible type.

  In a few cases, the probe command will be unable to determine your
  controller type automatically.  If you have a Halikan NBD 486 system,
  it has a TCIC-2 controller at an unusual location: you'll need to edit
  rc.pcmcia to load the tcic module, and also set the PCIC_OPTS
  parameter to ``tcic_base=0x02c0''.

  On some systems using Cirrus controllers, including the NEC Versa M,
  the BIOS puts the controller in a special suspended state at system
  startup time.  On these systems, the probe command will fail to find
  any known host controller.  If this happens, edit rc.pcmcia and set
  PCIC to i82365, and PCIC_OPTS to ``wakeup=1''.


  2.3.  Startup options

  The PCMCIA startup script recognizes several groups of startup
  options, set via environment variables.  Multiple options should be
  separated by spaces and enclosed in quotes.  Placement of startup
  options depends on the Linux distribution used.  They may be placed
  directly in the startup script, or they may be kept in a separate
  option file.  See the ``Notes about specific Linux distributions'' for
  specifics.  The following variables can be set:


     PCMCIA
        This variable specifies whether PCMCIA support should be started
        up, or not.  If it is set to anything other than ``yes'', then
        the startup script will be disabled.

     PCIC
        This identifies the PC Card Interface Controller driver module.
        There are two options: ``tcic'' or ``i82365''.  Virtually all
        current controllers are in the ``i82365'' group.  This is the
        only mandatory option setting.

     PCIC_OPTS
        This specifies options for the PCIC module.  Some host
        controllers have optional features that may or may not be
        implemented in a particular system.  In some cases, it is
        impossible for the socket driver to detect if these features are
        implemented.  See the corresponding man page for a complete
        description of the available options.

     CORE_OPTS
        This specifies options for the pcmcia_core module, which
        implements the core PC Card driver services.  See ``man
        pcmcia_core'' for more information.

     CARDMGR_OPTS
        This specifies options to be passed to the cardmgr daemon.  See
        ``man cardmgr'' for more information.

     SCHEME
        If set, then the PC Card configuration scheme will be
        initialized to this at driver startup time.  See the ``Overview
        of the PCMCIA configuration scripts'' for a discussion of
        schemes.

  The low level socket drivers, tcic and i82365, have various bus timing
  parameters that may need to be adjusted for certain systems with
  unusual bus clocking.  Symptoms of timing problems can include card
  recognition problems, lock-ups under heavy loads, high error rates, or
  poor device performance.  Only certain host bridges have adjustable
  timing parameters: check the corresponding man page to see what
  options are available for your controller.  Here is a brief summary:


  o  Cirrus controllers have numerous configurable timing parameters.
     The most important seems to be the cmd_time flag, which determines
     the length of PCMCIA bus cycles.  Fast 486 systems (i.e., DX4-100)
     seem to often benefit from increasing this from 6 (the default) to
     12 or 16.

  o  The Cirrus PD6729 PCI controller has the fast_pci flag, which
     should be set if the PCI bus speed is greater than 25 MHz.
  o  For Vadem VG-468 controllers and Databook TCIC-2 controllers, the
     async_clock flag changes the relative clocking of PCMCIA bus and
     host bus cycles.  Setting this flag adds extra wait states to some
     operations.  However, I have yet to hear of a laptop that needs
     this.

  o  The pcmcia_core module has the cis_speed parameter for changing the
     memory speed used for accessing a card's Card Information Structure
     (CIS).  On some systems with fast bus clocks, increasing this
     parameter (i.e., slowing down card accesses) may be beneficial for
     card recognition problems.

  o  This is not a timing issue, but if you have more than one ISA-to-
     PCMCIA controller in your system or extra sockets in a docking
     station, the i82365 module should be loaded with the extra_sockets
     parameter set to 1.  This should not be necessary for detection of
     PCI-to-PCMCIA or PCI-to-CardBus bridges.

  Here are some timing settings for specific systems:


  o  On the ARM Pentium-90 or Midwest Micro Soundbook Plus, use
     ``freq_bypass=1 cmd_time=8''.

  o  On a Midwest Micro Soundbook Elite, use ``cmd_time=12''.

  o  On a Gateway Liberty, try ``cmd_time=16''.

  o  On a Samsung SENS 810, use ``fast_pci=1''.


  2.4.  System resource settings

  Card Services should automatically avoid allocating IO ports and
  interrupts already in use by other standard devices.  It will also
  attempt to detect conflicts with unknown devices, but this is not
  completely reliable.  In some cases, you may need to explicitly
  exclude resources for a device in /etc/pcmcia/config.opts.

  Here are some resource settings for specific laptop types.  View this
  list with suspicion: it may give useful hints for solving problems,
  but it is inevitably out of date and certainly contains mistakes.
  Corrections and additions are welcome.


  o  On the AMS SoundPro, exclude irq 10.

  o  On some AMS TravelPro 5300 models, use memory 0xc8000-0xcffff.

  o  On the BMX 486DX2-66, exclude irq 5, irq 9.

  o  On the Chicony NB5, use memory 0xda000-0xdffff.

  o  On the Compaq Presario 1020, exclude port 0x2f8-0x2ff, irq 3, irq
     5.

  o  On the HP Omnibook 4000C, exclude port 0x300-0x30f.

  o  On the IBM ThinkPad 380, and maybe the 385 and 600 series, exclude
     port 0x230-0x233, and irq 5.

  o  On IBM ThinkPad 600 and 770 models with internal modems, exclude
     port 0x2f8-0x2ff.

  o  On the IBM ThinkPad 600E and 770Z, change the high memory window to
     0x60000000-0x60ffffff.
  o  On the Micron Millenia Transport, exclude irq 5, irq 9.

  o  On the NEC Versa M, exclude irq 9, port 0x2e0-2ff.

  o  On the NEC Versa P/75, exclude irq 5, irq 9.

  o  On the NEC Versa S, exclude irq 9, irq 12.

  o  On the NEC Versa 6000 series, exclude port 0x2f8-0x33f, irq 9, irq
     10.

  o  On the ProStar 9200, Altima Virage, and Acquiline Hurricane
     DX4-100, exclude irq 5, port 0x330-0x35f.  Maybe use memory
     0xd8000-0xdffff.

  o  On the Siemens Nixdorf SIMATIC PG 720C, use memory 0xc0000-0xcffff,
     port 0x300-0x3bf.

  o  On the TI TravelMate 5000, use memory 0xd4000-0xdffff.

  o  On the Toshiba T4900 CT, exclude irq 5, port 0x2e0-0x2e8, port
     0x330-0x338.

  o  On the Toshiba Tecra 8000, exclude irq 3, irq 5, irq 9.

  o  On the Twinhead 5100, HP 4000, Sharp PC-8700 and PC-8900, exclude
     irq 9 (sound), irq 12.

  o  On an MPC 800 Series, exclude irq 5, port 0x300-0x30f for the CD-
     ROM.


  2.5.  Notes about specific Linux distributions

  This section is incomplete.  Corrections and additions are welcome.


  2.5.1.  Debian

  Debian uses a System V boot script arrangement.  The PCMCIA startup
  script is installed as /etc/init.d/pcmcia, and startup options are
  specified in /etc/pcmcia.conf.  Debian's syslog configuration will
  place kernel messages in /var/log/messages and cardmgr messages in
  /var/log/daemon.log.

  Debian distributes the PCMCIA system in two packages: the ``pcmcia-
  cs'' package contains cardmgr and other tools, man pages, and
  configuration scripts; and the ``pcmcia-modules'' package contains the
  kernel driver modules.


  2.5.2.  Red Hat, Caldera, Mandrake

  These distributions use a System V boot script organization.  The
  PCMCIA startup script is installed as /etc/rc.d/init.d/pcmcia, and
  boot options are kept in /etc/sysconfig/pcmcia.  Beware that
  installing the Red Hat package may install a default boot option file
  that has PCMCIA disabled.  To enable PCMCIA, the ``PCMCIA'' variable
  should be set to ``yes''.  Red Hat's default syslogd configuration
  will record all interesting messages in /var/log/messages.

  Red Hat's PCMCIA package contains a replacement for the network setup
  script, /etc/pcmcia/network, which meshes with the Red Hat linuxconf
  configuration system.  This is convenient for the case where just one
  network adapter is used, with one set of network parameters, but does
  not have the full flexibility of the regular PCMCIA network script.
  Compiling and installing a clean PCMCIA source distribution will
  overwrite the network script, breaking the link to the Red Hat tools.
  If you prefer the Red Hat tools, either use only Red Hat RPM's, or
  create /etc/pcmcia/network.opts with the following contents:



       if [ -f /etc/sysconfig/network-scripts/ifcfg-eth0 ] ; then
           start_fn () {
               /sbin/ifup $1
           }
           stop_fn () {
               /sbin/ifdown $1
           }
       fi



  If you do use linuxconf (or netconf) to configure your network
  interface, leave the ``kernel module'', ``I/O port'', and ``irq''
  parameters blank.  Setting these parameters may interfere with proper
  operation of the PCMCIA subsystem.

  At boot time, when the Red Hat network subsystem starts up, it may say
  ``Delaying eth0 initialization'' and ``[FAILED]''.  This is actually
  not a failure: it means that this network interface will not be
  initialized until after the PCMCIA network device is configured.

  Red Hat bundles their slightly modified PCMCIA source distribution in
  their kernel SRPM, rather than as a separate source package.


  2.5.3.  Slackware

  Slackware uses a BSD boot script arrangement.  The PCMCIA startup
  script is installed as /etc/rc.d/rc.pcmcia, and boot options are
  specified in rc.pcmcia itself.  The PCMCIA startup script is invoked
  from /etc/rc.d/rc.S.


  2.5.4.  SuSE

  SuSE uses a System V init script arrangement, with init scripts stored
  under /sbin/init.d.  The PCMCIA startup script is installed as
  /sbin/init.d/pcmcia, and startup options are kept in /etc/rc.config.
  The SuSE startup script is somewhat limited and does not allow PCMCIA
  startup variables to be overridden from the lilo boot prompt.


  3.  Resolving installation and configuration problems

  This section describes some of the most common failure modes for the
  PCMCIA subsystem.  Try to match your symptoms against the examples.
  This section only describes general failures that are not specific to
  a particular client driver or type of card.

  Before trying to diagnose a problem, you have to know where your
  system log is kept (see ``Notes about specific Linux distributions'').
  You should also be familiar with basic diagnostic tools like dmesg and
  lsmod.  Also, be aware that most driver components (including all the
  kernel modules) have their own individual man pages.

  Try to define your problem as narrowly as possible.  If you have
  several cards, try each card in isolation, and in different
  combinations.  Try cold Linux boots, versus warm boots from Windows.
  Compare booting with cards inserted, versus inserting cards after
  boot.  If you normally use your laptop docked, try it undocked.  And
  sometimes, two sockets will behave differently.

  It is nearly impossible to debug driver problems encountered when
  attempting to install Linux via a PCMCIA device.  Even if you can
  identify the problem based on its symptoms, installation disks are
  difficult to modify, especially without access to a running Linux
  system.  Customization of installation disks is completely dependent
  on the choice of Linux distribution, and is beyond the scope of this
  document.  In general, the best course of action is to install Linux
  using some other means, obtain the latest drivers, and then debug the
  problem if it persists.


  3.1.  Base PCMCIA kernel modules do not load

  Symptoms:

  o  Kernel version mismatch errors are reported when the PCMCIA startup
     script runs.

  o  After startup, lsmod does not show any PCMCIA modules.

  o  cardmgr reports ``no pcmcia driver in /proc/devices'' in the system
     log.

  Kernel modules contain version information that is checked against the
  current kernel when a module is loaded.  The type of checking depends
  on the setting of the CONFIG_MODVERSIONS kernel option.  If this is
  false, then the kernel version number is compiled into each module,
  and insmod checks this for a match with the running kernel.  If
  CONFIG_MODVERSIONS is true, then each symbol exported by the kernel is
  given a sort of checksum.  These codes are all compared against the
  corresponding codes compiled into a module.  The intent was for this
  to make modules less version-dependent, because the checksums would
  only change if a kernel interface changed, and would generally stay
  the same across minor kernel updates.  In practice, the checksums have
  turned out to be even more restrictive, because many kernel interfaces
  depend on compile-time kernel option settings.  Also, the checksums
  turned out to be an excessively pessimistic judge of compatibility.

  The practical upshot of this is that kernel modules are closely tied
  to both the kernel version, and the setting of many kernel
  configuration options.  Generally, a set of modules compiled for one
  2.0.31 kernel will not load against some other 2.0.31 kernel unless
  special care is taken to ensure that the two were built with similar
  configurations.  This makes distribution of precompiled kernel modules
  a tricky business.

  You have several options:


  o  If you obtained precompiled drivers as part of a Linux
     distribution, verify that you are using an unmodified kernel as
     supplied with that distribution.  If you intend to use precompiled
     modules, you generally must stick with the corresponding kernel.

  o  If you have reconfigured or upgraded your kernel, you will probably
     need to compile and install the PCMCIA package from scratch.  This
     is easily done if you already have the kernel source tree
     installed.  See ``Compilation and installation'' for detailed
     instructions.

  o  In some cases, incompatibilities in other system components can
     prevent correct loading of kernel modules.  If you have upgraded
     your own kernel, pay attention to the ``minimal requirements'' for
     module utilities and binutils listed in the Documentation/Changes
     file in the kernel source code tree.


  3.2.  Some client driver modules do not load


  Symptoms:

  o  The base modules (pcmcia_core, ds, i82365) load correctly.

  o  Inserting a card gives a high beep + low beep pattern.

  o  cardmgr reports version mismatch errors in the system log.

  Some of the driver modules require kernel services that may or may not
  be present, depending on kernel configuration.  For instance, the SCSI
  card drivers require that the kernel be configured with SCSI support,
  and the network drivers require a networking kernel.  If a kernel
  lacks a necessary feature, insmod may report undefined symbols and
  refuse to load a particular module. Note that insmod error messages do
  not distinguish between version mismatch errors and missing symbol
  errors.

  Specifically:

  o  The serial client driver serial_cs requires the kernel serial
     driver to be enabled with CONFIG_SERIAL.  This driver may be built
     as a module.

  o  Support for multiport serial cards or multifunction cards that
     include serial or modem devices requires CONFIG_SERIAL_SHARE_IRQ to
     be enabled.

  o  The SCSI client drivers require that CONFIG_SCSI be enabled, along
     with the appropriate top level driver options (CONFIG_BLK_DEV_SD,
     CONFIG_BLK_DEV_SR, etc for 2.1 kernels).  These may be built as
     modules.

  o  The network client drivers require that CONFIG_INET is enabled.
     Kernel networking support cannot be compiled as a module.

  o  The token-ring client requires that the kernel be compiled with
     CONFIG_TR enabled.

  There are two ways to proceed:

  o  Rebuild your kernel with the necessary features enabled.

  o  If the features have been compiled as modules, then modify
     /etc/pcmcia/config to preload these modules.

  The /etc/pcmcia/config file can specify that additional modules need
  to be loaded for a particular client.  For example, for the serial
  driver, one would use:



       device "serial_cs"
         class "serial" module "misc/serial", "serial_cs"



  Module paths are specified relative to the top-level module directory
  for the current kernel version; if no relative path is given, then the
  path defaults to the pcmcia subdirectory.


  3.3.  Interrupt scan failures


  Symptoms:

  o  The system locks up when the PCMCIA drivers are loaded, even with
     no cards present.

  o  The system log shows a successful host controller probe just before
     the lock-up, but does not show interrupt probe results.

  After identifying the host controller type, the socket driver probes
  for free interrupts.  The probe involves programming the controller
  for each apparently free interrupt, then generating a ``soft''
  interrupt, to see if the interrupt can be detected correctly.  In some
  cases, probing a particular interrupt can interfere with another
  system device.

  The reason for the probe is to identify interrupts which appear to be
  free (i.e., are not reserved by any other Linux device driver), yet
  are either not physically wired to the host controller, or are
  connected to another device that does not have a driver.

  In the system log, a successful probe might look like:



       Intel PCIC probe:
         TI 1130 CardBus at mem 0x10211000, 2 sockets
         ...
         ISA irqs (scanned) = 5,7,9,10 status change on irq 10



  There are two ways to proceed:

  o  The interrupt probe can be restricted to a list of interrupts using
     the irq_list parameter for the socket drivers.  For example,
     ``irq_list=5,9,10'' would limit the scan to three interrupts.  All
     PCMCIA devices will be restricted to using these interrupts
     (assuming they pass the probe).  You may need to use trial and
     error to find out which interrupts can be safely probed.

  o  The interrupt probe can be disabled entirely by loading the socket
     driver with the ``do_scan=0'' option.  In this case, a default
     interrupt list will be used, which avoids interrupts already
     allocated for other devices.

  In either case, the probe options can be specified using the PCIC_OPTS
  definition in the PCMCIA startup script, for example:



       PCIC_OPTS="irq_list=5,9,10"



  It should be noted that /proc/interrupts is completely useless when it
  comes to diagnosing interrupt probe problems.  The probe is sensible
  enough to never attempt to use an interrupt that is already in use by
  another Linux driver.  So, the PCMCIA drivers are already using all
  the information in /proc/interrupts.  Depending on system design, an
  inactive device can still occupy an interrupt and cause trouble if it
  is probed for PCMCIA.


  3.4.  IO port scan failures


  Symptoms:

  o  The system locks up when cardmgr is first started, even with no
     cards present.

  o  The system log shows a successful host controller probe, including
     interrupt probe results, but does not show IO probe results.

  o  In some cases, the IO probe will succeed, but report large numbers
     of random exclusions.

  When cardmgr processes IO port ranges listed in
  /etc/pcmcia/config.opts, the kernel probes these ranges to detect
  latent devices that occupy IO space but are not associated with a
  Linux driver.  The probe is read-only, but in rare cases, reading from
  a device may interfere with an important system function, resulting in
  a lock-up.

  Your system user's guide may include a map of system devices, showing
  their IO and memory ranges.  These can be explicitly excluded in
  config.opts.

  Alternatively, if the probe is unreliable on your system, it can be
  disabled by setting CORE_OPTS to ``probe_io=0''.  In this case, you
  should be very careful to specify only genuinely available ranges of
  ports in config.opts, instead of using the default settings.


  3.5.  Memory probe failures


  Symptoms:

  o  The core drivers load correctly when no cards are present, with no
     errors in the system log.

  o  The system freezes and/or reboots as soon as any card is inserted,
     before any beeps are heard.

  Or alternately:

  o  All card insertions generate a high beep followed by a low beep.

  o  All cards are identified as ``anonymous memory cards''.

  o  The system log reports that various memory ranges have been
     excluded.

  The core modules perform a memory scan at the time of first 16-bit
  card insertion.  This scan can potentially interfere with other memory
  mapped devices.  Also, pre-3.0.0 driver packages perform a more
  aggressive scan than more recent drivers.  The memory window is
  defined in /etc/pcmcia/config.opts.  The default window is large, so
  it may help to restrict the scan to a narrower range.  Reasonable
  ranges to try include 0xd0000-0xdffff, 0xc0000-0xcffff,
  0xc8000-0xcffff, or 0xd8000-0xdffff.
  If you have DOS or Windows PCMCIA drivers, you may be able to deduce
  what memory region those drivers use.  Note that DOS memory addresses
  are often specified in ``segment'' form, which leaves off the final
  hex digit (so an absolute address of 0xd0000 might be given as
  0xd000).  Be sure to add the extra digit back when making changes to
  config.opts.

  In unusual cases, a memory probe failure can indicate a timing
  register setup problem with the host controller.  See the ``Startup
  options'' section for information about dealing with common timing
  problems.


  o  cs: warning: no high memory space available!

  CardBus bridges can allocate memory windows outside of the 640KB-1MB
  ``memory hole'' in the ISA bus architecture.  It is generally a good
  idea to configure CardBus bridges to use high memory windows, because
  these are unlikely to conflict with other devices.  Also, CardBus
  cards may require large memory windows, which may be difficult or
  impossible to fit into low memory.  Card Services will preferentially
  allocate windows in high memory for CardBus bridges, if both low and
  high memory windows are defined in config.opts.  The default
  config.opts now includes a high memory window of
  0xa0000000-0xa0ffffff.  If you have a CardBus bridge and have upgraded
  from an older PCMCIA driver release, add this memory window if it is
  not already defined.

  In some cases, the default high memory window is not usable.  On some
  IBM Thinkpad models, a window of 0x60000000-0x60ffffff will work in
  place of the default window.


  3.6.  Failure to detect card insertions and removals

  Symptoms:

  o  Cards are detected and configured properly if present at boot time.

  o  The drivers do not respond to insertion and removal events, either
     by recording events in the system log, or by beeping.

  In most cases, the socket driver (i82365 or tcic) will automatically
  probe and select an appropriate interrupt to signal card status
  changes.  The automatic interrupt probe doesn't work on some Intel-
  compatible controllers, including Cirrus chips and the chips used in
  some IBM ThinkPads.  If a device is inactive at probe time, its
  interrupt may also appear to be available.  In these cases, the socket
  driver may pick an interrupt that is used by another device.

  With the i82365 and tcic drivers, the irq_list option can be used to
  limit the interrupts that will be tested.  This list limits the set of
  interrupts that can be used by PCMCIA cards as well as for monitoring
  card status changes.  The cs_irq option can also be used to explicitly
  set the interrupt to be used for monitoring card status changes.

  If you can't find an interrupt number that works, there is also a
  polled status mode: both i82365 and tcic will accept a
  poll_interval=100 option, to poll for card status changes once per
  second.  This option should also be used if your system has a shortage
  of interrupts available for use by PCMCIA cards.  Especially for
  systems with more than one host controller, there is little point in
  dedicating interrupts for monitoring card status changes.

  All these options should be set in the PCIC_OPTS= line in either
  /etc/rc.d/rc.pcmcia or /etc/sysconfig/pcmcia, depending on your site
  setup.


  3.7.  System resource starvation


  Symptoms:


  o  When a card is inserted, it is identified correctly but cannot be
     configured (high/low beep pattern).

  o  One of the following messages will appear in the system log:


       RequestIO: Resource in use
       RequestIRQ: Resource in use
       RequestWindow: Resource in use
       GetNextTuple: No more items
       could not allocate nn IO ports for CardBus socket n
       could not allocate nnK memory for CardBus socket n
       could not allocate interrupt for CardBus socket n



  Interrupt starvation often indicates a problem with the interrupt
  probe (see ``Interrupt scan failures'').  In some cases, the probe
  will seem to work, but only report one or two available interrupts.
  Check your system log to see if the scan results look sensible.
  Disabling the probe and selecting interrupts manually should help.

  If the interrupt probe is not working properly, the socket driver may
  allocate an interrupt for monitoring card insertions, even when
  interrupts are too scarce for this to be a good idea.  In that case,
  you can switch the controller to polled mode by setting PCIC_OPTS to
  ``poll_interval=100'.  Or, if you have a CardBus controller, try
  ``pci_csc=1'', which selects a PCI interrupt (if available) for card
  status changes.

  IO port starvation is fairly uncommon, but sometimes happens with
  cards that require large, contiguous, aligned regions of IO port
  space, or that only recognize a few specific IO port positions.  The
  default IO port ranges in /etc/pcmcia/config.opts are normally
  sufficient, but may be extended.  In rare cases, starvation may
  indicate that the IO port probe failed (see ``IO port scan
  failures'').

  Memory starvation is also uncommon with the default memory window
  settings in config.opts.  CardBus cards may require larger memory
  regions than typical 16-bit cards.  Since CardBus memory windows can
  be mapped anywhere in the host's PCI address space (rather than just
  in the 640K-1MB ``hole'' in PC systems), it is helpful to specify
  large memory windows in high memory, such as 0xa0000000-0xa0ffffff.


  3.8.  Resource conflict only with two cards inserted


  Symptoms:

  o  Two cards each work fine when used separately.

  o  When both cards are inserted, only one works.


  This usually indicates a resource conflict with a system device that
  Linux does not know about.  PCMCIA devices are dynamically configured,
  so, for example, interrupts are allocated as needed, rather than
  specifically assigned to particular cards or sockets.  Given a list of
  resources that appear to be available, cards are assigned resources in
  the order they are configured.  In this case, the card configured last
  is being assigned a resource that in fact is not free.

  Check the system log to see what resources are used by the non-working
  card.  Exclude these in /etc/pcmcia/config.opts, and restart the
  cardmgr daemon to reload the resource database.


  3.9.  Device configuration does not complete


  Symptoms:

  o  When a card is inserted, exactly one high beep is heard.

  o  Subsequent card insertions and removals may be ignored.

  This indicates that the card was identified successfully, however,
  cardmgr has been unable to complete the configuration process for some
  reason.  The most likely reason is that a step in the card setup
  script has blocked.  A good example would be the network script
  blocking if a network card is inserted with no actual network hookup
  present.

  To pinpoint the problem, you can manually run a setup script to see
  where it is blocking.  The scripts are in the /etc/pcmcia directory.
  They take two parameters: a device name, and an action.  The cardmgr
  daemon records the configuration commands in the system log.  For
  example, if the system log shows that the command ``./network start
  eth0'' was the last command executed by cardmgr, the following command
  would trace the script:



       sh -x /etc/pcmcia/network start eth0



  4.  Usage and features

  4.1.  Tools for configuring and monitoring PCMCIA devices

  If the modules are all loaded correctly, the output of the lsmod
  command should look like the following, when no cards are inserted:



       Module                  Size  Used by
       ds                      5640   2
       i82365                 15452   2
       pcmcia_core            30012   3  [ds i82365]



  The system log should also include output from the socket driver
  describing the host controller(s) found and the number of sockets
  detected.

  4.1.1.  The cardmgr configuration daemon

  The cardmgr daemon is responsible for monitoring PCMCIA sockets,
  loading client drivers when needed, and running user-level scripts in
  response to card insertions and removals.  It records its actions in
  the system log, but also uses beeps to signal card status changes.
  The tones of the beeps indicate success or failure of particular
  configuration steps.  Two high beeps indicate that a card was
  identified and configured successfully.  A high beep followed by a low
  beep indicates that a card was identified, but could not be configured
  for some reason.  One low beep indicates that a card could not be
  identified.

  The cardmgr daemon configures cards based on a database of known card
  types kept in /etc/pcmcia/config.  This file describes the various
  client drivers, then describes how to identify various cards, and
  which driver(s) belong with which cards.  The format of this file is
  described in the pcmcia(5) man page.


  4.1.2.  The socket status file, stab


  Cardmgr records device information for each socket in
  /var/state/pcmcia/stab or /var/lib/pcmcia/stab, depending on
  filesystem layout.  Here is a sample stab listing:



       Socket 0: Adaptec APA-1460 SlimSCSI
       0       scsi    aha152x_cs      0       sda     8       0
       0       scsi    aha152x_cs      1       scd0    11      0
       Socket 1: Serial or Modem Card
       1       serial  serial_cs       0       ttyS1   5       65



  For the lines describing devices, the first field is the socket, the
  second is the device class, the third is the driver name, the fourth
  is used to number multiple devices associated with the same driver,
  the fifth is the device name, and the final two fields are the major
  and minor device numbers for this device (if applicable).  See the
  stab man page for more info.


  4.1.3.  The cardctl and cardinfo utilities


  The cardctl command can be used to check the status of a socket, or to
  see how it is configured.  It can also be used to alter the
  configuration status of a card.  Here is an example of the output of
  the ``cardctl config'' command:



  Socket 0:
    not configured
  Socket 1:
    Vcc = 5.0, Vpp1 = 0.0, Vpp2 = 0.0
    Card type is memory and I/O
    IRQ 3 is dynamic shared, level mode, enabled
    Speaker output is enabled
    Function 0:
      Config register base = 0x0800
        Option = 0x63, status = 0x08
      I/O window 1: 0x0280 to 0x02bf, auto sized
      I/O window 2: 0x02f8 to 0x02ff, 8 bit



  Or ``cardctl ident'', to get card identification information:



       Socket 0:
         no product info available
       Socket 1:
         product info: "LINKSYS", "PCMLM336", "A", "0040052D6400"
         manfid: 0x0143, 0xc0ab
         function: 0 (multifunction)



  The ``cardctl suspend'' and ``cardctl resume'' commands can be used to
  shut down a card without unloading its associated drivers.  The
  ``cardctl reset'' command attempts to reset and reconfigure a card.
  ``cardctl insert'' and ``cardctl eject'' mimic the actions performed
  when a card is physically inserted or ejected, including loading or
  unloading drivers, and configuring or shutting down devices.

  If you are running X, the cardinfo utility produces a graphical
  display showing the current status of all PCMCIA sockets, similar in
  content to ``cardctl config''.  It also provides a graphical interface
  to most other cardctl functions.


  4.1.4.  Inserting and ejecting cards

  In theory, you can insert and remove PCMCIA cards at any time.
  However, it is a good idea not to eject a card that is currently being
  used by an application program.  Kernels older than 1.1.77 would often
  lock up when serial/modem cards were ejected, but this should be fixed
  now.

  Some card types cannot be safely hot ejected.  Specifically, ATA/IDE
  and SCSI interface cards are not hot-swap-safe.  This is unlikely to
  be fixed, because a complete solution would require significant
  changes to the Linux block device model.  Also, it is generally not
  safe to hot eject CardBus cards of any type.  This is likely to
  improve gradually as hot swap bugs in the CardBus drivers are found
  and fixed.  For these card types (IDE, SCSI, CardBus), it is
  recommended that you always use ``cardctl eject'' before ejecting.


  4.1.5.  Card Services and Advanced Power Management

  Card Services can be compiled with support for APM (Advanced Power
  Management) if you've configured your kernel with APM support.  The
  APM kernel driver is maintained by Stephen Rothwell
  (Stephen.Rothwell@canb.auug.org.au).  The apmd daemon is maintained by
  Avery Pennarun (apenwarr@worldvisions.ca), with more information
  available at <http://www.worldvisions.ca/~apenwarr/apmd/>.  The PCMCIA
  modules will automatically be configured for APM if a compatible
  version is detected on your system.

  Whether or not APM is configured, you can use ``cardctl suspend''
  before suspending your laptop, and ``cardctl resume'' after resuming,
  to cleanly shut down and restart your PCMCIA cards.  This will not
  work with a modem that is in use, because the serial driver isn't able
  to save and restore the modem operating parameters.

  APM seems to be unstable on some systems.  If you experience trouble
  with APM and PCMCIA on your system, try to narrow down the problem to
  one package or the other before reporting a bug.

  Some drivers, notably the PCMCIA SCSI drivers, cannot recover from a
  suspend/resume cycle.  When using a PCMCIA SCSI card, always use
  ``cardctl eject'' prior to suspending the system.


  4.1.6.  Shutting down the PCMCIA system

  To unload the entire PCMCIA package, invoke rc.pcmcia with:



       /etc/rc.d/rc.pcmcia stop



  This script will take several seconds to run, to give all client
  drivers time to shut down gracefully.  If a device is currently in
  use, the shutdown will be incomplete, and some kernel modules may not
  be unloaded.  To avoid this, use ``cardctl eject'' to shut down all
  sockets before invoking rc.pcmcia.  The exit status of the cardctl
  command will indicate if any sockets could not be shut down.


  4.2.  Overview of the PCMCIA configuration scripts

  Each PCMCIA device has an associated ``class'' that describes how it
  should be configured and managed.  Classes are associated with device
  drivers in /etc/pcmcia/config.  There are currently five IO device
  classes (network, SCSI, cdrom, fixed disk, and serial) and two memory
  device classes (memory and FTL).  For each class, there are two
  scripts in /etc/pcmcia: a main configuration script (i.e.,
  /etc/pcmcia/scsi for SCSI devices), and an options script (i.e.,
  /etc/pcmcia/scsi.opts).  The main script for a device will be invoked
  to configure that device when a card is inserted, and to shut down the
  device when the card is removed.  For cards with several associated
  devices, the script will be invoked for each device.

  The config scripts start by extracting some information about a device
  from the stab file.  Each script constructs a ``device address'', that
  uniquely describes the device it has been asked to configure, in the
  ADDRESS shell variable.  This is passed to the *.opts script, which
  should return information about how a device at this address should be
  configured.  For some devices, the device address is just the socket
  number.  For others, it includes extra information that may be useful
  in deciding how to configure the device.  For example, network devices
  pass their hardware ethernet address as part of the device address, so
  the network.opts script could use this to select from several
  different configurations.

  The first part of all device addresses is the current PCMCIA
  ``scheme''.  This parameter is used to support multiple sets of device
  configurations based on a single external user-specified variable.
  One use of schemes would be to have a ``home'' scheme, and a ``work''
  scheme, which would include different sets of network configuration
  parameters.  The current scheme is selected using the ``cardctl
  scheme'' command.  The default if no scheme is set is ``default''.

  As a general rule, when configuring Linux for a laptop, PCMCIA devices
  should only be configured from the PCMCIA device scripts.  Do not try
  to configure a PCMCIA device the same way you would configure a
  permanently attached device.  However, some Linux distributions
  provide PCMCIA packages that are hooked into those distributions' own
  device configuration tools.  In that case, some of the following
  sections may not apply; ideally, this will be documented by the
  distribution maintainers.


  4.3.  PCMCIA network adapters

  Linux ethernet-type network interfaces normally have names like eth0,
  eth1, and so on.  Token-ring adapters are handled similarly, however
  they are named tr0, tr1, and so on.  The ifconfig command is used to
  view or modify the state of a network interface.  A peculiarity of
  Linux is that network interfaces do not have corresponding device
  files under /dev, so do not be surprised when you do not find them.

  When an ethernet card is detected, it will be assigned the first free
  interface name, which will normally be eth0.  Cardmgr will run the
  /etc/pcmcia/network script to configure the interface, which normally
  reads network settings from /etc/pcmcia/network.opts.  The network and
  network.opts scripts will be executed only when your ethernet card is
  actually present.  If your system has an automatic network
  configuration facility, it may or may not be PCMCIA-aware.  Consult
  the documentation of your Linux distribution and the ``Notes about
  specific Linux distributions''  to determine if PCMCIA network devices
  should be configured with the automatic tools, or by editing
  network.opts.

  The device address passed to network.opts consists of four comma-
  separated fields: the scheme, the socket number, the device instance,
  and the card's hardware ethernet address.  The device instance is used
  to number devices for cards that have several network interfaces, so
  it will usually be 0.  If you have several network cards used for
  different purposes, one option would be to configure the cards based
  on socket position, as in:



       case "$ADDRESS" in
       *,0,*,*)
           # definitions for network card in socket 0
           ;;
       *,1,*,*)
           # definitions for network card in socket 1
           ;;
       esac



  Alternatively, they could be configured using their hardware
  addresses, as in:



  case "$ADDRESS" in
  *,*,*,00:80:C8:76:00:B1)
      # definitions for a D-Link card
      ;;
  *,*,*,08:00:5A:44:80:01)
      # definitions for an IBM card
  esac



  4.3.1.  Network device parameters

  The following parameters can be defined in network.opts:


     IF_PORT
        Specifies the ethernet transceiver type, for certain 16-bit
        cards that do not autodetect.  See ``man ifport'' for more
        information.

     PUMP
        A boolean (y/n) value: indicates if the host's IP address and
        routing information should be obtained using either BOOTP or
        DHCP, using Red Hat's pump daemon.

     BOOTP
        A boolean (y/n) value: indicates if the host's IP address and
        routing information should be obtained using the BOOTP protocol,
        with bootpc.

     DHCP
        A boolean (y/n) value: indicates if the host's IP address and
        routing information should be obtained from a DHCP server.  The
        network script first looks for dhcpcd, then dhclient.

     IPADDR
        The IP address for this interface.

     NETMASK, BROADCAST, NETWORK
        Basic network parameters: see the networking HOWTO for more
        information.

     GATEWAY
        The IP address of a gateway for this host's subnet.  Packets
        with destinations outside this subnet will be routed to this
        gateway.

     DOMAIN
        The local network domain name for this host, to be used in
        creating /etc/resolv.conf.

     SEARCH
        A search list for host name lookup, to be added to
        /etc/resolv.conf.  DOMAIN and SEARCH are mutually exclusive: see
        ``man resolver'' for more information.

     DNS_1, DNS_2, DNS_3
        Host names or IP addresses for nameservers for this interface,
        to be added to /etc/resolv.conf

     MOUNTS
        A space-separated list of NFS mount points to be mounted for
        this interface.

     IPX_FRAME, IPX_NETNUM
        For IPX networks: the frame type and network number, passed to
        the ipx_interface command.

  For example:



       case "$ADDRESS" in
       *,*,*,*)
           IF_PORT="10base2"
           BOOTP="n"
           IPADDR="10.0.0.1"
           NETMASK="255.255.255.0"
           NETWORK="10.0.0.0"
           BROADCAST="10.0.0.255"
           GATEWAY="10.0.0.1"
           DOMAIN="domain.org"
           DNS_1="dns1.domain.org"
           ;;
       esac



  To automatically mount and unmount NFS filesystems, first add all
  these filesystems to /etc/fstab, but include noauto in the mount
  options.  In network.opts, list the filesystem mount points in the
  MOUNTS variable.  It is especially important to use either cardctl or
  cardinfo to shut down a network card when NFS mounts are active.  It
  is not possible to cleanly unmount NFS filesystems if a network card
  is simply ejected without warning.

  In addition to the usual network configuration parameters, the
  network.opts script can specify extra actions to be taken after an
  interface is configured, or before an interface is shut down.  If
  network.opts defines a shell function called start_fn, it will be
  invoked by the network script after the interface is configured, and
  the interface name will be passed to the function as its first (and
  only) argument.  Similarly, if it is defined, stop_fn will be invoked
  before shutting down an interface.

  The transceiver type for some cards can be selected using the IF_PORT
  setting.  This can either be a numeric value, or a keyword identifying
  the transceiver type.  All the network drivers default to either
  autodetect the interface if possible, or 10baseT otherwise.  The
  ifport command can be used to check or set the current transceiver
  type.  For example:



       # ifport eth0 10base2
       #
       # ifport eth0
       eth0    2 (10base2)



  The current (3.0.10 or later) 3c589 driver should quickly autodetect
  transceiver changes at any time.  Earlier releases of the 3c589 driver
  had a somewhat slow and flaky transceiver autodetection algorithm.
  For these releases, the appropriate network cable should be connected
  to the card when the card is configured, or you can force
  autodetection with:

       ifconfig eth0 down up



  4.3.2.  Comments about specific cards



  o  With IBM CCAE and Socket EA cards, the transceiver type (10base2,
     10baseT, AUI) needs to be set when the network device is
     configured.  Make sure that the transceiver type reported in the
     system log matches your connection.

  o  The Farallon EtherWave is actually based on the 3Com 3c589, with a
     special transceiver.  Though the EtherWave uses 10baseT-style
     connections, its transceiver requires that the 3c589 be configured
     in 10base2 mode.

  o  If you have trouble with an IBM CCAE, NE4100, Thomas Conrad, or
     Kingston adapter, try increasing the memory access time with the
     mem_speed=# option to the pcnet_cs module.  An example of how to do
     this is given in the standard config.opts file.  Try speeds of up
     to 1000 (in nanoseconds).

  o  For the New Media Ethernet adapter, on some systems, it may be
     necessary to increase the IO port access time with the io_speed=#
     option when the pcmcia_core module is loaded.  Edit CORE_OPTS in
     the startup script  to set this option.

  o  The multicast support in the New Media Ethernet driver is
     incomplete.  The latest driver will function with multicast
     kernels, but will ignore multicast packets.  Promiscuous mode
     should work properly.

  o  The driver used by the IBM and 3Com token ring adapters seems to
     behave very badly if the cards are not connected to a ring when
     they get initialized.  Always connect these cards to the net before
     they are powered up.  If ifconfig reports the hardware address as
     all 0's, this is likely to be due to a memory window configuration
     problem.

  o  Some Linksys, D-Link, and IC-Card 10baseT/10base2 cards have a
     unique way of selecting the transceiver type that isn't handled by
     the Linux drivers.  One workaround is to boot DOS and use the
     vendor-supplied utility to select the transceiver, then warm boot
     Linux.  Alternatively, a Linux utility to perform this function is
     available at  <ftp://sourceforge.org/pcmcia/extras/dlport.c>.

  o  For WaveLAN wireless network adapters, Jean Tourrilhes
     (jt@hpl.hp.com) has put together a wireless HOWTO at
     <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/>.


  4.3.3.  Diagnosing problems with network adapters



  o  Is your card recognized as an ethernet card?  Check the system log
     and make sure that cardmgr identifies the card correctly and starts
     up one of the network drivers.  If it doesn't, your card might
     still be usable if it is compatible with a supported card.  This
     will be most easily done if the card claims to be ``NE2000
     compatible''.

  o  Is the card configured properly?  If you are using a supported
     card, and it was recognized by cardmgr, but still doesn't work,
     there might be an interrupt or port conflict with another device.
     Find out what resources the card is using (from the system log),
     and try excluding these in /etc/pcmcia/config.opts to force the
     card to use something different.

  o  If your card seems to be configured properly, but sometimes locks
     up, particularly under high load, you may need to try changing your
     socket driver timing parameters.  See the ``Startup options''
     section for more information.

  o  If you get ``network unreachable'' messages when you try to access
     the network, then the routing information specified in
     /etc/pcmcia/network.opts is incorrect.  This message is an
     absolutely foolproof indication of a routing error.  On the other
     hand, mis-configured cards will usually fail silently.

  o  If you are trying to use DHCP to configure your network interface,
     try testing things with a static IP address instead, to rule out a
     DHCP configuration problem.

  o  To diagnose problems in /etc/pcmcia/network.opts, start by trying
     to ping other systems on the same subnet using their IP addresses.
     Then try to ping your gateway, and then machines on other subnets.
     Ping machines by name only after trying these simpler tests.

  o  Make sure your problem is really a PCMCIA one.  It may help to see
     see if the card works under DOS with the vendor's drivers.  Double
     check your modifications to the /etc/pcmcia/network.opts script.
     Make sure your drop cable, ``T'' jack, terminator, etc are working.


  4.4.  PCMCIA serial and modem devices

  Linux serial devices are accessed via the /dev/ttyS* and /dev/cua*
  special device files.  In pre-2.2 kernels, the ttyS* devices were for
  incoming connections, such as directly connected terminals, and the
  cua* devices were for outgoing connections, such as modems.  Use of
  cua* devices is deprecated in current kernels, and ttyS* can be used
  for all applications.  The configuration of a serial device can be
  examined and modified with the setserial command.

  When a serial or modem card is detected, it will be assigned to the
  first available serial device slot.  This will usually be /dev/ttyS1
  (cua1) or /dev/ttyS2 (cua2), depending on the number of built-in
  serial ports.  The ttyS* device is the one reported in stab.  The
  default serial device option script, /etc/pcmcia/serial.opts, will
  link the device file to /dev/modem as a convenience.  For pre-2.2
  kernels, the link is made to the cua* device.

  Do not try to use /etc/rc.d/rc.serial to configure a PCMCIA modem.
  This script should only be used to configure non-removable devices.
  Modify /etc/pcmcia/serial.opts if you want to do anything special to
  set up your modem.  Also, do not try to change the IO port and
  interrupt settings of a serial device using setserial.  This would
  tell the serial driver to look for the device in a different place,
  but would not change how the card's hardware is actually configured.
  The serial configuration script allows you to specify other setserial
  options, as well as whether a line should be added to /etc/inittab for
  this port.

  The device address passed to serial.opts has three comma-separated
  fields: the first is the scheme, the second is the socket number, and
  the third is the device instance.  The device instance may take
  several values for cards that support multiple serial ports, but for
  single-port cards, it will always be 0.  If you commonly use more than
  one modem, you may want to specify different settings based on socket
  position, as in:



       case "$ADDRESS" in
       *,0,*)
           # Options for modem in socket 0
           LINK=/dev/modem0
           ;;
       *,1,*)
           # Options for modem in socket 1
           LINK=/dev/modem1
           ;;
       esac



  If a PCMCIA modem is already configured when Linux boots, it may be
  incorrectly identified as an ordinary built-in serial port.  This is
  harmless, however, when the PCMCIA drivers take control of the modem,
  it will be assigned a different device slot.  It is best to either
  parse stab or use /dev/modem, rather than expecting a PCMCIA modem to
  always have the same device assignment.

  If you configure your kernel to load the basic Linux serial port
  driver as a module, you must edit /etc/pcmcia/config to indicate that
  this module must be loaded.  Edit the serial device entry to read:



       device "serial_cs"
         class "serial" module "misc/serial", "serial_cs"



  4.4.1.  Serial device parameters

  The following parameters can be defined in serial.opts:

     LINK
        Specifies a path for a symbolic link to be created to the
        ``callout'' device (e.g., /dev/cua* for pre-2.2, or /dev/ttyS*
        for 2.2 kernels).

     SERIAL_OPTS
        Specifies options to be passed to the setserial command.

     INITTAB
        If specified, this will be used to construct an inittab entry
        for the device.

  For example:



       case "$ADDRESS" in
       *,*,*,*)
           LINK="/dev/modem"
           SERIAL_OPTS=""
           INITTAB="/sbin/getty"

  4.4.2.  Comments about specific cards



  o  The Uniden Data 2000 Wireless CDPD card has some special dialing
     strings for initiating SLIP and PPP mode.  For SLIP, use ``ATDT2'';
     for PPP, "ATDT0".


  4.4.3.  Diagnosing problems with serial devices



  o  Is your card recognized as a modem?  Check the system log and make
     sure that cardmgr identifies the card correctly and starts up the
     serial_cs driver.  If it doesn't, you may need to add a new entry
     to your /etc/pcmcia/config file so that it will be identified
     properly.  See the ``Configuring unrecognized cards'' section for
     details.

  o  Is the modem configured successfully by serial_cs?  Again, check
     the system log and look for messages from the serial_cs driver.  If
     you see ``register_serial() failed'', you may have an I/O port
     conflict with another device.  Another tip-off of a conflict is if
     the device is reported to be an 8250; most modern modems should be
     identified as 16550A UART's.  If you think you're seeing a port
     conflict, edit /etc/pcmcia/config.opts and exclude the port range
     that was allocated for the modem.

  o  Is there an interrupt conflict?  If the system log looks good, but
     the modem just doesn't seem to work, try using setserial to change
     the irq to 0, and see if the modem works.  This causes the serial
     driver to use a slower polled mode instead of using interrupts.  If
     this seems to fix the problem, it is likely that some other device
     in your system is using the interrupt selected by serial_cs.  You
     should add a line to /etc/pcmcia/config.opts to exclude this
     interrupt.

  o  If the modem seems to work only very, very slowly, this is an
     almost certain indicator of an interrupt conflict.

  o  Make sure your problem is really a PCMCIA one.  It may help to see
     if the card works under DOS with the vendor's drivers.  Also, don't
     test the card with something complex like SLIP or PPP until you are
     sure you can make simple connections.  If simple things work but
     SLIP does not, your problem is most likely with SLIP, not with
     PCMCIA.

  o  If you get kernel messages indicating that the serial_cs module
     cannot be loaded, it means that your kernel does not have serial
     device support.  If you have compiled the serial driver as a
     module, you must modify /etc/pcmcia/config to indicate that the
     serial module should be loaded before serial_cs.


  4.5.  PCMCIA parallel port devices

  The Linux parallel port driver is layered so that several high-level
  device types can share use of the same low level port driver.  Printer
  devices are accessed via the /dev/lp* special device files.  The
  configuration of a printer device can be examined and modified with
  the tunelp command.

  The parport_cs module depends on the parport and parport_pc drivers,
  which may be either compiled into the kernel or compiled as modules.
  The layered driver structure means that any top-level parallel drivers
  (such as the plip driver, the printer driver, etc) must be compiled as
  modules.  These drivers only recognize parallel port devices at module
  startup time, so they need to be loaded after any PC Card parallel
  devices are configured.

  The device address passed to parport.opts has three comma-separated
  fields: the first is the scheme, the second is the socket number, and
  the third is the device instance.  The device instance may take
  several values for cards that support multiple parallel ports, but for
  single-port cards, it will always be 0.  If you commonly use more than
  one such card, you may want to specify different settings based on
  socket position, as in:



       case "$ADDRESS" in
       *,0,*)
           # Options for card in socket 0
           LINK=/dev/printer0
           ;;
       *,1,*)
           # Options for card in socket 1
           LINK=/dev/printer1
           ;;
       esac



  If you configure your kernel to load the basic Linux parallel port
  driver as a module, you must edit /etc/pcmcia/config to indicate that
  the appropriate modules must be loaded.  Edit the parallel device
  entry to read:



       device "parport_cs"
         class "parport" module "misc/parport", "misc/parport_pc", "parport_cs"



  4.5.1.  Parallel device parameters

  The following parameters can be defined in parport.opts:

     LINK
        Specifies a path for a symbolic link to be created to the
        printer port.

     LP_OPTS
        Specifies options to be passed to the tunelp command.

  For example:



       case "$ADDRESS" in
       *,*,*,*)
           LINK="/dev/printer"
           LP_OPTS=""



  4.5.2.  Diagnosing problems with parallel port devices



  o  Is there an interrupt conflict?  If the system log looks good, but
     the port just doesn't seem to work, try using tunelp to change the
     irq to 0, and see if things improve.  This switches the driver to
     polling mode.  If this seems to fix the problem, it is likely that
     some other device in your system is using the interrupt selected by
     parport_cs.  You should add a line to /etc/pcmcia/config.opts to
     exclude this interrupt.

  o  If you get kernel messages indicating that the parport_cs module
     cannot be loaded, it means that your kernel does not have parallel
     device support.  If you have compiled the parallel driver as a
     module, you may need to modify /etc/pcmcia/config to indicate that
     the parport and parport_pc modules should be loaded before
     parport_cs.


  4.6.  PCMCIA SCSI adapters

  All the currently supported PCMCIA SCSI cards are work-alikes of one
  of the following ISA bus cards: the Qlogic, the Adaptec AHA-152X, or
  the Future Domain TMC-16x0.  The PCMCIA drivers are built by linking
  some PCMCIA-specific code (in qlogic_cs.c, aha152x_cs.c, or
  fdomain_cs.c) with the normal Linux SCSI driver, pulled from the Linux
  kernel source tree.  The Adaptec APA1480 CardBus driver is based on
  the kernel aic7xxx PCI driver.  Due to limitations in the Linux SCSI
  driver model, only one removable card per driver is supported.

  When a new SCSI host adapter is detected, the SCSI drivers will probe
  for devices.  Check the system log to make sure your devices are
  detected properly.  New SCSI devices will be assigned to the first
  available SCSI device files.  The first SCSI disk will be /dev/sda,
  the first SCSI tape will be /dev/st0, and the first CD-ROM will be
  /dev/scd0.

  A list of SCSI devices connected to this host adapter will be shown in
  stab, and the SCSI configuration script, /etc/pcmcia/scsi, will be
  called once for each attached device, to either configure or shut down
  that device.  The default script does not take any actions to
  configure SCSI devices, but will properly unmount filesystems on SCSI
  devices when a card is removed.

  The device addresses passed to scsi.opts are complicated, because of
  the variety of things that can be attached to a SCSI adapter.
  Addresses consist of either six or seven comma-separated fields: the
  current scheme, the device type, the socket number, the SCSI channel,
  ID, and logical unit number, and optionally, the partition number.
  The device type will be ``sd'' for disks, ``st'' for tapes, ``sr'' for
  CD-ROM devices, and ``sg'' for generic SCSI devices.  For most setups,
  the SCSI channel and logical unit number will be 0.  For disk devices
  with several partitions, scsi.opts will first be called for the whole
  device, with a five-field address.  The script should set the PARTS
  variable to a list of partitions.  Then, scsi.opts will be called for
  each partition, with the longer seven-field addresses.

  If your kernel does not have a top-level driver (disk, tape, etc) for
  a particular SCSI device, then the device will not be configured by
  the PCMCIA drivers.  As a side effect, the device's name in stab will
  be something like ``sd#nnnn'' where ``nnnn'' is a four-digit hex
  number.  This happens when cardmgr is unable to translate a SCSI
  device ID into a corresponding Linux device name.


  It is possible to modularize the top-level SCSI drivers so that they
  are loaded on demand.  To do so, you need to edit /etc/pcmcia/config
  to tell cardmgr which extra modules need to be loaded when your
  adapter is configured.  For example:



       device "aha152x_cs"
         class "scsi" module "scsi/scsi_mod", "scsi/sd_mod", "aha152x_cs"



  would say to load the core SCSI module and the top-level disk driver
  module before loading the regular PCMCIA driver module.  The PCMCIA
  Configure script will not automatically detect modularized SCSI
  modules, so you will need use the manual configure option to enable
  SCSI support.

  Always turn on SCSI devices before powering up your laptop, or before
  inserting the adapter card, so that the SCSI bus is properly
  terminated when the adapter is configured.  Also be very careful about
  ejecting a SCSI adapter.  Be sure that all associated SCSI devices are
  unmounted and closed before ejecting the card.  The best way to ensure
  this is to use either cardctl or cardinfo to request card removal
  before physically ejecting the card.  For now, all SCSI devices should
  be powered up before plugging in a SCSI adapter, and should stay
  connected until after you unplug the adapter and/or power down your
  laptop.

  There is a potential complication when using these cards that does not
  arise with ordinary ISA bus adapters.  The SCSI bus carries a
  ``termination power'' signal that is necessary for proper operation of
  ordinary passive SCSI terminators.  PCMCIA SCSI adapters do not supply
  termination power, so if it is required, an external device must
  supply it.  Some external SCSI devices may be configured to supply
  termination power.  Others, such as the Zip Drive and the Syquest EZ-
  Drive, use active terminators that do not depend on it.  In some
  cases, it may be necessary to use a special terminator block such as
  the APS SCSI Sentry 2, which has an external power supply.  When
  configuring your SCSI device chain, be aware of whether or not any of
  your devices require or can provide termination power.


  4.6.1.  SCSI device parameters

  The following parameters can be defined in scsi.opts:

     DO_FSTAB
        A boolean (y/n) setting: specifies if an entry should be added
        to /etc/fstab for this device.

     DO_FSCK
        A boolean (y/n) setting: specifies if the filesystem should be
        checked before being mounted, with ``fsck -Ta''.

     DO_MOUNT
        A boolean (y/n) setting: specifies if this device should be
        automatically mounted at card insertion time.

     FSTYPE, OPTS, MOUNTPT
        The filesystem type, mount options, and mount point to be used
        for the fstab entry and/or mounting the device.

  For example, here is a script for configuring a disk device at SCSI ID
  3, with two partitions, and a CD-ROM at SCSI ID 6:
       case "$ADDRESS" in
       *,sd,*,0,3,0)
           # This device has two partitions...
           PARTS="1 2"
           ;;
       *,sd,*,0,3,0,1)
           # Options for partition 1:
           #  update /etc/fstab, and mount an ext2 fs on /usr1
           DO_FSTAB="y" ; DO_FSCK="y" ; DO_MOUNT="y"
           FSTYPE="ext2"
           OPTS=""
           MOUNTPT="/usr1"
           ;;
       *,sd,*,0,3,0,2)
           # Options for partition 2:
           #  update /etc/fstab, and mount an MS-DOS fs on /usr2
           DO_FSTAB="y" ; DO_FSCK="y" ; DO_MOUNT="y"
           FSTYPE="msdos"
           OPTS=""
           MOUNTPT="/usr2"
           ;;
       *,sr,*,0,6,0)
           # Options for CD-ROM at SCSI ID 6
           PARTS=""
           DO_FSTAB="y" ; DO_FSCK="n" ; DO_MOUNT="y"
           FSTYPE="iso9660"
           OPTS="ro"
           MOUNTPT="/cdrom"
           ;;
       esac



  4.6.2.  Comments about specific cards



  o  The Adaptec APA-1480 CardBus card needs a large IO port window (256
     contiguous ports aligned on a 256-port boundary).  It may be
     necessary to expand the IO port regions in /etc/pcmcia/config.opts
     to guarantee that such a large window can be found.

  o  The Adaptec APA-460 SlimSCSI adapter is not supported.  This card
     was originally sold under the Trantor name, and when Adaptec merged
     with Trantor, they continued to sell the Trantor card with an
     Adaptec label.  The APA-460 is not compatible with any existing
     Linux driver.

  o  I have had one report of a bad interaction between the New Media
     Bus Toaster and a UMAX Astra 1200s scanner.  Due to the complexity
     of the SCSI protocol, when diagnosing problems with SCSI devices,
     it is worth considering that incompatible combinations like this
     may exist and may not be documented.


  4.6.3.  Diagnosing problems with SCSI adapters


  o  With the aha152x_cs driver (used by Adaptec, New Media, and a few
     others), it seems that SCSI disconnect/reconnect support is a
     frequent source of trouble with tape drives.  To disable this
     ``feature,'' add the following to /etc/pcmcia/config.opts:


  module "aha152x_cs" opts "reconnect=0"



  o  Also with the aha152x_cs driver, certain devices seem to require a
     longer startup delay, controlled via the reset_delay module
     parameter.  The Yamaha 4416S CDR drive is one such device.  The
     result is the device is identified successfully, then hangs the
     system.  In such cases, try:


       module "aha152x_cs" opts "reset_delay=500"



  o  Another potential source of SCSI device probe problems is probing
     of multiple LUN's.  If you see successful detection of a device,
     followed by SCSI bus timeouts when LUN 1 for that device is probed,
     then disable the kernel's CONFIG_SCSI_MULTI_LUN option.

  o  If you have compiled SCSI support as modules (CONFIG_SCSI is
     ``m''), you must modify /etc/pcmcia/config to load the SCSI modules
     before the appropriate *_cs driver is loaded.

  o  If you get ``aborting command due to timeout'' messages when the
     SCSI bus is probed, you almost certainly have an interrupt
     conflict.

  o  If the host driver reports ``no SCSI devices found'', verify that
     your kernel was compiled with the appropriate top-level SCSI
     drivers for your devices (i.e., disk, tape, CD-ROM, and/or
     generic).  If a top-level driver is missing, devices of that type
     will be ignored.


  4.7.  PCMCIA memory cards

  The memory_cs driver handles all types of memory cards, as well as
  providing direct access to the PCMCIA memory address space for cards
  that have other functions.  When loaded, it creates a combination of
  character and block devices.  See the man page for the module for a
  complete description of the device naming scheme.  Block devices are
  used for disk-like access (creating and mounting filesystems, etc).
  The character devices are for "raw" unbuffered reads and writes at
  arbitrary locations.

  The device address passed to memory.opts consists of two fields: the
  scheme, and the socket number.  The options are applied to the first
  common memory partition on the corresponding memory card.

  Some older memory cards, and most simple static RAM cards, lack a
  ``Card Information Structure'' (CIS), which is the scheme PCMCIA cards
  use to identify themselves.  Normally, cardmgr will assume that any
  card that lacks a CIS is a simple memory card, and load the memory_cs
  driver.  Thus, a common side effect of a general card identification
  problem is that other types of cards may be misdetected as memory
  cards.

  The memory_cs driver uses a heuristic to guess the capacity of these
  cards.  The heuristic does not work for write protected cards, and may
  make mistakes in some other cases as well.  If a card is misdetected,
  its size should then be explicitly specified when using commands such
  as dd or mkfs.

  4.7.1.  Memory device parameters


  The following parameters can be specified in memory.opts:


     DO_FSTAB
        A boolean (y/n) setting: specifies if an entry should be added
        to /etc/fstab for this device.

     DO_FSCK
        A boolean (y/n) setting: specifies if the filesystem should be
        checked before being mounted, with ``fsck -Ta''.

     DO_MOUNT
        A boolean (y/n) setting: specifies if this device should be
        automatically mounted at card insertion time.

     FSTYPE, OPTS, MOUNTPT
        The filesystem type, mount options, and mount point to be used
        for the fstab entry and/or mounting the device.

  Here is an example of a script that will automatically mount memory
  cards based on which socket they are inserted into:



       case "$ADDRESS" in
       *,0,0)
           # Mount filesystem, but don't update /etc/fstab
           DO_FSTAB="n" ; DO_FSCK="y" ; DO_MOUNT="y"
           FSTYPE="ext2" ; OPTS=""
           MOUNTPT="/mem0"
           ;;
       *,1,0)
           # Mount filesystem, but don't update /etc/fstab
           DO_FSTAB="n" ; DO_FSCK="y" ; DO_MOUNT="y"
           FSTYPE="ext2" ; OPTS=""
           MOUNTPT="/mem1"
           ;;
       esac



  4.7.2.  Using linear flash memory cards

  The following information applies only to so-called ``linear flash''
  memory cards.  Many flash cards, including all SmartMedia and
  CompactFlash cards, actually include circuitry to emulate an IDE disk
  device.  Those cards are thus handled as IDE devices, not memory
  cards.

  There are two major formats for flash memory cards: the FTL or ``flash
  translation layer'' style, and the Microsoft Flash File System.  The
  FTL format is generally more flexible because it allows any ordinary
  high-level filesystem (ext2, ms-dos, etc) to be used on a flash card
  as if it were an ordinary disk device.  The FFS is a completely
  different filesystem type.  Linux cannot currently handle cards
  formated with FFS.

  To use a flash memory card as an ordinary disk-like block device,
  first create an FTL partition on the device with the ftl_format
  command.  This layer hides the device-specific details of flash memory
  programming and make the card look like a simple block device.  For
  example:



       ftl_format -i /dev/mem0c0c



  Note that this command accesses the card through the ``raw'' memory
  card interface.  Once formatted, the card can be accessed as an
  ordinary block device via the ftl_cs driver.  For example:



       mke2fs /dev/ftl0c0
       mount -t ext2 /dev/ftl0c0 /mnt



  Device naming for FTL devices is tricky.  Minor device numbers have
  three parts: the card number, the region number on that card, and
  optionally, the partition within that region.  A region can either be
  treated as a single block device with no partition table (like a
  floppy), or it can be partitioned like a hard disk device.  The
  ``ftl0c0'' device is card 0, common memory region 0, the entire
  region.  The ``ftl0c0p1'' through ``ftl0c0p4'' devices are primary
  partitions 1 through 4 if the region has been partitioned.

  Configuration options for FTL partitions can be given in ftl.opts,
  which is similar in structure to memory.opts.  The device address
  passed to ftl.opts consists of three or four fields: the scheme, the
  socket number, the region number, and optionally, the partition
  number.  Most flash cards have just one flash memory region, so the
  region number will generally always be zero.

  Intel Series 100 flash cards use the first 128K flash block to store
  the cards' configuration information.  To prevent accidental erasure
  of this information, ftl_format will automatically detect this and
  skip the first block when creating an FTL partition.


  4.8.  PCMCIA ATA/IDE card drives

  ATA/IDE drive support is based on the regular kernel IDE driver.  This
  includes SmartMedia and CompactFlash devices: these flash memory cards
  are set up so that they emulate an IDE interface.  The PCMCIA-specific
  part of the driver is ide_cs.  Be sure to use cardctl or cardinfo to
  shut down an ATA/IDE card before ejecting it, as the driver has not
  been made ``hot-swap-proof''.

  The device addresses passed to ide.opts consist of either three or
  four fields: the current scheme, the socket number, the drive's serial
  number, and an optional partition number.  The ide_info command can be
  used to obtain an IDE device's serial number.  As with SCSI devices,
  ide.opts is first called for the entire device.  If ide.opts returns a
  list of partitions in the PARTS variable, the script will then be
  called for each partition.


  4.8.1.  ATA/IDE fixed-disk device parameters


  The following parameters can be specified in ide.opts:

     DO_FSTAB
        A boolean (y/n) setting: specifies if an entry should be added
        to /etc/fstab for this device.

     DO_FSCK
        A boolean (y/n) setting: specifies if the filesystem should be
        checked before being mounted, with ``fsck -Ta''.

     DO_MOUNT
        A boolean (y/n) setting: specifies if this device should be
        automatically mounted at card insertion time.

     FSTYPE, OPTS, MOUNTPT
        The filesystem type, mount options, and mount point to be used
        for the fstab entry and/or mounting the device.

  Here is an example ide.opts file to mount the first partition of any
  ATA/IDE card on /mnt.



       case "$ADDRESS" in
       *,*,*,1)
           DO_FSTAB="y" ; DO_FSCK="y" ; DO_MOUNT="y"
           FSTYPE="msdos"
           OPTS=""
           MOUNTPT="/mnt"
           ;;
       *,*,*)
           PARTS="1"
           ;;
       esac



  4.8.2.  Diagnosing problems with ATA/IDE adapters


  o  An IO port conflict may cause the IDE driver to misdetect the drive
     geometry and report ``INVALID GEOMETRY: 0 PHYSICAL HEADS?''.  To
     fix, try excluding the selected IO port range in
     /etc/pcmcia/config.opts.

  o  Some IDE drives violate the PCMCIA specification by requiring a
     longer time to spin up than the maximum allowed card setup time.
     Starting with release 3.0.6, the ide_cs driver will automatically
     retry the device probe to give these drives time to spin up.  With
     older drivers, you may need to load the pcmcia_core module with:


       CORE_OPTS="unreset_delay=400"



  o  To use an ATA/IDE CD-ROM device, your kernel must be compiled with
     CONFIG_BLK_DEV_IDECD enabled.  This will normally be the case for
     standard kernels, however it is something to be aware of if you
     compile a custom kernel.

  o  A common error when using IDE drives is try to mount the wrong
     device file.  Generally, you want to mount a partition of the
     device, not the entire device (i.e., /dev/hde1, not /dev/hde).

  4.9.  Multifunction cards

  A single interrupt can be shared by several drivers, such as the
  serial driver and an ethernet driver: in fact, the PCMCIA
  specification requires all card functions to share the same interrupt.
  Normally, all card functions are available without having to swap
  drivers.  Any remotely recent Linux kernel (i.e., 1.3.72 or later)
  supports this kind of interrupt sharing.

  Simultaneous use of two card functions is ``tricky'' and various
  hardware vendors have implemented interrupt sharing in their own
  incompatible (and sometimes proprietary) ways.  The drivers for some
  cards (Ositech Jack of Diamonds, 3Com 3c562 and related cards, Linksys
  cards) properly support simultaneous access, but others (older
  Megahertz cards in particular) do not.  If you have trouble using a
  card with both functions active, try using each function in isolation.
  That may require explicitly doing an ``ifconfig down'' to shut down a
  network interface and use a modem on the same card.


  5.  Advanced topics



  5.1.  Resource allocation for PCMCIA devices

  In theory, it should not really matter which interrupt is allocated to
  which device, as long as two devices are not configured to use the
  same interrupt.  In /etc/pcmcia/config.opts you'll find a place for
  excluding interrupts that are used by non-PCMCIA devices.

  Similarly, there is no way to directly specify the I/O addresses for a
  card to use.  The /etc/pcmcia/config.opts file allows you to specify
  ranges of ports available for use by any card, or to exclude ranges
  that conflict with other devices.

  After modifying /etc/pcmcia/config.opts, you can reinitialize cardmgr
  with ``kill -HUP''.

  The interrupt used to monitor card status changes is chosen by the
  low-level socket driver module (i82365 or tcic) before cardmgr parses
  /etc/pcmcia/config, so it is not affected by changes to this file.  To
  set this interrupt, use the cs_irq= option when the socket driver is
  loaded, by setting the PCIC_OPTS variable in /etc/rc.d/rc.pcmcia.

  All the client card drivers have a parameter called irq_list for
  specifying which interrupts they may try to allocate.  These driver
  options should be set in your /etc/pcmcia/config file.  For example:



       device "serial_cs"
         module "serial_cs" opts "irq_list=8,12"
         ...



  would specify that the serial driver should only use irq 8 or irq 12.
  Regardless of irq_list settings, Card Services will never allocate an
  interrupt that is already in use by another device, or an interrupt
  that is excluded in the config file.



  5.2.  How can I have separate device setups for home and work?

  This is fairly easy using ``scheme'' support.  Use two configuration
  schemes, called ``home'' and ``work''.  Here is an example of a
  network.opts script with scheme-specific settings:



       case "$ADDRESS" in
       work,*,*,*)
           # definitions for network card in work scheme
           ...
           ;;
       home,*,*,*|default,*,*,*)
           # definitions for network card in home scheme
           ...
           ;;
       esac



  The first part of a device address is always the configuration scheme.
  In this example, the second ``case'' clause will select for both the
  ``home'' and ``default'' schemes.  So, if the scheme is unset for any
  reason, it will default to the ``home'' setup.

  Now, to select between the two sets of settings, run either:



       cardctl scheme home



  or



       cardctl scheme work



  The cardctl command does the equivalent of shutting down all your
  cards and restarting them.  The command can be safely executed whether
  or not the PCMCIA system is loaded, but the command may fail if you
  are using other PCMCIA devices at the time (even if their
  configurations are not explicitly dependant on the scheme setting).

  To find out the current scheme setting, run:



       cardctl scheme



  By default, the scheme setting is persistent across boots.  This can
  have undesirable effects if networking is initialized for the wrong
  environment.  Optionally, you can set the initial scheme value with
  the SCHEME startup option (see ``Startup options'' for details).  It
  is also possible to set the scheme from the lilo boot prompt.  Since
  lilo passes unrecognized options to init as environment variables, a
  value for SCHEME (or any other PCMCIA startup option) at the boot
  prompt will be propagated into the PCMCIA startup script.

  To save even more keystrokes, schemes can be specified in lilo's
  configuration file.  For instance, you could have:



       root = /dev/hda1
       read-only
       image = /boot/vmlinuz
         label  = home
         append = "SCHEME=home"
       image = /boot/vmlinuz
         label  = work
         append = "SCHEME=work"



  Typing ``home'' or ``work'' at the boot prompt would then boot into
  the appropriate scheme.


  5.3.  Booting from a PCMCIA device


  Having the root filesystem on a PCMCIA device is tricky because the
  Linux PCMCIA system is not designed to be linked into the kernel.  Its
  core components, the loadable kernel modules and the user mode cardmgr
  daemon, depend on an already running system.  The kernel's ``initrd''
  facility works around this requirement by allowing Linux to boot using
  a temporary ram disk as a minimal root image, load drivers, and then
  re-mount a different root filesystem.  The temporary root can
  configure PCMCIA devices and then re-mount a PCMCIA device as root.

  The initrd image absolutely must reside on a bootable device: this
  generally cannot be put on a PCMCIA device.  This is a BIOS
  limitation, not a kernel limitation.  It is useful here to distinguish
  between ``boot-able'' devices (i.e., devices that can be booted), and
  ``root-able'' devices (i.e., devices that can be mounted as root).
  ``Boot-able'' devices are determined by the BIOS, and are generally
  limited to internal floppy and hard disk drives.  ``Root-able''
  devices are any block devices that the kernel supports once it has
  been loaded.  The initrd facility makes more devices ``root-able'',
  not ``boot-able''.

  Some Linux distributions will allow installation to a device connected
  to a PCMCIA SCSI adapter, as an unintended side-effect of their
  support for installs from PCMCIA SCSI CD-ROM devices.  However, at
  present, no Linux installation tools support configuring an
  appropriate ``initrd'' to boot Linux with a PCMCIA root filesystem.
  Setting up a system with a PCMCIA root thus requires that you use
  another Linux system to create the ``initrd'' image.  If another Linux
  system is not available, another option would be to temporarily
  install a minimal Linux setup on a non-PCMCIA drive, create an initrd
  image, and then reinstall to the PCMCIA target.

  The Linux Bootdisk-HOWTO has some general information about setting up
  boot disks but nothing specific to initrd.  The main initrd document
  is included with recent kernel source code distributions, in
  linux/Documentation/initrd.txt.  Before beginning, you should read
  this document.  A familiarity with lilo is also helpful.  Using initrd
  also requires that you have a kernel compiled with CONFIG_BLK_DEV_RAM
  and CONFIG_BLK_DEV_INITRD enabled.

  This is an advanced configuration technique, and requires a high level
  of familiarity with Linux and the PCMCIA system.  Be sure to read all
  the relevant documentation before starting.  The following cookbook
  instructions should work, but deviations from the examples will
  quickly put you in uncharted and ``unsupported'' territory, and you
  will be on your own.

  This method absolutely requires that you use a PCMCIA driver release
  of 2.9.5 or later.  Older PCMCIA packages or individual components
  will not work in the initrd context.  Do not mix components from
  different releases.


  5.3.1.  The pcinitrd helper script

  The pcinitrd script creates a basic initrd image for booting with a
  PCMCIA root partition.  The image includes a minimal directory
  heirarchy, a handful of device files, a few binaries, shared
  libraries, and a set of PCMCIA driver modules.  When invoking
  pcinitrd, you specify the driver modules that you want to be included
  in the image.  The core PCMCIA components, pcmcia_core and ds, are
  automatically included.

  As an example, say that your laptop uses an i82365-compatible host
  controller, and you want to boot Linux with the root filesystem on a
  hard drive attached to an Adaptec SlimSCSI adapter.  You could create
  an appropriate initrd image with:



       pcinitrd -v initrd pcmcia/i82365.o pcmcia/aha152x_cs.o



  To customize the initrd startup sequence, you could mount the image
  using the ``loopback'' device with a command like:



       mount -o loop -t ext2 initrd /mnt



  and then edit the linuxrc script.  The configuration files will be
  installed under /etc in the image, and can also be customized.  See
  the man page for pcinitrd for more information.


  5.3.2.  Creating an initrd boot floppy


  After creating an image with pcinitrd, you can create a boot floppy by
  copying the kernel, the compressed initrd image, and a few support
  files for lilo to a clean floppy.  In the following example, we assume
  that the desired PCMCIA root device is /dev/sda1:



  mke2fs /dev/fd0
  mount /dev/fd0 /mnt
  mkdir /mnt/etc /mnt/boot /mnt/dev
  cp -a /dev/fd0 /dev/sda1 /mnt/dev
  cp [kernel-image] /mnt/vmlinuz
  cp /boot/boot.b /mnt/boot/boot.b
  gzip < [initrd-image] > /mnt/initrd



  Create /mnt/etc/lilo.conf with the contents:



       boot=/dev/fd0
       compact
       image=/vmlinuz
           label=linux
           initrd=/initrd
           read-only
           root=/dev/sda1



  Finally, invoke lilo with:



       lilo -r /mnt



  When lilo is invoked with -r, it performs all actions relative to the
  specified alternate root directory.  The reason for creating the
  device files under /mnt/dev was that lilo will not be able to use the
  files in /dev when it is running in this alternate-root mode.


  5.3.3.  Installing an initrd image on a non-Linux drive

  One common use of the initrd facility would be on systems where the
  internal hard drive is dedicated to another operating system.  The
  Linux kernel and initrd image can be placed in a non-Linux partition,
  and lilo or LOADLIN can be set up to boot Linux from these images.

  Assuming that you have a kernel has been configured for the
  appropriate root device, and an initrd image created on another
  system, the easiest way to get started is to boot Linux using LOADLIN,
  as:



       LOADLIN <kernel> initrd=<initrd-image>



  Once you can boot Linux on your target machine, you could then install
  lilo to allow booting Linux directly.  For example, say that /dev/hda1
  is the non-Linux target partition and /mnt can be used as a mount
  point.  First, create a subdirectory on the target for the Linux
  files:

       mount /dev/hda1 /mnt
       mkdir /mnt/linux
       cp [kernel-image] /mnt/linux/vmlinuz
       cp [initrd-image] /mnt/linux/initrd



  In this example, say that /dev/sda1 is the desired Linux root
  partition, a SCSI hard drive mounted via a PCMCIA SCSI adapter.  To
  install lilo, create a lilo.conf file with the contents:



       boot=/dev/hda
       map=/mnt/linux/map
       compact
       image=/mnt/linux/vmlinuz
               label=linux
               root=/dev/sda1
               initrd=/mnt/linux/initrd
               read-only
       other=/dev/hda1
               table=/dev/hda
               label=windows



  The boot= line says to install the boot loader in the master boot
  record of the specified device.  The root= line identifies the desired
  root filesystem to be used after loading the initrd image, and may be
  unnecessary if the kernel image is already configured this way.  The
  other= section is used to describe the other operating system
  installed on /dev/hda1.

  To install lilo in this case, use:



       lilo -C lilo.conf



  Note that in this case, the lilo.conf file uses absolute paths that
  include /mnt.  I did this in the example because the target filesystem
  may not support the creation of Linux device files for the boot= and
  root= options.


  6.  Dealing with unsupported cards



  6.1.  Configuring unrecognized cards


  Assuming that your card is supported by an existing driver, all that
  needs to be done is to add an entry to /etc/pcmcia/config to tell
  cardmgr how to identify the card, and which driver(s) need to be
  linked up to this card.  Check the man page for pcmcia for more
  information about the config file format.  If you insert an unknown
  card, cardmgr will normally record some identification information in
  the system log that can be used to construct the config entry.  This
  information can also be displayed with the ``cardctl ident'' command.
  Here is an example of how cardmgr will report an unsupported card in
  /usr/adm/messages.



       cardmgr[460]: unsupported card in socket 1
       cardmgr[460]: product info: "MEGAHERTZ", "XJ2288", "V.34 PCMCIA MODEM"
       cardmgr[460]: manfid: 0x0101, 0x1234  function: 2 (serial)



  The corresponding entry in /etc/pcmcia/config would be:



       card "Megahertz XJ2288 V.34 Fax Modem"
         version "MEGAHERTZ", "XJ2288", "V.34 PCMCIA MODEM"
         bind "serial_cs"



  or using the more compact product ID codes:



       card "Megahertz XJ2288 V.34 Fax Modem"
         manfid 0x0101, 0x1234
         bind "serial_cs"



  You can use ``*'' to match strings that don't need to match exactly,
  like version numbers.  When making new config entries, be careful to
  copy the strings exactly, preserving case and blank spaces.  Also be
  sure that the config entry has the same number of strings as are
  reported in the log file.

  Beware that you can specify just about any driver for a card, but if
  you're just shooting in the dark, there is not much reason to expect
  this to be productive.  You may get lucky and find that your card is
  supported by an existing driver.  However, the most likely outcome is
  that the driver won't work, and may have unfortunate side effects like
  locking up your system.  Unlike most ordinary device drivers, which
  probe for an appropriate card, the probe for a PCMCIA device is done
  by cardmgr, and the driver itself may not do much validation before
  attempting to communicate with the device.

  After editing /etc/pcmcia/config, you can signal cardmgr to reload the
  file with:



       kill -HUP `cat /var/run/cardmgr.pid`



  If you do set up an entry for a new card, please send me a copy so
  that I can include it in the standard config file.



  6.2.  Adding support for an NE2000-compatible ethernet card

  Before you begin: this procedure will only work for simple ethernet
  cards.  Multifunction cards (i.e., ethernet/modem combo cards) have an
  extra layer of complexity regarding how the two functions are
  integrated, and generally cannot be supported without obtaining some
  configuration information from the card vendor.  Using the following
  procedure for a multifunction card will not be productive.

  First, see if the card is already recognized by cardmgr.  Some cards
  not listed in SUPPORTED.CARDS are actually OEM versions of cards that
  are supported.  If you find a card like this, let me know so I can add
  it to the list.

  If your card is not recognized, follow the instructions in the
  ``Configuring unrecognized cards'' section to create a config entry
  for your card, and bind the card to the pcnet_cs driver.  Restart
  cardmgr to use the updated config file.

  If the pcnet_cs driver says that it is unable to determine your card's
  hardware ethernet address, then edit your new config entry to bind the
  card to the memory card driver, memory_cs.  Restart cardmgr to use the
  new updated config file.  You will need to know your card's hardware
  ethernet address.  This address is a series of six two-digit hex
  numbers, often printed on the card itself.  If it is not printed on
  the card, you may be able to use a DOS driver to display the address.
  In any case, once you know it, run:



       dd if=/dev/mem0a count=20 | od -Ax -t x1



  and search the output for your address.  Only the even bytes are
  defined, so ignore the odd bytes in the dump.  Record the hex offset
  of the first byte of the address.  Now, edit clients/pcnet_cs.c and
  find the hw_info structure.  You'll need to create a new entry for
  your card.  The first field is the memory offset.  The next three
  fields are the first three bytes of the hardware address.  The final
  field contains some flags for specific card features; to start, try
  setting it to 0.

  After editing pcnet_cs.c, compile and install the new module.  Edit
  /etc/pcmcia/config again, and change the card binding from memory_cs
  to pcnet_cs.  Follow the instructions for reloading the config file,
  and you should be all set.  Please send me copies of your new hw_info
  and config entries.

  If you can't find your card's hardware address in the hex dump, as a
  method of last resort, it is possible to ``hard-wire'' the address
  when the pcnet_cs module is initialized.  Edit /etc/pcmcia/config.opts
  and add a hw_addr= option, like so:



       module "pcnet_cs" opts "hw_addr=0x00,0x80,0xc8,0x01,0x02,0x03"



  Substitute your own card's hardware address in the appropriate spot,
  of course.  Beware that if you've gotten this far, it is very unlikely
  that your card is genuinely NE2000 compatible.  In fact, I'm not sure
  if there are any cards that are not handled by one of the first two
  methods.


  6.3.  PCMCIA floppy interface cards

  The PCMCIA floppy interface used in the Compaq Aero and a few other
  laptops is not yet supported by this package.  The snag in supporting
  the Aero floppy is that the Aero seems to use a customized PCMCIA
  controller to support DMA to the floppy.  Without knowing exactly how
  this is done, there isn't any way to implement support under Linux.

  If the floppy adapter card is present when an Aero is booted, the Aero
  BIOS will configure the card, and Linux will identify it as a normal
  floppy drive.  When the Linux PCMCIA drivers are loaded, they will
  notice that the card is already configured and attached to a Linux
  driver, and this socket will be left alone.  So, the drive can be used
  if it is present at boot time, but the card is not hot swappable.


  7.  Debugging tips and programming information

  7.1.  Submitting useful bug reports

  The best way to submit bug reports is to use the HyperNews message
  lists on the Linux PCMCIA information site.  That way, other people
  can see current problems (and fixes or workarounds, if available).
  Here are some things that should be included in all bug reports:


  o  Your system brand and model.

  o  What PCMCIA card(s) you are using.

  o  Your Linux kernel version (i.e., ``uname -rv''), and PCMCIA driver
     version (i.e., ``cardctl -V'').

  o  Any changes you have made to the startup files in /etc/pcmcia, or
     to the PCMCIA startup script.

  o  All PCMCIA-related messages in your system log file.  That includes
     startup messages, and messages generated when your cards are
     configured.

  All the PCMCIA modules and the cardmgr daemon send status messages to
  the system log.  This will usually be something like /var/log/messages
  or /usr/adm/messages.  This file should be the first place to look
  when tracking down a problem.  When submitting a bug report, always
  include the relevant contents of this file.  If you are having trouble
  finding your system messages, check /etc/syslog.conf to see how
  different classes of messages are handled.

  Before submitting a bug report, please check to make sure that you are
  using an up-to-date copy of the driver package.  While it is somewhat
  gratifying to read bug reports for things I've already fixed, it isn't
  a particularly constructive use of my time.

  If you do not have web access, bug reports can be sent to me at
  dhinds@pcmcia.sourceforge.org.  However, I prefer that bug reports be
  posted to my web site, so that they can be seen by others.


  7.2.  Interpreting kernel trap reports

  If your problem involves a kernel fault, the register dump from the
  fault is only useful if you can translate the fault address, EIP, to
  something meaningful.  Recent versions of klogd attempt to translate
  fault addresses based on the current kernel symbol map, but this may
  not work if the fault is in a module, or if the problem is severe
  enough that klogd cannot finish writing the fault information to the
  system log.

  If a fault is in the main kernel, the fault address can be looked up
  in the System.map file.  This may be installed in /System.map or
  /boot/System.map.  If a fault is in a module, the nm command gives the
  same information, however, the fault address has to be adjusted based
  on the module's load address.  Let's say that you have the following
  kernel fault:



       Unable to handle kernel NULL pointer dereference
       current->tss.cr3 = 014c9000, %cr3 = 014c9000
       *pde = 00000000
       Oops: 0002
       CPU:    0
       EIP:    0010:[<c2026081>]
       EFLAGS: 00010282



  The fault address is 0xc2026081.  Looking at System.map, we see that
  this is past the end of the kernel, i.e., is in a kernel module.  To
  determine which module, check the output of ``ksyms -m | sort'':



       Address   Symbol                            Defined by
       c200d000  (35k)                             [pcmcia_core]
       c200d10c  register_ss_entry                 [pcmcia_core]
       c200d230  unregister_ss_entry               [pcmcia_core]
                 ...
       c2026000  (9k)                              [3c574_cs]
       c202a000  (4k)                              [serial_cs]



  So, 0xc2026081 is in the 3c574_cs module, and is at an offset of
  0x0081 from the start of the module.  We cannot look up this offset in
  3c574_cs.o yet: when the kernel loads a module, it inserts a header at
  the module load address, so the real start of the module is offset
  from the address shown in ksyms.  The size of the header varies with
  kernel version: to find out the size for your kernel, check a module
  that exports symbols (like pcmcia_core above), and compare a symbol
  address with nm output for that symbol.  In this example,
  register_ss_entry is loaded at an offset of 0xc200d10c - 0xc200d000 =
  0x010c, while ``nm pcmcia_core.o'' shows the offset as 0x00c0, so the
  header size is 0x010c - 0x00c0 = 0x004c bytes.

  Back to 3c574_cs, our fault offset is 0x0081, and subtracting the
  0x004c header, the real module offset is 0x0035.  Now looking at ``nm
  3c574_cs.o | sort'', we see:



       0000002c d if_names
       0000002c t tc574_attach
       00000040 d mii_preamble_required
       00000041 d dev_info


  So, the fault is located in tc574_attach().

  In this example, the fault did not cause a total system lockup, so
  ksyms could be executed after the fault happened.  In other cases, you
  may have to infer the module load addresses indirectly.  The same
  sequence of events will normally load modules in the same order and at
  the same addresses.  If a fault happens when a certain card is
  inserted, get the ksyms output before inserting the card, or with a
  different card inserted.  You can also manually load the card's driver
  modules with insmod and run ksyms before inserting the card.

  For more background, see ``man insmod'', ``man ksyms'', and ``man
  klogd''.  In the kernel source tree, Documentation/oops-tracing.txt is
  also relevant.  Here are a few more kernel debugging hints:


  o  Depending on the fault, it may also be useful to translate
     addresses in the ``Call Trace'', using the same procedure as for
     the main fault address.

  o  To diagnose a silent lock-up, try to provoke the problem with X
     disabled, since kernel messages sent to the text console will not
     be visible under X.

  o  If you kill klogd, most kernel messages will be echoed directly on
     the text console, which may be helpful if the problem prevents
     klogd from writing to the system log.

  o  To cause all kernel messages to be sent to the console, for 2.1
     kernels, if /proc/sys/kernel/printk exists, do:


       echo 8 > /proc/sys/kernel/printk



  o  The key combination <RightAlt><ScrLk> prints a register dump on the
     text console.  This may work even if the system is otherwise
     completely unresponsive, and the EIP address can be interpreted as
     for a kernel fault.

  o  For 2.1 kernels configured with CONFIG_MAGIC_SYSRQ enabled, various
     emergency functions are available via special <Alt><SysRq> key
     combinations, documented in Documentation/sysrq.txt in the kernel
     source tree.


  7.3.  Low level PCMCIA debugging aids

  The PCMCIA modules contain a lot of conditionally-compiled debugging
  code.  Most of this code is under control of the PCMCIA_DEBUG
  preprocessor define.  If this is undefined, debugging code will not be
  compiled.  If set to 0, the code is compiled but inactive.  Larger
  numbers specify increasing levels of verbosity.  Each module built
  with PCMCIA_DEBUG defined will have an integer parameter, pc_debug,
  that controls the verbosity of its output.  This can be adjusted when
  the module is loaded, so output can be controlled on a per-module
  basis without recompiling.

  Your default configuration for syslogd may discard kernel debugging
  messages.  To ensure that they are recorded, edit /etc/syslog.conf to
  ensure that ``kern.debug'' messages are recorded somewhere.  See ``man
  syslog.conf'' for details.


  There are a few debugging tools in the debug_tools/ subdirectory of
  the PCMCIA distribution.  The dump_tcic and dump_i365 utilities
  generate complete register dumps of the PCMCIA controllers, and decode
  a lot of the register information.  They are most useful if you have
  access to a datasheet for the corresponding controller chip.  The
  dump_cis utility (dump_tuples in pre-3.0.2 distributions) lists the
  contents of a card's CIS (Card Information Structure), and decodes
  some of the important bits.  And the dump_cisreg utility displays a
  card's local configuration registers.

  The memory_cs memory card driver is also sometimes useful for
  debugging problems with 16-bit PC Cards.  It can be bound to any card,
  and does not interfere with other drivers.  It can be used to directly
  access any card's attribute memory or common memory.  Similarly for
  CardBus cards, the memory_cb driver can be bound to any 32-bit card,
  to give direct access to that card's address spaces.  See the man
  pages for more information.


  7.4.  /proc/bus/pccard

  Starting with 2.1.103 kernels, the PCMCIA package will create a tree
  of status information under /proc/bus/pccard.  Much of the information
  can only be interpreted using the data sheets for the PCMCIA host
  controller.  Its contents may depend on how the drivers were
  configured, but may include all or some of the following:


     /proc/bus/pccard/{irq,ioport,memory}
        If present, these files contain resource allocation information
        to supplement the normal kernel resource tables.  Recent
        versions of the PCMCIA system may obtain additional resource
        information from the Plug and Play BIOS if configured to do so.

     /proc/bus/pccard/drivers
        In recent releases, this lists all currently loaded PCMCIA
        client drivers.  Unlike /proc/modules, it also lists drivers
        that may be statically linked into the kernel.

     /proc/bus/pccard/*/info
        For each socket, describes that socket's host controller and its
        capabilities.

     /proc/bus/pccard/*/exca
        This contains a dump of a controller's ``ExCA'' Intel i82365sl-
        compatible register set.

     /proc/bus/pccard/*/{pci,cardbus}
        For CardBus bridges, a dump of the bridge's PCI configuration
        space, and a dump of the bridge's CardBus configuration
        registers.


  7.5.  Writing Card Services drivers for new cards

  The Linux PCMCIA Programmer's Guide is the best documentation for the
  client driver interface.  The latest version is always available from
  sourceforge.org in /pcmcia/doc, or on the web at
  <http://pcmcia.sourceforge.org>.

  For devices that are close relatives of normal ISA devices, you will
  probably be able to use parts of existing Linux drivers.  In some
  cases, the biggest stumbling block will be modifying an existing
  driver so that it can handle adding and removing devices after boot
  time.  Of the current drivers, the memory card driver is the only
  ``self-contained'' driver that does not depend on other parts of the
  Linux kernel to do most of the dirty work.

  In many cases, the largest barrier to supporting a new card type is
  obtaining technical information from the manufacturer.  It may be
  difficult to figure out who to ask, or to explain exactly what
  information is needed.  However, with a few exceptions, it is very
  difficult if not impossible to implement a driver for a card without
  technical information from the manufacturer.

  I have written a dummy driver with lots of comments that explains a
  lot of how a driver communicates with Card Services; you will find
  this in the PCMCIA source distribution in clients/dummy_cs.c.


  7.6.  Guidelines for PCMCIA client driver authors


  I have decided that it is not really feasible for me to distribute all
  PCMCIA client drivers as part of the PCMCIA package.  Each new driver
  makes the main package incrementally harder to maintain, and including
  a driver inevitably transfers some of the maintenance work from the
  driver author to me.  Instead, I will decide on a case by case basis
  whether or not to include contributed drivers, based on user demand as
  well as maintainability.  For drivers not included in the core
  package, I suggest that driver authors adopt the following scheme for
  packaging their drivers for distribution.

  Driver files should be arranged in the same directory scheme used in
  the PCMCIA source distribution, so that the driver can be unpacked on
  top of a complete PCMCIA source tree.  A driver should include source
  files (in ./modules/), a man page (in ./man/), and configuration files
  (in ./etc/).  The top level directory should also include a README
  file.

  The top-level directory should include a makefile, set up so that
  ``make -f ... all'' and ``make -f ... install'' compile the driver and
  install all appropriate files.  If this makefile is given an extension
  of .mk, then it will automatically be invoked by the top-level
  Makefile for the all and install targets.  Here is an example of how
  such a makefile could be constructed:



       # Sample Makefile for contributed client driver
       FILES = sample_cs.mk README.sample_cs \
               modules/sample_cs.c modules/sample_cs.h \
               etc/sample etc/sample.opts man/sample_cs.4
       all:
               $(MAKE) -C modules MODULES=sample_cs.o
       install:
               $(MAKE) -C modules install-modules MODULES=sample_cs.o
               $(MAKE) -C etc install-clients CLIENTS=sample
               $(MAKE) -C man install-man4 MAN4=sample_cs.4
       dist:
               tar czvf sample_cs.tar.gz $(FILES)



  This makefile uses install targets defined in 2.9.10 and later
  versions of the PCMCIA package.  This makefile also includes a
  ``dist'' target for the convenience of the driver author.  You would
  probably want to add a version number to the final package filename
  (for example, sample_cs-1.5.tar.gz).  A complete distribution could
  look like:

       sample_cs.mk
       README.sample_cs
       modules/sample_cs.c
       modules/sample_cs.h
       etc/sample
       etc/sample.opts
       man/sample_cs.4



  With this arrangement, when the contributed driver is unpacked, it
  becomes essentially part of the PCMCIA source tree.  It can make use
  of the PCMCIA header files, as well as the machinery for checking the
  user's system configuration, and automatic dependency checking, just
  like a ``normal'' client driver.

  I will accept client drivers prepared according to this specification
  and place them in the /pcmcia/contrib directory on sourceforge.org.
  The README in this directory will describe how to unpack a contributed
  driver.

  The client driver interface has not changed much over time, and has
  almost always preserved backwards compatibility.  A client driver will
  not normally need to be updated for minor revisions in the main
  package.  I will try to notify authors of contributed drivers of
  changes that require updates to their drivers.


  7.7.  Guidelines for Linux distribution maintainers


  If your distribution has system configuration tools that you would
  like to be PCMCIA-aware, please use the *.opts files in /etc/pcmcia
  for your ``hooks.''  These files will not be modified if a user
  compiles and installs a new release of the PCMCIA package.  If you
  modify the main configuration scripts, then a fresh install will
  silently overwrite your custom scripts and break the connection with
  your configuration tools.  Contact me if you are not sure how to write
  an appropriate option script, or if you need additional capabilities.

  It is helpful for users (and for me) if you can document how your
  distribution deviates from the PCMCIA package as described in this
  document.  In particular, please document changes to the startup
  script and configuration scripts.  If you send me the appropriate
  information, I will include it in the ``Notes about specific Linux
  distributions''.

  When building PCMCIA for distribution, consider including contributed
  drivers that are not part of the main PCMCIA package.  For reasons of
  maintainability, I am trying to limit the core package size, by only
  adding new drivers if I think they are of particularly broad interest.
  Other drivers will be distributed separately, as described in the
  previous section.  The split between integral and separate drivers is
  somewhat arbitrary and partly historical, and should not imply a
  difference in quality.



  PHP HOW-TO
  Al Dev (Alavoor Vasudevan)            alavoor@yahoo.com
  v7.0, 10 Jul 2000

  This document tells you howto develop PHP programs and also to migrate
  all the Windows 95 GUI applications to powerful PHP + HTML + DHTML +
  XML + Java applets + Javascript.  The information in this document
  applies to all the operating sytems where PHP is ported that is -
  Linux, Windows 95/NT, OS/2, all flavors of Unix like Solaris, HPUX,
  AIX, SCO, Sinix, BSD, etc..
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. PHP Download

     2.1 PHP Installation

  3. PHP Tutorial

  4. IDE tools for PHP

  5. ctags for PHP ! Surprise!!!

  6. Debugging PHP

  7. Limitations of PHP

  8. Related URLs

  9. Other Formats of this Document

  10. Copyright

  11. Appendix A Database Wrapper Example

  12. Appendix B SQL abstraction Example

  13. Appendix C PostgreSQL large object Example

  14. Appendix D User authentication Example

  15. Appendix E Network admin Example

  16. Appendix F PostgreSQL Database Wrapper Examples

  17. Appendix G Microsoft SQL Server DB Wrapper Example

  18. Appendix H Sybase SQL Server DB Wrapper Example

  19. Appendix I phpDB.inc Example

  20. Appendix J phpDBTest.php3 Example



  ______________________________________________________________________

  1.  Introduction

  PHP stands for 'Hypertext Pre-Processor' and is a server side HTML
  scripting/programming language.  PHP is a tool that lets you create
  dynamic web pages. PHP-enabled web pages are treated just like regular
  HTML pages and you can create and edit them the same way you normally
  create regular HTML pages.

  PHP was kept the "top secret and strictly confidential" computer
  language by many companies in the world, but now had become the most
  well-known and most widely used scripting language for web, internet,
  e-commerce and business-to-business projects.  Even today many
  competing companies keep PHP language as a highly confidential matter
  not disclosing to outsiders (competitors).

  PHP will storm the entire world and will take the IT industry by
  surprise!!  The power of PHP is that it is cross-platform and runs
  everywhere!!  It runs on Linux, Windows 95/98/NT, Windows 2000,
  Solaris, HPUX and all flavors of unix.  PHP is write once and deploy
  anywhere and everywhere.  It runs on many web-servers like Apache,
  Microsoft IIS, etc..

  PHP runs 5 to 20 times faster than Java!! It is extremely easy to use
  and you can develop very complex web/e-commerce applications very
  rapidly in a very short period of time.

  It has object oriented features and takes the best features from Java,
  C++, PERL and "C" langauges. PHP language is a marriage of best
  features from Java, C++, PERL and C.

  PHP is the real gem of all the scripting/programming languges and will
  soon become the "MECCA" for programmers world-wide!!  PHP has a huge
  user base and a large developer base as it runs on both window95/NT
  and all flavors of unixes.

  PHP can be compiled and optimized to make it run even faster by using
  the Zend Optimizer. Zend optimizer is integrated with PHP in PHP
  version 4.0.

  You would normally use a combination of PHP (70% code) +
  HTML/DHTML/XML (25% code) + Javascript (5% code client side
  validations) for your e-commerce projects.

  2.  PHP Download


    PHP main site  <http://www.php.net>

    PHP resources  <http://ils.unc.edu/web-db/php/links.html>

    PHP Code Exchange -  <http://px.sklar.com>

  2.1.  PHP Installation

  See the installation guide and instructions at PHP main site
  <http://www.php.net> or INSTALL file in the downloaded package itself.

  3.  PHP Tutorial

  In this tutorial we assume that your server has support for PHP
  activated and that all files ending in .php3 are handled by PHP.

  Your first PHP-enabled page: Create a file named hello.php3 and in it
  put the following lines:



  ______________________________________________________________________
        <html>< head>< title >PHP Test< /title >< /head >
        < body>
        <?php echo "Hello World<P>"; ?>
        < /body>< /html>
  ______________________________________________________________________



  Note that this is not like a CGI script.  Think of it as a normal HTML
  file which happens to have a set of special tags available to you.

  If you tried this example and it didn't output anything, chances are
  that the server you are on does not have PHP enabled. Ask your
  administrator to enable it for you.

  The point of the example is to show the special PHP tag format. In
  this example we used < ?php to indicate the start of a PHP tag. Then
  we put the PHP statement and left PHP mode by adding the closing tag,
  ? > . You may jump in and out of PHP mode in an HTML file like this
  all you want.

  We are going to check what sort of browser the person viewing the page
  is using. In order to do that we check the user agent string that the
  browser sends as part of its request. This information is stored in a
  variable. Variables always start with a dollar-sign in PHP. The
  variable we are interested in is $HTTP_USER_AGENT.  To display this
  variable we can simply do:

  ______________________________________________________________________
        <?php echo $HTTP_USER_AGENT; ?>
  ______________________________________________________________________



  For the browser that you are using right now to view this page, this
  displays:

  Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)

  There are many other variables that are automatically set by your web
  server. You can get a complete list of them by creating a file that
  looks like this:

  ______________________________________________________________________
        <?php phpinfo()?>
  ______________________________________________________________________



  Then load up this file in your browser and you will see a page full of
  information about PHP along with a list of all the variables available
  to you.

  You can put multiple PHP statements inside a PHP tag and create little
  blocks of code that do more than just a single echo.

  ______________________________________________________________________
        <?php
        if(strstr($HTTP_USER_AGENT,"MSIE")) {
            echo "You are using Internet Explorer<br>";
        }
        ?>
  ______________________________________________________________________


  We can take this a step further and show how you can jump in and out
  of PHP mode even in the middle of a PHP block:


  ______________________________________________________________________
          <?php
          if(strstr($HTTP_USER_AGENT,"MSIE"))
          {
                  ?>
                  < center>< b>You are using Internet Explorer< /b>< /center>
                  <?
          }
          else
          {
                  ?>
                  < center>< b>You are not using Internet Explorer< /b>< /center>
                  <?
          }
          ?>
  ______________________________________________________________________


  Instead of using a PHP echo statement to output something, we jumped
  out of PHP mode and just sent straight HTML. The important and power
  ful point to note here is that the logical flow of the script remain
  intact. Only one of the HTML blocks will end up getting sent to the
  viewer. Running this script right now results in:

  You are using Internet Explorer

  Dealing with Forms

  One of the most powerful features of PHP is the way it handles HTML
  forms.  The basic concept that is important to understand is that any
  form element in a form will automatically result in a variable with
  the same name as the element being created on the target page. This
  probably sounds confusing, so here is a simple example. Assume you
  have a page with a form like this on it:

  ______________________________________________________________________
        <form action="action.php3" method="POST">
        Your name: <input type=text name=name>
        You age: <input type=text name=age>
        <input type=submit>
        < /form>
  ______________________________________________________________________


  There is nothing special about this form. It is a straight HTML form
  with no special tags of any kind. When the user fills in this form and
  hits the submit button, the action.php3 page is called. In this file
  you would have something like this:

  ______________________________________________________________________
        Hi <?php echo $name?>.  You are <?php echo $age?> years old.
  ______________________________________________________________________


  Surprise!! The $name and $age variables are automatically set for you
  by PHP !!

  4.  IDE tools for PHP

  Many HTML editors are supporting PHP :


    Blue Fish  <http://bluefish.linuxave.net>

    Coffee cup  <http://www.coffeecup.com/linux>

    Dreamweaver  <http://www.dreamweaver.com>

    Amaya  <http://www.w3.org/Amaya>

    Homesite  <http://www.homesite.com>

    Hotdog  <http://www.hotdog.com>

    Zend Optimizers  <http://www.zend.com>

    Zend Compilers  <http://www.zend.com>

     In near future every HTML editors and XML editor will be supporting
     PHP "Rapid Application Development" tool.

  5.  ctags for PHP ! Surprise!!!

  Tags are extremely valuable and are used for navigation of source code
  inside the editors like vi, emacs, CRiSP, NEdit etc... If you had
  programmed a lot in C, C++ or Java you might have used the ctags
  program to create tags.  To see the online manual page, type 'man
  ctags' at linux/unix bash prompt.

  The ptags program for PHP is given below, which you can use to create
  the tags for PHP source code. Your productivity will improve 3 to 4
  times if you use ptags.

  See also Vim color text editor for PHP, C, C++ at
  <http://metalab.unc.edu/LDP/HOWTO/Vim-HOWTO.html>



  ______________________________________________________________________
  // Save this file as ptags.cpp and compile by
  //              g++ -o ptags ptags.cpp
  //*****************************************************************
  // Copyright policy is GNU/GPL but additional request is
  // that you include author's name and email on all copies
  // Author : Al Dev Email: alavoor@yahoo.com
  // Usage : ptags *.php3 *.inc
  //                 This will generate a file called tags
  //*****************************************************************
  #include <iostream.h>
  #include <fstream>
  #include <stdio.h> // for sprintf
  #include <stdlib.h> // for system
  #include <string.h> // for memset
  #include <ctype.h> // for isspace

  #define BUFF_LEN  1024
  #define LOCATION  9

  char *ltrim(char *dd);
  char *rtrim(char *ee);

  main(int argc, char **argv)
  {
          if (argc < 2)
          {
                  cerr << "\nUsage: " << argv[0] << " file .... " << endl;
                  exit(0);
          }

          char fname[100] = "tag_file.out";
          FILE    *fpout;
          ofstream    fout(fname);
          if (fout.fail())
          {
                  cerr << "\nError opening file : " << fname << endl;
                  exit(-1);
          }
          //fpout = fopen(fname, "w");

          for (int ii = 1; ii < argc; ii++)
          {
                  /*
                  char buff[2024];

                  sprintf(buff, "\\rm -f %s; ls %s > %s 2>/dev/null", outfile, argv[1], outfile);
                  cout << "\nbuff = " << buff << endl;

                  system(buff);
                  fclose(fp);
                  */
                  FILE *fpin = NULL;
                  fpin = fopen(argv[ii], "r");
                  if (fpin == NULL)
                  {
                          cerr << "\nError opening file : " << argv[ii] << endl;
                          exit(-1);
                  }
                  char buff[BUFF_LEN + 100];
                  memset(buff, 0, BUFF_LEN +10);
                  for ( ; fgets(buff, BUFF_LEN, fpin) != NULL; )
                  {
                          char aa[BUFF_LEN + 100];
                          memset(aa, 0, BUFF_LEN +10);
                          strcpy(aa, buff);
                          ltrim(aa);

                          // Remove the trailing new line..
                          {
                                  int tmpii = strlen(aa);
                                  if (aa[tmpii-1] == '\n')
                                          aa[tmpii-1] = 0;
                          }
                          //cout << "aa is : " << aa << endl;
                          if (strncmp(aa, "function ", LOCATION) != 0)
                                  continue;
                          //cout << buff << endl;

                          // Example tags file output is like -
                          // al2  al.c    /^al2()$/;"   f
                          {
                                  char bb[BUFF_LEN + 100];
                                  memset(bb, 0, BUFF_LEN +10);
                                  strcpy(bb, & aa[LOCATION]);
                                  char *cc = bb;
                                  while (cc != NULL && *cc != '(')
                                          *cc++;
                                  *cc = 0;
                                  cc = rtrim(bb);
                                  //cout << "bb is : " << bb << endl;
                                  //cout << cc << "\t" << argv[ii] << "\t" << "/^" << aa << "$/;\"\tf" << endl;
                                  fout << cc << "\t" << argv[ii] << "\t" << "/^" << aa << "$/;\"\tf" << endl;
                                  //fprintf(fpout, "%s\t%s\t/^%s$/;\"f\n", cc, argv[ii], aa );
                          }

                          memset(buff, 0, BUFF_LEN +10);
                  }
                  fclose(fpin);
          }
          fout.flush();
          fout.close();
          //fclose(fpout);

          // Sort and generate the tag file
          {
                  char tmpaa[1024];
                  sprintf(tmpaa, "sort %s > tags; \\rm -f %s", fname, fname);
                  system(tmpaa);
          }
  }

  char *ltrim(char *dd)
  {
      if (dd == NULL)
          return NULL;

      while (isspace(*dd))
          dd++;

          return dd;
  }

  char *rtrim(char *ee)
  {
      if (ee == NULL)
          return NULL;

          int tmpii = strlen(ee) - 1;
          for (; tmpii >= 0 ; tmpii--)
          {
                  if (isspace(ee[tmpii]) )
                  {
                          //cout << "\nis a space!!" << endl;
                          ee[tmpii] = 0;
                  }
          }
          return ee;
  }
  ______________________________________________________________________



  6.  Debugging PHP

  To debug PHP programs create a file "debug2.inc" having the following
  functions :



  ______________________________________________________________________
  <?php

  /* define this variable, to prevent double declaration. */
  if (!defined("_DEBUG2_DEFINED_"))
  {
          define("_DEBUG2_DEFINED_", 1 );
  }
  else
          return; // if this file is already included then return

  # file name : debug2.inc
  # Functions for debuging the PHP source code
  #*****************************************************************
  # Copyright policy is GNU/GPL but additional request is
  # that you include author's name and email on all copies
  # Author : Al Dev Email: alavoor@yahoo.com
  #*****************************************************************

  # Usage of this functions -
  # In your source code put something like -
  # debug2_(__FILE__, __LINE__, "f_somevariable", $f_somevariable);
  # And this will generate output in debug.out file.

  //function debug2_($fname, $lname, $debug_var, $debug_value=0) {}

  // Give read, exec for all on directory /debug2_logs
  // chmod a+rwx /debug2_logs
  // But here you need to open the file in append mode.
  $fp_debug2 = fopen("/debug2_logs/debug.out", "a");
  if ($fp_debug2 == false)
  {
          print "<b>File open failed - global.var.inc<b>";
          exit;
  }

  function debug2_($fname, $lname, $debug_var, $debug_value=0)
  {
          global $fp_debug2;

          //print "<br> debug_value is : $debug_value <br>";
          if (!$debug_value)
          {
                  fwrite($fp_debug2, "\n ". $fname ."  ". $lname .": $debug_var");
          }
          else
          {
                  fwrite($fp_debug2, "\n ". $fname . " ". $lname .": $debug_var = $debug_value");
          }
          //print "<br> f_cookie is : $f_cookie <br>";
  }

  // In your first page, which is generally index.php3
  // truncate the debug2_logs file in beginning of code
  function init_debug_file()
  {
          global $fp_debug2;

          $fp_debug2 = fopen("/debug2_logs/debug.out", "w");
          if ($fp_debug2 == false)
          {
                  print "<b>File open failed - global.var.inc<b>";
                  exit;
          }
          system("chmod a+rwx /debug2_logs/debug.out");
  }
  ?>
  ______________________________________________________________________



  In your PHP source code initial page which is generally index.php3,
  put a line like

  ______________________________________________________________________
  <?php
          include ("debug2.inc");

          init_debug_file();
          // all other commands follows here ...
          // ...........
  ?>
  ______________________________________________________________________



  To output debug values, in your PHP source code files, put debug2_()
  calls as illustrated below:

  ______________________________________________________________________
  <?php
  include ("debug2.inc");
  debug2_(__FILE__, __LINE__, "f_somevariable", $f_somevariable);

  function aa()
  {
          $aa = 8;
          debug2_(__FILE__, __LINE__, "aa", $aa);
  }
  ?>
  ______________________________________________________________________



  When you run the PHP program the output will be traced in the file
  called debug.out giving the filename, linenumber, variable name and
  it's value.

  Use the debug2_() generously in your code. The usage of debug2_()
  calls in your program will NOT have any impact on the final production
  code and also has no impact on the performance because they will be
  filtered out as described below. You can use copy and paste to save
  time of typing debug2() calls or use the 'yank to buffer' feature of
  Vi editor and paste.

  When you are done development and testing and when you are ready to
  deploy on the production server, filter out the debug2_ calls from
  your source code. At unix prompt -

  ______________________________________________________________________
  bash$ mkdir production
  bash$ grep -v debug2_  filea.php3 > production/filea.php3
  ______________________________________________________________________


  For a large group of files -



  ______________________________________________________________________
  bash$ mkdir production
  bash$ ls *.php3 | while read ans
  do
          grep -v  debug2_ $ans > production/$ans
  done
  ______________________________________________________________________


  And now copy the files from production to the deployment area.

  7.  Limitations of PHP

  Everything has limitations or disadvantages and PHP is no exception.
  The following are the limitations of PHP (so be WARNED !!)

  1. PHP is NOT 100 % pure Object Oriented scripting language.  PHP is
     good if your PHP code size does not exceed 3,00,000 lines.
     Maintainence of PHP code greater than 1,00,000 lines becomes more
     difficult.

  2. PHP will NOT give the performance of "C" or "C++" language. Because
     it is scripting language and is interpreted it will be a bit slower
     than the optimized "C++" programs. For top performance, you should
     use "C++" and fast-CGI with database/webserver connection pooling
     and use C++ compiler optimizer "-O3" options.  Zend optimizer in
     PHP 4 will speed up the performance of PHP to certain extent.

  On the other hand, PHP has lot of advantages and it's advantages
  outweigh it's limitations -

  1. You can very rapidly develop web applications in PHP as compile and
     link is eliminated in PHP scripting language.

  2. PHP applications are very stable and do not depend on the browser
     technologies unlike Javascript applications which depend on
     browsers.  PHP will give you the freedom to select any server
     platform and browser does not know that the HTML page is generated
     by PHP!!

  3. PHP has excellent database conectivity to all SQL database servers.

  4. PHP has partial support for Object oriented features

  5. PHP has C++, Perl, Javascript like syntax features and has programs
     like

  6. PHP has Zend optimizer which speeds up the performance

  7. PHP runs on all unixes, linux, Windows 95/NT/2000 and is more
     powerful than ASP, JSP and others.

  8. PHP has a very large user base and developer base.

  WARNING:  If you want 100% pure Object Oriented scripting language
  than you MUST consider Python. The 'Python' is a object oriented
  scripting language from ground up. You would be using the Python Web
  Application server called 'Zope' which is available at -
  <http://www.zope.org> and python is at <http://www.python.org>

  8.  Related URLs

  Visit following locators which are related to C, C++ -

    Vim color text editor for C++, C
     <http://metalab.unc.edu/LDP/HOWTO/Vim-HOWTO.html>
    SQL database server for PHP PostgreSQL
     <http://metalab.unc.edu/LDP/HOWTO/PostgreSQL-HOWTO.html>

    Source code control system CVS HOWTO for C++ programs
     <http://metalab.unc.edu/LDP/HOWTO/CVS-HOWTO.html>

    Linux goodies main site  <http://www.aldev.8m.com>

    Linux goodies mirror site  <http://aldev.webjump.com>

  9.  Other Formats of this Document

  This document is published in 11 different formats namely - DVI,
  Postscript, Latex, Adobe Acrobat PDF, LyX, GNU-info, HTML, RTF(Rich
  Text Format), Plain-text, Unix man pages and SGML.

    You can get this HOWTO document as a single file tar ball in HTML,
     DVI, Postscript or SGML formats from -
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/>

    Plain text format is in:
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO>

    Translations to other languages like French, German, Spanish,
     Chinese, Japanese are in
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> Any help from you to
     translate to other languages is welcome.

     The document is written using a tool called "SGML-Tools" which can
     be got from - <http://www.sgmltools.org> Compiling the source you
     will get the following commands like

    sgml2html CVS-HOWTO.sgml     (to generate html file)

    sgml2rtf  CVS-HOWTO.sgml     (to generate RTF file)

    sgml2latex CVS-HOWTO.sgml    (to generate latex file)

  LaTeX documents may be converted into PDF files simply by producing a
  Postscript output using sgml2latex ( and dvips) and running the output
  through the Acrobat distill ( <http://www.adobe.com>) command as
  follows:

  ______________________________________________________________________
  bash$ man sgml2latex
  bash$ sgml2latex filename.sgml
  bash$ man dvips
  bash$ dvips -o filename.ps filename.dvi
  bash$ distill filename.ps
  bash$ man ghostscript
  bash$ man ps2pdf
  bash$ ps2pdf input.ps output.pdf
  bash$ acroread output.pdf &
  ______________________________________________________________________


  Or you can use Ghostscript command ps2pdf.  ps2pdf is a work-alike for
  nearly all the functionality of Adobe's Acrobat Distiller product: it
  converts PostScript files to Portable Document Format (PDF) files.
  ps2pdf is implemented as a very small command script (batch file) that
  invokes Ghostscript, selecting a special "output device" called
  pdfwrite. In order to use ps2pdf, the pdfwrite device must be included
  in the makefile when Ghostscript was compiled; see the documentation
  on building Ghostscript for details.


  This howto document is located at -

    <http://sunsite.unc.edu/LDP/HOWTO/CVS-HOWTO.html>

  Also you can find this document at the following mirrors sites -

    <http://www.caldera.com/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.WGS.com/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.cc.gatech.edu/linux/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.redhat.com/linux-info/ldp/HOWTO/CVS-HOWTO.html>

    Other mirror sites near you (network-address-wise) can be found at
     <http://sunsite.unc.edu/LDP/hmirrors.html> select a site and go to
     directory /LDP/HOWTO/CVS-HOWTO.html


  In order to view the document in dvi format, use the xdvi program. The
  xdvi program is located in tetex-xdvi*.rpm package in Redhat Linux
  which can be located through ControlPanel | Applications | Publishing
  | TeX menu buttons.  To read dvi document give the command -


               xdvi -geometry 80x90 howto.dvi
               man xdvi



  And resize the window with mouse.  To navigate use Arrow keys, Page
  Up, Page Down keys, also you can use 'f', 'd', 'u', 'c', 'l', 'r',
  'p', 'n' letter keys to move up, down, center, next page, previous
  page etc.  To turn off expert menu press 'x'.

  You can read postscript file using the program 'gv' (ghostview) or The
  ghostscript program is in ghostscript*.rpm package and gv program is
  in gv*.rpm package in Redhat Linux which can be located through
  ControlPanel | Applications | Graphics menu buttons. The gv program is
  much more user friendly than ghostscript.  Also ghostscript and gv are
  available on other platforms like OS/2, Windows 95 and NT, you view
  this document even on those platforms.


    Get ghostscript for Windows 95, OS/2, and for all OSes from
     <http://www.cs.wisc.edu/~ghost>

  To read postscript document give the command -


                       gv howto.ps
                       ghostscript howto.ps



  You can read HTML format document using Netscape Navigator, Microsoft
  Internet explorer, Redhat Baron Web browser or any of the 10 other web
  browsers.

  You can read the latex, LyX output using LyX a X-Windows front end to
  latex.



  10.  Copyright

  Copyright policy is GNU/GPL as per LDP (Linux Documentation project).
  LDP is a GNU/GPL project.  Additional requests are - Please retain the
  author's name, email address and this copyright notice on all the
  copies. If you make any changes or additions to this document then you
  please intimate all the authors of this document.

  11.  Appendix A Database Wrapper Example

  Submitted by: Barton Greg greg@createtech.com To get this file, in the
  web-browser, save this file as 'Text' type as pgsql.lib



  ______________________________________________________________________
  This  is  a  database   wrapper  for  PostgreSQL,  but
  can  be  simply  modified  for  any  other   database  type.


  <?php

  if ($dbObjDefined  !=  1)
  {
          $dbObjDefined  =  1;

          // Wrapper  class  for  database  calls
          class  dbObj
          {
                  // Connection  handle  to  database
                  var  $conn;

                  // Default  connection  parameters
                  var  $host  =  "YourSite.com";
                  var  $user  =  "johndoe";
                  var  $password  =  "pwd";
                  var  $port  =  "5432";
                  var  $dbname  =  "MyDB";

                  // Open  initial  connection.  $params  is
                  // an  associative  array  holding
                  // parameters  to  the  pg_Connect  function.
                  function  init($params)
                  {
                          if(isset($parame[host]))
                                  $host  =  $parame[host];
                          else
                                  $host  =  $this->host;

                          if(isset($parame[user]))
                                  $user  =  $parame[user];
                          else
                                  $user  =  $this->user;

                          if(isset($parame[password]))
                                  $password  =  $parame[password];
                          else
                                  $password  =  $this->password;

                          if(isset($parame[port]))
                                  $port  =  $parame[port];
                          else
                                  $port  =  $this->port;

                          if(isset($parame[dbname]))
                                  $dbname  =  $parame[dbname];
                          else
                                  $dbname  =  $this->dbname;

                          $this->conn  =  pg_Connect ( "  host=$host  user=$user  password=$password  port=$port  dbname=$dbname ");
                  }

                  // Send  SQL  to  database  connection.
                  // Return  recordset  object  on  success.
                  // Return  0  on  failure.
                  function  exec($SQL)
                  {
                          $this->resultset  =  pg_Exec($this->conn,  $SQL);

                          if  ($this->resultset)
                          {
                                  $recset  =  new  recordset;
                                  $recset->init($this->resultset);
                                  return  $recset;
                          }
                          else
                          {
                                  return  0;
                          }
                  }

                  function valid()
                  {
                          return $this->resultset;
                  }

                  // Close  connection  to  database
                  function  free()
                  {
                          pg_close($this->conn);
                  }
          };

          /*
          ** This  is  a  simple  recordset  class  which  can  be
          ** traversed  using  next(),  prev(),  and  current()  methods.
          ** It  is  initialized  from  a  resultset  returned  from  the
          ** function  "pg_Exec"  or  can  be  generated  by  a  call  to  the
          ** exec  method  from  the  dbObj class given above.
          ** Below "Tuples" means rows.
          */
          class  recordset
          {
                  var  $resultset;
                  var  $index;
                  var  $numFields;
                  var  $numTuples;

                  function  init($newResultset)
                  {
                          $this->resultset  =  $newResultset;
                          $this->index  =  0;
                          $this->numFields  =  pg_NumFields($this->resultset);
                          $this->numTuples  =  pg_NumRows($this->resultset);
                  }

                  // Used in display() below
                  function valid()
                  {
                          return $this->resultset;
                  }

                  // Get  a  value  by  row  number  and  either
                  // column  name  or  column  number
                  function  getVal($row,  $col)
                  {
                          return  pg_Result($this->resultset,  $row,  $col);
                  }

                  // Return  an  array  of  field  names
                  function  getFields()
                  {
                          for ($i=0;  $i < $this->numFields;  $i++)
                                  $retArray[] = pg_FieldName($this->resultset,  $i);
                          return  $retArray;
                  }

                  // Get  number  of  columns  in  resultset
                  function  getNumFields()
                  {
                          return  $this->numFields;
                  }

                  // Get  a  tuple  (associative  array  of
                  // column  values)  by  row  number
                  function  getTupleDirect($row)
                  {
                          for ($i=0;  $i < $this->numFields;  $i++)
                          {
                                  $retArray[pg_FieldName($this->resultset,  $i)]  =
                                          pg_Result($this->resultset,  $row,  $i);
                          }
                          return  $retArray;
                  }

                  // Get  an  array  filled  with  all  values  in  a  column
                  // (using  either  column  name  or  column  number)
                  function  getColumn($col)
                  {
                          for ($i=0; $i < $this->numTuples; $i++)
                                  $retArray[]  =  pg_Result($this->resultset,  $i,  $col);
                          return  $retArray;
                  }

                  // Return  the  number  of  records  in  the  recordset
                  function  getNumTuples()
                  {
                          return  $this->numTuples;
                  }

                  // Get  tuple  pointed  to  by  the  current  index
                  function  getTuple()
                  {
                          if ($this->index >= 0  &&  $this->index  <  $this->numTuples)
                                  return  $this->getTupleDirect($this->index);
                          else
                                  return  0;
                  }

                  function valueof($col)
                  {
                          if ($col < $this->numFields)
                          {
                                  return pg_Result($this->resultset,  $this->index,  $col);
                          }
                          else
                          {
                                  return "";
                          }
                  }

                  // Reached last row - end of rows ? Used in display() below
                  function eof()
                  {
                          return $this->index == $this->numTuples;
                  }

                  // Return  1  if  index  is  within  bounds  of  the  recordset
                  function  current()
                  {
                          if ($this->index >= 0  &&  $this->index  <  $this->numTuples)
                                  return  1;
                          else
                                  return  0;
                  }

                  // Increment  index. Used in display() below
                  function  next()
                  {
                          if ($this->index < $this->numTuples)
                          {
                                  $this->index++;
                                  return  1;
                          }
                          else
                          {
                                  return  0;
                          }
                  }

                  // Decrement  index
                  function  prev()
                  {
                          if ($this->index  >=  0)
                          {
                                  $this->index--;
                                  return  1;
                          }
                          else
                          {
                                  return  0;
                          }
                  }

                  // Reset  index  to  0 - See also first()
                  function  reset()
                  {
                          $this->index  =  0;
                  }

                  // See also reset(). Used in display() below
                  function  first()
                  {
                          $this->index  =  0;
                  }

                  function last()
                  {
                          $this->index = $this->numTuples -1 ;
                  }

                  // Used in display() below
                  function showheader($col, $fmt = "")
                  {
                          printf("\t< th %s>%s< /th >\n", $fmt,
                          is_string($col) ? $col : pg_fieldname($this->resultset, $col));
                  }

                  // Used in display() below
                  function showvalue($col, $fmt =  "", $def =  " ")
                  {
                          $v = $this->valueof($col);
                          printf( "\t< td %s>%s< /td>\n", $fmt, $v ==  "" ? $def : $v);
                  }

                  function showurl($col, $fmt =  "")
                  {
                          $v = $this->valueof($col);
                          if ( $v !=  "" )
                          {
                                  printf("\t< td %s> < /td>\n", $fmt);
                          }
                          else
                          {
                                  printf( "\t< td %s>< a href=%s>%s< /a>< /td>\n", $fmt, $v, $v);
                          }
                  }

                  function display()
                  {
                          if (!$this->valid() )
                          {
                                  return;
                          }

                          printf( "<table cellspacing=1 cellpadding=1 border=1>\n");

                          printf( "<tr>\n");
                          for ($c = 0; $c < $this->cols; $c++ )
                          {
                                  $this->showheader($c);
                          }
                          printf( "< /tr>\n");

                          $this->first();
                          while (!$this->eof())
                          {
                                  printf( "<tr>\n");

                                  for ($c = 0; $c < $this->cols; $c++)
                                  {
                                          $this->showvalue($c);
                                  }

                                  printf( "< /tr>\n");
                                  $this->next();
                          }
                          printf("< /table\n");
                  }

                  // Free  memory  allocated  to  recordset.
                  function  free()
                  {
                          pg_Freeresult($this->resultset);
                  }
          };
  }

  ?>
  ______________________________________________________________________



  12.  Appendix B SQL abstraction Example

  Submitted by: Gianugo Rabellino nemorino@opera.it To get this file, in
  the web-browser, save this file as 'Text' type as sqlabst.lib



  ______________________________________________________________________

  PX: PHP Code Exchange
  <?php

  /*
  *    SAL - SQL Abstraction Library
  *           version 0.01
  */

  /*
  ** Set the variable $dbtype to any of the following
  ** values: MySQL, mSQL, Postgres, ODBC before including this library
  */
  // $dbtype = "MySQL";
  // $dbtype = "mSQL";
  // $dbtype = "PostgreSQL";
  // $dbtype = "ODBC";

  // SQL_connect($host, $user, $password, $db)
  // returns the connection ID

  function SQL_connect($host, $user, $password, $db)
  {
          global $dbtype;

          switch ($dbtype)
          {
                  case  "MySQL":
                          $conn=mysql_pconnect($host, $user, $password);
                          mysql_select_db($db);
                          return $conn;
                          break;;

                  case  "mSQL":
                          $conn=msql_pconnect($host);
                          msql_select_db($db);
                          return $conn;
                          break;;

                  case  "PostgreSQL":
                          $conn=pg_pconnect($host, "5432", "",$db);
                          return $conn;
                          break;;

                  case  "ODBC":
                          $conn=odbc_pconnect($db,$user,$password);
                          return $conn;
                          break;;

                  default:
                          $conn=mysql_pconnect($host, $user, $password);
                          mysql_select_db($db);
                          return $conn;
                          break;;
          }
  }

  // SQL_query($host, $user, $password, $db)
  // executes an SQL statement, returns a result identifier
  function SQL_query($query, $id)
  {
          global $dbtype;
          switch ($dbtype)
          {
                  case  "MySQL":
                          $res=mysql_query($query, $id);
                          return $res;
                          break;;

                  case  "mSQL":
                          $res=msql_query($query, $id);
                          return $res;
                          break;;

                  case  "PostgreSQL":
                          $res=pg_exec($id,$query);
                          return $res;
                          break;;

                  case  "ODBC":
                          $rid=odbc_prepare($id,$query);
                          $res=odbc_execute($rid);
                          return $res;
                          break;;

                  default:
                          $res=mysql_query($query, $id);
                          return $res;
                          break;;
          }
  }

  // SQL_num_rows($host, $user, $password, $db)
  // given a result identifier, returns the number of affected rows
  function SQL_num_rows($res)
  {
          global $dbtype;

          switch ($dbtype)
          {
                  case  "MySQL":
                          $rows=mysql_num_rows($res);
                          return $rows;
                          break;;

                  case  "mSQL":
                          $rows=msql_num_rows($res);
                          return $rows;
                          break;;

                  case  "PostgreSQL":
                          $rows=pg_numrows($res);
                          return $rows;
                          break;;

                  case  "ODBC":
                          $rows=odbc_num_rows($res);
                          return $rows;
                          break;;

                  default:
                          $rows=mysql_num_rows($res);
                          return $rows;
                          break;;
          }
  }


  // SQL_fetchrow($res,$row)
  // given a result identifier, returns an array with the resulting row
  // Needs also a row number for compatibility with PostgreSQL
  function SQL_fetch_row($res, $nr)
  {
          global $dbtype;

          switch ($dbtype)
          {
                  case  "MySQL":
                          $row = array();
                          $row = mysql_fetch_row($res);
                          return $row;
                          break;;

                  case  "mSQL":
                          $row = array();
                          $row = msql_fetch_row($res);
                          return $row;
                          break;;

                  case  "PostgreSQL":
                          $row = array();
                          $row = pg_fetch_row($res,$nr);
                          return $row;
                          break;;

                  case  "ODBC":
                          $row = array();
                          $cols = odbc_fetch_into($res, $nr, &$row);
                          return $row;
                          break;;

                  default:
                          $row = array();
                          $row = mysql_fetch_row($res);
                          return $row;
                          break;;
          }
  }

  // SQL_fetch_array($res,$row)
  // given a result identifier, returns an associative array
  // with the resulting row using field names as keys.
  // Needs also a row number for compatibility with PostgreSQL.
  function SQL_fetch_array($res, $nr)
  {
          global $dbtype;

          switch ($dbtype)
          {
                  case  "MySQL":
                          $row = array();
                          $row = mysql_fetch_array($res);
                          return $row;
                          break;;

                  case  "mSQL":
                          $row = array();
                          $row = msql_fetch_array($res);
                          return $row;
                          break;;

                  case  "PostgreSQL":
                          $row = array();
                          $row = pg_fetch_array($res,$nr);
                          return $row;
                          break;;

                  /*
                  * ODBC doesn't have a native _fetch_array(), so we have to
                  * use a trick. Beware: this might cause HUGE loads!
                  */

                  case  "ODBC":
                          $row = array();
                          $result = array();
                          $result = odbc_fetch_row($res, $nr);
                          $nf = count($result)+2;  /* Field numbering starts at 1 */
                          for ($count=1; $count < $nf; $count++)
                          {
                                  $field_name = odbc_field_name($res, $count);
                                  $field_value = odbc_result($res, $field_name);
                                  $row[$field_name] = $field_value;
                          }
                          return $row;
                          break;;
          }
  }
  ______________________________________________________________________



  13.  Appendix C PostgreSQL large object Example

  Submitted by: PHP code exchange px@sklar.com To get this file, in the
  web-browser, save this file as 'Text' type as pgsql_largeobj.lib

  ______________________________________________________________________

  PX: PHP Code Exchange - PostgreSQL large object access

  <?
          $database = pg_Connect ( "",  "",  "",  "",  "jacarta");
          pg_exec ($database,  "BEGIN");
          $oid = pg_locreate ($database);
          echo ( "$oid\n");
          $handle = pg_loopen ($database, $oid,  "w");
          echo ( "$handle\n");
          pg_lowrite ($handle,  "foo");
          pg_loclose ($handle);
          pg_exec ($database,  "COMMIT");
          pg_close ($database);
  ?>
  ______________________________________________________________________



  14.  Appendix D User authentication Example

  To get this file, in the web-browser, save this file as 'Text' type as
  user_pw.lib

  From the PHP 3 Manual: Works only if PHP is an Apache module.  Instead
  of simply printing out the $PHP_AUTH_USER and $PHP_AUTH_PW, you would
  probably want to check the username and password for validity. Perhaps
  by sending a query to a database, or by looking up the user in a dbm
  file.



  ______________________________________________________________________
  <?php
          if (!$PHP_AUTH_USER)
          {
                  Header("WWW-authenticate: basic realm=\"My Realm\"");
                  Header("HTTP/1.0 401 Unauthorized");
                  echo "Text to send if user hits Cancel button\n";
                  exit;
          }
          else
          {
                  echo "Hello $PHP_AUTH_USER.<P>";
                  echo "You entered $PHP_AUTH_PW as your password.<P>";
          }
  ?>
  ______________________________________________________________________



  15.  Appendix E Network admin Example

  To get this file, in the web-browser, save this file as 'Text' type as
  network.lib

  PHP: network adminstrator's best friend from
  <http://www.phpWizard.net>

  As a web-developer, you're probably used to such lovely tools as ping,
  whois, nslookup etc. But what when you need one of those utilities at
  a client's office and have no access to telnet? Good guess. Time to
  look up the functions in the "Network" section of the PHP manual.

  Socket operations:

  The most important function there is fsockopen(). Using this function,
  you can connect to any open port on a server and establish a socket
  connection with it. The function's syntax is as following:

  ______________________________________________________________________
          int fsockopen(string hostname, int port, int [errno], string [errstr]);
  ______________________________________________________________________


  The first two arguments are obvious, the next two are optional and
  used for error handling. The "errno" and "errstr" should be passed by
  reference.  "Passing by reference" means that the original variable
  will get modified. Normally, the content of a variable passed to a
  function wouldn't be modified.

  So, you could use this function to open a connection to a webserver
  and print out the headers:



  ______________________________________________________________________
  function get_headers($host, $path = "/")
  {
          $fp = fsockopen ("$host", 80, &$errnr, &$errstr) or die("$errno: $errstr");
          fputs($fp,"GET $path HTTP/1.0\n\n");
          while (!$end)
          {
                  $line = fgets($fp, 2048);
                  if (trim($line) == "")
                          $end = true;
                  else
                          echo $line;
          }
          fclose($fp);
  }
  ______________________________________________________________________


  In this example you see that you can apply any file operations (fread,
  fwrite etc) to the the pointer you got using the fsockopen() call.
  Note that the example realizes a HTTP/1.0 client - it won't work with
  name-based virtual hosts.

  Finger: Naturally, you can also open connections to other ports.
  Writing a small finger client with PHP is trivial therefore. Let's
  change the example from above to query a finger daemon:

  ______________________________________________________________________
  function finger ($host, $user)
  {
          $fp = fsockopen($host, 79, &$errno, &$errstr) or die("$errno: $errstr");
          fputs($fp, "$user\n");
          while (!feof($fp))
                  echo fgets($fp, 128);
          fclose($fp);
  }
  ______________________________________________________________________



  Whois: Querying a whois server uses the same concept:

  ______________________________________________________________________
  // domain is like "phpwizard.net"
  function whois($domain, $server="whois.internic.net")
  {
          $fp = fsockopen ($server, 43, &$errnr, &$errstr) or die("$errno: $errstr");
          fputs($fp, "$domain\n");
          while (!feof($fp))
                  echo fgets($fp, 2048);
          fclose($fp);
  }
  ______________________________________________________________________



  Blocking and non-blocking operations: But there's a problem with all
  those functions. They work fine if

  1. You have a conenction with low latency and

  2. If the server you're connecting to is up and running. If not, your
     script will be busy until it times out. The reason for this is that
     default socket connections are blocking and don't time out. You can
     avoid these "hanging scripts" by switching to non-blocking socket
     operations. The function set_socket_blocking() does just that: it
     set all operations on a socket (first parameter: socket pointer) to
     either blocking (second parameter: true) or false (second
     parameter: false). Using non-blocking operations, the finger
     function would like like this:


  ______________________________________________________________________
          $fp = fsockopen($host, 79, &$errno, &$errstr) or die("$errno: [ ] $errstr");
          set_socket_blocking($fp, 0);
          fputs($fp, "$user\n");

          $stop = time() + $timeout;
          while (!feof($fp) && time() < $stop )
                  echo fgets($fp, 128);
          fclose($fp);
  ______________________________________________________________________


  Modifying these 3 functions to use non-blocking socket calls is left
  as an exercise for you.

  16.  Appendix F PostgreSQL Database Wrapper Examples

  Submitted by: Joe Thong darkjoe@softhome.net Site URL:
  <http://phpdb.linuxbox.com>

  Description:  A PHP database wrapper for various database servers with
  a powerful Recordset for result data manipulation.  Database results
  are flushed automatically by phpDB.

  To get this file, in the web-browser, save this file as 'Text' type as
  phpDB-postgresql.lib



  ______________________________________________________________________
  <?php
  /*
  Name: phpDB PostgreSQL module
  Version: 1.02bR6
  Description: A PHP database wrapper for various database
          servers with a powerful recordset for result data
          manipulation.  Database results are flushed
          automatically by phpDB.
  */

  /* define this module, to prevent double class declaration.     */
  if (!defined("_PHPDB_ABSTRACT_LAYER")) {
          define("_PHPDB_ABSTRACT_LAYER", 1 );
  }
  else
          return;

  //---------------------------------------
           Class Name: phpDB
  //---------------------------------------
  class phpDB
  {
          /*      public variables        */
          var $version = '1.02bR6'; // Version number of phpDB
          // This variable keeps what database type is going to
          // be used.  Current supported database server are
          // MySQL, MSQL, SQL Server, and Sybase
          var $databaseType = '';
          // Specifies which database is going to be used
          var $databaseName = '';
          // The hostname of the database server, port
          // number is optional.  e.g: "db.devNation.com"
          var $hostname = '';
          var $username = ''; // used to connect to the database server
          var $password = ''; // Password for the username

          // Private variables ------ starts with underscore
          // An array of executed querys. For results cleanup purposes.
          var $_queryIDList = array();
          // The returned link identifier whenever a
          // successful database connection is made
          var $_connectionID      = -1;
          // A variable which was used to keep the returned
          // last error message.  The value will then returned
          // by the errorMsg() function
          var $_errorMsg = '';

          // This variable keeps the last created result
          // link identifier
          var $_queryID = -1;
          // A boolean variable to state whether its a persistent
          // connection or normal connection
          var     $_isPersistentConnection = false;
          // Holds the newly created result object,
          // returned via the execute() method
          var $_tempResultObj = '';

          // A constructor function for the phpDB object.
          // When initializing, specify the dbType i.e: "mysql",
          // "msql", "postgresql", "mssql", and "sybase"
          function phpDB($dbType = "postgresql")
          {
                  switch ($dbType) {
                          case "mysql":
                          case "msql":
                          case "postgresql":
                          case "mssql":
                          case "sybase":
                          case "informix":
                                  $this->databaseType = $dbType;
                                  break;
                          default:
                                  return false;
                  }
          }

          // Returns: A positive link identifier on success, or
          // false on error.      Connect to the server with the provided
          // arguments. The connection to the server will be closed
          // when the script terminates, unless close() function is
          // called beforehand
          function connect($argHostname = "", $argUsername = "",
                  $argPassword = "", $argDatabaseName = "")
          {
                  $connString = "";
                  $hostPieces = array();
                  /*      Must specify the database argument      */
                  if (!$argDatabaseName) {
                          return false;
                  }
                  if ($argHostname != "") {
                          $this->hostname = $argHostname;
                  }
                  if ($argUsername != "") {
                          $this->username = $argUsername;
                  }
                  if ($argPassword != "") {
                          $this->password = $argPassword;
                  }
                  if ($argDatabaseName != "") {
                          $this->databaseName = $argDatabaseName;
                  }
                  $hostPieces = split(":", $this->hostname);
                  if ($hostPieces[0]) {
                          $connString .= "host=$hostPieces[0]";
                          if (isset($hostPieces[1])) {
                                  $connString .= " port=$hostPieces[1]";
                          }
                  }
              if ($this->username) {
                          $connString .= " user=$this->username";
                  }
              if ($this->password) {
                          $connString .= " password=$this->password";
                  }
                  $connString .= " dbname=$this->databaseName";

                  $this->_connectionID = @pg_Connect($connString);
                  return $this->_connectionID;
          }

          // Returns: A positive link identifier on success, or
          // false on error.  Connect to the server with the
          // provided arguments. The connection to the server will
          // not be closed when the script terminates. Instead it
          // will be kept for later future use
          function pconnect($argHostname = "", $argUsername = "",
                  $argPassword = "", $argDatabaseName = "")
          {
                  $connString = "";
                  $hostPieces = array();
                  /*      Must specify the database argument      */
                  if (!$argDatabaseName) {
                          return false;
                  }
                  if ($argHostname != "") {
                          $this->hostname = $argHostname;
                  }
                  if ($argUsername != "") {
                          $this->username = $argUsername;
                  }
                  if ($argPassword != "") {
                          $this->password = $argPassword;
                  }
                  if ($argDatabaseName != "") {
                          $this->databaseName = $argDatabaseName;
                  }
                  $hostPieces = split(":", $this->hostname);
                  if ($hostPieces[0]) {
                          $connString .= "host=$hostPieces[0]";
                          if (isset($hostPieces[1])) {
                                  $connString .= " port=$hostPieces[1]";
                          }
                  }
              if ($this->username) {
                          $connString .= " user=$this->username";
                  }
              if ($this->password) {
                          $connString .= " password=$this->password";
                  }
                  $connString .= " dbname=$this->databaseName";

                  $this->_connectionID = @pg_pConnect($connString);
                  if ($this->_connectionID) {
                          $this->_isPersistentConnection = true;
                  }
                  return $this->_connectionID;
          }

          // Returns: true on success, false on error Select
          // the database name to be used PostgreSQL
          // Note:        function Not available
          function selectDB($dbName) {
                          return false;
          }

          // Returns: the Recordset object disregard success
          // or failure Send the sql statement to the database server
          function execute($sql = "") {
                  // Instantiate an object without considering whether
                  // the query return any results or not
                  $this->_queryID = @pg_Exec($this->_connectionID, $sql);
                  $this->_tempResultObj = new Recordset($this->_queryID);
                  $this->_insertQuery($this->_queryID);
                  return $this->_tempResultObj;
          }

          // Returns: the last error message from previous
          // database operation
          function errorMsg() {
                  $this->_errorMsg = @pg_errormessage($this->_connectionID);
              return $this->_errorMsg;
          }

          // Returns: true on success, false on failure
          // Close the database connection
          function close() {
                  if ($this->_queryIDList && sizeof($this->_queryIDList > 0)) {
                          while(list($_key, $_resultID) = each($this->_queryIDList)) {
                                  @pg_freeresult($_resultID);
                          }
                  }
                  // If its not a persistent connection, then
                  // only the connection needs to be closed
                  if ($this->_isPersistentConnection != true) {
                          return @pg_close($this->_connectionID);
                  }
                  else {
                          return true;
                  }
          }

          // A PRIVATE function used by the constructor function
          // of the query object.  insert the successful returned
          // query id to the query id list.  Used for later results
          // cleanup.  A private function that's never meant to
          // be used directly
          function _insertQuery($query_id) {
                  $this->_queryIDList[] = $query_id;
          }
  }

  //------------------------------
           Class Name: Recordset
  //------------------------------
  class Recordset
  {
          /*      public variables        */
          var $fields;
          // indicates that the current record position is before
          // the first record in a Recordset object
          var $BOF = null;

          // indicates that the current record position is after
          // the last record in a Recordset object
          var $EOF = null;

          /*      private variables       */
          var $_numOfRows = -1; // NEVER change the value! READ-ONLY!
          var $_numOfFields = -1; // NEVER change the value! READ-ONLY!
          // Holds anything that was returned from the database specific functions
          var $_tempResult = '';
          // This variable keeps the result link identifier
          var $_queryID = -1;
          // This variable keeps the current row in the Recordset
          var $_currentRow = -1;

          // Returns: query id on success and false if
          // failed Constructor function
          function Recordset($queryID)
          {
                  $this->_queryID = $queryID;
                  if ($queryID) {
                          $this->_numOfRows = @pg_numrows($this->_queryID);
                          /*      pg_numrows() returns -1 on error        */
                          if ($this->_numOfRows == -1) {
                                  $this->_numOfRows = 0;
                          }
                          $this->_numOfFields = @pg_numfields($this->_queryID);
                          /*      pg_numfields() returns -1 on error      */
                          if ($this->_numOfFields == -1) {
                                  $this->_numOfFields = 0;
                          }
                  }
                  else {
                          $this->_numOfRows = 0;
                          $this->_numOfFields = 0;
                  }
                  /*      If result set contains rows     */
                  if ($this->_numOfRows > 0 && $this->_currentRow == -1) {
                          $this->_currentRow = 0;
                          $this->fields = @pg_fetch_array($this->_queryID, $this->_currentRow);
                          $this->EOF = false;
                          $this->BOF = false;
                  }
                  return $this->_queryID;
          }

          // Returns: true if successful, false if fail Set the Recordset
          // pointer to a specified field offset. If the next call to
          // fetchField() won't include a field offset, this field would
          // be returned.  PostgreSQL Note:       function Not available
          function fieldSeek($fieldOffset = -1) {
                  $this->_tempResult = false;
                  return $this->_tempResult;
          }

          // Returns: an object containing field information.  Get column
          // information in the Recordset object. fetchField() can be used
          // in order to obtain information about fields in a certain query
          // result. If the field offset isn't specified, the next field
          // that wasn't yet retrieved by fetchField() is retrieved.
          // PostgreSQL Note:     function Not available
          function fetchField($fieldOffset = -1) {
                  $this->_tempResult = false;
                  return $this->_tempResult;
          }

          // Returns: true if there still rows available, or false if there
          // are no more rows.  Moves to the next row in a specified Recordset
          // object and makes that record the current row and the data
          // corresponding to the row will be retrieved into the fields
          // collection.  Note: Unlike the moveRow() method, when _currentRow
          // is getNumOfRows() - 1, EOF will immediately be true.  If row number
          // is not provided, the function will point to the
          // first row automatically
          function nextRow() {
                  if ($this->getNumOfRows() > 0) {
                          $this->fields = array();
                          $this->_currentRow++;
                          $this->fields = @pg_fetch_array($this->_queryID, $this->_currentRow);
                          /*      This is not working.  True all the time */
                          if ($this->fields) {
                                  $this->_checkAndChangeEOF($this->_currentRow - 1);
                                  return true;
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // Returns: true on success, false on failure moveRow() moves
          // the internal row pointer of the Recordset object to point
          // to the specified row number and the data corresponding to
          // the row will be retrieved into the fields collection.  If
          // row number is not provided, the function will point to
          // the first row automatically
          function moveRow($rowNumber = 0) {
                  if ($rowNumber == 0) {
                          return $this->firstRow();
                  }
                  else if ($rowNumber == ($this->getNumOfRows() - 1)) {
                          return $this->lastRow();
                  }
                  if ($this->getNumOfRows() > 0 && $rowNumber < $this->getNumOfRows()) {
                          $this->fields = null;
                          $this->_currentRow = $rowNumber;
                          $this->fields = @pg_fetch_array($this->_queryID, $this->_currentRow);
                          /*      This is not working.  True all the time */
                          if ($this->fields) {
                                  // No need to call _checkAndChangeEOF() because
                                  // the possibility of moving to the last row
                                  // has been handled by the above code
                                  $this->EOF = false;
                                  return true;
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // Returns: true on success, false on failure firstRow()
          // moves the internal row pointer of the Recordset object
          // to the first row and the data corresponding to the row
          // will be retrieved into the fields collection
          function firstRow() {
                  if ($this->getNumOfRows() > 0) {
                          $this->fields = array();
                          $this->_currentRow = 0;
                          $this->fields = @pg_fetch_array($this->_queryID, $this->_currentRow);
                          $this->EOF = true;
                          /*      This is not working.  True all the time */
                          if ($this->fields) {
                                  return true;
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // Returns: true on success, false on failure lastRow()
          // moves the internal row pointer of the Recordset object
          // to the last row and the data corresponding to the row
          // will be retrieved into the fields collection
          function lastRow() {
                  if ($this->getNumOfRows() > 0) {
                          $this->fields = array();
                          $num_of_rows = $this->getNumOfRows();
                          /*      $num_of_rows decemented at above        */
                          $this->_currentRow = --$num_of_rows;
                          $this->fields = @pg_fetch_array($this->_queryID, $this->_currentRow);
                          /*      This is not working.  True all the time */
                          if ($this->fields) {
                                  /*      Special case for making EOF false.      */
                                  $this->EOF = false;
                                  return true;
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // close() only needs to be called if you are worried about
          // using too much memory while your script is running. All
          // associated result memory for the specified result identifier
          // will automatically be freed
          function close() {
                  $this->_tempResult = @pg_freeresult($this->_queryID);
                  return $this->_tempResult;
          }

          // Returns: the number of rows in a result set.
          // Get number of rows in result
          function getNumOfRows() {
                  return $this->_numOfRows;
          }

          // Returns: the number of fields in a result set.
          // Get number of fields in result
          function getNumOfFields() {
                  return $this->_numOfFields;
          }

          /*      Check and change the status of EOF.     */
          function _checkAndChangeEOF($currentRow) {
                  if ($currentRow >= ($this->_numOfRows - 1)) {
                          $this->EOF = true;
                  }
                  else {
                          $this->EOF = false;
                  }
          }
  }
  ?>
  ______________________________________________________________________



  17.  Appendix G Microsoft SQL Server DB Wrapper Example

  Submitted by: Joe Thong darkjoe@softhome.net Site URL:
  <http://phpdb.linuxbox.com>

  Description:  A PHP database wrapper for various database servers with
  a powerful Recordset for result data manipulation.  Database results
  are flushed automatically by phpDB.

  To get this file, in the web-browser, save this file as 'Text' type as
  phpDB-mssql.lib



  ______________________________________________________________________
  <?php
  /*
  Name: phpDB Microsoft SQL Server module
  Version: 1.02bR6
  Description: A PHP database wrapper for various
          database servers with a powerful
          Recordset for result data manipulation.  Database
          results are flushed automatically by phpDB.
  */
  // Define this module, to prevent double class declaration
  if (!defined("_PHPDB_ABSTRACT_LAYER"))
  {
          define("_PHPDB_ABSTRACT_LAYER", 1 );
  }
  else
          return;

  //------------------------------
           Class Name: phpDB
  //------------------------------
  class phpDB
  {
          // public variables
          var $version = '1.02bR6'; // Version number of phpDB

          // This variable keeps what database type is going
          // to be used.  Current supported database server
          // are MySQL, MSQL, SQL Server, PostgreSQL and Sybase
          var $databaseType = '';
          var $databaseName = ''; // Specifies which database is going to be used

          // The hostname of the database server, port
          // number is optional.  e.g: "db.devNation.com"
          var $hostname = '';

          var $username = ''; // to connect to the database server
          var $password = '';     // Password for the username

          // Private variables ----- starts with underscore

          // An array of executed querys. For results cleanup purposes
          var $_queryIDList = array();

          // The returned link identifier whenever a
          // successful database connection is made
          var $_connectionID      = -1;

          // A variable which was used to keep the returned last
          // error message.  The value will then returned
          // by the errorMsg() function
          var $_errorMsg = '';
          // This variable keeps the last created result link identifier
          var $_queryID = -1;

          // A boolean variable to state whether its a
          // persistent connection or normal connection
          var     $_isPersistentConnection = false;

          // Holds the newly created result object, returned
          // via the execute() method
          var $_tempResultObj = '';

          //      A constructor function for the phpDB object.
          // When initializing, specify the dbType i.e: "mysql",
          // "msql", "postgresql", "mssql", and "sybase"
          function phpDB($dbType = "mssql")
          {
                  switch ($dbType)
                  {
                          case "mysql":
                          case "msql":
                          case "postgresql":
                          case "mssql":
                          case "sybase":
                          case "informix":
                                  $this->databaseType = $dbType;
                                  break;
                          default:
                                  return false;
                  }
          }

          // Returns: A positive link identifier on success,
          // or false on error.   Connect to the server with
          // the provided arguments. The connection to the server
          // will be closed when the script terminates, unless
          // close() function is called beforehand.
          function connect($argHostname = "", $argUsername = "",
                  $argPassword = "", $argDatabaseName = "")
          {
                  $boolDBSelected;
                  if ($argHostname != "") {
                          $this->hostname = $argHostname;
                  }
                  if ($argUsername != "") {
                          $this->username = $argUsername;
                  }
                  if ($argPassword != "") {
                          $this->password = $argPassword;
                  }
                  if ($argDatabaseName != "") {
                          $this->databaseName = $argDatabaseName;
                  }

                  $this->_connectionID = @mssql_connect($this->hostname, $this->username, $this->password);

                  if ($this->databaseName && $this->_connectionID) {
                          $boolDBSelected = @mssql_select_db($this->databaseName);
                          if(!$boolDBSelected) {  /*      If DB selection fails   */
                                  @mssql_close($this->_connectionID);     /*      Close the current connection    */
                                  return false;
                          }
                  }
                  return $this->_connectionID;
          }

          // Returns: A positive link identifier on success, or
          // false on error Connect to the server with the provided
          // arguments. The connection to the server will not be closed
          // when the script terminates. Instead it will be kept for
          // later future use
          function pconnect($argHostname = "", $argUsername = "",
                  $argPassword = "", $argDatabaseName = "")
          {
                  $boolDBSelected;
                  if ($argHostname != "") {
                          $this->hostname = $argHostname;
                  }
                  if ($argUsername != "") {
                          $this->username = $argUsername;
                  }
                  if ($argPassword != "") {
                          $this->password = $argPassword;
                  }
                  if ($argDatabaseName != "") {
                          $this->databaseName = $argDatabaseName;
                  }

                  $this->_connectionID = @mssql_pconnect($this->hostname, $this->username, $this->password);
                  if ($this->_connectionID) {
                          $this->_isPersistentConnection = true;
                  }

                  if ($this->databaseName && $this->_connectionID) {
                          $boolDBSelected = @mssql_select_db($this->databaseName);
                          if(!$boolDBSelected) {  /*      if DB selection fails   */
                                  return false;   /*      Persistent connection can't be closed   */
                          }
                  }
                  return $this->_connectionID;
          }

          //      Returns: true on success, false on error Select the
          // database name to be used
          function selectDB($dbName)
          {
                  $this->databaseName = $dbName;
                  if ($this->_connectionID) {
                          return @mssql_select_db($dbName);
                  }
                  else {
                          /*      No database selected    */
                          return false;
                  }
          }

          // Returns: the Recordset object disregard success or
          // failure Send the sql statement to the database server
          function execute($sql = "")
          {
                  $this->_queryID = @mssql_query($sql, $this->_connectionID);
                  // Instantiate an object without considering whether
                  // the query return any results or not
                  $this->_tempResultObj = new Recordset($this->_queryID);
                  $this->_insertQuery($this->_queryID);
                  return $this->_tempResultObj;
          }

          // Returns: the last error message from previous database
          // operation Note: This function is NOT available for
          // Microsoft SQL Server
          function errorMsg()
          {
                  $this->_errorMsg = "errorMsg() is not available for Microsoft SQL Server";
              return $this->_errorMsg;
          }

          /*      Returns: true on success, false on failure
                  Close the database connection.  */
          function close() {
                  if ($this->_queryIDList && sizeof($this->_queryIDList > 0)) {
                          while(list($_key, $_resultID) = each($this->_queryIDList)) {
                                  @mssql_free_result($_resultID);
                          }
                  }
                  // If its not a persistent connection, then
                  // only the connection needs to be closed
                  if ($this->_isPersistentConnection != true) {
                          return @mssql_close($this->_connectionID);
                  }
                  else {
                          return true;
                  }
          }

          // A PRIVATE function used by the constructor function of
          // the query object.  insert the successful returned
          // query id to the query id list.  Used for later results
          // cleanup.  A private function that's never meant to be
          // used directly
          function _insertQuery($query_id) {
                  $this->_queryIDList[] = $query_id;
          }
  }

  //---------------------------------------
           Class Name: Recordset
  //---------------------------------------
  class Recordset
  {
          /*      public variables        */
          var $fields;
          // indicates that the current record position is
          // before the first record in a Recordset object
          var $BOF = null;
          // indicates that the current record position is
          // after the last record in a Recordset object
          var $EOF = null;

          // Private variables
          var $_numOfRows = -1; // NEVER change the value!  READ-ONLY!
          var $_numOfFields = -1; // NEVER change the value!  READ-ONLY!

          // Holds anything that was returned from the
          // database specific functions
          var $_tempResult = '';
          // This variable keeps the result link identifier
          var $_queryID = -1;
          // This variable keeps the current row in the Recordset
          var $_currentRow = -1;

          // Returns: query id on success and false if
          // failed Constructor function
          function Recordset($queryID)
          {
                  $this->_queryID = $queryID;
                  if ($queryID) {
                          $this->_numOfRows = @mssql_num_rows($this->_queryID);
                          $this->_numOfFields = @mssql_num_fields($this->_queryID);
                  }
                  else {
                          $this->_numOfRows = 0;
                          $this->_numOfFields = 0;
                  }
                  // If result set contains rows
                  if ($this->_numOfRows > 0 && $this->_currentRow == -1) {
                          $this->_currentRow = 0;
                          $this->fields = @mssql_fetch_array($this->_queryID);
                          $this->EOF = false;
                          $this->BOF = false;
                  }
                  return $this->_queryID;
          }
          // Returns: true if successful, false if fail Set
          // the Recordset pointer to a specified field offset.
          // If the next call to fetchField() won't include a
          // field offset, this field would be returned
          function fieldSeek($fieldOffset = -1) {
                  $this->_tempResult = @mssql_field_seek($this->_queryID, $fieldOffset);
                  return $this->_tempResult;
          }

          // Returns: an object containing field information.
          // Get column information in the Recordset object.
          // fetchField() can be used in order to obtain information
          // about fields in a certain query result. If the field
          // offset isn't specified, the next field that wasn't yet
          // retrieved by fetchField() is retrieved
          function fetchField($fieldOffset = -1) {
                  if ($fieldOffset != -1) {
                          $this->_tempResult = @mssql_fetch_field($this->_queryID, $fieldOffset);
                  }
                  // The $fieldOffset argument is not provided thus its -1
                  else if ($fieldOffset == -1) {
                          $this->_tempResult = @mssql_fetch_field($this->_queryID);
                  }
                  return $this->_tempResult;
          }

          // Returns: true if there still rows available, or false
          // if there are no more rows.  Moves to the next row in a
          // specified Recordset object and makes that record the current
          // row and the data corresponding to the row will be retrieved
          // into the fields collection.  Note: Unlike the moveRow() method,
          // when _currentRow is getNumOfRows() - 1, EOF will immediately be
          // true.  If row number is not provided, the function will point
          // to the first row automatically
          function nextRow()
          {
                  if ($this->getNumOfRows() > 0) {
                          $this->fields = array();
                          $this->_currentRow++;
                          $this->fields = @mssql_fetch_array($this->_queryID);
                          // This is not working.  True all the time
                          if ($this->fields) {
                                  $this->_checkAndChangeEOF($this->_currentRow - 1);
                                  return true;
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // Returns: true on success, false on failure moveRow()
          // moves the internal row pointer of the Recordset object
          // to point to the specified row number and the data
          // corresponding to the row will be retrieved into the fields
          // collection.  If row number is not provided, the function will
          // point to the first row automatically
          function moveRow($rowNumber = 0)
          {
                  if ($rowNumber == 0) {
                          return $this->firstRow();
                  }
                  else if ($rowNumber == ($this->getNumOfRows() - 1)) {
                          return $this->lastRow();
                  }
                  if ($this->getNumOfRows() > 0 && $rowNumber < $this->getNumOfRows()) {
                          $this->fields = null;
                          $this->_currentRow = $rowNumber;
                          if(@mssql_data_seek($this->_queryID, $this->_currentRow)) {
                                  $this->fields = @mssql_fetch_array($this->_queryID);
                                  /*      This is not working.  True all the time */
                                  if ($this->fields) {
                                          // No need to call _checkAndChangeEOF() because
                                          // the possibility of moving to the last row has
                                          // been handled by the above code
                                          $this->EOF = false;
                                          return true;
                                  }
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // Returns: true on success, false on failure firstRow() moves
          // the internal row pointer of the Recordset object to the first
          // row and the data corresponding to the row will be retrieved
          // into the fields collection
          function firstRow()
          {
                  if ($this->getNumOfRows() > 0) {
                          $this->fields = array();
                          $this->_currentRow = 0;
                          if (@mssql_data_seek($this->_queryID, $this->_currentRow)) {
                                  $this->fields = @mssql_fetch_array($this->_queryID);
                                  $this->EOF = false;
                                  /*      This is not working.  True all the time */
                                  if ($this->fields) {
                                          return true;
                                  }
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // Returns: true on success, false on failure lastRow() moves
          // the internal row pointer of the Recordset object to the last
          // row and the data corresponding to the row will be retrieved
          // into the fields collection
          function lastRow()
          {
                  if ($this->getNumOfRows() > 0) {
                          $this->fields = array();
                          $num_of_rows = $this->getNumOfRows();
                          $this->_tempResult = @mssql_data_seek($this->_queryID, --$num_of_rows);
                          if ($this->_tempResult) {
                                  /*      $num_of_rows decemented at above        */
                                  $this->_currentRow = $num_of_rows;
                                  $this->fields = @mssql_fetch_array($this->_queryID);
                                  /*      This is not working.  True all the time */
                                  if ($this->fields) {
                                          /*      Special case for making EOF false.      */
                                          $this->EOF = false;
                                          return true;
                                  }
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // close() only needs to be called if you are worried about using
          // too much memory while your script is running. All associated
          // result memory for the specified result identifier will
          // automatically be freed
          function close() {
                  $this->_tempResult = @mssql_free_result($this->_queryID);
                  return $this->_tempResult;
          }

          // Returns: the number of rows in a result set.  Get
          // number of rows in result
          function getNumOfRows() {
                  return $this->_numOfRows;
          }

          /*      Returns: the number of fields in a result set.
          Get number of fields in result. */
          function getNumOfFields() {
                  return $this->_numOfFields;
          }

          /*      Check and change the status of EOF.     */
          function _checkAndChangeEOF($currentRow) {
                  if ($currentRow >= ($this->_numOfRows - 1)) {
                          $this->EOF = true;
                  }
                  else {
                          $this->EOF = false;
                  }
          }
  }
  ?>
  ______________________________________________________________________



  18.  Appendix H Sybase SQL Server DB Wrapper Example

  Submitted by: Joe Thong darkjoe@softhome.net Site URL:
  <http://phpdb.linuxbox.com>

  Description:  A PHP database wrapper for various database servers with
  a powerful Recordset for result data manipulation.  Database results
  are flushed automatically by phpDB.

  To get this file, in the web-browser, save this file as 'Text' type as
  phpDB-sybase.lib



  ______________________________________________________________________
  <?php
  /*
  Name: phpDB Sybase module
  Version: 1.02bR6
  Description: A PHP database wrapper for various database
          servers with a powerful Recordset for result data
          manipulation.  Database results are flushed
          automatically by phpDB.
  */

  // Define this module, to prevent double class declaration
  if (!defined("_PHPDB_ABSTRACT_LAYER")) {
          define("_PHPDB_ABSTRACT_LAYER", 1 );
  }
  else
          return;

  //-------------------------------
           Class Name: phpDB
  //-------------------------------
  class phpDB
  {
          /*      public variables        */
          var $version = '1.02bR6'; // Version number of phpDB
          // This variable keeps what database type is going
          // to be used.  Current supported database server
          // are MySQL, MSQL, SQL Server, and Sybase
          var $databaseType = '';
          // Specifies which database is going to be used
          var $databaseName = '';
          // The hostname of the database server, port number
          // is optional.  e.g: "db.devNation.com"
          var $hostname = '';
          var $username = '';     // to connect to the database server
          var $password = ''; // Password for the username

          // Private variables --- starts with underscore
          // An array of executed querys.  For results
          // cleanup purposes
          var $_queryIDList       = array();
          // The returned link identifier whenever a successful
          // database connection is made
          var $_connectionID      = -1;
          // A variable which was used to keep the returned last
          // error message.  The value will then returned by
          // the errorMsg() function
          var $_errorMsg = '';
          // This variable keeps the last created result
          // link identifier
          var $_queryID = -1;
          // A boolean variable to state whether its a
          // persistent connection or normal connection
          var     $_isPersistentConnection = false;
          // Holds the newly created result object, returned
          // via the execute() method
          var $_tempResultObj = '';

          // A constructor function for the phpDB object.  When
          // initializing, specify the dbType i.e: "mysql",
          // "msql", "postgresql", "mssql", and "sybase"
          function phpDB($dbType = "sybase")
          {
                  switch ($dbType) {
                          case "mysql":
                          case "msql":
                          case "postgresql":
                          case "mssql":
                          case "sybase":
                          case "informix":
                                  $this->databaseType = $dbType;
                                  break;
                          default:
                                  return false;
                  }
          }

          // Returns: A positive link identifier on success, or
          // false on error.      Connect to the server with the
          // provided arguments. The connection to the server will be
          // closed when the script terminates, unless close()
          // function is called beforehand
          function connect($argHostname = "", $argUsername = "",
                  $argPassword = "", $argDatabaseName = "")
          {
                  $boolDBSelected;
                  if ($argHostname != "") {
                          $this->hostname = $argHostname;
                  }
                  if ($argUsername != "") {
                          $this->username = $argUsername;
                  }
                  if ($argPassword != "") {
                          $this->password = $argPassword;
                  }
                  if ($argDatabaseName != "") {
                          $this->databaseName = $argDatabaseName;
                  }

                  $this->_connectionID = @sybase_connect($this->hostname, $this->username, $this->password);

                  if ($this->databaseName && $this->_connectionID) {
                          $boolDBSelected = @sybase_select_db($this->databaseName);
                          /*      If DB selection fails   */
                          if(!$boolDBSelected) {
                                  /*      Close the current connection    */
                                  @sybase_close($this->_connectionID);
                                  return false;
                          }
                  }
                  return $this->_connectionID;
          }

          // Returns: A positive link identifier on success, or false
          // on error.  Connect to the server with the provided
          // arguments. The connection to the server will not be closed
          // when the script terminates. Instead it will be kept for later future use
          function pconnect($argHostname = "", $argUsername = "",
                  $argPassword = "", $argDatabaseName = "")
          {
                  $boolDBSelected;
                  if ($argHostname != "") {
                          $this->hostname = $argHostname;
                  }
                  if ($argUsername != "") {
                          $this->username = $argUsername;
                  }
                  if ($argPassword != "") {
                          $this->password = $argPassword;
                  }
                  if ($argDatabaseName != "") {
                          $this->databaseName = $argDatabaseName;
                  }

                  $this->_connectionID = @sybase_pconnect($this->hostname, $this->username, $this->password);
                  if ($this->_connectionID) {
                          $this->_isPersistentConnection = true;
                  }

                  if ($this->databaseName && $this->_connectionID) {
                          $boolDBSelected = @sybase_select_db($this->databaseName);
                          /*      if DB selection fails   */
                          if(!$boolDBSelected) {
                                  /*      Persistent connection can't be closed   */
                                  return false;
                          }
                  }
                  return $this->_connectionID;
          }

          /*      Returns: true on success, false on error
                  Select the database name to be used     */
          function selectDB($dbName) {
                  $this->databaseName = $dbName;
                  if ($this->_connectionID) {
                          return @sybase_select_db($dbName);
                  }
                  else {
                          /*      No database selected    */
                          return false;
                  }
          }

          /*      Returns: the Recordset object disregard success or failure
                  Send the sql statement to the database server.  */
          function execute($sql = "") {
                  $this->_queryID = @sybase_query($sql, $this->_connectionID);
                  // Instantiate an object without considering whether
                  // the query return any results or not
                  $this->_tempResultObj = new Recordset($this->_queryID);
                  $this->_insertQuery($this->_queryID);
                  return $this->_tempResultObj;
          }

          /*      Returns: the last error message from previous database operation
                  Note: This function is NOT available for Sybase.        */

          function errorMsg() {
                  $this->_errorMsg = "errorMsg() is not available for Sybase";
              return $this->_errorMsg;
          }

          /*      Returns: true on success, false on failure
                  Close the database connection.  */

          function close() {
                  if ($this->_queryIDList && sizeof($this->_queryIDList > 0)) {
                          while(list($_key, $_resultID) = each($this->_queryIDList)) {
                                  @sybase_free_result($_resultID);
                          }
                  }
                  // If its not a persistent connection, then
                  // only the connection needs to be closed
                  if ($this->_isPersistentConnection != true) {
                          return @sybase_close($this->_connectionID);
                  }
                  else {
                          return true;
                  }
          }

          // A PRIVATE function used by the constructor function
          // of the query object.  insert the successful returned
          // query id to the query id list.  Used for later results
          // cleanup.  A private function that's never meant
          // to be used directly
          function _insertQuery($query_id) {
                  $this->_queryIDList[] = $query_id;
          }
  }

  //----------------------------------
           Class Name: Recordset
  //----------------------------------
  class Recordset
  {
          /*      public variables        */
          var $fields;
          // indicates that the current record position is
          // before the first record in a Recordset object
          var $BOF = null;
          // indicates that the current record position
          // is after the last record in a Recordset object
          var $EOF = null;

          // Private variables - starts with underscore
          var $_numOfRows = -1; // NEVER change the value! READ-ONLY!
          var $_numOfFields = -1; // NEVER change the value! READ-ONLY!
          // Holds anything that was returned from
          // the database specific functions
          var $_tempResult = '';
          // This variable keeps the result link identifier
          var $_queryID = -1;
          // This variable keeps the current row in the Recordset
          var $_currentRow = -1;

          // Returns: query id on success and false if
          // failed Constructor function
          function Recordset($queryID) {
                  $this->_queryID = $queryID;
                  if ($queryID) {
                          $this->_numOfRows = @sybase_num_rows($this->_queryID);
                          $this->_numOfFields = @sybase_num_fields($this->_queryID);
                  }
                  else {
                          $this->_numOfRows = 0;
                          $this->_numOfFields = 0;
                  }
                  /*      If result set contains rows     */
                  if ($this->_numOfRows > 0 && $this->_currentRow == -1) {
                          $this->_currentRow = 0;
                          $this->fields = @sybase_fetch_array($this->_queryID);
                          $this->EOF = false;
                          $this->BOF = false;
                  }
                  return $this->_queryID;
          }

          // Returns: true if successful, false if fail Set
          // the Recordset pointer to a specified field offset.
          // If the next call to fetchField() won't include a
          // field offset, this field would be returned
          function fieldSeek($fieldOffset = -1) {
                  $this->_tempResult = @sybase_field_seek($this->_queryID, $fieldOffset);
                  return $this->_tempResult;
          }

          // Returns: an object containing field information.
          // Get column information in the Recordset object.
          // fetchField() can be used in order to obtain information
          // about fields in a certain query result. If the field
          // offset isn't specified, the next field that wasn't yet
          // retrieved by fetchField() is retrieved
          function fetchField($fieldOffset = -1) {
                  if ($fieldOffset != -1) {
                          $this->_tempResult = @sybase_fetch_field($this->_queryID, $fieldOffset);
                  }
                  /*      The $fieldOffset argument is not provided thus its -1   */
                  else if ($fieldOffset == -1) {
                          $this->_tempResult = @sybase_fetch_field($this->_queryID);
                  }
                  return $this->_tempResult;
          }

          // Returns: true if there still rows available, or
          // false if there are no more rows.  Moves to the next
          // row in a specified Recordset object and makes that record
          // the current row and the data corresponding to the row will
          // be retrieved into the fields collection.  Note: Unlike
          // the moveRow() method, when _currentRow is getNumOfRows() - 1,
          // EOF will immediately be true.  If row number is not
          // provided, the function will point to the
          // first row automatically
          function nextRow() {
                  if ($this->getNumOfRows() > 0) {
                          $this->fields = array();
                          $this->_currentRow++;
                          $this->fields = @sybase_fetch_array($this->_queryID);
                          /*      This is not working.  True all the time */
                          if ($this->fields) {
                                  $this->_checkAndChangeEOF($this->_currentRow - 1);
                                  return true;
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // Returns: true on success, false on failure moveRow()
          // moves the internal row pointer of the Recordset object
          // to point to the specified row number and the data
          // corresponding to the row will be retrieved into the
          // fields collection.  If row number is not provided, the
          // function will point to the first row automatically
          function moveRow($rowNumber = 0) {
                  if ($rowNumber == 0) {
                          return $this->firstRow();
                  }
                  else if ($rowNumber == ($this->getNumOfRows() - 1)) {
                          return $this->lastRow();
                  }
                  if ($this->getNumOfRows() > 0 && $rowNumber < $this->getNumOfRows()) {
                          $this->fields = null;
                          $this->_currentRow = $rowNumber;
                          if(@sybase_data_seek($this->_queryID, $this->_currentRow)) {
                                  $this->fields = @sybase_fetch_array($this->_queryID);
                                  /*      This is not working.  True all the time */
                                  if ($this->fields) {
                                          // No need to call _checkAndChangeEOF()
                                          // because the possibility of moving to the
                                          // last row has been handled by the above code
                                          $this->EOF = false;
                                          return true;
                                  }
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // Returns: true on success, false on failure firstRow()
          // moves the internal row pointer of the Recordset object
          // to the first row and the data corresponding to the row
          // will be retrieved into the fields collection
          function firstRow() {
                  if ($this->getNumOfRows() > 0) {
                          $this->fields = array();
                          $this->_currentRow = 0;
                          if (@sybase_data_seek($this->_queryID, $this->_currentRow)) {
                                  $this->fields = @sybase_fetch_array($this->_queryID);
                                  $this->EOF = false;
                                  /*      This is not working.  True all the time */
                                  if ($this->fields) {
                                          return true;
                                  }
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // Returns: true on success, false on failure lastRow()
          // moves the internal row pointer of the Recordset object
          // to the last row and the data corresponding to the row
          // will be retrieved into the fields collection
          function lastRow() {
                  if ($this->getNumOfRows() > 0) {
                          $this->fields = array();
                          $num_of_rows = $this->getNumOfRows();
                          $this->_tempResult = @sybase_data_seek($this->_queryID, --$num_of_rows);
                          if ($this->_tempResult) {
                                  /*      $num_of_rows decemented at above        */
                                  $this->_currentRow = $num_of_rows;
                                  $this->fields = @sybase_fetch_array($this->_queryID);
                                  /*      This is not working.  True all the time */
                                  if ($this->fields) {
                                          /*      Special case for making EOF false.      */
                                          $this->EOF = false;
                                          return true;
                                  }
                          }
                  }
                  $this->EOF = true;
                  return false;
          }

          // close() only needs to be called if you are worried
          // about using too much memory while your script is
          // running. All associated result memory for the
          // specified result identifier will automatically be freed
          function close() {
                  $this->_tempResult = @sybase_free_result($this->_queryID);
                  return $this->_tempResult;
          }

          /*      Returns: the number of rows in a result set.
          Get number of rows in result.   */

          function getNumOfRows() {
                  return $this->_numOfRows;
          }

          /*      Returns: the number of fields in a result set.
          Get number of fields in result. */

          function getNumOfFields() {
                  return $this->_numOfFields;
          }

          /*      Check and change the status of EOF.     */
          function _checkAndChangeEOF($currentRow) {
                  if ($currentRow >= ($this->_numOfRows - 1)) {
                          $this->EOF = true;
                  }
                  else {
                          $this->EOF = false;
                  }
          }
  }
  ?>
  ______________________________________________________________________



  19.  Appendix I phpDB.inc Example

  Submitted by: Joe Thong darkjoe@softhome.net Site URL:
  <http://phpdb.linuxbox.com>

  Description:  A PHP database wrapper for various database servers with
  a powerful Recordset for result data manipulation.  Database results
  are flushed automatically by phpDB.

  To get this file, in the web-browser, save this file as 'Text' type as
  phpDB.inc



  ______________________________________________________________________
  <?php
  /*
  Name: phpDB General module
  Version: 1.02bR6
  Description: A PHP database wrapper for various
          database servers.  Database results are flushed
          automatically by phpDB.  Supported database
          servers are MySQL, MSQL, PostgreSQL, Microsoft
          SQL Server and Sybase.
  */

          if (!defined("_PHPDB_GENERAL_LAYER")) {
            define("_PHPDB_GENERAL_LAYER", 1 );
          }
          else
                  return;

          // Fill in the database server that you're
          // going to use.  Consult the phpDB Reference
          // Manual for more information
          $databaseType = '';
          // The phpDB module root path.  No trailing slash
          $phpDBRootPath = '.';

          function useDB($dbType = "")
          {
                  GLOBAL $phpDBRootPath;
                  switch (strtolower($dbType))
                  {
                          case "mysql":
                          case "msql":
                          case "postgresql":
                          case "mssql":
                          case "sybase":
                          case "informix":
                                  include("$phpDBRootPath". "/phpDB-" . "$dbType.lib");
                                  break;
                          case "":
                                  die("Please edit phpDB.inc in order to use phpDB");
                                  return false;
                          default:
                                  die("Invalid database selection");
                                  return false;
                  }
                  return true;
          }

          useDB($databaseType);
  ?>
  ______________________________________________________________________



  20.  Appendix J phpDBTest.php3 Example

  Submitted by: Joe Thong darkjoe@softhome.net Site URL:
  <http://phpdb.linuxbox.com>

  Description:  A PHP database wrapper for various database servers with
  a powerful Recordset for result data manipulation.  Database results
  are flushed automatically by phpDB.

  To get this file, in the web-browser, save this file as 'Text' type as
  phpDB-mssql.lib

  ______________________________________________________________________
  <html>
  < head>
          < title>Untitled< /title>
  < /head>

  < body>
  <?php
          // Assumed this file is placed in the same directory with phpDB.inc
          include("phpDB.inc");
          $db = new phpDB();
          $db->pconnect("hostName", "userName", "passWord", "databaseName") or die ("Can't connect to database server or select database");
          $rs = $db->execute("SELECT * FROM Items");
          $numOfRows = $rs->getNumOfRows();
          echo "Number of Rows: $numOfRows";

          $rs->firstRow(); // optional, but recommended
          while (!$rs->EOF) {
                  // Fields collection accessible as associative arrays too
                  echo "<br>" . $rs->fields[0];
                  $rs->nextRow(); // NOTE: nextRow() is placed at below
          }

          $rs->close();
          $db->close();   // optional
  ?>
  < /body>
  < /html>
  ______________________________________________________________________



  PLIP Install HOWTO
  Gilles Lamiral, lamiral@mail.dotcom.fr

  v1.22, 16 June 2000

  This paper describes how to install a Gnu|Linux distribution on a com
  puter without Ethernet card, or CD-ROM, but just a local floppy drive
  and a remote nfs server attached by a Null-Modem parallel cable. The
  nfs server has a cdrom drive mounted and exported.

  ______________________________________________________________________

  Table of Contents



  1. Introduction

  2. License

  3. How did I write this howto ?

  4. What do you need ?

  5. The documentation

  6. Conventions

  7. Network parameters

  8. PLIP on the Source side

  9. The cdrom nfs server side

  10. FIPS, PARTED, splitting of hard disk partitions

  11. Debian installation

     11.1 Preparing the two floppies
     11.2 The real installation process
     11.3 An installation break: PLIP on the target side
     11.4 Return to the normal install process

  12. Installing Slackware, RedHat, Caldera

     12.1 Slakware installation
        12.1.1 Making boot,root and plip disks
           12.1.1.1 1a- creating the boot and root disks.
           12.1.1.2 1b- Creating the PLIP disk
           12.1.1.3 1c- launching the installation.
        12.1.2 2a- Install PLIP module
        12.1.3 3a- Now create your NFS drive.
        12.1.4 4a- Installing Slakware
     12.2 (BF
     12.3 Troubleshooting

  13. Installing from a DOS partition

  14. Install the plip interface permanently

     14.1 On the source side
     14.2 On the target side

  15. Need to compile a new kernel ?

  16. What's new

  17. To do

  18. List of contributors and acknowledgements



  ______________________________________________________________________

  You can find the latest release of the PLIP-Install-HOWTO, by Gilles
  Lamiral, located at:
  http://www.linuxdoc.org/HOWTO/PLIP-Install-HOWTO.html



  1.

  Introduction


  Writing a PLIP install HOWTO seems useless nowadays since Ethernet
  cards are cheap: NE2000 cards cost about the same as a Null-Modem
  cable. This is true for desktop computers, but not for laptop
  computers, in which the PCMCIA card costs more than 10 times as much
  the Null-Modem cable.  Moreover, there is a parallel port on every
  computer, but not always a network card.

  Of course, this howto can be used to install Linux on every personal
  computer without loss of generality.

  This paper is just what I've done to install a Debian GNU/Linux
  distribution on a Toshiba Portg 620CT laptop, from a NFS exported
  cdrom drive, via a Null-Modem cable.

  A Null-Modem cable is also called a LapLink cable but this word is
  trademarked by Traveling Software under the number 75466713 since
  1986, so I won't use it anymore.

  This HOWTO will be obsolete when every Linux distribution include a
  PLIP install option. For example, the Debian installation only needs
  to add two commands to make this HOWTO obsolete (ifconfig + route). I
  hope one Debian maintainer will consider this point.

  I would be happy to know if someone used the PLIP-Install-HOWTO to
  install other Linux distributions from other network protocols (ftp,
  http, nfs, samba, or even NT/Novell servers)

  Feedback with typos, bad English, comments, money, job, joy, fears,
  cries are welcome and recommended (not all with the same eagerness).



  2.

  License

  I put this documentation under the OpenContent
  <http://www.opencontent.org/opl.shtml> license. This means this
  document is given without any warranty. You can use it, redistribute
  it, or modify it, by respecting the following conditions: You have to
  clearly specify the nature and the content of the modifications, their
  date and keep the opencontent license in case of redistribution. If
  you sell it, you sell the medium, not the content. This is a summary,
  read the license to get more details.

  For those who can't read the license online, I give a textual copy:



       OpenContent License (OPL)
       Version 1.0, July 14, 1998.

       This document outlines  the  principles underlying the  OpenContent
       (OC)  movement and may    be   redistributed provided it    remains
       unaltered. For legal purposes,  this document is the license  under
       which OpenContent is made available for use.

       The  original   version  of this      document may  be   found   at
       http://www.opencontent.org/opl.shtml

       LICENSE

       Terms and Conditions for Copying, Distributing, and Modifying

       Items other than  copying, distributing, and modifying  the Content
       with  which this license was distributed  (such as using, etc.) are
       outside the scope of this license.

       1.  You  may copy and distribute exact  replicas of the OpenContent
       (OC)  as   you receive it,    in any  medium,   provided  that  you
       conspicuously and appropriately publish on each copy an appropriate
       copyright notice  and disclaimer of  warranty; keep  intact all the
       notices  that refer  to this   License and to   the absence  of any
       warranty; and give  any other recipients of the  OC a copy of  this
       License along with the OC.  You may at your option charge a fee for
       the media and/or handling involved in creating a unique copy of the
       OC for use   off-line, you may at  your  option  offer instructional
       support for the OC in exchange for a fee, or you may at your option
       offer warranty in exchange for a fee. You  may not charge a fee for
       the OC itself.  You may  not charge a fee  for the sole service  of
       providing  access to and/or  use of the  OC via a network (e.g. the
       Internet), whether it be via the world wide web,  FTP, or any other
       method.

       2.  You may modify your  copy or copies of  the  OpenContent or any
       portion   of it,  thus   forming works  based on  the  Content, and
       distribute such modifications or work  under the terms of Section 1
       above, provided that you also meet all of these conditions:

       a) You  must cause the  modified content to carry prominent notices
       stating that you  changed it, the exact nature  and content  of the
       changes, and the date of any change.

       b) You must cause any work that you  distribute or publish, that in
       whole or in part  contains or is  derived from the  OC or  any part
       thereof, to be  licensed  as a  whole  at no  charge to  all  third
       parties under the terms of this License, unless otherwise permitted
       under applicable Fair Use law.

       These requirements  apply  to the   modified  work as  a whole.  If
       identifiable sections of that work are not derived from the OC, and
       can  be reasonably considered   independent  and separate works  in
       themselves, then this License, and its terms, do not apply to those
       sections when  you distribute them as  separate works. But when you
       distribute the same  sections as part of  a  whole which  is a work
       based on the OC, the distribution of the whole must be on the terms
       of this License,  whose permissions for  other licensees  extend to
       the entire whole, and thus to each and every part regardless of who
       wrote it.   Exceptions  are  made to  this  requirement to  release
       modified works free of charge under this license only in compliance
       with Fair Use law where applicable.

       3. You are not required to accept this License,  since you have not
       signed  it. However,  nothing else  grants you  permission to copy,
       distribute or modify the OC. These actions are prohibited by law if
       you  do not accept this    License.  Therefore, by distributing  or
       translating the OC,  or  by deriving works herefrom,  you  indicate
       your acceptance of this  License to do so,   and all its  terms and
       conditions for copying, distributing or translating the OC.

       NO WARRANTY

       4.  BECAUSE THE OPENCONTENT (OC)  IS LICENSED FREE OF CHARGE, THERE
       IS  NO WARRANTY FOR THE OC,  TO THE  EXTENT PERMITTED BY APPLICABLE
       LAW. EXCEPT WHEN OTHERWISE  STATED IN WRITING THE COPYRIGHT HOLDERS
       AND/OR OTHER PARTIES PROVIDE THE OC "AS IS" WITHOUT WARRANTY OF ANY
       KIND, EITHER EXPRESSED OR IMPLIED,  INCLUDING, BUT NOT LIMITED  TO,
       THE IMPLIED  WARRANTIES OF    MERCHANTABILITY  AND FITNESS  FOR   A
       PARTICULAR PURPOSE. THE ENTIRE  RISK OF USE OF  THE OC IS WITH YOU.
       SHOULD THE OC PROVE  FAULTY, INACCURATE, OR OTHERWISE  UNACCEPTABLE
       YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION.

       5.  IN NO EVENT  UNLESS REQUIRED BY APPLICABLE LAW  OR AGREED TO IN
       WRITING  WILL ANY COPYRIGHT  HOLDER,  OR ANY   OTHER PARTY WHO  MAY
       MIRROR AND/OR REDISTRIBUTE THE OC  AS PERMITTED ABOVE, BE LIABLE TO
       YOU  FOR DAMAGES,  INCLUDING ANY  GENERAL,  SPECIAL,  INCIDENTAL OR
       CONSEQUENTIAL DAMAGES ARISING OUT OF   THE USE OR INABILITY TO  USE
       THE OC, EVEN IF SUCH HOLDER OR OTHER PARTY  HAS BEEN ADVISED OF THE
       POSSIBILITY OF SUCH DAMAGES.



  3.

  How did I write this howto ?


  I wrote this paper during the installation process but since I
  encountered several problems at the same time, my notes were disparate
  and sometimes I forgot to write the good command lines because I was
  too fed up to reboot (kernel compilations) and edit this file each
  time.

  When the installation went wrong (it did, I'm a beginner on laptops,
  plip, linux nfs, portmapper, Debian), I tried several things to fix
  the problems. When they remained too long, my brain was focused on
  solving, not writing.

  So, when the installation process finally succeeded, I decided to
  restart the process from scratch by noting everything in order to save
  your time. It was the first time I had installed Linux twice on the
  same computer.

  Then, in order to verify the document, I again restarted from scratch
  with a Slink Debian distribution (the next after the Hamm one). It was
  the first time I had installed Linux 3 times on the same computer. I
  hope it was the last time I have to do that.


  Conclusion: If you do what is in this paper, it should work.


  4.

  What do you need ?

    A Personal Computer, laptop or desktop, called the target computer
     or simply target.



    A 3 1/4" inch floppy drive on the target.



    Two or three fresh floppies.  They don't need to be formatted. You
     also need one more DOS formatted floppy if you have to play with
     FIPS.



    Another computer with a cdrom drive and nfs services, called source
     computer or simply source. It doesn't have to be a Linux system but
     just a system which can export a cdrom drive via nfs. In this
     HOWTO, I assume it is a Linux system.



    A cdrom distribution. I took a Debian Hamm (2.0r3) from an old
     Infomagic compilation. I think every distribution can be installed
     this way, but I'm not sure.  I've read a French document, written
     by Chmouel Boudjnah, saying the RedHat distribution has an easy
     installation process. Chmouel's document also deals with the Debian
     distribution, so if you read French, you can use Chmouel's document
     instead of this one.



    A Null-Modem DB 25 cable. Is it the same as a serial cable? You'll
     find the answer in the next release.



    Some time: 3 hours.



    Coffee. 1 liter.


  5.

  The documentation


  I recommend these good readings in case you can't figure out how to
  solve a problem. I've read them. You should too if you're curious or
  conscientious.

  Please, do not forget to consider the LDP mirrors, listed at:

  Most HOWTOs are translated in many languages. Just go to the bottom of
  a mirror page and follow the translations/ link.


  If you want to use Linux on a laptop, read the latest Laptop-HOWTO, by
  Werner Heuser, located at:


  If you haven't installed any distribution yet, carefully read the
  Installation-HOWTO, by Eric S. Raymond, located at:
  <http://www.linuxdoc.org/HOWTO/Installation-HOWTO.html>. And make more
  coffee :-)

  If you need information about your cdrom drive, read the CDROM-HOWTO,
  by Jeff Tranter, located at:

  If you haven't installed an nfs server yet, read the NFS-HOWTO, by
  Nicolai Langfeldt, located at:

  If you need to compile a new kernel on the source box, read the
  Kernel-HOWTO, by Brian Ward, located at:

  If you are new to PLIP, read the PLIP     MINI-HOWTO, by Andrea
  Controzzi, located at:



  If you plan to make your Null-Modem cable yourself, a good reading is
  the file PLIP.txt, by Donald Becker, located at:
  /usr/src/linux/Documentation/networking/PLIP.txt
  on your source linux computer, Luke.



  6.

  Conventions


  The file contents and line commands and install screen-shots are
  always in typewriter font, like this:



       #!/bin/bash
       #############################################
       #### This is the great file /bin/Windows ####
       #############################################

       while [ "1" ]; do
               echo "I do my best because I'm the best"
               echo "Very soon, next Y2Kill (the 01/01/0000)"
               echo "A new marvelous 64 bit release !"
               echo "Please wait a little more"
               sleep 18446744073709551615 # 2^64-1
       done



  or this:



       $ killall Windows
       Terminated



  The file content lines should never begin with white space. You'll
  have to remove them, if any. Sorry, I'm fed up with C-a M-AltGr-\
  (remember, I'm a French azerty writer). Tab-emacs reflex is untamable
  (coders who use Emacs always press the tabular key like a twitch).

  Command input lines begin with a dollar $ (the prompt), you don't have
  to type the dollar, just type the rest of the line; other lines are
  the command output, you don't have to type them either.

  Because all the configuration commands are important, you'll need to
  use a system administrator shell, like root, on the source and the
  target computers.


       $ su
       Password: blabla
       #



  graham says:

  Why this "#"?  Because this is for root's prompt.  So, in the next
  paragraph, say that you will use the '$' for the remainder of this.
  See my comment below.

  The prompt will be shown as "$" in the remainder of this documentation
  "$", even if it should be "#". This is because "#" often means
  comment, so it is ambiguous. I don't like ambiguity in computer
  science.



  7.

  Network parameters


  We will make a plip point-to-point network with those IP
  configuration:

    target: 192.168.0.1 netmask 255.255.255.255

    source: 192.168.0.2 netmask 255.255.255.255

  You should not already have those names in your name space:


       $ ping source
       ping: unknown host source

       $ ping target
       ping: unknown host target



  You should not already have those IP addresses in your network space:



       $ ping  192.168.0.1
       PING 192.168.0.1 (192.168.0.1): 56 data bytes
       ping: sendto: Network is unreachable
       ping: wrote 192.168.0.1 64 chars, ret=-1

       --- 192.168.0.1 ping statistics ---
       1 packets transmitted, 0 packets received, 100% packet loss

       $ ping 192.168.0.2
       PING 192.168.0.2 (192.168.0.2): 56 data bytes
       ping: sendto: Network is unreachable
       ping: wrote 192.168.0.2 64 chars, ret=-1

       --- 192.168.0.2 ping statistics ---
       1 packets transmitted, 0 packets received, 100% packet loss



  If those commands don't give you errors, change the names or the
  addresses.

  You can choose other addresses, names or netmask (netmask must be the
  same on both sides). In the rest of this document, I'll suppose you
  choose these addresses and these names.


  Add a line in /etc/exports


       #### file /etc/exports ####
       ...
       /cdrom          source(ro) target(ro)
       #### EOF ####



  Because the portmaper tries to resolve IP addresses, add the IP
  addresses and names in /etc/hosts


       #### file /etc/hosts ####
       ...
       192.168.0.1     target
       192.168.0.2     source
       #### EOF ####



  Verify you have the item files for the hosts search list in the file
  /etc/nsswitch.conf


       #### file /etc/nsswitch.conf ####
       ...
       hosts:      files nis dns
       ...
       #### EOF ####



  8.

  PLIP on the Source side


  This section describes how to set up the plip interface in the source
  server.  If you run into trouble, I suggest that you read the PLIP
  MINI-HOWTO.


  Check that your lp device is not set. You should not have this entry:


       $ cat /proc/devices
       Character devices:
       ...
       6 lp
       ...



  If you do have it, kill the lpd daemon and remove the lp module:


       $ /etc/rc.d/init.d/lpd.init stop
       Shutting down lpd: lpd

       $ rmmod lp



  If you can't remove the lp module then you have to recompile the
  kernel with lp service as a module.

  Now, the "6 lp" line has disappeared from the /proc/devices file,
  which is a reflection of the kernel capabilities.

  You are not obliged to eliminate the lp device : the scheme may work
  with lp. Without guaranty (it works for me). Check it yourself.


  Check that your parallel port is handled:


       $ ls /proc/parport/
       0/

       $ cat /proc/parport/0/hardware
       base:   0x378
       irq:    7
       dma:    none
       modes:  SPP,ECP,ECPEPP,ECPPS2



  If you don't have any directory under /proc/parport/ then you have to
  load the parport and parport_pc modules:


       $ insmod parport
       $ insmod parport_pc


  You should see this new entry in /var/log/messages:


       Oct  9 20:50:47 louloutte kernel:
       parport0: PC-style at 0x378 [SPP,ECP,ECPEPP,ECPPS2]

       Oct  9 20:50:47 louloutte kernel:
       parport0: detected irq 7;
       use procfs to enable interrupt-driven operation.



  I repeat the message "detected irq 7, use procfs to enable interrupt-
  driven operation", so:


       $ echo 7 >  /proc/parport/0/irq



  Check that plip module is loaded:


       $ lsmod |grep plip



  If plip module is not loaded, then load it:


       $ insmod plip



  You should see something like this in /var/log/messages


       ==> /var/log/messages <==
       Oct  8 16:34:12 louloutte kernel:
       NET3 PLIP version 2.3-parport gniibe@mri.co.jp

       Oct  8 16:34:12 louloutte kernel:
       plip0: Parallel port at 0x378, using IRQ 7



  If you can't load the plip module then you have to recompile the
  kernel with plip service as a module.

  The syslog message says the module is loaded on the plip0 interface.
  Configure the plip0 interface:


       $ ifconfig plip0 source pointopoint target netmask 255.255.255.255 up



  Check that everything is okay.


       $ ifconfig plip0
       plip0     Link encap:10Mbps Ethernet  HWaddr FC:FC:C0:A8:00:02
            inet addr:192.168.0.2  P-t-P:192.168.0.1  Mask:255.255.255.255
            UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0
            TX packets:0 errors:0 dropped:0 overruns:0
            Interrupt:7 Base address:0x378



  Now you can ping locally the source server:


       $ ping source
       PING source (192.168.0.2): 56 data bytes
       64 bytes from 192.168.0.2: icmp_seq=0 ttl=255 time=0.3 ms
       64 bytes from 192.168.0.2: icmp_seq=1 ttl=255 time=0.2 ms

       --- source ping statistics ---
       2 packets transmitted, 2 packets received, 0% packet loss
       round-trip min/avg/max = 0.2/0.2/0.3 ms



  Verify that the route to target exists:


       $ route
       Kernel IP routing table
       Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
       target          *               255.255.255.255 UH    0      0        0 plip0



  If the route doesn't exist, add it:


       $ route add -host  192.168.0.1  dev plip0



  When the target is configured you will be able to do a ping test:


       $ ping target
       PING 192.168.0.1 (192.168.0.1): 56 data bytes
       64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=4.5 ms
       64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=4.3 ms

       --- 192.168.0.1 ping statistics ---
       2 packets transmitted, 2 packets received, 0% packet loss
       round-trip min/avg/max = 4.3/4.4/4.5 ms



  But if you try it now you should have:


       $ ping target
       PING target (192.168.0.1): 56 data bytes

       --- target ping statistics ---
       5 packets transmitted, 0 packets received, 100% packet loss



  Now, the server network is ready to work.  Congratulations.



  9.

  The cdrom nfs server side


  This section describes how to mount and export via NFS a cdrom drive.

  Mount the cdrom. If you encounter a problem with your cdrom drive,
  read the CDROM-HOWTO. I assume that the cdrom device is /dev/hdd but
  it could be /dev/sr0 or /dev/hdb etc. The mount point I choose is
  /cdrom but you can choose the one you want:


       $ mount -t iso9660 /dev/hdd  /cdrom



  You have to set up nfs services.  If something goes wrong, read the
  NFS-HOWTO

  Verify your kernel supports nfs:


       $ cat /proc/filesystems
               ext2
       nodev   proc
       nodev   nfs
       nodev   ncpfs
       nodev   devpts
               iso9660



  Verify your portmapper can handle mountd and nfs client requests:



       $ rpcinfo -p
       program vers proto   port
       100000    2   tcp    111  portmapper
       100000    2   udp    111  portmapper
       100005    1   udp    655  mountd
       100005    1   tcp    657  mountd
       100003    2   udp   2049  nfs
       100003    2   tcp   2049  nfs


  Lines with nfs or portmapper have to be there. NFS on tcp ?  progress
  have been made !


  Then, rerun portmap, mountd, nfs:


       $ /etc/rc.d/init.d/portmap.init stop
       Stopping INET services: portmap

       $ /etc/rc.d/init.d/portmap.init start
       Starting portmapper: portmap

       $ /etc/rc.d/init.d/nfs stop
       Shutting down NFS services: rpc.mountd rpc.nfsd

       $ /etc/rc.d/init.d/nfs start
       Starting NFS services: rpc.mountd rpc.nfsd



  /etc/rc.d/init.d/ is /sbin/init.d/ on SuSE Linux systems. I had a
  dream last nigth: LSB was respected. (LDB: Linux Standard Base)


  Then, try to mount it "locally" (via nfs) on the source box and clean
  the test:


       $ mkdir /tmp/nfstest
       $ mount -t nfs source:/cdrom /tmp/nfstest
       $ ls  /tmp/nfstest/
       README             debian/            locatedb.3         tools/
       TRANS.TBL          ftp.netscape.com/  ls_lR.3            upgrade/
       boot/              install/           realaudio/

       $ echo great stuff !
       $ umount /tmp/nfstest
       $ rmdir /tmp/nfstest



  Bad luck ? Read the NFS-HOWTO and /var/log/messages.

  Check the nfs server with those commands:


       $ rpcinfo -p



  Run portmap with the -v flag:


        $ portmap -v



  kill portmap, mountd, nfsd and rerun them in this order: portmap,
  mountd, nfsd.  Take a rest, get more coffee. Read again the NFS-HOWTO
  and restart.

  Now, the exported cdrom drive nfs server is ready to work.
  Congratulations.



  10.

  FIPS, PARTED, splitting of hard disk partitions


  This section is for anybody who has only one primary FAT partition
  (DOS, Windows 3.xx, NT) and wants to keep it without loosing data.
  Make some backups because if you burn it, I won't be responsible - you
  will.

  Journey to PARTED

  Andrew Clausen (clausen@gnu.org), GNU Parted maintainer, wrote "You
  might want to mention GNU Parted in the PLIP-Install Howto." That is
  done. Since I didn't try it I can only give you the links to parted by
  http <http://www.gnu.org/software/parted> and parted ftp
  <ftp://ftp.gnu.org/gnu/parted>. Help yourself. Parted seems very good.

  Andrew said: "GNU Parted is a *LOT* more powerful than FIPS (think
  Partition Magic).  For example, it can convert FAT16 <=> FAT32, change
  the size of the FATs, doesn't require a defragger, etc.  And it
  supports ext2, linux-swap..."

  Back to FIPS.

  Download FIPS <ftp://ftp.debian.org/pub/debian/tools/>. Don't forget
  the mirrors ftp.xx.debian.org where xx is your country abbreviation
  (fr, fi, us, uk, etc.).

  At the time of this writing the archive file is called fips20.zip.

  The fips program is already in the debian cdrom distribution. I found
  it (yes, after downloading the fips20.zip file) in
  /cdrom/debian/tools/fips15.zip (It supposes your cdrom is mounted on
  /cdrom)

  I guess you are on a Unix world but you're not compelled to do so. Go
  in a good working place on the source computer:


       $ mkdir /tmp/fips-2.0/
       $ cd /tmp/fips-2.0/
       $ unzip -l /archive/fips/fips20.zip
       ...
       $ unzip  /archive/fips/fips20.zip
       ...
       $ ls
       $ dos2unix fips.doc fips.faq  readme.1st



  1. Read the file readme.1st

  2. Read the file fips.doc

  3. Read the file fips.faq

  Boot your target computer. Be in pure DOS (quit Windows).

  Read again the file fips.doc from the section "5. Before you start".

  Be aware of hidden files.

  Graham comment: Hidden files will not be moved by DeFrag (as far as I
  know), so FIPS will reclaim less space for use by Linux.  Use the
  ATTRIB command to remove the "hidden" attribute.  Some things may
  require that files are hidden, so it will be necessary to hide the
  same files again later. I think that it would also be a good idea to
  run scandisk at this moment.  Perhaps I do not trust DOS.


  Be aware to eliminate the "virtual memory" file (swap for Win*) during
  the fips process.  In Windows 3.11 (quite up to date, no?)  this swap
  file is configured from Program-Manager->Control-Panel->Enhanced (a
  i386 chip icon).

  Click, Click->Click on the chip and re-click on a button called
  "Virtual Memory".

  Adjust the size to none, Click<-Click<-Click<-Click back plus Alt-F4
  to close all your windows. Don't you think the Gates are too closed
  too?

  Graham comment: I am not sure that this is a good idea.  What happens
  if "386spart.par" is not hidden?  I think that DEFRAG will move it,
  and Windows will complain next time it starts, then rebuild the file.
  Since we are clearly keeping DOS/Windows, the user will require a swap
  file again later.  By not deleting it, the disc space is reserved for
  that time.

  I don't what to say. I've just parroted FIPS manual because I
  succeeded with it.

  So drink coffee, and pray.

  Run SCANDISK:


       C:\> SCANDISK



  Correct every cluster. You should have no dead cluster now.

  Quit  SCANDISK


  Run DEFRAG on C:


       C:\> DEFRAG C:



  All used clusters are at the beginning of the hard disk.

  Quit DEFRAG

  Make a bootable floppy disk:



       C:\> FORMAT A: /S



  Copy AUTOEXEC.BAT and CONFIG.SYS to the new floppy if you want to keep
  your local features (keyboard keys etc.). Remove the line running
  SMARTDRIVE.EXE in AUTOEXEC.BAT.  Keep a minimal AUTOEXEC.BAT


  On the source box: Copy the fips files restorrb.exe, fips.exe and
  errors.txt to this floppy disk.


      $ mcopy errors.txt fips.exe restorrb.exe a:



  Graham comment: Doesn't this assume that mtools are installed?  If the
  floppy disc is mounted as type msdos, the standard "cp" command should
  do the job, and mtools would not be needed.  I have never used mtools,
  but I have played with DOS files from Linux.

  Yes, this assume that mtools are installed. mcopy is faster to type
  than mkdir, mount, cp, umount, rmdir.

  Boot the target with the floppy. Run fips while reading the section
  "Using FIPS" in the file fips.doc

  Do not forget to answer yes when fips ask for a rootboot saving.

  When everything is ok, save your hard disk space:

       $ cd
       $ rm -rf /tmp/fips-2.0/



  Now you have a nice free space for a new operating system.



  11.

  Debian installation


  I'm not a Debian proselyte since it is my first Debian installation.
  Debian lovers are the same kind of people as Macintosh lovers or Linux
  lovers in the operating systems space.  Nothing else counts. Since I'm
  already a Mac and Lin lover (and French too :-) it was time to fall in
  love.

  Debian is well, clearly and internationally documented. Thanks to all
  those guys who bred this really open distribution.

  I could leave you on your own during the installation process. But
  since we have to interact with a shell during it, the entire process
  will be described in details.

  I know the description is Debian specific. I prefer to give you a
  complete example than nothing except a ``run a shell at the right
  moment and type bla bla...''. I do like concrete examples.

  Simon Forget <sforget@camelot.ca> told me he could not use this howto
  with his Toshiba Libretto 50CT because the kernel could not recognize
  the pcmcia floppy drive during the installation process. I don't know
  why but there is a solution using plip, if you already have a dos
  partition on the target computer.

  This solution is simpler and faster because no floppy drive nor plip
  network are necessary during the installation process. If you are
  interested in this solution, go directly to the section ``Installing
  from a DOS     partition''. I'm keeping the old one installation
  routine because this new one needs a DOS partition that becomes
  superfluous when you definitively want to leave the dark side.



  11.1.

  Preparing the two floppies


  On the source side, mount the cdrom and go in the install directory


        $ mount -t iso9660 /dev/hdd  /cdrom
        $ cd /cdrom/debian/dists/stable/main/disks-i386/current/



  Read the file install.html with a browser or install.txt with a cat,
  less or more (a dog).

  Now, record the install (alias rescue) floppy. Write a "resc1440.bin"
  label on it:


        $ dd if=resc1440.bin of=/dev/fd0H1440



  Record the drivers floppy. Write a "drv1440.bin" label on it:


        $ dd if=drv1440.bin of=/dev/fd0H1440



  Lock the writing on those floppies.

  Now you're ready to start the real installation process.


  11.2.

  The real installation process



  Insert the resc1440.bin floppy on target drive. Reboot your target
  box.



       Welcome to Debian GNU/Linux 2.x!
       ...



  Read the text The prompt is :


       boot:



  Press <ENTER>


       Loading root.bin...........
       loading linux...
       ....



  A new screen:


       Next: Select Color or Monochrome display



  Choose yours with the arrow up/down keys and press <ENTER>


       Next: Continue with the installation



  press <ENTER>


       Software in the Public Interest
               presents
        *** Debian GNU/Linux 2.1 ***
       ...



  Read the text Press <ENTER> (You see <Continue> on the screen)


       Next: Configure the Keyboard



  press <ENTER> Select your country and press <ENTER>


       Next : Partition a Hard Disk



  Press <ENTER>


       Select Disk Drive
       /dev/hda


  If you have several disks choose the good one (where you want to
  install Linux) and Press <ENTER>

  You are now using the program cfdisk. Using cfdisk is safe until you
  decide to [Write] the partition on disk. Leaving cfdisk with [Quit] is
  safe.

  We are going to make just two new primary partitions, a Swap one and a
  big Linux one. If you want to do more partitions, leave some free
  space or extended partitions, you can. But read the documentation
  about Partitioning in the Installation-HOWTO.

  If you previously ran the FIPS program, you see the hda1 partition
  (DOSFAT16). Switch to the next free partition with the up/down arrow
  keys.

  Select [New] with the right/left arrow keys and press <ENTER>

  Select [Primary] and press <ENTER>

  Enter the size of your swap partition. Twice the ram is usual if you
  have less than 128 mega bytes of ram. If you have 2 giga bytes of ram,
  it's because you don't want to swap. In that case, no swap partition
  is needed.

  Select [Beginning] and press <ENTER>

  Select [Type] and press <ENTER> Type 82 (Linux Swap) and press <ENTER>

  Switch to the next free partition with the up/down arrow keys Select
  [New] and press <ENTER>

  Select [Primary] and press <ENTER>

  Enter the size in MB (You can leave the default) and press <ENTER> Its
  type is already Linux. If not, change to Linux (83) with [Type]

  The partition table is defined now. Verify everything looks good. If
  you're not sure, read the documentation with [Help]. If doubts are
  still there, select [Quit] and leave the installation process. Go for
  a walk and restart from the beginning of this section.

  I assume your are confident now.

  Select [Write]


       Are you sure you want to write the partition table to disk?



  Type yes and press <ENTER>

  Select [Quit]  and press <ENTER>


       Next: Initialize and Activate a Swap Partition



  Press <ENTER>


       Please select the partition to initialize as a swap device


  Select /dev/hda2 (normally already selected) Press <ENTER>


       Scan for Bad Blocks?



  select <YES>  and press <ENTER>


       Are you Sure?



  select <YES>  and press <ENTER>


       Initializing swap partition
       ...



       Next: Initialize a Linux Partition



  Press <ENTER>


       Select Partition Please select the to initialize as a Linux "ext2"
       file-system.



  Select /dev/hda3 (normals already selected) and press <ENTER>


       Scan for Bad Blocks?



  Select <YES>  and press <ENTER>


       Are you Sure?



  Select <YES>  and press <ENTER>

  A new page full of numbers.  You can take a rest because it takes some
  time (especially with big hard disk).


       Next: Mount a Previously-Initialized Partition



  Press <ENTER>


       Please select the partition to mount


  Select /dev/hda3 and press <ENTER>


       Mount the /dev/hda3 device as the Root FileSystem?



  Select <Yes< and press <ENTER>


       Next: Install Operating System Kernel and Modules



  Press <ENTER>


       Please select the medium you will use to install the system



  Select /dev/fd0 and press <ENTER>


       Please place the Rescue Floppy in the first floppy drive



  The floppy is already there.
  Select <Continue> and press <ENTER>


       Installing the Rescue Floppy ...
       Please place the Drivers Floppy in the first floppy drive



  Eject the Rescue Floppy and insert the Drivers Floppy, the one I you
  labelled drv1440.bin (you did it, didn't you?).
  Select <Continue> and press <ENTER>


       Installing the Drivers  Floppy ...



  A new screen:


       Next: Configure Device Driver Modules



  Press <ENTER>


       Select Category



  Read the text.



       Please select the category of modules



  Select net and press <ENTER>
  Select plip.


       Module plip



  Select "Install the module in the kernel" and press <ENTER>
  No parameters are needed.
  Select <Ok> and press <ENTER>


       Installation succeeded
       Please press ENTER when you are ready to continue.



  Press <ENTER>

  Select Exit (Finished with these modules) and press <ENTER>
  Then you see the same kind of screen again.
  Select Exit (Finished with these modules) and press <ENTER>


       Next: Configure the Network



  Choose a name, you can use a different name than debian or target.


       Is your system connect to a network?



  Select <No> and press <ENTER>

  STOP STOP STOP.  You see now:


       Next: Install the base system



  Now we need a shell.

  Press Alt F2 and <ENTER> You are in a root shell.



  11.3.

  An installation break: PLIP on the target side


  You are in a root shell.

  Verify the plip module is loaded:


       $ lsmod
       Module    Pages    Used by
       plip          3          0



  Find the exact name of the plip interface:


       $ dmesg
       ...
       NET3 PLIP version 2.2 gniibe@mri.co.jp
       plip1: Parallel port at 0x378, using assigned IRQ 7



  You can find the same information with


       $ cat /proc/kmsg
       ...
       <4>NET3 PLIP version 2.2 gniibe@mri.co.jp
       <4>plip1: Parallel port at 0x378, using assigned IRQ 7
       ...

       Ctrl-c



  Configure the plip interface:


       $ ifconfig plip1 192.168.0.1  pointopoint  192.168.0.2 netmask 255.255.255.255 up



  Verify everything is ok:


       $ ifconfig plip1
       plip0     Link encap:Ethernet  HWaddr FC:FC:C0:A8:00:01
            inet addr:192.168.0.1  P-t-P:192.168.0.2  Mask:255.255.255.255
            UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            Collisions:0
            Interrupt:7 Base address:0x378



  Verify the route to source exists:


       $ route
       Kernel IP routing table
       Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
       127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo



  If not, like in the previous example, add the route to 192.168.0.2,
  the source:


       $ route add -host 192.168.0.2 dev plip1



  Now the route is installed:


       $ route
       Kernel IP routing table
       Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
       192.168.0.2     0.0.0.0         255.255.255.255 UH    0      0        0 plip1
       127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo



  Now you can perform a successful ping from the source server (ping is
  not available on the Debian install process):


       $ ping target
       PING target (192.168.0.1): 56 data bytes
       64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=14.0 ms
       64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=4.3 ms

       --- target ping statistics ---
       2 packets transmitted, 2 packets received, 0% packet loss
       round-trip min/avg/max = 4.3/9.1/14.0 ms



  If it doesn't work, check the Null-Modem cable connection, rerun
  dmesg, ifconfig, route. Verify everything. Take a rest. Restart.

  When the ping is ok, return to the normal installation process:

  On the target: Press Alt F1



  11.4.

  Return to the normal install process


  You are back to the normal installation process.  You should still
  see:


       Next: Install the base system



  Press <ENTER>


       Please select the medium you will use to install the system



  Select nfs and press <ENTER>


       Please choose the NFS server and the mount path ...


  Type: 192.168.0.2:/cdrom
  Press <ENTER>


       Please choose the path inside the mounted NFS filesystem



  Type /debian (normally already there) and press <ENTER>

  If no error message complains about the nfs mount then bravo. You can
  verify this mount by entering the shell again:

  Press Alt F2


       $ mount
       ...
       192.168.0.2:/cdrom on /instmnt type nfs (rw, addr=192.168.0.2)

       $ ls /instmnt/debian
       README                 README.non-US          doc/
       README.CD-manufacture  README.pgp@            hamm/
       README.mirrors.html    TRANS.TBL              tools/
       README.mirrors.txt     dists/



  Press Alt F1

  You're back again to the normal installation process.

  Now the plip nfs cdrom connection is done. Let's go on and finish our
  job.


       Please select the directory containing a file base2_0.tgz



  Select list  and press <ENTER>


       Please Wait
       The installation program is building a list of ...



  A new screen:


       Select Archive Path
       Please select the directory that you will use to install the Base
       System from.



  Only one long item, already selected. Press <ENTER>


       The Base System is being extracted from
       /instmnt/debian/dists/.....



  Take a second rest, you deserve it


       Next: Configure the Base System



  Press <ENTER>


       Select Timezone



  Select your timezone and your directory and press <ENTER>


       Timezone Configuration



  Read and press <ENTER>


       Timezone Configuration.



  An other page Read, select <YES> and press <ENTER>


       Next: Make Linux Bootable Directly From Hard Disk



  Press <ENTER>


       Create Master Boot Record?



  Read
  Select <Yes> and press <ENTER>


       Make Linux the Default Boot Partition?



  Read.
  Select <No> and press <ENTER>


       Next: Make a boot Floppy



  Press <ENTER>


       Change Disk
       Please place a blank floppy disk in the first floppy drive.



  Do it and press <ENTER>
  The floppy is being formated


       Creating a filesystem on the floppy...
       Copying the operating system kernel...



  A new screen:


       Next: Reboot the System



  Press <ENTER>


       Reboot the system ?



  Remove the floppy and press <ENTER>

  The system reboot.  Are you still with the dark side?  I guess yes, so
  insert the boot floppy you've just made and reboot again with Ctrl-
  Alt-Del

  See the boot messages.
  Read the text.


       New password:



  Enter a root password.


       Re-enter new password



  Do it.


       Shall I create a normal user account now? [Y/n]



  Enter n and press <ENTER>


       Shall I install shadow passwords? [Y/n]



  Enter y and press <ENTER>


       Do you want to use a PPP connection to install



  Enter n and press <ENTER>


       Now you may choose one of several selections ...
       Do you want to perform this step?



  Enter n and press <ENTER>


       I'm going to start the 'dselect' program...



  Press <ENTER>
  Select [Q]uit and press <ENTER>


       You may now login as 'root' at the login: prompt...
       ...
       debian login:



  Enter root.


       Password:



  Enter the root password.


      ...
       debian:~#



  The system is installed and working. CONGRATULATIONS!

  My job stops here. Read the install documentation of your distribution
  and go on with the Unix system administration job.

  When you reboot your system, the plip connection won't be in good
  shape. But now you now what to do.

  I suggest you some work:

    Configure the plip interface for the normal boot process (in the
     file /etc/init.d/network).


    Configure /etc/fstat on the target to mount simply the remote
     source cdrom via nfs.

           source:/cdrom              /cdrom   nfs     noauto,intr 1 2



    Learn Lilo. Configure it for your DOS and Linux systems and install
     it on a floppy.


    When you master Lilo on the floppy, install it on your hard drive.


    Install and configure the X Window System.

    Have fun.

    Mail me a feedback.



  12.

  Installing Slackware, RedHat, Caldera

  This section is written by Florent SAUNIER.
  sabetflo@freesurf.fr


  I have performed a Slakware installation using PLIP very succesfully.
  I have also been able to install REDHAT and caldera Open linux using
  the very same method described below.

  As previously specified by Gilles, a slakware installation requires
  everything specified in the chapter "What do you need" with time
  increased to 10 hours if you desire to install xfree(86) and some
  developpement tools.

  Further on, you need to read first Gilles installation as I set up
  mine accordingly to his preset.

  Finally, I have performed Slakware and Caldera installation on
  Twinhead 550C laptop, with 8Mb Ram, and 2Gbytes Hard drive.


  12.1.

  Slakware installation


    1- Make 2 disks (boot and root) and prepare a plip disk

    2- Install PLIP module

    3- Create a NFS drive to use PLIP with

    4- Launch the Slakware (or Caldera) Installation

    5- Drink all remainder of coffee and go to bed waiting completion
     of installation

  12.1.1.  Making boot,root and plip disks

  To install slakware verion using ATAPI CDROM from your source you will
  need standard kernel image bareapm.i or bare.i. If you want to make an
  install from SCSI support take scsinet.i image.

  Other image exists, such as net.i which sould include PLIP function
  but on my i486 laptop, Twinhead550C, the imagedoes not work.  I have
  experienced that the standard image allways work on any laptop I have
  used.



  12.1.1.1.

  1a- creating the boot and root disks.


  From ms-dos create the boot disk by typing:


      rawrite bareapm.i



  then create the root disks:

      rawrite color.gz.a  (if you are using color screen)



  12.1.1.2.

  1b- Creating the PLIP disk

  On a dos format disk copy the following file :

    1- plip.o (object program for the plip tool)

    2- parport_pc

    3- parport

     Those programs are compulsory prior a PLIP install, you will find
     them into the slakware installation CDROM under the directory
     /MODULES.  Same apply to the Caldera installtion. MAke find file if
     you cannot find them.


  12.1.1.3.

  1c- launching the installation.

  Insert your boot disk in your Laptop and start computer.  Follow the
  installtion procedure and wait till the system ask for the root disks.
  Insert it and wait for the prompt login: "Slakware login".

  To start the Slakware installation you must log as root. Type then
  root at the prompt. Be aware that at that time of installation your
  keyboard is still qwerty.

  12.1.2.

  2a- Install PLIP module

  Install your source computer according to Gille indication.  From
  chapter 7 to 9.

  Install PLIP on the target.  To install PLIP module you need to launch
  program from your PLIP disk.  Remember you did it no !!!

  Access to your floppy disk by:



            & mount /dev/fd0h1440 /floppy
            & cd /floppy
            & insmod parport      'it will install your parallel port
            & insmod parport_pc   'it will set it up
            & insmod plip         'it will install plip module



  If during the PLIP installation you encounter an error. It means that
  your paralell port has not been correctly installed. you may type
  again the instruction above, it does work sometimes !!, or go to the
  parport directory and write appopriate setting.

        & cd /proc/parport/0
        & vi IRQ            'Verify that 7 is written in it if you are using
                            'that interruption'



  Look at chapter 8,"PLIP on the source side" to get the proper setting.

  You should not bother too much as at 95% on the 5 laptop I have
  installed everyting went smoothly.

  12.1.3.

  3a- Now create your NFS drive.

  From that point I have choosed to use the creation of a NFS drive on
  the target computer. Then I will make an installation using the "From
  directory" option rather than from an nfs support.

  Do not forget you are still in US keyboard.  Of course you have set up
  your source accordingly to chapter 7, "Network parameters".  You then
  did ping your source, but yet you cannot ping the target.

  So the first step is to configure your PLIP connection: On the target
  type:

  & ifconfig plip0 192.168.0.2 pointopoint 192.168.0.1 netmask 255.255.255.255 up



  Test your Plip configuration by pinging the target from the source

       & ping target



  then create your nfs drive:

       & cd /
       & mkdir nfsdrive
       mount -t nfs 192.168.0.2:/cdrom /nfstest



  You have just configure a drive linked to your source directory /cdrom
  were you suppose to have slakware CDROM connected to, from your target
  directory call nfstest

  Now everything is set up and you are ready to launch the Slakware
  installation program, by typing "setup".

  note:if you do not have enough memory, below 8mb setup will not being
  launched then, you will have to make a swap space to allow the program
  to work.  first Create you disk partition with your swap by typing &
  fdisk note your swap disk name eg /hda3 quit fdisk with 'w' Once its
  done type:

           & mkswap -c /dev/hda3
           & swapon /dev/ha3



  Your swap is now set up.  You may then launch the "setup" program.


  12.1.4.

  4a- Installing Slakware

  the setup programm shows various menu:

    HELP - Help file

    KEYMAP - Keyboard select (Azerty at least !!!)

    ADDSWAP - Create and select swap

    TARGET - Select target

    SOURCE - select the source

    SELECT - Select pakages to install

    CONFIGURE - Set up your linux system and make LILO

    EXIT - bye bye setup

  4b- Select your keyboard, for French take -Fr-latin1.map

  4c- Select your swap partition if not already configured

  4d- Select the target, default is '/'

  4e- Select the source. Here is the tricky stuff choose Installing from
  a drive type the drive so : /nfsdrive/slakware slakware CDROM
  directory

  4f- Select packages to install

  4g- Wait, Wait, Wait and Wait........

  12.2.

  Caldera Installation


  I told you that Caldera work also with that install. In fact as
  Caldera launch automatically is Setup program, once you arrived at the
  menu were you suppose to choose your source disks type ALT F2 and go
  to another screen then log as root and make your nfs drive as
  described above in point 2 to 4.  Then go back to the installtion
  screen with ALT F1, and type the famous nfsdrive as your source
  directory. Caldera will than install without problem.

  12.3.

  Troubleshooting


  If you are experiencing any trouble with that installation you may
  report it tome and I'll try to help as best as I can.

  13.

  Installing from a DOS partition


  You can use this section if you already have a DOS partition on your
  target computer. I think it is a faster installation method.

  Read the section 5.3.1 "Installing from a DOS partition" from
  install.txt. This section is also available on the Debian CD in the
  html file ch-install-methods.html.

  I just going to help you to make the first point : "1. Get the
  following files from your nearest Debian" repository"

  The transfer is easy with  tomsrtbt.

  Export the source cdrom drive via nfs.

  Read the file tomsrtbt.FAQ

  Create the floppy under  DOS or Linux, you have the choice.


       Linux installation:
       a) extract the .tar.gz archive
       b) Be root
       c) Be in the tomsrtbt-<version> directory
       d) Have a blank floppy with no bad sectors
       e) Do './install.s'



  Boot the target with the floppy. Log in  root.


        $ insmod plip
        $ ifconfig plip1 192.168.0.1 pointopoint 192.168.0.2 \
        netmask 255.255.255.255 up
        $ route add -host 192.168.0.2 dev plip1
        $ mount -t nfs 192.168.0.2:/cdrom /cdrom
        $ mkdir /c
        $ mount -t msdos /dev/hda1 /c
        $ mkdir /c/debian
        $ cd /cdrom/dists/stable/main/disks-i386/current/
        $ cp resc1440.bin drv1440.bin base2_1.tgz root.bin linux \
        install.bat loadlin.exe /c/debian



  The \ means the command line continues on the next line.  The cp
  command takes some time. When finished, remove the floppy and then :

        $ reboot



  Boot under DOS.


        C:\> cd debian
        C:\DEBIAN> install



  Here you go to install Debian from a DOS partition. You do not need
  plip nor floppy during the installation process. Everything deals with
  the hard drive. Read the Debian install documentation, it is a very
  good and clear one.



  14.

  Install the plip interface permanently



  14.1.

  On the source side


  I use an old Linux RedHat 4.1 distribution. The location of the files
  can be different on other GNU/Linux distributions but the philosophy
  is the same (The Unix System V convention).

  Create the file /etc/rc.d/init.d/plip with this content:



  #!/bin/sh

  ##############################
  # file /etc/rc.d/init.d/plip #
  ##############################

  # See how we were called.
  case "$1" in
    start)
          # Start daemons.
          /bin/echo "Starting plip interface: "
          /bin/echo "Doing /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 up"
          /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 up
          /bin/echo  "Doing /bin/ping -q -c 4 target"
          /bin/ping -q -c 4 target
          /bin/echo "Starting plip interface: done"
          ;;
    stop)
          # Stop daemons.
          /bin/echo  "Shutting down plip interface:"
          /bin/echo  "Doing /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 down"
          /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 down
          /bin/echo  "Doing /sbin/modprobe  -r plip "
          /sbin/modprobe  -r plip
          /bin/echo "Shutting down plip interface: done"
          ;;
    *)
          echo "Usage: $0 {start|stop}"
          exit 1
  esac

  exit 0

  # === End of File ===



  Only the ifconfig lines are strictly necessary. Perhaps you will need
  to add some modprobe commands if you don't use kerneld nor the kmod
  feature of new kernels 2.2.x

  Create the symbolic links in the rc*.d directories:



        $ cd /etc/rc.d/rc0.d/
        $ ln -s ../init.d/plip K97plip

        $ cd /etc/rc.d/rc1.d/
        $ ln -s ../init.d/plip K92plip

        $ cd /etc/rc.d/rc3.d/
        $ ln -s ../init.d/plip S11plip


        $ cd /etc/rc.d/rc5.d/
        $ ln -s ../init.d/plip S11plip



  You can choose other numbers. Be aware to place the K??plip files
  after the ones that shutdown services depending on plip. Be aware to
  place the S??plip files before the ones that start services depending
  on plip, nfs, nis, ftp, http etc.

  Update the /etc/conf.modules file:


  # /etc/conf.modules
  ...
  alias parport_lowlevel parport_pc
  post-install parport_pc echo 7 >  /proc/parport/0/irq
  ...



  Choose the good irq number (7 is mine, not yours).

  Test the plip shell:


        $ /etc/rc.d/init.d/plip
        Usage: /etc/rc.d/init.d/plip {start|stop}

        $ /etc/rc.d/init.d/plip stop
        Shutting down plip interface:
        Doing /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 down
        Doing /sbin/modprobe  -r plip
        Shutting down plip interface: done

        $ /etc/rc.d/init.d/plip start
        Starting plip interface:
        Doing /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 up
        Doing /bin/ping -q -c 4 target
        PING target (192.168.0.1): 56 data bytes

        --- target ping statistics ---
        4 packets transmitted, 4 packets received, 0% packet loss
        round-trip min/avg/max = 4.4/8.3/14.0 ms
        Starting plip interface: done



  Updating the start scripts is a good accasion to reboot a Unix system,
  to check the modifications. Do it:


        $ init 6



  14.2.

  On the target side


  Update the file /etc/init.d/network:



        #! /bin/sh
        #######################
        # /etc/init.d/network #
        #######################

        ifconfig lo 127.0.0.1
        route add -net 127.0.0.0

        ifconfig plip1 192.168.0.1 pointopoint 192.168.0.2 netmask 255.255.255.255 up
        route add -host 192.168.0.2 dev plip1



  That's all because the parport features are directly in the kernel.

  Updating the start scripts is a good occasion to reboot a Unix system,
  to check the modifications. Do it:


        $ init 6



  15.

  Need to compile a new kernel ?


  Several times during the source server configuration we mentioned that
  a kernel compilation on the source computer could be needed.

  I list the things you need to change or set.  If you have never
  compile a kernel, read the Kernel-HOWTO.



      Loadable module support  --->
          [*] Enable loadable module support

      General setup  --->
          [*] Networking support
          <M> Parallel port support
          <M>    PC-style hardware

      Networking options  --->
          [*] TCP/IP networking

      Network device support  --->
          [*] Network device support
          <*> Dummy net driver support
          <M> PLIP (parallel port) support
          < > or <M>  PPP (point-to-point) support
          < > or <M> SLIP (serial line) support


      Character devices  --->
          <M> Parallel printer support


      Filesystems  --->
          [*] /proc filesystem support
          <*> or <M> ISO 9660 CDROM filesystem support
          Network File Systems  --->
              <*> or <M> NFS filesystem support



  16.

  What's new



     v1.22, 16 June 2000

     

       Added a mention to PARTED http://www.gnu.org/software/parted as
        told by Andrew Clausen (clausen@gnu.org).



       Added section Installing Slackware, RedHat, or Caldera, by
        Florent SAUNIER.



       Corrected some English faults, thanks to Graham and Tomas.



     v1.15,  26 November 1999


       The section "What's new". It is this section.



       The section  "Install the plip interface permanently".



       The section "List of contributors and acknowledgements".



       Made the different chapters dealing with the detailed Debian
        installation be a single chapter with the actual chapters as
        just subsections.



       Made a new section "Installing from a DOS partition". A simpler
        and faster method.


  17.

  To do



    Check a kernel compilation from scratch (no last .config file) with
     only the options I gave. Add the missing ones if any.



    Make the Mandrake, SuSE, Turbo Linux, and Stampede detailed
     installation chapters. Contributions are welcome. Gilles Lamiral
     won't do that job unless given new computers and CDs.


     Debian (done), Red Hat (done), Slackware (done), Caldera OpenLinux
     (done).



    Make "The cdrom nfs server side" chapter become simply "the server
     side" chapter with subsections like "cdrom medium", "zip medium",
     "hard disk medium", and "ftp server" "nfs server", "samba server"
     "http server". Again, contributions are welcome.



  18.

  List of contributors and acknowledgements

  I thank all the people in this list of contributors or projects. If
  you think I forgot someone, do not hesitate to complain.


     Werner Heuser <wehe@snafu.de>
        He said: "yesterday I had time enough to read your document.
        It's great and in the next issue of my HOWTO (probably 2.
        December) I will make a link to it."

        He did.



     LDP <linux-howto@metalab.unc.edu>
        The Linux Documentation Project accepted the PLIP-Install-HOWTO
        without any hesitation.


     Simon Forget <sforget@camelot.ca>
        Simon had a problem with his pcmcia floppy drive. So he made me
        search a solution that is, in fact, simpler and faster.



     Andrew Clausen <clausen@gnu.org>
        Andrew suggested me to talk about parted
        http://www.gnu.org/software/parted



     Florent SAUNIER <FlorentSAUNIER@sabetflo.freesurf.fr>
        Florent wrote the section called "Installing Slackware/Caldera".


     Graham Bosworth <graham@bozikins.connectfree.co.uk>
        Graham corrected my bad english all over the document.


     Tomas Pospisek  <tpo@spin.ch>
        Tomas also corrected my bad english.



  Linux PPP HOWTO
  Robert Hart, hartr@interweft.com.au
  v3.0, 31 March 1997

  This document shows how to connect your Linux PC to a PPP server, how
  to use PPP to link two LANs together and provides one method of set-
  ting up your Linux computer as a PPP server.The document also provides
  help in debugging non-functional PPP connections.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Clients and Servers
     1.2 Differences between Linux distributions
     1.3 Distribution specific PPP configuration tools

  2. IP Numbers

  3. Aims of this Document

     3.1 Setting up a PPP Client
     3.2 Linking two LANs or a LAN to the Internet using PPP
     3.3 Setting up a PPP server
     3.4 Using PPP over a direct null modem connection
     3.5 This document at present does NOT cover...

  4. Software versions covered

  5. Other Useful/Important Documents

     5.1 Useful Linux Mailing Lists

  6. Overview of what has to be done to get PPP working as a client

     6.1 Obtaining/Installing the software
     6.2 Compiling PPP support into the kernel
     6.3 Obtaining information from your ISP
     6.4 Configuring your modem and serial port
     6.5 Setting up Name to Address Resolution (DNS)
     6.6 PPP and root Privileges
     6.7 Checking your distribution PPP Files and setting up the PPP Options
     6.8 If your PPP server uses PAP (Password Authentication Protocol)
     6.9 Connecting to the PPP server by hand
     6.10 Automating your PPP Connection
     6.11 Shutting down the link
     6.12 If you have problems
     6.13 After the link comes up
     6.14 Problems with standard IP services on a Dynamic IP number PPP link

  7. Configuring your Linux Kernel

     7.1 Installing the Linux Kernel source
     7.2 Knowing your hardware
     7.3 Kernel compilation - the Linux 1.2.13 kernel
     7.4 Kernel compilation - the Linux 1.3.x and 2.0.x kernels
     7.5 Note on PPP-2.2 and
     7.6 General kernel config considerations for PPP

  8. Getting the Information you need about the PPP server

  9. Configuring your modem and serial port

     9.1 A note about serial ports and speed capabilities
     9.2 Serial Port Names
     9.3 Configuring your modem
     9.4 Note on Serial Flow Control
     9.5 Testing your modem for dial out

  10. Setting up Name to Address Resolution (DNS)

     10.1 The
     10.2 The

  11. Using PPP and root privileges

  12. Setting up the PPP connection files
     12.1 The supplied options.tpl file
     12.2 What options should I use? (No PAP/CHAP)

  13. If your PPP server uses PAP (Password Authentication Protocol)

     13.1 Using MSCHAP
     13.2 The PAP/CHAP secrets file
     13.3 The PAP secrets file
     13.4 The CHAP secrets file
     13.5 Handling multiple PAP-authenticated connections

  14. Setting up the PPP connection manually

  15. Automating your connections - Creating the connection scripts

     15.1 Connection scripts for User name/Password Authentication
     15.2 The ppp-on script
     15.3 Editing the supplied PPP startup scripts
        15.3.1 The ppp-on script
        15.3.2 The ppp-on-dialer script
     15.4 What a Chat script means...
        15.4.1 Starting PPP at the server end
     15.5 A chat script for PAP/CHAP authenticated connections
     15.6 The pppd

  16. Testing your connection script

  17. Shutting down the PPP link

  18. Debugging

     18.1 I have compiled PPP support into the kernel, but...
        18.1.1 Are you booting the right kernel? Whilst you
        18.1.2 Did you compile ppp kernel support as a module?
        18.1.3 Are you using the correct version of PPP for your kernel?
        18.1.4 Are you running pppd as root?
     18.2 My modem connects but ppp never starts up
     18.3 The syslog says "
        18.3.1 You are not correctly logging into the server
        18.3.2 You are not starting PPP on the server
        18.3.3 The remote PPP process is slow to start
     18.4 Default route not set
     18.5 Other Problems

  19. Getting Help when totally stuck

  20. Common Problems once the link is working

     20.1 I can't see beyond the PPP server I connect to
     20.2 I can send email, but not receive it
     20.3 Why can't people finger, WWW, gopher, talk etc to my machine?

  21. Using Internet services with Dynamic IP numbers

     21.1 Setting up email
     21.2 Setting Up a local Name server

  22. Linking two networks using PPP

     22.1 Setting up the IP numbers
     22.2 Setting up the routing
     22.3 Network security

  23. After the link comes up - the

     23.1 Special routing
     23.2 Handling email queues
     23.3 A sample
     23.4 Handling email

  24. Using

  25. Routing issues on a LAN

     25.1 Note on Security

  26. Setting up a PPP server

     26.1 Kernel compilation
     26.2 Overview of the server system
     26.3 Getting the software together
     26.4 Setting up standard (shell access) dialup.
     26.5 Setting up the PPP options files
     26.6 Setting pppd up to allow users to (successfully) run it
     26.7 Setting up the global alias for pppd

  27. Using PPP across a null modem (direct serial) connection



  ______________________________________________________________________

  Copyright

  This document is distributed under the terms of the GPL (GNU Public
  License).


  Distribution


  This document will be posted to comp.os.linux.answers as new versions
  of the document are produced. It is also available in HTML format at:-


  o  Linux Howto Index <http://sunsite.unc.edu/mdw/linux.html#howto>

  o  PPP-HOWTO <http://www.interweft.com.au/other/ppp-howto/ppp-
     howto.html>


  Other formats (SGML, ASCII, postscript, DVI) are available from Howtos
  - other formats <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-
  formats>.


  As sunsite.unc.edu carries a very heavy load, please use an
  appropriate mirror site close to you.


  Acknowledgements


  A growing number of people have provided me with assistance in
  preparing this document. Special thanks go to Al Longyear for the
  guidance on PPP itself (if there are mistakes here, they are mine not
  his), Greg Hankins (maintainer of the Linux Howto system)and Debi
  Tackett (of MaximumAccess.com) for many helpful suggestions on style,
  content order, logic and clarity of explanations.



  Finally, to the many people who have contacted me by email offering
  comments - my thanks. As with all HOWTO authors,  the satisfaction of
  helping is all the payment we receive and it is enough. By writing
  this HOWTO I am repaying in a small way the debt I - and all other
  Linux users - owe to the people who write and maintain our OS of
  choice.


  1.  Introduction

  PPP (the Point to Point Protocol) is a mechanism for creating and
  running IP  (the Internet Protocol) and other network protocols over a
  serial link - be that a direct serial connection (using a null-modem
  cable), over a telnet established link or a link made using modems and
  telephone lines (and of course using digital lines such as ISDN).


  Using PPP, you can connect your Linux PC to a PPP server and access
  the resources of the network to which the server is connected (almost)
  as if you were directly connected to that network.


  You can also set up your Linux PC as a PPP server, so that other
  computers can dial into your computer and access the resources on your
  local PC and/or network.


  As PPP is a peer-to-peer system, you can also use PPP on two Linux PCs
  to link together two networks (or a local network to the Internet),
  creating a Wide Area Network (WAN).


  One major difference between PPP and an Ethernet connection is of
  course speed - a standard Ethernet connection operates at 10 Mbs (Mega
  - million bits per second) maximum theoretical throughput, whereas an
  analogue modem operates at speeds up to 56 kbps (kilo - thousand bits
  per second).


  Also, depending on the type of PPP connection, there may be some
  limitations in usage of some applications and services.


  1.1.  Clients and Servers

  PPP is strictly a peer to peer protocol; there is (technically) no
  difference between the machine that dials in and the machine that is
  dialed into. However, for clarity's sake, it is useful to think in
  terms of servers and clients.


  When you dial into a site to establish a PPP connection, you are a
  client. The machine to which you connect is the server.


  When you are setting up a Linux box to receive and handle dial in PPP
  connections, you are setting up a PPP server.


  Any Linux PC can be both a PPP server and client - even simultaneously
  if you have more than one serial port (and modem if necessary). As
  stated above, there is no real difference between clients and servers
  as far as PPP is concerned, once the connection is made.



  This document refers to the machine that initiates the call (that
  dials in) as the CLIENT, whilst the machine that answers the
  telephone, checks the authentication of the dial in request (using
  user names, passwords and possibly other mechanisms) is referred to as
  the SERVER.


  The use of PPP as a client to link one or more machines at a location
  into the Internet is, probably, the one in which  most people are
  interested - that is using their Linux PC as a client.


  The procedure described in this document will allow you to establish
  and automate your Internet connection.


  This document will also give you guidance in setting up your Linux PC
  as a PPP server and in linking two LANs together (with full routing)
  using PPP (this is frequently characterised as establishing a WAN -
  wide area network - link).


  1.2.  Differences between Linux distributions

  There are many different Linux distributions and they all have their
  own idiosyncrasies and ways of doing things.


  In particular, there are two different ways a Linux (and Unix)
  computer actually starts up, configures its interfaces and so forth.


  These are BSD system initialisation and System V system
  initialisation. If you dip into some of the Unix news groups, you will
  find occasional religious wars between proponents of these two
  systems. If that sort of thing amuses you, have fun burning bandwidth
  and join in!


  Possibly the most widely used distributions are


  o  Slackware
     which uses BSD style system initialisation

  o  Red Hat (and its former associate Caldera)
     which use SysV system initialisation (although in a slightly
     modified form)

  o  Debian
     which uses SysV system initialisation


  BSD style initialisation typically keeps its initialisation files in
  /etc/... and these files are:-


  ______________________________________________________________________
          /etc/rc
          /etc/rc.local
          /etc/rc.serial
                  (and possibly other files)
  ______________________________________________________________________



  Of recent times, some BSD system initialisation schemes use a
  /etc/rc.d...  directory to hold the start up file rather than putting
  everything into /etc.



  System V initialisation keeps its initialisation files in directories
  under /etc/... or  /etc/rc.d/... and a number of subdirectories under
  there:-


  ______________________________________________________________________
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 init.d
  -rwxr-xr-x   1 root     root         1776 Feb  9 05:01 rc
  -rwxr-xr-x   1 root     root          820 Jan  2  1996 rc.local
  -rwxr-xr-x   1 root     root         2567 Jul  5 20:30 rc.sysinit
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc0.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc1.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc2.d
  drwxr-xr-x   2 root     root         1024 Jul 18 18:07 rc3.d
  drwxr-xr-x   2 root     root         1024 May 27  1995 rc4.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc5.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc6.d
  ______________________________________________________________________



  If you are trying to track down where your Ethernet interface and
  associated network routes are actually configured, you will need to
  track through these files to actually find where the commands are that
  do this.


  1.3.  Distribution specific PPP configuration tools

  On some installations (for example Red Hat and Caldera), there is a X
  Windows configured PPP dial up system. This HOWTO does not cover these
  distribution specific tools. If you are having problems with them,
  contact the distributors directly!



  For Red Hat 4.x users, there is now a Red Hat PPP-TIP
  <http://www.interweft.com.au> in the Linux resources area and also
  from Red Hat Software <http://www.redhat.com> in the support area.


  2.  IP Numbers

  Every device that connects to the Internet must have its own, unique
  IP number. These are assigned centrally by a designated authority for
  each country.


  If you are connecting a local area network (LAN) to the Internet, YOU
  MUST use an IP number from your own assigned network range for all the
  computers and devices you have on your LAN. You MUST NOT pick IP
  numbers out of the air and use these whilst connecting to another LAN
  (let alone the Internet). At worst this will simply not work at all
  and could cause total havoc as your 'stolen' IP number starts
  interfering with the communications of another computer that is
  already using the IP number you have picked out of the air.



  Please note that the IP numbers used throughout this document (with
  some exceptions) are from the 'unconnected network numbers' series
  that are reserved for use by networks that are not (ever) connected to
  the Internet.


  There are IP numbers that are specifically dedicated to LANs that do
  not connect to the Internet. The IP number sequences are:-


  o  One A Class Network Address
     10.0.0.0 (netmask 255.0.0.0)

  o  16 B Class Network Addresses
     172.16.0.0 - 172.31.0.0 (netmask 255.255.0.0)

  o  256 C Class Network Addresses
     192.168.0.0 - 192.168.255.0 (netmask 255.255.255.0)


  If you have a LAN for which you have not been allocated IP numbers by
  the responsible authority in your country, you should use one of the
  network numbers from the above sequences for your machines.


  These numbers should never be used on the Internet.


  However, they can be used for the local Ethernet on a machine that is
  connecting to the Internet. This is because IP numbers are actually
  allocated to a network interface, not to a computer. So whilst your
  Ethernet interface may use 10.0.0.1 (for example), when you hook onto
  the Internet using PPP, your PPP interface will be given another (and
  valid) IP number by the server. Your PC will have Internet
  connectivity, but the other computers on your LAN will not.


  However, using Linux and the IP Masquerade (also known as NAT -
  Network address Translation) capabilities of the Linux and the ipfwadm
  software, you can connect your LAN to the Internet (with some
  restriction of services), even if you do not have valid IP numbers for
  the machines on your Ethernet.


  For more information on how to do this see the IP Masquerade mini-
  HOWTO at Linux IP Masquerade mini HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/mini/IP-Masquerade>


  For most users, who are connecting a single machine to an Internet
  service provider via PPP, obtaining an IP number (or more accurately,
  a network number) will not be necessary.


  If you wish to connect a small LAN to the Internet, many Internet
  Service Providers (ISPs) can provide you with a dedicated subnet (a
  specific sequence of IP numbers) from their existing IP address space.
  Alternatively, use IP Masquerading.


  For users, who are connecting a single PC to the Internet via an ISP,
  most providers use dynamic IP number assignment. That is, as part of
  the connection process, the PPP service you contact will tell your
  machine what IP number to use for the PPP interface during the current
  session. This number will not be the same every time you connect to
  your ISP.
  With dynamic IP numbers, you are not given the same IP number each
  time you connect. This has implications for server type applications
  on your Linux machine such as sendmail, ftpd, httpd and so forth.
  These services are based on the premise that the computer offering the
  service is accessible at the same IP number all the time (or at least
  the same fully qualified domain name - FQDN - and that DNS resolution
  of the name to IP address is available).


  The limitations of service due to dynamic IP number assignment (and
  ways to work around these, where possible) are discussed later in the
  document.


  3.  Aims of this Document

  3.1.  Setting up a PPP Client

  This document provides guidance to people who wish to use Linux and
  PPP to dial into a PPP server and set up an IP connection using PPP.
  It assumes that PPP has been compiled and installed on your Linux
  machine (but does briefly cover reconfiguring/recompiling your kernel
  to include PPP support).


  Whilst DIP (the standard way of creating a SLIP connection) can be
  used to set up a PPP connection, DIP scripts are generally quite
  complex. For this reason, this document does NOT cover using DIP to
  set up a PPP connection.


  Instead, this document describes the standard Linux PPP software
  (chat/pppd).


  3.2.  Linking two LANs or a LAN to the Internet using PPP

  This document provides (basic) information on linking two LANs or a
  LAN to the Internet using PPP.


  3.3.  Setting up a PPP server

  This document provides guidance on how to configure your Linux PC as a
  PPP server (allowing other people to dial into your Linux PC and
  establish a PPP connection).


  You should note that there are a myriad of ways of setting up Linux as
  a PPP server. This document gives one method - that used by the author
  to set up several small PPP servers (each of 16 modems).


  This method is known to work well. However, it is not necessarily the
  best method.


  3.4.  Using PPP over a direct null modem connection

  This document provides a brief overview of using PPP to link two Linux
  PCs via a null modem cable. It is possible to link other OS's to Linux
  this way as well. To do so, you will need to consult the documentation
  for the operating system you are interested in.



  3.5.  This document at present does NOT cover...


  o  Compiling the PPP daemon software
     See the documentation that comes with the version of pppd you are
     using.

  o  Connecting and configuring a modem to Linux (in detail)
     See the Serial-HOWTO and for modem specific initialisation, see
     Modem Setup Information <http://www.in.net/info/modems/index.html>
     for information that may help you to configure your modem.

  o  Using DIP to make PPP connections
     Use chat instead...

  o  Using socks or IP Masquerade
     There are perfectly good documents already covering these two
     packages.

  o  Using diald to set up an automated connection
     See the diald documentation for information on this.

  o  Using EQL to gang together two modems into a single PPP link.

  o  Distribution specific PPP connection methods (such as the Red Hat
     4.x network configuration tool.
     See the distribution for documentation on the methods used.

  o  The growing number of tools available to automate PPP set up
     See the appropriate documentation.


  4.  Software versions covered

  This HOWTO assumes that you are using a Linux 1.2.x kernel with the
  PPP 2.1.2 software or Linux 1.3.X/2.0.x and PPP 2.2.


  At the time of writing, the latest official version of PPP available
  for Linux is ppp-2.2f. The new version (ppp-2.3) is still in beta.


  It is possible to use PPP 2.2.0 with kernel 1.2.13. This requires
  kernel patches. It is recommended that version 1.2.13 kernel users
  move up to ppp-2.2 as it includes several bug fixes and enhancements.


  Also, you should particularly note that you cannot use the PPP 2.1.2
  software with Linux kernel version 2.0.X.


  Please note that this document does NOT cover problems arising from
  the use of loadable modules for Linux kernel 2.0.x. Please see the
  kerneld mini-HOWTO and the kernel/module 2.0.x documentation (in the
  Linux 2.0.x source tree at /usr/src/linux/Documentation/...).


  As this document is designed to assist new users, it is highly
  recommended that you use a version of the Linux kernel and the
  appropriate PPP version that are known to be stable together.


  5.  Other Useful/Important Documents

  Users are advised to read :-

  o  the documentation that comes with the PPP package;

  o  the pppd and chat man pages;
     (use man chat and man pppd to explore these)

  o  the Linux Network Administration Guide (NAG);
     see The Network Administrators' Guide
     <http://sunsite.unc.edu/mdw/LDP-books/nag-1.0/nag.html>

  o  the Net-2/3 HOWTO;
     see Linux NET-2/3-HOWTO
     <http://sunsite.unc.edu/mdw/HOWTO/NET-2-HOWTO.html>

  o  Linux kernel documentation installed in
     /usr/src/linux/Documentation when you install the Linux source
     code;

  o  The modem setup information page - see Modem Setup Information
     <http://www.in.net/info/modems/index.html>

  o  The excellent Unix/Linux books published by O'Reilly and
     Associates. See (O'Reilly and Associates On-Line Catalogue <
     http://www.ora.com/>). If you are new to Unix/Linux, run (don't
     walk) to your nearest computer book shop and invest in a number of
     these immediately!

  o  The PPP-FAQ maintained by Al Longyear, available from Linux PPP-FAQ
     <ftp://sunsite.unc.edu/pub/Linux/docs/faqs>.
     This contains a great deal of useful information in question/answer
     format that is very useful when working out why PPP is not working
     (properly).

  o  The growing number of Linux books from various publishing houses
     and authors;
     You are actively encouraged to check the currency of these books.
     Linux development and distributions tend to evolve fairly rapidly,
     whilst the revision of books move (generally) much more slowly!
     Buying an excellent book (and there are many) that is now out of
     date will cause new users considerable confusion and frustration.


  The best general starting point for Linux documentation is The Linux
  Documentation Project Home Page <http://sunsite.unc.edu/mdw/>. The
  HOWTO's tend to be revised reasonably regularly.


  Whilst you can use this document to create your PPP link without
  reading any of these documents, you will have a far better
  understanding of what is going on if you do so! You will also be able
  to address problems yourself (or at least ask more intelligent
  questions on the comp.os.linux... newsgroups or Linux mailing lists).


  These documents (as well as various others, including the relevant
  RFCs) provide additional and more detailed explanation than is
  possible in this HOWTO.


  If you are connecting a LAN to the Internet using PPP, you will need
  to know a reasonable amount about TCP/IP networking. In addition to
  the documents above, you will find the O'Reilly books "TCP/IP Network
  Administration" and "Building Internet Firewalls" of considerable
  benefit!



  5.1.  Useful Linux Mailing Lists

  There are many Linux mailing lists that operate as a means of
  communication between users of many levels of ability. By all means
  subscribe to those that interest you and contribute your expertise and
  views.


  A word to the wise: some lists are specifically aimed at "high
  powered" users and/or specific topics. Whilst no-one will complain if
  you 'lurk' (subscribe but don't post messages), you are likely to earn
  heated comments (if not outright flames) if you post 'newbie'
  questions to inappropriate lists.


  This is not because guru level users hate new users, but because these
  lists are there to handle the specific issues at particular levels of
  difficulty.


  By all means join the lists that offer open subscription, but keep
  your comments relevant to the subject of the list!


  A good starting point for Linux mailing lists is Linux Mailing List
  Directory <http://summer.snu.ac.kr/~djshin/linux/mail-
  list/index.shtml>


  6.  Overview of what has to be done to get PPP working as a client

  This document contains a great deal of information - and with each
  version it grows!



  As a consequence, this section aims to provide a concise overview of
  the actions you will need to take to get your Linux system connected
  as a client to a PPP server.


  6.1.  Obtaining/Installing the software

  If your Linux distribution does not include the PPP software, you will
  need to obtain this from the Linux PPP daemon
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/serial/ppp/ppp-2.2.0f.tar.gz>.


  This is the latest official version at the time of writing. However,
  choose the latest version available from this site (ppp-2.3 is in beta
  at the time of writing and should be released soon).


  The PPP package contains instructions on how to compile and install
  the software so this HOWTO does not!


  6.2.  Compiling PPP support into the kernel

  Linux PPP operations come in two parts

  o  the PPP daemon mentioned above

  o  kernel support for PPP


  Many distributions seem to provide PPP kernel support in their default
  installation kernels, but others do not.


  If at boot your kernel reports messages like


  ______________________________________________________________________
  PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.
  PPP line discipline registered.
  ______________________________________________________________________



  your kernel does have PPP support compiled in.


  That said, you will probably want to compile your own kernel whatever
  your distribution to provide the most efficient use of system
  resources given your particular hardware configuration. It is worth
  remembering that the kernel cannot be swapped out of memory and so
  keeping the kernel as small as possible has advantages on a memory
  limited machine.


  This document provides minimal kernel re-compilation instructions at
  section ``Configuring your Linux Kernel''.


  For greater detail, see the Kernel-HOWTO at The Linux Kernel HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>


  6.3.  Obtaining information from your ISP

  There are an almost infinite number of ways in which a PPP server can
  be set up. In order to connect to your ISP (or corporate PPP server to
  access your intranet), you will need to obtain information on how the
  PPP server operates.


  Because you are using Linux, you may have some difficulty with some
  ISP help desks (and work site based PPP intranet servers) which know
  only about MS Windows clients.


  However, a rapidly growing number of ISPs use Linux to provide their
  service - and Linux is also penetrating the corporate environment as
  well, so you may be lucky if you do strike problems.


  Section ``Getting the Information you need about the PPP server''
  tells you what you need to know about the PPP server to which you are
  going to connect - and how to find out the information you need to
  know.


  6.4.  Configuring your modem and serial port

  In order to connect to a PPP server and to obtain the best possible
  data transfer rate, your modem needs to be configured correctly.


  Similarly, the serial ports on your modem and computer need to be set
  up correctly.
  Section ``Configuring your modem and serial port'' provides
  information on this.


  6.5.  Setting up Name to Address Resolution (DNS)

  In addition to the files that run PPP and perform the automated log in
  to the PPP server, there are a number of text configuration files that
  have to be set up for your computer to be able to resolve names like
  www.interweft.com.au to the IP address that is actually used to
  contact that computer. These are:-


  o  /etc/resolv.conf

  o  /etc/host.conf


  Section ``Setting up Name to Address Resolution'' for details on
  setting this up.


  In particular, you do NOT need to run a name server on your Linux PC
  in order to connect to the Internet (although you may wish to). All
  you need is to know the IP number of at least one name server that you
  can use (preferably one at your ISPs site).


  6.6.  PPP and root Privileges

  As establishing a PPP link between you Linux computer and another PPP
  server requires manipulation of network devices (the PPP interface is
  a network interface) and the kernel routing table, pppd requires root
  privileges.


  For details on this, see section ``Using PPP and root privileges''.


  6.7.  Checking your distribution PPP Files and setting up the PPP
  Options

  There are a number of configuration and dialer files that need to be
  set up to get PPP operational. There are examples as part of the PPP
  distribution and this section shows what files you should have:-


  ______________________________________________________________________
  /etc/ppp/options
  /etc/ppp/scripts/ppp-on
  /etc/ppp/scripts/ppp-on-dialer
  /etc/ppp/options.tpl
  ______________________________________________________________________



  You may need to create some additional files depending on exactly what
  you are aiming to achieve with PPP:-



  ______________________________________________________________________
  /etc/ppp/options.ttyXX
  /etc/ppp/ip-up
  /etc/ppp/pap-secrets
  /etc/ppp/chap-secrets
  ______________________________________________________________________



  In addition, the PPP daemon can use a large number of command line
  options and it is important to use the right ones; so this section
  takes you through the standard PPP options and helps you choose the
  options you should use.


  For details on this, see ``Setting up the PPP connection files''.


  6.8.  If your PPP server uses PAP (Password Authentication Protocol)

  Many ISPs and corporate PPP servers use PAP. If your server does not
  require you to use PAP (if you can log in manually and receive the
  standard user name/password text based prompts it does not use PAP),
  you can safely ignore this section.


  Instead of logging into such a server using a user name and password
  when prompted to enter them by the server, a PPP server using PAP does
  not require a text based login.


  The user authentication information instead is exchanged as part of
  the link control protocol (LCP) which is the first part of
  establishing a PPP link.


  Section ``If your PPP server uses PAP (Password Authentication
  Protocol)'' provides information on the files you need to set up to
  establish a PPP link using PAP.


  6.9.  Connecting to the PPP server by hand

  Having set up the basic files, it is a good idea to test these by
  connecting (using minicom or seyon) and starting pppd on your Linux PC
  by hand.


  See Section ``Setting up the PPP connection manually'' for full
  details of setting this up.


  6.10.  Automating your PPP Connection

  Once you are able to log in by hand, you can now move to setting up a
  set of scripts that will automate the establishment of the connection.


  Section ``Automating your connections - Creating the connection
  scripts'' covers setting up the necessary scripts, with considerable
  attention paid to chat and scripting the login process to the PPP
  server.



  This section discusses scripts for user name/password authentication
  as well as scripts for PAP/CHAP authenticating servers.


  6.11.  Shutting down the link

  Once your link is up and working, you need to be able to deactivate
  the link.


  This is covered in Section ``Shutting down the PPP link''.


  6.12.  If you have problems

  Many people have problems getting PPP to work straight away. The
  variation in PPP servers and how they require you to set up the
  connection is enormous. Similarly, there are many options to PPP - and
  some combinations of these just do not work together, ever.


  In addition to the problems of logging in and starting the PPP
  service, there are problems with the modems and the actual telephone
  lines as well!


  Section ``Fixing problems'' provides some basic information about
  common errors, how to isolate these and fix them.


  This is NOT intended to provide more than just the basics. Al Longyear
  maintains the PPP-FAQ which contains much more information on this
  topic!


  6.13.  After the link comes up

  Once a PPP link is operational (specifically, once the IP layer is
  operational), Linux PPP can automatically run (as the root user), a
  script to perform any function you can write a script to accomplish.


  Section ``After the link comes up'' provides information on the
  /etc/ppp/ip-up script, the parameters it receives from PPP and how to
  use it to do things like acquire your email from your ISP account,
  send any queued email waiting transmission on your machine and such.


  6.14.  Problems with standard IP services on a Dynamic IP number PPP
  link

  As noted in the introduction, dynamic IP numbers affect the ability of
  your Linux PC to act as a server on the Internet.


  Section ``Problems with standard IP services on a Dynamic IP number
  PPP link'' provides information on the (main) services affected and
  what you can do (if anything) to overcome this.


  7.  Configuring your Linux Kernel

  In order to use PPP, your Linux kernel must be compiled to include PPP
  support. Obtain the Linux source code for your kernel if you do not
  already have this - it belongs in /usr/src/linux on Linux's standard
  file system.
  Check out this directory - many Linux distributions install the source
  tree (the files and subdirectories) as part of their installation
  process.


  At bootup, your Linux kernel prints out a great deal of information.
  Amongst this is information about PPP support if the kernel includes
  this. To view this information, look at your syslog file or use dmesg
  | less to display the information to the screen. If your kernel
  includes PPP support, you will see lines like


  ______________________________________________________________________
  PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.
  PPP line discipline registered.
  ______________________________________________________________________



  (this is for the Linux 2.0.x kernel series).


  Linux kernel sources can be obtained by ftp from sunsite.unc.edu or
  its mirror sites.


  7.1.  Installing the Linux Kernel source

  The following are brief instructions for obtaining and installing the
  Linux kernel sources. Full information can be obtained from The Linux
  Kernel HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>.


  In order to install and compile the Linux kernel, you need to be
  logged in as root.


  1. Change directory to the /usr/src directory
     cd /usr/src

  2. Check in /usr/src/linux to see if you already have the sources
     installed.

  3. If you don't have the sources, get them from Linux kernel source
     directory <ftp://sunsite.unc.edu/pub/Linux/kernel/v2.0> or your
     nearest mirror.
     If you are looking for earlier versions of the kernel (such as
     1.2.X), these are kept in Old Linux kernel source directory
     <ftp://sunsite.unc.edu/pub/Linux/kernel/old>.

  4. Choose the appropriate kernel - usually the most recent one
     available is what you are looking for. Retrieve this and put the
     source tar file in /usr/src.
     Note: a 'tar' file is an archive - possibly compressed (as are the
     Linux kernel source tar files) containing many files in a number of
     directories. It is the Linux equivalent of a DOS multi-directory
     zip file.

  5. If you already have the Linux sources installed but are upgrading
     to a new kernel, you must remove the old sources. Use the command
     rm -rf /usr/src/linux

  6. Now uncompress and extract the sources using the command
     tar xzf linux-2.0.XX.tar.gz

  7. Now, cd /usr/src/linux and read the README file. This contains an
     excellent explanation of how to go about configuring and compiling
     a new kernel. Read this file (it's a good idea to print it out and
     have a copy handy whilst you are compiling until you have done this
     enough times to know your way around).


  7.2.  Knowing your hardware

  You MUST know what cards/devices you have inside your PC if you are
  going to recompile your kernel!!! For some devices (such as sound
  cards) you will also need to know various settings (such as IRQ's, I/O
  addresses and such).


  7.3.  Kernel compilation - the Linux 1.2.13 kernel

  To start the configuration process, follow the instructions in the
  README file to properly install the sources. You start the kernel
  configuration process with



       make config



  In order to use PPP, you must configure the kernel to include PPP
  support (PPP requires BOTH pppd AND kernel support for PPP).


  ______________________________________________________________________
    PPP (point-to-point) support (CONFIG_PPP) [n] y
  ______________________________________________________________________



  Answer the other make config questions according to the hardware in
  your PC and the features of the Linux operating system you want. Then
  continue to follow the README to compile and install your new kernel.


  The 1.2.13 kernel creates only 4 PPP devices. For multi- port serial
  cards, you will need to edit the kernel PPP sources to obtain more
  ports. (See the README.linux file that comes as part of the PPP-2.1.2
  distribution for full details of the simple edits you need to make).


  Note: the 1.2.13 configuration dialogue does NOT allow you to go
  backwards - so if you make a mistake in answering one of the questions
  in the make config dialogue, exit by typing CTRL C and start again.


  7.4.  Kernel compilation - the Linux 1.3.x and 2.0.x kernels

  For Linux 1.3.x and 2.0.x, you can use a similar process as for Linux
  1.2.13. Again, follow the instructions in the README file to properly
  install the sources. You start the kernel configuration process with



       make config

  However, you also have the choice of


       make menuconfig



  This provides a menu based configuration system with online help that
  allows you to move backwards and forwards in the configuration
  process.


  There is also a highly recommended X windows based configuration
  interface


       make xconfig



  You can compile PPP support directly into your kernel or as a loadable
  module.


  If you only use PPP some of the time that your Linux machine is
  operating, then compiling PPP support as a loadable module is
  recommended. Using 'kerneld', your kernel will automatically load the
  module(s) required to provide PPP support when you start your PPP link
  process. This saves valuable memory space: no part of the kernel can
  be swapped out of memory, but loadable modules are automatically
  removed if they are not in use.


  To do this, you need to enable loadable module support:-

  ______________________________________________________________________
          Enable loadable module support (CONFIG_MODULES) [Y/n/?] y
  ______________________________________________________________________



  To add PPP kernel support, answer the following question:-

  ______________________________________________________________________
          PPP (point-to-point) support (CONFIG_PPP) [M/n/y/?]
  ______________________________________________________________________



  For a PPP loadable module, answer M, otherwise for PPP compiled in as
  part of the kernel, answer Y.


  Unlike kernel 1.2.13, kernel 2.0.x creates PPP devices on the fly as
  needed and it is not necessary to hack the sources to increase
  available PPP device numbers at all.



  7.5.  Note on PPP-2.2 and /proc/net/dev

  If you are using PPP-2.2, you will find that a side effect of the 'on
  the fly' creation of the PPP devices is that no devices show up if you
  look in the /proc/net file system until a device is created by
  starting up pppd:-


  ______________________________________________________________________
  [hartr@archenland hartr]$ cat /proc/net/dev
  Inter-|   Receive                  |  Transmit
   face |packets errs drop fifo frame|packets errs drop fifo colls carrier
      lo:  92792    0    0    0    0    92792    0    0    0     0    0
    eth0: 621737   13   13    0   23   501621    0    0    0  1309    0
  ______________________________________________________________________



  Once you have one (or more) ppp services started, you will see entries
  such as this (from a ppp server):-


  ______________________________________________________________________
  [root@kepler /root]# cat /proc/net/dev
  Inter-|   Receive                  |  Transmit
   face |packets errs drop fifo frame|packets errs drop fifo colls carrier
      lo: 428021    0    0    0    0   428021    0    0    0     0    0
    eth0:4788257  648  648  319  650  1423836    0    0    0  4623    5
    ppp0:   2103    3    3    0    0     2017    0    0    0     0    0
    ppp1:  10008    0    0    0    0     8782    0    0    0     0    0
    ppp2:    305    0    0    0    0      297    0    0    0     0    0
    ppp3:   6720    7    7    0    0     7498    0    0    0     0    0
    ppp4: 118231  725  725    0    0   117791    0    0    0     0    0
    ppp5:  38915    5    5    0    0    28309    0    0    0     0    0
  ______________________________________________________________________



  7.6.  General kernel config considerations for PPP

  If you are setting up your Linux PC as a PPP server, you must compile
  in IP forwarding support. This is also necessary if you want to use
  Linux to link to LANs together or your LAN to the Internet.


  If you are linking a LAN to the Internet (or linking together two
  LANs), you should be concerned about security. Adding support for IP
  fire walls to the kernel is probably a MUST!


  You will also need this if you want to use IP masquerade to connect a
  LAN that uses any of the above mentioned 'unconnected' IP network
  numbers.


  To enable IP Masquerade and IP fire walling, you MUST answer yes to
  the first question in the make config process:-

  ______________________________________________________________________
  Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL)?
  ______________________________________________________________________



  Whilst this may sound a bit off-putting to new users, many users are
  actively using the IP Masquerade and IP fire walling features of the
  Linux 2.0.XX kernel with no problems.


  Once you have installed and rebooted your new kernel, you can start
  configuring and testing your PPP link(s).


  8.  Getting the Information you need about the PPP server

  Before you can establish a PPP connection with a server, you need to
  obtain the following information (from the sysadmin/user support
  people of the PPP server):-

  o  The telephone number(s) to dial for the service
     If you are behind a PABX, you also need the PABX number that gives
     you an outside dial tone - this is frequently digit zero (0) or
     nine (9).

  o  Does the server use DYNAMIC or STATIC IP numbers?
     If the server uses STATIC IP numbers, then you may need to know
     what IP number to use for your end of the PPP connection. If your
     ISP is providing you with a subnet of valid IP numbers, you will
     need to know the IP numbers you can use and the network mask
     (netmask).

     Most Internet Service Providers use DYNAMIC IP numbers. As
     mentioned above, this has some implications in terms of the
     services you can use.

     However, even if you are using STATIC IP numbers, most PPP servers
     will never (for security reasons) allow the client to specify an IP
     number as this is a security risk. You do still need to know this
     information!

  o  What are the IP numbers of the ISPs Domain Name Servers?
     There should be at least two although only one is needed.

     There could be a problem here. The MS Windows 95 PPP setup allows
     the DNS address to be passed to the client as part of its
     connection process. So your ISP (or corporate help desk) may well
     tell you you don't need the IP address of the DNS server(s).

     For Linux, you DO need the address of at least one DNS. The linux
     implementation of PPP does not allow the setting of the DNS IP
     number dynamically at connection time - and quite possibly will
     never do so.

     Note: whilst Linux (as a PPP client) cannot accept the DNS address
     from a server, it can, when acting as a server, pass this
     information to clients using the dns-addr pppd option.

  o  Does the server require the use of PAP/CHAP?
     If this is the case you need to know the "id" and "secret" you are
     to use in connecting. (These are probably your user name and
     password at your ISP).

  o  Does the server automatically start PPP or do you need to issue any
     commands to start PPP on the server once you are logged in?
     If you must issue a command to start PPP, what is it?

  o  Is the server a Microsoft Windows NT system and, if so, is it using
     the MS PAP/CHAP system?
     Many corporate LANs seem to use MS Windows NT this way for
     increased security.
  Carefully note down this information - you are going to use it!


  9.  Configuring your modem and serial port

  You should make sure that your modem is correctly set up and that you
  know which serial port it is connected to.


  Remember:-

  o  DOS com1: = Linux /dev/cua0 (and /dev/ttyS0)

  o  DOS com2: = Linux /dev/cua1 (and /dev/ttyS1)
     et cetera


  It is also worth remembering that if you have 4 serial ports, the
  standard PC set up is to have com1 and com3 share IRQ4 and com2 and
  com4 share IRQ3.


  If you have devices on standard serial ports that share an IRQ with
  your modem you are going to have problems. You need to make sure that
  your modem serial port is on its own, unique IRQ. Many modern serial
  cards (and better quality motherboard serial ports) allow you to move
  the IRQ of the serial ports around.


  If you are running Linux kernel 2, you can check the in-use IRQs using
  cat /proc/interrupts, which will produce output like

  ______________________________________________________________________
   0:    6766283   timer
   1:      91545   keyboard
   2:          0   cascade
   4:     156944 + serial
   7:     101764   WD8013
  10:     134365 + BusLogic BT-958
  13:          1   math error
  15:    3671702 + serial
  ______________________________________________________________________



  This shows a serial port on IRQ4 (a mouse) and a serial port on IRQ15
  (the permanent modem based PPP link to the Internet. (There is also a
  serial port on com2, IRQ3 and com4 is on IRQ14, but as they are not in
  use, they do not show up).


  Be warned - you need to know what you are doing if you are going to
  play with your IRQs! Not only do you have to open up you computer,
  pull out cards and play with jumpers, but you need to know what is on
  which IRQ.  In my case, this is a totally SCSI based PC, and so I can
  disable the on motherboard IDE interfaces that normally use IRQ14 and
  15!


  You should also remember that if your PC boots other operating
  systems, moving IRQs around may well mean that OS cannot boot properly
  - or at all!



  If you do move your serial ports to non-standard IRQs, then you need
  to tell Linux which IRQ each port is using. This is done using
  setserial and is best done as part of the boot process in rc.local or
  rc.serial which is called from rc.local or as part of the SysV
  initialisation. For the machine illustrated above, the commands used
  are

  ______________________________________________________________________
  /bin/setserial -b /dev/ttyS2 IRQ 11
  /bin/setserial -b /dev/ttyS3 IRQ 15
  ______________________________________________________________________



  However, if you are using serial modules dynamically loaded when
  required by the kerneld process, you cannot set and forget the IRQ etc
  once at boot time. This is because if the serial module is unloaded,
  Linux forgets the special settings.


  So, if you are loading the serial module on demand, you will need to
  reconfigure the IRQs etc each time the module is loaded.


  9.1.  A note about serial ports and speed capabilities

  If you are using a high speed (external) modem (14,400 Baud or above),
  your serial port needs to be capable of handling the throughput that
  such a modem is capable of producing, particularly when the modems are
  compressing the data.


  This requires your serial port to use a modern UART (Universal
  Asynchronous Receiver Transmitter) such as a 16550(A). If you are
  using an old machine (or old serial card), it is quite possible that
  your serial port has only an 8250 UART, which will cause you
  considerable problems when used with a high speed modem.


  Use the command


       setserial -a /dev/ttySx



  to get Linux to report to you the type of UART you have. If you do not
  have a 16550A type UART, invest in a new serial card (available for
  under $50). When you purchase a new card, make sure you can move the
  IRQs around on it!


  Note: the first versions of the 16550 UART chip had an error. This was
  rapidly discovered and a revision of the chip was released - the
  16550A UART. A relatively small number of the faulty chips did however
  get into circulation. It is unlikely that you will encounter one of
  these but you should look for a response that says 16550A,
  particularly on serial cards of some vintage.



  9.2.  Serial Port Names

  Historically, Linux used cuaX devices for dial out and ttySx devices
  for dial in.


  The kernel code that required this was changed in kernel version 2.0.x
  and you should now use ttySx for both dial in and dial out. I
  understand that the cuaX device names may well disappear in future
  kernel versions.


  9.3.  Configuring your modem

  You will need to configure your modem correctly for PPP - to do this
  READ YOUR MODEM MANUAL! Most modems come with a factory default
  setting that selects the options required for PPP. The minimum
  configuration specifies:-

  o  Hardware flow control (RTS/CTS) (&K3 on many Hayes modems)

  Other settings (in standard Hayes commands) you should investigate
  are:-

  o  E1 Command/usr/src/linux-2.0.27/include/linux/serial.h Echo ON
     (required for chat to operate)

  o  Q0 Report result codes (required for chat to operate)

  o  S0=0 Auto Answer OFF (unless you want your modem to answer the
     phone)

  o  &C1 Carrier Detect ON only after connect

  o  &S0 Data Set Ready (DSR) always ON

  o  (depends)   Data Terminal Ready


  There is a site offering modem setups for a growing variety of modem
  makes and models at Modem setup information
  <http://www.in.net/info/modems/index.html> which may assist you in
  this.


  It is also worth while investigating how the modem's serial interface
  between your computer and modem operates. Most modern modems allow you
  to run the serial interface at a FIXED speed whilst allowing the
  telephone line interface to change its speed to the highest speed it
  and the remote modem can both handle.


  This is known as split speed operation. If your modem supports this,
  lock the modem's serial interface to its highest available speed
  (usually 115,200 baud but maybe 38,400 baud for 14,400 baud modems).


  Use your communications software (e.g. minicom or seyon) to find out
  about your modem configuration and set it to what is required for PPP.
  Many modems report their current settings in response to AT&V, but you
  should consult your modem manual.


  If you completely mess up the settings, you can return to sanity
  (usually) by issuing an AT&F - return to factory settings.  (For most
  modem modems I have encountered, the factory settings include all you
  need for PPP - but you should check).


  Once you have worked out the modem setup string required write it
  down.  You now have a decision: you can store these settings in your
  modem non-volatile memory so they can be recalled by issuing the
  appropriate AT command. Alternatively you can pass the correct
  settings to your modem as part of the PPP dialing process.


  If you only use your modem from Linux to call into your ISP or
  corporate server, the simplest set up will have you save your modem
  configuration in non-volatile RAM.


  If on the other hand, you modem is used by other applications and
  operating systems, it is safest to pass this information to the modem
  as each call is made so that the modem is guaranteed to be in the
  correct state for the call. (This has the added advantage also of
  recording the modem setup string in case the modem looses  the
  contents of its NV-RAM, which can indeed happen).


  9.4.  Note on Serial Flow Control

  When data is traveling on serial communication lines, it can happen
  that data arrives faster than a computer can handle it (the computer
  may be busy doing something else - remember, Linux is a multi-user,
  multi- tasking operating system). In order to ensure that data is not
  lost (data does not over run in the input buffer and hence get lost),
  some method of controlling the flow of data is necessary.


  There are two ways of doing this on serial lines:-

  o  Using hardware signals (Clear To Send/Request to Send - CTS/RTS)

  o  Using software signals (control S and control Q, also known as
     XON/XOFF).


  Whilst the latter may be fine for a terminal (text) link, data on a
  PPP link uses all 8 bits - and it is quite probable that somewhere in
  the data there will be data bytes that translate as control S and
  control Q. So, if a modem is set up to use software flow control,
  things can rapidly go berserk!


  For high speed links using PPP (which uses 8 bits of data) hardware
  flow control is vital and it is for this reason that you must use
  hardware flow control.


  9.5.  Testing your modem for dial out

  Now that you have sorted out the serial port and modem settings it is
  a good idea to make sure that these setting do indeed work by dialing
  you ISP and seeing if you can connect.


  Using you terminal communications package (such as minicom), set up
  the modem initialisation required for PPP and dial into the PPP server
  you want to connect to with a PPP session.



  (Note: at this stage we are NOT trying to make a PPP connection - just
  establishing that we have the right phone number and also to find out
  exactly what the server sends to us in order to get logged in and
  start PPP).


  During this process, either capture (log to a file) the entire login
  process or carefully (very carefully) write down exactly what prompts
  the server gives to let you know it is time to enter your user name
  and password (and any other commands needed to establish the PPP
  connection).


  If your server uses PAP, you should not see a login prompt, but should
  instead see the (text representation) of the link control protocol
  (which looks like garbage) starting on your screen.


  A few words of warning:-


  o  some servers are quite intelligent: you can log in using text based
     user name/passwords OR using PAP. So if your ISP or corporate site
     uses PAP but you do not see the garbage start up immediately, this
     may not mean you have done something wrong.

  o  some servers require you to enter some text initially and then
     start a standard PAP sequence.

  o  Some PPP servers are passive - that is they simply sit there
     sending nothing until the client that is dialing in sends them a
     valid lcp packet. If the ppp server you are connecting to operates
     in passive mode, you will never see the garbage!

  o  Some servers do not start PPP until you press ENTER - so it is
     worth trying this if you correctly log in and do not see the
     garbage!


  It is worth dialing in at least twice - some servers change their
  prompts (e.g. with the time!) every time you log in. The two critical
  prompts your Linux box needs to be able to identify every time you
  dial in are:-

  o  the prompt that requests you to enter your user name;

  o  the prompt that requests you to enter your password;


  If you have to issue a command to start PPP on the server, you will
  also need to find out the prompt the server gives you once you are
  logged in to tell you that you can now enter the command to start ppp.


  If your server automatically starts PPP, once you have logged in, you
  will start to see garbage on your screen - this is the PPP server
  sending your machine information to start up and configure the PPP
  connection.


  This should look something like this :-



  ______________________________________________________________________
  ~y}#.!}!}!} }8}!}$}%U}"}&} } } } }%}& ...}'}"}(}"} .~~y}
  ______________________________________________________________________



  (and it just keeps on coming!)


  On some systems PPP must be explicitly started on the server. This is
  usually because the server has been set up to allow PPP logins and
  shell logins using the same user name/password pair. If this is the
  case, issue this command once you have logged in. Again, you will see
  the garbage as the server end of the PPP connection starts up.


  If you do not see this immediately after connecting (and logging in
  and starting the PPP server if required), press Enter to see if this
  starts the PPP server...


  At this point, you can hang up your modem (usually, type +++ quickly
  and then issue the ATHO command once your modem responds with OK).


  If you can't get your modem to work, read your modem manual, the man
  pages for your communications software and the Serial HOWTO! Once you
  have this sorted out, carry on as above.


  10.  Setting up Name to Address Resolution (DNS)

  Whilst we humans like to give names to things, computers really like
  numbers. On a TCP/IP network (which is what the Internet is), we call
  machines by a particular name - and every machine lives in a
  particular "domain". For example, my Linux workstation is called
  archenland and it resides in the interweft.com.au domain. Its human
  readable address is thus archenland.interweft.com.au (which is known
  as the FQDN - fully qualified domain name).


  However, for this machine to be found by other computers on the
  Internet, it is actually known by its IP number when computers are
  communicating across the Internet.


  Translating (resolving) machine (and domain) names into the numbers
  actually used on the Internet is the business of machines that offer
  the Domain Name Service.


  What happens is this:-


  o  your machine needs to know the IP address of a particular computer.
     The application requiring this information asks the 'resolver' on
     your Linux PC to provide this information;

  o  the resolver queries the local host file (/etc/hosts and/or the
     domain name servers it knows about (the exact behaviour of the
     resolver is determined by /etc/host.conf);

  o  if the answer is found in the host file, this answer is returned;


  o  if a domain name server is specified, your PC queries this machine;

  o  if the DNS machine already knows the IP number for the required
     name, it returns it. If it does not, it queries other name servers
     across the Internet to find the information. The name server than
     passes this information back to the requesting resolver - which
     gives the information to the requesting application.


  When you make a PPP connection, you need to tell your Linux machine
  where it can get host name to IP number (address resolution)
  information so that you can use the machine names but your computer
  can translate these to the IP numbers it needs to do its work.


  One way is to enter every host that you want to talk to into the
  /etc/hosts file (which is in reality totally impossible if you are
  connecting to the Internet); another is to use the machine IP numbers
  as opposed to the names (an impossible memory task for all but the
  smallest LANs).


  The best way is to set up Linux so that it knows where to go to get
  this name to number information - automatically. This service is
  provided by the Domain Name Server (DNS) system. All that is necessary
  is to enter the IP number(s) for the domain name servers into your
  /etc/resolv.conf file.


  10.1.  The /etc/resolv.conf  file

  Your PPP server sysadmin/user support people should provide you with
  two DNS IP numbers (only one is necessary - but two gives some
  redundancy in the event of failure).


  As previously mentioned, Linux cannot set its name server IP number in
  the way that MS Windows 95 does. So you must insist (politely) that
  your ISP provide you with this information!


  Your /etc/resolv.conf should look something like :-


  ______________________________________________________________________
  domain your.isp.domain.name
  nameserver 10.25.0.1
  nameserver 10.25.1.2
  ______________________________________________________________________



  Edit this file (creating it if necessary) to represent the information
  that your ISP has provided. It should have ownership and permissions
  as follows :-



       -rw-r--r--   1 root     root           73 Feb 19 01:46 /etc/resolv.conf



  If you have already set up a /etc/resolv.conf because you are on a
  LAN, simply add the IP numbers of the PPP DNS servers to your existing
  file.


  10.2.  The /etc/host.conf  file

  You should also check that your /etc/host.conf file is correctly set
  up. This should look like

  ______________________________________________________________________
  order hosts,bind
  multi on
  ______________________________________________________________________



  This tells the resolver to use information in the host file before it
  sends queries to the DNS for resolution.


  11.  Using PPP and root privileges

  Because PPP needs to set up networking devices, change the kernel
  routing table and so forth, it requires root privileges to do this.


  If users other than root are to set up PPP connections, the pppd
  program should be setuid root :-



       -rwsr-xr-x   1 root     root        95225 Jul 11 00:27 /usr/sbin/pppd



  If /usr/sbin/pppd is not set up this way, then as root issue the
  command:-



       chmod u+s /usr/sbin/pppd



  What this does is make pppd run with root privileges even if the
  binary is run by an ordinary user. This allows a normal user to run
  pppd with the necessary privileges to set up the network interfaces
  and the kernel routing table.


  Programs that run 'set uid root' are potential security holes and you
  should be extremely cautious about making programs 'suid root'. A
  number of programs (including pppd) have been carefully written to
  minimise the danger of running suid root, so you should be safe with
  this one (but no guarantees).


  Depending on how you want your system to operate - specifically if you
  want ANY user on your system to be able to initiate a PPP link, you
  should make your ppp-on/off scripts world read/execute. (This is
  probably fine if your PC is used ONLY by you).


  However, if you do NOT want just anyone to be able to start up a PPP
  connection (for example, your children have accounts on your Linux PC
  and you do not want them hooking into the Internet without your
  supervision), you will need to establish a PPP group (as root, edit
  /etc/group) and :-

  o  Make pppd suid root, owned by user root and group PPP, with the
     'other' permissions on this file empty. It should then look like


       -rwsr-x---   1 root     PPP        95225 Jul 11 00:27 /usr/sbin/pppd



  o  Make the ppp-on/off scripts owned by user root and group PPP

  o  Make the ppp-on/off scripts read/executable by group PPP


         -rwxr-x---   1 root     PPP           587 Mar 14  1995 /usr/sbin/ppp-on
         -rwxr-x---   1 root     PPP           631 Mar 14  1995 /usr/sbin/ppp-off



  o  Make the other access rights for ppp-on/off nill.

  o  add the users who will be firing up PPP to the PPP group in
     /etc/group


  Even if you do this, ordinary users will STILL not be able to shut
  down the link under software control! Running the ppp-off script
  requires root privileges. However, any user can just turn off the
  modem (or disconnect the telephone line from an internal modem).


  An alternative (and better method) to this set up is to use the sudo
  program. This offers superior security and will allow you to set
  things up so that any (authorised) user can activate/deactivate the
  link using the scripts. Using sudo will allow an authorised user to
  activate/deactivate the PPP link cleanly and securely.


  12.  Setting up the PPP connection files

  You now need to be logged in as root to create the directories and
  edit the files needed to set up PPP, even if you want PPP to be
  accessible to all users.


  PPP uses a number of files to connect and set up a PPP connection.
  These differ in name and location between PPP 2.1.2 and 2.2.


  For PPP 2.1.2 the files are:-


  ______________________________________________________________________
  /usr/sbin/pppd          # the PPP binary
  /usr/sbin/ppp-on        # the dialer/connection script
  /usr/sbin/ppp-off       # the disconnection script
  /etc/ppp/options        # the options pppd uses for all connections
  /etc/ppp/options.ttyXX  # the options specific to a connection on this port
  ______________________________________________________________________



  For PPP 2.2 the files are:-


  ______________________________________________________________________
  /usr/sbin/pppd                  # the PPP binary
  /etc/ppp/scripts/ppp-on         # the dialer/connection script
  /etc/ppp/scripts/ppp-on-dialer  # part 1 of the dialer script
  /etc/ppp/scripts/ppp-off        # the actual chat script itself
  /etc/ppp/options                # the options pppd uses for all connections
  /etc/ppp/options.ttyXX          # the options specific to a connection on this port
  ______________________________________________________________________



  Red Hat Linux users should note that the standard Red Hat 4.X
  installation places these scripts in /usr/doc/ppp-2.2.0f-2/scripts.


  In your /etc directory there should be a ppp directory:-



       drwxrwxr-x   2 root     root         1024 Oct  9 11:01 ppp



  If it does not exist - create it with these ownerships and
  permissions.


  If the directory already existed, it should contain a template options
  file called options.tpl. This file is included below in case it does
  not.


  Print it out as it contains an explanation of nearly all the PPP
  options (these are useful to read in conjunction with the pppd man
  pages).  Whilst you can use this file as the basis of your
  /etc/ppp/options file, it is probably better to create your own
  options file that does not include all the comments in the template -
  it will be much shorter and easier to read/maintain.


  If you have multiple serial lines/modems (typically the case for PPP
  servers), create a general /etc/ppp/options file containing the
  options that are common for all the serial ports on which you are
  supporting dial in/out  and set up individual option files for each
  serial line on which you will be establishing a PPP connection with
  the individual settings required for each port.



  These port specific option files are named options.ttyx1,
  options.ttyx2 and so forth (where x is the appropriate letter for your
  serial ports).


  However, for a single PPP connection, you can happily use the
  /etc/ppp/options file. Alternatively, you can put all the options as
  arguments in the pppd command itself.


  It is easier to maintain a setup that uses /etc/ppp/options.ttySx
  files. If you use PPP to connect to a number of different sites, you
  can create option files for each site in /etc/ppp/options.site and
  then specify the option file as a parameter to the PPP command as you
  connect (using the file option-file pppd option to pppd on the command
  line).


  12.1.  The supplied options.tpl file

  Some distributions of PPP seem to have lost the options.tpl file, so
  here is the complete file. I suggest that you do NOT edit this file to
  create your /etc/ppp/options file(s). Rather, copy this to a new file
  and then edit that. If you mess up your edits, you can then go back to
  the original and start again.



  ______________________________________________________________________
  # /etc/ppp/options -*- sh -*- general options for pppd
  # created 13-Jul-1995 jmk
  # autodate: 01-Aug-1995
  # autotime: 19:45

  # Use the executable or shell command specified to set up the serial
  # line.  This script would typically use the "chat" program to dial the
  # modem and start the remote ppp session.
  #connect "echo You need to install a connect command."

  # Run the executable or shell command specified after pppd has
  # terminated the link.  This script could, for example, issue commands
  # to the modem to cause it to hang up if hardware modem control signals
  # were not available.
  #disconnect "chat -- \d+++\d\c OK ath0 OK"

  # async character map -- 32-bit hex; each bit is a character
  # that needs to be escaped for pppd to receive it.  0x00000001
  # represents '\x01', and 0x80000000 represents '\x1f'.
  #asyncmap 0

  # Require the peer to authenticate itself before allowing network
  # packets to be sent or received.
  #auth

  # Use hardware flow control (i.e. RTS/CTS) to control the flow of data
  # on the serial port.
  #crtscts

  # Use software flow control (i.e. XON/XOFF) to control the flow of data
  # on the serial port.
  #xonxoff

  # Add a default route to the system routing tables, using the peer as
  # the gateway, when IPCP negotiation is successfully completed.  This
  # entry is removed when the PPP connection is broken.
  #defaultroute

  # Specifies that certain characters should be escaped on transmission
  # (regardless of whether the peer requests them to be escaped with its
  # async control character map).  The characters to be escaped are
  # specified as a list of hex numbers separated by commas.  Note that
  # almost any character can be specified for the escape option, unlike
  # the asyncmap option which only allows control characters to be
  # specified.  The characters which may not be escaped are those with hex
  # values 0x20 - 0x3f or 0x5e.
  #escape 11,13,ff

  # Don't use the modem control lines.
  #local

  # Specifies that pppd should use a UUCP-style lock on the serial device
  # to ensure exclusive access to the device.
  #lock

  # Use the modem control lines.  On Ultrix, this option implies hardware
  # flow control, as for the crtscts option.  (This option is not fully
  # implemented.)
  #modem

  # Set the MRU [Maximum Receive Unit] value to <n> for negotiation.  pppd
  # will ask the peer to send packets of no more than <n> bytes. The
  # minimum MRU value is 128.  The default MRU value is 1500.  A value of
  # 296 is recommended for slow links (40 bytes for TCP/IP header + 256
  # bytes of data).
  #mru 542

  # Set the interface netmask to <n>, a 32 bit netmask in "decimal dot"
  # notation (e.g. 255.255.255.0).
  #netmask 255.255.255.0

  # Disables the default behaviour when no local IP address is specified,
  # which is to determine (if possible) the local IP address from the
  # hostname. With this option, the peer will have to supply the local IP
  # address during IPCP negotiation (unless it specified explicitly on the
  # command line or in an options file).
  #noipdefault

  # Enables the "passive" option in the LCP.  With this option, pppd will
  # attempt to initiate a connection; if no reply is received from the
  # peer, pppd will then just wait passively for a valid LCP packet from
  # the peer (instead of exiting, as it does without this option).
  #passive

  # With this option, pppd will not transmit LCP packets to initiate a
  # connection until a valid LCP packet is received from the peer (as for
  # the "passive" option with old versions of pppd).
  #silent

  # Don't request or allow negotiation of any options for LCP and IPCP
  # (use default values).
  #-all

  # Disable Address/Control compression negotiation (use default, i.e.
  # address/control field disabled).
  #-ac

  # Disable asyncmap negotiation (use the default asyncmap, i.e. escape
  # all control characters).
  #-am

  # Don't fork to become a background process (otherwise pppd will do so
  # if a serial device is specified).
  #-detach

  # Disable IP address negotiation (with this option, the remote IP
  # address must be specified with an option on the command line or in an
  # options file).
  #-ip

  # Disable magic number negotiation.  With this option, pppd cannot
  # detect a looped-back line.
  #-mn

  # Disable MRU [Maximum Receive Unit] negotiation (use default, i.e.
  # 1500).
  #-mru

  # Disable protocol field compression negotiation (use default, i.e.
  # protocol field compression disabled).
  #-pc

  # Require the peer to authenticate itself using PAP.
  # This requires TWO WAY authentication - do NOT use this for a standard
  # PAP authenticated link to an ISP as this will require the ISP machine
  # to authenticate itself to your machine (and it will not be able to).
  #+pap

  # Don't agree to authenticate using PAP.
  #-pap

  # Require the peer to authenticate itself using CHAP [Cryptographic
  # Handshake Authentication Protocol] authentication.
  # This requires TWO WAY authentication - do NOT use this for a standard
  # CHAP authenticated link to an ISP as this will require the ISP machine
  # to authenticate itself to your machine (and it will not be able to).
  #+chap

  # Don't agree to authenticate using CHAP.
  #-chap

  # Disable negotiation of Van Jacobson style IP header compression (use
  # default, i.e. no compression).
  #-vj

  # Increase debugging level (same as -d).  If this option is given, pppd
  # will log the contents of all control packets sent or received in a
  # readable form.  The packets are logged through syslog with facility
  # daemon and level debug. This information can be directed to a file by
  # setting up /etc/syslog.conf appropriately (see syslog.conf(5)).  (If
  # pppd is compiled with extra debugging enabled, it will log messages
  # using facility local2 instead of daemon).
  #debug

  # Append the domain name <d> to the local host name for authentication
  # purposes.  For example, if gethostname() returns the name porsche,
  # but the fully qualified domain name is porsche.Quotron.COM, you would
  # use the domain option to set the domain name to Quotron.COM.
  #domain <d>

  # Enable debugging code in the kernel-level PPP driver.  The argument n
  # is a number which is the sum of the following values: 1 to enable
  # general debug messages, 2 to request that the contents of received
  # packets be printed, and 4 to request that the contents of transmitted
  # packets be printed.
  #kdebug n

  # Set the MTU [Maximum Transmit Unit] value to <n>. Unless the peer
  # requests a smaller value via MRU negotiation, pppd will request that
  # the kernel networking code send data packets of no more than n bytes
  # through the PPP network interface.
  #mtu <n>

  # Set the name of the local system for authentication purposes to <n>.
  # This will probably have to be set to your ISP user name if you are
  # using PAP/CHAP.
  #name <n>

  # Set the user name to use for authenticating this machine with the peer
  # using PAP to <u>.
  # Do NOT use this if you are using 'name' above!
  #user <u>

  # Enforce the use of the host name as the name of the local system for
  # authentication purposes (overrides the name option).
  #usehostname

  # Set the assumed name of the remote system for authentication purposes
  # to <n>.
  #remotename <n>

  # Add an entry to this system's ARP [Address Resolution Protocol]
  # table with the IP address of the peer and the Ethernet address of this
  # system.
  #proxyarp

  # Use the system password database for authenticating the peer using
  # PAP.
  #login

  # If this option is given, pppd will send an LCP echo-request frame to
  # the peer every n seconds. Under Linux, the echo-request is sent when
  # no packets have been received from the peer for n seconds. Normally
  # the peer should respond to the echo-request by sending an echo-reply.
  # This option can be used with the lcp-echo-failure option to detect
  # that the peer is no longer connected.
  #lcp-echo-interval <n>

  # If this option is given, pppd will presume the peer to be dead if n
  # LCP echo-requests are sent without receiving a valid LCP echo-reply.
  # If this happens, pppd will terminate the connection.  Use of this
  # option requires a non-zero value for the lcp-echo-interval parameter.
  # This option can be used to enable pppd to terminate after the physical
  # connection has been broken (e.g., the modem has hung up) in
  # situations where no hardware modem control lines are available.
  #lcp-echo-failure <n>

  # Set the LCP restart interval (retransmission timeout) to <n> seconds
  # (default 3).
  #lcp-restart <n>

  # Set the maximum number of LCP terminate-request transmissions to <n>
  # (default 3).
  #lcp-max-terminate <n>

  # Set the maximum number of LCP configure-request transmissions to <n>
  # (default 10).
  # Some PPP servers are slow to start up. You may need to increase this
  # if you keep getting 'serial line looped back' errors and your are SURE
  # that you have logged in correctly and PPP should be starting on the server.
  #lcp-max-configure <n>

  # Set the maximum number of LCP configure-NAKs returned before starting
  # to send configure-Rejects instead to <n> (default 10).
  #lcp-max-failure <n>

  # Set the IPCP restart interval (retransmission timeout) to <n>
  # seconds (default 3).
  #ipcp-restart <n>

  # Set the maximum number of IPCP terminate-request transmissions to <n>
  # (default 3).
  #ipcp-max-terminate <n>

  # Set the maximum number of IPCP configure-request transmissions to <n>
  # (default 10).
  #ipcp-max-configure <n>

  # Set the maximum number of IPCP configure-NAKs returned before starting
  # to send configure-Rejects instead to <n> (default 10).
  #ipcp-max-failure <n>

  # Set the PAP restart interval (retransmission timeout) to <n> seconds
  # (default 3).
  #pap-restart <n>

  # Set the maximum number of PAP authenticate-request transmissions to
  # <n> (default 10).
  #pap-max-authreq <n>

  # Set the CHAP restart interval (retransmission timeout for
  # challenges) to <n> seconds (default 3).
  #chap-restart <n>
  # Set the maximum number of CHAP challenge transmissions to <n>
  # (default 10).
  #chap-max-challenge

  # If this option is given, pppd will re-challenge the peer every <n>
  # seconds.
  #chap-interval <n>

  # With this option, pppd will accept the peer's idea of our local IP
  # address, even if the local IP address was specified in an option.
  #ipcp-accept-local

  # With this option, pppd will accept the peer's idea of its (remote) IP
  # address, even if the remote IP address was specified in an option.
  #ipcp-accept-remote
  ______________________________________________________________________



  12.2.  What options should I use? (No PAP/CHAP)

  Well, as in all things that depends (sigh). The options specified here
  should work with most servers.


  However, if it does NOT work, READ THE TEMPLATE FILE
  (/etc/ppp/options.tpl) and the pppd man pages and speak to the
  sysadmin/user support people who run the server to which you are
  connecting.


  You should also note that the connect scripts presented here also use
  some command line options to pppd to make things a bit easier to
  change.


  ______________________________________________________________________
  # /etc/ppp/options (NO PAP/CHAP)
  #
  # Prevent pppd from forking into the background
  -detach
  #
  # use the modem control lines
  modem
  # use uucp style locks to ensure exclusive access to the serial device
  lock
  # use hardware flow control
  crtscts
  # create a default route for this connection in the routing table
  defaultroute
  # do NOT set up any "escaped" control sequences
  asyncmap 0
  # use a maximum transmission packet size of 552 bytes
  mtu 552
  # use a maximum receive packet size of 552 bytes
  mru 552
  #
  #-------END OF SAMPLE /etc/ppp/options (no PAP/CHAP)
  ______________________________________________________________________



  13.  Protocol) If your PPP server uses PAP (Password Authentication

  If the server to which you are connecting requires PAP or CHAP
  authentication, you have a little bit more work.


  To the above options file, add the following lines

  ______________________________________________________________________
  #
  # force pppd to use your ISP user name as your 'host name' during the
  # authentication process
  name <your ISP user name>       # you need to edit this line
  #
  # If you are running a PPP *server* and need to force PAP or CHAP
  # uncomment the appropriate one of the following lines. Do NOT use
  # these is you are a client connecting to a PPP server (even if it uses PAP
  # or CHAP) as this tells the SERVER to authenticate itself to your
  # machine (which almost certainly can't do - and the link will fail).
  #+chap
  #+pap
  #
  # If you are using ENCRYPTED secrets in the /etc/ppp/pap-secrets
  # file, then uncomment the following line.
  # Note: this is NOT the same as using MS encrypted passwords as can be
  # set up in MS RAS on Windows NT.
  #+papcrypt
  ______________________________________________________________________



  13.1.  Using MSCHAP

  Microsoft Windows NT RAS can be set up to use a variation on CHAP
  (Challenge/Handshake Authentication Protocol). In your PPP sources tar
  ball, you will find a file called README.MSCHAP80 that discusses this.


  You can determine if the server is requesting authentication using
  this protocol by enabling debugging for pppd. If the server is
  requesting MS CHAP authentication, you will see lines like


  ______________________________________________________________________
  rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap 80> <magic 0x46a3>]
  ______________________________________________________________________



  The critical information here is auth chap 80.


  In order to use MS CHAP, you will need to recompile pppd to support
  this. Please see the instructions in the README.MSCHAP80 file in the
  PPP source file for instructions on how to compile and use this
  variation.


  You should note that at present this code supports only Linux PPP
  clients connecting to an MS Windows NT server. It does NOT support
  setting up a Linux PPP server to use MSCHAP80 authentication from
  clients.


  13.2.  The PAP/CHAP secrets file

  If you are using pap or chap authentication, then you also need to
  create the secrets file. These are:

  ______________________________________________________________________
  /etc/ppp/pap-secrets
  /etc/ppp/chap-secrets
  ______________________________________________________________________



  They must be owned by user root, group root and have file permissions
  740 for security.


  The first point to note about PAP and CHAP is that they are designed
  to authenticate computer systems not users.


  "Huh? What's the difference?" I hear you ask.


  Well now, once your computer has made its PPP connection to the
  server, ANY user on your system can use that connection - not just
  you.  This is why you can set up a WAN (wide area network) link that
  joins two LANs (local area networks) using PPP.


  PAP can (and for CHAP DOES) require bidirectional authentication -
  that is a valid name and secret is required on each computer for the
  other computer involved. However, this is NOT the way most PPP servers
  offering dial up PPP PAP-authenticated connections operate.


  That being said, your ISP will probably have given you a user name and
  password to allow you to connect to their system and thence the
  Internet. Your ISP is not interested in your computer's name at all,
  so you will probably need to use the user name at your ISP as the name
  for your computer.


  This is done using the name user name option to pppd. So, if you are
  to use the user name given you by your ISP, add the line

  ______________________________________________________________________
  name your_user name_at_your_ISP
  ______________________________________________________________________



  to your /etc/ppp/options file.


  Technically, you should really use user our_user name_at_your_ISP for
  PAP, but pppd is sufficiently intelligent to interpret name as user if
  it is required to use PAP. The advantage of using the name option is
  that this is also valid for CHAP.


  As PAP is for authenticating computers, technically you need also to
  specify a remote computer name. However, as most people only have one
  ISP, you can use a wild card (*) for the remote host name in the
  secrets file.

  It is also worth noting that many ISPs operate multiple modem banks
  connected to different terminal servers - each with a different name,
  but ACCESSED from a single (rotary) dial in number. It can therefore
  be quite difficult in some circumstances to know ahead of time what
  the name of the remote computer is, as this depends on which terminal
  server you connect to!


  13.3.  The PAP secrets file

  The /etc/ppp/pap-secrets file looks like

  ______________________________________________________________________
  # Secrets for authentication using PAP
  # client        server       secret     acceptable_local_IP_addresses
  ______________________________________________________________________



  The four fields are white space delimited and the last one can be
  blank (which is what you want for a dynamic and probably static IP
  allocation from your ISP).


  Suppose your ISP gave you a user name of fred and a password of
  flintstone you would set the name fred option in
  /etc/ppp/options[.ttySx] and set up your /etc/ppp/pap-secrets file as
  follows


  ______________________________________________________________________
  # Secrets for authentication using PAP
  # client        server  secret          acceptable local IP addresses
  fred            *       flintstone
  ______________________________________________________________________



  This says for the local machine name fred (which we have told pppd to
  use even though it is not our local machine name) and for ANY server,
  use the password (secret) of flintstone.


  Note that we do not need to specify a local IP address, unless we are
  required to FORCE a particular local, static IP address. Even if you
  try this, it is unlikely to work as most PPP servers (for security
  reasons) do not allow the remote system to set the IP number they are
  to be given.


  13.4.  The CHAP secrets file

  This requires that you have mutual authentication methods - that is
  you must allow for both your machine to authenticate the remote server
  AND the remote server to authenticate your machine.


  So, if your machine is fred and the remote is barney, your machine
  would set name fred remotename barney and the remote machine would set
  name barney remotename fred in their respective /etc/ppp/options.ttySx
  files.



  The /etc/chap-secrets file for fred would look like

  ______________________________________________________________________
  # Secrets for authentication using CHAP
  # client        server  secret            acceptable local IP addresses
  fred            barney  flintstone
  barney          fred    wilma
  ______________________________________________________________________



  and for barney


  ______________________________________________________________________
  # Secrets for authentication using CHAP
  # client        server  secret            acceptable local IP addresses
  barney          fred    flintstone
  fred            barney  wilma
  ______________________________________________________________________



  Note in particular that both machines must have entries for
  bidirectional authentication. This allows the local machine to
  authenticate itself to the remote AND the remote machine to
  authenticate itself to the local machine.


  13.5.  Handling multiple PAP-authenticated connections

  Some users have more than one server to which they connect that use
  PAP.  Provided that your user name is different on each machine to
  which you want to connect, this is not a problem.


  However, many users have the same user name on two (or more - even
  all) systems to which they connect. This then presents a problem in
  correctly selecting the appropriate line from /etc/ppp/pap-secrets.


  As you might expect, PPP provides a mechanism for overcoming this. PPP
  allows you to set an 'assumed name' for the remote (server) end of the
  connection using the remotename option to pppd.


  Let us suppose that you connect to two PPP servers using the username
  fred. You set up your /etc/ppp/pap-secrets something like


  ______________________________________________________________________
  fred    pppserver1      barney
  fred    pppserver2      wilma
  ______________________________________________________________________



  Now, to set connect to pppserver1 you would use name fred remotename
  pppserver1 in your ppp-options and for pppserver2 name fred remotename
  pppserver2.



  As you can select the ppp options file to use with pppd using the file
  filename option, you can set up a script to connect to each of your
  PPP servers, correctly picking the options file to use and hence
  selecting the right remotename option.


  14.  Setting up the PPP connection manually

  Now that you have created your /etc/ppp/options and /etc/resolv.conf
  files (and, if necessary, the /etc/ppp/pap|chap-secrets file), you can
  test the settings by manually establishing a PPP connection. (Once we
  have the manual connection working, we will automate the process).


  To do this, your communications software must be capable of quitting
  WITHOUT resetting the modem. Minicom can do this - ALT Q (or in older
  version of minicom CTRL A Q)


  Make sure you are logged in as root.


  Fire up you communications software (such as minicom), dial into the
  PPP server and log in as normal. If you need to issue a command to
  start up PPP on the server, do so. You will now see the garbage you
  saw before.


  If you are using pap or chap, then merely connecting to the remote
  system should start ppp on the remote and you will see the garbage
  without logging in (although this may not happen for some servers -
  try pressing Enter and see if the garbage starts up).


  Now quit the communications software without resetting the modem (ALT
  Q or CTL A Q in minicom) and at the Linux prompt (as root) type


  ______________________________________________________________________
  pppd -d -detach /dev/ttySx 38400 &
  ______________________________________________________________________



  The -d option turns on debugging - the ppp connection start up
  conversation will be logged to your system log - which is useful if
  you are having trouble.


  Your modem lights should now flash as the PPP connection is
  established.  It will take a short while for the PPP connection to be
  made.


  At this point you can look at the PPP interface, by issuing the
  command


  ______________________________________________________________________
  ifconfig
  ______________________________________________________________________



  In addition to any Ethernet and loop back devices you have, you should
  see something like :-


  ______________________________________________________________________
  ppp0     Link encap:Point-Point Protocol
           inet addr:10.144.153.104  P-t-P:10.144.153.51 Mask:255.255.255.0
           UP POINTOPOINT RUNNING  MTU:552  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0
           TX packets:0 errors:0 dropped:0 overruns:0
  ______________________________________________________________________



  Where

  o  inet addr:10.144.153.10 is the IP number of your end of the link.

  o  P-t-P:10.144.153.5 is the SERVER's IP number.

  (Naturally, ifconfig will not report these IP numbers, but the ones
  used by your PPP server.)


  Note: ifconfig also tells you that the link is UP and RUNNING!


  If you get no ppp device listed or something like


  ______________________________________________________________________
  ppp0     Link encap:Point-Point Protocol
           inet addr:0.0.0.0  P-t-P:0.0.0.0  Mask:0.0.0.0
           POINTOPOINT  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0
           TX packets:0 errors:0 dropped:0 overruns:0
  ______________________________________________________________________



  Your PPP connection has not been made...see the later section on
  debugging!


  You should also be able to see a route to the the remote host (and
  beyond). To do this, issue the command


  ______________________________________________________________________
  route -n
  ______________________________________________________________________



  You should se something like:-



  ______________________________________________________________________
  Kernel routing table
  Destination     Gateway         Genmask         Flags MSS    Window Use Iface
  10.144.153.3    *               255.255.255.255 UH    1500   0        1 ppp0
  127.0.0.0       *               255.0.0.0       U     3584   0       11 lo
  10.0.0.0        *               255.0.0.0       U     1500   0       35 eth0
  default         10.144.153.3    *               UG    1500   0        5 ppp0
  ______________________________________________________________________



  Of particular importance here, notice we have TWO entries pointing to
  our ppp interface.


  The first is a HOST route (indicated by the H flag) and that allows us
  to see the host to which we are connected to - but no further.


  The second is the default route (established by giving pppd the option
  defaultroute. This is the route that tells our Linux PC to send any
  packets NOT destined for the local Ethernet(s) - to which we have
  specific network routes - to the PPP server itself. The PPP server
  then is responsible for routing our packets out onto the Internet and
  routing the return packets back to us.


  If you do not see a routing table with two entries, something is
  wrong.  In particular if your syslog shows a message telling you pppd
  is not replacing an existing default route, then you have a default
  route pointing at your Ethernet interface - which MUST be replaced by
  a specific network route: YOU CAN ONLY HAVE ONE DEFAULT ROUTE!!!


  You will need to explore your system initialisation files to find out
  where this default route is being set up (it will use a route add
  default... command). Change this command to something like route add
  net....


  Now test the link by 'pinging' the server at its IP number as reported
  by the ifconfig output, i.e.


  ______________________________________________________________________
  ping 10.144.153.51
  ______________________________________________________________________



  You should receive output like


  ______________________________________________________________________
  PING 10.144.153.51 (10.144.153.51): 56 data bytes
  64 bytes from 10.144.153.51: icmp_seq=0 ttl=255 time=328.3 ms
  64 bytes from 10.144.153.51: icmp_seq=1 ttl=255 time=190.5 ms
  64 bytes from 10.144.153.51: icmp_seq=2 ttl=255 time=187.5 ms
  64 bytes from 10.144.153.51: icmp_seq=3 ttl=255 time=170.7 ms
  ______________________________________________________________________



  This listing will go on for ever - to stop it press CTRL C, at which
  point you will receive some more information :-


  ______________________________________________________________________
  --- 10.144.153.51 ping statistics ---
  4 packets transmitted, 4 packets received, 0% packet loss
  round-trip min/avg/max = 170.7/219.2/328.3 ms
  ______________________________________________________________________



  So far so good.


  Now try pinging a host by name (not the name of the PPP server itself)
  but a host at another site that you KNOW is probably going to be up
  and running...). For example


  ______________________________________________________________________
  ping sunsite.unc.edu
  ______________________________________________________________________



  This time there will be a bit of a pause as Linux obtains the IP
  number for the fully qualified host name you have 'ping'ed from the
  DNS you specified in /etc/resolv.conf - so don't worry (but you will
  see your modem lights flash). Shortly you will receive output like


  ______________________________________________________________________
   PING sunsite.unc.edu (152.2.254.81): 56 data bytes
  64 bytes from 152.2.254.81: icmp_seq=0 ttl=254 time=190.1 ms
  64 bytes from 152.2.254.81: icmp_seq=1 ttl=254 time=180.6 ms
  64 bytes from 152.2.254.81: icmp_seq=2 ttl=254 time=169.8 ms
  64 bytes from 152.2.254.81: icmp_seq=3 ttl=254 time=170.6 ms
  64 bytes from 152.2.254.81: icmp_seq=4 ttl=254 time=170.6 ms
  ______________________________________________________________________



  Again, stop the output by pressing CTRL C and get the statistics...


  ______________________________________________________________________
  --- sunsite.unc.edu ping statistics ---
  5 packets transmitted, 5 packets received, 0% packet loss
  round-trip min/avg/max = 169.8/176.3/190.1 ms
  ______________________________________________________________________



  If you don't get any response, try pinging the IP address of the DNS
  server at your ISP's site. If you get a result from this, then it
  looks like you have a problem with /etc/resolv.conf.


  If this doesn't work, you have a routing problem, or your ISP has a
  problem routing packets back to you. Check your routing table as shown
  above and if that is OK, contact your ISP. A good test of the ISP is
  to use another operating system to connect. If you can get beyond your
  ISP with that, then the problem is at your end.


  If everything works, shut down the connection by typing


  ______________________________________________________________________
  ppp-off
  ______________________________________________________________________



  After a short pause, the modem should hang itself up.


  If that does not work, either turn off your modem or fire up your
  communications software and interrupt the modem with +++ and then hang
  up with ATH0 when you receive the modem's OK prompt.


  You may also need to clean up the lock file created by pppd

  ______________________________________________________________________
  rm -f /var/lock/LCK..ttySx
  ______________________________________________________________________



  15.  Automating your connections - Creating the connection scripts

  Whilst you can continue to log in by hand as shown above, it is much
  neater to set up some scripts to do this automatically for you.


  A set of scripts automates the log in and PPP start up so all you have
  to do (as root or as a member of the PPP group) is issue a single
  command to fire up your connection.


  15.1.  Connection scripts for User name/Password Authentication

  If your ISP does NOT require the use of PAP/CHAP, these are the
  scripts for you!


  If the ppp package installed correctly, you should have two example
  files.  For PPP 2.1.2 they are in /usr/sbin and for PPP 2.2 they are
  in /etc/ppp/scripts. They are called


  for PPP-2.1.2



       ppp-on
       ppp-off



  and for PPP-2.2

       ppp-off
       ppp-on
       ppp-on-dialer



  Now, if you are using PPP 2.1.2, I strongly urge you to delete the
  sample files. There are potential problems with these - and don't tell
  me they work fine - I used them for ages too (and recommended them in
  the first version of this HOWTO)!


  For the benefit of PPP 2.1.2 users, here are BETTER template versions,
  taken from the PPP 2.2 distribution. I suggest you copy and use these
  scripts instead of the old PPP-2.1.2 scripts.


  15.2.  The ppp-on script

  This is the first of a PAIR of scripts that actually fire up the
  connection.


  ______________________________________________________________________
  #!/bin/sh
  #
  # Script to initiate a PPP connection. This is the first part of the
  # pair of scripts. This is not a secure pair of scripts as the codes
  # are visible with the 'ps' command.  However, it is simple.
  #
  # These are the parameters. Change as needed.
  TELEPHONE=555-1212      # The telephone number for the connection
  ACCOUNT=george          # The account name for logon (as in 'George Burns')
  PASSWORD=gracie         # The password for this account (and 'Gracie Allen')
  LOCAL_IP=0.0.0.0        # Local IP address if known. Dynamic = 0.0.0.0
  REMOTE_IP=0.0.0.0       # Remote IP address if desired. Normally 0.0.0.0
  NETMASK=255.255.255.0   # The proper netmask if needed
  #
  # Export them so that they will be available to 'ppp-on-dialer'
  export TELEPHONE ACCOUNT PASSWORD
  #
  # This is the location of the script which dials the phone and logs
  # in.  Please use the absolute file name as the $PATH variable is not
  # used on the connect option.  (To do so on a 'root' account would be
  # a security hole so don't ask.)
  #
  DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
  #
  # Initiate the connection
  #
  #
  exec /usr/sbin/pppd debug /dev/ttySx 38400 \
          $LOCAL_IP:$REMOTE_IP \
          connect $DIALER_SCRIPT
  ______________________________________________________________________



  Here is the ppp-on-dialer script:-



  ______________________________________________________________________
  #!/bin/sh
  #
  # This is part 2 of the ppp-on script. It will perform the connection
  # protocol for the desired connection.
  #
  /usr/sbin/chat -v                                                 \
          TIMEOUT         3                               \
          ABORT           '\nBUSY\r'                      \
          ABORT           '\nNO ANSWER\r'                 \
          ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
          ''              \rAT                            \
          'OK-+++\c-OK'   ATH0                            \
          TIMEOUT         30                              \
          OK              ATDT$TELEPHONE                  \
          CONNECT         ''                              \
          ogin:--ogin:    $ACCOUNT                        \
          assword:        $PASSWORD
  ______________________________________________________________________



  For PPP-2.2, the ppp-off script looks like:-


  ______________________________________________________________________
  #!/bin/sh
  ######################################################################
  #
  # Determine the device to be terminated.
  #
  if [ "$1" = "" ]; then
          DEVICE=ppp0
  else
          DEVICE=$1
  fi

  ######################################################################
  #
  # If the ppp0 pid file is present then the program is running. Stop it.
  if [ -r /var/run/$DEVICE.pid ]; then
          kill -INT `cat /var/run/$DEVICE.pid`
  #
  # If the kill did not work then there is no process running for this
  # pid. It may also mean that the lock file will be left. You may wish
  # to delete the lock file at the same time.
          if [ ! "$?" = "0" ]; then
                  rm -f /var/run/$DEVICE.pid
                  echo "ERROR: Removed stale pid file"
                  exit 1
          fi
  #
  # Success. Let pppd clean up its own junk.
          echo "PPP link to $DEVICE terminated."
          exit 0
  fi
  #
  # The ppp process is not running for ppp0
  echo "ERROR: PPP link is not active on $DEVICE"
  exit 1
  ______________________________________________________________________



  15.3.  Editing the supplied PPP startup scripts

  As the new scripts come in two parts, we will edit them in turn.


  15.3.1.  The ppp-on script

  You will need to edit the script to reflect YOUR user name at your
  ISP, YOUR password at your ISP, the telephone number of your ISP.


  Each of the lines like TELEPHONE= actually set up shell variables that
  contain the information to the right of the '=' (excluding the
  comments of course). So edit each of these lines so it is correct for
  your ISP and connection.


  Also, as you are setting the IP number (if you need to) in the
  /etc/ppp/options file, DELETE the line that says


  ______________________________________________________________________
  $LOCAL_IP:$REMOTE_IP \
  ______________________________________________________________________



  Also, make sure that the shell variable DIALER_SCRIPT points at the
  full path and name of the dialer script that you are actually going to
  use. So, if you have moved this or renamed the script, make sure you
  edit this line correctly in the ppp-on script!


  15.3.2.  The ppp-on-dialer script

  This is the second of the scripts that actually brings up our ppp
  link.


  Note: a chat script is normally all on one line. the backslashes are
  used to allow line continuations across several physical lines (for
  human readability) and do not form part of the script itself.


  However, it is very useful to look at it in detail so that we
  understand what it is actually (supposed) to be doing!


  15.4.  What a Chat script means...

  A chat script is a sequence of "expect string" "send string" pairs. In
  particular, note that we ALWAYS expect something before we send
  something.


  If we are to send something WITHOUT receiving anything first, we must
  use an empty expect string (indicated by "") and similarly for
  expecting something without sending anything! Also, if a string
  consists of several words, (e.g. NO CARRIER), you must quote the
  string so that it is seen as a single entity by chat.


  The chat line in our template is:-


  ______________________________________________________________________
  exec /usr/sbin/chat -v
  ______________________________________________________________________



  Invoke chat, the -v tells chat to copy ALL its I/O into the system log
  (usually /var/log/messages). Once you are happy that the chat script
  is working reliably, edit this line to remove the -v to save
  unnecessary clutter in your syslog.


  ______________________________________________________________________
  TIMEOUT         3
  ______________________________________________________________________


  This sets the timeout for the receipt of expected input to three sec-
  onds. You may need to increase this to say 5 or 10 seconds if you are
  using a really slow modem!


  ______________________________________________________________________
  ABORT           '\nBUSY\r'
  ______________________________________________________________________



  If the string BUSY is received, abort the operation.


  ______________________________________________________________________
  ABORT           '\nNO ANSWER\r'
  ______________________________________________________________________



  If the string NO ANSWER is received, abort the operation


  ______________________________________________________________________
  ABORT           '\nRINGING\r\n\r\nRINGING\r'
  ______________________________________________________________________



  If the (repeated) string RINGING is received, abort the operation.
  This is because someone is ringing your phone line!


  ______________________________________________________________________
  "              \rAT
  ______________________________________________________________________



  Expect nothing from the modem and send the string AT.


  ______________________________________________________________________
  OK-+++\c-OK   ATH0
  ______________________________________________________________________



  This one is a bit more complicated as it uses some of chat's error
  recovery capabilities.


  What is says is...Expect OK, if it is NOT received (because the modem
  is not in command mode) then send +++ (the standard Hayes-compatible
  modem string that returns the modem to command mode) and expect OK.
  Then send ATH0 (the modem hang up string). This allows your script to
  cope with the situation of your modem being stuck on-line!


  ______________________________________________________________________
  TIMEOUT         30
  ______________________________________________________________________



  Set the timeout to 30 seconds for the remainder of the script. If you
  experience trouble with the chat script aborting due to timeouts,
  increase this to 45 seconds or more.


  ______________________________________________________________________
  OK              ATDT$TELEPHONE
  ______________________________________________________________________



  Expect OK (the modem's response to the ATH0 command) and dial the
  number we want to call.


  ______________________________________________________________________
  CONNECT         ''
  ______________________________________________________________________



  Expect CONNECT (which our modem sends when the remote modem answers)
  and send nothing in reply.


  ______________________________________________________________________
  ogin:--ogin:    $ACCOUNT
  ______________________________________________________________________



  Again, we have some error recovery built in here. Expect the login
  prompt (...ogin:) but if we don't receive it by the timeout, send a
  return and then look for the login prompt again. When the prompt is
  received, send the username (stored in the shell variable $ACCOUNT).


  ______________________________________________________________________
  assword:        $PASSWORD
  ______________________________________________________________________



  Expect the password prompt and send our password (again, stored in a
  shell variable).


  This chat script has reasonable error recovery capability. Chat has
  considerably more features than demonstrated here. For more
  information consult the chat manual page (man 8 chat).


  15.4.1.  Starting PPP at the server end

  Whilst the ppp-on-dialer script is fine for servers that automatically
  start pppd at the server end once you have logged in, some servers
  require that you explicitly start PPP on the server.


  If you need to issue a command to start up PPP on the server, you DO
  need to edit the ppp-on-dialer script.


  At the END of the script (after the password line) add an additional
  expect send pair - this one would look for your login prompt (beware
  of characters that have a special meaning in the Bourne shell - such
  as $ and [ or ] (open and close square brackets).


  Once chat has found the shell prompt, chat must issue the ppp start up
  command required for your ISPs PPP server.


  In my case, my PPP server uses the standard Linux Bash prompt

  ______________________________________________________________________
  [hartr@kepler hartr]$
  ______________________________________________________________________



  and requires that I type


  ______________________________________________________________________
  ppp
  ______________________________________________________________________



  to start up PPP on the server.


  It is a good idea to allow for a bit of error recovery here, so in my
  case I use

  ______________________________________________________________________
          hartr--hartr    ppp
  ______________________________________________________________________



  This says,  if we don't receive the prompt within the timeout, send a
  carriage return and looks for the prompt again.


  Once the prompt is received, then send the string ppp.


  Note: don't forget to add a \ to the end of the previous line so chat
  still thinks the entire chat script is on one line!

  Unfortunately, some servers produce a very variable set of prompts!
  You may need to log in several times using minicom to understand what
  is going on and pick the stable "expect" strings.


  15.5.  A chat script for PAP/CHAP authenticated connections

  If your ISP is using PAP/CHAP, then your chat script is much simpler.
  All your chat script needs to do is dial the telephone, wait for a
  connect and then let pppd handle the logging in!


  ______________________________________________________________________
  #!/bin/sh
  #
  # This is part 2 of the ppp-on script. It will perform the connection
  # protocol for the desired connection.
  #
  exec /usr/sbin/chat -v                                  \
          TIMEOUT         3                               \
          ABORT           '\nBUSY\r'                      \
          ABORT           '\nNO ANSWER\r'                 \
          ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
          ''              \rAT                            \
          'OK-+++\c-OK'   ATH0                            \
          TIMEOUT         30                              \
          OK              ATDT$TELEPHONE                  \
          CONNECT         ''                              \
  ______________________________________________________________________



  15.6.  The pppd debug  and file option_file  options

  As we have already seen, you can turn on debug information logging
  with the -d option to pppd. The 'debug' option is equivalent to this.


  As we are establishing a new connection with a new script, leave in
  the debug option for now. (Warning: if your disk space is tight,
  logging pppd exchanges can rapidly extend your syslog file and run you
  into trouble - but to do this you must fail to connect and keep on
  trying for quite a few minutes).


  Once you are happy that all is working properly, then you can remove
  this option.


  If you have called your ppp options file anything other than
  /etc/ppp/options or /etc/ppp/options.ttySx, specify the file name with
  the file option to pppd - e.g.


  ______________________________________________________________________
  exec /usr/sbin/pppd debug file options.myserver /dev/ttyS0 38400 \
  ______________________________________________________________________



  16.  Testing your connection script

  Open a new root Xterm (if you are in X) or open a new virtual console
  and log in as root.


  In this new session, issue the command



       tail -f /var/log/messages



  (or whatever your system log file is).


  In the first window (or virtual console) issue the command



       ppp-on &



  (or whatever name you have called your edited version of
  /usr/sbin/ppp- on). If you do not put the script into the background
  by specifying & at the end of the command, you will not get your
  terminal prompt back until ppp exits (when the link terminates).


  Now switch back to the window that is tracking your system log.


  You will see something like the following (provided you specified -v
  to chat and -d to pppd)....this is the chat script and responses being
  logged to the system log file followed by the start up information for
  pppd :-



  ______________________________________________________________________
  Oct 21 16:09:58 hwin chat[19868]: abort on (NO CARRIER)
  Oct 21 16:09:59 hwin chat[19868]: abort on (BUSY)
  Oct 21 16:09:59 hwin chat[19868]: send (ATZ^M)
  Oct 21 16:09:59 hwin chat[19868]: expect (OK)
  Oct 21 16:10:00 hwin chat[19868]: ATZ^M^M
  Oct 21 16:10:00 hwin chat[19868]: OK -- got it
  Oct 21 16:10:00 hwin chat[19868]: send (ATDT722298^M)
  Oct 21 16:10:00 hwin chat[19868]: expect (CONNECT)
  Oct 21 16:10:00 hwin chat[19868]: ^M
  Oct 21 16:10:22 hwin chat[19868]: ATDT722298^M^M
  Oct 21 16:10:22 hwin chat[19868]: CONNECT -- got it
  Oct 21 16:10:22 hwin chat[19868]: send (^M)
  Oct 21 16:10:22 hwin chat[19868]: expect (ogin:)
  Oct 21 16:10:23 hwin chat[19868]: kepler login: -- got it
  Oct 21 16:10:23 hwin chat[19868]: send (hartr^M)
  Oct 21 16:10:23 hwin chat[19868]: expect (ssword:)
  Oct 21 16:10:23 hwin chat[19868]:  hartr^M
  Oct 21 16:10:23 hwin chat[19868]: Password: -- got it
  Oct 21 16:10:23 hwin chat[19868]: send (??????^M)
  Oct 21 16:10:23 hwin chat[19868]: expect (hartr)
  Oct 21 16:10:24 hwin chat[19868]: [hartr -- got it
  Oct 21 16:10:24 hwin chat[19868]: send (ppp^M)
  Oct 21 16:10:27 hwin pppd[19872]: pppd 2.1.2 started by root, uid 0
  Oct 21 16:10:27 hwin pppd[19873]: Using interface ppp0
  Oct 21 16:10:27 hwin pppd[19873]: Connect: ppp0 <--> /dev/cua1
  Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(LCP): Sent code 1, id 1.
  Oct 21 16:10:27 hwin pppd[19873]: LCP: sending Configure-Request, id 1
  Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfreq(LCP): Rcvd id 1.
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd MRU
  Oct 21 16:10:27 hwin pppd[19873]: (1500)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd ASYNCMAP
  Oct 21 16:10:27 hwin pppd[19873]: (0)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd MAGICNUMBER
  Oct 21 16:10:27 hwin pppd[19873]: (a098b898)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd PCOMPRESSION
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd ACCOMPRESSION
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: returning CONFACK.
  Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(LCP): Sent code 2, id 1.
  Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfack(LCP): Rcvd id 1.
  Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 1, id 1.
  Oct 21 16:10:27 hwin pppd[19873]: IPCP: sending Configure-Request, id 1
  Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfreq(IPCP): Rcvd id 1.
  Oct 21 16:10:27 hwin pppd[19873]: ipcp: received ADDR
  Oct 21 16:10:27 hwin pppd[19873]: (10.144.153.51)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: ipcp: received COMPRESSTYPE
  Oct 21 16:10:27 hwin pppd[19873]: (45)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: ipcp: returning Configure-ACK
  Oct 21 16:10:28 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 2, id 1.
  Oct 21 16:10:30 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 1, id 1.
  Oct 21 16:10:30 hwin pppd[19873]: IPCP: sending Configure-Request, id 1
  Oct 21 16:10:30 hwin pppd[19873]: fsm_rconfreq(IPCP): Rcvd id 255.
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: received ADDR
  Oct 21 16:10:31 hwin pppd[19873]: (10.144.153.51)
  Oct 21 16:10:31 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: received COMPRESSTYPE
  Oct 21 16:10:31 hwin pppd[19873]: (45)
  Oct 21 16:10:31 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: returning Configure-ACK
  Oct 21 16:10:31 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 2, id 255.
  Oct 21 16:10:31 hwin pppd[19873]: fsm_rconfack(IPCP): Rcvd id 1.
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: up
  Oct 21 16:10:31 hwin pppd[19873]: local  IP address 10.144.153.104
  Oct 21 16:10:31 hwin pppd[19873]: remote IP address 10.144.153.51
  ______________________________________________________________________



  (Note - I am using STATIC IP numbers - hence my machine sent that to
  the PPP server - you won't see this if you are using DYNAMIC IP
  numbers.)  Also, this server requires a specific command to start ppp
  at its end.


  This looks OK - so test it out as before with pings to IP numbers and
  host names.


  Fire up you web browser or whatever and go surfing - you are
  connected!


  17.  Shutting down the PPP link

  When you have finished with the PPP link, use the standard ppp-off
  command to shut it down (remember - you need to be root or a member of
  the PPP group!).


  In your system log you will see something like:-


  ______________________________________________________________________
  Oct 21 16:10:45 hwin pppd[19873]: Interrupt received: terminating link
  Oct 21 16:10:45 hwin pppd[19873]: ipcp: down
  Oct 21 16:10:45 hwin pppd[19873]: default route ioctl(SIOCDELRT): Bad address
  Oct 21 16:10:45 hwin pppd[19873]: fsm_sdata(LCP): Sent code 5, id 2.
  Oct 21 16:10:46 hwin pppd[19873]: fsm_rtermack(LCP).
  Oct 21 16:10:46 hwin pppd[19873]: Connection terminated.
  Oct 21 16:10:46 hwin pppd[19873]: Exit.
  ______________________________________________________________________



  Don't worry about the SIOCDELRT - this is just pppd noting that it is
  terminating and is nothing to worry about.


  18.  Debugging

  There are any number of reasons that your connection does not work -
  chat has failed to complete correctly, you have a dirty line, etc. So
  check your syslog for indications.


  18.1.  I have compiled PPP support into the kernel, but...

  A very common problem is that people compile PPP support into the
  kernel and yet when they try to run pppd, the kernel complains that it
  does not support ppp! There are a variety of reasons this can occur.



  18.1.1.  Whilst you have  recompiled your kernel to support ppp, you
  are not booting the new kernel. This can happen if you do not update
  /etc/lilo.conf  and rerun lilo.  Are you booting the right kernel?

  A good check on the kernel can be obtained by issuing the command
  uname -a, which should produce a line like


  ______________________________________________________________________
  Linux archenland 2.0.28 #2 Thu Feb 13 12:31:37 EST 1997 i586
  ______________________________________________________________________



  This gives the kernel version and the date on which this kernel was
  compiled - which should give you a pretty good idea of what is going
  on.


  18.1.2.  Did you compile ppp kernel support as a module?

  If you compiled your kernel ppp support as a module, but did not make
  and install the modules, then you can get this error. Check the
  kernel-HOWTO and the README file in /usr/src/linux!


  Another module connected possibility is that you are expecting
  required modules to be automatically loaded, but are not running the
  kerneld daemon (which auto-loads and unloads modules on the fly).
  Check the kerneld mini-HOWTO for information on setting up kerneld.


  18.1.3.  Are you using the correct version of PPP for your kernel?

  You must use ppp-2.2 with kernel version 2.0.x. You can use ppp-2.2
  with kernel version 1.2.x (if you patch the kernel) otherwise you must
  use ppp-2.1.2.


  18.1.4.  Are you running pppd as root?

  If you are not running pppd as the root user (and pppd is not suid to
  root), you can receive this message.


  18.2.  My modem connects but ppp never starts up

  There are innumerable variations on this (take a look in
  comp.os.linux...).


  A VERY common mistake is that you have mistyped something in your
  scripts. The only thing to do here is to make sure you are logging the
  chat conversation between you Linux PC and the server into your syslog
  (/var/log/messages) and then go through this line by line to make.
  You may need to dial into the ppp server manually to check things out
  again.


  You need to check the log against the actual prompts very carefully -
  and bear in mind that we humans have a tendency to read what we THINK
  we have typed - not what is actually there!



  18.3.  The syslog says " serial line is not 8 bit clean ..."

  There are variations on this too - such as serial line looped back
  etc., and the cause can be one (or a sequence) of a number of things.


  To understand what is going on here, it is necessary to grasp a bit of
  what is going on behind the scenes in pppd itself.


  When pppd starts up, it sends LCP (link control protocol) packets to
  the remote machine. If it receives a valid response it then goes on to
  the next stage (using IPCP - IP control protocol packets) and only
  when this negotiation completes is the actual IP layer started so that
  you can use the PPP link.


  If there is no ppp server operating at the remote end when your PC
  sends lcp packets, these get reflected by the login process at the far
  end. As these packets use 8 bits, reflecting them strips the 8th bit
  (remember, ASCII is a 7 bit code). PPP sees this and complains
  accordingly.


  There are several reasons this reflection can occur.


  18.3.1.  You are not correctly logging into the server

  When your chat script completes, pppd starts on your PC. However, if
  you have not completed the log in process to the server (including
  sending any command required to start PPP  on the server), PPP will
  not start.


  So, the lcp packets are reflected and you receive this error.


  You need to carefully check and correct (if necessary) your chat
  script (see above).


  18.3.2.  You are not starting PPP on the server

  Some PPP servers require you to enter a command and/or a RETURN after
  completing the log in process before the remote end starts ppp.


  Check your chat script (see above).


  If you log in manually and find you need to send a RETURN after this
  to start PPP, simply add a blank expect/send pair to the end of your
  chat script (an empty send string actually sends a RETURN).


  18.3.3.  The remote PPP process is slow to start

  This one is a bit tricksy!


  By default, your Linux pppd is compiled to send a maximum of 10 lcp
  configuration requests. If the server is a bit slow to start up, all
  10 such requests can be sent before the remote PPP is ready to receive
  them.

  On your machine, pppd sees all 10 requests reflected back (with the
  8th bit stripped) and exits.


  There are two ways round this:-


  Add lcp-max-configure 30 to your ppp options. This increases the
  maximum number of lcp configure packets pppd sends before giving up.
  For really slow server, you may need even more than this.


  Alternatively, you can get a bit tricksy in return. You may have
  noticed that when you logged in by hand to the PPP server and PPP
  started there, the first character of the ppp garbage that appears was
  always the tilde character (~).


  Using this knowledge we can add a new expect/send pair to the end of
  the chat script which expects a tilde and sends nothing. This would
  look like:-


  ______________________________________________________________________
  \~     ''
  ______________________________________________________________________



  Note: as the tilde character has a special meaning in the shell, it
  must be escaped (and hence the leading backslash).


  18.4.  Default route not set

  If pppd refuses to set up a default route, it is because (quite
  correctly) it refuses remove/replace an existing default route.


  The usual reason that this error occurs is that some distributions set
  up a default route via your Ethernet card as opposed to setting up a
  specific network route.


  See the Linux NAG and the Net2/3 HOWTOs for information on correctly
  setting up your Ethernet card and associated routes.


  An alternative to this is that your LAN uses a gateway/router already
  and your routing table has been set up to point the default route at
  this.


  Fixing up this last situation can require a fair bit of IP networking
  knowledge and is beyond the scope of this HOWTO. It is suggested you
  obtain some expert advice (via the news groups of from someone locally
  you can ask).


  18.5.  Other Problems

  There are many reasons apart from these that ppp fails to connect
  and/or operate properly.


  Look in the PPP FAQ (which is really a series of questions and
  answers). This is a very comprehensive document and the answers ARE
  there! From my own (sad) experience, if the answer to your problems is
  not there, the problem is NOT ppp's fault! In my case I was using an
  ELF kernel that I had not upgraded to  the appropriate kernel modules.
  I only wasted about 2 days (and most of one night) cursing what had
  been a perfect PPP server before the light dawned!


  19.  Getting Help when totally stuck

  If you can't get your PPP link to work, go back through this document
  and check everything - in conjunction with the output created by
  "chat-v..." and "pppd -d" in you system log.


  Also consult the PPP documentation and FAQ plus the other documents
  mention herein!


  If you are still stuck, try the comp.os.linux.misc and
  comp.os.linux.networking newsgroups are reasonably regularly scanned
  by people that can help you with PPP as is comp.protocols.ppp


  You can try sending me personal email, but I do have a day job (and a
  life) and I do not guarantee to respond quickly (if at all) as this
  depends on my current work load and the state of my private life!


  In particular - DO NOT POST REAMS OF DEBUGGING OUTPUT TO THE NEWS
  GROUPS NOR SEND IT TO ME BY EMAIL - the former wastes huge amounts of
  network bandwidth and the latter will be consigned to /dev/null
  (unless I have specifically requested it).


  20.  Common Problems once the link is working

  One problem you will find is that many service providers will only
  support the connection software package that they distribute to new
  accounts. This is (typically) for Microsoft Windows :-( - and many
  service provider help desks seem to know nothing about Unix (or
  Linux). So, be prepared for limited assistance from them!


  You could of course do the individual a favour and educate then about
  Linux (any ISP help desk person should be reasonably 'with it' in
  Internet terms and that means they should have a home Linux box - of
  course it does)!


  20.1.  I can't see beyond the PPP server I connect to

  OK - your PPP connection is up and running and you can ping the PPP
  server by IP number (the second or "remote" IP number shown by
  ifconfig ppp0), but you can't reach anything beyond this.


  First of all, try pinging the IP numbers you have specified in
  /etc/resolv.conf as name servers. If this works, you can see beyond
  your PPP server (unless this has the same IP number as the "remote" IP
  number of your connection). So now try pinging the full Internet name
  of your service provider - eg



  ping my.provider.net.au



  If this does NOT work, you have a problem with the name resolution.
  This is probably because of a typo in your /etc/resolv.conf file.
  Check this carefully against the information you acquired by ringing
  your service provider. If all looks OK, ring your service provider and
  check that you wrote down the IP numbers correctly.


  If it STILL doesn't work (and your service provider confirms that his
  name servers are up and running), you have a problem somewhere else -
  and I suggest you check carefully through your Linux installation
  (looking particularly for file permissions).


  If you STILL can't ping your service provider's IP name servers by IP
  number, either they are down (give them a voice call and check) or
  there is a routing problem at your service provider's end. Again, ring
  them and check this out.


  One possibility is that the "remote end" is a Linux PPP server where
  the IP forwarding option has not been specified in the kernel!


  A good general test is to try connecting to your service provider
  using the software that most supply for (gulp) Microsoft Windows. If
  everything works from another operating system to exactly the same
  account, then the problem is with your Linux system and NOT your
  service provider.


  20.2.  I can send email, but not receive it

  If you are using dynamic IP numbers, this is perfectly normal. See
  "Setting up Services" below.


  20.3.  Why can't people finger, WWW, gopher, talk etc to my machine?

  Again, if you are using dynamic IP numbers, this is perfectly normal.
  See "Setting up Services" below.



  21.  Using Internet services with Dynamic IP numbers

  If you are using dynamic IP numbers (and many service providers will
  only give you a dynamic IP number unless you pay significantly more
  for your connection), then you have to recognise the limitations this
  imposes.


  First of all, outbound service requests will work just fine. That is,
  you can send email using sendmail (provided you have correctly set up
  sendmail), ftp files from remote sites, finger users on other
  machines, browse the web etc.


  In particular, you can answer email that you have brought down to your
  machine whilst you are off line. Mail will simply sit in your mail
  queue until you dial back into your ISP.
  However, your machine is NOT connected to the Internet 24 hours a day,
  nor does it have the same IP number every time it is connected. So it
  is impossible for you to receive email directed to your machine, and
  very difficult to set up a web or ftp server that your friends can
  access! As far as the Internet is concerned your machine does not
  exist as a unique, permanently contactable machine as it does not have
  a unique IP number (remember - other machines will be using the IP
  number when they are allocated it on dial in).


  If you set up a WWW (or any other server), it is totally unknown by
  any user on the Internet UNLESS they know that your machine is
  connected AND its actual (current) IP number. There are a number of
  ways they can get this info, ranging from you ringing them, sending
  them email to tell them or cunning use of ".plan" files on a shell
  account at your service provider (assuming that your provider allows
  shell and finger access).


  Now, for most users, this is not a problem - all that most people want
  is to send and receive email (using your account on your service
  provider) and make outbound connections to WWW, ftp and other servers
  on the Internet. If you MUST have inbound connections to your server,
  you should really get a static IP number. Alternatively you can
  explore the methods hinted at above...


  21.1.  Setting up email

  Even for dynamic IP numbers, you can certainly configure sendmail on
  your machine to send out any email that you compose locally.
  Configuration of sendmail can be obscure and difficult - so this
  document does not attempt to tell you how to do this. However, you
  should probably configure sendmail so that your Internet service
  provider is designated as your "smart relay" host (the sendmail.cf DS
  option). (For more sendmail configuration info, see the sendmail
  documents - and look at the m4 configurations that come with sendmail.
  There is almost certain to be one there that will meet your needs).


  There are also excellent books on Sendmail (notably the 'bible' from
  O'Reilly and Associates), but these are almost certainly overkill for
  most users!


  Once you have sendmail configured, you will probably want to have
  sendmail dispatch any messages that have been sitting in the outbound
  mail queue as soon as the PPP connection comes up. To do this, add the
  command



       sendmail -q &



  to your /etc/ppp/ip-up script (see below).


  Inbound email is a problem for dynamic IP numbers. The way to handle
  this is to:-

  o  configure your mail user agent so that all mail is sent out with a
     "reply to" header giving your email address at your Internet
     Service provider.
     If you can, you should also set your FROM address to be your email
     address at your ISP as well.

  o  use the popclient, fetchmail programs to retrieve your email from
     your service provider. Alternatively, if your ISP is using IMAP,
     use an IMAP enabled mail user agent (such as pine).


  You can automate this process at dial up time by putting the necessary
  commands in the /etc/ppp/ip-up script (see below).


  21.2.  Setting Up a local Name server

  Whilst you can quite happily use the domain name servers located at
  your ISP, you can also set up a local caching only (secondary) name
  server that is brought up by the ip-up script. The advantage of
  running a local (caching only) name server is that it will save you
  time (and bandwidth) if you frequently contact the same sites during a
  long on-line session.


  DNS configuration for a caching only nameserver (that uses a
  "forwarders' line in the named.boot file pointing at your ISPs DNS) is
  relatively simple. The O'Reilly book (DNS and Bind) explains all you
  want to know about this.


  There is also a DNS-HOWTO available.



  If you are running a small LAN that can access the Internet through
  you Linux PC (using IP Masquerade for example), it is probably a good
  idea to run a local name server (with a forwarders directive) whilst
  the link is up as this will minimise the bandwidth and delays
  associated with name resolution.


  One point of Nettiquette: ask permission from your ISP before you
  start using a secondary, caching only name server in your ISP's
  domain.  Properly configured, your DNS will not cause any problems to
  your ISP at all, but if you get things wrong, it can cause problems.


  22.  Linking two networks using PPP

  There is basically no difference between linking a single Linux PC to
  a PPP server and linking two LANs using PPP on a machine on each LAN.
  Remember, PPP is a peer to peer protocol.


  However, you DEFINITELY need to understand about how routing is
  established. Read the NET-2 howto and the Linux Network Administrator
  Guide (NAG). You will also find " TCP/IP Network Administration"
  (published by O'Reilly and Assoc - ISBN 0-937175-82-X) to be of
  invaluable assistance.


  If you are going to be sub networking an IP network number on either
  side of the link, you will also find the Linux (draft) sub networking
  mini-howto) to be of use. This is available at Linux Sub networking
  mini-HOWTO <http://www.interweft.com.au/other/>.


  In order to link two LANs, you must be using different IP network
  numbers (or subnets of the same network number) and you will need to
  use static IP numbers - or use IP masquerade. If you want to use IP
  masquerade, see the IP masquerade mini-howto for instructions on
  setting that up.


  22.1.  Setting up the IP numbers

  Arrange with the network administrator of the other LAN the IP numbers
  that will be used for each end of the PPP interface. If you are using
  static IP numbers, this will also probably require you to dial into a
  specific telephone number.


  Now edit the appropriate /etc/ppp/options[.ttyXX] file - it's a good
  idea to have a specific modem and port at your end for this
  connection. This may well require you to change your /etc/ppp/options
  file - and create appropriate options.ttyXX files for any other
  connections!


  Specify the IP numbers for your end of the PPP link in the appropriate
  options file exactly as shown above for static IP numbers.


  22.2.  Setting up the routing

  You must arrange that packets on your local LAN are routed across the
  interface that the PPP link establishes. This is a two stage process.


  First of all, you need to establish a route from the machine running
  the PPP link to the network(s) at the far end of the link. If the link
  is to the Internet, this can be handled by a default route established
  by pppd itself at your end of the connection using the 'defaultroute'
  option to pppd.



  If however, the link is only linking two LANs, then a specific network
  route must be added for each network that is accessible across the
  link.  This is done using a 'route' command for each network in the
  /etc/ppp/ip-up script (see After the link comes up...) for
  instructions on doing this.


  The second thing you need to do is to tell the other computers on your
  LAN that your Linux computer is actually the 'gateway' for the
  network(s) at the far end of the ppp link.


  Of course, the network administrator at the other end of the link has
  to do all this too! However, as s/he will be routing packets to your
  specific networks, a specific network route will be required, not a
  default route (unless the LANs at the far and of the link are linking
  into you to access the Internet across your connection).


  22.3.  Network security

  If you are linking you LAN to the Internet using PPP - or even just to
  a "foreign" LAN, you need to think about security issues. I strongly
  urge you to think about setting up a firewall!


  You should also speak to the LAN administrator at your site BEFORE you
  start linking to foreign LANs or the Internet this way. Failure to do
  so could earn you anything from no reaction to really serious trouble!


  23.  After the link comes up - the /etc/ppp/ip-up  script

  Once the PPP link is established, pppd looks for /etc/ppp/ip-up. If
  this script exists and is executable, the PPP daemon executes the
  script. This allows you to automate any special routing commands that
  may be necessary and any other actions that you want to occur every
  time the PPP link is activated.


  This is just a shell script and can do anything that a shell script
  can do (i.e. virtually anything you want).


  For example, you can get sendmail to dispatch any waiting outbound
  messages in the mail queue.


  Similarly, you can insert the commands into ip-up to collect (using
  pop) any email waiting for you at your ISP.


  There are restrictions on /etc/ppp/ip-up:-


  o  It runs in a deliberately restricted environment to enhance
     security. This means you must give a full path to binaries etc.

  o  Technically, /etc/ppp/ip-up is a program not a script. This means
     it can be directly executed - and hence it requires the standard
     file magic (#!/bin/bash) at the start of the first line and must be
     readable and executable by root.


  23.1.  Special routing

  If you are linking two LANs, you will need to set up specific routes
  to the 'foreign' LANs. This is easily done using the /etc/ppp/ip-up
  script. The only difficulty arises if your machine handles multiple
  PPP links.


  This is because the /etc/ppp/ip-up is executed for EVERY ppp
  connection that comes up, so you need to carefully execute the correct
  routing commands for the particular link that comes up - and not when
  any other link comes up!


  23.2.  Handling email queues

  When the link between two LANs comes up, you may well want to make
  sure that email that is queued at either end is flushed - sent out to
  its destination. This is done by adding the appropriate sendmail
  invocation.


  Using the bash 'case' statement on an appropriate parameter that pppd
  passes into the script accomplishes this. For example, this is the
  /etc/ppp/ip-up script I use to handle our WAN links and the link to my
  home Ethernet (also handled on the same ppp server).


  23.3.  A sample /etc/ppp/ip-up  script

  The example below provides a variety of example uses.


  ______________________________________________________________________
  #!/bin/bash
  #
  # Script which handles the routing issues as necessary for pppd
  # Only the link to Newman requires this handling.
  #
  # When the ppp link comes up, this script is called with the following
  # parameters
  #       $1      the interface name used by pppd (e.g. ppp3)
  #       $2      the tty device name
  #       $3      the tty device speed
  #       $4      the local IP address for the interface
  #       $5      the remote IP address
  #       $6      the parameter specified by the 'ipparam' option to pppd
  #
  case "$5" in
  # Handle the routing to the Newman Campus server
          202.12.126.1)
                  /sbin/route add -net 202.12.126.0 gw 202.12.126.1
  # and flush the mail queue to get their email there asap!
                  /usr/sbin/sendmail -q &
                  ;;
          139.130.177.2)
  # Our Internet link
  # When the link comes up, start the time server and synchronise to the world
  # provided it is not already running
                  if [ ! -f /var/lock/subsys/xntpd ]; then
                          /etc/rc.d/init.d/xntpd.init start &
                  fi
  # Start the news server (if not already running)
                  if [ ! -f /var/lock/subsys/news ]; then
                          /etc/rc.d/init.d/news start &
                  fi
                  ;;
          203.18.8.104)
  # Get the email down to my home machine as soon as the link comes up
  # No routing is required as my home Ethernet is handled by IP
  # masquerade and proxyarp routing.
                  /usr/sbin/sendmail -q &
                  ;;
          *)
  esac
  exit 0
  ______________________________________________________________________



  As a result of bringing up the ppp link to our Newman campus and this
  script, we end up with the following routing table entries (this
  machine also is our general dial up PPP server AND handles our
  Internet link). I have interspersed comments in the output to help
  explain what each entry is) :-



  ______________________________________________________________________
  [root@kepler /root]# route -n
  Kernel routing table
  Destination     Gateway         Genmask         Flags MSS    Window Use Iface
  # the HOST route to our remote internet gateway
  139.130.177.2   *               255.255.255.255 UH    1500   0      134 ppp4
  # the HOST route to our Newman campus server
  202.12.126.1    *               255.255.255.255 UH    1500   0       82 ppp5
  # the HOST route to my home ethernet
  203.18.8.104    *               255.255.255.255 UH    1500   0       74 ppp3
  # two of our general dial up PPP lines
  203.18.8.64     *               255.255.255.255 UH    552    0        0 ppp2
  203.18.8.62     *               255.255.255.255 UH    552    0        1 ppp1
  # the specific network route to the Newman campus LAN
  202.12.126.0    202.12.126.1    255.255.255.0   UG    1500   0        0 ppp5
  # the route to our local Ethernet (super-netting two adjacent C classes)
  203.18.8.0      *               255.255.254.0   U     1500   0     1683 eth0
  # the route to the loop back device
  127.0.0.0       *               255.0.0.0       U     3584   0      483 lo
  # the default route to the Internet
  default         139.130.177.2   *               UG    1500   0     3633 ppp4
  ______________________________________________________________________



  23.4.  Handling email

  The previous section shows how to handle the outgoing mail - simply by
  flushing the mail queue once the link is up.


  If you are running a WAN link, you can arrange with the network
  administrator of the remote LAN to do exactly the same thing. For
  example, at the Newman Campus end of our WAN link, the /etc/ppp/ip-up
  script looks like :-


  ______________________________________________________________________
  #!/bin/bash
  #
  # Script which handles the routing issues as necessary for pppd
  # Only the link to Hedland requires this handling.
  #
  # When the ppp link comes up, this script is called with the following
  # parameters
  #       $1      the interface name used by pppd (e.g. ppp3)
  #       $2      the tty device name
  #       $3      the tty device speed
  #       $4      the local IP address for the interface
  #       $5      the remote IP address
  #       $6      the parameter specified by the 'ipparam' option to pppd
  #
  case "$5" in
          203.18.8.4)
                  /usr/sbin/sendmail -q
                  ;;
          *)
  esac
  exit 0
  ______________________________________________________________________



  If however you have only a dynamic IP PPP link to your ISP, you need
  to get your email from the account on your ISPs machine. This is
  usually done using the POP (Post Office Protocol). This process can be
  handled using the 'popclient' program - and the ip-up script can
  automate this process for you too!


  Simply create a /etc/ppp/ip-up script that contains the appropriate
  invocation of popclient. For my laptop that runs Red Hat Linux (which
  I take on any travels), this is


  ______________________________________________________________________
  popclient -3 -c -u hartr -p <password> kepler.hedland.edu.au |formail -s procmail
  ______________________________________________________________________



  You could use slurp or whatever to do the same for news, and so forth.
  Remember, the ip-up script is just a standard bash script and so can
  be used to automate ANY function that needs to be accomplished every
  time the appropriate PPP link comes up.


  24.  Using /etc/ppp/ip-down

  You can create a script  that will be executed once the link has been
  terminated. This is stored in /etc/ppp/ip-down. It can be used to undo
  anything special that you did in the corresponding /etc/ppp/ip-up
  script.


  25.  Routing issues on a LAN

  If you are connected to a LAN but still want to use PPP on your
  personal Linux machine , you need to address some issues of the routes
  packets need to take from your machine to reach your LAN (through your
  Ethernet interface) and also to the remote PPP server and beyond.


  This section does NOT attempt to teach you about routing - it deals
  only with a simple, special case of (static) routing!


  I strongly urge you to read the Linux Network Administrator Guide
  (NAG) if you are NOT familiar with routing. Also the O'Reilly book
  "TCP/IP Network Administration" covers this topic in a very
  understandable form.


  The basic rule of static routing is that the DEFAULT route should be
  the one that points to the MOST number of network addresses. For other
  networks, enter specific routes to the routing table.


  The ONLY situation I am going to cover here is where your Linux box is
  on a LAN that is not connected to the Internet - and you want to dial
  out to the Internet for personal use whilst still connected to the
  LAN.


  First of all, make sure that your Ethernet route is set up to the
  specific network addresses available across your LAN - NOT set to the
  default route!

  Check this by issuing a route command, you should see something like
  the following:-



       [root@hwin /root]# route -n
       Kernel routing table
       Destination     Gateway         Genmask         Flags MSS    Window Use Iface
       loopback        *               255.255.255.0   U     1936   0       50 lo
       10.0.0.0        *               255.255.255.0   U     1436   0      565 eth0



  If your Ethernet interface (eth0) is pointing at the default route,
  (the first column will show "default" in the eth0 line) you need to
  change your Ethernet initialisation scripts to make it point at the
  specific network numbers rather than the default route (consult the
  Net2 HOWTO and NAG).


  This will allow pppd to set up your default route as shown below:-



       [root@hwin /root]# route -n
       Kernel routing table

       Destination     Gateway         Genmask         Flags MSS    Window Use Iface
       10.144.153.51   *               255.255.255.255 UH    488    0        0 ppp0
       127.0.0.0       *               255.255.255.0   U     1936   0       50 lo
       10.1.0.0        *               255.255.255.0   U     1436   0      569 eth0
       default         10.144.153.51   *               UG    488    0        3 ppp0



  As you can see, we have a host route to the PPP server (
  10.144.153.51) via ppp0 and also a default network route that uses the
  PPP server as its gateway.


  If your set up needs to be more complex than this - read the routing
  documents already mentioned and consult an expert at your site!


  If your LAN already has routers on it, you will already have gateways
  established to the wider networks available at your site. You should
  STILL point your default route at the PPP interface - and make the
  other routes specific to the networks they serve.


  25.1.  Note on Security

  When you set up a Linux box on an existing LAN to link into the
  Internet, you are potentially opening your entire LAN to the Internet
  - and the hackers that reside there. Before you do this, I strongly
  urge you to consult your network administrator and site security
  policy. If your PPP connection to the Internet is used to successfully
  attack your site, you will at the very least earn the intense anger of
  your fellow users, network and system administrators. You may also
  find yourself in very much more serious trouble!


  Before you connect a LAN to the Internet, you should consider the
  security implications of even a DYNAMIC connection - hence the earlier
  reference to the O'Reilly "Building Internet Firewalls"!


  26.  Setting up a PPP server

  As already mentioned, there are many ways to do this. What I present
  here is the way I do it (using a Cyclades multi-port serial card) and
  a rotary dial in set of telephone lines.


  If you don't like the method I present here, please feel free to go
  your own way. I would however, be pleased to include additional
  methods in future versions of the HOWTO. So, please send me your
  comments and methods!


  Please note, this section only concerns setting up Linux as a PPP
  server. I do not (ever) intend to include information on setting up
  special terminal servers and such.


  Also, I have yet to experiment with shadow passwords (but will be
  doing so sometime). Information currently presented does NOT therefore
  include any bells and whistles that are required by the shadow suite.


  26.1.  Kernel compilation

  All the earlier comments regarding kernel compilation and kernel
  versions versus pppd versions apply. This section assumes that you
  have read the earlier sections of this document!


  For a PPP server, you MUST include IP forwarding in your kernel.  You
  may also wish to include other capabilities (such as IP fire walls,
  accounting etc etc).


  If you are using a multi-port serial card, then you must obviously
  include the necessary drivers in your kernel too!


  26.2.  Overview of the server system

  We offer dial up PPP (and SLIP) accounts and shell accounts using the
  same user name/password pair. This has the advantages (for us) that a
  user requires only one account and can use it for all types of
  connectivity.


  As we are an educational organisation, we do not charge our staff and
  students for access, and so do not have to worry about accounting and
  charging issues.


  We operate a firewall between our site and the Internet, and this
  restricts some user access as the dial up lines are inside our
  (Internet) firewall (for fairly obvious reasons, details of our other
  internal fire walls are not presented here and are irrelevant in any
  case).


  The process a user goes through to establish a PPP link to our site
  (once they have a valid account of course) is :-
  o  Dial into our rotary dialer (this is a single phone number that
     connects to a bank of modems - the first free modem is then used).

  o  Log in using a valid user name and password pair.

  o  At the shell prompt, issue the command ppp to start PPP on the
     server.

  o  Start PPP on their PC (be it running Windows, DOS, Linux MAC OS or
     whatever - that is their problem).


  The server uses individual /etc/ppp/options.ttyXX files for each dial
  in port that set the remote IP number for dynamic IP allocation.  The
  server users proxyarp routing for the remote clients (set via the
  appropriate option to pppd). This obviates the need for routed or
  gated.


  When the user hangs up at their end, pppd detects this and tells the
  modem to hang up, bringing down the PPP link at the same time.


  26.3.  Getting the software together

  You will need the following software:-

  o  Linux, properly compiled to include the necessary options.

  o  The appropriate version of pppd for your kernel.

  o  A 'getty' program that intelligently handles modem communications.
     We use getty_ps2.0.7h, but mgetty is highly thought of. I
     understand that mgetty can detect a call that is using pap/chap
     (pap is the standard for Windows95) and invoke pppd automatically,
     but I have yet to explore this.

  o  An operational domain name server (DNS) that is accessible to your
     dial up users.
     You should really be running your own DNS if possible...


  26.4.  Setting up standard (shell access) dialup.

  Before you can set up your PPP server, your Linux box must be capable
  of handling standard dial up access.


  This howto does NOT cover setting this up. Please see the
  documentation of the getty of your choice and serial HOWTO for
  information on this.


  26.5.  Setting up the PPP options files

  You will need to set up the overall /etc/ppp/options with the common
  options for all dial up ports. The options we use are:-



  ______________________________________________________________________
  asyncmap 0
  netmask 255.255.254.0
  proxyarp
  lock
  crtscts
  modem
  ______________________________________________________________________



  Note - we do NOT use any (obvious) routing - and in particular there
  is no defaultroute option. The reason for this is that all you (as a
  PPP server) are required to do is to route packets from the ppp client
  out across your LAN/Internet and route packets to the client from your
  LAN and beyond.


  All that is necessary for this is a host route to the client machine
  and the use of the 'proxyarp' option to pppd.


  The 'proxyarp' option sets up (surprise) a proxy ARP entry in the PPP
  server's ARP table that basically says 'send all packets destined for
  the PPP client to me'. This is the easiest way to set up routing to a
  single PPP client - but you cannot use this if you are routing between
  two LANs - you must add proper network routes which can't use proxy
  ARP.


  You will almost certainly wish to provide dynamic IP number allocation
  to your dial up users. You can accomplish this by allocating an IP
  number to each dial up port. Now, create a /etc/ppp/options.ttyXX for
  each dial up port.


  In this, simply put the local (server) IP number and the IP number
  that is to be used for that port. For example


  ______________________________________________________________________
  kepler:slip01
  ______________________________________________________________________



  In particular, note that you can use valid host names in this file (I
  find that I only remember the IP numbers of critical machines and
  devices on my networks - names are more meaningful)!


  26.6.  Setting pppd up to allow users to (successfully) run it

  As starting a ppp link implies configuring a kernel device (a network
  interface) and manipulating the kernel routing tables, special
  privileges are required - in fact full root privileges.


  Fortunately, pppd has been designed to be 'safe' to run set uid to
  root.  So you will need to

  ______________________________________________________________________
  chmod u+s /usr/sbin/pppd
  ______________________________________________________________________

  When you list the file, it should then appear as

  ______________________________________________________________________
  -rwsr-xr-x   1 root     root        74224 Apr 28 07:17 /usr/sbin/pppd
  ______________________________________________________________________



  If you do not do this, users will be unable to set up their ppp link.


  26.7.  Setting up the global alias for pppd

  In order to simplify things for our dial up PPP users, we create a
  global alias (in /etc/bashrc) so that one simple command will start
  ppp on the server once they are logged in.


  This looks like

  ______________________________________________________________________
  alias ppp="exec /usr/sbin/pppd -detach"
  ______________________________________________________________________



  What this does is

  o  exec : this means replace the running program (in this case the
     shell) with the program that is run.

  o  pppd -detach : start up pppd and do NOT fork into the background.
     This ensures that when pppd exits there is no process hanging
     around.

  When a user logs in like this, they will appear in the output of 'w'
  as

  ______________________________________________________________________
    6:24pm  up 3 days,  7:00,  4 users,  load average: 0.05, 0.03, 0.00
  User     tty       login@  idle   JCPU   PCPU  what
  hartr    ttyC0     3:05am  9:14                -
  ______________________________________________________________________



  And that is it...I told you this was a simple, basic PPP server
  system!


  27.  Using PPP across a null modem (direct serial) connection

  This is very simple - there is no modem in the way so things are much
  simpler.


  First of all, choose one of the machines as a 'server', setting up a
  getty on the serial port so you can test that you do have connectivity
  using minicom to access the serial port on the 'client'.


  Once you have this functioning, you can remove the getty UNLESS you
  want to make sure that the connection is validated using user
  name/password pairs as for a dial up connection. As you have 'physical
  control' of both machines, I will presume that you do NOT want to do
  this.


  Now, on the server, remove the getty and make sure that you have the
  serial ports on both machines configured correctly using 'setserial'.


  All you need to do now is to start pppd on both systems. I will assume
  that the connection uses /dev/ttyS34 on both machines. So, on both
  machines execute the command:-


  ______________________________________________________________________
  pppd -detach crtscts lock <local IP>:<remote IP> /dev/ttyS3 38400 &
  ______________________________________________________________________



  This will bring up the link - but as yet you have no routing
  specified.  You can test the link by pinging to and fro to each
  machine. If this works, bring down the link by killing one of the pppd
  processes.


  The routing you need will of course depend on exactly what you are
  trying to do. Generally, one of the machines will be connected to an
  Ethernet (and beyond) and so the routing required is exactly the same
  as for a PPP server and client.


  So on the Ethernet equipped machine, the pppd command would be


  ______________________________________________________________________
  pppd -detach crtscts lock proxyarp <local IP>:<remote IP> /dev/ttyS3 38400 &
  ______________________________________________________________________



  and on the other machine


  ______________________________________________________________________
  pppd -detach crtscts lock defaultroute <local IP>:<remote IP> /dev/ttyS3 38400 &
  ______________________________________________________________________



  If you are linking two networks (using a serial link!) or have more
  complex routing requirements, you can use /etc/ppp/ip-up in exactly
  the same way as mentioned earlier in this document.



  Robert Hart
  Port Hedland, Western Australia
  Melbourne, Victoria, Australia August/October 1996 January/March 1997



  Palm OS Desktop HOWTO
  by David H. Silber palm@orbits.com
  v1.1.1, 28 February 1999

  This HOWTO document explains how to use your Palm OS device with a
  Linux system.  Although HOWTO documents are targeted towards use with
  the Linux operating system, this one is not dependent on the version
  of unix used.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 This Document
     1.2 See Also

  2. General Information

     2.1 Hardware Installation

  3. Sharing Data Between Palm OS and Linux Systems

     3.1 The pilot-link software
        3.1.1 Installing the pilot-link software
        3.1.2 Using the pilot-link software
           3.1.2.1 pilot-xfer
           3.1.2.2 install-memo
           3.1.2.3 memos
           3.1.2.4 pilot-addresses
        3.1.3 Mailing List
        3.1.4 Mailing List Archives
        3.1.5 FTP Site

  4. Linux Applications Which Synchronise with PalmOS Devices.

     4.1 XNotesPlus
        4.1.1 Installing XNotesPlus

  5. Data Conversion

     5.1 MakeDoc
        5.1.1 Installing MakeDoc
        5.1.2 Using MakeDoc

  6. People

  7. A History of Palm OS devices.



  ______________________________________________________________________

  1.  Introduction

  PalmOS is the operating system used by the Pilot, PalmPilot, WorkPad,
  Palm III, Palm IIIx, Palm V, and pdQ smartphone devices.  Each of
  these gadgets is a Personal Digital Assistant (PDA) and comes with
  programs to help the user keep track of personal information, such as
  addresses & telephone numbers, meetings, todo lists and general notes.
  In this way, they replace the traditional paper address book, calendar
  and notepad.  PalmOS devices improve on earlier PDAs in that they can
  synchronize their data with another computer.  Of course the other
  computer must have compatible software in order to communicate with
  the PalmOS device.  This software is often referred to as a conduit.
  Although 3Com does not support Linux conduits, Linux developers have
  provided a wide variety of applications which share data with PalmOS
  devices.



  1.1.  This Document

  The latest version of this document can be read at
  http://www.orbits.com/Palm/PalmOS-HOWTO.html, and is part of the Linux
  Documentation Project (LDP).  This document superceedes the previous
  version, which was called the Pilot HOWTO.  See
  http://sunsite.unc.edu/LDP/ for further information about the LDP and
  other HOWTO documents.

  If you find anything in this document which needs to be corrected or
  better explained, please send me e-mail at the address above and
  specify which version of this document you are referring to.

  This document is Copyright  1997, 1998 & 1999 by David H. Silber.  It
  is released under the copyright terms in the LDP HOWTO-INDEX document.


  1.2.  See Also

  The http://www.orbits.com/Palm/PalmDevelompent-HOWTO.html document
  describes how to use the gcc-based development system to write Palm OS
  applications.

  The http://www.orbits.com/Palm/PalmConduit-HOWTO.html document
  describes how to use the pilot-link libraries to write Linux-resident
  conduits for use with Palm OS devices.

  You may also wish to look at http://www.orbits.com/Palm/ for updates
  on the status of these and related documents.



  2.  General Information

  2.1.  Hardware Installation

  Palm OS devices come with a ``cradle'' for exchanging data with the
  desktop computer.  This device is actually a serial cable with a
  custom holder for the Palm OS devices and an integrated `HotSync'
  button.  Plug your cradle into a spare serial port on your computer.
  When you run each of the stand-alone programs, you will need to place
  your Palm OS device in the cradle and push the `HotSync' button so the
  Palm OS device knows that it has to communicate.  If the Palm OS
  device happens to be off when the button is pushed, it will turn
  itself on.

  For convenience, create a device, /dev/pilot which will be an
  alternate name for the serial port to which your Palm OS device cradle
  is connected.  As the root user, enter the following at the shell
  prompt:


       ln /dev/ttyS0 /dev/pilot



  Replace ttyS0 with the name of the port to which you connected your
  Palm OS device's cradle.



  3.  Sharing Data Between Palm OS and Linux Systems

  3.1.  The pilot-link software

  The pilot-link suite of software tools allows you to download programs
  onto your Palm OS device, and transfer data for the Palm OS device's
  various built-in programs between the Linux system and the Palm OS
  device.  While these programs are not quite as seamless as the desktop
  software that comes with the Palm OS device, they do allow you to copy
  your data in both directions.  In general, each separate program in
  the pilot-link suite manages one type of data.



  3.1.1.  Installing the pilot-link software

  The prepackaged versions will inevitably lag slightly behind the
  master distribution, but will be easier to install and not require
  configuration.  The master distribution might be a better choice in
  those rare occasions when you have been waiting for a particular
  feature or bug fix.

  You can get the Debian Linux (i386) port of pilot-link version 0.8.7
  from ftp://ftp.debian.org/pub/debian/dists/stable/main/binary-
  i386/otherosfs/pilot-link_0.8.7-2.deb.  If this file does not exist,
  you will likely find a newer version located in the same directory.
  If all else fails, or if you want a more recent version than has been
  packaged for Debian, you can install the generic distribution, as
  detailed below.  Install this file in the normal manner and skip to
  Using the pilot-link software.

  You can get the RedHat Linux (i386) port of pilot-link version 0.8.9
  from ftp://ftp.redhat.com/pub/contrib/i386/pilot-
  link-0.8.9-1.i386.rpm.  If this file does not exist, you will likely
  find a newer version located in the same directory.  If all else
  fails, or if you want a more recent version than has been packaged for
  RedHat, you can install the generic distribution, as detailed below.
  Install this file in the normal manner and skip to Using the pilot-
  link software.

  For other versions of Linux or unix, or if you need the absolute
  latest version, download the version 0.9.0 of pilot-link from
  ftp://ryeham.ee.ryerson.ca/pub/PalmOS/pilot-link.0.9.0.tar.gz.  The
  version number is likely to change, but new versions should end up in
  the same location with a similar name.

  Once you have the software distribution, unpack it with:


       tar -xvzf pilot-link.0.9.0.tar.gz



  If your version of tar does not support the -z option, decompress the
  archive with gunzip, as follows:

  gunzip pilot-link.0.9.0.tar.gz | tar -xvf -



  This will create a directory (pilot-link.0.9.0) containing the source.

  Change your working directory to the source (pilot-link.0.9.0)
  directory.

  Run ./configure.  This will search through your system for information
  needed to compile the software.  configure will set things up to be
  installed in /usr/local by default.  If you want to change it, run
  ./configure --prefix=DIR, where DIR is replaced with the name of the
  directory to which the software will be installed.

  Run make.  This will compile the software.  The software will not be
  installed until later, so that you have a chance to try it out first.
  (If you are replacing an older version with a newer release, you may
  wish to check and make sure that no functionality that you need has
  been broken.  Generally, this is not a problem.)

  As the root user, run make install.  This will copy the software into
  directories under /usr/local (or wherever you specified with the
  --prefix option).  If you can not log in as root, you can install the
  software to some directory where you have write access.

  Don't forget to add any new directories of executables to your search
  path.


  3.1.2.  Using the pilot-link software

  Most of the programs in the pilot-link suite are conduits, that is
  they transfer data into or out of your Palm OS device.

  Each time you use of one of these programs, press the HotSync button
  on your Palm OS device's cradle.  This will initiate the Palm OS
  device side of the data transfer.  Note that not all of these programs
  prompt you to press the `HotSync' button, so you may have to remember
  to do it yourself.


  For more details, and other options to these programs, view the
  corresponding manual page.  There is an overview manual page under the
  name pilot-link.  For the pilot-xfer program, for example, type man
  pilot-xfer at your unix shell prompt.



  3.1.2.1.  pilot-xfer

  Possibly the most useful program in the pilot-link suite, pilot-xfer
  allows you to install programs on your Palm OS device, make a backup,
  and restore that backup.


  To install a program:


       pilot-xfer /dev/pilot -i program.prc



  To backup your Palm OS device:


       pilot-xfer /dev/pilot -b backup-directory



  This will copy all of the databases on your Palm OS device, (including
  programs?)  to a directory called ``backup-directory'', creating it if
  it does not already exist.

  To restore data to Palm OS device:


       pilot-xfer /dev/pilot -r backup-directory



  Generally, you will only need to do this if your Palm OS device loses
  power or if you have to do a hard reset.

  To list the programs on your Palm OS device:


       pilot-xfer /dev/pilot -l



  3.1.2.2.  install-memo

  Install a Linux file onto the Palm OS device as a memo.

  To install a memo into your (already existing) project category:


       install-memo /dev/pilot -c project project.memo



  The name of the file will be inserted into the memo as its first line
  and will appear in the directory of memos on your Palm OS device.



  3.1.2.3.  memos

  This program grabs each memo from the Palm OS device and prints it out
  in standard mailbox format.

  To view your memos:


       memos /dev/pilot



  3.1.2.4.  pilot-addresses

  pilot-addresses Transfer the address database to or from the Palm OS
  device.

  To write your address data to a Linux file from your Palm OS device:


       pilot-addresses /dev/pilot -w storage.file



  To read your address data from a Linux file onto your Palm OS device:


       pilot-addresses /dev/pilot -r storage.file



  3.1.3.  Mailing List

  The pilot-unix mailing list is maintained by Matthew Cravit pilot-
  unix-owner@lists.best.com.  Its mandate is:


       The pilot-unix mailing list is for discussion and idea-sharing for those
       interested in using the US Robotics Pilot PDAs with UNIX systems. This
       includes people who are interested in helping to develop tools to allow the
       Pilot to operate with UNIX, and possibly to develop an SDK for the Pilot
       for Unix.



  For more information, including how to subscribe to the list, send
  mail containing the word ``INFO'' to pilot-unix-
  request@lists.best.com.  The subject line does not matter.


  3.1.4.  Mailing List Archives

  An archive of the pilot-unix mailing list can be found at
  http:///www.acm.rpi.edu/~albert/pilot/.  It is maintained by Chris
  Stevens albert@acm.rpi.edu.


  3.1.5.  FTP Site

  An FTP site containing an archive of Palm OS tools for use on unix
  systems is located at ftp://ryeham.ee.ryerson.ca/pub/PalmOS/.  It is
  maintained by Jeff Dionne jeff@ryeham.ee.ryerson.ca.



  4.  Linux Applications Which Synchronise with PalmOS Devices.

  4.1.  XNotesPlus

  XNotesPlus provides a means to post small notes on your X-Windows
  desktop.  These notes can be shared as memos with your PalmOS device.


  4.1.1.  Installing XNotesPlus

  The XNotesPlus web page at http://www.graphics-
  muse.org/xnotes/xnotes.html contains full installation and use
  instructions.  I suggest using the prebuilt binaries if you can.

  One caveat is that you need to create an ``Xnotes'' category on your
  PalmOS device, if you intend to export notes.



  5.  Data Conversion

  5.1.  MakeDoc

  One short-coming of the Palm OS device's built-in memo program is that
  it does not deal well with large documents.  To compensate for this,
  Rick Bram <mailto:rbram@concentric.net> wrote Doc, a document reader
  for the Palm OS device.  (See
  http://www.concentric.net/~rbram/doc.shtml).  Documents can be
  converted to the Doc format with MakeDoc, by Pat Beirne
  <mailto:pat.beirne@sympatico.ca>.



  5.1.1.  Installing MakeDoc

  MakeDoc can be downloaded from
  http://www.concentric.net/~rbram/makedoc7.cpp.  Compile it with your
  C++ compiler and install the resulting executable as ``makedoc'' in a
  directory in your search path.  There seems to be a small bug in
  makedoc (version 0.7a) in that it does not output a newline as the
  last character displayed to the user.  This does not seem to affect
  the resulting document file, but it is annoying.



  5.1.2.  Using MakeDoc

  Use MakeDoc as follows:


       makedoc data.txt data.prc "Data to display with Doc"



  This will create a file data.prc, which can be installed on your Palm
  OS device with pilot-xfer.  The text "Data to display with Doc" will
  be displayed in the directory of documents that Doc manages.

  The syntax for MakeDoc is as follows:

  makedoc [-n] [-b] <text-file> <prc-file> <story-name>
  or
  makedoc -d [-b] <prc-file> <text-file>



     <text-file>
        The file that you wish to convert.

     <prc-file>
        The name of the resulting file.  (End the name with ``.prc''.)

     <story-name>
        The name you want displayed in the Doc or Jdoc directory of
        documents.

  There are also options to decode the resulting .prc file and manage
  various compression options.



  F.  People

  Kenneth Albanowski <mailto:kjahds@kjahds.com> Maintains the pilot-link
  suite of tools.

  Donnie Barnes <mailto:djb@redhat.com> Packaged pilot-link suite as Red
  Hat RPM files.

  Rick Bram <mailto:rbram@concentric.net> Author of Doc.

  Matthew Cravit <mailto:pilot-unix-owner@lists.best.com> List owner for
  the pilot-unix mailing list.

  Jeff Dionne <mailto:jeff@ryeham.ee.ryerson.ca> Original author of the
  pilot-link suite of tools.  Manages the FTP area for the UNIX Palm
  OS/Pilot development project.

  Mark W. Eichin <mailto:eichen@kitten.gen.ma.us> Ported pilot-link
  suite to Debian Linux.

  David H. Silber <mailto:pilot@orbits.com> Author of this document.

  Chris Stevens <mailto:albert@acm.rpi.edu> Maintains the pilot-unix
  mailing list archives.


  G.  A History of Palm OS devices.

  There are two versions of the Pilot.  They are the 1000 and the 5000
  and have 128k and 512k of RAM, respectively. They come with Palm OS
  1.0 in ROM.

  Then came two devices with the name PalmPilot.  They are the PalmPilot
  Personal and the PalmPilot Professional and have 512k and 1 Meg of
  RAM, respectively.  They also have a backlighting feature for the LCD
  panel and version 2.0 of the operating system.  The Professional also
  comes with a TCP/IP stack and a few extra programs built-in.

  IBM has released a rebadged version of the PalmPilot Professional,
  which they call a WorkPad.

  Now we have the Palm III, which has a redesigned case and an infrared
  port, not to mention the 2 Meg of RAM and Palm OS 3.0.
  There is an announced product from Qualcomm, called the pdQ
  smartphone, which is a cell phone that incorporates a Palm OS PDA.
  Don't get all excited about it yet, it will not be released until
  sometime in 1999.

  It is possible to upgrade any Pilot by swapping out the memory card,
  which includes both RAM & ROM.  Of course, this doesn't get you
  backlighting for the original Pilot series.



  Linux Parallel Processing HOWTO
  Hank Dietz, pplinux@ecn.purdue.edu
  v980105, 5 January 1998

  Parallel Processing refers to the concept of speeding-up the execution
  of a program by dividing the program into multiple fragments that can
  execute simultaneously, each on its own processor.  A program being
  executed across N processors might execute N times faster than it
  would using a single processor.  This document discusses the four
  basic approaches to parallel processing that are available to Linux
  users:  SMP Linux systems, clusters of networked Linux systems, paral-
  lel execution using multimedia instructions (i.e., MMX), and attached
  (parallel) processors hosted by a Linux system.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Is Parallel Processing What I Want?
     1.2 Terminology
     1.3 Example Algorithm
     1.4 Organization Of This Document

  2. SMP Linux

     2.1 SMP Hardware
        2.1.1 Does each processor have its own L2 cache?
        2.1.2 Bus configuration?
        2.1.3 Memory interleaving and DRAM technologies?
     2.2 Introduction To Shared Memory Programming
        2.2.1 Shared Everything Vs. Shared Something
           2.2.1.1 Shared Everything
           2.2.1.2 Shared Something
        2.2.2 Atomicity And Ordering
        2.2.3 Volatility
        2.2.4 Locks
        2.2.5 Cache Line Size
        2.2.6 Linux Scheduler Issues
     2.3 bb_threads
     2.4 LinuxThreads
     2.5 System V Shared Memory
     2.6 Memory Map Call

  3. Clusters Of Linux Systems

     3.1 Why A Cluster?
     3.2 Network Hardware
        3.2.1 ArcNet
        3.2.2 ATM
        3.2.3 CAPERS
        3.2.4 Ethernet
        3.2.5 Ethernet (Fast Ethernet)
        3.2.6 Ethernet (Gigabit Ethernet)
        3.2.7 FC (Fibre Channel)
        3.2.8 FireWire (IEEE 1394)
        3.2.9 HiPPI And Serial HiPPI
        3.2.10 IrDA (Infrared Data Association)
        3.2.11 Myrinet
        3.2.12 Parastation
        3.2.13 PLIP
        3.2.14 SCI
        3.2.15 SCSI
        3.2.16 ServerNet
        3.2.17 SHRIMP
        3.2.18 SLIP
        3.2.19 TTL_PAPERS
        3.2.20 USB (Universal Serial Bus)
        3.2.21 WAPERS
     3.3 Network Software Interface
        3.3.1 Sockets
           3.3.1.1 UDP Protocol (SOCK_DGRAM)
           3.3.1.2 TCP Protocol (SOCK_STREAM)
        3.3.2 Device Drivers
        3.3.3 User-Level Libraries
     3.4 PVM (Parallel Virtual Machine)
     3.5 MPI (Message Passing Interface)
     3.6 AFAPI (Aggregate Function API)
     3.7 Other Cluster Support Libraries
        3.7.1 Condor (process migration support)
        3.7.2 DFN-RPC (German Research Network - Remote Procedure Call)
        3.7.3 DQS (Distributed Queueing System)
     3.8 General Cluster References
        3.8.1 Beowulf
        3.8.2 Linux/AP+
        3.8.3 Locust
        3.8.4 Midway DSM (Distributed Shared Memory)
        3.8.5 Mosix
        3.8.6 NOW (Network Of Workstations)
        3.8.7 Parallel Processing Using Linux
        3.8.8 Pentium Pro Cluster Workshop
        3.8.9 TreadMarks DSM (Distributed Shared Memory)
        3.8.10 U-Net (User-level NETwork interface architecture)
        3.8.11 WWT (Wisconsin Wind Tunnel)

  4. SIMD Within A Register (e.g., using MMX)

     4.1 SWAR: What Is It Good For?
     4.2 Introduction To SWAR Programming
        4.2.1 Polymorphic Operations
        4.2.2 Partitioned Operations
           4.2.2.1 Partitioned Instructions
           4.2.2.2 Unpartitioned Operations With Correction Code
           4.2.2.3 Controlling Field Values
        4.2.3 Communication & Type Conversion Operations
        4.2.4 Recurrence Operations (Reductions, Scans, etc.)
     4.3 MMX SWAR Under Linux

  5. Linux-Hosted Attached Processors

     5.1 A Linux PC Is A Good Host
     5.2 Did You DSP That?
     5.3 FPGAs And Reconfigurable Logic Computing

  6. Of General Interest

     6.1 Programming Languages And Compilers
        6.1.1 Fortran 66/77/PCF/90/HPF/95
        6.1.2 GLU (Granular Lucid)
        6.1.3 Jade And SAM
        6.1.4 Mentat And Legion
        6.1.5 MPL (MasPar Programming Language)
        6.1.6 PAMS (Parallel Application Management System)
        6.1.7 Parallaxis-III
        6.1.8 pC++/Sage++
        6.1.9 SR (Synchronizing Resources)
        6.1.10 ZPL And IronMan
     6.2 Performance Issues
     6.3 Conclusion - It's Out There


  ______________________________________________________________________

  1.  Introduction


  Parallel Processing refers to the concept of speeding-up the execution
  of a program by dividing the program into multiple fragments that can
  execute simultaneously, each on its own processor.  A program being
  executed across n processors might execute n times faster than it
  would using a single processor.



  Traditionally, multiple processors were provided within a specially
  designed "parallel computer"; along these lines, Linux now supports
  SMP systems (often sold as "servers") in which multiple processors
  share a single memory and bus interface within a single computer.  It
  is also possible for a group of computers (for example, a group of PCs
  each running Linux) to be interconnected by a network to form a
  parallel-processing cluster.  The third alternative for parallel
  computing using Linux is to use the multimedia instruction extensions
  (i.e., MMX) to operate in parallel on vectors of integer data.
  Finally, it is also possible to use a Linux system as a "host" for a
  specialized attached parallel processing compute engine.  All these
  approaches are discussed in detail in this document.


  1.1.  Is Parallel Processing What I Want?


  Although use of multiple processors can speed-up many operations, most
  applications cannot yet benefit from parallel processing.  Basically,
  parallel processing is appropriate only if:


  o  Your application has enough parallelism to make good use of
     multiple processors.  In part, this is a matter of identifying
     portions of the program that can execute independently and
     simultaneously on separate processors, but you will also find that
     some things that could execute in parallel might actually slow
     execution if executed in parallel using a particular system.  For
     example, a program that takes four seconds to execute within a
     single machine might be able to execute in only one second of
     processor time on each of four machines, but no speedup would be
     achieved if it took three seconds or more for these machines to
     coordinate their actions.

  o  Either the particular application program you are interested in
     already has been parallelized (rewritten to take advantage of
     parallel processing) or you are willing to do at least some new
     coding to take advantage of parallel processing.

  o  You are interested in researching, or at least becoming familiar
     with, issues involving parallel processing.  Parallel processing
     using Linux systems isn't necessarily difficult, but it is not
     familiar to most computer users, and there isn't any book called
     "Parallel Processing for Dummies"...  at least not yet.  This HOWTO
     is a good starting point, not all you need to know.


  The good news is that if all the above are true, you'll find that
  parallel processing using Linux can yield supercomputer performance
  for some programs that perform complex computations or operate on
  large data sets.  What's more, it can do that using cheap hardware...
  which you might already own.  As an added bonus, it is also easy to
  use a parallel Linux system for other things when it is not busy
  executing a parallel job.

  If parallel processing is not what you want, but you would like to
  achieve at least a modest improvement in performance, there are still
  things you can do.  For example, you can improve performance of
  sequential programs by moving to a faster processor, adding memory,
  replacing an IDE disk with fast wide SCSI, etc.  If that's all you are
  interested in, jump to section 6.2; otherwise, read on.


  1.2.  Terminology


  Although parallel processing has been used for many years in many
  systems, it is still somewhat unfamiliar to most computer users.
  Thus, before discussing the various alternatives, it is important to
  become familiar with a few commonly used terms.

     SIMD:
        SIMD (Single Instruction stream, Multiple Data stream) refers to
        a parallel execution model in which all processors execute the
        same operation at the same time, but each processor is allowed
        to operate upon its own data.  This model naturally fits the
        concept of performing the same operation on every element of an
        array, and is thus often associated with vector or array
        manipulation.  Because all operations are inherently
        synchronized, interactions among SIMD processors tend to be
        easily and efficiently implemented.


     MIMD:
        MIMD (Multiple Instruction stream, Multiple Data stream) refers
        to a parallel execution model in which each processor is
        essentially acting independently.  This model most naturally
        fits the concept of decomposing a program for parallel execution
        on a functional basis; for example, one processor might update a
        database file while another processor generates a graphic
        display of the new entry.  This is a more flexible model than
        SIMD execution, but it is achieved at the risk of debugging
        nightmares called race conditions, in which a program may
        intermittently fail due to timing variations reordering the
        operations of one processor relative to those of another.


     SPMD:
        SPMD (Single Program, Multiple Data) is a restricted version of
        MIMD in which all processors are running the same program.
        Unlike SIMD, each processor executing SPMD code may take a
        different control flow path through the program.


     Communication Bandwidth:
        The bandwidth of a communication system is the maximum amount of
        data that can be transmitted in a unit of time...  once data
        transmission has begun.  Bandwidth for serial connections is
        often measured in baud or bits/second (b/s), which generally
        correspond to 1/10 to 1/8 that many Bytes/second (B/s).  For
        example, a 1,200 baud modem transfers about 120 B/s, whereas a
        155 Mb/s ATM network connection is nearly 130,000 times faster,
        transferring about about 17 MB/s.  High bandwidth allows large
        blocks of data to be transferred efficiently between processors.


     Communication Latency:
        The latency of a communication system is the minimum time taken
        to transmit one object, including any send and receive software
        overhead.  Latency is very important in parallel processing
        because it determines the minimum useful grain size, the minimum
        run time for a segment of code to yield speed-up through
        parallel execution.  Basically, if a segment of code runs for
        less time than it takes to transmit its result value (i.e.,
        latency), executing that code segment serially on the processor
        that needed the result value would be faster than parallel
        execution; serial execution would avoid the communication
        overhead.


     Message Passing:
        Message passing is a model for interactions between processors
        within a parallel system.  In general, a message is constructed
        by software on one processor and is sent through an
        interconnection network to another processor, which then must
        accept and act upon the message contents.  Although the overhead
        in handling each message (latency) may be high, there are
        typically few restrictions on how much information each message
        may contain.  Thus, message passing can yield high bandwidth
        making it a very effective way to transmit a large block of data
        from one processor to another.  However, to minimize the need
        for expensive message passing operations, data structures within
        a parallel program must be spread across the processors so that
        most data referenced by each processor is in its local memory...
        this task is known as data layout.


     Shared Memory:
        Shared memory is a model for interactions between processors
        within a parallel system.  Systems like the multi-processor
        Pentium machines running Linux physically share a single memory
        among their processors, so that a value written to shared memory
        by one processor can be directly accessed by any processor.
        Alternatively, logically shared memory can be implemented for
        systems in which each processor has it own memory by converting
        each non-local memory reference into an appropriate inter-
        processor communication.  Either implementation of shared memory
        is generally considered easier to use than message passing.
        Physically shared memory can have both high bandwidth and low
        latency, but only when multiple processors do not try to access
        the bus simultaneously; thus, data layout still can seriously
        impact performance, and cache effects, etc., can make it
        difficult to determine what the best layout is.


     Aggregate Functions:
        In both the message passing and shared memory models, a
        communication is initiated by a single processor; in contrast,
        aggregate function communication is an inherently parallel
        communication model in which an entire group of processors act
        together.  The simplest such action is a barrier
        synchronization, in which each individual processor waits until
        every processor in the group has arrived at the barrier.  By
        having each processor output a datum as a side-effect of
        reaching a barrier, it is possible to have the communication
        hardware return a value to each processor which is an arbitrary
        function of the values collected from all processors.  For
        example, the return value might be the answer to the question
        "did any processor find a solution?"  or it might be the sum of
        one value from each processor.  Latency can be very low, but
        bandwidth per processor also tends to be low.  Traditionally,
        this model is used primarily to control parallel execution
        rather than to distribute data values.


     Collective Communication:
        This is another name for aggregate functions, most often used
        when referring to aggregate functions that are constructed using
        multiple message-passing operations.


     SMP:
        SMP (Symmetric Multi-Processor) refers to the operating system
        concept of a group of processors working together as peers, so
        that any piece of work could be done equally well by any
        processor.  Typically, SMP implies the combination of MIMD and
        shared memory.  In the IA32 world, SMP generally means compliant
        with MPS (the Intel MultiProcessor Specification); in the
        future, it may mean "Slot 2"....


     SWAR:
        SWAR (SIMD Within A Register) is a generic term for the concept
        of partitioning a register into multiple integer fields and
        using register-width operations to perform SIMD-parallel
        computations across those fields.  Given a machine with k-bit
        registers, data paths, and function units, it has long been
        known that ordinary register operations can function as SIMD
        parallel operations on as many as n, k/n-bit, field values.
        Although this type of parallelism can be implemented using
        ordinary integer registers and instructions, many high-end
        microprocessors have recently added specialized instructions to
        enhance the performance of this technique for multimedia-
        oriented tasks.  In addition to the Intel/AMD/Cyrix MMX
        (MultiMedia eXtensions), there are: Digital Alpha MAX
        (MultimediA eXtensions), Hewlett-Packard PA-RISC MAX (Multimedia
        Acceleration eXtensions), MIPS MDMX (Digital Media eXtension,
        pronounced "Mad Max"), and Sun SPARC V9 VIS (Visual Instruction
        Set).  Aside from the three vendors who have agreed on MMX, all
        of these instruction set extensions are roughly comparable, but
        mutually incompatible.


     Attached Processors:
        Attached processors are essentially special-purpose computers
        that are connected to a host system to accelerate specific types
        of computation.  For example, many video and audio cards for PCs
        contain attached processors designed, respectively, to
        accelerate common graphics operations and audio DSP (Digital
        Signal Processing).  There is also a wide range of attached
        array processors, so called because they are designed to
        accelerate arithmetic operations on arrays.  In fact, many
        commercial supercomputers are really attached processors with
        workstation hosts.


     RAID:
        RAID (Redundant Array of Inexpensive Disks) is a simple
        technology for increasing both the bandwidth and reliability of
        disk I/O.  Although there are many different variations, all
        have two key concepts in common.  First, each data block is
        striped across a group of n+k disk drives such that each drive
        only has to read or write 1/n of the data...  yielding n times
        the bandwidth of one drive.  Second, redundant data is written
        so that data can be recovered if a disk drive fails; this is
        important because otherwise if any one of the n+k drives were to
        fail, the entire file system could be lost.  A good overview of
        RAID in general is given at  <http://www.dpt.com/uraiddoc.html>,
        and information about RAID options for Linux systems is at
        <http://linas.org/linux/raid.html>.  Aside from specialized RAID
        hardware support, Linux also supports software RAID 0, 1, 4, and
        5 across multiple disks hosted by a single Linux system; see the
        Software RAID mini-HOWTO and the Multi-Disk System Tuning mini-
        HOWTO for details.  RAID across disk drives on multiple machines
        in a cluster is not directly supported.


     IA32:
        IA32 (Intel Architecture, 32-bit) really has nothing to do with
        parallel processing, but rather refers to the class of
        processors whose instruction sets are generally compatible with
        that of the Intel 386.  Basically, any Intel x86 processor after
        the 286 is compatible with the 32-bit flat memory model that
        characterizes IA32.  AMD and Cyrix also make a multitude of
        IA32-compatible processors.  Because Linux evolved primarily on
        IA32 processors and that is where the commodity market is
        centered, it is convenient to use IA32 to distinguish any of
        these processors from the PowerPC, Alpha, PA-RISC, MIPS, SPARC,
        etc.  The upcoming IA64 (64-bit with EPIC, Explicitly Parallel
        Instruction Computing) will certainly complicate matters, but
        Merced, the first IA64 processor, is not scheduled for
        production until 1999.


     COTS:
        Since the demise of many parallel supercomputer companies, COTS
        (Commercial Off-The-Shelf) is commonly discussed as a
        requirement for parallel computing systems.  Being fanatically
        pure, the only COTS parallel processing techniques using PCs are
        things like SMP Windows NT servers and various MMX Windows
        applications; it really doesn't pay to be that fanatical.  The
        underlying concept of COTS is really minimization of development
        time and cost.  Thus, a more useful, more common, meaning of
        COTS is that at least most subsystems benefit from commodity
        marketing, but other technologies are used where they are
        effective.  Most often, COTS parallel processing refers to a
        cluster in which the nodes are commodity PCs, but the network
        interface and software are somewhat customized...  typically
        running Linux and applications codes that are freely available
        (e.g., copyleft or public domain), but not literally COTS.

  1.3.  Example Algorithm


  In order to better understand the use of the various parallel
  programming approaches outlined in this HOWTO, it is useful to have an
  example problem.  Although just about any simple parallel algorithm
  would do, by selecting an algorithm that has been used to demonstrate
  various other parallel programming systems, it becomes a bit easier to
  compare and contrast approaches.  M. J.  Quinn's book, Parallel
  Computing Theory And Practice, second edition, McGraw Hill, New York,
  1994, uses a parallel algorithm that computes the value of Pi to
  demonstrate a variety of different parallel supercomputer programming
  environments (e.g., nCUBE message passing, Sequent shared memory).  In
  this HOWTO, we use the same basic algorithm.

  The algorithm computes the approximate value of Pi by summing the area
  under x squared.  As a purely sequential C program, the algorithm
  looks like:



  ______________________________________________________________________
  #include <stdlib.h>;
  #include <stdio.h>;

  main(int argc, char **argv)
  {
    register double width, sum;
    register int intervals, i;

    /* get the number of intervals */
    intervals = atoi(argv[1]);
    width = 1.0 / intervals;

    /* do the computation */
    sum = 0;
    for (i=0; i<intervals; ++i) {
      register double x = (i + 0.5) * width;
      sum += 4.0 / (1.0 + x * x);
    }
    sum *= width;

    printf("Estimation of pi is %f\n", sum);

    return(0);
  }
  ______________________________________________________________________



  However, this sequential algorithm easily yields an "embarrassingly
  parallel" implementation.  The area is subdivided into intervals, and
  any number of processors can each independently sum the intervals
  assigned to it, with no need for interaction between processors.  Once
  the local sums have been computed, they are added together to create a
  global sum; this step requires some level of coordination and
  communication between processors.  Finally, this global sum is printed
  by one processor as the approximate value of Pi.

  In this HOWTO, the various parallel implementations of this algorithm
  appear where each of the different programming methods is discussed.


  1.4.  Organization Of This Document


  The remainder of this document is divided into five parts.  Sections
  2, 3, 4, and 5 correspond to the three different types of hardware
  configurations supporting parallel processing using Linux:


  o  Section 2 discusses SMP Linux systems.  These directly support MIMD
     execution using shared memory, although message passing also is
     implemented easily.  Although Linux supports SMP configurations up
     to 16 processors, most SMP PC systems have either two or four
     identical processors.

  o  Section 3 discusses clusters of networked machines, each running
     Linux.  A cluster can be used as a parallel processing system that
     directly supports MIMD execution and message passing, perhaps also
     providing logically shared memory.  Simulated SIMD execution and
     aggregate function communication also can be supported, depending
     on the networking method used.  The number of processors in a
     cluster can range from two to thousands, primarily limited by the
     physical wiring constraints of the network.  In some cases, various
     types of machines can be mixed within a cluster; for example, a
     network combining DEC Alpha and Pentium Linux systems would be a
     heterogeneous cluster.

  o  Section 4 discusses SWAR, SIMD Within A Register.  This is a very
     restrictive type of parallel execution model, but on the other
     hand, it is a built-in capability of ordinary processors.
     Recently, MMX (and other) instruction set extensions to modern
     processors have made this approach even more effective.

  o  Section 5 discusses the use of Linux PCs as hosts for simple
     parallel computing systems.  Either as an add-in card or as an
     external box, attached processors can provide a Linux system with
     formidable processing power for specific types of applications.
     For example, inexpensive ISA cards are available that provide
     multiple DSP processors offering hundreds of MFLOPS for compute-
     bound problems.  However, these add-in boards are just processors;
     they generally do not run an OS, have disk or console I/O
     capability, etc.  To make such systems useful, the Linux "host"
     must provide these functions.


  The final section of this document covers aspects that are of general
  interest for parallel processing using Linux, not specific to a
  particular one of the approaches listed above.

  As you read this document, keep in mind that we haven't tested
  everything, and a lot of stuff reported here "still has a research
  character" (a nice way to say "doesn't quite work like it should" ;-).
  However, parallel processing using Linux is useful now, and an
  increasingly large group is working to make it better.

  The author of this HOWTO is Hank Dietz, Ph.D., currently Associate
  Professor of Electrical and Computer Engineering at Purdue University,
  in West Lafayette, IN, 47907-1285.  Dietz retains rights to this
  document as per the Linux Documentation Project guidelines.  Although
  an effort has been made to ensure the correctness and fairness of this
  presentation, neither Dietz nor Purdue University can be held
  responsible for any problems or errors, and Purdue University does not
  endorse any of the work/products discussed.


  2.  SMP Linux


  This document gives a brief overview of how to use SMP Linux
  <http://www.uk.linux.org/SMP/title.html> systems for parallel
  processing.  The most up-to-date information on SMP Linux is probably
  available via the SMP Linux project mailing list; send email to
  majordomo@vger.rutgers.edu with the text subscribe linux-smp to join
  the list.

  Does SMP Linux really work?  In June 1996, I purchased a brand new
  (well, new off-brand ;-) two-processor 100MHz Pentium system.  The
  fully assembled system, including both processors, Asus motherboard,
  256K cache, 32M RAM, 1.6G disk, 6X CDROM, Stealth 64, and 15" Acer
  monitor, cost a total of $1,800.  This was just a few hundred dollars
  more than a comparable uniprocessor system.  Getting SMP Linux running
  was simply a matter of installing the "stock" uniprocessor Linux,
  recompiling the kernel with the SMP=1 line in the makefile uncommented
  (although I find setting SMP to 1 a bit ironic ;-), and informing lilo
  about the new kernel.  This system performs well enough, and has been
  stable enough, to serve as my primary workstation ever since.  In
  summary, SMP Linux really does work.

  The next question is how much high-level support is available for
  writing and executing shared memory parallel programs under SMP Linux.
  Through early 1996, there wasn't much.  Things have changed.  For
  example, there is now a very complete POSIX threads library.

  Although performance may be lower than for native shared-memory
  mechanisms, an SMP Linux system also can use most parallel processing
  software that was originally developed for a workstation cluster using
  socket communication.  Sockets (see section 3.3) work within an SMP
  Linux system, and even for multiple SMPs networked as a cluster.
  However, sockets imply a lot of unnecessary overhead for an SMP.  Much
  of that overhead is within the kernel or interrupt handlers; this
  worsens the problem because SMP Linux generally allows only one
  processor to be in the kernel at a time and the interrupt controller
  is set so that only the boot processor can process interrupts.
  Despite this, typical SMP communication hardware is so much better
  than most cluster networks that cluster software will often run better
  on an SMP than on the cluster for which it was designed.

  The remainder of this section discusses SMP hardware, reviews the
  basic Linux mechanisms for sharing memory across the processes of a
  parallel program, makes a few observations about atomicity,
  volatility, locks, and cache lines, and finally gives some pointers to
  other shared memory parallel processing resources.


  2.1.  SMP Hardware


  Although SMP systems have been around for many years, until very
  recently, each such machine tended to implement basic functions
  differently enough so that operating system support was not portable.
  The thing that has changed this situation is Intel's Multiprocessor
  Specification, often referred to as simply MPS.  The MPS 1.4
  specification is currently available as a PDF file at
  <http://www.intel.com/design/pro/datashts/242016.htm>, and there is a
  brief overview of MPS 1.1 at
  <http://support.intel.com/oem_developer/ial/support/9300.HTM>, but be
  aware that Intel does re-arrange their WWW site often.  A wide range
  of vendors <http://www.uruk.org/~erich/mps-hw.html> are building MPS-
  compliant systems supporting up to four processors, but MPS
  theoretically allows many more processors.

  The only non-MPS, non-IA32, systems supported by SMP Linux are Sun4m
  multiprocessor SPARC machines.  SMP Linux supports most Intel MPS
  version 1.1 or 1.4 compliant machines with up to sixteen 486DX,
  Pentium, Pentium MMX, Pentium Pro, or Pentium II processors.
  Unsupported IA32 processors include the Intel 386, Intel 486SX/SLC
  processors (the lack of floating point hardware interferes with the
  SMP mechanisms), and AMD & Cyrix processors (they require different
  SMP support chips that do not seem to be available at this writing).

  It is important to understand that the performance of MPS-compliant
  systems can vary widely.  As expected, one cause for performance
  differences is processor speed:  faster clock speeds tend to yield
  faster systems, and a Pentium Pro processor is faster than a Pentium.
  However, MPS does not really specify how hardware implements shared
  memory, but only how that implementation must function from a software
  point of view; this means that performance is also a function of how
  the shared memory implementation interacts with the characteristics of
  SMP Linux and your particular programs.

  The primary way in which systems that comply with MPS differ is in how
  they implement access to physically shared memory.



  2.1.1.  Does each processor have its own L2 cache?


  Some MPS Pentium systems, and all MPS Pentium Pro and Pentium II
  systems, have independent L2 caches.  (The L2 cache is packaged within
  the Pentium Pro or Pentium II modules.)  Separate L2 caches are
  generally viewed as maximizing compute performance, but things are not
  quite so obvious under Linux.  The primary complication is that the
  current SMP Linux scheduler does not attempt to keep each process on
  the same processor, a concept known as processor affinity.  This may
  change soon; there has recently been some discussion about this in the
  SMP Linux development community under the title "processor binding."
  Without processor affinity, having separate L2 caches may introduce
  significant overhead when a process is given a timeslice on a
  processor other than the one that was executing it last.

  Many relatively inexpensive systems are organized so that two Pentium
  processors share a single L2 cache.  The bad news is that this causes
  contention for the cache, seriously degrading performance when running
  multiple independent sequential programs.  The good news is that many
  parallel programs might actually benefit from the shared cache because
  if both processors will want to access the same line from shared
  memory, only one had to fetch it into cache and contention for the bus
  is averted.  The lack of processor affinity also causes less damage
  with a shared L2 cache.  Thus, for parallel programs, it isn't really
  clear that sharing L2 cache is as harmful as one might expect.

  Experience with our dual Pentium shared 256K cache system shows quite
  a wide range of performance depending on the level of kernel activity
  required.  At worst, we see only about 1.2x speedup.  However, we also
  have seen up to 2.1x speedup, which suggests that compute-intensive
  SPMD-style code really does profit from the "shared fetch" effect.


  2.1.2.  Bus configuration?


  The first thing to say is that most modern systems connect the
  processors to one or more PCI buses that in turn are "bridged" to one
  or more ISA/EISA buses.  These bridges add latency, and both EISA and
  ISA generally offer lower bandwidth than PCI (ISA being the lowest),
  so disk drives, video cards, and other high-performance devices
  generally should be connected via a PCI bus interface.

  Although an MPS system can achieve good speed-up for many compute-
  intensive parallel programs even if there is only one PCI bus, I/O
  operations occur at no better than uniprocessor performance...  and
  probably a little worse due to bus contention from the processors.
  Thus, if you are looking to speed-up I/O, make sure that you get an
  MPS system with multiple independent PCI busses and I/O controllers
  (e.g., multiple SCSI chains).  You will need to be careful to make
  sure SMP Linux supports what you get.  Also keep in mind that the
  current SMP Linux essentially allows only one processor in the kernel
  at any time, so you should choose your I/O controllers carefully to
  pick ones that minimize the kernel time required for each I/O
  operation.  For really high performance, you might even consider doing
  raw device I/O directly from user processes, without a system call...
  this isn't necessarily as hard as it sounds, and need not compromise
  security (see section 3.3 for a description of the basic techniques).

  It is important to note that the relationship between bus speed and
  processor clock rate has become very fuzzy over the past few years.
  Although most systems now use the same PCI clock rate, it is not
  uncommon to find a faster processor clock paired with a slower bus
  clock.  The classic example of this was that the Pentium 133 generally
  used a faster bus than a Pentium 150, with appropriately strange-
  looking performance on various benchmarks.  These effects are
  amplified in SMP systems; it is even more important to have a faster
  bus clock.


  2.1.3.  Memory interleaving and DRAM technologies?


  Memory interleaving actually has nothing whatsoever to do with MPS,
  but you will often see it mentioned for MPS systems because these
  systems are typically more demanding of memory bandwidth.  Basically,
  two-way or four-way interleaving organizes RAM so that a block access
  is accomplished using multiple banks of RAM rather than just one.
  This provides higher memory access bandwidth, particularly for cache
  line loads and stores.

  The waters are a bit muddied about this, however, because EDO DRAM and
  various other memory technologies tend to improve similar kinds of
  operations.  An excellent overview of DRAM technologies is given in
  <http://www.pcguide.com/ref/ram/tech.htm>.

  So, for example, is it better to have 2-way interleaved EDO DRAM or
  non-interleaved SDRAM?  That is a very good question with no simple
  answer, because both interleaving and exotic DRAM technologies tend to
  be expensive.  The same dollar investment in more ordinary memory
  configurations generally will give you a significantly larger main
  memory.  Even the slowest DRAM is still a heck of a lot faster than
  using disk-based virtual memory....


  2.2.  Introduction To Shared Memory Programming


  Ok, so you have decided that parallel processing on an SMP is a great
  thing to do...  how do you get started?  Well, the first step is to
  learn a little bit about how shared memory communication really works.

  It sounds like you simply have one processor store a value into memory
  and another processor load it; unfortunately, it isn't quite that
  simple.  For example, the relationship between processes and
  processors is very blurry; however, if we have no more active
  processes than there are processors, the terms are roughly
  interchangeable.  The remainder of this section briefly summarizes the
  key issues that could cause serious problems, if you were not aware of
  them:  the two different models used to determine what is shared,
  atomicity issues, the concept of volatility, hardware lock
  instructions, cache line effects, and Linux scheduler issues.


  2.2.1.  Shared Everything Vs. Shared Something


  There are two fundamentally different models commonly used for shared
  memory programming:  shared everything and shared something.  Both of
  these models allow processors to communicate by loads and stores
  from/into shared memory; the distinction comes in the fact that shared
  everything places all data structures in shared memory, while shared
  something requires the user to explicitly indicate which data
  structures are potentially shared and which are private to a single
  processor.

  Which shared memory model should you use?  That is mostly a question
  of religion.  A lot of people like the shared everything model because
  they do not really need to identify which data structures should be
  shared at the time they are declared...  you simply put locks around
  potentially-conflicting accesses to shared objects to ensure that only
  one process(or) has access at any moment.  Then again, that really
  isn't all that simple...  so many people prefer the relative safety of
  shared something.


  2.2.1.1.  Shared Everything


  The nice thing about sharing everything is that you can easily take an
  existing sequential program and incrementally convert it into a shared
  everything parallel program.  You do not have to first determine which
  data need to be accessible by other processors.

  Put simply, the primary problem with sharing everything is that any
  action taken by one processor could affect the other processors.  This
  problem surfaces in two ways:


  o  Many libraries use data structures that simply are not sharable.
     For example, the UNIX convention is that most functions can return
     an error code in a variable called errno; if two shared everything
     processes perform various calls, they would interfere with each
     other because they share the same errno.  Although there is now a
     library version that fixes the errno problem, similar problems
     still exist in most libraries.  For example, unless special
     precautions are taken, the X library will not work if calls are
     made from multiple shared everything processes.

  o  Normally, the worst-case behavior for a program with a bad pointer
     or array subscript is that the process that contains the offending
     code dies.  It might even generate a core file that clues you in to
     what happened.  In shared everything parallel processing, it is
     very likely that the stray accesses will bring the demise of a
     process other than the one at fault, making it nearly impossible to
     localize and correct the error.

  Neither of these types of problems is common when shared something is
  used, because only the explicitly-marked data structures are shared.
  It also is fairly obvious that shared everything only works if all
  processors are executing the exact same memory image; you cannot use
  shared everything across multiple different code images (i.e., can use
  only SPMD, not general MIMD).

  The most common type of shared everything programming support is a
  threads library.  Threads
  <http://liinwww.ira.uka.de/bibliography/Os/threads.html> are
  essentially "light-weight" processes that might not be scheduled in
  the same way as regular UNIX processes and, most importantly, share
  access to a single memory map.  The POSIX Pthreads
  <http://www.mit.edu:8001/people/proven/pthreads.html> package has been
  the focus of a number of porting efforts; the big question is whether
  any of these ports actually run the threads of a program in parallel
  under SMP Linux (ideally, with a processor for each thread).  The
  POSIX API doesn't require it, and versions like
  <http://www.aa.net/~mtp/PCthreads.html> apparently do not implement
  parallel thread execution - all the threads of a program are kept
  within a single Linux process.

  The first threads library that supported SMP Linux parallelism was the
  now somewhat obsolete bb_threads library,
  <ftp://caliban.physics.utoronto.ca/pub/linux/>, a very small library
  that used the Linux clone() call to fork new, independently scheduled,
  Linux processes all sharing a single address space.  SMP Linux
  machines can run multiple of these "threads" in parallel because each
  "thread" is a full Linux process; the trade-off is that you do not get
  the same "light-weight" scheduling control provided by some thread
  libraries under other operating systems.  The library used a bit of C-
  wrapped assembly code to install a new chunk of memory as each
  thread's stack and to provide atomic access functions for an array of
  locks (mutex objects).  Documentation consisted of a README and a
  short sample program.

  More recently, a version of POSIX threads using clone() has been
  developed.  This library, LinuxThreads
  <http://pauillac.inria.fr/~xleroy/linuxthreads/>, is clearly the
  preferred shared everything library for use under SMP Linux.  POSIX
  threads are well documented, and the LinuxThreads README
  <http://pauillac.inria.fr/~xleroy/linuxthreads/README> and
  LinuxThreads FAQ
  <http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html> are very well
  done.  The primary problem now is simply that POSIX threads have a lot
  of details to get right and LinuxThreads is still a work in progress.
  There is also the problem that the POSIX thread standard has evolved
  through the standardization process, so you need to be a bit careful
  not to program for obsolete early versions of the standard.


  2.2.1.2.  Shared Something


  Shared something is really "only share what needs to be shared."  This
  approach can work for general MIMD (not just SPMD) provided that care
  is taken for the shared objects to be allocated at the same places in
  each processor's memory map.  More importantly, shared something makes
  it easier to predict and tune performance, debug code, etc.  The only
  problems are:


  o  It can be hard to know beforehand what really needs to be shared.

  o  The actual allocation of objects in shared memory may be awkward,
     especially for what would have been stack-allocated objects.  For
     example, it may be necessary to explicitly allocate shared objects
     in a separate memory segment, requiring separate memory allocation
     routines and introducing extra pointer indirections in each
     reference.

  Currently, there are two very similar mechanisms that allow groups of
  Linux processes to have independent memory spaces, all sharing only a
  relatively small memory segment.  Assuming that you didn't foolishly
  exclude "System V IPC" when you configured your Linux system, Linux
  supports a very portable mechanism that has generally become known as
  "System V Shared Memory."  The other alternative is a memory mapping
  facility whose implementation varies widely across different UNIX
  systems:  the mmap() system call.  You can, and should, learn about
  these calls from the manual pages...  but a brief overview of each is
  given in sections 2.5 and 2.6 to help get you started.


  2.2.2.  Atomicity And Ordering


  No matter which of the above two models you use, the result is pretty
  much the same:  you get a pointer to a chunk of read/write memory that
  is accessible by all processes within your parallel program.  Does
  that mean I can just have my parallel program access shared memory
  objects as though they were in ordinary local memory?  Well, not
  quite....

  Atomicity refers to the concept that an operation on an object is
  accomplished as an indivisible, uninterruptible, sequence.
  Unfortunately, sharing memory access does not imply that all
  operations on data in shared memory occur atomically.  Unless special
  precautions are taken, only simple load or store operations that occur
  within a single bus transaction (i.e., aligned 8, 16, or 32-bit
  operations, but not misaligned nor 64-bit operations) are atomic.
  Worse still, "smart" compilers like GCC will often perform
  optimizations that could eliminate the memory operations needed to
  ensure that other processors can see what this processor has done.
  Fortunately, both these problems can be remedied...  leaving only the
  relationship between access efficiency and cache line size for us to
  worry about.

  However, before discussing these issues, it is useful to point-out
  that all of this assumes that memory references for each processor
  happen in the order in which they were coded.  The Pentium does this,
  but also notes that future Intel processors might not.  So, for future
  processors, keep in mind that it may be necessary to surround some
  shared memory accesses with instructions that cause all pending memory
  accesses to complete, thus providing memory access ordering.  The
  CPUID instruction apparently is reserved to have this side-effect.


  2.2.3.  Volatility


  To prevent GCC's optimizer from buffering values of shared memory
  objects in registers, all objects in shared memory should be declared
  as having types with the volatile attribute.  If this is done, all
  shared object reads and writes that require just one word access will
  occur atomically.  For example, suppose that p is a pointer to an
  integer, where both the pointer and the integer it will point at are
  in shared memory; the ANSI C declaration might be:


  ______________________________________________________________________
  volatile int * volatile p;
  ______________________________________________________________________



  In this code, the first volatile refers to the int that p will
  eventually point at; the second volatile refers to the pointer itself.
  Yes, it is annoying, but it is the price one pays for enabling GCC to
  perform some very powerful optimizations.  At least in theory, the
  -traditional option to GCC might suffice to produce correct code at
  the expense of some optimization, because pre-ANSI K&R C essentially
  claimed that all variables were volatile unless explicitly declared as
  register.  Still, if your typical GCC compile looks like cc -O6 ...,
  you really will want to explicitly mark things as volatile only where
  necessary.

  There has been a rumor to the effect that using assembly-language
  locks that are marked as modifying all processor registers will cause
  GCC to appropriately flush all variables, thus avoiding the
  "inefficient" compiled code associated with things declared as
  volatile.  This hack appears to work for statically allocated global
  variables using version 2.7.0 of GCC...  however, that behavior is not
  required by the ANSI C standard.  Still worse, other processes that
  are making only read accesses can buffer the values in registers
  forever, thus never noticing that the shared memory value has actually
  changed.  In summary, do what you want, but only variables accessed
  through volatile are guaranteed to work correctly.

  Note that you can cause a volatile access to an ordinary variable by
  using a type cast that imposes the volatile attribute.  For example,
  the ordinary int i; can be referenced as a volatile by *((volatile int
  *) &i); thus, you can explicitly invoke the "overhead" of volatility
  only where it is critical.


  2.2.4.  Locks


  If you thought that ++i; would always work to add one to a variable i
  in shared memory, you've got a nasty little surprise coming:  even if
  coded as a single instruction, the load and store of the result are
  separate memory transactions, and other processors could access i
  between these two transactions.  For example, having two processes
  both perform ++i; might only increment i by one, rather than by two.
  According to the Intel Pentium "Architecture and Programming Manual,"
  the LOCK prefix can be used to ensure that any of the following
  instructions is atomic relative to the data memory location it
  accesses:


  ______________________________________________________________________
  BTS, BTR, BTC                     mem, reg/imm
  XCHG                              reg, mem
  XCHG                              mem, reg
  ADD, OR, ADC, SBB, AND, SUB, XOR  mem, reg/imm
  NOT, NEG, INC, DEC                mem
  CMPXCHG, XADD
  ______________________________________________________________________



  However, it probably is not a good idea to use all these operations.
  For example, XADD did not even exist for the 386, so coding it may
  cause portability problems.

  The XCHG instruction always asserts a lock, even without the LOCK
  prefix, and thus is clearly the preferred atomic operation from which
  to build higher-level atomic constructs such as semaphores and shared
  queues.  Of course, you can't get GCC to generate this instruction
  just by writing C code...  instead, you must use a bit of in-line
  assembly code.  Given a word-size volatile object obj and a word-size
  register value reg, the GCC in-line assembly code is:


  ______________________________________________________________________
  __asm__ __volatile__ ("xchgl %1,%0"
                        :"=r" (reg), "=m" (obj)
                        :"r" (reg), "m" (obj));
  ______________________________________________________________________



  Examples of GCC in-line assembly code using bit operations for locking
  are given in the source code for the bb_threads library
  <ftp://caliban.physics.utoronto.ca/pub/linux/>.

  It is important to remember, however, that there is a cost associated
  with making memory transactions atomic.  A locking operation carries a
  fair amount of overhead and may delay memory activity from other
  processors, whereas ordinary references may use local cache.  The best
  performance results when locking operations are used as infrequently
  as possible.  Further, these IA32 atomic instructions obviously are
  not portable to other systems.

  There are many alternative approaches that allow ordinary instructions
  to be used to implement various synchronizations, including mutual
  exclusion - ensuring that at most one processor is updating a given
  shared object at any moment.  Most OS textbooks discuss at least one
  of these techniques.  There is a fairly good discussion in the Fourth
  Edition of Operating System Concepts, by Abraham Silberschatz and
  Peter B. Galvin, ISBN 0-201-50480-4.


  2.2.5.  Cache Line Size


  One more fundamental atomicity concern can have a dramatic impact on
  SMP performance:  cache line size.  Although the MPS standard requires
  references to be coherent no matter what caching is used, the fact is
  that when one processor writes to a particular line of memory, every
  cached copy of the old line must be invalidated or updated.  This
  implies that if two or more processors are both writing data to
  different portions of the same line a lot of cache and bus traffic may
  result, effectively to pass the line from cache to cache.  This
  problem is known as false sharing.  The solution is simply to try to
  organize data so that what is accessed in parallel tends to come from
  a different cache line for each process.

  You might be thinking that false sharing is not a problem using a
  system with a shared L2 cache, but remember that there are still
  separate L1 caches.  Cache organization and number of separate levels
  can both vary, but the Pentium L1 cache line size is 32 bytes and
  typical external cache line sizes are around 256 bytes.  Suppose that
  the addresses (physical or virtual) of two items are a and b and that
  the largest per-processor cache line size is c, which we assume to be
  a power of two.  To be very precise, if ((int) a) & ~(c - 1) is equal
  to ((int) b) & ~(c - 1), then both references are in the same cache
  line.  A simpler rule is that if shared objects being referenced in
  parallel are at least c bytes apart, they should map to different
  cache lines.


  2.2.6.  Linux Scheduler Issues


  Although the whole point of using shared memory for parallel
  processing is to avoid OS overhead, OS overhead can come from things
  other than communication per se.  We have already said that the number
  of processes that should be constructed is less than or equal to the
  number of processors in the machine.  But how do you decide exactly
  how many processes to make?

  For best performance, the number of processes in your parallel program
  should be equal to the expected number of your program's processes
  that simultaneously can be running on different processors.  For
  example, if a four-processor SMP typically has one process actively
  running for some other purpose (e.g., a WWW server), then your
  parallel program should use only three processes.  You can get a rough
  idea of how many other processes are active on your system by looking
  at the "load average" quoted by the uptime command.

  Alternatively, you could boost the priority of the processes in your
  parallel program using, for example, the renice command or nice()
  system call.  You must be privileged to increase priority.  The idea
  is simply to force the other processes out of processors so that your
  program can run simultaneously across all processors.  This can be
  accomplished somewhat more explicitly using the prototype version of
  SMP Linux at  <http://luz.cs.nmt.edu/~rtlinux/>, which offers real-
  time schedulers.

  If you are not the only user treating your SMP system as a parallel
  machine, you may also have conflicts between the two or more parallel
  programs trying to execute simultaneously.  This standard solution is
  gang scheduling - i.e., manipulating scheduling priority so that at
  any given moment, only the processes of a single parallel program are
  running.  It is useful to recall, however, that using more parallelism
  tends to have diminishing returns and scheduler activity adds
  overhead.  Thus, for example, it is probably better for a four-
  processor machine to run two programs with two processes each rather
  than gang scheduling between two programs with four processes each.

  There is one more twist to this.  Suppose that you are developing a
  program on a machine that is heavily used all day, but will be fully
  available for parallel execution at night.  You need to write and test
  your code for correctness with the full number of processes, even
  though you know that your daytime test runs will be slow.  Well, they
  will be very slow if you have processes busy waiting for shared memory
  values to be changed by other processes that are not currently running
  (on other processors).  The same problem occurs if you develop and
  test your code on a single-processor system.

  The solution is to embed calls in your code, wherever it may loop
  awaiting an action from another processor, so that Linux will give
  another process a chance to run.  I use a C macro, call it IDLE_ME, to
  do this:  for a test run, compile with cc -DIDLE_ME=usleep(1); ...;
  for a "production" run, compile with cc -DIDLE_ME={} ....  The
  usleep(1) call requests a 1 microsecond sleep, which has the effect of
  allowing the Linux scheduler to select a different process to run on
  that processor.  If the number of processes is more than twice the
  number of processors available, it is not unusual for codes to run ten
  times faster with usleep(1) calls than without them.


  2.3.  bb_threads


  The bb_threads ("Bare Bones" threads) library,
  <ftp://caliban.physics.utoronto.ca/pub/linux/>, is a remarkably simple
  library that demonstrates use of the Linux clone() call.  The gzip tar
  file is only 7K bytes!  Although this library is essentially made
  obsolete by the LinuxThreads library discussed in section 2.4,
  bb_threads is still usable, and it is small and simple enough to serve
  well as an introduction to use of Linux thread support.  Certainly, it
  is far less daunting to read this source code than to browse the
  source code for LinuxThreads.  In summary, the bb_threads library is a
  good starting point, but is not really suitable for coding large
  projects.

  The basic program structure for using the bb_threads library is:


  1. Start the program running as a single process.

  2. You will need to estimate the maximum stack space that will be
     required for each thread.  Guessing large is relatively harmless
     (that is what virtual memory is for ;-), but remember that all the
     stacks are coming from a single virtual address space, so guessing
     huge is not a great idea.  The demo suggests 64K.  This size is set
     to b bytes by bb_threads_stacksize(b).

  3. The next step is to initialize any locks that you will need.  The
     lock mechanism built-into this library numbers locks from 0 to
     MAX_MUTEXES, and initializes lock i by bb_threads_mutexcreate(i).

  4. Spawning a new thread is done by calling a library routine that
     takes arguments specifying what function the new thread should
     execute and what arguments should be transmitted to it.  To start a
     new thread executing the void-returning function f with the single
     argument arg, you do something like bb_threads_newthread(f, &arg),
     where f should be declared something like void f(void *arg, size_t
     dummy).  If you need to pass more than one argument, pass a pointer
     to a structure initialized to hold the argument values.

  5. Run parallel code, being careful to use bb_threads_lock(n) and
     bb_threads_unlock(n) where n is an integer identifying which lock
     to use.  Note that the lock and unlock operations in this library
     are very basic spin locks using atomic bus-locking instructions,
     which can cause excessive memory-reference interference and do not
     make any attempt to ensure fairness.

     The demo program packaged with bb_threads did not correctly use
     locks to prevent printf() from being executed simultaneously from
     within the functions fnn and main...  and because of this, the demo
     does not always work.  I'm not saying this to knock the demo, but
     rather to emphasize that this stuff is very tricky; also, it is
     only slightly easier using LinuxThreads.

  6. When a thread executes a return, it actually destroys the
     process...  but the local stack memory is not automatically
     deallocated.  To be precise, Linux doesn't support deallocation,
     but the memory space is not automatically added back to the
     malloc() free list.  Thus, the parent process should reclaim the
     space for each dead child by bb_threads_cleanup(wait(NULL)).


  The following C program uses the algorithm discussed in section 1.3 to
  compute the approximate value of Pi using two bb_threads threads.



  ______________________________________________________________________
  #include <stdio.h>
  #include <stdlib.h>
  #include <unistd.h>
  #include <sys/types.h>
  #include <sys/wait.h>
  #include "bb_threads.h"

  volatile double pi = 0.0;
  volatile int intervals;
  volatile int pids[2];      /* Unix PIDs of threads */

  void
  do_pi(void *data, size_t len)
  {
    register double width, localsum;
    register int i;
    register int iproc = (getpid() != pids[0]);

    /* set width */
    width = 1.0 / intervals;

    /* do the local computations */
    localsum = 0;
    for (i=iproc; i<intervals; i+=2) {
      register double x = (i + 0.5) * width;
      localsum += 4.0 / (1.0 + x * x);
    }
    localsum *= width;

    /* get permission, update pi, and unlock */
    bb_threads_lock(0);
    pi += localsum;
    bb_threads_unlock(0);
  }

  int
  main(int argc, char **argv)
  {
    /* get the number of intervals */
    intervals = atoi(argv[1]);

    /* set stack size and create lock... */
    bb_threads_stacksize(65536);
    bb_threads_mutexcreate(0);

    /* make two threads... */
    pids[0] = bb_threads_newthread(do_pi, NULL);
    pids[1] = bb_threads_newthread(do_pi, NULL);

    /* cleanup after two threads (really a barrier sync) */
    bb_threads_cleanup(wait(NULL));
    bb_threads_cleanup(wait(NULL));

    /* print the result */
    printf("Estimation of pi is %f\n", pi);

    /* check-out */
    exit(0);
  }
  ______________________________________________________________________



  2.4.  LinuxThreads


  LinuxThreads  <http://pauillac.inria.fr/~xleroy/linuxthreads/> is a
  fairly complete and solid implementation of "shared everything" as per
  the POSIX 1003.1c threads standard.  Unlike other POSIX threads ports,
  LinuxThreads uses the same Linux kernel threads facility (clone())
  that is used by bb_threads.  POSIX compatibility means that it is
  relatively easy to port quite a few threaded applications from other
  systems and various tutorial materials are available.  In short, this
  is definitely the threads package to use under Linux for developing
  large-scale threaded programs.

  The basic program structure for using the LinuxThreads library is:


  1. Start the program running as a single process.

  2. The next step is to initialize any locks that you will need.
     Unlike bb_threads locks, which are identified by numbers, POSIX
     locks are declared as variables of type pthread_mutex_t lock.  Use
     pthread_mutex_init(&lock,val) to initialize each one you will need
     to use.

  3. As with bb_threads, spawning a new thread is done by calling a
     library routine that takes arguments specifying what function the
     new thread should execute and what arguments should be transmitted
     to it.  However, POSIX requires the user to declare a variable of
     type pthread_t to identify each thread.  To create a thread
     pthread_t thread running f(), one calls
     pthread_create(&thread,NULL,f,&arg).

  4. Run parallel code, being careful to use pthread_mutex_lock(&lock)
     and pthread_mutex_unlock(&lock) as appropriate.

  5. Use pthread_join(thread,&retval) to clean-up after each thread.

  6. Use -D_REENTRANT when compiling your C code.

  An example parallel computation of Pi using LinuxThreads follows.  The
  algorithm of section 1.3 is used and, as for the bb_threads example,
  two threads execute in parallel.



  ______________________________________________________________________
  #include <stdio.h>
  #include <stdlib.h>
  #include "pthread.h"

  volatile double pi = 0.0;  /* Approximation to pi (shared) */
  pthread_mutex_t pi_lock;   /* Lock for above */
  volatile double intervals; /* How many intervals? */

  void *
  process(void *arg)
  {
    register double width, localsum;
    register int i;
    register int iproc = (*((char *) arg) - '0');

    /* Set width */
    width = 1.0 / intervals;

    /* Do the local computations */
    localsum = 0;
    for (i=iproc; i<intervals; i+=2) {
      register double x = (i + 0.5) * width;
      localsum += 4.0 / (1.0 + x * x);
    }
    localsum *= width;

    /* Lock pi for update, update it, and unlock */
    pthread_mutex_lock(&pi_lock);
    pi += localsum;
    pthread_mutex_unlock(&pi_lock);

    return(NULL);
  }

  int
  main(int argc, char **argv)
  {
    pthread_t thread0, thread1;
    void * retval;

    /* Get the number of intervals */
    intervals = atoi(argv[1]);

    /* Initialize the lock on pi */
    pthread_mutex_init(&pi_lock, NULL);

    /* Make the two threads */
    if (pthread_create(&thread0, NULL, process, "0") ||
        pthread_create(&thread1, NULL, process, "1")) {
      fprintf(stderr, "%s: cannot make thread\n", argv[0]);
      exit(1);
    }

    /* Join (collapse) the two threads */
    if (pthread_join(thread0, &retval) ||
        pthread_join(thread1, &retval)) {
      fprintf(stderr, "%s: thread join failed\n", argv[0]);
      exit(1);
    }

    /* Print the result */
    printf("Estimation of pi is %f\n", pi);

    /* Check-out */
    exit(0);
  }
  ______________________________________________________________________



  2.5.  System V Shared Memory


  The System V IPC (Inter-Process Communication) support consists of a
  number of system calls providing message queues, semaphores, and a
  shared memory mechanism.  Of course, these mechanisms were originally
  intended to be used for multiple processes to communicate within a
  uniprocessor system.  However, that implies that it also should work
  to communicate between processes under SMP Linux, no matter which
  processors they run on.

  Before going into how these calls are used, it is important to
  understand that although System V IPC calls exist for things like
  semaphores and message transmission, you probably should not use them.
  Why not?  These functions are generally slow and serialized under SMP
  Linux.  Enough said.

  The basic procedure for creating a group of processes sharing access
  to a shared memory segment is:


  1. Start the program running as a single process.

  2. Typically, you will want each run of a parallel program to have its
     own shared memory segment, so you will need to call shmget() to
     create a new segment of the desired size.  Alternatively, this call
     can be used to get the ID of a pre-existing shared memory segment.
     In either case, the return value is either the shared memory
     segment ID or -1 for error.  For example, to create a shared memory
     segment of b bytes, the call might be shmid = shmget(IPC_PRIVATE,
     b, (IPC_CREAT | 0666)).

  3. The next step is to attach this shared memory segment to this
     process, literally adding it to the virtual memory map of this
     process.  Although the shmat() call allows the programmer to
     specify the virtual address at which the segment should appear, the
     address selected must be aligned on a page boundary (i.e., be a
     multiple of the page size returned by getpagesize(), which is
     usually 4096 bytes), and will override the mapping of any memory
     formerly at that address.  Thus, we instead prefer to let the
     system pick the address.  In either case, the return value is a
     pointer to the base virtual address of the segment just mapped.
     The code is shmptr = shmat(shmid, 0, 0).

     Notice that you can allocate all your static shared variables into
     this shared memory segment by simply declaring all shared variables
     as members of a struct type, and declaring shmptr to be a pointer
     to that type.  Using this technique, shared variable x would be
     accessed as shmptr->x.

  4. Since this shared memory segment should be destroyed when the last
     process with access to it terminates or detaches from it, we need
     to call shmctl() to set-up this default action.  The code is
     something like shmctl(shmid, IPC_RMID, 0).

  5. Use the standard Linux fork() call to make the desired number of
     processes...  each will inherit the shared memory segment.

  6. When a process is done using a shared memory segment, it really
     should detach from that shared memory segment.  This is done by
     shmdt(shmptr).


  Although the above set-up does require a few system calls, once the
  shared memory segment has been established, any change made by one
  processor to a value in that memory will automatically be visible to
  all processes.  Most importantly, each communication operation will
  occur without the overhead of a system call.

  An example C program using System V shared memory segments follows.
  It computes Pi, using the same algorithm given in section 1.3.



  ______________________________________________________________________
  #include <stdio.h>
  #include <stdlib.h>
  #include <unistd.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <sys/ipc.h>
  #include <sys/shm.h>

  volatile struct shared { double pi; int lock; } *shared;

  inline extern int xchg(register int reg,
  volatile int * volatile obj)
  {
    /* Atomic exchange instruction */
  __asm__ __volatile__ ("xchgl %1,%0"
                        :"=r" (reg), "=m" (*obj)
                        :"r" (reg), "m" (*obj));
    return(reg);
  }

  main(int argc, char **argv)
  {
    register double width, localsum;
    register int intervals, i;
    register int shmid;
    register int iproc = 0;;

    /* Allocate System V shared memory */
    shmid = shmget(IPC_PRIVATE,
                   sizeof(struct shared),
                   (IPC_CREAT | 0600));
    shared = ((volatile struct shared *) shmat(shmid, 0, 0));
    shmctl(shmid, IPC_RMID, 0);

    /* Initialize... */
    shared->pi = 0.0;
    shared->lock = 0;

    /* Fork a child */
    if (!fork()) ++iproc;

    /* get the number of intervals */
    intervals = atoi(argv[1]);
    width = 1.0 / intervals;

    /* do the local computations */
    localsum = 0;
    for (i=iproc; i<intervals; i+=2) {
      register double x = (i + 0.5) * width;
      localsum += 4.0 / (1.0 + x * x);
    }
    localsum *= width;

    /* Atomic spin lock, add, unlock... */
    while (xchg((iproc + 1), &(shared->lock))) ;
    shared->pi += localsum;
    shared->lock = 0;

    /* Terminate child (barrier sync) */
    if (iproc == 0) {
      wait(NULL);
      printf("Estimation of pi is %f\n", shared->pi);
    }

    /* Check out */
    return(0);
  }
  ______________________________________________________________________



  In this example, I have used the IA32 atomic exchange instruction to
  implement locking.  For better performance and portability, substitute
  a synchronization technique that avoids atomic bus-locking
  instructions (discussed in section 2.2).

  When debugging your code, it is useful to remember that the ipcs
  command will report the status of the System V IPC facilities
  currently in use.


  2.6.  Memory Map Call


  Using system calls for file I/O can be very expensive; in fact, that
  is why there is a user-buffered file I/O library (getchar(), fwrite(),
  etc.).  But user buffers don't work if multiple processes are
  accessing the same writeable file, and the user buffer management
  overhead is significant.  The BSD UNIX fix for this was the addition
  of a system call that allows a portion of a file to be mapped into
  user memory, essentially using virtual memory paging mechanisms to
  cause updates.  This same mechanism also has been used in systems from
  Sequent for many years as the basis for their shared memory parallel
  processing support.  Despite some very negative comments in the (quite
  old) man page, Linux seems to correctly perform at least some of the
  basic functions, and it supports the degenerate use of this system
  call to map an anonymous segment of memory that can be shared across
  multiple processes.

  In essence, the Linux implementation of mmap() is a plug-in
  replacement for steps 2, 3, and 4 in the System V shared memory scheme
  outlined in section 2.5.  To create an anonymous shared memory
  segment:


  ______________________________________________________________________
  shmptr =
      mmap(0,                        /* system assigns address */
           b,                        /* size of shared memory segment */
           (PROT_READ | PROT_WRITE), /* access rights, can be rwx */
           (MAP_ANON | MAP_SHARED),  /* anonymous, shared */
           0,                        /* file descriptor (not used) */
           0);                       /* file offset (not used) */
  ______________________________________________________________________



  The equivalent to the System V shared memory shmdt() call is munmap():


  ______________________________________________________________________
  munmap(shmptr, b);
  ______________________________________________________________________



  In my opinion, there is no real benefit in using mmap() instead of the
  System V shared memory support.


  3.  Clusters Of Linux Systems


  This section attempts to give an overview of cluster parallel
  processing using Linux.  Clusters are currently both the most popular
  and the most varied approach, ranging from a conventional network of
  workstations (NOW) to essentially custom parallel machines that just
  happen to use Linux PCs as processor nodes.  There is also quite a lot
  of software support for parallel processing using clusters of Linux
  machines.


  3.1.  Why A Cluster?


  Cluster parallel processing offers several important advantages:


  o  Each of the machines in a cluster can be a complete system, usable
     for a wide range of other computing applications.  This leads many
     people to suggest that cluster parallel computing can simply claim
     all the "wasted cycles" of workstations sitting idle on people's
     desks.  It is not really so easy to salvage those cycles, and it
     will probably slow your co-worker's screen saver, but it can be
     done.

  o  The current explosion in networked systems means that most of the
     hardware for building a cluster is being sold in high volume, with
     correspondingly low "commodity" prices as the result.  Further
     savings come from the fact that only one video card, monitor, and
     keyboard are needed for each cluster (although you may need to swap
     these into each machine to perform the initial installation of
     Linux, once running, a typical Linux PC does not need a "console").
     In comparison, SMP and attached processors are much smaller
     markets, tending toward somewhat higher price per unit performance.

  o  Cluster computing can scale to very large systems.  While it is
     currently hard to find a Linux-compatible SMP with many more than
     four processors, most commonly available network hardware easily
     builds a cluster with up to 16 machines.  With a little work,
     hundreds or even thousands of machines can be networked.  In fact,
     the entire Internet can be viewed as one truly huge cluster.

  o  The fact that replacing a "bad machine" within a cluster is trivial
     compared to fixing a partly faulty SMP yields much higher
     availability for carefully designed cluster configurations.  This
     becomes important not only for particular applications that cannot
     tolerate significant service interruptions, but also for general
     use of systems containing enough processors so that single-machine
     failures are fairly common.  (For example, even though the average
     time to failure of a PC might be two years, in a cluster with 32
     machines, the probability that at least one will fail within 6
     months is quite high.)


  OK, so clusters are free or cheap and can be very large and highly
  available...  why doesn't everyone use a cluster?  Well, there are
  problems too:


  o  With a few exceptions, network hardware is not designed for
     parallel processing.  Typically latency is very high and bandwidth
     relatively low compared to SMP and attached processors.  For
     example, SMP latency is generally no more than a few microseconds,
     but is commonly hundreds or thousands of microseconds for a
     cluster.  SMP communication bandwidth is often more than 100
     MBytes/second; although the fastest network hardware (e.g.,
     "Gigabit Ethernet") offers comparable speed, the most commonly used
     networks are between 10 and 1000 times slower.

     The performance of network hardware is poor enough as an isolated
     cluster network.  If the network is not isolated from other
     traffic, as is often the case using "machines that happen to be
     networked" rather than a system designed as a cluster, performance
     can be substantially worse.

  o  There is very little software support for treating a cluster as a
     single system.  For example, the ps command only reports the
     processes running on one Linux system, not all processes running
     across a cluster of Linux systems.


  Thus, the basic story is that clusters offer great potential, but that
  potential may be very difficult to achieve for most applications.  The
  good news is that there is quite a lot of software support that will
  help you achieve good performance for programs that are well suited to
  this environment, and there are also networks designed specifically to
  widen the range of programs that can achieve good performance.


  3.2.  Network Hardware


  Computer networking is an exploding field...  but you already knew
  that.  An ever-increasing range of networking technologies and
  products are being developed, and most are available in forms that
  could be applied to make a parallel-processing cluster out of a group
  of machines (i.e., PCs each running Linux).

  Unfortunately, no one network technology solves all problems best; in
  fact, the range of approach, cost, and performance is at first hard to
  believe.  For example, using standard commercially-available hardware,
  the cost per machine networked ranges from less than $5 to over
  $4,000.  The delivered bandwidth and latency each also vary over four
  orders of magnitude.

  Before trying to learn about specific networks, it is important to
  recognize that these things change like the wind (see
  <http://www.uk.linux.org/NetNews.html> for Linux networking news), and
  it is very difficult to get accurate data about some networks.

  Where I was particularly uncertain, I've placed a ?.  I have spent a
  lot of time researching this topic, but I'm sure my summary is full of
  errors and has omitted many important things.  If you have any
  corrections or additions, please send email to pplinux@ecn.purdue.edu.

  Summaries like the LAN Technology Scorecard at
  <http://web.syr.edu/~jmwobus/comfaqs/lan-technology.html> give some
  characteristics of many different types of networks and LAN standards.
  However, the summary in this HOWTO centers on the network properties
  that are most relevant to construction of Linux clusters.  The section
  discussing each network begins with a short list of characteristics.
  The following defines what these entries mean.


     Linux support:
        If the answer is no, the meaning is pretty clear.  Other answers
        try to describe the basic program interface that is used to
        access the network.  Most network hardware is interfaced via a
        kernel driver, typically supporting TCP/UDP communication.  Some
        other networks use more direct (e.g., library) interfaces to
        reduce latency by bypassing the kernel.
        Years ago, it used to be considered perfectly acceptable to
        access a floating point unit via an OS call, but that is now
        clearly ludicrous; in my opinion, it is just as awkward for each
        communication between processors executing a parallel program to
        require an OS call.  The problem is that computers haven't yet
        integrated these communication mechanisms, so non-kernel
        approaches tend to have portability problems.  You are going to
        hear a lot more about this in the near future, mostly in the
        form of the new Virtual Interface (VI) Architecture,
        <http://www.viarch.org/>, which is a standardized method for
        most network interface operations to bypass the usual OS call
        layers.  The VI standard is backed by Compaq, Intel, and
        Microsoft, and is sure to have a strong impact on SAN (System
        Area Network) designs over the next few years.


     Maximum bandwidth:
        This is the number everybody cares about.  I have generally used
        the theoretical best case numbers; your mileage will vary.


     Minimum latency:
        In my opinion, this is the number everybody should care about
        even more than bandwidth.  Again, I have used the unrealistic
        best-case numbers, but at least these numbers do include all
        sources of latency, both hardware and software.  In most cases,
        the network latency is just a few microseconds; the much larger
        numbers reflect layers of inefficient hardware and software
        interfaces.


     Available as:
        Simply put, this describes how you get this type of network
        hardware.  Commodity stuff is widely available from many
        vendors, with price as the primary distinguishing factor.
        Multiple-vendor things are available from more than one
        competing vendor, but there are significant differences and
        potential interoperability problems.  Single-vendor networks
        leave you at the mercy of that supplier (however benevolent it
        may be).  Public domain designs mean that even if you cannot
        find somebody to sell you one, you or anybody else can buy parts
        and make one.  Research prototypes are just that; they are
        generally neither ready for external users nor available to
        them.


     Interface port/bus used:
        How does one hook-up this network?  The highest performance and
        most common now is a PCI bus interface card.  There are also
        EISA, VESA local bus (VL bus), and ISA bus cards.  ISA was there
        first, and is still commonly used for low-performance cards.
        EISA is still around as the second bus in a lot of PCI machines,
        so there are a few cards.  These days, you don't see much VL
        stuff (although  <http://www.vesa.org/> would beg to differ).



        Of course, any interface that you can use without having to open
        your PC's case has more than a little appeal.  IrDA and USB
        interfaces are appearing with increasing frequency.  The
        Standard Parallel Port (SPP) used to be what your printer was
        plugged into, but it has seen a lot of use lately as an external
        extension of the ISA bus; this new functionality is enhanced by
        the IEEE 1284 standard, which specifies EPP and ECP
        improvements.  There is also the old, reliable, slow RS232
        serial port.  I don't know of anybody connecting machines using
        VGA video connectors, keyboard, mouse, or game ports...  so
        that's about it.


     Network structure:
        A bus is a wire, set of wires, or fiber.  A hub is a little box
        that knows how to connect different wires/fibers plugged into
        it; switched hubs allow multiple connections to be actively
        transmitting data simultaneously.


     Cost per machine connected:
        Here's how to use these numbers.  Suppose that, not counting the
        network connection, it costs $2,000 to purchase a PC for use as
        a node in your cluster.  Adding a Fast Ethernet brings the per
        node cost to about $2,400; adding a Myrinet instead brings the
        cost to about $3,800.  If you have about $20,000 to spend, that
        means you could have either 8 machines connected by Fast
        Ethernet or 5 machines connected by Myrinet.  It also can be
        very reasonable to have multiple networks; e.g., $20,000 could
        buy 8 machines connected by both Fast Ethernet and TTL_PAPERS.
        Pick the network, or set of networks, that is most likely to
        yield a cluster that will run your application fastest.



        By the time you read this, these numbers will be wrong...  heck,
        they're probably wrong already.  There may also be quantity
        discounts, special deals, etc.  Still, the prices quoted here
        aren't likely to be wrong enough to lead you to a totally
        inappropriate choice.  It doesn't take a PhD (although I do have
        one ;-) to see that expensive networks only make sense if your
        application needs their special properties or if the PCs being
        clustered are relatively expensive.

  Now that you have the disclaimers, on with the show....


  3.2.1.  ArcNet


  o  Linux support: kernel drivers

  o  Maximum bandwidth: 2.5 Mb/s

  o  Minimum latency: 1,000 microseconds?

  o  Available as: multiple-vendor hardware

  o  Interface port/bus used: ISA

  o  Network structure: unswitched hub or bus (logical ring)

  o  Cost per machine connected: $200


  ARCNET is a local area network that is primarily intended for use in
  embedded real-time control systems.  Like Ethernet, the network is
  physically organized either as taps on a bus or one or more hubs,
  however, unlike Ethernet, it uses a token-based protocol logically
  structuring the network as a ring.  Packet headers are small (3 or 4
  bytes) and messages can carry as little as a single byte of data.
  Thus, ARCNET yields more consistent performance than Ethernet, with
  bounded delays, etc.  Unfortunately, it is slower than Ethernet and
  less popular, making it more expensive.  More information is available
  from the ARCNET Trade Association at  <http://www.arcnet.com/>.
  3.2.2.  ATM


  o  Linux support: kernel driver, AAL* library

  o  Maximum bandwidth: 155 Mb/s (soon, 1,200 Mb/s)

  o  Minimum latency: 120 microseconds

  o  Available as: multiple-vendor hardware

  o  Interface port/bus used: PCI

  o  Network structure: switched hubs

  o  Cost per machine connected: $3,000


  Unless you've been in a coma for the past few years, you have probably
  heard a lot about how ATM (Asynchronous Transfer Mode) is the
  future...  well, sort-of.  ATM is cheaper than HiPPI and faster than
  Fast Ethernet, and it can be used over the very long distances that
  the phone companies care about.  The ATM network protocol is also
  designed to provide a lower-overhead software interface and to more
  efficiently manage small messages and real-time communications (e.g.,
  digital audio and video).  It is also one of the highest-bandwidth
  networks that Linux currently supports.  The bad news is that ATM
  isn't cheap, and there are still some compatibility problems across
  vendors.  An overview of Linux ATM development is available at
  <http://lrcwww.epfl.ch/linux-atm/>.


  3.2.3.  CAPERS


  o  Linux support: AFAPI library

  o  Maximum bandwidth: 1.2 Mb/s

  o  Minimum latency: 3 microseconds

  o  Available as: commodity hardware

  o  Interface port/bus used: SPP

  o  Network structure: cable between 2 machines

  o  Cost per machine connected: $2


  CAPERS (Cable Adapter for Parallel Execution and Rapid
  Synchronization) is a spin-off of the PAPERS project,
  <http://garage.ecn.purdue.edu/~papers/>, at the Purdue University
  School of Electrical and Computer Engineering.  In essence, it defines
  a software protocol for using an ordinary "LapLink" SPP-to-SPP cable
  to implement the PAPERS library for two Linux PCs.  The idea doesn't
  scale, but you can't beat the price.  As with TTL_PAPERS, to improve
  system security, there is a minor kernel patch recommended, but not
  required:  <http://garage.ecn.purdue.edu/~papers/giveioperm.html>.


  3.2.4.  Ethernet


  o  Linux support: kernel drivers

  o  Maximum bandwidth: 10 Mb/s

  o  Minimum latency: 100 microseconds

  o  Available as: commodity hardware

  o  Interface port/bus used: PCI

  o  Network structure: switched or unswitched hubs, or hubless bus

  o  Cost per machine connected: $100 (hubless, $50)


  For some years now, 10 Mbits/s Ethernet has been the standard network
  technology.  Good Ethernet interface cards can be purchased for well
  under $50, and a fair number of PCs now have an Ethernet controller
  built-into the motherboard.  For lightly-used networks, Ethernet
  connections can be organized as a multi-tap bus without a hub; such
  configurations can serve up to 200 machines with minimal cost, but are
  not appropriate for parallel processing.  Adding an unswitched hub
  does not really help performance.  However, switched hubs that can
  provide full bandwidth to simultaneous connections cost only about
  $100 per port.  Linux supports an amazing range of Ethernet
  interfaces, but it is important to keep in mind that variations in the
  interface hardware can yield significant performance differences.  See
  the Hardware Compatibility HOWTO for comments on which are supported
  and how well they work; also see
  <http://cesdis1.gsfc.nasa.gov/linux/drivers/>.

  An interesting way to improve performance is offered by the 16-machine
  Linux cluster work done in the Beowulf project,
  <http://cesdis.gsfc.nasa.gov/linux/beowulf/beowulf.html>, at NASA
  CESDIS.  There, Donald Becker, who is the author of many Ethernet card
  drivers, has developed support for load sharing across multiple
  Ethernet networks that shadow each other (i.e., share the same network
  addresses).  This load sharing is built-into the standard Linux
  distribution, and is done invisibly below the socket operation level.
  Because hub cost is significant, having each machine connected to two
  or more hubless or unswitched hub Ethernet networks can be a very
  cost-effective way to improve performance.  In fact, in situations
  where one machine is the network performance bottleneck, load sharing
  using shadow networks works much better than using a single switched
  hub network.


  3.2.5.  Ethernet (Fast Ethernet)


  o  Linux support: kernel drivers

  o  Maximum bandwidth: 100 Mb/s

  o  Minimum latency: 80 microseconds

  o  Available as: commodity hardware

  o  Interface port/bus used: PCI

  o  Network structure: switched or unswitched hubs

  o  Cost per machine connected: $400?


  Although there are really quite a few different technologies calling
  themselves "Fast Ethernet," this term most often refers to a hub-based
  100 Mbits/s Ethernet that is somewhat compatible with older "10 BaseT"
  10 Mbits/s devices and cables.  As might be expected, anything called
  Ethernet is generally priced for a volume market, and these interfaces
  are generally a small fraction of the price of 155 Mbits/s ATM cards.
  The catch is that having a bunch of machines dividing the bandwidth of
  a single 100 Mbits/s "bus" (using an unswitched hub) yields
  performance that might not even be as good on average as using 10
  Mbits/s Ethernet with a switched hub that can give each machine's
  connection a full 10 Mbits/s.

  Switched hubs that can provide 100 Mbits/s for each machine
  simultaneously are expensive, but prices are dropping every day, and
  these switches do yield much higher total network bandwidth than
  unswitched hubs.  The thing that makes ATM switches so expensive is
  that they must switch for each (relatively short) ATM cell; some Fast
  Ethernet switches take advantage of the expected lower switching
  frequency by using techniques that may have low latency through the
  switch, but take multiple milliseconds to change the switch path...
  if your routing pattern changes frequently, avoid those switches.  See
  <http://cesdis1.gsfc.nasa.gov/linux/drivers/> for information about
  the various cards and drivers.

  Also note that, as described for Ethernet, the Beowulf project,
  <http://cesdis.gsfc.nasa.gov/linux/beowulf/beowulf.html>, at NASA has
  been developing support that offers improved performance by load
  sharing across multiple Fast Ethernets.


  3.2.6.  Ethernet (Gigabit Ethernet)


  o  Linux support: kernel drivers

  o  Maximum bandwidth: 1,000 Mb/s

  o  Minimum latency: 300 microseconds?

  o  Available as: multiple-vendor hardware

  o  Interface port/bus used: PCI

  o  Network structure: switched hubs or FDRs

  o  Cost per machine connected: $2,500?


  I'm not sure that Gigabit Ethernet,  <http://www.gigabit-
  ethernet.org/>, has a good technological reason to be called
  Ethernet...  but the name does accurately reflect the fact that this
  is intended to be a cheap, mass-market, computer network technology
  with native support for IP.  However, current pricing reflects the
  fact that Gb/s hardware is still a tricky thing to build.

  Unlike other Ethernet technologies, Gigabit Ethernet provides for a
  level of flow control that should make it a more reliable network.
  FDRs, or Full-Duplex Repeaters, simply multiplex lines, using
  buffering and localized flow control to improve performance.  Most
  switched hubs are being built as new interface modules for existing
  gigabit-capable switch fabrics.  Switch/FDR products have been shipped
  or announced by at least  <http://www.acacianet.com/>,
  <http://www.baynetworks.com/>,  <http://www.cabletron.com/>,
  <http://www.networks.digital.com/>,
  <http://www.extremenetworks.com/>,  <http://www.foundrynet.com/>,
  <http://www.gigalabs.com/>,  <http://www.packetengines.com/>.
  <http://www.plaintree.com/>,  <http://www.prominet.com/>,
  <http://www.sun.com/>, and  <http://www.xlnt.com/>.

  There is a Linux driver,
  <http://cesdis.gsfc.nasa.gov/linux/drivers/yellowfin.html>, for the
  Packet Engines "Yellowfin" G-NIC,  <http://www.packetengines.com/>.
  Early tests under Linux achieved about 2.5x higher bandwidth than
  could be achieved with the best 100 Mb/s Fast Ethernet; with gigabit
  networks, careful tuning of PCI bus use is a critical factor.  There
  is little doubt that driver improvements, and Linux drivers for other
  NICs, will follow.


  3.2.7.  FC (Fibre Channel)


  o  Linux support: no

  o  Maximum bandwidth: 1,062 Mb/s

  o  Minimum latency: ?

  o  Available as: multiple-vendor hardware

  o  Interface port/bus used: PCI?

  o  Network structure: ?

  o  Cost per machine connected: ?


  The goal of FC (Fibre Channel) is to provide high-performance block
  I/O (an FC frame carries a 2,048 byte data payload), particularly for
  sharing disks and other storage devices that can be directly connected
  to the FC rather than connected through a computer.  Bandwidth-wise,
  FC is specified to be relatively fast, running anywhere between 133
  and 1,062 Mbits/s.  If FC becomes popular as a high-end SCSI
  replacement, it may quickly become a cheap technology; for now, it is
  not cheap and is not supported by Linux.  A good collection of FC
  references is maintained by the Fibre Channel Association at
  <http://www.amdahl.com/ext/CARP/FCA/FCA.html>


  3.2.8.  FireWire (IEEE 1394)


  o  Linux support: no

  o  Maximum bandwidth: 196.608 Mb/s (soon, 393.216 Mb/s)

  o  Minimum latency: ?

  o  Available as: multiple-vendor hardware

  o  Interface port/bus used: PCI

  o  Network structure: random without cycles (self-configuring)

  o  Cost per machine connected: $600


  FireWire,  <http://www.firewire.org/>, the IEEE 1394-1995 standard, is
  destined to be the low-cost high-speed digital network for consumer
  electronics.  The showcase application is connecting DV digital video
  camcorders to computers, but FireWire is intended to be used for
  applications ranging from being a SCSI replacement to interconnecting
  the components of your home theater.  It allows up to 64K devices to
  be connected in any topology using busses and bridges that does not
  create a cycle, and automatically detects the configuration when
  components are added or removed.  Short (four-byte "quadlet") low-
  latency messages are supported as well as ATM-like isochronous
  transmission (used to keep multimedia messages synchronized).  Adaptec
  has FireWire products that allow up to 63 devices to be connected to a
  single PCI interface card, and also has good general FireWire
  information at  <http://www.adaptec.com/serialio/>.

  Although FireWire will not be the highest bandwidth network available,
  the consumer-level market (which should drive prices very low) and low
  latency support might make this one of the best Linux PC cluster
  message-passing network technologies within the next year or so.


  3.2.9.  HiPPI And Serial HiPPI


  o  Linux support: no

  o  Maximum bandwidth: 1,600 Mb/s (serial is 1,200 Mb/s)

  o  Minimum latency: ?

  o  Available as: multiple-vendor hardware

  o  Interface port/bus used: EISA, PCI

  o  Network structure: switched hubs

  o  Cost per machine connected: $3,500 (serial is $4,500)


  HiPPI (High Performance Parallel Interface) was originally intended to
  provide very high bandwidth for transfer of huge data sets between a
  supercomputer and another machine (a supercomputer, frame buffer, disk
  array, etc.), and has become the dominant standard for supercomputers.
  Although it is an oxymoron, Serial HiPPI is also becoming popular,
  typically using a fiber optic cable instead of the 32-bit wide
  standard (parallel) HiPPI cables.  Over the past few years, HiPPI
  crossbar switches have become common and prices have dropped sharply;
  unfortunately, serial HiPPI is still pricey, and that is what PCI bus
  interface cards generally support.  Worse still, Linux doesn't yet
  support HiPPI.  A good overview of HiPPI is maintained by CERN at
  <http://www.cern.ch/HSI/hippi/>; they also maintain a rather long list
  of HiPPI vendors at
  <http://www.cern.ch/HSI/hippi/procintf/manufact.htm>.


  3.2.10.  IrDA (Infrared Data Association)


  o  Linux support: no?

  o  Maximum bandwidth: 1.15 Mb/s and 4 Mb/s

  o  Minimum latency: ?

  o  Available as: multiple-vendor hardware

  o  Interface port/bus used: IrDA

  o  Network structure: thin air ;-)

  o  Cost per machine connected: $0



  IrDA (Infrared Data Association,  <http://www.irda.org/>) is that
  little infrared device on the side of a lot of laptop PCs.  It is
  inherently difficult to connect more than two machines using this
  interface, so it is unlikely to be used for clustering.  Don Becker
  did some preliminary work with IrDA.


  3.2.11.  Myrinet


  o  Linux support: library

  o  Maximum bandwidth: 1,280 Mb/s

  o  Minimum latency: 9 microseconds

  o  Available as: single-vendor hardware

  o  Interface port/bus used: PCI

  o  Network structure: switched hubs

  o  Cost per machine connected: $1,800


  Myrinet  <http://www.myri.com/> is a local area network (LAN) designed
  to also serve as a "system area network" (SAN), i.e., the network
  within a cabinet full of machines connected as a parallel system.  The
  LAN and SAN versions use different physical media and have somewhat
  different characteristics; generally, the SAN version would be used
  within a cluster.

  Myrinet is fairly conventional in structure, but has a reputation for
  being particularly well-implemented.  The drivers for Linux are said
  to perform very well, although shockingly large performance variations
  have been reported with different PCI bus implementations for the host
  computers.

  Currently, Myrinet is clearly the favorite network of cluster groups
  that are not too severely "budgetarily challenged."  If your idea of a
  Linux PC is a high-end Pentium Pro or Pentium II with at least 256 MB
  RAM and a SCSI RAID, the cost of Myrinet is quite reasonable.
  However, using more ordinary PC configurations, you may find that your
  choice is between N machines linked by Myrinet or 2N linked by
  multiple Fast Ethernets and TTL_PAPERS.  It really depends on what
  your budget is and what types of computations you care about most.


  3.2.12.  Parastation


  o  Linux support: HAL or socket library

  o  Maximum bandwidth: 125 Mb/s

  o  Minimum latency: 2 microseconds

  o  Available as: single-vendor hardware

  o  Interface port/bus used: PCI

  o  Network structure: hubless mesh

  o  Cost per machine connected: > $1,000


  The ParaStation project  <http://wwwipd.ira.uka.de/parastation> at
  University of Karlsruhe Department of Informatics is building a PVM-
  compatible custom low-latency network.  They first constructed a two-
  processor ParaPC prototype using a custom EISA card interface and PCs
  running BSD UNIX, and then built larger clusters using DEC Alphas.
  Since January 1997, ParaStation has been available for Linux.  The PCI
  cards are being made in cooperation with a company called Hitex (see
  <http://www.hitex.com:80/parastation/>).  Parastation hardware
  implements both fast, reliable, message transmission and simple
  barrier synchronization.


  3.2.13.  PLIP


  o  Linux support: kernel driver

  o  Maximum bandwidth: 1.2 Mb/s

  o  Minimum latency: 1,000 microseconds?

  o  Available as: commodity hardware

  o  Interface port/bus used: SPP

  o  Network structure: cable between 2 machines

  o  Cost per machine connected: $2


  For just the cost of a "LapLink" cable, PLIP (Parallel Line Interface
  Protocol) allows two Linux machines to communicate through standard
  parallel ports using standard socket-based software.  In terms of
  bandwidth, latency, and scalability, this is not a very serious
  network technology; however, the near-zero cost and the software
  compatibility are useful.  The driver is part of the standard Linux
  kernel distributions.


  3.2.14.  SCI


  o  Linux support: no

  o  Maximum bandwidth: 4,000 Mb/s

  o  Minimum latency: 2.7 microseconds

  o  Available as: multiple-vendor hardware

  o  Interface port/bus used: PCI, proprietary

  o  Network structure: ?

  o  Cost per machine connected: > $1,000


  The goal of SCI (Scalable Coherent Interconnect, ANSI/IEEE 1596-1992)
  is essentially to provide a high performance mechanism that can
  support coherent shared memory access across large numbers of
  machines, as well various types of block message transfers.  It is
  fairly safe to say that the designed bandwidth and latency of SCI are
  both "awesome" in comparison to most other network technologies.  The
  catch is that SCI is not widely available as cheap production units,
  and there isn't any Linux support.

  SCI primarily is used in various proprietary designs for logically-
  shared physically-distributed memory machines, such as the HP/Convex
  Exemplar SPP and the Sequent NUMA-Q 2000 (see
  <http://www.sequent.com/>).  However, SCI is available as a PCI
  interface card and 4-way switches (up to 16 machines can be connected
  by cascading four 4-way switches) from Dolphin,
  <http://www.dolphinics.com/>, as their CluStar product line.  A good
  set of links overviewing SCI is maintained by CERN at
  <http://www.cern.ch/HSI/sci/sci.html>.


  3.2.15.  SCSI


  o  Linux support: kernel drivers

  o  Maximum bandwidth: 5 Mb/s to over 20 Mb/s

  o  Minimum latency: ?

  o  Available as: multiple-vendor hardware

  o  Interface port/bus used: PCI, EISA, ISA card

  o  Network structure: inter-machine bus sharing SCSI devices

  o  Cost per machine connected: ?


  SCSI (Small Computer Systems Interconnect) is essentially an I/O bus
  that is used for disk drives, CD ROMS, image scanners, etc.  There are
  three separate standards SCSI-1, SCSI-2, and SCSI-3; Fast and Ultra
  speeds; and data path widths of 8, 16, or 32 bits (with FireWire
  compatibility also mentioned in SCSI-3).  It is all pretty confusing,
  but we all know a good SCSI is somewhat faster than EIDE and can
  handle more devices more efficiently.

  What many people do not realize is that it is fairly simple for two
  computers to share a single SCSI bus.  This type of configuration is
  very useful for sharing disk drives between machines and implementing
  fail-over - having one machine take over database requests when the
  other machine fails.  Currently, this is the only mechanism supported
  by Microsoft's PC cluster product, WolfPack.  However, the inability
  to scale to larger systems renders shared SCSI uninteresting for
  parallel processing in general.


  3.2.16.  ServerNet


  o  Linux support: no

  o  Maximum bandwidth: 400 Mb/s

  o  Minimum latency: 3 microseconds

  o  Available as: single-vendor hardware

  o  Interface port/bus used: PCI

  o  Network structure: hexagonal tree/tetrahedral lattice of hubs

  o  Cost per machine connected: ?



  ServerNet is the high-performance network hardware from Tandem,
  <http://www.tandem.com>.  Especially in the online transation
  processing (OLTP) world, Tandem is well known as a leading producer of
  high-reliability systems, so it is not surprising that their network
  claims not just high performance, but also "high data integrity and
  reliability."  Another interesting aspect of ServerNet is that it
  claims to be able to transfer data from any device directly to any
  device; not just between processors, but also disk drives, etc., in a
  one-sided style similar to that suggested by the MPI remote memory
  access mechanisms described in section 3.5.  One last comment about
  ServerNet:  although there is just a single vendor, that vendor is
  powerful enough to potentially establish ServerNet as a major
  standard...  Tandem is owned by Compaq.


  3.2.17.  SHRIMP


  o  Linux support: user-level memory mapped interface

  o  Maximum bandwidth: 180 Mb/s

  o  Minimum latency: 5 microseconds

  o  Available as: research prototype

  o  Interface port/bus used: EISA

  o  Network structure: mesh backplane (as in Intel Paragon)

  o  Cost per machine connected: ?


  The SHRIMP project,  <http://www.CS.Princeton.EDU/shrimp/>, at the
  Princeton University Computer Science Department is building a
  parallel computer using PCs running Linux as the processing elements.
  The first SHRIMP (Scalable, High-Performance, Really Inexpensive
  Multi-Processor) was a simple two-processor prototype using a dual-
  ported RAM on a custom EISA card interface.  There is now a prototype
  that will scale to larger configurations using a custom interface card
  to connect to a "hub" that is essentially the same mesh routing
  network used in the Intel Paragon (see
  <http://www.ssd.intel.com/paragon.html>).  Considerable effort has
  gone into developing low-overhead "virtual memory mapped
  communication" hardware and support software.


  3.2.18.  SLIP


  o  Linux support: kernel drivers

  o  Maximum bandwidth: 0.1 Mb/s

  o  Minimum latency: 1,000 microseconds?

  o  Available as: commodity hardware

  o  Interface port/bus used: RS232C

  o  Network structure: cable between 2 machines

  o  Cost per machine connected: $2



  Although SLIP (Serial Line Interface Protocol) is firmly planted at
  the low end of the performance spectrum, SLIP (or CSLIP or PPP) allows
  two machines to perform socket communication via ordinary RS232 serial
  ports.  The RS232 ports can be connected using a null-modem RS232
  serial cable, or they can even be connected via dial-up through a
  modem.  In any case, latency is high and bandwidth is low, so SLIP
  should be used only when no other alternatives are available.  It is
  worth noting, however, that most PCs have two RS232 ports, so it would
  be possible to network a group of machines simply by connecting the
  machines as a linear array or as a ring.  There is even load sharing
  software called EQL.


  3.2.19.  TTL_PAPERS


  o  Linux support: AFAPI library

  o  Maximum bandwidth: 1.6 Mb/s

  o  Minimum latency: 3 microseconds

  o  Available as: public-domain design, single-vendor hardware

  o  Interface port/bus used: SPP

  o  Network structure: tree of hubs

  o  Cost per machine connected: $100


  The PAPERS (Purdue's Adapter for Parallel Execution and Rapid
  Synchronization) project,  <http://garage.ecn.purdue.edu/~papers/>, at
  the Purdue University School of Electrical and Computer Engineering is
  building scalable, low-latency, aggregate function communication
  hardware and software that allows a parallel supercomputer to be built
  using unmodified PCs/workstations as nodes.

  There have been over a dozen different types of PAPERS hardware built
  that connect to PCs/workstations via the SPP (Standard Parallel Port),
  roughly following two development lines.  The versions called "PAPERS"
  target higher performance, using whatever technologies are
  appropriate; current work uses FPGAs, and high bandwidth PCI bus
  interface designs are also under development.  In contrast, the
  versions called "TTL_PAPERS" are designed to be easily reproduced
  outside Purdue, and are remarkably simple public domain designs that
  can be built using ordinary TTL logic.  One such design is produced
  commercially,  <http://chelsea.ios.com:80/~hgdietz/sbm4.html>.

  Unlike the custom hardware designs from other universities, TTL_PAPERS
  clusters have been assembled at many universities from the USA to
  South Korea.  Bandwidth is severely limited by the SPP connections,
  but PAPERS implements very low latency aggregate function
  communications; even the fastest message-oriented systems cannot
  provide comparable performance on those aggregate functions.  Thus,
  PAPERS is particularly good for synchronizing the displays of a video
  wall (to be discussed further in the upcoming Video Wall HOWTO),
  scheduling accesses to a high-bandwidth network, evaluating global
  fitness in genetic searches, etc.  Although PAPERS clusters have been
  built using IBM PowerPC AIX, DEC Alpha OSF/1, and HP PA-RISC HP-UX
  machines, Linux-based PCs are the platforms best supported.

  User programs using TTL_PAPERS AFAPI directly access the SPP hardware
  port registers under Linux, without an OS call for each access.  To do
  this, AFAPI first gets port permission using either iopl() or
  ioperm().  The problem with these calls is that both require the user
  program to be privileged, yielding a potential security hole.  The
  solution is an optional kernel patch,
  <http://garage.ecn.purdue.edu/~papers/giveioperm.html>, that allows a
  privileged process to control port permission for any process.


  3.2.20.  USB (Universal Serial Bus)


  o  Linux support: kernel driver

  o  Maximum bandwidth: 12 Mb/s

  o  Minimum latency: ?

  o  Available as: commodity hardware

  o  Interface port/bus used: USB

  o  Network structure: bus

  o  Cost per machine connected: $5?


  USB (Universal Serial Bus,  <http://www.usb.org/>) is a hot-pluggable
  conventional-Ethernet-speed, bus for up to 127 peripherals ranging
  from keyboards to video conferencing cameras.  It isn't really clear
  how multiple computers get connected to each other using USB.  In any
  case, USB ports are quickly becoming as standard on PC motherboards as
  RS232 and SPP, so don't be surprised if one or two USB ports are
  lurking on the back of the next PC you buy.  Development of a Linux
  driver is discussed at  <http://peloncho.fis.ucm.es/~inaky/USB.html>.

  In some ways, USB is almost the low-performance, zero-cost, version of
  FireWire that you can purchase today.


  3.2.21.  WAPERS


  o  Linux support: AFAPI library

  o  Maximum bandwidth: 0.4 Mb/s

  o  Minimum latency: 3 microseconds

  o  Available as: public-domain design

  o  Interface port/bus used: SPP

  o  Network structure: wiring pattern between 2-64 machines

  o  Cost per machine connected: $5


  WAPERS (Wired-AND Adapter for Parallel Execution and Rapid
  Synchronization) is a spin-off of the PAPERS project,
  <http://garage.ecn.purdue.edu/~papers/>, at the Purdue University
  School of Electrical and Computer Engineering.  If implemented
  properly, the SPP has four bits of open-collector output that can be
  wired together across machines to implement a 4-bit wide wired AND.
  This wired-AND is electrically touchy, and the maximum number of
  machines that can be connected in this way critically depends on the
  analog properties of the ports (maximum sink current and pull-up
  resistor value); typically, up to 7 or 8 machines can be networked by
  WAPERS.  Although cost and latency are very low, so is bandwidth;
  WAPERS is much better as a second network for aggregate operations
  than as the only network in a cluster.  As with TTL_PAPERS, to improve
  system security, there is a minor kernel patch recommended, but not
  required:  <http://garage.ecn.purdue.edu/~papers/giveioperm.html>.


  3.3.  Network Software Interface


  Before moving on to discuss the software support for parallel
  applications, it is useful to first briefly cover the basics of low-
  level software interface to the network hardware.  There are really
  only three basic choices:  sockets, device drivers, and user-level
  libraries.


  3.3.1.  Sockets


  By far the most common low-level network interface is a socket
  interface.  Sockets have been a part of unix for over a decade, and
  most standard network hardware is designed to support at least two
  types of socket protocols:  UDP and TCP.  Both types of socket allow
  you to send arbitrary size blocks of data from one machine to another,
  but there are several important differences.  Typically, both yield a
  minimum latency of around 1,000 microseconds, although performance can
  be far worse depending on network traffic.

  These socket types are the basic network software interface for most
  of the portable, higher-level, parallel processing software; for
  example, PVM uses a combination of UDP and TCP, so knowing the
  difference will help you tune performance.  For even better
  performance, you can also use these mechanisms directly in your
  program.  The following is just a simple overview of UDP and TCP; see
  the manual pages and a good network programming book for details.


  3.3.1.1.  UDP Protocol (SOCK_DGRAM)


  UDP is the User Datagram Protocol, but you more easily can remember
  the properties of UDP as Unreliable Datagram Processing.  In other
  words, UDP allows each block to be sent as an individual message, but
  a message might be lost in transmission.  In fact, depending on
  network traffic, UDP messages can be lost, can arrive multiple times,
  or can arrive in an order different from that in which they were sent.
  The sender of a UDP message does not automatically get an
  acknowledgment, so it is up to user-written code to detect and
  compensate for these problems.  Fortunately, UDP does ensure that if a
  message arrives, the message contents are intact (i.e., you never get
  just part of a UDP message).

  The nice thing about UDP is that it tends to be the fastest socket
  protocol.  Further, UDP is "connectionless," which means that each
  message is essentially independent of all others.  A good analogy is
  that each message is like a letter to be mailed; you might send
  multiple letters to the same address, but each one is independent of
  the others and there is no limit on how many people you can send
  letters to.


  3.3.1.2.  TCP Protocol (SOCK_STREAM)


  Unlike UDP, TCP is a reliable, connection-based, protocol.  Each block
  sent is not seen as a message, but as a block of data within an
  apparently continuous stream of bytes being transmitted through a
  connection between sender and receiver.  This is very different from
  UDP messaging because each block is simply part of the byte stream and
  it is up to the user code to figure-out how to extract each block from
  the byte stream; there are no markings separating messages.  Further,
  the connections are more fragile with respect to network problems, and
  only a limited number of connections can exist simultaneously for each
  process.  Because it is reliable, TCP generally implies significantly
  more overhead than UDP.

  There are, however, a few pleasant surprises about TCP.  One is that,
  if multiple messages are sent through a connection, TCP is able to
  pack them together in a buffer to better match network hardware packet
  sizes, potentially yielding better-than-UDP performance for groups of
  short or oddly-sized messages.  The other bonus is that networks
  constructed using reliable direct physical links between machines can
  easily and efficiently simulate TCP connections.  For example, this
  was done for the ParaStation's "Socket Library" interface software,
  which provides TCP semantics using user-level calls that differ from
  the standard TCP OS calls only by the addition of the prefix PSS to
  each function name.


  3.3.2.  Device Drivers


  When it comes to actually pushing data onto the network or pulling
  data off the network, the standard unix software interface is a part
  of the unix kernel called a device driver.  UDP and TCP don't just
  transport data, they also imply a fair amount of overhead for socket
  management.  For example, something has to manage the fact that
  multiple TCP connections can share a single physical network
  interface. In contrast, a device driver for a dedicated network
  interface only needs to implement a few simple data transport
  functions.  These device driver functions can then be invoked by user
  programs by using open() to identify the proper device and then using
  system calls like read() and write() on the open "file." Thus, each
  such operation could transport a block of data with little more than
  the overhead of a system call, which might be as fast as tens of
  microseconds.

  Writing a device driver to be used with Linux is not hard...  if you
  know precisely how the device hardware works.  If you are not sure how
  it works, don't guess.  Debugging device drivers isn't fun and
  mistakes can fry hardware.  However, if that hasn't scared you off, it
  may be possible to write a device driver to, for example, use
  dedicated Ethernet cards as dumb but fast direct machine-to-machine
  connections without the usual Ethernet protocol overhead.  In fact,
  that's pretty much what some early Intel supercomputers did....  Look
  at the Device Driver HOWTO for more information.


  3.3.3.  User-Level Libraries


  If you've taken an OS course, user-level access to hardware device
  registers is exactly what you have been taught never to do, because
  one of the primary purposes of an OS is to control device access.
  However, an OS call is at least tens of microseconds of overhead.  For
  custom network hardware like TTL_PAPERS, which can perform a basic
  network operation in just 3 microseconds, such OS call overhead is
  intolerable.  The only way to avoid that overhead is to have user-
  level code - a user-level library - directly access hardware device
  registers.  Thus, the question becomes one of how a user-level library
  can access hardware directly, yet not compromise the OS control of
  device access rights.
  On a typical system, the only way for a user-level library to directly
  access hardware device registers is to:


  1. At user program start-up, use an OS call to map the page of memory
     address space containing the device registers into the user process
     virtual memory map.  For some systems, the mmap() call (first
     mentioned in section 2.6) can be used to map a special file which
     represents the physical memory page addresses of the I/O devices.
     Alternatively, it is relatively simple to write a device driver to
     perform this function.  Further, this device driver can control
     access by only mapping the page(s) containing the specific device
     registers needed, thereby maintaining OS access control.

  2. Access device registers without an OS call by simply loading or
     storing to the mapped addresses.  For example, *((char *) 0x1234) =
     5; would store the byte value 5 into memory location 1234
     (hexadecimal).

  Fortunately, it happens that Linux for the Intel 386 (and compatible
  processors) offers an even better solution:


  1. Using the ioperm() OS call from a privileged process, get
     permission to access the precise I/O port addresses that correspond
     to the device registers.  Alternatively, permission can be managed
     by an independent privileged user process (i.e., a "meta OS") using
     the giveioperm() OS call
     <http://garage.ecn.purdue.edu/~papers/giveioperm.html> patch for
     Linux.

  2. Access device registers without an OS call by using 386 port I/O
     instructions.


  This second solution is preferable because it is common that multiple
  I/O devices have their registers within a single page, in which case
  the first technique would not provide protection against accessing
  other device registers that happened to reside in the same page as the
  ones intended.  Of course, the down side is that 386 port I/O
  instructions cannot be coded in C - instead, you will need to use a
  bit of assembly code.  The GCC-wrapped (usable in C programs) inline
  assembly code function for a port input of a byte value is:


  ______________________________________________________________________
  extern inline unsigned char
  inb(unsigned short port)
  {
      unsigned char _v;
  __asm__ __volatile__ ("inb %w1,%b0"
                        :"=a" (_v)
                        :"d" (port), "0" (0));
      return _v;
  }
  ______________________________________________________________________



  Similarly, the GCC-wrapped code for a byte port output is:



  ______________________________________________________________________
  extern inline void
  outb(unsigned char value,
  unsigned short port)
  {
  __asm__ __volatile__ ("outb %b0,%w1"
                        :/* no outputs */
                        :"a" (value), "d" (port));
  }
  ______________________________________________________________________



  3.4.  PVM (Parallel Virtual Machine)


  PVM (Parallel Virtual Machine) is a freely-available, portable,
  message-passing library generally implemented on top of sockets.  It
  is clearly established as the de-facto standard for message-passing
  cluster parallel computing.

  PVM supports single-processor and SMP Linux machines, as well as
  clusters of Linux machines linked by socket-capable networks (e.g.,
  SLIP, PLIP, Ethernet, ATM).  In fact, PVM will even work across groups
  of machines in which a variety of different types of processors,
  configurations, and physical networks are used - Heterogeneous
  Clusters - even to the scale of treating machines linked by the
  Internet as a parallel cluster.  PVM also provides facilities for
  parallel job control across a cluster.  Best of all, PVM has long been
  freely available (currently from
  <http://www.epm.ornl.gov/pvm/pvm_home.html>), which has led to many
  programming language compilers, application libraries, programming and
  debugging tools, etc., using it as their "portable message-passing
  target library."  There is also a network newsgroup,
  comp.parallel.pvm.

  It is important to note, however, that PVM message-passing calls
  generally add significant overhead to standard socket operations,
  which already had high latency.  Further, the message handling calls
  themselves do not constitute a particularly "friendly" programming
  model.

  Using the same Pi computation example first described in section 1.3,
  the version using C with PVM library calls is:



  ______________________________________________________________________
  #include <stdlib.h>
  #include <stdio.h>
  #include <pvm3.h>

  #define NPROC   4

  main(int argc, char **argv)
  {
    register double lsum, width;
    double sum;
    register int intervals, i;
    int mytid, iproc, msgtag = 4;
    int tids[NPROC];  /* array of task ids */

    /* enroll in pvm */
    mytid = pvm_mytid();

    /* Join a group and, if I am the first instance,
       iproc=0, spawn more copies of myself
    */
    iproc = pvm_joingroup("pi");

    if (iproc == 0) {
      tids[0] = pvm_mytid();
      pvm_spawn("pvm_pi", &argv[1], 0, NULL, NPROC-1, &tids[1]);
    }
    /* make sure all processes are here */
    pvm_barrier("pi", NPROC);

    /* get the number of intervals */
    intervals = atoi(argv[1]);
    width = 1.0 / intervals;

    lsum = 0.0;
    for (i = iproc; i<intervals; i+=NPROC) {
      register double x = (i + 0.5) * width;
      lsum += 4.0 / (1.0 + x * x);
    }

    /* sum across the local results & scale by width */
    sum = lsum * width;
    pvm_reduce(PvmSum, &sum, 1, PVM_DOUBLE, msgtag, "pi", 0);

    /* have only the console PE print the result */
    if (iproc == 0) {
      printf("Estimation of pi is %f\n", sum);
    }

    /* Check program finished, leave group, exit pvm */
    pvm_barrier("pi", NPROC);
    pvm_lvgroup("pi");
    pvm_exit();
    return(0);
  }
  ______________________________________________________________________



  3.5.  MPI (Message Passing Interface)


  Although PVM is the de-facto standard message-passing library, MPI
  (Message Passing Interface) is the relatively new official standard.
  The home page for the MPI standard is
  <http://www.mcs.anl.gov:80/mpi/> and the newsgroup is
  comp.parallel.mpi.

  However, before discussing MPI, I feel compelled to say a little bit
  about the PVM vs. MPI religious war that has been going on for the
  past few years.  I'm not really on either side.  Here's my attempt at
  a relatively unbiased summary of the differences:


     Execution control environment.
        Put simply, PVM has one and MPI doesn't specify how/if one is
        implemented.  Thus, things like starting a PVM program executing
        are done identically everywhere, while for MPI it depends on
        which implementation is being used.


     Support for heterogeneous clusters.
        PVM grew-up in the workstation cycle-scavenging world, and thus
        directly manages heterogeneous mixes of machines and operating
        systems.  In contrast, MPI largely assumes that the target is an
        MPP (Massively Parallel Processor) or a dedicated cluster of
        nearly identical workstations.


     Kitchen sink syndrome.
        PVM evidences a unity of purpose that MPI 2.0 doesn't.  The new
        MPI 2.0 standard includes a lot of features that go way beyond
        the basic message passing model - things like RMA (Remote Memory
        Access) and parallel file I/O.  Are these things useful?  Of
        course they are...  but learning MPI 2.0 is a lot like learning
        a complete new programming language.


     User interface design.
        MPI was designed after PVM, and clearly learned from it.  MPI
        offers simpler, more efficient, buffer handling and higher-level
        abstractions allowing user-defined data structures to be
        transmitted in messages.


     The force of law.
        By my count, there are still significantly more things designed
        to use PVM than there are to use MPI; however, porting them to
        MPI is easy, and the fact that MPI is backed by a widely-
        supported formal standard means that using MPI is, for many
        institutions, a matter of policy.

  Conclusion?  Well, there are at least three independently developed,
  freely available, versions of MPI that can run on clusters of Linux
  systems (and I wrote one of them):


  o  LAM (Local Area Multicomputer) is a full implementation of the MPI
     1.1 standard.  It allows MPI programs to be executed within an
     individual Linux system or across a cluster of Linux systems using
     UDP/TCP socket communication.  The system includes simple execution
     control facilities, as well as a variety of program development and
     debugging aids.  It is freely available from
     <http://www.osc.edu/lam.html>.

  o  MPICH (MPI CHameleon) is designed as a highly portable full
     implementation of the MPI 1.1 standard.  Like LAM, it allows MPI
     programs to be executed within an individual Linux system or across
     a cluster of Linux systems using UDP/TCP socket communication.
     However, the emphasis is definitely on promoting MPI by providing
     an efficient, easily retargetable, implementation.  To port this
     MPI implementation, one implements either the five functions of the
     "channel interface" or, for better performance, the full MPICH ADI
     (Abstract Device Interface).  MPICH, and lots of information about
     it and porting, are available from
     <http://www.mcs.anl.gov/mpi/mpich/>.

  o  AFMPI (Aggregate Function MPI) is a subset implementation of the
     MPI 2.0 standard.  This is the one that I wrote.  Built on top of
     the AFAPI, it is designed to showcase low-latency collective
     communication functions and RMAs, and thus provides only minimal
     support for MPI data types, communicators, etc.  It allows C
     programs using MPI to run on an individual Linux system or across a
     cluster connected by AFAPI-capable network hardware.  It is freely
     available from  <http://garage.ecn.purdue.edu/~papers/>.

  No matter which of these (or other) MPI implementations one uses, it
  is fairly simple to perform the most common types of communications.

  However, MPI 2.0 incorporates several communication paradigms that are
  fundamentally different enough so that a programmer using one of them
  might not even recognize the other coding styles as MPI.  Thus, rather
  than giving a single example program, it is useful to have an example
  of each of the fundamentally different communication paradigms that
  MPI supports.  All three programs implement the same basic algorithm
  (from section 1.3) that is used throughout this HOWTO to compute the
  value of Pi.

  The first MPI program uses basic MPI message-passing calls for each
  processor to send its partial sum to processor 0, which sums and
  prints the result:



  ______________________________________________________________________
  #include <stdlib.h>
  #include <stdio.h>
  #include <mpi.h>

  main(int argc, char **argv)
  {
    register double width;
    double sum, lsum;
    register int intervals, i;
    int nproc, iproc;
    MPI_Status status;

    if (MPI_Init(&argc, &argv) != MPI_SUCCESS) exit(1);
    MPI_Comm_size(MPI_COMM_WORLD, &nproc);
    MPI_Comm_rank(MPI_COMM_WORLD, &iproc);
    intervals = atoi(argv[1]);
    width = 1.0 / intervals;
    lsum = 0;
    for (i=iproc; i<intervals; i+=nproc) {
      register double x = (i + 0.5) * width;
      lsum += 4.0 / (1.0 + x * x);
    }
    lsum *= width;
    if (iproc != 0) {
      MPI_Send(&lbuf, 1, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD);
    } else {
      sum = lsum;
      for (i=1; i<nproc; ++i) {
        MPI_Recv(&lbuf, 1, MPI_DOUBLE, MPI_ANY_SOURCE,
                 MPI_ANY_TAG, MPI_COMM_WORLD, &status);
        sum += lsum;
      }
      printf("Estimation of pi is %f\n", sum);
    }
    MPI_Finalize();
    return(0);
  }
  ______________________________________________________________________



  The second MPI version uses collective communication (which, for this
  particular application, is clearly the most appropriate):



  ______________________________________________________________________
  #include <stdlib.h>
  #include <stdio.h>
  #include <mpi.h>

  main(int argc, char **argv)
  {
    register double width;
    double sum, lsum;
    register int intervals, i;
    int nproc, iproc;

    if (MPI_Init(&argc, &argv) != MPI_SUCCESS) exit(1);
    MPI_Comm_size(MPI_COMM_WORLD, &nproc);
    MPI_Comm_rank(MPI_COMM_WORLD, &iproc);
    intervals = atoi(argv[1]);
    width = 1.0 / intervals;
    lsum = 0;
    for (i=iproc; i<intervals; i+=nproc) {
      register double x = (i + 0.5) * width;
      lsum += 4.0 / (1.0 + x * x);
    }
    lsum *= width;
    MPI_Reduce(&lsum, &sum, 1, MPI_DOUBLE,
               MPI_SUM, 0, MPI_COMM_WORLD);
    if (iproc == 0) {
      printf("Estimation of pi is %f\n", sum);
    }
    MPI_Finalize();
    return(0);
  }
  ______________________________________________________________________



  The third MPI version uses the MPI 2.0 RMA mechanism for each
  processor to add its local lsum into sum on processor 0:



  ______________________________________________________________________
  #include <stdlib.h>
  #include <stdio.h>
  #include <mpi.h>

  main(int argc, char **argv)
  {
    register double width;
    double sum = 0, lsum;
    register int intervals, i;
    int nproc, iproc;
    MPI_Win sum_win;

    if (MPI_Init(&argc, &argv) != MPI_SUCCESS) exit(1);
    MPI_Comm_size(MPI_COMM_WORLD, &nproc);
    MPI_Comm_rank(MPI_COMM_WORLD, &iproc);
    MPI_Win_create(&sum, sizeof(sum), sizeof(sum),
                   0, MPI_COMM_WORLD, &sum_win);
    MPI_Win_fence(0, sum_win);
    intervals = atoi(argv[1]);
    width = 1.0 / intervals;
    lsum = 0;
    for (i=iproc; i<intervals; i+=nproc) {
      register double x = (i + 0.5) * width;
      lsum += 4.0 / (1.0 + x * x);
    }
    lsum *= width;
    MPI_Accumulate(&lsum, 1, MPI_DOUBLE, 0, 0,
                   1, MPI_DOUBLE, MPI_SUM, sum_win);
    MPI_Win_fence(0, sum_win);
    if (iproc == 0) {
      printf("Estimation of pi is %f\n", sum);
    }
    MPI_Finalize();
    return(0);
  }
  ______________________________________________________________________



  It is useful to note that the MPI 2.0 RMA mechanism very neatly
  overcomes any potential problems with the corresponding data structure
  on various processors residing at different memory locations.  This is
  done by referencing a "window" that implies the base address,
  protection against out-of-bound accesses, and even address scaling.
  Efficient implementation is aided by the fact that RMA processing may
  be delayed until the next MPI_Win_fence.  In summary, the RMA
  mechanism may be a strange cross between distributed shared memory and
  message passing, but it is a very clean interface that potentially
  generates very efficient communication.


  3.6.  AFAPI (Aggregate Function API)


  Unlike PVM, MPI, etc., the AFAPI (Aggregate Function Application
  Program Interface) did not start life as an attempt to build a
  portable abstract interface layered on top of existing network
  hardware and software.  Rather, AFAPI began as the very hardware-
  specific low-level support library for PAPERS (Purdue's Adapter for
  Parallel Execution and Rapid Synchronization; see
  <http://garage.ecn.purdue.edu/~papers/>).

  PAPERS was discussed briefly in section 3.2; it is a public domain
  design custom aggregate function network that delivers latencies as
  low as a few microseconds.  However, the important thing about PAPERS
  is that it was developed as an attempt to build a supercomputer that
  would be a better target for compiler technology than existing
  supercomputers.  This is qualitatively different from most Linux
  cluster efforts and PVM/MPI, which generally focus on trying to use
  standard networks for the relatively few sufficiently coarse-grain
  parallel applications.  The fact that Linux PCs are used as components
  of PAPERS systems is simply an artifact of implementing prototypes in
  the most cost-effective way possible.

  The need for a common low-level software interface across more than a
  dozen different prototype implementations was what made the PAPERS
  library become standardized as AFAPI.  However, the model used by
  AFAPI is inherently simpler and better suited for the finer-grain
  interactions typical of code compiled by parallelizing compilers or
  written for SIMD architectures.  The simplicity of the model not only
  makes PAPERS hardware easy to build, but also yields surprisingly
  efficient AFAPI ports for a variety of other hardware systems, such as
  SMPs.

  AFAPI currently runs on Linux clusters connected using TTL_PAPERS,
  CAPERS, or WAPERS.  It also runs (without OS calls or even bus-lock
  instructions, see section 2.2) on SMP systems using a System V Shared
  Memory library called SHMAPERS.  A version that runs across Linux
  clusters using UDP broadcasts on conventional networks (e.g.,
  Ethernet) is under development.  All released versions are available
  from  <http://garage.ecn.purdue.edu/~papers/>.  All versions of the
  AFAPI are designed to be called from C or C++.

  The following example program is the AFAPI version of the Pi
  computation described in section 1.3.


  ______________________________________________________________________
  #include <stdlib.h>
  #include <stdio.h>
  #include "afapi.h"

  main(int argc, char **argv)
  {
    register double width, sum;
    register int intervals, i;

    if (p_init()) exit(1);

    intervals = atoi(argv[1]);
    width = 1.0 / intervals;

    sum = 0;
    for (i=IPROC; i<intervals; i+=NPROC) {
      register double x = (i + 0.5) * width;
      sum += 4.0 / (1.0 + x * x);
    }

    sum = p_reduceAdd64f(sum) * width;

    if (IPROC == CPROC) {
      printf("Estimation of pi is %f\n", sum);
    }

    p_exit();
    return(0);
  }
  ______________________________________________________________________



  3.7.  Other Cluster Support Libraries


  In addition to PVM, MPI, and AFAPI, the following libraries offer
  features that may be useful in parallel computing using a cluster of
  Linux systems.  These systems are given a lighter treatment in this
  document simply because, unlike PVM, MPI, and AFAPI, I have little or
  no direct experience with the use of these systems on Linux clusters.
  If you find any of these or other libraries to be especially useful,
  please send email to me at pplinux@ecn.purdue.edu describing what
  you've found, and I will consider adding an expanded section on that
  library.


  3.7.1.  Condor (process migration support)


  Condor is a distributed resource management system that can manage
  large heterogeneous clusters of workstations.  Its design has been
  motivated by the needs of users who would like to use the unutilized
  capacity of such clusters for their long-running, computation-
  intensive jobs.  Condor preserves a large measure of the originating
  machine's environment on the execution machine, even if the
  originating and execution machines do not share a common file system
  and/or password mechanisms.  Condor jobs that consist of a single
  process are automatically checkpointed and migrated between
  workstations as needed to ensure eventual completion.

  Condor is available at  <http://www.cs.wisc.edu/condor/>.  A Linux
  port exists; more information is available at
  <http://www.cs.wisc.edu/condor/linux/linux.html>.  Contact condor-
  admin@cs.wisc.edu for details.


  3.7.2.  DFN-RPC (German Research Network - Remote Procedure Call)


  The DFN-RPC, a (German Research Network Remote Procedure Call) tool,
  was developed to distribute and parallelize scientific-technical
  application programs between a workstation and a compute server or a
  cluster. The interface is optimized for applications written in
  fortran, but the DFN-RPC can also be used in a C environment.  It has
  been ported to Linux.  More information is at  <ftp://ftp.uni-
  stuttgart.de/pub/rus/dfn_rpc/README_dfnrpc.html>.


  3.7.3.  DQS (Distributed Queueing System)


  Not exactly a library, DQS 3.0 (Distributed Queueing System) is a job
  queueing system that has been developed and tested under Linux.  It is
  designed to allow both use and administration of a heterogeneous
  cluster as a single entity.  It is available from
  <http://www.scri.fsu.edu/~pasko/dqs.html>.

  There is also a commercial version called CODINE 4.1.1 (COmputing in
  DIstributed Network Environments).  Information on it is available
  from  <http://www.genias.de/genias_welcome.html>.


  3.8.  General Cluster References


  Because clusters can be constructed and used in so many different
  ways, there are quite a few groups that have made interesting
  contributions.  The following are references to various cluster-
  related projects that may be of general interest.  This includes a mix
  of Linux-specific and generic cluster references.  The list is given
  in alphabetical order.


  3.8.1.  Beowulf


  The Beowulf project,  <http://cesdis1.gsfc.nasa.gov/beowulf/>, centers
  on production of software for using off-the-shelf clustered
  workstations based on commodity PC-class hardware, a high-bandwidth
  cluster-internal network, and the Linux operating system.

  Thomas Sterling has been the driving force behind Beowulf, and
  continues to be an eloquent and outspoken proponent of Linux
  clustering for scientific computing in general. In fact, many groups
  now refer to their clusters as "Beowulf class" systems - even if the
  cluster isn't really all that similar to the official Beowulf design.

  Don Becker, working in support of the Beowulf project, has produced
  many of the network drivers used by Linux in general.  Many of these
  drivers have even been adapted for use in BSD.  Don also is
  responsible for many of these Linux network drivers allowing load-
  sharing across multiple parallel connections to achieve higher
  bandwidth without expensive switched hubs.  This type of load sharing
  was the original distinguishing feature of the Beowulf cluster.


  3.8.2.  Linux/AP+


  The Linux/AP+ project,  <http://cap.anu.edu.au/cap/projects/linux/>,
  is not exactly about Linux clustering, but centers on porting Linux to
  the Fujitsu AP1000+ and adding appropriate parallel processing
  enhancements.  The AP1000+ is a commercially available SPARC-based
  parallel machine that uses a custom network with a torus topology, 25
  MB/s bandwidth, and 10 microsecond latency...  in short, it looks a
  lot like a SPARC Linux cluster.


  3.8.3.  Locust


  The Locust project,  <http://www.ecsl.cs.sunysb.edu/~manish/locust/>,
  is building a distributed virtual shared memory system that uses
  compile-time information to hide message-latency and to reduce network
  traffic at run time.  Pupa is the underlying communication subsystem
  of Locust, and is implemented using Ethernet to connect 486 PCs under
  FreeBSD.  Linux?


  3.8.4.  Midway DSM (Distributed Shared Memory)


  Midway,
  <http://www.cs.cmu.edu/afs/cs.cmu.edu/project/midway/WWW/HomePage.html>,
  is a software-based DSM (Distributed Shared Memory) system, not unlike
  TreadMarks.  The good news is that it uses compile-time aids rather
  than relatively slow page-fault mechanisms, and it is free.  The bad
  news is that it doesn't run on Linux clusters.


  3.8.5.  Mosix



  MOSIX modifies the BSDI BSD/OS to provide dynamic load balancing and
  preemptive process migration across a networked group of PCs.  This is
  nice stuff not just for parallel processing, but for generally using a
  cluster much like a scalable SMP.  Will there be a Linux version?
  Look at  <http://www.cs.huji.ac.il/mosix/> for more information.


  3.8.6.  NOW (Network Of Workstations)


  The Berkeley NOW (Network Of Workstations) project,
  <http://now.cs.berkeley.edu/>, has led much of the push toward
  parallel computing using networks of workstations.  There is a lot
  work going on here, all aimed toward "demonstrating a practical 100
  processor system in the next few years."  Alas, they don't use Linux.


  3.8.7.  Parallel Processing Using Linux


  The parallel processing using Linux WWW site,
  <http://yara.ecn.purdue.edu/~pplinux/>, is the home of this HOWTO and
  many related documents including online slides for a full-day
  tutorial.  Aside from the work on the PAPERS project, the Purdue
  University School of Electrical and Computer Engineering generally has
  been a leader in parallel processing; this site was established to
  help others apply Linux PCs for parallel processing.

  Since Purdue's first cluster of Linux PCs was assembled in February
  1994, there have been many Linux PC clusters assembled at Purdue,
  including several with video walls.  Although these clusters used 386,
  486, and Pentium systems (no Pentium Pro systems), Intel recently
  awarded Purdue a donation which will allow it to construct multiple
  large clusters of Pentium II systems (with as many as 165 machines
  planned for a single cluster).  Although these clusters all have/will
  have PAPERS networks, most also have conventional networks.


  3.8.8.  Pentium Pro Cluster Workshop


  In Des Moines, Iowa, April 10-11, 1997, AMES Laboratory held the
  Pentium Pro Cluster Workshop.  The WWW site from this workshop,
  <http://www.scl.ameslab.gov/workshops/PPCworkshop.html>, contains a
  wealth of PC cluster information gathered from all the attendees.


  3.8.9.  TreadMarks DSM (Distributed Shared Memory)


  DSM (Distributed Shared Memory) is a technique whereby a message-
  passing system can appear to behave as an SMP.  There are quite a few
  such systems, most of which use the OS page-fault mechanism to trigger
  message transmissions.  TreadMarks,
  <http://www.cs.rice.edu/~willy/TreadMarks/overview.html>, is one of
  the more efficient of such systems and does run on Linux clusters.
  The bad news is "TreadMarks is being distributed at a small cost to
  universities and nonprofit institutions." For more information about
  the software, contact treadmarks@ece.rice.edu.


  3.8.10.  U-Net (User-level NETwork interface architecture)


  The U-Net (User-level NETwork interface architecture) project at
  Cornell,  <http://www2.cs.cornell.edu/U-Net/Default.html>, attempts to
  provide low-latency and high-bandwidth using commodity network
  hardware by by virtualizing the network interface so that applications
  can send and receive messages without operating system intervention.
  U-Net runs on Linux PCs using a DECchip DC21140 based Fast Ethernet
  card or a Fore Systems PCA-200 (not PCA-200E) ATM card.


  3.8.11.  WWT (Wisconsin Wind Tunnel)


  There is really quite a lot of cluster-related work at Wisconsin.  The
  WWT (Wisconsin Wind Tunnel) project,  <http://www.cs.wisc.edu/~wwt/>,
  is doing all sorts of work toward developing a "standard" interface
  between compilers and the underlying parallel hardware.  There is the
  Wisconsin COW (Cluster Of Workstations), Cooperative Shared Memory and
  Tempest, the Paradyn Parallel Performance Tools, etc.  Unfortunately,
  there is not much about Linux.


  4.  SIMD Within A Register (e.g., using MMX)


  SIMD (Single Instruction stream, Multiple Data stream) Within A
  Register (SWAR) isn't a new idea.  Given a machine with k-bit
  registers, data paths, and function units, it has long been known that
  ordinary register operations can function as SIMD parallel operations
  on n, k/n-bit, integer field values.  However, it is only with the
  recent push for multimedia that the 2x to 8x speedup offered by SWAR
  techniques has become a concern for mainstream computing.  The 1997
  versions of most microprocessors incorporate hardware support for
  SWAR:


  o  AMD K6 MMX (MultiMedia eXtensions)

  o  Cyrix M2 MMX (MultiMedia eXtensions)

  o  Digital Alpha MAX (MultimediA eXtensions)

  o  Hewlett-Packard PA-RISC MAX (Multimedia Acceleration eXtensions)

  o  Intel Pentium II & Pentium with MMX (MultiMedia eXtensions)

  o  Microunity Mediaprocessor SIGD (Single Instruction on Groups of
     Data)

  o  MIPS Digital Media eXtension (MDMX, pronounced Mad Max)

  o  Sun SPARC V9 VIS (Visual Instruction Set)

  There are a few holes in the hardware support provided by the new
  microprocessors, quirks like only supporting some operations for some
  field sizes.  It is important to remember, however, that you don't
  need any hardware support for many SWAR operations to be efficient.
  For example, bitwise operations are not affected by the logical
  partitioning of a register.


  4.1.  SWAR: What Is It Good For?


  Although every modern processor is capable of executing with at least
  some SWAR parallelism, the sad fact is that even the best SWAR-
  enhanced instruction sets do not support very general-purpose
  parallelism.  In fact, many people have noticed that the performance
  difference between Pentium and "Pentium with MMX technology" is often
  due to things like the larger L1 cache that coincided with appearance
  of MMX.  So, realistically, what is SWAR (or MMX) good for?


  o  Integers only, the smaller the better.  Two 32-bit values fit in a
     64-bit MMX register, but so do eight one-byte characters or even an
     entire chess board worth of one-bit values.

     Note: there will be a floating-point version of MMX, although very
     little has been said about it at this writing.  Cyrix has posted a
     set of slides,  <ftp://ftp.cyrix.com/developr/mpf97rm.pdf>, that
     includes a few comments about MMFP.  Apparently, MMFP will support
     two 32-bit floating-point numbers to be packed into a 64-bit MMX
     register; combining this with two MMFP pipelines will yield four
     single-precision FLOPs per clock.

  o  SIMD or vector-style parallelism.  The same operation is applied to
     all fields simultaneously.  There are ways to nullify the effects
     on selected fields (i.e., equivalent to SIMD enable masking), but
     they complicate coding and hurt performance.

  o  Localized, regular (preferably packed), memory reference patterns.
     SWAR in general, and MMX in particular, are terrible at randomly-
     ordered accesses; gathering a vector x[y] (where y is an index
     array) is prohibitively expensive.

  These are serious restrictions, but this type of parallelism occurs in
  many parallel algorithms - not just multimedia applications.  For the
  right type of algorithm, SWAR is more effective than SMP or cluster
  parallelism...  and it doesn't cost anything to use it.


  4.2.  Introduction To SWAR Programming


  The basic concept of SWAR, SIMD Within A Register, is that operations
  on word-length registers can be used to speed-up computations by
  performing SIMD parallel operations on n k/n-bit field values.
  However, making use of SWAR technology can be awkward, and some SWAR
  operations are actually more expensive than the corresponding
  sequences of serial operations because they require additional
  instructions to enforce the field partitioning.

  To illustrate this point, let's consider a greatly simplified SWAR
  mechanism that manages four 8-bit fields within each 32-bit register.
  The values in two registers might be represented as:


  ______________________________________________________________________
           PE3     PE2     PE1     PE0
        +-------+-------+-------+-------+
  Reg0  | D 7:0 | C 7:0 | B 7:0 | A 7:0 |
        +-------+-------+-------+-------+
  Reg1  | H 7:0 | G 7:0 | F 7:0 | E 7:0 |
        +-------+-------+-------+-------+
  ______________________________________________________________________



  This simply indicates that each register is viewed as essentially a
  vector of four independent 8-bit integer values.  Alternatively, think
  of A and E as values in Reg0 and Reg1 of processing element 0 (PE0), B
  and F as values in PE1's registers, and so forth.

  The remainder of this document briefly reviews the basic classes of
  SIMD parallel operations on these integer vectors and how these
  functions can be implemented.


  4.2.1.  Polymorphic Operations


  Some SWAR operations can be performed trivially using ordinary 32-bit
  integer operations, without concern for the fact that the operation is
  really intended to operate independently in parallel on these 8-bit
  fields.  We call any such SWAR operation polymorphic, since the
  function is unaffected by the field types (sizes).

  Testing if any field is non-zero is polymorphic, as are all bitwise
  logic operations.  For example, an ordinary bitwise-and operation (C's
  & operator) performs a bitwise and no matter what the field sizes are.
  A simple bitwise and of the above registers yields:


  ______________________________________________________________________
            PE3       PE2       PE1       PE0
        +---------+---------+---------+---------+
  Reg2  | D&H 7:0 | C&G 7:0 | B&F 7:0 | A&E 7:0 |
        +---------+---------+---------+---------+
  ______________________________________________________________________



  Because the bitwise and operation always has the value of result bit k
  affected only by the values of the operand bit k values, all field
  sizes are supported using the same single instruction.


  4.2.2.  Partitioned Operations


  Unfortunately, lots of important SWAR operations are not polymorphic.
  Arithmetic operations such as add, subtract, multiply, and divide are
  all subject to carry/borrow interactions between fields.  We call such
  SWAR operations partitioned, because each such operation must
  effectively partition the operands and result to prevent interactions
  between fields.  However, there are actually three different methods
  that can be used to achieve this effect.


  4.2.2.1.  Partitioned Instructions


  Perhaps the most obvious approach to implementing partitioned
  operations is to provide hardware support for "partitioned parallel
  instructions" that cut the carry/borrow logic between fields.  This
  approach can yield the highest performance, but it requires a change
  to the processor's instruction set and generally places many
  restrictions on field size (e.g., 8-bit fields might be supported, but
  not 12-bit fields).

  The AMD/Cyrix/Intel MMX, Digital MAX, HP MAX, and Sun VIS all
  implement restricted versions of partitioned instructions.
  Unfortunately, these different instruction set extensions have
  significantly different restrictions, making algorithms somewhat non-
  portable between them.  For example, consider the following sampling
  of partitioned operations:



  ______________________________________________________________________
    Instruction           AMD/Cyrix/Intel MMX   DEC MAX   HP MAX   Sun VIS
  +---------------------+---------------------+---------+--------+---------+
  | Absolute Difference |                     |       8 |        |       8 |
  +---------------------+---------------------+---------+--------+---------+
  | Merge Maximum       |                     |   8, 16 |        |         |
  +---------------------+---------------------+---------+--------+---------+
  | Compare             |           8, 16, 32 |         |        |  16, 32 |
  +---------------------+---------------------+---------+--------+---------+
  | Multiply            |                  16 |         |        |    8x16 |
  +---------------------+---------------------+---------+--------+---------+
  | Add                 |           8, 16, 32 |         |     16 |  16, 32 |
  +---------------------+---------------------+---------+--------+---------+
  ______________________________________________________________________



  In the table, the numbers indicate the field sizes, in bits, for which
  each operation is supported.  Even though the table omits many
  instructions including all the more exotic ones, it is clear that
  there are many differences.  The direct result is that high-level
  languages (HLLs) really are not very effective as programming models,
  and portability is generally poor.


  4.2.2.2.  Unpartitioned Operations With Correction Code


  Implementing partitioned operations using partitioned instructions can
  certainly be efficient, but what do you do if the partitioned
  operation you need is not supported by the hardware?  The answer is
  that you use a series of ordinary instructions to perform the
  operation with carry/borrow across fields, and then correct for the
  undesired field interactions.

  This is a purely software approach, and the corrections do introduce
  overhead, but it works with fully general field partitioning.  This
  approach is also fully general in that it can be used either to fill
  gaps in the hardware support for partitioned instructions, or it can
  be used to provide full functionality for target machines that have no
  hardware support at all.  In fact, by expressing the code sequences in
  a language like C, this approach allows SWAR programs to be fully
  portable.

  The question immediately arises:  precisely how inefficient is it to
  simulate SWAR partitioned operations using unpartitioned operations
  with correction code?  Well, that is certainly the $64k question...
  but many operations are not as difficult as one might expect.

  Consider implementing a four-element 8-bit integer vector add of two
  source vectors, x+y, using ordinary 32-bit operations.

  An ordinary 32-bit add might actually yield the correct result, but
  not if any 8-bit field carries into the next field.  Thus, our goal is
  simply to ensure that such a carry does not occur.  Because adding two
  k-bit fields generates an at most k+1 bit result, we can ensure that
  no carry occurs by simply "masking out" the most significant bit of
  each field.  This is done by bitwise anding each operand with
  0x7f7f7f7f and then performing an ordinary 32-bit add.


  ______________________________________________________________________
  t = ((x & 0x7f7f7f7f) + (y & 0x7f7f7f7f));
  ______________________________________________________________________


  That result is correct...  except for the most significant bit within
  each field.  Computing the correct value for each field is simply a
  matter of doing two 1-bit partitioned adds of the most significant
  bits from x and y to the 7-bit carry result which was computed for t.
  Fortunately, a 1-bit partitioned add is implemented by an ordinary
  exclusive or operation.  Thus, the result is simply:


  ______________________________________________________________________
  (t ^ ((x ^ y) & 0x80808080))
  ______________________________________________________________________



  Ok, well, maybe that isn't so simple.  After all, it is six operations
  to do just four adds.  However, notice that the number of operations
  is not a function of how many fields there are...  so, with more
  fields, we get speedup.  In fact, we may get speedup anyway simply
  because the fields were loaded and stored in a single (integer vector)
  operation, register availability may be improved, and there are fewer
  dynamic code scheduling dependencies (because partial word references
  are avoided).


  4.2.2.3.  Controlling Field Values


  While the other two approaches to partitioned operation implementation
  both center on getting the maximum space utilization for the
  registers, it can be computationally more efficient to instead control
  the field values so that inter-field carry/borrow events should never
  occur.  For example, if we know that all the field values being added
  are such that no field overflow will occur, a partitioned add
  operation can be implemented using an ordinary add instruction; in
  fact, given this constraint, an ordinary add instruction appears
  polymorphic, and is usable for any field sizes without correction
  code.  The question thus becomes how to ensure that field values will
  not cause carry/borrow events.

  One way to ensure this property is to implement partitioned
  instructions that can restrict the range of field values.  The Digital
  MAX vector minimum and maximum instructions can be viewed as hardware
  support for clipping field values to avoid inter-field carry/borrow.

  However, suppose that we do not have partitioned instructions that can
  efficiently restrict the range of field values...  is there a
  sufficient condition that can be cheaply imposed to ensure
  carry/borrow events will not interfere with adjacent fields?  The
  answer lies in analysis of the arithmetic properties.  Adding two k-
  bit numbers generates a result with at most k+1 bits; thus, a field of
  k+1 bits can safely contain such an operation despite using ordinary
  instructions.

  Thus, suppose that the 8-bit fields in our earlier example are now
  7-bit fields with 1-bit "carry/borrow spacers":


  ______________________________________________________________________
                PE3          PE2          PE1          PE0
        +----+-------+----+-------+----+-------+----+-------+
  Reg0  | D' | D 6:0 | C' | C 6:0 | B' | B 6:0 | A' | A 6:0 |
        +----+-------+----+-------+----+-------+----+-------+
  ______________________________________________________________________



  A vector of 7-bit adds is performed as follows.  Let us assume that,
  prior to the start of any partitioned operation, all the carry spacer
  bits (A', B', C', and D') have the value 0.  By simply executing an
  ordinary add operation, all the fields obtain the correct 7-bit
  values; however, some spacer bit values might now be 1.  We can
  correct this by just one more conventional operation, masking-out the
  spacer bits.  Our 7-bit integer vector add, x+y, is thus:


  ______________________________________________________________________
  ((x + y) & 0x7f7f7f7f)
  ______________________________________________________________________



  This is just two instructions for four adds, clearly yielding good
  speedup.

  The sharp reader may have noticed that setting the spacer bits to 0
  does not work for subtract operations.  The correction is, however,
  remarkably simple.  To compute x-y, we simply ensure the initial
  condition that the spacers in x are all 1, while the spacers in y are
  all 0.  In the worst case, we would thus get:


  ______________________________________________________________________
  (((x | 0x80808080) - y) & 0x7f7f7f7f)
  ______________________________________________________________________



  However, the additional bitwise or operation can often be optimized
  out by ensuring that the operation generating the value for x used |
  0x80808080 rather than & 0x7f7f7f7f as the last step.

  Which method should be used for SWAR partitioned operations?  The
  answer is simply "whichever yields the best speedup."  Interestingly,
  the ideal method to use may be different for different field sizes
  within the same program running on the same machine.


  4.2.3.  Communication & Type Conversion Operations


  Although some parallel computations, including many operations on
  image pixels, have the property that the ith value in a vector is a
  function only of values that appear in the ith position of the operand
  vectors, this is generally not the case.  For example, even pixel
  operations such as smoothing require values from adjacent pixels as
  operands, and transformations like FFTs require more complex (less
  localized) communication patterns.

  It is not difficult to efficiently implement 1-dimensional nearest
  neighbor communication for SWAR using unpartitioned shift operations.
  For example, to move a value from PEi to PE(i+1), a simple shift
  operation suffices.  If the fields are 8-bits in length, we would use:


  ______________________________________________________________________
  (x << 8)
  ______________________________________________________________________



  Still, it isn't always quite that simple.  For example, to move a
  value from PEi to PE(i-1), a simple shift operation might suffice...
  but the C language does not specify if shifts right preserve the sign
  bit, and some machines only provide signed shift right.  Thus, in the
  general case, we must explicitly zero the potentially replicated sign
  bits:


  ______________________________________________________________________
  ((x >> 8) & 0x00ffffff)
  ______________________________________________________________________



  Adding "wrap-around connections" is also reasonably efficient using
  unpartitioned shifts.  For example, to move a value from PEi to
  PE(i+1) with wraparound:


  ______________________________________________________________________
  ((x << 8) | ((x >> 24) & 0x000000ff))
  ______________________________________________________________________



  The real problem comes when more general communication patterns must
  be implemented.  Only the HP MAX instruction set supports arbitrary
  rearrangement of fields with a single instruction, which is called
  Permute.  This Permute instruction is really misnamed; not only can it
  perform an arbitrary permutation of the fields, but it also allows
  repetition.  In short, it implements an arbitrary x[y] operation.

  Unfortunately, x[y] is very difficult to implement without such an
  instruction.  The code sequence is generally both long and
  inefficient; in fact, it is sequential code.  This is very
  disappointing.  The relatively high speed of x[y] operations in the
  MasPar MP1/MP2 and Thinking Machines CM1/CM2/CM200 SIMD supercomputers
  was one of the key reasons these machines performed well.  However,
  x[y] has always been slower than nearest neighbor communication, even
  on those supercomputers, so many algorithms have been designed to
  minimize the need for x[y] operations.  In short, without hardware
  support, it is probably best to develop SWAR algorithms as though x[y]
  wasn't legal...  or at least isn't cheap.


  4.2.4.  Recurrence Operations (Reductions, Scans, etc.)


  A recurrence is a computation in which there is an apparently
  sequential relationship between values being computed.  However, if
  these recurrences involve associative operations, it may be possible
  to recode the computation using a tree-structured parallel algorithm.

  The most common type of parallelizable recurrence is probably the
  class known as associative reductions.  For example, to compute the
  sum of a vector's values, one commonly writes purely sequential C code
  like:


  ______________________________________________________________________
  t = 0;
  for (i=0; i<MAX; ++i) t += x[i];
  ______________________________________________________________________



  However, the order of the additions is rarely important.  Floating
  point and saturation math can yield different answers if the order of
  additions is changed, but ordinary wrap-around integer additions will
  yield the same results independent of addition order.  Thus, we can
  re-write this sequence into a tree-structured parallel summation in
  which we first add pairs of values, then pairs of those partial sums,
  and so forth, until a single final sum results.  For a vector of four
  8-bit values, just two addition steps are needed; the first step does
  two 8-bit adds, yielding two 16-bit result fields (each containing a
  9-bit result):


  ______________________________________________________________________
  t = ((x & 0x00ff00ff) + ((x >> 8) & 0x00ff00ff));
  ______________________________________________________________________



  The second step adds these two 9-bit values in 16-bit fields to
  produce a single 10-bit result:


  ______________________________________________________________________
  ((t + (t >> 16)) & 0x000003ff)
  ______________________________________________________________________



  Actually, the second step performs two 16-bit field adds...  but the
  top 16-bit add is meaningless, which is why the result is masked to a
  single 10-bit result value.

  Scans, also known as "parallel prefix" operations, are somewhat harder
  to implement efficiently.  This is because, unlike reductions, scans
  produce partitioned results.  For this reason, scans can be
  implemented using a fairly obvious sequence of partitioned operations.


  4.3.  MMX SWAR Under Linux


  For Linux, IA32 processors are our primary concern.  The good news is
  that AMD, Cyrix, and Intel all implement the same MMX instructions.
  However, MMX performance varies; for example, the K6 has only one MMX
  pipeline - the Pentium with MMX has two.  The only really bad news is
  that Intel is still running those stupid MMX commercials....  ;-)

  There are really three approaches to using MMX for SWAR:


  1. Use routines from an MMX library.  In particular, Intel has
     developed several "performance libraries,"
     <http://developer.intel.com/drg/tools/ad.htm>, that offer a variety
     of hand-optimized routines for common multimedia tasks.  With a
     little effort, many non-multimedia algorithms can be reworked to
     enable some of the most compute-intensive portions to be
     implemented using one or more of these library routines.  These
     libraries are not currently available for Linux, but could be
     ported.

  2. Use MMX instructions directly.  This is somewhat complicated by two
     facts.  The first problem is that MMX might not be available on the
     processor, so an alternative implementation must also be provided.
     The second problem is that the IA32 assembler generally used under
     Linux does not currently recognize MMX instructions.

  3. Use a high-level language or module compiler that can directly
     generate appropriate MMX instructions.  Such tools are currently
     under development, but none is yet fully functional under Linux.
     For example, at Purdue University (
     <http://dynamo.ecn.purdue.edu/~hankd/SWAR/>) we are currently
     developing a compiler that will take functions written in an
     explicitly parallel C dialect and will generate SWAR modules that
     are callable as C functions, yet make use of whatever SWAR support
     is available, including MMX.  The first prototype module compilers
     were built in Fall 1996, however, bringing this technology to a
     usable state is taking much longer than was originally expected.

  In summary, MMX SWAR is still awkward to use.  However, with a little
  extra effort, the second approach given above can be used now.  Here
  are the basics:


  1. You cannot use MMX if your processor does not support it.  The
     following GCC code can be used to test if MMX is supported on your
     processor.  It returns 0 if not, non-zero if it is supported.


     ___________________________________________________________________
     inline extern
     int mmx_init(void)
     {
             int mmx_available;

             __asm__ __volatile__ (
                     /* Get CPU version information */
                     "movl $1, %%eax\n\t"
                     "cpuid\n\t"
                     "andl $0x800000, %%edx\n\t"
                     "movl %%edx, %0"
                     : "=q" (mmx_available)
                     : /* no input */
             );
             return mmx_available;
     }
     ___________________________________________________________________



  2. An MMX register essentially holds one of what GCC would call an
     unsigned long long.  Thus, memory-based variables of this type
     become the communication mechanism between your MMX modules and the
     C programs that call them.  Alternatively, you can declare your MMX
     data as any 64-bit aligned data structure (it is convenient to
     ensure 64-bit alignment by declaring your data type as a union with
     an unsigned long long field).

  3. If MMX is available, you can write your MMX code using the .byte
     assembler directive to encode each instruction.  This is painful
     stuff to do by hand, but not difficult for a compiler to generate.
     For example, the MMX instruction PADDB MM0,MM1 could be encoded as
     the GCC in-line assembly code:


     ___________________________________________________________________
     __asm__ __volatile__ (".byte 0x0f, 0xfc, 0xc1\n\t");
     ___________________________________________________________________



  Remember that MMX uses some of the same hardware that is used for
  floating point operations, so code intermixed with MMX code must not
  invoke any floating point operations.  The floating point stack also
  should be empty before executing any MMX code; the floating point
  stack is normally empty at the beginning of a C function that does not
  use floating point.

  4. Exit your MMX code by executing the EMMS instruction, which can be
     encoded as:


     ___________________________________________________________________
     __asm__ __volatile__ (".byte 0x0f, 0x77\n\t");
     ___________________________________________________________________



  If the above looks very awkward and crude, it is.  However, MMX is
  still quite young....  future versions of this document will offer
  better ways to program MMX SWAR.


  5.  Linux-Hosted Attached Processors


  Although this approach has recently fallen out of favor, it is
  virtually impossible for other parallel processing methods to achieve
  the low cost and high performance possible by using a Linux system to
  host an attached parallel computing system.  The problem is that very
  little software support is available; you are pretty much on your own.


  5.1.  A Linux PC Is A Good Host


  In general, attached parallel processors tend to be specialized to
  perform specific types of functions.

  Before becoming discouraged by the fact that you are somewhat on your
  own, it is useful to understand that, although it may be difficult to
  get a Linux PC to appropriately host a particular system, a Linux PC
  is one of the few platforms well suited to this type of use.

  PCs make a good host for two primary reasons.  The first is the cheap
  and easy expansion capability; resources such as more memory, disks,
  networks, etc., are trivially added to a PC.  The second is the ease
  of interfacing.  Not only are ISA and PCI bus prototyping cards widely
  available, but the parallel port offers reasonable performance in a
  completely non-invasive interface.  The IA32 separate I/O space also
  facilitates interfacing by providing hardware I/O address protection
  at the level of individual I/O port addresses.

  Linux also makes a good host OS.  The free availability of full source
  code, and extensive "hacking" guides, obviously are a tremendous help.
  However, Linux also provides good near-real-time scheduling, and there
  is even a true real-time version of Linux at
  <http://luz.cs.nmt.edu/~rtlinux/>.  Perhaps even more important is the
  fact that while providing a full UNIX environment, Linux can support
  development tools that were written to run under Microsoft DOS and/or
  Windows.  MSDOS programs can execute within a Linux process using
  dosemu to provide a protected virtual machine that can literally run
  MSDOS.  Linux support for Windows 3.xx programs is even more direct:
  free software such as wine,  <http://www.linpro.no/wine/>, simulates
  Windows 3.11 well enough for most programs to execute correctly and
  efficiently within a UNIX/X environment.

  The following two sections give examples of attached parallel systems
  that I'd like to see supported under Linux....


  5.2.  Did You DSP That?


  There is a thriving market for high-performance DSP (Digital Signal
  Processing) processors.  Although these chips were generally designed
  to be embedded in application-specific systems, they also make great
  attached parallel computers.  Why?


  o  Many of them, such as the Texas Instruments ( <http://www.ti.com/>)
     TMS320 and the Analog Devices ( <http://www.analog.com/>) SHARC DSP
     families, are designed to construct parallel machines with little
     or no "glue" logic.

  o  They are cheap, especially per MIP or MFLOP.  Including the cost of
     basic support logic, it is not unheard of for a DSP processor to be
     one tenth the cost of a PC processor with comparable performance.

  o  They do not use much power nor generate much heat.  This means that
     it is possible to have a bunch of these chips powered by a
     conventional PC's power supply - and enclosing them in your PC's
     case will not turn it into an oven.

  o  There are strange-looking things in most DSP instruction sets that
     high-level (e.g., C) compilers are unlikely to use well - for
     example, "Bit Reverse Addressing."  Using an attached parallel
     system, it is possible to straightforwardly compile and run most
     code on the host, while running the most time-consuming few
     algorithms on the DSPs as carefully hand-tuned code.

  o  These DSP processors are not really designed to run a UNIX-like OS,
     and generally are not very good as stand-alone general-purpose
     computer processors.  For example, many do not have memory
     management hardware.  In other words, they work best when hosted by
     a more general-purpose machine...  such as a Linux PC.

  Although some audio cards and modems include DSP processors that Linux
  drivers can access, the big payoff comes from using an attached
  parallel system that has four or more DSP processors.

  Because the Texas Instruments TMS320 series,
  <http://www.ti.com/sc/docs/dsps/dsphome.htm>, has been very popular
  for a long time, and it is trivial to construct a TMS320-based
  parallel processor, there are quite a few such systems available.
  There are both integer-only and floating-point capable versions of the
  TMS320; older designs used a somewhat unusual single-precision
  floating-point format, but the new models support IEEE formats.  The
  older TMS320C4x (aka, 'C4x) achieves up to 80 MFLOPS using the TI-
  specific single-precision floating-point format; in contrast, a single
  'C67x will provide up to 1 GFLOPS single-precision or 420 MFLOPS
  double-precision for IEEE floating point calculations, using a VLIW-
  based chip architecture called VelociTI.  Not only is it easy to
  configure a group of these chips as a multiprocessor, but in a single
  chip, the 'C8x multiprocessor will provide a 100 MFLOPS IEEE floating-
  point RISC master processor along with either two or four integer
  slave DSPs.

  The other DSP processor family that has been used in more than a few
  attached parallel systems lately is the SHARC (aka, ADSP-2106x) from
  Analog Devices  <http://www.analog.com/>.  These chips can be
  configured as a 6-processor shared memory multiprocessor without
  external glue logic, and larger systems also can be configured using
  six 4-bit links/chip.  Most of the larger systems seem targeted to
  military applications, and are a bit pricey.  However, Integrated
  Computing Engines, Inc.,  <http://www.iced.com/>, makes an interesting
  little two-board PCI card set called GreenICE.  This unit contains an
  array of 16 SHARC processors, and is capable of delivering a peak
  speed of about 1.9 GFLOPS using a single-precision IEEE format.
  GreenICE costs less than $5,000.

  In my opinion, attached parallel DSPs really deserve a lot more
  attention from the Linux parallel processing community....


  5.3.  FPGAs And Reconfigurable Logic Computing


  If parallel processing is all about getting the highest speedup, then
  why not build custom hardware?  Well, we all know the answers; it
  costs too much, takes too long to develop, becomes useless when we
  change the algorithm even slightly, etc.  However, recent advances in
  electrically reprogrammable FPGAs (Field Programmable Gate Arrays)
  have nullified most of those objections.  Now, the gate density is
  high enough so that an entire simple processor can be built within a
  single FPGA, and the time to reconfigure (reprogram) an FPGA has also
  been dropping to a level where it is reasonable to reconfigure even
  when moving from one phase of an algorithm to the next.

  This stuff is not for the weak of heart:  you'll have to work with
  hardware description languages like VHDL for the FPGA configuration,
  as well as writing low-level code to interface to programs on the
  Linux host system.  However, the cost of FPGAs is low, and especially
  for algorithms operating on low-precision integer data (actually, a
  small superset of the stuff SWAR is good at), FPGAs can perform
  complex operations just about as fast as you can feed them data.  For
  example, simple FPGA-based systems have yielded better-than-
  supercomputer times for searching gene databases.

  There are other companies making appropriate FPGA-based hardware, but
  the following two companies represent a good sample.

  Virtual Computer Company offers a variety of products using
  dynamically reconfigurable SRAM-based Xilinx FPGAs.  Their 8/16 bit
  "Virtual ISA Proto Board"  <http://www.vcc.com/products/isa.html> is
  less than $2,000.

  The Altera ARC-PCI (Altera Reconfigurable Computer, PCI bus),
  <http://www.altera.com/html/new/pressrel/pr_arc-pci.html>, is a
  similar type of card, but uses Altera FPGAs and a PCI bus interface
  rather than ISA.

  Many of the design tools, hardware description languages, compilers,
  routers, mappers, etc., come as object code only that runs under
  Windows and/or DOS.  You could simply keep a disk partition with
  DOS/Windows on your host PC and reboot whenever you need to use them,
  however, many of these software packages may work under Linux using
  dosemu or Windows emulators like wine.


  6.  Of General Interest


  The material covered in this section applies to all four parallel
  processing models for Linux.


  6.1.  Programming Languages And Compilers


  I am primarily known as a compiler researcher, so I'd like to be able
  to say that there are lots of really great compilers automatically
  generating efficient parallel code for Linux systems.  Unfortunately,
  the truth is that it is hard to beat the performance obtained by
  expressing your parallel program using various explicit communication
  and other parallel operations within C code that is compiled by GCC.

  The following language/compiler projects represent some of the best
  efforts toward producing reasonably efficient code from high-level
  languages.  Generally, each is reasonably effective for the kinds of
  programming tasks it targets, but none is the powerful general-purpose
  language and compiler system that will make you forever stop writing C
  programs to compile with GCC...  which is fine.  Use these languages
  and compilers as they were intended, and you'll be rewarded with
  shorter development times, easier debugging and maintenance, etc.

  There are plenty of languages and compilers beyond those listed here
  (in alphabetical order).  A list of freely available compilers (most
  of which have nothing to do with Linux parallel processing) is at
  <http://www.idiom.com/free-compilers/>.


  6.1.1.  Fortran 66/77/PCF/90/HPF/95


  At least in the scientific computing community, there will always be
  Fortran.  Of course, now Fortran doesn't mean the same thing it did in
  the 1966 ANSI standard.  Basically, Fortran 66 was pretty simple
  stuff.  Fortran 77 added tons of features, the most noticeable of
  which were the improved support for character data and the change of
  DO loop semantics.  PCF (Parallel Computing Forum) Fortran attempted
  to add a variety of parallel processing support features to 77.
  Fortran 90 is a fully-featured modern language, essentially adding
  C++-like object-oriented programming features and parallel array
  syntax to the 77 language.  HPF (High-Performance Fortran,
  <http://www.crpc.rice.edu/HPFF/home.html>), which has itself gone
  through two versions (HPF-1 and HPF-2), is essentially the enhanced,
  standardized, version of what many of us used to know as CM Fortran,
  MasPar Fortran, or Fortran D; it extends Fortran 90 with a variety of
  parallel processing enhancements, largely focussed on specifying data
  layouts.  Finally, Fortran 95 represents a relatively minor
  enhancement and refinement of 90.

  What works with C generally can also work with f2c, g77 (a nice Linux-
  specific overview is at  <http://linux.uni-
  regensburg.de/psi_linux/gcc/html_g77/g77_91.html>), or the commercial
  Fortran 90/95 products from
  <http://extweb.nag.co.uk/nagware/NCNJNKNM.html>.  This is because all
  of these compilers eventually come down to the same code-generation
  used in the back-end of GCC.

  Commercial Fortran parallelizers that can generate code for SMPs are
  available from  <http://www.kai.com/> and
  <http://www.psrv.com/vast/vast_parallel.html>.  It is not clear if
  these compilers will work for SMP Linux, but it should be possible
  given that the standard POSIX threads (i.e., LinuxThreads) work under
  SMP Linux.

  The Portland Group,  <http://www.pgroup.com/>, has commercial
  parallelizing HPF Fortran (and C, C++) compilers that generate code
  for SMP Linux; they also have a version targeting clusters using MPI
  or PVM.  FORGE/spf/xHPF products at  < http://www.apri.com/> might
  also be useful for SMPs or clusters.

  Freely available parallelizing Fortrans that might be made to work
  with parallel Linux systems include:



  o  ADAPTOR (Automatic DAta Parallelism TranslaTOR,
     <http://www.gmd.de/SCAI/lab/adaptor/adaptor_home.html>), which can
     translate HPF into Fortran 77/90 code with MPI or PVM calls, but
     does not mention Linux.

  o  Fx  <http://www.cs.cmu.edu/~fx/Fx> at Carnegie Mellon targets some
     workstation clusters, but Linux?

  o  HPFC (prototype HPF Compiler,
     <http://www.cri.ensmp.fr/~coelho/hpfc.html>) generates Fortran 77
     code with PVM calls.  Is it usable on a Linux cluster?

  o  Can PARADIGM (PARAllelizing compiler for DIstributed-memory
     General-purpose Multicomputers,
     <http://www.crhc.uiuc.edu/Paradigm/>) be used with Linux?

  o  The Polaris compiler,
     <http://ece.www.ecn.purdue.edu/~eigenman/polaris/>, generates
     Fortran code for shared memory multiprocessors, and may soon be
     retargeted to PAPERS Linux clusters.

  o  PREPARE,
     <http://www.irisa.fr/EXTERNE/projet/pampa/PREPARE/prepare.html>,
     targets MPI clusters...  it is not clear if it can generate code to
     run on IA32 processors.

  o  Combining ADAPT and ADLIB, shpf (Subset High Performance Fortran
     compilation system,
     <http://www.ccg.ecs.soton.ac.uk/Projects/shpf/shpf.html>) is public
     domain and generates Fortran 90 with MPI calls...  so, if you have
     a Fortran 90 compiler under Linux....

  o  SUIF (Stanford University Intermediate Form, see
     <http://suif.stanford.edu/>) has parallelizing compilers for both C
     and Fortran.  This is also the focus of the National Compiler
     Infrastructure Project...  so, is anybody targeting parallel Linux
     systems?

  I'm sure that I have omitted many potentially useful compilers for
  various dialects of Fortran, but there are so many that it is
  difficult to keep track.  In the future, I would prefer to list only
  those compilers known to work with Linux.  Please email comments
  and/or corrections to pplinux@ecn.purdue.edu.


  6.1.2.  GLU (Granular Lucid)


  GLU (Granular Lucid) is a very high-level programming system based on
  a hybrid programming model that combines intensional (Lucid) and
  imperative models.  It supports both PVM and TCP sockets.  Does it run
  under Linux?  More information is available at
  <http://www.csl.sri.com/GLU.html>.


  6.1.3.  Jade And SAM


  Jade is a parallel programming language that extends C to exploit
  coarse-grain concurrency in sequential, imperative programs.  It
  assumes a distributed shared memory model, which is implemented by SAM
  for workstation clusters using PVM.  More information is available at
  <http://suif.stanford.edu/~scales/sam.html>.



  6.1.4.  Mentat And Legion


  Mentat is an object-oriented parallel processing system that works
  with workstation clusters and has been ported to Linux.  Mentat
  Programming Language (MPL) is an object-oriented programming language
  based on C++.  The Mentat run-time system uses something vaguely
  resembling non-blocking remote procedure calls.  More information is
  available at  <http://www.cs.virginia.edu/~mentat/>.

  Legion  <http://www.cs.virginia.edu/~legion/> is built on top on
  Mentat, providing the appearance of a single virtual machine across
  wide-area networked machines.


  6.1.5.  MPL (MasPar Programming Language)


  Not to be confussed with Mentat's MPL, this language was originally
  developed as the native parallel C dialect for the MasPar SIMD
  supercomputers.  Well, MasPar isn't really in that business any more
  (they are now NeoVista Solutions,  <http://www.neovista.com>, a data
  mining company), but their MPL compiler was built using GCC, so it is
  still freely available.  In a joint effort between the University of
  Alabama at Huntsville and Purdue University, MasPar's MPL has been
  retargeted to generate C code with AFAPI calls (see section 3.6), and
  thus runs on both Linux SMPs and clusters.  The compiler is, however,
  somewhat buggy...  see
  <http://www.math.luc.edu/~laufer/mspls/papers/cohen.ps>.


  6.1.6.  PAMS (Parallel Application Management System)


  Myrias is a company selling a software product called PAMS (Parallel
  Application Management System).  PAMS provides very simple directives
  for virtual shared memory parallel processing.  Networks of Linux
  machines are not yet supported.  See  <http://www.myrias.com/> for
  more information.


  6.1.7.  Parallaxis-III


  Parallaxis-III is a structured programming language that extends
  Modula-2 with "virtual processors and connections" for data
  parallelism (a SIMD model).  The Parallaxis software comprises
  compilers for sequential and parallel computer systems, a debugger
  (extensions to the gdb and xgbd debugger), and a large variety of
  sample algorithms from different areas, especially image processing.
  This runs on sequential Linux systems...  an old version supported
  various parallel targets, and the new version also will (e.g.,
  targeting a PVM cluster).  More information is available at
  <http://www.informatik.uni-stuttgart.de/ipvr/bv/p3/p3.html>.


  6.1.8.  pC++/Sage++


  pC++/Sage++ is a language extension to C++ that permits data-parallel
  style operations using "collections of objects" from some base
  "element" class.  It is a preprocessor generating C++ code that can
  run under PVM.  Does it run under Linux?  More information is
  available at  <http://www.extreme.indiana.edu/sage/>.


  6.1.9.  SR (Synchronizing Resources)


  SR (Synchronizing Resources) is a concurrent programming language in
  which resources encapsulate processes and the variables they share;
  operations provide the primary mechanism for process interaction. SR
  provides a novel integration of the mechanisms for invoking and
  servicing operations. Consequently, all of local and remote procedure
  call, rendezvous, message passing, dynamic process creation,
  multicast, and semaphores are supported. SR also supports shared
  global variables and operations.

  It has been ported to Linux, but it isn't clear what parallelism it
  can execute with.  More information is available at
  <http://www.cs.arizona.edu/sr/www/index.html>.


  6.1.10.  ZPL And IronMan


  ZPL is an array-based programming language intended to support
  engineering and scientific applications.  It generates calls to a
  simple message-passing interface called IronMan, and the few functions
  which constitute this interface can be easily implemented using nearly
  any message-passing system.  However, it is primarily targeted to PVM
  and MPI on workstation clusters, and Linux is supported.  More
  information is available at
  <http://www.cs.washington.edu/research/projects/orca3/zpl/www/>.


  6.2.  Performance Issues


  There are a lot of people who spend a lot of time benchmarking
  particular motherboards, network cards, etc., trying to determine
  which is the best.  The problem with that approach is that by the time
  you've been able to benchmark something, it is no longer the best
  available; it even may have been taken off the market and replaced by
  a revised model with entirely different properties.

  Buying PC hardware is like buying orange juice.  Usually, it is made
  with pretty good stuff no matter what company name is on the label.
  Few people know, or care, where the components (or orange juice
  concentrate) came from.  That said, there are some hardware
  differences that you should pay attention to.  My advice is simply
  that you be aware of what you can expect from the hardware under
  Linux, and then focus your attention on getting rapid delivery, a good
  price, and a reasonable policy for returns.

  An excellent overview of the different PC processors is given in
  <http://www.pcguide.com/ref/cpu/fam/>; in fact, the whole WWW site
  <http://www.pcguide.com/> is full of good technical overviews of PC
  hardware.  It is also useful to know a bit about performance of
  specific hardware configurations, and the Linux Benchmarking HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/Benchmarking-HOWTO.html> is a good
  place to start.

  The Intel IA32 processors have many special registers that can be used
  to measure the performance of a running system in exquisite detail.
  Intel VTune,  <http://developer.intel.com/design/perftool/vtune/>,
  uses the performance registers extensively in a very complete code-
  tuning system...  that unfortunately doesn't run under Linux.  A
  loadable module device driver, and library routines, for accessing the
  Pentium performance registers is available from
  <http://www.cs.umd.edu/users/akinlar/driver.html>.  Keep in mind that
  these performance registers are different on different IA32
  processors; this code works only with Pentium, not with 486, Pentium
  Pro, Pentium II, K6, etc.

  Another comment on performance is appropriate, especially for those of
  you who want to build big clusters and put them in small spaces.  At
  least some modern processors incorporate thermal sensors and circuits
  that are used to slow the internal clock rate if operating temperature
  gets too high (an attempt to reduce heat output and improve
  reliability).  I'm not suggesting that everyone should go buy a
  peltier device (heat pump) to cool each CPU, but you should be aware
  that high operating temperature does not just shorten component life -
  it also can directly reduce system performance.  Do not arrange your
  computers in physical configurations that block airflow, trap heat
  within confined areas, etc.

  Finally, performance isn't just speed, but also reliability and
  availability.  High reliability means that your system almost never
  crashes, even when components fail...  which generally requires
  special features like redundant power supplies and hot-swap
  motherboards.  That usually isn't cheap.  High availability refers to
  the concept that your system is available for use nearly all the
  time...  the system may crash when components fail, but the system is
  quickly repaired and rebooted.  There is a High-Availability HOWTO
  that discusses many of the basic issues.  However, especially for
  clusters, high availablity can be achieved simply by having a few
  spares.  I recommend at least one spare, and prefer to have at least
  one spare for every 16 machines in a large cluster.  Discarding faulty
  hardware and replacing it with a spare can yield both higher
  availability and lower cost than a maintenance contract.


  6.3.  Conclusion - It's Out There


  So, is anybody doing parallel processing using Linux?  Yes!

  It wasn't very long ago that a lot of people were wondering if the
  death of many parallel-processing supercomputer companies meant that
  parallel processing was on its way out.  I didn't think it was dead
  then (see  <http://dynamo.ecn.purdue.edu/~hankd/Opinions/pardead.html>
  for a fun overview of what I think really happened), and it seems
  quite clear now that parallel processing is again on the rise.  Even
  Intel, which just recently stopped making parallel supercomputers, is
  proud of the parallel processing support in things like MMX and the
  upcoming IA64 EPIC (Explicitly Parallel Instruction Computer).

  If you search for "Linux" and "parallel" with your favorite search
  engine, you'll find quite a few places are involved in parallel
  processing using Linux.  In particular, Linux PC clusters seem to be
  popping-up everywhere.  The appropriateness of Linux, combined with
  the low cost and high performance of PC hardware, have made parallel
  processing using Linux a popular approach to supercomputing for both
  small, budget-constrained, groups and large, well-funded, national
  research laboratories.

  Various projects listed elsewhere in this document maintain lists of
  "kindred" research sites that have similar parallel Linux
  configurations.  However, at
  <http://yara.ecn.purdue.edu/~pplinux/Sites/>, there is a hypertext
  document intended to provide photographs, descriptions, and contact
  information for all the various sites using Linux systems for parallel
  processing.  To have information about your site posted there:


  o  You must have a "permanent" parallel Linux site:  an SMP, cluster
     of machines, SWAR system, or PC with attached processor, which is
     configured to allow users to execute parallel programs under Linux.
     A Linux-based software environment (e.g., PVM, MPI, AFAPI) that
     directly supports parallel processing must be installed on the
     system.  However, the hardware need not be dedicated to parallel
     processing under Linux, and may be used for completely different
     purposes when parallel programs are not being run.

  o  Request that your site be listed.  Send your site information to
     pplinux@ecn.purdue.edu.  Please follow the format used in other
     entries for your site information.  No site will be listed without
     an explicit request from the contact person for that site.

  There are 14 clusters in the current listing, but we are aware of at
  least several dozen Linux clusters world-wide.  Of course, listing
  does not imply any endorsement, etc.; our hope is simply to increase
  awareness, research, and collaboration involving parallel processing
  using Linux.



  The Linux Plug-and-Play-HOWTO
  David S.Lawyer
   <mailto:dave@lafn.org>
  v0.12, June 2000

  Help with understanding and dealing with the complex Plug-and-Play
  issue.  How to get your Linux system to support Plug-and-Play.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Copyright, Trademarks, Disclaimer, & Credits
        1.1.1 Copyright
        1.1.2 Disclaimer
        1.1.3 Trademarks.
        1.1.4 Credits
     1.2 Future Plans; You Can Help
     1.3 New Versions of this HOWTO

  2. What PnP Should Do: Allocate "Bus-Resources"

     2.1 What is Plug-and-Play (PnP)?
     2.2 How a Computer Finds Devices (and conversely)
     2.3 I/O Addresses, etc.
     2.4 IRQs --Overview
     2.5 DMA Channels
     2.6 Memory Ranges
     2.7 "Resources" to both Device and Driver
     2.8 The Problem
     2.9 PnP Finds Devices Plugged Into Serial Ports

  3. The Plug-and-Play (PnP) Solution

     3.1 Introduction to PnP
     3.2 How It Works (simplified)
     3.3 Starting Up the PC
     3.4 Buses
     3.5 Linux Needs to Cope Better with PnP

  4. Configuring a PnP BIOS

     4.1 Do you have a PnP operating system?
        4.1.1 Interoperability with Windows9x
     4.2 How are bus-resources to be controlled?
     4.3 Reset the configuration?

  5. How to Deal with PnP Cards

     5.1 Introduction to Dealing with PnP Cards
     5.2 Disable PnP ?
     5.3 BIOS Configures PnP
        5.3.1 Intro to Using the BIOS to Configure PnP
        5.3.2 The BIOS's ESCD Database
        5.3.3 Using Windows to set the ESCD
        5.3.4 Adding a New Device (under Linux or Windows)
     5.4 Isapnp (part of isapnptools)
     5.5 PCI Utilities
     5.6 Patch the Kernel to Make Linux PnP
     5.7 Windows Configures
     5.8 Device Driver Configures
     5.9 PnP Software/Documents

  6. Tell the Driver the Configuration

     6.1 Introduction
     6.2 Serial Port Driver: setserial
     6.3 Sound Card Drivers
        6.3.1 OSS-Lite
        6.3.2 OSS (Open Sound System) and ALSA

  7. What Is My Current Configuration?

     7.1 Boot-time Messages
     7.2 How Are My Device Drivers Configured?
     7.3 How Are My Hardware Devices Configured?
  8. Appendix

     8.1 Addresses
        8.1.1 ISA Bus Configuration Address (Read-Port etc.)
        8.1.2 Address ranges
        8.1.3 Address space
        8.1.4 Range Check (ISA Testing for IO Address Conflicts)
        8.1.5 Communicating Directly via Memory
     8.2 Interrupts --Details
     8.3 PCI Interrupts
     8.4 Isolation


  ______________________________________________________________________

  1.  Introduction

  1.1.  Copyright, Trademarks, Disclaimer, & Credits

  1.1.1.  Copyright

  Copyright (c) 1998-2000 by David S. Lawyer  <mailto:dave@lafn.org>

  Please freely copy and distribute (sell or give away) this document in
  any format.  Forward any corrections and comments to the document
  maintainer.  You may create a derivative work and distribute it
  provided that you:


  1. Send your derivative work (in the most suitable format such as
     sgml) to the LDP (Linux Documentation Project) or the like for
     posting on the Internet.  If not the LDP, then let the LDP know
     where it is available.  Except for a translation, send a copy to
     the previous maintainer's url as shown in the latest version.

  2. License the derivative work in the spirit of this license or use
     GPL.  Include a copyright notice and at least a pointer to the
     license used.

  3. Give due credit to previous authors and major contributors.

  If you're considering making a derived work other than a translation,
  it's requested that you discuss your plans with the current
  maintainer.


  1.1.2.  Disclaimer

  While I haven't intentionally tried to mislead you, there are likely a
  number of errors in this document.  Please let me know about them.
  Since this is free documentation, it should be obvious that I cannot
  be held legally responsible for any errors.


  1.1.3.  Trademarks.

  Any brand names (starts with a capital letter) should be assumed to be
  a trademark).  Such trademarks belong to their respective owners.



  1.1.4.  Credits


    Daniel Scott proofread this in March 2000 and found many typos,
     etc.
    Pete Barrett gave a workaround to prevent Windows from zeroing PCI
     IRQs.



  1.2.  Future Plans; You Can Help

  Please let me know of any errors in facts, opinions, logic, spelling,
  grammar, clarity, links, etc.  But first, if the date is over a month
  old, check to see that you have the latest version.  Please send me
  any info that you think belongs in this document.

  I haven't studied in detail either isapnptools or David Howells'
  patches to the kernel (but I plan to).  Nor do I fully understand how
  PnP is configured by the BIOS (it depends on which BIOS) nor how
  Windows9x updates the ESCD.  Thus this HOWTO is still incomplete and
  may be inaccurate (let me know where I'm wrong).  In this HOWTO I've
  sometimes used ??  to indicate that I don't really know the answer.


  1.3.  New Versions of this HOWTO

  New versions of the Plug-and-Play-HOWTO should appear every month or
  so and will be available to browse and/or download at LDP mirror
  sites.  For a list of mirror sites see:
  <http://linuxdoc.org/mirrors.html>.  Various formats are available.
  If you only want to quickly check the date of the latest version look
  at:  <http://linuxdoc.org/HOWTO/Plug-and-Play-HOWTO.html>.  The
  version you are now reading is: v0.12, June 2000 .  New is this
  version are: scanpci, workaround for Dos zeroing PCI IRQs. .


  2.  What PnP Should Do: Allocate "Bus-Resources"

  2.1.  What is Plug-and-Play (PnP)?

  Oversimplified, Plug-and-Play automatically tells the software (device
  drivers) where to find various pieces of hardware (devices) such as
  modems, network cards, sound cards, etc.  Plug-and-Play's task is to
  match up physical devices with the software (device drivers) that
  operates them and to establish channels of communication between each
  device and its driver.  In order to achieve this, PnP allocates the
  following "bus-resources" to both drivers and hardware: I/O addresses,
  IRQs, DMA channels (ISA bus only), and memory regions.  These 4 things
  are sometimes called 1st order resources.  If you don't understand
  what these 4 bus-resources are, read the following subsections of this
  HOWTO: I/O Addresses, IRQs, DMA Channels, Memory Regions.  An article
  in Linux Gazette about 3 of these bus-resources is Introduction to
  IRQs, DMAs and Base Addresses.  Once these bus-resources have been
  assigned (and if the correct driver is installed), the names for such
  devices in the /dev directory are ready to use.

  This PnP assignment of bus-resources is sometimes called "configuring"
  but it is only a low level type of configuring.  Even with PnP fully
  utilized, much configuring of devices is done by other than PnP.  For
  example, for modem configuration an "init string" is sent to the modem
  over the I/0 address "channel".  This "init string" has nothing to do
  with PnP although the "channel" used to send it to the modem was
  allocated by PnP.  Setting the speed (and many other parameters) of a
  serial port is done by sending messages to the device driver from
  programs run by the user (often automatically boot-time).  This
  configuring also has nothing to do with PnP.  Thus when talking about
  PnP "configuring" means only a certain type of configuring.  While
  other documentation (such a for MS Windows) simply calls bus-resources
  "resources",  I have coined the term "bus-resources" so as to
  distinguish it from the multitude of other kinds of resources.
  2.2.  How a Computer Finds Devices (and conversely)

  A computer consists of a CPU/processor to do the computing and memory
  to store programs and data.  In addition, there are a number of
  devices such as various kinds of disk-drives, a video card, a
  keyboard, network cards, modem cards, sound cards, serial and parallel
  ports, etc.  There is also a power supply to provide electric energy,
  various buses on a motherboard to connect the devices to the CPU, and
  a case to put all this into.

  In olden days most all devices had their own plug-in cards (printed
  circuit boards).  Today, in addition to plug-in cards, many "devices"
  are small chips permanently mounted on the "motherboard".  Cards which
  plug into the motherboard may contain more than one device.  Memory
  chips are also sometimes considered to be devices but are not plug-
  and-play in the sense used in this HOWTO.

  For the computer system to work right, each device must be under the
  control of its "device driver".  This is software which is a part of
  the operating system (perhaps loaded as a module) and runs on the CPU.
  Device drivers are associated with "special files" in the /dev
  directory although they are not really files.  They have names such as
  hda1 (first partition on hard drive a), ttyS0 (the first serial port),
  eth1 (the second ethernet card), etc.  To make matters more
  complicated, the particular device driver selected, say for eth1, will
  depend on the type of ethernet card you have.  Thus eth1 can't just be
  assigned to any ethernet driver.  It must be assigned to a certain
  driver that will work for the type of ethernet card you have
  installed.  To control a device, the CPU (under the control of the
  device driver) sends commands (and data) to and reads info from the
  various devices.  In order to do this each device driver must know the
  address of the device it controls.  Knowing such an address is
  equivalent to setting up a communication channel, even though the
  physical "channel" is actually the data bus inside the PC which is
  shared with almost everything else.

  The communication channel is actually a little more complex than
  described above.  An "address" is actually a range of addresses and
  there is a reverse part of the channel (known as interrupts) which
  allows devices to send an urgent "help" request to their device
  driver.


  2.3.  I/O Addresses, etc.

  PC's have 3 address spaces: I/O, main memory, and configuration (only
  on the PCI bus).  All of these 3 types of addresses share the same
  address bus inside the PC.  But the voltage on certain dedicated wires
  on the PC's bus tells which "space" an address is in: I/O, main
  memory, or configuration.  See ``Addresses'' for more details.
  Devices were originally located in I/O address space although today
  they may use space in main memory.  An I/0 address is sometimes just
  called "I/O", "IO", "i/o" or "io".  The term "I/O port" also used.
  There are two main steps to allocate the I/O addresses (or other bus-
  resources such as interrupts):


  1. Set the I/O address, etc. on the card (in one of its registers)

  2. Let its device driver know what this I/O address, etc. is


  The two step process above is something like the two part problem of
  finding someone's house number on a street.  You must obtain (and
  write down) the house number and someone must install a number on the
  front of the house so that it may be found.  In computers, the device
  driver must obtain the address and the device hardware must get the
  same address set in one of its registers.  Both of these must be done,
  but some people make the mistake of doing only one of these and then
  wonder why the computer can't find the device.  For example, they will
  use "setserial" to assign an address to a serial port without
  realizing that this only tells the driver an address.  It doesn't set
  the address in the serial port hardware itself.  If the serial port
  actually had a different address (or none at all) and you told
  setserial wrong, then you're in trouble.

  Another obvious requirement is that before the device driver can use
  an address it must be first set on the card.  Since device drivers
  often start up soon after you start the computer, they sometimes try
  to access a card (to see if it's there, etc.) before the address has
  been set in the card by a PnP configuration program.  Then you see an
  error message that they can't find the card even though it's there
  (but doesn't yet have an address).

  What was said in the last 2 paragraphs regarding I/O addresses applies
  with equal force to other bus-resources: ``IRQs --Overview'', ``DMA
  Channels'', and ``Memory Regions''.  What these are will be explained
  in the next 3 sections.


  2.4.  IRQs --Overview

  After reading this you may read ``Interrupts --Details'' for some more
  details.  The following is intentionally oversimplified:  Besides the
  address, there is also an interrupt number to deal with (such as IRQ
  5).  It's called an IRQ (Interrupt ReQuest) number.  We already
  mentioned above that the device driver must know the address of a card
  in order to be able to communicate with it.  But what about
  communication in the opposite direction?  Suppose the device needs to
  tell its device driver something immediately?  For example, the device
  may have just received a lot of bytes destined for main memory and the
  device needs to call its driver to fetch these bytes at once and
  transfer them from the device's nearly full buffer into main memory.
  Another example is to signal the driver that the device has finished
  sending a bunch of bytes and is now waiting for some more bytes to
  send.

  How should the device signal its driver?  It can't use the main data
  bus since it's likely already in use.  Instead it puts a voltage on a
  dedicated interrupt wire (part of the bus) which is often reserved for
  that device alone.  This signal is called an interrupt.  There are the
  equivalent of 16 such wires in a PC and each wire leads (indirectly)
  to a certain device driver.  Each wire has a unique IRQ (Interrupt
  ReQuest) number.  The device must put its interrupt on the correct
  wire and the device driver must listen for the interrupt on the
  correct wire.  Which wire the device uses is determined by the IRQ
  number stored in the device.  This same IRQ number must be known to
  the device driver so that the device driver knows which IRQ line to
  listen to.

  Once the device driver gets the interrupt from the device it must find
  out why the interrupt was issued and take appropriate action to
  service the interrupt.  On the ISA bus each device needs its own
  unique IRQ number.  For the PCI bus and other special cases the
  sharing of IRQs is allowed.


  2.5.  DMA Channels

  DMA channels are only for the ISA bus.  DMA stands for "Direct Memory
  Access".  This is where a device is allowed to take over the main
  computer bus from the CPU and transfer bytes directly to main memory.
  Normally the CPU would make such a transfer in a two step process:

  1. reading from the I/O memory space of the device and putting these
     bytes into the CPU itself

  2. writing these bytes from the CPU to main memory


  1. With DMA it's usually a one step process of sending the bytes
     directly from the device to memory

     The device must have such capabilities built into its hardware and
     thus not all devices can do DMA.  While DMA is going on the CPU
     can't do too much since the main bus is being used by the DMA
     transfer.

  The PCI bus doesn't really have any DMA but instead it has something
  even better: bus mastering.  It works something like DMA and is
  sometimes called DMA (for example, hard disk drives that call
  themselves "UltraDMA").  It allows devices to temporarily become bus
  masters and to transfer bytes almost like the bus master was the CPU.
  It doesn't use any channel numbers since the organization of the PCI
  bus is such that the PCI hardware knows which device is currently the
  bus master and which device is requesting to become a bus master.
  Thus there is no allocation of DMA channels for the PCI bus.

  When a device on the ISA bus wants to do DMA it issues a DMA-request
  using dedicated DMA request wires much like an interrupt request.  DMA
  actually could have been handled by using interrupts but this would
  introduce some delays so it's faster to do it by having a special type
  of interrupt known as a DMA-request.  Like interrupts, DMA-requests
  are numbered so as to identify which device is making the request.
  This number is called a DMA-channel.  Since DMA transfers all use the
  main bus (and only one can run at a time) they all actually use the
  same channel but the "DMA channel" number serves to identify who is
  using the "channel".  Hardware registers exist on the motherboard
  which store the current status of each "channel".  Thus in order to
  issue a DMA-request, the device must know its DMA-channel number which
  must be stored in a register on the physical device.


  2.6.  Memory Ranges

  Some devices are assigned address space in main memory.  It's often
  "shared memory" or "memory-mapped I/O".  Sometimes it's ROM memory on
  the device.  When discussing bus-resources it's often just called
  "memory".  Such a device might also use I/O address space.

  When you plug in such a card, you are in effect also plugging in a
  memory module for main memory.  This memory can either be ROM (Read
  Only Memory) or shared memory.  Shared memory is shared between the
  device and the CPU (running the device driver).  This memory can serve
  as a means of direct data "transfer" between the device and main
  memory.  It's not really a transfer since the device puts data into
  its own memory on its card which also happens to be in main memory.
  Both the card and the device driver need to know where it is.  The
  memory address is likely to be very high so that it does not conflict
  with the lower addresses of the memory chips in your computer.

  ROM is different.  It is likely a program (perhaps a device driver)
  which will be used with the device.  Hopefully, it may work with Linux
  and not just Windows ??  It may need to be shadowed which means that
  it is copied to your main memory chips in order to run faster.  Once
  it's shadowed it's no longer "read only".


  2.7.  "Resources" to both Device and Driver

  Thus device drivers must be "attached" in some way to the hardware
  they control.  This is done by supplying bus-resources (I/O, Memory,
  IRQ's, DMA's) to both the physical device and the device driver
  software.  For example, a serial port uses only 2 (out of 4 possible)
  resources: an IRQ and an I/O address.  Both of these values must be
  supplied to the device driver and the physical device.  The driver
  (and its device) is also given a name in the /dev directory (such as
  ttyS1).  The address and IRQ number is stored by the physical device
  in registers on the card (or in a chip on the motherboard).  For the
  case of jumpers, this info is always stored in the device hardware (on
  the card, etc.).  But for the case of PnP, the register data is
  usually lost when the PC is powered down (turned off) so that the
  resource data must be supplied to each device anew each time the PC is
  powered on.


  2.8.  The Problem

  The architecture of the PC provides only a limited number of IRQ's,
  DMA channels, I/O address, and memory regions.  If there were only
  several devices and they all had standardized bus-resource (such as
  unique I/O addresses and IRQ numbers) there would be no problem of
  attaching device drivers to devices.  Each device would have a fixed
  resources which would not conflict with any other device on your
  computer.  No two devices would have the same addresses, there would
  be no IRQ conflicts, etc.  Each driver would be programmed with the
  unique addresses, IRQ, etc. hard-coded into the program.  Life would
  be simple.

  But it's not.  Not only are there so many different devices today that
  conflicts are frequent, but one sometimes needs to have more than one
  of the same type of device.  For example, one may want to have a few
  different disk-drives, a few serial ports, etc.  For these reasons
  devices need to have some flexibility so that they can be set to
  whatever address, IRQ, etc. is needed to avoid conflicts.  But some
  IRQ's and addresses are pretty standard such as the ones for the clock
  and keyboard.  These don't need such flexibility.

  Besides the problem of conflicting allocation of bus-resources, there
  is a problem of making a mistake in telling the device driver what the
  bus-resources are.  For example, suppose that you enter IRQ 4 in a
  configuration file when the device is actually set at IRQ 5.  This is
  another type of bus-resource allocation error.

  The allocation of bus-resources, if done correctly, establishes
  channels of communication between physical hardware and their device
  drivers.  For example, if a certain I/O address range (resource) is
  allocated to both a device driver and a piece of hardware, then this
  has established a one-way communication channel between them.  The
  driver may send commands and info to the device.  It's actually a
  little more than one-way since the driver may get information from the
  device by reading its registers.  But the device can't initiate any
  communication this way.  To initiate communication the device needs an
  IRQ in order to create a two-way communication channel where both the
  driver and the device can initiate communication.


  2.9.  PnP Finds Devices Plugged Into Serial Ports

  External devices that connect to the serial port via a cable (such as
  external modems) can also be called Plug-and-Play.  Since only the
  serial port itself needs bus-resources (an IRQ and I/O address) there
  are no bus-resources to allocate to such plug-in devices.  Thus PnP is
  not really needed for them.  Even so, there is a PnP specification for
  such external serial devices.

  A PnP operating system will find such an external device and read its
  model number, etc.  Then it may be able to find a device driver for it
  so that you don't have to tell an application program that you have a
  certain device on say /dev/ttyS1.  Since you should be able to
  manually inform your application program (via a configuration file,
  etc.) what serial port the device is on (and possibly what model
  number it is) you should not really need this "serial port" feature of
  PnP.


  3.  The Plug-and-Play (PnP) Solution

  3.1.  Introduction to PnP

  The term Plug-and-Play (PnP) has various meanings.  In the broad sense
  it is just auto-configuration where one just plugs in a device and it
  configures itself.  In the sense used in this HOWTO, the configuration
  is only that of configuring PnP bus-resources and letting the device
  drivers know about it.  In a more narrow sense it is just setting bus-
  resources in the hardware devices.  It may also mean the PnP
  specifications which (among other things) specify how PnP resource
  data is to be read and written to devices (often cards) on the ISA
  bus.  The standard PCI (and not PnP) specifications do the same for
  the PCI bus.

  PnP matches up devices with their device drivers and specifies their
  communication channels.  On the ISA bus before Plug-and-Play the bus-
  resources were set in hardware devices by jumpers.  Software drivers
  were assigned bus-resources by configuration files (or the like) or by
  probing the for the device at addresses where it's expected to reside.
  The PCI bus was PnP-like from the beginning so it was trivial to
  implement PnP for this bus.  Since the PCI bus specifications don't
  use the term PnP it's not clear whether or not the PCI bus should be
  called PnP (but it supports in hardware what today is called PnP).


  3.2.  How It Works (simplified)

  Here's an oversimplified view of how PnP works.  The PnP configuration
  program (perhaps a program in the BIOS) finds all PnP devices and asks
  each what bus-resources it needs.  Then it checks what bus-resources
  (IRQs, etc.) it has to give away.  Of course if it has reserved bus-
  resources used by non-PnP (legacy) devices (if it knows about them) it
  doesn't give these away.  Then it uses some criteria (not specified by
  PnP specifications) to give out the bus-resources so that there are no
  conflicts and so that all devices get what they need (if possible).
  It then tells each physical device what bus-resources are assigned to
  it and the devices set themselves up to use only the assigned bus-
  resources.  Then the device drivers somehow find out what bus-
  resources their devices use and are thus able to communicate
  effectively with the devices they control.

  For example, suppose a card needs one interrupt (IRQ number) and 1 MB
  of shared memory.  The PnP program reads this request from the card.
  It then assigns the card IRQ5 and 1 MB of memory addresses space,
  starting at address 0xe9000000.  It's not always this simple as the
  card may specify that it can only use certain IRQ numbers (ISA only)
  or that the 1 MB of memory must lie within a certain range of
  addresses.  The details are different for the PCI and ISA buses with
  more complexity on the ISA bus.

  There are some shortcuts that PnP software may use.  One is to keep
  track of how it assigned bus-resources at the last configuration (when
  the computer was last used) and reuse this.   Windows9x and PnP BIOSs
  do this but standard Linux doesn't.  Windows9x stores this info in its
  "Registry" on the hard disk and a PnP BIOS stores it in non-volatile
  memory in your PC (known as ESCD; see ``The BIOS's ESCD Database'').

  Under Linux it's each device for itself and there is no centralized
  non-volatile registry of resource assignments.  Some device drivers
  store the last configuration they used and use it next time the
  computer is powered on.  They implicitly assume that the rest of the
  hardware will not need to use its bus-resources.

  If the device hardware remembered their previous configuration, then
  there wouldn't be any hardware to configure at the next boot-time, but
  they seem to forget their configuration when the power is turned off.
  Some devices contain a default configuration (but not necessarily the
  last one used).  Thus a PnP configuration program needs to be run each
  time the PC is powered on.  Also, if a new device has been added, then
  it too needs to be configured.  Allocating bus-resources to this new
  device might involve taking some bus-resources away from an existing
  device and assigning the existing device alternative bus-resources
  that it can use instead.


  3.3.  Starting Up the PC

  When the PC is first turned on the BIOS chip runs its program to get
  the computer started (the first step is to check out the hardware).
  If the operating system is stored on the hard-drive (as it normally
  is) then the BIOS must know about the hard-drive.  If the hard-drive
  is PnP then the BIOS may use PnP methods to find it.  Also, in order
  to permit the user to manually configure the BIOS's CMOS and respond
  to error messages when the computer starts up, a screen (video card)
  and keyboard are also required.  Thus the BIOS must PnP-configure
  these devices on its own.

  Once the BIOS has identified the hard-drive, the video card, and the
  keyboard it is ready to start booting (loading the operating system
  into memory from the hard-disk).  If you've told the BIOS that you a
  have a PnP operating system (PnP OS), it should start booting the PC
  as above and let the operating system finish the PnP configuring.
  Otherwise, a PnP-BIOS will (prior to booting) likely try to do the
  rest of the PnP configuring of devices (but not their drivers).


  3.4.  Buses

  ISA is the old bus of the old IBM PC's while PCI is a newer and faster
  bus from Intel.  The PCI bus was designed for what is today called
  PnP.  It makes it easy (as compared to the ISA bus) to find out how
  PnP bus-resources have been assigned to hardware devices.  To see what
  has happened use the commands lspci or scanpci (Xwindows) and/or look
  at /proc/pci or possibly /proc/bus/pci.  The boot-up messages on your
  display are useful (use shift-PageUp to back up).  See ``Boot-time
  Messages''

  For the ISA bus there is a real problem with implementing PnP since no
  one had PnP in mind when the ISA bus was designed and there are almost
  no I/O addresses available for PnP to use for sending configuration
  info to physical device.  As a result, the way PnP was shoehorned onto
  the ISA bus is very complicated.  A whole book has been written about
  it.  See ``PnP Book''.  Among other things, it requires that each PnP
  device be assigned a temporary "handle" by the PnP program so that one
  may address it for PnP configuring.  Assigning these "handles" is call
  "isolation".  See ``Isolation'' for the complex details.

  Eventually, the ISA bus should become extinct.  When it does, PnP will
  be easier since it will be easy to find out how the BIOS has
  configured the hardware.  There will still be the need to match up
  device drivers with devices and also a need to configure devices that
  are added when the PC is up and running.  These needs would be
  satisfied if Linux was a PnP operating system.


  3.5.  Linux Needs to Cope Better with PnP

  PnP (for the ISA bus) was invented by Compaq, Intel, and Phoenix.
  Microsoft has been a leading promoter of it.  Linux would have been
  better off if PnP had never been "invented".  Eventually the ISA bus
  will have become extinct and the PnP-like PCI bus will prevail so that
  we will have in effect gotten an easy-to-implement PnP.  But like it
  or not, most all new ISA hardware today is PnP and Linux has no choice
  but to deal effectively with PnP.  But standard Linux (as of early
  1999) makes dealing with PnP complicated (especially on the ISA bus)
  while the purpose of PnP was to make it simple.

  In a sense, Linux is already somewhat PnP for the PCI bus.  When the
  PC starts up you may note from the messages on the screen that some
  Linux device drivers often find their hardware devices (and the bus-
  resources the BIOS has assigned them).  But there are situations that
  a PnP operating system could handle better:

    A shortage of bus-resources

    More than one driver for a physical device

    An activated driver which can't find its physical device

    Hot installation of a device (docking, etc.)

  Linux users should not need to delve into the details of PnP to
  configure ISA PnP devices as they now need to.  One solution would be
  a standardized version of the Linux kernel that supports Plug-and-Play
  on the ISA, PCI, and other buses.  A patch to the kernel has been
  written although most drivers don't support it.  It's not part of
  standard Linux.  See ``Patch Kernel''.


  4.  Configuring a PnP BIOS

  When the computer is first turned on, the BIOS runs before the
  operating system is loaded.  Newer BIOSs are PnP and will configure
  some or all of the PnP devices.  For most PnP BIOSs there is no way to
  disable PnP so you have to live with it.  Here are some of the choices
  which may exist in your BIOS's CMOS menu:


    ``Do you have a PnP operating  system?''

    ``How are bus-resources to be controlled?''

    ``Reset the configuration?''


  4.1.  Do you have a PnP operating system?

  If you say yes, then the PnP BIOS will PnP-configure the hard-drive,
  video card, and keyboard to make the system bootable.  But it will
  leave it up to the operating system to finish the configuration job.
  It may do an ``Isolation'' on the ISA bus leaving the devices disabled
  but ready to be configured by the operating system.  For Linux you
  should probably tell it that you don't have a PnP operating system.
  If you don't do this, the BIOS might leave the ISA devices it hasn't
  configured in a disabled state ??  Also PCI devices might not get
  configured ??

  If you tell the BIOS you don't have a PnP OS, then the BIOS will do
  the configuring itself.  Unless you have added new PnP devices, it
  should use the configuration which it has stored in its non-volatile
  memory (ESCD).  See ``The BIOS's ESCD Database''.  If the last session
  on your computer was with Linux, then there should be no change in
  configuration.  See ``BIOS Configures PnP''.  But if the last session
  was with Windows9x (which is PnP) then Windows could have modified the
  ESCD.  It supposedly does this only if you "force" a configuration or
  install a legacy device.  See ``Using Windows to set ESCD''.  If you
  are using the isapnp or PCI Utilities program(s) to do configuring,
  they will run after the BIOS runs and change things the way you told
  them to.


  4.1.1.  Interoperability with Windows9x

  If you are running both Linux and Windows on the same PC, how do you
  answer the BIOS's question: Do you have a PnP OS?  Normally (and
  truthfully) you would say no for standard Linux and yes for Windows9x.
  But it's a lot of bother to have to set up the BIOS's CMOS menu
  manually each time you want to switch OSs.  One solution is set the
  CMOS for no PnP OS, including when you start Windows.  One might
  expect that Windows would be able to handle this situation where it is
  presented hardware that has been fully configured by the BIOS.  In
  addition, one might expect that even if Windows didn't realize that
  the hardware was already configured, it would redo this configuration
  and then work OK.  But it doesn't seem to work this way.  It seems
  that Windows may just tell its device drivers what has been stored in
  the Windows' Registry.  But the actual hardware configuration (done by
  the BIOS) is what was stored in the ESCD and may not be the same as
  the Registry => trouble.

  One way to try to get the Registry and the ESCD the same is to install
  (or reinstall) Windows when the BIOS is set for "not a PnP OS".  This
  should present Windows with hardware configured by the BIOS.  If this
  configuration is without conflicts, Windows will hopefully leave it
  alone and save it in it's Registry.  Then the ESCD and the registry
  are in sync.  If this works for you (and this is the latest version of
  this HOWTO), let me know as I only have one report of this working out
  OK.

  Another method is to remove devices that are causing problems in
  Windows by clicking on "remove" in the Device Manager.  Then reboot
  with "Not a PnP OS" (set it in the CMOS as you start to boot).
  Windows will then reinstall the devices, hopefully using the bus-
  resource settings configured by the BIOS.  Be warned that Windows will
  likely ask you to insert the Window installation CD since it sometimes
  can't find the driver files (and the like) even thought they are still
  there.  As a test I "removed" the NIC card which had a Novell
  compatible drivers.  Upon rebooting, Windows reinstalled it with
  Microsoft networking instead of Novell.  This meant that the Novell
  Client needed to be reinstalled.  Let me know about your problems with
  this method (only if this is the latest version of this HOWTO).


  4.2.  How are bus-resources to be controlled?

  This may involve just deciding how to allocate IRQ and DMA bus-
  resources.  If set to "auto", the BIOS will do the allocation.  If set
  to manual, you manually reserve some IRQ's for use on "legacy" (non-
  pnp) cards.  The BIOS may or may not otherwise know about your legacy
  cards.  The BIOS will only know about your legacy cards if you ran ICU
  (or the like) under Windows to tell the BIOS about them.  If the BIOS
  knows about them, then try using "auto".  If it doesn't know about
  them then manually reserve the IRQ's needed for the legacy ISA cards
  and let the rest be for the BIOS PnP to allocate.


  4.3.  Reset the configuration?

  This will erase the BIOSs ESCD data-base of how your PnP devices
  should be configured as well as the list of how legacy (non-PnP)
  devices are configured.  Never do this unless you are convinced that
  this data-base is wrong and needs to be remade.  It was stated
  somewhere that you should do this only if you can't get your computer
  to boot.  If the BIOS loses the data on legacy devices, then you'll
  need to run ICA again under DOS/Windows to reestablish this data.


  5.  How to Deal with PnP Cards

  5.1.  Introduction to Dealing with PnP Cards

  Today most all new internal boards (cards) are Plug-and-Play (PnP).
  Although some software exists in Linux to handle PnP, it is not always
  easy to use.  There are 6 different methods listed below to cope with
  PnP (but some may not be feasible in your situation).  Which one(s)
  you should use depends on your goals.  What may be most expedient to
  do now may not be the easiest and best in the long run.  A seemingly
  simple way is to do nothing and just let a PnP-BIOS configure it but
  then you may need to do some exploring to to find out what the BIOS
  has done.  A comparison of these methods needs to be written by
  someone who has tried them all.  You may need to use more than one
  method to do the job.


    ``Disable PnP''  by jumpers or DOS/Windows software (but many cards
     can't do this)

    ``BIOS Configures PnP'' (For the PCI bus you only need a PCI BIOS,
     otherwise you need a PnP BIOS)

    ``Isapnp'' is a program you can always use to configure PnP devices
     on the ISA bus only

    ``PCI Utilities'' is for configuring the PCI bus

    ``Windows Configures'' and then you boot Linux from within
     Windows/DOS.  Use as a last resort

    ``Patch Kernel'' to transform Linux into a PnP operating system

    ``Device Driver Configures'' but few do

  Any of the above will set the bus-resources in the hardware.  But only
  the last two should tell device driver what it's done.  Only the last
  one definitely tells the driver (since it is the driver).  How the
  driver gets informed depends on the driver and you may need to do
  something to inform it.  See ``Tell the Driver the Configuration''


  5.2.  Disable PnP ?

  Many devices are PnP only with no option for disabling PnP.  But for
  some, you may be able to disable PnP by jumpers or by running a
  Windows program that comes with the device (jumperless configuration).
  This will avoid the often complicated task of configuring PnP.  Don't
  forget to tell the BIOS that these bus-resources are reserved.  There
  are also some reasons why you might not want to disable PnP:

  1. If you have MS Windows on the same machine, then you may want to
     allow PnP to configure devices differently under Windows from what
     it does under Linux.

  2. The range of selection for IRQ numbers (or port addresses) etc.
     may be quite limited unless you use PnP.

  3. You might have a Linux device driver that uses PnP methods to
     search for the device it controls.

  4. If you need to change the configuration in the future, it may be
     easier to do this if it's PnP (no setting of jumpers or running a
     Dos/Windows program).

  5. You may have (or will have) other PnP devices that need configuring
     so that you'll need to provide for (or learn about) PnP anyway.

     Once configured as non-PnP devices, they can't be configured by PnP
     software or the BIOS (until you move jumpers and/or use the
     Dos/Windows configuration software again).


  5.3.  BIOS Configures PnP

  5.3.1.  Intro to Using the BIOS to Configure PnP

  If you have a PnP BIOS, it can configure the hardware.  This means
  that your BIOS reads the resource requirements of all devices and
  configures them (allocates bus-resources to them).  It is a substitute
  for a PnP OS except that the BIOS doesn't match up the drivers with
  their devices nor tell the drivers how it has done the configuring.
  It should normally use the configuration it has stored in its non-
  volatile memory (ESCD).  If it finds a new device or if there's a
  conflict, the BIOS should make the necessary changes to the
  configuration and will not use exactly what was in the ESCD.

  Your BIOS must support such configuring but there have been cases
  where it doesn't do it correctly or completely.  An advantage of using
  the BIOS is that it's simple since in most cases there is nothing to
  set up (except to tell the BIOS's CMOS menu it's not a PnP OS).  While
  some device drivers may be able to automatically detect what the BIOS
  has done, in some cases you'll need to determine it (not always easy).
  See ``What Is My Current Configuration?'' Another possible advantage
  is that the BIOS does its work before Linux starts so that all the
  bus-resources are ready to be used (and found) by the device drivers
  that start up later.

  According to MS it's only optional (not required) that a PnP BIOS be
  able to PnP-configure the devices (without help from MS Windows).  But
  it seems that most of the ones made after 1996 ?? or so can do it.  We
  should send them thank-you notes if they do it right.  They configure
  both the PCI and ISA buses, but it has been claimed that some older
  BIOSs can only do the PCI.  To try to find out more about your BIOS,
  look on the Web.  Please don't ask me as I don't have data on this.
  The details of the BIOS that you would like to know about may be hard
  to find (or not available).  Some BIOSs may have minimal PnP
  capabilities and try to turn over the difficult parts of the
  configuration task to Window utilities.  If this happens you'll either
  have to find another method (such as isapnptools) or try to set up the
  ESCD database if the BIOS has one.  See the next section.


  5.3.2.  The BIOS's ESCD Database

  The BIOS maintains a non-volatile database containing a PnP-
  configuration that it will try to use.  It's called the ESCD (Extended
  System Configuration Data).  Again, the provision of ESCD is optional
  but most PnP-BIOSs have it.  The ESCD not only stores the resource-
  configuration of PnP devices but also stores configuration information
  of non-PnP devices (and marks them as such) so as to avoid conflicts.
  The ESCD data is usually saved on a chip and remains intact when the
  power is off, but sometimes it's kept on a hard-drive??

  The ESCD is intended to hold the last used configuration, but if you
  use a program such as Linux's isapnp or pci utilities (which doesn't
  update the ESCD) then the ESCD will not know about this and will not
  save this configuration in the ESCD.  A good PnP OS might update the
  ESCD so you can use it later on for a non-PnP OS (like standard
  Linux).  MS Windows does this only in special cases.  See ``Using
  Windows to set ESCD''.

  To use what's set in ESCD be sure you've set "Not a PnP OS" or the
  like in the BIOS's CMOS.  Then each time the BIOS starts up (before
  the Linux OS is loaded) it should configure things this way.  If the
  BIOS detects a new PnP card which is not in the ESCD, then it must
  allocate bus-resources to the card and update the ESCD.  It may even
  have to change the bus-resources assigned to existing PnP cards and
  modify the ESCD accordingly.

  If each device saved its last configuration in its hardware, hardware
  configuring wouldn't be needed each time you start your PC.  But it
  doesn't work this way.  So all the ESCD data needs to be kept correct
  if you use the BIOS for PnP.  There are some BIOSs that don't have an
  ESCD but do have some non-volatile memory to store info on which bus-
  resources have been reserved for use by non-PnP cards.  Many BIOSs
  have both.


  5.3.3.  Using Windows to set the ESCD

  If the BIOS doesn't set up the ESCD the way you want it (or the way it
  should be) then it would be nice to have a Linux utility to set the
  ESCD.  As of early 1999 there isn't any.  Thus one may resort to
  attempting to use Windows (if you have it on the same PC) to do this.

  There are three ways to use Windows to try to set/modify the ESCD.
  One way is to use the ICU utility designed for DOS or Windows 3.x.  It
  should also work OK for Windows 9x/2k ??  Another way is to set up
  devices manually ("forced") under Windows 9x/2k so that Windows will
  put this info into the ESCD when Windows is shut down normally.  The
  third way is only for legacy devices that are not plug-and-play.  If
  Windows knows about them and what bus-resources they use, then Windows
  should put this info into the ESCD.

  If PnP devices are configured automatically by Windows without the
  user "forcing" it to change settings, then such settings probably will
  not make it into the ESCD.  Of course Windows may well decide on its
  own to configure the same as what is set in the ESCD so they could
  wind up being the same by coincidence.

  Windows 9x are PnP operating systems and automatically PnP-configure
  devices.  They maintain their own PnP-database deep down in the
  Registry (stored in binary Windows files).  There is also a lot of
  other configuration stuff in the Registry besides PnP-bus-resources.
  There is both a current PnP resource configuration in memory and
  another (perhaps about the same) stored on the hard disk.  To look at
  (the one in memory?) this indirectly in Windows98 or to force changes
  you use the Device Manager.

  In Windows98 there are 2 ways to get to the Device Manager: 1. My
  Computer --> Control Panel --> System Properties --> Device Manager.
  2. (right-click) My Computer --> Properties --> Device Manager.  Then
  in Device Manager you select a device (sometimes a multi-step process
  if there are a few devices of the same class).  Then click on
  "Properties" and then on "Resources".  To attempt to change the
  resource configuration manually, uncheck "Use automatic settings" and
  then click on  "Change Settings".  Now try to change the setting, but
  it may not let you change it.  If it does let you, you have "forced" a
  change.  A message should inform you that it's being forced.  If you
  want to keep the existing setting shown by Windows but make it
  "forced" then you will have to force a change to something else and
  then force it back to its original setting.

  To see what has been "forced" under Windows98 look at the "forced
  hardware" list: Start --> Programs --> Accessories --> System Tools
  --> System Information --> Hardware Resources --> Forced Hardware.
  When you "force" a change of bus-resources in Windows, it should put
  your change into the ESCD (provided you exit Windows normally).  >From
  the "System Information" window you may also inspect how IRQs and IO
  ports have been allocated under Windows.

  Even if Windows shows no conflict of bus-resources, there may be a
  conflict under Linux.  That's because Windows may assign bus-resources
  differently than the ESCD does.  In the the rare case where all
  devices under Windows are either legacy devices or have been "forced",
  then Windows and the ESCD configurations should be identical.


  5.3.4.  Adding a New Device (under Linux or Windows)

  If you add a new PnP device and have the BIOS set to "not a PnP OS",
  then the BIOS should automatically configure it and store the
  configuration in ESCD.  If it's a non-PnP legacy device (or one made
  that way by jumpers, etc.) then there are a few options to handle it.

  You may be able to tell the BIOS directly (via the CMOS setup menus)
  that certain bus-resources it uses (such as IRQs) are reserved and are
  not to be allocated by PnP.  This does not put this info into the
  ESCD.  But there may be a BIOS menu selection as to whether or not to
  have these CMOS choices override what may be in the ESCD in case of
  conflict.  Another method is to run ICU under DOS/Windows.  Still
  another is to install it manually under Windows 9x/2k and then make
  sure its configuration is "forced" (see the previous section).  If
  it's "forced" Windows should update the ESCD when you shut down the
  PC.


  5.4.  Isapnp (part of isapnptools)

  Unfortunately, much of the documentation for isapnp is still difficult
  to understand unless you know the basics of PnP.  This HOWTO should
  help you understand it as well the FAQ that comes with it.  isapnp is
  only for PnP devices on the ISA bus (non-PCI).  Running the Linux
  program "isapnp" at boot-time will configure such devices to the
  resource values specified in /etc/isapnp.conf.  Its possible to create
  this configuration file automatically but you then must edit it
  manually to choose between various options.  With isapnp, a device
  driver which is part of the kernel may run too early before isapnp has
  set the address, etc. in the hardware.  This results in the device
  driver not being able to find the device.  The driver tries the right
  address but the address hasn't been set yet in the hardware.

  If your Linux distribution automatically installed isapnptools, isapnp
  may already be running at startup.  In this case, all you need to do
  is to edit /etc/isapnp.conf per "man isapnp.conf".  Note that this is
  like manually configuring PnP since you make the decisions as to how
  to configure as you edit the configuration file.  You can use the
  program "pnpdump" to help create the configuration file.  It almost
  creates a configuration file for you but you must skillfully edit it a
  little before using it.  It contains some comments to help you edit
  it.  If you use "isapnp" for configuring and have a PnP BIOS, you
  should probably tell the BIOS (when you set it up) that you don't have
  a PnP OS since you may want the BIOS to configure the PCI devices.
  While the BIOS may also configure the ISA devices, isapnp will redo
  it.

  The terminology used in the /etc/isapnp.conf file may seem odd at
  first.  For example for an I0 address of 0x3e8 you might see "(IO 0
  (BASE 0x3e8))" instead.  The "IO 0" means this is the first (0th) IO
  address-range that this device uses.   Another way to express all this
  would be: "IO[0] = 0x3e8" but isapnp doesn't do it this way.  "IO 1"
  would mean that this is the second IO address range used by this
  device, etc.  "INT 0" has a similar meaning but for IRQs (interrupts).
  A single card may contain several physical devices but the above
  explanation was for just one of these devices.


  5.5.  PCI Utilities

  The package PCI Utilities (= pciutils, incorrectly called "pcitools"),
  should let you manually PnP-configure the PCI bus.  "lspci" or
  "scanpci" (Xwindows) lists bus-resources while "setpci" sets resource
  allocations in the hardware devices.  It appears that setpci is mainly
  intended for use in scripts and presently one needs to know the
  details of the PCI configuration registers in order to use it.  That's
  a topic not explained here nor in the manual page for setpci.


  5.6.  Patch the Kernel to Make Linux PnP

  David Howells has created a patch to do this called "Linux Kernel
  Configuration/Resource Manager" (sometimes called Hardware
  Configuration Manager).  In late 1999 the patch was not available at
  his website.  This may mean there is no patch available for recent
  versions of the kernel.

  For previous patches the resulting kernel was claimed to be stable but
  bugs have been reported.  The patch included documentation such as
  serial.txt to show how to deal with the serial port.  It provided
  "files" in the /proc tree so that you can see what is going on and can
  echo commands into one of these files for custom configuration.  One
  problem is that most device drivers don't know about it so that you
  still had to use the traditional configuration files, etc. for
  configuration.  The webpage for it is  <http://www.astarte.free-
  online.co.uk>


  5.7.  Windows Configures

  If you have Windows9x (or 2k) on the same PC, then just start Windows
  and let it configure PnP.  Then start Linux from Windows (or DOS).
  But there may be a problem with IRQs for PCI devices.  As Windows
  shuts down to make way for Linux, it may erase (zero) the IRQ which is
  stored in one of the PCI device's configuration registers.  Linux will
  complain that it has found an IRQ of zero.

  The above is reported to happen if you start Linux using a shortcut
  (PIF file).  But a workaround is reported where you still use the
  shortcut PIF.  A shortcut is something like a symbolic link in Linux
  but it's more than that since it may be "configured".  To start Linux
  (from DOS you create a batch file (script) which starts Linux.  (The
  program that starts Linux is in the package called "loadlin").  Then
  create a PIF shortcut to that batch file and get to the "Properties"
  dialog box for the shortcut.  Select "Advanced" and then check "MS-DOS
  mode" to get it to start in genuine MS-DOS.

  Now here's the trick to prevent zeroing the PCI IRQs.  Check "Specify
  a new MS-DOS configuration".  Then either accept the default
  configuration presented to you or click on "Configuration" to change
  it.  Now when you start Linux by clicking on the shortcut, new
  configuration files (Config.sys and Autoexec.bat) will be created per
  your new configuration.  The old files are stored as "Config.wos and
  Autoexec.wos".  Windows would normally restore these files to their
  original names if Windows were to be entered again and shut down.  But
  after Linux boots you don't get back to Windows again so you should
  enter commands in the batch file to rename these files to their *.bat
  and *.sys names.  Put the renaming commands into the batch file before
  the line that loads Linux.  This will permit Windows (and not Linux)
  to start the next time the PC is powered on.

  Also it's reported that you should click on the "General" tab (of the
  "Properties" dialog) and check "Read-only".  Otherwise Windows may
  reset the "Advanced Settings" to "Use current MS-DOS configuration"
  and PCI IRQs get zeroed.  Thus Windows erases the IRQs when you use
  the current MS-DOS configuration but doesn't erase when you use a new
  configuration (which may actually configure things identical to the
  old configuration).  Windows does not seem to be very consistent.


  5.8.  Device Driver Configures

  A few device drivers will use PnP methods to set the bus-resources in
  the hardware but only for the device that they control.  Since the
  driver has done the configuring, it obviously knows the configuration
  and there is no need for you to tell it this info.

  The problem with this is twofold.  It's difficult to incorporate all
  of this into the driver, and the driver may grab bus-resources that
  are needed by other devices.  It does make it easy for the user but a
  PnP Linux kernel might be better.  See ``Linux Needs to Cope Better
  with PnP''.


  5.9.  PnP Software/Documents


    Isapnptools homepage <http://www.roestock.demon.co.uk/isapnptools/>

    Patch to  make the Linux kernel PnP <http://www.astarte.free-
     online.co.uk>

    PnP driver project <http://www.io.com/~cdb/mirrors/lpsg/pnp-
     linux.html>

    PnP Specs. from Microsoft
     <http://www.microsoft.com/hwdev/respec/pnpspecs.htm>

    Book: PCI System Architecture, 3rd ed. by Tom Shanley +, MindShare
     1995.  Covers PnP-like features on the PCI bus.

    Book: Plug and Play System Architecture, by Tom Shanley, Mind Share
     1995.  Details of PnP on the ISA bus.  Only a terse overview of PnP
     on the PCI bus.

    Book: Programming Plug and Play, by James Kelsey, Sams 1995.
     Details of programming to communicate with a PnP BIOS.  Covers ISA,
     PCI, and PCMCIA buses.



  6.  Tell the Driver the Configuration

  6.1.  Introduction

  Just how this is done depends upon the driver.  Some drivers have more
  than one way to find out how their physical device is configured.  At
  one extreme is the case where you must hard-code the bus-resources
  into the kernel and recompile.  At the other extreme, the driver does
  everything automatically and you have nothing to do.  It may even set
  the bus-resources in the hardware using PnP methods.

  In the middle are cases where you run a program to give the resource
  info to the driver or put the info in a file.  In some cases the
  driver may probe for the device at addresses where it suspects the
  device resides.  It may then try to test various IRQs to see which one
  works.   It may or may not automatically do this.  In other cases the
  driver may use PnP methods to find the device and how the bus-
  resources have been set, but will not actually set them.  It may also
  look in some of the files in the /proc directory.

  One may need to give the bus-resources as a parameter to the kernel to
  to a loadable module.  See /usr/lib/modules_help/descr.gz for a list
  of possible parameters.  The module to load is listed in /etc/modules
  along with its parameters.  In some other case the bus-resources may
  be given as parameters to the kernel.  These are put into the
  lilo.conf file as append="...".   Then the lilo program must be run to
  save this in the kernel boot code.

  While there is great non-uniformity about how drivers find out about
  bus-resources, the end goal is the same.  There are so many different
  hardware devices and drivers for them that you may need to look at
  documentation for your driver to find out how it finds out about bus-
  resources and what you need to do to insure that it gets the info it
  needs.  Some brief info on a few drivers is presented in the following
  section.


  6.2.  Serial Port Driver: setserial

  For the standard serial port driver (not for multiport cards) you use
  setserial to configure the driver.  It is often run from a start-up
  file.  In newer versions there is a /etc/serial.conf file that you
  "edit" by simply using the setserial command in the normal way and
  what you set using setserial is saved in the serial.conf configuration
  file.  The serial.conf file should be consulted when the setserial
  command runs from a start-up file.  Your distribution may or may not
  set this up for you.

  There are two different ways to use setserial depending on the options
  you give it.  One way is used to manually tell the driver the
  configuration.  The other way is to probe at a given address and
  report if a serial port exists there.  It can also probe this address
  and try to detect what IRQ is used for this port.  The driver runs
  something like setserial at start-up but it doesn't probe for IRQs, it
  just assigns the "standard" IRQ which may be wrong.  It does probe for
  the existence of a port.  See Serial-HOWTO for more details.


  6.3.  Sound Card Drivers

  6.3.1.  OSS-Lite

  You must give the IO, IRQ, and DMA as parameters to a module or
  compile them into the kernel.  But some PCI cards will get
  automatically detected (likely by using the lspci command or the
  like).  RedHat supplies a program "sndconfig" which detects ISA PnP
  cards and automatically sets up the modules for loading with the
  detected bus-resources.


  6.3.2.  OSS (Open Sound System) and ALSA

  These will detect the card by PnP methods and then select the
  appropriate driver and load it.  It will also set the bus-resources on
  an ISA-PnP card.  You may need to manually intervene to avoid
  conflicts.  For the ALSA driver, support for ISA-PnP is optional and
  you may use isapnp tools if you want to.


  7.  What Is My Current Configuration?

  Here "configuration" means the assignment of PnP bus-resources
  (addresses, IRQs, and DMAs).  There are two parts to this question for
  each device.  Each part should have the same answer.

  1. What is the configuration of the device driver software?  I.e.:
     What does the driver think the hardware configuration is?

  2. What configuration (if any) is set in the device hardware?

  Of course the configuration of the device hardware and its driver
  should be the same (and it normally is).  But if things are not
  working right, there may be a difference.  This means the the driver
  has incorrect information about the actual configuration of the
  hardware.  This spells trouble.  If the software you use doesn't
  adequately tell you what's wrong (or automatically configure it
  correctly) then you need to investigate how your hardware devices and
  their drivers are configured.  While Linux device drivers should "tell
  all" in some cases it's not easy to determine what has been set in the
  hardware.

  Another problem is that when you view configuration messages on the
  screen, it's sometimes not clear whether the reported configuration is
  that of the device driver, the device hardware, or both.  If the
  device driver is assigned a configuration and then checks the hardware
  out to see if it's configured the same, then the configuration
  reported by the driver should be that of both the hardware and the
  driver.

  But some drivers which don't do this may accept a configuration that
  doesn't check out.  For example, "setserial" will accept a
  configuration that doesn't check out (even if you've told it to probe
  for bus-resources).  Thus "setserial" may only be telling you the
  configuration of the driver and not the hardware.


  7.1.  Boot-time Messages

  Some info on configuration may be obtained by reading the messages
  from the BIOS and Linux that appear on the screen when you first start
  the computer.  These messages often flash by too fast to read but once
  they stop type Shift-PageUp a few times to scroll back to them.  To
  scroll forward thru them type Shift-PageDown.  Typing "dmesg" at any
  time to the shell prompt will show only the Linux kernel messages and
  miss some of the most important ones (including ones from the BIOS).
  The messages from Linux may sometimes only show what the device driver
  thinks the configuration is, perhaps as told it via an incorrect
  configuration file.

  The BIOS messages will show the actual hardware configuration at that
  time, but a PnP OS, isapnp, or pci utilities, may change it later.
  The BIOS messages are displayed first before the ones from Linux.  As
  an alternative to eventually using Shift-PageUp to read them, try
  freezing them by hitting the "Pause" key.  Press any key to resume.
  But once the messages from Linux start to appear, it's too late to use
  "Pause" since it will not freeze the messages from Linux.


  7.2.  How Are My Device Drivers Configured?

  There may be a programs you can run from the command line (such as
  "setserial" for serial ports) to determine this.   The /proc directory
  tree is useful.  /proc/ioports shows the I/O addresses that the
  drivers use (or try if it's wrong).  They might not be set this way in
  hardware.

  /proc/interrupts shows only interrupts currently in use.  Many
  interrupts that have been allocated to drivers don't show at all since
  they're not currently being used.  For example, even though your
  floppy drive has a floppy disk in it and is ready to use, the
  interrupt for it will not show unless its in use.  Again, just because
  an interrupt shows up here doesn't mean that it exists in the
  hardware.  A clue that it doesn't exist in hardware will be if it
  shows that 0 interrupts have been issued by this interrupt.  Even if
  it shows some interrupts have been issued there is no guarantee that
  they came from the device shown.  It could be that some other device
  which is not currently in use has issued them.  A device not in use
  (per the kernel) may still issue some interrupts for various reasons.


  7.3.  How Are My Hardware Devices Configured?

  It's easy to find out what bus-resources have been assigned to devices
  on the PCI bus with the "lspci" or "scanpci" commands.  For for
  kernels < 2.2: see /proc/pci or /proc/bus/pci for later kernels.  Note
  that IRQs for /proc/pci are in hexadecimal.  Don't bother trying to
  decipher /proc/bus/pci/devices since "lspci" will do that for you.

  For the ISA bus you may try running pnpdump --dumpregs but it's not a
  sure thing.  The results may be seem cryptic but they can be
  deciphered.  Don't confuse the read-port address which pnpdump "tries"
  (and finds something there) with the I/O address of the found device.
  They are not the same.  To try to find missing hardware on the ISA bus
  (both PnP and legacy) try the program "scanport" but be warned that it
  might hang your PC.  It will not show the IRQ nor will it positively
  identify the hardware.

  Messages from the BIOS at boot-time tell you how the hardware
  configuration was then.  If you rely on the BIOS for configuring, then
  it should still be the same.  Messages from Linux may be from drivers
  that have checked to see that the hardware is there (and possibly
  checked the IRQ and DMA).  Of course, if the device works fine, then
  it's likely configured the same as the driver.


  8.  Appendix

  8.1.  Addresses

  There are three types of addresses: main memory addresses, I/O
  addresses and configuration addresses.  On the PCI bus, configuration
  addresses constitute a separate address space just like I/O addresses
  do.  Except for the complicated case of ISA configuration addresses,
  whether or not an address on the bus is a memory address, I/O address,
  or configuration address depends only on the voltage on other wires
  (traces) of the bus.


  8.1.1.  ISA Bus Configuration Address (Read-Port etc.)

  For the ISA bus, there is technically no configuration address space,
  but there is a special way for the CPU to access PnP configuration
  registers on the PnP cards.  For this purpose 3 @ I/O addresses are
  allocated.  This is not 3 addresses for each card but 3 addresses
  shared by all cards.

  These 3 addresses are named read-port, write-port, and address-port.
  Each port is just one byte in size.  Each PnP card has many
  configuration registers so that just 3 addresses are not even
  sufficient for these registers on a single card.  To communicate with
  a certain card, a specially-assigned card number (handle) is sent to
  all cards at the write-port address.  After that the only card still
  listening is the card with this handle.  Then the address of the
  configuration register (of that card) is sent to the address-port (of
  all cards --but only one is listening).  Next communication takes
  place with one configuration register on that card by either doing a
  read on the read-port or a write on the write-port.

  The write-port is always at A79 and the address-port is always at 279
  (hex).  But the read-port is not fixed but is set by the configuration
  software at some address that will supposedly not conflict with any
  other ISA card.  If there is a conflict, it will change the address.
  All PnP cards get "programmed" with this address.  Thus if you use say
  isapnp to set or check configuration data it must determine this read-
  port address.


  8.1.2.  Address ranges

  The term "address" is sometimes used in this document to mean a
  contiguous range of addresses.  Since addresses are given in bytes, a
  single address only contains one byte but I/O (and main memory)
  addresses need more than this.  So a range of say 8 bytes is often
  used for I/O address while the range for main memory addresses
  allocated to a device is much larger.  For a serial port (an I/O
  device) it's sufficient to give the starting I/O address of the device
  (such as 3F8) since it's well known that the range of addresses for
  serial port is only 8 bytes.  The starting address is known as the
  "base address".


  8.1.3.  Address space

  For ISA, to access both I/O and (main) memory address "spaces" the
  same address bus is used (the wires used for the address are shared).
  How does the device know whether or not an address which appears on
  the address bus is a memory address or I/O address?  Well, there are 4
  dedicated wires on the bus that convey this information and more.  If
  a certain one of these 4 wires is asserted, it says that the CPU wants
  to read from an I/O address, and the main memory ignores the address
  on the bus.  The other 3 wires serve similar purposes.  In summary:
  Read and write wires exist for both main memory and I/O addresses (4
  wires in all).

  For the PCI bus it's the same basic idea also using 4 wires but it's
  done a little differently.  Instead of only one or the four wires
  being asserted, a binary number is put on the wires (16 different
  possibilities).  Thus more info may be conveyed.   Four of these 16
  numbers serve the I/O and memory spaces as in the above paragraph.  In
  addition there is also configuration address space which uses up two
  more numbers.  Ten extra numbers are left over for other purposes.



  8.1.4.  Range Check (ISA Testing for IO Address Conflicts)

  On the ISA bus, there's a method built into each PnP card for checking
  that there are no other cards that use the same address.  If two or
  more cards use the same IO address, neither card is likely to work
  right (if at all).  Good PnP software should assign bus-resources so
  as to avoid this conflict, but even in this case a legacy card might
  be lurking somewhere with the same address.

  The test works by a card putting a test number in its own IO
  registers.  Then the PnP software reads it and verifies that it reads
  the same test number.  If not, something is wrong (such as another
  card with the same address.  It repeats the same test with another
  test number.  Since it actually checks the range of IO addresses
  assigned to the card, it's called a "range check".  It could be better
  called an address-conflict test.  If there is an address conflict you
  get an error message and need to resolve it yourself.


  8.1.5.  Communicating Directly via Memory

  Traditionally, most I/O devices used only I/O memory to communicate
  with the CPU.  For example, the serial port does this.  The device
  driver, running on the CPU would read and write data to/from the I/O
  address space and main memory.  A faster way would be for the device
  itself to put the data directly into main memory.  One way to do this
  is by using ``DMA Channels'' or bus mastering.  Another way is to
  allocate some space in main memory to the device.  This way the device
  reads and writes directly to main memory without having to bother with
  DMA or bus mastering.  Such a device may also use IO addresses.


  8.2.  Interrupts --Details

  Interrupts convey a lot of information but only indirectly.  The
  interrupt signal (a voltage on a wire) just tells a chip called the
  interrupt controller that a certain device needs attention.  The
  interrupt controller then signals the CPU.  The CPU finds the driver
  for this device and runs a part of it known as an "interrupt service
  routine" (or "interrupt handler").  This "routine" tries to find out
  what has happened and then deals with the problem such as transferring
  bytes from (or to) the device.   This program (routine) can easily
  find out what has happened since the device has registers at addresses
  known to the the driver software (provided the IRQ number and the I/O
  address of the device has been set correctly).  These registers
  contain status information about the device .  The software reads the
  contents of these registers and by inspecting the contents, finds out
  what happened, and takes appropriate action..

  Thus each device driver needs to know what interrupt number (IRQ) to
  listen to.  On the PCI bus (and for the serial ports on the ISA bus
  starting with Kernel 2.2) it's possible for two (or more) devices to
  share the same IRQ number.  When such an interrupt is issued, the CPU
  runs all interrupt service routines for all devices using that
  interrupt.  The first thing the first service routine does is to check
  the device registers to see if an interrupt actually happened for its
  device.  If it finds that its device didn't issue an interrupt (a
  false alarm) it likely will immediately exit and the next service
  routine starts, etc.


  8.3.  PCI Interrupts

  PCI interrupts are different but since they are normally mapped to
  IRQ's they behave in about the same way.  A major difference is that
  PCI interrupts may be shared.  For example IRQ5 may be shared between
  two PCI devices.  This sharing ability is automatic: you don't need
  special hardware or software.  There have been some reports of
  situations where such sharing didn't work, but it's likely due to a
  defect in the device driver software.  All device drivers for PCI
  devices are supposed to provide for interrupt sharing.  Note that you
  can't share the same interrupt between the PCI and ISA bus.  However,
  illegal sharing will work provided the devices which are in conflict
  are not in use at the same time.  "In use" here means that a program
  is running which "opened" the device in its C programming code.

  You may need to know some of the details of the PCI interrupt system
  in order to set up the BIOS's CMOS or to set jumpers on old PCI cards.
  Each PCI card has 4 possible interrupts: INTA#, INTB#, INTC#, INTD#.
  Thus for a 7-slot system there could be 7 x 4 = 28  different
  interrupt lines.  But the specs permit a fewer number of interrupt
  lines.  This is not too restrictive since interrupts may be shared.
  Many PCI buses seem to be made with only 4 interrupt lines.  Call
  these lines (wires or traces) W, X, Y, Z.  Suppose we designate the B
  interrupt from slot 3 as interrupt 3B.  Then wire W could be used to
  share interrupts 1A, 2B, 3C, 4D, 5A, 6B, 7C.  This is done by
  physically connecting wire W to wires 1A, 2B, etc.  Likewise wire X
  could be connected to wires 1B, 2C, 3D, 4A, 5B, 6C, 7D.  Then on
  startup, the BIOS maps the X, W, Y, Z to IRQ's.  After that it writes
  the IRQ that each device is mapped to into a hardware register in each
  device.  Then and anything interrogating the device can find out what
  IRQ it uses.

  The above mentioned wires X, W, Y, Z  are labeled per PCI specs as
  INTA#, INTB#, INTC# and INTD#.  This official PCI notation is
  confusing since now INTA# has 2 possible meanings depending on whether
  we are talking about a slot or the PCI bus.  For example, if 3C is
  mapped to X then we say that INTC# of slot 3 is cabled to INTA# (X) of
  the PCI bus.  Confusing notation.

  There's another requirement also.  A PCI slot must use the lower
  interrupt letters first.  Thus if a slot only uses one interrupt, it
  must be INTA#.  If it uses 2 interrupts they must be INTA# and INTB#,
  etc.  A card in a slot may have up to 8 devices on it but there are
  only 4 PCI interrupts for it.  This is OK since interrupts may be
  shared so that each of the 8 devices (if they exist) can have an
  interrupt.  The PCI interrupt letter of a device is often fixed and
  hardwired into the device.

  The BIOS assigns IRQs (interrupts) so as to avoid conflicts with the
  IRQs it knows about on the ISA bus.  Sometimes in the CMOS BIOS menu
  one may assign IRQs to PCI cards (but it's not simple as explained
  above).  There's a situation where Windows zeroed out all the IRQ
  numbers in the PCI cards after the IRQ mappings had been set.  Then
  someone running Windows booted Linux from Windows with the result that
  Linux only found only incorrect IRQs of zero.

  You might reason that since the PCI is using IRQ's (ISA bus) it might
  be slow, etc.  Not really.  The ISA Interrupt Controller Chip(s) has a
  direct interrupt wire going to the CPU so it can get immediate
  attention.  While signals on the ISA address and data buses need to go
  thru the PCI bus to get to the CPU, the IRQ interrupt signals go there
  almost directly.


  8.4.  Isolation

  This is only for the ISA bus.  Isolation is a complex method of
  assigning a temporary handle (id number or Card Select Number = CSN)
  to each PnP device on the ISA bus.  Since there are more efficient
  (but more complex) ways to do this, some might claim that it's a
  simple method.  Only one write address is used for PnP writes to all
  PnP devices so that writing to this address goes to all PnP device
  that are listening.  This write address is used to send (assign) a
  unique handle to each PnP device.  To assign this handle requires that
  only one device be listening when the handle is sent (written) to this
  common address.  All PnP devices have a unique serial number which
  they use for the process of isolation.  Doing isolation is something
  like a game.  It's done using the equivalent of just one common bus
  wire connecting all PnP devices and the isolation program.

  For the first round of the "game" all PnP devices listen on this wire
  and send out simultaneously a sequence of bits to the wire.  The
  allowed bits are either a 1 (positive voltage) or an "open 0" of no
  voltage (open circuit or tri-state).  Each PnP device just starts to
  sequentially send out its serial number, bit-by-bit, starting with the
  high-order bit, on this wire.  If any device sends a 1, a 1 will be
  heard on the wire by all other devices.  If all devices send an "open
  0" nothing will be heard on the wire.  The object is to eliminate (by
  the end of this first round) all but highest serial number device.
  "Eliminate" means to cease to listen anymore to the write address that
  all devices still in the game are still listening to.  This is also
  called "dropping out".  (Note that all serial numbers are of the same
  length.)

  First consider only the high order bit of the serial number which is
  put on the wire first by all devices which have no handle yet.  If any
  PnP device sends out a 0 (open 0) but hears a 1, this means that some
  other PnP device has a higher serial number, so it temporarily drops
  out of this round and doesn't listen anymore until the round is
  finished (when a handle is assigned to the winner: the highest serial
  number).  Now the devices still in the game all have the same leading
  digit (a 1) so we may strip off this digit and consider only the
  resulting "stripped serial number" for future participation in this
  round.  Then go to the start of this paragraph and repeat until the
  entire serial number has been examined for each device (see below for
  the all-0 case).

  Thus it's clear that the highest serial number will not be eliminated
  from the game.  But what happens if the leading digits (of the
  possibly stripped serial numbers) are all 0?  In this case an "open 0"
  is sent on the line and all participants stay in the game.  If they
  all have a leading 0 then this is a tie and the 0's are stripped off
  just like the 1's were in the above paragraph.  The game then
  continues as the next digit (of the serial number) is sent out.

  At the end of the round (after the low-order bit of the serial number
  has been sent out by whatever participants remain) only one PnP device
  with the highest serial number remains.  It then gets assigned a
  handle and drops out of the game permanently.  Then all the dropouts
  from the last round (that don't have a handle yet) reenter the game
  and a new round begins with one less participant.  Eventually, all PnP
  devices are assigned handles.  It's easy to prove that this algorithm
  works.

  Once all handles are assigned, they are used to address each PnP
  device and send it a configuration as well as to read configuration
  info from the PnP device.  Note that these handles are only used for
  PnP configuration and are not used for normal communication with the
  PnP device.  When the computer starts up, all of the handles are lost
  so that a PnP BIOS usually does the isolation process again each time
  you start your PC.

  END OF Plug-and-Play-HOWTO



  Database-SQL-RDBMS HOW-TO document for Linux (PostgreSQL
  Object Relational Database System)
  Al Dev (Alavoor Vasudevan)        alavoor@yahoo.com
  v28.0, 10 July 2000

  This document is a "practical guide" to very quickly setup a SQL
  Database engine and front end tools on a Unix system. It also dis
  cusses the International standard language ANSI/ISO SQL and reviews
  the merits/advantages of the SQL database engine developed by the
  world-wide internet in an "open development" environment.  It is about
  HOW-TO setup a next generation Object Relational SQL Database "Post
  greSQL" on Unix system which can be used as a Application Database
  Server or as a Web Database Server. PostgreSQL attempts to implement
  current and future International ISO/ANSI SQL standards. This document
  also gives information on the database interface programs like Front
  End GUIs, RAD tools (Rapid Application Development), ODBC, JDBC
  drivers, "C", "C++", Java, Perl programming interfaces and Web
  Database Tools.  Information given here applies to all Unix/Windows NT
  platforms and to all other SQL databases. It will be very useful for
  people who are new to Databases, SQL language and PostgreSQL.  This
  document also has SQL tutorial, SQL syntax which would be very helpful
  for beginners. Experienced people will find this document as a useful
  reference guide. For students, the information given here will enable
  them to get the source code for PostgreSQL relational database system,
  from which they can learn as to how a RDBMS SQL database engine is
  created.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

  2. Laws of Physics apply to Software!

  3. What is PostgreSQL ?

     3.1 White Paper

  4. Which one? PostgreSQL or MySQL ?

  5. Where to get it ?

  6. PostgreSQL Quick-Installation Instructions

     6.1 Install and Test
     6.2 PostgreSQL RPMs
     6.3 Maximum RPM
     6.4 Examples RPM
     6.5 Testing PyGreSQL - Python interface
     6.6 Testing Perl - Perl interface
     6.7 Testing libpq, libpq++ interfaces
     6.8 Testing Java interfaces
     6.9 Testing ecpg interfaces
     6.10 Testing SQL examples - User defined types and functions
     6.11 Testing Tcl/Tk interfaces
     6.12 Testing ODBC interfaces
     6.13 Testing MPSQL Motif-worksheet interfaces
     6.14 Verification
     6.15 Emergency Bug fixes

  7. Quick Start Guide

     7.1 Creating, Dropping, Renaming Database
     7.2 Creating, Dropping users
     7.3 Creating, Dropping Groups
     7.4 Create, Edit, Drop a table
     7.5 Create, Edit, Drop records in a table
     7.6 Switch active Database
     7.7 Backup and Restore database
     7.8 Security of database
     7.9 Online help
     7.10 PostgreSQL Documentation

  8. PostgreSQL Supports Extremely Large Databases greater than 200 Gig

  9. How can I trust PostgreSQL ? Regression Test Package builds customer confidence

  10. Security of Database

     10.1 User Authentication
     10.2 Host-Based Access Control
     10.3 Authentication Methods
     10.4 Access Control
     10.5 Secure TCP/IP Connection via SSH
     10.6 Kerberos Authentication

  11. GUI FrontEnd Tool for PostgreSQL (Graphical User Interface)

  12. Interface Drivers for PostgreSQL

     12.1 ODBC Drivers for PostgreSQL
     12.2 UDBC Drivers for PostgreSQL
     12.3 JDBC Drivers for PostgreSQL
     12.4 Java for PostgreSQL

  13. Perl Database Interface (DBI) Driver for PostgreSQL
     13.1 Perl 5 interface for PostgreSQL
     13.2 Perl Database Interface DBI
        13.2.1 WHAT IS DBI ?
        13.2.2 DBI driver for PostgreSQL DBD-Pg-0.89
        13.2.3 Technical support for DBI
        13.2.4 What is DBI, DBperl, Oraperl and *perl?
        13.2.5 DBI specifications
        13.2.6 Compilation problems or "It fails the test"
        13.2.7 Is DBI supported under Windows 95 / NT platforms?
        13.2.8 Is DBI any use for CGI programming?
        13.2.9 How do I get faster connection times with DBD Oracle and CGI?
        13.2.10 How do I get persistent connections with DBI and CGI?
        13.2.11 ``When I run a perl script from the command line, it works, but, when I run it under the httpd, it fails!'' Why?
        13.2.12 Multi-threading with DBI?
        13.2.13 How can I invoke stored procedures with DBI?
        13.2.14 How can I get return values from stored procedures with DBI?
        13.2.15 How can I create or drop a database with DBI?
        13.2.16 How are NULL values handled by DBI?
        13.2.17 What are these func methods all about?
        13.2.18 Commercial Support and Training
     13.3 Testing Perl interface

  14. PostgreSQL Management Tools

     14.1 PGACCESS - A GUI Tool for PostgreSQL Management
     14.2 Windows Interactive Query Tool for PostgreSQL (WISQL or MPSQL)
     14.3 Interactive Query Tool (ISQL) for PostgreSQL called PSQL
     14.4 MPMGR - A Database Management Tool for PostgresSQL

  15. CPUs for PostgreSQL

  16. Setting up multi-boxes PostgreSQL with just one monitor

  17. Web-Application-Servers for PostgreSQL

     17.1 Lutris Corp "Enhydra"
     17.2 Zope

  18. Applications and Tools for PostgreSQL

     18.1 PostgreSQL 4GL for web database applications - AppGEN Development System
     18.2 WWW Web interface for PostgresSQL - DBENGINE
     18.3 Apache Webserver Module for PostgreSQL - NeoSoft NeoWebScript
     18.4 HEITML server side extension of HTML and a 4GL language for PostgreSQL
     18.5 America On-line AOL Web server for PostgreSQL
     18.6 Problem/Project Tracking System Application Tool for PostgreSQL
     18.7 Convert dbase dbf files to PostgreSQL
     18.8 Convert Microsoft Access MDB database files to PostgreSQL

  19. Web Database Design/Implementation tool for PostgreSQL - EARP

     19.1 What is EARP ?
     19.2 Implementation
     19.3 How does it work ?
     19.4 Where to get EARP ?

  20. PHP Hypertext Preprocessor - Server-side html-embedded scripting language for PostgreSQL

     20.1 Major Features
     20.2 PHP - Brief History
     20.3 So, what can I do with PHP ?
     20.4 A simple example
     20.5 CGI Redirection
        20.5.1 Apache 1.0.x Notes
        20.5.2 Netscape HTTPD
        20.5.3 NCSA HTTPD
     20.6 Running PHP from the command line
     20.7 PHPGem package

  21. Python Interface for PostgreSQL

     21.1 Where to get PyGres ?
     21.2 Information and support
     21.3 Testing Python interface

  22. Gateway between PostgreSQL and the WWW - WDB-P95

     22.1 About wdb-p95
     22.2 Does the PostgreSQL server, pgperl, and httpd have to be on the same host?

  23. "C", "C++", ESQL/C language Interfaces and Bitwise Operators for PostgreSQL

     23.1 "C" interface
     23.2 "C++" interface
     23.3 ESQL/C
     23.4 BitWise Operators for PostgreSQL

  24. Japanese Kanji Code for PostgreSQL

  25. PostgreSQL Port to Windows 95/Windows NT

     25.1 Authors of NT port
     25.2 Install the Cygwin package
     25.3 Tuneup Bash Window
     25.4 Install the Andy Piper tools
     25.5 Install Ludovic Lange's Cygwin32 IPC package
     25.6 Install PostgreSQL

  26. Mailing Lists

     26.1 E-mail account for PostgreSQL
     26.2 English Mailing List
     26.3 Archive of Mailing List
     26.4 Spanish Mailing List

  27. Documentation and Reference Books

     27.1 User Guides and Manuals
     27.2 Online Documentation
     27.3 Useful Reference Textbooks
     27.4 ANSI/ISO SQL Specifications documents  - SQL 1992, SQL 1998
     27.5 Syntax of ANSI/ISO SQL 1992
     27.6 Syntax of ANSI/ISO SQL 1998
     27.7 SQL Tutorial for beginners
     27.8 Temporal Extension to SQL92
     27.9 Part 0 - Acquiring ISO/ANSI SQL Documents
     27.10 Part 1 - ISO/ANSI SQL Current Status
     27.11 Part 2 - ISO/ANSI SQL Foundation
     27.12 Part 3 - ISO/ANSI SQL Call Level Interface
     27.13 Part 4 - ISO/ANSI SQL Persistent Stored Modules
     27.14 Part 5 - ISO/ANSI SQL/Bindings
     27.15 Part 6 - ISO/ANSI SQL XA Interface Specialization (SQL/XA)
     27.16 Part 7 - ISO/ANSI SQL Temporal
        27.16.1 INTRODUCTION
        27.16.2 A CASE STUDY - STORING CURRENT INFORMATION
        27.16.3 A CASE STUDY - STORING HISTORY INFORMATION
        27.16.4 A CASE STUDY - PROJECTION
        27.16.5 A CASE STUDY - JOIN
        27.16.6 A CASE STUDY - AGGREGATES
        27.16.7 SUMMARY
     27.17 Part 8 - ISO/ANSI SQL MULTIMEDIA (SQL/MM)

  28. Technical support for PostgreSQL

     28.1 Commercial Support

  29. Economic and Business Aspects

  30. List of Other Databases

  31. Internet World Wide Web Searching Tips

  32. Conclusion

  33. FAQ - Questions on PostgreSQL

  34. Other Formats of this Document

  35. Copyright and License

  36. Appendix A - Syntax of ANSI/ISO SQL 1992

  37. Appendix B - SQL Tutorial for beginners

     37.1 Tutorial for PostgreSQL
     37.2 Internet URL pointers
     37.3 On-line SQL tutorials

  38. Appendix C - Linux Quick Install Instructions



  ______________________________________________________________________

  1.  Introduction

  The purpose of this document is to provide comprehensive list of
  pointers/URLs to quickly setup PostgreSQL and also to advocate the
  benefits of Open Source Code system like PostgreSQL, Linux.

  Each and every computer system in the world needs a database to
  store/retrieve the information.  The primary reason you use the
  computer is to store, retrieve and process information and do all
  these very quickly, thereby saving you time.  At the same time, the
  system must be simple, robust, fast, reliable, economical and very
  easy to use.  Database is the most VITAL SYSTEM as it stores mission
  critical information of every company in this world.  Each and every
  industry in this world needs a database system. Industries like
  telecom, automobile, banks, airlines, etc..  will not function
  efficiently without a database system.  The most popular database
  systems are based on the International Standard Organisation (ISO) SQL
  specifications and ANSI SQL (American) standards.  The current
  specifications widely used in the industry are ISO/ANSI SQL 1992.
  Upcoming standard is the SQL 1998/99 which is also called SQL-3 is
  still under development. Popular database like Oracle, Sybase and
  Informix systems are based on these standards or are trying to
  implement these standards.

  Without a standard like ANSI/ISO SQL, it would be very difficult for
  the customer to develop a application once and run on all the database
  systems.  End user wants to develop an application ONCE using ISO SQL,
  ODBC, JDBC and deploy on all variety of database systems in the world.

  The world's most popular FREE Database which implements some of the
  ISO SQL, ANSI SQL/98, SQL/92 and ANSI SQL/89 RDBMS is PostgreSQL.
  PostgreSQL is next generation Object relational database and is
  targeting on full compliance of SQL standards like ISO/ANSI SQL.
  PostgreSQL is the only free RDBMS in the world which supports Object
  databases and SQL. This document will tell you how-to install the
  database, how to set up the Web database, application database, front
  end GUIs and interface programs.  It is strongly advised that you MUST
  write your database applications 100 % compliant to standards of
  ISO/ANSI SQL, ODBC, JDBC so that your application is portable across
  multiple databases like PostgreSQL, Oracle, Sybase, Informix etc.

  You get the highest quality, and lot many features with PostgreSQL as
  it follows 'Open Source Code development model'. Open Source Code
  model is the one where the complete source code is given to you and
  the development takes place on the internet by a extremely vast
  network of human brains.  Future trend shows that most of the software
  development will take place on the so called "Information Super-
  Highway" which spans the whole globe.  In the coming years, internet
  growth will be explosive which will further fuel rapid adoption of
  PostgreSQL by the industry.

  By applying the principles of statistics, mathematics and science to
  software quality, you get the best quality of software only in a 'Open
  Source Code System' like PostgreSQL, wherein the source code is open
  to a very vast number of human brains inter-connected by the
  information super-highway.  Greater the number of human brains
  working, the better will be the quality of software.  Open Source Code
  model will also prevent RE-INVENTION OF WHEELS, eliminates DUPLICATION
  OF WORK and will be very economical, saves time in distribution and
  follows the modern economic laws of optimizing the national and global
  resources.  Once a software work is done by others, then you DO NOT
  need to re-do that again. You will not be wasting your valuable time
  on something which had already been WELL DONE.  Your time is extremely
  precious and it must be utilized efficiently, because you have only 8
  hours a day for doing work.  As we will be entering the 21st century,
  there will be a change in the way that you get software for your use.
  Everybody will give first preference for the open source softwares
  like PostgreSQL, Linux.

  If you buy binaries, you will not get any equity and ownership of
  source code. Source code is a very valuable asset and binaries have no
  value. Buying software may become a thing of the past. You only need
  to buy good hardware, it is worth spending money on the hardware and
  get the software from internet. Important point is that it is the
  computer hardware which is doing bulk of the work.  Hardware is the
  real work horse and software is just driving it.  Computer hardware is
  so much more complex that only 6 nations in the world so far have
  demonstrated the capability of designing and manufacturing computer
  chips/hardware.  Design and manufacturing of computer chips is a
  advanced technology.  It is a very complex process, capital intensive,
  requires large investments in plant and production machines which deal
  with 0.18 micron (even smaller than 0.18) technology. On a single
  small silicon chip millions of transistors/circuits are densely
  packed.  Companies like Applied Material, AMD, Intel, Cyrix, Hitachi,
  IBM and others spent significant number of man-years to master the
  high-technology like Chip Design, Micro-electronics and Nano-
  electronics.  Micro means (one-millionth of meter 10^-6), Nano  means
  (one-billionth of meter 10^-9). Current technology uses micro-
  electronics of about 0.35 micron using aluminum as conductors and 0.25
  micron sizes using copper as conductors of electrons.  In near future
  the technology of 0.10 micron with copper and even nano-electronics
  will be used to make computer chips. Aluminum conductors will be
  phased out by copper on computer chips, as copper is a better
  conductor of electrons.  In photolithography process extreme
  ultraviolet, X-ray or electron-beam techniques will be used to etch
  circuits for feature size less than 0.15 micron.  In about 20 years
  from now, silicon chips will be phased out by molecular computers and
  bio chips which will be billions of times faster than silicon chips.
  Molecules are a group of atoms. And atoms are tiny particles which
  makes up everything that you see in this world. Molecular computers
  will use the molecules of matter as ultra-fast electronic on/off
  switches. When the switch is ON it indicates 1, and when it is OFF it
  indicates 0. All the computer programs in this world are based on
  binary (numbers 1 and 0).  Table below shows the progress and future
  advancement trends of computer chips.


                            Advancement of chip capabilities in future
                           ********************************************
       +--------------------------+---------+---------+---------+---------+--------+---------+
       | Item/Year                | 1997    | 1999    | 2001    | 2003    | 2012   | 2020    |
       +--------------------------+---------+---------+---------+---------+--------+---------+
       | Feature size(micron)     | 0.25    | 0.18    | 0.15    | 0.13    | 0.05   |< 0.00001|
       +--------------------------+---------+---------+---------+---------+--------+---------+
       | Wafer size(mm)           | 200     | 300     | 300     | 300     | 450    | Mol/Bio |
       +--------------------------+---------+---------+---------+---------+--------+---------+
       | Min Operating Voltage    | 1.8-2.5 | 1.5-1.8 | 1.2-1.5 | 1.2-1.5 | 0.5-0.6| < 0.001 |
       +--------------------------+---------+---------+---------+---------+--------+---------+
       | Max power dissipation    | 70      | 90      | 110     | 130     | 175    | 600     |
       +--------------------------+---------+---------+---------+---------+--------+---------+
       | On-chip frequencey (MHz) | 750     | 1,250   | 1,500   | 2,100   | 10,000 | > 50,000|
       +--------------------------+---------+---------+---------+---------+--------+---------+
       | DRAM capacity            | 256 MB  | 1 GB    | 2 GB    | 4 GB    | 256 GB | > 1000GB|
       +--------------------------+---------+---------+---------+---------+--------+---------+



  As you can see, it is hardware that is high technology and important
  and software is labor intensive but is a less difficult technology.

  On other hand, each and every country in the world develops/makes
  software.  In fact, any person in this world with a small low-cost PC
  can write software.

  Databases like Oracle, Informix, Sybase, IBM DB2 (Unix) are written
  using the "C" language and binaries are created by compiling the
  source code and then they are shipped out to customers. Oracle,
  Sybase, Informix databases are 100 % "C" programs!!


  Since a lot of work had been done on PostgreSQL for the past 14 years,
  it does not make sense to re-create from scratch another database
  system which satisfies ANSI/ISO SQL.  It will be a great advantage to
  take the existing code and add missing features or enhancements to
  PostgreSQL and start using it immediately.

  Prediction is that demand for "Internet products" like PostgreSQL will
  grow exponentially as it is capable of maintaining a high quality, low
  cost, extremely large user-base and developer-base. Those nations
  which do not use the 'Internet products' will be seriously missing
  "World-wide Internet Revolution" and will be left far behind other
  countries. The reason is "Internet" itself is the world's LARGEST
  "software company" and is a large software "power house"!

  2.  Laws of Physics apply to Software!

  In this chapter, it will be shown how science plays a important role
  in the creation of various objects like software, this universe, mass,
  atoms, energy and even yourself!  This chapter also shows why
  knowledge of science is very important before you start using the
  products of science.

  The golden rule is - "You MUST not use a product without understanding
  how it is created!!" This rule applies to everything - database
  sytems, computer system, operating system, this universe and even your
  own human body! It means that you should have complete source code and
  information about the system. It is important to understand how human
  body and atoms inside human body works since humans are creating
  PostgreSQL, MS Windows95 etc..

  Creation is a very important step. Persons who are using the objects
  of science must know how it is created. This applies to even computer
  systems and PostgreSQL.  A majority of people do not have knowledge of
  science and hence do not know how systems like MS Windows NT/95,
  Oracle, human body and this universe are created. A vast majority of
  people do not know what made the universe and MS Windows 95/NT and
  what is inside it. Complex systems are built from very simple basic
  building blocks like - millions of universes are created, each
  universe in turn has millions of super-clusters, each super-cluster
  has millions of galaxies, each galaxy has millions of stars, some
  stars system have many planets, each planet in turn is made up
  billions of atoms.(In the history of this world, only one universe was
  created by a man in ancient India eons ago, but no other case had been
  reported in the modern history. Nations around the world are trying to
  create a universe). Creating a universe is a much more advanced
  technology and is more advanced than the atomic bomb which was dropped
  on Hiroshima and Nagasaki causing horrible destruction.  Modern
  nuclear weapons are so tiny and powerful that if such a single nuclear
  bomb is dropped in pacific ocean then it can completely vaporise the
  planet earth!  The total variety of weapons are infinity!! Nuclear
  weapons and other more powerful divine weapons were used in the battle
  field in ancient India! Nobody believed Albert Eienstein (a scientist
  of 1900's) when he said nuclear weapons can be made which can vaporise
  big cities. And today nobody believes that man can create a universe.

  Software like MS Windows 95 is created simply by "C" and assembler
  language programs which simply uses 1 and 0 and universes like ours
  are created simply by dashing TWO dissimilar but proper of combination
  of tiny atomic particles of other dimensions.  (Something interesting
  happened just before dashing of tiny particles) A human body is
  created by dashing two dissimilar but proper combination of tiny
  cells!!  (Something interesting happened just before dashing of tiny
  cells) Humans inherited the properties of this universe.  The universe
  you are currently living in was NOT there - all the atoms inside the
  universe was not there and not even TIME was existing!! Baby universe
  was born during big bang and started expanding and kept growing. Even
  today our universe is still expanding!!  A person from another
  universe by name 'Brahma' created this universe you are currently
  living in.  It is indeed possible for man to create a new universe.
  Total number of universes that can be created is INFINITY and
  similarly total number of operating systems that can be created is
  also infinity!! Infinite number universes and infinite variety of
  multi-dimensional atoms collapse down into few primary-dimensional-
  universe. Very advanced mathematical equations support this theory.

  The laws of science and statistics favour the open-source code system
  like PostgreSQL and Linux.  As the internet speed is increasing
  everyday, and internet is becoming more and MORE reliable, the open-
  source code system will gain very rapid momentum.  And, if rules of
  statistics and laws of physics are correct, awareness of science grows
  and when IGNORANT people start learning science then the closed
  source-code systems will eventually vanish from this planet.

  Developing a project like PostgreSQL requires resources like energy
  and time, hence PostgreSQL is a product of energy and time.  Since
  energy and time can be explained only by science, there is a direct
  co-relation between physics and software projects like PostgreSQL,
  Linux.  Laws of science (Physics) applies everywhere and at all the
  times, to anything that you do, even while you are developing the
  software projects.

  Physics is in action even while you are talking (sound waves), walking
  (friction between ground and your feet), reading a book or writing
  software.  Every science in this world has a deep root in mathematics,
  including PostgreSQL. PostgreSQL uses 'Modern Algebra' which is a tiny
  branch of mathematics.  Modern algebra deals with 'Set Theory',
  'Relational Algebra', science of Groups, Rings, Collections, Sets,
  Unions, Intersections, Exclusions, Domains, Lists, etc...

  The software like PostgreSQL is existing today because of the energy
  and time.  And mass and energy are ONE and the SAME entity.  The fact
  that mass and energy are same was unknown to people 100 years ago!
  And even today it is unknown to world population that internet is the
  largest software "power house" and the largest "software company" in
  the world!

  Cells in the human brains consume energy while processing (creating
  software), by converting the chemical energy from food into electrical
  and heat energy.  Even while you are reading this paragraph, the cells
  in your brain are burning out the fuel and are using tiny amounts of
  energy.  All of these implies that human brain is a thermodynamic heat
  engine.  Because human brain is a thermodynamic engine, the laws of
  thermodynamics applies to brain and hence thermodynamics has indirect
  effects on software like PostgreSQL.

  There can be infinite number of colors, computer langauages, computer
  chip designs and theories but there CANNOT be ONE SINGLE PERFECT
  color, computer language, design or system!  What you can have is only
  a  NEAR PERFECT color(wavelength), system, database, or theory!
  Nature is like a KALIEDOSCOPE - there are infinite number of
  dimensions, infinite variety particles of other dimensions but they
  all combine into very few primary dimensions and vice-versa.

  By combining the energies of millions of people around the world via
  internet it is possible to achieve a NEAR PERFECT system (including a
  database software system). Individually, the energy of each person
  will be minute, but by networking a large number of people, the total
  energy will be huge which can be focused on a project to generate a
  near perfect system.

  The energy is measured in Joules, kiloJoules or kilograms of mass, and
  time is measured in seconds or hours.  And power is energy divided by
  time and is measured in Watts or kiloWatts .

  ______________________________________________________________________
          Energy of each person = y Joules
  or in terms of mass
          Energy of each person = y grams
  The conversion factor between mass and energy is E = m * c * c
  where 'c' is the speed of light and 'm' is the mass.
          Time = 8 hours (This is constant since each person has only 8 hours a day)
          Power = Energy / Time
                    = (y / (8 * 60 * 60) ) Watts
          Total Power of the world = n * (y / (8 * 60 * 60) ) Watts
  where n = number of persons working on the project.
  ______________________________________________________________________


  From the above equation it is clear that increasing the 'n' will
  greatly improve the quality of product. Greater the 'n' then greater
  will be the power (in KiloWatts).  You can wonder how much total
  energy (in KiloJoules) and total power (in KiloWatts) the global
  internet can focus on a system like Linux and PostgreSQL!

  It is very clear that internet can network a vast number of people,
  which implies internet has a lot of energy and time which can produce
  much higher quality software products in much shorter time as compared
  to commercial companies. Even very big companies like Microsoft and
  IBM cannot overpower and overrule the laws of Physics but will
  eventually SURRENDER UNTO laws of science!

  Conclusion is - because of laws of science, 'open source code' system
  like PostgreSQL, Linux will prevail and will be always much better
  than 'closed source code' system and it is possible to prove this
  statement scientifically. Man should not waste time creating too many
  duplicate software products.

  3.  What is PostgreSQL ?

  PostgreSQL is a free database, complete source code is given to you
  and is a Object-Relational Database System targetting on ANSI ISO/SQL
  1998, 92 and runs on diverse hardware platforms and Operating systems.
  The ultimate objective and the final goal of PostgreSQL is to become
  100 % compliant to ANSI/ISO SQL and also to become the number ONE open
  generic Database in the world.

  Today, PostgreSQL is the most advanced system in the world and it is
  surprising that many commercial database systems could not match the
  quality, features and capabilities of PostgreSQL !! PostgreSQL is the
  joint effort of many nations around the globe and is a project similar
  to International Space Station. PostgreSQL will remain the number one
  database system for many decades into future since it is a open-source
  code system.

  The fundamental idea behind PostgreSQL is - once a module of code is
  written than you should not waste even a milli-second of your time
  trying to re-invent it!!

  Informix Universal server (released 1997) is based on earlier version
  of PostgreSQL because Informix bought Illustra Inc. and integrated
  with Informix. Illustra database was based on Postgres (earlier
  version of PostgreSQL).

  PostgreSQL is an enhancement of the POSTGRES database management
  system, a next-generation DBMS research prototype.  While PostgreSQL
  retains the powerful data model and rich data types of POSTGRES, it
  replaces the PostQuel query language with an extended subset of SQL.


  PostgreSQL development is being performed by a team of Internet
  developers who all subscribe to the PostgreSQL development mailing
  list. The current coordinator is Marc G. Fournier

    scrappy@postgreSQL.org

     This team is now responsible for all current and future development
     of PostgreSQL.  Ofcourse, the database customer himself is the
     developer of PostgreSQL!  The development load is distributed among
     a very large number of database end-users on internet.

  The authors of PostgreSQL 1.01 were Andrew Yu and Jolly Chen.  The
  original Postgres code, from which PostgreSQL is derived, was the
  effort of many graduate students, undergraduate students, and staff
  programmers and working under the direction of Professor Michael
  Stonebraker at the University of California, Berkeley.

  Millions of PostgreSQL is installed as Database servers, Web database
  servers and Application data servers.  It is very sophisticated object
  relational database system (ORDBMS).

  PostgreSQL runs on Solaris, SunOS, HPUX, AIX, Linux, Irix, Digital
  Unix, BSDi,NetBSD, FreeBSD, SCO unix, NEXTSTEP, Unixware and all and
  every flavor of Unix. Port to Windows NT is done using Cygnus cygwin32
  package.

  PostgreSQL and related items in this document are subject to the
  COPYRIGHT from University of California, Berkeley.

  3.1.  White Paper

  PostgreSQL details in nutshell:

    Title:             PostgreSQL SQL RDBMS Database (Object Relational
     Database Management System)

    Current Version:   7.0.1

    Age:               PostgreSQL is 15 years old. Developed since 1985

    Authors:           Developed by millions/universities/companies on
     internet for the past 15 YEARS

     The white paper on PostgreSQL is at <http://www.greatbridge.com>

  4.  Which one? PostgreSQL or MySQL ?

  MySQL is another open-source SQL server, but it does not support
  transactions. It is suitable for very small databases and does not
  support advanced SQL functionalities. Whereas PostgreSQL is a
  enterprise strength database supporting transactions and almost all
  SQL constructs.  PostgreSQL is much more advanced than commercial
  databases like Oracle, Sybase and Informix. PostgreSQL supports very
  advanced locking mechanisms and many more advanced features which are
  not available in commercial database systems!!

  In near future development of MySQL will be dropped, since MySQL is
  duplicate product working towards ANSI SQL.  And all the MySQL users
  will be migrated to PostgreSQL.  Also MySQL is a 'quasi-commercial'
  product unlike PostgreSQL which is open-source and there is no license
  fee.  There is no need for another SQL database system as PostgreSQL
  is already here in this world!!

  Duplicate products like MySQL confuse the user base and causes
  division of resources. For a "NEAR PERFECT" system there must be only
  one system and everybody in the world must work on it!!  Duplicate
  products cause more harm than good and hence division of resources
  must be strongly discouraged. This already happened in case of
  commercial database systems like Oracle, Sybase, Informix and MS SQL
  server which caused splintering of user base and often they are
  incompatible.

  WARNING:  It is possible to create infinite number of database systems
  for a given specification like ANSI SQL!!

  MySQL is at  <http://www.tcx.se>

  5.  Where to get it ?

  You can buy Redhat Linux CDROM, Debian Linux CDROM or Slackware Linux
  CDROM which already contains the PostgreSQL in package form (both
  source code and binaries) from :

    Linux System Labs Web site:   <http://www.lsl.com/>  (7 U.S.
     dollars)

    Cheap Bytes Inc Web site:   <http://www.cheapbytes.com/> (7 U.S.
     dollars)


    Debian Main Web site :  <http://www.debian.org/vendors.html>

  PostgreSQL organisation is also selling 'PostgreSQL CDROM' which
  contains the complete source code and binaries for many Unix operating
  systems as well as full documentation.

    PostgreSQL CDROM from main Web site at :
     <http://www.postgresql.org> 30 (U.S. dollars)

  Binaries only distribution of PostgreSQL:

    The maintainer of PostgreSQL RPMs is Lamar Owen and is at
     lamar.owen@wgcr.org

    PostgreSQL source RPM and binaries RPM
     <http://www.ramifordistat.net/postgres>

    PostgreSQL source RPM and binaries RPM  <http://www.postgresql.org>
     Click on "Latest News" and click on Redhat RPMs.

    PostgreSQL source RPM and binaries RPM
     <http://www.redhat.com/pub/contrib/i386/> and ftp site is at
     <ftp://ftp.redhat.com/pub/contrib/i386/>

    Binaries site for Solaris, HPUX, AIX, IRIX, Linux :
     <ftp://ftp.postgresql.org/pub/bindist>


  WWW Web sites:

    Primary Web site:   <http://www.postgresql.org/>

    Secondary Web site:      <http://logical.thought.net/postgres95/>

    <http://www.itm.tu-clausthal.de/mirrors/postgres95/>

    <http://s2k-ftp.cs.berkeley.edu:8000/postgres95/>

    <http://xenium.pdi.net/PostgreSQL/>

    <http://s2k-ftp.cs.berkeley.edu:8000/postgres95/>


  The ftp sites are listed below :-

    Primary FTP:        <ftp://ftp.postgresql.org/pub>

    Secondary FTP:      <ftp://ftp.chicks.net/pub/postgresql>

    <ftp://ftp.emsi.priv.at/pub/postgres/>

    <ftp://ftp.itm.tu-clausthal.de/pub/mirrors/postgres95>

    <ftp://rocker.sch.bme.hu/pub/mirrors/postgreSQL>

    <ftp://ftp.jaist.ac.jp/pub/dbms/postgres95>

    <ftp://ftp.luga.or.at/pub/postgres95>

    <ftp://postgres95.vnet.net:/pub/postgres95>

    <ftp://ftpza.co.za/mirrors/postgres>

    <ftp://sunsite.auc.dk/pub/databases/postgresql>


    <ftp://ftp.task.gda.pl/pub/software/postgresql>

    <ftp://xenium.pdi.net/pub/PostgreSQL>


  PostgreSQL source code is also available at all the mirror sites of
  sunsite unc (total of about 1000 sites around the globe). It is inside
  the Red Hat Linux distribution in /pub/contrib/i386/postgresql.rpm
  file.

    For list of mirror sites go to  <ftp://sunsite.unc.edu>

  6.  PostgreSQL Quick-Installation Instructions

  This chapter will help you to install and run the database very
  quickly in less than 5 minutes.


  6.1.  Install and Test

  Quick Steps to Install, Test, Verify and run PostgreSQL Login as root.

  ______________________________________________________________________
  # cd /mnt/cdrom/RedHat/RPMS
  # man rpm
  # ls postgre*.rpm
  # rpm -qpl postgre*.rpm | less (to see list of files)
  # rpm -qpi postgre*.rpm (to see info of package)
  # cat /etc/passwd | grep postgres
  ______________________________________________________________________


  Note: If you see a 'postgres' user, you may need to backup and clean
  up the postgres home directory  postgres and delete the unix user
  'postgres' or rename the unix user 'postgres' to something like 'post
  gres2'.  Install must be "clean slate"

  ______________________________________________________________________
  # rpm -i postgre*.rpm (Must install all packages clients, devel, data
           and main for pgaccess to work )
  # man chkconfig
  # chkconfig --add postgresql  (to start pg during booting)
  # /etc/rc.d/init.d/postgresql start  (to start up postgres)
  # man xhost
  # xhost +  (To give display access for pgaccess)
  # su - postgres
  bash$ man createdb
  bash$ createdb mydatabase
  bash$ man psql
  bash$ psql mydatabase
  ..... in psql press up/down arrow keys for history line editing or \s

  bash$ export DISPLAY=<hostname>:0.0
  bash$ man pgaccess
  bash$ pgaccess mydatabase
  ______________________________________________________________________


  Now you can start rapidly BANGING away SQL commands at psql or pgac
  cess !!

  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql*
  ______________________________________________________________________


  Here read all the FAQs, User, Programmer, Admin guides and tutorials.

  6.2.  PostgreSQL RPMs

  See also "Installation Steps" from
  <http://www.ramifordistat.net/postgres>

  The maintainer of PostgreSQL RPMs is Lamar Owen and is at
  lamar.owen@wgcr.org More details about PostgreSQL is at
  <http://www.postgresql.org>

  6.3.  Maximum RPM

  Familiarize with RedHat RPM package manager to manage the PostgreSQL
  installations.  Download the 'Maximum RPM' textbook from
  <http://www.RPM.org> look for the filename maximum-rpm.ps.gz And read
  it on linux using the gv command -

  ______________________________________________________________________
  # gv maximum-rpm.ps.gz
  ______________________________________________________________________


  There is also rpm2deb which converts the RPM packages to Debian linux
  packages.

  6.4.  Examples RPM

  Examples are needed to do testing of various interfaces to PostgreSQL.
  Install the postgresql examples directory from  -

    Linux cdrom - postgresql-*examples.rpm

    postgresql-*examples.rpm from  <http://www.aldev.8m.com> or
     <http://www.aldev.webjump.com>

    PostgreSQL source code tree postgresql*.src.rpm and look for
     examples, testing or tutorial directories

  6.5.  Testing PyGreSQL - Python interface

  Install examples package, see ``'' and then do -

  ______________________________________________________________________
  bash$ cd /usr/lib/pgsql/python
  bash$ createdb thilo
  bash$ psql thilo
  thilo=> create table test (aa char(30), bb char(30) );
  bash$ /usr/bin/python
  >>> import _pg
  >>> db = _pg.connect('thilo', 'localhost')
  >>> db.query("INSERT INTO test VALUES ('ping', 'pong')")
  >>> db.query("SELECT * FROM test")
  eins|zwei
  ----+----
  ping|pong
  (1 row)
  >>>CTRL+D
  bash$
  ..... Seems to work - now install it properly
  bash$ su - root
  # cp /usr/lib/pgsql/python/_pg.so /usr/lib/python1.5/lib-dynload
  ______________________________________________________________________



  6.6.  Testing Perl - Perl interface

  Install examples package, see ``'' and then do -

  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql-6.5.3/examples/perl5
  bash$ perl ./example.pl
  ______________________________________________________________________


  Note: If the above command does not work then do this.  Gloabl var
  @INC should include the Pg.pm module in directory site_perl hence use
  -I option below

  ______________________________________________________________________
  bash$ perl -I/usr/lib/perl5/site_perl/5.005/i386-linux-thread ./example.pl
  ______________________________________________________________________


  .... You ran the perl which is accessing PostgreSQL database!!

  Read the example.pl file for using perl interface.

  6.7.  Testing libpq, libpq++ interfaces

  Install examples package, see ``'' and then do -

  ______________________________________________________________________
  bash$ su root   --> to change ownership of examples
  # chown -R postgres /usr/doc/postgresql-6.5.3/examples
  # exit

  bash$ cd /usr/doc/postgresql-6.5.3/examples/libpq
  bash$ gcc testlibpq.c -I/usr/include/pgsql -lpq
  bash$ export PATH=$PATH:.
  bash$ a.out

  bash$ cd /usr/doc/postgresql-6.5.3/examples/libpq++
  bash$ g++ testlibpq0.cc -I/usr/include/pgsql -I/usr/include/pgsql/libpq++
  -lpq++ -lpq -lcrypt
  bash$ ./a.out  (Note: Ignore Error messages if you get any - as below)
  > create table foo (aa int, bb char(4));
  No tuples returned...
  status = 1
  Error returned: fe_setauthsvc: invalid name: , ignoring...
  > insert into foo values ('4535', 'vasu');
  No tuples returned...
  status = 1
  Error returned: fe_setauthsvc: invalid name: , ignoring...
  > select * from foo;
  aa   |bb   |
  -----|-----|
  4535 |vasu |
  Query returned 1 row.
  >
  >CTRL+D
  bash$
  ______________________________________________________________________


  .... You ran direct C/C++ interfaces to PostgreSQL database!!

  6.8.  Testing Java interfaces

  Install examples package, see ``'' and also install the following -

    Get JDK jdk-*glibc*.rpm from
     <ftp://ftp.redhat.com/pub/contrib/i386> or from
     <http://www.blackdown.org>

    Get postgresql-jdbc-*.rpm  <ftp://ftp.redhat.com/pub/contrib/i386>


     ___________________________________________________________________
     bash$ cd /usr/doc/postgresql-6.5.3/examples/jdbc
     bash$ echo $CLASSPATH
      --> Should show  CLASSPATH=/usr/lib/jdk-x.x.x/lib/classes.zip
     where x.x.x is proper version numbers.
     bash$ export CLASSPATH=$CLASSPATH:.:/usr/lib/pgsql/jdbc6.5-1.2.jar
     Edit all psql.java file  and comment out the 'package' line.
     bash$ javac psql.java
     bash$ java psql jdbc:postgresql:template1 postgres < password>[1] select * from pg_tables;
     tablename       tableowner      hasindexes      hasrules
     pg_type postgres        true    false   false
     pg_attribute    postgres        true    false   false
     [2]
     CTRL+C
     bash$
     ___________________________________________________________________


  .... You ran direct Java interfaces to PostgreSQL database!

  6.9.  Testing ecpg interfaces

  Install examples package, see ``'' and then do -

  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql-6.5.3/examples/ecpg
  bash$ ecpg test1.pgc -I/usr/include/pgsql
  bash$ cc test1.c -I/usr/include/pgsql -lecpg -lpq -lcrypt
  bash$ createdb mm
  bash$ ./a.out
  ______________________________________________________________________


  .... You ran Embedded "C"-SQL to PostgreSQL database!

  6.10.  Testing SQL examples - User defined types and functions

  Install examples package, see ``'' and then do -

  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql-6.5.3/examples/sql
  Under-development..
  ______________________________________________________________________



  6.11.  Testing Tcl/Tk interfaces

  Example of Tcl/Tk interfaces is pgaccess program.  Read the file
  /usr/bin/pgaccess using a editor -

  ______________________________________________________________________
  bash$ view /usr/bin/pgaccess
  bash$ export DISPLAY=<hostname of your machine>:0.0
  bash$ createdb mydb
  bash$ pgaccess mydb
  ______________________________________________________________________


  6.12.  Testing ODBC interfaces


  1. Get the win32 pgsql odbc driver from
     <http://www.insightdist.com/psqlodbc/>

  2. See also /usr/lib/libpsqlodbc.a

  6.13.  Testing MPSQL Motif-worksheet interfaces

  Get the RPMs from  <http://www.mutinybaysoftware.com>

  6.14.  Verification

  To verify the top quality of PostgreSQL, run the Regression test
  package :- Login as root -

  ______________________________________________________________________
  # rpm -i postgresql*test.rpm
  And see README file or install the source code tree which has regress directory
  # rpm -i postgresql*.src.rpm
  # cd /usr/src/redhat/SPECS
  # more postgresql*.spec   (to see what system RPM packages you need to
  install)
  # rpm -bp postgresql*.spec  (.. this will prep the package)

  Regression test needs the Makefiles and some header files like *fmgr*.h
  which can be built by -
  # rpm --short-circuit -bc postgresql*.spec ( .. use short circuit to
  bypass!)
  Abort the build by CTRL+C, when you see 'make -C common  SUBSYS.o'
  By this time configure is successful and all makefiles and headers
  are created. You do not need to proceed any further
  # cd /usr/src/redhat/BUILD
  # chown -R postgres postgresql*
  # su - postgres
  bash$ cd /usr/src/redhat/BUILD/postgresql-6.5.3/src/test/regress
  bash$ more README
  bash$ make clean; make all runtest
  bash$ more regress.out
  ______________________________________________________________________



  6.15.  Emergency Bug fixes

  Sometimes emergency bug fix patches are released after the GA release
  of PostgreSQL. You can apply these optional patches depending upon the
  needs of your application. Follow these steps to apply the patches -
  Change directory to postgresql source directory


                       # rpm -i postgresql*.src.rpm
                       # cd /usr/src/postgresql6.5.3
                       # man patch
                       # patch -p0 < patchfile
                       # make clean
                       # make



  The patch files are located in

    PostgreSQL patches :  <ftp://ftp.postgresql.org/pub/patches>

  7.  Quick Start Guide

  Refer also to ``Quick Installation'' chapter.

  7.1.  Creating, Dropping, Renaming Database

  You can use the user friendly GUI called 'pgaccess' to create and drop
  databases, or you can use the command line 'psql' utility.

  ______________________________________________________________________
  If you are logged in as root, switch user to 'postgres' :
  # xhost +  (To give display access for pgaccess)
  # su - postgres
  bash$ man createdb
  bash$ createdb mydatabase
  bash$ man psql
  bash$ psql mydatabase
  ..... in psql press up/down arrow keys for history line editing or \s

  bash$ export DISPLAY=<hostname>:0.0
  bash$ man pgaccess
  bash$ pgaccess mydatabase
  ______________________________________________________________________


  Now you can start rapidly BANGING away SQL commands at psql or pgac
  cess !!

  To drop the database do :

  ______________________________________________________________________
  bash$ man dropdb
  bash$ dropdb <dbname>
  ______________________________________________________________________


  It is also possible to destroy a database from within an SQL session
  by using:

  ______________________________________________________________________
  > drop database <dbname>
  ______________________________________________________________________


  To rename a database see ``Backup and Restore''

  7.2.  Creating, Dropping users

  To create new users, login as unix user 'postgres'.  You can use user
  friendly GUI tool called 'pgacess' to create, drop users.

  ______________________________________________________________________
  bash$ man pgaccess
  bash$ pgaccess <database_name>
  ______________________________________________________________________


  and click on "Users" tab and then click Object|New or Object|Delete

  You can also use command line scripts.  Use the shell script called
  'createuser' which invokes psql



  ______________________________________________________________________
  bash$ man createuser
  bash$ createuser <username>
  bash$ createuser -h host -p port -i userid <username>
  ______________________________________________________________________



  To drop a postgres user, use shell script 'destroyuser' -

  ______________________________________________________________________
  bash$ man destroyuser
  bash$ destroyuser
  ______________________________________________________________________



  7.3.  Creating, Dropping Groups

  Currently, there is no easy interface to set up user groups. You have
  to explicitly insert/update the pg_group table. For example:

  ______________________________________________________________________
  bash$ su - postgres
  bash$ psql <database_name>
  ..... in psql press up/down arrow keys for history line editing or \s

  psql=> insert into pg_group (groname, grosysid, grolist)
  psql=> values ('posthackers', '1234', '{5443, 8261}' );
  INSERT 58224
  psql=> grant insert on foo to group posthackers;
  CHANGE
  psql=>
  ______________________________________________________________________


  The fields in pg_group are: groname The group name. This name should
  be purely alphanumeric; do not include underscores or other punctua
  tion.

  grosysid The group id. This is an int4, and should be unique for each
  group.

  grolist The list of pg_user IDs that belong in the group. This is an
  int4[].

  To drop the group:

  ______________________________________________________________________
  bash$ su - postgres
  bash$ psql <database_name>
  ..... in psql press up/down arrow keys for history line editing or \s

  psql=> delete from pg_group where groname = 'posthackers';
  ______________________________________________________________________



  7.4.  Create, Edit, Drop a table

  You can use user friendly GUI tool 'pgaccess' or command line tool
  'psql' to create, edit or drop a table in a database.



  ______________________________________________________________________
  bash$ man pgaccess
  bash$ pgaccess <database_name>
  ______________________________________________________________________


  Click on Table | New | Design buttons.

  ______________________________________________________________________
  bash$ man psql
  bash$ psql <database_name>
  ..... in psql press up/down arrow keys for history line editing or \s
  ______________________________________________________________________


  At psql prompt, give standard SQL statements like 'create table',
  'alter table' or 'drop table' to manipulate the tables.

  7.5.  Create, Edit, Drop records in a table

  You can use user friendly GUI tool 'pgaccess' or command line tool
  'psql' to create, edit or drop records in a database table.

  ______________________________________________________________________
  bash$ man pgaccess
  bash$ pgaccess <database_name>
  ______________________________________________________________________


  Click on Table | < pick a table > | Open buttons.

  ______________________________________________________________________
  bash$ man psql
  bash$ psql <database_name>
  ..... in psql press up/down arrow keys for history line editing or \s
  ______________________________________________________________________


  At psql prompt, give standard SQL statements like 'insert into
  table_name', 'update table_name' or 'delete from table_name' to manip
  ulate the tables.

  7.6.  Switch active Database

  You can use user friendly GUI tool 'pgaccess' or command line tool
  'psql' to switch active database.

  ______________________________________________________________________
  bash$ man pgaccess
  bash$ pgaccess <database_name>
  ______________________________________________________________________


  Click on Database | Open buttons.

  ______________________________________________________________________
  bash$ man psql
  bash$ psql <database_name>
  ..... in psql press up/down arrow keys for history line editing or \s

  psql=> connect <database_name> <user>
  ______________________________________________________________________



  7.7.  Backup and Restore database

  PostgreSQL provides two utilities to back up your system: pg_dump to
  backup individual databases, and pg_dumpall to back up all the
  databases in just one step.

  ______________________________________________________________________
  bash$ su - postgres
  bash$ man pd_dump
  bash$ pd_dump <database_name> > database_name.pgdump
  ______________________________________________________________________


  and can be restored using:

  ______________________________________________________________________
  bash$ cat database_name.pgdump | psql <database_name>
  ______________________________________________________________________


  This technique can be used to move databases to new locations, and to
  rename existing databases.

  WARNING: Every database should be backed up on a regular basis. Since
  PostgreSQL manages its own files in the file sysetem, it is not
  advisable to rely on system backups of your file system for your
  database backups; there is no guarantee that the files will be in a
  usable, consistent state after restoration.

  BACKUP LARGE DATABASES: Since Postgres allows tables larger than the
  maximum file size on your system, it can be problematic to dump the
  table to a file, because the resulting file likely will be larger than
  the maximum size allowed by your system. As pg_dump writes to stdout,
  you can just use standard unix tools to work around this possible
  problem:

  Use compressed dumps:

  ______________________________________________________________________
  bash$ pg_dump <database_name> | gzip > filename.dump.gz
  ______________________________________________________________________


  reload with:

  ______________________________________________________________________
  bash$ createdb <database_name>
  bash$ gunzip -c filename.dump.gz | psql <database_name>
  ______________________________________________________________________


  or

  ______________________________________________________________________
  bash$ cat filename.dump.gz | gunzip | psql <database_name>
  ______________________________________________________________________



  Use split:

  ______________________________________________________________________
  bash$ pg_dump <database_name> | split -b 1m - filename.dump.
  ______________________________________________________________________


  Note: There is a dot (.) after filename.dump in the above command!!
  You can reload with:

  ______________________________________________________________________
  bash$ man createdb
  bash$ createdb <database_name>
  bash$ cat filename.dump.* | pgsql <database_name>
  ______________________________________________________________________


  Of course, the name of the file (filename) and the content of the
  pg_dump output need not match the name of the database. Also, the
  restored database can have an arbitrary new name, so this mechanism is
  also suitable for renaming databases.

  To dump all the databases in PostgreSQL use pg_dumpall

  ______________________________________________________________________
  bash$ man pg_dumpall
  bash$ pg_dumpall -o > db.out
  To reload:
  bash$ psql -e template1 < db.out
  ______________________________________________________________________



  7.8.  Security of database

  See the chapter on ``PostgreSQL Security''.

  7.9.  Online help

  It is very important that you should know how to use online help
  facilities of PostgreSQL, since it will save you lot of time and
  provides very quick access to information.

  See the online man pages on various commands like createdb,
  createuser, etc..

  ______________________________________________________________________
  bash$ man createdb
  ______________________________________________________________________



  See also online help of psql, by typing \h at psql prompt

  ______________________________________________________________________
  bash$ psql mydatabase
  psql> \h

  Tip: In psql press up/down arrow keys for history line editing or \s
  ______________________________________________________________________



  7.10.  PostgreSQL Documentation

  More questions, read the fine manuals of PostgreSQL which are very
  extensive.  PostgreSQL documentation is distributed with package. See
  the other manuals.

  8.  PostgreSQL Supports Extremely Large Databases greater than 200 Gig

  Performance of 32-bit cpu machines will decline rapidly when the
  database size exceeds 5 GigaByte. You can run 30 gig database on
  32-bit cpu but the performance will be degraded.  Machines with 32-bit
  cpu imposes a limitation of 2 GB on RAM, 2 GB on file system sizes and
  other limitations on the operating system. Use the special filesystems
  for linux made by SGI, IBM or HP or ext3-fs to support file-sizes
  greater than 2 GB on 32-bit linux machines.

  For extremely large databases, it is strongly advised to use 64-bit
  machines like Digital Alpha cpu, Sun Ultra-sparc 64-bit cpu, Silicon
  graphics 64-bit cpu, Intel Merced IA-64 cpu, HPUX 64bit machines or
  IBM 64-bit machines. Compile PostgreSQL under 64-bit cpu and it can
  support huge databases and large queries. Performance of PostgreSQL
  for queries on large tables and databases will be several times faster
  than PostgreSQL on 32-bit cpu machines. Advantage of 64-bit machines
  are that you get very large memory addressing space and the operating
  system can support very large file-systems, provide better performance
  with large databases, support much larger memory (RAM), have more
  capabilities etc..

  9.  How can I trust PostgreSQL ? Regression Test Package builds cus
  tomer confidence

  Thanks to "Laws of Physics", it is possible to SCIENTIFICALLY verify
  whether PostgreSQL is working as per ISO/ANSI SQL specifications.  To
  validate PostgreSQL, regression test package (src/test/regress) is
  included in the distribution.  Regression test package will verify the
  standard SQL operations as well as the extensibility capabilities of
  PostgreSQL.  The test package already contains hundreds of SQL test
  programs.

  You should use the computer's high-speed power to validate the
  PostgreSQL, instead of using human brain power.  Computers can carry
  out software regression tests millions or even billions of times
  faster than humans can.  Modern computers can run billions of SQL
  tests in a very short time.  In the near future the speed of computer
  will be several zillion times faster than human brain!  Hence, it
  makes sense to use the power of computer to validate the software.

  You can add more tests just in case you need to, and can upload to the
  primary PostgreSQL web site if you feel that it will be useful to
  others on internet.  Regression test package helps build customer
  confidence and trust in PostgreSQL and facilitates rapid deployment of
  PostgreSQL on production systems.

  Regression test package can be taken as a "VERY SOLID" technical
  document mutually agreed upon between the developers and end-users.
  PostgreSQL developers extensively use the regression test package
  during development period and also before releasing the software to
  public to ensure good quality.

  Capablilities of PostgreSQL are directly reflected by the regression
  test package.  If a functionality, syntax or feature exists in the
  regression test package then it is supported, and all others which are
  NOT listed in the package MAY not be supported by PostgreSQL!! You may
  need to verify those and add it to regression test package.

  10.  Security of Database

  Database security is addressed at several levels:

    Database file protection. All files stored within the database are
     protected from reading by any account other than the postgres
     superuser account

    Connections from a client to the database server are, by default,
     allowed only via a local UNIX socket, not via TCP/IP sockets. The
     back-end must be started with the -i option to allow nonlocal
     clients to connect.

    Client connections can be restricted by IP address and/or username
     via the pg_hba.conf file in $PG_DATA.

    Client connections may be authenticated via other external
     packages.

    Each user in Postgres is assigned a username and (optionally) a
     password.  By default, users do not have write access to databases
     they did not create.

    Users may be assigned to groups, and table access may be restricted
     based on group priveleges.

  10.1.  User Authentication

  Authentication is the process by which the backend server and
  postmaster ensure that the user requesting access to data is in fact
  who he/she claims to be. All users who invoke Postgres are checked
  against the contents of the pg_user class to ensure that they are
  authorized to do so. However, verification of the user's actual
  identity is performed in a variety of ways:

    From the user shell: A backend server started from a user shell
     notes the user's (effective) user-id before performing a setuid to
     the user-id of user postgres. The effective user-id is used as the
     basis for access control checks. No other authentication is
     conducted.

    From the network: If the Postgres system is built as distributed,
     access to the Internet TCP port of the postmaster process is
     available to anyone. The DBA configures the pg_hba.conf file in the
     $PGDATA directory to specify what authentication system is to be
     used according to the host making the connection and which database
     it is connecting to.  See pg_hba.conf(5) (man 5 pg_hba.conf) for a
     description of the authentication systems available. Of course,
     host-based authentication is not fool-proof in Unix, either. It is
     possible for determined intruders to also masquerade the
     origination host. Those security issues are beyond the scope of
     Postgres.

  10.2.  Host-Based Access Control

  Host-based access control is the name for the basic controls
  PostgreSQL exercises on what clients are allowed to access a database
  and how the users on those clients must authenticate themselves.  Each
  database system contains a file named pg_hba.conf, in its $PGDATA
  directory, which controls who can connect to each database.  Every
  client accessing a database must be covered by one of the entries in
  pg_hba.conf. Otherwise all attempted connections from that client will
  be rejected with a "User authentication failed" error message.

  See online man page of pg_hba.conf(5) (man 5 pg_hba.conf).

  The general format of the pg_hba.conf file is of a set of records, one
  per line. Blank lines and lines beginning with a hash character ("#")
  are ignored. A record is made up of a number of fields which are
  separated by spaces and/or tabs.

  Connections from clients can be made using Unix domain sockets or
  Internet domain sockets (ie.  TCP/IP). Connections made using Unix
  domain sockets are controlled using records of the following format:



  ______________________________________________________________________
  local database authentication method
  ______________________________________________________________________


  where

  database specifies the database that this record applies to. The value
  all specifies that it applies to all databases.

  authentication method specifies the method a user must use to
  authenticate themselves when connecting to that database using Unix
  domain sockets. The different methods are described below.

  Connections made using Internet domain sockets are controlled using
  records of the following format.


  ______________________________________________________________________
  host database TCP/IP-address TCP/IP-mask authentication method
  ______________________________________________________________________



  The TCP/IP address is logically and'ed to both the specified TCP/IP
  mask and the TCP/IP address of the connecting client. If the two
  resulting values are equal then the record is used for this
  connection. If a connection matches more than one record then the
  earliest one in the file is used. Both the TCP/IP address and the
  TCP/IP mask are specified in dotted decimal notation.  If a connection
  fails to match any record then the reject authentication method is
  applied (see ``Authentication Methods'').

  10.3.  Authentication Methods

  The following authentication methods are supported for both Unix and
  TCP/IP domain sockets:

    trust The connection is allowed unconditionally.

    reject The connection is rejected unconditionally.

    crypt The client is asked for a password for the user. This is sent
     encrypted (using crypt(3)) and compared against the password held
     in the pg_shadow table. If the passwords match, the connection is
     allowed.

    password The client is asked for a password for the user. This is
     sent in clear and compared against the password held in the
     pg_shadow table. If the passwords match, the connection is allowed.
     An optional password file may be specified after the password
     keyword which is used to match the supplied password rather than
     the pg_shadow table. See pg_passwd.

  The following authentication methods are supported for TCP/IP domain
  sockets only:

    krb4 Kerberos V4 is used to authenticate the user.

    krb5 Kerberos V5 is used to authenticate the user.

    ident The ident server on the client is used to authenticate the
     user (RFC 1413). An optional map name may be specified after the
     ident keyword which allows ident user names to be mapped onto
     Postgres user names. Maps are held in the file
     $PGDATA/pg_ident.conf.
  Here are some examples:

  ______________________________________________________________________
  # Trust any connection via Unix domain sockets.
  local   trust
  # Trust any connection via TCP/IP from this machine.
  host    all 127.0.0.1   255.255.255.255     trust
  # We don't like this machine.
  host    all 192.168.0.10    255.255.255.0       reject
  # This machine can't encrypt so we ask for passwords in clear.
  host    all 192.168.0.3 255.255.255.0       password
  # The rest of this group of machines should provide encrypted passwords.
  host    all 192.168.0.0 255.255.255.0       crypt
  ______________________________________________________________________



  10.4.  Access Control

  Postgres provides mechanisms to allow users to limit the access to
  their data that is provided to other users.

    Database superusers Database super-users (i.e., users who have
     pg_user.usesuper set) silently bypass all of the access controls
     described below with two exceptions: manual system catalog updates
     are not permitted if the user does not have pg_user.usecatupd set,
     and destruction of system catalogs (or modification of their
     schemas) is never allowed.

    Access Privilege The use of access privilege to limit reading,
     writing and setting of rules on classes is covered in SQL
     grant/revoke(l).

    Class removal and schema modification Commands that destroy or
     modify the structure of an existing class, such as alter, drop
     table, and drop index, only operate for the owner of the class. As
     mentioned above, these operations are never permitted on system
     catalogs.

  10.5.  Secure TCP/IP Connection via SSH

  You can use ssh to encrypt the network connection between clients and
  a Postgres server. Done properly, this should lead to an adequately
  secure network connection.

  The documentation for ssh provides most of the information to get
  started. Please refer to <http://www.heimhardt.de/htdocs/ssh.html> for
  better insight.  A step-by-step explanation can be done in just two
  steps.

  Running a secure tunnel via ssh: A step-by-step explanation can be
  done in just two steps.

    Establish a tunnel to the back-end machine, like this:

     ___________________________________________________________________
     ssh -L 3333:wit.mcs.anl.gov:5432 postgres@wit.mcs.anl.gov
     ___________________________________________________________________



    The first number in the -L argument, 3333, is the port number of
     your end of the tunnel. The second number, 5432, is the remote end
     of the tunnel -- the port number your backend is using.  The name
     or the address in between the port numbers belongs to the server
     machine, as does the last argument to ssh that also includes the
     optional user name. Without the user name, ssh will try the name
     you are currently logged on as on the client machine. You can use
     any user name the server machine will accept, not necessarily those
     related to postgres.

    Now that you have a running ssh session, you can connect a postgres
     client to your local host at the port number you specified in the
     previous step. If it's psql, you will need another shell because
     the shell session you used in step 1 is now occupied with ssh.

     ___________________________________________________________________
     psql -h localhost -p 3333 -d mpw
     ___________________________________________________________________



    Note that you have to specify the -h argument to cause your client
     to use the TCP socket instead of the Unix socket. You can omit the
     port argument if you chose 5432 as your end of the tunnel.

  10.6.  Kerberos Authentication

  Kerberos is an industry-standard secure authentication system suitable
  for distributed computing over a public network.

  Availability: The Kerberos authentication system is not distributed
  with Postgres. Versions of Kerberos are typically available as
  optional software from operating system vendors. In addition, a source
  code distribution may be obtained through MIT Project Athena.


  ______________________________________________________________________
  Note: You may wish to obtain the MIT version even if your vendor provides a version, since
  some vendor ports have been deliberately crippled or rendered non-interoperable with the MIT
  version.
  ______________________________________________________________________



  Inquiries regarding your Kerberos should be directed to your vendor or
  MIT Project Athena. Note that FAQLs (Frequently-Asked Questions Lists)
  are periodically posted to the Kerberos mailing list (send mail to
  subscribe), and USENET news group.

  Installation: Installation of Kerberos itself is covered in detail in
  the Kerberos Installation Notes . Make sure that the server key file
  (the srvtab or keytab) is somehow readable by the Postgres account.
  Postgres and its clients can be compiled to use either Version 4 or
  Version 5 of the MIT Kerberos protocols by setting the KRBVERS
  variable in the file src/Makefile.global to the appropriate value. You
  can also change the location where Postgres expects to find the
  associated libraries, header files and its own server key file.  After
  compilation is complete, Postgres must be registered as a Kerberos
  service. See the Kerberos Operations Notes and related manual pages
  for more details on registering services.

  Operation: After initial installation, Postgres should operate in all
  ways as a normal Kerberos service. For details on the use of
  authentication, see the PostgreSQL User's Guide reference sections for
  postmaster and psql.

  In the Kerberos Version 5 hooks, the following assumptions are made
  about user and service naming(also, see Table below):

    User principal names (anames) are assumed to contain the actual
     Unix/Postgres user name in the first component.
    The Postgres service is assumed to be have two components, the
     service name and a hostname, canonicalized as in Version 4 (i.e.,
     with all domain suffixes removed).


  ______________________________________________________________________
                  Table: Kerberos Parameter Examples
   ------------------------------------------------------
   Parameter      Example
   ------------------------------------------------------
   user           frew@S2K.ORG
   user           aoki/HOST=miyu.S2K.Berkeley.EDU@S2K.ORG
   host           postgres_dbms/ucbvax@S2K.ORG
   ------------------------------------------------------
  ______________________________________________________________________



  11.  GUI FrontEnd Tool for PostgreSQL (Graphical User Interface)

  Web browser will be the most popular GUI front-end in the future.  It
  is recommended that you migrate all of your "legacy" Windows 95/NT
  applications to  Web-based application.

  You should use Web-Application Servers like ``'' (Java based) or ``''
  (Python based).

  Best web-scripting (and compiling) language is ``PHP+Zend compiler''
  PHP is extremely powerful as it combines the power of Perl, Java, C++,
  Javascript into one single language and it runs on all OSes - unixes
  and Windows NT/95.

  The best tools in the order of preference are -

    Enhydra at ``'' plus Borland Java JBuilder for Linux
     <http://www.inprise.com>

    Zope at ``''

    PHP script and Zend compiler at ``PHP+Zend compiler''

    X-Designer supports C++, Java and MFC  <http://www.ist.co.uk/xd>

    Qt for Windows95 and Unix at  <http://www.troll.no> and
     <ftp://ftp.troll.no>

    Code Crusader is on linux cdrom, freeware based on MetroWorks Code
     Warrior
     <http://www.kaze.stetson.edu/cdevel/code_crusader/about.html>

    Code Warrior from MetroWorks  <http://www.metrowerks.com>

    GNU Prof C++ IDE from (Redhat) <http://www.redhat.com> Cygnus
     <http://www.cygnus.com>

    Borland C++ Builder for Linux  <http://www.inprise.com>

    Borland Java JBuilder for Linux  <http://www.inprise.com>

  Language choices in the order of preference are -

  1. Java but its programs run very slow and has license fees. C++ is 5
     times faster than Java!!

  2. Python (Powerful object oriented scripting language).

  3. PHP Web server scripting, HTML, DHTML with Javascrpt client
     scripting and Java-Applets.

  4. Perl scripting language using Perl-Qt or Perl-Tk ``''

  5. Omnipresent and Omnipotent language C++ (GNU g++):

    Fast CGI(written in GNU C++) with Javascript/Java-Applets as Web-
     GUI-frontend.

    GNU C++ and QtEZ or QT

    GNU C++ with Lesstiff or Motif.

  There are other tools available - PostgreSQL has Tcl/Tk interface
  library in the distribution called 'pgTcl'.  There is a IDE
  (integrated development environment) for Tcl/Tk called SpecTcl.


    Lesstiff Motif tool
     <ftp://ftp.redhat.com/pub/contrib/i386/lesstiff*.rpm>

    Vibe Java/C++ is at  <http://www.LinuxMall.com/products/00487.html>

    JccWarrior  <ftp://ftp.redhat.com/pub/contrib/i386/jcc*.rpm>

    Tcl/Tk  <http://www.scriptics.com>

    Object oriented extension of Tcl called INCR at
     <http://www.tcltk.com>

    Visual TCL site  <http://www.neuron.com>

    Visual TCL Redhat rpm at
     <ftp://ftp.redhat.com/pub/contrib/i386/visualtcl*.rpm>

    <http://sunscript.sun.com/>

    <http://sunscript.sun.com/TclTkCore/>

    <ftp://ftp.sunlabs.com/pub/tcl/tcl8.0a2.tar.Z>

    Java FreeBuilder  <ftp://ftp.redhat.com/pub/contrib/i386/free*.rpm>

    SpecTCL  <ftp://ftp.redhat.com/pub/contrib/i386/spec*.rpm>

    Java RAD Tool for PostgreSQL Kanchenjunga
     <http://www.man.ac.uk/~whaley/kj/kanch.html>

    Applixware Tool  <http://www.redhat.com>

    XWPE X Windows Programming Environment
     <http://www.identicalsoftware.com/xwpe/> or at
     <http://www.rpi.edu/~payned/xwpe/>
     <ftp://ftp.redhat.com/pub/contrib/i386/xwpe*.rpm>

    XWB X Windows Work Bench
     <ftp://ftp.redhat.com/pub/contrib/i386/xwb*.rpm>

    NEdit  <ftp://ftp.redhat.com/pub/contrib/i386/nedit*.rpm>

     You can also use Borland C++ Builder, Delphi, Borland JBuilder,
     PowerBuilder on Windows95 connecting to PostgreSQL on unix box
     through ODBC/JDBC drivers.


  12.  Interface Drivers for PostgreSQL


  12.1.  ODBC Drivers for PostgreSQL

  ODBC stands for 'Open DataBase Connectivity' established by Microsoft,
  is a popular standard for accessing information from various databases
  from different vendors. Applications written using the ODBC drivers
  are guaranteed to work with various databases like PostgreSQL, Oracle,
  Sybase, Informix etc..


    PostODBC <http://www.insightdist.com/psqlodbc> is already included
     in the distribution. See main web site
     <http://www.postgresql.org>. It is included on the PostgreSQL
     CDROM.

    Open source code ODBC project is at  <http://www.iodbc.org>

    <http://www.openlinksw.com> Open Link Software Corporation is
     selling ODBC for PostgreSQL and other databases.  Open Link also is
     giving away free ODBC (limited seats) check them out.

    Insight ODBC for PostgreSQL  <http://www.insightdist.com/psqlodbc>
     This is the official PostODBC site.

    FreeODBC package  <http://www.ids.net/~bjepson/freeODBC/> This is a
     free of cost version of ODBC.

  12.2.  UDBC Drivers for PostgreSQL

  UDBC is a static version of ODBC independent of driver managers and
  DLL support, used to embed database connectivity support directly into
  applications.

    <http://www.openlinksw.com> Open Link Software Corporation is
     selling UDBC for PostgreSQL and other databases.  Open Link also is
     giving away free UDBC (limited seats) check them out.

  12.3.  JDBC Drivers for PostgreSQL

  JDBC stands for 'Java DataBase Connectivity'. Java is a platform
  independent programming language developed by Sun Microsystems. Java
  programmers are encouraged to write database applications using the
  JDBC to facilitate portability across databases like PostgreSQL,
  Oracle, informix, etc. If you write Java applications you can get JDBC
  drivers for PostgreSQL from the following sites:

  JDBC driver is already included in the PostgreSQL distribution in
  postgresql-jdbc*.rpm.


    <http://www.demon.co.uk/finder/postgres/index.html> Sun's Java
     connectivity to PostgreSQL

    <ftp://ftp.ai.mit.edu/people/rst/rst-jdbc.tar.gz>

    <http://www.openlinksw.com> Open Link Software Corporation is
     selling JDBC for PostgreSQL and other databases.  Open Link also is
     giving away free JDBC (limited seats) check them out.

    JDBC UK site  <http://www.retep.org.uk/postgres>

    JDBC FAQ site  <http://eagle.eku.edu/tools/jdbc/faq.html>


  The JDBC home, guide and FAQ are located at -

    JDBC HOME  <http://splash.javasoft.com/jdbc>

    JDBC guide
     <http://www.javasoft.com/products/jdk/1.1/docs/guide/jdbc>

    JDBC FAQ  <http://javanese.yoyoweb.com/JDBC/FAQ.txt>

     See the section - ``Testing Java PostgreSQL interface''

  12.4.  Java for PostgreSQL

  Java programmers can find these for PostgreSQL very useful.

    <ftp://ftp.redhat.com/pub/contrib/i386> and see postgresql-
     jdbc-*.rpm

    <http://www.blackdown.org>

     See the section - ``Testing Java PostgreSQL interface''

  13.  Perl Database Interface (DBI) Driver for PostgreSQL


  13.1.  Perl 5 interface for PostgreSQL

  PERL is an acronym for 'Practical Extraction and Report Language'.
  Perl is available on each and every operating system and hardware
  platform in the world.  You can use Perl on Windows95/NT, Apple
  Macintosh iMac, all flavors of Unix (Solaris, HPUX, AIX, Linux, Irix,
  SCO etc..), mainframe MVS, desktop OS/2, OS/400, Amdahl UTS and many
  others.  Perl runs EVEN on many unpopular or generally-unknown
  operating systems and hardware!!  So do not be surprised if you see
  perl running on a very rarely used operating system.  You can imagine
  the vast extent of the user base and developer base of Perl.

  Perl interface for PostgreSQL is included in the distribution of
  PostgreSQL. Check in src/pgsql_perl5 directory.

    Pgsql_perl5 contact Email: E.Mergl@bawue.de

    Another source from -
     <ftp://ftp.kciLink.com/pub/PostgresPerl-1.3.tar.gz>

    Perl Home page :  <http://www.perl.com/perl/index.html>

    Perl tutorial, look for Tutorial title at :
     <http://reference.perl.com/>

    Perl FAQ is at :
     <http://www.yahoo.com/Computers_and_Internet/Programming_Languages/Perl/>

    Perl GUI User Interfaces Perl-Qt rpm :
     <ftp://ftp.redhat.com/pub/contrib/i386> and look for
     PerlQt-1.06-1.i386.rpm

    Perl GUI User Interfaces Perl-Qt :
     <http://www.accessone.com/~jql/perlqt.html>

    Perl GUI User Interfaces Perl-XForms :
     <ftp://ftp.redhat.com/pub/contrib/i386> and look for
     Xforms4Perl-0.8.4-1.i386.rpm

    Perl GUI User Interfaces Perl-Tk :
     <ftp://ftp.redhat.com/pub/contrib/i386>
    Perl GUI kits :  <http://reference.perl.com/query.cgi?ui>

    Perl Database Interfaces :
     <http://reference.perl.com/query.cgi?database>

    Perl to "C" translator :  <http://www.perl.com/CPAN-
     local/modules/by-module/B/> and look for Compiler-a3.tar.gz

    Bourne shell to Perl translator :
     <http://www.perl.com/CPAN/authors/id/MERLYN/sh2perl-0.02.tar.gz>

    awk to Perl a2p and sed to Perl s2p is included with the PERl
     distribution.

    See also the newsgroups for PERL at comp.lang.perl.*

  13.2.  Perl Database Interface DBI

  13.2.1.  WHAT IS DBI ?

  The Perl Database Interface (DBI) is a database access Application
  Programming Interface (API) for the Perl Language. The Perl DBI API
  specification defines a set of functions, variables and conventions
  that provide a consistent database interface independent of the actual
  database being used.

    DBI FAQ author Descartes Hermetica is at descarte@hermetica.com

  13.2.2.  DBI driver for PostgreSQL DBD-Pg-0.89

  Get DBD-Pg-0.89.tar.gz from below

    DBD-Pg-0.89 :  <http://www.perl.com/CPAN/modules/by-module/DBD/>

    Comprehensive Perl Archive Network CPAN  <http://www.perl.com/CPAN>

    DBI drivers list and DBI module pages
     <http://www.hermetica.com/technologia/perl/DBI>

    DBI information is at  <http://www.fugue.com/dbi/>

    Primary ftp site  <ftp://ftp.demon.co.uk/pub/perl/db>

    Miscellaneous DBI link  <http://www-ccs.cs.umass.edu/db.html>

    Miscellaneous DBI link
     <http://www.odmg.org/odmg93/updates_dbarry.html>

    Miscellaneous DBI link  <http://www.jcc.com/sql_stnd.html>

    PostgreSQL database  <http://www.postgresql.org>

  13.2.3.  Technical support for DBI


    Send comments and bug-reports to and include the output of perl -v,
     and perl -V, the version of PostgreSQL, the version of DBD-Pg, and
     the version of DBI in your bug-report.  E.Mergl@bawue.de

  13.2.4.  What is DBI, DBperl, Oraperl and *perl?

  To quote Tim Bunce, the architect and author of DBI:

  ``DBI is a database access Application Programming Interface (API) for
  the Perl Language. The DBI API Specification defines a set of
  functions, variables and conventions that provide a consistent
  database interface independent of the actual database being used.''

  In simple language, the DBI interface allows users to access multiple
  database types transparently. So, if you connecting to an Oracle,
  Informix, mSQL, Sybase or whatever database, you don't need to know
  the underlying mechanics of the 3GL layer. The API defined by DBI will
  work on all these database types.

  A similar benefit is gained by the ability to connect to two different
  databases of different vendor within the one perl script, ie, I want
  to read data from an Oracle database and insert it back into an
  Informix database all within one program. The DBI layer allows you to
  do this simply and powerfully.

  Here's a list of DBperl modules, their corresponding DBI counterparts
  and support information. DBI driver queries should be directed to the
  dbi-users mailing list.


           Module Name Database Required   Author          DBI
           ----------- -----------------   ------          ---
           Sybperl     Sybase              Michael Peppler DBD::Sybase
                                           <mpeppler@datamig.com>
                                           http://www.mbay.net/~mpeppler
           Oraperl     Oracle 6 & 7        Kevin Stock     DBD::Oracle
                                           <dbi-users@fugue.com>
           Ingperl     Ingres              Tim Bunce &     DBD::Ingres
                                           Ted Lemon
                                           <dbi-users@fugue.com>
           Interperl   Interbase           Buzz Moschetti  DBD::Interbase
                                           <buzz@bear.com>
           Uniperl     Unify 5.0           Rick Wargo      None
                                           <rickers@coe.drexel.edu>
           Pgperl      Postgres            Igor Metz       DBD::Pg
                                           <metz@iam.unibe.ch>
           Btreeperl   NDBM                John Conover    SDBM?
                                           <john@johncon.com>
           Ctreeperl   C-Tree              John Conover    None
                                           <john@johncon.com>
           Cisamperl   Informix C-ISAM     Mathias Koerber None
                                           <mathias@unicorn.swi.com.sg>
           Duaperl     X.500 Directory     Eric Douglas    None
                       User Agent



  However, some DBI modules have DBperl emulation layers, so, DBD::Ora
  cle comes with an Oraperl emulation layer, which allows you to run
  legacy oraperl scripts without modification. The emulation layer
  translates the oraperl API calls into DBI calls and executes them
  through the DBI switch.


  13.2.5.  DBI specifications

  There are a few information sources on DBI.

    DBI Specification
     <http://www.hermetica.com/technologia/perl/DBI/doc/dbispec>

     POD documentation PODs are chunks of documentation usually embedded
     within perl programs that document the code ``in place'', providing
     a useful resource for programmers and users of modules. POD for DBI
     and drivers is beginning to become more commonplace, and
     documentation for these modules can be read with the following
     commands.


  ______________________________________________________________________
  The POD for the DBI Specification can be read with the command
          $ perldoc DBI

  Users of the Oraperl emulation layer bundled with DBD::Oracle, may
  read up on how to program with the Oraperl interface by typing:
          $ perldoc Oraperl

  Users of the DBD::mSQL module may read about some of the private
  functions and quirks of that driver by typing:
          $ perldoc DBD::mSQL

  The Frequently Asked Questions is also available as
  POD documentation. Read this by typing:
          $ perldoc DBI::FAQ

  POD in general - Information on writing POD, and on the philosophy of POD in
  general, can be read by typing:
          $ perldoc perlpod
  ______________________________________________________________________


  Users with the Tk module installed may be interested to learn there is
  a Tk-based POD reader available called tkpod, which formats POD in a
  convenient and readable way.

  See also -

    Information from DBI mailing lists
     <http://www.hermetica.com/technologia/perl/DBI/tidbits>

    DBI Perl Journal website  <http://www.tpj.com>

    ``DBperl'' This article, published in the November 1996 edition of
     ``Dr. Dobbs Journal''.

    ``The Perl5 Database Interface'' a book to be written by Alligator
     Descartes and published by O'Reilly and Associates.

  The mailing lists that users may participate in are:

    Mailing lists  <http://www.fugue.com/dbi>

    dbi-announce Email: dbi-announce-request@fugue.com with a message
     body of 'subscribe'

    dbi-dev For developers Email: dbi-dev-request@fugue.com with a
     message body of 'subscribe'

    dbi-users general discussion Email: dbi-users-request@fugue.com
     with a message body of 'subscribe'

    US Mailing List Archives  <http://outside.organic.com/mail-
     archives/dbi-users/>

    European Mailing List Archives  <http://www.rosat.mpe-
     garching.mpg.de/mailing-lists/PerlDB-Interest>

  13.2.6.  Compilation problems or "It fails the test"

  If you have a core dump, try the Devel::CoreStack module for
  generating a stack trace from the core dump.  Devel::CoreStack can be
  found on CPAN at:
    <http://www.perl.com/cgi-bin/cpan_mod?module=Devel::CoreStack>

  Email the dbi-users Mailing List stack trace, module versions, perl
  version, test cases, operating system versions and any other pertinent
  information.  The more information you send, the quicker developers
  can track problems down.

  13.2.7.  Is DBI supported under Windows 95 / NT platforms?

  The DBI and DBD::Oracle Win32 ports are now a standard part of DBI,
  so, downloading DBI of version higher than 0.81 should work fine.  You
  can access Microsoft Access and SQL-Server databases from DBI via
  ODBC.  Supplied with DBI-0.79 (and later) is an experimental DBI
  'emulation layer' for the Win32::ODBC module. It's called
  DBI::W32ODBC.  You will need the Win32::ODBC module.

    Win32 DBI    <http://www.hermetica.com/technologia/perl/DBI/win32>

    Win32 ODBC    <http://www.roth.net>

  13.2.8.  Is DBI any use for CGI programming?

  In a word, yes! DBI is hugely useful for CGI programming! In fact, CGI
  programming is one of two top uses for DBI.

  DBI confers the ability to CGI programmers to power WWW-fronted
  databases to their users, which provides users with vast quantities of
  ordered data to play with. DBI also provides the possibility that, if
  a site is receiving far too much traffic than their database server
  can cope with, they can upgrade the database server behind the scenes
  with no alterations to the CGI scripts.

  13.2.9.  How do I get faster connection times with DBD Oracle and CGI?

  The Apache httpd maintains a pool of httpd children to service client
  requests.  Using the Apache mod_perl module by Doug MacEachern, the
  perl interpreter is embedded with the httpd children. The CGI, DBI,
  and your other favorite modules can be loaded at the startup of each
  child. These modules will not be reloaded unless changed on disk.  For
  more information on Apache, see the Apache Project's WWW site:

    Apache Project WWW site  <http://www.apache.org>

    Mod_perl module  <http://www.perl.com/cgi-
     bin/cpan_mod?module=mod_perl>

  13.2.10.  How do I get persistent connections with DBI and CGI?

  Using Edmund Mergl's Apache::DBI module, database logins are stored in
  a hash with each of these httpd child. If your application is based on
  a single database user, this connection can be started with each
  child.  Currently, database connections cannot be shared between httpd
  children.  Apache::DBI can be downloaded from CPAN via:

    <http://www.perl.com/cgi-bin/cpan_mod?module=Apache::DBI>

  13.2.11.  ``When I run a perl script from the command line, it works,
  but, when I run it under the httpd, it fails!'' Why?

  Basically, a good chance this is occurring is due to the fact that the
  user that you ran it from the command line as has a correctly
  configured set of environment variables, in the case of DBD::Oracle,
  variables like $ORACLE_HOME, $ORACLE_SID or TWO_TASK.  The httpd
  process usually runs under the user id of nobody, which implies there
  is no configured environment. Any scripts attempting to execute in
  this situation will correctly fail.  To solve this problem, set the
  environment for your database in a BEGIN ( ) block at the top of your
  script. This will solve the problem.  Similarly, you should check your
  httpd error logfile for any clues, as well as the ``Idiot's Guide To
  Solving Perl / CGI Problems'' and ``Perl CGI Programming FAQ'' for
  further information. It is unlikely the problem is DBI-related. Read
  BOTH these documents carefully!

    Guide to Solving Perl CGI problems
     <http://www.perl.com/perl/faq/index.html>

  13.2.12.  Multi-threading with DBI?

  For some OCI example code for Oracle that has multi-threaded SELECT
  statements, see:

    <http://www.hermetica.com/technologia/oracle/oci/orathreads.tar.gz>

  13.2.13.  How can I invoke stored procedures with DBI?

  Assuming that you have created a stored procedure within the target
  database, eg, an Oracle database, you can use $dbh->do to immediately
  execute the procedure. For example,

  $dbh->do( "BEGIN someProcedure END" );

  13.2.14.  How can I get return values from stored procedures with DBI?

  Remember to perform error checking, though!


           $sth = $dbh->prepare( "BEGIN foo(:1, :2, :3); END;" );
           $sth->bind_param(1, $a);
           $sth->bind_param_inout(2, \$path, 2000);
           $sth->bind_param_inout(3, \$success, 2000);
           $sth->execute;



  13.2.15.  How can I create or drop a database with DBI?

  Database creation and deletion are concepts that are entirely too
  abstract to be adequately supported by DBI. For example, Oracle does
  not support the concept of dropping a database at all! Also, in
  Oracle, the database server essentially is the database, whereas in
  mSQL, the server process runs happily without any databases created in
  it. The problem is too disparate to attack.  Some drivers, therefore,
  support database creation and deletion through the private func
  methods. You should check the documentation for the drivers you are
  using to see if they support this mechanism.

  13.2.16.  How are NULL values handled by DBI?

  NULL values in DBI are specified to be treated as the value undef.
  NULLs can be inserted into databases as NULL, for example:


           $rv = $dbh->do( "INSERT INTO table VALUES( NULL )" );



  but when queried back, the NULLs should be tested against undef. This
  is standard across all drivers.


  13.2.17.  What are these func methods all about?

  The func method is defined within DBI as being an entry point for
  database-specific functionality, eg, the ability to create or drop
  databases. Invoking these driver-specific methods is simple, for
  example, to invoke a createDatabase method that has one argument, we
  would write:


           $rv = $dbh->func( 'argument', 'createDatabase' );



  Software developers should note that the func methods are non-portable
  between databases.

  13.2.18.  Commercial Support and Training

  PERL CLINIC : The Perl Clinic can arrange commercial support contracts
  for Perl, DBI, DBD::Oracle and Oraperl. Support is provided by the
  company with whom Tim Bunce, author of DBI, works. For more
  information on their services, please see :

    <http://www.perl.co.uk/tpc>

  13.3.  Testing Perl interface

  See the section - ``Testing Perl PostgreSQL interface''

  14.  PostgreSQL Management Tools


  14.1.  PGACCESS - A GUI Tool for PostgreSQL Management

  PgAccess is a Tcl/Tk interface to PostgreSQL.  It is already included
  in the distribution of PostgreSQL.  You may want to check out this web
  site for a newer copy

    <http://www.flex.ro/pgaccess>

    If you have any comment, suggestion for improvements, e-mail to :
     teo@flex.ro

     Usage of pgaccess -

     ___________________________________________________________________
     # man xhost
     # xhost +
     # su - postgres
     bash$ man pgaccess
     bash$ export DISPLAY=<hostname>:0.0
     bash$ pgaccess mydatabase
     ___________________________________________________________________



  Features of PgAccess

  PgAccess windows - Main window, Table builder, Table(query) view,
  Visual query builder.

  Tables

    opening tables for viewing, max 200 records (changed by preferences
     menu)
    column resizing, dragging the vertical grid line (better in table
     space rather than in the table header)

    text wrap in cells - layout saved for every table

    import/export to external files (SDF,CSV)

    filter capabilities (enter filter like (price>3.14)

    sort order capabilities (enter manually the sort field(s))

    editing in place

    improved table generator assistant

    improved field editing

  Queries

    define , edit and stores "user defined queries"

    store queries as views

    execution of queries

    viewing of select type queries result

    query deleting and renaming

    Visual query builder with drag & drop capabilities. For any of you
     who had installed the Tcl/Tk plugin for Netscape Navigator, you can
     see it at work clicking here

  Sequences

    defines sequences, delete them and inspect them Functions

    define, inspect and delete functions in SQL language

  Future implementation will have

    table design (add new fields, renaming, etc.)

    function definition

    report generator

    basic scripting

  INFORMATION ABOUT LIBGTCL

  You will need the PostgreSQL to Tcl interface library libgtcl, lined
  as a Tcl/Tk 'load'-able module. The libpgtcl and the source is located
  in the PostgreSQL directory /src/interfaces/libpgtcl. Specifically,
  you will need a libpgtcl library that is 'load'-able from Tcl/Tk. This
  is technically different from an ordinary PostgreSQL loadable object
  file, because libpgtcl is a collection of object files. Under Linux,
  this is called libpgtcl.so.  You can download from the above site a
  version already compiled for Linux i386 systems. Just copy libpgtcl.so
  into your system library director (/usr/lib).  One of the solutions is
  to remove from the source the line containing load libpgtcl.so and to
  load pgaccess.tcl not with wish, but with pgwish (or wishpg) that wish
  that was linked with libpgtcl library.

  If you get crypt not found during compilation pgaccess source tree
  then use -lcrypt.
  14.2.  Windows Interactive Query Tool for PostgreSQL (WISQL or MPSQL)

  MPSQL provides users with a graphical SQL interface to PostgresSQL.
  MPSQL is similar to Oracle's SQL Worksheet and Microsoft SQL Server's
  query tool WISQL.  It has nice GUI and has history of commands. Also
  you can cut and paste and it has other nice features to improve your
  productivity.

    <http://www.troubador.com/~keidav/index.html>

    Email: keidav@whidbey.com

    <http://www.ucolick.org/~de/> in file tcl_syb/wisql.html

    <http://www.troubador.com/~keidav/index.html>

    Email: de@ucolick.org

  14.3.  Interactive Query Tool (ISQL) for PostgreSQL called PSQL

  ISQL is for character command line terminals.  This is included in the
  distribution, and is called "psql". Very similar to Sybase ISQL,
  Oracle SQLplus. At unix prompt give command 'psql' which will put you
  in psql> prompt.


       bash# su - postgres
       bash$ man psql
       bash$ psql mydatabase
       Type \h to see help of commands.



  Very user friendly and easy to use.  Can also be accessed from shell
  scripts.

  14.4.  MPMGR - A Database Management Tool for PostgresSQL

  MPMGR will provide a graphical management interface for PostgresSQL.
  You can find it at

    <http://www.mutinybaysoftware.com/>

    Email: keidav@mutinybaysoftware.com

    <http://www.troubador.com/~keidav/index.html>

    Email: keidav@whidbey.com

    <http://www.ucolick.org/~de> in file tcl_syb/wisql.html

    WISQL for PostgreSQL  <http://www.ucolick.org/~de/Tcl/pictures>

    Email: de@ucolick.org

  15.  CPUs for PostgreSQL

  The following CPUs (both 64-bit and 32-bit) are available for
  PostgreSQL. All these CPUs run Linux.

    GNU/GPL Freedom 64-bit F-CPU   <http://f-cpu.tux.org>

    Russian E2k 64-bit CPU (The world's fastest CPU as of June, 2000
     ???!!!)  website :  <http://www.elbrus.ru/roadmap/e2k.html> Elbrus
     is now partnered (alliance) with Sun Microsystems of USA
    Korean CPU from Samsung 64-bit CPU original from DEC Alpha
     <http://www.samsungsemi.com> Alpha-64bit CPU is at
     <http://www.alpha-processor.com> Now there is collaboration between
     Samsumg, Compaq of USA on Alpha CPU

    Intel IA 64  <http://developer.intel.com/design/ia-64>

    Transmeta crusoe CPU and in near future Transmeta's 64-bit CPU

    Sun Ultra-sparc 64-bit CPU

    Silicon Graphics MIPS Architecture CPUs
     <http://www.sgi.com/processors>

    IBM Power PC (motorola)
     <http://www.motorola.com/SPS/PowerPC/index.html>

    Seimens Pyramid CPU from Pyramid Technologies

    Intel X86 series 32-bit CPUs Pentiums, Celeron etc..

    AMDs X86 series 32-bit CPUs K-6, Athlon etc..

    National's Cyrix X86 series 32-bit CPUs Cyrix etc..

    European Space Agency's ESA-32bit and ESA-64bit CPUs

    Other CPUs from other countries ?? Let me know...

  16.  Setting up multi-boxes PostgreSQL with just one monitor

  If you do want to spend money on hardware switches than you can use
  VNC (Virtual Network Computing) Technology from the telecom giant AT &
  T. VNC is GPLed and is a free software. Using VNC you can run
  PostgreSQL programs on computers without monitors and display on
  remote boxes with monitors!! But the boxes must be connected via
  ethernet Network Interface Cards.  VNC is at
  <http://www.uk.research.att.com/vnc>

  You can stack up multiple CPU-boxes and connect to just one monitor
  and use the KVM (Keyboard, Video, Monitor) switch box to select the
  host.  This saves space and avoids a lot of clutter and also
  eliminates monitor, keyboard and the mouse (saving anywhere from 100
  to 500 US dollars per set).

  Using this switch box, you can stack up many PostgreSQL servers
  (development, test, production), Web servers, ftp servers, Intranet
  servers, Mail servers, News servers in a tower shelf. The switch box
  can be used for controlling Windows 95/NT or OS/2 boxes as well.

  Please check out these sites:

    DataComm Warehouse Inc at 1-800-328-2261. They supply all varieties
     of computer hardware  <http://www.warehouse.com> 4-port Manual KVM
     switch (PS/2) is about $89.99 Part No. DDS1354

    Network Technologies Inc
     <http://www.networktechinc.com/servswt.html> (120 dollars/PC 8
     ports) which lists

    Scene Double Inc, England
     <http://www.scene.demon.co.uk/qswitch.htm>

    Cybex corporation  <http://www.cybex.com>


    Raritan Inc  <http://www.raritan.com>

    RealStar Solutions Inc  <http://www.real-star.com/kvm.htm>

    Belkin Inc  <http://www.belkin.com>

    Better Box Communications Ltd.
     <http://www.betterbox.com/info.html>

    Go to nearest hardware store and ask for "Server Switch" also known
     as "KVM Auto Switches".

  Search engine yahoo to find more companies with "Server Switches" or
  "KVM Switches".

  It is strongly recommended to have a dedicated unix box for each
  PostgreSQL data-server for better performance. No other application
  program/processes should run on this box. See the Business section of
  your local newspapers for local vendors selling only intel box, 13"
  monochrome monitor (very low cost monitor). Local vendors sell just
  the hardware without any Microsoft Windows/DOS.  You do not need a
  color monitor for the database server, as you can do remote
  administration from color PC workstation.

  You can buy bare-bone computer hardware from online stores. You can
  get good rates in "Online Auctions"

    Online store and auction hall  <http://www.egghead.com>

    Online store  <http://www.buy.com>

    Bidding store  <http://www.ubid.com>

  Get RedHat (or some other distribution of) Linux cdrom from below -

    Linux System Labs Web site:   <http://www.lsl.com/>  7 (U.S.
     dollars)

    Cheap Bytes Inc Web site:   <http://www.cheapbytes.com/> 7 (U.S.
     dollars)

     Make sure that the hardware you purchase is supported by Redhat
     Linux. Check the ftp site of Redhat for recommended hardware like
     SCSI adapters, video cards before buying.  For just $ 600 you will
     get a powerful intel box with Redhat Linux running PostgreSQL.  Use
     odbc/jdbc/perl/tcl to connect to PostgreSQL from Windows95, OS/2,
     Unix Motif or web browser (e.g. Redbaron, Opera, Netscape, 20
     others).  (Web browsers are very fast becoming the standard GUI
     client).

  Using KVM switch you can control many cpu boxes by just one monitor
  and one keyboard!

  17.  Web-Application-Servers for PostgreSQL

  Several Web-Application-Servers work with PostgreSQL both open-source
  and commercial versions. The popular open-source Web-Application-
  Servers are Enhydra and Zope and commercial Web-Application-Servers
  are IBM Websphere, BEA Weblogic.

  17.1.  Lutris Corp "Enhydra"

  Enhydra supports PostgreSQL database.  Enhydra is a immensely popular
  Java/XML Web-Application-Server created by 'Lutris Corporation'. It is
  the world's best Java/XML Web-Application server.  It supports EJB,
  Servlets, JSP, JNDI, JDBC, JTA, CORBA, XMLC/Rocks, DODS and
  internationalization.  It is written in 100% pure Java and is
  available from <http://www.enhydra.org>. Enhydra is a open source code
  project but is commercially sold and supported by Lutris Corp. Visit
  <http://www.lutris.com>

  You would use Borland Corp's JBuilder along with Enhydra. JBuilder is
  at <http://www.inprise.com>

  See also Enterprise Java HOWTO at
  <http://www.linuxdoc.org/HOWTO/Enterprise-Java-for-Linux-HOWTO.html>

  17.2.  Zope

  Python is becoming immensely popular "pure" object-oriented scripting
  language.  Zope is a Web-Application server and provides interfaces to
  PostgreSQL.  Zope is available at  <http://www.zope.org> Python is at
  <http://www.python.org>

  18.  Applications and Tools for PostgreSQL


  18.1.  PostgreSQL 4GL for web database applications - AppGEN Develop
  ment System

  AppGEN can be downloaded from

    <http://www.man.ac.uk/~whaley/ag/appgen.html>

    <ftp://ftp.mcc.ac.uk/pub/linux/ALPHA/AppGEN>.

     AppGEN is a high level fourth generation language and application
     generator for producing World Wide Web (WWW) based applications.
     These applications are typically used over the internet or within a
     corporate intranet. AppGEN applications are implemented as C
     scripts conforming to the Common Gateway Interface (CGI) standard
     supported by most Web Servers.

  To use AppGEN you will need the following :-

  PostgresSQL, relational database management system

  A CGI compatible web server such as NCSA's HTTPD

  An ansi C compiler such as GCC

  AppGEN consists of the following Unix (Linux) executables :-


    defgen, which produces a basic template application from a logical
     data structure. The applications are capable of adding, updating,
     deleting and searching for records within the database whilst
     automatically maintaining referential integrity.


    appgen, the AppGEN compiler which compiles the appgen source code
     into CGI executable C source and HTML formatted documents ready for
     deployment on a web server.


    dbf2sql, a utility fo converting dBase III compatible .dbf files
     into executable SQL scripts. This enables data stored in most
     DOS/Windows based database packages to be migrated to a SQL server
     such as PostgresSQL.

    In addition, AppGEN comprises of a collection of HTML documents,
     GIF files and Java applets which are used at runtime by the system.
     And of course, like all good software, the full source code is
     included.

  The author, Andrew Whaley, can be contacted on

    andrew@arthur.smuht.nwest.nhs.uk

  18.2.  WWW Web interface for PostgresSQL - DBENGINE

  dbengine a plug 'n play Web interface for PostgreSQL created by Ingo
  Ciechowski. It is at

    <http://www.cis-computer.com/software/dbengine>

     About DBENGINE : dbengine is an interface between the WWW and
     Postgres95 which provides simple access to any existing database
     within just a few minutes.

  PHP gives you a Perl like language in your documents, but no real Perl
  while AppGen and wdb-p95 require that you create some configuration
  file for each of your databases -- sound's like you'll first of all
  have to learn some sort of new meta language before you can get
  started.

  Unlike other tools you don't have to learn any special programming or
  scripting language to get started with dbengine. Also there's no
  configuration file for each database, so you don't have to get
  familiar with such a new structure.  However - in case you want to
  gain access to the full features of dbengine it'd be a good idea to
  know the Perl language.

  The whole system can be configured by simple manipulations of an
  additional database that contains closer information about how to
  visualize your database access.  You can even specify virtual Fields
  which are calculated on the fly right before they're displayed on the
  screen.

  18.3.  Apache Webserver Module for PostgreSQL - NeoSoft NeoWebScript

  Apache is a well-known Web Server. And a module to interface
  PostgreSQL to Apache Webserver is at -

    <http://www.neosoft.com/neowebscript/>

     NeoWebScript is a programming language that allows both simple and
     complex programs to be embedded into HTML files.

  When an HTML page containing embedded NeoWebScript is requested, the
  NeoWebScript-enabled webserver executes the embedded script(s),
  producing a webpage containing customized content created by the
  program.

  NeoWebScript is a fast, secure, easy to learn way to do powerful,
  server-based interactive programming directly in the HTML code in web
  pages. With NeoWebScript, counters, email forms, graffiti walls, guest
  books and visitor tracking are all easy, even for a beginning
  programmer. See how well NeoWebScript holds its' own vs. PERL and
  JavaScript.

  If you'd like to install NeoWebScript on your webserver, your
  Webmaster needs to read our Sysop FAQ to get started. Theory of
  Operations will explain how NeoWebScript works, while installation
  will take them through the steps. Management deals with configuration
  issues and running the server, tests let you verify correct
  NeoWebScript operation, and troubleshooting deals with server
  problems.
  There is no cost to you to use NeoWebScript-2.2 for your ISP, your
  intranet, or your extranet.  You'll see a full license when you
  register to download, but it costs $ 99 if you want to embed it in
  your own product or use it in a commerce (eg. SSL) server.

  NeoWebScript is a module for the Apache webserver that allows you to
  embed the Tcl/Tk programming language in your webpages as a scripting
  tool. It was invented by Karl Lehenbauer, NeoSoft's Chief Technical
  Officer, and documented, enhanced and extended by NeoSoft's
  programmers and technical writers.

  The Apache webserver is the world's most popular webserver, accounting
  for 68 % of the sites polled.

  Tcl/Tk is the powerful, free, cross-platform scripting language
  developed by Dr. John Ousterhout. In his own words

  "Tcl/Tk lets software developers get the job done ten times faster
  than with toolkits based on C or C++. It's also a great glue language
  for making existing applications work together and making them more
  graphical and Internet-aware."

  Karl Lehenbauer, Founder and Chief Technical Officer of NeoSoft, has
  been part of Tcl/Tk development from the very beginning.  Together
  with Mark Diehkans, they authored Extended Tcl, also known as TclX or
  NeoSoft Tcl, a powerful set of extensions to the language. Many of the
  current core Tcl commands originated in Extended Tcl, and were then
  imported into the core language by Dr.  Ousterhout.

  NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA

  18.4.  HEITML server side extension of HTML and a 4GL language for
  PostgreSQL

  Tool heitml is another way to interface postgres with the world wide
  web.  For more details contact


                 Helmut Emmelmann H.E.I. Informationssyteme GmbH
                 Wimpfenerstrasse 23 Tel. 49-621-795141
                 68259 Mannheim Germany Fax. 49-621-795161



    E-mail Mr.Helmut Emmelmann at emmel@h-e-i.de

    Heitml main web site  <http://www.heitml.com>

    Heitml secondary web site  <http://www.h-e-i.deom>

  heitml is a server side extension of HTML and a 4GL language at the
  same time. People can write web applications in the HTML style by
  using new HTML-like tags.

  heitml (pronounced "Hi"-TML) is an extension of HTML and a full-
  featured 4th generation language that enables Web-based Applications
  to interact with data stored in SQL databases, without resorting to
  complex CGI scripts.

  heitml extends HTML on the sever side, dynamically converting ".hei"
  files to HTML format and so is compatible with any web browser.It
  embraces the familiar, easy-to-use HTML syntax and provides a large
  assortment of pre-developed Tags and Libraries to take care of tasks
  that formerly required CGI. As XML, heitml provides user defined tags.
  With heitml the user defined markup can be translated to HTML and send
  to a browser.

  heitml targets both HTML designers and professional programmers alike.
  HTML designers can use heitml Tags to build dynamic web pages, access
  SQL databases, or create complete web applications. Counters,
  registration databases, search forms, email forms, or hierarchical
  menues can all be created simply by using the pre-developed HTML-like
  Tags found in the many Component Libraries.

  For programmers heitml embeds a complete forth generation language in
  HTML


                 (e.g. <if>, <while>, and <let> Tags),



  plus powerful expression evaluation with integer, real, boolean,
  string, and tuple data types. Tuples have reference semantics as in
  modern object oriented languages and are stored on a heap. heitml
  variables including all complex data structures stored on the heap
  maintain their values between pages using the Session Mode. It is pos
  sible to define your own tags or environment tags and even re-define
  HTML-tags.

  heitml makes it possible to

  - - - develop Web Sites in a structured and modular way, drastically
  reducing maintenance overhead.

  - - - develop intelligent and interactive Web Sites, with content that
  dynamically adapts itself to user needs.

  - - - show the content of SQL databases with no programming other than
  to use our library of prefined "dba" Tags.

  - - - develop complex database and Catalog Shopping applications using
  Session Variables

  heitml runs on Linux with any Web Server using the CGI interface, and
  is especially fast (avoiding the CGI overhead) within the APACHE Web
  Server using the apache API. Currently MSQL (Version 1 and 2),
  PostgreSQL (Version 6), mysql, and the yard databases are supported).
  heitml also works on Linux, BSDi, Solaris and SunOS, as well as
  Windows NT with CGI and ISAPI and ODBC and Windows 95.

  heitml (on linux) is free for research, non-commercial and private
  usage. Commercial Web Sites must pay a licensing fee. The fully
  operational version of heitml is available for a trial period
  downloaded freely. (Note, however, that each ".hei" Web Page you
  develop will display a message identifying it as the version for non-
  commercial use. After registration, you will receive a key to switch
  off the message without having to re-install the program.)

  heitml (pronounced "Hi"-TML) significantly extends and enhances the
  functionality of HTML by definable tags and full programming features.
  This makes dynamic content and database applications possible simply
  within the HTML world, without CGI and without external scripting or
  programming languages.  This means you, as an HTML author, can embed
  applications in your web pages, simply by using some new tags without
  CGI and without programming. As an advanced user or programmer on the
  other hand you can create and program powerful tag libraries. This
  approach makes heitml suitable for HTML newcomers and professional
  programmers alike.  heitml runs on the web server and dynamically
  generates HTML, so heitml is compatible with the internet standards
  and with any web browser. It allows full access to databases while
  shielding the user from any unneccessary CGI complexity. heitml has
  been developed according to the newst research and in compiler
  construction and transaction systems.

  heitml pages are developed just the same way as HTML pages, with a
  text editor or HTML editor, and placed on the web server as usual.
  However now pages can contain dynamic heitml tags and access tag
  libraries.  You can use these tags to access the database, to create
  dynamic content, to send emails, and even to create powerful
  applications like registration databases and shopping systems.

  HTML newcomers and professional programmers alike will be amazed at
  how quickly and easily they can design exciting applications like our
  Interactive Guestbook without resorting to complex and difficult to
  learn CGI scripts, simply by using the tools provided in our dba
  Library.

  heitml is accompanied by a wide range of tag libraries, to create
  guestbooks, database maintenance applications, extensible query forms,
  powerful email forms or structure your web site using a hierarchic
  menu. These tools are ready to go, just add the corresponding tags to
  your web site.

  As an experienced programmer you can make fully use of the heitml
  persistent dynamic tuple architecture : heitml is not just a scripting
  language with dynamic typing, full power expression evaluation,
  recursive procedures and extensive parameter passing features, but it
  also features persistent dynamic tuples to automatically keep session
  data of any size.

  18.5.  America On-line AOL Web server for PostgreSQL

  The no-cost commercial webserver, AOLserver supports database
  connections to PostgreSQL for more information see

    AOL Web Server home  <http://www.aolserver.com>

    Introduction to AOLserver by Philip Greenspun
     <http://photo.net/wtr/aolserver/introduction-1.html>

     AOLserver is a fast, fully multithreaded, Tcl enabled webserver.
     But not only that, it is a complete database-backed web development
     platform.  With AOLserver you can have multiple pooled connections
     to PostgreSQL (and other RBDMSs) that can be shared among different
     threads. AOLserver has a Tcl and C APIs that allow you to develop
     powerful dynamic websites. All this since 1995. It is licensed
     under the APL (AOLserver Public License) or the GPL, thus being
     totally free software.  The Tcl API is the most useful for web
     sites. AOLserver has a set of powerful Tcl calls, such as
     ns_sendmail (to send e-mail), ns_httpget (to fetch a URL),
     ns_schedule (a cron-like feature to schedule procedures to run at
     specific times), etc. You can also extend AOLserver's capabilities
     very easily with the Tcl API. Each AOLserver virtual server can
     have its own "library" of private Tcl scripts that are parsed by
     AOLserver and become accessible to any page within that virtual
     server.  You can develop pages for AOLserver in three ways: - Plain
     HTML - .tcl pages -- these are tcl programs that can return HTML
     via the ns_write call.  - .adp pages -- AOL Dynamic Pages. You
     develop your pages in plain HTML but you can scape to Tcl code by
     using <% %> or <%= %> much alike PHP or ASP.  While AOLserver is a
     great webserver with a superb architecture, where it really shines
     is in database connectivity. AOLserver has its own database
     abstraction layer that enables you to have it connected to
     different RDBMSs without changing your code at all. The connections
     do the RDBMS are pooled, persistent and are shared among different
     threads.  This allows for very fast connections and efficient use
     of resources.  AOLserver has drivers for all major RDBMSs:
     PostgreSQL, Oracle, Sybase, Informix, Illustra, Solid, Interbase,
     MySQL.

  18.6.  Problem/Project Tracking System Application Tool for PostgreSQL

  This is at

    <http://www.homeport.org/~shevett/pts/>

  18.7.  Convert dbase dbf files to PostgreSQL

  The program dbf2msql works fine with mSQL and PostgreSQL. You can find
  it at

    <ftp://ftp.nerosworld.com/pub/SQL/dbf2sql/>

    <ftp://ftp.postgresql.org/pub/incoming/dbf2pg-3.0.tar.gz>

  This program was written by Maarten Boekhold, Faculty of Electrical
  Engineering TU Delft, NL Computer Architecture and Digital Technique
  section

    M.Boekhold@et.tudelft.nl

  You can also use a python method to read dbf files and load into a
  postgres database.

    See  <http://www.python.org>

  18.8.  Convert Microsoft Access MDB database files to PostgreSQL

  MDB Tools is a planned set of libraries and utilities to facilitate
  exporting data from MS Access databases (mdb files) into a multiuser
  database such as Oracle, Sybase, DB2, Informix, MySQL, Postgresql, or
  similar.

    Get MDB tool from  <http://mdbtools.sourceforge.net>

    Mailing list
     <http://lists.sourceforge.net/mailman/listinfo/mdbtools-dev>

  19.  Web Database Design/Implementation tool for PostgreSQL - EARP


    <http://www.oswego.edu/Earp>

    <ftp://ftp.oswego.edu> in the directory 'pub/unix/earp'.

  19.1.  What is EARP ?

  The "Easily Adjustable Response Program" (EARP) created by David
  Dougherty.  EARP is a Web Database Design/Implementation tool, built
  on top of the PostgreSQL database system. Its functionality includes:


    A Visual Design System.

    A sendmail interface. (can handle incoming and outgoing mail)

    An Enhanced Security Mechanism.

    A cgi driver.

  19.2.  Implementation

  The main implementation of EARP is a CGI binary which runs under the
  http daemon to provide access to the database server. All of the
  design tools are built into the driver, no design takes place over
  anything but the web. The tools themselves require a graphical
  browser, the compatibility of objects designed with the tools is
  implementation independent, based on designing individuals
  preferences.

  19.3.  How does it work ?

  One of the main features of EARP is that it uses an Object Oriented
  approach to producing html pages which interface to the database. Most
  pages will consist of several objects. Each object is produced by some
  sort of tool and given a name, objects are then linked together in a
  callable sequence by the page tool. Objects are also reusable across
  multiple pages.  Basic tools exist for HTML, Querys, Grabbing input
  from forms, Extendable Formatting of Query and Input objects, and
  Linking together of objects into other objects. More advanced tools
  include the mail tool and the multithreaded query tool.

  Another feature of EARP is advanced security. Access to various areas
  of the EARP system can be limited in a variety of ways. To facilitate
  its advanced security, EARP performs checks for each connection to the
  system, determining what ids and groups the connecting agent belongs
  to. Access to areas is defined seperately, and the combination decides
  if access to a specific area of Earp is allowed. Moreover, all that is
  required to implement the security features is an http server that
  supports basic (or better) user authentication.

  19.4.  Where to get EARP ?

  EARP is available via anonymous ftp from

    <ftp://ftp.oswego.edu> in the directory 'pub/unix/earp'.

  20.  PHP Hypertext Preprocessor - Server-side html-embedded scripting
  language for PostgreSQL

  WWW Interface Tool is at -

    <http://www.php.net>

    <http://www.vex.net/php>

     PHP also has a compiler called Zend which will vastly improve the
     performance.  First you will write your application in PHP
     scripting language during development, testing and debugging. Once
     the project is ready for deployment you will use the Zend compiler
     to compile the PHP to create executable which will run very fast.

  Old name is Professional Home Pages (PHP) and new name is PHP
  Hypertext Pre-Processor

    Mirror sites are in many countries like www.COUNTRYCODE.php.net

    <http://www.fe.de.php.net>

    <http://www.sk.php.net>

    <http://php.iquest.net/>

    Questions e-mail to : rasmus@lerdorf.on.ca


  PHP is a server-side html-embedded scripting language. It lets you
  write simple scripts right in your .HTML files much like JavaScript
  does, except, unlike JavaScript PHP is not browser-dependant.
  JavaScript is a client-side html-embedded language while PHP is a
  server-side language.  PHP is similar in concept to Netscape's
  LiveWire Pro product.  If you like free fast-moving software that
  comes with full source code you will probably like PHP.


    The PostgreSQL support code was written by Adam Sussman
     asussman@vidya.com

  20.1.  Major Features


    Standard CGI, FastCGI and Apache module support - As a standard CGI
     program, PHP can be installed on any Unix machine running any Unix
     web server. With support for the new FastCGI standard, PHP can take
     advantage of the speed improvements gained through this mechanism.
     As an Apache module, PHP becomes an extremely powerful and
     lightning fast alternative to CGI programmimg.

    Access Logging - With the access logging capabilities of PHP, users
     can maintain their own hit counting and logging. It does not use
     the system's central access log files in any way, and it provides
     real-time access monitoring. The Log Viewer Script provides a quick
     summary of the accesses to a set of pages owned by an individual
     user. In addition to that, the package can be configured to
     generate a footer on every page which shows access information. See
     the bottom of this page for an example of this.

    Access Control - A built-in web-based configuration screen handles
     access control configuration. It is possible to create rules for
     all or some web pages owned by a certain person which place various
     restrictions on who can view these pages and how they will be
     viewed. Pages can be password protected, completely restricted,
     logging disabled and more based on the client's domain, browser, e-
     mail address or even the referring document.

    PostgresSQL Support - Postgres is an advanced free RDBMS. PHP
     supports embedding PostgreSQL "SQL queries" directly in .html
     files.

    RFC-1867 File Upload Support - File Upload is a new feature in
     Netscape 2.0. It lets users upload files to a web server. PHP
     provides the actual Mime decoding to make this work and also
     provides the additional framework to do something useful with the
     uploaded file once it has been received.

    HTTP-based authentication control - PHP can be used to create
     customized HTTP-based authentication mechanisms for the Apache web
     server.

    Variables, Arrays, Associative Arrays - PHP supports typed
     variables, arrays and even Perl-like associative arrays. These can
     all be passed from one web page to another using either GET or POST
     method forms.

    Conditionals, While Loops - PHP supports a full-featured C-like
     scripting language.  You can have if/then/elseif/else/endif
     conditions as well as while loops and switch/case statements to
     guide the logical flow of how the html page should be displayed.

    Extended Regular Expressions - Regular expressions are heavily used
     for pattern matching, pattern substitutions and general string
     manipulation. PHP supports all common regular expression
     operations.

    Raw HTTP Header Control - The ability to have web pages send
     customized raw HTTP headers based on some condition is essential
     for high-level web site design. A frequent use is to send a
     Location: URL header to redirect the calling client to some other
     URL. It can also be used to turn off cacheing or manipulate the
     last update header of pages.

    On-the-fly GIF image creation - PHP has support for Thomas
     Boutell's GD image library which makes it possible to generate GIF
     images on the fly.

    ISP "Safe Mode" support - PHP supports a unique "Safe Mode" which
     makes it safe to have multiple users run PHP scripts on the same
     server.

    Many more new features are being added in newer releases of PHP.
     Visit the main web site at  <http://www.php.net>

    It's Free! - One final essential feature. The package is completely
     free.  It is licensed under the GNU/GPL which allows you to use the
     software for any purpose, commercial or otherwise.

  20.2.  PHP - Brief History

  PHP began life as a simple little cgi wrapper written in Perl.  The
  name of this first package was Personal Home Page Tools, which later
  became Personal Home Page Construction Kit.

  A tool was written to easily embed SQL queries into web pages. It was
  basically another CGI wrapper that parsed SQL queries and made it easy
  to create forms and tables based on these queries. This tool was named
  FI (Form Interpreter).

  PHP/FI version 2.0 is a complete rewrite of these two packages
  combined into a single program.  It evolved to a simple programming
  language embedded inside HTML files.  PHP eliminates the need for
  numerous small Perl cgi programs by allowing you to place simple
  scripts directly in your HTML files. This speeds up the overall
  performance of your web pages since the overhead of forking Perl
  several times has been eliminated.  It also makes it easier to manage
  large web sites by placing all components of a web page in a single
  html file.  By including support for various databases, it also makes
  it trivial to develop database enabled web pages. Many people find the
  embedded nature much easier to deal with than trying to create
  separate HTML and CGI files.

  Now PHP/FI is renamed as PHP.

  20.3.  So, what can I do with PHP ?

  The first thing you will notice if you run a page through PHP is that
  it adds a footer with information about the number of times your page
  has been accessed (if you have compiled access logging into the
  binary). This is just a very small part of what PHP can do for you. It
  serves another very important role as a form interpreter cgi, hence
  the FI part of the old name. For example, if you create a form on one
  of your web pages, you need something to process the information on
  that form. Even if you just want to pass the information to another
  web page, you will have to have a cgi program do this for you. PHP
  makes it extremely easy to take form data and do things with it.



  20.4.  A simple example

  Suppose you have a form:


       <FORM ACTION="/cgi-bin/php.cgi/~userid/display.html" METHOD=POST>
       <INPUT TYPE="text" name="name">
       <INPUT TYPE="text" name="age">
       <INPUT TYPE="submit">
       <FORM>



  Your display.html file could then contain something like:


       < ?echo "Hi $ name, you are $ age years old!<p>" >



  It's that simple! PHP automatically creates a variable for each form
  input field in your form. You can then use these variables in the
  ACTION URL file.

  The next step once you have figured out how to use variables is to
  start playing with some logical flow tags in your pages. For example,
  if you wanted to display different messages based on something the
  user inputs, you would use if/else logic. In our above example, we can
  display different things based on the age the user entered by changing
  our display.html to:


       <?
           if($age>50);
               echo "Hi $name, you are ancient!<p>";
           elseif($age>30);
               echo "Hi $name, you are very old!<p>";
           else;
               echo "Hi $name.";
           endif;
       >



  PHP provides a very powerful scripting language which will do much
  more than what the above simple example demonstrates. See the section
  on the PHP Script Language for more information.

  You can also use PHP to configure who is allowed to access your pages.
  This is done using a built-in configuration screen. With this you
  could for example specify that only people from certain domains would
  be allowed to see your pages, or you could create a rule which would
  password protect certain pages. See the Access Control section for
  more details.

  PHP is also capable of receiving file uploads from any RFC-1867
  compliant web browser. This feature lets people upload both text and
  binary files. With PHP's access control and logical functions, you
  have full control over who is allowed to upload and what is to be done
  with the file once it has been uploaded. See the File Upload section
  for more details.


  PHP has support for the PostgreSQL database package. It supports
  embedded SQL queries in your .HTML files.

  PHP also has support for the mysql database package. It supports
  embedded SQL queries in your .HTML files.

  20.5.  CGI Redirection


  20.5.1.  Apache 1.0.x Notes

  A good way to run PHP is by using a cgi redirection module with the
  Apache server. Please note that you do not need to worry about
  redirection modules if you are using the Apache module version of PHP.
  There are two of these redirection modules available. One is developed
  by Dave Andersen

    angio@aros.net

     and it is available at

    <ftp://ftp.aros.net/pub/util/apache/mod_cgi_redirect.c>

     and the other comes bundled with Apache and is called
     mod_actions.c. The modules are extremely similar. They differ
     slightly in their usage. Both have been tested and both work with
     PHP.

  Check the Apache documentation on how to add a module. Generally you
  add the module name to a file called Configuration. The line to be
  added if you want to use the mod_actions module is:

  Module action_module mod_actions.o

  If you are using the mod_cgi_redirect.c module add this line:

  Module cgi_redirect_module mod_cgi_redirect.o

  Then compile your httpd and install it. To configure the cgi
  redirection you need to either create a new mime type in your
  mime.types file or you can use the AddType command in your srm.conf
  file to add the mime type. The mime type to be added should be
  something like this:


            application/x-httpd-php phtml



  If you are using the mod_actions.c module you need to add the follow
  ing line to your srm.conf file:


            Action application/x-httpd-php /cgi-bin/php.cgi



  If you are using mod_cgi_redirect.c you should add this line to
  srm.conf:


            CgiRedirect application/x-httpd-php /cgi-bin/php.cgi


  Don't try to use both mod_actions.c and mod_cgi_redirect.c at the same
  time.

  Once you have one of these cgi redirection modules installed and
  configured correctly, you will be able to specify that you want a file
  parsed by PHP simply by making the file's extension .phtml.
  Furthermore, if you add index.phtml to your DirectoryIndex
  configuration line in your srm.conf file then the top-level page in a
  directory will be automatically parsed by php if your index file is
  called index.phtml.

  20.5.2.  Netscape HTTPD

  You can automatically redirect requests for files with a given
  extension to be handled by PHP by using the Netscape Server CGI
  Redirection module. This module is available in the File Archives on
  the PHP Home Page. The README in the package explicitly explains how
  to configure it for use with PHP.

  20.5.3.  NCSA HTTPD

  NCSA does not currently support modules, so in order to do cgi
  redirection with this server you need to modify your server source
  code. A patch to do this with NCSA 1.5 is available in the PHP file
  archives.

  20.6.  Running PHP from the command line

  If you build the CGI version of PHP, you can use it from the command
  line simply typing: php.cgi filename where filename is the file you
  want to parse. You can also create standalone PHP scripts by making
  the first line of your script look something like:


           #!/usr/local/bin/php.cgi -q



  The "-q" suppresses the printing of the HTTP headers. You can leave
  off this option if you like.

  20.7.  PHPGem package

  PHPGem is a PHP-script which accelerates the creation of PHP-scripts
  for working with tables. It works with different SQL-servers such as
  PostgreSQL, MySQL, mSQL, ODBC, and Adabas. You input a description of
  and parameters for your tables' fields (field name, on/off searching
  in the field, etc.), and PHPGem outputs another PHP-script which will
  work with the tables (view/add/edit/delete/duplicate entries and
  search). PHPGem works with multi-level nested tables. PHPGem allows
  you to specify a level of access for each table and for each field for
  each user. PHPGem also support images.

  PHPGem is at  <http://sptl.org/phpgem>

  21.  Python Interface for PostgreSQL

  Python in an interpreted, object orientated scripting language.  It is
  simple to use (light syntax, simple and straighforward statements),
  and has many extensions for building GUIs, interfacing with WWW, etc.
  An intelligent web browser (HotJava like) is currently under
  development (november 1995), and this should open programmers many
  doors. Python is copyrighted by Stichting S Mathematisch Centrum,
  Amsterdam, The Netherlands, and is freely distributable.  It contains
  support for dynamic loading of objects, classes, modules, and
  exceptions.  Adding interfaces to new system libraries through C code
  is straightforward, making Python easy to use in custom settings.
  Python is a very high level scripting language with X interface.
  Python package is distributed on Linux cdroms includes most of the
  standard Python modules, along with modules for interfacing to the Tix
  widget set for Tk.

  PyGreSQL is a python module that interfaces to a PostgreSQL database.
  It embeds the PostgreSQL query library to allow easy use of the
  powerful PostgreSQL features from a Python script.  PyGreSQL is
  written by D'Arcy J.M. Cain and Pascal Andre.

    New site of PyGreSQL  <http://www.druid.net/pygresql/>

    Maintained by D'Arcy at  <http://www.druid.net/~darcy/>

    Old site is at
     <ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95.README >

    D'Arcy J.M. Cain darcy@druid.net

    Pascal Andre andre@chimay.via.ecp.fr

    Pascal Andre andre@via.ecp.fr


  21.1.  Where to get PyGres ?

  The home sites of the differents packages are:

    Python
     <ftp://ftp.python.org:/pub/www.python.org/1.5/python1.5b2.tar.gz>

    PyGreSQL  <ftp://ftp.druid.net/pub/distrib/PyGreSQL-2.1.tgz>

    Old site
     <ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95-1.0b.tar.gz
     >

     You should anyway try to find some mirror site closer of your site.
     Refer to the information sources to find these sites. PyGreSQL
     should reside in the contrib directories of Python and PostgreSQL
     sites.

  21.2.  Information and support

  If you need information about these packages please check their web
  sites:

    Python :      <http://www.python.org/>

    PostgreSQL :
     <http://epoch.cs.berkeley.edu:8000/postgres95/index.html>

    PyGreSQL  <ftp://ftp.druid.net/pub/distrib/PyGreSQL-2.1.tgz>

    Old site PyGreSQL :
     <http://www.via.ecp.fr/via/products/pygres.html>

  For support :

    Mailing list for PyGreSQL. You can join by sending email to
     majordomo@vex.net with the line "subscribe pygresql name@domain" in
     the body replacing "name@domain" with your own email address.


    Newsgroup for Python :     newsgroup comp.lang.python

    PyGreSQL :   contact Andre at andre@via.ecp.fr for bug reports,
     ideas, remarks

  21.3.  Testing Python interface

  See the section - ``Testing Python PostgreSQL interface''

  22.  Gateway between PostgreSQL and the WWW - WDB-P95


  22.1.  About wdb-p95

  WDB-P95 - A Web interface to PostgreSQL Databases was created by J.
  Douglas Dunlop It is at

    New WDB from J Rowe is at
     <http://www.lava.net/beowulf/programming/wdb>

    New versions of WWW-WDB is at  <http://www.eol.ists.ca/~dunlop/wdb-
     p95/>

    For questions or to join Mailing lists contact dunlop@eol.ists.ca

     This is a modified version of wdb-1.3a2 which provides a gateway to
     a the WWW for PostgreSQL. This version also requires a Browser that
     is capable of handling HTML Tables for the tabular output. This is
     not required by the original wdb and can be fairly easily reverted.

  You can try out CASI Tape and Image Query. You can have a peek at the
  Form Definition File (FDF) which is used to create the CASI Tape and
  Image Query too, which includes a JOIN of 2 tables.

  This release contains all files necessary to install and run WDB-P95
  as an interface to your PostgreSQL databases. To port this system to
  other database should be relatively easy - provided that it supports
  standard SQL and has a Perl interface.

  22.2.  Does the PostgreSQL server, pgperl, and httpd have to be on the
  same host?

  No - the PostgreSQL server does not have to be on the same host. As
  WDB-P95 is called by the http daemon, they have to be on the same
  host. - And as WDB-P95 was written to use Pg.pm - pgperl has to be on
  the same host too.  Pgperl was written using the libpq library, so it
  will be able to access any PostgreSQL server anywhere in the net, just
  like any other PostgreSQL client. As illustrated below

  (WWW Client (Netscape)) => (HTTP Server (NCSA's http) + WDB-P95 +
  pgperl + libpq)=> (PostgreSQL server)

  Curly brackets () represent machines.

  Each machine can be of a different type : NT, SUN, HP, ... but you
  need the libpq interface library for the machine type where you plan
  to use WDB-P95, as you need it to compile pgperl. (The system was
  designed to use HTML tables so a recent WWW client is best)

  23.  "C", "C++", ESQL/C language Interfaces and Bitwise Operators for
  PostgreSQL



  23.1.  "C" interface

  It is included in distribution and is called 'libpq'. Similar to
  Oracle OCI, Sybase DB-lib, Informix CLI libraries.


  23.2.  "C++" interface

  It is included in distribution and is called 'libpq++'.  See the
  section - ``Testing C and C++ PostgreSQL interface''

  23.3.  ESQL/C

  ESQL/C 'Embedded C Pre-compiler' for PostgreSQL ESQL/C is like Oracle
  Pro*C, Informix ESQL/C.  The PostgreSQL ESQL/C is an SQL application-
  programming interface (API) enables the C programmer to create custom
  applications with database-management capabilities. The PostgreSQL
  ESQL/C allows you to use a third-generation language with which you
  are familiar and still take advantage of the Structured Query Language
  (SQL).

  ESQL/C consists of the following pieces of software:

    The ESQL/C libraries of C functions provide access to the database
     server.

    The ESQL/C header files provide definitions for the data
     structures, constants, and macros useful to the ESQL/C program.

    The ESQL/C preprocessor, is a source-code preprocessor that
     converts a C file containing SQL statements into an executable
     file.

     It is at

    ESQL/C for PostgreSQL is already included in the distribution.

    Main site  <ftp://ftp.lysator.liu.se/pub/linus>

    Email : linus@epact.se

     See the section - ``Testing Embedded SQL/C interface to
     PostgreSQL''

  23.4.  BitWise Operators for PostgreSQL

  Bitwise operators was written by Nicolas Moldavsky

    nico@overnet.com.ar

     "C" functions that implement bitwise operators (AND, OR, XOR, bit
     complement) on pgsql. Get them by anonymous FTP from

    <ftp://ftp.overnet.com.ar/pub/utils/linux/bitpgsql.tgz>

     Makefile for Linux is included.

  24.  Japanese Kanji Code for PostgreSQL

  It is at the following site

    <ftp://ftp.sra.co.jp/pub/cmd/postgres/>



  25.  PostgreSQL Port to Windows 95/Windows NT

  PostgreSQL binaries for Windows NT is available from :

    Windows NT PostgreSQL binaries  <http://www.askesis.nl>

    <http://www.postgresql.org>

     Download the binaries and unpack and follow instructions in
     ``Install PostgreSQL'' from step 13.

  If you want to re-compile the source tree then follow the instructions
  given below.  Porting to NT is done using Cygnus cygwin32 package
  which has gcc, gmake for Win NT/95.

    Cygwin 32 package is at  <http://www.cygnus.com/misc/gnu-win32>

     At this site and get the file cdk.exe (self-extractor file for gnu-
     win32)

  25.1.  Authors of NT port

  The authors of Windows NT port of PostgreSQL are -

    Daniel Horak horak@mmp.plzen-city.cz

    Joost Kraaijeveld JKraaijeveld@askesis.nl

    Kevin Lo kevlo@FreeBSD.org

    Home page of NT port is at
     <http://www.freebsd.org/~kevlo/postgres/portNT.html>

  25.2.  Install the Cygwin package


  1. Download
     <ftp://go.cygnus.com/pub/sourceware.cygnus.com/cygwin/latest/full.exe>

  2. Run full.exe and install in c:\Unix\Root directory.

  3. Run Cygwin, Type 'mount --help' for docs. You can use -f switch to
     force mount.  And then run "umount / " and "mount c:\Unix\Root /"

  25.3.  Tuneup Bash Window

  After installing the Cygwin package, do the following to setup the
  working environment:

  1. Install the Vi editor 'Vim'. See
  <http://metalab.unc.edu/LDP/HOWTO/Vim-HOWTO.html>

  2. The default window of cygwin bash is black-background window with
  24 lines. To set the background color and size of bash window, click
  on NT-Start->Control-panel->MS DOS console and change the background
  color to grey and size to 70 lines.

  (OR) right click on Window titlebar and change property.

  3. Edit cygnus.bat in c:\cygnus\cywinb20 and set the following -

  ______________________________________________________________________
  set HOME=c:\cygnus\cygwinb20
  bash --login
  ______________________________________________________________________

  And also edit the  /.bash_profile and put these lines

  ______________________________________________________________________
  set -o vi
  PATH=$PATH:/usr/local/bin:/usr/bin
  export PATH
  ______________________________________________________________________



  4. To enable the command-line history editing give -

  bash$ set -o vi

  Using the l,k,j,h you can use the vi commands to edit the command line
  history commands. You can repeat or modify previous commands, saves
  typing time.

  5. You can do mount of drives/directories using this command -

  ______________________________________________________________________
  bash$ umount /
  bash$ mount "c:\cygnus"  /
  bash$ mount "c:\cygnus\cygwin-b20\postgres" /usr/local/pgsql
  ______________________________________________________________________



  6. See online help with -

  ______________________________________________________________________
  bash$ mount --help
  bash$ ls --help
  ______________________________________________________________________



  25.4.  Install the Andy Piper tools


  1. Go to  <ftp://ftp.xemacs.org/pub/xemacs/aux/> and download cygwin-
     b20-local.tar.bz2 in the c:/Unix/Root directory.

  2. cd c:/Unix/Root; bunzip2 cygwin-b20-local.tar.bz2

  3. tar -xvf cygwin-b20-local.tar

  4. cd /local/bin; sh check_cygwin_setup.sh

  5. After doing step 4, you see the following message:

     ___________________________________________________________________
     You don't have /bin would you like to mount cygwin as /bin?"
     [ y/n ]
     Select 'n',  and the other options are selected 'y'
     ___________________________________________________________________



  6. mount c:/Unix/Root/cygwin-b20/H-i586-cygwin32/i586-cygwin32/bin
     /bin

  7. cd c:/Unix/Root/cygwin-b20/H-i586-cygwin32/i586-cygwin32; mkdir
     libexec share man etc sbin info


  8. cp -R /local/{ bin,libexec,share,man,etc,sbin,info,include }

  25.5.  Install Ludovic Lange's Cygwin32 IPC package


  1. Go to  <http://www.multione.capgemini.fr/tools/pack_ipc> and
     download cygwin32_ipc-1.03.tgz in c:/Unix/Root directory.

  2. tar -zxvf cygwin32_ipc-1.03.tgz

  3. cd cygwin32_ipc-1.03/src and run 'make'

  4. mkdir -p c:/usr/local/{bin,include,lib,include/sys}

     ___________________________________________________________________
     cp /cygwin32_ipc-1.03/bin/* c:/usr/local/bin
     cp /cygwin32_ipc-1.03/include/sys/* c:/usr/local/include/sys
     cp /cygwin32_ipc-1.03/lib/* c:/usr/local/lib
     cp c:/usr/local/bin/* /bin
     cp c:/Unix/Root/cygwin-b20/H-i586-cygwin32/bin/* /bin
     ___________________________________________________________________



  5. mount c:/usr/local/bin /usr/local/bin

     ___________________________________________________________________
     mount c:/usr/local/include /usr/local/include
     mount c:/usr/local/lib /usr/local/lib
     cp /local/lib/* /usr/local/lib
     ___________________________________________________________________



  25.6.  Install PostgreSQL


  1. Download the latest PostgreSQL source code

  2. Postgres treats all files as binary files so the lf/cf stuff
     appeard, so we do steps 2, 3, 4, and 5:

     ___________________________________________________________________
     mkdir -p c:/Postgres/{Source,Binary}
     mkdir c:/Postgres/Binary/pgsql
     mkdir -p /usr/src/pgsql
     mkdir -p /usr/local/pgsql
     ___________________________________________________________________



  3. Copy Postgres source code to c:/Postgres/Source directory, then tar
     -zxvf postgresql-6.5.3.tar.gz

  4. mv postgresql-6.5.3 pgsql

  5. Mount directories now -

     ___________________________________________________________________
     mount -b c:/Postgres/Binary/pgsql /usr/local/pgsql
     mount c:/Postgres/Source/pgsql /usr/src/pgsql
     mount c:/Unix/Root/cygwin-b20/share /sw/cygwin-b20/share
     ___________________________________________________________________



  6. mkdir -p /usr/local/pgsql/{bin,include,lib,data}

  7. cd /usr/src/pgsql/src/win32

  8. Copy header files -

     ___________________________________________________________________
     cp un.h c:/Unix/Root/cygwin-b20/H-i586-cygwin32/i586-cygwin32/include/sys
     cp endian.h c:/Unix/Root/cygwin-b20/H-i586-cygwin32/i586-cygwin32/include
     cp tcp.h c:/Unix/Root/cygwin-b20/H-i586-cygwin32/i586-cygwin32/include/netinet
     ___________________________________________________________________



  9. ln -s /usr/local/lib /usr/src/pgsql/src/backend/libpostgres.a

  10.
     cd /usr/src/pgsql/src, then run './configure'

  11.
     make > make.txt 2>&1

  12.
     make install  > make.install.txt 2>&1

  13.
     cp /usr/local/pgsql/lib/pq.dll /usr/local/pgsql/bin

  14.
     After the make install you had to change all the text files in the
     bin and lib diectories so that they did not contain cr/lf and eof
     stuff.

  15.
     Using any editor to create .bashrc in / directory as belows:

     ___________________________________________________________________
     PATH=$PATH:/usr/local/pgsql/bin:/usr/local/bin
     PGDATA=/usr/local/pgsql/data
     PGLIB=/usr/local/pgsql/lib
     LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/local/lib
     export LD_LIBRARY_PATH PATH PGDATA PGLIB
     ___________________________________________________________________



  16.
     source /.bashrc, then run 'initdb --username=xxxx' Note that the
     owner of the DB system have to be different from root/administrator

  17.
     Edit the file /usr/local/pgsql/data/pg_hba.conf, such as:

     ___________________________________________________________________
     host        all     163.17.11.109   255.255.255.0   trust
     ___________________________________________________________________



  18.
     ipc-daemon.exe&

  19.
     postmaster -i&


  20.
     Run ' psql -h host_name template1'

  26.  Mailing Lists


  26.1.  E-mail account for PostgreSQL

  Get free e-mail accounts from

    In Yahoo  <http://www.yahoo.com> click on e-mail

    In Lycos  <http://www.lycos.com> click on new e-mail accounts

    In hotmail  <http://www.hotmail.com> click on new e-mail accounts

     Subscribe to PostgreSQL mailing list and Yahoo has additional
     feature of creating a seperate folder for PostgreSQL e-mails, so
     that your regular e-mail is not cluttered. Select menu Email- >
     Options- > Filters and pick seperate folder for email.  With this
     e-mail account you can access mail from anywhere in the world as
     long as you have access to a web page.

  If you have any other e-mail, you can use "Mail Filters" to receive
  automatically the PostgreSQL mails into a seperate folder. This will
  avoid mail cluttering.

  26.2.  English Mailing List

  See the Mailing Lists Item on the main web page at :

    <http://www.postgresql.org/>

    Email questions to: pgsql-questions@postgresql.org

    Developers pgsql-hackers@postgresql.org

    Port specific questions pgsql-ports@postgresql.org

    Documentation questions pgsql-docs@postgresql.org

     You will get the answers/replies back by e-mail in less than a day.

  You can also subscribe to mailing lists.  To subscribe or unsubscribe
  from the list, send mail to

    pgsql-questions-request@postgresql.org

    pgsql-hackers-request@postgresql.org

    pgsql-ports-request@postgresql.org

    pgsql-docs-request@postgresql.org

     The body of the message should contain the single line

  subscribe

  (or)

  unsubscribe

  26.3.  Archive of Mailing List

  Also mailing lists are archived in html format at the following
  location -
    Date-wise listing available via MHonarc via the WWW at
     <http://www.postgresql.org/mhonarc/pgsql-questions>

    <ftp://ftp.postgresql.org> directory is /pub/majordomo

     There is also search engine available on the PostgreSQL main web
     site specifically for pgsql questions.

  26.4.  Spanish Mailing List

  Now there is an "unofficial" list of postgreSQL in Spanish.  To
  subscribe the user has to send a message to:

    majordomo@tlali.iztacala.unam.mx

     The body of the message should contain the single line:

  inscripcion pgsql-ayuda

  27.  Documentation and Reference Books


  27.1.  User Guides and Manuals

  The following are included in the PostgreSQL distribution in the
  postscript, HTML formats and unix man-pages. They are located in
  /usr/doc/postgresql* directory.  If you have access to internet, you
  can find the documents listed below at
  <http://www.postgresql.org/docs>


    "Installation Guide"

    "User Guide" for PostgreSQL

    "Implementation Guide" detailing database internals of PostgreSQL.

    Online manuals.

    Online manuals in HTML formats.

    Also manuals in Postscript format for printing hard copies.

  27.2.  Online Documentation


    Listing and description of default data types and operators


       Is a a part of PSQL command



    Listing of supported SQL keywords


       There is a script in the /tools directory in source code tree.



    Listings of supported statements -



  Use the command psql \h



    Basic relational database concepts under PostgreSQL
     (implementation) and several online examples (queries) -


       Look at the regression tests at src/test. There you can find the directories
       regress/sql and suite/*.sql and also see
       <ref id="Examples RPM">



    Tutorial for PostgreSQL.


       SQL tutorial scripts is in the directory src/tutorial



  See also "SQL Tutorial for beginners" in Appendix B of this document
  ``''

  27.3.  Useful Reference Textbooks


    "Understanding the New SQL: A Complete Guide" - by Jim Melton and
     Alan R.Simon


       Morgan Kaufman Publisher is one of best SQL books. This deals with SQL92.



    "A Guide to THE SQL STANDARD" - by C.J.Date


       Addison-Wesley Publishing company is also a good book. Very popular book for SQL.



    SQL - The Standard Handbook,  November 1992


       Stephen Cannan and Gerard Otten
       McGraw-Hill Book Company Europe , Berkshire, SL6 2QL, England



    SQL Instant Reference, 1993


       Martin Gruber, Technical Editor: Joe Celko
       SYBEX Inc.  2021 Challenger Drive Alameda, CA 94501



    C.J.Date, "An introduction to Database Systems" (6th Edition),
     Addison-Wesley, 1995, ISBN 0-201-82458-2


       This book is the Bible of Database Management Systems.
       The book details normalization, SQL, recovery, concurrency, security,
       integrity, and extensions to the original relational model, current issues
       like client/server systems and the Object Oriented model(s). Many
       references are included for further reading. Recommended for most users.



    Stefan Stanczyk, "Theory and Practice of Relational Databases", UCL
     Press Ltd, 1990, ISBN 1-857-28232-9


       Book details theory of relational databases, relational algebra, calculus
       and normalisation. But it does not cover real world issues and examples
       beyond simple examples. Recommended for most users.



    "The Practical SQL Handbook" Third Edition, Addison Wesley
     Developers Press ISBN 0-201-44787-8


       Recommended for most users.



    Michael Stonebraker, "Readings in Database Systems", Morgan
     Kaufmann, 1988, ISBN 0-934613-65-6


       This book is a collection of papers that have been published over the
       years on databases. It's not for the casual user but it is really a
       reference for advanced (post-graduate) students or database system
       developers.



    C.J.Date, "Relational Database - Selected Readings", Addison-
     Wesley, 1986, ISBN 0-201-14196-5


       This book is a collection of papers that have been published over the
       years on databases. It's not for the casual user but it is really a
       reference for advanced (post-graduate) students or database system
       developers.



    Nick Ryan and Dan Smith, "Database Systems Engineering",
     International Thomson Computer Press, 1995, ISBN 1-85032-115-9


       This book goes into the details of access methods, storage techniques.



    Bipin C. Desai, "An introduction to Database Systems", West
     Publishing Co., 1990, ISBN 0-314-66771-7


       It's not for the casual user but it is for advanced (post-graduate)
       students or database system developers.



    Joe Celko "INSTANT SQL Programming"


       Wrox Press Ltd.
       Unit 16, 20 James Road, Tyseley
       Birmingham, B11 2BA, England
       1995



    Michael Gorman "Database Management Systems: Understanding and
     Applying Database"


       Technology
       QED and John Wiley
       1991



    Michael Gorman "Enterprise Database for a Client/Server
     Environment" QED and John Wiley


       Presents the requirements of building client/server database
       applications via repository metamodels and the use of ANSI standard SQL
       1993



  Hundreds of other titles on SQL are available! Check out a bookstore.

  27.4.  ANSI/ISO SQL Specifications documents  - SQL 1992, SQL 1998

  ANSI/ISO SQL specifications documents can be found at these sites
  listed below -

    <http://www.naiua.org/std-orgs.html>

    <http://www.ansi.org/docs> and click on file cat_c.html and search
     with "Database SQL"

    SQL92 standard  <http://www.jcc.com> and click on file
     sql_stnd.html

    ANSI/ISO SQL specifications
     <http://www.contrib.andrew.cmu.edu/~shadow/sql.html> You will find
     SQL Reference here.

  27.5.  Syntax of ANSI/ISO SQL 1992

  See Appendix A of this document ``''

  27.6.  Syntax of ANSI/ISO SQL 1998

  The SQL 1998 (SQL 3) specification is still under development.  See
  'Electronic Access to the SQL3 Working Draft' of this document at ``''

  27.7.  SQL Tutorial for beginners

  See Appendix B of this document ``''

  27.8.  Temporal Extension to SQL92


    Document for Temporal Extension to SQL-92
     <ftp://FTP.cs.arizona.edu/tsql/tsql2/>

    Temporal SQL-3 specification
     <ftp://FTP.cs.arizona.edu/tsql/tsql2/sql3/>

  This directory contains the language specification for a temporal
  extension to the SQL-92 language standard. This new language is
  designated TSQL2.

  The language specification present here is the final version of the
  language.

  Correspondence may be directed to the chair of the TSQL2 Language
  Design Committee, Richard T.Snodgrass, Department of Computer Science,
  University of Arizona, Tucson, AZ 85721,

    rts@cs.arizona.edu

     The affiliations and e-mail addresses of the TSQL2 Language Design
     Committee members may be found in a separate section at the end of
     the language specification.

  The contents of this directory are as follows.

  spec.dvi,.ps    TSQL2 Language Specification, published in September,
  1994

  bookspec.ps     TSQL2 Language Specification, as it appears in the
  TSQL2 book, published in September, 1995 (see below).

  sql3            change proposals submitted to the ANSI and ISO SQL3
  committees.

  Associated with the language specification is a collection of
  commentaries which discuss design decisions, provide examples, and
  consider how the language may be implemented. These commentaries were
  originally proposals to the TSQL2 Language Design Committee. They now
  serve a different purpose: to provide examples of the constructs,
  motivate the many decisions made during the language design, and
  compare TSQL2 with the many other language proposals that have been
  made over the last fifteen years. It should be emphasized that these
  commentaries are not part of the TSQL2 language specification per se,
  but rather supplement and elaborate upon it. The language
  specification proper is the final word on TSQL2.

  The commentaries, along with the language specification, several
  indexes, and other supporting material, has been published as a book:

  Snodgrass, R.T., editor, The TSQL2 Temporal Query Language, Kluwer
  Academic Publishers, 1995, 674+xxiv pages.

  The evaluation commentary appears in the book in an abbreviated form;
  the full commentary is provided in this directory as file eval.ps
  The file tl2tsql2.pl is a prolog program that tranlates allowed
  temporal logic to TSQL2. This program was written by Michael Boehlen

    boehlen@iesd.auc.dk

     He may be contacted for a paper that describes this translation.
     This is a rather dated version of that program. Newer versions are
     available at

    <http://www.cs.auc.dk/general/DBS/tdb/TimeCenter/Software>

     (the TimeDB and Tiger systems).

  27.9.  Part 0 - Acquiring ISO/ANSI SQL Documents

  This document shows you how to (legally) acquire a copy of the SQL-92
  standard and how to acquire a copy of the "current" SQL3 Working
  Draft.

  The standard is copyrighted ANSI standard by ANSI, the ISO standard by
  ISO.

  There are two (2) current SQL standards, an ANSI publication and an
  ISO publication. The two standards are word-for-word identical except
  for such trivial matters as the title of the document, page headers,
  the phrase "International Standard" vs "American Standard", and so
  forth.

  Buying the SQL-92 Standard

  The ISO standard, ISO/IEC 9075:1992, Information Technology - Database
  Languages - SQL, is currently (March, 1993) available and in stock
  from ANSI at:


            American National Standards Institute
            1430 Broadway
            New York, NY 10018 (USA)
            Phone (sales): +1.212.642.4900



  at a cost of US$230.00. The ANSI version, ANSI X3.135-1992, American
  National Standard for Information Systems - Database Language SQL, was
  not available from stock at this writing, but was expected to be
  available by some time between late March and early May, 1993). It is
  expected to be be priced at US$225.00.

  If you purchase either document from ANSI, it will have a handling
  charge of 7% added to it (that is, about US$9.10). Overseas shipping
  charges will undoubtedly add still more cost. ANSI requires a hardcopy
  of a company purchase order to accompany all orders; alternately, you
  can send a check drawn on a US bank in US dollars, which they will
  cash and clear before shipping your order. (An exception exists: If
  your organization is a corporate member of ANSI, then ANSI will ship
  the documents and simply bill your company.)

  The ISO standard is also available outside the United States from
  local national bodies (country standardization bodies) that are
  members of either ISO (International Organization for Standardization)
  or IEC (International Electrotechnical Commission). Copies of the list
  of national bodies and their addresses are available from ANSI or from
  other national bodies. They are also available from ISO:


       International Organization for Standardization
       Central Secretariat
       1, rue de Varembi
       CH-1211 Genhve 20
       Switzerland



  If you prefer to order the standard in a more convenient and quick
  fashion, you'll have to pay for the privilege. You can order ISO/IEC
  9075:1992, Information Technology - Database Languages - SQL, from:


            Global Engineering Documents
            2805 McGaw Ave
            Irvine, CA 92714 (USA)
            USA
            Phone (works from anywhere): +1.714.261.1455
            Phone (only in the USA): (800)854-7179



  for a cost of US$308.00. I do not know if that includes shipping or
  not, but I would guess that international shipping (at least) would
  cost extra. They will be able to ship you a document fairly quickly
  and will even accept "major credit cards". Global does not yet have
  the ANSI version nor do they have a price or an expected date (though
  I would expect it within a few weeks following the publication by ANSI
  and at a price near US$300.00).

  Buying a copy of the SQL3 Working Draft

  You can purchase a hardcopy of the SQL3 working draft from the ANSI X3
  Secretariat, CBEMA (Computer and Business Equipment Manufacturers
  Association). They intend to keep the "most recent" versions of the
  SQL3 working draft available and sell them for about US$60.00 to
  US$65.00.  You can contact CBEMA at:


            CBEMA, X3 Secretariat
            Attn: Lynn Barra
            1250 Eye St.
            Suite 200
            Washington, DC 20005 (USA)



  Lynn Barra can also be reached by telephone at +1.202.626.5738 to
  request a copy, though mail is probably more courteous.

  Electronic Access to the SQL3 Working Draft

  The most recent version (as of the date of this writing) of the SQL3
  (both ANSI and ISO) working draft (and all of its Parts) is available
  by "anonymous ftp" or by "ftpmail" on:


            gatekeeper.dec.com

         at

            /pub/standards/sql/

  In this directory are a number of files.  There are PostScript. files
  and "plain text" (not prettily formatted, but readable on a screen
  without special software).

  In general, you can find files with names like:


            sql-bindings-mar94.ps
            sql-bindings-mar94.txt
            sql-cli-mar94.ps
            sql-cli-mar94.txt
            sql-foundation-mar94.ps
            sql-foundation-mar94.txt
            sql-framework-mar94.ps
            sql-framework-mar94.txt
            sql-psm-mar94.ps
            sql-psm-mar94.txt



  As new versions of the documents are produced, the "mar94" will change
  to indicate the new date of publication (e.g., "aug94" is the expected
  date of the next publication after "mar94").

  In addition, for those readers unable to get a directory listing by
  FTP, we have placed a file with the name:


            ls



  into the same directory.  This file (surprise!) contains a directory
  listing of the directory.

  Retrieving Files Directly Using ftp

  This is a sample of how to use FTP. Specifically, it shows how to
  connect to gatekeeper.dec.com, get to the directory where the base
  document is kept, and transfer the document to your host. Note that
  your host must have Internet access to do this. The login is 'ftp' and
  the password is your email address (this is sometimes referred to as
  bits are stripped from the file(s) received. 'get' gets one file at a
  time. Comments in the script below are inside angle brackets < like so
  > .



    % ftp gatekeeper.dec.com
    Connected to gatekeeper.dec.com.
    220- *** /etc/motd.ftp ***
         Gatekeeper.DEC.COM is an unsupported service of DEC Corporate Research.
         <...this goes on for a while...>
    220 gatekeeper.dec.com FTP server (Version 5.83 Sat ... 1992) ready.
    Name (gatekeeper.dec.com:<yourlogin here>): ftp  <anonymous also works>
    331 Guest login ok, send ident as password.
    Password: <enter your email address here >
    230 Guest login ok, access restrictions apply.
    Remote system type is UNIX.  <or whatever>
    Using binary mode to transfer files.
    ftp> cd pub/standards/sql
    250 CWD command successful.
    ftp> dir
    200 PORT command successful.
    150 Opening ASCII mode data connection for /bin/ls.
    total 9529
    -r--r--r--  1 root     system     357782 Feb 25 10:18 x3h2-93-081.ps
    -r--r--r--  1 root     system     158782 Feb 25 10:19 x3h2-93-081.txt
    -r--r--r--  1 root     system     195202 Feb 25 10:20 x3h2-93-082.ps
    -r--r--r--  1 root     system      90900 Feb 25 10:20 x3h2-93-082.txt
    -r--r--r--  1 root     system    5856284 Feb 25 09:55 x3h2-93-091.ps
    -r--r--r--  1 root     system    3043687 Feb 25 09:57 x3h2-93-091.txt
    226 Transfer complete.
    ftp> type binary
    200 Type set to I.
    ftp> get x3h2-93-082.txt
    200 PORT command successful.
    150 Opening BINARY mode data connection for x3h2-93-082.txt (90900 bytes).
    226 Transfer complete.
    90900 bytes received in 0.53 seconds (166.11 Kbytes/s)
    ftp> quit
    % <the file is now in your directory as x3h2-93-082.txt>



  Retrieving Files Without Direct ftp Support

  Digital Equipment Corporation, like several other companies, provides
  ftp email service. The response can take several days, but it does
  provide a service equivalent to ftp for those without direct Internet
  ftp access. The address of the server is:

  ftpmail@decwrl.dec.com

  The following script will retrieve the PostScript for the latest
  version of the SQL3 document:


            reply joe.programmer@imaginary-corp.com
            connect gatekeeper.dec.com anonymous
            binary
            compress



  The following script will retrieve the PostScript for the latest ver
  sion of the SQL3 document:



       reply joe.programmer@imaginary-corp.com
       connect gatekeeper.dec.com anonymous
       binary
       compress
       uuencode
       chdir /pub/standards/sql
       get x3h2-93-091.ps
       quit



  The first line in the script commands the server to return the
  requested files to you; you should replace "joe.programmer@imaginary-
  corp.com" with your Internet address. The file in this example,
  x3h2-93-091.ps, is returned in "compress"ed "uuencode"d format as 34
  separate email messages. If your environment does not provide tools
  for reconstructing such files, then you could retrieve the file as
  plain text with the following script:


            reply joe.programmer@imaginary-corp.com
            connect gatekeeper.dec.com anonymous
            chdir /pub/standards/sql
            get x3h2-93-091.ps
            quit



  But be warned, the .ps file will probably be sent to you in more than
  70 parts!

  To retrieve any particular file, other than x3h2-93-091.ps, simply
  replace "x3h2-93-091.ps" with the name of the desired file. To get a
  directory listing of all files available, replace "get x3h2-93-091.ps"
  with "dir".

  27.10.  Part 1 - ISO/ANSI SQL Current Status

  This chapter is a source of information about the SQL standards
  process and its current state.

  Current Status:

  Development is currently underway to enhance SQL into a
  computationally complete language for the definition and management of
  persistent, complex objects. This includes: generalization and
  specialization hierarchies, multiple inheritance, user defined data
  types, triggers and assertions, support for knowledge based systems,
  recursive query expressions, and additional data administration tools.
  It also includes the specification of abstract data types (ADTs),
  object identifiers, methods, inheritance, polymorphism, encapsulation,
  and all of the other facilities normally associated with object data
  management.

  In the fall of 1996, several parts of SQL3 went through a ISO CD
  ballot.  Those parts were SQL/Framework, SQL/Foundation, and
  SQL/Bindings. Those ballots failed (as expected) with 900 or so
  comments. In Late January, there was an ISO DBL editing meeting that
  processed a large number of problem solutions that were either
  included with ballot comments or submitted as separate papers. Since
  the DBL editing meeting was unable to process all of the comments, the
  editing meeting has been extended. The completion of the editing
  meeting is scheduled for the end of July, 1997, in London.

  Following the July editing meeting, the expectation is that a Final CD
  ballot will be requested for these parts of SQL. The Final CD process
  will take about 6 months and a DBL editing meeting, after which there
  will be a DIS ballot and a fairly quick IS ballot.

  The ISO procedures have changed since SQL/92, so the SQL committees
  are still working through the exact details of the process.

  If everything goes well, these parts of SQL3 will become an official
  ISO/IEC standard in late 1998, but the schedule is very tight.

  In 1993, the ANSI and ISO development committees decided to split
  future SQL development into a multi-part standard. The Parts are:


    Part 1: Framework A non-technical description of how the document
     is structured.

    Part 2: Foundation The core specification, including all of the new
     ADT features.

    Part 3: SQL/CLI The Call Level Interface.

    Part 4: SQL/PSM The stored procedures specification, including
     computational completeness.

    Part 5: SQL/Bindings The Dynamic SQL and Embedded SQL bindings
     taken from SQL-92.

    Part 6: SQL/XA An SQL specialization of the popular XA Interface
     developed by X/Open

    Part 7:SQL/TemporalAdds time related capabilities to the SQL
     standards.

  In the USA, the entirety of SQL3 is being processed as both an ANSI
  Domestic ("D") project and as an ISO project. The expected time frame
  for completion of SQL3 is currently 1999.

  The SQL/CLI and SQL/PSM are being processed as fast as possible as
  addendums to SQL-92. In the USA, these are being processed only as
  International ("I") projects. SQL/CLI was completed in 1995. SQL/PSM
  should be completed sometime in late 1996.

  In addition to the SQL3 work, a number of additional projects are
  being persued:


    SQL/MM An ongoing effort to define standard multi-media packages
     using the SQL3 ADT capabilities.

    Remote Data Access (RDA)

  Standards Committee and Process

  There are actually a number of SQL standards committees around the
  world.  There is an international SQL standards group as a part of
  ISO. A number of countries have committees that focus on SQL. These
  countries (usually) send representatives to ISO/IEC JTC1/SC 21/WG3 DBL
  meetings. The countries that actively participate in the ISO SQL
  standards process are:


    Australia


    Brazil

    Canada

    France

    Germany

    Japan

    Korea

    The Netherlands

    United Kingdom

    United States

  NIST Validation

  SQL implementations are validated (in the Unites States) by the
  National Institute of Standards and Training (NIST). NIST currently
  has a validation test suite for entry level SQL-92. The exact details
  of the NIST validation requirements are defined as a Federal
  Information Processing Standard (FIPS). The current requirements for
  SQL are defined in FIPS 127-2. The Postscript and Text versions of
  this document can be retrieved from NIST.  The current SQL Validated
  Products List can also be retrieved from NIST.

  Standard SQL Publications and Articles

  There are two versions of the SQL standard. Both are available from
  ANSI:


    ISO/IEC 9075:1992, "Information Technology --- Database Languages
     --- SQL"

    ANSI X3.135-1992, "Database Language SQL"

  The two versions of the SQL standard are identical except for the
  front matter and references to other standards. Both versions are
  available from:


            American National Standards Institute
            1430 Broadway
            New York, NY 10018
            USA
            Phone (sales): +1.212.642.4900



  In additon to the SQL-92 standard, there is now a Technical Corrigen
  dum (bug fixes):


          * Technical Corrigendum 1:1994 to ISO/IEC 9075:1992



  TC 1 should also be available from ANSI. There is only an ISO version
  of TC 1 -- it applies both to the ISO and ANSI versions of SQL-92.

  In addition to the standards, several books have been written about
  the 1992 SQL standard. These books provide a much more readable
  description of the standard than the actual standard.

  Related Standards

  A number of other standards are of interest to the SQL community. This
  section contains pointers to information on those efforts. These
  pointers will be augmented as additional information becomes available
  on the web.


    SQL Environments (FIPS 193)

    Next Generation Repository Systems (X3H4) - a News Release calling
     for particpation in "Developing Standards for the Next Generation
     Repository Systems."

  27.11.  Part 2 - ISO/ANSI SQL Foundation

  A significant portion of the SQL3 effort is in the SQL Foundation
  document:


    Base SQL/PSM capabilities (moved form SQL/PSM-92)

    New data types

    Triggers

    Subtables

    Abstract Data Types (ADT)

    Object Oriented Capabilities

  There are several prerequisites to the object oriented capabilities:


    Capability of defining complex operations

    Store complex operations in the database

    External procedure calls  Some operations may not be in SQL, or
     may require external interactions

  These capabilities are defined as a part of SQL/PSM

  A great deal of work is currently being done to refine the SQL-3
  object model and align it with the object model proposed by ODMG. This
  effort is described in the X3H2 and ISO DBL paper: Accomodating SQL3
  and ODMG. A recent update on the SQL3/OQL Merger is also available.

  SQL3 Timing

  Work on SQL3 is well underway, but the final standards is several
  years away.


    International ballot to progress SQL3 Foundation from Working Draft
     to Committee Draft (CD) taking place fall, 1996.

    Ballot is expected to generate numerous comments

    A second CD ballot is likely to be required

    Draft International Standard ballot is likely to be take place in
     mid 1998

    International Standard could be completed by mid 1999.

  The ANSI version of the standard will be on a similar schedule.

  27.12.  Part 3 - ISO/ANSI SQL Call Level Interface

  The SQL/CLI is a programing call level interface to SQL databases. It
  is designed to support database access from shrink-wrapped
  applications. The CLI was originally created by a subcommittee of the
  SQL Access Group (SAG).  The SAG/CLI specification was published as
  the Microsoft Open DataBase Connectivity (ODBC) specification in 1992.
  In 1993, SAG submitted the CLI to the ANSI and ISO SQL committees.
  (The SQL Access Group has now merged with X/Open consortium.)

  SQL/CLI provides an international standard for:


    Implementation-independent CLI to access SQL databases

    Client-server tools can easily access database through dynamic Link
     Libraries

    Supports and encourages rich set of Client-server tools

  SQL/CLI Timing

  For the standards process, SQL/CLI is being processed with blinding
  speed.


    SQL/CLI is an addendum to 1992 SQL standard (SQL-92)

    Completed as an ISO standard in 1995

    ISO/IEC 9075-3:1995 Information technology -- Database languages --
     SQL -- Part 3: Call-Level Interface (SQL/CLI)

    Current SQL/CLI effort is adding support for SQL3 features

  27.13.  Part 4 - ISO/ANSI SQL Persistent Stored Modules

  SQL/PSM expands SQL by adding:


    Procedural language extensions

    Multi-statement and Stored Procedures

    External function and procedure calls

  In addition to being a valuable application development tool, SQL/PSM
  provides the foundation support for the object oriented capabilities
  in SQL3.

  Multi-statement and Stored Procedures

  Multi-statement and stored procedures offer a variety of advantages in
  a client/server environment:


    Performance - Since a stored procedure can perform multiple SQL
     statements, network interaction with the client are reduced.

    Security - A user can be given the right to call a stored procedure
     that updates a table or set of tables but denied the right to
     update the tables directly

    Shared code - The code in a stored procedure does not have to be
     rewritten and retested for each client tool that accesses the
     database.

    Control - Provides a single point of definition and control for
     application logic.

  Procedural Language Extensions

  Procedural language add the power of a traditional programming
  language to SQL through flow control statements and a variety of other
  programming constructs.

  Flow Control Statements


    If-then-else

    Looping constructs

    Exception handling

    Case statement

    Begin-End blocks

  The procedural language extensions include other programming language
  constructs:


    Variable declarations

    Set statements for value assignment

    Get diagnostics for process and status information

  In addition, all of the traditional SQL statements can be included in
  multi-statement procedures.

  External Procedure and Function Calls

  One feature frequently mentioned in the wish lists for many database
  products, and implemented in some, is a capability augmenting the
  built-in features with calls to user-written procedures external to
  the database software.


    Allows a particular site or application to add their own database
     functions

    Can be used throughout the database applications

  The benefit of this capability is that it gives the database (and
  therefore database applications) access to a rich set of procedures
  and functions too numerous to be defined by a standards committee.

  SQL/PSM Timing

  SQL/PSM is proceeding quickly:



    SQL/PSM is an addendum to SQL-92

    International ballot to progress SQL/PSM from a Draft International
     Standard to an International Standard ended January, 1996.

    Editing meeting in May, 1996 did not resolve all of the comments

    Continuation of PSM Editing meeting is scheduled for September 30
     through October 4, 1996

    The schedule is tight but there is a chance that PSM will be
     published with a 1996 date.

    The official designation will be: ISO/IEC DIS 9075-4:199?
     Information technology -- Database languages -- SQL -- Part 4: SQL
     Persistent Stored Modules (SQL/PSM)

    Work is well underway on adding SQL/PSM support for SQL3 features.

  27.14.  Part 5 - ISO/ANSI SQL/Bindings

  For ease of reference, the programming language bindings have been
  pulled out into a separate document. The current version is simply an
  extract of the dynamic and embedded bindings from SQL-92.

  A variety of issues remain unresolved for the programming language
  bindings.

  For traditional programming language, mappings exist for the SQL-92
  datatypes. However, mappings must be defined between SQL objects and
  programming language variables.

  For object oriented languages, mapping must be defined for the current
  SQL datatypes and between the SQL object model and the object model of
  the object-oriented language.

  The object model needs to stabilize before these can be addressed.

  The language bindings will be completed as a part of SQL3.

  27.15.  Part 6 - ISO/ANSI SQL XA Interface Specialization (SQL/XA)

  This specification would standardize an application program interface
  (API) between a global Transaction Manager and an SQL Resource
  Manager. It would standardize the function calls, based upon the
  semantics of ISO/IEC 10026, "Distributed Transaction Processing", that
  an SQL Resource Manager would have to support for two-phase commit.
  The base document is derived from an X/Open publication, with X/Open
  permission, that specifies explicit input and output parameters and
  semantics, in terms of SQL data types, for the following functions:
  xa_close, xa_commit, xa_complete, xa_end, xa_forget, xa_open,
  xa_prepare, xa_recover, xa_rollback, and xa_start.

  ISO is currently attempting to fast-track the X/Open XA specification.
  The fast-track process adopts a current industry specification with no
  changes.  The XA fast-track ballot at the ISO SC21, JTC 1 level
  started on April 27, 1995 and ends on October 27, 1995. If the XA
  specification is approved by 75% of the votes, and by 2/3 of the p-
  members of JTC 1, it will become an International Standard. If the
  fast-track ballot is approved, SQL/XA could become a standard in 1996.

  27.16.  Part 7 - ISO/ANSI SQL Temporal

  Temporal SQL deals with time-related data. The concept is that it is
  useful to query data to discover what it looked like at a particular
  point in time.  Temporal SQL is a December, 1994 paper by Rick
  Snodgrass describing the concepts.

  X3 Announces the Approval of a New Project, ISO/IEC 9075 Part 7:
  SQL/Temporal is a press release related to SQL/Temporal.


       ----------------------------------------------------------------------------
                                       Temporal SQL
                                       ************
       Rick Snodgrass (chair of the TSQL2 committee)
       31-Dec-1994



  Several people have questioned the need for additional support for
  time in SQL3 (as proposed by DBL RIO-75, requesting a new part of SQL
  to support temporal databases). The claim is that abstract data types
  (ADT's) are sufficient for temporal support. In this informational
  item, I argue, using concrete examples, that using columns typed with
  abstract data types is inadequate for temporal queries. In particular,
  many common temporal queries are either difficult to simulate in SQL,
  or require embedding SQL in a procedural language. Alternatives are
  expressed in TSQL2, a temporal extension to SQL-92.

  27.16.1.  INTRODUCTION

  Valid-time support goes beyond that of a temporal ADT. With the later,
  a column is specified as of a temporal domain, such as DATE or
  INTERVAL (examples will be given shortly). With valid time, the rows
  of a table vary over time, as reality changes. The timestamp
  associated with a row of a valid-time table is interpreted by the
  query language as the time when the combination of values of the
  columns in the row was valid. This implicit timestamp allows queries
  to be expressed succinctly and intuitively.

  27.16.2.  A CASE STUDY - STORING CURRENT INFORMATION

  The University of Arizona's Office of Appointed Personnel has some
  information in a database, including each employee's name, their
  current salary, and their current title. This can be represented by a
  simple table.


               Employee(Name, Salary, Title)



  Given this table, finding an employee's salary is easy.


               SELECT Salary
               FROM Employee
               WHERE Name = 'Bob'



  Now the OAP wishes to record the date of birth. To do so, a column is
  added to the table, yielding the following schema.


               Employee(Name, Salary, Title, DateofBirth DATE)


  Finding the employee's date of birth is analogous to determining the
  salary.


               SELECT DateofBirth
               FROM Employee
               WHERE Name = 'Bob'



  27.16.3.  A CASE STUDY - STORING HISTORY INFORMATION

  The OAP wishes to computerize the employment history. To do so, they
  append two columns, one indicating when the information in the row
  became valid, the other indicating when the information was no longer
  valid.

  Employee (Name, Salary, Title, DateofBirth, Start DATE, Stop DATE)

  To the data model, these new columns are identical to DateofBirth.
  However, their presence has wide-ranging consequences.

  27.16.4.  A CASE STUDY - PROJECTION

  To find an employee's current salary, things are more difficult.


               SELECT Salary
               FROM Employee
               WHERE Name = 'Bob' AND Start <= CURRENT_DATE AND CURRENT_DATE <= Stop



  This query is more complicated than the previous one. The culprit is
  obviously the two new columns. The OAP wants to distribute to each
  employee their salary history. Specifically, for each person, the max
  imal intervals at each salary needs to be determined. Unfortunately,
  this is not possible in SQL. An employee could have arbitrarily many
  title changes between salary changes.


       Name    Salary  Title             DateofBirth   Start           Stop
       ----    ------  -----             -----------   -----           ----
       Bob     60000   Assistant Provost 1945-04-09    1993-01-01      1993-05-30
       Bob     70000   Assistant Provost 1945-04-09    1993-06-01      1993-09-30
       Bob     70000   Provost           1945-04-09    1993-10-01      1994-01-31
       Bob     70000   Professor         1945-04-09    1994-02-01      1994-12-31

                                      Figure 1



  Note that there are three rows in which Bob's salary remained constant
  at $70,000. Hence, the result should be two rows for Bob.


       Name    Salary  Start           Stop
       ----    ------  -----           ----
       Bob     60000   1993-01-01      1993-05-30
       Bob     70000   1993-06-01      1994-12-31



  One alternative is to give the user a printout of Salary and Title
  information, and have user determine when his/her salary changed. This
  alternative is not very appealing or realistic. A second alternative
  is to use SQL as much as possible.


       CREATE TABLE Temp(Salary, Start, Stop)
       AS      SELECT Salary, Start, Stop
               FROM Employee;



  repeat


               UPDATE Temp T1
               SET (T1.Stop) = (SELECT MAX(T2.Stop)
                                FROM Temp AS T2
                                WHERE T1.Salary = T2.Salary AND T1.Start < T2.Start
                                       AND T1.Stop >= T2.Start AND T1.Stop < T2.Stop)
               WHERE EXISTS (SELECT *
                             FROM Temp AS T2
                             WHERE T1.Salary = T2.Salary AND T1.Start < T2.Start
                                       AND T1.Stop >= T2.Start AND T1.Stop < T2.Stop)
               until no rows updated;

       DELETE FROM Temp T1

       WHERE EXISTS (SELECT *
                     FROM Temp AS T2
                     WHERE T1.Salary = T2.Salary
                               AND ((T1.Start > T2.Start AND T1.Stop <= T2.Stop)
                               OR (T1.Start >= T2.Start AND T1.Stop < T2.Stop))



  The loop finds those intervals that overlap or are adjacent and thus
  should be merged. The loop is executed log N times in the worst case,
  where N is the number of rows in a chain of overlapping or adjacent
  value-equivalent rows. The reader can simulate the query on the exam
  ple table to convince him/herself of its correctness.

  A third alternative is to use SQL only to open a cursor on the table.
  A linked list of periods is maintained, each with a salary. This
  linked list should be initialized to empty.


       DECLARE emp_cursor CURSOR FOR
               SELECT Salary, Title, Start, Stop
               FROM Employee;
       OPEN emp_cursor;
       loop:
               FETCH emp_cursor INTO :salary, :start, :stop;
               if no-data returned then goto finished;
               find position in linked list to insert this information;
               goto loop;
       finished:
       CLOSE emp_cursor;



  iterate through linked list, printing out dates and salaries

  The linked list may not be necessary in this case if the cursor is
  ORDER BY Start.

  In any case, the query, a natural one, is quite difficult to express
  using the facilities present in SQL-92. The query is trivial in TSQL2.


               SELECT Salary
               FROM Employee



  27.16.5.  A CASE STUDY - JOIN

  A more drastic approach is to avoid the problem of extracting the
  salary history by reorganizing the schema to separate salary, title,
  and date of birth information (in the following, we ignore the date of
  birth, for simplicity).


               Employee1 (Name, Salary, Start DATE, Stop DATE)
               Employee2 (Name, Title, Start DATE, Stop DATE)



  The Employee1 table is as follows.


       Name    Salary  Start           Stop
       ----    ------  -----           ----
       Bob     60000   1993-01-01      1993-05-30
       Bob     70000   1993-06-01      1993-12-31



  Here is the example Employee2 table.


       Name    Title                   Start           Stop
       ----    ------                  -----           ----
       Bob     Assistant Provost       1993-01-01      1993-09-30
       Bob     Provost                 1993-10-01      1994-01-31
       Bob     Professor               1994-02-01      1994-12-31



  With this change, getting the salary information for an employee is
  now easy.


               SELECT Salary, Start, Stop
               FROM Employee1
               WHERE Name = 'Bob'



  But what if the OAP wants a table of salary, title intervals (that is,
  suppose the OAP wishes a table to be computed in the form of Figure
  1)? One alternative is to print out two tables, and let the user fig
  ure out the combinations. A second alternative is to use SQL entirely.
  Unfortunately, this query must do a case analysis of how each row of
  Employee1 overlaps each row of Employee2; there are four possible
  cases.


       SELECT Employee1.Name, Salary, Dept, Employee1.Start, Employee1.Stop
       FROM Employee1, Employee2
       WHERE Employee1.Name = Employee2.Name
            AND Employee2.Start <= Employee1.Start AND Employee1.Stop < Employee2.Stop
       UNION
       SELECT Employee1.Name, Salary, Dept, Employee1.Start, Employee2.Stop
       FROM Employee1, Employee2
       WHERE Employee1.Name = Employee2.Name
            AND Employee1.Start >= Employee2.Start AND Employee2.Stop < Employee1.Stop
               AND Employee1.Start < Employee2.Stop
       UNION
       SELECT Employee1.Name, Salary, Dept, Employee2.Start, Employee1.Stop
       FROM Employee1, Employee2
       WHERE Employee1.Name = Employee2.Name
            AND Employee2.Start > Employee1.Start AND Employee1.Stop < Employee2.Stop
               AND Employee2.Start < Employee1.Stop
       UNION
       SELECT Employee1.Name, Salary, Dept, Employee2.Start, Employee2.Stop
       FROM Employee1, Employee2
       WHERE Employee1.Name = Employee2.Name
            AND Employee2.Start > Employee1.Start AND Employee2.Stop < Employee1.Stop



  Getting all the cases right is a challenging task. In TSQL2, perform
  ing a temporal join is just what one would expect.


               SELECT Employee1.Name, Salary, Dept
               FROM Employee1, Employee2
               WHERE Employee1.Name = Employee2.Name



  27.16.6.  A CASE STUDY - AGGREGATES

  Now the OAP is asked, what is the maximum salary? Before adding time,
  this was easy.


               SELECT MAX(Salary)
               FROM Employee



  Now that the salary history is stored, we'd like a history of the max
  imum salary over time. The problem, of course, is that SQL does not
  provide temporal aggregates. The easy way to do this is to print out
  the information, and scan manually for the maximums. An alternative is
  to be tricky and convert the snapshot aggregate query into a non-
  aggregate query, then convert that into a temporal query. The non-
  aggregate query finds those salaries for which a greater salary does
  not exist.



          SELECT Salary
          FROM Employee AS E1
          WHERE NOT EXISTS (SELECT *
                            FROM Employee AS E2
                            WHERE E2.Salary > E1.Salary)



  Converting this query into a temporal query is far from obvious. The
  following is one approach.


       CREATE TABLE Temp (Salary, Start, Stop)
       AS      SELECT Salary, Start, Stop
               FROM Employee;
       INSERT INTO Temp
               SELECT T.Salary, T.Start, E.Start
               FROM Temp AS T, Employee AS E
               WHERE E.Start >= T.Start AND E.Start < T.Stop AND E.Salary > T.Salary;

       INSERT INTO Temp
               SELECT T.Salary, T.Stop, E.Stop
               FROM Temp AS T, Employee AS E
               WHERE E.Stop > T.Start AND E.Stop <= T.Stop AND E.Salary > T.Salary;
       DELETE FROM Temp T
       WHERE EXISTS (SELECT *
                     FROM Employee AS E
                     WHERE ((T.Start => E.Start AND T.Start < E.Stop)
                               OR (E.Start >= T.Start AND E.Start < T.Stop))
                           AND E.Salary > T.Salary;



  This approach creates an auxiliary table. We add to this table the
  lower period of a period subtraction and the upper period of a period
  subtraction.  We then delete all periods that overlap with some row
  defined by the subquery, thereby effecting the NOT EXISTS. Finally we
  generate from the auxiliary table maximal periods, in the same way
  that the salary information was computed above. As one might imagine,
  such SQL code is extremely inefficient to execute, given the complex
  nested queries with inequality predicates.

  A third alternative is to use SQL as little as possible, and instead
  compute the desired maximum history in a host language using cursors.

  The query in TSQL2 is again straightforward and intuitive.


               SELECT MAX(Salary)
               FROM Employee



  27.16.7.  SUMMARY

  Time-varying data is manipulated in most database applications. Valid-
  time support is absent in SQL. Many common temporal queries are either
  difficult to simulate in SQL, or require embedding SQL in a procedural
  language, due to SQL's lack of support for valid-time tables in its
  data model and query constructs.

  Elsewhere, we showed that adding valid-time support requires few
  changes to the DBMS implementation, can dramatically simplify some
  queries and enable others, and can later enable optimizations in
  storage structures, indexing methods, and optimization strategies that
  can yield significant performance improvements.

  With a new part of SQL3 supporting time-varying information, we can
  begin to address such applications, enabling SQL3 to better manage
  temporal data.


       ----------------------------------------------------------------------------
                  Accredited Standards Committee* X3, Information Technology
       NEWS RELEASE

       Doc. No.:       PR/96-0002

       Reply to:       Barbara Bennett at bbennett@itic.nw.dc.us

                    X3 Announces the Approval of a New Project, ISO/IEC

                                9075 Part 7:  SQL/Temporal

       Washington D.C., January 1996
       ----------------------------------------------------------------------------



  -- Accredited Standards Committee X3, Information Technology is
  announcing the approval of a new project on SQL/Temporal Support,
  ISO/IEC 9075 Part 7, with the work being done in Technical Committee
  X3H2, Database.  The scope of this proposed standard specifies a new
  Part of the emerging SQL3 standard, e.g., Part 7, Temporal SQL, to be
  extensions to the SQL language supporting storage, retrieval, and
  manipulation of temporal data in an SQL database environment.  The
  next X3H2 meeting is scheduled for March 11-14, 1996 in Kansas.

  Inquiries regarding this project should be sent to the


               Chairman of X3H2,
               Dr. Donald R. Deutsch,
               Sybase, Inc., Suite 800,
               6550 Rock Spring
               Drive, Bethesda, MD  20817.
               Email: deutsch@sybase.com.



  An initial call for possible patents and other pertinent issues (copy
  rights, trademarks) is now being issued.  Please submit information on
  these issues to the


               X3 Secretariat at
               1250 Eye Street
               NW, Suite 200,
               Washington DC  20005.
               Email: x3sec@itic.nw.dc.us
               FAX:  (202)638-4922.



  27.17.  Part 8 - ISO/ANSI SQL MULTIMEDIA (SQL/MM)

  A new ISO/IEC international standardization project for development of
  an SQL class library for multimedia applications was approved in early
  1993.  This new standardization activity, named SQL Multimedia
  (SQL/MM), will specify packages of SQL abstract data type (ADT)
  definitions using the facilities for ADT specification and invocation
  provided in the emerging SQL3 specification. SQL/MM intends to
  standardize class libraries for science and engineering, full-text and
  document processing, and methods for the management of multimedia
  objects such as image, sound, animation, music, and video. It will
  likely provide an SQL language binding for multimedia objects defined
  by other JTC1 standardization bodies (e.g. SC18 for documents, SC24
  for images, and SC29 for photographs and motion pictures).

  The Project Plan for SQL/MM indicates that it will be a multi-part
  standard consisting of an evolving number of parts. Part 1 will be a
  Framework that specifies how the other parts are to be constructed.
  Each of the other parts will be devoted to a specific SQL application
  package. The following SQL/MM Part structure exists as of August 1994:


    Part 1: Framework A non-technical description of how the document
     is structured.

    Part 2: Full Text Methods and ADTs for text data processing. About
     45 pages.

    Part 3: Spatial Methods and ADTs for spatial data management. About
     200 pages with active contributions from Spatial Data experts from
     3 national bodies.

    Part 4: General Purpose Methods and ADTs for complex numbers,
     Facilities include trig and exponential functions, vectors, sets,
     etc.  Currently about 90 pages.

  There are a number of standards efforts in the area of Spatial and
  Geographic information:


    ANSI X3L1 - Geographic Information Systems.  Mark Ashworth of
     Unisys is the liason between X3L1 and ANSI X3H2. He is also the
     editor for parts 1, 3, and 4 of the SQL/MM draft.

    ISO TC 211 - Geographic information/Geomatics

  28.  Technical support for PostgreSQL

  If you have any technical question or encounter any problem you can e-
  mail to:

    pgsql-questions@postgresql.org

    Newsgroup  <comp.databases.postgresql.general>

    Newsgroup  <comp.databases.postgresql.hackers>

    Newsgroup  <comp.databases.postgresql.doc>

    Newsgroup  <comp.databases.postgresql.bugs>

    Newsgroup  <linux.postgres>

    Other Mailing lists  <http://www.postgresql.org>

     and expect e-mail answer in less than a day. As the user-base of
     internet product is very vast, and users support other users,
     internet will be capable of giving technical support to billions of
     users easily. Email support is much more convenient than telephone
     support as you can cut and paste error messages, program output
     etc.. and easily transmit to mailing list/newsgroup.


  28.1.  Commercial Support

  PostgreSQL organisation is selling technical support to companies, the
  revenue generated will be used for maintaining several mirror sites
  (web and ftp) around the world. The revenue will also be used to
  produce printed documentation, guides, textbooks which will help the
  customers. They are at <http://www.postgresql.org>

  Another company called 'Great Bridge Corporation' is doing
  development, sales and support of PostgreSQL. They are at
  <http://www.greatbridge.com>. It is a public company setup by
  'Landmark Communications corp' and other venture capital firms to
  exclusively sell and support PostgreSQL to very large enterprises and
  corporations all over the world.

  You can also take help from professional consulting firms like RedHat,
  Anderson, WGS (Work Group Solutions). Contact them for help, since
  they have very good expertise in "C", "C++" (PostgreSQL is written in
  "C") -

    Redhat Corp - Database consulting division  <http://www.redhat.com>

    Work Group Solutions  <http://www.wgs.com>

    Anderson Consulting  <http://www.ac.com>

  29.  Economic and Business Aspects

  Commercial databases pay many taxes like federal, state, sales,
  employment, social security, medicare taxes, health care for
  employees, bunch of benefits for employees, marketing and
  advertisement costs. All these costs do not go directly for the
  development of the database and do not improve the quality or
  technology of the database. When you buy a commercial database, some
  portion of the amount goes for overheads like taxes, expenses and
  balance for database R&D costs.

  Also commercial databases have to pay for buildings/real-estates and
  purchase Unix machines, install and maintain them. All of these costs
  are passed onto customers.

  PostgreSQL has the advantage over commercial databases as there is no
  direct taxes since it is made on the internet. A very vast group of
  people contribute to the development of the PostgreSQL. For example,
  in a hypothetical case, if there are one million companies in U.S.A
  and each contribute about $ 10 (worth of software to PostgreSQL) then
  each and every company will get ten million dollars!! This is the
  GREAT MAGIC of software development on internet.

  Currently, PostgreSQL source code is about 2,50,000 lines of "C",
  "C++" code. If cost of each line of "C" code is $ 2 then the
  PostgreSQL is worth about $ 5,00,000 (half a million dollars!).

  Many companies already develop in-house vast amount of "C", "C++"
  code. Hence by taking in the source code of PostgreSQL and
  collaborating with other companies on internet will greatly benefit
  the company saving time and efforts.


  30.  List of Other Databases

  Listed below are other SQL databases for Unix, Linux.

    Click and go to Applications->databases.
     <http://www.caldera.com/tech-ref/linuxapps/linapps.html>

    Click and go to Applications->databases.
     <http://www.xnet.com/~blatura/linapps.shtml>

    Database resources  <http://linas.org/linux/db.html> This was
     written by Linas Vepstas: linas@fc.net

    Free Database List
     <http://cuiwww.unige.ch:80/~scg/FreeDB/FreeDB.list.html>

    Browne's RDBMS List <http://www.hex.net/~cbbrowne/rdbms.html>
     written by Christopher B. Browne cbbrowne@hex.net

    SAL's List of Relational DBMS <http://SAL.KachinaTech.COM/H/1/>

    SAL's List of Object-Oriented DBMS
     <http://SAL.KachinaTech.COM/H/2/>

    SAL's List of Utilites and Other Databases
     <http://SAL.KachinaTech.COM/H/3/>

    ACM SIGMOD Index of Publicly Available Database Software
     <http://bunny.cs.uiuc.edu/sigmod/databaseSoftware/>

  31.  Internet World Wide Web Searching Tips

  Internet is very vast and it has vast number of software and has a
  ocean of information underneath. It is growing at the rate of 300%
  annually world wide. It is estimated that there are about 10 million
  Web sites world wide!

  To search for a information you would use search engines like "Yahoo",
  "Netscape", "Lycos" etc. Go to Yahoo, click on search.  Use filtering
  options to narrow down your search criteria. The default search action
  is "Intelligent search" which is more general and lists all
  possiblities. Click on "Options" to select "EXACT phrase" search,
  "AND" search, "OR" search, etc.. This way you would find the
  information you need much faster. Also in the search menu, there are
  radio-buttons for searching in Usenet, Web-sites and Yahoo sites.

  32.  Conclusion

  After researching all the available databases which are free and
  source code is available, it was found that ONLY PostgreSQL is the
  MOST mature, most widely used and robust RDBMS SQL free database
  (object relational) in the world.

  PostgreSQL is very appealing since lot of work had already been done.
  It has ODBC and JDBC drivers, using these it is possible to write
  applications independent of the databases. The applications written in
  PostgreSQL using ODBC, JDBC drivers are easily portable to other
  databases like Oracle, Sybase and Informix and vice versa.

  You may ask "But why PostgreSQL ?" The answer is, since it takes lot
  more time to develop a database system from scratch, it makes sense to
  pick up a database system which satisfies the following conditions -

  A database system


    Whose source code is available - Must be a 'Open Source Code'
     system

    Has no license strings, no ownership strings attached to it

    Which can be distributed on internet

    Which had been on development for several years.

    Which satisfies standards like ISO/ANSI SQL 92 (and SQL 89)

    Which can satisfy future needs like SQL 3 (SQL 98)

    Which has advanced capabilities

     And it just happens to be 'PostgreSQL' which satisfies all these
     conditions and is an appropriate software for this situation.  You
     may say 'PostgreSQL' is a very strange name. But my argument is -
     why change the name. This world is stuck with "PostgreSQL"
     forever!!

  33.  FAQ - Questions on PostgreSQL

  Please refer to the latest version of FAQ for General, Linux and Irix
  at

    <http://www.postgresql.org/docs/faq-english.shtml>

  34.  Other Formats of this Document

  This document is published in 11 different formats namely - DVI,
  Postscript, Latex, Adobe Acrobat PDF, LyX, GNU-info, HTML, RTF(Rich
  Text Format), Plain-text, Unix man pages and SGML.

    You can get this HOWTO document as a single file tar ball in HTML,
     DVI, Postscript or SGML formats from -
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/>

    Plain text format is in:
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO>

    Translations to other languages like French, German, Spanish,
     Chinese, Japanese are in
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> Any help from you to
     translate to other languages is welcome.

     The document is written using a tool called "SGML-Tools" which can
     be got from - <http://www.sgmltools.org> Compiling the source you
     will get the following commands like

    sgml2html databasehowto.sgml     (to generate html file)

    sgml2rtf  databasehowto.sgml     (to generate RTF file)

    sgml2latex databasehowto.sgml    (to generate latex file)

  LaTeX documents may be converted into PDF files simply by producing a
  Postscript output using sgml2latex ( and dvips) and running the output
  through the Acrobat distill ( <http://www.adobe.com>) command as
  follows:



  ______________________________________________________________________
  bash$ man sgml2latex
  bash$ sgml2latex filename.sgml
  bash$ man dvips
  bash$ dvips -o filename.ps filename.dvi
  bash$ distill filename.ps
  bash$ man ghostscript
  bash$ man ps2pdf
  bash$ ps2pdf input.ps output.pdf
  bash$ acroread output.pdf &
  ______________________________________________________________________


  Or you can use Ghostscript command ps2pdf.  ps2pdf is a work-alike for
  nearly all the functionality of Adobe's Acrobat Distiller product: it
  converts PostScript files to Portable Document Format (PDF) files.
  ps2pdf is implemented as a very small command script (batch file) that
  invokes Ghostscript, selecting a special "output device" called
  pdfwrite. In order to use ps2pdf, the pdfwrite device must be included
  in the makefile when Ghostscript was compiled; see the documentation
  on building Ghostscript for details.

  This howto document is located at -

    <http://sunsite.unc.edu/LDP/HOWTO/PostgreSQL-HOWTO.html>

  Also you can find this document at the following mirrors sites -

    <http://www.caldera.com/LDP/HOWTO/PostgreSQL-HOWTO.html>

    <http://www.WGS.com/LDP/HOWTO/PostgreSQL-HOWTO.html>

    <http://www.cc.gatech.edu/linux/LDP/HOWTO/PostgreSQL-HOWTO.html>

    <http://www.redhat.com/linux-info/ldp/HOWTO/PostgreSQL-HOWTO.html>

    Other mirror sites near you (network-address-wise) can be found at
     <http://sunsite.unc.edu/LDP/hmirrors.html> select a site and go to
     directory /LDP/HOWTO/PostgreSQL-HOWTO.html


  In order to view the document in dvi format, use the xdvi program. The
  xdvi program is located in tetex-xdvi*.rpm package in Redhat Linux
  which can be located through ControlPanel | Applications | Publishing
  | TeX menu buttons.  To read dvi document give the command -


               xdvi -geometry 80x90 howto.dvi
               man xdvi



  And resize the window with mouse.  To navigate use Arrow keys, Page
  Up, Page Down keys, also you can use 'f', 'd', 'u', 'c', 'l', 'r',
  'p', 'n' letter keys to move up, down, center, next page, previous
  page etc.  To turn off expert menu press 'x'.

  You can read postscript file using the program 'gv' (ghostview) or The
  ghostscript program is in ghostscript*.rpm package and gv program is
  in gv*.rpm package in Redhat Linux which can be located through
  ControlPanel | Applications | Graphics menu buttons. The gv program is
  much more user friendly than ghostscript.  Also ghostscript and gv are
  available on other platforms like OS/2, Windows 95 and NT, you view
  this document even on those platforms.

    Get ghostscript for Windows 95, OS/2, and for all OSes from
     <http://www.cs.wisc.edu/~ghost>

  To read postscript document give the command -


                       gv howto.ps
                       ghostscript howto.ps



  CAUTION: This document is large, total number of pages (postscript) if
  printed will be approximately 113 pages.

  You can read HTML format document using Netscape Navigator, Microsoft
  Internet explorer, Redhat Baron Web browser or any of the 10 other web
  browsers.

  You can read the latex, LyX output using LyX a X-Windows front end to
  latex.

  35.  Copyright and License

  Copyright Al Dev (Alavoor Vasudevan) 1997-2000.

  License policy is GNU/GPL as per LDP (Linux Documentation project).
  LDP is a GNU/GPL project.  Additional restrictions are - you must
  retain the author's name, email address and this copyright notice on
  all the copies. If you make any changes or additions to this document
  then you should intimate all the authors of this document.

  NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall the
  author/authors of this document be liable for any damages whatsoever
  (including without limitation, special, incidental, consequential, or
  direct/indirect damages for personal injury, loss of business profits,
  business interruption, loss of business information, or any other
  pecuniary loss) arising out of the use of this document.

  Author/authors offers no warranties or guarantees on fitness,
  usability, merchantability of this document. Brands, companies and
  product names mentioned in this document are trademarks or registered
  trademarks of their respective holders.  Please refer to individual
  copyright notices of brands, companies and products mentioned in this
  document. It is your responsibility to read and understand the
  copyright notices of the organisations/companies/products/authors
  mentioned in this document before using their respective information.

  AJ.  Appendix A - Syntax of ANSI/ISO SQL 1992



  This file contains a depth-first tree traversal of the BNF
  for the  language done at about 27-AUG-1992 11:03:41.64.
  The specific version of the BNF included here is:  ANSI-only, SQL2-only.


  <SQL terminal character> ::=
        <SQL language character>
      | <SQL embedded language character>

  <SQL language character> ::=
        <simple Latin letter>
      | <digit>
      | <SQL special character>

  <simple Latin letter> ::=
        <simple Latin upper case letter>
      | <simple Latin lower case letter>

  <simple Latin upper case letter> ::=
            A | B | C | D | E | F | G | H | I | J | K | L | M | N | O
      | P | Q | R | S | T | U | V | W | X | Y | Z

  <simple Latin lower case letter> ::=
            a | b | c | d | e | f | g | h | i | j | k | l | m | n | o
      | p | q | r | s | t | u | v | w | x | y | z

  <digit> ::=
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

  <SQL special character> ::=
        <space>
      | <double quote>
      | <percent>
      | <ampersand>
      | <quote>
      | <left paren>
      | <right paren>
      | <asterisk>
      | <plus sign>
      | <comma>
      | <minus sign>
      | <period>
      | <solidus>
      | <colon>
      | <semicolon>
      | <less than operator>
      | <equals operator>
      | <greater than operator>
      | <question mark>
      | <underscore>
      | <vertical bar>

  <space> ::= !! <EMPHASIS>(space character in character set in use)

  <double quote> ::= "

  <percent> ::= %

  <ampersand> ::= &

  <quote> ::= '

  <left paren> ::= (

  <right paren> ::= )

  <asterisk> ::= *

  <plus sign> ::= +

  <comma> ::= ,

  <minus sign> ::= -

  <period> ::= .

  <solidus> ::= /

  <colon> ::= :

  <semicolon> ::= ;

  <less than operator> ::= <

  <equals operator> ::= =

  <greater than operator> ::= >

  <question mark> ::= ?

  <underscore> ::= _

  <vertical bar> ::= |

  <SQL embedded language character> ::=
        <left bracket>
      | <right bracket>

  <left bracket> ::= [

  <right bracket> ::= ]

  <token> ::=
        <nondelimiter token>
      | <delimiter token>

  <nondelimiter token> ::=
        <regular identifier>
      | <key word>
      | <unsigned numeric literal>
      | <national character string literal>
      | <bit string literal>
      | <hex string literal>

  <regular identifier> ::= <identifier body>

  <identifier body> ::=
      <identifier start> [ ( <underscore> | <identifier part> )... ]

  <identifier start> ::= <EMPHASIS>(!! See the Syntax Rules)

  <identifier part> ::=
        <identifier start>
      | <digit>

  <key word> ::=
        <reserved word>
      | <non-reserved word>

  <reserved word> ::=
        ABSOLUTE | ACTION | ADD | ALL
      | ALLOCATE | ALTER | AND
      | ANY | ARE
      | AS | ASC
      | ASSERTION | AT
      | AUTHORIZATION | AVG
      | BEGIN | BETWEEN | BIT | BIT_LENGTH
      | BOTH | BY
      | CASCADE | CASCADED | CASE | CAST
      | CATALOG
      | CHAR | CHARACTER | CHAR_LENGTH
      | CHARACTER_LENGTH | CHECK | CLOSE | COALESCE
      | COLLATE | COLLATION
      | COLUMN | COMMIT
      | CONNECT
      | CONNECTION | CONSTRAINT
      | CONSTRAINTS | CONTINUE
      | CONVERT | CORRESPONDING | COUNT | CREATE | CROSS
      | CURRENT
      | CURRENT_DATE | CURRENT_TIME
      | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR
      | DATE | DAY | DEALLOCATE | DEC
      | DECIMAL | DECLARE | DEFAULT | DEFERRABLE
      | DEFERRED | DELETE | DESC | DESCRIBE | DESCRIPTOR
      | DIAGNOSTICS
      | DISCONNECT | DISTINCT | DOMAIN | DOUBLE | DROP
      | ELSE | END | END-EXEC | ESCAPE
      | EXCEPT | EXCEPTION
      | EXEC | EXECUTE | EXISTS
      | EXTERNAL | EXTRACT
      | FALSE | FETCH | FIRST | FLOAT | FOR
      | FOREIGN | FOUND | FROM | FULL
      | GET | GLOBAL | GO | GOTO
      | GRANT | GROUP
      | HAVING | HOUR
      | IDENTITY | IMMEDIATE | IN | INDICATOR
      | INITIALLY | INNER | INPUT
      | INSENSITIVE | INSERT | INT | INTEGER | INTERSECT
      | INTERVAL | INTO | IS
      | ISOLATION
      | JOIN
      | KEY
      | LANGUAGE | LAST | LEADING | LEFT
      | LEVEL | LIKE | LOCAL | LOWER
      | MATCH | MAX | MIN | MINUTE | MODULE
      | MONTH
      | NAMES | NATIONAL | NATURAL | NCHAR | NEXT | NO
      | NOT | NULL
      | NULLIF | NUMERIC
      | OCTET_LENGTH | OF
      | ON | ONLY | OPEN | OPTION | OR
      | ORDER | OUTER
      | OUTPUT | OVERLAPS
      | PAD | PARTIAL | POSITION | PRECISION | PREPARE
      | PRESERVE | PRIMARY
      | PRIOR | PRIVILEGES | PROCEDURE | PUBLIC
      | READ | REAL | REFERENCES | RELATIVE | RESTRICT
      | REVOKE | RIGHT
      | ROLLBACK | ROWS
      | SCHEMA | SCROLL | SECOND | SECTION
      | SELECT
      | SESSION | SESSION_USER | SET
      | SIZE | SMALLINT | SOME | SPACE | SQL | SQLCODE
      | SQLERROR | SQLSTATE
      | SUBSTRING | SUM | SYSTEM_USER
      | TABLE | TEMPORARY
      | THEN | TIME | TIMESTAMP
      | TIMEZONE_HOUR | TIMEZONE_MINUTE
      | TO | TRAILING | TRANSACTION
      | TRANSLATE | TRANSLATION | TRIM | TRUE
      | UNION | UNIQUE | UNKNOWN | UPDATE | UPPER | USAGE
      | USER | USING
      | VALUE | VALUES | VARCHAR | VARYING | VIEW
      | WHEN | WHENEVER | WHERE | WITH | WORK | WRITE
      | YEAR
      | ZONE

  <non-reserved word> ::=

        ADA
      | C | CATALOG_NAME
      | CHARACTER_SET_CATALOG | CHARACTER_SET_NAME
      | CHARACTER_SET_SCHEMA | CLASS_ORIGIN | COBOL | COLLATION_CATALOG
      | COLLATION_NAME | COLLATION_SCHEMA | COLUMN_NAME | COMMAND_FUNCTION
      | COMMITTED
      | CONDITION_NUMBER | CONNECTION_NAME | CONSTRAINT_CATALOG | CONSTRAINT_NAME
      | CONSTRAINT_SCHEMA | CURSOR_NAME
      | DATA | DATETIME_INTERVAL_CODE
      | DATETIME_INTERVAL_PRECISION | DYNAMIC_FUNCTION
      | FORTRAN
      | LENGTH
      | MESSAGE_LENGTH | MESSAGE_OCTET_LENGTH | MESSAGE_TEXT | MORE | MUMPS
      | NAME | NULLABLE | NUMBER
      | PASCAL | PLI
      | REPEATABLE | RETURNED_LENGTH | RETURNED_OCTET_LENGTH | RETURNED_SQLSTATE
      | ROW_COUNT
      | SCALE | SCHEMA_NAME | SERIALIZABLE | SERVER_NAME | SUBCLASS_ORIGIN
      | TABLE_NAME | TYPE
      | UNCOMMITTED | UNNAMED

  <unsigned numeric literal> ::=
        <exact numeric literal>
      | <approximate numeric literal>

  <exact numeric literal> ::=
        <unsigned integer> [ <period> [ <unsigned integer> ] ]
      | <period> <unsigned integer>

  <unsigned integer> ::= <digit>...

  <approximate numeric literal> ::= <mantissa> E <exponent>

  <mantissa> ::= <exact numeric literal>

  <exponent> ::= <signed integer>

  <signed integer> ::= [ <sign> ] <unsigned integer>

  <sign> ::= <plus sign> | <minus sign>

  <national character string literal> ::=
      N <quote> [ <character representation>... ] <quote>
        [ ( <separator>... <quote> [ <character representation>... ] <quote> )... ]

  <character representation> ::=
        <nonquote character>
      | <quote symbol>

  <nonquote character> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <quote symbol> ::= <quote><quote>

  <separator> ::= ( <comment> | <space> | <newline> )...

  <comment> ::=
      <comment introducer> [ <comment character>... ] <newline>

  <comment introducer> ::= <minus sign><minus sign>[<minus sign>...]

  <comment character> ::=
        <nonquote character>
      | <quote>

  <newline> ::= !! <EMPHASIS>(implementation-defined end-of-line indicator)

  <bit string literal> ::=
      B <quote> [ <bit>... ] <quote>
        [ ( <separator>... <quote> [ <bit>... ] <quote> )... ]

  <bit> ::= 0 | 1

  <hex string literal> ::=
      X <quote> [ <hexit>... ] <quote>
        [ ( <separator>... <quote> [ <hexit>... ] <quote> )... ]

  <hexit> ::= <digit> | A | B | C | D | E | F | a | b | c | d | e | f

  <delimiter token> ::=
        <character string literal>
      | <date string>
      | <time string>
      | <timestamp string>
      | <interval string>
      | <delimited identifier>
      | <SQL special character>
      | <not equals operator>
      | <greater than or equals operator>
      | <less than or equals operator>
      | <concatenation operator>
      | <double period>
      | <left bracket>
      | <right bracket>

  <character string literal> ::=
      [ <introducer><character set specification> ]
      <quote> [ <character representation>... ] <quote>
        [ ( <separator>... <quote> [ <character representation>... ] <quote> )... ]

  <introducer> ::= <underscore>

  <character set specification> ::=
        <standard character repertoire name>
      | <implementation-defined character repertoire name>
      | <user-defined character repertoire name>
      | <standard universal character form-of-use name>
      | <implementation-defined universal character form-of-use name>

  <standard character repertoire name> ::= <character set name>

  <character set name> ::= [ <schema name> <period> ]
        <SQL language identifier>

  <schema name> ::=
      [ <catalog name> <period> ] <unqualified schema name>

  <catalog name> ::= <identifier>

  <identifier> ::=
      [ <introducer><character set specification> ] <actual identifier>

  <actual identifier> ::=
        <regular identifier>
      | <delimited identifier>

  <delimited identifier> ::=
      <double quote> <delimited identifier body> <double quote>

  <delimited identifier body> ::= <delimited identifier part>...

  <delimited identifier part> ::=
        <nondoublequote character>
      | <doublequote symbol>

  <nondoublequote character> ::= <EMPHASIS>(!! See the Syntax Rules)

  <doublequote symbol> ::= <double quote><double quote>

  <unqualified schema name> ::= <identifier>

  <SQL language identifier> ::=
      <SQL language identifier start>
         [ ( <underscore> | <SQL language identifier part> )... ]

  <SQL language identifier start> ::= <simple Latin letter>

  <SQL language identifier part> ::=
        <simple Latin letter>
      | <digit>

  <implementation-defined character repertoire name> ::=
      <character set name>

  <user-defined character repertoire name> ::= <character set name>

  <standard universal character form-of-use name> ::=
      <character set name>

  <implementation-defined universal character form-of-use name> ::=
      <character set name>

  <date string> ::=
      <quote> <date value> <quote>

  <date value> ::=
      <years value> <minus sign> <months value>
          <minus sign> <days value>

  <years value> ::= <datetime value>

  <datetime value> ::= <unsigned integer>

  <months value> ::= <datetime value>

  <days value> ::= <datetime value>

  <time string> ::=
      <quote> <time value> [ <time zone interval> ] <quote>

  <time value> ::=
      <hours value> <colon> <minutes value> <colon> <seconds value>

  <hours value> ::= <datetime value>

  <minutes value> ::= <datetime value>

  <seconds value> ::=
        <seconds integer value> [ <period> [ <seconds fraction> ] ]

  <seconds integer value> ::= <unsigned integer>

  <seconds fraction> ::= <unsigned integer>

  <time zone interval> ::=
      <sign> <hours value> <colon> <minutes value>

  <timestamp string> ::=
      <quote> <date value> <space> <time value>
          [ <time zone interval> ] <quote>

  <interval string> ::=
      <quote> ( <year-month literal> | <day-time literal> ) <quote>

  <year-month literal> ::=
        <years value>
      | [ <years value> <minus sign> ] <months value>

  <day-time literal> ::=
        <day-time interval>
      | <time interval>

  <day-time interval> ::=
      <days value>
        [ <space> <hours value> [ <colon> <minutes value>
          [ <colon> <seconds value> ] ] ]

  <time interval> ::=
        <hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ]
      | <minutes value> [ <colon> <seconds value> ]
      | <seconds value>

  <not equals operator> ::= <>

  <greater than or equals operator> ::= >=

  <less than or equals operator> ::= <=

  <concatenation operator> ::= ||

  <double period> ::= ..

  <module> ::=
      <module name clause>
      <language clause>
      <module authorization clause>
      [ <temporary table declaration>... ]
      <module contents>...

  <module name clause> ::=
      MODULE [ <module name> ]
        [ <module character set specification> ]

  <module name> ::= <identifier>

  <module character set specification> ::=
      NAMES ARE <character set specification>

  <language clause> ::=
      LANGUAGE <language name>

  <language name> ::=
      ADA | C | COBOL | FORTRAN | MUMPS | PASCAL | PLI

  <module authorization clause> ::=
        SCHEMA <schema name>
      | AUTHORIZATION <module authorization identifier>
      | SCHEMA <schema name>
            AUTHORIZATION <module authorization identifier>

  <module authorization identifier> ::=
      <authorization identifier>

  <authorization identifier> ::= <identifier>

  <temporary table declaration> ::=
      DECLARE LOCAL TEMPORARY TABLE
          <qualified local table name>
        <table element list>
        [ ON COMMIT ( PRESERVE | DELETE ) ROWS ]

  <qualified local table name> ::=
      MODULE <period> <local table name>

  <local table name> ::= <qualified identifier>

  <qualified identifier> ::= <identifier>

  <table element list> ::=
        <left paren> <table element> [ ( <comma> <table element> )... ] <right paren>

  <table element> ::=
        <column definition>
      | <table constraint definition>

  <column definition> ::=
      <column name> ( <data type> | <domain name> )
      [ <default clause> ]
      [ <column constraint definition>... ]
      [ <collate clause> ]

  <column name> ::= <identifier>

  <data type> ::=
        <character string type>
             [ CHARACTER SET <character set specification> ]
      | <national character string type>
      | <bit string type>
      | <numeric type>
      | <datetime type>
      | <interval type>

  <character string type> ::=
        CHARACTER [ <left paren> <length> <right paren> ]
      | CHAR [ <left paren> <length> <right paren> ]
      | CHARACTER VARYING <left paren> <length> <right paren>
      | CHAR VARYING <left paren> <length> <right paren>
      | VARCHAR <left paren> <length> <right paren>

  <length> ::= <unsigned integer>

  <national character string type> ::=
        NATIONAL CHARACTER [ <left paren> <length> <right paren> ]
      | NATIONAL CHAR [ <left paren> <length> <right paren> ]
      | NCHAR [ <left paren> <length> <right paren> ]
      | NATIONAL CHARACTER VARYING <left paren> <length> <right paren>
      | NATIONAL CHAR VARYING <left paren> <length> <right paren>
      | NCHAR VARYING <left paren> <length> <right paren>

  <bit string type> ::=
        BIT [ <left paren> <length> <right paren> ]
      | BIT VARYING <left paren> <length> <right paren>

  <numeric type> ::=
        <exact numeric type>
      | <approximate numeric type>

  <exact numeric type> ::=
        NUMERIC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | DECIMAL [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | DEC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | INTEGER
      | INT
      | SMALLINT

  <precision> ::= <unsigned integer>

  <scale> ::= <unsigned integer>

  <approximate numeric type> ::=
        FLOAT [ <left paren> <precision> <right paren> ]
      | REAL
      | DOUBLE PRECISION

  <datetime type> ::=
        DATE
      | TIME [ <left paren> <time precision> <right paren> ]
            [ WITH TIME ZONE ]
      | TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
            [ WITH TIME ZONE ]

  <time precision> ::= <time fractional seconds precision>

  <time fractional seconds precision> ::= <unsigned integer>

  <timestamp precision> ::= <time fractional seconds precision>

  <interval type> ::= INTERVAL <interval qualifier>

  <interval qualifier> ::=
        <start field> TO <end field>
      | <single datetime field>

  <start field> ::=
      <non-second datetime field>
          [ <left paren> <interval leading field precision> <right paren> ]

  <non-second datetime field> ::= YEAR | MONTH | DAY | HOUR
      | MINUTE

  <interval leading field precision> ::= <unsigned integer>

  <end field> ::=
        <non-second datetime field>
      | SECOND [ <left paren> <interval fractional seconds precision> <right paren> ]

  <interval fractional seconds precision> ::= <unsigned integer>

  <single datetime field> ::=
        <non-second datetime field>
            [ <left paren> <interval leading field precision> <right paren> ]
      | SECOND [ <left paren> <interval leading field precision>
            [ <comma> <interval fractional seconds precision> ] <right paren> ]

  <domain name> ::= <qualified name>

  <qualified name> ::=
      [ <schema name> <period> ] <qualified identifier>

  <default clause> ::=
        DEFAULT <default option>

  <default option> ::=
        <literal>
      | <datetime value function>
      | USER
      | CURRENT_USER
      | SESSION_USER
      | SYSTEM_USER
      | NULL

  <literal> ::=
        <signed numeric literal>
      | <general literal>

  <signed numeric literal> ::=
      [ <sign> ] <unsigned numeric literal>

  <general literal> ::=
        <character string literal>
      | <national character string literal>
      | <bit string literal>
      | <hex string literal>
      | <datetime literal>
      | <interval literal>

  <datetime literal> ::=
        <date literal>
      | <time literal>
      | <timestamp literal>

  <date literal> ::=
      DATE <date string>

  <time literal> ::=
      TIME <time string>

  <timestamp literal> ::=
      TIMESTAMP <timestamp string>

  <interval literal> ::=
      INTERVAL [ <sign> ] <interval string> <interval qualifier>

  <datetime value function> ::=
        <current date value function>
      | <current time value function>
      | <current timestamp value function>

  <current date value function> ::= CURRENT_DATE

  <current time value function> ::=
        CURRENT_TIME [ <left paren> <time precision> <right paren> ]

  <current timestamp value function> ::=
        CURRENT_TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]

  <column constraint definition> ::=
      [ <constraint name definition> ]
      <column constraint>
        [ <constraint attributes> ]

  <constraint name definition> ::= CONSTRAINT <constraint name>
  <constraint name> ::= <qualified name>

  <column constraint> ::=
        NOT NULL
      | <unique specification>
      | <references specification>
      | <check constraint definition>

  <unique specification> ::=
      UNIQUE | PRIMARY KEY

  <references specification> ::=
      REFERENCES <referenced table and columns>
        [ MATCH <match type> ]
        [ <referential triggered action> ]

  <referenced table and columns> ::=
       <table name> [ <left paren> <reference column list> <right paren> ]

  <table name> ::=
        <qualified name>
      | <qualified local table name>

  <reference column list> ::= <column name list>

  <column name list> ::=
      <column name> [ ( <comma> <column name> )... ]

  <match type> ::=
        FULL
      | PARTIAL

  <referential triggered action> ::=
        <update rule> [ <delete rule> ]
      | <delete rule> [ <update rule> ]

  <update rule> ::= ON UPDATE <referential action>

  <referential action> ::=
        CASCADE
      | SET NULL
      | SET DEFAULT
      | NO ACTION

  <delete rule> ::= ON DELETE <referential action>

  <check constraint definition> ::=
      CHECK
          <left paren> <search condition> <right paren>

  <search condition> ::=
        <boolean term>
      | <search condition> OR <boolean term>

  <boolean term> ::=
        <boolean factor>
      | <boolean term> AND <boolean factor>

  <boolean factor> ::=
      [ NOT ] <boolean test>

  <boolean test> ::=
      <boolean primary> [ IS [ NOT ]
            <truth value> ]

  <boolean primary> ::=
        <predicate>
      | <left paren> <search condition> <right paren>

  <predicate> ::=
        <comparison predicate>
      | <between predicate>
      | <in predicate>
      | <like predicate>
      | <null predicate>
      | <quantified comparison predicate>
      | <exists predicate>
      | <unique predicate>
      | <match predicate>
      | <overlaps predicate>

  <comparison predicate> ::=
      <row value constructor> <comp op>
          <row value constructor>

  <row value constructor> ::=
         <row value constructor element>
      | <left paren> <row value constructor list> <right paren>
      | <row subquery>

  <row value constructor element> ::=
        <value expression>
      | <null specification>
      | <default specification>

  <value expression> ::=
        <numeric value expression>
      | <string value expression>
      | <datetime value expression>
      | <interval value expression>

  <numeric value expression> ::=
        <term>
      | <numeric value expression> <plus sign> <term>
      | <numeric value expression> <minus sign> <term>

  <term> ::=
        <factor>
      | <term> <asterisk> <factor>
      | <term> <solidus> <factor>

  <factor> ::=
      [ <sign> ] <numeric primary>

  <numeric primary> ::=
        <value expression primary>
      | <numeric value function>

  <value expression primary> ::=
        <unsigned value specification>
      | <column reference>
      | <set function specification>
      | <scalar subquery>
      | <case expression>
      | <left paren> <value expression> <right paren>
      | <cast specification>

  <unsigned value specification> ::=
        <unsigned literal>
      | <general value specification>

  <unsigned literal> ::=
        <unsigned numeric literal>
      | <general literal>

  <general value specification> ::=
        <parameter specification>
      | <dynamic parameter specification>
      | <variable specification>
      | USER
      | CURRENT_USER
      | SESSION_USER
      | SYSTEM_USER
      | VALUE

  <parameter specification> ::=
      <parameter name> [ <indicator parameter> ]

  <parameter name> ::= <colon> <identifier>

  <indicator parameter> ::=
      [ INDICATOR ] <parameter name>

  <dynamic parameter specification> ::= <question mark>

  <variable specification> ::=
      <embedded variable name> [ <indicator variable> ]

  <embedded variable name> ::=
      <colon><host identifier>

  <host identifier> ::=
        <Ada host identifier>
      | <C host identifier>
      | <COBOL host identifier>
      | <Fortran host identifier>
      | <MUMPS host identifier>
      | <Pascal host identifier>
      | <PL/I host identifier>

  <Ada host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <C host identifier> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <COBOL host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <Fortran host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <MUMPS host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <Pascal host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <PL/I host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <indicator variable> ::=
      [ INDICATOR ] <embedded variable name>

  <column reference> ::= [ <qualifier> <period> ] <column name>

  <qualifier> ::=
        <table name>
      | <correlation name>

  <correlation name> ::= <identifier>

  <set function specification> ::=
        COUNT <left paren> <asterisk> <right paren>
      | <general set function>

  <general set function> ::=
        <set function type>
            <left paren> [ <set quantifier> ] <value expression> <right paren>

  <set function type> ::=
      AVG | MAX | MIN | SUM | COUNT

  <set quantifier> ::= DISTINCT | ALL

  <scalar subquery> ::= <subquery>

  <subquery> ::= <left paren> <query expression> <right paren>

  <query expression> ::=
        <non-join query expression>
      | <joined table>

  <non-join query expression> ::=
        <non-join query term>
      | <query expression> UNION  [ ALL ]
            [ <corresponding spec> ] <query term>
      | <query expression> EXCEPT [ ALL ]
            [ <corresponding spec> ] <query term>

  <non-join query term> ::=
        <non-join query primary>
      | <query term> INTERSECT [ ALL ]
            [ <corresponding spec> ] <query primary>

  <non-join query primary> ::=
        <simple table>
      | <left paren> <non-join query expression> <right paren>

  <simple table> ::=
        <query specification>
      | <table value constructor>
      | <explicit table>

  <query specification> ::=
      SELECT [ <set quantifier> ] <select list> <table expression>

  <select list> ::=
        <asterisk>
      | <select sublist> [ ( <comma> <select sublist> )... ]

  <select sublist> ::=
        <derived column>
      | <qualifier> <period> <asterisk>

  <derived column> ::= <value expression> [ <as clause> ]

  <as clause> ::= [ AS ] <column name>

  <table expression> ::=
      <from clause>
      [ <where clause> ]
      [ <group by clause> ]
      [ <having clause> ]

  <from clause> ::= FROM <table reference>
      [ ( <comma> <table reference> )... ]

  <table reference> ::=
        <table name> [ [ AS ] <correlation name>
            [ <left paren> <derived column list> <right paren> ] ]
      | <derived table> [ AS ] <correlation name>
            [ <left paren> <derived column list> <right paren> ]
      | <joined table>

  <derived column list> ::= <column name list>

  <derived table> ::= <table subquery>

  <table subquery> ::= <subquery>

  <joined table> ::=
        <cross join>
      | <qualified join>
      | <left paren> <joined table> <right paren>

  <cross join> ::=
      <table reference> CROSS JOIN <table reference>

  <qualified join> ::=
      <table reference> [ NATURAL ] [ <join type> ] JOIN
        <table reference> [ <join specification> ]

  <join type> ::=
        INNER
      | <outer join type> [ OUTER ]
      | UNION

  <outer join type> ::=
        LEFT
      | RIGHT
      | FULL

  <join specification> ::=
        <join condition>
      | <named columns join>

  <join condition> ::= ON <search condition>

  <named columns join> ::=
      USING <left paren> <join column list> <right paren>

  <join column list> ::= <column name list>

  <where clause> ::= WHERE <search condition>

  <group by clause> ::=
      GROUP BY <grouping column reference list>

  <grouping column reference list> ::=
      <grouping column reference>
          [ ( <comma> <grouping column reference> )... ]

  <grouping column reference> ::=
      <column reference> [ <collate clause> ]

  <collate clause> ::= COLLATE <collation name>

  <collation name> ::= <qualified name>

  <having clause> ::= HAVING <search condition>

  <table value constructor> ::=
      VALUES <table value constructor list>

  <table value constructor list> ::=
      <row value constructor> [ ( <comma> <row value constructor> )... ]

  <explicit table> ::= TABLE <table name>

  <query term> ::=
        <non-join query term>
      | <joined table>

  <corresponding spec> ::=
      CORRESPONDING [ BY <left paren> <corresponding column list> <right paren> ]

  <corresponding column list> ::= <column name list>

  <query primary> ::=
        <non-join query primary>
      | <joined table>

  <case expression> ::=
        <case abbreviation>
      | <case specification>

  <case abbreviation> ::=
        NULLIF <left paren> <value expression> <comma>
              <value expression> <right paren>
      | COALESCE <left paren> <value expression>
              ( <comma> <value expression> )... <right paren>

  <case specification> ::=
        <simple case>
      | <searched case>

  <simple case> ::=
      CASE <case operand>
        <simple when clause>...
        [ <else clause> ]
      END

  <case operand> ::= <value expression>

  <simple when clause> ::= WHEN <when operand> THEN <result>

  <when operand> ::= <value expression>

  <result> ::= <result expression> | NULL

  <result expression> ::= <value expression>

  <else clause> ::= ELSE <result>

  <searched case> ::=
      CASE
        <searched when clause>...
        [ <else clause> ]
      END

  <searched when clause> ::= WHEN <search condition> THEN <result>

  <cast specification> ::=
      CAST <left paren> <cast operand> AS
          <cast target> <right paren>

  <cast operand> ::=
        <value expression>
      | NULL

  <cast target> ::=
        <domain name>
      | <data type>

  <numeric value function> ::=
        <position expression>
      | <extract expression>
      | <length expression>

  <position expression> ::=
      POSITION <left paren> <character value expression>
          IN <character value expression> <right paren>

  <character value expression> ::=
        <concatenation>
      | <character factor>

  <concatenation> ::=
      <character value expression> <concatenation operator>
          <character factor>

  <character factor> ::=
      <character primary> [ <collate clause> ]

  <character primary> ::=
        <value expression primary>
      | <string value function>

  <string value function> ::=
        <character value function>
      | <bit value function>

  <character value function> ::=
        <character substring function>
      | <fold>
      | <form-of-use conversion>
      | <character translation>
      | <trim function>

  <character substring function> ::=
      SUBSTRING <left paren> <character value expression> FROM <start position>
                  [ FOR <string length> ] <right paren>

  <start position> ::= <numeric value expression>

  <string length> ::= <numeric value expression>

  <fold> ::= ( UPPER | LOWER )
       <left paren> <character value expression> <right paren>

  <form-of-use conversion> ::=
      CONVERT <left paren> <character value expression>
          USING <form-of-use conversion name> <right paren>

  <form-of-use conversion name> ::= <qualified name>

  <character translation> ::=
      TRANSLATE <left paren> <character value expression>
          USING <translation name> <right paren>

  <translation name> ::= <qualified name>

  <trim function> ::=
      TRIM <left paren> <trim operands> <right paren>

  <trim operands> ::=
      [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>
  <trim specification> ::=
        LEADING
      | TRAILING
      | BOTH

  <trim character> ::= <character value expression>

  <trim source> ::= <character value expression>

  <bit value function> ::=
      <bit substring function>

  <bit substring function> ::=
      SUBSTRING <left paren> <bit value expression> FROM <start position>
          [ FOR <string length> ] <right paren>

  <bit value expression> ::=
        <bit concatenation>
      | <bit factor>

  <bit concatenation> ::=
      <bit value expression> <concatenation operator> <bit factor>

  <bit factor> ::= <bit primary>

  <bit primary> ::=
        <value expression primary>
      | <string value function>

  <extract expression> ::=
      EXTRACT <left paren> <extract field>
          FROM <extract source> <right paren>

  <extract field> ::=
        <datetime field>
      | <time zone field>

  <datetime field> ::=
        <non-second datetime field>
      | SECOND

  <time zone field> ::=
        TIMEZONE_HOUR
      | TIMEZONE_MINUTE

  <extract source> ::=
        <datetime value expression>
      | <interval value expression>

  <datetime value expression> ::=
        <datetime term>
      | <interval value expression> <plus sign> <datetime term>
      | <datetime value expression> <plus sign> <interval term>
      | <datetime value expression> <minus sign> <interval term>

  <interval term> ::=
        <interval factor>
      | <interval term 2> <asterisk> <factor>
      | <interval term 2> <solidus> <factor>
      | <term> <asterisk> <interval factor>

  <interval factor> ::=
      [ <sign> ] <interval primary>

  <interval primary> ::=
        <value expression primary> [ <interval qualifier> ]
  <interval term 2> ::= <interval term>

  <interval value expression> ::=
        <interval term>
      | <interval value expression 1> <plus sign> <interval term 1>
      | <interval value expression 1> <minus sign> <interval term 1>
      | <left paren> <datetime value expression> <minus sign>
            <datetime term> <right paren> <interval qualifier>

  <interval value expression 1> ::= <interval value expression>

  <interval term 1> ::= <interval term>

  <datetime term> ::=
        <datetime factor>

  <datetime factor> ::=
        <datetime primary> [ <time zone> ]

  <datetime primary> ::=
        <value expression primary>
      | <datetime value function>

  <time zone> ::=
      AT <time zone specifier>

  <time zone specifier> ::=
        LOCAL
      | TIME ZONE <interval value expression>

  <length expression> ::=
        <char length expression>
      | <octet length expression>
      | <bit length expression>

  <char length expression> ::=
      ( CHAR_LENGTH | CHARACTER_LENGTH )
          <left paren> <string value expression> <right paren>

  <string value expression> ::=
        <character value expression>
      | <bit value expression>

  <octet length expression> ::=
      OCTET_LENGTH <left paren> <string value expression> <right paren>

  <bit length expression> ::=
      BIT_LENGTH <left paren> <string value expression> <right paren>

  <null specification> ::=
      NULL

  <default specification> ::=
      DEFAULT

  <row value constructor list> ::=
      <row value constructor element>
          [ ( <comma> <row value constructor element> )... ]

  <row subquery> ::= <subquery>

  <comp op> ::=
        <equals operator>
      | <not equals operator>
      | <less than operator>
      | <greater than operator>
      | <less than or equals operator>
      | <greater than or equals operator>

  <between predicate> ::=
      <row value constructor> [ NOT ] BETWEEN
        <row value constructor> AND <row value constructor>

  <in predicate> ::=
      <row value constructor>
        [ NOT ] IN <in predicate value>

  <in predicate value> ::=
        <table subquery>
      | <left paren> <in value list> <right paren>

  <in value list> ::=
      <value expression> ( <comma> <value expression> )...

  <like predicate> ::=
      <match value> [ NOT ] LIKE <pattern>
        [ ESCAPE <escape character> ]

  <match value> ::= <character value expression>

  <pattern> ::= <character value expression>

  <escape character> ::= <character value expression>

  <null predicate> ::= <row value constructor>
      IS [ NOT ] NULL

  <quantified comparison predicate> ::=
      <row value constructor> <comp op> <quantifier> <table subquery>

  <quantifier> ::= <all> | <some>

  <all> ::= ALL

  <some> ::= SOME | ANY

  <exists predicate> ::= EXISTS <table subquery>

  <unique predicate> ::= UNIQUE <table subquery>

  <match predicate> ::=
      <row value constructor> MATCH [ UNIQUE ]
          [ PARTIAL | FULL ] <table subquery>

  <overlaps predicate> ::=
      <row value constructor 1> OVERLAPS <row value constructor 2>

  <row value constructor 1> ::= <row value constructor>

  <row value constructor 2> ::= <row value constructor>

  <truth value> ::=
        TRUE
      | FALSE
      | UNKNOWN

  <constraint attributes> ::=
        <constraint check time> [ [ NOT ] DEFERRABLE ]
      | [ NOT ] DEFERRABLE [ <constraint check time> ]

  <constraint check time> ::=
        INITIALLY DEFERRED
      | INITIALLY IMMEDIATE

  <table constraint definition> ::=
      [ <constraint name definition> ]
      <table constraint> [ <constraint attributes> ]

  <table constraint> ::=
        <unique constraint definition>
      | <referential constraint definition>
      | <check constraint definition>

  <unique constraint definition> ::=
              <unique specification> even in SQL3)
      <unique specification>
        <left paren> <unique column list> <right paren>

  <unique column list> ::= <column name list>

  <referential constraint definition> ::=
      FOREIGN KEY
          <left paren> <referencing columns> <right paren>
        <references specification>

  <referencing columns> ::=
      <reference column list>

  <module contents> ::=
        <declare cursor>
      | <dynamic declare cursor>
      | <procedure>

  <declare cursor> ::=
      DECLARE <cursor name> [ INSENSITIVE ] [ SCROLL ] CURSOR
        FOR <cursor specification>

  <cursor name> ::= <identifier>

  <cursor specification> ::=
      <query expression> [ <order by clause> ]
        [ <updatability clause> ]

  <order by clause> ::=
      ORDER BY <sort specification list>

  <sort specification list> ::=
      <sort specification> [ ( <comma> <sort specification> )... ]

  <sort specification> ::=
      <sort key> [ <collate clause> ] [ <ordering specification> ]

  <sort key> ::=
        <column name>
      | <unsigned integer>

  <ordering specification> ::= ASC | DESC

  <updatability clause> ::=
      FOR
          ( READ ONLY |
            UPDATE [ OF <column name list> ] )

  <dynamic declare cursor> ::=
      DECLARE <cursor name> [ INSENSITIVE ] [ SCROLL ] CURSOR
          FOR <statement name>

  <statement name> ::= <identifier>
  <procedure> ::=
      PROCEDURE <procedure name>
          <parameter declaration list> <semicolon>
        <SQL procedure statement> <semicolon>

  <procedure name> ::= <identifier>

  <parameter declaration list> ::=
        <left paren> <parameter declaration>
            [ ( <comma> <parameter declaration> )... ] <right paren>
      | <parameter declaration>...

  <parameter declaration> ::=
        <parameter name> <data type>
      | <status parameter>

  <status parameter> ::=
      SQLCODE | SQLSTATE

  <SQL procedure statement> ::=
        <SQL schema statement>
      | <SQL data statement>
      | <SQL transaction statement>
      | <SQL connection statement>
      | <SQL session statement>
      | <SQL dynamic statement>
      | <SQL diagnostics statement>

  <SQL schema statement> ::=
        <SQL schema definition statement>
      | <SQL schema manipulation statement>

  <SQL schema definition statement> ::=
        <schema definition>
      | <table definition>
      | <view definition>
      | <grant statement>
      | <domain definition>
      | <character set definition>
      | <collation definition>
      | <translation definition>
      | <assertion definition>

  <schema definition> ::=
      CREATE SCHEMA <schema name clause>
        [ <schema character set specification> ]
        [ <schema element>... ]

  <schema name clause> ::=
        <schema name>
      | AUTHORIZATION <schema authorization identifier>
      | <schema name> AUTHORIZATION
            <schema authorization identifier>

  <schema authorization identifier> ::=
      <authorization identifier>

  <schema character set specification> ::=
      DEFAULT CHARACTER
          SET <character set specification>

  <schema element> ::=
        <domain definition>
      | <table definition>
      | <view definition>
      | <grant statement>
      | <assertion definition>
      | <character set definition>
      | <collation definition>
      | <translation definition>

  <domain definition> ::=
      CREATE DOMAIN <domain name>
          [ AS ] <data type>
        [ <default clause> ]
        [ <domain constraint>... ]
        [ <collate clause> ]

  <domain constraint> ::=
      [ <constraint name definition> ]
      <check constraint definition> [ <constraint attributes> ]

  <table definition> ::=
      CREATE [ ( GLOBAL | LOCAL ) TEMPORARY ] TABLE
          <table name>
        <table element list>
        [ ON COMMIT ( DELETE | PRESERVE ) ROWS ]

  <view definition> ::=
      CREATE VIEW <table name> [ <left paren> <view column list>
                                    <right paren> ]
        AS <query expression>
        [ WITH [ <levels clause> ] CHECK OPTION ]

  <view column list> ::= <column name list>

  <levels clause> ::=
      CASCADED | LOCAL

  <grant statement> ::=
     GRANT <privileges> ON <object name>
       TO <grantee> [ ( <comma> <grantee> )... ]
         [ WITH GRANT OPTION ]

  <privileges> ::=
        ALL PRIVILEGES
      | <action list>

  <action list> ::= <action> [ ( <comma> <action> )... ]

  <action> ::=
        SELECT
      | DELETE
      | INSERT [ <left paren> <privilege column list> <right paren> ]
      | UPDATE [ <left paren> <privilege column list> <right paren> ]
      | REFERENCES [ <left paren> <privilege column list> <right paren> ]
      | USAGE

  <privilege column list> ::= <column name list>

  <object name> ::=
        [ TABLE ] <table name>
      | DOMAIN <domain name>
      | COLLATION <collation name>
      | CHARACTER SET <character set name>
      | TRANSLATION <translation name>

  <grantee> ::=
        PUBLIC
      | <authorization identifier>

  <assertion definition> ::=
      CREATE ASSERTION <constraint name> <assertion check>
        [ <constraint attributes> ]

  <assertion check> ::=
      CHECK
          <left paren> <search condition> <right paren>

  <character set definition> ::=
      CREATE CHARACTER SET <character set name>
          [ AS ]
        <character set source>
        [ <collate clause> | <limited collation definition> ]

  <character set source> ::=
        GET <existing character set name>

  <existing character set name> ::=
        <standard character repertoire name>
      | <implementation-defined character repertoire name>
      | <schema character set name>

  <schema character set name> ::= <character set name>

  <limited collation definition> ::=
      COLLATION FROM <collation source>

  <collation source> ::=
        <collating sequence definition>
      | <translation collation>

  <collating sequence definition> ::=
        <external collation>
      | <schema collation name>
      | DESC <left paren> <collation name> <right paren>
      | DEFAULT

  <external collation> ::=
      EXTERNAL <left paren> <quote> <external collation name> <quote> <right paren>

  <external collation name> ::=
        <standard collation name>
      | <implementation-defined collation name>

  <standard collation name> ::= <collation name>

  <implementation-defined collation name> ::= <collation name>

  <schema collation name> ::= <collation name>

  <translation collation> ::=
      TRANSLATION <translation name>
          [ THEN COLLATION <collation name> ]

  <collation definition> ::=
      CREATE COLLATION <collation name> FOR
          <character set specification>
        FROM <collation source>
          [ <pad attribute> ]

  <pad attribute> ::=
        NO PAD
      | PAD SPACE

  <translation definition> ::=
      CREATE TRANSLATION <translation name>
        FOR <source character set specification>
          TO <target character set specification>
        FROM <translation source>

  <source character set specification> ::= <character set specification>

  <target character set specification> ::= <character set specification>

  <translation source> ::=
        <translation specification>

  <translation specification> ::=
        <external translation>
      | IDENTITY
      | <schema translation name>

  <external translation> ::=
      EXTERNAL <left paren> <quote> <external translation name> <quote> <right paren>

  <external translation name> ::=
        <standard translation name>
      | <implementation-defined translation name>

  <standard translation name> ::= <translation name>

  <implementation-defined translation name> ::= <translation name>

  <schema translation name> ::= <translation name>

  <SQL schema manipulation statement> ::=
        <drop schema statement>
      | <alter table statement>
      | <drop table statement>
      | <drop view statement>
      | <revoke statement>
      | <alter domain statement>
      | <drop domain statement>
      | <drop character set statement>
      | <drop collation statement>
      | <drop translation statement>
      | <drop assertion statement>

  <drop schema statement> ::=
      DROP SCHEMA <schema name> <drop behavior>

  <drop behavior> ::= CASCADE | RESTRICT

  <alter table statement> ::=
      ALTER TABLE <table name> <alter table action>

  <alter table action> ::=
        <add column definition>
      | <alter column definition>
      | <drop column definition>
      | <add table constraint definition>
      | <drop table constraint definition>

  <add column definition> ::=
      ADD [ COLUMN ] <column definition>

  <alter column definition> ::=
      ALTER [ COLUMN ] <column name> <alter column action>

  <alter column action> ::=
        <set column default clause>
      | <drop column default clause>

  <set column default clause> ::=
      SET <default clause>

  <drop column default clause> ::=
      DROP DEFAULT

  <drop column definition> ::=
      DROP [ COLUMN ] <column name> <drop behavior>

  <add table constraint definition> ::=
      ADD <table constraint definition>

  <drop table constraint definition> ::=
      DROP CONSTRAINT <constraint name> <drop behavior>

  <drop table statement> ::=
      DROP TABLE <table name> <drop behavior>

  <drop view statement> ::=
      DROP VIEW <table name> <drop behavior>

  <revoke statement> ::=
      REVOKE [ GRANT OPTION FOR ]
          <privileges>
          ON <object name>
        FROM <grantee> [ ( <comma> <grantee> )... ] <drop behavior>

  <alter domain statement> ::=
      ALTER DOMAIN <domain name> <alter domain action>

  <alter domain action> ::=
        <set domain default clause>
      | <drop domain default clause>
      | <add domain constraint definition>
      | <drop domain constraint definition>

  <set domain default clause> ::= SET <default clause>

  <drop domain default clause> ::= DROP DEFAULT

  <add domain constraint definition> ::=
      ADD <domain constraint>

  <drop domain constraint definition> ::=
      DROP CONSTRAINT <constraint name>

  <drop domain statement> ::=
      DROP DOMAIN <domain name> <drop behavior>

  <drop character set statement> ::=
      DROP CHARACTER SET <character set name>

  <drop collation statement> ::=
      DROP COLLATION <collation name>

  <drop translation statement> ::=
      DROP TRANSLATION <translation name>

  <drop assertion statement> ::=
      DROP ASSERTION <constraint name>

  <SQL data statement> ::=
        <open statement>
      | <fetch statement>
      | <close statement>
      | <select statement: single row>
      | <SQL data change statement>

  <open statement> ::=
      OPEN <cursor name>

  <fetch statement> ::=
      FETCH [ [ <fetch orientation> ] FROM ]
        <cursor name> INTO <fetch target list>

  <fetch orientation> ::=
        NEXT
      | PRIOR
      | FIRST
      | LAST
      | ( ABSOLUTE | RELATIVE ) <simple value specification>

  <simple value specification> ::=
        <parameter name>
      | <embedded variable name>
      | <literal>

  <fetch target list> ::=
      <target specification> [ ( <comma> <target specification> )... ]

  <target specification> ::=
        <parameter specification>
      | <variable specification>

  <close statement> ::=
      CLOSE <cursor name>

  <select statement: single row> ::=
      SELECT [ <set quantifier> ] <select list>
        INTO <select target list>
          <table expression>

  <select target list> ::=
      <target specification> [ ( <comma> <target specification> )... ]

  <SQL data change statement> ::=
        <delete statement: positioned>
      | <delete statement: searched>
      | <insert statement>
      | <update statement: positioned>
      | <update statement: searched>

  <delete statement: positioned> ::=
      DELETE FROM <table name>
        WHERE CURRENT OF <cursor name>

  <delete statement: searched> ::=
      DELETE FROM <table name>
        [ WHERE <search condition> ]

  <insert statement> ::=
      INSERT INTO <table name>
        <insert columns and source>

  <insert columns and source> ::=
        [ <left paren> <insert column list> <right paren> ]
              <query expression>
      | DEFAULT VALUES

  <insert column list> ::= <column name list>

  <update statement: positioned> ::=
      UPDATE <table name>
        SET <set clause list>
          WHERE CURRENT OF <cursor name>

  <set clause list> ::=
      <set clause> [ ( <comma> <set clause> )... ]

  <set clause> ::=
      <object column> <equals operator> <update source>

  <object column> ::= <column name>

  <update source> ::=
        <value expression>
      | <null specification>
      | DEFAULT

  <update statement: searched> ::=
      UPDATE <table name>
        SET <set clause list>
        [ WHERE <search condition> ]

  <SQL transaction statement> ::=
        <set transaction statement>
      | <set constraints mode statement>
      | <commit statement>
      | <rollback statement>

  <set transaction statement> ::=
      SET TRANSACTION <transaction mode>
          [ ( <comma> <transaction mode> )... ]

  <transaction mode> ::=
        <isolation level>
      | <transaction access mode>
      | <diagnostics size>

  <isolation level> ::=
      ISOLATION LEVEL <level of isolation>

  <level of isolation> ::=
        READ UNCOMMITTED
      | READ COMMITTED
      | REPEATABLE READ
      | SERIALIZABLE

  <transaction access mode> ::=
        READ ONLY
      | READ WRITE

  <diagnostics size> ::=
      DIAGNOSTICS SIZE <number of conditions>

  <number of conditions> ::= <simple value specification>

  <set constraints mode statement> ::=
      SET CONSTRAINTS <constraint name list>
          ( DEFERRED | IMMEDIATE )

  <constraint name list> ::=
        ALL
      | <constraint name> [ ( <comma> <constraint name> )... ]

  <commit statement> ::=
      COMMIT [ WORK ]

  <rollback statement> ::=
      ROLLBACK [ WORK ]

  <SQL connection statement> ::=
        <connect statement>
      | <set connection statement>
      | <disconnect statement>

  <connect statement> ::=
      CONNECT TO <connection target>

  <connection target> ::=
        <SQL-server name>
          [ AS <connection name> ]
            correspondence with Tony Gordon)
          [ USER <user name> ]
      | DEFAULT

  <SQL-server name> ::= <simple value specification>

  <connection name> ::= <simple value specification>

  <user name> ::= <simple value specification>

  <set connection statement> ::=
      SET CONNECTION <connection object>

  <connection object> ::=
        DEFAULT
      | <connection name>

  <disconnect statement> ::=
      DISCONNECT <disconnect object>

  <disconnect object> ::=
        <connection object>
      | ALL
      | CURRENT

  <SQL session statement> ::=
        <set catalog statement>
      | <set schema statement>
      | <set names statement>
      | <set session authorization identifier statement>
      | <set local time zone statement>

  <set catalog statement> ::=
      SET CATALOG <value specification>

  <value specification> ::=
        <literal>
      | <general value specification>

  <set schema statement> ::=
      SET SCHEMA <value specification>

  <set names statement> ::=
      SET NAMES <value specification>

  <set session authorization identifier statement> ::=
      SET SESSION AUTHORIZATION
          <value specification>

  <set local time zone statement> ::=
      SET TIME ZONE
          <set time zone value>
  <set time zone value> ::=
        <interval value expression>
      | LOCAL

  <SQL dynamic statement> ::=
        <system descriptor statement>
      | <prepare statement>
      | <deallocate prepared statement>
      | <describe statement>
      | <execute statement>
      | <execute immediate statement>
      | <SQL dynamic data statement>

  <system descriptor statement> ::=
        <allocate descriptor statement>
      | <deallocate descriptor statement>
      | <set descriptor statement>
      | <get descriptor statement>

  <allocate descriptor statement> ::=
      ALLOCATE DESCRIPTOR <descriptor name>
         [ WITH MAX <occurrences> ]

  <descriptor name> ::=
      [ <scope option> ] <simple value specification>

  <scope option> ::=
        GLOBAL
      | LOCAL

  <occurrences> ::= <simple value specification>

  <deallocate descriptor statement> ::=
      DEALLOCATE DESCRIPTOR <descriptor name>

  <set descriptor statement> ::=
      SET DESCRIPTOR <descriptor name>
          <set descriptor information>

  <set descriptor information> ::=
        <set count>
      | VALUE <item number>
          <set item information> [ ( <comma> <set item information> )... ]

  <set count> ::=
      COUNT <equals operator> <simple value specification 1>

  <simple value specification 1> ::= <simple value specification>

  <item number> ::= <simple value specification>

  <set item information> ::=
      <descriptor item name> <equals operator> <simple value specification 2>

  <descriptor item name> ::=
        TYPE
      | LENGTH
      | OCTET_LENGTH
      | RETURNED_LENGTH
      | RETURNED_OCTET_LENGTH
      | PRECISION
      | SCALE
      | DATETIME_INTERVAL_CODE
      | DATETIME_INTERVAL_PRECISION
      | NULLABLE
      | INDICATOR
      | DATA
      | NAME
      | UNNAMED
      | COLLATION_CATALOG
      | COLLATION_SCHEMA
      | COLLATION_NAME
      | CHARACTER_SET_CATALOG
      | CHARACTER_SET_SCHEMA
      | CHARACTER_SET_NAME

  <simple value specification 2> ::= <simple value specification>

  <item number> ::= <simple value specification>

  <get descriptor statement> ::=
      GET DESCRIPTOR <descriptor name> <get descriptor information>

  <get descriptor information> ::=
        <get count>
      | VALUE <item number>
          <get item information> [ ( <comma> <get item information> )... ]

  <get count> ::=
      <simple target specification 1> <equals operator>
           COUNT

  <simple target specification 1> ::= <simple target specification>

  <simple target specification> ::=
        <parameter name>
      | <embedded variable name>

  <get item information> ::=
      <simple target specification 2> <equals operator> <descriptor item name>>

  <simple target specification 2> ::= <simple target specification>

  <prepare statement> ::=
      PREPARE <SQL statement name> FROM <SQL statement variable>

  <SQL statement name> ::=
        <statement name>
      | <extended statement name>

  <extended statement name> ::=
      [ <scope option> ] <simple value specification>

  <SQL statement variable> ::= <simple value specification>

  <deallocate prepared statement> ::=
      DEALLOCATE PREPARE <SQL statement name>

  <describe statement> ::=
        <describe input statement>
      | <describe output statement>

  <describe input statement> ::=
      DESCRIBE INPUT <SQL statement name> <using descriptor>

  <using descriptor> ::=
      ( USING | INTO ) SQL DESCRIPTOR <descriptor name>

  <describe output statement> ::=
      DESCRIBE [ OUTPUT ] <SQL statement name> <using descriptor>

  <execute statement> ::=
      EXECUTE <SQL statement name>
        [ <result using clause> ]
        [ <parameter using clause> ]

  <result using clause> ::= <using clause>

  <using clause> ::=
        <using arguments>
      | <using descriptor>

  <using arguments> ::=
      ( USING | INTO ) <argument> [ ( <comma> <argument> )... ]

  <argument> ::= <target specification>

  <parameter using clause> ::= <using clause>

  <execute immediate statement> ::=
      EXECUTE IMMEDIATE <SQL statement variable>

  <SQL dynamic data statement> ::=
        <allocate cursor statement>
      | <dynamic open statement>
      | <dynamic fetch statement>
      | <dynamic close statement>
      | <dynamic delete statement: positioned>
      | <dynamic update statement: positioned>

  <allocate cursor statement> ::=
      ALLOCATE <extended cursor name> [ INSENSITIVE ]
          [ SCROLL ] CURSOR
        FOR <extended statement name>

  <extended cursor name> ::=
      [ <scope option> ] <simple value specification>

  <dynamic open statement> ::=
      OPEN <dynamic cursor name> [ <using clause> ]

  <dynamic cursor name> ::=
        <cursor name>
      | <extended cursor name>

  <dynamic fetch statement> ::=
      FETCH [ [ <fetch orientation> ] FROM ] <dynamic cursor name>
          <using clause>

  <dynamic close statement> ::=
      CLOSE <dynamic cursor name>

  <dynamic delete statement: positioned> ::=
      DELETE FROM <table name>
        WHERE CURRENT OF
            <dynamic cursor name>

  <dynamic update statement: positioned> ::=
      UPDATE <table name>
        SET <set clause>
            [ ( <comma> <set clause> )... ]
          WHERE CURRENT OF
              <dynamic cursor name>

  <SQL diagnostics statement> ::=
      <get diagnostics statement>

  <get diagnostics statement> ::=
      GET DIAGNOSTICS <sql diagnostics information>

  <sql diagnostics information> ::=
        <statement information>
      | <condition information>

  <statement information> ::=
      <statement information item> [ ( <comma> <statement information item> )... ]

  <statement information item> ::=
      <simple target specification> <equals operator> <statement information item name>

  <statement information item name> ::=
        NUMBER
      | MORE
      | COMMAND_FUNCTION
      | DYNAMIC_FUNCTION
      | ROW_COUNT

  <condition information> ::=
      EXCEPTION <condition number>
        <condition information item> [ ( <comma> <condition information item> )... ]

  <condition number> ::= <simple value specification>

  <condition information item> ::=
      <simple target specification> <equals operator> <condition information item name>

  <condition information item name> ::=
        CONDITION_NUMBER
      | RETURNED_SQLSTATE
      | CLASS_ORIGIN
      | SUBCLASS_ORIGIN
      | SERVER_NAME
      | CONNECTION_NAME
      | CONSTRAINT_CATALOG
      | CONSTRAINT_SCHEMA
      | CONSTRAINT_NAME
      | CATALOG_NAME
      | SCHEMA_NAME
      | TABLE_NAME
      | COLUMN_NAME
      | CURSOR_NAME
      | MESSAGE_TEXT
      | MESSAGE_LENGTH
      | MESSAGE_OCTET_LENGTH

  <embedded SQL host program> ::=
        <embedded SQL Ada program>
      | <embedded SQL C program>
      | <embedded SQL COBOL program>
      | <embedded SQL Fortran program>
      | <embedded SQL MUMPS program>
      | <embedded SQL Pascal program>
      | <embedded SQL PL/I program>

  <embedded SQL Ada program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL C program> ::=
        !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL COBOL program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL Fortran program> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL MUMPS program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL Pascal program> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL PL/I program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL declare section> ::=
        <embedded SQL begin declare>
          [ <embedded character set declaration> ]
          [ <host variable definition>... ]
        <embedded SQL end declare>
      | <embedded SQL MUMPS declare>

  <embedded SQL begin declare> ::=
      <SQL prefix> BEGIN DECLARE SECTION
          [ <SQL terminator> ]

  <SQL prefix> ::=
        EXEC SQL
      | <ampersand>SQL<left paren>

  <SQL terminator> ::=
        END-EXEC
      | <semicolon>
      | <right paren>

  <embedded character set declaration> ::=
      SQL NAMES ARE <character set specification>

  <host variable definition> ::=
        <Ada variable definition>
      | <C variable definition>
      | <COBOL variable definition>
      | <Fortran variable definition>
      | <MUMPS variable definition>
      | <Pascal variable definition>
      | <PL/I variable definition>

  <Ada variable definition> ::=
      <Ada host identifier> [ ( <comma> <Ada host identifier> )... ] :
      <Ada type specification> [ <Ada initial value> ]

  <Ada type specification> ::=
        <Ada qualified type specification>
      | <Ada unqualified type specification>

  <Ada qualified type specification> ::=
        SQL_STANDARD.CHAR [ CHARACTER SET
           [ IS ] <character set specification> ]
            <left paren> 1 <double period> <length> <right paren>
      | SQL_STANDARD.BIT
            <left paren> 1 <double period> <length> <right paren>
      | SQL_STANDARD.SMALLINT
      | SQL_STANDARD.INT
      | SQL_STANDARD.REAL
      | SQL_STANDARD.DOUBLE_PRECISION
      | SQL_STANDARD.SQLCODE_TYPE
      | SQL_STANDARD.SQLSTATE_TYPE
      | SQL_STANDARD.INDICATOR_TYPE

  <Ada unqualified type specification> ::=
        CHAR
            <left paren> 1 <double period> <length> <right paren>
      | BIT
            <left paren> 1 <double period> <length> <right paren>
      | SMALLINT
      | INT
      | REAL
      | DOUBLE_PRECISION
      | SQLCODE_TYPE
      | SQLSTATE_TYPE
      | INDICATOR_TYPE

  <Ada initial value> ::=
      <Ada assignment operator> <character representation>...

  <Ada assignment operator> ::= <colon><equals operator>

  <C variable definition> ::=
        [ <C storage class> ]
        [ <C class modifier> ]
        <C variable specification>
      <semicolon>

  <C storage class> ::=
        auto
      | extern
      | static

  <C class modifier> ::= const | volatile

  <C variable specification> ::=
        <C numeric variable>
      | <C character variable>
      | <C derived variable>

  <C numeric variable> ::=
      ( long | short | float | double )
        <C host identifier> [ <C initial value> ]
              [ ( <comma> <C host identifier> [ <C initial value> ] )... ]

  <C initial value> ::=
      <equals operator> <character representation>...

  <C character variable> ::=
      char [ CHARACTER SET
               [ IS ] <character set specification> ]
        <C host identifier>
          <C array specification> [ <C initial value> ]
          [ ( <comma> <C host identifier>
            <C array specification>
                   [ <C initial value> ] )... ]

  <C array specification> ::=
      <left bracket> <length> <right bracket>

  <C derived variable> ::=
        <C VARCHAR variable>
      | <C bit variable>

  <C VARCHAR variable> ::=
      VARCHAR [ CHARACTER SET [ IS ]
          <character set specification> ]
          <C host identifier>
              <C array specification> [ <C initial value> ]
            [ ( <comma> <C host identifier>
                <C array specification>
                        [ <C initial value> ] )... ]

  <C bit variable> ::=
      BIT <C host identifier>
          <C array specification> [ <C initial value> ]
        [ ( <comma> <C host identifier>
          <C array specification>
                     [ <C initial value> ] )... ]

  <COBOL variable definition> ::=
      (01|77) <COBOL host identifier> <COBOL type specification>
        [ <character representation>... ] <period>

  <COBOL type specification> ::=
        <COBOL character type>
      | <COBOL bit type>
      | <COBOL numeric type>
      | <COBOL integer type>

  <COBOL character type> ::=
      [ CHARACTER SET [ IS ]
            <character set specification> ]
      ( PIC | PICTURE ) [ IS ] ( X [ <left paren> <length> <right paren> ] )...

  <COBOL bit type> ::=
      ( PIC | PICTURE ) [ IS ]
          ( B [ <left paren> <length> <right paren> ] )...

  <COBOL numeric type> ::=
      ( PIC | PICTURE ) [ IS ]
        S <COBOL nines specification>
      [ USAGE [ IS ] ] DISPLAY SIGN LEADING SEPARATE

  <COBOL nines specification> ::=
        <COBOL nines> [ V [ <COBOL nines> ] ]
      | V <COBOL nines>

  <COBOL nines> ::= ( 9 [ <left paren> <length> <right paren> ] )...

  <COBOL integer type> ::=
        <COBOL computational integer>
      | <COBOL binary integer>

  <COBOL computational integer> ::=
      ( PIC | PICTURE ) [ IS ] S<COBOL nines>
        [ USAGE [ IS ] ] ( COMP | COMPUTATIONAL )

  <COBOL binary integer> ::=
      ( PIC | PICTURE ) [ IS ] S<COBOL nines>
        [ USAGE [ IS ] ] BINARY

  <Fortran variable definition> ::=
      <Fortran type specification>
      <Fortran host identifier>
          [ ( <comma> <Fortran host identifier> )... ]

  <Fortran type specification> ::=
        CHARACTER [ <asterisk> <length> ]
            [ CHARACTER SET [ IS ]
                  <character set specification> ]
      | BIT [ <asterisk> <length> ]
      | INTEGER
      | REAL
      | DOUBLE PRECISION

  <MUMPS variable definition> ::=
      ( <MUMPS numeric variable> | <MUMPS character variable> )
          <semicolon>

  <MUMPS numeric variable> ::=
      <MUMPS type specification>
        <MUMPS host identifier> [ ( <comma> <MUMPS host identifier> )... ]

  <MUMPS type specification> ::=
        INT
      | DEC
            [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | REAL

  <MUMPS character variable> ::=
      VARCHAR <MUMPS host identifier> <MUMPS length specification>
        [ ( <comma> <MUMPS host identifier> <MUMPS length specification> )... ]

  <MUMPS length specification> ::=
      <left paren> <length> <right paren>

  <Pascal variable definition> ::=
      <Pascal host identifier> [ ( <comma> <Pascal host identifier> )... ] <colon>
        <Pascal type specification> <semicolon>

  <Pascal type specification> ::=
        PACKED ARRAY
            <left bracket> 1 <double period> <length> <right bracket>
          OF CHAR
            [ CHARACTER SET [ IS ]
                  <character set specification> ]
      | PACKED ARRAY
            <left bracket> 1 <double period> <length> <right bracket>
          OF BIT
      | INTEGER
      | REAL
      | CHAR [ CHARACTER SET
                                  [ IS ] <character set specification> ]
      | BIT

  <PL/I variable definition> ::=
      (DCL | DECLARE)
          (   <PL/I host identifier>
            | <left paren> <PL/I host identifier>
                  [ ( <comma> <PL/I host identifier> )... ] <right paren> )
      <PL/I type specification>
      [ <character representation>... ] <semicolon>

  <PL/I type specification> ::=
        ( CHAR | CHARACTER ) [ VARYING ]
            <left paren><length><right paren>
            [ CHARACTER SET
                  [ IS ] <character set specification> ]
      | BIT [ VARYING ] <left paren><length><right paren>
      | <PL/I type fixed decimal> <left paren> <precision>
            [ <comma> <scale> ] <right paren>
      | <PL/I type fixed binary> [ <left paren> <precision> <right paren> ]
      | <PL/I type float binary> <left paren> <precision> <right paren>

  <PL/I type fixed decimal> ::=
        ( DEC | DECIMAL ) FIXED
      | FIXED ( DEC | DECIMAL )

  <PL/I type fixed binary> ::=
        ( BIN | BINARY ) FIXED
      | FIXED ( BIN | BINARY )

  <PL/I type float binary> ::=
        ( BIN | BINARY ) FLOAT
      | FLOAT ( BIN | BINARY )

  <embedded SQL end declare> ::=
      <SQL prefix> END DECLARE SECTION
          [ <SQL terminator> ]

  <embedded SQL MUMPS declare> ::=
      <SQL prefix>
        BEGIN DECLARE SECTION
          [ <embedded character set declaration> ]
          [ <host variable definition>... ]
        END DECLARE SECTION
      <SQL terminator>

  <embedded SQL statement> ::=
      <SQL prefix>
        <statement or declaration>
      [ <SQL terminator> ]

  <statement or declaration> ::=
        <declare cursor>
      | <dynamic declare cursor>
      | <temporary table declaration>
      | <embedded exception declaration>
      | <SQL procedure statement>

  <embedded exception declaration> ::=
      WHENEVER <condition> <condition action>

  <condition> ::=
      SQLERROR | NOT FOUND

  <condition action> ::=
      CONTINUE | <go to>

  <go to> ::=
      ( GOTO | GO TO ) <goto target>

  <goto target> ::=
        <host label identifier>
      | <unsigned integer>
      | <host PL/I label variable>

  <host label identifier> ::= !!<EMPHASIS>(See the Syntax Rules.)

  <host PL/I label variable> ::= !!<EMPHASIS>(See the Syntax Rules.)

  <preparable statement> ::=
        <preparable SQL data statement>
      | <preparable SQL schema statement>
      | <preparable SQL transaction statement>
      | <preparable SQL session statement>
      | <preparable implementation-defined statement>

  <preparable SQL data statement> ::=
        <delete statement: searched>
      | <dynamic single row select statement>
      | <insert statement>
      | <dynamic select statement>
      | <update statement: searched>
      | <preparable dynamic delete statement: positioned>
      | <preparable dynamic update statement: positioned>

  <dynamic single row select statement> ::= <query specification>

  <dynamic select statement> ::= <cursor specification>

  <preparable dynamic delete statement: positioned> ::=
     DELETE [ FROM <table name> ]
        WHERE CURRENT OF <cursor name>

  <preparable dynamic update statement: positioned> ::=
     UPDATE [ <table name> ]
        SET <set clause list>
        WHERE CURRENT OF <cursor name>

  <preparable SQL schema statement> ::=
        <SQL schema statement>

  <preparable SQL transaction statement> ::=
        <SQL transaction statement>

  <preparable SQL session statement> ::=
        <SQL session statement>

  <preparable implementation-defined statement> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <direct SQL statement> ::=
      <directly executable statement> <semicolon>

  <directly executable statement> ::=
        <direct SQL data statement>
      | <SQL schema statement>
      | <SQL transaction statement>
      | <SQL connection statement>
      | <SQL session statement>
      | <direct implementation-defined statement>

  <direct SQL data statement> ::=
        <delete statement: searched>
      | <direct select statement: multiple rows>
      | <insert statement>
      | <update statement: searched>
      | <temporary table declaration>

  <direct select statement: multiple rows> ::=
      <query expression> [ <order by clause> ]

  <direct implementation-defined statement> ::=
      !!<EMPHASIS>(See the Syntax Rules)

  <SQL object identifier> ::=
      <SQL provenance> <SQL variant>

  <SQL provenance> ::= <arc1> <arc2> <arc3>

  <arc1> ::= iso | 1 | iso <left paren> 1 <right paren>

  <arc2> ::= standard | 0 | standard <left paren> 0 <right paren>

  <arc3> ::= 9075

  <SQL variant> ::= <SQL edition> <SQL conformance>

  <SQL edition> ::= <1987> | <1989> | <1992>

  <1987> ::= 0 | edition1987 <left paren> 0 <right paren>

  <1989> ::= <1989 base> <1989 package>

  <1989 base> ::= 1 | edition1989 <left paren> 1 <right paren>

  <1989 package> ::= <integrity no> | <integrity yes>
  <integrity no> ::= 0 | IntegrityNo <left paren> 0 <right paren>

  <integrity yes> ::= 1 | IntegrityYes <left paren> 1 <right paren>

  <1992> ::= 2 | edition1992 <left paren> 2 <right paren>

  <SQL conformance> ::= <low> | <intermediate> | <high>

  <low> ::= 0 | Low <left paren> 0 <right paren>

  <intermediate> ::= 1 | Intermediate <left paren> 1 <right paren>

  <high> ::= 2 | High <left paren> 2 <right paren>



  AK.  Appendix B - SQL Tutorial for beginners


  AK.1.  Tutorial for PostgreSQL

  SQL tutorial is also distributed with PostgreSQL. The SQL tutorial
  scripts is in the directory src/tutorial

  AK.2.  Internet URL pointers

  The SQL tutorial for beginners can be found at

    <http://w3.one.net/~jhoffman/sqltut.htm>

     Comments or suggestions? Mail to

    Jim Hoffman jhoffman@one.net

     The following are the sites suggested by John Hoffman:

    SQL Reference  <http://www.contrib.andrew.cmu.edu/~shadow/sql.html>

    Ask the SQL Pro  <http://www.inquiry.com/techtips/thesqlpro/>

    SQL Pro's Relational DB Useful Sites
     <http://www.inquiry.com/techtips/thesqlpro/usefulsites.html>

    Programmer's Source  <http://infoweb.magi.com/~steve/develop.html>

    DBMS Sites  <http://info.itu.ch/special/wwwfiles> Go here and see
     file comp_db.html

    DB Ingredients  <http://www.compapp.dcu.ie/databases/f017.html>

    Web Authoring  <http://www.stars.com/Tutorial/CGI/>

    Computing Dictionary  <http://wfn-shop.princeton.edu/cgi-
     bin/foldoc>

    DBMS Lab/Links  <http://www-ccs.cs.umass.edu/db.html>

    SQL FAQ
     <http://epoch.CS.Berkeley.EDU:8000/sequoia/dba/montage/FAQ> Go here
     and see file SQL_TOC.html

    SQL Databases  <http://chaos.mur.csu.edu.au/itc125/cgi/sqldb.html>

    RIT Database Design Page
     <http://www.it.rit.edu/~wjs/IT/199602/icsa720/icsa720postings.html>
    Database Jump Site  <http://www.pcslink.com/~ej/dbweb.html>

    Programming Tutorials on the Web
     <http://www.eng.uc.edu/~jtilley/tutorial.html>

    Development Resources
     <http://www.ndev.com/ndc2/support/resources.htp>

    Query List  <http://ashok.pair.com/sql.htm>

    IMAGE SQL Miscellaneous
     <http://jazz.external.hp.com/training/sqltables/main.html>

    Internet Resource List  <http://www.eit.com/web/netservices.html>

  AK.3.  On-line SQL tutorials

  Visit the following sites for on-line SQL tutorials

    SQL beginner course  <http://sqlcourse.com>

    SQL advanced course  <http://sqlcourse2.com>

  AL.  Appendix C - Linux Quick Install Instructions

  If you are planning to use PostgreSQL on Linux, and need help in
  installing Linux, then please visit the pointers given in this
  Appendix. They cover the following topics -

    Salient Features of Linux - Why Linux is better as a database
     server when compared with Windows 95/NT

    10 minutes Linux Quick Install Instructions

    Microsoft-Linux Analogy List

    Quick Steps to Recompile the Linux Kernel


    Main site is at  <http://www.aldev.8m.com>

    Mirror site  <http://www.aldev.webjump.com>

    Mirror site  <http://www.homepages.infoseek.com/~aldev1/index.html>

    Mirror site  <http://www3.bcity.com/aldev/>

    Mirror site  <http://www.members.spree.com/technology/aldev/>



  The Linux Printing HOWTO
  Grant Taylor <gtaylor+pht@picante.com>
  Version 4.5, Feb 2000

  This is the Linux Printing HOWTO, a collection of information on how
  to generate, preview, print and fax anything under Linux (and other
  Unices in general).
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 History
     1.2 Copyright

  2. How to print

     2.1 With PDQ
        2.1.1 Xpdq
        2.1.2 Pdq
     2.2 With LPD and the lpr command

  3. Kernel printer devices

     3.1 The lp device (kernels <=2.1.32)
     3.2 The parport device (kernels >= 2.1.33)
     3.3 Serial devices

  4. Supported Printers

     4.1 Postscript
     4.2 Non-Postscript
     4.3 What printers work?
        4.3.1 Printer compatibility list
     4.4 How to buy a printer
        4.4.1 What do I have?

  5. Which spooling software?

     5.1 PDQ
     5.2 LPRng
     5.3 PPR
     5.4 CUPS

  6. How it works, basic

     6.1 PDQ
     6.2 LPD

  7. How to set things up

     7.1 Configuring PDQ
        7.1.1 Drivers and Interfaces
        7.1.2 Defining Printers
        7.1.3 Creating a PDQ Driver Declaration
           7.1.3.1 Options
           7.1.3.2 Language Filtering
           7.1.3.3 Output Filtering
     7.2 Configuring LPD
        7.2.1 Traditional lpd configuration
        7.2.2 Accounting
        7.2.3 Large Installations
        7.2.4 File Permissions

  8. Vendor Solutions

     8.1 Red Hat
     8.2 Debian
     8.3 SuSE
     8.4 Other Distributions

  9. Ghostscript.

     9.1 Invoking Ghostscript
     9.2 Ghostscript output tuning
        9.2.1 Output location and size
        9.2.2 Gamma, dotsizes, etc.
        9.2.3 Color Printing in Ghostscript

  10. How to print to a printer over the network

     10.1 To a Unix/lpd host
        10.1.1 With
        10.1.2 With
        10.1.3 With
     10.2 To a Win95, WinNT, LanManager, or Samba printer
        10.2.1 From PDQ
        10.2.2 From LPD
     10.3 To a NetWare Printer
        10.3.1 From LPD
     10.4 To an EtherTalk (Apple) printer
        10.4.1 From PDQ
     10.5 To an HP or other ethernet printer
        10.5.1 To older HPs
     10.6 Running an
     10.7 From Windows.
     10.8 From an Apple.
     10.9 From Netware.

  11. Windows-only printers

     11.1 The Ghostscript Windows redirector
     11.2 HP Winprinters
     11.3 Lexmark Winprinters

  12. How to print to a fax machine.

     12.1 Using a faxmodem
        12.1.1 Faxing from PDQ
     12.2 Using the Remote Printing Service

  13. How to generate something worth printing.

     13.1 Markup languages
     13.2 WYSIWYG Word Processors
     13.3 Printing Photographs
        13.3.1 Ghostscript and Photos
        13.3.2 Paper
        13.3.3 Printer Settings
        13.3.4 Print Durability
        13.3.5 Shareware and Commercial Software

  14. On-screen previewing of printable things.

     14.1 PostScript
     14.2 TeX dvi
     14.3 Adobe PDF

  15. Serial printers under lpd

     15.1 Setting up in printcap
     15.2 Older serial printers that drop characters

  16. Credits



  ______________________________________________________________________



  1.  Introduction

  The Printing HOWTO should contain everything you need to know to help
  you set up printing services on your Linux box(en).  As life would
  have it, it's a bit more complicated than in the point-and-click world
  of Microsoft and Apple, but it's also a bit more flexible and
  certainly easier to administer for large LANs.

  This document is structured so that most people will only need to read
  the first half or so.  Most of the more obscure and situation-
  dependent information in here is in the last half, and can be easily
  located in the Table of Contents, whereas most of the information
  through section 8 or 9 is probably needed by most people.

  Since version 3.x is a complete rewrite, much information from
  previous editions has been lost.  This is by design, as the previous
  HOWTOs were so large as to be 60 typeset pages, and had the narrative
  flow of a dead turtle.  If you do not find the answer here, you are
  encouraged to a) scan the previous version at the Printing HOWTO Home
  Page <http://www.picante.com/~gtaylor/pht/> and b) drop me a note
  saying what ought to be here but isn't.

  The Printing HOWTO Home Page <http://www.picante.com/~gtaylor/pht/> is
  a good place to find the latest version; it is also, of course,
  distributed from Metalab (metalab.unc.edu) and your friendly local LDP
  mirror.


  1.1.  History

  This is the fourth generation of the Printing HOWTO.  The history of
  the PHT may be chronicled thusly:

  1. I wrote the printing-howto in 1992 in response to too many printing
     questions in comp.os.linux, and posted it.  This predated the HOWTO
     project by a few months and was the first FAQlet called a `howto'.
     This edition was in plain ascii.

  2. After joining the HOWTO project, the Printing-HOWTO was merged with
     an Lpd FAQ by Brian McCauley <B.A.McCauley@bham.ac.uk>; we
     continued to co-author the PHT for two years or so.  At some point
     we incorporated the work of Karl Auer <Karl.Auer@anu.edu.au>.  This
     generation of the PHT was in TeXinfo, and available in PS, HTML,
     Ascii, and Info.

  3. After letting the PHT rot and decay for over a year, and an
     unsuccessful attempt at getting someone else to maintain it, this
     rewrite happened.  This generation of the PHT is written in SGML
     using the LinuxDoc DTD and the SGML-Tools-1 package.  Beginning
     with version 3.27, it incorporates a summary of a companion printer
     support database; before 3.27 there was never a printer
     compatability list in this HOWTO (!).

  4. In mid-January, 2000, I found out about the PDQ print "spooler".
     PDQ provides a printing mechanism so much better than lpd ever did
     that I spent several hours playing with it, rewrote parts of this
     HOWTO, and bumped the version number of the document to 4.

  1.2.  Copyright

  This document is Copyright (c) 1992-1999 by Grant Taylor.  Feel free
  to copy and redistribute this document according to the terms of the
  GNU General Public License, revision 2 or later.



  2.  How to print

  You actually use a different command to print depending on which
  spooling software you use.

  2.1.  With PDQ

  Most systems today ship with lpd, so this section won't apply.  That
  said, I now recommend that people install and use PDQ in most cases
  instead of (or in addition to) lpd.  PDQ just has much better support
  for printer options and such.

  With PDQ, instead of the lpr command, you use the command pdq or xpdq.
  Both work much like the traditional lpr in that they will print the
  files you specify, or stdin if no files are given.


  2.1.1.  Xpdq

  Xpdq is an X Windows application that shows a list of available
  printers and a summary of the print queue (including current and
  historical jobs).  There are two options under the File menu, one to
  print specific files, and one to print stdin.  You can set whatever
  options are defined in your printer driver from the Driver Options
  dialog; typically there will be duplex, resolution, paper type and
  size settings, and so forth.


  2.1.2.  Pdq

  The PDQ system's command-line printing command is simply called pdq.
  It can be used in place of the lpr command in most situations; it
  accepts the -P printer specification argument.  Like lpr, it prints
  either the listed file(s) or stdin.

  Printer options can be controlled with the -o and -a options.


  2.2.  With LPD and the lpr command

  If you've already got lpd setup to print to your printer, or your
  system administrator already did so, or your vendor did so for you,
  then all you need to do is learn how to use the lpr command.  The
  Printing Usage HOWTO <http://metalab.unc.edu/LDP/HOWTO/Printing-Usage-
  HOWTO.html> covers this, and a few other queue manipulation commands
  you should probably know.  Or just read the lpr(1) man page.

  If, however, you have a new system or new printer, then you'll have to
  set up printing services one way or another before you can print.
  Read on!



  3.  Kernel printer devices

  There are two completely different device drivers for the parallel
  port; which one you are using depends on your kernel version (which
  you can find out with the command uname -a).  The driver changed in
  Linux 2.1.33.

  A few details are the same for both styles of driver.  Most notably,
  many people have found that Linux will not detect their parallel port
  unless they disable "Plug and Play" in their PC BIOS.  (This is no
  surprise; the track record for PnP of non-PCI devices with Windows and
  elsewhere has been something of a disaster).

  3.1.  The lp device (kernels <=2.1.32)

  The Linux kernel (<=2.1.32), assuming you have compiled in or loaded
  the lp device (the output of cat /proc/devices should include the
  device lp if it is loaded), provides one or more of /dev/lp0,
  /dev/lp1, and /dev/lp2.  These are NOT assigned dynamically, rather,
  each corresponds to a specific hardware I/O address.  This means that
  your first printer may be lp0 or lp1 depending on your hardware.  Just
  try both.

  A few users have reported that their bidirectional lp ports aren't
  detected if they use an older unidirectional printer cable.  Check
  that you've got a decent cable.

  One cannot run the plip and lp drivers at the same time on any given
  port (under 2.0, anyway).  You can, however, have one or the other
  driver loaded at any given time either manually, or by kerneld with
  version 2.x (and later 1.3.x) kernels.  By carefully setting the
  interrupts and such, you can supposedly run plip on one port and lp on
  the other.  One person did so by editing the drivers; I eagerly await
  a success report of someone doing so with only a clever command line.

  There is a little utility called tunelp floating about with which you,
  as root, can tune the Linux 2.0 lp device's interrupt usage, polling
  rate, and other options.

  When the lp driver is built into the kernel, the kernel will accept an
  lp= option to set interrupts and io addresses:


       When the lp driver is built in to the kernel, you may use the
       LILO/LOADLIN command line to set the port addresses and interrupts
       that the driver will use.

       Syntax:      lp=port0[,irq0[,port1[,irq1[,port2[,irq2]]]]]

       For example:   lp=0x378,0   or   lp=0x278,5,0x378,7 **

       Note that if this feature is used, you must specify *all* the ports
       you want considered, there are no defaults.  You can disable a
       built-in driver with lp=0.



  When loaded as a module, it is possible to specify io addresses and
  interrupt lines on the insmod command line (or in /etc/conf.modules so
  as to affect kerneld) using the usual module argument syntax.  The
  parameters are io=port0,port1,port2 and irq=irq0,irq1,irq2.  Read ye
  the man page for insmod for more information on this.


  **For those of you who (like me) can never find the standard port
  numbers when you need them, they are as in the second example above.
  The other port (lp0) is at 0x3bc.  I've no idea what interrupt it
  usually uses.


  The source code for the Linux 2.0 parallel port driver is in
  /usr/src/linux/drivers/char/lp.c.


  3.2.  The parport device (kernels >= 2.1.33)

  Beginning with kernel 2.1.33 (and available as a patch for kernel
  2.0.30), the lp device is merely a client of the new parport device.
  The addition of the parport device corrects a number of the problems
  that plague the old lp device driver - it can share the port with
  other drivers, it dynamically assigns available parallel ports to
  device numbers rather than enforcing a fixed correspondence between
  I/O addresses and port numbers, and so forth.

  The advent of the parport device has enabled a whole flock of new
  parallel-port drivers for things like Zip drives, Backpack CD-ROMs and
  disks, and so forth.  Some of these are also available in versions for
  2.0 kernels; look around on the web.

  The main difference that you will notice, so far as printing goes, is
  that parport-based kernels dynamically assign lp devices to parallel
  ports.  So what was lp1 under Linux 2.0 may well be lp0 under Linux
  2.2.  Be sure to check this if you upgrade from an lp-driver kernel to
  a parport-driver kernel.

  The most popular problems with this device seems to stem from
  misconfiguration:

     The Distribution
        Some Linux distributions don't ship with a properly setup
        /etc/modules.conf (or /etc/conf.modules), so the driver isn't
        loaded properly when you need it to be.  With a recent modutils,
        the proper magical lines from modules.conf seem to be:

          alias /dev/printers lp             # only for devfs?
          alias /dev/lp*      lp             # only for devfs?
          alias parport_lowlevel parport_pc  # missing in Red Hat 6.0-6.1



     The BIOS
        Many PC BIOSes will make the parallel port into a Plug-and-Play
        device.  This just adds needless complexity to a perfectly
        simple device that is nearly always present; turn off the PnP
        setting for your parallel prot ("LPT1" in many BIOSes) if your
        parallel port isn't detected by the Linux driver.  The correct
        setting is often called "legacy", "ISA", or "0x378", but
        probably not "disabled".

  You can also read the file Documentation/parport.txt in your kernel
  sources, or look at the parport web site
  <http://www.cyberelk.demon.co.uk/parport.html>.



  3.3.  Serial devices

  Serial devices are usually called something like /dev/ttyS1 under
  Linux.  The utility stty will allow you to interactively view or set
  the settings for a serial port; setserial will allow you to control a
  few extended attributes and configure IRQs and I/O addresses for non-
  standard ports.  Further discussion of serial ports under Linux may be
  found in the Serial-HOWTO <http://metalab.unc.edu/mdw/HOWTO/Serial-
  HOWTO.html>.


  When using a slow serial printer with flow control, you may find that
  some of your print jobs get truncated.  This may be due to the serial
  port, whose default behavior is to purge any untransmitted characters
  from its buffer 30 seconds after the port device is closed.  The
  buffer can hold up to 4096 characters, and if your printer uses flow
  control and is slow enough that it can't accept all the data from the
  buffer within 30 seconds after printing software has closed the serial
  port, the tail end of the buffer's contents will be lost.  If the
  command cat file > /dev/ttyS2 produces complete printouts for short
  files but truncated ones for longer files, you may have this
  condition.


  The 30 second interval can be adjusted through the "closing_wait"
  commandline option of setserial (version 2.12 and later).  A machine's
  serial ports are usually initialized by a call to setserial in the
  rc.serial boot file.  The call for the printing serial port can be
  modified to set the closing_wait at the same time as it sets that
  port's other parameters.



  4.  Supported Printers

  The Linux kernel mostly supports any printer that you can plug into a
  serial or parallel port, but there are things to look out for, and
  printers that you won't be able to use, even though they can
  (electrically speaking) communicate with Linux.  Primary among these
  incompatible printers are those referred to as "Windows" or "GDI"
  printers.  They are called this because part or all of the printer
  control language and the design details of the printing mechanism are
  not documented.  Typically the vendor will provide a Windows driver
  and happily sell only to Windows users; this is why they are called
  Winprinters.  In some cases the vendor also provides drivers for NT,
  OS/2, or other operating systems.

  Many of these printers do not work with Linux.  A few of them do, and
  some of them only work a little bit (usually because someone has
  reverse engineered the details needed to write a driver).  See the
  printer support list below for details on specific printers.

  A few printers are in-between.  Some of NEC's models, for example,
  implement a simple form of the standard printer language PCL that
  allows PCL-speaking software to print at up to 300dpi, but only NEC
  knows how to get the full 600dpi out of these printers.

  Note that if you already have one of these Winprinters, there are
  roundabout ways to get Linux to print to one, but they're rather
  awkward and I've never tried it myself.  See Section 12 of this
  document for more discussion of Windows-only printers.


  4.1.  Postscript

  As for what printers do work with Linux, the best choice is to buy a
  printer with native PostScript support.  Nearly all Unix software that
  produces printable output produces it in PostScript, so obviously it'd
  be nice to get a printer that supports PostScript directly.
  Unfortunately, PostScript support is scarce outside the laser printer
  domain, and is sometimes a costly add-on.


  Unix software, and the publishing industry in general, have
  standardized upon Postscript as the printer control language of
  choice.  This happened for several reasons:

     Timing
        Postscript arrived as part of the Apple Laserwriter, a perfect
        companion to the Macintosh, the system largely responsible for
        the desktop publishing revolution of the 80s.


     It's device-independent
        Postscript programs can be run to generate output on a pixel
        screen, a vector screen, a fax machine, or almost any sort of
        printer mechanism, without the original program needing to be
        changed.  Postscript output will look the same on any Postscript
        device, at least within the limits of the device's capabilities.
        Before the creation of PDF, people exchanged complex documents
        online as Postscript files.  The only reason this standard
        didn't "stick" was because Windows machines didn't usually
        include a Postscript previewer, so Adobe specified hyperlinks
        and compression for Postscript, called the result PDF,
        distributed previewers for it, and invented a market for their
        "distiller" tools (the functionality of which is also provided
        by ghostscript's ps2pdf and pdf2ps programs).

     It's a real programming language
        Postscript is a complete programming language; you can write
        software to do most anything in it.  This is mostly useful for
        defining subroutines at the start of your program to reproduce
        complex things over and over throughout your document, like a
        logo or a big "DRAFT" in the background.

     It's open
        Postscript is fully specified in a publically available series
        of books (which you can find at any good bookstore).  Although
        Adobe invented it and provides the dominant commercial
        implementation, other vendors like Aladdin produce independently
        coded implementations as well.



  4.2.  Non-Postscript

  Failing the (larger) budget necessary to buy a Postscript printer, you
  can use any printer supported by Ghostscript, the free Postscript
  interpreter used in lieu of actual printer Postscript support.  Note
  that most Linux distributions can only ship a somewhat outdated
  version of Ghostscript due to the license.  Fortunately, there is
  usually a prepackaged up to date Ghostscript made available in each
  distribution's contrib area.  Please help improve the Ghostscript
  printer support page by reporting your successes and failures as it
  asks.



  Adobe now has a new printer language called "PrintGear".  I think it's
  a greatly simplified binary format language with some Postscript
  heritage but no Postscript compatibility.  And I haven't heard of
  Ghostscript supporting it.  But some PrintGear printers seem to
  support another language like PCL, and these printers will work with
  Linux (iff the PCL is implemented in the printer and not in a Windows
  driver).


  4.3.  What printers work?

  If you want to buy a printer, you can look in several places to see if
  it will work.  The cooperatively maintained Printing HOWTO printer
  database <http://www.picante.com/~gtaylor/pht/printer_list.cgi> aims
  to be a comprehensive listing of the state of Linux printer support.
  A summary of it is below; be sure to check online for more details and
  information on what driver to use.


  Ghostscript's printer compatibility page
  <http://www.cs.wisc.edu/~ghost/printer.html> has a list of some
  working printers, as well as links to other pages.


  Dejanews <http://www.deja.com/> contains hundreds of "it works" and
  "it doesn't work" testimonials.  Try all three, and when you're done,
  check that your printer is present and correct in the database
  <http://www.picante.com/~gtaylor/pht/printer_list.cgi>, so that it
  will be listed properly in this document in the future.


  4.3.1.  Printer compatibility list

  This section is a summary of the online version.  The online version
  includes basic specifications, notes, links to driver information,
  user-maintained documentation, manufacturer web pages, and so forth.
  The online version of this list is also interactive; people can and do
  add printers all the time, so be sure to check it as well.  Finally,
  if your printer isn't listed, add it!


  Note that this listing is not gospel; people sometimes add incorrect
  information, which I eventually weed out.  Entries I have not sanity-
  checked are merked with an asterisk (*).  Verify from Dejanews that a
  printer works for someone before buying it based on this list.  If you
  can find no information in Dejanews, mail me and I'll put you in
  contact with the person who added the printer.


  Printers here are categorized into three types:

     Perfectly
        Perfect printers work perfectly - you can print to the full
        ability of the printer, including color, full resolution, etc.
        In a few cases printers with undocumented "resolution
        enhancement" modes that don't work are listed as perfect;
        generally the difference in print quality is small enough that
        it isn't worth worrying about.

     Mostly
        You can print fine, but there may be minor limitations or one
        sort or another in either printing or other features.

     Partially
        You can print, but maybe not in color, or only at a poor
        resolution.  See the online listing's notes column for
        information on the limitation.

     Paperweight
        You can't print a darned thing; typically this will be due to
        lack of a driver and/or documentation on how to write one.

  In all cases, since this information is provided by dozens of people,
  none of it is guaranteed to be correct; entries with an asterisk (*)
  are particularly suspect.  The facts, however, should be easy to cor-
  roborate from the driver web pages and manufacturer web sites.


  And without further ado, here is the printer compatibility list:

     Alps

        Partially
           MD-1000, MD-1300, MD-2000, MD-4000, MD-5000.

     Apple

        Perfectly
           Dot Matrix, ImageWriter*, ImageWriter LQ, LaserWriter 16/600,
           LaserWriter IINTX*, LaserWriter Select 360.

        Mostly
           12/640ps, LaserWriter NT, StyleWriter 2500.

     Avery

        Perfectly
           Personal Label Printer+.

        Mostly
           Personal Label Printer.

     Brother

        Perfectly
           HL-1070, HL-10V, HL-10h, HL-1260, HL-2060, HL-4Ve, HL-630*,
           HL-720*, HL-720*, HL-730, HL-760, HL-8*, HL-820.

        Mostly
           HJ-400, HL-1040, HL-1050, HL-1060, HL-1240*, HL-1250, MFC
           6550MC, MFC4350*.

        Partially
           MC-3000, MFC 7150C, MFC8300*.

        Paperweight
           HL-1030, MP-21C.

     C.Itoh

        Perfectly
           M8510.

     CalComp

        Paperweight
           Artisan 1023 penplotter*.

     Canon

        Perfectly
           BJ-10e, BJ-20, BJ-200, BJ-330, BJ-5, BJC-210, BJC-250,
           BJC-4000, BJC-4100, BJC-4200, BJC-4300, BJC-4400, BJC-600,
           BJC-610, BJC-620*, BJC-70, BJC-800, GP335/405*, LBP-1260*,
           LBP-1760, LBP-4+*, LBP-4U*, LBP-8A1*, LIPS III*, LIPS-III*,
           bjc5000*.

        Mostly
           BJ-300*, BJC-1000, BJC-2000, BJC-210SP*, BJC-240,
           BJC-4310SP*, BJC-7004*, BJC-80, LBP-4sx*.

        Partially
           BJC-4550*, BJC-6000, BJC-7000*, BJC-7100*, MultiPASS C2500*,
           MultiPASS C3500*, MultiPASS C5000*, Multipass C3000*,
           Multipass C5500*.

        Paperweight
           BJC-5000, BJC-5100, LBP-430, LBP-460*, LBP-660*, Multipass
           L6000*.

     Citizen


        Perfectly
           ProJet II*, ProJet IIc*.

        Partially
           printiva600C*.

     DEC

        Perfectly
           DECWriter 500i*, DECwriter 110i*, DECwriter 520ic*, LA50*,
           LA75*, LA75 Plus*, LN03*, LN07*.

        Mostly
           LJ250*, LN17.

        Partially
           1800*.

     Dymo-CoStar

        Perfectly
           ASCII 250*, ASCII+*, EL40*, EL60*, LabelWriter II*,
           LabelWriter XL*, LabelWriter XL+*, SE250*, SE250+*, Turbo*.

     Epson

        Perfectly
           9 Pin Printers high-res*, 9 Pin Printers med-res*, AP3250*,
           ActionLaser 1100*, LP 8000*, LQ 850*, LQ-24*, LQ-2550*,
           LQ-500*, LQ-570+*, LX-1050*, SQ 1170*, Stylus Color*, Stylus
           Color 1520, Stylus Color 400*, Stylus Color 440, Stylus Color
           460*, Stylus Color 500*, Stylus Color 600*, Stylus Color
           640*, Stylus Color 800*, Stylus Color 850*, Stylus Color I*,
           Stylus Color II*, Stylus Color IIs*, Stylus Color PRO*,
           Stylus Pro XL*.

        Mostly
           EPL 5700*, Stylus 300*, Stylus Color 3000*, Stylus Color 660,
           Stylus Color 740*.

        Partially
           Stylus Color 300*, Stylus Color 900*, Stylus Photo 700*,
           Stylus Photo 750*, Stylus Photo EX*.

     Fujitsu

        Perfectly
           1200*, 2400*, 3400*, PrintPartner 10V*, PrintPartner 16DV*,
           PrintPartner 20W*, PrintPartner 8000*.

     HP

        Perfectly
           2000C*, 2500C, Color LaserJet 4500, DeskJet 1200C, DeskJet
           1200C/PS, DeskJet 1600C, DeskJet 1600Cm, DeskJet 400, DeskJet
           420C, DeskJet 500, DeskJet 500C*, DeskJet 510*, DeskJet 520*,
           DeskJet 540*, DeskJet 550C*, DeskJet 560C*, DeskJet 600*,
           DeskJet 610C*, DeskJet 610CL*, DeskJet 612C*, DeskJet 660C*,
           DeskJet 670C*, DeskJet 672C*, DeskJet 682C*, DeskJet 690C*,
           DeskJet 692C*, DeskJet 694C*, DeskJet 697C*, DeskJet 812C*,
           DeskJet 850C, DeskJet 855C*, DeskJet 890C, HP LaserJet 2P
           Plus*, LaserJet*, LaserJet 1100*, LaserJet 1100A*, LaserJet 2
           w/PS*, LaserJet 2100M*, LaserJet 2D*, LaserJet 2P*, LaserJet
           3*, LaserJet 3D*, LaserJet 3P w/PS*, LaserJet 4 Plus*,
           LaserJet 4050N*, LaserJet 4L*, LaserJet 4M*, LaserJet 4ML*,
           LaserJet 4P*, LaserJet 5*, LaserJet 5000*, LaserJet 5L*,
           LaserJet 5M*, LaserJet 5MP*, LaserJet 5P*, LaserJet 6*,
           LaserJet 6MP*, LaserJet 8000*, LaserJet 8100*, LaserJet
           Plus*, Mopier 320*, PaintJet*, PaintJet XL*, PaintJet XL300*.

        Mostly
           DesignJet 650C*, Designjet 750 C Plus*, DeskJet 1100C*,
           DeskJet 1120C*, DeskJet 310, DeskJet 810C, DeskJet 832C*,
           DeskJet 870C*, DeskJet 880C*, DeskJet 882C, DeskJet 895C*,
           DeskJet 895Cxi*, DeskJet 970C*, DeskJet 970Cse, LaserJet 2*,
           LaserJet 2100*, LaserJet 6P*, OfficeJet Pro 1170Cse*.

        Partially
           Color LaserJet 5000, DeskJet 1000C*, DeskJet 710C*, DeskJet
           712C*, DeskJet 720C*, DeskJet 722C*, DeskJet 820C*, LaserJet
           6L*, OfficeJet 500*, OfficeJet 600*, OfficeJet 625*,
           OfficeJet Pro 1175C*, PhotoSmart P1100*.

        Paperweight
           LaserJet 3100*.

     IBM

        Perfectly
           3853 JetPrinter*, 4019*, 4029 10P*, 4303 Network Color
           Printer*, Page Printer 3112*, ProPrinterII*.

     Imagen

        Perfectly
           ImPress*.

     Kyocera

        Perfectly
           F-3300*, FS-1700+*, FS-3750*, FS-600*, FS-800*, P-2000*.

        Mostly
           FS-3500*.

     Lexmark

        Perfectly
           4039 10plus*, Optra Color 1200*, Optra Color 1275*, Optra
           Color 40, Optra Color 45, Optra E*, Optra E+*, Optra E310*,
           Optra Ep*, Optra K 1220*, Optra R+*, Optra S 1250*, Optra S
           1855*, Valuewriter 300*.

        Mostly
           1000, 1100*, 2070*, 3000*, 5000*, 5700, 7000*, 7200*.

        Partially
           1020 Business*, 2030*, Winwriter 400*, Z51*.

        Paperweight
           1020*, 2050*, 3200*, Winwriter 100*, Winwriter 150c*,
           Winwriter 200*, Z11*.

     Minolta

        Perfectly
           PagePro 6*, PagePro 6e*, PagePro 6ex*, PagePro 8*.

        Partially
           PagePro 8L*.


     Mitsubishi

        Perfectly
           CP50 Color Printer*.

     NEC

        Perfectly
           P2X*, PinWriter P6*, PinWriter P6 plus*, PinWriter P60*,
           PinWriter P7*, PinWriter P7 plus*, PinWriter P70*,
           SilentWriter LC 890*, Silentwriter2 S60P*, Silentwriter2
           model 290*, SuperScript 660i*.

        Mostly
           Silentwriter 95f*.

        Partially
           SuperScript 100C*, SuperScript 1260*, SuperScript 150C*,
           SuperScript 650C*, SuperScript 750C*, SuperScript 860*,
           SuperScript 870.

        Paperweight
           SuperScript 610plus*, SuperScript 660*, SuperScript 660plus*.

     Oce

        Perfectly
           3165*.

     Okidata

        Perfectly
           OL 410e, OL 600e, OL 610e/PS, OL 800, OL 810e/PS, OL400ex,
           OL810ex, OL830Plus, Okipage 10e, Okipage 12i, Okipage 20DXn,
           Okipage 6e, Okipage 6ex, Okipage 8c, Okipage 8p.

        Mostly
           Microline 182, OL 400w, OL 610e/S, OkiPage 4w+*, Okipage 4w,
           Super 6e.

        Partially
           Microline 192+, Okipage 6w.

        Paperweight
           Okijet 2010, Okijet 2500, Okipage 8w*.

     Olivetti

        Perfectly
           JP350S*, JP450*, PG 306*.

     PCPI

        Perfectly
           1030*.

     Panasonic

        Perfectly
           KX-P1123*, KX-P1124*, KX-P1150*, KX-P1180i*, KX-P2023*, KX-
           P2135*, KX-P2150*, KX-P4410, KX-P4450*, KX-P5400*, KX-P8420*,
           KX-P8475*, kx-p1624*.

        Mostly
           KX-P2123*, KX-P6150*.

        Partially
           KX-P6500*.

        Paperweight
           KX-P6100*, KX-P6300 GDI*, KX-P8410*.

     Printrex

        Partially
           820 DL*.

     QMS

        Perfectly
           2425 Turbo EX*, magicolour 2*.

        Mostly
           ps-810*.

     Ricoh

        Perfectly
           4081*, 4801*, 6000*, Aficio AP2000*.

        Mostly
           Aficio 401*.

        Paperweight
           Aficio Color 2206*, Afico FX10*.

     Samsung

        Perfectly
           ML-5000a*, ML-6000/6100*, ML-7000/7000P/7000N*, ML-7050*,
           ML-85*, QL-5100A*.

        Mostly
           ML-5050G*.

        Paperweight
           ML-85G*, SF/MSYS/MJ-4700/4800/4500C*.

     Seiko

        Perfectly
           SpeedJET 200*.

        Mostly
           SLP*, SLP 120*, SLP 220*, SLP EZ30*, SLP Plus*, SLP Pro*.

     Sharp

        Perfectly
           AR-161*.

     Star

        Perfectly
           LC24-100*, NL-10*.

        Mostly
           LC 90*, LC24-200*, StarJet 48*.

        Paperweight
           WinType 4000*.

     Tally

        Perfectly
           MT908*.

     Tektronix

        Perfectly
           3693d color printer, 8-bit mode*, 4693d color printer, 2-bit
           mode*, 4693d color printer, 4-bit mode*, 4695*, 4696*, 4697*,
           Phaser 780*, Phaser IISX*, Phaser PX*.

     Xerox

        Perfectly
           2700 XES, 3700 XES, 4045 XES, DocuPrint 4508, DocuPrint C55,
           DocuPrint N17, DocuPrint N32.

        Mostly
           DocuPrint P12, DocuPrint P8e, XJ6C*.

        Partially
           Document Homecentre, WorkCentre 450cp*, XJ8C*.

        Paperweight
           DocuPrint P8, WorkCentre 470cx*, WorkCentre XD120f*,
           WorkCentre XE80.

  * This entry has not been sanity-checked by me.


  4.4.  How to buy a printer

  It's a bit dificult to select a printer these days; there are many
  models to choose from.  Here are some shopping tips:


     Cost
        You get what you pay for.  Most printers under $200-300 will
        print reasonably well, but printing costs a lot per page.  For
        some printers, it only takes one or two cartridges to add up to
        the cost of a new printer!  Similarly, the cheapest printers
        won't last very long.  The least expensive printers, for
        example, have a MTBF of about three months.


     Inkjets
        Inkjet printheads will clog irreparably over time, so the
        ability to replace the head somehow is a feature.  Inkjet
        printheads are expensive, with integrated head/ink cartridges
        costing ten times (!) what ink-only cartridges go for, so the
        ability to replace the head only when needed is a feature.
        Epson Styluses tend to have fixed heads, and HP DeskJets tend to
        have heads integrated into the cartridges.  Canons have three-
        part cartridges with independently replaceable ink tanks; I like
        this design.  OTOH, the HP cartridges aren't enormously more
        expensive, and HP makes a better overall line; Canon is often
        the third choice from the print quality standpoint.  You can't
        win.


     Lasers
        Laser printers consume a drum and toner.  The cheapest designs
        include toner and drum together in a big cartridge; these
        designs cost the most to run.  The best designs for large volume
        take plain toner powder or at least separate toner cartridges
        and drums.


     Photography
        The best color photograph output is from continuous tone
        printers like the Alps series (thermal transfer of dry ink or
        dye sublimation).  A few of the Alps units are actually
        affordable, but they have poor Linux support (the one report I
        have speaks of banding and grainy pictures).  The more common
        photo-specialized inkjets usually feature 6 color CMYKcm
        printing or even a 7 color CMYKcmy process; only models with
        Postscript support work with Linux, since Ghostscript doesn't
        seem to support 6 and 7 color printing.  Good CMYK output is
        nothing to sneeze at, though.  All photo-specialized printers
        are expensive to run; either you always run out of blue and have
        to replace the whole cartridge, or the individual color refills
        for your high-end photo printer cost an arm and a leg.  Special
        papers cost a bundle, too.  See also the section on printing
        photographs later in this document, and the sections on color
        tuning in Ghostscript.


     Speed
        Speed is proportional to processing power, bandwidth, and
        generally printer cost.  The fastest printers will be networked
        postscript printers with powerful internal processors.
        Consumer-grade printers will depend partly on Ghostscript's
        rendering speed, which you can affect by having a reasonably
        well-powered machine; full pages of color, in particular, can
        consume large amounts of host memory.


     Forms
        If you want to print on multicopy forms, then you need an impact
        printer; many companies still make dot matrix printers, most of
        which emulate traditional Epson models and thus work fine.


     Labels
        There are two supported lines of label printer; look for the
        Dymo-Costar and the Seiko SLP models.  Other models may or may
        not work.  Avery also makes various sizes of stick-on labels in
        8.5x11 format that you can run through a regular printer.


     Plotting
        Big drafting formats are usually supported these days by monster
        inkjets; HP is a popular choice.  Mid-sized (11x17) inkjets are
        also commonly used for smaller prints.  Much plotting of this
        sort is done with the languages RTL, HP-GL, and HP-GL/2, all of
        which are simple HP proprietary vector languages usually
        generated directly by application software.



  4.4.1.  What do I have?

  I own an HP Deskjet 500 and a Lexmark Optra 40.  Both work perfectly:
  the Deskjet is an older monochrome model, well-supported by
  Ghostscript; and the Optra is a more modern color inkjet with full
  Postscript and PCL 5 support (!).


  I also own a Hawking Technology 10/100 Ethernet print server (model
  7117, actually made by Zero One Technologies in Taiwan); this makes it
  possible to put the printer anywhere with power and a network jack,
  instead of just near a computer.  It's a little dongle that attaches
  to the printer's parallel port and has an Ethernet jack on the other
  side.  The only flaw with this is that it doesn't allow bidirectional
  communication, so I can't arrange to be sent email when the ink is
  low.


  5.  Which spooling software?

  Until recently, the choice for Linux users was simple - everyone ran
  the same old lpd lifted mostly verbatim out of BSD's Net-2 code.  Even
  today, most vendors ship this software.  But this is beginning to
  change.  SVR4-like systems including Sun's Solaris come with a
  completely different print spooling package, centered around lpsched.

  Today, I recommend the PDQ system for both simple home users and (in a
  hybrid pdq/lpd setup) people in many larger environments.  It provides
  both the simplest and most flexible configuration mechanism, and the
  nicest user utilities (indeed, it's the only one that provides a
  uniform printer option control vaguely equivalent to the functionality
  of the Print Setup dialogs in Windows).


  5.1.  PDQ

  PDQ <http://feynman.tam.uiuc.edu/pdq/> is a non-daemon-centric print
  system which has a built-in, and sensible, driver configuration
  syntax.  This includes the ability to declare printing options, and a
  GUI or command line tool for users to specify these options with;
  users get a nice dialog box in which to specify resolution, duplexing,
  paper type, etc.

  Running all of the filters as the user has a number of advantages: the
  security problems possible from Postscript are mostly gone, multi-file
  LaTeX jobs can be printed effectively as dvi files, and so forth.

  This is what I now use; I've written driver spec files for my
  printers, and there are several included with the distribution, so
  there are plenty of examples to base yours on.  I've also written a
  few tools to automate driver spec generation to help the rest of you.

  If you have many users, many printers, or anything else complex going
  on, I recommend using PDQ as a front-end to LPD-protocol based network
  printing (you can print via the lpd protocol to the local machine).
  In many such situations, rather than using BSD's lpd as the back-end,
  I recommend LPRng:


  5.2.  LPRng

  There are signs that some Linux vendors will shift to providing LPRng,
  a far less ancient print spooling implementation that is more or less
  freely available.  LPRng is far easier to administer for large
  installations (read: more than one printer, any serial printers, or
  any peculiar non-lpd network printers) and has a less frightfully
  haphazard codebase than does stock lpd.  It can even honestly claim to
  be secure - there are no SUID binaries, and it supports authentication
  via PGP or Kerberos.

  LPRng also includes some example setups for common network printers -
  HP LaserJets, mainly, that include some accounting abilities.  If
  you'd like more information on LPRng, check out the LPRng Web Page
  <http://www.astart.com/lprng/LPRng.html>.

  LPRng is distributed under either the GPL or an Artistic license.
  (Previously that was not so, but it is now.)
  5.3.  PPR

  PPR <ftp://ppr-dist.trincoll.edu/pub/ppr/> is a Postscript-centric
  spooler which includes a rudimentary Postscript parsing ability from
  which it derives several nice features.  It includes good accounting
  capabilities, good support for Appletalk, SMB, and LPD clients, and
  much better error handling than lpd.  PPR, like every other spooler
  here, can call Ghostscript to handle non-Postscript printers.

  I only recently found out about PPR; I don't know of anyone who has
  tried it.  It was written by, and is in use at, Trinity College.  The
  license is BSD-style; free for all use but credit is due.


  5.4.  CUPS

  One interesting newcomer on the scene is "CUPS", an implementation of
  the Internet Printing Protocol, an HTTP-esque RFC-defined replacement
  protocol for the venerable (and klunky) lpd protocol.  The primary
  implementation of this is the open-source component of the commercial
  product "Easy Print", which consists of an intelligent spooler (CUPS)
  and a collection of commercial printer drivers built around
  Ghostscript (ESP Print Pro).

  CUPS, the spooler, is distributed under a GPL license.  ESP Print Pro
  is a binary-only commercial product (except for the included spooler,
  which is also available separately as the GPLed CUPS).



  6.  How it works, basic

  In order to get printing working well, you need to understand how your
  spooling software works.


  6.1.  PDQ

  Pdq stands for "Print, Don't Queue", and the way it works reflects
  this design.  The following sequence of events happens when you use
  PDQ to print:

  o  You run pdq or xpdq, specifying a file.

  o  You specify a printer.

  o  You specify the settings for the various options and arguments
     defined in the printer's PDQ driver file (duplex, copies, print
     quality, and so forth).

  o  PDQ analyzes the contents of what you printed, and follows the
     instructions in the PDQ driver file which tell it how to process
     your data for this printer with your options.

  o  PDQ sends the processed data to the printer according to the
     interface defined for that printer (straight to /dev/lp0, or to an
     LPD daemon on the network, over the network to an Apple or
     Microsoft system, or even to a fax machine).

  o  If PDQ can't send the data to the printer right away, it spawns a
     background process to wait and try again until it succeeds or hits
     a time limit.

     At all times during this process, and afterwards, the state of each
     print job can be seen and inspected using xpdq.  Jobs that failed
     are shown in red and can be resent.
  6.2.  LPD

  Lpd stands for Line Printer Daemon, and refers in different contexts
  to both the daemon and the whole collection of programs which run
  print spooling.  These are:


     lpd
        The spooling daemon.  One of these runs to control everything on
        a machine, AND one is run per printer while the printer is
        printing.

     lpr
        The user spooling command.  Lpr contacts lpd and injects a new
        print job into the spool.

     lpq
        Lists the jobs in a print queue.

     lpc
        The Lpd system control command.  With lpc you can stop, start,
        reorder, etc, the print queues.

     lprm
        lprm will remove a job from the print spool.

  So how does it fit together?  Well, when the system boots, lpd is run.
  It scans the file /etc/printcap to learn which printers it will be
  managing spools for.  Each time someone runs lpr, lpr contacts lpd
  through the named socket /dev/printer, and feeds lpd both the file to
  print and some information about who is printing and how to print it.
  Lpd then prints the file on the appropriate printer in turn.

  The lp system was originally designed when most printers were line
  printers - that is, people mostly printed plain ascii.  As it turns
  out, only a little extra scripting is needed to make lpd work quite
  well for today's print jobs, which are often in PostScript, or text,
  or dvi, or...


  7.  How to set things up

  For common configurations, you can probably ignore this section
  entirely - instead, you should jump straight to the Vendor Solutions
  section below, or better yet, your vendor's documentation.  Most Linux
  distributions supply one or more "idiot-proof" tools to do everything
  described here for common printers.

  If your vendor's tool's results are not satisfactory, or you'd like
  the ability to interactively control printing options when you print,
  then you should use PDQ; I recommend PDQ in most cases.


  7.1.  Configuring PDQ

  PDQ can be configured by either the superuser or by a joeuser.  Root's
  changes are made to /etc/printrc, and affect everyone, while joeuser
  can only modify his personal .printrc.  Everything applies to both
  types of configuration.

  If PDQ is not available prepackaged for your distribution, you should
  obtain the source distribution from the PDQ web page
  <http://feynman.tam.uiuc.edu/pdq/> and compile it yourself.  It is an
  easy compile, but you must first be sure to have installed the various
  GTK development library packages, the C library development package,
  the gcc compiler, make, and possibly a few other development things.
  7.1.1.  Drivers and Interfaces

  PDQ lets users select a printer to print to.  A printer is defined in
  PDQ as the combination of a "driver" and an "interface".  Both drivers
  and interfaces are, in fact, merely snippets of text in the PDQ
  configuration file.

  A PDQ interface says everything about how to ship data out to a
  printer.  The most common interfaces, which are predefined in the PDQ
  distribution's example printrc file, are:

     local-port
        A local port interface speaks to a parallel or serial port on
        the machine PDQ is running on.  Using this interface, PDQ can
        print directly to your parallel port.  Note that if you have a
        multiuser system this can cause confusion, and if you have a
        network the local-port interface will only apply to one system.
        In those cases, you can define a raw unfiltered lpd queue for
        the port and print to the system's lpd daemon exactly the same
        way from all systems and accounts without any troubles.  This
        interface has a device name argument; the typical value would be
        /dev/lp0.

     bsd-lpd
        A bsd lpd interface speaks over the network to an LPD daemon or
        LPD-speaking networked printer.  PDQ supports job submission,
        cancellation, and queries to LPD interfaces.  This interface has
        hostname and queuename arguments.

     appletalk
        The appletalk interface allows you to print to printers over the
        Appletalk network; if you have a printer plugged into your Mac
        this is the way to go.  This interface needs to have the
        Netatalk package installed to work.

  A PDQ driver says everything about how to massage print data into a
  format that a particular printer can handle.  For Postscript printers,
  this will include conversion from ascii into Postscript; for non-
  Postscript printers this will include conversion from Postscript into
  the printer's language with Ghostscript.

  If one of PDQ's included driver specifications doesn't fit your
  printer, then read the section below on how to write your own.


  7.1.2.  Defining Printers

  To define a printer in PDQ:

  o  First check that you've got suitable driver and interface
     declarations in the system or your personal printrc.

  o  If you want to define the printer in /etc/printrc (for all users),
     then su to root.

  o  Run xpdq, and select Printer->Add printer.  This "wizard" will walk
     you through the selection of a driver and interface.

     That's really all there is to it; most of the work lies in finding
     or creating a suitable driver specification if you can't find one
     premade.



  7.1.3.  Creating a PDQ Driver Declaration

  Here I'll walk through an example of how to make a PDQ driver
  declaration.  Before you try that, though, there are several places to
  look for existing driver specs:

  o  PDQ itself comes with a small collection of prewritten driver
     files.

  o  This HOWTO's database <http://www.picante.com/~gtaylor/pht/>
     includes a program called "PDQ-O-Matic" which will generate a PDQ
     specification from the information in the database.  With a bit of
     fiddling, this may suit.  This is the easy path if you have a non-
     Postscript printer.

  o  I've written a tool called ppdtopdq which takes a Postscript
     Printer Definition file and converts it into a PDQ driver
     specification.  This is the obvious path if you have a Postscript
     printer.  Mail me for a copy.


  There are several places to look for the information needed to write
  your own PDQ driver:

  o  The PDQ driver specification syntax is quite rich, and is fully
     documented in the printrc(5) man page.

  o  The PDQ distribution includes a few example files.  Look in
     particular at the Epson Stylus file, which demonstrates the
     structure of the definition for a Ghostscript-driven printer.

  o  The Printing HOWTO Database <http://www.picante.com/~gtaylor/pht/>
     includes raw Linux driver information for over 400 printers.  This
     will tell you what options to give Ghostscript, or what extra
     program to run on the Ghostscript output.

  If you have to create your own driver specification, or if you enhance
  one from the PDQ distribution or one of the PDQ driver generator
  programs mentioned above, please share your creation with the world!
  Send it to me (gtaylor+pht@picante.com), and I'll make sure that it
  gets found by future PDQ users with your type of printer.

  Now, let's walk through the writing of a driver specification for a
  printer listed in the Printing HOWTO's database as working, but for
  which you can't find a PDQ driver spec.  I'll use the Canon BJC-210 as
  the example printer.

  First, we look at the database entry
  <http://www.picante.com/~gtaylor/pht/show_printer.cgi?recnum=58752>
  for this printer.  Note that it is supported "perfectly", so we can
  expect to get comparable results (or better) to Windows users.  The
  important information is in three places in the entry:

     Driver
        The last line in the Works?/Language/Driver column tells us one
        driver that works with this printer.  More importantly, this
        name is a link to the driver's home page.

     Notes
        The human-readable notes will often contain useful information.
        For some printers, there is a More Info link, which usually
        refers to a web page run by a user with this printer, or to the
        driver's home page.

     Driver List
        Most printers have a list of driver command data.  This is the
        most important part.

  A PDQ driver spec has two logical functions: user interaction, and
  print job processing. These are represented in the file in three
  places:

     Option Declarations
        These define what options the user can set, and declare PDQ
        variables for later parts of the driver to use.

     Language Filters
        These process the print job from whatever format it arrived in
        (typically Postscript or ASCII) into a language the printer can
        understand (for example, PCL).  Option values are available
        here, as well as in the output filter.

     Output Filter
        This final filter bundles up the printer data regardless of
        input type; often printer options are set here.

  Let's work on each of these for a Canon BJC-210:

  7.1.3.1.  Options

  The driver list for this printer looks like this:


       Driver: Ghostscript: -sDEVICE=bj200 -r360x360   # (360x360 BW)
       Driver: Ghostscript: -sDEVICE=bjc600 -r360x360  # (360x360 Color)



  The database's documentation tells us that a "Ghostscript" driver
  type's text is a set of options for Ghostscript, less the "usual"
  options like -q or the file specifying options.

  So, as far as the user is concerned, the BJC-210 supports one useful
  option: the user should pick color or black-and-white.  Let's declare
  that as choice option called "MODE":


       option {
         var = "MODE"
         desc = "Print Mode"
         # default_choice "Color"    # uncomment to default to color
         choice "BW" {
           # The value part assigns to the variable MODE whatever you
           # want. Here we'll assign the text that varies between the
           # two Ghostscript option sets for the two modes.
           value = "bj200"
           help = "Fast black printing with the black cartridge."
           desc = "Black-only"
         }
         choice "Color" {
           value = "bjc600"
           help = "Full-color printing."
           desc = "Color"
         }
       }



  With the above choice declarations, the user will see a Color or BW
  choice in the driver options dialog when he prints from xpdq.  In the
  command-line pdq tool, he may specify -oBW or -oColor.  The default
  can be set from xpdq, or declared above with the default_choice key-
  word.


  7.1.3.2.  Language Filtering

  PDQ normally identifies its input with the file(1) command.  For each
  type returned by file that you want to handle, you provide a
  language_driver clause.  The clause consists mostly of a script to
  process the printjob language, in any (!) scripting language you wish
  (the default is the usual Bourne shell).

  In our case, we want to print Postscript and ASCII on our BJC-210.
  This needs two language drivers: one to run Ghostscript for Postscript
  jobs, and one to add carriage returns to ASCII jobs:


       # The first language_driver in the file that matches what file(1)
       # says is what gets used.
       language_driver ps {
         # file(1) returns "PostScript document text conforming at..."
         filetype_regx = "postscript"
         convert_exec = {
           gs -sDEVICE=$MODE -r360x360 \     # gs options from the database
              -q -dNOPAUSE -dBATCH -dSAFER \ # the "usual" Ghostscript options
              -sOutputFile=$OUTPUT $INPUT    # process INPUT into file OUTPUT

           # Those last two lines will often be the same for gs-supported
           # printers.  The gs... line, however, will be different for each
           # printer.
         }
       }

       # We declare text after postscript, because the command "file" will
       # often describe a postscript file as text (which it is).
       language_driver text {
         # No filetype_regx; we match the driver's name: "text"
         convert_exec = {#!/usr/bin/perl
            # a Perl program, just because we can!
            my ($in, $out) = ($ENV{'INPUT'}, $ENV{'OUTPUT'});
            open INPUT, "$in";
            open OUTPUT, ">$out";
            while(<INPUT>) {
               chomp;
               print OUTPUT, "$_\r\n";
            }
         }
       }



  That's it!  While other printers may need output filtering (as
  described in the next section), the above clauses are it for the
  BJC-210.  We just wrap them all up in a named driver clause:



  driver canon-bjc210-0.1 {
    option {
      var = "MODE"
      desc = "Print Mode"
      # default_choice "Color"    # uncomment to default to color
      choice "BW" {
        # The value part assigns to the variable MODE whatever you
        # want. Here we'll assign the text that varies between the
        # two Ghostscript option sets for the two modes.
        value = "bj200"
        help = "Fast black printing with the black cartridge."
        desc = "Black-only"
      }
      choice "Color" {
        value = "bjc600"
        help = "Full-color printing."
        desc = "Color"
      }
    }

    # The first language_driver in the file that matches what file(1)
    # says is what gets used.
    language_driver ps {
      # file(1) returns "PostScript document text conforming at..."
      filetype_regx = "postscript"
      convert_exec = {
        gs -sDEVICE=$MODE -r360x360 \     # gs options from the database
           -q -dNOPAUSE -dBATCH -dSAFER \ # the "usual" Ghostscript options
           -sOutputFile=$OUTPUT $INPUT    # process INPUT into file OUTPUT

        # Those last two lines will often be the same for gs-supported
        # printers.  The gs... line, however, will be different for each
        # printer.
      }
    }

    # We declare text after postscript, because the command "file" will
    # often describe a postscript file as text (which it is).
    language_driver text {
      # No filetype_regx; we match the driver's name: "text"
      convert_exec = {#!/usr/bin/perl
         # a Perl program, just because we can!
         my ($in, $out) = ($ENV{'INPUT'}, $ENV{'OUTPUT'});
         open INPUT, "$in";
         open OUTPUT, ">$out";
         while(<INPUT>) {
            chomp;
            print OUTPUT, "$_\r\n";
         }
      }
    }
  }



  7.1.3.3.  Output Filtering

  If you want to prepend or append something to all printjobs, or do
  some sort of transformation on all the data of all types, then it
  belongs in the filter_exec clause.  Our little Canon doesn't require
  such a clause, but just to have an example, here's a simple
  illustration showing how to support duplexing and resolution choice on
  a Laserjet or clone that speaks PJL:

  driver generic-ljet4-with-duplex-0.1 {
    # First, two option clauses for the user-selectable things:
    option {
      var = "DUPLEX_MODE"
      desc = "Duplex Mode"
      default_choice = "SIMPLEX"
      choice "SIMPLEX" {
        value = "OFF"
        desc = "One-sided prints"
      }
      choice "DUPLEX" {
        value = "ON"
        desc = "Two-sided prints"
      }
    }

    option {
      var = "GS_RES"
      desc = "Resolution"
      default_choice = "DPI600"
      choice "DPI300" {
        value = "-r300x300"
        desc = "300 dpi"
      }
      choice "DPI600" {
        value = "-r600x600"
        desc = "600 dpi"
      }
    }

    # Now, we handle Postscript input with Ghostscript's ljet4 driver:
    language_driver ps {
      filetype_regx = "postscript"
      convert_exec = {
         gs -sDEVICE=ljet4 $GS_RES \
            -q -dNOPAUSE -dBATCH -dSAFER \
            -sOutputFile=$OUTPUT $INPUT
      }
    }

    # Finally, we wrap the job in PJL commands:
    filter_exec {
      # requires echo with escape code ability...
      echo -ne '\33%-12345X' > $OUTPUT

      echo "@PJL SET DUPLEX=$DUPLEX_MODE"    >> $OUTPUT
      # You can add additional @PJL commands like the above line here.
      # Be sure to always append (>>) to the output file!

      cat $INPUT >> $OUTPUT
      echo -ne '\33%-12345X' >> $OUTPUT
    }
  }



  7.2.  Configuring LPD

  Most Linux systems ship with LPD.  This section describes a very basic
  setup for LPD; further sections detail the creation of complex filters
  and network configuration.



  7.2.1.  Traditional lpd configuration

  The minimal setup for lpd results in a system that can queue files and
  print them.  It will not pay any attention to wether or not your
  printer will understand them, and will probably not let you produce
  attractive output.  Nevertheless, it is the first step to
  understanding, so read on!

  Basically, to add a print queue to lpd, you must add an entry in
  /etc/printcap, and make the new spool directory under /var/spool/lpd.

  An entry in /etc/printcap looks like:


       # LOCAL djet500
       lp|dj|deskjet:\
               :sd=/var/spool/lpd/dj:\
               :mx#0:\
               :lp=/dev/lp0:\
               :sh:



  This defines a spool called lp, dj, or deskjet, spooled in the direc-
  tory /var/spool/lpd/dj, with no per-job maximum size limit, which
  prints to the device /dev/lp0, and which does not have a banner page
  (with the name of the person who printed, etc) added to the front of
  the print job.

  Go now and read the man page for printcap.

  The above looks very simple, but there a catch - unless I send in
  files a DeskJet 500 can understand, this DeskJet will print strange
  things.  For example, sending an ordinary Unix text file to a deskjet
  results in literally interpreted newlines, and gets me:


       This is line one.
                        This is line two.
                                         This is line three.



  ad nauseam.  Printing a PostScript file to this spool would get a
  beautiful listing of the PostScript commands, printed out with this
  "staircase effect", but no useful output.

  Clearly more is needed, and this is the purpose of filtering.  The
  more observant of you who read the printcap man page might have
  noticed the spool attributes if and of.  Well, if, or the input
  filter, is just what we need here.

  If we write a small shell script called filter that adds carriage
  returns before newlines, the staircasing can be eliminated.  So we
  have to add in an if line to our printcap entry above:


       lp|dj|deskjet:\
               :sd=/var/spool/lpd/dj:\
               :mx#0:\
               :lp=/dev/lp0:\
               :if=/var/spool/lpd/dj/filter:\
               :sh:

  A simple filter script might be:


       #!perl
       # The above line should really have the whole path to perl
       # This script must be executable: chmod 755 filter
       while(<STDIN>){chop $_; print "$_\r\n";};
       # You might also want to end with a form feed: print "\f";



  If we were to do the above, we'd have a spool to which we could print
  regular Unix text files and get meaningful results.  (Yes, there are
  four million better ways to write this filter, but few so illustra-
  tive.  You are encouraged to do this more efficiently.)

  The only remaining problem is that printing plain text is really not
  too hot - surely it would be better to be able to print PostScript and
  other formatted or graphic types of output.  Well, yes, it would, and
  it's easy to do.  The method is simply an extention of the above
  linefeed-fixing filter.  If you write a filter than can accept
  arbitrary file types as input and produce DeskJet-kosher output for
  each case, then you've got a clever print spooler indeed!

  Such a filter is called a magic filter.  Don't bother writing one
  yourself unless you print strange things - there are a good many
  written for you already on the net.  APS Filter is among the best, or
  your Linux distribution may have a printer setup tool that makes this
  all really easy.

  There's one catch to such filters: some older version of lpd don't run
  the if filter for remote printers, and some do.  The version of lpd
  with modern Linux distributions, and FreeBSD does; most commercial
  unices that still ship lpd have a version that does not.  See the
  section on network printing later in this document for more
  information on this.


  7.2.2.  Accounting

  Some installations need to keep track of who prints how much; this
  section summarizes methods for doing this.

  Regular LPD provides very little to help you with accouting.  You can
  specify the name of an accounting file in the af= printcap attribute,
  but this is merely passed as an argument to your if= filter.  It's up
  to you to make your if= filter write entries to the accounting file,
  and up to you to process the accounting file later (the traditional
  format is mainly useful for line printers, and is nontrivial to parse
  in Perl, so there's no reason to preserve it).

  Ghostscript provides a PageCount operator that you can use to count
  the number of pages in each job; basically you just tack a few lines
  of postscript onto the end of the job to write an accounting file
  entry; for the best example of this see the file unix-lpr.sh in the
  Ghostscript source distribution.

  Note that the unix-lpr implementation of accounting writes to a file
  from the Ghostscript interpreter, and is thus incompatible with the
  recommended -dSAFER option.  A better solution might be to query the
  printer with a PJL command after each job, or to write a postscript
  snippet that prints the pagecount on stdout, where it can be captured
  without having to write to a file.


  The LPRng print spooler includes an HP-specific sample implementation
  of accounting; I assume that it queries the printer with PJL.


  7.2.3.  Large Installations

  Large installations, by which I mean networks including more than two
  printers or hosts, have special needs.  Here is a description of one
  possible arrangement.

  o  Each printer should have a single point of control, where an
     administrator can pause, reorder, or redirect the queue.  To
     implement this, have everyone printing to a local server, which
     will then queue jobs and direct them to the proper printer.

  o  Use LPRng, at least on servers; the BSD LPD is too buggy for "real"
     use.

  o  Client systems should not have unique printing configurations.  To
     implement this, use LPRng's extended printcap syntax so that you
     have one printcap to use everywhere.

  o  Print queues should not be named for make or model; name print
     queues for something sensible like location (floor2_nw) or
     capability (color_transparency).  Three years from now, when a
     printer breaks, you will be able to replace it with a different
     make or model without causing confusion.

  o  Operate a web page which shows detailed information on each
     printer, including location, capabilities, etc.  Consider having it
     show the queue.  Complex networked environments are unmanagable for
     users without proper documentation.

  o  On Unix systems, use PDQ to allow selection of print job attributes
     such as duplex or paper size, and to force users to run all
     Ghostscript processing under the proper user ID.

  o  On Windows and Apple systems, use either the platform-specific
     drivers everywhere (Samba supports the Windows automagical driver-
     download mechanism) or use generic Postscript drivers everywhere.
     Do not mix and match; primitive word processors often produce
     different output when the installed printer driver changes; users
     cannot deal with output that vaires depending on the particular
     client/printer pair.

  o  If at all possible, buy a large-volume printer for large-volume
     printing.  If on a budget, use LPRng's multiple printers/one queue
     facility and assign a babysitter; printers are complex mechanical
     devices that will often jam and run out of paper in such
     configurations.

  o  Do not feel that printers must be plugged into workstations;
     Ethernet "print servers" now cost under $100.  The ability to
     locate printers anywhere you can network is a big improvement over
     forced location near a host; locate printers in sensible, central
     locations.


  7.2.4.  File Permissions

  By popular demand, I include below a listing of the permissions on
  interesting files on my system.  There are a number of better ways to
  do this, ideally using only SGID binaries and not making everything
  SUID root, but this is how my system came out of the box, and it works
  for me.  (Quite frankly, if your vendor can't even ship a working lpd
  you're in for a rough ride).
       -r-sr-sr-x   1 root     lp    /usr/bin/lpr*
       -r-sr-sr-x   1 root     lp    /usr/bin/lprm*
       -rwxr--r--   1 root     root  /usr/sbin/lpd*
       -r-xr-sr-x   1 root     lp    /usr/sbin/lpc*
       drwxrwxr-x   4 root     lp    /var/spool/lpd/
       drwxr-xr-x   2 root     lp    /var/spool/lpd/lp/



  Lpd must currently be run as root so that it can bind to the low-
  numbered lp service port.  It should probably become UID lp.lp or
  something after binding, but I don't think it does.  Bummer.

  PDQ uses a different, non-daemon-centric scheme, so it has different
  programs.  The only SUID root programs are the lpd interface programs
  lpd_cancel, lpd_print, and lpd_status; these are SUID because actual
  Unix print servers require print requests to originate from a
  priviledged port.  If the only printers for which you use PDQ's bsd-
  lpd interface are networked print servers (like the HP JetDirect or
  Lexmark's MarkNet adapters) then you do not need the suid bit on these
  programs.


  8.  Vendor Solutions

  This section is, by definition, incomplete.  Feel free to send in
  details of your favourite distribution.  At the moment, I am aware of
  no distribution that supports, or even provides, the software I
  recommend: PDQ.

  For a while, there were several packages out there all trying to make
  printer configuration with regular lpd easier.  They probably all
  still exist, but one of the best and most up-to-date is Andreas
  Klemm's APS Filter package, which has a menu-driven printcap
  configurator and handles practically any type of input imaginable.  If
  your vendor doesn't ship a nice printer setup tool, APS Filter is
  another choice; several distributions include apsfilter, or it's an
  easy add-on.


  8.1.  Red Hat

  Red Hat has a GUI printer administration tool called printtool which
  can add remote printers and printers on local devices.  It lets you
  choose a ghostscript-supported printer type and Unix device file to
  print to, then installs a print queue in /etc/printcap and uses the
  magic filter program from the rhs-printfilters package to support
  postscript and other common input types.  This solution works fairly
  well, and is trivial to setup for common cases.

  Where Red Hat fails is when you have a printer which isn't supported
  by their standard Ghostscript (which is GNU rather than Aladdin
  Ghostscript, and which supports fewer printers).  Check in the printer
  compatibility list above (or online
  <http://www.picante.com/~gtaylor/pht/printer_list.cgi>) if you find
  that you can't print properly with the stock Red Hat software.  If
  your printer isn't supported by Red Hat's tools, you may need to
  install a contributed verison of Aladdin Ghostscript, and will
  probably also be better off if you use the apsfilter package, which
  knows all about the printers supported by late-model Ghostscripts.

  In future versions of Red Hat the printtool will be reimplemented to
  support a larger list of printers and with the intent to support an
  eventual rhs-printfilters replacement (the current filter has
  difficultly with many common printers like some non-PCL DeskJets and
  most Lexmarks).  Some VA Linux-developed PPD features may be
  incorporated, as well.


  8.2.  Debian

  Debian offers a choice between plain lpd and LPRng; LPRng is probably
  a better choice.  I believe Debian also offers a choice of printer
  configuration tools; apsfilter version 5 or later is probably your
  best bet, since that verison adds support for LPRng and Ghostscript's
  uniprint driver scheme.


  8.3.  SuSE

  The printing system on SuSE Linux is based on apsfilter, with some
  enhancements; SuSE's apsfilter will recognize all common file formats
  (including HTML, if html2ps is installed).  There are two ways to
  setup printers on SuSE systems:

  o  YaST will let you configure "PostScript", "DeskJet" and "Other
     printers", supported by Ghostscript drivers; it's also possible to
     setup HP's GDI printers (DeskJet 710/720, 820, 1000, via the "ppa"
     package; at this moment b/w only).  YaST will provide /etc/printcap
     entries for every printer ("raw", "ascii", "auto" and "color", if
     the printer to configure is a color printer).  YaST will create
     spool directories and it will arrange apsfilterrc files, where
     you're able to fine tune some settings (Ghostscript preloads, paper
     size, paper orientation, resolution, printer escape sequences,
     etc.).  With YaST it's also possible to setup network printers
     (TCP/IP, Samba, or Novell Netware Printer).

  o  In addition there's the regular SETUP program from the original
     apsfilter package (with some enhancements); run `lprsetup' to
     invoke this configuration script.  Once you get accustomed to its
     GUI, you'll be able to configure quickly local and network printers
     (with local filtering via the "bypass" feature - that's quite
     handy).

  The SuSE installation manual explains both of these setup procedures.


  Wolf Rogner reported some difficulties with SuSE.  Apparently the
  following bugs may bite:

  o  Apsfilter's regular SETUP script is a bit broken, as are the KDE
     setup tools.  Use YaST.

  o  For networked printers that need to be fed from Ghostscript, you'll
     need to first uncomment the line REMOTE_PRINTER="remote" in
     /etc/apsfilterrc.  Then run YaST to configure the printer and,
     under Network configurations, set up a remote printer queue.

  o  YaST's setup doesn't allow color laser printers, so configure a
     mono printer and then change mono to color everwhere in the
     printcap entry.  You may have to rename the spool directory, too.


  8.4.  Other Distributions

  Please send me info on what other distributions do!



  9.  Ghostscript.

  Ghostscript is an incredibly significant program for Linux printing.
  Most printing software under Unix generates PostScript, which is
  typically a $100 option on a printer.  Ghostscript, however, is free,
  and will generate the language of your printer from PostScript.  When
  tied in with your PDQ printer driver declaration or lpd input filter,
  it gives you a virtual PostScript printer and simplifies life
  immensely.

  Ghostscript is available in two forms.  The commercial version of
  Ghostscript, called Aladdin Ghostscript, may be used freely for
  personal use but may not be distributed by commercial Linux
  distributions.  It is generally a year or so ahead of the free
  Ghostscript; at the moment, for example, it supports many color
  inkjets that the older Ghostscripts do not.

  The free version of Ghostscript is GNU Ghostscript, and is simply an
  aged version of Aladdin ghostscript kindly given to GNU.  (Kudos to
  Aladdin for this arrangement; more software vendors should support
  free software in this way, if they can't handle full-blown GPL
  distribution of their code).

  Whatever you do with gs, be very sure to run it with the option for
  disabling file access (-dSAFER).  PostScript is a fully functional
  language, and a bad PostScript program could give you quite a
  headache.

  Speaking of PDF, Adobe's Portable Document Format is actually little
  more than organized PostScript in a compressed file.  Ghostscript can
  handle PDF input just as it does PostScript.  So you can be the first
  on your block with a PDF-capable printer.


  9.1.  Invoking Ghostscript

  Typically, Ghostscript will be run by whatever magic filter you settle
  upon (I recommend apsfilter if your vendor didn't supply anything that
  suits you), but for debugging purposes it's often handy to run it
  directly.

  gs -help will give a brief informative listing of options and
  available drivers (note that this list is the list of drivers compiled
  in, not the master list of all available drivers).

  You might run gs for testing purposes like: gs options -q -dSAFER
  -sOutputFile=/dev/lp1 test.ps.


  9.2.  Ghostscript output tuning

  There are a number of things one can do if gs's output is not
  satisfactory (actually, you can do anything you darn well please,
  since you have the source).

  Some of these options, and others described in the Ghostscript User
  Guide (the file Use.htm in the Ghostscript distribution; possibly
  installed under /usr/doc or /usr/share/doc on your system) are all
  excellent candidates for driver options in your PDQ driver
  declaration.


  9.2.1.  Output location and size

  The location, size, and aspect ratio of the image on a page is
  controlled by the printer-specific driver in ghostscript.  If you find
  that your pages are coming out scrunched too short, or too long, or
  too big by a factor of two, you might want to look in your driver's
  source module and adjust whatever parameters jump out at you.
  Unfortunately, each driver is different, so I can't really tell you
  what to adjust, but most of them are reasonably well commented.


  9.2.2.  Gamma, dotsizes, etc.

  Most non-laser printers suffer from the fact that their dots are
  rather large. This results in pictures coming out too dark. If you
  experience this problem you should use your own transfer function.
  Simply create the following file in the ghostscript lib-dir and add
  its name to the gs call just before the actual file. You may need to
  tweak the actual values to fit your printer. Lower values result in a
  brighter print.  Especially if your driver uses a Floyd-Steinberg
  algorithm to rasterize colors, lower values ( 0.2 - 0.15 ) are
  probably a good choice.



       ---8<---- gamma.ps ----8<---
       %!
       %transfer functions for cyan magenta yellow black
       {0.3 exp} {0.3 exp} {0.3 exp} {0.3 exp} setcolortransfer
       ---8<------------------8<---



  It is also possible to mend printers that have some kind of colour
  fault by tweaking these values. If you do that kind of thing, I
  recommend using the file colorcir.ps, that comes with ghostscript (in
  the examples/ subdir), as a test page.


  For many of the newer color inkjet drivers, there are command-line
  options, or different upp driver files, which implement gamma and
  other changes to adapt the printer to different paper types.  You
  sould look into this before playing with Postscript to fix things.


  9.2.3.  Color Printing in Ghostscript

  Ghostscript's default color dithering is optimized for low-resolution
  devices.  It will dither rather coarsely in an attempt to produce
  60ppi output (not dpi, ppi - the "apparent" color pixels per inch you
  get after dithering).  This produces rather poor output on modern
  color printers; inkjets with photo paper, in particular, are capable
  of mich finer ppi settings.

  To adjust this, use the Ghostscript option -dDITHERPPI=x, where x is
  the value to use.  This may or may not have an effect with all
  drivers; many newer drivers implement their own dithering and pay no
  attention to this setting.  Some drivers can use either the regular
  Ghostscript or driver-specific dithering.

  This makes for an excellent argument in a PDQ driver declaration, if
  it applies.


  10.  How to print to a printer over the network

  One of the features of pdq and lpd is that they support printing over
  the network to printers physically connected to a different machine.
  With the careful combination of filter scripts and assorted utilities,
  you can make either print transparently to printers on all sorts of
  networks.


  10.1.  To a Unix/lpd host

  To allow remote machines to print to your printer using the LPD
  protocol, you must list the machines in /etc/hosts.equiv or
  /etc/hosts.lpd.  (Note that hosts.equiv has a host of other effects;
  be sure you know what you are doing if you list any machine there).
  You can allow only certain users on the other machines to print to
  your printer by usign the rs attribute; read the lpd man page for
  information on this.


  10.1.1.  With pdq

  With PDQ, you define a printer with the interface type "bsd-lpd".
  This interface takes arguments for the remote hostname and queue name;
  the printer definition wizard will prompt you for these.


  10.1.2.  With lpd

  To print to another machine, you make an /etc/printcap entry like
  this:


       # REMOTE djet500
       lp|dj|deskjet:\
               :sd=/var/spool/lpd/dj:\
               :rm=machine.out.there.com:\
               :rp=printername:\
               :lp=/dev/null:\
               :sh:



  Note that there is still a spool directory on the local machine man-
  aged by lpd.  If the remote machine is busy or offline, print jobs
  from the local machine wait in the spool area until they can be sent.


  10.1.3.  With rlpr

  You can also use rlpr to send a print job directly to a queue on a
  remote machine without going through the hassle of configuring lpd to
  handle it.  This is mostly useful in situations where you print to a
  variety of printers only occasionally.  From the announcement for
  rlpr:


  Rlpr uses TCP/IP to send print jobs to lpd servers anywhere on a
  network.


  Unlike lpr, it *does not* require that the remote printers be
  explicitly known to the machine you wish to print from, (e.g. through
  /etc/printcap) and thus is considerably more flexible and requires
  less administration.


  rlpr can be used anywhere a traditional lpr might be used, and is
  backwards compatible with traditional BSD lpr.
  The main power gained by rlpr is the power to print remotely *from
  anywhere to anywhere* without regard for how the system you wish to
  print from was configured.  Rlpr can work as a filter just like
  traditional lpr so that clients executing on a remote machine like
  netscape, xemacs, etc, etc can print to your local machine with little
  effort.


  Rlpr is available from Metalab
  <ftp://metalab.unc.edu/pub/Linux/system/printing/>.


  10.2.  To a Win95, WinNT, LanManager, or Samba printer

  There is a Printing to Windows mini-HOWTO out there which has more
  info than there is here.


  10.2.1.  From PDQ

  There is not a prebuilt smb interface that I am aware of, but it would
  be fairly easy to create using the model set by the Netatalk-based
  appletalk interface.  Someone please create one and submit it for
  inclusion!

  Read the Windows/LPD section below for more tips on how to do it.


  10.2.2.  From LPD

  It is possible to direct a print queue through the smbclient program
  (part of the samba suite) to a TCP/IP based SMB print service.  Samba
  includes a script to do this called smbprint.  In short, you put a
  configuration file for the specific printer in question in the spool
  directory, and install the smbprint script as the if.

  The /etc/printcap entry goes like this:


       lp|remote-smbprinter:\
           :lp=/dev/null:sh:\
           :sd=/var/spool/lpd/lp:\
           :if=/usr/local/sbin/smbprint:



  You should read the documentation inside the smbprint script for more
  information on how to set this up.

  You can also use smbclient to submit a file directly to an SMB
  printing service without involving lpd.  See the man page.


  10.3.  To a NetWare Printer

  The ncpfs suite includes a utility called nprint which provides the
  same functionality as smbprint but for NetWare.  You can get ncpfs
  from Metalab.  From the LSM entry for version 0.16:


       With ncpfs you can mount volumes of your netware server
       under Linux. You can also print to netware print queues and
       spool netware print queues to the Linux printing system. You
       need kernel 1.2.x or 1.3.54 and above. ncpfs does NOT work
       with any 1.3.x kernel below 1.3.54.
  10.3.1.  From LPD

  To make nprint work via lpd, you write a little shell script to print
  stdin on the NetWare printer, and install that as the if for an lpd
  print queue.  You'll get something like:


       sub2|remote-NWprinter:\
               :lp=/dev/null:sh:\
               :sd=/var/spool/lpd/sub2:\
               :if=/var/spool/lpd/nprint-script:



  The nprint-script might look approximately like:


       #! /bin/sh
       # You should try the guest account with no password first!
       /usr/local/bin/nprint -S net -U name -P passwd -q printq-name -



  10.4.  To an EtherTalk (Apple) printer

  The netatalk package includes something like nprint and smbclient.
  Others have documented the procedure for printing to and from an Apple
  network far better than I ever will; see the Linux Netatalk-HOWTO
  <http://thehamptons.com/anders/netatalk/>.


  10.4.1.  From PDQ

  PDQ includes an interface declaration called "appletalk".  This uses
  the Netatalk package to print to a networked Apple printer.  Just
  select this interface in xpdq's "Add printer" wizard.



  10.5.  To an HP or other ethernet printer

  HPs and some other printers come with an ethernet interface which you
  can print to directly using the lpd protocol.  You should follow the
  instructions that came with your printer or its network adaptor, but
  in general, such printers are "running" lpd, and provide one or more
  queues which you can print to.  An HP, for example, might work with a
  printcap like:


       lj-5|remote-hplj:\
               :lp=/dev/null:sh:\
               :sd=/var/spool/lpd/lj-5:\
               :rm=printer.name.com:rp=raw:



  or, using the PDQ bsd-lpd interface arguments of
  REMOTE_HOST=printer.name.com and QUEUE=raw.

  HP Laserjet printers with Jet Direct interfaces generally support two
  built in lpd queues - "raw" which accepts PCL (and possibly
  Postscript) and "text" which accepts straight ascii (and copes
  automatically with the staircase effect).  If you've got a JetDirect
  Plus3 three-port box, the queues are named "raw1", "text2", and so
  forth.

  Note that the ISS company has identified an assortment of denial of
  service attacks which hang HP Jetdirect interfaces.  Most of these
  have been addressed beginning in Fall 98.

  In a large scale environment, especially a large environment where
  some printers do not support PostScript, it may be useful to establish
  a dedicated print server to which all machines print and on which all
  ghostscript jobs are run.  This will allow the queue to be paused or
  reordered using the topq and lprm commands.

  This also allows your Linux box to act as a spool server for the
  printer so that your network users can complete their print jobs
  quickly and get on with things without waiting for the printer to
  print any other job that someone else has sent.  This is suggested too
  if you have unfixable older HP Jetdirects; it reduces the likelihood
  of the printers wedging.

  To do this, set up a queue on your linux box that points at the
  ethernet equipped HP LJ (as above). Now set up all the clients on your
  LAN to point at the Linux queue (eg lj-5 in the example above).

  Some HP network printers apparently don't heed the banner page setting
  sent by clients; you can turn off their internally generated banner
  page by telnetting to the printer, hitting return twice, typing
  "banner: 0" followed by "quit".  There are other settings you can
  change this way, as well; type "?" to see a list.

  The full range of settings can be controlled with HP's WebJet
  <http://www.hp.com/go/webjetadmin> software.  This package runs as a
  daemon, and accepts http requests on a designated port.  It serves up
  forms and Java applets which can control HP printers on the network.
  In theory, it can also control Unix print queues, but it does so using
  the rexec service, which is completely unsecure.  I don't advise using
  that feature.


  10.5.1.  To older HPs

  Some printers (and printer networking "black boxes") support only a
  cheesy little non-protocol involving plain TCP connections.  Notable
  in this category are early-model JetDirect (including some
  JetDirectEx) cards.  Basically, to print to the printer, you must open
  a TCP connection to the printer on a specified port (typically 9100,
  or 9100, 9101 and 9102 for three-port boxes) and stuff your print job
  into it.  LPRng has built-in support for stuffing print jobs into
  random TCP ports, but with BSD lpd it's not so easy.  The best thing
  is probably to obtain and use the little utility called netcat.


  A netcat-using PDQ interface would look something like this:



  interface tcp-port-0.1 {

     help "This is one of the first interfaces supported by standalone
           network printers and print servers.  The device simply
           listens for a TCP connection on a certain port, and sends
           data from any connection to the printer.\nThis interface
           requires the netcat program (\"nc\")."

     required_args "REMOTE_HOST"

     argument {
        var = "REMOTE_HOST"
        desc = "Remote host"
        help = "This is IP name or number of the print server."
     }

     argument {
        var = "REMOTE_PORT"
        def_value = "9100"
        desc = "Remote port"
        help = "This is the TCP port number on the print server that the
                print job should be sent to.  Most JetDirect cards, and
                clones, accept jobs on port 9100 (or 9101 for port 2,
                etc)."
     }

     requires "nc"

     # nc ends after 45 seconds of no network activity; it doesn't
     # actually stop on EOF the way we'd like.
     send_exec { cat $OUTPUT | nc -w 45 $REMOTE_HOST $REMOTE_PORT }

  }



  Failing that, it can be implemented, among other ways, in Perl using
  the program below.  Or, or better performance, use the program netcat
  ("nc"), which does much the same thing in a general purpose way.  Most
  distributions should have netcat available in prepackaged form.



  #!/usr/bin/perl
  # Thanks to Dan McLaughlin for writing the original version of this
  # script (And to Jim W. Jones for sitting next to Dan when writing me
  # for help ;)

  $fileName = @ARGV[0];

  open(IN,"$fileName") || die "Can't open file $fileName";

  $dpi300     = "\x1B*t300R";
  $dosCr      = "\x1B&k3G";
  $ends = "\x0A";

  $port =  9100 unless $port;
  $them = "bach.sr.hp.com" unless $them;

  $AF_INET = 2;
  $SOCK_STREAM = 1;
  $SIG{'INT'} = 'dokill';
  $sockaddr = 'S n a4 x8';

  chop($hostname = `hostname`);
  ($name,$aliases,$proto) = getprotobyname('tcp');
  ($name,$aliases,$port) = getservbyname($port,'tcp')
      unless $port =~ /^\d+$/;;
  ($name,$aliases,$type,$len,$thisaddr) =
          gethostbyname($hostname);
  ($name,$aliases,$type,$len,$thataddr) = gethostbyname($them);
  $this = pack($sockaddr, $AF_INET, 0, $thisaddr);
  $that = pack($sockaddr, $AF_INET, $port, $thataddr);

  if (socket(S, $AF_INET, $SOCK_STREAM, $proto)) {
  #    print "socket ok\n";
  }
  else {
      die $!;
  }
  # Give the socket an address.
  if (bind(S, $this)) {
  #    print "bind ok\n";
  }
  else {
      die $!;
  }

  # Call up the server.

  if (connect(S,$that)) {
  #    print "connect ok\n";
  }
  else {
      die $!;
  }

  # Set socket to be command buffered.

  select(S); $| = 1; select(STDOUT);

  #    print S "@PJL ECHO Hi $hostname! $ends";
  #    print S "@PJL OPMSG DISPLAY=\"Job $whoami\" $ends";
  #    print S $dpi300;

  # Avoid deadlock by forking.

  if($child = fork) {
      print S $dosCr;
      print S $TimesNewR;

      while (<IN>) {
          print S;
      }
      sleep 3;
      do dokill();
  } else {
      while(<S>) {
          print;
      }
  }

  sub dokill {
      kill 9,$child if $child;
  }



  10.6.  Running an if  for remote printers with old LPDs

  One oddity of older version of lpd is that the if is not run for
  remote printers.  (Version after 0.43 or so have the change originated
  on FreeBSD such that the if is always run).  If you find that you need
  to run an if for a remote printer, and it isn't working with your lpr,
  you can do so by setting up a double queue and requeueing the job.  As
  an example, consider this printcap:



       lj-5:\
               :lp=/dev/null:sh:\
               :sd=/var/spool/lpd/lj-5:\
               :if=/usr/lib/lpd/filter-lj-5:
       lj-5-remote:lp=/dev/null:sh:rm=printer.name.com:\
               :rp=raw:sd=/var/spool/lpd/lj-5-raw:



  in light of this filter-lj-5 script:


       #!/bin/sh
       gs <options> -q -dSAFER -sOutputFile=- - | \
               lpr -Plj-5-remote -U$5



  The -U option to lpr only works if lpr is run as daemon, and it sets
  the submitter's name for the job in the resubmitted queue correctly.
  You should probably use a more robust method of getting the username,
  since in some cases it is not argument 5.  See the man page for
  printcap.


  10.7.  From Windows.

  Printing from a Windows (or presumably, OS/2) client to a Linux server
  is directly supported over SMB through the use of the SAMBA package,
  which also supports file sharing of your Linux filesystem to Windows
  clients.

  Samba includes fairly complete documentation, and there is a good
  Samba FAQ which covers it, too.  You can either configure a magic
  filter on the Linux box and print PostScript to it, or run around
  installing printer-specific drivers on all the Windows machines and
  having a queue for them with no filters at all.  Relying on the
  Windows drivers may in some cases produce better output, but is a bit
  more of an administrative hassle if there are many Windows boxen.  So
  try Postscript first.

  With PDQ, you should configure Samba to run the pdq command with
  appropriate arguments instead of the lpr command that it defaults to
  running.  I believe that Samba will run pdq as the proper user, so it
  should work well this way.  There are several Samba options that you
  should adjust to do this:

     printcap
        This should point to a "fake" printcap you whip up listing
        available printers.  All you need is a short and long name for
        each printer, one per line:


          lp1|Printer One
          lp2|Printer Two
          lp3|Printer Three



     The short name will be used as the printer name for the print com-
     mand:

     print command
        This will need to be set to something like pdq -P %p %s ; rm %s.

     lprm command
        There doesn't seem to be a good value for this setting at the
        moment.  PDQ's queued jobs will expire after a time, so if the
        printer is totally gone there's no problem.  If you just change
        your mind, you can use xpdq to cancel jobs, but this is
        inconvenient from Windows.    Just put a do-nothing command like
        true for now.  If you use lpd or lprng as the back-end, then a
        suitable lprm command should work.  I'm not sure how Samba would
        identify the lpr queue entry number for a pdq-submitted job.

     lpq command
        Again, PDQ doesn't offer a good value to put here.  Distributed
        systems don't offer a sensible way to see the queue, but samba-
        centric centralized server systems to have a queue worth
        examining.  Just put a do-nothing command like true for now.  If
        you use lpd or lprng as the back-end, then a suitable lpq
        command should work; you just won't see jobs until they're done
        being filtered by PDQ.



  10.8.  From an Apple.

  Netatalk supports printing from Apple clients over EtherTalk.  See the
  Netatalk HOWTO Page <http://thehamptons.com/anders/netatalk/> for more
  information.


  10.9.  From Netware.

  The ncpfs package includes a daemon named pserver which can be used to
  privide service to a NetWare print queue.  From what I understand,
  this system requires a Bindery-based NetWare, ie 2.x, 3.x, or 4.x with
  bindery access enabled.

  For more information on ncpfs and it's pserver program, see the ncpfs
  FTP site <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/>.


  11.  Windows-only printers

  As I discussed earlier, some printers are inherently unsupported
  because they don't speak a normal printer language, instead using the
  computer's CPU to render a bitmap which is then piped to the printer
  at a fixed speed.  In a few cases, these printers also speak something
  normal like PCL, but often they do not.  In some (really low-end)
  cases, the printer doesn't even use a normal parallel connection but
  relies on the vendor's driver to emulate what should be hardware
  behaviour (most importantly flow control).


  In any case, there are a few possible workarounds if you find yourself
  stuck with such a lemon.


  11.1.  The Ghostscript Windows redirector

  There is now a Windows printer driver available (called mswinpr2) that
  will run a print job through Ghostscript before finally printing it.
  (Rather like an if filter in Unix's LPD).  There is also a new
  Ghostscript driver which will print using Windows GDI calls.  Taken
  all together, this allows a Windows machine to print PostScript to a
  Windows-only printer through the vendor's driver.

  If you get that working, you can then follow the instructions above
  for printing to a Windows printer over the network from Linux to let
  Unix (and other Windows, Mac, etc) hosts print to your lemon printer.


  11.2.  HP Winprinters

  Some HP printers use "Printing Performance Architecture"
  (marketingspeak for "we were too cheap to implement PCL").  This is
  supported in a roundabout way via the pbm2ppa translator written by
  Tim Norman.  Basically, you use ghostscript to render PostScript into
  a bitmapped image in pbm format and then use pbm2ppa to translate this
  into a printer-specific ppa format bitmap ready to be dumped to the
  printer.  This program may also come in ghostscript driver format by
  now.


  The ppa software can be had from the ppa home page
  <http://www.rpi.edu/~normat/technical/ppa/>; pbm2ppa supports some
  models of the HP 720, 820, and 1000; read the documentation that comes
  with the package for more details on ppa printer support.


  11.3.  Lexmark Winprinters

  Most of the cheap Lexmark inkjets use a proprietary language and are
  therefore Winprinters.  However, Henryk Paluch has written a program
  which can print on a Lexmark 7000.  Hopefully he'll be able to figure
  out color and expand support to other Lexmark inkjets.  See here
  <http://bimbo.fjfi.cvut.cz/~paluch/l7kdriver/> for more info.

  Similarly, there are now drivers for the 5700, 1000, 1100, 2070, and
  others.  See the supported printers listing above, and my web site,
  for more information on obtaining these drivers.
  12.  How to print to a fax machine.

  You can print to a fax machine with, or without, a modem.


  12.1.  Using a faxmodem

  There are a number of fax programs out there that will let you fax and
  receive documents.  One of the most complex is Sam Leffler's HylaFax,
  available from ftp.sgi.com.  It supports all sorts of things from
  multiple modems to broadcasting.

  SuSE ships a Java HylaFax client which allegedly works on any Java
  platform (including Windows and Linux).  There are also non-Java fax
  clients for most platforms; Linux can almost certainly handle your
  network faxing needs.

  Also available, and a better choice for most Linux boxen, is efax, a
  simple program which sends faxes.  The getty program mgetty can
  receive faxes (and even do voicemail on some modems!).


  12.1.1.  Faxing from PDQ

  PDQ doesn't ship with a fax interface declaration, but here's a simple
  one (which is only partly tested):



  interface efax-0.1 {
     help "This interface uses the efax package's fax program to send a
           fax.  You should first get efax's \"fax send\" working by
           itself by editing the file /etc/efax.rc and testing.  Connect
           this interface to a generic postscript driver to define a
           fax machine \"printer\"".

     requires { "efax" "fax" }

     # Making phone number required means that the add printer wizard
     # will demand a phone number at add printer time.  This is
     # undesirable, so it isn't explicitly required, even though it is
     # logically required.  The send_exec script checks for the number.
     # You could skip the wizard by adding this printer by hand to
     # .printrc, mark this as required, and it might then prompt?
     argument {
        var = "PHONE_NUMBER"
        desc = "Phone Number"
        help = "The phone number to dial.  Prefixes like 9 ought to be
                defined in your /etc/efax.rc file."
     }

     option {
        var = "RESOLUTION"
        desc = "Fax resolution"
        default_choice = "high"
        choice "low" {
           value = "-l"
           desc = "Low"
           help = "Low resolution on a fax is 96lpi."
        }
        choice "high" {
           value = ""
           desc = "High"
           help = "High resolution on a fax is 192lpi."
        }
     }

     # If you don't specify a phone number the job just fails, and
     # the only way to figure this out is to look at the error message
     # at the bottom of the job details.  Hmm.
     send_exec {
       if [ "x$PHONE_NUMBER" != "x" ]
       then
            fax send $RESOLUTION $PHONE_NUMBER $INPUT
       else
            echo 'You must specify a phone number!'
            false
       fi
     }

  }



  12.2.  Using the Remote Printing Service

  There is an experimental service offered that lets you send an email
  message containing something you'd like printed such that it will
  appear on a fax machine elsewhere.  Nice formats like postscript are
  supported, so even though global coverage is spotty, this can still be
  a very useful service.  For more information on printing via the
  remote printing service, see the Remote Printing WWW Site
  <http://www.tpc.int/>.
  13.  How to generate something worth printing.

  Here we get into a real rat's-nest of software.  Basically, Linux can
  run many types of binaries with varying degrees of success: Linux/x86,
  Linux/Alpha, Linux/Sparc, Linux/foo, iBCS, Win16/Win32s (with dosemu
  and, someday, with Wine), Mac/68k (with Executor), and Java.  I'll
  just discuss native Linux and common Unix software.

  For Linux itself, choices are mostly limited to those available for
  Unix in general:


  13.1.  Markup languages

  Most markup languages are more suitable for large or repetitive
  projects, where you want the computer to control the layout of the
  text to make things uniform.


     nroff
        This was one of the first Unix markup languages.  Man pages are
        the most common examples of things formatted in *roff macros;
        many people swear by them, but nroff has, to me at least, a more
        arcane syntax than needed, and probably makes a poor choice for
        new works.  It is worth knowing, though, that you can typeset a
        man page directly into postscript with groff.  Most man commands
        will do this for you with man -t foo | lpr.


     TeX
        TeX, and the macro package LaTeX, are one of the most widely
        used markup languages on Unix.  Technical works are frequently
        written in LaTeX because it greatly simplifies the layout issues
        and is still one of the few text processing systems to support
        mathematics both completely and well.  TeX's output format is
        dvi, and is converted to PostScript or Hewlett Packard's PCL
        with dvips or dvilj.  If you wish to install TeX or LaTeX,
        install the whole teTeX group of packages; it contains
        everything.  Recent TeX installations include pdfTeX and
        pdfLaTeX, which produce Adobe PDF files directly.  Commands are
        available do create hyperlinks and navigation features in the
        PDF file.


     SGML
        There is at least one free sgml parser available for Unix and
        Linux; it forms the basis of Linuxdoc-SGML's homegrown document
        system.  It can support other DTD's, as well, most notable
        DocBook


     HTML
        Someone suggested that for simple projects, it may suffice to
        write it in HTML and print it out using Netscape.  I disagree,
        but YMMV.


  13.2.  WYSIWYG Word Processors

  There is no longer any shortage of WYSIWYG word processing software.
  Several complete office suites are available, including one that's
  free for personal use (StarOffice).

     StarOffice
        Sun Microsystems is distributing StarOffice on the net free for
        Linux.  This full-blown office suite has all the features you'd
        expect, and you can't beat the price.  There's a mini-HOWTO out
        there which describes how to obtain and install it.  It
        generates PostScript or PCL, so should work with most any
        printer that works otherwise on Linux.  Apparently it's an
        Office clone and is rather bloated; these are probably two
        equivalent facts!


     WordPerfect
        Corel distributes a basic version of Word Perfect 8 free for
        Linux, and has suggested that they will distribute Corel Draw
        and Quattro Pro as well, once they are ported.  This is probably
        the best option if you have an ARM machine; Corel makes the ARM-
        based Netwinder Linux computers and is almost certian to offer
        ARM Linux versions of everything.  You can also buy the full-
        blown version and support, together or separately.  The Linux
        WordPerfect Fonts and Printers
        <http://www.channel1.com/users/rodsmith/wpfonts.html> page has
        information about configuring WordPerfect for use with either
        Ghostscript or its built-in printer drivers (which are
        apparently identical the DOS WordPerfect drivers, if your
        printer's driver isn't included in the WP8 distribution).


     Applix
        Applix is a cross-platform (ie, various Unices, Windows, and
        others) office suite sold by the Applix company.  Red Hat and
        SuSE sold it themselves when it was the only game in town; now
        sales have reverted to Applix.


     AbiWord
        AbiWord is one of several GPL WYSIWYG word processor projects;
        this one has produced a very nice word processor based on an XML
        format and capable of Word file import.


     LyX
        LyX is a front-end to LaTeX which looks very promising.  See the
        LyX Homepage <http://www.lyx.org/> for more information.  There
        is a KDE-styled version of LyX, called Klyx; the author of LyX
        and the instigator of KDE are the same person.


     Maxwell
        Maxwell is a simple MS RTF-format based word processor which
        started as a commercial product but is now distributed under the
        GPL.


     The Andrew User Interface System
        AUIS includes ez, a WYSIWYG-style editor with most basic word
        processor features, HTML capabilities, and full MIME email and
        newsgroup support.  Unfortunately, AUIS is no longer maintained.


     Koffice
        The KDE project is working toward a whole office suite.  I don't
        think it's ready for prime time yet.  The word processor will
        apparently be a descendant of LyX.


     GNOME
        The GNOME project also is working toward various GNU-licensed
        officey tools.  None are available yet, though.

  Other vendors should feel free to drop me a line with your offerings.


  13.3.  Printing Photographs

  There are many details to getting decent photo output from common
  printers.


  13.3.1.  Ghostscript and Photos

  Ghostscript has some difficulties rendering color photographs through
  most drivers.  The problems are several:

  o  Many drivers have poorly tuned color support.  Often the colors
     don't match the Windows driver output or the screen.  OTOH, all
     drivers, and Ghostscript as a whole, have readily adjustable color
     support; the "Gamma" settings are one thing to play with, and there
     are others documented in Ghostscript's Use.htm documentation file.

  o  I'm only aware of one Ghostscript driver with support for 6 and 7
     color printing; it's in beta at the moment and supports a few Epson
     Stylus Photo models.  It is rumoured to produce better color than
     the Windows driver (!).

  o  Ghostscript often ends up dithering coarsely, or generating
     printouts with artifacts like banding.  The dithering can usually
     be corrected; see the color in ghostscript section above, and read
     the documentation for your driver.

     You should be able to correct some of these problems by tuning
     Ghostscript; see the Ghostscript section above for more information
     on how to do this.  Fiddling with Ghostscript options is much
     easier if you declare them as options in a PDQ driver declaration.


  That said, the obvious solution is to use non-Ghostscript software for
  printing photos, and indeed, such things do exist.  The main contender
  is the print plugin in the Gimp, which supports pixel-for-pixel
  printing on Epson Styluses and Postscript printers (with basic PPD
  support).  That driver will shortly be available for Ghostcript, as
  well.  Also possible to use for this purpose are the assorted external
  pnm-to-foo programs used to print on printers like the cheap Lexmarks;
  these print pixmaps pixel-for-pixel.  A print-via-filter option
  shouldn't be too hard to add to the Gimp.

  The best solution, of course, is to buy a Postscript printer; such
  printers can usually be completely controlled from available free
  software, and will print to the full capability of the printer.


  13.3.2.  Paper

  Color inkjets are extremely dependant on the paper for good output.
  The expensive glossy coated inkjet papers will allow you to produce
  near-photographic output, while plain uncoated paper will often
  produce muddy colors and fuzzy details.  Nonglossy coated inkjet
  papers will produce results in between, and are probably best for
  final prints of text, as well.  Stiffer glossy coated "photo" papers
  will produce similar output to lighter-weight glossy papers, but will
  feel like a regular photo.



  13.3.3.  Printer Settings

  For photo output on most color inkjets, you should use the most highly
  interlaced (and slowest) print mode; otherwise solid regions may have
  banding or weak colors.  Generally with Ghostscript this is what will
  happen when you pick the highest resolution.  With Postscript
  printers, you may need to add a snippet to the prologue based on the
  settings available in the PPD file.  The Gimp's PPD support doesn't
  include the print quality setting, but I added it in an ugly way for
  my own use; contact me if you'd like that.  If you use PDQ, you can
  easily add all the printer settings you need in the driver declaration
  file; for PJL printers this is particularly easy, and for Postscript
  printers my ppdtopdq utility can help.


  13.3.4.  Print Durability

  Color inkjet printouts usually fade after a few years, especially if
  exposed to lots of light and air; this is a function of the ink.
  Printers with ink-only consumables like the Epsons and Canons can buy
  archival inks, which are less prone to this problem.


  13.3.5.  Shareware and Commercial Software

  There's a program called xwtools <http://home.t-
  online.de/home/jj.sarton/startE.htm> which supports photo printing
  with all the bells and whistles on an assortment of Epson, HP, and
  Canon pritners.  Unfortunately, it was written under NDA, so comes
  without source.  Unless you use it for the Epson Stylus Color 300 on
  Linux x86, it costs 15 euros for personal use; commercial pricing is
  unknown.

  The ESP Print Pro package from Easy Software supports many printers
  which might otherwise be unsupported.  Unfortunately, since it is
  based on Ghostscript 4.03, I don't expect wonderful results with this
  software for photos.  But someone should try.


  14.  On-screen previewing of printable things.

  Nearly anything you can print can be viewed on the screen, too.


  14.1.  PostScript

  Ghostscript has an X11 driver best used under the management of the
  PostScript previewer gv.  The latest versions of these programs should
  be able to view PDF files, as well.  Note that gv has replaced the
  older previewer "Ghostview"; the new user interface is mch prettier
  and featureful that ghostview's plain old Athena gui.


  14.2.  TeX dvi

  TeX DeVice Independent files may be previewed under X11 with xdvi.
  Modern versions of xdvi call ghostscript to render PostScript
  specials.

  A VT100 driver exists as well.  It's called dgvt.  Tmview works with
  Linux and svgalib, if that's all you can do.



  14.3.  Adobe PDF

  Adobe's Acrobat Reader is available for Linux; just download it from
  their web site  <http://www.adobe.com/>.

  You can also use xpdf, which is freeware and comes with source, and I
  should think Ghostview supports viewing PDF files with gs under X11 by
  now.



  15.  Serial printers under lpd

  Serial printers are rather tricky under lpd.


  15.1.  Setting up in printcap

  Lpd provides five attributes which you can set in /etc/printcap to
  control all the settings of the serial port a printer is on.  Read the
  printcap man page and note the meanings of br#, fc#, xc#, fs# and xs#.
  The last four of these attributes are bitmaps indicating the settings
  for use the port.  The br# atrribute is simply the baud rate, ie
  `br#9600'.


  It is very easy to translate from stty settings to printcap flag
  settings. If you need to, see the man page for stty now.


  Use stty to set up the printer port so that you can cat a file to it
  and have it print correctly. Here's what `stty -a' looks like for my
  printer port:


       dina:/usr/users/andy/work/lpd/lpd# stty -a < /dev/ttyS2
       speed 9600 baud; rows 0; columns 0; line = 0;
       intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
       eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
       lnext = ^V; min = 1; time = 0;
       -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
       -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
       -igncr -icrnl ixon -ixoff -iuclc -ixany -imaxbel
       -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0
       bs0 vt0 ff0
       -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase
       -tostop -echoprt -echoctl -echoke



  The only changes between this and the way the port is initialized at
  bootup are -clocal, -crtscts, and ixon. Your port may well be differ-
  ent depending on how your printer does flow control.


  You actually use stty in a somewhat odd way.  Since stty operates on
  the terminal connected to it's standard input, you use it to
  manipulate a given serial port by using the `<' character as above.


  Once you have your stty settings right, so that `cat file >
  /dev/ttyS2' (in my case) sends the file to the printer, look at the
  file /usr/src/linux/include/asm-i386/termbits.h. This contains a lot
  of #defines and a few structs (You may wish to cat this file to the
  printer (you do have that working, right?) and use it as scratch
  paper).  Go to the section that starts out



       /* c_cflag bit meaning */
       #define CBAUD   0000017



  This section lists the meaning of the fc# and fs# bits. You will
  notice that the names there (after the baud rates) match up with one
  of the lines of stty output. Didn't I say this was going to be easy?


  Note which of those settings are preceded with a - in your stty
  output. Sum up all those numbers (they are octal). This represents the
  bits you want to clear, so the result is your fc# capability.  Of
  course, remember that you will be setting bits directly after you
  clear, so you can just use `fc#0177777' (I do).


  Now do the same for those settings (listed in this section) which do
  not have a - before them in your stty output. In my example the
  important ones are CS8 (0000060), HUPCL (0002000), and CREAD
  (0000200). Also note the flags for your baud rate (mine is 0000015).
  Add those all up, and in my example you get 0002275. This goes in your
  fs# capability (`fs#02275' works fine in my example).


  Do the same with set and clear for the next section of the include
  file, "c_lflag bits". In my case I didn't have to set anything, so I
  just use `xc#0157777' and `xs#0'.


  15.2.  Older serial printers that drop characters

  Jon Luckey points out that some older serial printers with ten-cent
  serial interfaces and small buffers really mean stop when they say so
  with flow control.  He found that disabling the FIFO in his Linux
  box's 16550 serial port with setserial corrected the problem of
  dropped characters (you apparently just specify the uart type as an
  8250 to do this).


  16.  Credits

  Special thanks to Jacob Langford, author of pdq, who finally gave us
  something better than the smattering of scripts globbed onto a 20 year
  old overgrown line-printer control program.


  The smbprint information is from an article by Marcel Roelofs
  <marcel@paragon.nl>.


  The nprint information for using Netware printers was provided by
  Michael Smith <mikes@bioch.ox.ac.uk>.


  The serial printers under lpd section is from Andrew Tefft
  <teffta@engr.dnet.ge.com>.


  The blurb about gammas and such for gs was sent in by Andreas
  <quasi@hub-fue.franken.de>.
  The two paragraphs about the 30 second closing_wait of the serial
  driver was contributed by Chris Johnson <cdj@netcom.com>.


  Robert Hart sent a few excellent paragraphs about setting up a print
  server to networked HPs which I used verbatim.


  And special thanks to the dozens upon dozens of you who've pointed out
  typos, bad urls, and errors in the document over the years.



  The Linux Printing Usage HOWTO
  by Mark Komarinski <markk@auratek.com>
  v1.2.2, 6 February 1998

  1.  Introduction

  This document describes how to use the line printer spooling system
  provided with the Linux operating system.  This HOWTO is the
  supplementary document to the Linux Printing Setup HOWTO, which
  discusses the installation and setup of the Linux printing system.
  The material presented in this HOWTO should be equally relevent for
  all flavors of the BSD operating system in addition to the Linux
  operating system.


  1.1.  Linux Printing HOWTO History

  Note from Mark Komarinski <markk@auratek.com>:

  I'd like to thank Matt Foster for doing a lot of work in the re-write
  of this HOWTO.  I'm keeping his style, and adding when necessary to
  keep everything updated.

  Note from Matt Foster <mwf@engr.uark.edu>:

  This version of the Linux Printing HOWTO is a complete rewrite of the
  one originally written by Grant Taylor <grant@god.tufts.edu> and Brian
  McCauley <B.A.McCauley@bham.ac.uk>.  I have tried to keep with the
  coverage of material presented by Grant and Brian's HOWTO, but I have
  drastically modified the style of presentation and the depth of
  material covered.  I feel that this makes the HOWTO more complete and
  easier to read.  I can only hope that you agree.


  1.2.  Version History

  v1.2.2

  o  Re-indexed, other changes to fit in the new RedHat docs.  Thanks
     Ed!

     v1.2.1

  o  updates, some changes for Dr. Linux publication

     v1.2

  o  Windows Printers

  o  Changing max size of print files

     v1.11

  o  new maintainter!

  o  Added lpc info

  o  Added some info for troubleshooting

  o  A start on printing graphics files!

  v1.1

  o  revised some of the wording


  o  developed section on PostScript printing

  o  attempted to clarify some of the examples 8-)

  o  fleshed the discussion of the basic Linux printing utilities

  v1.0

  o  initial public release of the Printing Usage HOWTO


  1.3.  Copyrights and Trademarks

  Some names mentioned in this HOWTO are claimed as copyrights and/or
  trademarks of certain persons and/or companies.  These names appear in
  full or initial caps in this HOWTO.

  (c) 1995 Matt Foster (mwf@engr.uark.edu)
  (c) 1996-1997 Mark F. Komarinski (markk@auratek.com)

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.

  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.


  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at <linux-howto@sunsite.unc.edu>. You may finger this
  address for phone number and additional contact information.



  1.4.  Downloading the Linux Printing HOWTOs

  I recommend that if you want to print a copy of this HOWTO that you
  download the PostScript version.  It is formatted in a fashion that is
  aesthetically appealing and easier to read.  You can get the
  PostScript version from one of the many Linux distribution sites (such
  as SunSITE <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/>).


  1.5.  Feedback

  Questions, comments, or corrections for this HOWTO may be directed to
  <markk@auratek.com>.


  1.6.  Acknowledgments

  Thanks go out to all of the people who took the time to read the alpha
  version of this HOWTO and respond with many helpful comments and
  suggestions---some of you may see your comments reflected in the
  version.

  I'd also like to thank Matt Foster who did the original re-write.



  2.  Printing Under Linux

  This section discusses how to print files, examine the print queue,
  remove jobs from the print queue, format files before printing them,
  and configure your printing environment.


  2.1.  History of Linux Printing

  The Linux printing system---the lp system---is a port of the source
  code written by the Regents of the University of California for the
  Berkeley Software Distribution version of the UNIX operating system.


  2.2.  Printing a File Using lpr

  By far, the most simplistic way to print in the Linux operating system
  is to send the file to be printed directly to the printing device.
  One way to do this is to use the cat command.  As the root user, one
  could do something like



       # cat thesis.txt > /dev/lp



  In this case, /dev/lp is a symbolic link to the actual printing
  device---be it a dot-matrix, laser printer, typesetter, or plotter.
  (See ln(1) for more information on symbolic links.)

  For the purpose of security, only the root user and users in the same
  group as the print daemon are able to write directly to the printer.
  This is why commands such as lpr, lprm, and lpq have to be used to
  access the printer.

  Because of this, users have to use lpr to print a file.  The lpr
  command takes care of all the initial work needed to print the file,
  and then it hands control over to another program, lpd, the line
  printing daemon.  The line printing daemon then tells the printer how
  to print the file.

  When lpr is executed, it first copies the specified file to a certain
  directory (the spool directory) where the file remains until lpd
  prints it.  Once lpd is told that there is a file to print, it will
  spawn a copy of itself (what we programmers call forking).  This copy
  will print our file while the original copy waits for more requests.
  This allows for multiple jobs to be queued at once.

  The syntax of lpr(1) is a very familiar one,



       $ lpr [ options ] [ filename ... ]



  If filename is not specified, lpr expects input to come from standard
  input (usually the keyboard, or another program's output).  This
  enables the user to redirect a command's output to the print spooler.
  As such,



  $ cat thesis.txt | lpr



  or,



       $ pr -l60 thesis.txt | lpr



  The lpr command accepts several command-line arguments that allow a
  user to control how it works.  Some of the most widely used arguments
  are: -Pprinter specifies the printer to use, -h suppresses printing of
  the burst page, -s creates a symbolic link instead of copying the file
  to the spool directory (useful for large files), and -#num specifies
  the number of copies to print.  An example interaction with lpr might
  be something like



       $ lpr -#2 -sP dj thesis.txt



  This command will create a symbolic link to the file thesis.txt in the
  spool directory for the printer named dj, where it would be processed
  by lpd.  It would then print a second copy of thesis.txt.

  For a listing of all the options that lpr will recognize, see lpr(1).


  2.3.  Viewing the Print Queue with lpq

  To view the contents of the print queue, use the lpq command.  Issued
  without arguments, it returns the contents of the default printer's
  queue.

  The returned output of lpq can be useful for many purposes.



       $ lpq
       lp is ready and printing
       Rank   Owner      Job  Files                            Total Size
       active mwf        31   thesis.txt                       682048 bytes



  2.4.  Canceling a Print Job Using lprm

  Another useful feature of any printing system is the ability to cancel
  a job that has been previously queued.  To do this, use lprm.



       $ lprm -



  The above command cancels all of the print jobs that are owned by the
  user who issued the command.  A single print job can be canceled by
  first getting the job number as reported by lpq and then giving that
  number to lprm.  For example,



       $ lprm 31



  would cancel job 31 (thesis.txt) on the default printer.


  2.5.  Controlling the lpd program with lpc

  The lpc(8) program is used to control the printers that lpd serves.
  you can enable or disable a printer or its queues, rearrange entries
  within a queue, and get a status report on the printers and their
  queues.  Lpc is mostly used in a setup where there are multiple
  printers hanging off one machine.



       $ lpc



  The above will start the lpc program.  By default, this enters you
  into an interactive mode, and you can begin issuing commands.  The
  other option is to issue an lpc command on the command line.



       $ lpc status all



  A list of the available commands are in the lpd man page, but here are
  a few of the major commands you'll want to know about.  Any commands
  marked with option can either be a printer name (lp, print, etc) or
  the keyword all, which means all printers.


  o  disable option -  prevents any new printer job from being entered

  o  down option - disables all printing on the printer

  o  enable option - allow new jobs to enter the print queue

  o  quit (or exit) - leave lpc

  o  restart option - restarts lpd for that printer

  o  status option - print status of printer

  o  up option - enable everything and start a new lpd


  2.6.  The RedHat printtool

  Just a quick note here on RedHat's amazing printtool program.  It
  seems to do everything that a magicfilter would do.  RedHat already
  installs many of the programs to do the filtering.  Here's how I have
  my printer set up under RH 4.0 with an HP LJ 4L connected to my
  parallel port (should be the same for other versions of RH as well).

  o  Become root and fire up printtool (if you su'ed, you remembered to
     SETENV DISPLAY :0.0 and xhost +, right?)

  o  Click "Add", and hit "OK" for a local printer.

  o  Fill in the printer device (/dev/lp1 for me)

  o  Fill in the input filter - Select a printer type, resolution, and
     paper size (ljet4, 300x300, and letter)

  o  Hit "OK" all the way back, and restart the lpd.

     Just like rolling an /etc/printcap file by hand, you can have
     multiple printer definitions for each physical printer.  One for
     different paper sizes, resolutions, etc.


  3.  Printing files

  This section covers printing the kinda of files that you'll run across
  in a Linux setup.


  3.1.  Printing graphics files

  Printing graphics files through a printer usually depends on the kind
  of graphics you're converting, and the kind of printer you want to
  send to. Dot matrix is usually out of the question due to differences
  in the way dot-matrix handles graphics.  Your best bet in this
  situation is to see if your printer is compatable with an Epson or an
  IBM ProPrinter, then convert the graphics file to PostScript, then use
  Ghostscript (see next section) to print the graphics.

  If you have a laser printer, things are a bit easier since many are
  compatable with PCL.  This now gives you a few options.  Some programs
  may output directly in PCL.  If not, programs like NetPBM can convert
  into PCL.  Last option is to use ghostscript (see next section).

  Your absolutely best option is to install packages like NetPBM and
  Ghostscript then installing a magic filter to process the graphics
  files automagically.


  3.2.  Printing PostScript files

  Printing PostScript files on a printer that has a PostScript
  interpreter is simple; just use lpr, and the printer will take care of
  all of the details for you.  For those of us that don't have printers
  with PostScript capabilities, we have to resort to other means.
  Luckily, there are programs available that can make sense of
  PostScript, and translate it into a language that most printers will
  understand.  Probably the most well known of these programs is
  Ghostscript.

  Ghostscript's responsibility is to convert all of the descriptions in
  a PostScript file to commands that the printer will understand.  To
  print a PostScript file using Ghostscript, you might do something like



       $ gs -dSAFER -dNOPAUSE -sDEVICE=deskjet -sOutputFile=\|lpr thesis.ps

  Notice in the above example that we are actually piping the output of
  Ghostscript to the lpr command by using the -sOutputFile option.

  Ghostview is an interface to Ghostscript for the X Window System.  It
  allows you to preview a PostScript file before you print it.
  Ghostview and Ghostscript can both be swiped from
  <ftp://prep.ai.mit.edu/pub/gnu/>.


  3.3.  Printing PDF files

  Adobe has released an Acrobat reader for Linux, and it's available on
  the Adobe home page  <http://www.adobe.com>.  Its predecessor, xpdf,
  is also available.  Both should print to a postscript device.


  3.4.  Printing TeX files

  One of the easiest ways to print TeX files is to convert them to
  PostScript and then print them using Ghostscript.  To do this, you
  first need to convert them from TeX to a format known as DVI (which
  stands for device-independent). You can do this with the tex(1)
  command.  Then you need to convert the DVI file to a PostScript file
  using dvips.  All of this would look like the following when typed in.



       $ tex thesis.tex
       $ dvips thesis.dvi



  Now you are ready to print the resulting PostScript file as described
  above.


  3.5.  Printing troff  formatted files



       $ groff -Tascii thesis.tr | lpr



  or, if you prefer,



       $ groff thesis.tr > thesis.ps



  and then print the PostScript file as described above.


  3.6.  Printing man  pages



       $ man man | col -b | lpr

  The man pages contain pre-formatted troff data, so we have to strip
  out any highlighting, underlines, etc.  The 'col' program does this
  just nicely, and since we're piping data, the man program won`t use
  more.

  4.  Miscellaneous Items

  This covers topics not in any of the others.


  4.1.  Formatting Before Printing

  Since most ASCII files are not formatted for printing, it is useful to
  format them in some way before they are actually printed.  This may
  include putting a title and page number on each page, setting the
  margins, double spacing, indenting, or printing a file in multiple
  columns.  A common way to do this is to use a print preprocessor such
  as pr.



       $ pr +4 -d -h"Ph.D. Thesis, 2nd Draft" -l60 thesis.txt | lpr



  In the above example, pr would take the file thesis.txt and skip the
  first three pages (+4), set the page length to sixty lines (-l60),
  double space the output (-d), and add the phrase "Ph.D. Thesis, 2nd
  Draft" to the top of each page (-h).  Lpr would then queue pr's
  output.  See its on-line manual page for more information on using pr.


  4.2.  The PRINTER Environment Variables

  All of the commands in the Linux printing system accept the -P option.
  This option allows the user to specify which printer to use for
  output.  If a user doesn't specify which printer to use, then the
  default printer will be assumed as the output device.

  Instead of having to specify a printer to use every time that you
  print, you can set the PRINTER environment variable to the name of the
  printer that you want to use.  This is accomplished in different ways
  for each shell.  For bash you can do this with



       $ PRINTER="printer_name"; export PRINTER



  and csh, you can do it with



       % setenv PRINTER "printer_name"



  These commands can be placed in your login scripts (.profile for bash,
  or .cshrc for csh), or issued on the command-line.  (See bash(1) and
  csh(1) for more information on environment variables.)


  5.  Answers to Frequently Asked Questions


  Q1.  How do I prevent the staircase effect?

  A1.  The staircase effect is caused by the way some printers expect
  lines to be terminated.  Some printers want lines that end with a
  carriage-return/line-feed sequence (DOS-style) instead of the line-
  feed sequence used for UNIX-type systems.  The easiest way to fix this
  is to see if your printer can switch between the two styles
  somehow---either by flipping a DIP switch, or by sending an escape
  sequence at the start of each print job.  To do the latter, you need
  to create a filter (see Q2).

  A quick fix is to use a filter on the command-line.  An example of
  this might be



       $ cat thesis.txt | todos | lpr



  Q2.  What is a filter?

  A2.  A filter is a program that reads from standard input (stdin),
  performs some action on this input, and writes to standard output
  (stdout).  Filters are used for a lot of things, including text
  processing.


  Q3.  What is a magic filter?

  A3.  A magic filter is a filter that performs an action based on a
  file's type.  For example, if the file is a plain, text file, it would
  simply print the file using the normal methods.  If the file is a
  PostScript file, or any other format, it would print it using another
  method (ghostscript).  Two examples of this is magicfilter and
  APSfilter.  One caveat of these filters is that the appropriate
  programs have to be installed before you install the filter.

  The reason for this is that when the magicfilter gets installed, it
  queries your system for specific programs (such as ghostscript - if it
  finds it, then it knows it can handle PostScript data), then builds
  itself based on what it finds.  To handle all the printer files, you
  should probably have at least the following installed:

  o  GhostScript

  o  TeX

  o  NetPBM

  o  jpeg utilities

  o  gzip


  Q4.  What about the Windows Printing System?  Will Linux work with
  that?

  A4.  Maybe.  Printers that accept only the WPS commands will not work
  with Linux.  Printers that accept WPS and other commands (such as the
  Canon BJC 610) will work, as long as they're set to something other
  than WPS format.  Other printers, such as some HP DeskJet 820Cxi/Cse,
  will *not* work with Linux.  That being said, Linux can act as a print
  server (See Samba) for Win95 machines, since Win95 has drivers for
  those printers.


  Q5.  What kinda cheey system is this?  I can't print more than 6 pages
  or else I get a "file too large" error.

  A5.  One of the options in the /etc/printcap file relates to the
  maximum size of a print file.  The default is 1000 disk blocks (about
  500k?).  For PostScript files and the like, this will give you maybe
  6-8 pages with graphics and all.  Be sure to add the following line in
  the printer definition:


       mx=0



  The primary reason for this is to keep the spool partition from get-
  ting filled.  There is another way to do it, by making lpr create a
  soft link from the spool directory to your print file.  But you have
  to remember to add the -s option to lpr every time.


  6.  Troubleshooting

  This section covers some common things that can go wrong with your
  printing system.

  If your printer doesn't work:

  o  Do other print jobs work? (application problem?)

  o  Is lpd running? (check it using lpc) (print controller?)

  o  Can root send something directly to the printer? (print services?)

  o  Can you print from DOS? (cable/printer problem?)

     Answering these questions can help find a solution.

  Send other suggestions for this section to <markk@auratek.com>.


  7.  References

  This is a section of references on the Linux printing system.  I have
  tried to keep the references section of this HOWTO as focused as
  possible.  If you feel that I have forgotten a significant reference
  work, please do not hesitate to contact me.

  Before you post your question to a USENET group, consider the
  following:

  o  Is the printer accepting jobs?  (Use lpc(8) to verify.)

  o  Is the answer to your question covered in this HOWTO or Grant
     Taylor's Printing HOWTO?

  If any of the above are true, you may want to think twice before you
  post your question.  And, when you do finally post to a newsgroup, try
  to include pertinent information.  Try not to just say something like,
  "I'm having trouble with lpr, please help." These types of posts will
  most definitely be ignored by many.  Also try to include the kernel
  version that you're running, how the error occured, and, if any, the
  specific error message that the system returned.


     On-Line Manual Pages

     o  cat(1)  concatenate and print files

     o  dvips(1)  convert a TeX DVI file to PostScript

     o  ghostview(1)  view PostScript documents using Ghostscript

     o  groff(1)  front-end for the groff document formatting system

     o  gs(1)  Ghostscript interpreter/viewer

     o  lpc(8)  line printer control program

     o  lpd(8)  line printer spooler daemon

     o  lpq(1)  spool queue examination program

     o  lpr(1)  off-line printer

     o  lprm(1)  remove jobs from the line printer spooling queue

     o  pr(1)  convert text files for printing

     o  tex(1)  text formatting and typesetting


     USENET newsgroups

     o  comp.os.linux.*  a plethora of information on Linux

     o  comp.unix.*  discussions relating to the UNIX operating system



  Process Monitor HOW-TO for Linux
  Al Dev (Alavoor Vasudevan) alavoor@yahoo.com
  v6.0, 10 July 2000

  This document describes how to monitor Linux/Unix processes and to re-
  start them automatically if they die without any manual intervention.
  This document also has URLs for "Unix Processes" FAQs.
  ______________________________________________________________________

  Table of Contents


  1. Linux or Unix Processes

  2. Unix/Linux command - procautostart

  3. File procautostart.cpp

  4. File debug.cpp

  5. File debug.h

  6. Makefile

  7. Testing the program - monitor_test

  8. Other Monitoring Tools

     8.1 OpenSource Monitoring Tools
     8.2 Monitoring Tool - "daemontools"
     8.3 Commercial Monitoring Tools

  9. Other Formats of this Document

  10. Copyright Notice



  ______________________________________________________________________

  1.  Linux or Unix Processes

  Processes are the "heart" of the Linux/Unix processes. It is very
  important to monitor the application processes to ensure 100%
  availability and reliability of the computer system.  For example,
  processes of databases, web-server etc.. need to be up and running 24
  hours a day and 365 days a year.  Use the tools described in this
  document to the monitor important application processes.

  Also see the following related topics on Linux/Unix processes.

    Unix Programming FAQ - Chapter 1 Unix Processes
     <http://www.erlenstar.demon.co.uk/unix/faq_toc.html>


    Other FAQs on Unix are at  <http://www.erlenstar.demon.co.uk/unix/>


  2.  Unix/Linux command - procautostart

  Use the program procautostart (say "Prok-Auto-Start" or Process
  AutoStart) to monitor and automatically re-start any Unix/Linux
  process if they die. The program listing is given in following
  sections in this document.


  procautostart  -n   < delay_seconds > -c   "< command_line >" nohup &

  This starts the unix process procautostart and also command_line
  process. The procautostart process will re-start command_line process
  if it dies. The -n option is the time delay in seconds before
  procautostart checks the running process started by command_line. It
  is advisable to start the procautostart as background process with no-
  hangup using "nohup &".  See 'man nohup'.

  The procautostart is written in "C" so that it is very fast and
  efficient, since the program is called every n seconds. Amount of
  resources consumed by procautostart is very minute.

  For example -

  ______________________________________________________________________
          procautostart -n 12 -c "monitor_test -d $HOME  -a dummy_arg " nohup &
  ______________________________________________________________________


  Here procautostart will be checking the process monitor_test every 12
  seconds.

  The program will output log files in 'mon' sub-directory which has
  datetime stamp of when the processes died and re-started. These files
  gives info on how often the processes are dying.

  You can also use micro-seconds option '-m' or nano-seconds option
  '-o', edit the source code file procautostart.cpp and uncomment
  appropriate lines.

  3.  File procautostart.cpp

  // From your browser save this file as text-file named as
  'procautostart.cpp'.



  ______________________________________________________________________
  //
  // Program to monitor the unix processes
  // and automatically re-start them if they die
  //

  #include <stdio.h>
  #include <strings.h> // C strings
  #include <unistd.h> // for getopt
  #include <alloc.h> // for free

  #include <errno.h> // for kill() - error numbers command
  extern int errno;

  #ifdef Linux
  #include <asm/errno.h> // for kill() - error numbers command
  #endif

  #include <sys/types.h> // for kill() command
  #include <signal.h> // for kill() command
  #include <sys/wait.h> // for wait()
  #include <stdlib.h> // for setenv()
  #include <time.h> // for strftime()
  #include <libgen.h> // for basename()

  #include "debug.h"

  #define BUFF_HUN        100
  #define BUFF_THOU       1024
  #define PR_INIT_VAL     -10
  #define WAIT_FOR_SYS    5  // wait for process to start up
  #define DEF_SL_SECS     6  // default sleep time
  #define SAFE_MEM        10  // to avoid any possible memory leaks

  #define LOG_NO          false  // do not output to logfile
  #define LOG_YES         true  // do output to logfile
  #define STD_ERR_NO      false  // do not print to std err
  #define STD_ERR_YES     true  // do print to std err
  #define DATE_NO         false  // do not print date
  #define DATE_YES        true  // do print date

  int start_process(char *commandline, char *args[], char **envp, pid_t proc_pid);
  int fork2(pid_t parent_pid, unsigned long tsecs);
  inline void error_msg(char *mesg_out, char *lg_file, bool pr_lg, bool std_err, bool pr_dt);

  //////////////////////////////////////////////
  // To test this program use --
  // procautostart -n 5 -c 'monitor_test dummy1 -a dummy2 -b dummy3  ' &
  //////////////////////////////////////////////
  int main(int argc, char **argv, char **envp)
  {
          unsigned long   sleep_sec, sleep_micro, sleep_nano;
          int     ch;
          pid_t   proc_pid;
          int pr_no = PR_INIT_VAL;
          char mon_log[40];
          char *pr_name = NULL, *cmd_line = NULL, **cmdargs = NULL;

          // you can turn on debug by editing Makefile and put -DDEBUG in gcc
          debug_("test debug", "this line");
          debug_("argc", argc);

          // Use getpid() - man 2 getpid()
          proc_pid = getpid(); // get the Process ID of procautostart
          debug_("PID proc_pid", (int) proc_pid);

          // Create directory to hold log, temp files
          system("mkdir mon 1>/dev/null 2>/dev/null");

          sleep_sec = DEF_SL_SECS ; // default sleep time
          sleep_micro = 0; // default micro-sleep time
          sleep_nano = 0; // default nano-sleep time
          optarg = cmd_line = NULL;
          while ((ch = getopt(argc, argv, "n:m:o:h:c:")) != -1) // needs trailing colon :
          {
                  switch (ch)
                  {
                          case 'n':
                                  debug_("scanned option n ", optarg);
                                  sleep_sec = atoi(optarg);
                                  debug_("sleep_sec", sleep_sec);
                                  break;
                          case 'm':
                                  debug_("scanned option m ", optarg);
                                  sleep_micro = atoi(optarg);
                                  debug_("sleep_micro", sleep_micro);
                                  break;
                          case 'o':
                                  debug_("scanned option o ", optarg);
                                  sleep_nano = atoi(optarg);
                                  debug_("sleep_nano", sleep_nano);
                                  break;
                          case 'c':
                                  debug_("scanned option c ", optarg);
                                  cmd_line = strdup(optarg); // does auto-malloc here
                                  debug_("cmd_line", cmd_line);
                                  break;
                          case 'h':
                                  debug_("scanned option h ", optarg);
                                  fprintf(stderr, "\nUsage : %s -n <sleep> -m <microsecond> -o <nanosecond> -c '<command>'\n", argv[0]);
                                  exit(-1);
                                  break;
                          default:
                                  debug_("ch", "default");
                                  fprintf(stderr, "\nUsage : %s -n <sleep> -m <microsecond> -o <nanosecond> -c '<command>'\n", argv[0]);
                                  exit(-1);
                                  break;
                  }
          }

          if (cmd_line == NULL)
          {
                  fprintf(stderr, "\ncmd_line is NULL");
                  fprintf(stderr, "\nUsage : %s -n <sleep> -m <microsecond> -o <nanosecond> -c '<command>'\n", argv[0]);
                  exit(-1);
          }
          else
          {
                  // trim the trailing blanks -- otherwise problem in grep command
                  int tmpii = strlen(cmd_line);
                  for (int tmpjj = tmpii; tmpjj > -1; tmpjj--)
                  {
                          if (cmd_line[tmpjj] == ' ')
                                  cmd_line[tmpjj] = '\0';
                          else
                          if (cmd_line[tmpjj] == '&')  // discards amp-and .. we will be appending later
                                  cmd_line[tmpjj] = '\0';
                          else
                          if (cmd_line[tmpjj] == '\0')
                                  continue;
                          else
                          {
                                  if (cmd_line[tmpjj] == '&') // Discard trailing & in command line
                                          cmd_line[tmpjj] = '\0';
                                  break;
                          }
                  }
                  debug_("cmd_line", cmd_line);
          }

          //argv0 = (char *) strdup(argv[0]);
          //debug_("argv0", argv0);

          // Start the process
          {
                  // Find the command line args
                  char *aa = strdup(cmd_line), *bb = NULL;
                  cmdargs = (char **) (malloc(sizeof(char **) + SAFE_MEM));
                  for (int tmpii = 0; ; tmpii++)
                  {
                          // Allocate more memory ....
                          cmdargs = (char **) realloc(cmdargs, (sizeof(char **) * (tmpii+1) + SAFE_MEM)  );

                          if (tmpii == 0)
                                  bb = strtok(aa, " ");
                          else
                                  bb = strtok(NULL, " "); // subsequent calls must have NULL as first arg

                          if (bb == NULL)
                          {
                                  cmdargs[tmpii] = bb;
                                  break;
                          }
                          else
                          {
                                  // Must malloc with strdup because aa, bb are
                                  // local vars in local scope!!
                                  cmdargs[tmpii] = strdup(bb);
                          }

                          debug_("tmpii", tmpii);
                          debug_("cmdargs[tmpii]", (char *) cmdargs[tmpii]);
                  }

                  // In case execve you MUST NOT have trailing ampersand & in the command line!!
                  //pr_no = start_process(cmd_line, NULL, NULL, proc_pid);  // Using execlp ...
                  pr_no = start_process(cmdargs[0], & cmdargs[0], envp, proc_pid); // Using execve ....

                  debug_("The child pid", pr_no);
                  if (pr_no < 0)
                  {
                          fprintf(stderr, "\nFatal Error: Failed to start the process\n");
                          exit(-1);
                  }
                  sleep(WAIT_FOR_SYS); // wait for the process to come up

                  // Get process name - only the first word from cmd_line
                  pr_name = strdup(basename(cmdargs[0])); // process name,  does auto-malloc here
          }

          // generate log file names
          {
                  char    aa[21];

                  strncpy(aa, pr_name, 20); aa[20] = '\0';
                  // Define mon file-names - make it unique with combination of
                  // process name and process id
                  sprintf(mon_log, "mon/%s%d.log", aa, (int) proc_pid);
          }

          // Print out pid to log file
          if (pr_no > 0)
          {
                  char aa[200];
                  sprintf(aa, "Process ID of %s is %d", pr_name, pr_no);
                  error_msg(aa, mon_log, LOG_YES, STD_ERR_NO, DATE_YES);
          }

          // monitors the process - restarts if process dies...
          bool process_died = false;
          char print_log[200];
          while (1)  // infinite loop - monitor every 6 seconds
          {
                  //debug_("Monitoring the process now...", ".");
                  if (kill(pr_no, 0))  // if (kill(pr_no,0) != 0)
                  {
                          debug_("errno from kill() function", errno);
                          if (errno == EINVAL)
                          {
                                  process_died = false; // unable to execute kill() - wrong input
                                  strcpy(print_log, "Error EINVAL: Invalid signal was specified");
                                  error_msg(print_log, mon_log, LOG_YES, STD_ERR_YES, DATE_YES);
                          }
                          else
                          if (errno == ESRCH )
                          {
                                  // ERSRCH means - No process can be found corresponding to pr_no
                                  // hence process had died !!
                                  process_died = true; // No process can be found matching pr_no
                                  sprintf(print_log,
                                  "Error ESRCH: No process or process group can be found for %d", pr_no);
                                  error_msg(print_log, mon_log, LOG_YES, STD_ERR_YES, DATE_YES);
                          }
                          else
                          if (errno == EPERM)
                          {
                                  process_died = false; // unable to execute kill() - wrong input
                                  strcpy(print_log,
                                  "Error EPERM: The real or saved user ID does not match the real user ID");
                                  error_msg(print_log, mon_log, LOG_YES, STD_ERR_YES, DATE_YES);
                          }
                          else
                          {
                                  process_died = true; // process died!! restart now
                                  debug_("process_die ", "others");
                          }

                          if (process_died == true)
                          {
                                  //
                                  // char respawn[1024];
                                  // strcpy(respawn, cmd_line);
                                  //
                                  // For "C" program use kill(pid_t process, int signal) function.
                                  // #include <signal.h> // See 'man 2 kill'
                                  // Returns 0 on success and -1 with errno set.
                                  //              kill -0 $pid 2>/dev/null || respawn
                                  // To get the exit return status do --
                                  //              kill -0 $pid 2>/dev/null | echo $?
                                  // Return value 0 is success and others mean failure
                                  // Sending 0 does not do anything to target process, but it tests
                                  // whether the process exists. The kill command will set its exit
                                  // status based on this process.
                                  //
                                  // Alternatively, you can use
                                  //              ps -p $pid >/dev/null 2>&1 || respawn
                                  // To get the exit return status do --
                                  //              ps -p $pid >/dev/null 2>&1 | echo $?
                                  // Return value 0 is success and others mean failure
                                  //

                                  // If the process had died, restart and  re-assign the pid to pr_no
                                  // start the process in background ....
                                  // Now re-assign new value of process id to pr_no
                                  if (pr_no > 0 )
                                          sprintf(print_log, "Fatal Error: Process %s with PID = %d died!!",
                                                  pr_name, pr_no);
                                  else
                                          sprintf(print_log, "Fatal Error: Process %s is not up!!",
                                                  pr_name);
                                  error_msg(print_log, mon_log, LOG_YES, STD_ERR_YES, DATE_YES);

                                  sprintf(print_log, "Starting process %s", pr_name);
                                  error_msg(print_log, mon_log, LOG_YES, STD_ERR_NO, DATE_NO);

                                  //pr_no = start_process(cmd_line, NULL, NULL, proc_pid);  // Using execlp ....
                                  pr_no = start_process(cmdargs[0], & cmdargs[0], envp, proc_pid); // Using execve ....

                                  debug_("The child pid", pr_no);
                                  if (pr_no < 0)
                                  {
                                          sprintf(print_log, "Fatal Error: Failed to start the process");
                                          error_msg(print_log, mon_log, LOG_YES, STD_ERR_YES, DATE_YES);
                                          exit(-1);
                                  }
                                  sleep(WAIT_FOR_SYS); // wait for the process to come up
                                  sprintf(print_log, "Process ID of %s is %d", pr_name, pr_no);
                                  error_msg(print_log, mon_log, LOG_YES, STD_ERR_NO, DATE_NO);
                          }
                  }
                  //debug_("Sleeping now ......", ".");
                  sleep(sleep_sec);

                  // Uncomment these to use micro-seconds
                  // For real-time process control use micro-seconds or nana-seconds sleep functions
                  // See 'man3 usleep', 'man 2 nanasleep'
                  // If you do not have usleep() or nanosleep() on your system, use select() or poll()
                  // specifying no file descriptors to test.
                  //usleep(sleep_micro);

                  // To sleep nano-seconds ...  Uncomment these to use nano-seconds
                  //struct timespec *req = new struct timespec;
                  //req->tv_sec = 0; // seconds
                  //req->tv_nsec = sleep_nano; // nanoseconds
                  //nanosleep( (const struct timespec *)req, NULL);
          }
  }

  inline void error_msg(char *mesg_out, char *lg_file, bool pr_lg, bool std_err, bool pr_dt)
  {
          if (pr_lg) // (pr_lg == true) output to log file
          {
                  char tmp_msg[BUFF_THOU];
                  if (pr_dt == true) // print date and message to log file 'lg_file'
                  {
                          sprintf(tmp_msg, "date >> %s; echo '\n%s\n' >> %s\n ",
                                  lg_file, mesg_out, lg_file);
                          system(tmp_msg);
                  }
                  else
                  {
                          sprintf(tmp_msg, "echo '\n%s\n' >> %s\n ",
                                  mesg_out, lg_file);
                          system(tmp_msg);
                  }
          }

          if (std_err) // (std_err == true) output to standard error
                  fprintf(stderr, "\n%s\n", mesg_out);

          debug_("mesg_out", mesg_out);
  }

  // start a process and returns PID or -ve value if error
  // The main() function has envp arg as in - main(int argc, char *argv[], char **envp)
  int start_process(char *commandline, char *args[], char **envp, pid_t parent_pid)
  {
          int ff;
          unsigned long  tsecs;

          tsecs = time(NULL); // time in secs since Epoch 1 Jan 1970
          debug_("Time tsecs", tsecs);

          // Use fork2() instead of fork to avoid zombie child processes
          switch (ff = fork2(parent_pid, tsecs))  // fork creates 2 process each executing the following lines
          {
          case -1:
                  fprintf(stderr, "\nFatal Error: start_process() - Unable to fork process\n");
                  _exit(errno);
                  break;
          case 0:  // child process
                  debug_("\nStarting the start child process\n", " ");
                  // For child process to ignore the interrupts (i.e. to put
                  // child process in "background" mode.
                  // Signals are sent to all processes started from a
                  // particular terminal. Accordingly, when a program is to be run non-interactively
                  // (started by &), the shell arranges that the program will ignore interrupts, so
                  // it won't be stopped by interrupts intended for foreground processes.
                  // Hence if previous value of signal is not IGN than set it to IGN.

                  // Note: Signal handlers cannot be set for SIGKILL, SIGSTOP
                  if (signal(SIGINT, SIG_IGN) == SIG_ERR)
                          fprintf(stderr, "\nSignal Error: Not able to set signal to SIGINT\n");
                  else
                  if (signal(SIGINT, SIG_IGN) != SIG_IGN) // program already run in background
                          signal(SIGINT, SIG_IGN);  // ignore interrupts

                  if (signal(SIGHUP, SIG_IGN) == SIG_ERR)
                          fprintf(stderr, "\nSignal Error: Not able to set signal to SIGHUP\n");
                  else
                  if (signal(SIGHUP, SIG_IGN) != SIG_IGN) // program already run in background
                          signal(SIGHUP, SIG_IGN);  // ignore hangups

                  if (signal(SIGQUIT, SIG_IGN) == SIG_ERR)
                          fprintf(stderr, "\nSignal Error: Not able to set signal to SIGQUIT\n");
                  else
                  if (signal(SIGQUIT, SIG_IGN) != SIG_IGN) // program already run in background
                          signal(SIGQUIT, SIG_IGN);  // ignore Quit

                  if (signal(SIGABRT, SIG_IGN) == SIG_ERR)
                          fprintf(stderr, "\nSignal Error: Not able to set signal to SIGABRT\n");
                  else
                  if (signal(SIGABRT, SIG_IGN) != SIG_IGN) // program already run in background
                          signal(SIGABRT, SIG_IGN);  // ignore ABRT

                  if (signal(SIGTERM, SIG_IGN) == SIG_ERR)
                          fprintf(stderr, "\nSignal Error: Not able to set signal to SIGTERM\n");
                  else
                  if (signal(SIGTERM, SIG_IGN) != SIG_IGN) // program already run in background
                          signal(SIGTERM, SIG_IGN);  // ignore TERM

                  // sigtstp - Stop typed at tty. Ignore this so that parent process
                  // be put in background with CTRL+Z or with SIGSTOP
                  if (signal(SIGTSTP, SIG_IGN) == SIG_ERR)
                          fprintf(stderr, "\nSignal Error: Not able to set signal to SIGTSTP\n");
                  else
                  if (signal(SIGTSTP, SIG_IGN) != SIG_IGN) // program already run in background
                          signal(SIGTSTP, SIG_IGN);  // ignore TSTP

                  // You can use debug_ generously because they do NOT increase program size!
                  debug_("before execve commandline", commandline);
                  debug_("before execve args[0]", args[0]);
                  debug_("before execve args[1]", args[1]);
                  debug_("before execve args[2]", args[2]);
                  debug_("before execve args[3]", args[3]);
                  debug_("before execve args[4]", args[4]);
                  debug_("before execve args[5]", args[5]);
                  debug_("before execve args[6]", args[6]);
                  debug_("before execve args[7]", args[7]);
                  execve(commandline, args, envp);

                  // execlp, execvp does not provide expansion of metacharacters
                  // like <, >, *, quotes, etc., in argument list. Invoke
                  // the shell /bin/sh which then does all the work. Construct
                  // a string 'commandline' that contains the complete command
                  //execlp("/bin/sh", "sh", "-c", commandline, (char *) 0);  // if success than NEVER returns !!

                  // If execlp returns than there is some serious error !! And
                  // executes the following lines below...
                  fprintf(stderr, "\nFatal Error: Unable to start child process\n");
                  ff = -2;
                  exit(127);
                  break;
          default: // parent process
                  // child pid is ff;
                  if (ff < 0)
                          fprintf(stderr, "\nFatal Error: Problem while starting child process\n");

                  {
                          char    buff[BUFF_HUN];
                          FILE    *fp1;
                          sprintf(buff, "mon/%d%lu.out", (int) parent_pid, tsecs); // tsecs is unsigned long
                          fp1 = fopen(buff, "r");
                          if (fp1 != NULL)
                          {
                                  buff[0] = '\0';
                                  fgets(buff, BUFF_HUN, fp1);
                                  ff = atoi(buff);
                          }
                          fclose(fp1);
                          debug_("start process(): ff - ", ff);
  #ifndef DEBUG
                          sprintf(buff, "rm -f mon/%d%lu.out", (int) parent_pid, tsecs);
                          system(buff);
  #endif // DEBUG
                  }

                  // define wait() to put child process in foreground or else put in background
                  //waitpid(ff, & status, WNOHANG || WUNTRACED);
                  //waitpid(ff, & status, WUNTRACED);
                  //wait(& status);

                  break;
          }
          return ff;
  }

  /* fork2() -- like fork, but the new process is immediately orphaned
   *            (won't leave a zombie when it exits)
   * Returns 1 to the parent, not any meaningful pid.
   * The parent cannot wait() for the new process (it's unrelated).
   */
  /* This version assumes that you *haven't* caught or ignored SIGCHLD. */
  /* If you have, then you should just be using fork() instead anyway.  */

  int fork2(pid_t parent_pid, unsigned long tsecs)
  {
      pid_t mainpid, child_pid = -10;
      int status;
          char    buff[BUFF_HUN];

      if (!(mainpid = fork()))
      {
          switch (child_pid = fork())
          {
            case 0:
                          //child_pid = getpid();
                          //debug_("At case 0 fork2 child_pid : ", child_pid);
                          return 0;
            case -1:
                          _exit(errno);    /* assumes all errnos are <256 */
            default:
                          debug_("fork2 child_pid : ", (int) child_pid);
                          sprintf(buff, "echo %d > mon/%d%lu.out", (int) child_pid, (int) parent_pid, tsecs);
                          system(buff);
                          _exit(0);
          }
      }

          //debug_("fork2 pid : ", pid);
      if (mainpid < 0 || waitpid(mainpid, & status, 0) < 0)
        return -1;

      if (WIFEXITED(status))
        if (WEXITSTATUS(status) == 0)
          return 1;
        else
          errno = WEXITSTATUS(status);
      else
        errno = EINTR;  /* well, sort of :-) */

      return -1;
  }
  ______________________________________________________________________



  4.  File debug.cpp

  // From your browser save this file as text-file named as 'debug.cpp'.



  ______________________________________________________________________
  // This file defines the debug_() function which can be used for debugging
  // the program. It is similar to "C" assert(). The debug_() is set to void()
  // if DEBUG is not defined in Makefile. This way executable size of production
  // release is NOT AT ALL effected. Using debug_() very generously has no
  // impact on production executable size.
  #ifdef DEBUG

  #include "debug.h"
  // Variable value[] can be char, string, int, unsigned long, float, etc...

  void local_dbg(char name[], char value[], char fname[], int lineno, bool logfile) {
          printf("\nDebug %s Line: %d %s is = %s\n", fname, lineno, name, value ); }

  void local_dbg(char name[], int value, char fname[], int lineno, bool logfile) {
          printf("\nDebug %s Line: %d %s is = %d\n", fname, lineno, name, value ); }

  void local_dbg(char name[], unsigned int value, char fname[], int lineno, bool logfile) {
          printf("\nDebug %s Line: %d %s is = %d\n", fname, lineno, name, value ); }

  void local_dbg(char name[], long value, char fname[], int lineno, bool logfile) {
          printf("\nDebug %s Line: %d %s is = %d\n", fname, lineno, name, value ); }

  void local_dbg(char name[], unsigned long value, char fname[], int lineno, bool logfile) {
          printf("\nDebug %s Line: %d %s is = %d\n", fname, lineno, name, value ); }

  void local_dbg(char name[], short value, char fname[], int lineno, bool logfile) {
          printf("\nDebug %s Line: %d %s is = %d\n", fname, lineno, name, value ); }

  void local_dbg(char name[], unsigned short value, char fname[], int lineno, bool logfile) {
          printf("\nDebug %s Line: %d %s is = %d\n", fname, lineno, name, value ); }

  void local_dbg(char name[], float value, char fname[], int lineno, bool logfile) {
          printf("\nDebug %s Line: %d %s is = %f\n", fname, lineno, name, value ); }

  void local_dbg(char name[], double value, char fname[], int lineno, bool logfile) {
          printf("\nDebug %s Line: %d %s is = %f\n", fname, lineno, name, value ); }

  // You add many more here - value can be a class, ENUM, datetime, etc...

  #endif // DEBUG
  ______________________________________________________________________



  5.  File debug.h

  // From your browser save this file as text-file named as 'debug.h'.



  ______________________________________________________________________
  #ifdef DEBUG

  #include <stdio.h>
  //#include <strings.h>
  //#include <assert.h>  // assert() macro which is also used for debugging

  // Debugging code
  // Use debug2_ to output result to a log file
  #define debug_(NM, VL) (void) ( local_dbg(NM, VL, __FILE__, __LINE__) )
  #define debug2_(NM, VL, LOG_FILE) (void) ( local_dbg(NM, VL, __FILE__, __LINE__, LOG_FILE) )
  void local_dbg(char name[], char value[], char fname[], int lineno, bool logfile= false);
  void local_dbg(char name[], int value, char fname[], int lineno, bool logfile= false);
  void local_dbg(char name[], unsigned long value, char fname[], int lineno, bool logfile= false);
  void local_dbg(char name[], float value, char fname[], int lineno, bool logfile= false);

  #else

  #define debug_(NM, VL) ((void) 0)
  #define debug2_(NM, VL, LOG_FILE) ((void) 0)

  #endif // DEBUG
  ______________________________________________________________________



  6.  Makefile

  # From your browser save this file as text-file named as 'Makefile'.


  ______________________________________________________________________
  EXE=procautostart
  SRCS=procautostart.cpp debug.cpp
  OBJS=procautostart.o  debug.o

  CXX=gcc

  HOSTFLAG=-DLinux
  #HOSTFLAG=-DSunOS

  # Do not use compiler optimizer -O as this may break the program
  # Use debug flag to enable the debug() function. If DEBUG is not
  # defined than the function debug() is set to void(), similar
  # to assert()
  # Use options -Wall (all warning msgs) -O3 (optimization)
  #MYCFLAGS=-DDEBUG -g -Wall
  MYCFLAGS=-O3 -Wall

  all: $(OBJS)
          $(CXX) $(HOSTFLAG) $(MYCFLAGS) $(OBJS) -o $(EXE)

  $(OBJS): $(SRCS)
          $(CXX) -c $(HOSTFLAG) $(MYCFLAGS) $(SRCS)

  clean:
          rm -f *.o *.log *.log.old *.pid core err a.out afiedt.buf
          rm -f $(EXE)
  ______________________________________________________________________



  7.  Testing the program - monitor_test

  From your browser save this file as text-file named as 'monitor_test'.

  Use this program for testing the 'procautostart' program.  For example
  -

  ______________________________________________________________________
          procautostart -n 12 -c "monitor_test -d $HOME  -a dummy_arg "
  ______________________________________________________________________


  Here procautostart will be checking the process monitor_test every 12
  seconds.


  ______________________________________________________________________
  #!/bin/ksh

  # Program to test the procautostart

  echo "Started the monitor_test ...."
  date > monitor_test.log
  while :
  do
          date >> monitor_test.log
          sleep 2
  done
  ______________________________________________________________________



  8.  Other Monitoring Tools


  8.1.  OpenSource Monitoring Tools

  On linux systems you can find the following packages. If it is not in
  the main cdrom than you must check in the contrib cdrom :

    On contrib cdrom daemontools*.rpm


  


  


  


  


  


  


  


     To use top commands type at unix prompt -



     ___________________________________________________________________
             $ top
             $ ktop
             $ gtop
     ___________________________________________________________________



  8.2.  Monitoring Tool - "daemontools"

  Visit the web site of daemontools at
  <http://www.pobox.com/~djb/daemontools.html>

  To install the daemontools RPM, do -

  ______________________________________________________________________
          # rpm -i /mnt/cdrom/daemontools*.html
          # man supervise
  ______________________________________________________________________



  supervise monitors a service. It starts the service and restarts the
  service if it dies. The companion svc program stops, pauses, or
  restarts the service on sysadmin request. The svstat program prints a
  one-line status report. See man page by 'man supervise'

  svc - control a supervised service.

  svc  changes  the status of a supervise-monitored service.  dir is the
  same directory used for supervise.  You can list several dirs.  svc
  will change the status  of each service in turn.

  svstat - print the status of a supervised service.

  svstat prints the status of a supervise-monitored service.  dir is the
  same directory used for supervise.  You can list several dirs.  svstat
  will print  the  status of each service in turn.

  cyclog writes a log to disk. It automatically synchronizes the log
  every 100KB (by default) to guarantee data integrity after a crash. It
  automatically rotates the log to keep it below 1MB (by default). If
  the disk fills up, cyclog pauses and then tries again, without losing
  any data. See man page by 'man cyclog'

  accustamp puts a precise timestamp on each line of input. The
  timestamp is a numeric TAI timestamp with microsecond precision. The
  companion tailocal program converts TAI timestamps to local time. See
  'man accustamp'

  usually watches a log for lines that do not match specified patterns,
  copying those lines to stderr. The companion errorsto program
  redirects stderr to a file. See 'man usually'

  setuser runs a program under a user's uid and gid. Unlike su, setuser
  does not gain privileges; it does not check passwords, and it cannot
  be run except by root. See 'man setuser'

  8.3.  Commercial Monitoring Tools

  There are commercial monitoring tools available. Check out -

    BMC Patrol for Unix/Databases  <http://www.bmc.com>



    TIBCO corp's  Hawk for Unix monitoring  <http://www.tibco.com>


    LandMark corporation


    Platinum corporation

  9.  Other Formats of this Document

  This document is published in 11 different formats namely - DVI,
  Postscript, Latex, Adobe Acrobat PDF, LyX, GNU-info, HTML, RTF(Rich
  Text Format), Plain-text, Unix man pages and SGML.

    You can get this HOWTO document as a single file tar ball in HTML,
     DVI, Postscript or SGML formats from -
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/>

    Plain text format is in:
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO>

    Translations to other languages like French, German, Spanish,
     Chinese, Japanese are in
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> Any help from you to
     translate to other languages is welcome.

     The document is written using a tool called "SGML-Tools" which can
     be got from - <http://www.sgmltools.org> Compiling the source you
     will get the following commands like

    sgml2html CVS-HOWTO.sgml     (to generate html file)

    sgml2rtf  CVS-HOWTO.sgml     (to generate RTF file)

    sgml2latex CVS-HOWTO.sgml    (to generate latex file)

  LaTeX documents may be converted into PDF files simply by producing a
  Postscript output using sgml2latex ( and dvips) and running the output
  through the Acrobat distill ( <http://www.adobe.com>) command as
  follows:

  ______________________________________________________________________
  bash$ man sgml2latex
  bash$ sgml2latex filename.sgml
  bash$ man dvips
  bash$ dvips -o filename.ps filename.dvi
  bash$ distill filename.ps
  bash$ man ghostscript
  bash$ man ps2pdf
  bash$ ps2pdf input.ps output.pdf
  bash$ acroread output.pdf &
  ______________________________________________________________________


  Or you can use Ghostscript command ps2pdf.  ps2pdf is a work-alike for
  nearly all the functionality of Adobe's Acrobat Distiller product: it
  converts PostScript files to Portable Document Format (PDF) files.
  ps2pdf is implemented as a very small command script (batch file) that
  invokes Ghostscript, selecting a special "output device" called
  pdfwrite. In order to use ps2pdf, the pdfwrite device must be included
  in the makefile when Ghostscript was compiled; see the documentation
  on building Ghostscript for details.

  This howto document is located at -


    <http://sunsite.unc.edu/LDP/HOWTO/CVS-HOWTO.html>

  Also you can find this document at the following mirrors sites -

    <http://www.caldera.com/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.WGS.com/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.cc.gatech.edu/linux/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.redhat.com/linux-info/ldp/HOWTO/CVS-HOWTO.html>

    Other mirror sites near you (network-address-wise) can be found at
     <http://sunsite.unc.edu/LDP/hmirrors.html> select a site and go to
     directory /LDP/HOWTO/CVS-HOWTO.html


  In order to view the document in dvi format, use the xdvi program. The
  xdvi program is located in tetex-xdvi*.rpm package in Redhat Linux
  which can be located through ControlPanel | Applications | Publishing
  | TeX menu buttons.  To read dvi document give the command -


               xdvi -geometry 80x90 howto.dvi
               man xdvi



  And resize the window with mouse.  To navigate use Arrow keys, Page
  Up, Page Down keys, also you can use 'f', 'd', 'u', 'c', 'l', 'r',
  'p', 'n' letter keys to move up, down, center, next page, previous
  page etc.  To turn off expert menu press 'x'.

  You can read postscript file using the program 'gv' (ghostview) or The
  ghostscript program is in ghostscript*.rpm package and gv program is
  in gv*.rpm package in Redhat Linux which can be located through
  ControlPanel | Applications | Graphics menu buttons. The gv program is
  much more user friendly than ghostscript.  Also ghostscript and gv are
  available on other platforms like OS/2, Windows 95 and NT, you view
  this document even on those platforms.


    Get ghostscript for Windows 95, OS/2, and for all OSes from
     <http://www.cs.wisc.edu/~ghost>

  To read postscript document give the command -


                       gv howto.ps
                       ghostscript howto.ps



  You can read HTML format document using Netscape Navigator, Microsoft
  Internet explorer, Redhat Baron Web browser or any of the 10 other web
  browsers.

  You can read the latex, LyX output using LyX a X-Windows front end to
  latex.

  10.  Copyright Notice

  Copyright policy is GNU/GPL as per LDP (Linux Documentation project).
  LDP is a GNU/GPL project.  Additional restrictions are - you must
  retain the author's name, email address and this copyright notice on
  all the copies. If you make any changes or additions to this document
  than you should intimate all the authors of this document.




Program Library HOWTO

David A. Wheeler

   version 0.60, 27 April 2000
   
   This HOWTO for programmers discusses how to create and use program
   libraries on Linux. This includes static libraries, shared libraries,
   and dynamically loaded libraries.
     _________________________________________________________________
   
   Table of Contents
   [1]Introduction
   [2]Static Libraries
   [3]Shared Libraries
          
        [4]Conventions
        [5]How Libraries are Used
        [6]Environment Variables
        [7]Creating a Shared Library
        [8]Installing and Using a Shared Library
        [9]Incompatible Libraries
                
   [10]Dynamically Loaded (DL) Libraries
          
        [11]dlopen()
        [12]dlerror()
        [13]dlsym()
        [14]dlclose()
        [15]DL Library Example
                
   [16]Miscellaneous
          
        [17]nm command
        [18]Shared Libraries Can Be Scripts
        [19]GNU libtool
                
   [20]More Examples
          
        [21]File libhello.c
        [22]File libhello.h
        [23]File demo_use.c
        [24]File script_static
        [25]File script_shared
        [26]File demo_dynamic.c
        [27]File script_dynamic
                
   [28]Other Information Sources
   [29]Copyright and License
          
Introduction

   This HOWTO for programmers discusses how to create and use program
   libraries on Linux using the GNU toolset. A ``program library'' is
   simply a file containing compiled code (and data) that is to be
   incorporated later into a program; program libraries allow programs to
   be more modular, faster to recompile, and easier to update. Program
   libraries can be divided into three types: static libraries, shared
   libraries, and dynamically loaded (DL) libraries.
   
   This paper first discusses static libraries, which are installed into
   a program executable before the program is run. It then discusses
   shared libraries, which are loaded at program start-up and shared
   between programs. Finally, it discusses dynamically loaded (DL)
   libraries, which can be loaded and used at any time while a program is
   running. DL libraries aren't really a different kind of library format
   (both static and shared libraries can be used as DL libraries);
   instead, the difference is in how DL libraries are used by
   programmers. The HOWTO wraps up with a section with more examples and
   a section with references to other sources of information.
   
   This HOWTO discusses only the Executable and Linking Format (ELF)
   format for executables and libraries, the format used by nearly all
   Linux distributions today. The GNU gcc toolset can actually handle
   library formats other than ELF; in particular, most Linux
   distributions can still use the obsolete a.out format. However, these
   formats are outside the scope of this paper.
   
   It's worth noting that some people use the term dynamically linked
   libraries (DLLs) to refer to shared libraries, some use the term DLL
   to mean any library that is used as a DL library, and some use the
   term DLL to mean a library meeting either condition. No matter which
   meaning you pick, this HOWTO covers DLLs on Linux.
   
   If you're building an application that should port to many systems,
   you might consider using [30]GNU libtool to build and install
   libraries instead of using the Linux tools directly. GNU libtool is a
   generic library support script that hides the complexity of using
   shared libraries (e.g., creating and installing them) behind a
   consistent, portable interface. On Linux, GNU libtool is built on top
   of the tools and conventions described in this HOWTO. For a portable
   interface to dynamically loaded libraries, you can use various
   portability wrappers. GNU libtool includes such a wrapper, called
   ``libltdl''. Alternatively, you could use the glib library (not to be
   confused with glibc) with its portable support for Dynamic Loading of
   Modules. You can learn more about glib at
   [31]http://developer.gnome.org/doc/API/glib/glib-dynamic-loading-of-mo
   dules.html. Again, on Linux this functionality is implemented using
   the constructs described in this HOWTO. If you're actually developing
   or debugging the code on Linux, you'll probably still want the
   information in this HOWTO.
   
   This HOWTO's master location is
   [32]http://www.dwheeler.com/program-library, and it has been
   contributed to the Linux Documentation Project
   ([33]http://www.linuxdoc.org). It is Copyright (C) 2000 David A.
   Wheeler and is licensed through the General Public License (GPL); see
   the last section for more information.
     _________________________________________________________________
   
Static Libraries

   Static libraries are simply a collection of ordinary object files;
   conventionally, static libraries end with the ``.a'' suffix. This
   collection is created using the ar (archiver) program. Static
   libraries aren't used as often as they once were, because of the
   advantages of shared libraries (described below). Still, they're
   sometimes created, they existed first historically, and they're
   simpler to explain.
   
   Static libraries permit users to link to programs without having to
   recompile its code, saving recompilation time. Note that recompilation
   time is less important given today's faster compilers, so this reason
   is not as strong as it once was. Static libraries are often useful for
   developers if they wish to permit programmers to link to their
   library, but don't want to give the library source code (which is an
   advantage to the library vendor, but obviously not an advantage to the
   programmer trying to use the library). In theory, code in static ELF
   libraries that is linked into an executable should run slightly faster
   (by 1-5%), but in practice this rarely seems to be the case due to
   other confounding factors.
   
   To create a static library, or to add additional object files to an
   existing static library, use a command like this:
ar rcs my_library.a file1.o file2.o

   This sample command adds the object files file1.o and file2.o to the
   static library my_library.a, creating my_library.a if it doesn't
   already exist. For more information on creating static libraries, see
   ar(1).
   
   Once you've created a static library, you'll want to use it. You can
   use a static library by invoking it as part of the compilation and
   linking process when creating a program executable. If you're using
   gcc(1) to generate your executable, you can use the -l option to
   specify the library; see info:gcc for more information. You can also
   use the linker ld(1) directly, using its -l and -L options; however,
   in most cases it's better to use gcc(1) since the interface of ld(1)
   is more likely to change.
     _________________________________________________________________
   
Shared Libraries

   Shared libraries are libraries that are loaded by programs when they
   start. When a shared library is installed properly, all programs that
   start afterwards automatically use the new shared library. It's
   actually much more flexible and sophisticated than this, because the
   approach used by Linux permits you to:
   
     * update libraries and still support programs that want to use
       older, non-backward-compatible versions of those libraries;
     * override specific libraries or even specific functions in a
       library when executing a particular program.
     * do all this while programs are running using existing libraries.
     _________________________________________________________________
   
Conventions

   For shared libraries to support all of these desired properties, a
   number of conventions and guidelines must be followed. You need to
   understand the difference between a library's names, in particular its
   ``soname'' and ``real name'' (and how they interact). You also need to
   understand where they should be placed in the filesystem.
     _________________________________________________________________
   
Shared Library Names

   Every shared library has a special name called the ``soname''. The
   soname has the prefix ``lib'', the name of the library, the phrase
   ``.so'', followed by a period and a version number that is incremented
   whenever the interface changes (as a special exception, the
   lowest-level C libraries don't start with ``lib''). A fully-qualified
   soname includes as a prefix the directory it's in; on a working system
   a fully-qualified soname is simply a symbolic link to the shared
   library's ``real name''.
   
   Every shared library also has a ``real name'', which is the filename
   containing the actual library code. The real name adds to the soname a
   period, a minor number, another period, and the release number. The
   last period and release number are optional. The minor number and
   release number support configuration control by letting you know
   exactly what version(s) of the library are installed. Note that these
   numbers might not be the same as the numbers used to describe the
   library in documentation, although that does make things easier.
   
   In addition, there's the name that the compiler uses when requesting a
   library, (I'll call it the ``linker name''), which is simply the
   soname without any version number.
   
   The key to managing shared libraries is the separation of these names.
   Programs, when they internally list the shared libraries they need,
   should only list the soname they need. Conversely, when you create a
   shared library, you only create the library with a specific filename
   (with more detailed version information). When you install a new
   version of a library, you install it in one of a few special
   directories and then run the program ldconfig(8). ldconfig examines
   the existing files and creates the sonames as symbolic links to the
   real names, as well as setting up the cache file /etc/ld.so.cache
   (described in a moment).
   
   ldconfig doesn't set up the linker names; typically this is done
   during library installation, and the linker name is simply created as
   a symbolic link to the ``latest'' soname or the latest real name. I
   would recommend having the linker name be a symbolic link to the
   soname, since in most cases if you update the library you'd like to
   automatically use it when linking. I asked H. J. Lu why ldconfig
   doesn't automatically set up the linker names. His explanation was
   basically that you might want to run code using the latest version of
   a library, but might instead want development to link against an old
   (possibly incompatible) library. Therefore, ldconfig makes no
   assumptions about what you want programs to link to, so installers
   must specifically modify symbolic links to update what the linker will
   use for a library.
   
   Thus, /usr/lib/libreadline.so.3 is a fully-qualified soname, which
   ldconfig would set to be a symbolic link to some realname like
   /usr/lib/libreadline.so.3.0. There should also be a linker name,
   /usr/lib/libreadline.so which could be a symbolic link referring to
   /usr/lib/libreadline.so.3.
     _________________________________________________________________
   
Filesystem Placement

   Shared libraries must be placed somewhere in the filesystem. Most open
   source software tends to follow the GNU standards; for more
   information see the info file documentation at
   [34]info:standards#Directory_Variables. The GNU standards recommend
   installing by default all libraries in /usr/local/lib when
   distributing source code (and all commands should go into
   /usr/local/bin). They also define the convention for overriding these
   defaults and for invoking the installation routines.
   
   The Filesystem Hierarchy Standard (FHS) discusses what should go where
   in a distribution (see [35]http://www.pathname.com/fhs). According to
   the FHS, most libraries should be installed in /usr/lib, but libraries
   required for startup should be in /lib and libraries that are not part
   of the system should be in /usr/local/lib.
   
   There isn't really a conflict between these two documents; the GNU
   standards recommend the default for developers of source code, while
   the FHS recommends the default for distributors (who selectively
   override the source code defaults, usually via the system's package
   management system). In practice this works nicely: the ``latest''
   (possibly buggy!) source code that you download automatically installs
   itself in the ``local'' directory (/usr/local), and once that code has
   matured the package managers can trivially override the default to
   place the code in the standard place for distributions. Note that if
   your library calls programs that can only be called via libraries, you
   should place those programs in /usr/local/libexec (which becomes
   /usr/libexec in a distribution). One complication is that Red
   Hat-derived systems don't include /usr/local/lib by default in their
   search for libraries; see the discussion below about /etc/ld.so.conf.
   Other standard library locations include /usr/X11R6/lib for X-windows.
   Note that /lib/security is used for PAM modules, but those are usually
   loaded as DL libraries (also discussed below).
     _________________________________________________________________
   
How Libraries are Used

   On GNU glibc-based systems, including all Linux systems, starting up
   an ELF binary executable automatically causes the program loader to be
   loaded and run. On Linux systems, this loader is named
   /lib/ld-linux.so.X (where X is a version number). This loader, in
   turn, finds and loads all other shared libraries used by the program.
   
   The list of directories to be searched is stored in the file
   /etc/ld.so.conf. Many Red Hat-derived distributions don't normally
   include /usr/local/lib in the file /etc/ld.so.conf. I consider this a
   bug, and adding /usr/local/lib to /etc/ld.so.conf is a common ``fix''
   required to run many programs on Red Hat-derived systems.
   
   If you want to just override a few functions in a library, but keep
   the rest of the library, you can enter the names of overriding
   libraries (.o files) in /etc/ld.so.preload; these ``preloading''
   libraries will take precedence over the standard set. This preloading
   file is typically used for emergency patches; a distribution usually
   won't include such a file when delivered.
   
   Searching all of these directories at program start-up would be
   grossly inefficient, so a caching arrangement is actually used. The
   program ldconfig(8) by default reads in the file /etc/ld.so.conf, sets
   up the appropriate symbolic links in the dynamic link directories (so
   they'll follow the standard conventions), and then writes a cache to
   /etc/ld.so.cache that's then used by other programs. This greatly
   speeds up access to libraries. The implication is that ldconfig must
   be run whenever a DLL is added, when a DLL is removed, or when the set
   of DLL directories changes; running ldconfig is often one of the steps
   performed by package managers when installing a library. On start-up,
   then, the dynamic loader actually uses the file /etc/ld.so.cache and
   then loads the libraries it needs.
     _________________________________________________________________
   
Environment Variables

   Various environment variables can control this process, and in fact
   there are environment variables that permit you to override this
   process. For example, you can temporarily substitute a different
   library for this particular execution. In Linux, the environment
   variable LD_LIBRARY_PATH is a colon-separated set of directories where
   libraries should be searched for first, before the standard set of
   directories; this is useful when debugging a new library or using a
   nonstandard library for special purposes. The environment variable
   LD_PRELOAD lists object files with functions that override the
   standard set, just as /etc/ld.so.preload does. These are implemented
   by the loader /lib/ld-linux.so.
   
   There are actually a number of other environment variables that
   control the loading process; their names begin with LD_ or RTLD_. Most
   of the others are for low-level debugging of the loader process or for
   implementing specialized capabilities. Most of them aren't
   well-documented; if you need to know about them, the best way to learn
   about them is to read the source code.
   
   Permitting user control over dynamically linked libraries would be
   disastrous for setuid/setgid programs if special measures weren't
   taken. Therefore, in GNU loader, if the program is setuid or setgid
   these variables (and other similar variables) are ignored or greatly
   limited in what they can do. The loader determines if a program is
   setuid or setgid by checking the program's credentials; if the uid and
   euid differ, or the gid and the egid differ, the loader presumes the
   program is setuid/setgid (or descended from one) and therefore greatly
   limits its abilities to control linking. If you read the GNU glibc
   library source code, you can see this; see especially the files
   elf/rtld.c and sysdeps/generic/dl-sysdep.c. This means that if you
   cause the uid and gid to equal the euid and egid, and then call a
   program, these variables will have full effect. Other Unix-like
   systems handle the situation differently but for the same reason: a
   setuid/setgid program should not be unduly affected by the environment
   variables set.
     _________________________________________________________________
   
Creating a Shared Library

   Creating a shared library is easy. First, create the object files that
   will go into the shared library using the gcc -fPIC flag (this enables
   the ``position indendependent code'' generation, a requirement for
   shared libraries). Then create the shared library using this format:
gcc -shared -Wl,-soname,your_soname \
    -o library_name file_list library_list

   Here's an example, which creates two object files (a.o and b.o) and
   then creates a shared library that contains both of them. Note that
   this compilation includes debugging information (-g) and will generate
   warnings (-Wall), which aren't required for shared libraries but are
   recommended. The compilation generates object files (using -c), and
   obviously includes the required -fPIC option:
gcc -fPIC -g -c -Wall a.c
gcc -fPIC -g -c -Wall b.c
gcc -shared -Wl,-soname,libmystuff.so.1 \
    -o libmystuff.so.1.0.1 a.o b.o -lc

   Here are a few points worth noting:
   
     * Don't strip the resulting library, and don't use the compiler
       option -fomit-frame-pointer unless you really have to. The
       resulting library will work, but these actions make debuggers
       mostly useless.
     * Use -fPIC to generate code, not -fpic (the latter may not work,
       because if branches need large displacements -fpic may not
       generate fully position-independent code).
     _________________________________________________________________
   
Installing and Using a Shared Library

   Once you've created a shared library, you'll want to install it. The
   simple approach is simply to copy the library into one of the standard
   directories (e.g., /usr/lib) and run ldconfig(8).
   
   If you can't do that (e.g., you don't have the right to modify
   /usr/lib), then you can use environment variables to control things.
   First, you'll need to create the shared libraries somewhere. Then,
   you'll need to set up the necesary symbolic links, in particular a
   link from a soname to the real name (as well as from a versionless
   soname, that is, a soname that ends in ``.so'' for users who don't
   specify a version at all). The simplest approach is to run:
 ldconfig -n directory_with_shared_libraries

   Then you can set LD_LIBRARY_PATH, which is a colon-separated list of
   directories in which to search for shared libraries before the usual
   places. If you're using bash, you could invoke my_program this way
   using:
LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH  my_program

   If you want to override just a few selected functions, you can do this
   by creating an overriding object file and setting LD_PRELOAD; the
   functions in this object file will override just those functions.
   
   Usually you can update libraries without concern; if there was an API
   change, the library creator will change the soname. However, if a
   program breaks on an update to a library that kept the same soname,
   you can force it to use the older library version by copying the old
   library back somewhere, renaming the program (say to the old name plus
   ``.orig''), and then create a small ``wrapper'' script that resets the
   library to use and calls the real (renamed) program. You could place
   the old library in its own special area, if you like, though the
   numbering conventions do permit multiple versions to live in the same
   directory. The wrapper script could look something like this:
  #!/bin/sh
  export LD_LIBRARY_PATH=/usr/local/my_lib:$LD_LIBRARY_PATH
  exec /usr/bin/my_program.orig $*

   You can see the list of the shared libraries used by a program using
   ldd(1). So, for example, you can see the shared libraries used by ls
   by typing:
  ldd /bin/ls

   Generally you'll see a list of the sonames being depended on, along
   with the directory that those names resolve to. In practically all
   cases you'll have at least two dependencies:
   
     * /lib/ld-linux.so.N (where N is 1 or more, usually at least 2).
       This is the library that loads all other libraries.
     * libc.so.N (where N is 6 or more). This is the C library. Even
       other languages tend to use the C library (at least to implement
       their own libraries), so most programs at least include this one.
       
   Beware: do not run ldd on a program you don't trust; as is clearly
   stated in the ldd(1) manual, ldd works by calling the program
   directly; an untrusted program could execute unexpected code.
     _________________________________________________________________
   
Incompatible Libraries

   When a new version of a library is binary-incompatible with the old
   one the soname needs to change. There are four basic reasons that a
   library would cease to be binary compatible:
   
    1. The behavior of a function changes so that it no longer meets its
       original specification,
    2. Exported data items change (exception: adding optional items to
       the ends of structures is okay, as long as those structures are
       only allocated within the library).
    3. An exported function is removed.
    4. The interface of an exported function changes.
       
   If you can avoid these reasons, you can keep your libraries
   binary-compatible. Said another way, you can keep your Application
   Binary Interface (ABI) compatible if you avoid such changes. For
   example, you might want to add new functions but not delete the old
   ones. You can add items to structures but only if you can make sure
   that old programs won't be sensitive to such changes by adding items
   only to the end of the structure, only allowing the library (and not
   the application) to allocate the structure, making the extra items
   optional (or having the library fill them in), and so on. Watch out -
   you probably can't expand structures if users are using them in
   arrays.
     _________________________________________________________________
   
Dynamically Loaded (DL) Libraries

   Dynamically loaded (DL) libraries are libraries that are loaded at
   times other than during the startup of a program. They're particularly
   useful for implementing plugins or modules, because they permit
   waiting to load the plugin until it's needed. For example, the
   Pluggable Authentication Modules (PAM) system uses DL libraries to
   permit administrators to configure and reconfigure authentication.
   They're also useful for implementing interpreters that wish to
   occasionally compile their code into machine code and use the compiled
   version for efficiency purposes, all without stopping. This approach
   can be useful in implementing a just-in-time compiler or multi-user
   dungeon (MUD).
   
   In Linux, DL libraries aren't actually special from the point-of-view
   of their format; they are built as standard object files or standard
   shared libraries as discussed above. The main difference is that the
   libraries aren't automatically loaded at program link time or
   start-up; instead, there is an API for opening a library, looking up
   symbols, handling errors, and closing the library. C users will need
   to include the header file <dlfcn.h> to use this API.
   
   The interface used by Linux is essentially the same as that used in
   Solaris, which I'll call the ``dlopen()'' API. However, this same
   interface is not supported by all platforms; HP-UX uses the different
   shl_load() mechanism, and Windows platforms use DLLs with a completely
   different interface. If your goal is wide portability, you probably
   ought to consider using some wrapping library that hides differences
   between platforms. One approach is the glib library with its support
   for Dynamic Loading of Modules; it uses the underlying dynamic loading
   routines of the platform to implement a portable interface to these
   functions. You can learn more about glib at
   [36]http://developer.gnome.org/doc/API/glib/glib-dynamic-loading-of-mo
   dules.html. Since the glib interface is well-explained in its
   documentation, I won't discuss it further here. Another approach is to
   use libltdl, which is part of [37]GNU libtool. If you want much more
   functionality this, you might want to look into a CORBA Object Request
   Broker (ORB). If you're still interested in directly using the
   interface supported by Linux and Solaris, read on.
     _________________________________________________________________
   
dlopen()

   The dlopen(3) function opens a library and prepares it for use. In C
   its prototype is:
  void * dlopen(const char *filename, int flag);

   If filename begins with ``/'' (i.e., it's an absolute path), dlopen()
   won't search for a library. Otherwise, dlopen() will search for the
   library in the following order:
   
    1. A colon-separated list of directories in the user's LD_LIBRARY
       path environment variable.
    2. The list of libraries specified in /etc/ld.so.cache.
    3. /usr/lib, followed by /lib.
       
   In dlopen(), the value of flag must be either RTLD_LAZY, meaning
   ``resolve undefined symbols as code from the dynamic library is
   executed'', or RTLD_NOW, meaning ``resolve all undefined symbols
   before dlopen() returns and fail if this cannot be done''. RTLD_GLOBAL
   may be optionally or'ed with either value in flag, meaning that the
   external symbols defined in the library will be made available to
   subsequently loaded libraries. While you're debugging, you'll probably
   want to use RTLD_NOW; using RTLD_LAZY can create inscrutible errors if
   there are unresolved references. Using RTLD_NOW makes opening the
   library take slightly longer (but it speeds up lookups later); if this
   causes a user interface problem you can switch to RTLD_LAZY later.
   
   If the libraries depend on each other (e.g., X depends on Y), then you
   need to load the dependees first (in this example, load Y first, and
   then X).
   
   The return value of dlopen() is a ``handle'' that should be considered
   an opaque value to be used by the other DL library routines. dlopen()
   will return NULL if the attempt to load does not succeed, and you need
   to check for this. If the same library is loaded more than once with
   dlopen(), the same file handle is returned.
   
   If the library exports a routine named _init, then that code is
   executed before dlopen() returns. You can use this fact in your own
   libraries to implement initialization routines.
     _________________________________________________________________
   
dlerror()

   Errors can be reported by calling dlerror(), which returns a string
   describing the error from the last call to dlopen(), dlsym(), or
   dlclose(). One oddity is that after calling dlerror(), future calls to
   dlerror() will return NULL until another error has been encountered.
     _________________________________________________________________
   
dlsym()

   There's no point in loading a DL library if you can't use it. The main
   routine for using a DL library is dlsym(3), which looks up the value
   of a symbol in a given (opened) library. This function is defined as:
 void * dlsym(void *handle, char *symbol);

   the handle is the value returned from dlopen, and symbol is a
   NIL-terminated string. If you can avoid it, don't store the result of
   dlsym() into a void* pointer, because then you'll have to cast it each
   time you use it (and you'll give less information to other people
   trying to maintain the program).
   
   dlsym() will return a NULL result if the symbol wasn't found. If you
   know that the symbol could never have the value of NULL or zero, that
   may be fine, but there's a potential ambiguity otherwise: if you got a
   NULL, does that mean there is no such symbol, or that NULL is the
   value of the symbol? The standard solution is to call dlerror() first
   (to clear any error condition that may have existed), then call
   dlsym() to request a symbol, then call dlerror() again to see if an
   error occurred. A code snippet would look like this:
 dlerror(); /* clear error code */
 s = (actual_type) dlsym(handle, symbol_being_searched_for);
 if ((err = dlerror()) != NULL) {
  /* handle error, the symbol wasn't found */
 } else {
  /* symbol found, its value is in s */
 }
     _________________________________________________________________
   
dlclose()

   The converse of dlopen() is dlclose(), which closes a DL library. The
   dl library maintains link counts for dynamic file handles, so a
   dynamic library is not actually deallocated until dlclose has been
   called on it as many times as dlopen has succeeded on it. Thus, it's
   not a problem for the same program to load the same library multiple
   times.
     _________________________________________________________________
   
DL Library Example

   Here's an example from the man page of dlopen(3). This example loads
   the math library and prints the cosine of 2.0, and it checks for
   errors at every step (recommended):
    #include <stdio.h>
    #include <dlfcn.h>

    int main(int argc, char **argv) {
        void *handle;
        double (*cosine)(double);
        char *error;

        handle = dlopen ("/lib/libm.so", RTLD_LAZY);
        if (!handle) {
            fputs (dlerror(), stderr);
            exit(1);
        }

        cosine = dlsym(handle, "cos");
        if ((error = dlerror()) != NULL)  {
            fputs(error, stderr);
            exit(1);
        }

        printf ("%f\n", (*cosine)(2.0));
        dlclose(handle);
    }

   If this program were in a file named "foo.c", you would build the
   program with the following command:
    gcc -Wl,export-dynamic -o foo foo.c -ldl

   The ``-Wl,export-dynamic'' option isn't actually required, but you may
   sometimes find it useful. It is defined in ld(1): ``When creating an
   ELF file, [this option adds] all symbols to the dynamic symbol table.
   Normally, the dynamic symbol table contains only symbols which are
   used by a dynamic object. This option is needed for some uses of
   dlopen.'' Note that you could say ``-rdynamic'' instead of
   ``-Wl,export-dynamic'' if you only work with Linux systems, but
   according to the ELF documentation the ``-rdynamic'' flag doesn't
   always work for gcc on non-Linux systems.
     _________________________________________________________________
   
Miscellaneous

nm command

   The nm(1) command can report the list of symbols in a given library.
   It works on both static and shared libraries. For a given library
   nm(1) can list the symbol names defined, each symbol's value, and the
   symbol's type. It can also identify where the symbol was defined in
   the source code (by filename and line number), if that information is
   available in the library (see the -l option).
   
   The symbol type requires a little more explanation. The type is
   displayed as a letter; lowercase means that the symbol is local, while
   uppercase means that the symbol is global (external). Typical symbol
   types include T (a normal definition in the code section), D
   (initialized data section), B (uninitialized data section), U
   (undefined; the symbol is used by the library but not defined by the
   library), and W (weak; if another library also defines this symbol,
   that definition overrides this one).
   
   If you know the name of a function, but you truly can't remember what
   library it was defined in, you can use nm's ``-o'' option (which
   prefixes the filename in each line) along with grep to find the
   library name. From a Bourne shell, you can search all the libraries in
   /lib, /usr/lib, direct subdirectories of /usr/lib, and /usr/local/lib
   for ``cos'' as follows:
nm -o /lib/* /usr/lib/* /usr/lib/*/* \
      /usr/local/lib/* 2> /dev/null | grep 'cos$'

   Much more information about nm can be found in the nm ``info''
   documentation locally installed at [38]info:binutils#nm.
     _________________________________________________________________
   
Shared Libraries Can Be Scripts

   It's worth noting that the GNU loader permits shared libraries to be
   text files using a specialized scripting language instead of the usual
   library format. This is useful for indirectly combining other
   libraries. For example, here's the listing of /usr/lib/libc.so on one
   of my systems:
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

   For more information about this, see the texinfo documentation on ld
   linker scripts (ld command language). General information is at
   info:ld#Options and info:ld#Commands, with likely commands discussed
   in info:ld#Option Commands.
     _________________________________________________________________
   
GNU libtool

   If you're building an application that should port to many systems,
   you might consider using [39]GNU libtool to build and install
   libraries. GNU libtool is a generic library support script. Libtool
   hides the complexity of using shared libraries behind a consistent,
   portable interface. Libtool provides portable interfaces to create
   object files, link libraries (static and shared), link executables,
   debug executables, install libraries, install executables. It also
   includes libltdl, a portability wrapper for dynamically loading
   programs. For more information, see its documentation at
   [40]http://www.gnu.org/software/libtool/manual.html
     _________________________________________________________________
   
More Examples

   The following are more examples of all three approaches (static,
   shared, and dynamically loaded libraries). File libhello.c is a
   trivial library, with libhello.h as its header. File demo_use.c is a
   trivial caller of the library. This is followed by commented scripts
   (script_static and script_dynamic) showing how to use the library as a
   static and shared library. This is followed by demo_dynamic.c and
   script_dynamic, which show how to use the shared library as a
   dynamically loaded library.
     _________________________________________________________________
   
File libhello.c

/* libhello.c - demonstrate library use. */

#include <stdio.h>

void hello(void) {
  printf("Hello, library world.\n");
}
     _________________________________________________________________
   
File libhello.h

/* libhello.h - demonstrate library use. */


void hello(void);
     _________________________________________________________________
   
File demo_use.c

/* demo_use.c -- demonstrate direct use of the "hello" routine */

#include "libhello.h"

int main(void) {
 hello();
 return 0;
}
     _________________________________________________________________
   
File script_static

#!/bin/sh
# Static library demo

# Create static library's object file, libhello-static.o.
# I'm using the name libhello-static to clearly
# differentiate the static library from the
# dynamic library examples, but you don't need to use
# "-static" in the names of your
# object files or static libraries.

gcc -Wall -g -c -o libhello-static.o libhello.c

# Create static library.

ar rcs libhello-static.a libhello-static.o

# At this point we could just copy libhello-static.a
# somewhere else to use it.
# For demo purposes, we'll just keep the library
# in the current directory.

# Compile demo_use program file.

gcc -Wall -g -c demo_use.c -o demo_use.o

# Create demo_use program; -L. causes "." to be searched during
# creation of the program.  Note that this command causes
# the relevant object file in libhello-static.a to be
# incorporated into file demo_use_static.

gcc -g -o demo_use_static demo_use.o -L. -lhello-static

# Execute the program.

./demo_use_static
     _________________________________________________________________
   
File script_shared

#!/bin/sh
# Shared library demo

# Create shared library's object file, libhello.o.

gcc -fPIC -Wall -g -c libhello.c

# Create shared library.
# Use -lc to link it against C library, since libhello
# depends on the C library.

gcc -g -shared -Wl,-soname,libhello.so.0 \
    -o libhello.so.0.0 libhello.o -lc

# At this point we could just copy libhello.so.0.0 into
# some directory, say /usr/local/lib.

# Now we need to call ldconfig to fix up the symbolic links.

# Set up the soname.  We could just execute:
# ln -sf libhello.so.0.0 libhello.so.0
# but let's let ldconfig figure it out.

/sbin/ldconfig -n .

# Set up the linker name.
# In a more sophisticated setting, we'd need to make
# sure that if there was an existing linker name,
# and if so, check if it should stay or not.

ln -sf libhello.so.0 libhello.so

# Compile demo_use program file.

gcc -Wall -g -c demo_use.c -o demo_use.o

# Create program demo_use.
# The -L. causes "." to be searched during creation
# of the program; note that this does NOT mean that "."
# will be searched when the program is executed.

gcc -g -o demo_use demo_use.o -L. -lhello

# Execute the program.  Note that we need to tell the program
# where the shared library is, using LD_LIBRARY_PATH.

LD_LIBRARY_PATH="." ./demo_use
     _________________________________________________________________
   
File demo_dynamic.c

/* demo_dynamic.c -- demonstrate dynamic loading and
   use of the "hello" routine */


/* Need dlfcn.h for the routines to
   dynamically load libraries */
#include <dlfcn.h>

#include <stdio.h>

/* Note that we don't have to include "libhello.h".
   However, we do need to specify something related;
   we need to specify a type that will hold the value
   we're going to get from dlsym(). */

/* The type "simple_demo_function" describes a function that
   takes no arguments, and returns no value: */

typedef void (*simple_demo_function)(void);


int main(void) {
 const char *error;
 void *module;
 simple_demo_function demo_function;

 /* Load dynamically loaded library */
 module = dlopen("libhello.so", RTLD_LAZY);
 if (!module) {
   fprintf(stderr, "Couldn't open libhello.so: %s\n",
           dlerror());
   exit(1);
 }

 /* Get symbol */
 dlerror();
 demo_function = dlsym(module, "hello");
 if ((error = dlerror())) {
   fprintf(stderr, "Couldn't find hello: %s\n", error);
   exit(1);
 }

 /* Now call the function in the DL library */
 (*demo_function)();

 /* All done, close things cleanly */
 dlclose(module);
 return 0;
}
     _________________________________________________________________
   
File script_dynamic

#!/bin/sh
# Dynamically loaded library demo

# Presume that libhello.so and friends have
# been created (see dynamic example).

# Compile demo_dynamic program file into an object file.

gcc -Wall -g -c demo_dynamic.c

# Create program demo_use.
# Note that we don't have to tell it where to search for DL libraries,
# since the only special library this program uses won't be
# loaded until after the program starts up.
# However, we DO need the option -ldl to include the library
# that loads the DL libraries.

gcc -g -o demo_dynamic demo_dynamic.o -ldl

# Execute the program.  Note that we need to tell the
# program where get the dynamically loaded library,
# using LD_LIBRARY_PATH.

LD_LIBRARY_PATH="." ./demo_dynamic
     _________________________________________________________________
   
Other Information Sources

   Particularly useful sources of information about libraries include the
   following:
   
     * ``The GCC HOWTO'' by Daniel Barlow. In particular, this HOWTO
       discusses compiler options for creating libraries and how to query
       libraries. It covers information not covered here, and vice versa.
       This HOWTO is available through the Linux Documentation Project at
       [41]http://www.linuxdoc.org.
     * ``Executable and Linkable Format (ELF)'' by the Tool Interface
       Standards (TIS) committee (this is actually one chapter of the
       Portable Formats Specification Version 1.1 by the same committee).
       This provides information about the ELF format (it isn't specific
       to Linux or GNU gcc), and provides a great deal of detail on the
       ELF format. See
       [42]ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ELF.doc.tar.gz If
       you get the file from MIT, note that the format is unusual; after
       gunzipping and untarring, you'll get an ``hps'' file; just strip
       off the top and bottom lines and you'll get a printable Postscript
       file.
     * ``ELF: From the Programmer's Perspective'' by Hongjui Lu. This
       gives Linux and GNU gcc-specific information on ELF, and is
       available at
       [43]ftp://tsx-11.mit.edu/pub/linux/packages/GCC/elf.ps.gz.
     _________________________________________________________________
   
Copyright and License

   This document is Copyright (C) 2000 David A. Wheeler. It is covered by
   the GNU General Public License (GPL). You may redistribute it without
   cost. Interpret the document's source text as the ``program'' and
   adhere to the following terms:
   
     This program is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License as
     published by the Free Software Foundation; either version 2 of the
     License, or (at your option) any later version.
     
     This program is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
     General Public License for more details.
     
     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
     USA
     
   These terms do permit mirroring by other web sites, but please:
   
     * make sure your mirrors automatically get upgrades from the master
       site,
     * clearly show the location of the master site,
       [44]http://www.dwheeler.com/program-library, with a hypertext link
       to the master site, and
     * give me (David A. Wheeler) credit as the author.
       
   The first two points primarily protect me from repeatedly hearing
   about obsolete bugs. I do not want to hear about bugs I fixed a year
   ago, just because you are not properly mirroring the document. By
   linking to the master site, users can check and see if your mirror is
   up-to-date. I'm sensitive to the problems of sites which have very
   strong security requirements and therefore cannot risk normal
   connections to the Internet; if that describes your situation, at
   least try to meet the other points and try to occasionally sneakernet
   updates into your environment.
   
   By this license, you may modify the document, but you can't claim that
   what you didn't write is yours (i.e., plagiarism) nor can you pretend
   that a modified version is identical to the original work. Modifying
   the work does not transfer copyright of the entire work to you; this
   is not a ``public domain'' work in terms of copyright law. See the
   license for details, in particular noting that ``You must cause the
   modified files to carry prominent notices stating that you changed the
   files and the date of any change.'' If you have questions about what
   the license allows, please contact me. In most cases, it's better if
   you send your changes to the master integrator (currently David A.
   Wheeler), so that your changes will be integrated with everyone else's
   changes into the master copy.

References

   1. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN12
   2. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN25
   3. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN33
   4. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN43
   5. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN67
   6. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN73
   7. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN78
   8. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN94
   9. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN113
  10. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN126
  11. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN133
  12. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN149
  13. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN152
  14. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN158
  15. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN161
  16. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN168
  17. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN170
  18. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN178
  19. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN184
  20. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN189
  21. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN192
  22. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN196
  23. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN200
  24. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN204
  25. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN208
  26. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN212
  27. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN216
  28. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN220
  29. file://localhost/export/sunsite/users/gferg/work/00_Program-Library-HOWTO.html#AEN233
  30. http://www.gnu.org/software/libtool/libtool.html
  31. http://developer.gnome.org/doc/API/glib/glib-dynamic-loading-of-modules.html
  32. http://www.dwheeler.com/program-library
  33. http://www.linuxdoc.org/
  34. info:standards#Directory_Variables
  35. http://www.pathname.com/fhs
  36. http://developer.gnome.org/doc/API/glib/glib-dynamic-loading-of-modules.html
  37. http://www.gnu.org/software/libtool/libtool.html
  38. info:binutils#nm
  39. http://www.gnu.org/software/libtool/libtool.html
  40. http://www.gnu.org/software/libtool/manual.html
  41. http://www.linuxdoc.org/
  42. ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ELF.doc.tar.gz
  43. ftp://tsx-11.mit.edu/pub/linux/packages/GCC/elf.ps.gz
  44. http://www.dwheeler.com/program-library
  Linux and Psion HOWTO
  Hans Kugler, der.hans@LuftHans.com
  v0.0.6, Nov 1999

  This document describes how to use Psion palmtops with Linux, but does
  not cover running Linux on a Psion palmtop. See the Linux 7k project
  <http://www.calcaria.net/> for that.
  ______________________________________________________________________

  Table of Contents


  1. About this HOWTO

     1.1 Introduction
     1.2 This Document
     1.3 Mailing List
     1.4 Copyright notice and disclaimer

  2. General Information

     2.1 What is a Psion
     2.2 Psion models
     2.3 Psion Availability

  3. Sharing data between the Psion and Linux

     3.1 Hardware connectivity options
        3.1.1 Serial cable
        3.1.2 IrDA
        3.1.3 Builtin programs
     3.2 Programs for connectivity
        3.2.1 plptools
        3.2.2 kpsion
        3.2.3 p3nfs/p5nfs
        3.2.4 ncp
     3.3 Linux utilities
        3.3.1 Psiconv
        3.3.2 Psion SDK
     3.4 Psion utilities
        3.4.1 hermes
        3.4.2 perl
        3.4.3 python
        3.4.4 E_Shell
        3.4.5 c2f

  4. Series 3

     4.1 Further Information
     4.2 Programs for connectivity
        4.2.1 p3nfs/p5nfs
     4.3 Psion utilities
        4.3.1 nfsc
     4.4 Informational Web Pages
        4.4.1 Disassembling a Series 3a (in German only)


  ______________________________________________________________________

  1.  About this HOWTO



  1.1.  Introduction


  Psion has been making PDA's for years. This document will initially
  concentrate on the newer Series 5* models, e.g. Series 5, Series 5mx
  and Series 5mx PRO, but I hope to eventually include info about using
  older models such as the Series 3* with Linux.


  1.2.  This Document


  The latest version of this document can be found at
  <http://home.pages.de/~lufthans/unix/docs/HOWTO/psion-HOWTO.html> and
  will hopefully be included in the Linux Documentation Project (LDP
  <http://www.LinuxDoc.org/>).

  Please send updates, corrections or suggestions to psion@LuftHans.com.


  1.3.  Mailing List


  There is a mailing list dedicated to using Psions with Linux and
  developing tools to enhance communication between them.

  To subscribe, send a message to majordomo@geekstuff.co.uk, containing
  the message "subscribe Linux-Psion".

  There is also a mailing list dedicated to porting Linux to the Psion
  5* models at linux-7110@redhat.com


  1.4.  Copyright notice and disclaimer


  (c) 1999 Hans Kugler

  This document may be distributed under the terms set forth in the LDP
  license at http://www.linuxdoc.org/COPYRIGHT.html
  <http://www.linuxdoc.org/COPYRIGHT.html>.

  This document is provided ``AS IS'', with no express or implied
  warranties. Use the information in this document at your own risk.


  2.  General Information



  2.1.  What is a Psion


  Psion is a powerful Personal Digital Assistant (PDA) with pen-based
  touch screen as well as keyboard. There are several models. This HOWTO
  currently only covers the Series 5* models, e.g. Series 5, Series 5mx
  and Series 5mxPro.



  2.2.  Psion models


  There are several models of Psion PDAs. All have a foldout case where
  the screen is in the cover and opening the Psion causes the keyboard
  to jut out to a more usable position. They also feature the instant on
  and instant off capabilities of the EPOC operating system.

  Psion 3* are older PDAs that still have a lot of functionality and
  still get sold new due to their meeting needs and being lower cost.
  This HOWTO doesn't currently cover the Psion 3* series.

  Psion 5* has two main product lines with each having two models. The
  Psion series 5 has a green limited edition counterpart with no
  functional difference between itself and the standard Series 5. The
  series 5mxPro, however, has some fundamental differences from the
  Series 5mx.

  All four of the Series 5* products have: compact flash, serial port,
  keyboard and stylus (for the touchscreen). They all operate on 2 AA
  batteries and have a backup battery to maintain state when changing
  out the main batteries. Check out
  <http://www.aha.ru/~akaev/english/indexe.htm> to take a tour of a
  dissected Series 5 classic.

  Both of the Series 5 models as well as the Series 5mx have system ROMs
  where the EPOC operating system is stored. After boot they operate out
  of the RAM (8MB for the Series 5 models and 16MB for the Series 5mx).
  The Series 5mxPro, however, has no ROM and operates entirely out of
  its 24MB of RAM. This enables software upgrades to the Series 5mxPro,
  whereas the other 3 models must exchange hardware to update EPOC.

  Psion recently released the Series 7, which is set to compete against
  the subnotebook class of PC, but running EPOC.

  There are rumors of a Series 6 coming out before the end of 1999. No
  formal indication of what type of product the Series 6 will be.


  2.3.  Psion Availability


  Psion products are no longer available at retail stores in the US.
  They are available from retail shops in Europe as well as through mail
  order. Psion maintains a list of mail order
  <http://www.psion.com/resellers/index.html> firms by country on their
  web site.


  3.  Sharing data between the Psion and Linux



  3.1.  Hardware connectivity options


  The Psions have both serial and infra red ports. Either can be used
  for connectivity, but most connectivity programs currently only have
  features for the serial port connection.


  3.1.1.  Serial cable


  Armin Podtschaske x-rayed the "honda" connector. His page
  <http://home.t-online.de/home/armin.podtschaske/pocci.htm> has an
  explanation of the pin out in German.

  Here it is for those who don't speak German :).

  Pin 1 is on the top and pin 15 is on the bottom. Only pins 2 through 8
  and 15 are connected.
  o  Pin 2: RTS

  o  Pin 3: DTR

  o  Pin 4: TXD

  o  Pin 5: DSR

  o  Pin 6: DCD

  o  Pin 7: CTS

  o  Pin 8: RXD

  o  Pin 15: GND - Signal and Power ground

  o  Frame: GND - Shield frame ground


  3.1.2.  IrDA


  See the IrDA HOWTO <http://www.LinuxDoc.org/HOWTO/IR-
  HOWTO-6.html#ss6.6> for information about using the Linux IrDA driver
  with a Psion. It is possible to beam files from Psion 5 (mx) via
  Linux-IrDA to a Linux System.  The irda-utils include a special client
  psion5.c which can beam files between them.


  3.1.3.  Builtin programs


  There are two builtin software methods to use the communications
  ports. The first is the remote link, <ctrl>-l from the main file menu,
  which can be set to serial, infrared or off.

  EPOC also provides the program comms. The remote link must be set to
  off for the comms program to have access to the serial port.


  3.2.  Programs for connectivity



  3.2.1.  plptools



     Description
        plptools <http://www.gumbley.demon.co.uk/plptools.html> (current
        releases from Matt Gumbley) was originally developed by Fritz
        Elfert, who had merged plp and ``p3nfs/p5nfs''. plptools is
        currently being worked on by members of the Linux-Psion <linux-
        psion@geekstuff.co.uk> mailing list.

        plptools comprises of 3 different programs. ncpd provides a
        socket connection to the Psion. plpnfsd provides mounted
        filesystem access to the Psion and plpftp provides ftp access to
        the Psion.

        See  <ftp://ftp.to.com/pub/psion/> for Fritz' original releases.


     Usage
        ncpd [-V] [-v logclass] [-d] [-p <port>] [-s <device>] [-b
        <baudrate>]
        plpnfsd [-v] [-V] [-p port] [-d mountdir] [-u user]

        First start ncpd get it to listen on a port (7501 by default)
        for connection requests. Then, start either plpnfsd or plpftp.
        plpnfsd defaults to mount the Psion under /mnt/psion.



  3.2.2.  kpsion



     Description
        kpsion
        <ftp://ftp.cs.unm.edu/mirrors/kde/unstable/apps/utils/kpsion-0.1.tar.gz>
        is available under unstable/apps/utils/
        <ftp://ftp.cs.unm.edu/mirrors/kde/unstable/apps/utils/> at your
        favorite KDE mirror.

        It provides a method to use kfm (KDE File Manager) to directly
        access files on the Psion via a serial link. Psion files can be
        opened by using 'psion:' or 'epoc:' URLs. It uses ncpd from the
        plptools package, which must be running to use kpsion, to handle
        the serial connection.

        kpsion also has a Psion Word->HTML/Text viewer/ converter built
        from psiconv to allow viewing documentation created with Psion
        Word under Linux.

        kpsion is currently ALPHA support for connecting to a Psion
        Series 5*. It is only available in source and only builds
        against KDE 1.1 and KDE 1.2. Please read the README and INSTALL
        files that come with the tarball.



  3.2.3.  p3nfs/p5nfs



     Description

        p3nfs <http://www.koeniglich.de/> mounts the psion drives over
        the serial cable at /psion.stand/mnt, by default.



  3.2.4.  ncp



     Description
        Matt Gumbley originally started ncp
        <http://www.gumbley.demon.co.uk/ncp.html> for use with his Psion
        Series 3. Now that he's working on ``plptools'', you should use
        that :). However, ncp might still be of interest to users of a
        Psion Series 3, which this HOWTO doesn't cover :). Matt's ncp
        page also has information about the plp protocol.



  3.3.  Linux utilities



  3.3.1.  Psiconv



     Description
        Psiconv <http://huizen.dds.nl/~frodol/psiconv/> translates Psion
        Word documents to HTML (3.2 or 4.0) or plain text.



  3.3.2.  Psion SDK



     Description
        The EPOC SDK works on Linux via WINE, see Olaf Flebbe's web page
        <http://www.linuxstart.com/~oflebbe/sdk/> for instructions on
        how to get it working.



  3.4.  Psion utilities



  3.4.1.  hermes



     Description
        hermes <http://www.iota.demon.co.uk/psion/hermes/hermes.html> is
        a fully featured vt100 emulator.



  3.4.2.  perl



     Description
        Olaf Flebbe has perl
        <http://www.linuxstart.com/~oflebbe/perl/perl5.html> running
        under EPOC.



  3.4.3.  python



     Description
        Duncan Booth has python <http://dales.rmplc.co.uk/Duncan/>
        running under EPOC.



  3.4.4.  E_Shell



     Description
        E_Shell <http://www.epocworld.com/downloads/progs/e-shell.html>
        is a DOS-like shell environment. It provides ways to launch
        programs from a command line; to check for file system
        corruption; to create, edit and display plain text files; to
        check on currently active processes and threads.
  3.4.5.  c2f



     Description
        c2f <http://home.pages.de/~lufthans/unix/packages/> converts the
        Psion contact file to a comma delimited format.



  4.  Series 3



  4.1.  Further Information


  As I said earlier, this HOWTO doesn't cover the Series 3 ( e.g.
  3/3a/3c/3mx/Sienna ), however, as I run into information, I will try
  to place it here anyway. This section will probably never be organized
  (unless someone else keeps it uptodate), but it still might contain
  useful information.


  4.2.  Programs for connectivity



  4.2.1.  p3nfs/p5nfs



     Description
        p3nfs <http://www.koeniglich.de/>, referenced ``above'' mounts
        the psion drives over the serial cable at /psion.stand/mnt, by
        default.



  4.3.  Psion utilities



  4.3.1.  nfsc



     Description
        nfsc <http://www.koeniglich.de/> is a vt100 emulator.



  4.4.  Informational Web Pages



  4.4.1.  Disassembling a Series 3a (in German only)


  Zerlegeanleitung Psion Serie 3a <http://www.home.unix-
  ag.org/fionn/d/Psion/Inside.html>



  Qmail VMailMgr and Courier-Imap HOWTO
  Dan Kuykendall <dan@kuykendall.org>
  v1.4, 23 April 2000

  This document is about building a mail server that will support vir
  tual domain hosting and provide smtp, pop3 and imap services,   using
  a powerful alternative to sendmail.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 What is Qmail and why should I use it?
     1.2 What is VMailMgr and why should I use it?
     1.3 What is Courier-imap and why should I use it?
     1.4 Description of the components
     1.5 Working configurations
     1.6 History
     1.7 New versions
     1.8 Comments
     1.9 Version History
     1.10 Copyrights and Trademarks
     1.11 Acknowledgements and Thanks

  2. Component installation

     2.1 Preparations
        2.1.1 Get source rpms
        2.1.2 Get binary rpms
        2.1.3 Get tarred sources (for non-RPM users)
     2.2 Install support packages
        2.2.1 Install with RPMS
           2.2.1.1 Compiling SRC.RPM's
           2.2.1.2 Installing RPM's
        2.2.2 Install with source
     2.3 Install Qmail
        2.3.1 Install with RPMS
           2.3.1.1 Compiling SRC.RPM's
           2.3.1.2 Installing RPM's
        2.3.2 Install with source
     2.4 Install Courier-imap
        2.4.1 Install with RPMS
           2.4.1.1 Compiling SRC.RPM's
           2.4.1.2 Installing RPM's
        2.4.2 Install with source
     2.5 Install VMailMgr
        2.5.1 Install with RPMS
           2.5.1.1 Compiling SRC.RPM's
           2.5.1.2 Installing RPM's
        2.5.2 Install with source

  3. Putting it all together

     3.1 Basic Qmail config
     3.2 Tell Qmail to use VMailMgr for authentication
     3.3 Setup Courier-imap for VMailMgr
     3.4 Setup virtual domain with VMailMgr
     3.5 Starting the daemons
     3.6 Some considerations left
     3.7 Known bugs
     3.8 The final word



  ______________________________________________________________________

  1.  Introduction

  Before you start reading: I am not a native speaker, so there are
  probably spelling/grammatical errors in this document. Feel encouraged
  to inform me of mistakes.

  1.1.  What is Qmail and why should I use it?

  Here is the authors (Dan Bernstein) blurb:

  Qmail is a secure, reliable, efficient, simple message transfer agent.
  It is meant as a replacement for the entire sendmail-binmail system on
  typical Internet-connected UNIX hosts.

  Secure: Security isn't just a goal, but an absolute requirement. Mail
  delivery is critical for users; it cannot be turned off, so it must be
  completely secure. (This is why I started writing qmail: I was sick of
  the security holes in sendmail and other MTAs.)

  Reliable: qmail's straight-paper-path philosophy guarantees that a
  message, once accepted into the system, will never be lost. qmail also
  supports maildir, a new, super-reliable user mailbox format. Maildirs,
  unlike mbox files and mh folders, won't be corrupted if the system
  crashes during delivery. Even better, not only can a user safely read
  his mail over NFS, but any number of NFS clients can deliver mail to
  him at the same time.

  Efficient: On a Pentium under BSD/OS, qmail can easily sustain 200000
  local messages per day---that's separate messages injected and
  delivered to mailboxes in a real test! Although remote deliveries are
  inherently limited by the slowness of DNS and SMTP, qmail overlaps 20
  simultaneous deliveries by default, so it zooms quickly through
  mailing lists. (This is why I finished qmail: I had to get a big
  mailing list set up.)

  Simple: qmail is vastly smaller than any other Internet MTA. Some
  reasons why: (1) Other MTAs have separate forwarding, aliasing, and
  mailing list mechanisms. qmail has one simple forwarding mechanism
  that lets users handle their own mailing lists. (2) Other MTAs offer a
  spectrum of delivery modes, from fast+unsafe to slow+queued. qmail-
  send is instantly triggered by new items in the queue, so the qmail
  system has just one delivery mode: fast+queued. (3) Other MTAs
  include, in effect, a specialized version of inetd that watches the
  load average.  qmail's design inherently limits the machine load, so
  qmail-smtpd can safely run from your system's inetd.

  Replacement for sendmail: qmail supports host and user masquerading,
  full host hiding, virtual domains, null clients, list-owner rewriting,
  relay control, double-bounce recording, arbitrary RFC 822 address
  lists, cross-host mailing list loop detection, per-recipient
  checkpointing, downed host backoffs, independent message retry
  schedules, etc. In short, it's up to speed on modern MTA features.
  qmail also includes a drop-in ``sendmail'' wrapper so that it will be
  used transparently by your current UAs.

  1.2.  What is VMailMgr and why should I use it?

  VMailMgr is:

  A password checking interface between qmail-popup and qmail-pop3d
  which replaces the usual checkpassword, as well as an authentication
  module for Courier IMAP, that provide access to the virtual mailboxes
  by one of three methods:

    IP-based virtual server access (invisible to the POP3 user)

    username-based access (username-virtualuser)

    hostname-based access (virtualuser@virtual.host or
     virtualuser:virtual.host)

  You should use it if:

  You prefer to have the users manage their own domains email accounts,
  and store their email in their own home dir.  (This makes setting up
  disk space quotas much easier)

  1.3.  What is Courier-imap and why should I use it?

  Courier-IMAP is:

  A server that provides IMAP access to Maildir mailboxes. This IMAP
  server does NOT handle traditional mailbox files (/var/spool/mail, and
  derivatives), it was written for the specific purpose of providing
  IMAP access to Maildirs.

  You should use it because:

  By default Qmail uses the newer more efficient Maildir format for
  storing email, and Courier-imap is the only imap server I am aware of
  that supports Maildir.  So in short, if you use Qmail, and want imap
  support, you have to use it.

  1.4.  Description of the components

  The email system you hopefully will get after having read this HOWTO
  is composed of several parts, the patched Qmail rpms are key to using
  this document. I recommend using the software versions I tried, they
  will probably compile without many problems and result in a fairly
  stable daemon. If you are courageous, you can try to compile all the
  latest-stuff-with-tons-of-new-features, but  don't blame me if
  something fails ;-). However, you may report other working
  configurations to be included in future versions of this document. All
  of the steps were tested on a RedHat Linux 6.2 box, so the HOWTO is
  somewhat specific, but you should be able to use it for other linux
  distributions as well.

  You do not necessarily have to install in all components. I tried to
  structure this HOWTO so that you can skip the parts you are not
  interested in.

  The document is neither a user manual to Qmail, VMailMgr nor Courier-
  imap. Its prime intention is to save email admins some headaches when
  installing their server and to do my little contribution to the linux
  community.

  1.5.  Working configurations

  Though this document is new, I am pretty confident that it can help
  you get your email system up and running.  Combinations that work for
  me are:

    RedHat 6.2, Linux 2.2.14, Qmail 1.03+patches-12, VMailMgr 0.96.6,
     Courier-imap 0.31

    Mandrake 7.0, Linux 2.2.13, Qmail 1.03+patches-12, VMailMgr 0.96.6,
     Courier-imap 0.31



  1.6.  History

  This document was started on April 18, 2000 by Dan Kuykendall after
  several installs of Qmail and VMailMgr.  Then even more setups when
  Courier-imap support was ready.

  1.7.  New versions

  The newest version of this can be found on my homepage
  <http://www.clearrivertech.com/linux/HOWTO> as SGML source, as HTML
  and as TEXT.  Other versions may be found in different formats at the
  LDP homepage  <http://www.linuxdoc.org/>.

  1.8.  Comments

  Comments on this HOWTO may be directed to the author Dan Kuykendall
  (dan@kuykendall.org <mailto:dan@kuykendall.org>).

  1.9.  Version History

  v0.1 (April 18, 2000)


    Preview version, wasn't in HOWTO format.

  v1.0 (April 18, 2000)


    Minor corrections.

    Added details and put into HOWTO format.

  v1.1 (April 19, 2000)


    Minor corrections.

    Restructured RPM install step.

    Added source compile and install steps.

  v1.2 (April 19, 2000)


    Minor corrections.

    Fixed source compile locations and install steps.

    Added source compile and install steps.

  v1.3 (April 19, 2000)


    Minor corrections.

    Built proper SGML version.

  v1.4 (April 23, 2000)


    Updated the Courier-IMAP setup information for new VMailMgr
     version.

    Switched the license to the GNU FDL.


    Other minor additions and corrections.

  1.10.  Copyrights and Trademarks

  Copyright (c)  Dan Kuykendall.  Permission is granted to copy,
  distribute and/or modify this document under the terms of the GNU Free
  Documentation License, Version 1.1 or any later version published by
  the Free Software Foundation

  A copy of the license is available at GNU Free Documentation License
  <http://www.gnu.org/copyleft/fdl.txt>.

  1.11.  Acknowledgements and Thanks

  Thanks to everyone that gave comments as I was writing this. This
  includes Bruce Guenter and other members of the vmailmgr-discuss list.

  2.  Component installation

  2.1.  Preparations

  You have two options

    Get and compile source rpms.  This has the benefit of being able to
     review the source before compiling, and compiling for your specific
     setup.

    Or simply get the binary rpms.  This has the benefit of simplicity,
     and not having to worry about having the necessary libraries
     installed.

     I recommend using Bruce Guenter's rpm releases, since they are well
     patched, and its what I used for building my systems.

  2.1.1.  Get source rpms

  You will need:

    ucspi-tcp-0.88-1.src.rpm -  <http://em.ca/~bruceg/rpms/ucspi-tcp/>

    daemontools-0.70-1.src.rpm -
     <http://em.ca/~bruceg/rpms/daemontools/>

    supervise-scripts-2.4-1.src.rpm -  <http://em.ca/~bruceg/supervise-
     scripts/>

    qmail-1.03+patches-12.src.rpm -
     <http://em.ca/~bruceg/qmail+patches/>

    vmailmgr-0.96.6-1.src.rpm -  <http://em.ca/~bruceg/vmailmgr/>

    courier-imap-0.31.tar.gz -  <http://www.inter7.com/courierimap/>

     For Courier-imap you must build the source rpm from the tar file
     (instructions will follow).

  2.1.2.  Get binary rpms

  Qmail does not come in binary form. Such packages are explicitly
  disallowed by the author of Qmail, and frustrating as it may be, I
  understand his reasoning.

  Courier-imap does not come in binary form, unless you want to use the
  one I built. If you want mine, visit
  <http://www.clearrivertech.com/linux/HOWTO/supportfiles/>.

  VMailMgr does not come in binary form that supports Courier-imap,
  unless you want to use the one I built. If you want mine, email me,
  and I will send it.

    ucspi-tcp-0.88-1.i386.rpm -  <http://em.ca/~bruceg/rpms/ucspi-tcp/>

    daemontools-0.70-1.i386.rpm -
     <http://em.ca/~bruceg/rpms/daemontools/>

    supervise-scripts-2.4-1.i386.rpm -
     <http://em.ca/~bruceg/supervise-scripts/>

    qmail-1.03+patches-12.src.rpm -
     <http://em.ca/~bruceg/qmail+patches/>

    vmailmgr-0.96.6-1.src.rpm -  <http://em.ca/~bruceg/vmailmgr/>

    courier-imap-0.31.tar.gz -  <http://www.inter7.com/courierimap/>

     For Courier-imap you must build the binary rpm from the tar file
     (instructions will follow) or email me for my binary rpm.

  2.1.3.  Get tarred sources (for non-RPM users)

  If your system does not have, or you do not use RPMS, you can install
  from source.

    ucspi-tcp-0.88.tar.gz -  <http://cr.yp.to/ucspi-tcp/ucspi-
     tcp-0.88.tar.gz>

    daemontools-0.70.tar.gz -
     <http://cr.yp.to/daemontools/daemontools-0.70.tar.gz>

    supervise-scripts-2.4.tar.gz -  <http://em.ca/~bruceg/supervise-
     scripts/>

    qmail-1.03.tar.gz -  <http://cr.yp.to/software/qmail-1.03.tar.gz>
     (*)

    vmailmgr-0.96.6.tar.gz -  <http://em.ca/~bruceg/vmailmgr/>

    courier-imap-0.31.tar.gz -  <http://www.inter7.com/courierimap/>


       (*) There may be minor differences in these instructions due to the
       use of the standard Qmail package. Please review the documentation for
       Qmail and VMailMgr if any of the files deviates from my instructions.


  2.2.  Install support packages

  2.2.1.  Install with RPMS

  2.2.1.1.  Compiling SRC.RPM's

  Simply run the following command for each package

  rpm --rebuild <package.src.rpm>


  -Example-



  ______________________________________________________________________
    rpm --rebuild ucspi-tcp-0.88-1.src.rpm
    rpm --rebuild daemontools-0.70-1.src.rpm
    rpm --rebuild supervise-scripts-2.4-1.src.rpm
  ______________________________________________________________________



  2.2.1.2.  Installing RPM's

  If you compiled the source rpms, the binaries will be located in
  /usr/src/redhat/RPMS/i386/ or something similar.

  Simply run the following command for each package

  rpm -ivh <location>/<package.i386.rpm>



  -Example-

  ______________________________________________________________________
    rpm -ivh /usr/src/redhat/RPMS/i386/ucspi-tcp-0.88-1.i386.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/daemontools-0.70-1.i386.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/supervise-scripts-2.4-1.i386.rpm
  ______________________________________________________________________



  2.2.2.  Install with source

  Run the following commands for each package

    (As non-root user)
    tar zxf <package.tar.gz>
    cd <newly created dir>
    ./configure
    make
    (As root)
    make setup check (for ucspi-tcp and daemontools)
    or
    make install (for supervise-scripts)



  -Example-

  ______________________________________________________________________
    (As non-root user)
    tar zxf supervise-scripts-2.4.tar.gz
    cd supervise-scripts-2.4
    ./configure
    make
    (As root)
    make setup check or  make install
  ______________________________________________________________________



  2.3.  Install Qmail

  2.3.1.  Install with RPMS



  2.3.1.1.  Compiling SRC.RPM's

  After installing the support packages,
  Simply run the following command:

  rpm --rebuild <package.src.rpm>



  -Example-

  ______________________________________________________________________
    rpm --rebuild qmail-1.03+patches-12.src.rpm
  ______________________________________________________________________



  2.3.1.2.  Installing RPM's

  After compiling the source rpms, the binaries will be located in
  /usr/src/redhat/RPMS/i386/ or something similar.

  Simply run the following command for each package

  rpm -ivh <location>/<package.i386.rpm>



  -Example-

  ______________________________________________________________________
    rpm -ivh /usr/src/redhat/RPMS/i386/qmail-1.03+patches-12.i386.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/qmail-pop3d-1.03+patches-12.i386.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/qmail-qmqpd-1.03+patches-12.i386.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/qmail-qmtpd-1.03+patches-12.i386.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/qmail-smtpd-1.03+patches-12.i386.rpm
  ______________________________________________________________________



    * note start *
    - Remove sendmail and any dependant applications prior to installing Qmail
    - by running the following command for each package
    - rpm -e <packagename>*
    -
    - On my system I had to remove sendmail, so I typed
    - rpm -e sendmail
    * note end *



  2.3.2.  Install with source

  As of this writing Bruce Guenter has not released a tar.gz package of
  his patched qmail. So until Bruce does this, I am having you download
  the standard Qmail package, and forcing you to read the included
  INSTALL file.

  Installing the standard build may cause minor differnces in the
  config, one example that comes to mind is that the init scripts are
  named differently.  This should not cause too much confusion, I just
  want you to be aware.

  Run the following command

    (As non-root user)
    tar zxf <package.tar.gz>
    cd <newly created dir>
    (Now read the INSTALL file and follow the steps to install Qmail)


  -Example-

  ______________________________________________________________________
    (As non-root user)
    tar zxf qmail-1.03.tar.gz
    cd qmail-1.03
    vi INSTALL (Read and follow steps)
  ______________________________________________________________________



  2.4.  Install Courier-imap

  2.4.1.  Install with RPMS

  2.4.1.1.  Compiling SRC.RPM's

  Build the courier-imap rpms from the tar file rpm -ta courier-
  imap-0.31.tar.gz


    * note start *
    - This errors out if you compile as root, but if your not root you
    - wont have permissions to /usr/src/redhat. You will want to build as a
    - non-root user, so create a ".rpmmacros" file (for rpm v3 and later) in
    - your home directory containing the line "%_topdir /path/to/home/redhat".
    - Then create your own "redhat" directory containing all the subdirs that
    - /usr/src/redhat contains.
    - You should never build RPMs as root unless you have to.
    * note end *



  * I will mention again, that I have built the binaries, and you can
  get them at *
  *  <http://www.clearrivertech.com/linux/HOWTO/supportfiles/>. *


  2.4.1.2.  Installing RPM's

  After compiling the source rpms, the binary will be located in
  /usr/src/redhat/RPMS/i386/ or something similar.

  Simply run the following command for each package

    rpm -ivh <location>/<package.i386.rpm>



  -Example-

  ______________________________________________________________________
    rpm -ivh /usr/src/redhat/RPMS/i386/courier-imap-0.31-1.i386.rpm
  ______________________________________________________________________



  2.4.2.  Install with source

  Run the following command

    (As non-root user)
    tar zxf <package.tar.gz>
    cd <newly created dir>
    ./configure
    make
    (As root)
    make install



  -Example-

  ______________________________________________________________________
    (As non-root user)
    tar zxf courier-imap-0.31.tar.gz
    cd courier-imap-0.31
    ./configure
    make
    (As root)
    make install
  ______________________________________________________________________



  2.5.  Install VMailMgr

  2.5.1.  Install with RPMS

  2.5.1.1.  Compiling SRC.RPM's

  Simply run the following command

  rpm --rebuild <package.src.rpm>


  -Example-

  ______________________________________________________________________
    rpm --rebuild vmailmgr-0.96.6-1.src.rpm
  ______________________________________________________________________



  2.5.1.2.  Installing RPM's

  If you compiled the source rpm, the binaries will be located in
  /usr/src/redhat/RPMS/i386/ or something similar.

  Simply run the following command for each package

  rpm -ivh <location>/<package.i386.rpm>



  -Example-

  ______________________________________________________________________
    rpm -ivh /usr/src/redhat/RPMS/i386/vmailmgr-0.96.6-1.i386.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/VMailMgr-daemon-0.96.6-1.i386.rpm
  ______________________________________________________________________


  2.5.2.  Install with source

  Run the following commands

    (As non-root user)
    tar zxf <package.tar.gz>
    cd <newly created dir>
    ./configure
    make
    (As root)
    make install


  -Example-

  ______________________________________________________________________
    (As non-root user)
    tar zxf vmailmgr-0.96.6.tar.gz
    cd vmailmgr-0.96.6
    ./configure
    make
    (As root)
    make setup check or  make install
  ______________________________________________________________________


  That should do it.

  3.  Putting it all together

  3.1.  Basic Qmail config

  You will need to add your domains to the
  /var/qmail/control/virtualdomains file in the following format as is
  normal with qmail and VMailMgr.

    domain1.com:user1


  For more detailed setup and config documentation visit the Qmail web
  site <http://www.qmail.org> and the VMailMgr website
  <http://em.ca/~bruceg/VMailMgr/>

  3.2.  Tell Qmail to use VMailMgr for authentication

  By default qmail uses checkpassword for authentication, to tell Qmail
  to use VMailMgr for authentication type the following command:

    echo checkvpw > /var/qmail/control/checkpassword



  3.3.  Setup Courier-imap for VMailMgr

  Copy the VMailMgr auth libs to courier's directory


    cp /usr/bin/authvmailmgr /usr/lib/courier-imap/libexec/authlib/



  Edit /usr/lib/courier-imap/etc/imapd.config and add authvmailmgr as
  the first entry in AUTHMODULES


  For more detailed setup and config documentation visit the Courier-
  imap website  <http://www.inter7.com/courierimap/>

  3.4.  Setup virtual domain with VMailMgr

  With the user account that will be managing the domain go to their
  home dir and type:

    vsetup



  This will setup the users home dir with the necessary structure to
  handle incoming email. You will probably want to create a email
  account by typing


    vadduser emailuser



  For more detailed setup and config documentation visit the VMailMgr
  website  <http://em.ca/~bruceg/VMailMgr/>

  3.5.  Starting the daemons

  Start Qmail daemons

    /etc/rc.d/init.d/qmail start
    /etc/rc.d/init.d/pop3d start
    /etc/rc.d/init.d/smtp start
    /etc/rc.d/init.d/qmqpd start (optional)
    /etc/rc.d/init.d/qmtpd start (optional)



  Start VMailMgr daemon

    /etc/rc.d/init.d/vmailmgrd start



  Start Courier-imap damon

    /etc/rc.d/init.d/courier-imap start



  3.6.  Some considerations left

  Qmail and the Maildirs may cause some email apps that run locally to
  not work. Visit the Qmail website  <http://www.qmail.org> for details
  on email apps that have been patched to work with Maildirs.

  Courier-imap is not as widely used as Cyrus or UWash imap servers.  As
  such, you may suffer from minor incompatibilities. Courier-imap is
  extremely well written, and tries to comply with the imap definition
  even if it means some imap clients wont work well. For details visit
  the Courier-imap website  <http://www.inter7.com/courierimap/>.

  3.7.  Known bugs

  None yet.



  3.8.  The final word

  Im tired, and wonder if anyone will ever use this, but I'm happy its
  done.  I'm sure if you have read this far your tired too. Well, all I
  can hope is that you have Qmail, VMailMgr and Courier-imap working. If
  so, Enjoy!  If not, bummer!

  O.K. readers, you're done for today. Feel free to send me your
  feedback, eternal gratitude, flowers, ecash, cars, oil sources etc.



  Linux Quake HOWTO
  Bob Zimbinski bobz@mr.net
  v1.0.1.14, 30 August 1998

  This document explains how to install, run and troubleshoot Quake,
  QuakeWorld and Quake II on an Intel Linux system.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Feedback,Comments, Corrections
     1.2 Acknowledgments **
     1.3 Other Sources of Information
        1.3.1 Linux-Specific Quake Information **
        1.3.2 General Quake Information
        1.3.3 Linux Gaming Information

  2. Quake/Quakeworld

     2.1 Minimum Requirements
     2.2 Installing Quake
        2.2.1 Download the Necessary Files
        2.2.2 Create the Installation Directory ++
        2.2.3 Installing From a Quake CD ++
        2.2.4 DOS/Windows to Linux Install
        2.2.5 Shareware Version Install
     2.3 Adding the Linux Binaries
     2.4 Setting Permissions
     2.5 X11 Quake
     2.6 SVGAlib Quake
     2.7 GLQuake
        2.7.1 SVGAlib
        2.7.2 Glide
        2.7.3 Mesa
     2.8 Linux-Specific Command Line Options
     2.9 QuakeWorld **
        2.9.1 Installing the RPM packages ++
        2.9.2 Installing the tar.gz packages ++
        2.9.3 Running QuakeWorld ++
     2.10 Servers
     2.11 Mods & Addons
        2.11.1 Capture the Flag
        2.11.2 Mission Packs **
        2.11.3 Quake Tools

  3. Quake II

     3.1 Prerequisites
     3.2 Installing Quake II
        3.2.1 Download the Necessary Files
        3.2.2 Create the Installation Directory
        3.2.3 Installing from CD
        3.2.4 Windows to Linux install
        3.2.5 Installing the demo version **
     3.3 Adding the Linux Binaries
        3.3.1 Installing the RPM packages **
        3.3.2 Installing the tar.gz packages **
     3.4 Setting Permissions **
        3.4.1 Quake2.conf **
     3.5 The X Renderer
     3.6 The SVGAlib Renderer
     3.7 The OpenGL Renderer
        3.7.1 SVGAlib
        3.7.2 Glide
        3.7.3 Mesa
        3.7.4 lib3dfxgl.so
     3.8 The GLX Renderer
     3.9 Linux-Specific Command Line Options
     3.10 Quake II Servers
        3.10.1 Listen Servers
        3.10.2 Dedicated Servers
        3.10.3 Other Sources of Server Information
     3.11 Mods & Addons
        3.11.1 Client Side Mods
           3.11.1.1 Capture the Flag
        3.11.2 Server Side Mods
        3.11.3 Game Source
        3.11.4 Mission Packs **

  4. Related Software

     4.1 QStat
     4.2 XQF
     4.3 QuickSpy
     4.4 QPlug for Linux
     4.5 qkHacklib
     4.6 GiMd2Viewer
     4.7 QIPX
     4.8 Ice
     4.9 Q2getty
     4.10 rcon
     4.11 qlog ++
     4.12 Cheapo **
     4.13 qgraph **

  5. Troubleshooting/FAQs

     5.1 General
        5.1.1 OS difference considerations
        5.1.2 Glibc, RedHat 5.x, Debian 2 considerations
        5.1.3 My mouse doesn't work or seems to respond randomly.
        5.1.4 My Microsoft Intellimouse or Logitech MouseMan+ isn't working correctly.
        5.1.5 My mouse is "laggy" and seems much slower than under Windows.
        5.1.6 I have a Voodoo2, and, when I try to run with the gl renderer, it reports that I don't have a Voodoo card installed.
        5.1.7 When I'm playing any of the Quake games under SVGAlib or GL and press CTRL-C, the game exits and sometimes leaves my console in an unusable state.
        5.1.8 Sometimes when Quake/Quake II exits abnormally, it leaves my console unusable.
        5.1.9 squake/quake2 fails to start and says "
        5.1.10 Sometimes after  playing one of the Quake games in X, key repeat doesn't work any more.
        5.1.11 Quake/Quake II says "/dev/dsp : device not configured"
        5.1.12 GL Quake/Quake II run slower in Linux than in Windows. **
        5.1.13 How can I start a server and log off, then come back to it later? **
     5.2 Quake/QuakeWorld
        5.2.1 Quake dies at startup with a segmentation fault.
        5.2.2 What's the difference between
        5.2.3 When I run
     5.3 Quake II
        5.3.1 When I try to run Quake II with the GL renderer, it fails and says "LoadLibrary("ref_gl.so") failed: Unable to resolve symbol"
        5.3.2 Quake II fails with the message
        5.3.3 When I update the brightness while using the GL renderer, and hit "apply," nothing happens!
        5.3.4 Note about the 3.17 distribution
        5.3.5 When I run Quake II with
        5.3.6 Why can't I change to some of the SVGA modes that aree in the Quake II Video menu? **

  6. Tips & Tricks

     6.1 Running X and GL games without setuid
     6.2 Running SVGA and GL games from X
     6.3 Keeping the mouse inside the window in X
     6.4 3Dfx "tweak" settings work in Linux too
     6.5 The Poor Man's Server Browser
     6.6 Using

  7. Administrivia

     7.1 New Versions of This Document
     7.2 Other Formats of This Document
     7.3 Distribution Policy
     7.4 Revision History


  ______________________________________________________________________

  1.  Introduction

  Quake, QuakeWorld and Quake II are tremendously popular 3D action
  games developed by id Software.

  If you're not familiar with the Quake games, there are better places
  than this HOWTO to learn about the basics.  See section ``Other
  Sources of Information'' below for a list of some of these better
  places.

  This document assumes you have Linux up and running, and in some cases
  the X Window System as well.  X is not required to run these games,
  but it's a nice way to test a basic installation. If you are not
  running X, you may safely skip over any references to it.

  Sections of this document that were updated in the last revision have
  a ** after the section heading.  Sections updated in the revision
  prior to the last are marked with a ++.



  1.1.  Feedback,Comments, Corrections

  This document certainly does not contain everything there is to know
  about Linux Quake.  With your help, though, we can bring it closer to
  that ideal.  We want this HOWTO to be as complete and accurate as
  possible, so if you notice mistakes or omissions, please bring them to
  our attention.

  Questions, comments, or corrections should be sent to Bob Zimbinski
  (bobz@mr.net) or Mike Hallock (mikeh@medina.net).  Constructive
  criticism is welcome.  Flames are not.


  1.2.  Acknowledgments **

  The original version of this document was written by Brett A.Thomas
  (quark@baz.com) and Mike Hallock (mikeh@medina.net).  Bob Zimbinski
  (bobz@mr.net) rewrote and expanded the original document.

  Special thanks to the following people for bringing us Quake for
  Linux:

  o  John Carmack and the rest of id Software for these great games.

  o  Dave 'Zoid' Kirsch (zoid@idsoftware.com) for the Linux ports.

  o  Dave Taylor (ddt@crack.com) for starting this whole wacky Linux
     port business.

  o  Daryll Strauss (daryll@harlot.rb.ca.us) for the Linux glide ports.

  o  Brian Paul (brianp@elastic.avid.com) for the Mesa graphics library.

  o  David Bucciarelli (tech.hmw@plus.it) for the Mesa/glide driver.

  Thanks to the following people for contributions to this Howto:

  o  Mike Brunson (brunson@l3.net) for the vid_restart tip.

  o  Joey Hess (joey@kite.ml.org) for info on running svga & gl games
     from X


  o  Joe S. (jszabo@eden.rutgers.edu) for a steaming pile of suggestions

  o  Brad Lambert (bradl@dial.pipex.com) for the -noudp reminder.

  o  agx (gguenthe@iris.rz.uni-konstanz.de) for Quake installation info
     and pointing out QIPX.

  o  Derrik Pates (dmp8309@silver.sdsmt.edu) for making me think about
     security.

  o  Michael Dwyer (michael_dwyer@mwiworks.com) for the "OS
     considerations" ideas.

  o  Derek Simkowiak (dereks@kd-dev.com) for the Quake I CD installation
     procedure.

  o  sunstorm (sunstorm@glasscity.net) Quake Mission Pack 2 information.

  o  Neil Marshall (marshall@pssnet.com) for screen info.


  1.3.  Other Sources of Information



  1.3.1.  Linux-Specific Quake Information **


  o  LQ:Linux Quake & Utilites http://www.linuxquake.com/.

  o  Linux Quake Page http://captured.com/threewave/linux/

  o  QuakeWorld.net http://www.quakeworld.net


  1.3.2.  General Quake Information


  o  id Software http://www.idsoftware.com

  o  PlanetQuake http://www.planetquake.com

  o  QuakeWorld Central http://qwcentral.stomped.com

  o  3Dfx's GL Quake FAQ (somewhat out of date)
     http://www.3dfx.com/game_dev/quake_faq.html

  o  Farenheit 176 Console Command Listing
     http://www.planetquake.com/f176

  o  rec.games.computer.quake.* newsgroups


  1.3.3.  Linux Gaming Information


  o  LinuxGames http://www.linuxgames.com/

  o  The Linux Game Tome
     http://www.cs.washington.edu/homes/tlau/tome/linux-game.html


  2.  Quake/Quakeworld

  To install Quake on your Linux system, you'll need some flavor of the
  official Quake distribution from id.  This will be either the retail
  DOS/Windows CD-ROM that you bought at your favorite software store, or
  the shareware version you downloaded from the net (see ``below'' for
  details on acquiring the shareware version).   Alternatively, if
  you've already got Quake installed on a DOS/Windows machine, you can
  use the relevant files from that installation.


  2.1.  Minimum Requirements

  You will need, as a bare minimum, the following:


  o  A Pentium 90 or better (133 recommended) computer

  o  16 MB RAM (24 recommended)

  o  The Quake CD-ROM or the shareware version (quake106.zip)

  o  Linux kernel version 2.0.24 or later

  o  libc 5.2.18 or later

  o  One of the following:

  o  X11R5 or later (for xquake)

  o  SVGAlib 1.2.0 or later (for squake and glquake)

  o  30-80 megabytes free disk space (depends on how you install)

  o  Access to the root account of the machine you're installing on


  Optional:

  o  A supported soundcard

  o  A 3Dfx VooDoo Graphics or VooDoo2 3D graphics accelerator card.

  o  Mesa 2.6 or later (for glquake)


  2.2.  Installing Quake



  2.2.1.  Download the Necessary Files**

  All the necessary files for Linux Quake are available at id Software's
  ftp site, ftp.idsoftware.com.  This site can be quite busy at times,so
  you may want to use one of these mirror sites instead:

  o  ftp.cdrom.com/pub/idgames/idstuff (California, USA)

  o  ftp.gamesnet.net/idsoftware (California, USA)

  o  ftp.linuxquake.com/lqstuff (Michigan, USA)

  o  ftp.stomped.com/pub/mirror/idstuff (Minnesota, USA)

  o  mirrors.telepac.pt/pub/idgames (Lisbon, Portugal)

  o  download.netvision.net.il/pub/mirrors/idsoftware (Haifa, Israel)

  The Quake files mentioned in in this section are:

  o  Shareware Quake for Windows distribution
     ftp://ftp.idsoftware.com/idstuff/quake/quake106.zip

  o  X11 Quake binary
     ftp://ftp.idsoftware.com/idstuff/unsup/unix/quake.x11-1.0-i386-unknown-
     linux2.0.tar.gz

  o  SVGAlib Quake binary
     ftp://ftp.idsoftware.com/idstuff/unsup/squake-1.1-i386-unknown-
     linux2.0.tar.gz

  o  OpenGL/Mesa Quake binary
     ftp://ftp.idsoftware.com/idstuff/unsup/unix/glquake-0.97-i386-unknown-
     linux2.0.tar.gz

  o  Linux QuakeWorld clients (X11, SVGAlib and GL clients are all
     included in each package)

  o  libc5 tar.gz package
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-i386-unknown-
     linux2.0.tar.gz

  o  glibc tar.gz package
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-glibc-
     i386-unknown-linux2.0.tar.gz

  o  libc5 rpm package
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-1.i386.rpm

  o  glibc rpm package
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-glibc-1.i386.rpm


  o  Linux QuakeWorld server

  o  libc5 tar.gz package
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-i386-unknown-
     linux2.0.tar.gz

  o  glibc tar.gz package
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-glibc-
     i386-unknown-linux2.0.tar.gz

  o  libc5 rpm package
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-1.i386.rpm

  o  glibc rpm package
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-glibc-1.i386.rpm


  o  Capture the Flag client package
     ftp://ftp.cdrom.com/pub/quake/planetquake/threewave/ctf/client/3wctfc.zip

  Other software mentioned:

  o  lha archive utility
     ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.

  o  SVGAlib graphics library
     http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.tar.gz

  o  SVGAlib libc5
     binaryhttp://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar.gz

  o  Glide runtime libraries http://glide.xxedgexx.com/3DfxRPMS.html

  2.2.2.  Create the Installation Directory ++

  The first thing you'll need to do is decide where you  want to install
  Quake.  Lots of folks like to put it in /usr/games/quake.  Anal system
  administrator that I am, I choose to install anything that's not part
  of my Linux distribution under /usr/local.  So for me, Quake goes in
  /usr/local/games/quake.  If you choose to install somewhere else,
  please substitute the appropriate path wherever /usr/local/games/quake
  is mentioned.

  Note to Redhat users:  If you plan on installing QuakeWorld from the
  rpm packages, you should probably install Quake in
  /usr/local/games/quake, since the rpms install to this directory by
  default.

  So go ahead and create the directory you'll install Quake in, and cd
  to it.  The rest of these instructions will assume that this is your
  current directory.



            mkdir /usr/local/games/quake
            cd /usr/local/games/quake



  2.2.3.  Installing From a Quake CD ++

  If you're installing from a Quake CD-ROM, read on.  Otherwise you have
  permission to skip this section.

  There are at least two versions of the Quake CD in circulation.  I've
  got one from the early days that has Quake version 1.01 on it.  Iv'e
  seen other CDs that contain version 1.06.  You have 1.01 if you see
  files on your CD called quake101.1 and quake101.2.  If instead you see
  a file called resource.1, you have a newer CD.  Mount your Quake CD
  now and determine which version you've got.  In the example below,
  replace /dev/cdrom and /mnt/cdrom with the device file and mount point
  appropriate for your sysem:



            mount -t iso9660 /dev/cdrom /mnt/cdrom
            ls /mnt/cdrom



  o  If you have a resource.1 file on your CD, you can skip ahead to the
     next bullet.  For a version 1.01 CD, you'll need to download the
     Quake shareware package to update the .pak files after the
     installation.  The last bullet in this section explains this.


  o  Concatenate the two resource files from your CD to a single file on
     your hard disk:


            cat /mnt/cdrom/quake101.1 /mnt/cdrom/quake101.2 > resource.1


  o  Now continue on to the next paragraph, but when I refer to
     /mnt/cdrom/resource.1, you should use
     /usr/local/games/quake/resource.1 instead.



  o  Now it's time to extract the Quake files.  The resource.1 file on
     your CD is really an lha archive (lha is a file compression and
     archiving format like zip or tar).  We'll use the lha(1) command to
     extract it.  If lha is not already installed on your system, you
     can get it from
     ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.



            lha e /mnt/cdrom/resource.1



  When lha is done, your Quake directory will contain a bunch of new
  files.  A directory called id1/ will also be created.  The files in
  this directory are the only ones that are important for Linux Quake,
  so you can safely remove everything else.  If you're totally new to
  Quake, or even if you're not, you may want to hang on to the *.txt
  files.  On my system, I throw all the readmes that accumulate into a
  doc/ directory.  So:



            cd /usr/local/games/quake
            mkdir doc
            mv *.txt doc
            rm -f *



  o  If you installed from a version 1.01 CD, now you need to overwrite
     your id1/pak0.pak file with the one from the Quake shareware
     version.  Install the shareware version as described in ``Shareware
     Version Install'', only install it in some temporary directory so
     you don't overwrite your real Quake files.  When you've extracted
     all the shareware files, copy the id1/pak0.pak file from the
     temporary shareware directory to your /usr/local/games/quake/id1
     directory.  After that, you can erase the temporary shareware
     files.

  That's it for installing from the CD.  You can jump ahead to section
  "``Installing the Linux Binaries''" now.


  2.2.4.  DOS/Windows to Linux Install

  If you have Quake installed under Windows or DOS on a different
  machine, you can transfer the files in quake\id1\ to your Linux system
  via FTP or some other mechanism.  Keep in mind that the filenames on
  your Linux system must be in lower case for Quake to find them, so you
  may have to rename them after the transfer.  Also note that it may be
  necessary to delete your DOS/Win installation after you do this to
  remain in compliance with the terms of id's software license.  It's
  not my fault if you do something illegal.

  If your DOS/Win and Linux systems are on the same machine, you have
  two options: copy the files from your DOS/Windows partition to your
  Linux partition, or link to the necessary files from Linux.  Both
  options will work equally well.  You just save around 50 megabytes of
  disk space when you link instead of copy.

  Whatever you choose to do, start by cd'ing to your Quake directory and
  creating a new directory below it called id1:



            cd /usr/local/games/quake
            mkdir id1



  o  If you want to copy the files from your DOS/Windows partition, do
     something like this:



            cp /win95/games/quake/id1/*.pak id1



  o  To create links to your DOS/Windows Quake files instead, do this:



            cd id1
            ln -s /win95/games/quake/id1/*.pak .



  Replace /win95/games/quake with the correct path to your DOS/Windows
  partition and Quake installation directory.

  The Quake data files are now installed.  Move ahead to "``Installing
  the Linux Binaries''".


  2.2.5.  Shareware Version Install

  The single-episode shareware version of Quake is freely available for
  download from id's ftp site.  It has all the features of the full
  version, with a couple of major limitations:  You can't play
  QuakeWorld with it, and you can't play custom or modified levels.

  Installing the shareware version of Quake isn't really much different
  than installing from the CD.

  See section ``Download the Necessary Files'' for the location of the
  shareware distribution.  Download it and extract it to your Quake
  directory:


            cd /usr/local/games/quake
            unzip -L /wherever/you/put/it/quake106.zip



  Now you've got (among others) a file called resource.1 that's really
  an lha archive (lha is a file compression and archiving format like
  zip or tar).  We'll use the lha(1) command to extract it.  If lha is
  not already installed on your system, you can get it from
  ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.



            lha e resource.1



  When lha is done, your Quake directory will contain a bunch of new
  files.  A directory called id1/ will also be created.  The files in
  this directory are the only ones that are important for Linux Quake,
  so you can safely remove everything else.  If you're totally new to
  Quake, or even if you're not, you may want to hang on to the *.txt
  files.  On my system, I throw all the readmes that accumulate into a
  doc/ subdirectory.  So:



            cd /usr/local/games/quake
            mkdir doc
            mv *.txt doc
            rm -f *



  Now you're ready to install the Linux binaries.


  2.3.  Adding the Linux Binaries

  Decide which of the three flavors of Quake you'd like to install:

  o  X11 Quake allows you to run Quake in a window on your X desktop.
     It's the least exciting client, but it's a great, safe way to test
     your installation.

  o  Squake is the SVGAlib Quake client.  It runs full screen on your
     console.

  o  GLQuake is the OpenGL Quake client, the One True Way to play Quake
     if you have a 3Dfx accellerator card.

  Download the packages you want (see section ``Download the Necessary
  Files'') and extract them to your Quake directory like so:



            cd /usr/local/games/quake
            tar -xzf XXXX-i386-unknown-linux2.0.tar.gz


  2.4.  Setting Permissions

  Quake and QuakeWorld servers can be run by any user.  The Quake
  clients, however,  need access to your sound and graphics cards, which
  requires privileges that normal users don't have.  One (bad) way to
  deal with this is to always run Quake as root.  Responsible system
  administrators will cringe at this filthy suggestion.  Making the
  Quake binaries setuid root is a more acceptable solution.  Quake can
  then be run by regular users and still have the privileges it needs to
  access the sound and graphics devices.  Setuid presents a security
  risk, though.  A clever user could exploit a bug or security hole in
  Quake to gain root access to your system.  Of course, if you don't run
  a multi-user system, this is may not be a big concern.

  squake is the only Quake client that must be run with root
  permissions.  With a little work, you can run the X and GL clients
  without setuid.  ``Running X and GL games without setuid'' in the Tips
  and Tricks section tells how to make this work.

  If you plan to run squake, make it setuid root with the following
  commands:


            chown root squake
            chmod 4755 squake



  If you've decided it's ok to run quake.x11 and glquake setuid root on
  your system, you can repeat the above commands for these binaries as
  well.



  2.5.  X11 Quake

  If you installed the X11 client, now's a good time to try it out.  You
  may need to do further configuration for glquake and squake, but at
  this point quake.x11 should be ready to go.



            cd /usr/local/games/quake
            ./quake.x11



  If all is well, a small Quake window should appear with the first demo
  running in it.  You should hear sound effects and possibly music, if
  the CD is mounted.  If any of this fails to occur, please see the
  ``Troubleshooting'' section for help.


  2.6.  SVGAlib Quake

  Both squake and glquake require SVGAlib to run (glquake uses SVGAlib
  to process keyboard and mouse input, in case you're wondering).
  SVGAlib comes with most modern Linux distributions, and must be
  properly configured before squake or glquake will run correctly.

  libvga.config is SVGAlib's configuration file.  On most systems you'll
  find it in either /etc or /etc/vga.  Make sure the mouse, monitor, and
  video card settings in this file are correct for your system.  See the
  SVGAlib documentation for more details.

  If you don't already have SVGAlib on your system, download it from the
  location mentioned in ``the files section'' above.  If you have a
  RedHat 5.x or other glibc-based Linux distribution, see ``Glibc,
  RedHat 5.x, Debian 2 considerations'' in the Troubleshooting/FAQs
  section for important information about compiling libraries for use
  with Quake. A precompiled libc5 SVGAlib binary is available at
  http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar.gz
  for those who don't want to deal with the hassle of compiling for
  libc5.

  You should run squake from a virtual console.  It won't run from X
  unless you're root when you start it.  And running a game as the root
  user is something that should be avoided.  So if you're in X, do a
  CTRL+ALT+F1, login and then:



            cd /usr/local/games/quake
            ./squake



  ``Running SVGA and GL games from X'' in the Tips & Tricks section
  below explains how to launch SVGA and GL Quake from X without manually
  switching to a virtual console.


  2.7.  GLQuake

  Hardware-accelerated OpenGL Quake is Quake the way God intended it to
  be.  There is no substitute, and once you've experienced it there's no
  going back.

  To run glquake, you need a 3D card with the Voodoo, Voodoo2 or Voodoo
  Rush graphics chipset on it.  There are specific issues to be dealt
  with if you have a Voodoo Rush card, and I won't go into them now
  because frankly, I wouldn't know what I was talking about.  A future
  version of this HOWTO will cover Rush issues (If somebody wants to
  write about Voodoo Rush issues, I'll gladly include it here).

  The SVGAlib, Glide, and Mesa libraries must all be installed and
  configured properly on your system for glquake to work.  The following
  sections will very briefly cover what you need to do to get them
  going.

  Bernd Kreimeier's (bk@gamers.org) Linux 3Dfx HOWTO
  (http://www.gamers.org/dEngine/xf3D/howto/3Dfx-HOWTO.html) is good
  source for further information.

  The 3dfx.glide.linux newsgroup on the 3dfx news server (news.3dfx.com)
  is another good source of information about the intersection of Linux,
  glide, Mesa and Quake.


  2.7.1.  SVGAlib

  glquake uses SVGAlib to get input from the mouse and keyboard, so
  you'll need to configure it as outlined in section ``SVGAlib Quake''.



  2.7.2.  Glide

  Glide is a library that provides an API for programming 3Dfx based
  cards.  If you want the Mesa graphics library to use your 3Dfx card,
  you've gotta have it.

  The latest version of glide can always be found at
  http://glide.xxedgexx.com/3DfxRPMS.html.  Select the package(s)
  appropriate for your system, and install according to the instructions
  on the web page.

  Note that unless you download the 3Dfx device driver package in
  addition to the Glide library, you will only be able to run Glide
  applications (like GLQuake) as root.  Install the /dev/3dfx module and
  you can play GLQuake as a regular user.

  Once you have glide installed, try out the test program that comes
  with it.  Remember this program:  it's a good way to reset your
  display if you ever have a glide application (like GLQuake) crash and
  leave your screen switched off.  NOTE: run this test from a VC, not X!
  It's possible for the test app to lose mouse and keyboard focus in X,
  and then you'll have no way of shutting it down.



            /usr/local/glide/bin/test3Dfx



  Your screen should turn blue and prompt you to hit any key.  After you
  press a key you should be returned to the prompt.  3dfx.glide.linux on
  3dfx's news server (news.3dfx.com) is a great source of information
  for Linux glide-specific problems.


  2.7.3.  Mesa

  Once glide's installed, you need to install Mesa, a free OpenGL
  implementation by Brian Paul (brianp@elastic.avid.com).  Luckily, you
  won't have to look far, because Mesa 2.6 is included with the QLQuake
  & QuakeWorld binaries.  All you have to do is move it to the right
  place:



            cd /usr/local/games/quake
            cp libMesaGL.so.2.6 /usr/local/lib
            ldconfig



  If you want to upgrade Mesa to a more recent version (Mesa 3.0 is the
  most recent version as of this writing), you can download the latest
  from  ftp://iris.ssec.wisc.edu/pub/Mesa If you have a RedHat 5.x or
  other glibc-based Linux distribution, see ``Glibc, RedHat 5.x, Debian
  2 considerations'' in the Troubleshooting/FAQs section for important
  information about compiling libraries for Quake.

  After you've built it according to the instructions, you will have to
  do two things:

  o  Remove your old Mesa installation.  If you previously installed a
     libMesaGL.so.2.6 as described above, you must remove it or Quake
     may not use the new version.



            cd /usr/local/lib/
            rm -f libMesaGL.so.2*



  o  If the new Mesa has a major version number that's greater than 2,
     you need to create a link to it with the name libMesaGL.so.2:



            cd /usr/local/lib/
            ln -s /wherever/you/installed/it/libMesaGL.so.3.0 libMesaGL.so.2
            ldconfig



  Now switch to a VC (CTRL+ALT+F1)  and start glquake.



            cd /usr/local/games/quake
            ./glquake



  2.8.  Linux-Specific Command Line Options

  This section covers command line options that are specific to the
  Linux versions of Quake.  There are plenty of other Quake options, but
  they're beyond the scope of this HOWTO.  Check out some of the sites
  listed in section ``General Quake Information'' for this kind of
  information.


     -mem num
        Specify memory in megabytes to allocate (default is 8MB, which
        should be fine for most needs).


     -nostdout
        Don't do any output to stdout.  Use this if you don't want all
        the console output dumped to your terminal.


     -mdev device
        Mouse device, default is /dev/mouse


     -mrate speed
        Mouse baud rate, default is 1200
     -cddev device
        CD device, default is /dev/cdrom


     -mode num
        Use indicated video mode (squake only)


     -nokdb
        Don't initialize keyboard


     -sndbits 8 or 16
        Set sound bit sample size.  Default is 16 if supported.


     -sndspeed speed
        Set sound speed.  Usual values are 8000, 11025, 22051 and 44100.
        Default is 11025.


     -sndmono
        Set mono sound


     -sndstereo
        Set stereo sound (default if supported)


  2.9.  QuakeWorld **

  http://www.quakeworld.net says it better than I could:


       QuakeWorld is an Internet multi-player specific version of
       Quake.  While the original version of Quake can be played
       over the Internet, modem users - the majority of players,
       had less than satisfactory play. Symptoms like excessive lag
       - actions actually happening much later than you did them;
       packet loss - the game would freeze and resume several sec-
       onds later; and various other difficulties plagued users.
       After realizing how many people played Quake on the inter-
       net, and how many wanted to, but couldn't due to the play
       being unsatisfactory, John Carmack of id Software decided to
       create a version of Quake that was optimized for the average
       modem Internet player. This Internet specific version does
       only 1 thing, play deathmatch games over a TCP/IP network
       such as the Internet. It has no support for solo play, and
       you can't do anything with out connecting to a special
       server.


  You need the full, registered or retail version of Quake to play
  QuakeWorld, and a Linux QuakeWorld client.  QuakeWorld clients come in
  the same flavors (X11, SVGAlib and Mesa) as normal Quake, but they're
  all bundled together in one package, so you only need to download one
  file.  However, you've got four packages to choose from:

  o  a libc5 tar.gz package

  o  a glibc tar.gz package

  o  a libc5 rpm package

  o  a glibc rpm package

  Install just one of these packages.  Each contains the same files,
  they're just linked against different libraries.  Redhat 5.x users
  should choose the the glibc rpm package.  Users of glibc based systems
  without rpm support should use the glibc tar package.  The libc5 rpm
  is for Redhat distributions prior to 5.0 and other distributions that
  use the rpm package format.  The libc5 tar.gz package is for Slackware
  and everyone else.

  See the ``Download the Necessary Files'' section for the location of
  the Linux Quakeworld files.

  The prerequisites and configuration for these binaries are the same as
  for Quake, so refer to the previous sections for help on setting up
  SVGAlib or glide/Mesa.


  2.9.1.  Installing the RPM packages ++

  Installation of the rpm packages should be as simple as:



            su root
            rpm -Uvh qwcl-xxxxx.i386.rpm



  qwcl, glqwcl and glqwcl.glx will be installed setuid root so that they
  can access the graphics devices on your system.  The X and GL clients
  can be run without root privileges if you follow the instructions in
  ``Running X and GL games without      setuid'' below.

  Rpm may complain that it can't find libglide2x.so.  The Glide library
  is only necessary if you have a 3Dfx card and want to run QuakeWorld
  in GL mode (glqwcl).  If you don't plan to use the GL mode, you can
  override the glide dependency with the --nodeps option:



            su root
            rpm -Uvh qwcl-xxxxx.i386.rpm --nodeps



  2.9.2.  Installing the tar.gz packages ++

  To install, just untar the file in your Quake directory.  Do it as
  root so the proper file permissions get set:



            cd /usr/local/games/quake
            su root
            tar -xzf qwcl2.21-i386-unknown-linux2.0.tar.gz



  qwcl, glqwcl and glqwcl.glx will be installed setuid root so that they
  can access the graphics devices on your system.  The GL and X clients
  can be run without root privileges if you follow the instructions in
  ``Running X and GL games without      setuid'' below.


  2.9.3.  Running QuakeWorld ++

  Once QuakeWorld is installed alongside your Quake files, you can start
  it up like:


            ./qwcl +connect some.server.address



  See section ``Related Software'' for info about some nifty front ends
  for QuakeWorld that make finding servers easy.


  o  lib3dfxgl.so  **

     With Quakeworld version 2.30, an alternative to the Mesa library is
     available.  lib3dfxgl.so is a mini-GL driver optimized for Quake
     that provides slightly better framerates than Mesa.  This is a port
     of a driver that 3Dfx developed for Quake under Windows, and
     apparently not all of its features work properly yet.  So hopefully
     we can expect its performance to improve with time.

     Like Mesa, lib3dfxgl.so requires Glide in order to access your 3Dfx
     card.  The Quakeworld packages come with a script, glqwcl.3dfxgl
     for running Quakeworld with this library on glibc systems.  The
     next paragraph explains how to run Quakeworld with lib3dfxgl.so on
     a libc5 system.  On a glibc system in order for this script to
     work,the glqwcl executable must not be setuid, nor should you run
     it as root.  glqwcl will silently load Mesa rather than
     lib3dfxgl.so if it runs with root permissions.  This non-root
     requirement implies that you have the /dev/3dfx driver installed.

     On a libc5 system, you need to create a symbolic link to
     lib3dfxgl.so called libMesaGL.so.2 like so:


            cd /usr/local/games/quake
            ln -sf lib3dfxgl.so libMesaGL.so.2



  Then start Quakeworld from a script that tells $LD_LIBRARY_PATH to
  look in the current directory:

  ______________________________________________________________________
       #!/bin/sh

       LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ./glqwcl $*

  ______________________________________________________________________



  You can tell which driver is being loaded by looking for output like
  the following in your console as Quakeworld starts:


       GL_VENDOR: 3Dfx Interactive Inc.
       GL_RENDERER: 3Dfx Interactive Voodoo^2(tm)
       GL_VERSION: 1.1
       GL_EXTENSIONS: 3DFX_set_global_palette WGL_EXT_swap_control GL_EXT_paletted_texture GL_EXT_shared_texture_palette GL_SGIS_multitexture



  If GL_VENDOR says Brian Paul rather than 3Dfx Interactive Inc., that
  means Mesa is still being used rather than the miniport dirver.


  o  glqwcl.glx **


     glqwcl.glx is linked against standard OpenGL libraries instead of
     Mesa.  This allows Quakeworld to run on other 3D hardware that is
     supported by other OpenGL implementations.  At this time, I dont'
     know of any OpenGL implementations that support hardware other than
     3Dfx, but this renderer ensures that when they appear, we'll be
     able to play Quakeworld with them.

     This is a GLX application, and as such, must be run from X.

     You can use this client with Mesa/3Dfx if you install Mesa and
     Glide as explained in the previous section, then set the
     $MESA_GLX_FX environment variable to "fullscreen" before you run
     quake2:



            export MESA_GLX_FX=fullscreen
            ./glqwcl.glx +_windowed_mouse 1



  Why the +_windowed_mouse 1 option?  Remember that this is an X
  application which happens to use your 3Dfx card.  Even though the
  display takes up your entire screen, Quakeworld is stil running in a
  window.  This means that if you're not very careful, you could move
  the mouse pointer outside the Quakeworld window, and Quakeworld will
  suddenly stop responding to mouse and keyboard input.
  +_windowed_mouse 1 avoids this problem by telling glqwcl.glx to grab
  the mouse and not let it move outside its window.



  2.10.  Servers

  Most, if not all, existing information about running a DOS/Windows QW
  server is equally applicable to running a Linux server.

  To start a QuakeWorld server, simply do:



            ./qwsv



  The official QuakeWorld server manual lives at
  http://qwcentral.stomped.com.


  2.11.  Mods & Addons

  One of the very cool things about the Quake games is that the authors
  made them easily extensible.  End users can create their own levels,
  add new weapons or monsters, or even completely change the rules of
  the game.


  2.11.1.  Capture the Flag

  This is my favorite variation of both Quake and Quake 2.  Instead of
  just running around and killing everyone you meet (which definitely
  has its merits, don't get me wrong!), CTF is team-based and more
  strategic.  Dave 'Zoid' Kirsch, also the maintainer of the Linux Quake
  ports, created this mod.

  Everything you need to know about CTF can be found at
  http://captured.com/threewave/  You need
  ftp://ftp.cdrom.com/pub/quake/planetquake/threewave/ctf/client/3wctfc.zip
  to play.  To install the client piece of CTF, simply create a
  directory called ctf in your Quake directory and unzip the 3wctfc.zip
  file there.  The accompanying readme.txt file is chock full of good
  information.



            cd /usr/local/games/quake
            mkdir ctf
            cd ctf
            unzip -L /wherever/you/put/it/3wctfc.zip



  For information on running a CTF server, see the web pages mentioned
  above.


  2.11.2.  Mission Packs **

  Activision released two add-on packs of extra levels for Quake,
  Scourge of Armagon and Dissolution of Eternity.


  o  Mission Pack 1: The Scourge of Armagon Assuming your CD is mounted
     on /mnt/cdrom and Quake is installed in /usr/local/games/quake:



            cd /usr/local/games/quake
            mkdir hipnotic
            cp /mnt/cdrom/hipnotic/pak0.pak hipnotic
            cp /mnt/cdrom/hipnotic/config.cfg hipnotic



  Play the mission pack like this:

       cd /usr/local/games/quake
       ./quake.x11 -game hipnotic



  o  Mission Pack 2: Dissolution of Eternity Installing the second
     mission pack is pretty much the same procedure as installing the
     first.  Follow the directions for Mission Pack 1, but replace the
     word hipnotic with the word rogue, and skip the config.cfg step, as
     this file isn't included on the Mission Pack 2 CD.


  2.11.3.  Quake Tools

  Anybody care to contribute some info about qcc, bsp and all that?



  3.  Quake II

  To install Quake II on your Linux system, you'll need some flavor of
  the official Quake II distribution from id.  This will be either the
  retail Windows CD-ROM that you bought at your favorite software store,
  or the demo version you downloaded from the net.  See ``Download the
  Necessary Files'' for details on acquiring the demo version.
  Alternatively, if you've already got Quake installed on a Windows
  machine, you can use the relevant files from that installation.


  3.1.  Prerequisites

  You will need, as a bare minimum, the following:


  o  A Pentium 90 or better (133 recommended) computer

  o  16 MB RAM (24 recommended)

  o  The Quake 2 CD-ROM or the demo version (q2-314-demo-x86.exe)

  o  Linux kernel version 2.0.24 or later

  o  libc 5.2.18 or later

  o  One of the following:

  o  X11 server that supports the MITSM shared memory extension. 8 and
     16 bit displays are supported.   (for X renderer)

  o  SVGAlib 1.2.10 or later (for SVGA and GL renderer)

  o  25-400 megabytes free disk space (depending on how you install)

  o  Access to the root account of the machine you're installing on


  Optional:

  o  A supported soundcard

  o  A 3Dfx Voodoo Graphics or Voodoo2 or Voodoo Rush 3D graphics
     accelerator card.

  o  3Dfx glide libraries installed (for GL renderer)

  o  Mesa 2.6 or later (for GL renderer)


  3.2.  Installing Quake II



  3.2.1.  Download the Necessary Files**

  All the necessary files for Linux Quake II are available at id
  Software's ftp site, ftp.idsoftware.com.  This site can be quite busy
  at times,so you may want to use one of these mirror sites instead:

  o  ftp.cdrom.com/pub/idgames/idstuff (California, USA)

  o  ftp.gamesnet.net/idsoftware (California, USA)

  o  ftp.stomped.com/pub/mirror/idstuff (Minnesota, USA)

  o  mirrors.telepac.pt/pub/idgames (Lisbon, Portugal)

  o  download.netvision.net.il/pub/mirrors/idsoftware (Haifa, Israel)

  The Quake II files mentioned in in this section are:

  o  Quake II Linux Binaries

  o  libc5 tar.gz package
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-i386-unknown-
     linux2.0.tar.gz

  o  glibc tar.gz package
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-glibc-
     i386-unknown-linux2.0.tar.gz

  o  libc5 rpm package
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-2.i386.rpm

  o  glibc rpm package
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-
     glibc-2.i386.rpm

  o  Quake II Demo Version for Windows
     ftp://ftp.idsoftware.com/idstuff/quake2/q2-314-demo-x86.exe

  o  Quake II Game Source
     ftp://ftp.idsoftware.com/idstuff/quake2/source/q2source-3.14.shar.Z

  o  Quake II Capture the Flag
     ftp://ftp.idsoftware.com/idstuff/quake2/ctf/102.zip

  Other software mentioned:

  o  SVGAlib graphics library
     http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.tar.gz

  o  SVGAlib libc5
     binaryhttp://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar.gz

  o  Glide runtime libraries http://glide.xxedgexx.com/3DfxRPMS.html

  o  Mesa 3D graphics library http://www.ssec.wisc.edu/~brianp/Mesa.html


  o  unzip archive utility
     http://sunsite.unc.edu/pub/Linux/utils/compress/unzip-5.31.tar.gz


  3.2.2.  Create the Installation Directory

  The first thing you'll need to do is decide where you  want to install
  Quake II.  Lots of folks like to put it in /usr/games/quake.  Anal
  system administrator that I am, I choose to install anything that's
  not part of my Linux distribution under /usr/local.  So for me, Quake
  II goes in /usr/local/games/quake2.  If you choose to install
  somewhere else, please substitute the appropriate path wherever
  /usr/local/games/quake2 is mentioned.

  So go ahead and create the directory you'll install Quake II in, and
  cd to it.  The rest of these instructions will assume that this is
  your current directory.



            mkdir /usr/local/games/quake2
            cd /usr/local/games/quake2



  3.2.3.  Installing from CD

  Place your Quake II CD in your CD ROM drive, and mount it:



            mount -t iso9660 /dev/cdrom /mnt/cdrom



  If your CDROM is typically mounted elsewhere, substitute its location
  for /mnt/cdrom.  If you're not sure where your CDROM is mounted,
  please see the documentation for your particular distribution.


  o  Full Install The simplest install method is a "full" install, which
     involves copying the entire contents of your CD to your hard drive.
     This requires about 350 MB, and is accomplished by issuing the
     following commands:



            cd /usr/local/games/quake2
            cp -r /mnt/cdrom/Install/Data/* .



  There'll be a bunch of unnecessary Windows files hanging around that
  you can safely delete:



       rm -f /usr/local/quake2/*.dll
       rm -f /usr/local/quake2/quake2.exe
       rm -f /usr/local/quake2/baseq2/gamex386.dll



  o  Medium Install If 450 MB is too much space for you to devote to
     Quake II, you can skip installing the movie cutscenes and link to
     them on the CD-ROM instead.  This will reduce the space
     requirements to about 200 MB:



            cd /usr/local/games/quake2
            mkdir baseq2
            cp /mnt/cdrom/Install/Data/baseq2/pak0.pak baseq2
            cp -r /mnt/cdrom/Install/Data/baseq2/players baseq2
            ln -s /mnt/cdrom/Install/Data/baseq2/video baseq2/video



  Note that this doesn't mean you have to mount your Quake II CD every
  time to want to play Quake II.  If the game can't load the videos, it
  just won't display them.



  3.2.4.  Windows to Linux install

  If you have Quake II installed under Windows on a different machine,
  you can transfer the files in quake2\baseq2\ to your Linux system via
  FTP or some other mechanism.  Keep in mind that the filenames on your
  Linux system must be in lower case for Quake II to find them, so you
  may have to rename them after the transfer.  Also note that it may be
  necessary to delete your Windows installation after you do this to
  remain in compliance with the terms of id's software license.  It's
  not my fault if you do something illegal.

  If your Windows and Linux systems are on the same machine, you have
  two options: copy the files from your Windows partition to your Linux
  partition, or link to the necessary files from Linux.  Both options
  will work equally well.  You'll just save a lot of disk space when you
  link instead of copy.  As usual, replace /win95/games/quake2 in the
  following examples with the correct path to your Windows partition and
  Quake II installation.


  o  If you want to copy the files from your Windows partition, do
     something like this:



            cd /usr/local/games/quake2
            cp -r /win95/games/quake2/baseq2 .



  o  To create links to your Windows Quake II files instead, do this:



            cd /usr/local/games/quake2
            ln -s /win95/games/quake2/baseq2 .



  This second method requires that the Windows partition you're linking
  to be writeable by users, which may not be appropriate for all sys-
  tems.  By making your Windows partition writeable, you are giving all
  users the opportunity to destroy your entire Windows installation.  If
  that's ok with you, modify your /etc/fstab to mount the Windows parti-
  tion with the options umask=002,gid=XXX, where XXX is the group id
  number of the "users" group.  Look in /etc/group for this information.
  When fstab is updated, umount and re-mount the Windows partition and
  you're done.

  You're done installing the Quake II data files.  Move ahead to
  "``Installing the Linux Binaries''".



  3.2.5.  Installing the demo version **

  id Software has a freely available demo version of Quake II at their
  ftp site.  It's a 40 megabyte download.  The demo includes all
  features of the full version, including multiplayer, but it only comes
  with three levels, so it may be difficult to find a server to play on.

  See the section ``Download the      Necessary Files'' above for the
  location of the Quake II demo.  Download it and place it in your Quake
  II directory.

  The demo distribution is a self-extracting zip file (it's self-
  extracting in other OS's anyway).  You can extract it with the
  unzip(1) command, which should be included in most modern
  distributions.  If you don't have unzip, you can download it from the
  location listed in the ``Download the Necessary Files'' section.

  cd to your Quake II directory and extract the archive:



            cd /usr/local/games/quake2
            unzip q2-314-demo-x86.exe



  Now we've got to delete some things and move some other things around:


            rm -rf Splash Setup.exe
            mv Install/Data/baseq2 .
            mv Install/Data/DOCS docs
            rm -rf Install
            rm -f baseq2/gamex86.dll



  The Quake II demo is now installed.  You just need to add the Linux
  binaries.


  3.3.  Adding the Linux Binaries**

  There are four Linux Quake II packages available for download:

  o  a libc5 tar.gz package

  o  a glibc tar.gz package

  o  a libc5 rpm package

  o  a glibc rpm package

  Install just one of these packages.  Each contains the same files,
  they're just linked against different libraries.  Redhat 5.x users
  should choose the the glibc rpm package.  Users of glibc based systems
  without rpm support should use the glibc tar package.  The libc5 rpm
  is for Redhat distributions prior to 5.0 and other distributions that
  use the rpm package format.  The libc5 tar.gz package is for Slackware
  and everyone else.

  See the ``Download the Necessary Files'' section for the location of
  the Linux Quake II files.


  3.3.1.  Installing the RPM packages **

  Installation of the rpm packages should be as simple as:



            su root
            rpm -Uvh quake2-xxxxx.i386.rpm



  Rpm may complain that it can't find libglide2x.so.  The Glide library
  is only necessary if you have a 3Dfx card and want to run Quake II in
  GL mode.  If you don't plan to use the GL mode, you can override the
  glide dependency with the --nodeps option:



            su root
            rpm -Uvh quake2-xxxxx.i386.rpm --nodeps



  3.3.2.  Installing the tar.gz packages **

  To install, just untar the file in your Quake II directory.  Do it as
  root so the proper file permissions get set:



       cd /usr/local/games/quake
       su root
       tar -xzf qwcl2.21-i386-unknown-linux2.0.tar.gz



  3.4.  Setting Permissions **

  If you ran rpm or tar as root when installing the Quake II package on
  your system, the file permissions should be properly set already.  The
  quake2 executable was installed setuid root so that it can access the
  graphics devices on your system.  For security, the ref_*.so rendering
  libraries are owned by root and writeable only by him.  If root
  doesn't own the libraries, or they're world writeable, quake2 will
  refuse to run.

  If you plan to only run Quake II with the GL or X renderers, your
  quake2 doesn't need to be setuid root.  See ``Running X and GL games
  without setuid'' in the Tips and Tricks section below for information
  on running Quake II without root permissions.


  3.4.1.  Quake2.conf **


  For security reasons, there is a quake2.conf file, which tells Quake
  II where to find the rendering libraries it needs (ref_*.so).  It
  contains only one line, which should be the path to your Quake II
  installation.  Quake II looks for this file in /etc.  If you installed
  Quake II from an .rpm file, this file was installed for you.  If you
  installed from a .tar package, you need to create it like so:



            su root
            cd /usr/local/games/quake2
            pwd > /etc/quake2.conf
            chmod 644 /etc/quake2.conf



  3.5.  The X Renderer

  Quake II should be ready to run under X now.  Give it a try:



            cd /usr/local/games/quake2
            ./quake2 +set vid_ref softx



  If all is well, after a pretty significant pause, a small Quake II
  window will appear with the first demo running in it.  You should hear
  sound effects and possibly music, if the CD is mounted.  If any of
  this fails to occur, please see section ``Troubleshooting'' for help.


  3.6.  The SVGAlib Renderer

  You need SVGAlib installed and configured if you're going to use
  either the ref_soft or ref_gl renderers.  (Quake II uses SVGAlib to
  process keyboard and mouse input, in case you're wondering why you'd
  need it for the GL renderer).   SVGAlib comes with most modern
  distributions, and must be properly configured before Quake II will
  run correctly outside of X.

  libvga.config is SVGAlib's configuration file.  On most systems you'll
  find it in either /etc or /etc/vga.  Make sure the mouse, monitor, and
  video card settings in this file are correct for your system.  See the
  SVGAlib documentation for more details.

  If you don't already have SVGAlib on your system, download it from the
  location mentioned in ``the files      section'' above.  If you have a
  RedHat 5.x or other glibc-based Linux distribution, see ``Glibc,
  RedHat 5.x,      Debian 2 considerations'' in the Troubleshooting/FAQs
  section for important information about compiling libraries for Quake
  II.  A precompiled libc5 SVGAlib binary is available at
  http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar.gz
  for those who don't want to deal with the hassle of compiling for
  libc5.

  You should run Quake II from a virtual console when using the ref_soft
  or ref_gl renderers.  It won't run from X unless you're root when you
  start it, and that's not advisable. So if you're in X, do a
  CTRL+ALT+F1, login and then:



            cd /usr/local/games/quake2
            ./quake2



  ``Running SVGA and GL games from X'' in the Tips & Tricks section
  below explains how to launch SVGA and GL Quake II from X without
  manually switching to a virtual console.


  3.7.  The OpenGL Renderer

  Hardware-accelerated OpenGL Quake is Quake the way God intended it to
  be.  There is no substitute, and once you've experienced it there's no
  going back.

  To run Quake II in GL mode, you need a 3D card with the Voodoo,
  Voodoo2 or Voodoo Rush graphics chipset on it.  There are specific
  issues to be dealt with if you have a Voodoo Rush card, and I won't go
  into them now because frankly, I wouldn't know what I was talking
  about.  A future version of this HOWTO will cover Rush issues (If
  somebody wants to write about Voodoo Rush issues, I'll gladly include
  it here).

  The SVGAlib, Glide, and Mesa libraries must all be installed and
  configured properly on your system for quake2 to work.  The following
  sections will very briefly cover what you need to do to get them
  going.

  Bernd Kreimeier's (bk@gamers.org) Linux 3Dfx HOWTO
  (http://www.gamers.org/dEngine/xf3D/howto/3Dfx-HOWTO.html) is good
  source for further information.

  The 3dfx.glide.linux newsgroup on the 3dfx news server (news.3dfx.com)
  is another good source of information about the intersection of Linux,
  glide, Mesa and Quake.



  3.7.1.  SVGAlib

  Quake II uses SVGAlib to get input from the mouse and keyboard, so
  you'll need to configure it as outlined in section ``SVGAlib
  Renderer'' section.


  3.7.2.  Glide

  Glide is a library that provides an API for programming 3Dfx based
  cards.  If you want the Mesa graphics library to use your 3Dfx card,
  you've gotta have it.

  The latest version of glide can always be found at
  http://glide.xxedgexx.com/3DfxRPMS.html.  Select the package(s)
  appropriate for your system, and install according to the instructions
  on the web page.

  Note that unless you download the 3Dfx device driver package in
  addition to the Glide library, you will only be able to run Glide
  applications (like GLQuake) as root.  Install the /dev/3dfx module and
  you can play GLQuake as a regular user.

  Once you have glide installed, try out the test program that comes
  with it.  Remember this program:  it's a good way to reset your
  display if you ever have a glide application (like GLQuake) crash and
  leave your screen switched off.  NOTE: run this test from a VC, not X!
  It's possible for the test app to lose mouse and keyboard focus in X,
  and then you'll have no way of shutting it down.



            /usr/local/glide/bin/test3Dfx



  Your screen should turn blue and prompt you to hit any key.  After you
  press a key you should be returned to the prompt.  3dfx.glide.linux on
  3dfx's news server (news.3dfx.com) is a great source of information
  for Linux glide-specific problems.


  3.7.3.  Mesa

  Once glide's installed, you need to install Mesa, a free OpenGL
  implementation by Brian Paul (brianp@elastic.avid.com).  Luckily, you
  won't have to look far, because Mesa 2.6 is included with the Quake II
  binaries.  All you have to do is move it to the right place:



            cd /usr/local/games/quake2
            cp libMesaGL.so.2.6 /usr/local/lib
            ldconfig



  If you want to upgrade Mesa to a more recent version (Mesa 3.0 is the
  most recent version as of this writing), you can download the latest
  from  ftp://iris.ssec.wisc.edu/pub/Mesa If you have a RedHat 5.x or
  other glibc-based Linux distribution, see ``Glibc, RedHat 5.x, Debian
  2 considerations'' in the Troubleshooting/FAQs section for important
  information about compiling libraries for Quake.

  After you've built it according to the instructions, you will have to
  do two things:


  o  Remove your old Mesa installation.  If you previously installed a
     libMesaGL.so.2.6 as described above, you must remove it or Quake II
     may not use the new version.



            cd /usr/local/lib/
            rm -f libMesaGL.so.2*



  o  If the new Mesa has a major version number that's greater than 2,
     you need to create a link to it with the name libMesaGL.so.2:



            cd /usr/local/lib/
            ln -s /wherever/you/installed/it/libMesaGL.so.3.0 libMesaGL.so.2
            ldconfig



  Now switch to a VC (CTRL+ALT+F1)  and start Quake II:



            cd /usr/local/games/quake2
            ./quake2 +set vid_ref gl



  3.7.4.  lib3dfxgl.so **

  With Quake II version 3.19, an alternative to the Mesa library is
  available.  lib3dfxgl.so is a mini-GL driver optimized for Quake that
  provides slightly better framerates than Mesa.  This is a port of a
  driver that 3Dfx developed for Quake under Windows, and apparently not
  all of its features work properly yet.  So hopefully we can expect its
  performance to improve with time.

  Like Mesa, lib3dfxgl.so requires Glide in order to access your 3Dfx
  card.  The Quake II packages come with a script, quake2.3dfxgl for
  running Quake II with this library on glibc systems.  The next
  paragraph explains how to run Quake II with lib3dfxgl.so on a libc5
  system.  On a glibc system, the glqwcl executable must not be setuid,
  nor should you run it as root.  glqwcl will silently load Mesa rather
  than lib3dfxgl.so if it runs with root permissions.  This non-root
  requirement implies that you have the /dev/3dfx driver installed.

  On a libc5 system, the non-root requirements mentioned above apply,
  but you also need to create a symbolic link to lib3dfxgl.so called
  libMesaGL.so.2 like so:


            cd /usr/local/games/quake2
            ln -sf lib3dfxgl.so libMesaGL.so.2



  Then start Quake II from a script that tells $LD_LIBRARY_PATH to look
  in the current directory:

  ______________________________________________________________________
       #!/bin/sh

       LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ./quake2 +set vid_ref gl $*

  ______________________________________________________________________



  You can tell which driver is being loaded by looking for output like
  the following in your console as Quake II starts:



            GL_VENDOR: 3Dfx Interactive Inc.
            GL_RENDERER: 3Dfx Interactive Voodoo^2(tm)
            GL_VERSION: 1.1
            GL_EXTENSIONS: 3DFX_set_global_palette WGL_EXT_swap_control GL_EXT_paletted_texture GL_EXT_shared_texture_palette GL_SGIS_multitexture



  If GL_VENDOR says Brian Paul rather than 3Dfx Interactive Inc., that
  means Mesa is still being used rather than the miniport dirver.


  3.8.  The GLX Renderer **


  ref_glx.so is linked against standard OpenGL libraries instead of
  Mesa.  This allows Quake II to run on other 3D hardware that is
  supported by other OpenGL implementations.  At this time, I dont' know
  of any OpenGL implementations that support hardware other than 3Dfx,
  but this renderer ensures that when they appear, we'll be able to play
  Quake II with them.

  This is a GLX application, and as such, must be run from X.

  You can use this client with Mesa/3Dfx if you install Mesa and Glide
  as explained in the previous section, then set the $MESA_GLX_FX
  environment variable to "fullscreen" before you run quake2:



       export MESA_GLX_FX=fullscreen
       ./quake2 +set vid_ref glx +set _windowed_mouse 1



  Why the +set _windowed_mouse 1 option?  Remember that this is an X
  application which happens to use your 3Dfx card.  Even though the
  display takes up your entire screen, Quake II is stil running in a
  window.  This means that if you're not very careful, you could move
  the mouse pointer outside the Quake II window, and Quake II will
  suddenly stop responding to mouse and keyboard input.  +set
  _windowed_mouse 1 avoids this problem by telling quake2 to grab the
  mouse and not let it move outside its window.


  3.9.  Linux-Specific Command Line Options

  This section will cover command line options that are specific to the
  Linux version of Quake II.  There are plenty of other Quake II
  options, but they're beyond the scope of this HOWTO.  Check out some
  of the sites listed in section ``General Quake Information'' for this
  kind of information.

  These are actually cvars (client variables) that you can set in the Q2
  console, but it makes the most sense to set them on the command line.
  Set them with +set on the command line, like:



            ./quake2 +set cd_dev /dev/hdc



     cd_dev device
        Name of the CD-ROM device.


     nocdaudio value
        Disable CD audio if value is nonzero


     sndbits num
        Set  sound bit sample size.  Default is 16.


     sndspeed num
        Set sound sample speed.  Usual values are 8000, 11025, 22051 and
        44100.  If set to zero, causes the sound driver to attempt
        speeds in the following order: 11025, 22051, 44100, 8000.


     sndchannels num
        Indicates stereo or mono sound.  Defaults to 2 (stereo). Use 1
        for mono.


     nostdout value
        Don't do any output to stdout.  Use this if you don't want all
        the console output dumped to your terminal.


  3.10.  Quake II Servers

  Linux's strength as an internet server make it a perfect platform for
  running an internet Quake II server.  This section will touch on the
  basics and Linux-specific aspects of starting up a Quake II server.
  More detailed information about running Quake II servers is available
  elsewhere (see section ``Other Sources of Information'' earlier in
  this document.


  3.10.1.  Listen Servers

  You can start a Quake II "Listen" server from within the game via the
  Multiplayer menu.  This allows you to host a game and participate in
  it at the same time.

  To start a Listen server, start Quake II, bring up the Quake II menu
  with the ESC key, and select Multiplayer.  It should be pretty self-
  explanatory from there.


  3.10.2.  Dedicated Servers

  For a permanent, stand-alone Quake II server that needs to run without
  constant attention, using the Listen server is impractical.  Quake II
  has a Dedicated server mode that is better suited to this type of use.
  A dedicated server is started from the command line and uses fewer
  system resources than a Listen server because it doesn't start the
  graphical client piece at all.

  To start a dedicated server, use the command line option +set
  dedicated 1.  You can set additional server parameters either on the
  command line or in a config file that you +exec on the command line.
  Your config file should reside in the baseq2 directory.

  A few common server options are listed below.  To set options on the
  command line, do +set fraglimit 30.  Options are set the same way in a
  config file, only you don't want the + before the set.  Invoke your
  config file like this: +exec server.cfg.


     fraglimit
        Number of frags required before the map changes

     timelimit
        Time in minutes that must pass before the map changes

     hostname
        The name of your Quake II server.  This is an arbitrary string
        and has nothing to do with your DNS hostname.

     maxclients
        The maximum number of players that can connect to the server at
        once.

  For enough Quake II console and command line information to choke a
  horse, see Farenheit 176 (http://www.planetquake.com/f176).


  3.10.3.  Other Sources of Server Information


  o  The Q2 Server FAQ has a basic step-by-step guide to set up a Q2
     Server under Linux: http://www.bluesnews.com/faqs/q2s-faq.html


  o  Grant Cornelius Reticulus Copernicus Sperry (flubber@xmission.com)
     has some basic Q2 server config files and startup scripts at
     http://www.atomicage.com:80/quake/server/server_cfg/.



  3.11.  Mods & Addons

  Quake II modifications like Capture the Flag, Jailbreak, and Lithium
  II are very popular extensions of the original Quake II game.  Some
  mods reside entirely on the server (Lithium), and some also require
  changes to your client (CTF).  For server only mods, you just connect
  normally and play.  Client-side mods require you to install additional
  files in your quake2 directory before you can play.


  3.11.1.  Client Side Mods

  Generally, installation of a client-side mod consists of just
  downloading the client package and upacking it in your Quake II
  directory, but you should refer to the mod's documentation for
  specific details.  It may be necessary to download a Linux-specific
  package in addition to the main (Windows) client package.  Also be
  aware that all mods may not be available for Linux.

  Client-side mod packages usually contain a new gamei386.so file and
  one or more .pak files.  Other new files may be included as well.
  These new files will be installed in a subdirectory below your Quake
  II directory.  Use +set game mod-dir on the command line to run the
  mod.  Rocket Arena 2, for example, gets installed in a directory
  called arena.  To play RA2, your would start your client like so:


             ./quake2 +set game arena



  3.11.1.1.  Capture the Flag

  Since this is by far the most popular variation of multiplayer Quake
  II, I've included specific instructions for installing this mod.
  Capture the Flag for Quake II is available from id's ftp site.
  Download it, then install like so:



            cd /usr/local/games/quake2
            mkdir ctf
            cd ctf
            unzip -L /wherever/you/put/it/q2ctf102.zip



  Start Quake II with +set game ctf to play CTF.


  3.11.2.  Server Side Mods

  Running a Quake II mod on a server isn't much different than running
  one on the client side.  Generally you'll need to install gamei386.so
  and server.cfg files in a new subdirectory and then start your server
  like


            ./quake2 +set game XXXX +set dedicated 1 +exec server.cfg



  Where XXXX above is the name of the mod's new subdirectory.  The exact
  procedure will vary from mod to mod, of course.  See the mod's docu-
  mentation for specific details.


  3.11.3.  Game Source

  The entire game, with the exception of the engine itself, resides in a
  shared library, gamei386.so.  Quake II mods are created by changing
  the contents of this file.  The C source is freely available (section
  ``Download the Necessary Files'' above) for anyone to download and
  modify.

  After you've downloaded the source, here's how to get started with it:



             cd /usr/local/games/quake2
             mkdir mymod
             cd mymod
             gunzip /wherever/you/put/it/q2source-3.14.shar.Z
             sh /wherever/you/put/it/q2source-3.14.shar



  You'll be presented with a bunch of legalese that you must answer yes
  to, then the game source will be extracted.  Building a new
  gamei386.so out of these sources is accomplished with a simple make.
  You can run Quake II with the newly compiled library like so:



             cd /usr/local/games/quake2
             ./quake2 +set game mymod



  Not too exciting yet, since what you just built is identical to the
  "stock" gamei386.so, but this should be good information for aspiring
  mod authors.


  3.11.4.  Mission Packs **


  o  Mission Pack 1: The Reckoning The Reckoning requires Quake II
     version 3.15 or later to run.  You'll need at least 95 MB for a
     minimum installation.  Another 90 MB are required if you want to
     install the video sequences as well.  Assuming your CD is mounted
     on /mnt/cdrom and Quake II is installed in /usr/local/games/quake2:



       cd /usr/local/games/quake2
       cp -r /mnt/cdrom/Data/all/* xatrix/
       rm -f xatrix/gamex86.dll



  If you want to install the video sequences:



            cp -r /mnt/cdrom/Data/max/xatrix/video xatrix



  Play The Reckoning like this:


            cd /usr/local/games/quake2
            ./quake2 +set game xatrix



  o  Mission Pack 2: Ground Zero It requires Quake II version 3.17 or
     later to run.  You'll need at least 120 MB for a minimum
     installation.  Another 115 MB are required if you want to install
     the video sequences as well.  Assuming your CD is mounted on
     /mnt/cdrom and Quake II is installed in /usr/local/games/quake2:



            cd /usr/local/games/quake2
            cp -r /mnt/cdrom/Data/all/* rogue/
            rm -f rogue/gamex86.dll



  If you want to install the video sequences:



            cp -r /mnt/cdrom/Data/max/rogue/video rogue



  Play Ground Zero like this:


            cd /usr/local/games/quake2
            ./quake2 +set game rogue


  4.  Related Software ++



  4.1.  QStat

  Qstat is a command line based program that returns the status of
  internet Quake, QuakeWorld, and Quake 2 servers created by Steve
  Jankowski mailto:steve@activesw.com.

  Here's the feature summary from the QStat homepage:

  o  Supports Windows 95, NT, and most Unixes

  o  Comes with C source code and a binary for Windows

  o  Supports old Quake (NetQuake), QuakeWorld, Hexen II, and Quake II
     servers

  o  Can display all available statistics, including player info and
     server rules

  o  Output templates for automatic HTML generation

  o  Raw display mode for integration with HTML page generators

  o  Built-in host name cache

  o  Sort by ping time, game, or both

  o  More options than you can wiggle a mouse at

  Qstat is a must-have tool if you're planning on doing any net play.  A
  number of front-ends for qstat have been written as well.  Some of
  them are listed later in this section.

  You can get the latest version of qstat from the QStat Homepage
  (http://www.activesw.com/people/steve/qstat.html.


  4.2.  XQF

  XQF is a graphical front-end to QStat that uses the GTK toolkit.  This
  is the best QuakeWorld/Quake2 server browser that currently exists,
  and Roman Pozlevich (roma@botik.ru), is still cranking out revisions
  at the rate of about one per month.

  If you're familiar with GameSpy for the Windows platform, this is the
  closest thing to it for Linux.

  The XQF homepage is at http://www.linuxgames.com/xqf.


  4.3.  QuickSpy

  QuickSpy is a text-based QuakeWorld server browser.  It's another
  front-end to QStat and it works pretty well.  If you don't run X and
  you don't have Quake II, this is a decent option.  Beware though, it's
  no longer under development.


  You can get QuickSpy at
  http://diana.ecs.soton.ac.uk/~rht96r/quake/quickspy/.



  4.4.  QPlug for Linux

  Qplug is a Netscape plugin which retrieves and displays QuakeWorld and
  Quake II server information embedded in a web page. A Windows Qplug
  has been around for some time.  The author, Olivier Debon
  (odebon@club-internet.fr) wrote the Linux version from scratch without
  ever having seen the Windows version.

  QPlug for Linux can be got at
  http://www.geocities.com/TimesSquare/Labyrinth/5084/qplug.html.


  4.5.  qkHacklib

  David Bucciarelli (tech.hmw@plus.it), author of the 3Dfx driver for
  Mesa, has written a library called qkHack, which tries to emulate all
  the SVGAlib/fxMesa functions used by Quake and Quake II.  This would
  remove the need for SVGAlib when running glquake or Quake II with
  ref_gl.  Other features from the qkHacklib README:


  o  You can dynamically switch between fullscreen rendering and the in
     window rendering just pressing the TAB key (you must start your X
     server in 16 bpp mode in order to use this feature)

  o  You can press Ctrl-C in the shell or kill the Quake process without
     problems

  o  you can enable/disable the mouse and keyboard 'grabbing' pressing
     F11/F12

  o  you can iconify and pause Quake pressing the F10 (it will not eat
     more CPU cycles). You can restart everything with a double click in
     the "****" icon

  o  you can run Quake with any Mesa driver (for example with the X11
     driver but you must recompile the Mesa without the Voodoo driver)

  o  you can run Quake under any Linux box and get the hardware
     acclerated output on a SGI box (OK, this is a bit exotic and
     theoretical as feature but it is an example of how powerful can be
     an GLX/OpenGL application)

  I've tried qkHacklib and it works great for Quake on my system.  In
  Quake II, however, the mouse response becomes really slow.  Others
  report complete success, though, so give it a try it it sounds like
  something you need.

  David Bucciarelli's qkHacklib web page is at http://www-
  hmw.caribel.pisa.it/fxmesa/fxqkhack.html.


  4.6.  GiMd2Viewer

  GiMd2Viewer is a Quake 2 model viewer written for Gtk and OpenGL by
  Lionel Ulmer (bbrox@mygale.org). It loads models and textures from
  either plain files or .PAK files.  It will also animate the models
  (with frame interpolation).

  This program is still under developement and I haven't tried it yet,
  but it sounds pretty nifty.  Check it out at
  http://www.mygale.org/~bbrox/GiMd2Viewer/.



  4.7.  QIPX

  QIPX is a set of programs that allow Linux Quake clients (using
  TCP/IP) to connect with DOS Quake clients (using IPX).  I guess this
  is useful if you're playing netquake on a LAN.  QIPX is available at
  http://www.geocities.com/SiliconValley/Park/6083/qipx.html.


  4.8.  Ice

  Ice is a Quake map editor for UN*X created by C.J. Beyer and John
  Watson.  I haven't used this program, nor do I know what its
  development status is.  The Ice homepage is at
  http://styx.phy.vanderbilt.edu/~ice/.


  4.9.  Q2getty

  Q2getty is a hack of mingetty by Mike Gleason (mgleason@ncftp.com)
  that allows you to automatically run and respawn a program (like a
  Quake server) on a virtual console.  This program is available in the
  files section at http://www.ncftpd.com/unixstuff/q2getty.html.


  4.10.  rcon

  Rcon is a pair of tools that allow remote administration of a Quake II
  server using the RCON protocol.  Michael Dwyer
  (michael_dwyer@mwiworks.com) is the author.  Rcon 1.1 is available at
  .


  4.11.  qlog ++

  Qlog is a GPL'ed QuakeWorld/Quake II server log parser that generates
  comprehensive player statistics.   Craig Knudsen (cknudsen@radix.net)
  is the author.  The qlog homepage is
  http://www.radix.net/~cknudsen/qlog/.


  4.12.  Cheapo **

  Cheapo is a proxy that can be used to route QuakeWorld network
  traffic. Additionally, the proxy can modify the data and has features
  for enhancing gameplay. You can connect to cheapo as if it were a
  Quakeworld server, and then give it commands that forward you to a
  real server.  The proxy can also be run on a firewall machine
  incapable of handling Quake traffic, so that machines inside the
  firewall can be used for playing.  The Cheapo homepage is at
  http://www.saunalahti.fi/~softech/.


  4.13.  qgraph **

  QGraph (Quake Graph) is a utility to help people in managing Quake's
  DeathMathes, turnments and Quakeworld games.  QGraph is a program who
  connects (via Lan or the Internet) to a Quake, QuakeII, Quakeworld and
  Hexen2 Servers and shows you realtime data about the game running on
  that server.  The QGraph homepage is at http://www.frag.com/qgraph.



  5.  Troubleshooting/FAQs



  5.1.  General



  5.1.1.  OS difference considerations


  o  Case sensitivity - In DOS and Windows, case is not important.
     BASE1.TXT is the same as base1.txt.  Under Linux and other unices,
     case IS significant.  MOTD.TXT and motd.txt are different files.
     This can cause problems with player models and skin files if
     they're installed with upper- or mixed-case filenames.
     players/male/santa.PCX needs to be renamed to santa.pcx in order to
     work in Linux.  The fixskins.sh script included with quakeworld
     will convert all filenames in a directory to lowercase. It's
     reproduced below for your convenience:

     ___________________________________________________________________
          #!/bin/sh
          for x in *; do
             y=`echo $x | tr '[A-Z]' '[a-z]'`
             if [ $x != $y ]; then
                mv $x $y
             fi
          done

     ___________________________________________________________________



  o  Path delimiters - DOS and Windows use the backslash "\" character
     to separate file pathname elements.  In Unix, the backslash is an
     escape character.  If you use file pathnames in your config files
     (or your mod code, or anywhere else, for that matter), be sure
     you're using "/" and not "\".

  o  End of line characters - Under DOS/Windows, each line of a text
     file ends with a carriage return character (CR) and a linefeed
     character (LF).  Unix textfiles just have a linefeed at the end of
     each line.  Using DOS/Win formatted textfiles in Unix can cause all
     kinds of mysterious Quake problems.  Using the incorrectly
     formatted quake2.conf file from the Quake2 3.17 package, for
     example, gives the error "LoadLibrary("ref_XXX.so") failed: No such
     file or directory".  LMCTF-TE reports a floating point exception.
     If you've got an problem you can't explain, try removing the CRs
     from your text files:


            mv file.txt file.bak; tr -d '\r' < file.bak > file.txt



  5.1.2.  Glibc, RedHat 5.x, Debian 2 considerations**

  The following applies the Quake I binaries (squake, glquake, and
  quake.x11) only.  As of versions 2.30 and 3.19 respectively,
  QuakeWorld and Quake II are available in both libc5 and glibc
  versions.

  The Quake executables were compiled with libc5.  Newer Linux
  distributions like RedHat 5.1 and Debian 2.0 use the incompatible
  glibc as their default C library.  If you're running Quake on a glibc
  system, there are a few things to watch out for:
  o  Both RedHat 5 and Debian 2 have libc5 compatibility packages that
     allow you to run libc5-based applications.  Make sure you have
     these packages installed.  Both distributions put the libc5-based
     libraries in /usr/i486-linux-libc5/lib.

  o  Make sure Quake uses the correct libraries.  Create a script like
     the one below that points $LD_LIBRARY_PATH to your compatibility
     libraries directory before it runs Quake.

     ___________________________________________________________________
          #!/bin/sh
          export LD_LIBRARY_PATH=/usr/i486-linux-libc5/lib
          ./quake2 +set vid_ref gl $*

     ___________________________________________________________________



  o  If you are going to compile a library like SVGAlib or Mesa for use
     with Quake, it must be compiled with libc5 and friends.  Simply
     building a new library according its installation instructions will
     result in a library that is linked against your default library,
     glibc.  You must ensure your new library is linked only with libc5
     and libc5-based libraries so it will be compatible with Quake.  See
     your distribution's documentation for information on linking to the
     non-default libraries.



  5.1.3.  My mouse doesn't work or seems to respond randomly.


  o  Is gpm running?  gpm is a program that enables you to cut and paste
     with the mouse in virtual consoles.  Many distributions enable it
     by default.  It may be interfering with Quake.  Check if it's
     running with the following command:


            ps aux | grep gpm



  If you get output like


            root      6115  0.0  0.4   832   316  ?  S   17:54   0:00 gpm -t PS/2



  then gpm is running and interfering with Quake.  gpm -k (as root)
  ought to stop gpm.  If it doesn't (gpm -k doesn't always work on my
  system),  kill gpm with the command killall gpm.

  If you never use gpm, you may want to stop it from running at startup.
  See the documentation for your distribution for information on how to
  do this.


  o  Is your mouse defined properly in libvga.config?  This file usually
     lives in /etc or /etc/vga.  Open it up and look for a line like


       mouse Microsoft



  On my system, this is the first option in the file.  Make sure the
  mouse type is appropriate for your hardware.



  5.1.4.  My Microsoft Intellimouse or Logitech MouseMan+ isn't working
  correctly.

  SVGAlib, which handles mouse input for SVGA and GL Quake/QW/Q2, didn't
  directly support the Intellimouse until version 1.3.0.  If you have a
  version of SVGAlib prior to 1.3.0, you should upgrade, then use mouse
  type IntelliMouse (for serial mice) or IMPS2 (for PS/2 mice) in your
  libvga.config file.


  5.1.5.  My mouse is "laggy" and seems much slower than under Windows.


  o  For many people, just cranking up the value of sensitivity in the
     game console cures the problem.  Setting sensitivity by hand in the
     console or in a .cfg file allows you to increase the mouse
     sensitivity more than the slider in the Options menu.  sensitivity
     15, for example.

  o  From Zoid's 1/7/98 .plan update:

       If you are experience video 'lag' in the GL renderer (the
       frame rate feels like it's lagging behind your mouse move-
       ment) type "gl_finish 1" in the console. This forces update
       on a per frame basis.



  o  The latest version of SVGAlib (1.3.0) provides a slew of parameters
     in libvga.config that you can use to customize the behavior of your
     mouse.  With the proper settings it should be possible to make your
     mouse feel any way you want.  On my system, just changing
     mouse_accel_type to normal (default is power) gave me the results I
     wanted.  I haven't messed with the other settings, and I don't
     pretend to have a clue about what they all do.

  o  The little slider


  5.1.6.  I have a Voodoo2, and, when I try to run with the gl renderer,
  it reports that I don't have a Voodoo card installed.

  There are different versions of Glide for Voodoo and Voodoo 2 cards.
  Be sure you downloaded the correct one for your system.



  5.1.7.  When I'm playing any of the Quake games under SVGAlib or GL
  and press CTRL-C, the game exits and sometimes leaves my console in an
  unusable state.

  5.1.8.  Sometimes when Quake/Quake II exits abnormally, it leaves my
  console unusable.


  Yes.  This bites.  SVGAlib catches the CTRL-C and decides what to do
  with it instead of allowing Quake to handle it.  I know of no way
  around this short of hacking SVGAlib.

  If you run your Quake games from a script that resets the keyboard and
  terminal like the one below, you'll run less chance of ending up with
  a hosed terminal if this does happen, though.


  ______________________________________________________________________
       #!/bin/sh
       ./quake2 $*
       kbd_mode -a
       reset

  ______________________________________________________________________



  5.1.9.  squake/quake2 fails to start and says " svgalib: cannot get
  I/O permissions"

  The Quake executables must run as root, so you must either run them as
  root or make them setuid root.  See the installation instructions in
  this document for details.


  5.1.10.  Sometimes after  playing one of the Quake games in X, key
  repeat doesn't work any more.

  For some reason, the X11 versions of Quake disable key repeat while
  they're running.  If the program exits abnormally for some reason, key
  repeat never get turned back on. Do


            xset r on



  to reenable it.


  5.1.11.  Quake/Quake II says "/dev/dsp : device not configured"

  Your sound hardware is not properly configured.  You may simply need
  to do a insmod sound, or it may be necessary to rebuild your kernel.
  RedHat users may need to invoke the sndconfig(8) utility.  See the
  documentation for your Linux distribution and/or the Linux Sound HOWTO
  for information on configuring your system's sound hardware.


  5.1.12.  GL Quake/Quake II run slower in Linux than in Windows. **

  The Windows 3Dfx GL miniport is heavily optimized for the things Quake
  II does.  Mesa on the other hand, is more general and less optimized
  As a result, Linux Quake II runs slower than under Windows.  This
  isn't a limitation of Linux, but a limitation of the current drivers.

  With the most recent releases of QuakeWorld and Quake II, the 3Dfx
  miniport mentioned above is available for Linux.  While it still
  doesn't bring Linux Quake performance to par with Windows Quake, it's
  another step in that direction.

  Additionally, for Pentium Pro and Pentium II users, there are some
  tweaks than can be done with memory buffering - the latest /dev/3dfx
  device driver has support for automatically setting this up for you.
  Enabling MTRRs can result in significant (10 fps on my system) GL
  Quake speedups. See http://glide.xxedgexx.com/MTRR.html for some more
  detailed information about this.


  5.1.13.  How can I start a server and log off, then come back to it
  later? **

  screen(1) is a great utility for this sort of thing.  It allows you to
  create many virtual screens in one tty and switch between them.
  Screen comes with most distributions.  You can download it from
  ftp://prep.ai.mit.edu/pub/gnu or any GNU mirror.

  Start screen by typing the command screen, then create a new screen
  window by pressing CTRL-A CTRL-C.  You won't see much as you do these
  things, but be assured, something is happening.

  Start a Quakeworld server:


            /usr/local/games/quake/qwsv



  Now open a new screen window with CTRL-A CTRL-C and start up a Quake
  II server:


            /usr/local/games/quake2/quake2 +set dedicated 1



  You can switch back and forth between your servers by pressing CTRL-A
  CTRL-N.

  Press CTRL-A CTRL-D to detach from the screen program.  Screen and
  your servers are still running, but they're no longer visible in your
  terminal window.  You can logoff now and your processes will continue
  to run normally.

  Use screen -r to re-attach to your previous screen process and access
  your servers again.

  That's all there is to it.  See the screen(1) man page for more
  detailed information.



  5.2.  Quake/QuakeWorld


  5.2.1.  Quake dies at startup with a segmentation fault.

  This usually means your network setup isn't right.  Try starting quake
  with the -noudp option and see if the error goes away.  If that fixes
  it, check your /etc/hosts file and verify there's an entry for your
  machine in it.  Use 127.0.0.1 for your IP address if you have a dialup
  account that gives you a different address each time you connect.


  5.2.2.  What's the difference between glqwcl , glqwcl.3dfxgl , and
  glqwcl.glx ? ++


  o  glqwcl is the standard GL Quakeworld client you've seen in previous
     versions.  It's linked against libMesaGL.so.2.

  o  glqwcl.3dfxgl is a script that runs glqwcl after preloading the
     3Dfx GL miniport library, lib3dfxgl.so.  Preloading the minport
     library causes its GL functions to get used instead of Mesa's.
     Since the GL minport is optimized for Quake, this is a good thing.

  o  glqwcl.glx is linked against standard OpenGL libriaries instead of
     Mesa.  This will allow glquake to run on other 3D hardware that is
     supported by some other OpenGL implementation.  This is an X
     application and so must be run from X.


  5.2.3.  When I run glqwcl.glx  fullscreen from X, I can't use my mouse
  or keyboard. ++


  Run glqwcl.glx with the +_windowed_mouse 1 option. GLX Quakeworld is
  running in a window, even though it appears to take up your whole
  screen.  If you move the mouse while the WM is in focus-follows-mouse
  mode, you're likely to move the pointer outside this window, and then
  Quake will stop responding to mouse and keyboard input.
  +_windowed_mouse 1 makes Quakeworld grab the mouse exclusively.


  5.3.  Quake II


  5.3.1.  When I try to run Quake II with the GL renderer, it fails and
  says "LoadLibrary("ref_gl.so") failed: Unable to resolve symbol"

  If immediately prior to the "Unable to resolve symbol" line, you have
  messages like "can't resolve symbol 'fxMesaCreateContext'", your Mesa
  library doesn't have glide support compiled in.  See section ``The GL
  renderer'' in the Quake II installation section for information on
  installing Mesa and glide.


  5.3.2.  Quake II fails with the message LoadLibrary("ref_XXX.so")
  failed: No such file or directory


  o  /etc/quake2.conf doesn't have the correct path to your Quake II
     directory in it.  This file should contain one line that is the
     directory Quake II lives in.

  o  If /etc/quake2.conf does contain the correct path, try removing the
     file and re-creating it by hand.  Some versions of Quake II for
     Linux included an incorrectly formatted quake2.conf file.


  o  Do you have SVGAlib installed?  Check /lib, /usr/lib and
     /usr/local/lib for a file called libvga.so.1.X.X, where the X's are
     some numbers.  If nothing turns up, you need to get and install
     SVGAlib to run Quake II outside of X.

  o  If the renderer in question is ref_gl.so, Mesa may not be properly
     installed.  Did you copy libMesaGL.so.2.6 to a library directory
     like the installation instruactions told you to?


  o  If the renderer in question is ref_gl.so, did you install the glide
     libraries?



  5.3.3.  When I update the brightness while using the GL renderer, and
  hit "apply," nothing happens!


  Type vid_restart in the console to make the changes take affect.



  5.3.4.  Note about the 3.17 distribution


  As of this writing, the most recent Quake II version is 3.19.  If for
  some reason, you're running version 3.17 instead, the following
  information may be helpful to you.

  Two text files (quake2.conf and fixperms.sh) in the 3.17 distribution
  were inadvertently saved in MS-DOS CR/LF text-file format instead of
  the unix LF format.  This means there's an extra carriage return
  character at the end of each line in these files and they're not going
  to behave right until you fix them.

  We'll run them through tr(1) to strip out the CR's.



            for i in fixperms.sh quake2.conf
            do
            mv $i $i.bak
            tr -d '\r' < $i.bak > $i
            done



  5.3.5.  When I run Quake II with +set vid_ref glx  fullscreen from X,
  I can't use my mouse or keyboard. ++


  Run GLX quake2 with the +set _windowed_mouse 1 option. GLX Quake2 is
  running in a window, even though it appears to take up your whole
  screen.  If you move the mouse while the WM is in focus-follows-mouse
  mode, you're likely to move the pointer outside this window, and then
  Quake II will stop responding to mouse and keyboard input.  +set
  _windowed_mouse 1 makes Quake II grab the mouse exclusively.


  5.3.6.  Why can't I change to some of the SVGA modes that aree in the
  Quake II Video menu? **

  SVGAlib probably doesn't know how to create the modes on your card.
  When Quake II starts up with the SVGA renderer (ref_soft.so), it
  prints a list of all the modes that SVGAlib tells it are available:



       ------- Loading ref_soft.so -------
       Using RIVA 128 driver, 4096KB.
       mode 320: 200 1075253220
       mode 320: 240 1075253220
       mode 320: 400 1075253220
       mode 360: 480 1075253220
       mode 640: 480 1075253220
       mode 800: 600 1075253220
       mode 1024: 768 1075253220
       mode 1280: 1024 1075253220



  These are the only modes you will be able to successfully switch to
  from the Video menu.  If say, 512x384 isn't on the list, selecting it
  from the Video menu won't work.

  SVGAlib does let you define new video modes for some chipsets in
  libvga.config, so you may be able create your own video mode this way.
  See the SVGAlib documentation for more detail on this topic.



  6.  Tips & Tricks



  6.1.  Running X and GL games without setuid

  If you only run the X and GL versions of Quake, QuakeWorld or Quake
  II, you don't need to run them with root permissions.  SVGA is the
  only mode that must be run as root.  The X versions just need access
  to /dev/dsp, the sound device.  The GL versions need access to the
  3Dfx card as well as to /dev/dsp.

  /dev/dsp needs to be readable and writeable by Quake.  Most
  distributions give it 662 (rw-rw--w-) permissions by default.  The
  simplest solution is to just chmod 666 /dev/dsp.  On most systems, the
  ability to read from the sound device will not pose a significant
  security threat.  If this approach is unacceptable for your system,
  create a group that owns /dev/dsp and make your Quake players members
  of that group.

  You need the /dev/3dfx driver from Daryll Strauss' glide page
  (http://glide.xxedgexx.com/3DfxRPMS.html) in order run glide
  applications (like GLQuake) non-root.  Download the Device3Dfx.xxx.rpm
  package and install according to the instructions on the web page.
  After you've installed the driver, make sure /dev/3dfx has 666
  permissions (chmod 666 /dev/3dfx).

  When /dev/dsp and /dev/3dfx are properly set up, you can remove the
  setuid bit from your Quake/QW/Q2 executables.  Just do (as root) chmod
  0755 XXXXX, where XXXXX is either glquake, quake.x11, or quake2.

  If you've been playing as root prior to making these changes, many of
  your Quake files (like savegames) may be owned by root and
  inaccessible to a normal user, so remember to change the files'
  ownership before you attempt to play the game non-root.



  6.2.  Running SVGA and GL games from X**

  The GLX Quakeworld and Quake II clients are native X applications, but
  since they use Mesa rather than the 3Dfx mini-driver, they're slower
  than the lib3dfxgl.so versions.  For this reason, you may still favor
  this way of starting games from X over using the GLX clients.

  This is based on a Linux Gazette 2 Cent Tip by Joey Hess
  (joey@kite.ml.org) The original is at
  http://www.ssc.com/lg/issue20/lg_tips20.html#squake

  Yes, it's possible to run the Quake games from X if you're root, but
  such behavior is naughty, and you still run the risk of having Quake
  crash and leave the console unresponsive.  With a little work you can
  make it possible for a regular user to run SVGA and GL Quake from X
  AND automatically switch back to X when the program is finished,
  regardless of whether it exited normally or not.

  Note: when I say "Quake" in the text below, I really mean "quake,
  glquake squake, qwcl, glqwcl, qwcl.x11 or quake2".


  o  First, you'll need the open(1) package by Jon Tombs. This is a set
     of two very small programs that allow you to switch between virtual
     consoles and start programs on them.  Download open from
     http://sunsite.unc.edu/pub/Linux/utils/console/.  You shouldn't
     have to do much more than make;make install to compile and install
     it. Once it's installed, you need to make the open and switchto
     executables setuid root.  So do this:


            cd /usr/local/bin
            chown root open switchto
            chmod 4755 open switchto



  o  Next, save the following code to a file called getvc.c:



     ___________________________________________________________________
             /* getvc.c
              * Prints the number of the current VC to stdout. Most of this code
              * was ripped from the open program, and this code is GPL'd
              *
              * Joey Hess, Fri Apr  4 14:58:50 EST 1997
              */

              #include <sys/vt.h>
              #include <fcntl.h>

              main () {
                int fd = 0;
                struct vt_stat vt;

                if ((fd = open("/dev/console",O_WRONLY,0)) < 0) {
                  perror("Failed to open /dev/console\n");
                  return(2);
                }
                if (ioctl(fd, VT_GETSTATE, &vt) < 0) {
                  perror("can't get VTstate\n");
                  close(fd);
                  return(4);
                }
                printf("%d\n",vt.v_active);
              }

              /* End of getvc.c */

     ___________________________________________________________________


  Compile it and install it somewhere in your $PATH:


            gcc getvc.c -o getvc
            strip getvc
            mv getvc /usr/local/bin



  o  Now create a script called runvc: your $PATH:

     ___________________________________________________________________
          #!/bin/sh
          # Run something on a VC, from X, and switch back to X when done.
          # GPL Joey Hess, Thu, 10 Jul 1997 23:27:08 -0400
          exec open -s -- sh -c "$* ; chvt `getvc`"

     ___________________________________________________________________


  Make it executable and put it somewhere in your $PATH:


            chmod 755 runvc
            mv runvc /usr/local/bin



  Now you can use the runvc command to start Quake. Continue to use
  whatever command line you usually use to start your game, but put
  runvc at the beginning:


            runvc ./quake2 +set vid_ref gl +connect quake.foo.com



  You'll automatically switch to a VC, run Quake and then switch back to
  X when it's done!



  6.3.  Keeping the mouse inside the window in X

  From the Quake II readme.linux file:

       By default, the mouse will not be 'tied' to the Quake2 win-
       dow.  To cause Quake2 to grab the mouse, select 'Windowed
       Mouse' from the video menu, or type '_windowed_mouse 0' at
       the console.  Do the reverse to release it.  You can bind
       keys to grab and release the mouse in the console, like so:
       bind i "_windowed_mouse 1" bind o "_windowed_mouse 0" Then
       "i" will grab the mouse and "o" will release it.



  6.4.  3Dfx "tweak" settings work in Linux too

  You may have seen or heard mention of ways to "tweak" Quake's OpenGL
  performance by setting various environment variables.  These variables
  are equally valid under Linux. You just set them slightly differently.
  If a Windows/DOS "tweak" guide tells you to:


            SET SST_GRXCLK=59



  Under Linux, do it like this:


            export SST_GRXCLK=59



  6.5.  The Poor Man's Server Browser

  Joe S. (jszabo@eden.rutgers.edu) suggests:


            a trick I do with qstat:
            I make a file of my favorite servers, then do
            qstat -f /C/quake2/file.txt | less



  hit control z to suspend, then copy the ip address or hostname I want
  with gpm to a command line like:



            ./quake2 +connect expert.eqclans.com



  Then I can use fg to go back to the list later...


  6.6.  Using lib3dfxgl.so  for Quake I**

  You can use the 3Dfx mini-driver (lib3dfxgl.so) from Quakeworld or
  Quake II with glquake too. Simply copy the glqwcl.3dfxgl or
  quake2.3dfxgl scripts to a new file, say glquake.3dfxgl. Then edit the
  glquake.3dfxgl script so it runs glquake instead of glqwcl.  The same
  restrictions about running as root apply here, as do the differences
  between running under glibc and libc5.  See the ``Quakeworld'' or
  ``Quake II'' sections for more information on lib3dfxgl.so.


  7.  Administrivia



  7.1.  New Versions of This Document

  New versions of this document will be periodically posted to
  comp.os.linux.answers and rec.games.computer.quake.misc.  They will
  also be uploaded to various WWW and FTP sites, including the LDP home
  page.

  New versions of this document will be periodically posted to
  rec.games.computer.quake.misc and comp.os.linux.misc.

  The latest version of the Linux Quake HOWTO can always be found at the
  following sites:


  o  http://www.linuxquake.com/

  o  http://webpages.mr.net/bobz/

  o  http://www.linuxgames.com/quake


  7.2.  Other Formats of This Document


  This document is available in a variety of different formats.  Far
  more than is necessary, actually.  You can find them at
  http://www.linuxquake.com/howto/other-formats.

  o  ASCII text

  o  ASCII text with backspace-overstrikes , suitable for viewing with
     man(1)

  o  HTML all zipped up and ready to be dropped into your web site

  o  Postscript

  o  PRC for viewing on your Palm Pilot with Aportis Doc

  o  SGML

  o  LaTeX

  o  All of the above are also available in a single convenient package


  7.3.  Distribution Policy


  Copyright (c) 1998, Bob Zimbinski, Brett A. Thomas and Mike Hallock.
  This document may be distributed under the terms set forth in the LDP
  license at sunsite.unc.edu/LDP/COPYRIGHT.html.

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the LDP license.  This document is
  distributed in the hope that it will be useful, but without any
  warranty; without even the implied warranty of merchantability or
  fitness for a particular purpose.  Heck, even if this document kills
  your dog, it's not our fault.

  See the LDP license for more details.


  7.4.  Revision History

  Sections of this document that were updated in the last revision have
  a ** after the section heading.  Sections updated in the revision
  prior to the last are marked with a ++.

  Below is the full revision history of this document.  It is not
  intended to be useful to anyone but the document authors.



  ______________________________________________________________________
       $Log: Quake-HOWTO.sgml,v $
       Revision 1.0.1.14  1998/10/05 19:54:17  bobz
       Removed the long-dead LinQuake page from list of Linux Quake sites
       Removed renaissoft.com link
       Minor wording changes throughout
       Added link to svgalib libc5 binary
       Added info about q2 demo
       Updated q2 installation info for the 3.19 release
       moved section about 3.17 textfile problems to the troubleshooting section
       Added part about lib3dfxgl.so to QW section
       Added part about GLX client to QW section
       Added part about lib3dfxgl.so to Q2 section
       Added part about GLX client to Q2 section
       Updated "slower than windows" FAQ
       Removed obsolete TS tip about glibc & q2
       Removed obsolete TS tip about playing w/CD mounted
       Changed tip about running glquake with lib3dfxgl.so
       Added instructions for Q2 mission pack 2
       Added pointer to svgalib libc5 binary
       Added FAQ about svgalib modes in Q2
       Added Cheapo proxy to software section
       Added screen FAQ
       Added qgraph to  software sectoin
       Decided I was lying when I promised a 3Dfx tweak section in the next update

       Revision 1.0.1.13  1998/09/02 01:35:18  bobz
       Fixed some broken url links
       Restored <author> tag
       added an acknowledgement
       added a reminder to the non-root tip
       added qlog listing

       Revision 1.0.1.12  1998/08/30 21:35:23  bobz
       Updated QuakeWorld install section for 2.30 release
       Updated QW file list
       Updated Quake 1.01 install info per email suggestion
       Added QW 2.30 caveat to "Glibc considerations" section
       Updated linux vs. windows speed section for new 3dfx miniport
       Added glqwcl versions FAQ
       Added troubleshooting tip about windows focus and glx
       Added a sentence about /dev/3dfx permissions
       Made runvc script usage clearer
       Added tip about using mini-driver with Quake & QuakeII

       Revision 1.0.1.11  1998/08/15 19:28:49  bobz
       Added glibc topic in Troubleshooting/FAQ section
       Moved non-setuid info to Tips & Tricks section
       Moved rcs log into Revision Hist section
       Changed distribution info a little until LDP wakes up
       Changed references to quake.medina.net to www.linuxquake.com
       Added linuxgames.com to list of places to get current version
       Changed 3dfx Howto pointer
       Moved explanation of change markings (** and ++) to intro section where they'll be noticed
       Mentioned zoid's GL driver port in the Win vs Linux FAQ
       Fixed credit and URL in q2getty

       Revision 1.0.1.10  1998/08/07 19:07:02  bobz
       Changed XQF url
       Added comments to the revision history section
       Started marking changed sections
       Added OS Considerations to troubleshooting section
       Added rcon to Other Software section
       Added ICE to Other Software section

       Revision 1.0.1.9  1998/08/04 21:06:22  bobz
       Updated Acknowledgements
       Added discussion of Quake security
       Added QIPX to "Related Software"
       Added ts topic about -noudp

       Revision 1.0.1.8  1998/08/03 22:09:28  bobz
       Updated and restructured the q2 mods section
       Minor change to gpm troubleshooting info
       Changed sound ts info
       Changed intellimouse ts info

       Revision 1.0.1.7  1998/08/03 04:55:21  mikeh
       Added "Playing" section of Q2 Mods & Addons section.
       Added "Intelimouse" section of Troubleshooting section
       Added RedHat sndconfig part to Troubleshooting section
       Fixed a few spacing problems, and one error message

       Revision 1.0.1.6  1998/08/03 02:01:13  bobz
       Changed abstract.

       Revision 1.0.1.5  1998/07/31 16:07:11  bobz
       Added gpm -k mention in mouse troubleshooting
       mentioned 'sensitivity' in mouse lag troubleshooting
       Added qstat|less tip
       Added "/dev/dsp not configured" to troubleshooting
       Slightly reworded part of the mod compiling section
       Added bit about running mods server side
       corrected required version # in q2 mission pack 1
       Updated acknowledgements section

       Revision 1.0.1.4  1998/07/30 21:08:46  bobz
       Fixed a problem with broken lines in <sect> tags

       Revision 1.0.1.3  1998/07/30 17:40:29  bobz
       Fixed broken link to Latex version.

       Revision 1.0.1.2  1998/07/30 15:46:40  bobz
       Test update.

       Revision 1.0.1.1  1998/07/30 15:43:59  bobz
       Changed version numbering scheme.

       Revision 1.10  1998/07/30 13:51:24  bobz
       Minor version reporting change

       Revision 1.9  1998/07/29 20:42:03  bobz
       Added some server links

       Revision 1.8  1998/07/29 17:37:15  bobz
       Added a Quake II model viewer to the Other Programs section

       Revision 1.7  1998/07/29 16:02:23  bobz
       Added some relative links in Other Formats to make it
       more portable.

       Revision 1.6  1998/07/29 15:18:12  bobz
       Version and date stamps back to the way they were

       Revision 1.5  1998/07/29 14:52:03  bobz
       Added tags for automatic timestamping

       Revision 1.4  1998/07/29 13:17:51  bobz
       Changed captured.com's web address per webmaster's request

       Revision 1.3  1998/07/29 02:11:02  bobz
       Ooops again.  Made "Other formats" a <sect> instead of a <sect1>.
       Revision 1.2  1998/07/29 01:55:41  bobz
       Oops.  I deleted the doctype tag...

       Revision 1.1  1998/07/29 01:48:34  bobz
       Added Other Formats section.
       Changed acknowledgments slightly
       Added ftp.medina.net to list of ftp sites.

       Revision 1.0 1998/07/28
       First publicly released version

       Revision 0.9 1998/07/25
       Restructured,rewritten and expanded by Bob Zimbinski.

       Revision 0.01 1998/06/16
       First Pre-Release version v0.01by Brett A. Thomas and Mike Hallock.

  ______________________________________________________________________



README for docs/howto

What you'll find here: Linux HOWTOs and mini-HOWTOs


RPM HOWTO

RPM at Idle

Donnie Barnes

   Red Hat, Inc.
   
       djb@redhat.com
   
   Copyright  1999 by Red Hat, Inc.
   Revision History
   Revision V3.0 3 November 1999
     _________________________________________________________________
   
   Table of Contents
   [1]Introduction
   [2]Overview
   [3]General Information
          
        [4]Acquiring RPM
        [5]RPM Requirements
                
   [6]Using RPM
   [7]Now what can I really do with RPM?
   [8]Building RPMs
          
        [9]The Spec File
        [10]The Header
        [11]Prep
        [12]Build
        [13]Install
        [14]Cleaning your system
        [15]Optional pre and post Install/Uninstall Scripts
        [16]Files
        [17]Changelog
                
   [18]Building It
          
        [19]The Source Directory Tree
        [20]Test Building
        [21]Generating the File List
        [22]Building the Package with RPM
        [23]Testing It
        [24]What to do with your new RPMs
        [25]What Now?
                
   [26]Multi-architectural RPM Building
          
        [27]Sample spec File
        [28]Optflags
        [29]Macros
        [30]Excluding Architectures from Packages
        [31]Finishing Up
                
Introduction

   RPM is the RPM Package Manager. It is an open packaging system
   available for anyone to use. It allows users to take source code for
   new software and package it into source and binary form such that
   binaries can be easily installed and tracked and source can be rebuilt
   easily. It also maintains a database of all packages and their files
   that can be used for verifying packages and querying for information
   about files and/or packages.
   
   Red Hat, Inc. encourages other distribution vendors to take the time
   to look at RPM and use it for their own distributions. RPM is quite
   flexible and easy to use, though it provides the base for a very
   extensive system. It is also completely open and available, though we
   would appreciate bug reports and fixes. Permission is granted to use
   and distribute RPM royalty free under the GPL.
   
   More complete documentation is available on RPM in the book by Ed
   Bailey, Maximum RPM. That book is available for download or purchase
   at [32]www.redhat.com.
     _________________________________________________________________
   
Overview

   First, let me state some of the philosophy behind RPM. One design goal
   was to allow the use of "pristine" sources. With RPP (our former
   packaging system of which none of RPM is derived), our source packages
   were the "hacked" sources that we built from.
   
   Theoretically, one could install a source RPP and then make it with no
   problems. But the sources were not the original ones, and there was no
   reference as to what changes we had to make to get it to build. One
   had to download the pristine sources separately. With RPM, you have
   the pristine sources along with patches that we used to compile from.
   We see this as a big advantage. Why? Several reasons. For one, if a
   new version of a program comes out, you don't necessarily have to
   start from scratch to get it to compile under RHL. You can look at the
   patch to see what you might need to do. All the compile-in defaults
   are easily visible this way.
   
   RPM is also designed to have powerful querying options. You can do
   searches through your entire database for packages or just certain
   files. You can also easily find out what package a file belongs to and
   where it came from. The RPM files themselves are compressed archives,
   but you can query individual packages easily and quickly because of a
   custom binary header added to the package with everything you could
   possibly need to know contained in uncompressed form. This allows for
   fast querying.
   
   Another powerful feature is the ability to verify packages. If you are
   worried that you deleted an important file for some package, just
   verify it. You will be notified of any anomalies. At that point, you
   can reinstall the package if necessary. Any config files that you had
   are preserved as well.
   
   We would like to thank the folks from the BOGUS distribution for many
   of their ideas and concepts that are included in RPM. While RPM was
   completely written by Red Hat, Inc., its operation is based on code
   written by BOGUS (PM and PMS).
     _________________________________________________________________
   
General Information

Acquiring RPM

   The best way to get RPM is to install Red Hat Linux. If you don't want
   to do that, you can still get and use RPM. It can be acquired from
   [33]ftp.redhat.com.
     _________________________________________________________________
   
RPM Requirements

   RPM itself should build on basically any Unix-like system. It has been
   built and used on Tru64 Unix, AIX, Solaris, SunOS, and basically all
   flavors of Linux.
   
   To build RPMs from source, you also need everything normally required
   to build a package, like gcc, make, etc.
     _________________________________________________________________
   
Using RPM

   In its simplest form, RPM can be used to install packages:
rpm -i foobar-1.0-1.i386.rpm

   The next simplest command is to uninstall a package:
rpm -e foobar

   One of the more complex but highly useful commands allows you to
   install packages via FTP. If you are connected to the net and want to
   install a new package, all you need to do is specify the file with a
   valid URL, like so:
rpm -i ftp://ftp.redhat.com/pub/redhat/rh-2.0-beta/RPMS/foobar-1.0-1.i386.rpm

   Please note, that RPM will now query and/or install via FTP.
   
   While these are simple commands, rpm can be used in a multitude of
   ways. To see which options are available in your version of RPM, type:
rpm --help

   You can find more details on what those options do in the RPM man
   page, found by typing:
man rpm
     _________________________________________________________________
   
Now what can I really do with RPM?

   RPM is a very useful tool and, as you can see, has several options.
   The best way to make sense of them is to look at some examples. I
   covered simple install/uninstall above, so here are some more
   examples:
   
     * Let's say you delete some files by accident, but you aren't sure
       what you deleted. If you want to verify your entire system and see
       what might be missing, you would do:
       
rpm -Va
        
     * Let's say you run across a file that you don't recognize. To find
       out which package owns it, you would do:
       
rpm -qf /usr/X11R6/bin/xjewel
        
       The output would be sometime like:
       
xjewel-1.6-1
        
     * You find a new koules RPM, but you don't know what it is. To find
       out some information on it, do:
       
rpm -qpi koules-1.2-2.i386.rpm
        
       The output would be:
       
Name        : koules                      Distribution: Red Hat Linux Colgate
Version     : 1.2                               Vendor: Red Hat Software
Release     : 2                             Build Date: Mon Sep 02 11:59:12 199
6
Install date: (none)                        Build Host: porky.redhat.com
Group       : Games                         Source RPM: koules-1.2-2.src.rpm
Size        : 614939
Summary     : SVGAlib action game with multiplayer, network, and sound support
Description :
This arcade-style game is novel in conception and excellent in execution.
No shooting, no blood, no guts, no gore.  The play is simple, but you
still must develop skill to play.  This version uses SVGAlib to
run on a graphics console.
        
     * Now you want to see what files the koules RPM installs. You would
       do:
       
rpm -qpl koules-1.2-2.i386.rpm
        
       The output is:
       
/usr/doc/koules
/usr/doc/koules/ANNOUNCE
/usr/doc/koules/BUGS
/usr/doc/koules/COMPILE.OS2
/usr/doc/koules/COPYING
/usr/doc/koules/Card
/usr/doc/koules/ChangeLog
/usr/doc/koules/INSTALLATION
/usr/doc/koules/Icon.xpm
/usr/doc/koules/Icon2.xpm
/usr/doc/koules/Koules.FAQ
/usr/doc/koules/Koules.xpm
/usr/doc/koules/README
/usr/doc/koules/TODO
/usr/games/koules
/usr/games/koules.svga
/usr/games/koules.tcl
/usr/man/man6/koules.svga.6
        
   These are just several examples. More creative ones can be thought of
   really easy once you are familiar with RPM.
     _________________________________________________________________
   
Building RPMs

   Building RPMs is fairly easy to do, especially if you can get the
   software you are trying to package to build on its own. We assume here
   that you know how to build software from source. If you don't you
   probably shouldn't be starting with this document.
   
   The basic procedure to build an RPM is as follows:
   
     * Get the source code you are building the RPM for to build on your
       system.
     * Make a patch of any changes you had to make to the sources to get
       them to build properly.
     * Make a spec file for the package.
     * Make sure everything is in its proper place.
     * Build the package using RPM.
       
   Under normal operation, RPM builds both binary and source packages.
     _________________________________________________________________
   
The Spec File

   We'll begin with discussion of the spec file. Spec files are required
   to build a package. The spec file is a description of the software
   along with instructions on how to build it and a file list for all the
   binaries that get installed.
   
   You'll want to name your spec file according to a standard convention.
   It should be the package name-dash-version number-dash-release
   number-dot-spec. This will ensure that if you install multiple source
   RPMs for different versions of the same package that at least the spec
   files remain intact.
   
   Here is a small spec file (eject-2.0.2-1.spec):
Summary: A program that ejects removable media using software control.
Name: eject
Version: 2.0.2
Release: 3
Copyright: GPL
Group: System Environment/Base
Source: http://metalab.unc.edu/pub/Linux/utils/disk-management/eject-2.0.2.tar.
gz
Patch: eject-2.0.2-buildroot.patch
BuildRoot: /var/tmp/%{name}-buildroot

%description
The eject program allows the user to eject removable media
(typically CD-ROMs, floppy disks or Iomega Jaz or Zip disks)
using software control. Eject can also control some multi-
disk CD changers and even some devices' auto-eject features.

Install eject if you'd like to eject removable media using
software control.

%prep
%setup -q
%patch -p1 -b .buildroot

%build
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/man/man1

install -s -m 755 eject $RPM_BUILD_ROOT/usr/bin/eject
install -m 644 eject.1 $RPM_BUILD_ROOT/usr/man/man1/eject.1

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README TODO COPYING ChangeLog

/usr/bin/eject
/usr/man/man1/eject.1

%changelog
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
- auto rebuild in the new build environment (release 3)

* Wed Feb 24 1999 Preston Brown <pbrown@redhat.com>
- Injected new description and group.

[ Some changelog entries trimmed for brevity.  -Editor. ]
     _________________________________________________________________
   
The Header

   The header has some standard fields in it that you need to fill in.
   There are a few caveats as well. The fields must be filled in as
   follows:
   
     * Summary: This is a one line description of the package.
     * Name: This must be the name string from the rpm filename you plan
       to use.
     * Version: This must be the version string from the rpm filename you
       plan to use.
     * Release: This is the release number for a package of the same
       version (ie. if we make a package and find it to be slightly
       broken and need to make it again, the next package would be
       release number 2).
     * Copyright: This line tells how a package is copyrighted. You
       should use something like GPL, BSD, MIT, public domain,
       distributable, or commercial.
     * Group: This is a group that the package belongs to in a higher
       level package tool or the Red Hat installer.
     * Source: This line points at the HOME location of the pristine
       source file. It is used if you ever want to get the source again
       or check for newer versions. Caveat: The filename in this line
       MUST match the filename you have on your own system (ie. don't
       download the source file and change its name). You can also
       specify more than one source file using lines like:
       
Source0: blah-0.tar.gz
Source1: blah-1.tar.gz
Source2: fooblah.tar.gz
        

       These files would go in the SOURCES directory. (The directory
       structure is discussed in a later section, "The Source Directory
       Tree".)
     * Patch: This is the place you can find the patch if you need to
       download it again. Caveat: The filename here must match the one
       you use when you make YOUR patch. You may also want to note that
       you can have multiple patch files much as you can have multiple
       sources. ] You would have something like:
       
Patch0: blah-0.patch
Patch1: blah-1.patch
Patch2: fooblah.patch
        

       These files would go in the SOURCES directory.
     * Group: This line is used to tell high level installation programs
       (such as Red Hat's gnorpm) where to place this particular program
       in its hierarchical structure. You can find the latest description
       in /usr/doc/rpm*/GROUPS. The group tree currently looks something
       like this:
       
Amusements/Games
Amusements/Graphics
Applications/Archiving
Applications/Communications
Applications/Databases
Applications/Editors
Applications/Emulators
Applications/Engineering
Applications/File
Applications/Internet
Applications/Multimedia
Applications/Productivity
Applications/Publishing
Applications/System
Applications/Text
Development/Debuggers
Development/Languages
Development/Libraries
Development/System
Development/Tools
Documentation
System Environment/Base
System Environment/Daemons
System Environment/Kernel
System Environment/Libraries
System Environment/Shells
User Interface/Desktops
User Interface/X
User Interface/X Hardware Support
        

     * BuildRoot: This line allows you to specify a directory as the
       "root" for building and installing the new package. You can use
       this to help test your package before having it installed on your
       machine.
     * %description It's not really a header item, but should be
       described with the rest of the header. You need one description
       tag per package and/or subpackage. This is a multi-line field that
       should be used to give a comprehensive description of the package.
     _________________________________________________________________
   
Prep

   This is the second section in the spec file. It is used to get the
   sources ready to build. Here you need to do anything necessary to get
   the sources patched and setup like they need to be setup to do a make.
   
   One thing to note: Each of these sections is really just a place to
   execute shell scripts. You could simply make an sh script and put it
   after the %prep tag to unpack and patch your sources. We have made
   macros to aid in this, however.
   
   The first of these macros is the %setup macro. In its simplest form
   (no command line options), it simply unpacks the sources and cd's into
   the source directory. It also takes the following options:
   
     * -n name will set the name of the build directory to the listed
       name. The default is $NAME-$VERSION. Other possibilities include
       $NAME, ${NAME}${VERSION}, or whatever the main tar file uses.
       (Please note that these "$" variables are not real variables
       available within the spec file. They are really just used here in
       place of a sample name. You need to use the real name and version
       in your package, not a variable.)
     * -c will create and cd to the named directory before doing the
       untar.
     * -b # will untar Source# before cd'ing into the directory (and this
       makes no sense with -c so don't do it). This is only useful with
       multiple source files.
     * -a # will untar Source# after cd'ing into the directory.
     * -T This option overrides the default action of untarring the
       Source and requires a -b 0 or -a 0 to get the main source file
       untarred. You need this when there are secondary sources.
     * -D Do not delete the directory before unpacking. This is only
       useful where you have more than one setup macro. It should only be
       used in setup macros after the first one (but never in the first
       one).
       
   The next of the available macros is the %patch macro. This macro helps
   automate the process of applying patches to the sources. It takes
   several options, listed below:
   
     * # will apply Patch# as the patch file.
     * -p # specifies the number of directories to strip for the patch(1)
       command.
     * -P The default action is to apply Patch (or Patch0). This flag
       inhibits the default action and will require a 0 to get the main
       source file untarred. This option is useful in a second (or later)
       %patch macro that required a different number than the first
       macro.
     * You can also do %patch# instead of doing the real command: %patch
       # -P
     * -b extension will save originals as filename.extension before
       patching.
       
   That should be all the macros you need. After you have those right,
   you can also do any other setup you need to do via sh type scripting.
   Anything you include up until the %build macro (discussed in the next
   section) is executed via sh. Look at the example above for the types
   of things you might want to do here.
     _________________________________________________________________
   
Build

   There aren't really any macros for this section. You should just put
   any commands here that you would need to use to build the software
   once you had untarred the source, patched it, and cd'ed into the
   directory. This is just another set of commands passed to sh, so any
   legal sh commands can go here (including comments).
   
     Important: Your current working directory is reset in each of these
     sections to the toplevel of the source directory, so keep that in
     mind. You can cd into subdirectories if necessary.
     
   The variable RPM_OPT_FLAGS is set using values in /usr/lib/rpm/rpmrc.
   Look there to make sure you are using values appropriate for your
   system (in most cases you are). Or simply don't use this variable in
   your spec file. It is optional.
     _________________________________________________________________
   
Install

   There aren't really any macros here, either. You basically just want
   to put whatever commands here that are necessary to install. If you
   have make install available to you in the package you are building,
   put that here. If not, you can either patch the makefile for a make
   install and just do a make install here, or you can hand install them
   here with sh commands. You can consider your current directory to be
   the toplevel of the source directory.
   
   The variable RPM_BUILD_ROOT is available to tell you the path set as
   the Buildroot: in the header. Using build roots are optional but are
   highly recommended because they keep you from cluttering your system
   with software that isn't in your RPM database (building an RPM doesn't
   touch your database...you must go install the binary RPM you just
   built to do that).
     _________________________________________________________________
   
Cleaning your system

   It's a good idea to always make sure there is a clean build root
   before building a package a second time on a system. The %clean macro
   will help with that. Simply put the proper commands there to blow away
   a former build root. Anal, err, careful folks may want to test that
   RPM_BUILD_ROOT wasn't set to / before doing something this volatile.
     _________________________________________________________________
   
Optional pre and post Install/Uninstall Scripts

   You can put scripts in that get run before and after the installation
   and uninstallation of binary packages. A main reason for this is to do
   things like run ldconfig after installing or removing packages that
   contain shared libraries. The macros for each of the scripts is as
   follows:
   
     * %pre is the macro to do pre-install scripts.
     * %post is the macro to do post-install scripts.
     * %preun is the macro to do pre-uninstall scripts.
     * %postun is the macro to do post-uninstall scripts.
       
   The contents of these sections should just be any sh style script,
   though you do not need the #!/bin/sh.
     _________________________________________________________________
   
Files

   This is the section where you must list the files for the binary
   package. RPM has no way to know what binaries get installed as a
   result of make install. There is NO way to do this. Some have
   suggested doing a find before and after the package install. With a
   multiuser system, this is unacceptable as other files may be created
   during a package building process that have nothing to do with the
   package itself.
   
   There are some macros available to do some special things as well.
   They are listed and described here:
   
     * %doc is used to mark documentation in the source package that you
       want installed in a binary install. The documents will be
       installed in /usr/doc/$NAME-$VERSION-$RELEASE. You can list
       multiple documents on the command line with this macro, or you can
       list them all separately using a macro for each of them.
     * %config is used to mark configuration files in a package. This
       includes files like sendmail.cf, passwd, etc. If you later
       uninstall a package containing config files, any unchanged files
       will be removed and any changed files will get moved to their old
       name with a .rpmsave appended to the filename. You can list
       multiple files with this macro as well.
     * %dir marks a single directory in a file list to be included as
       being owned by a package. By default, if you list a directory name
       WITHOUT a %dir macro, EVERYTHING in that directory is included in
       the file list and later installed as part of that package.
     * %defattr allows you to set default attributes for files listed
       after the defattr declaration. The attributes are listed in the
       form (mode, owner, group) where the mode is the octal number
       representing the bit pattern for the new permissions (like chmod
       would use), owner is the username of the owner, and group is the
       group you would like assigned. You may leave any field to the
       installed default by simply placing a - in its place, as was done
       in the mode field for the example package.
     * %files -f <filename> will allow you to list your files in some
       arbitrary file within the build directory of the sources. This is
       nice in cases where you have a package that can build it's own
       filelist. You then just include that filelist here and you don't
       have to specifically list the files.
       
   The biggest caveat in the file list is listing directories. If you
   list /usr/bin by accident, your binary package will contain every file
   in /usr/bin on your system.
     _________________________________________________________________
   
Changelog

   This is a log of what changes occurred when the package is updated. If
   you are modifying an existing RPM it is a good idea to list what
   changes you made here.
   
   The format is simple. Start each new entry with a line with a *
   followed by the date, your name, and your email address. The date
   should appear in the same format that is output by:
        date +"%a %b %d %Y"

   The rest of the section is a free text field, but should be organized
   in some coherent manner.
     _________________________________________________________________
   
Building It

The Source Directory Tree

   The first thing you need is a properly configured build tree. This is
   configurable using the /etc/rpmrc file. Most people will just use
   /usr/src.
   
   You may need to create the following directories to make a build tree:
   
     * BUILD is the directory where all building occurs by RPM. You don't
       have to do your test building anywhere in particular, but this is
       where RPM will do it's building.
     * SOURCES is the directory where you should put your original source
       tar files and your patches. This is where RPM will look by
       default.
     * SPECS is the directory where all spec files should go.
     * RPMS is where RPM will put all binary RPMs when built.
     * SRPMS is where all source RPMs will be put.
     _________________________________________________________________
   
Test Building

   The first thing you'll probably want to to is get the source to build
   cleanly without using RPM. To do this, unpack the sources, and change
   the directory name to $NAME.orig. Then unpack the source again. Use
   this source to build from. Go into the source directory and follow the
   instructions to build it. If you have to edit things, you'll need a
   patch. Once you get it to build, clean the source directory. Make sure
   and remove any files that get made from a configure script. Then cd
   back out of the source directory to its parent. Then you'll do
   something like:
diff -uNr dirname.orig dirname > ../SOURCES/dirname-linux.patch

   This will create a patch for you that you can use in your spec file.
   Note that the "linux" that you see in the patch name is just an
   identifier. You might want to use something more descriptive like
   "config" or "bugs" to describe why you had to make a patch. It's also
   a good idea to look at the patch file you are creating before using it
   to make sure no binaries were included by accident.
     _________________________________________________________________
   
Generating the File List

   Now that you have source that will build and you know how to do it,
   build it and install it. Look at the output of the install sequence
   and build your file list from that to use in the spec file. We usually
   build the spec file in parallel with all of these steps. You can
   create the initial one and fill in the easy parts, and then fill in
   the other steps as you go.
     _________________________________________________________________
   
Building the Package with RPM

   Once you have a spec file, you are ready to try and build your
   package. The most useful way to do it is with a command like the
   following:
rpm -ba foobar-1.0.spec

   There are other options useful with the -b switch as well:
   
     * p means just run the prep section of the specfile.
     * l is a list check that does some checks on %files.
     * c do a prep and compile. This is useful when you are unsure of
       whether your source will build at all. It seems useless because
       you might want to just keep playing with the source itself until
       it builds and then start using RPM, but once you become accustomed
       to using RPM you will find instances when you will use it.
     * ido a prep, compile, and install.
     * b prep, compile, install, and build a binary package only.
     * abuild it all (both source and binary packages).
       
   There are several modifiers to the -b switch. They are as follows:
   
     * --short-circuit will skip straight to a specified stage (can only
       be used with c and i).
     * --clean removes the build tree when done.
     * --keep-temps will keep all the temp files and scripts that were
       made in /tmp. You can actually see what files were created in /tmp
       using the -v option.
     * --test does not execute any real stages, but does keep-temp.
     _________________________________________________________________
   
Testing It

   Once you have a source and binary rpm for your package, you need to
   test it. The easiest and best way is to use a totally different
   machine from the one you are building on to test. After all, you've
   just done a lot of make install's on your own machine, so it should be
   installed fairly well.
   
   You can do an rpm -e packagename on the package to test, but that can
   be deceiving because in building the package, you did a make install.
   If you left something out of your file list, it will not get
   uninstalled. You'll then reinstall the binary package and your system
   will be complete again, but your rpm still isn't. Make sure and keep
   in mind that just because you do a rpm -ba package, most people
   installing your package will just be doing the rpm -i package. Make
   sure you don't do anything in the build or install sections that will
   need to be done when the binaries are installed by themselves.
     _________________________________________________________________
   
What to do with your new RPMs

   Once you've made your own RPM of something (assuming its something
   that hasn't already been RPM'ed), you can contribute your work to
   others (also assuming you RPM'ed something freely distributable). To
   do so, you'll want to upload it to [34]ftp.redhat.com.
     _________________________________________________________________
   
What Now?

   Please see the above sections on Testing and What to do with new RPMs.
   We want all the RPMs available we can get, and we want them to be good
   RPMs. Please take the time to test them well, and then take the time
   to upload them for everyone's benefit. Also, please make sure you are
   only uploading freely available software. Commercial software and
   shareware should not be uploaded unless they have a copyright
   expressly stating that this is allowed. This includes ssh, pgp, etc.
     _________________________________________________________________
   
Multi-architectural RPM Building

   RPM can now be used to build packages for the Intel i386, the Digital
   Alpha running Linux, and the Sparc (and others). There are several
   features that make building packages on all platforms easy. The first
   of these is the "optflags" directive in the /etc/rpmrc. It can be used
   to set flags used when building software to architecture specific
   values. Another feature is the "arch" macros in the spec file. They
   can be used to do different things depending on the architecture you
   are building on. Another feature is the "Exclude" directive in the
   header.
     _________________________________________________________________
   
Sample spec File

   The following is part of the spec file for the "fileutils" package. It
   is setup to build on both the Alpha and the Intel.
Summary: GNU File Utilities
Name: fileutils
Version: 3.16
Release: 1
Copyright: GPL
Group: Utilities/File
Source0: prep.ai.mit.edu:/pub/gnu/fileutils-3.16.tar.gz
Source1: DIR_COLORS
Patch: fileutils-3.16-mktime.patch

%description
These are the GNU file management utilities.  It includes programs
to copy, move, list, etc, files.

The ls program in this package now incorporates color ls!

%prep
%setup

%ifarch alpha
%patch -p1
autoconf
%endif
%build
configure --prefix=/usr --exec-prefix=/
make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s

%install
rm -f /usr/info/fileutils*
make install
gzip -9nf /usr/info/fileutils*

.
.
.

     _________________________________________________________________
   
Optflags

   In this example, you see how the "optflags" directive is used from the
   /etc/rpmrc. Depending on which architecture you are building on, the
   proper value is given to RPM_OPT_FLAGS. You must patch the Makefile
   for your package to use this variable in place of the normal
   directives you might use (like -m486 and -O2). You can get a better
   feel for what needs to be done by installing this source package and
   then unpacking the source and examine the Makefile. Then look at the
   patch for the Makefile and see what changes must be made.
     _________________________________________________________________
   
Macros

   The %ifarch macro is very important to all of this. Most times you
   will need to make a patch or two that is specific to one architecture
   only. In this case, RPM will allow you to apply that patch to just one
   architecture only.
   
   In the above example, fileutils has a patch for 64 bit machines.
   Obviously, this should only be applied on the Alpha at the moment. So,
   we add an %ifarch macro around the 64 bit patch like so:
%ifarch axp
%patch1 -p1
%endif

   This will insure that the patch is not applied on any architecture
   except the alpha.
     _________________________________________________________________
   
Excluding Architectures from Packages

   So that you can maintain source RPMs in one directory for all
   platforms, we have implemented the ability to "exclude" packages from
   being built on certain architectures. This is so you can still do
   things like
rpm --rebuild /usr/src/SRPMS/*.rpm

   and have the right packages build. If you haven't yet ported an
   application to a certain platform, all you have to do is add a line
   like:
ExcludeArch: alpha

   to the header of the spec file of the source package. Then rebuild the
   package on the platform that it does build on. You'll then have a
   source package that builds on an Intel and can easily be skipped on an
   Alpha.
     _________________________________________________________________
   
Finishing Up

   Using RPM to make multi-architectural packages is usually easier to do
   than getting the package itself to build both places. As more of the
   hard packages get built this is getting much easier, however. As
   always, the best help when you get stuck building an RPM is to look a
   similar source package.

References

   1. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#INTRO
   2. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#OVERVIEW
   3. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#GEN-INFO
   4. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#ACQUIRE
   5. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#REQUIRE
   6. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#USE
   7. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#RPM-DO
   8. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#BUILD
   9. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#SPEC-FILE
  10. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#HEADER
  11. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#PREP
  12. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#BUILD-SPEC
  13. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#INSTALL
  14. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#CLEANING
  15. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#SCRIPTS
  16. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#FILES
  17. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#CHANGELOG
  18. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#BUILD-IT
  19. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#SOURCE-TREE
  20. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#TEST-BUILD
  21. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#GENERATE-FILE
  22. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#BUILD-PKG
  23. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#TESTING-IT
  24. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#WHAT-TO-DO
  25. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#WHAT-NOW
  26. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#MULTI-ARCH
  27. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#MULTI-ARCH-SPEC
  28. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#OPTFLAGS
  29. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#MACROS
  30. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#EXCUDE-ARCH
  31. file://localhost/export/sunsite/users/gferg/work/00_RPM-HOWTO.html#FINISH
  32. http://www.redhat.com/
  33. ftp://ftp.redhat.com/pub/redhat/code/rpm
  34. ftp://ftp.redhat.com/
  The Linux Reading List HOWTO
  by Eric S. Raymond
  v1.11, 23 March 2000

  This document lists the book I think are most valuable to a person
  trying to learn Unix (especially Linux) top to bottom.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Purpose of this document
     1.2 New versions of this document
     1.3 Feedback and Corrections
     1.4 Related Resources
     1.5 Conventions Used In This Document

  2. Books on Culture, History, and Pragmatics

  3. Books on General Unix/Linux

     3.1 Linux Installation and Administration
     3.2 Using Unix & Linux
     3.3 System Security

  4. Books on Shell, Script, and Web Programming

  5. Books on Text Formatting

     5.1 Tex and LaTeX

  6. Good Programming Style

  7. Books on C and C++ Programming

     7.1 C and C++
     7.2 C System Call Interface

  8. Books on Networking

  9. Books on Unix Kernel Implementation

     9.1 Ancestors of Linux
     9.2 Linux
     9.3 Relatives of Linux

  10. Books on Intel processor architecture and programming

  11. Books on PC-Class Hardware

  12. Administrivia

     12.1 Terms of Use
     12.2 History


  ______________________________________________________________________

  1.  Introduction



  1.1.  Purpose of this document

  This document lists what I consider to be the essential book-length
  references for learning Unix (especially Linux) and how to program
  under it.


  1.2.  New versions of this document

  New versions of the Linux Reading List HOWTO will be periodically
  posted to comp.os.linux.answers.  They will also be uploaded to
  various Linux WWW and FTP sites, including the LDP home page.

  You can also view the latest version of this on the World Wide Web via
  the URL <http://sunsite.unc.edu/LDP/HOWTO/Reading-List-HOWTO.html>.


  1.3.  Feedback and Corrections

  If you have questions or comments about this document (or just want to
  suggest a book that you think should be on it), please feel free to
  mail Eric S. Raymond, at esr@thyrsus.com. I welcome any suggestions or
  criticisms.


  1.4.  Related Resources

  For on-line HOWTOs, magazines, and other non-book material, see the
  Linux Documentation Project home page
  <http://sunsite.unc.edu/LDP/HOWTO>.

  Some years ago I wrote a less Linux-focused Unix bibliography that may
  still be of some interest and retains a certain amusement value.  You
  can find the Loginataka at
  <http://www.tuxedo.org/~esr/faqs/loginataka.html>.

  SAGE, the System Administrator's Guild, maintains an excellent list of
  relevant books at
  <http://www.usenix.org/sage/sysadmins/books/booklist.html>.


  1.5.  Conventions Used In This Document

  Comments not in quotes below are either mine, or I have seen no reason
  to change them from those of Jim Haynes (previous maintainer of this
  document).  Comments sent in by others are in quotes, and have the
  name of the commentator before them (JH is Jim Haynes).

  "See" URLs attached to publishing information point directly into the
  publisher's web catalog and typically take you to a page containing a
  cover shot, blurbs, and ordering information.  Books that don't have
  these lack them because the publisher is using frames and the catalog
  pages can't be bookmarked.

  Topic listings go roughly from the outside in (culture to user-land
  programming to kernel programming to hardware).  Within sections I
  have tried to list the most useful books first insofar as I am
  familiar with them.  It's just an embarrassing coincidence that this
  lists one of my books first, honest! (Suggestions for a better
  organization cheerfully accepted.)

  2.  Books on Culture, History, and Pragmatics


     The New Hacker's Dictionary (Third Edition)
        Raymond, Eric S.; MIT Press; 1996; ISBN 0-262-68092-0; 547pp.
        See  <http://www-mitpress.mit.edu/book-
        home.tcl?isbn=0262680920>.

        Um, er.  A guide to Internet culture. Lots of people like it.
        HTML at the Jargon File Resource  Page <http://www.tuxedo.org>.


     A Quarter Century of Unix
        Salus, Peter H.; Addison-Wesley; 1994; ISBN 0-201-54777-5;
        256pp.
        See  <http://www.awl-he.com/titles/13683.html>

        Linux is part of the Unix tradition.  This book is an oral
        history of Unix -- how it originated, how it evolved, how it
        spread -- by the people who were there.


     The Mythical Man Month (Anniversary Edition)
        Brooks, Frederick P.; Addison-Wesley 1995 (ISBN 0-201-83595-9).
        See  <http://www.awl-he.com/titles/14147.html>.

        The one book on software engineering that everyone should read.

        Alan Cox: "This I'd recommend not for its technical value but
        for its application of common sense and reality to computing
        projects." JH: "Ah, yes.  What if Linus had been given 200
        programmers and had been told to produce Linux in 3 months!"


     Bell System Technical Journal, July-August 1978, Vol. 57, No. 6,
        part 2
        AT&T; 416 pp.

        Many early papers on Unix, including Ritchie & Thompson, "The
        UNIX Time Sharing System"; Thompson, "UNIX Implementation";
        Ritchie, "A Retrospective"; Bourne, "The UNIX Shell"...

  3.  Books on General Unix/Linux



  3.1.  Linux Installation and Administration


     Linux Installation and Getting Started
        Welsh, Matt; LDP; 1997.  Available on the LDP home page, or
        directly at  <http://linuxdoc.org/LDP/gs/>.

        How to bring up Linux.  Explains a lot of Linux basics.  Covers
        basic system administration.


     Linux System Administrator's Guide
        Wirzenius, Lars; LDP; 1997.  Available on the LDP home page, or
        directly at  <http://www.linuxdoc.org/LDP/sag/>.

        An excellent first book on how to maintain and administer a
        Linux system.


     Essential System Administration (Second Edition)
        Frisch, Aeleen; O'Reilly; 1995; ISBN 1-56592-127-5; $34.95.
        See  <http://www.ora.com/catalog/esa2/noframes.html>.

        More in-depth coverage of normal system-administration tasks.
        Not Linux-specific but contains Linux material.
  3.2.  Using Unix & Linux


     Linux in a Nutshell (2nd edition)
        Hekman, Jessica P. et al.; O'Reilly; ISBN 1-56592-585-8,; 1999;
        628 pp. $29.95.
        See  <http://www.oreilly.com/catalog/linuxnut2/>.

        According to O'Reilly, "The Desktop Reference for Linux".  For
        Linux users this obsoletes their "Unix In a Nutshell" which was
        SVr4/Solaris-oriented.


     Running Linux (3rd Edition)
        Welsh, Matt, & Matthias Kallw Dalheimer & Kaufman, Lar;
        O'Reilly; ISBN 1-56592-469-X; 1999; 650pp; $34.95.
        See  <http://www.oreilly.com/catalog/runux3/>.

        Everything you need in order to understand, install, and use the
        Linux operating system.  Excellent beginner's book.


     Hands-on-Linux
        Sobell, Mark G.; Addison-Wesley; ISBN ISBN 0-201-32569-1; 1998;
        1015 pp.

        Just what the title says -- practical tutorials in basic Unix,
        shells, editors, mail programs, networking, Web tools, and
        utilities.  Covers some system administration fundamentals.
        (This appears to be a repackaging of 1997's ``A Practical Guide
        to Linux'' from the same author, without Caldera OpenLinux Lite
        included.)


  3.3.  System Security


     Practical Unix and Internet Security (2nd Edition)
        Garfinkel, Simpson, and Spafford, Gene; O'Reilly Associates;
        ISBN 0-56592-148-8; 1004pp; 1996; $39.95.
        See  <http://www.ora.com/catalog/puis/noframes.html>.

        Ronald P. Miller: "Some overlap with Essential System Admin.,
        but all in all a solid book on security, especially for those
        aspiring to allow multiple-user, dial-up/net access to their
        Linux boxes."


     Firewalls & Internet Security
        Cheswick, William R. & Bellovin, Steven M.; Addison-Wesley;
        1994; ISBN 0-201-63357-4; 320pp.

  4.  Books on Shell, Script, and Web Programming


     Programming Perl (Second Edition)
        Wall, Larry & Christiansen, Tom & Schwartz, Randal; O'Reilly;
        1997; ISBN 0-56592-149-6; 644pp.
        See  <http://www.ora.com/catalog/pperl2/noframes.html>.

        Shell (as a programming language for more than trivial
        scripting) is dead.  Perl rules in its place.  This is the
        second edition of the definitive Perl book -- vastly better
        organized than the first, and it covers Perl 5.

        Emmanuel Pierre keeps a short list of Perl books <www.e-
        nef.com/perl/listeperl.html>.


     Programming Python
        Lutz, Mark; O'Reilly; 1997; ISBN 0-56592-197-6; 880pp.
        See  <http://www.ora.com/catalog/python/noframes.html>.

        The next step beyond Perl.  Python is beautifully designed, has
        better integration with C, and scales up better to large
        projects.


     HTML: The Definitive Guide (3rd Edition)
        Musciano, Chuck & Kennedy. Bill; O'Reilly; 1998; ISBN
        1-56592-492-4; 576pp.
        See  <http://www.oreilly.com/catalog/html3/>.

        The best HTML tutorial/reference I have ever seen, and the only
        HTML book you need unless you also want to do CGI.


     The Unix Programming Environment
        Kernighan, Brian, and Pike, Rob; Prentice-Hall; 1984; ISBN
        0-13-937681-X; 1984.

        A true classic -- possibly the best single-book exposition of
        the Unix philosophy.

  5.  Books on Text Formatting


  5.1.  Tex and LaTeX



     The LaTeX Companion
        Goossens, Michael & Mittlebach, Frank, & Samarin, Alexander;
        Addison-Wesley; 1994; ISBN 0-201-54199-8; 530pp.
        See  <http://www.awl-he.com/titles/13661.html>.

        `If you are one of those users who would like to know how LaTeX
        can be extended to create the nicest documents possible without
        becoming a (La)TeX guru, then this book is for you' --- from the
        Preface.  Bruce Thompson adds: "A very nice book providing a lot
        of information about the new extensions to LaTeX, provides a
        large number of examples showing precisely how your document's
        layout can be manipulated"


     LaTeX: A Document Preparation System (Second Edition)
        Lamport, Leslie; Addison-Wesley; 1994; ISBN 0-201-52983-1;
        256pp.
        See  <http://www.awl-he.com/titles/13632.html>.

        Bruce Thompson: "The ultimate reference on LaTeX 2.09 by its
        author.  A new edition covering LaTeX2e (the version included in
        the current TeX/LaTeX distribution) is in preparation.  LaTeX
        2.09 is fully supported by LaTeX2e.  A must for anyone wanting
        to use LaTeX.  Provides a gentle introduction to document
        preparation and the various tools that LaTeX provides for
        producing professional quality documents.  Lots of examples."


     The TeXbook, Volume A of Computers and Typesetting; Knuth, Donald
        A.
        Addison-Wesley; 1986, ISBN 0-201-13448; 496pp.  See
        <http://www.awl.com/cp/TeXbook.html>

        Bruce Thompson: "The definitive user's guide and complete
        reference manual for TeX.  Probably not needed for casual LaTeX
        use, but a fascinating book nonetheless."  I'll strengthen that
        by adding that this book is not for the faint of heart.


     The METAFONT book, Volume C of Computers and Typesetting
        Knuth, Donald A.; Addison-Wesley; 1986; 0-201-13444-6, 1986;
        384pp.
        See  <http://www.awl.com/cp/METAFONTbook.html>

        Bruce Thompson: "The definitive user's guide and reference
        manual for METAFONT, the companion program to TeX for designing
        fonts.  An excellent work if you're planning to design your own
        fonts for use in TeX and LaTeX.  METAFONT is included with the
        normal TeX/LaTeX distribution."  This book is definitely not for
        the faint of heart.

  6.  Good Programming Style

  The following are classics on how to develop efficient programs:


     The Practice of Programming
        Kernighan, Brian W. & Pike. Rob; 1999; Addison-Wesley; ISBN
        0-201-61586-X.  See  <http://cm.bell-labs.com/cm/cs/tpop/>

        An excellent treatise on writing high-quality programs, surely
        destined to become a classic of the field.


     Programming Pearls (2nd Edition)
        Bentley, Jon; 2000; Addison-Wesley; ISBN ISBN 0-201-65788-0.
        See  <http://www.programmingpearls.com/>

        These are selected essays from Bentley's column in the
        Communications of the ACM. He discusses a wide variety of issues
        in program improvement, include a large number on efficiency.


     Writing Efficient Programs.
        Bentley, Jon Louis; 1982; Prentice-Hall, Inc.; ISBN
        0-13-970251-2 or 0-13-970244-X.

        This book presents Bentley's methodology and set of rules for
        improving program efficiency, and includes a large number of
        examples.

  7.  Books on C and C++ Programming


  7.1.  C and C++


     The C Programming Language (Second Edition)
        Kernighan, Brian W.; Ritchie, Dennis M; Prentice-Hall; 1988;
        ISBN 0-13-110362-8, 272pp.

        The improved second edition, covering ANSI C, of the original
        classic C book coauthored by C's designer, "K&R".  Still the
        best!



     Who's Afraid of C++?
        Heller, Steve; Academic Press; 1996; ISBN 0-12-339097; 508pp.

        The best introductory book on C++ I have seen.  Now available on
        the Web <http://www.steveheller.com/whos>


  7.2.  C System Call Interface


     POSIX Programmer's Guide: Writing Portable Unix Programs
        Lewine, Donald; O'Reilly; 1992; ISBN 0-937175-73-0; 607pp.
        See  <http://www.ora.com/catalog/posix/noframes.html>.

        An excellent programmer's reference on the POSIX.1 standard.  I
        like this one better than JH's choice.


     The Posix.1 Standard: A Programmer's Guide
        Zlotnick, Fred; Benjamin, Cummings; 1991; ISBN 0-8053-9605-5;
        379pp.; $35.95 (USA).

        JH: "When I complained about the lack of Section 2 man pages in
        Linux, somebody told me just to get a POSIX book, because that's
        what Linux does.  I like this book because I'm not a
        professional programmer and the author gives copious
        explanations and examples."


     Advanced Programming in The Unix Environment
        Stevens, Richard; 1992; ISBN 0-201-56317; Addison-Wesley

        A book on general Unix programming that is every bit as good as
        Stevens's classic on network programming.


     Linux Application Development
        Michael K. Johnson, Erik W. Troan; 1998; ISBN 0201308215;
        Addison-Wesley.

        The best reference to the C API of Linux.

  8.  Books on Networking



     Unix Network Programming
        Volume 1, Networking APIs: Sockets and XTI W. Richard Stevens,
        PTR Prentice-Hall, 1998 ISBN 0-13-490012-X

        UNIX Network Programming 2nd Edition, Volume 2, Interprocess
        Communications W. Richard Stevens PTR Prentice-Hall, 1998 ISBN
        0-13-081081-9

        Everything you might want to know about the subject.  Generally
        regarded as definitive on the basics.


     Linux Network Administrator's Guide
        Kirch, Olaf; O'Reilly; 1995; ISBN 1-56592-087-2; 335pp.
        See  <http://www.ora.com/catalog/linag/noframes.html>.

        A practical guide to Linux's TCP/IP and related services.
        Accessible on the Web at the Linux Documentation Project page,
        or directly at <http://sunsite.unc.edu/LDP/LDP/nag/nag.html>.

     TCP/IP Network Adminstration
        Hunt, Craig; O'Reilly Associates, ISBN 0-937175-82-X; 1992;
        472pp.
        See  <http://www.ora.com/catalog/tcp2/noframes.html>.

        Less Linux-specific than the Kirch book.  Features deeper
        coverage of the TCP/IP core, including routing and BGP.


     DNS and BIND (Second Edition)
        Albitz, Paul, and Liu, Cricket; O'Reilly; 1998; ISBN
        1-56592-512-2; 502pp; $32.95.
        See  <http://www.ora.com/catalog/dns2/noframes.html>.

        In-depth coverage of DNS, useful for people running complicated
        multiple-subnet installations. Covers BIND library programming.


     Sendmail (Second Edition)
        Costales, Bryan & Allman, Eric; O'Reilly; ISBN 1-56592-222-0;
        1997; 1050 pp; $32.95
        See  <http://www.ora.com/catalog/sendmail2/noframes.html>.

        An exhaustive (and exhausting) guide to Linux's and Unix's
        default mail-transfer agent.

  9.  Books on Unix Kernel Implementation


  9.1.  Ancestors of Linux


     The Design of the Unix Operating System
        Bach, Maurice J.; Prentice-Hall; ISBN 0-13-201799-7; 470pp.; $60
        (USA).

        The book that got Linus started.  See
        <http://www.prenhall.com/books/ptr_0132017997.html>


     Operating Systems, Design and Implementation;
        Tanenbaum, Andrew S.; Prentice-Hall; 1987.

        See  <http://www.prenhall.com/books/esm_0136386776.html>.  Alan
        Cox (one of the core kernel people) likes this book.  Tanenbaum
        designed Minix, which is the system Linus bootstrapped Linux up
        from.


  9.2.  Linux


     The Linux Kernel book
        Rmy Card, Eric Dumas, Franck Mevel; John Wiley and Sons; 1998;
        ISBN 0-471-98141-9.  $100 (AUS).

        (Translated from the French language edition of "Programmation
        Linux 2.0"; same authors; 1997; ditions Eyrolles; Paris,
        France.)

        A very interesting and informative description of the operation
        of the kernel that fills in the gap between the POSIX interface
        and "The Design of the Unix Operating System" and the Linux
        source code.  A good understanding of the design and operation
        of a Unix OS is a pre-requisite, but this book is an excellent
        help to going beyond that general understanding into actual
        work.

        The primary author is one of the core developers for the ext2
        filesystem, and the Linux Kernel book shows a firm grasp of the
        matter and clear explanations and structure.  It's surprisingly
        readable for something working at such a low level.  The book
        does seem to have suffered a little in the translation to
        English -- there are a few typos and grammatical mistakes, but
        it's quite readable.  (The code example files are charmingly
        still named in French.)

        Network protocol implementations are not covered.

        The book's current to Linux 2.0.35 and foreshadows 2.1 and 2.2.



     Linux Kernel Hackers' Guide
        Johnson, Michael K.

        Accessible on the Web at the Linux Documentation Project page,
        or directly at .


     LINUX Kernel Internals (Second Edition)
        Beck, Michael & Bohme, Harold & Mirko, Dziadzka & Kunitz, Ulrich
        & Magnus, Robert & Verworner, Dick; Addison Wesley; 1998;
        ISBN:0-201-33143-8; 480.
        See  <http://www.awl-he.com/titles/11653.html>.

        A guide to Linux kernel programming; covers 2.0.



  9.3.  Relatives of Linux


     The Design and Implementation of the 4.4BSD Unix Operating System
        McKusick, Marshall Kirk, Bostic, Keith, Karels, Michael J., and
        Quarterman, John S.; Addison-Wesley; 1996; ISBN 0-201-54979-4;
        608pp.
        See  <http://www.awl-he.com/titles/13693.html>.

        The successor to a classic book on the implementation of the 4.3
        BSD kernel, which influenced Linux's design (especially near
        sockets and networking).  This book covers the 4.4BSD base of
        BSD/OS, FreeBSD, and NetBSD.


     Porting Unix to the 386; Jolitz, William F., and Jolitz, Lynne G.
        Dr. Dobb's Journal; Jan 1991-July 1992.


  10.  Books on Intel processor architecture and programming


     80386 Programmer's Reference Manual
        Intel Corp.; ISBN 1-55512-022-9; 1986;

        Part I. Applications Programming, data types, memory model,
        instruction set.  Part II. Systems Programming, architecture,
        memory management, protection, multitasking, I/O, exceptions and
        interrupts, initialization, coprocessing and multiprocessing.
        Part III.  Compatibility (with earlier x86 machines).  Part IV.
        Instruction Set.

     80386 System Software Writer's Guide
        Intel Corp.; ISBN 1-55512-023-7; 1987.

        This explains the 386 features for operating system writers.  It
        includes a chapter on Unix implementation.  A lot of the 80386
        architecture seems to have been designed with Multics in mind;
        the features are not used by DOS or by Unix.


     Programming the 80386
        Crawford, John H & Gelsinger, Patrick P.; Sybex; ISBN
        0-89588-381-3; 774pp.; $26.95 (USA).

        This is the book the Jolitzes used when they ported BSD to the
        386 architecture.


     Pentium Processor User's Manual: Volume 3, Architecture and Pro-
        gramming
        Manual" Intel Corp.; 1993; ISBN 1-55512-195-0;

        Pretty much the Pentium version of the 80386 Programmer's manual
        listed above.

  11.  Books on PC-Class Hardware

  Note: these books are four or five years old and possibly out of date.
  I don't really grok hardware...


     80386 Hardware Reference Manual
        Intel Corp.; 1986; ISBN 1-55512-024-5;

        Pin connections, timing, waveforms, block diagrams, voltages,
        all that kind of stuff.


     The Indispensable PC Hardware Book
        Messmer, Hans-Peter; Addison-Wesley; 1993; ISBN 0-201-62424-9;
        1000 pp.

        JH: "Covers the more recent stuff like EIDE and PCI."


  12.  Administrivia


  12.1.  Terms of Use

  This document is copyright 1999 by Eric S. Raymond. You may use,
  disseminate, and reproduce it freely, provided you:


  o  Do not omit or alter this copyright notice.

  o  Do not omit or alter or omit the version number and date.

  o  Do not omit or alter the document's pointer to the current WWW
     version.

  o  Clearly mark any condensed, altered or versions as such.

  These restrictions are intended to protect potential readers from
  stale or mangled versions.  If you think you have a good case for an
  exception, ask me.

  12.2.  History

  This was originally a mini-HOWTO maintained by Jim Haynes.  I have
  changed the emphasis somewhat, trying to make it more a standalone
  document and less reliant on the various USENET bibliographic
  postings.  The unattributed mini-reviews are mine rather than his.



  Burning a RedHat CD HOWTO
  Morten Kjeldgaard, mok@imsb.au.dk and Peter von der Ah,
  pahe+rhcd@daimi.au.dk
  $Date: 2000/03/02 16:28:37 $ $Revision: 1.34 $

  This document describes how to make your own CDs from the Red Hat
  Linux distribution equivalent to the ones commercially available from
  Red Hat.  The structure of the distribution is described, as well as
  the procedure needed to include updated RPMS into the distribution.
  Prerequisites are a good network connection, and a CD-writer.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Anatomy of the Red Hat FTP site

     2.1 The top level directory
     2.2 The "RedHat" directory -- the core of the distribution
     2.3 The "updates" directory

  3. RPM packages

  4. Obtaining your local copy of the distribution

  5. Incorporating the updates

     5.1 Correcting the file protection modes
     5.2 Replacing the updated RPMS
        5.2.1 Important note for RedHat 6.0, 6.1
     5.3 Generating a new hdlist file
        5.3.1 Important note for RedHat 6.1
        5.3.2 Important note for RedHat 5.2
     5.4 The
        5.4.1 Format of comps file in RedHat versions < 6.1
        5.4.2 Format of comps file in RedHat version 6.1

  6. At last: burning the CD

     6.1 Creating a bootable CD
        6.1.1 Create iso9660 disk image
        6.1.2 Test the image
        6.1.3 Burn the disk

  7. Installing from the CD

     7.1 Booting from a bootable CD

  8. Other Linux distributions

  9. This document...

     9.1 Related documentation
     9.2 Acknowledgements

  10. DISCLAIMER



  ______________________________________________________________________



  1.  Introduction


  There may be several reasons for making your own CD. Perhaps you're a
  cheapskate and want to save the $50 cost of the Red Hat distribution
  <http://www.redhat.com/>. Or, perhaps you want a distribution CD
  containing the latest distribution with all current updates. This is
  highly relevant, because after each major release of the Red Hat
  distribution, there have been loads of updates, several of which are
  security related. Just take a look at the errata page
  <http://www.redhat.com/corp/support/errata>.


  2.  Anatomy of the Red Hat FTP site


  In the spirit of the Linux community, Red Hat Software has made
  available their Linux distributions for several platforms on their FTP
  site. These are all available from the top distribution directory.


  2.1.  The top level directory


  The toplevel directory for RedHat Linux release 6.1
  (pub/redhat/redhat-6.1 <ftp://ftp.redhat.com/pub/redhat/redhat-6.1/>)
  contains distributions for the different platforms, and a directory
  containing updates and corrections to program packages that have been
  published since the release.



       SRPMS/     alpha/     i386/      sparc/      iso/



  In this document, we use the i386 distribution as an example.  The
  procedure given in this document is likely to work on all platforms
  supported by Red Hat (Alpha, SPARC, ppc, etc.), but we have only
  tested it on the i386 platform (the authors would be most interested
  in additional information). The root of the i386 directory looks like
  this:



       -rw-r--r--   1 root     root    18391  Mar 19  1999   COPYING
       -rw-r--r--   1 root     root     3409  Sep 26 01:12   README
       -rw-r--r--   1 root     root     1908  Sep 25 18:20   RPM-GPG-KEY
       drwxr-xr-x   5 root     root     4096  Oct 26 09:01   RedHat/
       -rwxr-xr-x   1 root     root      538  Sep 26 04:16   autorun
       -rwxr--r--   1 root     root     2048  Sep 30 20:00   boot.cat
       drwxr-xr-x   7 root     root     4096  Oct 26 09:01   doc/
       drwxr-xr-x   6 root     root     4096  Oct 26 09:01   dosutils/
       drwxr-xr-x   2 root     root     4096  Oct 26 09:01   images/
       -rw-r--r--   1 root     root   391123  Jan  5 09:05   ls-lR
       -rw-r--r--   1 root     root    51786  Jan  5 09:05   ls-lR.gz
       drwxr-xr-x   4 root     root     4096  Oct 26 09:01   misc/



  The doc directory contains an abundance of information. Most
  importantly, the RedHat installation manual can be found in HTML
  format in the directory doc/rhmanual/manual/
  <http://www.redhat.com/support/manuals/RHL-6.1-Manual/install-guide/>.
  Next, there is a number of FAQs, and finally, the entire collection of
  HOWTOs and mini-HOWTOs.

  The images directory contains boot floppy images that must be copied
  to a diskette. In the most recent distribution (6.1), there are two
  disk images available. The boot image is called boot.img, which is
  required when installation is performed directly from a CD-ROM.  If
  installation from a local hard disk, NFS mounted disk or FTP is
  required, the supplementary disk image supp.img might be needed. See
  section ``Installing from the CD'' and references therein for details.

  The misc directory contains source and executables of a number of
  programs needed for the installation. Finally, the iso directory
  contains iso9660 images just like the one you we about to make.



  2.2.  The "RedHat" directory -- the core of the distribution


  The most important part of the directory tree is rooted in the RedHat
  directory:



       drwxr-xr-x   2 root     root    28672   Oct 26 09:01   RPMS
       drwxr-xr-x   2 root     root     4096   Oct 26 09:01   base
       -rw-r--r--   1 root     root        0   Jan 19  1999   i386
       drwxr-xr-x   6 root     root     4096   Oct 26 09:01   instimage



  The RPMS directory contains the major part of the Red Hat distribution
  consisting of a set of RPM (Redhat Package Manager) files. An RPM
  package typically contains binary executables, along with relevant
  configuration files and documentation. See the section ``RPM
  packages'' for more information.

  The base directory holds different book-keeping files needed during
  the installation process, e.g. the comps file, which defines the
  components (groups of packages) used during the "Choose packages to
  install" phase.  See section ``The comps file'' for more information
  on this file, and how to use it.  Another important file in the base
  directory is the hdlist file containing most of the header fields from
  all the RPMs in the RPMS directory.

  This means that all the interdependencies among RPM packages can be
  determined just by reading hdlist without having to read all the RPM
  packages which is quite convenient especially during FTP installs.

  Another use of hdlist is mapping package names to file name, eg. perl
  to perl-5.004-6.i386.rpm.  This means that if you want to incorporate
  updates from RedHat (see section ``Incorporating the updates'') or add
  your own packages to the RPMS directory, you need to update hdlist.
  This is descriped later in ``Generating a new hdlist file''.

  The instimage directory contains a bare-bones live file system with a
  number of programs and shared libraries needed during the installation
  procedure.
  2.3.  The "updates" directory


  The /pub/redhat/updates directory has updates for all releases of
  RedHat's distribution since version 3.0.3. This is the place to find
  software packages that have been uppdated for some reason or other.
  You should especially be aware of security updates. These are
  publicised on RedHat's errata page whenever a fix is available. The
  most important files found in the updates directory are:



       drwxrwxr-x   8 ftpuser  ftpusers      8192 Aug 18 08:05 5.1/
       drwxrwxr-x   9 ftpuser  ftpusers      8192 Sep 18 08:07 5.2/
       drwxrwxr-x   9 ftpuser  ftpusers      8192 Jan  7 23:09 6.0/
       drwxrwxr-x   9 ftpuser  ftpusers      8192 Jan  7 23:09 6.1/
       lrwxrwxrwx   1 ftpuser  ftpusers      3 Aug 25 13:14 current -> 6.1/



  The structure of each of these directories is similar to that
  described in section ``The top level directory''



  3.  RPM packages


  The major part of the Red Hat distribution consists of a set of RPM
  (Redhat Package Manager) files.  An RPM package typically contains
  binary executables, along with relevant configuration files and
  documentation.  The rpm <http://www.rpm.org> program is a powerful
  package manager, which can be used to install, query, verify, update,
  erase and build software packages in the RPM format. Rpm convieniently
  maintains a database of all the software packages it has installed, so
  information on the installed software is available at any time.

  The binary RPM files in the distribution have been built on a system
  running the distribution itself. This is important, because most of
  the programs in the packages rely on shared libraries. From RedHat
  version 5.0, the new version 2 of the GNU standard C library (which is
  64-bit clean) has been used. This version of the library is commonly
  referred to as glibc or in Linux: libc 6. All executables in the
  distribution have been linked against this library. If you attempt to
  install binary files from a different distribution, chances are that
  they will not work, unless you install the libc5 package for backwards
  compability.

  The names of the RPM packages contain the suffix .arch.rpm, where arch
  is the architechture, having the value i386 for Intel platform
  binaries.  The packages you install must match the versions of the
  shared libraries available on the machine. The rpm
  <http://www.rpm.org> program is usually quite good at ensuring that
  this is indeed the case, however, there are ways around this check,
  and you should be sure that you know what you are doing if you force
  installation of packages this way.  However, using the RedHat
  installation boot disk, it is ensured that the correct set of RPM
  packages are installed on the machine.

  If you discover an RPM package that was not installed on your system
  during the installation process, don't despair. At any time, you may
  (as root) install RPM packages, for example:


       rpm --install  WindowMaker-0.18-1b.i386.rpm



  You can even install directly from the Internet, if you know the URL
  of an RPM package:



       rpm --install ftp://rufus.w3.org/redhat-contrib/noarch/mirror-2.9-2.noarch.rpm



  Another version of the RPM packages contain the original sources used
  to build the binaries. These packages have the suffix .src.rpm and are
  situated in the SRPMS directory. These packages are not needed on the
  installation CD, and in fact, there is not even enough disk space on
  an 74 minute burnable CD to accomodate them. Of course, you can make a
  separate CD with the SRPMS.



  4.  Obtaining your local copy of the distribution


  You need a copy of the distribution on a writable disk which is
  accessible from the computer having the CD writer (duh!). If you want
  to incorporate the latest updates, this directory should (also) be
  accessible from from a Linux machine, either from a local disk, an NFS
  mounted disk on a different computer, or a JAZ disk.

  You could copy the distribution from a RedHat CD, or you could get it
  via FTP. If you choose to use FTP, the best way to get a correct copy
  of the distribution is to use the mirror package.

  Mirror is a sophisticated perl script that compares the content of a
  directory on a remote site with a local directory. It will use FTP to
  fetch the files that are on the remote site but not the local site,
  and delete files on the local site that are not on the remote site.
  The mirror program is configured with a configuration file.  The
  mirror package is available as an RPM from rufus.w3.org
  <http://rufus.w3.org/linux/RPM/mirror.html>.

  Make your local copy mirror.redhat of the mirror configuration file,
  and edit the relevant fields at the top of the file. After the default
  section, define these packages:



       package=updates
               site=ftp.sunsite.auc.dk
               exclude_patt=(alpha/|sparc/|SRPMS/)
               remote_dir=/disk1/ftp.redhat.com/pub/redhat/updates/6.1
               local_dir=/jaz/updates/6.1

       package=dist
               site=ftp.sunsite.auc.dk
               exclude_patt=(alpha/|sparc/|SRPMS/|iso/)
               remote_dir=/disk1/ftp.redhat.com/pub/redhat/redhat-6.1
               local_dir=/jaz/redhat-6.1

  The following command will download a copy of the entire RedHat tree
  on your local disk. *Think* before you do this, you are about to
  transfer approximately 500Mb of data!



       mirror -pdist mirror.redhat



  This will mirror the Red Hat FTP site on your local disk. The content
  of a Red Hat distribution does not change between releases, so you
  only need to download this package ONCE. All changes to the
  distribution are in the updates directory. Thus, if you want to keep
  an up-to-date mirror of the Red Hat distribution, you only need to
  keep the updates directory current. This is done using the command



       mirror -pupdates mirror.redhat



  You can run this regularly, say, once a week, through a cron script.
  The RedHat distribution is available on a great number of FTP servers
  around the world, which are updated daily from the master site at
  <ftp://ftp.redhat.com/pub>. You should choose an FTP site close to
  you, see the RedHat list of mirror sites
  <http://www.redhat.com/download/mirror.html>.


  5.  Incorporating the updates


  To incorporate the updates, you need write access to the distribution
  directory from a Linux machine, with a working version of rpm
  <http://www.rpm.org> installed. There are three steps involved:


  1. Correct the file protection modes.

  2. Replace updated RPMs.

  3. Generate the hdlist file

  If you maintain a mirror of the updates directory, you can at any time
  produce a CD including the current updates by repeating these steps.


  5.1.  Correcting the file protection modes


  During the installation process, some programs are run directly off
  the CD.  Unfortunately, the FTP program does not always preserve the
  protection modes of the files and directories that are copied.
  Therefore, it is necessary to make sure that execute permission is
  given to programs, shell scripts and shared libraries, before the
  directory is burned on the CD. This is done by running the updatePerm
  script on your local copy of the distribution:



  ______________________________________________________________________
  #!/bin/bash

  RHVERSION=6.1

  LIST=/tmp/er3hd3w25
  RHROOT=/jaz/redhat-${RHVERSION}

  # Find all directories, and make sure they have +x permission
  find $RHROOT -type d -exec chmod -c 755 {} \;

  # Find all files that are executables, shell, python or perl scripts
  find $RHROOT -type f | file -f - | grep -v RPM \
     | egrep -i 'executable|perl|bourne|shell|python' | cut -f1 -d: > $LIST
  #   ====>     NEEDED FOR RedHat 6.1        ^^^^^^^

  # Find shared libraries
  find $RHROOT -name \*.so >> $LIST

  # Make them executable
  while read file
  do
     if [ ! -x $file ] ; then
        chmod -c 755 $file
     fi
  done < $LIST

  /bin/rm $LIST

  exit 0
  ______________________________________________________________________



  5.2.  Replacing the updated RPMS


  The following script called updateCD copies all files from the update
  directory to the RPMS directory. The script uses some nifty rpm tricks
  to determine what packages in the updates directory are more recent.
  Older packages are moved to the ${OLD} directory.



  ______________________________________________________________________
  #! /bin/bash
  # This script updates rpms in a RedHat distribution found in $RPMDIR.
  # The old rpms will be placed in $OLDDIR.
  # The new rpms should be located in $UPDDIR.
  # The new images are in $IMGDIR
  # The images to be updated are in $OMGDIR
  # The architechture is $ARCH.

  RHVERSION=6.1
  ARCH=i386

  RHROOT=/jaz/redhat-${RHVERSION}
  RPMDIR=${RHROOT}/${ARCH}/RedHat/RPMS
  UPDDIR=${RHROOT}/updates/${ARCH}
  IMGDIR=${RHROOT}/updates/images/${ARCH}
  OMGDIR=${RHROOT}/${ARCH}/images
  OLDDIR=${RHROOT}/old

  if [ ! -d $OLDDIR ] ; then
     echo making directory $OLDDIR
     mkdir $OLDDIR
  fi

  allow_null_glob_expansion=1

  for rpm in ${UPDDIR}/*.rpm ; do
    NAME=`rpm --queryformat "%{NAME}" -qp $rpm`
    unset OLDNAME
    for oldrpm in ${RPMDIR}/${NAME}*.rpm ; do
      if [ `rpm --queryformat "%{NAME}" -qp $oldrpm` = "$NAME" ]; then
        OLDNAME=$oldrpm;
        break
      fi
    done
    if [ -z "$OLDNAME" ]; then
      echo $NAME is new
      cp -pv $rpm $RPMDIR
    else
      if [ `basename $rpm` != `basename $OLDNAME` ]; then
        mv $OLDNAME $OLDDIR
        cp -pv $rpm $RPMDIR
      fi
    fi
  done


  # Copy new boot image files to the right place...
  for newfile in ${IMGDIR}/* ; do
    file=${OMGDIR}/$(basename ${newfile})
    if [ $newfile -nt $file ] ; then
       cp -pv $newfile $file
    fi
  done

  exit 0
  ______________________________________________________________________



  5.2.1.  Important note for RedHat 6.0, 6.1



  Certain RPMs, specifically the kernel and kernel-smp packages, include
  the platform in the filename but not in the package name.  For
  example, the "kernel" package comes in several flavors:



       kernel-2.2.5-22.i386.rpm
       kernel-2.2.5-22.i586.rpm
       kernel-2.2.5-22.i686.rpm



  but for all three rpm -qp returns just "kernel" for the package name.

  As you can see, this "outsmarts" the updateCD script.  The result is
  that only the last one gets properly copied.  The first two get
  copied, but are then moved to the $OLD directory! Preferably, RedHat
  should name these differently.  But for now, the easy solution is to
  move the packages by hand, after running updateCD.  (Thanks to Kyle B.
  Ferrio <kyle@U.Arizona.EDU>)

  Joshua Sarro <mthed@shore.net> has contributed a perl script called
  updateMirror.pl which can deal with the situation. You can fetch it
  here:  <http://imsb.au.dk/~mok/linux/doc/updateMirror.pl>.



  5.3.  Generating a new hdlist file


  When installing from the CD, the installation program on the CD relies
  on the file RedHat/base/hdlist describing what RPM packages are
  available on the CD. The hdlist file can be generated by the program
  misc/src/install/genhdlist.  This program must be run with the
  absolute path to the root of the distribution as the only argument.
  Here is the updateHdlist script which calls that program:


  ______________________________________________________________________
  #!/bin/bash

  RHVERSION=6.1
  ARCH=i386

  echo generating hdlist...
  RHROOT=/jaz/redhat-${RHVERSION}
  GENHDDIR=${RHROOT}/${ARCH}/misc/src/install

  chmod u+x ${GENHDDIR}/genhdlist
  chmod 644 ${RHROOT}/${ARCH}/RedHat/base/hdlist
  ${GENHDDIR}/genhdlist ${RHROOT}/${ARCH} || echo "*** GENHDLIST FAILED ***"

  exit 0
  ______________________________________________________________________



  NOTE: After having incorporated the updates in the main RedHat/RPMS
  directory, your copy of the distribution is no longer a mirror of the
  Red Hat distribution site. Actually, it is more up-to-date! Therefore,
  if you attempt to mirror the distribution, older versions of the RPM's
  that have been updated will be downloaded once more, and the updates
  deleted.
  5.3.1.  Important note for RedHat 6.1


  The installation in RedHat 6.1 is completely changed from earlier
  versions, and RedHat have introduced a system called ``anaconda''. The
  genhdlist program is now found in a different place, so in the script
  above, use


  ______________________________________________________________________
  GENHDDIR=${RHROOT}/${ARCH}/misc/src/anaconda/utils
  ______________________________________________________________________



  The updatePerm script must be changed to include ``python'' in line
  13. This has been done in the listing above, but if you've cut the
  script from earlier versions of this document (before 1.30), you need
  to make the change!

  In some cases, genhdlist fails to run, because the executable is not
  statically linked. In such a case, you can add a new line
  ${RHROOT}/${ARCH}/RedHat/instimage/usr/lib in /etc/ld.so.conf and run
  ldconfig -v.

  Another solution is to recompile genhdlist. The following modification
  to the updateHdlist script worked under RedHat 5.2:


  ______________________________________________________________________
  #!/bin/bash

  RHVERSION=6.1
  ARCH=i386

  RHROOT=/misc/redhat/redhat-${RHVERSION}
  GENHDDIR=${RHROOT}/${ARCH}/misc/src/anaconda/utils

  echo Compiling genhdlist...
  sed -e 's/FD_t/int/' \
      -e 's/fdOpen/open/' \
      -e 's/fdClose/close/' \
      -e 's/fdFileno//' < ${GENHDDIR}/genhdlist.c > /tmp/genhdlist.c
  cc -o /tmp/genhdlist -I/usr/include/rpm /tmp/genhdlist.c -lrpm -lz

  echo generating hdlist...
  chmod 644 ${RHROOT}/${ARCH}/RedHat/base/hdlist
  /tmp/genhdlist ${RHROOT}/${ARCH} || echo "*** GENHDLIST FAILED ***"

  exit 0
  ______________________________________________________________________



  In this version of the script, a copy of the C source of genhdlist.c
  is piped through sed to create a copy in /tmp that will compile under
  RedHat 5.2.  This version of genhdlist is then used to create the
  hdlist file


  5.3.2.  Important note for RedHat 5.2


  As distributed with RedHat version 5.2 and earlier, genhdlist CRASHES
  if there are files in the RedHat/RPMS directory which are not RPM
  files!  This causes problems, because in the 5.2 distribution, there
  are a couple of non-RPM files named ls-lR and ls-lR.gz in RedHat/RPMS.
  Therefore, you must remove all non-RPM files from the directory.
  Alternatively, you can apply the following patch to
  misc/src/install/genhdlist.c and do a make. The patch will cause
  genhdlist to ignore any non-RPM files.


  ______________________________________________________________________
  *** genhdlist.c.orig    Fri Nov 27 12:08:13 1998
  --- genhdlist.c Fri Nov 27 12:08:20 1998
  ***************
  *** 12,23 ****
  --- 12,26 ----

    #define FILENAME_TAG 1000000

  + /* Not used apparently...
  +
    int tags[] =  { RPMTAG_NAME, RPMTAG_VERSION, RPMTAG_RELEASE, RPMTAG_SERIAL,
                  RPMTAG_FILENAMES, RPMTAG_FILESIZES, RPMTAG_GROUP,
                  RPMTAG_REQUIREFLAGS, RPMTAG_REQUIRENAME, RPMTAG_REQUIREVERSION,
                  RPMTAG_DESCRIPTION, RPMTAG_SUMMARY, RPMTAG_PROVIDES,
                  RPMTAG_SIZE, RPMTAG_OBSOLETES };
    int numTags = sizeof(tags) / sizeof(int);
  + */

    int main(int argc, char ** argv) {
        char buf[300];
  ***************
  *** 26,34 ****
  --- 29,39 ----
        struct dirent * ent;
        int fd, rc, isSource;
        Header h;
  +     /* not used
        int count, type;
        int i;
        void * ptr;
  +     */

        if (argc != 2) {
          fprintf(stderr, "usage: genhdlist <dir>\n");
  ***************
  *** 74,79 ****
  --- 79,85 ----

              rc = rpmReadPackageHeader(fd, &h, &isSource, NULL, NULL);

  +           if (!rc) {
              headerRemoveEntry(h, RPMTAG_POSTIN);
              headerRemoveEntry(h, RPMTAG_POSTUN);
              headerRemoveEntry(h, RPMTAG_PREIN);
  ***************
  *** 110,115 ****
  --- 116,122 ----
              headerWrite(outfd, h, HEADER_MAGIC_YES);
              headerFree(h);
              close(fd);
  +           }
          }

          errno = 0;
  ______________________________________________________________________



  5.4.  Thecomps file


  The comps file defines how the packages are bundled during the
  installation.  In the Red Hat distribution, this is done according to
  the functionality they provide, for example:


    Printer Support

    X Window System

    GNOME

    KDE

    Mail/WWW/News Tools

    ...

    Kernel Development

    Extra Documentation

  Sometime during the installation process, the user is presented with a
  dialog called "Components to install". Some of the components have
  been preselected, and others not. The last item on the components list
  is called "Everything".  According to the Red Hat documentation,
  selecting every package will require close to 1 Gb of free disk space.

  On the dialog box, there also is an option that enables the user to
  customize exactly what packages will be installed.  Customizing the
  installation by hand, or selecting "Everything" in the components list
  is the only way to have your own packages installed unless you modify
  the RedHat/base/comps file.


  5.4.1.  Format of comps file in RedHat versions < 6.1


  The format of the comps file currently starts with a header describing
  the version of the comps format, followed by an empty line.



       0.1
       <empty line>



  After this, the components are listed, separated by empty lines:



       <component 1>
       <empty line>
       <component 2>
       <empty line>
       .
       .
       <component n>
       <empty line>
       EOF


  Each component has the following definition:



       (0|1) (--hide)? <name>
       <RPM 1>
       <RPM 2>
       ...
       <RPM n>
       end



  Before the name of each component, 0 or 1 is given. A value of 1 here
  means that the component is chosen by default, and 0 means it's not.
  The option "--hide" means that you will not see the entry, unless you
  choose "expert" installation. The first component is called "Base",
  and that is special, in the sense that it must be present and it does
  not show up in the dialog (you can't deselect the base installation,
  which makes sense...)

  Next follows a list of rpm packages belonging to that component. Note
  that this is the package name stored in the rpm file, and not any part
  of the file name of the package (although it is often the same).

  By adding your packages to the comps file, you can customize your own
  distribution, and make sure that your packages will be installed by
  default. One thing to be careful about is interdependence among your
  packages, but here, you are on your own :-) A word of warning: be
  careful not to add or remove extra whitespace in the file. Examine the
  existing comps file (make a copy of the original) to see how it's done
  (or check i386/misc/src/install/pkgs.c if you want to see how the file
  is parsed).


  5.4.2.  Format of comps file in RedHat version 6.1


  With RedHat version 6.1, the format of the comps file has changed. We
  have not yet disected it to discover the file format. With the above
  information, however, it should be easy enough to do it yourself. The
  decoding takes place in ${RHROOT}/${ARCH}/misc/src/anaconda/comps.py.



  6.  At last: burning the CD


  As we assume that you have a working CD-writer on your system, and you
  know how to use it, we wont go into much detail about burning the CD.
  If you are burning your CD on a Linux system, you can install the
  excellent XCDroast <http://www.fh-muenchen.de/rz/xcdroast> package.
  In XCDRoast, switch on the Rock Ridge extensions, and the creation of
  a TRANS.TBL file.

  Make sure the top directory of the CD contains at least the following
  files and directories:



       COPYING      RPM-PGP-KEY README       RedHat/



  The following directories might come in handy:



       doc/         gnome/      misc/        dosutils/    images/



  6.1.  Creating a bootable CD


  Since XCDroast doesn't support creation of bootable disks you'll need
  to use other tools, for example mkisofs
  <ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs/> (RPMs
  <http://rufus.w3.org/linux/RPM/mkisofs.html>).  and cdrecord
  <http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>.
  (RPMs <http://rufus.w3.org/linux/RPM/cdrecord.html>).  You'll need to
  create an image file which will be written to the CD. This file will
  be 500Mb or more so find a partition with enough free space and change
  the path for redhat.img in the following commands if necessary. You
  may need to be root to use mount and cdrecord.


  6.1.1.  Create iso9660 disk image


  Change directory to the place in your mirror that will be the root
  directory of the cd. For instance, redhat-6.1/i386.



       mkisofs -v -r -T -J -V "Red Hat 6.1" -b images/boot.img -c boot.catalog -o /tmp/redhat.img .



  The file ${RHROOT}/boot.catalog will be created by mkisofs.

  Some versions of mkisofs do not have a -J option.  It can be omitted
  since the Joliet extensions it specifies are not used by the installer
  although they make the CD more readable in Windows.



  6.1.2.  Test the image


  If you're paranoid you can test your new disk image by mounting it. If
  you forgot to fix the file permissions or set the rock ridge
  extensions then the error will be obvious here since the file names
  and directory structure will be wrong.



       mount -t iso9660 -o ro,loop=/dev/loop0 /tmp/redhat.img /mnt/cdrom


  When you're done, don't forget to unmount it.



       umount /mnt/cdrom



  6.1.3.  Burn the disk


  Be sure to set the correct speed for your device. This command is for
  a 4X CDR. You may have a 1X or 2X drive.



       cdrecord -v speed=4 dev=0,3 /tmp/redhat.img



  In the above command, it is assumed that the CD writer is on SCSI bus
  0, with ID number 3.


  7.  Installing from the CD


  When installing from the new CD, you may first need to create a
  bootable installation diskette. IMPORTANT: use a NEW, freshly MS-DOS
  formatted diskette! Using an old, worn-out, faulty diskette can result
  in strange problems during the installation!

  On a Linux system, you can create the diskette using the dd command:



       dd if=/mnt/cdrom/images/boot.img of=/dev/fd0 bs=1440k



  On a system running DOS or Windows-9x, you need to use the RAWRITE.EXE
  program, which is found on the CD in the dosutils directory.

  Shut down the machine you want to install (or do a system upgrade) on,
  insert the boot diskette and your freshly burned CD, and let the
  machine boot from the diskette. For more information on the
  installation process, se the documents and the Installation-HOWTO or
  the Bootdisk-HOWTO which are on the CD in the doc/HOWTO directory.


  7.1.  Booting from a bootable CD


  Most modern machines are able to boot directly from a CD, provided it
  is made bootable with the procedure outlined in section ``Creating a
  bootable CD''.  Often, however, you need to change the setting of the
  BIOS to make the CD drive bootable.  See the documentation for your
  mother board to see how it's done.


  8.  Other Linux distributions


  The information in this document also applies to other Linux
  distributions that are RedHat clones, such as Mandrake
  <http://www.linux-mandrake.com>, although we have not actually tried
  them ourself.  The Mandrake distributions uses a simpler hdgenlist
  program (it's a shell script), and other details may be different.

  The LinuxPPC <http://www.linuxppc.org> distribution for Apple
  PowerMacs and other PowerPPC machines is also somewhat similar to the
  RedHat distribution. When making a distribution for the PowerMac
  platform, you need to use mkhybrid
  <http://rufus.w3.org/linux/RPM/mkhybrid.html>) instead of mkisofs. We
  have not tried it, but we'd like to hear from people who have.


  9.  This document...


  The SGML source of the most recent version of this document can be
  retrieved from  <http://imsb.au.dk/~mok/linux/doc/RedHat-CD.sgml>
  (HTML version <http://imsb.au.dk/~mok/linux/doc/RedHat-CD.html>).

  You can link to the RedHat-CD mini HOWTO by making the following
  reference on your home page:

  <a href="http://imsb.au.dk/~mok/linux/doc/RedHat-CD.html">
  <img src="http://imsb.au.dk/~mok/logos/RedHat-CD.png" alt="RedHat CD mini-howto" height=30 nosave border=0>
  </a>



  9.1.  Related documentation


  Ed Schlunder <zilym@asu.edu> has written a utility called fix-rhcd to
  let you check your Red Hat Linux distribution mirror for matching file
  sizes, names, permissions, and symlinks against an "ls -lNR" listing
  from the offical Red Hat ftp site. Any permissions that are wrong are
  changed to match the ls listing. See the fix-rhcd homepage
  <http://www.ajusd.org/~edward/fix-rhcd/>.

  Rod Smith <smithrod@bellatlantic.net> has written a Do-It-Yourself Red
  Hat Installation guide, which also includes information on creating
  RedHat install CD's. Especially aimed at burning a CD from a non-UNIX
  system.  Find it at
  <http://members.bellatlantic.net/~smithrod/rhjol.html>.

  A document in french ``Comment graver un CD de la RedHat 5.x a partir
  de fichiers telecharges sur Internet...'' by <skooter@hol.fr> is
  available from  <http://linuxfr.org/docs/article/gravure-CD-
  RH51.html>.

  With the sense of the good things in life Jussi Torhonen from Finland
  <jussi.torhonen@tietosavo.fi> tells us Howto make a homebrew
  <http://www.iwn.fi/~jt/cd/> bootable RedHat Linux 5.2 CD-ROM.

  >From the LDP project, see the CD-writing HOWTO
  <http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html>.
  9.2.  Acknowledgements


  Apart from those mentioned above, thanks are given to the following
  people for valuable input, feedback and discussions:


    Lars Christensen <larsch@cs.auc.dk>

    Thomas Duffy <tbd@cs.brown.edu>

    Dawn Endico <dawn@math.wayne.edu>

    Seva <seva@null.cc.uic.edu>

    Michael Thomas Cope <mcope@orion.ac.hmc.edu>

    Charles J. Fisher <charles_fisher@bigfoot.com>

    Eric Thomas <eric.thomas@ericsson.com>

    Gordon Yuen <gdccyuen@yahoo.com>


  10.  DISCLAIMER


  While the given information in this document is believed to be
  correct, the authors assume no responsibility whatsoever for any
  damage to hardware and/or software, or any loss of data resulting from
  the procedures outlined in this document.



  Root RAID HOWTO cookbook
  Michael A. Robinton, michael@bzs.org
  <mailto:michael@bzs.org>
  v1.12, May 2, 2000

  This document only applys to the OLD raidtools, versions 0.50 and
  under. The workarounds and solutions addressed in this write up have
  largely been made obsolete by the vast improvment in the 0.90 raid
  tools and accompanying kernel patch to the 2.0.37, 2.2x and 2.3x
  series kernels. You may find the detailed descriptions useful, partic
  ularly if you plan to run root raid or use initrd. Read on for a ref
  erence to set up of Boot Root Raid using conventional LILO and accom
  panying initrd working scripts. What follows is the description of the
  now OBSOLETE Root RAID HOWTO.  This document was originally written to
  provide a cookbook for creating a root mounted raid filesystem and
  companion fallback rescue system using linux initrd. There are com
  plete step-by-step instruction for both raid1 and raid5 md0 devices.
  Each step is accompanied by an explanation of it's purpose.  Included
  with this revision is a generic linuxrc initrd file which may be con
  figured with a single three line ``/etc/raidboot.conf'' file for raid1
  and raid5 configurations.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Where to get Up-to-date copies of this document.
     1.2 More up-to-date Boot Root Raid with LILO minihowto
     1.3 Bugs
     1.4 Acknowledgements
     1.5 Copyright Notice

  2. What you need BEFORE YOU START

     2.1 Required Packages
     2.2 Other similar implementations.
     2.3 Documentation -- Recommended Reading
     2.4 RAID resources

  3. Quick Start for ROOT RAID

  4. (IT

     4.1 Security Reminder
     4.2 Build the Kernel and Raid Tools
     4.3 Build the
     4.4 Start the STEP by STEP instructions
     4.5 Install the distribution - Slackware Specific
     4.6 Install linux
     4.7 Install Raid Tools
     4.8 Remove un-needed directories and files from new filesystem.
     4.9 Create /dev/md
     4.10 Create a bare filesystem suitable for
        4.10.1 Create the BOOT/RESCUE
        4.10.2 Corrections for the Rescue System
     4.11 Making 'initrd' boot the RAID device - linuxrc
     4.12 Modifying the rc-scripts for SHUTDOWN
     4.13 Configuring RAIDBOOT - raidboot.conf
     4.14 Kernel 'loadlin and lilo' variables for RESCUE and RAID

  5. Configuring the Production RAID system.

     5.1 System specs. Two systems with identical motherboards were configured.
     5.2 Partitioning the hard drives.

  6. Building the RAID file system.

     6.1 /etc/raid5.conf
     6.2 /etc/raid1.conf
     6.3 Step by Step procedures for building production RAID file system.

  7. One last thought.

  8. Appendix A. - Bohumil Chalupa's md0 shutdown

  9. Appendix B. - Sample SHUTDOWN scripts

     9.1 Slackware - /etc/rc.d/rc.6
     9.2 Debian bo - /etc/init.d/halt and /etc/init.d/reboot
        9.2.1 /etc/init.d/halt
        9.2.2 /etc/init.d/reboot

  10. Appendix C. - other setup files

     10.1 linuxrc
     10.2 loadlin -- linux.bat file - boot.par
     10.3 linuxthreads Makefile.diff
     10.4 raid1.conf
     10.5 raid5.conf
     10.6 raidboot.conf
     10.7 rc.raidown

  11. Appendix D. - obsolete linuxrc and shutdown scripts

     11.1 Obsolete working - linuxrc
     11.2 Obsolete working - shutdown scripts

  12. Appendix E. - Gadi's raid stop patch for the linux kernel

  13. Appendix F. - rc.raidown

  14. Appendix G. - linuxrc theory of operation

  15. Appendix H. Setting up ROOT RAID on RedHat



  ______________________________________________________________________

  1.  Introduction

  The reader is assumed to be familiar with the various types of raid
  implementations, their advantages and drawbacks. This is not a
  tutorial, just a set of instructions on how to implement root mounted
  raid on a linux system. All of the information necessary to become
  familiar with linux raid is listed here directly or by reference,
  please read it before send e-mail questions.


  1.1.  Where to get Up-to-date copies of this document.

  Click here to browse the author's latest version
  <ftp://ftp.bizsystems.com/pub/raid/Root-RAID-HOWTO.html> of this
  document. Corrections and suggestions welcome!

  Root-RAID-HOWTO -- OBSOLETE

  Available in LaTeX (for DVI and PostScript), plain text, and HTML.

       http://www.linuxdoc.org/HOWTO/Root-RAID-HOWTO.html
       <http://www.linuxdoc.org/HOWTO/Root-RAID-HOWTO.html>


  Available in SGML and HTML.

       ftp.bizsystems.net/pub/raid/ <ftp://ftp.bizsys
       tems.net/pub/raid/>



  1.2.  More up-to-date Boot Root Raid with LILO minihowto

  Available in LaTeX (for DVI and PostScript), plain text, and HTML.

       http://www.linuxdoc.org/HOWTO/Root-RAID-HOWTO.html
       <http://www.linuxdoc.org/HOWTO/Root-RAID-HOWTO.html>


  Available in SGML and HTML.

       ftp.bizsystems.net/pub/raid/ <ftp://ftp.bizsys
       tems.net/pub/raid/>



  1.3.  Bugs

  As of this writing, the problem of stopping a root mounted RAID device
  has not yet been solved in a satisfactory way.  A work-around proposed
  by Ed Welbon and implemented by Bohumil Chalupa is incorporated into
  this document which eliminates the need for a long ckraid at each boot
  for raid1 and raid5 devices. Without the workaround, it is necessary
  to ckraid the md device each time the system is re-booted. On a large
  array this can cause a severe availability performance degradation.
  On my 6 gig RAID1 device running on a Pentium 166 with 128 megs of
  ram, it takes well over half an hour to ckraid :-( after each re-boot.
  It takes over an hour on my 13 gig RAID5 array with a 20mb/sec scsi
  adaptor.

  The workaround stores the status of the array at shutdown on the real
  boot device and compares it to a reference status placed there when
  the system is first built. If the status's match at reboot, the
  superblock on the array is rebuilt on the next boot, otherwise the
  operator is notified of the status error and the rescue system is left
  running with all the raid tools available.

  Rebuilding the superblock causes the system to ignore that the array
  was powered down without mdstop by marking all the drives as OK, as if
  nothing happened. This only works if all the drives are OK at
  shutdown. If the array was operating with a bad drive, the operator
  must remove the bad drive prior to restarting the md device or the
  data can be corrupted.

  None of this applies to raid0 which does not have to be mdstopped
  before shutdown.

  Final proposed solutions to this problem include a finalrd similar to
  initrd, and mdrootstop which writes the clean flags to the array
  during  shutdown when it is mounted read only. I am sure there are
  others.

  In the mean time, the problem has been by-passed for now Please let me
  know when this problem is solved more cleanly!!!


  1.4.  Acknowledgements

  The writings and e-mail from the following individuals helped to make
  this document possible.  Many of the ideas were stolen from the
  helpful work of others, I have just tried to put it all in COOKBOOK
  form so that it is straightforward to use. My thanks to:

    Linas Vepstas <mailto:linas@linas.org>
      for the RAID howto that explained most of this to me.

    Gadi Oxman <mailto:gadio@netvision.net.il>
      for answering my dumb 'newbie' questions.

    Ed Welbon <mailto:welbon@bga.com>
      for the execellent initrd.md package that inspired me to write
     this.

    Bohumil Chalupa <mailto:bochal@apollo.karlov.mff.cuni.cz>  for
     implementing the re-boot 'workaround' that allows root-mounted-raid
     to work in a production environment.

    Keith W. <mailto:kwrohrer@ce.mediaone.net>  for his explaination of
     setting up root raid with  RedHat.



    and many others who contributed to this work in one way or another.


  1.5.  Copyright Notice

  This document is GNU copyleft by Michael Robinton michael@bzs.org
  <mailto:michael@bzs.org>.

  Permission to use, copy, distribute this document for any purpose is
  hereby granted, provided that the author's / editor's name and this
  notice appear in all copies and/or supporting documents; and that an
  unmodified version of this document is made freely available.  This
  document is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY, either expressed or implied.  While every effort
  has been taken to ensure the accuracy of the information documented
  herein, the author / editor / maintainer assumes NO RESPONSIBILITY for
  any errors, or for any damages, direct or consequential, as a result
  of the use of the information documented herein.


  2.  What you need BEFORE YOU START

  The packages you need and the documentation that answers the most
  common questions about setting up and running raid are listed below.
  Please review them throughly.


  2.1.  Required Packages

  You need to obtain the most recent versions of these packages.

    a linux kernel that supports raid, initrd and /dev/loopx

       I used linux-2.0.33 <ftp://sunsite.unc.edu/pub/Linux/ker
       nel/> from sunsite


    raid145-971022-2.0.31
     <ftp://ftp.kernel.org/pub/linux/daemons/raid/> patch adds support
     for raid1/4/5

    raidtools-pre3-0.42 <ftp://ftp.kernel.org/pub/linux/daemons/raid/>
     tools to create and maintain raid devices (documentation too).

    ``Gadi's raid stop patch'' in Appendix E.

    linuxthreads-0.71
     <ftp://ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy> required
     threads package. Use ftp, browser doesn't work
     ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy

    A Linux distribution, ready to install.

       I used Slackware-3.4 <ftp://ftp.cdrom.com/pub/linux>


  Helpful but not required

    raidboot-0.01.tar.gz <ftp://ftp.bizsystems.com/pub/raid/> pre-built
     raid rescue/boot system.

  The detailed instructions in this document are based on the above
  packages.  If the packages have been updated or you use a different
  linux distribution, you may have to modify the procedures you find
  here.

  The patches, tool assortment, etc... may vary with 2.1 kernels.
  Please check the most recent documentation at:


       ftp.kernel.org/pub/linux/daemons/raid/ <ftp://ftp.ker
       nel.org/pub/linux/daemons/raid/>



  2.2.  Other similar implementations.

  I chose to include in the kernel all of the pieces necessary to run
  from boot without loading any modules.  My kernel image is a little
  over 300k compressed.

  Take a look at Ed Welbon's <mailto:welbon@bga.com> initrd.md.tar.gz
  for another way to make a bootable raid device.  He uses loadable
  modules.  A look at his concise scripts will show you how it is done
  if you need a very small kernel with modules.


       http://www.realtime.net/~welbon/initrd.md.tar.gz
       <http://www.realtime.net/~welbon/initrd.md.tar.gz>



  2.3.  Documentation -- Recommended Reading

  Please read:

       /usr/src/linux/Documentation/initrd.txt



  as well as the documentation and man pages that accompany the
  raidtools set. In particular, read man mdadd as well as the
  QuickStart.RAID document included in the raidtools package.


  You may also wish to review:

    BootPrompt-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/BootPrompt-
     HOWTO.html>

    man lilo

    man lilo.conf


  2.4.  RAID resources


    www.linas.org/linux/Software-RAID/Software-RAID.html
     <http://http://www.linas.org/linux/Software-RAID/Software-
     RAID.html>

    www.ssc.com/lg/issue17/raid.html
     <http://www.ssc.com/lg/issue17/raid.html>

    linas.org/linux/raid.html <http://linas.org/linux/raid.html>

    ftp.kernel.org/pub/linux/daemons/raid/
     <ftp://ftp.kernel.org/pub/linux/daemons/raid/>

    www.realtime.net/~welbon/initrd.md.tar.gz
     <http://www.realtime.net/~welbon/initrd.md.tar.gz>
    luthien.nuclecu.unam.mx/~miguel/raid/
     <http://luthien.nuclecu.unam.mx/~miguel/raid/>

     Mailing lists can be joined at:

    majordomo@nuclecu.unam.mx <mailto:majordomo@nuclecu.unam.mx> send a
     message to subscribe raiddev

     send mail to: raiddev@nuclecu.unam.mx
     <mailto:raiddev@nuclecu.unam.mx>

    majordomo@vger.rutgers.edu <mailto:majordomo@vger.rutgers.edu> send
     a message to subscribe linux-raid

     send mail to: linux-raid@vger.rutgers.edu <mailto:linux-
     raid@vger.rutgers.edu> (this seems to be the most active list)


  3.  Quick Start for ROOT RAID

  If you use RedHat, see the ``Howto set up RedHat'' section in Appendix
  H. I have not tried this. If you use it successfully, please let me
  know so I can update this document.

  If you don't want to try and build and debug the rescue system, you
  can get a generic one created from Slackware-3.4 from:

       ftp.bizsystems.com/pub/raid/raidboot-0.01.tar.gz
       <ftp://ftp.bizsystems.com/pub/raid/>


  Perform the following steps:

    Compile the raid enabled kernel with built in support for your disk
     subsystem

    Test that the raid array will configure and mount correctly

    Build your OS on the raid system

    Correct the entries in fstab to show /dev/md0 as the root device.
     Make sure that the partition(s) you use for booting are included in
     fstab.

    Modify your shutdown halt and reboot script(s) (mine is
     /etc/rc.d/rc.6) as shown in ``Modifying the rc-scripts for
     SHUTDOWN''

    Copy the following from you development filesystem to the rescue
     system AND the new raid system


             cd /root/raidboot
             mkdir mnt
             gzip -d rescue.clean
             losetup /dev/loop0  rescue.clean
             mount /dev/loop0    mnt

     copy these files

             cp -p /etc/*         mnt/etc
             cp -p /etc/rc.d/*    mnt/etc/rc.d
                     {or as appropriate for your system}
             cp -a /lib/modules/* mnt/lib/modules


  Some Linux distributions include a test for the ro/rw status of the
  root file system. The rc startup files need to have this test removed
  for the initrd rescue system. See the instructions in the section on
  ``Correctons for Rescue System''.

  Correct the entries in fstab to show /dev/md0 as the root device. Make
  sure that the partition(s) you use for booting is included in fstab.


  Create /etc/raidboot.conf which describes the raid boot configuration.
  This file may NOT contain comments in the first three lines, after
  that it doesn't matter.

  raidboot.conf

          /dev/sda1 /dev/sda2
          raidboot
          raid5.conf
  # comments may only be placed 'after' the three
  # configuration lines.
  #
  # This is '/etc/raidboot.conf'
  #
  # line one, the partition(s) containing the 'initrd' raid-rescue system
  #       It is not necessary to boot from these partitions, however,
  #       since the rescue system will not fit on floppy, it is necessary
  #       to know which partitions are to be used to load the rescue system
  #
  # line two, the path to the raidboot config information
  #       Where the shutdown status, etc... is located at boot time
  #       It does NOT include the mount point information, only 'path'
  #       /mntpoint/'path'
  #
  # line -3-, name of the raid configuration file
  #       Current raid configuration file i.e. raid1.conf, raid5.conf


  A few more things to do and the raid systems is ready to boot.

  Create ``rc.raidown'', as described in Appendix F, and copy it to
  /etc/rc.d on the rescue, development, and raid system.  Unmount the
  rescue system and zip it.

          umount mnt
          losetup -d /dev/loop0
          mv rescue.clean rescue
          gzip rescue


  Copy the rescue file to the raidboot partitions.

          cp rescue.gz /mnt_point(1)/raidboot
          cp rescue.gz /mnt_point(2)/raidboot


  Activate the raid array.

          mdadd -ar


  Save the good reference status to the raidboot partition

          cat /proc/mdstat | grep md0 > /mnt_point(1)/raidboot/raidgood.ref
          cat /proc/mdstat | grep md0 > /mnt_point(1)/raidboot/raidgood.ref


  Lastly, configure the boot program as outlined in ``Boot Time Configu
  ration Parameters'' and reboot your system onto the raid array.



  4.  initrd  Cookbook for root mounted RAID

  This is the procedure to make an 'initrd' ramdisk with rescue tools
  for raid.

  Specifically, this document referrs to RAID1 and RAID5
  implementations.

  4.1.  Security Reminder

  The rescue file system may be used stand alone. Should your raid array
  fail to mount, you are left with the rescue system mounted and
  running.  TAKE THE APPROPRIATE SECURITY PRECAUTIONS!!!


  4.2.  Build the Kernel and Raid Tools

  The first thing that must be done is to patch and build your kernel
  and become familiar with the raid tools. Make sure and include
  ``Gadi's raid stop patch'' in Appendix E.  Configure, mount and test
  your raid device(s). The details of how to do this are included in the
  raidtools package and briefly reviewed later in this document.


  4.3.  Build the initrd  Rescue and Boot filesystem

  I used the Slackware-3.4 distribution to build both the Rescue/Boot
  filesystem and the filesystem for the production machine. Any linux
  distribution should work fine. If you use a different distribution,
  review the Slackware specific portion of this procedure and modify it
  to suit your needs.


  I use loadlin to boot the kernel image and ramdisk from a dos
  partition simply because there are oddball devices in my system that
  have dos configuration software. Lilo will work just as well and a
  small linux partition can be used instead containing only the
  raid/boot files and the lilo record.

  For the raid boot/rescue system, I chose to create a minimum ramdisk
  system using the Slackware 'setup' script followed by installing the
  'linuxthreads' package and 'raidtools' over the clean Slackware
  installation on my ramdisk. I used the identical procedure to build
  the production system. So the rescue and production systems are very
  similar.

  This installation process gives me a 'bare' system (save a copy of the
  file) to which I overlay


          /lib/modules/2.x.x......
          /etc .... with a modified fstab, mdtab, raidX.conf, raidboot.conf
          /etc/rc.d
          /dev/md*



  from my current system to customize it for the particular kernel and
  machine that it is/will-be running on.

  This makes the boot/rescue system the same system that is running on
  the root mounted raid device, just skinnyed down a bit, while allowing
  the library, etc... revisions to always be current.


  4.4.  Start the STEP by STEP instructions

  From the root home directory (/root):


          cd /root
          mkdir raidboot
          cd raidboot



  Create a mountpoints to work on


          mkdir mnt
          mkdir mnt2



  Make a file large enough to do the file system install. This will be a
  lot larger than the final rescue file system.  I chose 24 megs since
  16 megs is not large enough

          dd if=/dev/zero of=build bs=1024k count=24


  associate the file with a loop device and generate an ext2 file system
  on the file


          losetup /dev/loop0 build
          mke2fs -v -m0 -L initrd /dev/loop0
          mount /dev/loop0 mnt



  4.5.  Install the distribution - Slackware Specific

  ``...skip Slackware Specific stuff'' and go to next section.

  Now that an empty filesystem is created and mounted, run "setup".


  Specify         /root/raidboot/mnt



  as the 'target'.  The source is whatever you normally install from.
  Select the packages you wish to install and proceed but DO NOT
  configure.

  Choose 'EXPERT' prompting mode.

  I chose 'A', 'AP, and 'N' installing only the minimum to run the
  system plus an editor I am familiar with (vi, jed, joe) that is
  reasonably compact.



  lqqqqqqqq SELECTING PACKAGES FROM SERIES A (BASE LINUX SYSTEM) qqqqqqqqk
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x   [X] aaa_base  Basic filesystem, shell, and utils - REQUIRED    x x
  x x   [X] bash      GNU bash-1.14.7 shell - REQUIRED                 x x
  x x   [X] devs      Device files found in /dev - REQUIRED            x x
  x x   [X] etc       System config files & utilities - REQUIRED       x x
  x x   [X] shadow    Shadow password suite - REQUIRED                 x x
  x x   [ ] ide       Linux 2.0.30 no SCSI (YOU NEED 1 KERNEL)         x x
  x x   [ ] scsi      Linux 2.0.30 with SCSI (YOU NEED 1 KERNEL)       x x
  x x   [ ] modules   Modular Linux device drivers                     x x
  x x   [ ] scsimods  Loadable SCSI device drivers                     x x
  x x   [X] hdsetup   Slackware setup scripts - REQUIRED               x x
  x x   [ ] lilo      Boots Linux (not UMSDOS), DOS, OS/2, etc.        x x
  x x   [ ] bsdlpr    BSD lpr - printer spooling system                x x
  x x   [ ] loadlin   Boots Linux (UMSDOS too!) from MS-DOS            x x
  x x   [ ] pnp       Plug'n'Play configuration tool                   x x
  x x   [ ] umsprogs  Utilities needed to use the UMSDOS filesystem    x x
  x x   [X] sysvinit  System V-like INIT programs - REQUIRED           x x
  x x   [X] bin       GNU fileutils 3.12, elvis, etc. - REQUIRED       x x
  x x   [X] ldso      Dynamic linker/loader - REQUIRED                 x x
  x x   [ ] ibcs2     Runs SCO/SysVr4 binaries                         x x
  x x   [X] less      A text pager utility - REQUIRED                  x x
  x x   [ ] pcmcia    PCMCIA card services support                     x x
  x x   [ ] getty     Getty_ps 2.0.7e - OPTIONAL                       x x
  x x   [X] gzip      The GNU zip compression - REQUIRED               x x
  x x   [X] ps        Displays process info - REQUIRED                 x x
  x x   [X] aoutlibs  a.out shared libs - RECOMMENDED                  x x
  x x   [X] elflibs   The ELF shared C libraries - REQUIRED            x x
  x x   [X] util      Util-linux utilities - REQUIRED                  x x
  x x   [ ] minicom   Serial transfer and modem comm package           x x
  x x   [ ] cpio      The GNU cpio backup/archiving utility            x x
  x x   [X] e2fsbn    Utilities for the ext2 file system               x x
  x x   [X] find      GNU findutils 4.1                                x x
  x x   [X] grep      GNU grep 2.0                                     x x
  x x   [ ] kbd       Change keyboard mappings                         x x
  x x   [X] gpm       Cut and paste text with your mouse               x x
  x x   [X] sh_utils  GNU sh-utils 1.16 - REQUIRED                     x x
  x x   [X] sysklogd  Logs system and kernel messages                  x x
  x x   [X] tar       GNU tar 1.12 - REQUIRED                          x x
  x x   [ ] tcsh      Extended C shell version 6.07                    x x
  x x   [X] txtutils  GNU textutils-1.22 - REQUIRED                    x x
  x x   [ ] zoneinfo  Configures your time zone                        x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x


  From the 'AP series, I use only 'JOE', and editor I like, and 'MC' a
  small and useful file management tool. You choose the utilities you
  will need on your system.



  lqqqqqqqqq SELECTING PACKAGES FROM SERIES AP (APPLICATIONS) qqqqqqqqqk
  x x     [ ] ispell    The International version of ispell          x x
  x x     [ ] jove      Jonathan's Own Version of Emacs text editor  x x
  x x     [ ] manpgs    More man pages (online documentation)        x x
  x x     [ ] diff      GNU diffutils                                x x
  x x     [ ] sudo      Allow special users limited root access      x x
  x x     [ ] ghostscr  GNU Ghostscript version 3.33                 x x
  x x     [ ] gsfonts1  Ghostscript fonts (part one)                 x x
  x x     [ ] gsfonts2  Ghostscript fonts (part two)                 x x
  x x     [ ] gsfonts3  Ghostscript fonts (part three)               x x
  x x     [ ] jed       JED programmer's editor                      x x
  x x     [X] joe       joe text editor, version 2.8                 x x
  x x     [ ] jpeg      JPEG image compression utilities             x x
  x x     [ ] bc        GNU bc - arbitrary precision math language   x x
  x x     [ ] workbone  a text-based audio CD player                 x x
  x x     [X] mc        The Midnight Commander file manager          x x
  x x     [ ] mt_st     mt ported from BSD - controls tape drive     x x
  x x     [ ] groff     GNU troff document formatting system         x x
  x x     [ ] quota     User disk quota utilities                    x x
  x x     [ ] sc        The 'sc' spreadsheet                         x x
  x x     [ ] texinfo   GNU texinfo documentation system             x x
  x x     [ ] vim       Improved vi clone                            x x
  x x     [ ] ash       A small /bin/sh type shell - 62K             x x
  x x     [ ] zsh       Zsh - a custom *nix shell                    x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x


  From the 'N' package I only loaded TCPIP.  This isn't really neces
  sary, but is very handy and allows access to the network while working
  on a repair or update with the root raid array dismounted. TCPIP also
  contains 'biff' which is used by some of the applications in 'A'. If
  you don't install 'N' you might want to install the biff package any
  way.

  lqqqq SELECTING PACKAGES FROM SERIES N (NETWORK/NEWS/MAIL/UUCP) qqqqqk
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x    [ ] apache    Apache WWW (HTTP) server                      x x
  x x    [ ] procmail  Mail delivery/filtering utility               x x
  x x    [ ] dip       Handles SLIP/CSLIP connections                x x
  x x    [ ] ppp       Point-to-point protocol                       x x
  x x    [ ] mailx     The mailx mailer                              x x
  x x    [X] tcpip     TCP/IP networking programs                    x x
  x x    [ ] bind      Berkeley Internet Name Domain server          x x
  x x    [ ] rdist     Remote file distribution utility              x x
  x x    [ ] lynx      Text-based World Wide Web browser             x x
  x x    [ ] uucp      Taylor UUCP 1.06.1 with HDB && Taylor configs x x
  x x    [ ] elm       Menu-driven user mail program                 x x
  x x    [ ] pine      Pine menu-driven mail program                 x x
  x x    [ ] sendmail  The sendmail mail transport agent             x x
  x x    [ ] metamail  Metamail multimedia mail extensions           x x
  x x    [ ] smailcfg  Extra configuration files for sendmail        x x
  x x    [ ] cnews     Spools and transmits Usenet news              x x
  x x    [ ] inn       InterNetNews news transport system            x x
  x x    [ ] tin       The 'tin' news reader (local or NNTP)         x x
  x x    [ ] trn       'trn' for /var/spool/news                     x x
  x x    [ ] trn-nntp  'trn' for NNTP (install 1 'trn' maximum)      x x
  x x    [ ] nn-spool  'nn' for /var/spool/news                      x x
  x x    [ ] nn-nntp   'nn' for NNTP (install 1 'nn' maximum)        x x
  x x    [ ] netpipes  Network pipe utilities                        x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x


  With the installation complete, say no to everything else (no to all
  configuration requests) and exit the script.


  4.6.  Install linux pthreads

  Now you must install the 'linuxthreads-0.71' library.  I have included
  this diff for the linuxthreads Makefile rather than explain the
  details of the installation by hand.  Save the original Makefile,
  apply the diff and then:


          cd /usr/src/linuxthreads-0.71
    patch
          make
          make install



  -------------------diff Makefile.old  Makefile.raid-----------------
  2a3,13
  > # If you are building "linuxthreads" for installation on a mount
  > # point which is not the "root" partition, redefine 'BUILDIR' to
  > # the mount point to use as the "root" directory
  > # You may wish to do this if you are building an 'initial ram disk'
  > # such as used with bootable root raid devices.
  > # REQUIRES ldconfig version 1.9.5 or better
  > # do ldconfig -v to check
  > #
  > BUILDIR=/root/raidboot/mnt
  > #BUILDIR=
  >
  81,82c92,93
  <       install pthread.h $(INCLUDEDIR)/pthread.h
  <       install semaphore.h $(INCLUDEDIR)/semaphore.h
  ---
  >       install pthread.h $(BUILDIR)$(INCLUDEDIR)/pthread.h
  >       install semaphore.h $(BUILDIR)$(INCLUDEDIR)/semaphore.h
  84c95
  <       test -f /usr/include/sched.h || install sched.h $(INCLUDEDIR)/sched.h
  ---
  >       test -f $(BUILDIR)/usr/include/sched.h || install sched.h $(BUILDIR)$(INCLUDEDIR)/sched.h
  86,89c97,103
  <       install $(LIB) $(LIBDIR)/$(LIB)
  <       install $(SHLIB) $(SHAREDLIBDIR)/$(SHLIB)
  <       rm -f $(LIBDIR)/$(SHLIB0)
  <       ln -s $(SHAREDLIBDIR)/$(SHLIB) $(LIBDIR)/$(SHLIB0)
  ---
  >       install $(LIB) $(BUILDIR)$(LIBDIR)/$(LIB)
  >       install $(SHLIB) $(BUILDIR)$(SHAREDLIBDIR)/$(SHLIB)
  >       rm -f $(BUILDIR)$(LIBDIR)/$(SHLIB0)
  >       ln -s $(SHAREDLIBDIR)/$(SHLIB) $(BUILDIR)$(LIBDIR)/$(SHLIB0)
  > ifneq ($(BUILDIR),)
  >       ldconfig -r ${BUILDIR} -n $(SHAREDLIBDIR)
  > else
  91c105,106
  <       cd man; $(MAKE) MANDIR=$(MANDIR) install
  ---
  > endif
  >       cd man; $(MAKE) MANDIR=$(BUILDIR)$(MANDIR) install



  4.7.  Install Raid Tools

  The next step is the installation of the raid tools.  raidtools-0.42

  You must run the "configure" script to point the Makefile at the build
  directory for the ramdisk files
    cd /usr/src/raidtools-0.42
    configure --sbindir=/root/raidboot/mnt/sbin --prefix=/root/raidboot/mnt/usr
    make
    make install


  Now!! the Makefile for install is not quite right so do the following
  to clean up. This will be fixed in future releases so that the re-
  linking will not be necessary.


       Fix the make install error


  The file links specified in the Makefile at 'LINKS' must be removed
  and re-linked to operate properly.

          cd /root/raidboot/mnt/sbin
          ln -fs mdadd mdrun
          ln -fs mdadd mdstop



  4.8.  Remove un-needed directories and files from new filesystem.

  Delete the following directories from filesystem (CAUTION DON'T DELETE
  FROM YOUR RUNNING SYSTEM) it's easy to do, guess how I found out!!!

          cd /root/raidboot/mnt
          rm -r home/ftp/*
          rm -r lost+found
          rm -r usr/doc
          rm -r usr/info
          rm -r usr/local/man
          rm -r usr/man
          rm -r usr/openwin
          rm -r usr/share/locale
          rm -r usr/X*
          rm -r var/man
          rm -r var/log/packages
          rm -r var/log/setup
          rm -r var/log/disk_contents



  4.9.  Create /dev/md x

  The last step simply copies the /dev/md* devices from the current file
  system onto the rescue file system.  You could create these with
  mknode.

          cp -a /dev/md* /root/raidboot/mnt/dev



  4.10.  Create a bare filesystem suitable for initrd

  Now you have a clean re-useable filesystem ready for customization.
  Once customized, this file system can be used for rescue should the
  raid device(s) become corrupted and the raid tools needed to fix them.
  It will also be used to boot and root-mount the raid device by adding
  the linuxrc file which will be discussed next.


  Copy the file system to a smaller device for the initrd file, 16 megs
  should be large enough.

  Create the smaller file system and mount it

          cd /root/raidboot
          dd if=/dev/zero of=bare.fs bs=1024k count=16


  associate the file with a loop device and generate a ext2 file system
  on the file

          losetup /dev/loop1 bare.fs
          mke2fs -v -m0 -L initrd /dev/loop1
          mount /dev/loop1 mnt2


  Copy the 'build' file system to 'bare.fs'

          cp -a mnt/* mnt2


  Save the 'bare.fs' system before customization so later update is
  easy.  The 'build' file system is no longer needed and may be deleted.

          cd /root/raidboot
          umount mnt
          umount mnt2
          losetup -d /dev/loop0
          losetup -d /dev/loop1
          rm build
          cp bare.fs rescue
          gzip -9 bare.fs



  4.10.1.  Create the BOOT/RESCUE initrd  filesystem

  Now copy the system dependent items that match the kernel from the
  development platform, or you can manually modify the files in the
  rescue file system to match your target system.

          losetup /dev/loop0 rescue
          mount /dev/loop0 mnt


  Make sure your etc directory is clean of *~, core and log files.  The
  next 2 commands creates some warning messages, ignore them.

          cp -dp /etc/* mnt/etc
          cp -dp /etc/rc.d/* mnt/etc/rc.d

          mkdir  mnt/lib/modules
          cp -a  /lib/modules/2.x.x mnt/lib/modules <--- your current 2.x.x



  4.10.2.  Corrections for the Rescue System

  Edit the following files to correct them for your rescue system. Some
  file names listed below are Slackware specific but have equivalents in
  other distributions.



          cd mnt

  Non-network
          etc/fstab
          etc/mdtab       should work OK
  Network
          etc/hosts
          etc/resolv.conf
          etc/hosts.equiv         and related files
          etc/rc.d/rc.inet1       correct ip#, mask, gateway, etc...
          etc/rc.d/rc.S           remove entire section on file system status
                  from:
                          # Test to see if the root partition is read-only
                  to but not including:
                          # remove /etc/mtab* so that mount will .....
                                  This avoids the annoying warning that
                                  the ramdisk is mounted rw.
          etc/rc.d/rc.xxxxx       others as required, see later on in this doc
          root/.rhosts            if present
          home/xxxx/xxxx          others as required

      WARNING:    The above procedure moves your password and shadow
                  files onto the rescue disk!!!!!

      WARNING:    You may not wish to do this for security reasons.


  Create any directories for mounting /dev/disk... as may be required
  that are unique to your system.  These are the mountpoints for booting
  the system (boot partition and backup boot partition). My system boot
  from dos using loadlin, however linux partition(s) and lilo will work
  fine.  My system uses:

          cd /root/raidboot/mnt           <--- initrd root
          mkdir dosa                      dos partition mount point
          mkdir dosb                      dos mirror mount point


  The rescue file system is complete!

  You will note upon examination of the files in the rescue file system,
  that there are still many files that could be deleted.  I have not
  done this since it would overly complicate this procedure and most
  raid systems have adequate disk and memory.  If you wish to skinny
  down the file system, go to it!


  4.11.  Making 'initrd' boot the RAID device - linuxrc

  To make the rescue disk boot the raid device, you need only copy the
  executable script file:


       linuxrc


  to the root of the device.

  The theory of operation for this linuxrc file is discussed in
  ``Appendix G, linuxrc theory of operation''.

  A very simple and much easier to understand (working) linuxrc is
  included in ``Appendix D'', obsolete linuxrc and shutdown scripts.
  Copy the following text to linuxrc and save in your development area.


   -------------------- linuxrc ----------------------
  #!/bin/sh
  # ver 1.13 3-6-98
  #
  ################# BEGIN 'linuxrc' ##################
  #                DEFINE FUNCTIONS                  #
  ####################################################
  # Define 'Fault' function in the event something
  # goes wrong during the execution of 'linuxrc'
  #
  FaultExit () {
  # correct fstab to show '/dev/ram0' for rescue system
      /bin/cat /etc/fstab | {
      while read Line
      do
          if [ -z "$( echo ${Line} | /usr/bin/grep md0 )" ]; then
              echo ${Line}
          else
              echo "/dev/ram0 / ext2 defaults 1 1"
          fi
      done
      } > /etc/tmp.$$
      /bin/mv /etc/tmp.$$ /etc/fstab
  #       point root at /dev/ram0 (the rescue system)
          echo 0x100>/proc/sys/kernel/real-root-dev
          /bin/umount /proc
          exit
  }

  # Define 'Warning' procdure to print banner on boot terminal
  #
  Warning () {
      echo '*********************************'
      echo -e " $*"
      echo '*********************************'
  }

  # Define 'SplitKernelArg' to help extract 'Raid' related kernel arguments
  SplitKernelArg () { eval $1='$( IFS=,; echo $2)' }

  #Define 'SplitConfArgs' to help extract system configuration arguments
  SplitConfArgs () {
      RaidBootType=$1
      RaidBootDevice=$2
      RaidConfigPath=$3
  }
  ########################################################
  ################### MAIN linuxrc #######################
  ########################################################
  # mount the proc file system
  /bin/mount /proc

  # Get the boot partition and configuration location from command line
  CMDLINE=`/bin/cat /proc/cmdline`
  for Parameter in $CMDLINE; do
      Parameter=$( IFS='='; echo ${Parameter} )
      case $Parameter in
          Raid*) SplitKernelArg $Parameter;;
      esac
  done

  # check for 'required raid boot'
  if [ -z "${Raid_Conf}" ]; then
      Warning Kernel command line \'Raid_Conf\' missing
      FaultExit
  fi
  SplitConfArgs $Raid_Conf

  # tmp mount the boot partition
  /bin/mount -t ${RaidBootType} ${RaidBootDevice} /mnt

  # get etc files from primary raid system
  pushd /etc

  # this will un-tar into 'etc' (see rc.6)
  if [ ! -f /mnt/${RaidConfigPath}/raidboot.etc ]; then
  # bad news, this file should be here
      Warning required file \'raidboot.etc\' \
      missing from ${RaidBootDevice}/${RaidConfigPath} \\n \
      \\tUsing rescue system defaults
  else
      /bin/tar -xf /mnt/${RaidConfigPath}/raidboot.etc
  fi
  # get 'real' raidboot device for this boot
  # status path, and name of raidX.conf
  if [ ! -f /mnt/${RaidConfigPath}/raidboot.cfg ]; then
  # bad news, this file should be here
      Warning required file 'raidboot.cfg' \
      missing from ${RaidBootDevice}/${RaidConfigPath}\\n \
      \\tUsing rescue system defaults
  # Get the first raidX.conf file name in $RArg1
      RaidBootDevs=$RaidBootDevice
      RaidStatusPath=$RaidConfigPath
      for RaidConfigEtc in $( ls raid*.conf )
      do break; done
  else
      {
      read RaidBootDevs
      read RaidStatusPath
      read RaidConfigEtc
      } < /mnt/${RaidConfigPath}/raidboot.cfg

  fi
  popd
  /bin/umount /mnt

  # Set a flag in case the raid status file is not found
  #
  RAIDOWN="raidboot.ro not found"
  RAIDREF="raidgood.ref not found"
  echo "Reading md0 shutdown status."

  # search for raid shutdown status
  for Device in ${RaidBootDevs}
  do
  #   these filesystem types should be in 'fstab' since
  #   the partitions must be mounted for a clean raid shutdown
      /bin/mount ${Device} /mnt
      if [ -f /mnt/${RaidStatusPath}/raidboot.ro ]; then
          RAIDOWN=`/bin/cat /mnt/${RaidStatusPath}/raidboot.ro`
          RAIDREF=`/bin/cat /mnt/${RaidStatusPath}/raidgood.ref`
          /bin/umount /mnt
          break
      fi
      /bin/umount /mnt
  done
  # Test for a clean shutdown with array matching reference
  if [ "${RAIDOWN}" != "${RAIDREF}" ]; then
      Warning shutdown ERROR ${RAIDOWN}
      FaultExit
  fi

  # The raid array is clean, remove shutdown status files
  for Device in ${RaidBootDevs}
  do
      /bin/mount ${Device} /mnt
      /bin/rm -f /mnt/${RaidStatusPath}/raidboot.ro
      /bin/umount /mnt
  done

  # Write a clean superblock on all raid devices

  echo "write clean superblocks"
  /sbin/mkraid -f --only-superblock /etc/${RaidConfigEtc}

  # Activate raid array(s)
  if [ -z "$Raid_ALT" ]; then
      /sbin/mdadd -ar
  else
      /sbin/mdadd $Raid_ALT
  fi

  #  If there are errors - BAIL OUT and leave rescue running
  if [ $? -ne 0 ]; then
     Warning some RAID device has errors
     FaultExit
  fi

  # Everything is fine, let the kernel mount /dev/md0
  # tell the kernel to switch to /dev/md0 as the /root device
  # The 0x900 value is the device number calculated by:
  #  256*major_device_number + minor_device number
  echo "/dev/md0 mounted on root"
  echo 0x900>/proc/sys/kernel/real-root-dev
  # umount /proc to deallocate initrd device ram space
  /bin/umount /proc
  exit
  #------------------ end linuxrc ----------------------


  Add 'linuxrc' to initrd boot device

          cd /root/raidboot
          chmod 777 linuxrc
          cp -p linuxrc mnt



  4.12.  Modifying the rc-scripts for SHUTDOWN

  To complete the installation, modify the rc scripts to save the md
  status to the real root device when shutdown occurs.

  In slackware this is rc.0 -> rc.6
  In debian 'bo' this is in both 'halt' and 'reboot'

  If you implement this in another distribution, please e-mail
  the instructions and sample files so they can be included here.


  I have modified Bohumil Chalupa's raid stop work-around slightly. His
  original solution is presented in ``Appendix A''.

  Since there are no linux partitions left on the production system
  except md0, the boot partitions are used to store the raidOK readonly
  status.  I chose to write a file to each of the duplicate boot
  partitions containing the status of the md array at shutdown and
  signifying that the md device has been remounted RO. This allows the
  system to be fail safe when any of the hard drives die.

  The shutdown script is modified to call ``rc.raidown'' which saves the
  necessary information to successfully reboot and mount the raid
  device. Examples of shutdown scripts for various linux distributions
  are shown in ``Appendix B''.


  To capture the raid array shutdown status insert a call to
  ``rc.raidown'' after any case statements (if present) but before the
  actual shutdown (kills, status saves, etc...) begins and before the
  file systems are dismounted.

  ############ Save raid boot and status info ##############
  #
    if [ -x /etc/rc.d/rc.raidown ]; then
      /etc/rc.d/rc.raidown
    fi
  ################## end raid boot #########################


  After all the file systems are dismounted (the root file system

  ################ for raid arrays #########################
  # Stop all known raid arrays (except root which won't stop)
    if [ -x /sbin/mdstop ]; then
      echo "Stopping raid"
      /sbin/mdstop -a
    fi
  ##########################################################


  This will cleanly stop all raid devices except root.  Root status is
  passed to the next boot in raidstat.ro.


  Copy the rc file to your new raid array, the rescue file system that
  is still mounted on /root/raidboot/mnt and the development system if
  it is on the same machine.

  Modify rescue etc/fstab as needed and make sure rescue mdtab is
  correct.

  Now copy the rescue disk to your dos partition and everything should
  be ready to boot the raid device as root.

          umount mnt
          losetup -d /dev/loop0
          gzip -9 rescue


  Copy rescue.gz to your boot partitions.

  All that remains is to creat the configuration file raidboot.conf and
  test the new file system  by rebooting.


  4.13.  Configuring RAIDBOOT - raidboot.conf

  The comments following the example configuration file explain each of
  the three lines. This example file is for a 4 drive raid5 scsii array
  with duplicate boot partitions on drives sda1 and sdb1. Put the
  paramaters descriptive of your file systems here instead.


    /dev/sda1 /dev/sdb1
    linux
    raid5.conf
  # comments may only be placed 'after' the three
  # configuration lines.
  #
  # This is 'raidboot.conf'
  #
  # line one, the partition(s) containing the 'initrd' raid-rescue system
  #       It is not necessary to boot from these partitions, however,
  #       since the rescue system will not fit on floppy, it is necessary
  #       to know which partitions are to be used to load the rescue system
  #
  # line two, the path to the raidboot config information
  #       Where the shutdown status, etc... is located at boot time
  #       It does NOT include the mount point information, only 'path'
  #       /mntpoint/'path'
  #
  # line -3-, name of the raid configuration file
  #       Current raid configuration file i.e. raid1.conf, raid5.conf



  4.14.  Kernel 'loadlin and lilo' variables for RESCUE and RAID

  There are two kernel variables for the RESCUE and RAID system, only
  the first need be specified.

    Raid_Conf=msdos,/dev/sda1,raidboot

       This variable points to raid boot device and configuration
       file.  For floppy rescue boot, you may want to specify this
       on the kernel command line or in the loadlin or lilo boot
       file


       format: 'filesystem-type,device,path-to-config-from-mount
       point'


    Raid_ALT=-r,-p5,/dev/md0,/dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3

       Alternate mdadd parameters necessary when booting with non-
       redundant raid array. These are the comma separated command
       line parameters for mdadd. Unless they are needed to start a
       failed/non-redundant array, COMMENT OUT OR SPECIFY WITH A
       'NULL'.


       i.e. Raid_ALT=


  Either of these parameters may be specified in the lilo or loadlin
  boot parameter file or on the loadlin kernel command line. Care must
  be taken that the maximum line length is not exceeded, however, if the
  command line is used (128 characters).


  When booting with lilo, the parameters are included in the lilo config
  file in the form:

  append="Raid_Conf=msdos,/dev/sda1,raidboot"
  append="Raid_ALT=-r,-p5,/dev/md0,/dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3"


  See man lilo.conf for more detailed information.

  Since I have some hardware that requires DOS configuration utilities,
  I have a small dos partition on the system.  Therefore, I used loadlin
  to boot the raid5 system from the dos partition with a mirror (copy)
  on the companion disk. An identical method is used for the raid1
  system. The example below uses loadlin, but the procedure is very
  similar for lilo.

  My dos root system contains a small editor among the utilities so I
  can modify the boot parameters of loadlin if necessary, allowing me to
  reboot the linux system on my swap disk while testing.

  The dos system contains this tree for linux"

          c:\raidboot.bat
          c:\raidboot\loadlin.exe
          c:\raidboot\zimage
          c:\raidboot\rescue.gz
          c:\raidboot\raidboot.cfg
          c:\raidboot\raidboot.etc
          c:\raidboot\raidgood.ref
          c:\raidboot\raidstat.ro       (only at shutdown)


  ---------------------- linux.bat ---------------------------
  echo "Start the LOADLIN process:"
  c:\raidboot\loadlin @c:\raidboot\boot.par
  -------------------- end linux.bat -------------------------


  boot.par contains:



          # loadlin boot parameter file
          #
          # version 1.02 3-6-98

          # linux kernel image
          c:\linux\zimage

          # target root device
          root=/dev/md0
          #root=/dev/ram0
          #root=/dev/sdc5

          # mount root device as 'ro'
          ro

          # size of ram disk
          ramdisk_size=16384

          # initrd file name
          initrd=c:\raidboot\rescue.gz
          #noinitrd

          # memory ends here
          mem=131072k

          # points to raid boot device, configuration file
          # for floppy rescue boot, you may want to specify
          # this on the command line instead of here
          # format 'filesystem-type,device,path-to-config-frm_mntpnt'
          Raid_Conf=msdos,/dev/sda1,raidboot

          # Alternate mdadd parameters
          # necessary when boot with non-redundant raid
          # otherwise, COMMENT OUT OR SPECIFY 'NULL'
          #Raid_ALT=-r,-p5,/dev/md0,/dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3

          # ethernet devices
          ether=10,0x300,eth0

  ***** >> NOTE!! the only difference between forcing the rescue system to
              run and the raid device mounting, is the loadlin parameter

                  root=/dev/ram0          for the rescue system
                  root=/dev/md0           for RAID

                  With root=/dev/ram0 the RAID device will not mount
                  and the rescue system will run unconditionally.



  If the RAID array fails, the rescue system is left mounted and
  running.


  5.  Configuring the Production RAID system.


  5.1.  Two systems with identical motherboards were configured.  System
  specs.



                                    Raid-1          Raid-5
  Motherboard:    Iwill P55TU     dual ide        adaptec scsi
  Processor:      Intel P200
  Disks:                          2ea  7 gig      4 ea Segate 4.2 gig
                                  Maxtors         wide scsii


  The disk drives are designated by linux as 'sda' through 'sdd' on the
  raid5 system and 'hda' and 'hdc' on the raid1 system.


  5.2.  Partitioning the hard drives.

  Since testing a large root mountable RAID array is difficult because
  of the ckraid re-boot problem, I re-partitioned my swap space to
  include a smaller RAID partition for testing purposes,
  sda6,sdb6,sdc6,sdd6, and a small root and /usr/src partition pair for
  developing and testing the raid kernel and tools.  You may find this
  helpful.



          <bf/DEVELOPMENT SYSTEM - RAID5/
     Device       System          Size    Purpose

    /dev/sda1     dos boot        16 meg  boot partition
  * /dev/sda2     extended        130 meg (see below)
    /dev/sda3     linux native    4 gig   primary raid5-1
  ----------------------sda2------------------------------
  * /dev/sda5     linux swap      113 meg SWAP space
  * /dev/sda6     linux native    16 meg  test raid5-1
  ========================================================
    /dev/sdb1     dos boot        16 meg  boot partition duplicate
  * /dev/sdb2     extended        130 meg (see below)
    /dev/sdb3     linux native    4 gig   primary raid5-2
  ----------------------sdb2------------------------------
  * /dev/sdb5     linux swap      113 meg SWAP space
  * /dev/sdb6     linux native    16 meg  test raid5-2
  ========================================================
  * /dev/sdc2     extended        146 meg (see below)
    /dev/sdc3     linux native    4 gig   primary raid5-3
  ----------------------sdc2------------------------------
  * /dev/sdc5     linux swap      130 meg development root partition
  * /dev/sdc6     linux native    16 meg  test raid5-3
  ========================================================
  * /dev/sdd2     extended        146 meg (see below)
    /dev/sdd3     linux native    4 gig   primary raid5-4
  ----------------------sdd2------------------------------
  * /dev/sdd5     linux swap      130 meg development /usr/src
  * /dev/sdd6     linux native    16 meg  test raid5-4


          <bf/DEVELOPMENT SYSTEM - RAID1/
     Device       System          Size    Purpose

    /dev/hda1     dos             16meg   boot partition
  * /dev/hda2     extended        126m    (see below)
    /dev/hda3     linux           126m    development root partition
    /dev/hda4     linux           6+gig   raid1-1
  ----------------------hda2------------------------------
  * /dev/hda5     linux            26m    test raid1-1
  * /dev/hda6     linux swap      100m
  ========================================================

    /dev/hdc1     is simply an exact copy of hda1 so the
                  partion can be made active if hda fails
  * /dev/hdc2     extended        126m    (see below)
    /dev/hdc3     linux           126m    development /usr/src
    /dev/hdc4     linux           6+gig   raid1-2
  ----------------------hdc2------------------------------
  * /dev/hdc5     linux            26m    test raid1-2
  * /dev/hdc6     linux swap      100m


  The sdx2 and hdx3 partitions were switched to 'swap' after developing
  this utility. I could have done it on another machine, however, the
  libraries and kernels are all about a year or more out of date on my
  other linux boxes and I preferred to build it on the target machine.

  The partitioning scheme was chosen so that in the event that any one
  of the drives fails catastrophically, the system will continue to run
  and be bootable with minimum effort and NO data loss.

    If any single hard drive fails, the boot will abort, and the rescue
     system will run. Examination of the screen message or
     /dosx/raidboot/raidstat.ro will tell the operator the status of the
     failed array.

    If sda1 (raid5) or hda1 (raid1) fails, the dos backup boot
     partition must be made 'active' and the bios must recognize the new
     partition as the boot device or it must be physically be moved to
     the xda position.  Alternatively, the system could be booted from a
     floppy disk using the initrd image on the remaining backup boot
     drive.  The raid system can then be made active again by issuing:

              "/sbin/mkraid /etc/raid<it/x/.conf -f --only-superblock"


  to rebuild the remaining superblock(s).

    Once this is done, then


             mdadd -ar



    Examine the status of the array to verify that everything is OK
     then replace the good array reference with the current status until
     the failed disk can be repaired or replaced.


             cat /proc/mdstat | grep md0 > /dosx/raidboot/raidgood.ref

             shutdown -r now


  to do a clean reboot, and the system is up again.

  6.  Building the RAID file system.

  This description is for my RAID systems described in the system specs.
  Your system may have a different RAID architecture, so modify as
  appropriate. Please read the man pages and QuickStart.RAID that come
  with the raidtools-0.42

  6.1.  /etc/raid5.conf


          # raid-5 configuration
          raiddev                 /dev/md0
          raid-level              5
          nr-raid-disks           4
          chunk-size              32

          # Parity placement algorithm
          parity-algorithm        left-symmetric

          # Spare disks for hot reconstruction
          #nr-spare-disks         0

          device                  /dev/sda3
          raid-disk               0

          device                  /dev/sdb3
          raid-disk               1

          device                  /dev/sdc3
          raid-disk               2

          device                  /dev/sdd3
          raid-disk               3


  6.2.  /etc/raid1.conf


          # raid-1 configuration
          raiddev                 /dev/md0
          raid-level              1
          nr-raid-disks           2
          nr-spare-disks          0

          device                  /dev/hda4
          raid-disk               0

          device                  /dev/hdc4
          raid-disk               1



  6.3.  Step by Step procedures for building production RAID file sys
  tem.

  For my RAID5 system I did a complete install of:

          Slackware-3.4           any current distribution should work OK
          linuxthreads-0.71
          raidtools-0.42
          linux-2.0.33 with raid145 patch and Gadi's patch



  Create and format the raid device.

          mkraid /etc/raid5.conf
          mdcreate raid5 /dev/md0 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3
          mdadd -ar
          mke2fs /dev/md0
          mkdir /md
          mount -t ext2 /dev/md0 /md


  Create the reference files that reboot will use, this may be different
  on your system.

          cat /proc/mdstat | grep md0 > /dosa/raidboot/raidgood.ref
          cat /proc/mdstat | grep md0 > /dosb/raidboot/raidgood.ref


  Use Slackware-3.4 or another distribution to build your OS

          setup


  Specify '/md' as the target, and the source whatever your normally
  use.  Select and install the disksets of interest except for the ker
  nel.  Configure the system, but skip the section on lilo and kernel
  booting.  Exit setup.

  Install 'pthreads'

          cd /usr/src/linuxthreads-0.71


  edit the Makefile and specify



          BUILDIR=/md

          make
          make install


  Install 'raidtools'

          cd /usr/src/raidtools-0.42
          configure --sbindir=/md/sbin --prefix=/md/usr


  fix the raidtools make install error

          cd /md/sbin
          rm mdrun
          rm mdstop
          ln -s mdadd mdrun
          ln -s mdadd mdstop


  Create /dev/mdx

          cp -a /dev/md* /md/dev


  Add the system configuration from the current system (ignore errors).

          cp -dp /etc/* mnt/etc
          cp -dp /etc/rc.d/* mnt/etc/rc.d         (include the new rc.6)
          mkdir  mnt/lib/modules
          cp -a  /lib/modules/2.x.x mnt/lib/modules <--- your current 2.x.x


  Edit the following files to correct them for your file system

          cd /md

  Non-network
          etc/fstab       correct for real root and raid devices.
          etc/mdtab       should work OK
  Network
          etc/hosts
          etc/resolv.conf
          etc/hosts.equiv         and related files
          etc/rc.d/rc.inet1       correct ip#, mask, gateway, etc...
          etc/rc.d/rc.S           remove entire section on file system status
                  from:
                          # Test to see if the root partition isread-only
                  to but not including:
                          # remove /etc/mtab* so that mount will .....
                                  This avoids the annoying warning that
                                  the ramdisk is mounted rw.
          etc/rc.d/rc.xxxxx       others as required
          root/.rhosts            if present
          home/xxxx/xxxx          others as required

      WARNING:    The above procedure moves your password and shadow
                  files onto the new file system!!!!!

      WARNING:    You may not wish to do this for security reasons.


  Create any directories for mounting /dev/disk... as may be required
  that are unique to your system.  Mine need:

          cd /md          <--- new file system root
          mkdir dosa                      dos partition mount point
          mkdir dosb                      dos mirror mount point


  The new file system is complete. Make sure and save the md reference
  status to the 'real' root device and you are ready to boot.

  mount the dos partitions on dosa and dosb

          cat /proc/mdstat | grep md0 > /dosa/raidboot/raidgood.ref
          cat /proc/mdstat | grep md0 > /dosb/raidboot/raidgood.ref

          mdstop /dev/md0



  7.  One last thought.

  Remember that an expert is someone who knows at least 1% more than you
  do about a subject.  Bear this in mind when you e-mail me for help.
  I'll try, but I've only done this once for raid1 and once for raid5!

  Michael Robinton Michael@bzs.org <mailto:michael@bzs.org>


  8.  Appendix A. - Bohumil Chalupa's md0 shutdown

  Bohumil Chalupa's post to the linux raid list on the work around for
  the raid1 + 5 mdstop problem. His solution does not address the
  possibility of the raid device being corrupt at shutdown.  So I have
  added a simple status comparison to a good reference status at boot.
  This allows the operator to intervene if something is wrong with a
  disk in the array. The description of this is in the main body of this
  document.



  > From: Bohumil Chalupa <bochal@apollo.karlov.mff.cuni.cz>
  >
  > I can now boot initrd and use linuxrc to start the RAID1 array,
  > then successfully switch root to /dev/md0.
  >
  > I don't know, however, any way how to cleanly _stop_ the array.

  Well. I have to answer myself :-)

  > Date: Mon, 29 Dec 1997 02:21:38 -0600 (CST)
  > From: Edward Welbon <welbon@bga.com>
  > Subject: Re: dismounting root raid device
  >
  > For md devices other than raid0, there is probably state that needs to
  > be saved that is only known once all writes have completed.  Such state
  > of course can't be saved to root once it is mounted readonly.  In that
  > case, you would have to be able to mount a writeable filesystem "X"
  > on the readonly root and be able to write to "X" (I recall doing this
  > during "rescue" operations, but not as an automated procedure).
  >
  > The filesystem "X" would presumably be a boot device from which the raid
  > (during linuxrc exection via initrd) would pickup it's initial state from.
  > Fortunately raid0 isn't required to write out any state (though it would
  > be pleasant to be able to write the check sums to mdtab after an mdstop).
  > Eventually, I will fiddle with this but it doesn't seem difficult though
  > the "devil" is always in the "details".

  Yes, that's it.
  I had this idea in mind for some time already, but had no time to try it.
  Yesterday I did, and it works.

  With my RAID1 (mirror), I don't save any checksums or raid superblock data.
  I only save an information on the "real" boot partition, that the root md
  volume was remounted readonly during shutdown. Then, during boot, the
  linuxrc script runs mkraid --only-superblock  when it finds this
  information; otherwise, it runs ckraid.
  This means, that the raid superblock information is not updated during
  shutdown; it's updated at the boot time.
  It is not very clean, I'm afraid,  :-(   but it works.

  I'm using Slackware and initrd.md by Edward Welbon to boot the root raid
  device.
  As far as I remember now, the only modified files are
  mkdisk and linuxrc, and /etc/rc.d/rc.6 shutdown script.
  And lilo.conf, of course.

  I'm appending the important parts.

  Bohumil Chalupa

  --------------- my.linuxrc follows -----------------
  #!/bin/sh
  # we need /proc
  /bin/mount /proc
  # start up the md0 device. let the /etc/rc.d scripts get the rest of them
  # we should do as little as possible here
  # ________________________________________
  # root raid1 shutdown test & recreation
  # /start must be created on the rd image in my.mkdisk
  echo "preparing md0: mounting /start"
  /bin/mount /dev/sda2 /start -t ext2
  echo "reading saved md0 state from /start"
  if [ -f /start/root.raid.ok ]; then
   echo "raid ok, modyfying superblock"
   rm /start/root.raid.ok
   /sbin/mkraid /etc/raid1.conf -f --only-superblock
  else
   echo "raid not clean, runing ckraid --fix"
   /sbin/ckraid --fix /etc/raid1.conf
  fi
  echo "unmounting /start"
  /bin/umount /start
  # _________________________________________
  #
  echo "adding md0 for root file system"
  /sbin/mdadd /dev/md0 /dev/sda1 /dev/sdb1
  echo "starting md0"
  /sbin/mdrun -p1 /dev/md0
  # tell kernel we want to switch to /dev/md0 as root device, the 0x900 value
  # is arrived at via 256*major_device_number + minor_device number.
  echo "setting real-root-dev"
  /bin/echo 0x900>/proc/sys/kernel/real-root-dev
  #  unmount /proc so that the ram disk can be deallocated.
  echo "unmounting /proc"
  /bin/umount /proc
  /bin/echo "We are hopefully ready to mount /dev/md0 (major 9, minor 0) as
  root"
  exit
  --------------- end of my.linuxrc ----------------------------------


  ----------- extract from /etc/rc.d/rc.6 follows -----------------
    # Turn off swap, then unmount local file systems.
    echo "Turning off swap."
    swapoff -a
    echo "Unmounting local file systems."
    umount -a -tnonfs
    # Don't remount UMSDOS root volumes:
    if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
      mount -n -o remount,ro /
    fi

    # Save raid state
    echo "Saving RAID state"
    /bin/mount -n /dev/sda2 /start -t ext2
    touch /start/root.raid.ok
    /bin/umount -n /start

  -------------- end of excerpt from rc.6 ------------------------


  ------------------ part of my.mkdisk follows ----------------------
  #
  #  now we have the filesystem ready to be populated, we need to
  #  get a few important directories.  I had endless trouble till
  #  I created a pristine mtab.  In my case, it is convenient that
  #  /etc/mdtab is copied over, this way I can activate md with
  #  a simple "/sbin/mdadd -ar" in linuxrc.
  #
  cp -a $ROOT/etc $MOUNTPNT 2>cp.stderr 1>cp.stdout
  rm -rf $MOUNTPNT/etc/mtab
  rm -rf $MOUNTPNT/etc/ppp*
  rm -rf $MOUNTPNT/etc/termcap
  rm -rf $MOUNTPNT/etc/sendmail*
  rm -rf $MOUNTPNT/etc/rc.d
  rm -rf $MOUNTPNT/etc/dos*
  cp -a $ROOT/sbin $ROOT/dev $ROOT/lib $ROOT/bin $MOUNTPNT 2>>cp.stderr
  1>>cp.stdout
  # _____________________________________________________________________
  #  RAID: will need mkraid and ckraid
  cp -a $ROOT/usr/sbin/mkraid $ROOT/usr/sbin/ckraid $MOUNTPNT/sbin
  2>>cp.stderr 1>>cp.stdout
  # ---------------------------------------------------------------------
  #  it seems that init wont come out to play unless it has utmp.   this can
  #  probably be pruned back alot.  no telling what the real bug was 8-).
  #
  mkdir $MOUNTPNT/var $MOUNTPNT/var/log $MOUNTPNT/var/run $MOUNTPNT/initrd
  touch $MOUNTPNT/var/run/utmp $MOUNTPNT/etc/mtab
  chmod a+r $MOUNTPNT/var/run/utmp $MOUNTPNT/etc/mtab
  ln -s /var/run/utmp $MOUNTPNT/var/log/utmp
  ln -s /var/log/utmp $MOUNTPNT/etc/utmp
  ls -lstrd $MOUNTPNT/etc/utmp $MOUNTPNT/var/log/utmp $MOUNTPNT/var/run/utmp
  #
  #  since I wanted to change the mount point, I needed this though
  #  I suppose that I could have done a "mkdir /proc" in linuxrc.
  #
  mkdir $MOUNTPNT/proc
  chmod 555 $MOUNTPNT/proc
  #
  #  ------------------------------------------------------
  #  we'll mount the real boot device to /start temporarily
  #  to check the root raid state saved at shutdown time
  #
  mkdir $MOUNTPNT/start
  #  -------------------------------------------------------
  #
  #  need linuxrc  (it is, after all, the point of this exercise).
  #
  if [ -x ./my.linuxrc ]; then
    cp -a ./my.linuxrc $MOUNTPNT/linuxrc
    chmod 777 $MOUNTPNT/linuxrc
  else
     ln -s /bin/sh $MOUNTPNT/linuxrc
  fi
  #
  ----------------- part of my.mkdisk ends -----------------



  9.  Appendix B. - Sample SHUTDOWN scripts


    ``Slackware''

    ``Debian''


  9.1.  Slackware - /etc/rc.d/rc.6



  #! /bin/sh
  #
  # rc.6          This file is executed by init when it goes into runlevel
  #               0 (halt) or runlevel 6 (reboot). It kills all processes,
  #               unmounts file systems and then either halts or reboots.
  #
  # Version:      @(#)/etc/rc.d/rc.6      1.50    1994-01-15
  #
  # Author:       Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org>
  # Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
  #
  # Modified by:  Michael A. Robinton < michael@bizsystems.com >
  #               to add call to rc.raidown
    # Set the path.
    PATH=/sbin:/etc:/bin:/usr/bin

    # Set linefeed mode to avoid staircase effect.
    stty onlcr

    echo "Running shutdown script $0:"

    # Find out how we were called.
    case "$0" in
          *0)
                  message="The system is halted."
                  command="halt"
                  ;;
          *6)
                  message="Rebooting."
                  command=reboot
                  ;;
          *)
                  echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
                  exit 1
                  ;;
    esac

  ############ Save raid boot and status info ##############
  #
  if [ -x /etc/rc.d/rc.raidown ]; then
     /etc/rc.d/rc.raidown
  fi
  ################## end raid boot #########################

    # Kill all processes.
    # INIT is supposed to handle this entirely now, but this didn't always
    # work correctly without this second pass at killing off the processes.
    # Since INIT already notified the user that processes were being killed,
    # we'll avoid echoing this info this time around.
    if [ "$1" != "fast" ]; then # shutdown did not already kill all processes
      killall5 -15
      killall5 -9
    fi

    # Try to turn off quota and accounting.
    if [ -x /usr/sbin/quotaoff ]
    then
          echo "Turning off quota."
          /usr/sbin/quotaoff -a
    fi
    if [ -x /sbin/accton ]
    then
          echo "Turning off accounting."
          /sbin/accton
    fi

    # Before unmounting file systems write a reboot or halt record to wtmp.
    $command -w

    # Save localtime
    [ -e /usr/lib/zoneinfo/localtime ] && cp /usr/lib/zoneinfo/localtime /etc

    # Asynchronously unmount any remote filesystems:
    echo "Unmounting remote filesystems."
    umount -a -tnfs &

    # Turn off swap, then unmount local file systems.
    echo "Turning off swap."
    swapoff -a
    echo "Unmounting local file systems."
    umount -a -tnonfs
    # Don't remount UMSDOS root volumes:
    if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
      mount -n -o remount,ro /
    fi

  ################ for raid arrays #########################
  # Stop all known raid arrays (except root which won't stop)
  if [ -x /sbin/mdstop ]; then
    echo "Stopping raid"
    /sbin/mdstop -a
  fi
  ##########################################################

    # See if this is a powerfail situation.
    if [ -f /etc/powerstatus ]; then
      echo "Turning off UPS, bye."
      /sbin/powerd -q
      exit 1
    fi

    # Now halt or reboot.
    echo "$message"
    [ ! -f /etc/fastboot ] && echo "On the next boot fsck will be FORCED."
    $command -f
  ############### end rc.6 #################################



  9.2.  Debian bo - /etc/init.d/halt and /etc/init.d/reboot

  The modifications shown here for Debian bo halt and reboot files are
  NOT TESTED. When you test this, please e-mail me so I can remove this
  comment.


  9.2.1.  /etc/init.d/halt



  #! /bin/sh
  #
  # halt          The commands in this script are executed as the last
  #               step in runlevel 0, ie halt.
  #
  # Version:      @(#)halt  1.10  26-Apr-1997  miquels@cistron.nl
  #

  PATH=/sbin:/bin:/usr/sbin:/usr/bin

  ############ Save raid boot and status info ##############
  #
  if [ -x /etc/rc.d/rc.raidown ]; then
     /etc/rc.d/rc.raidown
  fi
  ################## end raid boot #########################

  # Kill all processes.
  echo -n "Sending all processes the TERM signal... "
  killall5 -15
  echo "done."
  sleep 5
  echo -n "Sending all processes the KILL signal... "
  killall5 -9
  echo "done."

  # Write a reboot record to /var/log/wtmp.
  halt -w

  # Save the random seed between reboots.
  /etc/init.d/urandom stop

  echo -n "Deactivating swap... "
  swapoff -a
  echo "done."

  echo -n "Unmounting file systems... "
  umount -a
  echo "done."

  mount -n -o remount,ro /

  ################ for raid arrays #########################
  # Stop all known raid arrays (except root which won't stop)
  if [ -x /sbin/mdstop ]; then
    echo "Stopping raid"
    /sbin/mdstop -a
  fi
  ##########################################################

  # See if we need to cut the power.
  if [ -x /etc/init.d/ups-monitor ]
  then
          /etc/init.d/ups-monitor poweroff
  fi

  halt -d -f
  ############# end halt ####################



  9.2.2.  /etc/init.d/reboot



  #! /bin/sh
  #
  # reboot        The commands in this script are executed as the last
  #               step in runlevel 6, ie reboot.
  #
  # Version:      @(#)reboot  1.9  02-Feb-1997  miquels@cistron.nl
  #

  PATH=/sbin:/bin:/usr/sbin:/usr/bin

  ############ Save raid boot and status info ##############
  #
  if [ -x /etc/rc.d/rc.raidown ]; then
     /etc/rc.d/rc.raidown
  fi
  ################## end raid boot #########################

  # Kill all processes.
  echo -n "Sending all processes the TERM signal... "
  killall5 -15
  echo "done."
  sleep 5
  echo -n "Sending all processes the KILL signal... "
  killall5 -9
  echo "done."

  # Write a reboot record to /var/log/wtmp.
  halt -w

  # Save the random seed between reboots.
  /etc/init.d/urandom stop

  echo -n "Deactivating swap... "
  swapoff -a
  echo "done."

  echo -n "Unmounting file systems... "
  umount -a
  echo "done."

  mount -n -o remount,ro /

  ################ for raid arrays #########################
  # Stop all known raid arrays (except root which won't stop)
  if [ -x /sbin/mdstop ]; then
    echo "Stopping raid"
    /sbin/mdstop -a
  fi
  ##########################################################

  echo -n "Rebooting... "
  reboot -d -f -i



  10.  Appendix C. - other setup files


  10.1.  linuxrc``linuxrc file''


  10.2.  loadlin -- linux.bat file - boot.par``linux.bat file -
  boot.par''


  10.3.  linuxthreads Makefile.diff``linuxthreads Makefile.diff''


  10.4.  raid1.conf``raid1.conf''


  10.5.  raid5.conf``raid5.conf''


  10.6.  raidboot.conf``raidboot.conf''


  10.7.  rc.raidown``rc.raidown''

  11.  Appendix D. - obsolete linuxrc and shutdown scripts


  11.1.  Obsolete working - linuxrc

  This linuxrc file works fine with the shutdown procedure in the next
  subsection.



   ---------------------- linuxrc --------------------
  #!/bin/sh
  # ver 1.07 2-12-98
  # linuxrc - for raid1 using small dos partition and loadlin
  #

  # mount the proc file system
  /bin/mount /proc

  # This may vary for your system.
  # Mount the dos partitions, try both
  # in case one disk is dead
  /bin/mount /dosa
  /bin/mount /dosc

  # Set a flag in case the raid status file is not found
  # then check both drives for the status file
  RAIDOWN="raidstat.ro not found"
  /bin/echo "Reading md0 shutdown status."
  if [ -f /dosa/raidboot/raidstat.ro ]; then
    RAIDOWN=`/bin/cat /dosa/raidboot/raidstat.ro`
    RAIDREF=`/bin/cat /dosc/raidboot/raidgood.ref`
  else
    if [ -f /dosc/raidboot/raidstat.ro ]; then
      RAIDOWN=`/bin/cat /dosc/raidboot/raidstat.ro`
      RAIDREF=`/bin/cat /dosc/raidboot/raidgood.ref`
    fi
  fi

  # Test for a clean shutdown with all disks operational
  if [ "${RAIDOWN} != ${RAIDREF}" ]; then
    echo "ERROR ${RAIDOWN}"
  #  Use the next 2 lines to BAIL OUT and leave rescue running
     /bin/echo 0x100>/proc/sys/kernel/real-root-dev
     exit                 # leaving the error files in dosa/raidboot,etc...
  fi

  # The raid array is clean, proceed by removing
  # status file and writing a clean superblock
  /bin/rm /dosa/raidboot/raidstat.ro
  /bin/rm /dosc/raidboot/raidstat.ro
  /sbin/mkraid /etc/raid1.conf -f --only-superblock

  /bin/umount /dosa
  /bin/umount /dosc

  # Mount raid array
  echo "Mounting md0, root filesystem"
  /sbin/mdadd -ar

  #  If there are errors - BAIL OUT and leave rescue running
  if [ $? -ne 0 ]; then
     echo "RAID device has errors"
  #  Use the next 3 lines to BAIL OUT
     /bin/rm /etc/mtab            # remove bad mtab
     /bin/echo 0x100>/proc/sys/kernel/real-root-dev
     exit
  fi

  # else tell the kernel to switch to /dev/md0 as the /root device
  # The 0x900 value the device number calculated by:
  #  256*major_device_number + minor_device number
  /bin/echo 0x900>/proc/sys/kernel/real-root-dev

  # umount /proc to deallocate initrd device ram space
  /bin/umount /proc
  /bin/echo "/dev/md0 mounted as root"
  exit
  #------------------ end linuxrc ----------------------



  11.2.  Obsolete working - shutdown scripts

  This shutdown procedure works fine with the preceeding linuxrc

  To capture the raid array shutdown status, just before the file
  systems are dismounted insert:

          RAIDSTATUS=`/bin/cat /proc/mdstat | /usr/bin/grep md0`


  After all the file systems are dismounted (the root file system

          # root device remains mounted RO
          # mount dos file systems RW
          mount -n -o remount,ro /
          echo "Writing RAID read-only boot FLAG(s)."
          mount -n /dosa
          mount -n /dosc
          # create raid mounted RO flag in duplicate
          # containing the shutdown status of the raid array
          echo ${RAIDSTATUS} > /dosa/raidboot/raidstat.ro
          echo ${RAIDSTATUS} > /dosc/raidboot/raidstat.ro

          umount -n /dosa
          umount -n /dosc

          # Stop all the raid arrays (except root)
          echo "Stopping raid"
          mdstop -a


  This will cleanly stop all raid devices except root.  Root status is
  passed to the next boot in raidstat.ro.

  The complete shutdown script from my old raid1 Slackware system
  follows, I have switched raid1 to the new procedure with the
  /etc/raidboot.conf file.



  #! /bin/sh
  #
  # rc.6          This file is executed by init when it goes into runlevel
  #               0 (halt) or runlevel 6 (reboot). It kills all processes,
  #               unmounts file systems and then either halts or reboots.
  #
  # Version:      @(#)/etc/rc.d/rc.6      1.50    1994-01-15
  #
  # Author:       Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org>
  # Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
  # Modified by:  Michael A. Robinton, <michael@bzs.org> for RAID shutdown

    # Set the path.
    PATH=/sbin:/etc:/bin:/usr/bin

    # Set linefeed mode to avoid staircase effect.
    stty onlcr

    echo "Running shutdown script $0:"

    # Find out how we were called.
    case "$0" in
          *0)
                  message="The system is halted."
                  command="halt"
                  ;;
          *6)
                  message="Rebooting."
                  command=reboot
                  ;;
          *)
                  echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
                  exit 1
                  ;;
    esac

    # Kill all processes.
    # INIT is supposed to handle this entirely now, but this didn't always
    # work correctly without this second pass at killing off the processes.
    # Since INIT already notified the user that processes were being killed,
    # we'll avoid echoing this info this time around.
    if [ "$1" != "fast" ]; then # shutdown did not already kill all processes
      killall5 -15
      killall5 -9
    fi

    # Try to turn off quota and accounting.
    if [ -x /usr/sbin/quotaoff ]
    then
          echo "Turning off quota."
          /usr/sbin/quotaoff -a
    fi
    if [ -x /sbin/accton ]
    then
          echo "Turning off accounting."
          /sbin/accton
    fi

    # Before unmounting file systems write a reboot or halt record to wtmp.
    $command -w

    # Save localtime
    [ -e /usr/lib/zoneinfo/localtime ] && cp /usr/lib/zoneinfo/localtime /etc

    # Asynchronously unmount any remote filesystems:
    echo "Unmounting remote filesystems."
    umount -a -tnfs &

    # you must have issued
    # 'cat /proc/mdstat | grep md0 > {your boot vol}/raidboot/raidgood.ref'
    # before linuxrc will execute properly with this info
    RAIDSTATUS=`/bin/cat /proc/mdstat | /usr/bin/grep md0 # capture raid status`

    # Turn off swap, then unmount local file systems.
    # clearing mdtab as well
    echo "Turning off swap."
    swapoff -a
    echo "Unmounting local file systems."
    umount -a -tnonfs

    # Don't remount UMSDOS root volumes:
    if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
      mount -n -o remount,ro /
    fi

    # root device remains mounted
    # mount dos file systems RW
    echo "Writing RAID read-only boot FLAG(s)."
    mount -n /dosa
    mount -n /dosc
    # create raid mounted RO flag in duplicate
    # containing the shutdown status of the raid array
    echo ${RAIDSTATUS} > /dosa/raidboot/raidstat.ro
    echo ${RAIDSTATUS} > /dosc/raidboot/raidstat.ro

    umount -n /dosa
    umount -n /dosc

    # Stop all the raid arrays (except root)
    echo "Stopping raid"
    mdstop -a

    # See if this is a powerfail situation.
    if [ -f /etc/power_is_failing ]; then
      echo "Turning off UPS, bye."
      /sbin/powerd -q
      exit 1
    fi

    # Now halt or reboot.
    echo "$message"
    [ ! -f /etc/fastboot ] && echo "On the next boot fsck will be FORCED."
    $command -f



  12.  Appendix E. - Gadi's raid stop patch for the linux kernel



  --- linux/drivers/block/md.c.old        Fri Nov 21 13:37:11 1997
  +++ linux/drivers/block/md.c    Sat Dec  6 13:34:28 1997
  @@ -622,8 +622,13 @@
         return do_md_run (minor, (int) arg);

       case STOP_MD:
  -      return do_md_stop (minor, inode);
  -
  +      err = do_md_stop(minor, inode);
  +      if (err) {
  +        printk("md: enabling auto mdstop for %s\n",
  kdevname(inode->i_rdev));
  +        md_dev[minor].auto_mdstop = 1;
  +      }
  +      return err;
  +
       case BLKGETSIZE:   /* Return device size */
       if  (!arg)  return -EINVAL;
       err=verify_area (VERIFY_WRITE, (long *) arg, sizeof(long));
  @@ -692,6 +697,10 @@

     sync_dev (inode->i_rdev);
     md_dev[minor].busy--;
  +  if (!md_dev[minor].busy && md_dev[minor].auto_mdstop) {
  +       do_md_stop(minor, inode);
  +       md_dev[minor].auto_mdstop = 0;
  +  }
   }

   static int md_read (struct inode *inode, struct file *file,
  --- linux/include/linux/md.h~   Fri Nov 21 13:29:14 1997
  +++ linux/include/linux/md.h    Fri Nov 21 13:29:14 1997
  @@ -260,6 +260,7 @@
     int                  repartition;
     int                  busy;
     int                  nb_dev;
  +  int                  auto_mdstop;
     void                 *private;
   };



  13.  Appendix F. - rc.raidown

  Copy the following text into the script file rc.raidown and save it in
  /etc/rc.d.



  #! /bin/sh
  #
  # rc.raidown    This file is executed by init when it goes into runlevel
  #               0 (halt) or runlevel 6 (reboot). It saves the status of
  #               a root mounted raid array for subsequent re-boot
  #
  # Version:      1.08    3-25-98 Michael A. Robinton < michael@bizsystems.com >
  #
  ############ Save raid boot and status info ##############
  if [ -f /etc/raidboot.conf ]
  then
    {
    read RaidBootDevs
    read RaidStatusPath
    read RaidConfigEtc
    } < /etc/raidboot.conf

  # you must have issued
  #       cat /proc/mdstat | grep md0 >
  #               {your boot vol mnt(s)}/{RaidStatusPath}/raidgood.ref
  # before linuxrc will execute properly with this info
  #
  #       capture raid status
    RAIDSTATUS=`/bin/cat /proc/mdstat | /usr/bin/grep md0`
    mkdir /tmp/raid$$
    echo "Writing RAID read-only boot FLAG(s)."
    for Device in ${RaidBootDevs}
    do
  # get mount point for raid boot device or use tmp
      RBmount=$( cat /proc/mounts | /usr/bin/grep ${Device} )
      if [ -n ${RBmounts} ]; then
        RBmount=$( echo ${RBmount} | cut -f 2 -d ' ' )
      else
        RBmount="/tmp/raid$$"
        mount ${Device} ${RBmount}
      fi
    if [ -d ${RBmount}/${RaidStatusPath} ]; then
  # Create raid mounted RO flag = shutdown status of raid array
      echo ${RAIDSTATUS} > ${RBmount}/${RaidStatusPath}/raidboot.ro
  # Don't propagate 'fstab' from ramdisk
      if [ -f /linuxrc ]; then
        FSTAB=
      else
        FSTAB=fstab
      fi
      pushd /etc
  # Save etc files for rescue system
      /bin/tar --ignore-failed-read \
          -cf ${RBmount}/${RaidStatusPath}/raidboot.etc \
          raid*.conf mdtab* ${FSTAB} lilo.conf
      popd
  # Create new raidboot.cfg
      {
      /bin/echo ${RaidBootDevs}
      /bin/echo ${RaidStatusPath}
      /bin/echo ${RaidConfigEtc}
      } > ${RBmount}/${RaidStatusPath}/raidboot.cfg
      /bin/umount ${RBmount}
    fi
    done
    rmdir /tmp/raid$$
    echo "Raid boot armed"
  fi
  ################## end raid boot #########################


  14.  Appendix G. - linuxrc theory of operation

  This is the complex form of the linuxrc file for root mounted raid.
  It must be processed with 'bash' or another shell that recognizes
  shell functions.

  The advantage is that it is generic and is not dependent on startup
  files and parameters located in the initrd image.

  A Raid_Conf parameter passed to linuxrc by the kernel at boot from
  lilo or loadlin contains a pointer to the boot devices and location
  the of initial 2 raidboot files needed by linuxrc (raidboot.etc and
  raidboot.cfg placed by the shutdown script).

       raidboot.etc containing the 'tar'ed files:

               raid*
               mdtab*
               fstab
               lilo.conf               ( if applicable )


       from the primary system that are transferred to the initrd
       /etcetc directory at startup. With care, this file may be
       edited if necessary when your system 'really' crashes.

       raidboot.cfg contains the name of the boot partition in use
       and applicable backup(s) as well as the path to the rest of
       the raid start up file used by linuxrc.  This file is
       normally created by the shutdown file and may be created
       manually if necessary.

       raidboot.cfg is of the form, 3 lines - no comments

               /dev/bootdev1 /dev/bootdev2 [/dev/bootdev3 ... and so on]
               raid-status/path
               name_of_raidX.conf_file



       the raid-status/path does not include the name of the mount
       point

       the raidX.conf filename is that one found in /etc and
       normally used for ckraid and mkraid.



  The following additional files reside on the permanent raid boot par
  titions.  This is usually the same as above, but in emergency situa
  tions may be loaded from anywhere they are available, such as a floppy
  boot disk.

    raidgood.ref created by the command cat /proc/mdstat | grep md0 >
     /{raid_status_path}/raidgood.ref


     See the ``shutdown scripts'' for saving this file and the next


    raidstat.ro created at each shutdown by the shutdown rc file,
     saving the exit status of the raid array.



  15.  Appendix H. Setting up ROOT RAID on RedHat

  From the linux-raid@vger.rutgers.edu <mailto:linux-
  raid@vger.rutgers.edu> mail list.


  !    Has anyone figured out how to do root-mounted RAID (as per
  !    the Root-RAID HOWTO) using RedHat? The problem is that there
  !    is no equivalent of Slackware's setup to install the root
  !    filesystem to the RAID device. All RedHat installs have to
  !    run from the install floppy, which makes it almost
  !    impossible to get at the md devices and utilities during the
  !    install.
  !
  !    I think it's much easier to go out of the distribution and do it by
  !    hand!!

  Assuming you have enough RAM (or a spare hard disk), install a minimal
  system onto what will be your swap space (or onto your spare hard disk)
  and/or /boot.  Now do your mkraid, your mke2fs, mdrun, and mount.  Next, do:

          tar clf - / | tar xpfC - /mnt/raidwasmountedhere

  (you may want a "v" in the second tar's flags)
  Once this is done, you can set up lilo (or whatever) so that the new
  raid partition is root.  Then go in with RPM and/or glint (I hate
  glint's behavior in the face of failed dependencies, which was fixed
  but they broke it again for RH5.0 plus you can go back and forth
  forever between an old and a new version of a package without
  realizing the other version is installed) and install what you
  really wanted.

  All this assuming you couldn't sneak in at some point in the install
  and do your mkraid then at the VC with the shell prompt...

  !    I'm building a server at the moment and I think it would be tidier
  !    and less likely to cause problems in the future if I start with
  !    glibc2, rather than move to it later.
  !
  !    Me too.
  !
  !    The reason I'd like to be able to use RedHat is that they
  !    are the only major distribution that I know of with a
  !    glibc2-based release.
  !
  !    Debian works fine with me. There isn't a CD yet, but you can grab the
  !    distribution by ftp.

  I avoided root-raid like the plague, largely because initrd is an
  extra, very fragile step (having to rdev, and having lilo depend on
  the bios' ID number to find the kernel's partition, are bad enough!).
  However, Red Hat does have a nice mkinitrd script, needed since they
  left all their SCSI drivers modular.  Hack that to include your
  raid utils, make sure your mdadd -ar is in the right spot in
  /etc/rc.d/rc.sysinit (before any fscking) and make sure mdstop -a is
  in /etc/rc.d/init.d/halt after the RO-remount of /, and go for it!



       Keith kwrohrer@enteract.com <mailto:kwrohrer@enteract.com>



  The Linux SCSI programming HOWTO
  Heiko Eissfeldt heiko@colossus.escape.de
  v1.5, 7 May 1996

  This document deals with programming the Linux generic SCSI interface.
  ______________________________________________________________________

  Table of Contents



  1. What's New?

  2. Introduction

  3. What Is The Generic SCSI Interface?

  4. What Are The Requirements To Use It?

     4.1 Kernel Configuration
     4.2 Device Files
     4.3 Device Mapping
        4.3.1 Dynamically insert and remove SCSI devices

  5. Programmers Guide

  6. Overview Of Device Programming

  7. Opening The Device

  8. The Header Structure

  9. Inquiry Command Example

  10. The Sense Buffer

  11. Example Using Sense Buffer

  12. Ioctl Functions

  13. Driver Defaults

     13.1 Transfer Lengths
     13.2 Timeout And Retry Values

  14. Obtaining The Scsi Specifications

  15. Related Information Sources

     15.1 HOWTOs and FAQs
     15.2 Mailing list
     15.3 Example code

  16. Other useful stuff

     16.1 Device driver writer helpers
     16.2 Utilities

  17. Other SCSI Access Interfaces

  18. Final Comments

  19. Acknowledgments

  20. Appendix

  21. Error handling

     21.1 Error status decoding
     21.2 Status codes
     21.3 SCSI Sense Keys
     21.4 Host codes
     21.5 Driver codes

  22. Additional sense codes and additional sense code qualifiers

     22.1 ASC and ASCQ in lexical order
     22.2 ASC and ASCQ in numerical order

  23. A SCSI command code quick reference

  24. Example programs



  ______________________________________________________________________

  1.  What's New?

  Newer kernels have changed the interface a bit. This affects a section
  formerly entitled 'rescanning the devices'. Now it is possible to
  add/remove SCSI devices on the fly.

  Since kernel 1.3.98 some important header files have been moved/split
  (sg.h and scsi.h).

  Some stupid bugs have been replaced by newer ones.


  2.  Introduction

  This document is a guide to the installation and programming of the
  Linux generic SCSI interface.

  It covers kernel prerequisites, device mappings, and basic interaction
  with devices. Some simple C programming examples are included.
  General knowledge of the SCSI command set is required; for more
  information on the SCSI standard and related information, see the
  appendix to this document.

  Note the plain text version of this document lacks cross references
  (they show up as ``'').


  3.  What Is The Generic SCSI Interface?

  The generic SCSI interface has been implemented to provide general
  SCSI access to (possibly exotic) pieces of SCSI hardware. It was
  developed by Lawrence Foard ( entropy@world.std.com) and sponsored by
  Killy Corporation (see the comments in scsi/sg.h).

  The interface makes special device handling possible from user level
  applications (i.e. outside the kernel). Thus, kernel driver
  development, which is more risky and difficult to debug, is not
  necessary.

  However, if you don't program the driver properly it is possible to
  hang the SCSI bus, the driver, or the kernel. Therefore, it is
  important to properly program the generic driver and to first back up
  all files to avoid losing data. Another useful thing to do before
  running your programs is to issue a sync command to ensure that any
  buffers are flushed to disk, minimizing data loss if the system hangs.

  Another advantage of the generic driver is that as long as the
  interface itself does not change, all applications are independent of
  new kernel development. In comparison, other low-level kernel drivers
  have to be synchronized with other internal kernel changes.

  Typically, the generic driver is used to communicate with new SCSI
  hardware devices that require special user applications to be written
  to take advantage of their features (e.g. scanners, printers, CD-ROM
  jukeboxes). The generic interface allows these to be written quickly.

  4.  What Are The Requirements To Use It?


  4.1.  Kernel Configuration

  You must have a supported SCSI controller, obviously. Furthermore,
  your kernel must have controller support as well as generic support
  compiled in. Configuring the Linux kernel (via make config under
  /usr/src/linux) typically looks like the following:



        ...
       *
       * SCSI support
       *
       SCSI support? (CONFIG_SCSI) [n] y
       *
       * SCSI support type (disk, tape, CDrom)
       *
        ...
       Scsi generic support (CONFIG_CHR_DEV_SG) [n] y
       *
       * SCSI low-level drivers
       *
        ...



  If available, modules can of course be build instead.


  4.2.  Device Files

  The generic SCSI driver uses its own device files, separate from those
  used by the other SCSI device drivers. They can be generated using the
  MAKEDEV script, typically found in the /dev directory. Running MAKEDEV
  sg produces these files:



       crw-------   1 root     system    21,   0 Aug 20 20:09 /dev/sga
       crw-------   1 root     system    21,   1 Aug 20 20:09 /dev/sgb
       crw-------   1 root     system    21,   2 Aug 20 20:09 /dev/sgc
       crw-------   1 root     system    21,   3 Aug 20 20:09 /dev/sgd
       crw-------   1 root     system    21,   4 Aug 20 20:09 /dev/sge
       crw-------   1 root     system    21,   5 Aug 20 20:09 /dev/sgf
       crw-------   1 root     system    21,   6 Aug 20 20:09 /dev/sgg
       crw-------   1 root     system    21,   7 Aug 20 20:09 /dev/sgh
                                          |    |
                                      major,   minor device numbers



  Note that these are character devices for raw access. On some systems
  these devices may be called /dev/{sg0,sg1,...}, depending on your
  installation, so adjust the following examples accordingly.


  4.3.  Device Mapping

  These device files are dynamically mapped to SCSI id/LUNs on your SCSI
  bus (LUN = logical unit). The mapping allocates devices consecutively
  for each LUN of each device on each SCSI bus found at time of the SCSI
  scan, beginning at the lower LUNs/ids/buses. It starts with the first
  SCSI controller and continues without interruption with all following
  controllers. This is currently done in the initialisation of the SCSI
  driver.

  For example, assuming you had three SCSI devices hooked up with ids 1,
  3, and 5 on the first SCSI bus (each having one LUN), then the
  following mapping would be in effect:



       /dev/sga -> SCSI id 1
       /dev/sgb -> SCSI id 3
       /dev/sgc -> SCSI id 5



  If you now add a new device with id 4, then the mapping (after the
  next rescan) will be:



       /dev/sga -> SCSI id 1
       /dev/sgb -> SCSI id 3
       /dev/sgc -> SCSI id 4
       /dev/sgd -> SCSI id 5



  Notice the change for id 5 -- the corresponding device is no longer
  mapped to /dev/sgc but is now under /dev/sgd.

  Luckily newer kernels allow for changing this order.


  4.3.1.  Dynamically insert and remove SCSI devices

  If a newer kernel and the /proc file system is running, a non-busy
  device can be removed and installed 'on the fly'.

  To remove a SCSI device:


       echo "scsi remove-single-device a b c d" > /proc/scsi/scsi



  and similar, to add a SCSI device, do


       echo "scsi add-single-device a b c d" > /proc/scsi/scsi



  where


             a == hostadapter id (first one being 0)
             b == SCSI channel on hostadapter (first one being 0)
             c == ID
             d == LUN (first one being 0)

  So in order to swap the /dev/sgc and /dev/sgd mappings from the
  previous example, we could do



       echo "scsi remove-single-device 0 0 4 0" > /proc/scsi/scsi
       echo "scsi remove-single-device 0 0 5 0" > /proc/scsi/scsi
       echo "scsi add-single-device 0 0 5 0" > /proc/scsi/scsi
       echo "scsi add-single-device 0 0 4 0" > /proc/scsi/scsi



  since generic devices are mapped in the order of their insertion.

  When adding more devices to the scsi bus keep in mind there are
  limited spare entries for new devices. The memory has been allocated
  at boot time and has room for 2 more devices.


  5.  Programmers Guide

  The following sections are for programmers who want to use the generic
  SCSI interface in their own applications. An example will be given
  showing how to access a SCSI device with the INQUIRY and the
  TESTUNITREADY commands.


  When using these code examples, note the following:

  o  the location of the header files sg.h and scsi.h has changed in
     kernel version 1.3.98. Now these files are located at
     /usr/src/linux/include/scsi, which is hopefully linked to
     /usr/include/scsi. Previously they were in
     /usr/src/linux/drivers/scsi. We assume a newer kernel in the
     following text.

  o  the generic SCSI interface was extended in kernel version 1.1.68;
     the examples require at least this version. But please avoid kernel
     version 1.1.77 up to 1.1.89 and 1.3.52 upto 1.3.56 since they had a
     broken generic scsi interface.

  o  the constant DEVICE in the header section describing the accessed
     device should be set according to your available devices (see
     section ``''.


  6.  Overview Of Device Programming

  The header file include/scsi/sg.h contains a description of the
  interface (this is based on kernel version 1.3.98):



  struct sg_header
   {
    int pack_len;
                     /* length of incoming packet (including header) */
    int reply_len;   /* maximum length of expected reply */
    int pack_id;     /* id number of packet */
    int result;      /* 0==ok, otherwise refer to errno codes */
    unsigned int twelve_byte:1;
                 /* Force 12 byte command length for group 6 & 7 commands  */
    unsigned int other_flags:31;                  /* for future use */
    unsigned char sense_buffer[16]; /* used only by reads */
    /* command follows then data for command */
   };



  This structure describes how a SCSI command is to be processed and has
  room to hold the results of the execution of the command.  The
  individual structure components will be discussed later in section
  ``''.

  The general way of exchanging data with the generic driver is as
  follows: to send a command to an opened generic device, write() a
  block containing these three parts to it:



       struct sg_header
       SCSI command
       data to be sent with the command



  To obtain the result of a command, read() a block with this (similar)
  block structure:



       struct sg_header
       data coming from the device



  This is a general overview of the process. The following sections
  describe each of the steps in more detail.

  NOTE: Up to recent kernel versions, it is necessary to block the
  SIGINT signal between the write() and the corresponding read() call
  (i.e. via sigprocmask()). A return after the write() part without any
  read() to fetch the results will block on subsequent accesses. This
  signal blocking has not yet been included in the example code. So
  better do not issue SIGINT (a la ^C) when running these examples.


  7.  Opening The Device

  A generic device has to be opened for read and write access:

               int fd = open (device_name, O_RDWR);



  (This is the case even for a read-only hardware device such as a cdrom
  drive).

  We have to perform a write to send the command and a read to get back
  any results. In the case of an error the return code is negative (see
  section ``'' for a complete list).


  8.  The Header Structure



  The header structure struct sg_header serves as a controlling layer
  between the application and the kernel driver.  We now discuss its
  components in detail.



     int pack_len
        defines the size of the block written to the driver.  This is
        defined within the kernel for internal use.

     int reply_len
        defines the size of the block to be accepted at reply.  This is
        defined from the application side.


     int pack_id
        This field helps to assign replies to requests. The application
        can supply a unique id for each request. Suppose you have
        written several commands (say 4) to one device. They may work in
        parallel, one being the fastest. When getting replies via 4
        reads, the replies do not have to have the order of the
        requests. To identify the correct reply for a given request one
        can use the pack_id field. Typically its value is incremented
        after each request (and wraps eventually). The maximum amount of
        outstanding requests is limited by the kernel to SG_MAX_QUEUE
        (eg 4).


     int result
        the result code of a read or write call.  This is (sometimes)
        defined from the generic driver (kernel) side.  It is safe to
        set it to null before the write call.  These codes are defined
        in errno.h (0 meaning no error).


     unsigned int twelve_byte:1
        This field is necessary only when using non-standard vendor
        specific commands (in the range 0xc0 - 0xff).  When these
        commands have a command length of 12 bytes instead of 10, this
        field has to be set to one before the write call. Other command
        lengths are not supported. This is defined from the application
        side.


     unsigned char sense_buffer[16]
        This buffer is set after a command is completed (after a read()
        call) and contains the SCSI sense code. Some command results
        have to be read from here (e.g. for TESTUNITREADY). Usually it
        contains just zero bytes.  The value in this field is set by the
        generic driver (kernel) side.



  The following example function interfaces directly with the generic
  kernel driver. It defines the header structure, sends the command via
  write, gets the result via read and does some (limited) error
  checking.  The sense buffer data is available in the output buffer
  (unless a NULL pointer has been given, in which case it's in the input
  buffer). We will use it in the examples which follow.

  Note: Set the value of DEVICE to your device descriptor.



  #define DEVICE "/dev/sgc"

  /* Example program to demonstrate the generic SCSI interface */
  #include <stdio.h>
  #include <unistd.h>
  #include <string.h>
  #include <fcntl.h>
  #include <errno.h>
  #include <scsi/sg.h>


  #define SCSI_OFF sizeof(struct sg_header)
  static unsigned char cmd[SCSI_OFF + 18];      /* SCSI command buffer */
  int fd;                               /* SCSI device/file descriptor */

  /* process a complete SCSI cmd. Use the generic SCSI interface. */
  static int handle_SCSI_cmd(unsigned cmd_len,         /* command length */
                             unsigned in_size,         /* input data size */
                             unsigned char *i_buff,    /* input buffer */
                             unsigned out_size,        /* output data size */
                             unsigned char *o_buff     /* output buffer */
                             )
  {
      int status = 0;
      struct sg_header *sg_hd;

      /* safety checks */
      if (!cmd_len) return -1;            /* need a cmd_len != 0 */
      if (!i_buff) return -1;             /* need an input buffer != NULL */
  #ifdef SG_BIG_BUFF
      if (SCSI_OFF + cmd_len + in_size > SG_BIG_BUFF) return -1;
      if (SCSI_OFF + out_size > SG_BIG_BUFF) return -1;
  #else
      if (SCSI_OFF + cmd_len + in_size > 4096) return -1;
      if (SCSI_OFF + out_size > 4096) return -1;
  #endif

      if (!o_buff) out_size = 0;      /* no output buffer, no output size */

      /* generic SCSI device header construction */
      sg_hd = (struct sg_header *) i_buff;
      sg_hd->reply_len   = SCSI_OFF + out_size;
      sg_hd->twelve_byte = cmd_len == 12;
      sg_hd->result = 0;
  #if     0
      sg_hd->pack_len    = SCSI_OFF + cmd_len + in_size; /* not necessary */
      sg_hd->pack_id;     /* not used */
      sg_hd->other_flags; /* not used */
  #endif

      /* send command */
      status = write( fd, i_buff, SCSI_OFF + cmd_len + in_size );
      if ( status < 0 || status != SCSI_OFF + cmd_len + in_size ||
                         sg_hd->result ) {
          /* some error happened */
          fprintf( stderr, "write(generic) result = 0x%x cmd = 0x%x\n",
                      sg_hd->result, i_buff[SCSI_OFF] );
          perror("");
          return status;
      }

      if (!o_buff) o_buff = i_buff;       /* buffer pointer check */

      /* retrieve result */
      status = read( fd, o_buff, SCSI_OFF + out_size);
      if ( status < 0 || status != SCSI_OFF + out_size || sg_hd->result ) {
          /* some error happened */
          fprintf( stderr, "read(generic) status = 0x%x, result = 0x%x, "
                           "cmd = 0x%x\n",
                           status, sg_hd->result, o_buff[SCSI_OFF] );
          fprintf( stderr, "read(generic) sense "
                  "%x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\n",
                  sg_hd->sense_buffer[0],         sg_hd->sense_buffer[1],
                  sg_hd->sense_buffer[2],         sg_hd->sense_buffer[3],
                  sg_hd->sense_buffer[4],         sg_hd->sense_buffer[5],
                  sg_hd->sense_buffer[6],         sg_hd->sense_buffer[7],
                  sg_hd->sense_buffer[8],         sg_hd->sense_buffer[9],
                  sg_hd->sense_buffer[10],        sg_hd->sense_buffer[11],
                  sg_hd->sense_buffer[12],        sg_hd->sense_buffer[13],
                  sg_hd->sense_buffer[14],        sg_hd->sense_buffer[15]);
          if (status < 0)
              perror("");
      }
      /* Look if we got what we expected to get */
      if (status == SCSI_OFF + out_size) status = 0; /* got them all */

      return status;  /* 0 means no error */
  }



  While this may look somewhat complex at first appearance, most of the
  code is for error checking and reporting (which is useful even after
  the code is working).

  Handle_SCSI_cmd has a generalized form for all SCSI commands types,
  falling into each of these categories:



              Data Mode              | Example Command
       ===============================================
       neither input nor output data | test unit ready
        no input data, output data   | inquiry, read
        input data, no output data   | mode select, write
          input data, output data    | mode sense



  9.  Inquiry Command Example

  One of the most basic SCSI commands is the INQUIRY command, used to
  identify the type and make of the device. Here is the definition from
  the SCSI-2 specification (for details refer to the SCSI-2 standard).



                              Table 44: INQUIRY Command
  +=====-========-========-========-========-========-========-========-========+
  |  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
  |Byte |        |        |        |        |        |        |        |        |
  |=====+=======================================================================|
  | 0   |                           Operation Code (12h)                        |
  |-----+-----------------------------------------------------------------------|
  | 1   | Logical Unit Number      |                  Reserved         |  EVPD  |
  |-----+-----------------------------------------------------------------------|
  | 2   |                           Page Code                                   |
  |-----+-----------------------------------------------------------------------|
  | 3   |                           Reserved                                    |
  |-----+-----------------------------------------------------------------------|
  | 4   |                           Allocation Length                           |
  |-----+-----------------------------------------------------------------------|
  | 5   |                           Control                                     |
  +=============================================================================+



  The output data are as follows:



                       Table 45: Standard INQUIRY Data Format
  +=====-========-========-========-========-========-========-========-========+
  |  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
  |Byte |        |        |        |        |        |        |        |        |
  |=====+==========================+============================================|
  | 0   | Peripheral Qualifier     |           Peripheral Device Type           |
  |-----+-----------------------------------------------------------------------|
  | 1   |  RMB   |                  Device-Type Modifier                        |
  |-----+-----------------------------------------------------------------------|
  | 2   |   ISO Version   |       ECMA Version       |  ANSI-Approved Version   |
  |-----+-----------------+-----------------------------------------------------|
  | 3   |  AENC  | TrmIOP |     Reserved    |         Response Data Format      |
  |-----+-----------------------------------------------------------------------|
  | 4   |                           Additional Length (n-4)                     |
  |-----+-----------------------------------------------------------------------|
  | 5   |                           Reserved                                    |
  |-----+-----------------------------------------------------------------------|
  | 6   |                           Reserved                                    |
  |-----+-----------------------------------------------------------------------|
  | 7   | RelAdr | WBus32 | WBus16 |  Sync  | Linked |Reserved| CmdQue | SftRe  |
  |-----+-----------------------------------------------------------------------|
  | 8   | (MSB)                                                                 |
  |- - -+---                        Vendor Identification                    ---|
  | 15  |                                                                 (LSB) |
  |-----+-----------------------------------------------------------------------|
  | 16  | (MSB)                                                                 |
  |- - -+---                        Product Identification                   ---|
  | 31  |                                                                 (LSB) |
  |-----+-----------------------------------------------------------------------|
  | 32  | (MSB)                                                                 |
  |- - -+---                        Product Revision Level                   ---|
  | 35  |                                                                 (LSB) |
  |-----+-----------------------------------------------------------------------|
  | 36  |                                                                       |
  |- - -+---                        Vendor Specific                          ---|
  | 55  |                                                                       |
  |-----+-----------------------------------------------------------------------|
  | 56  |                                                                       |
  |- - -+---                        Reserved                                 ---|
  | 95  |                                                                       |
  |=====+=======================================================================|
  |     |                       Vendor-Specific Parameters                      |
  |=====+=======================================================================|
  | 96  |                                                                       |
  |- - -+---                        Vendor Specific                          ---|
  | n   |                                                                       |
  +=============================================================================+



  The next example uses the low-level function handle_SCSI_cmd to
  perform the Inquiry SCSI command.

  We first append the command block to the generic header, then call
  handle_SCSI_cmd.  Note that the output buffer size argument for the
  handle_SCSI_cmd call excludes the generic header size.  After command
  completion the output buffer contains the requested data, unless an
  error occurred.



  #define INQUIRY_CMD     0x12
  #define INQUIRY_CMDLEN  6
  #define INQUIRY_REPLY_LEN 96
  #define INQUIRY_VENDOR  8       /* Offset in reply data to vendor name */

  /* request vendor brand and model */
  static unsigned char *Inquiry ( void )
  {
    unsigned char Inqbuffer[ SCSI_OFF + INQUIRY_REPLY_LEN ];
    unsigned char cmdblk [ INQUIRY_CMDLEN ] =
        { INQUIRY_CMD,  /* command */
                    0,  /* lun/reserved */
                    0,  /* page code */
                    0,  /* reserved */
    INQUIRY_REPLY_LEN,  /* allocation length */
                    0 };/* reserved/flag/link */

    memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) );

    /*
     * +------------------+
     * | struct sg_header | <- cmd
     * +------------------+
     * | copy of cmdblk   | <- cmd + SCSI_OFF
     * +------------------+
     */

    if (handle_SCSI_cmd(sizeof(cmdblk), 0, cmd,
                        sizeof(Inqbuffer) - SCSI_OFF, Inqbuffer )) {
        fprintf( stderr, "Inquiry failed\n" );
        exit(2);
    }
    return (Inqbuffer + SCSI_OFF);
  }



  The example above follows this structure. The Inquiry function copies
  its command block behind the generic header (given by SCSI_OFF). Input
  data is not present for this command.  Handle_SCSI_cmd will define the
  header structure. We can now implement the function main to complete
  this working example program.



       void main( void )
       {
         fd = open(DEVICE, O_RDWR);
         if (fd < 0) {
           fprintf( stderr, "Need read/write permissions for "DEVICE".\n" );
           exit(1);
         }

         /* print some fields of the Inquiry result */
         printf( "%s\n", Inquiry() + INQUIRY_VENDOR );
       }



  We first open the device, check for errors, and then call the higher
  level subroutine. Then we print the results in human readable format
  including the vendor, product, and revision.


  Note: There is more information in the Inquiry result than this little
  program gives. You may want to extend the program to give device type,
  ANSI version etc. The device type is of special importance, since it
  determines the mandatory and optional command sets for this device.
  If you don't want to program it yourself, you may want to use the
  scsiinfo program from Eric Youngdale, which requests nearly all
  information about an SCSI device. Look at tsx-11.mit.edu in
  pub/Linux/ALPHA/scsi.


  10.  The Sense Buffer


  Commands with no output data can give status information via the sense
  buffer (which is part of the header structure).  Sense data is
  available when the previous command has terminated with a CHECK
  CONDITION status. In this case the kernel automatically retrieves the
  sense data via a REQUEST SENSE command. Its structure is:



       +=====-========-========-========-========-========-========-========-========+
       |  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
       |Byte |        |        |        |        |        |        |        |        |
       |=====+========+==============================================================|
       | 0   | Valid  |                  Error Code (70h or 71h)                     |
       |-----+-----------------------------------------------------------------------|
       | 1   |                           Segment Number                              |
       |-----+-----------------------------------------------------------------------|
       | 2   |Filemark|  EOM   |  ILI   |Reserved|         Sense Key                 |
       |-----+-----------------------------------------------------------------------|
       | 3   | (MSB)                                                                 |
       |- - -+---                        Information                              ---|
       | 6   |                                                                 (LSB) |
       |-----+-----------------------------------------------------------------------|
       | 7   |                           Additional Sense Length (n-7)               |
       |-----+-----------------------------------------------------------------------|
       | 8   | (MSB)                                                                 |
       |- - -+---                        Command-Specific Information             ---|
       | 11  |                                                                 (LSB) |
       |-----+-----------------------------------------------------------------------|
       | 12  |                           Additional Sense Code                       |
       |-----+-----------------------------------------------------------------------|
       | 13  |                           Additional Sense Code Qualifier             |
       |-----+-----------------------------------------------------------------------|
       | 14  |                           Field Replaceable Unit Code                 |
       |-----+-----------------------------------------------------------------------|
       | 15  |  SKSV  |                                                              |
       |- - -+------------               Sense-Key Specific                       ---|
       | 17  |                                                                       |
       |-----+-----------------------------------------------------------------------|
       | 18  |                                                                       |
       |- - -+---                        Additional Sense Bytes                   ---|
       | n   |                                                                       |
       +=============================================================================+



  Note: The most useful fields are Sense Key (see section ``''),
  Additional Sense Code and Additional Sense Code Qualifier (see section
  ``''). The latter two are used combined as a pair.


  11.  Example Using Sense Buffer

  Here we will use the TEST UNIT READY command to check whether media is
  loaded into our device. The header declarations and function
  handle_SCSI_cmd from the inquiry example will be needed as well.



                               Table 73: TEST UNIT READY Command
       +=====-========-========-========-========-========-========-========-========+
       |  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
       |Byte |        |        |        |        |        |        |        |        |
       |=====+=======================================================================|
       | 0   |                           Operation Code (00h)                        |
       |-----+-----------------------------------------------------------------------|
       | 1   | Logical Unit Number      |                  Reserved                  |
       |-----+-----------------------------------------------------------------------|
       | 2   |                           Reserved                                    |
       |-----+-----------------------------------------------------------------------|
       | 3   |                           Reserved                                    |
       |-----+-----------------------------------------------------------------------|
       | 4   |                           Reserved                                    |
       |-----+-----------------------------------------------------------------------|
       | 5   |                           Control                                     |
       +=============================================================================+



  Here is the function which implements it:



  #define TESTUNITREADY_CMD 0
  #define TESTUNITREADY_CMDLEN 6

  #define ADD_SENSECODE 12
  #define ADD_SC_QUALIFIER 13
  #define NO_MEDIA_SC 0x3a
  #define NO_MEDIA_SCQ 0x00

  int TestForMedium ( void )
  {
    /* request READY status */
    static unsigned char cmdblk [TESTUNITREADY_CMDLEN] = {
        TESTUNITREADY_CMD, /* command */
                        0, /* lun/reserved */
                        0, /* reserved */
                        0, /* reserved */
                        0, /* reserved */
                        0};/* control */

    memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) );

    /*
     * +------------------+
     * | struct sg_header | <- cmd
     * +------------------+
     * | copy of cmdblk   | <- cmd + SCSI_OFF
     * +------------------+
     */

    if (handle_SCSI_cmd(sizeof(cmdblk), 0, cmd,
                              0, NULL)) {
        fprintf (stderr, "Test unit ready failed\n");
        exit(2);
    }

    return
     *(((struct sg_header*)cmd)->sense_buffer +ADD_SENSECODE) !=
                                                          NO_MEDIA_SC ||
     *(((struct sg_header*)cmd)->sense_buffer +ADD_SC_QUALIFIER) !=
                                                          NO_MEDIA_SCQ;
  }



  Combined with this main function we can do the check.



       void main( void )
       {
         fd = open(DEVICE, O_RDWR);
         if (fd < 0) {
           fprintf( stderr, "Need read/write permissions for "DEVICE".\n" );
           exit(1);
         }

         /* look if medium is loaded */

         if (!TestForMedium()) {
           printf("device is unloaded\n");
         } else {
           printf("device is loaded\n");
         }
       }

  The file generic_demo.c from the appendix contains both examples.


  12.  Ioctl Functions


  There are two ioctl functions available:

  o  ioctl(fd, SG_SET_TIMEOUT, &Timeout); sets the timeout value to
     Timeout * 10 milliseconds. Timeout has to be declared as int.

  o  ioctl(fd, SG_GET_TIMEOUT, &Timeout); gets the current timeout
     value.  Timeout has to be declared as int.


  13.  Driver Defaults


  13.1.  Transfer Lengths


  Currently (at least up to kernel version 1.1.68) input and output
  sizes have to be less than or equal than 4096 bytes unless the kernel
  has been compiled with SG_BIG_BUFF defined, if which case it is
  limited to SG_BIG_BUFF (e.g. 32768) bytes.  These sizes include the
  generic header as well as the command block on input.  SG_BIG_BUFF can
  be safely increased upto (131072 - 512). To take advantage of this, a
  new kernel has to be compiled and booted, of course.


  13.2.  Timeout And Retry Values

  The default timeout value is set to one minute (Timeout = 6000).  It
  can be changed through an ioctl call (see section ``'').  The default
  number of retries is one.


  14.  Obtaining The Scsi Specifications

  There are standards entitled SCSI-1 and SCSI-2 (and possibly soon
  SCSI-3). The standards are mostly upward compatible.

  The SCSI-1 standard is (in the author's opinion) mostly obsolete, and
  SCSI-2 is the most widely used. SCSI-3 is very new and very expensive.
  These standardized command sets specify mandatory and optional
  commands for SCSI manufacturers and should be preferred over the
  vendor specific command extensions which are not standardized and for
  which programming information is seldom available. Of course sometimes
  there is no alternative to these extensions.


  Electronic copies of the latest drafts are available via anonymous ftp
  from:

  o  ftp.cs.tulane.edu:pub/scsi

  o  ftp.symbios.com:/pub/standards

  o  ftp.cs.uni-sb.de:/pub/misc/doc/scsi

  (I got my SCSI specification from the Yggdrasil Linux CD-ROM in the
  directory /usr/doc/scsi-2 and /usr/doc/scsi-1).

  The SCSI FAQ also lists the following sources of printed information:


  The SCSI specification: Available from:



             Global Engineering Documents
             15 Inverness Way East
             Englewood Co  80112-5704
             (800) 854-7179
               SCSI-1: X3.131-1986
               SCSI-2: X3.131-199x
               SCSI-3 X3T9.2/91-010R4 Working Draft

       (Global Engineering Documentation in Irvine, CA (714)261-1455??)

       SCSI-1: Doc \# X3.131-1986 from ANSI, 1430 Broadway, NY, NY 10018

       IN-DEPTH EXPLORATION OF SCSI can be obtained from
       Solution Technology, Attn: SCSI Publications, POB 104, Boulder Creek,
       CA 95006, (408)338-4285, FAX (408)338-4374

       THE SCSI ENCYLOPEDIA and the SCSI BENCH REFERENCE can be obtained from
       ENDL Publishing, 14426 Black Walnut Ct., Saratoga, CA 95090,
       (408)867-6642, FAX (408)867-2115

       SCSI: UNDERSTANDING THE SMALL COMPUTER SYSTEM INTERFACE was published
       by Prentice-Hall, ISBN 0-13-796855-8



  15.  Related Information Sources


  15.1.  HOWTOs and FAQs

  The Linux SCSI-HOWTO by Drew Eckhardt covers all supported SCSI
  controllers as well as device specific questions. A lot of
  troubleshooting hints are given. It is available from sunsite.unc.edu
  in /pub/Linux/docs/LDP and its mirror sites.

  General questions about SCSI are answered in the SCSI-FAQ from the
  newsgroup Comp.Periphs.Scsi (available on tsx-11 in
  pub/linux/ALPHA/scsi and mirror sites).


  15.2.  Mailing list

  There is a mailing list for bug reports and questions regarding SCSI
  development under Linux.  To join, send email to
  majordomo@vger.rutgers.edu with the line subscribe linux-scsi in the
  body of the message.  Messages should be posted to linux-
  scsi@vger.rutgers.edu.  Help text can be requested by sending the
  message line "help" to majordomo@vger.rutgers.edu.


  15.3.  Example code


     sunsite.unc.edu: apps/graphics/hpscanpbm-0.3a.tar.gz
        This package handles a HP scanjet scanner through the generic
        interface.

     tsx-11.mit.edu: BETA/cdrom/private/mkisofs/cdwrite-1.3.tar.gz
        The cdwrite package uses the generic interface to write a cd
        image to a cd writer.
     sunsite.unc.edu: apps/sound/cds/cdda2wav*.src.tar.gz
        A shameless plug for my own application, which copies audio cd
        tracks into wav files.



  16.  Other useful stuff

  Things that may come in handy. I don't have no idea if there are newer
  or better versions around. Feedback is welcome.


  16.1.  Device driver writer helpers

  These documents can be found at the sunsite.unc.edu ftp server and its
  mirrors.

     /pub/Linux/docs/kernel/kernel-hackers-guide
        The LDP kernel hackers guide. May be a bit outdated, but covers
        the most fundamental things.

     /pub/Linux/docs/kernel/drivers.doc.z
        This document covers writing character drivers.

     /pub/Linux/docs/kernel/tutorial.doc.z
        Tutorial on writing a character device driver with code.

     /pub/Linux/docs/kernel/scsi.paper.tar.gz
        A Latex document describing howto write a SCSI driver.

     /pub/Linux/docs/hardware/DEVICES
        A list of device majors and minors used by Linux.


  16.2.  Utilities


     tsx-11.mit.edu: ALPHA/scsi/scsiinfo*.tar.gz
        Program to query a scsi device for operating parameters, defect
        lists, etc.  An X-based interface is available which requires
        you have Tk/Tcl/wish installed.  With the X-based interface you
        can easily alter the settings on the drive.

     tsx-11.mit.edu: ALPHA/kdebug
        A gdb extension for kernel debugging.



  17.  Other SCSI Access Interfaces

  In Linux there is also another SCSI access method via
  SCSI_IOCTL_SEND_COMMAND ioctl calls, which is deprecated.  Special
  tools like 'scsiinfo' utilize it.


  There are some other similar interfaces in use in the un*x world, but
  not available for Linux:

  1. CAM (Common Access Method) developed by Future Domain and other
     SCSI vendors. Linux has little support for a SCSI CAM system yet
     (mainly for booting from hard disk).  CAM even supports target
     mode, so one could disguise ones computer as a peripheral hardware
     device (e.g. for a small SCSI net).


  2. ASPI (Advanced SCSI Programming Interface) developed by Adaptec.
     This is the de facto standard for MS-DOS machines.

  There are other application interfaces from SCO(TM), NeXT(TM), Silicon
  Graphics(TM) and SUN(TM) as well.


  18.  Final Comments

  The generic SCSI interface bridges the gap between user applications
  and specific devices. But rather than bloating a lot of programs with
  similar sets of low-level functions, it would be more desirable to
  have a shared library with a generalized set of low-level functions
  for a particular purpose.  The main goal should be to have independent
  layers of interfaces.  A good design would separate an application
  into low-level and hardware independent routines. The low-level
  routines could be put into a shared library and made available for all
  applications. Here, standardized interfaces should be followed as much
  as possible before making new ones.

  By now you should know more than I do about the Linux generic SCSI
  interface. So you can start developing powerful applications for the
  benefit of the global Linux community now...


  19.  Acknowledgments

  Special thanks go to Jeff Tranter for proofreading and enhancing the
  text considerably as well as to Carlos Puchol for useful comments.
  Drew Eckhardt's and Eric Youngdale's help on my first (dumb) questions
  about the use of this interface has been appreciated.


  T.  Appendix


  U.  Error handling


  The functions open, ioctl, write and read can report errors. In this
  case their return value is -1 and the global variable errno is set to
  the error number.  The errno values are defined in
  /usr/include/errno.h.  Possible values are:



  Function | Error        | Description
  =========|==============|=============================================
  open     | ENXIO        | not a valid device
           | EACCES       | access mode is not read/write (O_RDWR)
           | EBUSY        | device was requested for nonblocking access,
           |              | but is busy now.
           | ERESTARTSYS  | this indicates an internal error. Try to
           |              | make it reproducible and inform the SCSI
           |              | channel (for details on bug reporting
           |              | see Drew Eckhardts SCSI-HOWTO).
  ioctl    | ENXIO        | not a valid device
  read     | EAGAIN       | the device would block. Try again later.
           | ERESTARTSYS  | this indicates an internal error. Try to
           |              | make it reproducible and inform the SCSI
           |              | channel (for details on bug reporting
           |              | see Drew Eckhardts SCSI-HOWTO).
  write    | EIO          | the length is too small (smaller than the
           |              | generic header struct). Caution: Currently
           |              | there is no overlength checking.
           | EAGAIN       | the device would block. Try again later.
           | ENOMEM       | memory required for this request could not be
           |              | allocated. Try later again unless you
           |              | exceeded the maximum transfer size (see above)
  select   |              | none
  close    |              | none



  For read/write positive return values indicate as usual the amount of
  bytes that have been successfully transferred. This should equal the
  amount you requested.


  U.1.  Error status decoding


  Furthermore a detailed reporting is done via the kernels hd_status and
  the devices sense_buffer (see section ``'') both from the generic
  header structure.

  The meaning of hd_status can be found in drivers/scsi/scsi.h: This
  unsigned int is composed out of different parts:



         lsb  |    ...    |    ...    | msb
       =======|===========|===========|============
       status | sense key | host code | driver byte



  These macros from drivers/scsi/scsi.h are available, but unfortunately
  cannot be easily used due to weird header file interdependencies. This
  has to be cleaned.



          Macro          | Description
  =======================|=================================================
  status_byte(hd_status) | The SCSI device status. See section Status codes
  msg_byte(hd_status)    | From the device. See section SCSI sense keys
  host_byte(hd_status)   | From the kernel. See section Hostcodes
  driver_byte(hd_status) | From the kernel. See section midlevel codes



  U.2.  Status codes


  The following status codes from the SCSI device (defined in
  scsi/scsi.h) are available.



       Value | Symbol
       ======|=====================
       0x00  | GOOD
       0x01  | CHECK_CONDITION
       0x02  | CONDITION_GOOD
       0x04  | BUSY
       0x08  | INTERMEDIATE_GOOD
       0x0a  | INTERMEDIATE_C_GOOD
       0x0c  | RESERVATION_CONFLICT



  Note that these symbol values have been shifted right once.  When the
  status is CHECK_CONDITION, the sense data in the sense buffer is valid
  (check especially the additional sense code and additional sense code
  qualifier).

  These values carry the meaning from the SCSI-2 specification:



                             Table 27: Status Byte Code
  +=================================-==============================+
  |       Bits of Status Byte       |  Status                      |
  |  7   6   5   4   3   2   1   0  |                              |
  |---------------------------------+------------------------------|
  |  R   R   0   0   0   0   0   R  |  GOOD                        |
  |  R   R   0   0   0   0   1   R  |  CHECK CONDITION             |
  |  R   R   0   0   0   1   0   R  |  CONDITION MET               |
  |  R   R   0   0   1   0   0   R  |  BUSY                        |
  |  R   R   0   1   0   0   0   R  |  INTERMEDIATE                |
  |  R   R   0   1   0   1   0   R  |  INTERMEDIATE-CONDITION MET  |
  |  R   R   0   1   1   0   0   R  |  RESERVATION CONFLICT        |
  |  R   R   1   0   0   0   1   R  |  COMMAND TERMINATED          |
  |  R   R   1   0   1   0   0   R  |  QUEUE FULL                  |
  |                                 |                              |
  |       All Other Codes           |  Reserved                    |
  |----------------------------------------------------------------|
  |  Key: R = Reserved bit                                         |
  +================================================================+

  A definition of the status byte codes is given below.

  GOOD.  This status indicates that the target has successfully completed the
  command.

  CHECK CONDITION.  This status indicates that a contingent allegiance condition
  has occurred (see 6.6).

  CONDITION MET.  This status or INTERMEDIATE-CONDITION MET is returned whenever
  the requested operation is satisfied (see the SEARCH DATA and PRE-FETCH
  commands).

  BUSY.  This status indicates that the target is busy.  This status shall be
  returned whenever a target is unable to accept a command from an otherwise
  acceptable initiator (i.e., no reservation conflicts).  The recommended
  initiator recovery action is to issue the command again at a later time.

  INTERMEDIATE.  This status or INTERMEDIATE-CONDITION MET shall be returned for
  every successfully completed command in a series of linked commands (except
  the last command), unless the command is terminated with CHECK CONDITION,
  RESERVATION CONFLICT, or COMMAND TERMINATED status.  If INTERMEDIATE or
  INTERMEDIATE-CONDITION MET status is not returned, the series of linked
  commands is terminated and the I/O process is ended.

  INTERMEDIATE-CONDITION MET.  This status is the combination of the CONDITION
  MET and INTERMEDIATE statuses.

  RESERVATION CONFLICT.  This status shall be returned whenever an initiator
  attempts to access a logical unit or an extent within a logical unit that is
  reserved with a conflicting reservation type for another SCSI device (see the
  RESERVE and RESERVE UNIT commands).  The recommended initiator recovery action
  is to issue the command again at a later time.

  COMMAND TERMINATED.  This status shall be returned whenever the target
  terminates the current I/O process after receiving a TERMINATE I/O PROCESS
  message (see 5.6.22).  This status also indicates that a contingent allegiance
  condition has occurred (see 6.6).

  QUEUE FULL.  This status shall be implemented if tagged queuing is
  implemented.  This status is returned when a SIMPLE QUEUE TAG, ORDERED QUEUE
  TAG, or HEAD OF QUEUE TAG message is received and the command queue is full.
  The I/O process is not placed in the command queue.



  U.3.  SCSI Sense Keys


  These kernel symbols (from scsi/scsi.h) are predefined:



       Value | Symbol
       ======|================
       0x00  | NO_SENSE
       0x01  | RECOVERED_ERROR
       0x02  | NOT_READY
       0x03  | MEDIUM_ERROR
       0x04  | HARDWARE_ERROR
       0x05  | ILLEGAL_REQUEST
       0x06  | UNIT_ATTENTION
       0x07  | DATA_PROTECT
       0x08  | BLANK_CHECK
       0x0a  | COPY_ABORTED
       0x0b  | ABORTED_COMMAND
       0x0d  | VOLUME_OVERFLOW
       0x0e  | MISCOMPARE



  A verbatim list from the SCSI-2 doc follows (from section 7.2.14.3):



                      Table 69: Sense Key (0h-7h) Descriptions
  +========-====================================================================+
  | Sense  |  Description                                                       |
  |  Key   |                                                                    |
  |--------+--------------------------------------------------------------------|
  |   0h   |  NO SENSE.  Indicates that there is no specific sense key          |
  |        |  information to be reported for the designated logical unit.  This |
  |        |  would be the case for a successful command or a command that      |
  |        |  received CHECK CONDITION or COMMAND TERMINATED status because one |
  |        |  of the filemark, EOM, or ILI bits is set to one.                  |
  |--------+--------------------------------------------------------------------|
  |   1h   |  RECOVERED ERROR.  Indicates that the last command completed       |
  |        |  successfully with some recovery action performed by the target.   |
  |        |  Details may be determinable by examining the additional sense     |
  |        |  bytes and the information field.  When multiple recovered errors  |
  |        |  occur during one command, the choice of which error to report     |
  |        |  (first, last, most severe, etc.) is device specific.              |
  |--------+--------------------------------------------------------------------|
  |   2h   |  NOT READY.  Indicates that the logical unit addressed cannot be   |
  |        |  accessed.  Operator intervention may be required to correct this  |
  |        |  condition.                                                        |
  |--------+--------------------------------------------------------------------|
  |   3h   |  MEDIUM ERROR.  Indicates that the command terminated with a non-  |
  |        |  recovered error condition that was probably caused by a flaw in   |
  |        |  the medium or an error in the recorded data.  This sense key may  |
  |        |  also be returned if the target is unable to distinguish between a |
  |        |  flaw in the medium and a specific hardware failure (sense key 4h).|
  |--------+--------------------------------------------------------------------|
  |   4h   |  HARDWARE ERROR.  Indicates that the target detected a non-        |
  |        |  recoverable hardware failure (for example, controller failure,    |
  |        |  device failure, parity error, etc.) while performing the command  |
  |        |  or during a self test.                                            |
  |--------+--------------------------------------------------------------------|
  |   5h   |  ILLEGAL REQUEST.  Indicates that there was an illegal parameter in|
  |        |  the command descriptor block or in the additional parameters      |
  |        |  supplied as data for some commands (FORMAT UNIT, SEARCH DATA,     |
  |        |  etc.).  If the target detects an invalid parameter in the command |
  |        |  descriptor block, then it shall terminate the command without     |
  |        |  altering the medium.  If the target detects an invalid parameter  |
  |        |  in the additional parameters supplied as data, then the target may|
  |        |  have already altered the medium.  This sense key may also indicate|
  |        |  that an invalid IDENTIFY message was received (5.6.7).            |
  |--------+--------------------------------------------------------------------|
  |   6h   |  UNIT ATTENTION.  Indicates that the removable medium may have been|
  |        |  changed or the target has been reset.  See 6.9 for more detailed  |
  |        |  information about the unit attention condition.                   |
  |--------+--------------------------------------------------------------------|
  |   7h   |  DATA PROTECT.  Indicates that a command that reads or writes the  |
  |        |  medium was attempted on a block that is protected from this       |
  |        |  operation.  The read or write operation is not performed.         |
  +=============================================================================+

                      Table 70: Sense Key (8h-Fh) Descriptions
  +========-====================================================================+
  | Sense  |  Description                                                       |
  |  Key   |                                                                    |
  |--------+--------------------------------------------------------------------|
  |   8h   |  BLANK CHECK.  Indicates that a write-once device or a sequential- |
  |        |  access device encountered blank medium or format-defined end-of-  |
  |        |  data indication while reading or a write-once device encountered a|
  |        |  non-blank medium while writing.                                   |
  |--------+--------------------------------------------------------------------|
  |   9h   |  Vendor Specific.  This sense key is available for reporting vendor|
  |        |  specific conditions.                                              |
  |--------+--------------------------------------------------------------------|
  |   Ah   |  COPY ABORTED.  Indicates a COPY, COMPARE, or COPY AND VERIFY      |
  |        |  command was aborted due to an error condition on the source       |
  |        |  device, the destination device, or both.  (See 7.2.3.2 for        |
  |        |  additional information about this sense key.)                     |
  |--------+--------------------------------------------------------------------|
  |   Bh   |  ABORTED COMMAND.  Indicates that the target aborted the command.  |
  |        |  The initiator may be able to recover by trying the command again. |
  |--------+--------------------------------------------------------------------|
  |   Ch   |  EQUAL.  Indicates a SEARCH DATA command has satisfied an equal    |
  |        |  comparison.                                                       |
  |--------+--------------------------------------------------------------------|
  |   Dh   |  VOLUME OVERFLOW.  Indicates that a buffered peripheral device has |
  |        |  reached the end-of-partition and data may remain in the buffer    |
  |        |  that has not been written to the medium.  A RECOVER BUFFERED DATA |
  |        |  command(s) may be issued to read the unwritten data from the      |
  |        |  buffer.                                                           |
  |--------+--------------------------------------------------------------------|
  |   Eh   |  MISCOMPARE.  Indicates that the source data did not match the data|
  |        |  read from the medium.                                             |
  |--------+--------------------------------------------------------------------|
  |   Fh   |  RESERVED.                                                         |
  +=============================================================================+



  U.4.  Host codes


  The following host codes are defined in drivers/scsi/scsi.h. They are
  set by the kernel driver.



       Value | Symbol         | Description
       ======|================|========================================
       0x00  | DID_OK         | No error
       0x01  | DID_NO_CONNECT | Couldn't connect before timeout period
       0x02  | DID_BUS_BUSY   | BUS stayed busy through time out period
       0x03  | DID_TIME_OUT   | TIMED OUT for other reason
       0x04  | DID_BAD_TARGET | BAD target
       0x05  | DID_ABORT      | Told to abort for some other reason
       0x06  | DID_PARITY     | Parity error
       0x07  | DID_ERROR      | internal error
       0x08  | DID_RESET      | Reset by somebody
       0x09  | DID_BAD_INTR   | Got an interrupt we weren't expecting



  U.5.  Driver codes


  The midlevel driver categorizes the returned status from the lowlevel
  driver based on the sense key from the device. It suggests some
  actions to be taken such as retry, abort or remap. The routine
  scsi_done from scsi.c does a very differentiated handling based on
  host_byte(), status_byte(), msg_byte() and the suggestion. It then
  sets the driver byte to show what it has done. The driver byte is
  composed out of two nibbles: the driver status and the suggestion.
  Each half is composed from the below values being 'or'ed together
  (found in scsi.h).


       Value | Symbol         | Description of Driver status
       ======|================|========================================
       0x00  | DRIVER_OK      | No error
       0x01  | DRIVER_BUSY    | not used
       0x02  | DRIVER_SOFT    | not used
       0x03  | DRIVER_MEDIA   | not used
       0x04  | DRIVER_ERROR   | internal driver error
       0x05  | DRIVER_INVALID | finished (DID_BAD_TARGET or DID_ABORT)
       0x06  | DRIVER_TIMEOUT | finished with timeout
       0x07  | DRIVER_HARD    | finished with fatal error
       0x08  | DRIVER_SENSE   | had sense information available



       Value | Symbol         | Description of suggestion
       ======|================|========================================
       0x10  | SUGGEST_RETRY  | retry the SCSI request
       0x20  | SUGGEST_ABORT  | abort the request
       0x30  | SUGGEST_REMAP  | remap the block (not yet implemented)
       0x40  | SUGGEST_DIE    | let the kernel panic
       0x80  | SUGGEST_SENSE  | get sense information from the device
       0xff  | SUGGEST_IS_OK  | nothing to be done



  V.  Additional sense codes and additional sense code qualifiers


  When the status of the executed SCSI command is CHECK_CONDITION, sense
  data is available in the sense buffer. The additional sense code and
  additional sense code qualifier are contained in that buffer.

  From the SCSI-2 specification I include two tables. The first is in
  lexical, the second in numerical order.


  V.1.  ASC and ASCQ in lexical order

  The following table list gives a list of descriptions and device types
  they apply to.



  +=============================================================================+
  |           D - DIRECT ACCESS DEVICE                                          |
  |           .T - SEQUENTIAL ACCESS DEVICE                                     |
  |           . L - PRINTER DEVICE                                              |
  |           .  P - PROCESSOR DEVICE                                           |
  |           .  .W - WRITE ONCE READ MULTIPLE DEVICE                           |
  |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
  |           .  .  S - SCANNER DEVICE                                          |
  |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
  |           .  .  . M - MEDIA CHANGER DEVICE                                  |
  |           .  .  .  C - COMMUNICATION DEVICE                                 |
  |           .  .  .  .                                                        |
  | ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
  | --- ----              ----------------------------------------------------- |
  | 13h  00h  D   W  O    ADDRESS MARK NOT FOUND FOR DATA FIELD                 |
  | 12h  00h  D   W  O    ADDRESS MARK NOT FOUND FOR ID FIELD                   |
  | 00h  11h       R      AUDIO PLAY OPERATION IN PROGRESS                      |
  | 00h  12h       R      AUDIO PLAY OPERATION PAUSED                           |
  | 00h  14h       R      AUDIO PLAY OPERATION STOPPED DUE TO ERROR             |
  | 00h  13h       R      AUDIO PLAY OPERATION SUCCESSFULLY COMPLETED           |
  | 00h  04h   T    S     BEGINNING-OF-PARTITION/MEDIUM DETECTED                |
  | 14h  04h   T          BLOCK SEQUENCE ERROR                                  |
  | 30h  02h  DT  WR O    CANNOT READ MEDIUM - INCOMPATIBLE FORMAT              |
  | 30h  01h  DT  WR O    CANNOT READ MEDIUM - UNKNOWN FORMAT                   |
  | 52h  00h   T          CARTRIDGE FAULT                                       |
  | 3Fh  02h  DTLPWRSOMC  CHANGED OPERATING DEFINITION                          |
  | 11h  06h      WR O    CIRC UNRECOVERED ERROR                                |
  | 30h  03h  DT          CLEANING CARTRIDGE INSTALLED                          |
  | 4Ah  00h  DTLPWRSOMC  COMMAND PHASE ERROR                                   |
  | 2Ch  00h  DTLPWRSOMC  COMMAND SEQUENCE ERROR                                |
  | 2Fh  00h  DTLPWRSOMC  COMMANDS CLEARED BY ANOTHER INITIATOR                 |
  | 2Bh  00h  DTLPWRSO C  COPY CANNOT EXECUTE SINCE HOST CANNOT DISCONNECT      |
  | 41h  00h  D           DATA PATH FAILURE (SHOULD USE 40 NN)                  |
  | 4Bh  00h  DTLPWRSOMC  DATA PHASE ERROR                                      |
  | 11h  07h      W  O    DATA RESYCHRONIZATION ERROR                           |
  | 16h  00h  D   W  O    DATA SYNCHRONIZATION MARK ERROR                       |
  | 19h  00h  D      O    DEFECT LIST ERROR                                     |
  | 19h  03h  D      O    DEFECT LIST ERROR IN GROWN LIST                       |
  | 19h  02h  D      O    DEFECT LIST ERROR IN PRIMARY LIST                     |
  | 19h  01h  D      O    DEFECT LIST NOT AVAILABLE                             |
  | 1Ch  00h  D      O    DEFECT LIST NOT FOUND                                 |
  | 32h  01h  D   W  O    DEFECT LIST UPDATE FAILURE                            |
  | 40h  NNh  DTLPWRSOMC  DIAGNOSTIC FAILURE ON COMPONENT NN (80H-FFH)          |
  | 63h  00h       R      END OF USER AREA ENCOUNTERED ON THIS TRACK            |
  | 00h  05h   T    S     END-OF-DATA DETECTED                                  |
  | 14h  03h   T          END-OF-DATA NOT FOUND                                 |
  | 00h  02h   T    S     END-OF-PARTITION/MEDIUM DETECTED                      |
  | 51h  00h   T     O    ERASE FAILURE                                         |
  | 0Ah  00h  DTLPWRSOMC  ERROR LOG OVERFLOW                                    |
  | 11h  02h  DT  W SO    ERROR TOO LONG TO CORRECT                             |
  | 03h  02h   T          EXCESSIVE WRITE ERRORS                                |
  | 3Bh  07h    L         FAILED TO SENSE BOTTOM-OF-FORM                        |
  | 3Bh  06h    L         FAILED TO SENSE TOP-OF-FORM                           |
  | 00h  01h   T          FILEMARK DETECTED                                     |
  | 14h  02h   T          FILEMARK OR SETMARK NOT FOUND                         |
  | 09h  02h      WR O    FOCUS SERVO FAILURE                                   |
  | 31h  01h  D L    O    FORMAT COMMAND FAILED                                 |
  | 58h  00h         O    GENERATION DOES NOT EXIST                             |
  +=============================================================================+



  Table 71: (continued)
  +=============================================================================+
  | ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
  | --- ----              ----------------------------------------------------- |
  | 1Ch  02h  D      O    GROWN DEFECT LIST NOT FOUND                           |
  | 00h  06h  DTLPWRSOMC  I/O PROCESS TERMINATED                                |
  | 10h  00h  D   W  O    ID CRC OR ECC ERROR                                   |
  | 22h  00h  D           ILLEGAL FUNCTION (SHOULD USE 20 00, 24 00, OR 26 00)  |
  | 64h  00h       R      ILLEGAL MODE FOR THIS TRACK                           |
  | 28h  01h          M   IMPORT OR EXPORT ELEMENT ACCESSED                     |
  | 30h  00h  DT  WR OM   INCOMPATIBLE MEDIUM INSTALLED                         |
  | 11h  08h   T          INCOMPLETE BLOCK READ                                 |
  | 48h  00h  DTLPWRSOMC  INITIATOR DETECTED ERROR MESSAGE RECEIVED             |
  | 3Fh  03h  DTLPWRSOMC  INQUIRY DATA HAS CHANGED                              |
  | 44h  00h  DTLPWRSOMC  INTERNAL TARGET FAILURE                               |
  | 3Dh  00h  DTLPWRSOMC  INVALID BITS IN IDENTIFY MESSAGE                      |
  | 2Ch  02h        S     INVALID COMBINATION OF WINDOWS SPECIFIED              |
  | 20h  00h  DTLPWRSOMC  INVALID COMMAND OPERATION CODE                        |
  | 21h  01h          M   INVALID ELEMENT ADDRESS                               |
  | 24h  00h  DTLPWRSOMC  INVALID FIELD IN CDB                                  |
  | 26h  00h  DTLPWRSOMC  INVALID FIELD IN PARAMETER LIST                       |
  | 49h  00h  DTLPWRSOMC  INVALID MESSAGE ERROR                                 |
  | 11h  05h      WR O    L-EC UNCORRECTABLE ERROR                              |
  | 60h  00h        S     LAMP FAILURE                                          |
  | 5Bh  02h  DTLPWRSOM   LOG COUNTER AT MAXIMUM                                |
  | 5Bh  00h  DTLPWRSOM   LOG EXCEPTION                                         |
  | 5Bh  03h  DTLPWRSOM   LOG LIST CODES EXHAUSTED                              |
  | 2Ah  02h  DTL WRSOMC  LOG PARAMETERS CHANGED                                |
  | 21h  00h  DT  WR OM   LOGICAL BLOCK ADDRESS OUT OF RANGE                    |
  | 08h  00h  DTL WRSOMC  LOGICAL UNIT COMMUNICATION FAILURE                    |
  | 08h  02h  DTL WRSOMC  LOGICAL UNIT COMMUNICATION PARITY ERROR               |
  | 08h  01h  DTL WRSOMC  LOGICAL UNIT COMMUNICATION TIME-OUT                   |
  | 4Ch  00h  DTLPWRSOMC  LOGICAL UNIT FAILED SELF-CONFIGURATION                |
  | 3Eh  00h  DTLPWRSOMC  LOGICAL UNIT HAS NOT SELF-CONFIGURED YET              |
  | 04h  01h  DTLPWRSOMC  LOGICAL UNIT IS IN PROCESS OF BECOMING READY          |
  | 04h  00h  DTLPWRSOMC  LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE          |
  | 04h  04h  DTL    O    LOGICAL UNIT NOT READY, FORMAT IN PROGRESS            |
  | 04h  02h  DTLPWRSOMC  LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED |
  | 04h  03h  DTLPWRSOMC  LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED  |
  | 25h  00h  DTLPWRSOMC  LOGICAL UNIT NOT SUPPORTED                            |
  | 15h  01h  DTL WRSOM   MECHANICAL POSITIONING ERROR                          |
  | 53h  00h  DTL WRSOM   MEDIA LOAD OR EJECT FAILED                            |
  | 3Bh  0Dh          M   MEDIUM DESTINATION ELEMENT FULL                       |
  | 31h  00h  DT  W  O    MEDIUM FORMAT CORRUPTED                               |
  | 3Ah  00h  DTL WRSOM   MEDIUM NOT PRESENT                                    |
  | 53h  02h  DT  WR OM   MEDIUM REMOVAL PREVENTED                              |
  | 3Bh  0Eh          M   MEDIUM SOURCE ELEMENT EMPTY                           |
  | 43h  00h  DTLPWRSOMC  MESSAGE ERROR                                         |
  | 3Fh  01h  DTLPWRSOMC  MICROCODE HAS BEEN CHANGED                            |
  | 1Dh  00h  D   W  O    MISCOMPARE DURING VERIFY OPERATION                    |
  | 11h  0Ah  DT     O    MISCORRECTED ERROR                                    |
  | 2Ah  01h  DTL WRSOMC  MODE PARAMETERS CHANGED                               |
  | 07h  00h  DTL WRSOM   MULTIPLE PERIPHERAL DEVICES SELECTED                  |
  | 11h  03h  DT  W SO    MULTIPLE READ ERRORS                                  |
  | 00h  00h  DTLPWRSOMC  NO ADDITIONAL SENSE INFORMATION                       |
  | 00h  15h       R      NO CURRENT AUDIO STATUS TO RETURN                     |
  | 32h  00h  D   W  O    NO DEFECT SPARE LOCATION AVAILABLE                    |
  | 11h  09h   T          NO GAP FOUND                                          |
  | 01h  00h  D   W  O    NO INDEX/SECTOR SIGNAL                                |
  | 06h  00h  D   WR OM   NO REFERENCE POSITION FOUND                           |
  +=============================================================================+



       Table 71: (continued)
       +=============================================================================+
       | ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
       | --- ----              ----------------------------------------------------- |
       | 02h  00h  D   WR OM   NO SEEK COMPLETE                                      |
       | 03h  01h   T          NO WRITE CURRENT                                      |
       | 28h  00h  DTLPWRSOMC  NOT READY TO READY TRANSITION, MEDIUM MAY HAVE CHANGED|
       | 5Ah  01h  DT  WR OM   OPERATOR MEDIUM REMOVAL REQUEST                       |
       | 5Ah  00h  DTLPWRSOM   OPERATOR REQUEST OR STATE CHANGE INPUT (UNSPECIFIED)  |
       | 5Ah  03h  DT  W  O    OPERATOR SELECTED WRITE PERMIT                        |
       | 5Ah  02h  DT  W  O    OPERATOR SELECTED WRITE PROTECT                       |
       | 61h  02h        S     OUT OF FOCUS                                          |
       | 4Eh  00h  DTLPWRSOMC  OVERLAPPED COMMANDS ATTEMPTED                         |
       | 2Dh  00h   T          OVERWRITE ERROR ON UPDATE IN PLACE                    |
       | 3Bh  05h    L         PAPER JAM                                             |
       | 1Ah  00h  DTLPWRSOMC  PARAMETER LIST LENGTH ERROR                           |
       | 26h  01h  DTLPWRSOMC  PARAMETER NOT SUPPORTED                               |
       | 26h  02h  DTLPWRSOMC  PARAMETER VALUE INVALID                               |
       | 2Ah  00h  DTL WRSOMC  PARAMETERS CHANGED                                    |
       | 03h  00h  DTL W SO    PERIPHERAL DEVICE WRITE FAULT                         |
       | 50h  02h   T          POSITION ERROR RELATED TO TIMING                      |
       | 3Bh  0Ch        S     POSITION PAST BEGINNING OF MEDIUM                     |
       | 3Bh  0Bh        S     POSITION PAST END OF MEDIUM                           |
       | 15h  02h  DT  WR O    POSITIONING ERROR DETECTED BY READ OF MEDIUM          |
       | 29h  00h  DTLPWRSOMC  POWER ON, RESET, OR BUS DEVICE RESET OCCURRED         |
       | 42h  00h  D           POWER-ON OR SELF-TEST FAILURE (SHOULD USE 40 NN)      |
       | 1Ch  01h  D      O    PRIMARY DEFECT LIST NOT FOUND                         |
       | 40h  00h  D           RAM FAILURE (SHOULD USE 40 NN)                        |
       | 15h  00h  DTL WRSOM   RANDOM POSITIONING ERROR                              |
       | 3Bh  0Ah        S     READ PAST BEGINNING OF MEDIUM                         |
       | 3Bh  09h        S     READ PAST END OF MEDIUM                               |
       | 11h  01h  DT  W SO    READ RETRIES EXHAUSTED                                |
       | 14h  01h  DT  WR O    RECORD NOT FOUND                                      |
       | 14h  00h  DTL WRSO    RECORDED ENTITY NOT FOUND                             |
       | 18h  02h  D   WR O    RECOVERED DATA - DATA AUTO-REALLOCATED                |
       | 18h  05h  D   WR O    RECOVERED DATA - RECOMMEND REASSIGNMENT               |
       | 18h  06h  D   WR O    RECOVERED DATA - RECOMMEND REWRITE                    |
       | 17h  05h  D   WR O    RECOVERED DATA USING PREVIOUS SECTOR ID               |
       | 18h  03h       R      RECOVERED DATA WITH CIRC                              |
       | 18h  01h  D   WR O    RECOVERED DATA WITH ERROR CORRECTION & RETRIES APPLIED|
       | 18h  00h  DT  WR O    RECOVERED DATA WITH ERROR CORRECTION APPLIED          |
       | 18h  04h       R      RECOVERED DATA WITH L-EC                              |
       | 17h  03h  DT  WR O    RECOVERED DATA WITH NEGATIVE HEAD OFFSET              |
       | 17h  00h  DT  WRSO    RECOVERED DATA WITH NO ERROR CORRECTION APPLIED       |
       | 17h  02h  DT  WR O    RECOVERED DATA WITH POSITIVE HEAD OFFSET              |
       | 17h  01h  DT  WRSO    RECOVERED DATA WITH RETRIES                           |
       | 17h  04h      WR O    RECOVERED DATA WITH RETRIES AND/OR CIRC APPLIED       |
       | 17h  06h  D   W  O    RECOVERED DATA WITHOUT ECC - DATA AUTO-REALLOCATED    |
       | 17h  07h  D   W  O    RECOVERED DATA WITHOUT ECC - RECOMMEND REASSIGNMENT   |
       | 17h  08h  D   W  O    RECOVERED DATA WITHOUT ECC - RECOMMEND REWRITE        |
       | 1Eh  00h  D   W  O    RECOVERED ID WITH ECC CORRECTION                      |
       | 3Bh  08h   T          REPOSITION ERROR                                      |
       | 36h  00h    L         RIBBON, INK, OR TONER FAILURE                         |
       | 37h  00h  DTL WRSOMC  ROUNDED PARAMETER                                     |
       | 5Ch  00h  D      O    RPL STATUS CHANGE                                     |
       | 39h  00h  DTL WRSOMC  SAVING PARAMETERS NOT SUPPORTED                       |
       | 62h  00h        S     SCAN HEAD POSITIONING ERROR                           |
       | 47h  00h  DTLPWRSOMC  SCSI PARITY ERROR                                     |
       | 54h  00h     P        SCSI TO HOST SYSTEM INTERFACE FAILURE                 |
       | 45h  00h  DTLPWRSOMC  SELECT OR RESELECT FAILURE                            |
       +=============================================================================+



       Table 71: (concluded)
       +=============================================================================+
       | ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
       | --- ----              ----------------------------------------------------- |
       | 3Bh  00h   TL         SEQUENTIAL POSITIONING ERROR                          |
       | 00h  03h   T          SETMARK DETECTED                                      |
       | 3Bh  04h    L         SLEW FAILURE                                          |
       | 09h  03h      WR O    SPINDLE SERVO FAILURE                                 |
       | 5Ch  02h  D      O    SPINDLES NOT SYNCHRONIZED                             |
       | 5Ch  01h  D      O    SPINDLES SYNCHRONIZED                                 |
       | 1Bh  00h  DTLPWRSOMC  SYNCHRONOUS DATA TRANSFER ERROR                       |
       | 55h  00h     P        SYSTEM RESOURCE FAILURE                               |
       | 33h  00h   T          TAPE LENGTH ERROR                                     |
       | 3Bh  03h    L         TAPE OR ELECTRONIC VERTICAL FORMS UNIT NOT READY      |
       | 3Bh  01h   T          TAPE POSITION ERROR AT BEGINNING-OF-MEDIUM            |
       | 3Bh  02h   T          TAPE POSITION ERROR AT END-OF-MEDIUM                  |
       | 3Fh  00h  DTLPWRSOMC  TARGET OPERATING CONDITIONS HAVE CHANGED              |
       | 5Bh  01h  DTLPWRSOM   THRESHOLD CONDITION MET                               |
       | 26h  03h  DTLPWRSOMC  THRESHOLD PARAMETERS NOT SUPPORTED                    |
       | 2Ch  01h        S     TOO MANY WINDOWS SPECIFIED                            |
       | 09h  00h  DT  WR O    TRACK FOLLOWING ERROR                                 |
       | 09h  01h      WR O    TRACKING SERVO FAILURE                                |
       | 61h  01h        S     UNABLE TO ACQUIRE VIDEO                               |
       | 57h  00h       R      UNABLE TO RECOVER TABLE-OF-CONTENTS                   |
       | 53h  01h   T          UNLOAD TAPE FAILURE                                   |
       | 11h  00h  DT  WRSO    UNRECOVERED READ ERROR                                |
       | 11h  04h  D   W  O    UNRECOVERED READ ERROR - AUTO REALLOCATE FAILED       |
       | 11h  0Bh  D   W  O    UNRECOVERED READ ERROR - RECOMMEND REASSIGNMENT       |
       | 11h  0Ch  D   W  O    UNRECOVERED READ ERROR - RECOMMEND REWRITE THE DATA   |
       | 46h  00h  DTLPWRSOMC  UNSUCCESSFUL SOFT RESET                               |
       | 59h  00h         O    UPDATED BLOCK READ                                    |
       | 61h  00h        S     VIDEO ACQUISITION ERROR                               |
       | 50h  00h   T          WRITE APPEND ERROR                                    |
       | 50h  01h   T          WRITE APPEND POSITION ERROR                           |
       | 0Ch  00h   T    S     WRITE ERROR                                           |
       | 0Ch  02h  D   W  O    WRITE ERROR - AUTO REALLOCATION FAILED                |
       | 0Ch  01h  D   W  O    WRITE ERROR RECOVERED WITH AUTO REALLOCATION          |
       | 27h  00h  DT  W  O    WRITE PROTECTED                                       |
       |                                                                             |
       | 80h  XXh     \                                                              |
       | THROUGH       >       VENDOR SPECIFIC.                                      |
       | FFh  XX      /                                                              |
       |                                                                             |
       | XXh  80h     \                                                              |
       | THROUGH       >       VENDOR SPECIFIC QUALIFICATION OF STANDARD ASC.        |
       | XXh  FFh     /                                                              |
       |                       ALL CODES NOT SHOWN ARE RESERVED.                     |
       |-----------------------------------------------------------------------------|



  V.2.  ASC and ASCQ in numerical order



                         Table 364: ASC and ASCQ Assignments

  +=============================================================================+
  |           D - DIRECT ACCESS DEVICE                                          |
  |           .T - SEQUENTIAL ACCESS DEVICE                                     |
  |           . L - PRINTER DEVICE                                              |
  |           .  P - PROCESSOR DEVICE                                           |
  |           .  .W - WRITE ONCE READ MULTIPLE DEVICE                           |
  |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
  |           .  .  S - SCANNER DEVICE                                          |
  |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
  |           .  .  . M - MEDIA CHANGER DEVICE                                  |
  |           .  .  .  C - COMMUNICATION DEVICE                                 |
  |           .  .  .  .                                                        |
  | ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
  | --- ----              ----------------------------------------------------- |
  |  00  00   DTLPWRSOMC  NO ADDITIONAL SENSE INFORMATION                       |
  |  00  01    T          FILEMARK DETECTED                                     |
  |  00  02    T    S     END-OF-PARTITION/MEDIUM DETECTED                      |
  |  00  03    T          SETMARK DETECTED                                      |
  |  00  04    T    S     BEGINNING-OF-PARTITION/MEDIUM DETECTED                |
  |  00  05    T    S     END-OF-DATA DETECTED                                  |
  |  00  06   DTLPWRSOMC  I/O PROCESS TERMINATED                                |
  |  00  11   R           AUDIO PLAY OPERATION IN PROGRESS                      |
  |  00  12   R           AUDIO PLAY OPERATION PAUSED                           |
  |  00  13   R           AUDIO PLAY OPERATION SUCCESSFULLY COMPLETED           |
  |  00  14   R           AUDIO PLAY OPERATION STOPPED DUE TO ERROR             |
  |  00  15   R           NO CURRENT AUDIO STATUS TO RETURN                     |
  |  01  00   DW  O       NO INDEX/SECTOR SIGNAL                                |
  |  02  00   DWR OM      NO SEEK COMPLETE                                      |
  |  03  00   DTL W SO    PERIPHERAL DEVICE WRITE FAULT                         |
  |  03  01    T          NO WRITE CURRENT                                      |
  |  03  02    T          EXCESSIVE WRITE ERRORS                                |
  |  04  00   DTLPWRSOMC  LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE          |
  |  04  01   DTLPWRSOMC  LOGICAL UNIT IS IN PROCESS OF BECOMING READY          |
  |  04  02   DTLPWRSOMC  LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED |
  |  04  03   DTLPWRSOMC  LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED  |
  |  04  04   DTL    O    LOGICAL UNIT NOT READY, FORMAT IN PROGRESS            |
  |  05  00   DTL WRSOMC  LOGICAL UNIT DOES NOT RESPOND TO SELECTION            |
  |  06  00   DWR OM  NO  REFERENCE POSITION FOUND                              |
  |  07  00   DTL WRSOM   MULTIPLE PERIPHERAL DEVICES SELECTED                  |
  |  08  00   DTL WRSOMC  LOGICAL UNIT COMMUNICATION FAILURE                    |
  |  08  01   DTL WRSOMC  LOGICAL UNIT COMMUNICATION TIME-OUT                   |
  |  08  02   DTL WRSOMC  LOGICAL UNIT COMMUNICATION PARITY ERROR               |
  |  09  00   DT  WR O    TRACK FOLLOWING ERROR                                 |
  |  09  01       WR O    TRA CKING SERVO FAILURE                               |
  |  09  02       WR O    FOC US SERVO FAILURE                                  |
  |  09  03       WR O    SPI NDLE SERVO FAILURE                                |
  +=============================================================================+



  Table 364: (continued)
  +=============================================================================+
  |           D - DIRECT ACCESS DEVICE                                          |
  |           .T - SEQUENTIAL ACCESS DEVICE                                     |
  |           . L - PRINTER DEVICE                                              |
  |           .  P - PROCESSOR DEVICE                                           |
  |           .  .W - WRITE ONCE READ MULTIPLE DEVICE                           |
  |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
  |           .  .  S - SCANNER DEVICE                                          |
  |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
  |           .  .  . M - MEDIA CHANGER DEVICE                                  |
  |           .  .  .  C - COMMUNICATION DEVICE                                 |
  |           .  .  .  .                                                        |
  | ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
  | --- ----              ----------------------------------------------------- |
  |  0A  00   DTLPWRSOMC  ERROR LOG OVERFLOW                                    |
  |  0B  00                                                                     |
  |  0C  00    T     S    WRITE ERROR                                           |
  |  0C  01   D   W  O    WRITE ERROR RECOVERED WITH AUTO REALLOCATION          |
  |  0C  02   D   W  O    WRITE ERROR - AUTO REALLOCATION FAILED                |
  |  0D  00                                                                     |
  |  0E  00                                                                     |
  |  0F  00                                                                     |
  |  10  00   D   W  O    ID CRC OR ECC ERROR                                   |
  |  11  00   DT  WRSO    UNRECOVERED READ ERROR                                |
  |  11  01   DT  W SO    READ RETRIES EXHAUSTED                                |
  |  11  02   DT  W SO    ERROR TOO LONG TO CORRECT                             |
  |  11  03   DT  W SO    MULTIPLE READ ERRORS                                  |
  |  11  04   D   W  O    UNRECOVERED READ ERROR - AUTO REALLOCATE FAILED       |
  |  11  05       WR O    L-EC UNCORRECTABLE ERROR                              |
  |  11  06       WR O    CIRC UNRECOVERED ERROR                                |
  |  11  07       W  O    DATA RESYCHRONIZATION ERROR                           |
  |  11  08    T          INCOMPLETE BLOCK READ                                 |
  |  11  09    T          NO GAP FOUND                                          |
  |  11  0A   DT     O    MISCORRECTED ERROR                                    |
  |  11  0B   D   W  O    UNRECOVERED READ ERROR - RECOMMEND REASSIGNMENT       |
  |  11  0C   D   W  O    UNRECOVERED READ ERROR - RECOMMEND REWRITE THE DATA   |
  |  12  00   D   W  O    ADDRESS MARK NOT FOUND FOR ID FIELD                   |
  |  13  00   D   W  O    ADDRESS MARK NOT FOUND FOR DATA FIELD                 |
  |  14  00   DTL WRSO    RECORDED ENTITY NOT FOUND                             |
  |  14  01   DT  WR O    RECORD NOT FOUND                                      |
  |  14  02    T          FILEMARK OR SETMARK NOT FOUND                         |
  |  14  03    T          END-OF-DATA NOT FOUND                                 |
  |  14  04    T          BLOCK SEQUENCE ERROR                                  |
  |  15  00   DTL WRSOM   RANDOM POSITIONING ERROR                              |
  |  15  01   DTL WRSOM   MECHANICAL POSITIONING ERROR                          |
  |  15  02   DT  WR O    POSITIONING ERROR DETECTED BY READ OF MEDIUM          |
  |  16  00   DW     O    DATA SYNCHRONIZATION MARK ERROR                       |
  |  17  00   DT  WRSO    RECOVERED DATA WITH NO ERROR CORRECTION APPLIED       |
  |  17  01   DT  WRSO    RECOVERED DATA WITH RETRIES                           |
  |  17  02   DT  WR O    RECOVERED DATA WITH POSITIVE HEAD OFFSET              |
  |  17  03   DT  WR O    RECOVERED DATA WITH NEGATIVE HEAD OFFSET              |
  |  17  04       WR O    RECOVERED DATA WITH RETRIES AND/OR CIRC APPLIED       |
  |  17  05   D   WR O    RECOVERED DATA USING PREVIOUS SECTOR ID               |
  |  17  06   D   W  O    RECOVERED DATA WITHOUT ECC - DATA AUTO-REALLOCATED    |
  |  17  07   D   W  O    RECOVERED DATA WITHOUT ECC - RECOMMEND REASSIGNMENT   |
  |  17  08   D   W  O    RECOVERED DATA WITHOUT ECC - RECOMMEND REWRITE        |
  |  18  00   DT  WR O    RECOVERED DATA WITH ERROR CORRECTION APPLIED          |
  |  18  01   D   WR O    RECOVERED DATA WITH ERROR CORRECTION & RETRIES APPLIED|
  |  18  02   D   WR O    RECOVERED DATA - DATA AUTO-REALLOCATED                |
  |  18  03        R      RECOVERED DATA WITH CIRC                              |
  |  18  04        R      RECOVERED DATA WITH LEC                               |
  |  18  05   D   WR O    RECOVERED DATA - RECOMMEND REASSIGNMENT               |
  |  18  06   D   WR O    RECOVERED DATA - RECOMMEND REWRITE                    |
  +=============================================================================+

       Table 364: (continued)
       +=============================================================================+
       |           D - DIRECT ACCESS DEVICE                                          |
       |           .T - SEQUENTIAL ACCESS DEVICE                                     |
       |           . L - PRINTER DEVICE                                              |
       |           .  P - PROCESSOR DEVICE                                           |
       |           .  .W - WRITE ONCE READ MULTIPLE DEVICE                           |
       |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
       |           .  .  S - SCANNER DEVICE                                          |
       |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
       |           .  .  . M - MEDIA CHANGER DEVICE                                  |
       |           .  .  .  C - COMMUNICATION DEVICE                                 |
       |           .  .  .  .                                                        |
       | ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
       | --- ----              ----------------------------------------------------- |
       |  19  00   D      O    DEFECT LIST ERROR                                     |
       |  19  01   D      O    DEFECT LIST NOT AVAILABLE                             |
       |  19  02   D      O    DEFECT LIST ERROR IN PRIMARY LIST                     |
       |  19  03   D      O    DEFECT LIST ERROR IN GROWN LIST                       |
       |  1A  00   DTLPWRSOMC  PARAMETER LIST LENGTH ERROR                           |
       |  1B  00   DTLPWRSOMC  SYNCHRONOUS DATA TRANSFER ERROR                       |
       |  1C  00   D      O    DEFECT LIST NOT FOUND                                 |
       |  1C  01   D      O    PRIMARY DEFECT LIST NOT FOUND                         |
       |  1C  02   D      O    GROWN DEFECT LIST NOT FOUND                           |
       |  1D  00   D   W  O    MISCOMPARE DURING VERIFY OPERATION                    |
       |  1E  00   D   W  O    RECOVERED ID WITH ECC                                 |
       |  1F  00                                                                     |
       |  20  00   DTLPWRSOMC  INVALID COMMAND OPERATION CODE                        |
       |  21  00   DT  WR OM   LOGICAL BLOCK ADDRESS OUT OF RANGE                    |
       |  21  01           M   INVALID ELEMENT ADDRESS                               |
       |  22  00   D           ILLEGAL FUNCTION (SHOULD USE 20 00, 24 00, OR 26 00)  |
       |  23  00                                                                     |
       |  24  00   DTLPWRSOMC  INVALID FIELD IN CDB                                  |
       |  25  00   DTLPWRSOMC  LOGICAL UNIT NOT SUPPORTED                            |
       |  26  00   DTLPWRSOMC  INVALID FIELD IN PARAMETER LIST                       |
       |  26  01   DTLPWRSOMC  PARAMETER NOT SUPPORTED                               |
       |  26  02   DTLPWRSOMC  PARAMETER VALUE INVALID                               |
       |  26  03   DTLPWRSOMC  THRESHOLD PARAMETERS NOT SUPPORTED                    |
       |  27  00   DT  W  O    WRITE PROTECTED                                       |
       |  28  00   DTLPWRSOMC  NOT READY TO READY TRANSITION(MEDIUM MAY HAVE CHANGED)|
       |  28  01           M   IMPORT OR EXPORT ELEMENT ACCESSED                     |
       |  29  00   DTLPWRSOMC  POWER ON, RESET, OR BUS DEVICE RESET OCCURRED         |
       |  2A  00   DTL WRSOMC  PARAMETERS CHANGED                                    |
       |  2A  01   DTL WRSOMC  MODE PARAMETERS CHANGED                               |
       |  2A  02   DTL WRSOMC  LOG PARAMETERS CHANGED                                |
       |  2B  00   DTLPWRSO C  COPY CANNOT EXECUTE SINCE HOST CANNOT DISCONNECT      |
       |  2C  00   DTLPWRSOMC  COMMAND SEQUENCE ERROR                                |
       |  2C  01         S     TOO MANY WINDOWS SPECIFIED                            |
       |  2C  02         S     INVALID COMBINATION OF WINDOWS SPECIFIED              |
       |  2D  00    T          OVERWRITE ERROR ON UPDATE IN PLACE                    |
       |  2E  00                                                                     |
       |  2F  00   DTLPWRSOMC  COMMANDS CLEARED BY ANOTHER INITIATOR                 |
       |  30  00   DT  WR OM   INCOMPATIBLE MEDIUM INSTALLED                         |
       |  30  01   DT  WR O    CANNOT READ MEDIUM - UNKNOWN FORMAT                   |
       |  30  02   DT  WR O    CANNOT READ MEDIUM - INCOMPATIBLE FORMAT              |
       |  30  03   DT          CLEANING CARTRIDGE INSTALLED                          |
       |  31  00   DT  W  O    MEDIUM FORMAT CORRUPTED                               |
       |  31  01   D L    O    FORMAT COMMAND FAILED                                 |
       |  32  00   D   W  O    NO DEFECT SPARE LOCATION AVAILABLE                    |
       |  32  01   D   W  O    DEFECT LIST UPDATE FAILURE                            |
       |  33  00    T          TAPE LENGTH ERROR                                     |
       |  34  00                                                                     |
       |  35  00                                                                     |
       |  36  00     L         RIBBON, INK, OR TONER FAILURE                         |
       +=============================================================================+

       Table 364: (continued)
       +=============================================================================+
       |           D - DIRECT ACCESS DEVICE                                          |
       |           .T - SEQUENTIAL ACCESS DEVICE                                     |
       |           . L - PRINTER DEVICE                                              |
       |           .  P - PROCESSOR DEVICE                                           |
       |           .  .W - WRITE ONCE READ MULTIPLE DEVICE                           |
       |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
       |           .  .  S - SCANNER DEVICE                                          |
       |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
       |           .  .  . M - MEDIA CHANGER DEVICE                                  |
       |           .  .  .  C - COMMUNICATION DEVICE                                 |
       |           .  .  .  .                                                        |
       | ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
       | --- ----              ----------------------------------------------------- |
       |  37  00   DTL WRSOMC  ROUNDED PARAMETER                                     |
       |  38  00                                                                     |
       |  39  00   DTL WRSOMC  SAVING PARAMETERS NOT SUPPORTED                       |
       |  3A  00   DTL WRSOM   MEDIUM NOT PRESENT                                    |
       |  3B  00    TL         SEQUENTIAL POSITIONING ERROR                          |
       |  3B  01    T          TAPE POSITION ERROR AT BEGINNING-OF-MEDIUM            |
       |  3B  02    T          TAPE POSITION ERROR AT END-OF-MEDIUM                  |
       |  3B  03     L         TAPE OR ELECTRONIC VERTICAL FORMS UNIT NOT READY      |
       |  3B  04     L         SLEW FAILURE                                          |
       |  3B  05     L         PAPER JAM                                             |
       |  3B  06     L         FAILED TO SENSE TOP-OF-FORM                           |
       |  3B  07     L         FAILED TO SENSE BOTTOM-OF-FORM                        |
       |  3B  08    T          REPOSITION ERROR                                      |
       |  3B  09         S     READ PAST END OF MEDIUM                               |
       |  3B  0A         S     READ PAST BEGINNING OF MEDIUM                         |
       |  3B  0B         S     POSITION PAST END OF MEDIUM                           |
       |  3B  0C         S     POSITION PAST BEGINNING OF MEDIUM                     |
       |  3B  0D           M   MEDIUM DESTINATION ELEMENT FULL                       |
       |  3B  0E           M   MEDIUM SOURCE ELEMENT EMPTY                           |
       |  3C  00                                                                     |
       |  3D  00   DTLPWRSOMC  INVALID BITS IN IDENTIFY MESSAGE                      |
       |  3E  00   DTLPWRSOMC  LOGICAL UNIT HAS NOT SELF-CONFIGURED YET              |
       |  3F  00   DTLPWRSOMC  TARGET OPERATING CONDITIONS HAVE CHANGED              |
       |  3F  01   DTLPWRSOMC  MICROCODE HAS BEEN CHANGED                            |
       |  3F  02   DTLPWRSOMC  CHANGED OPERATING DEFINITION                          |
       |  3F  03   DTLPWRSOMC  INQUIRY DATA HAS CHANGED                              |
       |  40  00   D           RAM FAILURE (SHOULD USE 40 NN)                        |
       |  40  NN   DTLPWRSOMC  DIAGNOSTIC FAILURE ON COMPONENT NN (80H-FFH)          |
       |  41  00   D           DATA PATH FAILURE (SHOULD USE 40 NN)                  |
       |  42  00   D           POWER-ON OR SELF-TEST FAILURE (SHOULD USE 40 NN)      |
       |  43  00   DTLPWRSOMC  MESSAGE ERROR                                         |
       |  44  00   DTLPWRSOMC  INTERNAL TARGET FAILURE                               |
       |  45  00   DTLPWRSOMC  SELECT OR RESELECT FAILURE                            |
       |  46  00   DTLPWRSOMC  UNSUCCESSFUL SOFT RESET                               |
       |  47  00   DTLPWRSOMC  SCSI PARITY ERROR                                     |
       |  48  00   DTLPWRSOMC  INITIATOR DETECTED ERROR MESSAGE RECEIVED             |
       |  49  00   DTLPWRSOMC  INVALID MESSAGE ERROR                                 |
       |  4A  00   DTLPWRSOMC  COMMAND PHASE ERROR                                   |
       |  4B  00   DTLPWRSOMC  DATA PHASE ERROR                                      |
       |  4C  00   DTLPWRSOMC  LOGICAL UNIT FAILED SELF-CONFIGURATION                |
       |  4D  00                                                                     |
       |  4E  00   DTLPWRSOMC  OVERLAPPED COMMANDS ATTEMPTED                         |
       |  4F  00                                                                     |
       |  50  00    T          WRITE APPEND ERROR                                    |
       |  50  01    T          WRITE APPEND POSITION ERROR                           |
       |  50  02    T          POSITION ERROR RELATED TO TIMING                      |
       |  51  00    T     O    ERASE FAILURE                                         |
       |  52  00    T          CARTRIDGE FAULT                                       |
       +=============================================================================+


       Table 364: (continued)
       +=============================================================================+
       |           D - DIRECT ACCESS DEVICE                                          |
       |           .T - SEQUENTIAL ACCESS DEVICE                                     |
       |           . L - PRINTER DEVICE                                              |
       |           .  P - PROCESSOR DEVICE                                           |
       |           .  .W - WRITE ONCE READ MULTIPLE DEVICE                           |
       |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
       |           .  .  S - SCANNER DEVICE                                          |
       |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
       |           .  .  . M - MEDIA CHANGER DEVICE                                  |
       |           .  .  .  C - COMMUNICATION DEVICE                                 |
       |           .  .  .  .                                                        |
       | ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
       | --- ----              ----------------------------------------------------- |
       |  53  00   DTL WRSOM   MEDIA LOAD OR EJECT FAILED                            |
       |  53  01    T          UNLOAD TAPE FAILURE                                   |
       |  53  02   DT  WR OM   MEDIUM REMOVAL PREVENTED                              |
       |  54  00      P        SCSI TO HOST SYSTEM INTERFACE FAILURE                 |
       |  55  00      P        SYSTEM RESOURCE FAILURE                               |
       |  56  00                                                                     |
       |  57  00        R      UNABLE TO RECOVER TABLE-OF-CONTENTS                   |
       |  58  00     O         GENERATION DOES NOT EXIST                             |
       |  59  00     O         UPDATED BLOCK READ                                    |
       |  5A  00   DTLPWRSOM   OPERATOR REQUEST OR STATE CHANGE INPUT (UNSPECIFIED)  |
       |  5A  01   DT  WR OM   OPERATOR MEDIUM REMOVAL REQUEST                       |
       |  5A  02   DT  W  O    OPERATOR SELECTED WRITE PROTECT                       |
       |  5A  03   DT  W  O    OPERATOR SELECTED WRITE PERMIT                        |
       |  5B  00   DTLPWRSOM   LOG EXCEPTION                                         |
       |  5B  01   DTLPWRSOM   THRESHOLD CONDITION MET                               |
       |  5B  02   DTLPWRSOM   LOG COUNTER AT MAXIMUM                                |
       |  5B  03   DTLPWRSOM   LOG LIST CODES EXHAUSTED                              |
       |  5C  00   D   O       RPL STATUS CHANGE                                     |
       |  5C  01   D   O       SPINDLES SYNCHRONIZED                                 |
       |  5C  02   D   O       SPINDLES NOT SYNCHRONIZED                             |
       |  5D  00                                                                     |
       |  5E  00                                                                     |
       |  5F  00                                                                     |
       |  60  00         S     LAMP FAILURE                                          |
       |  61  00         S     VIDEO ACQUISITION ERROR                               |
       |  61  01         S     UNABLE TO ACQUIRE VIDEO                               |
       |  61  02         S     OUT OF FOCUS                                          |
       |  62  00         S     SCAN HEAD POSITIONING ERROR                           |
       |  63  00        R      END OF USER AREA ENCOUNTERED ON THIS TRACK            |
       |  64  00        R      ILLEGAL MODE FOR THIS TRACK                           |
       |  65  00                                                                     |
       |  66  00                                                                     |
       |  67  00                                                                     |
       |  68  00                                                                     |
       |  69  00                                                                     |
       |  6A  00                                                                     |
       |  6B  00                                                                     |
       |  6C  00                                                                     |
       |  6D  00                                                                     |
       |  6E  00                                                                     |
       |  6F  00                                                                     |
       +=============================================================================+



  Table 364: (concluded)
  +=============================================================================+
  |           D - DIRECT ACCESS DEVICE                                          |
  |           .T - SEQUENTIAL ACCESS DEVICE                                     |
  |           . L - PRINTER DEVICE                                              |
  |           .  P - PROCESSOR DEVICE                                           |
  |           .  .W - WRITE ONCE READ MULTIPLE DEVICE                           |
  |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
  |           .  .  S - SCANNER DEVICE                                          |
  |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
  |           .  .  . M - MEDIA CHANGER DEVICE                                  |
  |           .  .  .  C - COMMUNICATION DEVICE                                 |
  |           .  .  .  .                                                        |
  | ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
  | --- ----              ----------------------------------------------------- |
  |  70  00                                                                     |
  |  71  00                                                                     |
  |  72  00                                                                     |
  |  73  00                                                                     |
  |  74  00                                                                     |
  |  75  00                                                                     |
  |  76  00                                                                     |
  |  77  00                                                                     |
  |  78  00                                                                     |
  |  79  00                                                                     |
  |  7A  00                                                                     |
  |  7B  00                                                                     |
  |  7C  00                                                                     |
  |  7D  00                                                                     |
  |  7E  00                                                                     |
  |  7F  00                                                                     |
  |                                                                             |
  |  80  xxh \                                                                  |
  |   THROUGH >  VENDOR SPECIFIC.                                               |
  |  FF  xxh /                                                                  |
  |                                                                             |
  |  xxh 80 \                                                                   |
  |  THROUGH >  VENDOR SPECIFIC QUALIFICATION OF STANDARD ASC.                  |
  |  xxh FF /                                                                   |
  |               ALL CODES NOT SHOWN OR BLANK ARE RESERVED.                    |
  +=============================================================================+



  W.  A SCSI command code quick reference



  Table 365 is a numerical order listing of the command operation codes.

                          Table 365: SCSI-2 Operation Codes

  +=============================================================================+
  |           D - DIRECT ACCESS DEVICE                       Device Column Key  |
  |           .T - SEQUENTIAL ACCESS DEVICE                  M = Mandatory      |
  |           . L - PRINTER DEVICE                           O = Optional       |
  |           .  P - PROCESSOR DEVICE                        V = Vendor Specific|
  |           .  .W - WRITE ONCE READ MULTIPLE DEVICE        R = Reserved       |
  |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
  |           .  .  S - SCANNER DEVICE                                          |
  |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
  |           .  .  . M - MEDIA CHANGER DEVICE                                  |
  |           .  .  .  C - COMMUNICATION DEVICE                                 |
  |           .  .  .  .                                                        |
  |        OP DTLPWRSOMC Description                                            |
  |----------+----------+-------------------------------------------------------|
  |        00 MMMMMMMMMM TEST UNIT READY                                        |
  |        01  M         REWIND                                                 |
  |        01 O V OO OO  REZERO UNIT                                            |
  |        02 VVVVVV  V                                                         |
  |        03 MMMMMMMMMM REQUEST SENSE                                          |
  |        04   O        FORMAT                                                 |
  |        04 M      O   FORMAT UNIT                                            |
  |        05 VMVVVV  V  READ BLOCK LIMITS                                      |
  |        06 VVVVVV  V                                                         |
  |        07         O  INITIALIZE ELEMENT STATUS                              |
  |        07 OVV O  OV  REASSIGN BLOCKS                                        |
  |        08          M GET MESSAGE(06)                                        |
  |        08 OMV OO OV  READ(06)                                               |
  |        08    O       RECEIVE                                                |
  |        09 VVVVVV  V                                                         |
  |        0A   M        PRINT                                                  |
  |        0A          M SEND MESSAGE(06)                                       |
  |        0A    M       SEND(06)                                               |
  |        0A OM  O  OV  WRITE(06)                                              |
  |        0B O   OO OV  SEEK(06)                                               |
  |        0B   O        SLEW AND PRINT                                         |
  |        0C VVVVVV  V                                                         |
  |        0D VVVVVV  V                                                         |
  |        0E VVVVVV  V                                                         |
  |        0F VOVVVV  V  READ REVERSE                                           |
  |        10   O O      SYNCHRONIZE BUFFER                                     |
  |        10 VM VVV     WRITE FILEMARKS                                        |
  |        11 VMVVVV     SPACE                                                  |
  |        12 MMMMMMMMMM INQUIRY                                                |
  |        13 VOVVVV     VERIFY(06)                                             |
  |        14 VOOVVV     RECOVER BUFFERED DATA                                  |
  |        15 OMO OOOOOO MODE SELECT(06)                                        |
  |        16 M   MM MO  RESERVE                                                |
  |        16  MM   M    RESERVE UNIT                                           |
  |        17 M   MM MO  RELEASE                                                |
  |        17  MM   M    RELEASE UNIT                                           |
  |        18 OOOOOOOO   COPY                                                   |
  |        19 VMVVVV     ERASE                                                  |
  |        1A OMO OOOOOO MODE SENSE(06)                                         |
  |        1B  O         LOAD UNLOAD                                            |
  |        1B       O    SCAN                                                   |
  |        1B   O        STOP PRINT                                             |
  |        1B O   OO O   STOP START UNIT                                        |
  +=============================================================================+



       Table 365: (continued)
       +=============================================================================+
       |           D - DIRECT ACCESS DEVICE                       Device Column Key  |
       |           .T - SEQUENTIAL ACCESS DEVICE                  M = Mandatory      |
       |           . L - PRINTER DEVICE                           O = Optional       |
       |           .  P - PROCESSOR DEVICE                        V = Vendor Specific|
       |           .  .W - WRITE ONCE READ MULTIPLE DEVICE        R = Reserved       |
       |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
       |           .  .  S - SCANNER DEVICE                                          |
       |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
       |           .  .  . M - MEDIA CHANGER DEVICE                                  |
       |           .  .  .  C - COMMUNICATION DEVICE                                 |
       |           .  .  .  .                                                        |
       |        OP DTLPWRSOMC Description                                            |
       |----------+----------+-------------------------------------------------------|
       |        1C OOOOOOOOOO RECEIVE DIAGNOSTIC RESULTS                             |
       |        1D MMMMMMMMMM SEND DIAGNOSTIC                                        |
       |        1E OO  OO OO  PREVENT ALLOW MEDIUM REMOVAL                           |
       |        1F                                                                   |
       |        20 V   VV V                                                          |
       |        21 V   VV V                                                          |
       |        22 V   VV V                                                          |
       |        23 V   VV V                                                          |
       |        24 V   VVM    SET WINDOW                                             |
       |        25       O    GET WINDOW                                             |
       |        25 M   M  M   READ CAPACITY                                          |
       |        25      M     READ CD-ROM CAPACITY                                   |
       |        26 V   VV                                                            |
       |        27 V   VV                                                            |
       |        28          O GET MESSAGE(10)                                        |
       |        28 M   MMMM   READ(10)                                               |
       |        29 V   VV O   READ GENERATION                                        |
       |        2A          O SEND MESSAGE(10)                                       |
       |        2A       O    SEND(10)                                               |
       |        2A M   M  M   WRITE(10)                                              |
       |        2B  O         LOCATE                                                 |
       |        2B         O  POSITION TO ELEMENT                                    |
       |        2B O   OO O   SEEK(10)                                               |
       |        2C V      O   ERASE(10)                                              |
       |        2D V   O  O   READ UPDATED BLOCK                                     |
       |        2E O   O  O   WRITE AND VERIFY(10)                                   |
       |        2F O   OO O   VERIFY(10)                                             |
       |        30 O   OO O   SEARCH DATA HIGH(10)                                   |
       |        31       O    OBJECT POSITION                                        |
       |        31 O   OO O   SEARCH DATA EQUAL(10)                                  |
       |        32 O   OO O   SEARCH DATA LOW(10)                                    |
       |        33 O   OO O   SET LIMITS(10)                                         |
       |        34       O    GET DATA BUFFER STATUS                                 |
       |        34 O   OO O   PRE-FETCH                                              |
       |        34  O         READ POSITION                                          |
       |        35 O   OO O   SYNCHRONIZE CACHE                                      |
       |        36 O   OO O   LOCK UNLOCK CACHE                                      |
       |        37 O      O   READ DEFECT DATA(10)                                   |
       |        38     O  O   MEDIUM SCAN                                            |
       |        39 OOOOOOOO   COMPARE                                                |
       |        3A OOOOOOOO   COPY AND VERIFY                                        |
       |        3B OOOOOOOOOO WRITE BUFFER                                           |
       |        3C OOOOOOOOOO READ BUFFER                                            |
       |        3D     O  O   UPDATE BLOCK                                           |
       |        3E O   OO O   READ LONG                                              |
       |        3F O   O  O   WRITE LONG                                             |
       +=============================================================================+



       Table 365: (continued)
       +=============================================================================+
       |           D - DIRECT ACCESS DEVICE                       Device Column Key  |
       |           .T - SEQUENTIAL ACCESS DEVICE                  M = Mandatory      |
       |           . L - PRINTER DEVICE                           O = Optional       |
       |           .  P - PROCESSOR DEVICE                        V = Vendor Specific|
       |           .  .W - WRITE ONCE READ MULTIPLE DEVICE        R = Reserved       |
       |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
       |           .  .  S - SCANNER DEVICE                                          |
       |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
       |           .  .  . M - MEDIA CHANGER DEVICE                                  |
       |           .  .  .  C - COMMUNICATION DEVICE                                 |
       |           .  .  .  .                                                        |
       |        OP DTLPWRSOMC Description                                            |
       |----------+----------+-------------------------------------------------------|
       |        40 OOOOOOOOOO CHANGE DEFINITION                                      |
       |        41 O          WRITE SAME                                             |
       |        42      O     READ SUB-CHANNEL                                       |
       |        43      O     READ TOC                                               |
       |        44      O     READ HEADER                                            |
       |        45      O     PLAY AUDIO(10)                                         |
       |        46                                                                   |
       |        47      O     PLAY AUDIO MSF                                         |
       |        48      O     PLAY AUDIO TRACK INDEX                                 |
       |        49      O     PLAY TRACK RELATIVE(10)                                |
       |        4A                                                                   |
       |        4B      O     PAUSE RESUME                                           |
       |        4C OOOOOOOOOO LOG SELECT                                             |
       |        4D OOOOOOOOOO LOG SENSE                                              |
       |        4E                                                                   |
       |        4F                                                                   |
       |        50                                                                   |
       |        51                                                                   |
       |        52                                                                   |
       |        53                                                                   |
       |        54                                                                   |
       |        55 OOO OOOOOO MODE SELECT(10)                                        |
       |        56                                                                   |
       |        57                                                                   |
       |        58                                                                   |
       |        59                                                                   |
       |        5A OOO OOOOOO MODE SENSE(10)                                         |
       |        5B                                                                   |
       |        5C                                                                   |
       |        5D                                                                   |
       |        5E                                                                   |
       |        5F                                                                   |
       +=============================================================================+



  Table 365: (concluded)
  +=============================================================================+
  |           D - DIRECT ACCESS DEVICE                       Device Column Key  |
  |           .T - SEQUENTIAL ACCESS DEVICE                  M = Mandatory      |
  |           . L - PRINTER DEVICE                           O = Optional       |
  |           .  P - PROCESSOR DEVICE                        V = Vendor Specific|
  |           .  .W - WRITE ONCE READ MULTIPLE DEVICE        R = Reserved       |
  |           .  . R - READ ONLY (CD-ROM) DEVICE                                |
  |           .  .  S - SCANNER DEVICE                                          |
  |           .  .  .O - OPTICAL MEMORY DEVICE                                  |
  |           .  .  . M - MEDIA CHANGER DEVICE                                  |
  |           .  .  .  C - COMMUNICATION DEVICE                                 |
  |           .  .  .  .                                                        |
  |        OP DTLPWRSOMC Description                                            |
  |----------+----------+-------------------------------------------------------|
  |        A0                                                                   |
  |        A1                                                                   |
  |        A2                                                                   |
  |        A3                                                                   |
  |        A4                                                                   |
  |        A5         M  MOVE MEDIUM                                            |
  |        A5      O     PLAY AUDIO(12)                                         |
  |        A6         O  EXCHANGE MEDIUM                                        |
  |        A7                                                                   |
  |        A8          O GET MESSAGE(12)                                        |
  |        A8     OO O   READ(12)                                               |
  |        A9      O     PLAY TRACK RELATIVE(12)                                |
  |        AA          O SEND MESSAGE(12)                                       |
  |        AA     O  O   WRITE(12)                                              |
  |        AB                                                                   |
  |        AC        O   ERASE(12)                                              |
  |        AD                                                                   |
  |        AE     O  O   WRITE AND VERIFY(12)                                   |
  |        AF     OO O   VERIFY(12)                                             |
  |        B0     OO O   SEARCH DATA HIGH(12)                                   |
  |        B1     OO O   SEARCH DATA EQUAL(12)                                  |
  |        B2     OO O   SEARCH DATA LOW(12)                                    |
  |        B3     OO O   SET LIMITS(12)                                         |
  |        B4                                                                   |
  |        B5                                                                   |
  |        B5         O  REQUEST VOLUME ELEMENT ADDRESS                         |
  |        B6                                                                   |
  |        B6         O  SEND VOLUME TAG                                        |
  |        B7        O   READ DEFECT DATA(12)                                   |
  |        B8                                                                   |
  |        B8         O  READ ELEMENT STATUS                                    |
  |        B9                                                                   |
  |        BA                                                                   |
  |        BB                                                                   |
  |        BC                                                                   |
  |        BD                                                                   |
  |        BE                                                                   |
  |        BF                                                                   |
  +=============================================================================+



  X.  Example programs

  Here is the C example program, which requests manufacturer/model and
  reports if a medium is loaded in the device.



  #define DEVICE "/dev/sgc"
  /* Example program to demonstrate the generic SCSI interface */
  #include <stdio.h>
  #include <unistd.h>
  #include <string.h>
  #include <fcntl.h>
  #include <errno.h>
  #include <scsi/sg.h>

  #define SCSI_OFF sizeof(struct sg_header)
  static unsigned char cmd[SCSI_OFF + 18];      /* SCSI command buffer */
  int fd;                               /* SCSI device/file descriptor */

  /* process a complete scsi cmd. Use the generic scsi interface. */
  static int handle_scsi_cmd(unsigned cmd_len,         /* command length */
                             unsigned in_size,         /* input data size */
                             unsigned char *i_buff,    /* input buffer */
                             unsigned out_size,        /* output data size */
                             unsigned char *o_buff     /* output buffer */
                             )
  {
      int status = 0;
      struct sg_header *sg_hd;

      /* safety checks */
      if (!cmd_len) return -1;            /* need a cmd_len != 0 */
      if (!i_buff) return -1;             /* need an input buffer != NULL */
  #ifdef SG_BIG_BUFF
      if (SCSI_OFF + cmd_len + in_size > SG_BIG_BUFF) return -1;
      if (SCSI_OFF + out_size > SG_BIG_BUFF) return -1;
  #else
      if (SCSI_OFF + cmd_len + in_size > 4096) return -1;
      if (SCSI_OFF + out_size > 4096) return -1;
  #endif

      if (!o_buff) out_size = 0;

      /* generic scsi device header construction */
      sg_hd = (struct sg_header *) i_buff;
      sg_hd->reply_len   = SCSI_OFF + out_size;
      sg_hd->twelve_byte = cmd_len == 12;
      sg_hd->result = 0;
  #if     0
      sg_hd->pack_len    = SCSI_OFF + cmd_len + in_size; /* not necessary */
      sg_hd->pack_id;     /* not used */
      sg_hd->other_flags; /* not used */
  #endif

      /* send command */
      status = write( fd, i_buff, SCSI_OFF + cmd_len + in_size );
      if ( status < 0 || status != SCSI_OFF + cmd_len + in_size ||
                         sg_hd->result ) {
          /* some error happened */
          fprintf( stderr, "write(generic) result = 0x%x cmd = 0x%x\n",
                      sg_hd->result, i_buff[SCSI_OFF] );
          perror("");
          return status;
      }

      if (!o_buff) o_buff = i_buff;       /* buffer pointer check */

      /* retrieve result */
      status = read( fd, o_buff, SCSI_OFF + out_size);
      if ( status < 0 || status != SCSI_OFF + out_size || sg_hd->result ) {
          /* some error happened */
          fprintf( stderr, "read(generic) result = 0x%x cmd = 0x%x\n",
                  sg_hd->result, o_buff[SCSI_OFF] );
          fprintf( stderr, "read(generic) sense "
                  "%x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\n",
                  sg_hd->sense_buffer[0],         sg_hd->sense_buffer[1],
                  sg_hd->sense_buffer[2],         sg_hd->sense_buffer[3],
                  sg_hd->sense_buffer[4],         sg_hd->sense_buffer[5],
                  sg_hd->sense_buffer[6],         sg_hd->sense_buffer[7],
                  sg_hd->sense_buffer[8],         sg_hd->sense_buffer[9],
                  sg_hd->sense_buffer[10],        sg_hd->sense_buffer[11],
                  sg_hd->sense_buffer[12],        sg_hd->sense_buffer[13],
                  sg_hd->sense_buffer[14],        sg_hd->sense_buffer[15]);
          if (status < 0)
              perror("");
      }
      /* Look if we got what we expected to get */
      if (status == SCSI_OFF + out_size) status = 0; /* got them all */

      return status;  /* 0 means no error */
  }

  #define INQUIRY_CMD     0x12
  #define INQUIRY_CMDLEN  6
  #define INQUIRY_REPLY_LEN 96
  #define INQUIRY_VENDOR  8       /* Offset in reply data to vendor name */

  /* request vendor brand and model */
  static unsigned char *Inquiry ( void )
  {
    unsigned char Inqbuffer[ SCSI_OFF + INQUIRY_REPLY_LEN ];
    unsigned char cmdblk [ INQUIRY_CMDLEN ] =
        { INQUIRY_CMD,  /* command */
                    0,  /* lun/reserved */
                    0,  /* page code */
                    0,  /* reserved */
    INQUIRY_REPLY_LEN,  /* allocation length */
                    0 };/* reserved/flag/link */

    memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) );

    /*
     * +------------------+
     * | struct sg_header | <- cmd
     * +------------------+
     * | copy of cmdblk   | <- cmd + SCSI_OFF
     * +------------------+
     */

    if (handle_scsi_cmd(sizeof(cmdblk), 0, cmd,
                        sizeof(Inqbuffer) - SCSI_OFF, Inqbuffer )) {
        fprintf( stderr, "Inquiry failed\n" );
        exit(2);
    }
    return (Inqbuffer + SCSI_OFF);
  }

  #define TESTUNITREADY_CMD 0
  #define TESTUNITREADY_CMDLEN 6

  #define ADD_SENSECODE 12
  #define ADD_SC_QUALIFIER 13
  #define NO_MEDIA_SC 0x3a
  #define NO_MEDIA_SCQ 0x00
  int TestForMedium ( void )
  {
    /* request READY status */
    static unsigned char cmdblk [TESTUNITREADY_CMDLEN] = {
        TESTUNITREADY_CMD, /* command */
                        0, /* lun/reserved */
                        0, /* reserved */
                        0, /* reserved */
                        0, /* reserved */
                        0};/* reserved */

    memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) );

    /*
     * +------------------+
     * | struct sg_header | <- cmd
     * +------------------+
     * | copy of cmdblk   | <- cmd + SCSI_OFF
     * +------------------+
     */

    if (handle_scsi_cmd(sizeof(cmdblk), 0, cmd,
                              0, NULL)) {
        fprintf (stderr, "Test unit ready failed\n");
        exit(2);
    }

    return
     *(((struct sg_header*)cmd)->sense_buffer +ADD_SENSECODE) !=
                                                          NO_MEDIA_SC ||
     *(((struct sg_header*)cmd)->sense_buffer +ADD_SC_QUALIFIER) !=
                                                          NO_MEDIA_SCQ;
  }

  void main( void )
  {
    fd = open(DEVICE, O_RDWR);
    if (fd < 0) {
      fprintf( stderr, "Need read/write permissions for "DEVICE".\n" );
      exit(1);
    }

    /* print some fields of the Inquiry result */
    printf( "%s\n", Inquiry() + INQUIRY_VENDOR );

    /* look if medium is loaded */
    if (!TestForMedium()) {
      printf("device is unloaded\n");
    } else {
      printf("device is loaded\n");
    }
  }



  SMB HOWTO
  David Wood, dwood@plugged.net.au
  v1.3, 20 April 2000

  This is the SMB HOWTO.  This document describes how to use the Server
  Message Block (SMB) protocol, also called the Session Message Block,
  NetBIOS or LanManager protocol, with Linux using Samba.
  ______________________________________________________________________

  Table of Contents


  1. License

  2. Introduction

  3. Further Information

  4. Installation

  5. Running The Daemons

  6. General Configuration (/etc/smb.conf)

  7. Sharing A Linux Drive With Windows Machines

  8. Accessing an SMB Share With Linux Machines

  9. Sharing A Linux Printer With Windows Machines

  10. Sharing A Windows Printer With Linux Machines

  11. Backing Up Windows Machines to a Linux Host

  12. Using Samba Across Routed Networks

  13. Acknowledgements



  ______________________________________________________________________

  1.  License

  Copyright (c)  2000  David Wood.

  Permission is granted to copy, distribute and/or modify this document
  under the terms of the GNU Free Documentation License, Version 1.1 or
  any later version published by the Free Software Foundation; with no
  Invariant Sections , with no Front-Cover Texts and with no Back-Cover
  Texts.  A copy of the license is available at
  http://www.gnu.org/copyleft/fdl.html
  <http://www.gnu.org/copyleft/fdl.html>.


  2.  Introduction

  This is the SMB HOWTO.  This document describes how to use the Server
  Message Block (SMB) protocol, also called the Session Message Block,
  NetBIOS or LanManager protocol, with Linux using Samba.  Although this
  document is Linux-centric, Samba runs on most Unix-like operating
  systems.

  This document is maintained by David Wood (dwood@plugged.net.au).
  Additions, modifications or corrections may be mailed there for
  inclusion in the next release.
  Much more Samba documentation is available at the Samba Web site,
  located at http://www.samba.org/ <http://www.samba.org/>.  There is a
  tremendous amount of information there; please have a look before
  asking for help!  You also might try the comp.protocols.smb newsgroup.

  The SMB protocol is used by Microsoft Windows 3.11, NT and 95/98 to
  share disks and printers.  Using the Samba suite of tools by Andrew
  Tridgell (Andrew.Tridgell@anu.edu.au), UNIX (including Linux) machines
  can share disk and printers with Windows hosts.  The smbfs tools by
  Paal-Kr. Engstad (engstad@intermetrics.com) and Volker Lendecke
  (lendecke@namu01.gwdg.de) enable Unix machines to mount SMB shares
  from Windows or Samba hosts.

  There are four basic things that one can do with Samba:


  1. Share a Linux drive with Windows machines.

  2. Access an SMB share with Linux machines.

  3. Share a Linux printer with Windows machines.

  4. Share a Windows printer with Linux machines.

  All of these are covered in this document, plus a few other odds and
  ends.

  Disclaimer: The procedures and scripts either work for the author or
  have been reported to work by the people that provided them.
  Different configurations may not work with the information given here.
  If you encounter such a situation, please e-mail the author with
  suggestions for improvement in this document.

  Please note that for Windows 3.x machines to access SMB shares, they
  must have a TCP/IP stack and the Win32s DLLs.  Both of these are
  available on Microsoft's Web site (http://www.microsoft.com
  <http://www.microsoft.com>).  As of the writing of this version of the
  HOWTO, Microsoft are reportedly requiring a subscription to the
  Microsoft Software Developers Network (MSDN) to download the TCP/IP-32
  stack for Windows 3.x from their Web site.  Since this software used
  to be free, many older copies are in existance and may be acquired
  from friends and user group contacts.


  3.  Further Information

  This HOWTO attempts to explain how to configure basic SMB file and
  print services on a Linux machine.  Samba is a very complex and
  complete package.  There would be no point in attempting to duplicate
  all of the documentation for Samba here.

  For further information, please see the following documents:

    The Samba documentation, available as part of the Samba
     distribution.  The distribution is available at:
     ftp://ftp.samba.org/ <ftp://ftp.samba.org/>

    The Linux Printing HOWTO.

    Protocol Standard For A NetBIOS Service On A TCP/UDP Transport.

     RFC 1001
        > RFC 1001 - Concepts and Methods.

     RFC 1002
        > RFC 1002 - Detailed Specifications.
  4.  Installation

  First, in order to use Samba your machines must be on a single
  ethernet LAN segment using the TCP/IP protocol.  Samba will not work
  using other network protocols.  This is generally easy since Linux and
  Windows 95/98/NT ship with TCP/IP support.  However, if you are using
  Windows 3.X machines TCP/IP support will need to be added.  One of the
  most common questions that I get asked is why Samba "isn't working"
  when Windows machines are not using TCP/IP.

  In order to setup Windows 95/98 to use TCP/IP, select Control Panel |
  Network, then add and configure Microsoft TCP/IP.  Under Windows NT,
  select Control Panel | Network | Protocols.

  To get the latest source version of Samba, go to this URL and pick the
  closest mirror site to you: ftp://ftp.samba.org/
  <ftp://ftp.samba.org/>.

  In most cases, though, your Linux distribution will already come with
  an installable package containing a recent version of Samba.

  The following two daemons are required for the Samba package.  They
  are typically installed in /usr/sbin and run either on boot from the
  systems startup scripts or from inetd.  Example scripts are shown in
  ``Running the Daemons''.


  ______________________________________________________________________
          smbd (The SMB daemon)
          nmbd (Provides NetBIOS nameserver support to clients)
  ______________________________________________________________________



  Please note that the name service provided by the nmbd daemon is
  different from the name service provided by the Domain Name Service
  (DNS).  NetBIOS name service is a 'Windows-style' name service used
  for SMB.  In other words, having DNS name service tells you nothing
  about the state of the ability for Samba to resolve host names.

  Typically, the following Samba binaries are installed in /usr/bin or
  /usr/local/samba/bin, although the location is optional.


  ______________________________________________________________________
          smbclient       (An SMB client for UNIX machines)
          smbprint        (A script to print to a printer on an SMB host)
          smbprint.sysv   (As above, but for SVR4 UNIX machines)
          smbstatus       (Lists the cuurent SMB connections for the local host)
          smbrun          (A 'glue' script to facilitate runnning applciations
                           on SMB hosts)
  ______________________________________________________________________



  The binaries for smbfs file system support are discussed later in this
  document.

  Additionally, a script called 'print' is included with this HOWTO,
  which serves as a useful front end to the smbprint script.

  The Samba package is simple to install.  Simply retrieve the source
  from the location mentioned above, and read the file README in the
  distribution.  There is also a file called docs/INSTALL.txt in the
  distribution that provides a simple step-by-step set of instructions.

  Following installation, place the daemons in /usr/sbin and the
  binaries in /usr/bin.  Install the man pages in /usr/local/man.

  When you made the Samba package, you would have specified in the
  Makefile the location for the configuration file, smb.conf.  This is
  generally in /etc, but you can put it anywhere you like.  For these
  directions, we will presume that you specified the location of the
  configuration file as /etc/smb.conf, the log file location as log file
  = /var/log/samba-log.%m and the lock directory as lock directory =
  /var/lock/samba.

  Install the configuration file, smb.conf.  Go to the directory where
  Samba was built.  Look in the subdirectory examples/simple and read
  the file README.  Copy the file smb.conf found in that directory to
  /etc.  BE CAREFUL!  If you have a Linux distribution that already has
  Samba installed, you may already have a Samba configuration file in
  /etc.  You should probably start with that one.

  If you don't want to have your configuration file in /etc, put it
  wherever you want to, then put a symlink in /etc:


  ______________________________________________________________________
          ln -s /path/to/smb.conf /etc/smb.conf
  ______________________________________________________________________



  5.  Running The Daemons

  The two SMB daemons are /usr/sbin/smbd and /usr/sbin/nmbd.  Under most
  Linux distributions, these are started, stoped and restarted via the
  startup script located in /etc/rc.d/init.d/smb and symlinked to the
  appropriate runlevels.

  If you choose not to use the standard startup script, you can run the
  Samba daemons from inetd or as stand-alone processes.  Samba will
  respond slightly faster as a standalone daemon than running from
  inetd.

  In either case, you should check the file /etc/services for lines that
  look like this:



       ______________________________________________________________________
       netbios-ns      137/tcp         nbns
       netbios-ns      137/udp         nbns
       netbios-dgm     138/tcp         nbdgm
       netbios-dgm     138/udp         nbdgm
       netbios-ssn     139/tcp         nbssn
       ______________________________________________________________________



  Make sure they are all uncommented.  Depending on your distribution,
  you may even need to add them.   Samba will not be able to bind to the
  appropriate ports unless /etc/services has these entries.

  To run the daemons from inetd, place the following lines in the inetd
  configuration file, /etc/inetd.conf:



  ______________________________________________________________________
      # SAMBA NetBIOS services (for PC file and print sharing)
      netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
      netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd
  ______________________________________________________________________



  Then restart the inetd daemon by running the command:


  ______________________________________________________________________
      kill -HUP `cat /var/run/inetd.pid`
  ______________________________________________________________________



  To run the daemons from the system startup scripts, put the following
  script in file called /etc/rc.d/init.d/smb (for most distributions)
  and symbolically link it to the files specified in the comments:



  ______________________________________________________________________
      #!/bin/sh

      #
      # /etc/rc.d/init.d/smb - starts and stops SMB services.
      #
      # The following files should be synbolic links to this file:
      # symlinks: /etc/rc.d/rc1.d/K35smb  (Kills SMB services on shutdown)
      #           /etc/rc.d/rc3.d/S91smb  (Starts SMB services in multiuser mode)
      #           /etc/rc.d/rc6.d/K35smb  (Kills SMB services on reboot)
      #

      # Source function library.
      . /etc/rc.d/init.d/functions

      # Source networking configuration.
      . /etc/sysconfig/network

      # Check that networking is up.
      [ ${NETWORKING} = "no" ] && exit 0

      # See how we were called.
      case "$1" in
        start)
          echo -n "Starting SMB services: "
          daemon smbd -D
          daemon nmbd -D
          echo
          touch /var/lock/subsys/smb
          ;;
        stop)
          echo -n "Shutting down SMB services: "
          killproc smbd
          killproc nmbd
          rm -f /var/lock/subsys/smb
          echo ""
          ;;
        *)
          echo "Usage: smb {start|stop}"
          exit 1
      esac
  ______________________________________________________________________



  If when starting Samba you get an error that says something about the
  daemon failing to bind to port 139, then you probably have another
  Samba process already running that hasn't yet shut down.  Check a
  process list (with 'ps auxww | grep mbd') to determine if another
  Samba service is running.



  6.  General Configuration (/etc/smb.conf)

  Samba configuration on a Linux (or other UNIX machine) is controlled
  by a single file, /etc/smb.conf.  This file determines which system
  resources you want to share with the outside world and what
  restrictions you wish to place on them.

  Since the following sections will address sharing Linux drives and
  printers with Windows machines, the smb.conf file shown in this
  section is as simple as you can get, just for introductory purposes.


  Don't worry about the details, yet.  Later sections will introduce the
  major concepts.

  Each section of the file starts with a section header such as
  [global], [homes], [printers], etc.

  The [global] section defines a few variables that Samba will use to
  define sharing for all resources.

  The [homes] section allows a remote users to access their (and only
  their) home directory on the local (Linux) machine).  That is, users
  trying to connect to this share from Windows machines, will be
  connected to their personal home directories.  Note that to do this,
  they must have an account on the Linux box.

  The sample smb.conf file below allows remote users to get to their
  home directories on the local machine and to write to a temporary
  directory.  For a Windows user to see these shares, the Linux box has
  to be on the local network.  Then the user simply connects a network
  drive from the Windows File Manager or Windows Explorer.

  Note that in the following sections, additional entries for this file
  will be given to allow more resources to be shared.



       ______________________________________________________________________
       ; /etc/smb.conf
       ;
       ; Make sure and restart the server after making changes to this file, ex:
       ; /etc/rc.d/init.d/smb stop
       ; /etc/rc.d/init.d/smb start

       [global]
       ; Uncomment this if you want a guest account
       ; guest account = nobody
          log file = /var/log/samba-log.%m
          lock directory = /var/lock/samba
          share modes = yes

       [homes]
          comment = Home Directories
          browseable = no
          read only = no
          create mode = 0750

       [tmp]
          comment = Temporary file space
          path = /tmp
          read only = no
          public = yes
       ______________________________________________________________________



  Having written a new smb.conf, it is useful to test it to verify its
  correctness.  You can test the correctness of a smb.conf file , using
  the 'testparm' utility (man page: testparm); if testparm reports no
  problems, smbd will correctly load the configuration file.

  Here's a good trick:  If your Samba server has more than one ethernet
  interface, the smbd may bind to the wrong one.  If so, you can force
  it to bind to the intended one by adding a line that looks like this
  to the [global] section of /etc/smb.conf:

       ______________________________________________________________________
       interfaces = 192.168.1.1/24
       ______________________________________________________________________



  where you replace the IP address above with the one that is assigned
  to the correct ethernet interface.  The "24" is correct for a Class C
  network, but may have to be recalculated if you have subnetted the
  network.  The number relates to the netmask.  Numbers for other
  classes of networks are given in the IP-Masquerade mini-HOWTO.

  There is now a GUI configuration tool for Samba:  GtkSamba.  See
  http://www.open-systems.com/gtksamba.html <http://www.open-
  systems.com/gtksamba.html>.



  7.  Sharing A Linux Drive With Windows Machines

  As shown in the simple smb.conf above, sharing Linux drives with
  Windows users is easy.  However, like everything else with Samba, you
  can control things to a large degree.  Here are some examples:

  To share a directory with the public, create a clone of the [tmp]
  section above by adding something like this to smb.conf:



       ______________________________________________________________________
       [public]
          comment = Public Stuff
          path = /home/public
          public = yes
          writable = yes
          printable = no
       ______________________________________________________________________



  To make the above directory readable by the public, but only writable
  by people in group staff, modify the entry like this:



       ______________________________________________________________________
       [public]
          comment = Public Stuff
          path = /home/public
          public = yes
          writable = yes
          printable = no
          write list = @staff
       ______________________________________________________________________



  It used to be that easy; you would now be able to start Samba and
  browse the shares from a Windows PC.  However, Microsoft has recently
  made life slightly more difficult for those using Samba.  Windows 98,
  Windows NT (service pack 3 or higher) and later builds of Windows 95
  now use encrypted passwords by default.  Samba uses unencrypted
  passwords by default.  You can't browse servers when either the client
  or server is using encrypted passwords, because a connection cannot be
  made anonymously.

  You can tell if you have a password type mismatch between client and
  server if when you try to connect to a share you see a dialog box
  which reads something like "You are not authorized to access that
  account from this machine".

  You can either configure your Samba server to use encrypted passwords,
  or configure the Windows machines to use unencrypted passwords.

  To get Windows to work with encrypted SMB passwords:

  Windows 95/98 =============

  Using the registry editor (regedit), create the registry setting
  HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP Add a
  new DWORD value: Value Name:  EnablePlainTextPassword Data:
  0x01.

  Windows NT ==========

  Using the registry editor (regedit), create the registry setting
  HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rdr\Parameters
  Add a new DWORD value: Value Name:  EnablePlainTextPassword Data:
  0x01

  Windows 2000 ============

  Using the registry editor (regedit), create the registry setting
  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkStation\Parameters
  Add a new DWORD value: Value Name: EnablePlainTextPassword Data: 0x01

  Once these registry changes have been made, reboot the Windows machine
  and try to map a network drive on the Samba server again.  It should
  work as long as the Samba server is using plain text passwords.

  To configure Samba to use encrypted passwords:

  In the [global] section of /etc/smb.conf, add the following lines:



       ______________________________________________________________________
       encrypt passwords = yes
       smb passwd file = /etc/smbpasswd
       ______________________________________________________________________



  You are highly encouraged to read the files ENCRYPTION.txt, Win95.txt
  and WinNT.txt in the Samba documentation before doing this!

  If your clients and server are using encrypted passwords, you will not
  be able to browse the available shares on the server until an initial
  connection has been made with the appropriate authentication.  To get
  the initial connection, enter the share name manually in the Windows
  File Manager or Explorer dialog box, in the form
  '\\<hostname>\<sharename>'.  Log onto the server with a username and
  password that is valid on the server!

  If you suspect that your NetBIOS name service is not correctly
  configured (perhaps because you get 'host not found' errors when
  trying to connect), try using just the IP address of the server:
  '\\<host ip address>\<sharename>'.
  In order to get filenames to appear correctly, you may also need to
  set some options in the appropriate share section.  These work for
  Windows 95/98/NT clients, but may need to be modified if you have
  Windows 3.X clients:



       ______________________________________________________________________
           ; Mangle case = yes seems to give the correct filenames
           ; for Win95/98/NT.
           mangle case = yes

           ; If samba is case sensitive when looking for files
           case sensitive = no

           ; Default case of files that are created
           default case = lower

           ; Preserve case for all filenames
           preserve case = yes

           ; Preserve case for dos (8.3) filenames
           short preserve case = no
       ______________________________________________________________________



  For other tricks to play with drive shares, see the Samba
  documentation or man pages.



       ______________________________________________________________________
       interfaces = 192.168.1.1/24
       ______________________________________________________________________



  Note:  The bit after the / is a reference to the subnet mask.  "24" is
  the value to use for an unsegmented Class C network.  For more
  information on subnet calculations, you might want to see
  http://www.ralphb.net/IPSubnet/ <http://www.ralphb.net/IPSubnet/>.

  There is a lot more to Samba configuration than this, but this will
  get you started.  If you want to do something more advanced, I refer
  you to the Samba Web site mentioned above.



  8.  Accessing an SMB Share With Linux Machines

  Linux (UNIX) machines can also browse and mount SMB shares.  Note that
  this can be done whether the server is a Windows machine or a Samba
  server!

  An SMB client program for UNIX machines is included with the Samba
  distribution.  It provides an ftp-like interface on the command line.
  You can use this utility to transfer files between a Windows 'server'
  and a Linux client.

  Most Linux distributions also now include the useful smbfs package,
  which allows one to mount and umount SMB shares.  More on smbfs below.

  To see which shares are available on a given host, run:


  ______________________________________________________________________
      /usr/bin/smbclient -L host
  ______________________________________________________________________



  where 'host' is the name of the machine that you wish to view.  this
  will return a list of 'service' names - that is, names of drives or
  printers that it can share with you.  Unless the SMB server has no
  security configured, it will ask you for a password.  Get it the
  password for the 'guest' account or for your personal account on that
  machine.

  For example:


  ______________________________________________________________________
      smbclient -L zimmerman
  ______________________________________________________________________



  The output of this command should look something like this:



       ______________________________________________________________________
       Server time is Sat Aug 10 15:58:27 1996
       Timezone is UTC+10.0
       Password:
       Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]

       Server=[ZIMMERMAN] User=[] Workgroup=[WORKGROUP] Domain=[]

               Sharename      Type      Comment
               ---------      ----      -------
               ADMIN$         Disk      Remote Admin
               public         Disk      Public
               C$             Disk      Default share
               IPC$           IPC       Remote IPC
               OReilly        Printer   OReilly
               print$         Disk      Printer Drivers


       This machine has a browse list:

               Server               Comment
               ---------            -------
               HOPPER               Samba 1.9.15p8
               KERNIGAN             Samba 1.9.15p8
               LOVELACE             Samba 1.9.15p8
               RITCHIE              Samba 1.9.15p8
               ZIMMERMAN
       ______________________________________________________________________



  The browse list shows other SMB servers with resources to share on the
  network.

  To use the client, run:

  ______________________________________________________________________
      /usr/bin/smbclient service <password>
  ______________________________________________________________________



  where 'service' is a machine and share name.  For example, if you are
  trying to reach a directory that has been shared as 'public' on a
  machine called zimmerman, the service would be called
  \\zimmerman\public.  However, due to shell restrictions, you will need
  to escape the backslashes, so you end up with something like this:


  ______________________________________________________________________
      /usr/bin/smbclient \\\\zimmerman\\public mypasswd
  ______________________________________________________________________



  where 'mypasswd' is the literal string of your password.

  You will get the smbclient prompt:



       ______________________________________________________________________
       Server time is Sat Aug 10 15:58:44 1996
       Timezone is UTC+10.0
       Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]
       smb: \>
       ______________________________________________________________________



  Type 'h' to get help using smbclient:



       ______________________________________________________________________
       smb: \> h
       ls             dir            lcd            cd             pwd
       get            mget           put            mput           rename
       more           mask           del            rm             mkdir
       md             rmdir          rd             prompt         recurse
       translate      lowercase      print          printmode      queue
       cancel         stat           quit           q              exit
       newer          archive        tar            blocksize      tarmode
       setmode        help           ?              !
       smb: \>
       ______________________________________________________________________



  If you can use ftp, you shouldn't need the man pages for smbclient.

  Although you can use smbclient for testing, you will soon tire of it
  for real work.  For that you will probably want to use the smbfs
  package.  Smbfs comes with two simple utilties, smbmount and
  smbumount.  They work just like mount and umount for SMB shares.

  One important thing to note:  You must have smbfs support compiled
  into your kernel to use these utilities!


  The following shows a typical use of smbmount to mount an SMB share
  called "customers" from a machine called "samba1":



       ______________________________________________________________________
       [root@postel]# smbmount "\\\\samba1\\customers" -U rtg2t -c 'mount /customers -u 500 -g 100'
       Added interface ip=192.168.35.84 bcast=192.168.255.255 nmask=255.255.0.0
       Got a positive name query response from 192.168.168.158 ( 192.168.168.158 )
       Server time is Tue Oct  5 10:27:36 1999
       Timezone is UTC-4.0
       Password:
       Domain=[IPM] OS=[Unix] Server=[Samba 2.0.3]
       security=user
       ______________________________________________________________________



  Issuing a mount command will now show the share mounted, just as if it
  were an NFS export:



       ______________________________________________________________________
       [root@postel]# mount
       /dev/hda2 on / type ext2 (rw)
       none on /proc type proc (rw)
       none on /dev/pts type devpts (rw,mode=622)
       //SAMBA1/CUSTOMERS on /customers type smbfs (0)
       ______________________________________________________________________



  Please see the manual pages for smbmount and smbumount for details on
  the above operation.



  9.  Sharing A Linux Printer With Windows Machines

  To share a Linux printer with Windows machines, you need to make
  certain that your printer is set up to work under Linux.  If you can
  print from Linux, setting up an SMB share of the printer is stright
  forward.

  Note that Windows users must have an account on the Linux/Samba server
  in order to print.  Windows 95/98 will attempt to authenticate to the
  print server using the username and password used on login to the
  Windows box.This means that if you clicked 'Cancel' when logging onto
  Windows, you can't print (or connect to other SMB services)!  Windows
  NT allows one to explicitely provide a username and password when
  connecting to a printer.

  See the Printing HOWTO to set up local printing.

  Add printing configuration to your smb.conf:



  ______________________________________________________________________
  [global]
     printing = bsd
     printcap name = /etc/printcap
     load printers = yes
     log file = /var/log/samba-log.%m
     lock directory = /var/lock/samba

  [printers]
     comment = All Printers
     security = server
     path = /var/spool/lpd/lp
     browseable = no
     printable = yes
     public = yes
     writable = no
     create mode = 0700

  [ljet]
     security = server
     path = /var/spool/lpd/lp
     printer name = lp
     writable = yes
     public = yes
     printable = yes
     print command = lpr -r -h -P %p %s
  ______________________________________________________________________



  Make certain that the printer path (in this case under [ljet]) matches
  the spool directory in /etc/printcap!

  The lines:


  ______________________________________________________________________
     printcap name = /etc/printcap
     load printers = yes
  ______________________________________________________________________



  controls whether all the printers in /etc/printcap should be loaded by
  default.  If you do this, there is no reason to set up printers
  individually.  The section [printers] specifies options for the
  printers that you wish to explicitly difine.  If the printing
  subsystem you are using doesn't work this way (BSD), you need to set
  up a fake printcap file (or to use the 'print command' technique, see
  below).  For more information on the printcap system see the Printing
  HOWTO.

  A useful technique to test the network connection is to change the
  print command to:


  ______________________________________________________________________
     print command = cp %S /tmp/print.%P.%S
  ______________________________________________________________________



  The resulting file can then be analyzed.


  NOTE:  There are some problems sharing printers on UNIX boxes with
  Windows NT machines using Samba.  One problem is with NT seeing the
  shared printer properly.  To fix this, see the notes in the Samba
  distribution in the file docs/WinNT.txt.  The other deals with
  password problems.  See the comments in the same file for an annoying
  gain of understanding and failure to fix the problem.

  Oleg L. Machulskiy (machulsk@shade.msu.ru) suggests that a better
  print command to use in the above example would be:



       ______________________________________________________________________
       print command = smb2ps %s | lpr -r -h -P %p
       ______________________________________________________________________



  where 'smb2ps' is a script which transforms the spool file received
  from Windows into usual a usable Postscript file. It must cut off
  first 3 lines and last 2 lines, because these lines contain some PJL
  or PCL codes.

  That approach is only needed if your Windows machine is printing PCL
  and not real Postscript.  I have found that Windows 95/98/NT don't
  have a generic Postscript driver per se, but the "Digital turbo
  Printserver 20" driver acts as a good general Postscript driver for
  most setups.  I have also heard that the "Apple LaserWriter II NTX"
  driver works for this purpose.

  If you are creating a printer spool directory instead of using one
  created by a Linux distribution's installation utility, be careful of
  permissions!  Neil Fraser (neilf@necon.co.za) suggested setting the
  permissions of the spool directory (in his case, /var/spool/lpd/lpr)
  to 4755 (note the suid bit).  This worked for him when the owner of
  the directory was 'root' and the group was 'lp'.

  Jeff Stern (jstern@eclectic.ss.uci.edu) reported that he had to set
  the permissions on his spool directory to 777 in order for non-
  priviledged users to print, although he notes that he could have also
  added users to the 'lp' group.  This is a decision for local systems
  administrators;  if printing security is an issue, then lock it down.
  In home environments, you will probably want everyone to be able to
  print.

  Dr. Michael Langner (langner@fiz-chemie.de) points out that write
  permission problems on the /var/spool/lpd/ tree could be avoided by
  use something like "path = /tmp" and "print command = lpr -r -P%p %s"
  instead.

  Sometimes, a Postscript parsing error will occur with Postscript
  printing from Windows machines that causes an extra page to be printed
  at the end of every print job.  The last page will always have "%%[
  Lastpage ]%%" at the top of it.  This seems to happen with Windows 95
  and 98 only and is because the Postscript is malformed.

  One way to handle that is to use a script to remove that bit of bad
  Postscript from the spooled jobs.  Another way is to try to find a
  better Windows Postscript driver.  Probably the best way is to us
  LPRng instead of Postscript to print to a Samba server.

  Erik Ratcliffe (erik@caldera.com) Caldera tells me that using LPRng
  means that any printer driver can be used from Windows machines.  On
  the Samba server, they used an /etc/printcap entry that looked like
  this:
       ______________________________________________________________________
       raw:\
               :rw:sh:
               :lp=/dev/lp1
               :sd=/var/spool/lpd/raw
               :fx=flp
       ______________________________________________________________________



  LPRng doesn't require :\ at the end of every line.  A printer entry
  will still need to be made in /etc/smb.conf for the physical printer.
  The print command line needs to use the "raw" entry in /etc/printcap
  and data must be sent to the printer in binary form.  Try a print
  command line like this:



       ______________________________________________________________________
       print command = lpr -b -Praw %s
       ______________________________________________________________________



  You may also need to set the spooling on the Windows95 end to print
  directly to the printer instead of spooling.

  If you constantly get a extra page printing at the end of print jobs
  from Windows clients, try adding an "sf" directive in /etc/printcap.
  This will suppress form feeds separating jobs, but will not effect
  form feeds within documents.



  10.  Sharing A Windows Printer With Linux Machines

  To share a printer on a Windows machine, you must do the following:


  1. You must have the proper entries in /etc/printcap and they must
     correspond to the local directory structure (for the spool
     directory, etc).

  2. You must have the script /usr/bin/smbprint.  This comes with the
     Samba source, but not with all Samba binary distributions.  A
     slightly modifed copy is discussed below.

  3. If you want to convert ASCII files to Postscript, you must have
     nenscript, or its equivalent.  nenscript is a Postscript converter
     and is generally installed in /usr/bin.

  4. You may wish to make Samba printing easier by having an easy-to-use
     front end.  A simple perl script to handle ASCII, Postscript or
     created Postscript is given below.

  5. You could also use MagicFilter to do the above.  The details on
     setting up MagicFilter are given below the perl script.
     MagicFilter has advantages because it knows how to automatically
     convert a lot of file formats.

  The /etc/printcap entry below is for an HP 5MP printer on a Windows NT
  host.  The entries are as follows:


  ______________________________________________________________________
          cm - comment
          lp - device name to open for output
          sd - the printer's spool directory (on the local machine)
          af - the accounting file
          mx - the maximum file size (zero is unlimited)
          if - name of the input filter (script)
  ______________________________________________________________________



  For more information, see the Printing HOWTO or the man page for
  printcap.



       ______________________________________________________________________
       # /etc/printcap
       #
       # //zimmerman/oreilly via smbprint
       #
       lp:\
               :cm=HP 5MP Postscript OReilly on zimmerman:\
               :lp=/dev/lp1:\
               :sd=/var/spool/lpd/lp:\
               :af=/var/spool/lpd/lp/acct:\
               :mx#0:\
               :if=/usr/bin/smbprint:
       ______________________________________________________________________



  Make certain that the spool and accounting directories exist and are
  writable.  Ensure that the 'if' line holds the proper path to the
  smbprint script (given below) and make sure that the proper device is
  pointed to (the /dev special file).

  Next is the smbprint script itself.  It is usually placed in /usr/bin
  and is attributable to Andrew Tridgell, the person who created Samba
  as far as I know.  It comes with the Samba source distribution, but is
  absent from some binary distributions, so I have recreated it here.

  You may wish to look at this carefully.  There are some minor
  alterations that have shown themselves to be useful.



  ______________________________________________________________________
  #!/bin/sh -x

  # This script is an input filter for printcap printing on a unix machine. It
  # uses the smbclient program to print the file to the specified smb-based
  # server and service.
  # For example you could have a printcap entry like this
  #
  # smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
  #
  # which would create a unix printer called "smb" that will print via this
  # script. You will need to create the spool directory /usr/spool/smb with
  # appropriate permissions and ownerships for your system.

  # Set these to the server and service you wish to print to
  # In this example I have a WfWg PC called "lapland" that has a printer
  # exported called "printer" with no password.

  #
  # Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
  # so that the server, service, and password can be read from
  # a /usr/var/spool/lpd/PRINTNAME/.config file.
  #
  # In order for this to work the /etc/printcap entry must include an
  # accounting file (af=...):
  #
  #   cdcolour:\
  #       :cm=CD IBM Colorjet on 6th:\
  #       :sd=/var/spool/lpd/cdcolour:\
  #       :af=/var/spool/lpd/cdcolour/acct:\
  #       :if=/usr/local/etc/smbprint:\
  #       :mx=0:\
  #       :lp=/dev/null:
  #
  # The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
  #   server=PC_SERVER
  #   service=PR_SHARENAME
  #   password="password"
  #
  # E.g.
  #   server=PAULS_PC
  #   service=CJET_371
  #   password=""

  #
  # Debugging log file, change to /dev/null if you like.
  #
  logfile=/tmp/smb-print.log
  # logfile=/dev/null


  #
  # The last parameter to the filter is the accounting file name.
  #
  spool_dir=/var/spool/lpd/lp
  config_file=$spool_dir/.config

  # Should read the following variables set in the config file:
  #   server
  #   service
  #   password
  #   user
  eval `cat $config_file`

  #
  # Some debugging help, change the >> to > if you want to same space.
  #
  echo "server $server, service $service" >> $logfile

  (
  # NOTE You may wish to add the line `echo translate' if you want automatic
  # CR/LF translation when printing.
          echo translate
          echo "print -"
          cat
  ) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $user -N -P >> $logfile
  ______________________________________________________________________



  Most Linux distributions come with nenscript for converting ASCII
  documents to Postscript.  The following perl script makes life easier
  be providing a simple interface to Linux printing via smbprint.


  ______________________________________________________________________
  Usage: print [-a|c|p] <filename>
         -a prints <filename> as ASCII
         -c prints <filename> formatted as source code
         -p prints <filename> as Postscript
          If no switch is given, print attempts to
          guess the file type and print appropriately.
  ______________________________________________________________________



  Using smbprint to print ASCII files tends to truncate long lines.
  This script breaks long lines on whitespace (instead of in the middle
  of a word), if possible.

  The source code formatting is done with nenscript.  It takes an ASCII
  file and foramts it in 2 columns with a fancy header (date, filename,
  etc).  It also numbers the lines.  Using this as an example, other
  types of formatting can be accomplished.

  Postscript documents are already properly formatted, so they pass
  through directly.



  ______________________________________________________________________
  #!/usr/bin/perl

  # Script:   print
  # Authors:  Brad Marshall, David Wood
  #           Plugged In Communications
  # Date:     960808
  #
  # Script to print to a Postscript printer via Samba.
  # Purpose:  Takes files of various types as arguments and
  # processes them appropriately for piping to a Samba print script.
  #
  # Currently supported file types:
  #
  # ASCII      - ensures that lines longer than $line_length characters wrap on
  #              whitespace.
  # Postscript - Takes no action.
  # Code       - Formats in Postscript (using nenscript) to display
  #              properly (landscape, font, etc).
  #

  # Set the maximum allowable length for each line of ASCII text.
  $line_length = 76;

  # Set the path and name of the Samba print script
  $print_prog = "/usr/bin/smbprint";

  # Set the path and name to nenscript (the ASCII-->Postscript converter)
  $nenscript = "/usr/bin/nenscript";

  unless ( -f $print_prog ) {
          die "Can't find $print_prog!";
  }
  unless ( -f $nenscript ) {
          die "Can't find $nenscript!";
  }

  &ParseCmdLine(@ARGV);

  # DBG
  print "filetype is $filetype\n";

  if ($filetype eq "ASCII") {
          &wrap($line_length);
  } elsif ($filetype eq "code") {
          &codeformat;
  } elsif ($filetype eq "ps") {
          &createarray;
  } else {
          print "Sorry..no known file type.\n";
          exit 0;
  }
  # Pipe the array to smbprint
  open(PRINTER, "|$print_prog") || die "Can't open $print_prog: $!\n";
  foreach $line (@newlines) {
          print PRINTER $line;
  }
  # Send an extra linefeed in case a file has an incomplete last line.
  print PRINTER "\n";
  close(PRINTER);
  print "Completed\n";
  exit 0;

  # --------------------------------------------------- #
  #        Everything below here is a subroutine        #
  # --------------------------------------------------- #
  sub ParseCmdLine {
          # Parses the command line, finding out what file type the file is

          # Gets $arg and $file to be the arguments (if the exists)
          # and the filename
          if ($#_ < 0) {
                  &usage;
          }
          # DBG
  #       foreach $element (@_) {
  #               print "*$element* \n";
  #       }

          $arg = shift(@_);
          if ($arg =~ /\-./) {
                  $cmd = $arg;
          # DBG
  #       print "\$cmd found.\n";

                  $file = shift(@_);
          } else {
                  $file = $arg;
          }

          # Defining the file type
          unless ($cmd) {
                  # We have no arguments

                  if ($file =~ /\.ps$/) {
                          $filetype = "ps";
                  } elsif ($file =~ /\.java$|\.c$|\.h$|\.pl$|\.sh$|\.csh$|\.m4$|\.inc$|\.html$|\.htm$/) {
                          $filetype = "code";
                  } else {
                          $filetype = "ASCII";
                  }

                  # Process $file for what type is it and return $filetype
          } else {
                  # We have what type it is in $arg
                  if ($cmd =~ /^-p$/) {
                          $filetype = "ps";
                  } elsif ($cmd =~ /^-c$/) {
                          $filetype = "code";
                  } elsif ($cmd =~ /^-a$/) {
                          $filetype = "ASCII"
                  }
          }
  }

  sub usage {
          print "
  Usage: print [-a|c|p] <filename>
         -a prints <filename> as ASCII
         -c prints <filename> formatted as source code
         -p prints <filename> as Postscript
          If no switch is given, print attempts to
          guess the file type and print appropriately.\n
  ";
          exit(0);
  }

  sub wrap {
          # Create an array of file lines, where each line is < the
          # number of characters specified, and wrapped only on whitespace

          # Get the number of characters to limit the line to.
          $limit = pop(@_);

          # DBG
          #print "Entering subroutine wrap\n";
          #print "The line length limit is $limit\n";

          # Read in the file, parse and put into an array.
          open(FILE, "<$file") || die "Can't open $file: $!\n";
          while(<FILE>) {
                  $line = $_;

                  # DBG
                  #print "The line is:\n$line\n";

                  # Wrap the line if it is over the limit.
                  while ( length($line) > $limit ) {

                          # DBG
                          #print "Wrapping...";

                          # Get the first $limit +1 characters.
                          $part = substr($line,0,$limit +1);

                          # DBG
                          #print "The partial line is:\n$part\n";

                          # Check to see if the last character is a space.
                          $last_char = substr($part,-1, 1);
                          if ( " " eq $last_char ) {
                              # If it is, print the rest.

                              # DBG
                              #print "The last character was a space\n";

                              substr($line,0,$limit + 1) = "";
                              substr($part,-1,1) = "";
                              push(@newlines,"$part\n");
                          } else {
                               # If it is not, find the last space in the
                               # sub-line and print up to there.

                              # DBG
                              #print "The last character was not a space\n";

                               # Remove the character past $limit
                               substr($part,-1,1) = "";
                               # Reverse the line to make it easy to find
                               # the last space.
                               $revpart = reverse($part);
                               $index = index($revpart," ");
                               if ( $index > 0 ) {
                                 substr($line,0,$limit-$index) = "";
                                 push(@newlines,substr($part,0,$limit-$index)
                                     . "\n");
                               } else {
                                 # There was no space in the line, so
                                 # print it up to $limit.
                                 substr($line,0,$limit) = "";
                                 push(@newlines,substr($part,0,$limit)
                                     . "\n");
                               }
                          }
                  }
                  push(@newlines,$line);
          }
          close(FILE);
  }

  sub codeformat {
          # Call subroutine wrap then filter through nenscript
          &wrap($line_length);

          # Pipe the results through nenscript to create a Postscript
          # file that adheres to some decent format for printing
          # source code (landscape, Courier font, line numbers).
          # Print this to a temporary file first.
          $tmpfile = "/tmp/nenscript$$";
          open(FILE, "|$nenscript -2G -i$file -N -p$tmpfile -r") ||
                  die "Can't open nenscript: $!\n";
          foreach $line (@newlines) {
                  print FILE $line;
          }
          close(FILE);

          # Read the temporary file back into an array so it can be
          # passed to the Samba print script.
          @newlines = ("");
          open(FILE, "<$tmpfile") || die "Can't open $file: $!\n";
          while(<FILE>) {
                  push(@newlines,$_);
          }
          close(FILE);
          system("rm $tmpfile");
  }

  sub createarray {
          # Create the array for postscript
          open(FILE, "<$file") || die "Can't open $file: $!\n";
          while(<FILE>) {
                  push(@newlines,$_);
          }
          close(FILE);
  }
  ______________________________________________________________________



  Now the MagicFilter way.  Thanks to Alberto Menegazzi
  (flash.egon@iol.it) for this information.

  Alberto says:

  -------------------------------------------------------------- 1)
  Install MagicFilter with the filter for the printers you need in
  /usr/bin/local but DON'T fill /etc/printcap with the suggestion given
  by the documentation from MagicFilter.

  2) Write the /etc/printcap like this way (it's done for my LaserJet
  4L):

  lp|ljet4l:\ :cm=HP LaserJet 4L:\ :lp=/dev/null:\
  # or /dev/lp1 :sd=/var/spool/lpd/ljet4l:\
  :af=/var/spool/lpd/ljet4l/acct:\ :sh:mx#0:\ :if=/usr/local/bin/main-
  filter:

  You should explain that the lp=/dev/... is opened for locking so
  "virtual" devices one for every remote printer should be used.

  Example creating with : touch /dev/ljet4l


  3) Write the filter /usr/local/bin/main-filter the same you suggest
  using the ljet4l-filter instead of cat.

  Here's mine.

  #! /bin/sh logfile=/var/log/smb-print.log
  spool_dir=/var/spool/lpd/ljet4l ( echo "print -"
  /usr/local/bin/ljet4l-filter ) | /usr/bin/smbclient "\\\\SHIR\\HPLJ4"
  -N -P >> $logfile

  P.S. : here is the quote from the Print2Win mini-Howto about locking
  and why creating virtual printers

  ---Starts here

  Hint from Rick Bressler :

  Good tip sheet.  I use something very similar.  One helpful tip, this
  is not a particularly good idea:

  :lp=/dev/null:\

  lpr does an 'exclusive' open on the file you specify as lp=.  It does
  this in order to prevent multiple processes from trying to print to
  the dame printer at the same time.

  The side effect of this is that in your case, eng and colour can't
  print at the same time, (usually more or less transparent since they
  probably print quickly and since they queue you probably don't notice)
  but any other process that tries to write to /dev/null will break!

  On a single user system, probably not a big problem.  I have a system
  with over 50 printers.  It would be a problem there.

  The solution is to create a dummy printer for each.  Eg: touch
  /dev/eng.

  I have modified the lp entries in the printcap file above to take into
  account Rick's suggestion. I did the following:


  #touch /dev/eng #touch /dev/colour

  ---Ends here

  --------------------------------------------------------------



  11.  Backing Up Windows Machines to a Linux Host

  Adam Neat (adamneat@ipax.com.au) kindly contributed the following
  script to back up Windows machines to a Linux host, using the
  smbclient utility.  Adam says that it is used to backup Windows 3.x
  and NT machines to a Linux based DAT SCSI Drive.

  Adam is not proud of the coding style used here, but it works.  As I
  like to say, "If it works and its stupid, then it is not stupid".

  Another Windows backup script, contributed by Dan Tager
  (dtager@marsala.com), is provided below.  Dan's script also backs up
  Unix machines via rsh, although that could be modified to use ssh
  rather easily.

  In this script, the string 'agnea1' is the username on the Linux
  machine that does the backups.
       ______________________________________________________________________
       #!/bin/bash

       clear
       echo Initialising ...
       checkdate=`date | awk '{print $1}'`

       if [ -f "~agnea1/backup-dir/backup-data" ]; then

               echo "ERROR: No config file for today!"
               echo "FATAL!"
               exit 1
       fi

       if [ -d "~agnea1/backup-dir/temp" ]; then

               echo "ERROR: No tempoary directory found!"
               echo
               echo "Attempting to create"
               cd ~agnea1
               cd backup-dir
               mkdir temp
               echo "Directory Made - temp"
       fi

       if [ "$1" = "" ]; then

               echo "ERROR: enter in a machine name (ie: cdwriter)"
               exit 1
       fi

       if [ "$2" = "" ]; then

               echo "ERROR: enter in a SMB (Lan Manager) Resource (ie: work)"
               exit 1
       fi

       if [ "$3" = "" ]; then

               echo "ERROR: enter in an IP address for $1 (ie:
               130.xxx.xxx.52)" exit 1
       fi


       #############################################################################
       # Main Section
       #
       #############################################################################

       cd ~agnea1/backup-dir/temp
       rm -r ~agnea1/backup-dir/temp/*
       cd ~agnea1/backup-dir/

       case "$checkdate"
       in
               Mon)
                       echo "Backuping for Monday"
                       cat backup-data | /usr/local/samba/bin/smbclient
                       \\\\$1\\$2 -I$3 -N echo "Complete"

                               if [ -d "~agnea1/backup-dir/Monday" ]; then
                                       echo "Directory Monday Not found ...
                                       making" mkdir
                                       ~agnea1/backup-dir/Monday
                               fi

                  echo "Archiving ..."
                  cd ~agnea1/backup-dir/temp
                  tar -cf monday.tar *                echo "done ..."
                  rm ~agnea1/backup-dir/Monday/monday.tar
                  mv monday.tar ~agnea1/backup-dir/Monday
                  ;;


          Tue)
                  echo "Backuping for Tuesday"
                  cat backup-data | /usr/local/samba/bin/smbclient
                  \\\\$1\\$2 -I$3 -N echo "Complete"

                          if [ -d "~agnea1/backup-dir/Tuesday" ]; then
                                  echo "Directory Tuesday Not found ...
                                  making" mkdir
                                  ~agnea1/backup-dir/Tuesday
                          fi
                  echo "Archiving ..."
                  cd ~agnea1/backup-dir/temp
                  tar -cf tuesday.tar *
                  echo "done ..."
                  rm ~agnea1/backup-dir/Tuesday/tuesday.tar
                  mv tuesday.tar ~agnea1/backup-dir/Tuesday
                  ;;

          Wed)
                  echo "Backuping for Wednesday"
                  cat backup-data | /usr/local/samba/bin/smbclient
                  \\\\$1\\$2 -I$3 -N echo "Complete"

                          if [ -d "~agnea1/backup-dir/Wednesday" ]; then
                                  echo "Directory Wednesday Not found
                                  ... making" mkdir
                                  ~agnea1/backup-dir/Wednesday
                          fi
                  echo "Archiving ..."
                  cd ~agnea1/backup-dir/temp
                  tar -cf wednesday.tar *
                  echo "done ..."
               rm ~agnea1/backup-dir/Wednesday/wednesday.tar
                  mv wednesday.tar ~agnea1/backup-dir/Wednesday
                  ;;

          Thu)
                  echo "Backuping for Thrusday"
                  cat backup-data | /usr/local/samba/bin/smbclient
                  \\\\$1\\$2 -I$3 -N echo "Complete"

                          if [ -d "~agnea1/backup-dir/Thursday" ]; then
                                  echo "Directory Thrusday Not found ...
                                  making" mkdir
                                  ~agnea1/backup-dir/Thursday
                          fi
                  echo "Archiving ..."
                  cd ~agnea1/backup-dir/temp
                  tar -cf thursday.tar *
                  echo "done ..."
                  rm ~agnea1/backup-dir/Thursday/thursday.tar
                  mv thursday.tar ~agnea1/backup-dir/Thursday
                  ;;


          Fri)
                  echo "Backuping for Friday"
                  cat backup-data | /usr/local/samba/bin/smbclient
                  \\\\$1\\$2 -I$3 -N echo "Complete"

                          if [ -d "~agnea1/backup-dir/Friday" ]; then
                                  echo "Directory Friday Not found ...
                                  making" mkdir
                                  ~agnea1/backup-dir/Friday
                          fi
                  echo "Archiving ..."
                  cd ~agnea1/backup-dir/temp
                  tar -cf friday.tar *
                  echo "done ..."
                  rm ~agnea1/backup-dir/Friday/friday.tar
                  mv friday.tar ~agnea1/backup-dir/Friday
                  ;;

          *)
                  echo "FATAL ERROR: Unknown variable passed for day"
                  exit 1;;

  esac
  ###########
  ______________________________________________________________________



  Here's Dan's backup script:



  ______________________________________________________________________
  #!/bin/bash

  BACKDIR=3D/backup
  WINCMD=3D/usr/bin/smbclient

  function CopyWinHost(){

  # tars and gzips "windows shares" to a local directory using samba's
  # smbclient
  # argument 1 is the remote host window's host name
  # argument 2 is the share name to be backed up

     echo $1,$2,$3
     REMOTE=3D$1
     SHARE=3D$2
     DEST=3D$3

   # create a tarred gzip file using samba to copy direct from a
   # windows pc
   # 12345 is a password.  Needs some password even if not defined on
   # remote system
     $WINCMD \\\\$REMOTE\\$SHARE 12345 -Tc -|gzip > $DEST
     echo `date`": Done backing up "$REMOTE" to "$DEST
     echo
  }

  function CopyUnixHost(){

  # tars and gzips a directory using rsh
  # argument 1 is the name of the remote source host
  # argument 2 is the full path to the remote source directory
  # argument 3 is the name of the local tar-gzip file.  day of week
  #  plus .tgz will be appended to argument 3

     REMOTE=3D$1
     SRC=3D$2
     DEST=3D$3


     if rsh $REMOTE tar -cf - $SRC |gzip > $DEST; then
        echo `date`": Done backing up "$REMOTE":"$SRC" to "$DEST
     else
       echo `date`": Error backing up "$REMOTE":"$SRC" to "$DEST
     fi

  }

  # $1: win=3Dbackup windows machine, unix=3Dbackup unix machine
  case $1 in
     win)
        # $2=3D remote windows name, $3=3Dremote share name,
        # $4=3Dlocal destination directory
        CopyWinHost $2 $3 $4;;
     unix)
        # $2 =3D remote host, $3 =3D remote directory,
        # $4 =3D destination name
        CopyUnixHost $2 $3 $4;;
  esac
  ______________________________________________________________________



  12.  Using Samba Across Routed Networks

  Andrew Tridgell states that SMB host browsing across routers is
  problematic.  Here are his suggestions to allow this:

  -------------------------------------------------------------- For
  cross-subnet (ie. routed) browsing you should do the following. There
  are other methods but they are much more complex are error prone:

  1) all computers that you want visible should use a single WINS server
  (Samba or NT can do this)

  2) the master browser for each subnet must be either NT or Samba.
  (Win9X doesn't communicate cross-subnet browse info correctly)

  3) You should use the same workgroup name on all subnets. This is not
  strictly necessary but it is the simplest way to guarantee success. If
  you can't arrange this then you must organise for a way for browse
  info to propogate between subnets. (It does *not* propogate via WINS).
  It propogates via two mechanisms: i) each browse master notices
  workgroup announcements from other browse masters on the same
  broadcast domain ii) each non-Win9X browse master contacts the global
  DMB for the workgroup (typically the domain controller or a Samba box
  marked as the domain master) and swaps full browse info periodically.
  --------------------------------------------------------------

  Also, Rakesh Bharania points out that Cisco routers can be configured
  to forward SMB traffic in a way that allows browsing.  His suggestion
  is to configure the router interface which hosts SMB clients with a
  command like this:



       ______________________________________________________________________
       ip helper-address x.x.x.x
       ______________________________________________________________________



  where x.x.x.x is the IP address of the SMB server.



  13.  Acknowledgements

  Special thanks to Andrew Tridgell (tridge@linuxcare.com) for starting
  and directing the Samba project and for keeping this document honest.

  Brad Marshall (bmarshall@plugged.net.au) and Jason Parker
  (jparker@plugged.net.au) contributed time, patience, scripting and
  research.

  Adam Neat (adamneat@ipax.com.au) and Dan Tager (dtager@marsala.com)
  contributed the bash scripts used to back up Windows machines to a
  Linux host.

  Matthew Flint () told me about the use of the 'interfaces' option in
  smb.conf.

  Oleg L. Machulskiy (machulsk@shade.msu.ru), Jeff Stern
  (jstern@eclectic.ss.uci.edu), Dr. Michael Langner (langner@fiz-
  chemie.de and Erik Ratcliffe (erik@caldera.com) suggested
  modifications to the section on Sharing A Linux Printer With Windows
  Machines.

  Alberto Menegazzi (flash.egon@iol.it) contributed the MagicFilter
  setup to enable a Linux machine to share a Windows printer.

  Rakesh Bharania (rbharani@cisco.com) contributed the suggestion for
  Cisco router configuration.

  Rich Gregory (rtg2t@virginia.edu) and others suggested that this
  document show some details about the smbfs package and its use.

  Andrea Girotto (icarus@inca.dei.unipd.it) contributed a number of
  valuable suggestions throughout the document.

  Thanks, also, to all of the international translators that have
  brought this HOWTO to the non-English speaking world: Takeo Nakano
  (nakano@apm.seikei.ac.jp), Klaus-Dieter Schumacher (Klaus-
  Dieter.Schumacher@fernuni-hagen.de), Andrea Girotto
  (icarus@inca.dei.unipd.it), Mathieu Arnold (arn_mat@club-internet.fr),
  Stein Oddvar Rasmussen (Stein@kongsberg-energi.no) Nilo Menezes
  (nmenezes@n3.com.br) and many others for whom I don't have contact
  details.



  Linux SMP HOWTO
  David Mentr, David.Mentre@irisa.fr
  v1.9, 13 January 2000

  This HOWTO reviews main issues (and I hope solutions) related to SMP
  configuration under Linux.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

  2. Questions related to any architectures

     2.1 Kernel Side
     2.2 User Side
     2.3 SMP Programming
        2.3.1 Parallelization methods
        2.3.2 The C Library
        2.3.3 Languages, Compilers and debuggers
        2.3.4 Other libraries
        2.3.5 Other points about SMP Programming

  3. x86 architecture specific questions

     3.1 Why it doesn't work on my machine?
     3.2 Possible causes of crash
     3.3 Motherboard specific information
        3.3.1 Motherboards with known problems
     3.4 Low cost SMP Linux box (dual Celeron box)
        3.4.1 Is it possible to run a dual Intel Celeron box ?
        3.4.2 How does Linux behave on a dual Celeron system ?
        3.4.3 Celeron processors are known to be easily overclockable. And dual Celeron system ?
        3.4.4 And making a quad Celeron system ?
        3.4.5 What about mixing Celeron and Pentium II processor ?

  4. Sparc architecture specific questions

     4.1 Which Sparc machines are supported ?
     4.2 Specific problem related to Sparc SMP support
     4.3 SMP specific limit with current kernel (2.2)

  5. PowerPC architecture specific questions

     5.1 Which PPC machines are supported ?
     5.2 Specific problem related to PPC SMP support

  6. Alpha architecture specific questions

     6.1 Which Alpha machines are supported ?
     6.2 Specific problem related to Alpha SMP support

  7. Useful pointers

     7.1 Various
     7.2 Multithreaded programs and library
     7.3 SMP specific patches
     7.4 Parallelizing/Optimizing Compilers for 586/686 machines (

  8. Glossary

  9. What's new ?

  10. List of contributors



  ______________________________________________________________________

  1.  Introduction

  Linux works on SMP (Symmetric Multi-Processors) machines. SMP support
  was introduced with kernel version 2.0, and has improved steadily ever
  since.  The kernel locking granularity is much finer in 2.2.x than in
  2.0.x, which enables better performance when processes are accessing
  the kernel!
  HOWTO maintained by David Mentr (David.Mentre@irisa.fr). The latest
  edition of this HOWTO can be found at

  o  http://www.irisa.fr/prive/mentre/smp-howto/ (France)

  o  http://www.phy.duke.edu/brahma/smp-faq/ (USA)


  If you want to contribute to this HOWTO, I would prefer a diff against
  the SGML version <http://www.irisa.fr/prive/mentre/smp-howto/smp-
  howto.sgml> of this document, but any remarks (in plain text) will be
  greatly appreciated. If you send me an email about this HOWTO, please
  include a tag like [Linux SMP HOWTO] in the Subject: field of your e-
  mail. It helps me to automatically sort mails (and you will have a
  faster reply ;)).


  This HOWTO is an improvement of a first draft
  <http://www.ihoc.net/linux-smp-faq-draft.html> made by Chris Pirih.


  All information contained in this HOWTO is provided "as is." All
  warranties, expressed, implied or statutory, concerning the accuracy
  of the information of the suitability for any particular use are
  hereby specifically disclaimed. While every effort has been taken to
  ensure the accuracy of the information contained in this HOWTO, the
  authors assume no responsibility for errors or omissions, or for
  damages resulting from the use of the information contained herein.


  2.  Questions related to any architectures


  2.1.  Kernel Side



  1. Does Linux support multi-threading?  If I start two or more
     processes, will they be distributed among the available CPUs?

     Yes. Processes and kernel-threads are distributed among processors.
     User-space threads are not.


  2. What kind of architectures are supported in SMP?


     From Alan Cox:
        SMP is supported in 2.0 on the hypersparc (SS20, etc.) systems
        and Intel 486, Pentium or higher machines which are Intel
        MP1.1/1.4 compliant. Richard Jelinek adds: right now, systems
        have been tested up to 4 CPUs and the MP standard (and so Linux)
        theoretically allows up to 16 CPUs.

        SMP support for UltraSparc, SparcServer, Alpha and PowerPC
        machines is in available in 2.2.x.


     From Ralf Bchle:
        MIPS, m68k and ARM does not support SMP; the latter two probly
        won't ever.

        That is, I'm going to hack on MIPS-SMP as soon as I get a SMP
        box ...

  3. How do I make a Linux SMP kernel?

     Most Linux distributions don't provide a ready-made SMP-aware
     kernel, which means that you'll have to make one yourself. If you
     haven't made your own kernel yet, this is a great reason to learn
     how.  Explaining how to make a new kernel is beyond the scope of
     this document; refer to the Linux Kernel Howto for more
     information. (C. Polisher)

     In kernel series 2.0 up to but not including 2.1.132, uncomment the
     SMP=1 line in the main Makefile (/usr/src/linux/Makefile).

     In the 2.2 version, configure the kernel and answer "yes" to the
     question "Symmetric multi-processing support" (Michael Elizabeth
     Chastain).

     AND

     enable real time clock support by configuring the "RTC support"
     item (from Robert G.  Brown). Note that inserting RTC support
     actually doesn't afaik prevent the known problem with SMP clock
     drift, but enabling this feature prevents lockup when the clock is
     read at boot time. A note from Richard Jelinek says also that
     activating the Enhanced RTC is necessary to get the second CPU
     working (identified) on some original Intel Mainboards.

     AND

     (x86 kernel) do NOT enable APM (advanced power management)! APM and
     SMP are not compatible, and your system will almost certainly (or
     at least probably ;)) crash while booting if APM is enabled (Jakob
     Oestergaard). Alan Cox confirms this : 2.1.x turns APM off for SMP
     boxes.  Basically APM is undefined in the presence of SMP systems,
     and anything could occur.

     AND

     (x86 kernel) enable "MTRR (Memory Type Range Register) support".
     Some BIOS are buggy as they do not activate cache memory for the
     second processor. The MTRR support contains code that solves such
     processor misconfiguration.



     You must rebuild all your kernel and kernel modules when changing
     to and from SMP mode. Remember to make modules and make
     modules_install (from Alan Cox).


     If you get module load errors, you probably did not rebuild and/or
     re-install your modules.  Also with some 2.2.x kernels people have
     reported problems when changing the compile from SMP back to UP
     (uni-processor).  To fix this, save your .config file, do make
     mrproper, restore your .config file, then remake your kernel (make
     dep, etc.)  (Wade Hampton). Do not forget to run lilo after copying
     your new kernel.

     Recap:



     ___________________________________________________________________
     make config # or menuconfig or xconfig
     make dep
     make clean
     make bzImage # or whatever you want
     # copy the kernel image manually then RUN LILO
     # or make lilo
     make modules
     make modules_install
     ___________________________________________________________________



  4. How do I make a Linux non-SMP kernel?

     In the 2.0 series, comment the SMP=1 line in the main Makefile
     (/usr/src/linux/Makefile).

     In the 2.2 series, configure the kernel and answer "no" to the
     question "Symmetric multi-processing support" (Michael Elizabeth
     Chastain).



     You must rebuild all your kernel and kernel modules when changing
     to and from SMP mode. Remember to make modules and make
     modules_install and remember to run lilo.  See notes above about
     possible configuration problems.



  5. How can I tell if it worked?


      cat /proc/cpuinfo



  Typical output (dual PentiumII):

  ______________________________________________________________________
  processor       : 0
  cpu             : 686
  model           : 3
  vendor_id       : GenuineIntel
  [...]
  bogomips        : 267.06

  processor       : 1
  cpu             : 686
  model           : 3
  vendor_id       : GenuineIntel
  [...]
  bogomips        : 267.06
  ______________________________________________________________________



  6. What is the status of converting the kernel toward finer grained
     locking and multithreading?

     Linux kernel version 2.2 has signal handling, interrupts and some
     I/O stuff fine grain locked.  The rest is gradually migrating. All
     the scheduling is SMP safe.


     Kernel version 2.3 (next 2.4) has really fine grained locking. In
     the 2.3 kernels the usage of the big kernel lock has basically
     disappeared, all major Linux kernel subsystems are fully threaded:
     networking, VFS, VM, IO, block/page caches, scheduling, interrupts,
     signals, etc. (Ingo Molnar)


  7. Does Linux SMP support processor affinity?



     Standard kernel
        No and Yes.  There is no way to force a process onto specific
        CPU's but the linux scheduler has a processor bias for each
        process, which tends to keep processes tied to a specific CPU.


     Patch
        Yes. Look at PSET - Processor Sets for the Linux kernel
        <http://isunix.it.ilstu.edu/~thockin/pset/>:

          The goal of this project is to make a source compatible
          and functionally equivalent version of pset (as defined
          by SGI - partially removed from their IRIX 6.4 kernel)
          for Linux.  This enables users to determine which proces-
          sor or set of processors a process may run on.  Possible
          uses include forcing threads to separate processors, tim-
          ings, security (a `root' only CPU?) and probably more.


     It is focused around the syscall sysmp().  This function takes a
     number of parameters that determine which function is requested.
     Functions include:

     o  binding a process/thread to a specific CPU

     o  restricting a CPU's ability to execute some processes

     o  restricting a CPU from running at all

     o  forcing a cpu to run _only_ one process (and its children)

     o  getting information about a CPU's state

     o  creating/destroying sets of processors, to which processes may
        be bound



  8. Where should one report SMP bugs to?

     Please report bugs to linux-smp@vger.rutgers.edu.


  9. What about SMP performance?

     If you want to gauge the performance of your SMP system, you can
     run some tests made by Cameron MacKinnon and available at
     http://www.phy.duke.edu/brahma/benchmarks.smp.


  2.2.  User Side


  1. Do I really need SMP?

     If you have to ask, you probably don't. :) Generally, multi-
     processor systems can provide better performance than uni-processor
     systems, but to realize any gains you need to consider many other
     factors besides the number of CPU's.  For instance, on a given
     system, if the processor is generally idle much of the time due to
     a slow disk drive, then this system is "input/output bound", and
     probably won't benefit from additional processing power. If, on the
     other hand, a system has many simultaneously executing processes,
     and CPU utilization is very high, then you are likely to realize
     increased system performance.  SCSI disk drives can be very
     effective when used with multiple processors, due to the way they
     can process multiple commands without tying up the CPU. (C.
     Polisher)


  2. Do I get the same performance from 2-300 MHz processors as from one
     600 MHz processor?

     This depends on the application, but most likely not.  SMP adds
     some overhead that a faster uniprocessor box would not incur (Wade
     Hampton).  :)


  3. How does one display mutiple cpu performance?

     Thanks to Samuel S. Chessman, here are some useful utilities:

     Character based:
        http://www.cs.inf.ethz.ch/~rauch/procps.html

        Basically, it's procps v1.12.2 (top, ps, et. al.)  and some
        patches to support SMP.

        For 2.2.x, Gregory R. Warnes as made a patch available at
        http://queenbee.fhcrc.org/~warnes/procps


     Graphic:
        xosview-1.5.1 supports SMP. And kernels above 2.1.85 (included)
        the cpuX entry in /proc/stat file.

        The official homepage for xosview is:
        http://lore.ece.utexas.edu/~bgrayson/xosview.html

        You'll find a version patched for 2.2.x kernels by Kumsup Lee :
        http://www.ima.umn.edu/~klee/linux/xosview-1.6.1-5a1.tgz

        The various Forissier's kernel patches are at: http://www-
        isia.cma.fr/~forissie/smp_kernel_patch/

     By the way, you can't monitor processor scheduling precisely with
     xosview, as xosview itself causes a scheduling perturbation. (H.
     Peter Anvin)


  4. How can I enable more than 1 process for my kernel compile?

     use:



     ___________________________________________________________________
             # make [modules|zImage|bzImages] MAKE="make -jX"
             where X=max number of processes.
             WARNING: This won't work for "make dep".
     ___________________________________________________________________



  With a 2.2 like kernel, see also the file
  /usr/src/linux/Documentation/smp.txt for specific instruction.

  BTW, since running multiple compilers allows a machine with sufficient
  memory to use use the otherwise wasted CPU time during I/O caused
  delays, make MAKE="make -j 2" -j 2 actually helps even on uniprocessor
  boxes (from Ralf Bchle).


  5. Why is the time given by the time command inaccurate?  (from Joel
     Marchand)

     In the 2.0 series, the result given by the time command is false.
     The sum user+system is right *but* the spreading between user and
     system time is false.

     More precisely: "The explanation is, that all time spent in
     processors other than the boot cpu is accounted as system time.  If
     you time a program, add the user time and the system time, then you
     timing will be almost right, except for also including the system
     time that is correctly accounted for" (Jakob stergaard).

     This bug is corrected in 2.2 kernels.



  2.3.  SMP Programming

  Section by Jakob stergaard.

  This section is intended to outline what works, and what doesn't when
  it comes to programming multi-threaded software for SMP Linux.


  2.3.1.  Parallelization methods


  1. POSIX Threads

  2. PVM / MPI Message Passing Libraries

  3. fork() -- Multiple processes

  Since both fork() and PVM/MPI processes usually do not share memory,
  but either communicate by means of IPC or a messaging API, they will
  not be described further in this section. They are not very specific
  to SMP, since they are used just as much - or more - on uniprocessor
  computers, and clusters thereof.


  Only POSIX Threads provide us with multiple threads sharing ressources
  like - especially - memory. This is the thing that makes a SMP machine
  special, allowing many processors to share their memory. To use both
  (or more ;) processors of an SMP, use a kernel-thread library. A good
  library is the LinuxThreads, a pthread library made by Xavier Leroy
  <http://pauillac.inria.fr/~xleroy/linuxthreads/> which is now
  integrated with glibc2 (aka libc6).  Newer Linux distributions include
  this library by default, hence you do not have to obtain a separate
  package to use kernel threads.

  There are implementations of threads (and POSIX threads) that are
  application-level, and do not take advantage of the kernel-threading.
  These thread packages keep the threading in a single process, hence do
  not take advantage of SMP.  However, they are good for many
  applications and tend to actually run faster than kernel-threads on
  single processor systems.

  Multi-threading has never been really popular in the UN*X world
  though. For some reason, applications requiring multiple processes or
  threads, have mostly been written using fork(). Therefore, when using
  the thread approach, one runs into problems of incompatible (not
  thread-ready) libraries, compilers, and debuggers.  GNU/Linux is no
  exception to this. Hopefully the next few sections will sched a little
  light over what is currently possible, and what is not.



  2.3.2.  The C Library

  Older C libraries are not thread-safe. It is very important that you
  use GNU LibC (glibc), also known as libc6. Earlier versions are, of
  course possible to use, but it will cause you much more trouble than
  upgrading your system will, well probably :)

  If you want to use GDB to debug your programs, see below.


  2.3.3.  Languages, Compilers and debuggers

  There is a wealth of programming languages available for GNU/Linux,
  and many of them can be made to use threads one way or the other (some
  languages like Ada and Java even have threads as primitives in the
  language).

  This section will, however, currently only describe C and C++. If you
  have experience in SMP Programming with other languages, please
  enlighten us.

  GNU C and C++, as well as the EGCS C and C++ compilers work with the
  thread support from the standard C library (glibc). There are however
  a few issues:


  1. When compiling C or C++, use the -D_REENTRANT define in the
     compiler command line. This is necessary to make certain error-
     handling functions work like the errno variable.

  2. When using C++, If two threads throw exceptions concurrently, the
     program will segfault.  The compiler does not generate thread-safe
     exception code.

     The workaround is to put a
     pthread_mutex_lock(&global_exception_lock) in the constructor(s) of
     every class you throw(), and to put the corresponding
     pthread_mutex_unlock(...) in the destructor.  It's ugly, but it
     works.  This solution was given by Markus Ferch.

  The GNU Debugger GDB as of version 4.18, should handle threads
  correctly. Most Linux distribution offer a patched, thread-aware gdb.


  It is not necessary to patch glibc in any way just to make it work
  with threads. If you do not need to debug the software (this could be
  true for all machines that are not development workstations), there is
  no need to patch glibc.

  Note that core-dumps are of no use when using multiple threads.
  Somehow, the core dump is attached to one of the currently running
  threads, and not to the program as a whole. Therefore, whenever you
  are debugging anything, run it from the debugger.

  Hint: If you have a thread running haywire, like eating 100% CPU time,
  and you cannot seem to figure out why, here is a nice way to find out
  what's going on: Run the program straight from the shell, no GDB. Make
  the thread go haywire. Use top to get the PID of the process.  Run GDB
  like gdb program pid. This will make GDB attach itself to the process
  with the PID you specified, and stop the thead. Now you have a GDB
  session with the offending thread, and can use bt and the like to see
  what is happening.


  2.3.4.  Other libraries

  ElectricFence: This library is not thread safe. It should be possible,
  however, to make it work in SMP environments by inserting mutex locks
  in the ElectricFence code.



  2.3.5.  Other points about SMP Programming


  1. Where can I found more information about parallel programming?

     Look at the Linux Parallel Processing HOWTO
     <http://yara.ecn.purdue.edu/~pplinux/PPHOWTO/pphowto.html>

     Lots of useful information can be found at Parallel Processing
     using Linux <http://yara.ecn.purdue.edu/~pplinux/>

     Look also at the Linux Threads FAQ <http://linas.org/linux/threads-
     faq.html>


  2. Are there any threaded programs or libraries?

     Yes. For programs, you should look at: Multithreaded programs on
     linux <http://www.informatik.uni-bremen.de/~hollow/mthread.html> (I
     love hyperlinks, did you know that ? ;))

     As far as library are concerned, there are:


     OpenGL Mesa library
        Thanks to David Buccarelli, Andreas Schiffler and Emil Briggs,
        it exists in a multithreaded version (right now [1998-05-11],
        there is a working version that provides speedups of 5-30% on
        some OpenGL benchmarks). The multithreaded stuff is now included
        in the regular Mesa distribution as an experimental option.  For
        more information, look at the Mesa library
        <http://www.ssec.wisc.edu/~brianp/Mesa.html>


     BLAS
        Pentium Pro Optimized BLAS and FFTs for Intel Linux
        <http://www.cs.utk.edu/~ghenry/distrib/>

        Multithreaded BLAS routines are not available right now, but a
        dual proc library is planned for 1998-05-27, see Blas News
        <http://www.cs.utk.edu/~ghenry/distrib/blasnews> for details.


     The GIMP
        Emil Briggs, the same guy who is involved in multithreaded Mesa,
        is also working on multithreaded The GIMP plugins. Look at
        http://nemo.physics.ncsu.edu/~briggs/gimp/index.html for more
        info.



  3.  x86 architecture specific questions


  3.1.  Why it doesn't work on my machine?


  1. Can I use my Cyrix/AMD/non-Intel CPU in SMP?

     Short answer: no.

     Long answer: Intel claims ownership to the APIC SMP scheme, and
     unless a company licenses it from Intel they may not use it. There
     are currently no companies that have done so.  (This of course can
     change in the future) FYI - Both Cyrix and AMD support the non-
     proprietary OpenPIC SMP standard but currently there are no
     motherboards that use it.


  2. Why doesn't my old Compaq work?

     Put it into MP1.1/1.4 compliant mode.

     check "Configure Hardware" -> "View / Edit details" -> "Advanced
     mode" (F7 I think) for a configuration option "APIC mode" and set
     this to "full Table mode". This is an official Compaq
     recommandation. (Daniel Roesen)

     (Adrian Portelli)To do this:

     a. Press F10 when the server boots to enter the System
        Configuration Utility

     b. Press Enter to dismiss the splash screen

     c. Immediately press CTRL+A

     d. A message will appear informing you that you are now in
        "Advanced Mode"

     e. Then select "Configure Hardware" -> "View / Edit details"

     f. You will then see the advanced settings (intermixed with the
        ordinary ones)

     g. Stroll down to "APIC Mode" and then select "Fully Mapped"

     h. Save changes and reboot



  3. Why doesnt my ALR work?

     From Robert Hyatt : ALR Revolution quad-6 seems quite safe, while
     some older revolution quad machines without P6 processors seem
     "iffy"...


  4. Why does SMP go so slowly? or Why does one CPU show a very low
     bogomips value while the first one is normal?

     From Alan Cox: If one of your CPU's is reporting a very low
     bogomips value the cache is not enabled on it. Your vendor probably
     provides a buggy BIOS. Get the patch to work around this or better
     yet send it back and buy a board from a competent supplier.

     A 2.0 kernel (> 2.0.36) contains the MTRR patch which should solve
     this problem (select option "Handle buggy SMP BIOSes with bad MTRR
     setup" in the "General setup" menu).

     I think buggy SMP BIOS handling is automatic in latest 2.2 kernels.


  5. I've heard IBM machines have problems


     Some IBM machines have the MP1.4 bios block in the EBDA, allowed
     but not supported below 2.2 kernels.

     There is an old 486SLC based IBM SMP box. Linux/SMP requires
     hardware FPU support.


  6. Is there any advantage of Intel MP 1.4 over 1.1 specification?

     Nope (according to Alan :) ), 1.4 is just a stricker specs of 1.1.


  7. Why does the clock drift so rapidly when I run linux SMP?


     This is known problem with IRQ handling and long kernel locks in
     the 2.0 series kernels.  Consider upgrading to a later 2.2 kernel.

     From Jakob Oestergaard: Or, consider running xntpd. That should
     keep your clock right on time.  (I think that I've heard that
     enabling RTC in the kernel also fixes the clock drift. It works for
     me! but I'm not sure whether that's general or I'm just being
     lucky)


     There are some kernel fixes in the later 2.2.x series that may fix
     this.



  8. Why are my CPU's numbered 0 and 2 instead of 0 and 1 (or some other
     odd numbering)?

     The CPU number is assigned by the MB manufacturer and doesn't mean
     anything.  Ignore it.



  9. My quad-Xeon system hangs as soon as it has decompressed the kernel

     (Doug Ledford) Try recompiling LILO with LARGE_EBDA support and
     then making sure to always use make bzImage when compiling the
     kernel.  That appears to have fixed the SMP boot hangs here on
     Intel multi-Xeon boards.  However, please note that this also
     appears to break LILO in that the root= option no longer works, so
     make sure you rdev your kernel image at the same time you run lilo
     to make sure that the kernel loads the correct root filesystem at
     boot.

     (Robert M. Hyatt) With 3 cpus, do you have a terminator in the 4th
     slot?


  10.
     During boot machine hang signaling an IOAPIC problem

     Try boot options "noapic" (John Aldrich) and/or "reboot=bios"
     (Terry Shull).


  11.
     My system locks up during heavy NFS traffic

     Try the later 2.2.x kernels and the knfsd patches.  This is
     currently under investigation. (Wade Hampton)



  12.
     My system locks up with no oops messages

     If you are using kernels 2.2.11 or 2.2.12, get the latest kernel.
     For example 2.2.13 has a number of SMP fixes.  Several people have
     reported these kernels to be unstable for SMP.  These same kernels
     may have NFS problems that can cause lockups.  Also, use a serial
     console to capture your oops messages. (Wade Hampton)

     If the problem remains (and the other suggestions on this list
     didn't help either), then you could try the latest 2.3 kernels.
     They have more verbose (and more robust) SMP/APIC code, and
     automatic hard-lockup-prevention code which will produce meaningful
     oopses instead of a silent hang. (Ingo Molnar)

     (Osamu Aoki) You MUST also disable all BIOS related power save
     features.  Example of good configuration (Dual Celeron 466 Abit
     BP6):

     ___________________________________________________________________
      POWER MANAGEMENT SETUP.
        ACPI:              Disabled
        POWER MANAGEMENT:  Disabled
        PM CONTROL by APM: No
     ___________________________________________________________________


  If power management features are activated, some random freeze can
  occur.


  13.
     Debugging lockups

     (item by Wade Hampton)

     A good means of debugging lockups is to get the ikd patch from
     Andrea Arcangeli: ftp://ftp.suse.com/pub/people/andrea/kernel-
     patches
     There are several of debug options, but do NOT use the soft lockup
     option!  For newer SMP boxes, turn kernel debugging then turn on
     the NMI oopser.  To verify that the NMI oopser is working, after
     booting the new kernel, /cat /proc/interrupts and verify that you
     are getting NMIs.  When the box locks up, you should get an OOPS.

     You may also try the %eip option.  This allows the kernel to print
     on the console the %eip address every time a kernel function is
     called.  When the box locks up, write down the first column ordered
     by the second column then lookup the addresses in the System.map
     file.  This works only in console mode.

     Also note that the use of a serial console can greatly facilitate
     debugging kernel lockups, not just SMP kernel lockups!


  14.
     "APIC error interrupt on CPU#n, should never happen" messages in
     logs

     A message like:

     ___________________________________________________________________
     APIC error interrupt on CPU#0, should never happen.
     ... APIC ESR0: 00000002
     ... APIC ESR1: 00000000
     ___________________________________________________________________


  indicates a 'receive checksum error'. This cannot be caused by Linux
  as the APIC message checksumming part is completely in hardware. It
  might be marginal hardware. As long as you dont see any instability,
  they are not a problem - APIC messages are retried until delivered.
  (Ingo Molnar)



  3.2.  Possible causes of crash

  In this section you'll find some possible reasons for a crash of an
  SMP machine (credits are due to Jakob stergaard for this part). As far
  as I (David) know, theses problems are Intel specific.



  o  Cooling problems

     From Ralf Bchle: [Related to case size and fans] It's important
     that the air is flowing.  It of course can't where cables etc. are
     preventing this like in too small cases.  On the other side I've
     seen oversized cases causing big problems.  There are some tower
     cases on the market that actually are worse for cooling than
     desktops.  In short, the right thing is thinking about aerodynamics
     in the case.  Extra cases for hot peripherals are usefull as well.

     Of course you can always go to Radio Shack (or similar) and get
     another fan.  You can use the lm_sensors to monitor the CPU
     temperature of newer PII and PIII processors.  This might help you
     to determine if heat is a problem. (Wade Hampton)



  o  Bad memory

     Don't buy cheap RAM and don't use mixed RAM modules on a
     motherboard that is picky about it.

     Especially Tyan motherboards are known to be picky about RAM speed
     (see the Tyan paragraph below for a possible solution).


     There have been some report of 10ns PC100 RAM being sold with
     motherboards where the CPU really needs 8ns RAM. (Wade Hampton)



  o  Bad combination of different stepping CPUs

     Check /proc/cpuinfo to see that your CPUs are same stepping.


  o  If your system is unstable, then DON'T overclock it!

     ...and even if it is stable, DON'T overclock.

     From Ralf Bchle: Overclocking causes very subtle problems.  I have
     a nice example, one of my overclocked old machines misscomputes a
     couple of pixels of a 640 x 400 fractal.  The problem is only
     visible when comparing them using tools. So better say never,
     nuncas, jamais, niemals overclock.



  o  2.0.x kernel and fast ethernet (from Robert G. Brown)

     2.0.x kernels on high performance fast ethernet systems have
     significant (and known) problems with a race/deadlock condition in
     the networking interrupt handler.

     The solution is to get the latest 100BT development drivers from
     CESDIS Linux Ethernet device drivers site
     <http://cesdis.gsfc.nasa.gov/linux/drivers/> (ones that define
     SMPCHECK).


  o  A bug in the 440FX chipset (from Emil Briggs)

     If you had a system using the 440FX chipset then your problem with
     the lockups was possibly due to a documented errata in the chipset.
     Here is a reference

     References: Intel 440FX PCIset 82441FX (PMC) and 82442FX (DBX)
     Specification Update.  pg. 13

     http://www.intel.com/design/pcisets/specupdt/297654.htm

     The problem can be fixed with a BIOS workaround (Or a kernel patch)
     and in fact David Wragg wrote a patch that's included with Richard
     Gooch's MTTR patch. For more information and a fix look here:

     http://nemo.physics.ncsu.edu/~briggs/vfix.html


  o  DONT run emm386.exe before booting linux SMP

     From Mark Duguid, dumb rule #1 with W6LI motherboards. ;)


  o  If the machine reboots/freezes after a while, there can be two good
     BIOS + memory related reasons (from Jakob stergaard)

  o  If the BIOS has settings like "memory hole at 16M" and/or "OS/2
     memory > 64MB", try disabling them both. Linux does not always
     react well with theese options.

  o  If you have more than 64 MB of memory in the machine, and you
     specified the exact number manually in the LILO configuration, you
     should specify one MB less than you actually have in the machine.
     If you have 128 MB, you lilo.conf line looks like:
     append="mem=127M"



  o  Be aware of IRQ related problems

     Sometime, some cards are not recognized or can trigger IRQ
     conflicts. Try shuffling cards on slots in different ways and
     possibly moving them to different IRQs.

     Contributed by hASCII : removing an " append="hisax=9,2,3"" line in
     lilo.conf allowed using a kernel from the 2.1.xx series with
     activated ISDN + Hisax support. Kernels from the 2.0.xx series
     doesn't make problems like this.

     Try also to set BIOS setup option like "MP 1.4 mode" or "route PCI
     interrupts through IOAPIC", or "OS Type" not set to DOS neither
     Novell (Ingo Molnar).



  o  Floppy access while sound is active

     If you lockup when trying to access the floppy (for example while
     sound is playing) you may have to edit drivers/pci/quirks.c and set
     /int isa_dma_bridge_buggy = 1; This is a problem with my Dell WS400
     dual PII/300, 2.2.x, SMP (Wade Hampton).



  3.3.  Motherboard specific information

  Please note: Some more specific information can be found with the list
  of Motherboards rumored to run Linux SMP <http://www.nlug.org/smp/>


  3.3.1.  Motherboards with known problems


  o  none right now



  3.4.  Low cost SMP Linux box (dual Celeron box)

  (Stphane colivet)


  The lowest cost SMP Linux boxes with nowadays buyable processors are
  dual Celeron systems. Such a system is not officially possible
  according to Intel.  Better think about the second generation of
  Celeron, those with 128 Kb L2 cache.



  3.4.1.  Is it possible to run a dual Intel Celeron box ?

  Official answer from Intel: no, Celeron cannot work in SMP mode.

  Practical answer: it is possible, but requires hardware alteration for
  Slot 1 processors.  Alteration is described by Tomohiro Kawada on his
  Dual Celeron System <http://kikumaru.w-
  w.ne.jp/pc/celeron/index_e.html> page.  Of course, this kind of
  modification removes warranties...  Some versions of Celeron processor
  are also available in Socket 370 format.  In that case, alteration may
  just be done on the Socket 370 to Slot 1 adapter or may even be sold
  pre-wired for SMP use. (Andy Poling, Hans - Erik Skyttberg, James
  Beard)

  There is also a motherboard (ABIT BP6) allowing two Celerons in Socket
  370 format to be inserted (Martijn Kruithof, Ryan McCue). ABIT
  Computer BP6 verified tested and native to linux with dual ppga socket
  370 (Andre Hedrick).


  3.4.2.  How does Linux behave on a dual Celeron system ?

  Fine, thank you.


  3.4.3.  Celeron system ?  Celeron processors are known to be easily
  overclockable. And dual

  It may work. However, overclocking this kind of system is not as easy
  as overclocking a mono-processor one. It is definitly not a good idea
  for a production system. For personal use, dual Celeron 300A systems
  running rock-solid at 450 MHz have been reported. (numerous people)


  3.4.4.  And making a quad Celeron system ?

  It is impossible. Celeron processors have nearly the same features as
  basic Pentium II chips.  If you want more than 2 processors in your
  system, you'll have to look at Pentium Pro, Pentium II Xeon or Pentium
  III (?) boxes.



  3.4.5.  What about mixing Celeron and Pentium II processor ?

  A system using a "re-enable" Celeron processor and a Pentium II
  processor with the same steppings may theorically work.

  Alexandre Charbey as made such a system:

  o  Asus P2B-D motherboard, proc 1: Celeron 366, proc 2: Pentium II
     400@266

  o  66Mhz and 75Mhz bus frenquencies where functionnal

  o  the fastest processor (in this case the Celeron) should be put on
     the second slot. Swapping processors (fatest first) leads to quick
     failure.


  4.  Sparc architecture specific questions



  4.1.  Which Sparc machines are supported ?

  Quoting the UltraLinux <http://ultra.linux.cz/> web page (only SMP
  systems):

  o  UltraSPARC PCI based workstations: Ultra60, Ultra450

  o  UltraSPARC SBUS based servers: Enterprise 1, 2, 150

  o  UltraSPARC SBUS based large servers: Enterprise 3000, 4000, 5000,
     6000, 10000

  o  UltraSPARC PCI based servers: Enterprise 250, 450

  o  SPARC sun4m SMP machines (Anton Blanchard)

  UltraLinux has ran on a 14 CPUs machine (see the dmesg output
  <http://lwn.net/1998/1210/a/dm-sparc.html>).


  4.2.  Specific problem related to Sparc SMP support

  (David Miller) There should not be any worries.

  The only known problem, and one we don't intend to fix, is that if you
  build an SMP kernel for 32-bit (ie. non-ultrasparc) systems, this
  kernel will not work on sun4c systems.


  4.3.  SMP specific limit with current kernel (2.2)

  (David Miller) There is a bug in the include/linux/tasks.h header
  file, it needs to define NR_CPUS to 64 on UltraSparc as this is the
  upper limit for the hardware we support :-)


  5.  PowerPC architecture specific questions



  5.1.  Which PPC machines are supported ?


  o  PowerSurge boards (including UMAX s900)

  o  PowerMac

  o  Motorola MTX: support under developement. Patches not yet
     integrated into the main kernel (Troy Benjegerdes)

  (Cort Dougan) Not supported: PPC RS/6000 systems



  5.2.  Specific problem related to PPC SMP support

  Nothing. Usual SMP compiling (see above). As usual, be aware, modules
  are specific either for UP or SMP. Recompile them. (Paul Mackerras)


  6.  Alpha architecture specific questions



  6.1.  Which Alpha machines are supported ?

  (Geerten Kuiper) SMP works for most, if not all, AXP servers.

  (Jay A Estabrook) SMP does seem to work on most of our [Compaq] boxes
  with 2 or more CPUs. That includes :

  o  AS2000/2100 (SABLE)

  o  AS4000/4100 (RAWHIDE)

  o  DS20 (DP264)

  It does not include :

  o  AS2100A (LYNX)

  o  TurboLaser bigboys (8200/8400)


  6.2.  Specific problem related to Alpha SMP support

  None (really ? :-)


  7.  Useful pointers


  7.1.  Various


  o  Parallel Processing using Linux
     <http://yara.ecn.purdue.edu/~pplinux/>

  o  Linux Parallel Processing HOWTO
     <http://yara.ecn.purdue.edu/~pplinux/PPHOWTO/pphowto.html>

  o  (outdated) Linux SMP home page
     <http://www.uk.linux.org/SMP/title.html>

  o  linux-smp mailing list

     To subscribe, send subscribe linux-smp in the message body at
     majordomo@vger.rutgers.edu

     To unsubscribe, send unsubscribe linux-smp in the message body at
     majordomo@vger.rutgers.edu

     Linux SMP archives <http://www.linuxhq.com/lnxlists/linux-smp/>

     Linux SMP archives at progressive-comp.com <http://www.progressive-
     comp.com/Lists/?l=linux-smp&r=1&w=2#linux-smp>



  o  pthread library made by Xavier Leroy
     <http://pauillac.inria.fr/~xleroy/linuxthreads/>

  o  Motherboards rumored to run Linux SMP <http://www.nlug.org/smp/>

  o  procps <http://www.cs.inf.ethz.ch/~rauch/procps.html>

  o  procps patch for 2.2.x <http://queenbee.fhcrc.org/~warnes/procps>

  o  xosview <http://lore.ece.utexas.edu/~bgrayson/xosview.html>

  o  xosview for 2.2.x
     <http://www.ima.umn.edu/~klee/linux/xosview-1.6.1-5a1.tgz>

  o  SMP Performance of Linux
     <http://www.phy.duke.edu/brahma/benchmarks.smp>

  o  CESDIS Linux Ethernet device drivers site
     <http://cesdis.gsfc.nasa.gov/linux/drivers/>

  o  Dual Celeron System <http://kikumaru.w-
     w.ne.jp/pc/celeron/index_e.html>



  7.2.  Multithreaded programs and library


  o  Linux Threads FAQ <http://linas.org/linux/threads-faq.html>

  o  Multithreaded programs on linux <http://www.informatik.uni-
     bremen.de/~hollow/mthread.html>

  o  Pentium Pro Optimized BLAS and FFTs for Intel Linux
     <http://www.cs.utk.edu/~ghenry/distrib/> (not available right now,
     but a dual proc library is planned for 5/27/98, see Blas News
     <http://www.cs.utk.edu/~ghenry/distrib/blasnews> for details)

  o  Mesa library <http://www.ssec.wisc.edu/~brianp/Mesa.html> (with
     experimental multi-threading)

  o  Parallel plugins for The GIMP
     <http://nemo.physics.ncsu.edu/~briggs/gimp/index.html>



  7.3.  SMP specific patches


  o  Forissier kernel patches <http://www-
     isia.cma.fr/~forissie/smp_kernel_patch/>

  o  Patch for a bug in the 440FX chipset
     <http://nemo.physics.ncsu.edu/~briggs/vfix.html>

  o  MTRR patch (latest version: 1.9)
     <http://www.atnf.csiro.au/~rgooch/kernel-patches.html>

  o  PSET - Processor Sets for the Linux kernel
     <http://isunix.it.ilstu.edu/~thockin/pset/>

  o  Ingo Molnar SMP patches <http://www.redhat.com/~mingo/> (for
     experts only, please read linux-smp@vger.rutgers.edu)



  7.4.  ( Sumit Roy ) Parallelizing/Optimizing Compilers for 586/686
  machines


  o  Pentium Compiler Group <http://www.goof.com/pcg/> creators of pgcc

  o  Absoft <http://www.absoft.com/> , Fortran 90 and Fortran 77
     compilers

  o  The Portland Group, Inc. <http://www.pgroup.com/>, supports the
     OpenMP <http://www.openmp.org> standard for Fortran parallelization
     on Linux

  o  Pacific-Sierra Research Corporation <http://www.psrv.com/>, has a
     free F90 compiler for Linux, as well as parallelizing compilers for
     SMP Linux

  o  Applied Parallel Research <http://s006.infomall.org/index.html>,
     currently have parallelizing compilers for WinNT

  o  KAI <http://www.kai.com> has a C++-Compiler for Linux, that
     understands OpenMPI. It is called Guide_OpenMP. Info under
     http://www.kai.com/parallel/kappro/guide. (Gero Wedemann)



  8.  Glossary


  o  SMP Symmetric Multi-Processors

  o  APIC Advanced Programmable Interrupt Controler

  o  thread A thread is a processor activity in a process. The same
     process can have multiple threads. Those threads share the process
     address space and can therefore share data.

  o  pthread Posix thread, threads defined by the Posix standard.

  o  APM Advanced Power Managment



  9.  What's new ?



     v1.9, 13 january 2000

     o  Remember to disable all BIOS power-save features (Osamu Aoki)

     o  Explain how to access to Compaq server into advanced
        configuration mode (Adrian Portelli)


     v1.8, 8 november 1999

     o  quad-celeron motherboard was a hoax, restored old paragraph
        (Simen Timian Thoresen)


     v1.7, 6 november 1999

     o  new introduction (C. Polisher aka cp)

     o  numerous typo and grammatical fixes (cp)

     o  introductory paragraph on kernel compilation (cp)

     o  introductory paragraph on SMP need (cp)

     o  reference on KAI optimizing compiler (Gero Wedemann)

     o  quad-celeron motherboard exists (Jeffrey H. Ingber)

     v1.6, 21 october 1999

     o  added information on xosview scheduling perturbation

     o  added "APIC error interrupt on CPU#n" message information

     o  added information on hard lockup

     o  deleted section "How to optain maximum performance" (was
        obsolete)

     o  added info on dual systems with different x86 procs (a Celeron
        and a P-II)


     v1.5, 4 october 1999

     o  more precision in PSET description


     v1.4, 30 september 1999

     o  precize to enable MTRR support for an x86 SMP kernel (me)


     v1.3, 29 september 1999

     o  many many grammar and typographical fixes (Wade Hampton aka hww)

     o  added info in short introduction related to 2.2/2.4/2.0 diffs
        (hww)

     o  added step by step things to do to recompile a kernel (hww and
        me)

     o  added info related to SMP/UP modules problems  (hww)

     o  added precision in Posix Threads section related to user  (hww)
        vs. kernel threads (hww)

     o  new item about NFS and kernel lock  (hww)

     o  new item about kernel lock without message  (hww)

     o  new item about debugging lockup problems  (hww)

     o  added info about heating problems  (hww)

     o  miscellaneous updates I've forget about  (hww)

     o  new item about floppy access and sound  (hww)


     v1.2, 27 septembre 1999

     o  name change: this document is now a HOWTO. TWD, and fast!
        (Guylhem Aznar)


     v1.1, 26 septembre 1999

     o  added a link to first Chris Pirih FAQ draft

     o  expanted an IRQ related problems


     v1.00, 25 septembre 1999

     o  first upgrade in a long long time!

     o  reprocessed the whole FAQ: 2.2 is here and 2.4 soon

     o  added kernel locking information from Ingo Molnar

     o  deleted item "How will my application perform under SMP?":
        outdated

     o  deleted item "My SMP system is locking up all the time.":
        outdated

     o  deleted item "You are running 2.0.35 aren't you ?": outdated

     o  deleted item "Some hardware is also known to cause problems.":
        outdated

     o  blanked section "Motherboards with known problems". We should
        restart from scratch

     o  deleted section "Motherboards with NO known problems": outdated

     o  updated dual celeron section (numerous people)

     o  added "SPARC sun4m SMP machines" to supported SMP sparc machines
        (Anton Blanchard)

     o  added a "During boot machine hang signaling an IOAPIC problem"
        item in "Why it doesn't work on my machine?" section

     o  added a "What about SMP performances?" item

     o  updated "Why doesn't my old Compaq work?" item

     o  fixed an outdated pointer

     o  added a pointer to Ingo test SMP patches


     v0.54, 13 march 1999

     o  Added a section about SMP Alpha systems


     v0.53, 08 march 1999

     o  Added a section about SMP PowerPC systems


     v0.52, 07 march 1999

     o  Added a section about SMP Sparc systems


     v0.51, 06 march 1999

     o  Added a dual-celeron section

     o  Deleted Adaptec section

     o  Updated procps link

     o  Updated xosview link

     o  Added an answer for quad Xeon boot hang

     o  Updated item about glibc patch for gd: should be included in RH
        5.2


     v0.50, 03 february 1999

     o  Updated "Multithreaded programs on linux" link


     v0.49, 13 january 1999

     o  Update about CONFIG_SMP. Added .txt to Documentation/smp.
        (Michael Elizabeth Chastain)


     v0.48, 10 december 1998

     o  Mispelled corrected. Email address corrected.


     v0.47, 20 november 1998

     o  Added that 2.0.36 as the MTRR patch (related to the BogoMips
        problem)


     v0.46, 10 november 1998

     o  Update about Epox KP6-LS motherboards


     v0.45, 25 october 1998

     o  Corrected an error regarding /proc/stat file

     o  Added a pointer to CESDIS Ethernet Linux Drivers site


     v0.44, 14 october 1998

     o  Updated the link to the web page: Motherboards rumored to run
        Linux SMP

     o  Added Jakob explanation how to time SMP systems with 2.0 kernels


     v0.43, 9 september 1998

     o  Updated first question in section 3.1

     o  Updated mt-Mesa link: multi-threaded is now included as
        experimental in the Mesa distribution


     v0.42, 2 september 1998

     o  Minor cosmetic update in sect 3.3

     o  Two links (multithreaded Mesa and SMP performance) marked
        outdated

     o  Updated the item about threads and exceptions in C++ (sect 3.3)


     v0.41, 1 september 1998

     o  Added a major section: "3.3 SMP Programming" written by Jakob
        stergaard

     o  moved some item of section "3.2 User side" in sect 3.3


     v0.40, 27 august 1998

     o  Updated section 3.1, item 7: processor affinity


     v0.39, 27 august 1998

     o  Updated needed Award BIOS version for Tyan motherboards (hASCII)

     o  Added an item on IRQ in the crash section (me and hASCII)

     o  Added good support of Asus P2B-DS (Ulf Rompe)

     o  Added another smp-list archive in pointer section (Hank
        Leininger)


     v0.38, 8 august 1998

     o  Added a pointer to the Linux Threads FAQ


     v0.37, 30 July 1998

     o  Emil Briggs is working on parallel plugins for Gimp (see "Is
        there any threaded programs or library?", sect. "User side")


     v0.36, 26 July 1998

     o  Thanks to Jakob stergaard, two changes in "Possible causes of
        Crash"

     o  Changed 2.0.33 to 2.0.35 (latest stable)

     o  Added a "BIOS related causes of failure"


     v0.35, 14 July 1998

     o  Added N440BX Server Board in Motherboards with NO problems

     o  Added a succes story for GigaByte motherboard with BIOS upgrade

     o  Added a "How to obtain maximum performance ?" section (waiting
        for your contributions ;)


     v0.34, 10 june 1998

     o  Added a "Parallelizing/Optimizing Compilers for 586/686
        machines" section in section "Useful Pointers", thanks to Sumit
        Roy

     o  Corrected a mispelling, "Asus P/I-UP5" is in fact "Asus P/I-
        P65UP5"


     v0.33, 3 june 1998

     o  Yet another success story for a GigaByte DLX Motherboard.

     o  A tip for Tyan motherboards, disable the "DRAM Fast Leadoff"
        BIOS option


     v0.32, 27 may 1998

     o  Asus P/I-UP5 added in the motherboard-with-NO-problem section


     v0.31, 18 may 1998

     o  Elitegroup P6LX2-A works with 2.1.100 and 101

     o  Bugs should be reported to linux-smp@vger.rutgers.edu


     v0.30, 12 may 1998

     o  SuperMicro is now in the motherboard-with-NO-problem section


     v0.29, 11 may 1998

     o  A success story for a GigaByte 686 motherboard with 2.1.101

     o  Added a new item in the "User Side" section: "Is there any
        threaded programs or library?"

     o  OpenGL Mesa library is beeing multithreaded. Cool! See the new
        section for details.


     v0.28, 09 may 1998

     o  A US mirror of this FAQ is now available (see Introduction)

     o  Merge of the two confusing Gigabyte 686 entries


     v0.27, 05 may 1998

     o  New info for the Adaptec and TekRam drivers

     o  Micronics W6-LI motherboard works under SMP



  10.  List of contributors

  Many thanks to those who help me to maintain this HOWTO:


  1. Tigran A. Aivazian

  2. John Aldrich

  3. Niels Ammerlaan

  4. H. Peter Anvin


  5. Osamu Aoki

  6. Guylhem Aznar

  7. Ralf Bchle

  8. James Beard

  9. Troy Benjegerdes

  10.
     Anton Blanchard

  11.
     Emil Briggs

  12.
     Robert G. Brown

  13.
     Alexandre Charbey

  14.
     Michael Elizabeth Chastain

  15.
     Samuel S. Chessman

  16.
     Alan Cox

  17.
     Andrew Crane

  18.
     Cort Dougan

  19.
     Mark Duguid

  20.
     Stphane colivet

  21.
     Jocelyne Erhel

  22.
     Jay A Estabrook

  23.
     Byron Faber

  24.
     Mark Garlanger

  25.
     hASCII

  26.
     Wade Hampton

  27.
     Andre Hedrick

  28.
     Claus-Justus Heine
  29.
     Benedikt Heinen

  30.
     Florian Hinzmann

  31.
     Moni Hollmann

  32.
     Robert M. Hyatt

  33.
     Jeffrey H. Ingber

  34.
     Richard Jelinek

  35.
     Tony Kocurko

  36.
     Geerten Kuiper

  37.
     Martijn Kruithof

  38.
     Doug Ledford

  39.
     Kumsup Lee

  40.
     Hank Leininger

  41.
     Ryan McCue

  42.
     Paul Mackerras

  43.
     Cameron MacKinnon

  44.
     Joel Marchand

  45.
     David Maslen

  46.
     Chris Mauritz

  47.
     Jean-Francois Micouleau

  48.
     David Miller

  49.
     Ingo Molnar

  50.
     Ulf Nielsen

  51.
     Jakob Oestergaard

  52.
     C Polisher

  53.
     Adrian Portelli

  54.
     Matt Ranney

  55.
     Daniel Roesen

  56.
     Ulf Rompe

  57.
     Jean-Michel Rouet

  58.
     Volker Reichelt

  59.
     Sean Reifschneider

  60.
     Sumit Roy

  61.
     Thomas Schenk

  62.
     Terry Shull

  63.
     Chris K. Skinner

  64.
     Hans - Erik Skyttberg

  65.
     Szakacsits Szabolcs

  66.
     Jukka Tainio

  67.
     Simen Timian Thoresen

  68.
     El Warren

  69.
     Gregory R. Warnes

  70.
     Gero Wedemann

  71.
     Christopher Allen Wing

  72.
     Leonard N. Zubkoff



  SRM Firmware Howto
  Rich Payne <mailto:rdp@alphalinux.org>, and David Huggins-
  Daines <mailto:dhuggins@linuxcare.com>
  v0.6.1, 5 March 2000

  This document describes how to boot Linux/Alpha using the SRM console,
  which is the console firmware also used to boot Compaq Tru64 Unix
  (also known as Digital Unix and OSF/1) and OpenVMS.
  ______________________________________________________________________

  Table of Contents


  1. About this manual

     1.1 Who should read this manual
     1.2 Conventions

  2. What is SRM?

     2.1 Getting to SRM
     2.2 Using the SRM console
     2.3 How Does SRM Boot an OS?
     2.4 Loading The Secondary Bootstrap Loader

  3. The Raw Loader

  4. The aboot Loader

     4.1 Getting and Building aboot
     4.2 Floppy Installation
     4.3 Harddisk Installation
     4.4 CD-ROM Installation
     4.5 Building the Linux Kernel
     4.6 Booting Linux
        4.6.1 Device Naming
        4.6.2 Boot Filename
        4.6.3 Boot Flags
        4.6.4 Using aboot interactively
        4.6.5 The aboot.conf configuration file
           4.6.5.1 Selecting the Partition of /etc/aboot.conf
     4.7 Booting Over the Network
     4.8 Partitioning Disks
        4.8.1 What is a disklabel?
        4.8.2 Partitioning the Easy Way: a DOS Disklabel
        4.8.3 Partitioning with a BSD Disklabel

  5. Sharing a Disk With DEC Unix

     5.1 Partitioning the disk
     5.2 Installing

  6. Installation of Distributions

     6.1 RedHat 6.0 and 6.1
        6.1.1 Installation from the Red Hat 6.0 or 6.1 CD
     6.2 SuSE 6.1
        6.2.1 Installation from the SuSE 6.1 CD
     6.3 SuSE 6.3
        6.3.1 Installation from the SuSE 6.3 CD

  7. Document History



  ______________________________________________________________________

  1.  About this manual

  1.1.  Who should read this manual

  You should read this manual if you are installing Linux on a new Alpha
  system that can only boot from the SRM console, or if you are
  installing Linux on an older Alpha system that can use the SRM console
  and wish to use SRM to boot your Linux installation.

  Because SRM is the only way to boot Linux on modern Alpha systems, and
  because it provides the proper operating environment for Unix and
  Unix-like operating systems (such as Linux), it is the recommended way
  of booting Linux on Alpha when available.

  Sometimes, it is preferable to use the ARC, ARCSBIOS, or AlphaBIOS
  console, such as if you have a machine for which SRM is not available,
  if you wish to dual-boot with Windows NT without switching consoles,
  or if you have hardware that is not supported by SRM.  On these
  machines, you will typically use MILO to boot Linux.  For more
  information, refer to the MILO Howto, available from
  http://www.alphalinux.org/faq/milo.html
  <http://www.alphalinux.org/faq/milo.html>.

  1.2.  Conventions

  Throughout this manual, we will use the following conventions for
  commands to be entered by the user:

  SRM console commands will be shown with the characteristic SRM will
  see 'P00>' instead, or possibly some other number depending on which
  processor SRM is running.--)



       >>> boot dva0 -fi linux.gz -fl "root=/dev/fd0 load_ramdisk=1"



  Unix commands will be shown with the '#' command prompt if they are to
  be run as root, or '$' if they are to be run by a normal user, like
  this:


       # swriteboot -f3 /dev/sda /boot/bootlx



  Aboot commands will be shown with the 'aboot>' command prompt, like
  this:


       aboot> b 6/boot/vmlinuz root=/dev/hda6



  2.  What is SRM?

  SRM console is used by Alpha systems as Unix-style boot firmware.
  Tru64 Unix and OpenVMS depend on it and Linux can boot from it. You
  can recognize SRM console as a blue screen with a prompt that is
  presented to you on power-up.
  2.1.  Getting to SRM

  Most Alpha systems have both the SRM and ARC/AlphaBIOS console in
  their firmware.  On one of these machines, if your machine starts up
  with ARC/AlphaBIOS by default, you can switch to SRM through the
  "Console Selection" option in the Advanced CMOS Setup menu.  To make
  the change permanent, you should set the os_type environment variable
  in SRM to "OpenVMS" or "Unix", like this:


       >>> set os_type Unix



  Either one will work to boot Linux.  However, if you intend to dual-
  boot OpenVMS on this machine, you must set os_type to "OpenVMS".
  Conversely, to return to ARC/AlphaBIOS, you can set os_type to "NT".

  Some older systems may not have both SRM and ARC in firmware as
  shipped.  On these systems, you will have to upgrade your firmware.
  See  <http://ftp.digital.com/pub/DEC/Alpha/firmware/> for the latest
  firmware updates and instructions.

  A few older systems (primarily evaluation boards such as the 164SX and
  164LX) are "half-flash" systems, whose firmware can hold SRM or
  AlphaBIOS, but not both.  If you have one of these machines, you will
  have to reflash your firmware with the SRM console using the AlphaBIOS
  firmware update utility.  Again, see
  <http://ftp.digital.com/pub/DEC/Alpha/firmware/> for firmware images
  and instructions.  If you wish to return to AlphaBIOS on these
  machines, you may rerun the firmware update utility from a floppy in
  SRM using the fwupdate command.  You can also start AlphaBIOS from a
  floppy using the arc command.

  2.2.  Using the SRM console

  The SRM console works very much like a Unix or OpenVMS shell.  It
  views your NVRAM and devices as a pseudo-filesystem.  You can see this
  if you use the ls command.  Also, it contains a fairly large set of
  diagnostic, setup, and debugging utilities, the details of which are
  beyond the scope of this document.  As in the Unix shell, you can pipe
  the output of one command to the input of another, and there is a more
  command that works not unlike the Unix one.  To get a full listing of
  available commands, run:


       >>> help | more



  As well, SRM has environment variables, a number of which are pre-
  defined and correspond to locations in NVRAM.  You can view the entire
  list of environment variables and their values with the show command
  (there are quite a few of them, so you will probably want to pipe its
  output to more).  You can also show variables matching a "glob"
  pattern - for example, show boot* will show all the variables starting
  in "boot".

  Environment variables are categorized as either read-only, warm non-
  volatile, or cold non-volatile.  The full listing of pre-defined
  variables is detailed in the Alpha Architecture Reference Manual.  The
  most useful pre-defined environment variables for the purposes of
  booting Linux are bootdef_dev, boot_file, boot_flags, and auto_action,
  all of which are cold non-volatile.
  To set environment variables, use the set command, like this:


       >>> set bootdef_def dka0



  If you set an undefined variable, it will be created for you, however
  it will not persist across reboots.

  The bootdef_dev variable specifies the device (using VMS naming
  conventions - see ``'' for an explanation of these) which will be
  booted from if no device is specified on the boot command line, or in
  an automatic boot.  The boot_file variable contains the filename to be
  loaded by the secondary bootloader, while boot_flags contains any
  extra flags.  auto_action specifies the action which the console
  should take on power-up.  By default, it is set to HALT, meaning that
  the machine will start up in the SRM console.  Once you have
  configured your bootloader and the boot-related variables, you can set
  it to BOOT in order to boot automatically on power-up.

  Finally, two helpful console keystrokes you should know are Control-C,
  which, as in the shell, halts a command in progress (such as an
  automatic boot), and Control-P, which if issued from the aboot prompt
  (or other secondary bootloader) will halt the bootloader and return
  you to the SRM console.

  2.3.  How Does SRM Boot an OS?

  All versions of SRM can boot from SCSI disks and the versions for
  recent platforms, such as the Noname or AlphaStations can boot from
  floppy disks as well.  Network booting via bootp is supported.  Note
  that older SRM versions (notably the one for the Jensen) cannot boot
  from floppy disks. Booting from IDE devices is supported on newer
  platforms (DS20, DS10, DP264, UP2000 etc..).

  Booting Linux with SRM is a two step process: first, SRM loads and
  transfers control to the secondary bootstrap loader.  Then the
  secondary bootstrap loader sets up the environment for Linux, reads
  the kernel image from a disk filesystem and finally transfers control
  to Linux.

  Currently, there are two secondary bootstrap loaders for Linux: the
  raw loader that comes with the Linux kernel and aboot which is
  distributed separately.  These two loaders are described in more
  detail below.

  2.4.  Loading The Secondary Bootstrap Loader

  SRM knows nothing about filesystems or disk-partitions.  It simply
  expects that the secondary bootstrap loader occupies a consecutive
  range of physical disk sector, starting from a given offset.  The
  information on the size of the secondary bootstrap loader and the
  offset of its first disk sector is stored in the first 512 byte
  sector.  Specifically, the long integer at offset 480 stores the size
  of the secondary bootstrap loader (in 512-byte blocks) and the long at
  offset 488 gives the sector number at which the secondary bootstrap
  loader starts.  The first sector also stores a flag-word at offset 496
  which is always 0 and a checksum at offset 504.  The checksum is
  simply the sum of the first 63 long integers in the first sector.

  If the checksum in the first sector is correct, SRM goes ahead and
  reads the size sectors starting from the sector given in the sector
  number field and places them in virtual memory at address 0x20000000.
  If the reading completes successfully, SRM performs a jump to address
  0x20000000.

  3.  The Raw Loader

  The sources for this loader can be found in directory arch/alpha/boot
  of the Linux kernel source distribution.  It loads the Linux kernel by
  reading START_SIZE bytes starting at disk offset BOOT_SIZE+512 (also
  in bytes).  The constants START_SIZE and BOOT_SIZE are defined in
  linux/include/asm-alpha/system.h.  START_SIZE must be at least as big
  as the kernel image (i.e., the size of the .text, .data, and .bss
  segments).  Similarly, BOOT_SIZE must be at least as big as the image
  of the raw bootstrap loader.  Both constants should be an integer
  multiple of the sector size, which is 512 bytes.  The default values
  are currently 2MB for START_SIZE and 16KB for BOOT_SIZE.  Note that if
  you want to boot from a 1.44MB floppy disk, you have to reduce
  START_SIZE to 1400KB and make sure that the kernel you want to boot is
  no bigger than that.

  To build a raw loader, simply type make rawboot in the top directory
  of your linux source tree (typically /usr/src/linux).  This should
  produce the following files in arch/alpha/boot:


     tools/lxboot:
        The first sector on the disk.  It contains the offset and size
        of the next file in the format described above.

     tools/bootlx:
        The raw boot loader that will load the file below.

     vmlinux.nh:
        The raw kernel image consisting of the .text, .data, and .bss
        segments of the object file in /usr/src/linux/vmlinux.  The
        extension .nh indicates that this file has no object-file
        header.

  The concatenation of these three files should be written to the disk
  from which you want to boot.  For example, to boot from a floppy,
  insert an empty floppy disk in, say, /dev/fd0 and then type:


       # cat tools/lxboot tools/bootlx vmlinux >/dev/fd0



  You can then shutdown the system and boot from the floppy by issuing
  the command boot dva0.

  4.  The aboot Loader

  When using the SRM firmware, aboot is the preferred way of booting
  Linux.  It supports:


  o  direct booting from various filesystems (ext2, ISO9660, and UFS,
     the DEC Unix filesystem)

  o  listing directories and following symbolic links on ext2 (version
     0.6 and later)

  o  booting of executable object files (both ELF and ECOFF)

  o  booting compressed kernels


  o  network booting (using bootp)

  o  partition tables in DEC Unix format (which is compatible with BSD
     Unix partition tables)

  o  interactive booting and default configurations for SRM consoles
     that cannot pass long option strings

  4.1.  Getting and Building aboot

  The latest sources for aboot are available in this ftp directory
  <ftp://ftp.alphalinux.org/pub/aboot>.  The description in this manual
  applies to aboot version 0.6 or newer. Please note that many
  distributions ship aboot with them so downloading aboot from this
  directory is probably unnessesary.

  Once you downloaded and extracted the latest tar file, take a look at
  the README and INSTALL files for installation hints.  In particular,
  be sure to adjust the variables in Makefile and in include/config.h to
  match your environment.  Normally, you won't need to change anything
  when building under Linux, but it is always a good idea to double
  check.  If you're satisfied with the configuration, simply type make
  to build it (if you're not building under Linux, be advised that aboot
  requires GNU make).

  After running make, the aboot directory should contain the following
  files:


     aboot
        This is the actual aboot executable (either an ECOFF or ELF
        object file).

     bootlx
        Same as above, but it contains only the text, data and bss
        segments---that is, this file is not an object file.

     sdisklabel/writeboot
        Utility to install aboot on a hard disk.

     tools/e2writeboot
        Utility to install aboot on an ext2 filesystem (usually used for
        floppies only).

     tools/isomarkboot
        Utility to install aboot on a iso9660 filesystem (used by CD-ROM
        distributors).

     tools/abootconf
        Utility to configure an installed aboot.

  4.2.  Floppy Installation

  The bootloader can be installed on a floppy using the e2writeboot
  command (note: this can't be done on a Jensen since its firmware does
  not support booting from floppy).  This command requires that the disk
  is not overly fragmented as it needs to find enough contiguous file
  blocks to store the entire aboot image (currently about 90KB).  If
  e2writeboot fails because of this, reformat the floppy and try again
  (e.g., with fdformat(1)).  For example, the following steps install
  aboot on floppy disk assuming the floppy is in drive /dev/fd0:



  # fdformat /dev/fd0
  # mke2fs /dev/fd0
  # e2writeboot /dev/fd0 bootlx



  4.3.  Harddisk Installation

  Since the e2writeboot command may fail on highly fragmented disks and
  since reformatting a harddisk is not without pain, it is generally
  safer to install aboot on a harddisk using the swriteboot command.
  swriteboot requires that the first few sectors are reserved for
  booting purposes.  We suggest that the disk be partitioned such that
  the first partition starts at an offset of 2048 sectors.  This leaves
  1MB of space for storing aboot.  On a properly partitioned disk, it is
  then possible to install aboot as follows (assuming the disk is
  /dev/sda):


       # swriteboot /dev/sda bootlx



  On systems where partition c in the entire disk it will be necessary
  to 'force' the write of aboot. In this case use the -f flag followed
  by the partition number (in the case of partition c this is 3):


       # swriteboot /dev/sda bootlx -f3



  On a Jensen, you will want to leave some more space, since you need to
  write a kernel to this place, too---2MB should be sufficient when
  using compressed kernels.  Use swriteboot as described in Section ``''
  to write bootlx together with the Linux kernel.

  4.4.  CD-ROM Installation

  To make a CD-ROM bootable by SRM, simply build aboot as described
  above.  Then, make sure that the bootlx file is present on the iso9660
  filesystem (e.g., copy bootlx to the directory that is the filesystem
  master, then run mkisofs on that directory).  After that, all that
  remains to be done is to mark the filesystem as SRM bootable.  This is
  achieved with a command of the form:


       # isomarkboot filesystem bootlx



  The command above assumes that filesystem is a file containing the
  iso9660 filesystem and that bootlx has been copied into the root
  directory of that filesystem.  That's it!

  4.5.  Building the Linux Kernel

  A bootable Linux kernel can be built with the following steps.  During
  the make config, be sure to answer "yes" to the question whether you
  want to boot the kernel via SRM (for certain platforms this is
  automatically selected).  Note that if you build a generic kernel (by
  selecting "Generic" as the alpha system type), the kernel is able to
  guess whether it is running under SRM or not.


       # cd /usr/src/linux
       # make config
       # make dep
       # make boot
       # make modules (if applicable)
       # make modules_install (if applicable)



  The last command will build the file arch/alpha/boot/vmlinux.gz which
  can then be copied to the disk from which you want to boot from.  In
  our floppy disk example above, this would entail:


       # mount /dev/fd0 /mnt
       # cp arch/alpha/boot/vmlinux.gz /mnt
       # umount /mnt



  4.6.  Booting Linux

  With the SRM firmware and aboot installed, Linux is generally booted
  with a command of the form:

       boot devicename -fi filename -fl flags


  The filename and flags arguments are optional.  If they are not
  specified, SRM uses the default values stored in environment variables
  BOOTDEF_DEV , BOOT_OSFILE and BOOT_OSFLAGS.  The syntax and meaning of
  these two arguments is described in more detail below. To list the
  current values of these variables type show boot* at the SRM command
  prompt. This will also show a boot_dev variable (among others), this
  variable is read only and needs to be changed via the bootdef_dev
  variable.

  4.6.1.  Device Naming

  This corresponds to the device from which SRM will attempt to boot.
  Examples include:


     dva0
        - First floppy drive, /dev/fd0 under Linux

     dqa0
        - Primary IDE cdrom or hard disk as Master, /dev/hda under Linux

     dqa1
        - Primary IDE cdrom or hard disk as Slave, /dev/hdb under Linux

     dka0
        - SCSI disk on first bus, Device 0, /dev/sda under Linux

     ewa0
        - First Ethernet Device, /dev/eth0 under Linux

  For example to boot from the disk at SCSI id 6, you would enter:


  >>> boot dka600



  To list the devices currently installed in the system type show dev at
  the SRM command line.  In contrast to Linux device naming, the
  partition number on a disk device is not given as part of the device
  name (you may see extra numbers after the device names when running
  show dev - these correspond to things like PCI bus and device numbers
  and are not useful to the user).  Remember, as mentioned in ``'', that
  SRM knows nothing about partitions or disklabels - it merely reads a
  boot block and secondary bootstrap from sectors on a disk.  Therefore,
  the partition number is given as part of the boot filename.

  4.6.2.  Boot Filename

  The filename argument takes the form:

       [n/]filename


  n is a single digit in the range 1..8 that gives the partition number
  from which to boot from.  filename is the path of the file you want
  boot.  For example to boot a kernel named vmlinux.gz from the second
  partition of SCSI device 6, you would enter:


       >>> boot dka600 -file 2/vmlinux.gz



  Or to boot from floppy drive 0, you'd enter:


       >>> boot dva0 -file vmlinux.gz



  If a disk has no partition table, aboot pretends the disk contains one
  ext2 partition starting at the first diskblock.  This allows booting
  from floppy disks.

  As a special case, partition number 0 is used to request booting from
  a disk that does not (yet) contain a file system.  When specifying
  "partition" number 0, aboot assumes that the Linux kernel is stored
  right behind the aboot image.  Such a layout can be achieved with the
  swriteboot command.  For example, to setup a filesystem-less boot from
  /dev/sda, one could use the command:


       # swriteboot /dev/sda bootlx vmlinux.gz



  Booting a system in this way is not normally necessary.  The reason
  this feature exists is to make it possible to get Linux installed on a
  systems that can't boot from a floppy disk (e.g., the Jensen).

  4.6.3.  Boot Flags

  A number of bootflags can be specified.  The syntax is:

  -flags "options..."



  Where "options..." is any combination the following options (separated
  by blanks).  There are many more bootoptions, depending on what
  drivers your kernel has installed.  The options listed below are
  therefore just examples to illustrate the general idea:


     load_ramdisk=1
        Copy root file system from a (floppy) disk to the RAM disk
        before starting the system.  The RAM disk will be used in lieu
        of the root device.  This is useful to bootstrap Linux on a
        system with only one floppy drive.

     floppy=str
        Sets floppy configuration to str.

     root=dev
        Select device dev as the root-file system. The device can be
        specified as a major/minor hex number (e.g., 0x802 for
        /dev/sda2) or one of a few canonical names (e.g., /dev/fd0,
        /dev/sda2).

     single
        Boot system in single user mode.

     kgdb
        Enable kernel-gdb (works only if CONFIG_KGDB is enabled; a
        second Alpha system needs to be connected over the serial port
        in order to make this work)

  Some SRM implementations (e.g., the one for the Jensen) are
  handicapped and allow only short option strings (e.g., at most 8
  characters).  In such a case, aboot can be booted with the single-
  character boot flag "i".  With this flag, aboot will enter interactive
  mode

  4.6.4.  Using aboot interactively

  As of version 0.6, aboot supports a simple command-oriented
  interactive mode.  Note that this is different from the prompt which
  previous versions issued when booted with the "i" flag, or after
  failing to load a kernel.  You can get a summary of the available
  commands by typing "h" or "?" at the prompt:


       >>> boot dka0 -fl i
       aboot> ?
        h, ?                   Display this message
        q                      Halt the system and return to SRM
        p 1-8                  Look in partition <num> for configuration/kernel
        l                      List pre-configured kernels
        d <dir>                List directory <dir> in current filesystem
        b <file> <args>        Boot kernel in <file> (- for raw boot)
                               with arguments <args>
        0-9                    Boot pre-configuration 0-9 (list with 'l')
       aboot> b 3/vmlinux.gz root=/dev/sda3 single



  4.6.5.  The aboot.conf configuration file

  Since booting in that manner quickly becomes tedious, aboot allows to
  define short-hands for frequently used command lines.  In particular,
  a single digit option (0-9) requests that aboot uses the corresponding
  option string stored in file /etc/aboot.conf.  A sample aboot.conf is
  shown below:


       #
       # aboot default configurations
       #
       0:3/vmlinux.gz root=/dev/sda3
       1:3/vmlinux.gz root=/dev/sda3 single
       2:3/vmlinux.new.gz root=/dev/sda3
       3:3/vmlinux root=/dev/sda3
       8:- root=/dev/sda3            # fs-less boot of raw kernel
       9:0/vmlinux.gz root=/dev/sda3 # fs-less boot of (compressed) ECOFF kernel
       -



  With this configuration file, the command


       >>> boot dka0 -fl 1



  corresponds exactly to the boot command shown above.

  Finally, at the aboot prompt, it is possible to enter one of the
  single character flags ("0"-"9") to get the same effect as if that
  flag had been specified in the boot command line.  As noted in the
  help text cited above, you can also list the available default
  configurations with the "l" command.

  4.6.5.1.  Selecting the Partition of /etc/aboot.conf

  When installed on a harddisk, aboot needs to know what partition to
  search for the /etc/aboot.conf file.  A newly compiled aboot will
  search the second partition (e.g., /dev/sda2).  Since it would be
  inconvenient to have to recompile aboot just to change the partition
  number, abootconf allows to directly modify an installed aboot.
  Specifically, if you want to change aboot to use the third partition
  on disk /dev/sda, you'd use the command:


       # abootconf /dev/sda 3



  You can verify the current setting by simply omitting the partition
  number.  That is: abootconf /dev/sda will print the currently selected
  partition number.  Note that aboot does have to be installed already
  for this command to succeed.  As of version 0.6, swriteboot will
  preserve the existing configuration when installing a new aboot on a
  hard disk.

  Since aboot version 0.5, it is also possible to select the aboot.conf
  partition via the boot command line. This can be done with a command
  line of the form a:b where a is the partition that holds
  /etc/aboot.conf and b is a single-letter option as described above
  (0-9, i, or h). For example, if you type boot -fl "3:h" dka100 the
  system boots from SCSI ID 1, loads /etc/aboot.conf from the third
  partition, prints its contents on the screen and waits for you to
  enter the boot options.

  4.7.  Booting Over the Network

  Three steps are necessary before Linux can be booted via a network.
  First you need an Ethernet adapter that is supported by SRM.  Most
  version of SRM support the DE500 series of cards, with newer versions
  (5.6 and later) also supporting the Intel EtherExpress/Pro series of
  cards.  Second, you need to set the SRM environment variables to
  enable booting via the bootp protocol and third you need to setup
  another machine as the your boot server.  Enabling bootp in SRM is
  usually done by setting the ewa0_protocol (DE500 cards) or
  eia0_protocol (Intel cards) variable to bootp.


       >>> set ewa0_protocol bootp



  Setting up the boot server is obviously dependent on what operating
  system that machine is running, but typically it involves starting the
  program bootpd in the background after configuring the /etc/bootptab
  file.  The bootptab file has one entry describing each client that is
  allowed to boot from the server.  For example, if you want to boot the
  machine myhost.cs.arizona.edu, then an entry of the following form
  would be needed:


       myhost.cs.arizona.edu:\
               :hd=/remote/:bf=vmlinux.bootp:\
               :ht=ethernet:ha=08012B1C51F8:hn:vm=rfc1048:\
               :ip=192.12.69.254:bs=auto:



  This entry assumes that the machine's Ethernet address is 08012B1C51F8
  and that its IP address is 192.12.69.254.  The Ethernet address can be
  found with the show device command of the SRM console or, if Linux is
  running, with the ifconfig command.  The entry also defines that if
  the client does not specify otherwise, the file that will be booted is
  vmlinux.bootp in directory /remote.  For more information on
  configuring bootpd, please refer to its man page.

  Next, build aboot with with the command make netboot.  Make sure the
  kernel that you want to boot has been built already.  By default, the
  aboot Makefile uses the kernel in
  /usr/src/linux/arch/alpha/boot/vmlinux.gz (edit the Makefile if you
  want to use a different path).  The result of make netboot is a file
  called vmlinux.bootp which contains aboot and the Linux kernel, ready
  for network booting.

  Finally, copy vmlinux.bootp to the bootserver's directory.  In the
  example above, you'd copy it into /remote/vmlinux.bootp.  Next, power
  up the client machine and boot it, specifying the Ethernet adapter as
  the boot device.  Typically, SRM calls the first Ethernet adapter
  ewa0, so to boot from that device, you'd use the command:


       >>> boot ewa0



  The -fi and -fl options can be used as usual.  In particular, you can
  ask aboot to prompt for Linux kernel arguments by specifying the
  option -fl i.

  4.8.  Partitioning Disks

  4.8.1.  What is a disklabel?

  A disk label is a partition table. Unfortunately, there are several
  formats the partition table can take, depending on the operating
  system.

  DOS partition tables are the standard used by Linux and Windows.
  AlphaBIOS systems and every Linux kernel can read DOS partition
  tables. Unfortunately, the SRM console's boot sector format overlaps
  with parts of the DOS partition table on disk, and therefore DOS
  partition tables cannot be used with SRM.

  BSD disklabels are used by several variants of Unix, including Tru64.
  SRM's boot block does not conflict with the BSD disklabel (in fact,
  the BSD disklabel resides entirely within "reserved" areas of the
  first sector), and Linux can use a BSD disklabel, provided that
  support for BSD disklabels has been compiled into the kernel.

  To boot from a disk using SRM, a BSD disklabel is required. If the
  disk is not a boot disk, the BSD disklabel is not required. A BSD
  disklabel can be created using fdisk, the standard Linux disk
  partitioning tool.

  4.8.2.  Partitioning the Easy Way: a DOS Disklabel

  The simplest way to partition your disk is to let your Linux installer
  do it for you, for example by using Red Hat's disk druid or fdisk.  On
  Red Hat 6.1, this will produce a valid BSD disklabel, but only if the
  disk in question previously contained one.  In most cases, this will
  produce a DOS disklabel.  It will be readable by Linux, but you will
  not be able to boot from it via SRM.  For this reason, you will
  probably want to create a BSD disklabel manually in order to boot
  Linux

  4.8.3.  Partitioning with a BSD Disklabel


  1. Start fdisk on the disk you're configuring

  2. Choose to make a BSD disklabel - option 'b' (newer versions of
     fdisk will detect existing BSD disklabels and automatically enter
     disklabel mode)

  3. You'll notice some things: Partitions are letters instead of
     numbers, from a-h Partition 'c' covers the whole of the disk. This
     is the convention, don't touch it.  While you can see it, note down
     the disk parameters as you'll use them more often than with the
     DOS-disklabel approach

  4. Creating a new partition uses the same procedure as the DOS-
     disklabel approach, except that the partitions are referred to by
     letter instead of number. That is, 'n' to make a new partition
     followed by the partition letter followed by the starting block
     followed by the end block

  5. Setting partition type is slightly different, because the numbering
     scheme is different (1 is swap, 8 is ext2).

  6. When you are finished, write ('w') and quit ('q') as normal.

  There are some important catches that you must be aware of when
  partitioning using a BSD disklabel:

  o  Partition 'a' should start about 1M into the disk: don't start it
     at sector 1, try starting at sector 10 (for example). This leaves
     plenty of space for writing the boot block (see below)

  o  There is a bug in some versions of fdisk which makes the disk look
     one sector bigger than it actually is.  The listing when you create
     the BSD disklabel is correct.  The last sector of partition 'c' is
     correct.  The default last sector when creating a new partition is
     1 sector too big

  o  Always adjust for this extra sector. This bug exists in the version
     of fdisk shipped with Red Hat 6.0. Not making an adjustment for
     this problem almost always leads to "Access beyond end of device"
     errors from the Linux kernel.

  Once you have made a BSD disklabel, continue the installation. After
  installation, you can write a boot block to your disk to make it
  bootable from SRM.

  5.  Sharing a Disk With DEC Unix

  Unfortunately, DEC Unix doesn't know anything about Linux, so sharing
  a single disk between the two OSes is not entirely trivial.  However,
  it is not a difficult task if you heed the tips in this section.  The
  section assumes you are using aboot version 0.5 or newer.

  5.1.  Partitioning the disk

  First and foremost: never use any of the Linux partitioning programs
  (minlabel or fdisk) on a disk that is also used by DEC Unix.  The
  Linux minlabel program uses the same partition table format as DEC
  Unix disklabel, but there are some incompatibilities in the data that
  minlabel fills in, so DEC Unix will simply refuse to accept a
  partition table generated by minlabel.  To setup a Linux ext2
  partition under DEC Unix, you'll have to change the disktab entry for
  your disk.  For the purpose of this discussion, let's assume that you
  have an rz26 disk (a common 1GB drive) on which you want to install
  Linux.  The disktab entry under DEC Unix v3.2 looks like this (see
  file /etc/disktab):


       rz26|RZ26|DEC RZ26 Winchester:\
               :ty=winchester:dt=SCSI:ns#57:nt#14:nc#2570:\
               :oa#0:pa#131072:ba#8192:fa#1024:\
               :ob#131072:pb#262144:bb#8192:fb#1024:\
               :oc#0:pc#2050860:bc#8192:fc#1024:\
               :od#393216:pd#552548:bd#8192:fd#1024:\
               :oe#945764:pe#552548:be#8192:fe#1024:\
               :of#1498312:pf#552548:bf#8192:ff#1024:\
               :og#393216:pg#819200:bg#8192:fg#1024:\
               :oh#1212416:ph#838444:bh#8192:fh#1024:



  The interesting fields here are o?, and p?, where ? is a letter in the
  range a-h (first through 8-th partition).  The o value gives the
  starting offset of the partition (in sectors) and the p value gives
  the size of the partition (also in sectors).  See disktab(4) for more
  info.  Note that DEC Unix likes to define overlapping partitions.  For
  the entry above, the partition layout looks like this (you can verify
  this by adding up the various o and p values):

    a     b         d           e           f
  |---|-------|-----------|-----------|-----------|

                          c
  |-----------------------------------------------|

                       g                 h
              |-----------------|-----------------|



  DEC Unix insists that partition a starts at offset 0 and that
  partition c spans the entire disk.  Other than that, you can setup the
  partition table any way you like.

  Let's suppose you have DEC Unix using partition g and want to install
  Linux on partition h with partition b being a (largish) swap
  partition.  To get this layout without destroying the existing DEC
  Unix partition, you need to set the partition types explicitly.  You
  can do this by adding a t field for each partition.  In our case, we
  add the following line to the above disktab entry.


               :ta=unused:tb=swap:tg=4.2BSD:th=resrvd8:



  Now why do we mark partition h as "reservd8" instead of "ext2"?  Well,
  DEC Unix doesn't know about Linux.  It so happens that partition type
  "ext2" corresponds to a numeric value of 8, and DEC Unix uses the
  string "reservd8" for that value.  Thus, in DEC Unix speak, "reservd8"
  means "ext2".  OK, this was the hard part.  Now we just need to
  install the updated disktab entry on the disk.  Let's assume the disk
  has SCSI id 5.  In this case, we'd do:


       # disklabel -rw /dev/rrz5c rz26



  You can verify that everything is all right by reading back the
  disklabel with disklabel -r /dev/rrz5c.  At this point, you may want
  to reboot DEC Unix and make sure the existing DEC Unix partition is
  still alive and well.  If that is the case, you can shut down the
  machine and start with the Linux installation.  Be sure to skip the
  disk partitioning step during the install.  Since we already installed
  a good partition table, you should be able to proceed and select the
  8th partition as the Linux root partition and the 2nd partition as the
  swap partition.  If the disk is, say, the second SCSI disk in the
  machine, then the device name for these partitions would be /dev/sdb8
  and /dev/sdb2, respectively (note that Linux uses letters to name the
  drives and numbers to name the partitions, which is exactly reversed
  from what DEC Unix does; the Linux scheme makes more sense, of course
  ;-).

  5.2.  Installing aboot

  First big caveat: with the SRM firmware, you can boot one and only one
  operating system per disk.  For this reason, it is generally best to
  have at least two SCSI disks in a machine that you want to dual-boot
  between Linux and DEC Unix.  Of course, you could also boot Linux from
  a floppy if speed doesn't matter or over the network, if you have a
  bootp-capable server.  But in this section we assume you want to boot
  Linux from a disk that contains one or more DEC Unix partitions.

  Second big caveat: installing aboot on a disk shared with DEC Unix
  renders the first and third partition unusable (since those must have
  a starting offset of 0).  For this reason, we recommend that you
  change the size of partition a to something that is just big enough to
  hold aboot (1MB should be plenty).

  Once these two caveats are taken care of, installing aboot is almost
  as easy as usual: since partition a and c will overlap with aboot, we
  need to tell swriteboot that this is indeed OK.  We can do this under
  Linux with a command line of the following form (again, assuming we're
  trying to install aboot on the second SCSI disk):


       # swriteboot -f1 -f3 /dev/sdb bootlx



  The -f1 means that we want to force writing bootlx even though it
  overlaps with partition 1.  The corresponding applies for partition 3.

  This is it.  You should now be able to shutdown the system and boot
  Linux from the harddisk.  In our example, the SRM command line to do
  this would be:


       >>> boot dka5 -fi 8/vmlinux.gz -fl root=/dev/sdb8



  6.  Installation of Distributions

  6.1.  RedHat 6.0 and 6.1

  6.1.1.  Installation from the Red Hat 6.0 or 6.1 CD

  Red Hat have made their distribution CD bootable from SRM console (--
  Please note that through the official RedHat CD-ROM is SRM bootable,
  copies made by various other companies may not be bootable.--)

  To start an installation, put the CD in and type the following:


       >>> boot srm-device -file kernels/generic.gz -flags root=linux-device



  In the above, the SRM device name and Linux device name for your CD-
  ROM drive are needed.  For Example if the machine had an IDE cdrom
  installed as primary master the command would look like this:


       >>> boot dqa0 -file kernels/generic.gz -flags "root=/dev/hda"



  See the section on ``'' conventions if you don't know what these are.



  6.2.  SuSE 6.1

  6.2.1.  Installation from the SuSE 6.1 CD

  The SuSE 6.1 CD is not bootable from SRM console. SuSE have an
  alternative approach which involves creating two boot floppies, the
  images of which are included on the CD.  The boot disks can be created
  in various ways, depending on the systems you have available

  Writing the boot disks from a linux system The command to use is dd.
  From the mount-point of SuSE CD 1, the commands are:


       # dd if=disks/aboot of=/dev/fd0
       # dd if=disks/install of=/dev/fd0



  For writing the boot disks from a windows system, the command to use
  is rawrite. It is available on the CD.



       D:\tools\> rawrite



  The program then prompts for input disk image and output disk drive.
  Run this command once for each of the disk images as shown above.

  Starting the SuSE installer from the boot disks With the floppy disk
  made from the aboot image in place, type:


       >>> boot dva0 -file vmlinux.gz -flags "root=/dev/fd0 load_ramdisk=1"



  This will start the kernel, prompt you for the second boot disk, and
  start the installer

  6.3.  SuSE 6.3

  6.3.1.  Installation from the SuSE 6.3 CD

  The SuSE 6.3 CD-ROM is SRM bootable much like the RedHat 6.0 and 6.1
  CD-ROMs. The best way to start the install from SRM is to use the
  following command:


       >>> boot srm-device -flags 0



  In the above, the SRM device names for your CD-ROM drive is needed.
  For Example if the machine had an IDE cdrom installed as primary
  master the command would look like this:


       >>> boot dqa0 -flags 0


  SuSE has added support to aboot to allow it to load initrd files. The
  above command will from the CD-ROM drive and use config number 0 from
  the /etc/aboot.conf file. For other variations on this refer to the
  SuSE installation guide.

  7.  Document History

  v0.6.1 21 March 2000 Changes from Rich Payne <rdp@alphalinux.org>

  o  Made the installation hints a new chapter

  o  Added information on Netbooting

  o  Added to the new section on RedHat 6.1 and BSD disklabels

  o  Removed David Mosberger-Tang's name from the authors list

  o  Marked a few of the feature as being in 0.6 only

  o  Added info for SuSE 6.3 and RedHat 6.1

  v0.6 3 March 2000 Changes and information from David Huggins-Daines
  <dhd@linuxcare.com>

  o  Moved the notes on MILO vs. SRM to an "About this document" section

  o  Added sections on switching to SRM, and basic SRM usage

  o  Added section on the new interactive use of aboot

  o  Updated the note on DOS partition tables to mention the Red Hat 6.1
     installer's behavior.

  o  Normalized the markup, and codified the conventions used for user-
     entered commands.

  o  Corrected the notes on BSD disklabels (SRM does not read BSD
     disklabels, it's just that they don't conflict with the boot
     block).

  v0.5.2 5 December 1999 Added comments and information from Stig Telfer
  (stig @ alpha-processor.com).

  o  Added chart on SRM to Linux name mappings

  o  Added RedHat 6.0 and SuSE 6.1 installation information

  o  Added Disk Partitioning Information

  v0.5.1 (Not Released) 13 November 1999 Took the original 0.5 document
  and updated several parts:


  o  Update information on SRM booting from IDE devices

  o  Fixed URL to aboot source

  o  Update toc page to reflect MILO's future

  o  Included information on bootdef_dev and boot_dev to chapter 3

  o  Added this section

  v0.5 17 August 1996 - Original Document by David Mosberger-Tang



Secure Programming for Linux and Unix HOWTO

David A. Wheeler

   Copyright  1999, 2000 by David A. Wheeler
   
   This paper provides a set of design and implementation guidelines for
   writing secure programs for Linux and Unix systems. Such programs
   include application programs used as viewers of remote data, CGI
   scripts, network servers, and setuid/setgid programs. Specific
   guidance for C, C++, Java, Perl, Python, and Ada95 are included.
   
   This document is Copyright (C) 1999-2000 David A. Wheeler. Permission
   is granted to copy, distribute and/or modify this document under the
   terms of the GNU Free Documentation License (GFDL), Version 1.1 or any
   later version published by the Free Software Foundation; with the
   invariant sections being ``About the Author'', with no Front-Cover
   Texts, and no Back-Cover texts. A copy of the license is included in
   the section entitled "GNU Free Documentation License". This document
   is distributed in the hope that it will be useful, but WITHOUT ANY
   WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE.
     _________________________________________________________________
   
   Table of Contents
   1. [1]Introduction
   2. [2]Background
          
        2.1. [3]History of Unix, Linux, and Open Source Software
        2.2. [4]Security Principles
        2.3. [5]Types of Secure Programs
        2.4. [6]Paranoia is a Virtue
        2.5. [7]Why Did I Write This Document?
        2.6. [8]Sources of Design and Implementation Guidelines
        2.7. [9]Document Conventions
                
   3. [10]Summary of Linux and Unix Security Features
          
        3.1. [11]Processes
        3.2. [12]Files
        3.3. [13]System V IPC
        3.4. [14]Sockets and Network Connections
        3.5. [15]Signals
        3.6. [16]Quotas and Limits
        3.7. [17]Dynamically Linked Libraries
        3.8. [18]Audit
        3.9. [19]PAM
                
   4. [20]Validate All Input
          
        4.1. [21]Command line
        4.2. [22]Environment Variables
        4.3. [23]File Descriptors
        4.4. [24]File Contents
        4.5. [25]CGI Inputs
        4.6. [26]Other Inputs
        4.7. [27]Character Encoding
        4.8. [28]Limit Valid Input Time and Load Level
                
   5. [29]Avoid Buffer Overflow
          
        5.1. [30]Dangers in C/C++
        5.2. [31]Library Solutions in C/C++
        5.3. [32]Compilation Solutions in C/C++
        5.4. [33]Other Languages
                
   6. [34]Structure Program Internals and Approach
          
        6.1. [35]Secure the Interface
        6.2. [36]Minimize Privileges
        6.3. [37]Avoid Creating Setuid/Setgid Scripts
        6.4. [38]Configure Safely and Use Safe Defaults
        6.5. [39]Fail Safe
        6.6. [40]Avoid Race Conditions
        6.7. [41]Trust Only Trustworthy Channels
        6.8. [42]Use Internal Consistency-Checking Code
        6.9. [43]Self-limit Resources
                
   7. [44]Carefully Call Out to Other Resources
          
        7.1. [45]Limit Call-outs to Valid Values
        7.2. [46]Check All System Call Returns
                
   8. [47]Send Information Back Judiciously
          
        8.1. [48]Minimize Feedback
        8.2. [49]Handle Full/Unresponsive Output
                
   9. [50]Language-Specific Issues
          
        9.1. [51]C/C++
        9.2. [52]Perl
        9.3. [53]Python
        9.4. [54]Shell Scripting Languages (sh and csh Derivatives)
        9.5. [55]Ada
        9.6. [56]Java
                
   10. [57]Special Topics
          
        10.1. [58]Passwords
        10.2. [59]Random Numbers
        10.3. [60]Cryptographic Algorithms and Protocols
        10.4. [61]PAM
        10.5. [62]Miscellaneous
                
   11. [63]Conclusion
   12. [64]Bibliography
   A. [65]History
   B. [66]Acknowledgements
   C. [67]About the Documentation License
   D. [68]GNU Free Documentation License
   E. [69]Endorsements
   F. [70]About the Author
     _________________________________________________________________
   
Chapter 1. Introduction

     
   
   A wise man attacks the city of the mighty and pulls down the
   stronghold in which they trust.
     Proverbs 21:22 (NIV)
   
   This paper describes a set of design and implementation guidelines for
   writing secure programs on Linux and Unix systems. For purposes of
   this paper, a ``secure program'' is a program that sits on a security
   boundary, taking input from a source that does not have the same
   access rights as the program. Such programs include application
   programs used as viewers of remote data, CGI scripts, network servers,
   and setuid/setgid programs. This paper does not address modifying the
   operating system kernel itself, although many of the principles
   discussed here do apply. These guidelines were developed as a survey
   of ``lessons learned'' from various sources on how to create such
   programs (along with additional observations by the author),
   reorganized into a set of larger principles. This paper includes
   specific guidance for a number of languages, including C, C++, Java,
   Perl, Python, and Ada95.
   
   This paper does not cover assurance measures, software engineering
   processes, and quality assurance approaches, which are important but
   widely discussed elsewhere. Such measures include testing, peer
   review, configuration management, and formal methods. Documents
   specifically identifying sets of development assurance measures for
   security issues include the Common Criteria [CC 1999] and the System
   Security Engineering Capability Maturity Model [SSE-CMM 1999]. More
   general sets of software engineering methods or processes are defined
   in documents such as the Software Engineering Institute's Capability
   Maturity Model for Software (SE-CMM), ISO 9000 (along with ISO 9001
   and ISO 9001-3), and ISO 12207.
   
   This paper does not discuss how to configure a system (or network) to
   be secure in a given environment. This is clearly necessary for secure
   use of a given program, but a great many other documents discuss
   secure configurations. An excellent general book on configuring
   Unix-like systems to be secure is Garfinkel [1996]. Other books for
   securing Unix-like systems include Anonymous [1998]. You can also find
   information on configuring Unix-like systems at web sites such as
   [71]http://www.unixtools.com/security.html. Information on configuring
   a Linux system to be secure is available in a wide variety of
   documents including Fenzi [1999], Seifried [1999], Wreski [1998], and
   Anonymous [1999].
   
   This paper assumes that the reader understands computer security
   issues in general, the general security model of Unix-like systems,
   and the C programming language. This paper does include some
   information about the Linux and Unix programming model for security.
   
   While this paper covers all Unix-like systems, including Linux and the
   various strains of Unix, it particularly stresses Linux and provides
   details about Linux specifically. There are several reasons for this.
   One simple reason is popularity: according to one survey, in 1999
   significantly more servers were installed with Linux than with all
   Unix operating system types combined (25% for Linux versus 15% for all
   Unix system types combined) [Shankland 2000]. Also, the original
   version of this document only discussed Linux, so although its scope
   has expanded, the Linux information is still noticeably dominant. If
   you know relevant information not already included here, please let me
   know.
   
   You can find the master copy of this document at
   [72]http://www.dwheeler.com/secure-programs. This document is also
   part of the Linux Documentation Project (LDP) at
   [73]http://www.linuxdoc.org It's also mirrored in several other
   places. Please note that these mirrors, including the LDP copy and/or
   the copy in your distribution, may be older than the master copy. I'd
   like to hear comments on this document, but please do not send
   comments until you've checked to make sure that your comment is valid
   for the latest version.
   
   This document is (C) 1999-2000 David A. Wheeler and is covered by the
   GNU Free Documentation License (GFDL); see the last section for more
   information.
   
   This paper first discusses the background of Unix, Linux, and
   security. The next section describes the general Unix and Linux
   security model, giving an overview of the security attributes and
   operations of processes, filesystem objects, and so on. This is
   followed by the meat of this paper, a set of design and implementation
   guidelines for developing applications on Linux and Unix systems. The
   paper ends with conclusions, a lengthy bibliography, and appendices.
   
   The design and implementation guidelines are divided into categories
   which I believe emphasize the programmer's viewpoint. Programs accept
   inputs, process data, call out to other resources, and produce output;
   notionally all security guidelines fit into one of these categories.
   I've divided processing data into further categories: avoiding buffer
   overflows (which in some cases can also be considered an input issue),
   structuring program internals and approach, language-specific
   information, and special topics. The actual chapter layout was
   reordered slightly to be easier to follow. Thus, the document chapters
   on guidelines discuss validating all input, avoiding buffer overflows,
   structuring program internals and approach, carefully calling out to
   other resources, judiciously sending information back,
   language-specific information, and finally information on special
   topics (such as how to acquire random numbers).
     _________________________________________________________________
   
Chapter 2. Background

     
   
   I issued an order and a search was made, and it was found that this
   city has a long history of revolt against kings and has been a place
   of rebellion and sedition.
     Ezra 4:19 (NIV)
     _________________________________________________________________
   
2.1. History of Unix, Linux, and Open Source Software

2.1.1. Unix

   In 1969-1970, Kenneth Thompson, Dennis Ritchie, and others at AT&T
   Bell Labs began developing a small operating system on a little-used
   PDP-7. The operating system was soon christened Unix, a pun on an
   earlier operating system project called MULTICS. In 1972-1973 the
   system was rewritten in the programming language C, an unusual step
   that was visionary: due to this decision, Unix was the first
   widely-used operating system that could switch from and outlive its
   original hardware. Other innovations were added to Unix as well, in
   part due to synergies between Bell Labs and the academic community. In
   1979, the ``seventh edition'' (V7) version of Unix was released, the
   grandfather of all extant Unix systems.
   
   After this point, the history of Unix becomes somewhat convoluted. The
   academic community, led by Berkeley, developed a variant called the
   Berkeley Software Distribution (BSD), while AT&T continued developing
   Unix under the names ``System III'' and later ``System V''. In the
   late 1980's through early 1990's the ``wars'' between these two major
   strains raged. After many years each variant adopted many of the key
   features of the other. Commercially, System V won the ``standards
   wars'' (getting most of its interfaces into the formal standards), and
   most hardware vendors switched to AT&T's System V. However, System V
   ended up incorporating many BSD innovations, so the resulting system
   was more a merger of the two branches. The BSD branch did not die, but
   instead became widely used for research, for PC hardware, and for
   single-purpose servers (e.g., many web sites use a BSD derivative).
   
   The result was many different versions of Unix, all based on the
   original seventh edition. Most versions of Unix were proprietary and
   maintained by their respective hardware vendor, for example, Sun
   Solaris is a variant of System V. Three versions of the BSD branch of
   Unix ended up as open source: FreeBSD (concentating on
   ease-of-installation for PC-type hardware), NetBSD (concentrating on
   many different CPU architectures), and a variant of NetBSD, OpenBSD
   (concentrating on security). More general information can be found at
   [74]http://www.datametrics.com/tech/unix/uxhistry/brf-hist.htm. Much
   more information about the BSD history can be found in [McKusick 1999]
   and
   [75]ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/share/misc/b
   sd-family-tree.
   
   Those interested in reading an advocacy piece that presents arguments
   for using Unix-like systems should see [76]http://www.unix-vs-nt.org.
     _________________________________________________________________
   
2.1.2. Free Software Foundation

   In 1984 Richard Stallman's Free Software Foundation (FSF) began the
   GNU project, a project to create a free version of the Unix operating
   system. By free, Stallman meant software that could be freely used,
   read, modified, and redistributed. The FSF successfully built a vast
   number of useful components, including a C compiler (gcc), an
   impressive text editor (emacs), and a host of fundamental tools.
   However, in the 1990's the FSF was having trouble developing the
   operating system kernel [FSF 1998]; without a kernel the rest of their
   software would not work.
     _________________________________________________________________
   
2.1.3. Linux

   In 1991 Linus Torvalds began developing an operating system kernel,
   which he named ``Linux'' [Torvalds 1999]. This kernel could be
   combined with the FSF material and other components (in particular
   some of the BSD components and MIT's X-windows software) to produce a
   freely-modifiable and very useful operating system. This paper will
   term the kernel itself the ``Linux kernel'' and an entire combination
   as ``Linux''. Note that many use the term ``GNU/Linux'' instead for
   this combination.
   
   In the Linux community, different organizations have combined the
   available components differently. Each combination is called a
   ``distribution'', and the organizations that develop distributions are
   called ``distributors''. Common distributions include Red Hat,
   Mandrake, SuSE, Caldera, Corel, and Debian. There are differences
   between the various distributions, but all distributions are based on
   the same foundation: the Linux kernel and the GNU glibc libraries.
   Since both are covered by ``copyleft'' style licenses, changes to
   these foundations generally must be made available to all, a unifying
   force between the Linux distributions at their foundation that does
   not exist between the BSD and AT&T-derived Unix systems. This paper is
   not specific to any Linux distribution; when it discusses Linux it
   presumes Linux kernel version 2.2 or greater and the C library glibc
   2.1 or greater, valid assumptions for essentially all current major
   Linux distributions.
     _________________________________________________________________
   
2.1.4. Open Source Software

   Increased interest in such ``free software'' has made it increasingly
   necessary to define and explain it. A widely used term is ``open
   source software'', which further defined in [OSI 1999]. Eric Raymond
   [1997, 1998] wrote several seminal articles examining its development
   process. Another widely-used term is ``free software'', where the
   ``free'' is short for ``freedom'': the usual explanation is ``free
   speech, not free beer''. Neither phrase is perfect. The term ``free
   software'' is often confused with programs whose executables are given
   away at no charge, but whose source code cannot be viewed, modified,
   or redistributed. Conversely, the term ``open source'' is sometime
   (ab)used to mean software whose source code is visible, but for which
   there are limitations on use, modification, or redistribution. This
   paper uses the term ``open source'' for its usual meaning, that is,
   software which has its source code freely available for use, viewing,
   modification, and redistribution. Those interested in reading advocacy
   pieces for open source software should see
   [77]http://www.opensource.org and [78]http://www.fsf.org.
     _________________________________________________________________
   
2.1.5. Comparing Linux and Unix

   This paper uses the term ``Unix-like'' to describe systems
   intentionally like Unix. In particular, the term ``Unix-like''
   includes all major Unix variants and Linux distributions.
   
   Linux is not derived from Unix source code, but its interfaces are
   intentionally like Unix. Therefore, Unix lessons learned generally
   apply to both, including information on security. Most of the
   information in this paper applies to any Unix-like system.
   Linux-specific information has been intentionally added to enable
   those using Linux to take advantage of Linux's capabilities.
   
   Unix-like systems share a number of security mechanisms, though there
   are subtle differences and not all systems have all mechanisms
   available. All include user and group ids (uids and gids) for each
   process and a filesystem with read, write, and execute permissions
   (for user, group, and other). See Thompson [1974] and Bach [1986] for
   general information on Unix systems, including their basic security
   mechanisms. Section 3 summarizes key Unix and Linux security
   mechanisms.
     _________________________________________________________________
   
2.2. Security Principles

   There are many general security principles which you should be
   familiar with; consult a general text on computer security such as
   [Pfleeger 1997]. Often computer security goals are described in terms
   of three overall goals:
   
     * Confidentiality (also known as secrecy), meaning that the
       computing system's assets are accessible only by authorized
       parties.
     * Integrity, meaning that the assets can only be modified by
       authorized parties in authorized ways.
     * Availability, meaning that the assets are accessible to the
       authorized parties. This goal is often referred to by its antonym,
       denial of service.
       
   Some people define additional security goals, while others lump those
   additional goals as special cases of these three goals. For example,
   some separately identify non-repudiation as a goal; this is the
   ability to ``prove'' that a sender sent or receiver received a
   message, even if the sender or receiver wishes to deny it later.
   Privacy is sometimes addressed separately from confidentiality; some
   define this as protecting the confidentiality of a user identify
   instead of the data. Most goals require identification and
   authentication, which is sometimes listed as a separate goal, and
   often auditing (also called accountability) is a desirable security
   goal. Sometimes ``access control'' and ``authenticity'' are listed
   separately as well. In any case, it is important to identify your
   program's overall security goals, no matter how you group those goals
   together, so that you'll know when you've met them.
   
   Saltzer [1974] and later Saltzer and Schroeder [1975] list the
   following principles of the design of secure protection systems, which
   are still valid:
   
     * Least privilege. Each user and program should operate using the
       fewest privileges possible. This principle limits the damage from
       an accident, error, or attack. It also reduces the number of
       potential interactions among privileged programs, so
       unintentional, unwanted, or improper uses of privilege are less
       likely to occur. This idea can be extended to the internals of a
       program: only the smallest portion of the program which needs
       those privileges should have them.
     * Economy of mechanism. The protection system's design should be
       simple and small as possible. In their words, ``techniques such as
       line-by-line inspection of software and physical examination of
       hardware that implements protection mechanisms are necessary. For
       such techniques to be successful, a small and simple design is
       essential.''
     * Open design. The protection mechanism must not depend on attacker
       ignorance. Instead, the mechanism should be public, depending on
       the secrecy of relatively few (and easily changeable) items like
       passwords or private keys. An open design makes extensive public
       scrutiny possible, and it also makes it possible for users to
       convince themselves that the system about to be used is adequate.
       Frankly, it isn't realistic to try to maintain secrecy for a
       system that is widely distributed; decompilers and subverted
       hardware can quickly expose any ``secrets'' in an implementation.
       Bruce Schneier argues that smart engineers should ``demand open
       source code for anything related to security'', as well as
       ensuring that it receives widespread review and that any
       identified problems are fixed [Schneier 1999].
     * Complete mediation. Every access attempt must be checked; position
       the mechanism so it cannot be subverted. For example, in a
       client-server model, generally the server must do all access
       checking because users can build or modify their own clients.
     * Fail-safe defaults (e.g., permission-based approach). The default
       should be denial of service, and the protection scheme should then
       identify conditions under which access is permitted.
     * Separation of privilege. Ideally, access to objects should depend
       on more than one condition, so that defeating one protection
       system won't enable complete access.
     * Least common mechanism. Minimize the amount and use of shared
       mechanisms (e.g. use of the /tmp or /var/tmp directories). Shared
       objects provide potentially dangerous channels for information
       flow and unintended interactions.
     * Psychological acceptability / Easy to use. The human interface
       must be designed for ease of use so users will routinely and
       automatically use the protection mechanisms correctly. Mistakes
       will be reduced if the security mechanisms closely match the
       user's mental image of his or her protection goals.
     _________________________________________________________________
   
2.3. Types of Secure Programs

   Many different types of programs may need to be secure programs (as
   the term is defined in this paper). Some common types are:
   
     * Application programs used as viewers of remote data. Programs used
       as viewers (such as word processors or file format viewers) are
       often asked to view data sent remotely by an untrusted user (this
       request may be automatically invoked by a web browser). Clearly,
       the untrusted user's input should not be allowed to cause the
       application to run arbitrary programs. It's usually unwise to
       support initialization macros (run when the data is displayed); if
       you must, then you must create a secure sandbox (a complex and
       error-prone task). Be careful of issues such as buffer overflow,
       discussed later, which might allow an untrusted user to force the
       viewer to run an arbitrary program.
     * Application programs used by the administrator (root). Such
       programs shouldn't trust information that can be controlled by
       non-administrators.
     * Local servers (also called daemons).
     * Network-accessible servers (sometimes called network daemons).
     * CGI scripts. These are a special case of network-accessible
       servers, but they're so common they deserve their own category.
       Such programs are invoked indirectly via a web server, which
       filters out some attacks but nevertheless leaves many attacks that
       must be withstood.
     * setuid/setgid programs. These programs are invoked by a local user
       and, when executed, are immediately granted the privileges of the
       program's owner and/or owner's group. In many ways these are the
       hardest programs to secure, because so many of their inputs are
       under the control of the untrusted user and some of those inputs
       are not obvious.
       
   This paper merges the issues of these different types of program into
   a single set. The disadvantage of this approach is that some of the
   issues identified here don't apply to all types of programs. In
   particular, setuid/setgid programs have many surprising inputs and
   several of the guidelines here only apply to them. However, things are
   not so clear-cut, because a particular program may cut across these
   boundaries (e.g., a CGI script may be setuid or setgid, or be
   configured in a way that has the same effect), and some programs are
   divided into several executables each of which can be considered a
   different ``type'' of program. The advantage of considering all of
   these program types together is that we can consider all issues
   without trying to apply an inappropriate category to a program. As
   will be seen, many of the principles apply to all programs that need
   to be secured.
   
   There is a slight bias in this paper towards programs written in C,
   with some notes on other languages such as C++, Perl, Python, Ada95,
   and Java. This is because C is the most common language for
   implementing secure programs on Unix-like systems (other than CGI
   scripts, which tend to use Perl), and most other languages'
   implementations call the C library. This is not to imply that C is
   somehow the ``best'' language for this purpose, and most of the
   principles described here apply regardless of the programming language
   used.
     _________________________________________________________________
   
2.4. Paranoia is a Virtue

   The primary difficulty in writing secure programs is that writing them
   requires a different mindset, in short, a paranoid mindset. The reason
   is that the impact of errors (also called defects or bugs) can be
   profoundly different.
   
   Normal non-secure programs have many errors. While these errors are
   undesirable, these errors usually involve rare or unlikely situations,
   and if a user should stumble upon one they will try to avoid using the
   tool that way in the future.
   
   In secure programs, the situation is reversed. Certain users will
   intentionally search out and cause rare or unlikely situations, in the
   hope that such attacks will give them unwarranted privileges. As a
   result, when writing secure programs, paranoia is a virtue.
     _________________________________________________________________
   
2.5. Why Did I Write This Document?

   One question I've been asked is ``why did you write this document''?
   Here's my answer: Over the last several years I've noticed that many
   developers for Linux and Unix seem to keep falling into the same
   security pitfalls, again and again. Auditors were slowly catching
   problems, but it would have been better if the problems weren't put
   into the code in the first place. I believe that part of the problem
   was that there wasn't a single, obvious place where developers could
   go and get information on how to avoid known pitfalls. The information
   was publicly available, but it was often hard to find, out-of-date,
   incomplete, or had other problems. Most such information didn't
   particularly discuss Linux at all, even though it was becoming widely
   used! That leads up to the answer: I developed this document in the
   hope that future software developers for Linux won't repeat past
   mistakes, resulting in an even more secure form of Linux. I added
   Unix, since it's often wise to make sure that programs can port
   between these systems. You can see a larger discussion of this at
   [79]http://www.linuxsecurity.com/feature_stories/feature_story-6.html.
   
   A related question that could be asked is ``why did you write your own
   document instead of just referring to other documents''? There are
   several answers:
   
     * Much of this information was scattered about; placing the critical
       information in one organized document makes it easier to use.
     * Some of this information is not written for the programmer, but is
       written for an administrator or user.
     * Much of the available information emphasizes portable constructs
       (constructs that work on all Unix-like systems), and failed to
       discuss Linux at all. It's often best to avoid Linux-unique
       abilities for portability's sake, but sometimes the Linux-unique
       abilities can really aid security. Even if non-Linux portability
       is desired, you may want to support the Linux-unique abilities
       when running on Linux. And, by emphasizing Linux, I can include
       references to information that is helpful to someone targeting
       Linux that is not necessarily true for others.
     _________________________________________________________________
   
2.6. Sources of Design and Implementation Guidelines

   Several documents help describe how to write secure programs (or,
   alternatively, how to find security problems in existing programs),
   and were the basis for the guidelines highlighted in the rest of this
   paper.
   
   For general-purpose servers and setuid/setgid programs, there are a
   number of valuable documents (though some are difficult to find
   without having a reference to them).
   
   Matt Bishop [1996, 1997] has developed several extremely valuable
   papers and presentations on the topic, and in fact he has a web page
   dedicated to the topic at
   [80]http://olympus.cs.ucdavis.edu/~bishop/secprog.html. AUSCERT has
   released a programming checklist [81][AUSCERT 1996], based in part on
   chapter 23 of Garfinkel and Spafford's book discussing how to write
   secure SUID and network programs [82][Garfinkel 1996]. [83]Galvin
   [1998a] described a simple process and checklist for developing secure
   programs; he later updated the checklist in [84]Galvin [1998b].
   [85]Sitaker [1999] presents a list of issues for the ``Linux security
   audit'' team to search for. [86]Shostack [1999] defines another
   checklist for reviewing security-sensitive code. The NCSA [87][NCSA]
   provides a set of terse but useful secure programming guidelines.
   Other useful information sources include the Secure Unix Programming
   FAQ [88][Al-Herbish 1999], the Security-Audit's Frequently Asked
   Questions [89][Graham 1999], and [90]Ranum [1998]. Some
   recommendations must be taken with caution, for example, the BSD
   setuid(7) man page [91][Unknown] recommends the use of access(3)
   without noting the dangerous race conditions that usually accompany
   it. Wood [1985] has some useful but dated advice in its ``Security for
   Programmers'' chapter. [92]Bellovin [1994] includes useful guidelines
   and some specific examples, such as how to restructure an ftpd
   implementation to be simpler and more secure. [93]FreeBSD [1999] also
   include useful guidelines.
   
   There are many documents giving security guidelines for programs using
   the Common Gateway Interface (CGI) to interface with the web. These
   include [94]Van Biesbrouck [1996], [95]Gundavaram [unknown],
   [96][Garfinkle 1997] [97]Kim [1996], [98]Phillips [1995], [99]Stein
   [1999], and [100]Webber [1999].
   
   There are many documents specific to a language, which are further
   discussed in the language-specific sections of this document. For
   example, the Perl distribution includes [101]perlsec(1), which
   describes how to use Perl more securely. The Secure Internet
   Programming site at [102]http://www.cs.princeton.edu/sip is interested
   in computer security issues in general, but focuses on mobile code
   systems such as Java, ActiveX, and JavaScript; Ed Felten (one of its
   principles) co-wrote a book on securing Java ([103][McGraw 1999])
   which is discussed in the section on Java. Sun's security code
   guidelines provide some guidelines primarily for Java and C; it is
   available at [104]http://java.sun.com/security/seccodeguide.html.
   
   Yoder [1998] contains a collection of patterns to be used when dealing
   with application security. It's not really a specific set of
   guidelines, but a set of commonly-used patterns for programming that
   you may find useful. The Schmoo group maintains a web page linking to
   information on how to write secure code at
   [105]http://www.shmoo.com/securecode
   
   There are many documents describing the issue from the other direction
   (i.e., ``how to crack a system''). One example is McClure [1999], and
   there's countless amounts of material from that vantage point on the
   Internet.
   
   There's also a large body of information on vulnerabilities already
   identified in existing programs. This can be a useful set of examples
   of ``what not to do,'' though it takes effort to extract more general
   guidelines from the large body of specific examples. There are mailing
   lists that discuss security issues; one of the most well-known is
   [106]Bugtraq, which among other things develops a list of
   vulnerabilities. The CERT Coordination Center (CERT/CC) is a major
   reporting center for Internet security problems which reports on
   vulnerabilities. The CERT/CC occasionally produces advisories that
   provide a description of a serious security problem and its impact,
   along with instructions on how to obtain a patch or details of a
   workaround; for more information see [107]http://www.cert.org. Note
   that originally the CERT was a small computer emergency response team,
   but officially ``CERT'' doesn't stand for anything now. The Department
   of Energy's [108]Computer Incident Advisory Capability (CIAC) also
   reports on vulnerabilities. These different groups may identify the
   same vulnerabilities but use different names. To resolve this problem,
   MITRE supports the Common Vulnerabilities and Exposures (CVE) list
   which creates a single unique identifier (``name'') for all publicly
   known vulnerabilities and security exposures identified by others; see
   [109]http://www.cve.mitre.org. NIST's ICAT is a searchable catalogue
   of computer vulnerabilities, taking the each CVE vulnerability and
   categorizing them so they can be searched and compared later; see
   [110]http://csrc.nist.gov/icat.
   
   This paper is a summary of what I believe are the most useful
   guidelines, so that a programmer can sit down and read this single
   document and be fairly well prepared to implement a secure program. It
   is not a complete list of all possible guidelines. The organization
   presented here is my own (every list has its own, different
   structure), and the Linux-unique guidelines (e.g., on capabilities and
   the fsuid value) are also my own. Reading all of the referenced
   documents listed above as well is highly recommended.
     _________________________________________________________________
   
2.7. Document Conventions

   System manual pages are referenced in the format name(number), where
   number is the section number of the manual. The pointer value that
   means ``does not point anywhere'' is called NULL; C compilers will
   convert the integer 0 to the value NULL in most circumstances where a
   pointer is needed, but note that nothing in the C standard requires
   that NULL actually be implemented by a series of all-zero bits. C and
   C++ treat the character '\0' (ASCII 0) specially, and this value is
   referred to as NIL in this paper (this is usually called ``NUL'', but
   ``NUL'' and ``NULL'' sound identical). Function and method names
   always use the correct case, even if that means that some sentences
   must begin with a lower case letter. I use the term ``Unix-like'' to
   mean Unix, Linux, or other systems whose underlying models are very
   similar to Unix; I can't say POSIX, because there are systems such as
   Windows 2000 that implement portions of POSIX yet have vastly
   different security models. An attacker is called an ``attacker'',
   ``cracker'', or ``adversary''. Some journalists use the word
   ``hacker'' instead of ``attacker''; this paper avoids this (mis)use,
   because many Linux and Unix developers refer to themselves as
   ``hackers'' in the traditional non-evil sense of the term. That is, to
   many Linux and Unix developers, the term ``hacker'' continues to mean
   simply an expert or enthusiast, particularly regarding computers. This
   document uses the ``new'' or ``logical'' quoting system, instead of
   the traditional American quoting system: quoted information does not
   include any trailing punctuation if the punctuation is not part of the
   material being quoted. While this may cause a minor loss of
   typographical beauty, the traditional American system causes
   extraneous characters to be placed inside the quotes. These extraneous
   characters have no effect on prose but can be disastrous in code or
   computer commands.
     _________________________________________________________________
   
Chapter 3. Summary of Linux and Unix Security Features

     
   
   Discretion will protect you, and understanding will guard you.
     Proverbs 2:11 (NIV)
   
   Before discussing guidelines on how to use Linux or Unix security
   features, it's useful to know what those features are from a
   programmer's viewpoint. This section briefly describes those features
   that are widely available on nearly all Unix-like systems. However,
   note that there is considerable variation between different versions
   of Unix-like systems, and not all systems have the abilities described
   here. This chapter also notes some extensions or features specific to
   Linux; Linux distributions tend to be fairly similar to each other
   from the point-of-view of programming for security, because they all
   use essentially the same kernel and C library (and the GPL-based
   licenses encourage rapid dissemination of any innovations). This
   chapter doesn't discuss issues such as implementations of mandatory
   access control (MAC) which many Unix-like systems do not implement. If
   you already know what those features are, please feel free to skip
   this section.
   
   Many programming guides skim briefly over the security-relevant
   portions of Linux or Unix and skip important information. In
   particular, they often discuss ``how to use'' something in general
   terms but gloss over the security attributes that affect their use.
   Conversely, there's a great deal of detailed information in the manual
   pages about individual functions, but the manual pages sometimes
   obscure key security issues with detailed discussions on how to use
   each individual function. This section tries to bridge that gap; it
   gives an overview of the security mechanisms in Linux that are likely
   to be used by a programmer, but concentrating specifically on the
   security ramifications. This section has more depth than the typical
   programming guides, focusing specifically on security-related matters,
   and points to references where you can get more details.
   
   First, the basics. Linux and Unix are fundamentally divided into two
   parts: the kernel and ``user space''. Most programs execute in user
   space (on top of the kernel). Linux supports the concept of ``kernel
   modules'', which is simply the ability to dynamically load code into
   the kernel, but note that it still has this fundamental division. Some
   other systems (such as the HURD) are ``microkernel'' based systems;
   they have a small kernel with more limited functionality, and a set of
   ``user'' programs that implement the lower-level functions
   traditionally implemented by the kernel.
   
   Some Unix-like systems have been extensively modified to support
   strong security, in particular to support U.S. Department of Defense
   requirements for Mandatory Access Control (level B1 or higher). This
   version of this paper doesn't cover these systems or issues; I hope to
   expand to that in a future version.
   
   When users log in, their usernames are mapped to integers marking
   their ``UID'' (for ``user id'') and the ``GID''s (for ``group id'')
   that they are a member of. UID 0 is a special privileged user (role)
   traditionally called ``root''; on most Unix-like systems (including
   Unix) root can overrule most security checks and is used to
   administrate the system. Processes are the only ``subjects'' in terms
   of security (that is, only processes are active objects). Processes
   can access various data objects, in particular filesystem objects
   (FSOs), System V Interprocess Communication (IPC) objects, and network
   ports. Processes can also set signals. Other security-relevant topics
   include quotas and limits, libraries, auditing, and PAM. The next few
   subsections detail this.
     _________________________________________________________________
   
3.1. Processes

   In Unix-like systems, user-level activities are implemented by running
   processes. Most Unix systems support a ``thread'' as a separate
   concept; threads share memory inside a process, and the system
   scheduler actually schedules threads. Linux does this differently (and
   in my opinion uses a better approach): there is no essential
   difference between a thread and a process. Instead, in Linux, when a
   process creates another process it can choose what resources are
   shared (e.g., memory can be shared). The Linux kernel then performs
   optimizations to get thread-level speeds; see clone(2) for more
   information. It's worth noting that the Linux kernel developers tend
   to use the word ``task'', not ``thread'' or ``process'', but the
   external documentation tends to use the word process (so I'll use that
   terminology here). When programming a multi-threaded application, it's
   usually better to use one of the standard thread libraries that hide
   these differences. Not only does this make threading more portable,
   but some libraries provide an additional level of indirection, by
   implementing more than one application-level thread as a single
   operating system thread; this can provide some improved performance on
   some systems for some applications.
     _________________________________________________________________
   
3.1.1. Process Attributes

   Here are typical attributes associated with each process in a
   Unix-like system:
   
     * RUID, RGID - real UID and GID of the user on whose behalf the
       process is running
     * EUID, EGID - effective UID and GID used for privilege checks
       (except for the filesystem)
     * SUID, SGID - Saved UID and GID; used to support switching
       permissions ``on and off'' as discussed below. Not all Unix-like
       systems support this.
     * supplemental groups - a list of groups (GIDs) in which this user
       has membership.
     * umask - a set of bits determining the default access control
       settings when a new filesystem object is created; see umask(2).
     * scheduling parameters - each process has a scheduling policy, and
       those with the default policy SCHED_OTHER have the additional
       parameters nice, priority, and counter. See sched_setscheduler(2)
       for more information.
     * limits - per-process resource limits (see below).
     * filesystem root - the process' idea of where the root filesystem
       begins; see chroot(2).
       
   Here are less-common attributes associated with processes:
   
     * FSUID, FSGID - UID and GID used for filesystem access checks; this
       is usually equal to the EUID and EGID respectively. This is a
       Linux-unique attribute.
     * capabilities - POSIX capability information; there are actually
       three sets of capabilities on a process: the effective,
       inheritable, and permitted capabilities. See below for more
       information on POSIX capabilities. Linux kernel version 2.2 and
       greater support this; some other Unix-like systems do too, but
       it's not as widespread.
       
   In Linux, if you really need to know exactly what attributes are
   associated with each process, the most definitive source is the Linux
   source code, in particular /usr/include/linux/sched.h's definition of
   task_struct.
   
   The portable way to create new processes it use the fork(2) call. BSD
   introduced a variant called vfork(2) as an optimization technique. The
   bottom line with vfork(2) is simple: don't use it if you can avoid it.
   In vfork(2), unlike fork(2), the child borrows the parent's memory and
   thread of control until a call to execve(2V) or an exit occurs; the
   parent process is suspended while the child is using its resources.
   The rationale is that in old BSD systems, fork(2) would actually cause
   memory to be copied while vfork(2) would not. Linux never had this
   problem; because Linux used copy-on-write semantics internally, Linux
   only copies pages when they changed (actually, there are still some
   tables that have to be copied; in most circumstances their overhead is
   not significant). Nevertheless, since some programs depend on
   vfork(2), recently Linux implemented the BSD vfork(2) semantics
   (previously it had been an alias for fork(2)). The problem with
   vfork(2) is that it's actually fairly tricky for a process to not
   interfere with its parent, especially in high-level languages. The
   result: programs using vfork(2) can easily fail when code changes or
   even when compiler versions change. Avoid vfork(2) in most cases; its
   primary use is to support old programs that needed vfork's semantics.
   
   Linux supports the Linux-unique clone(2) call. This call works like
   fork(2), but allows specification of which resources should be shared
   (e.g., memory, file descriptors, etc.). Portable programs shouldn't
   use this call directly; as noted earlier, they should instead rely on
   threading libraries that use the call to implement threads.
   
   This document is not a full tutorial on writing programs, so I will
   skip widely-available information handling processes. You can see the
   documentation for wait(2), exit(2), and so on for more information.
     _________________________________________________________________
   
3.1.2. POSIX Capabilities

   POSIX capabilities are sets of bits that permit splitting of the
   privileges typically held by root into a larger set of more specific
   privileges. POSIX capabilities are defined by a draft IEEE standard;
   they're not unique to Linux but they're not universally supported by
   other Unix-like systems either. Linux kernel 2.0 did not support POSIX
   capabilities, while version 2.2 added support for POSIX capabilities
   to processes. When Linux documentation (including this one) says
   ``requires root privilege'', in nearly all cases it really means
   ``requires a capability'' as documented in the capability
   documentation. If you need to know the specific capability required,
   look it up in the capability documentation.
   
   In Linux, the eventual intent is to permit capabilities to be attached
   to files in the filesystem; as of this writing, however, this is not
   yet supported. There is support for transferring capabilities, but
   this is disabled by default. Linux version 2.2.11 added a feature that
   makes capabilities more directly useful, called the ``capability
   bounding set''. The capability bounding set is a list of capabilities
   that are allowed to be held by any process on the system (otherwise,
   only the special init process can hold it). If a capability does not
   appear in the bounding set, it may not be exercised by any process, no
   matter how privileged. This feature can be used to, for example,
   disable kernel module loading. A sample tool that takes advantage of
   this is LCAP at [111]http://pweb.netcom.com/~spoon/lcap/.
   
   More information about POSIX capabilities is available at
   [112]ftp://linux.kernel.org/pub/linux/libs/security/linux-privs.
     _________________________________________________________________
   
3.1.3. Process Creation and Manipulation

   Processes may be created using fork(2), the non-recommended vfork(2),
   or the Linux-unique clone(2); all of these system calls duplicate the
   existing process, creating two processes out of it. A process can
   execute a different program by calling execve(2), or various
   front-ends to it (for example, see exec(3), system(3), and popen(3)).
   
   When a program is executed, and its file has its setuid or setgid bit
   set, the process' EUID or EGID (respectively) is usually set to the
   file's value. This functionality was the source of an old Unix
   security weakness when used to support setuid or setgid scripts, due
   to a race condition. Between the time the kernel opens the file to see
   which interpreter to run, and when the (now-set-id) interpreter turns
   around and reopens the file to interpret it, an attacker might change
   the file (directly or via symbolic links).
   
   Different Unix-like systems handle the security issue for setuid
   scripts in different ways. Some systems, such as Linux, completely
   ignore the setuid and setgid bits when executing scripts, which is
   clearly a safe approach. Most modern releases of SysVr4 and BSD 4.4
   use a different approach to avoid the kernel race condition. On these
   systems, when the kernel passes the name of the set-id script to open
   to the interpreter, rather than using a pathname (which would permit
   the race condition) it instead passes the filename /dev/fd/3. This is
   a special file already opened on the script, so that there can be no
   race condition for attackers to exploit. Even on these systems I
   recommend against using the setuid/setgid shell scripts language for
   secure programs, as discussed below.
   
   In some cases a process can affect the various UID and GID values; see
   setuid(2), seteuid(2), setreuid(2), and the Linux-unique setfsuid(2).
   In particular the saved user id (SUID) attribute is there to permit
   trusted programs to temporarily switch UIDs. Unix-like systems
   supporting the SUID use the following rules: If the RUID is changed,
   or the EUID is set to a value not equal to the RUID, the SUID is set
   to the new EUID. Unprivileged users can set their EUID from their
   SUID, the RUID to the EUID, and the EUID to the RUID.
   
   The Linux-unique FSUID process attribute is intended to permit
   programs like the NFS server to limit themselves to only the
   filesystem rights of some given UID without giving that UID permission
   to send signals to the process. Whenever the EUID is changed, the
   FSUID is changed to the new EUID value; the FSUID value can be set
   separately using setfsuid(2), a Linux-unique call. Note that non-root
   callers can only set FSUID to the current RUID, EUID, SEUID, or
   current FSUID values.
     _________________________________________________________________
   
3.2. Files

   On all Unix-like systems, the primary repository of information is the
   file tree, rooted at ``/''. The file tree is a hierarchical set of
   directories, each of which may contain filesystem objects (FSOs).
   
   In Linux, filesystem objects (FSOs) may be ordinary files,
   directories, symbolic links, named pipes (also called first-in
   first-outs or FIFOs), sockets (see below), character special (device)
   files, or block special (device) files (in Linux, this list is given
   in the find(1) command). Other Unix-like systems have an identical or
   similar list of FSO types.
   
   Filesystem objects are collected on filesystems, which can be mounted
   and unmounted on directories in the file tree. A filesystem type
   (e.g., ext2 and FAT) is a specific set of conventions for arranging
   data on the disk to optimize speed, reliability, and so on; many
   people use the term ``filesystem'' as a synonym for the filesystem
   type.
     _________________________________________________________________
   
3.2.1. Filesystem Object Attributes

   Different Unix-like systems support different filesystem types.
   Filesystems may have slightly different sets of access control
   attributes and access controls can be affected by options selected at
   mount time. On Linux, the ext2 filesystems is currently the most
   popular filesystem, but Linux supports a vast number of filesystems.
   Most Unix-like systems tend to support multiple filesystems too.
   
   Most filesystems on Unix-like systems store at least the following:
   
     * owning UID and GID - identifies the ``owner'' of the filesystem
       object. Only the owner or root can change the access control
       attributes unless otherwise noted.
     * permission bits - read, write, execute bits for each of user
       (owner), group, and other. For ordinary files, read, write, and
       execute have their typical meanings. In directories, the ``read''
       permission is necessary to display a directory's contents, while
       the ``execute'' permission is sometimes called ``search''
       permission and is necessary to actually enter the directory to use
       its contents. In a directory ``write'' permission on a directory
       permits adding, removing, and renaming files in that directory; if
       you only want to permit adding, set the sticky bit noted below.
       Note that the permission values of symbolic links are never used;
       it's only the values of their containing directories and the
       linked-to file that matter.
     * ``sticky'' bit - when set on a directory, unlinks (removes) and
       renames of files in that directory are limited to the file owner,
       the directory owner, or root privileges. This is a very common
       Unix extension and is specified in the Open Group's Single Unix
       Specification version 2. Old versions of Unix called this the
       ``save program text'' bit and used this to indicate executable
       files that should stay in memory. Systems that did this ensured
       that only root could set this bit (otherwise users could have
       crashed systems by forcing ``everything'' into memory). In Linux,
       this bit has no affect on ordinary files and ordinary users can
       modify this bit on the files they own: Linux's virtual memory
       management makes this old use irrelevant.
     * setuid, setgid - when set on an executable file, executing the
       file will set the process' effective UID or effective GID to the
       value of the file's owning UID or GID (respectively). All
       Unix-like systems support this. In Linux and System V systems,
       when setgid is set on a file that does not have any execute
       privileges, this indicates a file that is subject to mandatory
       locking during access (if the filesystem is mounted to support
       mandatory locking); this overload of meaning surprises many and is
       not universal across Unix-like systems. In fact, the Open Group's
       Single Unix Specification version 2 for chmod(3) permits systems
       to ignore requests to turn on setgid for files that aren't
       executable if such a setting has no meaning. In Linux and Solaris,
       when setgid is set on a directory, files created in the directory
       will have their GID automatically reset to that of the directory's
       GID. The purpose of this approach is to support ``project
       directories'': users can save files into such specially-set
       directories and the group owner automatically changes. However,
       setting the setgid bit on directories is not specified by
       standards such as the Single Unix Specification [Open Group 1997].
     * timestamps - access and modification times are stored for each
       filesystem object. However, the owner is allowed to set these
       values arbitrarily (see touch(1)), so be careful about trusting
       this information. All Unix-like systems support this.
       
   The following are attributes are Linux-unique extensions on the ext2
   filesystem, though many other filesystems have similar functionality:
   
     * immutable bit - no changes to the filesystem object are allowed;
       only root can set or clear this bit. This is only supported by
       ext2 and is not portable across all Unix systems (or even all
       Linux filesystems).
     * append-only bit - only appending to the filesystem object are
       allowed; only root can set or clear this bit. This is only
       supported by ext2 and is not portable across all Unix systems (or
       even all Linux filesystems).
       
   Other common extensions include some sort of bit indicating ``cannot
   delete this file''.
   
   Many of these values can be influenced at mount time, so that, for
   example, certain bits can be treated as though they had a certain
   value (regardless of their values on the media). See mount(1) for more
   information about this. Some filesystems don't support some of these
   access control values; again, see mount(1) for how these filesystems
   are handled. In particular, many Unix-like systems support MS-DOS
   disks, which by default support very few of these attributes (and
   there's not standard way to define these attributes). In that case,
   Unix-like systems emulate the standard attributes (possibly
   implementing them through special on-disk files), and these attributes
   are generally influenced by the mount(1) command.
   
   It's important to note that, for adding and removing files, only the
   permission bits and owner of the file's directory really matter unless
   the Unix-like system supports more complex schemes (such as POSIX
   ACLs). Unless the system has other extensions, and stock Linux 2.2
   doesn't, a file that has no permissions in its permission bits can
   still be removed if its containing directory permits it. Also, if an
   ancestor directory permits its children to be changed by some user or
   group, then any of that directory's descendents can be replaced by
   that user or group.
   
   The draft IEEE POSIX standard on security defines a technique for true
   ACLs that support a list of users and groups with their permissions.
   Unfortunately, this is not widely supported nor supported exactly the
   same way across Unix-like systems. Stock Linux 2.2, for example, has
   neither ACLs nor POSIX capability values in the filesystem.
   
   It's worth noting that in Linux, the Linux ext2 filesystem by default
   reserves a small amount of space for the root user. This is a partial
   defense against denial-of-service attacks; even if a user fills a disk
   that is shared with the root user, the root user has a little space
   left over (e.g., for critical functions). The default is 5% of the
   filesystem space; see mke2fs(8), in particular its ``-m'' option.
     _________________________________________________________________
   
3.2.2. Creation Time Initial Values

   At creation time, the following rules apply. On most Unix systems,
   when a new filesystem object is created via creat(2) or open(2), the
   FSO UID is set to the process' EUID and the FSO's GID is set to the
   process' EGID. Linux works slightly differently due to its FSUID and
   setgid directory extensions; the FSO's UID is set to the process'
   FSUID, and the FSO GID is set to the process' FSGUID; if the
   containing directory's setgid bit is set or the filesystem's ``GRPID''
   flag is set, the FSO GID is actually set to the GID of the containing
   directory. This special case supports ``project'' directories: to make
   a ``project'' directory, create a special group for the project,
   create a directory for the project owned by that group, then make the
   directory setgid: files placed there are automatically owned by the
   project. Similarly, if a new subdirectory is created inside a
   directory with the setgid bit set (and the filesystem GRPID isn't
   set), the new subdirectory will also have its setgid bit set (so that
   project subdirectories will ``do the right thing''.); in all other
   cases the setgid is clear for a new file. FSO basic access control
   values (read, write, execute) are computed from (requested values & ~
   umask of process). New files always start with a clear sticky bit and
   clear setuid bit.
     _________________________________________________________________
   
3.2.3. Changing Access Control Attributes

   You can set most of these values with chmod(2), fchmod(2), or chmod(1)
   but see also chown(1), and chgrp(1). In Linux, some the Linux-unique
   attributes are manipulated using chattr(1).
   
   Note that in Linux, only root can change the owner of a given file.
   Some Unix-like systems allow ordinary users to transfer ownership of
   their files to another, but this causes complications and is forbidden
   by Linux. For example, if you're trying to limit disk usage, allowing
   such operations would allow users to claim that large files actually
   belonged to some other ``victim''.
     _________________________________________________________________
   
3.2.4. Using Access Control Attributes

   Under Linux and most Unix-like systems, reading and writing attribute
   values are only checked when the file is opened; they are not
   re-checked on every read or write. Still, a large number of calls do
   check these attributes, since the filesystem is so central to
   Unix-like systems. Calls that check these attributes include open(2),
   creat(2), link(2), unlink(2), rename(2), mknod(2), symlink(2), and
   socket(2).
     _________________________________________________________________
   
3.2.5. Filesystem Hierarchy

   Over the years conventions have been built on ``what files to place
   where''. Where possible, please follow conventional use when placing
   information in the hierarchy. For example, place global configuration
   information in /etc. The Filesystem Hierarchy Standard (FHS) tries to
   define these conventions in a logical manner, and is widely used by
   Linux systems. The FHS is an update to the previous Linux Filesystem
   Structure standard (FSSTND), incorporating lessons learned and
   approaches from Linux, BSD, and System V systems. See
   [113]http://www.pathname.com/fhs for more information about the FHS. A
   summary of these conventions is in hier(5) for Linux and hier(7) for
   Solaris. Sometimes different conventions disagree; where possible,
   make these situations configurable at compile or installation time.
     _________________________________________________________________
   
3.3. System V IPC

   Many Unix-like systems, including Linux and System V systems, support
   System V interprocess communication (IPC) objects. Indeed System V IPC
   is required by the Open Group's Single UNIX Specification, Version 2
   [Open Group 1997]. System V IPC objects can be one of three kinds:
   System V message queues, semaphore sets, and shared memory segments.
   Each such object has the following attributes:
   
     * read and write permissions for each of creator, creator group, and
       others.
     * creator UID and GID - UID and GID of the creator of the object.
     * owning UID and GID - UID and GID of the owner of the object
       (initially equal to the creator UID).
       
   When accessing such objects, the rules are as follows:
   
     * if the process has root privileges, the access is granted.
     * if the process' EUID is the owner or creator UID of the object,
       then the appropriate creator permission bit is checked to see if
       access is granted.
     * if the process' EGID is the owner or creator GID of the object, or
       one of the process' groups is the owning or creating GID of the
       object, then the appropriate creator group permission bit is
       checked for access.
     * otherwise, the appropriate ``other'' permission bit is checked for
       access.
       
   Note that root, or a process with the EUID of either the owner or
   creator, can set the owning UID and owning GID and/or remove the
   object. More information is available in ipc(5).
     _________________________________________________________________
   
3.4. Sockets and Network Connections

   Sockets are used for communication, particularly over a network.
   Sockets were originally developed by the BSD branch of Unix systems,
   but they are generally portable to other Unix-like systems: Linux and
   System V variants support sockets as well, and socket support is
   required by the Open Group's Single Unix Specification [Open Group
   1997]. System V systems traditionally used a different (incompatible)
   network communication interface, but it's worth noting that systems
   like Solaris include support for sockets. Socket(2) creates an
   endpoint for communication and returns a descriptor, in a manner
   similar to open(2) for files. The parameters for socket specify the
   protocol family and type, such as the Internet domain (TCP/IP version
   4), Novell's IPX, or the ``Unix domain''. A server then typically
   calls bind(2), listen(2), and accept(2) or select(2). A client
   typically calls bind(2) (though that may be omitted) and connect(2).
   See these routine's respective man pages for more information. It can
   be difficult to understand how to use sockets from their man pages;
   you might want to consult other papers such as Hall "Beej" [1999] to
   learn how these calls are used together.
   
   The ``Unix domain sockets'' don't actually represent a network
   protocol; they can only connect to sockets on the same machine. (at
   the time of this writing for the standard Linux kernel). When used as
   a stream, they are fairly similar to named pipes, but with significant
   advantages. In particular, Unix domain socket is connection-oriented;
   each new connection to the socket results in a new communication
   channel, a very different situation than with named pipes. Because of
   this property, Unix domain sockets are often used instead of named
   pipes to implement IPC for many important services. Just like you can
   have unnamed pipes, you can have unnamed Unix domain sockets using
   socketpair(2); unnamed Unix domain sockets are useful for IPC in a way
   similar to unnamed pipes.
   
   There are several interesting security implications of Unix domain
   sockets. First, although Unix domain sockets can appear in the
   filesystem and can have stat(2) applied to them, you can't use open(2)
   to open them (you have to use the socket(2) and friends interface).
   Second, Unix domain sockets can be used to pass file descriptors
   between processes (not just the file's contents). This odd capability,
   not available in any other IPC mechanism, has been used to hack all
   sorts of schemes (the descriptors can basically be used as a limited
   version of the ``capability'' in the computer science sense of the
   term). File descriptors are sent using sendmsg(2), where the msg
   (message)'s field msg_control points to an array of control message
   headers (field msg_controllen must specify the number of bytes
   contained in the array). Each control message is a struct cmsghdr
   followed by data, and for this purpose you want the cmsg_type set to
   SCM_RIGHTS. A file descriptor is retrieved through recvmsg(2) and then
   tracked down in the analogous way. Frankly, this feature is quite
   baroque, but it's worth knowing about.
   
   Linux 2.2 supports an addition feature in Unix domain sockets: you can
   acquire the peer's ``credentials'' (the pid, uid, and gid). Here's
   some sample code:
 /* fd= file descriptor of Unix domain socket connected
    to the client you wish to identify */

 struct ucred cr;
 int cl=sizeof(cr);

 if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &cl)==0) {
   printf("Peer's pid=%d, uid=%d, gid=%d\n",
           cr.pid, cr.uid, cr.gid);

   Standard Unix convention is that binding to TCP and UDP local port
   numbers less than 1024 requires root privilege, while any process can
   bind to an unbound port number of 1024 or greater. Linux follows this
   convention, more specifically, Linux requires a process to have the
   capability CAP_NET_BIND_SERVICE to bind to a port number less than
   1024; this capability is normally only held by processes with an euid
   of 0. The adventurous can check this in Linux by examining its Linux's
   source; in Linux 2.2.12, it's file /usr/src/linux/net/ipv4/af_inet.c,
   function inet_bind().
     _________________________________________________________________
   
3.5. Signals

   Signals are a simple form of ``interruption'' in the Unix-like OS
   world, and are an ancient part of Unix. A process can set a ``signal''
   on another process (say using kill(1) or kill(2)), and that other
   process would receive and handle the signal asynchronously. For a
   process to have permission to send a signal to some other process, the
   sending process must either have root privileges, or the real or
   effective user ID of the sending process must equal the real or saved
   set-user-ID of the receiving process.
   
   Although signals are an ancient part of Unix, they've had different
   semantics in different implementations. Basically, they involve
   questions such as ``what happens when a signal occurs while handling
   another signal''? The older Linux libc 5 used a different set of
   semantics for some signal operations than the newer GNU libc
   libraries. For more information, see the glibc FAQ (on some systems a
   local copy is available at /usr/doc/glibc-*/FAQ).
   
   For new programs, just use the POSIX signal system (which in turn was
   based on BSD work); this set is widely supported and doesn't have the
   problems that some of the older signal systems did. The POSIX signal
   system is based on using the sigset_t datatype, which can be
   manipulated through a set of operations: sigemptyset(), sigfillset(),
   sigaddset(), sigdelset(), and sigismember(). You can read about these
   in sigsetops(3). Then use sigaction(2), sigaction(2), sigprocmask(2),
   sigpending(2), and sigsuspend(2) to set up an manipulate signal
   handling (see their man pages for more information).
   
   In general, make any signal handlers very short and simple, and look
   carefully for race conditions. Signals, since they are by nature
   asynchronous, can easily cause race conditions.
   
   A common convention exists for servers: if you receive SIGHUP, you
   should close any log files, reopen and reread configuration files, and
   then re-open the log files. This supports reconfiguration without
   halting the server and log rotation without data loss. If you are
   writing a server where this convention makes sense, please support it.
     _________________________________________________________________
   
3.6. Quotas and Limits

   Many Unix-like systems have mechanisms to support filesystem quotas
   and process resource limits. This certainly includes Linux. These
   mechanisms are particularly useful for preventing denial of service
   attacks; by limiting the resources available to each user, you can
   make it hard for a single user to use up all the system resources. Be
   careful with terminology here, because both filesystem quotas and
   process resource limits have ``hard'' and ``soft'' limits but the
   terms mean slightly different things.
   
   You can define storage (filesystem) quota limits on each mountpoint
   for the number of blocks of storage and/or the number of unique files
   (inodes) that can be used, and you can set such limits for a given
   user or a given group. A ``hard'' quota limit is a never-to-exceed
   limit, while a ``soft'' quota can be temporarily exceeded. See
   quota(1), quotactl(2), and quotaon(8).
   
   The rlimit mechanism supports a large number of process quotas, such
   as file size, number of child processes, number of open files, and so
   on. There is a ``soft'' limit (also called the current limit) and a
   ``hard limit'' (also called the upper limit). The soft limit cannot be
   exceeded at any time, but through calls it can be raised up to the
   value of the hard limit. See getrlimit(), setrlimit(), and
   getrusage(). Note that there are several ways to set these limits,
   including the PAM module pam_limits.
     _________________________________________________________________
   
3.7. Dynamically Linked Libraries

   Practically all programs depend on libraries to execute. In most
   modern Unix-like systems, including Linux, programs are by default
   compiled to use dynamically linked libraries (DLLs). That way, you can
   update a library and all the programs using that library will use the
   new (hopefully improved) version if they can.
   
   Dynamically linked libraries are typically placed in one a few special
   directories. The usual directories include /lib, /usr/lib,
   /lib/security for PAM modules, /usr/X11R6/lib for X-windows, and
   /usr/local/lib.
   
   There are special conventions for naming libraries and having symbolic
   links for them, with the result that you can update libraries and
   still support programs that want to use old, non-backward-compatible
   versions of those libraries. There are also ways to override specific
   libraries or even just specific functions in a library when executing
   a particular program. This is a real advantage of Unix-like systems
   over Windows-like systems; I believe Unix-like systems have a much
   better system for handling library updates, one reason that Unix and
   Linux systems are reputed to be more stable than Windows-based
   systems.
   
   On GNU glibc-based systems, including all Linux systems, the list of
   directories automatically searched during program start-up is stored
   in the file /etc/ld.so.conf. Many Red Hat-derived distributions don't
   normally include /usr/local/lib in the file /etc/ld.so.conf. I
   consider this a bug, and adding /usr/local/lib to /etc/ld.so.conf is a
   common ``fix'' required to run many programs on Red Hat-derived
   systems. If you want to just override a few functions in a library,
   but keep the rest of the library, you can enter the names of
   overriding libraries (.o files) in /etc/ld.so.preload; these
   ``preloading'' libraries will take precedence over the standard set.
   This preloading file is typically used for emergency patches; a
   distribution usually won't include such a file when delivered.
   Searching all of these directories at program start-up would be too
   time-consuming, so a caching arrangement is actually used. The program
   ldconfig(8) by default reads in the file /etc/ld.so.conf, sets up the
   appropriate symbolic links in the dynamic link directories (so they'll
   follow the standard conventions), and then writes a cache to
   /etc/ld.so.cache that's then used by other programs. So, ldconfig has
   to be run whenever a DLL is added, when a DLL is removed, or when the
   set of DLL directories changes; running ldconfig is often one of the
   steps performed by package managers when installing a library. On
   start-up, then, a program uses the dynamic loader to read the file
   /etc/ld.so.cache and then load the libraries it needs.
   
   Various environment variables can control this process, and in fact
   there are environment variables that permit you to override this
   process (so, for example, you can temporarily substitute a different
   library for this particular execution). In Linux, the environment
   variable LD_LIBRARY_PATH is a colon-separated set of directories where
   libraries should be searched for first, before the standard set of
   directories; this is useful when debugging a new library or using a
   nonstandard library for special purposes. The variable LD_PRELOAD
   lists object files with functions that override the standard set, just
   as /etc/ld.so.preload does.
   
   Permitting user control over dynamically linked libraries would be
   disastrous for setuid/setgid programs if special measures weren't
   taken. Therefore, in the GNU glibc implementation, if the program is
   setuid or setgid these variables (and other similar variables) are
   ignored or greatly limited in what they can do. The GNU glibc library
   determines if a program is setuid or setgid by checking the program's
   credentials; if the uid and euid differ, or the gid and the egid
   differ, the library presumes the program is setuid/setgid (or
   descended from one) and therefore greatly limits its abilities to
   control linking. If you load the GNU glibc libraries, you can see
   this; see especially the files elf/rtld.c and
   sysdeps/generic/dl-sysdep.c. This means that if you cause the uid and
   gid to equal the euid and egid, and then call a program, these
   variables will have full effect. Other Unix-like systems handle the
   situation differently but for the same reason: a setuid/setgid program
   should not be unduly affected by the environment variables set.
     _________________________________________________________________
   
3.8. Audit

   Different Unix-like systems handle auditing differently. In Linux, the
   most common ``audit'' mechanism is syslogd(8), usually working in
   conjuction with klogd(8). You might also want to look at wtmp(5),
   utmp(5), lastlog(8), and acct(2). Some server programs (such as the
   Apache web server) also have their own audit trail mechanisms.
   According to the FHS, audit logs should be stored in /var/log or its
   subdirectories.
     _________________________________________________________________
   
3.9. PAM

   Sun Solaris and nearly all Linux systems use the Pluggable
   Authentication Modules (PAM) system for authentication. PAM permits
   run-time configuration of authentication methods (e.g., use of
   passwords, smart cards, etc.). PAM will be discussed more fully later
   in this document.
     _________________________________________________________________
   
Chapter 4. Validate All Input

     
   
   Wisdom will save you from the ways of wicked men, from men whose words
   are perverse...
     Proverbs 2:12 (NIV)
   
   Some inputs are from untrustable users, so those inputs must be
   validated (filtered) before being used. You should determine what is
   legal and reject anything that does not match that definition. Do not
   do the reverse (identify what is illegal and reject those cases),
   because you are likely to forget to handle an important case. Limit
   the maximum character length (and minimum length if appropriate), and
   be sure to not lose control when such lengths are exceeded (see the
   buffer overflow section below for more about this).
   
   For strings, identify the legal characters or legal patterns (e.g., as
   a regular expression) and reject anything not matching that form.
   There are special problems when strings contain control characters
   (especially linefeed or NIL) or shell metacharacters; it is often best
   to ``escape'' such metacharacters immediately when the input is
   received so that such characters are not accidentally sent. CERT goes
   further and recommends escaping all characters that aren't in a list
   of characters not needing escaping [CERT 1998, CMU 1998]. see the
   section on ``limit call-outs to valid values'', below, for more
   information.
   
   Limit all numbers to the minimum (often zero) and maximum allowed
   values. Filenames should be checked; usually you will want to not
   include ``..'' (higher directory) as a legal value. In filenames it's
   best to prohibit any change in directory, e.g., by not including ``/''
   in the set of legal characters. A full email address checker is
   actually quite complicated, because there are legacy formats that
   greatly complicate validation if you need to support all of them; see
   mailaddr(7) and IETF RFC 822 [RFC 822] for more information if such
   checking is necessary.
   
   These tests should usually be centralized in one place so that the
   validity tests can be easily examined for correctness later.
   
   Make sure that your validity test is actually correct; this is
   particularly a problem when checking input that will be used by
   another program (such as a filename, email address, or URL). Often
   these tests are have subtle errors, producing the so-called ``deputy
   problem'' (where the checking program makes different assumptions than
   the program that actually uses the data).
   
   While parsing user input, it's a good idea to temporarily drop all
   privileges. This is especially true if the parsing task is complex
   (e.g., you use to use a lex-like or yacc-like tool), or if the
   programming language doesn't protect against buffer overflows (e.g., C
   and C++). See the section below on minimizing permissions.
   
   The following subsections discuss different kinds of inputs to a
   program; note that input includes process state such as environment
   variables, umask values, and so on. Not all inputs are under the
   control of an untrusted user, so you need only worry about those
   inputs that are.
     _________________________________________________________________
   
4.1. Command line

   Many programs use the command line as an input interface, accepting
   input by being passed arguments. A setuid/setgid program has a command
   line interface provided to it by an untrusted user, so it must defend
   itself. Users have great control over the command line (through calls
   such as the execve(3) call). Therefore, setuid/setgid programs must
   validate the command line inputs and must not trust the name of the
   program reported by command line argument zero (the user can set it to
   any value including NULL).
     _________________________________________________________________
   
4.2. Environment Variables

   By default, environment variables are inherited from a process'
   parent. However, when a program executes another program, the calling
   program can set the environment variables to arbitrary values. This is
   dangerous to setuid/setgid programs, because their invoker can
   completely control the environment variables they're given. Since they
   are usually inherited, this also applies transitively; a secure
   program might call some other program and, without special measures,
   would pass potentially dangerous environment variables values on to
   the program it calls.
     _________________________________________________________________
   
4.2.1. Some Environment Variables are Dangerous

   Some environment variables are dangerous because many libraries and
   programs are controlled by environment variables in ways that are
   obscure, subtle, or undocumented. For example, the IFS variable is
   used by the sh and bash shell to determine which characters separate
   command line arguments. Since the shell is invoked by several
   low-level calls (like system(3) and popen(3) in C, or the back-tick
   operator in Perl), setting IFS to unusual values can subvert
   apparently-safe calls. This behavior is documented in bash and sh, but
   it's obscure; many long-time users only know about IFS because of its
   use in breaking security, not because it's actually used very often
   for its intended purpose. What is worse is that not all environment
   variables are documented, and even if they are, those other programs
   may change and add dangerous environment variables. Thus, the only
   real solution (described below) is to select the ones you need and
   throw away the rest.
     _________________________________________________________________
   
4.2.2. Environment Variable Storage Format is Dangerous

   Normally, programs should use the standard access routines to access
   environment variables. For example, in C, you should get values using
   getenv(3), set them using the POSIX standard routine putenv(3) or the
   BSD extension setenv(3) and eliminate environment variables using
   unsetenv(3). I should note here that setenv(3) is implemented in
   Linux, too. However, crackers need not be so nice; crackers can
   directly control the environment variable data area passed to a
   program using execve(2). This permits some nasty attacks, which can
   only be understood by understanding how environment variables really
   work. In Linux, you can see environ(5) for a summary how about
   environment variables really work. In short, environment variables are
   internally stored as a pointer to an array of pointers to characters;
   this array is stored in order and terminated by a NULL pointer (so
   you'll know when the array ends). The pointers to characters, in turn,
   each point to a NIL-terminated string value of the form
   ``NAME=value''. This has several implications, for example,
   environment variable names can't include the equal sign, and neither
   the name nor value can have embedded NIL characters. However, a more
   dangerous implication of this format is that it allows multiple
   entries with the same variable name, but with different values (e.g.,
   more than one value for SHELL). While typical command shells prohibit
   doing this, a locally-executing cracker can create such a situation
   using execve(2).
   
   The problem with this storage format (and the way it's set) is that a
   program might check one of these values (to see if it's valid) but
   actually use a different one. In Linux, the GNU glibc libraries try to
   shield programs from this; glibc 2.1's implementation of getenv will
   always get the first matching entry, setenv and putenv will always set
   the first matching entry, and unsetenv will actually unset all of the
   matching entries (congratulations to the GNU glibc implementors for
   implementing unsetenv this way!). However, some programs go directly
   to the environ variable and iterate across all environment variables;
   in this case, they might use the last matching entry instead of the
   first one. As a result, if checks were made against the first matching
   entry instead, but the actual value used is the last matching entry, a
   cracker can use this fact to circumvent the protection routines.
     _________________________________________________________________
   
4.2.3. The Solution - Extract and Erase

   For secure setuid/setgid programs, the short list of environment
   variables needed as input (if any) should be carefully extracted. Then
   the entire environment should be erased, followed by resetting a small
   set of necessary environment variables to safe values. There really
   isn't a better way if you make any calls to subordinate programs;
   there's no practical method of listing ``all the dangerous values''.
   Even if you reviewed the source code of every program you call
   directly or indirectly, someone may add new undocumented environment
   variables after you write your code, and one of them may be
   exploitable.
   
   The simple way to erase the environment is by setting the global
   variable environ to NULL. The global variable environ is defined in
   <unistd.h>; C/C++ users will want to #include this header file. You
   will need to manipulate this value before spawning threads, but that's
   rarely a problem, since you want to do these manipulations very early
   in the program's execution. Another way is to use the undocumented
   clearenv() function. clearenv() has an odd history; it was supposed to
   be defined in POSIX.1, but somehow never made it into that standard.
   However, clearenv() is defined in POSIX.9 (the Fortran 77 bindings to
   POSIX), so there is a quasi-official status for it. clearenv() is
   defined in <stdlib.h>, but before using #include to include it you
   must make sure that __USE_MISC is #defined.
   
   One value you'll almost certainly re-add is PATH, the list of
   directories to search for programs; PATH should not include the
   current directory and usually be something simple like
   ``/bin:/usr/bin''. Typically you'll also set IFS (to its default of ``
   \t\n'') and TZ (timezone). Linux won't die if you don't supply either
   IFS or TZ, but some System V based systems have problems if you don't
   supply a TZ value, and it's rumored that some shells need the IFS
   value set. In Linux, see environ(5) for a list of common environment
   variables that you might want to set.
   
   If you really need user-supplied values, check the values first (to
   ensure that the values match a pattern for legal values and that they
   are within some reasonable maximum length). Ideally there would be
   some standard trusted file in /etc with the information for ``standard
   safe environment variable values'', but at this time there's no
   standard file defined for this purpose. For something similar, you
   might want to examine the PAM module pam_env on those systems which
   have that module.
   
   If you're programming a setuid/setgid program in a language that
   doesn't allow you to reset the environment directly, one approach is
   to create a ``wrapper'' program. The wrapper sets the environment
   program to safe values, and then calls the other program. Beware: make
   sure the wrapper will actually invoke the intended program; if it's an
   interpreted program, make sure there's no race condition possible that
   would allow the interpreter to load a different program than the one
   that was granted the special setuid/setgid privileges.
     _________________________________________________________________
   
4.3. File Descriptors

   A program is passed a set of ``open file descriptors'', that is,
   pre-opened files. A setuid/setgid program must deal with the fact that
   the user gets to select what files are open and to what (within their
   permission limits). A setuid/setgid program must not assume that
   opening a new file will always open into a fixed file descriptor id.
   It must also not assume that standard input (stdin), standard output
   (stdout), and standard error (stderr) refer to a terminal or are even
   open.
   
   The rationale behind this is easy; since an attacker can open or close
   a file descriptor before starting the program, the attacker could
   create an unexpected situation. If the attacker closes the standard
   output, when the program opens the next file it will be opened as
   though it were standard output, and then it will send all standard
   output to that file as well. Some C libraries will automatically open
   stdin, stdout, and stderr if they aren't already open (to /dev/null),
   but this isn't true on all Unix-like systems.
     _________________________________________________________________
   
4.4. File Contents

   If a program takes directions from a file, it must not trust that file
   specially unless only a trusted user can control its contents. Usually
   this means that an untrusted user must not be able to modify the file,
   its directory, or any of its ancestor directories. Otherwise, the file
   must be treated as suspect.
   
   If the directions in the file are supposed to be from an untrusted
   user, then make sure that the inputs from the file are protected as
   describe throughout this document. In particular, check that values
   match the set of legal values, and that buffers are not overflowed.
     _________________________________________________________________
   
4.5. CGI Inputs

   CGI inputs are internally a specified set of environment variables and
   standard input. These values must be validated.
   
   One additional complication is that many CGI inputs are provided in
   so-called ``URL-encoded'' format, that is, some values are written in
   the format %HH where HH is the hexadecimal code for that byte. You or
   your CGI library must handle these inputs correctly by URL-decoding
   the input and then checking if the resulting byte value is acceptable.
   You must correctly handle all values, including problematic values
   such as %00 (NIL) and %0A (newline). Don't decode inputs more than
   once, or input such as ``%2500'' will be mishandled (the %25 would be
   translated to ``%'', and the resulting ``%00'' would be erroneously
   translated to the NIL character).
   
   CGI scripts are commonly attacked by including special characters in
   their inputs; see the comments above.
   
   Some HTML forms include client-side checking to prevent some illegal
   values. This checking can be helpful for the user but is useless for
   security, because attackers can send such ``illegal'' values directly
   to the web server. As noted below (in the section on trusting only
   trustworthy channels), servers must perform all of their own input
   checking.
     _________________________________________________________________
   
4.6. Other Inputs

   Programs must ensure that all inputs are controlled; this is
   particularly difficult for setuid/setgid programs because they have so
   many such inputs. Other inputs programs must consider include the
   current directory, signals, memory maps (mmaps), System V IPC, and the
   umask (which determines the default permissions of newly-created
   files). Consider explicitly changing directories (using chdir(2)) to
   an appropriately fully named directory at program startup.
     _________________________________________________________________
   
4.7. Character Encoding

   For many years Americans have been using the ASCII encoding of
   characters, permitting easy exchange of English texts. Unfortunately,
   ASCII is completely inadequate in handling the character sets of most
   other languages. For many years different countries have adopted
   different techniques for exchanging text in different languages. More
   recently, ISO has developed ISO 10646, a single 31-bit encoding for
   all of the world's characters termed the Universal Character Set
   (UCS). Characters fitting into 16 bits (the first 65536 values of the
   UCS) are termed the ``Basic Multilingual Plane'' (BMP), and the BMP is
   intended to cover nearly all spoken languages. The Unicode forum
   develops the Unicode standard, which concentrates on the 16-bit set
   and adds some additional conventions to aid interoperability.
   
   However, most software is not designed to handle 16 bit or 32 bit
   characters, so a special format called ``UTF-8'' was developed to
   encode these potentially international characters in a format more
   easily handled by existing programs and libraries. UTF-8 is defined,
   among other places, in IETF RFC 2279, so it's a well-defined standard
   that can be freely read and used. UTF-8 is a variable-width encoding;
   characters numbered 0 to 0x7f (127) encode to themselves as a single
   byte, while characters with larger values are encoded into 2 to 6
   bytes of information (depending on their value). The encoding has been
   specially designed to have the following nice properties (this
   information is from the RFC and Linux utf-8 man page):
   
     * The classical US ASCII characters (0 to 0x7f) encode as
       themselves, so files and strings which contain only 7-bit ASCII
       characters have the same encoding under both ASCII and UTF-8. This
       is fabulous for backwards compatibility with the many existing
       U.S. programs and data files.
     * All UCS characters beyond 0x7f are encoded as a multibyte sequence
       consisting only of bytes in the range 0x80 to 0xfd. This means
       that no ASCII byte can appear as part of another character. Many
       other encodings permit characters such as an embedded NIL, causing
       programs to fail.
     * It's easy to convert between UTF-8 and a 2-byte or 4-byte
       fixed-width representations of characters (these are called UCS-2
       and UCS-4 respectively).
     * The lexicographic sorting order of UCS-4 strings is preserved, and
       the Boyer-Moore fast search algorithm can be used directly with
       UTF-8 data.
     * All possible 2^31 UCS codes can be encoded using UTF-8.
     * The first byte of a multibyte sequence which represents a single
       non-ASCII UCS character is always in the range 0xc0 to 0xfd and
       indicates how long this multibyte sequence is. All further bytes
       in a multibyte sequence are in the range 0x80 to 0xbf. This allows
       easy resynchronization; if a byte is missing, it's easy to skip
       forward to the ``next'' character, and it's always easy to skip
       forward and back to the ``next'' or ``preceding'' character.
       
   In short, the UTF-8 transformation format is becoming a dominant
   method for exchanging international text information because it can
   support all of the world's languages, yet it is backward compatible
   with U.S. ASCII files as well as having other nice properties. For
   many purposes I recommend its use, particularly when storing data in a
   ``text'' file.
   
   The reason to mention UTF-8 is that some byte sequences are not legal
   UTF-8, and this might be an exploitable security hole. The RFC notes
   the following:
   
     Implementors of UTF-8 need to consider the security aspects of how
     they handle illegal UTF-8 sequences. It is conceivable that in some
     circumstances an attacker would be able to exploit an incautious
     UTF-8 parser by sending it an octet sequence that is not permitted
     by the UTF-8 syntax.
     
     A particularly subtle form of this attack could be carried out
     against a parser which performs security-critical validity checks
     against the UTF-8 encoded form of its input, but interprets certain
     illegal octet sequences as characters. For example, a parser might
     prohibit the NUL character when encoded as the single-octet
     sequence 00, but allow the illegal two-octet sequence C0 80 and
     interpret it as a NUL character. Another example might be a parser
     which prohibits the octet sequence 2F 2E 2E 2F ("/../"), yet
     permits the illegal octet sequence 2F C0 AE 2E 2F.
     
   A longer discussion about this is available at Markus Kuhn's UTF-8 and
   Unicode FAQ for Unix/Linux at
   [114]http://www.cl.cam.ac.uk/~mgk25/unicode.html.
   
   The UTF-8 character set is one case where it's possible to enumerate
   all illegal values (and prove that you've enumerated them all). If you
   need to determine if you have a legal UTF-8 sequence, you need to
   check for two things: (1) is the initial sequence legal, and (2) if it
   is, is the first byte followed by the required number of valid
   continuation characters? Performing the first check is easy; the
   following is provably the complete list of all illegal UTF-8 initial
   sequences:
   
   Table 4-1. Illegal UTF-8 initial sequences
   UTF-8 Sequence Reason for Illegality
   10xxxxxx illegal as initial byte of character (80..BF)
   1100000x illegal, overlong (C0 80..BF)
   11100000 100xxxxx illegal, overlong (E0 80..9F)
   11110000 1000xxxx illegal, overlong (F0 80..8F)
   11111000 10000xxx illegal, overlong (F8 80..87)
   11111100 100000xx illegal, overlong (FC 80..83)
   1111111x illegal; prohibited by spec
   
   I should note that in some cases, you might want to cut slack (or use
   internally) the hexadecimal sequence C0 80. This is an overlong
   sequence that could represent ASCII NUL (NIL). Since C/C++ have
   trouble including a NIL character in an ordinary string, some people
   have taken to using this sequence when they want to represent NIL as
   part of the data stream; Java even enshrines the practice. Feel free
   to use C0 80 internally while processing data, but technically you
   really should translate this back to 00 before saving the data.
   Depending on your needs, you might decide to be ``sloppy'' and accept
   C0 80 as input in a UTF-8 data stream.
   
   The second step is to check if the correct number of continuation
   characters are included in the string. If the first byte has the top 2
   bits set, you count the number of ``one'' bits set after the top one,
   and then check that there are that many continuation bytes which begin
   with the bits ``10''. So, binary 11100001 requires two more
   continuation bytes.
   
   A related issue is that some phrases can be expressed in more than one
   way in ISO 10646/Unicode. For example, some accented characters can be
   represented as a single character (with the accent) and also as a set
   of characters (e.g., the base character plus a separate composing
   accent). These two forms may appear identical. There's also a
   zero-width space that could be inserted, with the result that
   apparently-similar items are considered different. Beware of
   situations where such hidden text could interfere with the program.
     _________________________________________________________________
   
4.8. Limit Valid Input Time and Load Level

   Place timeouts and load level limits, especially on incoming network
   data. Otherwise, an attacker might be able to easily cause a denial of
   service by constantly requesting the service.
     _________________________________________________________________
   
Chapter 5. Avoid Buffer Overflow

     
   
   An enemy will overrun the land; he will pull down your strongholds and
   plunder your fortresses.
     Amos 3:11 (NIV)
   
   An extremely common security flaw is the ``buffer overflow''.
   Technically, a buffer overflow is a problem with the program's
   internal implementation, but it's such a common and serious problem
   that I've placed this information in its own chapter. To give you an
   idea of how important this subject is, at the CERT, 9 of 13 advisories
   in 1998 and at least half of the 1999 advisories involved buffer
   overflows. An informal survey on Bugtraq found that approximately 2/3
   of the respondents felt that buffer overflows were the leading cause
   of security vulnerability (the remaining respondents identified
   ``misconfiguration'' as the leading cause) [Cowan 1999]. This is an
   old, well-known problem, yet it continues to resurface [McGraw 2000].
   
   A buffer overflow occurs when you write a set of values (usually a
   string of characters) into a fixed length buffer and write at least
   one value outside that buffer's boundaries (usually past its end). A
   buffer overflow can occur when reading input from the user into a
   buffer, but it can also occur during other kinds of processing in a
   program.
   
   If a secure program permits a buffer overflow, the overflow can often
   be exploited by an adversary. If the buffer is a local C variable, the
   overflow can be used to force the function to run code of an
   attackers' choosing. This specific variation is often called a ``stack
   smashing'' attack. A buffer in the heap isn't much better; attackers
   may be able to use such overflows to control other variables in the
   program. More details can be found from Aleph1 [1996], Mudge [1995],
   or the Nathan P. Smith's "Stack Smashing Security Vulnerabilities"
   website at [115]http://destroy.net/machines/security/.
   
   Most programming languages are essentially immune to this problem,
   either because they automatically resize arrays (e.g., Perl), or
   because they normally detect and prevent buffer overflows (e.g.,
   Ada95). However, the C language provides no protection against such
   problems, and C++ can be easily used in ways to cause this problem
   too.
     _________________________________________________________________
   
5.1. Dangers in C/C++

   C users must avoid using dangerous functions that do not check bounds
   unless they've ensured the bounds will never get exceeded. Functions
   to avoid in most cases (or ensure protection) include the functions
   strcpy(3), strcat(3), sprintf(3) (with cousin vsprintf(3)), and
   gets(3). These should be replaced with functions such as strncpy(3),
   strncat(3), snprintf(3), and fgets(3) respectively, but see the
   discussion below. The function strlen(3) should be avoided unless you
   can ensure that there will be a terminating NIL character to find. The
   scanf() family (scanf(3), fscanf(3), sscanf(3), vscanf(3), vsscanf(3),
   and vfscanf(3)) is often dangerous to use; do not use it to send data
   to a string without controlling the maximum length (the format %s is a
   particularly common problem). Other dangerous functions that may
   permit buffer overruns (depending on their use) include realpath(3),
   getopt(3), getpass(3), streadd(3), strecpy(3), and strtrns(3). You
   must careful with getwd(3); the buffer sent to getwd(3) must be at
   least PATH_MAX bytes long. If you're serious about portability,
   there's an additional problem: some systems' snprintf do not actually
   protect against buffer overflows; Linux's version is known to work
   correctly. [vf]scanf(const char *format, ...) May overflow its
   arguments. realpath(char *path, char resolved_path[]) May overflow the
   path buffer. [v]sprintf(char *str, const char *format, ...) May
   overflow the str buffer.
     _________________________________________________________________
   
5.2. Library Solutions in C/C++

   One solution in C/C++ is to use library functions that do not have
   buffer overflow problems. The first subsection describes the
   ``standard C library'' solution, which can work but has its
   disadvantages. The next subsection describes the general security
   issues of both fixed length and dynamically reallocated approaches to
   buffers. The following subsections describe various alternative
   libraries, such as strlcpy and libmib.
     _________________________________________________________________
   
5.2.1. Standard C Library Solution

   The ``standard'' solution to prevent buffer overflow in C is to use
   the standard C library calls that defend against these problems. This
   approach depends heavily on the standard library functions strncpy(3)
   and strncat(3). If you choose this approach, beware: these calls have
   somewhat surprising semantics and are hard to use correctly. The
   function strncpy(3) does not NIL-terminate the destination string if
   the source string length is at least equal to the destination's, so be
   sure to set the last character of the destination string to NIL after
   calling strncpy(3). If you're going to reuse the same buffer many
   times, an efficient approach is to tell strncpy() that the buffer is
   one character shorter than it actually is and set the last character
   to NIL once before use. Both strncpy(3) and strncat(3) require that
   you pass the amount of space left available, a computation that is
   easy to get wrong (and getting it wrong could permit a buffer overflow
   attack). Neither provide a simple mechanism to determine if an
   overflow has occurred. Finally, strncpy(3) has a significant
   performance penalty compared to the strcpy(3) it supposedly replaces,
   because strncpy(3) NIL-fills the remainder of the destination. I've
   gotten emails expressing surprise over this last point, but this is
   clearly stated in Kernighan and Ritchie second edition [Kernighan
   1988, page 249], and this behavior is clearly documented in the man
   pages for Linux, FreeBSD, and Solaris. This means that just changing
   from strcpy to strncpy can cause a severe reduction in performance,
   for no good reason in most cases.
     _________________________________________________________________
   
5.2.2. Static and Dynamically Allocated Buffers

   strncpy and friends are an example of statically allocated buffers,
   that is, once the buffer is allocated it stays a fixed size. The
   alternative is to dynamically reallocate buffer sizes as you need
   them. It turns out that both approaches have security implications.
   
   There is a general security problem when using fixed-length buffers:
   the fact that the buffer is a fixed length may be exploitable. This is
   a problem with strncpy(3) and strncat(3), snprintf(3), strlcpy(3),
   strlcat(3), and other such functions. The basic idea is that the
   attacker sets up a really long string so that, when the string is
   truncated, the final result will be what the attacker wanted (instead
   of what the developer intended). Perhaps the string is catenated from
   several smaller pieces; the attacker might make the first piece as
   long as the entire buffer, so all later attempts to concatenate
   strings do nothing. Here are some specific examples:
   
     * Imagine code that calls gethostbyname(3) and, if successful,
       immediately copies hostent->h_name to a fixed-size buffer using
       strncpy or snprintf. Using strncpy or snprintf protects against an
       overflow of an excessively long fully-qualified domain name
       (FQDN), so you might think you're done. However, this could result
       in chopping off the end of the FQDN. This may be very undesirable,
       depending on what happens next.
     * Imagine code that uses strncpy, strncat, snprintf, etc., to copy
       the full path of a filesystem object to some buffer. Further
       imagine that the original value was provided by an untrusted user,
       and that the copying is part of a process to pass a resulting
       computation to a function. Sounds safe, right? Now imagine that an
       attacker pads a path with a large number of '/'s at the beginning.
       This could result in future operations being performed on the file
       ``/''. If the program appends values in the belief that the result
       will be safe, the program may be exploitable. Or, the attacker
       could devise a long filename near the buffer length, so that
       attempts to append to the filename would silently fail to occur
       (or only partially occur in ways that may be exploitable).
       
   When using statically-allocated buffers, you really need to consider
   the length of the source and destination arguments. Sanity checking
   the input and the resulting intermediate computation might deal with
   this, too.
   
   Another alternative is to dynamically reallocate all strings instead
   of using fixed-size buffers. This general approach is recommended by
   the GNU programming guidelines, since it permits programs to handle
   arbitrarily-sized inputs (until they run out of memory). Of course,
   the major problem with dynamically allocated strings is that you may
   run out of memory. The memory may even be exhausted at some other
   point in the program than the portion where you're worried about
   buffer overflows; any memory allocation can fail. Also, since dynamic
   reallocation may cause memory to be inefficiently allocated, it is
   entirely possible to run out of memory even though technically there
   is enough virtual memory available to the program to continue. In
   addition, before running out of memory the program will probably use a
   great deal of virtual memory; this can easily result in ``thrashing'',
   a situation in which the computer spends all its time just shuttling
   information between the disk and memory (instead of doing useful
   work). This can have the effect of a denial of service attack. Some
   rational limits on input size can help here. In general, the program
   must be designed to fail safely when memory is exhausted if you use
   dynamically allocated strings.
     _________________________________________________________________
   
5.2.3. strlcpy and strlcat

   An alternative, being employed by OpenBSD, is the strlcpy(3) and
   strlcat(3) functions by Miller and de Raadt [Miller 1999]. This is a
   minimalist, statically-sized buffer approach that provides C string
   copying and concatenation with a different (and less error-prone)
   interface. Source and documentation of these functions are available
   under a newer BSD-style open source license at
   [116]ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/strlcpy.3.
   
   First, here are their prototypes:
size_t strlcpy (char *dst, const char *src, size_t size);
size_t strlcat (char *dst, const char *src, size_t size);

   Both strlcpy and strlcat take the full size of the destination buffer
   as a parameter (not the maximum number of characters to be copied) and
   guarantee to NIL-terminate the result (as long as size is larger than
   0). Remember that you should include a byte for NIL in the size.
   
   The strlcpy function copies up to size-1 characters from the
   NUL-terminated string src to dst, NIL-terminating the result. The
   strlcat function appends the NIL-terminated string src to the end of
   dst. It will append at most size - strlen(dst) - 1 bytes,
   NIL-terminating the result.
   
   One minor disadvantage of strlcpy(3) and strlcat(3) is that they are
   not, by default, installed in most Unix-like systems. In OpenBSD, they
   are part of <string.h>. This is not that difficult a problem; since
   they are small functions, you can even include them in your own
   program's source (at least as an option), and create a small separate
   package to load them. You can even use autoconf to handle this case
   automatically. If more programs use these functions, it won't be long
   before these are standard parts of Linux distributions and other
   Unix-like systems.
     _________________________________________________________________
   
5.2.4. libmib

   One toolset for C that dynamically reallocates strings automatically
   is the ``libmib allocated string functions'' by Forrest J. Cavalier
   III, available at [117]http://www.mibsoftware.com/libmib/astring.
   There are two variations of libmib; ``libmib-open'' appears to be
   clearly open source under its own X11-like license that permits
   modification and redistribution, but redistributions must choose a
   different name, however, the developer states that it ``may not be
   fully tested.'' To continuously get libmib-mature, you must pay for a
   subscription. The documentation is not open source, but it is freely
   available.
     _________________________________________________________________
   
5.2.5. Libsafe

   Arash Baratloo, Timothy Tsai, and Navjot Singh (of Lucent
   Technologies) have developed Libsafe, a wrapper of several library
   functions known to be vulnerable to stack smashing attacks. This
   wrapper (which they call a kind of ``middleware'') is a simple
   dynamically loaded library that contains modified versions of C
   library functions such as strcpy(3). These modified versions implement
   the original functionality, but in a manner that ensures that any
   buffer overflows are contained within the current stack frame. Their
   initial performance analysis suggests that this library's overhead is
   very small. Libsafe papers and source code are available at
   [118]http://www.bell-labs.com/org/11356/libsafe.html. The Libsafe
   source code is available under the completely open source LGPL
   license, and there are indications that many Linux distributors are
   interested in using it.
   
   Libsafe's approach appears somewhat useful. Libsafe should certainly
   be considered for inclusion by Linux distributors, and its approach is
   worth considering by others as well. However, as a software developer,
   Libsafe is a useful mechanism to support defense-in-depth but it does
   not really prevent buffer overflows. Here are several reasons why you
   shouldn't depend just on Libsafe during code development:
   
     * Libsafe only protects a small set of known functions with obvious
       buffer overflow issues. At the time of this writing, this list is
       significantly shorter than the list of functions in this paper
       known to have this problem. It also won't protect against code you
       write yourself (e.g., in a while loop) that causes buffer
       overflows.
     * Even if libsafe is installed in a distribution, the way it is
       installed impacts its use. The documentation recommends setting
       LD_PRELOAD to cause libsafe's protections to be enabled, but the
       problem is that users can unset this environment variable...
       causing the protection to be disabled for programs they execute!
     * Libsafe only protects against buffer overflows of the stack onto
       the return address; you can still overrun the heap or other
       variables in that procedure's frame.
     * Unless you can be assured that all deployed platforms will use
       libsafe (or something like it), you'll have to protect your
       program as though it wasn't there.
     * LibSafe seems to assume that saved frame pointers are at the
       beginning of each stack frame. This isn't always true. Compilers
       (such as gcc) can optimize away things, and in particular the
       option "-fomit-frame-pointer" removes the information that libsafe
       seems to need. Thus, libsafe may fail to work for some programs.
       
   The libsafe developers themselves acknowledge that software developers
   shouldn't just depend on libsafe. In their words:
   
     It is generally accepted that the best solution to buffer overflow
     attacks is to fix the defective programs. However, fixing defective
     programs requires knowing that a particular program is defective.
     The true benefit of using libsafe and other alternative security
     measures is protection against future attacks on programs that are
     not yet known to be vulnerable.
     _________________________________________________________________
   
5.2.6. Other Libraries

   The glib (not glibc) library is a widely-available open source library
   that provides a number of useful functions for C programmers. GTK+ and
   GNOME both use glib, for example. I have hope that glib version 2.0
   will include strlcpy() and strlcat() (I've submitted a patch to do
   this), making it easier to portably use those functions. At this time
   I do not have an analysis showing definitively that the glib library
   functions protect against buffer overflow. However, many of the glib
   functions automatically allocate memory, and those functions
   automatically fail with no reasonable way to intercept the failure
   (e.g., to try something else instead). As a result, in many cases most
   glib functions cannot be used in most secure programs.
     _________________________________________________________________
   
5.3. Compilation Solutions in C/C++

   A completely different approach is to use compilation methods that
   perform bounds-checking (see [Sitaker 1999] for a list). In my
   opinion, such tools are very useful in having multiple layers of
   defense, but it's not wise to use this technique as your sole defense.
   There are at least two reasons for this. First of all, most such tools
   only provide partial defense against buffer overflows (and the
   ``complete'' defenses are generally 12-30 times slower); C and C++
   were simply not designed to protect against buffer overflow. Second of
   all, for open source programs you cannot be certain what tools will be
   used to compile the program; using the default ``normal'' compiler for
   a given system might suddenly open security flaws.
   
   One of the more useful tools is ``StackGuard'', a modification of the
   standard GNU C compiler gcc. StackGuard works by inserting a ``guard''
   value (called a ``canary'') in front of the return address; if a
   buffer overflow overwrites the return address, the canary's value
   (hopefully) changes and the system detects this before using it. This
   is quite valuable, but note that this does not protect against buffer
   overflows overwriting other values (which they may still be able to
   use to attack a system). There is work to extend StackGuard to be able
   to add canaries to other data items, called ``PointGuard''. PointGuard
   will automatically protect certain values (e.g., function pointers and
   longjump buffers). However, protecting other variable types using
   PointGuard requires specific programmer intervention (the programmer
   has to identify which data values must be protected with canaries).
   This can be valuable, but it's easy to accidentally omit protection
   for a data value you didn't think needed protection - but needs it
   anyway. More information on StackGuard, PointGuard, and other
   alternatives is in Cowan [1999].
   
   As a related issue, in Linux you could modify the Linux kernel so that
   the stack segment is not executable; such a patch to Linux does exist
   (see Solar Designer's patch, which includes this, at
   [119]http://www.openwall.com/linux/ However, as of this writing this
   is not built into the Linux kernel. Part of the rationale is that this
   is less protection than it seems; attackers can simply force the
   system to call other ``interesting'' locations already in the program
   (e.g., in its library, the heap, or static data segments). Also,
   sometimes Linux does require executable code in the stack, e.g., to
   implement signals and to implement GCC ``trampolines''. Solar
   Designer's patch does handle these cases, but this does complicate the
   patch. Personally, I'd like to see this merged into the main Linux
   distribution, since it does make attacks somewhat more difficult and
   it defends against a range of existing attacks. However, I agree with
   Linus Torvalds and others that this does not add the amount of
   protection it would appear to and can be circumvented with relative
   ease. You can read Linus Torvalds' explanation for not including this
   support at [120]http://lwn.net/980806/a/linus-noexec.html.
   
   In short, it's better to work first on developing a correct program
   that defends itself against buffer overflows. Then, after you've done
   this, by all means use techniques and tools like StackGuard as an
   additional safety net. If you've worked hard to eliminate buffer
   overflows in the code itself, then StackGuard is likely to be more
   effective because there will be fewer ``chinks in the armor'' that
   StackGuard will be called on to protect.
     _________________________________________________________________
   
5.4. Other Languages

   The problem of buffer overflows is an excellent argument for using
   other programming languages such as Perl, Python, Java, and Ada95.
   After all, nearly all other programming languages used today (other
   than assembly language) protect against buffer overflows. Using those
   other languages does not eliminate all problems, of course; in
   particular see the discussion under ``limit call-outs to valid
   values'' regarding the NIL character. There is also the problem of
   ensuring that those other languages' infrastructure (e.g., run-time
   library) is available and secured. Still, you should certainly
   consider using other programming languages when developing secure
   programs to protect against buffer overflows.
     _________________________________________________________________
   
Chapter 6. Structure Program Internals and Approach

     
   
   Like a city whose walls are broken down is a man who lacks
   self-control.
     Proverbs 25:28 (NIV)
     _________________________________________________________________
   
6.1. Secure the Interface

   Interfaces should be minimal (simple as possible), narrow (provide
   only the functions needed), and non-bypassable. Trust should be
   minimized. Applications and data viewers may be used to display files
   developed externally, so in general don't allow them to accept
   programs unless you're willing to do the extensive work necessary to
   create a secure sandbox. The most dangerous kind is an auto-executing
   macro that executes when the application is loaded; from a security
   point-of-view this is a disaster waiting to happen unless you have
   extremely strong control over what the macro can do (a ``sandbox''),
   and past experience has shown that real sandboxes are hard to
   implement.
     _________________________________________________________________
   
6.2. Minimize Privileges

   As noted earlier, it is an important general principle that programs
   have the minimal amount of privileges necessary to do its job (this is
   termed ``least privilege''). That way, if the program is broken, its
   damage is limited. The most extreme example is to simply not write a
   secure program at all - if this can be done, it usually should be. For
   example, don't make your program setuid or setgid if you can; just
   make it an ordinary program, and require the administrator to log in
   as such before running it.
   
   In Linux and Unix, the primary determiner of a process' privileges is
   the set of id's associated with it: each process has a real, effective
   and saved id for both the user and group. Linux also has the
   filesystem uid and gid. Manipulating these values is critical to
   keeping privileges minimized, and there are several ways to minimize
   them (discussed below). You can also use chroot(2) to minimize the
   files visible to a program.
     _________________________________________________________________
   
6.2.1. Minimize the Privileges Granted

   Perhaps the most effective technique is to simply minimize the the
   highest privilege granted. In particular, avoid granting a program
   root privilege if possible. Don't make a program setuid root if it
   only needs access to a small set of files; consider creating separate
   user or group accounts for different function.
   
   A common technique is to create a special group, change a file's group
   ownership to that group, and then make the program setgid to that
   group. It's better to make a program setgid instead of setuid where
   you can, since group membership grants fewer rights (in particular, it
   does not grant the right to change file permissions).
   
   This is commonly done for game high scores. Games are usually setgid
   games, the score files are owned by the group games, and the programs
   themselves and their configuration files are owned by someone else
   (say root). Thus, breaking into a game allows the perpetrator to
   change high scores but doesn't grant the privilege to change the
   game's executable or configuration file. The latter is important; if
   an attacker could change a game's executable or its configuration
   files (which might control what the executable runs), then they might
   be able to gain control of a user who ran the game.
   
   If creating a new group isn't sufficient, consider creating a new
   pseudouser (really, a special role) to manage a set of resources. Web
   servers typically do this; often web servers are set up with a special
   user (``nobody'') so that they can be isolated from other users.
   Indeed, web servers are instructive here: web servers typically need
   root privileges to start up (so they can attach to port 80), but once
   started they usually shed all their privileges and run as the user
   ``nobody''. Again, usually the pseudouser doesn't own the primary
   program it runs, so breaking into the account doesn't allow for
   changing the program itself. As a result, breaking into a running web
   server normally does not automatically break the whole system's
   security.
   
   If you must give a program root privileges, consider using the POSIX
   capability features available in Linux 2.2 and greater to minimize
   them immediately on program startup. By calling cap_set_proc(3) or the
   Linux-specific capsetp(3) routines immediately after starting, you can
   permanently reduce the abilities of your program to just those
   abilities it actually needs. Note that not all Unix-like systems
   implement POSIX capabilities, so this is an approach that can lose
   portability; however, if you use it merely as an optional safeguard
   only where it's available, using this approach will not really limit
   portability. Also, while the Linux kernel version 2.2 and greater
   includes the low-level calls, the C-level libraries to make their use
   easy are not installed on some Linux distributions, slightly
   complicating their use in applications. For more information on
   Linux's implementation of POSIX capabilities, see
   [121]http://linux.kernel.org/pub/linux/libs/security/linux-privs.
   
   One Linux-unique tool you can use to simplify minimizing granted
   privileges is the ``compartment'' tool developed by SuSE. This tool
   sets the fileystem root, uid, gid, and/or the capability set, then
   runs the given program. This is particularly handy for running some
   other program without modifying it. Here's the syntax of version 0.5:
Syntax: compartment [options] /full/path/to/program

Options:
         --chroot path   chroot to path
         --user user     change uid to this user
         --group group   change gid to this group
         --init program  execute this program/script before doing anything
         --cap capset    set capset name. You can specify several capsets.
         --verbose       be verbose
         --quiet         do no logging (to syslog)

   Thus, you could start a more secure anonymous ftp server using:
  compartment --chroot /home/ftp --cap CAP_NET_BIND_SERVICE anon-ftpd

   At the time of this writing, the tool is immature and not available on
   typical Linux distributions, but this may quickly change. You can
   download the program via [122]http://www.suse.de/~marc.
     _________________________________________________________________
   
6.2.2. Minimize the Time the Privilege Can Be Used

   As soon as possible, permanently give up privileges. Some Unix-like
   systems, including Linux, implement ``saved'' IDs which store the
   ``previous'' value. The simplest approach is to set the other id's
   twice to an untrusted id. In setuid/setgid programs, you should
   usually set the effective gid and uid to the real ones, in particular
   right after a fork(2), unless there's a good reason not to. Note that
   you have to change the gid first when dropping from root to another
   privilege or it won't work - once you drop root privileges, you won't
   be able to change much else.
   
   It's worth noting that there's a well-known related bug that uses
   POSIX capabilities to interfere with this minimization. This bug
   affects Linux kernel 2.2.0 through 2.2.15, and possibly a number of
   other Unix-like systems with POSIX capabilities. See Bugtraq id 1322
   on http://www.securityfocus.com for more information. Here is their
   summary:
   
     POSIX "Capabilities" have recently been implemented in the Linux
     kernel. These "Capabilities" are an additional form of privilege
     control to enable more specific control over what priviliged
     processes can do. Capabilities are implemented as three (fairly
     large) bitfields, which each bit representing a specific action a
     privileged process can perform. By setting specific bits, the
     actions of priviliged processes can be controlled -- access can be
     granted for various functions only to the specific parts of a
     program that require them. It is a security measure. The problem is
     that capabilities are copied with fork() execs, meaning that if
     capabilities are modified by a parent process, they can be carried
     over. The way that this can be exploited is by setting all of the
     capabilities to zero (meaning, all of the bits are off) in each of
     the three bitfields and then executing a setuid program that
     attempts to drop priviliges before executing code that could be
     dangerous if run as root, such as what sendmail does. When sendmail
     attempts to drop priviliges using setuid(getuid()), it fails not
     having the capabilities required to do so in its bitfields and with
     no checks on its return value . It continues executing with
     superuser priviliges, and can run a users .forward file as root
     leading to a complete compromise.
     
   One approach, used by sendmail, is to attempt to do setuid(0) after a
   setuid(getuid()); normally this should fail. If it succeeds, the
   program should stop. For more information, see
   http://sendmail.net/?feed=000607linuxbug. In the short term this might
   be a good idea in other programs, though clearly the better long-term
   approach is to upgrade the underlying system.
     _________________________________________________________________
   
6.2.3. Minimize the Time the Privilege is Active

   Use setuid(2), seteuid(2), and related functions to ensure that the
   program only has these privileges active when necessary. As noted
   above, you might want ensure that these privileges are disabled while
   parsing user input, but more generally, only turn on privileges when
   they're actually needed. Note that some buffer overflow attacks, if
   successful, can force a program to run arbitrary code, and that code
   could re-enable privileges that were temporarily dropped. Thus, it's
   always better to completely drop privileges as soon as possible.
   Still, temporarily disabling these permissions prevents a whole class
   of attacks, such as techniques to convince a program to write into a
   file that perhaps it didn't intent to write into. Since this technique
   prevents many attacks, it's worth doing if completely dropping the
   privileges can't be done at that point in the program.
     _________________________________________________________________
   
6.2.4. Minimize the Modules Granted the Privilege

   If only a few modules are granted the privilege, then it's much easier
   to determine if they're secure. One way to do so is to have a single
   module use the privilege and then drop it, so that other modules
   called later cannot misuse the privilege. Another approach is to have
   separate commands in separate executables; one command might be a
   complex tool that can do a vast number of tasks for a privileged user
   (e.g., root), while the other tool is setuid but is a small, simple
   tool that only permits a small command subset. The small, simple tool
   checks to see if the input meets various criteria for acceptability,
   and then if it determines the input is acceptable, it passes the input
   is passed to the tool. This can even be layerd several ways, for
   example, a complex user tool could call a simple setuid ``wrapping''
   program (that checks its inputs for secure values) that then passes on
   information to another complex trusted tool. This approach is
   especially helpful for GUI-based systems; have the GUI portion run as
   a normal user, and then pass security-relevant requests on to another
   program that has the special privileges for actual execution.
   
   Some operating systems have the concept of multiple layers of trust in
   a single process, e.g., Multics' rings. Standard Unix and Linux don't
   have a way of separating multiple levels of trust by function inside a
   single process like this; a call to the kernel increases privileges,
   but otherwise a given process has a single level of trust. Linux and
   other Unix-like systems can sometimes simulate this ability by forking
   a process into multiple processes, each of which has different
   privilege. To do this, set up a secure communication channel (usually
   unnamed pipes or unnamed sockets are used), then fork into different
   processes and have each process drop as many privileges as possible.
   Then use a simple protocol to allow the less trusted processes to
   request actions from the more trusted process(es), and ensure that the
   more trusted processes only support a limited set of requests.
   
   This is one area where technologies like Java 2 and Fluke have an
   advantage. For example, Java 2 can specify fine-grained permissions
   such as the permission to only open a specific file. However,
   general-purpose operating systems do not typically have such abilities
   at this time; this may change in the near future.
     _________________________________________________________________
   
6.2.5. Consider Using FSUID To Limit Privileges

   Each Linux process has two Linux-unique state values called filesystem
   user id (fsuid) and filesystem group id (fsgid). These values are used
   when checking against the filesystem permissions. If you're building a
   program that operates as a file server for arbitrary users (like an
   NFS server), you might consider using these Linux extensions. To use
   them, while holding root privileges change just fsuid and fsgid before
   accessing files on behalf of a normal user. This extension is fairly
   useful, and provides a mechanism for limiting filesystem access rights
   without removing other (possibly necessary) rights. By only setting
   the fsuid (and not the euid), a local user cannot send a signal to the
   process. Also, avoiding race conditions is much easier in this
   situation. However, a disadvantage of this approach is that these
   calls are not portable to other Unix-like systems.
     _________________________________________________________________
   
6.2.6. Consider Using Chroot to Minimize Available Files

   You can use chroot(2) to limit the files visible to your program. This
   requires carefully setting up a directory (called the ``chroot jail'')
   and correctly entering it. This can be a fairly effective technique
   for improving a program's security - it's hard to interfere with files
   you can't see. However, it depends on a whole bunch of assumptions, in
   particular, the program must lack root privileges, it must not have
   any way to get root privileges, and the chroot jail must be properly
   set up. I recommend using chroot(2) where it makes sense to do so, but
   don't depend on it alone; instead, make it part of a layered set of
   defenses. Here are a few notes about the use of chroot(2):
   
     * The program can still use non-filesystem objects that are shared
       across the entire machine (such as System V IPC objects and
       network sockets). It's best to also use separate pseudousers
       and/or groups, because all Unix-like systems include the ability
       to isolate users; this will at least limit the damage a subverted
       program can do to other programs. Note that current most Unix-like
       systems (including Linux) won't isolate intentionally cooperating
       programs; if you're worried about malicious programs cooperating,
       you need to get a system that implements some sort of mandatory
       access control and/or limits covert channels.
     * Be sure to close any filesystem descriptors to outside files if
       you don't want them used later. In particular, don't have any
       descriptors open to directories outside the chroot jail, or set up
       a situation where such a descriptor could be given to it (e.g.,
       via Unix sockets or an old implementation of /proc). If the
       program is given a descriptor to a directory outside the chroot
       jail, it could be used to escape out of the chroot jail.
     * The chroot jail has to be set up to be secure. Don't use a normal
       user's home directory (or subdirectory) as a chroot jail; use a
       separate location or ``home'' directory specially set aside for
       the purpose. Place the absolute minimum number of files there.
       Typically you'll have a /bin, /etc/, /lib, and maybe one or two
       others (e.g., /pub if it's an ftp server). Place in /bin only what
       you need to run after doing the chroot(); sometimes you need
       nothing at all (try to avoid placing a shell there, though
       sometimes that can't be helped). You may need a /etc/passwd and
       /etc/group so file listings can show some correct names, but if
       so, try not to include the real system's values, and certainly
       replace all passwords with "*". In /lib, place only what you need;
       use ldd(1) to query each program in /bin to find out what it
       needs, and only include them. On Linux, you'll probably need a few
       basic libraries like ld-linux.so.2, and not much else. It's
       usually wiser to completely copy in all files, instead of making
       hard links; while this wastes some time and disk space, it makes
       it so that attacks on the chroot jail files do not automatically
       propogate into the regular system's files. Mounting a /proc
       filesystem, on systems where this is supported, is generally
       unwise. In fact, in 2.0.x versions of Linux it's a known security
       flaw, since there are pseudodirectories in /proc that would permit
       a chroot'ed program to escape. Linux kernel 2.2 fixed this known
       problem, but there may be others; if possible, don't do it.
     * Chroot really isn't effective if the program can acquire root
       privilege. For example, the program could use calls like mknod(2)
       to create a device file that can view physical memory, and then
       use the resulting device file to modify kernel memory to give
       itself whatever privileges it desired. Another example of how a
       root program can break out of chroot is demonstrated at
       [123]http://www.suid.edu/source/breakchroot.c. In this example,
       the program opens a file descriptor for the current directory,
       creates and chroots into a subdirectory, sets the current
       directory to the previously-opened current directory, repeatedly
       cd's up from the current directory (which since it is outside the
       current chroot succeeds in moving up to the real filesystem root),
       and then calls chroot on the result. By the time you read this,
       these weaknesses may have been plugged, but the reality is that
       root privilege has traditionally meant ``all privileges'' and it's
       hard to strip them away. It's better to assume that a program
       requiring continuous root privileges will only be mildly helped
       using chroot(). Of course, you may be able to break your program
       into parts, so that at least part of it can be in a chroot jail.
     _________________________________________________________________
   
6.3. Avoid Creating Setuid/Setgid Scripts

   Many Unix-like systems, in particular Linux, simply ignore the setuid
   and setgid bits on scripts to avoid the race condition described
   earlier. Since support for setuid scripts varies on Unix-like systems,
   they're best avoided in new applications where possible. As a special
   case, Perl includes a special setup to support setuid Perl scripts, so
   using setuid and setgid is acceptable in Perl if you truly need this
   kind of functionality. If you need to support this kind of
   functionality in your own interpreter, examine how Perl does this.
   Otherwise, a simple approach is to ``wrap'' the script with a small
   setuid/setgid executable that creates a safe environment (e.g., clears
   and sets environment variables) and then calls the script (using the
   script's full path). Make sure that the script cannot be changed by an
   attacker! Shell scripting languages have additional problems, and
   really should not be setuid/setgid; see the language-specific section
   below.
     _________________________________________________________________
   
6.4. Configure Safely and Use Safe Defaults

   Configuration is considered to currently be the number one security
   problem. Therefore, you should spend some effort to (1) make the
   initial installation secure, and (2) make it easy to reconfigure the
   system while keeping it secure.
   
   A program should have the most restrictive access policy until the
   administrator has a chance to configure it. Please don't create
   ``sample'' working users or ``allow access to all'' configurations as
   the starting configuration; many users just ``install everything''
   (installing all available services) and never get around to
   configuring many services. In some cases the program may be able to
   determine that a more generous policy is reasonable by depending on
   the existing authentication system, for example, an ftp server could
   legitimately determine that a user who can log into a user's directory
   should be allowed to access that user's files. Be careful with such
   assumptions, however.
   
   Have installation scripts install a program as safely as possible. By
   default, install all files as owned by root or some other system user
   and make them unwriteable by others; this prevents non-root users from
   installing viruses. Indeed, it's best to make them unreadable by all
   but the trusted user. Allow non-root installation where possible as
   well, so that users without root privilages and administrators who do
   not fully trust the installer can still use the program.
   
   Try to make configuration as easy and clear as possible, including
   post-installation configuration. Make using the ``secure'' approach as
   easy as possible, or many users will use an insecure approach without
   understanding the risks. On Linux, take advantage of tools like
   linuxconf, so that users can easily configure their system using an
   existing infrastructure.
   
   If there's a configuration language, the default should be to deny
   access until the user specifically grants it. Include many clear
   comments in the sample configuration file, if there is one, so the
   administrator understands what the configuration does.
     _________________________________________________________________
   
6.5. Fail Safe

   A secure program should always ``fail safe'', that is, it should be
   designed so that if the program does fail, the safest result should
   occur. For security-critical programs, that usually means that if some
   sort of misbehavior is detected (malformed input, reaching a ``can't
   get here'' state, and so on), then the program should immediately deny
   service and stop processing that request. Don't try to ``figure out
   what the user wanted'': just deny the service. Sometimes this can
   decrease reliability or usability (from a user's perspective), but it
   increases security. There are a few cases where this might not be
   desired (e.g., where denial of service is much worse than loss of
   confidentiality or integrity), but such cases are quite rare.
   
   Note that I recommend ``stop processing the request'', not ``fail
   altogether''. In particular, most servers should not completely halt
   when given malformed input, because that creates a trivial opportunity
   for a denial of service attack (the attacker just sends garbage bits
   to prevent you from using the service). Sometimes taking the whole
   server down is necessary, in particular, reaching some ``can't get
   here'' states may signal a problem so drastic that continuing is
   unwise.
   
   Consider carefully what error message you send back when a failure is
   detected. if you send nothing back, it may be hard to diagnose
   problems, but sending back too much information may unintentionally
   aid an attacker. Usually the best approach is to reply with ``access
   denied'' or ``miscellaneous error encountered'' and then write more
   detailed information to an audit log (where you can have more control
   over who sees the information).
     _________________________________________________________________
   
6.6. Avoid Race Conditions

   A ``race condition'' can be defined as ``Anomolous behavior due to
   unexpected critical dependence on the relative timing of events''
   [FOLDOC]. Race conditions generally involve one or more processes
   accessing a shared resource (such a file or variable), where this
   multiple access has not been properly controlled.
   
   In general, processes do not execute atomically; another process may
   interrupt it between essentially any two instructions. If a secure
   program's process is not prepared for these interruptions, another
   process may be able to interfere with the secure program's process.
   Any pair of operations must not fail if another process's code
   arbitrary code is executed between them.
   
   Race condition problems can be notionally divided into two categories:
   
     * Interference caused by untrusted processes. Some security
       taxonomies call this problem a ``sequence'' or ``non-atomic''
       condition. These are conditions caused by processes running other,
       different programs, which ``slip in'' other actions between steps
       of the secure program. These other programs might be invoked by an
       attacker specifically to cause the problem. This paper will call
       these sequencing problems.
     * Interference caused by trusted processes (from the secure
       program's point of view). Some taxonomies call these deadlock,
       livelock, or locking failure conditions. These are conditions
       caused by processes running the ``same'' program. Since these
       different processes may have the ``same'' privileges, if not
       properly controlled they may be able to interfere with each other
       in a way other programs can't. Sometimes this kind of interference
       can be exploited. This paper will call these locking problems.
     _________________________________________________________________
   
6.6.1. Sequencing Problems

   In general, you must check your code for any pair of operations that
   might fail if arbitrary code is executed between them.
   
   Note that loading and saving a shared variable are usually implemented
   as separate operations and are not atomic. This means that an
   ``increment variable'' operation is usually converted into loading,
   incrementing, and saving operation, so if the variable is shared the
   other process may interfere with the incrementing.
   
   Secure programs must determine if a request should be granted, and if
   so, act on that request. There must be no way for an untrusted user to
   change anything used in this determination before the program acts on
   it. This kind of race condition is sometimes termed a ``time of check
   - time of use'' (TOCTOU) race condition.
   
   This issue repeatedly comes up in the filesystem. Programs should
   generally avoid using access(2) to determine if a request should be
   granted, followed later by open(2), because users may be able to move
   files around between these calls, possibly creating symbolic links or
   files of their own choosing instead. A secure program should instead
   set its effective id or filesystem id, then make the open call
   directly. It's possible to use access(2) securely, but only when a
   user cannot affect the file or any directory along its path from the
   filesystem root.
   
   For example, when performing a series of operations on a file's
   metainformation (such as changing its owner, stat-ing the file, or
   changing its permission bits), first open the file and then use the
   operations on open files. This means use the fchown( ), fstat( ), or
   fchmod( ) system calls, instead of the functions taking filenames such
   as chown(), chgrp(), and chmod(). Doing so will prevent the file from
   being replaced while your program is running (a possible race
   condition). For example, if you close a file and then use chmod() to
   change its permissions, an attacker may be able to remove the file
   between those two steps and create a symbolic link to another file
   (say /etc/passwd). Other interesting files include /dev/zero, which
   can provide an infinitely-long data stream of input to a program.
   Also, avoid the use of the access( ) function to determine your
   ability to access a file: using the access( ) function followed by an
   open( ) is a race condition, and almost always a bug. This is only
   necessary if it's possible for an untrusted process to modify the
   relevant directory its ancestors.
   
   This issue particularly comes up in the /tmp and /var/tmp directories,
   which are shared by all users. Avoid using these directories and their
   subdirectories if possible. In particular, imagine what would happen
   if users created files (including symbolic links) at arbitrary times
   in directories you intend to use (for example, between the time you
   determine a filename and the time you try to open it). You can't even
   just check to see if the given file is a symbolic link; if it's owned
   by an untrusted user, the user could change this after the check.
     _________________________________________________________________
   
6.6.2. Locking

   There are often situations in which a program must ensure that it has
   exclusive rights to something (e.g., a file, a device, and/or
   existence of a particular server process). Any system which locks
   resources must deal with the standard problems of locks, namely,
   deadlocks (``deadly embraces''), livelocks, and releasing ``stuck''
   locks if a program doesn't clean up its locks. A deadlock can occur if
   programs are stuck waiting for each other to release resources. For
   example, a deadlock would occur if process 1 locks resources A and
   waits for resource B, while process 2 locks resource B and waits for
   resource A. Many deadlocks can be prevented by simply requiring all
   processes to lock resources in the same order (e.g., you must lock
   resources alphabetically).
   
   On Unix-like systems resource locking has traditionally been done by
   creating a file to indicate a lock, because this is very portable. It
   also makes it easy to ``fix'' stuck locks, because an administrator
   can just look at the filesystem to see what locks have been set. Stuck
   locks can occur because the program failed to clean up after itself
   (e.g., it crashed or malfunctioned) or because the whole system
   crashed. Note that these are ``advisory'' (not ``mandatory'') locks -
   all processes needed the resource must cooperate to use these locks.
   
   However, there are several traps to avoid. First, a program with root
   privileges can open a file, even if it sets the exclusive mode
   (O_EXCL) when creating the file (O_EXCL mode normally fails if the
   file already exists). So, if you want to use a file to indicate a
   lock, but you might do this as root, don't use open(2) and the
   exclusive mode. A simple approach is to use link(2) instead to create
   a hard link to some file in the same directory; not even root can
   create a hard link if it already exists.
   
   Second, if the lock file may be on an NFS-mounted filesystem, then you
   have the problem that NFS version 2 doesn't completely support normal
   file semantics. This can even be a problem for work that's supposed to
   be ``local'' to a client, since some clients don't have local disks
   and may have all files remotely mounted via NFS. The manual for
   open(2) explains how to handle things in this case (which also handles
   the case of root programs):
   
   "... programs which rely on [the O_CREAT and O_EXCL flags of open(2)]
   for performing locking tasks will contain a race condition. The
   solution for performing atomic file locking using a lockfile is to
   create a unique file on the same filesystem (e.g., incorporating
   hostname and pid), use link(2) to make a link to the lockfile and use
   stat(2) on the unique file to check if its link count has increased to
   2. Do not use the return value of the link(2) call."
   
   Obviously, this solution only works if all programs doing the locking
   are cooperating, and if all non-cooperating programs aren't allowed to
   interfere. In particular, the directories you're using for file
   locking must not have permissive file permissions for creating and
   removing files.
   
   NFS version 3 added support for O_EXCL mode in open(2); see IETF RFC
   1813, in particular the "EXCLUSIVE" value to the "mode" argument of
   "CREATE". Sadly, not everyone has switched to NFS version 3 at the
   time of this writing, so you you can't depend on this in portable
   programs.
   
   If you're locking a device or the existence of a process on a local
   machine, try to use standard conventions. I recommend using the
   Filesystem Hierarchy Standard (FHS); it is widely referenced by Linux
   systems, but it also tries to incorporate the ideas of other Unix-like
   systems. The FHS describes standard conventions for such locking
   files, including naming, placement, and standard contents of these
   files [FHS 1997]. If you just want to be sure that your server doesn't
   execute more than once on a given machine, you should usually create a
   process identifier as /var/run/NAME.pid with the pid as its contents.
   In a similar vein, you should place lock files for things like device
   lock files in /var/lock. This approach has the minor disadvantage of
   leaving files hanging around if the program suddenly halts, but it's
   standard practice and that problem is easily handled by other system
   tools.
   
   It's important that the programs which are cooperating using files to
   represent the locks use the "same" directory, not just the same
   directory name. This is an issue with networked systems: the FHS
   explicitly notes that /var/run and /var/lock are unshareable, while
   /var/mail is shareable. Thus, if you want the lock to work on a single
   machine, but not interfere with other machines, use unshareable
   directories like /var/run (e.g., you want to permit each machine to
   run its own server). However, if you want all machines sharing files
   in a network to obey the lock, you need to use a directory that
   they're sharing; /var/mail is one such location. See FHS section 2 for
   more information on this subject.
   
   Of course, you need not use files to represent locks. Network servers
   often need not bother; the mere act of binding can act as a kind of
   lock, since if there's an existing server bound to a given port, no
   other server will be able to bind to that port.
   
   Another approach to locking is to use POSIX record locks, implemented
   through fcntl(2) as a ``discretionary lock''. These are discretionary,
   that is, using them requires the cooperation of the programs needing
   the locks (just as the approach to using files to represent locks
   does). There's a lot to recommend POSIX record locks: POSIX record
   locking is supported on nearly all Unix-like platforms (it's mandated
   by POSIX.1), it can lock portions of a file (not just a whole file),
   and it can handle the difference between read locks and write locks.
   Even more usefully, if a process dies, its locks are automatically
   removed, which is usually what is desired.
   
   You can also use mandatory locks, which are based on System V's
   mandatory locking scheme. These only apply to files where the locked
   file's setgid bit is set, but the group execute bit is not set. Also,
   you must mount the filesystem to permit mandatory file locks. In this
   case, every read(2) and write(2) is checked for locking; while this is
   more thorough than advisory locks, it's also slower. Also, mandatory
   locks don't port as widely to other Unix-like systems (they're
   available on Linux and System V-based systems, but not necessarily on
   others). Note that processes with root privileges can be held up by a
   mandatory lock, too, making it possible that this could be the basis
   of a denial-of-service attack.
     _________________________________________________________________
   
6.7. Trust Only Trustworthy Channels

   In general, do not trust results from untrustworthy channels.
   
   In most computer networks (and certainly for the Internet at large),
   no unauthenticated transmission is trustworthy. For example, on the
   Internet arbitrary packets can be forged, including header values, so
   don't use their values as your primary criteria for security decisions
   unless you can authenticate them. In some cases you can assert that a
   packet claiming to come from the ``inside'' actually does, since the
   local firewall would prevent such spoofs from outside, but broken
   firewalls, alternative paths, and mobile code make even this
   assumption suspect. In a similar vein, do not assume that low port
   numbers (less than 1024) are trustworthy; in most networks such
   requests can be forged or the platform can be made to permit use of
   low-numbered ports.
   
   If you're implementing a standard and inherently insecure protocol
   (e.g., ftp and rlogin), provide safe defaults and document clearly the
   assumptions.
   
   The Domain Name Server (DNS) is widely used on the Internet to
   maintain mappings between the names of computers and their IP
   (numeric) addresses. The technique called ``reverse DNS'' eliminates
   some simple spoofing attacks, and is useful for determining a host's
   name. However, this technique is not trustworthy for authentication
   decisions. The problem is that, in the end, a DNS request will be sent
   eventually to some remote system that may be controlled by an
   attacker. Therefore, treat DNS results as an input that needs
   validation and don't trust it for serious access control.
   
   If asking for a password, try to set up trusted path (e.g., require
   pressing an unforgeable key before login, or display unforgeable
   pattern such as flashing LEDs). Unfortunately, stock Linux doesn't
   have a trusted path even for its normal login sequence, and since
   currently normal users can change the LEDs, the LEDs can't currently
   be used to confirm a trusted path. When handling a password, encrypt
   it between trusted endpoints.
   
   Arbitrary email (including the ``from'' value of addresses) can be
   forged as well. Using digital signatures is a method to thwart many
   such attacks. A more easily thwarted approach is to require emailing
   back and forth with special randomly-created values, but for low-value
   transactions such as signing onto a public mailing list this is
   usually acceptable.
   
   If you need a trustworthy channel over an untrusted network, you need
   some sort of cryptologic service (at the very least, a cryptologically
   safe hash); see the section below on cryptographic algorithms and
   protocols.
   
   Note that in any client/server model, including CGI, that the server
   must assume that the client can modify any value. For example,
   so-called ``hidden fields'' and cookie values can be changed by the
   client before being received by CGI programs. These cannot be trusted
   unless they are signed in a way the client cannot forge and the server
   checks the signature.
   
   The routines getlogin(3) and ttyname(3) return information that can be
   controlled by a local user, so don't trust them for security purposes.
   
   This issue applies to data referencing other data, too. For example,
   HTML or XML allow you to include by reference other files (e.g., DTDs
   and style sheets) that may be stored remotely. However, those external
   references could be modified so that users see a very different
   document than intended; a style sheet could be modified to ``white
   out'' words at critical locations, deface its appearance, or insert
   new text. External DTDs could be modified to prevent use of the
   document (by adding declarations that break validation) or insert
   different text into documents [St. Laurent 2000].
     _________________________________________________________________
   
6.8. Use Internal Consistency-Checking Code

   The program should check to ensure that its call arguments and basic
   state assumptions are valid. In C, macros such as assert(3) may be
   helpful in doing so.
     _________________________________________________________________
   
6.9. Self-limit Resources

   In network daemons, shed or limit excessive loads. Set limit values
   (using setrlimit(2)) to limit the resources that will be used. At the
   least, use setrlimit(2) to disable creation of ``core'' files. For
   example, by default Linux will create a core file that saves all
   program memory if the program fails abnormally, but such a file might
   include passwords or other sensitive data.
     _________________________________________________________________
   
Chapter 7. Carefully Call Out to Other Resources

     
   
   Do not put your trust in princes, in mortal men, who cannot save.
     Psalms 146:3 (NIV)
     _________________________________________________________________
   
7.1. Limit Call-outs to Valid Values

   Ensure that any call out to another program only permits valid and
   expected values for every parameter. This is more difficult than it
   sounds, because there are many library calls or commands call
   lower-level routines in potentially surprising ways. For example,
   several system calls, such as popen(3) and system(3), are implemented
   by calling the command shell, meaning that they will be affected by
   shell metacharacters. Similarly, execlp(3) and execvp(3) may cause the
   shell to be called. Many guidelines suggest avoiding popen(3),
   system(3), execlp(3), and execvp(3) entirely and use execve(3)
   directly in C when trying to spawn a process [Galvin 1998b]. At the
   least, avoid using system(3) when you can use the execve(3); since
   system(3) uses the shell to expand characters, there is more
   opportunity for mischief in system(3). In a similar manner the Perl
   and shell backtick (`) also call a command shell; see the section on
   Perl.
   
   One of the nastiest examples of this problem are shell metacharacters.
   The standard Unix-like command shell (stored in /bin/sh) interprets a
   number of characters specially. If these characters are sent to the
   shell, then their special interpretation will be used unless escaped;
   this fact can be used to break programs. According to the WWW Security
   FAQ [Stein 1999, Q37], these metacharacters are:
& ; ` ' \ " | * ? ~ < > ^ ( ) [ ] { } $ \n \r

   Unfortunately, in real life this isn't a complete list. Here are some
   other characters that can be problematic:
   
     * '!' means ``not'' in an expression (as it does in C); if the
       return value of a program is tested, prepending ! could fool a
       script into thinking something had failed when it succeeded or
       vice versa. In some shells, the "!" also accesses the command
       history, which can cause real problems. In bash, this only occurs
       for interactive mode, but tcsh (a csh clone found in some Linux
       distributions) uses "!" even in scripts. In csh, bash, and some
       other shells, if you can fool them i Also new bash seems to use
       '!' for accessing command history - but this probably only in
       interactive mode.
     * '#' is the comment character; all further text is ignored.
     * '-' can be misinterpreted as leading an option (or, as --,
       disabling all further options). Even if it's in the ``middle'' of
       a filename, if it's preceeded by what the shell considers as
       whitespace you may have a problem.
     * ' ' (space) and other whitespace characters may turn a ``single''
       filename into multiple arguments.
     * Other control characters (in particular, NIL) may cause problems
       for some shell implementations.
     * Depending on your usage, it's even conceivable that ``.'' (the
       ``run in current shell'') and ``='' (for setting variables) might
       be worrisome characters, though any example I've found so far
       where these are issues create much worse security problems.
       
   Forgetting one of these characters can be disastrous, for example,
   many programs omit backslash as a metacharacter [rfp 1999]. As
   discussed in the section on validating input, a recommended approach
   by some is to immediately escape at least all of these characters when
   they are input. But again, by far and away the best approach is to
   identify which characters you wish to permit, and only use those
   characters.
   
   A number of programs have ``escape'' codes that perform ``extra''
   activities; make sure that these can't be included (unless you intend
   for them to be in the message). For example, many line-oriented mail
   programs (such as mail or mailx) use tilde (~) as an escape character,
   which can then be used to send a number of commands. As a result,
   apparantly-innocent commands such as ``mail admin < file-from-user''
   can be used to execute arbitrary programs. Interactive programs such
   as vi and emacs have ``escape'' mechanisms that normally allow users
   to run arbitrary shell commands from their session. Always examine the
   documentation of programs you call to search for escape mechanisms.
   
   The issue of avoiding escape codes even goes down to low-level
   hardware components and emulators of them. Most modems implement the
   so-called ``Hayes'' command set, in which the sequence ``+++'', a
   delay, and then ``+++'' again forces the modem to switch modes (and
   interpret following text as commands to it). This can be used to
   implement denial-of-service attacks or even forcing a user to connect
   to someone else. Many ``terminal'' interfaces implement the escape
   codes of ancient, long-gone physical terminals like the VT100. These
   codes can be useful, for example, for changing font color in a
   terminal interface. However, do not allow arbitrary untrusted data to
   be sent directly to a terminal screen, because some of those codes can
   cause serious problems. On some systems you can remap keys; on a few
   you can even send codes to clear the screen, display a set of commands
   you'd like the victim to run, and then send that set ``back'' (forcing
   the victim to run the commands of the attacker's choosing).
   
   A related problem is that the NIL character (character 0) can have
   surprising effects. Most C and C++ functions assume that this
   character marks the end of a string, but string-handling routines in
   other languages (such as Perl and Ada95) can handle strings containing
   NIL. Since many libraries and kernel calls use the C convention, the
   result is that what is checked is not what is actually used [rfp
   1999].
   
   When calling another program or referring to a file always specify its
   full path (e.g, /usr/bin/sort). For program calls, this will eliminate
   possible errors in calling the ``wrong'' command, even if the PATH
   value is incorrectly set. For other file referents, this reduces
   problems from ``bad'' starting directories.
     _________________________________________________________________
   
7.2. Check All System Call Returns

   Every system call that can return an error condition must have that
   error condition checked. One reason is that nearly all system calls
   require limited system resources, and users can often affect resources
   in a variety of ways. Setuid/setgid programs can have limits set on
   them through calls such as setrlimit(3) and nice(2). External users of
   server programs and CGI scripts may be able to cause resource
   exhaustion simply by making a large number of simultaneous requests.
   If the error cannot be handled gracefully, then fail open as discussed
   earlier.
     _________________________________________________________________
   
Chapter 8. Send Information Back Judiciously

     
   
   Do not answer a fool according to his folly, or you will be like him
   yourself.
     Proverbs 26:4 (NIV)
     _________________________________________________________________
   
8.1. Minimize Feedback

   Avoid giving much information to untrusted users; simply succeed or
   fail, and if it fails just say it failed and minimize information on
   why it failed. Save the detailed information for audit trail logs. For
   example:
   
     * If your program requires some sort of user authentication (e.g.,
       you're writing a network service or login program), give the user
       as little information as possible before they authenticate. In
       particular, avoid giving away the version number of your program
       before authentication. Otherwise, if a particular version of your
       program is found to have a vulnerability, then users who don't
       upgrade from that version advertise to attackers that they are
       vulnerable.
     * If your program accepts a password, don't echo it back; this
       creates another way passwords can be seen.
     _________________________________________________________________
   
8.2. Handle Full/Unresponsive Output

   It may be possible for a user to clog or make unresponsive a secure
   program's output channel back to that user. For example, a web browser
   could be intentionally halted or have its TCP/IP channel response
   slowed. The secure program should handle such cases, in particular it
   should release locks quickly (preferably before replying) so that this
   will not create an opportunity for a Denial-of-Service attack. Always
   place timeouts on outgoing network-oriented write requests.
     _________________________________________________________________
   
Chapter 9. Language-Specific Issues

     
   
   Undoubtedly there are all sorts of languages in the world, yet none of
   them is without meaning.
     1 Corinthians 14:10 (NIV)
   
   There are many language-specific security issues. Many of them can be
   summarized as follows:
   
     * Turn on all relevant warnings and protection mechanisms available
       to you where practical. For compiled languages, this includes both
       compile-time mechanisms and run-time mechanisms. In general,
       security-relevant programs should compile cleanly with all
       warnings turned on.
     * Avoid dangerous and deprecated operations in the language. By
       ``dangerous'', I mean operations which are difficult to use
       correctly.
     * Ensure that the languages' infrastructure (e.g., run-time library)
       is available and secured.
     * Languages that automatically garbage-collect strings should be
       especially careful to immediately erase secret data (in particular
       secret keys and passwords).
     * Know precisely the semantics of the operations that you are using.
       Look up operation's semantics in its documentation. Do not ignore
       return values unless you're sure they cannot be relevant. This is
       particularly difficult in languages which don't support
       exceptions, like C, but that's the way it goes.
     _________________________________________________________________
   
9.1. C/C++

   One of the biggest security problems with C and C++ programs is buffer
   overflow; see the chapter on buffer overflow for more information. C
   has the additional weakness of not supporting exceptions, which makes
   it easy to write programs that ignore critical error situations.
   
   For C or C++ compilations using gcc, use at least the following as
   compilation flags (which turn on a host of warning messages) and try
   to eliminate all warnings (note that -O2 is used since some warnings
   can only be detected by the data flow analysis performed at higher
   optimization levels):
gcc -Wall -Wpointer-arith -Wstrict-prototypes -O2

   You may find some auditing tools helpful for finding potential
   security flaws. Here are a few:
   
     * ITS4 from Reliable Software Technologies (RST) statically checks
       C/C++ code. ITS4 works by performing pattern-matching on source
       code, looking for patterns known to be possibly dangerous (e.g.,
       certain function calls). It is available free for non-commercial
       use, including its source code and with certain modification and
       redistribution rights. One warning; the tool's licensing claims
       can be initially misleading. RST claims that ITS4 is ``open
       source'' but, in fact, its license does not meet the [124]Open
       Source Definition (OSD). In particular, ITS4's license fails point
       6, which forbids ``non-commercial use only'' clauses in open
       source licenses. It's unfortunate that RST insists on using the
       term ``open source'' to describe their license. ITS4 is a fine
       tool, released under a fairly generous license for commercial
       software, yet using the term this way can give the appearance of a
       company trying to gain the cachet of ``open source'' without
       actually being open source. RST says that they simply don't accept
       the OSD definition and that they wish to use a different
       definition instead. Nothing legally prevents this, but the OSD
       definition is used by over 5000 software projects (at least all
       those hosted by SourceForge at http://www.sourceforge.net), Linux
       distributors, Netscape (now AOL), the W3C, journalists (such as
       those of the Economist), and many other organizations. Most
       programmers don't want to wade through license agreements, so
       using this other definition can be confusing. I do not believe RST
       has any intention to mislead; they're a reputable company with
       very reputable and honest people. It's unfortunate that this
       particular position of theirs leads (in my opinion) to unnecessary
       confusion. In any case, ITS4 is available at
       [125]http://www.rstcorp.com/its4.
     * LCLint is a tool for statically checking C programs. With minimal
       effort, LCLint can be used as a better lint. If additional effort
       is invested adding annotations to programs, LCLint can perform
       stronger checking than can be done by any standard lint. The
       software is licensed under the GPL and is available from
       [126]http://lclint.cs.virginia.edu.
     _________________________________________________________________
   
9.2. Perl

   Perl programmers should first read the man page perlsec(1), which
   describes a number of issues involved with writing secure programs in
   Perl. In particular, perlsec(1) describes the ``taint'' mode, which
   most secure Perl programs should use. Taint mode is automatically
   enabled if the real and effective user or group IDs differ, or you can
   use the -T command line flag (use the latter if you're running on
   behalf of someone else, e.g., a CGI script). Taint mode turns on
   various checks, such as checking path directories to make sure they
   aren't writable by others.
   
   The most obvious affect of taint mode, however, is that you may not
   use data derived from outside your program to affect something else
   outside your program by accident. In taint mode, all
   externally-obtained input is marked as ``tainted'', including command
   line arguments, environment variables, locale information (see the
   perllocale(1)), results of certain system calls (readdir, readlink,
   the gecos field of getpw* calls), and all file input. Tainted data may
   not be used directly or indirectly in any command that invokes a
   sub-shell, nor in any command that modifies files, directories, or
   processes. There is one important exception: If you pass a list of
   arguments to either system or exec, the elements of that list are NOT
   checked for taintedness, so be especially careful with system or exec
   while in taint mode.
   
   Any data value derived from tainted data becomes tainted also. There
   is one exception to this; the way to untaint data is to extract a
   substring of the tainted data. Don't just use ``.*'' blindly as your
   substring, though, since this would defeat the tainting mechanism's
   protections. Instead, identify patterns that identify the ``safe''
   pattern allowed by your program, and use them to extract ``good''
   values. After extracting the value, you may still need to check it (in
   particular for its length).
   
   The open, glob, and backtick functions call the shell to expand
   filename wild card characters; this can be used to open security
   holes. You can try to avoid these functions entirely, or use them in a
   less-privileged ``sandbox'' as described in perlsec(1).
   
   The perl open() function comes with, frankly, ``way too much magic''
   for most secure programs; it interprets text that, if not carefully
   filtered, can create lots of security problems. Before writing code to
   open or lock a file, consult the perlopentut(1) man page. In most
   cases, sysopen() provides a safer (though more convoluted) approach to
   opening a file. [127]The new Perl 5.6 adds an open() call with 3
   parameters to turn off the magic behavior without requiring the
   convolutions of sysopen().
   
   Perl programs should turn on the warning flag (-w), which warns of
   potentially dangerous or obsolete statements.
   
   You can also run Perl programs in a restricted environment. For more
   information see the ``Safe'' module in the standard Perl distribution.
   I'm uncertain of the amount of auditing that this has undergone, so
   user beware. You might also investigate the ``Penguin Model for Secure
   Distributed Internet Scripting'', though at the time of this writing
   the code and documentation seems to be unavailable.
     _________________________________________________________________
   
9.3. Python

   Python programs with privileges that can be invoked by unprivileged
   users (e.g., setuid/setgid programs) must not import the ``user''
   module. The user module causes the pythonrc.py file to be read and
   executed. Since this file would be under the control of an untrusted
   user, importing the user module allows an attacker to force the
   trusted program to run arbitrary code.
   
   Python includes support for ``Restricted Execution'' through its RExec
   class. This is primarily intended for executing applets and mobile
   code, but it can also be used to limit privilege in a program even
   when the code has not been provided externally. By default, a
   restricted execution environment permits reading (but not writing) of
   files, and does not include operations for network access or GUI
   interaction. These defaults can be changed, but beware of creating
   loopholes in the restricted environment. In particular, allowing a
   user to unrestrictedly add attributes to a class permits all sorts of
   ways to subvert the environment because Python's implementation calls
   many ``hidden'' methods. Note that, by default, most Python objects
   are passed by reference; if you insert a reference to a mutable value
   into a restricted program's environment, the restricted program can
   change the object in a way that's visible outside the restricted
   environment! Thus, if you want to give access to a mutable value, in
   many cases you should copy the mutable value or use the Bastion module
   (which supports restricted access to another object). For more
   information, see Kuchling [2000]. I'm uncertain of the amount of
   auditing that this has undergone, so user beware.
     _________________________________________________________________
   
9.4. Shell Scripting Languages (sh and csh Derivatives)

   I strongly recommend against using standard command shell scripting
   languages (such as csh, sh, and bash) for setuid/setgid secure code.
   Some systems (such as Linux) completely disable them, so you're
   creating an unnecessary portability problem. On some old systems they
   are fundamentally insecure due to a race condition (as discussed in
   the section on processes). Even for other systems, they're not really
   a good idea. Standard command shells are still notorious for being
   affected by nonobvious inputs - generally because they were designed
   to try to do things ``automatically'' for an interactive user, not to
   defend against a determined attacker. For example, ``hidden''
   environment variables that affect how they operate before the script
   can even execute. Even things like filenames of the executable or
   directory contents can affect things. For example, on many Bourne
   shell implementations, doing the following will grant root access
   (thanks to NCSA for describing this exploit):
 % ln -s /usr/bin/setuid-shell /tmp/-x
 % cd /tmp
 % -x

   Some systems may have closed this hole, but the point still stands:
   most command shells aren't intended for writing secure programs. For
   programming purposes, avoid creating setuid shell scripts, even on
   those systems that permit them. Instead, write a small program in
   another language to clean up the environment, then have it call other
   executables (some of which might be shell scripts).
   
   If you still insist on using shell scripting languages, at least put
   the script in a directory where it cannot be moved or changed. Set
   PATH and IFS to known values very early in your script.
     _________________________________________________________________
   
9.5. Ada

   In Ada95, the Unbounded_String type is often more flexible than the
   String type because it is automatically resized as necessary. However,
   don't store especially sensitive values such as passwords or secret
   keys in an Unbounded_String, since core dumps and page areas might
   still hold them later. Instead, use the String type for this data and
   overwrite the data as soon as possible with some constant value such
   as others => ' '.
     _________________________________________________________________
   
9.6. Java

   If you're developing secure programs using Java, frankly your first
   step (after learning Java) is to read the two primary texts for Java
   security, namely Gong [1999] and McGraw [1999] (for the latter, look
   particularly at section 7.1). You should also look at Sun's posted
   security code guidelines at
   [128]http://java.sun.com/security/seccodeguide.html. A set of slides
   describing Java's security model are freely available at
   [129]http://www.dwheeler.com/javasec.
   
   The following are a few key guidelines, based on Gong [1999], McGraw
   [1999], and Sun's guidance:
   
    1. Do not use public fields or variables; declare them as private and
       provide accessors to them so you can limit their accessibility.
    2. Make methods private unless these is a good reason to do otherwise
       (and if you do otherwise, document why). These non-private methods
       must protect themselves, because they may receive tainted data
       (unless you've somehow arranged to protect them).
    3. Avoid using static field variables. Such variables are attached to
       the class (not class instances), and classes can be located by any
       other class. As a result, static field variables can be found by
       any other class, making them much more difficult to secure.
    4. Never return a mutable object to potentially malicious code (since
       the code may decide to change it). Note that arrays are mutable
       (even if the array contents aren't), so don't return a reference
       to an internal array with sensitive data.
    5. Never store user given mutable objects (including arrays of
       objects) directly. Otherwise, the user could hand the object to
       the secure code, let the secure code ``check'' the object, and
       change the data while the secure code was trying to use the data.
       Clone arrays before saving them internally, and be careful here
       (e.g., beware of user-written cloning routines).
    6. Don't depend on initialization. There are several ways to allocate
       uninitialized objects.
    7. Make everything final, unless there's a good reason not to. If a
       class or method is non-final, an attacker could try to extend it
       in a dangerous and unforeseen way. Note that this causes a loss of
       extensibility, in exchange for security.
    8. Don't depend on package scope for security. A few classes, such as
       java.lang, are closed by default, and some Java Virtual Machines
       (JVMs) let you close off other packages. Otherwise, Java classes
       are not closed. Thus, an attacker could introduce a new class
       inside your package, and use this new class to access the things
       you thought you were protecting.
    9. Don't use inner classes. When inner classes are translated into
       byte codes, the inner class is translated into a class accesible
       to any class in the package. Even worse, the enclosing class's
       private fields silently become non-private to permit access by the
       inner class!
   10. Minimize privileges. Where possible, don't require any special
       permissions at all. McGraw goes further and recommends not signing
       any code; I say go ahead and sign the code (so users can decide to
       ``run only signed code by this list of senders''), but try to
       write the program so that it needs nothing more than the sandbox
       set of privileges. If you must have more privileges, audit that
       code especially hard.
   11. If you must sign your code, put it all in one archive file. Here
       it's best to quote McGraw [1999]:
       
     The goal of this rule is to prevent an attacker from carrying out a
     mix-and-match attack in which the attacker constructs a new applet
     or library that links some of your signed classes together with
     malicious classes, or links together signed classes that you never
     meant to be used together. By signing a group of classes together,
     you make this attack more difficult. Existing code-signing systems
     do an inadequate job of preventing mix-and-match attacks, so this
     rule cannot prevent such attacks completely. But using a single
     archive can't hurt.
   12. Make your classes uncloneable. Java's object-cloning mechanism
       allows an attacker to instantiate a class without running any of
       its constructors. To make your class uncloneable, just define the
       following method in each of your classes:
       
public final void clone() throws java.lang.CloneNotSupportedException {
   throw new java.lang.CloneNotSupportedException();
   }

       If you really need to make your class cloneable, then there are
       some protective measures you can take to prevent attackers from
       redefining your clone method. If you're defining your own clone
       method, just make it final. If you're not, you can at least
       prevent the clone method from being maliciously overridden by
       adding the following:
       
public final void clone() throws java.lang.CloneNotSupportedException {
  super.clone();
  }

   13. Make your classes unserializeable. Serialization allows attackers
       to view the internal state of your objects, even private portions.
       To prevent this, add this method to your classes:
       
private final void writeObject(ObjectOutputStream out)
  throws java.io.IOException {
     throw new java.io.IOException("Object cannot be serialized");
  }

       Even in cases where serialization is okay, be sure to use the
       transient keyword for the fields that contain direct handles to
       system resources and that contain information relative to an
       address space. Otherwise, deserializing the class may permit
       improper access. You may also want to identify sensitive
       information as transient.
       If you define your own serializing method for a class, it should
       not pass an internal array to any DataInput/DataOuput method that
       takes an array. The rationale: All DataInput/DataOutput methods
       can be overridden. If a Serializable class passes a private array
       directly to a DataOutput(write(byte [] b)) method, then an
       attacker could subclass ObjectOutputStream and override the
       write(byte [] b) method to enable him to access and modify the
       private array. Note that the default serialization does not expose
       private byte array fields to DataInput/DataOutput byte array
       methods.
   14. Make your classes undeserializeable. Even if your class is not
       serializeable, it may still be deserializeable. An attacker can
       create a sequence of bytes that happens to deserialize to an
       instance of your class with values of the attacker's choosing. In
       other words, deserialization is a kind of public constructor,
       allowing an attacker to choose the object's state - clearly a
       dangerous operation! To prevent this, add this method to your
       classes:
       
private final void readObject(ObjectInputStream in)
  throws java.io.IOException {
    throw new java.io.IOException("Class cannot be deserialized");
  }

   15. Don't compare classes by name. After all, attackers can define
       classes with identical names, and if you're not careful you can
       cause confusion by granting these classes undesirable privileges.
       Thus, here's an example of the wrong way to determine if an object
       has a given class:
       
  if (obj.getClass().getName().equals("Foo")) {

       If you need to determine if two objects have exactly the same
       class, instead use getClass() on both sides and compare using the
       == operator, Thus, you should use this form:
       
  if (a.getClass() == b.getClass()) {

       If you truly need to determine if an object has a given classname,
       you need to be pedantic and be sure to use the current namespace
       (of the current class's ClassLoader). Thus, you'll need to use
       this format:
       
  if (obj.getClass() == this.getClassLoader().loadClass("Foo")) {

       This guideline is from McGraw and Felten, and it's a good
       guideline. I'll add that, where possible, it's often a good idea
       to avoid comparing class values anyway. It's often better to try
       to design class methods and interfaces so you don't need to do
       this at all. However, this isn't always practical, so it's
       important to know these tricks.
   16. Don't store secrets (cryptographic keys, passwords, or algorithm)
       in the code or data. Hostile JVMs can quickly view this data. Code
       obfuscation doesn't really hide the code from serious attackers.
     _________________________________________________________________
   
Chapter 10. Special Topics

     
   
   Understanding is a fountain of life to those who have it, but folly
   brings punishment to fools.
     Proverbs 16:22 (NIV)
     _________________________________________________________________
   
10.1. Passwords

   Where possible, don't write code to handle passwords. In particular,
   if the application is local, try to depend on the normal login
   authentication by a user. If the application is a CGI script, try to
   depend on the web server to provide the protection. If the application
   is over a network, avoid sending the password as cleartext (where
   possible) since it can be easily captured by network sniffers and
   reused later. ``Encrypting'' a password using some key fixed in the
   algorithm or using some sort of shrouding algorithm is essentially the
   same as sending the password as cleartext.
   
   For networks, consider at least using digest passwords. Digest
   passwords are passwords developed from hashes; typically the server
   will send the client some data (e.g., date, time, name of server), the
   client combines this data with the user password, the client hashes
   this value (termed the ``digest pasword'') and replies just the hashed
   result to the server; the server verifies this hash value. This works,
   because the password is never actually sent in any form; the password
   is just used to derive the hash value. Digest passwords aren't
   considered ``encryption'' in the usual sense and are usually accepted
   even in countries with laws constraining encryption for
   confidentiality. Digest passwords are vulnerable to active attack
   threats but protect against passive network sniffers. One weakness is
   that, for digest passwords to work, the server must have all the
   unhashed passwords, making the server a very tempting target for
   attack.
   
   If your application must handle passwords, overwrite them immediately
   after use so they have minimal exposure. In Java, don't use the type
   String to store a password because Strings are immutable (they will
   not be overwritten until garbage-collected and reused, possibly a far
   time in the future). Instead, in Java use char[] to store a password,
   so it can be immediately overwritten.
   
   If your application permits users to set their passwords, check the
   passwords and permit only ``good'' passwords (e.g., not in a
   dictionary, having certain minimal length, etc.). You may want to look
   at information such as
   [130]http://consult.cern.ch/writeup/security/security_3.html on how to
   choose a good password.
     _________________________________________________________________
   
10.2. Random Numbers

   ``Random'' numbers generated by many library routines are intended to
   be used for simulations, games, and so on; they are not sufficiently
   random for use in security functions such as key generation. The
   problem is that these library routines use algorithms whose future
   values can be easily deduced by an attacker (though they may appear
   random). For security functions, you need random values based on truly
   unpredictable values such as quantum effects.
   
   The Linux kernel (since 1.3.30) includes a random number generator,
   which is sufficient for many security purposes. This random number
   generator gathers environmental noise from device drivers and other
   sources into an entropy pool. When accessed as /dev/random, random
   bytes are only returned within the estimated number of bits of noise
   in the entropy pool (when the entropy pool is empty, the call blocks
   until additional environmental noise is gathered). When accessed as
   /dev/urandom, as many bytes as are requested are returned even when
   the entropy pool is exhausted. If you are using the random values for
   cryptographic purposes (e.g., to generate a key), use /dev/random.
   More information is available in the system documentation random(4).
     _________________________________________________________________
   
10.3. Cryptographic Algorithms and Protocols

   Often cryptographic algorithms and protocols are necessary to keep a
   system secure, particularly when communicating through an untrusted
   network such as the Internet. Where possible, use session encryption
   to foil session hijacking and to hide authentication information, as
   well as to support privacy.
   
   Cryptographic algorithms and protocols are difficult to get right, so
   do not create your own. Instead, use existing standard-conforming
   protocols such as SSL, SSH, IPSec, GnuPG/PGP, and Kerberos. Use only
   encryption algorithms that have been openly published and withstood
   years of attack (examples include triple DES, which is also not
   encumbered by patents). In particular, do not create your own
   encryption algorithms unless you are an expert in cryptology, know
   what you're doing, and plan to spend years in professional review of
   the algorithm. Creating encryption algorithms is a task for experts
   only.
   
   In a related note, if you must create your own communication protocol,
   examine the problems of what's gone on before. Classics such as
   Bellovin [1989]'s review of security problems in the TCP/IP protocol
   suite might help you, as well as Bruce Schneier [1998] and Mudge's
   breaking of Microsoft's PPTP implementation and their follow-on work.
   Of course, be sure to give any new protocol widespread review, and
   reuse what you can.
   
   For background information and code, you should probably look at the
   classic text ``Applied Cryptography'' [Schneier 1996]. Linux-specific
   resources include the Linux Encryption HOWTO at
   [131]http://marc.mutz.com/Encryption-HOWTO/.
     _________________________________________________________________
   
10.4. PAM

   Pluggable Authentication Modules (PAM) is a flexible mechanism for
   authenticating users. Many Unix-like systems support PAM, including
   Solaris, nearly all Linux distributions (e.g., Red Hat Linux, Caldera,
   and Debian as of version 2.2), and FreeBSD as of version 3.1. By using
   PAM, your program can be independent of the authentication scheme
   (passwords, SmartCards, etc.). Basically, your program calls PAM,
   which at run-time determines which ``authentication modules'' are
   required by checking the configuration set by the local system
   administrator. If you're writing a program that requires
   authentication (e.g., entering a password), you should include support
   for PAM. You can find out more about the Linux-PAM project at
   [132]http://www.kernel.org/pub/linux/libs/pam/index.html.
     _________________________________________________________________
   
10.5. Miscellaneous

   Have your program check at least some of its assumptions before it
   uses them (e.g., at the beginning of the program). For example, if you
   depend on the ``sticky'' bit being set on a given directory, test it;
   such tests take little time and could prevent a serious problem. If
   you worry about the execution time of some tests on each call, at
   least perform the test at installation time, or even better at least
   perform the test on application start-up.
   
   Write audit logs for program startup, session startup, and for
   suspicious activity. Possible information of value includes date,
   time, uid, euid, gid, egid, terminal information, process id, and
   command line values. You may find the function syslog(3) helpful for
   implementing audit logs. There is the danger that a user could create
   a denial-of-service attack (or at least stop auditing) by performing a
   very large number of events that cut an audit record until the system
   runs out of resources to store the records. One approach to counter to
   this threat is to rate-limit audit record recording; intentionally
   slow down the response rate if ``too many'' audit records are being
   cut. You could try to slow the response rate only to the suspected
   attacker, but in many situations a single attacker can masquerade as
   potentially many users.
   
   If you have a built-in scripting language, it may be possible for the
   language to set an environment variable which adversely affects the
   program invoking the script. Defend against this.
   
   If you need a complex configuration language, make sure the language
   has a comment character and include a number of commented-out secure
   examples. Often '#' is used for commenting, meaning ``the rest of this
   line is a comment''.
   
   If possible, don't create setuid or setgid root programs; make the
   user log in as root instead.
   
   Sign your code. That way, others can check to see if what's available
   was what was sent.
   
   Consider statically linking secure programs. This counters attacks on
   the dynamic link library mechanism by making sure that the secure
   programs don't use it.
   
   When reading over code, consider all the cases where a match is not
   made. For example, if there is a switch statement, what happens when
   none of the cases match? If there is an ``if'' statement, what happens
   when the condition is false?
     _________________________________________________________________
   
Chapter 11. Conclusion

     
   
   The end of a matter is better than its beginning, and patience is
   better than pride.
     Ecclesiastes 7:8 (NIV)
   
   Designing and implementing a truly secure program is actually a
   difficult task on Unix-like systems such as Linux and Unix. The
   difficulty is that a truly secure program must respond appropriately
   to all possible inputs and environments controlled by a potentially
   hostile user. Developers of secure programs must deeply understand
   their platform, seek and use guidelines (such as these), and then use
   assurance processes (such as peer review) to reduce their programs'
   vulnerabilities.
   
   In conclusion, here are some of the key guidelines from this paper:
   
     * Validate all your inputs, including command line inputs,
       environment variables, CGI inputs, and so on. Don't just reject
       ``bad'' input; define what is an ``acceptable'' input and reject
       anything that doesn't match.
     * Avoid buffer overflow. This is the primary programmatic error at
       this time.
     * Structure Program Internals. Secure the interface, minimize
       privileges, make the initial configuration and defaults safe, and
       fail safe. Avoid race conditions and trust only trustworthy
       channels (e.g., most servers must not trust their clients for
       security checks).
     * Carefully call out to other resources. Limit their values to valid
       values (in particular be concerned about metacharacters), and
       check all system call return values.
     * Reply information judiciously. In particular, minimize feedback,
       and handle full or unresponsive output to an untrusted user.
     _________________________________________________________________
   
Chapter 12. Bibliography

     
   
   The words of the wise are like goads, their collected sayings like
   firmly embedded nails--given by one Shepherd. Be warned, my son, of
   anything in addition to them. Of making many books there is no end,
   and much study wearies the body.
     Ecclesiastes 12:11-12 (NIV)
   
   Note that there is a heavy emphasis on technical articles available on
   the web, since this is where most of this kind of technical
   information is available.
   
   [Al-Herbish 1999] Al-Herbish, Thamer. 1999. Secure Unix Programming
   FAQ. [133]http://www.whitefang.com/sup.
   
   [Aleph1 1996] Aleph1. November 8, 1996. ``Smashing The Stack For Fun
   And Profit''. Phrack Magazine. Issue 49, Article 14.
   [134]http://www.phrack.com/search.phtml?view&article=p49-14 or
   alternatively [135]http://www.2600.net/phrack/p49-14.html.
   
   [Anonymous 1999] Anonymous. October 1999. Maximum Linux Security: A
   Hacker's Guide to Protecting Your Linux Server and Workstation Sams.
   ISBN: 0672316706.
   
   [Anonymous 1998] Anonymous. September 1998. Maximum Security : A
   Hacker's Guide to Protecting Your Internet Site and Network. Sams.
   Second Edition. ISBN: 0672313413.
   
   [AUSCERT 1996] Australian Computer Emergency Response Team (AUSCERT)
   and O'Reilly. May 23, 1996 (rev 3C). A Lab Engineers Check List for
   Writing Secure Unix Code.
   [136]ftp://ftp.auscert.org.au/pub/auscert/papers/secure_programming_ch
   ecklist
   
   [Bach 1986] Bach, Maurice J. 1986. The Design of the Unix Operating
   System. Englewood Cliffs, NJ: Prentice-Hall, Inc. ISBN 0-13-201799-7
   025.
   
   [Bellovin 1989] Bellovin, Steven M. April 1989. "Security Problems in
   the TCP/IP Protocol Suite" Computer Communications Review 2:19, pp.
   32-48. [137]http://www.research.att.com/~smb/papers/ipext.pdf
   
   [Bellovin 1994] Bellovin, Steven M. December 1994. Shifting the Odds
   -- Writing (More) Secure Software. Murray Hill, NJ: AT&T Research.
   [138]http://www.research.att.com/~smb/talks
   
   [Bishop 1996] Bishop, Matt. May 1996. ``UNIX Security: Security in
   Programming''. SANS '96. Washington DC (May 1996).
   [139]http://olympus.cs.ucdavis.edu/~bishop/secprog.html
   
   [Bishop 1997] Bishop, Matt. October 1997. ``Writing Safe Privileged
   Programs''. Network Security 1997 New Orleans, LA.
   [140]http://olympus.cs.ucdavis.edu/~bishop/secprog.html
   
   [CC 1999] The Common Criteria for Information Technology Security
   Evaluation (CC). August 1999. Version 2.1. Technically identical to
   International Standard ISO/IEC 15408:1999.
   [141]http://csrc.nist.gov/cc/ccv20/ccv2list.htm
   
   [CERT 1998] Computer Emergency Response Team (CERT) Coordination
   Center (CERT/CC). February 13, 1998. Sanitizing User-Supplied Data in
   CGI Scripts. CERT Advisory CA-97.25.CGI_metachar.
   [142]http://www.cert.org/advisories/CA-97.25.CGI_metachar.html.
   
   [CMU 1998] Carnegie Mellon University (CMU). February 13, 1998 Version
   1.4. ``How To Remove Meta-characters From User-Supplied Data In CGI
   Scripts''. [143]ftp://ftp.cert.org/pub/tech_tips/cgi_metacharacters.
   
   [Cowan 1999] Cowan, Crispin, Perry Wagle, Calton Pu, Steve Beattie,
   and Jonathan Walpole. ``Buffer Overflows: Attacks and Defenses for the
   Vulnerability of the Decade''. Proceedings of DARPA Information
   Survivability Conference and Expo (DISCEX),
   [144]http://schafercorp-ballston.com/discex To appear at SANS 2000,
   [145]http://www.sans.org/newlook/events/sans2000.htm. For a copy, see
   [146]http://immunix.org/documentation.html.
   
   [Fenzi 1999] Fenzi, Kevin, and Dave Wrenski. April 25, 1999. Linux
   Security HOWTO. Version 1.0.2.
   [147]http://www.linuxdoc.org/HOWTO/Security-HOWTO.html
   
   [FHS 1997] Filesystem Hierarchy Standard (FHS 2.0). October 26, 1997.
   Filesystem Hierarchy Standard Group, edited by Daniel Quinlan. Version
   2.0. [148]http://www.pathname.com/fhs.
   
   [FOLDOC] Free On-Line Dictionary of Computing.
   [149]http://foldoc.doc.ic.ac.uk/foldoc/index.html.
   
   [FreeBSD 1999] FreeBSD, Inc. 1999. ``Secure Programming Guidelines''.
   FreeBSD Security Information.
   [150]http://www.freebsd.org/security/security.html
   
   [FSF 1998] Free Software Foundation. December 17, 1999. Overview of
   the GNU Project. [151]http://www.gnu.ai.mit.edu/gnu/gnu-history.html
   
   [Galvin 1998a] Galvin, Peter. April 1998. ``Designing Secure
   Software''. Sunworld.
   [152]http://www.sunworld.com/swol-04-1998/swol-04-security.html.
   
   [Galvin 1998b] Galvin, Peter. August 1998. ``The Unix Secure
   Programming FAQ''. Sunworld.
   [153]http://www.sunworld.com/sunworldonline/swol-08-1998/swol-08-secur
   ity.html
   
   [Garfinkel 1996] Garfinkel, Simson and Gene Spafford. April 1996.
   Practical UNIX & Internet Security, 2nd Edition. ISBN 1-56592-148-8.
   Sebastopol, CA: O'Reilly & Associates, Inc.
   [154]http://www.oreilly.com/catalog/puis
   
   [Garfinkle 1997] Garfinkle, Simson. August 8, 1997. 21 Rules for
   Writing Secure CGI Programs.
   [155]http://webreview.com/wr/pub/97/08/08/bookshelf
   
   [Graham 1999] Graham, Jeff. May 4, 1999. Security-Audit's Frequently
   Asked Questions (FAQ). [156]http://lsap.org/faq.txt
   
   [Gong 1999] Gong, Li. June 1999. Inside Java 2 Platform Security.
   Reading, MA: Addison Wesley Longman, Inc. ISBN 0-201-31000-7.
   
   [Gundavaram Unknown] Gundavaram, Shishir, and Tom Christiansen. Date
   Unknown. Perl CGI Programming FAQ.
   [157]http://language.perl.com/CPAN/doc/FAQs/cgi/perl-cgi-faq.html
   
   [Hall "Beej" 1999] Hall, Brian "Beej". Beej's Guide to Network
   Programming Using Internet Sockets. 13-Jan-1999. Version 1.5.5.
   [158]http://www.ecst.csuchico.edu/~beej/guide/net
   
   [Kernighan 1988] Kernighan, Brian W., and Dennis M. Ritchie. 1988. The
   C Programming Language. Second Edition. Englewood Cliffs, NJ:
   Prentice-Hall. ISBN 0-13-110362-8.
   
   [Kim 1996] Kim, Eugene Eric. 1996. CGI Developer's Guide. SAMS.net
   Publishing. ISBN: 1-57521-087-8 [159]http://www.eekim.com/pubs/cgibook
   
   Kuchling [2000]. Kuchling, A.M. 2000. Restricted Execution HOWTO.
   [160]http://www.python.org/doc/howto/rexec/rexec.html
   
   [McClure 1999] McClure, Stuart, Joel Scambray, and George Kurtz. 1999.
   Hacking Exposed: Network Security Secrets and Solutions. Berkeley, CA:
   Osbourne/McGraw-Hill. ISBN 0-07-212127-0.
   
   [McKusick 1999] McKusick, Marshall Kirk. January 1999. ``Twenty Years
   of Berkeley Unix: From AT&T-Owned to Freely Redistributable.'' Open
   Sources: Voices from the Open Source Revolution.
   [161]http://www.oreilly.com/catalog/opensources/book/kirkmck.html.
   
   [McGraw 1999] McGraw, Gary, and Edward W. Felten. January 25, 1999.
   Securing Java: Getting Down to Business with Mobile Code, 2nd Edition
   John Wiley & Sons. ISBN 047131952X. [162]http://www.securingjava.com.
   
   [McGraw 2000] McGraw, Gary and John Viega. March 1, 2000. Make Your
   Software Behave: Learning the Basics of Buffer Overflows.
   [163]http://www-4.ibm.com/software/developer/library/overflows/index.h
   tml.
   
   [Miller 1999] Miller, Todd C. and Theo de Raadt. ``strlcpy and strlcat
   -- Consistent, Safe, String Copy and Concatenation'' Proceedings of
   Usenix '99. [164]http://www.usenix.org/events/usenix99/millert.html
   and
   [165]http://www.usenix.org/events/usenix99/full_papers/millert/PACKING
   _LIST
   
   [Mudge 1995] Mudge. October 20, 1995. How to write Buffer Overflows.
   l0pht advisories. [166]http://www.l0pht.com/advisories/bufero.html.
   
   [NCSA] NCSA Secure Programming Guidelines.
   [167]http://www.ncsa.uiuc.edu/General/Grid/ACES/security/programming.
   
   [Open Group 1997] The Open Group. 1997. Single UNIX Specification,
   Version 2 (UNIX 98).
   [168]http://www.opengroup.org/online-pubs?DOC=007908799.
   
   [OSI 1999]. Open Source Initiative. 1999. The Open Source Definition.
   [169]http://www.opensource.org/osd.html.
   
   [Pfleeger 1997] Pfleeger, Charles P. 1997. Security in Computing.
   Upper Saddle River, NJ: Prentice-Hall PTR. ISBN 0-13-337486-6.
   
   [Phillips 1995] Phillips, Paul. September 3, 1995. Safe CGI
   Programming.
   [170]http://www.go2net.com/people/paulp/cgi-security/safe-cgi.txt
   
   [Raymond 1997] Raymond, Eric. 1997. The Cathedral and the Bazaar.
   [171]http://www.tuxedo.org/~esr/writings/cathedral-bazaar
   
   [Raymond 1998] Raymond, Eric. April 1998. Homesteading the Noosphere.
   [172]http://www.tuxedo.org/~esr/writings/homesteading/homesteading.htm
   l
   
   [Ranum 1998] Ranum, Marcus J. 1998. Security-critical coding for
   programmers - a C and UNIX-centric full-day tutorial.
   [173]http://www.clark.net/pub/mjr/pubs/pdf/.
   
   [RFC 822] August 13, 1982 Standard for the Format of ARPA Internet
   Text Messages. IETF RFC 822. [174]http://www.ietf.org/rfc/rfc0822.txt.
   
   [rfp 1999]. rain.forest.puppy. ``Perl CGI problems''. Phrack Magazine.
   Issue 55, Article 07.
   [175]http://www.phrack.com/search.phtml?view&article=p55-7 or
   [176]http://www.insecure.org/news/P55-07.txt.
   
   [St. Laurent 2000] St. Laurent, Simon. February 2000. XTech 2000
   Conference Reports. ``When XML Gets Ugly''.
   [177]http://www.xml.com/pub/2000/02/xtech/megginson.html.
   
   [Saltzer 1974] Saltzer, J. July 1974. ``Protection and the Control of
   Information Sharing in MULTICS''. Communications of the ACM. v17 n7.
   pp. 388-402.
   
   [Saltzer 1975] Saltzer, J., and M. Schroeder. September 1975. ``The
   Protection of Information in Computing Systems''. Proceedings of the
   IEEE. v63 n9. pp. 1278-1308.
   [178]http://www.mediacity.com/~norm/CapTheory/ProtInf. Summarized in
   [Pfleeger 1997, 286].
   
   [Schneier 1996] Schneier, Bruce. 1996. Applied Cryptography, Second
   Edition: Protocols, Algorithms, and Source Code in C. New York: John
   Wiley and Sons. ISBN 0-471-12845-7.
   
   [Schneier 1998] Schneier, Bruce and Mudge. November 1998.
   Cryptanalysis of Microsoft's Point-to-Point Tunneling Protocol (PPTP)
   Proceedings of the 5th ACM Conference on Communications and Computer
   Security, ACM Press. [179]http://www.counterpane.com/pptp.html.
   
   [Schneier 1999] Schneier, Bruce. September 15, 1999. ``Open Source and
   Security''. Crypto-Gram. Counterpane Internet Security, Inc.
   [180]http://www.counterpane.com/crypto-gram-9909.html
   
   [Seifried 1999] Seifried, Kurt. October 9, 1999. Linux Administrator's
   Security Guide. [181]http://www.securityportal.com/lasg.
   
   [Shankland 2000] Shankland, Stephen. ``Linux poses increasing threat
   to Windows 2000''. CNET.
   [182]http://news.cnet.com/news/0-1003-200-1549312.html
   
   [Shostack 1999] Shostack, Adam. June 1, 1999. Security Code Review
   Guidelines. [183]http://www.homeport.org/~adam/review.html.
   
   [Sitaker 1999] Sitaker, Kragen. Feb 26, 1999. How to Find Security
   Holes [184]http://www.pobox.com/~kragen/security-holes.html and
   [185]http://www.dnaco.net/~kragen/security-holes.html
   
   [SSE-CMM 1999] SSE-CMM Project. April 1999. System Security
   Engineering Capability Maturity Model (SSE CMM) Model Description
   Document. Version 2.0. [186]http://www.sse-cmm.org
   
   [Stein 1999]. Stein, Lincoln D. September 13, 1999. The World Wide Web
   Security FAQ. Version 2.0.1
   [187]http://www.w3.org/Security/Faq/www-security-faq.html
   
   [Thompson 1974] Thompson, K. and D.M. Richie. July 1974. ``The UNIX
   Time-Sharing System''. Communications of the ACM Vol. 17, No. 7. pp.
   365-375.
   
   [Torvalds 1999] Torvalds, Linus. February 1999. ``The Story of the
   Linux Kernel''. Open Sources: Voices from the Open Source Revolution.
   Edited by Chris Dibona, Mark Stone, and Sam Ockman. O'Reilly and
   Associates. ISBN 1565925823.
   [188]http://www.oreilly.com/catalog/opensources/book/linus.html
   
   [Unknown] SETUID(7) [189]http://www.homeport.org/~adam/setuid.7.html.
   
   [Van Biesbrouck 1996] Van Biesbrouck, Michael. April 19, 1996.
   [190]http://www.csclub.uwaterloo.ca/u/mlvanbie/cgisec.
   
   [Webber 1999] Webber Technical Services. February 26, 1999. Writing
   Secure Web Applications.
   [191]http://www.webbertech.com/tips/web-security.html.
   
   [Wood 1985] Wood, Patrick H. and Stephen G. Kochan. 1985. Unix System
   Security. Indianapolis, Indiana: Hayden Books. ISBN 0-8104-6267-2.
   
   [Wreski 1998] Wreski, Dave. August 22, 1998. Linux Security
   Administrator's Guide. Version 0.98.
   [192]http://www.nic.com/~dave/SecurityAdminGuide/index.html
   
   [Yoder 1998] Yoder, Joseph and Jeffrey Barcalow. 1998. Architectural
   Patterns for Enabling Application Security. PLoP '97
   [193]http://st-www.cs.uiuc.edu/~hanmer/PLoP-97/Proceedings/yoder.pdf
     _________________________________________________________________
   
Appendix A. History

   Here are a few key events in the development of this document,
   starting from most recent events:
   
   2000-05-24 David A. Wheeler
          Switched to GNU's GFDL license, added more content.
          
   2000-04-21 David A. Wheeler
          Version 2.00 released, dated 21 April 2000, which switching the
          document's internal format from the Linuxdoc DTD to the DocBook
          DTD. Thanks to Jorge Godoy for helping me perform the
          transition.
          
   2000-04-04 David A. Wheeler
          Version 1.60 released; changed so that it now covers both Linux
          and Unix. Since most of the guidelines covered both, and
          many/most app developers want their apps to run on both, it
          made sense to cover both.
          
   2000-02-09 David A. Wheeler
          Noted that the document is now part of the Linux Documentation
          Project (LDP).
          
   1999-11-29 David A. Wheeler
          Initial version (1.0) completed and released to the public.
          
   Note that a more detailed description of changes is available on-line
   in the ``ChangeLog'' file.
     _________________________________________________________________
   
Appendix B. Acknowledgements

     
   
   As iron sharpens iron, so one man sharpens another.
     Proverbs 27:17 (NIV)
   
   My thanks to the following people who kept me honest by sending me
   emails noting errors, suggesting areas to cover, asking questions, and
   so on. Where email addresses are included, they've been shrouded by
   prepending my ``thanks.'' so bulk emailers won't easily get these
   addresses; inclusion of people in this list is not an authorization to
   send unsolicited bulk email to them.
   
     * Neil Brown (thanks.neilb@cse.unsw.edu.au)
     * Martin Douda (thanks.mad@students.zcu.cz)
     * Jorge Godoy
     * Scott Ingram (thanks.scott@silver.jhuapl.edu)
     * Doug Kilpatrick
     * John Levon (thanks.moz@compsoc.man.ac.uk)
     * Ryan McCabe (thanks.odin@numb.org)
     * Paul Millar (thanks.paulm@astro.gla.ac.uk)
     * Chuck Phillips (thanks.cdp@peakpeak.com)
     * Martin Pool (thanks.mbp@humbug.org.au)
     * Eric S. Raymond (thanks.esr@snark.thyrsus.com)
     * Marc Welz
     * Eric Werme (thanks.werme@alpha.zk3.dec.com)
       
   If you want to be on this list, please send me a constructive
   suggestion at [194]dwheeler@dwheeler.com. If you send me a
   constructive suggestion, but do not want credit, please let me know
   that when you send your suggestion, comment, or criticism; normally I
   expect that people want credit, and I want to give them that credit.
   My current process is to add contributor names to this list in the
   document, with more detailed explanation of their comment in the
   ChangeLog for this document (available on-line). Note that although
   these people have sent in ideas, the actual text is my own, so don't
   blame them for any errors that may remain. Instead, please send me
   another constructive suggestion.
     _________________________________________________________________
   
Appendix C. About the Documentation License

     
   
   A copy of the text of the edict was to be issued as law in every
   province and made known to the people of every nationality so they
   would be ready for that day.
     Esther 3:14 (NIV)
   
   This document is Copyright (C) 1999-2000 David A. Wheeler. Permission
   is granted to copy, distribute and/or modify this document under the
   terms of the GNU Free Documentation License (FDL), Version 1.1 or any
   later version published by the Free Software Foundation; with the
   invariant sections being ``About the Author'', with no Front-Cover
   Texts, and no Back-Cover texts. A copy of the license is included
   below.
   
   These terms do permit mirroring by other web sites, but be sure to do
   the following:
   
     * make sure your mirrors automatically get upgrades from the master
       site,
     * clearly show the location of the master site
       ([195]http://www.dwheeler.com/secure-programs), with a hypertext
       link to the master site, and
     * give me (David A. Wheeler) credit as the author.
       
   The first two points primarily protect me from repeatedly hearing
   about obsolete bugs. I do not want to hear about bugs I fixed a year
   ago, just because you are not properly mirroring the document. By
   linking to the master site, users can check and see if your mirror is
   up-to-date. I'm sensitive to the problems of sites which have very
   strong security requirements and therefore cannot risk normal
   connections to the Internet; if that describes your situation, at
   least try to meet the other points and try to occasionally sneakernet
   updates into your environment.
   
   By this license, you may modify the document, but you can't claim that
   what you didn't write is yours (i.e., plagerism) nor can you pretend
   that a modified version is identical to the original work. Modifying
   the work does not transfer copyright of the entire work to you; this
   is not a ``public domain'' work in terms of copyright law. See the
   license for details. If you have questions about what the license
   allows, please contact me. In most cases, it's better if you send your
   changes to the master integrator (currently David A. Wheeler), so that
   your changes will be integrated with everyone else's changes into the
   master copy.
     _________________________________________________________________
   
Appendix D. GNU Free Documentation License

   Version 1.1, March 2000
   
   Copyright  2000
   
         Free Software Foundation, Inc.
         59 Temple Place, Suite 330,
         Boston,
         MA
         02111-1307
         USA
   
   Everyone is permitted to copy and distribute verbatim copies of this
   license document, but changing it is not allowed.
   
   0. PREAMBLE
          The purpose of this License is to make a manual, textbook, or
          other written document "free" in the sense of freedom: to
          assure everyone the effective freedom to copy and redistribute
          it, with or without modifying it, either commercially or
          noncommercially. Secondarily, this License preserves for the
          author and publisher a way to get credit for their work, while
          not being considered responsible for modifications made by
          others.
          
          This License is a kind of "copyleft", which means that
          derivative works of the document must themselves be free in the
          same sense. It complements the GNU General Public License,
          which is a copyleft license designed for free software.
          
          We have designed this License in order to use it for manuals
          for free software, because free software needs free
          documentation: a free program should come with manuals
          providing the same freedoms that the software does. But this
          License is not limited to software manuals; it can be used for
          any textual work, regardless of subject matter or whether it is
          published as a printed book. We recommend this License
          principally for works whose purpose is instruction or
          reference.
          
   1. APPLICABILITY AND DEFINITIONS
          This License applies to any manual or other work that contains
          a notice placed by the copyright holder saying it can be
          distributed under the terms of this License. The
          [196]"Document" , below, refers to any such manual or work. Any
          member of the public is a licensee, and is addressed as "you".
          
          A [197]"Modified Version" of the Document means any work
          containing the Document or a portion of it, either copied
          verbatim, or with modifications and/or translated into another
          language.
          
          A [198]"Secondary Section" is a named appendix or a
          front-matter section of the [199]Document that deals
          exclusively with the relationship of the publishers or authors
          of the [200]Document to the [201]Document's overall subject (or
          to related matters) and contains nothing that could fall
          directly within that overall subject. (For example, if the
          [202]Document is in part a textbook of mathematics, a
          [203]Secondary Section may not explain any mathematics.) The
          relationship could be a matter of historical connection with
          the subject or with related matters, or of legal, commercial,
          philosophical, ethical or political position regarding them.
          
          The [204]"Invariant Sections" are certain [205]Secondary
          Sections whose titles are designated, as being those of
          [206]Invariant Sections, in the notice that says that the
          [207]Document is released under this License.
          
          The [208]"Cover Texts" are certain short passages of text that
          are listed, as [209]Front-Cover Texts or [210]Back-Cover Texts,
          in the notice that says that the [211]Document is released
          under this License.
          
          A [212]"Transparent" copy of the [213]Document means a
          machine-readable copy, represented in a format whose
          specification is available to the general public, whose
          contents can be viewed and edited directly and
          straightforwardly with generic text editors or (for images
          composed of pixels) generic paint programs or (for drawings)
          some widely available drawing editor, and that is suitable for
          input to text formatters or for automatic translation to a
          variety of formats suitable for input to text formatters. A
          copy made in an otherwise [214]Transparent file format whose
          markup has been designed to thwart or discourage subsequent
          modification by readers is not [215]Transparent. A copy that is
          not [216]"Transparent" is called "Opaque".
          
          Examples of suitable formats for [217]Transparent copies
          include plain ASCII without markup, Texinfo input format, LaTeX
          input format, SGML or XML using a publicly available DTD, and
          standard-conforming simple HTML designed for human
          modification. Opaque formats include PostScript, PDF,
          proprietary formats that can be read and edited only by
          proprietary word processors, SGML or XML for which the DTD
          and/or processing tools are not generally available, and the
          machine-generated HTML produced by some word processors for
          output purposes only.
          
          The [218]"Title Page" means, for a printed book, the title page
          itself, plus such following pages as are needed to hold,
          legibly, the material this License requires to appear in the
          title page. For works in formats which do not have any title
          page as such, [219]"Title Page" means the text near the most
          prominent appearance of the work's title, preceding the
          beginning of the body of the text.
          
   2. VERBATIM COPYING
          You may copy and distribute the [220]Document in any medium,
          either commercially or noncommercially, provided that this
          License, the copyright notices, and the license notice saying
          this License applies to the [221]Document are reproduced in all
          copies, and that you add no other conditions whatsoever to
          those of this License. You may not use technical measures to
          obstruct or control the reading or further copying of the
          copies you make or distribute. However, you may accept
          compensation in exchange for copies. If you distribute a large
          enough number of copies you must also follow the conditions in
          [222]section 3.
          
          You may also lend copies, under the same conditions stated
          above, and you may publicly display copies.
          
   3. COPYING IN QUANTITY
          If you publish printed copies of the [223]Document numbering
          more than 100, and the [224]Document's license notice requires
          [225]Cover Texts, you must enclose the copies in covers that
          carry, clearly and legibly, all these [226]Cover Texts:
          Front-Cover Texts on the front cover, and Back-Cover Texts on
          the back cover. Both covers must also clearly and legibly
          identify you as the publisher of these copies. The front cover
          must present the full title with all words of the title equally
          prominent and visible. You may add other material on the covers
          in addition. Copying with changes limited to the covers, as
          long as they preserve the title of the [227]Document and
          satisfy these conditions, can be treated as verbatim copying in
          other respects.
          
          If the required texts for either cover are too voluminous to
          fit legibly, you should put the first ones listed (as many as
          fit reasonably) on the actual cover, and continue the rest onto
          adjacent pages.
          
          If you publish or distribute [228]Opaque copies of the
          [229]Document numbering more than 100, you must either include
          a machine-readable [230]Transparent copy along with each
          [231]Opaque copy, or state in or with each [232]Opaque copy a
          publicly-accessible computer-network location containing a
          complete [233]Transparent copy of the [234]Document, free of
          added material, which the general network-using public has
          access to download anonymously at no charge using
          public-standard network protocols. If you use the latter
          option, you must take reasonably prudent steps, when you begin
          distribution of [235]Opaque copies in quantity, to ensure that
          this [236]Transparent copy will remain thus accessible at the
          stated location until at least one year after the last time you
          distribute an [237]Opaque copy (directly or through your agents
          or retailers) of that edition to the public.
          
          It is requested, but not required, that you contact the authors
          of the [238]Document well before redistributing any large
          number of copies, to give them a chance to provide you with an
          updated version of the [239]Document.
          
   4. MODIFICATIONS
          You may copy and distribute a [240]Modified Version of the
          [241]Document under the conditions of sections [242]2 and
          [243]3 above, provided that you release the [244]Modified
          Version under precisely this License, with the [245]Modified
          Version filling the role of the [246]Document, thus licensing
          distribution and modification of the [247]Modified Version to
          whoever possesses a copy of it. In addition, you must do these
          things in the [248]Modified Version:
          
         A. Use in the [249]Title Page (and on the covers, if any) a
            title distinct from that of the [250]Document, and from those
            of previous versions (which should, if there were any, be
            listed in the History section of the [251]Document). You may
            use the same title as a previous version if the original
            publisher of that version gives permission.
         B. List on the [252]Title Page, as authors, one or more persons
            or entities responsible for authorship of the modifications
            in the [253]Modified Version, together with at least five of
            the principal authors of the [254]Document (all of its
            principal authors, if it has less than five).
         C. State on the [255]Title Page the name of the publisher of the
            [256]Modified Version, as the publisher.
         D. Preserve all the copyright notices of the [257]Document.
         E. Add an appropriate copyright notice for your modifications
            adjacent to the other copyright notices.
         F. Include, immediately after the copyright notices, a license
            notice giving the public permission to use the [258]Modified
            Version under the terms of this License, in the form shown in
            the Addendum below.
         G. Preserve in that license notice the full lists of
            [259]Invariant Sections and required [260]Cover Texts given
            in the [261]Document's license notice.
         H. Include an unaltered copy of this License.
         I. Preserve the section entitled "History", and its title, and
            add to it an item stating at least the title, year, new
            authors, and publisher of the [262]Modified Version as given
            on the [263]Title Page. If there is no section entitled
            "History" in the [264]Document, create one stating the title,
            year, authors, and publisher of the [265]Document as given on
            its [266]Title Page, then add an item describing the
            [267]Modified Version as stated in the previous sentence.
         J. Preserve the network location, if any, given in the
            [268]Document for public access to a [269]Transparent copy of
            the [270]Document, and likewise the network locations given
            in the [271]Document for previous versions it was based on.
            These may be placed in the "History" section. You may omit a
            network location for a work that was published at least four
            years before the [272]Document itself, or if the original
            publisher of the version it refers to gives permission.
         K. In any section entitled "Acknowledgements" or "Dedications",
            preserve the section's title, and preserve in the section all
            the substance and tone of each of the contributor
            acknowledgements and/or dedications given therein.
         L. Preserve all the [273]Invariant Sections of the
            [274]Document, unaltered in their text and in their titles.
            Section numbers or the equivalent are not considered part of
            the section titles.
         M. Delete any section entitled "Endorsements". Such a section
            may not be included in the [275]Modified Version.
         N. Do not retitle any existing section as "Endorsements" or to
            conflict in title with any [276]Invariant Section.
            
          If the [277]Modified Version includes new front-matter sections
          or appendices that qualify as [278]Secondary Sections and
          contain no material copied from the Document, you may at your
          option designate some or all of these sections as invariant. To
          do this, add their titles to the list of [279]Invariant
          Sections in the [280]Modified Version's license notice. These
          titles must be distinct from any other section titles.
          
          You may add a section entitled "Endorsements", provided it
          contains nothing but endorsements of your [281]Modified Version
          by various parties--for example, statements of peer review or
          that the text has been approved by an organization as the
          authoritative definition of a standard.
          
          You may add a passage of up to five words as a [282]Front-Cover
          Text, and a passage of up to 25 words as a [283]Back-Cover
          Text, to the end of the list of [284]Cover Texts in the
          [285]Modified Version. Only one passage of [286]Front-Cover
          Text and one of [287]Back-Cover Text may be added by (or
          through arrangements made by) any one entity. If the
          [288]Document already includes a cover text for the same cover,
          previously added by you or by arrangement made by the same
          entity you are acting on behalf of, you may not add another;
          but you may replace the old one, on explicit permission from
          the previous publisher that added the old one.
          
          The author(s) and publisher(s) of the [289]Document do not by
          this License give permission to use their names for publicity
          for or to assert or imply endorsement of any [290]Modified
          Version .
          
   5. COMBINING DOCUMENTS
          You may combine the [291]Document with other documents released
          under this License, under the terms defined in [292]section 4
          above for modified versions, provided that you include in the
          combination all of the [293]Invariant Sections of all of the
          original documents, unmodified, and list them all as
          [294]Invariant Sections of your combined work in its license
          notice.
          
          The combined work need only contain one copy of this License,
          and multiple identical [295]Invariant Sections may be replaced
          with a single copy. If there are multiple [296]Invariant
          Sections with the same name but different contents, make the
          title of each such section unique by adding at the end of it,
          in parentheses, the name of the original author or publisher of
          that section if known, or else a unique number. Make the same
          adjustment to the section titles in the list of [297]Invariant
          Sections in the license notice of the combined work.
          
          In the combination, you must combine any sections entitled
          "History" in the various original documents, forming one
          section entitled "History"; likewise combine any sections
          entitled "Acknowledgements", and any sections entitled
          "Dedications". You must delete all sections entitled
          "Endorsements."
          
   6. COLLECTIONS OF DOCUMENTS
          You may make a collection consisting of the [298]Document and
          other documents released under this License, and replace the
          individual copies of this License in the various documents with
          a single copy that is included in the collection, provided that
          you follow the rules of this License for verbatim copying of
          each of the documents in all other respects.
          
          You may extract a single document from such a collection, and
          distribute it individually under this License, provided you
          insert a copy of this License into the extracted document, and
          follow this License in all other respects regarding verbatim
          copying of that document.
          
   7. AGGREGATION WITH INDEPENDENT WORKS
          A compilation of the [299]Document or its derivatives with
          other separate and independent documents or works, in or on a
          volume of a storage or distribution medium, does not as a whole
          count as a [300]Modified Version of the [301]Document, provided
          no compilation copyright is claimed for the compilation. Such a
          compilation is called an "aggregate", and this License does not
          apply to the other self-contained works thus compiled with the
          [302]Document , on account of their being thus compiled, if
          they are not themselves derivative works of the [303]Document.
          If the [304]Cover Text requirement of [305]section 3 is
          applicable to these copies of the [306]Document, then if the
          [307]Document is less than one quarter of the entire aggregate,
          the [308]Document's [309]Cover Texts may be placed on covers
          that surround only the [310]Document within the aggregate.
          Otherwise they must appear on covers around the whole
          aggregate.
          
   8. TRANSLATION
          Translation is considered a kind of modification, so you may
          distribute translations of the [311]Document under the terms of
          [312]section 4. Replacing [313]Invariant Sections with
          translations requires special permission from their copyright
          holders, but you may include translations of some or all
          [314]Invariant Sections in addition to the original versions of
          these [315]Invariant Sections. You may include a translation of
          this License provided that you also include the original
          English version of this License. In case of a disagreement
          between the translation and the original English version of
          this License, the original English version will prevail.
          
   9. TERMINATION
          You may not copy, modify, sublicense, or distribute the
          [316]Document except as expressly provided for under this
          License. Any other attempt to copy, modify, sublicense or
          distribute the [317]Document is void, and will automatically
          terminate your rights under this License. However, parties who
          have received copies, or rights, from you under this License
          will not have their licenses terminated so long as such parties
          remain in full compliance.
          
   10. FUTURE REVISIONS OF THIS LICENSE
          The [318]Free Software Foundation may publish new, revised
          versions of the GNU Free Documentation License from time to
          time. Such new versions will be similar in spirit to the
          present version, but may differ in detail to address new
          problems or concerns. See [319]http://www.gnu.org/copyleft/.
          
          Each version of the License is given a distinguishing version
          number. If the [320]Document specifies that a particular
          numbered version of this License "or any later version" applies
          to it, you have the option of following the terms and
          conditions either of that specified version or of any later
          version that has been published (not as a draft) by the Free
          Software Foundation. If the [321]Document does not specify a
          version number of this License, you may choose any version ever
          published (not as a draft) by the Free Software Foundation.
          
   Addendum
          To use this License in a document you have written, include a
          copy of the License in the document and put the following
          copyright and license notices just after the title page:
          
          Copyright  YEAR YOUR NAME.
          
          Permission is granted to copy, distribute and/or modify this
          document under the terms of the GNU Free Documentation License,
          Version 1.1 or any later version published by the Free Software
          Foundation; with the [322]Invariant Sections being LIST THEIR
          TITLES, with the [323]Front-Cover Texts being LIST, and with
          the [324]Back-Cover Texts being LIST. A copy of the license is
          included in the section entitled "GNU Free Documentation
          License".
          
          If you have no [325]Invariant Sections, write "with no
          Invariant Sections" instead of saying which ones are invariant.
          If you have no [326]Front-Cover Texts, write "no Front-Cover
          Texts" instead of "Front-Cover Texts being LIST"; likewise for
          [327]Back-Cover Texts.
          
          If your document contains nontrivial examples of program code,
          we recommend releasing these examples in parallel under your
          choice of free software license, such as the [328]GNU General
          Public License, to permit their use in free software.
     _________________________________________________________________
   
Appendix E. Endorsements

   This version of the document is endorsed by the original author, David
   A. Wheeler, as a document that should improve the security of
   programs. when applied correctly. Modifications (including
   translations) must remove this appendix per the license agreement
   included above.
     _________________________________________________________________
   
Appendix F. About the Author

   David A. Wheeler has been involved in software development since the
   mid-1970s, and been involved with Unix and computer security since the
   early 1980s. He hopes that, by making this document available,
   developers will make their software more secure. You can reach him by
   email at dwheeler@dwheeler.com (no spam please), and you can see his
   web site at http://www.dwheeler.com.

References

   1. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN37
   2. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN54
   3. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN59
   4. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN87
   5. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN127
   6. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN145
   7. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN150
   8. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN162
   9. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN206
  10. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN211
  11. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN221
  12. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN270
  13. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN316
  14. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN337
  15. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN346
  16. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN354
  17. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN359
  18. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN378
  19. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN381
  20. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN384
  21. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN396
  22. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN399
  23. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN422
  24. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN426
  25. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN430
  26. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN436
  27. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN439
  28. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN499
  29. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN502
  30. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN512
  31. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN515
  32. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN568
  33. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN576
  34. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN579
  35. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN584
  36. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN587
  37. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN643
  38. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN646
  39. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN653
  40. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN658
  41. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN693
  42. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN705
  43. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN708
  44. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN711
  45. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN716
  46. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN741
  47. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN744
  48. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN749
  49. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN757
  50. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN760
  51. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN777
  52. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN791
  53. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN801
  54. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN806
  55. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN811
  56. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN814
  57. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN868
  58. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN873
  59. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN880
  60. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN885
  61. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN892
  62. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN896
  63. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN906
  64. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#AEN924
  65. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#HISTORY
  66. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#ACKNOWLEDGEMENTS
  67. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#ABOUT-LICENSE
  68. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL
  69. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#ENDORSEMENTS
  70. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#ABOUT-AUTHOR
  71. http://www.unixtools.com/security.html
  72. http://www.dwheeler.com/secure-programs
  73. http://www.linuxdoc.org/
  74. http://www.datametrics.com/tech/unix/uxhistry/brf-hist.htm
  75. ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/share/misc/bsd-family-tree
  76. http://www.unix-vs-nt.org/
  77. http://www.opensource.org/
  78. http://www.fsf.org/
  79. http://www.linuxsecurity.com/feature_stories/feature_story-6.html
  80. http://olympus.cs.ucdavis.edu/~bishop/secprog.html
  81. ftp://ftp.auscert.org.au/pub/auscert/papers/secure_programming_checklist
  82. http://www.oreilly.com/catalog/puis
  83. http://www.sunworld.com/swol-04-1998/swol-04-security.html
  84. http://www.sunworld.com/sunworldonline/swol-08-1998/swol-08-security.html
  85. http://www.pobox.com/~kragen/security-holes.html
  86. http://www.homeport.org/~adam/review.html
  87. http://www.ncsa.uiuc.edu/General/Grid/ACES/security/programming
  88. http://www.whitefang.com/sup/
  89. http://lsap.org/faq.txt
  90. http://www.clark.net/pub/mjr/pubs/pdf/
  91. http://www.homeport.org/~adam/setuid.7.html
  92. http://www.research.att.com/~smb/talks
  93. http://www.freebsd.org/security/security.html
  94. http://www.csclub.uwaterloo.ca/u/mlvanbie/cgisec
  95. http://language.perl.com/CPAN/doc/FAQs/cgi/perl-cgi-faq.html
  96. http://webreview.com/wr/pub/97/08/08/bookshelf
  97. http://www.eekim.com/pubs/cgibook
  98. http://www.go2net.com/people/paulp/cgi-security/safe-cgi.txt
  99. http://www.w3.org/Security/Faq/www-security-faq.html
 100. http://www.webbertech.com/tips/web-security.html
 101. http://www.perl.com/pub/doc/manual/html/pod/perlsec.html
 102. http://www.cs.princeton.edu/sip
 103. file://localhost/export/sunsite/users/gferg/howto/www.securingjava.com
 104. http://java.sun.com/security/seccodeguide.html
 105. http://www.shmoo.com/securecode
 106. http://SecurityFocus.com/forums/bugtraq/faq.html
 107. http://www.cert.org/
 108. http://ciac.llnl.gov/ciac
 109. http://www.cve.mitre.org/
 110. http://csrc.nist.gov/icat
 111. http://pweb.netcom.com/~spoon/lcap/
 112. ftp://linux.kernel.org/pub/linux/libs/security/linux-privs
 113. http://www.pathname.com/fhs
 114. http://www.cl.cam.ac.uk/~mgk25/unicode.html
 115. http://destroy.net/machines/security/
 116. ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/strlcpy.3
 117. http://www.mibsoftware.com/libmib/astring
 118. http://www.bell-labs.com/org/11356/libsafe.html
 119. http://www.openwall.com/linux/
 120. http://lwn.net/980806/a/linus-noexec.html
 121. http://linux.kernel.org/pub/linux/libs/security/linux-privs
 122. http://www.suse.de/~marc
 123. http://www.suid.edu/source/breakchroot.c
 124. http://www.opensource.org/osd.html
 125. http://www.rstcorp.com/its4
 126. http://lclint.cs.virginia.edu/
 127. http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-03/msg02596.html
 128. http://java.sun.com/security/seccodeguide.html
 129. http://www.dwheeler.com/javasec
 130. http://consult.cern.ch/writeup/security/security_3.html
 131. http://marc.mutz.com/Encryption-HOWTO/
 132. http://www.kernel.org/pub/linux/libs/pam/index.html
 133. http://www.whitefang.com/sup
 134. http://www.phrack.com/search.phtml?view&article=p49-14
 135. http://www.2600.net/phrack/p49-14.html
 136. ftp://ftp.auscert.org.au/pub/auscert/papers/secure_programming_checklist
 137. http://www.research.att.com/~smb/papers/ipext.pdf
 138. http://www.research.att.com/~smb/talks
 139. http://olympus.cs.ucdavis.edu/~bishop/secprog.html
 140. http://olympus.cs.ucdavis.edu/~bishop/secprog.html
 141. http://csrc.nist.gov/cc/ccv20/ccv2list.htm
 142. http://www.cert.org/advisories/CA-97.25.CGI_metachar.html
 143. ftp://ftp.cert.org/pub/tech_tips/cgi_metacharacters
 144. http://schafercorp-ballston.com/discex
 145. http://www.sans.org/newlook/events/sans2000.htm
 146. http://immunix.org/documentation.html
 147. http://www.linuxdoc.org/HOWTO/Security-HOWTO.html
 148. http://www.pathname.com/fhs
 149. http://foldoc.doc.ic.ac.uk/foldoc/index.html
 150. http://www.freebsd.org/security/security.html
 151. http://www.gnu.ai.mit.edu/gnu/gnu-history.html
 152. http://www.sunworld.com/swol-04-1998/swol-04-security.html
 153. http://www.sunworld.com/sunworldonline/swol-08-1998/swol-08-security.html
 154. http://www.oreilly.com/catalog/puis
 155. http://webreview.com/wr/pub/97/08/08/bookshelf
 156. http://lsap.org/faq.txt
 157. http://language.perl.com/CPAN/doc/FAQs/cgi/perl-cgi-faq.html
 158. http://www.ecst.csuchico.edu/~beej/guide/net
 159. http://www.eekim.com/pubs/cgibook
 160. http://www.python.org/doc/howto/rexec/rexec.html
 161. http://www.oreilly.com/catalog/opensources/book/kirkmck.html
 162. http://www.securingjava.com/
 163. http://www-4.ibm.com/software/developer/library/overflows/index.html
 164. http://www.usenix.org/events/usenix99/millert.html
 165. http://www.usenix.org/events/usenix99/full_papers/millert/PACKING_LIST
 166. http://www.l0pht.com/advisories/bufero.html
 167. http://www.ncsa.uiuc.edu/General/Grid/ACES/security/programming
 168. http://www.opengroup.org/online-pubs?DOC=007908799
 169. http://www.opensource.org/osd.html
 170. http://www.go2net.com/people/paulp/cgi-security/safe-cgi.txt
 171. http://www.tuxedo.org/~esr/writings/cathedral-bazaar
 172. http://www.tuxedo.org/~esr/writings/homesteading/homesteading.html
 173. http://www.clark.net/pub/mjr/pubs/pdf/
 174. http://www.ietf.org/rfc/rfc0822.txt
 175. http://www.phrack.com/search.phtml?view&article=p55-7
 176. http://www.insecure.org/news/P55-07.txt
 177. http://www.xml.com/pub/2000/02/xtech/megginson.html
 178. http://www.mediacity.com/~norm/CapTheory/ProtInf
 179. http://www.counterpane.com/pptp.html
 180. http://www.counterpane.com/crypto-gram-9909.html
 181. http://www.securityportal.com/lasg
 182. http://news.cnet.com/news/0-1003-200-1549312.html
 183. http://www.homeport.org/~adam/review.html
 184. http://www.pobox.com/~kragen/security-holes.html
 185. http://www.dnaco.net/~kragen/security-holes.html
 186. http://www.sse-cmm.org/
 187. http://www.w3.org/Security/Faq/www-security-faq.html
 188. http://www.oreilly.com/catalog/opensources/book/linus.html
 189. http://www.homeport.org/~adam/setuid.7.html
 190. http://www.csclub.uwaterloo.ca/u/mlvanbie/cgisec
 191. http://www.webbertech.com/tips/web-security.html
 192. http://www.nic.com/~dave/SecurityAdminGuide/index.html
 193. http://st-www.cs.uiuc.edu/~hanmer/PLoP-97/Proceedings/yoder.pdf
 194. mailto:dwheeler@dwheeler.com
 195. http://www.dwheeler.com/secure-programs
 196. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 197. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 198. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-SECONDARY
 199. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 200. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 201. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 202. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 203. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-SECONDARY
 204. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 205. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-SECONDARY
 206. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 207. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 208. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 209. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 210. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 211. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 212. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 213. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 214. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 215. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 216. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 217. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 218. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TITLE-PAGE
 219. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TITLE-PAGE
 220. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 221. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 222. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-SECTION3
 223. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 224. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 225. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 226. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 227. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 228. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 229. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 230. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 231. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 232. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 233. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 234. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 235. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 236. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 237. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 238. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 239. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 240. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 241. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 242. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-SECTION2
 243. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-SECTION3
 244. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 245. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 246. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 247. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 248. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 249. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TITLE-PAGE
 250. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 251. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 252. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TITLE-PAGE
 253. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 254. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 255. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TITLE-PAGE
 256. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 257. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 258. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 259. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 260. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 261. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 262. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 263. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TITLE-PAGE
 264. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 265. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 266. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TITLE-PAGE
 267. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 268. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 269. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-TRANSPARENT
 270. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 271. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 272. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 273. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 274. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 275. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 276. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 277. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 278. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-SECONDARY
 279. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 280. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 281. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 282. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 283. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 284. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 285. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 286. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 287. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 288. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 289. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 290. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 291. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 292. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-SECTION4
 293. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 294. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 295. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 296. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 297. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 298. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 299. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 300. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-MODIFIED
 301. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 302. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 303. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 304. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 305. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-SECTION3
 306. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 307. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 308. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 309. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 310. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 311. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 312. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-SECTION4
 313. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 314. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 315. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 316. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 317. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 318. http://www.gnu.org/fsf/fsf.html
 319. http://www.gnu.org/copyleft
 320. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 321. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-DOCUMENT
 322. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 323. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 324. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 325. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-INVARIANT
 326. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 327. file://localhost/export/sunsite/users/gferg/howto/00_Secure-Programs-HOWTO.html#FDL-COVER-TEXTS
 328. http://www.gnu.org/copyleft/gpl.html
  Setting Up Your New Domain Mini-HOWTO.
  by Christopher Neufeld (neufeld@physics.utoronto.ca)
  (neufeld@thepuffingroup.com).
  version 0.5. 1999/12/23.

  This document outlines the things you will probably have to do when
  you want to set up a network of computers under your own domain. It
  covers configuration of network parameters, network services, and
  security settings.
  ______________________________________________________________________

  Table of Contents



  1. Notices

     1.1 Disclaimer
     1.2 Copyright

  2. Introduction

  3. Planning Your Network Topology

  4. Obtaining Your Connection

     4.1 Choosing Your Provider
     4.2 Preparing For Hardware Installation
     4.3 Testing The Connection
     4.4 Using A Dynamic IP

  5. Registering A Domain Name

  6. Deciding Which Domain Services You Will Host

     6.1 Primary DNS Authority
     6.2 Electronic Mail
     6.3 Web Space Hosting
     6.4 FTP Site Hosting
     6.5 Packet Filtering

  7. Configuring Your Hosted Services

     7.1 Setting up Name Resolution
        7.1.1 DNS On Private Network, ISP Handles Domain
        7.1.2 Non-DNS Resolution On Private Network, ISP Handles Domain
        7.1.3 You Are Primary DNS Authority For Domain
        7.1.4 Fully Exposed Network, Hosted By ISP
     7.2 DNS Configuration If You Are Not Hosting Email
     7.3 Setting up Electronic Mail
        7.3.1 A Solution Using "sendmail"
        7.3.2 Solutions Using Other Mail Transfer Agents
     7.4 Setting up Web Space Hosting
     7.5 Setting up FTP Hosting
     7.6 Setting up Packet Filtering

  8. Securing Your Domain

     8.1 Configuring Your Firewall
     8.2 Configuring SSH1
     8.3 Configuring X
     8.4 Configuring Disk Sharing

  9. Acknowledgements

  10. Glossary of Terms



  ______________________________________________________________________

  1.  Notices

  1.1.  Disclaimer

  This is a very preliminary document. I have glossed over many things
  which could be given in much more detail, and have probably missed
  important sections entirely. I need feedback on this document before I
  can make it widely available. Any suggestions for additions,
  deletions, or areas where I ought to provide more or less detail are
  very welcome.
  1.2.  Copyright

  Copyright (c) by Christopher Neufeld.  This document may be
  distributed only subject to the terms and conditions set forth in the
  LDP License at this location <http://www.linuxdoc.org/COPYRIGHT.html>.



  2.  Introduction

  This is a guide to setting up your own domain of Linux machines, or
  mixed Linux and Windows machines, on an always-up connection with a
  static IP and a named domain. It is not really intended for setups
  which use dynamic IPs, or which are regularly disconnected from their
  provider for long periods of time, though some basic hints for
  operating such a setup are available in section ``Using A Dynamic
  IP''.


  With the increasing availability of permanent connections and static
  IPs, it's becoming easier for people and organizations to set up a
  real domain, with the associated Internet presence. Proper planning at
  the outset can reduce problems later.


  Much of this document describes techniques for implementing
  unobtrusive security on the newly exposed network. This deals with
  protection from external attack, and from casual internal attack. It
  does not claim to provide an extremely secure setup, but is usually
  enough to discourage the less determined attacker.


  This document is primarily directed at small organizations which have
  an existing network of computers, possibly with a shared dialup line,
  which are trying to move to a permanent, relatively high-speed
  connection, either to improve data transfer with the outside world, or
  to create a WWW or FTP site. The document is also directed at new
  organizations which want to skip the early stage and start out with
  higher speed networking and services under their own domain name.


  Throughout this document, I will discuss the configuration of a newly
  registered domain, example.com. Note that the name example.com is
  reserved by the Internet Assigned Numbers Authority for use in
  documentation, and so will never correspond to an actual domain.


  Much of the information in this document is available in other places.
  I have tried to distill the material relevant to the creation of a new
  domain. Where detail on a specific subject is lacking, you may want to
  consult one of the more comprehensive documents.


  This document will also assume a mixed OS environment. Specifically, I
  will assume that some desktop machines are running some version of
  Microsoft Windows, while servers and the private network gateway are
  running Linux.



  3.  Planning Your Network Topology

  While there are arguments which can be made for many different network
  layouts, the requirements of many organizations can be met by putting
  the desktop machines and private servers on a private masqueraded
  subnet, and the publicly accessible machines on valid external IPs.
  The machines on valid external IPs will be referred to in this
  document as ``exposed hosts''. This leads to the following (example)
  topology:



       +--------------+
       |              |               +---------------+
       | ISP-supplied |---------------| FTP server    |
       | router       |        |      +---------------+
       |              |        |
       +--------------+        |      +---------------+
                               |------| WWW server #1 |
                               |      +---------------+
                               |
                               |      +---------------+
                               |------| WWW server #2 |
                               |      +---------------+
                               |
                               ~
                               ~
                               |
                               |      +---------------+
                               |------| Private       |
                                      | Network       |
                                      | Gateway       |
                                      +---------------+
                                             |
                                             |
                                             |
                                             |
            +------------+                   |      +-------------------+
            | Desktop #1 |-------------------|------| Private server #1 |
            +------------+                   |      +-------------------+
                                             |
                   .      -------------------|--------        .
                   .                         |                .
                   .      -------------------|--------        .
                                             |
            +------------+                   |      +-------------------+
            | Desktop #N |-------------------|------| Private server #N |
            +------------+                          +-------------------+



  In this example, the router provided by the ISP (Internet Service
  Provider), FTP server, WWW servers, and the machine labelled ``private
  network gateway'' all have externally visible IP numbers, while the
  desktop and private server machines have IP numbers allocated from RFC
  1918 <http://www.ietf.org/rfc/rfc1918.txt>, reserved for private use.
  The IP numbers you choose for use within the private network
  (everything below the private network gateway machine) should be
  chosen to be unique, not only among the hosts under your control, but
  should also not conflict with numbers assigned on similar private
  subnets at other sites or partner companies with whom you might, at
  some time, want to implement a virtual private network, in order to
  reduce confusion and reconfiguration when the networks are merged in
  that way. As outlined in the RFC, you can choose from any class C
  network from 192.168.0.* to 192.168.255.*, or any class B network from
  172.16.*.* to 172.31.*.*, or the class A network 10.*.*.*. In the rest
  of this document I will assume that your private network (if you've
  chosen to create one) is on the class C network 192.168.1.*, and your
  private network gateway machine is at IP number 10.1.1.9, one of the
  IP numbers provided to you by your provider (note that this is not a
  valid external IP, I use it as an example only). I will also assume
  that there is a machine, betty.example.com, at 10.1.1.10, which will
  handle both www and FTP services.


  Take note of the number of external IP numbers which you need for your
  own machines. You will need one IP number for each machine which lies
  outside the private network gateway, plus one for the gateway itself.
  This count does not include any IP numbers which may be taken by
  routers, broadcast addresses, and so on. You should ask your provider
  for a block of addresses large enough to mount the given number of
  machines. For example, in my office network, of the 8 IP numbers
  allocated from the ISP, three were not usable by my computers, leaving
  enough IP numbers for four machines outside the gateway, plus the
  gateway itself.


  This network topology is not correct for everybody, but it is a
  reasonable starting point for many configurations which don't have
  special needs. The advantages of this configuration include:

  o  Easy expandability. If you suddenly double your number of private
     nodes, you don't have to worry about getting a new IP block from
     your provider and reconfiguring all of the interfaces on your
     machines.

  o  Local network control. Adding a new workstation to your private
     network requires no communication with your provider, unlike
     exposed nodes, which need both forward and reverse DNS (domain name
     service) mappings if they are to perform certain tasks (ssh and
     ftpd may complain if they can't perform reverse and forward DNS on
     incoming connections). A reverse DNS query is an attempt to obtain
     the host name from the IP number.

  o  Centralized security. The private network gateway can enforce
     security over the whole private network, filtering packets and
     logging attacks, rather than having to install such measures on
     each desktop and server on the private network. This can be
     enforced not only on incoming packets, but also on outgoing
     packets, so that a misconfigured desktop machine doesn't
     inadvertently broadcast data to the outside world which ought to
     remain internal.

  o  Easy transplantability. Because the IP numbers within the private
     network are yours for as long as you want them, you can move the
     entire network to a new range of IP numbers without having to make
     any changes to the network configuration on the private network.
     The publicly exposed hosts still have to be reconfigured, of
     course.

  o  Transparent Internet access. The machines on your private network
     can still use FTP, telnet, WWW, and other services with minimal
     obstruction, assuming a Linux masquerading router. The users may
     not even be aware that their machines are not on externally visible
     IP numbers.


  Some of the potential disadvantages of such a configuration are:

  o  Some services will not be available directly to the machines on the
     internal network. NTP synchronization against an outside host,
     certain obscure services which may not have masquerading rules in
     the kernel, and .shosts authentication for logging in to external
     nodes are all difficult or impossible, but simple workarounds are
     almost always available.
  o  More network hardware costs. The private network gateway machine
     needs two network cards, and you need at least two hubs / switches,
     one on the visible network and one on the private network.

  o  Machines outside the private network cannot easily make direct
     connections to machines within the private network. They may have
     to open a session first on the private network gateway machine,
     then log through to the internal host. It is possible to route
     packets transparently through the firewall, but this is not
     recommended for security reasons which will be discussed in a later
     section.


  You should consider these points in planning your network topology,
  and decide if a fully visible network is more appropriate for your
  situation. In the rest of this document I will assume that you have
  configured your network as shown above. If you have chosen to have a
  fully visible network, some details will differ, and I will try to
  point out such differences in this document.


  As a special case, if you do not need any external servers, the ISP-
  supplied router can be attached directly to your external interface on
  the private network gateway machine, rather than with a hub.



  4.  Obtaining Your Connection


  4.1.  Choosing Your Provider

  As with anything, shop around. Determine which services are available
  in your area, as well as the costs associated with those services. Not
  all locations are wired to accept DSL, and some locations may not be
  suitable for wireless connections due to constraints of the landscape,
  architecture, or environment. Be prepared to provide the street
  address of the location where your hookup will be installed, as DSL
  speeds are strongly dependent on your distance from the switch, and
  ask specifically about such details as bandwidth between your machine
  and the provider, what has to be done to install the connection, and
  what hardware is provided in the quoted monthly rate. Also, you should
  have some idea of how many IP numbers you need for your own machines
  (remember that not all IP numbers in the block you get from the
  provider will be available for attaching your computers).  Ask the
  provider what their total bandwidth is out to the outside world, as
  the quoted speed is only between your site and theirs. If the provider
  has insufficient bandwidth to the outside, the customers will suffer
  bottlenecks within the provider's network.


  Once you have narrowed down a list of candidates, ask around, see if
  anybody can provide you with recommendations for the services you're
  considering. Ask them what sort of bandwidth they get to unloaded
  sites. Also, if you intend to have fast connections between the new
  domain and local ISP accounts from home, for telecommuting, or just
  remote administration, it is essential that you do a traceroute from
  your home ISP account to a host operating on the service you're
  considering. This will tell you how many hops, and how much latency
  you should expect, between home and the new domain. Latencies much
  above 100 to 200 milliseconds can be difficult to use for extended
  periods of time. The traceroute should be run around the time of day
  that you expect to make use of the network connection between home and
  the new domain.


  4.2.  Preparing For Hardware Installation

  After you have chosen the provider and service type for the new
  domain, ask about installation details. You may require service calls
  from the telephone company as well as from the ISP in order to install
  the service, and the technicians may need access to controlled areas
  of your building, so inform the building engineer of the installation
  requirements.


  Before the ISP technician arrives, ask for the network parameters,
  specifically the IP number, netmask, broadcast address, gateway
  routing address, DNS server address, and also what cabling you need to
  connect to the hardware delivered by the technician (i.e. straight-
  through or crossover RJ45 cabling, etc.).


  Have one machine available for testing, and put it close to where the
  network connection hardware will be installed. If possible, configure
  it before the service technician arrives, setting the IP number and
  netmask, and have the appropriate cabling ready so that the
  installation and testing can be done quickly.



  4.3.  Testing The Connection

  With your test machine attached to the ISP's hardware, make sure that
  you can ping sites beyond the ISP. If not, a traceroute to the outside
  can help to show where the connection is failing. If traceroute shows
  no successful hops it indicates that your test machine's network
  configuration (default route, interface address, NIC drivers, DNS,
  etc.) is incorrectly set. If it shows one hop, that could mean that
  your router is not correctly configured to communicate with the ISP.
  If it shows several hops before failing, the problem is almost
  certainly in the ISP or in the outside world, and beyond your
  immediate control.



  4.4.  Using A Dynamic IP

  The benefits of a corporate connection, with a static IP block and
  various hosted services, comes with a cost. It can be more than ten
  times as expensive as a high speed home connection on DSL or cable
  modem. If the budget can't support a corporate connection, or if no
  such connections are available in your area, you might want to try to
  set up a domain on a dynamic IP. Instead of a range of IP numbers, you
  typically get exactly one, which means that your private network
  gateway machine will also have to host any incoming services from the
  outside.


  First, you might want to check the legality of it. Many companies'
  user agreements explicitly forbid setting up externally-accessible
  servers on personal accounts. They may enforce this with packet
  filters blocking incoming connections on the http and FTP ports. You
  should also be aware that the quoted connection speed for personal
  accounts such as home DSL or cable modem are the downlink speeds, and
  that the uplink speeds might be much slower. The uplink speed is what
  is important for serving up FTP or web content.


  If you have a dynamic IP, and you want to have incoming connections,
  you will have to subscribe to a dynamic IP hosting service, such as
  DynIP <http://www.dynip.com/>, DynHOST <http://www.dynhost.com/>, or
  TZO <http://www.tzo.com/>. These all work by running software on your
  machine which passes your current IP number on to the company's
  servers. When your current IP number arrives at the servers, their DNS
  tables are updated to reflect the new value. You can either get a
  domain name under their domain name, such as ``example.dynip.com'' or
  ``example.dynhost.com'', or you can register your own domain and set
  the primary DNS authority to point to the company providing this
  service (usually at a higher cost).


  There is also a free hosting service, at Domain Host Services
  <http://www.dhs.org/>. They seem fairly new, and there are few details
  on their web site at the moment, but you might find it worth a look.


  If you have set up a dynamic IP, and subscribed to one of these
  services, it will affect some of the decisions you make in section
  ``Deciding Which Domain Services You Will Host''. In particular, there
  is little point subscribing to a dynamic IP hosting service if you do
  not plan to host at least one of web or FTP services. You will have to
  set primary DNS authority to point to the company you've chosen. You
  should not have a named daemon answering requests from outside your
  private network. Other details, such as handling of email, will depend
  on the specifics of the service you've subscribed to, and can best be
  answered by the support staff of that company.


  One final note: if you want to have remote access to a machine with a
  dynamic IP, but don't need it for hosting other services, the
  inexpensive solution is to create a ``drop box'' on a publicly
  accessible machine with a static IP, and have your dynamic IP host
  send its IP number there, either in email or simply by writing it into
  a file on a shell account. When you want to access your machine
  remotely, first extract the current IP number from the drop box, then
  use slogin to attach directly to that IP number. This is, after all,
  really all that a dynamic IP hosting service does, they just do it
  automatically over standard services, saving you some steps.



  5.  Registering A Domain Name

  In order for people in the outside world to locate your servers under
  the domain name of your choice, whether for web, FTP, or email
  delivery, you will have to register the domain name for insertion into
  the relevant top level domain database.


  Exercise some simple prudence in choosing your domain name. Certain
  words or phrases may be forbidden on the grounds of community
  standards, or may be offensive to visitors whose language or slang
  differs from that of your region. Domain names can contain only the 26
  letters of the Roman alphabet (without accents), the hyphen (though
  not at the beginning or end of the name), and the 10 digits. Domain
  names are not case-sensitive, and can be at least 26 characters long
  (this limit is subject to change). Be careful not to register a name
  which you can reasonably have been expected to know infringes on the
  trademarks of an existing company, the courts are not kind to
  cybersquatters. Some information on the circumstances under which your
  poorly-chosen domain name might be stripped from your control are
  available in this Uniform Domain Name Dispute Resolution Policy
  <http://www.icann.org/udrp/udrp-policy-24oct99.htm>.


  There are many companies which register names in the ``.com'',
  ``.net'', and ``.org'' top level domains. For a current list, check
  the list of accredited registrars
  <http://www.icann.org/registrars/accredited-list.html>.


  To register a name under a country top level domain, such as a
  ``.ca'', ``.de'', ``.uk'', etc., check with the appropriate authority,
  which can be located in the Country Code Top-Level Domains database
  <http://www.iana.org/cctld.html>.


  Typically, you have to provide the registrar with contact information,
  primary and secondary DNS IP numbers, a change request validation
  scheme (you wouldn't want just anybody changing your domain for you),
  and money in the form of an annual fee. If you're not comfortable with
  the change request validation schemes offered by a registrar, let them
  know that you're not willing to use the service until they address
  your security concerns.



  6.  Deciding Which Domain Services You Will Host

  Most full-service ISPs will provide a variety of domain services for
  their customers. This is largely because of the problems associated
  with hosting these services under certain other, more popular desktop
  and server operating systems. These services are much easier to
  provide under Linux, and can be hosted on fairly inexpensive hardware,
  so you should decide what services you want to take on for yourself.
  Some of these services include:

  o  Primary DNS authority on your domain. See section ``Primary DNS
     Authority''.

  o  Electronic mail. See section ``Electronic Mail''.

  o  Web space hosting. See section ``Web Space Hosting''.

  o  FTP space hosting. See section ``FTP Site Hosting''.

  o  Packet filtering. See section ``Packet Filtering''.

  In each of these, you basically have to weigh convenience against
  control. When your ISP performs one or more of these services, you can
  usually be fairly sure that they have people with experience
  maintaining the service, so you have less to learn, and less to worry
  about. At the same time, you lose control over these services. Any
  changes require that you go through the technical support of your ISP,
  something which may sometimes be inconvenient or cause longer delays
  than you would like. There's also a security issue involved, the ISP
  is a much more tempting target to attackers than your own site. Since
  an ISP's servers might host email and/or web space for the dozens of
  companies which are their customers, an attacker who compromises one
  of those servers gets a much higher return for his efforts than one
  who attacks your personal servers, where only one company's data is
  kept.



  6.1.  Primary DNS Authority

  When a person somewhere in the outside world attempts to connect to a
  machine in the new example.com domain, queries are sent between
  various servers on the Internet, ultimately resulting in the IP number
  of that machine being returned to the software of the person
  attempting the connection. The details of this sequence are beyond the
  scope of this document. Neglecting many details, when a request is
  made for the machine fred.example.com, a centralized database is
  consulted to determine what is the IP number of the machine which
  holds primary DNS authority for the example.com domain. This IP number
  is then queried for the IP number of the machine fred.example.com.


  There must be a primary and a secondary DNS server for every domain
  name. The names and IP numbers of these two servers are stored in a
  centralized database whose entries are controlled by domain
  registration authorities such as Network Solutions
  <http://www.networksolutions.com/>.


  If you elect to have primary DNS authority hosted by your ISP, these
  two servers will probably both be machines controlled by the ISP. Any
  time you want to add an externally visible machine to your network,
  you will have to contact the ISP and ask them to put the new machine
  in their database.


  If you elect to hold primary DNS authority on your own host, you will
  still use another machine as your secondary. Technically, you should
  use one on a redundant Internet connection, but it is very common that
  the secondary is held on one of your ISP's machines. If you want to
  add an externally visible machine to your network, you will have to
  update your own database, and then wait for the change to propagate
  (something which takes, typically, a small number of hours). This
  allows you to add barney.example.com without having to go through your
  ISP.


  It is a good idea to set up secondary DNS on a geographically distant
  host, so that a single cable cut near your ISP doesn't take both your
  primary and secondary DNS servers off line. The domain registrar you
  used to register your domain name may provide secondary DNS service.
  There is also a free service, Granite Canyon
  <http://www.granitecanyon.com/>, available to anybody who asks.


  Regardless of whether or not you choose to act as primary DNS
  authority for your domain, see section ``Setting Up Name Resolution''
  for configuration help. You will want some sort of name resolution
  system for your private network, even if you delegate primary DNS
  authority to the ISP.



  6.2.  Electronic Mail

  When you subscribe with your ISP, they will typically supply a number
  of email boxes. You can elect to use this service exclusively, in
  which case all incoming email is stored on the ISP's servers and your
  users read their mail with POP3 clients which connect to the ISP's
  servers. Alternately, you may decide to set up email on your own
  machines. Once again, you should weigh the merits of the two
  approaches, and choose the one which you prefer.


  Things to remember if you use the ISP for all email:

  o  It may be easier to access the email from home, or from other
     locations when you're on a business trip, depending on the security
     which you use to protect your domain.

  o  Email is routinely stored on the ISP's servers, which may be a
     problem if sensitive material is sent unencrypted.
  o  You have a limited number of email accounts, and may have to pay if
     you exceed this limit.

  o  To create a new email address, you have to go through the ISP.


  Things to remember if you provide your own email:

  o  Email is routinely stored on your own servers, with backup storage
     on your ISP if your mail host goes down or its disk fills up.

  o  You have an essentially unlimited number of email accounts, which
     you can create and delete yourself.

  o  You have to support the email clients used on your private network,
     and possibly by people trying to read their email from home.


  One possible approach is to host email yourself, but also use the
  several email addresses provided by the ISP. People who need email
  accessible from outside the private network can have an email address
  in your domain which gets redirected to one of the ISP-supplied email
  addresses. Others can have local email on the private network. This
  requires a bit more coordination and configuration, but gives more
  flexibility than either of the other approaches.


  Should you choose to host email for your domain, see section ``Setting
  Up Email For Your Domain'' for configuration help.


  If you decide not to host email for your domain, refer to section
  ``DNS Configuration If You Are Not Hosting Email'' for important notes
  on the name resolution configuration.



  6.3.  Web Space Hosting

  Your ISP may allocate you a certain amount of space on their web
  servers. You might decide to use that, or you might have a web hosting
  machine which you put on your external network, in one of your
  external IP numbers.


  Points to remember if you choose to use the ISP's web space hosting:

  o  You have a certain disk space allocation which you should not
     exceed. This will include not only web space contents, but also
     data collected from people visiting the site.

  o  The bandwidth between your web server and the outside world will
     almost certainly be higher than it would be if you hosted it on
     your own hardware. In any case, it will not be slower.

  o  It may be difficult to install custom CGI scripts or commercial
     packages on your web site.

  o  Your bandwidth between your network and your web server will almost
     certainly be lower than it would be if you hosted it on your own
     network.


  Points to remember if you choose to host your own web space:


  o  You have much more control over the hosting machine. You can tailor
     your security more precisely for your application.

  o  Potentially sensitive data, such as credit card numbers or mailing
     addresses, remains on machines which you control.

  o  Your backup strategy is probably not as comprehensive as your
     ISP's.


  Notice that I do not mention anything about the ISP having more
  powerful hardware, higher peak data rates, and so on. By the time
  these things become important, you're talking about very high data
  rate network connections, and, quite frankly, you had better be
  delegating these decisions to a skilled consultant, not looking in a
  Linux HOWTO.


  Should you choose to host web space for your domain on your own
  server(s), refer to other documents, such as the WWW-HOWTO
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/WWW-HOWTO>, for
  configuration help. I strongly recommend that this service be run on a
  different machine from the private network gateway machine, for
  security reasons.



  6.4.  FTP Site Hosting

  Basically, the same arguments apply to FTP hosting as apply to WWW
  hosting, with the exception that active content is not an issue for
  FTP, and CGI scripts don't appear. Most of the recent ftpd exploits
  have come from buffer overruns resulting from the creation of large
  directory names in anonymously-writable upload directories, so if your
  ISP allows uploads and is lax in keeping up with security updates on
  the FTP daemon, you might be better off hosting this service yourself.


  Should you choose to host FTP for your domain on your own server(s),
  make sure to get the latest version of your FTP daemon, and consult
  the configuration instructions there. Once more, I strongly recommend
  that this service be run on a different machine from the private
  network gateway machine, for security reasons.


  For wu-ftpd, I would recommend the following configuration options:

  o  --disable-upload - unless you need anonymous uploads

  o  --enable-anononly - encourage your local users to use scp to
     transfer files between machines.

  o  --enable-paranoid - disable whatever features of the current
     release might be considered questionable.



  6.5.  Packet Filtering

  Some ISPs will put packet filters on their network, to protect the
  users of the system from each other, or from external attackers. Cable
  modem networks and similar broadcast networks have had embarrassing
  problems when users of Windows 95 or 98 inadvertently set up disk
  shares, exporting the full contents of their hard drives to anybody on
  the network segment who cared to browse for active servers in the
  neighbourhood.  In some cases, the solution has been to tell the users
  not to do that, but some providers have put filtering into the access
  hardware to prevent people from exporting their data by accident.


  Packet filtering is really something which you ought to do yourself.
  It fits in easily into the kernel running on your private network
  gateway machine and gives you a better idea of what's happening around
  you. You often will find that you have to make small tweaks to the
  firewall to optimize it during the initial setup, and this is much
  easier to do in real time than through a technical support contact.


  Should you choose to do packet filtering for your domain, see section
  ``Setting Up Packet Filtering'' for configuration help.



  7.  Configuring Your Hosted Services

  7.1.  Setting up Name Resolution

  You will want some way for the computers on your network to refer to
  one another by name, and also a way for people in the outside world to
  refer to your exposed hosts by name. There are several ways to go
  about doing this.


  7.1.1.  DNS On Private Network, ISP Handles Domain

  [ Note: if you have chosen not to implement a private network, go to
  section ``Fully Exposed Network, Hosted By ISP''. ]


  In this configuration, you have delegated responsibility for the
  primary DNS authority on your domain to the ISP. You still use DNS
  within your private network when hosts there want to talk to one
  another. You have given your ISP a list of the names and IP numbers of
  all exposed hosts. If you want one externally visible machine, for
  instance betty.example.com, to act both as web and FTP server, you
  should ask the ISP to make CNAME entries for www.example.com and
  ftp.example.com pointing to betty.example.com.


  Set up DNS on your private network gateway machine. This can be done
  securely, and makes upgrading easier, should you later decide to host
  primary DNS authority for your domain.


  I will assume that you have decided to host DNS from the machine
  dns.example.com, which is on the private network gateway, and an alias
  for fred.example.com at 192.168.2.1. Some small modifications have to
  be made to this configuration if this is not the case. I will not
  cover that in this HOWTO unless there is significant interest.


  You will have to download and compile a recent version of BIND, the
  Berkeley Internet Name Domain. It is available at the BIND web site
  <http://www.isc.org/products/BIND/>. Next, you have to configure the
  daemon.  Create the following file, /etc/named.conf:



  ______________________________________________________________________
  options {
          directory "/var/named";
          listen-on { 192.168.1.1 };
  };

  zone "." {
          type hint;
          file "root.hints";
  };

  zone "0.0.127.in-addr.arpa" {
          type master;
          file "pz/127.0.0";
  };


  zone "1.168.192.in-addr.arpa" {
          type master;
          file "pz/1.168.192";
  };

  zone "example.com" {
          type master;
          notify no;
          file "pz/example.com";
  };
  ______________________________________________________________________



  Note that we are declaring ourselves the master for the example.com
  domain. Meanwhile, our ISP is also declaring itself to be the master
  for the same domain. This is not a problem, as long as you are careful
  about the setup. All of the machines on the private network must use
  dns.example.com to perform their name resolution. They must not use
  the name resolvers of the ISP, as the ISP name server believes itself
  to be authoritative over your entire domain, but it doesn't know the
  IP numbers or names of any machines on your private network.
  Similarly, hosts on exposed IP numbers in your domain must use the ISP
  name server, not the private name server on dns.example.com.


  The various files under /var/named must now be created.


  The root.hints file is exactly as described in the BIND documentation,
  or in the DNS HOWTO <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/DNS-
  HOWTO>. At the time of this writing, the following is a valid
  root.hints file:



  ______________________________________________________________________
  H.ROOT-SERVERS.NET.     6d15h26m24s IN A  128.63.2.53
  C.ROOT-SERVERS.NET.     6d15h26m24s IN A  192.33.4.12
  G.ROOT-SERVERS.NET.     6d15h26m24s IN A  192.112.36.4
  F.ROOT-SERVERS.NET.     6d15h26m24s IN A  192.5.5.241
  B.ROOT-SERVERS.NET.     6d15h26m24s IN A  128.9.0.107
  J.ROOT-SERVERS.NET.     6d15h26m24s IN A  198.41.0.10
  K.ROOT-SERVERS.NET.     6d15h26m24s IN A  193.0.14.129
  L.ROOT-SERVERS.NET.     6d15h26m24s IN A  198.32.64.12
  M.ROOT-SERVERS.NET.     6d15h26m24s IN A  202.12.27.33
  I.ROOT-SERVERS.NET.     6d15h26m24s IN A  192.36.148.17
  E.ROOT-SERVERS.NET.     6d15h26m24s IN A  192.203.230.10
  D.ROOT-SERVERS.NET.     6d15h26m24s IN A  128.8.10.90
  A.ROOT-SERVERS.NET.     6d15h26m24s IN A  198.41.0.4
  ______________________________________________________________________



  The pz/127.0.0 file is as follows:


       ______________________________________________________________________
       $TTL 86400

       @               IN      SOA     example.com. root.example.com. (
                                       1       ; Serial
                                       8H      ; Refresh
                                       2H      ; Retry
                                       1W      ; Expire
                                       1D)     ; Minimum TTL
                               NS      dns.example.com.
       1                       PTR     localhost.
       ______________________________________________________________________



  The pz/1.168.192 file is as follows:


       ______________________________________________________________________
       $TTL 86400

       @       IN      SOA             dns.example.com. root.dns.example.com. (
                                       1       ; Serial
                                       8H      ; Refresh 8 hours
                                       2H      ; Retry   2 hours
                                       1W      ; Expire  1 week
                                       1D      ; Minimum 1 day
                               )
                       NS      dns.example.com.

       1               PTR     fred.example.com.
                       PTR     dns.example.com.
                       PTR     mail.example.com.
       2               PTR     barney.example.com.
       3               PTR     wilma.example.com.
       ______________________________________________________________________



  and so on, where you create one PTR record for each machine with an
  interface on the private network. In this example, fred.example.com is
  on IP number 192.168.1.1, and is pointed to by the dns.example.com and
  mail.example.com aliases. The machine barney.example.com is on IP num-
  ber 192.168.1.2, and so on.


  The pz/example.com file is as follows:


       ______________________________________________________________________
       $TTL 86400

       @               IN      SOA     example.com. root.dns.example.com. (
                                       1       ; Serial
                                       8H      ; Refresh 8 hours
                                       2H      ; Retry   2 hours
                                       1W      ; Expire  1 week
                                       1D      ; Minimum 1 day
                               )
                               NS              dns.example.com.
               IN              A               192.168.1.1
               IN              MX          10  mail.example.com.
               IN              MX          20  <ISP mail machine IP>.


       localhost               A           127.0.0.1
       fred                    A           192.168.1.1
                               A           10.1.1.9
       dns                     CNAME       fred
       mail                    CNAME       fred
       barney                  A           192.168.1.2
       wilma                   A           192.168.1.3
       betty                   A           10.1.1.10
       www                     CNAME       betty
       ftp                     CNAME       betty
       ______________________________________________________________________



  Note that we create entries for machines both within the private net-
  work and on external IPs, since machines within the private network
  will not query the ISP's name servers for a request on, say,
  betty.example.com. We also provide both IP numbers for fred, the pri-
  vate and external IP numbers.


  One line in the ``options'' section of /etc/named.conf bears
  discussion:


       listen-on { 192.168.1.2 };



  This will prevent your named daemon from answering DNS requests on the
  outside interface (all requests from the outside must go through the
  ISP's name resolver, not yours).



  7.1.2.  Non-DNS Resolution On Private Network, ISP Handles Domain

  [ Note: if you have chosen not to implement a private network, go to
  section ``Fully Exposed Network, Hosted By ISP''. ]
  In this configuration, you have decided that your private network is
  fairly small and unlikely to change often. You have decided not to use
  the centralized database of a DNS server, and instead to maintain the
  host resolution separately on each machine. All machines should use
  the ISP's DNS server for their host name resolution for machines
  beyond the private network gateway. For name resolution on the private
  network, a hosts table has to be created. For Linux, this means
  entering the names and IP numbers of all of the machines on the
  private network into the /etc/hosts on each machine. Any time a new
  machine is added, or a name or IP number is changed, this file has to
  be updated on each Linux box.


  As in section ``DNS Resolution on Private Network, ISP Handles
  Domain'', the list of host names on exposed IP numbers must be sent to
  the ISP, and any aliases (such as for www and ftp names) should be
  specified so that a CNAME entry can be created by the ISP.



  7.1.3.  You Are Primary DNS Authority For Domain

  While you could set up named resolution on the exposed hosts, and
  private database resolution for the private network, I will not cover
  that case. If you're going to be running named for one service, you
  ought really to do it for both, just to simplify the configuration. In
  this section I will assume that the private network gateway machine is
  handling name resolution both for the private network and for outside
  requests.


  At the time of this writing, under version 8.2.2 of the BIND package,
  there is no way for a single named daemon to produce different answers
  to requests, depending on which interface the request arrives on. We
  want name resolution to act differently if the query comes from the
  outside world, because IP numbers on the private network shouldn't be
  sent out, but have to be available in answer to requests from within
  the private network. There is some discussion of a new ``views''
  keyword which may be added to BIND to fill this need at a later date,
  but until that happens, the solution is to run two named daemons with
  different configurations.


  First, set up the private network domain name server as described in
  section ``DNS Resolution on Private Network, ISP Handles Domain''.
  This will be the name resolver visible from within your private
  network.


  Next, you have to set up DNS for your domain, as visible to hosts in
  the outside world. First, check with your provider to see if they will
  delegate reverse lookups of your IP numbers to them. While the
  original DNS standard didn't account for the possibility of
  controlling reverse DNS on subnets smaller than a class C network, a
  workaround has been developed which works with all compliant DNS
  clients, and has been outlined in RFC 2317
  <http://www.ietf.org/rfc/rfc2317.txt>. If your provider is willing to
  delegate control of reverse DNS on your IP block, you will have to
  determine from them the exact name of the in-addr pseudo-domain they
  have chosen to delegate to (the RFC does not offer a convention they
  recommend for everyday use), and you will have to register control for
  that pseudo-domain. I will assume that the provider has delegated
  control to you, and the name of the pseudo-domain is 8.1.1.10.in-
  addr.arpa. The provider would create CNAME entries of the form


  8.1.1.10.in-addr.arpa.     2H IN CNAME 8.8.1.1.10.in-addr.arpa.
  9.1.1.10.in-addr.arpa.     2H IN CNAME 9.8.1.1.10.in-addr.arpa.
  10.1.1.10.in-addr.arpa.    2H IN CNAME 10.8.1.1.10.in-addr.arpa.
  etc.



  in their zone file for the 1.1.10.in-addr.arpa domain. The configura-
  tion of your 8.1.1.10.in-addr.arpa zone file is given later in this
  section.


  If your provider is willing to delegate control of the reverse DNS to
  you, they will create CNAME entries in their reverse DNS zone table
  for those IP numbers you control, pointing to the corresponding
  records in your pseudo-domain, as shown above. If they are not willing
  to delegate control to you, you will have to ask them to update their
  reverse DNS entries any time you add, delete, or change the name of an
  externally visible host in your domain. If the reverse DNS table is
  not synchronized with your forward DNS entries, certain services may
  generate warnings, or refuse to handle requests issued by machines
  affected by the mismatch.


  You now have to create a second named setup, this one to handle
  requests issued by machines outside the private network gateway. This
  setup lists only those hosts and IP numbers which are externally
  visible, and responds only to requests on the outside interface of the
  private network gateway machine.


  First, create a second configuration file, for instance
  /etc/named.ext.conf for requests from the external interface. In our
  example, it might be as follows:


       ______________________________________________________________________
       options {
               directory "/var/named";
               listen-on { 10.1.1.9; };
       };

       zone "." {
               type hint;
               file "root.hints";
       };

       zone "0.0.127.in-addr.arpa" {
               type master;
               file "pz/127.0.0";
       };


       zone "8.1.1.10.in-addr.arpa" {
               type master;
               file "ext/8.1.1.10";
       };

       zone "example.com" {
               type master;
               notify no;
               file "ext/example.com";
       };
       ______________________________________________________________________

  The root.hints and pz/127.0.0 files, both under /var/named are shared
  with the other running daemon. The file ext/8.1.1.10 is as follows:


       ______________________________________________________________________
       $TTL 86400

       @       IN      SOA             fred.example.com. root.fred.example.com. (
                                       1               ; Serial
                                       10800           ; Refresh       3 hours
                                       3600            ; Retry         1 hour
                                       3600000         ; Expire        1000 hours
                                       86400 )         ; Minimum       24 hours
                       NS      dns.example.com.
       9       IN      PTR     fred.example.com.
                       PTR     dns.example.com.
                       PTR     mail.example.com.
       10      IN      PTR     betty.example.com.
                       PTR     www.example.com.
                       PTR     ftp.example.com.
       ______________________________________________________________________



  The file ext/example.com contains the following:


       ______________________________________________________________________

       $TTL 86400

       @               IN      SOA     example.com. root.fred.example.com. (
                                       10021   ; Serial
                                       8H      ; Refresh 8 hours
                                       2H      ; Retry   2 hours
                                       1W      ; Expire  1 week
                                       1D      ; Minimum 1 day
                               )
                               NS              fred.example.com.
               IN              A               209.217.100.58
               IN              MX          10  mail.example.com.
               IN              MX          20  <ISP Mail Machine>.


       localhost               A           127.0.0.1
       fred                    A           10.1.1.9
       betty                   A           10.1.1.10
       dns                     CNAME       fred
       mail                    CNAME       fred
       www                     CNAME       betty
       ftp                     CNAME       betty
       ______________________________________________________________________



  Start the two daemons on the private network gateway machine. Put the
  following into your network daemon initialization scripts:


       /usr/sbin/named -u dnsuser -g dnsgroup /etc/named.conf
       /usr/sbin/named -u dnsuser -g dnsgroup /etc/named.ext.conf

  I've assumed here that you have created the unprivileged user
  ``dnsuser, and the corresponding unprivileged group ``dnsgroup''. If a
  bug in bind turns up, which allows an attacker to execute code from
  within named, the attacker will find himself restricted to those oper-
  ations available to the unprivileged user. The /var/named directory
  and the files within should not be writable by ``dnsuser''.


  The machines on the private network must have their name resolution
  configured to ask dns.example.com (at IP 192.168.1.1 in our example),
  while the externally visible machines can either query the network
  gateway's outside interface (at IP 10.1.1.9 in our example), or the
  ISP's DNS servers.



  7.1.4.  Fully Exposed Network, Hosted By ISP

  In this configuration, you have chosen to expose all of your hosts.
  You have a real IP number for each machine in your domain, and you've
  given your ISP the list of machine names and IP numbers. The ISP has
  given you at least one IP number for their DNS host(s). Your Linux
  boxes are now configured for name resolution in /etc/resolv.conf:


       ______________________________________________________________________
       search example.com
       nameserver <DNS host 1>
       nameserver <DNS host 2>
       ______________________________________________________________________



  Windows boxes are configured with the same parameters, in the network
  settings dialogues.



  7.2.  DNS Configuration If You Are Not Hosting Email

  The configurations described in section ``Setting Up Name Resolution''
  have MX records pointing to a machine ``mail.example.com''. The MX
  record with the lowest priority number following tells remote sites
  where to send email. Other MX records with higher priority numbers are
  used as backup email receivers. These backups will hold the mail for a
  certain period of time if the primary email receiver is not able to
  accept the messages for some reason. In the examples in that section,
  I have assumed that fred.example.com, under its alias of
  mail.example.com, is handling email for the domain. If you have chosen
  to let the ISP handle all of your email hosting, you should change
  those MX records to point to the appropriate ISP machines. Ask your
  ISP technical support representative what host names you should use
  for the MX records in the various files.



  7.3.  Setting up Electronic Mail

  If you have chosen to do full electronic mail hosting for your domain,
  you'll have to take special actions for email coming from hosts on the
  private network, and for allowing transparent mail reading from
  anywhere within the private network. Unless you're careful, messages
  are likely to sit around for long times if they are waiting on one
  host, and the intended recipient is logged on another machine. For
  security reasons, I recommend that the incoming email not be
  accessible from the externally visible hosts (this might help to
  discourage a PHB who wants his desktop machine to be on a real IP,
  then wonders why he gets brought down by a ping of death twice a day).
  A transparent email sharing system on the private network fairly
  straight-forward in sendmail. If anybody wants to provide tested
  solutions for other mail handling daemons, I welcome additions.


  7.3.1.  A Solution Using "sendmail"

  In order that email delivered to one host be visible on all machines,
  the simplest solution is to export the mail spool directory with read-
  write privileges over the entire private network. The private network
  gateway machine will also act as mail collector and forwarder for the
  entire private network, and so must have root write privileges to the
  mail spool drive. The other clients may or may not squash root, at
  your discretion. My general security philosophy is not to grant
  privileges unless there is a clear reason for it, so I squash root on
  the mail spool network drive for all hosts except the private network
  gateway machine. This has the effect that root can only read his mail
  from that machine, but this is not a particularly serious handicap.
  Note that the mail spool drive can be a directory on the private
  network gateway machine, exported via NFS, or it can be a directory on
  one of the internal servers, exported to the entire private network.
  If the mail spool drive is resident on the private network gateway,
  there is no issue of squashing root for that machine. If it is on
  another server, then note that email will be undeliverable if that
  server, the gateway machine, or the network connecting them, is down.


  For Windows machines on your private network, you may either set up a
  POP server on the mail spool host, or use samba to export the mail
  spool to those machines. The Windows machines should be configured to
  send and retrieve mail under a Linux username, such as
  joeuser@example.com, so that the email address host name is the bare
  domain name, not a machine name like barney.example.com. The outgoing
  SMTP host should be set to the private network gateway machine, which
  will be responsible for forwarding the mail and doing any address
  rewriting.


  Next, you should configure sendmail to forward email from the machines
  on the private network, rewriting the addresses if necessary. Obtain
  the latest sources to sendmail from the sendmail.org WWW site
  <http://www.sendmail.org/>. Compile the binaries, then go to the
  cf/domain subdirectory within the sendmail source tree, and create the
  following new file: example.com.m4



  ______________________________________________________________________
  divert(-1)
  #
  # Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
  # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
  # Copyright (c) 1988, 1993
  #       The Regents of the University of California.  All rights reserved.
  #
  # By using this file, you agree to the terms and conditions set
  # forth in the LICENSE file which can be found at the top level of
  # the sendmail distribution.
  #
  #

  #
  #  The following is a generic domain file.  You should be able to
  #  use it anywhere.  If you want to customize it, copy it to a file
  #  named with your domain and make the edits; then, copy the appropriate
  #  .mc files and change `DOMAIN(generic)' to reference your updated domain
  #  files.
  #
  divert(0)
  define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl
  FEATURE(redirect)dnl
  MASQUERADE_AS(example.com)dnl
  FEATURE(masquerade_envelope)dnl
  ______________________________________________________________________



  This defines the domain ``example.com''. Next, you have to create the
  sendmail.cf files which will be used on the mail host (the private
  network gateway), and on the other Linux nodes on the private network.


  Create the following file in the sendmail source tree, under cf/cf:
  example.master.m4



  ______________________________________________________________________
  divert(-1)
  #
  # Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
  # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
  # Copyright (c) 1988, 1993
  #       The Regents of the University of California.  All rights reserved.
  #
  # By using this file, you agree to the terms and conditions set
  # forth in the LICENSE file which can be found at the top level of
  # the sendmail distribution.
  #
  #

  #
  #  This is the prototype file for a configuration that supports nothing
  #  but basic SMTP connections via TCP.
  #
  #  You MUST change the `OSTYPE' macro to specify the operating system
  #  on which this will run; this will set the location of various
  #  support files for your operating system environment.  You MAY
  #  create a domain file in ../domain and reference it by adding a
  #  `DOMAIN' macro after the `OSTYPE' macro.  I recommend that you
  #  first copy this to another file name so that new sendmail releases
  #  will not trash your changes.
  #

  divert(0)dnl
  OSTYPE(linux)dnl
  DOMAIN(example.com)dnl
  FEATURE(nouucp)
  FEATURE(relay_entire_domain)
  FEATURE(`virtusertable', `hash /etc/sendmail/virtusertable')dnl
  FEATURE(`genericstable', `hash /etc/sendmail/genericstable')dnl
  define(`confPRIVACY_FLAGS', ``noexpn,novrfy'')dnl
  MAILER(local)
  MAILER(smtp)
  Cw fred.example.com
  Cw example.com
  ______________________________________________________________________



  In this example we have disabled the ``expn'' and ``vrfy'' commands.
  An attacker could troll for aliases with ``expn'', trying names like
  ``staff'', ``allstaff'', ``office'', and so on, until he hits an alias
  which expands out several usernames for him. He can then try the user-
  names against certain weak passwords in hopes of getting in (assuming
  he can get a login prompt - the security settings described in section
  ``Securing Your Domain'' are set up so that no login prompt is avail-
  able for off-site attackers).


  The other file you should create will define the sendmail.cf for the
  slave machines: example.slave.m4



  ______________________________________________________________________
  divert(-1)
  #
  # Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
  # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
  # Copyright (c) 1988, 1993
  #       The Regents of the University of California.  All rights reserved.
  #
  # By using this file, you agree to the terms and conditions set
  # forth in the LICENSE file which can be found at the top level of
  # the sendmail distribution.
  #
  #

  #
  #  This the prototype for a "null client" -- that is, a client that
  #  does nothing except forward all mail to a mail hub.  IT IS NOT
  #  USABLE AS IS!!!
  #
  #  To use this, you MUST use the nullclient feature with the name of
  #  the mail hub as its argument.  You MUST also define an `OSTYPE' to
  #  define the location of the queue directories and the like.
  #  In addition, you MAY select the nocanonify feature.  This causes
  #  addresses to be sent unqualified via the SMTP connection; normally
  #  they are qualified with the masquerade name, which defaults to the
  #  name of the hub machine.
  #  Other than these, it should never contain any other lines.
  #

  divert(0)dnl

  OSTYPE(linux)
  FEATURE(nullclient, fred.$m)
  Cm example.com
  ______________________________________________________________________



  You build the appropriate sendmail.cf files with the command:


       make example.master.cf example.slave.cf



  and then copy the files to the appropriate machines under the name
  sendmail.cf.


  This configuration puts most of the sendmail configuration files under
  the /etc/sendmail/ subdirectory. This configuration causes sendmail to
  parse and use two special files, virtusertable.db and
  genericstable.db. To use these special files, create their parent
  files. First, virtusertable.src:


       ______________________________________________________________________
       John.Public@example.com                 jpublic
       Jane.Doe@example.com                    jdoe@somemachine.somedomain
       abuse@example.com                       root
       Pointyhaired.Boss@example.com           #phb#@hotmail.com
       ______________________________________________________________________

  This maps the email addresses on incoming email to new destinations.
  Mail sent to John.Public@example.com is delivered locally to the Linux
  account jpublic. Mail to Jane.Doe@example.com is redirected to another
  email account, possibly in a different domain. Mail to abuse@exam-
  ple.com is sent to root, and so on.  The other file is generic-
  stable.src:


       ______________________________________________________________________
       jpublic                                 John.Public@example.com
       janedoe                                 Jane.Doe@example.com
       whgiii                                  Pointyhaired.Boss@example.com
       ______________________________________________________________________



  This file renames the sender on outgoing email from locally-sourced
  mail. While it clearly can't affect the return address for mail sent
  directly from jdoe@somemachine.somedomain, it allows you to rewrite
  the sender's email address from the internal usernames to whatever
  email address convention you've chosen. Finally, create the following
  Makefile in /etc/sendmail/:


       ______________________________________________________________________
       all : genericstable.db virtusertable.db

       virtusertable.db : virtusertable.src
               makemap hash virtusertable < virtusertable.src

       genericstable.db : genericstable.src
               makemap hash genericstable < genericstable.src
       ______________________________________________________________________



  Run make to create the hashed files which sendmail can use, and remem-
  ber to re-run make and restart sendmail (or send it a SIGHUP) after
  any changes to either of these ``.src'' files.



  7.3.2.  Solutions Using Other Mail Transfer Agents

  My experience is only with sendmail. If anybody would like to write
  this section, please contact me. Otherwise, I may, at some later time,
  try to provide details myself on such MTAs as Postfix, Exim, or smail.
  I'd really rather somebody wrote these sections who uses those
  programs.



  7.4.  Setting up Web Space Hosting

  You should set up your externally visible web server on a machine
  outside the private network, and not on the private network gateway
  machine, for security reasons. If the web server needs access to
  databases or other resources stored on the private network, the
  situation becomes more complicated, both from a network and a security
  standpoint. Such configurations are beyond the scope of this document.


  The details of setting up the server itself can be found in the apache
  documentation, and in the Linux WWW HOWTO
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/WWW-HOWTO> document.



  7.5.  Setting up FTP Hosting

  Once again, your FTP host should be an externally visible machine, and
  not the private network gateway machine. Follow the setup directions
  which ship with your FTP daemon package. Be sure to download the most
  recent version of the daemon, as there are security vulnerabilities in
  some older versions of many daemons. If your FTP site does not require
  anonymous users to upload files, be sure to disable that feature in
  the daemon. I recommend that user (non-anonymous) FTP logins not be
  permitted on the FTP host, that you require your regular users to use
  scp, the secure shell remote copy command, for any file updating they
  may have to do on the FTP host. This is to help build secure habits in
  the users, and to protect against the ``hostile router'' problem
  described in section ``Securing Your Domain''.



  7.6.  Setting up Packet Filtering

  This is discussed in detail in section ``Configuring Your Firewall''.



  8.  Securing Your Domain

  This section deals with setting up security for your new domain. The
  emphasis is on user-transparent features. If your security is too
  obtrusive, and interferes strongly with the actions of the users, the
  users will develop their own workarounds which may compromise the
  entire domain. The best way to avoid this is to make the security as
  transparent as possible, and to encourage users to come to you first
  when they have difficulties which might be related to the security
  measures of the site. A certain flexibility in attitude is important.
  I know from personal experience that if the security policy is too
  rigid, the users will simply set up their own network tunnels through
  the firewall so they can log in from outside the domain. It's better
  that remote login procedures, or whatever the users are trying to do,
  be set up, inspected, and approved by you.


  This section deals with securing your network against outside attack,
  and against casual snooping from within. Securing your site against
  determined attack from validated users within the private network is a
  more difficult and involved task, and is beyond the scope of this
  document.


  One of the security considerations used in this section is protecting
  against the ``hostile router''. The router provided by your ISP may be
  a remotely configurable computer in its own right, with the
  administrative password held by your provider. There have been
  security problems in the past when the router's manufacturer override
  password (the one used when your ISP forgets the password they
  programmed in) has become known to system crackers. When possible, you
  should design your security around the assumption that the router is
  potentially hostile. That is, it could be using any IP number in your
  public or private network blocks, it could be redirecting traffic on
  outgoing packets to another site, and it could be recording anything
  which goes through.

  8.1.  Configuring Your Firewall

  This section deals with configuring an ipchains-based masquerading,
  forwarding, filtering router. You should probably read the IPCHAINS-
  HOWTO <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/IPCHAINS-HOWTO>
  document first, then look here for additional hints. That HOWTO
  describes the steps necessary to compile a kernel with masquerading
  support, and describes the use of the ipchains binary in detail. You
  should enable firewalling on all machines with exposed IP numbers.


  Check your startup scripts to make sure that the sequence is as
  follows on the private network gateway machine:

  1. Outside Ethernet card is initialized.

  2. Firewall rules are run through ipchains.

  3. Forwarding is turned on.

  4. Network service daemons are started.

  So, as an example, on a Slackware-based system, the firewall
  configuration should come between the execution of rc.inet1 and
  rc.inet2. Further, if any problems arise during the firewall
  configuration steps, a warning should be printed, and the external
  Ethernet card taken off line before the network service daemons are
  run.


  One common problem with ipchains-based firewalls is the tedium of
  making sure that your rules are correctly set for packets arriving
  from the loopback interface, or arriving from either of the internal
  or external interfaces on the firewall machine. These locally-sourced
  packets can be blocked by a firewall. All too often, this is fixed by
  a sort of shotgun debugging approach, whereby the rules for the
  firewall are tweaked until all applications seem to run properly on
  the firewall host again. Unfortunately, this can sometimes result in a
  firewall which has unintended holes. With ipchains it is possible to
  write a firewall script which is easily debugged, and which avoids
  many of the packet source problems. Here is a sample script,
  /sbin/firewall.sh:



  ______________________________________________________________________
  #! /bin/sh
  #
  # New firewalling script using IP chains. Creates a filtering router
  # with network masquerading.
  #

  # define a few variables

  IPCHAINS=/sbin/ipchains

  LOCALNET="192.168.1.0/24"   # the private network
  ETHINSIDE="192.168.1.1"             # fred.example.com's private IP #
  ETHOUTSIDE="10.1.1.9"               # fred.example.com's public IP #
  LOOPBACK="127.0.0.1/8"
  ANYWHERE="0/0"
  OUTSIDEIF=eth1                  # fred.example.com's private interface

  FORWARD_PROCENTRY=/proc/sys/net/ipv4/ip_forward

  #
  # These two commands will return error codes if the rules
  # already exist (which happens if you run the firewall
  # script more than once). We put the commands before "set -e"
  # so that the script doesn't abort in that case.

  $IPCHAINS -N outside
  $IPCHAINS -N portmap

  set -e                  # Abort immediately on error setting
                          # up the rules.


  #
  # Turn off forwarding and clear the tables

  echo "0" > ${FORWARD_PROCENTRY}

  $IPCHAINS -F forward
  $IPCHAINS -F input
  $IPCHAINS -F output
  $IPCHAINS -F outside
  $IPCHAINS -F portmap


  #
  # Masquerade packets from within our local network destined for the
  # outside world. Don't masquerade packets which are local to local

  $IPCHAINS -A forward -s $LOCALNET -d $LOCALNET -j ACCEPT
  $IPCHAINS -A forward -s $ETHOUTSIDE -d $ANYWHERE -j ACCEPT
  $IPCHAINS -A forward -s $LOCALNET -d $ANYWHERE -j MASQ

  #
  # Set the priority flags. Minimum delay connections for www, telnet,
  # ftp, and ssh (outgoing packets only).

  $IPCHAINS -A output -p tcp -d $ANYWHERE www -t 0x01 0x10
  $IPCHAINS -A output -p tcp -d $ANYWHERE telnet -t 0x01 0x10
  $IPCHAINS -A output -p tcp -d $ANYWHERE ftp -t 0x01 0x10
  $IPCHAINS -A output -p tcp -d $ANYWHERE ssh -t 0x01 0x10


  #
  # Anything from our local class C is to be accepted, as are
  # packets from the loopback and fred's external IP.
  $IPCHAINS -A input -s $LOCALNET -j ACCEPT
  $IPCHAINS -A input -s $LOOPBACK -j ACCEPT
  $IPCHAINS -A input -s $ETHOUTSIDE -j ACCEPT



  # We'll create a set of rules for packets coming from the big, bad
  # outside world, and then bind all external interfaces to it. This
  # rule will be called "outside"
  #
  # We also create a "portmap" chain. The sockets used by daemons
  # registered with the RPC portmapper are not fixed, and so it is
  # a bit difficult to set up filter rules for them. The portmap
  # chain is configured in a separate script.


  #
  # Send packets from any outside interface to the "outside"
  # rules chain. This includes the $OUTSIDEIF interface and any
  # ppp interfaces we create for dialout (or dialin).

  $IPCHAINS -A input -i ${OUTSIDEIF} -j outside
  $IPCHAINS -A input -i ppp+ -j outside


  ##################################################
  #
  #  Set up the "outside" rules chain              #
  #
  ##################################################

  #
  # Nobody from the outside should claim to be coming from our localnet
  # or loopback

  $IPCHAINS -A outside -s $LOCALNET -j DENY
  $IPCHAINS -A outside -s $LOOPBACK -j DENY

  #
  # No packets routed to our local net should come in from outside
  # because the outside isn't supposed to know about our private
  #  IP numbers.

  $IPCHAINS -A outside -d $LOCALNET -j DENY

  #
  # Block incoming connections on the X port. Block 6000 to 6010.

  $IPCHAINS -l -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 6000:6010 -j DENY

  #
  # Block NFS ports 111 and 2049

  $IPCHAINS -l -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 111 -j DENY
  $IPCHAINS -l -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 2049 -j DENY
  $IPCHAINS -l -A outside -p UDP -s $ANYWHERE -d $ANYWHERE 111 -j DENY
  $IPCHAINS -l -A outside -p UDP -s $ANYWHERE -d $ANYWHERE 2049 -j DENY

  #
  # Block XDM packets from outside, port 177 UDP

  $IPCHAINS -l -A outside -p UDP -s $ANYWHERE -d $ANYWHERE 177 -j DENY


  #
  # Block the YP/NIS port 653
  $IPCHAINS -l -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 653 -j DENY

  #
  # Don't bother logging accesses on TCP port 80, the www port.

  $IPCHAINS -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 80 -j DENY

  #
  # Accept FTP data and control connections.

  $IPCHAINS -A outside -p TCP -s $ANYWHERE 20:21 -d $ANYWHERE 1024: -j ACCEPT

  #
  # Accept ssh packets

  $IPCHAINS -A outside -p TCP -s $ANYWHERE -d $ANYWHERE ssh -j ACCEPT

  #
  # Accept DNS packets from outside

  $IPCHAINS -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 53 -j ACCEPT
  $IPCHAINS -A outside -p UDP -s $ANYWHERE -d $ANYWHERE 53 -j ACCEPT

  #
  # Accept SMTP from the world

  $IPCHAINS -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 25 -j ACCEPT

  #
  # Accept NTP packets

  $IPCHAINS -A outside -p UDP -s $ANYWHERE -d $ANYWHERE 123 -j ACCEPT

  #
  # Accept no tap ident packets, we don't use them

  $IPCHAINS -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 113 -j DENY

  #
  # Turn off and log all other packets incoming, TCP or UDP, on privileged ports

  $IPCHAINS -l -A outside -p TCP -s $ANYWHERE -d $ANYWHERE :1023 -y -j DENY
  $IPCHAINS -l -A outside -p UDP -s $ANYWHERE -d $ANYWHERE :1023 -j DENY

  #
  # Check against the portmapper ruleset

  $IPCHAINS -A outside -j portmap


  ##############################################
  #
  #    End of "outside" rules chain            #
  #
  ##############################################


  #
  # Block outgoing rwho packets

  $IPCHAINS -A output -p UDP -i $OUTSIDEIF -s $ANYWHERE 513 -d $ANYWHERE -j DENY

  #
  # Prevent netbios packets from leaving

  $IPCHAINS -A output -p UDP -i $OUTSIDEIF -s $ANYWHERE 137 -d $ANYWHERE -j DENY
  #
  # Turn on forwarding

  echo "1" > ${FORWARD_PROCENTRY}
  ______________________________________________________________________



  Notice that the firewall can be used not only to block incoming pack-
  ets, but also outgoing packets which might leak information about your
  private network, such as rwho and netbios packets.


  As noted earlier, the portmapper rules are a bit different, because
  the portmap daemons register themselves with the portmapper and are
  told which ports to listen on. The ports used by a particular daemon
  may change as you change the RPC services used, or change their order
  of startup. The following script, /sbin/firewall.portmap.sh generates
  rule sets for the portmapped daemons:


       ______________________________________________________________________
       #! /bin/sh
       #
       ANYWHERE=0/0

       IPCHAINS=/sbin/ipchains

       $IPCHAINS -F portmap

       # Rules for preventing access to portmapped services by people on the outside
       #
       /usr/bin/rpcinfo -p | tail +2 | \
               { while read program vers proto port remainder
                 do
                       prot=`echo $proto | tr "a-z" "A-Z"`
                       $IPCHAINS -l -A portmap -p $prot -s $ANYWHERE -d $ANYWHERE $port -j DENY || exit 1
                 done
               }
       ______________________________________________________________________



  We didn't have to worry about whether packets coming in were legiti-
  mate packets from the private network, the portmap chain is only
  checked when the packets come in from the outside.


  This firewall configuration logs most suspicious packets through klogd
  with the kern.info logging priority. It will log normal connection
  attempts, as well as all known ``stealth'' probes.


  Now, we put these all together. We'd like to make sure that there
  isn't a small window of vulnerability while the system is starting up,
  so you should configure your startup sequence as follows:



  ______________________________________________________________________
  #! /bin/sh
  #
  # Get the network started, securely
  #
  #
  /etc/rc.d/rc.inet1              # Configure the network interfaces
                                  # and set up routing.
  /sbin/firewall.sh || { echo "Firewall configuration failed"
                         /sbin/ifconfig eth1 down }

  /sbin/ipchains -I outside 1 -j DENY     # Deny all incoming packets

  /etc/rc.d/rc.inet2              # Start the network daemons

  sleep 5                         # Let them stabilize

  # Secure the portmapped services
  /sbin/firewall.portmap.sh || { echo "Portmap firewall configuration failed"
                                 /sbin/ifconfig eth1 down }

  /sbin/ipchains -D outside 1       # Allow incoming packets
  ______________________________________________________________________



  This assumes that eth1 is the interface on the externally visible IP
  number. If any of the ipchains rule sets fail to install, a warning is
  issued and that interface is taken off line. The ``outside'' chain is
  set to deny all packets before the network service daemons are
  started, because the firewalling rules are not yet in place for the
  portmapped services. Once the portmapped services are firewalled, the
  ``outside'' chain is restored to its proper behaviour.



  8.2.  Configuring SSH1

  At the time of this writing, OpenSSH (v1.2pre17) doesn't offer one of
  the features I mention here, but OpenSSH is under very active
  development, and this could change at any time. The particular feature
  which is missing is a configuration setting which allows you to insert
  scp, ssh, and slogin as binaries named rcp, rsh, and rlogin, with
  transparent fall-through in the ssh client programs to the original
  rsh, rcp, or rlogin when the remote site isn't running sshd. Making an
  invocation of rsh run, instead, the ssh client program is, in my
  opinion, important for keeping the security easy to use and out of the
  way of the users. Everybody's scripts, rdist configurations, and so on
  will continue to work without modification if the remote site is
  running sshd, but data will be sent encrypted, with strong host
  authentication.


  Obtain ssh1 from the ssh web site <http://www.ssh.org/>, and compile
  it to replace the unencrypted r-programs (rsh, rlogin, and rcp).
  First, copy those three files to /usr/lib/rsh/, then configure the ssh
  package with:


        ./configure --with-rsh=/usr/lib/rsh/rsh --program-transform-name='s/^s/r/' --prefix=/usr



  Install the binaries, and configure according to the directions. On
  the private network gateway machine, make sure that the sshd configu-
  ration has the following entries defined:


       ListenAddress 192.168.1.1       # fred's internal IP
       IgnoreRhosts no
       X11Forwarding yes
       X11DisplayOffset 10
       RhostsAuthentication no
       RhostsRSAAuthentication yes
       RSAAuthentication yes
       PasswordAuthentication yes



  You will have to do further configuration of other entries in the
  /etc/sshd_config file, but try not to change these fields. Once you
  have all of the entries in the file set to your satisfaction, copy
  this entire file into a new file, /etc/sshd_config.ext, for the exter-
  nal network. Change two fields in the new file: the ``ListenAddress''
  should be changed to the private network gateway's external IP number
  (10.1.1.9 in our fred.example.com case), and ``PasswordAuthentica-
  tion'' should be set to ``no'' in /etc/sshd_config.ext. In your net-
  work services startup script, start sshd twice, once with


       /usr/sbin/sshd



  and once with


       /usr/sbin/sshd -f /etc/sshd_config.ext



  This will create two running sshd daemons. The one operating on the
  internal interface will allow logins with passwords, but the external
  interface will require an RSA key validation before anybody can log
  on.


  Next, turn off incoming telnet and shell services in the inetd
  configuration file (note that the firewall configuration listed in
  section ``Configuring Your Firewall'' already prevents access from
  outside, but it's best to defend in depth, don't rely on everything
  working correctly).


  People who want to be able to log in from home, or from out of town,
  will need an RSA key. Make sure they know how to do this, so they
  don't spend their energies trying to figure out another way to do it,
  like running a telnetd on an unprivileged port on your firewall
  machine.


  An RSA key is generated by the command:


       ssh-keygen -b 1024 -f new_rsa_key


  You will be prompted for a pass phrase. This should not be blank. A
  person with access to the file new_rsa_key, and knowledge of the pass
  phrase, has everything necessary to pass an RSA authentication chal-
  lenge. The pass phrase can be an ``unguessable'' password, or a long
  sentence, but make it something non-trivial. The file new_rsa_key can
  be copied to a floppy disk, or onto a laptop, and, along with the pass
  phrase, can be used to log into accounts which are set to grant access
  to that particular RSA key.


  To configure an account to allow access by a particular RSA key,
  simply create a $HOME/.ssh/ directory for that user on the private
  network gateway machine (i.e. the machine which will be receiving the
  login attempt), and copy the file new_rsa_key.pub which was created by
  the "ssh-keygen" command into the file $HOME/.ssh/authorized_keys. See
  the section ``AUTHORIZED_KEYS FILE FORMAT'' in the sshd man page for
  details on other options you can add to the key, such as requiring the
  login to come from a certain IP or host name, or authorizing the key
  only to permit the remote invocation of certain commands (for
  instance, an RSA key which commands a backup to take place, or
  commands a status report to be emailed somewhere off site).


  Only one thing remains to make the RSA key mechanism as gentle as
  possible to the users. If a user is forced to enter the pass phrase
  more than once or twice in a session, they are likely to become bored
  and take security matters into their own hands. Under Linux, arrange
  their login shell to be invoked under ssh-agent. For instance, if the
  company laptop used on business trips runs xdm, and drops users into
  an X session, go into the /var/X11R6/lib/xdm/Xsession_0 file and
  change the lines which invoke the startup, which are probably of the
  form:


       exec "$startup"



  into lines of the form:


       exec ssh-agent "$startup"



  In my xdm setup, there are three such lines which should be altered in
  that one file. Now, when the user logs onto the laptop, he enters the
  command


       ssh-add new_rsa_key



  at any prompt, enters the pass phrase when prompted, and all windows
  will have pass phrase-free access to the account on the private net-
  work gateway until the user logs off his X session on the laptop.


  Run sshd on all of the machines on your private network, as well as on
  any exposed hosts. For machines other than the private network gateway
  machine, the ListenAddress entry in /etc/sshd_config can be set to
  ``0.0.0.0''.  You should set up the host keys with the command:
       ssh-keygen -b 1024 -f /etc/ssh_host_key -N ""



  then run make-ssh-known-hosts and distribute the /etc/ssh_known_hosts
  file among all of the machines on the private and public networks.


  Disable incoming telnet and the unencrypted r-services. Don't delete
  the telnet binary, it's useful for things other than simple telnet
  sessions on port 23. You should allow password authentication on the
  private network, and disable it on the exposed machines, requiring an
  RSA key to log onto the exposed hosts.


  It is convenient for the users if the hosts on the private network are
  mentioned in each other's /etc/hosts.equiv files. The sshd daemons
  will respect those, and allow people to rlogin and rsh between
  machines without passwords or pass phrases. On every connection, the
  machines will be verifying each other's identities with host-level RSA
  keys.


  One difficulty arises when a user logged onto a machine on the private
  network wants to log onto a box on an exposed IP number. You can't use
  /etc/hosts.equiv or $HOME/.shosts to allow password-less validation,
  because the user is coming from a machine whose IP number cannot be
  determined - it will appear to be coming from the masquerading
  firewall machine, but the host keys won't match. There are two
  solutions to this. First, if you insist on using the /etc/hosts.equiv
  or $HOME/.shosts methods, the user will have to log onto the private
  network gateway machine (fred.example.com in our example here), and
  then log through to the exposed machine from there. The other
  technique is to use RSA key authentication, that always works
  regardless of what games are going on with IP numbers and host name
  lookups.



  8.3.  Configuring X

  In the user's continuing quest to prove that he values convenience
  over security, it has become common for people to put


       xhost +



  commands right into their X initialization scripts. This grants X
  server access to everybody in the world. Now the random outsider can
  change your root window graphic to something embarrassing while your
  boss is showing his mother around your office. Alternately, this out-
  sider can quietly monitor every keystroke you issue, and dump the con-
  tents of your screen to his desktop. Needless to say, this doesn't
  bode well for passwords used to log into other sites, or for sensitive
  documents being edited on screen. The xhost protocol itself is inher-
  ently limited, as it is not possible to grant permissions to use the
  screen on a user basis, only on a machine basis.


  Enter xauth authentication. If you have xdm you probably already are
  running xauth authentication, but xhost still works, and might still
  be what people are using to run X processes between machines. Once
  again, the goal is to make the security easy enough to use that the
  users aren't tempted to run the xhost command anymore.


  The sshd setup described in section ``Configuring SSH1'', with the
  ``X11Forwarding'' flag set, is actually simpler to use than the xhost
  technique. Once you have logged into your terminal, you can simply
  rlogin to a remote machine, and run netscape, xv, or whatever you
  like, without having to set the $DISPLAY variable name or allow
  explicit permissions. During ssh login, it configures the system in a
  way transparent to the end user, and even encrypts all of your X
  packets before they go over the network.


  If you are unable to use the sshd X11 forwarding for some reason, you
  should use xauth when you want to authorize other machines to have
  access to your X server. Document this for the users, or create
  specialized shell scripts to help them out. The relevant command to
  authorize a particular login, ``jpublic'', on machine ``barney'' to
  have access to your X server is:



       /usr/X11/bin/xauth extract - $DISPLAY | rsh -l jpublic barney /usr/X11/bin/xauth merge -



  I'd be tempted to delete xhost from your machines entirely. If it
  causes problems with any programs, you will at least know that those
  programs had poorly-designed security. It's simple enough to build a
  shell script as a drop-in replacement for xhost which uses the xauth
  sequence listed above.


  Note that if rsh is not the encrypting ssh program, the xauth key is
  sent plaintext. Anybody who holds the plaintext of the key can access
  your server, so you do not gain much security if you don't use ssh for
  these transactions. Note, also, that if the users' home directories
  are exported via NFS (the Network File System), the xauth key is
  available in plaintext to anybody able to snoop those NFS packets,
  regardless of whether you're running ssh on your systems.



  8.4.  Configuring Disk Sharing

  With email coming to a central machine, the read/send from any host
  setup described here is very convenient, but some care has to be taken
  to protect against trivial snooping by bored local users. NFS without
  AUTH_DES implemented is inherently insecure. NFS relies on the client
  machine to authenticate access, there is no password verification on
  the server to make sure that the client should be permitted to access
  the private files of a particular user. A Windows box can be
  configured to read NFS-exported volumes as any numeric uid, completely
  bypassing UNIX file permissions.  Consequently, NFS exports should
  only be made to machines which are always Linux (or UNIX) boxes under
  your direct control, and never ones which can be dual-booted into
  Windows.  If you want to export the mail spool directory, or any other
  directory, to machines which can sometimes be used as Windows boxes,
  export them with samba, setting the authentication mode to
  ``security=USER''. Connecting the machines on your network with a
  switch rather than a hub will also help, as it leaves very little of
  interest for sniffers on Windows machines. Ultimately, though, it's
  very difficult to secure any disk sharing over the network at the time
  of this writing.


  Why bother, if you can't really secure the network disks? Mostly it's
  an issue of credible defense. If you leave a sheet of paper on your
  desk with confidential information, and somebody in the office reads
  it, he can argue that he didn't realize what the paper was, his
  natural curiosity just got the better of him when he saw it sitting on
  the desk. If the sheet of paper were in a filing cabinet or desk
  drawer, it's an entirely different story. The purpose of taking some
  basic network security measures internally is to ensure that nobody
  ``accidentally'' compromises security.



  9.  Acknowledgements

  This document was written as internal documentation for the DYNACAN
  project, as part of the project's continuing development under the
  control of the Ministry of Human Resources Development Canada.


  This document has benefited considerably from the suggestions of

  o  Rod Smith (rodsmith@rodsbooks.com <mailto:rodsmith@rodsbooks.com>),
     who suggested I provide details on registering a domain name and on
     setting up with a dynamic IP, and pointed me at the various dynamic
     IP hosting services and at Granite Canyon.

  o  Greg Leblanc (gleblanc@my-deja.com <gleblanc@my-deja.com>) for
     useful suggestions on improving the clarity of the document.

  o  Sami Yousif (syousif@iname.com <mailto:syousif@iname.com>), who
     told me about www.dhs.org.



  10.  Glossary of Terms

  This is a list of the meanings of some of the words and acronyms used
  in this document.


     CGI Script
        A Common Gateway Interface Script. This is a program which is
        run on demand to generate the content of a web page. If a web
        page has to do more than simply feed an unchanging text and
        graphics display to the viewer, you will probably need some sort
        of dynamic content generation program such as a CGI Script.
        Examples include discussion boards, feedback forms, e-commerce
        shopping carts, and more.

     DHCP
        Dynamic Host Configuration Protocol. A standard, defined in RFC
        1531, for computers on a TCP/IP network to request from a
        central server information such as the IP number they should be
        using, the netmask, the gateway, etc. Rather than an
        administrator entering this information into the machine
        configuration, the machine simply requests it from the server as
        it is preparing to attach to the network.

     DNS
        Domain Name Service. A standard for translating domain names
        into ``IP Number''s, or vice versa, by looking up data in
        centralized databases.

     DSL
        Digital Subscriber Line. A relatively high speed network
        connection, usually delivered through specialized telephone
        wiring.

     Dynamic IP Number
        An ``IP Number'' which is assigned periodically or on a per-
        session basis. No guarantee is made that the number will remain
        constant. A dynamic IP number might change only when your
        network connection hangs up and reconnects, or it might change
        periodically under ``DHCP'' negotiation. Certain session-based
        services such as telnet and ssh will stop working if the IP
        number of either end of the connection is changed during the
        session.

     Forward DNS Query
        A ``DNS'' query which converts a domain name into an ``IP
        Number''.

     FTP
        The File Transfer Protocol. A standard system for sending files
        between machines over the Internet.

     ftpd
        The daemon responsible for providing ``FTP'' services on a host.
        It responds to queries initiated by a remote client.

     Internet Service Provider
        See ``ISP''.

     IP See ``IP Number''.

     IP Number
        The ``address'' of a certain network interface. Under the
        current addressing standard, called ipv4, this number consists
        of four 8-bit values, generally written as base-10 numbers
        separated by dots. Communication between computers on the
        Internet is based on packets of information sent between IP
        numbers.

     ISP
        Internet Service Provider. The company which provides your
        network connectivity, including connection hardware, service
        hosting, and leasing out the IP numbers under their control.

     Masquerading
        A form of filtering in which packets from one machine to the
        outside world have their headers rewritten so that they appear
        to come from an intermediate machine. That intermediate machine
        then passes responses back to the originating machine. The net
        effect is that an entire network of machines can appear to use a
        single IP number, that of the masquerading host, for the purpose
        of outgoing connections.

     named
        The name server daemon. This is the daemon which answers ``DNS''
        queries, and is distributed as part of the BIND package.

     Network Time Protocol
        See ``NTP''.

     NTP
        Network Time Protocol. A standard for synchronizing your system
        clock with the ``true time'', defined as the average of many
        high-accuracy clocks around the world.

     OS Operating system. Linux, Windows, FreeBSD, BeOS, HP-UX, etc.

     PHB
        Pointy-Haired Boss
        <http://www.unitedmedia.com/comics/dilbert/about/html/boss.html>.
        A creation of Scott Adams, of Dilbert fame.

     Provider
        See ``ISP''.

     Reverse DNS Query
        A ``DNS'' query which converts a ``IP Number'' into a domain
        name.

     Router
        A specialized hardware device which implements rules for where
        to send packets based on their ``IP Number''s, and which bridges
        between your Ethernet hardware and whatever communications
        medium connects you to your ``ISP''.

     ssh
        The secure shell. A cryptographically strong replacement for
        rlogin, telnet, ftp, and other programs.  Protects against
        ``spoofing'', man in the middle attacks, and packet sniffing.

     Static IP Number
        An ``IP Number'' which has been assigned or leased to you
        permanently. Barring revocation of the agreement which granted
        you this number, that IP number will always be available for
        your use, and no other machine on the Internet is allowed to use
        that number. Contrast this with ``Dynamic IP Number''s.



  Linux Security HOWTO
  Kevin Fenzi, kevin@tummy.com & Dave Wreski, dave@linuxsecu-
  rity.com
  v1.1.1, 17 March 2000

  This document is a general overview of security issues that face the
  administrator of Linux systems. It covers general security philosophy
  and a number of specific examples of how to better secure your Linux
  system from intruders. Also included are pointers to security-related
  material and programs. Improvements, constructive criticism, additions
  and corrections are gratefully accepted. Please mail your feedback to
  both authors, with "Security HOWTO" in the subject.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 New Versions of this Document
     1.2 Feedback
     1.3 Disclaimer
     1.4 Copyright Information

  2. Overview

     2.1 Why Do We Need Security?
     2.2 How Secure Is Secure?
     2.3 What Are You Trying to Protect?
     2.4 Developing A Security Policy
     2.5 Means of Securing Your Site
        2.5.1 Host Security
        2.5.2 Local Network Security
        2.5.3 Security Through Obscurity
     2.6 Organization of This Document

  3. Physical Security

     3.1 Computer locks
     3.2 BIOS Security
     3.3 Boot Loader Security
     3.4 xlock and vlock
     3.5 Detecting Physical Security Compromises

  4. Local Security

     4.1 Creating New Accounts
     4.2 Root Security

  5. Files and Filesystem Security

     5.1 Umask Settings
     5.2 File Permissions
     5.3 Integrity Checking
     5.4 Trojan Horses

  6. Password Security and Encryption

     6.1 PGP and Public-Key Cryptography
     6.2 SSL, S-HTTP, HTTPS and S/MIME
     6.3 Linux IPSEC Implementations
     6.4 (TT
     6.5 PAM - Pluggable Authentication Modules
     6.6 Cryptographic IP Encapsulation (CIPE)
     6.7 Kerberos
     6.8 Shadow Passwords.
     6.9 "Crack" and "John the Ripper"
     6.10 CFS - Cryptographic File System and TCFS - Transparent Cryptographic File System
     6.11 X11, SVGA and display security
        6.11.1 X11
        6.11.2 SVGA
        6.11.3 GGI (Generic Graphics Interface project)

  7. Kernel Security

     7.1 2.0 Kernel Compile Options
     7.2 2.2 Kernel Compile Options
     7.3 Kernel Devices

  8. Network Security

     8.1 Packet Sniffers
     8.2 System services and tcp_wrappers
     8.3 Verify Your DNS Information
     8.4 (TT
     8.5 SATAN, ISS, and Other Network Scanners
        8.5.1 Detecting Port Scans
     8.6 (TT
     8.7 Denial of Service Attacks
     8.8 NFS (Network File System) Security.
     8.9 NIS (Network Information Service) (formerly YP).
     8.10 Firewalls
     8.11 IP Chains - Linux Kernel 2.2.x Firewalling
     8.12 VPNs - Virtual Private Networks

  9. Security Preparation (before you go on-line)

     9.1 Make a Full Backup of Your Machine
     9.2 Choosing a Good Backup Schedule
     9.3 Backup Your RPM or Debian File Database
     9.4 Keep Track of Your System Accounting Data
     9.5 Apply All New System Updates.

  10. What To Do During and After a Breakin

     10.1 Security Compromise Underway.
     10.2 Security Compromise has already happened
        10.2.1 Closing the Hole
        10.2.2 Assessing the Damage
        10.2.3 Backups, Backups, Backups!
        10.2.4 Tracking Down the Intruder.

  11. Security Sources

     11.1 FTP Sites
     11.2 Web Sites
     11.3 Mailing Lists
     11.4 Books - Printed Reading Material

  12. Glossary

  13. Frequently Asked Questions

  14. Conclusion

  15. Acknowledgements



  ______________________________________________________________________



  1.  Introduction

  This document covers some of the main issues that affect Linux
  security. General philosophy and net-born resources are discussed.

  A number of other HOWTO documents overlap with security issues, and
  those documents have been pointed to wherever appropriate.

  This document is not meant to be a up-to-date exploits document. Large
  numbers of new exploits happen all the time. This document will tell
  you where to look for such up-to-date information, and will give some
  general methods to prevent such exploits from taking place.



  1.1.  New Versions of this Document

  New versions of this document will be periodically posted to
  comp.os.linux.answers.  They will also be added to the various sites
  that archive such information, including:

  http://www.linuxdoc.org/

  In addition, you should generally be able to find this document on the
  Linux World Wide Web home page via:

  http://metalab.unc.edu/mdw/linux.html

  Finally, the very latest version of this document should also be
  available in various formats from:

  http://scrye.com/~kevin/lsh/

  or

  http://www.linuxsecurity.com/Security-HOWTO

  or

  http://www.tummy.com/security-howto



  1.2.  Feedback

  All comments, error reports, additional information and criticism of
  all sorts should be directed to:

  kevin@tummy.com

  and

  dave@linuxsecurity.com

  Note: Please send your feedback to both authors. Also, be sure and
  include "Linux" "security", or "HOWTO" in your subject to avoid
  Kevin's spam filter.


  1.3.  Disclaimer

  No liability for the contents of this document can be accepted.  Use
  the concepts, examples and other content at your own risk.
  Additionally, this is an early version, possibly with many
  inaccuracies or errors.

  A number of the examples and descriptions use the RedHat(tm) package
  layout and system setup. Your mileage may vary.

  As far as we know, only programs that, under certain terms may be used
  or evaluated for personal purposes will be described. Most of the
  programs will be available, complete with source, under GNU
  <http://www.gnu.org/copyleft/gpl.html> terms.


  1.4.  Copyright Information

  This document is copyrighted (c)1998-2000 Kevin Fenzi and Dave Wreski,
  and distributed under the following terms:


  o  Linux HOWTO documents may be reproduced and distributed in whole or
     in part, in any medium, physical or electronic, as long as this
     copyright notice is retained on all copies. Commercial
     redistribution is allowed and encouraged; however, the authors
     would like to be notified of any such distributions.

  o  All translations, derivative works, or aggregate works
     incorporating any Linux HOWTO documents must be covered under this
     copyright notice.  That is, you may not produce a derivative work
     from a HOWTO and impose additional restrictions on its
     distribution. Exceptions to these rules may be granted under
     certain conditions; please contact the Linux HOWTO coordinator at
     the address given below.

  o  If you have questions, please contact Tim Bynum, the Linux HOWTO
     coordinator, at

  tjbynum@metalab.unc.edu


  2.  Overview

  This document will attempt to explain some procedures and commonly-
  used software to help your Linux system be more secure.  It is
  important to discuss some of the basic concepts first, and create a
  security foundation, before we get started.

  2.1.  Why Do We Need Security?

  In the ever-changing world of global data communications, inexpensive
  Internet connections, and fast-paced software development, security is
  becoming more and more of an issue.  Security is now a basic
  requirement because global computing is inherently insecure.  As your
  data goes from point A to point B on the Internet, for example, it may
  pass through several other points along the way, giving other users
  the opportunity to intercept, and even alter, it.  Even other users on
  your system may maliciously transform your data into something you did
  not intend.  Unauthorized access to your system may be obtained by
  intruders, also known as "crackers", who then use advanced knowledge
  to impersonate you, steal information from you, or even deny you
  access to your own resources.  If you're wondering what the difference
  is between a "Hacker" and a "Cracker", see Eric Raymond's document,
  "How to Become A Hacker", available at
  http://www.netaxs.com/~esr/faqs/hacker-howto.html.


  2.2.  How Secure Is Secure?

  First, keep in mind that no computer system can ever be completely
  secure. All you can do is make it increasingly difficult for someone
  to compromise your system. For the average home Linux user, not much
  is required to keep the casual cracker at bay. However, for high-
  profile Linux users (banks, telecommunications companies, etc), much
  more work is required.

  Another factor to take into account is that the more secure your
  system is, the more intrusive your security becomes. You need to
  decide where in this balancing act your system will still usable, and
  yet secure for your purposes. For instance, you could require everyone
  dialing into your system to use a call-back modem to call them back at
  their home number. This is more secure, but if someone is not at home,
  it makes it difficult for them to login. You could also setup your
  Linux system with no network or connection to the Internet, but this
  limits its usefulness.


  If you are a medium to large-sized site, you should establish a
  security policy stating how much security is required by your site and
  what auditing is in place to check it. You can find a well-known
  security policy example at http://www.faqs.org/rfcs/rfc2196.html.  It
  has been recently updated, and contains a great framework for
  establishing a security policy for your company.



  2.3.  What Are You Trying to Protect?

  Before you attempt to secure your system, you should determine what
  level of threat you have to protect against, what risks you should or
  should not take, and how vulnerable your system is as a result.  You
  should analyze your system to know what you're protecting, why you're
  protecting it, what value it has, and who has responsibility for your
  data and other assets.


  o  Risk is the possibility that an intruder may be successful in
     attempting to access your computer.  Can an intruder read or write
     files, or execute programs that could cause damage?  Can they
     delete critical data? Can they prevent you or your company from
     getting important work done? Don't forget: someone gaining access
     to your account, or your system, can also impersonate you.

     Additionally, having one insecure account on your system can result
     in your entire network being compromised.  If you allow a single
     user to login using a .rhosts file, or to use an insecure service
     such as tftp, you risk an intruder getting 'his foot in the door'.
     Once the intruder has a user account on your system, or someone
     else's system, it can be used to gain access to another system, or
     another account.


  o  Threat is typically from someone with motivation to gain
     unauthorized access to your network or computer.  You must decide
     whom you trust to have access to your system, and what threat they
     could pose.

     There are several types of intruders, and it is useful to keep
     their different characteristics in mind as you are securing your
     systems.


  o  The Curious - This type of intruder is basically interested in
     finding out what type of system and data you have.

  o  The Malicious - This type of intruder is out to either bring down
     your systems, or deface your web page, or otherwise force you to
     spend time and money recovering from the damage he has caused.

  o  The High-Profile Intruder - This type of intruder is trying to use
     your system to gain popularity and infamy.  He might use your high-
     profile system to advertise his abilities.

  o  The Competition - This type of intruder is interested in what data
     you have on your system.  It might be someone who thinks you have
     something that could benefit him, financially or otherwise.

  o  The Borrowers - This type of intruder is interested in setting up
     shop on your system and using its resources for their own purposes.
     He typically will run chat or irc servers, porn archive sites, or
     even DNS servers.


  o  The Leapfrogger - This type of intruder is only interested in your
     system to use it to get into other systems. If your system is well-
     connected or a gateway to a number of internal hosts, you may well
     see this type trying to compromise your system.


  o  Vulnerability describes how well-protected your computer is from
     another network, and the potential for someone to gain unauthorized
     access.

     What's at stake if someone breaks into your system?  Of course the
     concerns of a dynamic PPP home user will be different from those of
     a company connecting their machine to the Internet, or another
     large network.

     How much time would it take to retrieve/recreate any data that was
     lost?  An initial time investment now can save ten times more time
     later if you have to recreate data that was lost.  Have you checked
     your backup strategy, and verified your data lately?


  2.4.  Developing A Security Policy

  Create a simple, generic policy for your system that your users can
  readily understand and follow.  It should protect the data you're
  safeguarding as well as the privacy of the users.  Some things to
  consider adding are: who has access to the system (Can my friend use
  my account?), who's allowed to install software on the system, who
  owns what data, disaster recovery, and appropriate use of the system.

  A generally-accepted security policy starts with the phrase


                    That which is not permitted is prohibited


  This means that unless you grant access to a service for a user, that
  user shouldn't be using that service until you do grant access. Make
  sure the policies work on your regular user account. Saying, "Ah, I
  can't figure out this permissions problem, I'll just do it as root"
  can lead to security holes that are very obvious, and even ones that
  haven't been exploited yet.

  rfc1244 is a document that describes how to create your own network
  security policy.

  rfc1281 is a document that shows an example security policy with
  detailed descriptions of each step.

  Finally, you might want to look at the COAST policy archive at
  ftp://coast.cs.purdue.edu/pub/doc/policy to see what some real-life
  security policies look like.


  2.5.  Means of Securing Your Site

  This document will discuss various means with which you can secure the
  assets you have worked hard for: your local machine, your data, your
  users, your network, even your reputation.  What would happen to your
  reputation if an intruder deleted some of your users' data?  Or
  defaced your web site?  Or published your company's corporate project
  plan for next quarter?  If you are planning a network installation,
  there are many factors you must take into account before adding a
  single machine to your network.


  Even if you have a single dialup PPP account, or just a small site,
  this does not mean intruders won't be interested in your systems.
  Large, high-profile sites are not the only targets -- many intruders
  simply want to exploit as many sites as possible, regardless of their
  size. Additionally, they may use a security hole in your site to gain
  access to other sites you're connected to.

  Intruders have a lot of time on their hands, and can avoid guessing
  how you've obscured your system just by trying all the possibilities.
  There are also a number of reasons an intruder may be interested in
  your systems, which we will discuss later.



  2.5.1.  Host Security

  Perhaps the area of security on which administrators concentrate most
  is host-based security.  This typically involves making sure your own
  system is secure, and hoping everyone else on your network does the
  same.  Choosing good passwords, securing your host's local network
  services, keeping good accounting records, and upgrading programs with
  known security exploits are among the things the local security
  administrator is responsible for doing.  Although this is absolutely
  necessary, it can become a daunting task once your network becomes
  larger than a few machines.


  2.5.2.  Local Network Security

  Network security is as necessary as local host security.  With
  hundreds, thousands, or more computers on the same network, you can't
  rely on each one of those systems being secure.  Ensuring that only
  authorized users can use your network, building firewalls, using
  strong encryption, and ensuring there are no "rogue" (that is,
  unsecured) machines on your network are all part of the network
  security administrator's duties.

  This document will discuss some of the techniques used to secure your
  site, and hopefully show you some of the ways to prevent an intruder
  from gaining access to what you are trying to protect.


  2.5.3.  Security Through Obscurity


  One type of security that must be discussed is "security through
  obscurity". This means, for example, moving a service that has known
  security vunerabilities to a non-standard port in hopes that attackers
  won't notice it's there and thus won't exploit it. Rest assured that
  they can determine that it's there and will exploit it. Security
  through obscurity is no security at all. Simply because you may have a
  small site, or a relatively low profile, does not mean an intruder
  won't be interested in what you have.  We'll discuss what you're
  protecting in the next sections.


  2.6.  Organization of This Document

  This document has been divided into a number of sections. They cover
  several broad security issues. The first, ``Physical Security'',
  covers how you need to protect your physical machine from tampering.
  The second, ``Local Security'', describes how to protect your system
  from tampering by local users. The third, ``Files and Filesystem
  Security'', shows you how to setup your filesystems and permissions on
  your files. The next, ``Password Security  and Encryption'', discusses
  how to use encryption to better secure your machine and network.
  ``Kernel Security'' discusses what kernel options you should set or be
  aware of for a more secure system.  ``Network Security'', describes
  how to better secure your Linux system from network attacks.
  ``Security Preparation'', discusses how to prepare your machine(s)
  before bringing them on-line. Next, ``What To Do During and After a
  Break-in'', discusses what to do when you detect a system compromise
  in progress or detect one that has recently happened. In ``Security
  Resources'', some primary security resources are enumerated.  The Q
  and A section ``Frequently Asked Questions'', answers some frequently-
  asked questions, and finally a conclusion in ``Conclusion''.

  The two main points to realize when reading this document are:


  o  Be aware of your system. Check system logs such as
     /var/log/messages and keep an eye on your system, and

  o  Keep your system up-to-date by making sure you have installed the
     current versions of software and have upgraded per security alerts.
     Just doing this will help make your system markedly more secure.


  3.  Physical Security

  The first layer of security you need to take into account is the
  physical security of your computer systems. Who has direct physical
  access to your machine? Should they? Can you protect your machine from
  their tampering? Should you?

  How much physical security you need on your system is very dependent
  on your situation, and/or budget.

  If you are a home user, you probably don't need a lot (although you
  might need to protect your machine from tampering by children or
  annoying relatives).  If you are in a lab, you need considerably more,
  but users will still need to be able to get work done on the machines.
  Many of the following sections will help out. If you are in an office,
  you may or may not need to secure your machine off-hours or while you
  are away. At some companies, leaving your console unsecured is a
  termination offense.

  Obvious physical security methods such as locks on doors, cables,
  locked cabinets, and video surveillance are all good ideas, but beyond
  the scope of this document. :)


  3.1.  Computer locks

  Many modern PC cases include a "locking" feature. Usually this will be
  a socket on the front of the case that allows you to turn an included
  key to a locked or unlocked position. Case locks can help prevent
  someone from stealing your PC, or opening up the case and directly
  manipulating/stealing your hardware. They can also sometimes prevent
  someone from rebooting your computer from their own floppy or other
  hardware.

  These case locks do different things according to the support in the
  motherboard and how the case is constructed. On many PC's they make it
  so you have to break the case to get the case open. On some others,
  they will not let you plug in new keyboards or mice. Check your
  motherboard or case instructions for more information. This can
  sometimes be a very useful feature, even though the locks are usually
  very low-quality and can easily be defeated by attackers with
  locksmithing.


  Some machines (most notably SPARCs and macs) have a dongle on the back
  that, if you put a cable through, attackers would have to cut the
  cable or break the case to get into it. Just putting a padlock or
  combo lock through these can be a good deterrent to someone stealing
  your machine.



  3.2.  BIOS Security

  The BIOS is the lowest level of software that configures or
  manipulates your x86-based hardware. LILO and other Linux boot methods
  access the BIOS to determine how to boot up your Linux machine. Other
  hardware that Linux runs on has similar software (OpenFirmware on Macs
  and new Suns, Sun boot PROM, etc...). You can use your BIOS to prevent
  attackers from rebooting your machine and manipulating your Linux
  system.

  Many PC BIOSs let you set a boot password. This doesn't provide all
  that much security (the BIOS can be reset, or removed if someone can
  get into the case), but might be a good deterrent (i.e. it will take
  time and leave traces of tampering). Similarly, on S/Linux (Linux for
  SPARC(tm) processor machines), your EEPROM can be set to require a
  boot-up password. This might slow attackers down.

  Many x86 BIOSs also allow you to specify various other good security
  settings. Check your BIOS manual or look at it the next time you boot
  up. For example, some BIOSs disallow booting from floppy drives and
  some require passwords to access some BIOS features.

  Note: If you have a server machine, and you set up a boot password,
  your machine will not boot up unattended. Keep in mind that you will
  need to come in and supply the password in the event of a power
  failure. ;(


  3.3.  Boot Loader Security

  The various Linux boot loaders also can have a boot password set.
  LILO, for example, has password and restricted settings; password
  requires password at boot time, whereas restricted requires a boot-
  time password only if you specify options (such as single) at the LILO
  prompt.

  From the lilo.conf man page:


       password=password
                     The per-image option `password=...' (see below) applies to all images.

       restricted
                     The per-image option `restricted' (see below) applies to all images.

              password=password
                     Protect the image by a password.

              restricted
                     A password is only required to boot the image if
                     parameters are specified  on  the  command  line
                     (e.g. single).



  Keep in mind when setting all these passwords that you need to
  remember them. :) Also remember that these passwords will merely slow
  the determined attacker.  They won't prevent someone from booting from
  a floppy, and mounting your root partition.  If you are using security
  in conjunction with a boot loader, you might as well disable booting
  from a floppy in your computer's BIOS, and password-protect the BIOS.

  If anyone has security-related information from a different boot
  loader, we would love to hear it. (grub, silo, milo, linload, etc).

  Note: If you have a server machine, and you set up a boot password,
  your machine will not boot up unattended. Keep in mind that you will
  need to come in and supply the password in the event of a power
  failure. ;(


  3.4.  xlock and vlock

  If you wander away from your machine from time to time, it is nice to
  be able to "lock" your console so that no one can tamper with, or look
  at, your work. Two programs that do this are: xlock and vlock.

  xlock is a X display locker. It should be included in any Linux
  distributions that support X. Check out the man page for it for more
  options, but in general you can run xlock from any xterm on your
  console and it will lock the display and require your password to
  unlock.

  vlock is a simple little program that allows you to lock some or all
  of the virtual consoles on your Linux box. You can lock just the one
  you are working in or all of them. If you just lock one, others can
  come in and use the console; they will just not be able to use your
  virtual console until you unlock it. vlock ships with redhat Linux,
  but your mileage may vary.

  Of course locking your console will prevent someone from tampering
  with your work, but won't prevent them from rebooting your machine or
  otherwise disrupting your work. It also does not prevent them from
  accessing your machine from another machine on the network and causing
  problems.

  More importantly, it does not prevent someone from switching out of
  the X Window System entirely, and going to a normal virtual console
  login prompt, or to the VC that X11 was started from, and suspending
  it, thus obtaining your privileges.  For this reason, you might
  consider only using it while under control of xdm.


  3.5.  Detecting Physical Security Compromises

  The first thing to always note is when your machine was rebooted.
  Since Linux is a robust and stable OS, the only times your machine
  should reboot is when you take it down for OS upgrades, hardware
  swapping, or the like. If your machine has rebooted without you doing
  it, that may be a sign that an intruder has compromised it. Many of
  the ways that your machine can be compromised require the intruder to
  reboot or power off your machine.

  Check for signs of tampering on the case and computer area. Although
  many intruders clean traces of their presence out of logs, it's a good
  idea to check through them all and note any discrepancy.

  It is also a good idea to store log data at a secure location, such as
  a dedicated log server within your well-protected network.  Once a
  machine has been compromised, log data becomes of little use as it
  most likely has also been modified by the intruder.


  The syslog daemon can be configured to automatically send log data to
  a central syslog server, but this is typically sent unencrypted,
  allowing an intruder to view data as it is being transferred.  This
  may reveal information about your network that is not intended to be
  public.  There are syslog daemons available that encrypt the data as
  it is being sent.

  Also be aware that faking syslog messages is easy -- with an exploit
  program having been published.  Syslog even accepts net log entries
  claiming to come from the local host without indicating their true
  origin.

  Some things to check for in your logs:

  o  Short or incomplete logs.

  o  Logs containing strange timestamps.

  o  Logs with incorrect permissions or ownership.

  o  Records of reboots or restarting of services.

  o  missing logs.

  o  su entries or logins from strange places.

  We will discuss system log data ``later'' in the HOWTO.


  4.  Local Security

  The next thing to take a look at is the security in your system
  against attacks from local users. Did we just say local users? Yes!

  Getting access to a local user account is one of the first things that
  system intruders attempt while on their way to exploiting the root
  account. With lax local security, they can then "upgrade" their normal
  user access to root access using a variety of bugs and poorly setup
  local services. If you make sure your local security is tight, then
  the intruder will have another hurdle to jump.

  Local users can also cause a lot of havoc with your system even
  (especially) if they really are who they say they are. Providing
  accounts to people you don't know or for whom you have no contact
  information is a very bad idea.


  4.1.  Creating New Accounts

  You should make sure you provide user accounts with only the minimal
  requirements for the task they need to do. If you provide your son
  (age 10) with an account, you might want him to only have access to a
  word processor or drawing program, but be unable to delete data that
  is not his.

  Several good rules of thumb when allowing other people legitimate
  access to your Linux machine:


  o  Give them the minimal amount of privileges they need.

  o  Be aware when/where they login from, or should be logging in from.

  o  Make sure you remove inactive accounts


  o  The use of the same userid on all computers and networks is
     advisable to ease account maintence, and permits easier analysis of
     log data.

  o  The creation of group userid's should be absolutely prohibited.
     User accounts also provide accountability, and this is not possible
     with group accounts.

  Many local user accounts that are used in security compromises have
  not been used in months or years. Since no one is using them they,
  provide the ideal attack vehicle.


  4.2.  Root Security

  The most sought-after account on your machine is the root (superuser)
  account.  This account has authority over the entire machine, which
  may also include authority over other machines on the network.
  Remember that you should only use the root account for very short,
  specific tasks, and should mostly run as a normal user. Even small
  mistakes made while logged in as the root user can cause problems. The
  less time you are on with root privileges, the safer you will be.

  Several tricks to avoid messing up your own box as root:

  o  When doing some complex command, try running it first in a non-
     destructive way...especially commands that use globbing: e.g., if
     you want to do rm foo*.bak, first do ls foo*.bak and make sure you
     are going to delete the files you think you are. Using echo in
     place of destructive commands also sometimes works.

  o  Provide your users with a default alias to the rm command to ask
     for confirmation for deletion of files.

  o   Only become root to do single specific tasks. If you find yourself
     trying to figure out how to do something, go back to a normal user
     shell until you are sure what needs to be done by root.

  o  The command path for the root user is very important.  The command
     path (that is, the PATH environment variable) specifies the
     directories in which the shell searches for programs.  Try to limit
     the command path for the root user as much as possible, and never
     include . (which means "the current directory") in your PATH.
     Additionally, never have writable directories in your search path,
     as this can allow attackers to modify or place new binaries in your
     search path, allowing them to run as root the next time you run
     that command.

  o  Never use the rlogin/rsh/rexec suite of tools (called the r-
     utilities) as root. They are subject to many sorts of attacks, and
     are downright dangerous when run as root. Never create a .rhosts
     file for root.

  o  The /etc/securetty file contains a list of terminals that root can
     login from. By default (on Red Hat Linux) this is set to only the
     local virtual consoles(vtys). Be very wary of adding anything else
     to this file. You should be able to login remotely as your regular
     user account and then su if you need to (hopefully over ``ssh'' or
     other encrypted channel), so there is no need to be able to login
     directly as root.

  o  Always be slow and deliberate running as root. Your actions could
     affect a lot of things. Think before you type!

  If you absolutely positively need to allow someone (hopefully very
  trusted) to have root access to your machine, there are a few tools
  that can help. sudo allows users to use their password to access a
  limited set of commands as root. This would allow you to, for
  instance, let a user be able to eject and mount removable media on
  your Linux box, but have no other root privileges. sudo also keeps a
  log of all successful and unsuccessful sudo attempts, allowing you to
  track down who used what command to do what. For this reason sudo
  works well even in places where a number of people have root access,
  because it helps you keep track of changes made.

  Although sudo can be used to give specific users specific privileges
  for specific tasks, it does have several shortcomings. It should be
  used only for a limited set of tasks, like restarting a server, or
  adding new users.  Any program that offers a shell escape will give
  root access to a user invoking it via sudo.  This includes most
  editors, for example.  Also, a program as innocuous as /bin/cat can be
  used to overwrite files, which could allow root to be exploited.
  Consider sudo as a means for accountability, and don't expect it to
  replace the root user and still be secure.


  5.  Files and Filesystem Security

  A few minutes of preparation and planning ahead before putting your
  systems online can help to protect them and the data stored on them.

  o  There should never be a reason for users' home directories to allow
     SUID/SGID programs to be run from there.  Use the nosuid option in
     /etc/fstab for partitions that are writable by others than root.
     You may also wish to use nodev and noexec on users' home
     partitions, as well as /var, thus prohibiting execution of
     programs, and creation of character or block devices, which should
     never be necessary anyway.

  o  If you are exporting filesystems using NFS, be sure to configure
     /etc/exports with the most restrictive access possible.  This means
     not using wildcards, not allowing root write access, and exporting
     read-only wherever possible.

  o  Configure your users' file-creation umask to be as restrictive as
     possible.  See ``umask settings''.

  o  If you are mounting filesystems using a network filesystem such as
     NFS, be sure to configure /etc/exports with suitable restrictions.
     Typically, using `nodev', `nosuid', and perhaps `noexec', are
     desirable.

  o  Set filesystem limits instead of allowing unlimited as is the
     default.  You can control the per-user limits using the resource-
     limits PAM module and /etc/pam.d/limits.conf.  For example, limits
     for group users might look like this:



                       @users     hard  core    0
                       @users     hard  nproc   50
                       @users     hard  rss     5000



  This says to prohibit the creation of core files, restrict the number
  of processes to 50, and restrict memory usage per user to 5M.


  o  The /var/log/wtmp and /var/run/utmp files contain the login records
     for all users on your system.  Their integrity must be maintained
     because they can be used to determine when and from where a user
     (or potential intruder) has entered your system.  These files
     should also have 644 permissions, without affecting normal system
     operation.


  o  The immutable bit can be used to prevent accidentally deleting or
     overwriting a file that must be protected.  It also prevents
     someone from creating a symbolic link to the file (such symbolic
     links have been the source of attacks involving deleting
     /etc/passwd or /etc/shadow).  See the chattr(1) man page for
     information on the immutable bit.


  o   SUID and SGID files on your system are a potential security risk,
     and should be monitored closely.  Because these programs grant
     special privileges to the user who is executing them, it is
     necessary to ensure that insecure programs are not installed.  A
     favorite trick of crackers is to exploit SUID-root programs, then
     leave a SUID program as a backdoor to get in the next time, even if
     the original hole is plugged.

     Find all SUID/SGID programs on your system, and keep track of what
     they are, so you are aware of any changes which could indicate a
     potential intruder.  Use the following command to find all
     SUID/SGID programs on your system:



                       root#  find / -type f \( -perm -04000 -o -perm -02000 \)



  The Debian distribution runs a job each night to determine what SUID
  files exist. It then compares this to the previous night's run. You
  can look in /var/log/setuid* for this log.

  You can remove the SUID or SGID permissions on a suspicious program
  with chmod, then restore them back if you absolutely feel it is
  necessary.


  o  World-writable files, particularly system files, can be a security
     hole if a cracker gains access to your system and modifies them.
     Additionally, world-writable directories are dangerous, since they
     allow a cracker to add or delete files as he wishes.  To locate all
     world-writable files on your system, use the following command:



                       root# find / -perm -2 ! -type l -ls



  and be sure you know why those files are writable.  In the normal
  course of operation, several files will be world-writable, including
  some from /dev, and symbolic links, thus the ! -type l which excludes
  these from the previous find command.

  o

     Unowned files may also be an indication an intruder has accessed
     your system.  You can locate files on your system that have no
     owner, or belong to no group with the command:
                       root# find / -nouser -o -nogroup -print



  o  Finding .rhosts files should be a part of your regular system
     administration duties, as these files should not be permitted on
     your system.  Remember, a cracker only needs one insecure account
     to potentially gain access to your entire network.  You can locate
     all .rhosts files on your system with the following command:


                      root# find /home -name .rhosts -print



  o

     Finally, before changing permissions on any system files, make sure
     you understand what you are doing. Never change permissions on a
     file because it seems like the easy way to get things working.
     Always determine why the file has that permission before changing
     it.


  5.1.  Umask Settings

  The umask command can be used to determine the default file creation
  mode on your system. It is the octal complement of the desired file
  mode. If files are created without any regard to their permissions
  settings, the user could inadvertently give read or write permission
  to someone that should not have this permission. Typical umask
  settings include 022, 027, and 077 (which is the most restrictive).
  Normally the umask is set in /etc/profile, so it applies to all users
  on the system.  The file creation mask can be calculated by
  subtracting the desired value from 777.  In other words, a umask of
  777 would cause newly-created files to contain no read, write or
  execute permission for anyone.  A mask of 666 would cause newly-
  created files to have a mask of 111.  For example, you may have a line
  that looks like this:



                       # Set the user's default umask
                       umask 033



  Be sure to make root's umask 077, which will disable read, write, and
  execute permission for other users, unless explicitly changed using
  chmod.  In this case, newly-created directories would have 744 permis-
  sions, obtained by subtracting 033 from 777.  Newly-created files
  using the 033 umask would have permissions of 644.

  If you are using Red Hat, and adhere to their user and group ID
  creation scheme (User Private Groups), it is only necessary to use 002
  for a umask.  This is due to the fact that the default configuration
  is one user per group.



  5.2.  File Permissions

  It's important to ensure that your system files are not open for
  casual editing by users and groups who shouldn't be doing such system
  maintenance.

  Unix separates access control on files and directories according to
  three characteristics:  owner, group, and other.  There is always
  exactly one owner, any number of members of the group, and everyone
  else.

  A quick explanation of Unix permissions:

  Ownership      - Which user(s) and group(s) retain(s) control of the
  permission settings of the node and parent of the node

  Permissions    - Bits capable of being set or reset to allow certain
  types of access to it.  Permissions for directories may have a
  different meaning than the same set of permissions on files.

  Read:

  o  To be able to view contents of a file

  o  To be able to read a directory

  Write:

  o  To be able to add to or change a file

  o  To be able to delete or move files in a directory

  Execute:

  o  To be able to run a binary program or shell script

  o  To be able to search in a directory, combined with read permission


     Save Text Attribute: (For directories)
        The "sticky bit" also has a different meaning when applied to
        directories than when applied to files.  If the sticky bit is
        set on a directory, then a user may only delete files that the
        he owns or for which he has explicit write permission granted,
        even when he has write access to the directory.  This is
        designed for directories like /tmp, which are world-writable,
        but where it may not be desirable to allow any user to delete
        files at will.  The sticky bit is seen as a t in a long
        directory listing.


     SUID Attribute: (For Files)
        This describes set-user-id permissions on the file.  When the
        set user ID access mode is set in the owner permissions, and the
        file is executable, processes which run it are granted access to
        system resources based on user who owns the file, as opposed to
        the user who created the process. This is the cause of many
        "buffer overflow" exploits.


     SGID Attribute: (For Files)
        If set in the group permissions, this bit controls the "set
        group id" status of a file.  This behaves the same way as SUID,
        except the group is affected instead.  The file must be
        executable for this to have any effect.

     SGID Attribute: (For directories)
        If you set the SGID bit on a directory (with chmod g+s
        directory), files created in that directory will have their
        group set to the directory's group.

  You          - The owner of the file

  Group        - The group you belong to

  Everyone     - Anyone on the system that is not the owner or a member
  of the group


  File Example:



               -rw-r--r--  1 kevin  users         114 Aug 28  1997 .zlogin
               1st bit - directory?             (no)
                2nd bit - read by owner?         (yes, by kevin)
                 3rd bit - write by owner?        (yes, by kevin)
                  4th bit - execute by owner?      (no)
                   5th bit - read by group?         (yes, by users)
                    6th bit - write by group?        (no)
                     7th bit - execute by group?      (no)
                      8th bit - read by everyone?      (yes, by everyone)
                       9th bit - write by everyone?     (no)
                        10th bit - execute by everyone?  (no)



  The following lines are examples of the minimum sets of permissions
  that are required to perform the access described.  You may want to
  give more permission than what's listed here, but this should describe
  what these minimum permissions on files do:



       -r--------  Allow read access to the file by owner
       --w-------  Allows the owner to modify or delete the file
                   (Note that anyone with write permission to the directory
                    the file is in can overwrite it and thus delete it)
       ---x------  The owner can execute this program, but not shell scripts,
                    which still need read permission
       ---s------  Will execute with effective User ID = to owner
       --------s-  Will execute with effective Group ID = to group
       -rw------T  No update of "last modified time".  Usually used for swap
                    files
       ---t------  No effect.  (formerly sticky bit)



  Directory Example:



          drwxr-xr-x  3 kevin  users         512 Sep 19 13:47 .public_html/
          1st bit - directory?             (yes, it contains many files)
           2nd bit - read by owner?         (yes, by kevin)
            3rd bit - write by owner?        (yes, by kevin)
             4th bit - execute by owner?      (yes, by kevin)
              5th bit - read by group?         (yes, by users
               6th bit - write by group?        (no)
                7th bit - execute by group?      (yes, by users)
                 8th bit - read by everyone?      (yes, by everyone)
                  9th bit - write by everyone?     (no)
                   10th bit - execute by everyone?  (yes, by everyone)



  The following lines are examples of the minimum sets of permissions
  that are required to perform the access described.  You may want to
  give more permission than what's listed, but this should describe what
  these minimum permissions on directories do:



       dr--------  The contents can be listed, but file attributes can't be read
       d--x------  The directory can be entered, and used in full execution
                    paths
       dr-x------  File attributes can be read by owner
       d-wx------  Files can be created/deleted, even if the directory
                    isn't the current one
       d------x-t  Prevents files from deletion by others with write
                    access. Used on /tmp
       d---s--s--  No effect



  System configuration files (usually in /etc) are usually mode 640
  (-rw-r-----), and owned by root. Depending on your site's security
  requirements, you might adjust this. Never leave any system files
  writable by a group or everyone.  Some configuration files, including
  /etc/shadow, should only be readable by root, and directories in /etc
  should at least not be accessible by others.


     SUID Shell Scripts
        SUID shell scripts are a serious security risk, and for this
        reason the kernel will not honor them.  Regardless of how secure
        you think the shell script is, it can be exploited to give the
        cracker a root shell.


  5.3.  Integrity Checking

  Another very good way to detect local (and also network) attacks on
  your system is to run an integrity checker like Tripwire, Aide or
  Osiris.  These integrety checkers run a number of checksums on all
  your important binaries and config files and compares them against a
  database of former, known-good values as a reference. Thus, any
  changes in the files will be flagged.

  It's a good idea to install these sorts of programs onto a floppy, and
  then physically set the write protect on the floppy. This way
  intruders can't tamper with the integrety checker itself or change the
  database. Once you have something like this setup, it's a good idea to
  run it as part of your normal security administration duties to see if
  anything has changed.
  You can even add a crontab entry to run the checker from your floppy
  every night and mail you the results in the morning. Something like:


                       # set mailto
                       MAILTO=kevin
                       # run Tripwire
                       15 05 * * * root /usr/local/adm/tcheck/tripwire



  will mail you a report each morning at 5:15am.

  Integrety checkers can be a godsend to detecting intruders before you
  would otherwise notice them. Since a lot of files change on the
  average system, you have to be careful what is cracker activity and
  what is your own doing.

  You can find the open sourced version of Tripwire at
  http://www.tripwire.org, free of charge.  Manuals and support can be
  purchased.

  Aide can be found at http://www.cs.tut.fi/~rammer/aide.html.

  Osiris can be found at http://www.shmoo.com/osiris/.


  5.4.  Trojan Horses

  "Trojan Horses" are named after the fabled ploy in Homer's "Iliad".
  The idea is that a cracker distributes a program or binary that sounds
  great, and encourages other people to download it and run it as root.
  Then the program can compromise their system while they are not paying
  attention. While they think the binary they just pulled down does one
  thing (and it might very well), it also compromises their security.

  You should take care of what programs you install on your machine.
  Redhat provides MD5 checksums and PGP signatures on it's RPM files so
  you can verify you are installing the real thing. Other distributions
  have similar methods. You should never run any unfamiliar binary, for
  which you don't have the source, as root! Few attackers are willing to
  release source code to public scrutiny.

  Although it can be complex, make sure you are getting the source for a
  program from its real distribution site. If the program is going to
  run as root, make sure either you or someone you trust has looked over
  the source and verified it.


  6.  Password Security and Encryption

  One of the most important security features used today are passwords.
  It is important for both you and all your users to have secure,
  unguessable passwords. Most of the more recent Linux distributions
  include passwd programs that do not allow you to set a easily
  guessable password. Make sure your passwd program is up to date and
  has these features.

  In-depth discussion of encryption is beyond the scope of this
  document, but an introduction is in order. Encryption is very useful,
  possibly even necessary in this day and age. There are all sorts of
  methods of encrypting data, each with its own set of characteristics.

  Most Unicies (and Linux is no exception) primarily use a one-way
  encryption algorithm, called DES (Data Encryption Standard) to encrypt
  your passwords. This encrypted password is then stored in (typically)
  /etc/passwd (or less commonly) /etc/shadow. When you attempt to login,
  the password you type in is encrypted again and compared with the
  entry in the file that stores your passwords. If they match, it must
  be the same password, and you are allowed access. Although DES is a
  two-way encryption algorithm (you can code and then decode a message,
  given the right keys), the variant that most unices use is one-way.
  This means that it should not be possible to reverse the encryption to
  get the password from the contents of /etc/passwd (or /etc/shadow).

  Brute force attacks, such as "Crack" or "John the Ripper" (see Section
  ``'') can often guess passwords unless your password is sufficiently
  random. PAM modules (see below) allow you to use a different
  encryption routine with your passwords (MD5 or the like).  You can use
  Crack to your advantage, as well.  Consider periodically running Crack
  against your own password database, to find insecure passwords.  Then
  contact the offending user, and instruct him to change his password.

  You can go to http://consult.cern.ch/writeup/security/security_3.html
  for information on how to choose a good password.


  6.1.  PGP and Public-Key Cryptography


  Public-key cryptography, such as that used for PGP, uses one key for
  encryption, and one key for decryption.  Traditional cryptography,
  however, uses the same key for encryption and decryption; this key
  must be known to both parties, and thus somehow transferred from one
  to the other securely.

  To alleviate the need to securely transmit the encryption key, public-
  key encryption uses two separate keys: a public key and a private key.
  Each person's public key is available by anyone to do the encryption,
  while at the same time each person keeps his or her private key to
  decrypt messages encrypted with the correct public key.

  There are advantages to both public key and private key cryptography,
  and you can read about those differences in the RSA Cryptography FAQ
  <http://www.rsa.com/rsalabs/newfaq/>, listed at the end of this
  section.

  PGP (Pretty Good Privacy) is well-supported on Linux. Versions 2.6.2
  and 5.0 are known to work well. For a good primer on PGP and how to
  use it, take a look at the PGP FAQ:
  http://www.pgp.com/service/export/faq/55faq.cgi

  Be sure to use the version that is applicable to your country. Due to
  export restrictions by the US Government, strong-encryption is
  prohibited from being transferred in electronic form outside the
  country.

  US export controls are now managed by EAR (Export Administration
  Regulations).  They are no longer governed by ITAR.

  There is also a step-by-step guide for configuring PGP on Linux
  available at
  http://mercury.chem.pitt.edu/~angel/LinuxFocus/English/November1997/article7.html.
  It was written for the international version of PGP, but is easily
  adaptable to the United States version.  You may also need a patch for
  some of the latest versions of Linux; the patch is available at
  ftp://metalab.unc.edu/pub/Linux/apps/crypto.

  There is a project working on a free re-implementation of pgp with
  open source. GnuPG is a complete and free replacement for PGP. Because
  it does not use IDEA or RSA it can be used without any restrictions.
  GnuPG is nearly in compliance with OpenPGP.  See the GNU Privacy Guard
  web page for more information: http://www.gnupg.org/.

  More information on cryptography can be found in the RSA cryptography
  FAQ, available at http://www.rsa.com/rsalabs/newfaq/.  Here you will
  find information on such terms as "Diffie-Hellman", "public-key
  cryptography", "digital certificates", etc.



  6.2.  SSL, S-HTTP, HTTPS and S/MIME

  Often users ask about the differences between the various security and
  encryption protocols, and how to use them.  While this isn't an
  encryption document, it is a good idea to explain briefly what each
  protocol is, and where to find more information.

  o  SSL: - SSL, or Secure Sockets Layer, is an encryption method
     developed by Netscape to provide security over the Internet.  It
     supports several different encryption protocols, and provides
     client and server authentication.  SSL operates at the transport
     layer, creates a secure encrypted channel of data, and thus can
     seamlessly encrypt data of many types.  This is most commonly seen
     when going to a secure site to view a secure online document with
     Communicator, and serves as the basis for secure communications
     with Communicator, as well as many other Netscape Communications
     data encryption.  More information can be found at
     http://www.consensus.com/security/ssl-talk-faq.html.  Information
     on Netscape's other security implementations, and a good starting
     point for these protocols is available at
     http://home.netscape.com/info/security-doc.html.


  o  S-HTTP: - S-HTTP is another protocol that provides security
     services across the Internet.  It was designed to provide
     confidentiality, authentication, integrity, and non-repudiability
     [cannot be mistaken for someone else] while supporting multiple
     key-management mechanisms and cryptographic algorithms via option
     negotiation between the parties involved in each transaction. S-
     HTTP is limited to the specific software that is implementing it,
     and encrypts each message individually. [ From RSA Cryptography
     FAQ, page 138]


  o  S/MIME: - S/MIME, or Secure Multipurpose Internet Mail Extension,
     is an encryption standard used to encrypt electronic mail and other
     types of messages on the Internet.  It is an open standard
     developed by RSA, so it is likely we will see it on Linux one day
     soon.  More information on S/MIME can be found at
     http://home.netscape.com/assist/security/smime/overview.html.


  6.3.  Linux IPSEC Implementations

  Along with CIPE, and other forms of data encryption, there are also
  several other implementations of IPSEC for Linux.  IPSEC is an effort
  by the IETF to create cryptographically-secure communications at the
  IP network level, and to provide authentication, integrity, access
  control, and confidentiality.  Information on IPSEC and Internet draft
  can be found at http://www.ietf.org/html.charters/ipsec-charter.html.
  You can also find links to other protocols involving key management,
  and an IPSEC mailing list and archives.

  The x-kernel Linux implementation, which is being developed at the
  University of Arizona, uses an object-based framework for implementing
  network protocols called x-kernel, and can be found at
  http://www.cs.arizona.edu/xkernel/hpcc-blue/linux.html.  Most simply,
  the x-kernel is a method of passing messages at the kernel level,
  which makes for an easier implementation.

  Another freely-available IPSEC implementation is the Linux FreeS/WAN
  IPSEC.  Their web page states,

       "These services allow you to build secure tunnels through
       untrusted networks. Everything passing through the untrusted
       net is encrypted by the IPSEC gateway machine and decrypted
       by the gateway at the other end. The result is Virtual Pri-
       vate Network or VPN. This is a network which is effectively
       private even though it includes machines at several differ-
       ent sites connected by the insecure Internet."


  It's available for download from http://www.xs4all.nl/~freeswan/, and
  has just reached 1.0 at the time of this writing.

  As with other forms of cryptography, it is not distributed with the
  kernel by default due to export restrictions.


  6.4.  ssh  (Secure Shell) and stelnet

  ssh and stelnet are suite's of programs that allow you to login to
  remote systems and have a encrypted connection.

  openssh is a suite of programs used as a secure replacement for
  rlogin, rsh and rcp.  It uses public-key cryptography to encrypt
  communications between two hosts, as well as to authenticate users.
  It can be used to securely login to a remote host or copy data between
  hosts, while preventing man-in-the-middle attacks (session hijacking)
  and DNS spoofing.  It will perform data compression on your
  connections, and secure X11 communications between hosts.

  There are several ssh implementiations now. The original commercial
  implementation by Data Fellows can be found at The ssh home page can
  be found at http://www.datafellows.com.

  The excellent Openssh implementation is based on a early version of
  the datafellows ssh and has been totally reworked to not include any
  patented or propriatary peices. It is free and under a BSD liscence.
  It can be found at: http://www.openssh.com.

  There is also a open source project to re-implement ssh from the
  ground up called "psst...". For more information see:
  http://www.net.lut.ac.uk/psst/

  You can also use ssh from your Windows workstation to your Linux ssh
  server.  There are several freely available Windows client
  implementations, including the one at
  http://guardian.htu.tuwien.ac.at/therapy/ssh/ as well as a commercial
  implementation from DataFellows, at http://www.datafellows.com.

  SSLeay is a free implementation of Netscape's Secure Sockets Layer
  protocol, developed by Eric Young.  It includes several applications,
  such as Secure telnet, a module for Apache, several databases, as well
  as several algorithms including DES, IDEA and Blowfish.

  Using this library, a secure telnet replacement has been created that
  does encryption over a telnet connection.  Unlike SSH, stelnet uses
  SSL, the Secure Sockets Layer protocol developed by Netscape.  You can
  find Secure telnet and Secure FTP by starting with the SSLeay FAQ,
  available at http://www.psy.uq.oz.au/~ftp/Crypto/.

  SRP is another secure telnet/ftp implementation. From their web page:


       "The SRP project is developing secure Internet software for
       free worldwide use. Starting with a fully-secure Telnet and
       FTP distribution, we hope to supplant weak networked authen-
       tication systems with strong replacements that do not sacri-
       fice user-friendliness for security. Security should be the
       default, not an option!"


  For more information, go to http://srp.stanford.edu/srp.


  6.5.  PAM - Pluggable Authentication Modules

  Newer versions of the Red Hat Linux distribution ship with a unified
  authentication scheme called "PAM". PAM allows you to change your
  authentication methods and requirements on the fly, and encapsulate
  all local authentication methods without recompiling any of your
  binaries.  Configuration of PAM is beyond the scope of this document,
  but be sure to take a look at the PAM web site for more information.
  http://www.kernel.org/pub/linux/libs/pam/index.html.

  Just a few of the things you can do with PAM:


  o  Use encryption other than DES for your passwords. (Making them
     harder to brute-force decode)

  o  Set resource limits on all your users so they can't perform denial-
     of-service attacks (number of processes, amount of memory, etc)

  o  Enable shadow passwords (see below) on the fly

  o  allow specific users to login only at specific times from specific
     places

  Within a few hours of installing and configuring your system, you can
  prevent many attacks before they even occur.  For example, use PAM to
  disable the system-wide usage of .rhosts files in user's home
  directories by adding these lines to /etc/pam.d/rlogin:


                       #
                       # Disable rsh/rlogin/rexec for users
                       #
                       login auth required pam_rhosts_auth.so no_rhosts



  6.6.  Cryptographic IP Encapsulation (CIPE)

  The primary goal of this software is to provide a facility for secure
  (against eavesdropping, including traffic analysis, and faked message
  injection) subnetwork interconnection across an insecure packet
  network such as the Internet.

  CIPE encrypts the data at the network level.  Packets traveling
  between hosts on the network are encrypted.  The encryption engine is
  placed near the driver which sends and receives packets.

  This is unlike SSH, which encrypts the data by connection, at the
  socket level.  A logical connection between programs running on
  different hosts is encrypted.

  CIPE can be used in tunnelling, in order to create a Virtual Private
  Network.  Low-level encryption has the advantage that it can be made
  to work transparently between the two networks connected in the VPN,
  without any change to application software.

  Summarized from the CIPE documentation:


       The IPSEC standards define a set of protocols which can be
       used (among other things) to build encrypted VPNs.  However,
       IPSEC is a rather heavyweight and complicated protocol set
       with a lot of options, implementations of the full protocol
       set are still rarely used and some issues (such as key man-
       agement) are still not fully resolved.  CIPE uses a simpler
       approach, in which many things which can be parameterized
       (such as the choice of the actual encryption algorithm used)
       are an install-time fixed choice.  This limits flexibility,
       but allows for a simple (and therefore efficient, easy to
       debug...)  implementation.


  Further information can be found at
  http://www.inka.de/~bigred/devel/cipe.html

  As with other forms of cryptography, it is not distributed with the
  kernel by default due to export restrictions.



  6.7.  Kerberos

  Kerberos is an authentication system developed by the Athena Project
  at MIT. When a user logs in, Kerberos authenticates that user (using a
  password), and provides the user with a way to prove her identity to
  other servers and hosts scattered around the network.

  This authentication is then used by programs such as rlogin to allow
  the user to login to other hosts without a password (in place of the
  .rhosts file).  This authentication method can also used by the mail
  system in order to guarantee that mail is delivered to the correct
  person, as well as to guarantee that the sender is who he claims to
  be.

  Kerberos and the other programs that come with it, prevent users from
  "spoofing" the system into believing they are someone else.
  Unfortunately, installing Kerberos is very intrusive, requiring the
  modification or replacement of numerous standard programs.

  You can find more information about kerberos by looking at the
  kerberos FAQ, and the code can be found at
  http://nii.isi.edu/info/kerberos/.

  [From: Stein, Jennifer G., Clifford Neuman, and Jeffrey L. Schiller.
  "Kerberos: An Authentication Service for Open Network Systems." USENIX
  Conference Proceedings, Dallas, Texas, Winter 1998.]

  Kerberos should not be your first step in improving security of your
  host.  It is quite involved, and not as widely used as, say, SSH.


  6.8.  Shadow Passwords.

  Shadow passwords are a means of keeping your encrypted password
  information secret from normal users. Recent versions of both Red Hat
  and Debian Linux use shadow passwords by default, but on other
  systems, encrypted passwords are stored in /etc/passwd file for all to
  read. Anyone can then run password-guesser programs on them and
  attempt to determine what they are.  Shadow passwords, by contrast,
  are saved in /etc/shadow, which only privileged users can read. In
  order to use shadow passwords, you need to make sure all your
  utilities that need access to password information are recompiled to
  support them. PAM (above) also allows you to just plug in a shadow
  module; it doesn't require re-compilation of executables.  You can
  refer to the Shadow-Password HOWTO for further information if
  necessary.  It is available at
  http://metalab.unc.edu/LDP/HOWTO/Shadow-Password-HOWTO.html It is
  rather dated now, and will not be required for distributions
  supporting PAM.


  6.9.  "Crack" and "John the Ripper"

  If for some reason your passwd program is not enforcing hard-to-guess
  passwords, you might want to run a password-cracking program and make
  sure your users' passwords are secure.

  Password cracking programs work on a simple idea: they try every word
  in the dictionary, and then variations on those words, encrypting each
  one and checking it against your encrypted password. If they get a
  match they know what your password is.

  There are a number of programs out there...the two most notable of
  which are "Crack" and "John the Ripper"
  (http://www.false.com/security/john/index.html) . They will take up a
  lot of your cpu time, but you should be able to tell if an attacker
  could get in using them by running them first yourself and notifying
  users with weak passwords. Note that an attacker would have to use
  some other hole first in order to read your /etc/passwd file, but such
  holes are more common than you might think.

  Because security is only as strong as the most insecure host, it is
  worth mentioning that if you have any Windows machines on your
  network, you should check out L0phtCrack, a Crack implementation for
  Windows.  It's available from http://www.l0pht.com


  6.10.  CFS - Cryptographic File System and TCFS - Transparent Crypto-
  graphic File System

  CFS is a way of encrypting entire directory trees and allowing users
  to store encrypted files on them. It uses an NFS server running on the
  local machine. RPMS are available at http://www.zedz.net/redhat/, and
  more information on how it all works is at
  ftp://ftp.research.att.com/dist/mab/.

  TCFS improves on CFS by adding more integration with the file system,
  so that it's transparent to users that the file system that is
  encrypted. More information at: http://edu-gw.dia.unisa.it/tcfs/.

  It also need not be used on entire filesystems. It works on directory
  trees as well.


  6.11.  X11, SVGA and display security


  6.11.1.  X11

  It's important for you to secure your graphical display to prevent
  attackers from grabbing your passwords as you type them, reading
  documents or information you are reading on your screen, or even using
  a hole to gain root access. Running remote X applications over a
  network also can be fraught with peril, allowing sniffers to see all
  your interaction with the remote system.

  X has a number of access-control mechanisms. The simplest of them is
  host-based: you use xhost to specify the hosts that are allowed access
  to your display. This is not very secure at all, because if someone
  has access to your machine, they can xhost + their machine and get in
  easily. Also, if you have to allow access from an untrusted machine,
  anyone there can compromise your display.

  When using xdm (X Display Manager) to log in, you get a much better
  access method: MIT-MAGIC-COOKIE-1. A 128-bit "cookie" is generated and
  stored in your .Xauthority file. If you need to allow a remote machine
  access to your display, you can use the xauth command and the
  information in your .Xauthority file to provide access to only that
  connection.  See the Remote-X-Apps mini-howto, available at
  http://metalab.unc.edu/LDP/HOWTO/mini/Remote-X-Apps.html.

  You can also use ssh (see ``'', above) to allow secure X connections.
  This has the advantage of also being transparent to the end user, and
  means that no unencrypted data flows across the network.

  Take a look at the Xsecurity man page for more information on X
  security. The safe bet is to use xdm to login to your console and then
  use ssh to go to remote sites on which you wish to run X programs.


  6.11.2.  SVGA

  SVGAlib programs are typically SUID-root in order to access all your
  Linux machine's video hardware. This makes them very dangerous. If
  they crash, you typically need to reboot your machine to get a usable
  console back. Make sure any SVGA programs you are running are
  authentic, and can at least be somewhat trusted. Even better, don't
  run them at all.


  6.11.3.  GGI (Generic Graphics Interface project)

  The Linux GGI project is trying to solve several of the problems with
  video interfaces on Linux. GGI will move a small piece of the video
  code into the Linux kernel, and then control access to the video
  system. This means GGI will be able to restore your console at any
  time to a known good state. They will also allow a secure attention
  key, so you can be sure that there is no Trojan horse login program
  running on your console. http://synergy.caltech.edu/~ggi/


  7.  Kernel Security

  This is a description of the kernel configuration options that relate
  to security, and an explanation of what they do, and how to use them.

  As the kernel controls your computer's networking, it is important
  that it be very secure, and not be compromised. To prevent some of the
  latest networking attacks, you should try to keep your kernel version
  current. You can find new kernels at  <ftp://ftp.kernel.org> or from
  your distribution vendor.

  There is also a international group providing a single unified crypto
  patch to the mainstream Lnux kernel. This patch provides support for a
  number of cyrptographic subsystems and things that cannot be included
  in the mainstream kernel due to export restrictions. For more
  information, visit their web page at: http://www.kerneli.org
  7.1.  2.0 Kernel Compile Options

  For 2.0.x kernels, the following options apply. You should see these
  options during the kernel configuration process.  Many of the comments
  here are from ./linux/Documentation/Configure.help, which is the same
  document that is referenced while using the Help facility during the
  make config stage of compiling the kernel.


  o  Network Firewalls (CONFIG_FIREWALL)

     This option should be on if you intend to run any firewalling or
     masquerading on your Lnux machine. If it's just going to be a
     regular client machine, it's safe to say no.


  o  IP: forwarding/gatewaying (CONFIG_IP_FORWARD)

     If you enable IP forwarding, your Linux box essentially becomes a
     router.  If your machine is on a network, you could be forwarding
     data from one network to another, and perhaps subverting a firewall
     that was put there to prevent this from happening.  Normal dial-up
     users will want to disable this, and other users should concentrate
     on the security implications of doing this.  Firewall machines will
     want this enabled, and used in conjunction with firewall software.

     You can enable IP forwarding dynamically using the following
     command:



               root#  echo 1 > /proc/sys/net/ipv4/ip_forward



  and disable it with the command:


               root#  echo 0 > /proc/sys/net/ipv4/ip_forward



  Keep in mind the files in /proc are "virtual" files and the shown size
  of the file might not reflect the data output from it.


  o  IP: syn cookies (CONFIG_SYN_COOKIES)

     a "SYN Attack" is a denial of service (DoS) attack that consumes
     all the resources on your machine, forcing you to reboot.  We can't
     think of a reason you wouldn't normally enable this. In the 2.2.x
     kernel series this config option merely allows syn cookies, but
     does not enable them. To enable them, you have to do:



                       root# echo 1 > /proc/sys/net/ipv4/tcp_syncookies <P>



  o  IP: Firewalling (CONFIG_IP_FIREWALL)

     This option is necessary if you are going to configure your machine
     as a firewall, do masquerading, or wish to protect your dial-up
     workstation from someone entering via your PPP dial-up interface.



  o  IP: firewall packet logging (CONFIG_IP_FIREWALL_VERBOSE)

     This option gives you information about packets your firewall
     received, like sender, recipient, port, etc.

  o  IP: Drop source routed frames (CONFIG_IP_NOSR)

     This option should be enabled.  Source routed frames contain the
     entire path to their destination inside of the packet.  This means
     that routers through which the packet goes do not need to inspect
     it, and just forward it on. This could lead to data entering your
     system that may be a potential exploit.


  o  IP: masquerading (CONFIG_IP_MASQUERADE) If one of the computers on
     your local network for which your Linux box acts as a firewall
     wants to send something to the outside, your box can "masquerade"
     as that host, i.e., it forwards the traffic to the intended
     destination, but makes it look like it came from the firewall box
     itself.  See http://www.indyramp.com/masq for more information.


  o  IP: ICMP masquerading (CONFIG_IP_MASQUERADE_ICMP) This option adds
     ICMP masquerading to the previous option of only masquerading TCP
     or UDP traffic.


  o  IP: transparent proxy support (CONFIG_IP_TRANSPARENT_PROXY) This
     enables your Linux firewall to transparently redirect any network
     traffic originating from the local network and destined for a
     remote host to a local server, called a "transparent proxy server".
     This makes the local computers think they are talking to the remote
     end, while in fact they are connected to the local proxy.  See the
     IP-Masquerading HOWTO and http://www.indyramp.com/masq for more
     information.


  o  IP: always defragment (CONFIG_IP_ALWAYS_DEFRAG)

     Generally this option is disabled, but if you are building a
     firewall or a masquerading host, you will want to enable it.  When
     data is sent from one host to another, it does not always get sent
     as a single packet of data, but rather it is fragmented into
     several pieces.  The problem with this is that the port numbers are
     only stored in the first fragment.  This means that someone can
     insert information into the remaining packets that isn't supposed
     to be there.  It could also prevent a teardrop attack against an
     internal host that is not yet itself patched against it.


  o  Packet Signatures (CONFIG_NCPFS_PACKET_SIGNING)

     This is an option that is available in the 2.2.x kernel series that
     will sign NCP packets for stronger security.  Normally you can
     leave it off, but it is there if you do need it.


  o  IP: Firewall packet netlink device (CONFIG_IP_FIREWALL_NETLINK)

     This is a really neat option that allows you to analyze the first
     128 bytes of the packets in a user-space program, to determine if
     you would like to accept or deny the packet, based on its validity.


  7.2.  2.2 Kernel Compile Options

  For 2.2.x kernels, many of the options are the same, but a few new
  ones have been developed.  Many of the comments here are from
  ./linux/Documentation/Configure.help, which is the same document that
  is referenced while using the Help facility during the make config
  stage of compiling the kernel. Only the newly- added options are
  listed below.  Consult the 2.0 description for a list of other
  necessary options.  The most significant change in the 2.2 kernel
  series is the IP firewalling code.  The ipchains program is now used
  to install IP firewalling, instead of the ipfwadm program used in the
  2.0 kernel.


  o  Socket Filtering (CONFIG_FILTER)

     For most people, it's safe to say no to this option. This option
     allows you to connect a userspace filter to any socket and
     determine if packets should be allowed or denied. Unless you have a
     very specific need and are capable of programming such a filter,
     you should say no. Also note that as of this writing, all protocols
     were supported except TCP.


  o  Port Forwarding Port Forwarding is an addition to IP Masquerading
     which allows some forwarding of packets from outside to inside a
     firewall on given ports. This could be useful if, for example, you
     want to run a web server behind the firewall or masquerading host
     and that web server should be accessible from the outside world. An
     external client sends a request to port 80 of the firewall, the
     firewall forwards this request to the web server, the web server
     handles the request and the results are sent through the firewall
     to the original client. The client thinks that the firewall machine
     itself is running the web server. This can also be used for load
     balancing if you have a farm of identical web servers behind the
     firewall.

     Information about this feature is available from
     http://www.monmouth.demon.co.uk/ipsubs/portforwarding.html (to
     browse the WWW, you need to have access to a machine on the
     Internet that has a program like lynx or netscape). For general
     info, please see
     ftp://ftp.compsoc.net/users/steve/ipportfw/linux21/


  o  Socket Filtering (CONFIG_FILTER) Using this option, user-space
     programs can attach a filter to any socket and thereby tell the
     kernel that it should allow or disallow certain types of data to
     get through the socket.  Linux socket filtering works on all socket
     types except TCP for now.  See the text file
     ./linux/Documentation/networking/filter.txt for more information.


  o  IP: Masquerading The 2.2 kernel masquerading has been improved.  It
     provides additional support for masquerading special protocols,
     etc. Be sure to read the IP Chains HOWTO for more information.


  7.3.  Kernel Devices

  There are a few block and character devices available on Linux that
  will also help you with security.
  The two devices /dev/random and /dev/urandom are provided by the
  kernel to provide random data at any time.

  Both /dev/random and /dev/urandom should be secure enough to use in
  generating PGP keys, ssh challenges, and other applications where
  secure random numbers are required.  Attackers should be unable to
  predict the next number given any initial sequence of numbers from
  these sources.  There has been a lot of effort put in to ensuring that
  the numbers you get from these sources are random in every sense of
  the word.

  The only difference between the two devices, is that /dev/random runs
  out of random bytes and it makes you wait for more to be accumulated.
  Note that on some systems, it can block for a long time waiting for
  new user-generated entropy to be entered into the system.  So you have
  to use care before using /dev/random.  (Perhaps the best thing to do
  is to use it when you're generating sensitive keying information, and
  you tell the user to pound on the keyboard repeatedly until you print
  out "OK, enough".)

  /dev/random is high quality entropy, generated from measuring the
  inter-interrupt times etc. It blocks until enough bits of random data
  are available.

  /dev/urandom is similar, but when the store of entropy is running low,
  it'll return a cryptographically strong hash of what there is. This
  isn't as secure, but it's enough for most applications.

  You might read from the devices using something like:



               root#  head -c 6 /dev/urandom | mimencode



  This will print eight random characters on the console, suitable for
  password generation.  You can find mimencode in the metamail package.

  See /usr/src/linux/drivers/char/random.c for a description of the
  algorithm.

  Thanks to Theodore Y. Ts'o, Jon Lewis, and others from Linux-kernel
  for helping me (Dave) with this.


  8.  Network Security

  Network security is becoming more and more important as people spend
  more and more time connected. Compromising network security is often
  much easier than compromising physical or local security, and is much
  more common.

  There are a number of good tools to assist with network security, and
  more and more of them are shipping with Linux distributions.


  8.1.  Packet Sniffers

  One of the most common ways intruders gain access to more systems on
  your network is by employing a packet sniffer on a already compromised
  host. This "sniffer" just listens on the Ethernet port for things like
  passwd and login and su in the packet stream and then logs the traffic
  after that. This way, attackers gain passwords for systems they are
  not even attempting to break into. Clear-text passwords are very
  vulnerable to this attack.

  Example: Host A has been compromised. Attacker installs a sniffer.
  Sniffer picks up admin logging into Host B from Host C. It gets the
  admin's personal password as they login to B. Then, the admin does a
  su to fix a problem. They now have the root password for Host B. Later
  the admin lets someone telnet from his account to Host Z on another
  site. Now the attacker has a password/login on Host Z.

  In this day and age, the attacker doesn't even need to compromise a
  system to do this: they could also bring a laptop or pc into a
  building and tap into your net.

  Using ssh or other encrypted password methods thwarts this attack.
  Things like APOP for POP accounts also prevents this attack. (Normal
  POP logins are very vulnerable to this, as is anything that sends
  clear-text passwords over the network.)


  8.2.  System services and tcp_wrappers

  Before you put your Linux system on ANY network the first thing to
  look at is what services you need to offer. Services that you do not
  need to offer should be disabled so that you have one less thing to
  worry about and attackers have one less place to look for a hole.

  There are a number of ways to disable services under Linux. You can
  look at your /etc/inetd.conf file and see what services are being
  offered by your inetd. Disable any that you do not need by commenting
  them out (# at the beginning of the line), and then sending your inetd
  process a SIGHUP.

  You can also remove (or comment out) services in your /etc/services
  file. This will mean that local clients will also be unable to find
  the service (i.e., if you remove ftp, and try and ftp to a remote site
  from that machine it will fail with an "unknown service" message).
  It's usually not worth the trouble to remove services from
  /etc/services, since it provides no additional security. If a local
  person wanted to use ftp even though you had commented it out, they
  would make their own client that used the common FTP port and would
  still work fine.

  Some of the services you might want to leave enabled are:


  o  ftp

  o  telnet (or ssh)

  o  mail, such as pop-3 or imap

  o  identd

  If you know you are not going to use some particular package, you can
  also delete it entirely. rpm -e packagename under the Red Hat
  distribution will erase an entire package. Under debian dpkg --remove
  does the same thing.

  Additionally, you really want to disable the rsh/rlogin/rcp utilities,
  including login (used by rlogin), shell (used by rcp), and exec (used
  by rsh) from being started in /etc/inetd.conf.  These protocols are
  extremely insecure and have been the cause of exploits in the past.

  You should check /etc/rc.d/rc[0-9].d (on Red Hat; /etc/rc[0-9].d on
  Debian), and see if any of the servers started in those directories
  are not needed. The files in those directories are actually symbolic
  links to files in the directory /etc/rc.d/init.d (on Red Hat;
  /etc/init.d on Debian).  Renaming the files in the init.d directory
  disables all the symbolic links that point to that file.  If you only
  wish to disable a service for a particular run level, rename the
  appropriate symbolic link by replacing  the upper-case S with a lower-
  case s, like this:



              root#  cd /etc/rc6.d
              root#  mv S45dhcpd s45dhcpd



  If you have BSD-style rc files, you will want to check /etc/rc* for
  programs you don't need.

  Most Linux distributions ship with tcp_wrappers "wrapping" all your
  TCP services. A tcp_wrapper (tcpd) is invoked from inetd instead of
  the real server. tcpd then checks the host that is requesting the
  service, and either executes the real server, or denies access from
  that host. tcpd allows you to restrict access to your TCP services.
  You should make a /etc/hosts.allow and add in only those hosts that
  need to have access to your machine's services.

  If you are a home dialup user, we suggest you deny ALL. tcpd also logs
  failed attempts to access services, so this can alert you if you are
  under attack. If you add new services, you should be sure to configure
  them to use tcp_wrappers if they are TCP-based.  For example, a normal
  dial-up user can prevent outsiders from connecting to his machine, yet
  still have the ability to retrieve mail, and make network connections
  to the Internet.  To do this, you might add the following to your
  /etc/hosts.allow:

  ALL: 127.

  And of course /etc/hosts.deny would contain:

  ALL: ALL

  which will prevent external connections to your machine, yet still
  allow you from the inside to connect to servers on the Internet.

  Keep in mind that tcp_wrappers only protects services executed from
  inetd, and a select few others.  There very well may be other services
  running on your machine.  You can use netstat -ta to find a list of
  all the services your machine is offering.


  8.3.  Verify Your DNS Information

  Keeping up-to-date DNS information about all hosts on your network can
  help to increase security.  If an unauthorized host becomes connected
  to your network, you can recognize it by its lack of a DNS entry.
  Many services can be configured to not accept connections from hosts
  that do not have valid DNS entries.


  8.4.  identd

  identd is a small program that typically runs out of your inetd
  server. It keeps track of what user is running what TCP service, and
  then reports this to whoever requests it.


  Many people misunderstand the usefulness of identd, and so disable it
  or block all off site requests for it. identd is not there to help out
  remote sites. There is no way of knowing if the data you get from the
  remote identd is correct or not. There is no authentication in identd
  requests.

  Why would you want to run it then? Because it helps you out, and is
  another data-point in tracking. If your identd is un compromised, then
  you know it's telling remote sites the user-name or uid of people
  using TCP services. If the admin at a remote site comes back to you
  and tells you user so-and-so was trying to hack into their site, you
  can easily take action against that user. If you are not running
  identd, you will have to look at lots and lots of logs, figure out who
  was on at the time, and in general take a lot more time to track down
  the user.

  The identd that ships with most distributions is more configurable
  than many people think. You can disable it for specific users (they
  can make a .noident file), you can log all identd requests (We
  recommend it), you can even have identd return a uid instead of a user
  name or even NO-USER.


  8.5.  SATAN, ISS, and Other Network Scanners

  There are a number of different software packages out there that do
  port and service-based scanning of machines or networks. SATAN, ISS,
  SAINT, and Nessus are some of the more well-known ones. This software
  connects to the target machine (or all the target machines on a
  network) on all the ports they can, and try to determine what service
  is running there. Based on this information, you can tell if the
  machine is vulnerable to a specific exploit on that server.

  SATAN (Security Administrator's Tool for Analyzing Networks) is a port
  scanner with a web interface. It can be configured to do light,
  medium, or strong checks on a machine or a network of machines. It's a
  good idea to get SATAN and scan your machine or network, and fix the
  problems it finds. Make sure you get the copy of SATAN from metalab
  <http://metalab.unc.edu/pub/packages/security/Satan-for-Linux/> or a
  reputable FTP or web site. There was a Trojan copy of SATAN that was
  distributed out on the net.
  http://www.trouble.org/~zen/satan/satan.html. Note that SATAN has not
  been updated in quite a while, and some of the other tools below might
  do a better job.

  ISS (Internet Security Scanner) is another port-based scanner. It is
  faster than Satan, and thus might be better for large networks.
  However, SATAN tends to provide more information.

  Abacus is a suite of tools to provide host-based security and
  intrusion detection. Look at it's home page on the web for more
  information. http://www.psionic.com/abacus/

  SAINT is a updated version of SATAN. It is web-based and has many more
  up-to-date tests than SATAN. You can find out more about it at:
  http://www.wwdsi.com/~saint

  Nessus is a free security scanner. It has a GTK graphical interface
  for ease of use. It is also designed with a very nice plugin setup for
  new port-scanning tests. For more information, take a look at:
  http://www.nessus.org



  8.5.1.  Detecting Port Scans

  There are some tools designed to alert you to probes by SATAN and ISS
  and other scanning software. However, if you liberally use
  tcp_wrappers, and look over your log files regularly, you should be
  able to notice such probes. Even on the lowest setting, SATAN still
  leaves traces in the logs on a stock Red Hat system.

  There are also "stealth" port scanners.  A packet with the TCP ACK bit
  set (as is done with established connections) will likely get through
  a packet-filtering firewall.  The returned RST packet from a port that
  _had no established session_ can be taken as proof of life on that
  port.  I don't think TCP wrappers will detect this.


  8.6.  sendmail , qmail  and MTA's

  One of the most important services you can provide is a mail server.
  Unfortunately, it is also one of the most vulnerable to attack, simply
  due to the number of tasks it must perform and the privileges it
  typically needs.

  If you are using sendmail it is very important to keep up on current
  versions. sendmail has a long long history of security exploits.
  Always make sure you are running the most recent version from
  http://www.sendmail.org.

  Keep in mind that sendmail does not have to be running in order for
  you to send mail.  If you are a home user, you can disable sendmail
  entirely, and simply use your mail client to send mail.  You might
  also choose to remove the "-bd" flag from the sendmail startup file,
  thereby disabling incoming requests for mail.  In other words, you can
  execute sendmail from your startup script using the following instead:


                       # /usr/lib/sendmail -q15m



  This will cause sendmail to flush the mail queue every fifteen minutes
  for any messages that could not be successfully delivered on the first
  attempt.

  Many administrators choose not to use sendmail, and instead choose one
  of the other mail transport agents. You might consider switching over
  to qmail. qmail was designed with security in mind from the ground up.
  It's fast, stable, and secure. Qmail can be found at
  http://www.qmail.org

  In direct competition to qmail is "postfix", written by Wietse Venema,
  the author of tcp_wrappers and other security tools.  Formerly called
  vmailer, and sponsored by IBM, this is also a mail transport agent
  written from the ground up with security in mind.  You can find more
  information about postfix at http://www.postfix.org


  8.7.  Denial of Service Attacks

  A "Denial of Service" (DoS) attack is one where the attacker tries to
  make some resource too busy to answer legitimate requests, or to deny
  legitimate users access to your machine.

  Denial of service attacks have increased greatly in recent years. Some
  of the more popular and recent ones are listed below. Note that new
  ones show up all the time, so this is just a few examples. Read the
  Linux security lists and the bugtraq list and archives for more
  current information.


  o  SYN Flooding - SYN flooding is a network denial of service attack.
     It takes advantage of a "loophole" in the way TCP connections are
     created. The newer Linux kernels (2.0.30 and up) have several
     configurable options to prevent SYN flood attacks from denying
     people access to your machine or services. See ``Kernel Security''
     for proper kernel protection options.


  o  Pentium "F00F" Bug - It was recently discovered that a series of
     assembly codes sent to a genuine Intel Pentium processor would
     reboot the machine.  This affects every machine with a Pentium
     processor (not clones, not Pentium Pro or PII), no matter what
     operating system it's running. Linux kernels 2.0.32 and up contain
     a work around for this bug, preventing it from locking your
     machine. Kernel 2.0.33 has an improved version of the kernel fix,
     and is suggested over 2.0.32.  If you are running on a Pentium, you
     should upgrade now!


  o  Ping Flooding - Ping flooding is a simple brute-force denial of
     service attack. The attacker sends a "flood" of ICMP packets to
     your machine. If they are doing this from a host with better
     bandwidth than yours, your machine will be unable to send anything
     on the network. A variation on this attack, called "smurfing",
     sends ICMP packets to a host with your machine's return IP,
     allowing them to flood you less detectably.  You can find more
     information about the "smurf" attack at
     http://www.quadrunner.com/~chuegen/smurf.txt

     If you are ever under a ping flood attack, use a tool like tcpdump
     to determine where the packets are coming from (or appear to be
     coming from), then contact your provider with this information.
     Ping floods can most easily be stopped at the router level or by
     using a firewall.


  o  Ping o' Death - The Ping o' Death attack sends ICMP ECHO REQUEST
     packets that are too large to fit in the kernel data structures
     intended to store them.  Because sending a single, large (65,510
     bytes) "ping" packet to many systems will cause them to hang or
     even crash, this problem was quickly dubbed the "Ping o' Death."
     This one has long been fixed, and is no longer anything to worry
     about.


  o  Teardrop / New Tear - One of the most recent exploits involves a
     bug present in the IP fragmentation code on Linux and Windows
     platforms.  It is fixed in kernel version 2.0.33, and does not
     require selecting any kernel compile-time options to utilize the
     fix.  Linux is apparently not vulnerable to the "newtear" exploit.


     You can find code for most exploits, and a more in-depth
     description of how they work, at http://www.rootshell.com using
     their search engine.


  8.8.  NFS (Network File System) Security.

  NFS is a very widely-used file sharing protocol. It allows servers
  running nfsd and mountd to "export" entire filesystems to other
  machines using NFS filesystem support built in to their kernels (or
  some other client support if they are not Linux machines).  mountd
  keeps track of mounted filesystems in /etc/mtab, and can display them
  with showmount.

  Many sites use NFS to serve home directories to users, so that no
  matter what machine in the cluster they login to, they will have all
  their home files.

  There is some small amount of security allowed in exporting
  filesystems. You can make your nfsd map the remote root user (uid=0)
  to the nobody user, denying them total access to the files exported.
  However, since individual users have access to their own (or at least
  the same uid) files, the remote root user can login or su to their
  account and have total access to their files. This is only a small
  hindrance to an attacker that has access to mount your remote
  filesystems.

  If you must use NFS, make sure you export to only those machines that
  you really need to. Never export your entire root directory; export
  only directories you need to export.

  See the NFS HOWTO for more information on NFS, available at
  http://metalab.unc.edu/mdw/HOWTO/NFS-HOWTO.html


  8.9.  NIS (Network Information Service) (formerly YP).

  Network Information service (formerly YP) is a means of distributing
  information to a group of machines. The NIS master holds the
  information tables and converts them into NIS map files. These maps
  are then served over the network, allowing NIS client machines to get
  login, password, home directory and shell information (all the
  information in a standard /etc/passwd file). This allows users to
  change their password once and have it take effect on all the machines
  in the NIS domain.

  NIS is not at all secure. It was never meant to be. It was meant to be
  handy and useful. Anyone that can guess the name of your NIS domain
  (anywhere on the net) can get a copy of your passwd file, and use
  "crack" and "John the Ripper" against your users' passwords. Also, it
  is possible to spoof NIS and do all sorts of nasty tricks. If you must
  use NIS, make sure you are aware of the dangers.

  There is a much more secure replacement for NIS, called NIS+.  Check
  out the NIS HOWTO for more information:
  http://metalab.unc.edu/mdw/HOWTO/NIS-HOWTO.html


  8.10.  Firewalls

  Firewalls are a means of controlling what information is allowed into
  and out of your local network. Typically the firewall host is
  connected to the Internet and your local LAN, and the only access from
  your LAN to the Internet is through the firewall. This way the
  firewall can control what passes back and forth from the Internet and
  your LAN.

  There are a number of types of firewalls and methods of setting them
  up. Linux machines make pretty good firewalls. Firewall code can be
  built right into 2.0 and higher kernels. The user-space tools ipfwadm
  for 2.0 kernels and ipchains for 2.2 kernels, allows you to change, on
  the fly, the types of network traffic you allow.  You can also log
  particular types of network traffic.

  Firewalls are a very useful and important technique in securing your
  network. However, never think that because you have a firewall, you
  don't need to secure the machines behind it. This is a fatal mistake.
  Check out the very good Firewall-HOWTO at your latest metalab archive
  for more information on firewalls and Linux.
  http://metalab.unc.edu/mdw/HOWTO/Firewall-HOWTO.html

  More information can also be found in the IP-Masquerade mini-howto:
  http://metalab.unc.edu/mdw/HOWTO/mini/IP-Masquerade.html

  More information on ipfwadm (the tool that lets you change settings on
  your firewall, can be found at it's home page:
  http://www.xos.nl/linux/ipfwadm/

  If you have no experience with firewalls, and plan to set up one for
  more than just a simple security policy, the Firewalls book by
  O'Reilly and Associates or other online firewall document is mandatory
  reading.  Check out http://www.ora.com for more information.  The
  National Institute of Standards and Technology have put together an
  excellent document on firewalls.  Although dated 1995, it is still
  quite good.  You can find it at
  http://csrc.nist.gov/nistpubs/800-10/main.html.  Also of interest:


  o  The Freefire Project -- a list of freely-available firewall tools,
     available at http://sites.inka.de/sites/lina/freefire-
     l/index_en.html

  o  SunWorld Firewall Design -- written by the authors of the O'Reilly
     book, this provides a rough introduction to the different firewall
     types.  It's available at
     http://www.sunworld.com/swol-01-1996/swol-01-firewall.html

  o  Mason - the automated firewall builder for Linux. This is a
     firewall script that learns as you do the things you need to do on
     your network! More info at: http://www.pobox.com/~wstearns/mason/


  8.11.  IP Chains - Linux Kernel 2.2.x Firewalling

  Linux IP Firewalling Chains is an update to the 2.0 Linux firewalling
  code for the 2.2 kernel.  It has many more features than previous
  implementations, including:

  o  More flexible packet manipulations

  o  More complex accounting

  o  Simple policy changes possible atomically

  o  Fragments can be explicitly blocked, denied, etc.

  o  Logs suspicious packets.

  o  Can handle protocols other than ICMP/TCP/UDP.

  If you are currently using ipfwadm on your 2.0 kernel, there are
  scripts available to convert the ipfwadm command format to the format
  ipchains uses.

  Be sure to read the IP Chains HOWTO for further information.  It is
  available at http://www.rustcorp.com/linux/ipchains/HOWTO.html


  8.12.  VPNs - Virtual Private Networks

  VPN's are a way to establish a "virtual" network on top of some
  already-existing network. This virtual network often is encrypted and
  passes traffic only to and from some known entities that have joined
  the network. VPNs are often used to connect someone working at home
  over the public Internet to an internal company network.

  If you are running a Linux masquerading firewall and need to pass MS
  PPTP (Microsoft's VPN point-to-point product) packets, there is a
  Linux kernel patch out to do just that. See: ip-masq-vpn.

  There are several Linux VPN solutions available:

  o  vpnd. See the http://sunsite.auc.dk/vpnd/.

  o  Free S/Wan, available at http://www.xs4all.nl/~freeswan/

  o  ssh can be used to construct a VPN.  See the VPN mini-howto for
     more information.

  o  vps (virtual private server) at http://www.strongcrypto.com.

  See also the section on IPSEC for pointers and more information.


  9.  Security Preparation (before you go on-line)

  Ok, so you have checked over your system, and determined it's as
  secure as feasible, and you're ready to put it online.  There are a
  few things you should now do in order to prepare for an intrusion, so
  you can quickly disable the intruder, and get back up and running.


  9.1.  Make a Full Backup of Your Machine

  Discussion of backup methods and storage is beyond the scope of this
  document, but here are a few words relating to backups and security:

  If you have less than 650mb of data to store on a partition, a CD-R
  copy of your data is a good way to go (as it's hard to tamper with
  later, and if stored properly can last a long time). Tapes and other
  re-writable media should be write-protected as soon as your backup is
  complete, and then verified to prevent tampering. Make sure you store
  your backups in a secure off-line area. A good backup will ensure that
  you have a known good point to restore your system from.


  9.2.  Choosing a Good Backup Schedule

  A six-tape cycle is easy to maintain.  This includes four tapes for
  during the week, one tape for even Fridays, and one tape for odd
  Fridays.  Perform an incremental backup every day, and a full backup
  on the appropriate Friday tape. If you make some particularly
  important changes or add some important data to your system, a full
  backup might well be in order.


  9.3.  Backup Your RPM or Debian File Database

  In the event of an intrusion, you can use your RPM database like you
  would use tripwire, but only if you can be sure it too hasn't been
  modified.  You should copy the RPM database to a floppy, and keep this
  copy off-line at all times. The Debian distribution likely has
  something similar.

  The files /var/lib/rpm/fileindex.rpm and /var/lib/rpm/packages.rpm
  most likely won't fit on a single floppy.  But if compressed, each
  should fit on a seperate floppy.

  Now, when your system is compromised, you can use the command:



                               root#  rpm -Va



  to verify each file on the system.  See the rpm man page, as there are
  a few other options that can be included to make it less verbose.
  Keep in mind you must also be sure your RPM binary has not been com-
  promised.

  This means that every time a new RPM is added to the system, the RPM
  database will need to be rearchived.  You will have to decide the
  advantages versus drawbacks.


  9.4.  Keep Track of Your System Accounting Data

  It is very important that the information that comes from syslog not
  be compromised.  Making the files in /var/log readable and writable by
  only a limited number of users is a good start.

  Be sure to keep an eye on what gets written there, especially under
  the auth facility.  Multiple login failures, for example, can indicate
  an attempted break-in.

  Where to look for your log file will depend on your distribution. In a
  Linux system that conforms to the "Linux Filesystem Standard", such as
  Red Hat, you will want to look in /var/log and check messages,
  mail.log, and others.

  You can find out where your distribution is logging to by looking at
  your /etc/syslog.conf file. This is the file that tells syslogd (the
  system logging daemon) where to log various messages.

  You might also want to configure your log-rotating script or daemon to
  keep logs around longer so you have time to examine them. Take a look
  at the logrotate package on recent Red Hat distributions. Other
  distributions likely have a similar process.

  If your log files have been tampered with, see if you can determine
  when the tampering started, and what sort of things appeared to be
  tampered with. Are there large periods of time that cannot be
  accounted for?  Checking backup tapes (if you have any) for untampered
  log files is a good idea.

  Intruders typically modify log files in order to cover their tracks,
  but they should still be checked for strange happenings. You may
  notice the intruder attempting to gain entrance, or exploit a program
  in order to obtain the root account. You might see log entries before
  the intruder has time to modify them.

  You should also be sure to separate the auth facility from other log
  data, including attempts to switch users using su, login attempts, and
  other user accounting information.

  If possible, configure syslog to send a copy of the most important
  data to a secure system.  This will prevent an intruder from covering
  his tracks by deleting his login/su/ftp/etc attempts.  See the
  syslog.conf man page, and refer to the @ option.

  There are several more advanced syslogd programs out there. Take a
  look at http://www.core-sdi.com/ssyslog/ for Secure Syslog. Secure
  Syslog allows you to encrypt your syslog entries and make sure no one
  has tampered with them.

  Another syslogd with more features is syslog-ng. It allows you a lot
  more flexibility in your logging and also can has your remote syslog
  streams to prevent tampering.

  Finally, log files are much less useful when no one is reading them.
  Take some time out every once in a while to look over your log files,
  and get a feeling for what they look like on a normal day. Knowing
  this can help make unusual things stand out.


  9.5.  Apply All New System Updates.

  Most Linux users install from a CD-ROM. Due to the fast-paced nature
  of security fixes, new (fixed) programs are always being released.
  Before you connect your machine to the network, it's a good idea to
  check with your distribution's ftp site and get all the updated
  packages since you received your distribution CD-ROM. Many times these
  packages contain important security fixes, so it's a good idea to get
  them installed.


  10.  What To Do During and After a Breakin

  So you have followed some of the advice here (or elsewhere) and have
  detected a break-in? The first thing to do is to remain calm. Hasty
  actions can cause more harm than the attacker would have.


  10.1.  Security Compromise Underway.

  Spotting a security compromise under way can be a tense undertaking.
  How you react can have large consequences.

  If the compromise you are seeing is a physical one, odds are you have
  spotted someone who has broken into your home, office or lab. You
  should notify your local authorities. In a lab, you might have spotted
  someone trying to open a case or reboot a machine. Depending on your
  authority and procedures, you might ask them to stop, or contact your
  local security people.

  If you have detected a local user trying to compromise your security,
  the first thing to do is confirm they are in fact who you think they
  are. Check the site they are logging in from. Is it the site they
  normally log in from? No? Then use a non-electronic means of getting
  in touch. For instance, call them on the phone or walk over to their
  office/house and talk to them. If they agree that they are on, you can
  ask them to explain what they were doing or tell them to cease doing
  it. If they are not on, and have no idea what you are talking about,
  odds are this incident requires further investigation. Look into such
  incidents , and have lots of information before making any
  accusations.

  If you have detected a network compromise, the first thing to do (if
  you are able) is to disconnect your network. If they are connected via
  modem, unplug the modem cable; if they are connected via Ethernet,
  unplug the Ethernet cable. This will prevent them from doing any
  further damage, and they will probably see it as a network problem
  rather than detection.

  If you are unable to disconnect the network (if you have a busy site,
  or you do not have physical control of your machines), the next best
  step is to use something like tcp_wrappers or ipfwadm to deny access
  from the intruder's site.
  If you can't deny all people from the same site as the intruder,
  locking the user's account will have to do. Note that locking an
  account is not an easy thing. You have to keep in mind .rhosts files,
  FTP access, and a host of possible backdoors.

  After you have done one of the above (disconnected the network, denied
  access from their site, and/or disabled their account), you need to
  kill all their user processes and log them off.

  You should monitor your site well for the next few minutes, as the
  attacker will try to get back in. Perhaps using a different account,
  and/or from a different network address.


  10.2.  Security Compromise has already happened

  So you have either detected a compromise that has already happened or
  you have detected it and locked (hopefully) the offending attacker out
  of your system. Now what?


  10.2.1.  Closing the Hole

  If you are able to determine what means the attacker used to get into
  your system, you should try to close that hole. For instance, perhaps
  you see several FTP entries just before the user logged in. Disable
  the FTP service and check and see if there is an updated version, or
  if any of the lists know of a fix.

  Check all your log files, and make a visit to your security lists and
  pages and see if there are any new common exploits you can fix.  You
  can find Caldera security fixes at http://www.caldera.com/tech-
  ref/security/. Red Hat has not yet separated their security fixes from
  bug fixes, but their distribution errata is available at
  http://www.redhat.com/errata

  Debian now has a security mailing list and web page. See:
  http://www.debian.org/security/ for more information.

  It is very likely that if one vendor has released a security update,
  that most other Linux vendors will as well.

  There is now a Linux security auditing project. They are methodically
  going through all the user-space utilities and looking for possible
  security exploits and overflows. From their announcement:


       "We are attempting a systematic audit of Linux sources with
       a view to being as secure as OpenBSD. We have already uncov-
       ered (and fixed) some problems, but more help is welcome.
       The list is unmoderated and also a useful resource for gen-
       eral security discussions.  The list address is: security-
       audit@ferret.lmh.ox.ac.uk To subscribe, send a mail to:
       security-audit-subscribe@ferret.lmh.ox.ac.uk"


  If you don't lock the attacker out, they will likely be back. Not just
  back on your machine, but back somewhere on your network. If they were
  running a packet sniffer, odds are good they have access to other
  local machines.


  10.2.2.  Assessing the Damage

  The first thing is to assess the damage. What has been compromised?
  If you are running an integrity checker like Tripwire, you can use it
  to perform an integrity check; it should help to tell you what has
  been compromised.  If not, you will have to look around at all your
  important data.

  Since Linux systems are getting easier and easier to install, you
  might consider saving your config files, wiping your disk(s),
  reinstalling, then restoring your user files and your config files
  from backups. This will ensure that you have a new, clean system.  If
  you have to restore files from the compromised system, be especially
  cautious of any binaries that you restore, as they may be Trojan
  horses placed there by the intruder.

  Re-installation should be considered mandatory upon an intruder
  obtaining root access.  Additionally, you'd like to keep any evidence
  there is, so having a spare disk in the safe may make sense.

  Then you have to worry about how long ago the compromise happened, and
  whether the backups hold any damaged work.  More on backups later.


  10.2.3.  Backups, Backups, Backups!

  Having regular backups is a godsend for security matters. If your
  system is compromised, you can restore the data you need from backups.
  Of course, some data is valuable to the attacker too, and they will
  not only destroy it, they will steal it and have their own copies; but
  at least you will still have the data.

  You should check several backups back into the past before restoring a
  file that has been tampered with. The intruder could have compromised
  your files long ago, and you could have made many successful backups
  of the compromised file!

  Of course, there are also a raft of security concerns with backups.
  Make sure you are storing them in a secure place. Know who has access
  to them. (If an attacker can get your backups, they can have access to
  all your data without you ever knowing it.)


  10.2.4.  Tracking Down the Intruder.

  Ok, you have locked the intruder out, and recovered your system, but
  you're not quite done yet. While it is unlikely that most intruders
  will ever be caught, you should report the attack.

  You should report the attack to the admin contact at the site from
  which the attacker attacked your system. You can look up this contact
  with whois or the Internic database. You might send them an email with
  all applicable log entries and dates and times. If you spotted
  anything else distinctive about your intruder, you might mention that
  too. After sending the email, you should (if you are so inclined)
  follow up with a phone call. If that admin in turn spots your
  attacker, they might be able to talk to the admin of the site where
  they are coming from and so on.

  Good crackers often use many intermediate systems, some (or many) of
  which may not even know they have been compromised. Trying to track a
  cracker back to their home system can be difficult. Being polite to
  the admins you talk to can go a long way to getting help from them.

  You should also notify any security organizations you are a part of
  (CERT <http://www.cert.org/> or similar), as well as your Linux system
  vendor.



  11.  Security Sources

  There are a LOT of good sites out there for Unix security in general
  and Linux security specifically. It's very important to subscribe to
  one (or more) of the security mailing lists and keep current on
  security fixes. Most of these lists are very low volume, and very
  informative.


  11.1.  FTP Sites

  CERT is the Computer Emergency Response Team. They often send out
  alerts of current attacks and fixes. See ftp://ftp.cert.org for more
  information.

  ZEDZ (formerly Replay) (http://www.zedz.net) has archives of many
  security programs. Since they are outside the US, they don't need to
  obey US crypto restrictions.

  Matt Blaze is the author of CFS and a great security advocate.  Matt's
  archive is available at ftp://ftp.research.att.com/pub/mab
  <ftp://ftp.research.att.com/pub/mab>

  tue.nl is a great security FTP site in the Netherlands.
  ftp.win.tue.nl


  11.2.  Web Sites


  o  The Hacker FAQ is a FAQ about hackers: The Hacker FAQ

  o  The COAST archive has a large number of Unix security programs and
     information: COAST

  o  SuSe Security Page: http://www.suse.de/security/

  o  Rootshell.com is a great site for seeing what exploits are
     currently being used by crackers: http://www.rootshell.com/

  o  BUGTRAQ puts out advisories on security issues: BUGTRAQ archives

  o  CERT, the Computer Emergency Response Team, puts out advisories on
     common attacks on Unix platforms: CERT home

  o  Dan Farmer is the author of SATAN and many other security tools.
     His home site has some interesting security survey information, as
     well as security tools: http://www.trouble.org

  o  The Linux security WWW is a good site for Linux security
     information: Linux Security WWW

  o  Infilsec has a vulnerability engine that can tell you what
     vulnerabilities affect a specific platform:
     http://www.infilsec.com/vulnerabilities/

  o  CIAC sends out periodic security bulletins on common exploits:
     http://ciac.llnl.gov/cgi-bin/index/bulletins

  o  A good starting point for Linux Pluggable Authentication modules
     can be found at http://www.kernel.org/pub/linux/libs/pam/.

  o  The Debian project has a web page for their security fixes and
     information. It is at http://www.debian.com/security/.


  o  WWW Security FAQ, written by Lincoln Stein, is a great web security
     reference. Find it at http://www.w3.org/Security/Faq/www-security-
     faq.html



  11.3.  Mailing Lists

  Bugtraq:  To subscribe to bugtraq, send mail to listserv@netspace.org
  containing the message body subscribe bugtraq. (see links above for
  archives).

  CIAC: Send e-mail to majordomo@tholia.llnl.gov. In the BODY (not
  subject) of the message put (either or both):

  subscribe ciac-bulletin



  Red Hat has a number of mailing lists, the most important of which is
  the redhat-announce list. You can read about security (and other)
  fixes as soon as they come out.  Send email to redhat-announce-list-
  request@redhat.com with the Subject

  Subscribe


  See http://www.redhat.com/mailing-lists/redhat-announce-list/ for more
  info and archives.

  The Debian project has a security mailing list that covers their
  security fixes. See http://www.debian.com/security/ for more
  information.



  11.4.  Books - Printed Reading Material

  There are a number of good security books out there. This section
  lists a few of them. In addition to the security specific books,
  security is covered in a number of other books on system
  administration.

  Building Internet Firewalls By D. Brent Chapman & Elizabeth D. Zwicky

  1st Edition September 1995

  ISBN: 1-56592-124-0

  Practical UNIX & Internet Security, 2nd Edition By Simson Garfinkel &
  Gene Spafford

  2nd Edition April 1996

  ISBN: 1-56592-148-8

  Computer Security Basics By Deborah Russell & G.T. Gangemi, Sr.

  1st Edition July 1991

  ISBN: 0-937175-71-4

  Linux Network Administrator's Guide By Olaf Kirch


  1st Edition January 1995

  ISBN: 1-56592-087-2

  PGP: Pretty Good Privacy By Simson Garfinkel

  1st Edition December 1994

  ISBN: 1-56592-098-8

  Computer Crime A Crimefighter's Handbook By David Icove, Karl Seger &
  William VonStorch (Consulting Editor Eugene H. Spafford)

  1st Edition August 1995

  ISBN: 1-56592-086-4


  Linux Security By John S. Flowers

  New Riders;

  ISBN: 0735700354

  March 1999


  Maximum Linux Security : A Hacker's Guide to Protecting Your Linux
  Server and Network

  Anonymous

  Paperback - 829 pages

  Sams;

  ISBN: 0672313413

  July 1999


  Intrusion Detection By Terry Escamilla

  Paperback - 416 pages (September 1998)

  John Wiley and Sons;

  ISBN: 0471290009


  Fighting Computer Crime

  Donn Parker

  Paperback - 526 pages (September 1998)

  John Wiley and Sons;

  ISBN: 0471163783


  12.  Glossary


  o  authentication: The process of knowing that the data received is
     the same as the data that was sent, and that the claimed sender is
     in fact the actual sender.


  o  bastion Host: A computer system that must be highly secured because
     it is vulnerable to attack, usually because it is exposed to the
     Internet and is a main point of contact for users of internal
     networks.  It gets its name from the highly fortified projects on
     the outer walls of medieval castles.  Bastions overlook critical
     areas of defense, usually having strong walls, room for extra
     troops, and the occasional useful tub of boiling hot oil for
     discouraging attackers.


  o  buffer overflow: Common coding style is to never allocate large
     enough buffers, and to not check for overflows.  When such buffers
     overflow, the executing program (daemon or set-uid program) can be
     tricked in doing some other things.  Generally this works by
     overwriting a function's return address on the stack to point to
     another location.


  o  denial of service: An attack that consumes the resources on your
     computer for things it was not intended to be doing, thus
     preventing normal use of your network resources for legitmate
     purposes.


  o  dual-homed Host: A general-purpose computer system that has at
     least two network interfaces.


  o  firewall: A component or set of components that restricts access
     between a protected network and the Internet, or between other sets
     of networks.


  o  host: A computer system attached to a network.


  o  IP spoofing: IP Spoofing is a complex technical attack that is made
     up of several components.  It is a security exploit that works by
     tricking computers in a trust relationship into thinking that you
     are someone that you really aren't.  There is an extensive paper
     written by daemon9, route, and infinity in the Volume Seven, Issue
     Forty-Eight issue of Phrack Magazine.


  o  non-repudiation: The property of a receiver being able to prove
     that the sender of some data did in fact send the data even though
     the sender might later deny ever having sent it.


  o  packet: The fundamental unit of communication on the Internet.


  o  packet filtering: The action a device takes to selectively control
     the flow of data to and from a network.  Packet filters allow or
     block packets, usually while routing them from one network to
     another (most often from the Internet to an internal network, and
     vice-versa). To accomplish packet filtering, you set up rules that
     specify what types of packets (those to or from a particular IP
     address or port) are to be allowed and what types are to be
     blocked.



  o  perimeter network: A network added between a protected network and
     an external network, in order to provide an additional layer of
     security.  A perimeter network is sometimes called a DMZ.


  o  proxy server: A program that deals with external servers on behalf
     of internal clients.  Proxy clients talk to proxy servers, which
     relay approved client requests to real servers, and relay answers
     back to clients.


  o  superuser: An informal name for root.


  13.  Frequently Asked Questions


  1. Is it more secure to compile driver support directly into the
     kernel, instead of making it a module?

     Answer: Some people think it is better to disable the ability to
     load device drivers using modules, because an intruder could load a
     Trojan module or a module that could affect system security.

     However, in order to load modules, you must be root.  The module
     object files are also only writable by root.  This means the
     intruder would need root access to insert a module.  If the
     intruder gains root access, there are more serious things to worry
     about than whether he will load a module.

     Modules are for dynamically loading support for a particular device
     that may be infrequently used.  On server machines, or firewalls
     for instance, this is very unlikely to happen.  For this reason, it
     would make more sense to compile support directly into the kernel
     for machines acting as a server.  Modules are also slower than
     support compiled directly in the kernel.


  2. Why does logging in as root from a remote machine always fail?

     Answer: See ``Root Security''.  This is done intentionally to
     prevent remote users from attempting to connect via telnet to your
     machine as root, which is a serious security vulnerability, because
     then the root password would be transmitted, in cleartext, across
     the network.  Don't forget: potential intruders have time on their
     side, and can run automated programs to find your password.


  3. How do I enable shadow passwords on my Red Hat 4.2 or 5.x Linux
     box?

     Answer:

     To enable shadow passwords, run pwconv as root, and /etc/shadow
     should now exist, and be used by applications.  If you are using RH
     4.2 or above, the PAM modules will automatically adapt to the
     change from using normal /etc/passwd to shadow passwords without
     any other change.

     Some background: shadow passwords is a mechanism for storing your
     password in a file other than the normal /etc/passwd file.  This
     has several advantages.  The first one is that the shadow file,
     /etc/shadow, is only readable by root, unlike /etc/passwd, which
     must remain readable by everyone.  The other advantage is that as
     the administrator, you can enable or disable accounts without
     everyone knowing the status of other users' accounts.
     The /etc/passwd file is then used to store user and group names,
     used by programs like /bin/ls to map the user ID to the proper
     username in a directory listing.

     The /etc/shadow file then only contains the username and his/her
     password, and perhaps accounting information, like when the account
     expires, etc.

     To enable shadow passwords, run pwconv as root, and /etc/shadow
     should now exist, and be used by applications.  Since you are using
     RH 4.2 or above, the PAM modules will automatically adapt to the
     change from using normal /etc/passwd to shadow passwords without
     any other change.

     Since you're interested in securing your passwords, perhaps you
     would also be interested in generating good passwords to begin
     with.  For this you can use the pam_cracklib module, which is part
     of PAM.  It runs your password against the Crack libraries to help
     you decide if it is too-easily guessable by password-cracking
     programs.


  4. How can I enable the Apache SSL extensions?

     Answer:


     a. Get SSLeay 0.8.0 or later from
        <ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL>


     b. Build and test and install it!


     c. Get Apache 1.2.5 source


     d. Get Apache SSLeay extensions from here
        <ftp://ftp.ox.ac.uk/pub/crypto/SSL/apache_1.2.5+ssl_1.13.tar.gz>


     e. Unpack it in the apache-1.2.5 source directory and patch Apache
        as per the README.


     f. Configure and build it.


     You might also try ZEDZ net which has many pre-built packages, and
     is located outside of the United States.


  5. How can I manipulate user accounts, and still retain security?

     Answer:  The Red Hat distribution, especially RH5.0, contains a
     great number of tools to change the properties of user accounts.


  o  The pwconv and unpwconv programs can be used to convert between
     shadow and non-shadowed passwords.

  o  The pwck and grpck programs can be used to verify proper
     organization of the passwd and group files.

  o  The useradd, usermod, and userdel programs can be used to add,
     delete and modify user accounts.  The groupadd, groupmod, and
     groupdel programs will do the same for groups.

  o  Group passwords can be created using gpasswd.

     All these programs are "shadow-aware" -- that is, if you enable
     shadow they will use /etc/shadow for password information,
     otherwise they won't.

     See the respective man pages for further information.


  6. How can I password-protect specific HTML documents using Apache?

     I bet you didn't know about http://www.apacheweek.org, did you?

     You can find information on user authentication at
     http://www.apacheweek.com/features/userauth as well as other web
     server security tips from
     http://www.apache.org/docs/misc/security_tips.html

  14.  Conclusion

  By subscribing to the security alert mailing lists, and keeping
  current, you can do a lot towards securing your machine. If you pay
  attention to your log files and run something like tripwire regularly,
  you can do even more.

  A reasonable level of computer security is not difficult to maintain
  on a home machine. More effort is required on business machines, but
  Linux can indeed be a secure platform. Due to the nature of Linux
  development, security fixes often come out much faster than they do on
  commercial operating systems, making Linux an ideal platform when
  security is a requirement.



  15.  Acknowledgements

  Information here is collected from many sources. Thanks to the
  following that either indirectly or directly have contributed:
  following who either indirectly or directly have contributed:

       Rob Riggs rob@DevilsThumb.com

       S. Coffin scoffin@netcom.com

       Viktor Przebinda viktor@CRYSTAL.MATH.ou.edu

       Roelof Osinga roelof@eboa.com

       Kyle Hasselbacher kyle@carefree.quux.soltc.net

       David S. Jackson dsj@dsj.net

       Todd G. Ruskell ruskell@boulder.nist.gov

       Rogier Wolff R.E.Wolff@BitWizard.nl

       Antonomasia ant@notatla.demon.co.uk

       Nic Bellamy sky@wibble.net

       Eric Hanchrow offby1@blarg.net

       Robert J. Bergerrberger@ibd.com

  Ulrich Alpers lurchi@cdrom.uni-stuttgart.de

  David Noha dave@c-c-s.com

  Pavel Epifanov. epv@ibm.net

  Joe Germuska. joe@germuska.com

  Franklin S. Werren fswerren@bagpipes.net

  Paul Rusty Russell <Paul.Russell@rustcorp.com.au>

  Christine Gaunt <cgaunt@umich.edu>

  lin bhewitt@refmntutl01.afsc.noaa.gov

  A. Steinmetz astmail@yahoo.com

  Jun Morimoto morimoto@xantia.citroen.org

  Xiaotian Sun sunx@newton.me.berkeley.edu

  Eric Hanchrow offby1@blarg.net

  The following have translated this HOWTO into various other languages!

  A special thank you to all of them for help spreading the Linux
  word...

  Polish: Ziemek Borowski ziembor@FAQ-bot.ZiemBor.Waw.PL

  Japanese: FUJIWARA Teruyoshi fjwr@mtj.biglobe.ne.jp

  Indonesian: Tedi Heriyanto 22941219@students.ukdw.ac.id

  Korean: Bume Chang Boxcar0001@aol.com

  Spanish: Juan Carlos Fernandez piwiman@visionnetware.com

  Dutch: R. Ekkebus reggy@zeelandnet.nl



  Serial HOWTO
  David S.Lawyer   dave@lafn.org original by Greg Hankins
  v2.08 June 2000

  This document describes serial port features other than those which
  should be covered by Modem-HOWTO, PPP-HOWTO, Serial-Programming-HOWTO,
  or Text-Terminal-HOWTO.  It lists info on multiport serial cards.  It
  contains technical info about the serial port itself in more detail
  than found in the above HOWTOs and should be best for troubleshooting
  when the problem is the serial port itself.  If you are dealing with a
  Modem, PPP (used for Internet access on a phone line), or a Text-Ter
  minal, those HOWTOs should be consulted first.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Copyright, Disclaimer, & Credits
        1.1.1 Copyright
        1.1.2 Disclaimer
        1.1.3 Trademarks.
        1.1.4 Credits
     1.2 New Versions of this Serial-HOWTO
     1.3 Related HOWTO's re the Serial Port
     1.4 Feedback
     1.5 What is a Serial Port?

  2. How the Hardware Transfers Bytes

     2.1 Transmitting
     2.2 Receiving
     2.3 The Large Serial Buffers

  3. Serial Port Basics

     3.1 What is a Serial Port ?
        3.1.1 Intro to Serial
        3.1.2 Pins and Wires
        3.1.3 RS-232 or EIA-232, etc.
     3.2 IO Address & IRQ
     3.3 Names: ttyS0, ttyS1, etc.
     3.4 Interrupts
     3.5 Data Flow (Speeds)
     3.6 Flow Control
        3.6.1 Example of Flow Control
        3.6.2 Symptoms of No Flow Control
        3.6.3 Hardware vs. Software Flow Control
     3.7 Data Flow Path; Buffers
     3.8 Complex Flow Control Example
     3.9 Serial Software: Device Driver Module

  4. Is the Serial Port Obsolete?

     4.1 Introduction
     4.2 EIA-232 Cable Is Low Speed & Short Distance
     4.3 Inefficient Interface to the Computer

  5. Multiport Serial Boards/Cards/Adapters

     5.1 Intro to Multiport Serial
     5.2 Making "devices" in the /dev directory
     5.3 Standard PC Serial Cards
     5.4 Dumb Multiport Serial Boards (with standard UART chips)
     5.5 Intelligent Multiport Serial Boards
     5.6 Unsupported Multiport Boards

  6. Configuring the Serial Port

     6.1 PCI Bus Support Underway
     6.2 Configuring Overview
     6.3 Common mistakes made re low-level configuring
     6.4 I/O Address & IRQ: Boot-time messages
     6.5 What is the current IO address and IRQ of my Serial Port ?
        6.5.1 What does the device driver think?
        6.5.2 What is set in my serial port hardware ?
        6.5.3 What is set in my PnP serial port hardware ?
     6.6 Choosing Serial IRQs
        6.6.1 IRQ 0 is not an IRQ
        6.6.2 Interrupt sharing and Kernels 2.2+
        6.6.3 What IRQs to choose?
     6.7 Choosing Addresses --Video card conflict with ttyS3
     6.8 Set IO Address & IRQ in the hardware (mostly for PnP)
        6.8.1 Using a PnP BIOS to I0-IRQ Configure
     6.9 Giving the IRQ and IO Address to Setserial
     6.10 High-level Configuring: stty, etc.
        6.10.1 Configuring Flow Control: Hardware Flow Control is Best

  7. Serial Port Devices /dev/ttyS2, etc.

     7.1 Serial Port Device Names & Numbers
     7.2 Link ttySN to /dev/modem ?
     7.3 Notes For Multiport Boards
     7.4 Creating Devices In the /dev directory

  8. Interesting Programs You Should Know About

     8.1 Serial Monitoring/Diagnostics Programs
     8.2 Changing Interrupt Priority
     8.3 What is Setserial ?
        8.3.1 Introduction
        8.3.2 Probing
        8.3.3 Boot-time Configuration
        8.3.4 Configuration Scripts/Files
        8.3.5 Edit a script (after version 2.15: perhaps not)
        8.3.6 New configuration method using /etc/serial.conf
        8.3.7 IRQs
     8.4 Stty
        8.4.1 Introduction
        8.4.2 Using stty for a "foreign" terminal
           8.4.2.1 Old redirection method
        8.4.3 Two interfaces at a terminal
        8.4.4 Where to put the stty command ?
     8.5 What is isapnp ?

  9. Speed (Flow Rate)

     9.1 Can't Set a High Enough Speed
        9.1.1 How speed is set in hardware: the divisor and baud_base
        9.1.2 Work-arounds for setting speed
        9.1.3 Crystal frequency is not baud_base
     9.2 Higher Serial Throughput

  10. Locking Out Others

     10.1 Introduction
     10.2 Lock-Files
     10.3 Change Owners, Groups, and/or Permissions of Device Files

  11. Communications Programs And Utilities

     11.1 List of Software
     11.2 kermit and zmodem

  12. Serial Tips And Miscellany

     12.1 Line Drivers
     12.2 Known Defective Hardware
        12.2.1 Avoiding IO Address Conflicts with Certain Video Boards
        12.2.2 Problem with AMD Elan SC400 CPU (PC-on-a-chip)

  13. Troubleshooting

     13.1 Serial Electrical Test Equipment
        13.1.1 Breakout Gadgets, etc.
        13.1.2 Measuring Voltages
        13.1.3 Taste Voltage
     13.2 Serial Monitoring/Diagnostics
     13.3 (The following subsections are in both the Serial and Modem HOWTOs)
     13.4 My Serial Port is Physically There but Can't be Found
     13.5 Extremely Slow: Text appears on the screen slowly after long delays
     13.6 Somewhat Slow: I expected it to be a few times faster
     13.7 The Startup Screen Show Wrong IRQs for the Serial Ports.
     13.8 "Cannot open /dev/ttyS?: Permission denied"
     13.9 "Operation not supported by device" for ttyS?
     13.10 "Cannot create lockfile. Sorry"
     13.11 "Device /dev/ttyS? is locked."
     13.12 "/dev/ttyS?: Device or resource busy"
     13.13 Troubleshooting Tools

  14. Interrupt Problem Details

     14.1 Types of interrupt problems
     14.2 Symptoms of Mis-set or Conflicting Interrupts
     14.3 Mis-set Interrupts
     14.4 Interrupt Conflicts
     14.5 Resolving Interrupt Problems

  15. What Are UARTs?  How Do They Affect Performance?

     15.1 Introduction to UARTS
     15.2 Two Types of UARTs
     15.3 FIFOs
     15.4 UART Model Numbers

  16. Pinout and Signals

     16.1 Pinout
     16.2 Signals May Have No Fixed Meaning
     16.3 Cabling Between Serial Ports
     16.4 RTS/CTS and DTR/DSR Flow Control
        16.4.1 The DTR and DSR Pins
     16.5 Preventing a Port From Opening

  17. Voltage Waveshapes

     17.1 Voltage for a Bit
     17.2 Voltage Sequence for a Byte
     17.3 Parity Explained
     17.4 Forming a Byte (Framing)
     17.5 How "Asynchronous" is Synchronized

  18. Other Serial Devices (not async EIA-232)

     18.1 Successors to EIA-232
     18.2 EIA-422-A (balanced) and EIA-423-A (unbalanced)
     18.3 EIA-485
     18.4 EIA-530
     18.5 EIA-612/613
     18.6 The Universal Serial Bus (USB)
     18.7 Synchronization & Synchronous
        18.7.1 Defining Asynchronous vs Synchronous
        18.7.2 Synchronous Communication

  19. Other Sources of Information

     19.1 Books
     19.2 Serial Software
     19.3 Linux Documents
     19.4 Usenet newsgroups:
     19.5 Serial Mailing List
     19.6 Internet


  ______________________________________________________________________

  1.  Introduction

  This HOWTO covers basic info on the Serial Port and multiport serial
  cards.  Information specific to modems and text-terminals has been
  moved to Modem-HOWTO and Text-Terminal-HOWTO.  Info on getty (the
  program that runs the login process or the like) has been also moved
  to these HOWTOs since mgetty and uugetty are best for modems while
  agetty is best for text-terminals.  If you are dealing with a modem,
  text terminal, or printer, then you may not need to consult this
  HOWTO.  But if you are using the serial port for some other device,
  using a multiport serial card, trouble-shooting the serial port
  itself, or want to understand more technical details of the serial
  port, then you may want to use this HOWTO as well as some of the other
  HOWTOs.  (See ``Related HOWTO's'')  This HOWTO lists info on various
  multiport serial cards since they may be used for either modems or
  text-terminals.  This HOWTO addresses Linux running on Intel x86
  hardware, although it might be valid for other architectures.


  1.1.  Copyright, Disclaimer, & Credits

  1.1.1.  Copyright

  Copyright (c) 1993-1997 by Greg Hankins, 1998-2000 by David S. Lawyer
  <mailto:dave@lafn.org>

  Please freely copy and distribute (sell or give away) this document in
  any format.  Forward any corrections and comments to the document
  maintainer.  You may create a derivative work and distribute it
  provided that you:


  1. Send your derivative work (in the most suitable format such as
     sgml) to the LDP (Linux Documentation Project) or the like for
     posting on the Internet.  If not the LDP, then let the LDP know
     where it is available.  Except for a translation, send a copy to
     the previous maintainer's url as shown in the latest version.

  2. License the derivative work in the spirit of this license or use
     GPL.  Include a copyright notice and at least a pointer to the
     license used.

  3. Give due credit to previous authors and major contributors.

  If you're considering making a derived work other than a translation,
  it's requested that you discuss your plans with the current
  maintainer.


  1.1.2.  Disclaimer

  While I haven't intentionally tried to mislead you, there are likely a
  number of errors in this document.  Please let me know about them.
  Since this is free documentation, it should be obvious that I cannot
  be held legally responsible for any errors.


  1.1.3.  Trademarks.

  Any brand names (starts with a capital letter) should be assumed to be
  a trademark).  Such trademarks belong to their respective owners.



  1.1.4.  Credits

  Most of the original Serial-HOWTO was written by  Greg Hankins.
  gregh@cc.gatech.edu He also rewrote many contributions by others in
  order to maintain continuity in the writing style and flow.  He wrote:
  "Thanks to everyone who has contributed or commented, the list of
  people has gotten too long to list (somewhere over one hundred).
  Special thanks to Ted Ts'o for answering questions about the serial
  drivers.  Approximately half of v2.00 was from Greg Hankins HOWTO and
  the other half is by David Lawyer.  Ted Ts'o has continued to be
  helpful.


  1.2.  New Versions of this Serial-HOWTO

  New versions of the Serial-HOWTO will be available to browse and/or
  download at LDP mirror sites.  For a list of mirror sites see:
  <http://metalab.unc.edu/LDP/mirrors.html>.  Various formats are
  available.  If you only want to quickly check the date of the latest
  version look at  <http://metalab.unc.edu/LDP/HOWTO/Serial-HOWTO.html>
  and compare it to this version: v2.08 June 2000 .  New in this version
  is: /proc/tty, fixed link to Gary's Encyclopedia.


  1.3.  Related HOWTO's re the Serial Port

  Modems, Text-Terminals, some printers, and other peripherals often use
  the serial port.  Get these HOWTOs from the nearest mirror site as
  explained above.


    Modem-HOWTO is about installing and configuring modems

    Printing-HOWTO has info on using a serial printer

    Serial-Programming-HOWTO helps you write C programs (or parts of
     them) that read and write to the serial port and/or check/set its
     state.  A new version has been written by Vern Hoxie but not
     submitted.  A copy is at ``Internet''.

    Text-Terminal-HOWTO is about how they work, how to install
     configure, and repair them.  It includes a section on "Make a
     Terminal the Console" which is useful for using a remote terminal
     to control a server (via the serial port).


  1.4.  Feedback

  Please send me any questions, comments, suggestions, or additional
  material.  I'm always eager to hear about what you think about this
  HOWTO.  I'm also always on the lookout for improvements!  Tell me
  exactly what you don't understand, or what could be clearer.  You can
  reach me via email at  (David Lawyer).


  1.5.  What is a Serial Port?

  The conventional serial port (not the newer USB port, or HSSI port) is
  a very old I/O port.  Almost all PC's have them.  But Macs (Apple
  Computer) after mid 1998 (with colored cases) only have the USB port.
  The common specification is RS-232 (or EIA-232).  The connector for
  the serial port is often seen as one or two 9-pin connectors (in some
  cases 25-pin) on the back of a PC.  But the serial port is is more
  than just that.  It includes the associated electronics which must
  produce signals conforming to the EIA-232 specification.  See
  ``Voltage Waveshapes''.  One pin is used to send out data bytes and
  another to receive data bytes.  Another pin is a common signal ground.
  The other "useful" pins are used mainly for signalling purposes with a
  steady negative voltage meaning "off" and a steady positive voltage
  meaning "on".

  The UART (Universal Asynchronous Receiver-Transmitter) chip does most
  of the work.  Today, the functionality of this chip is usually built
  into another chip.  See ``What Are UARTs?'' These have improved over
  time and old models (several years old) are now obsolete.

  The serial port was originally designed for connecting modems but it's
  used to connect many other devices also such as mice, text-terminals,
  some printers, etc. to a computer.  You just plug these devices into
  the serial port using the correct cable.  Many internal modem cards
  have a built-in serial port so when you install one inside your PC
  it's as if you just installed another serial port in your PC.


  2.  How the Hardware Transfers Bytes

  Below is an introduction to the topic, but for a more advance
  treatment of it see ``FIFOs''.


  2.1.  Transmitting

  Transmitting is sending bytes out of the serial port away from the
  computer.  Once you understand transmitting, receiving is easy to
  understand since it's similar.  The first explanation given here will
  be grossly oversimplified.  Then more detail will be added in later
  explanations.  When the computer wants to send a byte out the serial
  port (to the external cable) the CPU sends the byte on the bus inside
  the computer to the I/O address of the serial port.  The serial port
  takes the byte, and sends it out one bit at a time (a serial bit-
  stream) on the transmit pin of the serial cable connector.  For what a
  bit (and byte) look like electrically see ``Voltage Waveshapes''.

  Here's a replay of the above in a little more detail (but still very
  incomplete).  Most of the work at the serial port is done by the UART
  chip (or the like).  To transmit a byte, the serial device driver
  program (running on the CPU) sends a byte to the serial port"s I/O
  address.  This byte gets into a 1-byte "transmit shift register" in
  the serial port.  From this shift register bits are taken from the
  byte one-by-one and sent out bit-by-bit on the serial line.  Then when
  the last bit has been sent and the shift register needs another byte
  to send it could just ask the CPU to send it another byte.  Thus would
  be simple but it would likely introduce delays since the CPU might not
  be able to get the byte immediately.  After all, the CPU is usually
  doing other things besides just handling the serial port.

  A way to eliminate such delays is to arrange things so that the CPU
  gets the byte before the shift register needs it and stores it in a
  serial port buffer (in hardware).  Then when the shift register has
  sent out its byte and needs a new byte immediately, the serial port
  hardware just transfers the next byte from its own buffer to the shift
  register.  No need to call the CPU to fetch a new byte.

  The size of this serial port buffer was originally only one byte, but
  today it is usually 16 bytes (more in higher priced serial ports).
  Now there is still the problem of keeping this buffer sufficiently
  supplied with bytes so that when the shift register needs a byte to
  transmit it will always find one there (unless there are no more bytes
  to send).  This is done by contacting the CPU using an interrupt.

  First we'll explain the case of the old fashioned one-byte buffer,
  since 16-byte buffers work similarly (but are more complex).  When the
  shift register grabs the byte out of the buffer and the buffer needs
  another byte, it sends an interrupt to the CPU by putting a voltage on
  a dedicated wire on the computer bus.  Unless the CPU is doing
  something very important, the interrupt forces it to stop what it was
  doing and start running a program which will supply another byte to
  the port's buffer.  The purpose of this buffer is to keep an extra
  byte (waiting to be sent) queued in hardware so that there will be no
  gaps in the transmission of bytes out the serial port cable.

  Once the CPU gets the interrupt, it will know who sent the interrupt
  since there is a dedicated interrupt wire for each serial port (unless
  interrupts are shared).  Then the CPU will start running the serial
  device driver which checks registers at I/0 addresses to find out what
  has happened.  It finds out that the serial's transmit buffer is empty
  and waiting for another byte.  So if there are more bytes to send, it
  sends the next byte to the serial port's I/0 address.  This next byte
  should arrive when the previous byte is still in the transmit shift
  register and is still being transmitted bit-by-bit.

  In review, when a byte has been fully transmitted out the transmit
  wire of the serial port and the shift register is now empty the
  following 3 things happen almost simultaneously:


  1. The next byte is moved from the transmit buffer into the transmit
     shift register

  2. The transmission of this new byte (bit-by-bit) begins

  3. Another interrupt is issued to tell the device driver to send yet
     another byte to the now empty transmit buffer

  Thus we say that the serial port is interrupt driven.  Each time the
  serial port issues an interrupt, the CPU sends it another byte.  Once
  a byte has been sent to the transmit buffer by the CPU, then the CPU
  is free to pursue some other activity until it gets the next
  interrupt.  The serial port transmits bits at a fixed rate which is
  selected by the user (or an application program).  It's sometimes
  called the baud rate.  The serial port also adds extra bits to each
  byte (start, stop and perhaps parity bits) so there are often 10 bits
  sent per byte.  At a rate (also called speed) of 19,200 bits per
  second (bps), there are thus 1,920 bytes/sec (and also 1,920
  interrupts/sec).

  Doing all this is a lot of work for the CPU.  This is true for many
  reasons.  First, just sending one 8-bit byte at a time over a 32-bit
  data bus (or even 64-bit) is not a very efficient use of bus width.
  Also, there is a lot of overhead in handing each interrupt.  When the
  interrupt is received, the device driver only knows that something
  caused an interrupt at the serial port but doesn't know that it's
  because a character has been sent.  The device driver has to make
  various checks to find out what happened.  The same interrupt could
  mean that a character was received, one of the control lines changed
  state, etc.

  A major improvement has been the enlargement of the buffer size of the
  serial port from 1-byte to 16-bytes.  This means that when the CPU
  gets an interrupt it gives the serial port up to 16 new bytes to
  transmit.  This is fewer interrupts to service but data must still be
  transferred one byte at a time over a wide bus.  The 16-byte buffer is
  actually a FIFO (First In First Out) queue and is often called a FIFO.
  See ``FIFOs'' for details about the FIFO along with a repeat of some
  of the above info.



  2.2.  Receiving

  Receiving bytes by a serial port is similar to sending them only it's
  in the opposite direction.  It's also interrupt driven.  For the
  obsolete type of serial port with 1-byte buffers, when a byte is fully
  received from the external cable it goes into the 1-byte receive
  buffer.  Then the port gives the CPU an interrupt to tell it to pick
  up that byte so that the serial port will have room for storing the
  next byte which is currently being received.  For newer serial ports
  with 16-byte buffers, this interrupt (to fetch the bytes) may be sent
  after 14 bytes are in the receive buffer.  The CPU then stops what it
  was doing, runs the interrupt service routine, and picks up 14 to 16
  bytes from the port.  For an interrupt sent when the 14th byte has
  been received, there could be 16 bytes to get if 2 more bytes have
  arrived since the interrupt.  But if 3 more bytes should arrive
  (instead of 2), then the 16-byte buffer will overrun.  It also may
  pick up less than 14 bytes by setting it that way or due to timeouts.
  See ``FIFOs'' for more details.


  2.3.  The Large Serial Buffers

  We've talked about small 16-byte serial port hardware buffers but
  there are also much larger buffers in main memory.  When the CPU takes
  some bytes out of the receive buffer of the hardware, it puts them
  into a much larger (say 8k-byte) receive buffer in main memory.  Then
  a program that is getting bytes from the serial port takes the bytes
  it's receiving out of that large buffer (using a "read" statement in
  the program).  A similar situation exists for bytes that are to be
  transmitted.  When the CPU needs to fetch some bytes to be transmitted
  it takes them out of a large (8k-byte) transmit buffer in main memory
  and puts them into the small 16-byte transmit buffer in the hardware.


  3.  Serial Port Basics

  You don't have to understand the basics to use the serial port But
  understanding it may help to determine what is wrong if you run into
  problems.  This section not only presents new topics but also repeats
  some of what was said in the previous section ``How the Hardware
  Transfers Bytes'' but in greater detail.


  3.1.  What is a Serial Port ?

  3.1.1.  Intro to Serial

  The serial port is an I/O (Input/Output) device.

  An I/O device is just a way to get data into and out of a computer.
  There are many types of I/O devices such as serial ports, parallel
  ports, disk drive controllers, ethernet boards, universal serial
  buses, etc.  Most PC's have one or two serial ports.  Each has a 9-pin
  connector (sometimes 25-pin) on the back of the computer.  Computer
  programs can send data (bytes) to the transmit pin (output) and
  receive bytes from the receive pin (input).  The other pins are for
  control purposes and ground.

  The serial port is much more than just a connector.  It converts the
  data from parallel to serial and changes the electrical representation
  of the data.  Inside the computer, data bits flow in parallel (using
  many wires at the same time).  Serial flow is a stream of bits over a
  single wire (such as on the transmit or receive pin of the serial
  connector).  For the serial port to create such a flow, it must
  convert data from parallel (inside the computer) to serial on the
  transmit pin (and conversely).
  Most of the electronics of the serial port is found in a computer chip
  (or a section of a chip) known as a UART.  For more details on UARTs
  see the section ``What Are UARTs?  How Do They Affect Performance?''.
  But you may want to finish this section first so that you will
  hopefully understand how the UART fits into the overall scheme of
  things.


  3.1.2.  Pins and Wires

  Old PC's used 25 pin connectors but only about 9 pins were actually
  used so today most connectors are only 9-pin.  Each of the 9 pins
  usually connects to a wire.  Besides the two wires used for
  transmitting and receiving data, another pin (wire) is signal ground.
  The voltage on any wire is measured with respect to this ground.  Thus
  the minimum number of wires to use for 2-way transmission of data is
  3.  Except that it has been known to work with no signal ground wire
  but with degraded performance and sometimes with errors.

  There are still more wires which are for control purposes (signalling)
  only and not for sending bytes.  All of these signals could have been
  shared on a single wire, but instead, there is a separate dedicated
  wire for every type of signal.  Some (or all) of these control wires
  are called "modem control lines".  Modem control wires are either in
  the asserted state (on) of +12 volts or in the negated state (off) of
  -12 volts.  One of these wires is to signal the computer to stop
  sending bytes out the serial port cable.  Conversely, another wire
  signals the device attached to the serial port to stop sending bytes
  to the computer.  If the attached device is a modem, other wires may
  tell the modem to hang up the telephone line or tell the computer that
  a connection has been made or that the telephone line is ringing
  (someone is attempting to call in).  See section ``Pinout and
  Signals'' for more details.



  3.1.3.  RS-232 or EIA-232, etc.

  The serial port (not the USB) is usually a RS-232-C, EIA-232-D, or
  EIA-232-E.  These three are almost the same thing.  The original RS
  (Recommended Standard) prefix became EIA (Electronics Industries
  Association) and later EIA/TIA after EIA merged with TIA
  (Telecommunications Industries Association).  The EIA-232 spec
  provides also for synchronous (sync) communication but the hardware to
  support sync is almost always missing on PC's.  The RS designation is
  obsolete but is still widely used.  EIA will be used in this howto.
  Some documents use the full EIA/TIA designation.  For info on other
  (non-EIA-232) serial ports see the section ``Other Serial Devices (not
  async EIA-232)''


  3.2.  IO Address & IRQ

  Since the computer needs to communicate with each serial port, the
  operating system must know that each serial port exists and where it
  is (its I/O address).  It also needs to know which wire (IRQ number)
  the serial port must use to request service from the computer's CPU.
  It requests service by sending an interrupt on this wire.  Thus every
  serial port device must store in its non-volatile memory both its I/O
  address and its Interrupt ReQuest number: IRQ.  See ``Interrupts''.
  For the PCI bus it doesn't work exactly this way since the PCI bus has
  its own system of interrupts.  But since the PCI-aware BIOS sets up
  chips to map these PCI interrupts to IRQs, it seemingly behaves just
  as described above except that sharing of interrupts is allowed (2 or
  more devices may use the same IRQ number).
  I/O addresses are not the same as memory addresses.  When an I/O
  addresses is put onto the computer's address bus, another wire is
  energized.  This both tells main memory to ignore the address and
  tells all devices which have I/O addresses (such as the serial port)
  to listen to the address to see if it matches the device's.  If the
  address matches, then the I/O device reads the data on the data bus.


  3.3.  Names: ttyS0, ttyS1, etc.

  The serial ports are named ttyS0, ttyS1, etc. (and usually correspond
  respectively to COM1, COM2, etc. in DOS/Windows).  The /dev directory
  has a special file for each port.  Type "ls /dev/ttyS*" to see them.
  Just because there may be (for example) a ttyS3 file, doesn't
  necessarily mean that there exists a physical serial port there.

  Which one of these names (ttyS0, ttyS1, etc.) refers to which physical
  serial port is determined as follows.  The serial driver (software)
  maintains a table showing which I/O address corresponds to which ttyS.
  This mapping of names (such as ttyS1) to I/O addresses (and IRQ's) may
  be both set and viewed by the "setserial" command.  See ``What is
  Setserial''.  This does not set the I/O address and IRQ in the
  hardware itself (which is set by jumpers or by plug-and-play
  software).  Thus what physical port corresponds to say ttyS1 depends
  both on what the serial driver thinks (per setserial) and what is set
  in the hardware.  If a mistake has been made, the physical port may
  not correspond to any name (such as ttyS2) and thus it can't be used.
  See ``Serial Port Devices /dev/ttyS2, etc.'' for more details>


  3.4.  Interrupts



  When the serial port receives a number of bytes (may be set to 1, 4,
  8, or 14) into its FIFO buffer, it signals the CPU to fetch them by
  sending an electrical signal known as an interrupt on a certain wire
  normally used only by that port.  Thus the FIFO waits for a number of
  bytes and then issues an interrupt.

  However, this interrupt will also be sent if there is an unexpected
  delay while waiting for the next byte to arrive (known as a timeout).
  Thus if the bytes are being received slowly (such as someone typing on
  a terminal keyboard) there may be an interrupt issued for every byte
  received.  For some UART chips the rule is like this: If 4 bytes in a
  row could have been received, but none of these 4 show up, then the
  port gives up waiting for more bytes and issues an interrupt to fetch
  the bytes currently in the FIFO.  Of course, if the FIFO is empty, no
  interrupt will be issued.

  Each interrupt conductor (inside the computer) has a number (IRQ) and
  the serial port must know which conductor to use to signal on.  For
  example, ttyS0 normally uses IRQ number 4 known as IRQ4 (or IRQ 4).  A
  list of them and more will be found in "man setserial" (search for
  "Configuring Serial Ports").  Interrupts are issued whenever the
  serial port needs to get the CPU's attention.  It's important to do
  this in a timely manner since the buffer inside the serial port can
  hold only 16 (1 in old serial ports) incoming bytes.  If the CPU fails
  to remove such received bytes promptly, then there will not be any
  space left for any more incoming bytes and the small buffer may
  overflow (overrun) resulting in a loss of data bytes.  There is no
  ``Flow Control'' to prevent this.

  Interrupts are also issued when the serial port has just sent out all
  16 of its bytes from its small transmit buffer out the external cable.
  It then has space for 16 more outgoing bytes.  The interrupt is to
  notify the CPU of that fact so that it may put more bytes in the small
  transmit buffer to be transmitted.  Also, when a modem control line
  changes state an interrupt is issued.

  The buffers mentioned above are all hardware buffers.  The serial port
  also has large buffers in main memory.  This will be explained later

  Interrupts convey a lot of information but only indirectly.  The
  interrupt itself just tells a chip called the interrupt controller
  that a certain serial port needs attention.  The interrupt controller
  then signals the CPU.  The CPU runs a special program to service the
  serial port.  That program is called an interrupt service routine
  (part of the serial driver software).  It tries to find out what has
  happened at the serial port and then deals with the problem such a
  transferring bytes from (or to) the serial port's hardware buffer.
  This program can easily find out what has happened since the serial
  port has registers at IO addresses known to the the serial driver
  software.  These registers contain status information about the serial
  port.  The software reads these registers and by inspecting the
  contents, finds out what has happened and takes appropriate action.



  3.5.  Data Flow (Speeds)

  Data (bytes representing letters, pictures, etc.) flows into and out
  of your serial port.  Flow rates (such as 56k (56000) bits/sec) are
  (incorrectly) called "speed".  But almost everyone says "speed"
  instead of "flow rate".

  It's important to understand that the average speed is often less than
  the specified speed.  Waits (or idle time) result in a lower average
  speed.  These waits may include long waits of perhaps a second due to
  ``Flow Control''.  At the other extreme there may be very short waits
  (idle time) of several micro-seconds between bytes.  If the device on
  the serial port (such as a modem) can't accept the full serial port
  speed, then the average speed must be reduced.


  3.6.  Flow Control

  Flow control means the ability to stop the flow of bytes in a wire.
  It also includes provisions to restart the flow without any loss of
  bytes.  Flow control is needed for modems to allow a jump in
  instantaneous flow rates.


  3.6.1.  Example of Flow Control

  For example, consider the case where you connect a 36.6k external
  modem via a short cable to your serial port.  The modem sends and
  receives bytes over the phone line at  36.6k bits per second (bps).
  It's not doing any data compression or error correction.  You have set
  the serial port speed to 115,200 bits/sec (bps), and you are sending
  data from your computer to the phone line.  Then the flow from the
  your computer to your modem over the short cable is at 115.2k bps.
  However the flow from your modem out the phone line is only 33.6k bps.
  Since a faster flow (115.2k) is going into your modem than is coming
  out of it, the modem is storing the excess flow (115.2k -33.6k = 81.6k
  bps) in one of its buffers.  This buffer would eventually overrun (run
  out of free storage space) unless the 115.2k flow is stopped.


  But now flow control comes to the rescue.  When the modem's buffer is
  almost full, the modem sends a stop signal to the serial port.  The
  serial port passes on the stop signal on to the device driver and the
  115.2k bps flow is halted.  Then the modem continues to send out data
  at 33.6k bps drawing on the data it previous accumulated in its
  buffer.  Since nothing is coming into the buffer, the level of bytes
  in it starts to drop.  When almost no bytes are left in the buffer,
  the modem sends a start signal to the serial port and the 115.2k flow
  from the computer to the modem resumes.  In effect, flow control
  creates an average flow rate in the short cable (in this case 33.6k)
  which is significantly less than the "on" flow rate of 115.2k bps.
  This is "start-stop" flow control.

  The above is a simple example of flow control for flow from the
  computer to a modem , but there is also flow control which is used for
  the opposite direction of flow: from a modem (or other device) to a
  computer.  Each direction of flow involve 3 buffers: 1. in the modem
  2. in the UART chip (called FIFOs) 3. in main memory managed by the
  serial driver.  Flow control protects certain buffers from
  overflowing.  The small UART FIFO buffers are not protected in this
  way but rely instead on a fast response to the interrupts they issue.
  FIFO stand for "First In, First Out" which is the way it handles
  bytes.  All the 3 buffers use the FIFO rule but only one of them also
  uses it as a name.  This is the essence of flow control but there are
  still some more details.



  3.6.2.  Symptoms of No Flow Control

  Understanding flow-control theory can be of practical use.  The
  symptom of no flow control is chunks of data missing from files sent
  without the benefit of flow control.  This is because when overflow
  happens, it's usually more than just a few bytes that overflow and are
  lost.  Often hundreds or even thousands of bytes get lost, and all in
  contiguous chunks.


  3.6.3.  Hardware vs. Software Flow Control

  If feasible it's best to use "hardware" flow control that uses two
  dedicated "modem control" wires to send the "stop" and "start"
  signals.


  Software flow control uses the main receive and transmit wires to send
  the start and stop signals.  It uses the ASCII control characters DC1
  (start) and DC3 (stop) for this purpose.  They are just inserted into
  the regular stream of data.  Software flow control is not only slower
  in reacting but also does not allow the sending of binary data unless
  special precautions are taken.  Since binary data will likely contain
  DC1 and DC3, special means must be taken to distinguish between a DC3
  that means a flow control stop and a DC3 that is part of the binary
  code.  Likewise for DC1.



  3.7.  Data Flow Path; Buffers

  Although much has been explained about this including flow control, a
  pair of 16-byte FIFO buffers (in the hardware), and a pair of larger
  buffers inside a device connected to the serial port there is still
  another pair of buffers.  These are large buffers (perhaps 8k) in main
  memory also known as serial port buffers.  When an application program
  sends bytes to the serial port they first get stashed in the the
  transmit serial port buffer in main memory.  The pair consists of both
  this transmit buffer and a receive buffer for the opposite direction
  of byte-flow.

  The serial device driver takes out say 16 bytes from this transmit
  buffer, one byte at a time and puts them into the 16-byte transmit
  buffer in the serial hardware for transmission.  Once in that transmit
  buffer, there is no way to stop them from being transmitted.  They are
  then transmitted to the device connected to the serial port which also
  has a fair sized (say 1k) buffer.  When the device driver (on orders
  from flow control) stops the flow of outgoing bytes from the computer,
  what it actually stops is the flow of outgoing bytes from the large
  transmit buffer in main memory.  Even after this has happened and the
  flow to the device connected to the serial port has stopped, an
  application program may keep sending bytes to the 8k transmit buffer
  until it becomes fill.

  When it gets fill, the application program can't send any more bytes
  to it (a "write" statement in a C_program blocks) and the application
  program temporarily stops running and waits until some buffer space
  becomes available.  Thus a flow control "stop" is ultimately able to
  stop the program that is sending the bytes.  Even though this program
  stops, the computer does not necessarily stop computing.  It may
  switch to running other processes while it's waiting at a flow control
  stop.  The above was a little oversimplified since there is another
  alternative of having the application program itself do something else
  while it is waiting to "write".



  3.8.  Complex Flow Control Example

  For many situations, there is a transmit path involving several links,
  each with its own flow control.  For example, I type at a text-
  terminal connected to a PC with a modem to access a BBS.  For this I
  use the application program "minicom" which deals with 2 serial ports:
  one connected to a modem and another connected to the text-terminal.
  What I type at the text terminal goes into the first serial port to
  minicom, then from minicom out the second serial port to the modem,
  and then onto the telephone line to the BBS.  The text-terminal has a
  limit to the speed at which bytes can be displayed on its screen and
  issues a flow control "stop" from time to time to slow down the flow.
  What happens when such a "stop" is issued?  Let's consider a case
  where the "stop" is long enough to get thru to the BBS and stop the
  program at the BBS which is sending out the bytes.

  Let's trace out the flow of this "stop" (which may be "hardware" on
  some links and "software" on others).  First, suppose I'm "capturing"
  a long file from the BBS which is being sent simultaneously to both my
  text-terminal and a to file on my hard-disk.  The bytes are coming in
  faster than the terminal can handle them so it sends a "stop" out its
  serial port to the first serial port on my PC.  The device driver
  detects it and stops sending bytes from the 8k serial buffer (in main
  memory) to the terminal.  Now minicom still keeps sending out bytes
  for the terminal into this 8k buffer.

  When this 8k transmit buffer (on the first serial port) is full,
  minicom must stop writing to it.  Minicom stops and waits.  But this
  also causes minicom to stop reading from the 8k receive buffer on the
  2nd serial port connected to the modem.  Flow from the modem continues
  until this 8k buffer too fills up and sends a different "stop" to the
  modem.  Now the modem's buffer ceases to send to the serial port and
  also fills up.  The modem (assuming error correction is enabled) sends
  a "stop signal" to the other modem at the BBS.  This modem stops
  sending bytes out of its buffer and when its buffer gets fill, another
  stop signal is sent to the serial port of the BBS.  At the BBS, the
  8-k (or whatever) buffer fills up and the program at the BBS can't
  write to it anymore and thus temporarily halts.

  Thus a stop signal from a text terminal has halted a programs on a BBS
  computer.  What a complex sequence of events!  Note that the stop
  signal passed thru 4 serial ports, 2 modems, and one application
  program (minicom).  Each serial port has 2 buffers (in one direction
  of flow): the 8k one and the hardware 16-byte one.  The application
  program may have a buffer in its C_code.  This adds up to 11 different
  buffers the data is passing thru.  Note that the small serial hardware
  buffers do not participate directly in flow control.

  If the terminal speed limitation is the bottleneck in the flow from
  the BBS to the terminal, then its flow control "stop" is actually
  stopping the program that is sending from the BBS as explained above.
  But you may ask: How can a "stop" last so long that 11 buffers (some
  of them large) all get filled up?   It can actually happen this way if
  all the buffers were near their upper limits when the terminal sent
  out the "stop".

  But if you were to run a simulation on it you would discover that it's
  usually more complicated than this.  At an instant of time some links
  are flowing and others are stopped (due to flow control).  A "stop"
  from the terminal seldom propagates back to the BBS neatly as
  described above.  It may take a few "stops" from the terminal to
  result in one "stop" at the BBS.  To understand what is going on you
  really need to observe a simulation which can be done for a simple
  case with coins on a table.  Use only a few buffers and set the upper
  level for each buffer at only a few coins.

  Does one really need to understand all this?  Well, understanding this
  explained to me why capturing text from a BBS was loosing text.  The
  situation was exactly the above example but modem-to-modem flow
  control was disabled.  Chunks of captured text that were supposed to
  also get to my hard-disk never got there because of an overflow at my
  modem buffer due to flow control "stops" from the terminal.  Even
  though the BBS had a flow path to the hard-disk without bottlenecks,
  the overflow due to the terminal happened on this path and chunks of
  text were lost and never even made it to the hard-disk.  Note that the
  flow to the hard-disk passed thru my modem and since the overflow
  happened there, bytes intended for the hard-disk were lost.


  3.9.  Serial Software: Device Driver Module

  The device driver for the serial port is the software that operates
  the serial port.  It is now provided as a serial module.  This module
  will normally get loaded automatically if it's needed.  The kernel 2.2
  + will do this.  In earlier kernels, you had to have kerneld running
  in order to do auto-load modules on demand.  Otherwise the serial
  module needed to be explicitly listed in /etc/modules.  Before modules
  became popular with Linux, the serial driver was usually built into
  the kernel.  If it's still built into the kernel (you might have
  selected this when you compiled the kernel) don't let the serial
  module load.  If you do and wind up with two serial drivers, it's
  reported that you can't use the serial ports and get an "I/O error" if
  an attempt is made to open them.

  When the serial module is loaded it displays a message on the screen
  about the existing serial ports (often showing a wrong IRQ).  But once
  the module is used by setserial to tell the device driver the
  (hopefully) correct IRQ then you should see a second display similar
  to the first but with the correct IRQ, etc. See ``What is Setserial''
  for more info on setserial. )

  One may modify the driver by editing the kernel source code.  Much of
  the serial driver is found in the file serial.c.  For details
  regarding writing of programs for the serial port see Serial-
  Programming-HOWTO (currently being revised by Vern Hoxie).



  4.  Is the Serial Port Obsolete?

  4.1.  Introduction

  The answer is yes, but ... The serial port is somewhat obsolete but
  it's still needed, especially for Linux.  The serial port has many
  shortcomings but almost all new PC's seem to come with them them.
  Linux supports ordinary telephone modems only if they work thru a
  serial port.

  The serial port must pass data between the computer and the external
  cable.  Thus it has two interfaces and both of these interfaces are
  slow.  First we'll consider the interface via external cable to the
  outside world.


  4.2.  EIA-232 Cable Is Low Speed & Short Distance

  The conventional EIA-232 serial port is inherently low speed and is
  severely limited in distance.  Ads often read "high speed" but it can
  only work at "high speed" over very short distances such as to a modem
  located right next to the computer.  Compared to a network card, even
  this "high speed" is low speed.  All of the serial cable wires use a
  common ground return wire so that twisted-pair technology (needed for
  high speeds) can't be used without additional hardware.  More modern
  interfaces for serial ports exist but they are not standard on PC's
  like the EIA-232 is.  See ``Successors to EIA-232''.  Some multiport
  serial cards support them.

  It is somewhat tragic that the RS-232 standard from 1969 did not use
  twisted pair technology which could operate about a hundred times
  faster.  Twisted pairs have been used in telephone cables since the
  late 1800's.  In 1888 (over 110 years ago) the "Cable Conference"
  reported its support of twisted-pair (for telephone systems) and
  pointed out its advantages.  But over 80 years after this approval by
  the "Cable Conference", RS-232 failed to utilize it.   Since RS-232
  was originally designed for connecting a terminal to a low speed modem
  located nearby, the need for high speed and longer distance
  transmission was apparently not recognized.


  4.3.  Inefficient Interface to the Computer

  To communicate with the computer, any I/O device needs to have an
  address so that the computer can write to it and read from it.  For
  this purpose many I/O devices (such as serial ports) use a special
  type of address known as an I/O addresses (sometimes called an I/O
  port).   It's actually a range of addresses and the lower address in
  this range is the base address.  If someone only says (or writes)
  "address" it likely really means "base address"

  Instead of using I/O, addresses some I/O devices read and write
  directly from/to main memory.  This provides more bandwidth since the
  conventional serial I/O system only moves a byte at a time.  There are
  various ways to read/write directly to main memory.  One way is called
  shared memory I/O (where the shared memory is usually on the same card
  as the I/O device).  Other methods are DMA (direct memory access) on
  the ISA bus and  what is about the same as DMA (only much faster):
  "bus mastering" on the PCI bus.  These methods are a lot faster than
  those used for the serial port.  Thus the conventional serial port
  with its interrupt driven (every 14 bytes) interface and single bytes
  transfers on a bus which could accommodate 4 (or 8) bytes at a time is
  not suited for very high speed I/O.


  5.  Multiport Serial Boards/Cards/Adapters

  5.1.  Intro to Multiport Serial

  Multiport serial cards install in a slot in a PC on the ISA or PCI
  bus.  Instead of being called "... cards" they are also called "...
  adapters" or "... boards".  Each such card provides you with many
  serial ports.  Today they are commonly used for the control of
  external devices (including automation for both industry and the
  home).  They can connect to computer servers for the purpose of
  monitoring/controlling the server from a remote location.  They were
  once mainly used for connecting up many terminals and/or modems to
  serial ports.  They are still used this way but a modem used with it
  has the same limitation of ordinary modems: It can't send at over
  33.6k even if it is a 56k modem.

  Thus if someone dials in to you (reaches your multiport serial card
  from a modem plugged into the card) they will not be able to go above
  33.6k in either direction, even if they use a 56k modem.  To go above
  33.6k for dial-in requires that you have a digital connection to the
  telephone line.  The serial port is no longer used for this case.
  Thus serial multiport cards are now obsolete for use by ISPs or anyone
  that needs to allow others to dial-in to them at 56k (over 33.6k).
  See Modem-HOWTO: Modem Pools, Digital Modems.

  Each multiport card has a number of external connecters (DB-25 or RJ45
  (telephone-like)) so that one may connect up a number of devices
  (modems, terminals, etc.).  Each such physical device would then be
  connected to its own serial port.  Since the space on the external-
  facing part of the card is limited there is often not enough room for
  all the serial port connectors.  To solve this problem, the connectors
  may be on the ends of cables which come out (externally) from the card
  (octopus cable).  These connectors may also be on a little box which
  is connected by a cable to the multiport card.

  Dumb ones are not too much different than ordinary serial ports.  They
  are interrupt driven and the CPU of the computer does most all the
  work servicing them.  They usually have a system of sharing a single
  interrupt for all the ports.  This doesn't decrease the load on the
  CPU since the single interrupt will be sent to the CPU each time any
  of the ports needs servicing.  Such devices usually require special
  drivers that you must put into the kernel or activate by modifying
  source code.

  Smart boards may use ordinary UARTs but handle most interrupts from
  the UARTs internally within the board.  This frees the CPU from the
  burden of handling  all these interrupts.  The board may save up bytes
  in its large internal FIFOs and transfer perhaps 1k bytes at a time to
  the serial buffer in main memory.  It may use the full bus width of 32
  bits for making data transfers to main memory (instead of transferring
  only 8-bit bytes like dumb serial cards do).  Not all "smart" boards
  are equally efficient.  Many boards today are Plug-and-Play.

  For a smart board to work, a special driver for it must be used.
  Sometimes this driver is built into the kernel source code or supplied
  as a module.  Even in such cases, you must still do something to
  activate it.  This includes selecting it when you compile the kernel
  (or making sure that a pre-compiled kernel has done this).  The "make
  config" or "make menuconf" commands may display an option for this.
  In some cases there is a special module to load or certain parameters
  to pass to the kernel (via lilo's append command).  The board's
  manufacturer should have info on this on their website.
  Unfortunately, info for old boards is sometimes not there but might be
  found somewhere else on the Internet (including discussion groups).


  5.2.  Making "devices" in the /dev directory

  The serial ports your multiport board uses depends on what kind of
  board you have.  Some of these may be listed in detail in rc.serial or
  in 0setserial.  These files may be included in a >setserial or serial
  package.  I highly recommend getting the latest version of setserial
  if you are trying to use multiport boards.  You will probably need to
  create these devices.  Either use the mknod command, or the MAKEDEV
  script.  Devices (in the /dev directory) for serial ports are made by
  adding ``64 + port number''.  So, if you wanted to create devices for
  ttyS17, you would type:



       linux# mknod -m 666 /dev/ttyS17 c 4 81



  Note the "major" number is always 4 for ttyS devices (and 5 for the
  obsolete cua devices).  Also ``64 + 17 = 81''.  Using the MAKEDEV
  script, you would type:



       linux# cd /dev
       linux# ./MAKEDEV ttyS17



  Besides the listing of various brands of multiports found in this
  HOWTO there is Gary's Encyclopedia - Serial Cards
  <http://members.aa.net/~swear/pedia/serialcards.html>.  It's not as
  complete, but may have some different links.


  5.3.  Standard PC Serial Cards

  In olden days PCs used to come with a serial card installed.  Later on
  the serial function was put on the hard-drive interface card.  Today
  one or two serial ports are usually built into the motherboard.  But
  one may still buy the old PC serial cards if they need 1-4 more serial
  ports.  These are for ttyS0-ttyS3 (COM1 - COM4).  They can be used to
  connect external serial devices (modems, serial mice, etc...).  Only a
  tiny percentage of retail computer stores carry such cards.  But one
  can purchase them on the Internet.  Before getting a PCI one, make
  sure Linux supports it.

  Here's a list of a few popular brands:

    Byte Runner (may order directly, shows prices)
     <http://www.byterunner.com>

    SIIG  <http://www.siig.com/io>

    Dolphin  <http://www.dolphinfast.com/sersol/>

  Note: due to address conflicts, you may not be able to use COM4 and
  IBM8514 video card (or some others) simultaneously.  See ``Avoiding IO
  Address Conflicts with Certain Video Boards''


  5.4.  Dumb Multiport Serial Boards (with standard UART chips)

  They are also called "serial adapters".  They often have a special
  method of sharing interrupts which requires that you compile support
  for them into the kernel.

  * =>  The file that ran setserial in Debian shows some details of
  configuring # => See note below for this board

    AST FourPort and clones (4 ports) * #

    Accent Async-4 (4 ports) *

    Arnet Multiport-8 (8 ports)

    Bell Technologies HUB6 (6 ports)

    Boca BB-1004 (4 ports), BB-1008 (8 ports), BB-2016 (16 ports; See
     the mini-howto) * #

    Boca IOAT66 or? ATIO66 (6 ports, Linux doesn't support its IRQ
     sharing ??  Uses odd-ball 10-cond RJ45-like connectors)

    Boca 2by4 (4 serial ports, 2 parallel ports)

    Byte Runner  <http://www.byterunner.com>

    Computone ValuePort V4-ISA (AST FourPort compatible) *

    Digi PC/8 (8 ports) #

    Dolphin  <http://www.dolphinfast.com/sersol/>

    Globetek  <http://www.globetek.com/>

    GTEK BBS-550 (8 ports; See the mini-howto)

    Hayes ESP (after kernel 2.1.15)

    HUB-6 See Bell Technologies.

    Longshine LCS-8880, Longshine LCS-8880+ (AST FourPort compatible) *

    Moxa C104, Moxa C104+ (AST FourPort compatible) *

    NI-SERIAL
     <http://digital.natinst.com/manuals.nsf/web%2Fbyproductcurrent?OpenView&Start=1&Count=500&Expand=15.1#15.1>
     by National Instruments

    PC-COMM (4 ports)

    Sealevel Systems <http://www.sealevel.com> COMM-2 (2 ports), COMM-4
     (4 ports) and COMM-8 (8 ports)

    SIIG I/O Expander 2S IO1812 (4 ports) #

    STB-4COM (4 ports)

    Twincom ACI/550

    Usenet Serial Board II (4 ports) *


  In general, Linux will support any serial board which uses a 8250,
  16450, 16550, 16550A, 16650, etc. UART.  See the latest man page for
  "setserial" for a more complete list.

  Notes:

  AST Fourport: You might need to specify skip_test in rc.serial.

  BB-1004 and BB-1008 do not support DCD and RI lines, and thus are not
  usable for dialin modems.  They will work fine for all other purposes.

  Digi PC/8 Interrupt Status Register is at 0x140.

  SIIG IO1812 manual for the listing for COM5-COM8 is wrong.  They
  should be COM5=0x250, COM6=0x258, COM7=0x260, and COM8=0x268.


  5.5.  Intelligent Multiport Serial Boards

  Make sure that a Linux-compatible driver is available and read the
  information that comes with it.  These boards use special devices (in
  the /dev directory), and not the standard ones.  This information
  varies depending on your hardware.  If you have updated info which
  should be shown here please email it to me.

  Names of Linux driver modules are *.o but these may not work for all
  models shown.  Also, parameters (such as the io and irq often need to
  be given to the module so you need to find instructions on this
  (possibly in the source code tree).

  There are many different brands, each of which often offers many
  different cards.  No attempt is currently being made to list the cards
  here (and many listed may be obsolete).  So this list is a hodgepodge
  of both obsolete and the latest multiport brands/cards.   Contact
  information has been removed if it's available from the webpage.
  Driver information should also be available from the same webpage.
  Where there is no webpage, the cards are likely obsolete.  If you
  would like to put together a more complete list, let me know.


    Chase Research (UK based, ISA/PCI cards)
     webpage:  <www.chaser.com>
     driver status: for 2.2 kernel.  Supported by Chase.

    Comtrol RocketPort (36MHz ASIC; 4, 8, 16, 32, up to 128 ports)
     webpage: http://www.comtrol.com
     driver status: supported by Comtrol.  rocket.o
     driver location: ftp://tsx-11.mit.edu/pub/linux/packages/comtrol

    Computone IntelliPort II (ISA, PCI and EISA busses up to 64 ports)
     webpage:  <http://www.computone.com>
     driver location:
     <ftp://ftp.computone.com/PUB/Products/IntelliPortII/Linux/>, patch
     at  <http://www.wittsend.com/computone/linux-2.2.10-ctone.patch.gz>
     mailing list:  <mailto:majordomo@lazuli.wittsend.com> with
     "subscribe linux-computone" in body
     note: Old ATvantage and Intelliport cards are not supported by
     Computone

    Connecttech
     website:  <http://www.connecttech.com/porducts/products.html>
     driver location:  <ftp://ftp.connecttech.com/pub/linux/>


    Cyclades
     Cyclom-Y (Cirrus Logic CD1400 UARTs; 8 - 32 ports),
     Cyclom-Z (MIPS R3000; 8 - 64 ports)
     website:  <http://www.cyclades.com/products.html>
     driver status: supported by Cyclades
     driver location: ftp://ftp.cyclades.com/pub/cyclades and included
     in Linux kernel since version 1.1.75: cyclades.o

    Decision PCCOM8 (8 ports)
     contact:  <mailto:info@cendio.se>
     website: none (defunct) driver location:
     ftp://ftp.signum.se/pub/pccom8


    Digi PC/Xi (12.5MHz 80186; 4, 8, or 16 ports),
     PC/Xe (12.5/16MHz 80186; 2, 4, or 8 ports),
     PC/Xr (16MHz IDT3041; 4 or 8 ports),
     PC/Xem (20MHz IDT3051; 8 - 64 ports)
     website:  <http://www.dgii.com>
     driver status: supported by Digi
     driver location: ftp://ftp.dgii.com/drivers/linux and included in
     Linux kernel since version 2.0. epca.o

    Digi COM/Xi (10MHz 80188; 4 or 8 ports)
     contact: Simon Park, si@wimpol.demon.co.uk
     driver status: ?
     note: Simon is often away from email for months at a time due to
     his job.  Mark Hatle,  <mailto:fray@krypton.mankato.msus.edu> has
     graciously volunteered to make the driver available if you need it.
     Mark is not maintaining or supporting the driver.

    Equinox SuperSerial Technology (30MHz ASIC; 2 - 128 ports)
     website: http://www.equinox.com
     driver status: supported by Equinox
     driver location: ftp://ftp.equinox.com/library/sst

    Globetek
     website:  <http://www.globetek.com/products.shtml>
     driver location:
     <http://www.globetek.com/media/files/linux.tar.gz>

    GTEK Cyclone (16C654 UARTs; 6, 16 and 32 ports),
     SmartCard (24MHz Dallas DS80C320; 8 ports),
     BlackBoard-8A (16C654 UARTs; 8 ports),
     PCSS (15/24MHz 8032; 8 ports)
     website: http://www.gtek.com
     driver status: supported by GTEK
     driver location: ftp://ftp.gtek.com/pub


    Hayes ESP (COM-bic; 1 - 8 ports)
     website: http://www.nyx.net/~arobinso
     driver status: Supported by Linux kernel (1998) since v. 2.1.15.
     esp.o.  Setserial 2.15+ supports. Also supported by author
     driver location: http://www.nyx.net/~arobinso

    Intelligent Serial Interface by Multi-Tech Systems
     PCI: 4 or 8 port.  ISA 8 port. DTE speed 460.8k
     webpage:  <http://www.multitech.com/products/>

    Maxpeed SS (Toshiba; 4, 8 and 16 ports)
     website: http://www.maxpeed.com
     driver status: supported by Maxpeed
     driver location: ftp://maxpeed.com/pub/ss

    Microgate SyncLink ISA and PCI high speed multiprotocol serial.
     Intended for synchronous HDLC.
     website:  <http://ww/microgate.com/products/sllinux/hdlcapi.htm>
     driver status: supported by Microgate: synclink.o


    Moxa C218 (12MHz 80286; 8 ports),
     Moxa C320 (40MHz TMS320; 8 - 32 ports)
     website: http://www.moxa.com
     driver status: supported by Moxa
     driver locations:
     <http://www.moxa.com/support/download/download.php3>>
      <ftp://ftp.moxa.com/drivers/linux> (also from Taiwan at
     www.moxa.com.tw/...) where ... is the same as above)

    SDL RISCom/8 (Cirrus Logic CD180; 8 ports)
     website: http://www.sdlcomm.com
     driver status: supported by SDL
     driver location: ftp://ftp.sdlcomm.com/pub/drivers


    Specialix SX (25MHz T225; 8? - 32 ports),
     SIO/XIO (20 MHz Zilog Z280; 4 - 32 ports)
     webpage:  <www.specialix.com/products/io/serialio.htm>
     driver status: Supported by Specialix
     driver location:  <http://www.BitWizard.nl/specialix/>
     old driver location:
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/serial>

    Stallion EasyIO-4 (4 ports), EasyIO-8 (8 ports), and
     EasyConnection (8 - 32 ports) - each with Cirrus Logic CD1400
     UARTs,
     Stallion (8MHz 80186 CPU; 8 or 16 ports),
     Brumby (10/12 MHz 80186 CPU; 4, 8 or 16 ports),
     ONboard (16MHz 80186 CPU; 4, 8, 12, 16 or 32 ports),
     EasyConnection 8/64 (25MHz 80186 CPU; 8 - 64 ports)
     contact: sales@stallion.com or http://www.stallion.com
     driver status: supported by Stallion
     driver location: ftp://ftp.stallion.com/drivers/ata5/Linux and
     included in linux kernel since 1.3.27

    System Base website:  <http://www.sysbas.com/>



  A review of Comtrol, Cyclades, Digi, and Stallion products was printed
  in the June 1995 issue of the Linux Journal.  The article is available
  at http://www.ssc.com/lj/issue14.


  5.6.  Unsupported Multiport Boards

  The following boards don't mention any Linux support as of 1 Jan.
  2000.  Let me know if this changes.

    Aurora (PCI only)  <www.auroratech.com>


  6.  Configuring the Serial Port

  6.1.  PCI Bus Support Underway

  The kernel 2.2 serial driver contains no special support for the PCI
  bus.  But kernels 2.3 and 2.4 will eventually support some PCI serial
  cards (and modem cards).  Many PCI cards need special support in the
  driver.  The driver will read the id number digitally stored on the
  card to determine how (or if) to support the card.  If you have a PCI
  card which you are convinced is not a winmodem but it will not work,
  you can help in attempting to create a driver for it.  To do this
  you'll need to contact the maintainer of the serial driver, Theodore
  (Ted) Y. Ts'o.  But first check out the modem list site
  <http://www.o2.net/~gromitkc/winmodem.html> for the latest info on PCI
  modems and related topic.

  You will need to email Ted Ts'o a copy of the output of "lspci -vv"
  with full information about the model and manufacturer of the PCI
  modem (or serial port).  Then he will try to point you to a test
  driver which might work for it.  You will then need to get it, compile
  it and possibly recompile your kernel.  Then you will test the driver
  to see if it works OK for you and report the results to Ted Ts'o.  If
  you are willing to do all the above (and this is the latest version of
  this HOWTO) then email the needed info to him at:
  <mailto:tytso@mit.edu>.

  PCI modems are not well standardized.  Some use main memory for
  communication with the PC.  It you see 8-digit hexadecimal addresses
  it's not likely to work with Linux.  Some require special enabling of
  the IRQ.  The output of "lspci" can help determine if one can be
  supported.  If you see a 4-digit IO port and no long memory address,
  the modem might work by just telling "setserial" the IO port and the
  IRQ.  Some people have gotten a 3COM 3CP5610 PCI Modem to work that
  way.


  6.2.  Configuring Overview

  In many cases, configuring will happen automatically and you have
  nothing to do.  But sometimes you need to configure (or just want to
  check out the configuration).  If so, first you need to know about the
  two parts to configuring the serial port under Linux:

  The first part (low-level configuring) is assigning it an IO address,
  IRQ, and name (such as ttyS2).  This IO-IRQ pair must be set in both
  the hardware and told to the serial driver.  We might just call this
  "io-irq" configuring for short.  The setserial is used to tell the
  driver.  PnP methods, jumpers, etc, are used to set the hardware.
  Details will be supplied later.  If you need to configure but don't
  understand certain details it's easy to get into trouble.

  The second part (high-level configuring) is assigning it a speed (such
  as 38.4k bits/sec), selecting flow control, etc.  This is often done
  by communication programs such as PPP, minicom, or by getty (which you
  may run on the port so that others may log into your computer).
  However you will need to tell these programs what speed you want, etc.
  by using a menu or a configuration file.  This high-level configuring
  may also be done with the stty program.  stty is also useful to view
  the current status if you're having problems.  See also the section
  ``Stty'' When Linux starts, some effort is made to detect and
  configure (low-level) a few serial ports.  Exactly what happens
  depends on your BIOS, hardware, Linux distribution, etc.  If the
  serial ports work OK, there may be no need for you to do any
  configuring.  Application programs often do the high-level configuring
  but you may need to supply them with the required information.  With
  Plug-and-Play serial ports (often built into an internal modem), the
  situation has become more complex.  Here are cases when you need to do
  low-level configuring (set IRQ and IO addresses):


    Plan to use more than 2 serial ports

    Installing a new serial port (such as an internal modem)

    Having problems with serial port(s)


  For kernel 2.2+ you may be able to use more that 2 serial ports
  without low-level configuring by sharing interrupts.  This only works
  if the serial hardware supports it and may be no easier than low-level
  configuring.  See ``Interrupt sharing and Kernels 2.2+''

  The low-level configuring (setting the IRQ and IO address) seems to
  cause people more trouble (than high-level), although for many it's
  fully automatic and there is no configuring to be done.  Thus most all
  of this section is on that topic.  Until the serial driver knows the
  correct IRQ and IO address the port will not work at all.  It may not
  even be found by Linux.  Even if it can be found, it may work
  extremely slow if the IRQ is wrong.  See ``Extremely Slow: Text
  appears on the screen slowly after long delays''.

  In the Wintel world, the IO address and IRQ are called "resources" and
  we are thus configuring certain resources.  But there are many other
  types of "resources" so the term has many other meanings.  In review,
  the low-level configuring consists of putting two values (an IRQ
  number and IO address) into two places:


  1. the device driver (often by running "setserial" at boot-time)

  2. memory registers of the serial port hardware itself

  You may watch the start-up (= boot-time) messages.  They are usually
  correct.  But if you're having problems, there's a good chance that
  some of these messages don't show the true configuration of the
  hardware (and they are not supposed to).  See ``I/O Address & IRQ:
  Boot-time messages''.


  6.3.  Common mistakes made re low-level configuring

  Here are some common mistakes people make:

    setserial command: They run it (without the "autoconfig" option)
     and think it has checked out the hardware (it hasn't).

    setserial messages:  They see them displayed on the screen at boot-
     time, and erroneously think that the result shows how their
     hardware is actually configured.

    /proc/interrupts: When their serial device isn't in use they don't
     see its interrupt there, and erroneously conclude that their serial
     port can't be found (or doesn't have an interrupt set).

    /proc/ioports: People think this shows the hardware configuration
     when it only shows about the same data (possibly erroneous) as
     setserial.


  6.4.  I/O Address & IRQ: Boot-time messages

  In many cases your ports will automatically get low-level configured
  at boot-time (but not always correctly).  To see what is happening,
  look at the start-up messages on the screen.  Don't neglect to check
  the messages from the BIOS before Linux is loaded (no examples shown
  here).  These BIOS messages may be frozen by pressing the Pause key.
  Use Shift-PageUp to go back to all the messages after they have flash
  by.  Shift-PageDown will scroll in the opposite direction.  The dmesg
  command may be used at any time to view some of the messages but it
  often misses important ones.  Here's an example of the start-up
  messages (as of mid 1999).  Note that ttyS00 is the same as
  /dev/ttyS0.

       At first you see what was detected (but the irq is only a wild guess):

       Serial driver version 4.27 with no serial options enabled
       ttyS00 at 0x03f8 (irq = 4) is a 16550A
       ttyS01 at 0x02f8 (irq = 3) is a 16550A
       ttyS02 at 0x03e8 (irq = 4) is a 16550A

       Later you see what was saved, but it's not necessarily correct either:

       Loading the saved-state of the serial devices...
       /dev/ttyS0 at 0x03f8 (irq = 4) is a 16550A
       /dev/ttyS1 at 0x02f8 (irq = 3) is a 16550A
       /dev/ttyS2 at 0x03e8 (irq = 5) is a 16550A



  Note that there is a slight disagreement: The first message shows
  ttyS2 at irq=4 while the second shows it at irq=5.  Your may only have
  the first message.  In most cases the last message is the correct one.
  But if your having trouble it may be misleading.  Before reading the
  explanation of all of this complexity in the rest of this section, you
  might just try using your serial port and see if it works OK.  If so
  it may not be essential to read further.

  The second message is from the setserial program being run at boot-
  time.  It shows what the device driver thinks is the correct
  configuration.  But this too could be wrong.  For example, the irq
  could actually be set to irq=8 in the hardware (both messages wrong).
  The irq=5 could be there because someone incorrectly put this into a
  configuration file (or the like).  The fact that Linux sometimes gets
  IRQs wrong is because it doesn't probe for IRQs.  It just assumes the
  "standard" ones (first message) or accepts what you told it when you
  configured it (second message).  Neither of these is necessarily
  correct.  If the serial driver has the wrong IRQ the serial port is
  very slow or doesn't seem to work at all.

  The first message is a result of Linux probing the serial ports but it
  doesn't probe for IRQs.  If a port shows up here it exists but the IRQ
  may be wrong.  Linux doesn't check IRQs because doing so is not
  foolproof.  It just assumes the IRQs are as shown because they are the
  "standard" values.  Your may check them manually with setserial using
  the autoconfig and auto_irq options but this isn't guaranteed to be
  correct.

  The data shown by the BIOS messages (which you see at first) is what
  is set in the hardware.  If your serial port is Plug-and-Play PnP then
  it's possible that the isapnp will run and change these settings.
  Look for messages about this after Linux starts.  The last serial port
  message shown in the example above should agree with the BIOS messages
  (as possibly modified by isapnp).  If they don't agree then you either
  need to change the setting in the port hardware or use setserial to
  tell the driver what is actually set in the hardware.

  Also, if you have Plug-and-Play (PnP) serial ports, Linux will not
  find them unless the IRQ and IO has been set inside the hardware by
  Plug-and-Play software.  This is a common reason why the start-up
  messages do not show a serial port that physically exists.  The PC
  hardware (a PnP BIOS) may automatically low-level configure this.  PnP
  configuring will be explained later.


  6.5.  What is the current IO address and IRQ of my Serial Port ?

  The previous section indicated how to attempt to do this by looking at
  the start-up messages.  If they give you sufficient info then you may
  not need to read this section.  If they don't then there are some
  other ways to look into this.

  There are really two answers to the question "What is my IO and IRQ?"
  1. What the device driver thinks has been set (This is what setserial
  usually sets and shows).  2. What is actually set in the hardware.
  They both should be the same.  If they're not it spells trouble since
  the driver has incorrect info on the physical serial port.  If the
  driver has the wrong IO address it will try to send data to a non-
  existing serial port --or even worse, to an actual device that is not
  a serial port.  If it has the wrong IRQ the driver will not get
  interrupt service requests from the serial port, resulting in a very
  slow or no response.  See ``Extremely Slow: Text appears on the screen
  slowly after long delays''.  If it has the wrong model of UART there
  is also apt to be trouble.  To determine if both I0-IRQ pairs are
  identical you must find out how they are set in both the driver and
  the hardware.


  6.5.1.  What does the device driver think?

  This is easy to find out.  Just look at the start-up messages or type
  "setserial -g /dev/ttyS*".   If everything works OK then what it tells
  you is likely also set in the hardware.  There are some other ways to
  find this info by looking at "files" in the /proc directory.  An
  important reason for understanding these other ways is to warn you
  that they only show what the device driver thinks.  Some people view
  certain "files" in the /proc directory and erroneously think that what
  they see is set in the hardware but "it ain't necessarily so".

  /proc/ioports will show the IO addresses that the drivers are using.
  /proc/interrupts shows the IRQs that are used by drivers of currently
  running processes (that have devices open).  It shows how many
  interrupts have actually be issued.  /proc/tty/driver/serial shows
  most of the above, plus the number of bytes that have been received
  and sent (even if the device is not now open).

  Note that for the IO addresses and IRQ assignments, you are only
  seeing what the driver thinks and not necessarily what is actually set
  in the hardware.  The data on the actual number of interrupts issued
  and bytes processed is real however.  If you see a large number of
  interrupts and/or bytes then it probably means that the device is (or
  was in the case of bytes) working.  If there are no bytes received
  (rx:0) but bytes were transmitted (tx:3749 for example), then only one
  direction of flow is working (or being utilized).

  Sometimes a showing of just a few interrupts doesn't mean that the
  interrupt is actually being physically generated by any serial port.
  Thus if you see almost no interrupts for a port that you're trying to
  use, that interrupt might not be set in the hardware and it implies
  that the driver is using the wrong interrupt.  To view
  /proc/interrupts to check on a program that you're currently running
  (such as "minicom") you need to keep the program running while you
  view it.  To do this, try to jump to a shell without exiting the
  program.


  6.5.2.  What is set in my serial port hardware ?

  How do you find out what IO address and IRQ are actually set in the
  device hardware?  Perhaps the BIOS messages will tell you some info
  before Linux starts booting.  Use the shift-PageUp key to step back
  thru the boot-time messages and look at the very first ones which are
  from the BIOS.  This is how it was before Linux started.  Setserial
  can't change it but isapnp or pciutils can.

  One crude method is try probing with setserial using the "autoconfig"
  option.  You'll need to guess the addresses to probe at.  See ``What
  is Setserial''.  For a PCI serial port, use the "lspci" command (for
  kernels <2.2 look at /proc/pci).  If your serial port is is Plug-and-
  Play see the next two subsections.

  For a port set with jumpers, its how the jumpers were set.  If the
  port is not Plug-and-Play (PnP) but has been setup by using a DOS
  program then it's set at whatever the person who ran that program set
  it to.


  6.5.3.  What is set in my PnP serial port hardware ?

  PnP ports don't store their configuration in the hardware when the
  power is turned off.  This is in contrast to Jumpers (non-PnP) which
  remain the same with the power off.  If you have an ISA PnP port, it
  can reach a state where it doesn't have any IO address or IRQ and is
  in effect disabled.  It should still be possible to find the port
  using the pnpdump program.

  For Plug-and-Play (PnP) on the ISA bus one may try the pnpdump program
  (part of isapnptools).  If you use the --dumpregs option then it
  should tell you the actual IO address and IRQ set in the port.  The
  address it "trys" is not the device's IO address, but a special

  For PnP ports checking on how it's configured under DOS/Windows may
  not be of much help.  Windows stores its configuration info in its
  Registry which is not used by Linux.  It may supply the BIOS's non-
  volatile memory with some info but it may not be kept in sync with the
  current Window configuration in the Registry ??  If you let a PnP BIOS
  automatically do the configuring when you start Linux (and have told
  the BIOS that you don't have a PnP operating system when running
  Linux) then Linux should use whatever configuration is in the BIOS's
  non-volatile memory.


  6.6.  Choosing Serial IRQs

  If you have a true Plug-and-Play set up where either the OS or a PnP
  BIOS configures all your devices, then you don't choose your IRQs.
  PnP determines what it thinks is best and assigns them.  But if you
  use the tools in Linux for Plug-and-Play (isapnp and pcitools) then
  you have to choose.  If you already know what IRQ you want to use you
  could skip this section except that you may want to know that IRQ 0
  has a special use (see the following paragraph).


  6.6.1.  IRQ 0 is not an IRQ

  While IRQ 0 is actually the timer (in hardware) it has a special
  meaning for setting a serial port with setserial.  It tells the driver
  that there is no interrupt for the port and the driver then will use
  polling methods.  This is quite inefficient but can be tried if there
  is an interrupt conflict or mis-set interrupt.  The advantage of
  assigning this is that you don't need to know what interrupt is set in
  the hardware.  It should be used only as a temporary expedient until
  you are able to find a real interrupt to use.


  6.6.2.  Interrupt sharing and Kernels 2.2+

  The general rule is that every device should use a unique IRQ and not
  share them.  But there are situations where sharing is permitted such
  as with most multi-port boards.  Even when it is permitted, it may not
  be as efficient since every time a shared interrupt is given a check
  must be made to determine where it came from.  Thus if it's feasible,
  it's nice to allocate every device its own interrupt.

  Prior to kernel 2.2, serial IRQs could be shared with each other only
  for most multiport boards.  Starting with kernel 2.2 serial IRQs may
  be sometimes shared between all serial ports.  In order for sharing to
  work in 2.2 the kernel must have been compiled with
  CONFIG_SERIAL_SHARE_IRQ, and the serial port hardware must support
  sharing (so that if two serial cards put different voltages on the
  same interrupt wire, only the voltage that means "this is an
  interrupt" will prevail).  Thus even if you have 2.2, it may be best
  to avoid sharing.


  6.6.3.  What IRQs to choose?

  The serial hardware often has only a limited number of IRQs it can be
  set at.  Also you don't want IRQ conflicts.  So there may not be much
  of a choice.  Your PC may normally come with ttyS0 and ttyS2 at IRQ 4,
  and ttyS1 and ttyS3 at IRQ 3.  Looking at /proc/interrupts will show
  which IRQs are being used by programs currently running.  You likely
  don't want to use one of these.  Before IRQ 5 was used for sound
  cards, it was often used for a serial port.

  Here is how Greg (original author of Serial-HOWTO) set his up in
  /etc/rc.d/rc.serial.  rc.serial is a file (shell script) which runs at
  start-up (it may have a different name of location).  For versions of
  "setserial" after 2.15 it's not always done this way anymore but this
  example does show the choice of IRQs.



       /sbin/setserial /dev/ttyS0 irq 3        # my serial mouse
       /sbin/setserial /dev/ttyS1 irq 4        # my Wyse dumb terminal
       /sbin/setserial /dev/ttyS2 irq 5        # my Zoom modem
       /sbin/setserial /dev/ttyS3 irq 9        # my USR modem



  Standard IRQ assignments:

          IRQ  0    Timer channel 0 (May mean "no interrupt".  See below.)
          IRQ  1    Keyboard
          IRQ  2    Cascade for controller 2
          IRQ  3    Serial port 2
          IRQ  4    Serial port 1
          IRQ  5    Parallel port 2, Sound card
          IRQ  6    Floppy diskette
          IRQ  7    Parallel port 1
          IRQ  8    Real-time clock
          IRQ  9    Redirected to IRQ2
          IRQ 10    not assigned
          IRQ 11    not assigned
          IRQ 12    not assigned
          IRQ 13    Math coprocessor
          IRQ 14    Hard disk controller 1
          IRQ 15    Hard disk controller 2



  There is really no Right Thing to do when choosing interrupts.  Just
  make sure it isn't being used by the motherboard, or any other boards.
  2, 3, 4, 5, 7, 10, 11, 12 or 15 are possible choices.  Note that IRQ 2
  is the same as IRQ 9.  You can call it either 2 or 9, the serial
  driver is very understanding.  If you have a very old serial board it
  may not be able to use IRQs 8 and above.

  Make sure you don't use IRQs 1, 6, 8, 13 or 14!  These are used by
  your motherboard.  You will make her very unhappy by taking her IRQs.
  When you are done, double-check /proc/interrupts when programs that
  use interrupts are being run and make sure there are no conflicts.


  6.7.  Choosing Addresses --Video card conflict with ttyS3

  The IO address of the IBM 8514 video board (and others like it) is
  allegedly 0x?2e8 where ? is 2, 4, 8, or 9.  This may conflict with the
  IO address of ttyS3 at 0x02e8.  Your may think that this shouldn't
  happen since the addresses are different in the high order digit (the
  leading 0 in 02e8).  You're right, but a poorly designed serial port
  may ignore the high order digit and respond to any address that ends
  in 2e8.  That is bad news if you try to use ttyS3 at this IO address.

  In most cases you should use the default addresses if feasible.
  Addresses shown represent the first address of an 8-byte range.  For
  example 3f8 is really the range 3f8-3ff.  Each serial device (as well
  as other types of devices that use IO addresses) needs its own unique
  address range.  There should be no overlaps (conflicts).  Here are the
  default addresses for commonly used serial ports:



       ttyS0 address 0x3f8
       ttyS1 address 0x2f8
       ttyS2 address 0x3e8
       ttyS3 address 0x2e8



  Suppose there is an address conflict (as reported by setserial -g
  /dev/ttyS*) between a real serial port and another port which does not
  physically exist (and shows UART: unknown).  Such a conflict shouldn't
  cause problems but it sometimes does in older kernels.  To avoid this
  problem don't permit such address conflicts or delete /dev/ttyS? if it
  doesn't physically exist.


  6.8.  Set IO Address & IRQ in the hardware (mostly for PnP)

  After it's set in the hardware don't forget to insure that it also
  gets set in the driver by using setserial.  For non-PnP serial ports
  they are either set in hardware by jumpers or by running a DOS program
  ("jumperless") to set them (it may disable PnP).  The rest of this
  subsection is only for PnP serial ports.  Here's a list of the
  possible methods of configuring PnP serial ports:


    Using a PnP BIOS CMOS setup menu (usually only for external devices
     on ttyS0 (Com1) and ttyS1 (Com2))

    Letting a PnP BIOS automatically configure a PnP serial port See
     ``Using a PnP BIOS to I0-IRQ Configure''

    Doing nothing if you have both a PnP serial port and a PnP Linux
     operating system (see Plug-and-Play-HOWTO).

    Using isapnp for a PnP serial port non-PCI)


    Using pciutils (pcitools) for the PCI bus

  The IO address and IRQ must be set (by PnP) in their registers each
  time the system is powered on since PnP hardware doesn't remember how
  it was set when the power is shut off.  A simple way to do this is to
  let a PnP BIOS know that you don't have a PnP OS and the BIOS will
  automatically do this each time you start.  This might cause problems
  in Windows (which is a PnP OS) if you start Windows with the BIOS
  thinking that Windows is not a PnP OS.  See Plug-and-Play-HOWTO.

  Plug-and-Play was designed to automate this io-irq configuring, but
  for Linux at present, it has made life more complicated.  The standard
  kernels for Linux don't support plug-and-play very well.  If you use a
  patch to the Linux kernel to covert it to a plug-and-play operating
  system, then all of the above should be handled automatically by the
  OS.  But when you want to use this to automate configuring devices
  other that the serial port, you may find that you'll still have to
  configure the drivers manually since many Linux drivers are not
  written to support a Linux PnP OS.  If you use isapnptools or the BIOS
  for configuring plug-and-play this will only put the two values into
  the registers of the serial port section of the modem card and you
  will likely still need to set up setserial.  None of this is easy or
  very well documented as of early 1999.  See Plug-and-Play-HOWTO and
  the isapnptools FAQ.


  6.8.1.  Using a PnP BIOS to I0-IRQ Configure

  While the explanation of how to use a PnP OS or isapnp for io-irq
  configuring should come with such software, this is not the case if
  you want to let a PnP BIOS do such configuring.  Not all PnP BIOS can
  do this.  The BIOS usually has a CMOS menu for setting up the first
  two serial ports.  This menu may be hard to find and for an "Award"
  BIOS it was found under "chipset features setup"  There is often
  little to choose from.  Unless otherwise indicated in a menu, these
  first two ports normally get set at the standard IO addresses and
  IRQs.  See ``Serial Port Device Names & Numbers''

  Whether you like it or not, when you start up a PC a PnP BIOS starts
  to do PnP (io-irq) configuring of hardware devices.  It may do the job
  partially and turn the rest over to a PnP OS (which you probably don't
  have) or if thinks you don't have a PnP OS it may fully configure all
  the PnP devices but not configure the device drivers.  This is what
  you want but it's not always easy to figure out exactly what the PnP
  BIOS has done.

  If you tell the BIOS that you don't have a PnP OS, then the PnP BIOS
  should do the configuring of all PnP serial ports --not just the first
  two.  An indirect way to control what the BIOS does (if you have
  Windows 9x on the same PC) is to "force" a configuration under
  Windows.  See Plug-and-Play-HOWTO and search for "forced".  It's
  easier to use the CMOS BIOS menu which may override what you "forced"
  under Windows.  There could be a BIOS option that can set or disable
  this "override" capability.

  If you add a new PnP device, the BIOS should change its PnP
  configuration to accommodate it.  It could even change the io-irq of
  existing devices if required to avoid any conflicts.  For this
  purpose, it keeps a list of non-PnP devices provided that you have
  told the BIOS how these non-PnP devices are io-irq configured.  One
  way to tell the BIOS this is by running a program called ICU under
  DOS/Windows.

  But how do you find out what the BIOS has done so that you set up the
  device drivers with this info?  The BIOS itself may provide some info,
  either in its setup menus of via messages on the screen when you turn
  on your computer.  See ``What is set in my serial port hardware?''

  6.9.  Giving the IRQ and IO Address to Setserial

  Once you've set the IRQ and IO address in the hardware (or arranged
  for it to be done by PnP) you also need to insure that the "setserial"
  command is run each time you start Linux.  See the subsection ``Boot-
  time Configuration''



  6.10.  High-level Configuring: stty, etc.

  As a rule, your application program will do most (or all) of this.
  The command which does it is stty.  See ``Stty''


  6.10.1.  Configuring Flow Control: Hardware Flow Control is Best

  See ``Flow Control'' for an explanation of it.  It's usually better to
  use hardware flow control rather than software flow control using
  Xon/Xoff.  To use full hardware flow control you must normally have
  two wires for it in the cable between the serial port and the device.
  If the device is on a card, then it should always be possible to use
  hardware flow control.

  Many applications (and the getty program) give you an option regarding
  flow control and will set it for you.  It might even set hardware flow
  control by default.  Like the IRQ and IO address, it must be set both
  in the serial driver and the hardware connected to the serial port.
  How it's set into the hardware is hardware dependent.  Often there is
  a certain "init string" you send to the hardware device via the serial
  port from your PC.  For a modem, the communication program should set
  it in both places.

  If a program you use doesn't set flow control in the serial driver,
  then you may do it yourself using the stty command.  Since the driver
  doesn't remember the setting after you stop Linux, you could put the
  stty command in a file that runs at start-up or when you login (such
  as /etc/profile for the bash shell).  Heres what you would add for
  hardware flow control for port ttyS2:



       stty crtscts < /dev/ttyS2
       or for stty version >= 1.17:
       stty -F /dev/ttyS2 crtscts



  crtscts stands for a Control setting to use the RTS and CTS pins of
  the serial port for hardware flow control.  The upper case letters of
  the last sentence spell: crtscts.


  7.  Serial Port Devices /dev/ttyS2, etc.

  For creating devices in the device directory see

  ``Creating Devices In the /dev directory''



  7.1.  Serial Port Device Names & Numbers

  Devices in Linux have major and minor numbers.  Each serial port may
  have 2 possible names in the /dev directory: ttyS and cua.   Their
  drivers behave slightly differently.  The cua device is deprecated and
  will not be used in the future.  See the Modem-HOWTO section: "The cua
  Device".

  Dos/Windows use the COM name while the setserial program uses tty00,
  tty01, etc.  Don't confuse these with dev/tty0, dev/tty1, etc.  which
  are used for the console (your PC monitor) but are not serial ports.
  The table below is for the "standard" case (but yours could be
  different).



                                                         IO
        dos            major minor       major minor  address
       COM1  /dev/ttyS0  4,  64;  /dev/cua0  5,  64      3F8
       COM2  /dev/ttyS1  4,  65;  /dev/cua1  5,  65      2F8
       COM3  /dev/ttyS2  4,  66;  /dev/cua2  5,  66      3E8
       COM4  /dev/ttyS3  4,  67;  /dev/cua3  5,  67      2E8



  Note that all distributions should come with ttyS devices (and many
  distributions have the obsolete cua device).  You can verify this by
  typing (don't feel bad if you don't find any obsolete cua devices):



       linux% ls -l /dev/cua*
       linux% ls -l /dev/ttyS*



  7.2.  Link ttySN to /dev/modem ?

  On some installations, two extra devices will be created, /dev/modem
  for your modem and /dev/mouse for your mouse.  Both of these are
  symbolic links to the appropriate device in /dev which you specified
  during the installation (unless you have a bus mouse, then /dev/mouse
  will point to the bus mouse device).

  There has been some discussion on the merits of /dev/mouse and
  /dev/modem.  The use of these links is discouraged.  In particular, if
  you are planning on using your modem for dialin you may run into
  problems because the lock files may not work correctly if you use
  /dev/modem.  However, if you change or remove this link, some
  applications might need reconfiguration.



  7.3.  Notes For Multiport Boards

  For board addresses, and IRQs, look at the rc.serial or
  /etc/rc.boot/0setserial that comes with the setserial program.  It has
  a lot of detail on multiport boards, including I/O addresses and
  device names.



  7.4.  Creating Devices In the /dev directory

  If you don't have a device, you will have to create it with the mknod
  command.  Example, suppose you needed to create devices for ttyS0:


       linux# mknod -m 666 /dev/cua0 c 5 64 (cua devices are now obsolete)
       linux# mknod -m 666 /dev/ttyS0 c 4 64



  You can use the MAKEDEV script, which lives in /dev.  See the man page
  for it.  This simplifies the making of devices.  For example, if you
  needed to make the devices for ttyS0 you would type:


       linux# cd /dev
       linux# ./MAKEDEV ttyS0



  This handles the devices creation and should set the correct permis
  sions.


  8.  Interesting Programs You Should Know About

  Most info on getty has been moved to Modem-HOWTO with a little info on
  the use of getty with directly connected terminals now found in Text-
  Terminal-HOWTO.


  8.1.  Serial Monitoring/Diagnostics Programs

  A few Linux programs (and one "file") will monitor various modem
  control lines and indicate if they are positive (1 or green) or
  negative (0 or red).

    The "file": /proc/tty/driver/serial lists those that are positive

    modemstat (Only works correctly on Linux PC consoles.  Status
     monitored in a tiny window.  Color-coded and compact.  Must kill it
     (a process) to quit.

    statserial (Info displayed on entire screen)

    serialmon (Doesn't monitor RTS, CTS, DSR but logs other functions)

     You may already have them.  If not, download them from Serial
     Software <http://metalab.unc.edu/pub/Linux/system/serial/>.  As of
     June 1998, I know of no diagnostic program in Linux for the serial
     port.


  8.2.  Changing Interrupt Priority



    irqtune will give serial port interrupts higher priority to improve
     performance.

    hdparm for hard-disk tuning may help some more.


  8.3.  What is Setserial ?

  This part is in 3 HOWTOs: Modem, Serial, and Text-Terminal.  There are
  some minor differences, depending on which HOWTO it appears in.


  8.3.1.  Introduction

  Don't ever use setserial with Laptops (PCMCIA).  setserial is a
  program which allows you to tell the device driver software the I/O
  address of the serial port, which interrupt (IRQ) is set in the port's
  hardware, what type of UART you have, etc.  It can also show how the
  driver is currently set.  In addition, it can be made to probe the
  hardware and try to determine the UART type and IRQ, but this has
  severe limitations.  See ``Probing''.  Note that it can't set the IRQ
  or the port address in the hardware of PnP serial ports.

  If you only have one or two built-in serial ports, they will usually
  get set up correctly without using setserial.  Otherwise (or if there
  are problems with the serial port) you will likely need to deal with
  setserial.  Besides the man page for setserial, check out info in
  /usr/doc/setserial.../ or /usr/share/doc/setserial.  It should tell
  you how setserial is handled in your distribution of Linux.

  Setserial is often run automatically at boot-time by a start-up shell-
  script for the purpose of assigning IRQs, etc. to the driver.
  Setserial will only work if the serial module is loaded (or if the
  equivalent was compiled into your kernel).  If you should (for some
  reason) unload the serial module later on, the changes previously made
  by setserial will be forgotten by the kernel.  So setserial must be
  run again to reestablish them.  In addition to running via a start-up
  script, something akin to setserial also runs earlier when the serial
  module is loaded (or the like).  Thus when you watch the start-up
  messages on the screen it may look like it ran twice, and in fact it
  has.

  Setserial can set the time that the port will keep operating after
  it's closed (in order to output any characters still in its buffer in
  main RAM).  This is needed at slow baud rates of 1200 or lower.  It's
  also needed at higher speeds if there are a lot of "flow control"
  waits.  See "closing_wait" in the man pg.


  Setserial does not set either IRQ's nor I/O addresses in the serial
  port hardware itself.  That is done either by jumpers or by plug-and-
  play.  You must tell setserial the identical values that have been set
  in the hardware.  Do not just invent some values that you think would
  be nice to use and then tell them to setserial.  However, if you know
  the I/O address but don't know the IRQ you may command setserial to
  attempt to determine the IRQ.

  You can see a list of possible commands by just typing setserial with
  no arguments.  This fails to show you the one-letter options such as
  -v for verbose which you should normally use when troubleshooting.
  Note that setserial calls an IO address a "port".  If you type:


       setserial -g /dev/ttyS*



  you'll see some info about how that device driver is configured for
  your ports.  Note that where it says "UART: unknown" it probably means
  that no uart exists.  In other words you probably have no such serial
  port and the other info shown about the port is meaningless and should
  be ignored.  If you really do have such a serial port, setserial
  doesn't recognize it and that needs to be fixed.

  If you add -a to the option -g you will see more info although few
  people need to deal with (or understand) this additional info since
  the default settings you see usually work fine.  In normal cases the
  hardware is set up the same way as "setserial" reports, but if you are
  having problems there is a good chance that "setserial" has it wrong.
  In fact, you can run "setserial" and assign a purely fictitious I/O
  port address, any IRQ, and whatever uart type you would like to have.
  Then the next time you type "setserial ..." it will display these
  bogus values without complaint.  Of course the serial port driver will
  not work correctly (if at all) if you attempt to use such a port.
  Thus when giving parameters to "setserial" anything goes.  It gives
  you no warning if what you tell it is incorrect and will allow you to
  create conflicts in IRQs and I/O port addresses that will have
  disastrous results later on.

  While assignments made by setserial are lost when the PC is powered
  off, a configuration file may restore them (or a previous
  configuration) when the PC is started up again.  In newer versions,
  what you change by setserial gets automatically saved to a
  configuration file.  In older versions, the configuration file only
  changes if you edit it manually so the configuration remains the same
  from boot to boot.  See ``Configuration Scripts/Files''


  8.3.2.  Probing

  With appropriate options, setserial can probe (at a given I/O address)
  for a serial port but you must guess the I/O address.  If you ask it
  to probe for /dev/ttyS2 for example, it will only probe at the address
  it thinks ttyS2 is at (2F8).  If you tell setserial that ttyS2 is at a
  different address, then it will probe at that address, etc.  See
  ``Probing''

  The purpose of this is to see if there is a uart there, and if so,
  what its IRQ is.  Use "setserial" mainly as a last resort as there are
  faster ways to attempt it such as wvdialconf to detect modems, looking
  at very early boot-time messages, or using pnpdump --dumpregs.  To try
  to detect the physical hardware use the -v (verbose) and autoconfig
  command to setserial.  If the resulting message shows a uart type such
  as 16550A, then you're OK.  If instead it shows "unknown" for the uart
  type, then there is supposedly no serial port at all at that I/O
  address.  Some cheap serial ports don't identify themselves correctly
  so if you see "unknown" you still might have a serial port there.

  Besides auto-probing for a uart type, setserial can auto-probe for
  IRQ's but this doesn't always work right either.  In versions of
  setserial >= 2.15, the results of your last probe test may be saved
  and put into the configuration file /etc/serial.conf which will be
  used next time you start Linux.  At boot-time when the serial module
  loads (or the like), a probe for UARTs is made automatically and
  reported on the screen.  But the IRQs shown may be wrong.  The second
  report of the same is the result of a script which usually does no
  probing and thus provides no reliable information as to how the
  hardware is actually set.  It only shows configuration date someone
  wrote into the script or data that got saved in /etc/serial.conf.

  It may be that two serial ports both have the same IO address set in
  the hardware.  Of course this is not permitted but it sometimes
  happens anyway.  Probing detects one serial port when actually there
  are two.  However if they have different IRQs, then the probe for IRQs
  may show IRQ = 0.  For me it only did this if I first used setserial
  to give the IRQ a ficticious value.

  8.3.3.  Boot-time Configuration

  When the kernel loads the serial module (or if the "module equivalent"
  is built into the kernel) then only ttyS{0-3} are auto-detected and
  the driver is set to use only IRQs 4 and 3 (regardless of what IRQs
  are actually set in the hardware).  You see this as a boot-time
  message just like as if setserial had been run.  If you use 3 or more
  ports, this may result in IRQ conflicts.

  To fix such conflicts by telling setserial the true IRQs (or for other
  reasons) there may be a file somewhere that runs setserial again.
  This happens early at boot-time before any process uses the serial
  port.  In fact, your distribution may have set things up so that the
  setserial program runs automatically from a start-up script at boot-
  time.  More info about how to handle this situation for your
  particular distribution might be found in file named "setserial..." or
  the like located in directory /usr/doc/ or /usr/share/doc/.


  8.3.4.  Configuration Scripts/Files

  Your objective is to modify (or create) a script file in the /etc tree
  that runs setserial at boot-time.  Most distributions provide such a
  file (but it may not initially reside in the /etc tree).  In addition,
  setserial 2.15 and higher often have an /etc/serial.conf file that is
  used by the above script so that you don't need to directly edit the
  script that runs setserial.  In addition just using setserial on the
  command line (2.15+) may ultimately alter this configuration file.

  So prior to version 2.15 all you do is edit a script.  After 2.15 you
  may need to either do one of three things: 1. edit a script.  2. edit
  /etc/serial.conf or 3. run "setserial" on the command line which will
  result in /etc/serial.conf automatically being edited.  Which one of
  these you need to do depends on both your particular distribution, and
  how you have set it up.


  8.3.5.  Edit a script (after version 2.15: perhaps not)

  Prior to setserial 2.15 (1999) there was no /etc/serial.conf file to
  configure setserial.   Thus you need to find the file that runs
  "setserial" at boot time and edit it.  If it doesn't exist, you need
  to create one (or place the commands in a file that runs early at
  boot-time).  If such a file is currently being used it's likely
  somewhere in the /etc directory-tree.  But Redhat <6.0 has supplied it
  in /usr/doc/setserial/ but you need to move it to the /etc tree before
  using it.   You might use "locate" to try to find such a file.  For
  example, you could type: locate "*serial*".

  The script /etc/rc.d/rc.serial was commonly used in the past.  The
  Debian distribution used /etc/rc.boot/0setserial.  Another file once
  used was /etc/rc.d/rc.local but it's not a good idea to use this since
  it may not be run early enough.  It's been reported that other
  processes may try to open the serial port before rc.local runs
  resulting in serial communication failure.

  If such a file is supplied, it should contain a number of commented-
  out examples.  By uncommenting some of these and/or modifying them,
  you should be able to set things up correctly.  Make sure that you are
  using a valid path for setserial, and a valid device name.  You could
  do a test by executing this file manually (just type its name as the
  super-user) to see if it works right.  Testing like this is a lot
  faster than doing repeated reboots to get it right.  Of course you can
  also test a single setserial command by just typing it on the command
  line.

  If you want setserial to automatically determine the uart and the IRQ
  for ttyS3 you would add something like:



       /sbin/setserial /dev/ttyS3 auto_irq skip_test autoconfig



  Do this for every serial port you want to auto configure.  Be sure to
  give a device name that really does exist on your machine.  In some
  cases this will not work right due to the hardware so if you know what
  the uart and irq actually are, may want to assign them explicitly with
  "setserial".  For example:



       /sbin/setserial /dev/ttyS3 irq 5 uart 16550A  skip_test



  For versions >= 2.15 (provided your distribution implemented the
  change, Redhat didn't) it may be more tricky to do since the file that
  runs setserial on startup, /etc/init.d/setserial or the like was not
  intended to be edited by the user.  See ``New configuration method
  using /etc/serial.conf''.



  8.3.6.  New configuration method using /etc/serial.conf

  Prior to setserial version 2.15, the way to configure setserial was to
  manually edit the shell-script that ran setserial at boot-time.  See
  ``Edit a script (after version 2.15: perhaps not)''.  Starting with
  version 2.15 (1999) of setserial this shell-script is not edited but
  instead gets its data from a configuration file: /etc/serial.conf.
  Furthermore you may not even need to edit serial.conf because using
  the "setserial" command on the command line may automatically cause
  serial.conf to be edited appropriately.

  This was intended to make it so that you don't need to edit any file
  in order to set up (or change) setserial so it will do the right thing
  each time that Linux is booted.  But there are serious pitfalls
  because it's not really "setserial" that edits serial.conf.  Confusion
  is compounded because different distributions handle this differently.
  In addition, you may modify it so it works differently.

  What often happens is this:  When you shut down your PC the script
  that runs "setserial" at boot-time is run again, but this time it only
  does what the part for the "stop" case says to do:  It uses
  "setserial" to find out what the current state of "setserial" is and
  puts that info into the serial.conf file.  Thus when you run
  "setserial" to change the serial.conf file, it doesn't get changed
  immediately but only when and if you shut down normally.

  Now you can perhaps guess what problems might occur.  Suppose you
  don't shut down normally (someone turns the power off, etc.) and the
  changes don't get saved.  Suppose you experiment with "setserial" and
  forget to run it a final time to restore the original state (or make a
  mistake in restoring the original state).  Then your "experimental"
  settings are saved.


  If you manually edit serial.conf, then your editing is destroyed when
  you shut down because it gets changed back to the state of setserial
  at shutdown.  There is a way to disable the changing of serial.conf at
  shutdown and that is to remove "###AUTOSAVE###" or the like from first
  line of serial.conf.  In at least one distribution, the removal of
  "###AUTOSAVE###" from the first line is automatically done after the
  first time you shutdown just after installation.  The serial.conf file
  will hopefully contain some comments to help you out.

  The file most commonly used to run setserial at boot-time (in
  conformance with the configuration file) is now /etc/init.d/setserial
  (Debian) or /etc/init.d/serial (Redhat), or etc.,  but it should not
  normally be edited.  For 2.15 Redhat 6.0 just had a file
  /usr/doc/setserial-2.15/rc.serial which you have to move to
  /etc/init.d/ if you want setserial to run at boot-time.

  To disable a port, use setserial to set it to "uart none".  The format
  of /etc/serial.conf appears to be just like that of the parameters
  placed after "setserial" on the command line with one line for each
  port.  If you don't use autosave, you may edit /etc/serial.conf
  manually.

  BUG: As of July 1999 there is a bug/problem since with ###AUTOSAVE###
  only the setserial parameters displayed by "setserial -Gg /dev/ttyS*"
  get saved but the other parameters don't get saved.  Use the -a flag
  to "setserial" to see all parameters.  This will only affect a small
  minority of users since the defaults for the parameters not saved are
  usually OK for most situations.  It's been reported as a bug and may
  be fixed by now.

  In order to force the current settings set by setserial to be saved to
  the configuration file (serial.conf) without shutting down, do what
  normally happens when you shutdown: Run the shell-script
  /etc/init.d/{set}serial stop.  The "stop" command will save the
  current configuration but the serial ports still keep working OK.

  In some cases you may wind up with both the old and new configuration
  methods installed but hopefully only one of them runs at boot-time.
  Debian labeled obsolete files with "...pre-2.15".


  8.3.7.  IRQs

  By default, both ttyS0 and ttyS2 will share IRQ 4, while ttyS1 and
  ttyS3 share IRQ 3.  But actually sharing serial interrupts (using them
  in running programs) is not permitted unless you: 1. have kernel 2.2
  or better, and 2. you've complied in support for this, and 3. your
  serial hardware supports it.  See

  ``Interrupt sharing and Kernels 2.2+''

  If you only have two serial ports, ttyS0 and ttyS1, you're still OK
  since IRQ sharing conflicts don't exist for non-existent devices.

  If you add an internal modem and retain ttyS0 and ttyS1, then you
  should attempt to find an unused IRQ and set it both on your serial
  port (or modem card) and then use setserial to assign it to your
  device driver.  If IRQ 5 is not being used for a sound card, this may
  be one you can use for a modem.  To set the IRQ in hardware you may
  need to use isapnp, a PnP BIOS, or patch Linux to make it PnP.  To
  help you determine which spare IRQ's you might have, type "man
  setserial" and search for say: "IRQ 11".



  8.4.  Stty

  8.4.1.  Introduction

  stty does much of the configuration of the serial port but since
  application programs (and the getty program) often handle it, you may
  not need to use it much.  It's handy if your having problems or want
  to see how the port is set up.  Try typing ``stty -a'' at your
  terminal/console to see how it's now set.  Also try typing it without
  the -a (all) for a short listing which shows how it's set different
  than normal.  Don't try to learn all the setting unless you want to
  become a serial guru.  Most of the defaults should work OK and some of
  the settings are needed only for certain obsolete dumb terminals made
  in the 1970's.

  Whereas setserial only deals with actual serial ports, stty is used
  both for serial ports and for virtual terminals such as the standard
  Linux text interface at a PC monitor.  For the PC monitor, many of the
  stty settings are meaningless.  Changing the baud rate, etc. doesn't
  appear to actually do anything.

  Here are some of the items stty configures: speed (bits/sec), parity,
  bits/byte, # of stop bits, strip 8th bit?, modem control signals, flow
  control, break signal, end-of-line markers, change case, padding, beep
  if buffer overrun?, echo what you type to the screen, allow background
  tasks to write to terminal?, define special (control) characters (such
  as what key to press for interrupt).  See the stty man or info page
  for more details.  Also see the man page: termios which covers the
  same options set by stty but (as of mid 1999) covers features which
  the stty man page fails to mention.

  With some implementations of getty (getty_ps package), the commands
  that one would normally give to stty are typed into a getty
  configuration file: /etc/gettydefs.  Even without this configuration
  file, the getty command line may be sufficient to set things up so
  that you don't need stty."')

  One may write C programs which change the stty configuration, etc.
  Looking at some of the documentation for this may help one better
  understand the use of the stty command (and its many possible
  arguments).  Serial-Programming-HOWTO is useful.  The manual page:
  termios contains a description of the C-language structure (of type
  termios) which stores the stty configuration in computer memory.  Many
  of the flag names in this C-structure are almost the same (and do the
  same thing) as the arguments to the stty command.


  8.4.2.  Using stty for a "foreign" terminal

  Using stty to inspect or configure the terminal that you are currently
  using is easy.  Doing it for a different (foreign) terminal or serial
  port may be tricky.  For example, let's say you are at the PC monitor
  (tty1) and want to use stty to deal with the serial port ttyS2.  Prior
  to about 2000 you needed to use the redirection operator "<".  After
  2000 (provided your version of setserial is >= 1.17 and stty >= 2.0)
  there is an alternate method using the -F option.  This will work when
  the old redirection method fails.  Even with the latest versions be
  warned that if there is a terminal on ttyS2 and a shell is running on
  that terminal, then what you see will likely be deceptive and trying
  to set it will not work.  See ``Two Interfaces at a Terminal'' to
  understand it.

  The new method is ``stty -F /dev/ttyS2 ...'' (or --file instead of F).
  If  ... is -a it displays all the stty settings.  The old redirection
  method (which still works in later versions) is to type ``stty ...
  </dev/ttyS2''.   If the new method works but the old one hangs, it
  implies that the port is hung due to lack of a modem control line from
  being asserted.  Thus the old method is still useful for
  troubleshooting.  See the following subsection.


  8.4.2.1.  Old redirection method

  Here's a problem with the old redirection operator (which doesn't
  happen if you use the newer -F option instead).  Sometimes when trying
  to use stty, the command hangs and nothing happens (you don't get a
  prompt for a next command even after hitting <return>).  This is
  likely due to the port being stuck because it's waiting for one of the
  modem control lines to be asserted.  For example, unless you've set
  "clocal" to ignore modem control lines, then if no CD signal is
  asserted the port will not open and stty will not work for it (unless
  you use the newer -F option).  A similar situation seems to exist for
  hardware flow control.  If the cable for the port doesn't even have a
  conductor for the pin that needs to be asserted then there is no easy
  way to stop the hang.

  One way to try to get out of the above hang is to use the newer -F
  option and set "clocal" and/or "crtscts".  If you don't have the -F
  option then you may try to run program on the port that will force it
  to operate even if the control lines say not to.  Then hopefully this
  program might set the port so it doesn't need the control signal in
  the future in order to open: clocal or -crtscts.  To use "minicom" to
  do this you have to reconfigure minicom for another ttyS, etc, and
  then exit it and restart it.  Since you then have to reconfigure
  minicom again, it may be simpler to just reboot the PC.

  The old redirection method makes ttyS2 the standard input to stty.
  This gives the stty program a link to the "file" ttyS2 so that it may
  "read" it.  But instead of reading the bytes sent to ttyS2 as one
  might expect, it uses the link to find the configuration settings of
  the port so that it may read or change them.  Some people tried to use
  ``stty ... > /dev/ttyS2'' to set the terminal.  This will not do it.
  Instead, it takes the message normal displayed by the stty command for
  the terminal you are on (say tty1) and sends this message to ttyS2.
  But it doesn't change any settings for ttyS2.


  8.4.3.  Two interfaces at a terminal

  When using a shell (such as bash) with command-line-editing enabled
  there are two different terminal interfaces (what you see when you
  type stty -a).  When you type at the command line you have a temporary
  "raw" interface (or raw mode) where each character is read by the
  command-line-editor as you type it.  Once you hit the <return> key,
  the command-line-editor is exited and the terminal interface is
  changed to the nominal "cooked" interface (cooked mode) for the
  terminal.  This cooked mode lasts until the next prompt is sent to the
  terminal.  Note that one never types anything to this cooked mode but
  what was typed in raw mode becomes cooked mode as soon as one hits the
  <return> key.

  When a prompt is sent to the terminal the terminal goes from "cooked"
  to "raw" mode (just like it does when you start an editor since you
  are starting the command-line editor).  The settings for the "raw"
  mode are based only on the basic settings taken from the "cooked"
  mode.  Raw mode keeps these setting but changes several other settings
  in order to change the mode to "raw".  It is not at all based on the
  settings used in the previous "raw" mode.  Thus if one uses stty to
  change settings for the raw mode, such settings will be lost as soon
  as one hits the <return> key at the terminal that has supposedly been
  "set".

  Now when one types stty to look at the terminal interface, one may
  either get a view of the cooked mode or the raw mode.  You need to
  figure out which one you're looking at.  It you use stty from another
  terminal to deal with a terminal that is displaying a command line,
  then the view is that of the raw mode.  Any changes made will only be
  made to the raw mode and will be lost when someone presses <return> at
  the terminal you tried to "set".  But if you type a stty command at
  your terminal (without using < for redirection) and then hit <return>
  it's a different story.  The <return> puts the terminal in cooked
  mode.  Your changes are saved and will still be there when the
  terminal goes back into raw mode (unless of course it's a setting not
  allowed in raw mode).

  This situation can create problems.  For example, suppose you corrupt
  your terminal interface and to restore it you go to another terminal
  and "stty -F dev/ttyS1 sane" (or the like) to restore it.  It will not
  work!  Of course you can try to type "stty sane ..." at the terminal
  that is corrupted but you can't see what you typed.  All the above not
  only applies to dumb terminals but to virtual terminals used on a PC
  Monitor as well as to the terminal windows in X.  In other words, it
  applies to almost everyone who uses Linux.  Luckily, a file that runs
  stty at boot-time will likely deal with a terminal (or serial port
  with no terminal) that has no shell running on it so there's no
  problem.


  8.4.4.  Where to put the stty command ?

  Should you need to have stty set up the serial interface each time the
  computer starts up then you need to put the stty command in a file
  that will be executed each time the computer is started up (Linux
  boots).  It should be run before the serial port is used (including
  running getty on the port).  There are many possible places to put it.
  If it gets put in more than one place and you only know about (or
  remember) one of those places, then a conflict is likely.  So make
  sure to document what you do.

  One place to put it would be in the same file that runs setserial when
  the system is booted.  The location is distribution and version
  dependent.  It would seem best to put it after the setserial command
  so that the low level stuff is done first.  If you have directories in
  the /etc tree where every file in them is executed at boot-time
  (System V Init) then you could create a file named "stty" for this
  purpose.



  8.5.  What is isapnp ?

  isapnp is a program to configure Plug-and-Play (PnP) devices on the
  ISA bus including internal modems.  It comes in a package called
  "isapnptools" and includes another program, "pnpdump" which finds all
  your ISA PnP devices and shows you options for configuring them in a
  format which may be added to the PnP configuration file:
  /etc/isapnp.conf.  The isapnp command may be put into a startup file
  so that it runs each time you start the computer and thus will
  configure ISA PnP devices.  It is able to do this even if your BIOS
  doesn't support PnP.  See Plug-and-Play-HOWTO.


  9.  Speed (Flow Rate)

  By "speed" we really mean the "data flow rate" but almost everybody
  incorrectly calls it speed.  The speed is measured in bits/sec (or
  baud).  Speed is set using the "stty" command or by a program which
  uses the serial port.  See ``Stty''


  9.1.  Can't Set a High Enough Speed

  You need to find out the highest speed supported by your hardware.  As
  of late 1998 most hardware only supported speeds up to 115.2k bps.  A
  few 56k internal modems support 230.4k bps.  Recent Linux kernels
  support high speeds (over 115.2k) but you might have difficulty using
  it because of one or both of the following reasons:


  1. The application program (or stty) will not accept the high speed.

  2. Setserial has a default speed of 115,200 (but this default is easy
     to change)


  9.1.1.  How speed is set in hardware: the divisor and baud_base

  Here's a list of commonly used divisors and their corresponding speeds
  (assuming a maximum speed of 115,200): 1 (115.2k), 2 (57.6k), 3
  (38.4k), 6 (19.2k), 12 (9.6k), 24 (4.8k), 48 (2.4k), 96 (1.2k), etc.
  The serial driver sets the speed in the hardware by sending the
  hardware only a "divisor" (a positive integer).  This "divisor"
  divides the maximum speed of the hardware resulting in a slower speed
  (except a divisor of 1 obviously tells the hardware to run at maximum
  speed).

  Normally, if you specify a speed of 115.2k (in your communication
  program or by stty) then the serial driver sets the port hardware to
  divisor 1 which obviously sets the highest speed.  If you happen to
  have hardware with a maximum speed of say 230.4k, then specifying
  115.2k will result in divisor 1 and will actually give you 230.4k.
  This is double the speed that you set.  In fact, for any speed you
  set, the actual speed will be double.  If you had hardware that could
  run at 460.8k then the actual speed would be quadruple what you set.


  9.1.2.  Work-arounds for setting speed

  To correct this accounting (but not always fix the problem) you may
  use "setserial" to change the baud_base to the actual maximal speed of
  your port such as 230.4k.  Then if you set the speed (by your
  application or by stty) to 230.4k, a divisor of 1 will be used and
  you'll get the same speed as you set.  PROBLEM: stty and many
  communication programs (as of mid 1999) still have 115.2k as their
  maximum speed setting and will not let you set 230.4k, etc.  So in
  these cases one solution is not to change anything with setserial but
  mentally keep in mind that the actual speed is always double what you
  set.

  There's another work-around which is not much better.  To use it you
  set the baud_base (with setserial) to the maximal speed of your
  hardware.  This corrects the accounting so that if you set say 115.2k
  you actually get 115.2k.  Now you still have to figure out how to set
  the highest speed if your communication program (or the like) will not
  let you do it.  Fortunately, setserial has a way to do this: use the
  "spd_cust" parameter with "divisor 1".  Then when you set the speed to
  38400 in a communication program, the divisor will be set to 1 in the
  port and it will operate at maximum speed.  For example:
  setserial /dev/ttyS2 spd_cust baud_base 230400 divisor 1
  Don't try using "divisor" for any other purpose other than the special
  use illustrated above (with spd_cust).


  If there are two or more high speeds that you want to use that your
  communication program can't set, then it's not quite as easy as above.
  But the same principles apply.   You could just keep the default
  baud_base and understand that when you set a speed you are really only
  setting a divisor.  So your actual speed will always be your maximum
  speed divided by whatever divisor is set by the serial driver.  See
  ``How speed is set in hardware: the divisor and baud_base''


  9.1.3.  Crystal frequency is not baud_base

  Note that the baud_base setting is usually much lower than the
  frequency of the crystal oscillator in the hardware since the crystal
  frequency is often divided by 16 in the hardware to get the actual top
  speed.  The reason the crystal frequency needs to be higher is so that
  this high crystal speed can be used to take a number of samples of
  each  bit to determine if it's a 1 or a 0.



  9.2.  Higher Serial Throughput

  If you are seeing slow throughput and serial port overruns on a system
  with (E)IDE disk drives, you can get hdparm.  This is a utility that
  can modify (E)IDE parameters, including unmasking other IRQs during a
  disk IRQ.  This will improve responsiveness and will help eliminate
  overruns.  Be sure to read the man page very carefully, since some
  drive/controller combinations don't like this and may corrupt the
  filesystem.

  Also have a look at a utility called irqtune that will change the IRQ
  priority of a device, for example the serial port that your modem is
  on.  This may improve the serial throughput on your system.  The
  irqtune FAQ is at http://www.best.com/~cae/irqtune
  <http://www.best.com/~cae/irqtune>


  10.  Locking Out Others

  10.1.  Introduction

  When you are using a serial port, you may want to prevent others from
  using it at the same time.  However there may be cases where you do
  want others to use it, such as sending you an important message if you
  are using a text-terminal.

  There are various ways of preventing others (or other processes) from
  using your serial port when you are using it (locking).  This should
  all happen automatically but it's important to know about this if it
  gives you trouble.  If a program is abnormally exited or the PC is
  abruptly turned off (by pulling the plug, etc.) your serial port might
  wind up locked.  Even if the lock remains, it's usually automatically
  removed when you want to use the serial port again.  But in rare cases
  it isn't.  That's when you need to understand what happened.

  One way to implement locking is to design the kernel to handle it but
  Linux thus far has shunned this solution (with an exception involving
  the cua device which is now obsolete).  Two solutions used by Linux is
  to:

  1. create lock-files

  2. modify the permissions and/or owners of devices such as /dev/ttyS2



  10.2.  Lock-Files

  A lock-file is simply a file created to mean that a particular device
  is in use.  They are kept in /var/lock.  Formerly they were in
  /usr/spool/uucp.  Linux lock-files are sometimes named LCK..name,
  where name is either a device name, or a UUCP site name.  Most
  processes (an exception is getty) create these locks so that they can
  have exclusive access to devices.  For instance if you dial out on
  your modem, a lock-file (or even more that one lockfile) will appear
  telling other processes that someone else is using the modem.  Lock
  files contain the PID of the process that has locked the device.  Note
  that if a process insists on using a device that is locked, it may
  ignore the lockfile and use the device anyway.  This is useful in
  sending a message to a text-terminal, etc.

  When a program wants to use a serial port but finds it locked with a
  lock-file it should check to see if the lock-file's PID is still in
  use.  If it's not it means that the lock is stale and it's OK to go
  ahead and use the port anyway (after removing the stale lock-file).
  Unfortunately, there may be some programs that don't do this and give
  up by telling you that a device is already in use when it really
  isn't.

  Problems can arise with lockfiles if the same device has two different
  names, resulting in lockfiles with different names that actually are
  the same device.  Formerly each physical serial port was known by two
  different device names: ttyS0 and cua0.  The lock checking software is
  aware of ttyS vs. cua but it's simpler now since cua has been
  eliminated.  Older versions may still use cua.  Using alternate names
  (such as /dev/modem for /dev/ttyS2) is asking for trouble.


  10.3.  Change Owners, Groups, and/or Permissions of Device Files

  In order to use a device, you (or the program you run if you have "set
  user id") needs to have permission to read and write the device "file"
  in the /dev directory.  So a logical way to prevent others from using
  a device is to make yourself the temporary owner of the device and set
  permissions so that no one else can use it.  A program may do this for
  you.  A similar method can be used with the group of the device file.

  While lock files prevent other process from using the device, changing
  device file owners/permissions restricts other users (or the group)
  from using it.  One case is where the group is permitted to write to
  the port, but not to read from it.  Writing to the port might just
  mean a message sent to a text-terminal while reading means destructive
  reading.  The original process that needs to read the data may find
  data missing if another process has already read that data.  Thus a
  read can do more harm that a write since a read causes loss of data
  while a write only adds extra data.  That's a reason to allow writes
  but not reads.  This is exactly the opposite of the case for ordinary
  files where you allow others to read the file but not write (modify)
  it.  Use of a port normally requires both read and write permissions.

  A program that changes the device file attributes should undo these
  changes when it exits.  But if the exit is abnormal, then a device
  file may be left in such a condition that it gives the error
  "permission denied" when one attempts to use it again.


  11.  Communications Programs And Utilities

  11.1.  List of Software

  Here is a list of some communication software you can choose from,
  available via FTP, if they didn't come with your distribution.
    ecu - a communications program

    C-Kermit <http://www.columbia.edu/kermit/> - portable, scriptable,
     serial and TCP/IP communications including file transfer,
     character-set translation, and zmodem support

    minicom - telix-like communications program

    seyon - X based communication program

    xc - xcomm communication package

    term and SLiRP offer TCP/IP functionality using a shell account.

    screen is another multi-session program.  This one behaves like the
     virtual consoles.

    callback is where you dial out to a remote modem and then that
     modem hangs up and calls you back (to save on phone bills).

    mgetty+fax handles FAX stuff, and provides an alternate ps_getty.

    ZyXEL is a control program for ZyXEL U-1496 modems.  It handles
     dialin, dialout, dial back security, FAXing, and voice mailbox
     functions.


    SLIP and PPP software can be found at
      ftp://metalab.unc.edu/pub/Linux/system/network/serial.


  11.2.  kermit and zmodem

  To use zmodem with kermit (for ttyS3), add the following to your
  .kermrc:


       define rz !rz < /dev/ttyS3 > /dev/ttyS3
       define sz !sz \%0 > /dev/ttyS3 < /dev/ttyS3



  Be sure to put in the correct port your modem is on.  Then, to use it,
  just type rz or sz <filename> at the kermit prompt.


  12.  Serial Tips And Miscellany

  Here are some serial tips you might find helpful...


  12.1.  Line Drivers

  For a text terminal, the EIA-232 speeds are fast enough but the usable
  cable length is often too short.  Balanced technology could fix this.
  The common method of obtaining balanced communication with a text
  terminal is to install 2@ line drivers in the serial line to convert
  unbalanced to balanced (and conversely).  They are a specialty item
  and are expensive if purchased new.

  12.2.  Known Defective Hardware



  12.2.1.  Avoiding IO Address Conflicts with Certain Video Boards

  The IO address of the IBM 8514 video board (and others) is allegedly
  0x?2e8 where ? is 2, 4, 8, or 9.  This may conflict (but shouldn't if
  the serial port is well designed) with the IO address of ttyS3 at
  0x02e8 if the serial port ignores the leading 0 hex digit when it
  decodes the address (many do).  That is bad news if you try to use
  ttyS3 at this IO address.  Another story is that Linux will not detect
  your internal modem on ttyS3 but that you can use setserial to put
  ttyS3 at this address and the modem will work fine.


  12.2.2.  Problem with AMD Elan SC400 CPU (PC-on-a-chip)

  This has a race condition between an interrupt and a status register
  of the UART.  An interrupt is issued when the UART transmitter
  finishes the transmission of a byte and the UART transmit buffer
  becomes empty (waiting for the next byte).  But a status register of
  the UART doesn't get updated fast enough to reflect this.  As a
  result, the interrupt service routine rapidly checks and determines
  (erroneously) that nothing has happened.  Thus no byte is sent to the
  port to be transmitted and the UART transmitter waits in vain for a
  byte that never arrives.  If the interrupt service routine had waited
  just a bit longer before checking the status register, then it would
  have been updated to reflect the true state and all would be OK.

  There is a proposal to fix this by patching the serial driver.  But
  Should linux be patched to accommodate defective hardware, especially
  if this patch may impair performance of good hardware?


  13.  Troubleshooting

  See Modem-HOWTO for troubleshooting related to modems or getty for
  modems.


  13.1.  Serial Electrical Test Equipment

  13.1.1.  Breakout Gadgets, etc.

  While a multimeter (used as a voltmeter) may be all that you need for
  just a few terminals, simple special test equipment has been made for
  testing serial port lines.  Some are called "breakout ... " where
  breakout means to break out conductors from a cable.  These gadgets
  have a couple of connectors on them and insert into the serial cable.
  Some have test points for connecting a voltmeter.  Others have LED
  lamps which light when certain modem control lines are asserted
  (turned on).  Still others have jumpers so that you can connect any
  wire to any wire.  Some have switches.

  Radio Shack sells (in 1998) a "RS-232 Troubleshooter" or "RS-232 Line
  Tester" which checks TD, RD, CD, RTS, CTS, DTR, and DSR.  A green
  light means on (+12 v) while red means off (-12 v).  They also sell a
  "RS-232 Serial Jumper Box" which permits connecting the pins anyway
  you choose.


  13.1.2.  Measuring Voltages

  Any voltmeter or multimeter, even the cheapest that sells for about
  $10, should work fine.  Trying to use other methods for checking
  voltage is tricky.  Don't use a LED unless it has a series resistor to
  reduce the voltage across the LED.  A 470 ohm resistor is used for a
  20 ma LED (but not all LED's are 20 ma).  The LED will only light for
  a certain polarity so you may test for + or - voltages.  Does anyone
  make such a gadget for automotive circuit testing??  Logic probes may
  be damaged if you try to use them since the TTL voltages for which
  they are designed are only 5 volts.  Trying to use a 12 V incandescent
  light bulb is not a good idea.  It won't show polarity and due to
  limited output current of the UART it probably will not even light up.

  To measure voltage on a female connector you may plug in a bent paper
  clip into the desired opening.  The paper clip's diameter should be no
  larger than the pins so that it doesn't damage the contact.  Clip an
  alligator clip (or the like) to the paper clip to connect up.


  13.1.3.  Taste Voltage

  As a last resort, if you have no test equipment and are willing to
  risk getting shocked (or even electrocuted) you can always taste the
  voltage.  Before touching one of the test leads with your tongue, test
  them to make sure that there is no high voltage on them.  Touch both
  leads (at the same time) to one hand to see if they shock you.  Then
  if no shock, wet the skin contact points by licking and repeat.  If
  this test gives you a shock, you certainly don't want to use your
  tongue.

  For the test for 12 V, Lick a finger and hold one test lead in it.
  Put the other test lead on your tongue.  If the lead on your tongue is
  positive, there will be a noticeable taste.  You might try this with
  flashlight batteries first so you will know what taste to expect.


  13.2.  Serial Monitoring/Diagnostics

  A few Linux programs will monitor the modem control lines and indicate
  if they are positive (1) or negative (0).  See section ``Serial
  Monitoring/Diagnostics''


  13.3.  (The following subsections are in both the Serial and Modem
  HOWTOs)

  13.4.  My Serial Port is Physically There but Can't be Found

  If a device (such as a modem) give evidence of working, then the
  serial port that it's on has been found.  If it doesn't work at all,
  then you need to make sure your serial port can be found.

  Check the BIOS menus and BIOS messages.  For the PCI bus use lspci or
  scanpci.  If it's an ISA bus PnP serial port, try "pnpdump --dumpregs"
  and/or see Plug-and-Play-HOWTO.  Using "scanport" will scan all ISA
  bus ports and may discover an unknown port that could be a serial port
  (but it doesn't probe the port).  It could hang your PC.  You may try
  probing with setserial.  See ``Probing''.  If nothing seems to get
  thru the port it may be accessible but have a bad interrupt.  See
  ``Extremely Slow: Text appears on the screen slowly after long
  delays''.  Use setserial -g to see what the serial driver thinks and
  check for IRQ and I0 address conflicts.  Even if you see no conflicts
  the driver may have incorrect information and conflicts may still
  exist.

  If two ports have the same IO address then probing it will erroneously
  indicate only one port.  Plug-and-play detection will find both ports
  so this should only be a problem if at least one port is not plug-and-
  play.  All sorts of errors may be reported/observed for devices
  illegally "sharing" a port but the fact that there are two devices on
  the same a port doesn't seem to get detected (except hopefully by
  you).  In the above case, if the IRQs are different then probing for
  IRQs with setserial might "detect" this situation by failing to detect
  any IRQ.  See ``Probing''.


  13.5.  Extremely Slow: Text appears on the screen slowly after long
  delays

  It's likely mis-set/conflicting interrupts.  Here are some of the
  symptoms which will happen the first time you try to use a modem,
  terminal, or printer.  In some cases you type something but nothing
  appears on the screen until many seconds later.  Only the last
  character typed may show up.  It may be just an invisible <return>
  character so all you notice is that the cursor jumps down one line.
  In other cases where a lot of data should appear on the screen, only a
  batch of about 16 characters appear.  Then there is a long wait of
  many seconds for the next batch of characters.  You might also get
  "input overrun" error messages (or find them in logs).

  For more details on the symptoms and why this happens see

  ``Interrupt Problem Details'' and/or ``Interrupt Conflicts'' and/or
  ``Mis-set Interrupts''.  If it involves Plug-and-Play devices, see
  also Plug-and-Play-HOWTO.

  As a quick check to see if it really is an interrupt problem, set the
  IRQ to 0 with "setserial".  This will tell the driver to use polling
  instead of interrupts.  If this seems to fix the "slow" problem then
  you had an interrupt problem.  You should still try to solve the
  problem since polling uses excessive computer resources and sometimes
  drastically decreases your thruput.

  Checking to find the interrupt conflict may not be easy since Linux
  supposedly doesn't permit any interrupt conflicts and will send you a
  ``/dev/ttyS?: Device or resource busy'' error message if it thinks you
  are attempting to create a conflict.  But a real conflict can be
  created if "setserial" has incorrect information.  Thus using
  "setserial" will not reveal the conflict (nor will looking at
  /proc/interrupts which bases its info on "setserial").  You still need
  to know what "setserial" thinks so that you can pinpoint where it's
  wrong and change it when you determine what's really set in the
  hardware.

  What you need to do is to check how the hardware is set by checking
  jumpers or using PnP software to check how the hardware is actually
  set.  For PnP run either "pnpdump --dumpregs" (if ISA bus) or run
  "lspci" (if PCI bus).  Compare this to how Linux (e.g. "setserial")
  thinks the hardware is set.


  13.6.  Somewhat Slow: I expected it to be a few times faster

  One reason may be that whatever is on the serial port (such as a
  modem, terminal, printer) doesn't work as fast as you thought it did.


  Another possible reason is that the serial driver thinks you have an
  obsolete serial port (UART 8250,16450 or early 16550).  See ``What Are
  UARTs?''.  Use "setserial -g /dev/ttyS*".  If it shows anything less
  than a 16550A, this is likely your problem.  Then if "setserial" has
  it wrong, change it.  See ``What is Setserial'' for more info.  Of
  course if you really do have an obsolete serial port, lying about it
  to setserial will only make things worse.



  13.7.  The Startup Screen Show Wrong IRQs for the Serial Ports.

  Linux does not do any IRQ detection on startup.  When the serial
  module loads it only does serial device detection.  Thus, disregard
  what it says about the IRQ, because it's just assuming the standard
  IRQs.  This is done, because IRQ detection is unreliable, and can be
  fooled.  But if and when setserial runs from a start-up script, it
  changes the IRQ's and displays the new (and hopefully correct) state
  on on the startup screen.  If the wrong IRQ is not corrected by a
  later display on the screen, then you've got a problem.

  So, even though I have my ttyS2 set at IRQ 5, I still see


       ttyS02 at 0x03e8 (irq = 4) is a 16550A



  at first when Linux boots.  (Older kernels may show "ttyS02" as
  "tty02") You have to use setserial to tell Linux the IRQ you are
  using.


  13.8.  "Cannot open /dev/ttyS?: Permission denied"

  Check the file permissions on this port with "ls -l /dev/ttyS?"_ If
  you own the ttyS? then you need read and write permissions: crw with
  the c (Character device) in col. 1.  It you don't own it then it
  should show rw- in cols. 8 & 9 which means that everyone has read and
  write permission on it.  Use "chmod" to change permissions.  There are
  more complicated ways to get access like belonging to a "group" that
  has group permission.


  13.9.  "Operation not supported by device" for ttyS?

  This means that an operation requested by setserial, stty, etc.
  couldn't be done because the kernel doesn't support doing it.
  Formerly this was often due to the "serial" module not being loaded.
  But with the advent of PnP, it may likely mean that there is no modem
  (or other serial device) at the address where the driver (and
  setserial) thinks it is.  If there is no modem there, commands (for
  operations) sent to that address obviously don't get done.  See ``What
  is set in my serial port hardware?''

  If the "serial" module wasn't loaded but "lsmod" shows you it's now
  loaded it might be the case that it's loaded now but wasn't loaded
  when you got the error message.  In many cases the module will
  automatically loaded when needed (if it can be found).  To force
  loading of the "serial" module it may be listed in the file:
  /etc/modules.conf or /etc/modules.  The actual module should reside
  in: /lib/modules/.../misc/serial.o.


  13.10.  "Cannot create lockfile. Sorry"

  When a port is "opened" by a program a lockfile is created in
  /var/lock/.  Wrong permissions for the lock directory will not allow a
  lockfile to be created there.  Use "ls -ld /var/lock" to see if the
  permissions are OK: usually rwx for everyone (repeated 3 times).  If
  it's wrong, use "chmod" to fix it.  Of course, if there is no "lock"
  directory no lockfile can be created there.  For more info on
  lockfiles see ``What Are Lock Files''


  13.11.  "Device /dev/ttyS? is locked."

  This means that someone else (or some other process) is supposedly
  using the serial port.  There are various ways to try to find out what
  process is "using" it.  One way is to look at the contents of the
  lockfile (/var/lock/LCK...).  It should be the process id.  If the
  process id is say 261 type "ps 261" to find out what it is.  Then if
  the process is no longer needed, it may be gracefully killed by "kill
  261".  If it refuses to be killed use "kill -9 261" to force it to be
  killed, but then the lockfile will not be removed and you'll need to
  delete it manually.  Of course if there is no such process as 161 then
  you may just remove the lockfile but in most cases the lockfile should
  have been automatically removed if it contained a stale process id
  (such as 261).


  13.12.  "/dev/ttyS?: Device or resource busy"

  This means that the device you are trying to access (or use) is
  supposedly busy (in use) or that a resource it needs (such as an IRQ)
  is supposedly being used by another device.  Sometimes it actually is
  "busy" but in other cases it erroneously appears to be "busy".

  The ``resource busy'' part often means (example for ttyS2) ``You can't
  use ttyS2 since another device is using ttyS2's interrupt.'' The
  potential interrupt conflict is inferred from what "setserial" thinks.
  A more accurate error message would be ``Can't use ttyS2 since the
  setserial data (and kernel data) indicates that another device is
  using ttyS2's interrupt''.  If two devices use the same IRQ and you
  start up only one of the devices, everything is OK because there is no
  conflict yet.  But when you next try to start the second device
  (without quitting the first device) you get a "... resource busy"
  error message.  This is because the kernel only keeps track of what
  IRQs are actually in use and conflicts don't happen unless the devices
  are in use (open).

  There are two possible cases when you see this message:

  1. There may be a real interrupt conflict that is being avoided.

  2. Setserial has it wrong and the only reason ttyS2 can't be used is
     that setserial erroneously predicts a conflict.

  What you need to do is to find the interrupt setserial thinks ttyS2 is
  using.  This is easier said than done since you can't use the
  "setserial" command for ttyS2 since the IRQ for ttyS2 is supposedly
  "busy" and you will get the same "... busy" error message.  To fix
  this either reboot or: exit or gracefully kill all likely conflicting
  processes.   If you reboot: 1. Watch the boot-time messages for the
  serial ports.  2. Hope that the file that runs "setserial" at boot-
  time doesn't (by itself) create the same conflict again.

  If you think you know what IRQ ttyS2 is using then you may look at
  /proc/interrupts to find what else (besides another serial port) is
  currently using this IRQ.  You might also want to double check that
  any suspicious IRQs shown here (and by "setserial") are correct (the
  same as set in the hardware).  A way to test whether or not it is a
  potential interrupt conflict is to set the IRQ to 0 (polling) using
  "setserial".  Then if the busy message goes away, it was likely a
  potential interrupt conflcit.  It's not a good idea to leave it
  permanently set at 0 since more CPU resources will be used.



  13.13.  Troubleshooting Tools

  These are some of the programs you might want to use in
  troubleshooting:

    "lsof /dev/ttyS*" will list serial ports which are open.

    "setserial" shows and sets the low-level hardware configuration of
     a port (what the driver thinks it is).  See ``What is Setserial''

    "stty" shows and sets the configuration of a port (except for that
     handled by "setserial").  See the section ``Stty''

    "modemstat" or "statserial" will show the current state of various
     modem signal lines (such as DTR, CTS, etc.)

    "irqtune" will give serial port interrupts higher priority to
     improve performance.

    "hdparm" for hard-disk tuning may help some more.

    "lspci" shows the actual IRQs, etc. of hardware on the PCI bus.

    "pnpdump --dumpregs" shows the actual IRQs, etc. of hardware for
     PnP devices on the ISA bus.

    Some "files" in the /proc tree (such as ioports and interrupts).



  14.  Interrupt Problem Details

  While the section ``Troubleshooting'' lists problems by symptom, this
  section explains what will happen if interrupts are set incorrectly.
  This section helps you understand what caused the symptom, what other
  symptoms might be due to the same problem, and what to do about it.


  14.1.  Types of interrupt problems

  The "setserial" program will show you how serial driver thinks the
  interrupts are set.  If the serial driver (and setserial) has it right
  then everything regarding interrupts should be OK.  Of course a
  /dev/ttyS must exist for the device and Plug-and-Play (or jumpers)
  must have set an address and IRQ in the hardware.  Linux will not
  knowingly permit an interrupt conflict and you will get a "Device or
  resource busy" error message if you attempt to do something that would
  create a conflict.

  Since the kernel tries to avoid interrupt conflicts and gives you the
  "resource busy" message if you try to create a conflict, how can
  interrupt conflicts happen?  Easy.  "setserial" may have it wrong and
  erroneously predicts no conflict when there will actually be a real
  conflict based on what is set in the hardware.  When this happens
  there will be no "... busy" message but performance will be extremely
  slow.  Both devices will send identical interrupt signals on the same
  wire and the CPU will erroneously think that the interrupts only come
  from one device.  This will be explained in detail in the following
  sections.

  Linux doesn't complain when you assign two devices the same IRQ
  provided that neither device is in use.  As each device starts up
  (initializes), it asks Linux for permission to use its hardware
  interrupt.  Linux keeps track of which interrupt is assigned to whom,
  and if your interrupt is already in use, you'll see this "... busy"
  error message.  Thus if two devices use the same IRQ and you start up
  only one of the devices, everything is OK.  But when you next try to
  start the second device (without quitting the first device) you get
  "... busy" error message.


  14.2.  Symptoms of Mis-set or Conflicting Interrupts

  The symptoms depend on whether or not you have a modern serial port
  with FIFO buffers or an obsolete serial port without FIFO buffers.
  It's important to understand the symptoms for the obsolete ones also
  since sometimes modern ports seem to behave that way.

  For the obsolete serial ports, only one character gets thru every
  several seconds.  This is so slow that it seems almost like nothing is
  working (especially if the character that gets thru is invisible (such
  a space or newline).  For the modern ports with FIFO buffers you will
  likely see bursts of up to 16 characters every several seconds.

  If you have a modem on the port and dial a number, it seemingly may
  not connect since the CONNECT message may not make it thru.  But after
  a long wait it may finally connect and you may see part of a login
  message (or the like).  The response from your side of the connection
  may be so delayed that the other side gives up and disconnects you,
  resulting in a NO CARRIER message.

  If you use minicom, a common test to see if things are working is to
  type the simplest "AT" command and see if the modem responds.  Typing
  just at<enter> should normally (if interrupts are OK) result in an
  immediate "OK" response from the modem.  With bad interrupts you type
  at<enter> and may see nothing.  But then after 10 seconds or so you
  see the cursor drop down one line.  What is going on is that the FIFO
  is behaving like it can only hold one byte.  The "at" you typed caused
  it to overrun and both letters were lost.  But the final <enter> got
  thru since you waited for it and you "see" this invisible character by
  noting that the cursor jumped down one line.  If you were to type a
  single letter and then wait about 10 seconds, you should see it echo
  back to the screen.  This is fine if your typing speed is less that
  one word per minute :-)


  14.3.  Mis-set Interrupts

  If you don't understand what an interrupt does see ``Interrupts''.  If
  a serial port has one IRQ set in the hardware but a different one set
  in the device driver, the device driver will not catch any interrupts
  sent by the serial port.  Since the serial port uses interrupts to
  call its driver to service the port (fetching bytes from its 16-byte
  receive buffer or putting another 16-bytes in its transmit buffer) one
  might expect that the serial port would not work at all.

  But it still may work anyway --sort of.  Why?  Well, besides the
  interrupt method of servicing the port there's a slow polling method
  that doesn't need interrupts.  The way it works is that every so often
  the device driver checks the serial port to see if it needs anything
  such as if it has some bytes that need fetching from its receive
  buffer.  If interrupts don't work, the serial driver falls back to
  this polling method.  But this polling method was not intended to be
  used a substitute for interrupts.   It's so slow that it's not
  practical to use and may cause buffer overruns.  Its purpose may have
  been to get things going again if just one interrupt is lost or fails
  to do the right thing.  It's also useful in showing you that
  interrupts have failed.

  For the 16-byte transmit buffer, 16 bytes will be transmitted and then
  it will wait until the next polling takes place (several seconds
  later) before the next 16 bytes are sent out.  Thus transmission is
  very slow and in small chunks.  Receiving is slow too since bytes that
  are received by the receive buffer are likely to remain there for
  several seconds until it is polled.

  This explains why it takes so long before you see what you typed.
  When you type say AT to a modem, the AT goes out the serial port to
  the modem.  The modem then echos the AT back thru the serial port to
  the screen.  Thus the AT characters have to pass twice thru the serial
  port.  Normally this happens so fast that AT seems to appear on the
  screen at the same time you hit the keys on the keyboard.  With
  polling delays thru the serial port, you don't see what you typed
  until many seconds later.

  What about overruns of the 16-byte receive buffer?  This will happen
  with an external modem since the modem just sends to the serial port
  at high speed which is likely to overrun the 16-byte buffer.  But for
  an internal modem, the serial port is on the same card and it's likely
  to check that this receive buffer has room for more bytes before
  putting received bytes into it.  In this case there will be no overrun
  of this receive buffer, but text will just appear on your screen in
  16-byte chunks spaced at intervals of several seconds.

  Even with an external modem you might not get overruns.  If just a few
  characters (under 16) are sent you don't get overruns since the buffer
  likely has room for them.  But attempts to send a larger number of
  bytes from your modem to your screen may result in overruns.  However,
  more than 16 (with no gaps) can get thru without overruns if the
  timing is right.  For example, suppose a burst of 32 bytes is sent
  into the port from the external cable.  The polling might just happen
  after the first 16 bytes came in so it would pick up these 16 bytes
  OK.  Then there would be space for the next 16 bytes so that entire 32
  bytes gets thru OK.  While this scenario is not very likely, similar
  cases where 17 to 31 bytes make thru are more likely.  But it's even
  more likely that only an occasional 16-byte chunk will get thru with
  possible loss of data.

  If you have an obsolete serial port with only a 1-byte buffer (or it's
  been incorrectly set to work like a 1-byte buffer) then the situation
  will be much worse than described above and only one character will
  occasionally make it thru the port.  Every character received causes
  an overrun (and is lost) except for the last character received.  This
  character is likely to be just a line-feed since this is often the
  last character to be transmitted in a burst of characters sent to your
  screen.  Thus you may type AT<return> to the modem but never see AT on
  the screen.  All you see several seconds later is that the cursor
  drops down one line (a line feed).  This has happened to me with a
  16-byte FIFO buffer that was behaving like a 1-byte buffer.

  When a communication program starts up, it expects interrupts to be
  working.  It's not geared to using this slow polling-like mode of
  operation.  Thus all sorts of mistakes may be made such as setting up
  the serial port and/or modem incorrectly.  It may fail to realize when
  a connection has been made.  If a script is being used for login, it
  may fail (caused by timeout) due to the polling delays.


  14.4.  Interrupt Conflicts

  When two devices have the same IRQ number it's called sharing
  interrupts.  Under some conditions this sharing works out OK.
  Starting with kernel version 2.2, serial ports may, in some cases,
  share interrupts with other serial ports.  Devices on the PCI bus may
  share the same IRQ interrupt with other devices on the PCI bus.  In
  other cases where there is potential for conflict, there should be no
  problem if no two devices with the same IRQ are ever "in use" at the
  same time.   More precisely, "in use" really means "open" (in
  programmer jargon).  In cases other than the exceptions mentioned
  above (unless special software and hardware permit sharing), sharing
  is not allowed and conflicts arise if sharing is attempted.

  Even if two processes with conflicting IRQs run at the same time, one
  of the devices will likely have its interrupts caught by its device
  driver and may work OK.  The other device will not have its interrupts
  caught by the correct driver and will likely behave just like a
  process with mis-set interrupts.  See ``Mis-set Interrupts'' for more
  details.


  14.5.  Resolving Interrupt Problems

  If you are getting a very slow response as described above, then one
  test is to change the IRQ to 0 (uses fast polling instead of
  interrupts) and see if the problem goes away.  Note that the polling
  due to IRQ=0 is orders of magnitude faster than the slow "polling" due
  to bad interrupts.  If IRQ=0 seems to fix the problem, then there was
  likely something wrong with the interrupts.  Using IRQ=0 is very
  resource intensive and is only a temporary fix.  You should try to
  find the cause of the interrupt problem and not permanently use IRQ=0.

  Check /proc/interrupts to see if the IRQ is currently in use by
  another process. If it's in use by another serial port you could try
  "top" (type f and then enable the TTY display) or "ps -e" to find out
  which serial ports are in use.  If you suspect that setserial has a
  wrong IRQ then see ``What is the current IO address and IRQ of my
  Serial Port ?''


  15.  What Are UARTs?  How Do They Affect Performance?

  15.1.  Introduction to UARTS

  (This section is also in the Modem-HOWTO) UARTs (Universal
  Asynchronous Receiver Transmitter) are serial chips on your PC
  motherboard (or on an internal modem card).   The UART function may
  also be done on a chip that does other things as well.  On older
  computers like many 486's, the chips were on the disk IO controller
  card.  Still older computer have dedicated serial boards.

  The UART's purpose is to convert bytes from the PC's parallel bus to a
  serial bit-stream.  The cable going out of the serial port is serial
  and has only one wire for each direction of flow.  The serial port
  sends out a stream of bits, one bit at a time.  Conversely, the bit
  stream that enters the serial port via the external cable is converted
  to parallel bytes that the computer can understand.  UARTs deal with
  data in byte sized pieces, which is conveniently also the size of
  ASCII characters.

  Say you have a terminal hooked up to your PC.  When you type a
  character, the terminal gives that character to its transmitter (also
  a UART).  The transmitter sends that byte out onto the serial line,
  one bit at a time, at a specific rate.  On the PC end, the receiving
  UART takes all the bits and rebuilds the (parallel) byte and puts it
  in a buffer.

  Along with converting between serial and parallel, the UART does some
  other things as a byproduct (side effect) of its primary task.  The
  voltage used to represent bits is also converted (changed).  Extra
  bits (called start and stop bits) are added to each byte before it is
  transmitted.  See the Serial-HOWTO section, ``Voltage Waveshapes'' for
  details.  Also, while the flow rate (in bytes/sec) on the parallel bus
  inside the computer is very high, the flow rate out the UART on the
  serial port side of it is much lower.  The UART has a fixed set of
  rates (speeds) which it can use at its serial port interface.


  15.2.  Two Types of UARTs

  There are two basic types of UARTs: dumb UARTS and FIFO UARTS.  Dumb
  UARTs are the 8250, 16450, early 16550, and early 16650.  They are
  obsolete but if you understand how they work it's easy to understand
  how the modern ones work with FIFO UARTS ( late 16550, 16550A, 16c552,
  late 16650, 16750, and 16C950).

  There is some confusion regarding 16550.  Early models had a bug and
  worked properly only as 16450's (no FIFO).  Later models with the bug
  fixed were named 16550A but many manufacturers did not accept the name
  change and continued calling it a 16550.  Most all 16550's in use
  today are like 16550A's.  Linux will report it as being a 16550A even
  though your hardware manual (or a label note) says it's a 16550.  A
  similar situation exists for the 16650 (only it's worse since the
  manufacturer allegedly didn't admit anything was wrong).  Linux will
  report a late 16650 as being a 16650V2.  If it reports it as 16650 it
  is bad news and only is used as if it had a one-byte buffer.


  15.3.  FIFOs

  To understand the differences between dumb and FIFO (First In, First
  Out queue discipline) first let's examine what happens when a UART has
  sent or received a byte.  The UART itself can't do anything with the
  data passing thru it, it just receives and sends it.  For the original
  dumb UARTS, the CPU gets an interrupt from the serial device every
  time a byte has been sent or received.  The CPU then moves the
  received byte out of the UART's buffer and into memory somewhere, or
  gives the UART another byte to send.  The 8250 and 16450 UARTs only
  have a 1 byte buffer.  That means, that every time 1 byte is sent or
  received, the CPU is interrupted.  At low transfer rates, this is OK.
  But, at high transfer rates, the CPU gets so busy dealing with the
  UART, that is doesn't have time to adequately tend to other tasks.  In
  some cases, the CPU does not get around to servicing the interrupt in
  time, and the byte is overwritten, because they are coming in so fast.
  This is called an "overrun" or "overflow".

  That's where the FIFO UARTs are useful.  The 16550A (or 16550) FIFO
  chip comes with 16 byte FIFO buffers.  This means that it can receive
  up to 14 bytes (or send 16 bytes) before it has to interrupt the CPU.
  Not only can it wait for more bytes, but the CPU then can transfer all
  14 (or more) bytes at a time.  This is a significant advantage over
  the other UARTs, which only have 1 byte buffers.  The CPU receives
  less interrupts, and is free to do other things.  Data is not lost,
  and everyone is happy.  Note that the interrupt threshold of FIFO
  buffers (trigger level) may be set at less than 14.  1, 4 and 8 are
  other possible choices.

  While most PC's only have a 16550 with 16-byte buffers, better UARTS
  have even larger buffers.  Note that the interrupt is issued slightly
  before the buffer get full (at say a "trigger level" of 14 bytes for a
  16-byte buffer).  This allows room for a few more bytes to be received
  during the time that the interrupt is being serviced.  The trigger
  level may be set to various permitted values by kernel software.  A
  trigger level of 1 will be almost like a dumb UART (except that it
  still has room for 15 more bytes after it issues the interrupt).

  If you type something while visiting a BBS, the characters you type go
  out thru the serial port.  Your typed characters that you see on the
  screen are what was echoed back thru the telephone line thru your
  modem and then thru your serial port to the screen.  If you had a
  16-byte buffer on the serial port which held back characters until it
  had 14 of them, you would need to type many characters before you
  could see what you typed (before they appeared on the screen).  This
  would be very confusing but there is a "timeout" to prevent this.
  Thus you normally see a character on the screen just as soon as you
  type it.

  The "timeout" works like this for the receive UART buffer: If
  characters arrive one after another, then an interrupt is issued only
  when say the 14th character reaches the buffer.  But if a character
  arrives and the next character doesn't arrive soon thereafter, then an
  interrupt is issued.  This happens even though there are not 14
  characters in the buffer (there may only be one character in it).
  Thus when what you type goes thru this buffer, it acts almost like a
  1-byte buffer even though it is actually a 16-byte buffer (unless your
  typing speed is a hundred times faster than normal).  There is also
  "timeout" for the transmit buffer as well.


  15.4.  UART Model Numbers

  Here's a list of UARTs.  TL is Trigger Level

    8250, 16450, early 16550: Obsolete with 1-byte buffers

    16550, 16550A, 16c552: 16-byte buffers, TL=1,4,8,14

    16650:  32-byte buffers. Speed up to 460.8 kbps

    16750:  64-byte buffer for send, 56-byte for receive.  Speed up to
     921.6 kbps

    Hayes ESP: 1k-byte buffers.

  The obsolete ones are only good for modems no higher than 14.4k (DTE
  speeds up to 38400 bps).  For modern modems you need at least a 16550
  (and not an early 16550).  For V.90 56k modems, it may be a several
  percent faster with a 16650 (especially if you are downloading
  uncompressed files).  The main advantage of the 16650 is its larger
  buffer size as the extra speed isn't needed unless the modem
  compression ratio is high.  Some 56k internal modems may come with a
  16650 ??

  Non-UART, and intelligent multiport boards use DSP chips to do
  additional buffering and control, thus relieving the CPU even more.
  For example, the Cyclades Cyclom, and Stallion EasyIO boards use a
  Cirrus Logic CD1400 RISC UART, and many boards use 80186 CPUs or even
  special RISC CPUs, to handle the serial IO.

  Most newer PC's (486's, Pentiums, or better) come with 16550A's
  (usually called just 16550's).  If you have something really old the
  chip may unplug so that you may be able to upgrade by buying a 16550A
  chip and replacing your existing 16450 UART.  If the functionality has
  been put on another type of chip, you are out of luck.  If the UART is
  socketed, then upgrading is easy (if you can find a replacement).  The
  new and old are pin-to-pin compatible.  It may be more feasible to
  just buy a new serial board on the Internet (few retail stores stock
  them today).



  16.  Pinout and Signals



  16.1.  Pinout



          PINOUT of the SERIAL PORT    (--> direction is out of PC)
                  (Note DCD is sometimes labeled CD)
  Pin #   Pin #   Acronym  Full-Name   Direction  What-it-May-Do/Mean
  9-pin   25-pin
   3       2      TxD     Transmit Data     -->   Transmits byte out of PC
   2       3      RxD     Receive Data      <--   Receives bytes into PC
   7       4      RTS     Request To Send   -->   RTS/CTS flow control
   8       5      CTS     Clear To Send     <--   RTS/CTS flow control
   6       6      DSR     Data Set Ready    <--   I'm ready to communicate
   4      20      DTR     Data Terminal Ready-->  I'm ready to communicate
   1       8      DCD     Data Carrier Detect<--  Modem connected to another
   9      22      RI      Ring Indicator    <--   Telephone line ringing
   5       7              Signal Ground



  16.2.  Signals May Have No Fixed Meaning

  Only 3 of the 9 pins have a fixed assignment: transmit, receive and
  signal ground.  This is fixed by the hardware and you can't change it.
  But the other signal lines are controlled by software and may do (and
  mean) almost anything at all.  However they can only be in one of two
  states: asserted (+12 volts) or negated (-12 volts).  Asserted is "on"
  and negated is "off".  For example, Linux software may command that
  DTR be negated and the hardware only carries out this command and puts
  -12 volts on the DTR pin.  A modem (or other device) that receives
  this DTR signal may do various things.  If a modem has been configured
  a certain way it will hang-up the telephone line when DTR is negated.
  In other cases it may ignore this signal or do something else when DTR
  is negated (turned off).

  It's like this for all the 6 signal lines.  The hardware only sends
  and receives the signals, but what action (if any) they perform is up
  to the Linux software and the configuration/design of devices that you
  connect to the serial port.  However, most pins have certain functions
  which they normally perform but this may vary with the operating
  system and the device driver configuration.  Under Linux, one may
  modify the source code to make these signal lines behave differently
  (some people have).


  16.3.  Cabling Between Serial Ports

  A cable from a serial port always connects to another serial port.  A
  modem or other device that connects to the serial port has a serial
  port built into it.  For modems, the cable is always straight thru:
  pin 2 goes to pin 2, etc.  The modem is said to be DCE (Data
  Communications Equipment) and the computer is said to be DTE (Data
  Terminal Equipment).  Thus for connecting DTE-to-DCE you use straight-
  thru cable.  For connecting DTE-to-DTE you must use a null-modem cable
  and there are many ways to wire such cable (see examples in Text-
  Terminal-HOWTO subsection: "Direct Cable Connection")

  There are good reasons why it works this way.  One reason is that the
  signals are unidirectional.  If pin 2 sends a signal out of it (but is
  unable to receive any signal) then obviously you can't connect it to
  pin 2 of the same type of device.  If you did, they would both send
  out signals on the same wire to each other but neither would be able
  to receive any signal.  There are two ways to deal with this
  situation.  One way is to have a two different types of equipment
  where pin 2 of the first type sends the signal to pin 2 of the second
  type (which receives the signal).  That's the way it's done when you
  connect a PC (DTE) to a modem (DCE).  There's a second way to do this
  without having two different types of equipment: Connect pin sending
  pin 2 to a receiving pin 3 on same type of equipment.  That's the way
  it's done when you connect 2 PC's together or a PC to a terminal (DTE-
  to-DTE).  The cable used for this is called a null-modem cable.  The
  above example is for a 25 pin connector but for a 9-pin connector the
  pin numbers are just the opposite.

  The serial pin designations were originally intended for connecting a
  dumb terminal to a modem.  The terminal was DTE (Data Terminal
  Equipment) and the modem was DCE (Data Communication Equipment).
  Today the PC is usually used as DTE instead of a terminal (but real
  terminals may still be used this way).  The names of the pins are the
  same on both DTE and DCE.  The words: "receive" and "transmit" are in
  this case from the point of view of the PC (DTE).  The transmit pin
  from the PC transmits to the "transmit" pin of the modem (but actually
  the modem is receiving the data from this pin so from the point of
  view of the modem it would be a receive pin).

  The serial port was originally intended to be used for connecting DTE
  to DCE which makes cabling simple: just use a straight-thru cable.
  Thus when one connects a modem one seldom needs to worry about which
  pin is which.  But people wanted to connect DTE to DTE (for example a
  computer to a terminal) and various ways were found to do this by
  fabricating various type of special cables.  In this case what pin
  connects to what pin becomes more important.


  16.4.  RTS/CTS and DTR/DSR Flow Control

  This is "hardware" flow control.  Flow control was previously
  explained in the ``Flow Control'' subsection but the pins and voltage
  signals were not.  Linux only supports RTS/CTS flow control at present
  (but a special driver may exist for a specific application which
  supports DTR/DSR flow control).  Only RTS/CTS flow control will be
  discussed since DTR/DSR flow control works the same way.  To get
  RTS/CTS flow control one needs to either select hardware flow control
  in an application program or use the command:
  stty crtscts < /dev/ttyS2 (or the like).  This enables RTS/CTS
  hardware flow control in the Linux device driver.

  Then when a DTE (such as a PC) wants to stop the flow into it, it
  negates RTS.  Negated "Request To Send" (-12 volts) means "Request NOT
  To Send to me" (stop sending).  When the PC is ready for more bytes it
  asserts RTS (+12 volts) and the flow of bytes to it resumes.  Flow
  control signals are always sent in a direction opposite to the flow of
  bytes that is being controlled.  DCE equipment (modems) works the same
  way but sends the stop signal out the CTS pin.  Thus it's RTS/CTS flow
  control using 2 lines.

  On what pins is this stop signal received?  That depends on whether we
  have a DCE-DTE connection or a DTE-DTE connection.  For DCE-DTE it's a
  straight-thru connection so obviously the signal is received on a pin
  with the same name as the pin it's sent out from.  It's RTS-->RTS (PC
  to modem) and CTS<--CTS (modem to PC).  For DTE-to-DTE the connection
  is also easy to figure out.  The RTS pin always sends and the CTS pin
  always receives.  Assume that we connect two PCs (PC1 and PC2)
  together via their serial ports.  Then it's RTS(PC1)-->CTS(PC2) and
  CTS(PC1)<--RTS(PC2).  In other words RTS and CTS cross over.  Such a
  cable (with other signals crossed over as well) is called a "null
  modem" cable.  See ``Cabling Between Serial Ports''

  What is sometimes confusing is that there is the original use of RTS
  where it means about the opposite of the previous explanation above.
  This original meaning is: I Request To Send to you.  This request was
  intended to be sent from a terminal (or computer) to a modem which, if
  it decided to grant the request, would send back an asserted CTS from
  its CTS pin to the CTS pin of the computer: You are Cleared To Send to
  me.  Note that in contrast to the modern RTS/CTS bi-directional flow
  control, this only protects the flow in one direction: from the
  computer (or terminal) to the modem.  This original use appears to be
  little used today on modern equipment (including modems).


  16.4.1.  The DTR and DSR Pins

  Just like RTS and CTS, these pins are paired.  For DTE-to-DTE
  connections they are likely to cross over.  There are two ways to use
  these pins.  One way is to use them as a substitute for RTS/CTS flow
  control.  The DTR pin is just like the RTS pin while the DSR pin
  behaves like the CTS pin.  Although Linux doesn't support DTR/DSR flow
  control, it can be obtained by connecting the RTS/CTS pins at the PC
  to the DSR/DTR pins at the device that uses DTR/DSR flow control.  DTR
  flow control is the same as DTR/DSR flow control but it's only one-way
  and the DSR pin is not used.  Many text terminals and some printers
  use this type of flow control.

  The normal use of DTR and DSR is as follows: A device asserting DTR
  says that its powered on and ready to operate.  For a modem, the
  meaning of a DTR signal from the PC depends on how the modem is
  configured.  To send a DTR signal manually from a PC using the stty
  command set the baud rate to 0.  Negating DTR is sometimes called
  "hanging up" but it doesn't always do this.


  16.5.  Preventing a Port From Opening

  If "stty -clocal" (or getty is used with the "local" flag negated)
  then a serial port can't open until DCD gets an assert (+12 volts)
  signal.


  17.  Voltage Waveshapes

  17.1.  Voltage for a Bit

  At the EIA-232 serial port, voltages are bipolar (positive or negative
  with respect to ground) and should be about 12 volts in magnitude
  (some are 5 or 10 volts).   For the transmit and receive pins +12
  volts is a 0-bit (sometimes called "space") and -12 volts is a 1-bit
  (sometimes called "mark").  This is known as inverted logic since
  normally a 0-bit is both false and negative while a one is normally
  both true and positive.  Although the receive and transmit pins are
  inverted logic, other pins (modem control lines) are normal logic with
  a positive voltage being true (or "on" or "asserted") and a negative
  voltage being false (or "off" or "negated").  Zero voltage has no
  meaning (except it usually means that the unit is powered off).

  A range of voltages is allowed.  The specs say the magnitude of a
  transmitted signal should be between 5 and 15 volts but must never
  exceed 25 V.  Any voltage received under 3 V is undefined (but some
  devices will accept a lower voltage as valid).  One sometimes sees
  erroneous claims that the voltage is commonly 5 volts (or even 3
  volts) but it's usually 11-12 volts.  If you are using a EIA-422 port
  on a Mac computer as an EIA-232 (requires a special cable) or EIA-423
  then the voltage will actually be only 5 V.  The discussion here
  assumes 12 V.

  Note that normal computer logic normally is just a few volts (5 volts
  was once the standard) so that if you try to use test equipment
  designed for testing 3-5 volt computer logic (TTL) on the 12 volts of
  a serial port, it may damage the test equipment.


  17.2.  Voltage Sequence for a Byte

  The transmit pin (TxD) is held at -12 V (mark) at idle when nothing is
  being sent.  To start a byte it jumps to +12 V (space) for the start
  bit and remains at +12 V for the duration (period) of the start bit.
  Next comes the low-order bit of the data byte.  If it's a 0-bit
  nothing changes and the line remains at +12 V for another bit-period.
  If it's a 1-bit the voltage jumps from +12 to -12 V.  After that comes
  the next bit (-12 V if a 1 or +12 V if a 0), etc., etc.  After the
  last data bit a parity bit may be sent and then a -12 V (mark) stop
  bit.  Then the line remains at -12 V (idle) until the next start bit.
  Note that there is no return to 0 volts and thus there is no simple
  way (except by a synchronizing signal) to tell where one bit ends and
  the next one begins for the case where 2 consecutive bits are the same
  polarity (both zero or both one).

  A 2nd stop bit would also be -12 V, just the same as the first stop
  bit.  Since there is no signal to mark the boundaries between these
  bits, the only effect of the 2nd stop bit is that the line must remain
  at -12 V idle twice as long.  The receiver has no way of detecting the
  difference between a 2nd stop bit and a longer idle time between
  bytes.  Thus communications works OK if one end uses one stop bit and
  the other end uses 2 stop bits, but using only one stop bit is
  obviously faster.  In rare cases 1 1/2 stop bits are used.  This means
  that the line is kept at -12 V for 1 1/2 time periods (like a stop bit
  50% wider than normal).


  17.3.  Parity Explained

  Characters are normally transmitted with either 7 or 8 bits of data.
  An additional parity bit may (or may not) be appended to this
  resulting in a byte length of 7, 8 or 9 bits.  Some terminal emulators
  and older terminals do not allow 9 bits.  Some prohibit 9 bits if 2
  stop bits are used (since this would make the total number of bits too
  large: 12 bits total after adding the start bit).

  The parity may be set to odd, even or none (mark and space parity may
  be options on some terminals or other serial devices).  With odd
  parity, the parity bit is selected so that the number of 1-bits in a
  byte, including the parity bit, is odd.  If a such a byte gets
  corrupted by a bit being flipped, the result is an illegal byte of
  even parity.  This error will be detected and if it's an incoming byte
  to the terminal an error-character symbol will appear on the screen.
  Even parity works in a similar manner with all legal bytes (including
  the parity bit) having an even number of 1-bits.  During set-up, the
  number of bits per character usually means only the number of data
  bits per byte (7 for true ASCII and 8 for various ISO character sets).

  A "mark" is a 1-bit (or logic 1) and a "space" is a 0-bit (or logic
  0).  For mark parity, the parity bit is always a one-bit.  For space
  parity it's always a zero-bit.  Mark or space parity (also known as
  "sticky parity") only wastes bandwidth and should be avoided if
  feasible.  The stty command can't set sticky parity but it's supported
  by serial hardware and can be dealt with by programming in C.  "No
  parity" means that no parity bit is added.   For terminals that don't
  permit 9 bit bytes, "no parity" must be selected when using 8 bit
  character sets since there is no room for a parity bit.



  17.4.  Forming a Byte (Framing)

  In serial transmission of bytes via EIA-232 ports, the low-order bit
  is always sent first.  Serial ports on PC's use asynchronous
  communication where there is a start bit and a stop bit to mark the
  beginning and end of a byte.  This is called framing and the framed
  byte is sometimes called a frame.  As a result a total of 9, 10, or 11
  bits are sent per byte with 10 being the most common.   8-N-1 means 8
  data bits, No parity, 1 stop bit.  This adds up to 10 bits total when
  one counts the start bit.  One stop bit is almost universally used.
  At 110 bits/sec (and sometimes at 300 bits/sec) 2 stop bits were once
  used but today the 2nd stop bit is used only in very unusual
  situations (or by mistake since it still works OK that way but wastes
  bandwidth).


  17.5.  How "Asynchronous" is Synchronized

  The EIA-232 serial port as implemented on PC is asynchronous which in
  effect means that there is no "clock" signal sent with "ticks" to mark
  when each bit is sent..  There are only two states of the transmit (or
  receive) wire: mark (-12 V) or space (+12 V).  There is no state of 0
  V.  Thus a sequence of 1-bits is transmitted by just a steady -12 V
  with no markers of any kind between bits.  For the receiver to detect
  individual bits it must always have a clock signal which is in
  synchronization with the transmitter clock.  Such a clock would
  generate a "tick" in synchronization with each transmitted (or
  received) bit.

  For asynchronous transmission, synchronization is achieved by framing
  each byte with a start bit and a stop bit (done by hardware).  The
  receiver listens on the negative line for a positive start bit and
  when it detects one it starts its clock ticking.  It uses this clock
  tick to time the reading of the next 7, 8 or 9 bits.  (It actually is
  a little more complex than this since several samples of a bit are
  normally taken and this requires additional timing ticks.)  Then the
  stop bit is read, the clock stops and the receiver waits for the next
  start bit.  Thus async is actually synchronized during the reception
  of a single byte but there is no synchronization between one byte and
  the next byte.


  18.  Other Serial Devices (not async EIA-232)

  18.1.  Successors to EIA-232

  A number of EIA standards have been established for higher speeds and
  longer distances using twisted-pair (balanced) technology.  Balanced
  transmission can sometimes be a hundred times faster than unbalanced
  EIA-232.  For a given speed, the distance (maximum cable length) may
  be many times longer with twisted pair.  But PC-s keep being made with
  the "obsolete" EIA-232 since it works OK with modems and mice since
  the cable length is short.  If this appears in the latest version of
  this HOWTO, please let me know if any of the non-EIA-232 listed below
  are supported by Linux.


  18.2.  EIA-422-A (balanced) and EIA-423-A (unbalanced)

  EIA-423 is just like the unbalanced EIA-232 except that the voltage is
  only 5 volts.  Since this falls within EIA-232 specs it can be
  connected to a EIA-232 port.  Its specs call for somewhat higher
  speeds than the EIA-232 (but this may be of little help on a long run
  where it's the unbalance that causes interference).


  Apple's Mac computer prior to mid-1998 with its EIA-232/EIA-422 Port
  provided twisted-pairs (balanced) for transmit and receive (when used
  as a 422).  It is (per specs) exactly 100 times as fast as EIA-423
  (which in turn is somewhat faster than EIA-232)  The Mac used a small
  round "mini-DIN-8" connector.  It also provided conventional EIA-232
  but at only at 5 volts (which is still legal EIA-232).  To make it
  work like at EIA-232 one must use a special cable which (signal)
  grounds RxD+ (one side of a balanced pair) and use RxD- as the receive
  pin.  While TxD- is used as the transmit pin, for some reason TxD+
  should not be grounded.  See Macintosh Communications FAQ
  <http://www.modemshop.com/csm-comm-faq.html>.  However, due to the
  fact that Macs (and upgrades for them) cost more than PC's, they are
  not widely as host computers for Linux.


  18.3.  EIA-485

  This is like EIA-422 (balanced).  It is half-duplex.  It's not just
  point-to-point but may be used for a multidrop LAN (up to 32 nodes).
  There are no connector specs.


  18.4.  EIA-530

  EIA-530-A (balanced but can also be used unbalanced) at 2Mbits/s
  (balanced) was intended to be a replacement for EIA-232 but few have
  been installed.  It uses the same 25-pin connector as EIA-232.


  18.5.  EIA-612/613

  The High Speed Serial Interface ( HSSI = EIA-612/613) uses a 50-pin
  connector and goes up to about 50 Mbits/s but the distance is limited
  to only several meters.  For Linux there are PCI cards supporting
  HSSI.  The companies that sell the cards often provide (or point you
  to) a Linux driver.  A mini-howto or the like is needed for this
  topic.


  18.6.  The Universal Serial Bus (USB)

  The Universal Serial Bus (USB) is being built into PCI chips.  New
  PC's have them.  It is 12 Mbits/s over a twisted pair with a 4-pin
  connector (2 wires are power supply) but it also is limited to short
  distances of at most 5 meters (depends on configuration).

  Another HOWTO is needed for it.  Work is underway for supporting it in
  Linux (but no HOWTO).  It is synchronous and transmits in special
  packets like a network.  Just like a network, it can have several
  devices attached to it.  Each device on it gets a time-slice of
  exclusive use for a short time.  A device can also be guaranteed the
  use of the bus at fixed intervals.  One device can monopolize it if no
  other device wants to use it.  It's not simple to describe in detail.


  18.7.  Synchronization & Synchronous

  Beside the asynchronous EIA-232 (and others) there are a number of
  synchronous serial port standards.  In fact EIA-232 includes
  synchronous specifications but they aren't normally implemented for
  serial ports on PC's.  But first we'll explain what a synchronous
  means.



  18.7.1.  Defining Asynchronous vs Synchronous

  Asynchronous (async) means "not synchronous".  In practice, an async
  signal is what the async serial port sends and receives which is a
  stream of bytes each delimited by a start and stop bit.  Synchronous
  (sync) is most everything else.  But this doesn't explain the basic
  concepts.

  In theory, synchronous means that bytes are sent out at a constant
  rate one after another in step with a clock signal tick.  There is
  often a separate wire or channel for sending the clock signal.
  Asynchronous bytes may be sent out erratically with various time
  intervals between bytes (like someone typing characters at a
  keyboard).

  There are certain situations that need to be classified as either sync
  or async.  The async serial port often sends out bytes in a steady
  stream which would make this a synchronous case but since they still
  have the start/stop bits (which makes it possible to send them out
  erratically) it's called async.  Another case is where data bytes
  (without any start-stop bits) are put into packets with possible
  erratic spacing between one packet and the next.  This is called sync
  since the bytes within each packet must be transmitted synchronously.


  18.7.2.  Synchronous Communication

  Did you ever wonder what all the unused pins are for on a 25-pin
  connector for the serial port?  Most of them are for use in
  synchronous communication which is seldom implemented on PC's.  There
  are pins for sync timing signals as well as for a sync reverse
  channel.  The EIA-232 spec provides for both sync and async but PC's
  use a UART (Universal Asynchronous Receiver/Transmitter) chip such as
  a 16450, 16550A, or 16650 and can't deal with sync.  For sync one
  needs a USART chip or the equivalent where the "S" stands for
  Synchronous.  Since sync is a niche market, a sync serial port is
  likely to be quite expensive.

  Besides the sync part of the EIA-232, there are various other EIA
  synchronous standards.  For EIA-232, 3 pins of the connector are
  reserved for clock (or timing) signals.  Sometimes it's a modem's task
  to generate some timing signals making it impossible to use
  synchronous communications without a synchronous modem (or without a
  device called a "synchronous modem eliminator" which provides the
  timing signals).

  Although few serial ports are sync, synchronous communication does
  often take place over telephone lines using modems which use V.42
  error correction.  This strips off the start/stop bits and puts the
  date bytes in packets resulting in synchronous operation over the
  phone line.


  19.  Other Sources of Information

  19.1.  Books



  1. Axleson, Jan: Serial Port Complete, Lakeview Research, Madison, WI,
     1998.

  2. Black, Uyless D.: Physical Layer Interfaces & Protocols, IEEE
     Computer Society Press, Los Alamitos, CA, 1996.


  3. Campbell, Joe: The RS-232 Solution, 2nd ed., Sybex, 1982.

  4. Levine, Donald:   POSIX Programmer's Guide
     <http://www.ora.com/catalog/posix/>, (ISBN 0-937175-73-0; O'Reilly)

  5. Putnam, Byron W.: RS-232 Simplified, Prentice Hall, 1987.

  6. Seyer, Martin D.: RS-232 Made Easy, 2nd ed., Prentice Hall, 1991.

  7. Stevens, Richard W.: Advanced Programming in the UNIX Environment
     <http://heg-
     school.aw.com/cseng/authors/stevens/advanced/advanced.nclk>, (ISBN
     0-201-56317-7; Addison-Wesley)

  8. Tischert, Michael & Bruno Jennrich: PC Intern, Abacus 1996.
     Chapter 7: Serial Ports

  Notes re books:

  1. "... Complete" has hardware details (including register) but the
     programming aspect is Window oriented.

  2. "Physical Layer ..." covers much more than just EIA-232.


  19.2.  Serial Software

  It's best to use the nearest mirror site, but here's the main sites:
  Serial Software <ftp://metalab.unc.edu/pub/Linux/system/serial/> for
  Linux software for the serial ports including getty and port monitors.
  Serial Communications
  <ftp://metalab.unc.edu/pub/Linux/apps/serialcomm> for communication
  programs.


    irqtune will give serial port interrupts higher priority to improve
     performance.  Using hdparm for hard-disk tuning may help some more.

    modemstat and statserial show the current state of various modem
     control lines.  See ``Serial Monitoring/Diagnostics''


  19.3.  Linux Documents


    man pages for: setserial(8) stty

    libc (or glibc) docs package: "Low Level Terminal Interface"

    Modem-HOWTO: modems on the serial port

    PPP-HOWTO: help with PPP (using a modem on the serial port)

    Printing-HOWTO: for setting up a serial printer

    Serial-Programming-HOWTO: for some aspects of serial-port
     programming

    Text-Terminal-HOWTO: how they work and how to install and configure

    UPS-HOWTO: setting up UPS sensors connected to your serial port

    UUCP-HOWTO: for information on setting up UUCP



  19.4.  Usenet newsgroups:


    comp.os.linux.answers

    comp.os.linux.hardware:  Hardware compatibility with the Linux
     operating system.

    comp.os.linux.networking:  Networking and communications under
     Linux.

    comp.os.linux.setup:  Linux installation and system administration.


  19.5.  Serial Mailing List

  The Linux serial mailing list.  To join, send email to
  majordomo@vger.rutgers.edu, with ``subscribe linux-serial'' in the
  message body.  If you send ``help'' in the message body, you get a
  help message.  The server also serves many other Linux lists.  Send
  the ``lists'' command for a list of mailing lists.


  19.6.  Internet



    Serial  Suite <ftp://scicom.alphacdc.com/pub/linux> by Vern Hoxie
     is a collection of blurbs about the care and feeding of the Linux
     serial port plus some simple programs.  When logging into 'scicom'
     as "anonymous", you must use your full e-mail address as the
     password.  For example: greg.hankins@cc.gatech.edu

    A white paper discussing serial communications and multiport serial
     boards was available from Cyclades at http://www.cyclades.com.

     END OF Serial-HOWTO



  The Linux Serial Programming HOWTO
  by Peter H. Baumann, Peter.Baumann@dlr.de
  v1.0, 22 January 1998

  This document describes how to program communications with devices
  over a serial port on a Linux box.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright
     1.2 New Versions Of This Document
     1.3 Feedback

  2. Getting started

     2.1 Debugging
     2.2 Port Settings
     2.3 Input Concepts for Serial Devices
        2.3.1 Canonical Input Processing
        2.3.2 Non-Canonical Input Processing
        2.3.3 Asynchronous Input
        2.3.4 Waiting for Input from Multiple Sources

  3. Program Examples

     3.1 Canonical Input Processing
     3.2 Non-Canonical Input Processing
     3.3 Asynchronous Input
     3.4 Waiting for Input from Multiple Sources

  4. Other Sources of Information

  5. Contributions



  ______________________________________________________________________

  1.  Introduction

  This is the Linux Serial Programming HOWTO.  All about how to program
  communications with other devices / computers over a serial line under
  Linux. Different techniques are explained: Canonical I/O (only
  complete lines are transmitted/received), asyncronous I/O, and waiting
  for input from multiple sources.

  This document does not describe how to set up serial ports, because
  this has been described by Greg Hankins in the Serial-HOWTO.

  I have to emphasize that I am not an expert in this field, but have
  had problems with a project that involved such communication. The code
  examples presented here were derived from the miniterm code available
  from the LDP programmers guide
  (ftp://sunsite.unc.edu/pub/Linux/docs/LDP/programmers-
  guide/lpg-0.4.tar.gz and mirrors) in the examples directory.

  Since I wrote this document in June 1997, I have moved to WinNT to
  satisfy customers need, so I have not built up more in depth
  knowledge. If anybody has any comments, I will gladly incorporate them
  into this document (see sect. Feedback). If someone would like to take
  over and do a better job, please e-mail me.

  All examples were tested using a i386 Linux Kernel 2.0.29.


  1.1.  Copyright

  The Linux Serial-Programming-HOWTO is copyright (C) 1997 by Peter
  Baumann.  Linux HOWTO documents may be reproduced and distributed in
  whole or in part, in any medium physical or electronic, as long as
  this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu via email.


  1.2.  New Versions Of This Document

  New versions of the Serial-Programming-HOWTO will be available at
  and mirror sites.  There are other formats, such as PostScript and DVI
  versions in the other-formats directory.  The Serial-Programming-HOWTO
  is also available at http://sunsite.unc.edu/LDP/HOWTO/Serial-
  Programming-HOWTO.html and will be posted to comp.os.linux.answers
  monthly.


  1.3.  Feedback

  Please send me any corrections, questions, comments, suggestions, or
  additional material. I would like to improve this HOWTO!  Tell me
  exactly what you don't understand, or what could be clearer.  You can
  reach me at Peter.Baumann@dlr.de via email. Please include the version
  number of the Serial-Programming-HOWTO when writing, this is version
  0.3.



  2.  Getting started


  2.1.  Debugging

  The best way to debug your code is to set up another Linux box, and
  connect the two computers via a null-modem cable. Use miniterm
  (available from the LDP programmers guide
  (ftp://sunsite.unc.edu/pub/Linux/docs/LDP/programmers-
  guide/lpg-0.4.tar.gz in the examples directory) to transmit characters
  to your Linux box. Miniterm can be compiled very easily and will
  transmit all keyboard input raw over the serial port. Only the define
  statement #define MODEMDEVICE "/dev/ttyS0" has to be checked. Set it
  to ttyS0 for COM1, ttyS1 for COM2, etc.. It is essential for testing,
  that all characters are transmitted raw (without output processing)
  over the line. To test your connection, start miniterm on both
  computers and just type away. The characters input on one computer
  should appear on the other computer and vice versa. The input will not
  be echoed to the attached screen.

  To make a null-modem cable you have to cross the TxD (transmit) and
  RxD (receive) lines. For a description of a cable see sect. 7 of the
  Serial-HOWTO.

  It is also possible to perform this testing with only one computer, if
  you have two unused serial ports. You can then run two miniterms off
  two virtual consoles. If you free a serial port by disconnecting the
  mouse, remember to redirect /dev/mouse if it exists. If you use a
  multiport serial card, be sure to configure it correctly. I had mine
  configured wrong and everything worked fine as long as I was testing
  only on my computer. When I connected to another computer, the port
  started loosing characters. Executing two programs on one computer
  just isn't fully asynchronous.


  2.2.  Port Settings

  The devices /dev/ttyS* are intended to hook up terminals to your Linux
  box, and are configured for this use after startup. This has to be
  kept in mind when programming communication with a raw device. E.g.
  the ports are configured to echo characters sent from the device back
  to it, which normally has to be changed for data transmission.

  All parameters can be easily configured from within a program. The
  configuration is stored in a structure struct termios, which is
  defined in <asm/termbits.h>:


       #define NCCS 19
       struct termios {
               tcflag_t c_iflag;               /* input mode flags */
               tcflag_t c_oflag;               /* output mode flags */
               tcflag_t c_cflag;               /* control mode flags */
               tcflag_t c_lflag;               /* local mode flags */
               cc_t c_line;                    /* line discipline */
               cc_t c_cc[NCCS];                /* control characters */
       };



  This file also includes all flag definitions. The input mode flags in
  c_iflag handle all input processing, which means that the characters
  sent from the device can be processed before they are read with read.
  Similarly c_oflag handles the output processing. c_cflag contains the
  settings for the port, as the baudrate, bits per character, stop bits,
  etc.. The local mode flags stored in c_lflag determine if characters
  are echoed, signals are sent to your program, etc.. Finally the array
  c_cc defines the control characters for end of file, stop, etc..
  Default values for the control characters are defined in
  <asm/termios.h>. The flags are described in the manual page
  termios(3). The structure termios contains the c_line (line
  discipline) element, which is not used in POSIX compliant systems.



  2.3.  Input Concepts for Serial Devices

  Here three different input concepts will be presented. The appropriate
  concept has to be chosen for the intended application. Whenever
  possible, do not loop reading single characters to get a complete
  string. When I did this, I lost characters, whereas a read for the
  whole string did not show any errors.
  2.3.1.  Canonical Input Processing

  This is the normal processing mode for terminals, but can also be
  useful for communicating with other dl input is processed in units of
  lines, which means that a read will only return a full line of input.
  A line is by default terminated by a NL (ASCII LF), an end of file, or
  an end of line character. A CR (the DOS/Windows default end-of-line)
  will not terminate a line with the default settings.

  Canonical input processing can also handle the erase, delete word, and
  reprint characters, translate CR to NL, etc..


  2.3.2.  Non-Canonical Input Processing

  Non-Canonical Input Processing will handle a fixed amount of
  characters per read, and allows for a character timer. This mode
  should be used if your application will always read a fixed number of
  characters, or if the connected device sends bursts of characters.



  2.3.3.  Asynchronous Input

  The two modes described above can be used in synchronous and
  asynchronous mode. Synchronous is the default, where a read statement
  will block, until the read is satisfied. In asynchronous mode the read
  statement will return immediatly and send a signal to the calling
  program upon completion. This signal can be received by a signal
  handler.


  2.3.4.  Waiting for Input from Multiple Sources

  This is not a different input mode, but might be useful, if you are
  handling multiple devices. In my application I was handling input over
  a TCP/IP socket and input over a serial connection from another
  computer quasi-simultaneously. The program example given below will
  wait for input from two different input sources. If input from one
  source becomes available, it will be processed, and the program will
  then wait for new input.

  The approach presented below seems rather complex, but it is important
  to keep in mind that Linux is a multi-processing operating system. The
  select system call will not load the CPU while waiting for input,
  whereas looping until input becomes available would slow down other
  processes executing at the same time.



  3.  Program Examples

  All examples have been derived from miniterm.c. The type ahead buffer
  is limited to 255 characters, just like the maximum string length for
  canonical input processing (<linux/limits.h> or <posix1_lim.h>).

  See the comments in the code for explanation of the use of the
  different input modes. I hope that the code is understandable. The
  example for canonical input is commented best, the other examples are
  commented only where they differ from the example for canonical input
  to emphasize the differences.

  The descriptions are not complete, but you are encouraged to
  experiment with the examples to derive the best solution for your
  application.

  Don't forget to give the appropriate serial ports the right
  permissions (e. g.: chmod a+rw /dev/ttyS1)!



  3.1.  Canonical Input Processing



  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <termios.h>
  #include <stdio.h>

  /* baudrate settings are defined in <asm/termbits.h>, which is
  included by <termios.h> */
  #define BAUDRATE B38400
  /* change this definition for the correct port */
  #define MODEMDEVICE "/dev/ttyS1"
  #define _POSIX_SOURCE 1 /* POSIX compliant source */

  #define FALSE 0
  #define TRUE 1

  volatile int STOP=FALSE;

  main()
  {
    int fd,c, res;
    struct termios oldtio,newtio;
    char buf[255];
  /*
    Open modem device for reading and writing and not as controlling tty
    because we don't want to get killed if linenoise sends CTRL-C.
  */
   fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY );
   if (fd <0) {perror(MODEMDEVICE); exit(-1); }

   tcgetattr(fd,&oldtio); /* save current serial port settings */
   bzero(&newtio, sizeof(newtio)); /* clear struct for new port settings */

  /*
    BAUDRATE: Set bps rate. You could also use cfsetispeed and cfsetospeed.
    CRTSCTS : output hardware flow control (only used if the cable has
              all necessary lines. See sect. 7 of Serial-HOWTO)
    CS8     : 8n1 (8bit,no parity,1 stopbit)
    CLOCAL  : local connection, no modem contol
    CREAD   : enable receiving characters
  */
   newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;

  /*
    IGNPAR  : ignore bytes with parity errors
    ICRNL   : map CR to NL (otherwise a CR input on the other computer
              will not terminate input)
    otherwise make device raw (no other input processing)
  */
   newtio.c_iflag = IGNPAR | ICRNL;

  /*
   Raw output.
  */
   newtio.c_oflag = 0;

  /*
    ICANON  : enable canonical input
    disable all echo functionality, and don't send signals to calling program
  */
   newtio.c_lflag = ICANON;

  /*
    initialize all control characters
    default values can be found in /usr/include/termios.h, and are given
    in the comments, but we don't need them here
  */
   newtio.c_cc[VINTR]    = 0;     /* Ctrl-c */
   newtio.c_cc[VQUIT]    = 0;     /* Ctrl-\ */
   newtio.c_cc[VERASE]   = 0;     /* del */
   newtio.c_cc[VKILL]    = 0;     /* @ */
   newtio.c_cc[VEOF]     = 4;     /* Ctrl-d */
   newtio.c_cc[VTIME]    = 0;     /* inter-character timer unused */
   newtio.c_cc[VMIN]     = 1;     /* blocking read until 1 character arrives */
   newtio.c_cc[VSWTC]    = 0;     /* '\0' */
   newtio.c_cc[VSTART]   = 0;     /* Ctrl-q */
   newtio.c_cc[VSTOP]    = 0;     /* Ctrl-s */
   newtio.c_cc[VSUSP]    = 0;     /* Ctrl-z */
   newtio.c_cc[VEOL]     = 0;     /* '\0' */
   newtio.c_cc[VREPRINT] = 0;     /* Ctrl-r */
   newtio.c_cc[VDISCARD] = 0;     /* Ctrl-u */
   newtio.c_cc[VWERASE]  = 0;     /* Ctrl-w */
   newtio.c_cc[VLNEXT]   = 0;     /* Ctrl-v */
   newtio.c_cc[VEOL2]    = 0;     /* '\0' */

  /*
    now clean the modem line and activate the settings for the port
  */
   tcflush(fd, TCIFLUSH);
   tcsetattr(fd,TCSANOW,&newtio);

  /*
    terminal settings done, now handle input
    In this example, inputting a 'z' at the beginning of a line will
    exit the program.
  */
   while (STOP==FALSE) {     /* loop until we have a terminating condition */
   /* read blocks program execution until a line terminating character is
      input, even if more than 255 chars are input. If the number
      of characters read is smaller than the number of chars available,
      subsequent reads will return the remaining chars. res will be set
      to the actual number of characters actually read */
      res = read(fd,buf,255);
      buf[res]=0;             /* set end of string, so we can printf */
      printf(":%s:%d\n", buf, res);
      if (buf[0]=='z') STOP=TRUE;
   }
   /* restore the old port settings */
   tcsetattr(fd,TCSANOW,&oldtio);
  }



  3.2.  Non-Canonical Input Processing

  In non-canonical input processing mode, input is not assembled into
  lines and input processing (erase, kill, delete, etc.) does not occur.
  Two parameters control the behavior of this mode: c_cc[VTIME] sets the
  character timer, and c_cc[VMIN] sets the minimum number of characters
  to receive before satisfying the read.

  If MIN > 0 and TIME = 0, MIN sets the number of characters to receive
  before the read is satisfied. As TIME is zero, the timer is not used.

  If MIN = 0 and TIME > 0, TIME serves as a timeout value. The read will
  be satisfied if a single character is read, or TIME is exceeded (t =
  TIME *0.1 s). If TIME is exceeded, no character will be returned.


  If MIN > 0 and TIME > 0, TIME serves as an inter-character timer. The
  read will be satisfied if MIN characters are received, or the time
  between two characters exceeds TIME. The timer is restarted every time
  a character is received and only becomes active after the first
  character has been received.

  If MIN = 0 and TIME = 0, read will be satisfied immediately. The
  number of characters currently available, or the number of characters
  requested will be returned. According to Antonino (see contributions),
  you could issue a fcntl(fd, F_SETFL, FNDELAY); before reading to get
  the same result.

  By modifying newtio.c_cc[VTIME] and newtio.c_cc[VMIN] all modes
  described above can be tested.



       #include <sys/types.h>
       #include <sys/stat.h>
       #include <fcntl.h>
       #include <termios.h>
       #include <stdio.h>

       #define BAUDRATE B38400
       #define MODEMDEVICE "/dev/ttyS1"
       #define _POSIX_SOURCE 1 /* POSIX compliant source */
       #define FALSE 0
       #define TRUE 1

       volatile int STOP=FALSE;

       main()
       {
         int fd,c, res;
         struct termios oldtio,newtio;
         char buf[255];

        fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY );
        if (fd <0) {perror(MODEMDEVICE); exit(-1); }

        tcgetattr(fd,&oldtio); /* save current port settings */

        bzero(&newtio, sizeof(newtio));
        newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
        newtio.c_iflag = IGNPAR;
        newtio.c_oflag = 0;

        /* set input mode (non-canonical, no echo,...) */
        newtio.c_lflag = 0;

        newtio.c_cc[VTIME]    = 0;   /* inter-character timer unused */
        newtio.c_cc[VMIN]     = 5;   /* blocking read until 5 chars received */

        tcflush(fd, TCIFLUSH);
        tcsetattr(fd,TCSANOW,&newtio);


        while (STOP==FALSE) {       /* loop for input */
          res = read(fd,buf,255);   /* returns after 5 chars have been input */
          buf[res]=0;               /* so we can printf... */
          printf(":%s:%d\n", buf, res);
          if (buf[0]=='z') STOP=TRUE;
        }
        tcsetattr(fd,TCSANOW,&oldtio);
       }

  3.3.  Asynchronous Input



  #include <termios.h>
  #include <stdio.h>
  #include <unistd.h>
  #include <fcntl.h>
  #include <sys/signal.h>
  #include <sys/types.h>

  #define BAUDRATE B38400
  #define MODEMDEVICE "/dev/ttyS1"
  #define _POSIX_SOURCE 1 /* POSIX compliant source */
  #define FALSE 0
  #define TRUE 1

  volatile int STOP=FALSE;

  void signal_handler_IO (int status);   /* definition of signal handler */
  int wait_flag=TRUE;                    /* TRUE while no signal received */

  main()
  {
    int fd,c, res;
    struct termios oldtio,newtio;
    struct sigaction saio;           /* definition of signal action */
    char buf[255];

    /* open the device to be non-blocking (read will return immediatly) */
    fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK);
    if (fd <0) {perror(MODEMDEVICE); exit(-1); }

    /* install the signal handler before making the device asynchronous */
    saio.sa_handler = signal_handler_IO;
    saio.sa_mask = 0;
    saio.sa_flags = 0;
    saio.sa_restorer = NULL;
    sigaction(SIGIO,&saio,NULL);

    /* allow the process to receive SIGIO */
    fcntl(fd, F_SETOWN, getpid());
    /* Make the file descriptor asynchronous (the manual page says only
       O_APPEND and O_NONBLOCK, will work with F_SETFL...) */
    fcntl(fd, F_SETFL, FASYNC);

    tcgetattr(fd,&oldtio); /* save current port settings */
    /* set new port settings for canonical input processing */
    newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
    newtio.c_iflag = IGNPAR | ICRNL;
    newtio.c_oflag = 0;
    newtio.c_lflag = ICANON;
    newtio.c_cc[VMIN]=1;
    newtio.c_cc[VTIME]=0;
    tcflush(fd, TCIFLUSH);
    tcsetattr(fd,TCSANOW,&newtio);

    /* loop while waiting for input. normally we would do something
       useful here */
    while (STOP==FALSE) {
      printf(".\n");usleep(100000);
      /* after receiving SIGIO, wait_flag = FALSE, input is available
         and can be read */
      if (wait_flag==FALSE) {
        res = read(fd,buf,255);
        buf[res]=0;
        printf(":%s:%d\n", buf, res);
        if (res==1) STOP=TRUE; /* stop loop if only a CR was input */
        wait_flag = TRUE;      /* wait for new input */
      }
    }
    /* restore old port settings */
    tcsetattr(fd,TCSANOW,&oldtio);
  }

  /***************************************************************************
  * signal handler. sets wait_flag to FALSE, to indicate above loop that     *
  * characters have been received.                                           *
  ***************************************************************************/

  void signal_handler_IO (int status)
  {
    printf("received SIGIO signal.\n");
    wait_flag = FALSE;
  }



  3.4.  Waiting for Input from Multiple Sources

  This section is kept to a minimum. It is just intended to be a hint,
  and therefore the example code is kept short. This will not only work
  with serial ports, but with any set of file descriptors.

  The select call and accompanying macros use a fd_set. This is a bit
  array, which has a bit entry for every valid file descriptor number.
  select will accept a fd_set with the bits set for the relevant file
  descriptors and returns a fd_set, in which the bits for the file
  descriptors are set where input, output, or an exception occurred. All
  handling of fd_set is done with the provided macros. See also the
  manual page select(2).



  #include <sys/time.h>
  #include <sys/types.h>
  #include <unistd.h>

  main()
  {
     int    fd1, fd2;  /* input sources 1 and 2 */
     fd_set readfs;    /* file descriptor set */
     int    maxfd;     /* maximum file desciptor used */
     int    loop=1;    /* loop while TRUE */

     /* open_input_source opens a device, sets the port correctly, and
        returns a file descriptor */
     fd1 = open_input_source("/dev/ttyS1");   /* COM2 */
     if (fd1<0) exit(0);
     fd2 = open_input_source("/dev/ttyS2");   /* COM3 */
     if (fd2<0) exit(0);
     maxfd = MAX (fd1, fd2)+1;  /* maximum bit entry (fd) to test */

     /* loop for input */
     while (loop) {
       FD_SET(fd1, &readfs);  /* set testing for source 1 */
       FD_SET(fd2, &readfs);  /* set testing for source 2 */
       /* block until input becomes available */
       select(maxfd, &readfs, NULL, NULL, NULL);
       if (FD_ISSET(fd1))         /* input from source 1 available */
         handle_input_from_source1();
       if (FD_ISSET(fd2))         /* input from source 2 available */
         handle_input_from_source2();
     }

  }



  The given example blocks indefinitely, until input from one of the
  sources becomes available. If you need to timeout on input, just
  replace the select call by:


       int res;
       struct timeval Timeout;

       /* set timeout value within input loop */
       Timeout.tv_usec = 0;  /* milliseconds */
       Timeout.tv_sec  = 1;  /* seconds */
       res = select(maxfd, &readfs, NULL, NULL, &Timeout);
       if (res==0)
       /* number of file descriptors with input = 0, timeout occurred. */



  This example will timeout after 1 second. If a timeout occurs, select
  will return 0, but beware that Timeout is decremented by the time
  actually waited for input by select. If the timeout value is zero,
  select will return immediatly.



  4.  Other Sources of Information



  o  The Linux Serial-HOWTO describes how to set up serial ports and
     contains hardware information.

  o  Serial Programming Guide for POSIX Compliant Operating Systems
     <http://www.easysw.com/~mike/serial>, by Michael Sweet. This link
     is obsolete and I could not find a new location for it. Does
     somebody know where we can find it again? It was a well prepared
     document!

  o  The manual page termios(3) describes all flags for the termios
     structure.


  5.  Contributions


  As mentioned in the introduction, I am no expert in this field, but
  had problems myself, and found a solution with the help of others.
  Thanks for the help from Mr. Strudthoff from the European Transonic
  Windtunnel, Cologne, Michael Carter (mcarter@rocke.electro.swri.edu,
  and Peter Waltenberg (p.waltenberg@karaka.chch.cri.nz)


  Antonino Ianella (antonino@usa.net wrote the Serial-Port-Programming
  Mini HOWTO, at the same time I prepared this document. Greg Hankins
  asked me to incorporate Antonino's Mini-HOWTO into this document.


  The structure of this document and SGML formatting was derived from
  the Serial-HOWTO by Greg Hankins. Thanks also for various corrections
  made by : Dave Pfaltzgraff (Dave_Pfaltzgraff@patapsco.com), Sean
  Lincolne (slincol@tpgi.com.au), Michael Wiedmann (mw@miwie.in-
  berlin.de), and Adrey Bonar (andy@tipas.lt).



  Linux Shadow Password HOWTO
  Michael H. Jackson, mhjack@tscnet.com
  v1.3, 3 April 1996

  This document aims to describe how to obtain, install, and configure
  the Linux password Shadow Suite. It also discusses obtaining, and
  re]installing other software and network daemons that require access
  to user passwords.  This other software is not actually part of the
  Shadow Suite, but these programs will need to be recompiled to support
  the Shadow Suite.  This document also contains a programming example
  for adding shadow support to a program.  Answers to some of the more
  frequently asked questions are included near the end of this document.
  ______________________________________________________________________

  Table of Contents



  1. Introduction.

     1.1 Changes from the previous release.
     1.2 New versions of this document.
     1.3 Feedback.

  2. Why shadow your passwd file?

     2.1 Why you might NOT want to shadow your passwd file.
     2.2 Format of the /etc/passwd file
     2.3 Format of the shadow file
     2.4 Review of crypt(3).

  3. Getting the Shadow Suite.

     3.1 History of the Shadow Suite for Linux
     3.2 Where to get the Shadow Suite.
     3.3 What is included with the Shadow Suite.

  4. Compiling the programs.

     4.1 Unpacking the archive.
     4.2 Configuring with the config.h file
     4.3 Making backup copies of your original programs.
     4.4 Running make

  5. Installing

     5.1 Have a boot disk handy in case you break anything.
     5.2 Removing duplicate man pages
     5.3 Running make install
     5.4 Running pwconv
     5.5 Renaming npasswd and nshadow

  6. Other programs you may need to upgrade or patch

     6.1 Slackware adduser program
     6.2 The wu_ftpd Server
     6.3 Standard ftpd
     6.4 pop3d (Post Office Protocol 3)
     6.5 xlock
     6.6 xdm
     6.7 sudo
     6.8 imapd (E-Mail
     6.9 pppd (Point-to-Point Protocol Server)

  7. Putting the Shadow Suite to use.

     7.1 Adding, Modifying, and deleting users
        7.1.1 useradd
        7.1.2 usermod
        7.1.3 userdel
     7.2 The passwd command and passwd aging.
     7.3 The login.defs file.
     7.4 Group passwords.
     7.5 Consistency checking programs
        7.5.1 pwck
        7.5.2 grpck
     7.6 Dial-up passwords.

  8. Adding shadow support to a C program

     8.1 Header files
     8.2 libshadow.a library
     8.3 Shadow Structure
     8.4 Shadow Functions
     8.5 Example

  9. Frequently Asked Questions.

  10. Copyright Message.

  11. Miscellaneous and Acknowledgments.



  ______________________________________________________________________

  1.  Introduction.

  This is the Linux Shadow-Password-HOWTO.  This document describes why
  and how to add shadow password support on a Linux system.  Some
  examples of how to use some of the Shadow Suite's features is also
  included.

  When installing the Shadow Suite and when using many of the utility
  programs, you must be logged in as root.  When installing the Shadow
  Suite you will be making changes to system software, and it is highly
  recommended that you make backup copies of programs as indicated.  I
  also recommend that you read and understand all the instructions
  before you begin.


  1.1.  Changes from the previous release.


  Additions:
          Added a sub-section on why you might not want to install shadow
          Added a sub-section on updating the xdm program
          Added a section on how to put Shadow Suite features to work
          Added a section containing frequently asked questions

  Corrections/Updates:
          Corrected html references on Sunsite
          Corrected section on wu-ftp to reflect adding -lshadow to the Makefile
          Corrected minor spelling and verbiage errors
          Changed section on wu-ftpd to support ELF
          Updated to reflect security problems in various login programs
          Updated to recommend the Linux Shadow Suite by Marek Michalkiewicz



  1.2.  New versions of this document.

  The latest released version of this document can always be retrieved
  by anonymous FTP from:

  sunsite.unc.edu

  /pub/Linux/docs/HOWTO/Shadow-Password-HOWTO


  or:

  /pub/Linux/docs/HOWTO/other-formats/Shadow-Password-HOWTO{-html.tar,ps,dvi}.gz



  or via the World Wide Web from the Linux Documentation Project Web
  Server <http://sunsite.unc.edu/mdw/linux.html>, at page: Shadow-
  Password-HOWTO <http://sunsite.unc.edu/linux/HOWTO/Shadow-Password-
  HOWTO.html> or directly from me, <mhjack@tscnet.com>. It will also be
  posted to the newsgroup: comp.os.linux.answers

  This document is now packaged with the Shadow-YYDDMM packages.



  1.3.  Feedback.

  Please send any comments, updates, or suggestions to me: Michael H.
  Jackson <mhjack@tscnet.com>  The sooner I get feedback, the sooner I
  can update and correct this document.  If you find any problems with
  it, please mail me directly as I very rarely stay up-to-date on the
  newsgroups.


  2.  Why shadow your passwd file?

  By default, most current Linux distributions do not contain the Shadow
  Suite installed.  This includes Slackware 2.3, Slackware 3.0, and
  other popular distributions.  One of the reasons for this is that the
  copyright notices in the original Shadow Suite were not clear on
  redistribution if a fee was charged.  Linux uses a GNU Copyright
  (sometimes refereed to as a Copyleft) that allows people to package it
  into a convenient package (like a CD-ROM distribution) and charge a
  fee for it.

  The current maintainer of the Shadow Suite, Marek Michalkiewicz
  <marekm@i17linuxb.ists.pwr.wroc.pl> received the source code from the
  original author under a BSD style copyright that allowed
  redistribution.   Now that the copyright issues are resolved, it is
  expected that future distributions will contain password shadowing by
  default.  Until then, you will need to install it yourself.

  If you installed your distribution from a CD-ROM, you may find that,
  even though the distribution did not have the Shadow Suite installed,
  some of the files you need to install the Shadow Suite may be on the
  CD-ROM.

  However, Shadow Suite versions 3.3.1, 3.3.1-2, and shadow-mk all have
  security problems with their login program and several other suid root
  programs that came with them, and should no longer be used.

  All of the necessary files may be obtained via anonymous FTP or
  through the World Wide Web.

  On a Linux system without the Shadow Suite installed, user information
  including passwords is stored in the /etc/passwd file.  The password
  is stored in an encrypted format.  If you ask a cryptography expert,
  however, he or she will tell you that the password is actually in an
  encoded rather than encrypted format because when using crypt(3), the
  text is set to null and the password is the key.  Therefore, from here
  on, I will use the term encoded in this document.

  The algorithm used to encode the password field is technically
  referred to as a one way hash function.  This is an algorithm that is
  easy to compute in one direction, but very difficult to calculate in
  the reverse direction.  More about the actual algorithm used can be
  found in section 2.4 or your crypt(3) manual page.

  When a user picks or is assigned a password, it is encoded with a
  randomly generated value called the salt.  This means that any
  particular password could be stored in 4096 different ways.  The salt
  value is then stored with the encoded password.


  When a user logs in and supplies a password, the salt is first
  retrieved from the stored encoded password.  Then the supplied
  password is encoded with the salt value, and then compared with the
  encoded password.  If there is a match, then the user is
  authenticated.

  It is computationally difficult (but not impossible) to take a
  randomly encoded password and recover the original password.  However,
  on any system with more than just a few users, at least some of the
  passwords will be common words (or simple variations of common words).

  System crackers know all this, and will simply encrypt a dictionary of
  words and common passwords using all possible 4096 salt values.  Then
  they will compare the encoded passwords in your /etc/passwd file with
  their database.  Once they have found a match, they have the password
  for another account.  This is referred to as a dictionary attack, and
  is one of the most common methods for gaining or expanding
  unauthorized access to a system.

  If you think about it, an 8 character password encodes to 4096 * 13
  character strings.  So a dictionary of say 400,000 common words,
  names, passwords, and simple variations would easily fit on a 4GB hard
  drive.  The attacker need only sort them, and then check for matches.
  Since a 4GB hard drive can be had for under $1000.00, this is well
  within the means of most system crackers.

  Also, if a cracker obtains your /etc/passwd file first, they only need
  to encode the dictionary with the salt values actually contained in
  your /etc/passwd file.  This method is usable by your average teenager
  with a couple of hundred spare Megabytes and a 486 class computer.

  Even without lots of drive space, utilities like crack(1) can usually
  break at least a couple of passwords on a system with enough users
  (assuming the users of the system are allowed to pick their own
  passwords).

  The /etc/passwd file also contains information like user ID's and
  group ID's that are used by many system programs.  Therefore, the
  /etc/passwd file must remain world readable.  If you were to change
  the /etc/passwd file so that nobody can read it, the first thing that
  you would notice is that the ls -l command now displays user ID's
  instead of names!

  The Shadow Suite solves the problem by relocating the passwords to
  another file (usually /etc/shadow).  The /etc/shadow file is set so
  that it cannot be read by just anyone.  Only root will be able to read
  and write to the /etc/shadow file.  Some programs (like xlock) don't
  need to be able to change passwords, they only need to be able to
  verify them.  These programs can either be run suid root or you can
  set up a group shadow that is allowed read only access to the
  /etc/shadow file.  Then the program can be run sgid shadow.

  By moving the passwords to the /etc/shadow file, we are effectively
  keeping the attacker from having access to the encoded passwords with
  which to perform a dictionary attack.

  Additionally, the Shadow Suite adds lots of other nice features:

  o  A configuration file to set login defaults (/etc/login.defs)

  o  Utilities for adding, modifying, and deleting user accounts and
     groups

  o  Password aging and expiration


  o  Account expiration and locking

  o  Shadowed group passwords (optional)

  o  Double length passwords (16 character passwords) NOT RECOMMENDED]

  o  Better control over user's password selection

  o  Dial-up passwords

  o  Secondary authentication programs [NOT RECOMMENDED]

  Installing the Shadow Suite contributes toward a more secure system,
  but there are many other things that can also be done to improve the
  security of a Linux system, and there will eventually be a series of
  Linux Security HOWTO's that will discuss other security measures and
  related issues.

  For current information on other Linux security issues, including
  warnings on known vulnerabilities see the Linux Security home page.
  <http://bach.cis.temple.edu/linux/linux-security/>



  2.1.  Why you might NOT want to shadow your passwd file.

  There are a few circumstances and configurations in which installing
  the Shadow Suite would NOT be a good idea:

  o  The machine does not contain user accounts.

  o  Your machine is running on a LAN and is using NIS (Network
     Information Services) to get or supply user names and passwords to
     other machines on the network.  (This can actually be done, but is
     beyond the scope of this document, and really won't increase
     security much anyway)

  o  Your machine is being used by terminal servers to verify users via
     NFS (Network File System), NIS, or some other method.

  o  Your machine runs other software that validates users, and there is
     no shadow version available, and you don't have the source code.



  2.2.  Format of the /etc/passwd file

  A non-shadowed /etc/passwd file has the following format:


       username:passwd:UID:GID:full_name:directory:shell



  Where:

     username
        The user (login) name

     passwd
        The encoded password

     UID
        Numerical user ID

     GID
        Numerical default group ID

     full_name
        The user's full name - Actually this field is called the GECOS
        (General Electric Comprehensive Operating System) field and can
        store information other than just the full name.  The Shadow
        commands and manual pages refer to this field as the comment
        field.

     directory
        User's home directory (Full pathname)

     shell
        User's login shell (Full Pathname)

  For example:


       username:Npge08pfz4wuk:503:100:Full Name:/home/username:/bin/sh



  Where Np is the salt and ge08pfz4wuk is the encoded password.  The
  encoded salt/password could just as easily have been kbeMVnZM0oL7I and
  the two are exactly the same password.  There are 4096 possible encod-
  ings for the same password.  (The example password in this case is
  'password', a really bad password).

  Once the shadow suite is installed, the /etc/passwd file would instead
  contain:


       username:x:503:100:Full Name:/home/username:/bin/sh



  The x in the second field in this case is now just a place holder.
  The format of the /etc/passwd file really didn't change, it just no
  longer contains the encoded password.  This means that any program
  that reads the /etc/passwd file but does not actually need to verify
  passwords will still operate correctly.

  The passwords are now relocated to the shadow file (usually
  /etc/shadow file).


  2.3.  Format of the shadow file

  The /etc/shadow file contains the following information:


       username:passwd:last:may:must:warn:expire:disable:reserved



  Where:

     username
        The User Name

     passwd
        The Encoded password
     last
        Days since Jan 1, 1970 that password was last changed

     may
        Days before password may be changed

     must
        Days after which password must be changed

     warn
        Days before password is to expire that user is warned

     expire
        Days after password expires that account is disabled

     disable
        Days since Jan 1, 1970 that account is disabled

     reserved
        A reserved field

  The previous example might then be:


       username:Npge08pfz4wuk:9479:0:10000::::



  2.4.  Review of crypt(3).

  From the crypt(3) manual page:

  "crypt is the password encryption function.  It is based on the Data
  Encryption Standard algorithm with variations intended (among other
  things) to discourage use of hardware implementations of a key search.

  [The] key is a user's typed password.  [The encoded string is all
  NULLs]

  [The] salt is a two-character string chosen from the set [a-zA-
  Z0-9./].  This string is used to perturb the algorithm in one of 4096
  different ways.

  By taking the lowest 7 bit[s] of each character of the key, a 56-bit
  key is obtained.  This 56-bit key is used to encrypt repeatedly a
  constant string (usually a string consisting of all zeros).  The
  returned value points to the encrypted password, a series of 13
  printable ASCII characters (the first two characters represent the
  salt itself).  The return value points to static data whose content is
  overwritten by each call.


  Warning: The key space consists of 2**56 equal 7.2e16 possible values.
  Exhaustive searches of this key space are possible using massively
  parallel computers.  Software, such as crack(1), is available which
  will search the portion of this key space that is generally used by
  humans for passwords.  Hence, password selection should, at minimum,
  avoid common words and names.  The use of a passwd(1) program that
  checks for crackable passwords during the selection process is
  recommended.

  The DES algorithm itself has a few quirks which make the use of the
  crypt(3) interface a very poor choice for anything other than password
  authentication.  If you are planning on using the crypt(3) interface
  for a cryptography project, don't do it: get a good book on encryption
  and one of the widely available DES libraries."

  Most Shadow Suites contain code for doubling the length of the
  password to 16 characters.  Experts in des recommend against this, as
  the encoding is simply applied first to the left half and then to the
  right half of the longer password.  Because of the way crypt works,
  this may make for a less secure encoded password then if double length
  passwords were not used in the first place.  Additionally, it is less
  likely that a user will be able to remember a 16 character password.

  There is development work under way that would allow the
  authentication algorithm to be replaced with something more secure and
  with support for longer passwords (specifically the MD5 algorithm) and
  retain compatibility with the crypt method.

  If you are looking for a good book on encryption, I recommend:

          "Applied Cryptography: Protocols, Algorithms, and Source Code in C"
          by Bruce Schneier <schneier@chinet.com>
          ISBN: 0-471-59756-2



  3.  Getting the Shadow Suite.

  3.1.  History of the Shadow Suite for Linux

  DO NOT USE THE PACKAGES IN THIS SECTION, THEY HAVE SECURITY PROBLEMS

  The original Shadow Suite was written by John F. Haugh II.

  There are several versions that have been used on Linux systems:

  o  shadow-3.3.1 is the original.

  o  shadow-3.3.1-2 is Linux specific patch made by Florian La Roche
     <flla@stud.uni-sb.de> and contains some further enhancements.

  o  shadow-mk was specifically packaged for Linux.

  The shadow-mk package contains the shadow-3.3.1 package distributed by
  John F. Haugh II with the shadow-3.3.1-2 patch installed, a few fixes
  made by Mohan Kokal <magnus@texas.net> that make installation a lot
  easier, a patch by Joseph R.M. Zbiciak for login1.c (login.secure)
  that eliminates the -f, -h security holes in /bin/login, and some
  other miscellaneous patches.

  The shadow.mk package was the previously recommended package, but
  should be replaced due to a security problem with the login program.

  There are security problems with Shadow versions 3.3.1, 3.3.1-2, and
  shadow-mk involving the login program.  This login bug involves not
  checking the length of a login name.  This causes the buffer to
  overflow causing crashes or worse.  It has been rumored that this
  buffer overflow can allow someone with an account on the system to use
  this bug and the shared libraries to gain root access.  I won't
  discuss exactly how this is possible because there are a lot of Linux
  systems that are affected, but systems with these Shadow Suites
  installed, and most pre-ELF distributions without the Shadow Suite are
  vulnerable!

  For more information on this and other Linux security issues, see the
  Linux Security home page (Shared Libraries and login Program
  Vulnerability) <http://bach.cis.temple.edu/linux/linux-security/Linux-
  Security-FAQ/Linux-telnetd.html>



  3.2.  Where to get the Shadow Suite.

  The only recommended Shadow Suite is still in BETA testing, however
  the latest versions are safe in a production environment and don't
  contain a vulnerable login program.

  The package uses the following naming convention:


       shadow-YYMMDD.tar.gz



  where YYMMDD is the issue date of the Suite.

  This version will eventually be Version 3.3.3 when it is released from
  Beta testing, and is maintained by Marek Michalkiewicz
  <marekm@i17linuxb.ists.pwr.wroc.pl>.  It's available as: shadow-
  current.tar.gz
  <ftp://i17linuxb.ists.pwr.wroc.pl/pub/linux/shadow/shadow-
  current.tar.gz>.

  The following mirror sites have also been established:

  o  ftp://ftp.icm.edu.pl/pub/Linux/shadow/shadow-current.tar.gz

  o  ftp://iguana.hut.fi/pub/linux/shadow/shadow-current.tar.gz

  o  ftp://ftp.cin.net/usr/ggallag/shadow/shadow-current.tar.gz

  o  ftp://ftp.netural.com/pub/linux/shadow/shadow-current.tar.gz

  You should use the currently available version.

  You should NOT use a version older than shadow-960129 as they also
  have the login security problem discussed above.

  When this document refers to the Shadow Suite I am referring to the
  this package.  It is assumed that this is the package that you are
  using.

  For reference, I used shadow-960129 to make these installation
  instructions.

  If you were previously using shadow-mk, you should upgrade to this
  version and rebuild everything that you originally compiled.


  3.3.  What is included with the Shadow Suite.

  The Shadow Suite contains replacement programs for:

  su, login, passwd, newgrp, chfn, chsh, and id

  The package also contains the new programs:

  chage, newusers, dpasswd, gpasswd, useradd, userdel, usermod,
  groupadd, groupdel, groupmod, groups, pwck, grpck, lastlog, pwconv,
  and pwunconv

  Additionally, the library: libshadow.a is included for writing and/or
  compiling programs that need to access user passwords.

  Also, manual pages for the programs are also included.

  There is also a configuration file for the login program which will be
  installed as /etc/login.defs.


  4.  Compiling the programs.

  4.1.  Unpacking the archive.

  The first step after retrieving the package is unpacking it.  The
  package is in the tar (tape archive) format and compressed using gzip,
  so first move it to /usr/src, then type:


       tar -xzvf shadow-current.tar.gz



  This will unpack it into the directory: /usr/src/shadow-YYMMDD


  4.2.  Configuring with the config.h file

  The first thing that you need to do is to copy over the Makefile and
  the config.h file:


       cd /usr/src/shadow-YYMMDD
       cp Makefile.linux Makefile
       cp config.h.linux config.h



  You should then take a look at the config.h file.  This file contains
  definitions for some of the configuration options.  If you are using
  the recommended package, I recommend that you disable group shadow
  support for your first time around.

  By default shadowed group passwords are enabled.  To disable these
  edit the config.h file, and change the #define SHADOWGRP to #undef
  SHADOWGRP. I recommend that you disable them to start with, and then
  if you really want group passwords and group administrators that you
  enable it later and recompile.  If you leave it enabled, you must
  create the file /etc/gshadow.

  Enabling the long passwords option is NOT recommended as discussed
  above.

  Do NOT change the setting: #undef AUTOSHADOW

  The AUTOSHADOW option was originally designed so that programs that
  were shadow ignorant would still function.  This sounds good in
  theory, but does not work correctly.  If you enable this option, and
  the program runs as root, it may call getpwnam() as root, and later
  write the modified entry back to the /etc/passwd file (with the no-
  longer-shadowed password).  Such programs include chfn and chsh.  (You
  can't get around this by swapping real and effective uid before
  calling getpwnam() because root may use chfn and chsh too.)


  The same warning is also valid if you are building libc, it has a
  SHADOW_COMPAT option which does the same thing.  It should NOT be
  used!  If you start getting encoded passwords back in your /etc/passwd
  file, this is the problem.

  If you are using a libc version prior to 4.6.27, you will need to make
  a couple more changes to config.h and the Makefile.  To config.h edit
  and change:


       #define HAVE_BASENAME



  to:


       #undef HAVE_BASENAME



  And then in the Makefile, change:



       SOBJS = smain.o env.o entry.o susetup.o shell.o \
               sub.o mail.o motd.o sulog.o age.o tz.o hushed.o

       SSRCS = smain.c env.c entry.c setup.c shell.c \
               pwent.c sub.c mail.c motd.c sulog.c shadow.c age.c pwpack.c rad64.c \
               tz.c hushed.c



       SOBJS = smain.o env.o entry.o susetup.o shell.o \
               sub.o mail.o motd.o sulog.o age.o tz.o hushed.o basename.o

       SSRCS = smain.c env.c entry.c setup.c shell.c \
               pwent.c sub.c mail.c motd.c sulog.c shadow.c age.c pwpack.c rad64.c \
               tz.c hushed.c basename.c



  These changes add the code contained in basename.c which is contained
  in libc 4.6.27 and later.


  4.3.  Making backup copies of your original programs.

  It would also be a good idea to track down and make backup copies of
  the programs that the shadow suite will replace.  On a Slackware 3.0
  system these are:

  o  /bin/su

  o  /bin/login

  o  /usr/bin/passwd


  o  /usr/bin/newgrp

  o  /usr/bin/chfn

  o  /usr/bin/chsh

  o  /usr/bin/id

  The BETA package has a save target in the Makefile, but it's commented
  out because different distributions place the programs in different
  places.

  You should also make a backup copy of your /etc/passwd file, but be
  careful to name it something else if you place it in the same
  directory so you don't overwrite the passwd command.


  4.4.  Running make

  You need to be logged as root to do most of the installation.

  Run make to compile the executables in the package:


       make all



  You may see the warning: rcsid defined but not used.  This is fine, it
  just happens because the author is using a version control package.


  5.  Installing

  5.1.  Have a boot disk handy in case you break anything.

  If something goes terribly wrong, it would be handy to have a boot
  disk.  If you have a boot/root combination from your installation,
  that will work, otherwise see the Bootdisk-HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Bootdisk-HOWTO.html>, which
  describes how to make a bootable disk.


  5.2.  Removing duplicate man pages

  You should also move the manual pages that are about to be replaced.
  Even if you are brave enough install the Shadow Suite without making
  backups, you will still want to remove the old manual pages.  The new
  manual pages won't normally overwrite the old ones because the old
  ones are probably compressed.

  You can use a combination of: man -aW command and locate command to
  locate the manual pages that need to be (re)moved.  It's generally
  easier to figure out which are the older pages before you run make
  install.

  If you are using the Slackware 3.0 distribution, then the manual pages
  you want to remove are:

  o  /usr/man/man1/chfn.1.gz

  o  /usr/man/man1/chsh.1.gz

  o  /usr/man/man1/id.1.gz

  o  /usr/man/man1/login.1.gz

  o  /usr/man/man1/passwd.1.gz

  o  /usr/man/man1/su.1.gz

  o  /usr/man/man5/passwd.5.gz

  There may also be man pages of the same name in the /var/man/cat[1-9]
  subdirectories that should also be deleted.


  5.3.  Running make install

  You are now ready to type: (do this as root)


       make install



  This will install the new and replacement programs and fix-up the file
  permissions.  It will also install the man pages.

  This also takes care of installing the Shadow Suite include files in
  the correct places in /usr/include/shadow.

  Using the BETA package you must manually copy the file login.defs to
  the /etc subdirectory and make sure that only root can make changes to
  it.


       cp login.defs /etc
       chmod 700 /etc/login.defs



  This file is the configuration file for the login program.  You should
  review and make changes to this file for your particular system.  This
  is where you decide which tty's root can login from, and set other
  security policy settings (like password expiration defaults).


  5.4.  Running pwconv

  The next step is to run pwconv.  This must also be done as root, and
  is best done from the /etc subdirectory:


       cd /etc
       /usr/sbin/pwconv



  pwconv takes your /etc/passwd file and strips out the fields to create
  two files: /etc/npasswd and /etc/nshadow.

  A pwunconv program is also provided if you need to make a normal
  /etc/passwd file out of an /etc/passwd and /etc/shadow combination.



  5.5.  Renaming npasswd and nshadow

  Now that you have run pwconv you have created the files /etc/npasswd
  and /etc/nshadow.  These need to be copied over to /etc/passwd and
  /etc/shadow.  We also want to make a backup copy of the original
  /etc/passwd file, and make sure only root can read it.  We'll put the
  backup in root's home directory:


       cd /etc
       cp passwd ~passwd
       chmod 600 ~passwd
       mv npasswd passwd
       mv nshadow shadow



  You should also ensure that the file ownerships and permissions are
  correct.  If you are going to be using X-Windows, the xlock and xdm
  programs need to be able to read the shadow file (but not write it).

  There are two ways that this can be done.  You can set xlock to suid
  root (xdm is usually run as root anyway).  Or you can make the shadow
  file owned by root with a group of shadow, but before you do this,
  make sure that you have a shadow group (look in /etc/group).  None of
  the users on the system should actually be in the shadow group.


       chown root.root passwd
       chown root.shadow shadow
       chmod 0644 passwd
       chmod 0640 shadow



  Your system now has the password file shadowed.  You should now pop
  over to another virtual terminal and verify that you can login.

  Really, do this now!

  If you can't, then something is wrong!  To get back to a non-shadowed
  state, do the following the following:


       cd /etc
       cp ~passwd passwd
       chmod 644 passwd



  You would then restore the files that you saved earlier to their
  proper locations.



  6.  Other programs you may need to upgrade or patch

  Even though the shadow suite contains replacement programs for most
  programs that need to access passwords, there are a few additional
  programs on most systems that require access to passwords.

  If you are running a Debian Distribution (or even if you are not), you
  can obtain Debian sources for the programs that need to be rebuild
  from: ftp://ftp.debian.org/debian/stable/source/

  The remainder of this section discusses how to upgrade adduser,
  wu_ftpd, ftpd, pop3d, xlock, xdm and sudo so that they support the
  shadow suite.

  See the section ``Adding Shadow Support to a C program'' for a
  discussion on how to put shadow support into any other program that
  needs it (although the program must then be run SUID root or SGID
  shadow to be able to actually access the shadow file).


  6.1.  Slackware adduser program

  Slackware distributions (and possibly some others) contain a
  interactive program for adding users called /sbin/adduser.  A shadow
  version of this program can be obtained from
  ftp://sunsite.unc.edu/pub/Linux/
  system/Admin/accounts/adduser.shadow-1.4.tar.gz.

  I would encourage you to use the programs that are supplied with the
  Shadow Suite (useradd, usermod, and userdel) instead of the slackware
  adduser program.  They take a little time to learn how to use, but
  it's well worth the effort because you have much more control and they
  perform proper file locking on the /etc/passwd and /etc/shadow file
  (adduser doesn't).

  See the section on ``Putting the Shadow Suite to use'' for more
  information.

  But if you gotta have it, here is what you do:


       tar -xzvf adduser.shadow-1.4.tar.gz
       cd adduser
       make clean
       make adduser
       chmod 700 adduser
       cp adduser /sbin



  6.2.  The wu_ftpd Server

  Most Linux systems some with the wu_ftpd server.  If your distribution
  does not come with shadow installed, then your wu_ftpd will not be
  compiled for shadow.  wu_ftpd is launched from inetd/tcpd as a root
  process.  If you are running an old wu_ftpd daemon, you will want to
  upgrade it anyway because older ones had a bug that would allow the
  root account to be compromised (For more info see the Linux security
  home page <http://bach.cis.temple.edu/linux/linux-security/Linux-
  Security-FAQ/Linux-wu.ftpd-2.4-Update.html>).

  Fortunately, you only need to get the source code and recompile it
  with shadow enabled.

  If you are not running an ELF system, The wu_ftp server can be found
  on Sunsite as wu-ftp-2.4-fixed.tar.gz
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/file-transfer/wu-
  ftpd-2.4-fixed.tar.gz>

  Once you retrieve the server, put it in /usr/src, then type:


  cd /usr/src
  tar -xzvf wu-ftpd-2.4-fixed.tar.gz
  cd wu-ftpd-2.4-fixed
  cp ./src/config/config.lnx.shadow ./src/config/config.lnx



  Then edit ./src/makefiles/Makefile.lnx, and change the line:


       LIBES    = -lbsd -support



  to:


       LIBES    = -lbsd -support -lshadow



  Now you are ready to run the build script and install:


       cd /usr/src/wu-ftpd-2.4-fixed
       /usr/src/wu-ftp-2.4.fixed/build lnx
       cp /usr/sbin/wu.ftpd /usr/sbin/wu.ftpd.old
       cp ./bin/ftpd /usr/sbin/wu.ftpd



  This uses the Linux shadow configuration file, compiles and installs
  the server.

  On my Slackware 2.3 system I also had to do the following before
  running build:


       cd /usr/include/netinet
       ln -s in_systm.h in_system.h
       cd -



  Problems have been reported compiling this package under ELF systems,
  but the Beta version of the next release works fine.  It can be found
  as wu-ftp-2.4.2-beta-10.tar.gz
  <ftp://tscnet.com/pub/linux/network/ftp/wu-ftpd-2.4.2-beta-10.tar.gz>

  Once you retrieve the server, put it in /usr/src, then type:


       cd /usr/src
       tar -xzvf wu-ftpd-2.4.2-beta-9.tar.gz
       cd wu-ftpd-beta-9
       cd ./src/config



  Then edit config.lnx, and change:


       #undef SHADOW.PASSWORD



  to:


       #define SHADOW.PASSWORD



  Then,


       cd ../Makefiles



  and edit the file Makefile.lnx and change:


       LIBES = -lsupport -lbsd # -lshadow



  to:


       LIBES = -lsupport -lbsd -lshadow



  Then build and install:


       cd ..
       build lnx
       cp /usr/sbin/wu.ftpd /usr/sbin/wu.ftpd.old
       cp ./bin/ftpd /usr/sbin/wu.ftpd



  Note that you should check your /etc/inetd.conf file to make sure that
  this is where your wu.ftpd server really lives.  It has been reported
  that some distributions place the server daemons in different places,
  and then wu.ftpd in particular may be named something else.


  6.3.  Standard ftpd

  If you are running the standard ftpd server, I would recommend that
  you upgrade to the wu_ftpd server.  Aside from the known bug discussed
  above, it's generally thought to be more secure.

  If you insist on the standard one, or you need NIS support, Sunsite
  has ftpd-shadow-nis.tgz
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/file-transfer/ftpd-
  shadow-nis.tgz>


  6.4.  pop3d (Post Office Protocol 3)

  If you need to support the third Post Office Protocol (POP3), you will
  need to recompile a pop3d program.  pop3d is normally run by
  inetd/tcpd as root.

  There are two versions available from Sunsite:
  pop3d-1.00.4.linux.shadow.tar.gz
  <ftp://sunsite.unc.edu/pub/Linux/system/Mail/pop/pop3d-1.00.4.linux.shadow.tar.gz>
  and pop3d+shadow+elf.tar.gz
  <ftp://sunsite.unc.edu/pub/Linux/system/Mail/pop/pop3d+shadow+elf.tar.gz>

  Both of these are fairly straight forward to install.


  6.5.  xlock

  If you install the shadow suite, and then run X Windows System and
  lock the screen without upgrading your xlock, you will have to use
  CNTL-ALT-Fx to switch to another tty, login, and kill the xlock
  process (or use CNTL-ALT-BS to kill the X server).  Fortunately it's
  fairly easy to upgrade your xlock program.

  If you are running XFree86 Versions 3.x.x, you are probably using
  xlockmore (which is a great screen-saver in addition to a lock).  This
  package supports shadow with a recompile.  If you have an older xlock,
  I recommend that you upgrade to this one.

  xlockmore-3.5.tgz is available at:
  <ftp://sunsite.unc.edu/pub/Linux/X11/xutils/screensavers/xlockmore-3.7.tgz>

  Basically, this is what you need to do:

  Get the xlockmore-3.7.tgz file and put it in /usr/src unpack it:


       tar -xzvf xlockmore-3.7.tgz



  Edit the file: /usr/X11R6/lib/X11/config/linux.cf, and change the
  line:


       #define HasShadowPasswd    NO

       to

       #define HasShadowPasswd    YES



  Then build the executables:


       cd /usr/src/xlockmore
       xmkmf
       make depend
       make

  Then move everything into place and update file ownerships and
  permissions:


       cp xlock /usr/X11R6/bin/
       cp XLock /var/X11R6/lib/app-defaults/
       chown root.shadow /usr/X11R6/bin/xlock
       chmod 2755 /usr/X11R6/bin/xlock
       chown root.shadow /etc/shadow
       chmod 640 /etc/shadow



  Your xlock will now work correctly.


  6.6.  xdm

  xdm is a program that presents a login screen for X-Windows.  Some
  systems start xdm when the system is told to goto a specified run
  level (see /etc/inittab.

  With the Shadow Suite install, xdm will need to be updated.
  Fortunately it's fairly easy to upgrade your xdm program.


  xdm.tar.gz is available at:
  <ftp://sunsite.unc.edu/pub/Linux/X11/xutils/xdm.tar.gz>

  Get the xdm.tar.gz file and put it in /usr/src, then to unpack it:


       tar -xzvf xdm.tar.gz



  Edit the file: /usr/X11R6/lib/X11/config/linux.cf, and change the
  line:


       #define HasShadowPasswd    NO

       to

       #define HasShadowPasswd    YES



  Then build the executables:


       cd /usr/src/xdm
       xmkmf
       make depend
       make



  Then move everything into place:



  cp xdm /usr/X11R6/bin/



  xdm is run as root so you don't need to change it file permissions.



  6.7.  sudo

  The program sudo allows a system administrator to let users run
  programs that would normally require root access.  This is handy
  because it lets the administrator limit access to the root account
  itself while still allowing users to do things like mounting drives.

  sudo needs to read passwords because it verifies the users password
  when it's invoked.  sudo already runs SUID root, so accessing the
  /etc/shadow file is not a problem.

  sudo for the shadow suite, is available as at:
  <ftp://sunsite.unc.edu/pub/Linux/system/Admin/sudo-1.2-shadow.tgz>

  Warning: When you install sudo your /etc/sudoers file will be replaced
  with a default one, so you need to make a backup of it if you have
  added anything to the default one.  (you could also edit the Makefile
  and remove the line that copies the default file to /etc).

  The package is already setup for shadow, so all that's required is to
  recompile the package (put it in /usr/src):


       cd /usr/src
       tar -xzvf sudo-1.2-shadow.tgz
       cd sudo-1.2-shadow
       make all
       make install



  6.8.  roman }

  imapd  is an e-mail server similar to pop3d .  imapd  comes with the
  Pine E-mail  package.  The documentation that comes with the package
  states that the default for Linux systems is to include support for
  shadow.  However, I have found that this is not true.  Furthermore,
  the build script / Makefile combination on this package is makes it
  very difficult to add the libshadow.a library at compile time, so I
  was unable to add shadow support for imapd .

  If anyone has this figured out, please E-mail me, and I'll include the
  solution here.


  6.9.  pppd (Point-to-Point Protocol Server)

  The pppd server can be setup to use several types of authentication:
  Password Authentication Protocol (PAP) and Cryptographic Handshake
  Authentication Protocol (CHAP).  The pppd server usually reads the
  password strings that it uses from /etc/ppp/chap-secrets and/or
  /etc/ppp/pap-secrets.  If you are using this default behavior of pppd,
  it is not necessary to reinstall pppd.


  pppd also allows you to use the login parameter (either on the command
  line, or in the configuration or options file).  If the login option
  is given, then pppd will use the /etc/passwd file for the username and
  passwords for the PAP.  This, of course, will no longer work now that
  our password file is shadowed.  For pppd-1.2.1d this requires adding
  code for shadow support.

  The example given in the next section is adding shadow support to
  pppd-1.2.1d (an older version of pppd).

  pppd-2.2.0 already contains shadow support.


  7.  Putting the Shadow Suite to use.

  This section discusses some of the things that you will want to know
  now that you have the Shadow Suite installed on your system.  More
  information is contained in the manual pages for each command.


  7.1.  Adding, Modifying, and deleting users

  The Shadow Suite added the following command line oriented commands
  for adding, modifying, and deleting users.  You may also have
  installed the adduser program.


  7.1.1.  useradd

  The useradd command can be used to add users to the system.  You also
  invoke this command to change the default settings.

  The first thing that you should do is to examine the default settings
  and make changes specific to your system:


       useradd -D



  ______________________________________________________________________
  GROUP=1
  HOME=/home
  INACTIVE=0
  EXPIRE=0
  SHELL=
  SKEL=/etc/skel
  ______________________________________________________________________



  The defaults are probably not what you want, so if you started adding
  users now you would have to specify all the information for each user.
  However, we can and should change the default values.

  On my system:

  o  I want the default group to be 100

  o  I want passwords to expire every 60 days

  o  I don't want to lock an account because the password is expired

  o  I want to default shell to be /bin/bash

     To make these changes I would use:


       useradd -D -g100 -e60 -f0 -s/bin/bash



  Now running useradd -D will give:

  ______________________________________________________________________
  GROUP=100
  HOME=/home
  INACTIVE=0
  EXPIRE=60
  SHELL=/bin/bash
  SKEL=/etc/skel
  ______________________________________________________________________



  Just in case you wanted to know, these defaults are stored in the file
  /etc/default/useradd.

  Now you can use useradd to add users to the system.  For example, to
  add the user fred, using the defaults, you would use the following:


       useradd -m -c "Fred Flintstone" fred



  This will create the following entry in the /etc/passwd file:


       fred:*:505:100:Fred Flintstone:/home/fred:/bin/bash



  And the following entry in the /etc/shadow file:


       fred:!:0:0:60:0:0:0:0



  fred's home directory will be created and the contents of /etc/skel
  will be copied there because of the -m switch.

  Also, since we did not specify a UID, the next available one was used.

  fred's account is created, but fred still won't be able to login until
  we unlock the account.  We do this by changing the password.


       passwd fred



  ______________________________________________________________________
  Changing password for fred
  Enter the new password (minimum of 5 characters)
  Please use a combination of upper and lower case letters and numbers.
  New Password: *******
  Re-enter new password: *******
  ______________________________________________________________________


  Now the /etc/shadow will contain:


       fred:J0C.WDR1amIt6:9559:0:60:0:0:0:0



  And fred will now be able to login and use the system.  The nice thing
  about useradd and the other programs that come with the Shadow Suite
  is that they make changes to the /etc/passwd and /etc/shadow files
  atomically.  So if you are adding a user, and another user is changing
  their password at the same time, both operations will be performed
  correctly.

  You should use the supplied commands rather than directly editing
  /etc/passwd and /etc/shadow.  If you were editing the /etc/shadow
  file, and a user were to change his password while you are editing,
  and then you were to save the file you were editing, the user's
  password change would be lost.

  Here is a small interactive script that adds users using useradd and
  passwd:



  ______________________________________________________________________
  #!/bin/bash
  #
  # /sbin/newuser - A script to add users to the system using the Shadow
  #                 Suite's useradd and passwd commands.
  #
  # Written my Mike Jackson <mhjack@tscnet.com> as an example for the Linux
  # Shadow Password Howto.  Permission to use and modify is expressly granted.
  #
  # This could be modified to show the defaults and allow modification similar
  # to the Slackware Adduser program.  It could also be modified to disallow
  # stupid entries.  (i.e. better error checking).
  #
  ##
  #  Defaults for the useradd command
  ##
  GROUP=100        # Default Group
  HOME=/home       # Home directory location (/home/username)
  SKEL=/etc/skel   # Skeleton Directory
  INACTIVE=0       # Days after password expires to disable account (0=never)
  EXPIRE=60        # Days that a passwords lasts
  SHELL=/bin/bash  # Default Shell (full path)
  ##
  #  Defaults for the passwd command
  ##
  PASSMIN=0        # Days between password changes
  PASSWARN=14      # Days before password expires that a warning is given
  ##
  #  Ensure that root is running the script.
  ##
  WHOAMI=`/usr/bin/whoami`
  if [ $WHOAMI != "root" ]; then
          echo "You must be root to add news users!"
          exit 1
  fi
  ##
  #  Ask for username and fullname.
  ##
  echo ""
  echo -n "Username: "
  read USERNAME
  echo -n "Full name: "
  read FULLNAME
  #
  echo "Adding user: $USERNAME."
  #
  # Note that the "" around $FULLNAME is required because this field is
  # almost always going to contain at least on space, and without the "'s
  # the useradd command would think that you we moving on to the next
  # parameter when it reached the SPACE character.
  #
  /usr/sbin/useradd -c"$FULLNAME" -d$HOME/$USERNAME -e$EXPIRE \
          -f$INACTIVE -g$GROUP -m -k$SKEL -s$SHELL $USERNAME
  ##
  #  Set password defaults
  ##
  /bin/passwd -n $PASSMIN -w $PASSWARN $USERNAME >/dev/null 2>&1
  ##
  #  Let the passwd command actually ask for password (twice)
  ##
  /bin/passwd $USERNAME
  ##
  #  Show what was done.
  ##
  echo ""
  echo "Entry from /etc/passwd:"
  echo -n "   "
  grep "$USERNAME:" /etc/passwd
  echo "Entry from /etc/shadow:"
  echo -n "   "
  grep "$USERNAME:" /etc/shadow
  echo "Summary output of the passwd command:"
  echo -n "   "
  passwd -S $USERNAME
  echo ""
  ______________________________________________________________________



  Using a script to add new users is really much more preferable than
  editing the /etc/passwd or /etc/shadow files directly or using a
  program like the Slackware adduser program.  Feel free to use and
  modify this script for your particular system.

  For more information on the useradd see the online manual page.


  7.1.2.  usermod

  The usermod program is used to modify the information on a user.  The
  switches are similar to the useradd program.

  Let's say that you want to change fred's shell, you would do the
  following:


       usermod -s /bin/tcsh fred



  Now fred's /etc/passwd file entry would be change to this:


       fred:*:505:100:Fred Flintstone:/home/fred:/bin/tcsh



  Let's make fred's account expire on 09/15/97:


       usermod -e 09/15/97 fred



  Now fred's entry in /etc/shadow becomes:


       fred:J0C.WDR1amIt6:9559:0:60:0:0:10119:0



  For more information on the usermod command see the online manual
  page.



  7.1.3.  userdel

  userdel does just what you would expect, it deletes the user's
  account.  You simply use:


       userdel -r username



  The -r causes all files in the user's home directory to be removed
  along with the home directory itself.  Files located in other file
  system will have to be searched for and deleted manually.

  If you want to simply lock the account rather than delete it, use the
  passwd command instead.


  7.2.  The passwd command and passwd aging.

  The passwd command has the obvious use of changing passwords.
  Additionally, it is used by the root user to:

  o  Lock and unlock accounts (-l and -u)

  o  Set the maximum number of days that a password remains valid (-x)

  o  Set the minimum days between password changes (-n)

  o  Sets the number of days of warning that a password is about to
     expire (-w)

  o  Sets the number of days after the password expires before the
     account is locked (-i)

  o  Allow viewing of account information in a clearer format (-S)

  For example, let look again at fred


       passwd -S fred
       fred P 03/04/96 0 60 0 0



  This means that fred's password is valid, it was last changed on
  03/04/96, it can be changed at any time, it expires after 60 days,
  fred will not be warned, and and the account won't be disabled when
  the password expires.

  This simply means that if fred logs in after the password expires, he
  will be prompted for a new password at login.

  If we decide that we want to warn fred 14 days before his password
  expires and make his account inactive 14 days after he lets it expire,
  we would need to do the following:


       passwd -w14 -i14 fred



  Now fred is changed to:
       fred P 03/04/96 0 60 14 14



  For more information on the passwd command see the online manual page.


  7.3.  The login.defs file.

  The file /etc/login is the configuration file for the login program
  and also for the Shadow Suite as a whole.

  /etc/login contains settings from what the prompts will look like to
  what the default expiration will be when a user changes his password.

  The /etc/login.defs file is quite well documented just by the comments
  that are contained within it.  However, there are a few things to
  note:

  o  It contains flags that can be turned on or off that determine the
     amount of logging that takes place.

  o  It contains pointers to other configuration files.

  o  It contains defaults assignments for things like password aging.

  From the above list you can see that this is a rather important file,
  and you should make sure that it is present, and that the settings are
  what you desire for your system.


  7.4.  Group passwords.

  The /etc/groups file may contain passwords that permit a user to
  become a member of a particular group.  This function is enabled if
  you define the constant SHADOWGRP in the /usr/src/shadow-
  YYMMDD/config.h file.

  If you define this constant and then compile, you must create an
  /etc/gshadow file to hold the group passwords and the group
  administrator information.

  When you created the /etc/shadow, you used a program called pwconv,
  there no equivalent program to create the /etc/gshadow file, but it
  really doesn't matter, it takes care of itself.

  To create the initial /etc/gshadow file do the following:


       touch /etc/gshadow
       chown root.root /etc/gshadow
       chmod 700 /etc/gshadow



  Once you create new groups, they will be added to the /etc/group and
  the /etc/gshadow files.  If you modify a group by adding or removing
  users or changing the group password, the /etc/gshadow file will be
  changed.

  The programs groups, groupadd, groupmod, and groupdel are provided as
  part of the Shadow Suite to modify groups.


  The format of the /etc/group file is as follows:


       groupname:!:GID:member,member,...



  Where:

     groupname
        The name of the group

     !  The field that normally holds the password, but that is now
        relocated to the /etc/gshadow file.

     GID
        The numerical group ID number

     member
        List of group members

  The format of the /etc/gshadow file is as follows:


       groupname:password:admin,admin,...:member,member,...



  Where:

     groupname
        The name of the group

     password
        The encoded group password.

     admin
        List of group administrators

     member
        List of group members

  The command gpasswd is used only for adding or removing administrators
  and members to or from a group.  root or someone in the list of
  administrators may add or remove group members.

  The groups password can be changed using the passwd command by root or
  anyone listed as an administrator for the group.

  Despite the fact that there is not currently a manual page for
  gpasswd, typing gpasswd without any parameters gives a listing of
  options.  It's fairly easy to grasp how it all works once you
  understand the file formats and the concepts.



  7.5.  Consistency checking programs



  7.5.1.  pwck

  The program pwck is provided to provide a consistency check on the
  /etc/passwd and /etc/shadow files.  It will check each username and
  verify that it has the following:

  o  the correct number of fields

  o  unique user name

  o  valid user and group identifier

  o  valid primary group

  o  valid home directory

  o  valid login shell

  It will also warn of any account that has no password.

  It's a good idea to run pwck after installing the Shadow Suite.  It's
  also a good idea to run it periodically, perhaps weekly or monthly.
  If you use the -r option, you can use cron to run it on a regular
  basis and have the report mailed to you.


  7.5.2.  grpck

  grpck is the consistency checking program for the /etc/group and
  /etc/gshadow files.  It performs the following checks:

  o  the correct number of fields

  o  unique group name

  o  valid list of members and administrators

  It also has the -r option for automated reports.


  7.6.  Dial-up passwords.

  Dial-up passwords are another optional line of defense for systems
  that allow dial-in access.  If you have a system that allows many
  people to connect locally or via a network, but you want to limit who
  can dial in and connect, then dial-up passwords are for you.  To
  enable dial-up passwords, you must edit the file /etc/login.defs and
  ensure that DIALUPS_CHECK_ENAB is set to yes.

  Two files contain the dial-up information, /etc/dialups which contains
  the ttys (one per line, with the leading "/dev/" removed).  If a tty
  is listed then dial-up checks are performed.

  The second file is the /etc/d_passwd file.  This file contains the
  fully qualified path name of a shell, followed by an optional
  password.

  If a user logs into a line that is listed in /etc/dialups, and his
  shell is listed in the file /etc/d_passwd he will be allowed access
  only by suppling the correct password.

  Another useful purpose for using dial-up passwords might be to setup a
  line that only allows a certain type of connect (perhaps a PPP or UUCP
  connection).  If a user tries to get another type of connection (i.e.
  a list of shells), he must know a password to use the line.

  Before you can use the dial-up feature, you must create the files.

  The command dpasswd is provided to assign passwords to the shells in
  the /etc/d_passwd file.  See the manual page for more information.
  8.  Adding shadow support to a C program

  Adding shadow support to a program is actually fairly straightforward.
  The only problem is that the program must be run by root (or SUID
  root) in order for the the program to be able to access the
  /etc/shadow file.

  This presents one big problem: very careful programming practices must
  be followed when creating SUID programs.  For instance, if a program
  has a shell escape, this must not occur as root if the program is SUID
  root.

  For adding shadow support to a program so that it can check passwords,
  but otherwise does need to run as root, it's a lot safer to run the
  program SUID shadow instead.  The xlock program is an example of this.

  In the example given below, pppd-1.2.1d already runs SUID as root, so
  adding shadow support should not make the program any more vulnerable.


  8.1.  Header files

  The header files should reside in /usr/include/shadow.  There should
  also be a /usr/include/shadow.h, but it will be a symbolic link to
  /usr/include/shadow/shadow.h.

  To add shadow support to a program, you need to include the header
  files:

  #include <shadow/shadow.h>
  #include <shadow/pwauth.h>



  It might be a good idea to use compiler directives to conditionally
  compile the shadow code (I do in the example below).


  8.2.  libshadow.a library

  When you installed the Shadow Suite the libshadow.a file was created
  and installed in /usr/lib.

  When compiling shadow support into a program, the linker needs to be
  told to include the libshadow.a library into the link.

  This is done by:


       gcc program.c -o program -lshadow



  However, as we will see in the example below, most large programs use
  a Makefile, and usually have a variable called LIBS=... that we will
  modify.


  8.3.  Shadow Structure

  The libshadow.a library uses a structure called spwd for the
  information it retrieves from the /etc/shadow file.  This is the
  definition of the spwd structure from the /usr/include/shadow/shadow.h
  header file:

  ______________________________________________________________________
  struct spwd
  {
    char *sp_namp;                /* login name */
    char *sp_pwdp;                /* encrypted password */
    sptime sp_lstchg;             /* date of last change */
    sptime sp_min;                /* minimum number of days between changes */
    sptime sp_max;                /* maximum number of days between changes */
    sptime sp_warn;               /* number of days of warning before password
                                     expires */
    sptime sp_inact;              /* number of days after password expires
                                     until the account becomes unusable. */
    sptime sp_expire;             /* days since 1/1/70 until account expires
  */
    unsigned long sp_flag;        /* reserved for future use */
  };
  ______________________________________________________________________



  The Shadow Suite can put things into the sp_pwdp field besides just
  the encoded passwd.  The password field could contain:


       username:Npge08pfz4wuk;@/sbin/extra:9479:0:10000::::



  This means that in addition to the password, the program /sbin/extra
  should be called for further authentication.  The program called will
  get passed the username and a switch that indicates why it's being
  called.  See the file /usr/include/shadow/pwauth.h and the source code
  for pwauth.c for more information.

  What this means is that we should use the function pwauth to perform
  the actual authentication, as it will take care of the secondary
  authentication as well.  The example below does this.

  The author of the Shadow Suite indicates that since most programs in
  existence don't do this, and that it may be removed or changed in
  future versions of the Shadow Suite.


  8.4.  Shadow Functions

  The shadow.h file also contains the function prototypes for the
  functions contained in the libshadow.a library:

  ______________________________________________________________________
  extern void setspent __P ((void));
  extern void endspent __P ((void));
  extern struct spwd *sgetspent __P ((__const char *__string));
  extern struct spwd *fgetspent __P ((FILE *__fp));
  extern struct spwd *getspent __P ((void));
  extern struct spwd *getspnam __P ((__const char *__name));
  extern int putspent __P ((__const struct spwd *__sp, FILE *__fp));
  ______________________________________________________________________



  The function that we are going to use in the example is: getspnam
  which will retrieve for us a spwd structure for the supplied name.



  8.5.  Example

  This is an example of adding shadow support to a program that needs
  it, but does not have it by default.

  This example uses the Point-to-Point Protocol Server (pppd-1.2.1d),
  which has a mode in which it performs PAP authentication using user
  names and passwords from the /etc/passwd file instead of the PAP or
  CHAP files.  You would not need to add this code to pppd-2.2.0 because
  it's already there.

  This feature of pppd probably isn't used very much, but if you
  installed the Shadow Suite, it won't work anymore because the
  passwords are no longer stored in /etc/passwd.

  The code for authenticating users under pppd-1.2.1d is located in the
  /usr/src/pppd-1.2.1d/pppd/auth.c file.

  The following code needs to be added to the top of the file where all
  the other #include directives are.  We have surrounded the #includes
  with conditional directives (i.e. only include if we are compiling for
  shadow support).


  ______________________________________________________________________
  #ifdef HAS_SHADOW
  #include <shadow.h>
  #include <shadow/pwauth.h>
  #endif
  ______________________________________________________________________



  The next thing to do is to modify the actual code.  We are still
  making changes to the auth.c file.

  Function auth.c before modifications:



  ______________________________________________________________________
  /*
   * login - Check the user name and password against the system
   * password database, and login the user if OK.
   *
   * returns:
   *      UPAP_AUTHNAK: Login failed.
   *      UPAP_AUTHACK: Login succeeded.
   * In either case, msg points to an appropriate message.
   */
  static int
  login(user, passwd, msg, msglen)
      char *user;
      char *passwd;
      char **msg;
      int *msglen;
  {
      struct passwd *pw;
      char *epasswd;
      char *tty;

      if ((pw = getpwnam(user)) == NULL) {
          return (UPAP_AUTHNAK);
      }
       /*
       * XXX If no passwd, let them login without one.
       */
      if (pw->pw_passwd == '\0') {
          return (UPAP_AUTHACK);
      }

      epasswd = crypt(passwd, pw->pw_passwd);
      if (strcmp(epasswd, pw->pw_passwd)) {
          return (UPAP_AUTHNAK);
      }

      syslog(LOG_INFO, "user %s logged in", user);

      /*
       * Write a wtmp entry for this user.
       */
      tty = strrchr(devname, '/');
      if (tty == NULL)
          tty = devname;
      else
          tty++;
      logwtmp(tty, user, "");             /* Add wtmp login entry */
      logged_in = TRUE;

      return (UPAP_AUTHACK);
  }
  ______________________________________________________________________



  The user's password is placed into pw->pw_passwd, so all we really
  need to do is add the function getspnam.  This will put the password
  into spwd->sp_pwdp.

  We will add the function pwauth to perform the actual authentication.
  This will automatically perform secondary authentication if the shadow
  file is setup for it.

  Function auth.c after modifications to support shadow:


  ______________________________________________________________________
  /*
   * login - Check the user name and password against the system
   * password database, and login the user if OK.
   *
   * This function has been modified to support the Linux Shadow Password
   * Suite if USE_SHADOW is defined.
   *
   * returns:
   *      UPAP_AUTHNAK: Login failed.
   *      UPAP_AUTHACK: Login succeeded.
   * In either case, msg points to an appropriate message.
   */
  static int
  login(user, passwd, msg, msglen)
      char *user;
      char *passwd;
      char **msg;
      int *msglen;
  {
      struct passwd *pw;
      char *epasswd;
      char *tty;

  #ifdef USE_SHADOW
      struct spwd *spwd;
      struct spwd *getspnam();
  #endif

      if ((pw = getpwnam(user)) == NULL) {
          return (UPAP_AUTHNAK);
      }

  #ifdef USE_SHADOW
          spwd = getspnam(user);
          if (spwd)
                  pw->pw_passwd = spwd->sp-pwdp;
  #endif

       /*
       * XXX If no passwd, let NOT them login without one.
       */
      if (pw->pw_passwd == '\0') {
          return (UPAP_AUTHNAK);
      }
  #ifdef HAS_SHADOW
      if ((pw->pw_passwd && pw->pw_passwd[0] == '@'
           && pw_auth (pw->pw_passwd+1, pw->pw_name, PW_LOGIN, NULL))
          || !valid (passwd, pw)) {
          return (UPAP_AUTHNAK);
      }
  #else
      epasswd = crypt(passwd, pw->pw_passwd);
      if (strcmp(epasswd, pw->pw_passwd)) {
          return (UPAP_AUTHNAK);
      }
  #endif

      syslog(LOG_INFO, "user %s logged in", user);

      /*
       * Write a wtmp entry for this user.
       */
      tty = strrchr(devname, '/');
      if (tty == NULL)
          tty = devname;
      else
          tty++;
      logwtmp(tty, user, "");             /* Add wtmp login entry */
      logged_in = TRUE;

      return (UPAP_AUTHACK);
  }
  ______________________________________________________________________



  Careful examination will reveal that we made another change as well.
  The original version allowed access (returned UPAP_AUTHACK if there
  was NO password in the /etc/passwd file.  This is not good, because a
  common use of this login feature is to use one account to allow access
  to the PPP process and then check the username and password supplied
  by PAP with the username in the /etc/passwd file and the password in
  the /etc/shadow file.

  So if we had set the original version up to run as the shell for a
  user i.e.  ppp, then anyone could get a ppp connection by setting
  their PAP to user ppp and a password of null.

  We fixed this also by returning UPAP_AUTHNAK instead of UPAP_AUTHACK
  if the password field was empty.

  Interestingly enough, pppd-2.2.0 has the same problem.

  Next we need to modify the Makefile so that two things occur:
  USE_SHADOW must be defined, and libshadow.a needs to be added to the
  linking process.

  Edit the Makefile, and add:


       LIBS = -lshadow



  Then we find the line:


       COMPILE_FLAGS = -I.. -D_linux_=1 -DGIDSET_TYPE=gid_t



  And change it to:


       COMPILE_FLAGS = -I.. -D_linux_=1 -DGIDSET_TYPE=gid_t -DUSE_SHADOW



  Now make and install.


  9.  Frequently Asked Questions.

  Q: I used to control which tty's root could log into using the file
  /etc/securettys, but it doesn't seem to work anymore, what's going on?

  A: The file /etc/securettys does absolutely nothing now that the
  Shadow Suite is installed.  The tty's that root can use are now
  located in the login configuration file /etc/login.defs.  The entry in
  this file may point to another file.


  Q: I installed the Shadow Suite, but now I can't login, what did I
  miss?

  A: You probably installed the Shadow programs, but didn't run pwconv
  or you forgot to copy /etc/npasswd to /etc/passwd and /etc/nshadow to
  /etc/shadow.  Also, you may need to copy login.defs to /etc.


  Q: In the section on xlock, it said to change the group ownership of
  the /etc/shadow file to shadow.  I don't have a shadow group, what do
  I do?

  A: You can add one.  Simply edit the /etc/group file, and insert a
  line for the shadow group.  You need to ensure that the group number
  is not used by another group, and you need to insert it before the
  nogroup entry.  Or you can simply suid xlock to root.


  Q: Is there a mailing list for the Linux Shadow Password Suite?

  A: Yes, but it's for the development and beta testing of the next
  Shadow Suite for Linux.  You can get added to the list by mailing to:
  shadow-list-request@neptune.cin.net with a subject of: subscribe.  The
  list is actually for discussions of the Linux shadow-YYMMSS series of
  releases.  You should join if you want to get involved in further
  development or if you install the Suite on your system and want to get
  information on newer releases.


  Q: I installed the Shadow Suite, but when I use the userdel command, I
  get "userdel: cannot open shadow group file", what did I do wrong?

  A: You compiled the Shadow Suite with the SHADOWGRP option enabled,
  but you don't have an /etc/gshadow file.  You need to either edit the
  config.h file and recompile, or create an /etc/group file.  See the
  section on shadow groups.


  Q: I installed the Shadow Suite but now I'm getting encoded passwords
  back in my /etc/passwd file, what's wrong?

  A: You either enabled the AUTOSHADOW option in the Shadow config.h
  file, or your libc was compiled with the SAHDOW_COMPAT option.  You
  need to determine which is the problem, and recompile.


  10.  Copyright Message.

  The Linux Shadow Password HOWTO is Copyright (c) 1996 Michael H.
  Jackson.

  Permission is granted to make and distribute verbatim copies of this
  document provided the copyright notice and this permission notice are
  preserved on all copies.

  Permission is granted to copy and distribute modified versions of this
  document under the conditions for verbatim copies above, provided a
  notice clearly stating that the document is a modified version is also
  included in the modified document.

  Permission is granted to copy and distribute translations of this
  document into another language, under the conditions specified above
  for modified versions.

  Permission is granted to convert this document into another media
  under the conditions specified above for modified versions provided
  the requirement to acknowledge the source document is fulfilled by
  inclusion of an obvious reference to the source document in the new
  media. Where there is any doubt as to what defines 'obvious' the
  copyright owner reserves the right to decide.


  11.  Miscellaneous and Acknowledgments.

  The code examples for auth.c are taken from pppd-1.2.1d and
  ppp-2.1.0e, Copyright (c) 1993 and The Australian National University
  and Copyright (c) 1989 Carnegie Mellon University.

  Thanks to Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl> for
  writing and maintaining the Shadow Suite for Linux, and for his review
  and comments on this document.

  Thanks to Ron Tidd <rtidd@tscnet.com> for his helpful review and
  testing.

  Thanks to everyone who has sent me feedback to help improve this
  document.

  Please, if you have any comments or suggestions then mail them to me.

  regards

  Michael H. Jackson <mhjack@tscnet.com>

  } Miscellaneous and Acknowledgments.



  Building and Installing Software Packages for Linux
  Mendel Cooper <mailto:thegrendel@theriver.com> ---
  http://personal.riverusers.com/~thegrendel/ <http://per-
  sonal.riverusers.com/~thegrendel/>
  v1.91, 27 July 1999

  This is a comprehensive guide to building and installing "generic"
  UNIX software distributions under Linux. Additionally, there is some
  coverage of "rpm" and "deb" pre-packaged binaries.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Unpacking the Files

  3. Using Make

  4. Prepackaged Binaries

     4.1 Whats wrong with rpms?
     4.2 Problems with rpms: an example

  5. Termcap and Terminfo Issues

  6. Backward Compatibility With a.out Binaries

     6.1 An Example

  7. Troubleshooting

     7.1 Link Errors
     7.2 Other Problems
     7.3 Tweaking and fine tuning
     7.4 Where to go for more help

  8. Final Steps

  9. First Example: Xscrabble

  10. Second Example: Xloadimage

  11. Third Example: Fortune

  12. Fourth Example: Hearts

  13. Fifth Example: XmDipmon

  14. Where to Find Source Archives

  15. Final Words

  16. References and Further Reading

  17. Credits



  ______________________________________________________________________

  1.  Introduction

  Many software packages for the various flavors of UNIX and Linux come
  as compressed archives of source files.  The same package may be
  "built" to run on different target machines, and this saves the author
  of the software from having to produce multiple versions. A single
  distribution of a software package may thus end up running, in various
  incarnations, on an Intel box, a DEC Alpha, a RISC workstation, or
  even a mainframe.  Unfortunately, this puts the responsibility of
  actually "building" and installing the software on the end user, the
  de facto "system administrator", the fellow sitting at the keyboard --
  you.  Take heart, though, the process is not nearly as terrifying or
  mysterious as it seems, as this guide will demonstrate.



  2.  Unpacking the Files

  You have downloaded or otherwise acquired a software package.  Most
  likely it is archived (tarred) and compressed (gzipped), in .tar.gz or
  .tgz form (familiarly known as a "tarball").  First copy it to a
  working directory. Then untar and gunzip it. The appropriate command
  for this is tar xzvf filename, where filename is the name of the
  software file, of course.  The de-archiving process will usually
  install the appropriate files in subdirectories it will create.  Note
  that if the package name has a .Z suffix, then the above procedure
  will serve just as well, though running uncompress, followed by a tar
  xvf also works. You may preview this process by a tar tzvf filename,
  which lists the files in the archive without actually unpacking them.

  The above method of unpacking "tarballs" is equivalent to either of
  the following:

  o  gzip -cd filename | tar xvf -

  o  gunzip -c filename | tar xvf -

     (The '-' causes the tar command to take its input from stdin.)

  Source files in the new bzip2 (.bz2) format can be unarchived by a
  bzip2 -cd filename | tar xvf -, or, more simply by a tar xyvf
  filename, assuming that tar has been appropriately patched (refer to
  the Bzip2 HOWTO for details). Debian Linux uses a different patch for
  tar, one written by Hiroshi Takekawa, so that the -I, --bzip2,
  --bunzip2 options work with that particular tar version.

  [Many thanks to R. Brock Lynn and Fabrizio Stefani for corrections and
  updates on the above information.]



  Sometimes the archived file must be untarred and installed from the
  user's home directory, or perhaps in a certain other directory, such
  as /, /usr/src, or /opt, as specified in the package's config info.
  Should you get an error message attempting to untar it, this may be
  the reason. Read the package docs, especially the README and/or
  Install files, if present, and edit the config files and/or Makefiles
  as necessary, consistent with the installation instructions. Note that
  you would not ordinarily alter the Imake file, since this could have
  unforseen consequences.  Most software packages permit automating this
  process by running make install to emplace the binaries in the
  appropriate system areas.


  o  You might encounter shar files, or shell archives, especially in
     the source code newsgroups on the Internet.  These remain in use
     because they are readable to humans, and this permits newsgroup
     moderators to sort through them and reject unsuitable ones.  They
     may be unpacked by the unshar filename.shar command. Otherwise the
     procedure for dealing with them is the same as for "tarballs".



  o  Some source archives have been processed using nonstandard DOS,
     Mac, or even Amiga compression utilities such zip, arc, lha, arj,
     zoo, rar, and shk.  Fortunately, Sunsite <http://metalab.unc.edu>
     and other places have Linux uncompression utilities that can deal
     with most or all of these.

  Occasionally, you may need to update or incorporate bug fixes into the
  unarchived source files using a patch or diff file that lists the
  changes.  The doc files and/or README file will inform you should this
  be the case. The normal syntax for invoking Larry Wall's powerful
  patch utility is patch < patchfile.

  You may now proceed to the build stage of the process.



  3.  Using Make

  The Makefile is the key to the build process. In its simplest form, a
  Makefile is a script for compiling or building the "binaries", the
  executable portions of a package. The Makefile can also provide a
  means of updating a software package without having to recompile every
  single source file in it, but that is a different story (or a
  different article).

  At some point, the Makefile launches cc or gcc. This is actually a
  preprocessor, a C (or C++) compiler, and a linker, invoked in that
  order.  This process converts the source into the binaries, the actual
  executables.

  Invoking make usually involves just typing make. This generally builds
  all the necessary executable files for the package in question.
  However, make can also do other tasks, such as installing the files in
  their proper directories (make install) and removing stale object
  files (make clean).  Running make -n permits previewing the build
  process, as it prints out all the commands that would be triggered by
  a make, without actually executing them.


  Only the simplest software uses a generic Makefile. More complex
  installations require tailoring the Makefile according to the location
  of libraries, include files, and resources on your particular machine.
  This is especially the case when the build needs the X11 libraries to
  install. Imake and xmkmf accomplish this task.

  An Imakefile is, to quote the man page, a "template" Makefile. The
  imake utility constructs a Makefile appropriate for your system from
  the Imakefile. In almost all cases, however, you would run xmkmf, a
  shell script that invokes imake, a front end for it.  Check the README
  or INSTALL file included in the software archive for specific
  instructions.  (If, after dearchiving the source files, there is an
  Imake file present in the base directory, this is a dead giveaway that
  xmkmf should be run.)  Read the Imake and xmkmf man pages for a more
  detailed analysis of the procedure.

  Be aware that xmkmf and make may need to be invoked as root,
  especially when doing a make install to move the binaries over to the
  /usr/bin or /usr/local/bin directories.  Using make as an ordinary
  user without root privileges will likely result in write access denied
  error messages because you lack write permission to system
  directories. Check also that the binaries created have the proper
  execute permissions for you and any other appropriate users.

  Invoking xmkmf uses the Imake file to build a new Makefile appropriate
  for your system. You would normally invoke xmkmf with the -a argument,
  to automatically do a make Makefiles, make includes, and make depend.
  This sets the variables and defines the library locations for the
  compiler and linker.  Sometimes, there will be no Imake file, instead
  there will be an INSTALL or configure script that will accomplish this
  purpose. Note that if you run configure, it should be invoked as
  ./configure to ensure that the correct configure script in the current
  directory is called. In most cases, the README file included with the
  distribution will explain the install procedure.

  It is usually a good idea to visually inspect the Makefile that xmkmf
  or one of the install scripts builds. The Makefile will normally be
  correct for your system, but you may occasionally be required to
  "tweak" it or correct errors manually.


  Installing the freshly built binaries into the appropriate system
  directories is usually a matter of running make install as root. The
  usual directories for system-wide binaries on modern Linux
  distributions are /usr/bin, /usr/X11R6/bin, and /usr/local/bin. The
  preferred directory for new packages is /usr/local/bin, as this will
  keep separate binaries not part of the original Linux installation.

  Packages originally targeted for commercial versions of UNIX may
  attempt to install in the /opt or other unfamiliar directory. This
  will, of course, result in an installation error if the intended
  installation directory does not exist. The simplest way to deal with
  this is to create, as root, an /opt directory, let the package install
  there, then add that directory to the PATH environmental variable.
  Alternatively, you may create symbolic links to the /usr/local/bin
  directory.



  Your general installation procedure will therefore be:

  o  Read the README file and other applicable docs.

  o  Run xmkmf -a, or the INSTALL or configure script.

  o  Check the Makefile.

  o  If necessary, run make clean, make Makefiles, make includes, and
     make depend.

  o  Run make.

  o  Check file permissions.

  o  If necessary, run make install.


  Notes:


  o  You would not normally build a package as root. Doing an su to root
     is only necessary for installing the compiled binaries into system
     directories.

  o  After becoming familiar with make and its uses, you may wish to add
     additional optimization options passed to gcc in the standard
     Makefile included or created in the package you are installing.
     Some of these common options are -O2, -fomit-frame-pointer,
     -funroll-loops, and -mpentium (if you are running a Pentium cpu).
     Use caution and good sense when modifying a Makefile!

  o  After the make creates the binaries, you may wish to strip them.
     The strip command removes the symbolic debugging information from
     the binaries, and reduces their size, often drastically. This also
     disables debugging, of course.

  o  The Pack Distribution Project <http://sunsite.auc.dk/pack/> offers
     a different approach to creating archived software packages, based
     on a set of Python scripting tools for managing symbolic links to
     files installed in separate collection directories. These archives
     are ordinary tarballs, but they install in /coll and /pack
     directories. You may find it necessary to download the Pack-
     Collection from the above site should you ever run across one of
     these distributions.



  4.  Prepackaged Binaries



  4.1.  Whats wrong with rpms?


  Manually building and installing packages from source is apparently so
  daunting a task for some Linux users that they have embraced the
  popular rpm and deb or the newer Stampede slp package formats. While
  it may be the case that an rpm install normally runs as smoothly and
  as fast as a software install in a certain other notorious operating
  system, some thought should certainly be given to the disadvantages of
  self-installing, prepackaged binaries.

  First, be aware that software packages are normally released first as
  "tarballs", and that prepackaged binaries follow days, weeks, even
  months later.  A current rpm package is typically at least a couple of
  minor version behind the latest "tarball".  So, if you wish to keep up
  with all the 'bleeding edge' software, you might not wish to wait for
  an rpm or deb to appear. Some less popular packages may never be
  rpm'ed.

  Second, the "tarball" package may well be more complete, have more
  options, and lend itself better to customization and tweaking.  The
  binary rpm version may be missing some of the functionality of the
  full release.  Source rpm's contain the full source code and are
  equivalent to the corresponding "tarballs", and they likewise need to
  be built and installed using either of the rpm --recompile
  packagename.rpm or rpm --rebuild packagename.rpm options.

  Third, some prepackaged binaries will not properly install, and even
  if they do install, they could crash and core-dump. They may depend on
  different library versions than are present in your system, or they
  may be improperly prepared or just plain broken. In any case, when
  installing an rpm or deb you necessarily trust the expertise of the
  persons who have packaged it.

  Finally, it helps to have the source code on hand, to be able to
  tinker with and learn from it. It is much more straightforward to have
  the source in the archive you are building the binaries from, and not
  in a separate source rpm.


  Installing an rpm package is not necessarily a no-brainer.  If there
  is a dependency conflict, an rpm install will fail. Likewise, should
  the rpm require a different version of libraries than the ones present
  on your system, the install may not work, even if you create symbolic
  links to the missing libraries from the ones in place.  Despite their
  convenience, rpm installs often fail for the same reasons "tarball"
  ones do.

  You must install rpm's and deb's as root, in order to have the
  necessary write permissions, and this opens a potentially serious
  security hole, as you may inadvertently clobber system binaries and
  libraries, or even install a Trojan horse that might wreak havoc upon
  your system.  It is therefore important to obtain rpm and deb packages
  from a "trusted source". In any case, you should run a 'signature
  check' (against the MD5 checksum) on the package, rpm --checksig
  packagename.rpm, before installing. Likewise highly recommended is
  running rpm -K --nopgp packagename.rpm.  The corresponding commands
  for deb packages are dpkg -I | --info packagename.deb and dpkg -e |
  --control packagename.deb.


  o  rpm --checksig gnucash-1.1.23-4.i386.rpm



  gnucash-1.1.23-4.i386.rpm: size md5 OK


  o  rpm -K --nopgp gnucash-1.1.23-4.i386.rpm



  gnucash-1.1.23-4.i386.rpm: size md5 OK

  For the truly paranoid (and, in this case there is much to be said for
  paranoia), there are the unrpm and rpmunpack utilities available from
  the Sunsite utils/package directory for unpacking and checking the
  individual components of the packages.

  Klee Diene <mailto:klee@debian.org> has written an experimental
  dpkgcert package for verifying the integrity of installed .deb files
  against MD5 checksums.  It is available from the Debian ftp archive
  <ftp://ftp.debian.org/pub/debian/project/experimental>.  The current
  package name / version is dpkgcert_0.2-4.1_all.deb. The Jim Pick
  Software <http://dpkgcert.jimpick.com> site maintains an experimental
  server database to provide dpkgcert certificates for the packages in a
  typical Debian installation.

  In their most simple form, the commands rpm -i packagename.rpm and
  dpkg --install packagename.deb automatically unpack and install the
  software.  Exercise caution, though, since using these commands
  blindly may be dangerous to your system's health!

  Note that the above warnings also apply, though to a lesser extent, to
  Slackware's pkgtool installation utility. All "automatic" software
  installations require caution.

  The martian
  <http://www.people.cornell.edu/pages/rc42/program/martian.html> and
  alien <http://kitenet.net/programs/alien/> programs allow conversion
  between the rpm, deb, Stampede slp, and tar.gz package formats. This
  makes these packages accessible to all Linux distributions.

  Carefully read the man pages for the rpm and dpkg commands, and refer
  to the RPM HOWTO, TFUG's Quick Guide to Red Hat's Package Manager
  <http://www.tfug.org/helpdesk/linux/rpm.html>, and The Debian Package
  Management Tools <http://www.debian.org/doc/FAQ/debian-faq-7.html> for
  more detailed information.



  4.2.  Problems with rpms: an example


  Jan Hubicka <mailto:hubicka@paru.cas.cz> wrote a very nice fractal
  package called xaos.  At his home page
  <http://www.paru.cas.cz/~hubicka/XaoS>, both .tar.gz and rpm packages
  are available.  For the sake of convenience, let us try the rpm
  version, rather than the "tarball".

  Unfortunately, the rpm of xaos fails to install. Two separate rpm
  versions misbehave.

  rpm -i --test XaoS-3.0-1.i386.rpm


       error: failed dependencies:
               libslang.so.0 is needed by XaoS-3.0-1
               libpng.so.0 is needed by XaoS-3.0-1
               libaa.so.1 is needed by XaoS-3.0-1



  rpm -i --test xaos-3.0-8.i386.rpm


       error: failed dependencies:
               libaa.so.1 is needed by xaos-3.0-8



  The strange thing is that libslang.so.0, libpng.so.0, and libaa.so.1
  are all present in /usr/lib on the system tested. The rpms of xaos
  must have been built with slightly different versions of those
  libraries, even if the release numbers are identical.

  As a test, let us try installing xaos-3.0-8.i386.rpm with the --nodeps
  option to force the install. A trial run of xaos crashes.


       xaos: error in loading shared libraries: xaos: undefined symbol: __fabsl



  Let us stubbornly try to get to the bottom of this.  Running ldd on
  the xaos binary to find its library dependencies shows all the
  necessary shared libraries present. Running nm on the
  /usr/lib/libaa.so.1 library to list its symbolic references shows that
  it is indeed missing __fabsl.  Of course, the absent reference could
  be missing from one of the other libraries...  There is nothing to be
  done about that, short of replacing one or more libraries.


  Enough! Download the "tarball", XaoS-3.0.tar.gz, available from the
  ftp site <ftp://ftp.ta.jcu.cz/pub/linux/hubicka/XaoS/3.0>, as well as
  from the home page.  Try building it. Running ./configure, make, and
  finally (as root) make install, works flawlessly.

  This is one of an number of examples of prepackaged binaries being
  more trouble than they are worth.



  5.  Termcap and Terminfo Issues



  According to its man page, "terminfo is a data base describing
  terminals, used by screen-oriented programs...".  It defines a generic
  set of control sequences (escape codes) used to display text on
  terminals, and makes possible support for different terminal hardware
  without the need for special drivers. The terminfo libraries are
  located in /usr/share/terminfo on modern Linux distributions.

  The terminfo database has largely supplanted the older termcap and the
  totally obsolete termlib ones. This is usually of no concern for
  program installation except when dealing with a package that requires
  termcap.

  Most Linux distributions now use terminfo, but still retain the older
  termcap libraries for compatibility with legacy applications (see
  /etc/termcap). Sometimes there is a special compatibility package that
  needs to be installed to facilitate use of termcap linked binaries.
  Very occasionally, an #define termcap statement might need to be
  commented out of a source file.  Check the appropriate doc files for
  your particular distribution for definitive information on this.



  6.  Backward Compatibility With a.out Binaries


  In a very few cases, it is necessary to use a.out binaries, either
  because the source code is not available or because it is not possible
  to build new ELF binaries from the source for some reason.

  As it happens, ELF installations almost always have a complete set of
  a.out libraries in the /usr/i486-linuxaout/lib directory.  The
  numbering scheme for a.out libraries differs from that of ELF ones,
  cleverly avoiding conflicts that could cause confusion.  The a.out
  binaries should therefore be able to find the correct libraries at
  runtime, but this might not always be the case.

  Note that the kernel needs to have a.out support built into it, either
  directly or as a loadable module. It may be necessary to rebuild the
  kernel to enable this. Moreover, some Linux distributions require
  installation of a special compatibility package, such as Debian's
  xcompat for executing a.out X applications.


  6.1.  An Example


  Jerry Smith wrote a very handy rolodex program some years back. It
  uses the Motif libraries, but fortunately is available as a statically
  linked binary in a.out format. Unfortunately, the source requires
  numerous tweaks to rebuild using the lesstif libraries. Even more
  unfortunately, the a.out binary bombs on an ELF system with the
  following error message.


       xrolodex: can't load library '//lib/libX11.so.3'
       No such library



  As it happens, there is such a library, in /usr/i486-linuxaout/lib,
  but xrolodex is unable to locate it at run time. The simple solution
  is to provide a symbolic link in the /lib directory:

  ln -s /usr/i486-linuxaout/lib/X11.so.3.1.0 libX11.so.3


  It turns out to be necessary to provide similar links for the
  libXt.so.3 and libc.so.4 libraries. This needs to be done as root, of
  course. Note that you should make absolutely certain you will not
  overwrite or cause version number conflicts with pre-existing
  libraries.  Fortunately, the new ELF libraries have higher version
  numbers than the older a.out ones, to anticipate and forestall just
  such problems.

  After creating the three links, xrolodex runs fine.

  The xrolodex package was originally posted on Spectro
  <http://www.spectro.com/>, but seems to vanished from there. It may
  currently be downloaded from Sunsite
  <http://metalab.unc.edu/pub/Linux/apps/reminder/xrolodex.tar.z> as a
  tar.Z format source file [512k].



  7.  Troubleshooting


  If xmkmf and/or make succeeded without errors, you may proceed to the
  ``next section''.  However, in "real life", few things work right the
  first time.  This is when your resourcefulness is put to the test.


  7.1.  Link Errors


  o  Suppose make fails with a Link error: -lX11: No such file or
     directory, even after xmkmf has been invoked. This may mean that
     the Imake file was not set up properly. Check the first part of the
     Makefile for lines such as:



       LIB=            -L/usr/X11/lib
       INCLUDE=        -I/usr/X11/include/X11
       LIBS=           -lX11 -lc -lm



  The -L and -I switches tell the compiler and linker where to look for
  the library and include files, respectively. In this example, the X11
  libraries should be in the /usr/X11/lib directory, and the X11 include
  files should be in the /usr/X11/include/X11 directory. If this is
  incorrect for your machine, make the necessary changes to the Makefile
  and try the make again.


  o  Undefined references to math library functions, such as the
     following:


                /tmp/cca011551.o(.text+0x11): undefined reference to `cos'



  The fix for this is to explicitly link in the math library, by adding
  an -lm to the LIB or LIBS flags in the Makefile (see previous exam-
  ple).



  o  Yet another thing to try if xmkmf fails is the following script:


                make -DUseInstalled -I/usr/X386/lib/X11/config



  This is a sort of bare bones equivalent of xmkmf.


  o  In a very few cases, running ldconfig as root may be the solution:



  # ldconfig updates the shared library symbolic links. This may not be
  necessary .


  o  Some Makefiles use unrecognized aliases for libraries present in
     your system. For example, the build may require libX11.so.6, but
     there exists no such file or link in /usr/X11R6/lib. Yet, there is
     a libX11.so.6.1. The solution is to do a ln -s
     /usr/X11R6/lib/libX11.so.6.1 /usr/X11R6/lib/libX11.so.6, as root.
     This may need to be followed by a ldconfig.



  o  Sometimes the source needs the older release X11R5 libraries to
     build.  If you have the R5 libs in /usr/X11R6/lib (you were given
     the option of having them when first installing Linux), then you
     need only ensure that you have the links that the software needs to
     build.  The R5 libs are named libX11.so.3.1.0, libXaw.so.3.1.0, and
     libXt.so.3.1.0. You generally need links, such as libX11.so.3 ->
     libX11.so.3.1.0. Possibly the software will also need a link of the
     form libX11.so -> libX11.so.3.1.0.  Of course, to create a
     "missing" link, use the command ln -s libX11.so.3.1.0 libX11.so, as
     root.



  o  Some packages will require you to install updated versions of one
     or more libraries. For example, the 4.x versions of the StarOffice
     suite from StarDivision GmbH were notorious for needing a libc
     version 5.4.4 or greater. Even the more recent StarOffice 5.0 will
     not run after installation with the new glibc 2.1 libs.
     Fortunately, the newer StarOffice 5.1 solves these problems.  If
     running an older version of StarOffice you would, as root, need to
     copy one or more libraries to the appropriate directories, remove
     the old libraries, then reset the symbolic links (check the latest
     version of the StarOffice miniHOWTO for more information on this).

     Caution: Exercise extreme care in this, as you can render your
     system nonfunctional if you screw up.

     You can usually find the latest updated libraries at Sunsite.


  7.2.  Other Problems



  o  An installed Perl or shell script gives you a No such file or
     directory error message. In this case, check the file permissions
     to make sure the file is executable and check the file header to
     ascertain whether the shell or program invoked by the script is in
     the place specified.  For example, the scrip may begin with:


       #!/usr/local/bin/perl



  If Perl is in fact installed in your /usr/bin directory instead of the
  /usr/local/bin one, then the script will not run.  There are two meth-
  ods of correcting this. The script file header may be changed to
  #!/usr/bin/perl, or a symbolic link to the correct directory may be
  added, ln -s /usr/bin/perl /usr/local/bin/perl.


  o  Some X11 software requires the Motif libraries to build.  The
     standard Linux distributions do not have the Motif libraries
     installed, and at present Motif costs an extra $100-$200 (though
     the freeware Lesstif <http://www.lesstif.org/> also works in many
     cases). If you need Motif to build a certain package, but lack the
     Motif libraries, it may be possible to obtain statically linked
     binaries. Static linking incorporates the library routines in the
     binaries themselves.  This results in much larger binary files, but
     the code will run on systems lacking the libraries.



  When a package requires libraries not present on your system for the
  build, it will result in link errors (undefined reference errors).
  The libraries may be expensive proprietary ones or difficult to find
  for sone other reason.  In that case, obtaining a statically linked
  binary either from the author of the package or from a Linux user
  group may be the easiest to implement fix.



  o  Running a configure script creates a strange Makefile, one
     seemingly unrelated to the package you are attempting to build.
     This means the wrong configure ran, one found somewhere else in
     your path. Always invoke configure as ./configure to prevent this.



  o  Most Linux distributions have changed over to the libc 6 / glibc 2
     libraries from the older libc 5. Precompiled binaries that worked
     with the older library may bomb if you have upgraded your library.
     The solution is to either recompile the applications from the
     source or to obtain newer precompiled binaries.  If you are in the
     process of upgrading your system to libc 6 and are experiencing
     problems, refer to Eric Green's Glibc 2 HOWTO.



  Note that there are some minor incompatibilities between glibc ver-
  sions, so a binary built with glibc 2.1 may not work with glibc 2.0,
  and vice versa.



  o  Sometimes it is necessary to remove the -ansi option from the
     compile flags in the Makefile. This enables gcc's extra, non-ANSI
     features, and allows building packages that require these
     extensions. (Thanks to Sebastien Blondeel for pointing this out.)


  o  Some programs require having setuid root, in order to run with root
     privileges. The command to implement this is chmod u+s filename, as
     root (note that the program must already be owned by root). This
     has the effect of setting the setuid bit in the file permissions.
     This issue comes up when the program accesses the system hardware,
     such as a modem or CD ROM drive, or when the SVGA libs are invoked
     from console mode, as in one particularly notorious emulation
     package. If a program works when run by root, but gives access
     denied error messages to an ordinary user, suspect this as the
     cause.



     Warning: A program with setuid as root may pose a security risk to
     your system. The program runs with root privileges and thus has the
     potential for doing significant damage. Make certain that you know
     what the program does, by looking at the source if possible, before
     setting the setuid bit.



  7.3.  Tweaking and fine tuning


  You may wish to examine the Makefile to make certain that the best
  compilation options for your system are invoked. For example, setting
  the -O2 flag chooses the highest level of optimization and the -fomit-
  frame-pointer flag results in a smaller binary (though debugging will
  then be disabled). Do not play around with this unless you know what
  you are doing, and in any case, not until after a trial build works.

  7.4.  Where to go for more help


  In my experience, perhaps 25% of applications build "right out of the
  box". Another 50% or so can be "persuaded" to build with an effort
  ranging from trivial to herculean. That still means a significant
  number of packages will not build no matter what. Even then, the Intel
  ELF and/or a.out binaries for these might possibly be found at Sunsite
  or the TSX-11 archive.  Red Hat <http://redhat.com> and Debian
  <http://www.debian.org> have extensive archives of prepackaged
  binaries of most of the popular Linux software.  Perhaps the author of
  the software can supply the binaries compiled for your particular
  flavor of machine.


  Note that if you obtain precompiled binaries, you will need to check
  for compatibility with your system:

  o  The binaries must run on your hardware (i.e., Intel x86).

  o  The binaries must be compatible with your kernel (i.e., a.out or
     ELF).

  o  Your libraries must be up to date.

  o  Your system must have the appropriate installation utility (rpm or
     deb).

  If all else fails, you may find help in the appropriate newsgroups,
  such as comp.os.linux.x or comp.os.linux.development.

  If nothing at all works, at least you gave it your best effort, and
  you learned a lot.



  8.  Final Steps

  Read the software package documentation to determine whether certain
  environmental variables need setting (in .bashrc or .cshrc) and if the
  .Xdefaults and .Xresources files need customizing.

  There may be an applications default file, usually named Xfoo.ad in
  the original Xfoo distribution. If so, edit the Xfoo.ad file to
  customize it for your machine, then rename (mv) it Xfoo and install it
  in the /usr/lib/X11/app-defaults directory, as root.  Failure to do
  this may cause the software to behave strangely or even refuse to run.

  Most software packages come with one or more preformatted man pages.
  As root, copy the Xfoo.man file to the appropriate /usr/man,
  /usr/local/man, or /usr/X11R6/man directory (man1 - man9), and rename
  it accordingly.  For example, if Xfoo.man ends up in /usr/man/man4, it
  should be renamed Xfoo.4 (mv Xfoo.man Xfoo.4).  By convention, user
  commands go in man1, games in man6, and administration packages in
  man8 (see the man docs for more details).  Of course, you may deviate
  from this on your own system, if you like.

  A few packages will not install the binaries in the appropriate system
  directories, that is, they are missing the install option in the
  Makefile. Should this be the case, you can install the binaries
  manually by copying the binaries to the appropriate system directory,
  /usr/bin, /usr/local/bin or /usr/X11R6/bin, as root, of course. Note
  that /usr/local/bin is the preferred directory for binaries that are
  not part of the Linux distribution's base install.

  Some or all of the above procedures should, in most cases, be handled
  automatically by a make install, and possibly a make install.man or
  make install_man. If so, the README or INSTALL doc file will specify
  this.



  9.  First Example: Xscrabble

  Matt Chapman's Xscrabble seemed like a program that would be
  interesting to have, since I happen to be an avid ScrabbleTM player. I
  downloaded it, uncompressed it,  and built it following the procedure
  in the README file:


            xmkmf
            make Makefiles
            make includes
            make



  Of course it did not work...



       gcc -o xscrab -O2 -O -L/usr/X11R6/lib
       init.o xinit.o misc.o moves.o cmove.o main.o xutils.o mess.o popup.o
       widgets.o display.o user.o CircPerc.o
       -lXaw -lXmu -lXExExt -lXext -lX11 -lXt -lSM -lICE -lXExExt -lXext -lX11
       -lXpm -L../Xc -lXc

       BarGraf.o(.text+0xe7): undefined reference to `XtAddConverter'
       BarGraf.o(.text+0x29a): undefined reference to `XSetClipMask'
       BarGraf.o(.text+0x2ff): undefined reference to `XSetClipRectangles'
       BarGraf.o(.text+0x375): undefined reference to `XDrawString'
       BarGraf.o(.text+0x3e7): undefined reference to `XDrawLine'
       etc.
       etc.
       etc...



  I enquired about this in the comp.os.linux.x newsgroup, and someone
  kindly pointed out that apparently the Xt, Xaw, Xmu, and X11 libs were
  not being found at the link stage. Hmmm...

  There were two main Makefiles, and the one in the src directory caught
  my interest. One line in the Makefile defined LOCAL_LIBS as:
  LOCAL_LIBS = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) Here were
  references to the libs not being found by the linker.

  Looking for the next reference to LOCAL_LIBS, I saw on line 495 of
  that Makefile:


             $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBS) $(LDLIBS)
       $(EXTRA_LOAD_FLAGS)



  Now what were these LDLIBS?


             LDLIBS = $(LDPOSTLIB) $(THREADS_LIBS) $(SYS_LIBRARIES)
       $(EXTRA_LIBRARIES)



  The SYS_LIBRARIES were:


        SYS_LIBRARIES = -lXpm -L../Xc -lXc



  Yes! Here were the missing libraries.

  Possibly the linker needed to see the LDLIBS before the LOCAL_LIBS...
  So, the first thing to try was to modify the Makefile by transposing
  the $(LOCAL_LIBS) and $(LDLIBS) on line 495, so it would now read:


               $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LDLIBS) $(LOCAL_LIBS)
       $(EXTRA_LOAD_FLAGS)                          ^^^^^^^^^^^^^^^^^^^^^^^



  I tried running make again with the above change, and lo and behold,
  it worked this time. Of course,  Xscrabble still needed some fine
  tuning and twiddling, such as renaming the dictionary and commenting
  out some assert statements in one of the source files, but since then
  it has provided me with many hours of pleasure.



  [Note that a newer version of Xscrabble is now available in rpm
  format, and this installs without problems.]



  You may e-mail Matt Chapman <mailto:matt@belgarath.demon.co.uk>, and
  download Xscrabble from his home page
  <http://www.belgarath.demon.co.uk/programs/index.html>.



              Scrabble is a registered trademark of the Milton Bradley Co., Inc.



  10.  Second Example: Xloadimage

  This example poses an easier problem. The xloadimage program seemed a
  useful addition to my set of graphic tools.  I copied the xloadi41.gz
  file directly from the source directory on the CD included with the
  excellent ``X User Tools'' book, by Mui and Quercia. As expected, tar
  xzvf unarchives the files.  The make, however, produces a nasty-
  looking error and terminates.



       gcc -c -O -fstrength-reduce -finline-functions -fforce-mem
       -fforce-addr -DSYSV  -I/usr/X11R6/include
       -DSYSPATHFILE=\"/usr/lib/X11/Xloadimage\" mcidas.c

       In file included from /usr/include/stdlib.h:32,
                        from image.h:23,
                        from xloadimage.h:15,
                        from mcidas.c:7:
       /usr/lib/gcc-lib/i486-linux/2.6.3/include/stddef.h:215:
       conflicting types for `wchar_t'
       /usr/X11R6/include/X11/Xlib.h:74: previous declaration of
       `wchar_t'
       make[1]: *** [mcidas.o] Error 1
       make[1]: Leaving directory
       `/home/thegrendel/tst/xloadimage.4.1'
       make: *** [default] Error 2



  The error message contains the essential clue.

  Looking at the file image.h, line 23...


              #include <stdlib.h>



  Aha, somewhere in the source for xloadimage, wchar_t has been
  redefined from what was specified in the standard include file,
  stdlib.h. Let us first try commenting out line 23 in image.h, as
  perhaps the stdlib.h include is not, after all, necessary.

  At this point, the build proceeds without any fatal errors. The
  xloadimage package functions correctly now.



  11.  Third Example: Fortune

  This example requires some knowledge of C programming. The majority of
  UNIX/Linux software is written in C, and learning at least a little
  bit of C would certainly be an asset for anyone serious about software
  installation.

  The notorious fortune program displays up a humorous saying, a
  "fortune cookie", every time Linux boots up. Unfortunately (pun
  intended), attempting to build fortune on a Red Hat distribution with
  a 2.0.30 kernel generates fatal errors.



  ~/fortune# make all


  gcc -O2 -Wall -fomit-frame-pointer -pipe   -c fortune.c -o
  fortune.o
  fortune.c: In function `add_dir':
  fortune.c:551: structure has no member named `d_namlen'
  fortune.c:553: structure has no member named `d_namlen'
  make[1]: *** [fortune.o] Error 1
  make[1]: Leaving directory `/home/thegrendel/for/fortune/fortune'
  make: *** [fortune-bin] Error 2



  Looking at fortune.c, the pertinent lines are these.



          if (dirent->d_namlen == 0)
                   continue;
               name = copy(dirent->d_name, dirent->d_namlen);



  We need to find the structure dirent, but it is not declared in the
  fortune.c file, nor does a grep dirent show it in any of the other
  source files. However, at the top of fortune.c, there is the following
  line.



       #include <dirent.h>



  This appears to be a system library include file, therefore, the
  logical place to look for dirent.h is in /usr/include.  Indeed, there
  does exist a dirent.h file in /usr/include, but that file does not
  contain the declaration of the dirent structure.  There is, however, a
  reference to another dirent.h file.



       #include <linux/dirent.h>



  At last, going to /usr/include/linux/dirent.h, we find the structure
  declaration we need.



  struct dirent {
          long            d_ino;
          __kernel_off_t  d_off;
          unsigned short  d_reclen;
          char            d_name[256]; /* We must not include
  limits.h! */
  };



  Sure enough, the structure declaration contains no d_namelen, but
  there are a couple of "candidates" for its equivalent. The most likely
  of these is d_reclen, since this structure member probably represents
  the length of something and it is a short integer.  The other
  possibility, d_ino, could be an inode number, judging by its name and
  type. As a matter of fact, we are probably dealing with a "directory
  entry" structure, and these elements represent attributes of a file,
  its name, inode, and length (in blocks).  This would seem to validate
  our guess.

  Let us edit the file fortune.c, and change the two d_namelen
  references in lines 551 and 553 to d_reclen.  Try a make all again.
  Success. It builds without errors. We can now get our "cheap thrills"
  from fortune.



  12.  Fourth Example: Hearts


  Here is the hoary old game of Hearts, written for UNIX systems by Bob
  Ankeney sometime in the '80's, revised in 1992 by Mike Yang, and
  currently maintained by Jonathan Badger
  <mailto:badger@phylo.life.uiuc.edu>. Its predecessor was an even older
  Pascal program by Don Backus of Oregon Software, later updated by Jeff
  Hemmerling. Originally intended as a multiplayer client, it also works
  well in single-player mode against computer opponents. The graphics
  are nice, though the game lacks sophisticated features and the
  computer players are not particularly strong. All the same, it seems
  to be the only decent Hearts game available for UNIX and Linux
  machines even at this late date.

  Due to its age and lineage, this package is particularly difficult to
  build on a Linux system. It requires solving a long and perplexing
  series of puzzles.  It is an exercise in patience and determination.

  Before beginning, make certain that you have either the motif or
  lesstif libraries installed.


  o

  xmkmf

  make



  client.c: In function `read_card':
  client.c:430: `_tty' undeclared (first use in this function)
  client.c:430: (Each undeclared identifier is reported only once
  client.c:430: for each function it appears in.)
  client.c: In function `scan':
  client.c:685: `_tty' undeclared (first use in this function)
  make: *** [client.o] Error 1



  These are the culprits in the file client.c:



       #ifndef SYSV
               (buf[2] != _tty.sg_erase) && (buf[2] != _tty.sg_kill)) {
        #else
               (buf[2] != CERASE) && (buf[2] != CKILL)) {
       #endif



  o

  In client.c, add


       #define SYSV



  at line 39. This will bypass the reference to _tty.

  make



       client.c:41: sys/termio.h: No such file or directory
       make: *** [client.o] Error 1



  o

  The include file termio.h is in the /usr/include directory on a Linux
  system, rather than the /usr/include/sys one, as was the case on older
  UNIX machines.  Therefore, change line 41 of client.c from


       #include <sys/termio.h>



  to
       #include <termio.h>



  make



       gcc -o hearts -g      -L/usr/X11R6/lib client.o hearts.o select.o connect.o
       sockio.o start_dist.o  -lcurses -ltermlib
       /usr/bin/ld: cannot open -ltermlib: No such file or directory
       collect2: ld returned 1 exit status
       make: *** [hearts] Error 1



  o

  Modern Linux distributions use the terminfo and/or termcap database,
  rather than the obsolete termlib one.

  Edit the Makefile.

  Line 655:


       CURSES_LIBRARIES = -lcurses -ltermlib



  changes to:


       CURSES_LIBRARIES = -lcurses -ltermcap



  make



       gcc -o xmhearts -g      -L/usr/X11R6/lib xmclient.o hearts.o select.o
       connect.o sockio.o start_dist.o gfx.o  -lXm_s -lXt -lSM -lICE -lXext -lX11
       -lPW
       /usr/bin/ld: cannot open -lXm_s: No such file or directory
       collect2: ld returned 1 exit status



  o

  The main lesstif library is libXm, rather than libXm_s. Therefore,
  edit the Makefile.

  In line 653:


       XMLIB = -lXm_s $(XTOOLLIB) $(XLIB) -lPW



  changes to:


       XMLIB = -lXm $(XTOOLLIB) $(XLIB) -lPW



  make



       gcc -o xmhearts -g      -L/usr/X11R6/lib xmclient.o hearts.o select.o
       connect.o sockio.o start_dist.o gfx.o  -lXm -lXt -lSM -lICE -lXext -lX11 -lPW
       /usr/bin/ld: cannot open -lPW: No such file or directory
       collect2: ld returned 1 exit status
       make: *** [xmhearts] Error 1



  o

  Round up the usual suspects.

  There is no PW library.  Edit the Makefile.

  Line 653:


       XMLIB = -lXm $(XTOOLLIB) $(XLIB) -lPW



  changes to:


       XMLIB = -lXm $(XTOOLLIB) $(XLIB) -lPEX5



  (The PEX5 lib comes closest to PW.)


  make



  rm -f xmhearts
  gcc -o xmhearts -g      -L/usr/X11R6/lib xmclient.o hearts.o select.o
  connect.o sockio.o start_dist.o gfx.o  -lXm -lXt -lSM -lICE -lXext -lX11 -lPEX5



  The make finally works (hurray!).



  o

  Installation:

  As root,



       [root@localhost hearts]# make install
       install -c -s  hearts /usr/X11R6/bin/hearts
       install -c -s  xmhearts /usr/X11R6/bin/xmhearts
       install -c -s  xawhearts /usr/X11R6/bin/xawhearts
       install in . done



  o

  Test run:

  rehash

  (We're running the tcsh shell.)

  xmhearts



       localhost:~/% xmhearts
       Can't invoke distributor!



  o

  From README file in the hearts package:



            Put heartsd, hearts_dist, and hearts.instr in the HEARTSLIB
            directory defined in local.h and make them world-accessible.



  From the file local.h:



       /* where the distributor, dealer and instructions live */

       #define HEARTSLIB "/usr/local/lib/hearts"



  This is a classic case of RTFM.


  As root,

  cd /usr/local/lib

  mkdir hearts

  cd !$

  Copy the distributor files to this directory.

  cp /home/username/hearts/heartsd .

  cp /home/username/hearts/hearts_dist .

  cp /home/username/hearts/hearts.instr .



  o

  Try another test run.

  xmhearts

  It works some of the time, but more often than not crashes with a
  dealer died! message.



  o

  The "distributor" and "dealer" scan the hardware ports. We should thus
  suspect that those programs need root user privileges.

  Try, as root,

  chmod u+s /usr/local/lib/heartsd

  chmod u+s /usr/local/lib/hearts_dist

  (Note that, as previously discussed, suid binaries may create security
  holes.)

  xmhearts


  It finally works!



  Hearts is available from Sunsite.



  13.  Fifth Example: XmDipmon



       Bullwinkle: Hey Rocky, watch me pull a rabbit out of my hat.
       Rocky:      But that trick never works.
       Bullwinkle: This time for sure.
                   Presto!
                   Well, I'm gettin' close.
       Rocky:      And now it's time for another special feature.
                   --- "Rocky and His Friends"



  XmDipmon is a nifty little application that displays a button showing
  the status of an Internet connection. It flashes and beeps when the
  connection is broken, as is all too often the case in on rural
  telephone systems.  Unfortunately, XmDipmon works only with dip,
  making it useless for those people, the majority, who use chat to
  connect.

  Building XmDipmon is not a problem.  XmDipmon links to the Motif
  libraries, but it builds and works fine with Lesstif. The challenge is
  to alter the package to work when using chat. This involves actually
  tinkering with the source code, and necessarily requires some
  programming knowledge.



               "When xmdipmon starts up, it checks for a file called /etc/dip.pid
                (you can let it look at another file by using the -pidfile
                command line option).  This file contains the PID of the dip
                deamon (dip switches itself into deamon mode once it has
                established a connection)."
                              --- from the XmDipmon README file



  Using the -pidfile option, the program can be directed to check for a
  different file upon startup, one that exists only during a successful
  chat login.  The obvious candidate is the modem lock file. We could
  therefore try invoking the program with xmdipmon -pidfile
  /var/lock/LCK..ttyS3 (this assumes that the modem is on com port #4,
  ttyS3). This only solves part of the problem, however. The program
  continually monitors the dip daemon, and we need to change this so it
  instead polls a process associated with chat or ppp.

  There is only a single source file, and fortunately it is well-
  commented. Scanning the xmdipmon.c file, we find the getProcFile
  function, whose header description reads as follows.



  /*****
  * Name:                 getProcFile
  * Return Type:  Boolean
  * Description:  tries to open the /proc entry as read from the dip pid file.
  <snip>
  *****/



  We are hot on the trail now. Tracing into the body of the function...



                               /* we watch the status of the real dip deamon */
                               sprintf(buf, "/proc/%i/status", pid);
                               procfile = (String)XtMalloc(strlen(buf)*sizeof(char)+1);
                               strcpy(procfile, buf);
                               procfile[strlen(buf)] = '\0';



  The culprit is line 2383:


                               sprintf(buf, "/proc/%i/status", pid);
                                             ^^^^^^^^^^^^^^^^^^^^^



  This checks whether the dip daemon process is running . So, how can we
  change this to monitor the pppd daemon instead?

  Looking at the pppd manpage:


       FILES
              /var/run/pppn.pid (BSD or Linux), /etc/ppp/pppn.pid (others)
                            Process-ID for pppd process on ppp interface unit n.



  Change line 2383 in xmdipmon.c to:


                               sprintf(buf, "/var/run/ppp0.pid" );



  Rebuild the revised package. No problems with the build. Now test it
  with the new command line argument. It works like a charm. The little
  blue button indicates when a ppp connection to the ISP has been
  established, and flashes and beeps when the connection is broken.  Now
  we have a fully functional chat monitor.


  XmDipmon can be downloaded from Ripley Linux Tools.



  14.  Where to Find Source Archives

  Now that you are eager to use your newly acquired knowledge to add
  utilities and other goodies to your system, you may find them online
  at the Linux Applications and Utilities Page
  <http://www.redhat.com/linux-info/linux-app-list/linapps.html>, or on
  one of the very reasonably priced CD ROM archives by Red Hat
  <http://www.redhat.com/>, InfoMagic <http://www.infomagic.com>, Linux
  Systems Labs <http://www.lsl.com>, Cheap Bytes
  <http://www.cheapbytes.com>, and others.

  A comprehensive repository of source code is the comp sources UNIX
  archive.

  Much UNIX source code is posted on the alt.sources newsgroup. If you
  are looking for particular source code packages, you may post on the
  related alt.sources.wanted newsgroup.  Another good place to check is
  the comp.os.linux.announce newsgroup.  To get on the Unix sources
  mailing list, send a subscribe message there.

  Archives for the alt.sources newsgroup are at the following ftp sites:


  o  ftp.sterling.com/usenet/alt.sources/

  o  wuarchive.wustl.edu/usenet/alt.sources/articles

  o  src.doc.ic.ac.uk/usenet/alt.sources/articles



  15.  Final Words

  To sum up, persistence makes all the difference  (and a high
  frustration threshold certainly helps). As in all endeavors, learning
  from mistakes is critically important.  Each misstep, every failure
  contributes to the body of knowledge that will lead to mastery of the
  art of building software.



  16.  References and Further Reading



  BORLAND C++ TOOLS AND UTILITIES GUIDE, Borland International, 1992,
  pp. 9-42.
  [One of the manuals distributed with Borland C++, ver. 3.1. Gives
  a fairly good intro to make syntax and concepts, using Borland's
  crippled implementation for DOS.]

  DuBois, Paul: SOFTWARE PORTABILITY WITH IMAKE, O'Reilly and Associates,
  1996, ISBN 1-56592-226-3.
  [This is reputed to be the definitive imake reference, though I did not
  have it available when writing this article.]

  Frisch, Aeleen: ESSENTIAL SYSTEM ADMINISTRATION (2nd ed.), O'Reilly and
  Associates, 1995, ISBN 1-56592-127-5.
  [This otherwise excellent sys admin handbook has only sketchy coverage
  of software building.]

  Hekman, Jessica: LINUX IN A NUTSHELL, O'Reilly and Associates, 1997, ISBN
  1-56592-167-4.
  [Good all-around reference to Linux commands.]

  Lehey, Greg: PORTING UNIX SOFTWARE, O'Reilly and Associates, 1995, ISBN
  1-56592-126-7.

  Mayer, Herbert G.: ADVANCED C PROGRAMMING ON THE IBM PC, Windcrest Books,
  1989, ISBN 0-8306-9363-7.
  [An idea-filled book for the intermediate to advanced C programmer.
  Superb coverage of algorithms, quirks of the language, and even
  amusements.  Unfortunately, out of print.]

  Mui, Linda and Valerie Quercia: X USER TOOLS, O'Reilly and Associates,
  1994, ISBN 1-56592-019-8, pp. 734-760.

  Oram, Andrew and Steve Talbott: MANAGING PROJECTS WITH MAKE, O'Reilly
  and Associates, 1991, ISBN 0-937175-90-0.

  Peek, Jerry and Tim O'Reilly and Mike Loukides: UNIX POWER TOOLS,
  O'Reilly and Associates / Random House, 1997, ISBN 1-56592-260-3.
  [A wonderful source of ideas, and tons of utilities you may end up
  building from the source code, using the methods discussed in
  this article.]

  Stallman, Richard M. and Roland McGrath: GNU MAKE, Free Software
  Foundation, 1995, ISBN 1-882114-78-7.
  [Required reading.]

  Waite, Mitchell, Stephen Prata, and Donald Martin: C PRIMER PLUS, Waite Group
  Press, ISBN 0-672-22090-3,.
  [Probably the best of the introductions to C programming.  Extensive
  coverage for a primer.  Newer editions now available.]

  Welsh, Matt and Lar Kaufman: RUNNING LINUX, O'Reilly and Associates,
  1996, ISBN 1-56592-151-8.
  [Still the best overall Linux reference, though lacking in depth
  in some areas.]


  The man pages for dpkg, gcc, gzip, imake, ldconfig, ldd, make, nm, patch,
  rpm, shar, strip, tar, termcap, terminfo, and xmkmf.


  The BZIP2 HOWTO, by David Fetter.

  The Glibc2 HOWTO, by Eric Green

  The LINUX ELF HOWTO, by Daniel Barlow.

  The RPM HOWTO, by Donnie Barnes.

  The StarOffice miniHOWTO, by Matthew Borowski.



  [These HOWTOs should be in the /usr/doc/HOWTO  or /usr/doc/HOWTO/mini
  directory on your system. Updated versions are available in text,
  HTML, and SGML format from the LDP site
  <http://metalab.unc.edu/LDP/HOWTO>, and usually from the respective
  authors' home sites.]



  17.  Credits


  The author of this HOWTO would like to thank the following persons for
  their helpful suggestions, corrections, and encouragement.


  o  R. Brock Lynn

  o  Michael Jenner

  o  Fabrizio Stefani

  Kudos also go to the fine people who have translated this HOWTO into
  Italian and Japanese.

  And, of course, thanks, praise, benedictions and hosannahs to Greg
  Hankins and Tim Bynum of the Linux Documentation Project
  <http://metalab.unc.edu/LDP/>, which has made all this possible.



  Software-RAID HOWTO
  Linas Vepstas, linas@linas.org
  v0.54, 21 November 1998

  RAID stands for ''Redundant Array of Inexpensive Disks'', and is meant
  to be a way of creating a fast and reliable disk-drive subsystem out
  of individual disks.  RAID can guard against disk failure, and can
  also improve performance over that of a single disk drive.  This docu-
  ment is a tutorial/HOWTO/FAQ for users of the Linux MD kernel exten-
  sion, the associated tools, and their use.  The MD extension imple-
  ments RAID-0 (striping), RAID-1 (mirroring), RAID-4 and RAID-5 in
  software. That is, with MD, no special hardware or disk controllers
  are required to get many of the benefits of RAID.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Understanding RAID

  3. Setup & Installation Considerations

  4. Error Recovery

  5. Troubleshooting Install Problems

  6. Supported Hardware & Software

  7. Modifying an Existing Installation

  8. Performance, Tools & General Bone-headed Questions

  9. High Availability RAID

  10. Questions Waiting for Answers

  11. Wish List of Enhancements to MD and Related Software



  ______________________________________________________________________


     Preamble
        This document is copyrighted and GPL'ed by Linas Vepstas
        (linas@linas.org).  Permission to use, copy, distribute this
        document for any purpose is hereby granted, provided that the
        author's / editor's name and this notice appear in all copies
        and/or supporting documents; and that an unmodified version of
        this document is made freely available.  This document is
        distributed in the hope that it will be useful, but WITHOUT ANY
        WARRANTY, either expressed or implied.  While every effort has
        been taken to ensure the accuracy of the information documented
        herein, the author / editor / maintainer assumes NO
        RESPONSIBILITY for any errors, or for any damages, direct or
        consequential, as a result of the use of the information
        documented herein.


        RAID, although designed to improve system reliability by adding
        redundancy, can also lead to a false sense of security and
        confidence when used improperly.  This false confidence can lead
        to even greater disasters.  In particular, note that RAID is
        designed to protect against *disk* failures, and not against
        *power* failures or *operator* mistakes.  Power failures, buggy
        development kernels, or operator/admin errors can lead to
        damaged data that it is not recoverable!  RAID is *not* a
        substitute for proper backup of your system.  Know what you are
        doing, test, be knowledgeable and aware!

  1.  Introduction


  1. Q: What is RAID?

       A: RAID stands for "Redundant Array of Inexpensive Disks",
       and is meant to be a way of creating a fast and reliable
       disk-drive subsystem out of individual disks.  In the PC
       world, "I" has come to stand for "Independent", where mar-
       keting forces continue to differentiate IDE and SCSI.  In
       it's original meaning, "I" meant "Inexpensive as compared to
       refrigerator-sized mainframe 3380 DASD", monster drives
       which made nice houses look cheap, and diamond rings look
       like trinkets.



  2. Q: What is this document?

       A: This document is a tutorial/HOWTO/FAQ for users of the
       Linux MD kernel extension, the associated tools, and their
       use.  The MD extension implements RAID-0 (striping), RAID-1
       (mirroring), RAID-4 and RAID-5 in software.   That is, with
       MD, no special hardware or disk controllers are required to
       get many of the benefits of RAID.


       This document is NOT an introduction to RAID; you must find
       this elsewhere.



  3. Q: What levels of RAID does the Linux kernel implement?

       A: Striping (RAID-0) and linear concatenation are a part of
       the stock 2.x series of kernels.  This code is of production
       quality; it is well understood and well maintained.  It is
       being used in some very large USENET news servers.


       RAID-1, RAID-4 & RAID-5 are a part of the 2.1.63 and greater
       kernels.  For earlier 2.0.x and 2.1.x kernels, patches exist
       that will provide this function.  Don't feel obligated to
       upgrade to 2.1.63; upgrading the kernel is hard; it is
       *much* easier to patch an earlier kernel.  Most of the RAID
       user community is running 2.0.x kernels, and that's where
       most of the historic RAID development has focused.   The
       current snapshots should be considered near-production
       quality; that is, there are no known bugs but there are some
       rough edges and untested system setups.  There are a large
       number of people using Software RAID in a production
       environment.


       RAID-1 hot reconstruction has been recently introduced
       (August 1997) and should be considered alpha quality.
       RAID-5 hot reconstruction will be alpha quality any day now.


  A word of caution about the 2.1.x development kernels: these
  are less than stable in a variety of ways.  Some of the
  newer disk controllers (e.g. the Promise Ultra's) are
  supported only in the 2.1.x kernels.  However, the 2.1.x
  kernels have seen frequent changes in the block device
  driver, in the DMA and interrupt code, in the PCI, IDE and
  SCSI code, and in the disk controller drivers.  The
  combination of these factors, coupled to cheapo hard drives
  and/or low-quality ribbon cables can lead to considerable
  heartbreak.   The ckraid tool, as well as fsck and mount put
  considerable stress on the RAID subsystem.  This can lead to
  hard lockups during boot, where even the magic alt-SysReq
  key sequence won't save the day.  Use caution with the 2.1.x
  kernels, and expect trouble.  Or stick to the 2.0.34 kernel.



  4. Q: I'm running an older kernel. Where do I get patches?

       A: Software RAID-0 and linear mode are a stock part of all
       current Linux kernels.  Patches for Software RAID-1,4,5 are
       available from
       <http://luthien.nuclecu.unam.mx/~miguel/raid>.  See also the
       quasi-mirror <ftp://linux.kernel.org/pub/linux/dae-
       mons/raid/> for patches, tools and other goodies.



  5. Q: Are there other Linux RAID references?

       A:

       o  Generic RAID overview:
          <http://www.dpt.com/uraiddoc.html>.

       o  General Linux RAID options:
          <http://linas.org/linux/raid.html>.

       o  Latest version of this document:
          <http://linas.org/linux/Software-RAID/Software-
          RAID.html>.

       o  Linux-RAID mailing list archive:
          <http://www.linuxhq.com/lnxlists/>.

       o  Linux Software RAID Home Page:
          <http://luthien.nuclecu.unam.mx/~miguel/raid>.

       o  Linux Software RAID tools:
          <ftp://linux.kernel.org/pub/linux/daemons/raid/>.

       o  How to setting up linear/stripped Software RAID:
          <http://www.ssc.com/lg/issue17/raid.html>.

       o  Bootable RAID mini-HOWTO:
          <ftp://ftp.bizsystems.com/pub/raid/bootable-raid>.

       o  Root RAID HOWTO: <ftp://ftp.bizsystems.com/pub/raid/Root-
          RAID-HOWTO>.

       o  Linux RAID-Geschichten:
          <http://www.infodrom.north.de/~joey/Linux/raid/>.



  6. Q: Who do I blame for this document?

       A: Linas Vepstas slapped this thing together.  However, most
       of the information, and some of the words were supplied by

       o  Bradley Ward Allen <ulmo@Q.Net>

       o  Luca Berra <bluca@comedia.it>

       o  Brian Candler <B.Candler@pobox.com>

       o  Bohumil Chalupa <bochal@apollo.karlov.mff.cuni.cz>

       o  Rob Hagopian <hagopiar@vu.union.edu>

       o  Anton Hristozov <anton@intransco.com>

       o  Miguel de Icaza <miguel@luthien.nuclecu.unam.mx>

       o  Marco Meloni <tonno@stud.unipg.it>

       o  Ingo Molnar <mingo@pc7537.hil.siemens.at>

       o  Alvin Oga <alvin@planet.fef.com>

       o  Gadi Oxman <gadio@netvision.net.il>

       o  Vaughan Pratt <pratt@cs.Stanford.EDU>

       o  Steven A. Reisman <sar@pressenter.com>

       o  Michael Robinton <michael@bzs.org>

       o  Martin Schulze <joey@finlandia.infodrom.north.de>

       o  Geoff Thompson <geofft@cs.waikato.ac.nz>

       o  Edward Welbon <welbon@bga.com>

       o  Rod Wilkens <rwilkens@border.net>

       o  Johan Wiltink <j.m.wiltink@pi.net>

       o  Leonard N. Zubkoff <lnz@dandelion.com>

       o  Marc ZYNGIER <zyngier@ufr-info-p7.ibp.fr>


          Copyrights

       o  Copyright (C) 1994-96 Marc ZYNGIER

       o  Copyright (C) 1997 Gadi Oxman, Ingo Molnar, Miguel de
          Icaza

       o  Copyright (C) 1997, 1998 Linas Vepstas

       o  By copyright law, additional copyrights are implicitly
          held by the contributors listed above.

          Thanks all for being there!



  2.  Understanding RAID


  1. Q: What is RAID?  Why would I ever use it?

       A: RAID is a way of combining multiple disk drives into a
       single entity to improve performance and/or reliability.
       There are a variety of different types and implementations
       of RAID, each with its own advantages and disadvantages.
       For example, by putting a copy of the same data on two disks
       (called disk mirroring, or RAID level 1), read performance
       can be improved by reading alternately from each disk in the
       mirror.  On average, each disk is less busy, as it is han-
       dling only 1/2 the reads (for two disks), or 1/3 (for three
       disks), etc.  In addition, a mirror can improve reliability:
       if one disk fails, the other disk(s) have a copy of the
       data.  Different ways of combining the disks into one,
       referred to as RAID levels,  can provide greater storage
       efficiency than simple mirroring, or can alter latency
       (access-time) performance, or throughput (transfer rate)
       performance, for reading or writing, while still retaining
       redundancy that is useful for guarding against failures.

       Although RAID can protect against disk failure, it does not
       protect against operator and administrator (human) error, or
       against loss due to programming bugs (possibly due to bugs
       in the RAID software itself).  The net abounds with tragic
       tales of system administrators who have bungled a RAID
       installation, and have lost all of their data.  RAID is not
       a substitute for frequent, regularly scheduled backup.

       RAID can be implemented in hardware, in the form of special
       disk controllers, or in software, as a kernel module that is
       layered in between the low-level disk driver, and the file
       system which sits above it.  RAID hardware is always a "disk
       controller", that is, a device to which one can cable up the
       disk drives. Usually it comes in the form of an adapter card
       that will plug into a ISA/EISA/PCI/S-Bus/MicroChannel slot.
       However, some RAID controllers are in the form of a box that
       connects into the cable in between the usual system disk
       controller, and the disk drives.  Small ones may fit into a
       drive bay; large ones may be built into a storage cabinet
       with its own drive bays and power supply.  The latest RAID
       hardware used with the latest & fastest CPU will usually
       provide the best overall performance, although at a
       significant price.  This is because most RAID controllers
       come with on-board DSP's and memory cache that can off-load
       a considerable amount of processing from the main CPU, as
       well as allow high transfer rates into the large controller
       cache.  Old RAID hardware can act as a "de-accelerator" when
       used with newer CPU's: yesterday's fancy DSP and cache can
       act as a bottleneck, and it's performance is often beaten by
       pure-software RAID and new but otherwise plain, run-of-the-
       mill disk controllers.  RAID hardware can offer an advantage
       over pure-software RAID, if it can makes use of disk-spindle
       synchronization and its knowledge of the disk-platter
       position with regard to the disk head, and the desired disk-
       block.  However, most modern (low-cost) disk drives do not
       offer this information and level of control anyway, and
       thus, most RAID hardware does not take advantage of it.
       RAID hardware is usually not compatible across different
       brands, makes and models: if a RAID controller fails, it
       must be replaced by another controller of the same type.  As
       of this writing (June 1998), a broad variety of hardware
       controllers will operate under Linux; however, none of them
       currently come with configuration and management utilities
  that run under Linux.

  Software-RAID is a set of kernel modules, together with
  management utilities that implement RAID purely in software,
  and require no extraordinary hardware.  The Linux RAID
  subsystem is implemented as a layer in the kernel that sits
  above the low-level disk drivers (for IDE, SCSI and Paraport
  drives), and the block-device interface.  The filesystem, be
  it ext2fs, DOS-FAT, or other, sits above the block-device
  interface.  Software-RAID, by its very software nature,
  tends to be more flexible than a hardware solution.  The
  downside is that it of course requires more CPU cycles and
  power to run well than a comparable hardware system.  Of
  course, the cost can't be beat.  Software RAID has one
  further important distinguishing feature: it operates on a
  partition-by-partition basis, where a number of individual
  disk partitions are ganged together to create a RAID
  partition.  This is in contrast to most hardware RAID
  solutions, which gang together entire disk drives into an
  array.  With hardware, the fact that there is a RAID array
  is transparent to the operating system, which tends to
  simplify management.  With software, there are far more
  configuration options and choices, tending to complicate
  matters.

  As of this writing (June 1998), the administration of RAID
  under Linux is far from trivial, and is best attempted by
  experienced system administrators.  The theory of operation
  is complex.  The system tools require modification to
  startup scripts.  And recovery from disk failure is non-
  trivial, and prone to human error.   RAID is not for the
  novice, and any benefits it may bring to reliability and
  performance can be easily outweighed by the extra
  complexity.  Indeed, modern disk drives are incredibly
  reliable and modern CPU's and controllers are quite
  powerful.  You might more easily obtain the desired
  reliability and performance levels by purchasing higher-
  quality and/or faster hardware.



  2. Q: What are RAID levels?  Why so many? What distinguishes them?

       A: The different RAID levels have different performance,
       redundancy, storage capacity, reliability and cost charac-
       teristics.   Most, but not all levels of RAID offer redun-
       dancy against disk failure.  Of those that offer redundancy,
       RAID-1 and RAID-5 are the most popular.  RAID-1 offers bet-
       ter performance, while RAID-5 provides for more efficient
       use of the available storage space.  However, tuning for
       performance is an entirely different matter, as performance
       depends strongly on a large variety of factors, from the
       type of application, to the sizes of stripes, blocks, and
       files.  The more difficult aspects of performance tuning are
       deferred to a later section of this HOWTO.

       The following describes the different RAID levels in the
       context of the Linux software RAID implementation.


       o  RAID-linear is a simple concatenation of partitions to
          create a larger virtual partition.  It is handy if you
          have a number small drives, and wish to create a single,
          large partition.  This concatenation offers no
          redundancy, and in fact decreases the overall
          reliability: if any one disk fails, the combined
     partition will fail.



  o  RAID-1 is also referred to as "mirroring".  Two (or more)
     partitions, all of the same size, each store an exact
     copy of all data, disk-block by disk-block.  Mirroring
     gives strong protection against disk failure: if one disk
     fails, there is another with the an exact copy of the
     same data. Mirroring can also help improve performance in
     I/O-laden systems, as read requests can be divided up
     between several disks.   Unfortunately, mirroring is also
     the least efficient in terms of storage: two mirrored
     partitions can store no more data than a single
     partition.



  o  Striping is the underlying concept behind all of the
     other RAID levels.  A stripe is a contiguous sequence of
     disk blocks.  A stripe may be as short as a single disk
     block, or may consist of thousands.  The RAID drivers
     split up their component disk partitions into stripes;
     the different RAID levels differ in how they organize the
     stripes, and what data they put in them. The interplay
     between the size of the stripes, the typical size of
     files in the file system, and their location on the disk
     is what determines the overall performance of the RAID
     subsystem.



  o  RAID-0 is much like RAID-linear, except that the
     component partitions are divided into stripes and then
     interleaved.  Like RAID-linear, the result is a single
     larger virtual partition.  Also like RAID-linear, it
     offers no redundancy, and therefore decreases overall
     reliability: a single disk failure will knock out the
     whole thing.  RAID-0 is often claimed to improve
     performance over the simpler RAID-linear.  However, this
     may or may not be true, depending on the characteristics
     to the file system, the typical size of the file as
     compared to the size of the stripe, and the type of
     workload.  The ext2fs file system already scatters files
     throughout a partition, in an effort to minimize
     fragmentation. Thus, at the simplest level, any given
     access may go to one of several disks, and thus, the
     interleaving of stripes across multiple disks offers no
     apparent additional advantage. However, there are
     performance differences, and they are data, workload, and
     stripe-size dependent.



  o  RAID-4 interleaves stripes like RAID-0, but it requires
     an additional partition to store parity information.  The
     parity is used to offer redundancy: if any one of the
     disks fail, the data on the remaining disks can be used
     to reconstruct the data that was on the failed disk.
     Given N data disks, and one parity disk, the parity
     stripe is computed by taking one stripe from each of the
     data disks, and XOR'ing them together.  Thus, the storage
     capacity of a an (N+1)-disk RAID-4 array is N, which is a
     lot better than mirroring (N+1) drives, and is almost as
     good as a RAID-0 setup for large N.  Note that for N=1,
     where there is one data drive, and one parity drive,
     RAID-4 is a lot like mirroring, in that each of the two
     disks is a copy of each other.  However, RAID-4 does NOT
     offer the read-performance of mirroring, and offers
     considerably degraded write performance. In brief, this
     is because updating the parity requires a read of the old
     parity, before the new parity can be calculated and
     written out.  In an environment with lots of writes, the
     parity disk can become a bottleneck, as each write must
     access the parity disk.



  o  RAID-5 avoids the write-bottleneck of RAID-4 by
     alternately storing the parity stripe on each of the
     drives.  However, write performance is still not as good
     as for mirroring, as the parity stripe must still be read
     and XOR'ed before it is written.  Read performance is
     also not as good as it is for mirroring, as, after all,
     there is only one copy of the data, not two or more.
     RAID-5's principle advantage over mirroring is that it
     offers redundancy and protection against single-drive
     failure, while offering far more storage capacity  when
     used with three or more drives.



  o  RAID-2 and RAID-3 are seldom used anymore, and to some
     degree are have been made obsolete by modern disk
     technology.  RAID-2 is similar to RAID-4, but stores ECC
     information instead of parity.  Since all modern disk
     drives incorporate ECC under the covers, this offers
     little additional protection.  RAID-2 can offer greater
     data consistency if power is lost during a write;
     however, battery backup and a clean shutdown can offer
     the same benefits.  RAID-3 is similar to RAID-4, except
     that it uses the smallest possible stripe size. As a
     result, any given read will involve all disks, making
     overlapping I/O requests difficult/impossible. In order
     to avoid delay due to rotational latency, RAID-3 requires
     that all disk drive spindles be synchronized. Most modern
     disk drives lack spindle-synchronization ability, or, if
     capable of it, lack the needed connectors, cables, and
     manufacturer documentation.  Neither RAID-2 nor RAID-3
     are supported by the Linux Software-RAID drivers.



  o  Other RAID levels have been defined by various
     researchers and vendors.  Many of these represent the
     layering of one type of raid on top of another.  Some
     require special hardware, and others are protected by
     patent. There is no commonly accepted naming scheme for
     these other levels. Sometime the advantages of these
     other systems are minor, or at least not apparent until
     the system is highly stressed.  Except for the layering
     of RAID-1 over RAID-0/linear, Linux Software RAID does
     not support any of the other variations.



  3.  Setup & Installation Considerations


  1. Q: What is the best way to configure Software RAID?


  A: I keep rediscovering that file-system planning is one of
  the more difficult Unix configuration tasks.  To answer your
  question, I can describe what we did.

  We planned the following setup:

  o  two EIDE disks, 2.1.gig each.


       disk partition mount pt.  size    device
         1      1       /        300M   /dev/hda1
         1      2       swap      64M   /dev/hda2
         1      3       /home    800M   /dev/hda3
         1      4       /var     900M   /dev/hda4

         2      1       /root    300M   /dev/hdc1
         2      2       swap      64M   /dev/hdc2
         2      3       /home    800M   /dev/hdc3
         2      4       /var     900M   /dev/hdc4



  o  Each disk is on a separate controller (& ribbon cable).
     The theory is that a controller failure and/or ribbon
     failure won't disable both disks.  Also, we might
     possibly get a performance boost from parallel operations
     over two controllers/cables.

  o  Install the Linux kernel on the root (/) partition
     /dev/hda1.  Mark this partition as bootable.

  o  /dev/hdc1 will contain a ``cold'' copy of /dev/hda1. This
     is NOT a raid copy, just a plain old copy-copy. It's
     there just in case the first disk fails; we can use a
     rescue disk, mark /dev/hdc1 as bootable, and use that to
     keep going without having to reinstall the system.  You
     may even want to put /dev/hdc1's copy of the kernel into
     LILO to simplify booting in case of failure.

     The theory here is that in case of severe failure, I can
     still boot the system without worrying about raid
     superblock-corruption or other raid failure modes &
     gotchas that I don't understand.

  o  /dev/hda3 and /dev/hdc3 will be mirrors /dev/md0.

  o  /dev/hda4 and /dev/hdc4 will be mirrors /dev/md1.

  o  we picked /var and /home to be mirrored, and in separate
     partitions, using the following logic:

  o  / (the root partition) will contain relatively static,
     non-changing data: for all practical purposes, it will be
     read-only without actually being marked & mounted read-
     only.

  o  /home will contain ''slowly'' changing data.

  o  /var will contain rapidly changing data, including mail
     spools, database contents and web server logs.

     The idea behind using multiple, distinct partitions is
     that if, for some bizarre reason, whether it is human
     error, power loss, or an operating system gone wild,
     corruption is limited to one partition.  In one typical
     case, power is lost while the system is writing to disk.
     This will almost certainly lead to a corrupted
     filesystem, which will be repaired by fsck during the
     next boot.  Although fsck does it's best to make the
     repairs without creating additional damage during those
     repairs, it can be comforting to know that any such
     damage has been limited to one partition.  In another
     typical case, the sysadmin makes a mistake during rescue
     operations, leading to erased or destroyed data.
     Partitions can help limit the repercussions of the
     operator's errors.

  o  Other reasonable choices for partitions might be /usr or
     /opt.  In fact, /opt and /home make great choices for
     RAID-5 partitions, if we had more disks.  A word of
     caution: DO NOT put /usr in a RAID-5 partition.  If a
     serious fault occurs, you may find that you cannot mount
     /usr, and that you want some of the tools on it (e.g. the
     networking tools, or the compiler.)  With RAID-1, if a
     fault has occurred, and you can't get RAID to work, you
     can at least mount one of the two mirrors.  You can't do
     this with any of the other RAID levels (RAID-5, striping,
     or linear append).



     So, to complete the answer to the question:

  o  install the OS on disk 1, partition 1.  do NOT mount any
     of the other partitions.

  o  install RAID per instructions.

  o  configure md0 and md1.

  o  convince yourself that you know what to do in case of a
     disk failure!  Discover sysadmin mistakes now, and not
     during an actual crisis.  Experiment!  (we turned off
     power during disk activity -- this proved to be ugly but
     informative).

  o  do some ugly mount/copy/unmount/rename/reboot scheme to
     move /var over to the /dev/md1.  Done carefully, this is
     not dangerous.

  o  enjoy!



  2. Q: What is the difference between the mdadd, mdrun, etc. commands,
     and the raidadd, raidrun commands?

       A: The names of the tools have changed as of the 0.5 release
       of the raidtools package.  The md naming convention was used
       in the 0.43 and older versions, while raid is used in 0.5
       and newer versions.



  3. Q: I want to run RAID-linear/RAID-0 in the stock 2.0.34 kernel.  I
     don't want to apply the raid patches, since these are not needed
     for RAID-0/linear.  Where can I get the raid-tools to manage this?


  A: This is a tough question, indeed, as the newest raid
  tools package needs to have the RAID-1,4,5 kernel patches
  installed in order to compile.  I am not aware of any pre-
  compiled, binary version of the raid tools that is available
  at this time.  However, experiments show that the raid-tools
  binaries, when compiled against kernel 2.1.100, seem to work
  just fine in creating a RAID-0/linear partition under
  2.0.34.  A brave soul has asked for these, and I've tem-
  porarily placed the binaries mdadd, mdcreate, etc.  at
  http://linas.org/linux/Software-RAID/ You must get the man
  pages, etc. from the usual raid-tools package.



  4. Q: Can I strip/mirror the root partition (/)?  Why can't I boot
     Linux directly from the md disks?


       A: Both LILO and Loadlin need an non-stripped/mirrored par-
       tition to read the kernel image from. If you want to
       strip/mirror the root partition (/), then you'll want to
       create an unstriped/mirrored partition to hold the ker-
       nel(s).  Typically, this partition is named /boot.  Then you
       either use the initial ramdisk support (initrd), or patches
       from Harald Hoyer <HarryH@Royal.Net> that allow a stripped
       partition to be used as the root device.  (These patches are
       now a standard part of recent 2.1.x kernels)


       There are several approaches that can be used.  One approach
       is documented in detail in the Bootable RAID mini-HOWTO:
       <ftp://ftp.bizsystems.com/pub/raid/bootable-raid>.


       Alternately, use mkinitrd to build the ramdisk image, see
       below.


       Edward Welbon <welbon@bga.com> writes:

       o  ... all that is needed is a script to manage the boot
          setup.  To mount an md filesystem as root, the main thing
          is to build an initial file system image that has the
          needed modules and md tools to start md.  I have a simple
          script that does this.


       o  For boot media, I have a small cheap SCSI disk (170MB I
          got it used for $20).  This disk runs on a AHA1452, but
          it could just as well be an inexpensive IDE disk on the
          native IDE.  The disk need not be very fast since it is
          mainly for boot.


       o  This disk has a small file system which contains the
          kernel and the file system image for initrd.  The initial
          file system image has just enough stuff to allow me to
          load the raid SCSI device driver module and start the
          raid partition that will become root.  I then do an


       echo 0x900 > /proc/sys/kernel/real-root-dev



  (0x900 is for /dev/md0) and exit linuxrc.  The boot proceeds
  normally from there.


  o  I have built most support as a module except for the
     AHA1452 driver that brings in the initrd filesystem.  So
     I have a fairly small kernel. The method is perfectly
     reliable, I have been doing this since before 2.1.26 and
     have never had a problem that I could not easily recover
     from.  The file systems even survived several 2.1.4[45]
     hard crashes with no real problems.


  o  At one time I had partitioned the raid disks so that the
     initial cylinders of the first raid disk held the kernel
     and the initial cylinders of the second raid disk hold
     the initial file system image, instead I made the initial
     cylinders of the raid disks swap since they are the
     fastest cylinders (why waste them on boot?).


  o  The nice thing about having an inexpensive device
     dedicated to boot is that it is easy to boot from and can
     also serve as a rescue disk if necessary. If you are
     interested, you can take a look at the script that builds
     my initial ram disk image and then runs LILO.

       <http://www.realtime.net/~welbon/initrd.md.tar.gz>


  It is current enough to show the picture.  It isn't espe-
  cially pretty and it could certainly build a much smaller
  filesystem image for the initial ram disk.  It would be easy
  to a make it more efficient.  But it uses LILO as is.  If
  you make any improvements, please forward a copy to me. 8-)



  5. Q: I have heard that I can run mirroring over striping. Is this
     true?  Can I run mirroring over the loopback device?

       A: Yes, but not the reverse.  That is, you can put a stripe
       over several disks, and then build a mirror on top of this.
       However, striping cannot be put on top of mirroring.


       A brief technical explanation is that the linear and stripe
       personalities use the ll_rw_blk routine for access.  The
       ll_rw_blk routine maps disk devices and  sectors, not
       blocks.  Block devices can be layered one on top of the
       other; but devices that do raw, low-level disk accesses,
       such as ll_rw_blk, cannot.


       Currently (November 1997) RAID cannot be run over the
       loopback devices, although this should be fixed shortly.



  6. Q: I have two small disks and three larger disks.  Can I
     concatenate the two smaller disks with RAID-0, and then create a
     RAID-5 out of that and the larger disks?

       A: Currently (November 1997), for a RAID-5 array, no.  Cur-
       rently, one can do this only for a RAID-1 on top of the con-
       catenated drives.
  7. Q: What is the difference between RAID-1 and RAID-5 for a two-disk
     configuration (i.e. the difference between a RAID-1 array  built
     out of two disks, and a RAID-5 array built out of two disks)?


       A: There is no difference in storage capacity.  Nor can
       disks be added to either array to increase capacity (see the
       question below for details).


       RAID-1 offers a performance advantage for reads: the RAID-1
       driver uses distributed-read technology to simultaneously
       read two sectors, one from each drive, thus doubling read
       performance.


       The RAID-5 driver, although it contains many optimizations,
       does not currently (September 1997) realize that the parity
       disk is actually a mirrored copy of the data disk.  Thus, it
       serializes data reads.



  8. Q: How can I guard against a two-disk failure?


       A: Some of the RAID algorithms do guard against multiple
       disk failures, but these are not currently implemented for
       Linux.  However, the Linux Software RAID can guard against
       multiple disk failures by layering an array on top of an
       array.  For example, nine disks can be used to create three
       raid-5 arrays.  Then these three arrays can in turn be
       hooked together into a single RAID-5 array on top.  In fact,
       this kind of a configuration will guard against a three-disk
       failure.  Note that a large amount of disk space is
       ''wasted'' on the redundancy information.



           For an NxN raid-5 array,
           N=3, 5 out of 9 disks are used for parity (=55%)
           N=4, 7 out of 16 disks
           N=5, 9 out of 25 disks
           ...
           N=9, 17 out of 81 disks (=~20%)



  In general, an MxN array will use M+N-1 disks for parity.
  The least amount of space is "wasted" when M=N.


  Another alternative is to create a RAID-1 array with three
  disks.  Note that since all three disks contain identical
  data, that 2/3's of the space is ''wasted''.



  9. Q: I'd like to understand  how it'd be possible to have something
     like fsck: if the partition hasn't been cleanly unmounted, fsck
     runs and fixes the filesystem by itself more than 90% of the time.
     Since the machine is capable of fixing it by itself with ckraid
     --fix, why not make it automatic?



       A: This can be done by adding lines like the following to
       /etc/rc.d/rc.sysinit:

           mdadd /dev/md0 /dev/hda1 /dev/hdc1 || {
               ckraid --fix /etc/raid.usr.conf
               mdadd /dev/md0 /dev/hda1 /dev/hdc1
           }



       or

           mdrun -p1 /dev/md0
           if [ $? -gt 0 ] ; then
                   ckraid --fix /etc/raid1.conf
                   mdrun -p1 /dev/md0
           fi



       Before presenting a more complete and reliable script, lets
       review the theory of operation.

       Gadi Oxman writes: In an unclean shutdown, Linux might be in
       one of the following states:

       o  The in-memory disk cache was in sync with the RAID set
          when the unclean shutdown occurred; no data was lost.

       o  The in-memory disk cache was newer than the RAID set
          contents when the crash occurred; this results in a
          corrupted filesystem and potentially in data loss.

          This state can be further divided to the following two
          states:


       o  Linux was writing data when the unclean shutdown
          occurred.

       o  Linux was not writing data when the crash occurred.


          Suppose we were using a RAID-1 array. In (2a), it might
          happen that before the crash, a small number of data
          blocks were successfully written only to some of the
          mirrors, so that on the next reboot, the mirrors will no
          longer contain the same data.

          If we were to ignore the mirror differences, the
          raidtools-0.36.3 read-balancing code might choose to read
          the above data blocks from any of the mirrors, which will
          result in inconsistent behavior (for example, the output
          of e2fsck -n /dev/md0 can differ from run to run).


          Since RAID doesn't protect against unclean shutdowns,
          usually there isn't any ''obviously correct'' way to fix
          the mirror differences and the filesystem corruption.

          For example, by default ckraid --fix will choose the
          first operational mirror and update the other mirrors
     with its contents.  However, depending on the exact
     timing at the crash, the data on another mirror might be
     more recent, and we might want to use it as the source
     mirror instead, or perhaps use another method for
     recovery.

     The following script provides one of the more robust
     boot-up sequences.  In particular, it guards against
     long, repeated ckraid's in the presence of uncooperative
     disks, controllers, or controller device drivers.  Modify
     it to reflect your config, and copy it to rc.raid.init.
     Then invoke rc.raid.init after the root partition has
     been fsck'ed and mounted rw, but before the remaining
     partitions are fsck'ed.  Make sure the current directory
     is in the search path.

         mdadd /dev/md0 /dev/hda1 /dev/hdc1 || {
             rm -f /fastboot             # force an fsck to occur
             ckraid --fix /etc/raid.usr.conf
             mdadd /dev/md0 /dev/hda1 /dev/hdc1
         }
         # if a crash occurs later in the boot process,
         # we at least want to leave this md in a clean state.
         /sbin/mdstop /dev/md0

         mdadd /dev/md1 /dev/hda2 /dev/hdc2 || {
             rm -f /fastboot             # force an fsck to occur
             ckraid --fix /etc/raid.home.conf
             mdadd /dev/md1 /dev/hda2 /dev/hdc2
         }
         # if a crash occurs later in the boot process,
         # we at least want to leave this md in a clean state.
         /sbin/mdstop /dev/md1

         mdadd /dev/md0 /dev/hda1 /dev/hdc1
         mdrun -p1 /dev/md0
         if [ $? -gt 0 ] ; then
             rm -f /fastboot             # force an fsck to occur
             ckraid --fix /etc/raid.usr.conf
             mdrun -p1 /dev/md0
         fi
         # if a crash occurs later in the boot process,
         # we at least want to leave this md in a clean state.
         /sbin/mdstop /dev/md0

         mdadd /dev/md1 /dev/hda2 /dev/hdc2
         mdrun -p1 /dev/md1
         if [ $? -gt 0 ] ; then
             rm -f /fastboot             # force an fsck to occur
             ckraid --fix /etc/raid.home.conf
             mdrun -p1 /dev/md1
         fi
         # if a crash occurs later in the boot process,
         # we at least want to leave this md in a clean state.
         /sbin/mdstop /dev/md1

         # OK, just blast through the md commands now.  If there were
         # errors, the above checks should have fixed things up.
         /sbin/mdadd /dev/md0 /dev/hda1 /dev/hdc1
         /sbin/mdrun -p1 /dev/md0

         /sbin/mdadd /dev/md12 /dev/hda2 /dev/hdc2
         /sbin/mdrun -p1 /dev/md1



  In addition to the above, you'll want to create a
  rc.raid.halt which should look like the following:

      /sbin/mdstop /dev/md0
      /sbin/mdstop /dev/md1



  Be sure to modify both rc.sysinit and init.d/halt to include
  this everywhere that filesystems get unmounted before a
  halt/reboot.  (Note that rc.sysinit unmounts and reboots if
  fsck returned with an error.)



  10.
     Q: Can I set up one-half of a RAID-1 mirror with the one disk I
     have now, and then later get the other disk and just drop it in?


       A: With the current tools, no, not in any easy way.  In par-
       ticular, you cannot just copy the contents of one disk onto
       another, and then pair them up.  This is because the RAID
       drivers use glob of space at the end of the partition to
       store the superblock.  This decreases the amount of space
       available to the file system slightly; if you just naively
       try to force a RAID-1 arrangement onto a partition with an
       existing filesystem, the raid superblock will overwrite a
       portion of the file system and mangle data.  Since the
       ext2fs filesystem scatters files randomly throughput the
       partition (in order to avoid fragmentation), there is a very
       good chance that some file will land at the very end of a
       partition long before the disk is full.


       If you are clever, I suppose you can calculate how much room
       the RAID superblock will need, and make your filesystem
       slightly smaller, leaving room for it when you add it later.
       But then, if you are this clever, you should also be able to
       modify the tools to do this automatically for you.  (The
       tools are not terribly complex).


       Note:A careful reader has pointed out that the following
       trick may work; I have not tried or verified this: Do the
       mkraid with /dev/null as one of the devices.  Then mdadd -r
       with only the single, true disk (do not mdadd /dev/null).
       The mkraid should have successfully built the raid array,
       while the mdadd step just forces the system to run in
       "degraded" mode, as if one of the disks had failed.



  4.  Error Recovery


  1. Q: I have a RAID-1 (mirroring) setup, and lost power while there
     was disk activity.  Now what do I do?


       A: The redundancy of RAID levels is designed to protect
       against a disk failure, not against a power failure.

       There are several ways to recover from this situation.

  o  Method (1): Use the raid tools.  These can be used to
     sync the raid arrays.  They do not fix file-system
     damage; after the raid arrays are sync'ed, then the file-
     system still has to be fixed with fsck.  Raid arrays can
     be checked with ckraid /etc/raid1.conf (for RAID-1, else,
     /etc/raid5.conf, etc.)

     Calling ckraid /etc/raid1.conf --fix will pick one of the
     disks in the array (usually the first), and use that as
     the master copy, and copy its blocks to the others in the
     mirror.

     To designate which of the disks should be used as the
     master, you can use the --force-source flag: for example,
     ckraid /etc/raid1.conf --fix --force-source /dev/hdc3

     The ckraid command can be safely run without the --fix
     option to verify the inactive RAID array without making
     any changes.  When you are comfortable with the proposed
     changes, supply the --fix  option.


  o  Method (2): Paranoid, time-consuming, not much better
     than the first way.  Lets assume a two-disk RAID-1 array,
     consisting of partitions /dev/hda3 and /dev/hdc3.  You
     can try the following:

     a. fsck /dev/hda3

     b. fsck /dev/hdc3

     c. decide which of the two partitions had fewer errors,
        or were more easily recovered, or recovered the data
        that you wanted.  Pick one, either one, to be your new
        ``master'' copy.  Say you picked /dev/hdc3.

     d. dd if=/dev/hdc3 of=/dev/hda3

     e. mkraid raid1.conf -f --only-superblock


     Instead of the last two steps, you can instead run ckraid
     /etc/raid1.conf --fix --force-source /dev/hdc3 which
     should be a bit faster.

  o  Method (3): Lazy man's version of above.  If you don't
     want to wait for long fsck's to complete, it is perfectly
     fine to skip the first three steps above, and move
     directly to the last two steps.  Just be sure to run fsck
     /dev/md0 after you are done.  Method (3) is actually just
     method (1) in disguise.


     In any case, the above steps will only sync up the raid
     arrays.  The file system probably needs fixing as well:
     for this, fsck needs to be run on the active, unmounted
     md device.


     With a three-disk RAID-1 array, there are more
     possibilities, such as using two disks to ''vote'' a
     majority answer.  Tools to automate this do not currently
     (September 97) exist.



  2. Q: I have a RAID-4 or a RAID-5 (parity) setup, and lost power while
     there was disk activity.  Now what do I do?


       A: The redundancy of RAID levels is designed to protect
       against a disk failure, not against a power failure.

       Since the disks in a RAID-4 or RAID-5 array do not contain a
       file system that fsck can read, there are fewer repair
       options.  You cannot use fsck to do preliminary checking
       and/or repair; you must use ckraid first.


       The ckraid command can be safely run without the --fix
       option to verify the inactive RAID array without making any
       changes.  When you are comfortable with the proposed
       changes, supply the --fix option.


       If you wish, you can try designating one of the disks as a
       ''failed disk''.  Do this with the --suggest-failed-disk-
       mask flag.

       Only one bit should be set in the flag: RAID-5 cannot
       recover two failed disks.  The mask is a binary bit mask:
       thus:

           0x1 == first disk
           0x2 == second disk
           0x4 == third disk
           0x8 == fourth disk, etc.



       Alternately, you can choose to modify the parity sectors, by
       using the --suggest-fix-parity flag.  This will recompute
       the parity from the other sectors.


       The flags --suggest-failed-dsk-mask and --suggest-fix-parity
       can be safely used for verification. No changes are made if
       the --fix flag is not specified.  Thus, you can experiment
       with different possible repair schemes.



  3. Q: My RAID-1 device, /dev/md0 consists of two hard drive
     partitions: /dev/hda3 and /dev/hdc3.  Recently, the disk with
     /dev/hdc3 failed, and was replaced with a new disk.  My best
     friend, who doesn't understand RAID, said that the correct thing to
     do now is to ''dd if=/dev/hda3 of=/dev/hdc3''.  I tried this, but
     things still don't work.


       A: You should keep your best friend away from you computer.
       Fortunately, no serious damage has been done.  You can
       recover from this by running:


       mkraid raid1.conf -f --only-superblock



  By using dd, two identical copies of the partition were cre-
  ated. This is almost correct, except that the RAID-1 kernel
  extension expects the RAID superblocks to be different.
  Thus, when you try to reactivate RAID, the software will
  notice the problem, and deactivate one of the two parti-
  tions.  By re-creating the superblock, you should have a
  fully usable system.



  4. Q: My version of mkraid doesn't have a --only-superblock flag.
     What do I do?

       A: The newer tools drop support for this flag, replacing it
       with the --force-resync flag.  It has been reported that the
       following sequence appears to work with the latest tools and
       software:


         umount /web (where /dev/md0 was mounted on)
         raidstop /dev/md0
         mkraid /dev/md0 --force-resync --really-force
         raidstart /dev/md0



  After doing this, a cat /proc/mdstat should report resync in
  progress, and one should be able to mount /dev/md0 at this
  point.



  5. Q: My RAID-1 device, /dev/md0 consists of two hard drive
     partitions: /dev/hda3 and /dev/hdc3.  My best (girl?)friend, who
     doesn't understand RAID, ran fsck on /dev/hda3 while I wasn't
     looking, and now the RAID won't work. What should I do?


       A: You should re-examine your concept of ``best friend''.
       In general, fsck should never be run on the individual par-
       titions that compose a RAID array.  Assuming that neither of
       the partitions are/were heavily damaged, no data loss has
       occurred, and the RAID-1 device can be recovered as follows:

          a. make a backup of the file system on /dev/hda3

          b. dd if=/dev/hda3 of=/dev/hdc3

          c. mkraid raid1.conf -f --only-superblock

       This should leave you with a working disk mirror.



  6. Q: Why does the above work as a recovery procedure?

       A: Because each of the component partitions in a RAID-1 mir-
       ror is a perfectly valid copy of the file system.  In a
       pinch, mirroring can be disabled, and one of the partitions
       can be mounted and safely run as an ordinary, non-RAID file
       system.  When you are ready to restart using RAID-1, then
       unmount the partition, and follow the above instructions to
       restore the mirror.   Note that the above works ONLY for
       RAID-1, and not for any of the other levels.
  It may make you feel more comfortable to reverse the
  direction of the copy above: copy from the disk that was
  untouched to the one that was.  Just be sure to fsck the
  final md.



  7. Q: I am confused by the above questions, but am not yet bailing
     out.  Is it safe to run fsck /dev/md0 ?


       A: Yes, it is safe to run fsck on the md devices.  In fact,
       this is the only safe place to run fsck.



  8. Q: If a disk is slowly failing, will it be obvious which one it is?
     I am concerned that it won't be, and this confusion could lead to
     some dangerous decisions by a sysadmin.


       A: Once a disk fails, an error code will be returned from
       the low level driver to the RAID driver.  The RAID driver
       will mark it as ``bad'' in the RAID superblocks of the
       ``good'' disks (so we will later know which mirrors are good
       and which aren't), and continue RAID operation on the
       remaining operational mirrors.


       This, of course, assumes that the disk and the low level
       driver can detect a read/write error, and will not silently
       corrupt data, for example. This is true of current drives
       (error detection schemes are being used internally), and is
       the basis of RAID operation.



  9. Q: What about hot-repair?


       A: Work is underway to complete ``hot reconstruction''.
       With this feature, one can add several ``spare'' disks to
       the RAID set (be it level 1 or 4/5), and once a disk fails,
       it will be reconstructed on one of the spare disks in run
       time, without ever needing to shut down the array.


       However, to use this feature, the spare disk must have been
       declared at boot time, or it must be hot-added, which
       requires the use of special cabinets and connectors that
       allow a disk to be added while the electrical power is on.


       As of October 97, there is a beta version of MD that allows:

       o  RAID 1 and 5 reconstruction on spare drives

       o  RAID-5 parity reconstruction after an unclean shutdown

       o  spare disk to be hot-added to an already running RAID 1
          or 4/5 array

          By default, automatic reconstruction is (Dec 97)
          currently disabled by default, due to the preliminary
          nature of this work.  It can be enabled by changing the
          value of SUPPORT_RECONSTRUCTION in include/linux/md.h.
     If spare drives were configured into the array when it
     was created and kernel-based reconstruction is enabled,
     the spare drive will already contain a RAID superblock
     (written by mkraid), and the kernel will reconstruct its
     contents automatically (without needing the usual mdstop,
     replace drive, ckraid, mdrun steps).


     If you are not running automatic reconstruction, and have
     not configured a hot-spare disk, the procedure described
     by Gadi Oxman <gadio@netvision.net.il> is recommended:

  o  Currently, once the first disk is removed, the RAID set
     will be running in degraded mode. To restore full
     operation mode, you need to:

  o  stop the array (mdstop /dev/md0)

  o  replace the failed drive

  o  run ckraid raid.conf to reconstruct its contents

  o  run the array again (mdadd, mdrun).

     At this point, the array will be running with all the
     drives, and again protects against a failure of a single
     drive.

     Currently, it is not possible to assign single hot-spare
     disk to several arrays.   Each array requires it's own
     hot-spare.



  10.
     Q: I would like to have an audible alarm for ``you schmuck, one
     disk in the mirror is down'', so that the novice sysadmin knows
     that there is a problem.


       A: The kernel is logging the event with a ``KERN_ALERT''
       priority in syslog.  There are several software packages
       that will monitor the syslog files, and beep the PC speaker,
       call a pager, send e-mail, etc. automatically.



  11.
     Q: How do I run RAID-5 in degraded mode (with one disk failed, and
     not yet replaced)?


       A: Gadi Oxman <gadio@netvision.net.il> writes: Normally, to
       run a RAID-5 set of n drives you have to:


       mdadd /dev/md0 /dev/disk1 ... /dev/disk(n)
       mdrun -p5 /dev/md0



  Even if one of the disks has failed, you still have to mdadd
  it as you would in a normal setup.  (?? try using /dev/null
  in place of the failed disk ???  watch out) Then,
  The array will be active in degraded mode with (n - 1)
  drives.  If ``mdrun'' fails, the kernel has noticed an error
  (for example, several faulty drives, or an unclean shut-
  down).  Use ``dmesg'' to display the kernel error messages
  from ``mdrun''.  If the raid-5 set is corrupted due to a
  power loss, rather than a disk crash, one can try to recover
  by creating a new RAID superblock:


       mkraid -f --only-superblock raid5.conf



  A RAID array doesn't provide protection against a power
  failure or a kernel crash, and can't guarantee correct
  recovery.  Rebuilding the superblock will simply cause the
  system to ignore the condition by marking all the drives as
  ``OK'', as if nothing happened.



  12.
     Q: How does RAID-5 work when a disk fails?


       A: The typical operating scenario is as follows:

       o  A RAID-5 array is active.

       o  One drive fails while the array is active.

       o  The drive firmware and the low-level Linux
          disk/controller drivers detect the failure and report an
          error code to the MD driver.

       o  The MD driver continues to provide an error-free /dev/md0
          device to the higher levels of the kernel (with a
          performance degradation) by using the remaining
          operational drives.

       o  The sysadmin can umount /dev/md0 and mdstop /dev/md0 as
          usual.

       o  If the failed drive is not replaced, the sysadmin can
          still start the array in degraded mode as usual, by
          running mdadd and mdrun.



  13.
     Q:

       A:



  14.
     Q: Why is there no question 13?


       A: If you are concerned about RAID, High Availability, and
       UPS, then its probably a good idea to be superstitious as
       well.  It can't hurt, can it?

  15.
     Q: I just replaced a failed disk in a RAID-5 array.  After
     rebuilding the array, fsck is reporting many, many errors.  Is this
     normal?


       A: No. And, unless you ran fsck in "verify only; do not
       update" mode, its quite possible that you have corrupted
       your data.  Unfortunately, a not-uncommon scenario is one of
       accidentally changing the disk order in a RAID-5 array,
       after replacing a hard drive.  Although the RAID superblock
       stores the proper order, not all tools use this information.
       In particular, the current version of ckraid will use the
       information specified with the -f flag (typically, the file
       /etc/raid5.conf) instead of the data in the superblock.  If
       the specified order is incorrect, then the replaced disk
       will be reconstructed incorrectly.   The symptom of this
       kind of mistake seems to be heavy & numerous fsck errors.


       And, in case you are wondering, yes, someone lost all of
       their data by making this mistake.   Making a tape backup of
       all data before reconfiguring a RAID array is strongly
       recommended.



  16.
     Q: The QuickStart says that mdstop is just to make sure that the
     disks are sync'ed. Is this REALLY necessary? Isn't unmounting the
     file systems enough?


       A: The command mdstop /dev/md0 will:

       o  mark it ''clean''. This allows us to detect unclean
          shutdowns, for example due to a power failure or a kernel
          crash.

       o  sync the array. This is less important after unmounting a
          filesystem, but is important if the /dev/md0 is accessed
          directly rather than through a filesystem (for example,
          by e2fsck).



  5.  Troubleshooting Install Problems


  1. Q: What is the current best known-stable patch for RAID in the
     2.0.x series kernels?


       A: As of 18 Sept 1997, it is "2.0.30 + pre-9 2.0.31 + Werner
       Fink's swapping patch + the alpha RAID patch".  As of Novem-
       ber 1997, it is 2.0.31 + ... !?



  2. Q: The RAID patches will not install cleanly for me.  What's wrong?

       A: Make sure that /usr/include/linux is a symbolic link to
       /usr/src/linux/include/linux.

  Make sure that the new files raid5.c, etc.  have been copied
  to their correct locations.  Sometimes the patch command
  will not create new files.  Try the -f flag on patch.



  3. Q: While compiling raidtools 0.42, compilation stops trying to
     include <pthread.h> but it doesn't exist in my system.  How do I
     fix this?


       A: raidtools-0.42 requires linuxthreads-0.6 from:
       <ftp://ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy>
       Alternately, use glibc v2.0.



  4. Q: I get the message: mdrun -a /dev/md0: Invalid argument


       A: Use mkraid to initialize the RAID set prior to the first
       use.  mkraid ensures that the RAID array is initially in a
       consistent state by erasing the RAID partitions. In addi-
       tion, mkraid will create the RAID superblocks.



  5. Q: I get the message: mdrun -a /dev/md0: Invalid argument The setup
     was:

  o  raid build as a kernel module

  o  normal install procedure followed ... mdcreate, mdadd, etc.

  o  cat /proc/mdstat shows

         Personalities :
         read_ahead not set
         md0 : inactive sda1 sdb1 6313482 blocks
         md1 : inactive
         md2 : inactive
         md3 : inactive



  o  mdrun -a generates the error message /dev/md0: Invalid argument



       A: Try lsmod (or, alternately, cat /proc/modules) to see if
       the raid modules are loaded.  If they are not, you can load
       them explicitly with the modprobe raid1 or modprobe raid5
       command.  Alternately,  if you are using the autoloader, and
       expected kerneld to load them and it didn't this is probably
       because your loader is missing the info to load the modules.
       Edit /etc/conf.modules and add the following lines:


           alias md-personality-3 raid1
           alias md-personality-4 raid5



  6. Q: While doing mdadd -a I get the error: /dev/md0: No such file or
     directory.  Indeed, there seems to be no /dev/md0 anywhere.  Now
     what do I do?


       A: The raid-tools package will create these devices when you
       run make install as root.  Alternately, you can do the fol-
       lowing:

           cd /dev
           ./MAKEDEV md



  7. Q: After creating a raid array on /dev/md0, I try to mount it and
     get the following error:
      mount: wrong fs type, bad option, bad superblock on /dev/md0, or
     too many mounted file systems. What's wrong?

       A: You need to create a file system on /dev/md0 before you
       can mount it.  Use mke2fs.



  8. Q: Truxton Fulton wrote:

       On my Linux 2.0.30 system, while doing a mkraid for a RAID-1
       device, during the clearing of the two individual parti-
       tions, I got "Cannot allocate free page" errors appearing on
       the console, and "Unable to handle kernel paging request at
       virtual address ..." errors in the system log.  At this
       time, the system became quite unusable, but it appears to
       recover after a while.  The operation appears to have com-
       pleted with no other errors, and I am successfully using my
       RAID-1 device.  The errors are disconcerting though.  Any
       ideas?



       A: This was a well-known bug in the 2.0.30 kernels.  It is
       fixed in the 2.0.31 kernel; alternately, fall back to
       2.0.29.



  9. Q: I'm not able to mdrun a RAID-1, RAID-4 or RAID-5 device.  If I
     try to mdrun a mdadd'ed device I get the message ''invalid raid
     superblock magic''.


       A: Make sure that you've run the mkraid part of the install
       procedure.



  10.
     Q: When I access /dev/md0, the kernel spits out a lot of errors
     like md0: device not running, giving up !  and I/O error.... I've
     successfully added my devices to the virtual device.

       A: To be usable, the device must be running. Use mdrun -px
       /dev/md0 where x is l for linear, 0 for RAID-0 or 1 for
       RAID-1, etc.



  11.
     Q: I've created a linear md-dev with 2 devices.  cat /proc/mdstat
     shows the total size of the device, but df only shows the size of
     the first physical device.


       A: You must mkfs your new md-dev before using it the first
       time, so that the filesystem will cover the whole device.



  12.
     Q: I've set up /etc/mdtab using mdcreate, I've mdadd'ed, mdrun and
     fsck'ed my two /dev/mdX partitions.  Everything looks okay before a
     reboot.  As soon as I reboot, I get an fsck error on both
     partitions: fsck.ext2: Attempt to read block from filesystem
     resulted in short read while trying too open /dev/md0.  Why?! How
     do I fix it?!


       A: During the boot process, the RAID partitions must be
       started before they can be fsck'ed.  This must be done in
       one of the boot scripts.  For some distributions, fsck is
       called from /etc/rc.d/rc.S, for others, it is called from
       /etc/rc.d/rc.sysinit. Change this file to mdadd -ar *before*
       fsck -A is executed.  Better yet, it is suggested that
       ckraid be run if mdadd returns with an error.  How do do
       this is discussed in greater detail in question 14 of the
       section ''Error Recovery''.



  13.
     Q: I get the message invalid raid superblock magic while trying to
     run an array which consists of partitions which are bigger than
     4GB.


       A: This bug is now fixed. (September 97)  Make sure you have
       the latest raid code.



  14.
     Q: I get the message Warning: could not write 8 blocks in inode
     table starting at 2097175 while trying to run mke2fs on a partition
     which is larger than 2GB.


       A: This seems to be a problem with mke2fs (November 97).  A
       temporary work-around is to get the mke2fs code, and add
       #undef HAVE_LLSEEK to e2fsprogs-1.10/lib/ext2fs/llseek.c
       just before the first #ifdef HAVE_LLSEEK and recompile
       mke2fs.



  15.
     Q: ckraid currently isn't able to read /etc/mdtab

       A: The RAID0/linear configuration file format used in
       /etc/mdtab is obsolete, although it will be supported for a
       while more.  The current, up-to-date config files are cur-
       rently named /etc/raid1.conf, etc.



  16.
     Q: The personality modules (raid1.o) are not loaded automatically;
     they have to be manually modprobe'd before mdrun. How can this be
     fixed?


       A: To autoload the modules, we can add the following to
       /etc/conf.modules:

           alias md-personality-3 raid1
           alias md-personality-4 raid5



  17.
     Q: I've mdadd'ed 13 devices, and now I'm trying to mdrun -p5
     /dev/md0 and get the message: /dev/md0: Invalid argument


       A: The default configuration for software RAID is 8 real
       devices. Edit linux/md.h, change #define MAX_REAL=8 to a
       larger number, and rebuild the kernel.



  18.
     Q: I can't make md work with partitions on our latest SPARCstation
     5.  I suspect that this has something to do with disk-labels.


       A: Sun disk-labels sit in the first 1K of a partition.  For
       RAID-1, the Sun disk-label is not an issue since ext2fs will
       skip the label on every mirror.  For other raid levels (0,
       linear and 4/5), this appears to be a problem; it has not
       yet (Dec 97) been addressed.



  6.  Supported Hardware & Software


  1. Q: I have SCSI adapter brand XYZ (with or without several
     channels), and disk brand(s) PQR and LMN, will these work with md
     to create a linear/stripped/mirrored personality?


       A: Yes!  Software RAID will work with any disk controller
       (IDE or SCSI) and any disks.  The disks do not have to be
       identical, nor do the controllers.  For example, a RAID mir-
       ror can be created with one half the mirror being a SCSI
       disk, and the other an IDE disk.  The disks do not even have
       to be the same size.  There are no restrictions on the mix-
       ing & matching of disks and controllers.


       This is because Software RAID works with disk partitions,
  not with the raw disks themselves.  The only recommendation
  is that for RAID levels 1 and 5, the disk partitions that
  are used as part of the same set be the same size. If the
  partitions used to make up the RAID 1 or 5 array are not the
  same size, then the excess space in the larger partitions is
  wasted (not used).



  2. Q: I have a twin channel BT-952, and the box states that it
     supports hardware RAID 0, 1 and 0+1.   I have made a RAID set with
     two drives, the card apparently recognizes them when it's doing
     it's BIOS startup routine. I've been reading in the driver source
     code, but found no reference to the hardware RAID support.  Anybody
     out there working on that?


       A: The Mylex/BusLogic FlashPoint boards with RAIDPlus are
       actually software RAID, not hardware RAID at all.  RAIDPlus
       is only supported on Windows 95 and Windows NT, not on Net-
       ware or any of the Unix platforms.  Aside from booting and
       configuration, the RAID support is actually in the OS
       drivers.


       While in theory Linux support for RAIDPlus is possible, the
       implementation of RAID-0/1/4/5 in the Linux kernel is much
       more flexible and should have superior performance, so
       there's little reason to support RAIDPlus directly.



  3. Q: I want to run RAID with an SMP box.  Is  RAID SMP-safe?

       A: "I think so" is the best answer available at the time I
       write this (April 98).  A number of users report that they
       have been using RAID with SMP for nearly a year, without
       problems.  However, as of April 98 (circa kernel 2.1.9x),
       the following problems have been noted on the mailing list:

       o  Adaptec AIC7xxx SCSI drivers are not SMP safe (General
          note: Adaptec adapters have a long & lengthly history of
          problems & flakiness in general.  Although they seem to
          be the most easily available, widespread and cheapest
          SCSI adapters, they should be avoided.  After factoring
          for time lost, frustration, and corrupted data, Adaptec's
          will prove to be the costliest mistake you'll ever make.
          That said, if you have SMP problems with 2.1.88, try the
          patch ftp://ftp.bero-
          online.ml.org/pub/linux/aic7xxx-5.0.7-linux21.tar.gz I am
          not sure if this patch has been pulled into later 2.1.x
          kernels.  For further info, take a look at the mail
          archives for March 98 at
          http://www.linuxhq.com/lnxlists/linux-raid/lr_9803_01/ As
          usual, due to the rapidly changing nature of the latest
          experimental 2.1.x kernels, the problems described in
          these mailing lists may or may not have been fixed by the
          time your read this. Caveat Emptor.  )



       o  IO-APIC with RAID-0 on SMP has been reported to crash in
          2.1.90



  7.  Modifying an Existing Installation


  1. Q: Are linear MD's expandable?  Can a new hard-drive/partition be
     added, and the size of the existing file system expanded?


       A: Miguel de Icaza <miguel@luthien.nuclecu.unam.mx> writes:

       I changed the ext2fs code to be aware of multiple-devices
       instead of the regular one device per file system assump-
       tion.


       So, when you want to extend a file system, you run a utility
       program that makes the appropriate changes on the new device
       (your extra partition) and then you just tell the system to
       extend the fs using the specified device.


       You can extend a file system with new devices at system
       operation time, no need to bring the system down (and
       whenever I get some extra time, you will be able to remove
       devices from the ext2 volume set, again without even having
       to go to single-user mode or any hack like that).


       You can get the patch for 2.1.x kernel from my web page:

       <http://www.nuclecu.unam.mx/~miguel/ext2-volume>



  2. Q: Can I add disks to a RAID-5 array?


       A: Currently, (September 1997) no, not without erasing all
       data. A conversion utility to allow this does not yet exist.
       The problem is that the actual structure and layout of a
       RAID-5 array depends on the number of disks in the array.

       Of course, one can add drives by backing up the array to
       tape, deleting all data, creating a new array, and restoring
       from tape.



  3. Q: What would happen to my RAID1/RAID0 sets if I shift one of the
     drives from being /dev/hdb to /dev/hdc?

     Because of cabling/case size/stupidity issues, I had to make my
     RAID sets on the same IDE controller (/dev/hda and /dev/hdb). Now
     that I've fixed some stuff, I want to move /dev/hdb to /dev/hdc.

     What would happen if I just change the /etc/mdtab and
     /etc/raid1.conf files to reflect the new location?

       A: For RAID-0/linear, one must be careful to specify the
       drives in exactly the same order. Thus, in the above exam-
       ple, if the original config is



  mdadd /dev/md0 /dev/hda /dev/hdb



  Then the new config *must* be


       mdadd /dev/md0 /dev/hda /dev/hdc



  For RAID-1/4/5, the drive's ''RAID number'' is stored in its
  RAID superblock, and therefore the order in which the disks
  are specified is not important.

  RAID-0/linear does not have a superblock due to it's older
  design, and the desire to maintain backwards compatibility
  with this older design.



  4. Q: Can I convert a two-disk RAID-1 mirror to a three-disk RAID-5
     array?


       A: Yes.  Michael at BizSystems has come up with a clever,
       sneaky way of doing this.  However, like virtually all
       manipulations of RAID arrays once they have data on them, it
       is dangerous and prone to human error.  Make a backup before
       you start.



  I will make the following assumptions:
  ---------------------------------------------
  disks
  original: hda - hdc
  raid1 partitions hda3 - hdc3
  array name /dev/md0

  new hda - hdc - hdd
  raid5 partitions hda3 - hdc3 - hdd3
  array name: /dev/md1

  You must substitute the appropriate disk and partition numbers for
  you system configuration. This will hold true for all config file
  examples.
  --------------------------------------------
  DO A BACKUP BEFORE YOU DO ANYTHING
  1) recompile kernel to include both raid1 and raid5
  2) install new kernel and verify that raid personalities are present
  3) disable the redundant partition on the raid 1 array. If this is a
   root mounted partition (mine was) you must be more careful.

   Reboot the kernel without starting raid devices or boot from rescue
   system ( raid tools must be available )

   start non-redundant raid1
  mdadd -r -p1 /dev/md0 /dev/hda3

  4) configure raid5 but with 'funny' config file, note that there is
    no hda3 entry and hdc3 is repeated. This is needed since the
    raid tools don't want you to do this.
  -------------------------------
  # raid-5 configuration
  raiddev                 /dev/md1
  raid-level              5
  nr-raid-disks           3
  chunk-size              32

  # Parity placement algorithm
  parity-algorithm        left-symmetric

  # Spare disks for hot reconstruction
  nr-spare-disks          0

  device                  /dev/hdc3
  raid-disk               0

  device                  /dev/hdc3
  raid-disk               1

  device                  /dev/hdd3
  raid-disk               2
  ---------------------------------------
   mkraid /etc/raid5.conf
  5) activate the raid5 array in non-redundant mode

  mdadd -r -p5 -c32k /dev/md1 /dev/hdc3 /dev/hdd3

  6) make a file system on the array

  mke2fs -b {blocksize} /dev/md1

  recommended blocksize by some is 4096 rather than the default 1024.
  this improves the memory utilization for the kernel raid routines and
  matches the blocksize to the page size. I compromised and used 2048
  since I have a relatively high number of small files on my system.

  7) mount the two raid devices somewhere

  mount -t ext2 /dev/md0 mnt0
  mount -t ext2 /dev/md1 mnt1

  8) move the data

  cp -a mnt0 mnt1

  9) verify that the data sets are identical
  10) stop both arrays
  11) correct the information for the raid5.conf file
    change /dev/md1 to /dev/md0
    change the first disk to read /dev/hda3

  12) upgrade the new array to full redundant status
   (THIS DESTROYS REMAINING raid1 INFORMATION)

  ckraid --fix /etc/raid5.conf



  8.  Performance, Tools & General Bone-headed Questions


  1. Q: I've created a RAID-0 device on /dev/sda2 and /dev/sda3. The
     device is a lot slower than a single partition. Isn't md a pile of
     junk?

       A: To have a RAID-0 device running a full speed, you must
       have partitions from different disks.  Besides, putting the
       two halves of the mirror on the same disk fails to give you
       any protection whatsoever against disk failure.



  2. Q: What's the use of having RAID-linear when RAID-0 will do the
     same thing, but provide higher performance?

       A: It's not obvious that RAID-0 will always provide better
       performance; in fact, in some cases, it could make things
       worse.  The ext2fs file system scatters files all over a
       partition, and it attempts to keep all of the blocks of a
       file contiguous, basically in an attempt to prevent fragmen-
       tation.  Thus, ext2fs behaves "as if" there were a (vari-
       able-sized) stripe per file.  If there are several disks
       concatenated into a single RAID-linear, this will result
       files being statistically distributed on each of the disks.
       Thus, at least for ext2fs, RAID-linear will behave a lot
       like RAID-0 with large stripe sizes.  Conversely, RAID-0
       with small stripe sizes can cause excessive disk activity
       leading to severely degraded performance if several large
       files are accessed simultaneously.

       In many cases, RAID-0 can be an obvious win. For example,
       imagine a large database file.  Since ext2fs attempts to
       cluster together all of the blocks of a file, chances are
       good that it will end up on only one drive if RAID-linear is
       used, but will get chopped into lots of stripes if RAID-0 is
       used.  Now imagine a number of (kernel) threads all trying
       to random access to this database.  Under RAID-linear, all
  accesses would go to one disk, which would not be as
  efficient as the parallel accesses that RAID-0 entails.



  3. Q: How does RAID-0 handle a situation where the different stripe
     partitions are different sizes?  Are the stripes uniformly
     distributed?


       A: To understand this, lets look at an example with three
       partitions; one that is 50MB, one 90MB and one 125MB.

       Lets call D0 the 50MB disk, D1 the 90MB disk and D2 the
       125MB disk.  When you start the device, the driver calcu-
       lates 'strip zones'.  In this case, it finds 3 zones,
       defined like this:


                   Z0 : (D0/D1/D2) 3 x 50 = 150MB  total in this zone
                   Z1 : (D1/D2)  2 x 40 = 80MB total in this zone
                   Z2 : (D2) 125-50-40 = 35MB total in this zone.



       You can see that the total size of the zones is the size of
       the virtual device, but, depending on the zone, the striping
       is different.  Z2 is rather inefficient, since there's only
       one disk.

       Since ext2fs and most other Unix file systems distribute
       files all over the disk, you have a  35/265 = 13% chance
       that a fill will end up on Z2, and not get any of the bene-
       fits of striping.

       (DOS tries to fill a disk from beginning to end, and thus,
       the oldest files would end up on Z0.  However, this strategy
       leads to severe filesystem fragmentation, which is why no
       one besides DOS does it this way.)



  4. Q: I have some Brand X hard disks and a Brand Y controller.  and am
     considering using md.  Does it significantly increase the
     throughput?  Is the performance really noticeable?


       A: The answer depends on the configuration that you use.


          Linux MD RAID-0 and RAID-linear performance:
             If the system is heavily loaded with lots of I/O,
             statistically, some of it will go to one disk, and
             some to the others.  Thus, performance will improve
             over a single large disk.   The actual improvement
             depends a lot on the actual data, stripe sizes, and
             other factors.   In a system with low I/O usage, the
             performance is equal to that of a single disk.



          Linux MD RAID-1 (mirroring) read performance:
             MD implements read balancing. That is, the  RAID-1
             code will alternate between each of the (two or more)
             disks in the mirror, making alternate reads to each.
        In a low-I/O situation, this won't change performance
        at all: you will have to wait for one disk to complete
        the read.  But, with two disks in a high-I/O
        environment, this could as much as double the read
        performance, since reads can be issued to each of the
        disks in parallel.  For N disks in the mirror, this
        could improve performance N-fold.


     Linux MD RAID-1 (mirroring) write performance:
        Must wait for the write to occur to all of the disks
        in the mirror.  This is because a copy of the data
        must be written to each of the disks in the mirror.
        Thus, performance will be roughly equal to the write
        performance to a single disk.


     Linux MD RAID-4/5 read performance:
        Statistically, a given block can be on any one of a
        number of disk drives, and thus RAID-4/5 read
        performance is a lot like that for RAID-0.  It will
        depend on the data, the stripe size, and the
        application.  It will not be as good as the read
        performance of a mirrored array.


     Linux MD RAID-4/5 write performance:
        This will in general be considerably slower than that
        for a single disk.  This is because the parity must be
        written out to one drive as well as the data to
        another.  However, in order to compute the new parity,
        the old parity and the old data must be read first.
        The old data, new data and old parity must all be
        XOR'ed together to determine the new parity: this
        requires considerable CPU cycles in addition to the
        numerous disk accesses.



  5. Q: What RAID configuration should I use for optimal performance?

       A: Is the goal to maximize throughput, or to minimize
       latency?  There is no easy answer, as there are many factors
       that affect performance:


       o  operating system  - will one process/thread, or many be
          performing disk access?

       o  application       - is it accessing data in a sequential
          fashion, or random access?

       o  file system       - clusters files or spreads them out
          (the ext2fs clusters together the blocks of a file, and
          spreads out files)

       o  disk driver       - number of blocks to read ahead (this
          is a tunable parameter)

       o  CEC hardware      - one drive controller, or many?

       o  hd controller     - able to queue multiple requests or
          not?  Does it provide a cache?

       o  hard drive        - buffer cache memory size -- is it big
          enough to handle the write sizes and rate you want?
  o  physical platters - blocks per cylinder -- accessing
     blocks on different cylinders will lead to seeks.



  6. Q: What is the optimal RAID-5 configuration for performance?

       A: Since RAID-5 experiences an I/O load that is equally dis-
       tributed across several drives, the best performance will be
       obtained when the RAID set is balanced by using identical
       drives, identical controllers,  and the same (low) number of
       drives on each controller.

       Note, however, that using identical components will raise
       the probability of multiple simultaneous failures, for exam-
       ple due to a sudden jolt or drop, overheating, or a power
       surge during an electrical storm. Mixing brands and models
       helps reduce this risk.



  7. Q: What is the optimal block size for a RAID-4/5 array?


       A: When using the current (November 1997) RAID-4/5 implemen-
       tation, it is strongly recommended that the file system be
       created with mke2fs -b 4096 instead of the default 1024 byte
       filesystem block size.


       This is because the current RAID-5 implementation allocates
       one 4K memory page per disk block; if a disk block were just
       1K in size, then 75% of the memory which RAID-5 is
       allocating for pending I/O would not be used.  If the disk
       block size matches the memory page size, then the driver can
       (potentially) use all of the page.  Thus, for a filesystem
       with a 4096 block size as opposed to a 1024 byte block size,
       the RAID driver will potentially queue 4 times as much
       pending I/O to the low level drivers without allocating
       additional memory.


       Note: the above remarks do NOT apply to Software
       RAID-0/1/linear driver.


       Note: the statements about 4K memory page size apply to the
       Intel x86 architecture.   The page size on Alpha, Sparc, and
       other CPUS are different; I believe they're 8K on
       Alpha/Sparc (????).  Adjust the above figures accordingly.


       Note: if your file system has a lot of small files (files
       less than 10KBytes in size), a considerable fraction of the
       disk space might be wasted.  This is because the file system
       allocates disk space in multiples of the block size.
       Allocating large blocks for small files clearly results in a
       waste of disk space: thus, you may want to stick to small
       block sizes, get a larger effective storage capacity, and
       not worry about the "wasted" memory due to the block-
       size/page-size mismatch.


       Note: most ''typical'' systems do not have that many small
       files.  That is, although there might be thousands of small
       files, this would lead to only some 10 to 100MB wasted
  space, which is probably an acceptable tradeoff for
  performance on a multi-gigabyte disk.

  However, for news servers, there might be tens or hundreds
  of thousands of small files.  In such cases, the smaller
  block size, and thus the improved storage capacity, may be
  more important than the more efficient I/O scheduling.


  Note: there exists an experimental file system for Linux
  which packs small files and file chunks onto a single block.
  It apparently has some very positive performance
  implications when the average file size is much smaller than
  the block size.


  Note: Future versions may implement schemes that obsolete
  the above discussion. However, this is difficult to
  implement, since dynamic run-time allocation can lead to
  dead-locks; the current implementation performs a static
  pre-allocation.



  8. Q: How does the chunk size (stripe size) influence the speed of my
     RAID-0, RAID-4 or RAID-5 device?


       A: The chunk size is the amount of data contiguous on the
       virtual device that is also contiguous on the physical
       device.  In this HOWTO, "chunk" and "stripe" refer to the
       same thing: what is commonly called the "stripe" in other
       RAID documentation is called the "chunk" in the MD man
       pages.  Stripes or chunks apply only to RAID 0, 4 and 5,
       since stripes are not used in mirroring (RAID-1) and simple
       concatenation (RAID-linear).  The stripe size affects both
       read and write latency (delay), throughput (bandwidth), and
       contention between independent operations (ability to simul-
       taneously service overlapping I/O requests).

       Assuming the use of the ext2fs file system, and the current
       kernel policies about read-ahead, large stripe sizes are
       almost always better than small stripe sizes, and stripe
       sizes from about a fourth to a full disk cylinder in size
       may be best.  To understand this claim, let us consider the
       effects of large stripes on small files, and small stripes
       on large files.  The stripe size does not affect the read
       performance of small files:  For an array of N drives, the
       file has a 1/N probability of being entirely within one
       stripe on any one of the drives.  Thus, both the read
       latency and bandwidth will be comparable to that of a single
       drive.  Assuming that the small files are statistically well
       distributed around the filesystem, (and, with the ext2fs
       file system, they should be), roughly N times more
       overlapping, concurrent reads should be possible without
       significant collision between them.  Conversely, if very
       small stripes are used, and a large file is read
       sequentially, then a read will issued to all of the disks in
       the array.  For a the read of a single large file, the
       latency will almost double, as the probability of a block
       being 3/4'ths of a revolution or farther away will increase.
       Note, however, the trade-off: the bandwidth could improve
       almost N-fold for reading a single, large file, as N drives
       can be reading simultaneously (that is, if read-ahead is
       used so that all of the disks are kept active).  But there
       is another, counter-acting trade-off:  if all of the drives
  are already busy reading one file, then attempting to read a
  second or third file at the same time will cause significant
  contention, ruining performance as the disk ladder
  algorithms lead to seeks all over the platter.  Thus,  large
  stripes will almost always lead to the best performance. The
  sole exception is the case where one is streaming a single,
  large file at a time, and one requires the top possible
  bandwidth, and one is also using a good read-ahead
  algorithm, in which case small stripes are desired.


  Note that this HOWTO previously recommended small stripe
  sizes for news spools or other systems with lots of small
  files. This was bad advice, and here's why:  news spools
  contain not only many small files, but also large summary
  files, as well as large directories.  If the summary file is
  larger than the stripe size, reading it will cause many
  disks to be accessed, slowing things down as each disk
  performs a seek.  Similarly, the current ext2fs file system
  searches directories in a linear, sequential fashion.  Thus,
  to find a given file or inode, on average half of the
  directory will be read. If this directory is spread across
  several stripes (several disks), the directory read (e.g.
  due to the ls command) could get very slow. Thanks to Steven
  A. Reisman <sar@pressenter.com> for this correction.  Steve
  also adds:

       I found that using a 256k stripe gives much better perfor-
       mance.  I suspect that the optimum size would be the size of
       a disk cylinder (or maybe the size of the disk drive's sec-
       tor cache).  However, disks nowadays have recording zones
       with different sector counts (and sector caches vary among
       different disk models).  There's no way to guarantee stripes
       won't cross a cylinder boundary.



  The tools accept the stripe size specified in KBytes.  You'll want to
  specify a multiple of if the page size for your CPU (4KB on the x86).



  9. Q: What is the correct stride factor to use when creating the
     ext2fs file system on the RAID partition?  By stride, I mean the -R
     flag on the mke2fs command:

     mke2fs -b 4096 -R stride=nnn  ...



  What should the value of nnn be?

       A: The -R stride flag is used to tell the file system about
       the size of the RAID stripes.  Since only RAID-0,4 and 5 use
       stripes, and RAID-1 (mirroring) and RAID-linear do not, this
       flag is applicable only for RAID-0,4,5.

       Knowledge of the size of a stripe allows mke2fs to allocate
       the block and inode bitmaps so that they don't all end up on
       the same physical drive.  An unknown contributor wrote:

       I noticed last spring that one drive in a pair always had a
       larger I/O count, and tracked it down to the these meta-data
       blocks.  Ted added the -R stride= option in response to my
  explanation and request for a workaround.


  For a 4KB block file system, with stripe size 256KB, one would use -R
  stride=64.

  If you don't trust the -R flag, you can get a similar effect in a
  different way.   Steven A. Reisman <sar@pressenter.com> writes:

       Another consideration is the filesystem used on the RAID-0
       device.  The ext2 filesystem allocates 8192 blocks per
       group.  Each group has its own set of inodes.  If there are
       2, 4 or 8 drives, these inodes cluster on the first disk.
       I've distributed the inodes across all drives by telling
       mke2fs to allocate only 7932 blocks per group.


  Some mke2fs pages do not describe the [-g blocks-per-group] flag used
  in this operation.



  10.
     Q: Where can I put the md commands in the startup scripts, so that
     everything will start automatically at boot time?


       A: Rod Wilkens <rwilkens@border.net> writes:

       What I did is put ``mdadd -ar'' in the
       ``/etc/rc.d/rc.sysinit'' right after the kernel loads the
       modules, and before the ``fsck'' disk check.  This way, you
       can put the ``/dev/md?'' device in the ``/etc/fstab''. Then
       I put the ``mdstop -a'' right after the ``umount -a''
       unmounting the disks, in the ``/etc/rc.d/init.d/halt'' file.


  For raid-5, you will want to look at the return code for mdadd, and if
  it failed, do a


       ckraid --fix /etc/raid5.conf



  to repair any damage.



  11.
     Q: I was wondering if it's possible to setup striping with more
     than 2 devices in md0? This is for a news server, and I have 9
     drives... Needless to say I need much more than two.  Is this
     possible?


       A: Yes. (describe how to do this)



  12.
     Q: When is Software RAID superior to Hardware RAID?


  A: Normally, Hardware RAID is considered superior to Soft-
  ware RAID, because hardware controllers often have a large
  cache, and can do a better job of scheduling operations in
  parallel.  However, integrated Software RAID can (and does)
  gain certain advantages from being close to the operating
  system.


  For example, ... ummm. Opaque description of caching of
  reconstructed blocks in buffer cache elided ...


  On a dual PPro SMP system, it has been reported that
  Software-RAID performance exceeds the performance of a well-
  known hardware-RAID board vendor by a factor of 2 to 5.


  Software RAID is also a very interesting option for high-
  availability redundant server systems.  In such a
  configuration, two CPU's are attached to one set or SCSI
  disks.  If one server crashes or fails to respond, then the
  other server can mdadd, mdrun and mount the software RAID
  array, and take over operations.  This sort of dual-ended
  operation is not always possible with many hardware RAID
  controllers, because of the state configuration that the
  hardware controllers maintain.



  13.
     Q: If I upgrade my version of raidtools, will it have trouble
     manipulating older raid arrays?  In short, should I recreate my
     RAID arrays when upgrading the raid utilities?


       A: No, not unless the major version number changes.  An MD
       version x.y.z consists of three sub-versions:

            x:      Major version.
            y:      Minor version.
            z:      Patchlevel version.



       Version x1.y1.z1 of the RAID driver supports a RAID array
       with version x2.y2.z2 in case (x1 == x2) and (y1 >= y2).

       Different patchlevel (z) versions for the same (x.y) version
       are designed to be mostly compatible.


       The minor version number is increased whenever the RAID
       array layout is changed in a way which is incompatible with
       older versions of the driver. New versions of the driver
       will maintain compatibility with older RAID arrays.

       The major version number will be increased if it will no
       longer make sense to support old RAID arrays in the new
       kernel code.


       For RAID-1, it's not likely that the disk layout nor the
       superblock structure will change anytime soon.  Most all Any
       optimization and new features (reconstruction, multithreaded
       tools, hot-plug, etc.) doesn't affect the physical layout.
  14.
     Q: The command mdstop /dev/md0 says that the device is busy.


       A: There's a process that has a file open on /dev/md0, or
       /dev/md0 is still mounted.  Terminate the process or umount
       /dev/md0.



  15.
     Q: Are there performance tools?

       A: There is also a new utility called iotrace in the
       linux/iotrace directory. It reads /proc/io-trace and analy-
       ses/plots it's output.  If you feel your system's block IO
       performance is too low, just look at the iotrace output.



  16.
     Q: I was reading the RAID source, and saw the value SPEED_LIMIT
     defined as 1024K/sec.  What does this mean?  Does this limit
     performance?


       A: SPEED_LIMIT is used to limit RAID reconstruction speed
       during automatic reconstruction.  Basically, automatic
       reconstruction allows you to e2fsck and mount immediately
       after an unclean shutdown, without first running ckraid.
       Automatic reconstruction is also used after a failed hard
       drive has been replaced.


       In order to avoid overwhelming the system while
       reconstruction is occurring, the reconstruction thread
       monitors the reconstruction speed and slows it down if its
       too fast.  The 1M/sec limit was arbitrarily chosen as a
       reasonable rate which allows the reconstruction to finish
       reasonably rapidly, while creating only a light load on the
       system so that other processes are not interfered with.



  17.
     Q: What about ''spindle synchronization'' or ''disk
     synchronization''?

       A: Spindle synchronization is used to keep multiple hard
       drives spinning at exactly the same speed, so that their
       disk platters are always perfectly aligned.  This is used by
       some hardware controllers to better organize disk writes.
       However, for software RAID, this information is not used,
       and spindle synchronization might even hurt performance.



  18.
     Q: How can I set up swap spaces using raid 0?  Wouldn't striped
     swap ares over 4+ drives be really fast?

       A: Leonard N. Zubkoff replies: It is really fast, but you
       don't need to use MD to get striped swap.  The kernel auto-
       matically stripes across equal priority swap spaces.  For
       example, the following entries from /etc/fstab stripe swap
       space across five drives in three groups:
  /dev/sdg1       swap    swap    pri=3
  /dev/sdk1       swap    swap    pri=3
  /dev/sdd1       swap    swap    pri=3
  /dev/sdh1       swap    swap    pri=3
  /dev/sdl1       swap    swap    pri=3
  /dev/sdg2       swap    swap    pri=2
  /dev/sdk2       swap    swap    pri=2
  /dev/sdd2       swap    swap    pri=2
  /dev/sdh2       swap    swap    pri=2
  /dev/sdl2       swap    swap    pri=2
  /dev/sdg3       swap    swap    pri=1
  /dev/sdk3       swap    swap    pri=1
  /dev/sdd3       swap    swap    pri=1
  /dev/sdh3       swap    swap    pri=1
  /dev/sdl3       swap    swap    pri=1



  19.
     Q: I want to maximize performance.  Should I use multiple
     controllers?

       A: In many cases, the answer is yes.  Using several con-
       trollers to perform disk access in parallel will improve
       performance.  However, the actual improvement depends on
       your actual configuration.  For example, it has been
       reported (Vaughan Pratt, January 98) that a single 4.3GB
       Cheetah attached to an Adaptec 2940UW can achieve a rate of
       14MB/sec (without using RAID).  Installing two disks on one
       controller, and using a RAID-0 configuration results in a
       measured performance of 27 MB/sec.


       Note that the 2940UW controller is an "Ultra-Wide" SCSI
       controller, capable of a theoretical burst rate of 40MB/sec,
       and so the above measurements are not surprising.  However,
       a slower controller attached to two fast disks would be the
       bottleneck.  Note also, that most out-board SCSI enclosures
       (e.g. the kind with hot-pluggable trays) cannot be run at
       the 40MB/sec rate, due to cabling and electrical noise
       problems.


       If you are designing a multiple controller system, remember
       that most disks and controllers typically run at 70-85% of
       their rated max speeds.


       Note also that using one controller per disk can reduce the
       likelihood of system outage due to a controller or cable
       failure (In theory -- only if the device driver for the
       controller can gracefully handle a broken controller. Not
       all SCSI device drivers seem to be able to handle such a
       situation without panicking or otherwise locking up).


  9.  High Availability RAID


  1. Q: RAID can help protect me against data loss.  But how can I also
     ensure that the system is up as long as possible, and not prone to
     breakdown?  Ideally, I want a system that is up 24 hours a day, 7
     days a week, 365 days a year.

       A: High-Availability is difficult and expensive.  The harder
       you try to make a system be fault tolerant, the harder and
       more expensive it gets.   The following hints, tips, ideas
       and unsubstantiated rumors may help you with this quest.

       o  IDE disks can fail in such a way that the failed disk on
          an IDE ribbon can also prevent the good disk on the same
          ribbon from responding, thus making it look as if two
          disks have failed.   Since RAID does not protect against
          two-disk failures, one should either put only one disk on
          an IDE cable, or if there are two disks, they should
          belong to different RAID sets.

       o  SCSI disks can fail in such a way that the failed disk on
          a SCSI chain can prevent any device on the chain from
          being accessed.  The failure mode involves a short of the
          common (shared) device ready pin; since this pin is
          shared, no arbitration can occur until the short is
          removed.  Thus, no two disks on the same SCSI chain
          should belong to the same  RAID array.

       o  Similar remarks apply to the disk controllers.  Don't
          load up the channels on one controller; use multiple
          controllers.

       o  Don't use the same brand or model number for all of the
          disks.  It is not uncommon for severe electrical storms
          to take out two or more disks.  (Yes, we all use surge
          suppressors, but these are not perfect either).   Heat &
          poor ventilation of the disk enclosure are other disk
          killers.  Cheap disks often run hot.  Using different
          brands of disk & controller decreases the likelihood that
          whatever took out one disk (heat, physical shock,
          vibration, electrical surge) will also damage the others
          on the same date.

       o  To guard against controller or CPU failure, it should be
          possible to build a SCSI disk enclosure that is "twin-
          tailed": i.e. is connected to two computers.  One
          computer will mount the file-systems read-write, while
          the second computer will mount them read-only, and act as
          a hot spare.  When the hot-spare is able to determine
          that the master has failed (e.g.  through a watchdog), it
          will cut the power to the master (to make sure that it's
          really off), and then fsck & remount read-write.   If
          anyone gets this working, let me know.

       o  Always use an UPS, and perform clean shutdowns.  Although
          an unclean shutdown may not damage the disks, running
          ckraid on even small-ish arrays is painfully slow.   You
          want to avoid running ckraid as much as possible.  Or you
          can hack on the kernel and get the hot-reconstruction
          code debugged ...

       o  SCSI cables are well-known to be very temperamental
          creatures, and prone to cause all sorts of problems.  Use
          the highest quality cabling that you can find for sale.
          Use e.g. bubble-wrap to make sure that ribbon cables to
          not get too close to one another and cross-talk.
          Rigorously observe cable-length restrictions.

       o  Take a look at SSI (Serial Storage Architecture).
          Although it is rather expensive, it is rumored to be less
          prone to the failure modes that SCSI exhibits.


  o  Enjoy yourself, its later than you think.


  10.  Questions Waiting for Answers


  1. Q: If, for cost reasons, I try to mirror a slow disk with a fast
     disk, is the S/W smart enough to balance the reads accordingly or
     will it all slow down to the speed of the slowest?


  2. Q: For testing the raw disk thru put...  is there a character
     device for raw read/raw writes instead of /dev/sdaxx that we can
     use to measure performance on the raid drives??  is there a GUI
     based tool to use to watch the disk thru-put??


  11.  Wish List of Enhancements to MD and Related Software

  Bradley Ward Allen <ulmo@Q.Net> wrote:

       Ideas include:

       o  Boot-up parameters to tell the kernel which devices are
          to be MD devices (no more ``mdadd'')

       o  Making MD transparent to ``mount''/``umount'' such that
          there is no ``mdrun'' and ``mdstop''

       o  Integrating ``ckraid'' entirely into the kernel, and
          letting it run as needed

          (So far, all I've done is suggest getting rid of the
          tools and putting them into the kernel; that's how I feel
          about it, this is a filesystem, not a toy.)

       o  Deal with arrays that can easily survive N disks going
          out simultaneously or at separate moments, where N is a
          whole number > 0 settable by the administrator

       o  Handle kernel freezes, power outages, and other abrupt
          shutdowns better

       o  Don't disable a whole disk if only parts of it have
          failed, e.g., if the sector errors are confined to less
          than 50% of access over the attempts of 20 dissimilar
          requests, then it continues just ignoring those sectors
          of that particular disk.

       o  Bad sectors:

       o  A mechanism for saving which sectors are bad, someplace
          onto the disk.

       o  If there is a generalized mechanism for marking degraded
          bad blocks that upper filesystem levels can recognize,
          use that. Program it if not.

       o  Perhaps alternatively a mechanism for telling the upper
          layer that the size of the disk got smaller, even
          arranging for the upper layer to move out stuff from the
          areas being eliminated.  This would help with a degraded
          blocks as well.

       o  Failing the above ideas, keeping a small (admin settable)
          amount of space aside for bad blocks (distributed evenly
     across disk?), and using them (nearby if possible)
     instead of the bad blocks when it does happen.  Of
     course, this is inefficient.  Furthermore, the kernel
     ought to log every time the RAID array starts each bad
     sector and what is being done about it with a ``crit''
     level warning, just to get the administrator to realize
     that his disk has a piece of dust burrowing into it (or a
     head with platter sickness).

  o  Software-switchable disks:

     ``disable this disk''
        would block until kernel has completed making sure
        there is no data on the disk being shut down that is
        needed (e.g., to complete an XOR/ECC/other error
        correction), then release the disk from use (so it
        could be removed, etc.);

     ``enable this disk''
        would mkraid a new disk if appropriate and then start
        using it for ECC/whatever operations, enlarging the
        RAID5 array as it goes;

     ``resize array''
        would respecify the total number of disks and the
        number of redundant disks, and the result would often
        be to resize the size of the array; where no data loss
        would result, doing this as needed would be nice, but
        I have a hard time figuring out how it would do that;
        in any case, a mode where it would block (for possibly
        hours (kernel ought to log something every ten seconds
        if so)) would be necessary;

     ``enable this disk while saving data''
        which would save the data on a disk as-is and move it
        to the RAID5 system as needed, so that a horrific save
        and restore would not have to happen every time
        someone brings up a RAID5 system (instead, it may be
        simpler to only save one partition instead of two, it
        might fit onto the first as a gzip'd file even);
        finally,

     ``re-enable disk''
        would be an operator's hint to the OS to try out a
        previously failed disk (it would simply call disable
        then enable, I suppose).


  Other ideas off the net:


       o  finalrd analog to initrd, to simplify root raid.

       o  a read-only raid mode, to simplify the above

       o  Mark the RAID set as clean whenever there are no "half
          writes" done. -- That is, whenever there are no write
          transactions that were committed on one disk but still
          unfinished on another disk.

          Add a "write inactivity" timeout (to avoid frequent seeks
          to the RAID superblock when the RAID set is relatively
          busy).



  The Software-RAID HOWTO
  Jakob OEstergaard (jakob@ostenfeld.dk)
  v. 0.90.7 19th of January 2000

  This HOWTO describes how to use Software RAID under Linux. It
  addresses a specific version of the Software RAID layer, namely the
  0.90 RAID layer made by Ingo Molnar and others. This is the RAID layer
  that will be standard in Linux-2.4, and it is the version that is also
  used by Linux-2.2 kernels shipped from some vendors. The 0.90 RAID
  support is available as patches to Linux-2.0 and Linux-2.2, and is by
  many considered far more stable that the older RAID support already in
  those kernels.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Disclaimer
     1.2 Requirements

  2. Why RAID ?

     2.1 Technicalities
     2.2 Terms
     2.3 The RAID levels
        2.3.1 Spare disks
     2.4 Swapping on RAID

  3. Hardware issues

     3.1 IDE Configuration
     3.2 Hot Swap
        3.2.1 Hot-swapping IDE drives
        3.2.2 Hot-swapping SCSI drives
        3.2.3 Hot-swapping with SCA

  4. RAID setup

     4.1 General setup
     4.2 Linear mode
     4.3 RAID-0
     4.4 RAID-1
     4.5 RAID-4
     4.6 RAID-5
     4.7 The Persistent Superblock
     4.8 Chunk sizes
        4.8.1 RAID-0
        4.8.2 RAID-1
        4.8.3 RAID-4
        4.8.4 RAID-5
     4.9 Options for mke2fs
     4.10 Autodetection
     4.11 Booting on RAID
     4.12 Root filesystem on RAID
        4.12.1 Method 1
        4.12.2 Method 2
     4.13 Making the system boot on RAID
        4.13.1 Booting with RAID as module
     4.14 Pitfalls

  5. Testing

     5.1 Simulating a drive failure
     5.2 Simulating data corruption

  6. Reconstruction

     6.1 Recovery from a multiple disk failure

  7. Performance

     7.1 RAID-0
     7.2 RAID-0 with TCQ
     7.3 RAID-5
     7.4 RAID-10

  8. Credits



  ______________________________________________________________________

  1.  Introduction

  For a description of the older RAID layer, the one which is standard
  in 2.0 and 2.2 kernels, see the excellent HOWTO from Linas Vepstas
  (linas@linas.org) available from the Linux Documentation Project at
  linuxdoc.org.

  The home site for this HOWTO is http://ostenfeld.dk/~jakob/Software-
  RAID.HOWTO/, where updated versions appear first.  The howto is
  written by Jakob OEstergaard based on a large number of emails between
  the author and Ingo Molnar (mingo@chiara.csoma.elte.hu) -- one of the
  RAID developers --, the linux-raid mailing list (linux-
  raid@vger.rutgers.edu) and various other people.

  The reason this HOWTO was written even though a Software-RAID HOWTO
  already exists is, that the old HOWTO describes the old-style Software
  RAID found in the standard 2.0 and 2.2 kernels. This HOWTO describes
  the use of the new-style RAID that has been developed more recently.
  The new-style RAID has a lot of features not present in old-style
  RAID.

  If you want to use the new-style RAID with 2.0 or 2.2 kernels, you
  should get a patch for your kernel, either from ftp://ftp.[your-
  country-code].kernel.org/pub/linux/daemons/raid/alpha, or more
  recently from http://people.redhat.com/mingo/ The standard 2.2 kernels
  does not have direct support for the new-style RAID described in this
  HOWTO.  Therefore these patches are needed.  The old-style RAID
  support in standard 2.0 and 2.2 kernels is buggy and lacks several
  important features present in the new-style RAID software.

  As of this writing, the new-style RAID support is being merged into
  the 2.3 development kernels, and will therefore (most likely) be
  present in the 2.4 Linux kernel when that one comes out. But until
  then, the stable kernels must be patched manually.

  You might want to use the -ac kernel releases done by Alan Cox, for
  RAID support in 2.2.  Some of those contain the new-style RAID, and
  that will save you from patching the kernel yourself.

  Some of the information in this HOWTO may seem trivial, if you know
  RAID all ready. Just skip those parts.



  1.1.  Disclaimer

  The mandatory disclaimer:

  Although RAID seems stable for me, and stable for many other people,
  it may not work for you.  If you lose all your data, your job, get hit
  by a truck, whatever, it's not my fault, nor the developers'.  Be
  aware, that you use the RAID software and this information at your own
  risk!  There is no guarantee whatsoever, that any of the software, or
  this information, is in anyway correct, nor suited for any use
  whatsoever. Back up all your data before experimenting with this.
  Better safe than sorry.

  That said, I must also say that I haven't had a single stability
  problem with Software RAID, I use it on quite a few machines with no
  problems what so ever, and I haven't seen other people having problems
  with random crashes or instability caused by RAID.



  1.2.  Requirements

  This HOWTO assumes you are using a late 2.2.x or 2.0.x kernel with a
  matching raid0145 patch and the 0.90 version of the raidtools, or that
  you are using a late 2.3 kernel (version > 2.3.46) or eventually 2.4.
  Both the patches and the tools can be found at
  ftp://ftp.fi.kernel.org/pub/linux/daemons/raid/alpha, and in some
  cases at http://people.redhat.com/mingo/. The RAID patch, the
  raidtools package, and the kernel should all match as close as
  possible. At times it can be necessary to use older kernels if raid
  patches are not available for the latest kernel.



  2.  Why RAID ?

  There can be many good reasons for using RAID. A few are; the ability
  to combine several physical disks into one larger ``virtual'' device,
  performance improvements, and redundancy.



  2.1.  Technicalities

  Linux RAID can work on most block devices. It doesn't matter whether
  you use IDE or SCSI devices, or a mixture. Some people have also used
  the Network Block Device (NBD) with more or less success.

  Be sure that the bus(ses) to the drives are fast enough. You shouldn't
  have 14 UW-SCSI drives on one UW bus, if each drive can give 10 MB/s
  and the bus can only sustain 40 MB/s.  Also, you should only have one
  device per IDE bus. Running disks as master/slave is horrible for
  performance. IDE is really bad at accessing more that one drive per
  bus.  Of Course, all newer motherboards have two IDE busses, so you
  can set up two disks in RAID without buying more controllers.

  The RAID layer has absolutely nothing to do with the filesystem layer.
  You can put any filesystem on a RAID device, just like any other block
  device.



  2.2.  Terms

  The word ``RAID'' means ``Linux Software RAID''. This HOWTO does not
  treat any aspects of Hardware RAID.

  When describing setups, it is useful to refer to the number of disks
  and their sizes. At all times the letter N is used to denote the
  number of active disks in the array (not counting spare-disks). The
  letter S is the size of the smallest drive in the array, unless
  otherwise mentioned. The letter P is used as the performance of one
  disk in the array, in MB/s. When used, we assume that the disks are
  equally fast, which may not always be true.

  Note that the words ``device'' and ``disk'' are supposed to mean about
  the same thing.  Usually the devices that are used to build a RAID
  device are partitions on disks, not necessarily entire disks.  But
  combining several partitions on one disk usually does not make sense,
  so the words devices and disks just mean ``partitions on different
  disks''.



  2.3.  The RAID levels

  Here's a short description of what is supported in the Linux RAID
  patches. Some of this information is absolutely basic RAID info, but
  I've added a few notices about what's special in the Linux
  implementation of the levels.  Just skip this section if you know
  RAID. Then come back when you are having problems   :)

  The current RAID patches for Linux supports the following levels:

  o  Linear mode

  o  Two or more disks are combined into one physical device. The disks
     are ``appended'' to each other, so writing to the RAID device will
     fill up disk 0 first, then disk 1 and so on. The disks does not
     have to be of the same size. In fact, size doesn't matter at all
     here   :)

  o  There is no redundancy in this level. If one disk crashes you will
     most probably lose all your data.  You can however be lucky to
     recover some data, since the filesystem will just be missing one
     large consecutive chunk of data.

  o  The read and write performance will not increase for single
     reads/writes. But if several users use the device, you may be lucky
     that one user effectively is using the first disk, and the other
     user is accessing files which happen to reside on the second disk.
     If that happens, you will see a performance gain.

  o  RAID-0

  o  Also called ``stripe'' mode. Like linear mode, except that reads
     and writes are done in parallel to the devices. The devices should
     have approximately the same size. Since all access is done in
     parallel, the devices fill up equally. If one device is much larger
     than the other devices, that extra space is still utilized in the
     RAID device, but you will be accessing this larger disk alone,
     during writes in the high end of your RAID device. This of course
     hurts performance.

  o  Like linear, there's no redundancy in this level either. Unlike
     linear mode, you will not be able to rescue any data if a drive
     fails. If you remove a drive from a RAID-0 set, the RAID device
     will not just miss one consecutive block of data, it will be filled
     with small holes all over the device. e2fsck will probably not be
     able to recover much from such a device.

  o  The read and write performance will increase, because reads and
     writes are done in parallel on the devices. This is usually the
     main reason for running RAID-0. If the busses to the disks are fast
     enough, you can get very close to N*P MB/sec.

  o  RAID-1

  o  This is the first mode which actually has redundancy. RAID-1 can be
     used on two or more disks with zero or more spare-disks. This mode
     maintains an exact mirror of the information on one disk on the
     other disk(s). Of Course, the disks must be of equal size. If one
     disk is larger than another, your RAID device will be the size of
     the smallest disk.

  o  If up to N-1 disks are removed (or crashes), all data are still
     intact. If there are spare disks available, and if the system (eg.
     SCSI drivers or IDE chipset etc.) survived the crash,
     reconstruction of the mirror will immediately begin on one of the
     spare disks, after detection of the drive fault.
  o  Write performance is the slightly worse than on a single device,
     because identical copies of the data written must be sent to every
     disk in the array.  Read performance is usually pretty bad because
     of an oversimplified read-balancing strategy in the RAID code.
     However, there has been implemented a much improved read-balancing
     strategy, which might be available for the Linux-2.2 RAID patches
     (ask on the linux-kernel list), and which will most likely be in
     the standard 2.4 kernel RAID support.

  o  RAID-4

  o  This RAID level is not used very often. It can be used on three or
     more disks. Instead of completely mirroring the information, it
     keeps parity information on one drive, and writes data to the other
     disks in a RAID-0 like way.  Because one disks is reserved for
     parity information, the size of the array will be (N-1)*S, where S
     is the size of the smallest drive in the array. As in RAID-1, the
     disks should either be of equal size, or you will just have to
     accept that the S in the (N-1)*S formula above will be the size of
     the smallest drive in the array.

  o  If one drive fails, the parity information can be used to
     reconstruct all data.  If two drives fail, all data is lost.

  o  The reason this level is not more frequently used, is because the
     parity information is kept on one drive. This information must be
     updated every time one of the other disks are written to. Thus, the
     parity disk will become a bottleneck, if it is not a lot faster
     than the other disks.  However, if you just happen to have a lot of
     slow disks and a very fast one, this RAID level can be very useful.

  o  RAID-5

  o  This is perhaps the most useful RAID mode when one wishes to
     combine a larger number of physical disks, and still maintain some
     redundancy. RAID-5 can be used on three or more disks, with zero or
     more spare-disks. The resulting RAID-5 device size will be (N-1)*S,
     just like RAID-4. The big difference between RAID-5 and -4 is, that
     the parity information is distributed evenly among the
     participating drives, avoiding the bottleneck problem in RAID-4.

  o  If one of the disks fail, all data are still intact, thanks to the
     parity information. If spare disks are available, reconstruction
     will begin immediately after the device failure.  If two disks fail
     simultaneously, all data are lost. RAID-5 can survive one disk
     failure, but not two or more.

  o  Both read and write performance usually increase, but it's hard to
     predict how much.


  2.3.1.  Spare disks

  Spare disks are disks that do not take part in the RAID set until one
  of the active disks fail.  When a device failure is detected, that
  device is marked as ``bad'' and reconstruction is immediately started
  on the first spare-disk available.

  Thus, spare disks add a nice extra safety to especially RAID-5 systems
  that perhaps are hard to get to (physically). One can allow the system
  to run for some time, with a faulty device, since all redundancy is
  preserved by means of the spare disk.

  You cannot be sure that your system will survive a disk crash. The
  RAID layer should handle device failures just fine, but SCSI drivers
  could be broken on error handling, or the IDE chipset could lock up,
  or a lot of other things could happen.



  2.4.  Swapping on RAID

  There's no reason to use RAID for swap performance reasons. The kernel
  itself can stripe swapping on several devices, if you just give them
  the same priority in the fstab file.

  A nice fstab looks like:

  /dev/sda2       swap           swap    defaults,pri=1   0 0
  /dev/sdb2       swap           swap    defaults,pri=1   0 0
  /dev/sdc2       swap           swap    defaults,pri=1   0 0
  /dev/sdd2       swap           swap    defaults,pri=1   0 0
  /dev/sde2       swap           swap    defaults,pri=1   0 0
  /dev/sdf2       swap           swap    defaults,pri=1   0 0
  /dev/sdg2       swap           swap    defaults,pri=1   0 0


  This setup lets the machine swap in parallel on seven SCSI devices. No
  need for RAID, since this has been a kernel feature for a long time.

  Another reason to use RAID for swap is high availability.  If you set
  up a system to boot on eg. a RAID-1 device, the system should be able
  to survive a disk crash. But if the system has been swapping on the
  now faulty device, you will for sure be going down.  Swapping on the
  RAID-1 device would solve this problem.

  There has been a lot of discussion about whether swap was stable on
  RAID devices. This is a continuing debate, because it depends highly
  on other aspects of the kernel as well.  As of this writing, it seems
  that swapping on RAID should be perfectly stable, except for when the
  array is reconstructing (eg. after a new disk is inserted into a
  degraded array). When 2.4 comes out this is an issue that will most
  likely get addressed fairly quickly, but until then, you should
  stress-test the system yourself until you are either satisfied with
  the stability or conclude that you won't be swapping on RAID.

  You can set up RAID in a swap file on a filesystem on your RAID
  device, or you can set up a RAID device as a swap partition, as you
  see fit.  As usual, the RAID device is just a block device.



  3.  Hardware issues

  This section will mention some of the hardware concerns involved when
  running software RAID.


  3.1.  IDE Configuration

  It is indeed possible to run RAID over IDE disks. And excellent
  performance can be achieved too. In fact, today's price on IDE drives
  and controllers does make IDE something to be considered, when setting
  up new RAID systems.

  o  Physical stability: IDE drives has traditionally been of lower
     mechanical quality than SCSI drives. Even today, the warranty on
     IDE drives is typically one year, whereas it is often three to five
     years on SCSI drives.  Although it is not fair to say, that IDE
     drives are per definition poorly made, one should be aware that IDE
     drives of some brand may fail more often that similar SCSI drives.
     However, other brands use the exact same mechanical setup for both
     SCSI and IDE drives. It all boils down to: All disks fail, sooner
     or later, and one should be prepared for that.

  o  Data integrity: Earlier, IDE had no way of assuring that the data
     sent onto the IDE bus would be the same as the data actually
     written to the disk. This was due to total lack of parity,
     checksums, etc.  With the Ultra-DMA standard, IDE drives now do a
     checksum on the data they receive, and thus it becomes highly
     unlikely that data get corrupted.

  o  Performance: I'm not going to write thoroughly about IDE
     performance here. The really short story is:

  o  IDE drives are fast (12 MB/s and beyond)

  o  IDE has more CPU overhead than SCSI (but who cares?)

  o  Only use one IDE drive per IDE bus, slave disks spoil performance

  o  Fault survival: The IDE driver usually survives a failing IDE
     device. The RAID layer will mark the disk as failed, and if you are
     running RAID levels 1 or above, the machine should work just fine
     until you can take it down for maintenance.

  It is very important, that you only use one IDE disk per IDE bus. Not
  only would two disks ruin the performance, but the failure of a disk
  often guarantees the failure of the bus, and therefore the failure of
  all disks on that bus.  In a fault-tolerant RAID setup (RAID levels
  1,4,5), the failure of one disk can be handled, but the failure of two
  disks (the two disks on the bus that fails due to the failure of the
  one disk) will render the array unusable. Also, when the master drive
  on a bus fails, the slave or the IDE controller may get awfully
  confused. One bus, one drive, that's the rule.

  There are cheap PCI IDE controllers out there. You often get two or
  four busses for around $80. Considering the much lower price of IDE
  disks versus SCSI disks, I'd say an IDE disk array could be a really
  nice solution if one can live with the relatively low (around 8
  probably) disks one can attach to a typical system (unless of course,
  you have a lot of PCI slots for those IDE controllers).

  IDE has major cabling problems though when it comes to large arrays.
  Even if you had enough PCI slots, it's unlikely that you could fit
  much more than 8 disks in a system and still get it running without
  data corruption (caused by too long IDE cables).



  3.2.  Hot Swap

  This has been a hot topic on the linux-kernel list for some time.
  Although hot swapping of drives is supported to some extent, it is
  still not something one can do easily.


  3.2.1.  Hot-swapping IDE drives

  Don't ! IDE doesn't handle hot swapping at all.  Sure, it may work for
  you, if your IDE driver is compiled as a module (only possible in the
  2.2 series of the kernel), and you re-load it after you've replaced
  the drive.  But you may just as well end up with a fried IDE
  controller, and you'll be looking at a lot more down-time than just
  the time it would have taken to replace the drive on a downed system.


  The main problem, except for the electrical issues that can destroy
  your hardware, is that the IDE bus must be re-scanned after disks are
  swapped. The current IDE driver can't do that.  If the new disk is
  100% identical to the old one (wrt. geometry etc.), it may work even
  without re-scanning the bus, but really, you're walking the bleeding
  edge here.


  3.2.2.  Hot-swapping SCSI drives

  Normal SCSI hardware is not hot-swappable either. It may however work.
  If your SCSI driver supports re-scanning the bus, and removing and
  appending devices, you may be able to hot-swap devices. However, on a
  normal SCSI bus you probably shouldn't unplug devices while your
  system is still powered up. But then again, it may just work (and you
  may end up with fried hardware).

  The SCSI layer should survive if a disk dies, but not all SCSI drivers
  handle this yet. If your SCSI driver dies when a disk goes down, your
  system will go with it, and hot-plug isn't really interesting then.


  3.2.3.  Hot-swapping with SCA

  With SCA, it should be possible to hot-plug devices. However, I don't
  have the hardware to try this out, and I haven't heard from anyone
  who's tried, so I can't really give any recipe on how to do this.

  If you want to play with this, you should know about SCSI and RAID
  internals anyway. So I'm not going to write something here that I
  can't verify works, instead I can give a few clues:

  o  Grep for remove-single-device in linux/drivers/scsi/scsi.c

  o  Take a look at raidhotremove and raidhotadd

  Not all SCSI drivers support appending and removing devices. In the
  2.2 series of the kernel, at least the Adaptec 2940 and Symbios
  NCR53c8xx drivers seem to support this, others may and may not. I'd
  appreciate if anyone has additional facts here...



  4.  RAID setup


  4.1.  General setup

  This is what you need for any of the RAID levels:

  o  A kernel. Preferably a stable 2.2.X kernel, or the latest 2.0.X.
     (If 2.4 is out when you read this, go for that one instead)

  o  The RAID patches.  There usually is a patch available for the
     recent kernels. (If you found a 2.4 kernel, the patches are already
     in and you can forget about them)

  o  The RAID tools.

  o  Patience, Pizza, and your favorite caffeinated beverage.

  All this software can be found at ftp://ftp.fi.kernel.org/pub/linux
  The RAID tools and patches are in the daemons/raid/alpha subdirectory.
  The kernels are found in the kernel subdirectory.

  Patch the kernel, configure it to include RAID support for the level
  you want to use.  Compile it and install it.

  Then unpack, configure, compile and install the RAID tools.

  Ok, so far so good.  If you reboot now, you should have a file called
  /proc/mdstat.  Remember it, that file is your friend. See what it
  contains, by doing a cat /proc/mdstat. It should tell you that you
  have the right RAID personality (eg. RAID mode) registered, and that
  no RAID devices are currently active.

  Create the partitions you want to include in your RAID set.

  Now, let's go mode-specific.



  4.2.  Linear mode

  Ok, so you have two or more partitions which are not necessarily the
  same size (but of course can be), which you want to append to each
  other.

  Set up the /etc/raidtab file to describe your setup. I set up a
  raidtab for two disks in linear mode, and the file looked like this:


  raiddev /dev/md0
          raid-level      linear
          nr-raid-disks   2
          chunk-size      32
          persistent-superblock 1
          device          /dev/sdb6
          raid-disk       0
          device          /dev/sdc5
          raid-disk       1


  Spare-disks are not supported here.  If a disk dies, the array dies
  with it. There's no information to put on a spare disk.

  You're probably wondering why we specify a chunk-size here when linear
  mode just appends the disks into one large array with no parallelism.
  Well, you're completely right, it's odd. Just put in some chunk size
  and don't worry about this any more.

  Ok, let's create the array. Run the command

    mkraid /dev/md0



  This will initialize your array, write the persistent superblocks, and
  start the array.

  Have a look in /proc/mdstat. You should see that the array is running.

  Now, you can create a filesystem, just like you would on any other
  device, mount it, include it in your fstab and so on.



  4.3.  RAID-0

  You have two or more devices, of approximately the same size, and you
  want to combine their storage capacity and also combine their
  performance by accessing them in parallel.

  Set up the /etc/raidtab file to describe your configuration. An
  example raidtab looks like:

  raiddev /dev/md0
          raid-level      0
          nr-raid-disks   2
          persistent-superblock 1
          chunk-size     4
          device          /dev/sdb6
          raid-disk       0
          device          /dev/sdc5
          raid-disk       1


  Like in Linear mode, spare disks are not supported here either. RAID-0
  has no redundancy, so when a disk dies, the array goes with it.

  Again, you just run

    mkraid /dev/md0


  to initialize the array. This should initialize the superblocks and
  start the raid device.  Have a look in /proc/mdstat to see what's
  going on. You should see that your device is now running.

  /dev/md0 is now ready to be formatted, mounted, used and abused.



  4.4.  RAID-1

  You have two devices of approximately same size, and you want the two
  to be mirrors of each other. Eventually you have more devices, which
  you want to keep as stand-by spare-disks, that will automatically
  become a part of the mirror if one of the active devices break.

  Set up the /etc/raidtab file like this:

  raiddev /dev/md0
          raid-level      1
          nr-raid-disks   2
          nr-spare-disks  0
          chunk-size     4
          persistent-superblock 1
          device          /dev/sdb6
          raid-disk       0
          device          /dev/sdc5
          raid-disk       1


  If you have spare disks, you can add them to the end of the device
  specification like

          device          /dev/sdd5
          spare-disk      0


  Remember to set the nr-spare-disks entry correspondingly.

  Ok, now we're all set to start initializing the RAID. The mirror must
  be constructed, eg. the contents (however unimportant now, since the
  device is still not formatted) of the two devices must be
  synchronized.
  Issue the

    mkraid /dev/md0


  command to begin the mirror initialization.

  Check out the /proc/mdstat file. It should tell you that the /dev/md0
  device has been started, that the mirror is being reconstructed, and
  an ETA of the completion of the reconstruction.

  Reconstruction is done using idle I/O bandwidth. So, your system
  should still be fairly responsive, although your disk LEDs should be
  glowing nicely.

  The reconstruction process is transparent, so you can actually use the
  device even though the mirror is currently under reconstruction.

  Try formatting the device, while the reconstruction is running. It
  will work.  Also you can mount it and use it while reconstruction is
  running. Of Course, if the wrong disk breaks while the reconstruction
  is running, you're out of luck.



  4.5.  RAID-4

  Note! I haven't tested this setup myself. The setup below is my best
  guess, not something I have actually had up running.

  You have three or more devices of roughly the same size, one device is
  significantly faster than the other devices, and you want to combine
  them all into one larger device, still maintaining some redundancy
  information.  Eventually you have a number of devices you wish to use
  as spare-disks.

  Set up the /etc/raidtab file like this:

  raiddev /dev/md0
          raid-level      4
          nr-raid-disks   4
          nr-spare-disks  0
          persistent-superblock 1
          chunk-size      32
          device          /dev/sdb1
          raid-disk       0
          device          /dev/sdc1
          raid-disk       1
          device          /dev/sdd1
          raid-disk       2
          device          /dev/sde1
          raid-disk       3


  If we had any spare disks, they would be inserted in a similar way,
  following the raid-disk specifications;

          device         /dev/sdf1
          spare-disk     0


  as usual.

  Your array can be initialized with the


     mkraid /dev/md0


  command as usual.

  You should see the section on special options for mke2fs before
  formatting the device.



  4.6.  RAID-5

  You have three or more devices of roughly the same size, you want to
  combine them into a larger device, but still to maintain a degree of
  redundancy for data safety. Eventually you have a number of devices to
  use as spare-disks, that will not take part in the array before
  another device fails.

  If you use N devices where the smallest has size S, the size of the
  entire array will be (N-1)*S. This ``missing'' space is used for
  parity (redundancy) information.  Thus, if any disk fails, all data
  stay intact. But if two disks fail, all data is lost.

  Set up the /etc/raidtab file like this:

  raiddev /dev/md0
          raid-level      5
          nr-raid-disks   7
          nr-spare-disks  0
          persistent-superblock 1
          parity-algorithm        left-symmetric
          chunk-size      32
          device          /dev/sda3
          raid-disk       0
          device          /dev/sdb1
          raid-disk       1
          device          /dev/sdc1
          raid-disk       2
          device          /dev/sdd1
          raid-disk       3
          device          /dev/sde1
          raid-disk       4
          device          /dev/sdf1
          raid-disk       5
          device          /dev/sdg1
          raid-disk       6


  If we had any spare disks, they would be inserted in a similar way,
  following the raid-disk specifications;

          device         /dev/sdh1
          spare-disk     0


  And so on.

  A chunk size of 32 KB is a good default for many general purpose
  filesystems of this size. The array on which the above raidtab is
  used, is a 7 times 6 GB = 36 GB (remember the (n-1)*s = (7-1)*6 = 36)
  device. It holds an ext2 filesystem with a 4 KB block size.  You could
  go higher with both array chunk-size and filesystem block-size if your
  filesystem is either much larger, or just holds very large files.


  Ok, enough talking. You set up the raidtab, so let's see if it works.
  Run the

    mkraid /dev/md0


  command, and see what happens.  Hopefully your disks start working
  like mad, as they begin the reconstruction of your array. Have a look
  in /proc/mdstat to see what's going on.

  If the device was successfully created, the reconstruction process has
  now begun.  Your array is not consistent until this reconstruction
  phase has completed. However, the array is fully functional (except
  for the handling of device failures of course), and you can format it
  and use it even while it is reconstructing.

  See the section on special options for mke2fs before formatting the
  array.

  Ok, now when you have your RAID device running, you can always stop it
  or re-start it using the

    raidstop /dev/md0


  or

    raidstart /dev/md0


  commands.

  Instead of putting these into init-files and rebooting a zillion times
  to make that work, read on, and get autodetection running.



  4.7.  The Persistent Superblock

  Back in ``The Good Old Days'' (TM), the raidtools would read your
  /etc/raidtab file, and then initialize the array.  However, this would
  require that the filesystem on which /etc/raidtab resided was mounted.
  This is unfortunate if you want to boot on a RAID.

  Also, the old approach led to complications when mounting filesystems
  on RAID devices. They could not be put in the /etc/fstab file as
  usual, but would have to be mounted from the init-scripts.

  The persistent superblocks solve these problems. When an array is
  initialized with the persistent-superblock option in the /etc/raidtab
  file, a special superblock is written in the beginning of all disks
  participating in the array. This allows the kernel to read the
  configuration of RAID devices directly from the disks involved,
  instead of reading from some configuration file that may not be
  available at all times.

  You should however still maintain a consistent /etc/raidtab file,
  since you may need this file for later reconstruction of the array.

  The persistent superblock is mandatory if you want auto-detection of
  your RAID devices upon system boot. This is described in the
  Autodetection section.



  4.8.  Chunk sizes

  The chunk-size deserves an explanation.  You can never write
  completely parallel to a set of disks. If you had two disks and wanted
  to write a byte, you would have to write four bits on each disk,
  actually, every second bit would go to disk 0 and the others to disk
  1. Hardware just doesn't support that.  Instead, we choose some chunk-
  size, which we define as the smallest ``atomic'' mass of data that can
  be written to the devices.  A write of 16 KB with a chunk size of 4
  KB, will cause the first and the third 4 KB chunks to be written to
  the first disk, and the second and fourth chunks to be written to the
  second disk, in the RAID-0 case with two disks.  Thus, for large
  writes, you may see lower overhead by having fairly large chunks,
  whereas arrays that are primarily holding small files may benefit more
  from a smaller chunk size.

  Chunk sizes must be specified for all RAID levels, including linear
  mode. However, the chunk-size does not make any difference for linear
  mode.

  For optimal performance, you should experiment with the value, as well
  as with the block-size of the filesystem you put on the array.

  The argument to the chunk-size option in /etc/raidtab specifies the
  chunk-size in kilobytes. So ``4'' means ``4 KB''.


  4.8.1.  RAID-0

  Data is written ``almost'' in parallel to the disks in the array.
  Actually, chunk-size bytes are written to each disk, serially.

  If you specify a 4 KB chunk size, and write 16 KB to an array of three
  disks, the RAID system will write 4 KB to disks 0, 1 and 2, in
  parallel, then the remaining 4 KB to disk 0.

  A 32 KB chunk-size is a reasonable starting point for most arrays. But
  the optimal value depends very much on the number of drives involved,
  the content of the file system you put on it, and many other factors.
  Experiment with it, to get the best performance.


  4.8.2.  RAID-1

  For writes, the chunk-size doesn't affect the array, since all data
  must be written to all disks no matter what.  For reads however, the
  chunk-size specifies how much data to read serially from the
  participating disks.  Since all active disks in the array contain the
  same information, reads can be done in a parallel RAID-0 like manner.


  4.8.3.  RAID-4

  When a write is done on a RAID-4 array, the parity information must be
  updated on the parity disk as well. The chunk-size is the size of the
  parity blocks. If one byte is written to a RAID-4 array, then chunk-
  size bytes will be read from the N-1 disks, the parity information
  will be calculated, and chunk-size bytes written to the parity disk.

  The chunk-size affects read performance in the same way as in RAID-0,
  since reads from RAID-4 are done in the same way.



  4.8.4.  RAID-5

  On RAID-5 the chunk-size has exactly the same meaning as in RAID-4.

  A reasonable chunk-size for RAID-5 is 128 KB, but as always, you may
  want to experiment with this.

  Also see the section on special options for mke2fs.  This affects
  RAID-5 performance.



  4.9.  Options for mke2fs

  There is a special option available when formatting RAID-4 or -5
  devices with mke2fs. The -R stride=nn option will allow mke2fs to
  better place different ext2 specific data-structures in an intelligent
  way on the RAID device.

  If the chunk-size is 32 KB, it means, that 32 KB of consecutive data
  will reside on one disk. If we want to build an ext2 filesystem with 4
  KB block-size, we realize that there will be eight filesystem blocks
  in one array chunk. We can pass this information on the mke2fs
  utility, when creating the filesystem:

    mke2fs -b 4096 -R stride=8 /dev/md0



  RAID-{4,5} performance is severely influenced by this option. I am
  unsure how the stride option will affect other RAID levels. If anyone
  has information on this, please send it in my direction.

  The ext2fs blocksize severely influences the performance of the
  filesystem. You should always use 4KB block size on any filesystem
  larger than a few hundred megabytes, unless you store a very large
  number of very small files on it.



  4.10.  Autodetection

  Autodetection allows the RAID devices to be automatically recognized
  by the kernel at boot-time, right after the ordinary partition
  detection is done.

  This requires several things:

  1. You need autodetection support in the kernel. Check this

  2. You must have created the RAID devices using persistent-superblock

  3. The partition-types of the devices used in the RAID must be set to
     0xFD  (use fdisk and set the type to ``fd'')

  NOTE: Be sure that your RAID is NOT RUNNING before changing the
  partition types.  Use raidstop /dev/md0 to stop the device.

  If you set up 1, 2 and 3 from above, autodetection should be set up.
  Try rebooting.  When the system comes up, cat'ing /proc/mdstat should
  tell you that your RAID is running.

  During boot, you could see messages similar to these:



   Oct 22 00:51:59 malthe kernel: SCSI device sdg: hdwr sector= 512
    bytes. Sectors= 12657717 [6180 MB] [6.2 GB]
   Oct 22 00:51:59 malthe kernel: Partition check:
   Oct 22 00:51:59 malthe kernel:  sda: sda1 sda2 sda3 sda4
   Oct 22 00:51:59 malthe kernel:  sdb: sdb1 sdb2
   Oct 22 00:51:59 malthe kernel:  sdc: sdc1 sdc2
   Oct 22 00:51:59 malthe kernel:  sdd: sdd1 sdd2
   Oct 22 00:51:59 malthe kernel:  sde: sde1 sde2
   Oct 22 00:51:59 malthe kernel:  sdf: sdf1 sdf2
   Oct 22 00:51:59 malthe kernel:  sdg: sdg1 sdg2
   Oct 22 00:51:59 malthe kernel: autodetecting RAID arrays
   Oct 22 00:51:59 malthe kernel: (read) sdb1's sb offset: 6199872
   Oct 22 00:51:59 malthe kernel: bind<sdb1,1>
   Oct 22 00:51:59 malthe kernel: (read) sdc1's sb offset: 6199872
   Oct 22 00:51:59 malthe kernel: bind<sdc1,2>
   Oct 22 00:51:59 malthe kernel: (read) sdd1's sb offset: 6199872
   Oct 22 00:51:59 malthe kernel: bind<sdd1,3>
   Oct 22 00:51:59 malthe kernel: (read) sde1's sb offset: 6199872
   Oct 22 00:51:59 malthe kernel: bind<sde1,4>
   Oct 22 00:51:59 malthe kernel: (read) sdf1's sb offset: 6205376
   Oct 22 00:51:59 malthe kernel: bind<sdf1,5>
   Oct 22 00:51:59 malthe kernel: (read) sdg1's sb offset: 6205376
   Oct 22 00:51:59 malthe kernel: bind<sdg1,6>
   Oct 22 00:51:59 malthe kernel: autorunning md0
   Oct 22 00:51:59 malthe kernel: running: <sdg1><sdf1><sde1><sdd1><sdc1><sdb1>
   Oct 22 00:51:59 malthe kernel: now!
   Oct 22 00:51:59 malthe kernel: md: md0: raid array is not clean --
    starting background reconstruction


  This is output from the autodetection of a RAID-5 array that was not
  cleanly shut down (eg. the machine crashed).  Reconstruction is auto-
  matically initiated.  Mounting this device is perfectly safe, since
  reconstruction is transparent and all data are consistent (it's only
  the parity information that is inconsistent - but that isn't needed
  until a device fails).

  Autostarted devices are also automatically stopped at shutdown.  Don't
  worry about init scripts.  Just use the /dev/md devices as any other
  /dev/sd or /dev/hd devices.

  Yes, it really is that easy.

  You may want to look in your init-scripts for any raidstart/raidstop
  commands. These are often found in the standard RedHat init scripts.
  They are used for old-style RAID, and has no use in new-style RAID
  with autodetection. Just remove the lines, and everything will be just
  fine.



  4.11.  Booting on RAID

  There are several ways to set up a system that mounts it's root
  filesystem on a RAID device.  At the moment, only the graphical
  install of RedHat Linux 6.1 allows direct installation to a RAID
  device.  So most likely you're in for a little tweaking if you want
  this, but it is indeed possible.

  The latest official lilo distribution (Version 21) doesn't handle RAID
  devices, and thus the kernel cannot be loaded at boot-time from a RAID
  device. If you use this version, your /boot filesystem will have to
  reside on a non-RAID device.  A way to ensure that your system boots
  no matter what is, to create similar /boot partitions on all drives in
  your RAID, that way the BIOS can always load data from eg. the first
  drive available.  This requires that you do not boot with a failed
  disk in your system.

  With redhat 6.1 a patch to lilo 21 has become available that can
  handle /boot on RAID-1. Note that it doesn't work for any other level,
  RAID-1 (mirroring) is the only supported RAID level. This patch
  (lilo.raid1) can be found in
  dist/redhat-6.1/SRPMS/SRPMS/lilo-0.21-10.src.rpm on any redhat mirror.
  The patched version of LILO will accept boot=/dev/md0 in lilo.conf and
  will make each disk in the mirror bootable.

  Another way of ensuring that your system can always boot is, to create
  a boot floppy when all the setup is done. If the disk on which the
  /boot filesystem resides dies, you can always boot from the floppy.



  4.12.  Root filesystem on RAID

  In order to have a system booting on RAID, the root filesystem (/)
  must be mounted on a RAID device. Two methods for achieving this is
  supplied bellow. Because none of the current distributions (that I
  know of at least) support installing on a RAID device, the methods
  assume that you install on a normal partition, and then - when the
  installation is complete - move the contents of your non-RAID root
  filesystem onto a new RAID device.


  4.12.1.  Method 1

  This method assumes you have a spare disk you can install the system
  on, which is not part of the RAID you will be configuring.


  o  First, install a normal system on your extra disk.

  o  Get the kernel you plan on running, get the raid-patches and the
     tools, and make your system boot with this new RAID-aware kernel.
     Make sure that RAID-support is in the kernel, and is not loaded as
     modules.

  o  Ok, now you should configure and create the RAID you plan to use
     for the root filesystem. This is standard procedure, as described
     elsewhere in this document.

  o  Just to make sure everything's fine, try rebooting the system to
     see if the new RAID comes up on boot. It should.

  o  Put a filesystem on the new array (using mke2fs), and mount it
     under /mnt/newroot

  o  Now, copy the contents of your current root-filesystem (the spare
     disk) to the new root-filesystem (the array). There are lots of
     ways to do this, one of them is

      cd /
      find . -xdev | cpio -pm /mnt/newroot



  o  You should modify the /mnt/newroot/etc/fstab file to use the
     correct device (the /dev/md? root device) for the root filesystem.

  o  Now, unmount the current /boot filesystem, and mount the boot
     device on /mnt/newroot/boot instead. This is required for LILO to
     run successfully in the next step.

  o  Update /mnt/newroot/etc/lilo.conf to point to the right devices.
     The boot device must still be a regular disk (non-RAID device), but
     the root device should point to your new RAID. When done, run

      lilo -r /mnt/newroot

     complete with no errors.

  o  Reboot the system, and watch everything come up as expected  :)

  If you're doing this with IDE disks, be sure to tell your BIOS that
  all disks are ``auto-detect'' types, so that the BIOS will allow your
  machine to boot even when a disk is missing.


  4.12.2.  Method 2

  This method requires that you use a raidtools/patch that includes the
  failed-disk directive. This will be the tools/patch for all kernels
  from 2.2.10 and later.

  You can only use this method on RAID levels 1 and above.  The idea is
  to install a system on a disk which is purposely marked as failed in
  the RAID, then copy the system to the RAID which will be running in
  degraded mode, and finally making the RAID use the no-longer needed
  ``install-disk'', zapping the old installation but making the RAID run
  in non-degraded mode.


  o  First, install a normal system on one disk (that will later become
     part of your RAID). It is important that this disk (or partition)
     is not the smallest one. If it is, it will not be possible to add
     it to the RAID later on!

  o  Then, get the kernel, the patches, the tools etc. etc. You know the
     drill. Make your system boot with a new kernel that has the RAID
     support you need, compiled into the kernel.

  o  Now, set up the RAID with your current root-device as the failed-
     disk in the raidtab file. Don't put the failed-disk as the first
     disk in the raidtab, that will give you problems with starting the
     RAID. Create the RAID, and put a filesystem on it.

  o  Try rebooting and see if the RAID comes up as it should

  o  Copy the system files, and reconfigure the system to use the RAID
     as root-device, as described in the previous section.

  o  When your system successfully boots from the RAID, you can modify
     the raidtab file to include the previously failed-disk as a normal
     raid-disk. Now, raidhotadd the disk to your RAID.

  o  You should now have a system that can boot from a non-degraded
     RAID.



  4.13.  Making the system boot on RAID

  For the kernel to be able to mount the root filesystem, all support
  for the device on which the root filesystem resides, must be present
  in the kernel. Therefore, in order to mount the root filesystem on a
  RAID device, the kernel must have RAID support.

  The normal way of ensuring that the kernel can see the RAID device is
  to simply compile a kernel with all necessary RAID support compiled
  in. Make sure that you compile the RAID support into the kernel, and
  not as loadable modules. The kernel cannot load a module (from the
  root filesystem) before the root filesystem is mounted.

  However, since RedHat-6.0 ships with a kernel that has new-style RAID
  support as modules, I here describe how one can use the standard
  RedHat-6.0 kernel and still have the system boot on RAID.


  4.13.1.  Booting with RAID as module

  You will have to instruct LILO to use a RAM-disk in order to achieve
  this. Use the mkinitrd command to create a ramdisk containing all
  kernel modules needed to mount the root partition. This can be done
  as:

   mkinitrd --with=<module> <ramdisk name> <kernel>


  For example:

   mkinitrd --with=raid5 raid-ramdisk 2.2.5-22



  This will ensure that the specified RAID module is present at boot-
  time, for the kernel to use when mounting the root device.



  4.14.  Pitfalls

  Never NEVER never re-partition disks that are part of a running RAID.
  If you must alter the partition table on a disk which is a part of a
  RAID, stop the array first, then repartition.

  It is easy to put too many disks on a bus. A normal Fast-Wide SCSI bus
  can sustain 10 MB/s which is less than many disks can do alone today.
  Putting six such disks on the bus will of course not give you the
  expected performance boost.

  More SCSI controllers will only give you extra performance, if the
  SCSI busses are nearly maxed out by the disks on them.  You will not
  see a performance improvement from using two 2940s with two old SCSI
  disks, instead of just running the two disks on one controller.

  If you forget the persistent-superblock option, your array may not
  start up willingly after it has been stopped.  Just re-create the
  array with the option set correctly in the raidtab.

  If a RAID-5 fails to reconstruct after a disk was removed and re-
  inserted, this may be because of the ordering of the devices in the
  raidtab. Try moving the first ``device ...'' and ``raid-disk ...''
  pair to the bottom of the array description in the raidtab file.

  Most of the ``error reports'' we see on linux-kernel, are from people
  who somehow failed to use the right RAID-patch with the right version
  of the raidtools. Make sure that if you're running 0.90 RAID, you're
  using the raidtools for it



  5.  Testing

  If you plan to use RAID to get fault-tolerance, you may also want to
  test your setup, to see if it really works.  Now, how does one
  simulate a disk failure ?

  The short story is, that you can't, except perhaps for putting a fire
  axe thru the drive you want to ``simulate'' the fault on.  You can
  never know what will happen if a drive dies. It may electrically take
  the bus it's attached to with it, rendering all drives on that bus
  inaccessible. I've never heard of that happening though. The drive may
  also just report a read/write fault to the SCSI/IDE layer, which in
  turn makes the RAID layer handle this situation gracefully.  This is
  fortunately the way things often go.


  5.1.  Simulating a drive failure

  If you want to simulate a drive failure, then plug out the drive. You
  should do this with the power off.  If you are interested in testing
  whether your data can survive with a disk less than the usual number,
  there is no point in being a hot-plug cowboy here. Take the system
  down, unplug the disk, and boot it up again.

  Look in the syslog, and look at /proc/mdstat to see how the RAID is
  doing.  Did it work ?

  Remember, that you must be running RAID-{1,4,5} for your array to be
  able to survive a disk failure.  Linear- or RAID-0 will fail
  completely when a device is missing.

  When you've re-connected the disk again (with the power off, of
  course, remember), you can add the ``new'' device to the RAID again,
  with the raidhotadd command.


  5.2.  Simulating data corruption

  RAID (be it hardware- or software-), assumes that if a write to a disk
  doesn't return an error, then the write was successful. Therefore, if
  your disk corrupts data without returning an error, your data will
  become corrupted.  This is of course very unlikely to happen, but it
  is possible, and it would result in a corrupt filesystem.

  RAID cannot and is not supposed to guard against data corruption on
  the media. Therefore, it doesn't make any sense either, to purposely
  corrupt data (using dd for example) on a disk to see how the RAID
  system will handle that.  It is most likely (unless you corrupt the
  RAID superblock) that the RAID layer will never find out about the
  corruption, but your filesystem on the RAID device will be corrupted.

  This is the way things are supposed to work.  RAID is not a guarantee
  for data integrity, it just allows you to keep your data if a disk
  dies (that is, with RAID levels above or equal one, of course).



  6.  Reconstruction

  If you've read the rest of this HOWTO, you should already have a
  pretty good idea about what reconstruction of a degraded RAID
  involves. I'll summarize:

  o  Power down the system

  o  Replace the failed disk

  o  Power up the system once again.


  o  Use raidhotadd /dev/mdX /dev/sdX to re-insert the disk in the array

  o  Have coffee while you watch the automatic reconstruction running

     And that's it.

  Well, it usually is, unless you're unlucky and you RAID has been
  rendered unusable because more disks than the ones redundant failed.
  This can actually happen if a number of disks reside on the same bus,
  and one disk takes the bus with it as it crashes. The other disks,
  however fine, will be unreachable to the RAID layer, because the bus
  is down, and they will be marked as faulty.  On a RAID-5 where you can
  spare one disk, loosing two or more disks can be fatal.

  The following section is the explanation that Martin Bene gave to me,
  and describes a possible recovery from the scary scenario outlined
  above. It involves using the failed-disk directive in your
  /etc/raidtab, so this will only work on kernels 2.2.10 and later.


  6.1.  Recovery from a multiple disk failure

  The scenario is:

  o  A controller dies and takes two disks offline at the same time,

  o  All disks on one scsi bus can no longer be reached if a disk dies,

  o  A cable comes loose...

     In short: quite often you get a temporary failure of several disks
     at once; afterwards the RAID superblocks are out of sync and you
     can no longer init your RAID array.

  One thing left: rewrite the RAID superblocks by mkraid --force

  To get this to work, you'll need to have an up to date /etc/raidtab -
  if it doesn't EXACTLY match devices and ordering of the original disks
  this won't work.

  Look at the sylog produced by trying to start the array, you'll see
  the event count for each superblock; usually it's best to leave out
  the disk with the lowest event count, i.e the oldest one.

  If you mkraid without failed-disk, the recovery thread will kick in
  immediately and start rebuilding the parity blocks - not necessarily
  what you want at that moment.

  With failed-disk you can specify exactly which disks you want to be
  active and perhaps try different combinations for best results. BTW,
  only mount the filesystem read-only while trying this out... This has
  been successfully used by at least two guys I've been in contact with.



  7.  Performance

  This section contains a number of benchmarks from a real-world system
  using software RAID.

  Benchmarks are done with the bonnie program, and at all times on files
  twice- or more the size of the physical RAM in the machine.

  The benchmarks here only measures input and output bandwidth on one
  large single file.  This is a nice thing to know, if it's maximum I/O
  throughput for large reads/writes one is interested in.  However, such
  numbers tell us little about what the performance would be if the
  array was used for a news spool, a web-server, etc. etc.  Always keep
  in mind, that benchmarks numbers are the result of running a
  ``synthetic'' program. Few real-world programs do what bonnie does,
  and although these I/O numbers are nice to look at, they are not
  ultimate real-world-appliance performance indicators. Not even close.

  For now, I only have results from my own machine. The setup is:

  o  Dual Pentium Pro 150 MHz

  o  256 MB RAM (60 MHz EDO)

  o  Three IBM UltraStar 9ES 4.5 GB, SCSI U2W

  o  Adaptec 2940U2W

  o  One IBM UltraStar 9ES 4.5 GB, SCSI UW

  o  Adaptec 2940 UW

  o  Kernel 2.2.7 with RAID patches

  The three U2W disks hang off the U2W controller, and the UW disk off
  the UW controller.

  It seems to be impossible to push much more than 30 MB/s thru the SCSI
  busses on this system, using RAID or not. My guess is, that because
  the system is fairly old, the memory bandwidth sucks, and thus limits
  what can be sent thru the SCSI controllers.


  7.1.  RAID-0

  Read is Sequential block input, and Write is Sequential block output.
  File size was 1GB in all tests. The tests where done in single-user
  mode. The SCSI driver was configured not to use tagged command
  queuing.

        |            |              |             |              |
        |Chunk size  |  Block size  |  Read KB/s  |  Write KB/s  |
        |            |              |             |              |
        |4k          |  1k          |  19712      |  18035       |
        |4k          |  4k          |  34048      |  27061       |
        |8k          |  1k          |  19301      |  18091       |
        |8k          |  4k          |  33920      |  27118       |
        |16k         |  1k          |  19330      |  18179       |
        |16k         |  2k          |  28161      |  23682       |
        |16k         |  4k          |  33990      |  27229       |
        |32k         |  1k          |  19251      |  18194       |
        |32k         |  4k          |  34071      |  26976       |


  From this it seems that the RAID chunk-size doesn't make that much of
  a difference. However, the ext2fs block-size should be as large as
  possible, which is 4KB (eg. the page size) on IA-32.


  7.2.  RAID-0 with TCQ

  This time, the SCSI driver was configured to use tagged command
  queuing, with a queue depth of 8. Otherwise, everything's the same as
  before.



        |            |              |             |              |
        |Chunk size  |  Block size  |  Read KB/s  |  Write KB/s  |
        |            |              |             |              |
        |32k         |  4k          |  33617      |  27215       |

  No more tests where done. TCQ seemed to slightly increase write
  performance, but there really wasn't much of a difference at all.


  7.3.  RAID-5

  The array was configured to run in RAID-5 mode, and similar tests
  where done.

        |            |              |             |              |
        |Chunk size  |  Block size  |  Read KB/s  |  Write KB/s  |
        |            |              |             |              |
        |8k          |  1k          |  11090      |  6874        |
        |8k          |  4k          |  13474      |  12229       |
        |32k         |  1k          |  11442      |  8291        |
        |32k         |  2k          |  16089      |  10926       |
        |32k         |  4k          |  18724      |  12627       |


  Now, both the chunk-size and the block-size seems to actually make a
  difference.


  7.4.  RAID-10

  RAID-10 is ``mirrored stripes'', or, a RAID-1 array of two RAID-0
  arrays. The chunk-size is the chunk sizes of both the RAID-1 array and
  the two RAID-0 arrays. I did not do test where those chunk-sizes
  differ, although that should be a perfectly valid setup.

        |            |              |             |              |
        |Chunk size  |  Block size  |  Read KB/s  |  Write KB/s  |
        |            |              |             |              |
        |32k         |  1k          |  13753      |  11580       |
        |32k         |  4k          |  23432      |  22249       |


  No more tests where done. The file size was 900MB, because the four
  partitions involved where 500 MB each, which doesn't give room for a
  1G file in this setup (RAID-1 on two 1000MB arrays).



  8.  Credits

  The following people contributed to the creation of this
  documentation:

  o  Ingo Molnar

  o  Jim Warren

  o  Louis Mandelstam

  o  Allan Noah

  o  Yasunori Taniike

  o  Martin Bene


  o  Bennett Todd

  o  The Linux-RAID mailing list people

  o  The ones I forgot,  sorry   :)

  Please submit corrections, suggestions etc. to the author. It's the
  only way this HOWTO can improve.



  Software Release Practice HOWTO
  Eric S. Raymond <esr@thyrsus.com>
  2.3, 1 June 2000

  This HOWTO describes good release practices for Linux open-source pro
  jects.  By following these practices, you will make it as easy as pos
  sible for users to build your code and use it, and for other develop
  ers to understand your code and cooperate with you to improve it.
  This document is a must-read for novice developers.  Experienced
  developers should review it when they are about to release a new pro
  ject.  It will be revised periodically to reflect the evolution of
  good-practice standards.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Why this document?
     1.2 New versions of this document

  2. Good project- and archive- naming practice

     2.1 Use GNU-style names with a stem and major.minor.patch numbering.
     2.2 But respect local conventions where appropriate
     2.3 Try hard to choose a name prefix that is unique and easy to type

  3. Good licensing and copyright practice: the theory

     3.1 Open source and copyrights
     3.2 What qualifies as open source

  4. Good licensing and copyright practice: the practice

     4.1 Make yourself or the FSF the copyright holder
     4.2 Use a license conformant to the Open Source Definition
     4.3 Don't write your own license if you can possibly avoid it.

  5. Good development practice

     5.1 Write either pure ANSI C or a portable scripting language
     5.2 Follow good C portability practices
     5.3 Use autoconf/automake/autoheader
     5.4 Sanity-check your code before release
     5.5 Sanity-check your documentation and READMEs before release

  6. Good distribution-making practice

     6.1 Make sure tarballs always unpack into a single new directory
     6.2 Have a README
     6.3 Respect and follow standard file naming practices
     6.4 Design for Upgradability
     6.5 Provide RPMs

  7. Good communication practice

     7.1 Announce to c.o.l.a and Freshmeat
     7.2 Announce to a relevant topic newsgroup
     7.3 Have a website
     7.4 Host project mailing lists
     7.5 Release to major archives

  8. Good project-management practice


  ______________________________________________________________________

  1.  Introduction


  1.1.  Why this document?

  There is a large body of good-practice traditions for open-source code
  that helps other people port, use, and cooperate with developing it.
  Some of these conventions are traditional in the Unix world and
  predate Linux; others have developed recently in response to
  particular new tools and technologies such as the World Wide Web.

  This document will help you learn good practice.  It is organized into
  topic sections, each containing a series of checklist items.  Think of
  these as a pre-flight checklist for your distribution.


  1.2.  New versions of this document

  This document will be posted monthly to the newsgroups
  comp.os.linux.answers . The document is archived on a number of Linux
  FTP sites, including metalab.unc.edu in pub/Linux/docs/HOWTO.

  You can also view the latest version of this HOWTO on the World Wide
  Web via the URL  <http://metalab.unc.edu/LDP/HOWTO/Software-Release-
  Practice.html>.

  Feel free to mail any questions or comments about this HOWTO to Eric
  S. Raymond, esr@snark.thyrsus.com <mailto:esr@snark.thyrsus.com>.


  2.  Good project- and archive- naming practice

  As the load on maintainers of archives like Metalab, the PSA site and
  CPAN increases, there is an increasing trend for submissions to be
  processed partly or wholly by programs (rather than entirely by a
  human).

  This makes it more important for project and archive-file names to fit
  regular patterns that computer programs can parse and understand.


  2.1.  Use GNU-style names with a stem and major.minor.patch numbering.

  It's helpful to everybody if your archive files all have GNU-like
  names -- all-lower-case alphanumeric stem prefix, followed by a dash,
  followed by a version number, extension, and other suffixes.

  Let's suppose you have a project you call `foobar' at version 1,
  release 2, level 3.  If it's got just one archive part (presumably the
  sources), here's what its names should look


     foobar-1.2.3.tar.gz
        The source archive


     foobar.lsm
        The LSM file (assuming you're submitting to Metalab).


  Please don't use these:



     foobar123.tar.gz
        This looks to many programs like an archive for a project
        called`foobar123' with no version number.


     foobar1.2.3.tar.gz
        This looks to many programs like an archive for a project called
        `foobar1' at version 2.3.


     foobar-v1.2.3.tar.gz
        Many programs think this goes with a project called `foobar-v1'.


     foo_bar-1.2.3.tar.gz
        The underscore is hard for people to speak, type, and remember


     FooBar-1.2.3.tar.gz
        Unless you like looking like a marketing weenie.  This is also
        hard for people to speak, type, and remember.

  If you have to differentiate between source and binary archives, or
  between different kinds of binary, or express some kind of build
  option in the file name, please treat that as a file extension to go
  after the version number. That is, please do this:


     foobar-1.2.3.src.tar.gz
        sources


     foobar-1.2.3.bin.tar.gz
        binaries, type not specified


     foobar-1.2.3.bin.ELF.tar.gz
        ELF binaries


     foobar-1.2.3.bin.ELF.static.tar.gz
        ELF binaries statically linked


     foobar-1.2.3.bin.SPARC.tar.gz
        SPARC binaries

  Please don't use names like `foobar-ELF-1.2.3.tar.gz', because
  programs have a hard time telling type infixes (like `-ELF') from the
  stem.

  A good general form of name has these parts in order:


  1. project prefix

  2. dash

  3. version number

  4. dot

  5. "src" or "bin" (optional)

  6. dot or dash (dot preferred)

  7. binary type and options (optional)

  8. archiving and compression extensions


  2.2.  But respect local conventions where appropriate

  Some projects and communities have well-defined conventions for names
  and version numbers that aren't necessarily compatible with the above
  advice.  For instance, Apache modules are generally named like
  mod_foo, and have both their own version number and the version of
  Apache with which they work.  Likewise, Perl modules have version
  numbers that can be treated as floating point numbers (e.g., you might
  see 1.303 rather than 1.3.3), and the distributions are generally
  named Foo-Bar-1.303.tar.gz for version 1.303 of module Foo::Bar.

  Look for and respect the conventions of specialized communities and
  developers; for general use, follow the above guidelines.

  2.3.  Try hard to choose a name prefix that is unique and easy to type

  The stem prefix should be common to all a project's files, and it
  should be easy to read, type, and remember.  So please don't use
  underscores.  And don't capitalize or BiCapitalize without extremely
  good reason -- it messes up the natural human-eyeball search order and
  looks like some marketing weenie trying to be clever.

  It confuses people when two different projects have the same stem
  name.  So try to check for collisions before your first release.  A
  good place to check is the index file of Metalab
  <http://metalab.unc.edu/pub/Linux>.


  3.  Good licensing and copyright practice: the theory

  The license you choose defines the social contract you wish to set up
  among your co-developers and users.  The copyright you put on the
  software will function mainly as a legal assertion of your right to
  set license terms on the software and derivative works of the
  software.


  3.1.  Open source and copyrights

  Anything that is not public domain has a copyright, possibly more than
  one.  Under the Berne Convention (which has been U.S. law since 1978),
  the copyright does not have to be explicit.  That is, the authors of a
  work hold copyright even if there is no copyright notice.


  Who counts as an author can be very complicated, especially for
  software that has been worked on by many hands.  This is why licenses
  are important.  By setting out the terms under which material can be
  used, they grant rights to the users that protect them from arbitrary
  actions by the copyright holders.


  In proprietary software, the license terms are designed to protect the
  copyright.  They're a way of granting a few rights to users while
  reserving as much legal territory is possible for the owner (the
  copyright holder).  The copyright holder is very important, and the
  license logic so restrictive that the exact technicalities of the
  license terms are usually unimportant.

  In open-source software, the situation is usually the exact opposite;
  the copyright exists to protect the license.  The only rights the
  copyright holder always keeps are to enforce the license.  Otherwise,
  only a few rights are reserved and most choices pass to the user.  In
  particular, the copyright holder cannot change the terms on a copy you
  already have.  Therefore, in open-source software the copyright holder
  is almost irrelevant -- but the license terms are very important.

  Normally the copyright holder of a project is the current project
  leader or sponsoring organization.  Transfer of the project to a new
  leader is often signaled by changing the copyright holder.  However,
  this is not a hard and fast rule; many open-source projects have
  multiple copyright holders, and there is no instance on record of this
  leading to legal problems.

  Some projects choose to assign copyright to the Free Software
  Foundation, on the theory that it has an interest in defending open
  source and lawyers available to do it.


  3.2.  What qualifies as open source

  For licensing purposes, we can distinguish several different kinds of
  rights that a license may convey.  Rights to copy and redistribute,
  rights to use, rights to modify for personal use, and rights to
  redistribute modified copies.  A license may restrict or attach
  conditions to any of these rights.

  The Open Source Initiative <http://www.opensource.org> is the result
  of a great deal of thought about what makes software ``open source''
  or (in older terminology) ``free''.  Its constraints on licensing
  require that:


  1. An unlimited right to copy be granted.

  2. An unlimited right to use be granted.

  3. An unlimited right to modify for personal use be granted.

  The guidelines prohibit restrictions on redistribution of modified
  binaries; this meets the needs of software distributors, who need to
  be able to ship working code without encumbrance.  It allows authors
  to require that modified sources be redistributed as pristine sources
  plus patches, thus establishing the author's intentions and an ``audit
  trail'' of any changes by others.

  The OSD is the legal definition of the `OSI Certified Open Source'
  certification mark, and as good a definition of ``free software'' as
  anyone has ever come up with.  All of the standard licenses (MIT, BSD,
  Artistic, and GPL/LGPL) meet it (though some, like GPL, have other
  restrictions which you should understand before choosing it).

  Note that licenses which allow noncommercial use only do not qualify
  as open-source licenses, even if they are decorated with ``GPL'' or
  some other standard license.  They discriminate against particular
  occupations, persons, and groups.  They make life too complicated for
  CD-ROM distributors and others trying to spread open-source software
  commercially.


  4.  Good licensing and copyright practice: the practice

  Here's how to translate the theory above into practice:



  4.1.  Make yourself or the FSF the copyright holder

  In some cases, if you have a sponsoring organization behind you with
  lawyers, you might wish to give copyright to that organization.


  4.2.  Use a license conformant to the Open Source Definition

  The Open Source Definition is the community gold standard for
  licenses.  The OSD is not a license itself; rather, it defines a
  minimum set of rights that a license must guarantee in order to be
  considered an open-source license.  The OSD, and supporting materials,
  may be found at the web site of the Open Source Initiative
  <http://www.opensource.org>.


  4.3.  Don't write your own license if you can possibly avoid it.

  The widely-known OSD-conformant licenses have well-established
  interpretive traditions.  Developers (and, to the extent they care,
  users) know what they imply, and have a reasonable take on the risks
  and tradeoffs they involve.  Therefore, use one of the standard
  licenses carried on the OSI site if at all possible.

  If you must write your own license, be sure to have it certified by
  OSI.  This will avoid a lot of argument and overhead.  Unless you've
  been through it, you have no idea how nasty a licensing flamewar can
  get; people become passionate because the licenses are regarded as
  almost-sacred covenants touching the core values of the open-source
  community.

  Furthermore, the presence of an established interpretive tradition may
  prove important if your license is ever tested in court.  At time of
  writing (late 1999) there is no case law either supporting or
  invalidating any open-source license.  However, it is a legal doctrine
  (at least in the U.S., and probably in other common-law countries such
  as England and the rest of the British Commonwealth) that courts are
  supposed to interpret licenses and contracts according to the
  expectations and practices of the community in which they originated.


  5.  Good development practice

  Most of these are concerned with ensuring portability, not only across
  Linuxes but to other Unixes as well.  Being portable to other Unixes
  is not just a worthy form of professionalism and hackerly politeness,
  it's valuable insurance against future changes in Linux itself.

  Finally, other people will try to build your code on non-Linux
  systems; portability minimizes the number of annoying perplexed email
  messages you will get.


  5.1.  Write either pure ANSI C or a portable scripting language

  For portability and stability, you should write either in ANSI C or a
  scripting language that is guaranteed portable because it has just one
  cross-platform implementation.

  Scripting languages that qualify include Python, Perl, Tcl, and Emacs
  Lisp.  Plain old shell does not qualify; there are too many different
  implementations with subtle idiosyncracies, and the shell environment
  is subject to disruption by user customizations such as shell aliases.

  Java holds promise as a portable language, but the Linux-available
  implementations are still scratchy and poorly integrated with Linux.
  Java is still a bleeding-edge choice, though one likely to become more
  popular as it matures.


  5.2.  Follow good C portability practices

  If you are writing C, do feel free to use the full ANSI features --
  including function prototypes, which will help you spot cross-module
  inconsistancies.  The old-style K&R compilers are history.

  On the other hand, do not assume that GCC-specific features such as
  the `-pipe' option or nested functions are available.  These will come
  around and bite you the second somebody ports to a non-Linux, non-GCC
  system.


  5.3.  Use autoconf/automake/autoheader

  If you're writing C, use autoconf/automake/autoheader to handle
  portability issues, do system-configuration probes, and tailor your
  makefiles.  People building from sources today expect to be able to
  type "configure; make" and get a clean build -- and rightly so.


  5.4.  Sanity-check your code before release

  If you're writing C, test-compile with -Wall and clean up the errors
  at least once before each release.  This catches a surprising number
  of errors.  For real thoroughness, compile with -pedantic as well.

  If you're writing Perl, check your code with perl -c (and maybe -T, if
  applicable).  Use perl -w and 'use strict' religiously.  (See the Perl
  documentation for discussion.)


  5.5.  Sanity-check your documentation and READMEs before release

  Run a spell-checker on them.  If you look like you can't spell and
  don't care, pleople will assume you code is sloppy and careless too.


  6.  Good distribution-making practice

  These guidelines describe how your distribution should look when
  someone downloads, retrieves and unpacks it.


  6.1.  Make sure tarballs always unpack into a single new directory

  The single most annoying mistake newbie developers make is to build
  tarballs that unpack the files and directories in the distribution
  into the current directory, potentially stepping on files already
  located there.  Never do this!

  Instead, make sure your archive files all have a common directory part
  named after the project, so they will unpack into a single top-level
  directory directly beneath the current one.

  Here's a makefile trick that, assuming your distribution directory is
  named `foobar' and SRC contains a list of your distribution files,
  accomplishes this.  It requires GNU tar 1.13



  VERS=1.0
  foobar-$(VERS).tar.gz:
          tar --name-prefix='foobar-$(VERS)/' -czf foobar-$(VERS).tar.gz $(SRC)



  If you have an older tar program, do something like this:


  foobar-$(VERS).tar.gz:
          @ls $(SRC) | sed s:^:foobar-$(VERS)/: >MANIFEST
          @(cd ..; ln -s foobar foobar-$(VERS))
          (cd ..; tar -czvf foobar/foobar-$(VERS).tar.gz `cat foobar/MANIFEST`)
          @(cd ..; rm foobar-$(VERS))



  6.2.  Have a README

  Have a file called README or READ.ME that is a roadmap of your source
  distribution.  By ancient convention, this is the first file intrepid
  explorers will read after unpacking the source.

  Good things to have in the README include:


    A brief description of the project.

    A pointer to the project website (if it has one)

    Notes on the developer's build environment and potential
     portability problems.

    A roadmap describing important files and subdirectories.

    Either build/installation instructions or a pointer to a file
     containing same (usually INSTALL).

    Either a maintainers/credits list or a pointer to a file containing
     same (usually CREDITS).

    Either recent project news or a pointer to a file containing same
     (usually NEWS).


  6.3.  Respect and follow standard file naming practices

  Before even looking at the README, your intrepid explorer will have
  scanned the filenames in the top-level directory of your unpacked
  distribution.  Those names can themselves convey information.  By
  adhering to certain standard naming practices, you can give the
  explorer valuable clues about what to look in next.

  Here are some standard top-level file names and what they mean.  Not
  every distribution needs all of these.


     README or READ.ME
        the roadmap file, to be read first


     INSTALL
        configuration, build, and installation instructions


     CREDITS
        list of project contributers


     NEWS
        recent project news


     HISTORY
        project history


     COPYING
        project license terms (GNU convention)


     LICENSE
        project license terms


     MANIFEST
        list of files in the distribution


     FAQ
        plain-text Frequently-Asked-Questions document for the project


     TAGS
        generated tag file for use by Emacs or vi

  Note the overall convention that filenames with all-caps names are
  human-readable metainformation about the package, rather than build
  components.

  Having a FAQ can save you a lot of grief.  When a question about the
  project comes up often, put it in the FAQ; then direct users to read
  the FAQ before sending questions or bug reports.  A well-nurtured FAQ
  can decrease the support burden on the project maintainers by an order
  of magnitude or more.

  Having a HISTORY or NEWS file with timestamps in it for each release
  is valuable.  Among other things, it may help establish prior art if
  you are ever hit with a patent-infringement lawsuit (this hasn't
  happened to anyone yet, but best to be prepared).


  6.4.  Design for Upgradability

  Your software will change over time as you put out new releases.  Some
  of these changes will not be backward-compatible.  Accordingly, you
  should give serious thought to designing your installation layouts so
  that multiple installed versions of your code can coexist on the same
  system.  This is especially important for libraries -- you can't count
  on all your client programs to upgrade in lockstep with your API
  changes.

  The Emacs, Python, and Qt projects have a good convention for handling
  this; version-numbered directories.  Here's how an installed Qt
  library hierarchy looks (${ver} is the version number):



  /usr/lib/qt
  /usr/lib/qt-${ver}
  /usr/lib/qt-${ver}/bin          # Where you find moc
  /usr/lib/qt-${ver}/lib          # Where you find .so
  /usr/lib/qt-${ver}/include      # Where you find header files



  With this organization, you can have multiple versions coexisting.
  Client programs have to specify the library version they want, but
  that's a small price to pay for not having the interfaces break on
  them.


  6.5.  Provide RPMs

  The de-facto standard format for installable binary packages is that
  used by the Red Hat Package manager, RPM.  It's featured in the most
  popular Linux distribution, and supported by effectively all other
  Linux distributions (except Debian and Slackware; and Debian can
  install from RPMs).

  Accordingly, it's a good idea for your project site to provide
  installable RPMs as well as source tarballs.

  It's also a good idea for you to include in your source tarball the
  RPM spec file, with a production that makes RPMs from it in your
  Makefile.  The spec file should have the extension `.spec'; that's how
  the rpm -t option finds it in a tarball.

  For extra style points, generate your spec file with a shellscript
  that automatically plugs in the correct version number by analyzing
  the Makefile or a version.h.


  7.  Good communication practice

  Your software won't do the world much good if nobody but you knows it
  exists.  Also, developing a visible presence for the project on the
  Internet will assist you in recruiting users and co-developers.  Here
  are the standard ways to do that.


  7.1.  Announce to c.o.l.a and Freshmeat

  Announce new releases to comp.os.linux.announce
  <news:comp.os.linux.announce>.  Besides being widely read itself, this
  group is a major feeder for web-based what's-new sites like Freshmeat
  <http://www.freshmeat.net>.


  7.2.  Announce to a relevant topic newsgroup

  Find USENET topics group directly relevant to your application, and
  announce there as well.  Post only where the function of the code is
  relevant, and exercise restraint.

  If (for example) you are releasing a program written in Perl that
  queries IMAP servers, you should certainly post to comp.mail.imap.
  But you should probably not post to comp.lang.perl unless the program
  is also an instructive example of cutting-edge Perl techniques.

  Your announcement should include the URL of a project website.



  7.3.  Have a website

  If you intend try to build any substantial user or developer community
  around your project, it should have a website.  Standard things to
  have on the website include:

    The project charter (why it exists, who the audience is, etc).

    Download links for the project sources.

    Instructions on how to join the project mailing list(s).

    A FAQ (Frequently Asked Questions) list.

    HTMLized versions of the project documentation

    Links to related and/or competing projects.

  Some project sites even have URLs for anonymous access to the master
  source tree.


  7.4.  Host project mailing lists

  It's standard practice to have a private development list through
  which project collaborators can communicate and exchange patches.  You
  may also want to have an announcements list for people who want to be
  kept informed of the project's process


  7.5.  Release to major archives

  For the last several years, the Metalab archive
  <http://www.metalab.unc.edu/pub/Linux/> has been the most important
  interchange location for Linux software.

  Other important locations include:


    the Python Software Activity <http://www.python.org> site (for
     software written in Python).

    the CPAN <http://language.perl.com/CPAN>, the Comprehensive Perl
     Archive Network, (for software written in Perl).


  8.  Good project-management practice

  Managing a project well when all the participants are volunteers
  presents some unique challenges.  This is too large a topic to cover
  in a HOWTO.  Fortunately, there are some useful white papers available
  that will help you understand the major issues.

  For discussion of basic development organization and the release-
  early-release-often `bazaar mode', see The Cathedral and the Bazaar
  <http://www.tuxedo.org/~esr/writings/cathedral-bazaar/>.

  For discussion of motivational psychology, community customs, and
  conflict resolution, see Homesteading the Noosphere
  <http://www.tuxedo.org/~esr/writings/homesteading/>.

  For discussion of economics and appropriate business models, see The
  Magic Cauldron <http://www.tuxedo.org/~esr/writings/magic-cauldron/>.

  These papers are not the last word on open-source development.  But
  they were the first serious analyses to be written, and have yet to be
  superseded.



  The Linux Sound HOWTO
  Jeff Tranter, tranter@pobox.com
  v1.20, 24 March 1999

  This document describes sound support for Linux. It lists the sup-
  ported sound hardware, describes how to configure the kernel drivers,
  and answers frequently asked questions. The intent is to bring new
  users up to speed more quickly and reduce the amount of traffic in the
  Usenet news groups and mailing lists.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Acknowledgments
     1.2 New versions of this document
     1.3 Feedback
     1.4 Distribution Policy

  2. Sound Card Technology

  3. Supported Hardware

     3.1 Sound Cards
     3.2 Alternate Sound Drivers
     3.3 PC Speaker
     3.4 Parallel Port

  4. Installation

     4.1 Installing the Sound Card
     4.2 Configuring Plug and Play
     4.3 Configuring the Kernel
     4.4 Creating the Device Files
     4.5 Booting Linux and Testing the Installation
     4.6 Troubleshooting
        4.6.1 Step 1: Make sure you are really running the kernel you compiled.
        4.6.2 Step 2: Make sure the kernel sound drivers are compiled in.
        4.6.3 Step 3: Did the kernel detect your sound card during booting?
        4.6.4 Step 4: Can you read data from the dsp device?
        4.6.5 When All Else Fails

  5. Applications Supporting Sound

  6. Answers To Frequently Asked Questions

     6.1 What are the various sound device files?
     6.2 How can I play a sound sample?
     6.3 How can I record a sample?
     6.4 Can I have more than one sound card?
     6.5 Error: No such file or directory for sound devices
     6.6 Error: No such device for sound devices
     6.7 Error: No space left on device for sound devices
     6.8 Error: Device busy for sound devices
     6.9 I still get device busy errors!
     6.10 Partial playback of digitized sound file
     6.11 There are pauses when playing MOD files
     6.12 Compile errors when compiling sound applications
     6.13 SEGV when running sound binaries that worked previously
     6.14 What known bugs or limitations are there in the sound driver?
     6.15 Where are the sound driver ioctls() etc. documented?
     6.16 What CPU resources are needed to play or record without pauses?
     6.17 Problems with a PAS16 and an Adaptec 1542 SCSI host adaptor
     6.18 Is it possible to read and write samples simultaneously?
     6.19 My SB16 is set to IRQ 2, but configure does not allow this value.
     6.20 If I run Linux, then boot DOS, I get errors and/or sound applications do not work properly.
     6.21 Problems running DOOM under Linux
     6.22 How can I reduce noise picked up by my sound card?
     6.23 I can play sounds, but not record.
     6.24 My "compatible" sound card only works if I first initialize under MS-DOS.
     6.25 My 16-bit SoundBlaster "compatible" sound card only works in 8-bit mode under Linux.
     6.26 Where can I find sound applications for Linux?
     6.27 Can the sound driver be compiled as a loadable module?
     6.28 Can I use a sound card to replace the system console beep?
     6.29 What is VoxWare?
     6.30 Sox/Play/Vplay reports "invalid block size 1024"
     6.31 The mixer settings are reset whenever I load the sound driver module
     6.32 Only user root can record sound
     6.33 Is the sound hardware on the IBM ThinkPad supported?
     6.34 Applications fail because my sound card has no mixer
     6.35 Problems with a SB16 CT4170
     6.36 How to connect a MIDI keyboard to a soundcard
     6.37 Problems with IRQ 15 and Ensoniq PCI 128
     6.38 Where can I get freely available MIDI patches to run SoftOSS?

  7. References



  ______________________________________________________________________

  1.  Introduction


  This is the Linux Sound HOWTO. It is intended as a quick reference
  covering everything you need to know to install and configure sound
  support under Linux. Frequently asked questions about sound under
  Linux are answered, and references are given to some other sources of
  information on a variety of topics related to computer generated sound
  and music.

  The scope is limited to the aspects of sound cards pertaining to
  Linux. See the other documents listed in the References section for
  more general information on sound cards and computer sound and music
  generation.


  1.1.  Acknowledgments


  Much of this information came from the documentation provided with the
  sound driver source code, by Hannu Savolainen (hannu@opensound.com).
  Thanks go to Hannu, Alan Cox, and the many other people who developed
  the Linux kernel sound drivers and utilities.

  Thanks to the SGML Tools package, this HOWTO is available in several
  formats, all generated from a common source file.


  1.2.  New versions of this document


  New versions of this document will be periodically posted to the
  comp.os.linux.answers newsgroup. They will also be uploaded to various
  anonymous ftp sites that archive such information including
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/>.

  Hypertext versions of this and other Linux HOWTOs are available on
  many world-wide web sites, including  <http://metalab.unc.edu/LDP/>.
  Most Linux CD-ROM distributions include the HOWTOs, often under the
  /usr/doc directory, and you can also buy printed copies from several
  vendors. Sometimes the HOWTOs available from CD-ROM vendors, ftp
  sites, and printed format are out of date. If the date on this HOWTO
  is more than six months in the past, then a newer copy is probably
  available on the Internet.

  Please note that, due to the dynamic nature of the Internet, all web
  and ftp links listed in this document are subject to change.

  Translations of this document are available in several languages:

  Chinese:  <http://www.linux.org.tw/CLDP/Sound-HOWTO.html>


  French:  <http://www.freenix.org/unix/linux/HOWTO/>

  Japanese:  <http://yebisu.ics.es.osaka-u.ac.jp/linux/>

  Korean:  <http://kldp.linux-kr.org/HOWTO/html/Sound/Sound-HOWTO.html>

  Russian:  <http://www.phtd.tpu.edu.ru/~ott/russian/linux/howto-
  rus/Sound-HOWTO.html>

  Spanish:  <ftp://ftp.insflug.org/es>

  Most translations of this and other Linux HOWTOs can also be found at
  <http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/> and
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/>. If you
  make a translation of this document into another language, let me know
  and I'll include a reference to it here.


  1.3.  Feedback


  I rely on you, the reader, to make this HOWTO useful. If you have any
  suggestions, corrections, or comments, please send them to me,
  tranter@pobox.com, and I will try to incorporate them in the next
  revision.

  I am also willing to answer general questions on sound cards under
  Linux, as best I can. Before doing so, please read all of the
  information in this HOWTO, and send me detailed information about the
  problem. Please do not ask me about using sound cards under operating
  systems other than Linux.

  If you publish this document on a CD-ROM or in hardcopy form, a
  complimentary copy would be appreciated. Mail me for my postal
  address. Also consider making a donation to the Linux Documentation
  Project to help support free documentation for Linux. Contact the
  Linux HOWTO coordinator, Tim Bynum  <mailto:linux-
  howto@metalab.unc.edu>, for more information.


  1.4.  Distribution Policy


  Copyright (c) 1995-1999 by Jeff Tranter. This document may be
  distributed under the terms set forth in the LDP license at
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.


  2.  Sound Card Technology


  This section gives a very cursory overview of computer audio
  technology, in order to help you understand the concepts used later in
  the document. You should consult a book on digital audio or digital
  signal processing in order to learn more.

  Sound is an analog property; it can take on any value over a
  continuous range. Computers are digital; they like to work with
  discrete values. Sound cards use a device known as an Analog to
  Digital Converter (A/D or ADC) to convert voltages corresponding to
  analog sound waves into digital or numeric values which can be stored
  in memory. Similarly, a Digital to Analog Converter (D/A or DAC)
  converts numeric values back to an analog voltage which can in turn
  drive a loudspeaker, producing sound.


  The process of analog to digital conversion, known as sampling,
  introduces some error. Two factors are key in determining how well the
  sampled signal represents the original. Sampling rate is the number of
  samples made per unit of time (usually expresses as samples per second
  or Hertz). A low sampling rate will provide a less accurate
  representation of the analog signal. Sample size is the range of
  values used to represent each sample, usually expressed in bits. The
  larger the sample size, the more accurate the digitized signal will
  be.

  Sound cards commonly use 8 or 16 bit samples at sampling rates from
  about 4000 to 44,000 samples per second. The samples may also be
  contain one channel (mono) or two (stereo).

  FM Synthesis is an older technique for producing sound. It is based on
  combining different waveforms (e.g. sine, triangle, square). FM
  synthesis is simpler to implement in hardware that D/A conversion, but
  is more difficult to program and less flexible. Many sound cards
  provide FM synthesis for backward compatibility with older cards and
  software. Several independent sound generators or voices are usually
  provided.

  Wavetable Synthesis combines the flexibility of D/A conversion with
  the multiple channel capability of FM synthesis. With this scheme
  digitized voices can be downloaded into dedicated memory, and then
  played, combined, and modified with little CPU overhead. State of the
  art sound cards all support wavetable synthesis.

  Most sound cards provide the capability of mixing, combining signals
  from different input sources and controlling gain levels.

  MIDI stands for Musical Instrument Digital Interface, and is a
  standard hardware and software protocol for allowing musical
  instruments to communicate with each other. The events sent over a
  MIDI bus can also be stored as MIDI files for later editing and
  playback. Many sound cards provide a MIDI interface. Those that do not
  can still play MIDI files using the on-board capabilities of the sound
  card.

  MOD files are a common format for computer generated songs. As well as
  information about the musical notes to be played, the files contain
  digitized samples for the instruments (or voices). MOD files
  originated on the Amiga computer, but can be played on other systems,
  including Linux, with suitable software.


  3.  Supported Hardware


  This section lists the sound cards and interfaces that are currently
  supported under Linux. The information here is based on the latest
  Linux kernel, which at time of writing was version 2.2.4. This
  document only applies to the sound drivers included with the standard
  Linux kernel source distribution. There are other sound drivers
  available for Linux (see the later section entitled Alternate Sound
  Drivers).

  For the latest information on supported sound cards and features see
  the files included with the Linux kernel source code, usually
  installed in the directory /usr/src/linux/Documentation/sound.

  The information in this HOWTO is valid for Linux on the Intel
  platform.

  The sound driver should also work with most sound cards on the Alpha
  platform. However, some cards may conflict with I/O ports of other
  devices on Alpha systems even though they work perfectly on i386
  machines, so in general it's not possible to tell if a given card will
  work or not without actually trying it.

  Users have reported that the sound driver was not yet working on the
  PowerPC version of Linux, but it should be supported in future.

  Sound can be configured into the kernel under the MIPs port of Linux,
  and some MIPs machines have EISA slots and/or built in sound hardware.
  I'm told the Linux-MIPs group is interested in adding sound support in
  the future.

  The Linux kernel includes a separate driver for the Atari and Amiga
  versions of Linux that implements a compatible subset of the sound
  driver on the Intel platform using the built-in sound hardware on
  these machines.

  The SPARC port of Linux currently has sound support for some models of
  Sun workstations. I've been told that the on-board sound hardware
  works but the external DSP audio box is not supported because Sun has
  not released the specifications for it.


  3.1.  Sound Cards


  The following sound cards are supported by the Linux kernel sound
  driver. Some of the items listed are audio chip sets rather than
  models of sound cards. The list is incomplete because there are many
  sound cards compatible with these that will work under Linux. To add
  further to the confusion, some manufacturers periodically change the
  design of their cards causing incompatibilities and continue to sell
  them as the same model.


  o  6850 UART MIDI Interface

  o  AD1816/AD1816A based cards

  o  ADSP-2115

  o  ALS-007 based cards (Avance Logic)

  o  ATI Stereo F/X (no longer manufactured)

  o  Acer FX-3D

  o  AdLib (no longer manufactured)

  o  Audio Excel DSP 16

  o  AudioDrive

  o  CMI8330 sound chip

  o  Compaq Deskpro XL onboard sound

  o  Corel Netwinder WaveArtist

  o  Crystal CS423x

  o  ESC614

  o  ESS1688 sound chip


  o  ESS1788 sound chip

  o  ESS1868 sound chip

  o  ESS1869 sound chip

  o  ESS1887 sound chip

  o  ESS1888 sound chip

  o  ESS688 sound chip

  o  ES1370 sound chip

  o  ES1371 sound chip

  o  Ensoniq AudioPCI (ES1370)

  o  Ensoniq AudioPCI 97 (ES1371)

  o  Ensoniq SoundScape (and compatibles made by Reveal and Spea)

  o  Gallant SC-6000

  o  Gallant SC-6600

  o  Gravis Ultrasound

  o  Gravis Ultrasound ACE

  o  Gravis Ultrasound Max

  o  Gravis Ultrasound with 16 bit sampling option

  o  HP Kayak

  o  Highscreen Sound-Booster 32 Wave 3D

  o  IBM MWAVE

  o  Logitech Sound Man 16

  o  Logitech SoundMan Games

  o  Logitech SoundMan Wave

  o  MAD16 Pro (OPTi 82C928, 82C929, 82C930, 82C924 chipsets)

  o  Media Vision Jazz16

  o  MediaTriX AudioTriX Pro

  o  Microsoft Windows Sound System (MSS/WSS)

  o  MiroSOUND PCM12

  o  Mozart (OAK OTI-601)

  o  OPTi 82C931

  o  Orchid SW32

  o  Personal Sound System (PSS)

  o  Pinnacle MultiSound

  o  Pro Audio Spectrum 16

  o  Pro Audio Studio 16

  o  Pro Sonic 16

  o  Roland MPU-401 MIDI interface

  o  S3 SonicVibes

  o  SY-1816

  o  Sound Blaster 1.0

  o  Sound Blaster 2.0

  o  Sound Blaster 16

  o  Sound Blaster 16ASP

  o  Sound Blaster 32

  o  Sound Blaster 64

  o  Sound Blaster AWE32

  o  Sound Blaster AWE64

  o  Sound Blaster PCI 128

  o  Sound Blaster Pro

  o  Sound Blaster Vibra16

  o  Sound Blaster Vibra16X

  o  TI TM4000M notebook

  o  Terratec Base 1

  o  Terratec Base 64

  o  ThunderBoard

  o  Turtle Beach Maui

  o  Turtle Beach MultiSound Classic

  o  Turtle Beach MultiSound Fiji

  o  Turtle Beach MultiSound Hurricane

  o  Turtle Beach MultiSound Monterey

  o  Turtle Beach MultiSound Pinnacle

  o  Turtle Beach MultiSound Tahiti

  o  Turtle Beach WaveFront Maui

  o  Turtle Beach WaveFront Tropez

  o  Turtle Beach WaveFront Tropez+

  o  VIA chip set

  o  VIDC 16-bit sound

  o  Yamaha OPL2 sound chip

  o  Yamaha OPL3 sound chip

  o  Yamaha OPL3-SA1 sound chip

  o  Yamaha OPL3-SA2 sound chip

  o  Yamaha OPL3-SA3 sound chip

  o  Yamaha OPL3-SAx sound chip

  o  Yamaha OPL4 sound chip

  A word about compatibility: even though most sound cards are claimed
  to be SoundBlaster compatible, very few currently sold cards are
  compatible enough to work with the Linux SoundBlaster driver. These
  cards usually work better using the MSS/WSS or MAD16 driver. Only real
  SoundBlaster cards made by Creative Labs, which use Creative's custom
  chips (e.g. SoundBlaster16 Vibra), MV Jazz16 and ESS688/1688 based
  cards generally work with the SoundBlaster driver. Trying to use a
  SoundBlaster Pro compatible 16 bit sound card with the SoundBlaster
  driver is usually just a waste of time.

  The Linux kernel supports the SCSI port provided on some sound cards
  (e.g. ProAudioSpectrum 16) and the proprietary interface for some CD-
  ROM drives (e.g. Soundblaster Pro). See the Linux SCSI HOWTO and CDROM
  HOWTO documents for more information.

  A kernel driver to support joystick ports, including those provided on
  some sound cards, is included as part of the 2.2 kernels.

  Note that the kernel SCSI, CD-ROM, joystick, and sound drivers are
  completely independent of each other.


  3.2.  Alternate Sound Drivers


  Sound support in the Linux kernel was originally written by Hannu
  Savolainen. Hannu then went on to develop the Open Sound system, a
  commercial set of sound drivers sold by 4Front Technologies that is
  supported on a number of Unix systems. Red Hat Software sponsored Alan
  Cox to enhance the kernel sound drivers to make them fully modular.
  Various other people also contributed bug fixes and developed
  additional drivers for new sound cards. These modified drivers were
  shipped by Red Hat in their 5.0 through 5.2 releases. These changes
  have now been integrated into the standard kernel as of version 2.0.
  Alan Cox is now the maintainer of the standard kernel sound drivers,
  although Hannu still periodically contributes code taken from the
  commercial driver.

  The commercial Open Sound System driver from 4Front Technologies tends
  to be easier to configure and support more sound cards, particularly
  the newer models. It is also compatible with applications written for
  the standard kernel sound drivers. The disadvantage is that you need
  to pay for it, and you do not get source code. You can download a free
  evaluation copy of the product before deciding whether to purchase it.
  For more information see the 4Front Technologies web page at
  <http://www.opensound.com>.

  Jaroslav Kysela and others started writing an alternate sound driver
  for the Gravis UltraSound Card. The project was renamed Advanced Linux
  Sound Architecture (ALSA) and has resulted in what they believe is a
  more generally usable sound driver that can be used as a replacement
  for the built-in kernel drivers. The ALSA drivers support a number of
  popular sound cards, are full duplex, fully modularized, and
  compatible with the sound architecture in the kernel. The main web
  site of the ALSA project is  <http://www.alsa-project.org>. A separate
  "Alsa-sound-mini-HOWTO" is available which deals with compiling and
  installing these drivers.

  Markus Mummert (mum@mmk.e-technik.tu-muenchen.de) has written a driver
  package for the Turtle Beach MultiSound (classic), Tahiti, and
  Monterey sound cards. The documentation states:


       It is designed for high quality hard disk recording/playback
       without losing sync even on a busy system. Other features
       such as wave synthesis, MIDI and digital signal processor
       (DSP) cannot be used. Also, recording and playback at the
       same time is not possible. It currently replaces VoxWare and
       was tested on several kernel versions ranging from 1.0.9 to
       1.2.1. Also, it is installable on UN*X SysV386R3.2 systems.


  It can be found at  <http://www.cs.colorado.edu/~mccreary/tbeach>.

  Kim Burgaard (burgaard@daimi.aau.dk) has written a device driver and
  utilities for the Roland MPU-401 MIDI interface. The Linux software
  map entry gives this description:


       A device driver for true Roland MPU-401 compatible MIDI
       interfaces (including Roland SCC-1 and RAP-10/ATW-10). Comes
       with a useful collection of utilities including a Standard
       MIDI File player and recorder.



       Numerous improvements have been made since version 0.11a.
       Among other things, the driver now features IRQ sharing pol-
       icy and complies with the new kernel module interface.
       Metronome functionality, possibility for synchronizing e.g.
       graphics on a per beat basis without losing precision,
       advanced replay/record/overdub interface and much, much
       more.


  It can be found at
  <ftp://metalab.unc.edu/pub/Linux/kernel/sound/mpu401-0.2.tar.gz>.

  Another novel use for a sound card under Linux is as a modem for
  amateur packet radio. The 2.1 and later kernels include a driver that
  works with SoundBlaster and Windows Sound System compatible sound
  cards to implement 1200 bps AFSK and 9600 bps FSK packet protocols.
  See the Linux AX25 HOWTO for details (I'm a ham myself, by the way --
  callsign VE3ICH).


  3.3.  PC Speaker


  An alternate sound driver is available that requires no additional
  sound hardware; it uses the internal PC speaker. It is mostly software
  compatible with the sound card driver, but, as might be expected,
  provides much lower quality output and has much more CPU overhead. The
  results seem to vary, being dependent on the characteristics of the
  individual loudspeaker. For more information, see the documentation
  provided with the release.
  The software, which has not been updated for some time, can be found
  at  <ftp://ftp.informatik.hu-berlin.de/pub/Linux/hu-sound/>.


  3.4.  Parallel Port


  Another option is to build a digital to analog converter using a
  parallel printer port and some additional components. This provides
  better sound quality than the PC speaker but still has a lot of CPU
  overhead. The PC sound driver package mentioned above supports this,
  and includes instructions for building the necessary hardware.


  4.  Installation


  Configuring Linux to support sound involves the following steps:


  1. Installing the sound card.

  2. Configuring Plug and Play (if applicable).

  3. Configuring and building the kernel for sound support.

  4. Creating the device files.

  5. Booting the Linux kernel and testing the installation.

  If you are running Red Hat Linux there is a utility called sndconfig
  that in most cases will detect your sound card and set up all of the
  necessary configuration files to load the appropriate sound drivers
  for your card. If you are running Red Hat I suggest you try using it.
  If it works for you then you can skip the rest of the instructions in
  this section.

  If sndconfig fails, you are using another Linux distribution, or you
  want to follow the manual method in order to better understand what
  you are doing, then the next sections will cover each of these steps
  in detail.


  4.1.  Installing the Sound Card


  Follow the manufacturer's instructions for installing the hardware or
  have your dealer perform the installation.

  Older sound cards usually have switch or jumper settings for IRQ, DMA
  channel, etc; note down the values used. If you are unsure, use the
  factory defaults. Try to avoid conflicts with other devices (e.g.
  ethernet cards, SCSI host adaptors, serial and parallel ports) if
  possible.

  Usually you should use the same I/O port, IRQ, and DMA settings that
  work under DOS. In some cases though (particularly with PnP cards) you
  may need to use different settings to get things to work under Linux.
  Some experimentation may be needed.


  4.2.  Configuring Plug and Play


  Most sound cards now use the Plug and Play protocol to configure
  settings for i/o addresses, interrupts, and DMA channels. If you have
  one of the older sound cards that uses fixed settings or jumpers, then
  you can skip this section.

  As of version 2.2 Linux does not yet have full Plug and Play support
  in the kernel. The preferred solution is to use the isapnp tools which
  ship with most Linux distributions (or you can download them from Red
  Hat's web site  <http://www.redhat.com/>).

  First check the documentation for your Linux distribution. It may
  already have Plug and Play support set up for you or it may work
  slightly differently than described here. If you need to configure it
  yourself,the details can be found in the man pages for the isapnp
  tools. Briefly the process you would normally follow is:


  o  Use pnpdump to capture the possible settings for all your Plug and
     Play devices, saving the result to the file /etc/isapnp.conf.

  o  Choose settings for the sound card that do not conflict with any
     other devices in your system and uncomment the appropriate lines in
     /etc/isapnp.conf. Don't forget to uncomment the (ACT Y) command
     near the end.

  o  Make sure that isapnp is run when your system boots up, normally
     done by one of the startup scripts. Reboot your system or run
     isapnp manually.

  If for some reason you cannot or do not wish to use the isapnp tools,
  there are a couple of other options. If you use the card under
  Microsoft Windows 95 or 98, you can use the device manager to set up
  the card, then soft boot into Linux using the LOADLIN program. Make
  sure Windows and Linux use the same card setup parameters.

  If you use the card under DOS, you can use the icu utility that comes
  with SoundBlaster16 PnP cards to configure it under DOS, then soft
  boot into Linux using the LOADLIN program. Again, make sure DOS and
  Linux use the same card setup parameters.

  A few of the sound card drivers include the necessary software to
  initialize Plug and Play for the card. Check the documentation for
  that card's driver for details.


  4.3.  Configuring the Kernel


  When initially installing Linux you likely used a precompiled kernel.
  These kernels often do not provide sound support. It is best to
  recompile the kernel yourself with the drivers you need. You may also
  want to recompile the kernel in order to upgrade to a newer version or
  to free up memory resources by minimizing the size of the kernel.
  Later, when your sound card is working, you may wish to rebuild the
  kernel sound drivers as modules.

  The Linux Kernel HOWTO <http://metalab.unc.edu/LDP/HOWTO/Kernel-
  HOWTO.html> should be consulted for the details of building a kernel.
  I will just mention here some issues that are specific to sound cards.

  If you have never configured the kernel for sound support before it is
  a good idea to read the relevant documentation included with the
  kernel sound drivers, particularly information specific to your card
  type. The files can be found in the kernel documentation directory,
  usually installed in /usr/src/linux/Documentation/sound.  If this
  directory is missing you likely either have a very old kernel version
  or you have not installed the kernel source code.

  Follow the usual procedure for building the kernel. There are
  currently three interfaces to the configuration process. A graphical
  user interface that runs under X11 can be invoked using make xconfig.
  A menu-based system that only requires text displays is available as
  make menuconfig. The original method, using make config, offers a
  simple text-based interface.

  When configuring the kernel there will be many choices for selecting
  the type of sound card you have and the driver options to use.  The
  on-line help within the configuration tool should provide an
  explanation of what each option is for. Select the appropriate options
  to the best of your knowledge.

  After configuring the options you should compile and install the new
  kernel as per the Kernel HOWTO.


  4.4.  Creating the Device Files


  For proper operation, device file entries must be created for the
  sound devices. These are normally created for you during installation
  of your Linux system. A quick check can be made using the command
  listed below. If the output is as shown (the date stamp will vary)
  then the device files are almost certainly okay.



       % ls -l /dev/sndstat
       crw-rw-rw-   1 root     root      14,   6 Apr 25  1995 /dev/sndstat



  Note that having the right device files there doesn't guarantee
  anything on its own. The kernel driver must also be loaded or compiled
  in before the devices will work (more on that later).

  In rare cases, if you believe the device files are wrong, you can
  recreate them. Most Linux distributions have a /dev/MAKEDEV script
  which can be used for this purpose.


  4.5.  Booting Linux and Testing the Installation


  You should now be ready to boot the new kernel and test the sound
  drivers. Follow your usual procedure for installing and rebooting the
  new kernel (keep the old kernel around in case of problems, of
  course).

  During booting, check for a message such as the following on powerup
  (if they scroll by too quickly to read, you may be able to retrieve
  them with the dmesg command):



       Sound initialization started
       <Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
       <Sound Blaster 16> at 0x330 irq 5 dma 0
       <Yamaha OPL3 FM> at 0x388
       Sound initialization complete



  This should match your sound card type and jumper settings (if any).

  Note that the above messages are not displayed when using loadable
  sound driver module (unless you enable it, e.g. using insmod sound
  trace_init=1).

  When the sound driver is linked into the kernel, the Sound
  initialization started and Sound initialization complete messages
  should be displayed. If they are not printed, it means that there is
  no sound driver present in the kernel. In this case you should check
  that you actually installed the kernel you compiled when enabling the
  sound driver.

  If nothing is printed between the Sound initialization started and the
  Sound initialization complete lines, it means that no sound devices
  were detected. Most probably it means that you don't have the correct
  driver enabled, the card is not supported, the I/O port is bad or that
  you have a PnP card that has not been configured.

  The driver may also display some error messages and warnings during
  boot. Watch for these when booting the first time after configuring
  the sound driver.

  Next you should check the device file /dev/sndstat. Reading the sound
  driver status device file should provide additional information on
  whether the sound card driver initialized properly. Sample output
  should look something like this:



       % cat /dev/sndstat
       Sound Driver:3.5.4-960630 (Sat Jan 4 23:56:57 EST 1997 root,
       Linux fizzbin 2.0.27 #48 Thu Dec 5 18:24:45 EST 1996 i586)
       Kernel: Linux fizzbin 2.0.27 #48 Thu Dec 5 18:24:45 EST 1996 i586
       Config options: 0

       Installed drivers:
       Type 1: OPL-2/OPL-3 FM
       Type 2: Sound Blaster
       Type 7: SB MPU-401

       Card config:
       Sound Blaster at 0x220 irq 5 drq 1,5
       SB MPU-401 at 0x330 irq 5 drq 0
       OPL-2/OPL-3 FM at 0x388 drq 0

       Audio devices:
       0: Sound Blaster 16 (4.13)

       Synth devices:
       0: Yamaha OPL-3

       Midi devices:
       0: Sound Blaster 16

       Timers:
       0: System clock

       Mixers:
       0: Sound Blaster



  The command above can report some error messages. "No such file or
  directory" indicates that you need to create the device files (see
  section 4.3). "No such device" means that sound driver is not loaded
  or linked into kernel. Go back to section 4.2 to correct this.

  If lines in the "Card config:" section of /dev/sndstat are listed
  inside parentheses (such as "(SoundBlaster at 0x220 irq 5 drq 1,5)"),
  it means that this device was configured but not detected.

  Now you should be ready to play a simple sound file. Get hold of a
  sound sample file, and send it to the sound device as a basic check of
  sound output, e.g.



       % cat endoftheworld >/dev/dsp
       % cat crash.au >/dev/audio



  (Make sure you don't omit the ">" in the commands above).

  Note that, in general, using cat is not the proper way to play audio
  files, it's just a quick check. You'll want to get a proper sound
  player program (described later) that will do a better job.

  This command will work only if there is at least one device listed in
  the audio devices section of /dev/sndstat. If the audio devices
  section is empty you should check why the device was not detected.

  If the above commands return "I/O error", you should look at the end
  of the kernel messages listed using the "dmesg" command. It's likely
  that an error message is printed there. Very often the message is
  "Sound: DMA (output) timed out - IRQ/DRQ config error?". The above
  message means that the driver didn't get the expected interrupt from
  the sound card. In most cases it means that the IRQ or the DMA channel
  configured to the driver doesn't work. The best way to get it working
  is to try with all possible DMAs and IRQs supported by the device.

  Another possible reason is that the device is not compatible with the
  device the driver is configured for. This is almost certainly the case
  when a supposedly "SoundBlaster (Pro/16) compatible" sound card
  doesn't work with the SoundBlaster driver. In this case you should try
  to find out the device your sound card is compatible with (by posting
  to the comp.os.linux.hardware newsgroup, for example).

  Some sample sound files can be obtained from
  <ftp://tsx-11.mit.edu/pub/linux/packages/sound/snd-data-0.1.tar.Z>

  Now you can verify sound recording. If you have sound input
  capability, you can do a quick test of this using commands such as the
  following:



       # record 4 seconds of audio from microphone
       EDT% dd bs=8k count=4 </dev/audio >sample.au
       4+0 records in
       4+0 records out
       # play back sound
       % cat sample.au >/dev/audio



  Obviously for this to work you need a microphone connected to the
  sound card and you should speak into it. You may also need to obtain a
  mixer program to set the microphone as the input device and adjust the
  recording gain level.

  If these tests pass, you can be reasonably confident that the sound
  D/A and A/D hardware and software are working. If you experience
  problems, refer to the next section of this document.


  4.6.  Troubleshooting


  If you still encounter problems after following the instructions in
  the HOWTO, here are some things to check. The checks are listed in
  increasing order of complexity. If a check fails, solve the problem
  before moving to the next stage.


  4.6.1.  Step 1: Make sure you are really running the kernel you com-
  piled.


  You can check the date stamp on the kernel to see if you are running
  the one that you compiled with sound support. You can do this with the
  uname command:



       % uname -a
       Linux fizzbin 2.2.4 #1 Tue Mar 23 11:23:21 EST 1999 i586 unknown



  or by displaying the file /proc/version:



       % cat /proc/version
       Linux version 2.2.4 (root@fizzbin) (gcc version 2.7.2.3) #1 Tue Mar 23 11:23:21 EST 1999



  If the date stamp doesn't seem to match when you compiled the kernel,
  then you are running an old kernel. Did you really reboot? If you use
  LILO, did you re-install it (typically by running lilo)? If booting
  from floppy, did you create a new boot floppy and use it when booting?


  4.6.2.  Step 2: Make sure the kernel sound drivers are compiled in.


  The easiest way to do this is to check the output of dev/sndstat as
  described earlier. If the output is not as expected then something
  went wrong with the kernel configuration or build. Start the
  installation process again, beginning with configuration and building
  of the kernel.


  4.6.3.  Step 3: Did the kernel detect your sound card during booting?


  Make sure that the sound card was detected when the kernel booted. You
  should have seen a message on bootup. If the messages scrolled off the
  screen, you can usually recall them using the dmesg command:

       % dmesg



  or



       % tail /var/log/messages



  If your sound card was not found then something is wrong. Make sure it
  really is installed. If the sound card works under DOS then you can be
  reasonably confident that the hardware is working, so it is likely a
  problem with the kernel configuration. Either you configured your
  sound card as the wrong type or wrong parameters, or your sound card
  is not compatible with any of the Linux kernel sound card drivers.

  One possibility is that your sound card is one of the compatible type
  that requires initialization by the DOS driver. Try booting DOS and
  loading the vendor supplied sound card driver. Then soft boot Linux
  using Control-Alt-Delete. Make sure that card I/O address, DMA, and
  IRQ settings for Linux are the same as used under DOS. Read the
  Readme.cards file from the sound driver source distribution for hints
  on configuring your card type.

  If your sound card is not listed in this document, it is possible that
  the Linux drivers do not support it. You can check with some of the
  references listed at the end of this document for assistance.


  4.6.4.  Step 4: Can you read data from the dsp device?


  Try reading from the /dev/audio device using the dd command listed
  earlier in this document. The command should run without errors.

  If it doesn't work, then chances are that the problem is an IRQ or DMA
  conflict or some kind of hardware incompatibility (the device is not
  supported by Linux or the driver is configured for a wrong device).

  A remote possibility is broken hardware. Try testing the sound card
  under DOS, if possible, to eliminate that as a possibility.


  4.6.5.  When All Else Fails


  If you still have problems, here are some final suggestions for things
  to try:


  o  carefully re-read this HOWTO document

  o  read the references listed at the end of this document and the
     relevant kernel source documentation files

  o  post a question to one of the comp.os.linux or other Usenet
     newsgroups (comp.os.linux.hardware is a good choice; because of the
     high level of traffic in these groups it helps to put the string
     "sound" in the subject header for the article so the right experts
     will see it)

  o  Using a web/Usenet search engine with an intelligently selected
     search criteria can give very good results quickly. One such choice
     is <http://www.altavista.digital.com>

  o  try using the latest Linux kernel (but only as a last resort, the
     latest development kernels can be unstable)

  o  send mail to the author of the sound driver

  o  send mail to the author of the Sound HOWTO

  o  fire up emacs and type Esc-x doctor :-)


  5.  Applications Supporting Sound


  I give here a sample of the types of applications that you likely want
  if you have a sound card under Linux. You can check the Linux Software
  Map, Internet archive sites, and/or files on your Linux CD-ROM for
  more up to date information.

  As a minimum, you will likely want to obtain the following sound
  applications:


  o  audio file format conversion utility (e.g. sox)

  o  mixer utility (e.g. aumix or xmix)

  o  digitized file player/recorder (e.g. play or wavplay)

  o  MOD file player (e.g. tracker)

  o  MIDI file player (e.g. playmidi)

  There are text-based as well as GUI-based versions of most of these
  tools. There are also some more esoteric applications (e.g. speech
  synthesis and recognition) that you may wish to try.


  6.  Answers To Frequently Asked Questions


  This section answers some of the questions that have been commonly
  asked on the Usenet news groups and mailing lists.

  Answers to more questions can also be found at the OSS sound driver
  web page.


  6.1.  What are the various sound device files?


  These are the most standard device file names, some Linux
  distributions may use slightly different names.


     /dev/audio
        normally a link to /dev/audio0

     /dev/audio0
        Sun workstation compatible audio device (only a partial
        implementation, does not support Sun ioctl interface, just u-law
        encoding)

     /dev/audio1
        second audio device (if supported by sound card or if more than
        one sound card installed)

     /dev/dsp
        normally a link to /dev/dsp0

     /dev/dsp0
        first digital sampling device

     /dev/dsp1
        second digital sampling device

     /dev/mixer
        normally a link to /dev/mixer0

     /dev/mixer0
        first sound mixer

     /dev/mixer1
        second sound mixer

     /dev/music
        high-level sequencer interface

     /dev/sequencer
        low level MIDI, FM, and GUS access

     /dev/sequencer2
        normally a link to /dev/music

     /dev/midi00
        1st raw MIDI port

     /dev/midi01
        2nd raw MIDI port

     /dev/midi02
        3rd raw MIDI port

     /dev/midi03
        4th raw MIDI port

     /dev/sndstat
        displays sound driver status when read (also available as
        /proc/sound)

  The PC speaker driver provides the following devices:


     /dev/pcaudio
        equivalent to /dev/audio

     /dev/pcsp
        equivalent to /dev/dsp

     /dev/pcmixer
        equivalent to /dev/mixer


  6.2.  How can I play a sound sample?


  Sun workstation (.au) sound files can be played by sending them to the
  /dev/audio device. Raw samples can be sent to /dev/dsp. This will
  generally give poor results though, and using a program such as play
  is preferable, as it will recognize most file types and set the sound
  card to the correct sampling rate, etc.

  Programs like wavplay or vplay (in the snd-util package) will give
  best results with WAV files. However they don't recognize Microsoft
  ADPCM compressed WAV files. Also older versions of play (from the Lsox
  package) doesn't work well with 16 bit WAV files.

  The splay command included in the snd-util package can be used to play
  most sound files if proper parameters are entered manually in the
  command line.


  6.3.  How can I record a sample?


  Reading /dev/audio or /dev/dsp will return sampled data that can be
  redirected to a file. A program such as vrec makes it easier to
  control the sampling rate, duration, etc. You may also need a mixer
  program to select the appropriate input device.


  6.4.  Can I have more than one sound card?


  With the current sound driver it's possible to have several
  SoundBlaster, SoundBlaster/Pro, SoundBlaster16, MPU-401 or MSS cards
  at the same time on the system. Installing two SoundBlasters is
  possible but requires defining the macros SB2_BASE, SB2_IRQ, SB2_DMA
  and (in some cases) SB2_DMA2 by editing local.h manually. It's also
  possible to have a SoundBlaster at the same time as a PAS16.

  With the 2.0 and newer kernels that configure sound using make config,
  instead of local.h, you need to edit the file
  /usr/include/linux/autoconf.h. After the section containing the lines:



       #define SBC_BASE 0x220
       #define SBC_IRQ (5)
       #define SBC_DMA (1)
       #define SB_DMA2 (5)
       #define SB_MPU_BASE 0x0
       #define SB_MPU_IRQ (-1)



  add these lines (with values appropriate for your system):



       #define SB2_BASE 0x330
       #define SB2_IRQ (7)
       #define SB2_DMA (2)
       #define SB2_DMA2 (2)



  The following drivers don't permit multiple instances:


  o  GUS (driver limitation)


  o  MAD16 (hardware limitation)

  o  AudioTrix Pro (hardware limitation)

  o  CS4232 (hardware limitation)


  6.5.  Error: No such file or directory for sound devices


  You need to create the sound driver device files. See the section on
  creating device files. If you do have the device files, ensure that
  they have the correct major and minor device numbers (some older CD-
  ROM distributions of Linux may not create the correct device files
  during installation).


  6.6.  Error: No such device for sound devices


  You have not booted with a kernel containing the sound driver or the
  I/O address configuration doesn't match your hardware. Check that you
  are running the newly compiled kernel and verify that the settings
  entered when configuring the sound driver match your hardware setup.


  6.7.  Error: No space left on device for sound devices


  This can happen if you tried to record data to /dev/audio or /dev/dsp
  without creating the necessary device file. The sound device is now a
  regular file, and has filled up your disk partition. You need to run
  the script described in the Creating the Device Files section of this
  document.

  This may also happen with Linux 2.0 and later if there is not enough
  free RAM on the system when the device is opened. The audio driver
  requires at least two pages (8k) of contiguous physical RAM for each
  DMA channel. This happens sometimes in machines with less than 16M of
  RAM or which have been running for very long time. It may be possible
  to free some RAM by compiling and running the following C program
  before trying to open the device again:



       main() {
         int i;
         char mem[500000];
         for (i = 0; i < 500000; i++)
           mem[i] = 0;
         exit(0);
       }



  6.8.  Error: Device busy for sound devices


  Only one process can open a given sound device at one time. Most
  likely some other process is using the device in question. One way to
  determine this is to use the fuser command:



  % fuser -v /dev/dsp
  /dev/dsp:             USER       PID ACCESS COMMAND
                        tranter    265 f....  tracker



  In the above example, the fuser command showed that process 265 had
  the device open. Waiting for the process to complete or killing it
  will allow the sound device to be accessed once again. You should run
  the fuser command as root in order to report usage by users other than
  yourself.

  On some systems you may need to be root when running the fuser command
  in order to see the processes of other users.


  6.9.  I still get device busy errors!


  According to Brian Gough, for the SoundBlaster cards which use DMA
  channel 1 there is a potential conflict with the QIC-02 tape driver,
  which also uses DMA 1, causing "device busy" errors. If you are using
  FTAPE, you may have this driver enabled. According to the FTAPE-HOWTO
  the QIC-02 driver is not essential for the use of FTAPE; only the
  QIC-117 driver is required. Reconfiguring the kernel to use QIC-117
  but not QIC-02 allows FTAPE and the sound-driver to coexist.


  6.10.  Partial playback of digitized sound file


  The symptom is usually that a sound sample plays for about a second
  and then stops completely or reports an error message about "missing
  IRQ" or "DMA timeout". Most likely you have incorrect IRQ or DMA
  channel settings. Verify that the kernel configuration matches the
  sound card jumper settings and that they do not conflict with some
  other card.

  Another symptom is sound samples that loop. This is usually caused by
  an IRQ conflict.


  6.11.  There are pauses when playing MOD files


  Playing MOD files requires considerable CPU power. You may have too
  many processes running or your computer may be too slow to play in
  real time. Your options are to:


  o  try playing with a lower sampling rate or in mono mode

  o  eliminate other processes

  o  buy a faster computer

  o  buy a more powerful sound card (e.g. Gravis UltraSound)

  If you have a Gravis UltraSound card, you should use one of the mod
  file players written specifically for the GUS (e.g. gmod).



  6.12.  Compile errors when compiling sound applications


  The version 1.0c and earlier sound driver used a different and
  incompatible ioctl() scheme. Obtain newer source code or make the
  necessary changes to adapt it to the new sound driver. See the sound
  driver Readme file for details.

  Also ensure that you have used the latest version of soundcard.h and
  ultrasound.h when compiling the application. See the installation
  instructions at beginning of this text.


  6.13.  SEGV when running sound binaries that worked previously


  This is probably the same problem described in the previous question.


  6.14.  What known bugs or limitations are there in the sound driver?


  See the files included with the sound driver kernel source.


  6.15.  Where are the sound driver ioctls() etc. documented?


  Currently the best documentation, other than the source code, is
  available at the 4Front Technologies web site,
  <http://www.opensound.com>. Another source of information is the Linux
  Multimedia Guide, described in the references section.


  6.16.  What CPU resources are needed to play or record without pauses?


  There is no easy answer to this question, as it depends on:


  o  whether using PCM sampling or FM synthesis

  o  sampling rate and sample size

  o  which application is used to play or record

  o  Sound Card hardware

  o  disk I/O rate, CPU clock speed, cache size, etc.

  In general, any 386 machine or better should be able to play samples
  or FM synthesized music on an 8 bit sound card with ease.

  Playing MOD files, however, requires considerable CPU resources. Some
  experimental measurements have shown that playing at 44kHz requires
  more than 40% of the speed of a 486/50 and a 386/25 can hardly play
  faster than 22 kHz (these are with an 8 bit card sound such as a
  SoundBlaster). A card such as the Gravis UltraSound card performs more
  functions in hardware, and will require less CPU resources.

  These statements assume the computer is not performing any other CPU
  intensive tasks.

  Converting sound files or adding effects using a utility such as sox
  is also much faster if you have a math coprocessor (or CPU with on
  board FPU). The kernel driver itself does not do any floating point
  calculations, though.


  6.17.  Problems with a PAS16 and an Adaptec 1542 SCSI host adaptor


  (the following explanation was supplied by seeker@indirect.com)

  Linux only recognizes the 1542 at address 330 (default) or 334, and
  the PAS only allows the MPU-401 emulation at 330. Even when you
  disable the MPU-401 under software, something still wants to conflict
  with the 1542 if it's at its preferred default address. Moving the
  1542 to 334 makes everyone happy.


  Additionally, both the 1542 and the PAS-16 do 16-bit DMA, so if you
  sample at 16-bit 44 KHz stereo and save the file to a SCSI drive hung
  on the 1542, you're about to have trouble. The DMAs overlap and there
  isn't enough time for RAM refresh, so you get the dread ``PARITY ERROR
  - SYSTEM HALTED'' message, with no clue to what caused it. It's made
  worse because a few second-party vendors with QIC-117 tape drives
  recommend setting the bus on/off times such that the 1542 is on even
  longer than normal. Get the SCSISEL.EXE program from Adaptec's BBS or
  several places on the internet, and reduce the BUS ON time or increase
  the BUS OFF time until the problem goes away, then move it one notch
  or more further. SCSISEL changes the EEPROM settings, so it's more
  permanent than a patch to the DOS driver line in CONFIG.SYS, and will
  work if you boot right into Linux (unlike the DOS patch). Next problem
  solved.


  Last problem - the older Symphony chipsets drastically reduced the
  timing of the I/O cycles to speed up bus accesses. None of various
  boards I've played with had any problem with the reduced timing except
  for the PAS-16. Media Vision's BBS has SYMPFIX.EXE that's supposed to
  cure the problem by twiddling a diagnostic bit in Symphony's bus
  controller, but it's not a hard guarantee. You may need to:


  o  get the motherboard distributor to replace the older version bus
     chip,

  o  replace the motherboard, or

  o  buy a different brand of sound card.

  Young Microsystems will upgrade the boards they import for around $30
  (US); other vendors may be similar if you can figure out who made or
  imported the motherboard (good luck). The problem is in ProAudio's bus
  interface chip as far as I'm concerned; nobody buys a $120 sound card
  and sticks it in a 6MHz AT. Most of them wind up in 25-40MHz 386/486
  boxes, and should be able to handle at least 12MHz bus rates if the
  chips are designed right. Exit soapbox (stage left).


  The first problem depends on the chipset used on your motherboard,
  what bus speed and other BIOS settings, and the phase of the moon.
  The second problem depends on your refresh option setting (hidden or
  synchronous), the 1542 DMA rate and (possibly) the bus I/O rate. The
  third can be determined by calling Media Vision and asking which
  flavor of Symphony chip is incompatible with their slow design. Be
  warned, though - 3 of 4 techs I talked to were brain damaged. I would
  be very leery of trusting anything they said about someone else's
  hardware, since they didn't even know their own very well.


  6.18.  Is it possible to read and write samples simultaneously?


  The drivers for some sound cards support full duplex mode. Check the
  documentation available from 4Front Technologies for information on
  how to use it.


  6.19.  My SB16 is set to IRQ 2, but configure does not allow this
  value.


  On '286 and later machines, the IRQ 2 interrupt is cascaded to the
  second interrupt controller. It is equivalent to IRQ 9.


  6.20.  If I run Linux, then boot DOS, I get errors and/or sound appli-
  cations do not work properly.


  This happens after a soft reboot to DOS. Sometimes the error message
  misleadingly refers to a bad CONFIG.SYS file.

  Most of the current sound cards have software programmable IRQ and DMA
  settings. If you use different settings between Linux and MS-
  DOS/Windows, this may cause problems. Some sound cards don't accept
  new parameters without a complete reset (i.e. cycle the power or use
  the hardware reset button).

  The quick solution to this problem it to perform a full reboot using
  the reset button or power cycle rather than a soft reboot (e.g. Ctrl-
  Alt-Del).

  The correct solution is to ensure that you use the same IRQ and DMA
  settings with MS-DOS and Linux (or not to use DOS :-).


  6.21.  Problems running DOOM under Linux


  Users of the port of ID software's game DOOM for Linux may be
  interested in these notes.

  For correct sound output you need version 2.90 or later of the sound
  driver; it has support for the real-time DOOM mode.

  The sound samples are 16-bit. If you have an 8-bit sound card you can
  still get sound to work using one of several programs available in
  <ftp://metalab.unc.edu/pub/Linux/games/doom>.

  If performance of DOOM is poor on your system, disabling sound (by
  renaming the file sndserver) may improve it.

  By default DOOM does not support music (as in the DOS version). The
  program musserver will add support for music to DOOM under Linux. It
  can be found at  <ftp://pandora.st.hmc.edu/pub/linux/musserver.tgz>.


  6.22.  How can I reduce noise picked up by my sound card?


  Using good quality shielded cables and trying the sound card in
  different slots may help reduce noise. If the sound card has a volume
  control, you can try different settings (maximum is probably best).
  Using a mixer program you can make sure that undesired inputs (e.g.
  microphone) are set to zero gain.
  Philipp Braunbeck reported that on his ESS-1868 sound card there was a
  jumper to turn off the built-in amplifier which helped reduce noise
  when enabled.

  On one 386 system I found that the kernel command line option no-hlt
  reduced the noise level. This tells the kernel not to use the halt
  instruction when running the idle process loop. You can try this
  manually when booting, or set it up using the command append="no-hlt"
  in your LILO configuration file.

  Some sound cards are simply not designed with good shielding and
  grounding and are prone to noise pickup.


  6.23.  I can play sounds, but not record.


  If you can play sound but not record, try these steps:


  o  use a mixer program to select the appropriate device (e.g.
     microphone)

  o  use the mixer to set the input gains to maximum

  o  If you can, try to test sound card recording under MS-DOS to
     determine if there is a hardware problem

  Sometimes a different DMA channel is used for recording than for
  playback. In this case the most probable reason is that the recording
  DMA is set up incorrectly.


  6.24.  My "compatible" sound card only works if I first initialize
  under MS-DOS.


  In most cases a "SoundBlaster compatible" card will work better under
  Linux if configured with a driver other than the SoundBlaster one.
  Most sound cards claim to be compatible (e.g. "16 bit SB Pro
  compatible" or "SB compatible 16 bit") but usually this SoundBlaster
  mode is just a hack provided for DOS games compatibility. Most cards
  have a 16 bit native mode which is likely to be supported by recent
  Linux versions (2.0.1 and later).

  Only with some (usually rather old) cards is it necessary to try to
  get them to work in the SoundBlaster mode. The only newer cards that
  are the exception to this rule are the Mwave-based cards.


  6.25.  My 16-bit SoundBlaster "compatible" sound card only works in
  8-bit mode under Linux.


  16-bit sound cards described as SoundBlaster compatible are really
  only compatible with the 8-bit SoundBlaster Pro. They typically have a
  16-bit mode which is not compatible with the SoundBlaster 16 and not
  compatible with the Linux sound driver.

  You may be able to get the card to work in 16-bit mode by using the
  MAD16 or MSS/WSS driver.



  6.26.  Where can I find sound applications for Linux?


  Here are some good archive sites to search for Linux specific sound
  applications:


  o  <ftp://metalab.unc.edu/pub/Linux/kernel/sound/>

  o  <ftp://metalab.unc.edu/pub/Linux/apps/sound/>

  o  <ftp://tsx-11.mit.edu/pub/linux/packages/sound/>

  o  <ftp://nic.funet.fi/pub/Linux/util/sound/>

  o  <ftp://nic.funet.fi/pub/Linux/xtra/snd-kit/>

  o  <ftp://nic.funet.fi/pub/Linux/ALPHA/sound/>

  Also see the References section of this document.


  6.27.  Can the sound driver be compiled as a loadable module?


  With recent kernels the sound driver is supported as several kernel
  loadable modules.

  See the files in /usr/src/linux/Documentation/sound, especially the
  files Introduction and README.modules.


  6.28.  Can I use a sound card to replace the system console beep?


  Try the oplbeep program, found at
  <ftp://metalab.unc.edu/pub/Linux/apps/sound/oplbeep-2.3.tar.gz>

  Another variant is the beep program found at
  <ftp://metalab.unc.edu/pub/Linux/kernel/patches/misc/modreq_beep.tgz>

  The modutils package has an example program and kernel patch that
  supports calling an arbitrary external program to generate sounds when
  requested by the kernel.

  Alternatively, with some sound cards you can connect the PC speaker
  output to the sound card so that all sounds come from the sound card
  speakers.


  6.29.  What is VoxWare?


  The commercial version of the sound drivers sold by 4Front
  Technologies was previously known by other names such as VoxWare, USS
  (Unix Sound System), and even TASD (Temporarily Anonymous Sound
  Driver). It is now marketed as OSS (Open Sound System). The version
  included in the Linux kernel is sometimes referred to as OSS/Free.

  For more information see the 4Front Technologies web page at
  <http://www.opensound.com/>. I wrote a review of OSS/Linux in the June
  1997 issue of Linux Journal.



  6.30.  Sox/Play/Vplay reports "invalid block size 1024"


  A change to the sound driver in version 1.3.67 broke some sound player
  programs which (incorrectly) checked that the result from the
  SNDCTL_DSP_GETBLKSIZE ioctl was greater than 4096. The latest sound
  driver versions have been fixed to avoid allocating fragments shorter
  than 4096 bytes which solves this problem with old utilities.


  6.31.  The mixer settings are reset whenever I load the sound driver
  module


  You can build the sound driver as a loadable module and use kerneld to
  automatically load and unload it. This can present one problem -
  whenever the module is reloaded the mixer settings go back to their
  default values. For some sound cards this can be too loud (e.g.
  SoundBlaster16) or too quiet. Markus Gutschke (gutschk@uni-
  muenster.de) found this solution. Use a line in your /etc/conf.modules
  file such as the following:



       options sound dma_buffsize=65536 && /usr/bin/setmixer igain 0 ogain 0 vol 75



  This causes your mixer program (in this case setmixer) to be run
  immediately after the sound driver is loaded. The dma_buffsize
  parameter is just a dummy value needed because the option command
  requires a command line option. Change the line as needed to match
  your mixer program and gain settings.

  If you have compiled the sound driver into your kernel and you want to
  set the mixer gains at boot time you can put a call to your mixer
  program in a system startup file such as /etc/rc.d/rc.local.


  6.32.  Only user root can record sound


  By default the script in Readme.linux that creates the sound device
  files only allows the devices to be read by user root. This is to plug
  a potential security hole. In a networked environment, external users
  could conceivably log in remotely to a Linux PC with a sound card and
  microphone and eavesdrop. If you are not worried about this, you can
  change the permissions used in the script.

  With the default setup, users can still play sound files. This is not
  a security risk but is a potential for nuisance.


  6.33.  Is the sound hardware on the IBM ThinkPad supported?


  Information on how to use the mwave sound card on an IBM ThinkPad
  laptop computer can be found in the file
  /usr/src/linux/Documentation/sound/mwave, which is part of the kernel
  source distribution.



  6.34.  Applications fail because my sound card has no mixer


  Some old 8-bit SoundBlaster cards have no mixer circuitry. Some sound
  applications insist on being able to open the mixer device, and fail
  with these cards. Jens Werner (werner@bert.emv.ing.tu-bs.de) reports a
  workaround for this is to link /dev/mixer to /dev/null and everything
  should work fine.


  6.35.  Problems with a SB16 CT4170


  From Scott Manley (spm@star.arm.ac.uk):


       There seems to be a new type of Soundblaster - it was sold
       to us as a SB16 - the Model no. on the Card is CT4170. These
       Beasties only have one DMA channel so when you try to set
       them up then the kernel will have trouble accessing the 16
       bit DMA. The solution is to set the second DMA to 1 so that
       the card will behave as advertised.



  6.36.  How to connect a MIDI keyboard to a soundcard


  From Kim G. S. OEyhus (kim@pvv.ntnu.no):


       I looked all around the internet and in sound documentation
       on how to do something as simple as connecting the MIDI out-
       put from a master keyboard to the MIDI input on a sound
       card. I found nothing. The problem is that they both use the
       same device, /dev/midi, at least when using the OSS sound
       system. So I found a way to do it, which I want to share.
       This makes for a very simple synthesizer, with full MIDI
       support:



       CONNECTING A MIDI MASTER-KEYBOARD DIRECTLY TO A SOUNDCARD
       WITH MIDI



       A MIDI master-keyboard is a keyboard without any synthe-
       sizer, and with only a MIDI-out plug. This can be connected
       to the 15-pin D-SUB port on most sound-cards with a suitable
       cable.



       Such a keyboard can be used to control the MIDI synthesizer
       device for the card, thus making a simple keyboard con-
       trolled synthesizer.



       Compile the following program, say with 'gcc -o prog prog.c'
       and run it:



  #include <fcntl.h>

  main()
  {
    int fil, a;
    char b[256];

    fil=open("/dev/midi", O_RDWR);
    for(;;)
      {
        a=read(fil, b, 256);
        write(fil, b, a);
      }
  }



  6.37.  Problems with IRQ 15 and Ensoniq PCI 128


  From Matthew Inger (mattinger@mindless.com):


       Information on getting an Ensoniq PCI 128 card to work.



       The problem that it was exhibiting was that it was trying to
       use interrupt 15 by default (Plug and Pray was responsible
       for this one).  This interrupt is used by the secondary ide
       controller, and cannot be shared by other devices. You need
       to somehow force the es1370 to use another interrupt (should
       use interrupt 11 like it does under windows).



       I figured this one out for myself believe it or not.



       What I had to do was:



       a) in the BIOS, you have to tell the computer that you don't
       have a Plug and Play OS. I believe this is under advanced
       options in my BIOS.



       b) in the PCI settings in the BIOS, tell the computer to
       reserve interrupt 15 for legacy ISA devices. In my bios,
       under advanced options, there is a section for PCI settings.
       Under there, there is a Resource Exclusion area, and that's
       where to do this.



       When you reboot into linux you will be able to use sound. (I
       don't remember if it shows up in the boot messages or not
       like it used to).  To be safe, I ran sndconfig again so that
       it would play the test message, which sounded not great, but
       it was there. When I played a CD however, it sounded per-
       fect.
       Don't worry about windows, I tried both my cards: ISA Modem,
       and the Sound Card out, and they work without any hitches.



       The odds are your BIOS will be different from mine, but you
       just have to figure out where the settings are for the above
       two items. Good luck.



  6.38.  Where can I get freely available MIDI patches to run SoftOSS?


  SoftOSS is a software-based wavetable synthesizer included with the
  kernel sound driver that is compatible with the Gravis Utrasound card.
  To operate the driver needs GUS compatible MIDI patch files. The
  documentation mentions the "public domain MIDIA patchset available
  from several ftp sites".

  As explained on the 4Front Technologies web page
  <http://www.opensound.com/softoss.html> they can be downloaded from
  <ftp://archive.cs.umbc.edu/pub/midia/instruments.tar.gz>.


  7.  References


  If you have a sound card that supports a CD-ROM or SCSI interface, the
  Linux SCSI HOWTO and the Linux CD-ROM HOWTO have additional
  information that may be useful to you.

  The Sound Playing HOWTO describes how to play various types of sound
  and music files under Linux.

  The Linux SoundBlaster AWE32/64 Mini-HOWTO describes how to get a
  SoundBlaster 32 or 64 card working under Linux.

  Programming information is available from the 4Front Technologies web
  site at  <http://www.opensound.com/pguide>.

  The following FAQs are regularly posted to the Usenet newsgroup
  news.announce as well as being archived at
  <ftp://rtfm.mit.edu/pub/usenet/news.answers>:


  o  PCsoundcards/generic-faq (Generic PC Soundcard FAQ)

  o  PCsoundcards/soundcard-faq (comp.sys.ibm.pc.soundcard FAQ)

  o  PCsoundcards/gravis-ultrasound/faq (Gravis UltraSound FAQ)

  o  audio-fmts/part1 (Audio file format descriptions)

  o  audio-fmts/part2 (Audio file format descriptions)

  The FAQs also list several product specific mailing lists and archive
  sites. The following Usenet news groups discuss sound and/or music
  related issues:


  o  alt.binaries.sounds.* (various groups for posting sound files)

  o  alt.binaries.multimedia (for posting Multimedia files)


  o  alt.sb.programmer (Soundblaster programming topics)

  o  comp.multimedia (Multimedia topics)

  o  comp.music (Computer music theory and research)

  o  comp.sys.ibm.pc.soundcard.* (various IBM PC sound card groups)

  A web site dedicated to multimedia can be found at
  <http://viswiz.gmd.de/MultimediaInfo/>. Another good site for Linux
  MIDI and sound applications is  <http://sound.condorow.net/>. Creative
  Labs has a web site at <http://www.creaf.com/>. MediaTrix has a web
  site at  <http://www.mediatrix.com/>.

  The Linux mailing list has a number of "channels" dedicated to
  different topics, including sound. To find out how to join, send a
  mail message with the word "help" as the message body to
  majordomo@vger.rutgers.edu. These mailing lists are not recommended
  for questions on sound card setup etc., they are intended for
  development related discussion.

  As mentioned several times before, the kernel sound driver includes a
  number of Readme files containing useful information about the sound
  card driver. These can typically be found in the directory
  /usr/src/linux/drivers/sound.

  Information on OSS, the commercial sound driver for Linux and other
  Unix compatible operating systems, can be found at the 4Front
  Technologies web page at  <http://www.opensound.com/>.

  The Linux Software Map (LSM) is an invaluable reference for locating
  Linux software. Searching the LSM for keywords such as sound is a good
  way to identify applications related to sound hardware. The LSM can be
  found on various anonymous FTP sites, including
  <ftp://metalab.unc.edu/pub/Linux/docs/LSM/> (formerly known as
  sunsite). There are also various web sites that maintain databases of
  Linux applications. One such site is  <http://www.freshmeat.net>.

  The Linux Documentation Project has produced several books on Linux,
  including Linux Installation and Getting Started. These are freely
  available by anonymous FTP from major Linux archive sites or can be
  purchased in hardcopy format.

  Finally, a shameless plug: If you want to learn a lot more about
  multimedia under Linux (especially CD-ROM and sound card applications
  and programming), check out my book Linux Multimedia Guide, ISBN
  1-56592-219-0, published by O'Reilly and Associates. As well as the
  original English version, French and Japanese translations are now in
  print. For details, call 800-998-9938 in North America or check the
  web page  <http://www.ora.com/catalog/multilinux/noframes.html> or my
  home page  <http://www.pobox.com/~tranter>.



  The Linux Sound Playing HOWTO
  Yoo C. Chung, wacko@laplace.snu.ac.kr
  v1.6, 11 August 1998

  This document lists applications for Linux that play various sound
  formats.


  1.  Introduction

  This is the Sound Playing HOWTO.  It lists the many sound formats and
  the applications that can be used to play them.  It also lists some
  hacks and advice on using these applications.  There are also some
  other interesting applications related to sound not directly related
  to playback.  However, this document does not describe how one can
  setup a Linux system for sound support.  Refer to the Linux Sound
  HOWTO by Jeff Tranter for instructions on setting up a Linux system
  for sound support and the supported sound hardware.

  This deals with normal user sound applications.  That is, it is only
  concerned about what the average user needs to know on the application
  side of sound, not exotic stuff like speech synthesis, or hardware
  stuff which is dealt in the Sound HOWTO.



  1.1.  Copyright of this document

  This document can be freely distributed and modified (I would
  appreciate it if I were notified of any modifications), as long as
  this copyright notice is preserved.  However, it cannot be placed
  under any further restrictions, and a modified document must have the
  same copyright as this one.  Also, credit must be given where due.



  1.2.  Copyright of the listed applications

  If there is no mention of any copyright, then the application is under
  the GNU General Public License.



  1.3.  Where to get this document

  The most recent official version of this document can be obtained from
  the Linux Documentation Project <http://sunsite.unc.edu/LDP/>.  The
  most recent unofficial version of this document can be obtained from
  <http://laplace.snu.ac.kr/~wacko/howto/>.

  A Korean version of this document (very outdated) is available at
  <http://laplace.snu.ac.kr/~wacko/howto/Sound-Playing-HOWTO.ks>.

  A Japanese version of this document is available at
  <http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/euc/Sound-Playing-HOWTO.euc>.



  1.4.  Feedback

  I am not omniscient, and I don't use all the applications in here (a
  few I can't even try), so there are bound to be mistakes.  Also,
  programs usually continuously evolve, so documentation tends to get
  out of date.  Therefore, if you find anything wrong, please send me
  any corrections.  Suggestions or additions to this document are
  welcome, too.
  1.5.  Acknowledgments

  All the authors of the applications in this HOWTO.  Also, Hannu
  Savolainen for the great sound driver and Linus Torvalds for the great
  underlying OS.

  I'd also like to thank Raymond Nijssen (raymond@es.ele.tue.nl), Jeroen
  Rutten (jeroen@es.ele.tue.nl), Antonio Perez (aperez@arrakis.es), Ian
  Jackson (ijackson@gnu.org), and Peter Amstutz
  (amstpi@freenet.tlh.fl.us) for their information and help.



  2.  Playing Various Sound Formats

  There are many kinds of sound formats (WAV, MIDI, MPEG etc.).  Below,
  we list the various formats and the applications that can be used to
  play them.



  2.1.  MIDI

  MIDI stands for Musical Instrument Device Interface.  MIDI files
  usually have the extension .mid.  They contain sequencing information,
  that is, information on when to play what instrument in what way, etc.
  Depending on your hardware (and maybe the software you use to play
  them), the sound might be awesome, or it might be downright crappy.



  2.1.1.  adagio

  This package includes mp (a command-line MIDI file player) and xmp (an
  XView based MIDI file player, not to be confused with the module
  player also called xmp).  You will need the SlingShot extensions to
  use xmp.  It also contains other programs for playing Adagio scores.


  If you have a GUS, mp can also play MOD files (see section ``Modules''
  for more information on modules).

  One little annoying bug (as of version 0.5 on some hardware) is that
  the sound breaks at the end.  Namely, instead of ending the sound the
  way the MIDI file specifies, it ends by playing the note right before
  the last one in a long interval.  It hasn't stopped me from using mp,
  but it might prevent someone from using it for `real' work.  It also
  starts up relatively slowly.

  The package does not mention any copyright (at least none that I can
  find), so I assume it can be freely redistributed and modified.  (By a
  strict interpretation of copyright law, nothing gives one the right to
  do these things, but I somehow doubt that this was the intention of
  the author.)

  It is a port of the CMU MIDI Toolkit to Linux (though there was enough
  added to make this questionable) by Greg Lee
  (lee@uhunix.uhcc.hawaii.edu).

  It can be obtained from
  <ftp://tsx-11.mit.edu/pub/linux/packages/sound/adagio05.tar.gz>.  The
  binaries included here are in a.out format (linked with ancient
  libraries), and the xmp binary segfaults in a X11R6 environment
  (XFree86 3.1.1, libc 4.7.2).  The mp binary works fine in an a.out
  environment.

  You will need a bit of hackery to compile it.  Actually, it's not much
  of a hackery.  All you have to do is to include the -lfl switch at the
  end of SHROBJ and XMPOBJ in the Makefile.  This is to link in the flex
  library, which is not linked in by default.  Then follow the
  installation instructions.  And don't forget to have XView and the
  SlingShot extensions installed if you want to compile xmp.



  2.1.2.  TiMidity

  Some people recommend this experimental program because of good sound
  quality (which is very true, it's much better than mp on a Sound
  Blaster 16, though it probably won't be much different on soundcards
  with wavetable synthesis like the GUS).  However, it suffers from high
  CPU loads.  It plays MIDI by first converting MIDI to WAV and then
  plays the WAV (you can also convert a MIDI file to a WAV file without
  playing if you want).  This is the reason for its CPU intensive
  nature.

  It also has an optional ncurses, SLang, Tcl/Tk or Motif interface.

  You need Gravis Ultrasound patch files to use this.  Look into the FAQ
  included with TiMidity for more information.

  The author is Tuukka Toivonen (tt@cgs.fi).

  The latest version of TiMidity can be found at the TiMidity home page
  <http://www.cgs.fi/~tt/timidity/>.  This page also contains a link to
  a small library of GUS patches.



  2.1.3.  playmidi

  This is a MIDI player that plays to FM, GUS, and external MIDI.  It is
  supposed to have a faster startup time compared to other MIDI players.
  It is also able to play Creative Music Files, Microsoft RIFF files,
  and large MIDI archives from games such as Ultima 7.

  It has an X interface and a SVGA interface.  It also has an option for
  real time playback with tracking all the notes on each channel and the
  current playback clock (included automatically with xplaymidi and
  splaymidi).

  You should do something like



       $ splaymidi foo.mid; stty sane



  if you are going to use the SVGA interface, since it doesn't reset the
  terminal tty mode properly.  The SVGA interface may be removed in the
  near future.

  It was written by Nathan Laredo (laredo@gnu.org or
  laredo@ix.netcom.com).

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/playmidi-2.3.tar.gz>.


  2.2.  Modules

  Modules (in computer music) are digital music files, made up of a set
  of samples and sequencing information, telling the player when to play
  which sample (instrument) on which track at what pitch, optionally
  performing an effect, like vibrato for example.

  An advantage it has over MIDI is that it can include almost any kind
  of sound (including human voices).  Another is that it sounds just
  about the same on any platform, because the samples are in the module.
  A disadvantage it has is that it has a much larger file size compared
  to MIDI.  Another one is that it has no real standard format (the only
  `real' one is the ProTracker, which many modules aren't quite
  compatible with).  It originated on the Amiga.

  The most common format has the extension .mod.  There are many other
  extensions depending on what format they are in.



  2.2.1.  tracker

  This very portable program (it has been ported to many platforms)
  plays Soundtracker and Protracker music modules.  It uses 16 bit
  stereo output, and I consider the quality to be very good.  If you
  need a simple way to reduce CPU load use the -mono option.

  This is a giftware program (quoting the author).  It is by Marc Espie
  (Marc.Espie@ens.fr).

  A version of this with the Makefile already tweaked for Linux can be
  obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tracker-4.3-linux.tar.gz>.



  2.2.2.  gmod

  This is a music module player for the Gravis Ultrasound card.  4/6/8
  channel MOD, 8 channel 669, MultiTracker (MTM), UltraTracker (ULT),
  FastTracker (XM), and ScreamTracker III (S3M) are the supported
  formats.

  It requires a version 3.0 or later sound driver.  And a GUS, of
  course.  You may need to modify the kernel to make volume control work
  the way you want.

  This has an X interface.  It uses the QT toolkit (needs version 0.99
  or greater).  Check the QT toolkit homepage <http://www.troll.no/> for
  information on QT.

  This can be freely distributed.  It was originally written by Hannu
  Savolainen, and now maintained by Andrew J. Robinson
  (robinson@cnj.digex.net).

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/gmod-3.1.tar.gz>.



  2.2.3.  MikMod

  This portable module player plays XM, ULT, STM, S3M, MTM, MOD and UNI
  formats.  (The UNI format is an internal format used by MikMod.)  It
  has support for zipped module files.  It uses 16 bit stereo for the
  sound output.  Use the -m option (for mono output) if you need a
  simple way to lower the CPU load.

  The Unix version can either use ncurses or Tcl/Tk for its interface.
  It can also be used as a library, not just an independent program.

  It was originally written by Jean-Paul Mikkers (mikmak@via.nl).  It is
  now maintained by Jake Stine (dracoirs@epix.net).  This is shareware
  that has to be registered if you want to use it commercially.  You
  also need permission to redistribute it commercially (non-commercial
  redistribution does not need such permission).

  This can be found at the MikMod home page
  <http://www.freenet.tlh.fl.us/~amstpi/mikmod.html>.



  2.2.4.  xmp

  This is a module player (not to be confused with Adagio's xmp) which
  can play MOD, S3M, MTM, PTM, PTR, STM, 669, and XM modules (other
  formats are also supported, but still experimental or incomplete).  If
  you have soundcards with wavetable synthesis (GUS or SoundBlaster
  32AWE), then you can use this feature of the soundcard to lower the
  load on the CPU.  It also supports compressed modules.

  An X frontend to xmp is also available.

  This was written by Claudio Matsuoka (claudio@pos.inf.ufpr.br) and
  Hipolito Carraro Jr.

  This can found at the xmp home page <http://xmp.home.ml.org/>.



  2.2.5.  s3mod

  This plays 4/6/8 track MOD modules and Scream Tracker 3 modules.  It
  uses 8 bit mono output with a sampling rate of 22000 Hz by default.
  You can use the option -s to enable stereo, -b to enable 16 bit
  output, and -f to set the sampling frequency.  However, the sound
  output is worse than tracker (some noise), so I recommend using
  tracker instead of s3mod for playing ordinary MOD files (unless you
  have an underpowered machine).  It has a much smaller CPU load
  compared to tracker.

  It is copyrighted by Daniel Marks and David Jeske (jeske@uiuc.edu),
  but you can do anything you want with it (except that you can't claim
  you wrote it).

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/s3mod-
  v1.09.tar.gz>.



  2.2.6.  mod

  This beta program plays MODs (15/31-instrument, up to 32 voices),
  MTMs, ULTs and S3Ms on the Gravis Ultrasound card.  It can also use
  packed modules if you have gzip, lharc, unzip, and unarj installed.
  It cannot play Powerpacked modules or modules packed with some Amiga
  composers ("PACK" signature).

  This requires at least version 3.0 of the sound driver.  It won't work
  with the 2.90-2 or earlier version of the sound driver.  The text
  interface requires ncurses.  There is also an X interface included,
  which uses Tcl/Tk.

  It was written by Mikael Nordqvist (mech@df.lth.se or
  d91mn@efd.lth.se).

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/mod-v0.81.tgz>.



  2.2.7.  nspmod

  This is an alpha module player which can play MTM, S3M, and MOD
  modules.  It is intended to be a module player for soundcards without
  a DSP (not to be confused with what Creative Labs calls a DSP).  It
  has a CPU load somewhat similar compared to tracker.


  It has a feature which lets modules loop if they want to.  The number
  of loops can be limited by the -l option.  It uses only 8 bit sound
  output (as of version 0.1).

  This was written by Toru Egashira (toru@jms.jeton.or.jp).

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/nspmod-0.1.tar.gz>.



  2.2.8.  yampmod

  This alpha program was designed to play 4-channel modules using the
  minimum of CPU resources.  It was not designed to produce high quality
  sound.  So the only sound output it produces is 22 kHz mono output.
  Also, the output isn't as clean as it should be, reflecting its alpha
  status.

  It was written by David Groves (djg@djghome.demon.co.uk).

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/yampmod-0.1.tar.gz>.



  2.3.  MPEG audio streams

  MPEG is a standard specifying the coding of video and the associated
  audio for digital storage.  MPEG is usually associated with video, but
  the audio part of the standard can be used separately.  The audio part
  of the MPEG standard defines three layers, layer I, II, and III.
  Players that can decode higher layers can also decode lower layers
  (e.g. layer III players can play layer II files).  Layer I MPEG audio
  files usually have the extension .mpg (so if there is a file with this
  extension that can't be played by a MPEG video player, it's probably
  an audio stream), layer II usually have the extension .mp2, and layer
  III usually have the extension .mp3.  The audio compression is pretty
  good.  A two megabyte layer II MPEG audio file will probably take up
  25 megabytes for a raw PCM sample file with the same quality.



  2.3.1.  mpg123

  This beta program is an efficient MPEG audio stream player, which has
  support for layers I, II, and III.  It is based on code from many
  sources.  It is able to play in real time streams that are read by
  HTTP (i.e. one can play an MPEG audio stream directly over the World
  Wide Web).

  The main author is Michael Hipp (Michael.Hipp@student.uni-
  tuebingen.de).  It may be used and distributed in unmodified form
  freely for non-commercial purposes.  Inclusion in a collection of free
  software (such as CD-ROM images of FTP servers) is explicitly allowed.

  The latest version can be obtained from the mpg123 homepage
  <http://mpg.123.org/>.



  2.3.2.  maplay 1.2

  This MPEG audio stream player only has support for layer I and layer
  II streams, and lacks support for layer III streams.  It supports 16
  bit sound cards on Linux.

  It is pretty CPU intensive, taking up to about 55% CPU time on a 60MHz
  Pentium.  The output is intolerable on a 66MHz 486 because the CPU
  just can't catch up with the sound.  If this happens to you, try
  playing only one side of the audio stream (with the -l or -r option),
  instead of the default stereo.

  A slight change in one of the files may be necessary in order to
  compile it.  Namely, you may need to add the following line to the
  beginning of the file configuration.sh.



       #! /bin/sh



  The author is Tobias Bading (bading@cs.tu-berlin.de).  maplay 1.2 can
  be obtained from  <ftp://ftp.cs.tu-
  berlin.de/pub/misc/maplay1.2/maplay1_2.tar>.



  2.3.3.  maplay 1.3b

  This is an unofficial modification (i.e. not by the original author)
  of maplay 1.2, so that it can run with a much lower load on the CPU.
  It accomplishes this mainly by making u-law output actually work on
  other platforms besides the SPARC.  Note that it uses u-law output by
  default, so the sound quality is lower.

  The modifications were made by Orlando Andico
  (orly@gibson.eee.upd.edu.ph).

  This can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay-1.3b-
  Linux.tar.gz>.



  2.3.4.  maplay3

  This is another derivative of maplay 1.2.  It adds support for MPEG
  Layer 3 audio streams.  Currently it seems to have some bugs in its
  playback (you may hear some screeching noises).  You may have to
  twiddle with the options to solve this.
  The modifications were made by Timo Jantunen (timo.jantunen@hut.fi or
  jeti@cc.hut.fi).  It says that it can be used freely, but making money
  off of it is not allowed.  However, I'm not entirely sure about the
  validity of this copyright, since the original maplay is under the GNU
  General Public License, which does not allow derivative works to have
  a different copyright.

  This can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay3.tar.gz>.



  2.3.5.  splay

  This beta player is another derivative of maplay 1.2 (actually, it is
  a derivative of maplay 1.2+, which is a MS Windows only derivative of
  maplay 1.2).  It adds support for MPEG Layer 3 audio streams.  It is
  also able to play WAV files.  It can also play audio streams received
  over an HTTP connection.

  Another feature of splay is that it can be used as a library (under
  the LGPL), so that it can be used in other programs.  It also tries to
  improve performance by using threading (you need pthread to use this
  feature) and a little inline assembly.

  splay uses a command line interface and an optional X interface (which
  uses QT).

  If after compiling it doesn't work (e.g. it segmentation faults), try
  compiling it again without threading.

  This is by Jung Woo-jae (jwj95@eve.kaist.ac.kr).

  It can be obtained from splay's home page
  <http://adam.kaist.ac.kr/~jwj95/>.



  2.3.6.  Sajber Jukebox

  This program is a MPEG audio player with a graphical user interface.
  It is based on splay, so it includes support for MPEG audio layers up
  to III.  It is also able to play MPEG audio streams in real time with
  the stream being fed by HTTP.  It is also easy to configure.

  It uses the QT toolkit (at least version 1.2 is required).  It also
  uses the LinuxThreads library (the included binary only works with
  version 0.5).

  The author is Joel Lindholm (wizball@kewl.campus.luth.se).

  The latest version can be obtained from
  <ftp://kewl.campus.luth.se/pub/jukebox>.



  2.3.7.  amp

  This beta MPEG audio player only has support for MPEG Layer 3 audio
  streams.  It is able to play directly to the soundcard, and it can
  output to raw PCM or WAV files.  This also gives quite a load on the
  CPU (about 60% on a 133MHz Pentium).

  This was written by Tomislav Uzelac (tuzelac@rasip.fer.hr).  It can be
  freely used and distributed, as long as it is not sold commercially
  without permission (including it in CD-ROMs that contain free software
  is explicitly permitted, though).

  It can be obtained from
  <ftp://ftp.rasip.fer.hr/pub/mpeg/amp-0.7.3.tgz>.



  2.3.8.  XAudio

  This alpha library was written to be a fast implementation of an MPEG
  audio decoding library to be used by various GUI front-ends.  It
  supports MPEG audio layers I, II, and III.  It is capable of random
  access to bitstreams.  A command-line interface is included.  A Motif
  (Lesstif) front-end is also included in the Linux version.

  This is by Gilles Boccon-Gibod, Alain Jobart and others.  The front-
  ends to the libary can be freely downloaded.  The library itself must
  be licensed to be used (a source and binary license is available).

  The front-ends to the library can be obtained from the XAudio home
  page <http://www.xaudio.com/>.



  2.3.9.  Layer 3 Shareware Encoder/Decoder

  This is actually a converter that converts MPEG Layer 3 audio streams
  to WAV, AIFF, SND, AIFC, or just raw PCM sample files.  The Linux
  version does not directly output the sound to the soundcard.  One has
  to first convert it to some other format.

  However, when you try to play a converted file using sox, you'll
  probably just get noise because the word order in the PCM samples is
  not right (at least on Intel platforms).  You need to give sox the
  option -x to solve this problem.  But there are some players that
  don't have to be told that the word order is wrong, so you might not
  have to worry about this.

  If you have a really fast computer (probably at least a 100Mhz
  Pentium), then you can try to play MPEG Layer 3 streams directly
  without having to first convert the audio file to another format like
  in the following example (this example assumes that you're using sox
  and playing a 44.1 kHz stereo sample).



       $ l3dec foo.mp3 -sto | play -t raw -x -u -w -c 2 -r 44100 -



  The number after -r is the sample rate of the audio stream, and the
  number after -c depends on whether it is mono or stereo (or even
  quad).  If this looks too complicated, you can use something like a
  shell script or an alias.

  This is shareware copyrighted by Fraunhofer-IIS.  A demo version for
  Linux on x86 systems can be obtained from
  <ftp://ftp.fhg.de/pub/layer3>.  The demo version only converts layer
  III audio streams.



  2.3.10.  X11Amp

  This beta software is an MPEG audio stream player with a graphical
  interface,  similar to the one used by the Windows program winamp.

  There is no copyright mentioned anywhere (I assume that it can be
  freely used for personal use).  It is maintained by Mikael Alm
  (psy@x11amp.bz.nu), Thomas Nilsson (fatal@x11amp.bz.nu), and Olle
  Hallnas (crocodile@x11amp.bz.nu).

  It can be obtained from X11Amp's homepage <http://www.x11amp.bz.nu/>.
  Only binaries for Intel Linux and FreeBSD are made available here.


  2.4.  WAV

  Quote from the sox man page:


       These appear to be very similar to IFF files, but not the
       same.  They are the native sound file format of Windows 3.1.
       Obviously, Windows 3.1 is of such incredible importance to
       the computer industry that it just had to have its own sound
       file format.


  These usually have the extension .wav.

  Also see section ``sox'' and ``bplay'' for other WAV players besides
  the ones listed here.



  2.4.1.  wavplay

  This program supports playing and recording with the WAV format.  It
  uses locking so that only one sound may be played at a time.  Its
  locking capabilities can also be used separately from its sound
  playing capabilities.

  In addition to a command-line interface, it also has a Motif
  interface, which can be used with Lesstif.

  It was originally written by Andre Fuechsel (af1@irz.inf.tu-
  dresden.de), but was evolved to the point of being completely
  rewritten by Warren W. Gay (bx249@freenet.toronto.on.ca or
  wwg@ica.net).

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/wavplay-1.0.tar.gz>.



  2.5.  Other stuff

  This section lists stuff that play sound formats that don't deserve a
  separate section (i.e. formats that have only one player available),
  or players that play more than one format.



  2.5.1.  sox

  This program is actually a converter, that is, it converts one sound
  format to another.  However, some versions of sox, when invoked as
  play, plays the sound (the play application in the Sound HOWTO
  probably refers to this).  It supports raw (no header) binary and
  textual data, IRCAM Sound Files, Sound Blaster .voc, SPARC .au
  (w/header), Mac HCOM, PC/DOS .sou, Sndtool, and Sounder, NeXT .snd,
  Windows 3.1 RIFF/WAV, Turtle Beach .smp, CD-R, and Apple/SGI AIFF and
  8SVX formats


  Since somewhere in the 1.3.6x kernels, you might have to make a small
  change in one file to make it play the sound directly.  Namely, you
  may have to change line 179 in sbdsp.c from



       if (abuf_size < 4096 || abuf_size > 65536) {



  to



       if (abuf_size < 1 || abuf_size > 65536) {



  But then again, you may not have to do this.  But doing this won't
  break anything.


  It is written and copyrighted by many people, and can be used for any
  purpose.

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/Lsox-
  linux.tar.gz>.

  A more recent version by Chris Bagwell (cbagwell@sprynet.com) (based
  on the latest gamma version of the original sox, and includes the
  above fix) can be obtained from
  <http://home.sprynet.com/sprynet/cbagwell/projects.html>.  In
  addition, this version supports MS ADPCM and IMA ADPCM WAV formats.



  2.5.2.  bplay

  This beta program plays raw audio, WAV, and VOC files.  It's also able
  to record to these files.  It uses a variety of techniques to get the
  highest speed possible so that it can run acceptably even on slow
  machines.  One of these techniques require that the installed programs
  be setuid root.  The paranoid hoping to use this may want to use the
  Debian package by Ian Jackson (ijackson@gnu.org), which disables the
  feature that needs the setuid bit.

  The author is David Monro (davidm@gh.cs.usyd.edu.au).

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/bplay-0.96.tar.gz>.



  2.5.3.  SIDPLAY

  This program emulates the Sound Interface Device chip (MOS 6581,
  commonly called SID) and the Micro Processor Unit (MOS 6510) of the
  Commodore 64.  Therefore it is able to load and execute C64 machine
  code programs which produce music or sound.  In general these are
  independent fragments of code and data which have been ripped from
  games and demonstration programs and have been transferred directly
  from the C64.

  It uses a command line interface by default.  There are also Tk and QT
  interfaces available separately from the main package.

  It is maintained by Michael Schwendt (sidplay@geocities.com).

  It can be obtained from SIDPLAY's home page
  <http://www.geocities.com/SiliconValley/Lakes/5147/>.



  2.5.4.  RealAudio Player

  This lets you listen to sound, which is stored in a proprietary
  format, in real time over the Internet without downloading the whole
  sound file first.  It could be used stand alone, but it is really
  intended to be used along with a web browser (the explicitly supported
  ones are Mosaic and Netscape).  It cannot be used without X (you
  wouldn't be able to get it working with Lynx in a text console).

  However, there exists a hack which allows one to run the RealAudio
  player from the text console.  It requires the X virtual frame buffer
  (Xvfb) server to work.  This hack can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/traplayer-0.5.tar.gz>.

  This is by Progressive Networks, Inc.  This cannot be redistributed,
  modified etc.  Look at the license for exact details on what you can
  do.  It can be obtained by registering with no cost at the RealAudio
  home page <http://www.realaudio.com/>.



  2.5.5.  cat

  One might think what cat, the sometimes overused concatenating
  utility, has to do with playing sounds.  I'll show a use of it through
  an example.



       $ cat sample.voc > /dev/dsp
       $ cat sample.wav > /dev/dsp
       $ cat sample.au > /dev/audio



  Doing a cat of an .au file to /dev/audio will usually work, and if
  you're lucky enough that the file has the correct byte order (for your
  platform) etc., a cat of a sound file that uses PCM samples (like .wav
  or .voc) to /dev/dsp might even sound right.

  This isn't a totally useless use of cat.  It might be useful, for
  example, if you have a sound file that none of your programs
  recognize, and you know that it uses PCM samples, then you might be
  able to get a very approximate idea on how it sounds like this way (if
  you're lucky).



  3.  Other useful sound utilities

  This section has nothing to do with the actual playing of sound files.
  Rather, it is a collection of some sound utilities that one might find
  useful.


  3.1.  volume

  This is a simple command line interface for controlling the volume
  (what else could it be?).  It also has a separate program with a
  Tcl/Tk interface included in the package for controlling the volume
  and playing .au sound files.  A very simple Tcl/Tk CD player is also
  included.

  This is Freeware and it is written by Sam Lantinga
  (slouken@cs.ucdavis.edu).

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/soundcard/volume-2.1.tar.gz>.



  3.2.  Sound Studio

  This is a Tcl/Tk application that supports playback, recording, and
  editing of digital sound using sox.  It includes sox in the
  distribution to avoid compatibility problems.

  This was written by Paul Sharpe and N. J. Bailey
  (N.J.Bailey@leeds.ac.uk).  It may be freely used and redistributed if
  a postcard is sent.


  It can be found at Sound Studio's home page <http://www.elec-
  eng.leeds.ac.uk/staff/een6njb/Software/Studio/screens.html>.



  3.3.  Tickle Music

  This beta Tcl/Tk program is a music file browser that allows you to
  play various sound formats as long as an appropriate program to play
  it is on your system.  By default gmod is used for playing MOD files
  and mp for playing MIDI files (you can change the source to use other
  programs).

  It is written and copyrighted by Shannon Hendrix (shendrix@pcs.cnu.edu
  or shendrix@escape.widomaker.com).

  It can be obtained from
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tmusic-1.0.tar.gz>.



  4.  References


  1. The documentation included with the applications in this document.

  2. The Linux Sound HOWTO.  It can be found at the Linux Documentation
     Project <http://sunsite.unc.edu/LDP/>.
  3. Linux MIDI and Sound Applications
     <http://www.bright.net/~dlphilp/linux_soundapps.html>

  4. Programmer's Guide to OSS <http://www.4front-tech.com/pguide/>

  5. SoX home page <http://www.spies.com/Sox/>



F 3DFX-HOW.;1                       	3Dfx-HOWTO
F 4MB-LAPT.;1                       	4mb-Laptops
F ACCESS-H.;1                       	Access-HOWTO
F ADV-ROUT.;1                       	Adv-Routing-HOWTO
F AI-ALIFE.;1                       	AI-Alife-HOWTO
F ALPHA-HO.;1                       	Alpha-HOWTO
F ASSEMBLY.;1                       	Assembly-HOWTO
F ASTRONOM.;1                       	Astronomy-HOWTO
F AX25-HOW.;1                       	AX25-HOWTO
F BASH-PRO.;1                       	Bash-Prog-Intro-HOWTO
F BASH-PRO.000;1                    	Bash-Prompt-HOWTO
F BENCHMAR.;1                       	Benchmarking-HOWTO
F BEOWULF-.;1                       	Beowulf-HOWTO
F BOOTDISK.;1                       	Bootdisk-HOWTO
F BOOTPROM.;1                       	BootPrompt-HOWTO
F BRIDGE-S.;1                       	BRIDGE-STP-HOWTO
F BUSMOUSE.;1                       	Busmouse-HOWTO
F C-C__BEA.;1                       	C-C++Beautifier-HOWTO
F CABLE-MO.;1                       	Cable-Modem
F CALL-BAC.;1                       	call-back-mini-HOWTO
F CD-WRITI.;1                       	CD-Writing-HOWTO
F CDROM-HO.;1                       	CDROM-HOWTO
F CHROOT-B.;1                       	Chroot-BIND-HOWTO
F COMMERCI.;1                       	Commercial-HOWTO
F CONFIG-H.;1                       	Config-HOWTO
F CONSULTA.;1                       	Consultants-HOWTO
F COPYRIGH.;1                       	COPYRIGHT
F CVS-RCS-.;1                       	CVS-RCS-HOWTO
F CYRUS-IM.;1                       	Cyrus-IMAP
F C__PROGR.;1                       	C++Programming-HOWTO
F DB2-HOWT.;1                       	DB2-HOWTO
F DIALD-HO.;1                       	Diald-HOWTO
F DISKLESS.;1                       	Diskless-HOWTO
F DISKLESS.000;1                    	Diskless-root-NFS-HOWTO
F DISTRIBU.;1                       	Distribution-HOWTO
F DNS-HOWT.;1                       	DNS-HOWTO
F DOS-WIN-.;1                       	DOS-Win-to-Linux-HOWTO
F DOSEMU-H.;1                       	DOSEMU-HOWTO
F DVD-PLAY.;1                       	DVD-Playing-HOWTO
F ECOLOGY-.;1                       	Ecology-HOWTO
F EMACS-BE.;1                       	Emacs-Beginner-HOWTO
F EMACSPEA.;1                       	Emacspeak-HOWTO
F ENTERPRI.;1                       	Enterprise-Java-for-Linux-HOWTO
F ETHERNET.;1                       	Ethernet-HOWTO
F FILESYST.;1                       	Filesystems-HOWTO
F FIREWALL.;1                       	Firewall-HOWTO
F FONT-HOW.;1                       	Font-HOWTO
F FRAMEBUF.;1                       	Framebuffer-HOWTO
F FROM-POW.;1                       	From-PowerUp-To-Bash-Prompt-HOWTO
F FTAPE-HO.;1                       	Ftape-HOWTO
F GCC-HOWT.;1                       	GCC-HOWTO
F GLIBC2-H.;1                       	Glibc2-HOWTO
F HARDWARE.;1                       	Hardware-HOWTO
F HOWTO-HO.;1                       	HOWTO-HOWTO
F HOWTO-IN.;1                       	HOWTO-INDEX
F HP-HOWTO.;1                       	HP-HOWTO
F INFO-SHE.;1                       	INFO-SHEET
F INGRESII.;1                       	IngresII-HOWTO
F INSTALLA.;1                       	Installation-HOWTO
F INTRANET.;1                       	Intranet-Server-HOWTO
F IP-MASQU.;1                       	IP-Masquerade-HOWTO
F IPCHAINS.;1                       	IPCHAINS-HOWTO
F IPX-HOWT.;1                       	IPX-HOWTO
F IR-HOWTO.;1                       	IR-HOWTO
F ISP-HOOK.;1                       	ISP-Hookup-HOWTO
F ISP-SETU.;1                       	ISP-Setup-RedHat
F JAVA-CGI.;1                       	Java-CGI-HOWTO
F JAVASTAT.;1                       	JavaStation-HOWTO
F JAZ-DRIV.;1                       	Jaz-Drive-HOWTO
F KERNEL-H.;1                       	Kernel-HOWTO
F KEYBOARD.;1                       	Keyboard-and-Console-HOWTO
F KICKSTAR.;1                       	KickStart-HOWTO
F KIOSK-HO.;1                       	Kiosk-HOWTO
F KODAK-DI.;1                       	Kodak-Digitalcam-HOWTO
F LAPTOP-H.;1                       	Laptop-HOWTO
F LARGE-DI.;1                       	Large-Disk-HOWTO
F LDAP-HOW.;1                       	LDAP-HOWTO
F LINUX-FR.;1                       	Linux-From-Scratch-HOWTO
F LINUXDOC.;1                       	LinuxDoc+Emacs+Ispell-HOWTO
D LOCALIZA                          	localization
F LOOPBACK.;1                       	Loopback-Encrypted-Filesystem-HOWTO
F LVM-HOWT.;1                       	LVM-HOWTO
F MAIL-ADM.;1                       	Mail-Administrator-HOWTO
F MAIL-USE.;1                       	Mail-User-HOWTO
F MAJORDOM.;1                       	Majordomo-MajorCool-HOWTO
F META-FAQ.;1                       	META-FAQ
F MGR-HOWT.;1                       	MGR-HOWTO
F MILO-HOW.;1                       	MILO-HOWTO
D MINI                              	mini
F MIPS-HOW.;1                       	MIPS-HOWTO
F MODEM-HO.;1                       	Modem-HOWTO
F MP3-HOWT.;1                       	MP3-HOWTO
F MULTI-DI.;1                       	Multi-Disk-HOWTO
F MULTICAS.;1                       	Multicast-HOWTO
F MULTIOS-.;1                       	MultiOS-HOWTO
F MUTT-GNU.;1                       	Mutt-GnuPG-PGP-HOWTO
F NC-HOWTO.;1                       	NC-HOWTO
F NCD-HOWT.;1                       	NCD-HOWTO
F NET-HOWT.;1                       	Net-HOWTO
F NET3-4-H.;1                       	NET3-4-HOWTO
F NETWORKI.;1                       	Networking-Overview-HOWTO
F NFS-HOWT.;1                       	NFS-HOWTO
F NIS-HOWT.;1                       	NIS-HOWTO
F ONLINE-T.;1                       	Online-Troubleshooting-HOWTO
F OPTICAL-.;1                       	Optical-Disk-HOWTO
F ORACLE-7.;1                       	Oracle-7-HOWTO
F ORACLE-8.;1                       	Oracle-8-HOWTO
F PALMOS-H.;1                       	PalmOS-HOWTO
F PARALLEL.;1                       	Parallel-Processing-HOWTO
F PCI-HOWT.;1                       	PCI-HOWTO
F PCMCIA-H.;1                       	PCMCIA-HOWTO
F PHHTTPD-.;1                       	phhttpd-HOWTO
F PHP-HOWT.;1                       	PHP-HOWTO
F PLIP-INS.;1                       	PLIP-Install-HOWTO
F PLUG-AND.;1                       	Plug-and-Play-HOWTO
F POSTGRES.;1                       	PostgreSQL-HOWTO
F PPP-HOWT.;1                       	PPP-HOWTO
F PRINTING.;1                       	Printing-HOWTO
F PRINTING.000;1                    	Printing-Usage-HOWTO
F PROCESS-.;1                       	Process-Monitor-HOWTO
F PROGRAM-.;1                       	Program-Library-HOWTO
F PSION-HO.;1                       	Psion-HOWTO
F QMAIL-VM.;1                       	Qmail-VMailMgr-Courier-imap-HOWTO
F QUAKE-HO.;1                       	Quake-HOWTO
F READING-.;1                       	Reading-List-HOWTO
F README.;1                         	README
F REDHAT-C.;1                       	RedHat-CD-HOWTO
F ROOT-RAI.;1                       	Root-RAID-HOWTO
F RPM-HOWT.;1                       	RPM-HOWTO
F SCSI-PRO.;1                       	SCSI-Programming-HOWTO
F SECURE-P.;1                       	Secure-Programs-HOWTO
F SECURING.;1                       	Securing-Domain-HOWTO
F SECURITY.;1                       	Security-HOWTO
F SERIAL-H.;1                       	Serial-HOWTO
F SERIAL-P.;1                       	Serial-Programming-HOWTO
F SHADOW-P.;1                       	Shadow-Password-HOWTO
F SMB-HOWT.;1                       	SMB-HOWTO
F SMP-HOWT.;1                       	SMP-HOWTO
F SOFTWARE.;1                       	Software-Building-HOWTO
F SOFTWARE.000;1                    	Software-RAID-HOWTO
F SOFTWARE.001;1                    	Software-Release-Practice-HOWTO
F SOFTWARE.4X-;1                    	Software-RAID-0.4x-HOWTO
F SOUND-HO.;1                       	Sound-HOWTO
F SOUND-PL.;1                       	Sound-Playing-HOWTO
F SRM-HOWT.;1                       	SRM-HOWTO
F TCLTK-HO.;1                       	TclTk-HOWTO
F TETEX-HO.;1                       	TeTeX-HOWTO
F TEXT-TER.;1                       	Text-Terminal-HOWTO
F THINCLIE.;1                       	Thinclient-HOWTO
F TIPS-HOW.;1                       	Tips-HOWTO
D TRANSLAT                          	translations
F UMSDOS-H.;1                       	UMSDOS-HOWTO
F UNICODE-.;1                       	Unicode-HOWTO
F UNIX-AND.;1                       	Unix-and-Internet-Fundamentals-HOWTO
D UNMAINTA                          	unmaintained
F UPS-HOWT.;1                       	UPS-HOWTO
F USER-AUT.;1                       	User-Authentication-HOWTO
F USER-GRO.;1                       	User-Group-HOWTO
F UUCP-HOW.;1                       	UUCP-HOWTO
F VAR-HOWT.;1                       	VAR-HOWTO
F VIM-HOWT.;1                       	Vim-HOWTO
F VIRTUAL-.;1                       	Virtual-Services-HOWTO
F VMAILMGR.;1                       	VMailMgr-HOWTO
F VME-HOWT.;1                       	VME-HOWTO
F VMS-TO-L.;1                       	VMS-to-Linux-HOWTO
F VPN-HOWT.;1                       	VPN-HOWTO
F VPN-MASQ.;1                       	VPN-Masquerade-HOWTO
F WACOM-TA.;1                       	Wacom-Tablet-HOWTO
F WEARABLE.;1                       	Wearable-HOWTO
F WINMODEM.;1                       	Winmodems-and-Linux-HOWTO
F WWW-HOWT.;1                       	WWW-HOWTO
F WWW-MSQL.;1                       	WWW-mSQL-HOWTO
F XFREE86-.;1                       	XFree86-Touch-Screen-HOWTO
F XFREE86-.000;1                    	XFree86-Video-Timings-HOWTO
F XFREE86-.001;1                    	XFree86-HOWTO
F XINERAMA.;1                       	Xinerama-HOWTO
F XWINDOW-.;1                       	XWindow-User-HOWTO
  The Linux Tcl and Tk HOWTO
  Luca Rossetti lukaros@tin.it <mailto:lukaros@tin.it>
  v0.2, 07 November 1998

  This document describes the Linux approach to Tcl, a scripting langua
  ge.  It is an easy to learn interpreted language that uses a typeless
  approach to achieve a higher level of programming and a rapid applica-
  tion development.  The Tk toolkit is a programming environment for
  creating graphical user interf aces (GUI) under X Window System. Their
  capabilities include the possibility to extend and embed in other
  application, rapid development and ease of use. Toge ther, Tcl and Tk
  provide many benefits both to application developer and user. Tk-ba
  sed interfaces tend to be much more customizable and dynamic than
  those built with one of the C or C++ based toolkits. Tk implements the
  Motif look and feel.  A great number of interesting X applications are
  implemented entirely in Tk, with no new application-specific commands
  at all.

  1.  Introduction


  This is the Linux Tcl and Tk HOWTO. It is intended as a Linux
  reference covering everything you should know concerning installation,
  configuration and an introduction to development under Tcl and Tk.
  History and some pros and cons about Tcl and Tk under Linux are
  analized, and references are given to many other sources of
  information on a variety of topics related to this simple but powerful
  scripting language.

  If you ever rebuilt your Linux kernel inside X using the command

  ______________________________________________________________________
  make xconfig
  ______________________________________________________________________



  you surely managed to face the strenght of this simple but powerful
  scripting language.

  After executing the first step of kernel rebuilding, a script called
  kconfig.tk is executed via wish (the Tcl intepreter). The Linux Kernel
  Configuration wind ow appears. Instead of answering a series of
  questions, this X-based configuratio n utility allows you to use
  checkboxes to select which kernel options you want to enable.

  The system stores your last configuration options so that every time
  you run it, you need only to add or remove some checks and you don't
  need to reent er the whole set of option. Moreover you can fill the
  whole (or part of the) list of kernel option the order you want. After
  this simplified step you can rebuil d your kernel in the traditional
  way.

  There's actually another famous case. Have you ever used "printtool" ?
  (Printer Config Tool (C) Copyright 1994 by Red Hat Software
  <http://www.redhat.com> - author: Michael Callahan).  If you installed
  a Red Hat distribution you happily managed to use it to set up
  printing services . Well, printtool front-end is mainly a Tcl/Tk
  script.

  For those who don't know Red Hat let me tell you how you can easily
  configure your printers just filling some textboxes and filling in
  some checkboxes.

  The program itself takes care of setting up printing services through
  the creation of spooling directory, writes /etc/printcap file and the
  printer's filter, reloads lpd and tests your filter with ascii or
  postscript pages. It allows you manipulate ghostscript options (i.e.
  choose up to 8 pages per outpu t page and setting margins), has an
  help-on-line and many more features.

  What is the difference compared to other service-printing
  implementation?

  Everything is achieved by using Tcl/Tk as a "glue" between
  consolidated application and operating with normal Linux configuration
  files in a visual and interactive window under X-Window. No new
  application-specific commands were written at all.

  1.1.  Purpose of this document


  Currently the purpose of the document is limited to giving initial
  references to Linux users; in future versions I will try to
  incorporate a small "Programm ing Tutorial".  Let me state that again:
  this is not (and doesn't want to substitute) an omnicomprehensive
  "user manual" or "reference" for Tcl and Tk development and
  programming - it's just a starting point for Linux users.

  The author's concept of reference manual coincides with the definition
  of man pages and many people learn Tcl/Tk from these basic source of
  informati on.  These files are a part of the source code distribution
  and are installed on your Linux box. You will be able to access the
  Tcl/Tk manual pages through the man command.

  Many structured and complete programming tutorials have been written
  in order to let the new user begin hacking with Tcl/Tk; tons of other
  material are available in the Internet. Interpreting Tcl/Tk philosophy
  I won't try to reinvent the wheel, I will manage to glue the huge
  amount of material already available.

  I suggest you to have a look at the other documents listed in the
  ``References section'' in order to find where to retri eve specific
  information about Tcl and Tk.

  1.2.  What you should know before reading


  In order to understand the abc of Tcl/Tk you shouldn't be a
  programming-guru, command sintax is very simple. Basically you have to
  be familiar with:

  o  simple programming concepts;

  o  using very common unix commands and/or utilities;

  o  having access to the Internet;

  o  using ftp.

  1.3.  New versions of this document


  Newer versions of this document will be uploaded to ftp site:
  ftp://sunsite.unc.edu/ pub/Linux/HOWTO/
  <ftp://sunsite.unc.edu/Linux/docs/HOWTO/> and will be available on all
  other mirrors.

  Hypertext and other versions of this and other Linux HOWTOs are
  available mainly at sunsite.unc.edu/LDP/lpd.ht ml
  <http://sunsite.unc.edu/LDP/lpd.html> and www.linux-howto.com
  <http://www.linux-howto.com> and on many other Mirror World-Wide-Web
  sites.

  I will try to incorporate in my Web-Page
  <http://space.tin.it/computer/tlqhr/> the most recent html and sgml
  version of the document. Most Linux CD-ROM distributions include the
  HOWTOs, often in a subdir of /usr/doc/ directory, and you can also buy
  printed copies from several vendors.

  Sometimes the HOWTOs available from CD-ROM vendors, ftp sites, and in
  hardcopy format are out of date. If the date on this HOWTO is more
  than six months in the past, then a newer copy is probably available
  on the Internet.

  If you make a translation of this document into another language, drop
  me a line and I'll include a reference to it here.

  1.4.  Revision History


  o  Version 0.1: 28 October 1998 - first version;

  o  Version 0.2: 07 November 1998 - deep restyling and lifting.

  1.5.  Feedback and other stuff


  I rely on you, the reader, to make this HOWTO useful. If you have any
  suggestio ns, corrections, or comments, please send them to me, ( Luca
  Rossetti <mailto:lukaros@tin.it> ), and I will try to put them in the
  next revision.

  If any of the links mentioned in this document becomes unavailable or
  changes, please notify me immediately so that I can update and/or
  remove the link.

  I am willing to answer general questions about Tcl/Tk and Linux as
  best as I can. Before doing so, please read all of the information in
  this HOWTO, and send me detailed information about the problem.

  If you publish this document on a CD-ROM or in hardcopy form, a
  complimentary copy would be really appreciated. E-mail me and I will
  send you back my postal address.

  In many section I mention publishing companies or commercial URL
  sites: I really don't work for these guys.

  1.6.  Credits


  Most of the information in this HOWTO comes from Dr. Ousterhout's
  Scriptics <http://www.scriptics.com>  and Larry W. Virden
  comp.lang.tcl FAQs <http://www.tclfaq.wservice.com/tcl-faq/> .

  I would like to thank the PLUTO <http://www.pluto.linux.it/>  Italian
  Linux User Group and the whole volunteers of ILDP
  <http://www.pluto.linux.it/ildp/> (Italian Linux Document ation
  Project) especially Eugenia Franzoni and Giovanni Bortolozzo for their
  feedbac k.

  1.7.  Distribution Policy


  This document is Copyright 1998 by Luca Rossetti
  <mailto:lukaros@tin.it>.


  This document is distributed in the hope that it will be useful to the
  reader: of course it is considered to be without any warranty; without
  even the implied warranty of merchantability or fitness for a
  particular purpose.  This HOWTO is free documentation; you can
  redistribute it and/or modify it under the terms of the LDP COPYRIGHT
  <http://sunsite.unc.edu/LDP/LDP-COPYRIGHT.html> .

  Please read the LDP Manifesto <http://sunsite.unc.edu/LDP/LDP-
  Manifesto.html> for more details.

  2.  Tcl/Tk History


  Tcl/Tk originated with Dr. John Ousterhout
  <mailto:ouster@scriptics.com> (pronounced "Oh'-stir-howt") while
  teaching at University of California, Berkeley, Califor nia.  He
  actually started implementing it when he got back to Berkeley in the
  spring of 1988; by summer of that year it was in use in some internal
  applications, but there was no Tk. Read about the history of Tcl/Tk
  directly from its author words at www.scripti
  cs.com/scripting/tclHistory.html
  <http://www.scriptics.com/scripting/tclHistory.html>.

  2.1.  Cronology


  o  1989: The first external releases of Tcl and beginning of Tk imp
     lemention;

  o  1991: First release of Tk;

  o  1994: Dr. Ousterhout was hired by Sun Microsystems, Inc.: he was a
     Distinguished Engineer and led the Tcl project.

  o  April/May 1997: the Sun research group responsible for Tcl devel
     opment were spun off into a Sun business group called SunScript.
     However, things chan ged again soon afterwards. You can read more
     about that evolution selecting "SunSc ript_story" at URL: Su
     nScript-Story .

  o  August 1997: a Tcl Consortium was formed. You can read more abou t
     it, including how to join, who currently serves on the board of
     directors, and so on by visi ting Tcl Consortium
     <http://www.tclconsortium.org/>;

  o  February 1998: Dr. Ousterhout left Sun to create Scriptics
     <http://www.scriptics.com/>, a company dedicated to scripting
     tools, applications, and services. According to www.scriptics.com
     /about/news/qa.html < http://www.scriptics.com/about/news/qa.html>,
     core Tcl and Tk remain free, with the team at Sun continuing work
     right now on Tcl/Tk 8.1. After the next release, the intention is
     that work on the core will migrate from Sun to Scriptics, with the
     Sun team will focus more on Tcl extensions and applications.

  o  April 23, 1998: the Association for Computing Machinery ACM
     <http://www.acm.org/> awarded the 1997 Software System Award to
     John Ousterhout and Scriptics ( www.acm.org/awards/
     <http://www.acm.org/awards/>). This award is given to an
     institution or individual recognized for developing a software
     system that has had a lasting influence, reflected in contributions
     to concept s, in commercial acceptance, or both.

  3.  What is Tcl/Tk



  3.1.  What is Tcl?


  Tcl is the acronym for "Tool Command Language" (it is pronounced
  "tickle").  Tcl is actually divided into two things: a language and a
  library.

  Tcl is a simple textual programming language, intended for issuing
  commands to interactive programs such as text editors, debuggers and
  shells. It has a simple syntax and it is also programmable.

  Tcl users can write command procedures to provide more powerful
  commands than those given in the built-in set.

  Second, Tcl is a library package embeddable in applications. The Tcl
  library consists of a parser for the Tcl language, routines to
  implement the Tcl built -in commands, and procedures which allow each
  application to extend Tcl with addit ional commands specific to that
  application. The application program generates Tcl commands and passes
  them to the Tcl parser for execution.

  Commands may be generated by reading characters from an input source,
  or by associating command strings with elements of the application's
  user interfa ce, such as menu entries, buttons, and other widgets.
  When the Tcl library receive s commands it parses them into component
  fields and executes built-in commands directly.

  For commands implemented by the application, Tcl calls back to the
  application to execute the commands. In many cases commands will make
  recursive invocation s of the Tcl interpreter by passing in additional
  strings to execute (in fact procedures and conditional-looping
  commands all work in this way). An applicat ion program can obtain
  many advantages by using Tcl for its command language:

  o  Tcl provides a standard syntax: once users know Tcl, they will be
     able to issue commands easily to any Tcl-based application.

  o  Tcl succeeds to provides programmability. All a Tcl application
     needs to do is to implement a few application-specific low-level
     commands. Tcl provides many utility commands and a general
     programming interface for building up comp lex command procedures.
     By using Tcl, applications need not reimplement these feat ures.

  o  Extensions to Tcl, such as the Tk toolkit, provide mechanisms for
     communi cating between applications by sending Tcl commands back
     and forth. The common Tcl language framework makes it easier for
     applications to communicate with one another.

  It is important to note that Tcl was designed thinking that the
  programmer should actually use two or more languages when designing
  large software system s.  One for manipulating complex internal data
  structures, or where performance is important, and another, such as
  Tcl, for writing very small scripts that glue together the other
  pieces, providing hooks for the user to extend.

  For the Tcl script writer, ease of learning, ease of programming and
  ease of gluing are more important than performance or facilities for
  complex data structures and algorithms.

  Tcl was designed to make it easy to drop into a lower language when
  you come across tasks that make more sense at a lower level. In this
  way, the basi c core functionality can remain small and one need only
  bring along pieces that one particular wants or needs.

  One answer to "What is Tcl?" can be found at www.NeoSoft.com/tcl
  /whatistcl.html <http://www.NeoSoft.com/tcl/whatistcl.html > .
  3.2.  What is Tk?


  Tk (pronounced "tee-kay") is an extension to Tcl which provides the
  programmer with an interface to the X11 windowing system . Note that
  Tk has been successf ully compiled under X11 R4, X11 R5, X11 R6, as
  well as Sun's NeWS/X11 environments.


  Many users will encounter Tcl/Tk via the "wish" command. Wish is a
  simple windowing shell which permits the user to write Tcl/Tk
  applications in a proto typing environment.

  At present Tcl/Tk cannot handle Japanese, Chinese, Korean, ....
  language fonts.

  3.3.  Extensions


  Since Tcl is so easy to extend, many try to share extensions,
  including the popular itcl, [incr Tcl] <http://www.tcltk.com/itcl/>,
  ObjectTcl, TclX, Tix  <http://tix.mne.com/>, and BLT
  <http://www.tcltk.com/blt/>.

  These extensions, of course, require an extended Tcl interpreter.
  Moreover, many Tcl free applications require a particular Tcl
  extension to run.

  One of the most popular extension is called Expect
  <http://expect.nist.gov>.  It allows you to place a friendly front-end
  inside most command-line based UNIX applications, such as ftp, telnet,
  rlogin, passwd, fsck, and so on.

  A complete list of Tcl/Tk extensions can be found at URL www.scr
  iptics.com/resource/software/extensions/
  <http://www.scriptics.com/resource/software/extensions/>.

  3.4.  Supported Platforms


  This section contains information about Tcl 8.0 and Tk 8.0, the most
  recent version of Tcl/Tk. They were originally released on August 18,
  1997 and the most recent patch releases (8.0.3) were made on September
  3, 1998.

  When you download Tcl and Tk you get two programs, wish and tclsh,
  supporting script libraries, and on-line reference documentation.
  These programs are gene ral purpose platforms for writing applications
  with Tcl. Wish includes the graphic al user interface toolkit Tk. The
  packages are ready to use after installation.


  Tcl 8.0 and Tk 8.0 run on most releases of the following operating
  systems:


  o  Windows 95

  o  Windows NT

  o  Solaris and SunOS

  o  Linux

  o  HP-UX

  o  SGI

  o  IRIX

  o  Digital Unix

  o  AIX

  o  SCO Unix

  o  Most other Unix-like operating systems Macintosh (68K and Power
     Mac)

  o  Pre-compiled releases are available for different Linux
     distribution.

  4.  Installing and getting started with Tcl and Tk


  Most modern distribution include Tcl and Tk. Rpm and deb packages with
  precompiled binaries are avalaible for Red Hat, SuSE and Debian
  distributions (that'll make installation easier).

  A modern distribution standard installation will include Tcl/Tk as it
  is needed by many configuration tools running mainly under X.

  Tcl and Tk are distributed freely in source form via the Internet.
  There are no restrictions on their use and no licenses or royalties
  are needed (see the ``license.terms'' section for complete
  information).


  Many more Tcl/Tk scripts and extensions are also available freely.

  4.1.  Downloading the Core Distributions


  The Tcl/Tk core consists of the Tcl and Tk libraries, plus the wish
  and tclsh applications, associated documentation, script libraries,
  and demonstrat ive applications. The primary FTP site for this
  information is ftp.scriptics.com/pub/tcl/
  <ftp://ftp.scriptics.com/pub/tcl/>.


  The primary HTTP site is www.scriptics. com/software/download.html
  <http://www.scriptics.com/software/download.html> .

  4.2.  Installation


  Unless already available for your Distribution in proprietary packages
  you'll want to download the source release. You'll need both Tcl and
  Tk source s.  This procedure refers to the second case.

  Choose between compressed tar and gzipped tar format.

  Compressed Tar Files

  Tcl sources (tcl8.0.3.tar.Z): compressed tar file (about 2.4 Mbytes).
  Tk sources (tk8.0.3.tar.Z): compressed tar file (about 3.3 Mbytes).

  Gzipped Tar Files

  Tcl sources (tcl8.0.3.tar.gz): gzipped tar file (about 1.5 Mbytes). Tk
  sources (tk8.0.3.tar.gz): gzip'ed tar file (about 2.1 Mbytes).

  When you retrieve one of these files, you will get a compressed tar
  file with a name like tcl8.0.3.tar.gz or tcl8.0.3.tar.Z. The files are
  identical except for the technique used to compress them (.gz files
  are generally smalle r than .Z files).

  To unpack the distribution, invoke shell commands like the following,
  depending on which version of the release you retrieved:

  ______________________________________________________________________
  gunzip -c tcl8.0.3.tar.gz
  ______________________________________________________________________



  or

  ______________________________________________________________________
  tar xf - zcat tcl8.0.3.tar.Z
  ______________________________________________________________________



  or

  ______________________________________________________________________
  tar xf - unzip tcl80.3.zip
  ______________________________________________________________________



  Each of these commands will create a directory named tcl8.0.3, which
  includes the sources for all platforms, documentation, and the script
  library for Tcl 8.0. To compile and install the distribution, follow
  the instructions in the README file in the distribution directory. Be
  sure to compile Tcl before Tk, since Tk depends on information in Tcl.

  4.3.  The Contributed Archive


  There are many other freely available packages for Tcl and Tk,
  including both scripts written in Tcl and extensions written in C or
  C++. These packages include database applications and network access,
  a graphical user interface builder, the expect program, additional Tk
  widgets, and dozens of other things .  The primary site for the Tcl/Tk
  archive is ftp.neosoft.com/pub/tcl <ftp://ftp.neosoft.com/pub/tcl>.

  4.4.  Mirror Sites


  Several other sites around the world mirror the whole or part of the
  material from the core site and the contributed archive; you may find
  more useful to retrieve information from a mirror site that is close
  to you.

  Ftp file "0_mirror" at: ftp.scriptics.com/pub/tcl/
  <ftp://ftp.scriptics.com/pub/tcl/> for a list of the mirror sites in
  your country.

  4.5.  Which Releases to Use


  Always refer to newer recommended version in section "Tcl/Tk Core" of
  the

  Scriptics Soft ware Central page
  <http://www.scriptics.com/software/download.html>.
  At the time of this writing, recommended releases are the latest (Tcl
  8.0.3 and Tk 8.0.3), which were released in September, 1998. Tcl 8.0
  contains a new bytecode compiler that can speed up execution by a
  factor of 2-10x. It also provides namespaces, binary I/O, and several
  other new features.

  Tk 8.0 is the first release to provide native look and feel on
  Macintoshes and PCs. Tk 8.0 also supports application embedding and
  has a new portable font mechanism. Both Tcl 8.0 and Tk 8.0 provide
  additional features in the Safe-Tcl security model.

  4.6.  Where to report problems, bugs, or enhancements


  Use comp.lang.tcl < news.comp.lang.tcl> for public communicati ons.

  The alternative would be to send problems, suggestions, new ideas,
  etc.  directly to the author. Email to John Ousterhout
  <mailto:Ouster@scriptics.com> will reach the author of Tcl and Tk.

  When reporting problems or bugs, be sure to mention all the details
  needed for a correct diagnosis. Basically you will have to describe
  what hardware, operating system and version of Tcl/Tk you are using,
  if you have made any modification or add on and provide, if possible,
  either a small piece of code, or a URL to some code which demonstrates
  the problem.

  If you have software from which you think the community might benefit
  (either a program, function, extension, or simple example), or you
  have a document, magazine or journal article, thesis, project, or even
  commercial advertisement , be sure to let the appropriate guys know.

  There are FAQ maintainers for each of these areas as well as a
  comp.lang.tcl.announce <news:news.comp.lang.tcl.announce> newsgroup
  you can use.

  It is always worthwhile to submit your contributions directly to the
  ftp site so more folk in the future can benefitthanks to your
  experience.

  To make announcements to the comp.lang.tcl.announce
  <news:news.comp.lang.tcl.announce> newsgroup, send email with the
  details to tcl-announce <mailto:tcl-announce@mitchell.org>. Also, feel
  free to just point folk at your own ftp site or WWW site if you have
  one which can be used .

  5.  Just a little bit of Programming


  Since Tcl is an interpreted language, to run a Tcl program (also
  called a script), you normally pass the script file to the Tcl
  interpreter, wish, for example:

  ______________________________________________________________________
  wish hello.tcl
  ______________________________________________________________________



  You can also use wish in interactive mode and type in commands at the
  command line.

  There's another standard Tcl interpreter, tclsh, which only
  understands the Tcl language. Tclsh does not have any of the Tk user
  interface commands, so you cannot create graphical programs in tclsh.

  Some Tcl freeware applications extend the Tcl language by adding new
  commands written as C functions. If such is the case, you need to
  compile the applicati on instead of just passing its Tcl code to the
  wish interpreter. This application program, from a Tcl perspective, is
  really a new version of the wish interpret er, which the new C
  commands linked in. Of course, the application program may be a lot
  more than merely a Tcl interpreter. (Note: you can also use Tcl's
  auto-loading capability on systems that support it.)

  5.1.  The one-minute program in Tcl


  Tcl has a simple structure. Each line starts out with a command, such
  as button and a number of arguments. Each command is implemented as if
  it was a C function. This function is responsible for handling all the
  arguments.


  As a very standard example, the following is the Hello World program
  in Tcl/Tk:

  ______________________________________________________________________
  # This is a comment
  button .b -text "Hello World" -command exit
  pack .b
  ______________________________________________________________________



  In this case you have to type the commands interactively to tclsh or
  wish.

  You can also place command into script files and invoke these just
  like shell scripts. To do this for the previous example, rewrite the
  Hello World program as follows:

  ______________________________________________________________________
  #! /usr/local/bin wish -f
  button .b -text "Hello World" -command exit
  pack .b
  ______________________________________________________________________



  Put the text inside a file called Hello and make sure that wish is
  installed in /usr/local/bin (otherwise you will have to change
  opportunely the path).

  Make the file Hello executable issuing the command

  ______________________________________________________________________
  chmod 775 Hello
  ______________________________________________________________________



  and run it inside X.

  You will see a button labelled Hello World inside a window: clicking
  it will close (exit) the window.

  6.  Scripting Language: pros and cons


  To understand the importance and the future of Tcl/Tk I strongly
  suggest to point your web browser at the URL www.scriptics
  .com/people/john.ousterhout/
  <http://www.scriptics.com/people/john.ousterhout/> by John K.
  Ousterhout  <mailto:ouster@scriptics.com>. You will read about the
  importance and the comparison between scripting (in langua ges such as
  Tcl) and system programming (in languages such as C and Java).

  To read a document about comparisons see ``the comparison
  discussion''.

  Here's a summary of the most important pros and cons about Tcl/Tk.

  6.1.  Some of the most common complaints about Tcl


  6.1.1.  Tcl is interpreted


  The data is primarily treated as strings, programs written in Tcl are
  slow.  Tcl 8.x attempts to address this by doing some degree of
  compilation as well as permitting additional variable types.

  6.1.2.  Several characteristics are not intuitive


  Comments are commands rather than traditional comments, numbers
  beginning with 0 are octal, proper use of quoting mechanisms, etc.
  These aspects are covered in the various FAQs.

  6.2.  Some of the most pros about Tcl


  6.2.1.  It is a high-level scripting language


  You need to write a lot less code to get your job done, especially
  when compared to Motif or Win32 applications. In general, the number
  of Line Of Code (LOC) of a software project is one of the most
  important complexity index es.


  6.2.2.  Tcl is free


  You can get the sources for free over the Internet from Scriptics
  Download Page or from the FTP site for Tcl.  The software c ore site
  <http://www.scriptics.com/software/download.html> includes the source
  code version, as well as binary versions for Windows and Macintosh
  platforms; or, you can get Tcl on a number of CD-ROMs for a nominal
  cost.

  Read about Tcl and Tk core free at www.scriptics.com/about/n
  ews/qa.html <www.scriptics.com/about/news/qa.html> .

  6.2.3.  It runs on many platforms


  Versions exist for UNIX (Linux... of course), Windows and Macintosh.
  Except for a few platform differences, your Tcl scripts will run the
  same way on all systems.

  6.2.4.  It is interpreted


  You can execute your code directly, without compiling and linking
  (though Tcl compilers are available).

  6.2.5.  It is extensible


  It's easy to add your own commands to extend the Tcl language. You can
  write your commands in C or Tcl.

  6.2.6.  It is embeddable in your applications


  The Tcl interpreter is merely a set of C functions that you can call
  from your code. This means you can use Tcl as an application language,
  much like a macro language for a spreadsheet application.

  6.2.7.  Tcl/Tk is Year 2000 (Y2K) compliant


  Read what the creator of the Tcl and Tk core tells about this topic
  www.scriptics.com/Y2K.html <http://www.scriptics.com/Y2K.html> .


  7.  Most Famous Programs using Tcl/Tk


  Apart from the two implementation described in the ``Introduction'',
  there are many applications writte n in Tcl/Tk or a combination of Tcl
  and C. A complete list where to look for these implementation is the
  part 4 <http://www.tclfaq.wservice.com/tcl-faq/part4.html> of the
  frequently-asked questions on Tcl/Tk (FAQs). I suggest you to visit

  Scriptics' Softwar e Central
  <http://www.scriptics.com/resource/software/>.

  Another good starting point is www.NeoSoft.com/tcl/
  <http://www.NeoSoft.com/tcl/>.

  One of the best Tcl applications running under Linux is called TkDesk
  <http://people.mainz.netsurf.de/~bolik/tkdesk/> a window manager and
  application launcher that works very well.

  If you're a Tcl/Tk Linux developer, feel free to send me
  <mailto:lukaros@tin.it> a URL (and a description of the work) that I
  can link to in here.

  8.  References


  For many reasons people often like having a hard-copy manual as a
  reference or like to be helped by other folks online.

  Here you can find a selection of reference books, tutorials, www-sites
  and newsgroup.

  8.1.  Books


  Many books concerning Tcl/Tk were written and are to be published. I
  won't even try to list them all (another howto woudn't be enough for
  that : ) ). You can find much more information plus additional notes
  at:

  o  www.tcltk.com/consortium/resources/books.html

  o  www.amazon.com/exec/obidos/subst/categories/computer-
     programming/tcl-tk-article/002-8989352-4516417


  o  Page: tcl_books.html at URL starbase-neosoft-tcl-books

  Here I will try to summarize with some notes the book I know
  concerning the subject, they're all at a basic-medium level. Again,
  people who know the subject, have enough information about where to
  find advanced level books.


  8.1.1.  Tcl and the Tk Toolkit


  Author: John K. Ousterhout  <mailto:ouster@scriptics.com>

  WWW book information:
  cseng.aw.com/bookdetail.qry?ISBN=0%2D201%2D63337%2DX&ptype=0

  Book's examples: ftp.script ics.com/pub/tcl/doc/book.examples.Z
  <ftp://ftp.scriptics.com/pub/tcl/doc/book.examples.Z>

  Book suppliment: www.scriptics.com/doc/tk 4.0.ps
  <http://www.scriptics.com/doc/tk4.0.ps>

  The book primarily covers Tcl 7.3 and Tk 3.6.

  8.1.2.  Practical Programming in Tcl and Tk, II ed.


  Author: Brent Welch <mailto:welch@acm.org>

  WWW book information: www.beedub.com/book/
  <http://www.beedub.com/book/>

  Book's table of contents: www.beedub.com/book/
  <http://www.beedub.com/book/>

  Book promotion info at section_50000.html of the URL
  www.borders.com/sections/ <http://www.borders.com/sections/>

  This updated edition describes Tcl / Tk 8.0 as it was during the beta
  period.  Along with the material from the first edition, it also
  covers sockets, packag es, namespaces, a great section describing the
  changes in Tcl 7.4, 7.5, 7.6, and 8.0 (and Tk as well), Safe Tk and
  the Plugin!

  8.1.3.  Tcl and Tk Reference Manual


  Editors: Donald Barnes, Marc Ewing <mailto:marc@redhat.com>, Erik
  Troan

  WWW book information: www.lsl.com/catalog/bo oks/tcltk/
  <http://www.lsl.com/catalog/books/tcltk/>

  8.1.4.  The Visual TCL Handbook, 1/e


  Author: David Young <mailto:david@inforef.com>

  WWW book information:
  www.amazon.com/exec/obidos/ISBN=013461674X/u/7141-5908756-107481
  <http://www.amazon.com/exec/obidos/ISBN=013461674X/u/7141-5908756-1074
  81>

  A comprehensive guide to Visual TCL. This book leads reader from basic
  graphical user interface development concepts to meaningful
  application develo pment.  The book focuses on the TCLX and VT
  extensions, addressing many fundamental TCL topics. VT is a Motif
  based graphical interface, incompatible with Tk.  The entire TCL
  language is documented in a separate Commands section. Comes with a
  CD-ROM that includes SGI, Solaris, HP-UX, AIX and Unixware versions of
  Visual Tcl.

  8.1.5.  Running LINUX


  Author: Matt Welsh and Lar Kaufman

  WWW book information: www.ora.com/ca talog/runux2/noframes.html
  <http://www.ora.com/catalog/runux2/noframes.html>

  Running Linux is a really well written basic book. It has a chapter on
  programming using Tcl/Tk. (and Perl, C, C++).

  8.1.6.  Tcl/Tk for Dummies (For Dummies)


  Author: Timothy Webster, with Alex Francis

  WWW book information: www.dummies.com/ <http://www.dummies.com/>

  Another one of the series of the paperback programming books. This one
  focuses on the Tcl plugin as a programming environment.

  8.1.7.  Interactive Web Applications With Tcl/Tk


  Authors: Michael Doyle Hattie Schroeder

  WWW book information: www.eolas.com/tcl/ < http://www.eolas.com/tcl/>

  This is a learning by example book, for people who know a bit of
  programming, but are not experts. It covers developing applets as well
  as stand-alone appli cations and simple server applications. The book
  comes with the Spynergy toolkit, whic h adds a variety of pure Tcl/Tk
  procedures for distributed processing, URL retri eval, HTML rendering,
  database management and platform independent file managment, Ed, a Tcl
  editor and testing environment, an image conversion tool, a demo of Tk
  features, a client/server version of a rolodex application, a pure Tcl
  web server, a client/server push application, a tcl web browser,

  8.2.  Manual and On-line Tutorials


  o  John Ousterhout has written an engineering style guide that
     describes the coding, documentation, and testing conventions that
     will be used at Sun in the coding of the C code in the Tcl core and
     has made it available to other Tcl and Tk developers. It is located
     at ftp.script ics.com/pub/tcl/doc/engManual.tar.Z
     <ftp://ftp.scriptics.com/pub/tcl/doc/engManual.tar.Z>

  o  A second style guide, covering the writing of Tcl scripts, can be
     found at ftp.scr iptics.com/pub/tcl/docs/styleGuide.tar.gz
     <ftp://ftp.scriptics.com/pub/tcl/docs/styleGuide.tar.gz>.  Other
     versions of it can be found at sunscript.su
     n.com/techcorner/styleGuide.ps
     <http://sunscript.sun.com/techcorner/styleGuide.ps>.

  o  A  brief introduction to TCL/TK
     <http://http2.brunel.ac.uk:8080/~csstddm/TCL2/TCL2.html>by David
     Martland  < mailto:csstddm@brunel.ac.uk>


  o  Another tutorial untitled User interfaces with Tcl/T k
     <http://www.scism.sbu.ac.uk/tkteach/>was written by Fintan Culwin
     <mailto:fintan@sbu.ac.uk>.

  o  Although you should have your Tcl/Tk manual pages on your system,
     here's another place where to look for TCL Manual Pa ges (from
     TCL7.4)-Tk Manual Pages (from TK4.0)
     <http://cuiwww.unige.ch/eao/www/TclTkMan/Man.html>.

  o  The Tcl/Tk Cookbook <http://www.cis.rl.ac.uk/proj/TclTk/> offe rs a
     lot of getting-started information.

  8.3.  World Wide Web sites


  There are a great number of WWW resources which provide additional
  information about many aspects of Tcl and its extensions.

  o  Refer to Tcl-FAQs (pa rt2) <http://www.tclfaq.wservice.com/tcl-
     faq/part2.html> for a great number of pointers to Tcl/Tk
     documentation and web sites.

  o  Point your web browser at Tcl/Tk Information <http://www.tcltk.com>
     : a site with many links to TclTk resources on the web
     (Information, Extensions, Tools, Training and Events).

  o  Have a look at Tcl-Consortium <http://www.tclconsortium.org/> : a
     non-profit organization which promotes Tcl/Tk and supports the
     development community.

  o  Point your Web browser at The Official Contributed Sources A rchive
     <http://www.NeoSoft.com/tcl/> for the Tool Command Language (Tcl)
     and the Tk Toolkit, hosted by NeoSoft, Inc.

  o  For a discussion dealing with the pros and cons of the major
     scripting languages : article in SunWorld
     <http://www.sun.com/sunworldonline/swol-10-1997/swol-10-scripting.html
     > by Cameron Laird  < mailto:claird@Starbase.NeoSoft.com>

  o  A web page that contains a variety of comparisons between Tcl/Tk
     and othe r similar systems. Most of them are taken from
     "comp.lang.tcl", the author would be happy to add any other
     important article that you folks want to send to him.: Comparison
     <http://icemcfd.com/tcl/comparison.html> by Wayne Christopher
     <mailto:wayne@icemcfd.com>.

  o  E.J. Friedman-Hill's Tcl/Tk Course
     <http://herzberg.ca.sandia.gov/TclCourse/>: this document is
     available only in PowerPoint source form and in low-quality HTML
     form (in HTML format all the figures and some of the text is
     missing).

  8.4.  Other documents & Frequently Asked Questions


  A lot of material is available on the Internet: introductory papers,
  white papers, tutorials, slides, postscript versions of published
  books in draft and many more.

  For a complete reference please give a look at the excellent Tcl-FAQs
  <http://www.tclfaq.wservice.com/tcl-faq/> .

  8.5.  Newsgroup



  comp.lang.tcl <news:comp.lang.tcl> is an unmoderated Usenet newsgroup,
  created for the discussion of the Tcl programming language and tool s
  that use some form of Tcl, such as the Tk toolkit for the X window
  system, Extended Tcl, and expect.

  For Tcl/Tk related announcements always refer to
  comp.lang.tcl.announce <news:comp.lang.tcl.announce> : you will find
  release announcement, patches, new application and so on.

  Again, faq could be retrieved at Tcl-FAQs
  <http://www.tclfaq.wservice.com/tcl-faq/>.

  9.  Tcl/Tk License Terms


  The following terms apply to the all versions of the core Tcl/Tk
  releases, the Tcl/Tk browser plug-in version 2.0, and TclBlend and
  Jacl version 1.0.  Please note that the TclPro tools are under a
  different license agreement.  This agreement is part of the standard
  Tcl/Tk distribution as the file named "license.terms".

  TCL/TK LICENSE TERMS

  This software is copyrighted by the Regents of the University of
  California, Sun Microsystems, Inc., Scriptics Corporation, and other
  parties. The followin g terms apply to all files associated with the
  software unless explicitly discla imed in individual files.

  The authors hereby grant permission to use, copy, modify, distribute,
  and license this software and its documentation for any purpose,
  provided that existing copyright notices are retained in all copies
  and that this notice is included verbatim in any distributions. No
  written agreement, license, or royalty fee is required for any of the
  authorized uses. Modifications to this software may be copyrighted by
  their authors and need not follow the licensing terms described here,
  provided that the new terms are clearly indicated on the first page of
  each file where they apply.

  IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
  FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
  DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.

  THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-
  INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE
  AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE,
  SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

  GOVERNMENT USE: If you are acquiring this software on behalf of the
  U.S.  government, the Government shall have only "Restricted Rights"
  in the software and related documentation as defined in the Federal
  Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are
  acquiring the software on behal f of the Department of Defense, the
  software shall be classified as "Commercial Computer Software" and the
  Government shall have only "Restricted Rights" as defined in Clause
  252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing , the
  authors grant the U.S. Government and others acting in its behalf
  permissi on to use and distribute the software in accordance with the
  terms specified in this license.



  The teTeX HOWTO: The Linux-teTeX Local Guide
  Robert Kiesling
  v3.7, 9 November 1998

  This document covers the basic installation and usage of the teTeX TeX
  and LaTeX implementation under the major U.S. Linux distributions, and
  auxiliary packages like Ghostscript.  Contents of the teTeX HOWTO: The
  Linux-teTeX Local Guide are Copyright (C) 1997, 1998 by Robert A.
  Kiesling.  The exact terms of copying are given in the introduction
  and the appendices.  Registered trademarks are the property of their
  respective owners.  Please send all complaints, suggestions, errata,
  and any miscellany to kiesling@ix.netcom.com, so I can keep this docu-
  ment as complete and up to date as possible.
  ______________________________________________________________________

  Table of Contents



  1. Introduction.

     1.1 Copyright.
     1.2 Software described in this document.
        1.2.1 teTeX.
        1.2.2 Text editors.
        1.2.3 (TT
        1.2.4 Fonts.

  2. Using teTeX.

     2.1 Printing the documentation.

  3. TeX commands.

     3.1 Command overview.
     3.2 Font commands.
     3.3 Paragraph styles and dimensions.
        3.3.1 Tolerances.  (What are those black rectangles after every line?)
     3.4 Page layout.
     3.5 Page numbers, headers, and footers.
     3.6 Titles and macros.

  4. LaTeX commands.

     4.1 Document structure.
     4.2 Characters and type styles.
     4.3 Margins and line spacing.
     4.4 Document classes.
        4.4.1 Articles and reports.
        4.4.2 Letters.

  5. LaTeX extension packages and other resources.

  6. Mixing text and graphics with

     6.1 What if my printer isn't supported?

  7. Using Postscript fonts.

  8. Appendix A: CTAN site list.

  9. Appendix B: Installing the CTAN teTeX distribution.

     9.1 Installing the binary distribution.
        9.1.1 Minimal installation.
        9.1.2 Complete installation.
     9.2 Base system configuration.
     9.3 Installing the CTAN source distribution.
     9.4 Post-installation configuration details.

  10. Appendix C: Distribution and Copyright.

     10.1 Distribution.
     10.2 GNU GENERAL PUBLIC LICENSE
     10.3 How to Apply These Terms to Your New Programs


  ______________________________________________________________________

  1.  Introduction.



  1.1.  Copyright.

  The teTeX-HOWTO is copyright (C) 1997, 1998 by Robert Kiesling.
  Permission is granted to make and distribute verbatim copies of this
  manual provided that the copyright notice and this permission notice
  are preserved on all copies.

  Permission is granted to copy and distribute modified versions of this
  manual under the conditions for verbatim copying, provided also that
  the sections entitled, ``Distribution,'' and, ``GNU General Public
  License,'' are included exactly as in the original, and provided that
  the entire resulting derived work is distributed under the terms of a
  permission notice identical to this one.

  Permission is granted to copy and distribute translations of this
  manual into another language, under the above conditions for modified
  versions.  except that the sections entitled, ``Distribution,'' and,
  ``GNU General Public License,'' may be included in a translation
  approved by the Free Software Foundation instead of in the original
  English.  Please refer to Section ``Distribution and Copyright'' for
  terms of copying.


  1.2.  Software described in this document.

  TeX handles only the formatting part of the document preparation.
  Generating output from TeX is like compiling source code into object
  code, which still needs to be linked.  You prepare an input file with
  a text editor----what most people think of as ``word processing''---
  and format the input file document with TeX to produce a device-
  independent output file, called a .dvi file.

  You also need a program or two to translate TeX's .dvi output for your
  screen and printer.  These programs are collectively known as
  ``dviware.''  For example, TeX itself only makes requests for fonts.
  It is up to the .dvi output translator to provide the actual font for
  the output regardless of whether the medium is a video screen or
  paper.  This extra step may seem overly complicated, but the
  abstraction allows documents to display the same on different devices
  with little or no change to the original document.



  1.2.1.  teTeX.

  TeX is implemented for practically every serious computer system in
  the world---and quite a few ``non-serious'' ones---so implementors
  must provide the installation facilities for all of them.  This
  accounts in part for teTeX's complexity, in addition to the inherent
  complexity of any TeX installation.  It also accounts for the fact
  that installing the system yourself is a significant task, and unless
  you are already familiar with TeX, it is easy to get lost in the
  numerous executable programs, TeX files, documentation, and fonts.

  Fortunately, teTeX is part of the GNU/Linux distribution. You can
  install the package much more easily using GNU/Linux installation
  tools. You may already have teTeX installed on your system.  If so,
  you can skip ahead to Section ``Using teTeX''.

  However, if you want to install the package, the archives necessary
  for a workable teTeX installation are on the CTAN archive network.
  There is a list of these sites in Section ``CTAN site list''.

  CTAN is the Comprehensive TeX Archive Network, a series of anonymous
  FTP sites that archive TeX programs, macros, fonts, and documentation.
  In the course of using TeX you'll probably become familiar with at
  least one CTAN site.  In this document, a pathname like
  ~CTAN/contrib/pstricks means ``look in the directory contrib/pstricks
  of your nearest CTAN site.''

  The installation of the generic teTeX distribution described in
  Section ``Installing the CTAN teTeX distribution'' concentrates on the
  Intel versions of Linux.  Installing teTeX on other hardware should
  require only substituting the appropriate executable program archive
  in the installation process.

  In addition to the executable programs, the distribution includes all
  of the TeX and LaTeX package, metafont and its sources, bibtex,
  makeindex, and all of the documentation... more than 4 megabytes'
  worth.  The documentation covers everything you will forseeably need
  to know to get started.  So, you should install all of the documents.
  Not only will you eventually read them, the documents themselves
  provide many examples of ``live'' TeX and LaTeX code.

  TeX was written by Professor Donald Knuth of Stanford University.  It
  is a lower-level typesetting language for all of the higher-level
  packages like LaTeX.  Essentially, LaTeX is a set of TeX macros that
  provide convenient, predefined document formats for end users.  If you
  like the formats provided by LaTeX, you may never need to learn bare-
  bones TeX programming.  The difference between the two languages is
  like the difference between assembly language and C.  You can have the
  speed and flexibility of TeX, or the convenience of LaTeX.

  By the way, the letters of the word ``TeX'' are Greek, tau-epsilon-
  chi.  It is not a fraternity, but the root of the Greek word, techne,
  which means art and/or science.  ``TeX'' is not pronounced like the
  first syllable in ``Texas.''  The chi has no English equivalent, but
  TeX is generally pronounced so that it rhymes with ``yecch,'' to use
  Professor Knuth's example from The TeXBook, which is one of the
  standard TeX references.  When writing, ``TeX,'' on character devices,
  always use the standard capitalization, or the \TeX{} macro in
  typesetting.


  1.2.2.  Text editors.

  Any of the editors that work under Linux---jed, joe, jove, vi, vim,
  stevie, Emacs, and microemacs---will work to prepare a TeX input file,
  as long as the editor reads and writes plain-vanilla ASCII text.  My
  preference is GNU Emacs.  There are several reasons for this:

  o  You can format, preview and print documents with Emacs's TeX and
     LaTeX modes.

  o  Emacs can automatically insert TeX-style, ``curly quotes,'' as you
     type, rather than the "ASCII-vanilla" kind.

  o  Emacs has integrated support for Texinfo, a hypertext documentation
     system.

  o  Emacs is widely supported.  Versions 19.34 and later, for example,
     are included in the major U.S. Linux distributions.  The most
     recent version from the GNU archives is 20.3.

  o  Emacs does everything except butter the toast in the morning.

  o  Emacs is free.



  1.2.3.  dvips .

  Tomas Rokicki's dvips generates Postscript from a .dvi file.  In
  addition, it runs Metafont if necessary to generate the bit mapped
  fonts it needs or uses Postscript fonts for the output.  It can also
  crop and resize pages and perform graphics translations from
  instructions in a TeX or LaTeX file,

  The dvips program is part of the teTeX distribution.  It is discussed
  fully in Section ``Mixing text and graphics with <tt>dvips</tt>''


  1.2.4.  Fonts.

  Much of TeX's, and therefore LaTeX's, complexity, arises from its
  implementation of various font systems, and the way these fonts are
  specified.  A major improvement of LaTeX 2e over its predecessor was
  the way users specify fonts, the former New Font Selection Scheme.
  They're discussed in Section ``Characters and type styles'', Section
  ``TeX Font Commands'', and Section ``Using Postscript fonts''.)

  teTeX comes distributed with about a dozen standard fonts preloaded,
  which is enough to get you started.  Also provided are the font
  metrics descriptions, in .tfm (TeX font metric) files.  To generate
  the other fonts that you need, it is simply a matter of installing the
  metafont sources.  teTeX's .dvi utilities will invoke metafont
  automatically and generate the Computer Modern fonts you need.


  2.  Using teTeX.

  Theoretically, at least, everything is installed correctly and is
  ready to run.  teTeX is a very large software package.  As with any
  complex software package, you'll want to start by learning teTeX
  slowly, instead of being overwhelmed by its complexity.

  At the same time, we want the software to do something useful.  So
  instead of watching TeX typeset

  ``Hello, World!''


  as Professor Knuth suggests, we'll produce a couple of teTeX's own
  documents in order to test it.


  2.1.  Printing the documentation.

  You should be logged in as root the first few times you run teTeX.  If
  you aren't, Metafont may not be able to create the necessary
  directories for its fonts.  The texconfig program includes an option
  to make the font directories world-writable, but if you're working on
  a multi-user system, security considerations may make this option
  impractical or undesirable.

  In either instance, if you don't have the appropriate permissions to
  write to the directories where the fonts are stored, Metafont will
  complain loudly because it can't make the directories.  You won't see
  any output because you have a bunch of zero-length font characters.
  This is no problem.  Simply log out, re-login as root, and repeat the
  offending operation.

  The nice thing about teTeX is that, if you blow it, no real harm is
  done.  It's not like a compiler, where, say, you will trash the root
  partition if a pointer goes astray.  What, you haven't read the teTeX
  manual yet?  Of course you haven't.  It's still in the distribution,
  in source code form, waiting to be output.

  So, without further delay, you will want to read the teTeX manual.
  It's located in the directory

  /usr/lib/teTeX/texmf/doc/tetex.



  The LaTeX source for the manual is called TETEXDOC.tex.  (The .tex
  extension is used for both TeX and LaTeX files.  Some editors, like
  Emacs, can tell the difference.)  There is also a file TETEXDOC.dvi
  included with the distribution, which you might want to keep in a safe
  place---say, another directory ---in case you want to test your .dvi
  drivers later.  With that out of the way, type

  latex TETEXDOC.tex


  LaTeX will print several warnings.  The first,

  LaTeX Warning: Label(s) may have changed. Rerun to get the
  cross-references right.


  is standard.  It's common to build a document's Table of Contents by
  LaTeXing the document twice.  So, repeat the command.  The other warn-
  ings can be safely ignored.  They simply are informing you that some
  of the FTP paths mentioned in the documentation are too wide for their
  alloted spaces.  Sections ``Paragraph styles and dimensions'' and
  ``Tolerances'' describe horizontal spacing in more detail.

  teTeX will have generated several files from TETEXDOC.tex.  The one
  that we're interested in is TETEXDOC.dvi. This is the device-
  independent output which you can send either to the screen or the
  printer.  If you're running teTeX under the X Windows System, you can
  preview the document with xdvi.

  For the present, let's assume that you have a HP LaserJet II.  You
  would give the command

  dvilj2 TETEXDOC.dvi


  which writes a PCL output file from TETEXDOC.dvi, including soft fonts
  which will be downloaded to the LaserJet.  This is not a feature of
  TeX or LaTeX, but a feature provided by dvilj2.  Other .dvi drivers
  provide features that are relevant to the devices they support.
  dvilj2 tries to fill the font requests which were made in the original
  LaTeX document with the the closest equivalents available on the sys-
  tem.  In the case of a plain text document like TETEXDOC.tex, there
  isn't much difficulty.  All of the fonts requested by TETEXDOC.tex
  will be generated by metafont, which is automatically invoked by
  dvilj2, if the fonts aren't already present.  (If you're running
  dvilj2 for the first time, the program may need to generate all of the
  fonts.)  There are several options that control font generation via
  dvilj2.  They're outlined in the manual page.  At this point, you
  shouldn't need to operate metafont directly.  If you do, then some-
  thing has gone awry with your installation.  All of the .dvi drivers
  will invoke metafont directly via the kpathsea path-searching
  library---the discussion of which is beyond the scope of this docu-
  ment---and you don't need to do any more work with metafont for the
  present---all of the metafont sources for the Computer Modern font
  library are provided.


  You can print TETEXDOC.lj with the command

  lpr TETEXDOC.lj


  You may also need to install a printer filter that understands PCL.

  The nine-page teTeX Guide provides some useful information for further
  configuring your system, some of which I have mentioned, much that
  this document doesn't cover.

  Some of the information in the next section I haven't been able to
  test, because I have a non-Postscript HP Deskjet 400 color ink jet
  printer connected to the computer's parallel port.  However, not
  owning a Postscript printer is no barrier to printing text and
  graphics from your text documents.  Ghostscript is available in most
  Linux distributions and it could already be installed on your system.


  3.  TeX commands.

  Preparing documents for TeX typesetting is easy.  Make sure there's a
  blank line between the paragraphs of a plain text file, and run file
  through the TeX program with the command

  tex your_text_file


  The result will be a file of the same base name and the extension
  .dvi.  TeX formats the text in 10-point, Computer Modern Roman, sin-
  gle-spaced, with justified left and right margins.  If you receive
  error messages from special characters like dollar signs, escape them
  with a backslash character, \, and run TeX on the file again.  You
  should be able to process the resulting file with the .dvi file trans-
  lator of your choice (see above) to get printed output.

  One peculiarity of TeX input is that you must use opening and closing
  quotes, which are denoted in the input file with the grave accent and
  single quote characters.  Emacs' TeX mode does this for you
  automatically.

  "These are ASCII-type quotes."
  ``These are `TeX-style' quotes.''



  3.1.  Command overview.

  Commands in TeX start with a backslash (``\'').  For example, the
  command to change the spacing between lines is

  \baselineskip=24pt



  The baseline is the bottom of the characters on a line, not counting
  descenders.  The distance between the baseline of one line and the
  next is the \baselineskip, and is assigned a value of 24 points.

  Measurements or dimensions in TeX are often given in the following
  units:



  pt                % Point        1/72 in.
  pc                % Pica:        12 pt.
  in                % Inch:        72.27 pt.
  cm                % Centimeter:  2.54 cm = 1 in.
  mm                % Millimeter:  10 mm = 1 cm.



  Some commands do not take assignments.  For example:

  \smallskip        % Approximately 3 pt.
  \medskip          % Two \smallskips.
  \bigskip         % Two \medskips.



  A \smallskip inserts a 3 pt. vertical space in the document.  The
  measurements are approximate because TeX needs to adjust the
  dimensions for page breaks, section headings, and other units of
  vertical space.  This is true for horizontal spacing as well.

  \hsize=6.5in


  This command sets the line length to a width of 6.5 inches.  TeX tries
  to fill the line by adjusting the spacing between words, and some let-
  ters.  If TeX cannot fill a line to within its tolerances, it produces
  a warning message, and adjusts the horizontal spacing within the line
  as best it can.  Formatting tolerances are discussed in Section ``Tol-
  erances''.

  There are many other commands that specify horizontal and vertical
  dimensions and tolerances, and the most commonly use commands are
  described below.


  3.2.  Font commands.

  In TeX, the default font is 10 pt. Computer Modern Roman.  To specify
  a typeface, like italic, bold, or monospaced, use the following
  commands.

  \rm          % Roman (the default).
  \it          % Italics.
  \bf         % Bold.
  \tt         % Monospaced (teletype).
  \sl          % Oblique (slanted).


  The commands change the typeface where they appear in the text, as in
  this example.

  This text is Roman, \it and this text is italic.  \bf This text is
  bold, and \rm this text is in Roman again.



  To specify a font for your document, use the\font command.

  \font\romantwelve=cmr12


  This creates the font command \romantwelve, which, when used in the
  text, changes the font to Computer Modern Roman, 12 point.


  \romantwelve
  This is the Computer Modern Roman font at 12 points.


  For information about the fonts in the teTeX distribution look at the
  file:

  /usr/lib/teTeX/texmf/doc/fonts/fontname/fontname.dvi



  If you want to print a sample of a font, TeX the file

  /usr/lib/teTeX/texmf/tex/plain/base/fontchart.tex


  and fill in the name of the font you want to print at the prompt.

  You can also change the size of a font to get different effects.  Font
  magnification is exponential, and specified with the scaled \magstep
  command, which is placed after the font specification.

  \font\sfmedium=cmss12 scaled \magstep 1


  This command will give you a sans serif font that is 120 percent the
  size of the 12-point Computer Modern sans serif font.  Fonts can be
  magnified in steps from 0 to 5.  Each step provides and additional 120
  percent magnification.


  3.3.  Paragraph styles and dimensions.

  As mentioned above, TeX typesets text in 10-point Computer Modern
  Roman by default.  The length of a line is the value of \hsize, which
  defaults to 6.5 in.  If you want to change the value of \hsize to 5.5
  in. for example, use this command.

  \hsize=5.5in



  In TeX a dimension is an adjustable unit of length, either horizontal
  or vertical.  The amount by which a dimension can be increased or
  decreased can be specified in its definition.  Closely related to a
  dimension is a skip, which is a dimension that is placed in one of
  TeX's internal registers.  Skips are defined with the \newskip
  command.  The \smallskip dimension, as defined by TeX is:

  \newskip\smallskipamount \smallskipamount=3pt plus 1pt minus 1pt


  The \smallskip command is shorthand for:

  \vskip\smallskipamount



  There are a number of dimensions that control the page layout.  They
  are summarized in Section ``Page layout''.

  TeX formats paragraphs with justified left and right margins.  If you
  want the text to be left justified only, use this command:

  \raggedright

  To typeset a line that is justified to the right margin, use the
  \rightline command:

  \rightline{This is the line to be typeset.}



  The \line command typesets the text of its argument to fill the entire
  line.

  \line{This text will be spaced to fit the entire line.}



  The \hfil command adds space to fill out the line where it occurs.
  So, for example, the \rightline command is equivalent to:

  \line{\hfilThis line will be right justified.}



  To typeset a line that is centered, use the \centerline command.

  \centerline{This is the line to be centered.}



  To change the left margin, set the value of \hoffset, as in this
  example:

  \hoffset=1.5in



  The \parindent command specifies the amount that the first line of
  every paragraph is indented.

  \parindent=.5in



  Two other dimensions, \leftskip and \rightskip, will indent the right
  and left margins, respectively, of the paragraphs that come after
  them.

  \leftskip=.5in
  \rightskip=.5in


  The control word \narrower is equivalent to:

  \leftskip=\parindent
  \rightskip=\parindent


  That is, \narrower narrows the paragraph margins by the value of
  \parindent

  As mentioned in the previous section, the \baselineskip specifies the
  distance between lines.  The default is 12 pt.  To approximate double-
  spaced text, use the following command.

  \baselineskip=\baselineskip*1.6



  The \parskip command specifies the distance in addition to
  \baselineskip between paragraphs.  By default, no extra space is
  added, but the distance between paragraphs can stretch as much as 1
  pt. to fill the page correctly.  To put a blank line between
  paragraphs, use this command:

  \parskip=\baselineskip



  3.3.1.  Tolerances.  (What are those black rectangles after every
  line?)

  TeX normally formats text to strict tolerances.  If, for some reason,
  text cannot be formatted to within those tolerances, TeX produces a
  warning message and formats the text the best it can.  If the text
  must be stretched too much to fit the line, TeX warns you that the
  \hbox is underfull.  Text that must be squeezed to fit in the line
  produces an overfull \hbox warning.

  For each overfull \hbox, TeX places a slug, a black rectangle, after
  the line.  The slug indicates that the line could not be formatted to
  within the specifications set by the \hbadness parameter.

  The fit of the text within its specified dimensions is measured by its
  badness, which is a number between 0 and 10000.  A badness of 0 is a
  perfect fit, and a badness of 10000 means that the line probably will
  never fit.  The default value of \hbadness is 1000.  If you set
  \hbadness to 10000, TeX does not report underfull lines.

  Sometimes TeX allows a line to extend past the right margin.  This is
  an aesthetic decision on the part of TeX's author.  The amount is
  determined by the \hfuzz parameter, which defaults to 0.1 pt.  If the
  text does not fit within the line, the \tolerance parameter determines
  how TeX will handle the overfull \hbox.  The default value of
  \tolerance is 200.  Setting \tolerance to 1000 suppresses overfull
  \hbox warnings and the printing of slugs.


  3.4.  Page layout.

  In addition to the left margin and line length dimensions that are
  described in the previous section, TeX also lets you specify top and
  bottom margins, and vertical spacing.

  Like the \hsize and \hoffset dimensions described in the previous
  section, TeX also provides the \vsize and \voffset commands.  The
  default for \vsize is 8.9 in., and \voffset defaults to 0.

  Normally, teTeX places the beginning of the first line of text 1 in.
  below the top of the paper and 1 in. from the left edge.  You can
  start the text closer to the top of the page with the command:

  \voffset=-0.5in



  If you want to add vertical space in a document, the commands
  \smallskip, \medskip, and \bigskip will add approximately 3, 6, and 12
  points of blank vertical space.  These measurements are approximate;
  TeX will adjust them by as much as 1 pt. so the page is filled
  correctly.

  The \vfill command adds an adjustable vertical space between
  paragraphs on a page.  It is infinitely stretchable, so it will add
  vertical space to fill as much of the rest of the page as possible.
  If you want to specify a dimension, use \vskip as in:

  \vskip 10pt



  The commands \hss and \vss are similar to \hfil and \vfill, but they
  provide dimensions that are infinitely shrinkable as well as
  infinitely stretchable.

  The \vskip and \vfill commands produce flexible lengths.  They do not
  add space where no text exists; for example, at the top of a page.
  Use \vglue if you want to add an absolute space.

  TeX fills the \vsize dimension with as much text as possible before it
  starts a new page.  To force a page break, use the \vfill \eject
  sequence.  If \vfill is not used, the text before the \break will be
  spaced to fill the page.

  If you want TeX to be more flexible about its vertical page sizing,
  place the \raggedbottom command in your document.  TeX will then
  adjust the bottom margin of each page slightly to make vertical
  spacing more consistent.


  3.5.  Page numbers, headers, and footers.

  teTeX by default places the page number at the bottom center of the
  page.  If you want to change the location and style of the page
  number, you can specify alternate headers and footers by changing
  definitions of \headline and \footline.  The default value for
  \footline contains the \folio command, which prints the page number.
  The default value for \headline is \hfil, so a blank line is printed.

  The \pageno command is a synonym for TeX's internal page counter.  You
  can change the page number by changing the value of \pageno.  If
  \pageno is negative, the numbers are printed as Roman numerals.

  \pageno=10
  \pageno=-1



  The command \nopagenumbers is shorthand for:

  \headline={\hfil}
  \footline={\hfil}



  The default footline also contains the font command \tenrm, which sets
  the page number's font to 10-point Roman.  If you want to print the
  page number in 12-point Roman, for example, you would first define a
  12-point Roman font, and use that in the definition of \footline.
  Font commands are discussed in Section ``Font commands''.

  \font\twelvrm=cmr12
  \footline={\hss\twelvrm\folio\hss}



  You can put a rule, a horizontal line, at the top of each page by
  redefining \headline as:


  \headline={\hrulefill}



  To specify different headers for even and odd pages use the
  \ifoddcommand, which has the form:

  \ifodd[condition][true-action]\else[false-action


  An example \headline that uses different headers for even and odd
  pages would be:

  \headline={\ifodd\pageno odd-page-header \else even-page-header}


  The \ifodd statement uses the first argument if the page number is
  odd, and the second argument otherwise.


  3.6.  Titles and macros.

  TeX provides only the \beginsection macro for section headings.  It
  leaves a space above its argument, prints the text of the heading in
  bold type, adds a \smallskip after the text of the heading, and starts
  the next paragraph with no indent.

  The LaTeX chapter and section commands described below add section
  numbering, and will print the section names and numbers in the page
  headings, and automatically add the sections to the Table of Contents.

  In plain TeX, you must write these functions yourself.  The \def
  command allows you to define new commands.  Suppose you want to print
  a chapter title.  First you define the font that you want to use.  A
  large, sans serif font for chapter titles would be defined like this:

  \font\chapterfontsans=cmss12 scaled \magstep 4


  You can use the \chapterfontsans command anywhere you want to switch
  to this font, which is approximately 24 points in height.  However, in
  this example, it will be used primarily in the command \chaptertitle-
  sans.  Here is its definition:

  \def\chaptertitlesans#1{\hbox{}\bigskip\bigskip
    \noindent{\leftline{\chapterfontsans#1}}
    \par\bigskip\bigskip\noindent}


  The first line, \hbox{}\bigskip, anchors a 12-point space at the top
  of the page by placing an empty \hbox{} there.  The line with the
  chapter title is not indented, nor is the paragraph which immediately
  follows it.  If you place a blank line between the \sschaptertitle
  macro and the next paragraph, the final \noindent applies to the blank
  line, not the text of the following paragraph.  To format correctly,
  use the \sschaptertitle as in this example:

  The #1 statement in the definition is replaced by the first argument
  to \chaptertitlesans; that is, the title of the chapter.  Parameters
  TeX definitions are declared with #1, #2, #3, and so on.  An example
  usage of \chaptertitlesans would be:



  \chaptertitlesans{Chapter 1}
  This is the starting text of the first paragraph of the chapter.
  The paragraph will not be indented.  The chapter's title is
  "Chapter 1."



  4.  LaTeX commands.


  4.1.  Document structure.

  Documents formatted for LaTeX have a few more rules, but with complex
  documents, LaTeX can greatly simplify the formatting process.

  Essentially, LaTeX is a document markup language which tries to
  separate the output style from the document's logical content.  For
  example, formatting a section heading with TeX would require
  specifying 36 points of white space above the heading, then the
  heading itself set in bold, 24-point type, then copying the heading
  text and page number to the Table of Contents, then leaving 24 points
  of white space after the heading.  By contrast, LaTeX has the
  \section{} command, which does all of the work for you.  If you need
  to change the format of the section headings throughout your document,
  you can change the definition of \section{} instead of the text in the
  document.  You can see where this would save hours of reformatting for
  documents of more than a dozen pages in length.

  All LaTeX documents have three sections: a preamble, the body text,
  and a postamble.  These terms are standard jargon and are widely used
  by TeXperts.

  The preamble, at a minimum, specifies the type of document to be
  produced---the document class---and a statement which signals the
  beginning of the document's body text.  For example:

  \documentclass{article}
  \begin{document}


  The document's postamble is usually very simple.  Except in special-
  ized cases, it contains only the statement:

  \end{document}


  Note the \begin{document} and \end{document} pairing.  In LaTeX, this
  is called an environment.  All text must appear within an environment,
  and many commands are effective only in the environments in which
  they're called.  The document environment is the only instance where
  LaTeX enforces this convention, however.  That is, it's the only envi-
  ronment that is required in a document.  (An exception is letter
  class, which also requires you to declare \begin{letter} and
  \end{letter}.  See the section ``Letters''.)  However, many formatting
  features are specified as environments.  They're described in the fol-
  lowing sections.

  The document classes can be called with arguments.  For example,
  instead of the default, 10-point type used as the base point size, as
  in the previous example, we could have specified

  \documentclass[12pt]{article}



  to produce the document using 12 points as the base point size.  The
  document class, article, makes the necessary adjustments.

  There are a few document classes which are commonly used.  They're
  described below.  The report class is similar to article class, but
  produces a title page and starts each section on a new page.  The
  letter class includes special definitions for addresses, salutations,
  and closings, a few of which are described below.

  You can include canned LaTeX code, commonly known as a package, with
  the \usepackage{} command.

  \usepackage{fancyhdr}


  The command above would include the LaTeX style file fancyhdr.sty from
  one of the TEXINPUTS directories, which you and teTeX specified during
  installation and setup processes.


  \documentclass{article}
  \usepackage{fancyhdr}
  \begin{document}



  Note that the \usepackage{} declarations are given before the
  \begin{document} statement; that is, in the document preamble.

  fancyhdr.sty extends the \pagestyle{} command so that you can create
  custom headers and footers.  Most LaTeX document classes provide
  headers and footers of the following standard page styles:

  \pagestyle{plain}       % default pages style -- page number centered at
                          % the bottom of the page.
  \pagestyle{empty}       % no headers or footers
  \pagestyle{headings}    % print section number and page number at the
                          % top of the page.
  \pagestyle{myheadings}  % print custom information in the page heading.


  Everything on a line to the right of the percent sign is a comment.

  The \pagestyle{} command doesn't take effect until the following page.
  To change the headers and footers on the current page, use the command

  \thispagestyle{the_pagestyle}



  4.2.  Characters and type styles.

  Character styles are partially a function of the fonts specified in
  the document.  However, bold and italic character emphasis should be
  available for every font present on the system.  Underlining, too, can
  be used, though its formatting presents special problems.  See section
  ``LaTeX extension packages and other resources'', below.

  You can specify text to be emphasized in several ways.  The most
  portable is the \em command.  All text within its scope is italicized
  by default.  For example:

  This word will be {\em emphasized.}



  If you have italicized text that runs into text which is not itali-
  cized, you can specify an italic correction factor to be used.  The
  command for this is \/; that is, a backslash and a forward slash.

  This example {\em will\/} print correctly.

  This example will {\em not} print correctly.


  Slightly less portable, but still acceptable in situations where
  they're used singly, are the commands \it, \bf, and \tt, which specify
  that the characters within their scope be printed using italic, bold,
  and monospaced (teletype) typefaces, respectively.

  {\tt This text will be printed monospaced,}
  {\it this text will be italic,} and
  {\bf this text will be bold\dots} all in one paragraph.


  The command \dots prints a series of three periods for ellipses, which
  will not break across a line.

  The most recent version of LaTeX, which is what you have, includes
  commands which account for instances where one emphasis command would
  supersede another.

  This is {\it not {\bf bold italic!}}


  What happens is that teTeX formats the text with the italic typeface
  until it encounters the \bf command, at which point it switches to
  boldface type.

  To get around this, the NFSS scheme of selecting font shapes requires
  three parameters for each typeface: shape, series, and family.  Not
  all font sets will include all of these styles.  LaTeX will print a
  warning, however, if it needs to substitute another font.

  You can specify the following font shapes:

  \textup{text}          % upright shape (the default)
  \textit{text}          % italic
  \textsl{text}          % slanted
  \textsc{text}          % small caps


  These are the two series that most fonts have:

  \textmd{text}          % medium series (the default)
  \textbf{text}          % boldface series.


  There are generally three families of type available.

  \textrm{text}          % Roman (the default)
  \textsf{text}          % sans serif
  \texttt{text}          % typewriter (monospaced, Courier-like)


  Setting font styles using these parameters, you can combine effects.

  \texttt{\textit{This example likely will result in a font
  substitution, because many fonts don't include a typewriter italic
  typeface.}}


  The font family defaults to Computer Modern, which is a bit-mapped
  font.  Other font families are usually Postscript-format Type 1 fonts.
  See section ``Using PostScript fonts'' for details on how to specify
  them.

  There are also many forms of accents and special characters which are
  available for typesetting.  This is only a few of them.  (Try
  typesetting these on your own printer.)

  \'{o}  \`{e}  \^{o}  \"{u}        \={o}  \c{c}  `? `!
  \copyright     \pounds                \dag


  Finally, there are characters which are used as meta- or escape char-
  acters in TeX and LaTeX.  One of them, the dollar sign, is mentioned
  above.  The complete set of meta characters, which need to be escaped
  with a backslash to be used literally, is:

  # $ % & _ { }



  There are also different alphabets available, like Greek and Cyrillic.
  LaTeX provides many facilities for setting non-English text, which are
  covered by some of the other references mentioned here


  4.3.  Margins and line spacing.


  Changing margins in a TeX or LaTeX document is not a straightforward
  task.  A lot depends on the relative indent of the text you're trying
  to adjust the margin for.  The placement of the margin-changing
  command is also significant.

  For document-wide changes to LaTeX documents, the \evensidemargin and
  \oddsidemargin commands are available.  They affect the left-hand
  margins of the even-numbered and odd-numbered pages, respectively.
  For example,

  \evensidemargin=1in
  \oddsidemargin=1in


  adds on inch to the left-hand margin of the even and odd pages in
  addition to the standard one-inch, left-hand margin.  These commands
  affect the entire document and will shift the entire body of the text
  right and left across a page, regardless of any local indent, so
  they're safe to use with LaTeX environments like verse and list.

  Below is a set of margin-changing macros which I wrote.  They have a
  different effect than the commands mentioned above.  Because they use
  plain TeX commands, they're not guaranteed to honor the margins of any
  LaTeX environments which may be in effect, but you can place them
  anywhere in a document and change the margins from that point on.



  %%  margins.sty -- v. 0.1   by Robert Kiesling
  %%  Copies of this code may be freely distributed in verbatim form.
  %%
  %%  Some elementary plain TeX margin-changing commands. Lengths are
  %%  in inches:
  %%  \leftmargin{1}   %% sets the document's left margin in 1 inch.
  %%  \leftindent{1}   %% sets the following paragraphs' indent in
  %%                     1 inch.
  %%  \rightindent{1}  %% sets the following paragraphs' right margins
  %%                   %% in 1 inch.
  %%  \llength{3}      %% sets the following lines' lengths to 3 inches.
  %%
  \message{Margins macros...}
  \def\lmargin#1{\hoffset = #1 in}
  \def\lindent#1{\leftskip = #1 in}
  \def\rindent#1{\rightskip = #1 in}
  \def\llength#1{\hsize = #1 in}
  %%
  %% (End of margins macros.}


  Place this code in a file called margins.sty in your local $TEXINPUTS
  directory.  The commands are explained in the commented section of the
  file.  To include them in a document, use the command

  \usepackage{margins}


  in the document preamble.

  While we're on the subject, if you don't want the right margin to be
  justified, which is the default, you can tell LaTeX to use ragged
  right margins by giving the command:

  \raggedright



  Setting line spacing also has its complexities.

  The baselineskip measurement is the distance between lines of text.
  It is given as an absolute measurement.  For example,

  \baselineskip=24pt


  or even better:

  \setlength{\baselineskip}{24pt}


  The difference between the two forms is that setlength will respect
  any scoping rules that may be in effect when you use the command.

  The problem with using baselineskip is that it also affects the
  distance between section headings, footnotes, and the like.  You need
  to take care that baselineskip is correct for whatever text elements
  you're formatting.  There are, however, LaTeX macro packages, like
  setspace.sty, which will help you in these circumstances.  See section
  ``LaTeX extension packages and other resources''.


  4.4.  Document classes.

  LaTeX provides document classes which provide standardized formats for
  documents.  They provide environments to format lists, quotations,
  footnotes, and other text elements.  Commonly used document classes
  are covered in the following sections.


  4.4.1.  Articles and reports.

  As mentioned above, the article class and the report class are
  similar.  The main differences are that the report class creates a
  title page by default and begins each section on a new page.  Mostly,
  though, the two document classes are similar.

  To create titles, abstracts, and bylines in these document classes,
  you can type, for example,

  \title{The Breeding Habits of Cacti}
  \author{John Q. Public}
  \abstract{Description of how common desert cacti search
  for appropriate watering holes to perform their breeding
  rituals.}


  in the document preamble.  Then, the command

  \maketitle


  given at the start of the text, will generate either a title page in
  the report class, or the title and abstract at the top of the first
  page, in the article class.

  Sections can be defined with commands that include the following:

  \section
  \subsection
  \subsubsection


  These commands will produce the standard, numbered sections used in
  technical documents.  For unnumbered sections, use

  \section*
  \subsection*
  \subsubsection*


  and so on.

  LaTeX provides many environments for formatting displayed material.
  You can include quoted text with the quotation environment.

  \begin{quotation}
  Start of paragraph to be quoted...

  ... end of paragraph.
  \end{quotation}


  For shorter quotes, you can use the quote environment.

  To format verse, use the verse environment.

  \begin{verse}
  Because I could not stop for death\\
  He kindly stopped for me
  \end{verse}

  Notice that you must use the double backslashes to break lines in the
  correct places.  Otherwise, LaTeX fills the lines in a verse environ-
  ment, just like any other environment.

  Lists come in several flavors.  To format a bulleted list, the list
  environment is used:

  \begin{list}
  \item
  This is the first item of the list.
  \item
  This is the second item of the list...
  \item
  ... and so on.
  \end{list}



  A numbered list uses the enumerate environment:

  \begin{enumerate}
  \item
  Item No. 1.
  \item
  Item No. 2.
  \item
  \dots
  \end{enumerate}



  A descriptive list uses the description environment.

  \begin{description}
  \item{Oven} Dirty, needs new burner.
  \item{Refrigerator}  Dirty.  Sorry.
  \item{Sink and drainboard}  Stained, drippy, cold water faucet.
  \end{description}



  4.4.2.  Letters.

  The letter class uses special definitions to format business letters.

  The letter environment takes one argument, the address of the letter's
  addressee.  The address command, which must appear in the document
  preamble, defines the return address.  The signature command defines
  the sender's name as it appears after the closing.

  The LaTeX source of a simple business letter might look like this.



  \documentclass[12pt]{letter}
  \signature{John Q. Public}
  \address{123 Main St.\\Los Angeles, CA.  96005\\Tel: 123/456-7890}
  \begin{document}
  \begin{letter}{ACME Brick Co.\\100 Ash St.\\San Diego, CA 96403}
  \opening{Dear Sir/Madam:}

  With regard to one of your bricks that I found on my living room
  carpet surrounded by shards of my broken front window...

  (Remainder of the body of the letter.)

  \closing{Sincerely,}

  \end{letter}
  \end{document}


  Note that the addresses include double backslashes, which specify
  where the line breaks should occur.


  5.  LaTeX extension packages and other resources.

  We mentioned above that using underlining as a form of text emphasis
  presents special problems.  Actually, TeX has no problem underlining
  text, because it is a convention of mathematical typesetting.  In
  LaTeX, you can underline words with the command:

  \underline{text to be underlined}


  The problem is that underlining will not break across lines, and, in
  some circumstances, underlining can be uneven.  However, there is a
  LaTeX macro package, ready-made, that makes underlining the default
  mode of text emphasis.  It's called ulem.sty, and is one of the many
  contributed LaTeX packages that are freely available via the Internet.

  To use ulem.sty, include the command:

  \usepackage{ulem}


  in the document preamble.

  The packages which are available for LaTeX include:

     ifthen
        Include conditional statements in your documents.

     initials
        Defines a font for initial dropped capitals.

     sanskrit
        Font and preprocessor for producing documents in Sanskrit.

     recipe
        A LaTeX2e class to typeset recipes.

     refman
        Variant report and article styles.

  To make the path given in the Catalogue into a fully-qualified URL,
  concatenate the path to the host name URL and top-level path of the
  CTAN archive you wish to contact.  For example, the top-level CTAN
  directory of the site ftp.tex.ac.uk is ctan/tex-archive.  The complete
  URL of the directory of the refman package would be:

  ftp://ftp.tex.ac.uk/ctan/tex-archive/   +
  macros/latex/contrib/supported/refman   =

  ftp://ftp.tex.ac.uk/ctan/tex-archive/macros/latex/contrib/supported/refman/


  Some packages have more than one file, so only the path to the pack-
  age's directory is given.

  When you have the URL in hand, you can retrieve the package from one
  of the CTAN archive sites listed in section ``Appendix A''.  You can
  download a complete list of the archive's contents as the file
  FILES.byname, in the archive's top-level directory.  You can also
  search the archive on line for a keyword with the ftp command

  quote site index <keyword>



  6.  Mixing text and graphics with dvips .

  In general, this section applies to any TeX or LaTeX document which
  mixes text and graphics.  teTeX, like most other TeX distributions, is
  configured to request Computer Modern fonts by default.  When printing
  documents with Type 1 scalable fonts or graphics, font and graphics
  imaging is the job of dvips. dvips can use either Computer Modern bit
  mapped fonts or Type 1 scalable fonts, or any combination of the two.
  First, let's concentrate on printing and previewing some graphics.

  You will probably want to follow this procedure any time a LaTeX
  source document has the statement


  \includepackage{graphics}


  in the document preamble.  This statement tells LaTeX to include the
  text of the graphics.sty package in the source document.  There are
  other commands to perform graphics operations, and the statements in
  plain-TeX documents may not clue you in whether you need to use dvips.
  The difference will be apparent in the output, though, when the docu-
  ment is printed with missing figures and other graphics.

  So, for now, we'll concentrate on printing documents which use the
  LaTeX graphics.sty package.  You might want to take a look at the
  original TeX input.  It isn't included in the teTeX distribution, but
  it is available at

  ~CTAN/macros/latex/packages/graphics/grfguide.tex.


  What the teTeX distribution does include is the .dvi output file, and
  it is already TeXed for you.  There is a reason for this, and it has
  to do with the necessity of including Type 1 fonts in the output in
  order for the document to print properly.  If you want to LaTeX
  grfguide.tex, see the next section.  For now, however, we'll work on
  getting usable output using dvips.

  The file grfguide.dvi is located in the directory

  texmf/doc/latex/graphics

  The first step in outputting grfguide.dvi is to translate it to
  Postscript.  The program dvips is used for this.  It does just exactly
  what its name implies.  There are many options available for invoking
  dvips, but the simplest (nearly) form is

  dvips -f -r <grfguide.dvi >grfguide.ps


  The -f command switch tells dvips to operate as a filter, reading from
  standard input and writing to standard output.  dvips output can be
  configured so its output defaults to lpr.

  If you can print Postscript directly to your printer via lpr, you can
  simply type

  dvips -r grfguide.dvi


  The -r option tells dvips to output the pages in reverse order so they
  stack correctly when they exit a printer.  Use it or not, as appropri-
  ate for your output device.

  Depending on whether you still have the fonts that dvilj2 generated
  from the last document, dvips and metafont may or may not need to
  create new fonts needed by grfguide.dvi.  Eventually, though, dvips
  will output a list of the pages translated to Postscript, and you will
  have your Postscript output ready to be rendered on whatever output
  device you have available.

  If you're lucky (and rich), then you have a Postscript-capable printer
  already and will be able to print grfguide.ps directly.  You can
  either spool the output to the printer using lpr.  If for some reason
  your printer software doesn't work right with Postscript files, you
  can, in a pinch, simply dump the file to printer, with

  cat grfguide.ps >/dev/lp0


  or whichever port your printer is attached to, though this is not rec-
  ommended for everyday use.

  If you want or need to invoke Ghostscript manually, this is the
  standard procedure for its operation.  The first thing you want to do
  is invoke Ghostscript to view its command line arguments, like this:

  gs -help | less


  You'll see a list of supported output devices and sundry other com-
  mands.  Pick the output device which most nearly matches your printer.
  I generally produce black-and-white text and use the cdjmono driver,
  which drives a color Deskjet in monochrome (black and white) mode.

  The command line I would use is:

  gs -dNOPAUSE -sDEVICE=cdjmono -sOutputFile=/tmp/gs.out grfguide.ps -c quit


  This will produce my HP-compatible output in the /tmp directory.  It's
  a good idea to use a directory like /tmp, because gs can be particular
  about access permissions, and you can't (and shouldn't) always count
  on being logged in as root to perform these steps.  Now you can print
  the file:

  lpr /tmp/gs.out

  Obviously, this can all go into a shell script.  On my system, I have
  two simple scripts written, pv and pr, which simply outputs the
  Postscript file either to the display or the printer.  Screen preview-
  ing is possible without X, but it's far from ideal.  So, it's defi-
  nitely worth the effort to install XFree86 to view the output on the
  screen..

  The order of commands in a gs command line is significant, because
  some of the options tell Ghostscript to look for pieces of Postscript
  code from its library.

  The important thing to remember is that grfguide.dvi makes requests
  for both Computer Modern bit mapped and Type 1 scaled fonts.  If you
  can mix scalable and bit mapped fonts in a document, you're well on
  the way to becoming a TeXpert.


  6.1.  What if my printer isn't supported?

  The teTeX distribution comes with only a limited selection of DVI
  output drivers: dvips, drivers for Hewlett Packard LaserJets, and
  nothing else.  You have two options if you have a printer which isn't
  LaserJet-compatible: You can use dvips and Ghostscript, which I would
  recommend anyway, for reasons already mentioned, or you can
  investigate other dviware sources.

  A limited number of DVI drivers have been ported to Linux and are
  available as pre-built binaries.  They are located in the Linux
  archives at ftp://sunsite.unc.edu/pub/Linux/apps/tex/dvi/.

  The master dviware libraries are maintained at the University of Utah
  archives.  If you can't find a DVI driver there that supports your
  printer, chances are that it doesn't exist.  You can also write your
  own DVI driver using the templates available there.  The library's URL
  is ftp://ftp.math.utah.edu/pub/tex/dvi/.


  7.  Using Postscript fonts.


  It used to be that public domain, Type 1 fonts were much poorer
  quality than Computer Modern bit mapped fonts.  This situation has
  improved in the last several years, though, but matching the fonts is
  up to you.  Having several different font systems on one machine can
  seem redundant and an unnecessary waste of disk space.  And the
  Computer Modern fonts can seem, well, a little too formal to be
  suitable for everyday use.  It reminds me sometimes of bringing out
  the good China to feed the dog.  At least you don't need to spend a
  bundle on professional quality fonts any longer.

  One of the major improvements of LaTeX2e over its predecessor was the
  inclusion of the New Font Selection Scheme.  (It's now called PSNFSS.)
  Formerly, TeX authors would specify fonts with commands like

  \font=bodyroman = cmr10 scaled \magstep 1



  which provides precision but requires the skills of a type designer
  and mathematician to make good use of.  Also, it's not very portable.
  If another system didn't have the font cmr10 (this is TeX nomenclature
  for Computer Modern Roman, 10 point, with the default medium stroke
  weight), somebody would have to re-code the fonts specifications for
  the entire document.  PSNFSS, however, allows you specify fonts by
  family (Computer Modern, URW Nimbus, Helvetica, Utopia, and so forth),
  weight (light, medium, bold), orientation (upright or oblique), face
  (Roman, Italic), and base point size.  (See the section ``Characters
  and type styles'' for a description of the commands to specify
  typefaces.)  Many fonts are packaged as families.  For example, a
  Roman-type font may come packaged with a sans serif font, like
  Helvetica, and a monospaced font, like Courier.  You, as the author of
  a LaTeX document, can specify an entire font family with one command.

  There are, as I said, several high-quality font sets available in the
  public domain.  One of them is Adobe Utopia.  Another is Bitstream
  Charter.  Both are commercial quality fonts which have been donated to
  the public domain.

  These happen to be two of my favorites.  If you look around one of the
  CTAN sites, you will find these and other fonts archived there. There
  are enough fonts around that you'll be able to design documents the
  way you want them to look, and not just English text, either.  TeX was
  originally designed for mathematical typesetting, so there is a full
  range of mathematical fonts available, as well as Cyrillic, Greek,
  Kana, and other alphabets too numerous to mention.

  The important thing to look for is files which have either the .pfa or
  .pfb extension.  They indicate that these are the scalable fonts
  themselves, not simply the metrics files.  Type 1 fonts use .pfm
  metric files, as opposed to the .tfm metric files which bit mapped
  fonts use.  The two font sets I mentioned above are included in teTeX
  distributions, as well as separately.

  What I said above, concerning the ease of font selection under PSNFSS,
  is true in this instance.  If we want to use the Charter fonts in our
  document instead of Computer Modern bit mapped, all that is necessary
  is include the LaTeX statement

  \renewcommand{\familydefault}{bch}


  in the document preamble, where ``bch'' is the common designation for
  Bitstream Charter.  The Charter fonts reside in the directory

  /usr/lib/teTeX/texmf/fonts/type1/bitstrea/charter



  There you'll see the .pfb files of the Charter fonts: bchb8a.pfb for
  Charter Bold, bchr8a.pfb for Charter Roman, bchbi8a.pfb for Charter
  Bold Italic.  The ``8a'' in the font names indicates the character
  encoding.  At this point you shouldn't need to worry much about them,
  because the encodings mostly differ for 8-bit characters, which have
  numeric values above 128 decimal.  They mostly define accents and non-
  English characters.  The Type 1 font encodings generally work well for
  Western alphabets because they conform to the ISO 8859 standards for
  international character sets, so this is an added benefit of using
  them.

  To typeset a document which has Charter fonts selected, you would give
  the command

  pslatex document.tex


  pslatex is a variant of teTeX's standard latex command which defines
  the directories where the Type 1 fonts are, as well as some additional
  LaTeX code to load.  You'll see the notice screen for pslatex followed
  by the status output of the TeX job itself.  In a moment, you'll have
  a .dvi file which includes the Charter font requests.  You can then
  print the file with dvips, and gs if necessary.

  Installing a Type 1 font set is not difficult, as long as you follow a
  few basic steps.  You should unpack the fonts in a subdirectory of the
  /usr/lib/teTeX/texmf/fonts/type1 directory, where your other Type 1
  fonts are located, and then run texhash to let the directory search
  routines know that the fonts have been added.  Then you need to add
  the font descriptions to the file psfonts.map so dvips knows they're
  on the system.  The format of the psfonts.map file is covered in a
  couple different places in the references mentioned above.  Again,
  remember to run the texhash program to update the teTeX directory
  database.

  It is definitely an advantage to use the X Windows System with
  teTeX--- XFree86 under Linux---because it allows for superior document
  previewing.  It's not required, but in general, anything that allows
  for easier screen previewing is going to benefit your work, in terms
  of the quality of the output.  However, there is a tradeoff with speed
  of editing, which is much quicker on character-mode displays.


  8.  Appendix A: CTAN site list.

  This is the text of the file CTAN.sites, which is available in the
  top-level directory of each CTAN archive or mirror site.



  In order to reduce network load, it is recommended that you use the
  Comprehensive TeX Archive Network (CTAN) host which is located in the
  closest network proximity to your site.  Alternatively, you may wish to
  obtain a copy of the CTAN via CD-ROM (see help/CTAN.cdrom for details).

  Known mirrors of the CTAN reside on (alphabetically):
    cis.utovrm.it (Italia)                /TeX
    ctan.unsw.edu.au (NSW, Australia)     /tex-archive
    dongpo.math.ncu.edu.tw (Taiwan)       /tex-archive
    ftp.belnet.be (Belgium)               /packages/TeX
    ftp.ccu.edu.tw (Taiwan)               /pub/tex
    ftp.cdrom.com (West coast, USA)       /pub/tex/ctan
    ftp.comp.hkbu.edu.hk (Hong Kong)      /pub/TeX/CTAN
    ftp.cs.rmit.edu.au  (Australia)       /tex-archive
    ftp.cs.ruu.nl (The Netherlands)       /pub/tex-archive
    ftp.cstug.cz (The Czech Republic)     /pub/tex/CTAN
    ftp.duke.edu (North Carolina, USA)    /tex-archive
    ftp.funet.fi (Finland)                /pub/TeX/CTAN
    ftp.gwdg.de (Deutschland)             /pub/dante
    ftp.jussieu.fr (France)               /pub4/TeX/CTAN
    ftp.kreonet.re.kr (Korea)             /pub/CTAN
    ftp.loria.fr (France)                 /pub/unix/tex/ctan
    ftp.mpi-sb.mpg.de (Deutschland)       /pub/tex/mirror/ftp.dante.de
    ftp.nada.kth.se (Sweden)              /pub/tex/ctan-mirror
    ftp.oleane.net (France)               /pub/mirrors/CTAN/
    ftp.rediris.es (Espa\~na)             /mirror/tex-archive
    ftp.rge.com (New York, USA)           /pub/tex
    ftp.riken.go.jp (Japan)               /pub/tex-archive
    ftp.tu-chemnitz.de (Deutschland)      /pub/tex
    ftp.u-aizu.ac.jp (Japan)              /pub/tex/CTAN
    ftp.uni-augsburg.de (Deutschland)     /tex-archive
    ftp.uni-bielefeld.de (Deutschland)    /pub/tex
    ftp.unina.it (Italia)                 /pub/TeX
    ftp.uni-stuttgart.de (Deutschland)    /tex-archive (/pub/tex)
    ftp.univie.ac.at (\"Osterreich)       /packages/tex
    ftp.ut.ee (Estonia)                   /tex-archive
    ftpserver.nus.sg (Singapore)          /pub/zi/TeX
    src.doc.ic.ac.uk (England)            /packages/tex/uk-tex
    sunsite.auc.dk (Denmark)              /pub/tex/ctan
    sunsite.cnlab-switch.ch (Switzerland) /mirror/tex
    sunsite.icm.edu.pl (Poland)           /pub/CTAN
    sunsite.unc.edu (North Carolina, USA) /pub/packages/TeX
    wuarchive.wustl.edu (Missouri, USA)   /packages/TeX

  Known partial mirrors of the CTAN reside on (alphabetically):
    ftp.adfa.oz.au (Australia)            /pub/tex/ctan
    ftp.fcu.edu.tw (Taiwan)               /pub2/tex
    ftp.germany.eu.net (Deutschland)      /pub/packages/TeX
    ftp.gust.org.pl (Poland)              /pub/TeX
    ftp.jaist.ac.jp (Japan)               /pub/TeX/tex-archive
    ftp.uu.net (Virginia, USA)            /pub/text-processing/TeX
    nic.switch.ch (Switzerland)           /mirror/tex
    sunsite.dsi.unimi.it (Italia)         /pub/TeX
    sunsite.snu.ac.kr (Korea)             /shortcut/CTAN

  Please send updates to this list to <ctan@urz.uni-heidelberg.de>.

  The participating hosts in the Comprehensive TeX Archive Network are:
    ftp.dante.de  (Deutschland)
         -- anonymous ftp                 /tex-archive (/pub/tex /pub/archive)
         -- gopher on node gopher.dante.de
         -- e-mail via ftpmail@dante.de
         -- World Wide Web access on www.dante.de
         -- Administrator: <ftpmaint@dante.de>

    ftp.tex.ac.uk (England)
         -- anonymous ftp                 /tex-archive (/pub/tex /pub/archive)
         -- gopher on node gopher.tex.ac.uk
         -- NFS mountable from nfs.tex.ac.uk:/public/ctan/tex-archive
         -- World Wide Web access on www.tex.ac.uk
         -- Administrator: <ctan-uk@tex.ac.uk>



  9.  Appendix B: Installing the CTAN teTeX distribution.

  The generic, teTeX distribution isn't any harder to install than the
  Linux packages.  See section ``Generic CTAN distribution'', below.

  You should consider installing the generic teTeX distribution from the
  CTAN archives if:

  o  Your system isn't based on one of the standard Linux distributions.

  o  You don't have root privileges on your system.

  o  You want or need to have the very latest version of teTeX, or
     LaTeX.

  o  You don't have enough disk space available for a full installation.

  o  You want to install teTeX somewhere instead of the /usr file
     system.

  o  You would like to share your teTeX installation with other UNIX
     variants or platforms on a network.  In this case, you should
     strongly consider installing from the source distribution.  See
     section ``Installing the source distribution'', below.

  o  You want the latest versions of teTeX's public domain Type 1 fonts,
     which are significantly better than the fonts included in earlier
     releases.

  A complete installation of the binary distribution requires 40-50 Mb
  of disk space, and building the distribution from the source code
  takes about 75 Mb, so you should make sure that the disk space is
  available before you start.  You don't need to have the GCC compiler
  or the X Windows System installed (although X certainly helps because
  it is much easier to preview documents on-screen).  All you need is an
  editor that is capable of producing plain ASCII, text (see section 2).
  What could be simpler?

  You can retrieve the files from one of the CTAN archives listed in
  section ``Appendix A''.  In the examples below, the files were
  retrieved from the CTAN archive at ftp.tex.ac.uk.


  9.1.  Installing the binary distribution.



  9.1.1.  Minimal installation.


  First, FTP to ftp.tex.ac.uk and cd to the directory

  ctan/tex-archive/systems/unix/teTeX/distrib/


  Retrieve the files

  INSTALL.bin
  install.sh


  and place them in the top-level directory where you want to install
  teTeX, for example, /var/teTeX if you plan to install teTeX in the
  /var file system.

  Print out the INSTALL.bin file.  Keep this file handy, because it
  describes how to install a minimal teTeX installation.  The minimal
  installation requires only 10-15 MB of disk space, but it is
  recommended that you install the complete teTeX package if at all
  possible.  For a minimum installation, you'll need the files

  ctan/tex-archive/systems/unix/teTeX/distrib/base/latex-base.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/base/tetex-base.tar.gz


  You'll also need one of two archives which contain the executable
  teTeX programs.  Retrieve the archive file

  ctan/tex-archive/systems/unix/teTeX/distrib/binaries/i386-linux.tar.gz


  if your system uses the Linux ELF shared libraries, ld.so of at least
  version 1.73, and clibs of at least version 5.09.  If it doesn't,
  retrieve the archive

  ctan/tex-archive/systems/unix/teTeX/distrib/binaries/i386-linuxaout.tar.gz


  which is compiled for systems that use the older, a.out-format static
  libraries.

  Then, following the instructions in the file INSTALL.bin, execute the
  command

  sh ./install.sh


  while in the top-level teTeX installation directory. (Make sure that
  the teTeX archives are located there, too.)  After a few moments, the
  installation program will warn you that you are missing some of the
  teTeX packages.  However, if you're planning only a minimal teTeX
  installation, you should ignore the warnings and proceed.  To config-
  ure the basic teTeX system, see section ``Base system configuration'',
  below.

  To install the remaining packages, see the next section.


  9.1.2.  Complete installation.

  To perform a complete teTeX installation, retrieve the archive files
  listed in the previous section, as well as the following files:



  ctan/tex-archive/systems/unix/teTeX/distrib/doc/ams-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/bibtex-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/eplain-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/fonts-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/general-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/generic-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/latex-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/makeindex-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/metapost-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/programs-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/ams-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/dc-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/ec-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/misc-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/postscript-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/sauter-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/amstex.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/bibtex.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/eplain.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/latex-extra.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/metapost.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/pictex.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/pstricks.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/texdraw.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/xypic.tar.gz


  All of these files should be placed in the top-level directory where
  you want teTeX to reside.  As with the minimal installation, execute
  the command

  sh ./install.sh



  9.2.  Base system configuration.

  The install.sh script, after determining which teTeX archive series
  are present, will present you with a menu of options.  The only
  setting you need to make at this point is to set the top-level
  directory where you want teTeX installed, by selecting the ``D''
  option.  You must, of course, choose a directory in whose parent
  directory you have write permissions.  For example, if you are
  installing teTeX in your home directory, you would specify the teTeX
  installation directory as

  /home/john.q.public/teTeX


  and, after returning to the main menu, select ``I'' to proceed with
  the installation.  Note that the directory must not exist already: the
  install.sh script must be able to create it.

  An option which you should consider enabling, is setting an
  alternative directory for generated fonts.  Even if you plan to use
  only Postscript-format, Type 1 scalable fonts, occasionally you'll
  process a file that requires the Computer Modern fonts.  Enabling this
  option requires that you enter the directory to use.  You must have
  write permissions for the parent directory.  Following the example
  above, you could specify

  /home/john.q.public/texfonts


  or, if you want the generated fonts to be accessible by all users on
  the system, specify a directory like
  /var/texfonts


  I would recommend that you not, however, use the default /var/tmp/tex-
  fonts directory for this option, because the generated fonts could be
  deleted after the next reboot, and the fonts will need to be generated
  again the next time they're needed.

  After you've selected the option ``I'', and install.sh has installed
  the archives, set various permissions, and generated its links and
  format files, the program will exit with a message telling you to add
  the teTeX binary directory to your $PATH environment variable, and the
  directories where the man pages and info files reside to your $MANPATH
  and $INFOPATH environment variables.  For example, add the statements

  export PATH=$PATH:"/home/john.q.public/teTeX/bin"
  export MANPATH=$MANPATH":/home/john.q.public/teTeX/man"
  export INFOPATH$=INFOPATH":/home/john.q.public/teTeX/info"


  to your ~/.bash_profile if you use bash as your shell, or to your
  ~/.profile if you use another shell for logins.

  Log out, and then log in again, so the environment variables are
  registered.  Then, run the command

  texconfig confall


  to insure that the installation is correct.

  Next, you can configure teTeX for you specific hardware.  See section
  ``Post-installation configuration details'', below.


  9.3.  Installing the CTAN source distribution.

  To install teTeX V. 0.4 from the source code, ftp to a CTAN site like
  ftp://ftp.tex.ac.uk and retrieve the files

  ctan/tex-archive/systems/unix/teTeX/distrib/INSTALL.src
  ctan/tex-archive/systems/unix/teTeX/distrib/sources/README.texmf-src
  ctan/tex-archive/systems/unix/teTeX/distrib/sources/teTeX-lib-0.4pl8.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/sources/teTeX-src-0.4pl7.tar.gz



  Read over the instructions in INSTALL.src, then su to root and unpack
  the files in a directory for which you have read-write-execute
  permissions.

  Remember to use the p argument to tar, and also remember to unset the
  noclobber option of bash.  You can do this with the counterintuitive
  command

  set +o noclobber


  Note that the argument +o to set unsets a variable, just exactly back-
  wards from what you might expect.

  The file teTeX-lib-0.4pl8.tar.gz will create the directory ./teTeX.
  The file teTeX-src-0.4pl7.tar.gz will create the directory teTeX-
  src-0.4 Print out the file INSTALL.src and keep it nearby for the
  following steps. cd to the ./teTeX-src-0.4 directory, and, per the
  instructions in the INSTALL.src file, edit ./Makefile.  You need to
  set the TETEXDIR variable to the absolute path of the parent teTeX
  directory.  This will be the subdirectory teTeX of the directory where
  you unpacked the source and library archives.  For example, if you
  unpacked the archives in your home directory, you would set TETEXDIR
  to

  /home/john.q.public/teTeX


  The rest of the Makefile options are pretty generic.  With GCC version
  2.7.2 and later, you should not need to make any further adjustments
  unless you have a non-standard compiler and library setup, or want the
  compiler to perform some further optimizations, or for some other rea-
  son.  Check that the USE_DIALOG, USE_NCURSES, and HAVE_NCURSES vari-
  ables are set correctly for your system, because the dialog program
  needs the ncurses library to be installed.  A ncurses library is
  included in the source distribution, so the default values in the
  Makefile should work fine.  If you can't get ncurses to compile or
  link, texconfig can also be run from the command line.

  If you've done everything correctly up to this point, you should be
  able to type make world in the top-level source directory, and relax
  until the teTeX executables are built.  This can take a few hours.

  After the build has completed, set the environment variables $PATH,
  $MANPATH, and $INFOPATH to include the teTeX directories.  The
  statements which would be added to the file ~/.bash_profile, in the
  example, above, would be

  export PATH=$PATH":/home/john.q.public/teTeX/bin/i386-linux"
  export MANPATH=$MANPATH":/home/john.q.public/teTeX/man"
  export INFOPATH=$INFOPATH":/home/john.q.public/teTeX/info"


  The $PATH variable is different in the source distribution than in the
  binary distribution.  Note that here the path to the binaries is
  teTeX/bin/i386-linux instead of simply teTeX/bin as in the binary dis-
  tribution.

  At this point you can run texconfig confall to ensure that the paths
  have been set correctly, and then proceed to configure teTeX as in the
  binary distribution.  See the section ``Post-installation
  configuration details'', below.


  9.4.  Post-installation configuration details.

  The first thing you want to do is look at Thomas Esser's README file.
  It contains a lot of hints on how to configure teTeX for your output
  device (i.e., printer).  The README file is located in the directory

  /usr/lib/teTeX/texmf/doc/tetex


  Read the file over with the command (the path in the following exam-
  ples is that of the Slackware distribution):

  less /usr/lib/teTeX/texmf/doc/tetex/README


  or, print it out with the command

  cat /usr/lib/teTeX/texmf/doc/tetex/README >/dev/lp0



  assuming that your printer is connected to /dev/lp0.  Substitute the
  device driver file that your printer is connected to, as appropriate.

  Or, better still, print it using the lpr command:

  lpr /usr/lib/teTeX/texmf/doc/tetex/README


  You should have installed the printer daemon that is included with
  your distribution of Linux.  If not, do that now, per the instructions
  that come with the package.

  Print out the teTeX-FAQ. Keep the FAQ handy because it contains useful
  hints for configuring teTeX's output drivers for your printer.  We'll
  get to that in a moment.  In more recent releases of teTeX, the teTeX-
  FAQ is viewable via the texconfig utility.

  Next, you want to define a directory to store your own TeX format
  files.  teTeX searches the directories listed by the $TEXINPUTS
  environment variable for local TeX input files:

  export TEXINPUTS=".:~/texinputs:"


  to the system-wide /etc/profile file.  Individual users can set their
  own local $TEXINPUTS directory, by adding the line in their ~/.profile
  or ~/.bash_profile if bash is the default shell.  The $TEXINPUTS envi-
  ronment variable tells teTeX to look for users' individual TeX style
  files in the ~/texinputs directories under each user's home directory.
  It is critical that a colon appear before and after this directory.
  teTeX is going to append its own directory searches to your own.  You
  want to have teTeX search the local format files first, so it uses the
  local versions of any of the standard files you have edited.

  Add the /usr/lib/teTeX/bin directory to the system-wide path if you're
  installing teTeX as root.  Again, if you're installing a personal copy
  of teTeX, add the directory where the teTeX binaries are located to
  the front your $PATH with the following line in your ~/.profile or
  ~/.bash_profile:

  export PATH="~/tetex/bin:"$PATH


  Now, log in as root and run texconfig per the instructions in the
  teTeX-FAQ and choose the printer that is attached to your system.
  Make sure that you configure teTeX for both the correct printer and
  printer resolution.

  Finally, run the texhash program.  This ensures that teTeX's internal
  database is up to date.  The database is actually a ls-lR file.  You
  must run texhash every time you change the system configuration, or
  teTeX will not be able to locate your changes.


  10.  Appendix C: Distribution and Copyright.


  10.1.  Distribution.

  teTeX is free software; this means everyone is free to use the
  software and free to redistribute it on certain conditions.  The
  package is not in the public domain.  It is copyrighted and there are
  restrictions on its distribution, but these restrictions are designed
  to permit everything that a good cooperating citizen would want to do.
  What is not allowed is to try to prevent others from further sharing
  any version of free software that they might get from you.  The
  precise conditions are found in the GNU General Public License that
  comes with many of the software packages and also appears following
  this section.

  One way to get a copy of the package is from someone else who has it.
  You need not ask for our permission to do so, or tell any one else;
  just copy it.  If you have access to the Internet, you can get the
  latest distribution versions by anonymous FTP.  See the chapter
  ``Sources'' for more information.

  You may also receive the software when you buy a computer.  Computer
  manufacturers are free to distribute copies on the same terms that
  apply to everyone else.  These terms require them to give you the full
  sources, including whatever changes they may have made, and to permit
  you to redistribute these packages received from them under the usual
  terms of the General Public License.  In other words, the program must
  be free for you when you get it, not just free for the manufacturer.

  You can also order copies of GNU software from the Free Software
  Foundation on CD-ROM.  This is a convenient and reliable way to get a
  copy; it is also a good way to help fund our work.  (The Foundation
  has always received most of its funds in this way.)  An order form is
  included many distribution, and on our web site in
  http://www.gnu.ai.mit.edu/order/order.html.  For further information,
  write to


  Free Software Foundation
  59 Temple Place, Suite 330
  Boston, MA  02111-1307 USA
  USA



  The income from distribution fees goes to support the foundation's
  purpose: the development of new free software, and improvements to our
  existing programs.

  If you use GNU software at your workplace, please suggest that the
  company make a donation.  If company policy is unsympathetic to the
  idea of donating to charity, you might instead suggest ordering a CD-
  ROM from the Foundation occasionally, or subscribing to periodic
  updates.


  10.2.  GNU GENERAL PUBLIC LICENSE


  Version 2, June 1991

  Copyright (C) 1989, 1991 Free Software Foundation, Inc.  59 Temple
  Place, Suite 330, Boston, MA  02111-1307  USA

  Everyone is permitted to copy and distribute verbatim copies of this
  license document, but changing it is not allowed.

  Preamble.

  The licenses for most software are designed to take away your freedom
  to share and change it.  By contrast, the GNU General Public License
  is intended to guarantee your freedom to share and change free
  software---to make sure the software is free for all its users.  This
  General Public License applies to most of the Free Software
  Foundation's software and to any other program whose authors commit to
  using it.  (Some other Free Software Foundation software is covered by
  the GNU Library General Public License instead.)  You can apply it to
  your programs, too.

  When we speak of free software, we are referring to freedom, not
  price.  Our General Public Licenses are designed to make sure that you
  have the freedom to distribute copies of free software (and charge for
  this service if you wish), that you receive source code or can get it
  if you want it, that you can change the software or use pieces of it
  in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
  anyone to deny you these rights or to ask you to surrender the rights.
  These restrictions translate to certain responsibilities for you if
  you distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
  gratis or for a fee, you must give the recipients all the rights that
  you have.  You must make sure that they, too, receive or can get the
  source code.  And you must show them these terms so they know their
  rights.

  We protect your rights with two steps: (1) copyright the software, and
  (2) offer you this license which gives you legal permission to copy,
  distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
  that everyone understands that there is no warranty for this free
  software.  If the software is modified by someone else and passed on,
  we want its recipients to know that what they have is not the
  original, so that any problems introduced by others will not reflect
  on the original authors' reputations.

  Finally, any free program is threatened constantly by software
  patents.  We wish to avoid the danger that redistributors of a free
  program will individually obtain patent licenses, in effect making the
  program proprietary.  To prevent this, we have made it clear that any
  patent must be licensed for everyone's free use or not licensed at
  all.

  The precise terms and conditions for copying, distribution and
  modification follow.

  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION


  o  This License applies to any program or other work which contains a
     notice placed by the copyright holder saying it may be distributed
     under the terms of this General Public License.  The ``Program''
     below, refers to any such program or work, and a ``work based on
     the Program'' means either the Program or any derivative work under
     copyright law: that is to say, a work containing the Program or a
     portion of it, either verbatim or with modifications and/or
     translated into another language.  (Hereinafter, translation is
     included without limitation in the term,``modification.'')  Each
     licensee is addressed as ``you.''

     Activities other than copying, distribution and modification are
     not covered by this License; they are outside its scope.  The act
     of running the Program is not restricted, and the output from the
     Program is covered only if its contents constitute a work based on
     the Program (independent of having been made by running the
     Program).  Whether that is true depends on what the Program does.

  o  You may copy and distribute verbatim copies of the Program's source
     code as you receive it, in any medium, provided that you
     conspicuously and appropriately publish on each copy an appropriate
     copyright notice and disclaimer of warranty; keep intact all the
     notices that refer to this License and to the absence of any
     warranty; and give any other recipients of the Program a copy of
     this License along with the Program.

     You may charge a fee for the physical act of transferring a copy,
     and you may at your option offer warranty protection in exchange
     for a fee.

  o  You may modify your copy or copies of the Program or any portion of
     it, thus forming a work based on the Program, and copy and
     distribute such modifications or work under the terms of Section 1
     above, provided that you also meet all of these conditions:

     1. You must cause the modified files to carry prominent notices
     stating that you changed the files and the date of any change.

     2. You must cause any work that you distribute or publish, that in
     whole or in part contains or is derived from the Program or any
     part thereof, to be licensed as a whole at no charge to all third
     parties under the terms of this License.

     3. If the modified program normally reads commands interactively
     when run, you must cause it, when started running for such
     interactive use in the most ordinary way, to print or display an
     announcement including an appropriate copyright notice and a notice
     that there is no warranty (or else, saying that you provide a
     warranty) and that users may redistribute the program under these
     conditions, and telling the user how to view a copy of this
     License.  (Exception: if the Program itself is interactive but does
     not normally print such an announcement, your work based on the
     Program is not required to print an announcement.)

     These requirements apply to the modified work as a whole.  If
     identifiable sections of that work are not derived from the
     Program, and can be reasonably considered independent and separate
     works in themselves, then this License, and its terms, do not apply
     to those sections when you distribute them as separate works.  But
     when you distribute the same sections as part of a whole which is a
     work based on the Program, the distribution of the whole must be on
     the terms of this License, whose permissions for other licensees
     extend to the entire whole, and thus to each and every part
     regardless of who wrote it.

     Thus, it is not the intent of this section to claim rights or
     contest your rights to work written entirely by you; rather, the
     intent is to exercise the right to control the distribution of
     derivative or collective works based on the Program.

     In addition, mere aggregation of another work not based on the
     Program with the Program (or with a work based on the Program) on a
     volume of a storage or distribution medium does not bring the other
     work under the scope of this License.

  o  You may copy and distribute the Program (or a work based on it,
     under Section 2) in object code or executable form under the terms
     of Sections 1 and 2 above provided that you also do one of the
     following:

     1. Accompany it with the complete corresponding machine-readable
     source code, which must be distributed under the terms of Sections
     1 and 2 above on a medium customarily used for software
     interchange; or,

     2. Accompany it with a written offer, valid for at least three
     years, to give any third party, for a charge no more than your cost
     of physically performing source distribution, a complete machine-
     readable copy of the corresponding source code, to be distributed
     under the terms of Sections 1 and 2 above on a medium customarily
     used for software interchange; or,

     3. Accompany it with the information you received as to the offer
     to distribute corresponding source code.  (This alternative is
     allowed only for noncommercial distribution and only if you
     received the program in object code or executable form with such an
     offer, in accord with Subsection b above.)

     The source code for a work means the preferred form of the work for
     making modifications to it.  For an executable work, complete
     source code means all the source code for all modules it contains,
     plus any associated interface definition files, plus the scripts
     used to control compilation and installation of the executable.
     However, as a special exception, the source code distributed need
     not include anything that is normally distributed (in either source
     or binary form) with the major components (compiler, kernel, and so
     on) of the operating system on which the executable runs, unless
     that component itself accompanies the executable.

     If distribution of executable or object code is made by offering
     access to copy from a designated place, then offering equivalent
     access to copy the source code from the same place counts as
     distribution of the source code, even though third parties are not
     compelled to copy the source along with the object code.

  o  You may not copy, modify, sublicense, or distribute the Program
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense or distribute the Program is
     void, and will automatically terminate your rights under this
     License.  However, parties who have received copies, or rights,
     from you under this License will not have their licenses terminated
     so long as such parties remain in full compliance.

  o  You are not required to accept this License, since you have not
     signed it.  However, nothing else grants you permission to modify
     or distribute the Program or its derivative works.  These actions
     are prohibited by law if you do not accept this License.
     Therefore, by modifying or distributing the Program (or any work
     based on the Program), you indicate your acceptance of this License
     to do so, and all its terms and conditions for copying,
     distributing or modifying the Program or works based on it.

  o  Each time you redistribute the Program (or any work based on the
     Program), the recipient automatically receives a license from the
     original licensor to copy, distribute or modify the Program subject
     to these terms and conditions.  You may not impose any further
     restrictions on the recipients' exercise of the rights granted
     herein.  You are not responsible for enforcing compliance by third
     parties to this License.

  o  If, as a consequence of a court judgment or allegation of patent
     infringement or for any other reason (not limited to patent
     issues), conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot distribute so as to satisfy simultaneously
     your obligations under this License and any other pertinent
     obligations, then as a consequence you may not distribute the
     Program at all.  For example, if a patent license would not permit
     royalty-free redistribution of the Program by all those who receive
     copies directly or indirectly through you, then the only way you
     could satisfy both it and this License would be to refrain entirely
     from distribution of the Program.

     If any portion of this section is held invalid or unenforceable
     under any particular circumstance, the balance of the section is
     intended to apply and the section as a whole is intended to apply
     in other circumstances.

     It is not the purpose of this section to induce you to infringe any
     patents or other property right claims or to contest validity of
     any such claims; this section has the sole purpose of protecting
     the integrity of the free software distribution system, which is
     implemented by public license practices.  Many people have made
     generous contributions to the wide range of software distributed
     through that system in reliance on consistent application of that
     system; it is up to the author/donor to decide if he or she is
     willing to distribute software through any other system and a
     licensee cannot impose that choice.

     This section is intended to make thoroughly clear what is believed
     to be a consequence of the rest of this License.

  o  If the distribution and/or use of the Program is restricted in
     certain countries either by patents or by copyrighted interfaces,
     the original copyright holder who places the Program under this
     License may add an explicit geographical distribution limitation
     excluding those countries, so that distribution is permitted only
     in or among countries not thus excluded.  In such case, this
     License incorporates the limitation as if written in the body of
     this License.

  o  The Free Software Foundation may publish revised and/or new
     versions of the General Public License from time to time.  Such new
     versions will be similar in spirit to the present version, but may
     differ in detail to address new problems or concerns.

     Each version is given a distinguishing version number.  If the
     Program specifies a version number of this License which applies to
     it and ``any later version,'' you have the option of following the
     terms and conditions either of that version or of any later version
     published by the Free Software Foundation.  If the Program does not
     specify a version number of this License, you may choose any
     version ever published by the Free Software Foundation.

  o  If you wish to incorporate parts of the Program into other free
     programs whose distribution conditions are different, write to the
     author to ask for permission.  For software which is copyrighted by
     the Free Software Foundation, write to the Free Software
     Foundation; we sometimes make exceptions for this.  Our decision
     will be guided by the two goals of preserving the free status of
     all derivatives of our free software and of promoting the sharing
     and reuse of software generally.

     NO WARRANTY

  o  BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
     WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
     LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
     AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY
     OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
     PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE
     DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
     OR CORRECTION.

  o  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
     MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
     LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
     INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
     INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
     DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
     OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
     OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

  END OF TERMS AND CONDITIONS


  10.3.  How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
  possible use to the public, the best way to achieve this is to make it
  free software which everyone can redistribute and change under these
  terms.

  To do so, attach the following notices to the program.  It is safest
  to attach them to the start of each source file to most effectively
  convey the exclusion of warranty; and each file should have at least
  the ``copyright'' line and a pointer to where the full notice is
  found.


  [one line to give the program's name and an idea of what it does.
  Copyright (C) 19[yy]  [name of author]

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along
  with this program; if not, write to the Free Software Foundation, Inc.,
  59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.



  Also add information on how to contact you by electronic and paper
  mail.

  If the program is interactive, make it output a short notice like this
  when it starts in an interactive mode:


  Gnomovision version 69, Copyright (C) 19[yy] [name of author]
  Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
  type `show w'.  This is free software, and you are welcome
  to redistribute it under certain conditions; type `show c'
  for details.



  The hypothetical commands ``show w'' and ``show c'' should show the
  appropriate parts of the General Public License.  Of course, the
  commands you use may be called something other than ``show w'' and
  ``show c''; they could even be mouse-clicks or menu items---whatever
  suits your program.


  You should also get your employer (if you work as a programmer) or
  your school, if any, to sign a ``copyright disclaimer'' for the
  program, if necessary.  Here is a sample; alter the names:


  Yoyodyne, Inc., hereby disclaims all copyright
  interest in the program `Gnomovision'
  (which makes passes at compilers) written
  by James Hacker.

  [signature of Ty Coon] 1 April 1989
  Ty Coon, President of Vice



  This General Public License does not permit incorporating your program
  into proprietary programs.  If your program is a subroutine library,
  you may consider it more useful to permit linking proprietary
  applications with the library.  If this is what you want to do, use
  the GNU Library General Public License instead of this License.



  Text-Terminal-HOWTO
  David S. Lawyer  <mailto:dave@lafn.org>
  v1.13, June 2000

  This document explains what text terminals are, how they work, how to
  install and configure them, and provides some info on how to repair
  them.  If you don't have a terminal manual, it may be of help.  While
  it's written for real terminals on a Linux system, some of it is also
  applicable to terminal emulation and may be helpful for non-Linux sys
  tems.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Copyright, Trademarks, Disclaimer, & Credits
        1.1.1 Copyright
        1.1.2 Disclaimer
        1.1.3 Trademarks.
        1.1.4 Credits
     1.2 Future Plans: You Can Help
     1.3 New Versions of this HOWTO
     1.4 Related HOWTO's
     1.5 Terminology Used in this Document
     1.6 What is a Terminal ?

  2. Types of Terminals

     2.1 Dumb Terminals
     2.2 Text Terminals
     2.3 Graphics Terminals
        2.3.1 Serial Line Graphics Terminals
        2.3.2 Fast Graphics Terminals (often known by other names)
     2.4 Network Computers (NCs)
     2.5 Emulation on a PC

  3. Quick Install

  4. Why Use a Terminal ?

     4.1 Intro to Why Use a Terminal
     4.2 Lower Hardware Costs ?
     4.3 Control of Software
     4.4 Hardware Upgrades
     4.5 Other Advantages of Terminals
     4.6 Major Disadvantages of Terminals
     4.7 Are Text Terminals Obsolete ?

  5. Overview of How Terminals Work (in Linux)

     5.1 Device Names
     5.2 Login/Logout
     5.3 Half/Full Duplex
     5.4 Terminal Memory
     5.5 Commands for the Terminal
     5.6 Lack of Standardization Solved by Terminfo
     5.7 The Interface
     5.8 Emulation
     5.9 The Console

  6. Terminal Special Files such as /dev/tty

     6.1 Serial Port Terminals
     6.2 Pseudo Terminals
     6.3 The Controlling Terminal /dev/tty
     6.4 /dev/ttyIN "Terminals"
     6.5 The Console: /dev/ttyN
     6.6 Creating a Device with "mknod"

  7. Some Details on How Terminals Work

     7.1 Terminal Memory Details
     7.2 Early Terminals
     7.3 Escape Sequences and Control Codes (intro)
        7.3.1 Control Codes
        7.3.2 Escape Sequences
     7.4 Display Attributes & Magic Cookies

  8. Special Features of Some Terminals
     8.1 Color
     8.2 Multiple Sessions
     8.3 Printer/Auxiliary Port
     8.4 Pages
     8.5 Character-Sets
     8.6 Fonts
     8.7 Keyboards & Special Keys

  9. Terminal Emulation; the Console

     9.1 Intro to Terminal Emulation
     9.2 Don't Use TERM For Emulation
     9.3 Communication (Dialing) programs
        9.3.1 Emulation under X-Windows
        9.3.2 Real Terminals Better
     9.4 Testing Terminal Emulation
     9.5 The Linux Console
     9.6 Emulation Software
        9.6.1 Make a Linux PC a terminal
        9.6.2 Make a non-Linux PC a terminal

  10. Flow Control (Handshaking)

     10.1 Why Is Flow Control Needed ?
     10.2 Padding
     10.3 Overrunning a Serial Port
     10.4 Stop Sending
     10.5 Keyboard Lock
     10.6 Resume Sending
     10.7 Hardware Flow Control (RTS/CTS etc.)
        10.7.1 RTS/CTS, DTR, and DTR/DSR Flow Control
        10.7.2 Connecting Up DTR or DTR/DSR Flow Control
        10.7.3 Old RTS/CTS Handshaking Is Different
        10.7.4 Reverse Channel
     10.8 Is Hardware Flow Control Done by Hardware ?
     10.9 Obsolete ?? ETX/ACK or ENQ/ACK Flow Control

  11. Physical Connection

     11.1 Multiport I/O Cards (Adapters)
     11.2 Direct Cable Connection.
        11.2.1 Null Modem Cable Pin-out (3, 4, or 5 conductor)
        11.2.2 Standard Null Modem Cable Pin-out (7 conductor)
        11.2.3 Length Limitations
        11.2.4 Hardware Flow Control Cables
        11.2.5 Cable Tips
        11.2.6 A Kludge using Twisted-Pair Cable
        11.2.7 Cable Grounding
     11.3 Modem Connection
        11.3.1 Dialing Out From a Terminal
        11.3.2 Terminal Gets Dialed Into
     11.4 Terminal Server Connection
     11.5 Connector and Adapter Types
        11.5.1 Sex of Connector/Adapters
        11.5.2 Types of Adapters
        11.5.3 DB Connectors
        11.5.4 RJ Modular Connectors
     11.6 Making or Modifying a Cable
        11.6.1 Buy or Make ?
        11.6.2 Pin Numbers
        11.6.3 Installing DB Connectors on Cable Ends
        11.6.4 Installing RJ Connectors

  12. Set-Up (Configure) in General

     12.1 Intro to Set-Up
     12.2 Terminal Set-Up (Configure) Overview
     12.3 Computer Set-Up (Configure) Overview
     12.4 Many Options
     12.5 Communication Interface Options
        12.5.1 Speed
        12.5.2 Parity & Should You Use It ?
        12.5.3 Bits/Character
        12.5.4 Which Flow Control (Handshaking) ?
        12.5.5 Port Select
     12.6 Quick Attempt

  13. Terminal Set-Up (Configure) Details

     13.1 Send Escape Sequences to the Terminal
     13.2 Older Terminals Set-Up
     13.3 Getting Into Set-Up (Configuration) Mode
     13.4 Communication Options
     13.5 Saving the Set-up
     13.6 Set-Up Options/Parameters
     13.7 Emulation {Personality} {{Terminal Modes}}
     13.8 Display Options
        13.8.1 Character Cell Size {Char Cell}
        13.8.2 Columns/Lines
        13.8.3 Cursor
        13.8.4 Display Attributes (Magic Cookies)
        13.8.5 Display Control Characters {Monitor}
        13.8.6 Double Width/Height
        13.8.7 Reverse Video {Display} (Background Light/Dark)
        13.8.8 Status Line
        13.8.9 Upon 80/132 Change: Clear or Preserve?
     13.9 Page Related Options
        13.9.1 Page Size
        13.9.2 Coupling (of cursor & display)
     13.10 Reporting and Answerback
        13.10.1 Answerback Message (String)
        13.10.2 Auto Answerback
        13.10.3 Answerback Concealed
        13.10.4 Terminal ID {ANSI ID}
     13.11 Keyboard Options
        13.11.1 Keyclick
        13.11.2 Caps Lock {Keylock}
        13.11.3 Auto Repeat {Repeat}
        13.11.4 Margin Bell
        13.11.5 Remapping the Keys
        13.11.6 Corner Key (for Wyse only)
        13.11.7 Numeric Keypad or Arrow Keys Sends
        13.11.8 What does shifted-del and shifted-bs send?
        13.11.9 PC Scan Codes
        13.11.10 Alternate Characters
     13.12 Meaning of Received Control Codes
        13.12.1 Auto New Line {Newline}
        13.12.2 Auto Line Feed {Rcv CR}
        13.12.3 Recognize Del (Wyse Only ??) or Null
     13.13 Where New Text Goes
        13.13.1 Line Wrap
        13.13.2 Scrolling
        13.13.3 New Page?
     13.14 Function Keys
     13.15 Block Mode Options
        13.15.1 Forms Display
        13.15.2 Send Entire Block ?
        13.15.3 Region to Send
        13.15.4 Block/Page terminator
     13.16 Locks
     13.17 Screen Saver {Scrn Saver}
     13.18 Printer
  14. Computer Set-Up (Configure) Details

     14.1 Getty (in /etc/inittab)
        14.1.1 Agetty (may be named getty)
           14.1.1.1 Agetty's detection of parity
           14.1.1.2 Agetty's parity with 8-bit data bytes
        14.1.2 getty (part of getty_ps)
        14.1.3 mgetty
     14.2 Stty & Setserial
     14.3 Setserial
        14.3.1 Introduction
        14.3.2 Probing
        14.3.3 Boot-time Configuration
        14.3.4 Configuration Scripts/Files
        14.3.5 Edit a script (after version 2.15: perhaps not)
        14.3.6 New configuration method using /etc/serial.conf
        14.3.7 IRQs
     14.4 Stty
        14.4.1 Introduction
        14.4.2 Using stty for a "foreign" terminal
           14.4.2.1 Old redirection method
        14.4.3 Two interfaces at a terminal
        14.4.4 Where to put the stty command ?
     14.5 Terminfo & Termcap (brief)
     14.6 Setting TERM and TERMINFO
        14.6.1 What is the terminfo name of my terminal ?
     14.7 Rarely Needed /etc/ttytype File
     14.8 Login Restrictions
     14.9 Run Command Only If TERM=my_term_type
        14.9.1 Example for ls Function

  15. Terminfo and Termcap (detailed)

     15.1 Intro to Terminfo
     15.2 Terminfo Database
        15.2.1 Introduction
        15.2.2 Where is the database located ?
           15.2.2.1 Compiled database locations
           15.2.2.2 Source-code database locations
        15.2.3 Terminfo Compiler (tic)
        15.2.4 Look at Your Terminfo
        15.2.5 Deleting Data Not Needed
     15.3 Bugs in Existing Terminfo Files (and Hardware)
     15.4 Modifying Terminfo Files
     15.5 Init String
     15.6 TERM Variable
     15.7 Terminfo/Termcap Documents

  16. Using the Terminal

     16.1 Intro to Using Terminal
     16.2 Starting Up the Terminal
     16.3 Terminal (Serial) Device Driver
     16.4 Problems with Editors
        16.4.1 emacs and ^S, ^Q
        16.4.2 vi and Cursor-Keys
     16.5 Color ls Corruption
     16.6 Display Freezes (hung terminal)
     16.7 Corrupted Terminal Interface
        16.7.1 Symptoms and Some Fixes
        16.7.2 Sent Terminal Binary Characters
        16.7.3 Abnormally Exited a Program
     16.8 Special (Control) Characters
        16.8.1 Command-Line Editing
        16.8.2 Interrupting (& Quit, Suspend, EOF, Flush)
        16.8.3 Stop/Start Scrolling
        16.8.4 Take Next Character Literally
     16.9 Viewing Latin-1 Files on a 7-bit Terminal
     16.10 Inspecting the Interface
     16.11 Changing the Terminal Settings
        16.11.1 setterm
        16.11.2 tput
        16.11.3 echo
        16.11.4 Saving Changes
     16.12 Make a Terminal the Console
        16.12.1 For Kernels 2.2 or higher
        16.12.2 For Kernels before 2.2
        16.12.3 Can I Run Linux without a Monitor (PC Console) ?
     16.13 Multiple Sessions
     16.14 Logging Out
     16.15 Chatting between Terminals, Spying
     16.16 Sharing the Serial Port

  17. Trouble-Shooting (software)

     17.1 Terminal Was Working OK
     17.2 Terminal Newly Installed
     17.3 Is the Terminal OK ?
     17.4 Missing Text
     17.5 Getty Respawning Too Rapidly
        17.5.1 Serial Module Not Loaded
        17.5.2 No Modem Control Voltage
        17.5.3 Key Shorted
     17.6 Fails Just After Login
     17.7 Can't Login
     17.8 Garbled Login Prompt
     17.9 No Sign of any Login Prompt
        17.9.1 Diagnose Problem from the Console
        17.9.2 Measure Voltages
     17.10 Slow: pauses of several seconds between bursts of characters
     17.11 Terminal doesn't scroll
     17.12 Serial Monitoring/Diagnostics
     17.13 Local Mode
     17.14 Serial Electrical Test Equipment
        17.14.1 Breakout Gadgets, etc.
        17.14.2 Measuring Voltages
        17.14.3 Taste Voltage

  18. Repair & Diagnose

     18.1 Repair Books & Websites
        18.1.1 Books
        18.1.2 Websites
     18.2 Safety
     18.3 Appearance of Display
     18.4 Diagnose
        18.4.1 Terminal Made a Noise
        18.4.2 Terminal Made No Noise
     18.5 Error Messages on the Screen
        18.5.1 Keyboard Error
        18.5.2 Checksum Error in NVR
     18.6 Capacitors
     18.7 Keyboards
        18.7.1 Interchangeability
        18.7.2 How They Work
        18.7.3 One Press Types 2 Different Characters
        18.7.4 Modern vs Old Keyboards
        18.7.5 Keyboard Doesn't Work At All
        18.7.6 Typing b Displays bb, etc. (doubled)
        18.7.7 The Keyboard Types By Itself
        18.7.8 Liquid Spilled on the Keyboard
        18.7.9 Cleaning Keyboard Contacts
           18.7.9.1 Keyboards with Membranes
           18.7.9.2 Keyboards with Individual Switches

  19. Appendix A: General

     19.1 List of Linux Terminal Commands
        19.1.1 Sending a Command to the Terminal
        19.1.2 Configuring the Terminal Device Driver
        19.1.3 Terminfo
        19.1.4 Other
     19.2 The Internet and Books
        19.2.1 Terminal Info on the Internet
        19.2.2 Books Related to Terminals
        19.2.3 Entire Books on Terminals
        19.2.4 Books with Chapters on Terminals
     19.3 Non-Linux OS's

  20. Appendix B: Escape Sequence Commands Terminology

     20.1 Esc Sequence List
     20.2 8-bit Control Codes
     20.3 Printer Esc
     20.4 Reports
     20.5 Cursor Movements
     20.6 Pages (definition)

  21. Appendix C: Serial Communications on EIA-232 (RS-232)

     21.1 Intro to Serial Communication
     21.2 Voltages
        21.2.1 Voltage for a Bit
        21.2.2 Voltage Sequence for a Byte
     21.3 Parity Explained
     21.4 Forming a Byte (Framing)
     21.5 Limitations of EIA-232
        21.5.1 Low Speed & Short Distance
        21.5.2 Successors to EIA-232
        21.5.3 Line Drivers
     21.6 Synchronization & Synchronous
        21.6.1 How "Asynchronous" is Synchronized
        21.6.2 Defining Asynchronous vs Synchronous
        21.6.3 Synchronous Communication
     21.7 Block Mode
        21.7.1 Intro to Block Mode
        21.7.2 Types of Block Modes, Forms
        21.7.3 Efficiency
     21.8 EIA-232 (RS-232) Books
     21.9 Serial Software

  22. Appendix D: Notes by Brand Name

     22.1 CIT
     22.2 IBM Terminals
        22.2.1 IBM 3153
     22.3 Teletypes
     22.4 VT (DEC)
     22.5 Wyse
        22.5.1 Wyse 60
        22.5.2 Wyse 85
        22.5.3 Wyse 99-GT
        22.5.4 Wyse 150


  ______________________________________________________________________


  1.  Introduction

  For a quick attempt to install a terminal see ``Quick Install''.


  1.1.  Copyright, Trademarks, Disclaimer, & Credits

  1.1.1.  Copyright

  Copyright 1998-2000 by David S. Lawyer. <mailto:dave@lafn.org>

  Please freely copy and distribute (sell or give away) this document in
  any format.  Forward any corrections and comments to the document
  maintainer.  You may create a derivative work and distribute it
  provided that you:


  1. Send your derivative work (in the most suitable format such as
     sgml) to the LDP (Linux Documentation Project) or the like for
     posting on the Internet.  If not the LDP, then let the LDP know
     where it is available.  Except for a translation, send a copy to
     the previous maintainer's url as shown in the latest version.

  2. License the derivative work in the spirit of this license or use
     GPL.  Include a copyright notice and at least a pointer to the
     license used.

  3. Give due credit to previous authors and major contributors.

  If you're considering making a derived work other than a translation,
  it's requested that you discuss your plans with the current
  maintainer.


  1.1.2.  Disclaimer

  While I haven't intentionally tried to mislead you, there are likely a
  number of errors in this document.  Please let me know about them.
  Since this is free documentation, it should be obvious that I cannot
  be held legally responsible for any errors.


  1.1.3.  Trademarks.

  Any brand names (starts with a capital letter) should be assumed to be
  a trademark).  Such trademarks belong to their respective owners.



  1.1.4.  Credits

  Much of the section "Physical Connection" is from Serial-HOWTO v.
  1.11 by Greg Hankins (with his permission).  His "How Do I Set Up A
  Terminal Connected To My PC?" was incorporated into v1.00 at various
  places.  v1.09 has about 25 changes (and error corrections) suggested
  by Alessandro Rubini who reviewed this HOWTO.


  1.2.  Future Plans: You Can Help

  Please let me know of any errors in facts, opinions, logic, spelling,
  grammar, clarity, links, etc.  But first, if the date is over a few
  months old, check to see that you have the latest version.  Please
  send me any info that you think belongs in this document.


  Starting with version 1.00, a first attempt was made to help people
  set up terminals without recourse to a terminal manual.  Much more is
  needed in this respect.  One way to solve this problem would be if
  terminal manufacturers put their manuals on the Internet.  I suggest
  that you encourage them to do so.  The task of providing information
  on how to configure most terminals in this HOWTO is daunting.  There
  are so many different terminals, but there are far fewer models than
  there used to be in the 1980,s so the task is not totally infeasible.

  Please send me any surplus terminal manuals which you may have,
  especially on terminals made within the past 10 years (but I'll accept
  older ones also).  Also, you might want to write up something on a
  certain terminal to put in the Appendix D: Notes by Brand Name.


  1.3.  New Versions of this HOWTO

  New versions of the Text-Terminal-HOWTO will be available to browse
  and/or download at LDP mirror sites.  For a list of mirror sites see:
  <http://linuxdoc.org/mirrors.html>.  Various formats are available.
  If you only want to quickly check the date of the latest version look
  at  <http://linuxdoc.org/HOWTO/Text-Terminal-HOWTO.html>.  The version
  your are currently reading is: v1.13, June 2000 .  New in this version
  is: killing getty permanently, reset bug+, man lilo. .


  1.4.  Related HOWTO's

  Go to the websites shown above to get these.

    Serial-HOWTO has info on Multiport Serial Cards used for both
     terminals and banks of modems.  It has general technical info on
     the serial port including troubleshooting it.

    Modem-HOWTO

    Serial-Programming-HOWTO

    NCD-X-Terminal mini-HOWTO

    Xterminal-HOWTO (unmaintained).  It's at
     <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/unmaintained/mini/Xterminal>


  1.5.  Terminology Used in this Document

  Configuration means the same as set-up.  While Linux commands take
  options (using - symbols), options in a broader sense include various
  other types of choices.  Install in the broad sense includes setting
  up (configuring) software and hardware.  A statement that I suspect is
  true (but may not be) ends with 2 question marks: ??  If you know for
  sure, let me know.


  1.6.  What is a Terminal ?

  A terminal consists of a screen and keyboard that one uses to
  communicate remotely with a (host) computer.  One uses it just like it
  was a personal computer but the terminal is remote from its host
  computer (on the other side of the room or even on the other side of
  the world).  Programs execute on the host computer but the results
  display on the terminal screen.  Its computational ability is
  relatively low (otherwise it would be a computer and not a terminal).
  This computational ability is generally limited to the ability to
  display what is sent to it (possibly including full-screen graphics)
  and the ability to send to the host what is typed at the keyboard.
  In the days of mainframes from the mid 1970's to the mid 1980's, most
  people used terminals to communicate with computers.  They typed in
  programs, ran programs, wrote documents, issued printing commands,
  etc.  A cable connected the terminal to the computer (often
  indirectly).  It was called a terminal since it was located at the
  terminal end of this cable.

  If you've been using Linux (except for X-Window use) with a computer
  monitor and keyboard you already know what a terminal is because you
  have been using one (or more precisely a "virtual terminal").  The
  monitor (along with the keyboard) is emulating a terminal.  In X-
  Windows the programs xterm, rxvt, and zterm emulate terminals.

  A real terminal is different from a monitor because it's a different
  electronic setup.  A text terminal is often connected to a serial port
  of the computer via a long cable.  Thus, in contrast to a monitor
  which is usually located right next to the computer, a terminal may be
  quite a distance away from its host computer.  The video card inside a
  computer stores the video image seen on the monitor screen.  For a
  terminal, the equivalent of this video card is built right into the
  terminal but since text terminals are often monochrome without much
  graphics, the capabilities of its "video card" are rather weak.  Also,
  most text terminals do not have mice.

  In network client-server terminology, one might think that the
  terminal is the client and that the host computer is the server.  The
  terminal has been called a "thin client" by some.  But it is not
  actually a "client" nor is the host a "server".  The only "service"
  the host provides is to receive every letter typed at the keyboard and
  react to this just like a computer would.  The terminal is like a
  window into the computer just like a monitor (and keyboard) are.  You
  may have already used virtual terminals in Linux (by pressing Left
  Alt-F2, etc.).  A real terminal is just like running such a virtual
  terminal but you run it on its own terminal screen instead of having
  to share the monitor screen.  In contrast to using a virtual terminal
  at the console (monitor), this allows another person to sit at the
  real terminal and use the computer simultaneously with others.


  2.  Types of Terminals

  2.1.  Dumb Terminals

  There are various conflicting definitions of "dumb terminal" but as
  time goes by, more and more terminals are called dumb.  This document
  mainly covers text terminals which display only text on the screen.
  It might be titled "Dumb-Terminal-HOWTO" but in some magazines
  articles any terminal, no matter how smart, including ones which
  present a full graphical user interface (GUI), are called dumb.  If
  all terminals are "dumb" then there is no point of prefixing the word
  "dumb" to terminal (except as a sales pitch to sell computers or the
  like in place of "smart" terminals).  Due to the ambiguous meaning of
  "dumb terminal" it is not classified here as a type of terminal.


  2.2.  Text Terminals

  For a text terminal, a 2-way flow of information between the computer
  and the terminal takes place over the cable that connects them
  together.  This flow is in ASCII bytes where each byte usually
  represents a character.  Bytes typed at the keyboard go to the
  computer and most bytes from the computer are displayed on the
  terminal screen.  Special bytes (or sequences of bytes) from the
  computer tell the terminal where to move the cursor to, what to erase,
  where to begin and end underlining and/or blinking and/or bold, etc.
  There are often hundreds of such special commands and many terminals
  can even change fonts.

  The communication uses characters (letters) encoded using a code chart
  for the character set being used.  Usually, the first 128 bytes out of
  256 possible bytes use ASCII codes.  Terminals for Unix-like systems,
  normally connect to computers via a cable running between the
  asynchronous serial ports (RS-232-C = EIA-232-D) of the host computer
  and terminal.  Sometimes the connection is via modem or terminal
  server, etc.

  Other names for text terminals are "serial terminal", "character-cell
  terminal", "ASCII/ANSI terminal", "asynchronous terminal", "data
  terminal", "video terminal" and "video display terminal" (VDT).  In
  olden days "video display unit" (VDU) was used for terminals but
  strictly speaking, it excludes the keyboard.

  "Block mode" was used exclusively by old IBM mainframe terminals but
  many modern terminals also have this capability (which is not used
  much).  The characters you type are temporarily retained in the
  terminal memory (and may possibly be edited by a built-in editor at
  the terminal).  Then when the send key (or the like) is pressed, a
  block of characters (sometimes just a line of characters) is sent to
  the computer all at once.  Block mode (as of late 1998) is not
  supported by Linux.  See section ``Block Mode''.


  2.3.  Graphics Terminals

  To a limited degree some ASCII symbols can provide graphics on text
  terminals.  One may form  arrows <--- and draw boxes with _ and |.
  With special graphic character sets, even more is possible.  None of
  these are really graphics terminals.  However, the term "graphics
  terminal" is sometimes applied to all text-only terminals since text
  is a limited form of graphics.

  There are two basic types of graphics displays: raster and vector
  (rarely used).  Raster graphics (bit-mapped) puts dots on the screen
  by horizontal scan lines drawn by an electron beam (or by activating
  pixels or dots on a flat screen).  Vector graphic displays are usually
  for monochrome screens that don't have any dots.  They use smart
  electronics to draw lines and curves with an electron beam that can
  move in any direction (at any angle and location).  Vector graphics
  draws high quality lines without zig-zags but is both rare and
  expensive.  Raster graphics is almost universally used today.  For
  PC's, images encoded in vector graphic format are sometimes used but
  they are translated to raster graphics format for display (with a drop
  in image quality).


  2.3.1.  Serial Line Graphics Terminals

  Most of this document also applies to these.  Most of these can also
  function as text terminals.  The protocols for such graphics include:
  Tektronix Vector Graphics, ReGIS (DEC), Sixel (DEC), and NAPLPS (North
  American Presentation Level Protocol Syntax).


  2.3.2.  Fast Graphics Terminals (often known by other names)

  None of these covered in this document.  A terminal that deserves to
  be called smart is a graphics terminal which can rapidly display full-
  screen graphics just like a PC monitor.  It will also have a mouse.
  Bytes sent to it often represent bit-maps for pictures (and other
  graphics).  It will often use a high-speed connection to its host
  computer using twisted pair or coax cable.  X-Window terminals are
  such devices.  See the link to Xterminal-HOWTO at ``Related HOWTO's''
  For displaying a MS-Windows GUI there are at various types of
  interfaces and terminals: Winterm using WinFrame software from Citrix
  is one.  Another (based in part on Citrix's code) is Hydra (code name)
  by Microsoft, also known as "Windows Terminal Server" which works with
  versions 4 or higher of MS Windows NT.  Citrix uses its ICA protocol
  and has created an add-on to Hydra known as pICAsso so that WinFrame
  (ICA) based terminals can use the Hydra system.  Hydra is also multi-
  user.  There is also the "MultiConsole Personal Terminal" by Unbounded
  Technologies and Tektronix had its own multi-user interface but will
  now support Hydra.  A magazine article in 1997 called Winterm a "dumb
  terminal" but it's really pretty smart.  Such terminals are often
  called "thin clients", but some thin clients are more that just
  terminals as they can execute Java code sent to them, etc.


  2.4.  Network Computers (NCs)

  These are neither true computers nor terminals but are something in-
  between.  One type of network computer (NC's) is a computer with a CPU
  but no hard Disk.  They are full-graphics and connect to a server
  computer.  They are different from terminals since the programs they
  run execute on their own CPU chips.  Java code may be sent to them for
  execution.  IBM calls this a "Network Station".  They should work on
  IP networks and might work under a server running Linux.  Wintel
  established a "NetPC" which, unlike the above, is almost a PC
  computer.  However, it has no removable disks so users can't install
  their own software or obtain copies of anything.  For using the Sun
  JavaStation NC under Linux see the JavaStation-HOWTO released in Apr.
  24, 2000.

  Although the promoters of NCs and related Window-Terminals projected
  that they would replace millions of PCs, it hasn't yet happened.  A
  major reason is that PCs have come down in price in recent years so
  that they are often even cheaper than NCs, etc.  Thus for terminals,
  the Text-Terminal still predominates.


  2.5.  Emulation on a PC

  Since a PC has a screen and keyboard (as does a terminal) but also has
  much more computing power, it's easy to use some of this computing
  power to make the PC computer behave like a text terminal.  This is
  called "terminal emulation".  They usually emulate text-terminals.
  See ``Terminal Emulation''


  3.  Quick Install

  This is a quick procedure to install a terminal without going through
  a ``Setup'' procedure for both the terminal and the host computer.  It
  probably will not work right if the terminal happens to have been set
  up incompatible with the computer.  If you don't understand some of it
  you'll need to consult other parts of this document for more info.

  To install a terminal, first look in /etc/termcap or terminfo.src to
  find an entry for it (see ``Terminfo and Termcap (detailed)'').
  Figure out what serial port you'll connect it to and what the tty
  designation is for that port (e.g. ttyS1, see ``Device Names'').  As
  the root user, edit /etc/inittab and add a getty command next to the
  other getty commands.  The format of the getty command depends on
  which getty program you use.  agetty (called just getty in the Debian
  distribution) is the easiest (no configuration file).  See the "info"
  or "man re getty.  For getty parameters use the terminfo (or termcap)
  name (such as vt100) for your terminal.  Type in a baud-rate that the
  terminal supports.  But if you set the baud too high you may need to
  use (See``Flow Control'').
  Then physically connect the main serial port of the terminal to the
  chosen serial port of the computer with a null-modem cable and turn on
  the terminal.  Don't expect most ready-made cables to be wired
  correctly for hardware flow control.  Make sure the baud-rate of the
  terminal is set the same as you gave to getty and that its "data bits"
  is 8.  Then at the computer console type "init q" to apply the changes
  you made to the inittab file.  You should now see a login prompt at
  the terminal.  If you don't, tap the terminal's return key.  If this
  doesn't work read more of this document and/or see ``Trouble-
  Shooting''.


  4.  Why Use a Terminal ?

  4.1.  Intro to Why Use a Terminal

  PC's are so powerful today that just one PC can often support several
  persons using it at once, especially if they are doing low-load tasks
  such as text editing, data entry, etc.  One way to do this is to
  connect a number of terminals to a single PC (or other host computer)
  by modems or direct cable connection.  To do this, it's usually best
  to have a multi-user operating system such as Linux so that each user
  at a terminal can use the computer independently.  This has been
  called "time sharing" but it's not good terminology today since
  "distributed" computing over a network is also a type of time sharing.
  It might be better described as "centralized" computing.  But the
  central computer may be connected to the rest of the world via a
  network so that terminal users may send email, browse the Internet
  with the "lynx" browser, etc.  So it's not exactly "centralized"
  either.

  Terminals have seldom been used with PC's because the popular
  operating systems used for them (Windows, DOS, and Mac) were not
  multiuser until 1998 (available for MS Windows NT) and previously
  could not support terminals very well.  Now that Linux, a multiuser
  operating system, is freely available for PC's, the use of terminals
  with PC's becomes more feasible.  The drawback is that text terminals
  are not smart enough to support the type of graphical user interface
  (GUI) that many computer users today normally expect.


  4.2.  Lower Hardware Costs ?

  When Computers (including PCs) were quite expensive, lower hardware
  costs was a significant advantage of using terminals.  Today with
  cheap PCs, the cost savings is problematical.  Here's what I wrote
  years ago when PCs were more expensive.  It's still true today but of
  less significance.

  If several people use the same computer as the same time, there is a
  reduction in the amount of hardware needed for the same level of
  service.  One type of savings is due to code sharing.  The application
  files on hard disks are shared as well as shared libraries in memory
  (even when people are running different programs provided they use
  some of the same functions in their code).  Another type of savings is
  due to reduction of peak load.  The hardware of a single PC may be
  idle most of the time as people slowly type in information, think,
  talk, or are away from their desks.  Having several people on the same
  computer at once makes good use of much of this idle time which would
  otherwise be wasted.

  These savings are substantial.  One may roughly estimate (using
  statistical theory) that for 9 persons (8 terminals & 1 console) the
  shared PC only needs only about 3 times as much capacity (in memory,
  disk storage, CPU power, etc.) as a single PC in order to provide the
  same level of service per person.  Thus the computational hardware for
  such a shared system should only cost about 1/3 as much per user.
  However, the cost of the display hardware (CRT's, keyboards, video
  electronics, etc.) is about the same for both cases.  The terminals
  have the added cost of requiring additional serial ports at the host
  computer.

  For a fair comparison with PC's, the terminals should have the same
  capabilities as the PC monitors.  Unfortunately, color graphic
  terminals for Linux (X-windows) with high speed communication is a
  niche market with high prices so in this case there is not likely to
  be any savings in hardware costs.  But for text terminals there will
  be some savings, especially if the terminals are obtained used at low
  cost.


  4.3.  Control of Software

  For centralized computing, software (and the updates to software) only
  need be installed and configured on one host computer instead of
  several.  The person in charge of this computer may control and
  configure the software which is installed on it.  This is advantageous
  if the person controlling the host computer does an excellent job and
  knows about the needs and preferences of the other users.  Users can
  be restricted in playing games or surfing the Internet by not
  installing the software (or by otherwise restricting access to it).
  Whether or not centralized control is desirable depends on the
  situation.


  4.4.  Hardware Upgrades

  With terminals, the computer hardware upgrades take place on only one
  computer instead of many.  This saves installation labor effort.
  While the cost of the hardware for the host computer upgrade will be
  more than that for a single PC (since the host needs more computing
  power than a PC), the cost will be significantly less than upgrading
  the hardware of a number of PC's being used instead of terminals.


  4.5.  Other Advantages of Terminals



    The elimination of noise from fans and disk drives provided the
     terminals are not close to the computer.

    The users of the terminals can share data and files and send e-mail
     to each other.  It's similar to a local network.


  4.6.  Major Disadvantages of Terminals



    Text terminals have no high-speed graphic display (or high
     resolution graphics) although they can often use graphic character
     sets to draw boxes, etc.  This lack limits the software that may be
     used on it.

    If the host computer goes down, then no one can use the terminals
     either (unless there is a "standby" host computer to connect to).



  4.7.  Are Text Terminals Obsolete ?

  Text terminals are technologically obsolete because for a slightly
  higher cost of hardware, one could build a smart terminal (with the
  same quality of display).  This wasn't always the case since around
  1980 memory cost thousands of dollars per megabyte.  Today with low
  costs for memory and processors, one could make a text terminal smart
  for only about a 10% or 20% increase in hardware cost.

  The reasons that text terminals are not yet obsolete are:

    There is no satisfactory standard interface for smart graphics
     terminals.  The MS Hydra system is for MS Windows NT, while X-
     Windows is not as efficient as it should be (and X-Windows
     terminals are too costly).

    Many people don't need full screen graphics.

    Text terminals are low in cost and allegedly take longer to become
     obsolete, yet can give access to a much newer (and powerful)
     computer.

    Since running a text-terminal (in contrast to a full-graphics
     terminal) doesn't consume much of a modern PC's resources, a large
     number of terminals may be efficiently run from one PC.


  5.  Overview of How Terminals Work (in Linux)

  See also section ``Some Details on How Terminals Work''


  5.1.  Device Names

  Each terminal is connected to a serial port on the host computer
  (often just a PC).  The ports have names: ttyS0, ttyS1, ttyS2 etc.
  These are represented by special files found in the /dev (device)
  directory.  /dev/ttyS0 corresponds to COM1 in DOS or Windows.  ttyS1
  is COM2, etc.  See ``Terminal Special Files'' for details on these and
  related "devices" such as cua.


  5.2.  Login/Logout

  When the host computer starts up it runs the program getty.  The getty
  program runs the "login" program to log people in.  See ``Getty (in
  /etc/inittab)''.  A "login:" prompt appears on the screen.  People at
  the terminals log in (after giving their passwords) and then have
  access to the computer.  When it's time to shut the terminal down, one
  normally logs out and turns the terminal off.  See ``Login
  Restrictions'' regarding restricting logins (including allowing the
  root user to log in at terminal).


  5.3.  Half/Full Duplex

  If one watches someone typing at a terminal, the letters one types
  simultaneously appear on the screen.  A naive person might think that
  what one types is being sent directly from the keyboard to the screen
  with a copy going to the computer (half-duplex like, see next
  paragraph).  What is usually going on is that what is typed at the
  keyboard is directly sent only to the host computer which in turn
  echoes back to the terminal each character it receives (called full-
  duplex).  In some cases (such as passwords or terse editor commands)
  the typed letters are not echoed back.

  Full-duplex means that there are two (dual) one-way communication
  links.  Full-duplex is the norm for terminals.  Half-duplex is half of
  a duplex, meaning that there is only a single one-way communication
  link.  This link must be shared by communications going in both
  directions and only one direction may be used at a time.  In this case
  the computer would not be able to echo the characters you type (and
  send to it) so the terminal would need to also send each character you
  type directly to the terminal screen.  Some terminals have a half-
  duplex mode of operation which is seldom used.


  5.4.  Terminal Memory

  The image on a CRT tube will fade away almost instantly unless it is
  frequently redrawn on the screen by a beam of electrons shot onto the
  face of the tube.  Since text sent to a terminal needs to stay on the
  screen, the image on the screen must be stored in the memory chips of
  the terminal and the electron beam must repeatedly scan the screen
  (say 60 times per second) to maintain the image.  See ``Terminal
  Memory Details'' for more details.


  5.5.  Commands for the Terminal

  The terminal is under the control of the computer.  The computer not
  only sends the terminal text to display on the screen but also sends
  the terminal commands which are acted on.  These are ``Control Codes''
  (bytes) and ``escape sequences''.  For example, the CR (carriage
  return) control code moves the cursor the the left hand edge of the
  screen.  A certain escape sequence (several bytes where the first byte
  is the "escape" control code) can move the cursor to the location on
  the screen specified by parameters placed inside the escape sequence.

  The ``first terminals'' had only a few such commands but modern
  terminals have hundreds of them.  The appearance of the display may be
  changed for certain regions: such as bright, dim, underline, blink,
  and reverse video.   A speaker in a terminal can "click" when any key
  is pressed or beep if a mistake has occurred.  Function keys may be
  programmed for special meanings.  Various fonts may exist.  The
  display may be scrolled up or down.  Specified parts of the screen may
  be erased.  Various types of flow control may be used to stop the flow
  of data when bytes are being sent to the terminal faster than the
  terminal can handle them.  There are many more as you will see from
  looking over an advanced terminal manual or from the Internet links
  ``Esc Sequence List''


  5.6.  Lack of Standardization Solved by Terminfo

  While terminals made for the US all used the same ASCII code for the
  alphabet (except for IBM terminals which used EBCDIC), they
  unfortunately did not all use the same escape sequences.  This
  happened even after various ANSI (and ISO) standards were established
  since these standards were never quite advanced enough.  Furthermore,
  older terminals often lacked the capabilities of newer terminals.
  This might cause problems.  For example, the computer might send a
  terminal an escape sequence telling it to split the screen up into two
  windows of specified size, not realizing that the terminal was
  incapable of doing this.

  To overcome these problems a database called "termcap" (meaning
  "terminal capabilities") was established.  Termcap was superceded by
  "terminfo".  This database resides in certain files on the computer
  and has a section of it (sometimes an entire file) for each model of
  terminal.  For each model (such as VT100) a list of capabilities is
  provided including a list of certain escape sequences available.  For
  example blink=\E5m means that to make the cursor start blinking the
  terminal must be sent: Escape 5 m.  See Section ``Termcap and Terminfo
  (detailed)'' for more details.  Application programs may utilize this
  database by calling certain C-Library functions.  One large set of
  such programs (over 200) is named "ncurses" and are listed in the
  manual page for "ncurses".


  5.7.  The Interface

  The environment variable TERM is the type of terminal Linux thinks you
  are using.  Some application programs use this to look up the
  capabilities in the terminfo database so TERM needs to be set
  correctly.   But there is more to a correct interface than the
  computer knowing about the capabilities of the terminal.

  For bytes to flow from the computer to the terminal the terminal must
  be set to receive the bytes at the same baud rate (bits per second) as
  they are sent out from the terminal.  If the terminal is set to
  receive at 19,200 baud and the computer sends out characters at 9600
  baud, only garbage (or perhaps nothing) will be seen on the screen.
  One selects the baud rate for a terminal (as well as many other
  features) from the terminals "set-up" menus at the terminal.  Most
  terminals have a large number of options in their "set-up" menus  (see
  ``Terminal Set-Up (Configure) Details'').  The computer serial port
  has options also and these options must be set up in a compatible way
  (see ``Computer Set-Up (Configure) Details''.


  5.8.  Emulation

  Most terminals today have more than one emulation (personality or
  "terminal mode").  The terminal model numbers of terminals formerly
  made by DEC (Digital Equipment Corporation now Compaq) start with VT
  (e.g. VT100).  Many other terminals which are not VT100 may be set up
  to emulate a VT100.  Wyse is a major terminal manufacturer and most of
  their terminals can emulate various DEC terminals such at VT100 and
  VT220.  Thus if you want to, say, use a VT320 terminal you may either
  use a real VT320 in "native" personality or possibly use some other
  terminal capable of emulating a VT320.  The "native" personalities
  usually have more capabilities so, other things being equal, "native"
  is usually the best to use.

  The most common type of emulation is to use a PC like it was a vt100
  terminal (or the like).  Programs loaded into the PC's memory permits
  this.  In Linux (unless you're in X-windows) the PC monitor (called
  the console) emulates a terminal of type "Linux" (close to vt100).
  Even certain windows within X-windows emulate terminals.  See
  ``Terminal Emulation''.


  5.9.  The Console

  On a PC, the monitor is normally the console.  It emulates a terminal
  of type "Linux".  One logs on to it as a virtual terminal.  See ``The
  Console: /dev/tty?''.  It receives messages from the kernel regarding
  booting and shutdown progress.  One may have the messages that
  normally go to the console, go to the terminal.  To get this you must
  manually patch the kernel, except that for kernel 2.2 (or higher) it
  is a "make config" option.  See ``Make a Terminal the Console''.


  6.  Terminal Special Files such as /dev/tty

  "tty" is an abbreviation for "Teletype".  The first terminals were
  Teletypes (like remotely controlled typewriters).  See subsection
  ``Teletypes''.  A list of Linux devices (the stuff in the /dev
  directory) may be found in "Linux Allocated Devices" which should be
  included with kernel sources.  It "describes" what each device used
  for in only a word or two but doesn't tell you how to use them.


  6.1.  Serial Port Terminals

  The computer considers each serial port to be a "device".  It's
  sometimes called a terminal device since at one time terminals were
  the common use for the serial port.  For each such serial port there
  is a special file in the /dev (device) directory.  /dev/ttyS0 is the
  special file for the serial port known as COM1 in the DOS/Windows
  world.  To send text to a terminal you may redirect standard output of
  some command-line command to the appropriate special file.  For
  example typing "echo test > /dev/ttyS1" at the command prompt should
  send the word "test" to the terminal on ttyS1 (COM2) provided you have
  write permission on /dev/ttyS1.  Similarly, typing "cat my_file >
  /dev/ttyS0" will send the contents of the file my_file to COM1
  (ttyS0).

  In addition to ttyS0 (/dev/ttyS0), ttyS1, ttyS2, etc. (the "S" stands
  for Serial port) there is also a "cua" series: cua0, cua1, cua2, etc.
  cua0 is the same port as ttyS0, etc.  The "cu" of cua stands for
  CalloUt.  The ttyS series are Posix compliant while using cua may
  permit the opening of a port that the modem control lines say is not
  ready.  Starting with kernel version 2.2 cua is obsolete and a warning
  message is issued when you attempt to use it (although it still
  works).  For the past few years it has only been included with Linux
  for backwards compatibility.  A programmer can arrange things so that
  ttyS can behave just like cua, so cua is not really needed.


  6.2.  Pseudo Terminals

  Pseudo terminals have no physical connector on the computer.  They are
  used to emulate a serial port.  They have no IO address nor IRQ.  For
  example, if someone connects via telnet to your computer over a
  network, they may wind up connected to the device /dev/ptyp2 (a pseudo
  terminal port).  In X-Windows, the terminal emulator program, xterm
  (or rxvt), uses pseudo terminals.  Ham radio programs under Linux also
  use them.  Using certain application software it is possible to have 2
  or more pseudo terminals attached to the same physical serial port.

  Pseudo terminals come in pairs such as ttyp3 and ptyp3.  The pty... is
  the master or controlling terminal and the tty... is the slave.  ttyq5
  is also a pseudo terminal as is ttysc (c is a hexadecimal digit).
  More precisely, pseudo master terminals are /dev/pty[p-s]N and the
  corresponding slaves are /dev/tty[p-s]N where N is a hexadecimal digit
  0-f.  The slave /dev/ttyp  looks just like a serial port to an
  application program that reads and writes to it.  However the
  application program is really communicating with whatever program is
  writing and reading the corresponding master /dev/pty.  Thus the
  master and slave are really the same "port" but one is used by the
  application program and the other is used by a network program (or the
  like) which supplies (and gets) data to/from the "port".

  Unix98 doesn't use the above but instead uses a "pty master" which is
  /dev/ptmx.  This can supply a pty on demand.  Details on using pseudo
  terminals with other programs are in a few manual pages but a manual
  page devoted to only to pseudo terminals is needed for Linux.  Some
  other unix-like systems have such a page named "pty - pseudo terminal
  driver".



  6.3.  The Controlling Terminal /dev/tty

  /dev/tty stands for the controlling terminal (if any) for the current
  process.  To find out which tty's are attached to which processes use
  the "ps -a" command at the shell prompt (command line).  Look at the
  "tty" column.  For the shell process you're in, /dev/tty is the
  terminal you are now using.  Type "tty" at the shell prompt to see
  what it is (see manual pg. tty(1)).  /dev/tty is something like a link
  to the actually terminal device name with some additional features for
  C-programmers: see the manual page tty(4).


  6.4.  /dev/ttyIN "Terminals"

  N stands for an integer.  One use of these in Linux is with the ISDN
  driver package: isdn4linux.  The ttyIN is something like ttySN.  There
  is also a cuiN  which is something like cuaN.  The ttyI and cui
  emulate modems and may be given modem commands.


  6.5.  The Console: /dev/ttyN

  In Linux the PC monitor is usually called the console and has several
  device special files associated with it: tty0, tty1, tty2, etc.  When
  you log in you are on tty1.  To go to tty2 (on the same screen) For
  tty3 use Left Alt-F3, etc.  These (tty1, tty2, tty3, etc.)  are called
  "virtual terminals".  tty0 is just an alias for the current virtual
  terminal and it's where messages from the system are sent.  Thus
  messages from the system will be seen on the console (monitor)
  regardless of which virtual terminal it is displaying.

  You may log in to different virtual terminals and thus have a few
  different sessions with the computer going on at the same time.  Only
  the system or the root user may write to /dev/tty0 to which
  /dev/console is sometimes linked.  For more info on the console see
  ``The Linux Console''.


  6.6.  Creating a Device with "mknod"

  The /dev directory comes supplied with many device special files.  If
  you need something that's not there you may try to create it with the
  "mknod" command.  See the manual page ttys(4) for how to do this for
  serial ports.  To use mknod you must know the major and minor device
  numbers.  You might be able to infer the numbers you need by using the
  "ls -l" command in the /dev directory.  It will display the major and
  minor numbers of existing special files.


  7.  Some Details on How Terminals Work

  If you know almost nothing about terminals, it's suggested that you
  first read ``Introduction'' and also read ``Overview of How Terminals
  Work''.


  7.1.  Terminal Memory Details

  The terminal screen refreshes itself at perhaps 60 times per second
  from an image stored in the memory of the terminal.  For a PC the
  monitor's image is stored on the video card inside the computer but
  for a terminal, the equivalent of the video card is inside the
  terminal.  For a text terminal the storage of the image uses little
  memory.  Instead of putting every dot (pixel) on the screen into
  memory and requiring the storage of about a quarter-million dots, a
  much more efficient method of storage is used.
  A screen-full of text may be represented inside the terminal memory by
  ASCII bytes, one for each character on the screen.   An entire screen
  only takes about 2K ASCII bytes.  To display these characters, the
  terminal must also know the bit-map (the shape) of each of the almost
  100 printable ASCII characters.  With a bit-map of a character using
  say 15 bytes, only about 1.5K of memory is needed for the bit-maps of
  all the ASCII characters (the font).  This ASCII text and font memory
  is scanned so that the resulting image is put on the screen about 60
  times each second.  This is a form of shared memory where a single
  bit-map of a letter such as the letter e, is shared by all of the many
  letter e's which appear on a screen-full of text.  Low memory
  requirements meant low costs to produce monitors in the early 1980's
  when the cost of memory was several thousand times higher than it is
  today (costing then several dollars per kilobyte).


  7.2.  Early Terminals

  The first terminals were something like remotely controlled
  typewriters which could only "display" (print on paper) the character
  stream sent to them from the computer.  The earliest models were
  called ``Teletypes''.  The name "tty" is just an abbreviation for
  "Teletype".   Early terminals could do a line feed and a carriage
  return just like a typewriter and ring a bell when a bell character
  was received.  Due to the lack of significant capabilities this was
  the first type of terminal to be labeled "dumb".  This type of
  terminal interface (using a terminal type called "dumb") is sometimes
  used today when the computer can't figure out what kind of a terminal
  it is communicating with.


  7.3.  Escape Sequences and Control Codes (intro)

  Terminals have many capabilities some of which are always present and
  some of which require commands from the computer to change or
  activate.  To exercise all these capabilities under the control of the
  computer requires that special codes be established so that the
  computer can tell the terminal what to do.  There are two major type
  of such codes: escape sequences and control codes (control
  characters).  There are many times more escape sequences than control
  codes.


  7.3.1.  Control Codes

  The control codes (or control characters) consist of the first 32
  bytes of the ASCII alphabet.  They include the following: carriage-
  return (cursor to far left), line-feed (cursor down one line),
  backspace, escape-character, tab, and bell.  They do not normally show
  on the screen.  There is usually a command which you may give to your
  terminal which will result in them being displayed when they are
  received by the terminal.  It's called something like "Display
  Controls" or "Monitor".  If you do this then the display may look a
  mess since escape sequences, which all start with the ESC (escape)
  control character, are no longer executed.  Words which should appear
  at the top or bottom of the screen will show up in other locations.
  The escape sequences to reposition the cursor display on the screen
  but the cursor doesn't move to where the escape sequence says.


  7.3.2.  Escape Sequences

  Since there are not nearly enough control codes to do everything (and
  for some reason, not all of them are utilized) many escape sequences
  are used.  They consist of the "escape" (ESC) control character
  followed by a sequence of ordinary characters.  Upon receiving an
  escape character, the terminal examines the characters following it so
  that it may interpret the sequence and carry out the intended command
  from the computer.  Once it recognizes the end of a valid sequence,
  further characters received just display on the screen (unless they
  are control codes or more escape sequences).  Some escape sequences
  may take parameters (or arguments) such as the coordinates on the
  screen to move the cursor to.  The parameters become a part of the
  escape sequence.  An ``Esc Sequence List'' is on the web for some
  terminals, but it's terse.

  A list of the escape sequences for your terminal should be in the
  "programmers manual" for the terminal.  Except for very old terminals,
  there may be two or three hundred such sequences.  If you don't have a
  such manual it's not easy to find them.  Some of the sequences are
  available on the Internet.  One link is ``Esc Sequence List''.  By
  searching the Internet for one sequence (such as ESC[5m) you may come
  across a long list of them.

  Another way to determine some of them is to find the terminfo entry
  (termcap) for the terminal and mentally decode it.  See ``Terminfo and
  Termcap (detailed)'' in this document and/or the ``Termcap Manual'' on
  the Internet.  Unfortunately, the terminfo (termcap) for a terminal
  often does not list all of the escape sequences which the terminal has
  available for use, but fortunately, the most important ones are
  usually there.


  7.4.  Display Attributes & Magic Cookies

  Terminals have various methods of generating character attributes such
  as bold, reverse-video, underlining, etc.  There should be no need for
  the user to worry about how how this is done, except that it creates
  problems for some old terminals and there is sometimes an option for
  this in the set-up menu of newer terminals.

  The magic cookie method is obsolete.  It's the simplest (and worst)
  method of defining attributes: Use a certain byte for the start of an
  attribute and another to end that attribute.  For example, a "start
  underlining" magic cookie byte is placed just before the first word to
  be underlined.  These extra bytes are put into the memory of the
  screen page, just like character bytes that display as characters.
  But this might foul up the count of the number of characters per line
  since non-printable magic cookie characters are intermingled with
  other printable characters.  This sometimes causes problems.

  A better method which uses more memory is to assign an attribute byte
  (or half=byte, etc.) to each displayed character.  This method is used
  by PC video cards (for text) for the common PC monitor.


  8.  Special Features of Some Terminals

  8.1.  Color

  While the common monochrome terminal is not a color terminal it may
  have a fixed "color" display other than white such as green or amber.
  All terminals have black (electron beam turned off = zero brightness).
  A real color terminal can change the color of the text and background
  to many different colors while a monochrome terminal can only change
  the brightness of a fixed color.

  However, changing the brightness, etc. gives a lot of possibilities.
  For example, a black and white (monochrome) terminal can have white,
  grey, and black by varying the brightness.  Some words can be black on
  a light grey background while other are highlighted by black on white.
  In addition there is white on black, underlining, and blinking.
  Color works like the color on a computer monitor or TV screen.  The
  CRT has three colors of dots on it with each color controlled by its
  own electron beam (3 beams).  Monochrome has inherently better
  resolution since it doesn't depend on dots permanently fixed on the
  screen.  For text terminals the only use of color is to differentiate
  text and this advantage is not always worth the cost of worse
  resolution.  Thus monochrome may be better since it also costs less.


  8.2.  Multiple Sessions

  For dual sessions the terminal has two serial ports of equal status.
  Each port is connected to a serial port on a different computer.  Thus
  one may log in to two different computers with each session displaying
  in a split-screen window.   Alternatively, each session may run full-
  screen with a "hot" key (or the like) to switch between sessions.  One
  could also connect to two different serial ports on the same computer
  and log in twice (similar to "virtual terminals" at the console).  The
  program "screen" will make any ordinary terminal (single session)
  connected to a single computer run two or more "sessions".


  8.3.  Printer/Auxiliary Port

  Many terminals have a connector on the rear for such a port.  It may
  be labeled as "Aux" or "Printer", etc.  Some printer ports are for
  parallel printers while others are for serial printers.  If a printer
  is connected to the printer or auxiliary port, then pressing certain
  keys will print the screen.  One may also have everything that
  displays on the screen go also to the printer.  If the port is an
  auxiliary port, one may connect this to another computer and almost
  have dual sessions as above.  However, the video memory inside the
  terminal may not retain both sessions so you may need to refresh the
  screen when switching to the other session.  There will likely not be
  a hot key either but possibly a programmable function key may be
  programmed to do this.  There exists various key combinations and
  escape sequences for controlling such a port.  See ``Printer Esc''.

  There is a program called vtprint which is designed to send a print
  job (text only) to your terminal to be printed on a printer attached
  to the terminal.  It's homepage is  .  It's also included (as of 1998)
  in the Debian distribution of Linux.  xprt (also in Debian) seems to
  do something similar, but only for X-Window terminals ??


  8.4.  Pages

  Many terminals permit the storage of more than one page in their video
  memory.  Sometimes the page size is the same as the screen, but
  sometimes it is larger so that scrolling will reveal unseen parts of a
  page.  So when one looks at a screen, there may be hidden text on the
  same page above or below the display.  In addition, if there is more
  than just one page, there may be hidden text on these other pages.
  One use for pages is on terminals that support dual sessions.  Each
  session may have its own page and one may switch back and forth
  between them.

  Even if you only have a one-page-terminal with the page sized equal to
  what is displayed on the screen, you will still see other pages of a
  file (etc.) as the host sends more data to the terminal.  One
  advantage to having additional pages stored in the terminal memory is
  so that you can jump to them instantly without waiting a second or so
  for them to be transmitted from the host.

  Multiple pages is supported by ncurses.  There is also a commercial
  program called "Multiscreen" which supports multiple pages but
  probably not for Linux ??  Multiscreen is reported to be part of SCO
  and is something like the virtual terminals on a Linux PC console.
  The Linux program "screen" makes it look like you have multiple pages
  but they are stored in the computer and but you can have only one
  page-like window for each running program.


  8.5.  Character-Sets

  A character-set is normally represented by a list (or table or chart)
  of characters along with the byte code assigned to each character.
  The codes for a byte range from 0 to 255 (00 to FF in hexadecimal).
  In MS-DOS, character-set tables are called "code-pages".  You should
  examine such a table if you're not familiar with them.  They are
  sometimes included in printer and terminal manuals but also may be
  found on the Internet.

  ASCII is one of the most common character-sets used on text terminals.
  It is a 7-bit code but can be made into 8-bit if the first bit (high
  order bit) is always set to 0.  Other character-sets are usually
  available (except on very old terminals where the only choice is
  ASCII).  The first half of most character-sets are the conventional
  ASCII characters and the second half (the characters with the high-
  order bit set to 1) belong to a wide variety of character-sets.
  Character sets are often ISO standards.  To get specialized character
  sets on a terminal, you may need to download a soft-font for that
  character-set into the memory of the terminal.

  Besides ASCII, there are some other common character-sets, all 8-bit.
  CP stands for Code Page character sets invented by IBM: CP-437 (DOS
  ECS), CP-850 (Multilingual Latin 1 --not the same as ISO Latin-1),
  ISO-8859-1 (Latin-1), ANSI (derived from Latin-1).  MS Windows uses
  ANSI while the Internet often uses Latin-1.  There are several
  ISO-8859 character sets in addition to Latin-1.  These include Greek
  (-7), Arabic (-6), Eastern European (-2), and a replacement for
  Latin-1 (-15) called Latin-9.  There are many others.  For example,
  KOI8-R is more commonly used for Russian than IS0-8859-5.  Unicode is
  a very large character-set where each character is represented by 2
  bytes instead on just one byte.

  More info re character-sets are:

    Manual pages: ASCII and latin1

    HOWTO's for various languages (likely written in that language).
     See "Cyrillic" for Russian.

    A tutorial on character code issues
     <http://www.hut.fi/~jkorpela/chars.html> Clearly written.

    Languages, Countries and Character Sets
     <http://www.w3.org/International/O-charset-lang.html>

    Languages of the World by Computers ...
     <http://www.threeweb.ad.jp/logos>

    Links re Internationalization
     <http://linux.monnet.ru/books/locale/locale_i.html> A long list of
     links (in Russian but most words in English).

  Once you've found the character set name (or alpha-numeric
  designation) you are interested in, you may search for more info about
  it on the Internet.



  8.6.  Fonts

  Most terminals made after the mid 1980's can accept downloaded soft-
  font.  This means that they can display almost any character set
  provided that you can find the soft-font for it.  If you can't find
  the needed soft-font, you can always create your own.  A free font
  editor for this is called BitFontEdit (written by the author of this
  document) and (in 1998) was at
  Europe:  <http://www.funet.fi/pub/culture/russian/comp/cyril-term/>
  N. America:
  <ftp://cs.utk.edu/pub/shuford/terminal/BitFontEdit.tar.gz>


  8.7.  Keyboards & Special Keys

  Terminal keyboards often have a number of keys that one doesn't find
  on a PC keyboard.  Few (if any) actual terminals will have all of
  these keys and most will have additional keys not listed here.  Some
  have a large number of special purpose keys such as terminals made for
  use with cash registers.  There are often many more key meanings than
  shown here since these keys often have extended meanings when used in
  conjunction with other keys (such as shift and control).


    BREAK sends a very long 0 bit (space = +12 V) of duration 300 to
     700 milliseconds to the host.  The host may interpret this as an
     interrupt if stty has set brkint or ignore it if ignbrk is set.

    NO SCROLL stops the screen from scrolling like ^S does.  Depressing
     it again resumes scrolling.  Uses flow control signals to do this.

    REPEAT if held down with an other key, forces repeated output of
     that other key even if the auto-repeat option is set to off.

    LINE FEED sends the line feed character ^J to the host.  Seldom
     used.

    SET-UP allows the manual configuration of the terminal via menus.
     Sometimes purposely disabled by putting a block under it so it
     can't be pressed down.  Sometimes another key such as shift or
     control must be pressed at the same time. See ``Getting Into Set-Up
     (Configuration) Mode''.

    LOCAL disconnects the terminal from the host.  In local, what one
     types goes directly to the screen.  Useful for testing.

    RETURN is the same as the "enter" key on a PC.  It usually sends a
     carriage return to the host which normally get translated to a new-
     line character by the host's device driver.  On some terminals it
     may be set up to send something else.

    F1, F2, ... or PF1, PF2, ... are function keys which usually may be
     programmed to send out a sequence of bytes (characters).  See
     ``Function Keys''


  9.  Terminal Emulation; the Console

  9.1.  Intro to Terminal Emulation

  Since a PC has a screen and keyboard (as does a terminal) but also has
  much more computing power, it's easy to use some of this computing
  power to make the PC computer behave like a text terminal.  This is
  one type of terminal emulation.  Another type of terminal emulation is
  where you set up a real terminal to emulate another brand/model of
  terminal.  To do this you select the emulation you want (called
  "personality" in Wyse jargon) from the terminal's set-up menu.  This
  section is about the first type of emulation: emulating a terminal on
  a PC.

  Emulation software is available for MS Windows and comes built-in with
  recent versions of MS Windows.  Most Linux free software can only
  emulate a VT100, VT102, or VT100/ANSI.  If you find out about any
  others, let me know.  Since most PC's have color monitors but VT100
  and VT102 were designed for a monochrome monitor, the emulation
  usually adds color capabilities (and a choice of colors).  Sometimes
  the emulation is not 100% perfect but this usually causes few
  problems.  For using a Mac computer to emulate a terminal see the
  mini-howto: Mac-Terminal.


  9.2.  Don't Use TERM For Emulation

  Some have erroneously thought that they could create an emulator at a
  Linux console (monitor) by setting the environment variable TERM to
  the type of terminal they would like to emulate.  This does not work.
  The value of TERM only tells an application program what terminal you
  are using.  This way it doesn't need to interactively ask you this
  question.  If you're at the PC monitor it's a terminal of type "Linux"
  and your can't change this.  So you must set TERM to "Linux".

  If you set it to something else you are fibbing to application
  programs.  As a result they will incorrectly interpret certain escape
  sequences from the console resulting in a corrupted interface.  Since
  the Linux console behaves almost like a vt100 terminal, it could still
  work almost OK if you falsely claimed it was a vt100 (or some other
  terminal which is something like a vt100).  It may seeming work OK
  most of the time but once in a while will make a mistake when editing
  or the like.


  9.3.  Communication (Dialing) programs

  Dialing programs for making a PPP connection to the Internet don't
  normally include any terminal emulation.  But some other modem dialing
  programs (such as minicom or seyon) do.  Using them one may (for
  example) dial up public libraries to use their catalogs and indexes,
  (or even read magazine articles).  They are also useful for testing
  modems.  Seyon is only for use with X-windows and can emulate
  Tektronix 4014 terminals.

  The communication program kermit doesn't do terminal emulation as it
  is merely a semi-transparent pipe between whatever terminal you are on
  and the remote site you are connected to.  Thus if you use kermit on a
  Linux PC the terminal type will be "Linux".  If you have a Wyse60
  connected to your PC and run kermit on that, you will appear as a
  Wyse60 to the remote computer (which may not be able to handle Wyse60
  terminals).  Minicom emulates a VT102 and if you use it on Wyse60
  terminal the Wyse escape sequences will get translated to VT102 escape
  sequences before the data goes out to the modem.  Kermit can't do
  this.

  Emulators exist under DOS such as telix and procomm work just as well.
  The terminal emulated is often the old VT100, VT102, or ANSI (like
  VT100).


  9.3.1.  Emulation under X-Windows

  Xterm (obsolete ??) may be run under X-Windows which can emulate a
  VT102, VT220, or Tektronix 4014.  There is also an xterm emulation
  (although there is no physical terminal named "xterm").   If you don't
  need the Tektronix 4014 emulation (a vector graphics terminal; see
  ``Graphics Terminals'') you may use eterm.  Predecessors to eterm are
  rxvt and xvt.  eterm supports pixmaps.

  For non-Latin alphabets, kterm is for Kanji terminal emulation (or for
  other non-Latin alphabets) while xcin is for Chinese.  There is also
  9term emulation.  This seems to be more than just an emulator as it
  has a built-in editor and scroll-bars.  It was designed for Plan 9, a
  Unix-like operating system from AT&T.


  9.3.2.  Real Terminals Better

  Unless you are using X-Windows with a large display, a real terminal
  is often nicer to use than emulating one.  It usually costs less, has
  better resolution for text, and has no disk drives to make annoying
  noises.


  9.4.  Testing Terminal Emulation

  For the VT series terminals there is a test program: vttest to help
  determine if a terminal behaves correctly like a vt53, vt100, vt102,
  vt220, vt320, vt420 etc.  There is no documentation but it has menus
  and is easy to use.  To compile it run the configure script and then
  type "make".  It may be downloaded from:
  <ftp://ftp.clark/net:/pub/dickey/vttest/>.  An alternate download site
  is:  <http://sunsite.unc.edu/pub/Linux/utils/console/>


  9.5.  The Linux Console

  The console for a PC Linux system is normally the computer monitor.
  It emulates a terminal of type "Linux".  There is no way (unless you
  want to spend weeks rewriting the kernel code) to get it to emulate
  anything else.  Setting the TERM environment variable to type of
  terminal other than "Linux" will not result in emulating that other
  terminal.  It will only result in a corrupted interface since you have
  falsely declared (via the TERM variable) that your "terminal" is of a
  type different from what it is.  See ``Don't Use TERM For Emulation''

  The "Linux" emulation is flexible and has features which go well
  beyond those of the vt102 terminal which it was intended to emulate.
  These include the ability to use custom fonts and easily re-map the
  keyboard (without patching the source code and recompiling the kernel
  as is required for the case of a real terminal).  These extra features
  reside in the console driver software and not in the emulation
  software but the results are like it was part of the emulation.

  Many commands exist (see Keyboard-and-Console-HOWTO) to utilize these
  added features.   Real terminals, which use neither scan codes nor VGA
  cards, unfortunately can't use most of these features.  One may
  recompile Linux to make a terminal receive the messages which normally
  go to the console.  See ``Make a Terminal the Console''.


  9.6.  Emulation Software

  Emulators often don't work quite right so before purchasing software
  you should try to throughly check out what you will get.


  9.6.1.  Make a Linux PC a terminal

  Unless you want to emulate the standard vt100 (or close to it).  There
  doesn't seem to be much free terminal emulation software available for
  Linux.  The free programs minicom and seyon (only for X-windows) can
  emulate a vt100 (or close to it).   Seyon can also emulate a Tektronix
  4014 terminal.

  TERM (non-free from Century Software)
  <http://www.ecc400.com/censoft/termunix.html> can emulate Wyse60, 50;
  VT 220, 102, 100, 52: TV950, 925, 912; PCTERM; ANSI; IBM3101; ADM-1l;
  WANG 2110.  Block mode is available for IBM and Wyse.  It runs on a
  Linux PC.


  9.6.2.  Make a non-Linux PC a terminal

  Emulators exist which run on non-Linux PCs.  They permit you to use a
  non-Linux-PC as a terminal connected to a Linux-PC.  Under DOS there
  is telix and procomm.   Windows comes with "HyperTerminal" (formerly
  simply called "Terminal" in Windows 3.x and DOS).  Competing with this
  is "HyperTerminal Private Edition"
  <http://www/hilgraeve.com/htpe/index.html> which is non-free to
  business.  It can emulate vt-220.  Turbosoft's (Australia) TTWin
  <http://www.turbosoft.com.au/> can emulate over 80 different terminals
  under Windows.

  For the Mac Computer there is emulation by Carnation Software
  <http://www.webcom.com/carn/carnation/panel-default.html>

  One place to check terminal emulation products is Shuford's site, but
  it seems to lists old products (which may still work OK).  The fact
  that most only run under DOS (and not Windows) indicates that this
  info is dated.  See
  <http://www.cs.utk.edu/~shuford/terminal/term_emulator_products.txt>.


  10.  Flow Control (Handshaking)

  Flow control (= handshaking = pacing)  is to prevent too fast of a
  flow of bytes from overrunning a terminal, computer, modem or other
  device.  Overrunning is when a device can't process what it is
  receiving quickly enough and thus loses bytes and/or makes other
  serious errors.  What flow control does is to halt the flow of bytes
  until the terminal (for example) is ready for some more bytes.  Flow
  control sends its signal to halt the flow in a direction opposite to
  the flow of bytes it wants to stop.  Flow control must both be set at
  the terminal and at the computer.

  There are 2 types of flow control: hardware and software (Xon/Xoff or
  DC1/DC3).  Hardware flow control uses dedicated signal wires such as
  RTS/CTS or DTR/DSR while software flow control signals by sending DC1
  or DC3 control bytes in the normal data wires.  For hardware flow
  control, the cable must be correctly wired.

  The flow of data bytes in the cable between 2 serial ports is bi-
  directional so there are 2 different flows (and wires) to consider:

  1. Byte flow from the computer to the terminal

  2. Byte flow from the terminal keyboard to the computer.


  10.1.  Why Is Flow Control Needed ?

  You might ask: "Why not send at a speed slow enough so that the device
  will not be overrun and then flow control is not needed?"  This is
  possible but it's usually significantly slower than sending faster and
  using flow control.  One reason for this is that one can't just set
  the serial port baud rate at any desired speed such as 14,500, since
  only a discrete number of choices are available.  The best choice is
  to select a rate that is a little higher than the device can keep up
  with but then use flow control to make things work right.

  If one decides to not use flow control, then the speed must be set low
  enough to cope with the worst case situation.  For a terminal, this is
  when one sends escape sequences to it to do complex tasks that take
  more time than normal.  In the case of a modem (with data compression
  but no flow control) the speed from the computer to the modem must be
  slow enough so that this same speed is usable on the phone line, since
  in the worst case the data is random and can't be compressed.  If one
  failed to use flow control, the speed (with data compression turned
  on) would be no faster than without using any compression at all.

  Buffers are of some help in handling worst case situations of short
  duration.  The buffer stores bytes that come in too fast to be
  processed at once, and saves them for processing later.


  10.2.  Padding

  Another way to handle a "worst case" situation (without using flow
  control or buffers) is to add a bunch of nulls (bytes of value zero)
  to escape sequences.  Sometimes DEL's are used instead provided they
  have no other function.  See ``Recognize Del''.

  The escape sequence starts the terminal doing something, and while the
  terminal is busy doing it, it receives a bunch of nulls which it
  ignores.  When it gets the last null, it has completed its task and is
  ready for the next command.  This is called null padding.  These nulls
  formerly were called "fill characters".  These nulls are added just to
  "waste" time, but it's not all wasted since the terminal is usually
  kept busy doing something else while the nulls are being received.  It
  was much used in the past before flow control became popular.  To be
  efficient, just the right amount of nulls should be added and figuring
  out this is tedious.  It was often done by trial and error since
  terminal manuals are of little or no help.  If flow control doesn't
  work right or is not implemented, padding is one solution.  Some of
  the options to the stty command involve padding.


  10.3.  Overrunning a Serial Port

  One might wonder how overrunning is possible at a serial port since
  both the sending and receiving serial ports involved in a transmission
  of data bytes are set for the same speed (in bits/sec) such as 19,200.
  The reason is that although the receiving serial port electronics can
  handle the incoming flow rate, the hardware/software that fetches and
  processes the bytes from the serial port sometimes can't cope with the
  high flow rate.

  One cause of this is that the serial port's hardware buffer is quite
  small.  Older serial ports had a hardware buffer size of only one byte
  (inside the UART chip).  If that one received byte of data in the
  buffer is not removed (fetched) by CPU instructions before the next
  byte arrives, that byte is lost (the buffer is overrun).  Newer
  UART's, namely most 16550's, have 16-byte buffers (but may be set to
  emulate a one-byte buffer) and are less likely to overrun.  It may be
  set to issue an interrupt when the number of bytes in its buffer
  reaches 1, 4, 8, or 14 bytes.  It's the job of another computer chip
  (usually the main CPU chip for a computer) to take these incoming
  bytes out of this small hardware buffer and process them (as well as
  perform other tasks).

  When contents of this small hardware receive buffer reaches the
  specified limit (one byte for old UART'S) an interrupt is issued.
  Then the computer interrupts what it was doing and software checks to
  find out what happened.  It finally determines that it needs to fetch
  a byte (or more) from the serial port's buffer.  It takes these
  byte(s) and puts them into a larger buffer (also a serial port buffer)
  that the kernel maintains in main memory.  For the transmit buffer,
  the serial hardware issues an interrupt when the buffer is empty (or
  nearly so) to tell the CPU to put some more bytes into it to send out.

  Terminals also have serial ports and buffers similar to the computer.
  Since the flow rate of bytes to the terminal is usually much greater
  than the flow in the reverse direction from the keyboard to the host
  computer, it's the terminal that is most likely to suffer overrunning.
  Of course, if you're using a computer as a terminal (by emulation),
  then it is likewise subject to overrunning.

  Risky situations where overrunning is more likely are:  1. When
  another process has disabled interrupts (for a computer).  2. When the
  serial port buffer in main (or terminal) memory is about to overflow.


  10.4.  Stop Sending

  When its appears that the receiver is about to be overwhelmed by
  incoming bytes, it sends a signal to the sender to stop sending.  That
  is flow control and the flow control signals are always sent in a
  direction opposite to the flow of data which they control (although
  not in the same channel or wire).  This signal may either be a control
  character (^S = DC3 = Xoff) sent as an ordinary data byte on the data
  wire (in-band signalling), or a voltage transition from positive to
  negative in the dtr-to-cts (or other) signal wire (out-of-band
  signalling).  Using Xoff is called "software flow control" and using
  the voltage transition in a dedicated signal wire (inside the cable)
  is called hardware flow control.


  10.5.  Keyboard Lock

  With terminals, the most common case of "stop sending" is where the
  terminal can't keep up with the characters being sent to it and it
  issues a "stop" to the PC.  Another case of this is where someone
  presses control-S.  Much less common is the opposite case where the PC
  can't keep up with your typing speed and tells the terminal to stop
  sending.  The terminal "locks" its keyboard and a message or light
  should inform you of this.  Anything you type at a locked keyboard is
  ignored.

  The term "locked" is also sometimes used for the common case of where
  the computer is told to stop sending to a terminal.  The keyboard is
  not locked so that whatever you type goes to the computer.  Since the
  computer can't send anything back to you, characters you type don't
  display on the screen and it may seem like the keyboard is locked.
  Scrolling is locked (scroll lock) but the keyboard is not locked.


  10.6.  Resume Sending

  When the receiver has caught up with its processing and is ready to
  receive more data bytes it signals the sender.  For software flow
  control this signal is the control character ^Q = DC1 = Xon which is
  sent on the regular data line.  For hardware flow control the voltage
  in a signal line goes from negative (negated) to positive (asserted).
  If a terminal is told to resume sending the keyboard is then unlocked
  and ready to use.



  10.7.  Hardware Flow Control (RTS/CTS etc.)

  Some older terminals have no hardware flow control while others used a
  wide assortment of different pins on the serial port for this.  For a
  list of various pins and their names see ``Standard Null Modem Cable
  Pin-out''.  The most popular pin to use seems to be the DTR pin (or
  both the DTR pin and the DSR pin).


  10.7.1.  RTS/CTS, DTR, and DTR/DSR Flow Control

  Linux PC's use RTS/CTS flow control, but DTR/DSR flow control (used by
  some terminals) behaves similarly.  DTR flow control (in one direction
  only and also used by some terminals) is only the DTR part of DTR/DSR
  flow control.

  RTS/CTS uses the pins RTS and CTS on the serial (EIA-232) connector.
  RTS means "Request To Send".  When this pin stays asserted (positive
  voltage) at the receiver it means: keep sending data to me.  If RTS is
  negated (voltage goes negative) it negates "Request To Send" which
  means: request not to send to me (stop sending).  When the receiver is
  ready for more input, it asserts RTS requesting the other side to
  resume sending.  For computers and terminals (both DTE type equipment)
  the RTS pin sends the flow control signal to the CTS pin (Clear To
  Send) on the other end of the cable.  That is, the RTS pin on one end
  of the cable is connected to the CTS pin at the other end.

  For a modem (DCE equipment) it's a different scheme since the modem's
  RTS pin receives the signal and its CTS pin sends.  While this may
  seem confusing, there are valid historical reasons for this which are
  too involved to discuss here.

  Terminals usually have either DTR or DTR/DSR flow control.  DTR flow
  control is the same as DTR/DSR flow control but it's only one-way and
  the DSR pin is not used.  For DTR/DSR flow control at a terminal, the
  DTR signal is like the signal sent from the RTS pin and the DSR pin is
  just like the CTS pin.


  10.7.2.  Connecting Up DTR or DTR/DSR Flow Control

  Some terminals use only DTR flow control.  This is only one-way flow
  control to keep the terminal from being overrun.  It doesn't protect
  the computer from someone typing too fast for the computer to handle
  it.  In a standard null modem cable the DTR pin at the terminal is
  connected to the DSR pin at the computer.  But Linux doesn't support
  DTR/DSR flow control (although drivers for some multiport boards may
  support DTR/DSR flow control.)  A way around this problem is to simply
  wire the DTR pin at the terminal to connect to the CTS pin at the
  computer and set RTS/CTS flow control (stty crtscts).  The fact that
  it's only one way will not affect anything so long as the host doesn't
  get overwhelmed by your typing speed and drop RTS in a vain attempt to
  lock your keyboard.  See ``Keyboard Lock''.  For DTR/DSR flow control
  (if your terminal supports this two-way flow control) you do the
  above.  But you also connect the DSR pin at the terminal to the RTS
  pin at the computer.  Then you are protected if you type too fast.


  10.7.3.  Old RTS/CTS Handshaking Is Different

  What is confusing is that there is the original use of RTS where it
  means about the opposite of the previous explanation above.  This
  original meaning is: I Request To Send to you.  This request was
  intended to be sent from a terminal (or computer) to a modem which, if
  it decided to grant the request, would send back an asserted CTS from
  its CTS pin to the CTS pin of the computer: You are Cleared To Send to
  me.  Note that in contrast to the modern RTS/CTS bi-directional flow
  control, this only protects the flow in one direction: from the
  computer (or terminal) to the modem.

  For older terminals, RTS may have this meaning and goes high when the
  terminal has data to send out.  The above use is a form of flow
  control since if the modem wants the computer to stop sending it drops
  CTS (connected to CTS at the computer) and the computer stops sending.


  10.7.4.  Reverse Channel

  Old hard-copy terminals may have a reverse channel pin (such as pin
  19) which behaves like the RTS pin in RTS/CTS flow control.  This pin
  but will also be negated if paper or ribbon runs out.  It's often
  feasible to connect this pin to the CTS pin of the host computer.
  There may be a dip switch to set the polarity of this signal.


  10.8.  Is Hardware Flow Control Done by Hardware ?

  Some think that hardware flow control is done by hardware but (unless
  you are using an intelligent serial card with several serial ports)
  it's actually done by your operating system software.  UART chips and
  associated hardware usually know nothing at all about hardware flow
  control.  When a hardware flow control signal is received, the signal
  wire flips polarity and the hardware gives an electrical interrupt
  signal to the CPU.  However, the hardware has no idea what this
  interrupt means.  The CPU stops what it was doing and jumps to a table
  in main memory that tells the CPU where to go to find a program which
  will find out what happened and what to do about it.

  There's another way this could have been implemented since when the
  polarity flips the hardware could have been configured to send an
  electrical interrupt signal to the CPU.  Then the CPU would stop what
  it was doing, jump to a service routine of the serial driver, check
  registers in the serial hardware to find out what happened, and make a
  note not to resume the flow after the service routine is exited.  This
  might be a little more efficient, but it seems that Linux doesn't do
  it this way.  I once thought it did.

  Note that with either method the flow of bytes stops nearly instantly.
  However, any bytes (up to 16) which were already in the serial port's
  hardware transmit buffer will still get transmitted.  Using software
  flow control requires that each incoming byte be checked to see if
  it's an "off" byte.  These bytes are delayed by passing thru the
  16-byte receive buffer.  If the "off" byte was the first byte into
  this buffer, there could be a wait while 15 more bytes were received.
  Then the 16 bytes would get read and the "off" byte found.  This extra
  delay doesn't happen with hardware flow control.


  10.9.  Obsolete ?? ETX/ACK or ENQ/ACK Flow Control

  This is also software flow control and requires a device driver that
  knows about it.  Bytes are sent in packets (via the async serial port)
  with each packet terminated by an ETX (End of Text) control character.
  When the terminal gets an ETX it waits till it is ready to receive the
  next packet and then returns an ACK (Acknowledge).  When the computer
  gets the ACK, it then send the next packet.  And so on.  This is not
  supported by Linux ??   Some HP terminals use the same scheme but use
  ENQ instead of ETX.



  11.  Physical Connection

  Multiport boards allow many terminals (or modems) to be connected to
  one PC computer.  A terminal may be connected to its host computer
  either by a direct cable connection, via a modem, or via a terminal
  server.


  11.1.  Multiport I/O Cards (Adapters)

  Additional serial cards may be purchased which have many serial ports
  on them called "multiport boards".  These boards are not covered in
  this HOWTO but there is quite a lot of coverage in the Serial-HOWTO
  One company which had (in 1998) below average prices is ByteRunner
  <http://www.byterunner.com/cgi-bin/goto.cgi?FILE=iocards.html>.


  11.2.  Direct Cable Connection.

  The simplest way to connect a terminal to a host computer is via a
  direct connection to a serial port on the computer.  You may also use
  some the info in this section for connecting one computer to another
  (via the serial port).  Most PC's come with a couple of serial ports,
  but one is usually used by a mouse.  For the EIA-232 port, you need a
  null modem cable that crosses over the transmit and receive wires.  If
  you want hardware flow control, you will probably use the DTR pin (or
  both the DTR and DSR pins).

  Make sure you have the right kind of cable.  A null modem cable bought
  at a computer store may do it (if it's long enough), but it probably
  will not work for hardware flow control.  Such a cable may be labeled
  as a serial printer cable.  See this to help determine if you should
  ``Buy or Make'' your own cable.  Make sure you are connecting to your
  PC's serial port at the male DB25 or the DB9, and not your parallel
  port (female DB25).


  11.2.1.  Null Modem Cable Pin-out (3, 4, or 5 conductor)

  These 3 diagrams are for real text-terminals.  But you could use them
  to connect up 2 PCs if you substitute RTS for DTR and CTS for DSR.
  (Don't use 4-conductors for PC-to-PC).  For terminals, if you only
  have DTR flow control (one-way) you may eliminate the RTS-to-DSR wire.
  If you have no hardware flow control, then you may also eliminate the
  CTS-to-DTR wire.  Then if you have 2@ twisted pairs, you may then use
  2 wires for signal ground per ``A Kludge using Twisted-Pair Cable''.
  For a DB25 connector on your PC, you need:



         PC male DB25                          Terminal DB25
           TxD   Transmit Data       2 --> 3       RxD   Receive Data
           RxD   Receive Data        3 <-- 2       TxD   Transmit Data
           SG    Signal Ground       7 --- 7       SG    Signal Ground
           CTS   Clear To Send       5 <--20       DTR   Data Terminal Ready
           RTS   Request To Send     4 --> 6       DSR   Data Set Ready



  If you have a DB9 connector on your PC, try the following:



          PC DB9                                 Terminal DB25
      RxD   Receive Data        2 <-- 2       TxD   Transmit Data
      TxD   Transmit Data       3 --> 3       RxD   Receive Data
      SG    Signal Ground       5 --- 7       SG    Signal Ground
      CTS   Clear To Send       8 <--20       DTR   Data Terminal Ready
      RTS   Request To Send     7 --> 6       DSR   Data Set Ready   **



  If you have a DB9 connector on both your serial port and terminal:


               PC DB9                                 Terminal DB9
           RxD   Receive Data        2 <-- 3       TxD   Transmit Data
           TxD   Transmit Data       3 --> 2       RxD   Receive Data
           SG    Signal Ground       5 --- 5       SG    Signal Ground
           CTS   Clear To Send       8 <-- 4       DTR   Data Terminal Ready
           RTS   Request To Send     7 --> 6       DSR   Data Set Ready   **



  The above don't have modem control lines so be sure to give a "local"
  option to getty (which is equivalent to "stty clocal").  Also if you
  need hardware flow control it must be enabled at your computer (use a
  -h flag with agetty) ( equivalent to "stty crtscts" ).


  11.2.2.  Standard Null Modem Cable Pin-out (7 conductor)

  The following 3 diagrams show full "standard" null modem cables.  One
  that you purchase is apt to be wired this way.  They will work fine
  for computer-to-computer connections.  They also work for real
  terminals using software (Xon/Xoff) flow control (or no flow control).
  However, they don't work for terminal hardware flow control since most
  real terminals support DTR or DTR/DSR flow control (handshaking) but
  Linux doesn't.



       PC male DB25                            Terminal DB25
       TxD   Transmit Data         2 --> 3     RxD   Receive Data
       RxD   Receive Data          3 <-- 2     TxD   Transmit Data
       RTS   Request To Send       4 --> 5     CTS   Clear To Send
       CTS   Clear To Send         5 <-- 4     RTS   Request To Send
       DSR   Data Set Ready        6
                                   |
       DCD   Carrier Detect        8 <-- 20    DTR   Data Terminal Ready
       SG    Signal Ground         7 --- 7     SG    Signal Ground
                                         6     DSR   Data Set Ready
                                         |
       DTR   Data Terminal Ready  20 --> 8     DCD   Carrier Detect



  Alternatively, a full DB9-DB25 null modem cable (will not  work with
  terminal hardware handshaking; see above):



  PC DB9                                  Terminal DB25
  RxD   Receive Data          2 <-- 2     TxD   Transmit Data
  TxD   Transmit Data         3 --> 3     RxD   Receive Data
                                    6     DSR   Data Set Ready
                                    |
  DTR   Data Terminal Ready   4 --> 8     DCD   Carrier Detect
  GND   Signal Ground         5 --- 7     GND   Signal Ground
  DCD   Carrier Detect        1
                              |
  DSR   Data Set Ready        6 <-- 20    DTR   Data Terminal Ready
  RTS   Request To Send       7 --> 5     CTS   Clear To Send
  CTS   Clear To Send         8 <-- 4     RTS   Request To Send
  (RI   Ring Indicator        9 not needed)



  (Yes, the pins 2 and 3 really do have the opposite meanings in DB9
  connectors than in DB25 connectors!)

  Here's how to null-modem connect two DB9's together (but DTR flow
  control will not work):


       PC DB9                                  DB9
       RxD   Receive Data          2 <-- 3     TxD   Transmit Data
       TxD   Transmit Data         3 --> 2     RxD   Receive Data
                                         6     DSR   Data Set Ready
                                         |
       DTR   Data Terminal Ready   4 --> 1     DCD   Carrier Detect
       GND   Signal Ground         5 --- 5     GND   Signal Ground
       DCD   Carrier Detect        1
                                   |
       DSR   Data Set Ready        6 <-- 4     DTR   Data Terminal Ready
       RTS   Request To Send       7 --> 8     CTS   Clear To Send
       CTS   Clear To Send         8 <-- 7     RTS   Request To Send
       RI   Ring Indicator         9 (not used)



  Using the above 2 connections provide full modem control signals and
  seemingly allow one to set "stty -clocal".  Then one must turn on the
  terminal first (asserts DTR) before the port may be opened in a normal
  manner by getty, etc.  But there is likely to be trouble if you fail
  to turn on the terminal first (see ``Getty Respawning Too Rapidly'').
  For this reason one should use "stty clocal" which is the default
  (ignores modem control lines) and the additional wires in these cables
  then serve no useful purpose.

  In olden days when it may not have been this easy to ignore modem
  control signals etc, the following "trick" was done for cables that
  lacked conductors for modem control: on your computer side of the
  connector, connect RTS and CTS together, and also connect DSR, DCD and
  DTR together.  This way, when the computer needs a certain handshaking
  signal to proceed, it will get it (falsely) from itself.


  11.2.3.  Length Limitations

  A cable longer than a 50 feet or so may not work properly at high
  speed.  Much longer lengths sometimes work OK, especially if the speed
  is low and/or the cable is a special low-capacitance type and/or the
  electronics of the receiving end are extra sensitive.  It is claimed
  that under ideal conditions at 9600 baud, 1000 feet works OK.  One way
  to cover long distances is to install 2@ line drivers near each serial
  port so as to convert unbalanced to balanced (and conversely) and then
  use twisted pair cabling.  But line drivers are expensive.


  11.2.4.  Hardware Flow Control Cables

  If you expect to use hardware flow control (handshaking) you will
  likely need to make up your own cable (or order one made).  Of course,
  if the connecters on the ends of a used cable remove, you might rewire
  it.  See ``Installing DB Connectors''.  You will need to determine
  whether or not the terminal uses the DTR pin for this, and if not,
  what pin (or pins) it uses.  The set-up menus may give you a clue on
  this since there may be an option for enabling "DTR handshaking" (or
  flow control) which of course implies that it uses the DTR pin.  It
  may also use the DSR pin.  See ``Hardware Flow Control'' for a
  detailed explanation of it.  Older terminals may have no provision for
  hardware flow control.


  11.2.5.  Cable Tips

  The normal "straight thru" cable will not work unless you are using it
  as an extension cable in conjunction with either a null modem cable or
  a null modem adapter.  Make sure that the connectors on the cable ends
  will mate with the connectors on the hardware.  One may use telephone
  cable which is at least 4-conductor (and possibly twisted pair).
  Shielded, special low-capacitance cable computer cable is best.


  11.2.6.  A Kludge using Twisted-Pair Cable

  Although none of the EIA-232 signals are balanced for twisted pair one
  may attempt to use twisted-pair cable with it.  Use one pair for
  transmit and another for receive.  To do this connect signal ground to
  one wire in each of these 2 pair.  Only part of the signal ground
  current flows in the desired wire but it may help.  Due to the lower
  inductance of the twisted pair circuit (as compared to ground return
  current by some other path)  more return (ground) current will confine
  itself to the desired twisted pair than one would expect from only
  resistance calculations.  This is especially true at higher
  frequencies since inductive impedance increases with frequency.  The
  rectangular wave of the serial port contains high frequency harmonics.


  11.2.7.  Cable Grounding

  Pin 1 (of a DB25) should be chassis ground (also earth ground) but on
  cheap serial ports it may not even be connected to anything.  A 9-pin
  connector doesn't even have a chassis ground.  The signal ground is
  pin 7 and is usually grounded to chassis ground.  This means that part
  of the signal current will flow thru the ground wires of the building
  wiring (undesirable).  Cable shields are supposed to be only grounded
  at one end of the cable, but it may be better to ground both ends
  since it's better to have current in the shield than in the building
  wiring ??


  11.3.  Modem Connection

  Using a terminal-modem combination (without a computer) one may
  connect to BBS's.  Some BBS's (such a free-nets) permit Internet
  access via the text browser lynx which will work on text terminals.
  Thus with an old terminal and external modem, one may connect to the
  Internet.  If one connects to a host computer on which one has an
  account, then one may sometimes store ones work (or downloads) there.

  11.3.1.  Dialing Out From a Terminal

  Instead of connecting a terminal (or computer emulating a terminal)
  directly to a host computer using a cable it may be connected to the
  host via a telephone line (or dedicated private line) with a modem at
  each end of the line.  The terminal (or computer) will usually dial
  out on a phone line to a host computer.

  Most people use a PC and modem for dialing out.  The PC could have a
  terminal connected to a serial port and the person at the terminal may
  dial out using the PC.   Connecting a real terminal directly to an
  external modem is more difficult since the real terminal isn't very
  intelligent and doesn't give as much feedback to the user.  For
  dialing out, many terminals can store one or more telephone numbers as
  messages which may be "set-up" into them and are sent out to the modem
  by pressing certain function keys.  Many modems can also store phone
  numbers.  The modem initiation sequence must precede the telephone
  number.  When the outgoing call is answered by another modem at the
  other end of the phone line, the the host computer on this modem may
  run a getty program to enable you to log in.


  11.3.2.  Terminal Gets Dialed Into

  It's common for a computer running Linux to get dialed into.  The
  caller gets a login prompt and logs in.  At first glance, it may seem
  strange how a dumb terminal (not connected to any computer) could
  accept an incoming call, but it can.  One possible reason for doing
  this is to save on phone bills where rates are not symmetric.  Your
  terminal needs to be set up for dial-in: Set the modem at your
  terminal for automatic answer (Register S0 set to 2 will answer on the
  2nd ring).  You turn on the terminal and modem before you expect a
  call and when the call comes in you get a login prompt and log in.

  The host computer that dials out to your terminal needs to do
  something quite unusual.  As soon as your modem answers, it needs to
  run login (getty).   A host may do this by running the Linux program
  "callback" sometimes named "cb".  Callback is for having computer A
  call computer B, and then B hangs up and calls A back.  This is what
  you want if you are using computer A to emulate a terminal.  For the
  case of a real terminal this may be too complex a task so the host may
  utilize only the "back" part of the callback program.  The setup file
  for callback must be properly configured at the host.  Callback makes
  the call to the terminal and then has mgetty run a login on that port.
  Mgetty by itself (as of early 1998) is only for dial-in calls but
  there is work being done to incorporate callback features into it and
  thus make it able to dial-out.  As of early 1999 it didn't seem to
  have been done.


  11.4.  Terminal Server Connection

  One use for terminal servers is to connect many terminals (or modems)
  to a high speed network which connects to host computers.  Of course
  the terminal server must have the computing power and software to run
  network protocols so it is in some ways like a computer.  The terminal
  server may interact with the user and ask what computer to connect to,
  etc. or it may connect without asking.  One may sometimes send jobs to
  a printer thru a terminal server.

  A PC today has enough computing power to act like a terminal server
  for text terminals except that each serial port should have its own
  hardware interrupt.  PC's only have a few spare interrupts for this
  purpose and since they are hard-wired you can't create more by
  software.  A solution is to use an advanced multiport serial card
  which has its own system of interrupts (or on lower cost models,
  shares one of the PC's interrupts between a number of ports).  See
  Serial-HOWTO for more info about such cards.  If such a PC runs Linux
  with getty running on many serial ports it might be thought of as a
  terminal server.  It is in effect a terminal server if it is linked to
  other PC's over a network and if its job is mainly to pass thru data
  and handle the serial port interrupts every 14 (or so) bytes.
  Software called "radius" is sometimes used.

  Terminal servers evolved to serve more than just terminals.  They also
  serve PC's which emulate terminals, and were sometimes connected to a
  bank of modems connected to phone lines.  With the advent of 56k
  digital modems that require a digital connection to service an
  incoming phone call, a digital interface to the telephone company was
  needed.  This (and more) is provided today by "remote access servers"
  which have replaced the terminal server.  Instead of many individual
  telephone line cables connected to a terminal server, one now finds
  just a few cables with many digitized telephone calls on a each cable
  (multiplexed).  The multitude of connectors needed for large numbers
  of terminals or modems is no longer present on a remote access server
  and thus the successor to the terminal server can't readily serve
  text-terminals anymore.


  11.5.  Connector and Adapter Types

  A connector is more-or-less permanently attached to the end of a cable
  or to a hardware unit.  There are two basic types of connectors used
  in serial communications: 1. DBxx with pins (such as DB25) and 2.
  modular telephone-style connectors.

  An adapter looks about like a connector but it has two ends.  It is
  just like a cable that is so short that there is no cable part left at
  all --just different connectors on each end is all that remains.  The
  adapter just plugs in on each side.  It allows two incompatible
  connectors to mate with each other by going in between them.
  Sometimes the purpose of the adapter is to interchange wires.
  Obviously, one may use a special cable (perhaps homemade) as a
  substitute for an adapter.


  11.5.1.  Sex of Connector/Adapters

  Connectors (or one side of adapters) are either male or female.  The
  connectors that have pins are male and the ones that have sockets
  (sometimes also called pins) are female.  For modular connectors, the
  ones with exposed contacts are plugs while the ones with internal
  contacts (not easy to see) are jacks.  Plugs are male; jacks are
  female.


  11.5.2.  Types of Adapters

  There are three basic types of adapters: null modem, gender changers
  and port adapters.  Some adapters perform more than one of these three
  functions.

    null modem adapter: Reroutes wires.  Like a null modem cable.

    gender changer: Changes the sex of a cable end.  Two connectors of
     the same sex can now connect (mate) with each other.

    port adapter: Goes from one type of connector to another (DB9 to DB
     25, etc.)



  11.5.3.  DB Connectors

  (For how to install a DB connector on the ends of a cable see
  ``Installing DB Connectors''.)  These come in 9 or 25 pins.  The
  EIA-232 specs. call for 25 pins but since most of these pins are not
  used on ordinary serial ports, 9 pins is sufficient. See ``DB9-DB25''
  for the pin-out.  The pins are usually numbered if you look closely
  enough or use a magnifying glass.


  11.5.4.  RJ Modular Connectors

  These look like modern telephone connectors but are sometimes not
  compatible with telephone connectors.  See also ``Installing RJ
  Connectors''.  They may be 6, 8, or 10 conductor.  RJ11/14 is a 4-6
  conductor telephone plug.  A look-alike is a MMJ connector
  (6-conductor) used on later model VT (and other) terminals.   MMJ has
  an offset tab and is not compatible with RJ11/14.  However, some
  connectors have been made that are compatible with both MMJ or
  RJ11/14.  The MMJ pin-out is: 1-DTR, 2-TXD, 3-TXD GND, 4-RXD GND,
  5-RXD, 6-DSR.

  A null-modem cable with MMJ (or RJ11/14) connectors will connect: 1-6,
  2-5, and 3-4.  Note that such a cable support DTR/DSR flow control
  which is not supported (yet) by Linux.  Making up your own 6-conductor
  null-modem cable is very simple if you understand that the ordinary
  4-conductor telephone cable from the wall to your telephone, used in
  hundreds of millions of homes, is also a null-modem cable.  Find one
  and wire your cable the same way.

  If you lay such a cable (or your terminal null-modem cable) flat on
  the floor (with no twists) you will note that both plugs on the ends
  have their gold contacts facing up (or both facing down).  Although
  it's symmetrical, it is also null- modem if you think about it a bit.
  One may put a few such cables together with inline couplers and
  everything works OK because each inline coupler is also a null-modem
  adapter.  Two null-modem devices in series result in a straight-thru
  connection.

  RJ45 and RJ48 are usually 8-conductor modular telephone plugs.
  However some are 10-conductor and are allegedly wider and will not
  mate with 8-conductor ones.  They are used for both flat telephone
  cable and round twisted pair cable.  The cable end of the connector
  may be different for round and flat cable and both RJ45 and RJ48 may
  be 8 or 10 conductor so make sure you get the right one.  RJ48 has an
  extra tab so that a RJ48 plug will not push into a RJ45 jack (but a
  RJ45 plug will mate with a RJ48 jack).  They're used on some multiport
  serial cards and networks.  Heres the pin numbers for an 8-conductor:



         Plug                          Jack
         (Looking at the end           (Looking at the cavity
          end of a cable)               in a wall)
            .__________.                   .__________.
            | 87654321 |                   | 12345678 |
            |__.    .__|                   |__.    .__|
               |____|                         |____|



  11.6.  Making or Modifying a Cable

  11.6.1.  Buy or Make ?

  You may try to buy a short, null modem cable.  They are often labeled
  as serial printer cables (but serial printers are not very popular
  today and neither are the cables).  Unfortunately, they will probably
  not work for hardware flow control.  Make sure the connectors on the
  cable ends will fit the connectors on your computer and terminal.

  But if you need longer cables to connect up terminals or need hardware
  flow control, how do you get the right cables?  The right ready-made
  cables may be difficult to find (you might find them by searching the
  Internet), especially if you want to use a minimum (say 4) of
  conductors.  One option is to get them custom made, which is likely to
  be fairly expensive although you might find someone to make them at
  prices not too much higher than ready-made cable (I did).  Another
  alternative is to make your own.  This may require special tools.  If
  you can find it, used cable can be a real bargain but you will
  probably need to rewire the connectors.  Most connectors that come
  with short cables are permanently molded to the cable and can't be
  rewired but most custom-made and homemade cables have connectors that
  can be rewired.  One advantage of making your own cable is that the
  skills you learn will come in handy if a cable breaks (or goes bad) or
  if you need to make up another cable in a hurry.


  11.6.2.  Pin Numbers

  The numbers of the pins should be engraved in the plastic of the
  connector.  Each pin should have a number next to it.  You may need a
  magnifying glass to read them.


  11.6.3.  Installing DB Connectors on Cable Ends

  See ``DB Connectors'' for a brief description of them.  Unfortunately,
  most cables one purchases today have molded connectors on each end and
  can't be modified.  Others have connectors which unscrew and can be
  rewired.  If you are making up cable or modifying an existing one then
  you need to know about pins.  There are two types: soldered and
  crimped.

  The crimped pins require a special crimping tool and also need an
  "insertion/extraction" tool.  But once you have these tools, making up
  and modifying cable may be faster than soldering.  If you are
  connecting two wires to one pin (also needed if you want to jumper one
  connected pin to another pin) then soldering is faster (for these
  pins).  This is because the crimped pins can only take one wire each
  while the soldered ones can accept more than one wire per pin.

  To insert crimped pins just push them in by hand or with the tool.
  Removing a pin with the tool is a little tricky.  These directions can
  be best understood if you have both the tool and wires in front of
  you.  You must put the tool tip around a wire at the the back of a pin
  and insert it as far as it will go into the hole (about 1 1/2 cm.).
  Some tools have a mark (such as a tiny hole) on them to indicate how
  far to insert it.  The tool tip should have a tapered gap so that you
  may get the tip around the wire by starting it in where the gap is
  wider than the wire.  The tool may have 2 tips.  The one that is the
  most difficult to get around the wire is also the one that removes the
  wire the easiest since it almost completely envelops the wire.

  With the tip properly inserted pull on both the tool and the wire with
  a gentle pull.  If it doesn't come out, the tool was likely not
  inserted correctly so either push it in more or twist it to a
  different position (or both).   Perhaps you should have used the other
  tip that goes more around the pin.  Using this tool, one may readily
  convert a straight-thru cable to a null-modem cable, etc.

  There can be problems using the "insertion/extraction" tool.  If the
  tools will not insert on the back of the pin, it could be that the pin
  was not neatly crimped to the wire and is sort of square where it
  should be round, etc.  If a pin starts to come out but will not pull
  out all the way, the pin may be bent.  Look at it under a magnifying
  glass.  Straightening a pin with needle-nose pliers may damage the
  gold plating.  Sometimes a stuck pin may be pushed out with a thick
  screwdriver blade tip (or the like) but if you push too hard you may
  gouge the plastic hole or bend the pin:.

  Don't try soldering unless you know what you're doing or have read
  about how to do it.


  11.6.4.  Installing RJ Connectors

  These are telephone modular connecters one type of which is used for
  most ordinary telephones.  But there are many different types (see
  ``RJ Modular Connectors'').

  These are not easy to reuse.  You might be able to pull the wires out,
  push in something wedged that would lift up the gold-colored contacts
  and reuse the connector.  There are special crimping tools used to
  install them; a different tool for each type.

  If you don't have a crimping tool, installation is still possible (but
  difficult) using a small screwdriver (and possibly a hammer).  Push in
  the cable wires and then push each gold-colored contact down hard with
  a small screwdriver that will just fit between the insulating ridges
  between the contacts.  You may damage it if you fail to use a
  screwdriver with a head almost the same thickness as the contacts or
  if the screwdriver slips off the contact as you are pushing it down.
  You may also use a small hammer to pound on the screwdriver (push
  first by hand).

  Be sure to not hurt the "remove lever" on the connecter when you push
  in the contacts.  Don't just set it down on a table and push in the
  contacts.  Instead, put a shim (about 1 mm thick) that fits snugly in
  the crevice between the lever and the body.  For such a shim you may
  use thick cardboard, several calling cards, or wood.  Since the bottom
  of the connector (that you will put on the table) isn't level (due to
  the "remove lever), make sure that the table top has something a
  little soft on it (like a sheet of cardboard) to help support the non-
  level connector.  Even better would be to put another 1mm shim under
  the first 6mm of the connector, supporting it just under where you see
  the contacts.  A soft tabletop wouldn't hurt either.  Another method
  (I've never done this) is to hold the connector in a vice but be
  careful not to break the connector.

  As compared to using a crimping tool, installing it per above takes a
  lot longer and is much more prone to errors and failure but it's
  sometimes more expedient and a lot cheaper than buying a special tool
  if you only have one or two connectors to install.


  12.  Set-Up (Configure) in General

  12.1.  Intro to Set-Up

  Configuring (Set-Up) involves both storing a configuration in the non-
  volatile memory of the terminal, and putting commands in start-up
  files (on you hard disk) that will run each time the computer is
  powered on (or possibly only when the run-level changes).  This
  section gives an overview of configuring and covers the configuring of
  the essential communication options for both the terminal and the
  computer.  The next two major sections cover in detail the
  configuration of the terminal (see ``Terminal Set-Up'' and the
  computer (see ``Computer Set-Up (Configure) Details''.


  12.2.  Terminal Set-Up (Configure) Overview

  When a terminal is installed it's necessary to configure the physical
  terminal by saving (in its non-volatile memory which is not lost when
  the terminal is powered off) the characteristics it will have when it
  is powered on.  You might be lucky and have a terminal that has
  already been set-up correctly for your installation so that little or
  no terminal configuration is required.

  There are two basic ways of configuring a terminal.  One is to sit at
  the terminal and go thru a series of set-up menus.  Another is to send
  escape sequences to it from the host computer.  Before you can send
  anything to the terminal (such as the above escape sequences), its
  ``Communication Interface'') options such as the baud rate must be set
  up to match those of the computer.  This can only be done by sitting
  at the terminal since the communications must be set up right before
  the computer and the terminal can "talk" to each other.  See
  ``Terminal Set-Up''.


  12.3.  Computer Set-Up (Configure) Overview

  Besides possibly sending escape sequences from the computer to
  configure the terminal, there is the configuring of the computer
  itself to handle the terminal.  If your lucky, all you need to do is
  to put a "getty" command in the /etc/inittab file so that a "login:"
  prompt will be sent to the terminal when the computer starts up.  See
  ``Getty (in /etc/inittab)'' for details.  this for the computer.

  The computer communicates with the terminal using the device driver
  software (part of the kernel).  The serial device driver has a default
  configuration and is also partly (sometimes fully) configured by the
  getty program before running "login" at each terminal.  However,
  additional configuration is sometimes needed using programs named
  "stty" and "setserial".  These programs (if needed) must be run each
  time the computer starts up since this configuration is lost each time
  the computer powers down.  See ``Computer Set-Up (Configure)
  Details''.


  12.4.  Many Options

  There are a great many configuration options for you to choose from.
  The communication options must be set right or the terminal will not
  work at all.  Other options may be set wrong, but will cause no
  problem since the features they set may not be used.  For example, if
  you don't have a printer connected to the terminal it makes no
  difference how the printer configuration parameters are set inside the
  terminal.  This last statement is not 100% correct.  Suppose that you
  have no printer but the compute (by mistake) sends the terminal a
  command to redirect all characters (data) from the computer to the
  printer only.  Then nothing will display on the screen and your
  terminal will be dead.  Some terminals have a configuration option to
  inform the terminal that no printer is attached.  In this case the
  terminal will ignore any command to redirect output to the "printer"
  and the above problem will never happen.  However, this doesn't help
  much since there are many other erroneous commands that can be sent to
  your terminal that will really foul things up.  This is likely to
  happen if you send the terminal a binary file by accident.

  In some cases a wrong setting will not cause any problem until you
  happen to run a rare application program that expects the terminal to
  be set a certain way.  Other options govern only the appearance of the
  display and the terminal will work fine if they are set wrong but may
  not be as pleasant to look at.

  Some options concern only the terminal and do not need to be set at
  the computer.  For example: Do you want black letters on a light
  background?  This is easier on the eyes than a black background.
  Should a key repeat when held down?  Should the screen wrap when a
  line runs off the right end of the screen?  Should keys click?


  12.5.  Communication Interface Options

  Some of these communication settings (options) are for both the
  terminal and the computer and they must be set exactly the same for
  both: speed, parity, bits/character, and flow control.  Other
  communication options are only set at the terminal (and only a couple
  of these are essential to establish communications).  Still others
  such as the address and interrupt (IRQ) of the physical port ttyS2 are
  set only at the computer using the "setserial" command.  Until all of
  the above essential options are compatibly set up there can be no
  satisfactory serial communication (and likely no communication at all)
  between the terminal and the computer.  For the terminal, one must set
  these options manually by menus at each terminal (or by using some
  sort of special cartridge at each terminal).  The host computer is
  configured by running commands each time the computer is powered up
  (or when people log in).  Sometimes the getty program (found in the
  /etc/inittab file) which starts the login process will take care of
  this for the computer.  See ``Getty (in /etc/inittab)''

  The settings for both the computer and the terminal are:

    ``Speed (bits/second) ''

    ``Parity''

    ``Bits per Character ''

    ``Flow Control ''

  Some essential settings for the terminal alone are:

    ``Port Select''

    Set communication to full duplex (=FDX on Wyse terminals)


  If the  ``Getty (in /etc/inittab)'' program can't set up the computer
  side the way you want, then you may need to use one (or both) of the
  ``Stty & Setserial'' commands.


  12.5.1.  Speed

  These must be set the same on both the terminal and the computer.  The
  speed is the bits/sec (bps or baud rate).  Use the highest speed that
  works without errors.  Enabling flow control may make higher speeds
  possible.  There may be two speeds to set at the terminal: Transmit
  and Receive, sometimes abbreviated T and R.  Usually they are both set
  the same since stty in Linux doesn't seem to have the option yet of
  setting them differently.  (There is an option to do this with the
  "stty" command but it seems to actually set them both the same.)
  Common speeds are 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, ...
  The slower speeds (like 600) are for printers and hard-copy terminals.


  12.5.2.  Parity & Should You Use It ?

  For a definition see ``Parity Explained''.  Parity-disabled is often
  the default.  To enable parity, you must both enable it and then
  select either even or odd parity.  It probably makes no difference if
  it's odd or even.  For terminals there are sometimes settings for both
  transmit and receive parity.  You should set both of these the same
  since stty at the computer doesn't permit setting them differently.
  The PC serial port usually can't support different parities either.
  Some terminal are unable to set receive parity and will simply always
  ignore received parity bits.  On some older terminals if you use
  8-data-bits per byte then parity will not work since there is no room
  in the hardware for the extra parity bit.

  Should you use parity  at all?  Parity, while not really necessary, is
  nice to have.  If you don't have parity, then you may get an incorrect
  letter here and there and wind up trying to correct spelling errors
  that don't really exist.  However parity comes at a cost.  First, it's
  more complicated to set up since the default is usually no parity.
  Secondly, parity will slow down the speed with which bytes travel over
  the serial cable since there will be one more bit per byte.  This may
  or may not slow down the effective speed.

  For example, a hard-copy terminal is usually limited by the mechanics
  of the printing process.  Increasing the bytes/sec when the computer
  (its UART chip) is transmitting only results in more flow-control
  "halt" signals to allow the mechanical printing to catch up.  Due to
  more flow-control waits the effective speed is no better without
  parity than with it.  The situation is similar for some terminals:
  After you implement parity there may be fewer flow-control waits per
  unit time resulting in more bits/sec (average).  However, due to the
  added parity bits the bytes/sec (average) stays the same.

  One option is to install terminals with no parity.  Then if parity
  errors are noticed, it can be implemented later.  To spot possible
  errors with no parity, look for any spelling errors you don't think
  you made.  If you spot such an error, refresh the screen (retransmit
  from the computer).  If the error goes away, then it's likely a parity
  error.  If too many such errors happen (such as more than one every
  few hundred screens) then corrective action is needed such as:  Enable
  parity and/or reduce speed, and/or use a shorter/better cable.
  Enabling parity will not reduce the number of errors but it will tell
  you when an error has happened.

  Just the opposite policy is to initially enable parity.  Then if no
  parity errors (error symbols on the CRT) are ever seen (over a
  reasonable period of time, say a month or two) it may be safely
  disabled.


  12.5.3.  Bits/Character

  This is the character size (the number of data bits per character
  excluding any parity bit).  For ASCII it's 7,  but it's 8 for ISO
  character sets.  If you are only going to use ASCII characters, then
  select 7-bits since it's faster to transmit 7 bits than 8.  Some older
  terminals will only display 7-bit characters.



  12.5.4.  Which Flow Control (Handshaking) ?

  The choice is between "hardware" (for example  dtr/cts) or "software"
  (Xon/Xoff) flow control.  (The Adds terminal menu incorrectly use
  "Xon/Xoff" to mean any kind of flow control.)  While hardware flow
  control may be faster (if the one or two extra wires for it are
  available in the cable and if the terminal supports it) in most cases
  Xon/Xoff should work OK.  Some people report that they solved
  disturbing problems (see below) by converting to hardware flow control
  but software flow control has worked fine at other installations (and
  for me personally).

  If you use software (Xon/Xoff) flow control and have users who don't
  know about it, then they may accidentally send an Xoff to the host and
  lock up their terminal.  While it's locked, they may type frantically
  in a vain attempt to unlock it.  Then when Xon is finally sent to
  restore communication, all that was typed in haste gets executed,
  perhaps with unexpected results.  They can't do this with hardware
  flow control.  See ``Flow Control'' for an explanation of flow
  control.


  12.5.5.  Port Select

  Since most terminals have two or more connectors on the back, it is
  usually possible to assign one of these connecters to connect to the
  host computer and assign another connector to be the printer port.
  The connector may have a name next to it (inspect it) and this name
  (such as Aux, Serial 2, or Modem) may be assigned to either be the
  main host connection or the printer connection (or the like).


  12.6.  Quick Attempt

  While all the above may seem overly complex, to get a terminal working
  is often fairly simple.  The ``Quick Install'' section describes a
  simple way to try to do this.  But if that doesn't work or if you want
  to make the display look better and perform better, more reading will
  be needed.


  13.  Terminal Set-Up (Configure) Details

  Except for the next subsection on sending escape sequences to the
  terminal, this section mainly presents the details of setting up the
  terminal manually by sitting at the terminal and going thru menus.  If
  you haven't already done so, you should read ``Terminal Set-Up
  (Configure) Overview''.  It's best if you have a terminal manual, but
  even it you don't there is information here on many of the options
  which you might possibly need to set.

  The communication parameters such as its baud rate must always be set
  up at the terminal since if this is not done there can be no
  communication with the terminal.   Once communication is established
  you have two choices for doing the rest the terminal configuration.
  You may continue to configure manually at the terminal and save the
  results in the terminal's non-volatile memory or you may do this by
  sending escape sequences to the terminal from the computer each time
  the terminal is powered on (or the like).

  If you know how to set up and save a good configuration inside the
  terminal it may be the best way.  If you don't, you might want to just
  send the init string from terminfo to your terminal each time you use
  the terminal.  Perhaps doing nothing will still give you a usable
  terminal.  You (or an application program) can always change things by
  sending certain escape sequences to the terminal.
  13.1.  Send Escape Sequences to the Terminal

  Once the communication interface is established, the rest of the
  configuration of the terminals may sometimes be done by sending escape
  sequences to the terminals from the computer.  If you have a large
  number of terminals, it may be worthwhile to write (or locate) a shell
  script to automatically do this.  There may (or may not) be a command
  you can send to a terminal to tell it to save its current set-up in
  its non-volatile memory so that it will be present the next time the
  terminal is powered on.

  There is an simple way to send these escape sequences and a complex
  way.  Using the simple way, you never look up escape sequences but
  issue commands that automatically find an appropriate escape sequence
  in the terminfo database and send that.  Unfortunately, not all the
  escape sequences which you might want to send are always in the
  terminfo database.  Thus the more complex (but possibly better) way is
  to directly send escape sequences.

  For this complex method you'll need an advanced manual.  Old terminal
  manuals once included a detailed list of escape sequences but newer
  ones usually don't.  To find them you may need to purchase another
  manual called the "programmers manual" (or the like) which is not
  supplied with the terminal.  A ``Esc Sequence List'' for some
  terminals is on the Internet but it's terse and likely incomplete.

  Even without a manual or the like, you may still send commands to
  configure the terminal by using the programs "tput" and "setterm".
  See ``Changing the Terminal Settings''.  You could just send the
  terminal an init string from the terminfo entry if the init string
  sets up the terminal the way want it.  See ``Init String''.  Unless
  you plan to have these sequences sent from the computer to the
  terminal each time the terminal is powered on, you must somehow save
  the settings in the non-volatile memory of the terminal.


  13.2.  Older Terminals Set-Up

  On older terminals look at the keyboard for labels just above the top
  row of numeric keys.  If they exist, these labels may be what these
  keys do in set-up mode.  Some older terminals may have only one "set-
  up" menu.  Still older ones have physical switches.  In some cases not
  all the switches are well labeled but they may be well concealed.  Of
  course, if you set something with a switch, it's "saved" and there is
  no need to save the setting in non-volatile memory.


  13.3.  Getting Into Set-Up (Configuration) Mode

  To select options (configure) at the terminal, you must first enter
  "set-up" mode and then select options (i.e. configure) using menus
  stored inside the terminal and displayed on the screen.  To do this,
  the terminal does not even need to be connected to a computer.  How to
  get into set-up mode is covered in the terminal's manual, but here's
  some hints that may help:

  If there's a "set-up" key try pressing it.  Also try it shifted.

    Wyse: First try the shifted "Select" key; then substitute Ctrl for
     shifted in all of the above.

    VT, Dorio: F3 may be the set-up key.  On VT420 and later models
     this key may have been programmed to do something else so turn off
     the power.  When you turn on the power again, hit the F3 key as
     soon as you get an initial screen message.

    IBM: 3151: Ctrl-ScrollLock.  3153: Ctrl-Minus_on_Keypad (or like
     3151)

  To move around in the set-up menus, try the arrow keys.  Use Return,
  Space, or a special key ("toggle" on old terminals) to select.  To
  exit set-up mode select exit from a menu (or on some older terminals
  press the set-up key again).


  13.4.  Communication Options

  For the terminal to work at all, speed, parity, bits/character, and
  communication mode must be set correctly.  Incorrect flow control may
  cause loss and/or corruption of data seen on the screen. The essential
  communication options were dealt with (for both the terminal and
  computer) in another section:  See ``Communication Interface''.  The
  following list provides some links to that section, as well as some
  additional communication options set only at the terminal.


    ``Speed (bits/second) '' (baud rate): 9600, 19200, etc.

    ``Parity'' none, even, odd, mark, space

    ``Bits per Character '' {Data}: 7 or 8

    ``Flow Control:'' or Handshake {Hndshk}: none, Xon-Xoff, or
     hardware (DTR, etc).

    Receiver Handshake {Rcv Hndshk} protects data being Received by the
     terminal by transmitting flow-control signals to the host.

    Transmitter Handshake {Xmt Hndshk} is protection of data being
     Transmitted by the terminal.   The terminal receives flow-control
     signals (and locks/unlocks the keyboard).  Includes "Incoming
     Xon/Xoff".

    number of stop bits: 1 or 2. See ``Voltage Sequence for a Byte''

    Flow control level {Rcv Hndshk Level} {{Xoff at ...}}: Flow control
     will send "stop" when this number of bytes in the terminal's buffer
     is exceeded.

    ``Communication Mode'' {Comm}: ``Full Duplex {FDX}, Half Duplex
     {HDX}'' {{Local Echo}}, ``Local Mode'' {{Online/Local}}

    Transmit Rate (Speed) Limit {Xmt Lim}: limits the transmit rate to
     the specified cps (chars/sec) even though the baud rate setting may
     be at a higher speed.

    Function-Key Rate Limit: as above but for function key messages.

    ``Port Select'': Which physical connecter is for the host {Host
     Port} ?


  13.5.  Saving the Set-up

  Your set-up must be saved in the non-volatile memory of the terminal
  so that it will be effective the next time you turn on the terminal.
  If you fail to save it, then the new settings will be lost when you
  turn off the terminal.  Before you go to the trouble of setting up a
  terminal, make sure that you know how to save the settings.  For
  modern terminals the save command is done via a menu.  In some older
  terminals, only the manual tells how to save.  For many of these you
  press Ctrl-S to save.
  13.6.  Set-Up Options/Parameters

  See the Teemworld's Set-Up <http://www.pericom-
  usa.com/twdocs/doc/twusec7.htm> for a description of many of these
  parameter as used in terminal emulation.  Emulation is often a little
  different than an actual terminal.

  What follows in this section describes some of the options which are
  available in the set-up menus of many terminals.  Options are also
  called parameters or features.  Many options may be called "modes".
  Setting options is often called "configuring".  Many of these options
  may also be set by sending certain escape sequences to the terminal.
  Different models and brands of terminals have various options and the
  same option may be called by different names (not all of which are
  given here) Terse names used by Wyse are enclosed in {...}.  Names
  used mostly for VT terminals are enclosed in {{...}}.


  13.7.  Emulation {Personality} {{Terminal Modes}}

  Most modern terminals can emulate several other terminals.  The
  terminal can likely do more if it is set to emulate itself (actually
  no emulation) {native personality}.   Sometimes there are 2 different
  emulations for the same model of terminal.  For example VT220-7
  emulates a VT220 with 7-bits/byte while VT220-8 emulates a VT220 with
  8-bits/byte (256 possible characters).

  Older models of terminals usually have fewer features than newer
  models.  Suppose one wanted to emulate an old terminal but also wanted
  some of the advanced capabilities of the later model terminal they are
  sitting at.  This is sometimes possible (to some degree).  This
  feature is sometimes called {Enhance} (or Enhanced ??).


  13.8.  Display Options

  13.8.1.  Character Cell Size {Char Cell}

  This is the size of the cell in which a character fits.  It is
  measured in pixels (=tiny dots).  The more dots, the better the
  resolution.   10x16 is 10 dots wide by 16 dots high (16 rows and 10
  columns).  Note the notation is inverted as compared to the notation
  for matrix dimensions which gives rows (height) first..  Also, the
  character cell includes rows and columns of pixels allocated for the
  space between adjacent characters so the cell size which defines the
  boundaries of an actual character may be smaller.


  13.8.2.  Columns/Lines

  Usually 80 columns and 24 or 25 lines.  This means that there may be
  up to 80 characters in a row (line) on the screen.   Many terminals
  have a 132 column option but unless you have a large screen, the tiny
  characters may be hard to read. {{Set 132 column mode}}.  If you set
  25 lines, make sure that this is in the terminfo.  You should also put
  "export LINES=25" into /etc/profile.  If you don't it might result in
  a scrolling problem (see ``Terminal  doesn't scroll''


  13.8.3.  Cursor

  The cursor may be set to appear as a rectangle (= block) {Blk}.  Other
  options are underline {Line} or blinking.  I prefer non-blinking
  {Steady} block since it's big enough to find quickly but there is no
  distractive blinking.  If you set it invisible (an option on some
  terminals) it will disappear but new letters will appear on the screen
  as you type at the invisible cursor.


  13.8.4.  Display Attributes (Magic Cookies)

  ``Display Attributes'' may either be magic cookies or be attribute
  bytes assigned to each character.  For magic cookies, there is a limit
  to their extent: Are they in effect to the end of the line or to the
  end of the page?  It's best to use attribute bytes (which could
  actually be half-bytes = nibbles).


  13.8.5.  Display Control Characters {Monitor}

  May be called various names such as "Display Controls".  When off
  (normal) it's "Interpret Controls".  When set on, you see the escape
  sequences from the host (which you normally never see on the screen).
  So that these sequences may be viewed in sequence on a line, they are
  not acted upon (interpreted) by the terminal.  Except that a CR LF
  sequence creates a new line.  See ``Control Codes''.


  13.8.6.  Double Width/Height

  Some terminals can have their characters double width and/or double
  height.  This feature is seldom needed.  When changing a line to
  double width (DW) the right half (RH) is pushed off the screen and
  there is the question of whether or not to delete (erase) it.
  "Preserve" means to keep the RH of DW lines.  When in double height
  mode, it may be necessary to send each such line twice (the 2nd time
  down one row) in order to get a double-height line on the screen.


  13.8.7.  Reverse Video {Display} (Background Light/Dark)

  Normal video is light (white, green, amber) letters (foreground) on a
  dark (black) background.  Reverse video {Display Light} is the
  opposite: black text on a light background.  This is easier on the
  eyes (unless the room is dark).


  13.8.8.  Status Line

  A status line is a line at the top or bottom of the screen that
  displays info about the application program you are running.  It's
  often highlighted in some way.  With a status line enabled, an
  application can send the terminal a special escape sequence which
  means that the text that follows is for the status line.  However,
  many applications don't use this feature but instead only simulate a
  real status line by direct cursor positioning.  The ordinary user
  looking at it doesn't know the difference.


  13.8.9.  Upon 80/132 Change: Clear or Preserve?

  When switching the number of columns from 80 to 132 (or conversely)
  should the data displayed in the old format be erased (cleared) or
  preserved? {80/132 Clr} {{Screen Width Change}}.  It should make no
  difference how you set this option since if an application program
  uses 132 columns, it should set this option appropriately via a
  control sequence.



  13.9.  Page Related Options

  For a Wyse terminal to be able to access multiple pages of display
  memory {Multipage} must be set to on.


  13.9.1.  Page Size

  The terminal memory may be divided up into a number of pages.  See
  ``Pages'' and ``Pages (definition)'' for explanations of pages.  You
  may partition the page memory into a number of pages of selected
  length.  Linux applications don't seem to use pages at present so it
  shouldn't make much difference how you set this up.


  13.9.2.  Coupling (of cursor & display)

  The terminal memory may be divided up into a number of pages.  See
  ``Pages'' and ``Pages'' for explanations of pages.  When the cursor is
  moved to a location in video memory not currently displayed (such as
  another page, or on the same page but to a location not displayed on
  the screen) should the display change to let one view the new cursor
  location?  If so, this is called "Coupling".  For cursor movement
  within the same page there is "Vertical Coupling" and "Horizontal
  Coupling".  For movement to another page there is "Page Coupling".


  13.10.  Reporting and Answerback

  The terminal will identify itself and its state, or send out a pre-
  recorded message in response to certain escape sequences.


  13.10.1.  Answerback Message (String)

  You may write a short message during set-up which may optionally be
  sent to the host at power-up or be sent to the host in response to a
  request from the host (perhaps the ENQ (inquire) control character).


  13.10.2.  Auto Answerback

  If set, sends the answerback message to the host at power-on without
  the host asking for it.  Do any "getty" processes look for this ??


  13.10.3.  Answerback Concealed

  If set, will never let anyone see the answerback message (except of
  course the host computer).  If it needs to be changed, deselect
  "answerback concealed" and the formerly concealed message will be
  destroyed so you then may enter a new message (but you don't get to
  see the old one).


  13.10.4.  Terminal ID {ANSI ID}

  The terminal send this reply in answer to a request for identity.


  13.11.  Keyboard Options

  13.11.1.  Keyclick

  When set, pressing any key makes a click (broadcast by a tiny
  loudspeaker in the keyboard).  These clicks annoy some people and I
  think it's best to set keyclick off.


  13.11.2.  Caps Lock {Keylock}

  When the Caps-Lock key is down, should only the alphabetic keys
  generate shifted characters?  If set to {Caps} or upper-case-only then
  hitting a number key with the Caps-Lock on will type the number.  To
  get the symbol above the number one must manually hold down the shift
  key.  This is the normal mode.  If set to {Shift} then all keys type
  the shifted character when Caps-Lock is on (hitting the 5 key should
  type % without holding down Shift, etc.).


  13.11.3.  Auto Repeat {Repeat}

  If a key is held down then that key is repeatedly "typed".  This is
  handy for repeatedly typing the same character to create a line across
  the page.


  13.11.4.  Margin Bell

  When the cursor is 8 columns away from the right side of the display,
  a bell is rung (like on an old typewriter).  Almost all editors will
  automatically create a new line if needed (no need to hit the Return
  key) so this feature is seldom needed.


  13.11.5.  Remapping the Keys

  The code sent to the host when a key is pressed is normally the ASCII
  code for that key (depends also on Shift and Control key).  On some
  terminals you may make any key send any code you wish.  That is, you
  may completely remap the keyboard by setting up the terminal that way.
  This may be useful for some foreign languages and Dvorak keyboard
  layouts, etc. which permit one to type faster.


  13.11.6.  Corner Key (for Wyse only)

  Wyse terminals have a key near the lower left corner which may be set
  to do various things.  Its may be labelled "Funct", "Compose
  Character", "Alt", "Hold" or "Scroll Lock".  Early models don't have
  all of the following options:  When set to {Hold} No-Scroll it stops
  the flow of data (using flow control) to the terminal.  Hitting the
  key again restores normal flow.  When set to {Compose} it permits one
  to generate a limited number of pre-defined non-Latin characters.
  When set to Meta, it makes it a meta shift key which sets the high-
  order bit on each byte.  When set to {Funct} (and pressed) any
  alphanumeric key pressed gets a header (SOH) and trailer (CR) byte
  framing the ASCII byte code.  When set to {Kpd Compose} (and pressed)
  then typing a decimal number on the numeric keys (followed by "enter")
  sends out the same number in hexadecimal ??


  13.11.7.  Numeric Keypad or Arrow Keys Sends

  The numeric keypad (the rectangle of mostly numeric keys to the right
  of the main part of the keyboard) can be set to send special codes
  which will do special things in certain application programs.  Ditto
  for the arrow keys.  There is thus a "normal" mode where they send
  what is shown on the keycap (or the normal code sequence for an arrow-
  key) and an "application" mode where a special escape sequence is
  sent.  In some cases there is a "hex" numeric mode which is almost
  like normal numeric mode except that 6 non-numeric keys send the
  letters A-F.  Thus one may type for example "B36F" on the numeric
  keypad.


  13.11.8.  What does shifted-del and shifted-bs send?

  Depending on how they're set up shifted-del sometimes sends the
  control character CAN and shifted backspace sometimes sends DEL.


  13.11.9.  PC Scan Codes

  Newer terminals can emulate a PC keyboard by sending PC scan codes
  (see Keyboard-and-Console-HOWTO) instead of ASCII codes.  This would
  be used if you were directly connected to a PC running Dos/Windows.
  Set {Keycode} to {Scan}.  Emulating the Dec "PCTerm" should do this
  and more.  A serial port under Linux can't cope with such scan codes.


  13.11.10.  Alternate Characters

  Some keys may have alternative letters on them.  When keys is set to
  "Typewriter" they send what they would normally send on a typewriter.
  When keys is set to something else the alternative characters are
  sent.


  13.12.  Meaning of Received Control Codes

  13.12.1.  Auto New Line {Newline}

  In this case "New Line" means a new line starting at the left margin
  below the current line.  In Linux and C "new line" (NL) may have a
  different meaning: the line-feed control character LF also called new-
  line or NL.  This is because in Linux text files, the LF character
  means a "new line starts here" so it's labeled NL.  Normally, a LF
  (NL) sent to a terminal only results in the cursor jumping down one
  line below where is was and does not move the cursor back to the start
  of this "new line".

  If Auto New Line is set, the above "normal" situation is canceled and
  a physical new line is created on the display upon receiving a LF from
  the host.  This is exactly what one wants in Linux.  Except that (when
  Auto New Line is set) the Return (or Enter) key sends a CR LF sequence
  to the host (for Wyse and VT100, but for VT420 ??).  Since Linux uses
  LF as a "new line" marker in files, Linux would like only a LF to be
  sent (and not a CR LF).  Thus the "New Line" option is seldom used.
  Instead, the required translations are made by the serial port device
  driver by default.  It is as if one gave the command "stty onlcr
  icrnl".  But you don't need to do this since it's the default.


  13.12.2.  Auto Line Feed {Rcv CR}

  This is just another type of "Auto New Line".  When a CR (carriage
  return) character is received, a LF (line feed) action is added
  resulting in a new line being displayed.  Since Linux marks the end of
  lines with LF, this option is not used.


  13.12.3.  Recognize Del (Wyse Only ??) or Null

  If off, the DEL character received by the terminal is ignored.  If on
  the DEL performs a destructive backspace.  Null characters are usually
  ignored in any case.  Both DEL and NULL are sometimes used for
  padding.  See ``Padding''
  13.13.  Where New Text Goes

  13.13.1.  Line Wrap

  Also called "Auto Wrap(around)".  What happens when the right edge of
  the screen is reached (col. 80, etc) and no return character (or the
  like) has been sent from the host?  If Line Wrap is set, then the rest
  of the line displays on the line below, etc.  Otherwise, the rest of
  the line is lost and is not seen on the screen.  Any good application
  should handle the situation correctly (provided the terminfo knows how
  Line Wrap is set).  Thus even if Line Wrap is not set, the application
  should either wrap the screen for long lines or provide another way
  for you to view the cutoff tail of long lines (by use of the arrow
  keys, etc).  But a raw copy command (and other situations) may not do
  this so it's often best to set line wrap.

  For an 80 col. screen, most terminals only wrap if the 81st character
  from the host is a graphic (printable) character.  This allows for the
  case where 81st character from the host might be "return" or a
  "newline" (non-graphic characters) which means that the application is
  handing the wrapping OK and intervention by the terminal is not
  needed.


  13.13.2.  Scrolling

  Scrolling {Scrl} is where all the lines on the screen move up or down.
  Its also called "panning" which includes movement sideways.  In
  ordinary scrolling lines roll off the bottom or top of the screen and
  disappear, and new lines from the host appear at the opposite edge
  (top or bottom).  There are 3 types of this: smooth, jump, or burst.
  Burst is not really scrolling since its an instant replacement of an
  old screenfull by a new one (although some lines on the new screen may
  be from the old screen).  Jump is where new lines jump into view one
  at a time.  Smooth {Smth} is where the text moves at a steady speed
  upward or downward.  If the smooth scroll rate is slow enough, one may
  read the newly visible lines when they are still scrolling (in
  motion).

  Smooth scrolling on slow terminals was once useful since one could
  continue reading as the display was scrolling.  But with higher baud
  rates, jump scroll is so fast that little time is lost as the new
  display appears.  Since it takes a little longer to read scrolling
  text than fixed text, it may actually waste more time if smooth
  scrolling is selected.

  If (auto)scrolling {Autoscrl} is disabled, then new text from the host
  must go somewhere so it is put at the top of the display.  If the old
  text is not erased, the new text merges (nonsensically) into the old.
  If the old text is erased, then the new text is out of context.  So
  keep (auto)scrolling enabled.


  13.13.3.  New Page?

  See ``Pages'' and ``Pages'' for explanations of pages.  When the
  current page is full (the last line is finished) should the page
  scroll, or should a new page be created (leaving the previous page
  stored in the terminal's display memory).  If {Autopage} is set, then
  a new page is created.  Since you are probably not using pages, you
  should probably set this to off.



  13.14.  Function Keys

  These are the keys labeled F1, F2, etc.  On older terminals they may
  be labeled PF1, PF2, etc. where the P stands for Programmable.  Some
  keyboards have both.  One may program (redefine) these keys to send
  out a string of user-defined bytes.  They may often be easily
  "programmed" using a certain set-up menu {FKey}.  On some terminals,
  one may also specify where this string is sent to when the key is
  pressed.  In "normal" mode, pressing the key is just like typing the
  string at the keyboard.  In "local" mode pressing the key sends it to
  the terminal (just like if the terminal was in local mode).  This may
  be used to send escape sequences to the terminal so as to configure it
  in a special way.  In "remote" mode, the string is always sent out the
  serial port to the host computer (even if the terminal is in local
  mode).


  13.15.  Block Mode Options

  Some options are only for the case of ``Block Mode''.  This option is
  powerful since it provides forms and takes load off the host computer
  by transmitting in bursts.  But it's more complicated to set up and is
  thus not used too much.


  13.15.1.  Forms Display

  In block mode some regions of the screen are for the text of forms and
  are thus write-protected "Prot" {WPRT}.  Options may set the
  characters in these regions to appear dim, reverse video {WPRT Rev},
  and/or underlined {WPRT Undrln}.  {WPRT Intensity} may be set to dim,
  normal, or even blank (invisible)


  13.15.2.  Send Entire Block ?

  Should write-protected text (the original text in the form) be sent to
  the host upon transmission of a block: {Send All} or is write-
  protected text also read-protected: {Send Erasable}


  13.15.3.  Region to Send

  Should the entire screen be sent or just the scrolling region?  {Send
  Area}.  Should the sending stop when the current cursor position is
  reached?  If {Xfer Term} is set to Cursor, only the data on the screen
  up to the cursor is sent.


  13.15.4.  Block/Page terminator

  What is the termination symbol to be appended to a block of data?
  {Blk End} or at the end of a page {Send Term}ination.


  13.16.  Locks

  There are various types of Locks.  One is the Locked keyboard due to
  flow control.  See ``Keyboard Lock'' Another lock {Feature Lock} is
  that which prohibits the host computer from changing the terminal set-
  up by sending certain escape sequences to the terminal.  Placing such
  a lock may result in unexpected behavior as application programs send
  escape sequences to the terminals that are ignored.  Not all set-up
  parameters lock.  Unless you have a good reason to do so, you should
  not enable such locking.

  A Function Key lock will prohibit the computer from redefining what a
  programmable function key sends.  You may want to use this if you have
  something important programmed into the function keys.


  13.17.  Screen Saver {Scrn Saver}

  Also called "CRT Saver".  This turns off (or dims) the screen after
  the terminal is not used for a period of time.  It prolongs the life
  of the screen and may save some energy.  Hitting any key will usually
  restore the screen and may "execute" that key so it's best to hit the
  shift-key, etc.


  13.18.  Printer

  For Wyse, if there is no {Printer Attached} set it to Off.  It's not
  essential to do this, but if you do it any escape sequence to send
  text to the printer (instead of the terminal) will be ignored.

  Setting up the printer port is about the same (usually simpler) as
  setting up the communications on the main port.  There are a couple of
  options specific to the printer.  Is the printer a serial or parallel
  printer?  If it's parallel it should be designated as such in setup
  and connected to the parallel port on the terminal (if there is one).
  Should a FF (form feed) be sent to the printer at the end of a print
  job?  If {Print Term} is set to FF, this will happen.


  14.  Computer Set-Up (Configure) Details

  There are various files to edit to set up the computer for terminals.
  If you're lucky, you'll only need to edit /etc/inittab.  One does this
  by editing at the console (or from any working terminal).


  14.1.  Getty (in /etc/inittab)

  In order to have a login process run on a serial port when the
  computer starts up (or switches run levels) a getty command must be
  put into the /etc/inittab file.  Getty GETs a TTY (a terminal) going.
  Each terminal needs its own getty command.  There is also at least one
  getty command for the console in every /etc/inittab file.  Find this
  and put the getty commands for the real terminals next to it.  This
  file may contain sample getty lines for text terminals that are
  commented out so that all you need to do is to uncomment them (remove
  the leading #) and change a few arguments.

  The arguments which are permitted depend on which getty you use:
  Two gettys best for directly connected terminals are:

  1. agetty (sometimes just called getty): Very easy to set up. No
     config files.  See ``Agetty''

  2. ``getty (part of getty_ps)''

     Two gettys best for modems (avoid for terminals) are:

  1. mgetty: the best one for modems; works for terminals too but
     inferior

  2. uugetty: for modems only; part of the getty_ps package

     A simple getty to use only where the monitor is the console.  Most
     Linux users with a text interface have this setup and don't use a
     real text-terminal.
  1. mingetty: for monitor-consoles only


  If you don't have the getty you want check other distributions and the
  alien program to convert between RPM and Debian packages.  The source
  code may be downloaded from Serial Software
  <http://sunsite.unc.edu/pub/Linux/system/serial/>.

  If you are not using modem control lines (for example if you only use
  the minimum number of 3 conductors: transmit, receive, and common
  signal ground) you should let getty know this by using a "local" flag.
  The format of this depends on which getty you use.


  14.1.1.  Agetty (may be named getty)

  An example line in /etc/inittab:


       S1:23:respawn:/sbin/getty -L 19200 ttyS1 vt102



  S1 is from ttyS1.  23 means that getty is run upon entering run levels
  2 or 3.  respawn means that if getty is killed, it will automatically
  start up (respawn) again.  /sbin/getty is the getty command.  The -L
  means Local (ignore modem control signals).  -h (not shown in the
  example) enables hardware flow control (same as stty crtscts).  19200
  is the baud rate.  ttyS1 means /dev/ttyS1 (COM2 in MS-DOS).  vt102 is
  the type of terminal and this getty will set the environment variable
  TERM to this value.  There are no configuration files.  Type "init q"
  on the command line after editing getty and you should see a login
  prompt.


  14.1.1.1.  Agetty's detection of parity

  The agetty program will auto-detect any parity set inside the
  terminal.  Except it will not work if you use 8-bit data bytes with
  1-bit parity.  See ``Agetty's parity with 8-bit data bytes''.  If you
  use stty to set parity, agetty will automatically unset it since it
  wants the parity bit to come thru as if it was a data bit.  This is
  because it needs to get the last bit (possibly a parity bit) as you
  type your login-name so that it can auto-detect parity.  Thus if you
  use parity, enable it only at the terminals and let agetty auto-detect
  it and set it at the computer.  If your terminal supports received
  parity, the login prompt will look garbled until you type something so
  that getty can detect the parity.  The garbled prompt will deter
  visitors, etc. from trying to login.  That could be just what you
  want.

  There is sometimes a problem with auto detection of parity.  This
  happens because after you first type your login name, agetty uses the
  login program to finish logging you in.  If the first login attempt
  fails, login runs again to handle all future attempts at logging in
  (including the type-in of your login-name).  The problem is that only
  agetty can detect parity while the login program doesn't detect
  parity.  So if for some reason you wind up in the login program and
  the correct parity hasn't yet been detected, you're in trouble since
  the login program can't detect the parity.  With wrong parity, the
  login program can't correctly read what you type and you can't log in.
  If your terminal supports received parity, you will continue to see a
  garbled screen.


  One may get into this "login loop" in various ways.  Suppose you only
  type a single letter or two for your login name and then hit return.
  If these letters are not sufficient for parity detection, then login
  runs before parity has been detected.  Sometimes this problem happens
  if you don't have the terminal on and connected when agetty first
  starts up.  If you get stuck in this "login" loop a solution is to
  just wait about a minute until agetty runs again due to "timeout".


  14.1.1.2.  Agetty's parity with 8-bit data bytes

  Unfortunately, agetty can't detect this parity.  It (as of late 1999)
  has no option for disabling the auto-detection of parity and thus will
  detect incorrect parity.  The result is that the login process will be
  garbled and parity will be set wrong.  Thus it doesn't seem feasible
  to try to use 8-bit data bytes with parity.


  14.1.2.  getty (part of getty_ps)

  (This is from the old Serial-HOWTO by Greg Hankins)
  Add entries for getty to use for your terminal in  the configuration
  file /etc/gettydefs if there they aren't already there:



       # 38400 bps Dumb Terminal entry
       DT38400# B38400 CS8 CLOCAL # B38400 SANE -ISTRIP CLOCAL #@S @L login: #DT38400

       # 19200 bps Dumb Terminal entry
       DT19200# B19200 CS8 CLOCAL # B19200 SANE -ISTRIP CLOCAL #@S @L login: #DT19200

       # 9600 bps Dumb Terminal entry
       DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S @L login: #DT9600



  If you want, you can make getty print interesting things in the login
  banner.  In my examples, I have the system name and the serial line
  printed.  You can add other things:


       @B    The current (evaluated at the time the @B is seen) bps rate.
       @D    The current date, in MM/DD/YY.
       @L    The serial line to which getty is attached.
       @S    The system name.
       @T    The current time, in HH:MM:SS (24-hour).
       @U    The number of currently signed-on users.  This is  a
             count of the number of entries in the /etc/utmp file
             that have a non-null ut_name field.
       @V    The value of VERSION, as given in the defaults file.
       To display a single '@' character, use either '\@' or '@@'.



  When you are done editing /etc/gettydefs, you can verify that the
  syntax is correct by doing:


       linux# getty -c /etc/gettydefs



  Make sure there is no getty or uugetty config file for the serial port
  that your terminal is attached to (/etc/default/{uu}getty.ttySN or
  /etc/conf.{uu}getty.ttySN), as this will probably interfere with
  running getty on a terminal.  Remove the file if it exits.

  Edit your /etc/inittab file to run getty on the serial port
  (substituting in the correct information for your environment - port,
  speed, and default terminal type):


       S1:23:respawn:/sbin/getty ttyS1 DT9600 vt100



  Restart init:


       linux# init q



  At this point, you should see a login prompt on your terminal.  You
  may have to hit return to get the terminal's attention.


  14.1.3.  mgetty

  The "m" stands for modem.  This program is primarily for modems and as
  of mid 1999 doesn't always work very well for text-terminals.  It's
  poorly documented for terminals and you may need to wade thru much
  documentation for modems in order to figure out how to use it for
  terminals.  Look at the last lines of /etc/mgetty/mgetty.config for an
  example of configuring it for a terminal.  It will only support
  software (Xon/Xoff) flow control (used by many terminals) if you
  recompile it.  This will be hopefully be fixed in the future.  It
  would be nice to use the same getty for terminals as for modems but
  mgetty needs a little fixing to fill the bill.


  14.2.  Stty & Setserial

  There is both a "stty" command and a "setserial" command for setting
  up the serial ports.   Some (or all) of the needed stty settings can
  be done via getty and there may be no need to use setserial so you may
  not need to use either command.  These two commands (stty and
  setserial) set up different aspects of the serial port.  Stty does the
  most while setserial configures the low-level stuff such as interrupts
  and port addresses.  To "save" the settings, these commands must be
  written in certain files (shell scripts) which run each time the
  computer starts up.  Distributions of Linux often supply a shell
  script which runs setserial but seldom supply one which runs stty
  since on seldom need it.


  14.3.  Setserial

  This part is in 3 HOWTOs: Modem, Serial, and Text-Terminal.  There are
  some minor differences, depending on which HOWTO it appears in.


  14.3.1.  Introduction

  Don't ever use setserial with Laptops (PCMCIA).  setserial is a
  program which allows you to tell the device driver software the I/O
  address of the serial port, which interrupt (IRQ) is set in the port's
  hardware, what type of UART you have, etc.  It can also show how the
  driver is currently set.  In addition, it can be made to probe the
  hardware and try to determine the UART type and IRQ, but this has
  severe limitations.  See ``Probing''.  Note that it can't set the IRQ
  or the port address in the hardware of PnP serial ports.

  If you only have one or two built-in serial ports, they will usually
  get set up correctly without using setserial.  Otherwise (or if there
  are problems with the serial port) you will likely need to deal with
  setserial.  Besides the man page for setserial, check out info in
  /usr/doc/setserial.../ or /usr/share/doc/setserial.  It should tell
  you how setserial is handled in your distribution of Linux.

  Setserial is often run automatically at boot-time by a start-up shell-
  script for the purpose of assigning IRQs, etc. to the driver.
  Setserial will only work if the serial module is loaded (or if the
  equivalent was compiled into your kernel).  If you should (for some
  reason) unload the serial module later on, the changes previously made
  by setserial will be forgotten by the kernel.  So setserial must be
  run again to reestablish them.  In addition to running via a start-up
  script, something akin to setserial also runs earlier when the serial
  module is loaded (or the like).  Thus when you watch the start-up
  messages on the screen it may look like it ran twice, and in fact it
  has.

  Setserial can set the time that the port will keep operating after
  it's closed (in order to output any characters still in its buffer in
  main RAM).  This is needed at slow baud rates of 1200 or lower.  It's
  also needed at higher speeds if there are a lot of "flow control"
  waits.  See "closing_wait" in the man pg.  If your serial port is
  Plug-and-Play you may need to consult other HOWTOs such as Plug-and-
  Play or Serial.

  Setserial does not set either IRQ's nor I/O addresses in the serial
  port hardware itself.  That is done either by jumpers or by plug-and-
  play.  You must tell setserial the identical values that have been set
  in the hardware.  Do not just invent some values that you think would
  be nice to use and then tell them to setserial.  However, if you know
  the I/O address but don't know the IRQ you may command setserial to
  attempt to determine the IRQ.

  You can see a list of possible commands by just typing setserial with
  no arguments.  This fails to show you the one-letter options such as
  -v for verbose which you should normally use when troubleshooting.
  Note that setserial calls an IO address a "port".  If you type:


       setserial -g /dev/ttyS*



  you'll see some info about how that device driver is configured for
  your ports.  Note that where it says "UART: unknown" it probably means
  that no uart exists.  In other words you probably have no such serial
  port and the other info shown about the port is meaningless and should
  be ignored.  If you really do have such a serial port, setserial
  doesn't recognize it and that needs to be fixed.

  If you add -a to the option -g you will see more info although few
  people need to deal with (or understand) this additional info since
  the default settings you see usually work fine.  In normal cases the
  hardware is set up the same way as "setserial" reports, but if you are
  having problems there is a good chance that "setserial" has it wrong.
  In fact, you can run "setserial" and assign a purely fictitious I/O
  port address, any IRQ, and whatever uart type you would like to have.
  Then the next time you type "setserial ..." it will display these
  bogus values without complaint.  Of course the serial port driver will
  not work correctly (if at all) if you attempt to use such a port.
  Thus when giving parameters to "setserial" anything goes.  It gives
  you no warning if what you tell it is incorrect and will allow you to
  create conflicts in IRQs and I/O port addresses that will have
  disastrous results later on.

  While assignments made by setserial are lost when the PC is powered
  off, a configuration file may restore them (or a previous
  configuration) when the PC is started up again.  In newer versions,
  what you change by setserial gets automatically saved to a
  configuration file.  In older versions, the configuration file only
  changes if you edit it manually so the configuration remains the same
  from boot to boot.  See ``Configuration Scripts/Files''


  14.3.2.  Probing

  With appropriate options, setserial can probe (at a given I/O address)
  for a serial port but you must guess the I/O address.  If you ask it
  to probe for /dev/ttyS2 for example, it will only probe at the address
  it thinks ttyS2 is at (2F8).  If you tell setserial that ttyS2 is at a
  different address, then it will probe at that address, etc.  See
  ``Probing''

  The purpose of this is to see if there is a uart there, and if so,
  what its IRQ is.  Use "setserial" mainly as a last resort as there are
  faster ways to attempt it such as wvdialconf to detect modems, looking
  at very early boot-time messages, or using pnpdump --dumpregs.  To try
  to detect the physical hardware use the -v (verbose) and autoconfig
  command to setserial.  If the resulting message shows a uart type such
  as 16550A, then you're OK.  If instead it shows "unknown" for the uart
  type, then there is supposedly no serial port at all at that I/O
  address.  Some cheap serial ports don't identify themselves correctly
  so if you see "unknown" you still might have a serial port there.

  Besides auto-probing for a uart type, setserial can auto-probe for
  IRQ's but this doesn't always work right either.  In versions of
  setserial >= 2.15, the results of your last probe test may be saved
  and put into the configuration file /etc/serial.conf which will be
  used next time you start Linux.  At boot-time when the serial module
  loads (or the like), a probe for UARTs is made automatically and
  reported on the screen.  But the IRQs shown may be wrong.  The second
  report of the same is the result of a script which usually does no
  probing and thus provides no reliable information as to how the
  hardware is actually set.  It only shows configuration date someone
  wrote into the script or data that got saved in /etc/serial.conf.

  It may be that two serial ports both have the same IO address set in
  the hardware.  Of course this is not permitted but it sometimes
  happens anyway.  Probing detects one serial port when actually there
  are two.  However if they have different IRQs, then the probe for IRQs
  may show IRQ = 0.  For me it only did this if I first used setserial
  to give the IRQ a ficticious value.


  14.3.3.  Boot-time Configuration

  When the kernel loads the serial module (or if the "module equivalent"
  is built into the kernel) then only ttyS{0-3} are auto-detected and
  the driver is set to use only IRQs 4 and 3 (regardless of what IRQs
  are actually set in the hardware).  You see this as a boot-time
  message just like as if setserial had been run.  If you use 3 or more
  ports, this may result in IRQ conflicts.
  To fix such conflicts by telling setserial the true IRQs (or for other
  reasons) there may be a file somewhere that runs setserial again.
  This happens early at boot-time before any process uses the serial
  port.  In fact, your distribution may have set things up so that the
  setserial program runs automatically from a start-up script at boot-
  time.  More info about how to handle this situation for your
  particular distribution might be found in file named "setserial..." or
  the like located in directory /usr/doc/ or /usr/share/doc/.


  14.3.4.  Configuration Scripts/Files

  Your objective is to modify (or create) a script file in the /etc tree
  that runs setserial at boot-time.  Most distributions provide such a
  file (but it may not initially reside in the /etc tree).  In addition,
  setserial 2.15 and higher often have an /etc/serial.conf file that is
  used by the above script so that you don't need to directly edit the
  script that runs setserial.  In addition just using setserial on the
  command line (2.15+) may ultimately alter this configuration file.

  So prior to version 2.15 all you do is edit a script.  After 2.15 you
  may need to either do one of three things: 1. edit a script.  2. edit
  /etc/serial.conf or 3. run "setserial" on the command line which will
  result in /etc/serial.conf automatically being edited.  Which one of
  these you need to do depends on both your particular distribution, and
  how you have set it up.


  14.3.5.  Edit a script (after version 2.15: perhaps not)

  Prior to setserial 2.15 (1999) there was no /etc/serial.conf file to
  configure setserial.   Thus you need to find the file that runs
  "setserial" at boot time and edit it.  If it doesn't exist, you need
  to create one (or place the commands in a file that runs early at
  boot-time).  If such a file is currently being used it's likely
  somewhere in the /etc directory-tree.  But Redhat <6.0 has supplied it
  in /usr/doc/setserial/ but you need to move it to the /etc tree before
  using it.   You might use "locate" to try to find such a file.  For
  example, you could type: locate "*serial*".

  The script /etc/rc.d/rc.serial was commonly used in the past.  The
  Debian distribution used /etc/rc.boot/0setserial.  Another file once
  used was /etc/rc.d/rc.local but it's not a good idea to use this since
  it may not be run early enough.  It's been reported that other
  processes may try to open the serial port before rc.local runs
  resulting in serial communication failure.

  If such a file is supplied, it should contain a number of commented-
  out examples.  By uncommenting some of these and/or modifying them,
  you should be able to set things up correctly.  Make sure that you are
  using a valid path for setserial, and a valid device name.  You could
  do a test by executing this file manually (just type its name as the
  super-user) to see if it works right.  Testing like this is a lot
  faster than doing repeated reboots to get it right.  Of course you can
  also test a single setserial command by just typing it on the command
  line.

  If you want setserial to automatically determine the uart and the IRQ
  for ttyS3 you would add something like:



       /sbin/setserial /dev/ttyS3 auto_irq skip_test autoconfig



  Do this for every serial port you want to auto configure.  Be sure to
  give a device name that really does exist on your machine.  In some
  cases this will not work right due to the hardware so if you know what
  the uart and irq actually are, may want to assign them explicitly with
  "setserial".  For example:



       /sbin/setserial /dev/ttyS3 irq 5 uart 16550A  skip_test



  For versions >= 2.15 (provided your distribution implemented the
  change, Redhat didn't) it may be more tricky to do since the file that
  runs setserial on startup, /etc/init.d/setserial or the like was not
  intended to be edited by the user.  See ``New configuration method
  using /etc/serial.conf''.



  14.3.6.  New configuration method using /etc/serial.conf

  Prior to setserial version 2.15, the way to configure setserial was to
  manually edit the shell-script that ran setserial at boot-time.  See
  ``Edit a script (after version 2.15: perhaps not)''.  Starting with
  version 2.15 (1999) of setserial this shell-script is not edited but
  instead gets its data from a configuration file: /etc/serial.conf.
  Furthermore you may not even need to edit serial.conf because using
  the "setserial" command on the command line may automatically cause
  serial.conf to be edited appropriately.

  This was intended to make it so that you don't need to edit any file
  in order to set up (or change) setserial so it will do the right thing
  each time that Linux is booted.  But there are serious pitfalls
  because it's not really "setserial" that edits serial.conf.  Confusion
  is compounded because different distributions handle this differently.
  In addition, you may modify it so it works differently.

  What often happens is this:  When you shut down your PC the script
  that runs "setserial" at boot-time is run again, but this time it only
  does what the part for the "stop" case says to do:  It uses
  "setserial" to find out what the current state of "setserial" is and
  puts that info into the serial.conf file.  Thus when you run
  "setserial" to change the serial.conf file, it doesn't get changed
  immediately but only when and if you shut down normally.

  Now you can perhaps guess what problems might occur.  Suppose you
  don't shut down normally (someone turns the power off, etc.) and the
  changes don't get saved.  Suppose you experiment with "setserial" and
  forget to run it a final time to restore the original state (or make a
  mistake in restoring the original state).  Then your "experimental"
  settings are saved.

  If you manually edit serial.conf, then your editing is destroyed when
  you shut down because it gets changed back to the state of setserial
  at shutdown.  There is a way to disable the changing of serial.conf at
  shutdown and that is to remove "###AUTOSAVE###" or the like from first
  line of serial.conf.  In at least one distribution, the removal of
  "###AUTOSAVE###" from the first line is automatically done after the
  first time you shutdown just after installation.  The serial.conf file
  will hopefully contain some comments to help you out.

  The file most commonly used to run setserial at boot-time (in
  conformance with the configuration file) is now /etc/init.d/setserial
  (Debian) or /etc/init.d/serial (Redhat), or etc.,  but it should not
  normally be edited.  For 2.15 Redhat 6.0 just had a file
  /usr/doc/setserial-2.15/rc.serial which you have to move to
  /etc/init.d/ if you want setserial to run at boot-time.

  To disable a port, use setserial to set it to "uart none".  The format
  of /etc/serial.conf appears to be just like that of the parameters
  placed after "setserial" on the command line with one line for each
  port.  If you don't use autosave, you may edit /etc/serial.conf
  manually.

  BUG: As of July 1999 there is a bug/problem since with ###AUTOSAVE###
  only the setserial parameters displayed by "setserial -Gg /dev/ttyS*"
  get saved but the other parameters don't get saved.  Use the -a flag
  to "setserial" to see all parameters.  This will only affect a small
  minority of users since the defaults for the parameters not saved are
  usually OK for most situations.  It's been reported as a bug and may
  be fixed by now.

  In order to force the current settings set by setserial to be saved to
  the configuration file (serial.conf) without shutting down, do what
  normally happens when you shutdown: Run the shell-script
  /etc/init.d/{set}serial stop.  The "stop" command will save the
  current configuration but the serial ports still keep working OK.

  In some cases you may wind up with both the old and new configuration
  methods installed but hopefully only one of them runs at boot-time.
  Debian labeled obsolete files with "...pre-2.15".


  14.3.7.  IRQs

  By default, both ttyS0 and ttyS2 will share IRQ 4, while ttyS1 and
  ttyS3 share IRQ 3.  But actually sharing serial interrupts (using them
  in running programs) is not permitted unless you: 1. have kernel 2.2
  or better, and 2. you've complied in support for this, and 3. your
  serial hardware supports it.  See Serial-HOWTO: Interrupt sharing and
  Kernels 2.2+.


  If you only have two serial ports, ttyS0 and ttyS1, you're still OK
  since IRQ sharing conflicts don't exist for non-existent devices.

  If you add an internal modem and retain ttyS0 and ttyS1, then you
  should attempt to find an unused IRQ and set it both on your serial
  port (or modem card) and then use setserial to assign it to your
  device driver.  If IRQ 5 is not being used for a sound card, this may
  be one you can use for a modem.  To set the IRQ in hardware you may
  need to use isapnp, a PnP BIOS, or patch Linux to make it PnP.  To
  help you determine which spare IRQ's you might have, type "man
  setserial" and search for say: "IRQ 11".



  14.4.  Stty

  14.4.1.  Introduction

  stty does much of the configuration of the serial port but since
  application programs (and the getty program) often handle it, you may
  not need to use it much.  It's handy if your having problems or want
  to see how the port is set up.  Try typing ``stty -a'' at your
  terminal/console to see how it's now set.  Also try typing it without
  the -a (all) for a short listing which shows how it's set different
  than normal.  Don't try to learn all the setting unless you want to
  become a serial guru.  Most of the defaults should work OK and some of
  the settings are needed only for certain obsolete dumb terminals made
  in the 1970's.

  Whereas setserial only deals with actual serial ports, stty is used
  both for serial ports and for virtual terminals such as the standard
  Linux text interface at a PC monitor.  For the PC monitor, many of the
  stty settings are meaningless.  Changing the baud rate, etc. doesn't
  appear to actually do anything.

  Here are some of the items stty configures: speed (bits/sec), parity,
  bits/byte, # of stop bits, strip 8th bit?, modem control signals, flow
  control, break signal, end-of-line markers, change case, padding, beep
  if buffer overrun?, echo what you type to the screen, allow background
  tasks to write to terminal?, define special (control) characters (such
  as what key to press for interrupt).  See the stty man or info page
  for more details.  Also see the man page: termios which covers the
  same options set by stty but (as of mid 1999) covers features which
  the stty man page fails to mention.

  With some implementations of getty (getty_ps package), the commands
  that one would normally give to stty are typed into a getty
  configuration file: /etc/gettydefs.  Even without this configuration
  file, the getty command line may be sufficient to set things up so
  that you don't need stty."')

  One may write C programs which change the stty configuration, etc.
  Looking at some of the documentation for this may help one better
  understand the use of the stty command (and its many possible
  arguments).  Serial-Programming-HOWTO is useful.  The manual page:
  termios contains a description of the C-language structure (of type
  termios) which stores the stty configuration in computer memory.  Many
  of the flag names in this C-structure are almost the same (and do the
  same thing) as the arguments to the stty command.


  14.4.2.  Using stty for a "foreign" terminal

  Using stty to inspect or configure the terminal that you are currently
  using is easy.  Doing it for a different (foreign) terminal or serial
  port may be tricky.  For example, let's say you are at the PC monitor
  (tty1) and want to use stty to deal with the serial port ttyS2.  Prior
  to about 2000 you needed to use the redirection operator "<".  After
  2000 (provided your version of setserial is >= 1.17 and stty >= 2.0)
  there is an alternate method using the -F option.  This will work when
  the old redirection method fails.  Even with the latest versions be
  warned that if there is a terminal on ttyS2 and a shell is running on
  that terminal, then what you see will likely be deceptive and trying
  to set it will not work.  See ``Two Interfaces at a Terminal'' to
  understand it.

  The new method is ``stty -F /dev/ttyS2 ...'' (or --file instead of F).
  If  ... is -a it displays all the stty settings.  The old redirection
  method (which still works in later versions) is to type ``stty ...
  </dev/ttyS2''.   If the new method works but the old one hangs, it
  implies that the port is hung due to lack of a modem control line from
  being asserted.  Thus the old method is still useful for
  troubleshooting.  See the following subsection.


  14.4.2.1.  Old redirection method

  Here's a problem with the old redirection operator (which doesn't
  happen if you use the newer -F option instead).  Sometimes when trying
  to use stty, the command hangs and nothing happens (you don't get a
  prompt for a next command even after hitting <return>).  This is
  likely due to the port being stuck because it's waiting for one of the
  modem control lines to be asserted.  For example, unless you've set
  "clocal" to ignore modem control lines, then if no CD signal is
  asserted the port will not open and stty will not work for it (unless
  you use the newer -F option).  A similar situation seems to exist for
  hardware flow control.  If the cable for the port doesn't even have a
  conductor for the pin that needs to be asserted then there is no easy
  way to stop the hang.

  One way to try to get out of the above hang is to use the newer -F
  option and set "clocal" and/or "crtscts".  If you don't have the -F
  option then you may try to run program on the port that will force it
  to operate even if the control lines say not to.  Then hopefully this
  program might set the port so it doesn't need the control signal in
  the future in order to open: clocal or -crtscts.  To use "minicom" to
  do this you have to reconfigure minicom for another ttyS, etc, and
  then exit it and restart it.  Since you then have to reconfigure
  minicom again, it may be simpler to just reboot the PC.

  The old redirection method makes ttyS2 the standard input to stty.
  This gives the stty program a link to the "file" ttyS2 so that it may
  "read" it.  But instead of reading the bytes sent to ttyS2 as one
  might expect, it uses the link to find the configuration settings of
  the port so that it may read or change them.  Some people tried to use
  ``stty ... > /dev/ttyS2'' to set the terminal.  This will not do it.
  Instead, it takes the message normal displayed by the stty command for
  the terminal you are on (say tty1) and sends this message to ttyS2.
  But it doesn't change any settings for ttyS2.


  14.4.3.  Two interfaces at a terminal

  When using a shell (such as bash) with command-line-editing enabled
  there are two different terminal interfaces (what you see when you
  type stty -a).  When you type at the command line you have a temporary
  "raw" interface (or raw mode) where each character is read by the
  command-line-editor as you type it.  Once you hit the <return> key,
  the command-line-editor is exited and the terminal interface is
  changed to the nominal "cooked" interface (cooked mode) for the
  terminal.  This cooked mode lasts until the next prompt is sent to the
  terminal.  Note that one never types anything to this cooked mode but
  what was typed in raw mode becomes cooked mode as soon as one hits the
  <return> key.

  When a prompt is sent to the terminal the terminal goes from "cooked"
  to "raw" mode (just like it does when you start an editor since you
  are starting the command-line editor).  The settings for the "raw"
  mode are based only on the basic settings taken from the "cooked"
  mode.  Raw mode keeps these setting but changes several other settings
  in order to change the mode to "raw".  It is not at all based on the
  settings used in the previous "raw" mode.  Thus if one uses stty to
  change settings for the raw mode, such settings will be lost as soon
  as one hits the <return> key at the terminal that has supposedly been
  "set".

  Now when one types stty to look at the terminal interface, one may
  either get a view of the cooked mode or the raw mode.  You need to
  figure out which one you're looking at.  It you use stty from another
  terminal to deal with a terminal that is displaying a command line,
  then the view is that of the raw mode.  Any changes made will only be
  made to the raw mode and will be lost when someone presses <return> at
  the terminal you tried to "set".  But if you type a stty command at
  your terminal (without using < for redirection) and then hit <return>
  it's a different story.  The <return> puts the terminal in cooked
  mode.  Your changes are saved and will still be there when the
  terminal goes back into raw mode (unless of course it's a setting not
  allowed in raw mode).

  This situation can create problems.  For example, suppose you corrupt
  your terminal interface and to restore it you go to another terminal
  and "stty -F dev/ttyS1 sane" (or the like) to restore it.  It will not
  work!  Of course you can try to type "stty sane ..." at the terminal
  that is corrupted but you can't see what you typed.  All the above not
  only applies to dumb terminals but to virtual terminals used on a PC
  Monitor as well as to the terminal windows in X.  In other words, it
  applies to almost everyone who uses Linux.  Luckily, a file that runs
  stty at boot-time will likely deal with a terminal (or serial port
  with no terminal) that has no shell running on it so there's no
  problem.


  14.4.4.  Where to put the stty command ?

  Should you need to have stty set up the serial interface each time the
  computer starts up then you need to put the stty command in a file
  that will be executed each time the computer is started up (Linux
  boots).  It should be run before the serial port is used (including
  running getty on the port).  There are many possible places to put it.
  If it gets put in more than one place and you only know about (or
  remember) one of those places, then a conflict is likely.  So make
  sure to document what you do.

  One place to put it would be in the same file that runs setserial when
  the system is booted.  The location is distribution and version
  dependent.  It would seem best to put it after the setserial command
  so that the low level stuff is done first.  If you have directories in
  the /etc tree where every file in them is executed at boot-time
  (System V Init) then you could create a file named "stty" for this
  purpose.



  14.5.  Terminfo & Termcap (brief)

  See ``Terminfo and Termcap (detailed)'' for a more detailed discussion
  of termcap.  Many application programs that you run use the terminfo
  (formerly termcap) data base.  This has an entry (or file) for each
  model or type (such as vt100) of terminal and tells what the terminal
  can do, what codes to send for various actions, and what codes to send
  to the terminal to initialize it.

  Since many terminals (and PC's also) can emulate other terminals and
  have various "modes" of operation, there may be several terminfo
  entries from which to choose for a given physical terminal.  They
  usually will have similar names.  The last parameter of getty (for
  both agetty and getty_ps) should be the terminfo name of the terminal
  (or terminal emulation) that you are using (such as vt100).

  The terminfo does more than just specify what the terminal is capable
  of doing and disclose what codes to send to the terminal to get it to
  do those things.  It also specifies what "bold" will look like (will
  it be reverse video or will it be high intensity, etc.), what the
  cursor will look like, if the letters will be black, white, or some
  other color, etc.  In PC terminology these are called "preferences".
  It also specifies initialization codes to send to the terminal
  (analogous to the init strings sent to modems).  Such strings are not
  automatically sent to the terminal by Linux.  See ``Init String''.  If
  you don't like the way the display on the screen looks and behaves you
  may need to edit (and then update) the terminfo (or termcap) file.
  See ``Terminfo Compiler (tic)'' for how to update.

  14.6.  Setting TERM and TERMINFO

  These are two environment variables for terminals: TERM and TERMINFO,
  but you may not need to do anything about them.  TERM must always be
  set to the  type of the terminal you are using (such as vt100).  If
  you don't know the type (name) see ``What is the terminfo name of my
  terminal ?''.  TERMINFO contains the path to the terminfo data base,
  but may not be needed if the database is in a default location (or
  TERMINFO could be set automatically by a file that comes with your
  distribution of Linux).  You may want to look at `` Compiled  database
  locations''.

  Fortunately, the getty program usually sets TERM for you just before
  login.  It just uses the terminal type that was specified on getty's
  command line (in /etc/inittab).  This permits application programs to
  find the name of your terminal and then look up the terminal
  capabilities in the terminfo data base.  See ``TERM Variable'' for
  more details on TERM.

  If your terminfo data base can't be found you may see an error message
  about it on your terminal.  If this happens it's time to check out
  where terminfo resides and set TERMINFO if needed.  You may find out
  where the terminfo database is by searching for a common terminfo file
  such as "vt100" using the "locate" command.  Make sure that your
  terminal is in this database.  An example of setting TERMINFO is:
  export TERMINFO=/usr/share/terminfo (put this in /etc/profile or the
  like).  If the data for your terminal in this data base is not to your
  liking, you may need to edit it.  See ``Terminfo & Termcap (brief)''.


  14.6.1.  What is the terminfo name of my terminal ?

  You need the exact name in order to set the TERM environment variable
  or to give to getty.  The same name should be used by both the termcap
  and terminfo databases so you only need to find it once.  A terminal
  usually has alias names but if more than one name is shown, use the
  first one.

  To find it, try looking at the /etc/termcap... file (if you have it).
  If not, then either look at the terminfo trees (see `` Compiled
  database locations'') or try to find the terminfo source code file
  (see ``Source-code database locations''.


  14.7.  Rarely Needed /etc/ttytype File

  The configuration file /etc/ttytype is used to map /dev/ttySn's to
  terminal names per terminfo.  tset uses it, but if the TERM
  environment variable is already set correctly, then this file is not
  needed.  Since the Linux getty sets TERM for each tty, you don't need
  this file.  In other Unix-like systems such as FreeBSD, the file
  /etc/ttys maps ttys to much more, such as the appropriate getty
  command, and the category of connection (such as "dialup").  An
  example line of Linux ttytype: vt220 ttyS1


  14.8.  Login Restrictions

  By default, the root user may not login from a terminal.  To permit
  this you must create (or edit) the file /etc/securetty per the manual
  page "securetty".  But use of this may be be distribution specific as
  the Suse distribution doesn't use /etc/securetty.  To restrict logins
  of certain users and/or certain terminals, etc. edit /etc/login.access
  (this replaces the old /etc/usertty file ??).  /etc/login.def
  determines if /etc/securetty is to be used and could be edited so as
  to make /etc/securetty not needed (or not used).  /etc/porttime
  restricts the times at which certain ttys and users may use the
  computer.  If there are too many failed login attempt by a user, that
  user may be prohibited from ever logging in again.  See the man page
  "faillog" for how to control this.


  14.9.  Run Command Only If TERM=my_term_type

  Sometimes there are commands that one wants to execute at start-up
  only for a certain type of terminal.  To do this for the stty command
  is no problem since one uses the redirection operator < to specify
  which terminal the command is for.  But what about shell aliases or
  functions?  You may want to make a function for the ls command so it
  will color-code the listing of directories only on color terminals or
  consoles.  For monochrome terminals you want the same function name
  (but a different function body) which will use symbols as a substitute
  for color-coding.  Where to put such function definitions that are to
  be different for different terminals?

  You may put them inside an "if" statement in /etc/profile which runs
  at startup each time one logs on.  The conditional "if" statement
  defines certain functions, etc. only if the terminal is of a specified
  type.


  14.9.1.  Example for ls Function

  While much of what this if statement does could be done in the
  configuration file for dircolors, here's an example for the case of
  the bash shell:


  ______________________________________________________________________
  if [ "$TERM" = linux ]; then
      eval `dircolors`;
  elif [ "$TERM" = vt220 ]; then
      ls () { command ls -F $* ; }# to export the function ls():
      declare -xf ls
  else echo "From /etc/profile: Unknown terminal type $TERM"
  fi
  ______________________________________________________________________



  15.  Terminfo and Termcap (detailed)

  15.1.  Intro to Terminfo

  Terminfo (formerly Termcap) is a database of terminal capabilities and
  more.  For every (well almost) model of terminal it tells application
  programs what the terminal is capable of doing.  It tells what escape
  sequences (or control characters) to send to the terminal in order to
  do things such as move the cursor to a new location, erase part of the
  screen, scroll the screen, change modes, change appearance (colors,
  brightness, blinking, underlining, reverse video etc.).  After about
  1980, many terminals supported over a hundred different commands (some
  of which take numeric parameters).

  The normal way in which terminfo gives the its information to an
  application program is via the "ncurses" functions that a programmer
  may put into a C program.  For example if a program wants to move the
  cursor to row 3, col 6 it simply calls: move(3,6).  The move()
  function (part of ncurses) knows how to do this for your terminal (it
  can read terminfo).  So it sends the appropriate escape sequence to
  the terminal to make this particular move for a certain terminal.
  The terminfo abbreviations are usually longer than those of termcap
  and thus it's easier to guess what they mean.  The manual pages for
  terminfo are more detailed (and include the old termcap
  abbreviations).  Also, the termcap entries had a size limitation which
  is not present for terminfo.  Thus, unless you are already committed
  to working with termcap, it's suggested you use terminfo.


  15.2.  Terminfo Database

  15.2.1.  Introduction

  The terminfo database is compiled and thus has a source part and a
  compiled part.  The old termcap database has only a source part but
  this source can, by a single command, be both converted to terminfo
  source and then compiled.  Thus you may get by without having any
  terminfo source since the termcap source can create the compiled
  terminfo database.  To see a display of the database for the terminal
  you're now using (including a PC monitor) type "infocmp" and you
  should see the source terminfo "file" for it.

  To see if your terminal (say vt100) is in the terminfo data base type
  "locate vt100".  If you don't know what your terminal name is, explore
  the listing of files in the compiled database or see ``What is the
  terminfo name of my terminal ?''


  15.2.2.  Where is the database located ?

  15.2.2.1.  Compiled database locations

  Typing "locate vt100" may show /usr/lib/terminfo/v/vt100,
  /usr/share/terminfo/v/vt100, /home/you/.terminfo/v/vt100, and/or
  /etc/terminfo/v/vt100.  All these are possible locations of the
  compiled terminfo files.  Although the /etc/terminfo directory is not
  a standard location for it, having a few terminal types there could be
  useful in case the /usr directory is not accessible.  For example /usr
  could be on a separate disk or partition that failed to mount.
  Normally, programs that use your main terminfo data base are able to
  find it if it's in at least one of the locations mentioned above.
  Otherwise the environment variable TERMINFO may be set to the path to
  this database.  Example: TERMINFO=/usr/share/terminfo

  If the compiled terminfo is in more than one location, everything is
  usually OK until someone gets a new terminfo file(s) (from a newer
  distribution, from the net, by editing the old one, etc.).  The newer
  terminfo needs to be put in all the existing locations (or redundant
  locations need to be abolished).  If you don't ensure this gets done,
  then some application programs could wind up still finding and using
  the old (and buggy) terminfo data that sill exists in a "usual"
  location.  Setting the environment variable TERMINFO to the up-to-date
  location (as mentioned above) may help avoid this problem.


  15.2.2.2.  Source-code database locations

  The source code you use may reside in /etc/termcap and/or in
  terminfo.src (or another name).  See the man pages: terminfo(5) or
  termcap(5) for the format required to create (or modify) these source
  files.  The file terminfo.src may be in various locations on your
  computer or it may not be included with your Linux distribution.  Use
  the locate command to try to find it.  It is available for downloading
  (under the name termtypes.ti) from
  <http://sagan.earthspace.net/terminfo>


  15.2.3.  Terminfo Compiler (tic)

  The data in the source files is compiled with the "tic" program which
  is capable of converting between termcap format and terminfo format.
  Thus you can create a compiled terminfo data base from termcap source.
  The installation program which was used to install Linux probably
  installed the compiled files on your hard disk so you don't need to
  compile anything unless you modify /etc/termcap (or terminfo.src ).
  "tic" will automatically install the resulting compiled files into a
  terminfo directory ready to be used by application programs.


  15.2.4.  Look at Your Terminfo

  It's a good idea to take a look at the terminfo entry for the terminal
  you are using (source code of course) and read the comments.  A quick
  way to inspect it without comments is to just type "infocmp".  But the
  comments may tell you something special about the terminal such as how
  you need to set it up so that it will work correctly with the terminfo
  database.


  15.2.5.  Deleting Data Not Needed

  In order to save disk space, one may delete all of the database except
  for the terminals types that you have (or might need in the future).
  Don't delete any of the termcaps for a "Linux terminal" (the console)
  or the xterm ones if you use X-Windows.  The terminal type "dumb" may
  be needed when an application program can't figure out what type of
  terminal you are using.  It would save disk space if install programs
  only installed the terminfo for the terminals that you have and if you
  could get a termcap for a newly installed terminal over the Internet
  in a few seconds.


  15.3.  Bugs in Existing Terminfo Files (and Hardware)

  Unfortunately, there are a number of bugs in the terminfo and termcap
  files.  In addition, many of these definitions are incomplete and do
  not define certain features available on the terminals.  Sometimes you
  can get by without modifying the terminfo but in other cases you need
  to modify it or possibly use another emulation that has a good
  terminfo.

  The sad state of the supplied terminfo files is due to a number of
  reasons.  One is that during the 1980's when many of them were written
  (often in termcap format), application programs did not utilize more
  advanced terminal features.  Thus if such feature were not in the
  termcap (or terminfo) file, no one complained.  Today, programs such
  as vim use "context highlighting" and minicom uses the terminal's
  graphics character set.  These often need more definitions to be added
  to the old termcap.  This may (or may not) have already been done.

  Most terminals had hardware bugs (in their firmware) and sometimes
  they were "fixed" by modifying the termcap.  Then the manufacturer
  might send out replacement chips which would fix the bug.  Not all
  owners would bother to get the replacement chips.  Thus there may be 2
  or more terminfos for your terminal, depending on what firmware chips
  it has in it.  This situation was often not noted in the termcap and
  only one termcap may be supplied with Linux.  Some hardware bugs which
  existed for features that were almost never used in the past likely
  never did get fixed.  Also, some reported hardware bugs may never have
  been fixed since they were not of much significance at the time or
  because the company went out of business, etc.


  15.4.  Modifying Terminfo Files

  To do this you need a manual for your terminal showing what escape
  sequences it uses.  Newer manuals from the 1990's often don't show
  this.  You also need a terminfo manual (or the like).  For example, in
  order to add graphic capability you must assign values to the terminfo
  variables: enacs, rmacs, and smacs by editing a source file.  Then by
  using "tic" you may compile it.  "tic" should automatically put the
  compiled terminfo file in the correct directory reserved for it.

  If you would like to find a better terminfo entry for a certain
  terminal than the one supplied, you might try searching the Internet
  (but what you find may be worse).  If your new terminfo entry is
  better than the old one and it seems stable (you've used it for a
  while with no problems) then you should send a copy to the maintainer
  of terminfo as noted at the start of the source file for terminfo (or
  termcap).


  15.5.  Init String

  Included in the terminfo are often a couple of initialization strings
  which may be sent to the terminal to initialize it.  This may change
  the appearance of the screen, change what mode the terminal is in,
  and/or make the terminal emulate another terminal.  An initialization
  string is not automatically sent to the terminal to initialize it.
  One might expect that the getty program should do this but if it did,
  one could make a change to the set-up at the terminal and this change
  wouldn't be implemented because the init string would automatically
  cancel it.  You must use a command given on the command line (or in a
  shell script) to send the init string such.  Such commands are:
  "tset", "tput init", or "setterm -initialize".  Sometimes there is no
  need to send the init string since the terminal may set itself up
  correctly when it is powered on (using options/preferences one has set
  up and saved in non-volatile memory of the terminal).


  15.6.  TERM Variable

  The Environment variable TERM should be set to the name of terminal
  which you are using.  If TERM hasn't been set yet and you don't know
  the name of your terminal see ``What is the terminfo name of my
  terminal ?''.  It is normally set by the terminal_type parameter
  passed to the getty program (look at it in the /etc/inittab file).
  This name must be in the Terminfo data base.  Just type "set" at the
  command line to see what TERM is set to (or type: tset -q).  At a
  console (monitor) TERM is set to "linux" which is the PC monitor
  emulating a fictitious terminal model named "linux".  Since "linux" is
  close to a vt100 terminal and many text terminals are also, the
  "linux" designation will sometimes work as a temporary expedient with
  a text terminal.

  If more than one type of terminal may be connected to the same port
  (/dev/tty...) (for example, if there is a switch to permit different
  terminal types to use the same serial port, or if the port is
  connected to a modem to which people call in from different types of
  terminals) then TERM needs to be set each time someone connects to the
  serial port.  There is often a query escape sequence so that the
  computer may ask the terminal what type it is.  Another way is to ask
  the user to type in (or select) the type of terminal s/he is using.
  You may need to use tset for this or write a short shell script to
  handle this.


  One way to do this is to use "tset" (see the manual page).  tset tries
  to determine the terminal name of the terminal you are using.  Then it
  looks up the data in terminfo and sends your terminal an init string.
  It can also set the value of TERM.  For example, a user dials in and
  logs in.  The .profile login script is executed which contains within
  it the following statement: eval `tset -s ?vt100`.  This results in:
  The user is asked if s/he is using a vt100.  The user either responds
  yes or types in the actual terminal type s/he is using.  Then tset
  sends the init string and sets TERM to this terminal name (type).


  15.7.  Terminfo/Termcap Documents



  

    manual pages for terminfo(5) (best) and/or termcap(5).  The Termcap
     Manual <http://www.delorie.com/gnu/docs/termcap/termcap_toc.html>
     (2nd ed.) by Richard M. Stallman is a GNU manual which is somewhat
     obsolete since it doesn't include terminfo.

    the files: terminfo.src and /etc/termcap have info about various
     versions of termcap files, naming conventions for terminals, and
     special capabilities code named u6-u9. If you don't have one, go to
     <http://sagan.earthspace.net/terminfo>

    "Termcap and Terminfo" is a book published by O'Reilly in 1988.


  16.  Using the Terminal

  16.1.  Intro to Using Terminal

  This section is about controlling the terminal-computer interface
  and/or changing the terminal set-up while using the terminal.  It
  explains (or points to explanations of) how the user of a terminal can
  control and inspect the interface and how to use various commands
  provided by the device driver.  It does not explain how to use the
  many application programs, shells or most Linux utilities.  Two
  commands commonly used at the terminal are:


    clear (to clear the screen)

    reset (to reset the terminal

    setterm -reset (alternative for "reset" in case of bug)


  16.2.  Starting Up the Terminal

  Of course the power must be on for the terminal to work.  If you don't
  see a login prompt hit the "return" (or "enter") key a few times.
  Then type your account name (followed by a return/enter) and your
  password when prompted for it (also followed by return/enter).  Make
  sure not to type all capital letters.  If you do, the computer may
  think that you have an old terminal that can't send lowercase letters
  and the serial driver may set itself up to send only capital letters
  to the terminal.

  If nothing happens, make sure that both the host computer and the
  terminal are OK.  If the host computer is shut down (no power) what
  you type at the terminal keyboard may appear on the screen since the
  transmit and receive pins at the computer may be connected together
  resulting in echoing of characters by an "off" computer.  If you can't
  log in when the host computer is running, see ``Trouble-Shooting''.

  16.3.  Terminal (Serial) Device Driver

  When typing at the command line, the shell (such as the Bash shell) is
  reading what you type and reacting to it.  What you type first passes
  thru the terminal driver part of your operating system.  This driver
  may translate certain characters (such as changing the "return"
  character generated by the "return" key into a "new-line" character
  for Linux files).  It also recognizes certain control codes which you
  may type at the keyboard such as ^C to interrupt the execution of a
  program.  It also normally echoes what you type back to the display.
  ``Stty'' may be used to configure how this terminal driver behaves,
  including disabling some (or all) of its functionality.


  16.4.  Problems with Editors

  There may be some problems with using both emacs and vi on some
  terminals.


  16.4.1.  emacs and ^S, ^Q

  If software flow control exists, then the ^S command in emacs will
  freeze the display.  The ^Q command will unfreeze the display.  The
  fix is to map this to another key-press by configuring emacs that way.


  16.4.2.  vi and Cursor-Keys

  Vi uses the esc-key as a command to exit insert mode.  If one hits an
  arrow-key (cursor-key) an escape sequence (starting with the ESC
  character) is sent to the host.  Vi must distinguish between these two
  meanings of ESC.  A smart vi (such as vim if configured for it) is
  able to detect the difference by noting the time between the ESC and
  the next key.  If it's a short time, then it's likely that a cursor
  key was pressed.  Use "help cursor-keys" in vim to find out more.

  Here's another way to fix this.  On VT terminals the left-arrow-key
  may be either set to send ESC [ D or ESC O D.  The other arrow keys
  are similar but use A, B, and C instead of D.  If you're having
  problems, choose ESC [ D since the "O" in the other alternative could
  be interpreted by vi as a command to "Open a line".  The "[" should be
  interpreted by vi to mean that an arrow-key has been pressed.  ESC [ D
  will be sent provided "Cursor Key Application Mode" has not been set.
  ESC [ D is normally the default so everything is seemingly OK.  Except
  that many termcaps contain a string (not the init string) which sets
  what you want to avoid: "Application Mode".  Editors may send this
  string to the terminal when the editor starts up.  Now you are in
  trouble.

  This string has the termcap code "ks" (smkx in terminfo) meaning
  enable the function (and related) keys (including the arrow keys).  An
  application enables these keys by sending the "ks" string to the
  terminal.  Whoever wrote the termcap reasoned that if an application
  wants to enable these keys, then they should be put into "Application
  Mode" since this is an "application", but you don't want this.

  The Linux console has no "ks" string so you can't fall into this trap
  at the console.  For other terminals you may need to edit the termcap
  (or terminfo) or use another termcap entry.  You need to change not
  only the "ks" string but also the termcap definitions of what they
  send: kd, kl, kr, ku.  Then run tic to install it.

  For vim (vi iMproved) there is a way to set it up to work OK with ESC
  O D (so you don't need to edit termcap): See vim help for
  "vt100-cursor-keys".  You may run "gitkeys" and then press your cursor
  keys to see what they send but they may be set to send something
  different when you're in an editor.


  16.5.  Color ls Corruption

  If ls is corrupting your terminal emulation with the color feature,
  turn it off.  ls --color, and ls --colour all use the color feature.
  Some installations have ls set to use color by default.  Check
  /etc/profile, etc.  for ls aliases.  See ``Example for ls Function''
  for how to have ls do color for the console and do monochrome for
  terminals.


  16.6.  Display Freezes (hung terminal)

  The symptom of a hung terminal is where what you type doesn't display
  on the terminal (or in some cases displays but doesn't do anything).
  If what you type is invisible (or does nothing) type ^Q to restart
  flow (if flow control stopped it).  Hanging may also be due to:
  ``Sent Terminal Binary'' or ``Abnormally Exited a Program''
  If you didn't do any of these two, then your program could by buggy or
  you interaction with it fatally illegal.

  If you want to quit the program you were running and you can't do it
  by the usual methods (some programs have special keys you must hit to
  exit) then try killing it from another terminal using "top" or "kill".
  If the process refuses to die, you may try sending it signal 9 from
  top which should force it to exit.  The "9" type of forced exit may
  leave some temporary files lying around as well as a corrupted
  interface.  Killing the login shell should result in a startup of
  getty with a new login prompt.


  People new to Linux may unintentionally press Ctrl-S (^S) (or the "No
  Scroll" key) which mysteriously freezes the screen (although that is
  what this key is supposed to do if you use software flow-control).  To
  restore normal screen interaction, press Ctrl-Q (^Q).  Note that
  everything typed during the "freeze" gets executed but you don't see
  any report of this until you hit ^Q.  Thus when it's frozen, don't
  type anything drastic that might destroy files, etc.  One argument for
  using hardware flow-control is to prevent such freezes.


  16.7.  Corrupted Terminal Interface

  This includes the case of a "frozen display" = "hung terminal" of the
  previous section.


  16.7.1.  Symptoms and Some Fixes

  When the display doesn't look right, or when what you type doesn't
  display correctly (if at all), or nothing happens when you type a
  command, you may have a corrupted terminal interface.  In rare cases
  when the serial port hardware gets itself corrupted, the only fix may
  be to cycle power (turn off the PC and reboot).  Sometimes logging in
  again will solve the problem.  To do this kill the shell process
  running on the terminal (or kill getty if it's running).  You do this
  from another terminal.  Once killed, a new getty process respawns
  which hopefully will end the corruption.  Recycling power (or
  resetting) for the terminal may help too.

  The corruption may be due to things such as bug in the program you're
  using, a hardware failure (including an obscure hardware defect that
  you can normally live with), or possibly an incorrect configuration.
  If everything was working normally but it suddenly goes bad, it may be
  that the interface got corrupted by something you did.  Three mistakes
  you might have made to corrupt the interface are:


    ``Sent Terminal Binary''

    ``Abnormally Exited a Program''

    ``Typed ctrl-S by mistake''


  16.7.2.  Sent Terminal Binary Characters

  Your terminal will change its characteristics if sent certain escape
  sequences or control characters.  It you inadvertently try to display
  a binary file, it might by chance contain such sequences which may put
  your terminal into some strange mode of operation or even make it
  unusable.  Always view or edit a binary file with programs designed
  for that purpose so that this doesn't happen.  Most editors and pagers
  will handle binary OK so as not to corrupt the interface.  Some may
  display a message telling you that they can't edit binary.  But using
  "cat ...." or "cp .... /dev/tty.." where .... is a binary file, will
  send the binary to the terminal and likely corrupt things.

  Corruption it can also happen when using a communications program
  where a remote computer may send binary to your screen.  There are
  numerous other ways it can happen so be prepared for it.  Even a
  supposed ASCII file may contain unwanted control codes.

  To fix this problem reset the terminal.  Type either just "reset" (may
  be broken) or "setterm -reset" (followed by a <return> of course).
  You may not be able to see what you're typing.  This will send the
  reset string from the terminfo entry to the terminal.  As an
  alternative to this, if the correct set-up has been saved inside the
  terminal then pressing a special key(s) (perhaps in setup mode) may
  restore the settings.  Then you might still need to use "tset" to send
  the init string if you use it to set up your terminal.

  Note that the "reset" command appears to be broken for terminals that
  need "clocal" set since "reset" seems to unset "clocal".  In this case
  instead of fixing the problem, "reset" only compounds it by disabling
  communication between the terminal and computer.  You will likely need
  to log in again and hope the getty sets "clocal".  If you see a login
  prompt without asking for it, you're in luck.  Otherwise see
  ``Symptoms and Some Fixes'' for how to get a login prompt.  You should
  try out "reset" before you need it and use "setterm -reset" if "reset"
  logs you out or otherwise doesn't work right.  I submitted a bug
  report in Mar. 2000 so "reset" could be fixed by now.

  ``Symptoms and Some Fixes''

  16.7.3.  Abnormally Exited a Program

  Large application programs (such as editors) often use the stty
  command (or the like) in their code to temporarily change the stty
  configuration when you are running the program.  This may put the
  device driver into "raw" mode so that every character you type goes
  directly thru to the application program.  Echoing by the driver is
  disabled so that everything you see on the screen comes directly from
  the application program.  Thus many control commands (such as ^C) may
  not work within such applications.

  When you tell such an application to quit, the application program
  first restores the stty settings to what they were before the
  application program started.  If you abnormally exit the program (you
  may guess this has happened when what you type no longer displays on
  the screen) then you may still be in "raw mode" on the command line.

  To get out of raw mode and restore the normal stty settings type "stty
  sane".  However, you must type this just after a "return" and end it
  with a "return".   But hitting the "return" key doesn't do the job
  since the "return" code no longer gets translated to the new-line
  characters that the shell is waiting for.  So just type new-line (^J)
  instead of "return".  The "sane" terminal interface may not be exactly
  the same as the normal one but it usually works.  "stty sane" may also
  be useful to get out of a corrupted interface due to other causes.


  16.8.  Special (Control) Characters

  A number of control characters which you may type at the keyboard are
  "caught" by the terminal driver and perform various tasks.  To see
  these control commands type: stty -a and look at lines 2-4.  They are
  tersely explained in the stty manual pages.  They may be changed to
  different control characters or disabled using the stty command.  Thus
  your control characters might be different than those described below.
  They are used for command-line editing, interrupting, scrolling, and
  to pass the next character thru transparently.


  16.8.1.  Command-Line Editing

  While the terminal driver has a few commands for command-line editing,
  some shells have a built-in real editor (such as "readline" in the
  Bash shell).  Such an editor is normally on by default so you don't
  need to do anything to enable it.  If it's available you don't need to
  learn many of the following commands although they often still work
  along with the command-line editor.  The most important to learn are
  ^C (interrupt), ^D, and how to stop scrolling.


    Delete-key (shown by stty as ^?) erases the last character

    ^U kills (deletes) the line

    ^W deletes a word backwards

    ^R reprints the line.  Useful mainly on hard copy terminals ??


  16.8.2.  Interrupting (& Quit, Suspend, EOF, Flush)



    ^C interrupts.  Exits the program and returns you to the command-
     line prompt.

    ^/ quits.  Same as interrupt ^C but weaker.  Also dumps a "core"
     file (which you likely have no use for) into your working
     directory.

    ^Z suspends.  Stops the program and puts it in the background.
     Type fg to restart it.

    ^D end of file.  If typed at the command-line prompt, exits the
     shell and goes to where you were before the shell started.

    ^O flush.  Not implemented in Linux.  Sends output to /dev/null.



  16.8.3.  Stop/Start Scrolling

  If what you want to see scrolls off the bottom of the screen, you may
  prevent this by sending a "stop" signal (^S or Xoff) to the host
  (provided Xon-Xoff ``Flow Control'' is enabled).  Send a "start signal
  to resume (^Q or Xon).  Some terminals have a "No Scroll" key which
  will alternately send Xoff and Xon or possibly send the hardware flow
  control signals ??   Here's what ctrl-S (^S) and ctrl-Q (^Q) do:


    ^S stops scrolling (Xoff)

    ^Q resume scrolling (Xon)

  If you want to both stop scrolling and quit, use ^C.  If you want to
  stop scrolling to do something else but want to keep the program that
  was generating the output in memory so you can resume scrolling later,
  use ^Z suspend.

  An alternative scrolling method is to pipe the output thru a pager
  such as more, less, or most.  However, the output might not be
  standard output but could be error output which the pager doesn't
  recognize.  To fix this you may need to use redirection "2>&1" to get
  the pager to work OK.  It is often simpler to just use ^S and ^Q
  unless you need to scroll backwards.

  At a PC console (emulating a terminal) you may scroll backwards by
  using Shift-PageUp.  This is frequently needed since the scrolling is
  often too fast to stop using ^S.  Once you've scrolled backwards
  Shift-PageDown will scroll forward again.


  16.8.4.  Take Next Character Literally

  ^V sends the next character typed (usually a control character)
  directly thru the device driver with no action or interpretation.
  Echoed back are two ASCII characters such as ^C.


  16.9.  Viewing Latin-1 Files on a 7-bit Terminal

  Some "text" files are 8-bit Latin1 (see ``Character-Sets'').  If you
  have a terminal that will not display Latin1 (or don't have the Latin1
  character set selected), then a bullet symbol will display as a 7,
  etc.  When viewing manual pages (they are Latin1) you may give the
  option -7 to man so as to translate the 7's, etc. to something close
  to a bullet (in ASCII).  Are there some pagers that make these
  translations ??


  16.10.  Inspecting the Interface

  These utility programs will provide information about the terminal
  interface:

    gitkeys: shows what byte(s) each key sends to the host.

    tty: shows what tty port you are connected to.

    set: shows the value of TERM (the terminfo entry name)

    stty -a: shows all stty settings.

    setserial -g /dev/tty?? (you fill in ??) shows UART type, port
     address and IRQ number.

    infocmp: shows the current terminfo entry (less comments)


  16.11.  Changing the Terminal Settings

  The terminal settings are normally set once when the terminal is
  installed using the setup procedures in the terminal manual.  However,
  some settings may be changed when the terminal is in use.  You
  normally would not give any "stty" of "setserial" commands when the
  terminal is in use as they are likely to corrupt the terminal
  interface.  However, there are changes you may make to the appearance
  of the terminal screen or to its behavior without destroying the
  integrity of the interface.  Sometimes these changes are made
  automatically by application programs so you may not need to deal with
  them.

  One direct method of making such changes is to use the setup key (or
  the like) at the terminal and then use menus (or the like) to make the
  changes.  To do this you may need to be familiar with the terminal.
  The other 3 methods send an escape sequence from the computer to the
  terminal to make the changes.  These 3 examples show different methods
  of doing this to set reverse video:


  1. setterm -reverse

  2. tput -rev

  3. echo ^[[7m


  16.11.1.  setterm

  This is the easiest command to use.  It uses long options (but doesn't
  use the normal -- before them).  It consults the terminfo database to
  determine what code to send.  You may change the color, brightness,
  linewrap, keyboard repeat, cursor appearance, etc.


  16.11.2.  tput

  The "tput" command is similar to "setterm" but instead of using
  ordinary words as arguments, you must use the abbreviations used by
  terminfo.  Many of the abbreviations are quite terse and hard to
  remember.


  16.11.3.  echo

  In the example "echo ^[[7m" to set reverse video, the ^[ is the escape
  character.  To type it type ^V^[ (or ^V followed by the escape key).
  To use this "echo" method you must find out what code to use from a
  terminal manual or from terminfo or termcap.  It's simpler to use
  setterm or tput if you are typing on the command line.  Since "echo
  ..." will execute faster (since it doesn't do any lookups) it's good
  for using in shell scripts which run at start-up, etc.


  16.11.4.  Saving Changes

  When you turn off the terminal the changes you made will be lost
  (unless you saved them in non-volatile terminal memory by going into
  set-up mode and saving it).  If you want to use them again without
  having to retype them, put the commands in a shell script or make it a
  shell function.  Then run it when you want to make the changes.  One
  way to make the changes semi-permanent is to put the commands in a
  file that runs each time you login or start up the computer.


  16.12.  Make a Terminal the Console

  This is also called a "serial console".  Many messages from the system
  are normally only sent to the console (the PC monitor).  Some of the
  messages sent to the console at boot-time may also be seen on any
  terminal after the boot succeeds by typing the command: dmesg.  If the
  boot failed this will not be of any use since the terminal can't work
  without an operating system.  It's possible to modify the Linux kernel
  so as to make a terminal serve as the console and receive all the
  messages from Linux intended for the console.  Unfortunately, the
  messages from the BIOS (which display on the monitor when a PC is
  first started) will not display on this terminal (but still display on
  the monitor).

  Some people do this when they run a PC without a monitor or keyboard.
  Normally, a PC will not start up without a keyboard and video card but
  some BIOSs permit it.  If you are lucky enough to have such a BIOS
  that supports "console re-direct" you will likely then need to setup
  the BIOS using the CMOS menus when you start your PC.


  16.12.1.  For Kernels 2.2 or higher

  The instructions for creating a serial-console are included with
  source code documentation in the file: serial-console.txt.  Normally,
  the device /dev/console is linked to tty0 (the PC console).  For a
  serial-console you create a new /dev/console which is a true device
  (and not linked to something else).  You must also put a statement
  regarding the serial-console into /etc/lilo.conf and then run lilo.
  This is because the equivalent of "setserial" needs to be run to set
  up your serial-console before the kernel is loaded.  See the above
  mentioned documentation and the man page for lilo.conf for more
  details.

  Here is an example /etc/lilo.conf file contents (for ttyS0):


       prompt
       timeout=50
       boot = /dev/sda
       vga = normal # force sane state
       install = /boot/boot.b
       message = /boot/message
       image = /vmlinuz
       root = /dev/sda1
       label = console
       serial = 0,9600n8
       append = "console=ttyS0"



  16.12.2.  For Kernels before 2.2

  The Linux Journal in April 1997 had an article on patching the Linux
  kernel.  You add a couple of #defines at the start of
  src/linux/drivers/char/console.c:



  #define CONFIG_SERIAL_ECHO
  #define SERIAL_ECHO_PORT 0x2f8  /* Serial port address  */

  The following was not in the Linux Journal article.
  In kernel 2.+ (and earlier ??) you need to also set the baud
  rate (unless 9600 is OK).  Find these 2 lines:

  serial_echo_outb(0x00, UART_DLM); /* 9600 baud */
  serial_echo_outb(0x0c, UART_DLL);

  Change 0x0c in the line above (depending on the baud rate you want):

  115200 baud: 0x01       19200 baud: 0x06        2400 baud: 0x30
   57600 baud: 0x02        9600 baud: 0x0c        1200 baud: 0x60
   38400 baud: 0x03        4800 baud: 0x18



  If you currently use the console to select which operating system to
  boot (using LILO), but would like to do this from a terminal, then you
  need to add a line to the /etc/lilo.conf file.   See the manual page
  for lilo.conf and search for "serial=".


  16.12.3.  Can I Run Linux without a Monitor (PC Console) ?

  Yes, you use a terminal and make it behave like the console per above.
  You will likely still need a video card since most BIOSs require one
  to get the PC started.  Your BIOS may also require a keyboard to get
  started or it may have an option where you can set the BIOS not to
  require a keyboard.


  16.13.  Multiple Sessions

  The "screen" package runs multiple sessions something like virtual
  terminals on the console: See ``The Console: /dev/tty?''.  However,
  this is not like "pages" (``Pages'') since the image of the pages are
  stored in the host computer and not inside the terminal as they are
  with "pages".


  16.14.  Logging Out

  To log out type either "logout" or "exit".   Under some circumstances
  your request will be refused, but you should be told why.  One reason
  for refusal is if you are not in the same shell into which you logged
  into.  Another way to log out is to press ^D.  Since ^D is also used
  for other purposes, you may not want it to log you out.  If you set
  IGNOREEOF in the Bash shell then ^D will no longer log you out.


  16.15.  Chatting between Terminals, Spying

  If two persons logged into terminals on the same host computer want to
  chat with each other they may use the "write" or the "talk" program.
  On the Internet, chatting may be done using the "lynx" browser.

  For spying on what someone else is doing at their terminal use the
  "ttysnoop" program.  In "ttysnoop" the two terminals have the same
  status and anything typed on either keyboard appears on both screens
  (in the same location).  So if you're really spying and don't want to
  be detected, you shouldn't type anything.


  "ttysnoop" can be used for training with instructor and trainee
  sitting side-by-side, each at their own terminal.  The instructor may
  watch what the trainee is typing and can correct any mistakes by
  typing it correctly.  The trainee can watch what the instructor types
  and then try typing it.  It's just like they used one terminal with
  both people having their hands on the keyboard at the same time.

  There's one shortcoming to "ttysnoop" and that is that the terminals
  involved should all be (or emulate) the same type of terminal (such as
  vt100).  Since the "Linux" emulation done by a console (monitor) and
  the "minicom" emulation are close to vt100 one may use ttysnoop using
  two PCs, one running "minicom" which emulates a terminal.

  There's a non-free program called "DoubleVision" that is something
  like ttysnoop but does much more.  Terminals may be of different types
  and it can remember and playback sessions on terminals so you can
  observe what happened in the past.  The webpage is at
  <http://www.tridia.com>.


  16.16.  Sharing the Serial Port

  If you have another serial device (a printer, modem, etc.) that you
  want to connect to the same serial port that a terminal is on, then
  there is more involved than just plugging in the other device.  This
  is mainly because when the getty program or shell is listening on the
  port, they (or the serial driver) are likely to give a response to any
  bytes sent to the port.  Getty will respawn even if it's killed and
  will keep sending login prompts to the serial port (which may now be
  connected to another device).  One way to work around this problem is
  to switch runlevels so that no getty program or shell is running on
  the port.  But if your other use for the port only uses the port for
  output to an external device, then you may live dangerously by using
  the port for the other use with the shell or getty (intended for a
  terminal) simultaneously running on it.

  For the runlevel fix, you may create another runlevel in which no
  getty program runs on the port.  Then you enter that new runlevel and
  use the serial port for something else.  To set this up you need to
  edit /etc/inittab and check and/or set the runlevels at which getty
  runs.  For example the line: "S1:23:respawn:/sbin/getty ..." means
  that getty will run (on ttyS1) in runlevels 2 and 3.  Now you could
  have it only run in level 2 (by deleting "3") and then go to runlevel
  3 when you want to use the other serial device.  Thus to use the
  serial port for something else, the super-user would type "init 3" to
  switch to runlevel 3.  Type "init 2" to get back to runlevel 2.  Note
  that each runlevel may have a different set of initialization scripts
  but you can change this if you want, so that the same scripts are run
  in both runlevels.  How the scripts and runlevels work are different
  for each Linux distribution.  In Debian, the explanation of this is in
  /usr/doc/sysvinit but also look in /usr/share/doc.

  There's also the problem of the stty configuration of the port.  When
  the port is being used for the terminal it has certain configurations
  but when say "init 3" is used to switch runlevels and disable getty on
  the port, the original (boot-time) configuration of the port is not
  restored.  You are likely to wind up with the port configured in a
  "raw" mode.  This means that the serial port likely needs to be fully
  reconfigured by stty, either by a script you write or by the next
  application which runs on the port.  Some applications such as
  printing from the serial port are not capable of fully reconfiguring
  (the /etc/printcap can only partially reconfigure).  Thus you may need
  to write a script to do it.  The stty configuration of a terminal will
  be different depending on whether a shell is running on it, whether
  it's at the "login" prompt, etc.  Thus the stty configuration after
  switching runlevels may vary.
  17.  Trouble-Shooting (software)

  If you suspect that the problem is a hardware problem, see the
  ``Repair and Diagnose'' section.  If the problem involves the serial
  port itself see the Serial-HOWTO.

  Here is a list of possible problems:

    ``Is the Terminal OK ?''  Suspect the terminal is defective.

    ``Missing Text'' Either skips over some text or displays some text
     OK and hangs.

    ``Getty Respawning Too Rapidly'' (console error message)

    ``Fails Just After Login''

    ``Can't Login'' but login prompt is OK.

    ``Garbled Login Prompt''

    ``No Sign of any Login Prompt''

  There are two cases where the terminal goes bad.  One is when it's
  been recently working OK and suddenly goes bad.  This is discussed in
  the next sub-section.  The other case is where things don't work right
  just after you install a terminal.  For this case you may skip over
  the next section.


  17.1.  Terminal Was Working OK

  When a formerly working terminal suddenly goes bad it is often easy to
  find the problem.  That's because (except for hardware failures) the
  problem is likely due to something that you did (or something the
  software you used did).

  The problem may be obvious such as an error message when the terminal
  is first turned on.  If it makes a strange noise it likely needs
  repair.  See ``Repair & Diagnose''.  First, think about what has been
  done or changed recently as it's likely the cause of the problem.  Did
  the problem happen just after new system software was installed or
  after a change in the configuration?

  If the terminal isn't responding correctly (if at all) to what you
  type to it, you may have a ``Corrupted Terminal Interface''.


  17.2.  Terminal Newly Installed

  If you've just connected up a terminal to a computer per instructions
  and it doesn't work this section is for you.  If a terminal that
  formerly worked OK doesn't work now then see ``Terminal Was Working
  OK'' If you suspect that the serial port on your computer may be
  defective you might try running a diagnostic test program on it.  At
  present (June 1998) it seems that Linux doesn't yet have such a
  diagnostic program so you may need to run diagnostics under MS
  DOS/Windows.  There are some programs to monitor the various serial
  lines such at DTR, CTS, etc. and this may help.  See ``Serial
  Monitoring/Diagnostics''

  One approach is to first see if the the terminal will work by trying
  to copy a file to the terminal (cp my_file /dev/ttyS?) under the most
  simple situation.  This means with the modem control lines disabled
  and at a show speed that doesn't need flow control (make sure that any
  hardware flow control is disabled).  If this copy works, then make the
  situation a little more complicated and see if it still works, etc.,
  etc.  When the trouble appears just after you made a change, then that
  change is likely the source of the trouble.  Actually, its more
  efficient (but more complex) to jump from the simple situation to
  about half way to the final configuration so that the test eliminates
  about half of the remaining possible causes of the problem.  Then
  repeat this methodology for the next test.  This way it would only
  take about 10 tests to find the cause out of a thousand possible
  causes.  You should deviate a little from this method based on hunches
  and clues.


  17.3.  Is the Terminal OK ?

  A good terminal will usually start up with some words on the screen.
  If these words convey no error message, its probably OK.  If there is
  no sign of power (no lights on, etc.) re-plug in the computer power
  cord at both ends.  Make sure there is power at the wall jack (or at
  the extension cord end).  Try another power cord if you have one.
  Make sure the terminal is turned on and that its fuse is not blown.  A
  blank (or dim) screen may sometimes be fixed by just turning up the
  brightness and contrast using knobs or a keyboard key in set-up mode.
  If it still won't work See ``Repair & Diagnose'' for tips on repairing
  it.

  If the terminal starts up OK, but you suspect that something may be
  wrong with it, go into "local mode" where is works like a typewriter
  and try typing on it.  See ``Local Mode''.


  17.4.  Missing Text

  If some text displays on the terminal OK and then it stops without
  finishing (in the middle of a word, etc.) or if chunks of text are
  missing, you likely have a problem with flow control.  If you can't
  figure out right away what's causing it, decrease the speed.  If that
  fixes it, it's likely a flow control problem.  It may be that flow
  control is not working at all due to failure to configure it
  correctly, or due to incorrect cable wiring (for hardware flow
  control).  See ``Flow Control''

  If single characters are missing, perhaps the serial port is being
  overrun by too fast a speed.  Try a slower baud rate.

  If you are using a baud rate under 1200 (very slow, mostly used for
  old hard-copy terminals and printers) and the text gets truncated,
  then the problem may be in the serial device driver.  See Printing-
  HOWTO under "Serial devices" on how to fix this.


  17.5.  Getty Respawning Too Rapidly

  17.5.1.  Serial Module Not Loaded

  Use the "lsmod" command to see if the serial module is loaded.


  17.5.2.  No Modem Control Voltage

  If getty can't open and/or use a port because of the lack of a
  positive modem control voltage on one of the pins, then getty might be
  killed.  Then, per the instructions in inittab, getty respawns and
  tries again, only to be killed again, etc., etc.  You may see an error
  message indicating that due to getty respawning too rapidly it has
  been temporarily disabled.  Try using the "local" option with getty
  and/or check the modem control settings and voltages.
  17.5.3.  Key Shorted

  Another possible cause of getty respawning is if a keyboard key is
  shorted, giving the same result as if the key was continuously held
  down.  With auto-repeat enabled, this "types" thousands characters to
  the login prompt.  Look for a screen filled with all the same
  character (in some cases with 2 or more different characters).


  17.6.  Fails Just After Login

  If you can login OK but then you can't use the terminal it may be
  because the starting of the login shell has reconfigured the terminal
  (to an incorrect setting) by a command which someone put into one of
  the files that are run when you login and a shell starts.  These files
  include /etc/profile and  /.bashrc.  Look for a command starting with
  "stty" or "setserial" and make sure that it's correct.  Even if it's
  done OK in one initialization file, it may be reset incorrectly in
  another initialization file that you are not aware of.  Ways to get
  into the systems to fix it are to use another terminal or console, use
  a rescue diskette, or type: "linux single" at the lilo prompt which
  puts you into single user mode without running startup files.


  17.7.  Can't Login

  If you get a login prompt but get no response (or perhaps a garbled
  response) to your login attempts a possible cause is that the
  communication is bad one-way from the terminal to the computer.  It
  could be a bad or mis-wired cable/connector.  If you're not already
  using the "local" option with getty, do so to disable the modem
  control lines.  See ``Getty (in /etc/inittab)''.  You might also
  disable hardware flow control (stty -crtscts) if it was enabled.  If
  it now works OK then your modem control lines are likely either not
  wired correctly or there's a mistake in your set-up.  Some terminals
  allow setting different values (such as baud rate) for send and
  receive so the receive could be OK but the send bad.

  You should also (at the console) try "stty < /dev/ttyS1" (if you use
  ttyS1) to see that it's set up correctly.  It will often be in raw
  mode (and this is probably OK) with -icanon and -echo etc.  If the
  terminal incorrectly set at half-duplex (HDX), then one set of the
  characters you see when you type are coming from the terminal itself.
  If the characters are doubled, then the echos from the computer are OK
  and you may switch to full-duplex to fix this.  But if half-duplex is
  set and you only see what looks like normal "echos", then they are not
  coming from the computer as they should be.

  If you get a message saying something like "login failed" then if
  there is no error in typing or in the password, there may be some
  restrictions on logins which will not allow you to log in.
  Unfortunately, this message, may not tell you why it failed.  See
  ``Login Restrictions''


  17.8.  Garbled Login Prompt

  This may be due to using the wrong character set, transmission errors
  due to too high of a baud rate, incompatible baud rates, incompatible
  parity, or the wrong number of bits per byte.  If it's a variety of
  strange characters you have the wrong character set or a high order
  bit is being set by mistake.  If words are misspelled, try a lower
  baud rate.  For baud, parity, or bits/character incompatibilities you
  see a lot of the same "error character" which represents a real
  character that can't be displayed correctly due to an error in parity
  or baud rate.
  If you are using agetty (often just named getty), the agetty program
  will detect and set parity and/or bits/character if you type
  something.  Try it with a return to see if it fixes it.


  17.9.  No Sign of any Login Prompt

  This is when nothing at all happens at the terminal, but the terminal
  seems to be working OK.  One of the first things to do is to make sure
  that all cable connections are tight and connected to the correct
  connector on both the computer and terminal.  Other causes include
  defective hardware or cables (must be null modem), getty not running,
  terminal setup at wrong baud-rate, terminal in local mode, etc..  At
  this point two different avenues of approach are (you may pursue more
  than one at a time).


    ``Diagnose Problem from the Console''

    Measure Voltages ``Measure  Voltages''


  17.9.1.  Diagnose Problem from the Console

  At the console (or another working terminal), use "top" or "ps -al" to
  see if getty is running on the port.  Don't confuse it with getty
  programs running on other ports or on the virtual consoles.  You will
  not get a login prompt unless getty runs.

  One test is to try to copy a short file to the terminal (It might be a
  good idea to try this near the start of the installation process
  before setting up getty).  Use the Linux copy command such as: cp
  file_name /dev/ttyS1.  If it doesn't work, use stty to make the
  interface as simple as possible with everything disabled (such as
  hardware flow control: -crtscts; parity, and modem control signals:
  clocal).  Be sure the baud rates and the bits/byte are the same.  If
  nothing happens verify that the port is alive with a voltmeter per the
  next section.


  17.9.2.  Measure Voltages

  If you have a voltmeter handy check for a negative voltage (-4v to
  -15v) at pin 3 (receive data) at the terminal side of the null modem
  cable.  The positive lead of the meter should be connected to a good
  ground (the metal connectors on the ends of cables are often not
  grounded).  If there is no such negative voltage then check for it at
  the transmit pin (TxD) on the computer (see ``DB9-DB25'' for the pin-
  out).  If it's present there but not at the receive pin (RxD) at the
  terminal, then the cable is bad (loose connection, broken wire, or not
  a null modem).  If voltage is absent, then the serial port on the
  computer is dead.  Test it with a software diagnostic test or replace
  it.

  If the serial port is alive, you may want to send a file to it (with
  modem controls disabled) and see if anything gets to it.  To check for
  a transmitted signal with an analog voltmeter, look at the needle at
  -12 V when the line is idle.  Then start sending a file (or start
  getty).  You should see the needle dropping to 0 and fluttering about
  0 as it measures short-run averages of the bit stream.  You can see
  this also on the AC scale provided that your meter has a capacitor to
  block out DC voltages when on the AC scale.  If it doesn't, then the
  idle DC of -12 V will cause a high false AC reading.  Without a meter,
  you could connect a known good device (such as another terminal or an
  external  modem) to the serial port and see if it works OK.

  17.10.  Slow: pauses of several seconds between bursts of characters

  You likely have mis-set interrupts>  See the Serial-HOWTO section
  starting with "Slow:"


  17.11.  Terminal doesn't scroll

  One reason is that something is wrong with terminfo.  Another reason
  could be that you are outside the scrolling region set for the
  terminal.  Some programs just assume that your terminal has 24 lines
  and set the scrolling region for 24 lines (by an escape sequence sent
  to the terminal) without consulting terminfo to see how many lines
  there actually are.  Then when you use another program it may leave
  the cursor on line 25 where it becomes trapped and the terminal will
  not scroll.  To avoid this problem, create an environment variable
  "export LINES=25" and then the programs that assume 24 lines will
  hopefully use 25 lines set the scrolling region accordingly.  An
  alternate way to fix this problem is to use the command "stty rows
  25".


  17.12.  Serial Monitoring/Diagnostics

  A few Linux programs will monitor the modem control lines and indicate
  if they are positive (1) or negative (0).

    statserial (in Debian distribution)

    serialmon (doesn't monitor RTS, CTS, DSR but logs other functions)

    modemstat (only works on Linux PC consoles.  Will coexist with the
     command line)

     You may already have them.  If not, go to Serial Software
     <http://sunsite.unc.edu/pub/Linux/system/serial/>.  When using
     these, bear in mind that what you see is the state of the lines at
     the host computer.  The situation at the terminal will be different
     since some wires are often missing from cables while other wires
     cross over.  As of June 1998, I know of no diagnostic program in
     Linux for the serial port.


  17.13.  Local Mode

  In local mode, the terminal disconnects from the computer and behaves
  like a typewriter (only it doesn't type on paper but on the screen).
  Going back into on-line mode reconnects to the computer allowing you
  to resume activities at the same point where you left off when you
  went into "local".  This is useful both for testing the terminal and
  for educational purposes.  Some terminals use "block mode" as the
  "local mode".

  When in local mode you may type escape sequences (starting with the
  ESC key) and observe what they do.  If the terminal doesn't work
  correctly in local mode, it's unlikely that it will work correctly
  when connected to the computer.  If you're not exactly sure what an
  escape sequence does, you can try it out in local mode.  You might
  also use it for trying out a terminal that is for sale.  To get into
  local mode on some terminals you first enter set-up mode and then
  select "local" from a menu (or press a certain key).  See ``Getting
  Into Set-Up (Configuration) Mode''.



  17.14.  Serial Electrical Test Equipment

  17.14.1.  Breakout Gadgets, etc.

  While a multimeter (used as a voltmeter) may be all that you need for
  just a few terminals, simple special test equipment has been made for
  testing serial port lines.  Some are called "breakout ... " where
  breakout means to break out conductors from a cable.  These gadgets
  have a couple of connectors on them and insert into the serial cable.
  Some have test points for connecting a voltmeter.  Others have LED
  lamps which light when certain modem control lines are asserted
  (turned on).  Still others have jumpers so that you can connect any
  wire to any wire.  Some have switches.

  Radio Shack sells (in 1998) a "RS-232 Troubleshooter" or "RS-232 Line
  Tester" which checks TD, RD, CD, RTS, CTS, DTR, and DSR.  A green
  light means on (+12 v) while red means off (-12 v).  They also sell a
  "RS-232 Serial Jumper Box" which permits connecting the pins anyway
  you choose.


  17.14.2.  Measuring Voltages

  Any voltmeter or multimeter, even the cheapest that sells for about
  $10, should work fine.  Trying to use other methods for checking
  voltage is tricky.  Don't use a LED unless it has a series resistor to
  reduce the voltage across the LED.  A 470 ohm resistor is used for a
  20 ma LED (but not all LED's are 20 ma).  The LED will only light for
  a certain polarity so you may test for + or - voltages.  Does anyone
  make such a gadget for automotive circuit testing??  Logic probes may
  be damaged if you try to use them since the TTL voltages for which
  they are designed are only 5 volts.  Trying to use a 12 V incandescent
  light bulb is not a good idea.  It won't show polarity and due to
  limited output current of the UART it probably will not even light up.

  To measure voltage on a female connector you may plug in a bent paper
  clip into the desired opening.  The paper clip's diameter should be no
  larger than the pins so that it doesn't damage the contact.  Clip an
  alligator clip (or the like) to the paper clip to connect up.


  17.14.3.  Taste Voltage

  As a last resort, if you have no test equipment and are willing to
  risk getting shocked (or even electrocuted) you can always taste the
  voltage.  Before touching one of the test leads with your tongue, test
  them to make sure that there is no high voltage on them.  Touch both
  leads (at the same time) to one hand to see if they shock you.  Then
  if no shock, wet the skin contact points by licking and repeat.  If
  this test gives you a shock, you certainly don't want to use your
  tongue.

  For the test for 12 V, Lick a finger and hold one test lead in it.
  Put the other test lead on your tongue.  If the lead on your tongue is
  positive, there will be a noticeable taste.  You might try this with
  flashlight batteries first so you will know what taste to expect.


  18.  Repair & Diagnose

  Repairing a terminal has much in common with repairing a monitor
  and/or keyboard.  Sometimes the built-in diagnostics of the terminal
  will tell you what is wrong on the screen.  If not, then by the
  symptoms, one may often isolate the trouble to one of the following:
  bad keyboard, CRT dead, terminal digital electronics failure.  It's
  best to have a service manual, but even if you don't have one, many
  terminals may still be repaired.


  18.1.  Repair Books & Websites

  18.1.1.  Books

  Bigelow, Stephen J.: Troubleshooting & Repairing Computer Monitors,
  2nd edition, McGraw-Hill, 1997.  Doesn't cover the character
  generation electronics nor the keyboard.


  18.1.2.  Websites

  The FAQ  <http://www.repairfaq.org> for the newsgroup:
  sci.electronics.repair is long and comprehensive, although it doesn't
  cover terminals per se.  See the section "Computer and Video
  Monitors".  Much of this information is applicable to terminals as are
  the sections: "Testing Capacitors", "Testing Flyback Transformers",
  etc.  Perhaps in the future, the "info" on repair in this HOWTO will
  consist mainly of links to the above FAQ (or the like).  Shuford's
  repair archive
  <http://www.cs.utk.edu/~shuford/terminal/repair_hints_news.txt> of
  newsgroup postings on terminal repair is another source of info.


  18.2.  Safety

  CRT's use high voltage of up to 30,000 volts for color (less for
  monochrome).  Be careful not to touch this voltage if the set is on
  and the cover off.  It probably won't kill you even if you do since
  the amount of current it can supply is limited.  But it is likely to
  badly burn and shock you, etc.  High voltage can jump across air gaps
  and go thru cracked insulation so keep your hands a safe distance from
  it.  You should notice the well-insulated high voltage cable connected
  to one side of the picture tube.  Even when the set is off, there is
  still enough residual voltage on the picture tube cable connection to
  give you quite a shock.  To discharge this voltage when the set is
  unplugged use a screwdriver (insulated handle) with the metal blade
  grounded to the picture tube ground cable with a jumper wire.  Don't
  use chassis ground.

  The lower voltages (of hundreds of volts) can be even more dangerous
  since they are not current limited.  It is even more dangerous if your
  hands are wet or if you are wearing a metal watchband, ring or the
  like.  In rare cases people have been killed by it so be careful.  The
  lowest voltages of only several volts on digital circuitry are fairly
  safe but don't touch anything (except with a well insulated tool)
  unless you know for sure.


  18.3.  Appearance of Display

  If the display is too dim, turn up the brightness and/or contrast.
  using knobs on the exterior of the unit (if they exist).  If the
  width, height or centering is incorrect, there are often control knobs
  for these.  For some older terminals one must press an arrow key (or
  the like) in set-up mode.

  You may need to remove the cover to make adjustments, especially on
  older models.  You could arrange things so that a large mirror is in
  front of the terminal so as to view the display in the mirror while
  making adjustments.  The adjustments to turn may be on a printed
  circuit board.  While a screwdriver (possibly Phillips-head) may be
  all that's needed, inductors may require special TV alignment tools
  (plastic hex wrenches, etc.).  The abbreviated name of the adjustment
  should be printed on the circuit board.  For example, here are some
  such names:


    V-Size adjusts the Vertical height (Size)

    H-Size adjusts the Horizontal width (Size).  It may be an inductor.

    V-Pos adjusts the Vertical Position

    H-Pos adjusts the Horizontal Position

    V-Lin adjusts Vertical Linearity (Use if width of scan lines
     differs at the top and bottom of the screen)

    V-Hold adjusts Vertical Hold (Use if screen is uncontrollable
     scrolling)

    Bright adjusts brightness (an external knob may also exist)

    Sub-Bright adjusts brightness of subdued intensity mode (often the
     normal mode: dimmer than bold or bright mode).

  Changing linearity may change the size so that it will need to be
  readjusted.  A terminal that has been stored for some time may have a
  small display rectangle on the screen surrounded by a large black
  border.  If it's difficult to adjust, wait a while before adjusting it
  since it will likely recover some with use (the black borders will
  shrink).


  18.4.  Diagnose

  18.4.1.  Terminal Made a Noise

  If the terminal made some noise just before it failed (or when you
  turn it on after it failed) that noise is a clue to what is wrong.  If
  you hear a sparking noise or see/smell smoke, immediately turn the
  terminal off to prevent further damage.  The problem is likely in the
  high voltage power supply of several thousand volts.  Remove the cover
  and if the bad spot is not evident, turn it on again for a short time
  in a dimly lit room to look for arcing.  The high voltage cable (runs
  between the flyback transformer and the side of the picture tube) may
  have broken insulation that arcs to ground.  Fix it with high-voltage
  insulating dope, or special electrical tape designed say for 10,000
  volts.

  The flyback transformer (high voltage) may make only a faint clicking
  or sparking noise if it fails.  You may not hear it until you turn the
  terminal off for a while to rest and then turn it back on again.  To
  track down the noise you may use a piece of small rubber tubing (such
  as used in automobiles) as a stethoscope  to listen to it.  But while
  you are listening for the noise, the terminal is suffering more damage
  so try find it fast (but not so fast as to risk getting shocked).

  A short in the power supply may cause a fuse to blow with a pop.
  Replacing a blown fuse may not solve the problem as the same short may
  blow the fuse again.  Inspect for any darkened spots due to high heat
  and test those components.  Shorted power transistors may cause the
  fuse to blow.  They may be tested with a transistor checker or even
  with an ohm-meter.  Use the low ohm scale on an ohm-meter so that the
  voltage applied by the meter is low.  This will reduce the possible
  damage to good components caused by this test voltage.

  If the terminal has been exposed to dampness such as being stored in a
  damp place or near a kitchen with steam from cooking, a fix may be to
  dry out the unit.  Heating a "failed" flyback transformer with a blow
  dryer for several minutes may restore it.


  18.4.2.  Terminal Made No Noise

  A blank screen may be due to someone turning the brightness control to
  the lowest level or to aging.  The next thing to do is to check the
  cables for loose or broken connections.  If there is no sign of power,
  substitute a new power cord after making sure that the power outlet on
  the wall is "hot".

  If the keyboard is suspected, try it on another terminal of the same
  type or substitute a good keyboard.  Wiggle the keyboard cable ends
  and the plug.  Wires inside cables may break, especially near their
  ends.  If the break is verified by wiggling it (having the problem go
  on and off in synchronization with the wiggles), then one may either
  get a new cable or cut into the cable and re-solder the breaks, etc.

  One of the first things to do if the keyboard works is to put the
  terminal into ``Local Mode''.  If it works OK in local, then the
  problem is likely in the connection to the host computer (or incorrect
  interface) or in the UART chips of the terminal.

  By carefully inspecting the circuitry, one may often find the cause of
  the problem.  Look for discoloration, cracks, etc.  An intermittent
  problem may sometimes be found by tapping on components with a ball-
  point pen (not the metal tip of course).  A break in the conductor of
  a printed circuit board may sometimes be revealed by flexing the
  board.  Solder that looks like it formed a drop or a solder joint with
  little solder may need re-soldering.  Soldering may heat up
  transistors (and other components) and damage them so use a heat sink
  if feasible.

  If you have a common brand of terminal, you may be able to search
  newsgroup postings on the Internet to find out what the most frequent
  types of problems are for your terminal and perhaps information on how
  to fix them.

  To see if the digital electronics work, try (using a good keyboard)
  typing at the bad terminal.   Try to read this typing at a good
  terminal (or the console) using the copy command or with a terminal
  communication program such as minicom.  You may need to hit the return
  key at the terminal in order to send a line.  One may ask the bad
  terminal for its identity etc. from another terminal.  This will show
  if two-way communication works.


  18.5.  Error Messages on the Screen

  You are in luck if you see an error message on the screen.  This
  usually happens when you first turn the terminal on.


  18.5.1.  Keyboard Error

  This usually means that the keyboard is not plugged in, or that the
  connection is loose.  For more serious problems see ``Keyboards''


  18.5.2.  Checksum Error in NVR

  NVR is "Non-Volatile RAM".  This means that the NVR where the set-up
  information is stored has become corrupted.  The terminal will likely
  still work but the configuration that was last saved when someone last
  configured the terminal has likely been lost.  Try configuring again
  and then save it.  It might work.  On very old terminals (early
  1980's) there was a battery-powered CMOS to save the configuration so
  in this case the problem could be just a dead battery.  Sometimes the
  EEPROM chip (no battery needed) goes bad after too many saves.  It may
  be hard to find.  If you can't fix it you are either stuck with the
  default configuration or you may have escape sequences sent to the
  terminal when you start it up to try to configure it.


  18.6.  Capacitors

  Electrolytic capacitors have a metal shell and are may become weak or
  fail if they set for years without being used.  Sometimes just leaving
  the terminal on for a while will help partially restore them.  If you
  can, exercise any terminals you have in storage by turning them on for
  a while every year or two.


  18.7.  Keyboards

  18.7.1.  Interchangeability

  The keyboards for terminals are not the same as keyboards for PC's.
  The difference is not only in the key layout but in the codes
  generated when a key is pressed.  Also, keyboards for various brands
  and models of terminals are not always interchangeable with each
  other.  Sometimes one get an "incompatible" keyboard to partially work
  on a terminal.  All the ASCII keys will work OK, but special keys such
  as set-up and break will not work correctly.


  18.7.2.  How They Work

  Most keyboards just make a simple contact between two conductors when
  you press a key.  Electronics inside a chip in the keyboard converts
  this contact closure into a code sent over the keyboard's external
  cable.  Instead of having a separate wire (or conductor) going from
  each key to the chip, the following type scheme is used.  Number the
  conductors say from 1-10 and A-J.  For example: conductor 3 goes to
  several keys and conductor B goes to several keys, but only one key
  has both conductors 3 and B going to it.  When that key is pressed, a
  short circuit is established between 3 and B.  The chip senses this
  short and knows what key has been pressed.  Such a scheme reduces the
  number of conductors needed (and  reduces the number of pins needed on
  the chip).  It's a similar scheme to what is called a "crossbar
  switch".


  18.7.3.  One Press Types 2 Different Characters

  If, due to a defect, conductors 3 and 4 become shorted together then
  pressing the 3-B key will also short 4 and B and the chip will think
  that both keys 3-B and 4-B have been pressed.  This is likely to type
  2 different characters when all you wanted was one character.


  18.7.4.  Modern vs Old Keyboards

  While the modern keyboard and the old fashioned type look about the
  same, the mechanics of operation are different.  The old ones have
  individual key switches under the key-caps with each switch enclosed
  in a hard plastic case.  The modern ones use large flexible plastic
  sheets (membrane) the size of the keyboard.  A plastic sheet with
  holes in it is sandwiched between two other plastic sheets containing
  printed circuits (including contact points).  When you press a key,
  the two "printed" sheets are pressed together at a certain point,
  closing the contacts printed on the sheets at that point.


  18.7.5.  Keyboard Doesn't Work At All

  If none of the keys work try another keyboard (if you have one) to
  verify that the keyboard is the problem.  The most likely cause is a
  broken wire inside the cord (cable) that connects it to the terminal.
  The most likely location of the break is at either end of the cord.
  Try wigging the ends of the cord while tapping on a key to see if it
  works intermittently.  If you find a bad spot, you may carefully cut
  into the cord with a knife at the bad spot and splice the broken
  conductor.  Sometimes just a drop of solder will splice it.  Seal up
  the cord with electrical tape, glue, or caulk.


  18.7.6.  Typing b Displays bb, etc. (doubled)

  If all characters appear double there is likely nothing wrong with the
  keyboard.  Instead, your terminal has likely been incorrectly set up
  for half-duplex (HDX or local echo=on) and every character you type is
  echoed back both from the electronics inside your terminal and from
  your host computer.  If the two characters are not the same, there may
  be a short circuit inside your keyboard.  See ``One Press Types 2
  Different Characters''


  18.7.7.  The Keyboard Types By Itself

  If a key is shorted out it is likely to type out a large number of the
  same character if auto-repeat is enabled.  If more than one key is
  shorted out then repeating sequences of a few characters will be
  typed.  This may cause getty to respawn too fast if it happens at the
  login prompt.  See ``Key Shorted''.  The fix is to clean the contacts
  per ``Cleaning Keyboard Contacts''.


  18.7.8.  Liquid Spilled on the Keyboard

  If water or watery liquid has been spilled on the keyboard (or if it
  was exposed to rain, heavy dew, or dampness) some keys may not work
  right.  The dampness may cause a key to short out (like it was pressed
  down all the time) and you may see the screen fill up with that letter
  if auto-repeat is enabled.  If it's gotten wet and then partially (or
  fully) dried out, certain keys may not work due to deposits on the
  contact surfaces.  For the modern type of keyboard, one may readily
  take apart the plastic sheets inside and dry/clean them.  For the old
  type one may let it dry out in the sun or oven (low temp.).  When it's
  dry it may still need contact cleaner on some keys as explained below.


  18.7.9.  Cleaning Keyboard Contacts

  18.7.9.1.  Keyboards with Membranes

  On some newer keyboards, the plastic sheets (membranes) are easy to
  remove for inspection and cleaning if needed.  You only need to remove
  several screws to take apart the keyboard and get to the sheets.  On
  some old IBM keyboards the sheets can't be removed without breaking
  off many plastic tabs which will need to be repaired with glue to put
  back (probably not worthwhile to repair).  Such a keyboard may
  sometimes be made to work by flexing, twisting, and/or pounding the
  assembly containing the plastic sheets.



  18.7.9.2.  Keyboards with Individual Switches

  What follows is for older keyboards that have separate hard plastic
  switches for each key.  Before going to all the work of cleaning
  electrical contacts first try turning the keyboard upside-down and
  working the bad keys.  This may help dislodge dirt, especially if you
  press the key hard and fast to set up vibration.  Pressing the key
  down and wiggling it from side to side, etc. often helps.

  Often the key-caps may be removed by prying them upward using a small
  screwdriver as a lever while preventing excessive tilting with a
  finger.  There exists a special tool known as keycap puller but you
  can get by without it.  (Warning: Key-caps on modern keyboards don't
  pry up.)  The key-cap may tilt a bit and wobble as it comes loose.  It
  may even fly up and onto the floor.  Then you have two choices on how
  to clean the contacts: Use contact cleaner spray directly on top of
  the key switch, or take the key switch apart and clean it.  Still
  another choice is to replace the key switch with a new or used one.

  Directly spraying contact cleaner or the like (obtained at an
  electronics store) into the top of the key switch is the fastest
  method but it may not work.  Before spraying, clean the area around it
  a little.  With the keyboard live (or with the key contacts connected
  to an ohm-meter) use the tube which came with the spray to squirt
  cleaner so it will get inside the key switch.  Don't let the cleaning
  liquid get under nearby keys where it may pick up dust and then seep
  (with the dust) into adjacent key switches.  If you make this mistake
  you may fix one key but damage nearby keys.  If this should happen,
  immediately work (repeatedly press) the affected nearby keys until
  they work OK.

  You might tilt the keyboard so that the cleaner flows better into the
  contacts.  For the CIT101e terminal with an Alps keyboard, this means
  tilting the digit row up toward the ceiling.  Work the key switch up
  and down with a pen or small screwdriver handle to avoid getting the
  toxic cleaner liquid on your skin (or wear gloves).  You might try
  turning the keyboard upside-down while working the key to drain off
  remaining cleaner.  I don't usually do this.  The more cleaner you
  squirt in the more likely it will fix it but it is also more likely to
  do more damage to the plastic or contaminate adjacent keys, so use
  what you think is just enough to do the job.  Once the key works OK,
  work it up and down a little more and test it a half minute later,
  etc. to make sure it will still work OK.

  Sometimes a key works fine when the contacts inside are saturated with
  contact cleaner liquid.  But when the liquid dries a few minutes later
  then the resulting scale deposit left from the evaporation of the
  cleaning liquid on the contacts, prevents good contact.  Then the key
  may work erratically (if at all).  Operating the key when the liquid
  is drying inside may help.  Some switches have the contacts nearly
  sealed inside so little if any contact cleaner reaches the contacts.
  The cleaner that does get to the contacts may carry contamination with
  it (cleaning around the tops before spraying helps minimize this).

  If you need to disassemble the key switch, first inspect it to see how
  it is installed and comes apart.  Sometimes one may remove the cover
  of the switch without removing the switch from the keyboard.  To do
  this pry up (or pull up) the top of the key switch after prying apart
  thin plastic tabs that retain it.  Don't pry too hard or you may break
  the thin plastic.  If this can't be done, you may have to unsolder the
  switch and remove it in order to take it apart (or replace it).  Once
  the switch has been taken apart you still may not be able to see the
  contacts if the contact surfaces are sandwiched together (nearly
  touching).  You may get contact cleaner on the contacts by slightly
  prying apart the conducting surfaces and squirting cleaner between
  them.  There may be some kind of clip holding the contact surfaces
  together which needs to be removed before prying these surfaces apart.
  With cleaner on the contacts, work them.  Tilting the keyboard or
  inverting it may help.  Take care not to loose small parts as they may
  fly up into the air when taking apart a key switch.


  19.  Appendix A: General

  19.1.  List of Linux Terminal Commands

  19.1.1.  Sending a Command to the Terminal


    ``setterm'': long options

    ``tput'': terse options

    tset: initializes only

    clear: clears screen

    setterm -reset: sends reset string


  19.1.2.  Configuring the Terminal Device Driver


    ``Setserial'':

    ``Stty''


  19.1.3.  Terminfo


    ``Terminfo Compiler (tic)'' terminfo compiler & translator

    toe: shows list of terminals for which you have terminfo files

    ``infocmp'' compares or displays terminfo entries


  19.1.4.  Other


    gitkeys: shows what bytes each key sends to the host.

    tty: shows what tty port you are connected to.

    set (or tset -q): shows the value of TERM, the terminfo entry name

    ``tset'': sets TERM interactively and initializes


  19.2.  The Internet and Books

  19.2.1.  Terminal Info on the Internet



    Shuford's Website
     <http://www.cs.utk.edu/~shuford/terminal_index.html> at the
     University of Tennessee has a great deal of useful information
     about text terminals.


    VT terminal information and history  <http://www.vt100.net/>

    Boundless <http://www.boundless.com/textterm/> purchased the VT and
     Dorio terminal business from DEC.  To get Specs select either ADDS,
     VT, or DORIO links.  Then select a "data sheet" link.  Then on the
     data sheet select the "Go to Specs" link.

    Wyse text-terminals kbase
     <http://www.wyse.com/service/support/kbase/wyseterm.asp> is a major
     manufacturer of terminals.  For new models see Wyse terminal
     <http://www.wyse.com/terminal/>  See also Old  Wyse terminal Specs
     <http://www.wyse.com/service/faq/wysetter.htm>

    Escape Seqs.; N. America <http://www.pericom-
     usa.com/twdocs/doc/twproae.htm> or Escape Seqs.; Europe
     <http://www.pericom.co.uk/teemworld/doc/twproae.htm> is a list of
     escape sequences (and control codes) for some terminal emulations
     (including VT 100, 300, 420, and Wyse).

    comp.terminals is the newsgroup for terminals


  19.2.2.  Books Related to Terminals



    EIA-232 serial port see ``EIA-232 (RS-232) Books''.

    Repair see ``Repair Books &  Websites''.

    Terminfo database see ``Termcap Documents''


  19.2.3.  Entire Books on Terminals

  As far as I know, there is no satisfactory book on text terminals
  (unless you are interested in antique terminals of the 1970's).

    Handbook of Interactive Computer Terminals by Duane E. Sharp;
     Reston Publishing Co. 1977. (mostly obsolete)

    Communicating with Display Terminals by Roger K. deBry; McGraw-Hill
     1985.  (mostly on IBM synchronous terminals)

  The "HANDBOOK ... " presents brief specifications of over 100
  different models of antique terminals made in the early 1970's by over
  60 different companies.  It also explains how they work physically but
  incorrectly shows a diagram for a CRT which uses electrostatic
  deflection of the electron beam (p. 36).  Terminals actually used
  magnetic deflection (even in the 1970's).  This book explains a number
  of advanced technical concepts such as "random scan" and "color
  penetration principle".

  The "COMMUNICATING ... " book in contrast to the "Handbook ... "
  ignores the physical and electronic details of terminals.  It has an
  entire chapter explaining binary numbers (which is not needed in a
  book on terminals since this information is widely available
  elsewhere).  It seems to mostly cover old IBM terminals (mainly the
  3270) in block and synchronous modes of operation.  It's of little use
  for the commonly used ANSI terminals used today on Unix-like systems.
  Although it does discuss them a little it doesn't show the various
  wiring schemes used to connect them to serial ports.



  19.2.4.  Books with Chapters on Terminals

  These chapters cover almost nothing about the terminals themselves and
  their capabilities.  Rather, these chapters are mostly about how to
  set up the computer (and its terminal driver) to work with terminals.
  Due to the differences of different Unix-like systems, much of the
  information does not not apply to Linux.


    Unix Power Tools by Jerry Peck et. al.  O'Reilly 1998.  Ch. 5
     Setting Up Your Terminal, Ch. 41: Terminal and Serial Line
     Settings, Ch. 42: Problems With Terminals

    Advanced Programming in the Unix Environment by W. Richard Stevens
     Addison-Wesley, 1993.  Ch. 11: Terminal I/O, Ch. 19: Pseudo
     Terminals

    Essential System Administration by Aleen Frisch, 2nd ed.  O'Reilly,
     1998.  Ch. 11: Terminals and Modems.

  The "UNIX POWER TOOLS" book has 3 short chapters on text terminals.
  It covers less ground than this HOWTO but gives more examples to help
  you.

  The "ADVANCED PROGRAMMING ... " Chapter 11 covers only the device
  driver included in the operating system to deal with terminals.  It
  explains the parameters one gives to the stty command to configure the
  terminal.

  The "ESSENTIAL SYSTEM ..." book's chapter has more about terminals
  than modems.  It seems well written.


  19.3.  Non-Linux OS's

  The configuration of the host computer for terminals for non-Linux
  operating systems is usually significantly different than for Linux.
  Here are some links to on-line manuals for Unix-like systems.


    SCO's OpenServer Adding Serial Terminals
     <http://www2.sco.com:1996/HANDBOOK/serial_terminal_adding.html> in
     SCO OpenServer Handbook.

    Hewlett-Packard's HP-UX Configuring Terminals and Modems
     <http://www.software.hp.com/OS_transition/DOCS/PERIPH/TERMS3.HTM>



  20.  Appendix B: Escape Sequence Commands Terminology

  These are sometimes called "control sequences".  This section of Text-
  Terminal-HOWTO is incomplete (and may never be complete as there are
  such a huge number of control sequences).  This section is for
  reference and perhaps really belongs in something that would be called
  "Text-Terminal-Programming-HOWTO".

  An example of an ANSI standard escape sequence is ESC[5B which moves
  the cursor down 5 lines.  ESC is the Escape character.  The parameter
  5 is included in the sequence.  If it were 7 the cursor would move
  down 7 lines, etc.  A listing for this sequence as "move cursor down x
  lines: ESC[xB" is easy to to understand.  But command jargon such as:
  "tertiary device attribute request" is less comprehensible.  This
  section will try to explain some of the more arcane jargon used for
  escape sequence commands.  A full listing (including the escape
  sequence codes for the ANSI standard) is a "wish list" project.  Since
  many escape sequences do the same thing as is done when setting up the
  terminal with ``Set-Up Options'', such escape sequences options will
  not be repeated here.


  20.1.  Esc Sequence List

  For a list of many (but not all) escape sequences for various
  terminals see Escape Seqs.; N. America <http://www.pericom-
  usa.com/twdocs/doc/twproae.htm> or Escape Seqs.; Europe
  <http://www.pericom.co.uk/teemworld/doc/twproae.htm>.  These are  used
  for terminal emulation and are not always the same as on the
  corresponding real terminal..  A list for VT (not maintained) may be
  found at Emulators FAQ <http://www.cs.ruu.nl/wais/html/na-
  dir/emulators-faq/part3.html>.  Search for "VT".


  20.2.  8-bit Control Codes

  Table of 8-bit DEC control codes (in hexadecimal).  Work on VT2xx or
  later.  CSI is the most common.


       ACRONYM  FULL_NAME                      HEX     REPLACES
       IND Index (down one line)               84      ESC D
       NEL Next Line                           85      ESC E
       RI  Reverse Index (one line up)         8D      ESC M
       SS2 Single Shift 2                      8E      ESC N
       SS3 Single Shift 3                      8F      ESC O
       DCS Device Control String               90      ESC P
       CSI Control Sequence Introducer)        9B      ESC [
       ST  String Terminator                   9C      ESC \



  20.3.  Printer Esc



    Auto Print on/off: When on, data from the host is also teed (sent)
     to the printer port of the terminal (and also shows on the terminal
     screen).

    Print Controller on/off: When on, data from the host is sent only
     to the printer (nothing shows on the terminal screen).


  20.4.  Reports

  These sequences are usually a request sent from the host to request a
  report from the terminal.  The terminal responds by sending a report
  (actually another escape sequence) to the host which has embedded in
  it certain values telling the host about the current state of the
  terminal.  In some cases a report may be sent to the host even if it
  wasn't asked for.  This sometimes happens when set-up is exited.  By
  default no unsolicited reports should be sent.


    Request for Status (Report Operating Status):  Meaning of replies
     for VT100 is either "I'm OK" or "I'm not OK"

    Request for Device Attributes:  The "device" is usually the
     printer.  Is there a printer?  Is it ready?

    Reqest for Tertiary Device Attributes (VT):  Reply is report that
     was entered during set-up.  The tertiary device is the 3rd device
     (the printer or auxiliary port device ??).  The 1st device may be
     the host computer and the 2nd device the terminal.

    Request for Terminal Parameters:  What is the parity, baud rate,
     byte width, etc.  This request doesn't seem to make much sense,
     since if the host didn't already know this it couldn't communicate
     with the terminal or send a reply.



  20.5.  Cursor Movements

  The cursor is where the next character received from the host will be
  displayed.  Most of the cursor movements are self-explanatory.  "index
  cursor" means to move the cursor down one line.  Cursor movements may
  be relative to the current position such as "move 4 spaces left" or
  absolute such as "move to row 3, column 39".  Absolute is called
  "Direct Cursor Positioning" or "Direct Cursor Addressing".

  The home position is row 1 col. 1 (index origin is 1).  But where this
  home position is on the physical screen is not completely clear.  If
  "Cursor Origin Mode" = "Relative Origin Mode" is set, then home is at
  the top of the scrolling region (not necessarily the top of the
  screen) at the left edge of the screen.  If "Absolute Origin Mode" is
  set (the same as unsetting any of the two modes in the previous
  sentence) then home is at the upper left corner of the screen.  On
  some old terminals if "Cursor Origin Mode" is set it means that it's
  relative.


  20.6.  Pages (definition)

  See ``Pages'' for an explanation of pages.  There are a number of
  escape sequences to deal with pages.  Text may be copied from one page
  to another and one may move the cursor from page to page.  Switching
  pages may or may not be automatic: when the screen becomes full (page
  1) then more data from the host goes to page 2.  The cursor may only
  be on one page at a time and characters which are sent to the terminal
  go there.  If that page is not being displayed, new text will be
  received by the terminal and go into display memory, but you will not
  see it (until the terminal is switched to that page).


  21.  Appendix C: Serial Communications on EIA-232 (RS-232)

  21.1.  Intro to Serial Communication

  (Much of this section is now found in Serial-HOWTO.)  Text terminals
  on Unix-like systems (and on PC's) are usually connected to an
  asynchronous 232 serial port of a computer.  It's usually a RS-232-C,
  EIA-232-D, or EIA-232-E.  These three are almost the same thing.  The
  original RS prefix became EIA (Electronics Industries Association) and
  later EIA/TIA after EIA merged with TIA (Telecommunications Industries
  Association).  The EIA-232 spec provides also for synchronous (sync)
  communication but the hardware to support sync is almost always
  missing on PC's.  The RS designation is obsolete but is still in use.
  EIA will be used in this article.

  The serial port is more than just a physical connector on the back of
  a computer or terminal.  It includes the associated electronics which
  must produce signals conforming to the EIA-232 specification.  The
  standard connector has 25 pins, most of which are unused.  An
  alternative connector has only 9 pins.  One pin is used to send out
  data bytes and another to receive data bytes.  Another pin is a common
  signal ground.  The other "useful" pins are used mainly for signalling
  purposes with a steady negative voltage meaning "off" and a steady
  positive voltage meaning "on".

  The UART (Universal Asynchronous Receiver-Transmitter) chip does most
  of the work.  Today, the functionality of this chip is usually built
  into another chip.


  21.2.  Voltages

  21.2.1.  Voltage for a Bit

  At the EIA-232 serial port, voltages are bipolar (positive or negative
  with respect to ground) and should be about 12 volts in magnitude
  (some are 5 or 10 volts).   For the transmit and receive pins +12
  volts is a 0-bit (sometimes called "space") and -12 volts is a 1-bit
  (sometimes called "mark").  This is known as inverted logic since
  normally a 0-bit is both false and negative while a one is normally
  both true and positive.  Although the receive and transmit pins are
  inverted logic, other pins (modem control lines) are normal logic with
  a positive voltage being true (or "on" or "asserted") and a negative
  voltage being false (or "off" or "negated").  Zero voltage has no
  meaning (except it usually means that the unit is powered off).

  A range of voltages is allowed.  The specs say the magnitude of a
  transmitted signal should be between 5 and 15 volts but must never
  exceed 25 V.  Any voltage received under 3 V is undefined (but some
  terminals will accept a lower voltage as valid).  One sometimes sees
  erroneous claims that the voltage is commonly 5 volts (or even 3
  volts) but it's usually 11-12 volts.  If you are using a EIA-422 port
  on a Mac computer as an EIA-232 (requires a special cable) or EIA-423
  then the voltage will actually be only 5 V.  The discussion here
  assumes 12 V.  There is much confusion about voltages on the Internet.

  Note that normal computer logic normally is just a few volts (5 volts
  was once the standard) so that if you try to use test equipment
  designed for testing 3-5 volt computer logic (TTL) on the 12 volts of
  a serial port, it may damage the test equipment.


  21.2.2.  Voltage Sequence for a Byte

  The transmit pin (TxD) is held at -12 V (mark) at idle when nothing is
  being sent.  To start a byte it jumps to +12 V (space) for the start
  bit and remains at +12 V for the duration (period) of the start bit.
  Next comes the low-order bit of the data byte.  If it's a 0-bit
  nothing changes and the line remains at +12 V for another bit-period.
  Then comes the next bit, etc.  Finally, a parity bit may be sent and
  then a -12 V (mark) stop bit.  The line remains at -12 V (idle) until
  the next start bit.  Note that there is no return to 0 volts and thus
  there is no simple way (except by a synchronizing signal) to tell
  where one bit ends and the next one begins for the case where 2
  consecutive bits are the same polarity (both zero or both one).

  A 2nd stop bit would also be -12 V, just the same as the first stop
  bit.  Since there is no signal to mark the boundaries between these
  bits, the only effect of the 2nd stop bit is that the line must remain
  at -12 V idle twice as long.  The receiver has no way of detecting the
  difference between a 2nd stop bit and a longer idle time between
  bytes.  Thus communications works OK if one end uses one stop bit and
  the other end uses 2 stop bits, but using only one stop bit is
  obviously faster.  In rare cases 1 1/2 stop bits are used.  This means
  that the line is kept at -12 V for 1 1/2 time periods (like a stop bit
  50% wider than normal).

  21.3.  Parity Explained

  Characters are normally transmitted with either 7 or 8 bits (of data).
  An additional parity bit may (or may not) be appended to this
  resulting in a byte length of 7, 8 or 9 bits.  Some terminal emulators
  and older terminals do not allow 9 bits.  Some prohibit 9 bits if 2
  stop bits are used (since this would make the total number of bits too
  large: 12 bits total).

  The parity may be set to odd, even or none (mark and space parity may
  be options on some terminals).  With odd parity, the parity bit is
  selected so that the number of 1-bits in a byte, including the parity
  bit, is odd.  If a such a byte gets corrupted by a bit being flipped,
  the result is an illegal byte of even parity.  This error will be
  detected and if it's an incoming byte to the terminal an error-
  character symbol will appear on the screen.  Even parity works in a
  similar manner with all legal bytes (including the parity bit) having
  an even number of 1-bits.  During set-up, the number of bits per
  character usually means only the number of data bits per byte (7 for
  true ASCII and 8 for various ISO character sets).

  A "mark" is a 1-bit (or logic 1) and a "space" is a 0-bit (or logic
  0).  For mark parity, the parity bit is always a one-bit.  For space
  parity it's always a zero-bit.  Mark or space parity only wastes
  bandwidth and should be avoided when feasible.  "No parity" means that
  no parity bit is added.   For terminals that don't permit 9 bit bytes,
  "no parity" must be selected when using 8 bit character sets since
  there is no room for a parity bit.


  21.4.  Forming a Byte (Framing)

  In serial transmission of bytes via EIA-232 ports, the low-order bit
  is always sent first.  Serial ports on PC's use asynchronous
  communication where there is a start bit and a stop bit to mark the
  beginning and end of a byte.  This is called framing and the framed
  byte is sometimes called a frame.  As a result a total of 9, 10, or 11
  bits are sent per byte with 10 being the most common.   8-N-1 means 8
  data bits, No parity, 1 stop bit.  This adds up to 10 bits total when
  one counts the start bit.  One stop bit is almost universally used.
  At 110 bits/sec (and sometimes at 300 bits/sec) 2 stop bits were once
  used but today the 2nd stop bit is used only in very unusual
  situations (or by mistake since it seemingly still works OK that way).


  21.5.  Limitations of EIA-232

  21.5.1.  Low Speed & Short Distance

  The conventional EIA-232 serial port is inherently low speed and is
  severely limited in distance.  Ads often read "high speed" but it can
  only work at high speed over very short distances such as to a modem
  located right next to the computer.  All of the wires use a common
  ground return so that twisted-pair technology (needed for high speeds)
  can't be used without additional hardware.  However some computers
  have more modern interfaces.  See ``Successors to EIA-232''.

  It is somewhat tragic that the RS-232 standard from 1969 did not use
  twisted pair technology which could operate about a hundred times
  faster.  Twisted pairs have been used in telephone cables since the
  late 1800's.  In 1888 (over 110 years ago) the "Cable Conference"
  reported its support of twisted-pair (for telephone systems) and
  pointed out its advantages.  But over 80 years after this approval by
  the "Cable Conference", RS-232 failed to utilize it.   Since RS-232
  was originally designed for connecting a terminal to a low speed modem
  located nearby, the need for high speed and longer distance
  transmission was apparently not recognized.


  21.5.2.  Successors to EIA-232

  A number of EIA standards have been established for higher speeds and
  longer distances using twisted-pair (balanced) technology.  Balanced
  transmission can sometimes be a hundred times faster than unbalanced
  EIA-232.  For a given speed, the distance (maximum cable length) may
  be many times longer with twisted pair.  But PC-s keep being made with
  the "obsolete" EIA-232 since it works OK with modems connected to slow
  telephone lines, and it works OK with mice.

  One exception is Apple's Mac computer with its EIA-232/EIA-422 GeoPort
  which provides twisted-pairs (balanced) for transmit and receive.  It
  uses a small round "mini-DIN" connector.  It also provides
  conventional EIA-232 but only at 5 volts (which is still legal
  EIA-232).  However, due to the fact that Macs cost more than PC's,
  they are seldom used as a host computer for terminals.  Some newer
  terminals use EIA-423 but this is just like the unbalanced EIA-232 and
  can be connected to a EIA-232 port.  This EIA-423 is only 5 volts, but
  the specs call for higher speeds than the EIA-232 (which will be of no
  help on a long run where it's the unbalance that causes interference).

  EIA-485 is also balanced and is used as a "bus" like ethernet and USB.
  One device connected to it is the "master" and polls the "slaves" for
  input.  Since many computers may share the twisted pair its sometimes
  called "multidrop".  Another twisted pair is used for traffic from the
  master to the slaves.  The output voltage on the pins must be tristate
  with the third state being open circuit to permit other units to use
  the "bus".  It's been claimed that protocols are not standardized for
  multidrop and that's bad news.  See
  <http://www.hw.cz/english/docs/rs485/rs485.html>

  EIA-530-A (balanced but can also be used unbalanced) at 2Mbits/s
  (balanced) was intended to be a replacement for EIA-232 but few have
  been installed.  It uses the same 25-pin connector as EIA-232.


  The High Speed Serial Interface ( HSSI = EIA-612/613) uses a 50-pin
  connector and goes up to about 50 Mbits/s but the distance is limited
  to only several meters.  The Universal Serial Bus (USB) is being built
  into PCI chips.  It is 12 Mbits/s over a twisted pair with a 4-pin
  connector (2 wires are power supply) but it also is limited to short
  distances of at most 5 meters (depends on configuration).


  21.5.3.  Line Drivers

  For a text terminal, the EIA-232 speeds are fast enough but the usable
  cable length is often too short.  Balanced technology could fix this.
  The common method of obtaining balanced communication with a text
  terminal is to install 2@ line drivers in the serial line to convert
  unbalanced to balanced (and conversely).  They are a specialty item
  and are expensive if purchased new.


  21.6.  Synchronization & Synchronous

  21.6.1.  How "Asynchronous" is Synchronized

  Per EIA-232 there are only two states of the transmit (or receive)
  wire: mark (-12 V) or space (+12 V).  There is no state of 0 V.  Thus
  a sequence of 1-bits is transmitted by just a steady -12 V with no
  markers of any kind between bits.  For the receiver to detect
  individual bits it must always have a clock signal which is in
  synchronization with the transmitter clock.  Such clocks generate a
  "tick" in synchronization with each transmitted (or received) bit.

  For asynchronous transmission, synchronization is achieved by framing
  each byte with a start bit and a stop bit (done by hardware).  The
  receiver listens on the line for a start bit and when it detects one
  it starts its clock ticking.  It uses this clock tick to time the
  reading of the next 7, 8 or 9 bits.  (It actually is a little more
  complex than this since several samples of a bit are often taken and
  this requires additional timing ticks.)  Then the stop bit is read,
  the clock stops and the receiver waits for the next start bit.  Thus
  async is actually synchronized during the reception of a single byte
  but there is no synchronization between one byte and the next byte.


  21.6.2.  Defining Asynchronous vs Synchronous

  Asynchronous (async) means "not synchronous".  In practice, an async
  signal is what the async serial port sends and receives which is a
  stream of bytes each delimited by a start and stop bit.  Synchronous
  (sync) is most everything else.  But this doesn't explain the basic
  concepts.

  In theory, synchronous means that bytes are sent out at a constant
  rate one after another in step with a clock signal tick.  There is
  often a separate wire or channel for sending the clock signal.
  Asynchronous bytes may be sent out erratically with various time
  intervals between bytes (like someone typing characters at a
  keyboard).

  There are borderline situations that need to be classified as either
  sync or async.  The async serial port often sends out bytes in a
  steady stream which would make this a synchronous case but since they
  still have the start/stop bits (which makes it possible to send them
  out erratically) its called async.  Another case is where data bytes
  (without any start-stop bits) are put into packets with possible
  erratic spacing between one packet and the next.  This is called sync
  since the bytes within each packet must be transmitted synchronously.


  21.6.3.  Synchronous Communication

  Did you ever wonder what all the unused pins are for on a 25-pin
  connector for the serial port?  Most of them are for use in
  synchronous communication which is seldom implemented on PC's.  There
  are pins for sync timing signals as well as for a sync reverse
  channel.  The EIA-232 spec provides for both sync and async but PC's
  use a UART (Universal Asynchronous Receiver/Transmitter) chip such as
  a 16450, 16550A, or 16650 and can't deal with sync.  For sync one
  needs a USART chip or the equivalent where the "S" stands for
  Synchronous.  Since sync is a niche market, a sync serial port is
  likely to be quite expensive.

  Besides the sync part of the EIA-232, there are various other EIA
  synchronous standards.  For EIA-232, 3 pins of the connector are
  reserved for clock (or timing) signals.  Sometimes it's a modem's task
  to generate some timing signals making it impossible to use
  synchronous communications without a synchronous modem (or without a
  device called a "synchronous modem eliminator" which provides the
  timing signals).

  Although few serial ports are sync, synchronous communication does
  often take place over telephone lines using modems which use V.42
  error correction.  This strips off the start/stop bits and puts the
  date bytes in packets resulting in synchronous operation over the
  phone line.
  21.7.  Block Mode

  21.7.1.  Intro to Block Mode

  Block mode is seldom used with Linux.  In block mode when one types at
  a terminal, the results are saved in the terminal memory and are not
  sent just yet to the host computer.  Such terminals often have built-
  in editing capabilities.  When the user presses certain keys (such as
  the send key) what has been saved in the terminal memory is sent to
  the host computer.  Now the Linux editors vi and emacs, react
  instantly to pressing certain keys but in the above situation such
  keys will be pressed and nothing will happen since nothing is sent
  when a key is pressed.  Thus using a block mode terminal will not
  allow the use of such interactive programs.  The old IBM mainframe
  interface uses block mode (see ``IBM Terminals '' so many IBM
  terminals are block-mode only and also synchronous (see Section
  ``Synchronization & Synchronous'').


  21.7.2.  Types of Block Modes, Forms

  Block mode may itself have various sub-modes such as "page" (a page at
  a time) and "line" (a line at a time).  Some terminals have both block
  transmission modes and conventional character modes and may be
  switched from one mode to another.  Async terminals which have block
  modes include HP2622A, VT130, VT131, VT330, VT340, and Visual500.
  Many later model terminals can emulate block mode.  Block modes may
  include a forms capability where the host computer sends a form to the
  terminal.  Then the user fills it out and hits the send key which
  sends only the data in the form back to the host computer.  The form
  itself (not the data) is displayed on the screen in protected fields
  which don't get transmitted to the host.


  21.7.3.  Efficiency

  Block mode takes a great deal of load off the host computer,
  especially if the host computer's hardware is designed for block modes
  (as IBM mainframes were).  In character mode every character typed is
  sent immediately to the serial port and usually causes an interrupt at
  the host computer.  The host that receives the byte must stop whatever
  it is doing and fetch that character from the port hardware.  Even
  with UART's that have FIFO hardware buffers, the hardware timeout is
  normally only the transmission time of 3 bytes so that an interrupt is
  usually issued for every character typed.

  In true block mode a long block of characters is received using only
  one interrupt.  If block mode is used with conventional async FIFO
  serial ports, an interrupt is needed only every 14 bytes since they
  have 16-byte hardware buffers.  Thus much of the load and overhead of
  interrupt handling is eliminated and the computer has more time to do
  other tasks when block mode is used.

  A significant savings for block mode occurs if the terminal is
  connected to its host via a network.  Without block mode, every
  character (byte) typed is sent in its own packet including all the
  overhead bytes (40 in a TCP/IP packet as used on the Internet).  With
  block mode, a large number of characters are sent in a single packet.


  21.8.  EIA-232 (RS-232) Books

  (Note: The first book covers much more than just EIA-232.)

    Black, Uyless D.: Physical Layer Interfaces & Protocols, IEEE
     Computer Society Press, Los Alamitos, CA, 1996.
    Campbell, Joe: The RS-232 Solution, 2nd ed., Sybex, 1982.

    Putnam, Byron W.: RS-232 Simplified, Prentice Hall, 1987.

    Seyer, Martin D.: RS-232 Made Easy, 2nd ed., Prentice Hall, 1991.


  21.9.  Serial Software

  See Serial Software <ftp://sunsite.unc.edu/pub/Linux/system/serial/>
  for Linux software for the serial ports including getty and port
  monitors.


  22.  Appendix D: Notes by Brand Name

  Here are notes by brand name that were too specific to a certain
  terminal to be put elsewhere in this HOWTO.  If you have some info to
  contribute on a certain terminal that is not covered elsewhere, it
  could go here.  Various models and brands often have much in common
  which only need be written about in one place.  It would be nice to
  have for each terminal model, a large set of links linking to the
  documentation relevant to that model (including escape codes).  There
  are so many models of terminals that such a task would be quite
  onerous and I, David Lawyer (as of 1998), have no intention of
  attempting this.  If terminal manufacturers would only make their
  manuals available on the net, then all this might not be needed.


  22.1.  CIT

  CIT terminals were made in Japan in the 1980's for CIE Terminals.
  They ceased to be imported in the late 1980's.  The company, CIE,
  still makes CItoh printers (in 1997) but has no parts for its
  abandoned terminals.  Ernie at (714) 453-9555 in Irvine CA sells (in
  1997) some parts for models 224, 326, etc. but has nothing for the 80
  and 101.  (The document you are now reading was written mostly on the
  101e.)

  To save the Set-Up parameters press ^S when in Set-Up mode.  cit80:
  Contrast: knob on rear of terminal, cit101e: Brightness: use up/down
  arrow keys in Set-Up mode.


  22.2.  IBM Terminals

  Don't confuse IBM terminals with IBM PC monitors.  Many IBM terminals
  don't use ASCII but instead use an 8-bit EBCDIC code.  It's claimed
  that in EBCDIC the bit order of transmission is reversed from normal
  with the high-order bit going first.  The IBM mainframe communication
  standards are a type of synchronous communication in block mode (sends
  large packets of characters).  Two standards are "BISYNC" and "SNA"
  (which includes networking standards).  Many of their terminals
  connect with coax cable (RG62A/U) and naive persons may think the
  "BNC" connecter on the terminal is for ethernet (but it's not).

  While this IBM system is actually  more efficient than what is
  normally used in Linux, terminals meeting this IBM standard will not
  currently work with Linux.  However, some IBM terminals are
  asynchronous ASCII terminals and should work with Linux on PC's.  The
  numbers 31xx may work with the exception that 317x and 319x are not
  ASCII terminals.  Before getting an IBM terminal, make sure there is a
  termcap (terminfo) for it.  If their isn't, it likely will not work
  with Linux.  Even if there is a terminfo, it may not work.  For
  example, there is a termcap for 327x but the 3270 is an EBCDIC
  synchronous terminal.
  The 3270 series includes the 3278 (late 1970's), 3279 with color and
  graphics, and the 3274 terminal controller (something like the 3174).
  They may be used for both BISYNC and SNA.  The 3290 has a split screen
  (splits into quarters).

  The synchronous IBM terminals don't connect directly to the IBM
  mainframe, but connect to a "terminal controller" (sometimes called
  "cluster controller" or "communication controller").  Some of these
  controllers can convert a synchronous signal to asynchronous so that
  in this case a synchronous terminal could indirectly connect to a
  Unix-like host computer via its serial port.  But there is still a
  major problem and that is block transmission.  See section ``Block
  Mode''.


  22.2.1.  IBM 3153

  It's claimed that the Aux port is DCE and uses a straight-thru cable.


  22.3.  Teletypes

  These are antiques and represent the oldest terminals.  They are like
  remotely controlled typewriters but are large and noisy.  Made by the
  Teletype Corp., the first models were made in the 1920's and predate
  the computer by over 30 years.  Early models used electro-mechanical
  relays and rotating distributors instead of electronics.  Their Baudot
  code was only 5-bits per character as compared to 7-bit ASCII.  See
  the book "Small Computer Systems Handbook" by Sol Libes, Hayden Books,
  1978: pp. 138-141 ("Teletypes").


  22.4.  VT (DEC)

  Digital Equipment Corporation made the famous VT series of terminals
  including the commonly emulated VT100.  In 1995 they sold their
  terminal business to SunRiver which is now named Boundless
  Technologies.  Detailed VT terminal information, some manuals, and
  history is at  <http://www.vt100.net/>.  Other information is
  available at Shuford's Website
  <http://www.cs.utk.edu/~shuford/terminal_index.html>.  Information on
  current products is available from the Boundless website.  See
  ``Terminal Info on the Internet''.

  VT220: Some have a BNC connector for video output (not for input).
  Sometimes people erroneously think this is for an ethernet connection.

  VT520: Supports full DTR/DSR flow control.


  22.5.  Wyse

  Wyse has some FAQ's for terminal numbers under 100 (such as WY60).
  See  <http://www.wyse.com/service/faq/wysetter.htm> For the specs on
  more recent terminals see See  <http://www.wyse.com/terminal/>.


  22.5.1.  Wyse 60

  Display adjustments (must remove cover): Brightness VR202, Height
  VR302, Width VR101 (also affects height).



  22.5.2.  Wyse 85

  Can emulate VT52/T100/VT200.  Press F3 for setup.  Scroll thru setup
  with up/down keys.


  22.5.3.  Wyse 99-GT

  Here is the setup Menus of the Wyse99GT (late 1980's).  Note that TERM
  means "termination" (character) and not "terminal".



         WYSE 99-GT Terminal Set-Up as used at the University of CA, Irvine
                       by David Lawyer, April 1990

                               F1 DISP:
       COLUMNS=80              LINES=24                CELL SIZE=10 X 13
       STATUS LINE=STANDARD    BACKGROUND=DARK         SCROLL SPEED=JUMP
       SCREEN SAVER=OFF        CURSOR=BLINK BLOCK      DISPLAY CURSOR=ON
       ATTRIBUTE=CHAR          END OF LINE WRAP=ON     AUTO SCROLL=ON
       ----------------------------------------------------------------------------
                               F2  GENERAL:
       PERSONALITY=VT 100      ENHANCE=ON              FONT LOAD=OFF
       COMM MODE=FULL DUPLEX   RCVD CR=CR              SEND ACK=ON
       RESTORE TABS=ON         ANSWERBACK MODE=OFF     ANSWERBACK CONCEAL=OFF
       WIDTH CHANGE CLEAR=OFF  MONITOR=OFF             TEST=OFF
       ----------------------------------------------------------------------------
                               F3 KEYBRD:
       KEYCLICK=OFF            KEYLOCK=CAPS            KEY REPEAT=ON
       RETURN=CR               ENTER=CR                FUNCT KEY=HOLD
       XMT LIMIT=NONE          FKEY XMT LIMIT=NONE     BREAK=170MS
       LANGUAGE=US             MARGIN BELL=OFF         PRINTER RCV=OFF
       ----------------------------------------------------------------------------
                               F4 COMM:
       DATA/PRINTER=AUX/MODEM    MDM RCV BAUD RATE=9600  MDM XMT BAUD RATE=9600
       MDM DATA/STOP BITS=8/1    MDM RCV HNDSHAKE=NONE   MDM XMT HNDSHAKE=NONE
       MDM PARITY=NONE           AUX BAUD RATE=9600      AUX DATA/STOP BITS=8/1
       AUX RCV HNDSHAKE=NONE     AUX XMT HNDSHAKE=NONE   AUX PARITY=NONE
       (There is a main port (Modem=MDM) and an Auxiliary Port (AUX)
       ----------------------------------------------------------------------------
                               F5 MISC 1:
       WARNING BELL=ON         FKEY LOCK=OFF           FEATURE LOCK=ON
       KEYPAD=NUMERIC          DEL=DEL/CAN             XFER TERM=EOS
       CURSOR KEYS=NORMAL      MARGIN CTRL=0           DEL FOR LOW Y=ON
       GIN TERM=CR             CHAR MODE=MULTINATIONAL
       ----------------------------------------------------------------------------
                               F6 MISC 2:
       LOCAL=OFF               SEND=ALL                PRINT=NATIONAL
       PORT=EIA DATA           SEND AREA=SCREEN        PRINT AREA=SCREEN
       DISCONNECT=60 MSEC      SEND TERM=NONE          PRINT TERM=NONE
       PRINT MODE=NORMAL       VT100 ID=VT100          POUND=US
       ----------------------------------------------------------------------------
       F7 TABS: You should see several "T" characters spaced 8 dots apart.
           If you don't, hit backspace.
       F8 F/KEYS: Normally you will see no definitions for the Function Keys
           here (unless someone has set them up and saved them).  This means that
           they will normally generate their default settings (not displayed here).
           <ctrl><F5> shows the "user defined definition" of the F5 key, etc.
       F9 A/BACK: Normally not defined: ANSWERBACK =
       F10 EXIT: Selecting "DEFAULT ALL" will make the factory default settings
           the default.



  HINTS on use of WY-99GT User's Guide: Note that much that is missing
  from this Guide may be found in the WY-99GT Programmer's Guide.  The
  VT100 emulation (personality) is known as ANSI and uses ANSI key codes
  per p. A-10+ even though the keyboard may be ASCII.  A sub-heading on
  p. A-13 "ASCII Keyboard" also pertains to VT100 because it has an
  "ANSI KEY ..." super-heading a few pages previously.  But not all
  ASCII keyboard headings pertain to VT100 since they may fall under a
  non-ANSI personality super-heading which may found be a few pages
  previously.  Appendix H is the "ANSI Command Guide" except for the
  VT52 (ANSI) personality which is found in Appendix G.


  22.5.4.  Wyse 150

  When exiting set-up using F12, hitting space changes "no" to "yes" to
  save the set-up.  The sentence to the left of this no/yes is about
  "vertical alignment" and has nothing to do with this no/yes for saving
  the set-up (confusing menu design).

  END OF Text-Terminal-HOWTO



  Thin Client: New User Guide
  Stephen Noble stephen7 at bigfoot.com
  30th November 1999

  1.How to turn inexpensive legacy computers into fast terminals using
  the power of your main computer, you will need : A fast computer to
  act as Server, A client computer (old and unwanted). Linux compatible
  network cards. A connection between computers.  2.How to centralise
  system administaration by useing NFS, ie placing the entire file sys-
  tem of a faster client on the server.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Hardware and Documentation

     2.1 Hardware
     2.2 Documentation

  3. Server setup

     3.1 Check your network services on your server
     3.2 Setting up a dhcpd daemon
     3.3 Tftpd setup
     3.4 Kernel image
     3.5 Security

  4. Client setup

  5. Network files system

     5.1 server specific
     5.2 client specific

  6. X-terminal

  7. Acknowledgments & further exercises



  ______________________________________________________________________

  1.  Introduction


  o  Linux allows any reasonably new computer to be used as a server to
     a thin client, or many thin clients, these thin clients can be
     inexpensive legacy computers. For a console terminal you need a 386
     with 4-8mb of ram, or for an X-Terminal a 486/66 with 8-16mb ram.

  o  One Option is without a hard drive, it keeps the noise down and
     simplifies administration as you only have one system to maintain.

  o  If you have legacy apps, you can have them on a hard drive with
     it's legacy Operating System

  o  This howto is aimed at those new to Unix/Linux, it will cover the
     essential areas you need to be aware of and point you to other
     documentation in that area you need to be familiar with.

  o  You will probably use this as an aid to the
     http://www.slug.org.au/etherboot/  documentation, I include some
     more examples of config files, and leave many of the other features
     of etherboot as an exercise for the reader

  o  If your client is sufficiently powerful only the file system need
     be shared, applications can run on the client system. (say a 233
     32mb ram).  Install an application on the server and all clients
     have access



  2.  Hardware and Documentation


  2.1.  Hardware

  When you start, you will need at least this



  o  a computer to act as Server,

  o  a client computer, I unplugged the power to the hard disk and
     disabled the drive in the bios to emulate a diskless machine

  o  compatible network cards

  o  connection between computers, I used twisted pair ethernet with
     RJ45 terminators

  o  For two computers a cross-over cable  is sufficient, and saves
     another power point, the first computer shop I went to gave me
     blank stares, idiots !

  o  For two or more clients, you need a hub, a kit with a 10 mb 4 port
     hub ,2 cards sells for under A$150, you can probably do better,
     I've had some success with $5 second hand cards, 3m cables for $6,
     a new hub for $40, a found monitor and a $60 pentium 75


  2.2.  Documentation

  You may like to familiarise yourself with the linux documentation,
  specifically you can read (skim) for an overview the following :


  o  /usr/doc/HOWTO/mini/Diskless - a similar howto tackling this
     problem

  o  Networking Overview HOWTO - Networking capabilities of the Linux

  o  Ethernet HOWTO -  Information on Ethernet hardware compatibility

  o  NET-3 HOWTO -  How to configure TCP/IP networking under Linux.


  Also you probably have in the  /usr/doc/LDP/ directory

  o  The System Administrators' Guide

  o  The Network Administrators' Guide

  o  Linux Installation and Getting Started


  The obligitory link


  o  http://www.magma.ca/~bklimas help for new linux users.


  One last thing

  o  my network server is snoball , my client is elite and my
     (local)domain is gundog.net Replace with your computers names where
     applicable


  3.  Server setup

  The server needs to be setup in readiness for the client in a number
  of ways


  3.1.  Check your network services on your server

  run the command /sbin/ifconfig if your output is similar to below then
  your loopback and ethernet card are correctly configured.


  ______________________________________________________________________
  [cassie@snoball cassie]$ /sbin/ifconfig
  lo        Link encap:Local Loopback
       inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
       UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
       RX packets:854 errors:0 dropped:0 overruns:0 frame:0
       TX packets:854 errors:0 dropped:0 overruns:0 carrier:0
       collisions:0
  eth0      Link encap:Ethernet  HWaddr 00:AA:00:BB:BD:09
       inet addr:192.168.53.1  Bcast:192.168.53.255  Mask:255.255.255.0
       UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
       RX packets:190369 errors:0 dropped:0 overruns:0 frame:0
       TX packets:249267 errors:0 dropped:0 overruns:0 carrier:1
       collisions:4793           Interrupt:5 Base address:0x320
  ______________________________________________________________________



  If not ...

  o  loopback, if this isn't here you need to activate it at start up,

  o  ethernet card, is it being detected,is the driver a module

  o  you can set these in linuxconf or netcfg


  3.2.  Setting up a dhcpd daemon

  Here the server gives out IP numbers to requests by clients


  o  is DHCPD installed, maybe (as root) just run ntsysv and have it
     start at boot time

  o  this /etc/dhcpd.conf file assigns static IP numbers if you have a
     matching MAC address, A MAC address is a unique 'number' given to
     the NIC.  The start of the 'number' is based on the manufacturer,
     if you don't have a sticker on the card, attempt to load the rom
     image from eprom or floppy and see what it reports. (see client
     setup)


     ___________________________________________________________________
     #/etc/dhcpd.conf
     subnet 192.168.35.0 netmask 255.255.255.0 {
         option domain-name "gundog.net";
         range dynamic-bootp 192.168.35.128 192.168.35.255;
         default-lease-time 21600;
         max-lease-time 43200;
         }

     host 286 {
             filename "/tftpboot/kermit.nb";
             hardware ethernet 00:80:c8:22:ae:de;
             fixed-address 192.168.35.70;
             }

     host elite {
         filename "/tftpboot/vmlinuz.xterm";
         hardware ethernet 00:00:79:80:34:c9;
         fixed-address 192.168.35.23;
             option host-name "elite";
     ___________________________________________________________________



  o  the /etc/hosts file resolves IP numbers into host names

     ___________________________________________________________________
     #etc/hosts
     127.0.0.1       localhost    localhost.localdomain
     192.168.53.1    snoball      snoball.gundog.net
     192.168.53.23   elite        elite.gundog.net
     ___________________________________________________________________



  3.3.  Tftpd setup

  trivial ftp - after you have your IP number your client requests a
  kernal, this is delivered over ethernet.

  o  Install tftpd, make sure it's active in /etc/inetd.conf, typical
     line


     ___________________________________________________________________
     tftp dgram udp wait root /usr/sbin/tcpd in.tftpd -s /tftpboot
     ___________________________________________________________________



  restart inetd, kill -HUP "process id of inetd"


  3.4.  Kernel image

  You must compile a kernel for the Client that includes NFS support and
  the NIC driver for that client compiled in (not modules).  Answer yes
  to Root file system on NFS? and BOOTP support?

  After building the kernel, run mknbi-linux from the Etherboot
  distribution on it.(the mknbi program in the netboot/linux directory)
  Install this tagged image as /tftpdir/"vmlinuz.xterm".


  see etherboot-4.2/doc/html/README-3.html

  should i put a copy of mine somewhere for download RH6.0 ne2000 NIC


  3.5.  Security

  It's easiest to allow anybody and anything to run services and process
  on your computer, but one day you will be sorry. You restrict these by
  your /etc/hosts.deny and specifically restore rights by
  /etc/hosts.allow, indicative examples :

  ______________________________________________________________________
  #hosts.deny
  # all except those in hosts.allow
  ALL:ALL


  #hosts.allow
  #only hosts within my domain and my host at home.
  ALL:LOCAL, 192.168.53.       #<-- note:no space after :
  ______________________________________________________________________



  more security - look for more information in the ldp-howto's and if
  your using etherboot, in it's security howto.


  4.  Client setup

  Network loader

  A small program that runs as a BIOS extension, can be loaded from a
  floppy, or you can burn an eprom chip and insert it on your network
  card for a totally diskless client. It handles the DHCPD query and
  TFTP loading and then transfers control to the loaded image. It uses
  TCP/IP protocols.


  There are two free implementations of TCP/IP net loaders: Etherboot
  and Netboot: Etherboot uses built-in drivers while Netboot uses Packet
  drivers.


  o  see etherboot-4.2/doc/html/README-2.html,

  o  I compiled the option to ask local or Network and default to local
     after 5 seconds

  o  making a boot rom floppy, floppyload.bin was tricky to find, I
     copied it into the directory of compiled rom images

     ___________________________________________________________________
     cat floppyload.bin ne2000.lzrom > /dev/fd0
     ___________________________________________________________________



  5.  Network files system


  The Client requests to mount /tftpboot/<IP address of client> as its /
  by NFS from server. You must export this from the server,(maybe
  symlink to /tftpboot/client to be safe.)

  NFS is a big topic there is a HOWTO and two mini Howto's.

  first you need to create a copy of your current system under /tftpboot
  ken has written two scripts that do all your work, I called them
  makefirst and makecopy. my first client takes 20-30mb and the copy
  less. I used du -h to look for large unnecesary files.

  see etherboot-4.2/doc/html/diskless-5.html

  the following seem to me to be the critical files here


  5.1.  server specific


  ______________________________________________________________________
  #/etc/exports
  /tftpboot/elite             elite(rw,no_root_squash)
  /tftpboot/elite             gordon(rw,no_root_squash)
  /usr                        *.gundog.net(ro)
  /home                       *.gundog.net(rw)
  /mnt/cdrom                  (ro)

  run exportfs -a  to reread the exports file after
  changes /usr/sbin/exportfs --help


  #/etc/sysconfig/network
  NETWORKING=yes
  FORWARD_IPV4="no"
  HOSTNAME="snoball"         <-----------
  GATEWAYDEV=""
  GATEWAY=""


  #/etc/sysconfig/network-scripts/ifcfg-eth0
  IPADDR="192.168.53.1"            <-----------
  BOOTPROTO=none
  ______________________________________________________________________



  5.2.  client specific



  ______________________________________________________________________
  #tftpboot/elite/etc/fstab
  snoball:/tftpboot/elite    /               nfs rw  1 1
  none                    /proc proc          defaults   0 0
  snoball:/usr           /usr                 nfs     ro  1 1
  snoball:/home          /home                nfs     rw  1 1


  #tftpboot/elite/etc/sysconfig/network
  NETWORKING=yes
  FORWARD_IPV4=nomore
  HOSTNAME=elite
  GATEWAYDEV=
  GATEWAY="192.168.53.1"       <-----------


  #/tftpboot/elite/etc/sysconfig/network-scripts/ifcfg-eth0
  DEVICE=eth0
  USERCTL=yes
  ONBOOT=yes
  BOOTPROTO=none
  BROADCAST=192.168.53.255
  NETWORK=192.168.53.0
  NETMASK=255.255.255.0
  IPADDR=192.168.53.23         <-----------
  ______________________________________________________________________



  #odd fiddles #itemize> #item>fast...  #item>cp /usr/bin/xargs
  /tftpboot/client/bin/xargs #/itemize>


  6.  X-terminal


  With no further changes your client should boot on the CLIENT pc, it
  just happens to be sharing it's files via NFS

  At this point you have a console terminal. you need to make just a few
  more changes to run X



  o  Configuring X

     As root on client run Xconfigurator and mouseconfig,

     If this fails use XF86Setup check your RPMS dir on your CD (eg.ls
     *Setup*)


  o  X Font Server



     ___________________________________________________________________
     #chech how xfs starts on server /etc/rc.d/init.d/xfs
       start)
         echo -n "Starting X Font Server: "
         rm -fr /tmp/.font-unix
         daemon --check xfs su xfs -c xfs -s /bin/sh
         touch /var/lock/subsys/xfs
         echo
         ;;

     #edit XF86Config for all machines
         FontPath  "tcp/snoball:7100"
     ___________________________________________________________________



  o  Console login

     You are now set up for a console login to the client PC. You are
     using the client memory and processor, this is adequate for console
     programs and there and many or great merit, program in python,
     email with pine or browse with lynx.


     You may still start X from here, make the server changes in the
     next section, at the prompt type X -query snoball and you will get
     the login box to the server


  o  Graphical login

     Server set up


     ___________________________________________________________________
     1. Make sure the client is matched by a clause in /etc/X11/xdm/Xaccess
     *   CHOOSER BROADCAST   #any indirect host can get a chooser


     2. Comment out the :0 in /etc/X11/xdm/Xservers
     #:0 local /usr/X11R6/bin/X

     3. Then make sure that xdm is run from the init scripts.
     #etc/inittab
     id:5:initdefault:

     and
     # Run xdm in runlevel 5
     # xdm is now a separate service
     x:5:respawn:/etc/X11/prefdm -nodaemon
     xdm:5:respawn:/usr/X11R6/bin/xdm -nodaemon
     ___________________________________________________________________



  On the client

  Get the slow PC's to run on the server, Fast PC's (eg 166mhz 32mb
  ram)can run ok on their own CPU and memory


  the part maarked WARNING dosn't actually work as yet, but I'm close to
  getting the syntax correct, use the two stage method via the console
  login in the mean time.

  ______________________________________________________________________
  #/tftpboot/elite/etc/inittab

  id:5:initdefault:                                    #WARNING
  x:5:respawn:/usr/X11R6/bin/Xwrapper -query snoball   #WARNING

  OR to run on client ??

  id:3:initdefault:                                    #runlevel 3 ie console
  x:5:respawn:/etc/X11/prefdm -nodaemon
  ______________________________________________________________________



  7.  Acknowledgments & further exercises


  Markus Gutschke and Ken Yap the authors of the Etherboot program.



  Extend your system with the following programs

  o  squid -      cache your web browsing for others on your network

  o  junkbuster - banish web banner adds

  o  mailman -    mailinglist ;setup via e-mail or web

  o  imp -        web based email (with a java enabled browser)

  o  python -     for some Java and C is just too hard

  o  sgmltools -  knock out multiple versions of your docs

  o  suggestions ?

  stephen7 at bigfoot.com



  The Linux Tips HOWTO
  Paul Anderson, paul@geeky1.ebtech.net
  v3.6, June 1998

  This HOWTO contains those hard to find hints and tweekings that make
  Linux a bit nicer.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Short Tips

     2.1 Handy Syslog Trick
     2.2 Script to view those compressed HOWTOs.
     2.3 Is there enough free space???
     2.4 Util to clean up your logfiles.
     2.5 Handy Script to Clean Up Corefiles.
     2.6 Moving directories between filesystems.
     2.7 Finding out which directories are the largest.
     2.8 The Linux Gazette
     2.9 Pointer to patch for GNU Make 3.70 to change VPATH behavior.
     2.10 How do I stop my system from fscking on each reboot?
     2.11 How to avoid fscks caused by "device busy" at reboot time.
     2.12 How to find the biggest files on your hard-drive.
     2.13 How to print pages with a margin for hole punching.
     2.14 A way to search through trees of files for a particular regular expression.
     2.15 A script for cleaning up after programs that create autosave and backup files.
     2.16 How to find out what process is eating the most memory.
     2.17 Rigging vi for C programming,
     2.18 Using ctags to ease programming.
     2.19 Why does sendmail hang for 5 minutes on startup with RedHat?
     2.20 How do I configure RedHat for using color-ls?
     2.21 How do I find which library in /usr/lib holds a certain function?
     2.22 I compiled a small test program in C, but when I run it, I get no output!

  3. Detailed Tips

     3.1 Sharing swap partitions between Linux and Windows.
     3.2 Desperate Undelete.
     3.3 How to use the immutable flag.
     3.4 A suggestion for where to put new stuff.
     3.5 Converting all files in a directory to lowercase.
     3.6 How To Upgrade Sendmail
     3.7 Some tips for new sysadmins.
     3.8 How to configure xdm's chooser for host selection.


  ______________________________________________________________________

  1.  Introduction

  Welcome to the Linux Tips HOWTO, a list of neato tricks and
  optimizations that make Linux more fun.  All I have in here right now
  are tips off of the top of my head, and tips from the old Tips-HOWTO
  (Why take out decent tips, right?).  So send all your favorite hints
  and tips to me so I can put them in the next Tips-HOWTO.

  Paul Anderson Maintainer--Linux TIPS HOWTO

  panderso@ebtech.net



  2.  Short Tips

  2.1.  Handy Syslog Trick Paul Anderson, Tips-HOWTO maintainer

  Edit your /etc/syslog.conf, and put in the following line:


       # Dump everything on tty8
       *.*                                     /dev/tty8



  One caveat: REMEMBER TO USE TABS!  syslog doesn't like spaces...


  2.2.  Script to view those compressed HOWTOs. Didier Juges,  dj@des-
  tin.nfds.net


  From a newbie to another, here is a short script that eases looking
  for and viewing howto documents.  My howto's are in
  /usr/doc/faq/howto/ and are gzipped. The file names are XXX-HOWTO.gz,
  XXX being the subject.  I created the following script called "howto"
  in the /usr/local/sbin directory:


       ______________________________________________________________________
       #!/bin/sh
       if [ "$1" = "" ]; then
           ls /usr/doc/faq/howto | less
       else
           gunzip -c /usr/doc/faq/howto/$1-HOWTO.gz | less
       fi
       ______________________________________________________________________



  When called without argument, it displays a directory of the available
  howto's. Then when entered with the first part of the file name
  (before the hyphen) as an argument, it unzips (keeping the original
  intact) then displays the document.

  For instance, to view the Serial-HOWTO.gz document, enter:

  $ howto Serial



  2.3.  Is there enough free space??? Hans Zoebelein,  zocki@gold-
  fish.cube.net

  Here comes a short script which will check from time to time that
  there is enough free space available on anything which shows up in
  mount (disks, cdrom, floppy...)

  If space runs out, a message is printed every X seconds to the screen
  and 1 mail message per filled device is fired up.



  ______________________________________________________________________
  #!/bin/sh

  #
  # $Id: check_hdspace,v 1.18 1996/12/11 22:33:29 root Exp root $
  #

  #
  # Since I got mysterious error messages during compile when
  # tmp files filled up my disks, I wrote this to get a warning
  # before disks are full.
  #
  # If this stuff saved your servers from exploding,
  # send praising email to zocki@goldfish.cube.net.
  # If your site burns down because of this, sorry but I
  # warned you: no comps.
  # If you really know how to handle sed, please forgive me :)
  #

  #
  # Shoot and forget: Put 'check_hdspace &' in rc.local.
  # Checks for free space on devices every $SLEEPTIME sec.
  # You even might check your floppies or tape drives. :)
  # If free space is below $MINFREE (kb), it will echo a warning
  # and send one mail for each triggering device to $MAIL_TO_ME.
  # If there is more free space than trigger limit again,
  # mail action is also armed again.
  #

  # TODO: Different $MINFREE for each device.
  # Free /*tmp dirs securely from old junk stuff if no more free space.


  DEVICES='/dev/sda2 /dev/sda8 /dev/sda9'         # device; your put disks here
  MINFREE=20480                                   # kb; below this do warning
  SLEEPTIME=10                                    # sec; sleep between checks
  MAIL_TO_ME='root@localhost'                     # fool; to whom mail warning


  # ------- no changes needed below this line (hopefully :) -------

  MINMB=0
  ISFREE=0
  MAILED=""
  let MINMB=$MINFREE/1024         # yep, we are strict :)

  while [ 1 ]; do
          DF="`/bin/df`"
                  for DEVICE in $DEVICES ; do
                  ISFREE=`echo $DF | sed s#.\*$DEVICE" "\*[0-9]\*""\*[0-9]\*" "\*## | sed s#" ".\*##`

                  if [ $ISFREE -le $MINFREE ] ; then
                          let ISMB=$ISFREE/1024
                          echo  "WARNING: $DEVICE only $ISMB mb free." >&2
                          #echo "more stuff here" >&2
                          echo -e "\a\a\a\a"

                          if [ -z  "`echo $MAILED | grep -w $DEVICE`" ] ; then
                                  echo "WARNING: $DEVICE only $ISMB mb free.      (Trigger is set to $MINMB mb)" \
                                  | mail -s "WARNING: $DEVICE only $ISMB mb free!" $MAIL_TO_ME
                                  MAILEDH="$MAILED $DEVICE"
                                  MAILED=$MAILEDH
                                  # put further action here like cleaning
                                  # up */tmp dirs...
                          fi
                          elif [ -n  "`echo $MAILED | grep -w $DEVICE`" ] ; then
                                  # Remove mailed marker if enough disk space
                                  # again. So we are ready for new mailing action.
                                  MAILEDH="`echo $MAILED  | sed s#$DEVICE##`"
                                  MAILED=$MAILEDH
                          fi

                  done
                  sleep $SLEEPTIME

  done
  ______________________________________________________________________



  2.4.  Util to clean up your logfiles. Paul Anderson, Tips-HOWTO Main-
  tainer >

  If you're like me, you have a list with 430 subscribers, plus 100+
  messages per day coming in over UUCP.  Well, what's a hacker to do
  with these huge logs?  Install chklogs, that's what.  Chklogs is
  written by Emilio Grimaldo, grimaldo@panama.iaehv.nl, and the current
  version 1.8 available from
  ftp.iaehv.nl:/pub/users/grimaldo/chklogs-1.8.tar.gz.  It's pretty self
  explanatory to install(you will, of course, check out the info in the
  doc subdirectory).  Once you've got it installed, add a crontab entry
  like this:


       # Run chklogs at 9:00PM daily.
       00 21 * * *       /usr/local/sbin/chklogs -m



  While you're at it, mention to the author how nice a peice of software
  this is:)



  2.5.  ohammers@cu-online.com Handy Script to Clean Up Corefiles. Otto
  Hammersmith,

  Create a file called rmcores(the author calls it handle-cores) with
  the following in it:



  ______________________________________________________________________
  #!/bin/sh
  USAGE="$0 <directory> <message-file>"

  if [ $# != 2 ] ; then
          echo $USAGE
          exit
  fi

   echo Deleting...
  find $1 -name core -atime 7 -print -type f -exec rm {} \;

  echo e-mailing
  for name in `find $1 -name core -exec ls -l {} \; | cut -c16-24`
  do
          echo $name
          cat $2 | mail $name
  done
  ______________________________________________________________________



  And have a cron job run it every so often.



  2.6.  Moving directories between filesystems. Alan Cox,
  A.Cox@swansea.ac.uk

  Quick way to move an entire tree of files from one disk to another


       (cd /source/directory && tar cf - . ) | (cd /dest/directory && tar xvfp -)



  [ Change from cd /source/directory; tar....etc.  to prevent possibil-
  ity of trashing directory in case of disaster.  Thanks to Jim Dennis,
  jim@starshine.org, for letting me know. -Maint. ]


  2.7.  mick@lowdown.com Finding out which directories are the largest.
  Mick Ghazey,

  Ever wondered which directories are the biggest on your computer?
  Here's how to find out.


       du -S | sort -n



  2.8.  The Linux Gazette

  Kudos go to John Fisk, creator of the Linux Gazette.  This is an
  excellent e-zine plus, it's FREE!!!  Now what more could you ask?
  Check it out at:


       http://www.linuxgazette.com


  BTW, It turns out that (1) LG is now out on a monthly basis, and (2)
  John Fisk no longer maintains it, the fellows at SSC do.



  2.9.  Ted Stern,  stern@amath.washington.edu Pointer to patch for GNU
  Make 3.70 to change VPATH behavior.

  I don't know if many people have this problem, but there is a
  "feature" of GNU make version 3.70 that I don't like. It is that VPATH
  acts funny if you give it an absolute pathname.  There is an extremely
  solid patch that fixes this, which you can get from Paul D. Smith
  <psmith@wellfleet.com>.  He also posts the documentation and patch
  after every revision of GNU make on the newsgroup "gnu.utils.bug"
  Generally, I apply this patch and recompile gmake on every system I
  have access to.


  2.10.  How do I stop my system from fscking on each reboot? Dale Lutz,
  dal@wimsey.com

  Q:  How do I stop e2fsck from checking my disk every time I boot up.

  A:  When you rebuild the kernel, the filesystem is marked as 'dirty'
  and so your disk will be checked with each boot.  The fix is to run:

  rdev -R /zImage 1

  This fixes the kernel so that it is no longer convinced that the
  filesystem is dirty.

  Note: If using lilo, then add read-only to your linux setup in your
  lilo config file (Usually /etc/lilo.conf)


  2.11.  How to avoid fscks caused by "device busy" at reboot time. Jon
  Tombs,  jon@gtex02.us.es

  If you often get device busy errors on shutdown that leave the
  filesystem in need of an fsck upon reboot, here is a simple fix:

  To /etc/rc.d/init.d/halt or /etc/rc.d/rc.0, add the line


       mount -o remount,ro /mount.dir



  for all your mounted filesystems except /, before the call to umount
  -a. This means if, for some reason, shutdown fails to kill all pro-
  cesses and umount the disks they will still be clean on reboot. Saves
  a lot of time at reboot for me.



  2.12.  How to find the biggest files on your hard-drive.

  Simon Amor, simon@foobar.co.uk



       ls -l | sort +4n


  Or, for those of you really scrunched for space this takes awhile but
  works great:



       cd /
       ls -lR | sort +4n



  2.13.  How to print pages with a margin for hole punching. Mike
  Dickey,  mdickey@thorplus.lib.purdue.edu



       ______________________________________________________________________
               #!/bin/sh
               # /usr/local/bin/print
               # a simple formatted printout, to enable someone to
               # 3-hole punch the output and put it in a binder

               cat $1 | pr -t -o 5 -w 85 | lpr
       ______________________________________________________________________



  2.14.  Raul Deluth Miller,  rockwell@nova.umd.edu A way to search
  through trees of files for a particular regular expression.

  I call this script 'forall'.  Use it like this:


       forall /usr/include grep -i ioctl
       forall /usr/man grep ioctl



  Here's forall:


       ______________________________________________________________________
       #!/bin/sh
       if [ 1 = `expr 2 \> $#` ]
       then
               echo Usage: $0 dir cmd [optargs]
               exit 1
       fi
       dir=$1
       shift
       find $dir -type f -print | xargs "$@"
       ______________________________________________________________________



  2.15.  Barry Tolnas,  tolnas@nestor.engr.utk.edu A script for cleaning
  up after programs that create autosave and backup files.

  Here is a simple two-liner which recursively descends a directory
  hierarchy removing emacs auto-save (#) and backup (~) files, .o files,
  and  TeX .log files. It also compresses .tex files and README files. I
  call it 'squeeze' on my system.


       ______________________________________________________________________
       #!/bin/sh
       #SQUEEZE removes unnecessary files and compresses .tex and README files
       #By Barry tolnas, tolnas@sun1.engr.utk.edu
       #
       echo squeezing $PWD
       find  $PWD \( -name \*~ -or -name \*.o -or -name \*.log -or -name \*\#\) -exec
       rm -f {} \;
       find $PWD \( -name \*.tex -or -name \*README\* -or -name \*readme\* \) -exec gzip -9 {} \;
       ______________________________________________________________________



  2.16.  simon@foobar.co.uk How to find out what process is eating the
  most memory. Simon Amor,



       ps -aux | sort +4n



  -OR-


       ps -aux | sort +5n



  2.17.  Rigging vi for C programming, Paul Anderson, Tips-HOWTO Main-
  tainer

  I do a lot of C programming in my spare time, and I've taken the time
  to rig vi to be C friendly.  Here's my .exrc:


       ______________________________________________________________________
       set autoindent
       set shiftwidth=4
       set backspace=2
       set ruler
       ______________________________________________________________________



  What does this do?  autoindent causes vi to automatically indent each
  line following the first one indented, shiftwidth sets the distance of
  ^T to 4 spaces, backspace sets the backspace mode, and ruler makes it
  display the line number.  Remember, to go to a specific line number,
  say 20, use:



  ______________________________________________________________________
  vi +20 myfile.c
  ______________________________________________________________________



  2.18.  Using ctags to ease programming.

  Most hackers already have ctags on their computers, but don't use it.
  It can be very handy for editing specific functions.  Suppose you have
  a function, in one of many source files in a directory for a program
  you're writing, and you want to edit this function for updates.  We'll
  call this function foo().  You don't where it is in the source file,
  either.  This is where ctags comes in handy.  When run, ctags produces
  a file named tags in the current dir, which is a listing of all the
  functions, which files they're in and where they are in said files.
  The tags file looks like this:



       ______________________________________________________________________

       ActiveIconManager       iconmgr.c       /^void ActiveIconManager(active)$/
       AddDefaultBindings      add_window.c    /^AddDefaultBindings ()$/
       AddEndResize    resize.c        /^AddEndResize(tmp_win)$/
       AddFuncButton   menus.c /^Bool AddFuncButton (num, cont, mods, func, menu, item)$/
       AddFuncKey      menus.c /^Bool AddFuncKey (name, cont, mods, func, menu, win_name, action)$/
       AddIconManager  iconmgr.c       /^WList *AddIconManager(tmp_win)$/
       AddIconRegion   icons.c /^AddIconRegion(geom, grav1, grav2, stepx, stepy)$/
       AddStartResize  resize.c        /^AddStartResize(tmp_win, x, y, w, h)$/
       AddToClientsList        workmgr.c       /^void AddToClientsList (workspace, client)$/
       AddToList       list.c  /^AddToList(list_head, name, ptr)$/
       ______________________________________________________________________



  To edit, say AddEndResize() in vim, run:



       vim -t AddEndResize



  This will bring the appropriate file up in the editor, with the cursor
  located at the beginning of the function.



  2.19.  paul@geeky1.ebtech.net Why does sendmail hang for 5 minutes on
  startup with RedHat? Paul Anderson,

  This is a fairly common problem, almost to the point of being a FAQ.
  I don't know if RedHat has fixed this bug in their distribution, but
  you can repair it yourself.  If you look in your /etc/hosts file, you
  will find it looks something like:


       127.0.0.1               localhost       yourbox

  When sendmail starts, it does a lookup on your hostname(in this
  example, yourbox).  It then finds that the IP for yourbox is
  127.0.0.1, sendmail doesn't like this, so it does the lookup again.
  It continues with this for a while until it eventually gives up and
  exits.  Fixing the problem is extremely easy, edit your /etc/hosts
  file and change it to something like this:


       127.0.0.1               localhost
       10.56.142.1             yourbox



  2.20.  How do I configure RedHat for using color-ls? Paul Anderson,
  paul@geeky1.ebtech.net

  RedHat's distribution comes with color-ls, however why they don't
  configure it for colour use by default is beyond me.  Here's to fix
  it.

  First, type eval `DIRCOLORS`

  Next, alias ls='ls --color=auto'

  And put the 'alias.....' in your /etc/bashrc



  2.21.  vps@unicorn.niimm.spb.su How do I find which library in
  /usr/lib holds a certain function? Pawel Veselow,

  What if you're compiling and you've missed a library that needed
  linking in?  All gcc reports are function names...  Here's a simple
  command that'll find what you're looking for:


       for i in *; do echo $i:;nm $i|grep tgetnum 2>/dev/null;done



  Where tgetnum is the name of the function you're looking for.



  2.22.  I compiled a small test program in C, but when I run it, I get
  no output!

  You probably compiled the program into a binary named test, didn't
  you?  Linux has a program called test, which tests if a certain
  condition is true, it never produces any output on the screen.
  Instead of just typing test, try: ./test



  3.  Detailed Tips

  3.1.  Sharing swap partitions between Linux and Windows. Tony Acero,
  ace3@midway.uchicago.edu


  1. Format the partition as a dos partition, and create the Windows
     swap file on it, but don't run windows yet. (You want to keep the
     swap file completely empty for now, so that it compresses well).

  2. Boot linux and save the partition into a file.  For example if the
     partition was /dev/hda8:


       dd if=/dev/hda8 of=/etc/dosswap



  3. Compress the dosswap file; since it is virtually all 0's it will
     compress very well


       gzip -9 /etc/dosswap



  4. Add the following to the /etc/rc file to prepare and install the
     swap space under Linux:

     XXXXX is the number of blocks in the swap partition


       mkswap /dev/hda8 XXXXX
       swapon -av



  Make sure you add an entry for the swap partition in your /etc/fstab
  file

  5. If your init/reboot package supports /etc/brc or /sbin/brc add the
     following to /etc/brc, else do this by hand when you want to boot
     to dos|os/2 and you want to convert the swap partition back to the
     dos/windows version:



       swapoff -av
       zcat /etc/dosswap.gz | dd of=/dev/hda8 bs=1k count=100



  # Note that this only writes the first 100 blocks back to the parti-
  tion. I've found empirically that this is sufficient

  >>  What are the pros and cons of doing this?

  Pros: you save a substantial amount of disk space.

  Cons: if step 5 is not automatic, you have to remember to do it by
  hand, and it slows the reboot process by a nanosecond :-)


  3.2.  Desperate Undelete. Michael Hamilton,  michael@actrix.gen.nz

  Here's a trick I've had to use a few times.


  Desperate person's text file undelete.

  If you accidentally remove a text file, for example, some email, or
  the results of a late night programming session, all may not be lost.
  If the file ever made it to disk, ie it was around for more than 30
  seconds, its contents may still be in the disk partition.

  You can use the grep command to search the raw disk partition for the
  contents of file.

  For example, recently, I accidentally deleted a piece of email.  So I
  immediately ceased any activity that could modify that partition: in
  this case I just refrained from saving any files or doing any compiles
  etc.  On other occasions, I've actually gone to the trouble of bring
  the system down to single user mode, and unmounted the filesystem.

  I then used the egrep command on the disk partition:  in my case the
  email message was in /usr/local/home/michael/, so from the output from
  df, I could see this was in /dev/hdb5


         sputnik3:~ % df
           Filesystem         1024-blocks  Used Available Capacity Mounted on
           /dev/hda3              18621    9759     7901     55%   /
           /dev/hdb3             308852  258443    34458     88%   /usr
           /dev/hdb5             466896  407062    35720     92%   /usr/local

           sputnik3:~ % su
           Password:
           [michael@sputnik3 michael]# egrep -50 'ftp.+COL' /dev/hdb5 > /tmp/x



  Now I'm ultra careful when fooling around with disk partitions, so I
  paused to make sure I understood the command syntax BEFORE pressing
  return.  In this case the email contained the word 'ftp' followed by
  some text followed by the word 'COL'.  The message was about 20 lines
  long, so I used -50 to get all the lines around the phrase.  In the
  past I've used -3000 to make sure I got all the lines of some source
  code.  I directed the output from the egrep to a different disk parti-
  tion - this prevented it from over writing the message I was looking
  for.

  I then used strings to help me inspect the output


          strings /tmp/x | less



  Sure enough the email was in there.

  This method can't be relied on, all, or some, of the disk space may
  have already been re-used.

  This trick is probably only useful on single user systems.  On multi-
  users systems with high disk activity, the space you free'ed up may
  have already been reused.  And most of use can't just rip the box out
  from under our users when ever we need to recover a file.

  On my home system this trick has come in handy on about three
  occasions in the past few years - usually when I accidentally trash
  some of the days work.  If what I'm working survives to a point where
  I feel I made significant progress, it get's backed up onto floppy, so
  I haven't needed this trick very often.



  3.3.  How to use the immutable flag. Jim Dennis,  jadestar@rahul.net

  Use the Immutable Flag

  Right after you install and configure your system go through the /bin,
  /sbin/, /usr/bin, /usr/sbin and /usr/lib (and a few of the other usual
  suspects and make liberal use of the 'chattr +i command'.  Also add
  that to the the kernel files in root.  Now 'mkdir /etc/.dist/' copy
  everything from /etc/ on down (I do this in two steps using
  /tmp/etcdist.tar to avoid recursion) into that directory.  (Optionally
  you can just create /etc/.dist.tar.gz) -- and mark that as immutable.

  The reason for all of this is to limit the damage that you can do when
  logged in as root.  You won't overwrite files with a stray redirection
  operator, and you won't make the system unusable with a stray space in
  an 'rm -fr' command (you might still do alot of damage to your data --
  but your libs and bins will be safer.

  This also makes a variety of security and denial of service exploits
  either impossible or more difficult (since many of them rely on
  overwriting a file through the actions of some SUID program that
  *isn't providing an arbitrary shell command*).

  The only inconvenience of this is when building and doing your 'make
  install' on various sorts of system binaries.  On the other hand it
  also prevents the 'make install' from over-writing the files.  When
  you forget to read the Makefile and chattr -i the files that are to be
  overwritten (and the directories to which you want to add files) --
  the make fails, you just use the chattr command and rerun it.  You can
  also take that opportunity to move your old bin's, libs, or whatever
  into a .old/ directory or rename or tar them or whatever.


  3.4.  Jim Dennis,  jadestar@rahul.net A suggestion for where to put
  new stuff.

  All new stuff starts under /usr/local! or /usr/local/`hostname`

  If your distribution is one that leaves /usr/local empty then just
  create your /usr/local/src, /usr/local/bin etc and use that.  If your
  distribution puts things in the /usr/local tree than you may want to
  'mkdir /usr/local/`hostname`' and give the 'wheel' group +w to it (I
  also make it SUID and SGID to insure that each member of the wheel
  group can only mess with their own files thereunder, and that all
  files created will belong to the 'wheel' group.

  Now discipline yourself to *ALWAYS! ALWAYS! ALWAYS!* put new packages
  under /usr/local/src/.from/$WHEREVER_I_GOT_IT/ (for the .tar or
  whatever files) and build them  under /usr/local/src (or
  .../$HOSTNAME/src).  Make sure that it installs under the local
  hierarchy.  If it *absolutely must* be installed back in /bin or
  /usr/bin or somewhere else -- put a symlink from the local heirarchy
  to each element that when anywhere else.

  The reason for this -- even though it's more work -- is that it helps
  isolate what has to be backed up and restored or reinstalled in the
  event of a full re-install from the distribution medio (usually CD
  these days).  By using a /usr/local/.from directory you also keep an
  informal log of where your sources are coming from -- which helps when
  you're looking for new updates -- and may be critical when monitoring
  the security announcement lists.

  One of my systems at home (the one I'm calling from) was put together
  before I adopted these policies for myself.  I still don't "know" all
  the ways that it differs from the stock "as installed" system.  This
  is despite the fact that I've done very little with my home system's
  configuration and I'm the *only* person who ever uses it.

  By contrast the systems I've set up at work (when I was thrust into
  the role of system administrator there) have all been configured this
  way -- have been administered by many contractors and other MIS
  people, and have had a large number of upgrades and package
  installations.  Nonetheless I have a very good idea which precise
  elements were put in *after* the initial installation and
  configuration.


  3.5.  Converting all files in a directory to lowercase. Justin Dossey,
  dossey@ou.edu


  I noticed a few overly difficult or unnecessary procedures recommended
  in the 2c tips section of Issue 12.  Since there is more than one, I'm
  sending it to you:


       ______________________________________________________________________
       #!/bin/sh
                # lowerit
                # convert all file names in the current directory to lower case
                # only operates on plain files--does not change the name of directories
                # will ask for verification before overwriting an existing file
                for x in `ls`
                  do
                  if [ ! -f $x ]; then
                    continue
                    fi
                  lc=`echo $x  | tr '[A-Z]' '[a-z]'`
                  if [ $lc != $x ]; then
                    mv -i $x $lc
                  fi
                  done
       ______________________________________________________________________



  Wow.  That's a long script.  I wouldn't write a script to do that;
  instead, I would use this command:


       for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr '[A-Z]' '[a-z]'`;
       done;



  on the command line.

  The contributor says he wrote the script how he did for
  understandability (see below).

  On the next tip, this one about adding and removing users, Geoff is
  doing fine until that last step.  Reboot?  Boy, I hope he doesn't
  reboot every time he removes a user.  All you have to do is the first
  two steps.  What sort of processes would that user have going, anyway?
  An irc bot?  Killing the processes with a simple


       kill -9 `ps -aux |grep ^<username> |tr -s " " |cut -d " " -f2`



  Example, username is foo


       kill -9 `ps -aux |grep ^foo |tr -s " " |cut -d " " -f2`



  That taken care of, let us move to the forgotten root password.

  The solution given in the Gazette is the most universal one, but not
  the easiest one.  With both LILO and loadlin, one may provide the boot
  parameter "single" to boot directly into the default shell with no
  login or password prompt.  From there, one may change or remove any
  passwords before typing "init 3" to start multiuser mode.  Number of
  reboots: 1 The other way Number of reboots: 2


  Justin Dossey



  3.6.  Paul Anderson,  paul@geeky1.ebtech.net How To Upgrade Sendmail

  We're starting from raw, clean source.  First, obtain the sendmail
  source code.  I've d/led version 8.9.0, which is, as you will notice,
  bleeding edge.  I grabbed it from
  ftp.sendmail.org:/pub/sendmail/sendmail.8.9.0.tar.gz

  It's about 1Meg, and considering I'm running 8.7.6, I think it's worth
  the effort.  If this works, you'll undoubtedly hear about it, elsewise
  I can't get the new HOWTO versions out without e-mail:)

  Now, once you've got the source d/led, unpack it.  It'll create a dir
  called sendmail-8.9.0 in the current directory.  Change into that
  directory, read the README and RELEASE_NOTES files(and be amazed at
  the updates they've done).  Now, cd in src.  This is where most of
  your work will be done.

  A quick note: Sendmail is a small, powerful and well-written program.
  The sendmail binary itself compiled in less than 5 minutes on my 5x86
  133 with 32Megs RAM!  The entire compile and install(sans config) took
  under 15 minutes!

  I don't normally run BIND on my system, so I found the lines:



       ______________________________________________________________________
       # ifndef NAMED_BIND
       #  define NAMED_BIND    1       /* use Berkeley Internet Domain Server */
       # endif
       ______________________________________________________________________



  and changed the 1 to a 0, ala:



       ______________________________________________________________________
       # ifndef NAMED_BIND
       #  define NAMED_BIND    0       /* use Berkeley Internet Domain Server */
       # endif
       ______________________________________________________________________



  On Debian 1.3.1, db.h is by default installed in /usr/include/db,
  instead of /usr/include, where sendmail hopes to find it.  Change to
  the src, mailstats, makemap, praliases, rmail and smrsh directories
  and execute the following command:



        ./Build -I/usr/include/db



  Once you've done that, cd .. and type make install.  There!  Sendmail
  version 8.9.0 should now be installed!  This is, of course, assuming
  you already have your original configuration.  For everything to work
  smoothly on my system, since I host free mailing lists for people
  using majordomo, I had to add the following to the beginning of my
  /etc/sendmail.cf:



       ______________________________________________________________________
       O DontBlameSendmail=forwardfileinunsafedirpath, forwardfileinunsafedirpathsafe
       ______________________________________________________________________



  Sendmail 8.9.0 is rather pedantic about directory and file permissions
  these days, and will complain about dirs and files in aliases or
  .forward files that are group or world writeable.  While it's not a
  good idea to disable this pedantry, I am only running with a single
  person at the console and I felt it was okay to allow this minor
  security hole.  YMMV.



  3.7.  Jim Dennis,  jadestar@rahul.net Some tips for new sysadmins.

  Create and maintain a /README.`hostname` and/or a
  /etc/README.`hostname` [Or possibly /usr/local/etc/README.`hostname`
  -Maint. ]

  Absolutely, from *day one* of administering a system take notes in an
  online log file.  You might make "vi /README.$(hostname)" a line in
  root's  /bash_logout.  Another way to do this is to write an su or a
  sudo script that does something like:



                  function exit \
                          { unset exit; exit; \
                            cat ~/tmp/session.$(date +%y%m%d) \
                            >> /README.$(hostname) && \
                            vi /README.$(hostname)
                            }
                  script -a ~/tmp/session.$(date +%y%m%d)
                  /bin/su.org -



  (use the typescript command to create a session log and create a
  function to automate appending and updating the log).

  I'll admit that I haven't implemented this automation of policy --
  I've just relied on self-discipline so far.  However I have been
  toying with the idea (even to the point of prototyping the scripts and
  shell functions as you see them).  One thing that holds me back on
  this is the 'script' command itself.  I think I'll have to grab the
  sources and add a couple of command line parameters (to pause/stop the
  script recording from the command line) before I commit to using
  this).

  My last suggestion (for this round):

  Root's path should consist of 'PATH= /bin'

  That's it.  Nothing else on root's path.  Everything root does is
  provided by a symlink from  /bin or by an alias or shell function, or
  is a script or binary in  /bin, or is typed out with an explicit path.

  This makes anyone running as root aware (sometimes painfully so) of
  how he or she is trusting binaries.  The wise admin of a multi-user
  host will periodically look through his or here  /bin and  /.*history
  files to look for patterns and loopholes.

  The really motivated admin will spot sequences that can be automated,
  places where sanity checks can be inserted, and tasks for which "root"
  privileges should be temporarily eschewed (launching editors, MTA's
  and other large interactive programs with elaborate scripting features
  that *might* be embedded in transparent or data files -- like the
  infamous vi ./.exrc and emacs ./.emacs and the even more insidous
  $EXINIT and the embedded header/footer macros).  Naturally those sorts
  of commands can be run with something like:


                       cp $data $some_users_home/tmp
                       su -c $origcommand $whatever_switches
                       cp $some_users_home/tmp $data



  (...where the specifics depend on the command).

  Mostly these last sorts of precautions are overboard for the home or
  "single" user workstation -- but they are very good policy the admin
  of a multi-user -- particular a publicly exposed system (like the
  one's at netcom).



  3.8.  How to configure xdm's chooser for host selection. Arrigo Tri-
  ulzi,  a.triulzi@ic.ac.uk


  1. Edit the file that launches xdm most likely /etc/rc/rc.6 or
     /etc/rc.local) so that it contains the following lines in the xdm
     startup section.



       /usr/bin/X11/xdm
       exec /usr/bin/X11/X -indirect hostname



  2. Edit /usr/lib/X11/xdm/Xservers and comment out the line which
     starts the server on the local machine (i.e. starting 0:)

  3. Reboot the machine and you're home and away.

  I add this because when I was, desperately, trying to set it up for my
  own subnet over here it took me about a week to suss out all the
  problems.

  Caveat: with old SLS (1.1.1) for some reason you can leave a -nodaemon
  after the xdm line -- this does NOT work for later releases.



  UMSDOS HOW-TO
  Jacques Gelinas, jacques@solucorp.qc.ca
  v1.1, 13 November 1995

  Umsdos is a linux file system. It provide an alternative to the EXT2
  file-system. Its main goal is to achieve easier coexistence with Ms-
  DOS data by sharing the same partition.  This document explain first
  how to use Umsdos in different configuration, and later explain its
  operation and try to provide some information letting you decide if it
  is a good choice for you (see UMSDOS-WHY-TO at the end).
  ______________________________________________________________________

  Table of Contents



  1. UMSDOS: Where is it ?

     1.1 History
     1.2 Availability
     1.3 Distribution supporting it
     1.4 Home site
     1.5 Technical documentation
     1.6 Who wrote it

  2. Umsdos as your root partition

     2.1 The pseudo-root concept.
     2.2 Things to know about the pseudo-root

  3. Different topics about the operation of

     3.1 Mount option
     3.2 How to set defaults for the root
     3.3 To swap or not to swap

  4. How to boot a Umsdos system

     4.1 Loadlin
     4.2 From a floppy
     4.3 LILO
     4.4 How to defragment a
     4.5 Advance tricks

  5. Basic principle

     5.1 Introduction
     5.2 (EM
     5.3 Directory promotion
     5.4 How to promote:
     5.5 Using
     5.6 How to UN-promote
     5.7 What about files created during a

  6. Installation/UN-installation and some tricks

     6.1 The pseudo-root
     6.2 Preparing
     6.3 Making sure
     6.4 Oops releasing pseudo root ...
     6.5 How to UN-install a
     6.6 Moving a
     6.7 About installing 50

  7. Setting a

  8. UMSDOS-WHY-TO

     8.1 The goal of
     8.2 Who needs it
     8.3 Performance issue


  ______________________________________________________________________

  1.  UMSDOS: Where is it ?



  1.1.  History


  The Umsdos project was started in 1992 and made available to the net
  in January 1994 as a patch. It was included in the standard kernel
  distribution in July, starting with kernel 1.1.36.

  Umsdos was early adopted in the Slackware distribution even before it
  was officially included in the official kernel.

  Umsdos was improved starting at kernel 1.1.60. Its performance has
  been dramatically enhanced, especially for writing. Since 1.1.70
  (around this), it is stable again.

  A major bug was solve in Linux 1.2.2. This bug was causing some grief
  to users since the beginning (some file were silently renamed, giving
  the sad impression that they were deleted). Beware that Slackware 2.2
  is still shipping release 1.2.1 of the kernel, so has this bug.


  1.2.  Availability


  It is available as a patch for kernel 1.0.x. It is built-in for kernel
  1.2. It can be compiled in or load as a module.  Beware that for now,
  if you intend to load umsdos as a module, you must also use the Ms-DOS
  fs as a module. This come from a limitation in the module system (some
  symbols are only export when the drivers is installed as a module).


  1.3.  Distribution supporting it


  So far, I think only Slackware does support it. I am surely wrong, so
  please send me info to correct this.


  1.4.  Home site


  The home site for Umsdos is sunsite.unc.edu. Look in the directory
  /pub/Linux/system/Filesystems/umsdos.


  1.5.  Technical documentation

  There is quite a lot of documentation about the internal of Umsdos. It
  is available both in HTML and text format at the same location as the
  utilities.

  As far as I know, the HTML version is not available online on any web
  site. You must down-load it and "UN-tar" it and read it locally.


  1.6.  Who wrote it


  Jacques Gelinas jacques@solucorp.qc.ca


  2.  Umsdos as your root partition



  2.1.  The pseudo-root concept.

  With Umsdos, Linux can be installed in a standard DOS partition. Linux
  is then installed as a second (or third) OS in the partition. To avoid
  name collision (there is maybe a bin or tmp directory in the drive C:
  already), Umsdos use a smart trick: The pseudo-root.

  All Linux files are installed in a DOS subdirectory called linux,
  generally C: LINUX. The normal Linux/Unix directory structure goes
  there. So you get


  o

     C:\LINUX\BIN



  o

     C:\LINUX\ETC



  o

     C:\LINUX\LIB



  o

     C:\LINUX\ROOT



  o

     C:\LINUX\SBIN



  o

     C:\LINUX\TMP



  o

     C:\LINUX\USR



  o

     C:\LINUX\VAR



  When the Umsdos boot, it probes for the directory linux and then
  /linux/etc. If it exist, it activates the pseudo-root mode.

  Mostly, the pseudo-root mode switch the root of the partition to
  C:\\LINUX giving the conventional Unix directory layout

  o

     /bin



  o

     /etc



  o

     /lib



  o

     /root



  o

     /sbin



  o

     /tmp



  o

     /usr



  o

     /var



  To this list, it adds a new one called DOS. This one is a virtual
  directory.


  2.2.  Things to know about the pseudo-root


  o  This mode can only be triggered at boot time. There is no way to
     activate this by a mount command.

  o  This mechanism is purely a different view of a normal Umsdos file-
     system. This means that a partition normally used as a root
     partition can be normally mounted. There won't be any pseudo-root
     effect.

     For example, if you boot linux with a maintenance floppy and mount
     your normal root partition in /mnt, you will find all your linux
     directory in /mnt/linux/bin, /mnt/linux/etc and so on.
  3.  Different topics about the operation of Umsdos



  3.1.  Mount option


  You can use the same mount option as for the Ms-DOS file system.  The
  option conv= is questionable on a Umsdos system. I suggest to avoid
  it. Mostly the option you may want to look at are


  o  uid=

  o  gid=

  o  umask=

  Just remember that Umsdos manage non promoted directory the same way
  as the Ms-DOS file system. The option above will apply globally to all
  non promoted directory. uid setup the default owner, gid setup the
  default group and umask setup the default permissions.


  3.2.  How to set defaults for the root


  umssetup was created to provide at run time default ownership for the
  root partition. For other Umsdos partition, mount option may be used
  or umssetup. Storing mount option in /etc/fstab is the prefered way
  for non root partition. Here is an example.  Put this in
  /etc/rc.d/rc.S.



                       /sbin/umssetup -u jack -g group -m 0755 /



  3.3.  To swap or not to swap


  Using a swap file is generally slower than a swap partition.  It is
  however much more flexible. You can setup a swap file in a Umsdos
  partition the same way you do it for any other Linux file systems. For
  example, to setup a 8 megabytes swap file in the root directory:



                       dd if=/dev/zero bs=1024k count=8 of=/swap
                       mkswap /swap 8192
                       sync
                       swapon /swap



  Once done, you can put the following line in /etc/fstab



                  /swap   swap    swap    default



  And the swap file will be activated at each boot (There is generally a
  "swapon -a" in /etc/rc.d/rc.S).


  4.  How to boot a Umsdos system



  4.1.  Loadlin


  The package lodlin15.tgz available from sunsite.unc.edu in
  /pub/Linux/system/Bootutils. This utility is particularly suited to
  boot a Umsdos system. Generally all you need to do is



               Boot DOS
               C:>loadlinx zimage root=D:



  where zimage is a normal kernel image (compressed) simply copied
  somewhere in the DOS drive. D: is the DOS drive where you have
  installed Linux.


  4.2.  From a floppy


  Booting a Umsdos system from a floppy is not different from booting a
  Ext2 system. You need a kernel zImage file properly initialize to
  locate your root Umsdos partition. This is generally achieved using
  the command rdev. The following sequence will initialize a zImage and
  put it on a floppy.



               rdev zImage /dev/hda1
               rdev -R zImage 0
               dd if=zImage bs=8192 of=/dev/fd0



  If this looks confusing, just format a boot-able DOS floppy and put
  the following component on it.


  o  loadlin.exe

  o  loadlinx.exe

  o  zimage

  and setup the autoexec.bat like this

               loadlinx zimage rw root=C:



  4.3.  LILO


  LILO, the official Linux boot loader can also be used to boot a Umsdos
  system. I have no experience with it though. Since 1.1.60, it should
  work. Please email if you know something.


  4.4.  How to defragment a Umsdos  partition


  It can be done using any popular DOS tool. There is nothing particular
  about file produced by Umsdos. And Umsdos do not expect anything
  particular (directory layout, directory entry sequence, etc...) from
  the file system under it.

  As far as I know, there is no Linux tool to achieve this.


  4.5.  Advance tricks

  Umsdos rely on the --linux-.--- which rely on the DOS directory. Some
  users may want to experiment a bit. The utility udosctl part of the
  umsdos_progs package (containing umssync and umssetup) allows basic
  directory operation (listing, deletion) independently on the
  --linux-.--- and the DOS directory.



  5.  Basic principle



  5.1.  Introduction


  Umsdos map Linux files directly to Ms-DOS files.  This is a one for
  one translation. File content is not manipulated at all. Umsdos only
  works on names. For special files (links and devices for example), it
  introduces special management.

  For each directory, there is a file named --linux-.---.


  5.2.  Umsdos  can replace the Ms-DOS  file-system.


  Umsdos can be thought as a general purpose superset of the Ms-DOS file
  system of linux. In fact this capability or flexibility yields much
  confusion about Umsdos. Here is why. Try to mount a newly formatted
  DOS floppy like this.



               mount -t umsdos /dev/fd0 /mnt



  And do this,



               ls / >/mnt/LONGFILENAME
               ls -l /mnt



  You will get the following result



               -rwxr-xr-x   1 root     root          302 Apr 14 23:25 longfile



  So far, it seems that the Umsdos file system does not do much more (in
  fact nothing at all) than the normal Ms-DOS file system of Linux.

  ???


  5.3.  Directory promotion


  Pretty unimpressive so far. Here is the trick. Unless promoted a DOS
  directory will be managed the same way with Umsdos than the Ms-DOS
  file-system will. Umsdos use a special file in each subdirectory to
  achieve the translation between the extended capabilities (long name,
  ownership, etc...) of Umsdos and the limitation of the DOS file-
  system.  This file is invisible to Umsdos users, but visible when you
  boot DOS. To avoid cluttering the DOS partition with those file
  (--linux-.---) uselessly, the file is now optional. If absent, Umsdos
  behave like Ms-DOS.

  When a directory is promoted, any subsequent operation will be done
  with the full semantic normally available to Unix and Linux users. And
  all subdirectory created afterward will be silently promoted.

  This feature allows you to logically organize your DOS partition into
  DOS stuff and Linux stuff. It is important to understand that those
  --linux-.--- file do take some place (generally 2k per directory). DOS
  generally use large cluster (as big as 16k for a 500meg partition), so
  avoiding putting --linux-.--- everywhere can save your day.


  5.4.  How to promote: /sbin/umssync


  A directory can be promoted any time using /sbin/umssync.  It can be
  used at any time. Promoting a directory do the following operation


  o  Create a --linux-.---.

  o  Establish a one to one relation between the --linux-.--- and the
     current content of the directory.

  /sbin/umssync maintain an existing --linux-.--- file.  It does not
  create it from scratch all the time. It simply add missing entries in
  it (Files created during a DOS session).  It will also removed files
  which do not exist anymore in the DOS directory from the --linux-.---.
  umssync gets its name from that. It put --linux-.--- in sync with the
  underlying DOS directory.


  5.5.  Using /sbin/umssync  at boot time

  It is a good idea to place a call to /sbin/umssync at the end of your
  /etc/rc.d/rc.S if it's not there. The following command is adequate
  for most system:



               /sbin/umssync -r99 -c -i+ /



  The -c option prevent umssync from promoting directories. It will only
  update existing --linux-.---.

  This command is useful if you access Linux directory during a DOS
  session. Linux has no efficient way to tell that a directory has been
  modified by DOS so Umsdos can't do a umssync operation as needed.


  5.6.  How to UN-promote


  Remove the --linux-.--- file using DOS. You will be sorry.


  5.7.  What about files created during a DOS  session ?


  Unless you use umssync on a directory where files have been added or
  removed by DOS, you will notice some problems:


  o  It won't crash the system nor it won't cause major problems, only
     annoyance :-)

  o  Files created by DOS.

  o  They will be invisible in Linux.

  o  When trying to create a file with the same name, you will get an
     error message stating that the file already exist.

  o  This creates more confusion that real problem. It does not harm the
     file system.

  o  Files deleted by DOS won't cause problem. Umsdos will notice the
     absence at the first access. A message will be output (and
     generally written into /var/adm/syslog).


  6.  Installation/UN-installation and some tricks

  The installation of a Umsdos is not much different from the
  installation of an ordinary (Ext2 based) Linux system.

  There are two main differences.


  6.1.  The pseudo-root /mnt/linux

  The normal steps for an installation are


  1. Setting a partition with fdisk and formatting it.

  2. Mounting it as /mnt relative to our installation root disk.

  3. Copy all packages into /mnt.

  With Umsdos, the step 1 is not required (wasn't it the goal of Umsdos
  not to reformat ?).

  It is possible to install a Umsdos system just by copying all packages
  into /mnt. This will certainly work. But it will create a bunch of
  subdirectories into your DOS root directory (C:) and you won't like
  it. This is the reason all Umsdos installation use the pseudo-root.
  And this is the major difference between a normal Ext2 installation
  and a Umsdos one: All files are copied into /mnt/linux.


  6.2.  Preparing /mnt/linux

  /mnt/linux is not an ordinary directory. It has to be promoted so it
  will correctly handle Linux long file name and special files (links,
  device). The step required to setup /mnt/linux are:


  1. mkdir /mnt/linux

  2. umssync /mnt/linux

  That's it!


  6.3.  Making sure /mnt/linux  is correctly setup

  Even if the setup of /mnt/linux is pretty simple, there are many
  installation package out there who get it wrong. How can ?

  The biggest installation problem come from an incompatible umssync
  program. Umsdos has been update in linux 1.1.88 (Can't remember
  exactly) and a flaw was uncovered in umssync. To avoid confusion in
  the Linux community, it was decided to raise the compatibility level
  required for all Umsdos tools. Old version of the tools were simply
  rejected.

  It sounds like many distribution did not update their umssync utility
  on the installation disk.

  There are still many distribution like this out there. The net result
  is that the directory /mnt/linux is not promoted at all and will
  truncate all long file name and will reject all special file.

  It is possible to do a test very early during the installation to find
  out if something went wrong. Thanks to the pseudo console mechanism of
  Linux, you can do that without leaving the installation program. Do
  the following steps:


  1. Press Alt-F2 (Alt key at the same time as the F2 key).

  2. login as root.


  3. cd /mnt/linux

     If this fail, you are trying this too early. A good time to do this
     is at the end of the packages selection.

  4. >TOTO

  5. ls -l

     You should see an empty file TOTO in uppercase. If you see it in
     lowercase, something went wrong. Try to do the umssync step again.
     umssync can be use over and over without problem.

     umssync .

     If there is no error message, try the TOTO test again.  If TOTO
     appears fine, then all is OK. Something is strange in this
     installation, but you just save it. Continue


  6. Press Alt-F1 to get back to the installation screen.

  If the test fail, the best fix is to get a newer installation root
  disk. You can generally fix this root disk by installing a newer
  version of umssync. This is not difficult but required a working Linux
  system. You simply have to mount the root disk floppy and replace the
  offending umssync with a new one.


  6.4.  Oops releasing pseudo root ...

  Most Umsdos installation which fail, do this by printing this strange
  message. This is not a bug in Umsdos although the message looks
  strange. Here are the known causes.


  o  The most common one

     The Slackware installation try to setup a swap file very early
     during the installation. To do so, it asks you to select a
     partition (dos drive), then mount it and set the swap file.

     When installing a Slackware system, you must setup the target
     partition prior to install. This normally mounts the DOS partition
     on /mnt, creates the /mnt/linux directory and applies umssync on
     it.

     This is where most problems come from. Most user just forget the
     "setup target partition" step and go directly to the rest of the
     installation. Since /mnt is already mounted, this mistake goes
     unnotice.  This means that /mnt/linux was not created properly (Not
     promoted). All special files and links and long names can't be
     created properly.


  o  Invalid umssync utility

     /mnt/linux was improperly setup-ed. Generally caused by an improper
     umssync utility on the installation root disk.

  o  Old bug in umsdos

     There was a bug in Umsdos prior to Linux 1.2.2. The pseudo-root
     mode would not activate properly if the file /etc/init was missing.
     init is now located in /sbin. You can fix it by getting a newer
     kernel.  This is recommended because another bug was uncover and
     fixed in 1.2.2.

     If you can't upgrade, do this


     1. Boot from you installation disk.

     2. Login as root.

     3. mount -t umsdos /dev/hdXX /mnt

        where /dev/hdXX is your DOS partition.

     4. cd /mnt/linux/etc

     5. ln -s ../sbin/init init

     6. cd /

     7. Ctrl-Alt-Del

     8. Boot your Umsdos normally.

  Unfortunatly, the first two (Installation problems) produce a
  completly unusable installation. Uninstall it (See next section) and
  install again.



  6.5.  How to UN-install a Umsdos  system

  One neat thing about Umsdos and its pseudo-root mechanism, is that you
  can UN-install it without pain. You just boot DOS and recursively
  delete the linux directory. That's all. Umsdos requires no special
  drivers in the config.sys, nor it creates anything special outside of
  the linux directory.


  6.6.  Moving a Umsdos  system to another DOS  drive

  This can be done from Linux or from DOS.  You just have to copy
  recursively the linux directory from one drive to the other. After
  that you will have to adjust you boot mechanism (generally loadlin
  command) and the /etc/fstab file.

  Umsdos can live on any DOS drive. There is no need to install it on
  the C: drive, nor it is important to have it on the first hard drive.
  It does not matter at all.

  In fact, one may decide to have several Umsdos installations on
  different drive just to do experiments.


  6.7.  About installing 50 Umsdos  systems.

  How about installing a bunch of Linux systems in no time ?

  Umsdos systems are living in a DOS world. You can take advantage of
  this if you wish to install Linux easily.

  You can install and configure a Umsdos system at your site.  When you
  are satisfied with the configuration and the different packages you
  have selected, you can boot DOS and copy the complete linux directory
  to your DOS file server. Then you go to other DOS station and simply
  copy the files on the network drive to the local drive.  That's it.
  Only adjust the boot script (Loadlinx) and go.
  With minimal adjustment (Host name, IP number), anyone will be able to
  install a Linux system in a matter of minute.

  Interest readers may note that installing Linux systems by copying
  running system also works for any other Linux systems, including Ext2
  based one.

  One beauty of Linux is that there is no hidden files which have to be
  install by magic installation program.


  7.  Setting a Linux  section in a DOS  partition

  Umsdos has some use even for Ext2 (Native Linux file-system) users.
  One common scenario is this:


  o  Linux being your OS of choice, the Linux partition start to fill
     and fill and fill.

  o  Your DOS partition is collecting dust, being half empty.

  o  You are suddenly out of space in the Ext2 partition.

  o  You are still not sure you want to get rid of DOS.

  Umsdos may save the day here. You can setup a Linux directory in the
  DOS partition and use it without restriction for Linux usage. For
  example, say you want to setup a new directory named "extra" in your
  C: drive. And you want this directory to behave as a normal Linux
  directory. Do this (assuming that C: is /dev/hda1).



               mkdir /c
               /sbin/mount -t umsdos /dev/hda1 /c
               mkdir /c/extra
               umssync /c/extra



  You must be root to do this.

  By setting up /etc/fstab like this, you will always have access to the
  /c/extra directory.



  8.  UMSDOS-WHY-TO

  Explaining how to operate or install a Umsdos system is not enough.
  Most people are seeking some advises about using Umsdos or not.



  8.1.  The goal of Umsdos

  The goal of Umsdos was to ease the installation of Linux. An other
  goal was to ease its UN-installation.  The idea here was to promote
  the spreading of Linux.  Installing a new OS on a system is always
  troublesome. OS/2 for one will happily pollute your C: root with a
  bunch of new directories. If you are clever like me, it will also
  erase your config.sys and autoexec.bat files :-(

  The pseudo-root feature of Umsdos avoid this unwanted invasion. Linux
  can be UN-install without side effect.


  8.2.  Who needs it

  If you have a small hard drive, Umsdos will allow you to share disk
  space between DOS and Linux. A disk below 300 megs is in my opinion a
  small disk. This opinion is based on the size of the different package
  available today.  One popular word processor may eat as much as 70
  megabytes if you select all features.

  If you have a larger drive, you may consider having a dedicated Linux
  partition running the Ext2 file-system. Ext2 use a smaller cluster
  size that DOS (1k in fact) so installing many small files will eat
  less space than in a Umsdos partition.


  8.3.  Performance issue

  The following point apply to Umsdos compared with Ext2.


  o  Directory management is faster on Ext2. This come from the overhead
     of the double directory structure of Umsdos.

  o  File access (reading and writing) is probably faster on Umsdos than
     Ext2. This come from the simplicity of the FAT file-system used by
     DOS.

     Beware that this simplicity come with a cost:


  o  A maximum of around 65,000 files or clusters per partitions. This
     also means that a 500 megabytes partition will use cluster 16k
     large.  In other word, a file containing a single byte will use 16k
     of disk storage.

  o  Everything is controlled by the FAT located at the beginning of the
     hard drive. The DOS file-system is probably more fragile because of
     this.

  o  No provision to avoid fragmentation of files. A Umsdos system will
     generally be used as a single user workstation. In this case, this
     does not matter much. As a multi-user engine, files will get
     spread-ed all around the drive, lowering file access performance.

  o  Symbolic links are stored in normal file. If you intend to have a
     lot of them, you will find that Umsdos use quite a lot of disk
     space compared to Ext2.



  The UPS Howto
  Harvey J. Stein, hjstein@bfr.co.il, Berger Financial
  Research, Ltd.
  v2.42, 18 November 1997

  This document will help you connect an uninterruptable power supply to
  a Linux box... if you're lucky...  Copyright (c) 1994, 1995, 1996,
  1997 by Harvey J. Stein.  You may use this document as you see fit, as
  long as it remains intact.  In particular, this notice (along with the
  contributions below) must remain untouched.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Contributors
     1.2 Important disclaimer
     1.3 Other documents

  2. Important note on obsolete information

  3. Smart and dumb UPSs.

  4. Software

  5. Do it yourself guide

     5.1 What you need to do (summary)
     5.2 How it's supposed to work
     5.3 How to set things up
     5.4 User Enhancements

  6. Hardware notes

     6.1 How to make a cable
     6.2 Reverse-engineering cables and hacking powerd.c
     6.3 Serial port pin assignments
     6.4 Ioctl to RS232 correspondence

  7. What to do when you're really stuck

  8. Info on selected UPSs

     8.1 General Experiences.
     8.2 Advice 1200 A
     8.3 Trust Energy Protector 400/650
        8.3.1 The computer to UPS connection
           8.3.1.1 The UPS signal port
           8.3.1.2 The Cable
           8.3.1.3 How the cable works
        8.3.2 The powerd daemon
           8.3.2.1 Compiling powerd
           8.3.2.2 How powerd works
           8.3.2.3 Running powerd
        8.3.3 The inittab file and the shutdown scripts
           8.3.3.1 Modifying inittab
           8.3.3.2 The scripts
           8.3.3.3 The system shutdown script
        8.3.4 General remarks
           8.3.4.1 Feedback
           8.3.4.2 Legal Issues
        8.3.5 Appendix A  -  Source code for the powerd daemon
     8.4 Trust UPS 400-A
     8.5 Sustainer S-40a
     8.6 Systel
     8.7 Deltec Power, Fiskars Power Systems and Exide.
     8.8 Beaver model UB500 UPS
     8.9 Sendom
     8.10 Best
        8.10.1 Best Fortress - Using Best's software
        8.10.2 Best Fortress LI-950
        8.10.3 Best Ferrups
     8.11 GPS1000 from ACCODATA
     8.12 TrippLite BC750LAN (Standby UPS)
     8.13 APC
        8.13.1 APC Back-UPS
           8.13.1.1 A message of caution
           8.13.1.2 BUPS-HOWTO
           8.13.1.3 More notes
           8.13.1.4 APC Back-UPS Pro 650
        8.13.2 APC Smart-UPS
           8.13.2.1 APC Smart-UPS, Model 600
           8.13.2.2 APC Smart-UPS 700
           8.13.2.3 APC Smart-UPS 1400

  9. How to shutdown other machines on the same UPS



  ______________________________________________________________________

  1.  Introduction


  This HOWTO covers connecting a UPS to a computer running Linux.  The
  idea is to connect the two in such a way that Linux can shutdown
  cleanly when the power goes out, and before the UPS's battery gives
  out.

  This includes pointing out the existence of software packages which
  aid in establishing such communications, and detailing exactly how
  such communications are carried out.  The latter often is unnecessary
  if you can find a software package that's already been configured for
  your UPS.  Otherwise, you'll have to read on.

  To a large extent this document is even more redundant than when I
  originally wrote it three years ago.  All the basic information has
  always been contained in the powerd man page that comes with the
  SysVinit package.  Whereas three years ago one could commonly find
  Linux distributions which didn't even include this man page, I don't
  believe this is the case any longer.

  Furthermore, when I first wrote this Howto, there was no software
  other than powerd.c for Linux/UPS communications and control.  Today
  there are quite afew UPS control packages available in Sunsite's UPS
  directory <http://sunsite.unc.edu:/pub/Linux/system/ups>.

  None the less, I'm continuing to maintain the UPS Howto.  Why bother?
  Well,


  o  An additional general overview might help to understand how to
     connect a Linux system to a UPS, even if it's just the same
     information written differently.

  o  The HOWTO is serving as a repository for UPS specific data - there
     are many UPSs that haven't yet been incorporated into the general
     packages.

  o  The HOWTO contains additional details that aren't available in
     other documents.

  o  Some of the UPS software packages available in Sunsite's UPS
     directory <http://sunsite.unc.edu:/pub/Linux/system/ups> seem to be
     quite sparsely documented.  You might need to read this before you
     can understand how to use them.

  o  This thing seems to have a life of it's own now.  It's clear when a
     Howto should be born.  It's less clear when it should be put to
     sleep.



  1.1.  Contributors


  I am forever indebted to those from whom I've received help,
  suggestions, and UPS specific data.  The list includes:


  o  Hennus Bergman (hennus@sky.owl.nl)

  o  Charli (mefistos@impsat1.com.ar)

  o  Ciro Cattuto (Ciro Cattuto)

  o  Nick Christenson (npc@minotaur.jpl.nasa.gov)

  o  Lam Dang (angit@netcom.com)

  o  Markus Eiden (Markus@eiden.de)

  o  Dan Fandrich (dan@fch.wimsey.bc.ca)

  o  Ben Galliart (bgallia@orion.it.luc.edu)

  o  Danny ter Haar (dth@cistron.nl)

  o  Christian G. Holtje (docwhat@uiuc.edu)

  o  Raymond A. Ingles (inglesra@frc.com)

  o  Peter Kammer (pkammer@ics.uci.edu)

  o  Marek Michalkiewicz (ind43@sun1000.ci.pwr.wroc.pl)

  o  Jim Ockers (ockers@umr.edu)

  o  Evgeny Stambulchik (fnevgeny@plasma-gate.weizmann.ac.il)

  o  Clive A. Stubbings (cas@vjet.demon.co.uk)

  o  Miquel van Smoorenburg (miquels@cistron.nl)

  o  Slavik Terletsky (ts@polynet.lviv.ua)

  o  Tom Webster (webster@kaiwan.com)

  Note that email addresses appearing below as excerpts from email
  messages can be out of date.  The above is probably out of date too,
  but some of it's more recent than what's below.

  Also, many apologies to anyone whom I've failed to note in this list.
  Please email me and I'll add you.



  1.2.  Important disclaimer

  I really can't guarantee that any of this will work for you.
  Connecting a UPS to a computer can be a tricky business.  One or the
  other or both might burn out, blow up, catch fire, or start World War
  Three.  Furthermore, I only have direct experience with the Advice
  1200 A UPS, and a 5kva Best Ferrups, and I didn't have to make a
  cable.  So, BE CAREFUL. GATHER ALL INFORMATION YOU CAN ON YOUR UPS.
  THINK FIRST.  DON'T IMPLICITLY TRUST ANYTHING YOU READ HERE OR
  ANYWHERE ELSE.


  On the other hand, I managed to get everything working with my UPSs,
  without much information from the manufacturer, and without blowing
  anything up, so it is possible.



  1.3.  Other documents

  This document does not cover the general features and capabilities of
  UPSs.  For that type of information, you might turn to The UPS FAQ
  <ftp://navigator.jpl.nasa.gov/pub/doc/faq/UPS.faq>.  It can also be
  found at ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/answers/UPS-
  faq.  It is maintained by Nick Christenson
  (npc@minotaur.jpl.nasa.gov), but seems to have last been updated in
  1995.  In email to him, he'd like that you put UPS or UPS FAQ or
  something along these lines in the Subject line of the message.

  There're also more and more UPS manufactures sprouting up on the net.
  Some of them actually supply useful information on their web sites.  A
  convenient list of UPS manufacturers' web sites is available at The
  UPS Directory <http://www.upssystems.uk.com/upsdir.html>.  Said site
  also has a UPS FAQ <http://www.upssystems.uk.com/upsfaqs.html>.


  2.  Important note on obsolete information

  I've just discovered that some of the documentation below is obsolete.
  In particular, the init daemon that comes with the latest sysvinit
  package
  <http://sunsite.unc.edu/pub/Linux/system/daemons/init/sysvinit-2.64.tar.gz>
  is more sophisticated than I've portrayed it to be.  Although it seems
  that the current version is backward compatible with what's written
  here, it looks like it has some undocumented features which are very
  important for UPS support.

  The control mechanism outlined below only allows powerd to give init
  one of two messages, namely powerfail or powerok.  init runs one
  command when it receives powerfail, and another when it receives
  powerok.  This leads to complicated powerd logic for dealing with low
  battery signals and other sorts of special situations.

  Newer versions of init (as of version 2.58, it seems) are more
  sophisticated.  These versions can be signaled to run one of three
  scripts.  Thus, init can have a powerfail script for announcing a
  power outage, a powerfailnow script for doing an immediate shutdown,
  and a powerok script for halting any pending shutdowns.  This is much
  cleaner than the gyrations one would have to go through with the
  mechanisms detailed below.

  Although most of the discussion here assumes the old init
  communication method, I just added two new sections where the authors
  uses the new communcation method.  These are sections ``Trust Energy
  Protector 400/650'' and ``APC Smart-UPS 700''.  The former is
  especially detailed.  Both include a powerd.c which signals init to do
  an immediate shutdown when a low battery signal is received, as well
  as the relevant /etc/inittab lines to make this work.  Other than
  this, all I can tell you is to look at the source code for init.

  Also, for all I know, many of the software packages listed below also
  use this newer communication method.


  3.  Smart and dumb UPSs.

  UPSs fall into two categories, which I'll call ``smart'' and ``dumb''.
  The difference between the two is the amount of information one can
  get from the UPS and the amount of control one can exert over the UPS.



     Dumb UPS

     o  Connects to the computer via serial port.

     o  Uses modem control lines to communicate with the computer.

     o  Can signal whether or not the power is out.

     o  Typically can signal whether or not the battery is low.

     o  The computer can usually signal the UPS to turn itself off.


     Smart UPS

     o  Connects to the computer via serial port.

     o  Communicates with the computer via normal data transfer through
        the serial port.

     o  Typically has some sort of command language that the computer
        can use to get various pieces of information from the UPS, to
        set various operating parameters for the UPS, and to control the
        UPS (such as turning it off).



  Usually smart UPSs can be operated in dumb mode.  This is useful
  because as far as I know, the company which manufactures the most
  popular smart UPS (namely APC) will only disclose the communication
  protocol for their UPSs to people who sign a non-disclosure agreement.

  As far as I know, the only smart UPS available which is easy to
  communicate with under Linux are those made by Best.  Furthermore,
  BEST fully documents the smart mode (and the dumb mode) of their UPSs.
  BEST also supplies source code for programs which can communicate with
  their UPSs.

  All the packages listed in section ``Software'' will communicate with
  a UPS in dumb mode.  This is all you really need.  The ones
  specifically for the APC UPSs make various claims as to being usable
  in smart mode, but I don't know exactly what they permit.  A full
  implementation would give you a pop-up window with all sorts of fun
  gauges displaying various statistics for the UPS, such as load,
  internal temperature, fault history, input voltage, output voltage,
  etc.  It seems like the smupsd-0.9-1.i386.rpm package (section
  ``Software'') approaches this.  I'm not sure about the others.

  The rest of this document is pretty much confined to configuring your
  system to work with a dumb UPS.  The general idea is about the same
  with a smart UPS, but the details of how powerd would need to work and
  what kind of cable you need are different for a smart UPS.



  4.  Software

  Basically, all you need is a working powerd binary, usually found in
  /sbin/powerd.  This is usually part of the SysVinit package.  As far
  as I know, all current Linux distributions include a recent version of
  SysVinit.  Very old versions didn't include powerd.

  The only problem you might have is that your cable might not match how
  powerd is set up, in which case you'll have to either rewire your
  cable, or pick up a copy of powerd.c and modify it to work with your
  cable.  Or, for that matter, you can always pick up one of the
  following packages, most of which allow you to configure them to match
  your cable.

  As mentioned, an alternative to using the powerd that comes with the
  SysVinit package would be to use one of the UPS packages now
  available.  There are many packages currently available to aid in
  setting up computer/ups communications.  None of this was available
  when I first wrote this Howto, which is why I had to write it.  In
  fact, there's a good chance that you might be able to use one of these
  software packages, and avoid this Howto entirely!

  As of 15 March 1997 or so, Sunsite's UPS directory
  <http://sunsite.unc.edu:/pub/Linux/system/ups> had quite a few
  packages available.  Other sites seem to have UPS control packages
  available too.  Here's what I've found to date (all but two from
  sunsite):


     Enhanced_APC_BackUPS.tar.gz <http://sunsite.unc.edu:/pub/Linux/sys-
        tem/ups/Enhanced_APC_BackUPS.tar.gz>
        A package for controlling APC Smart UPSs.  Seems to basically
        follow the BUPS Howto (included here), but also seems to have
        some low battery warning support.


     Enhanced_APC_UPSD-v1.4.tar.gz <http://sun-
        site.unc.edu:/pub/Linux/system/ups/Enhanced_APC_UPSD-
        v1.4.tar.gz>
        The .lsm file says that it's formerly the above package, but it
        actually includes the above package as a .tar.gz file inside of
        this tar.gz file!  The documentation is spotty.  It seems to
        support APC UPSs in both smart mode and dumb mode, but I can't
        be sure.


     apcd-0.5.tar.gz <http://sunsite.unc.edu:/pub/Linux/sys-
        tem/ups/apcd-0.5.tar.gz>
        Another package for controlling APC Smart UPSs.  Seems to
        include some sort of master/slave support (i.e. - one machine
        signals others to shut down when the power goes out).  Seems to
        use the UPS in smart mode, as opposed to via modem signal line
        toggling.


     smupsd-0.9-1.i386.rpm <ftp://ftp.redhat.com/pub/con-
        trib/i386/smupsd-0.9-1.i386.rpm>

     smupsd-0.9-1.src.rpm <ftp://ftp.redhat.com/pub/con-
        trib/i386/smupsd-0.9-1.src.rpm>
        The author (David E. Myers, dem@netsco.com) writes:

        smupsd monitors an APC    Smart-UPS[TM] under Red Hat[TM] Linux.
        Should power fail, smupsd will power down the system and the UPS
        in an orderly fashion.

        smupsd has the following features:


     o  Shuts down the system and the UPS based on either remaining UPS
        battery charge or elapsed time since power failure.


     o  UPS parameters can be monitored live from any host with the
        graphical monitor program upsmon, written in JavaTM].

     o  UPS parameters can be logged to a file for analysis and
        reporting.

     o  When additional systems share the same UPS, instances of smupsd
        running on these systems can read UPS parameters from the one
        running on the system serially connected to the UPS
        (master/slave).

     o  Network access from remote hosts can be controlled via the
        /etc/hosts.allow file.



     genpower-1.0.1.tgz <http://sunsite.unc.edu:/pub/Linux/sys-
        tem/ups/genpower-1.0.1.tgz>
        A general UPS handling package.  Includes configurations for
        many UPSs - two TrippLite configurations, and three APC
        configurations.  Includes good documentation.  A best buy.


     powerd-2.0.tar.gz <http://sunsite.unc.edu:/pub/Linux/sys-
        tem/ups/powerd-2.0.tar.gz>
        A replacement for the powerd that comes with the SysVinit
        package.  As opposed to comments included in the documentation
        it doesn't seem to have been merged into the SysVinit package as
        of version 2.62.  Its advantages are that it can act as a server
        for other powerds running on other machines (for when you have a
        network of machines hanging off a single UPS), and it can be
        configured by config file - the source code doesn't have to be
        edited and recompiled.


     upsd-1.0.tgz <http://sunsite.unc.edu:/pub/Linux/sys-
        tem/ups/upsd-1.0.tgz>
        Another replacement for powerd.  Seems to be quite comparable in
        features to powerd-2.0.tar.gz.


     checkups.tar <http://www.bestpower.com/section/software/check-
        ups.tar>
        This package is for controlling Best UPSs.  It's direct from
        Best's web site.  Includes binaries for lots of unix flavors,
        but more importantly, it includes source code, so you can try it
        out under Linux, and if it doesn't work, you can try to fix it.
        The source code includes both ``basic checkups'' which controls
        the UPS in dumb mode, and ``advanced checkups'' which is a
        little more sophisticated - it will signal a shutdown when the
        UPS says it has X minutes of power remaining instead of just
        shutting down X minutes after the power goes out.  The advanced
        checkups program also will shut down when the UPS registers
        various alarms such as High Ambient Temperature, Near Low
        Battery, Low AC Out, or User Test Alarm.


     bestups-0.9.tar.gz <http://sunsite.unc.edu:/pub/Linux/sys-
        tem/ups/bestups-0.9.tar.gz>
        A package that might very well be on sunsite by the time you
        read this.  It's a pair of communications module which works
        with Best Ferrups UPSs.  It operates the UPS in smart mode.  It
        inter-operates well with powerd-2.0 - useful if you have a big
        Best Ferrups UPS keeping up all the machines on a network.

        NOTE - This package has yet to be uploaded to Sunsite.  I keep
        begging the author to finish and upload it, but he has yet to
        find the time.



     LanSafe III <http://www.deltecpower.com/soft.html>
        Deltec Electronics (and Exide) sell a software package called
        LanSafe III.  They have a Linux version.  It comes with their
        UPSs.  They also say that it works with other UPSs (on the dumb
        level).


     apcupsd-2.8.tar.gz <http://sunsite.unc.edu:/pub/Linux/sys-
        tem/ups/apcupsd-2.8.tar.gz>
        The author (Andre Hedrick, hedrick@astro.dyer.vanderbilt.edu)
        writes:

        apcupsd-2.1.tar.gz replaces Enhanced-APC-UPSD.tar.gz

        It is a very complete package for APC UPSs.  There is support
        for the entire range of UPSs in their product line.  I have now
        added smart mode signaling to the package and support with APC's
        own cables or a custom cable if you don't have an APC cable that
        is supported to date.



     smartups-1.1.tgz <http://sunsite.unc.edu:/pub/Linux/sys-
        tem/ups/smartups-1.1.tgz>
        From the LSM:

        A powerd and an X11 graphing utility which shows you the
        voltages, frequencies, load percentage and battery level in
        realtime. The protocol that the "Safeware" software uses, and
        "Tripplite" UPSs are supported. Source + ELF binaries.


     ups.tar.gz <http://sunsite.unc.edu:/pub/Linux/sys-
        tem/ups/ups.tar.gz>
        From the LSM:

        Program to interact with battery backups (Powerbox UPS).


     usvd-2.0.0.tgz <http://sunsite.unc.edu:/pub/Linux/sys-
        tem/usvd-2.0.0/usvd-2.0.0.tgz>
        From the LSM:

        usvd is a daemon that monitors the state of an uninterrupted
        power supply and reacts upon state changes (line fail, line
        back, battery low situations). You can write your own scripts
        that are called in these cases. It does *not* require SYSVINIT.



  Note that I've only glanced at these packages.  I haven't used them.
  We were just about to start using bestups-0.9.tar.gz
  <http://sunsite.unc.edu:/pub/Linux/system/ups/bestups-0.9.tar.gz> in
  conjunction with powerd-2.0.tar.gz
  <http://sunsite.unc.edu:/pub/Linux/system/ups/powerd-2.0.tar.gz>, but
  we never quite got around to it.



  5.  Do it yourself guide

  This discussion is specifically tailored for dumb UPS control.
  However, most of the process is about the same for dumb UPSs and smart
  UPSs.  The biggest difference is in the details of how the UPS
  monitoring daemon (typically powerd) communicates with the UPS.

  Before doing anything, I suggest the following algorithm:

  o  Skim this document.

  o  Download and investigate all packages which seem specifically
     tailored to your UPS.

  o  Download and investigate the more generic packages.  Note that some
     of the more generic packages are actually more powerful, better
     documented, and easier to use than their more specific
     counterparts.

  o  If you still can't get things working, or if points are still
     unclear, read this document more carefully, and hack away...



  5.1.  What you need to do (summary)


  o  Plug the computer into the UPS.

  o  Connect the computer's serial port to the UPS with a special cable.

  o  Run powerd (or some sort of equivalent) on the computer.

  o  Setup your init to do something reasonable on powerfail and powerok
     events (like start a shutdown and kill any currently running
     shutdowns, respectively, for example).


  5.2.  How it's supposed to work



     UPS's job
        When the power goes out, the UPS continues to power the computer
        and signals that the power went out by throwing a relay or
        turning on an opticoupler on it's control port.


     Cable's job
        The cable is designed so that when the UPS throws said relay,
        this causes a particular serial port control line (typically
        DCD) to go high.


     Powerd's job
        The powerd daemon monitors the serial port.  Keeps
        raised/lowered whatever serial port control lines the UPS needs
        to have raised/lowered (typically, DTR must be kept high and
        whatever line shuts off the UPS must be kept low).  When powerd
        sees the UPS control line go high, it writes FAIL to
        /etc/powerstatus and sends the init process a SIGPWR signal.
        (Older versions of powerd and initd wrote to /etc/powerfail.)
        When the control line goes low again, it writes OK to
        /etc/powerstatus and sends init a SIGPWR signal.


     Init's job (aside from everything else it does)
        When it receives a SIGPWR, it looks at /etc/powerstatus.  If it
        contains FAIL it runs the powerfail entry from /etc/inittab.  If
        it contains OK it runs the powerokwait entry from inittab.



  5.3.  How to set things up


  The following presupposes that you have a cable that works properly
  with powerd.  If you're not sure that your cable works (or how it
  works), see section ``Reverse-engineering cables and hacking
  powerd.c'' for information on dealing with poorly described cables and
  reconfiguring powerd.c.  Sections ``Serial port pin assignments'' and
  ``Ioctl to RS232 correspondence'' will also be useful.

  If you need to make a cable, see section ``How to make a cable'' for
  the overall details, and the subsection of section ``Info on selected
  UPSs'' that refers to your UPS.  The latter might also include
  information on manufacturer supplied cables.  You may want to at least
  skim all of section ``Info on selected UPSs'' because each section has
  a few additional generally helpful details.


  o  Edit /etc/inittab.  Put in something like this:


     # What to do when power fails (Halt system & drain battery :):
     pf::powerfail:/etc/powerfailscript +5

     # If power is back before shutdown, cancel the running shutdown.
     pg:0123456:powerokwait:/etc/powerokscript



  o  Write scripts /etc/powerfailscript and /etc/powerokscript to
     shutdown in 5 minutes (or whatever's appropriate) and kill any
     existing shutdown, respectively.  Depending on the version of
     shutdown that you're using, this will be either so trivial that
     you'll dispense with the scripts, or be a 1 line bash script,
     something along the lines of:


         kill `ps -aux | grep "shutdown" | grep -v grep | awk '{print $2}'`



  and you'll keep the scripts.  (In case it doesn't come out right, the
  first single quote on the above line is a backquote, the second and
  third are single quotes, and the last is also a backquote.)

  o  Tell init to re-process the inittab file with the command:


         telinit q



  o  Edit rc.local so that powerd gets run upon startup.  The syntax is:



         powerd <line>



  Replace <line> with the serial port that the UPS is connected, such as
  /dev/cua1.

  o  Connect computer's serial port to UPS's serial port.  DO NOT PLUG
     THE COMPUTER INTO UPS YET.

  o  Plug a light into the UPS.

  o  Turn on the UPS and the light.

  o  Run powerd.

  o  Test the setup:

  o  Yank the UPS's plug.

  o  Check that the light stays on.

  o  Check that /etc/powerfailscript runs.

  o  Check that shutdown is running.

  o  Plug the UPS back in.

  o  Check that the light stays on.

  o  Check that /etc/powerokscript runs.

  o  Check that /etc/powerfailscript is not running.

  o  Check that shutdown is no longer running.

  o  Yank the UPS's plug again.  Leave it out and make sure that the
     computer shuts down properly in the proper amount of time.

  o  The Dangerous Part. After everything seems to be proper, power down
     the computer and plug it into the UPS.  Run a script that sync's
     the hard disk every second or so.  Simultaneously run a second
     script that keeps doing a find over your entire hard disk.  The
     first is to make this a little safer and the second is to help draw
     lots of power.  Now, pull the plug on the UPS, check again that
     shutdown is running and wait.  Make sure that the computer shuts
     down cleanly before the battery on the UPS gives out.  This is
     dangerous because if the power goes out before the computer shuts
     down, you can end up with a corrupt file system, and maybe even
     lose all your files.  You'll probably want to do a full backup
     before this test, and set the shutdown time extremely short to
     begin with.

  Congratulations!  You now have a Linux computer that's protected by a
  UPS and will shutdown cleanly when the power goes out!



  5.4.  User Enhancements



  o  Hack powerd.c to monitor the line indicating that the batteries are
     low.  When the batteries get low, do an immediate shutdown.

  o  Modify the shutdown procedure so that if it's shutting down in a
     powerfail situation, then it turns off the UPS after doing
     everything necessary.


  6.  Hardware notes


  6.1.  How to make a cable

  This section is just from messages I've seen on the net.  I haven't
  done it so I can't write from experience.  If anyone has, please write
  this section for me :).  See also the message about the GPS1000
  contained in section ``GPS1000 from ACCODATA'', not to mention all the
  UPS specific data in section ``Info on selected UPSs''.



     >From miquels@caution.cistron.nl.mugnet.org Wed Jul 21 14:26:33 1993
     Newsgroups: comp.os.linux
     Subject: Re: UPS interface for Linux?
     From: miquels@caution.cistron.nl.mugnet.org (Miquel van Smoorenburg)
     Date: Sat, 17 Jul 93 18:03:37
     Distribution: world
     Organization: Cistron Electronics.

     In article <1993Jul15.184450.5193@excaliber.uucp>
     joel@rac1.wam.umd.edu (Joel M. Hoffman) writes:
     >I'm in the process of buying a UPS (Uninteruptable Power Supply), and
     >notice that some of them have interfaces for LAN's to signal the LAN
     >when the power fails.
     >
     >Is there such an interface for Linux?
     >
     >Thanks.
     >
     >-Joel
     >(joel@wam.umd.edu)
     >

     When I worked on the last versioon of SysVinit (Now version 2.4),
     I temporarily had a UPS on my computer, so I added support for it.
     You might have seen that in the latest <signal.h> header files there
     is a #define SIGPWR 30 now :-). Anyway, I did not have such a special
     interface but the output of most UPS's is just a relais that makes or breaks
     on power interrupt. I thought up a simple way to connect this to the
     DCD line of the serial port. In the SysVinit package there is a daemon
     called 'powerd' that keeps an eye on that serial line and sends SIGPWR
     to init when the status changes, so that init can do something (such as
     bringing the system down within 5 minutes). How to connect the UPS to
     the serial line is described in the source "powerd.c", but I will
     draw it here for explanation:

                          +------------------------o  DTR
                          |
                        +---+
                        |   | resistor
                        |   | 10 kilo-Ohm
                        |   |
                        +---+                                To serial port.
                          |
            +-----o-------+------------------------o  DCD
            |             |
            o  UPS        |
          \    relais     |
           \              |
            |             |
            +-----o-------+------------------------o  GND

     Nice drawing eh?

     Hope this helps.
     SysVinit can be found on sunsite (and tsx-11 probably) as
     SysVinit2.4.tar.z

     Mike.

     --

     Miquel van Smoorenburg, <miquels@cistron.nl.mugnet.org>
     Ibmio.com: cannot open CONFIG.SYS: file handle broke off.


     >From danny@caution.cistron.nl.mugnet.org Wed Jul 21 14:27:04 1993
     Newsgroups: comp.os.linux
     Subject: Re: UPS interface for Linux?
     From: danny@caution.cistron.nl.mugnet.org (Danny ter Haar)
     Date: Mon, 19 Jul 93 11:02:14
     Distribution: world
     Organization: Cistron Electronics.

     In article <9307174330@caution.cistron.nl.mugnet.org>
     miquels@caution.cistron.nl.mugnet.org (Miquel van Smoorenburg) writes:
     >How to connect the UPS to the serial line is described in the source
     >"powerd.c", but I will draw it here for explanation:

     The drawing wasn't really clear, please use this one in stead !
     >
     >                     +------------------------o  DTR
     >                     |
     >                   +---+
     >                   |   | resistor
     >                   |   | 10 kilo-Ohm
     >                   |   |
     >                   +---+                                To serial port.
     >                     |
     >       +-----o-------+------------------------o  DCD
     >       |
     >       o  UPS
     >     \    relais
     >      \
     >       |
     >       +-----o--------------------------------o  GND
     >

     The DTR is kept high, when the UPS's power input is gone it
     will close the relais . The computer is monitoring
     the DCD input port to go LOW . When this happens it will start a
     shutdown sequence...

     _____
     Danny

     --
     <=====================================================================>
     Danny ter Haar  <dannyth@hacktic.nl> or <danny@cistron.nl.mugnet.org>
     Robins law #103: 'a couple of lightyears can't part good friends'



  6.2.  Reverse-engineering cables and hacking powerd.c

  Try to get documentation for the cables that your UPS seller supplies.
  In particular find out:


  o  What lines need to be kept high.

  o  What line(s) turn off the UPS.

  o  What lines the UPS toggles to indicate that:

  o  Power is out.

  o  Battery is low.

  You then need to either hack powerd.c appropriately, or use one of the
  above configurable packages (see the packages genpower-1.0.1.tgz,
  powerd-2.0.tar.gz, or upsd-1.0.tgz described in section ``Software'').
  If you use one of the packages, follow the instructions there.  If you
  want to hack powerd.c, keep reading.

  If you have trouble getting the above information, or just want to
  check it (a good idea) the following program  might help.  It's a
  hacked version of powerd.c.  It allows you to set the necessary port
  flags from the command line and then monitors the port, displaying the
  control lines every second.  I used it as ``upscheck /dev/cua1 2''
  (for example) to set the 2nd bit (DTR) and to clear the other bits.
  The number base 2 indicates which bits to set, so for example to set
  bits 1, 2 and 3, (and clear the others) use 7.  See the code for
  details.

  Here's the (untested) upscheck.c program.  It's untested because I
  edited the version I originally used to make it clearer, and can't
  test the new version at the moment.



  /*
   * upscheck     Check how UPS & computer communicate.
   *
   * Usage:       upscheck <device> <bits to set>
   *              For example, upscheck /dev/cua4 4 to set bit 3 &
   *              monitor /dev/cua4.
   *
   * Author:      Harvey J. Stein <hjstein@math.huji.ac.il>
   *              (but really just a minor modification of Miquel van
   *              Smoorenburg's <miquels@drinkel.nl.mugnet.org> powerd.c
   *
   * Version:     1.0 19940802
   *
   */
  #include <sys/types.h>
  #include <sys/ioctl.h>
  #include <fcntl.h>
  #include <errno.h>
  #include <stdlib.h>
  #include <unistd.h>
  #include <stdio.h>
  #include <signal.h>

  /* Main program. */
  int main(int argc, char **argv)
  {
    int fd;

  /*  These TIOCM_* parameters are defined in <linux/termios.h>, which  */
  /*  is indirectly included here.                                      */
    int dtr_bit = TIOCM_DTR;
    int rts_bit = TIOCM_RTS;
    int set_bits;
    int flags;
    int status, oldstat = -1;
    int count = 0;
    int pc;

    if (argc < 2) {
          fprintf(stderr, "Usage: upscheck <device> <bits-to-set>\n");
          exit(1);
    }

    /* Open monitor device. */
    if ((fd = open(argv[1], O_RDWR | O_NDELAY)) < 0) {
      fprintf(stderr, "upscheck: %s: %s\n", argv[1], sys_errlist[errno]);
      exit(1);}

    /* Get the bits to set from the command line. */
    sscanf(argv[2], "%d", &set_bits);

    while (1) {
      /* Set the command line specified bits (& only the command line */
      /* specified bits).                                             */
      ioctl(fd, TIOCMSET, &set_bits);
      fprintf(stderr, "Setting %o.\n", set_bits);

      sleep(1);

      /* Get the current line bits */
      ioctl(fd, TIOCMGET, &flags);
      fprintf(stderr, "Flags are %o.\n", flags);

  /*  Fiddle here by changing TIOCM_CTS to some other TIOCM until    */
  /*  this program detects that the power goes out when you yank     */
  /*  the plug on the UPS.  Then you'll know how to modify powerd.c. */
      if (flags & TIOCM_CTS)
        {
          pc = 0 ;
          fprintf(stderr, "power is up.\n");
        }
      else
        {
          pc = pc + 1 ;
          fprintf(stderr, "power is down.\n");
        }
      }

    close(fd);
  }



  6.3.  Serial port pin assignments

  The previous section presupposes knowledge of the correspondence
  between terminal signals and serial port pins.  Here's a reference for
  that correspondence, taken from David Tal's ``Frequently Used Cables
  and Connectors'' document.  I'm including a diagram illustrating the
  connectors, and a table listing the correspondence between pin numbers
  and terminal line signals.

  If you need a general reference for cable wiring, connectors, etc,
  then David Tal's would be a good one, but I can't seem to locate this
  document on the net any more.  But I've found a good replacement.
  It's The Hardware Book <http://www.blackdown.org/~hwb/hwb.html>.

  Other useful sites:

  o  Yost Serial Device Wiring Standard
     <http://star.sols.pt/docs/yost.html> which contains interesting
     information on how to use RJ-45 jacks and eight wire cables for all
     serial port connections.

  o  Stokely Consulting <http://www.stokely.com/stokely> for general
     Unix info, and in particular their Unix Serial Port Resources.

  o  Unix Workstation System Administration Education Certification
     <http://www.uwsg.indiana.edu/usail/edcert/> which contains RS-232:
     Connectors and Cabling
     <http://www.uwsg.indiana.edu/usail/peripherals/serial/rs232/>

  Incidentally, it seems that the Linuxdoc-sgml package still doesn't
  format tables very well in the html output.  If you want to be able to
  read the following table, you're probably going to have to look at
  either the DVI version or the plain text version of this document.



  |       |        |        |       |         |          |                                |
  |DB-25  |  DB-9  |  Name  |  EIA  |  CCITT  |  DTE-DCE |  Description                   |
  |Pin #  |  Pin # |        |       |         |          |                                |
  ______________________________________________________________________                  |
  |1      |        |  FG    |  AA   |  101    |  ---     | Frame Ground/Chassis GND       |
  |2      |  3     |  TD    |  BA   |  103    |  --->    | Transmitted Data, TxD          |
  |3      |  2     |  RD    |  BB   |  104    |  <---    |  Received Data, RxD            |
  |4      |  7     |  RTS   |  CA   |  105    |  --->    | Request To Send                |
  |5      |  8     |  CTS   |  CB   |  106    |  <---    |  Clear To Send                 |
  |6      |  6     |  DSR   |  CC   |  107    |  <---    |  Data Set Ready                |
  |7      |  5     |  SG    |  AB   |  102    |  ----    | Signal Ground, GND             |
  |8      |  1     |  DCD   |  CF   |  109    |  <---    |  Data Carrier Detect           |
  |9      |        |  --    |  --   |  -      |  -       | Positive DC test voltage       |
  |10     |        |  --    |  --   |  -      |  -       | Negative DC test voltage       |
  |11     |        |  QM    |  --   |  -      |  <---    |  Equalizer mode                |
  |12     |        |  SDCD  |  SCF  |  122    |  <---    |  Secondary Data Carrier Detect |
  |13     |        |  SCTS  |  SCB  |  121    |  <---    |  Secondary Clear To Send       |
  |14     |        |  STD   |  SBA  |  118    |  --->    | Secondary Transmitted Data     |
  |15     |        |  TC    |  DB   |  114    |  <---    |  Transmitter (signal) Clock    |
  |16     |        |  SRD   |  SBB  |  119    |  <---    |  Secondary Receiver Clock      |
  |17     |        |  RC    |  DD   |  115    |  --->    | Receiver (signal) Clock        |
  |18     |        |  DCR   |  --   |  -      |  <---    |  Divided Clock Receiver        |
  |19     |        |  SRTS  |  SCA  |  120    |  --->    | Secondary Request To Send      |
  |20     |  4     |  DTR   |  CD   |  108.2  |  --->    | Data Terminal Ready            |
  |21     |        |  SQ    |  CG   |  110    |  <---    |  Signal Quality Detect         |
  |22     |  9     |  RI    |  CE   |  125    |  <---    |  Ring Indicator                |
  |23     |        |  --    |  CH   |  111    |  --->    | Data rate selector             |
  |24     |        |  --    |  CI   |  112    |  <---    |  Data rate selector            |
  |25     |        |  TC    |  DA   |  113    |  <---    |  Transmitted Clock             |


      Pin Assignment for the Serial Port (RS-232C), 25-pin and 9-pin
          1                         13         1         5
        _______________________________      _______________
        \  . . . . . . . . . . . . .  /      \  . . . . .  /    RS232-connectors
         \  . . . . . . . . . . . .  /        \  . . . .  /     seen from outside
          ---------------------------          -----------      of computer.
          14                      25            6       9

     DTE : Data Terminal Equipment (i.e. computer)
     DCE : Data Communications Equipment (i.e. modem)
     RxD : Data received; 1 is transmitted "low", 0 as "high"
     TxD : Data sent; 1 is transmitted "low", 0 as "high"
     DTR : DTE announces that it is powered up and ready to communicate
     DSR : DCE announces that it is ready to communicate; low=modem hangup
     RTS : DTE asks DCE for permission to send data
     CTS : DCE agrees on RTS
     RI  : DCE signals the DTE that an establishment of a connection is attempted
     DCD : DCE announces that a connection is established



  6.4.  Ioctl to RS232 correspondence

  Since you also might need to modify powerd.c to raise and lower the
  correct lines, you might also need the numeric values of different
  terminal signals.  The can be found in /usr/include/linux/termios.h,
  but are reproduced here for reference.  Since they could change,
  you're best off confirming these values against said file.



  /* modem lines */
  #define TIOCM_LE        0x001
  #define TIOCM_DTR       0x002
  #define TIOCM_RTS       0x004
  #define TIOCM_ST        0x008
  #define TIOCM_SR        0x010
  #define TIOCM_CTS       0x020
  #define TIOCM_CAR       0x040
  #define TIOCM_RNG       0x080
  #define TIOCM_DSR       0x100
  #define TIOCM_CD        TIOCM_CAR
  #define TIOCM_RI        TIOCM_RNG



  Note that the 3rd column is in Hex.


  7.  What to do when you're really stuck

  Here's a novel solution to UPS control for when the UPS and the
  computer just aren't on speaking terms.  I must say that every time I
  read this, I'm struck by how clever a solution it is.



  From: " Raymond A. Ingles" <inglesra@frc.com>
  To: hjstein@math.huji.ac.il
  Subject: UPS HOWTO tip
  Date: Mon, 24 Feb 1997 11:48:32 -0500 (EST)


   I don't know if others would find this useful, but I thought I might
  pass this along for possible inclusion in the HOWTO. Thanks for
  maintaining a HOWTO that I found very useful!

  -----------------

   My fiancee bought me a UPS as a present, a Tripp-Lite 400, I believe. It
  was very welcome and seems to operate as expected, but unfortunately
  doesn't have a serial interface to let the computer know the line power
  has failed. It's apparently intended for home or office use where the
  computer will not be left unattended.

   This, of course, was unacceptable and I began working on a line monitor,
  planning on opening up the case and figuring out how to add the hardware
  that the manufacturer had left out. Then I realized that there was a
  quicker and simpler and cheaper (if somewhat less functional) way.

   I had an old 2400 baud modem that I wasn't using, and hooked it up to an
  unused serial port on my computer. I then plugged the modem into a surge
  supressor plugged into the wall power. I set up powerd with the options
  as follows:

  -----
  serialline    /dev/ttyS1
  monitor     DCD
  failwhen    low
  -----

   Now, when the wall power fails (or, since that hasn't happened lately,
  when I pull the surge supressor from the wall to test this setup) the modem
  fails but the UPS starts supplying power to the computer. When powerd
  notices the modem has dropped DCD, it triggers the powerfail sequence.

   Obviously, this has some limitations. You can't tell from the modem when
  the battery is low and so on. You can only tell that the wall power has
  failed. Still, it's certainly cheap and I hate to see functioning
  computer equipment lie unused. These days you should be able to get a
  2400 baud modem for very nearly free.

   I'd still suggest getting a real UPS with full communication capability.
  But if you're stuck with a less-functional one, this may at least make it
  useful.

   Sincerely,

   Ray Ingles               (810) 377-7735                inglesra@frc.com

   "Anybody who has ever seen a photograph showing the kind of damage that
  a trout traveling that fast can inflict on the human skull knows that
  such photographs are very valuable. I paid $20 for mine." - Dave Barry



  8.  Info on selected UPSs


  This section contains UPS specific information.  What I'd like is to
  have the UPS control port information (what each pin does and needs to
  have done), information on the manufacturer supplied cable (what it
  connects where), and a hacked version of powerd.c which works with the
  UPS.  What I currently have is fairly complete descriptions of setting
  up each UPS.  I'd try to distill out the relevant information, but
  since I can't test each UPS, it's hard to decide exactly what's
  relevant.  Furthermore, each UPS seems to have some additional quirks
  that are nicely described by the authors of each section.  So for now
  I'm leaving everything in.  Makes for a hefty Howto.

  Please send me your experiences for inclusion here.


  8.1.  General Experiences.

  I've been saving peoples comments, but haven't gotten permission yet
  to include them here.  Here's a general summary of what I've heard
  from people.

  APC: Won't release info on their smart mode without your signature on
  a non-disclosure agreement.  Thus, people are forced to run their
  smart UPSs in the dumb mode as outlined above.  Various people have
  had varying amounts of success reverse engineering

  Best: Helpful and friendly.  Supply source code and documentation both
  for dumb modes and smart modes.

  TrippLite: One person reported that TrippLite won't release info
  either.

  Upsonic: One person reported that Upsonic has discussed technical
  details over the phone, answered questions via fax and are generally
  helpful.



  8.2.  Advice 1200 A

  UPS from Advice Electronics, Tel Aviv Israel (they stick their own
  name on the things).

  I don't recommend them.  Our experiences with them have been very bad.
  We've twice had a 17" monitor fry when the power failed.  We've had
  computers spontaneously reboot when the power failed.

  None the less, for completeness, here's he UPS Control Port's pin
  specifications.


  o  2 - Power Fail.

  o  5 - Battery Low.

  o  6 - Shut Down UPS.

  o  4 - Common ground for pin 2, 5, 6.

  They also gave me the following picture which didn't help me, but may
  help you if you want to build a cable yourself:



           2 ----------+
                       |
                       \
                        \|
                         |--------------
                        /|
                      \/      <--- The "\/" here indicates the type of
                      |            this transister.  I forget what
                      |            denotes what, but this one points
                   +-----+         away from the center line.
                  /  /  /


           5 ----------+
                       |
                       \
                        \|
                         |--------------
                        /|
                      \/
                      |
                      |
                   +-----+
                  /  /  /


                         +-------------
                         |
                         /
                10K    |/
           6 --\/\/\/--|
                       |\
                         \/
                         |
                         |
                      +-----+
                     /  /  /


           4 ----------+
                       |
                       |
                    +-----+
                   /  /  /



  Cable supplied

  They first gave me a cable that was part of a DOS UPS control package
  called RUPS.  I used this for testing.  When I was satisfied, they
  gave me a cable they use for Netware servers connected to UPSs.  It
  functioned identically.  Here are the details:


  o  DTR - Powers cable (make powerd.c keep it high).

  o  CTS - Power out (stays high and goes low when power goes out).

  o  DSR - Battery low (stays high.  Goes low when battery does).

  o  RTS - Turns off UPS (keep it low.  Set it high to turn off UPS).

  (The powerd.c that comes with SysVinit set or left RTS high, causing
  the UPS to shut off immediately when powerd was started up!)
  8.3.  Trust Energy Protector 400/650

  This section is good for more than just the Trust Energy Protector.
  It illustrates how to work with the new features of init.

  How to use a Trust Energy Protector 400/650 under Linux

  by Ciro Cattuto <mailto:ciro@stud.unipg.it>

  Version 1.0 - 31 March 1997



  8.3.1.  The computer to UPS connection

  The Trust Energy Protector 400/650 is equipped with a remote signal
  port.  Using a properly designed cable, it is possible to connect the
  UPS port to the serial port of a computer, thus making it aware of
  power failure events.



  8.3.1.1.  The UPS signal port

  These are the pin assignments for the DB-9 signal port of the Trust
  Energy Protector 400/650, as described in the user's manual:



     pin 2
        The relay will close when input power fails.


     pin 4
        Common for pins 2 and 5.


     pin 5
        The relay will close when the battery inside the Trust Energy
        Protector 400/650 has less than 1.5 minutes of backup time left.


     pin 6
        The user may send a high level signal (+5V - +12V) for over 1ms
        to turn off the Trust Energy Protector 400/650. However this
        option can only be activated when the input power fails.


     pin 7
        Common for pin 6.


  8.3.1.2.  The Cable

  This is the cable I used to connect the UPS to the serial port of my
  computer:



  computer side (DB-25)               UPS side (DB-9)
  ===================================================

   6 DSR --+             [R] = 10 kilo-Ohm resistor
           |
  20 DTR --+----+
           |    |
          [R]  [R]                           +--- 7
           |    |                            |
   8 DCD --+----|-----------        ---------|--- 2
                |                            |
   7 GND -------|-----------        ---------+--- 4
                |             ....
   5 CTS -------+-----------        ------------- 5

   2 TX  -------------------        ------------- 6

  ===================================================



  In the case of a DB-9 serial port, the pins 6,20,8,7,5,2 are mapped to
  pins 6,4,1,5,8,3.



  8.3.1.3.  How the cable works

  The computer raises DTR and checks whether DSR is high, to ensure that
  the cable is connected to the computer. While the power is good, DCD
  and CTS are both high (because of the pull-up resistors).

  When the power fails, the relay between pins 2 and 4 of the UPS port
  closes, and DCD becomes low, signalling the failure condition.

  Similarly, when the UPS batteries are getting low, the relay between
  pins 5 and 4 closes, thus lowering CTS.

  During a power failure the computer is able to turn off the UPS by
  raising TX for over 1ms. This can be easily accomplished sending a
  0xFF byte to the serial port, at a low baud rate.



  8.3.2.  The powerd daemon

  To make use of the information available at the serial port we need to
  run a program which monitors the port, decodes the signals and sends
  the appropriate messages to the operating system, i.e. to the init
  process.  The init process can execute scripts and programs designed
  to handle (gracefully!) the power failure event.



  8.3.2.1.  Compiling powerd

  In Appendix A you'll find the source code of powerd, the daemon I use
  to monitor the Trust Energy Protector 400/650.  To compile it you will
  need the source code of the sysvinit package (I used the code from
  sysvinit-2.60). Just overwrite the original powerd.c and compile it.



  8.3.2.2.  How powerd works

  As soon as powerd starts it opens the serial device connected to the
  UPS and forces DTR high. It then forks a daemon and exits, leaving the
  daemon running. The powerd daemon can be in one of three states:


     State 0 - POWER IS GOOD
        In this state powerd reads the serial port every T0_SLEEP
        seconds (see the #define lines at the beginning of the code).
        If DCD drops, powerd switches to state 1. If CTS drops powerd
        switches to state 2 (this shouldn't happen without DCD dropping
        before, but I decided to stay on the safe side).


     State 1 - POWER FAILURE
        A power failure was detected. DCD is low and powerd reads the
        UPS port every T1_SLEEP seconds. If DCD becomes high, it
        switches to state 0. If CTS drops, it switches to state 2.


     State 2 - POWER CRITICAL
        UPS batteries are low. The powerd daemon will remain in this
        state.

  Each time powerd changes state, it notifies the init process, so that
  the appropriate action can be taken. These events are logged using the
  system logging facility.

  If DSR is low there must be something wrong with the cable.  Powerd
  keeps monitoring the DSR line, and every two minutes sends a warning
  message to the system logging facility.



  8.3.2.3.  Running powerd

  The powerd daemon should be launched from the system initialization
  scripts, during system startup. I added the following lines to my
  /etc/rc.d/rc.local script:



       # Add support for the UPS
       echo "Starting powerd daemon..."
       rm -f /etc/turnUPSoff
       stty -crtscts speed 75 < /dev/cua3 > /dev/null
       if [ -x /usr/sbin/powerd ]; then
               /usr/sbin/powerd /dev/cua3
       fi



  First we remove (if present) the file /etc/turnUPSoff.  This file is
  used by the system shutdown script (/etc/rc.d/rc.0, in my case) to
  decide whether we want to turn the UPS off.  See later in this
  document for more information.

  Then we disable hardware flow control on the serial device connected
  to the UPS, and set its baud rate to 75.  Now we're confident that the
  TX signal will stay high for a time long enough to turn the UPS off,
  if we send a character to the serial port (again, see later).

  Finally we launch the powerd daemon, specifying the serial port to
  monitor. Notice that we're not going to read characters from the
  serial device, so don't worry if you have interrupt conflicts -
  they'll do no harm.



  8.3.3.  The inittab file and the shutdown scripts

  The powerd process is now running, and it will send signals to init
  whenever a power failure occurs. Now we have to configure the system
  so that it can react in a useful way when those signals are received.



  8.3.3.1.  Modifying inittab

  Add the following lines near the beginning of your /etc/inittab file:



       # What to do when power fails (delayed shutdown).
       pf::powerfail:/etc/powerfail_script

       # If power is back before shutdown, cancel the running shutdown.
       pg::powerokwait:/etc/powerokay_script

       # If UPS batteries are getting low, do an immediate shutdown.
       pc::powerfailnow:/etc/powerfailnow_script



  8.3.3.2.  The scripts

  The scripts powerfail_script, powerokay_script and powerfailnow_script
  are executed when init receives the corresponding signal. They have
  the responsibility of shutting down the system in a clean way or
  cancelling a running shutdown in case power comes back.  These are the
  scripts I'm currently using:

  /etc/powerfail_script:



       #!/bin/sh
       /bin/sync
       /usr/bin/sleep 10m
       kill -9 `ps auxw | grep "shutdown" | grep -v grep | awk '{print $2}'`
       > /etc/turnUPSoff
       /sbin/shutdown -t30 -h +3 "POWER FAILURE"



  My Trust Energy Protector 400 powers only the computer, so I have
  quite a long backup time. Since power failures only last for some
  minutes in my zone, the system responds to a blackout in the following
  way: it waits for 10 minutes (usually the power comes back before) and
  then halts the system, allowing the users to close their applications
  and leave the machine. Before issuing the shutdown command, I make
  sure that there are no running shutdowns. I also create the file
  /etc/turnUPSoff, so that the system will turn off the UPS.

  /etc/powerokay_script:

       #!/bin/sh
       kill `ps auxw | grep "powerfail_script" | grep -v grep | awk '{print $2}'`
       kill -9 `ps auxw | grep "shutdown" | grep -v grep | awk '{print $2}'`
       rm -f /etc/turnUPSoff



  If power comes back, we kills the running powerfail_script and any
  running shutdown. We also remove /etc/turnUPSoff.

  /etc/powerfailnow_script:



       #!/bin/sh
       kill -9 `ps auxw | grep "shutdown" | grep -v grep | awk '{print $2}'`
       > /etc/turnUPSoff
       /sbin/shutdown -h now "UPS batteries low. IMMEDIATE SHUTDOWN."



  If batteries are getting low, we make sure that there are no running
  shutdowns, create the /etc/turnUPSoff file and then shutdown the
  system immediately.



  8.3.3.3.  The system shutdown script

  When system shutdown is complete, we can turn off the UPS raising the
  TX signal of the serial port for over 1ms.  The serial device is
  already properly configured (see the stty command in the rc.local
  script). If the file /etc/turnUPSoff is present, we send the byte 0xff
  (all '1' bits) to the serial port.

  To do this, add the following lines near the bottom of your system
  shutdown script (/etc/rc.d/rc.0, in my case).  The proper place
  depends on the way your system is configured, but it should be okay to
  insert the lines before the echo command which prints the "System is
  halted" message.



       # Is this a powerfail situation?
       if [ -f /etc/turnUPSoff ]; then
         echo "Turning off UPS. Bye."
         sleep 5
         echo -e "\377" > /dev/cua3
         exit 1
       fi



  8.3.4.  General remarks

  This document contains things I learned while trying to configure *my*
  Linux system to use the Trust Energy Protector 400.  Some informations
  (the path of the system inizialization scripts, for example) may be
  specific to my system, and you probably will need some customization.
  However, I hope this document will be a useful trace for those trying
  to use a Trust Energy Protector 400/650 under Linux. If you experience
  difficulties, look for general information in the rest of this UPS-
  Howto.  Good luck!



  8.3.4.1.  Feedback

  I would greatly appreciate receiving feedback about this document, so
  that I can polish it and correct possible mistakes (I know the English
  is not very good, but I'm Italian after all!).  Direct any
  comments/suggestions/critics to the following e-mail address:

  ciro@stud.unipg.it

  If you have problems using Trust Energy Protector 400/650 under Linux,
  feel free to contact me.  I'll try to help you.



  8.3.4.2.  Legal Issues

  I have no relation at all with Trust Networking Products.

  The information contained in this document comes "as is".  Use it at
  your own risk. I can't be held responsible for any damage or loss of
  data resulting from the use of the code and information given here.


  Ciro Cattuto


  -----

  8.3.5.  Appendix A  -  Source code for the powerd daemon

  powerd.c:



  /*
   * powerd       Catch power failure signals from
   *              a Trust Energy Protector 400/650
   *              and notify init
   *
   * Usage:       powerd /dev/cua3 (or any other serial device)
   *
   * Author:      Ciro Cattuto <ciro@stud.unipg.it>
   *
   * Version 1.0 - 31 March 1997
   *
   * This code is heavily based on the original powerd.c code
   * by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License
   * as published by the Free Software Foundation; either version
   * 2 of the License, or (at your option) any later version.
   *
   */

  /* state 0 - power is good */
  #define T0_SLEEP        10      /* interval between port reads, in seconds */
  #define T0_DCD          3       /* number of seconds DCD has to be high
                                     to cause an action                      */
  #define T0_CTS          3       /* number of seconds CTS has to be high
                                     to cause an action                      */
  /* state 1 - power is failing */
  #define T1_SLEEP        2       /* interval between ports reads            */
  #define T1_DCD          3       /* same as T0_DCD                          */
  #define T1_CTS          3       /* same as T0_CTS                          */

  #define DSR_SLEEP       2
  #define DSR_TRIES       60

  /* Use the new way of communicating with init. */
  #define NEWINIT

  #include <sys/types.h>
  #include <sys/stat.h>
  #include <sys/ioctl.h>
  #include <fcntl.h>
  #include <errno.h>
  #include <stdlib.h>
  #include <unistd.h>
  #include <stdio.h>
  #include <signal.h>
  #include <syslog.h>
  #include <string.h>
  #include "paths.h"
  #ifdef NEWINIT
  #include "initreq.h"
  #endif

  #ifndef SIGPWR
  #  define SIGPWR SIGUSR1
  #endif

  #ifdef NEWINIT
  void alrm_handler()
  {
  }
  #endif

  /* Tell init that the power has gone (1), is back (0),
     or the UPS batteries are low (2). */
  void powerfail(int event)
  {
    int fd;
  #ifdef NEWINIT
    struct init_request req;

    /* Fill out the request struct. */
    memset(&req, 0, sizeof(req));
    req.magic = INIT_MAGIC;
    switch (event)
          {
          case 0:
                  req.cmd = INIT_CMD_POWEROK;
                  break;
          case 1:
                  req.cmd = INIT_CMD_POWERFAIL;
                  break;
          case 2:
          default:
                  req.cmd = INIT_CMD_POWERFAILNOW;
          }

    /* Open the fifo (with timeout) */
    signal(SIGALRM, alrm_handler);
    alarm(3);
    if ((fd = open(INIT_FIFO, O_WRONLY)) >= 0
                  && write(fd, &req, sizeof(req)) == sizeof(req)) {
          close(fd);
          return;
    }
    /* Fall through to the old method.. */
  #endif

    /* Create an info file for init. */
    unlink(PWRSTAT);
    if ((fd = open(PWRSTAT, O_CREAT|O_WRONLY, 0644)) >= 0) {
    switch (event)
          {
          case 0:
                  write(fd, "OK\n", 3);
                  break;

          case 1:
                  write(fd, "FAIL\n", 5);
                  break;

          case 2:
          default:
                  write(fd, "LOW\n", 4);
                  break;
          }
    close(fd);
    }

    kill(1, SIGPWR);
  }

  /* Main program. */
  int main(int argc, char *argv[])
  {
    int fd;
    int dtr_bit = TIOCM_DTR;
    int flags;
    int DCD, CTS;
    int status = -1;
    int DCD_count = 0, CTS_count = 0;
    int tries;

    if (argc < 2) {
          fprintf(stderr, "Usage: powerd <device>\n");
          exit(1);
    }

    /* Start syslog. */
    openlog("powerd", LOG_CONS|LOG_PERROR, LOG_DAEMON);

    /* Open monitor device. */
    if ((fd = open(argv[1], O_RDWR | O_NDELAY)) < 0) {
          syslog(LOG_ERR, "%s: %s", argv[1], sys_errlist[errno]);
          closelog();
          exit(1);
    }

    /* Line is opened, so DTR is high. Force it anyway to be sure. */
    ioctl(fd, TIOCMBIS, &dtr_bit);

    /* Daemonize. */
    switch(fork()) {
          case 0: /* Child */
                  closelog();
                  setsid();
                  break;
          case -1: /* Error */
                  syslog(LOG_ERR, "can't fork.");
                  closelog();
                  exit(1);
          default: /* Parent */
                  closelog();
                  exit(0);
    }

    /* Restart syslog. */
    openlog("powerd", LOG_CONS, LOG_DAEMON);

    /* Now sample the DCD line. */
    while(1) {
          /* Get the status. */
          ioctl(fd, TIOCMGET, &flags);

          /* Check the connection: DSR should be high. */
          tries = 0;
          while((flags & TIOCM_DSR) == 0) {
                  /* Keep on trying, and warn every two minutes. */
                  if ((tries % DSR_TRIES) == 0)
                      syslog(LOG_ALERT, "UPS connection error");
                  sleep(DSR_SLEEP);
                  tries++;
                  ioctl(fd, TIOCMGET, &flags);
          }
          if (tries > 0)
                  syslog(LOG_ALERT, "UPS connection OK");

          /* Calculate present status. */
          DCD = flags & TIOCM_CAR;
          CTS = flags & TIOCM_CTS;

          if (status == -1)
                  {
                  status = (DCD != 0) ? 0 : 1;
                  if (DCD == 0)
                          {
                          syslog(LOG_ALERT, "Power Failure. UPS active.");
                          powerfail(1);
                          }
                  }

          switch (status)
                  {
                  case 0:
                          if ((DCD != 0) && (CTS != 0))
                                  {
                                  DCD_count = 0;
                                  CTS_count = 0;
                                  sleep(T0_SLEEP);
                                  continue;
                                  }
                          if (DCD == 0)
                                  DCD_count++;
                          if (CTS == 0)
                                  CTS_count++;
                          if ((DCD_count < T0_DCD) && (CTS_count < T0_CTS))
                                  {
                                  sleep(1);
                                  continue;
                                  }
                          if (CTS_count == T0_CTS)
                                  {
                                  status = 2;
                                  syslog(LOG_ALERT, "UPS batteries low!");
                                  break;
                                  }
                          status = 1;
                          DCD_count = 0;
                          syslog(LOG_ALERT, "Power Failure. UPS active.");
                          break;

                  case 1:
                          if ((DCD == 0) && (CTS != 0))
                                  {
                                  DCD_count = 0;
                                  CTS_count = 0;
                                  sleep(T1_SLEEP);
                                  continue;
                                  }
                          if (DCD != 0)
                                  DCD_count++;
                          if (CTS == 0)
                                  CTS_count++;
                          if ((DCD_count < T1_DCD) && (CTS_count < T1_CTS))
                                  {
                                  sleep(1);
                                  continue;
                                  }
                          if (CTS_count == T1_CTS)
                                  {
                                  status = 2;
                                  syslog(LOG_ALERT, "UPS batteries low!");
                                  break;
                                  }
                          status = 0;
                          DCD_count = 0;
                          CTS_count = 0;
                          syslog(LOG_ALERT, "Power okay.");
                          break;

                  case 2:
                          sleep(1);
                          continue;
                  default:
                          break;
                  }

          powerfail(status);
    }
    /* Never happens */
    return(0);
  }



  8.4.  Trust UPS 400-A

  I received a submission about the Trust UPS 400-A.  I don't know if
  it's the same as the Trust Energy Protector 400, so I'm including the
  submission.



  From: "Marcel Ammerlaan" <marcel@ch.twi.tudelft.nl>
  To: hjstein@math.huji.ac.il
  Subject: UPS addition
  Date: Wed, 16 Jul 1997 01:17:11 +100

  Hello Harvey,

  I've got an addition to your UPS Howto. I've got a
  "Trust UPS 400-A" which isn't listed. This product doesn't seem
  to be manufactured anymore by it's producer (www.trust.box.nl).
  But that doesn't mean it's not available anymore, I've got mine
  really cheap just a month ago. Also this company just relabels
  products so maybe there are others that have got the same UPS.

  I have included a picture of the UPS in case anybody got such a beast
  under another label.

  The cable was easily constructed based on the original powerd cable
  and the documentation from trust.
  It clearly describes which pins of the D-shell connector of the UPS
  carry which signal.

  It extends the original design with 2 extra functions:
  1) Battery low indication
  2) Power down UPS

  The cable I created looks like (see the other attachement).

  This cable has been tested with powergend by Tom Webster and did work
  completely (although your milage may vary).

  Type:               "pleur"
  Cable Power:        {TIOCM_DTR,0}
  Inverter Kill:      {TIOCM_RTS,1}
  Inverter Kill Time: 5
  Power Check:        {TIOCM_CTS,0}
  Battery Check:      {TIOCM_CAR,0}
  Cable Check:        {TIOCM_RI,0}

  Although (just as the powerd cable) the cable check function isn't
  used because the UPS doesn't seem to support it.

  Well that's about it I guess. If you need more information about the
  UPS the cable or the software feel free to contact me.

  And remember, everything described here works for me but I don't
  guarantee it will for you.

  Marcel Ammerlaan
  CEO Pleursoft (explains the cablename doesn't it :-)
  The Netherlands

  <RSA implemented in 3 lines of perl deleted by the editor ;)>

  Marcel Ammerlaan   | <m.j.ammerlaan@twi.tudelft.nl>
  Paardenmarkt 78    | Just another nerd on the loose
  2611 PD Delft      |
  The Netherlands    |



  8.5.  Sustainer S-40a

  Information on the Sustainer S-40a.



  From: fnevgeny@plasma-gate.weizmann.ac.il (Evgeny Stambulchik)
  To: hjstein@math.huji.ac.il, hjstein@math.huji.ac.il, hjstein@math.huji.ac.il,
          hjstein@math.huji.ac.il
  Subject: UPS-HowTo add-ons
  Date: Sun, 10 Sep 1995 13:09:50 +0300 (IST)

  Hi Harvey,

  This is an addition to your UPS-HowTo. I'm using Sustainer S-40a UPS for a few
  months with unipower package (now it's called genpower) and home-made cable
  constructed as follows (I've sent all this stuff to Tom Webster, author of the
  package, too, and it should appear in the next version):

           UPS SIDE                                   LINUX SIDE


                 2 POWER FAIL                             1(8)
     +-----------o-------------------------+----------------o  DCD
     |                                     |
     o                                     |
      /                                    |
     /                                     |
     |           4 COMMON                  |              5(7)
     +-----------o------+------------------|----------------o  GND
     |                  |                  |
     \                  |                  |
      \                 |                  |
     o                  |                  |
     |           5 BATT | LOW              |              8(5)
     +-----------o------|------------------|--------+-------o  CTS
                        |                  |        |
                        |                +-+-+    +-+-+
                        |                |   |    |   |
                        |    3 resistors |   |    |   |
                        |                |   |    |   |
                        |    by 10 kOhm  |   |    |   |
                        |                +-+-+    +-+-+
                        |                  |        |     4(20)
                        |                  +--------+-------o  DTR
                        |
  |              6 SHUT | DOWN              +-------+     7(4)
  +-+       +----o------|-------------------+       +-------o  RTS
    \       |           |                   +-------+
     \|    -+-          |
      | <- \ /          |
     /|    -+-          |
    /       |    7      |
    |       +----o------+
  --+--
   ---
    -


  NOTE!!!: Shutdown pins in the tech info supplied with UPS (4 and 6) are given
  incorrectly! The valid ones are 6 and 7, as shown above.
  Note2: Pin numbers on the PC side in the brackets are for 25-pin connector,
  outside - for 9-pin one.


  Here's the unipowerd.h file I used:


  /************************************************************************/
  /* File Name            : unipowerd.h                                   */
  /* Program Name         : unipowerd                   Version: 1.0.0    */
  /* Author               : Tom Webster <webster@kaiwan.com>              */
  /* Created              : 1994/04/20                                    */
  /* Last Modified By     : Tom Webster                 Date: 1995/04/09  */
  /* Last Modified By     : Evgeny Stambulchik (for Sustainer UPS)        */
  /*                                                                      */
  /* Compiler (created)   : GCC 2.5.8                                     */
  /* Compiler (env)       : Linux 1.0.9                                   */
  /* ANSI C Compatable    : No                                            */
  /* POSIX Compatable     : Yes?                                          */
  /*                                                                      */
  /* Purpose              : Header file for unipowerd.                    */
  /*                      : Contains the configuration information for    */
  /*                      : unipowerd.  Edit this file as indicated       */
  /*                      : below to activate features and to customize   */
  /*                      : unipowerd for your UPS.                       */
  /*                                                                      */
  /* Copyright            : GNU Copyleft                                  */
  /************************************************************************/

  /* The following are the RS232 control lines      */
  /*                                                */
  /*                                            D D */
  /*                                            T C */
  /* Macro           English                    E E */
  /* ---------------------------------------------- */
  /* TIOCM_DTR       DTR - Data Terminal Ready  --> */
  /* TIOCM_RTS       RTS - Ready to send        --> */
  /* TIOCM_CTS       CTS - Clear To Send        <-- */
  /* TIOCM_CAR       DCD - Data Carrier Detect  <-- */
  /* TIOCM_RNG       RI  - Ring Indicator       <-- */
  /* TIOCM_DSR       DSR - Data Signal Ready    <-- */

  #define HIGH            (1)
  #define LOW             0
  #define PWRSTAT         "/etc/powerstatus"
  #define UPSSTAT         "/etc/upsstatus"

  /* CABLEPOWER is the line which provides power to */
  /* the cable for normal monitoring activities.    */
  #define CABLEPOWER      TIOCM_DTR

  #define POWERBIT        TIOCM_CAR
  #define POWEROK         HIGH

  /* Define CABLECHECK as 1 to check for low battery */
  /* Define CABLECHECK as 0 value to skip            */
  #define CABLECHECK      0
  #define CABLEBIT        TIOCM_RNG
  #define CABLEOK         HIGH

  /* Define BATTCHECK as 1 to check for low battery  */
  /* Define BATTCHECK as 0 value to skip.            */
  #define BATTCHECK       1
  #define BATTBIT         TIOCM_CTS
  #define BATTOK          HIGH

  /* Define INVERTERKILL as 1 to hndle killing the inverter */
  /* Define INVERTERKILL as 0 value to skip.                */
  /* INVERTERBIT is the line which will kill the inverter   */
  /*    while the UPS is in powerfail mode.                 */
  /* INVERTERTIME is the time in seconds to hold the line   */
  /*    defiined by INVERTERBIT high to kill the inverter.  */
  #define INVERTERKILL    1
  #define INVERTERBIT     TIOCM_RTS
  #define INVERTERTIME    5

  /************************************************************************/
  /* End of File unipowerd.h                                              */
  /************************************************************************/

  I'm aware that current name of the package is genpower. I haven't try it yet as
  see no reason to switch to the new version meantime; the former seems to work
  very stable. Nevertheless, here is the add-on for genpower-1.0.1's genpowerd.h
  file (hopefully, I "translated" unipowerd.h correctly):
  Add-on for genpower-1.0.1's genpowerd.h file:

  /* Evgeny's Sustainer S-40A */
   {"sustainer",   {TIOCM_DTR,0}, {TIOCM_RTS,1},  5, {TIOCM_CAR,0}, {TIOCM_CTS,0},
  {0,0}}


  Evgeny



  8.6.  Systel

  Another Israeli company.  I never ended up purchasing a UPS from them,
  but they were very good about getting me detailed documentation on
  their communication port.  It should be easy enough to control their
  UPS.  Their phone number is 972-8-409-019 (972-8-407-216 for fax).


  8.7.  Deltec Power, Fiskars Power Systems and Exide.

  Fiskars <http://www.fiskars.fi/> is a Finnish holding company.  They
  used to own Deltec Power <http://www.deltecpower.com>.  In March of
  1996 Fiskars sold Deltec Power to Exide Electronics Group
  <http://www.exide.com/exide>.  At that time, Deltec Power was one of
  the world's largest makers of UPSs.

  Under Fiskars, Deltec used to make the PowerServers 10, 20, 30, and
  40.  The Deltec Power home page mentions other UPSs.

  Exide now bundles UPS control software with their UPSs that works
  under Linux.  They also sell the software separately.  They say that
  their software works with other UPSs too.

  I'd like to hear from people using their software.

  Here's the advertisement they emailed me:

  Exide Electronics announces LanSafe III UPS Power Management Software
  for Linux.

  LanSafe III is a UPS Power Management application. It provides
  automatic orderly shutdown functionality incase of an extended power
  failure that should outlast the UPS battery run time.

  LanSafe III enables broadcast messages and e-mail to be sent according
  to user defined power condition changes. The shutdown procedure can
  also be customized.

  LanSafe III works together with the vast majority of all Exide
  Electronics UPS models. It goes even one step further by supporting
  basic shutdown functionality also with other manufacturers UPSs.

  LanSafe III for Linux runs on Intel based Linux systems. Both
  character based and X11/Motif based user interfaces are provided.

  LanSafe III supports all the major OS platforms: Linux, IBM AIX, HP
  UX, Digital UNIX, SCO UNIX, Solaris, SunOS, AT&T UNIX, all Windows
  platforms, OS/2, Novell and Macintosh among others.

  LanSafe III is bundled with the following Exide Electronics UPSs:
  OneUPS Plus, NetUPS, PowerWare Prestige, PowerWare Profile, PowerWare
  Plus 5xx.

  It also ships with FPS Power Systems UPSs: PowerRite Plus, PowerRite
  Max, PowerWorks A30, PowerWorks A40, Series 9000 and Series 10000.

  It is also possible to purchase a separate software license to use
  with a previous UPS model or an other manufactures UPS. Regular
  licenses are S$149, with site licenses also available.

  For details please visit our Web sites at www.exide.com,
  www.fiskarsUPS.com and www.deltecpower.com.

  Incidentally, when I tried to connect to www.fiskarsUPS.com, it
  prompted me for a username and password.



  8.8.  Beaver model UB500 UPS

  dan@fch.wimsey.bc.ca (Dan Fandrich) writes:


  I seem to have gotten my old Beaver model UB500 UPS working with
  genpower.  The interface uses RS-232 compatible voltage levels, so
  installing it is a snap.  There is a DE-9 female connector on the back
  which plugs directly into a 9-pin PC serial port using a plain 9-pin
  video monitor extension cable.


  The DIP switches allow quite versatile pinouts.  To emulate genpower's
  apc1-nt type of UPS, they must be set as follows:

           |   |       |                       |   |   |   |   |
           |1  |  on   |  (CTS = power fail)   |   |   |   |   |
           |2  |  off  |  (CTS = low battery)  |   |   |   |   |
           |3  |  off  |  (DSR = power fail)   |   |   |   |   |
           |4  |  off  |  (DSR = low battery)  |   |   |   |   |
           |5  |  off  |  (CD = power fail)    |   |   |   |   |
           |6  |  on   |  (CD = low battery)   |   |   |   |   |
           |7  |  off  |  (RI = power fail)    |   |   |   |   |
           |8  |  off  |  (RI = low battery)   |   |   |   |   |
           |9  |  on   |  (DTR = inverter off) |   |   |   |   |
           |10 |  off  |  (RTS = inverter off) |   |   |   |   |


               DIP switch SW601 for Beaver model UB500 UPS.

  The switches form groups of adjacent pairs for each output pin.  They
  are mutually exclusive--don't try to turn on both switch 5 and 6
  simultaneously, for example, or you'll be shorting the low battery and
  power fail signals.

  That's all there is to it.  Feel free to add this do your
  documentation.



  8.9.  Sendom

  Documentation on using the Sendom UPS.



       From: charli <mefistos@impsat1.com.ar>
       To: hjstein@math.huji.ac.il
       Subject: ups howto contribution
       Date: Wed, 13 Nov 1996 19:07:41 -0200

       hjstein@math.huji.ac.il


       sir:

       i connected a sendom ups with the help of your UPS-howto and man powerd
       and discovered something useful. perhaps this thing extends to some
       other ups.
       im using slackware 3.0 distribution. i has the soft configuration in
       /etc/inittab already done. its only needed to add the /rc.local powerd
       /cuaX


       i used the man powerd diagram:
               9pin    25pin

       DTR     4       20      ---------
                                |      >
       DSR     6       6       --      < 10k
                                       >
       DCD     1       8       -------------------------
                                                       relais
       GND     5       7       -------------------------


       the fact is that the sendom ups dont use relais but some electronic
       solid state device, and it works one way BUT NO THE OTHER. so if you
       make the cable and doesnt work, first try inverting the cable in the
       ups "relais"

       i hope this can be useful, if you want to include this somewhere, feel
       free to correct my english. please aknowledge this mail even with an
       empty
       mail so i know it arrived
       end



  8.10.  Best


  Information on Best UPSs is available on at the Best Power
  <http://www.bestpower.com/index.html> website.  Their website includes
  the checkups.tar (section ``Software'') package for communicating with
  Best UPSs, both in smart mode and in dumb mode, and it includes source
  code, so you can compile it under Linux.



  8.10.1.  Best Fortress - Using Best's software


  Linux Best Power UPS Mini-HOWTO by Michael Stutz (stutz@dsl.org, and
  http://dsl.org/m/) v1.0, 14 Aug 97


  0.0 Disclaimer

  Copyright 1997 by Michael Stutz; this information is free; it may be
  redistributed and/or modified under the terms of the GNU General
  Public License, either Version 2 of the License, or (at your
  preference) any later version, and as long as this sentence remains;
  this information comes WITHOUT ANY WARRANTY; without even the implied
  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE; see
  the GNU General Public License for more details.


  1.0 Introduction

  Best Power <http://www.bestpower.com> are the makers of high quality
  UPS products, with their Fortress line in particular being well-suited
  for typical Linux users. Although their products are not currently
  priced as low as some (such as APC), Best Power provide source code
  for their UPS software and have been very respondent to queries from
  Linux users.  Furthermore, their hardware seems to be highly regarded,
  making Best Power a winning choice for Linux users.

  This document describes the installation of a Best Power Fortress UPS
  (model used was a 1996-model 660a with accompanying Best Power CD-ROM)
  to a Linux box.


  2.0 Installation


  2.1 Hardware

  Install the hardware as indicated in the instructions. The Best Power
  ``Fortress'' series comes with an RS-232 cable that should attach to a
  spare serial port on the back of the computer.


  2.2 Software

  This is where it differs from the manual, which does not currently
  have Linux-specific instructions. The accompanying Fortress CD-ROM,
  however, does come with source code for the UPS software, so getting
  it up and running on a Linux system is a trivial task.

  To do this, follow these steps, and use the manual as a reference to
  get an overall feel for how the software works. I took the liberty of
  making a few changes in this HOWTO from the way the Fortress software
  is set up on other UNIX systems that I feel are better suited for a
  Linux system.  For example, I eliminated the need for an /etc/best
  directory and put the executables in /usr/local/sbin, which I feel is
  a more appropriate place.


  o  First, create the "upsdown" script that is executed during a power
     outage. This one will halt the system:



  cat > /etc/upsdown << EOF
  #!/bin/sh
  shutdown -h now < /dev/console &
  EOF



  o  Now, make directories for the documentation and the source code:



       mkdir /usr/doc/best
       mkdir /usr/local/src/best



  o  Mount the CD-ROM, and untar the unix/checkups.tar file into the
     /tmp directory or somewhere similar:



       cd /tmp
       tar /cdrom/unix/checkups.tar



  o  Change into the etc/best/advanced directory that should have been
     extracted from the checkups tarball.

  o  Copy the documentation and UPS script files to their proper place
     in the sytem:



       cp README /usr/doc/best
       cp manual.txt /usr/doc/best
       cp bestsend /etc
       cp source/*.c /usr/local/src/best



  o  Clean up the /tmp mess and compile the software:



       cd /usr/local/src/best
       rm -R /tmp/etc
       gcc -o checkups checkups.c
       gcc -o mftalk mftalk.c
       mv checkups /usr/local/sbin
       mv mftalk /usr/local/sbin



  o  Test the UPS. Replace ttySx with the serial port of your choice. If
     you have a good connection, you should see a row of characters
     print across the screen:



       mftalk /dev/ttySx



  o  Make the checkups program run at startup for testing. This can be
     done in several different ways (described in the manual).  The way
     I did it is by adding this line to /etc/inittab:



       ups:234:once:/usr/local/sbin/checkups -c500 /dev/ttyS1



  o  Test it. Do this by taking out power to UPS by pulling out the fuse
     connected to the UPS, and wait a couple of minutes. It print a
     warning messages and then halt the system after a few mintues.

  o  If that works, take out the "-c500" from the line in your inittab
     (which basically means shut down the system right away instead of
     when the UPS power runs out), and you're good to go!

  3.0 Conclusions

  I welcome suggestions for improving this document or the techniques
  described herein. As of this writing, Best Power seemed interested in
  including this or other information in their documentation to help
  Linux users with their product, so this is definitely a company to
  support. Let them know how you feel at sales@bestpower.com and
  support@bestpower.com.


  8.10.2.  Best Fortress LI-950

  Some comments on the Best Fortress.



  From lnz@dandelion.com Wed May 31 19:53:09 1995
  Newsgroups: comp.os.linux.hardware
  Subject: Re: UPS for use with Linux?
  From: Leonard N. Zubkoff <lnz@dandelion.com>
  Date: 25 May 1995 16:27:55 -0700
  Organization: Dandelion Digital
  NNTP-Posting-Host: dandelion.com
  NNTP-Posting-User: root
  In-reply-to: nautix@community.net's message of 23 May 1995 09:41:40 -0700

  In article <3pt384$sic@odin.community.net> nautix@community.net writes:

    Ditto what Craig says.  APC was very uncooperative, but I have only
    good things to say about Best.  I use their Fortress LI 660 model;
    660 VA, lots of status features on the front, etc.  The CheckUPS
    software costs extra and needs some hacking to fit into my
    FSSTND-ish file system (the directories and file names are hard-coded
    to fit into SunOS 4.1.x).  I'd be happy to send you my diffs, if
    you want them.  (I love it when a vendor ships the source as
    a normal business practice!)

    The CheckUPS software is limited to doing automagic shutdowns, though.
    The UPS can give lots of status information; CheckUPS only asks for
    ``If the power has failed, how much battery time remains?''

    Best follows up on their customer satisfaction cards, too.
    I indicated that I was dissappointed that CheckUPS didn't do more
    status reporting (like input voltage, output voltage, percent load,
    etc.), which is available from the UPS.  I asked for a the
    spec on the interface lingo; they said ``sure'' and had it to me in
    2 days, free.  A full-featured UPS status checker is on my back burner.
    Does anyone see a demand for such a utility?

  Let me add yet another recommendation for Best Power.  I just purchased a
  Fortress LI-950, though I declined on the CheckUPS software.  Unlike some
  other brands, a simple three wire cable is all that's needed to connect the
  Fortress to a serial port -- no need for pull-up circuitry in the cabling.
  A few minutes hacking and I had program to act as both a shutdown monitor
  daemon, and to kill the inverter output when the system is shutdown while
  on battery power.

  I may eventually want to use the smarter serial communication mode rather
  than the simple contact mode, so I asked Best technical support for the
  documentation, and it arrived today, a week after I called them.  Once I
  peruse the documentation I'll decide if a smarter interface is really
  worthwhile, especially since at some point I'll need to shut down two
  networked machines sharing the UPS.

                  Leonard



  8.10.3.  Best Ferrups

  In addition to the doumentation and softare on Best's web site, you
  could also use the bestups-0.9.tar.gz (section ``Software'') package.
  We've just started testing it with our 5kva FERRUPS.

  The basic idea is that there are two modules.  One which fields
  information requests on a network port, relays those requests to the
  UPS, and returns the results.  The second module talks to the first,
  interprets the results, and responds with either OK or FAIL.

  This is sufficient to allow the powerd-2.0.tar.gz package (section
  ``Software'') to do the rest of the work.

  The details can be gotten from the bestups-0.9.tar.gz package (section
  ``Software'').

  Incidentally, our 5kva Ferrups has performed flawlessly in keeping our
  10 computers and 30 screens humming.



  8.11.  GPS1000 from ACCODATA



     >From hennus@sky.nl.mugnet.org Thu Mar 10 15:10:22 1994
     Newsgroups: comp.os.linux.help
     Subject: Re: auto-shutdown with UPS
     From: hennus@sky.nl.mugnet.org (Hennus Bergman)
     Date: Tue, 1 Mar 1994 22:17:45 GMT
     Distribution: world
     Organization: The Organization For Removal Of On-Screen Logos

     In article <CRAFFERT.94Feb28125452@nostril.lehman.com>,
     Colin Owen Rafferty <craffert@nostril.lehman.com> wrote:
     >I am about to buy an Uninterruptable Power Supply for my machine, and
     >I would like to get one that has the "auto-shutdown" feature.
     >
     I just got one of those real cheap :-)
     It's a GPS1000 by ACCODATA. Anybody know how good the output
     signal of these things is? [Don't have a scope myself :-(]

     >I assume that these each have some kind of serial connection that
     >tells the system information about it.
     >
     I took it apart to find out how it worked. There were three optocouplers
     (two output, one input) connected to a 9 pin connector at the back.
     One turns on when the power fails, and goes off again when the power
     returns. While the power is off, you can use the `input' to shut the
     battery off. [It releases the power-relay.] The third one is some kind
     of feedback to tell that it did accepted the `shut-down command'.
     I think the interface for my UPS was designed to be connected to TTL-level
     signals, but with some resistors it could be connected to serial port.
     It's wired in such a way that using a RS-232 port you cannot use both
     output optocouplers; but the shutdown feedback is not necessary anyway,
     just use the important one. ;-)
     [Note that it is possible to blow the transistor part in optocouplers
     with RS-232 levels if you wire it the wrong way round ;-)]

     I was hoping I would be able to connect it to my unused game port,
     but that doesn't have an output, does it?
     I'll probably end up getting an extra printer port for this.

     Not all UPS' use optocouplers, some use simple relays, which are
     less critical to connect, but of course not as `nice'.

     >Has anyone written a package that watches the UPS and does a shutdown
     >(or something) when the power is off?
     SysVinit-2.4 (and probably 2.5 as well) has a `powerd' daemon that
     continually watches a serial port for presence of the CD (Carrier
     Detect) line and signals init when it drops. Init then activates
     shutdown with a time delay. If the power returns within a few minutes
     the shutdown is cancelled. Very Nice.
     The only problem I had with it is that it doesn't actually tell the
     UPS to turn off when the shutdown is complete. It just sits there with
     a root prompt. I'll probably write a small program to shut it down
     >from /etc/brc. RSN.

     >    Colin Rafferty, Lehman Brothers <craffert@lehman.com>

     Hennus Bergman



  8.12.  TrippLite BC750LAN (Standby UPS)

  Tom Webster (webster@kaiwan.com, the author of the genpower package)
  sent me information on the TrippLite BC750LAN.  If you have one of
  these, your probably best off using his package.
  But, for completeness, here's his cable wiring diagram (done by trial
  and error, and without documentation):



                 UPS                System
                DB-25               DB-25
                  1 <-------------->  1       Ground

                  2 <-------------->  4       Power Fail
                  8 <-------------->  8       Sensing Circuit

                  3 <-------------->  2       Inverter Shutdown
                 20 <--------------> 22       Circuit



  8.13.  APC

  If the above plethora of APC packages doesn't get you running, maybe
  the following sections will help.


  8.13.1.  APC Back-UPS

  There seems to be some controversy as to the accuracy of the
  information here on APC Back-UPSs.  So, please be careful.  I'm
  prefacing this section with one message of caution I received.  It
  might not make a lot of sense before the rest of this section is read,
  but this way, at least you're more likely to see it.  And again, since
  I don't have any APC UPS units, I can't verify the accuracy of either
  of these messages.


  8.13.1.1.  A message of caution



  From ind43@sun1000.ci.pwr.wroc.pl Sun Oct  9 11:00:42 1994
  Newsgroups: comp.os.linux.admin
  Subject: BUPS-HOWTO warning
  From: ind43@sun1000.ci.pwr.wroc.pl (Marek Michalkiewicz)
  Date: 6 Oct 1994 18:38:15 GMT
  Organization: Technical Univeristy of Wroclaw
  NNTP-Posting-Host: ci3ux.ci.pwr.wroc.pl
  X-Newsreader: TIN [version 1.2 PL2]

  If you want to connect the APC Back-UPS to your Linux box, this might
  be of interest to you.

  There is a good BUPS-HOWTO which describes how to do this. But it has
  one "bug".

  The RTS serial port signal is used to shut down the UPS. The UPS will
  shut down only if it operates from its battery. The manual says that
  the shutdown signal must be high for at least 0.5s. But few milliseconds
  is enough, at least for my APC Back-UPS 600.

  Using RTS to shut down the UPS can be dangerous, because the RTS goes
  high when the serial device is opened. The backupsd program then turns
  RTS off, but it is on (high) for a moment. This kills the power when
  backupsd is first started and there is a power failure at this time.
  This can happen for example when the UPS is shut down, unattended,
  and the power comes back for a while.

  Either start backupsd before mounting any filesystems for read-write,
  or (better) use TX (pin 3) instead of RTS (pin 7) to shut down the
  UPS (pin numbers are for 9-pin plug). Use ioctl(fd, TCSBRKP, 10);
  to make TX high for one second, for example. Using TX should be safe.
  Maybe I will post the diffs if time permits...

  -- Marek Michalkiewicz
  ind43@ci3ux.ci.pwr.wroc.pl



  8.13.1.2.  BUPS-HOWTO

  Luminated Software Group Presents

  HOWTO use Back-UPS (by APC) (to keep your linux box from frying)


  Version: 1.01  BETA



  Document by: Christian G. Holtje <docwhat@uiuc.edu> Cabling info and
  help: Ben Galliart <bgallia@orion.it.luc.edu>



  This document, under one condition, is placed in Public Domain. The
  one condition is that credit is given where credit is due.  Modify
  this as much as you want, just give some credit to us who worked.

  *******************************************************************************
  Warning!  I, nor any of us who have written or helped with this
  document, make and guarantees or claims for this text/source/hints.
  If anything is damaged, we take NO RESPONSIBILITY!  This works to the
  BEST OF OUR KNOWLEDGE, but we may have made mistakes.  So be careful!
  *******************************************************************************

  Al right, you just bought (or are going to buy) a Back-UPS from APC.
  (Other brands might be able to use this info, with little or no
  modification, but we don't know)  You've looked at the price of the
  Power-Chute software/cabling, and just are not sure it's worth the
  price.  Well, I made my own cable, and my own software and am using it
  to automatically shut off the power to my linux box when a power
  failure hits.  Guess what?  You can too!

  *** The Cable ***


  This was the hardest part to figure out (I know little about hardware,
  so Ben did the most work for this).  To build one, you need to buy
  from your local radio shack (or other part supplier) this stuff:



       1 9-Position Male D-Subminature Connector (solder-type)
               [Radio Shack cat. no. 276-1537c]
       1 9-Position Female D-Subminature Connector (solder-type)
               [Radio Shack cat. no. 276-1538c]
       2 casings for the above plugs (usually sold separately)
       Some stranded wire (wire made of strands, not solid wire)



  You also need, but may be able to borrow:


       1 soldering iron
       solder



  Okay...this is how you connect it up!

  These diagrams are looking into the REVERSE SIDE (the side where you
  solder the wire onto the plugs)  The letters G, R, and B represent the
  colors of the wires I used, and help to distinguish one line from the
  next.  (NOTE:  I'm use standard rs-232 (as near as we can tell)
  numbering.  The APC book uses different numbers.  Ignore them!  Use
  ours...I already changed the numbers for you!)



          ---------------------     Male Side! (This goes into the UPS)
           \  B   R  *  *  * /
             \  *  *  *  G  /
               ------------


          ---------------------     Female Side! (This goes into your COM port)
           \  R   *  *  *  G /
             \  *  B  *  *  /
               ------------



  For those who like the numbers better:

               Male            Female
       ---------------------------------------
               1               7               Black
               2               1               Red
               9               5               Green



  ---------Aside:  What the rs-232 pins are for!----------- Since we had
  to dig this info up anyway:

  >From the REAR (the soldering side) the pins are numbered so:



          ---------------------
           \  1   2  3  4  5 /
             \  6  7  8  9  /
               ------------



  The pins mean:



               Number  Name                    Abbr. (Sometimes written with D prefix)
               1       Carrier Detect          CD
               2       Receive Data            RD
               3       Transmit Data           TD(?)
               4       Data Terminal Ready     DTR
               5       Signal Ground           Gnd
               6       Data Set Ready          DSR
               7       Request to Send         RTS(?)
               8       Clear to Send           CS
               9       Ring Indicator          RI



  What we did is connect the UPS's RS-232 Line Fail Output to the CD,
  the UPS's chassis to Gnd, and the UPS's RS-232 Shut Down Input to RTS.
  Easy now that we told you, no?

  I have no idea if the software below will work, if you purchase the
  cable from APC.  It might, and it might not.


  *** The Software ***

  Okay, I use the SysVInit package by Miquel van Smoorenburg for Linux.
  (see end for file locations, credits, email addresses, etc.)  I don't
  know what would have to be changed to use someone elses init, but I
  know this code (following) will work with Miquel's stuff.  Just so I
  give credit where credit's due.  I looked at Miquel's code to figure
  out how ioctl()'s worked.  If I didn't have that example, I'd have
  been in trouble.  I also used the powerfail() routine (verbatim, I
  think), since it must interact with his init, I thought that he should
  know best.  The .c file is at the end of this document, and just needs
  to be clipped off.  To clip the file, edit away and extra '.sigs' and
  junk.  This document should end on the line /* End of File */.....cut
  the rest.


  This program can either be run as a daemon to check the status of the
  UPS and report it to init, or it can be run to send the kill-power
  command to the UPS.  The power will only be killed if there is a power
  problem, and the UPS is running off the battery.  Once the power is
  restored, it turns back on.

  To run as a daemon, just type: backupsd /dev/backups

  /dev/backups is a link to /dev/cua0 at the moment (COM 1, for you
  DOSers).  The niceness of the link is that I can just re-link the
  device if I change to com 2 or 3.

  Then, if the power dies init will run the commands for the powerwait.
  An example (This is from my /etc/inittab):



       #Here are the actions for powerfailure.
       pf::powerwait:/etc/rc.d/rc.power start
       po::powerokwait:/etc/rc.d/rc.power stop



  The powerwait will run, if the power goes down, and powerokwait will
  run if the power comes back up.


  Here is my entire rc.power:



       #! /bin/sh
       #
       # rc.power      This file is executed by init when there is a powerfailure.
       #
       # Version:      @(#)/etc/rc.d/rc.power   1.50    1994-08-10
       #
       # Author:       Christian Holtje, <docwhat@uiuc.edu>
       #

         # Set the path.
         PATH=/sbin:/etc:/bin:/usr/bin:/sbin/dangerous

         # Find out how we were called.
         case "$1" in
               start)
                       echo "Warning there is Power problems."      | wall
                       # Save current Run Level
                       ps | gawk '{ if (($5 == "init") && ($1 == "1")) print $6 }' \
                                | cut -f2 -d[ | cut -f1 -d] \
                                > /tmp/run.level.power
                       /sbin/shutdown -h +1m
                       ;;
               stop)
                       echo "Power is back up.  Attempting to halt shutdown." | wall
                       shutdown -c
                       ;;
               *)
                       echo "Usage:  $0 [start|stop]"
                       exit 1
                       ;;
         esac


  Pretty nifty, no?  Actually, there is a problem here...I haven't had
  time to figure it out...If there is a 'sh' wizard out there....

  There is one little detail left, that is having the UPS turn off the
  power if it was halted with the power out.  This is accomplished by
  adding this line into the end of your halt script:



         /sbin/backupsd /dev/backups killpower



  This will only kill the power if there is no power being supplied to
  your UPS.


  *** Testing the stuff ***

  This is just a short section saying this:

  BE CAREFUL!

  I recommend backing up your linux partitions, syncing several times
  before testing and just being careful in general.  Of course, I'm just
  recommending this.  I wasn't careful at all, and had to clean my
  partition several times testing my config.  But it works.  :)


  *** Where to Get It ***

  Miquel van Smoorenburg's SysVInit can be gotten at:

  sunsite.unc.edu:/pub/Linux/system/Daemons/SysVinit-2.50.tgz

  and a fix for some bash shells is right next-door as:

  sunsite.unc.edu:/pub/Linux/system/Daemons/SysVinit-2.50.patch1

  As to getting this HOWTO, you can email me.  docwhat@uiuc.edu  with
  the subject saying 'request' and the keyword 'backups' in body of the
  letter.  (I may automate this, and other stuff)

  *** Credit Where Credit's Due Dept. ***

  Thanks to Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org> for
  his wonderful SysVInit package and his powerd.c which helped me very
  much.

  Christian Holtje <docwhat@uiuc.edu> Documentation backupsd.c (what
  wasn't Miquel's) rc.power

  Ben Galliart <bgallia@orion.it.luc.edu> The cable Information for the
  RS-232 standard Lousy Jokes (none quoted here)



  /*  backupsd.c -- Simple Daemon to catch power failure signals from a
   *                Back-UPS (from APC).
   *
   *  Parts of the code are from Miquel van Smoorenburg's powerd.c
   *  Other parts are original from Christian Holtje <docwhat@uiuc.edu>
   *  I believe that it is okay to say that this is Public Domain, just
   *  give credit, where credit is due.
   *
   *  Disclaimer:  We make NO claims to this software, and take no
   *               resposibility for it's use/misuse.
   */

  #include <sys/types.h>
  #include <sys/ioctl.h>
  #include <fcntl.h>
  #include <errno.h>
  #include <stdlib.h>
  #include <unistd.h>
  #include <stdio.h>
  #include <signal.h>

  /* This is the file needed by SysVInit */
  #define PWRSTAT         "/etc/powerstatus"

  void powerfail(int fail);

  /* Main program. */
  int main(int argc, char **argv)
  {
    int fd;
    int killpwr_bit = TIOCM_RTS;
    int flags;
    int status, oldstat = -1;
    int count = 0;

    if (argc < 2) {
          fprintf(stderr, "Usage: %s <device> [killpower]\n", argv[0]);
          exit(1);
    }

    /* Open the the device */
    if ((fd = open(argv[1], O_RDWR | O_NDELAY)) < 0) {
          fprintf(stderr, "%s: %s: %s\n", argv[0], argv[1], sys_errlist[errno]);
          exit(1);
    }

    if ( argc >= 3  && (strcmp(argv[2], "killpower")==0) )
        {
            /* Let's kill the power! */
            fprintf(stderr, "%s: Attempting to kill the power!\n",argv[0] );
            ioctl(fd, TIOCMBIS, &killpwr_bit);
            /* Hmmm..... If you have a power outtage, you won't make it! */
            exit(0);
        }
    else
        /* Since we don't want to kill the power, clear the RTS. (killpwr_bit) */
        ioctl(fd, TIOCMBIC, &killpwr_bit);

  /* Become a daemon. */
    switch(fork()) {
    case 0: /* I am the child. */
                  setsid();
                  break;
    case -1: /* Failed to become daemon. */
                  fprintf(stderr, "%s: can't fork.\n", argv[0]);
                  exit(1);
    default: /* I am the parent. */
                  exit(0);
    }


    /* Now sample the DCD line. */
    while(1) {
        ioctl(fd, TIOCMGET, &flags);
        status = (flags & TIOCM_CD);
        /* Did DCD jumps to high? Then the power has failed. */
        if (oldstat == 0 && status != 0) {
            count++;
            if (count > 3) powerfail(0);
            else { sleep(1); continue; }
        }
        /* Did DCD go down again? Then the power is back. */
        if (oldstat > 0 && status == 0) {
            count++;
            if (count > 3) powerfail(1);
            else { sleep(1); continue; }
        }
        /* Reset count, remember status and sleep 2 seconds. */
        count = 0;
        oldstat = status;
        sleep(2);
    }
    /* Error! (shouldn't happen) */
    return(1);
  }


  /* Tell init the power has either gone or is back. */
  void powerfail(ok)
  int ok;
  {
    int fd;

    /* Create an info file needed by init to shutdown/cancel shutdown */
    unlink(PWRSTAT);
    if ((fd = open(PWRSTAT, O_CREAT|O_WRONLY, 0644)) >= 0) {
          if (ok)
                  write(fd, "OK\n", 3);
          else
                  write(fd, "FAIL\n", 5);
          close(fd);
    }
    kill(1, SIGPWR);
  }

  /* End of File */



  8.13.1.3.  More notes



  From ockers@carnot02.maem.umr.edu Mon Jan 16 15:27:29 1995
  Newsgroups: comp.os.linux.hardware
  Subject: Back-UPS, backupsd, and low battery signal
  From: ockers@carnot02.maem.umr.edu (Jim Ockers)
  Date: 12 Jan 1995 04:22:44 GMT
  Reply-To: ockers@umr.edu
  Organization: the all-male wasteland of Rolla, MO
  NNTP-Posting-Host: carnot02.maem.umr.edu
  X-Newsreader: TIN [version 1.2 PL2]

  Hello all,

  I use the backupsd on my linux system and I like it a lot.  I also
  run Windows NT when I have to and it has a UPS daemon too.  The pinouts
  required by Windows NT are different from the ones you specify in the
  program but that is easily changed since I have the source for your
  program..

  Anyways I was browsing through the Windows NT knowledge base (KB) and
  found something interesting.  If you look in the documentation for your
  Back-UPS under "computer interface port" you will see that this UPS will
  send a Low Battery signal at least two minutes before the battery fails.

  At least the manual for my Back-UPS 400 says that...

  However they also speak some Electrical Engineering gibberish ("Outputs ...
  are actually open collector outputs which must be pulled up to a common
  referenced supply no greater than +40 Vdc.  The transistors are capable
  of a maximum non-inductive load of 25mAdc.)

  Well that means nothing to me, but what I discovered in the NT KB was
  that it is possible to use the low battery signal in the same manner that
  the other signals are used.  The output from pin 5 on the UPS should go
  to the pin on which you are reading the LowBatt signal into the computer.
  When that line goes high, the battery is running out of charge.  When
  the situation is normal, that line will be low.  (Hi/Lo in a standard
  RS-232 signal, just like the other lines.)

  What they don't tell you in the APC manual, and they should, is that
  you need to buy a 10 KOhm resistor (50 cents at Radio Shack) and connect
  pins 5 and 8 on the UPS side using the resistor.  Pin 8 provides the
  "common referenced supply no greater than 40vdc".  Here's how you would
  make the cable (the 1st three lines are the same as the HOWTO):

         PC side                         UPS side
  pin      7 <------------------------------> 1                 ShutDownUPS
           1 <------------------------------> 2                 LineFail
           5 <------------------------------> 4 (same as 9 )    GND
           ? your choice  <-----------------> 5                 LowBatt
                                              |
                                               > 10
                                              <  KOhm
                                              |
                                              8

  So then when the LowBatt line is HIGH then the computer has 2 minutes
  to shut down before the battery runs out.

  This is not mentioned in the Back-UPS HOWTO nor is it addressed in the
  backupsd source.  However I would think that it would be a Good Thing
  to have in there; especially since a power failure would not require
  a shutdown unless the UPS batteries were low.  In most cases it would
  mean that the backupsd could send a warning to everyone if the LineFails,
  and give everyone a one (or two) minute warning when the batteries start
  running down.

  As far as I know this applies to all the APC Back-UPS and Smart-UPS
  products.  These instructions were for a Smart-UPS 900,1250, and 2000
  according to the NT KB.  However they have been tested with a Back-UPS
  400 running Windows NT and everything works properly...

  I'd sure like to have a backupsd that handled the LowBatt situation too.
  Does anyone feel like modifying the backupsd.c source so that it will do
  this too?  (I can't program in C yet...)

  P.S. The APC manual says to use only pin 4 as the common and even though
  in the diagram it says that pin 9 is connected to pin 4 you might want to
  be sure and use pin 4 .  This differs from the instructions in the HOWTO.

  P.P.S. I mailed this to the Back-UPS HOWTO authors.

  --
  Jim  (ockers@umr.edu)                   Ask me about Linux!
  http://www.umr.edu/~ockers/ - home page



  From: Peter Kammer <pkammer@liege.ICS.UCI.EDU>
  To: "Harvey J. Stein" <hjstein@math.huji.ac.il>
  cc: "Christian G. Holtje" <docwhat@uiuc.edu>
  Subject: UPS-Howto--minor correction
  Date: Mon, 07 Oct 1996 12:00:16 -0700


  Mr. Stein,

          Let me first thank you for putting together and maintaining the
  Linux UPS-HowTo document.  I recently attached a APC Back-UPS 400 to a
  a Linux box and the document turned out to be very helpful.
          I would like to suggest a correction to the the text diagrams which
  accompany the description in section 11.5.2.  The diagrams are presented as
  being the rear of the plug.  This in mind, the diagram of the male is
  backwards:

           ---------------------     Male Side! (This goes into the UPS)
            \  B   R  *  *  * /
              \  *  *  *  G  /
                ------------


  _From the rear_, the pins on the male connector are numbered
  right-to-left.  The correct diagram should be:

           ---------------------     Male Side! (This goes into the UPS)
            \  *   *  *  R  B /
              \  G  *  *  *  /
                ------------


  Similarly, the numbered diagram should be labeled as for the rear of the
  female plug.

           ---------------------
            \  1   2  3  4  5 /
              \  6  7  8  9  /
                ------------

  The rear of the male is numbered the reverse:

           ---------------------
            \  5   4  3  2  1 /
              \  9  8  7  6  /
                ------------


  This caused us some confusion until we realized our mistake.  With four
  different configurations to be aware of (front, rear) x (male, female) it
  is easy to get confused.  Even now, reference in hand, I keep reexamining
  my diagrams.

  It might also be helpful to add a reference to the APC technical document
  for the Back-UPS line which is available on-line at:

     http://www.apcc.com/english/techs/techref4/224e.htm

  Once we corrected our wiring, setting up the software was relatively simple
  thanks to your documentation.  We used the alternative (using TD to kill
  the UPS power rather than RTS) wiring scheme and ran into few problems.
  Your efforts in maintaining this information are much appreciated.

  ------------
  Peter Kammer                       Dept. of Information and Computer Science
  pkammer@ics.uci.edu                University of California
  http://www.ics.uci.edu/~pkammer/   Irvine, CA 92697-3425



  8.13.1.4.  APC Back-UPS Pro 650



       From: Troy Muller <tmuller@agora.rdrop.com>
       Sender: tmuller@napalm.it.wsu.edu
       To: abel@netvision.net.il
       Subject: APC Back-UPS Pro 650
       Date: Sun, 06 Apr 1997 12:50:40 -0700

       Dear Mr. Stein,

       I have a Back-UPS Pro 650 from APC and finally got it working with a
       standard APC cable.

       I used cable number 940-0023A and Enhanced_APC_BackUPS software.  My
       only grudge is the software broadcasts every 2 seconds, but hacking the
       dowall.c code to sleep 10 sec before broadcasting seems to limit it to
       every 10 seconds with a 2-3 message queued to be printed (ie. much more
       acceptable).



  8.13.2.  APC Smart-UPS

  Many people have APC Smart UPSs.  There seem to be packages for using
  them in smart modes (see the afore mentioned packages
  Enhanced_APC_UPSD-v1.4.tar.gz, apcd-0.5.tar.gz, and
  smupsd-0.7-1.i386.rpm described in section ``Software'').  I don't
  know how the support in each package is.  It seems that APC still
  refuses to release the protocol for the ``smart'' mode without a non-
  disclosure agreement, so everyone's left reverse engineering it.

  The general consensus is to buy from a brand which does release the
  information, such as Best.

  Another possibility is to run the SCO Unix version of APC's Powerchute
  UPS control software under Linux via the iBCS compatibility package.
  I'm told by Clive A. Stubbings (cas@vjet.demon.co.uk) that this works
  nicely after some install script adjustments.  He says that the only
  problem is "the GUI stuff seems to have difficulty controlling non-
  local UPSs across the net".

  If you have an APC Smart-UPS, and you can't get any of the above
  software to work in smart mode, you can still use it in dumb mode.
  The following sections detail how to do that.  In particular, I've
  received messages from people regarding the Model 600, the Model 700,
  and the model 1400.  You'll probably have to hack powerd.c as outlined
  in section ``Reverse-engineering cables and hacking powerd.c''.


  8.13.2.1.  APC Smart-UPS, Model 600



  From dangit@netcom.com Mon Aug 22 10:16:23 1994
  Newsgroups: comp.os.linux.misc
  Subject: UPS Monitoring Cable For APC
  From: dangit@netcom.com (Lam Dang)
  Date: Fri, 19 Aug 1994 11:56:28 GMT
  Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  X-Newsreader: TIN [version 1.2 PL1]

  [Didn't make it the first time.]

  A few netters have asked about UPS monitoring cables.  This is what I
  found when I made one for my APC Smart-UPS, Model 600.  A disclaimer is in
  order.  This is just an experimenter's report; use it at your own risks.
  Please read the User's Manual first, especially Section 6.4, Computer
  Interface Port.

  The cable is to run between a 9-pin female connector on the UPS and a
  25-pin male connector on the PC.  Since I cut off one end of a 9-pin
  cable and replaced it with a 25-pin connector, I had to be VERY
  CAREFUL ABOUT PIN NUMBERS.  The 25-pin hood is big enough to contain a
  voltage regulator and two resistors.  I got all the materials (listed
  below) from Radio Shack for less than 10 bucks.  As required by Windows NT
  Advanced Server 3.5 (Beta 2), the "interface" between the UPS connector
  and the PC connector is as follows:

          UPS (9-pin)              PC (25-pin)

          1 (Shutdown)             20 (DTR)
          3 (Line Fail)             5 (CTS)
          4 (Common)                7 (GND)
          5 (Low Battery)           8 (DCD)
          9 (Chassis Ground)        1 (Chassis Ground)

  This is pretty straightforward.  You can use UPS pin 6 instead of 3
  (they're the inverse of each other).  The complication is in pulling up
  UPS open collector pins 3 (or 6) and 5.

  This APC model provides an unregulated output of 24 Vdc at UPS pin 8. The
  output voltage is available all the time (at least until some time after
  Low Battery has been signalled).  The supply is limited to 40 mA.  To
  pull up, UPS pin 8 is input to a +5 Vdc voltage regulator.  The output of
  the regulator goes into two 4.7K resistors.  The other end of one
  resistor connects both UPS pin 3 (Line Fail) and PC pin 5 (CTS).  That
  of the other resistor connects both UPS pin 5 (Low Battery) and PC pin 8
  (DCD).  The two resistors draw about 2 mA when closed.

  Test your cable without connecting it to the PC.  When the UPS is on
  line, pins 5 (CTS) and 8 (DCD) at the PC end of the cable should be very
  close to 5 Vdc, and applying a high to pin 20 (DTR) for 5 seconds should
  have no effect.  Now pull the power plug to put the UPS on battery.  Pin
  5 (CTS) should go down to zero Vdc, pin 8 (DCD) should stay the same at 5
  Vdc, and applying a high to pin 20 (DTR), e.g., by shorting pins 8 and 20,
  should shut down the UPS after about 15 seconds.

  Keep the UPS on battery until Low Battery is lighted on its front panel.
  Now pin 8 (DCD) should go down to zero Vdc too.  Wait until the UPS
  battery is recharged.  Then connect your cable to the PC, disable the UPS
  option switches by turning all of them ON, and run your favorite UPS
  monitoring software.

  For those who want to run it with Windows NT Advanced Server, the UPS
  interface voltages are NEGATIVE for both power failure (using UPS pin 3)
  and low battery conditions, and POSITIVE for remote shutdown.  Serial
  line parameters such as baud rate don't matter.

  I haven't tested my cable with Linux powerd.  When you do, please let us
  know.  I run NT as often as Linux on the same PC.  I must conform to NT's
  UPS scheme.  Perhaps somebody can modify powerd to work with it and post
  the source code here.

  List of materials:

          1 shielded D-sub connector hood (Radio Shack 276-1510)
          1 25-pin female D-sub crimp-type connector (276-1430)
          1 7805 +5Vdc voltage regulator (276-1770)
          2 4.7K resistors
          1 component perfboard (276-148)
          1 cable with at least one 9-pin male connector.

  You'll need a multimeter, a soldering iron, and a couple of hours.

  Hope this helps.

  Regards,

  --
  Lam Dang
  dangit@netcom.com



  8.13.2.2.  APC Smart-UPS 700

  Here're some details for running an APC Smart-UPS 700 in dumb mode.

  It has a clever usage of a transistor in the cable so that the UPS
  will turn off when the computer is turned off.  And it includes a
  powerd.c which also does a fast low battery shutdown.

  Also, note that Markus' is also using init's new capabilities.  So we
  have here another illustration of how to use the new init to your
  advantage.



  From: Markus Eiden <Markus@eiden.de>
  Sender: eiden@eiden.de
  To: "Harvey J. Stein" <abel@netvision.net.il>
  Subject: Re: APC Smart-UPS
  Date: Sun, 30 Mar 1997 16:21:05 +0200

  I'm using an APC Smart-UPS 700 for my Linux box, running 2.0.21 on an
  ASUS-Board.

  To use some features of the UPS you need four things:


  1) You have to build a RS232-cable with a small interface.
  2) You need the powerd-source from the sysvinit-package (I use version 2.65
      from Miquel van Smoorenburg). Then you have to patch his powerd.
  3) You have to change your /etc/inittab
  4) You need a script to run some commands if the power is down or battery
     is low.


  Some features:

  When the power goes down, a script will start and a syslog-entry is done.

  If the battery is low, an other  script will start
  (which shutdown your computer of course) and a syslog-entry is done.

  If you shutdown your computer and the power is down, the UPS will be shut
  down too.



   1)Let's start with the cable:
  ================================

  If you have a look at the back side of you UPS you will see a female
  connector like this:



               8             1: Shutdown the UPS when the power is down and
                                 pin 1 is high.
       X   X   X   X         3: Goes low on "Linefail"
     X   X   X   X   X       4: GND
                             5: Goes low on  "Low battery"
     1       3   4   5       8: +24V



  On the other hand at the back side of your PC there exist a male
  connector like this:


           8       6         1: DCD
       X   X   X   X         4: DTR
     X   X   X   X   X       5: GND
     5   4           1       6: DSR
                             8: CTS



  You have to build the following interface between these connectors:

   PC                                                           UPS



                                           #------------------  (8)
                                           |
                                          470 Ohm
                                           |
             #-----#-----#-----#-----#-----#----- ca. 9-12V
             |     |     |     |     |     |
             47    3.3   3.3   3.3   1     470
             kOhm  kOhm  kOhm  kOhm  kOhm  Ohm
             |     |     |     |     |     |
   (8) ------------------------#     |     |
             |     |     |           |     |
   (6) ------------#------------------------------------------- (5)
             |           |           |     |
   (1) ------------------#------------------------------------- (3)
             |                       |     |
             |                      C#------------------------- (1)
             |                      -|     |
             |                    B/       |
   (4) ------#-----12kOhm---------|        |
                                   \>E     |
                                   |       |
   (5)-----------------------------#-------#------------------- (4)



    -I use a "BC140" - transistor, but nearly any simple NPN-transistor
     should work  ;-)

    -The transistor works as an "inverter". If you shutdown your PC,
     AND the power ist down, then pin 4(PC) goes low and 1(UPS) goes
     high. This shuts down the UPS  for saving batteries power.



   2) The powerd-Source:
  =======================

  I patched the powerd-source very little (so it is really the source
  of Miquel).

  (a) Give an "alert" to the syslogd if 8(PC, CTS) is down (Cause
       the cable is not connected)

  (b) DCD droped to zero => power has failed => call powerfail(0)
      => Give INIT_CMD_POWERFAIL to the init-process

  (c) DCD comes up again => power is back => call powerfail(1)
      => Give INIT_CMD_POWEROK to the init-process

  (d) DSR and DCD are dropped to zero => power has failed and
      battery is low => call powerfail(2) => Give
      INIT_CMD_POWERFAILNOW to the init-process

   Thats it.


  ------------------------------>8---- Schnipp ----------------------------


  /*
   * powerd       Monitor the DCD line of a serial port connected to
   *              an UPS. If the power goes down, notify init.
   *              If the power comes up again, notify init again.
   *              As long as the power is OK, the DCD line should be
   *              "HIGH". When the power fails, DCD should go "LOW".
   *              Powerd keeps DTR high so that you can connect
   *              DCD and DTR with a resistor of 10 Kilo Ohm and let the
   *              UPS or some relais pull the DCD line to ground.
   *              You also need to connect DTR and DSR together. This
   *              way, powerd can check now and then if DSR is high
   *              so it knows the UPS is connected!!
   *
   * Usage:       powerd /dev/cua4 (or any other serial device).
   *
   * Author:      Miquel van Smoorenburg, <miquels@drinkel.cistron.nl>.
   *              Some minor changes by Markus Eiden, <Markus@Eiden.de>
   *              for the APC-Smart-UPS-powerd.
   *
   * Version:     1.31,  29-Feb-1996.
   *
   *              This program was originally written for my employer,
   *                      ** Cistron Electronics **
   *              who has given kind permission to release this program
   *              for general puppose.
   *
   *              Copyright 1991-1996 Cistron Electronics.
   *
   *              This program is free software; you can redistribute it and/or
   *              modify it under the terms of the GNU General Public License
   *              as published by the Free Software Foundation; either version
   *              2 of the License, or (at your option) any later version.
   *
   *              Some minor changes for the APC-powerd by Markus Eiden
   *              Markus@Eiden.de
   */

  /* Use the new way of communicating with init. */
  #define NEWINIT

  #include <sys/types.h>
  #include <sys/stat.h>
  #include <sys/ioctl.h>
  #include <fcntl.h>
  #include <errno.h>
  #include <stdlib.h>
  #include <unistd.h>
  #include <stdio.h>
  #include <signal.h>
  #include <syslog.h>
  #include <string.h>
  #include "paths.h"
  #ifdef NEWINIT
  #include "initreq.h"
  #endif

  #ifndef SIGPWR
  #  define SIGPWR SIGUSR1
  #endif

  #ifdef NEWINIT
  void alrm_handler()
  {
  }
  #endif

  /* Tell init the power has either gone or is back. */
  void powerfail(ok)
  int ok;
  {
    int fd;
  #ifdef NEWINIT
    struct init_request req;

    /* Fill out the request struct. */
    memset(&req, 0, sizeof(req));
    req.magic = INIT_MAGIC;


    /* INIT_CMD_* are definied in initreq.h                   *
     * Have a look at  init.c and /etc/inittab                *
     *                                                        *
     * ok=0 -> INIT_CMD_POWERFAIL      -> powerwait           *
     * ok=1 -> INIT_CMD_POWEROK        -> powerokwait         *
     * ok=2 -> INIT_CMD_POWERFAILNOW   -> powerfailnow        */


    switch (ok) {
      case 0 : req.cmd = INIT_CMD_POWERFAIL;
               /* Linefail -> warning */
               break;
      case 1 : req.cmd = INIT_CMD_POWEROK;
               /* Power is back -> cancel warning */
               break;
      case 2 : req.cmd = INIT_CMD_POWERFAILNOW;
               /* Linefail and LowBatt -> reboot */
               break;
               }

    /* Open the fifo (with timeout) */
    signal(SIGALRM, alrm_handler);
    alarm(3);
    if ((fd = open(INIT_FIFO, O_WRONLY)) >= 0
                  && write(fd, &req, sizeof(req)) == sizeof(req)) {
          close(fd);
          return;
    }
    /* Fall through to the old method.. */
  #endif

    /* Create an info file for init. */
    unlink(PWRSTAT);
    if ((fd = open(PWRSTAT, O_CREAT|O_WRONLY, 0644)) >= 0) {
          if (ok)
                  write(fd, "OK\n", 3);
          else
                  write(fd, "FAIL\n", 5);
          close(fd);
    }
    kill(1, SIGPWR);
  }

  /* Main program. */
  int main(int argc, char **argv)
  {
    int fd;
    int dtr_bit = TIOCM_DTR;
    int flags;
    int status, oldstat = -1;
    int count = 0;
    int tries = 0;
    int powerfailed = 0;
    int rebootnow   = 0;
    if (argc < 2) {
          fprintf(stderr, "Usage: powerd <device>\n");
          exit(1);
    }

    /* Start syslog. */
    openlog("powerd", LOG_CONS|LOG_PERROR, LOG_DAEMON);

    /* Open monitor device. */
    if ((fd = open(argv[1], O_RDWR | O_NDELAY)) < 0) {
          syslog(LOG_ERR, "%s: %s", argv[1], sys_errlist[errno]);
          closelog();
          exit(1);
    }

    /* Line is opened, so DTR is high. Force it anyway to be sure. */

    /* USE: low Batt -> Reboot -> DTR goes low                     *
     * transistor is open -> shutdown-pin  of the UPS goes         *
     * high -> UPS goes down after about 20s. If there is a        *
     * linefail and the computer is off, the                       *
     * UPS goes down. If the power is back, the                    *
     * UPS goes on, the computer boots, and powerd                 *
     * is startet.                                                 */

   /* Verwendung: Die UPS meldet low Batt -> Reboot -> DTR geht   *
     * auf Low -> Transistor oeffnet -> Shutdown der UPS geht auf  *
     * High -> UPS schaltet sich nach circa 20s aus. Bei jedem     *
     * Linefail und ausgeschaltetem Computer, schaltet sich die    *
     * UPS aus. Kommt der Strom zurueck, dann schaltet sich die    *
     * UPS selbstaendig ein, der Computer bootet, und der powerd   *
     * wird gestartet.                                             */

    ioctl(fd, TIOCMBIS, &dtr_bit);



    /* Daemonize. */
    switch(fork()) {
          case 0: /* Child */
                  closelog();
                  setsid();
                  break;
          case -1: /* Error */
                  syslog(LOG_ERR, "can't fork.");
                  closelog();
                  exit(1);
          default: /* Parent */
                  closelog();
                  exit(0);
    }

    /* Restart syslog. */
    openlog("powerd", LOG_CONS, LOG_DAEMON);

     syslog(LOG_INFO, "APCpowerd started...");

    /* Now sample the DCD line. */
    while(1) {
          /* Get the status. */
          ioctl(fd, TIOCMGET, &flags);

          /* Check the connection: CTS should be high. */
          tries = 0;
          /* TIOCM_*- have a look at  .../ams/termios.h */
          while((flags & TIOCM_CTS) == 0) {
                  /* Keep on trying, and warn every two minutes. */
                  if ((tries % 60) == 0)
                      syslog(LOG_ALERT, "UPS connection error");
                  sleep(2);
                  tries++;
                  ioctl(fd, TIOCMGET, &flags);
          }
          if (tries > 0)
                  syslog(LOG_ALERT, "UPS connection OK");

          /* Calculate present status. */
          status = (flags & TIOCM_CAR);

          /* Did DCD drop to zero? Then the power has failed. */
          if (oldstat != 0 && status == 0) {
                  count++;
                  if (count > 3) {
                          powerfailed = 1;
                          powerfail(0);
                          }
                  else {
                          sleep(1);
                          continue;
                  }
          }
          /* Did DCD come up again? Then the power is back. */
          if (oldstat == 0 && status > 0) {
                  count++;
                  if (count > 3) {
                          powerfailed = 0;

                          /* eigentlich unnoetig: */
                          rebootnow = 0;

                          powerfail(1);
                          }
                  else {
                          sleep(1);
                          continue;
                  }
          }

          /* Low battery and Linefail ? */
          if (rebootnow==0)
          if (powerfailed==1)
          if ((flags & TIOCM_DSR) == 0)
          {
             rebootnow=1;
             powerfail(2);

          }

          /* Reset count, remember status and sleep 2 seconds. */
          count = 0;
          oldstat = status;
          sleep(2);
    }
    /* Never happens */
    return(0);
  }


  ------------------- schnap ------------ 8<-----------------------------

   3) Change your inittab:
  =========================


  Init gets the INIT_CMDs and will start a script:

  pf::powerwait:/sbin/init.d/powerfail    start
  pn::powerfailnow:/sbin/init.d/powerfail now
  po::powerokwait:/sbin/init.d/powerfail  stop

  (Which means for example: if the power has failed (powerwait) start the
  script /sbin/init.d/powerfail with the parameter "start".)



  4) The powerfail-Script
  ========================



  ------------------ 8< ------- schnipp ---------------

  #! /bin/sh
  # Copyright (c) 1997 Markus Eiden, Markus@Eiden.de
  #

  case "$1" in
      start)
          echo "THE POWER IS DOWN!" | wall
          logger "Powerfail"
          ;;
      now)
          echo "BATTERY IS LOW! Shutdown in 1 minute" | wall
          logger "Battery is low, shutdown in 1 minute"
          sync
          /sbin/shutdown -r -t 5 +1
          ;;
      stop)
          echo "THE POWER IS BACK!!" | wall
          logger "Power is back"

          /sbin/shutdown -c >/dev/null 2>/dev/null

          ;;
    *)
          echo "Usage: $0 {start|now|stop}"
          exit 1
          ;;
  esac

  exit 0

  --------------------- >8 ----------- schnapp -------------

  Well, that should be easy ;-)



  You are ready now, but be careful: It works for me, but I really can't
  guarantee that any of this will work for you.

  Some advice at the end:  If /sbin/init.d/powerfail shuts down your
  PC  then DTR goes down, so the shutdown pin (UPS) goes high.
  >From that time it takes about 20 or 30 seconds for the UPS to shut down.
  It is your job to prevent your Linux-box from booting within these 20
  seconds (in particular to mount the filesystem). On my system it was no
  problem. There are four easy ways to prevent the PC from the fast booting:
   1) The BIOS should do some routines (Like searching the number of
       tracks of your floppydisk if you have one)

   2) If you have LILO installed, tell him to wait.

   3) You do nothing (like I did)

   4) You buy some more memory so that counting the memory takes 30 seconds.
      That should be about 1024 Megabytes ;-).


  Markus Eiden

  Markus@Eiden.de


  --
  -----------------------------------------------------------------------
  StR Dipl.-Ing. Markus Eiden \\://                       Markus@eiden.de
  Am alten Sportplatz 3       (o -)        http://www.rp.schule.de/eiden/
  D-67599 Gundheim      ---ooO-(_)-Ooo---             NIC-HDL: ME256-RIPE



  8.13.2.3.  APC Smart-UPS 1400

  Another day, another APC.  This is for the Smart-UPS 1400, in dumb
  mode.



  From: "Slavik Terletsky" <ts@polynet.lviv.ua>
  To: hjstein@math.huji.ac.il
  Subject: my contribution to UPS HOWTO
  Date: Mon, 27 Jan 1997 21:10:16 +0000

  Hello
  I just hacked ups daemon, if you want, you may enclose it
  in your UPS HOWTO document (i used some info from).
  Please replay.
  --

  UPS daemon for FreeBSD (2.1.5 - tested).
  Interacts with APC Smart-UPS 1400.

  Connection scheme:

  UPS (pin, signal name)          PC (pin, signal name)
  ----------------------          ---------------------
  1 Shutdown              >----------->   4 Data Terminal Ready
  2 Line Failed           >----------->   8 Clear To Send
  4 Common                >----------->   5 Ground
  5 Battery Low           >--------+-->   1 Data Carrier Detector
  8 Battery (+24V)        >--|10K|-+


  UPSD DESCRIPTION

  usage: upsd <device> [wait [script]]

  device  - device name upsd interacts thru (e.g. /dev/cuaa1)
  wait    - time (secs) to wait before running script, (default value 0 sec).
  script  - system shutdown script (default /etc/rc.shutdown).

  Actions:
  upsd logs all the changes of UPS status (power {up,down}, battery {low,ok}).
  When "power down" and "battery low" upsd activates UPS SHUTDOWN signal,
  waits for a <wait> seconds, and then runs system shutdown script - <script>.

  Script sample:

  #!/bin/sh
  # Script is executed when system is going down.

  PATH=/sbin:/bin:/usr/sbin:/usr/bin

  echo "System is going DOWN right NOW" | wall

  reboot


  Upsd source:
  /* UPS daemon
   * Copyright 1997 Slavik Terletsky. All rights reserved.
   * Author: Slavik Terletsky <ts@polynet.lviv.ua>
   * System: FreeBSD
   */
  #include <stdio.h>
  #include <stdlib.h>
  #include <signal.h>
  #include <syslog.h>
  #include <unistd.h>
  #include <varargs.h>
  #include <fcntl.h>
  #include <errno.h>
  #include <sys/uio.h>
  #include <sys/types.h>
  #include <sys/ioctl.h>
  #include <sys/ttycom.h>

  int status;
  int wait = 0;
  FILE *fd;
  char *scr = "/etc/rc.shutdown";
  char *idf = "/var/run/upsd.pid";

  void upsterm();
  void upsdown(int);

  int main(int argc, char *argv[]) {
   int pd;
   int zero = 0;
   char d5, d6, d7;
   char low = 0;
   char pow = 1;

   /* check arguments */
   switch(argc) {
   case  4:
   scr = argv[3];
   case  3:
   wait = atoi(argv[2]);
   case  2:
   break;
   default:
   fprintf(stderr, "usage: %s <device> [wait [script]]\n", argv[0]);
   exit(1);
   }

   /* check if script exists */
   if(!(fd = fopen(scr, "r"))) {
   fprintf(stderr, "fopen: %s: %s\n", scr, sys_errlist[errno]);
   exit(1);
   }
   fclose(fd);

   /* check if upsd is already running */
   if(fd = fopen(idf, "r")) {
   fprintf(stderr, "fopen: %s: File already exists\n", idf);
   exit(1);
   }

   /* become a daemon */
   switch(fork()) {
   case -1:       /* error */
   fprintf(stderr, "fork: %s\n", sys_errlist[errno]);
   exit(1);
   case  0:       /* child */
   break;
   default:       /* parent */
   exit(0);
   }

   /* save the pid */
   if(!(fd = fopen(idf, "w"))) {
   fprintf(stderr, "fopen: %s: %s\n", idf, sys_errlist[errno]);
   exit(1);
   }
   fprintf(fd, "%d\n", (int)getpid());
   fclose(fd);

   /* open monitor device */
   if((pd = open(argv[1], O_RDWR | O_NDELAY)) < 0) {
   fprintf(stderr, "open: %s: %s\n", argv[1], sys_errlist[errno]);
   exit(1);
   }

   /* daemon is alive */
   openlog("upsd", LOG_PID, LOG_DAEMON);
   syslog(LOG_INFO, "daemon started");

   /* signal reaction */
   (void)signal(SIGTERM, upsterm);

   /* monitor device */
   while(1) {
   /* clear bits */
   if(ioctl(pd, TIOCMSET, &zero) < 0) {
    fprintf(stderr, "ioctl: %s\n", sys_errlist[errno]);
    exit(1);
   }

   /* get device status */
   if(ioctl(pd, TIOCMGET, &status) < 0) {
    fprintf(stderr, "ioctl: %s\n", sys_errlist[errno]);
    exit(1);
   }

   /* determin status */
   d5 = status & 0x20;
   d6 = status & 0x40;
   d7 = status & 0x80;

   /* power up */
   if(!(d7 + d5)) {
    if(!pow) {
     syslog(LOG_CRIT, "power up");
     pow = 1;
    }
   /* power down */
   } else {
    if(pow) {
     syslog(LOG_CRIT, "power down");
     pow = 0;
    }
   }

   /* battery low */
   if(!d6 && !low) {
    syslog(LOG_ALERT, "battery low");
    low = 1;

    /* down ups */
    if(!pow) {
     upsdown(pd);
    }
   }

   /* battery ok */
   if(d6 && low) {
    syslog(LOG_CRIT, "battery ok");
    low = 0;
   }

   sleep(1);
   }

   /* not reached */
   return 0;
  }

  void upsterm() {
   /* log termination message */
   syslog(LOG_INFO, "daemon terminated");

   /* remove pid file */
   unlink(idf);

   exit(0);
  }

  void upsdown(int pd) {
   /* log shutdown message */
   syslog(LOG_ALERT, "system is going down");

   /* remove pid file */
   unlink(idf);

   /* save our filesystem */
   system("/bin/sync");
   system("/bin/sync");
   system("/bin/sync");

   /* shutdown ups */
   status = TIOCM_DTR;
   if(ioctl(pd, TIOCMSET, &status) < 0) {
   fprintf(stderr, "ioctl: %s\n", sys_errlist[errno]);
   exit(1);
   }

   /* wait and then run script */
   sleep(wait);
   system(scr);
  }
  # Slavik Terletsky      # University "Lvivska Poytechnika" #
  # Network Administrator # mailto:ts@polynet.lviv.ua        #



  9.  How to shutdown other machines on the same UPS

  Some people (myself included) have several computers running Linux
  connected to one UPS.  One computer monitors the UPS and needs to get
  the other computers to shut down when the power goes out.

  We assume the computers can communicate over a network.  Call the
  computer that monitors the UPS the master and the other computers the
  slaves.

  In the old days this required some fancy programming.

  These days, the best thing to do is to pick up either the
  powerd-2.0.tar.gz package or the upsd-1.0.tgz package (see section
  ``Software''), and follow the instructions.  Both are able to run on
  the slaves in a mode where they connect over the network to a powerd
  or upsd process running on the master to query the status of the UPS.
  Some of the APC specific packages seem to have this ability too.

  Note, though, that if your network is insecure, you might want to add
  a little security to this, lest someone spoof the slave powerd
  processes into thinking that the power is out.

  Another possibility is to go for SNMP (Simple Network Management
  Protocol).  Detailing the use of SNMP is beyond the scope of this
  document, not to mention currently being beyond me.



  The Linux UUCP HOWTO
  Guylhem Aznar <guylhem at oeil.qc.ca>
  v2.0, 6 February 1998

  This document describes the setup, care & feeding of UUCP under Linux.
  You need to read this if you plan to connect to remote sites via UUCP
  via a modem, via a direct-connection, or via Internet.  You probably
  do *not* need to read this document if don't talk UUCP or if you don't
  know what it means.
  ______________________________________________________________________

  Table of Contents


  1. Introduction, copyright & standard disclaimer

     1.1 Email & spamming
     1.2 Goals
     1.3 New versions
     1.4 Feedback
     1.5 Copyright
     1.6 Limited warranty

  2. Other sources of information

     2.1 USENET
     2.2 Mailing Lists
     2.3 Other documents from LDP
     2.4 Books

  3. Requirements

     3.1 Hardware
     3.2 Software

  4. Setting up the config files

     4.1 Installing config. files
     4.2 (IDX
     4.3 (IDX
     4.4 (IDX
     4.5 (IDX
     4.6 (IDX
     4.7 (IDX
     4.8 (IDX
     4.9 (IDX
     4.10 Now let's test all this
     4.11 Additional informations

  5. It doesn't work - now what?

  6. Frequently Asked Questions about Linux UUCP

     6.1 Why is all the info here for UUCPs configured in "Taylor" rather than "HDB" mode?
     6.2 Why do I get "timeout" on connections when I upgraded to uucp-1.04?
     6.3 Why doesn't HDB anonymous uucp seem to work?
     6.4 What does "no matching ports found" mean?
     6.5 What are known good config files for HDB mode?
     6.6 Getting uucico to call alternate numbers

  7. Acknowledgements



  ______________________________________________________________________

  1.  Introduction, copyright & standard disclaimer



  1.1.  Email & spamming


  First, convert all "at" in Emails addresses given in this document
  into "@".

  It's simple for humans, but not for bots searching the web to spam ;
  therefore it's enough to protect generous contributors from being
  spammed.


  1.2.  Goals


  The intent of this document is to answer some of the questions &
  comments that appear to meet the definition of "frequently asked
  questions" about UUCP software under Linux genrally & the version in
  the Linux Debian and RedHat distributions in particular.


  1.3.  New versions


  New versions of this document will be periodically posted to
  comp.os.linux.announce, comp.answers & news.answers.  They will also
  be added to the various anonymous ftp sites who archive such
  information including sunsite FTP
  <http://sunsite.unc.edu:/pub/Linux/docs/HOWTO>.

  In addition, you should be generally able to find this document on the
  Linux WorldWideWeb home page at the LDP page
  <http://sunsite.unc.edu/LDP/>.


  1.4.  Feedback


  I am interested in any feedback (please e-mail), positive or negative,
  regarding the content of this document.  Definitely contact me if you
  find errors or obvious omissions.

  I read, but do not necessarily respond to, all e-mail I receive.
  Requests for enhancements will be considered & acted upon based on
  that day's combination of available time, merit of the request & daily
  blood pressure :-)

  Flames will quietly go to /dev/null so don't bother.

  Feedback concerning the actual format of the document should go to the
  HOWTO coordinator: Greg Hankins (gregh at sunsite.unc.edu).


  1.5.  Copyright


  The UUCP-HOWTO is copyrighted (c)1997 Guylhem Aznar.  Distributed
  under LDP copyright license.  If you have questions, please contact
  Greg Hankins, the Linux HOWTO coordinator, at gregh at
  sunsite.unc.edu.



  1.6.  Limited warranty


  Of course, I disavow any potential liability for the contents of this
  document.  Use of the concepts, examples, &/ or other content of this
  document is entirely at your own risk.


  2.  Other sources of information



  2.1.  USENET


  There is nothing "special" about configuring & running UUCP under
  Linux (any more).  Accordingly, you almost certainly do *NOT* want to
  be posting generic UUCP-related questions to the comp.os.linux.*
  newsgroups.

  Don't post in comp.os.linux hierarchy unless it's really linux
  specific, for example: "What's wrong with Debian 1.2 uucp?" or "RedHat
  5.0 uucp crashes when I run it" ...

  Let me repeat that.

  There is virtually no reason to post anything uucp-related in the
  comp.os.linux hierarchy any more.  There are existing newsgroups in
  the comp.mail.* hierarchy to handle *ALL* your questions.

  IF YOU POST TO COMP.OS.LINUX.* FOR NON-LINUX-SPECIFIC QUESTIONS, YOU
  ARE LOOKING IN THE WRONG PLACE FOR HELP.  THE UUCP EXPERTS HANG OUT IN
  THE PLACES INDICATED ABOVE AND GENERALLY DO NOT RUN LINUX.

  POSTING TO THE LINUX HIERARCHY FOR NON-LINUX-SPECIFIC QUESTIONS WASTES
  YOUR TIME AND EVERYONE ELSE'S AND IT FREQUENTLY DELAYS YOU FROM
  GETTING THE ANSWER TO YOUR QUESTION.

  The GOOD PLACE is comp.mail.uucp since you can get answers for most of
  your UUCP questions.


  2.2.  Mailing Lists


  There is a Taylor UUCP mailing list.

  To join (or get off) the list, send mail to

                taylor-uucp-request@gnu.ai.mit.edu



  This request goes to a person, not to a program, so please make sure
  that you include the address at which you want to receive mail in the
  text of the message.

  To send a message to the list, send it to

               taylor-uucp@gnu.ai.mit.edu



  2.3.  Other documents from LDP


  There is plenty of exceptional material provided in the other Linux
  HOWTO documents & from the Linux DOC project.

  In particular, you might want to take a look at the following:


  o  on your own computer in /usr/doc/uucp & /usr/info/uucp* :-)

  o  the Linux Networking Administrators' Guide

  o  the Serial Communications HOWTO

  o  the Ethernet HOWTO

  o  the News HOWTO

  o  the Mail HOWTO


  2.4.  Books


  HDB & V2 versions of UUCP are documented in about every vendor's
  documentation as well as in almost all *nix communications books.

  Taylor config. files are currently only documented in the info files
  provided with the sources (& in your distribution hopefully).  The
  following is a non-inclusive set of books that will help.


  o  "Managing UUCP & USENET" from O'Reilly & Associates is in my
     opinion the best book out there for figuring out the programs &
     protocols involved in being a USENET site.

  o  "Unix Communications" from The Waite Group contains a nice
     description of all the pieces (& more) & how they fit together.

  o  "Practical Unix Security" from O'Reilly & Associates has a nice
     discussion of how to secure UUCP.

  o  "The Internet Complete Reference" from Osborne is a fine reference
     book that explains the various services available on Internet & is
     a great source for information on news, mail & various other
     Internet resources.

  o  "The Linux Networking Administrators' Guide" from Olaf Kirch of the
     Linux DOC Project is available on the net & is also published by
     (at least) O'Reilly & SSC.  It makes a fine one-stop shopping to
     learn about everything you ever imagined you'd need to know about
     Unix networking.


  3.  Requirements



  3.1.  Hardware


  There are no specific hardware requirements for UUCP under Linux.
  Basically any Hayes-compatible modem works painlessly with UUCP.

  In most cases, you'll want the fastest modem you can afford, i.e.
  56000 bps actually.  In general, you want to have a 16550 UART on your
  serial board or built into your modem to handle speeds of above 9600
  baud.

  If you don't know what that last sentence means, please consult the
  comp.dcom.modems group or the various fine modem & serial
  communications FAQs & periodic postings on USENET.


  3.2.  Software


  UUCP for linux is available everywhere, for example on
  sunsite.unc.edu.  But before trying to get any version, try to install
  & make your current uucp work ; there're many little differences
  between each linux distribution, therefore it's easier for you to
  configure/install your distribution's UUCP package rather than editing
  sources for some options, setting the right paths & permissions,
  installing, etc.

  But if you prefer sources ...


  1) Unpack


  To extract a gzip'd tar archive, I do the following:

                  gunzip -c filename.tar.z | tar xvf -


  A "modern" tar can just do a:

                 tar -zxvf filename.tgz



  2) Run "configure"


  Type "sh configure".

  The configure script will compile a number of test programs to see
  what is available on your system & will calculate many things.

  The configure script will create conf.h from conf.h.in & Makefile from
  Makefile.in.  It will also create config.status, which is a shell
  script which actually creates the files.


  3) Decide where to install


  Rather than editing the Makefile.in file in the sources you can get
  the same effect by:


          "configure --prefix=/usr/lib"



  4) Edit "policy.h" for your local system

  o  - set the type of lockfiles you want (HAVE_HDB_LOCKFILES)

  o  - set the type of config files you want built in
     (HAVE_TAYLOR_CONFIG, HAVE_V2_CONFIG, HAVE_HDB_CONFIG)

  o  - set the type of spool directory structure you want (SPOOLDIR_HDB)

  o  - set the type of logging you want (HAVE_HDB_LOGGING)

  o  - set the default search path for commands (I added /usr/local/bin
     to mine)


  5) Then compile & install the software



  o  Type "make" to compile.

  o  Type "make install" to install.


  4.  Setting up the config files


  I recommend you start by installing the attached known-good config.
  files included in the document.


  4.1.  Installing config. files



  Put these file in their "standard" location: /etc/uucp on recent linux
  distributions or /usr/lib/uucp on older ones.

  Then make sure that the permissions of the files are



       (guylhem@barberouge:uucp)$ ls -l
       total 11
       -rw-r--r--   1 uucp     uucp          501 Jan 23 11:33 Poll
       -rw-r-----   1 uucp     uucp          589 Jan 23 11:34 call
       -rw-r-----   1 uucp     uucp         1184 Jan 23 12:06 config
       -rw-r-----   1 uucp     uucp          476 Jan 23 12:31 crontab
       -rw-r-----   1 uucp     uucp         1256 Jan 23 11:47 dial
       -rw-r-----   1 uucp     uucp          486 Jan 23 11:48 passwd
       -rw-r-----   1 uucp     uucp          810 Jan 23 11:55 port
       -rw-r--r--   1 uucp     uucp         1690 Jan 23 12:04 sys
       (guylhem@barberouge:uucp)$



  To change file owner, as root, type:


       (root@barberouge:uucp)$ chown uucp.uucp *



  Then you must change file permissions; as root once again, type:


  (root@barberouge:uucp)# chmod 640 *
  (root@barberouge:uucp)# chmod +r Poll sys



  4.2.  "Poll" file


  This file is used to set polling timetables for any system.



       schedule polux 01
       poll     polux 01



  My machine calls polux at 01:00, that's all!

  You can add more line if you must call many other machines, but don't
  forget to put the 2 lines (schedule & poll) for each.


  4.3.  "call" file


  It contains your login/password for each system you poll:


       polux uudan password



  My machine uses "uudan" login & "password" password :-) when it polls
  "polux".

  As for Poll, adapt this to your situation.


  4.4.  "config" file



  nodename barberouge                     # The UUCP name of this system

  spool /var/spool/uucp                   # The UUCP spool directory
  pubdir /var/spool/uucppublic            # The UUCP public directory
  logfile /var/log/uucp/log               # The UUCP log file
  statfile /var/log/uucp/stats            # The UUCP statistics file
  debugfile /var/log/uucp/debug           # The UUCP debugging file

  #sysfile        /etc/uucp/sys           # Default "sys"
  #portfile       /etc/uucp/port          # Default "port"
  #dialfile       /etc/uucp/dial          # Default "dial"
  #dialcodefile   /etc/uucp/dialcode      # Default "dialcode"
  #callfile       /etc/uucp/call          # Default "call"
  #passwdfile     /etc/uucp/passwd        # Default "passwd"

  # No commands may be executed by unknowns (empty list of permitted commands)
  # Upload is authorized in /var/spool/uucp
  unknown commands
  unknown pubdir /var/spool/uucp
  unknown remote-send ~ !~/upload
  unknown remote-receive ~/upload



  Here just replace "barberouge" by your system name ; run "hostname" if
  you can't remind it.


  4.5.  "crontab" file



       # Every day just before morning generate reports.
       #
       0 7 * * *     /usr/lib/uucp/uudemon.day root
       #
       # Every hour start the uudemon.hr. To actually poll a remote system,
       # enter its name in /etc/uucp/Poll. You are encouraged to change the "8".
       #
       8 * * * *      /usr/lib/uucp/uudemon.hr



  Just run "crontab -u uucp /etc/uucp/crontab" to add it to the others
  crontabs.


  4.6.  "dial" file



  # 1) expect nothing (i.e., continue with step 2)
  # 2) send "ATZ", then a carriage return, then sleep for 1 to 2 seconds.
  # The \c means to not send a final carriage return.
  # 3) wait until the modem echoes "OK", then do the the same for "ATX4" & "OK"
  # 4) send "ATDT", then the telephone number (after translating any dialcodes).
  # 5) wait until the modem echoes "CONNECT"
  # 6) if we get "BUSY", "NO CARRIER" ... during the chat script we abort dialing
  # 7) when the call is over, we make sure we hangup the modem


  dialer hayes
  chat "" ATZ\r\d\c OK\r \dATX4\r\d\c OK\r ATDT\D CONNECT
  chat-fail RING
  chat-fail NO\sCARRIER
  chat-fail ERROR
  chat-fail NO\sDIALTONE
  chat-fail BUSY
  chat-fail NO\sANSWER
  chat-fail VOICE
  complete \d\d+++\d\dATH\r\c
  abort \d\d+++\d\dATH\r\c

  # You can also add other dialers: inetd, nullmodem ...
  #dialer nullmodem
  #complete \d\dexit\r\c
  #abort \d\dexit\r\c



  Syntax is complicated ... you'd rather not touch anything here but
  "ATZ" & "ATX4" which are my modem init string.


  4.7.  "passwd" file



       #uuguest                guestpassword



  If you allow uucp dialin, just add system/passwords in this file.

  It's *that* simple.

  But it's recommended for security reasons to make sure each have a
  separate account & home directory so you can track things.


  4.8.  "port" file



  # Description for the modem entry
  # Debianers, make SURE this device is root:dialout, mode 0660 (crw-rw---)

  port ACU
  type modem
  device /dev/ttyS0
  dialer hayes
  speed 57600
  # hardflow n


  # Description for the TCP port - pretty trivial. DON'T DELETE.
  # Change service number if non standard, cf /etc/services

  port TCP
  type tcp
  #service 540


  # Description for the nullmodem entry
  # (ttyS1 means COM2)

  port nullmodem
  type direct
  device /dev/ttyS1
  dialer nullmodem
  speed 115200



  You shouldn't change anything here ... except your modem port.

  On recent distributions with mgetty, it's /dev/ttySN while on older
  distributions it's /dev/cuaN, where N is you serial port:

  N starts at 0 & ttyS(N) means COM(N+1), for example, my null-modem is
  on ttyS1 (COM2) while my modem is on ttyS0 (COM1).

  Most of recent modems support hardware flow control, if your doesn't,
  just uncomment the line "# hardflow n".


  4.9.  "sys" file



  # First some defaults. These are for ALL other entries (unless overridden).
  #
  protocol gvG
  protocol-parameter G packet-size 1024
  # protocol-parameter G window 7
  protocol-parameter G short-packets

  #
  # Our remote uucp connection.
  #
  system polux
  call-login *
  call-password *
  local-send /
  local-receive /var/spool/uucppublic
  remote-send /
  remote-receive /var/spool/uucppublic
  time any
  phone 0111111110
  port ACU
  chat "" \r\c ogin:-BREAK-ogin:-BREAK- \L word: \P
  #chat "" \d\d\r\c ogin: \d\L word: \P

  # This is an alternate - it means that if a connection using the above
  # "system polux" fails it falls through to this entry.
  # Only useful if your service provider has more then one phone number for UUCP.
  #
  #alternate polux-2
  #alias polux-2
  #phone 0222222220

  # Here's another alternate - we poll the system over TCP/IP.
  # This is useful if we have a PPP connection to our provider.
  # The first two entries will fail because the modem is busy & we will poll
  # over TCP/IP.
  #
  #alternate polux-tcp
  #alias polux-tcp
  #time any
  #address uucp.polux
  #port TCP
  #protocol t

  #
  # Last example - a system that we poll over TCP/IP.
  #
  #system horizon
  #call-login *
  #call-password *
  #time any
  #chat "" \d\d\r\c ogin: \d\L word: \P
  #address uucp.horizon.nl
  #port TCP
  #protocol t



  Here, you must change "polux" by the name of the system you poll &
  "0111111110" by its phone number.

  "polux-2", "polux-tcp" & "horizon" are just examples of user specific
  needs ; if the system you poll has more than one line, define it as
  "itsname-2" ; if you call it by PPP sometimes, just define "itsname-
  tcp" also.

  It's useful when chat script fail (busy ...)


  4.10.  Now let's test all this


  First run:



  (root@barberouge:uucp)# su uucp
  (uucp@barberouge:uucp)# /usr/lib/uucp/uuchk
  Local node name barberouge
  Spool directory /var/spool/uucp
  Public directory /var/spool/uucppublic
  Lock directory /var/lock
  Log file /var/log/uucp/log
  Statistics file /var/log/uucp/stats
  Debug file /var/log/uucp/debug
  Global debugging level
  uucico -l will strip login names and passwords
  uucico will strip UUCP protocol commands
  Start uuxqt once per uucico invocation

  System: polux
   When called using any login name
   Call out using port ACU
   The possible ports are:
    Port name ACU
     Port type modem
     Device /dev/ttyS0
     Speed 57600
     Carrier available
     Hardware flow control available
     Dialer hayes
      Chat script "" ATZ\r\d\c OK\r \dATX4\r\d\c OK\r ATDT\D CONNECT
      Chat script timeout 60
      Chat failure strings RING NO\sCARRIER ERROR NO\sDIALTONE BUSY NO\sANSWER VOICE
      Chat script incoming bytes stripped to seven bits
      Wait for dialtone ,
      Pause while dialing ,
      Carrier available
      Wait 60 seconds for carrier
      When complete chat script "" \d\d+++\d\dATH\r\c
      When complete chat script timeout 60
      When complete chat script incoming bytes stripped to seven bits
      When aborting chat script "" \d\d+++\d\dATH\r\c
      When aborting chat script timeout 60
      When aborting chat script incoming bytes stripped to seven bits
   Phone number 0111111110
   Chat script "" \r\c ogin:-BREAK-ogin:-BREAK- \L word: \P
   Chat script timeout 10
   Chat script incoming bytes stripped to seven bits
   Login name uudan
   Password your_password_here
   At any time may call if any work
   May retry the call up to 26 times
   May make local requests when calling
   May make local requests when called
   May send by local request: /
   May send by remote request: /
   May accept by local request: /var/spool/uucppublic
   May receive by remote request: /var/spool/uucppublic
   May execute /usr/bin/uucp /usr/bin/rmail /usr/bin/rnews
   Execution path /bin /usr/bin /usr/local/bin /usr/sbin
   Will leave 50000 bytes available
   Public directory is /var/spool/uucppublic
   Will use protocols gvG
   For protocol G will use the following parameters
    packet-size 1024
    short-packets



  to check if all the informations you've set are correct.

  Warning: your mileage may vary ; different distributions use different
  paths, regardless Linux FSSTD!

  If everything is correct, run:



               /usr/sbin/uucico -r 1 -x 9 -s remote_system_name



  The -x 9 will have maximum debugging information written to the
  /var/log/uucp/debug file for help in initial setup.

  I normally run -x 4 here since that level logs details that help me
  with login problems.  Obviously, this text contains clear informations
  from your systems file (account/password) so protect it against world-
  read.


  4.11.  Additional informations


  >From Pierre.Beyssac at emeraude.syseca.fr

  Taylor has more logging levels.  Use -x all to get the highest level
  possible.

  Also, do a "tail -f /var/log/uucp/debug" while debugging to watch
  things happen on the fly.


  5.  It doesn't work - now what?

  In general, you can refer to the documentation mentioned above if
  things don't work.

  You can also refer to your more experienced UUCP neighbors for help.
  Usually, it's something like a typo anyway.


  6.  Frequently Asked Questions about Linux UUCP



  6.1.  "HDB" mode?  Why is all the info here for UUCPs configured in
  "Taylor" rather than

  (religious mode on - I know some people are just as religious about
  "ease of use" as I am about "being standard".  That's why they make
  source code you can build your own from :-) )

  Because IMHO it's the de-facto standard UUCP implementation at this
  time.  There are thousands of sites with experienced admins & there
  are many places you can get incredibly good information concerning the
  HDB setup.

  Moreover, if you know what HDB is, you shouldn't be reading this HOWTO
  :-)

  Use the uuconv utility in /usr/sbin to convert config files from one
  mode to another.

  6.2.  Why do I get "timeout" on connections when I upgraded to
  uucp-1.04?


  o  from Ed Carp - erc at apple.com

     If you use a "Direct" device in the Devices file, there's now a 10
     second timeout compiled in.  Make the name of the Device anything
     other than "Direct".  If you tweak the example /etc/uucp files
     provided, you won't have problems with this one.


  o  from Greg Naber - greg at squally.halcyon.com

     If you get chat script timeouts, you can tweak the sources by
     editing at line 323 in uuconf/syssub.c & changing the default
     timeouts from 10 seconds to something larger.


  o  from Ed Rodda - ed at orca.wimsey.bc.ca

     If you get chat script timeouts, typically connecting to other
     Taylor sites, a pause after login can fix this.

     feed Any ACU,ag 38400 5551212 ogin: \c\d "" yourname word: passwd



  o  from Dr. Eberhard W. Lisse - el at lisse.NA

     Some kernels experience modems hanging up after a couple of
     seconds.  The following patch sent by Ian Taylor might help.


       *** conn.c.orig Mon Feb 22 20:25:24 1993
       --- conn.c      Mon Feb 22 20:33:10 1993
       ***************
       *** 204,209 ****
       --- 204,212 ----

            /* Make sure any signal reporting has been done before we set
              fLog_sighup back to TRUE.  */
       +   /* SMR: it seems to me if we don't care about SIGHUPS, we should clear
       +      the flag before we return  */
       +   afSignal[INDEXSIG_SIGHUP] = FALSE;
           ulog (LOG_ERROR, (const char *) NULL);
           fLog_sighup = TRUE;



  6.3.  Why doesn't HDB anonymous uucp seem to work?

  Taylor in HDB mode seems to be sensitive to white space & blank lines.
  To be safe, make sure that there are no blank lines or trailing spaces
  in the Permissions file.

  Lastly, make sure that you have a file called remote.unknown in
  /usr/lib/uucp or /etc/uucp & that it's *NOT* executable.

  See the O'Reilly & Associates book "Managing UUCP & USENET" for
  details regarding this file.


  6.4.  What does "no matching ports found" mean?

  In all probability, you are attempting to use a dialer that doesn't
  exist, or the dialer you've specified in the port files doesn't match
  up with any valid devices in the dial file.


  6.5.  What are known good config files for HDB mode?

  The following are "known-good" config files for Taylor 1.05 under
  Linux in HoneyDanBer mode.  They work on kernels of 0.99-8 or later.
  All files should be in /usr/lib/uucp or /etc/uucp unless you've
  tweaked the sources to put the uucp library elsewhere.

  If you *HAVE* put things in non-standard places, be aware that things
  like sendmail might get very confused. You need to ensure that all
  communications-related programs agree on your idea of "standard"
  paths.



  #------------- Devices -------------
  # make sure the device (cua1 here) matches your system
  # cua N = COM N+1
  #
  # here "scout" is the Digicom Scout Plus 19.2 modem I use
  # tbfast etc. is for a Telebit Trailblazer Plus modem's various speeds
  #
  ACU cua1 - 19200 scout
  ACU cua1 - 9600 tbfast
  ACU cua1 - 1200 tbslow
  ACU cua1 - 2400 tbmed

  #------------- dialers --------------
  # note the setting of the Trailblazer registers "on the fly"
  # "scout" is a Digicom Scout Plus (Hayes-like) modem I use here
  #
  scout   =W-,    "" ATM0DT\T CONNECT
  tbfast  =W-,    "" A\pA\pA\pT OK ATS50=255DT\T CONNECT\sFAST
  tbslow  =W-,    "" A\pA\pA\pT OK ATS50=2DT\T CONNECT\s1200
  tbmed   =W-,    "" A\pA\pA\pT OK ATS50=3DT\T CONNECT\s2400

  #-------------- Systems -------------
  # this is a very generic entry that will work for most systems
  #
  # the Any;1 means that you can call once per minute with using -f (force)
  # the ACU,g means force "g" protocol rather than Taylor's default "i"
  #
  fredsys Any;1 ACU,g 19200 scout5555555 "" \r ogin:--ogin: uanon word: uanon

  #-------------------------------- Permissions -------------------------

  # Taylor UUCP in HDB mode appears to be sensitive to blank lines.
  # Make sure all Permissions lines are real or commented out.
  #
  # this is a anonymous uucp entry
  #
  LOGNAME=nuucp MACHINE=OTHER \
  READ=/var/spool/uucp/nuucp \
  WRITE=/var/spool/uucp/nuucp \
  SENDFILES=yes REQUEST=yes \
  COMMANDS=/bin/rmail
  # # this is a normal setup for a remote system that talks to us
  # note the absolute path to rnews since this site puts things
  # in locations that aren't "standard"
  #
  LOGNAME=fredsys MACHINE=fredsys \
  READ=/var/spool/uucp/fredsys:/var/spool/uucp/uucppublic:/files \
  WRITE=/var/spool/uucp/fredsys:/var/spool/uucppublic \
  SENDFILES=yes REQUEST=yes \
  COMMANDS=/bin/rmail:/usr/bin/rnews
  #----------------------------------------------------------------------



  6.6.  Getting uucico to call alternate numbers

  The new v1.05 has an added '-z' switch to uucico that will try
  alternate numbers for a remote system.

  You can else use Taylor mode & "systemyouarecalling-2" (see "sys" in
  config.  files section for more details)



  7.  Acknowledgements


  The following people have helped in the assembly of the information &
  experience that helped make this document possible:

  Ed Carp, Steve Robbins, Ian Taylor, Greg Naber, Matt Welsh, Pierre
  Beyssac & especially many thanks to Vince Skahan for his huge
  contribution.

  If I forgot anybody, my apologies: just email me.



  The Unicode HOWTO
  Bruno Haible,<haible@clisp.cons.org>
  v0.12, 19 October 1999

  This document describes how to change your Linux system so it uses
  UTF-8 as text encoding. - This is work in progress. Any tips, patches,
  pointers, URLs are very welcome.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Why Unicode?
     1.2 Unicode encodings
        1.2.1 Footnotes for C/C++ developers
     1.3 Related resources

  2. Display setup

     2.1 Linux console
     2.2 X11 Foreign fonts
     2.3 X11 Unicode fonts
     2.4 Unicode xterm
     2.5 Miscellaneous

  3. Locale setup

     3.1 Files & the kernel
     3.2 Ttys & the kernel
     3.3 General data conversion
     3.4 Locale environment variables
     3.5 Creating the locale support files
     3.6 Adding support to the C library
     3.7 Converting the message catalogs

  4. Specific applications

     4.1 Networking
        4.1.1 rlogin
        4.1.2 telnet
     4.2 Browsers
        4.2.1 Netscape
        4.2.2 lynx
        4.2.3 Test pages
     4.3 Editors
        4.3.1 yudit
        4.3.2 mined98
        4.3.3 vim
        4.3.4 emacs
        4.3.5 xemacs
        4.3.6 nedit
        4.3.7 xedit
        4.3.8 axe
        4.3.9 pico
        4.3.10 TeX
     4.4 Mailers
        4.4.1 pine
        4.4.2 kmail
        4.4.3 Netscape Communicator
        4.4.4 emacs (rmail, vm)
     4.5 Other text-mode applications
        4.5.1 less
        4.5.2 expand, wc
        4.5.3 col, colcrt, colrm, column, rev, ul
        4.5.4 figlet
        4.5.5 kermit
     4.6 Other X11 applications

  5. Making your programs Unicode aware

     5.1 C/C++
        5.1.1 For normal text handling
           5.1.1.1 Portability notes
           5.1.1.2 The libutf8 library
           5.1.1.3 The Plan9 way
        5.1.2 For graphical user interface
        5.1.3 For advanced text handling
        5.1.4 For conversion
        5.1.5 Other approaches
     5.2 Java
     5.3 Lisp
     5.4 Ada95


  ______________________________________________________________________

  1.  Introduction



  1.1.  Why Unicode?


  People in different countries use different characters to represent
  the words of their native languages. Nowadays most applications,
  including email systems and web browsers, are 8-bit clean, i.e. they
  can operate on and display text correctly provided that it is
  represented in an 8-bit character set, like ISO-8859-1.

  There are far more than 256 characters in the world - think of
  cyrillic, hebrew, arabic, chinese, japanese, korean and thai -, and
  new characters are being invented now and then. The problems that come
  up for users are:


  o  It is impossible to store text with characters from different
     character sets in the same document. For example, I can cite
     russian papers in a German or French publication if I use TeX, xdvi
     and PostScript, but I cannot do it in plain text.

  o  As long as every document has its own character set, and
     recognition of the character set is not automatic, manual user
     intervention is inevitable. For example, in order to view the
     homepage of the XTeamLinux distribution
     http://www.xteamlinux.com.cn/ I have to tell Netscape that the web
     page is coded in GB2312.

  o  New symbols like the Euro are being invented. ISO has issued a new
     standard ISO-8859-15, which is mostly like ISO-8859-1 except that
     it removes some rarely used characters (the old currency sign) and
     replaced it with the Euro sign. If users adopt this standard, they
     have documents in different character sets on their disk, and they
     start having to think about it daily. But computers should make
     things simpler, not more complicated.

  The solution of this problem is the adoption of a world-wide usable
  character set. This character set is Unicode http://www.unicode.org/.
  For more info about Unicode, do `man 7 unicode' (manpage contained in
  the ldpman-1.20 package).


  1.2.  Unicode encodings


  This reduces the user's problem of dealing with character sets to a
  technical problem: How to transport Unicode characters using the 8-bit
  bytes?  8-bit units are the smallest addressing units of most
  computers and also the unit used by TCP/IP network connections. The
  use of 1 byte to represent 1 character is, however, an accident of
  history, caused by the fact that computer development started in
  Europe and the U.S. where 96 characters were found to be sufficient
  for a long time.
  There are basically four ways to encode Unicode characters in bytes:


     UTF-8
        128 characters are encoded using 1 byte (the ASCII characters).
        1920 characters are encoded using 2 bytes (Roman, Greek,
        Cyrillic, Coptic, Armenian, Hebrew, Arabic characters).  63488
        characters are encoded using 3 bytes (Chinese and Japanese among
        others).  The other 2147418112 characters (not assigned yet) can
        be encoded using 4, 5 or 6 characters.  For more info about
        UTF-8, do `man 7 utf-8' (manpage contained in the ldpman-1.20
        package).

     UCS-2
        Every character is represented as two bytes.  This encoding can
        only represent the first 65536 Unicode characters.

     UTF-16
        This is an extension of UCS-2 which can represent 1114112
        Unicode characters. The first 65536 Unicode characters are
        represented as two bytes, the other ones as four bytes.

     UCS-4
        Every character is represented as four bytes.

  The space requirements for encoding a text, compared to encodings
  currently in use (8 bit per character for European languages, more for
  Chinese/Japanese/Korean), is as follows. This has an influence on disk
  storage space and network download speed.


     UTF-8
        No change for US ASCII, just a few percent more for ISO-8859-1,
        50% more for Chinese/Japanese/Korean, 100% more for Greek and
        Cyrillic.

     UCS-2 and UTF-16
        No change for Chinese/Japanese/Korean. 100% more for US ASCII
        and ISO-8859-1, Greek and Cyrillic.

     UCS-4
        100% more for Chinese/Japanese/Korean. 300% more for US ASCII
        and ISO-8859-1, Greek and Cyrillic.

  Given the penalty for US and European documents caused by UCS-2,
  UTF-16, and UCS-4, it seems unlikely that these encodings have a
  potential for wide-scale use. The Microsoft Win32 API supports the
  UCS-2 encoding since 1995 (at least), yet this encoding has not been
  widely adopted for documents - SJIS remains prevalent in Japan.

  UTF-8 on the other hand has the potential for wide-scale use, since it
  doesn't penalize US and European users, and since many text processing
  programs don't need to be changed for UTF-8 support.

  In the following, we will describe how to change your Linux system so
  it uses UTF-8 as text encoding.


  1.2.1.  Footnotes for C/C++ developers


  The Microsoft Win32 approach makes it easy for developers to produce
  Unicode versions of their programs: You "#define UNICODE" at the top
  of your program and then change many occurrences of `char' to `TCHAR',
  until your program compiles without warnings. The problem with it is
  that you end up with two versions of your program: one which
  understands UCS-2 text but no 8-bit encodings, and one which
  understands only old 8-bit encodings.

  Moreover, there is an endianness issue with UCS-2 and UCS-4. The IANA
  character set registry says about ISO-10646-UCS-2: "this needs to
  specify network byte order: the standard does not specify". Network
  byte order is big endian. Whereas Microsoft, in its C/C++ development
  tools, recommends to use machine-dependent endianness (i.e. little
  endian on ix86 processors) and either a byte-order mark at the
  beginning of the document, or some statistical heuristics(!).

  The UTF-8 approach on the other hand keeps `char*' as the standard C
  string type. As a result, your program will handle US ASCII text,
  independently of any environment variables, and will handle both
  ISO-8859-1 and UTF-8 encoded text provided the LANG environment
  variable is set accordingly.


  1.3.  Related resources


  Markus Kuhn's very up-to-date resource list:

  o  http://www.cl.cam.ac.uk/~mgk25/unicode.html

  o  http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html

  Roman Czyborra's overview of Unicode, UTF-8 and UTF-8 aware programs:
  http://czyborra.com/utf/#UTF-8

  Some example UTF-8 files:

  o  The files quickbrown.txt, utf-8-test.txt, utf-8-demo.txt in the
     examples directory of Markus Kuhn's ucs-fonts package
     http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz

  o  ftp://ftp.cs.su.oz.au/gary/x-utf8.html

  o  The file iso10646 in the Kosta Kostis' trans-1.1.1 package
     ftp://ftp.nid.ru/pub/os/unix/misc/trans111.tar.gz

  o  ftp://ftp.dante.de/pub/tex/info/lwc/apc/utf8.html

  o  http://www.cogsci.ed.ac.uk/~richard/unicode-sample.html



  2.  Display setup


  We assume you have already adapted your Linux console and X11
  configuration to your keyboard and locale. This is explained in the
  Danish/International HOWTO, and in the other national HOWTOs: Finnish,
  French, German, Italian, Polish, Slovenian, Spanish, Cyrillic, Hebrew,
  Chinese, Thai, Esperanto. But please do not follow the advice given in
  the Thai HOWTO, to pretend you were using ISO-8859-1 characters
  (U0000..U00FF) when what you are typing are actually Thai characters
  (U0E01..U0E5B). Doing so will only cause problems when you switch to
  Unicode.


  2.1.  Linux console


  I'm not talking much about the Linux console here, because on those
  machines on which I don't have xdm running, I use it only to type my
  login name, my password, and "xinit".

  Anyway, the kbd-0.99 package
  ftp://sunsite.unc.edu/pub/Linux/system/keyboards/kbd-0.99.tar.gz and a
  heavily extended version, the console-tools-0.2.2 package
  ftp://sunsite.unc.edu/pub/Linux/system/keyboards/console-
  tools-0.2.2.tar.gz contains in the kbd-0.99/src/ (or console-
  tools-0.2.2/screenfonttools/) directory two programs: `unicode_start'
  and `unicode_stop'. When you call `unicode_start', the console's
  screen output is interpreted as UTF-8. Also, the keyboard is put into
  Unicode mode (see "man kbd_mode"). In this mode, Unicode characters
  typed as Alt-x1 ... Alt-xn (where x1,...,xn are digits on the numeric
  keypad) will be emitted in UTF-8. If your keyboard or, more precisely,
  your normal keymap has non-ASCII letter keys (like the German Umlaute)
  which you would like to be CapsLockable, you need to apply the kernel
  patch linux-2.2.9-keyboard.diff or linux-2.3.12-keyboard.diff.

  You will want to use display characters from different scripts on the
  same screen. For this, you need a Unicode console font. The
  ftp://sunsite.unc.edu/pub/Linux/system/keyboards/console-
  data-1999.08.29.tar.gz package contains a font
  (LatArCyrHeb-{08,14,16,19}.psf) which covers Latin, Cyrillic, Hebrew,
  Arabic scripts. It covers ISO 8859 parts 1,2,3,4,5,6,8,9,10 all at
  once. To install it, copy it to /usr/lib/kbd/consolefonts/ and execute
  "/usr/bin/setfont /usr/lib/kbd/consolefonts/LatArCyrHeb-14.psf".

  If you want cut&paste to work with UTF-8 consoles, you need the patch
  linux-2.3.12-console.diff from Edmund Thomas Grimley Evans and
  Stanislav Voronyi.


  2.2.  X11 Foreign fonts


  Don't hesitate to install Cyrillic, Chinese, Japanese etc. fonts. Even
  if they are not Unicode fonts, they will help in displaying Unicode
  documents: at least Netscape Communicator 4 and Java will make use of
  foreign fonts when available.

  The following programs are useful when installing fonts:

  o  "mkfontdir directory" prepares a font directory for use by the X
     server, needs to be executed after installing fonts in a directory.

  o  "xset fp+ directory" adds a directory to the X server's current
     font path.  To add a directory permanently, add a "FontPath" line
     to your /etc/XF86Config file, in section "Files".

  o  "xset fp rehash" needs to be executed after calling mkfontdir on a
     directory that is already contained in the X server's current font
     path.

  o  "xfontsel" allows you to browse the installed fonts by selecting
     various font properties.

  o  "xlsfonts -fn fontpattern" lists all fonts matching a font pattern.
     Also displays various font properties. In particular, "xlsfonts -ll
     -fn font" lists the font properties CHARSET_REGISTRY and
     CHARSET_ENCODING, which together determine the font's encoding.

  o  "xfd -fn font" displays a font page by page.

  The following fonts are freely available (not a complete list):

  o  The ones contained in XFree86, sometimes packaged in separate
     packages.  For example, SuSE has only normal 75dpi fonts in the
     base `xf86' package.  The other fonts are in the packages
     `xfnt100', `xfntbig', `xfntcyr', `xfntscl'.

  o  The Emacs international fonts,
     ftp://ftp.gnu.org/pub/gnu/intlfonts/intlfonts-1.1.tar.gz As already
     mentioned, they are useful even if you prefer XEmacs to GNU Emacs
     or don't use any Emacs at all.


  2.3.  X11 Unicode fonts


  Application wishing to display text belonging to different scripts
  (like Cyrillic and Greek) at the same time, can do so by using
  different X fonts for the various pieces of text. This is what
  Netscape Communicator and Java do. However, this approach is more
  complicated, because instead of working with `Font' and `XFontStruct',
  the programmer has to deal with `XFontSet', and also because not all
  fonts in the font set need to have the same dimensions.


  o  Markus Kuhn has assembled fixed-width 75dpi fonts with Unicode
     encoding covering Latin, Greek, Cyrillic, Armenian, Georgian,
     Hebrew, Symbol scripts.  They cover ISO 8859 parts
     1,2,3,4,5,7,8,9,10,13,14,15 all at once.  This font is required for
     running xterm in utf-8 mode.
     http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz

  o  Roman Czyborra has assembled an 8x16 / 16x16 75dpi font with
     Unicode encoding covering a huge part of Unicode. Download
     unifont.hex.gz and hex2bdf from http://czyborra.com/unifont/.  It
     is not fixed-width: 8 pixels wide for European characters, 16
     pixels wide for Chinese characters. Installation instructions:


       $ gunzip unifont.hex.gz
       $ hex2bdf < unifont.hex > unifont.bdf
       $ bdftopcf -o unifont.pcf unifont.bdf
       $ gzip -9 unifont.pcf
       # cp unifont.pcf.gz /usr/X11R6/lib/X11/fonts/misc
       # cd /usr/X11R6/lib/X11/fonts/misc
       # mkfontdir
       # xset fp rehash



  o  Primoz Peterlin has assembled an ETL family fonts covering Latin,
     Greek, Cyrillic, Armenian, Georgian, Hebrew scripts.
     ftp://ftp.x.org/contrib/fonts/etl-unicode.tar.gz Use the "bdftopcf"
     program in order to install it.


  2.4.  Unicode xterm


  xterm is part of X11R6 and XFree86, but is maintained separately by
  Tom Dickey.  http://www.clark.net/pub/dickey/xterm/xterm.html Newer
  versions (patch level 109 and above) contain support for converting
  keystrokes to UTF-8 before sending them to the application running in
  the xterm, and for displaying Unicode characters that the application
  outputs as UTF-8 byte sequence.

  To get an UTF-8 xterm running, you need to:


  o  Fetch http://www.clark.net/pub/dickey/xterm/xterm.tar.gz,

  o  Configure it by calling "./configure --enable-wide-chars ...", then
     compile and install it.

  o  Have a Unicode fixed-width font installed. Markus Kuhn's ucs-
     fonts.tar.gz (see above) is made for this.

  o  Start "xterm -u8 -fn fixed".  The option "-u8" turns on Unicode and
     UTF-8 handling. The "fixed" font is Markus Kuhn's Unicode font.

  o  Take a look at the sample files contained in Markus Kuhn's ucs-
     fonts package:


       $ cd .../ucs-fonts
       $ cat quickbrown.txt
       $ cat utf-8-demo.txt



  You should be seeing (among others) greek and russian characters.

  o  To make xterm come up with UTF-8 handling each time it is started,
     add the line XTerm*utf8:   1 to your $HOME/.Xdefaults (for yourself
     only). I don't recommend changing the system-wide
     /usr/X11R6/lib/X11/app-defaults/XTerm, because then your changes
     will be erased next time you upgrade to a new XFree86 version.

  o  If you also changed the font name, you need a line of the form
     *VT100*font:  your-font in your $HOME/.Xdefaults. For "fixed" it is
     not needed, because "fixed" is the default anyway.


  2.5.  Miscellaneous


  A small program which tests whether a Linux console or xterm is in
  UTF-8 mode can be found in the
  ftp://sunsite.unc.edu/pub/Linux/system/keyboards/x-lt-1.18.tar.gz
  package by Ricardas Cepas, files testUTF-8.c and testUTF8.c.



  3.  Locale setup



  3.1.  Files & the kernel


  You can now already use any Unicode characters in file names. No
  kernel or file utilities need modifications. This is because file
  names in the kernel can be anything not containing a null byte, and
  '/' is used to delimit subdirectories. When encoded using UTF-8, non-
  ASCII characters will never be encoded using null bytes or slashes.
  All that happens is that file and directory names occupy more bytes
  than they contain characters.  For example, a filename consisting of
  five greek characters will appear to the kernel as a 10-byte filename.
  The kernel does not know (and does not need to know) that these bytes
  are displayed as greek.

  This is the general theory, as long as your files stay inside Linux.
  On filesystems which are used from other operating systems, you have
  mount options to control conversion of filenames to/from UTF-8:
  o  The "vfat" filesystems has a mount option "utf8".  See
     file:/usr/src/linux/Documentation/filesystems/vfat.txt.  When you
     give an "iocharset" mount option different from the default (which
     is "iso8859-1"), the results with and without "utf8" are not
     consistent. Therefore I don't recommend the "iocharset" mount
     option.

  o  The "msdos", "umsdos" filesystems have the same mount option, but
     it appears to have no effect.

  o  The "iso9660" filesystem has a mount option "utf8".  See
     file:/usr/src/linux/Documentation/filesystems/isofs.txt.

  o  Since Linux 2.2.x kernels, the "ntfs" filesystem has a mount option
     "utf8". See file:/usr/src/linux/Documentation/filesystems/ntfs.txt.

     The other filesystems (nfs, smbfs, ncpfs, hpfs, etc.) don't convert
     filenames; therefore they support Unicode file names in UTF-8
     encoding only if the other operating system supports them.  Recall
     that to enable a mount option for all future remount, you add to
     the fourth column of the corresponding /etc/fstab line.


  3.2.  Ttys & the kernel


  Ttys are some kind of bidirectional pipes between two program,
  allowing fancy features like echoing or command-line editing. When in
  an xterm, you execute the "cat" command without arguments, you can
  enter and edit any number of lines, and they will be echoed back line
  by line. The kernel's editing actions are not correct, especially the
  Backspace (erase) key and the tab bey are not treated correctly.

  To fix this, you need to:

  o  apply the kernel patch linux-2.0.35-tty.diff or
     linux-2.2.9-tty.diff or linux-2.3.12-tty.diff and recompile your
     kernel,

  o  if you are using glibc2, apply the patch glibc211-tty.diff and
     recompile your libc (or if you are not so adventurous, it is
     sufficient to patch an already installed include file: glibc-
     tty.diff),

  o  apply the patch stty.diff to GNU sh-utils-1.16b, and rebuild the
     "stty" program, then test it using "stty -a" and "stty iutf8".

  o  add the command "stty iutf8" to the "unicode_start" script, and add
     the command "stty -iutf8" to the "unicode_stop script.

  o  apply the patch xterm.diff to xterm-109, and rebuild "xterm", then
     test it by starting "xterm -u8"/"xterm +u8" and running "stty -a"
     and interactive "cat" inside it.

  To make this fix persistent across rlogin and telnet, you also need
  to:

  o  Define new values for the TERM environment variable, "linux-utf8"
     as an alias to "linux", and "xterm-utf8" as an alias to "xterm".
     If your system has the ncurses library and the /usr/lib/terminfo
     (or /usr/share/terminfo) database, do this by running


       $ tic linux-utf8.terminfo
       $ tic xterm-utf8.terminfo

  as non-root (this will create the terminfo entries in your $HOME/.ter-
  minfo directory). Here are linux-utf8.terminfo and xterm-utf8.ter-
  minfo.  I don't recommend running this as root, because it will create
  the terminfo entries in /usr/lib/terminfo where they might be erased
  next time you upgrade your system.  If your system has an /etc/termcap
  file, you should also edit that file: copy the linux and xterm entries
  and give them the new names "linux-utf8" and "xterm-utf8". For an
  example, see termcap.diff.

  o  Each time you call "unicode_start" or "unicode_stop" from the
     console, also execute "export TERM=linux-utf8" or "export
     TERM=linux", respectively.

  o  Apply the patch xterm2.diff to xterm-109, rebuild "xterm", and
     remove any "XTerm*termName" line from /usr/X11R6/lib/X11/app-
     defaults/XTerm and $HOME/.Xdefaults. Now xterm sets the TERM
     variable to "xterm-utf8" instead of "xterm" when running in UTF-8
     mode.

  o  Apply the patches netkit.diff, netkitb.diff and telnet.diff and
     rebuild "rlogind" and "telnetd". Now rlogin and telnet put the tty
     into UTF-8 editing mode whenever the TERM environment variable is
     "linux-utf8" or "xterm-utf8".


  3.3.  General data conversion


  You will need a program to convert your locally (probably ISO-8859-1)
  encoded texts to UTF-8. (The alternative would be to keep using texts
  in different encodings on the same machine; this is not fun in the
  long run.)  One such program is `iconv', which comes with glibc-2.1.
  Simply use


       $ iconv --from-code=ISO-8859-1 --to-code=UTF-8 < old_file > new_file



  Here are two handy shell scripts, called "i2u" i2u.sh (for ISO to UTF
  conversion) and "u2i" u2i.sh (for UTF to ISO conversion).  Adapt
  according to your current 8-bit character set.

  If you don't have glibc-2.1 and iconv installed, you can use GNU
  recode 3.5 instead.  "i2u" i2u_recode.sh is "recode
  ISO-8859-1..UTF-8", and "u2i" u2i_recode.sh is "recode
  UTF-8..ISO-8859-1".
  ftp://ftp.iro.umontreal.ca/pub/recode/recode-3.5.tar.gz
  ftp://ftp.gnu.org/pub/gnu/recode/recode-3.5.tar.gz Notes: You need GNU
  recode 3.5 or newer. To compile GNU recode 3.5 on platforms without
  glibc2 (i.e. on all platforms except recent Linux systems), you need
  to configure it with --disable-nls, otherwise it won't link.

  Or you can also use CLISP instead. Here are "i2u" i2u.lsp and "u2i"
  u2i.lsp written in Lisp. Note: You need a CLISP version from July 1999
  or newer.  ftp://clisp.cons.org/pub/lisp/clisp/source/clispsrc.tar.gz.

  Other data conversion programs, less powerful than GNU recode, are
  `trans' ftp://ftp.informatik.uni-
  erlangen.de/pub/doc/ISO/charsets/trans113.tar.gz, `tcs' from the Plan9
  operating system ftp://ftp.informatik.uni-
  erlangen.de/pub/doc/ISO/charsets/tcs.tar.gz, and
  `utrans'/`uhtrans'/`hutrans'
  ftp://ftp.cdrom.com/pub/FreeBSD/distfiles/i18ntools-1.0.tar.gz by G.
  Adam Stanislav <adam@whizkidtech.net>.
  3.4.  Locale environment variables


  You may have the following environment variables set, containing
  locale names:

     LANGUAGE
        override for LC_MESSAGES, used by GNU gettext only

     LC_ALL
        override for all other LC_* variables

     LC_CTYPE, LC_MESSAGES, LC_COLLATE, LC_NUMERIC, LC_MONETARY, LC_TIME
        individual variables for: character types and encoding, natural
        language messages, sorting rules, number formatting, money
        amount formatting, date and time display

     LANG
        default value for all LC_* variables

  (See `man 7 locale' for a detailed description.)

  Each of the LC_* and LANG variables can contain a locale name of the
  following form:


       language[_territory[.codeset]][@modifier]


  where language is an ISO 639 language code (lower case), territory is
  an ISO 3166 country code (upper case), codeset denotes a character
  set, and modifier stands for other particular attributes (for example
  indicating a particular language dialect, or a nonstandard
  orthography).

  LANGUAGE can contain several locale names, separated by colons.

  In order to tell your system and all applications that you are using
  UTF-8, you need to add a codeset suffix of UTF-8 to your locale names.
  For example, if you were using


       LANGUAGE=de:fr:en
       LC_CTYPE=de_DE



  you would change this to


       LANGUAGE=de.UTF-8:fr.UTF-8:en.UTF-8
       LC_CTYPE=de_DE.UTF-8



  3.5.  Creating the locale support files


  If you have glibc-2.1 or glibc-2.1.1 or glibc-2.1.2 installed, first
  check using "localedef --help" that the system directory for character
  maps is /usr/share/i18n/charmaps. Then apply to the file
  /usr/share/i18n/charmaps/UTF8 the patch glibc21.diff or glibc211.diff
  or glibc212.diff, respectively.  Then create the support files for
  each UTF-8 locale you intend to use, for example:


       $ localedef -v -c -i de_DE -f UTF8 /usr/share/locale/de_DE.UTF-8



  You typically don't need to create locales named "de" or "fr" without
  country suffix, because these locales are normally only used by the
  LANGUAGE variable and not by the LC_* variables, and LANGUAGE is only
  used as an override for LC_MESSAGES.


  3.6.  Adding support to the C library


  The glibc-2.2 will support multibyte locales, in particular the UTF-8
  locales created above. But glibc-2.1 or glibc-2.1.1 do not really
  support it.  Therefore the only real effect of the above creation of
  the /usr/share/locale/de_DE.UTF-8/* files is that
  `setlocale(LC_ALL,"")' will return "de_DE.UTF-8", according to your
  environment variables, instead of stripping off the ".UTF-8" suffix.

  To add support for the UTF-8 locale, you should build and install the
  `libutf8_plug.so' library, from libutf8-0.5.2.tar.gz.  Then you can
  set the LD_PRELOAD environment variable to point to the installed
  library:


       $ export LD_PRELOAD=/usr/local/lib/libutf8_plug.so



  Then, in every program launched with this environment variable set,
  the functions in libutf8_plug.so will override the original ones in
  /lib/libc.so.6. For more info about LD_PRELOAD, see "man 8 ld.so".

  This entire thing will not be necessary any more once glibc-2.2 comes
  out.


  3.7.  Converting the message catalogs


  Now let's fill these new locales with content. The following /bin/sh
  commands can convert your message catalogs to UTF-8 format. They must
  be run as root, and require the programs `msgfmt' and `msgunfmt' from
  GNU gettext-0.10.35 to be installed.  convert-msgcat.sh

  This too will not be necessary any more once glibc-2.2 comes out,
  because by then, the gettext function will convert the strings
  appropriately from the translator's character set to the user's
  character set, using either iconv or librecode.


  4.  Specific applications



  4.1.  Networking



  4.1.1.  rlogin


  is fine with the above mentioned patches.


  4.1.2.  telnet


  telnet is not 8-bit clean by default. In order to be able to send
  Unicode keystrokes to the remote host, you need to set telnet into
  "outbinary" mode.  There are two ways to do this:


       $ telnet -L <host>



  and


       $ telnet
       telnet> set outbinary
       telnet> open <host>



  Additionally, use the above mentioned patches.


  4.2.  Browsers



  4.2.1.  Netscape


  Netscape 4.05 or newer can display HTML documents in UTF-8 encoding.
  All a document needs is the following line between the <head> and
  </head> tags:


       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">



  Netscape 4.05 or newer can also display HTML and text files in UCS-2
  encoding with byte-order mark.

  http://www.netscape.com/computing/download/


  4.2.2.  lynx


  lynx-2.8 has an options screen (key 'O') which permits to set the
  display character set. When running in an xterm or Linux console in
  UTF-8 mode, set this to "UNICODE UTF-8".

  Now, again, all a document needs is the following line between the
  <head> and </head> tags:


  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">



  When you are viewing text files in UTF-8 encoding, you also need to
  pass the command-line option "-assume_local_charset=UTF-8" (affects
  only file:/... URLs) or "-assume_charset=UTF-8" (affects all URLs).
  In lynx-2.8.2 you can alternatively, in the options screen (key 'O'),
  change the assumed document character set to "utf-8".

  There is also an option in the options screen, to set the "preferred
  document character set". But it has no effect, at least with file:/...
  URLs and with http://... URLs served by apache-1.3.0.

  There is a spacing and line-breaking problem, however. (Look at the
  russian section of x-utf8.html, or at utf-8-demo.txt.)

  Also, in lynx-2.8.2, configured with --enable-prettysrc, the nice
  colour scheme does not work correctly any more when the display
  character set has been set to "UNICODE UTF-8". This is fixed by a
  simple patch lynx282.diff.

  The Lynx developers say: "For any serious use of UTF-8 screen output
  with lynx, compiling with slang lib and -DSLANG_MBCS_HACK is still
  recommended."

  ftp://ftp.gnu.org/pub/gnu/lynx/lynx-2.8.2.tar.gz
  http://lynx.browser.org/ http://www.slcc.edu/lynx/ ftp://lynx.isc.org/


  4.2.3.  Test pages


  Some test pages for browsers can be found at the pages of Alan Wood
  http://www.hclrss.demon.co.uk/unicode/#links and James Kass
  http://home.att.net/~jameskass/.


  4.3.  Editors



  4.3.1.  yudit


  yudit by Gaspar Sinai http://czyborra.com/yudit/ is a first-class
  unicode text editor for the X Window System.  It supports simultaneous
  processing of many languages, input methods, conversions for local
  character standards.  It has facilities for entering text in all
  languages with only an English keyboard, using keyboard configuration
  maps.

  It can be compiled in three versions: Xlib GUI, KDE GUI, or Motif GUI.

  Customization is very easy. Typically you will first customize your
  font.  From the font menu I chose "Unicode". Then, since the command
  "xlsfonts '*-*-iso10646-1'" still showed some ambiguity, I chose a
  font size of 13 (to match Markus Kuhn's 13-pixel fixed font).

  Next, you will customize your input method. The input methods
  "Straight", "Unicode" and "SGML" are most remarkable. For details
  about the other built-in input methods, look in
  /usr/local/share/yudit/data/.


  To make a change the default for the next session, edit your
  $HOME/.yuditrc file.

  The general editor functionality is limited to editing, cut&paste and
  search&replace. No undo.


  4.3.2.  mined98


  mined98 is a small text editor by Michiel Huisjes, Achim Mueller and
  Thomas Wolff.  http://www.inf.fu-berlin.de/~wolff/mined.html It lets
  you edit UTF-8 or 8-bit encoded files, in an UTF-8 or 8-bit xterm.  It
  also has powerful capabilities for entering Unicode characters.

  When it is running in xterm or Linux console in UTF-8 mode, you should
  set the environment variable utf8_term, or call mined with the
  command-line option -U.

  mined lets you edit both 8-bit encoded and UTF-8 encoded files. By
  default it uses an autodetection heuristic. If you don't want to rely
  on heuristics, pass the command-line option -u when editing an UTF-8
  file, or +u when editing an 8-bit encoded file. You can change the
  interpretation at any time from within the editor: It displays the
  encoding ("L:h" for 8-bit, "U:h" for UTF-8) in the menu line. Click on
  the first of these characters to change it.

  A few caveats:

  o  The Linux binary in the distribution is out of date and does not
     support UTF-8. You have to rebuild a binary from the source. Then
     install src/mined as /usr/local/bin/mined, and install
     doc/mined.help as /usr/local/man/cat1/mined.1, so that ESC h will
     find it.

  o  mined ignores your "stty erase" setting. When your backspace key
     sends ASCII code 127, and you have set "stty erase ^?", -- these
     are the ultimately correct settings -- you have to call mined with
     option -B in order to get the backspace key erase a character to
     the left of the cursor.

  o  The "Home", "End", "Delete" keys do not work.


  4.3.3.  vim


  vim (as of version 5.4m) has some support for multi-byte locales, but
  only as far as the X library has the same support, and only for
  encodings with at most two bytes per character (i.e. ISO-2022
  encodings). No UTF-8 support.


  4.3.4.  emacs


  First of all, you should read the section "International Character Set
  Support" (node "International") in the Emacs manual. In particular,
  note that you need to start Emacs using the command


       $ emacs -fn fontset-standard



  so that it will use a font set comprising a lot of international char-
  acters.

  In the short term, the emacs-utf package
  http://www.cs.ust.hk/faculty/otfried/Mule/ by Otfried Cheong provides
  a "unicode-utf8" encoding to Emacs.  After compiling the program
  "utf2mule" and installing it somewhere in your $PATH, also install
  unicode.el, muleuni-1.el, unicode-char.el somewhere, and add the lines


       (setq load-path (cons "/home/user/somewhere/emacs" load-path))
       (if (not (string-match "XEmacs" emacs-version))
         (progn
           (require 'unicode)
           (if (eq window-system 'x)
             (progn
               (create-fontset-from-fontset-spec
                 "-misc-fixed-medium-r-normal-*-12-*-*-*-*-*-fontset-standard")
               (create-fontset-from-fontset-spec
                 "-misc-fixed-medium-r-normal-*-13-*-*-*-*-*-fontset-standard")
               (create-fontset-from-fontset-spec
                 "-misc-fixed-medium-r-normal-*-14-*-*-*-*-*-fontset-standard")
               (create-fontset-from-fontset-spec
                 "-misc-fixed-medium-r-normal-*-15-*-*-*-*-*-fontset-standard")
               (create-fontset-from-fontset-spec
                 "-misc-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard")
               (create-fontset-from-fontset-spec
                 "-misc-fixed-medium-r-normal-*-18-*-*-*-*-*-fontset-standard")))))



  to your $HOME/.emacs file. To activate any of the font sets, use the
  Mule menu item "Set Font/FontSet" or Shift-down-mouse-1. Currently the
  font sets with height 15 and 13 have the best Unicode coverage, due to
  Markus Kuhn's 9x15 and 6x13 fonts.  In order to open an UTF-8 encoded
  file, you will type


       M-x universal-coding-system-argument unicode-utf8 RET
       M-x find-file filename RET



  or


       C-x RET c unicode-utf8 RET
       C-x C-f filename RET



  Note that this works with Emacs in windowing mode only, not in
  terminal mode.

  Richard Stallman plans to add integrated UTF-8 support to Emacs in the
  long term.


  4.3.5.  xemacs


  (This section is written by Gilbert Baumann.)

  Here is how to teach XEmacs (20.4 configured with MULE) the UTF-8
  encoding.  Unfortunately you need its sources to be able to patch it.

  First you need these files provided by Tomohiko Morioka:

  http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/xemacs-21.0-b55-emc-
  b55-ucs.diff and http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/xemacs-
  ucs-conv-0.1.tar.gz

  The .diff is a diff against the C sources. The tar ball is elisp code,
  which provides lots of code tables to map to and from Unicode. As the
  name of the diff file suggests it is against XEmacs-21; I needed to
  help `patch' a bit. The most notable difference to my XEmacs-20.4
  sources is that file-coding.[ch] was called mule-coding.[ch].

  For those unfamilar with the XEmacs-MULE stuff (as I am) a quick
  guide:

  What we call an encoding is called by MULE a `coding-system'. The most
  important commands are:



       M-x set-file-coding-system
       M-x set-buffer-process-coding-system   [comint buffers]



  and the variable `file-coding-system-alist', which guides `find-file'
  to guess the encoding used. After stuff was running, the very first
  thing I did was this.

  This code looks into the special mode line introduced by -*- somewhere
  in the first 600 bytes of the file about to opened; if now there is a
  field "Encoding: xyz;" and the xyz encoding ("coding system" in Emacs
  speak) exists, choose that. So now you could do e.g.



       ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: CLEX; Encoding: utf-8; -*-



  and XEmacs goes into utf-8 mode here.

  Atfer everything was running I defined \u03BB (greek lambda) as a
  macro like:



       (defmacro \u03BB (x) `(lambda .,x))



  4.3.6.  nedit



  4.3.7.  xedit



  In theory, xedit should be able to edit UTF-8 files if you set the
  locale accordingly (see above), and add the line "Xedit*international:
  true" to your $HOME/.Xdefaults file. In practice, it will recognize
  UTF-8 encoding of non-ASCII characters, but will display them as
  sequences of "@" characters.


  4.3.8.  axe


  In theory, axe should be able to edit UTF-8 files if you set the
  locale accordingly (see above), and add the line "Axe*international:
  true" to your $HOME/.Xdefaults file. In practice, it will simply dump
  core.


  4.3.9.  pico



  4.3.10.  TeX


  The teTeX 0.9 (and newer) distribution contains an Unicode adaptation
  of TeX, called Omega (http://www.gutenberg.eu.org/omega/,
  ftp://ftp.ens.fr/pub/tex/yannis/omega), but can someone point me to a
  tutorial for using this system?

  Other maybe related links: http://www.dante.de/projekte/nts/NTS-
  FAQ.html, ftp://ftp.dante.de/pub/tex/language/chinese/CJK/.


  4.4.  Mailers


  MIME: RFC 2279 defines UTF-8 as a MIME charset, which can be
  transported under the 8bit, quoted-printable and base64 encodings. The
  older MIME UTF-7 proposal (RFC 2152) is considered to be deprecated
  and should not be used any further.

  Mail clients released after January 1, 1999, should be capable of
  sending and displaying UTF-8 encoded mails, otherwise they are
  considered deficient.  But these mails have to carry the MIME labels


       Content-Type: text/plain; charset=UTF-8
       Content-Transfer-Encoding: 8bit



  Simply piping an UTF-8 file into "mail" without caring about the MIME
  labels will not work.

  Mail client implementors should take a look at http://www.imc.org/imc-
  intl/ and http://www.imc.org/mail-i18n.html.

  Now about the individual mail clients (or "mail user agents"):


  4.4.1.  pine


  The situation for an unpatched pine version 4.10 is as follows.


  Pine does not do character set conversions. But it allows you to view
  UTF-8 mails in an UTF-8 text window (Linux console or xterm).

  Normally, Pine will warn about different character sets each time you
  view an UTF-8 encoded mail. To get rid of this warning, choose S
  (setup), then C (config), then change the value of "character-set" to
  UTF-8. This option will not do anything, except to reduce the
  warnings, as Pine has no built-in knowledge of UTF-8.

  Also note that Pine's notion of Unicode characters is pretty limited:
  It will display Latin and Greek characters, but not other kinds of
  Unicode characters.

  A patch by Robert Brady http://www.ents.susu.soton.ac.uk/~robert/pine-
  utf8-0.1.diff adds UTF-8 support to Pine. With this patch, it decodes
  and prints headers and bodies properly. The patch depends on the GNOME
  libunicode http://cvs.gnome.org/lxr/source/libunicode/.

  However, alignment remains broken in many places; replying to a mail
  does not cause the character set to be converted as appropriate; and
  the editor, pico, cannot deal with multibyte characters.


  4.4.2.  kmail


  kmail (as of KDE 1.0) does not support UTF-8 mails at all.


  4.4.3.  Netscape Communicator


  Netscape Communicator's Messenger can send and display mails in UTF-8
  encoding, but it needs a little bit of manual user intervention.

  To send an UTF-8 encoded mail: After opening the "Compose" window, but
  before starting to compose the message, select from the menu "View ->
  Character Set -> Unicode (UTF-8)". Then compose the message and send
  it.

  When you receive an UTF-8 encoded mail, Netscape unfortunately does
  not display it in UTF-8 right away, and does not even give a visual
  clue that the mail was encoded in UTF-8. You have to manually select
  from the menu "View -> Character Set -> Unicode (UTF-8)".

  For displaying UTF-8 mails, Netscape uses different fonts. You can
  adjust your font settings in the "Edit -> Preferences -> Fonts"
  dialog; choose the "Unicode" font category.


  4.4.4.  emacs (rmail, vm)



  4.5.  Other text-mode applications



  4.5.1.  less


  Get ftp://ftp.gnu.org/pub/gnu/less/less-340.tar.gz and apply the patch
  less-340-utf-2.diff by Robert Brady <rwb197@ecs.soton.ac.uk>.  Then
  set the environment variable LESSCHARSET:


  $ export LESSCHARSET=utf-8



  If you also have a LESSKEY environment variable set, also make sure
  that the file it points to does not define LESSCHARSET. If necessary,
  regenerate this file using the `lesskey' command, or unset the LESSKEY
  environment variable.


  4.5.2.  expand, wc


  Get the GNU textutils-2.0 and apply the patch textutils-2.0.diff, then
  configure, add "#define HAVE_MBRTOWC 1", "#define HAVE_FGETWC 1",
  "#define HAVE_FPUTWC 1" to config.h. In src/Makefile, modify CFLAGS
  and LDFLAGS so that they include the directories where libutf8 is
  installed. Then rebuild.


  4.5.3.  col, colcrt, colrm, column, rev, ul


  Get the util-linux-2.9y package, configure it, then define
  ENABLE_WIDECHAR in defines.h, change the "#if 0" to "#if 1" in
  lib/widechar.h. In text-utils/Makefile, modify CFLAGS and LDFLAGS so
  that they include the directories where libutf8 is installed. Then
  rebuild.


  4.5.4.  figlet


  figlet 2.2 has an option for UTF-8 input: "figlet -C utf8"


  4.5.5.  kermit


  The serial communications program C-Kermit
  http://www.columbia.edu/kermit/, in versions 7.0beta10 or newer,
  understands the file and transfer encodings UTF-8 and UCS-2, and
  understands the terminal encoding UTF-8. Documentation of these
  features can be found in
  ftp://kermit.columbia.edu/kermit/test/text/ckermit2.txt.


  4.6.  Other X11 applications


  X11 Xlib kann leider noch kein UTF-8 locale, das msste auch noch
  dringend mal gemacht werden.



  5.  Making your programs Unicode aware



  5.1.  C/C++


  The C `char' type is 8-bit and will stay 8-bit because it denotes the
  smallest addressable data unit. Various facilities are available:

  5.1.1.  For normal text handling


  The ISO/ANSI C standard contains, in an amendment which was added in
  1995, a "wide character" type `wchar_t', a set of functions like those
  found in <string.h> and <ctype.h> (declared in <wchar.h> and
  <wctype.h>, respectively), and a set of conversion functions between
  `char *' and `wchar_t *' (declared in <stdlib.h>).

  Good references for this API are

  o  the GNU libc-2.1 manual, chapters 4 "Character Handling" and 6
     "Character Set Handling",

  o  the manual pages man-mbswcs.tar.gz,

  o  the Dinkumware C library reference
     http://www.dinkumware.com/htm_cl/,

  o  the OpenGroup's Single Unix specification http://www.UNIX-
     systems.org/online.html.

  Advantages of using this API:

  o  It's a vendor independent standard.

  o  The functions do the right thing, depending on the user's locale.
     All a program needs to call is setlocale(LC_ALL,"");.

  Drawbacks of this API:

  o  Some of the functions are not multithread-safe, because they keep a
     hidden internal state between function calls.

  o  There is no first-class locale datatype. Therefore this API cannot
     reasonably be used for anything that needs more than one locale or
     character set at the same time.

  o  The OS support for this API is not good on most OSes.


  5.1.1.1.  Portability notes


  A `wchar_t' may or may not be encoded in Unicode; this is platform and
  sometimes also locale dependent. A multibyte sequence `char *' may or
  may not be encoded in UTF-8; this is platform and sometimes also
  locale dependent.

  In detail, here is what the Single Unix specification says about the
  `wchar_t' type: All wide-character codes in a given process consist of
  an equal number of bits. This is in contrast to characters, which can
  consist of a variable number of bytes. The byte or byte sequence that
  represents a character can also be represented as a wide-character
  code.  Wide-character codes thus provide a uniform size for
  manipulating text data. A wide-character code having all bits zero is
  the null wide-character code, and terminates wide-character strings.
  The wide-character value for each member of the Portable Character Set
  (i.e. ASCII) will equal its value when used as the lone character in
  an integer character constant. Wide-character codes for other
  characters are locale- and implementation-dependent. State shift bytes
  do not have a wide-character code representation.

  One particular consequence is that in portable programs you shouldn't
  use non-ASCII characters in string literals. That means, even though
  you know the Unicode double quotation marks have the codes U+201C and
  U+201D, you shouldn't write a string literal L"\u201cHello\u201d, he
  said" or "\xe2\x80\x9cHello\xe2\x80\x9d, he said" in C programs.
  Instead, use GNU gettext, write it as gettext("'Hello', he said"), and
  create a message database en.UTF-8.po which translates "'Hello', he
  said" to "\u201cHello\u201d, he said".

  Here is a survey of the portability of the ISO/ANSI C facilities on
  various Unix flavours. GNU glibc-2.2 will support all of it, but for
  now we have the following picture.


     GNU glibc-2.0.x, glibc-2.1.x

     o  <wchar.h> and <wctype.h> exist.

     o  Has wcs/mbs functions, but no fgetwc/fputwc/wprintf.

     o  No UTF-8 locale.

     o  mbrtowc returns EILSEQ for bytes >= 0x80.

     Solaris 2.7

     o  <wchar.h> and <wctype.h> exist.

     o  Has wcs/mbs functions, fgetwc/fputwc/wprintf, everything.

     o  Has the following UTF-8 locales: en_US.UTF-8, de.UTF-8,
        es.UTF-8, fr.UTF-8, it.UTF-8, sv.UTF-8.

     o  mbrtowc returns EILSEQ for bytes >= 0x80.

     OSF/1 4.0d

     o  <wchar.h> and <wctype.h> exist.

     o  Has wcs/mbs functions, fgetwc/fputwc/wprintf, everything.

     o  Has an add-on universal.utf8@ucs4 locale, see "man 5 unicode".

     o  mbrtowc does not know about UTF-8.

     Irix 6.5

     o  <wchar.h> and <wctype.h> exist.

     o  Has wcs/mbs functions and fgetwc/fputwc, but not wprintf.

     o  Has no multibyte locales.

     o  Has only a dummy definition for mbstate_t.

     o  Doesn't have mbrtowc.

     HP-UX 11.00

     o  <wchar.h> exists, <wctype.h> does not.

     o  Has wcs/mbs functions and fgetwc/fputwc, but not wprintf.

     o  Has a C.utf8 locale.

     o  Doesn't have mbstate_t.

     o  Doesn't have mbrtowc.

     AIX 4.2

     o  <wchar.h> exists, <wctype.h> does not - instead use <ctype.h>
        and <wchar.h>.

     o  Has wcs/mbs functions and fgetwc/fputwc, but not wprintf.

     o  Has the following UTF-8 locales: ET_EE.UTF-8, LT_LT.UTF-8,
        LV_LV.UTF-8, ZH_CN.UTF-8.

     o  Doesn't have mbstate_t.

     o  Doesn't have mbrtowc.

  As a consequence, I recommend to use the restartable and multithread-
  safe wcsr/mbsr functions, forget about those systems which don't have
  them (Irix, HP-UX, AIX), and use the UTF-8 locale plug-in
  libutf8_plug.so (see below) on those systems which permit you to
  compile programs which use these wcsr/mbsr functions (Linux, Solaris,
  OSF/1).

  A similar advice, given by Sun in http://www.sun.com/software/white-
  papers/wp-unicode/, section "Internationalized Applications with
  Unicode", is:

  To properly internationalize an application, use the following
  guidelines:

  1. Avoid direct access with Unicode. This is a task of the platform's
     internationalization framework.

  2. Use the POSIX model for multibyte and wide-character interfaces.

  3. Only call the APIs that the internationalization framework provides
     for language and cultural-specific operations.

  4. Remain code-set independent.

  If, for some reason, in some piece of code, you really have to assume
  that `wchar_t' is Unicode (for example, if you want to do special
  treatment of some Unicode characters), you should make that piece of
  code conditional upon the result of is_locale_utf8(). Otherwise you
  will mess up your program's behaviour in different locales or other
  platforms. The function is_locale_utf8 is declared in utf8locale.h and
  defined in utf8locale.c.


  5.1.1.2.  The libutf8 library


  A portable implementation of the ISO/ANSI C API, which supports 8-bit
  locales and UTF-8 locales, can be found in libutf8-0.5.2.tar.gz.

  Advantages:

  o  Unicode UTF-8 support now, portably, even on OSes whose multibyte
     character support does not work or which don't have multibyte/wide
     character support at all.

  o  The same binary works in all OS supported 8-bit locales and in
     UTF-8 locales.

  o  When an OS vendor adds proper multibyte character support, you can
     take advantage of it by simply recompiling without -DHAVE_LIBUTF8
     compiler option.

  5.1.1.3.  The Plan9 way


  The Plan9 operating system, a variant of Unix, uses UTF-8 as character
  encoding in all applications. Its wide character type is called
  `Rune', not `wchar_t'. Parts of its libraries, written by Rob Pike and
  Howard Trickey, are available at
  ftp://ftp.cdrom.com/pub/netlib/research/9libs/9libs-1.0.tar.gz.
  Another similar library, written by Alistair G. Crooks, is
  ftp://ftp.cdrom.com/pub/NetBSD/packages/distfiles/libutf-2.10.tar.gz.
  In particular, each of these libraries contains an UTF-8 aware regular
  expression matcher.

  Drawback of this API:

  o  UTF-8 is compiled in, not optional. Programs compiled in this
     universe lose support for the 8-bit encodings which are still
     frequently used in Europe.


  5.1.2.  For graphical user interface


  The Qt-2.0 library http://www.troll.no/ contains a fully-Unicode
  QString class. You can use the member functions QString::utf8 and
  QString::fromUtf8 to convert to/from UTF-8 encoded text.  The
  QString::ascii and QString::latin1 member functions should not be used
  any more.


  5.1.3.  For advanced text handling


  The previously mentioned libraries implement Unicode aware versions of
  the ASCII concepts. Here are libraries which deal with Unicode
  concepts, such as titlecase (a third letter case, different from
  uppercase and lowercase), distinction between punctuation and symbols,
  canonical decomposition, combining classes, canonical ordering and the
  like.


     ucdata-1.9
        The ucdata library by Mark Leisher
        http://crl.nmsu.edu/~mleisher/ucdata.html deals with character
        properties, case conversion, decomposition, combining classes.


     ICU
        IBMs Classes for Unicode
        http://www.alphaworks.ibm.com/tech/icu/.  A very comprehensive
        internationalization library featuring Unicode strings, resource
        bundles, number formatters, date/time formatters, message
        formatters, collation and more. Lots of supported locales.
        Portable to Unix and Win32, but compiles out of the box only on
        Linux libc6, not libc5.


     libunicode
        The GNOME libunicode library
        http://cvs.gnome.org/lxr/source/libunicode/ by Tom Tromey and
        others. It covers character set conversion, character
        properties, decomposition.



  5.1.4.  For conversion


  Two conversion libraries, which support UTF-8 and a large number of
  8-bit character sets, are available:

  The iconv implementation by Ulrich Drepper, contained in the GNU
  glibc-2.1.1.  ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.1.1.tar.gz

  Advantages:

  o  iconv is POSIX standardized, programs using iconv to convert
     from/to UTF-8 will also run under Solaris. However, the names for
     the character sets differ between platforms. For example, "EUC-JP"
     under glibc is "eucJP" under HP-UX.  (The official IANA name for
     this character set is "EUC-JP", so it's clearly a HP-UX
     deficiency.)

  o  No additional library needed.

  librecode by Francois Pinard
  ftp://ftp.gnu.org/pub/gnu/recode/recode-3.5.tar.gz.

  Advantages:

  o  Support for transliteration, i.e. conversion of non-ASCII
     characters to sequences of ASCII characters in order to preserve
     readability by humans, even when a lossless transformation is
     impossible.

  Drawbacks:

  o  Non-standard API.


  5.1.5.  Other approaches



     libutf-8
        libutf-8 by G. Adam Stanislav <adam@whizkidtech.net> contains a
        few functions for on-the-fly conversion from/to UTF-8 encoded
        `FILE*' streams.
        http://www.whizkidtech.net/i18n/libutf-8-1.0.tar.gz

        Advantages:

     o  Very small.

        Drawbacks:

     o  Non-standard API.

     o  UTF-8 is compiled in, not optional. Programs compiled with this
        library lose support for the 8-bit encodings which are still
        frequently used in Europe.

     o  Installation is nontrivial: Makefile needs tweaking, not
        autoconfiguring.



  5.2.  Java



  Java has Unicode support built into the language. The type `char'
  denotes a Unicode character, and the `java.lang.String' class denotes
  a string built up from Unicode characters.

  Java can display any Unicode characters through its windowing system
  AWT, provided that 1. you set the Java system property "user.language"
  appropriately, 2. the /usr/lib/java/lib/font.properties.language font
  set definitions are appropriate, and 3. the fonts specified in that
  file are installed.  For example, in order to display text containing
  japanese characters, you would install japanese fonts and run "java
  -Duser.language=ja ...".  You can combine font sets: In order to
  display western european, greek and japanese characters
  simultaneously, you would create a combination of the files
  "font.properties" (covers ISO-8859-1), "font.properties.el" (covers
  ISO-8859-7) and "font.properties.ja" into a single file.  ??This is
  untested??

  The interfaces java.io.DataInput and java.io.DataOutput have methods
  called `readUTF' and `writeUTF' respectively. But note that they don't
  use UTF-8; they use a modified UTF-8 encoding: the NUL character is
  encoded as the two-byte sequence 0xC0 0x80 instead of 0x00, and a 0x00
  byte is added at the end. Encoded this way, strings can contain NUL
  characters and nevertheless need not be prefixed with a length field -
  the C <string.h> functions like strlen() and strcpy() can be used to
  manipulate them.


  5.3.  Lisp


  The Common Lisp standard specifies two character types: `base-char'
  and `character'. It's up to the implementation to support Unicode or
  not.  The language also specifies a keyword argument `:external-
  format' to `open', as the natural place to specify a character set or
  encoding.

  Among the free Common Lisp implementations, only CLISP
  http://clisp.cons.org/ supports Unicode. You need a CLISP version from
  July 1999 or newer.
  ftp://clisp.cons.org/pub/lisp/clisp/source/clispsrc.tar.gz.  The types
  `base-char' and `character' are both equivalent to 16-bit Unicode.
  The encoding used for file or socket/pipe I/O can be specified through
  the `:external-format' argument. The encodings used for tty I/O and
  the default encoding for file/socket/pipe I/O are locale dependent.

  Among the commercial Common Lisp implementations, only Eclipse
  http://www.elwood.com/eclipse/eclipse.htm supports Unicode. See
  http://www.elwood.com/eclipse/char.htm.  The type `base-char' is
  equivalent to ISO-8859-1, and the type `character' contains all
  Unicode characters.  The encoding used for file I/O can be specified
  through a combination of the `:element-type' and `:external-format'
  arguments to `open'.  Limitations: Character attribute functions are
  locale dependent. Source and compiled source files cannot contain
  Unicode string literals.

  The commercial Common Lisp implementation Allegro CL does not support
  Unicode yet, but Erik Naggum is working on it.


  5.4.  Ada95


  Ada95 was designed for Unicode support and the Ada95 standard library
  features special ISO 10646-1 data types Wide_Character and
  Wide_String, as well as numerous associated procedures and functions.
  The GNU Ada95 compiler (gnat-3.11 or newer) supports UTF-8 as the
  external encoding of wide characters. This allows you to use UTF-8 in
  both source code and application I/O. To activate it in the
  application, use "WCEM=8" in the FORM string when opening a file, and
  use compiler option "-gnatW8" if the source code is in UTF-8. See the
  GNAT and Ada95 reference manuals for details.



  The Unix and Internet Fundamentals HOWTO
  by Eric S. Raymond
  v1.8, 11 July 2000

  This document describes the working basics of PC-class computers,
  Unix-like operating systems, and the Internet in non-technical lan
  guage.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Purpose of this document

  2. What's new

     2.1 Related resources
     2.2 New versions of this document
     2.3 Feedback and corrections

  3. Basic anatomy of your computer

  4. What happens when you switch on a computer?

  5. What happens when you log in?

  6. What happens when you run programs from the shell?

  7. How do input devices and interrupts work?

  8. How does my computer do several things at once?

  9. How does my computer keep processes from stepping on each other?

  10. How does my computer store things in memory?

     10.1 Numbers
     10.2 Characters

  11. How does my computer store things on disk?

     11.1 Low-level disk and file system structure
     11.2 File names and directories
     11.3 Mount points
     11.4 How a file gets looked up
     11.5 File ownership, permissions and security
     11.6 How things can go wrong

  12. How do computer languages work?

     12.1 Compiled languages
     12.2 Interpreted languages
     12.3 P-code languages

  13. How does the Internet work?

     13.1 Names and locations
     13.2 Packets and routers
     13.3 TCP and IP
     13.4 HTTP, an application protocol


  ______________________________________________________________________

  1.  Introduction



  1.1.  Purpose of this document

  This document is intended to help Linux and Internet users who are
  learning by doing.  While this is a great way to acquire specific
  skills, sometimes it leaves peculiar gaps in one's knowledge of the
  basics -- gaps which can make it hard to think creatively or
  troubleshoot effectively, from lack of a good mental model of what is
  really going on.

  I'll try to describe in clear, simple language how it all works.  The
  presentation will be tuned for people using Unix or Linux on PC-class
  hardware.  Nevertheless I'll usually refer simply to `Unix' here, as
  most of what I will describe is constant across platforms and across
  Unix variants.

  I'm going to assume you're using an Intel PC.  The details differ
  slightly if you're running an Alpha or PowerPC or some other Unix box,
  but the basic concepts are the same.

  I won't repeat things, so you'll have to pay attention, but that also
  means you'll learn from every word you read.  It's a good idea to just
  skim when you first read this; you should come back and reread it a
  few times after you've digested what you have learned.

  This is an evolving document.  I intend to keep adding sections in
  response to user feedback, so you should come back and review it
  periodically.


  2.  What's new

  New in 1.2: The section `How does my computer store things in
  memory?'.  New in 1.3: The sections `What happens when you log in?'
  and `File ownership, permissions and security'.  New in 1.4: Be more
  precise about what kernel does vs. what init does.  New in 1.7:
  Correct and expand the section on file permissions.

  Other version incorporate typo fixes and minor editorial changes.


  2.1.  Related resources

  If you're reading this in order to learn how to hack, you should also
  read the How To Become A Hacker FAQ
  <http://www.tuxedo.org/~esr/faqs/hacker-howto.html>.  It has links to
  some other useful resources.


  2.2.  New versions of this document

  New versions of the Unix and Internet Fundamentals HOWTO will be
  periodically posted to comp.os.linux.help and
  news:comp.os.linux.announce and news.answers.  They will also be
  uploaded to various Linux WWW and FTP sites, including the LDP home
  page.

  You can view the latest version of this on the World Wide Web via the
  URL <http://metalab.unc.edu/LDP/HOWTO/Unix-Internet-Fundamentals-
  HOWTO.html>.



  2.3.  Feedback and corrections


  If you have questions or comments about this document, please feel
  free to mail Eric S. Raymond, at esr@thyrsus.com. I welcome any
  suggestions or criticisms. I especially welcome hyperlinks to more
  detailed explanations of individual concepts.  If you find a mistake
  with this document, please let me know so I can correct it in the next
  version. Thanks.


  3.  Basic anatomy of your computer

  Your computer has a processor chip inside it that does the actual
  computing.  It has internal memory (what DOS/Windows people call
  ``RAM'' and Unix people often call ``core''; the Unix term is a folk
  memory from when RAM consisted of ferrite-core donuts).  The processor
  and memory live on the motherboard which is the heart of your
  computer.

  Your computer has a screen and keyboard.  It has hard drives and
  floppy disks.  The screen and your disks have controller cards that
  plug into the motherboard and help the computer drive these outboard
  devices.  (Your keyboard is too simple to need a separate card; the
  controller is built into the keyboard chassis itself.)

  We'll go into some of the details of how these devices work later.
  For now, here are a few basic things to keep in mind about how they
  work together:

  All the inboard parts of your computer are connected by a bus.
  Physically, the bus is what you plug your controller cards into (the
  video card, the disk controller, a sound card if you have one).  The
  bus is the data highway between your processor, your screen, your
  disk, and everything else.

  The processor, which makes everything else go, can't actually see any
  of the other pieces directly; it has to talk to them over the bus.
  The only other subsystem it has really fast, immediate access to is
  memory (the core).  In order for programs to run, then, they have to
  be in core (in memory).

  When your computer reads a program or data off the disk, what actually
  happens is that the processor uses the bus to send a disk read request
  to your disk controller.  Some time later the disk controller uses the
  bus to signal the processor that it has read the data and put it in a
  certain location in memory.  The processor can then use the bus to
  look at that data.

  Your keyboard and screen also communicate with the processor via the
  bus, but in simpler ways.  We'll discuss those later on.  For now, you
  know enough to understand what happens when you turn on your computer.


  4.  What happens when you switch on a computer?

  A computer without a program running is just an inert hunk of
  electronics.  The first thing a computer has to do when it is turned
  on is start up a special program called an operating system.  The
  operating system's job is to help other computer programs to work by
  handling the messy details of controlling the computer's hardware.

  The process of bringing up the operating system is called booting
  (originally this was bootstrapping and alluded to the difficulty of
  pulling yourself up ``by your bootstraps'').  Your computer knows how
  to boot because instructions for booting are built into one of its
  chips, the BIOS (or Basic Input/Output System) chip.

  The BIOS chip tells it to look in a fixed place on the lowest-numbered
  hard disk (the boot disk) for a special program called a boot loader
  (under Linux the boot loader is called LILO).  The boot loader is
  pulled into memory and started.  The boot loader's job is to start the
  real operating system.

  The loader does this by looking for a kernel, loading it into memory,
  and starting it.  When you boot Linux and see "LILO" on the screen
  followed by a bunch of dots, it is loading the kernel.  (Each dot
  means it has loaded another disk block of kernel code.)

  (You may wonder why the BIOS doesn't load the kernel directly -- why
  the two-step process with the boot loader?  Well, the BIOS isn't very
  smart.  In fact it's very stupid, and Linux doesn't use it at all
  after boot time.  It was originally written for primitive 8-bit PCs
  with tiny disks, and literally can't access enough of the disk to load
  the kernel directly.  The boot loader step also lets you start one of
  several operating systems off different places on your disk, in the
  unlikely event that Unix isn't good enough for you.)

  Once the kernel starts, it has to look around, find the rest of the
  hardware, and get ready to run programs.  It does this by poking not
  at ordinary memory locations but rather at I/O ports -- special bus
  addresses that are likely to have device controller cards listening at
  them for commands.  The kernel doesn't poke at random; it has a lot of
  built-in knowledge about what it's likely to find where, and how
  controllers will respond if they're present.  This process is called
  autoprobing.

  Most of the messages you see at boot time are the kernel autoprobing
  your hardware through the I/O ports, figuring out what it has
  available to it and adapting itself to your machine.  The Linux kernel
  is extremely good at this, better than most other Unixes and much
  better than DOS or Windows.  In fact, many Linux old-timers think the
  cleverness of Linux's boot-time probes (which made it relatively easy
  to install) was a major reason it broke out of the pack of free-Unix
  experiments to attract a critical mass of users.

  But getting the kernel fully loaded and running isn't the end of the
  boot process; it's just the first stage (sometimes called run level
  1).  After this first stage, the kernel hands control to a special
  process called `init' which spawns several housekeeping processes.

  The init process's first job is usually to check to make sure your
  disks are OK.  Disk file systems are fragile things; if they've been
  damaged by a hardware failure or a sudden power outage, there are good
  reasons to take recovery steps before your Unix is all the way up.
  We'll go into some of this later on when we talk about ``how file
  systems can go wrong''.

  Init's next step is to start several daemons.  A daemon is a program
  like a print spooler, a mail listener or a WWW server that lurks in
  the background, waiting for things to do.  These special programs
  often have to coordinate several requests that could conflict.  They
  are daemons because it's often easier to write one program that runs
  constantly and knows about all requests than it would be to try to
  make sure that a flock of copies (each processing one request and all
  running at the same time) don't step on each other.  The particular
  collection of daemons your system starts may vary, but will almost
  always include a print spooler (a gatekeeper daemon for your printer).

  Once all daemons are started, we're at run level 2.  The next step is
  to prepare for users.  Init starts a copy of a program called getty to
  watch your console (and maybe more copies to watch dial-in serial
  ports).  This program is what issues the login prompt to your console.
  We're now at run level 3 and ready for you to log in and run programs.


  5.  What happens when you log in?

  When you log in (give a name and password) you identify yourself to
  getty and the computer.  It then runs a program called (naturally
  enough) login, which checks to see if you are authorized to be using
  the machine.  If you aren't, your login attempt will be rejected.  If
  you are, login does a few housekeeping things and then starts up a
  command interpreter, the shell.  (Yes, getty and login could be one
  program.  They're separate for historical reasons not worth going into
  here.)

  Here's a bit more about what the system does before giving you a shell
  (you'll need to know this later when we talk about file permissions).
  You identify yourself with a login name and password.  That login name
  is looked up in a file called /etc/password, which is a sequence of
  lines each describing a user account.

  One of these fields is an encrypted version of the account password.
  What you enter as an account password is encrypted in exactly the same
  way, and the login program checks to see if they match.  The security
  of this method depends on the fact that, while it's easy to go from
  your clear password to the encrypted version, the reverse is very
  hard.  Thus, even if someone can see the encrypted version of your
  password, they can't use your account.  (It also means that if you
  forget your password, there's no way to recover it, only to change it
  to something else you choose.)

  Once you have successfully logged in, you get all the privileges
  associated with the individual account you are using.  You may also be
  recognized as part of a group.  A group is a named collection of users
  set up by the system administrator.  Groups can have privileges
  independently of their members' privileges.  A user can be a member of
  multiple groups.  (For details about how Unix privileges work, see the
  section below on ``''.)

  (Note that although you will normally refer to users and groups by
  name, they are actually stored internally as numeric IDs.  The
  password file maps your account name to a user ID; the /etc/group file
  maps group names to numeric group IDs.  Commands that deal with
  accounts and groups do the translation automatically.)

  Your account entry also contains your home directory, the place in the
  Unix file system where your personal files will live.  Finally, your
  account entry also sets your shell, the command interpreter that login
  will start up to accept your commmands.


  6.  What happens when you run programs from the shell?

  The shell is Unix's interpreter for the commands you type in; it's
  called a shell because it wraps around and hides the operating system
  kernel. The normal shell gives you the '$' prompt that you see after
  logging in (unless you've customized it to something else).  We won't
  talk about shell syntax and the easy things you can see on the screen
  here; instead we'll take a look behind the scenes at what's happening
  from the computer's point of view.

  After boot time and before you run a program, you can think of your
  computer of containing a zoo of processes that are all waiting for
  something to do.  They're all waiting on events. An event can be you
  pressing a key or moving a mouse.  Or, if your machine is hooked to a
  network, an event can be a data packet coming in over that network.
  The kernel is one of these processes.  It's a special one, because it
  controls when the other user processes can run, and it is normally the
  only process with direct access to the machine's hardware.  In fact,
  user processes have to make requests to the kernel when they want to
  get keyboard input, write to your screen, read from or write to disk,
  or do just about anything other than crunching bits in memory.  These
  requests are known as system calls.

  Normally all I/O goes through the kernel so it can schedule the
  operations and prevent processes from stepping on each other.  A few
  special user processes are allowed to slide around the kernel, usually
  by being given direct access to I/O ports.  X servers (the programs
  that handle other programs' requests to do screen graphics on most
  Unix boxes) are the most common example of this.  But we haven't
  gotten to an X server yet; you're looking at a shell prompt on a
  character console.

  The shell is just a user process, and not a particularly special one.
  It waits on your keystrokes, listening (through the kernel) to the
  keyboard I/O port.  As the kernel sees them, it echos them to your
  screen then passes them to the shell.  When the kernel sees an `Enter'
  it passes your line of text to the shell. The shell tries to interpret
  those keystrokes as commands.

  Let's say you type `ls' and Enter to invoke the Unix directory lister.
  The shell applies its built-in rules to figure out that you want to
  run the executable command in the file `/bin/ls'.  It makes a system
  call asking the kernel to start /bin/ls as a new child process and
  give it access to the screen and keyboard through the kernel.  Then
  the shell goes to sleep, waiting for ls to finish.

  When /bin/ls is done, it tells the kernel it's finished by issuing an
  exit system call.  The kernel then wakes up the shell and tells it it
  can continue running.  The shell issues another prompt and waits for
  another line of input.

  Other things may be going on while your `ls' is executing, however
  (we'll have to suppose that you're listing a very long directory).
  You might switch to another virtual console, log in there, and start a
  game of Quake, for example.  Or, suppose you're hooked up to the
  Internet.  Your machine might be sending or receiving mail while
  /bin/ls runs.


  7.  How do input devices and interrupts work?

  Your keyboard is a very simple input device; simple because it
  generates small amounts of data very slowly (by a computer's
  standards).  When you press or release a key, that event is signalled
  up the keyboard cable to raise a hardware interrupt.

  It's the operating system's job to watch for such interrupts.  For
  each possible kind of interrupt, there will be an interrupt handler, a
  part of the operating system that stashes away any data associated
  with them (like your keypress/keyrelease value) until it can be
  processed.

  What the interrupt handler for your keyboard actually does is post the
  key value into a system area near the bottom of memory.  There, it
  will be available for inspection when the operating system passes
  control to whichever program is currently supposed to be reading from
  the keyboard.

  More complex input devices like disk or network cards work in a
  similar way.  Above, we referred to a disk controller using the bus to
  signal that a disk request has been fulfilled.  What actually happens
  is that the disk raises an interrupt.  The disk interrupt handler then
  copies the retrieved data into memory, for later use by the program
  that made the request.

  Every kind of interrupts has an associated priority level.  Lower-
  priority interrupts (like keyboard events) have to wait on higher-
  priority interrupts (like clock ticks or disk events).  Unix is
  designed to give high priority to the kinds of events that need to be
  processed rapidly in order to keep the machine's response smooth.

  In your OS's boot-time messages, you may see references to IRQ
  numbers.  You may be aware that one of the common ways to misconfigure
  hardware is to have two different devices try to use the same IRQ,
  without understanding exactly why.

  Here's the answer.  IRQ is short for "Interrupt Request".  The
  operating system needs to know at startup time which numbered
  interrupts each hardware device will use, so it can associate the
  proper handlers with each one.  If two different devices try use the
  same IRQ, interrupts will sometimes get dispatched to the wrong
  handler.  This will usually at least lock up the device, and can
  sometimes confuse the OS badly enough that it will flake out or crash.


  8.  How does my computer do several things at once?

  It doesn't, actually.  Computers can only do one task (or process) at
  a time.  But a computer can change tasks very rapidly, and fool slow
  human beings into thinking it's doing several things at once.  This is
  called timesharing.

  One of the kernel's jobs is to manage timesharing.  It has a part
  called the scheduler which keeps information inside itself about all
  the other (non-kernel) processes in your zoo.  Every 1/60th of a
  second, a timer goes off in the kernel, generating a clock interrupt.
  The scheduler stops whatever process is currently running, suspends it
  in place, and hands control to another process.

  1/60th of a second may not sound like a lot of time.  But on today's
  microprocessors it's enough to run tens of thousands of machine
  instructions, which can do a great deal of work.  So even if you have
  many processes, each one can accomplish quite a bit in each of its
  timeslices.

  In practice, a program may not get its entire timeslice. If an
  interrupt comes in from an I/O device, the kernel effectively stops
  the current task, runs the interrupt handler, and then returns to the
  current task.  A storm of high-priority interrupts can squeeze out
  normal processing; this misbehavior is called thrashing and is
  fortunately very hard to induce under modern Unixes.

  In fact, the speed of programs is only very seldom limited by the
  amount of machine time they can get (there are a few exceptions to
  this rule, such as sound or 3-D graphics generation).  Much more
  often, delays are caused when the program has to wait on data from a
  disk drive or network connection.

  An operating system that can routinely support many simultaneous
  processes is called "multitasking".  The Unix family of operating
  systems was designed from the ground up for multitasking and is very
  good at it -- much more effective than Windows or the Mac OS, which
  have had multitasking bolted into it as an afterthought and do it
  rather poorly.  Efficient, reliable multitasking is a large part of
  what makes Linux superior for networking, communications, and Web
  service.

  9.  How does my computer keep processes from stepping on each other?

  The kernel's scheduler takes care of dividing processes in time.  Your
  operating system also has to divide them in space, so that processes
  can't step on each others' working memory.  Even if you assume that
  all programs are trying to be cooperative, you don't want a bug in one
  of them to be able to corrupt others.  The things your operating
  system does to solve this problem are called memory management.

  Each process in your zoo needs its own area of memory, as a place to
  run its code from and keep variables and results in.  You can think of
  this set as consisting of a read-only code segment (containing the
  process's instructions) and a writeable data segment (containing all
  the process's variable storage).  The data segment is truly unique to
  each process, but if two processes are running the same code Unix
  automatically arranges for them to share a single code segment as an
  efficiency measure.

  Efficiency is important, because memory is expensive.  Sometimes you
  don't have enough to hold the entirety of all the programs the machine
  is running, especially if you are using a large program like an X
  server.  To get around this, Unix uses a strategy called virtual
  memory.  It doesn't try to hold all the code and data for a process in
  memory.  Instead, it keeps around only a relatively small working set;
  the rest of the process's state is left in a special swap space area
  on your hard disk.

  As the process runs, Unix tries to anticipate how the working set will
  change and have only the pieces that are needed in memory.  Doing this
  effectively is both complicated and tricky, so I won't try and
  describe it all here -- but it depends on the fact that code and data
  references tend to happen in clusters, with each new one likely to
  refer to somewhere close to an old one.  So if Unix keeps around the
  code or data most frequently (or most recently) used, you will usually
  succeed in saving time.

  Note that in the past, that "Sometimes" two paragraphs ago was "Almost
  always," -- the size of memory was typically small relative to the
  size of running programs, so swapping was frequent.  Memory is far
  less expensive nowadays and even low-end machines have quite a lot of
  it.  On modern single-user machines with 64MB of memory and up, it's
  possible to run X and a typical mix of jobs without ever swapping.

  Even in this happy situation, the part of the operating system called
  the memory manager still has important work to do.  It has to make
  sure that programs can only alter their own data segments -- that is,
  prevent erroneous or malicious code in one program from garbaging the
  data in another.  To do this, it keeps a table of data and code
  segments.  The table is updated whenever a process either requests
  more memory or releases memory (the latter usually when it exits).

  This table is used to pass commands to a specialized part of the
  underlying hardware called an MMU or memory management unit.  Modern
  processor chips have MMUs built right onto them.  The MMU has the
  special ability to put fences around areas of memory, so an out-of-
  bound reference will be refused and cause a special interrupt to be
  raised.

  If you ever see a Unix message that says "Segmentation fault", "core
  dumped" or something similar, this is exactly what has happened; an
  attempt by the running program to access memory (core) outside its
  segment has raised a fatal interrupt.  This indicates a bug in the
  program code; the core dump it leaves behind is diagnostic information
  intended to help a programmer track it down.


  There is another aspect to protecting processes from each other
  besides segregating the memory they access.  You also want to be able
  to control their file accesses so a buggy or malicious program can't
  corrupt critical pieces of the system.  This is why Unix has ``file
  permissions''m which we'll discuss later.


  10.  How does my computer store things in memory?

  You probably know that everything on a computer is stored as strings
  of bits (binary digits; you can think of them as lots of little on-off
  switches).  Here we'll explain how those bits are used to represent
  the letters and numbers that your computer is crunching.

  Before we can go into this, you need to understand about the the word
  size of your computer.  The word size is the computer's preferred size
  for moving units of information around; technically it's the width of
  your processor's registers, which are the holding areas your processor
  uses to do arithmetic and logical calculations.  When people write
  about computers having bit sizes (calling them, say, ``32-bit'' or
  ``64-bit'') computers, this is what they mean.

  Most computers (including 386, 486, Pentium and Pentium II PCs) have a
  word size of 32 bits.  The old 286 machines had a word size of 16.
  Old-style mainframes often had 36-bit words.  A few processors (like
  the Alpha from what used to be DEC and is now Compaq) have 64-bit
  words.  The 64-bit word will become more common over the next five
  years; Intel is planning to replace the Pentium series with a 64-bit
  chip code-named `Merced', and now officially called the `Itanium'.

  The computer views your memory as a sequence of words numbered from
  zero up to some large value dependent on your memory size. That value
  is limited by your word size, which is why older machines like 286s
  had to go through painful contortions to address large amounts of
  memory.  I won't describe them here; they still give older programmers
  nightmares.


  10.1.  Numbers

  Numbers are represented as either words or pairs of words, depending
  on your processor's word size.  One 32-bit machine word is the most
  common size.

  Integer arithmetic is close to but not actually mathematical base-two.
  The low-order bit is 1, next 2, then 4 and so forth as in pure binary.
  But signed numbers are represented in twos-complement notation.  The
  highest-order bit is a sign bit which makes the quantity negative, and
  every negative number can be obtained from the corresponding positive
  value by inverting all the bits.  This is why integers on a 32-bit
  machine have the range -2^31 + 1 to 2^31 - 1 (where ^ is the `power'
  operation, 2^3 = 8).  That 32nd bit is being used for sign.

  Some computer languages give you access to unsigned arithmetic which
  is straight base 2 with zero and positive numbers only.

  Most processors and some languages can do in floating-point numbers
  (this capability is built into all recent processor chips).  Floating-
  point numbers give you a much wider range of values than integers and
  let you express fractions.  The ways this is done vary and are rather
  too complicated to discuss in detail here, but the general idea is
  much like so-called `scientific notation', where one might write (say)
  1.234 * 10^23; the encoding of the number is split into a mantissa
  (1.234) and the exponent part (23) for the power-of-ten multiplier.


  10.2.  Characters

  Characters are normally represented as strings of seven bits each in
  an encoding called ASCII (American Standard Code for Information
  Interchange).  On modern machines, each of the 128 ASCII characters is
  the low seven bits of an 8-bit octet; octets are packed into memory
  words so that (for example) a six-character string only takes up two
  memory words.  For an ASCII code chart, type `man 7 ascii' at your
  Unix prompt.

  The preceding paragraph was misleading in two ways.  The minor one is
  that the term `octet' is formally correct but seldom actually used;
  most people refer to an octet as byte and expect bytes to be eight
  bits long.  Strictly speaking, the term `byte' is more general; there
  used to be, for example, 36-bit machines with 9-bit bytes (though
  there probably never will be again).

  The major one is that not all the world uses ASCII.  In fact, much of
  the world can't -- ASCII, while fine for American English, lacks many
  accented and other special characters needed by users of other
  languages.  Even British English has trouble with the lack of a pound-
  currency sign.

  There have been several attempts to fix this problem.  All use the
  extra high bit that ASCII doesn't, making it the low half of a
  256-character set.  The most widely-used of these is the so-called
  `Latin-1' character set (more formally called ISO 8859-1).  This is
  the default character set for Linux, HTML, and X.  Microsoft Windows
  uses a mutant version of Latin-1 that adds a bunch of characters such
  as right and left double quotes in places proper Latin-1 leaves
  unassigned for historical reasons (for a scathing account of the
  trouble this causes, see the demoroniser
  <http://www.fourmilab.ch/webtools/demoroniser/> page).

  Latin-1 handles the major European languages, including English,
  French, German, Spanish, Italian, Dutch, Norwegian, Swedish, Danish.
  However, this isn't good enough either, and as a result there is a
  whole series of Latin-2 through -9 character sets to handle things
  like Greek, Arabic, Hebrew, Esperanto, and Serbo-Croatian.  For
  details, see the ISO alphabet soup
  <http://www.utia.cas.cz/user_data/vs/documents/ISO-8859-X-
  charsets.html> page.

  The ultimate solution is a huge standard called Unicode (and its
  identical twin ISO/IEC 10646-1:1993).  Unicode is identical to Latin-1
  in its lowest 256 slots.  Above these in 16-bit space it includes
  Greek, Cyrillic, Armenian, Hebrew, Arabic, Devanagari, Bengali,
  Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Thai,
  Lao, Georgian, Tibetan, Japanese Kana, the complete set of modern
  Korean Hangul, and a unified set of Chinese/Japanese/Korean (CJK)
  ideographs. For details, see the Unicode Home Page
  <http://www.unicode.org/>


  11.  How does my computer store things on disk?

  When you look at a hard disk under Unix, you see a tree of named
  directories and files.  Normally you won't need to look any deeper
  than that, but it does become useful to know what's going on
  underneath if you have a disk crash and need to try to salvage files.
  Unfortunately, there's no good way to describe disk organization from
  the file level downwards, so I'll have to describe it from the
  hardware up.



  11.1.  Low-level disk and file system structure

  The surface area of your disk, where it stores data, is divided up
  something like a dartboard -- into circular tracks which are then pie-
  sliced into sectors.  Because tracks near the outer edge have more
  area than those close to the spindle at the center of the disk, the
  outer tracks have more sector slices in them than the inner ones.
  Each sector (or disk block) has the same size, which under modern
  Unixes is generally 1 binary K (1024 8-bit words).  Each disk block
  has a unique address or disk block number.

  Unix divides the disk into disk partitions.  Each partition is a
  continuous span of blocks that's used separately from any other
  partition, either as a file system or as swap space.  The original
  reasons for partitions had to do with crash recovery in a world of
  much slower and more error-prone disks; the boundaries between them
  reduce the fraction of your disk likely to become inaccessible or
  corrupted by a random bad spot on the disk.  Nowadays, it's more
  important that partitions can be declared read-only (preventing an
  intruder from modifying critical system files) or shared over a
  network through various means we won't discuss here.  The lowest-
  numbered partition on a disk is often treated specially, as a boot
  partition where you can put a kernel to be booted.

  Each partition is either swap space (used to implement ``virtual
  memory'' or a file system used to hold files.  Swap-space partitions
  are just treated as a linear sequence of blocks.  File systems, on the
  other hand, need a way to map file names to sequences of disk blocks.
  Because files grow, shrink, and change over time, a file's data blocks
  will not be a linear sequence but may be scattered all over its
  partition (from wherever the operating system can find a free block
  when it needs one).


  11.2.  File names and directories

  Within each file system, the mapping from names to blocks is handled
  through a structure called an i-node.  There's a pool of these things
  near the ``bottom'' (lowest-numbered blocks) of each file system (the
  very lowest ones are used for housekeeping and labeling purposes we
  won't describe here).  Each i-node describes one file.  File data
  blocks live above the inodes (in higher-numbered blocks).

  Every i-node contains a list of the disk block numbers in the file it
  describes.  (Actually this is a half-truth, only correct for small
  files, but the rest of the details aren't important here.)  Note that
  the i-node does not contain the name of the file.

  Names of files live in directory structures.  A directory structure
  just maps names to i-node numbers.  This is why, in Unix, a file can
  have multiple true names (or hard links); they're just multiple
  directory entries that happen to point to the same inode.


  11.3.  Mount points

  In the simplest case, your entire Unix file system lives in just one
  disk partition.  While you'll see this arrangement on some small
  personal Unix systems, it's unusual.  More typical is for it to be
  spread across several disk partitions, possibly on different physical
  disks.   So, for example, your system may have one small partition
  where the kernel lives, a slightly larger one where OS utilities live,
  and a much bigger one where user home directories live.

  The only partition you'll have access to immediately after system boot
  is your root partition, which is (almost always) the one you booted
  from.  It holds the root directory of the file system, the top node
  from which everything else hangs.

  The other partitions in the system have to be attached to this root in
  order for your entire, multiple-partition file system to be
  accessible.  About midway through the boot process, your Unix will
  make these non-root partitions accessible.  It will mount each one
  onto a directory on the root partition.

  For example, if you have a Unix directory called `/usr', it is
  probably a mount point to a partition that contains many programs
  installed with your Unix but not required during initial boot.


  11.4.  How a file gets looked up

  Now we can look at the file system from the top down.  When you open a
  file (such as, say, /home/esr/WWW/ldp/fundamentals.sgml) here is what
  happens:

  Your kernel starts at the root of your Unix file system (in the root
  partition).  It looks for a directory there called `home'.  Usually
  `home' is a mount point to a large user partition elsewhere, so it
  will go there.  In the top-level directory structure of that user
  partition, it will look for a entry called `esr' and extract an inode
  number.  It will go to that i-node, notice it is a directory
  structure, and look up `WWW'.  Extracting that i-node, it will go to
  the corresponding subdirectory and look up `ldp'.  That will take it
  to yet another directory inode.  Opening that one, it will find an i-
  node number for `fundamentals.sgml'.  That inode is not a directory,
  but instead holds the list of disk blocks associated with the file.


  11.5.  File ownership, permissions and security

  To keep programs from accidentally or maliciously stepping on data
  they shouldn't, Unix has permission features.  These were originally
  designed to support timesharing by protecting multiple users on the
  same machine from each other, back in the days when Unix ran mainly on
  expensive shared minicomputers.

  In order to understand file permissions, you need to recall our
  description of of users and groups in the section ``What happens when
  you log in?''.  Each file has an owning user and an owning group.
  These are initially those of the file's creator; they can be changed
  with the programs chown(1) and chgrp(1).

  The basic permissions that can be associated with a file are `read'
  (permission to read data from it), `write' (permission to modify it)
  and `execute' (permission to run it as a program).  Each file has
  three sets of permissions; one for its owning user, one for any user
  in its owning group, and one for everyone else.  The `privileges' you
  get when you log in are just the ability to do read, write, and
  execute on those files for which the permission bits match your user
  ID or one of the groups you are in.

  To see how these may interact and how Unix displays them, let's look
  at some file listings on a hypothetical Unix system.  Here's one:



       snark:~$ ls -l notes
       -rw-r--r--   1 esr      users         2993 Jun 17 11:00 notes



  This is an ordinary data file.  The listing tells us that it's owned
  by the user `esr' and was created with the owning group `users'.
  Probably the machine we're on puts every ordinary user in this group
  by default; other groups you commonly see on timesharing machines are
  `staff', `admin', or `wheel' (for obvious reasons, groups are not very
  important on single-user workstations or PCs).  Your Unix may use a
  different default group, perhaps one named after your user ID.

  The string `-rw-r--r--' represents the permission bits for the file.
  The very first dash is the position for the directory bit; it would
  show `d' if the file were a directory.  After that, the first three
  places are user permissions, the second three group permissions, and
  the third are permissions for others (often called `world'
  permissions).  On this file, the owning user `esr' may read or write
  the file, other people in the `users' group may read it, and everybody
  else in the world may read it.  This is a pretty typical set of
  permissions for an ordinary data file.

  Now let's look at a file with very different permissions.  This file
  is GCC, the GNU C compiler.



       snark:~$ ls -l /usr/bin/gcc
       -rwxr-xr-x   3 root     bin         64796 Mar 21 16:41 /usr/bin/gcc



  This file belongs to a user called `root' and a group called `bin'; it
  can be written (modified) only by root, but read or executed by
  anyone.  This is a typical ownership and set of permissions for a pre-
  installed system command.  The `bin' group exists on some Unixes to
  group together system commands (the name is a historical relic, short
  for `binary').  Your Unix might use a `root' group instead (not quite
  the same as the `root' user!).

  The `root' user is the conventional name for numeric user ID 0, a
  special, privileged account that can override all privileges.  Root
  access is useful but dangerous; a typing mistake while you're logged
  in as root can clobber critical system files that the same command
  executed from an ordinary user account could not touch.

  Because the root account is so powerful, access to it should be
  guarded very carefully.  Your root password is the single most
  critical piece of security information on your system, and it is what
  any crackers and intruders who ever come after you will be trying to
  get.

  About passwords: Don't write them down -- and don't pick a passwords
  that can easily be guessed, like the first name of your
  girlfriend/boyfriend/spouse.  This is an astonishingly common bad
  practice that helps crackers no end.  In general, don't pick any word
  in the dictionary; there are programs called `dictionary crackers'
  that look for likely passwords by running through word lists of common
  choices.  A good technique is to pick a combination consisting of a
  word, a digit, and another word, such as `shark6cider' or `jump3joy';
  that will make the search space too large for a dictionary cracker.
  Don't use these examples, though -- crackers might expect that after
  reading this document and put them in their dictionaries.

  Now let's look at a third case:



  snark:~$ ls -ld ~
  drwxr-xr-x  89 esr      users          9216 Jun 27 11:29 /home2/esr
  snark:~$



  This file is a directory (note the `d' in the first permissions slot).
  We see that it can be written only by esr, but read and executed by
  anybody else.

  Read permission gives you the ability to list the directory -- that
  is, to see the names of files and directories it contains. Write
  permission gives you the ability to create and delete files in the
  directory.  If you remember that the directory imcludes a list of the
  names of the files and subdirectories it contains, these rules will
  make sense.

  Execute permission on a directory means you can get through the
  directory to open the files and directories below it.  In effect, it
  gives you permission to access the inodes in thbe directory.  A
  directory with execute completely turned off would be useless.

  Occasionally you'll see a directory that is world-executable but not
  world-readable; this means a random user can get to files and
  directories beneath it, but only by knowing their exact names (the
  directory cannot be listed).

  It's important to remember that read, write, or execute permission on
  a directory is independent of the permissions on the files and
  directories beneath.  In particular, write access on a directory means
  you can create new files or delete existing files there, but ity does
  not automatically give you write access to existing files.

  Finally, let's look at the permissions of the login program itself.



       snark:~$ ls -l /bin/login
       -rwsr-xr-x   1 root     bin         20164 Apr 17 12:57 /bin/login



  This has the permissions we'd expect for a system command -- except
  for that 's' where the owner-execute bit ought to be.  This is the
  visible manifestation of a special permission called the `set-user-id'
  or setuid bit.

  The setuid bit is normally attached to programs that need to give
  ordinary users the privileges of root, but in a controlled way.  When
  it is set on an executable program, you get the privileges of the
  owner of that program file while the program is running on your
  behalf, whether or not they match your own.

  Like the root account itself, setuid programs are useful but
  dangerous.  Anyone who can subvert or modify a setuid program owned by
  root can use it to spawn a shell with root privileges.  For this
  reason, opening a file to write it automatically turns off its setuid
  bit on most Unixes.  Many attacks on Unix security try to exploit bugs
  in setuid programs in order to subvert them.  Security-conscious
  system administrators are therefore extra-careful about these programs
  and relucvtant to install new ones.

  There are a couple of important details we glossed over when
  discussing permissions above; namely, how the owning group and
  permissions are assigned when a file or directory is first created.
  The group is an issue because users can be members of multiple groups,
  but one of them (specified in the user's /etc/passwd entry) is the
  user's default group and will normally own files created by the user.

  The story with initial permission bits is a little more complicated.
  A program that creates a file will normally specify the permissions it
  is to start with.  But these will be modified by a variable in the
  user's environment called the umask.  The umask specifies which
  permission bits to turn off when creating a file; the most common
  value, and the default on most systems, is -------w- or 002, which
  turns off the world-write bit.  See the documentation of the umask
  command on your shell's manual page for details.

  Initial directory group is also a bit complicated.  On some Unixes a
  new directory gets the default group of the creating user (this in the
  System V convention); on others, it gets the owning group of the
  parent directory in which it's created (this is the BSD convention).
  On some modern Unixes, including Linux, the latter behavior can be
  selected by setting the set-group-ID on the directory (chmod g+s).

  There is a useful discussion of file permissions in Eric
  Goebelbecker's article Take Command <http://www2.linuxjournal.com/cgi-
  bin/frames.pl/lj-issues/issue21/tc21.html>.


  11.6.  How things can go wrong

  Earlier we hinted that file systems can be fragile things.  Now we
  know that to get to file you have to hopscotch through what may be an
  arbitrarily long chain of directory and i-node references.  Now
  suppose your hard disk develops a bad spot?

  If you're lucky, it will only trash some file data.  If you're
  unlucky, it could corrupt a directory structure or i-node number and
  leave an entire subtree of your system hanging in limbo -- or, worse,
  result in a corrupted structure that points multiple ways at the same
  disk block or inode.  Such corruption can be spread by normal file
  operations, trashing data that was not in the original bad spot.

  Fortunately, this kind of contingency has become quite uncommon as
  disk hardware has become more reliable.  Still, it means that your
  Unix will want to integrity-check the file system periodically to make
  sure nothing is amiss.  Modern Unixes do a fast integrity check on
  each partition at boot time, just before mounting it.  Every few
  reboots they'll do a much more thorough check that takes a few minutes
  longer.

  If all of this sounds like Unix is terribly complex and failure-prone,
  it may be reassuring to know that these boot-time checks typically
  catch and correct normal problems before they become really
  disasterous.  Other operating systems don't have these facilities,
  which speeds up booting a bit but can leave you much more seriously
  screwed when attempting to recover by hand (and that's assuming you
  have a copy of Norton Utilities or whatever in the first place...).


  12.  How do computer languages work?

  We've already discussed ``how programs are run''.  Every program
  ultimately has to execute as a stream of bytes that are instructions
  in your computer's machine language.  But human beings don't deal with
  machine language very well; doing so has become a rare, black art even
  among hackers.


  Almost all Unix code except a small amount of direct hardware-
  interface support in the kernel itself is nowadays written in a high-
  level language.  (The `high-level' in this term is a historical relic
  meant to distinguish these from `low-level' assembler languages, which
  are basically thin wrappers around machine code.)

  There are several different kinds of high-level languages.  In order
  to talk about these, you'll find it useful to bear in mind that the
  source code of a program (the human-created, editable version) has to
  go through some kind of translation into machine code that the machine
  can actually run.


  12.1.  Compiled languages

  The most conventional kind of language is a compiled language.
  Compiled languages get translated into runnable files of binary
  machine code by a special program called (logically enough) a
  compiler.  Once the binary has been generated, you can run it directly
  without looking at the source code again.  (Most software is delivered
  as compiled binaries made from code you don't see.)

  Compiled languages tend to give excellent performance and have the
  most complete access to the OS, but also to be difficult to program
  in.

  C, the language in which Unix itself is written, is by far the most
  important of these (with its variant C++).  FORTRAN is another
  compiled language still used among engineers and scientists but years
  older and much more primitive.  In the Unix world no other compiled
  languages are in mainstream use.  Outide it, COBOL is very widely used
  for financial and business software.

  There used to be many other compiler languages, but most of them have
  either gone extinct or are strictly research tools.  If you are a new
  Unix developer using a compiled language, it is overwhelmingly likely
  to be C or C++.


  12.2.  Interpreted languages

  An interpreted language depends on an interpreter program that reads
  the source code and translates it on the fly into computations and
  system calls.  The source has to be re-interpreted (and the
  interpreter present) each time the code is executed.

  Interpreted languages tend to be slower than compiled languages, and
  often have limited access to the underlying operating system and
  hardware.  On the other hand, they tend to be easier to program and
  more forgiving of coding errors than compiled languages.

  Many Unix utilities, including the shell and bc(1) and sed(1) and
  awk(1), are effectively small interpreted languages.  BASICs are
  usually interpreted.  So is Tcl.  Historically, the most important
  interpretive language has been LISP (a major improvement over most of
  its successors).  Today Perl is very widely used and steadily growing
  more popular.


  12.3.  P-code languages

  Since 1990 a kind of hybrid language that uses both compilation and
  interpretation has become increasingly important.  P-code languages
  are like compiled languages in that the source is translated to a
  compact binary form which is what you actually execute, but that form
  is not machine code.  Instead it's pseudocode (or p-code), which is
  usually a lot simpler but more powerful than a real machine language.
  When you run the program, you interpret the p-code.

  P-code can run nearly as fast as a compiled binary (p-code
  interpreters can be made quite simple, small and speedy).  But p-code
  languages can keep the flexibility and power of a good interpreter.

  Important p-code languages include Python, Perl, and Java.


  13.  How does the Internet work?

  To help you understand how the Internet works, we'll look at the
  things that happen when you do a typical Internet operation --
  pointing a browser at the front page of this document at its home on
  the Web at the Linux Documentation Project.  This document is


  http://metalab.unc.edu/LDP/HOWTO/Fundamentals.html



  which means it lives in the file LDP/HOWTO/Fundamentals.html under the
  World Wide Web export directory of the host metalab.unc.edu.


  13.1.  Names and locations


  The first thing your browser has to do is to establish a network
  connection to the machine where the document lives.  To do that, it
  first has to find the network location of the host metalab.unc.edu
  (`host' is short for `host machine' or `network host'; metalab.unc.edu
  is a typical hostname).  The corresponding location is actually a
  number called an IP address (we'll explain the `IP' part of this term
  later).

  To do this, your browser queries a program called a name server.  The
  name server may live on your machine, but it's more likely to run on a
  service machine that yours talks to.  When you sign up with an ISP,
  part of your setup procedure will almost certainly involve telling
  your Internet software the IP address of a nameserver on the ISP's
  network.

  The name servers on different machines talk to each other, exchanging
  and keeping up to date all the information needed to resolve hostnames
  (map them to IP addresses).  Your nameserver may query three or four
  different sites across the network in the process of resolving
  metalab.unc.edu, but this usually happens very quickly (as in less
  than a second).

  The nameserver will tell your browser that Metalab's IP address is
  152.2.22.81; knowing this, your machine will be able to exchange bits
  with metalab directly.


  13.2.  Packets and routers


  What the browser wants to do is send a command to the Web server on
  Metalab that looks like this:


  GET /LDP/HOWTO/Fundamentals.html HTTP/1.0


  Here's how that happens.  The command is made into a packet, a block
  of bits like a telegram that is wrapped with three important things;
  the source address (the IP address of your machine), the destination
  address (152.2.22.81), and a service number or port number (80, in
  this case) that indicates that it's a World Wide Web request.

  Your machine then ships the packet down the wire (modem connection to
  your ISP, or local network) until it gets to a specialized machine
  called a router.  The router has a map of the Internet in its memory
  -- not always a complete one, but one that completely describes your
  network neighborhood and knows how to get to the routers for other
  neighborhoods on the Internet.

  Your packet may pass through several routers on the way to its
  destination.  Routers are smart.  They watch how long it takes for
  other routers to acknowledge having received a packet.  They use that
  information to direct traffic over fast links.  They use it to notice
  when another routers (or a cable) have dropped off the network, and
  compensate if possible by finding another route.

  There's an urban legend that the Internet was designed to survive
  nuclear war.  This is not true, but the Internet's design is extremely
  good at getting reliable performance out of flaky hardware in an
  uncertain world..  This is directly due to the fact that its
  intelligence is distributed through thousands of routers rather than a
  few massive switches (like the phone network).  This means that
  failures tend to be well localized and the network can route around
  them.

  Once your packet gets to its destination machine, that machine uses
  the service number to feed the packet to the web server.  The web
  server can tell where to reply to by looking at the command packet's
  source IP address. When the web server returns this document, it will
  be broken up into a number of packets.  The size of the packets will
  vary according to the transmission media in the network and the type
  of service.


  13.3.  TCP and IP

  To understand how multiple-packet transmissions are handled, you need
  to know that the Internet actually uses two protocols, stacked one on
  top of the other.

  The lower level, IP (Internet Protocol), knows how to get individual
  packets from a source address to a destination address (this is why
  these are called IP addresses).  However, IP is not reliable; if a
  packet gets lost or dropped, the source and destination machines may
  never know it.  In network jargon, IP is a connectionless protocol;
  the sender just fires a packet at the receiver and doesn't expect an
  acknowledgement.

  IP is fast and cheap, though.  Sometimes fast, cheap and unreliable is
  OK.  When you play networked Doom or Quake, each bullet is represented
  by an IP packet.  If a few of those get lost, that's OK.

  The upper level, TCP (Transmission Control Protocol), gives you
  reliability.  When two machines negotiate a TCP connection (which they
  do using IP), the receiver knows to send acknowledgements of the
  packets it sees back to the sender.  If the sender doesn't see an
  acknowledgement for a packet within some timeout period, it resends
  that packet.  Furthermore, the sender gives each TCP packet a sequence
  number, which the receiver can use you reassemble packets in case they
  show up out of order.  (This can happen if network links go up or down
  during a connection.)

  TCP/IP packets also contain a checksum to enable detection of data
  corrupted by bad links.  So, from the point of view of anyone using
  TCP/IP and nameservers, it looks like a reliable way to pass streams
  of bytes between hostname/service-number pairs.  People who write
  network protocols almost never have to think about all the
  packetizing, packet reassembly, error checking, checksumming, and
  retransmission that goes on below that level.


  13.4.  HTTP, an application protocol

  Now let's get back to our example.  Web browsers and servers speak an
  application protocol that runs on top of TCP/IP, using it simply as a
  way to pass strings of bytes back and forth.  This protocol is called
  HTTP (Hyper-Text Transfer Protocol) and we've already seen one command
  in it -- the GET shown above.

  When the GET command goes to metalab.unc.edu's webserver with service
  number 80, it will be dispatched to a server daemon listening on port
  80.  Most Internet services are implemented by server daemons that do
  nothing but wait on ports, watching for and executing incoming
  commands.

  If the design of the Internet has one overall rule, it's that all the
  parts should be as simple and human-accessible as possible.  HTTP, and
  its relatives (like the Simple Mail Transfer Protocol, SMTP, that is
  used to move electronic mail between hosts) tend to use simple
  printable-text commands that end with a carriage-return/line feed.

  This is marginally inefficient; in some circumstances you could get
  more speed by using a tightly-coded binary protocol.  But experience
  has shown that the benefits of having commands be easy for human
  beings to describe and understand outweigh any marginal gain in
  efficiency that you might get at the cost of making things tricky and
  opaque.

  Therefore, what the server daemon ships back to you via TCP/IP is also
  text.  The beginning of the response will look something like this (a
  few headers have been suppressed):


  HTTP/1.1 200 OK
  Date: Sat, 10 Oct 1998 18:43:35 GMT
  Server: Apache/1.2.6 Red Hat
  Last-Modified: Thu, 27 Aug 1998 17:55:15 GMT
  Content-Length: 2982
  Content-Type: text/html



  These headers will be followed by a blank line and the text of the web
  page (after which the connection is dropped).  Your browser just
  displays that page.  The headers tell it how (in particular, the
  Content-Type header tells it the returned data is really HTML).




User Authentication HOWTO

Peter Hernberg

   2000/05/02
   
   Explains how user and group information is stored and how users are
   authenticated on a Linux system (PAM), and how to secure you system's
   user authentication.
     _________________________________________________________________
   
   Table of Contents
   [1]Introduction
          
        [2]How this document came to be
        [3]New versions
        [4]Feedback
        [5]Version History
        [6]Copyrights and Trademarks
        [7]Acknowledgements and Thanks
        [8]Assumptions about the reader
                
   [9]How User Information is Stored on Your System
          
        [10]/etc/passwd
        [11]Shadow passwords
        [12]/etc/group and /etc/gshadow
        [13]MD5 encrypted passwords
        [14]Sifting through the mess
                
   [15]PAM (Pluggable Authentication Modules)
          
        [16]Why
        [17]What
        [18]How
        [19]Getting more information
                
   [20]Securing User Authentication
          
        [21]A strong /etc/pam.d/other
        [22]Disabling logins for user with null passwords
        [23]Disable unused services
        [24]Password-cracking tools
        [25]Shadow and MD5 passwords
                
   [26]Tying it all together
          
        [27]Apache + mod_auth_pam
                
   [28]Resources
          
        [29]PAM
        [30]General Security
        [31]Offline Documentation
                
   [32]Conclusion
          
Introduction

How this document came to be

   When trying to add a number of (mostly unnecessary :) network services
   to my existing home network, I kept running into the problem of
   authentication, so I decided to figure out how authentication works on
   linux systems, write a HOWTO, and call it my senior project. I hope
   this document helps you understand this often-forgotten, but very
   important, aspect of system administration.
     _________________________________________________________________
   
New versions

   When I get my domain up running properly, you'll be able to find the
   newest version of this document there. Until then,
   http://www.linuxdoc.org/ will have to suffice.
     _________________________________________________________________
   
Feedback

   Comments, corrections, suggestions, flames, and flying saucer
   sightings can be sent to petehern@yahoo.com.
     _________________________________________________________________
   
Version History

   v0.1 (May 13, 2000) first version (not released).
   
   v0.3 (May 14, 2000) revised (not released).
   
   v0.5 (May 15, 2000) added section on securing pam, added resources
   section (not released).
   
   v0.7 (May 15, 2000) revised; ready for release.
     _________________________________________________________________
   
Copyrights and Trademarks

   (c) 2000 Peter Hernberg
   
   This manual may be reproduced in whole or in part, without fee,
   subject to the following restrictions:
   
     * The copyright notice above and this permission notice must be
       preserved complete on all complete or partial copies
     * Any translation or derived work must be approved by the author in
       writing before distribution.
     * If you distribute this work in part, instructions for obtaining
       the complete version of this manual must be included, and a means
       for obtaining a complete version provided.
     * Small portions may be reproduced as illustrations for reviews or
       quotes in other works without this permission notice if proper
       citation is given. Exceptions to these rules may be granted for
       academic purposes: Write to the author and ask. These restrictions
       are here to protect us as authors, not to restrict you as learners
       and educators. Any source code (aside from the SGML this document
       was written in) in this document is placed under the GNU General
       Public License, available via anonymous FTP from the GNU archive.
     _________________________________________________________________
   
Acknowledgements and Thanks

   Thanks to my family for putting up with me for 18 years. Thanks to the
   Debian folks for making such a sweet distro for me to play with.
   Thanks to [33]CGR for paying me to be a geek. Thanks to Sandy Harris
   for his helpful suggestions. Finally, I'd like thank the makers of
   ramen noodles, because I don't know how I'd live without them.
     _________________________________________________________________
   
Assumptions about the reader

   For the purpose of this document, it is assumed that the reader is
   comfortably with executing commands at the command line and editing
   text configuration files.
     _________________________________________________________________
   
How User Information is Stored on Your System

/etc/passwd

   On almost all linux distributions (and commercial *nixes as well),
   user information is stored in /etc/passwd, a text file which contains
   the user's login, their encrypted password, a unique numerical user id
   (called the uid), a numerical group id (called the gid), an optional
   comment field (usually containing such items as their real name, phone
   number, etc.), their home directory, and their preferred shell. A
   typical entry in /etc/passwd looks something like this:
  pete:K3xcO1Qnx8LFN:1000:1000:Peter Hernberg,,,1-800-FOOBAR:/home/pete:/bin/ba
sh

   As you can see, it's pretty straight-forward. Each entry contains the
   six fields I described above, with each field separated by a colon. If
   this were as complex as user authentication got, there would be no
   need for this HOWTO.
     _________________________________________________________________
   
Shadow passwords

   Looking at your /etc/passwd, it's likely that you actually saw
   something like this:
  pete:x:1000:1000:Peter Hernberg,,,1-800-FOOBAR:/home/pete:/bin/bash

   Where did the encrypted password go? Before I tell you where it went,
   a bit explanation is required.
   
   The /etc/passwd file, which contains information about all users,
   including their encrypted password, is readable by all users, making
   it possible for any user to get the encrypted password of everyone on
   the system. Though the passwords are encrypted, password-cracking
   programs are widely available. To combat this growing security threat,
   shadow passwords were developed.
   
   When a system has shadow passwords enabled, the password field in
   /etc/passwd is replaced by an "x" and the user's real encrypted
   password is stored in /etc/shadow. Because /etc/shadow is only
   readable by the root user, malicious users cannot crack their fellow
   users' passwords. Each entry in /etc/shadow contains the user's login,
   their encrypted password, and a number of fields relating to password
   expiration. A typical entry looks like this:
    pete:/3GJllg1o4152:11009:0:99999:7:::
     _________________________________________________________________
   
/etc/group and /etc/gshadow

   Group information is stored in /etc/group. The format is similar to
   that of /etc/passwd, with the entries containing fields for the group
   name, password, numerical id (gid), and a comma-separated list of
   group members. An entry in /etc/group looks like this:
   pasta:x:103:spagetti,fettucini,linguine,vermicelli

   As you can see from the "x" in the password field, group passwords can
   be shadowed as well. Although groups almost never have their own
   passwords, it is worth noting that shadowed group password information
   is stored in /etc/gshadow.
     _________________________________________________________________
   
MD5 encrypted passwords

   Traditionally, unix passwords were encrypted with the standard crypt()
   function. (For more information on the crypt() function, see the
   crypt(3) manpage.) As computers grew faster, passwords encrypted with
   this function became easier to crack. As the internet emerged, tools
   for distributed the task of password-cracking across multiple hosts
   became available. Many newer distributions ship with the option of
   encrypting passwords with the stronger MD5 hash algorithm. (For more
   information on the MD5 hash algorithm, consult RFC 1321.) While MD5
   passwords will not eliminate the threat of password cracking, they
   will make cracking your passwords much more difficult.
     _________________________________________________________________
   
Sifting through the mess

   As you can see, there are a number of different ways user
   authentication information can be stored on your system (shadow
   passwords without MD5 encryption, /etc/passwd passwords with MD5
   encryption, etc.). How do programs like login and su know how to
   verify your password? Worse yet, what if you wanted to change the way
   passwords are stored on your system? How will programs that need your
   password know that passwords are stored differently? PAM is the
   answer.
     _________________________________________________________________
   
PAM (Pluggable Authentication Modules)

   Pluggable authentication modules are at the core of user
   authentication in any modern linux distribution.
     _________________________________________________________________
   
Why

   Back in the good old days of linux, if a program, such as su, passwd,
   login, or xlock, needed to authenticate a user, it would simply read
   the necessary information from /etc/passwd. If it needed to change the
   users' password, it would simply edit /etc/passwd. This simple but
   clumsy method presented numerous problems for system administrators
   and application developers. As MD5 and shadow passwords became
   increasingly popular, each program requiring user authentication had
   to know how to get the proper information when dealing with a number
   of different schemes. If you wanted to change your user authentication
   scheme, all these programs had to be recompiled. PAM eliminates this
   mess by enabling programs to transparently authenticate users,
   regardless of how user information is stored.
     _________________________________________________________________
   
What

   Quoting from the [34]Linux-PAM System Administrator's Guide: "It is
   the purpose of the Linux-PAM project to separate the development of
   privilege granting software from the development of secure and
   appropriate authentication schemes. This is accomplished by providing
   a library of functions that an application may use to request that a
   user be authenticated." With PAM, it doesn't matter whether your
   password is stored in /etc/passwd or on a server in Hong Kong. When a
   program needs to authenticate a user, PAM provides a library
   containing the functions for the proper authentication scheme. Because
   this library is loaded dynamically, changing authentication schemes
   can be done by simply editing a configuration file.
   
   Flexibility is one of PAM's greatest strengths. PAM can be configured
   to deny certain programs the right to authenticate users, to only
   allow certain users to be authenticated, to warn when certain programs
   attempt to authenticate, or even to deprive all users of login
   privileges. PAM's modular design gives you complete control over how
   users are authenticated.
     _________________________________________________________________
   
Distributions that support pam.

   Nearly all popular distributions have supported PAM for some time.
   Here's an incomplete list of distributions that support PAM:
   
     * Redhat since version 5.0
     * Mandrake since 5.2
     * Debian since version 2.1 (partial support in 2.1 -- complete
       support in 2.2)
     * Caldera since version 1.3
     * Turbolinux since version 3.6
     * SuSE since version 6.2
       
   This list is certainly incomplete and possibly inaccurate. I'd
   appreciate it if you sent any corrections or additions to this list to
   <[35]petehern@yahoo.com>.
     _________________________________________________________________
   
Installing PAM

   Installing PAM from scratch is long process, beyond the scope of this
   HOWTO. If PAM isn't installed on your system, you're probably running
   such an old version of your distribution that there are many other
   reasons to upgrade. If you really want to do it yourself, then you're
   certainly not the sort of person who needs any help from me. For all
   these reasons, I'm going to assume that you already have PAM
   installed.
     _________________________________________________________________
   
How

   Enough talk, let's dig in.
     _________________________________________________________________
   
PAM configuration files

   PAM configuration files are stored in the /etc/pam.d/ directory. (If
   you don't have /etc/pam.d/ directory, don't worry, I'll cover that in
   the next section) Let's go over there and take look.
  ~$ cd /etc/pam.d
  /etc/pam.d/$ ls
  chfn  chsh    login   other   passwd  su      xlock
  /etc/pam.d/$

   Your system may have a few more or a few less files in this directory,
   depending on what's installed on your system. Whatever the details,
   you probably saw a file for each of the programs on your system that
   authenticate users. As you probably already guessed, each file
   contains the PAM authentication configuration for the program it's
   named after (except for the other file, which we'll talk about in a
   little bit). Let's take a look the PAM configuration file for passwd
   (I've condensed the file for the sake of simplicity):
  /etc/pam.d/$ cat login
  # PAM configuration for login
  auth       requisite  pam_securetty.so
  auth       required   pam_nologin.so
  auth       required   pam_env.so
  auth       required   pam_unix.so nulok
  account    required   pam_unix.so
  session    required   pam_unix.so
  session    optional   pam_lastlog.so
  password   required   pam_unix.so nullok obscure min=4 max=8

   Before dig into this file, I must mention a little something.
     _________________________________________________________________
   
A little something

   A small percentage are probably thinking, "Oh no! I don't have a
   /etc/pam.d directory! Your list of distributions says that my
   distribution includes PAM, but I can't find that directory. Without
   PAM, my life is empty and meaningless! What can I do?" Don't worry,
   all is not lost. If you know that your distribution includes PAM, but
   you have no /etc/pam.d/ directory, then your PAM configuration is
   stored in /etc/pam.conf. Rather than being spread across several
   files, all your PAM configuration is stored in a single file. This
   adds a little twist to PAM configuration, but the proper adjustments
   are pointed out in section 3.3.4.
     _________________________________________________________________
   
Configuration syntax

   PAM configuration files have the following syntax:
  type  control  module-path  module-arguments

   Using the login configuration file (see above) as an example let's
   take a look a the syntax for PAM configuration files:
   
   PAM configuration tokens
   
   type
          The type token tells PAM what type of authentication is to be
          used for this module. Modules of the same type can be
          "stacked", requiring a user to meet multiple requirements to be
          authenticated. PAM recognizes four types:
          
        account
                
          Determines whether the user is allowed to access the service,
                whether their passwords has expired, etc.
                
        auth
                Determines whether the user is who they claim to be,
                usually by a password, but perhaps by a more sophistcated
                means, such as biometrics.
                
        password
                Provides a mechanism for the user to change their
                authentication. Again, this usually their password.
                
        session
                Things that should be done before and/or after the user
                is authenticed. This might included things such as
                mounting/unmounting the user home directory, logging
                their login/logout, and restricting/unrestricting the
                services available to the user.
                
          In the login config file, we see at least one entry for each
          type. Since this the program that allows user to login (hence
          the name :), it's understandable that it needs to access all of
          the different types of authentication.
          
   control
          The control token tells PAM what should be done in if
          authentication by this module fails. PAM recognizes four
          control types:
          
        requisite
                
          Failure to authenticate via this module results in immediate
                denial of authentication.
                
        required
                
          Failure also results in denial of authentication, although PAM
                will still call all the other modules listed for this
                service before denying authentication.
                
        sufficient
                If authentication by this module is successful, PAM will
                grant authentication, even if a previous required module
                failed.
                
        optional
                Whether this module succeeds or fails is only significant
                if it is the only module of its type for this service.
                
          In the configuration file for login, we see nearly all of the
          different control types. Most of the required modules are
          pam_unix.so (the main authentication module), the single
          requisite module is pam_securetty.so (checks make sure the user
          is logging in on a secure console), and the only optional
          module is pam_lastlogin.so (the module that retrieves
          information on the user's most recent login).
          
   module-path
          The module-path tells PAM which module to use and (optionally)
          where to find it. Most configurations only contain the module's
          name, as is the case in our login configuration file. When this
          is the case, PAM looks for the modules in the default PAM
          module directory, normally /usr/lib/security. However, if your
          linux distribution conforms to the Linux Filesystem standard,
          PAM modules can be found in /lib/security.
          
   module-arguments
          The module-arguments are arguments to be passed to the module.
          Each module has its own arguments. For example, in our login
          configuration, the "nulok" ("null ok", argument being passed to
          pam_unix.so module, indicating the a blank ("null") password is
          acceptable ("ok").
     _________________________________________________________________
   
pam.conf configuration

   If your PAM configuration is stored in /etc/pam.conf rather than
   /etc/pam.d/, PAM configuration lines are a bit different. Rather than
   each service having its own configuration file, all configurations are
   stored in /etc/pam.conf with the service name as the first token in a
   configuration line. For example, the following line in
   /etc/pam.d/login:
    auth       required   pam_unix.so nulok

   would become the following line in /etc/pam.conf:
    login       auth       required   pam_unix.so nulok

   Except for this minor difference, all the rest of the PAM syntax
   applies.
     _________________________________________________________________
   
Getting more information

   For more information on configuring PAM and complete PAM module
   reference, consult the [36]Linux-PAM System Administrator's Guide.
   This guide serves as a thorough and up-to-date reference on PAM
   configuration.
     _________________________________________________________________
   
Securing User Authentication

   Many linux distributions ship with user authentication that is not
   adequately secure. This section discusses some of the ways you make
   user authentication secure on your system. While doing these things
   will make your system more secure, do not be so naive as to think they
   make you invulnerable.
     _________________________________________________________________
   
A strong /etc/pam.d/other

   All of the files in /etc/pam.d/ contain the configuration for a
   particular service. The notable exception to this rule is the
   /etc/pam.d/other file. This file contains the configuration for any
   services which do not have their own configuration file. For example,
   is the (imaginary) xyz service attempted authentication PAM would look
   for a /etc/pam.d/xyz file. Not finding one, authentication for xyz
   would be determined by the /etc/pam.d/other file. Since
   /etc/pam.d/other is the configuration to which PAM services fallback,
   it is important that it is secure. We will discuss two secure
   configurations of /etc/pam.d/other, one which is quite nearly paranoid
   and which is gentler.
     _________________________________________________________________
   
A paranoid configuration

   A paranoid configuration of /etc/pam.d/other is as follows:
    auth        required        pam_deny.so
    auth        required        pam_warn.so
    account     required        pam_deny.so
    account     required        pam_warn.so
    password    required        pam_deny.so
    password    required        pam_warn.so
    session     required        pam_deny.so
    session     required        pam_warn.so

   With this configuration, whenever an unknown service attempts to
   access any of the four configuration types, PAM denies authentication
   (via the pam_deny.so module) and then logs a syslog warning (via the
   pam_warn.so module). Short of a bug in PAM, this configuration is
   brutally secure. The only problem with that brutality is it may cause
   problems if your accidentally delete the configuration of another
   service. If your /etc/pam.d/login was mistakenly deleted, no one would
   be able to login!
     _________________________________________________________________
   
A kinder configuration

   Here's configuration that isn't quite so mean:
    auth        required        pam_unix.so
    auth        required        pam_warn.so
    account     required        pam_unix.so
    account     required        pam_warn.so
    password    required        pam_deny.so
    password    required        pam_warn.so
    session     required        pam_unix.so
    session     required        pam_warn.so

   This configuration will allow an unknown service to authenticate (via
   the pam_unix.so module), although it will not allow it to change the
   user's password. Although it allows authentication by unknown
   services, it logs a syslog warning whenever such a service attempts
   authentication.
     _________________________________________________________________
   
Choosing a /etc/pam.d/other

   I would strongly reccomend that you implement the first
   /etc/pam.d/other configuration unless you have a very good reason not
   to. It always a good idea to be 'secure by default'. If you ever do
   need to grant a new service authentication privileges, you can simply
   create a PAM configuration file for that service.
     _________________________________________________________________
   
Disabling logins for user with null passwords

   On most linux systems, there a number of "dummy" user accounts, used
   to assign privileges to certain system services like ftp, webservers,
   and mail gateways. Having these accounts allows your system to be more
   secure, because if these services are compromised, an attacker will
   only gain the limited privileges available to the dummy account,
   rather than the full privileges of a service running as root. However,
   allowing these dummy account login privileges is a security risk, as
   they usually have blank (null) passwords. The configuration option
   that enables null passwords is the "nullok" module-argument. You'll
   want remove this argument from any modules of 'auth' type for services
   that allow login. This is usually the login service, may also include
   services like rlogin and ssh. Hence, the following line in
   /etc/pam.d/login:
   auth         required        pam_unix.so     nullok

   should be changed to:
   auth         required        pam_unix.so
     _________________________________________________________________
   
Disable unused services

   Looking at the files in /etc/pam.d/, you'll probably see configuration
   files for a number of programs you don't use and maybe even a few
   you've never heard of. Although allowing authentication to these
   services probably won't open any huge security holes, you're better
   off denying them authentication. The best way to disable PAM
   authentication for these programs is to rename these files. Not
   finding the file named after the service requesting authentication,
   PAM will fallback to the (hopefully) very secure /etc/pam.d/other. If
   you later find that you need one of these programs, you can simply
   rename the file to its original name and everything will work as it
   was intended.
     _________________________________________________________________
   
Password-cracking tools

   While password-cracking tools can be by attackers used to compromise a
   system, they can also be used by system administrators as proactive
   tool to ensure the strength of passwords on their system. The two most
   commonly used password-cracking tools are "crack" and "John the
   Ripper". Crack is probably included in your facorite distribution.
   John the Ripper can be obtained from
   [37]http://www.false.com/security/john/index.html. Run the tools
   against your password database and you'll probably be surprised with
   what they come up with.
   
   Additionally, there is a PAM module which utilizes the crack library
   to check the strength of a users password whenever it changed. When
   this module is installed, the user can only change their password to
   one which meets the minimum password strength.
     _________________________________________________________________
   
Shadow and MD5 passwords

   As was discussed in the first section of this document, Shadow and MD5
   passwords can make your system more secure. During the installation
   procedure, most modern distributions will ask whether you want to
   install MD5 and/or Shadow passwords. Unless you have a good reason not
   to, you should enable these. The process of converting from
   non-shadowed/non-MD5 passwords is a complicated process, and is beyond
   the scope of this document. The [38]Shadow Password HOWTO is outdated,
   but it might be of some help.
     _________________________________________________________________
   
Tying it all together

   In this section, I'll give a simple example which ought to help tie
   together what's in the previous section.
     _________________________________________________________________
   
Apache + mod_auth_pam

   As our example, we'll install and configure mod_auth_pam, an Apache
   module that allows you to use authenticate users of your webserver
   using PAM. For the purpose of this example, I'll assume you have
   apache installed. If it's not installed already you should be able
   find installation packages from your distributor.
     _________________________________________________________________
   
Our example

   Our goal will be to configure a restricted area of our webserver, a
   family/ directory, to authenticate users via PAM. This directory
   contains private family information, and should only be accessible to
   members of the user group family.
     _________________________________________________________________
   
Installing mod_auth_pam

   First, you'll want to download mod_auth_pam from
   [39]http://blank.pages.de/pam/mod_auth_pam/. The following commands
   will compile mod_auth_pam (you must be logged in as root):
   ~# tar xzf mod_auth_pam.tar.gz
   ~# cd mod_auth_pam-1.0a
   ~/mod_auth_pam-1.0a# make
   ~/mod_auth_pam-1.0a# make install

   If you have any trouble installing the mod_auth_pam module, make sure
   you've installed your distributions apache-dev package. After you've
   installed mod_auth_pam, you'll need to restart apache. Apache can
   usually by restarted by typing the following command (again, you must
   be root):
   ~# /etc/init.d/apache restart
     _________________________________________________________________
   
Configuring PAM

   PAM configuration for Apache is stored in /etc/pam.d/httpd. The
   default configuration (which was installed when you installed
   mod_auth_pam) is secure, but it uses a module (pam_pwdb.so) which may
   not be available on many systems. (Besides, configuring it from
   scratch will be fun!) So delete the /etc/pam.d/httpd file, and let's
   start fresh.
     _________________________________________________________________
   
Deciding how to configure PAM

   If we're going to configure how PAM deals with Apache's authentication
   requests, we need to figure out exactly what we need PAM to check for.
   First, we want PAM to make sure the user's password matches their
   password in the standard unix password database. This sounds like the
   'auth' type and the pam_unix.so module. We'll want the module's
   control type to be set to 'required', so authentication will fail
   without a correct password. Here's what the first line of our
   /etc/pam.d/httpd looks like:
     auth       required        pam_unix.so

   Secondly, we must make sure that the users account is valid (i.e.
   their password has not expired or any such nastiness). This is the
   'account' type and is also provided by the pam_unix.so module. Again,
   we'll set this module's control type to 'required'. After adding this
   line, our /etc/pam.d/httpd configuration looks like this:
     auth       required        pam_unix.so
     account    required        pam_unix.so

   It's not terribly sophisticated, but it does the job. It ought to be a
   good start for learning how to configure PAM services.
     _________________________________________________________________
   
Configuring Apache

   Now that PAM is configured to authenticate apache's requests, we'll
   configure apache to properly utilize PAM authentication to restrict
   access to the family/ directory. To do so, add the following lines to
   your httpd.conf (usually stored in /etc/apache/ or /etc/httpd):
    <Directory /var/www/family>
    AuthPAM_Enabled on
    AllowOverride None
    AuthName "Family Secrets"
    AuthType "basic"
    require group family
    </Directory>

   You may need to replace /var/www/ with the default location of web
   documents, which is often /home/httpd/. Wherever that is, you'll need
   to create the family directory.
   
   Before we test our setup, I'll to take a moment to explain the Apache
   configuration you just entered. The <Directory> directive is used to
   encapsulate configuration data for this directory. Inside this
   directive, we've enabled PAM authentication ("AuthPAM_enabled on"),
   turned off any overriding of this configuration ("AllowOverride
   none"), named this authentication zone "Family Secrets" ("AuthName
   "Family Secrets""), set the http authentication (not the PAM
   authentication) type to the default ("AuthType "basic""), and required
   the user group family ("require group family").
     _________________________________________________________________
   
Testing our setup

   Now that we've got everything setup up properly, it's time to revel in
   our success. Fire up your favorite web browser and head over to
   http://your-domain/family/ (replacing your-domain with, well, your
   domain). You are now an uber-authenticator!
     _________________________________________________________________
   
Resources

   There are a number of resources, both online and offline, where you
   can more information about user authentication. If you know of any
   resources that ought to be added to this list, drop me a line at
   <[40]petehern@yahoo.com>
     _________________________________________________________________
   
PAM

     * [41]Linux-PAM System Administrator's Guide
     * [42]Linux-PAM Module Writer's Manual
     * [43]Linux-PAM Application Developer's Manual
     _________________________________________________________________
   
General Security

     * [44]linuxsecurity.com
     * [45]securitywatch.com
     * [46]Security HOWTO
     * [47]Packetstorm
     _________________________________________________________________
   
Offline Documentation

   A lot of information can be gathered from your system's manual pages.
   The following are some manpages relating to user authentication. The
   number in parentheses refers to the manpage section. To view the
   passwd(5) manpage, you would enter man 5 passwd.
   
     * passwd(5)
     * crypt(3)
     * pam.d(5)
     * group(5)
     * shadow(5)
     _________________________________________________________________
   
Conclusion

   I hope you found this HOWTO helpful. If you have any questions,
   comments, or suggestions, I'd love to hear from you. You can email me
   at <[48]petehern@yahoo.com>.

References

   1. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN20
   2. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN22
   3. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN25
   4. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN28
   5. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN31
   6. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN37
   7. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN50
   8. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN54
   9. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN57
  10. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN59
  11. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN67
  12. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN81
  13. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN92
  14. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN95
  15. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN101
  16. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN104
  17. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN113
  18. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN139
  19. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN245
  20. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN249
  21. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN252
  22. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN281
  23. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN288
  24. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN293
  25. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN298
  26. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN302
  27. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN305
  28. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN362
  29. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN366
  30. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN378
  31. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN393
  32. file://localhost/export/sunsite/users/gferg/howto/00_User-Authentication-HOWTO.html#AEN423
  33. http://www.cgr.org/
  34. http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam.html
  35. mailto:petehern@yahoo.com
  36. http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam.html
  37. http://www.false.com/security/john/index.html
  38. http://www.linuxdoc.org/HOWTO/Shadow-Password-HOWTO.html
  39. http://blank.pages.de/pam/mod_auth_pam/
  40. mailto:petehern@yahoo.com
  41. http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam.html
  42. http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam_modules.html
  43. http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam_modules.html
  44. http://www.linuxsecurity.com/
  45. http://www.securitywatch.com/
  46. http://www.linuxdoc.org/HOWTO/Security-HOWTO.html
  47. http://packetstorm.securify.com/
  48. mailto:petehern@yahoo.com
  Linux User Group HOWTO
  Kendall Grant Clark <mailto:kclark@cmpu.net>
  v.1.6.2, 24 April 1998

  The Linux User Group HOWTO is a guide to founding, maintaining, and
  growing a Linux User Group.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Purpose
     1.2 Other sources of information

  2. What is a Linux User Group?

     2.1 What is Linux?
     2.2 How is Linux unique?
     2.3 What is a user group?
     2.4 Summary

  3. What LUGs are there?

     3.1 Lists of LUGs
     3.2 Solidarity versus convenience

  4. What does a LUG do?

     4.1 Linux advocacy
     4.2 Linux education
     4.3 Linux support
        4.3.1 Users
        4.3.2 Consultants
        4.3.3 Businesses, non-profit organizations, and schools
        4.3.4 Free software development
           4.3.4.1 Chris Browne on free software philanthropy
        4.3.5 Linux Movement
     4.4 Linux socializing

  5. Local LUG activities

     5.1 Meetings
     5.2 Online resources

  6. Practical suggestions

     6.1 LUG support organizations
     6.2 Founding a LUG
     6.3 Maintaining and growing a LUG

  7. Legal and political issues

     7.1 Legal issues
     7.2 United States
     7.3 Canada
     7.4 Political issues
        7.4.1 People have different feelings about free software.
        7.4.2 Nonprofit organizations and money don't mix terribly well.

  8. About this document

     8.1 Terms of use
     8.2 New versions
     8.3 Please contribute to this HOWTO
     8.4 Document history
     8.5 Acknowledgements


  ______________________________________________________________________

  1.  Introduction



  1.1.  Purpose

  The Linux User Group HOWTO is intended to serve as a guide to
  founding, maintaining, and growing a Linux User Group.

  Linux is a freely-distributable implementation of Unix for personal
  computers, servers and workstations. It was developed on the i386 and
  now supports i486, Pentium, Pentium Pro, and Pentium II processors, as
  well as x86-clones from AMD, Cyrix, and others. It also supports many
  SPARC, DEC Alpha, PowerPC/PowerMac, Motorola 68x0 Mac/Amiga machines.


  1.2.  Other sources of information

  If you want to learn more about Linux, the Linux Documentation Project
  <http://sunsite.unc.edu/LDP/> is a good place to start.

  For general information about computer user groups, please see the
  Association of PC Users Groups <http://www.apcug.org/>.


  2.  What is a Linux User Group?



  2.1.  What is Linux?

  In order to appreciate and understand fully the significant role of
  LUGs in the Linux Movement, it is important to understand what makes
  Linux unique among computer operating systems.

  Linux as an operating system is very efficient and very powerful. But,
  Linux as an idea about how software ought to be developed is even more
  powerful. Linux is a free operating system: it is licensed under the
  GNU Public License. The source code is freely available to anyone who
  wants it and always will be. It is developed by a unstructured group
  of programmers from around the world, under the technical direction of
  Linus Torvalds and other key developers. Linux is a world-wide
  movement without any central structure, bureaucracy, or entity to
  control, coordinate, or otherwise direct its affairs. While this
  situation is a powerful part of the appeal and technical quality of
  Linux as an computer operating system, it can make for inefficient
  allocation of human resources, ineffective and even detrimental
  advocacy, public relations, user education and training.


  2.2.  How is Linux unique?

  This loose structure is not likely to change with regard to Linux as a
  software project. And it's a good thing, too. Linux works precisely
  because people are free to come and go as they please: free
  programmers are happy programmers are effective programmers.

  But this loose structure can make the average Linux user's life a
  little complicated--especially if that user isn't a programmer by
  profession or by vocation. Who does she call for support, training, or
  education? How does she know the kinds of uses for which Linux is
  well-suited?

  In large part local LUGs provide the answers to these kinds of
  question. This is why LUGs are a crucial part of the Linux Movement.
  Because there is no ``regional office'' of the Linux Corporation in
  your town or village or metropolis, the local LUG takes on many of the
  same roles that a regional office does for a large multi-national
  corporation..

  Linux is unique because it does not have, nor is it burdened by, a
  central structure or bureaucracy to allocate its resources, train its
  users, or provide support for its products. These jobs get done in a
  variety of ways: the Internet, consultants, VARs, support companies,
  colleges and universities. But, increasingly, in many places around
  the globe, they get done by a local LUG.


  2.3.  What is a user group?

  Computer user groups, at least in the United States, are not a new
  phenomenon; in fact, they played an important role in the history of
  the personal computer. The personal computer arose in large part to
  satisfy the demand of electronics, Ham Radio, and other hobbyist user
  groups, as well as trade shows and swap meets, for affordable,
  personal access to computing resources. Of course eventually giants
  like IBM discovered that the PC was a good and profitable thing, but
  the impetus for the PC came from the people, by the people, and for
  the people.

  In the United States, user groups have changed, and many for the
  worse, with the times. The financial woes of the largest user group
  ever, the Boston Computer Society <http://www.bcs.org/> have been
  well-reported; but all over the U.S. most of the big PC user groups
  have seen a decline in real membership. American user groups in their
  heyday concentrated on the production of newsletters, the maintenance
  of shareware and diskette libraries, meetings, social events, and,
  sometimes, even Bulletin Board Systems. With the advent of the
  Internet, however, many of the services that user groups once provided
  were transferred to things like CompuServe, AOL, and the Web.

  The rise of Linux, however, coincided with and was intensified by
  general public's ``discovery'' of the Internet. As the Internet grew
  more popular, so did Linux: the Internet brought new users,
  developers, and vendors to the Linux Movement.

  So just when traditional PC user groups were declining because of the
  Internet's popularity, this popularity propelled Linux forward,
  creating new demand for new user groups dedicated exclusively to
  Linux. To give just one indication of the ways in which a LUG is
  different than a traditional user group, I call the reader's attention
  to a curious fact: traditional user groups have had to maintain a
  fairly tight control over the kinds of software that its users copy
  and trade at its meetings. While illegal copying of commercial
  software certainly occurred at these meetings, it was officially
  discouraged and for good reason.

  At a LUG meeting, however, this entire mindset simply does not apply.
  Far from being the kind of thing that a LUG ought to discourage, the
  free copying of Linux itself ought to be one of the primary activities
  of a LUG. In fact there is anecdotal evidence that traditional user
  groups sometimes have a difficult time adapting to the fact that Linux
  can be freely copied as many times as one needs or wants.


  2.4.  Summary

  In order for the Linux Movement to continue to flourish, the
  proliferation and success of local LUGs, along with other factors, is
  an absolute requirement. Because of the unique status of Linux, the
  local LUG must provide some of the same functions that a ``regional
  office'' provides for large computer corporations like IBM, Microsoft,
  or Sun. LUGs can and must train, support, and educate Linux users,
  coordinate Linux consultants, advocate Linux as a computing solution,
  and even serve as a liason to local media outlets like newspapers and
  television.
  3.  What LUGs are there?

  Since this document is meant as a guide not only to maintaining and
  growing LUGs but also to founding them, it would be well before we go
  much further to determine what LUGs there are.


  3.1.  Lists of LUGs

  There are several lists of LUGs available on the Web. If you want to
  found a local LUG, one of the first things to do is to determine where
  the nearest LUG is. Your best bet may be to join a LUG that is already
  established in your area rather than founding a new one.

  As of the mid-1997, there are LUGs in all 50 states, the District of
  Columbia, and 26 other countries, including India, Russia, and most of
  Western and Eastern Europe.

  Note: the biggest untapped computing market on the planet, China, does
  not yet appear to have a LUG, and India, the second most populous
  country on the planet, has only a few.


  o  Finding Groups of Linux Users Everywhere
     <http://www.ssc.com/glue/groups/>

  o  LUG List Project <http://www.nllgg.nl/lugww/>

  o  LUG Registry <http://www.linux.org/users/index.html>


  It appears that the GLUE list is more comprehensive for American LUGs,
  while the LUG List Project offers more comprehensive international
  coverage.


  3.2.  Solidarity versus convenience

  While the lists of LUGs on the Web are well-maintained, it is likely
  that they do not list every LUG. In addition to consulting these
  lists, I suggest, if you are considering founding a LUG, that you post
  a short message asking about the existence of a local LUG to
  comp.os.linux.announce <news:comp.os.linux.announce>,
  comp.os.linux.misc <news:comp.os.linux.misc>, or an appropriate
  regional Usenet hierarchy. If there isn't a LUG already in your area,
  then posting mesages to these groups will alert potential members of
  your plans.

  If you plan to found a local LUG, you should carefully balance
  convenience against solidarity. In other words, if there is a LUG in
  your metropolitan area, but on the other side of the city, it may be
  better to start a new group for the sake of convenience. But it may be
  better to join the pre-existing group for the sake of unity and
  solidarity. Greater numbers almost always means greater power,
  influence, and efficiency. While it might be nice to have two groups
  of 100 members each, there are certain advantages to one group of 200
  members. Of course if you live in a small town or village, any group
  is better than no group at all.

  The point is that starting a LUG is an arduous undertaking, and one
  that ought to be entered into with all the relevant facts, and with
  some appreciation of the effect on other groups.



  4.  What does a LUG do?

  The goals of local LUGs are as varied as the locales in which they
  operate. There is no master plan for LUGs, nor is this document meant
  to supply one. Remember: Linux is free from bureaucracy and
  centralized control and so are local LUGs.

  It is possible, however, to identify a core set of goals for a local
  LUG:


  o  advocacy

  o  education

  o  support

  o  socializing

  Each local LUG will combine these and other goals in a unique way in
  order to satisfy the unique needs of its membership.


  4.1.  Linux advocacy

  The urge to advocate the use of Linux is as natural to computer users
  as is eating or sleeping. When you find something that works and works
  well, the natural urge is to tell as many people about it as you can.
  The role of LUGs in Linux advocacy cannot be overestimated, especially
  since the wide-scale commercial acceptance of Linux which it so richly
  deserves has not yet been achieved. While it is certainly beneficial
  to the Linux Movement each and every time a computer journalist writes
  a positive review of Linux, it is also beneficial every time satisfied
  Linux users tell their friends, colleagues, employees or employers
  about Linux.

  There is effective advocacy and there is ineffective carping: as Linux
  users, we must be constantly vigilant to advocate Linux in such a way
  as to reflect positively on both the product, its creators and
  developers, and our fellow users.  The Linux Advocacy mini-HOWTO,
  available at the Linux Documentation Project, gives some helpful
  suggestions in this regard. Suffice it to say that advocacy is an
  important aspect of the mission of a local LUG.

  There may come a time when Linux advocacy is pretty much beside the
  point because Linux has more or less won the day, when the phrase ``No
  one ever got fired for using Linux'' becomes a reality. Until that
  time, however, the local LUG plays an indispensable role in promoting
  the use of Linux. It does so because its advocacy is free, well-
  intentioned, and backed up by organizational commitment. If a person
  comes to know about Linux through the efforts of a local LUG, then
  that person, as a new Linux user, is already ahead of the game: she is
  already aware of the existence of an organization that will help her
  install, configure, and even maintain Linux on whatever computers she
  is willing to dedicate to it.

  New Linux users who are already in contact with a local LUG are ahead
  of those whose interest in Linux has been piqued by a computer
  journalist, but who have no one to whom to turn to aid them in their
  quest to install, run, and learn Linux.

  It is, therefore, important for local LUGs to advocate Linux because
  their advocacy is effective, well-supported, and free.



  4.2.  Linux education

  Not only is it the business of a local LUG to advocate the use of
  Linux, it may also turn its efforts to training its members, as well
  as the computing public in its area, to use Linux and associated
  components. In my own estimation, the goal of user education is the
  single most important goal a LUG may undertake. Of course, as I have
  already pointed out, LUGs are perfectly free to organize themselves
  and their activities around any of these, or other, goals. I believe,
  however, that LUGs can have the greatest impact on the Linux Movement
  by educating and training Linux users.

  Local LUGs may choose to undertake the goal of education simply
  because there is no other local entity from which a Linux user may
  receive technically-oriented education. While it is certainly the case
  that universities, colleges, and junior colleges are increassingly
  turning to Linux as a way to educate their students, both efficiently
  and cheaply, about Unix-like operating systems, some Linux users are
  either unable or unwilling to register for courses in order to learn
  Linux. For these users the local LUG is a valuable resource for
  enhancement or creation of advanced computer skills: Unix-like system
  administration, system programming, support and creation of Internet
  and Intranet technologies, etc.

  In an ironic twist, many local LUGs are even sharing the burden of
  worker training with large corporations. Every worker at Acme Corp
  that expands her computer skills by participating in a local LUG is
  one less worker Acme Corp has to train or pay to train. Even though
  using and administering a Linux PC at home isn't the same as
  administering a corporate data warehouse, call center, or similar
  high-availability facility, it is light years more complex, more
  rewarding, and more educational than using and administering a Windows
  95 PC at home. As Linux itself advances toward things like journalling
  filesystems, high-availability, real-time capacity, and other high-end
  Unix features, the already blurry line between Linux and the ``real''
  Unixes will get even more indistinct.

  Not only is such education a form of worker training, but it will also
  serve, as information technology becomes an increasingly vital part of
  the global economy, as a kind of community service. In most
  metropolitan areas in the United States, for example, it is possible
  for a local LUG to take Linux into local schools, small businesses,
  community and social organizations, and other non-corporate
  environments. This accomplishes the task of Linux advocacy and also
  helps train the general public about Linux as a Unix-like operating
  system. As more and more of these kinds of organizations seek to
  establish an Internet presence or provide dial-in access to their
  workers, students, and constituents, the opportunities arise for local
  LUGs to participate in the life of their community by educating it
  about a free and freely-available operating system. This kind of
  community service allows the average Linux user to emulate the kind of
  generosity that has characterized Linux, and the free software
  community, from the very beginning. Most Linux users can't program
  like Linus Torvalds, but we can all all give our time and abilities to
  other Linux users, the Linux community, and the broader community in
  which work and live.

  Linux is a natural fit for these kinds of organization because
  deploying it doesn't commit them to expensive license, upgrade, or
  maintenance fees. Because Linux is also technically elegant and
  economical, it runs very well on the the kinds of disposable hardware
  that corporations typically cast off and that non-profit organizations
  are only too happy to use. As more and more people discover every day,
  that old 486 collecting dust in the closet can do real work if someone
  will install Linux on it.

  In addition, Linux education has a cumulative effect on the other
  goals of a local LUG, in particular the goal of Linux support
  discussed below. Better Linux education means better Linux support.
  The more people that a LUG can count on to reach its support goals,
  the easier support becomes and, therefore, the more of it can be done.
  The more new and inexperienced users a local LUG can support and
  eventually educate about Linux, the larger and more effective the LUG
  can become. In other words, if a LUG focuses solely on Linux support
  to the neglect of Linux education, the natural barriers to
  organizational growth will be more restrictive. If only two or three
  percent of the members of a LUG take upon themselves the task of
  supporting the others, the growth of the LUG will be stifled. One
  thing you can count on: if new and inexperienced users don't get the
  help with Linux they need from a local LUG, they won't participate in
  that LUG for very long. If a larger percentage of members support the
  others, the LUG will be able to grow much larger. Linux education is
  the key to this dynamic: education turns new Linux users into
  experienced ones.

  Free education about free Linux also highlights the degree to which
  Linux is part and parcel of the free software Community. So it seems
  appropriate that local LUGs focus not solely on Linux education but
  also education about all of the various software systems and
  technologies that run under Linux. These include, for instance, the
  GNU suite of programs and utilities, the Apache Web server, the
  XFree86 implementation of X Windows, TeX, LaTeX, etc. Fortunately the
  list of free software that runs under Linux is a long and diverse one.

  Finally, Linux is a self-documenting operating environment; in other
  words, if we don't write the documentation, nobody is going to do it
  for us. Toward that end, make sure that LUG members are well aware of
  the Linux Documentation Project <http://sunsite.unc.edu/LDP/>, which
  can be found at mirrors worldwide. Consider providing an LDP mirror
  for the local Linux community and for LUG members. Also make sure to
  publicize---through comp.os.linux.announce, the LDP, and other
  pertinent sources of Linux information---any relevant documentation
  that is developed by the LUG: technical presentations, tutorials,
  local FAQs, etc. There is a lot of Linux documentation produced in
  LUGs that doesn't benefit the worldwide Linux community because no one
  outside the LUG knows about it. Don't let the LUGs efforts in this
  regard go to waste: it is highly probable that if someone at one LUG
  had a question or problem with something, then people at other LUGs
  around the world will have the same questions and problems.


  4.3.  Linux support

  Of course for the desperate newbie the primary role of a local LUG is
  Linux support. But it is a mistake to suppose that Linux support only
  means technical support for new Linux users. It can and should mean
  much more.

  Local LUGs have the opportunity to support:


  o  users

  o  consultants

  o  businesses, non-profit organizations, and schools

  o  the Linux Movement



  4.3.1.  Users

  The most frequent complaint from new Linux users, once they have
  gotten Linux installed, is the steep learning curve which is not at
  all unique to Linux but is, rather, a characteristic of all modern
  Unixes. With the steepness of the learning curve, however, comes the
  power and flexibility of a complex operating system. A local LUG is
  often the only resource that a new Linux user has available to help
  flatten out the learning curve.

  But even if a new Linux user doesn't know it yet, she needs more than
  just technical support: Linux and the free software worlds are both
  rapidly moving targets. The local LUGs form an invaluable conduit of
  information about Linux and other free software products. Not only
  does Linux lack a central bureaucracy, but it also for the most part
  lacks the kind of journalistic infrastructure from which users of
  other computer systems benefit. The Linux Movement does have resources
  like Linux Journal <http://www.ssc.com/lj/> and Linux Gazette
  <http://www.ssc.com/lg/>, but many new Linux users are unaware of
  these resources. In addition, as monthly publications they are often
  already out of date about bugfixes, security problems, patches, new
  kernels, etc. This is where the local LUG as a source and conduit of
  timely information is so vital to new and experienced Linux users
  alike.

  For example, until a new Linux user knows that the newest kernels are
  available from ftp.kernel.org <ftp://ftp.kernel.org> or that the Linux
  Documentation Project usually has newer versions of Linux HOWTOs than
  a CD-based Linux distribution, it is up to the local LUG, as the
  primary support entity, to be a conduit of timely and useful
  information.

  In fact it may be just a bit misleading to focus on the support role
  that local LUGs provide to new users: intermediate and advanced users
  also benefit from the proliferation of timely and useful tips, facts,
  and secrets about Linux. Because of the complexity of Linux, even
  advanced users often learn new tricks or techniques simply by becoming
  involved in a local LUG. Sometimes they learn about software packages
  they didn't know existed, sometimes they just remember that arcane vi
  command sequence they've not used since college.


  4.3.2.  Consultants

  It is, I think, rather obvious to claim that local LUGs ought to be in
  the business of supporting new Linux users. After all, if they're not
  supposed to be doing that, what are they to do? It may not be as
  obvious that local LUGs can play an important role in supporting local
  Linux consultants. Whether they do Linux consulting full-time or only
  part-time, consultants can be an important part of a local LUG. How
  can the LUG support them?

  The answer to that question is just the answer to another question:
  what is it that Linux consultants want and need? They need someone for
  whom to consult. A local LUG provides the best way for those who offer
  Linux consulting to find those who need Linux consulting. The local
  LUG can informally broker connections between consulting suppliers and
  consulting consumers simply by getting all, or as many as possible, of
  the people interested in Linux in a local area together and talking
  with one another. How LUGs do that will occupy us below. What is
  important here is to point out that LUGs can and should play this role
  as well. The Linux Consultants HOWTO is an important document in this
  regard, but it is surely the case that only a fraction of the full-
  time and part-time Linux consultants worldwide are registered in the
  Consultants HOWTO.

  The relationship is mutually beneficial. Consultants aid LUGs by
  providing experienced leadership, both technically and
  organizationally, while LUGs aid consultants by putting them in
  contact with the kinds of people who need their services. New and
  inexperienced users gain benefit from both LUGs and consultants since
  their routine or simple requests for support are handled by LUGs
  gratis, and their complex needs and problems---the kind that obviously
  require the services of a paid consultant---can be handled by the
  consultants whom the local LUG helps them contact.

  The line between support requests that need a consultant and those
  that do not is sometimes indistinct; but in most cases the difference
  is clear. While a local LUG doesn't want to gain the reputation for
  pawning new users off unnecessarily on consultants--as this is simply
  rude and very anti-Linux behavior--there is no reason for LUGs not to
  help broker contacts between the users who need consulting services
  and the professionals who offer them.

  Please see Martin Michlmayr's Linux Consultants HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/Consultants-HOWTO.html> for an
  international list of Linux consultants.


  4.3.3.  Businesses, non-profit organizations, and schools

  LUGs also have the opportunity to support local businesses and
  organizations. This support has two aspects.  First, LUGs can support
  businesses and organizations that want to use Linux as a part of their
  computing and IT efforts. Second, LUGs can support local businesses
  and organizations that develop for Linux, cater to Linux users,
  support or install Linux, etc.

  The kinds of support that LUGs can provide to local businesses that
  want to use Linux as a part of their computing operations isn't really
  all that different from the kinds of support LUGs give to individuals
  who want to run Linux at home. For example, compiling the Linux kernel
  doesn't really vary from home to business. Supporting businesses using
  Linux, however, may mean that a LUG needs to concentrate on commercial
  software that runs on Linux, rather than concentrating solely on free
  software.  If Linux is going to continue to maintain its momentum as a
  viable computing alternative, then it's going to take software vendors
  who are willing to write for and port to Linux as a commercially-
  viable platform. If local LUGs can play a role in helping business
  users evaluate commercial Linux solutions, then more software vendors
  will be encouraged to consider Linux in their development and
  planning.

  This leads us directly to the second kind of support that a local LUG
  can give to local businesses. Local LUGs can serve as a clearing house
  for the kind of information that is available in very few other
  places. For example:


  o  Which local ISP is Linux-friendly?

  o  Are there any local hardware vendors that build Linux PCs?

  o  Does anyone sell Linux CDs locally?

  Maintaining and making this kind of information public not only helps
  the members of a local LUG, but it also helps Linux-friendly local
  businesses as well, and it encourages them to continue to be Linux-
  friendly. It may even, in some cases, help contribute to a competitive
  atmosphere in which other businesses are encouraged to become Linux-
  friendly too.

  4.3.4.  Free software development

  Finally, LUGs may also support the Linux Movement by soliciting and
  organizing charitable giving. Chris Browne <mailto:cbbrowne@hex.het>
  has thought about this issue as much as anyone I know, and he
  contributes the following.


  4.3.4.1.  Chris Browne on free software philanthropy


  A further involvement can be to encourage sponsorship of various
  Linux-related organizations in a financial way.  With the multiple
  millions <http://counter.li.org> of Linux users, it would be entirely
  plausible for grateful users to individually contribute a little.
  Given millions of users, and the not unreasonable sum of a hundred
  dollars of ``gratefulness'' per Linux user ($100 being roughly the sum
  not spent this year upgrading a Microsoft OS), that could add up to
  hundreds of millions of dollars towards development of improved tools
  and applications for Linux.



  A users group can encourage members to contribute to various
  ``development projects.'' If it has some form of ``charitable tax
  exemption'' status, that can encourage members to contribute directly
  to the group, getting tax deductions as appropriate, with
  contributions flowing on to other organizations.



  It is appropriate, in any case, to encourage LUG members to direct
  contributions to organizations with projects and goals that they
  individually wish to support.



  This section lists possible candidates. None are explicitly being
  recommended here, but the list can represent useful ``food for
  thought.''  Many are registered as charities in the United States,
  thus making U.S. contributions tax deductible.


  Here are organizations with activities particularly directed towards
  development of software that works with Linux:


  o  Linux International Project Sponsorship Fund
     <http://www.li.org/About/Fund/Welcome.html>

  o  Debian/Software In the Public Interest
     <http://www.debian.org/donations.html>

  o  Free Software Foundation <http://www.fsf.org/help/donate.html>

  o  The XFree86 Project <http://www.xfree86.org/donations.html>


  Contributions to these organizations has the direct effect of
  supporting the creation of freely redistributable software usable with
  Linux.  Dollar for dollar, such contributions almost certainly have
  greater effect on the Linux community as a whole than any other
  specific kind of spending.



  There are also organizations that are less directly associated with
  Linux that may nonetheless be worthy of assistance, such as:


  o  League for Programming Freedom <http://www.lpf.org>



     This is not a Linux-specific organization; they are involved in
     general advocacy activities that touch on people involved with
     software development.  Involvement in this organization represents
     something closer to involvement in a ``political lobby'' group.



     There is somewhat of a ``USA bias;'' there are nonetheless
     international implications, and the international community as
     often follows the American lead in computing-related matters as
     vice-versa.


  o  The LaTeX3 Project Fund



     The  TeX Users Group (TUG)  <http://www.tug.org> is working on the
     ``next generation'' version of the LaTeX publishing system, known
     as LaTeX3.  Linux is one of the platforms on which TeX and LaTeX
     are best supported.

     Donations for the project can be sent to:


       TeX Users Group
       P.O. Box 1239
       Three Rivers, CA 93271-1239
       USA



  or, for those in Europe,


       UK TUG
       1 Eymore Close
       Selly Oaks
       Burmingham B29 4LB
       UK



  o  Project Gutenberg <http://www.promo.net/pg/lists/list.html>


     Their purpose is to make freely available in electronic form the
     texts of out-of-copyright books.  This isn't directly a ``Linux
     thing,'' but it seems fairly worthy, and they actively encourage
     platform independence, which means that their ``products'' are
     quite usable with Linux.



  4.3.5.  Linux Movement

  I have referred throughout this HOWTO to something I call the Linux
  Movement. There really is no better way to describe the international
  Linux phenomenon than to call it a movement: it isn't a bureaucracy,
  but it is organized; it isn't a corporation, but it is important to
  businesses all over the world. The best way for a local LUG to support
  the international Linux movement is to work to insure that the local
  Linux community is robust, vibrant, and growing. Linux is developed
  internationally, which is easy enough to see by reading
  /usr/src/linux/MAINTAINERS. But Linux is also used internationally.
  And this ever-expanding user base is the key to Linux's continued
  success. And that is where the local LUG plays an incalculably
  important role.

  The strength of the Linux Movement internationally is the simple fact
  that Linux offers unprecedented computing power and sophistication for
  its cost and for its freedom. The keys are value and independence from
  proprietary control. Every time a new person, group, business, or
  organization has the opportunity to be exposed to Linux's inherent
  value the Linux Movement grows in strength and numbers. Local LUGs can
  make that happen.


  4.4.  Linux socializing

  The last goal of a local LUG that I will mention here is socializing.
  In some ways this is the most difficult goal to discuss because it is
  not clear how many or to what degree LUGs engage in it. While it would
  be strange to have a local LUG that didn't engage in the other goals,
  there very well may be local LUGs somewhere in the world for which
  socialization isn't an important consideration.

  It seems, however, that whenever two or three Linux users get together
  fun, highjinks, and, often, beer are sure to follow. Linus Tovalds has
  always had one enduring goal for Linux: to have more fun. For hackers,
  kernel developers, and Linux users, there's nothing quite like
  downloading a new kernel, recompiling an old one, twittering with a
  window manager, or hacking some code. It is the sheer fun of Linux
  that keeps many LUGs together, and it is this kind of fun that leads
  many LUGs naturally to socializing.

  By ``socializing'' here I mean primarily sharing experiences, forming
  friendships, and mutually-shared admiration and respect. There is
  another meaning, however, one that social scientists call
  socialization. In any movement, institution, or human community, there
  is the need for some process or pattern of events in and by which, to
  put it in Linux terms, newbies are turned into hackers. In other
  words, socialization turns you from ``one of them'' to ``one of us''.

  For armed forces in the U.S. and in most countries, this process is
  called boot camp or basic training. This is the process whereby
  civilians are transformed into soldiers. The Linux movement has
  analogous requirements. It is important that new Linux users come to
  learn what it means to be a Linux user, what is expected of them as a
  member of an international community, the special vocabulary of the
  Linux movement, its unique requirements and opportunities. This may be
  as simple as how Linux users in a partcicular locale pronounce
  ``Linux''. It may be as profound as the ways in which Linux users
  should advocate, and the ways in which they should, more importantly,
  refrain from advocating Linux.

  Linux socialization, unlike `real world' socialization, can occur on
  mailing lists and Usenet, although the efficacy of the latter is
  constantly challenged precisely by poorly socialized users. In my
  view, socialization and socializing are both done best in the company
  of real, flesh-and-blood fellow human beings, and not by incorporeal
  voices on a mailing list or Usenet group.


  5.  Local LUG activities

  In the previous section I focused exclusively on what LUGs do and what
  they ought to be doing. In this section the focus shifts to practical
  strategies for accomplishing these goals.

  There are, despite the endless permutations of form, two basic things
  that local LUGs do: first, they meet together in physical space;
  second, they communicate with each other in cyberspace. Everything or
  nearly everything that LUGs do can be seen in terms of meetings and
  online resources.


  5.1.  Meetings

  As I said above, physical meetings are synonymous with LUGs and with
  most computer user groups.  LUGs have these kinds of meetings:


  o  social

  o  technical presentations

  o  informal discussion groups

  o  user group business

  o  Linux installation

  o  configuration and bug-squashing

  What do LUGs do at these meetings?


  o  Install Linux for newbies and strangers

  o  Teach members about Linux

  o  Compare Linux to other operating systems

  o  Teach members about the software that runs on Linux

  o  Discuss the ways in which Linux can be advocated

  o  Discuss the importance of the Free Software Movement

  o  Discuss the business of the user group

  o  Eat, drink, and be merry



  5.2.  Online resources

  The commercial rise of the Internet coincided roughly with the rise of
  Linux, and the latter in large part owes something to the former. The
  Internet has always been an important asset for Linux development. It
  is no different for LUGs. Most LUGs have web pages if not whole Web
  sites. In fact, I am not sure how else to find a local LUG but to
  check the Web.


  It makes sense, then, for a local LUG to make use of whatever Internet
  technologies they can appropriate: Web sites, mailing lists, gopher,
  FTP, e-mail, WAIS, finger, news, etc. As the world of commerce is
  discovering, the Internet can be an effective way to advertise,
  inform, educate, and even sell. The other reason that LUGs make
  extensive use of Internet technologies is that it is the very essence
  of Linux to provide a stable and rich platform for the deployment of
  these technologies. So not only do LUGs benefit from, say, the
  establishment of a Web site because it advertizes their existence and
  helps organize their members, but in deploying these technologies, the
  members of the LUG are provided an opportunity to learn about this
  technology and see Linux at work.

  Some LUGs that use the Internet effectively:


  o  Atlanta Linux Enthusiasts <http://www.ale.org/>

  o  North Texas Linux Users Group <http://www.ntlug.org/>

  o  Boston Linux and Unix <http://www.blu.org/>

  o  Colorado Linux Users and Enthusiasts
     <http://spot.elfwerks.com/~clue/>

  o  BLUG - BHZ Linux Users Group (Brazil)
     <http://www.bhz.ampr.org/~linux/>

  o  Ottawa Carleton Linux Users Group <http://www.oclug.on.ca/>

  o  Provence Linux Users Group <http://www.pipo.com/plug/>

  o  Duesseldorf Linux Users Group <http://www.hsp.de/~dlug/>

  o  Linux User Group Austria <http://www.luga.or.at/>

  o  Israeli Linux Users Group <http://www.linux.org.il/>

  o  Tokyo Linux Users Group <http://www.twics.co.jp/~tlug/>

  o  Linux in Mexico <http://www.linux.org.mx/>

  o  Netherlands Linux Users Group (NLLGG) <http://www.nllgg.nl/>

  o  St. Petersburg Linux User Group
     <http://ethereal.ru/~mbravo/spblug/index.html>

  o  Linux User Group of Singapore <http://www.lugs.org.sg/>

  o  Victoria Linux User Group <http://www.linux.victoria.bc.ca/>

  o  Essex Linux User Group <http://www.epos.demon.co.uk/>

  o  Turkish Linux User Group <http://www.linux.org.tr/>

  o  Linux User Group of Rochester <http://www.lugor.org/>

  o  Korean Linux Users Group <http://www.linux-kr.org>


  Please let me know if your LUG uses the Internet in an important or
  interesting way; I'd like this list to include your group.



  6.  Practical suggestions

  Finally, I want to make some very practical, even mundane, suggestions
  for anyone wanting to found, maintain, or grow a LUG.


  6.1.  LUG support organizations


  There are several organizations that offer assistance to local LUGs.



     GLUE
        Groups of Linux Users Everywhere is a user group coordination
        and support program started by SSC, the same people who publish
        Linux Journal. The GLUE program <http://www.ssc.com/glue/> is an
        inexpensive way for a local LUG to provide some benefits to its
        membership.


     Linux Systems Labs
        LSL <http://www.lsl.com/> offers their Tri-Linux Disk set (Three
        Linux distributions on four CDs: Red Hat, Slackware, and Debian)
        to LUGs for resale at a considerable discount.


     Linux Mall User Group Program
        Sponsored by WorkGroup Solutions, the Linux Mall User Group
        Program <http://www.LinuxMall.com/usergrp.program.html> offers a
        range of benefits for participating User Groups. LUGs are also
        free to participate in Linux Mall's Referral Program
        <http://www.LinuxMall.com/mallrfr.html> as well.


     Cleveland Linux User's Group
        Owns the Internet domain, lug.net. They will provide your LUG an
        Internet domain name at lug.net: your-LUG-name-or-citylug.net.
        More information may be found at LUG.NET <http://www.lug.net/>
        or by e-mailing Jeff  Garvas.


     Red Hat Software's User Group Program
        Assists LUGs to develop and grow. More information may be found
        at Red Hat Web  site <http://www.redhat.com/redhat/rhug.html>



  6.2.  Founding a LUG



  o  Determine the nearest pre-existing LUG

  o  Announce your intentions on comp.os.linux.announce and on an
     appropriate regional hierarchy

  o  Announce your intention wherever computer users are in your area:
     bookstores, swap meets, cybercafes, colleges and universities,
     corporations, Internet service providers, etc.

  o  Find  Linux-friendly businesses or institutions in your area that
     may be willing to help you form the LUG

  o  Form a mailing list or some means of communication between the
     people who express an interest in forming a LUG
  o  Ask key people specifically for help in spreading the word about
     your intention to form a LUG

  o  Solicit space on a Web server to put a few HTML pages together
     about the group

  o  Begin looking for a meeting place

  o  Schedule an initial meeting

  o  Discuss at the initial meeting the goals for the LUG


  6.3.  Maintaining and growing a LUG



  o  Make the barriers to LUG membership as low as possible

  o  Make the LUG's Web site a priority: keep all information current,
     make it easy to find details about meetings (who, what, and where),
     and make contact information and feedback mechanisms prominent

  o  Install Linux for anyone who wants it

  o  Post flyers, messages, or handbills wherever computer users are in
     your area

  o  Secure dedicated leadership

  o  Follow Linus's benevolent dictator model of leadership

  o  Take the big decisions to the members for a vote

  o  Start a mailing list devoted to technical support and ask the
     ``gurus'' to participate on it

  o  Schedule a mixture of advanced and basic, formal and informal,
     presentations

  o  Support the software development efforts of your members

  o  Find way to raise money without dues: for instance, selling Linux
     merchandise to your members and to others

  o  Consider securing formal legal standing for the group, such as
     incorporation or tax-exempt status

  o  Find out if your meeting place is restricting growth of the LUG

  o  Meet in conjunction with swap meets, computer shows, or other
     community events where computer users---i.e., potential Linux
     converts---are likely to gather

  o  Elect formal leadership for the LUG as soon as is practical: some
     helpful officers might include President, Treasurer, Secretary,
     Meeting Host (general announcements, speaker introductions, opening
     and closing remarks, etc.), Publicity Coordinator (handles Usenet
     and e-mail postings, local publicity), and Program Coordinator
     (organizes and schedules speakers at LUG meetings)

  o  Provide ways for members and others to give feedback about the
     direction, goals, and strategies of the LUG

  o  Support Linux and Free Software development efforts by donating Web
     space, a mailing list, or FTP site
  o  Establish an FTP site for relevant software

  o  Archive everything the LUG does for the Web site

  o  Solicit ``door prizes'' from Linux vendors, VARs, etc. to give away
     at meetings

  o  Give credit where credit is due

  o  Join SSC's GLUE (Groups of Linux Users Everywhere) but be aware
     they charge a membership fee

  o  Submit your LUG's information to all of the Lists of LUGs

  o  Publicize your meetings on appropriate Usenet groups and in local
     computer publications and newspapers

  o  Compose promotional materials, like Postscript files, for instance,
     that members can use to help publicize the LUG at  workplaces,
     bookstores, computer stores, etc.

  o  Make sure you know what LUG members want the LUG to do

  o  Release press releases to local media outlets about any unusual LUG
     events like an Installation Fest, Net Day, etc.

  o  Use LUG resources and members to help local non-profit
     organizations and schools with their Information Technology needs

  o  Advocate the use of Linux zealously but responsibly

  o  Play to the strengths of LUG members

  o  Maintain good relations with Linux vendors, VARs, developers, etc.

  o  Identify and contact Linux consultants in your area

  o  Network with the leaders of other LUGs in your area, state, region,
     or country to share experiences, tricks, and resources

  o  Keep LUG members advised on the state of Linux software---new
     kernels, bugs, fixes, patches, security advisories---and the state
     of the Linux world at large---new ports, trademark and licensing
     issues, where Linus is living and working, etc.

  o  Notify the Linux Documentation Project---and other pertinent
     sources of Linux information---about the documentation that the LUG
     produces: technical presentations, tutorials, local HOWTOs, etc.


  7.  Legal and political issues



  7.1.  Legal issues


  7.2.  United States

  There is a strong case to be made for formal organization of local
  LUGs. I will not make that case here. If, however, you are interested
  in formally organizing your local LUG, then this section will
  introduce you to some of the relevant issues.

  Note: this section should not be construed as competent legal counsel.
  These issues require the expertise of competent legal counsel; you
  should, before acting on any of the statements made in this section,
  consult an attorney.

  There are at least two different legal statuses that a local LUG in
  the United States may attain:


  1. incorporation as a non-profit entity

  2. tax-exemption

  Although the relevant statutes differ from state to state, most states
  allow user groups to incorporate as non-profit entitites. The benefits
  of incorporation for a local LUG may include limitations of liability
  of LUG members and volunteers, as well as limitation or even exemption
  from state corporate franchise taxes.

  While you should consult competent legal counsel before incorporating
  your LUG as a non-profit entity, you can probably reduce your legal
  fees if you are acquainted with the relevant issues before consulting
  with an attorney. I recommend the Non-Lawyers Non-Profit Corporation
  Kit (ISBN 0-937434-35-3).

  As for the second status, tax-exemption, this is not a legal status so
  much as a judgment by the Internal Revenue Service. It is important
  for you to know that incorporation as a non-profit entity does not
  insure that the IRS will rule that your LUG is to be tax-exempt. It is
  possible to have a non-profit corporation that is not also tax-exempt.

  The IRS has a relatively simple document that explains the criteria
  and process for tax-exemption. It is Publication 557: Tax-Exempt
  Status for Your Organization. It is available as an Adobe Acrobat file
  from the IRS's Web site. I strongly recommend that you read this
  document before filing for incorporation as a non-profit entity. While
  becoming a non-profit corporation cannot insure that your LUG will be
  declared tax-exempt by the IRS, there are ways to incorporate that
  will prevent the IRS from declaring your LUG to be tax-exempt. Tax-
  Exempt Status for Your Organization clearly sets out the necessary
  conditions for your LUG to be declared tax-exempt.

  Finally, there are resources available on the Internet for non-profit
  and tax-exempt organizations. Some of the material is probably
  relevant to your local LUG.


  7.3.  Canada

  Thanks to Chris Browne for the following comments about the Canadian
  situation.


  The Canadian tax environment strongly parallels the US environment, in
  that the ``charitable organization'' status confers similar tax
  advantages for donors over mere ``not for profit'' status, while
  requiring that similar sorts of added paperwork be filed by the
  ``charity'' with the tax authorities in order to attain and maintain
  certified charity status.



  7.4.  Political issues

  Chris Browne <mailto:cbbrowne@hex.net> has the following to say about
  the kinds of inter-LUG political dynamics that often crop up.


  7.4.1.  People have different feelings about free software.

  Linux users are a diverse bunch.  As soon as you try to put a lot of
  them together, there are  some  problem issues that can come up.There
  are those that are nearly political radicals that believe that all
  software, always, should be ``free.''  Because Caldera charges quite a
  lot of money for their distribution, and doesn't give all profits over
  to  (pick favorite advocacy organization),  they must be ``evil.''
  Ditto for Red Hat or S.u.S.E.  Keep in mind that all three of these
  companies have made and continue to make significant contributions to
  free software.



  Others may figure that they can find some way to highly exploit the
  ``freeness'' of the Linux platform for their fun and profit. Be aware
  that many users of the BSD UNIX variants consider that  their licenses
  that  do  permit companies to build ``privatized'' custom versions of
  their OSes are preferable to the ``enforced permanent freeness'' of
  the GPL as applied to Linux.  Do not presume that all people promoting
  this sort of view are necessarily greedy leeches.



  If these people are put together in one place, disagreements can
  occur.



  Leaders should be clear on the following facts:


  o  There are a lot of opinions about the GPL and how it is supposed to
     work.  It is easy to misunderstand both the GPL and alternative
     licensing schemes.

  o  Linux benefits from contributions from many places, and can support
     some freeloaders, particularly if this encourages more people to
     get involved, thus pulling in further contributors.

  o  Many significant contributions have been made to Linux by
     commercial enterprises.  Examining the sources to the Linux kernel,
     and notable subsystems such as XFree86 and GCC show a surprising
     number of commercial contributors.

  o  Commercial does not always imply ``better,'' but it also does not
     always imply ``horrible.''



  The main principle can be extended well beyond this; computer ``holy
  wars'' have long been waged over the virtues of one system over
  another, whether that be (in modern day) between Linux, other UNIX
  variants, and Microsoft OSes, or between the ``IBM PC'' and the
  various Motorola 68000-based systems, or between the many 8 bit
  systems of the 1970s.  Or of KDE versus GNOME.


  A wise LUG leader will seek to smooth over such differences, rather
  than inciting them. LUG leaders  must  have thick skins.


  There  will  be disagreements at some point as diverse views collide
  with one another, and leaders must be able to cope with this,
  resolving disagreements rather than contributing to the problem.

  7.4.2.  Nonprofit organizations and money don't mix terribly well.

  It is important to be quite careful in dealing with finances in a
  nonprofit organization of any sort.  In businesses, where profitable
  flows of monies are the goal, people are not typically too worried
  about ``nagging details'' such as possible misspending of immaterial
  sums of money.


  The same cannot be said about nonprofit organizations.  Some people
  are involved for reasons of principle, and can easily give minor
  problems inordinate attention.  And the potential for wide
  participation at business meetings correspondingly expands the
  potential for inordinate attention to be drawn to things.


  As a result, it is probably preferable for there to  not  be a
  membership fee for a LUG, as that provides a specific thing for which
  people can reasonably demand accountability.  Fees that are not
  collected cannot, by virtue of the fact that they don't exist, be
  misused.


  If there  is  a lot of money and/or other such resources floating
  around, it is important for the user group to be accountable to its
  members for it.


  In a vital, growing group, there should be more than one person
  involved. In troubled nonprofit organizations, financial information
  is often tightly held by someone who will not willingly relinquish
  control of funds. Ideally, there should be  some  rotation of duties
  in a LUG including that of control of the finances.


  Regular useful financial reports should be made available to those
  that wish them. A LUG that maintains an official ``charitable status''
  for tax purposes will have to file at least annual financial reports
  with the local tax authorities, which would represent a minimum
  financial disclosure for the purposes of the members.


  With the growth of Linux-based financial software, it should be
  readily possible to create reports on a regular basis.  With the
  growth of the Internet, it should even be possible to publish these on
  the World Wide Web.



  8.  About this document

  8.1.  Terms of use

  Copyright (c) 1997 by Kendall Grant Clark. This document may be
  distributed under the terms set forth in the LDP license at
  http://sunsite.unc.edu/LDP/COPYRIGHT.html
  <http://sunsite.unc.edu/LDP/COPYRIGHT.html>.


  8.2.  New versions

  New versions of the Linux User Group HOWTO will be periodically
  uploaded to various Linux WWW and FTP sites, principally my homepage
  <http://www.ntlug.org/~kclark/> and the Linux Documentation Project
  <http://sunsite.unc.edu/LDP/>

  8.3.  Please contribute to this HOWTO


  I welcome questions about and feedback on this document. Please send
  them to me at kclark@cmpu.net. I am especially interested in hearing
  from leaders of LUGs from around the world. I would like to include
  real-life examples of the things described here. I would also like to
  include a section on LUGs outside the United States, since this HOWTO
  as it stands now is rather US-centric. Please let me know if your
  group does things that should be mentioned in this HOWTO.


  8.4.  Document history


  o  1.0 released on 13 July 1997

  o  1.1: expanded online resources section

  o  1.3: added LUG Support Organizations and expanded the Legal and
     Organizational Issues section

  o  1.3.1: general editing for clarity and conciseness

  o  1.4: general editing, added new LUG resources

  o  1.4.1: general editing for clarity

  o  1.5: added some resources, some discussion of LUG documentation,
     also general editing

  o  1.5.1: changed Web location for this document and author's email
     address.

  o  1.5.2: new copyright and license

  o  1.5.3: miscellaneous edits and minor re-organizations

  o  1.6: added Chris Browne's material: Linux philanthropic donations
     and LUG political considerations

  o  1.6.1: very minor additions

  o  1.6.2: minor corrections



  8.5.  Acknowledgements

  I want to thank all the great people I've met and worked with during
  the time I've served as President of the North Texas Linux Users
  Group. They helped inspire me to use Linux full-time. The best thing
  about Linux really is the people you meet.

  I especially want to thank Chris Browne <mailto:cbbrowne@hex.net> for
  describing the situation with non-profit and charitable groups in
  Canada, his thoughts on financial donations as a way to participate in
  Linux and the free software movement, and his ideas about the kinds of
  political issues that may arise within LUGs.

  In addition, the following people have made helpful comments and
  suggestions:


  o  Hugo van der Kooij

  o  Greg Hankins

  o  Charles Lindahl

  o  Rick Moen

  o  Jeff Garvas

  o  James Hertzler



  Linux VAR HOWTO
  Mr. Poet poet@linuxports.com
  v2.84, 22 August 1999

  This document contains a listing of service companies which do not
  manufacture hardware or create packaged software, but add value to
  existing products.  It is maintained by Mr. Poet poet@linuxports.com.
  ______________________________________________________________________

  Table of Contents



  1. About this document

  2. Copyright Information

  3. VAR ID: Australia, Cybersource

  4. VAR ID: Australia, EMUSYS Unix Consulting

  5. VAR ID: Australia, Sydnet Group Pty Ltd

  6. VAR ID: Austria, QUANT-X Service & Consulting GmbH

  7. VAR ID: Brazil, Millennium Consultoria e Informtica Ltda.

  8. VAR ID: Canada, Affinity Systems Inc.

  9. VAR ID: Canada, Centurion Services

  10. VAR ID: Canada, Mediabase

  11. VAR ID: Canada, Net Direct Inc.

  12. VAR ID: Canada, Softouch Computer Solutions

  13. VAR ID: Canada, VL

  14. VAR ID: Finland, SOT Finnish Software Engineering Ltd.

  15. VAR ID: France, Paralline

  16. VAR ID: Germany, IGEL GmbH

  17. VAR ID: Germany, IGEL

  18. VAR ID: Germany, dynamis EDV-Consulting

  19. VAR ID: Hong Kong, Genesis Systems Int'l Ltd.

  20. VAR ID: India, G.T.Enterprises

  21. VAR ID: Indonesia, PT Cakram DataLingga Duaribu (CDL2000)

  22. VAR ID: Italy, Conecta Telematica srl

  23. VAR ID: Italy, Nauta Srl - Internet per l'impresa

  24. VAR ID: Italy, Studio C

  25. VAR ID: Japan, SoftWare Research Co.

  26. VAR ID: Malaysia, Linux Resources Sdn. Bhd.

  27. VAR ID: Malaysia, MAGNIFIX

  28. VAR ID: Malaysia, Malaysian Linux Competency Center Sdn. Bhd.

  29. VAR ID: Netherlands, CMG Trade, Transport & Industry

  30. VAR ID: Netherlands, X OS Experts in Open Systems BV

  31. VAR ID: Poland, Emit Sp z o.o.

  32. VAR ID: Romania, EVERCOMM Serv SRL

  33. VAR ID: Spain, Innovacion y Futuro s.l.

  34. VAR ID: Spain, LANGRE INGENIEROS S.L.

  35. VAR ID: Sweden, South Pole AB

  36. VAR ID: Taiwan, Whinstone Info. Corp.

  37. VAR ID: Turkey, Gelecek Bilisim ve Iletisim A.S

  38. VAR ID: US, AZ, Sunset Systems

  39. VAR ID: US, CA, ASL Workstations, Inc.

  40. VAR ID: US, CA, Linux Laptops Ltd.

  41. VAR ID: US, CA, PSSC Labs

  42. VAR ID: US, CO, Apache Digital Corporation

  43. VAR ID: US, CT, GNUTEC

  44. VAR ID: US, FL, eBuilders Network

  45. VAR ID: US, IL, Advanced Horizons, Inc

  46. VAR ID: US, IL, QLITech Linux COmputers

  47. VAR ID: US, IL, QLITech Linux Computers

  48. VAR ID: US, IL, WellThot Inc.

  49. VAR ID: US, KY, IndyBox Systems, Inc.

  50. VAR ID: US, KY, Neville Technologies

  51. VAR ID: US, MA, Network Concierge Inc.

  52. VAR ID: US, MD, AmNet Computers

  53. VAR ID: US, MN, Cranston Software

  54. VAR ID: US, MN, Donnal Group Inc

  55. VAR ID: US, MO, Atipa Linux Solutions

  56. VAR ID: US, MO, Omnitec Corporatin

  57. VAR ID: US, NC, ApeX Systems Integration Corp.

  58. VAR ID: US, NC, ComputerNet Inc.

  59. VAR ID: US, NC, Indelible Blue

  60. VAR ID: US, NE, BrainStorm Technologies

  61. VAR ID: US, NE, BrainStorm Technologies

  62. VAR ID: US, NH, DCG Computers, Inc.

  63. VAR ID: US, NON United States, Microway

  64. VAR ID: US, NON United States, Telenet System Solutions, Inc.

  65. VAR ID: US, NY, Logicept Corporation

  66. VAR ID: US, OH, 800Linux

  67. VAR ID: US, OH, LANshark Systems, Inc.

  68. VAR ID: US, OH, The Computer Underground

  69. VAR ID: US, OH, Unique Systems, Inc.

  70. VAR ID: US, OR, 3D Technology, Inc.

  71. VAR ID: US, PR, OG Consulting

  72. VAR ID: US, TX, Computer Innovations International

  73. VAR ID: US, TX, Heights Open Systems

  74. VAR ID: US, TX, Parachute

  75. VAR ID: US, VA, NetSource of Virginia, Inc.

  76. VAR ID: US, WA, Cheek Consulting

  77. VAR ID: US, WA, Lodgepole Technology

  78. VAR ID: United Arab Emirates, JM Infotech Solutions STPI

  79. VAR ID: United Kingdom, DGC-NMS

  80. VAR ID: United Kingdom, Definite Linux Systems Ltd

  81. VAR ID: United Kingdom, Digital Networks

  82. VAR ID: United Kingdom, iCode Systems Ltd



  ______________________________________________________________________

  1.  About this document


  This is the Linux VAR HOWTO.  It contains a listing of service
  companies which do not manufacture hardware or create packaged
  software, but add value to existing products.  This added value can
  take many forms, such as installation of Linux on computer hardware,
  configuration, or custom applications.  However, at the moment the
  Linux VAR HOWTO only contains companies selling preconfigured hardware
  for the purpose of running Linux.  Companies offering other services
  are invited to contact the maintainer poet@linuxports.com at
  poets@linuxports.com for a listing.


  If you contact any companies listed in this document, please mention
  the Linux VAR HOWTO.

  If you need to know more about the Linux Documentation Project or
  about Linux HOWTO's, feel free to contact the supervisor Tim Bynum
  <linux-howto@sunsite.unc.edu>.


  Tim Bynum will post the listing to several national and international
  newsgroups on a monthly basis.  In addition, the Linux VAR HOWTO can
  be found on the World Wide Web at http://www.linuxports.com.  New
  versions of the Linux VAR HOWTO are always placed at this site first,
  so please be sure to check if the copy you are reading is still up to
  date!


  Companies selling hardware for the purpose of running Linux are
  invited to fill out the form located at . Companies offering other
  services should  so a more appropriate template can be worked out.



  2.  Copyright Information


  This HOWTO s Copyright (C) 1999 Mr. Poet and LinuxPorts

  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author.  Translations
  are similarly permitted without express permission if it includes a
  notice on who translated it.

  Short quotes may be used without prior consent by the author.
  Derivative work and partial distributions of the Linux VAR HOWTO must
  be accompanied with either a verbatim copy of this file.

  Commercial redistribution is allowed and encouraged; however, the
  author would like to be notified of any such distributions.

  In short, we wish to promote dissemination of this information through
  as many channels as possible.  However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  We further want that all information provided in the HOWTOs is
  disseminated.  If you have questions, please contact Tim Bynum, the
  Linux HOWTO coordinator, at linux-howto@metalab.unc.edu.



  3.  VAR ID: Australia, Cybersource



       Level 8
       140 Queen Street
       Melbourne, NON United States 3000

       Australia



     Platform:
        x86 AXP "

     Distribution:
        RedHat "

     Company Phone Number:
        +61 3 9642 5997


     Company Fax:
        +61 3 9642 5997


     Contact Email Address:
        info@cyber.com.au

     Company URL:
        http://www.cyber.com.au

     Primary Contact:
        Con Zymaris



  4.  VAR ID: Australia, EMUSYS Unix Consulting



       20 Ivanhoe Rd
       Croydon
       Sydney, NON United States 2132

       Australia



     Platform:
        x86 AXP PPC "

     Distribution:
        Caldera Debian RedHat Suse LinuxPPC "

     Company Phone Number:
        +61 2 9798 7604


     Company Fax:
        +61 2 9798 2854


     Contact Email Address:
        sales@emusys.com.au

     Company URL:
        http://www.emusys.com.au

     Primary Contact:
        Anthony Rumble



  5.  VAR ID: Australia, Sydnet Group Pty Ltd



       PO Box 4664

       North Rocks, NON United States NSW 2151

       Australia



     Platform:
        x86 AXP Sparc M68k "

     Distribution:
        Caldera Debian RedHat LinuxRouter UltraPenguin "

     Company Phone Number:
        +61 2 9873 6400


     Company Fax:
        +61 2 9873 6411


     Contact Email Address:
        sales@syd.net.au

     Company URL:
        http://www.syd.net.au

     Primary Contact:
        Mark Lipscombe



  6.  VAR ID: Austria, QUANT-X Service & Consulting GmbH



       Hintnausdorf 14/1

       Sankt Veit a.d.Glan, NON United States

       Austria



     Platform:
        AXP "

     Distribution:
        RedHat "

     Company Phone Number:
        +43 4212 90555-0


     Company Fax:
        +43 4212 90555-20


     Contact Email Address:
        office@quant-x.com

     Company URL:
        http://www.quant-x.com

     Primary Contact:
        Wolfgang Dreyer



  7.  VAR ID: Brazil, Millennium Consultoria e Informtica Ltda.



       R. Francisco Parolin, 758

       Curitiba, NON United States 802220-360

       Brazil



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        +55-41-333-5645


     Company Fax:
        +55-41-333-5645


     Contact Email Address:
        millennium@millennium.etc.br

     Company URL:
        http://www.millennium.etc.br

     Primary Contact:
        Andr A. C.  Santos



  8.  VAR ID: Canada, Affinity Systems Inc.



       Box 10, RR 1

       Innisfail, AB T4G 1T6

       Canada



     Platform:
        x86 AXP "

     Distribution:
        Caldera RedHat "

     Company Phone Number:
        1-403-886-4638


     Company Fax:
        1-403-886-2663


     Contact Email Address:
        sales@affinity-systems.ab.ca

     Company URL:
        http://www.affinity-systems.ab.ca

     Primary Contact:
        James Bourne



  9.  VAR ID: Canada, Centurion Services



       9351 Blundell Road

       Richmond, BC V6Y 1K5

       Canada



     Platform:
        x86 AXP "

     Distribution:
        RedHat Suse "

     Company Phone Number:
        604-279-1857


     Company Fax:
        604-279-1800


     Contact Email Address:
        jwalter@home.com

     Company URL:
        http://www.ipipeline.net/centurion/

     Primary Contact:
        Mr.Jan Walter



  10.  VAR ID: Canada, Mediabase



  3 Shenston rd.
  look for new location soon!!
  North York, ON m2r 3b3

  Canada



     Platform:
        x86 "

     Distribution:
        Debian RedHat "

     Company Phone Number:
        416-468-5400


     Company Fax:
        no


     Contact Email Address:
        mediabase@ihosts.net

     Company URL:
        http://www.mediabase.ihosts.net

     Primary Contact:
        Cyrus Hill



  11.  VAR ID: Canada, Net Direct Inc.



       557 Havelock Dr.

       Waterloo, ON N2L 4Z1

       Canada



     Platform:
        x86 AXP "

     Distribution:
        Caldera Debian RedHat "

     Company Phone Number:
        519-579-5006


     Company Fax:
        519-745-9940



     Contact Email Address:
        john@netdirect.ca

     Company URL:
        http://www.netdirect.ca

     Primary Contact:
        John Van Ostrand



  12.  VAR ID: Canada, Softouch Computer Solutions



       5151 3rd Street SE

       Calgary, AB T2H2X6

       Canada



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        403


     Company Fax:
        258-0267


     Contact Email Address:
        sales@softouchcomputer.com

     Company URL:
        http://www.softouchcomputer.com

     Primary Contact:
        Al Green



  13.  VAR ID: Canada, VL



       221 Britannia

       Ottawa, ON K2B 5X1

       Canada



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        1 (613) 292-9818


     Company Fax:
        1 (613) 829-0967


     Contact Email Address:
        hungvu@netcom.ca

     Company URL:
        http://

     Primary Contact:
        Hung Vu



  14.  VAR ID: Finland, SOT Finnish Software Engineering Ltd.



       Hermiankatu 8 E
       FIN-33720
       TAMPERE, NON United States

       Finland



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        +358-3-316 5544


     Company Fax:
        +358-3-316 5959


     Contact Email Address:
        linux@sot.com

     Company URL:
        http://www.bestlinux.net

     Primary Contact:
        Kai Valijrvi



  15.  VAR ID: France, Paralline



       71, avenue des Vosges
       -
       STRASBOURG, NON United States 67000

       France



     Platform:
        x86 "

     Distribution:
        Suse "

     Company Phone Number:
        33 3 88 14 17 40


     Company Fax:
        33 3 88 14 17 41


     Contact Email Address:
        sales@paralline.com

     Company URL:
        http://www.paralline.com

     Primary Contact:
        Pierre BRUA



  16.  VAR ID: Germany, IGEL GmbH



       Aindlinger Str. 16
       Augsburg, NON United States 86167

       Germany



     Platform:
        x86 "

     Distribution:
        Suse "

     Company Phone Number:
        +49-821-7200-200


     Company Fax:
        +49-821-7200-189


     Contact Email Address:
        sales@igel.de

     Company URL:
        http://www.igel.de

     Primary Contact:
        Mike Finckh



  17.  VAR ID: Germany, IGEL



       Aindlinger Str. 16

       Augsburg, NON United States 86167

       Germany



     Platform:
        x86 "

     Distribution:
        Suse "

     Company Phone Number:
        +49-821-7200-200


     Company Fax:
        +49-821-7200-189


     Contact Email Address:
        sales@igel.de

     Company URL:
        http://www.igel.de

     Primary Contact:
        Mike Finckh



  18.  VAR ID: Germany, dynamis EDV-Consulting



  Bundschuhstrasse 24

  76661 Philippsburg, NON United States

  Germany



     Platform:
        x86 AXP "

     Distribution:
        Caldera RedHat Suse "

     Company Phone Number:
        +49 7256 9326-0


     Company Fax:
        +49 7256 9326-90


     Contact Email Address:
        info@dynamis.de

     Company URL:
        http://www.dynamis.de

     Primary Contact:
        Jochen Lillich



  19.  VAR ID: Hong Kong, Genesis Systems Int'l Ltd.



       5/F., 7/F., Honytex Building
       22 Ashley Road, T.S.T.
       Kowloon, NON United States

       Hong Kong



     Platform:
        AXP "

     Distribution:
        RedHat "

     Company Phone Number:
        +852 2815 0728


     Company Fax:
        +852 2815 0729



     Contact Email Address:
        info@genesis.com.hk

     Company URL:
        http://www.genesis.com.hk

     Primary Contact:
        Gyver  Lo



  20.  VAR ID: India, G.T.Enterprises



       # 912, 14th Main, 4th Cross
       Maruthi Circle, Hanumanthanagar
       Bangalore, NON United States 560019

       India



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        +91-80-6606093


     Company Fax:
        +91-80-6671407


     Contact Email Address:
        gtcdrom@vsnl.com

     Company URL:
        http://www.gtcdrom.com

     Primary Contact:
        U.M. Taranath



  21.  VAR ID: Indonesia, PT Cakram DataLingga Duaribu (CDL2000)



       Gunung Batu 131

       Bogor, NON United States 16610

       Indonesia



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        +62-251-332122


     Company Fax:
        +62-251-332122


     Contact Email Address:
        info@cdl2000.or.id

     Company URL:
        http://www.cdl2000.or.id

     Primary Contact:
        Maliana Harsoadi



  22.  VAR ID: Italy, Conecta Telematica srl



       Viale Tricesimo 101/13

       Udine, NON United States 33100

       Italy



     Platform:
        x86 AXP PPC "

     Distribution:
        Debian RedHat Suse LinuxPPC "

     Company Phone Number:
        +39 432 548825


     Company Fax:
        +39 432 299141


     Contact Email Address:
        info@conecta.it

     Company URL:
        http://www.conecta.it/linux

     Primary Contact:
        Carlo Daffara



  23.  VAR ID: Italy, Nauta Srl - Internet per l'impresa



       Viale Tricesimo 181

       Udine (UD), NON United States I-33100

       Italy



     Platform:
        x86 "

     Distribution:
        Debian RedHat LinuxRouter "

     Company Phone Number:
        +39 0432 477588


     Company Fax:
        +39 0432 548314


     Contact Email Address:
        info@Nauta.it

     Company URL:
        http://www.Nauta.it

     Primary Contact:
        Antonio Pezzoni



  24.  VAR ID: Italy, Studio C



       via Romeo Romei 23

       Rome, NON United States 00136

       Italy



     Platform:
        x86 AXP Sparc PPC M68k "

     Distribution:
        Caldera Debian RedHat Suse LinuxPPC LinuxRouter UltraPenguin "

     Company Phone Number:
        +39639722036


     Company Fax:
        +39639736598


     Contact Email Address:
        info@studioc-advertising.com

     Company URL:
        http://www.studioc-advertising.com

     Primary Contact:
        Marco Capecci



  25.  VAR ID: Japan, SoftWare Research Co.



       Hayabusacho 2-11
       Chiyodaku
       Tokyo, NON United States 102-0092

       Japan



     Platform:
        x86 "

     Distribution:
        Caldera Debian RedHat "

     Company Phone Number:
        81-3-3264-6171


     Company Fax:
        81-3-3264-0647


     Contact Email Address:
        info@src.co.jp

     Company URL:
        http://www.src.co.jp

     Primary Contact:
        Yossihiro Hayama



  26.  VAR ID: Malaysia, Linux Resources Sdn. Bhd.



  No. 33-1, Jalan 46A/26
  Pusat Bandar Taman Sri Rampai
  Setapak, NON United States 54000

  Malaysia



     Platform:
        x86 AXP Sparc PPC ARM M68k "

     Distribution:
        Caldera Debian RedHat Suse LinuxPPC LinuxRouter UltraPenguin "

     Company Phone Number:
        +603-4139010


     Company Fax:
        +603-4139011


     Contact Email Address:
        root@ihsan.com

     Company URL:
        http://linux.ihsan.com

     Primary Contact:
        Liwauddin Mohamad



  27.  VAR ID: Malaysia, MAGNIFIX



       2102 Wisma Rampai
       Jln 34/26, Taman Seri Rampai, Setapak
       Kuala Lumpur, NON United States 53300

       Malaysia



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        603 412 1775


     Company Fax:
        603 412 1550



     Contact Email Address:
        izauddin@magnifix.com.my

     Company URL:
        http://www.magnifix.com.my

     Primary Contact:
        Izauddin  Isa



  28.  VAR ID: Malaysia, Malaysian Linux Competency Center Sdn. Bhd.



       32-A, Jalan Mamanda 7,
       Ampang Point
       Ampang, NON United States 68000 Selangor

       Malaysia



     Platform:
        x86 Sparc "

     Distribution:
        RedHat UltraPenguin "

     Company Phone Number:
        +60 3 4571798


     Company Fax:
        +60 3 4523669


     Contact Email Address:
        linux@mlcc.com.my

     Company URL:
        http://www.mlcc.com.my

     Primary Contact:
        Abd Rahman Johari



  29.  VAR ID: Netherlands, CMG Trade, Transport & Industry



       Kralingseweg 241-249
       Postbus 8566
       Rotterdam, NON United States 3009 AN

       Netherlands



     Platform:
        x86 AXP Sparc PPC ARM M68k "

     Distribution:
        Caldera Debian RedHat Suse LinuxPPC LinuxRouter UltraPenguin "

     Company Phone Number:
        +31.10.2537000


     Company Fax:
        +31.10.2537032


     Contact Email Address:
        Henk.Drenth@cmg.nl

     Company URL:
        http://www.cmg.nl

     Primary Contact:
        Henk Drenth



  30.  VAR ID: Netherlands, X OS Experts in Open Systems BV



       Kruislaan 419

       Amsterdam, NON United States 1098 VA

       Netherlands



     Platform:
        x86 AXP Sparc "

     Distribution:
        Debian RedHat Suse "

     Company Phone Number:
        +31 20 6938364


     Company Fax:
        +31 20 6948204


     Contact Email Address:
        info@xos.nl

     Company URL:
        http://www.xos.nl

     Primary Contact:
        Jos Vos



  31.  VAR ID: Poland, Emit Sp z o.o.



       ul. Koszarowa 48/9

       Wroclaw, NON United States

       Poland



     Platform:
        x86 "

     Distribution:

     Company Phone Number:
        +48713267026


     Company Fax:
        +48723289733


     Contact Email Address:
        kontakt@emit.pl

     Company URL:
        http://www.emit.pl

     Primary Contact:
        Ian Carr-de Avelon



  32.  VAR ID: Romania, EVERCOMM Serv SRL



       Str. Ciucea 8, bl.L18, ap.189
       sector 3
       Bucharest, NON United States 7400

       Romania



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        +40-9-254-4355



     Company Fax:
        +40-1-345-4355


     Contact Email Address:
        Mihnea.Stoenescu@evercomm.ro

     Company URL:
        http://www.evercomm.ro

     Primary Contact:
        Mihnea Stoenescu



  33.  VAR ID: Spain, Innovacion y Futuro s.l.



       Plaza de S'Antigor, 3

       Manacor, NON United States 07500

       Spain



     Platform:
        x86 "

     Distribution:
        Caldera "

     Company Phone Number:
        +34 971846014


     Company Fax:
        +34 971846014


     Contact Email Address:
        info@i-futuro.com

     Company URL:
        http://www.i-futuro.com

     Primary Contact:
        Pascal Peregrina



  34.  VAR ID: Spain, LANGRE INGENIEROS S.L.



  Castilla 95.

  Santander., NON United States 39009

  Spain



     Platform:
        x86 "

     Distribution:
        Suse "

     Company Phone Number:
        34-942-33-56-33


     Company Fax:
        34-942-35-42-75


     Contact Email Address:
        arturo@langre.com

     Company URL:
        http://www.langre.com

     Primary Contact:
        Arturo Limon



  35.  VAR ID: Sweden, South Pole AB



       Banvaktsvgen 12

       Solna, NON United States 171 48

       Sweden



     Platform:
        x86 AXP "

     Distribution:
        Debian RedHat Suse "

     Company Phone Number:
        +46 (0)8 566 106 50


     Company Fax:
        +46 (0)8 566 106 50



     Contact Email Address:
        info@southpole.se

     Company URL:
        http://southpole.se

     Primary Contact:
        Jakob Sandgren



  36.  VAR ID: Taiwan, Whinstone Info. Corp.



       4f, No 15, Lane 2
       Dong Shing Rd.
       Taipei, NON United States 105

       Taiwan



     Platform:
        x86 AXP Sparc "

     Distribution:
        RedHat "

     Company Phone Number:
        886-2-27492626


     Company Fax:
        886-2-27468790


     Contact Email Address:
        info@whinstone.com

     Company URL:
        http://www.whinstone.com

     Primary Contact:
        Anthony Hsia



  37.  VAR ID: Turkey, Gelecek Bilisim ve Iletisim A.S



       Perpa Ticaret Merkezi B Blok
       Kat 11 No:1932
       Istanbul, NON United States

       Turkey



     Platform:
        x86 "

     Distribution:
        Caldera Debian RedHat Suse "

     Company Phone Number:
        +90 212 2107194


     Company Fax:
        +90 312 2100442


     Contact Email Address:
        info@gelecek.com.tr

     Company URL:
        http://www.gelecek.com.tr

     Primary Contact:
        Gorkem Cetin



  38.  VAR ID: US, AZ, Sunset Systems



       1328 East Barbarita Avenue

       Gilbert, AZ 85234

       US



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        602-770-3161


     Company Fax:
        480-497-8012


     Contact Email Address:
        sales@sunsetsystems.com

     Company URL:
        http://www.sunsetsystems.com

     Primary Contact:
        Rod Roark



  39.  VAR ID: US, CA, ASL Workstations, Inc.



       1757 Houret Court

       Milpitas, CA 95035

       US



     Platform:
        x86 "

     Distribution:
        Caldera RedHat Suse "

     Company Phone Number:
        877 ASL 3535


     Company Fax:
        408 941 2071


     Contact Email Address:
        sales@aslab.com

     Company URL:
        http://www.aslab.com

     Primary Contact:
        Jim Truong



  40.  VAR ID: US, CA, Linux Laptops Ltd.



       3583 Lynx Dr.
       San Jose, CA 95136

       US



     Platform:
        x86 "

     Distribution:
        Debian "

     Company Phone Number:
        +1 888 546-8958


     Company Fax:
        +1 408 269 9872


     Contact Email Address:
        info@linuxlaptops.com

     Company URL:
        http://www.linuxlaptops.com

     Primary Contact:
        Nathan Myers



  41.  VAR ID: US, CA, PSSC Labs



       27601 Forbes Rd Ste# 59

       Laguna Niguel, CA 92677

       US



     Platform:
        x86 AXP "

     Distribution:
        Caldera RedHat "

     Company Phone Number:
        949-582-7088


     Company Fax:
        949-582-7093


     Contact Email Address:
        4sales@pssclabs.com

     Company URL:
        http://www.pssclabs.com

     Primary Contact:
        Jason Smith



  42.  VAR ID: US, CO, Apache Digital Corporation



  777 Main Avenue
  #211
  Durango, CO 81301

  US



     Platform:
        x86 AXP "

     Distribution:
        Caldera Debian RedHat Suse "

     Company Phone Number:
        970-259-8153


     Company Fax:
        970-259-8145


     Contact Email Address:
        info@apache.com

     Company URL:
        http://www.apache.com

     Primary Contact:
        Steve Hauquitz



  43.  VAR ID: US, CT, GNUTEC



       1655 North Colony Road, Suite 3002

       Meriden, CT 06450

       US



     Platform:
        x86 AXP Sparc PPC ARM M68k "

     Distribution:
        Caldera Debian RedHat Suse LinuxPPC LinuxRouter UltraPenguin "

     Company Phone Number:
        1-203-379-0125


     Company Fax:
        1-203-379-0126



     Contact Email Address:
        info@gnutec.com

     Company URL:
        http://www.gnutec.com

     Primary Contact:
        Kyle Amon



  44.  VAR ID: US, FL, eBuilders Network



       8204 Crystal Clear Lane
       Suite 1200
       Orlando, FL 32809

       US



     Platform:
        x86 "

     Distribution:
        Caldera RedHat "

     Company Phone Number:
        407-857-6800


     Company Fax:
        407-857-2333


     Contact Email Address:
        pablo@ebuildernet.com

     Company URL:
        http://www.ebuildernet.com

     Primary Contact:
        Pablo Bryan



  45.  VAR ID: US, IL, Advanced Horizons, Inc



       323 Ferndale Ave

       Elmhurst, IL

       US



     Platform:
        x86 "

     Distribution:
        Suse "

     Company Phone Number:
        630-941-9332


     Company Fax:
        630-941-9338


     Contact Email Address:
        roger@ahinc.com

     Company URL:
        http://www.ahinc.com

     Primary Contact:
        Roger Petersen



  46.  VAR ID: US, IL, QLITech Linux COmputers



       3717 43rd st SUite #112

       Moline, IL 61265

       US



     Platform:
        x86 "

     Distribution:
        Caldera Debian RedHat "

     Company Phone Number:
        1-877-24-linux


     Company Fax:

     Contact Email Address:
        sales@qlitech.net

     Company URL:
        http://www.qlitech.net

     Primary Contact:
        Ray Sanders



  47.  VAR ID: US, IL, QLITech Linux Computers



       3717 43rd st. Suite #112

       Moline, IL 61265

       US



     Platform:
        x86 "

     Distribution:
        Caldera Debian RedHat Suse "

     Company Phone Number:
        1-877-24-LINUX


     Company Fax:
        1-309-764-1142


     Contact Email Address:
        sales@qlitech.net

     Company URL:
        http://www.qlitech.net

     Primary Contact:
        Ray Sanders



  48.  VAR ID: US, IL, WellThot Inc.



       305 Van Damin Ave.

       Glen Ellyn, IL 60137-5215

       US



     Platform:
        x86 "

     Distribution:
        RedHat LinuxRouter "

     Company Phone Number:
        630-545-1470


     Company Fax:
        630-545-1471


     Contact Email Address:
        sales@wellthot.com

     Company URL:
        http://wellthot.com

     Primary Contact:
        Mark Schwenk



  49.  VAR ID: US, KY, IndyBox Systems, Inc.



       PO Box 3564

       Carmel, KY 46082-3564

       US



     Platform:
        x86 AXP Sparc PPC ARM M68k "

     Distribution:
        Caldera Debian RedHat Suse LinuxPPC LinuxRouter UltraPenguin "

     Company Phone Number:
        +01 (317) 846.9762


     Company Fax:

     Contact Email Address:
        info@indybox.com

     Company URL:
        http://www.indybox.com

     Primary Contact:
        Charles Martin



  50.  VAR ID: US, KY, Neville Technologies



       4240 Frankfort Road

       Shelbyville, KY 40065

       US

     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        502-633-3711


     Company Fax:
        502-633-7950


     Contact Email Address:
        info@neville.net

     Company URL:
        http://www.neville.net

     Primary Contact:
        Chuck Neville



  51.  VAR ID: US, MA, Network Concierge Inc.



       350 Pleasant St.

       Ashland, MA 01721

       US



     Platform:
        x86 "

     Distribution:

     Company Phone Number:
        1- 877- 876-1169


     Company Fax:
        1-508-881-7374


     Contact Email Address:
        sales@nc4u.com

     Company URL:
        http://www.nc4u.com

     Primary Contact:
        Leonardo Salazar Sr.



  52.  VAR ID: US, MD, AmNet Computers



       3618 Anne Hasthaway
       Suite 1B
       Randallstown, MD 21133

       US



     Platform:
        x86 AXP "

     Distribution:
        RedHat "

     Company Phone Number:
        1 410 922-3554


     Company Fax:
        1 410 922-3552


     Contact Email Address:
        amnet@amnet-comp.com

     Company URL:
        http://amnet-comp.com

     Primary Contact:
        Joseph Volodarsky



  53.  VAR ID: US, MN, Cranston Software



       3255 Hennepin Av.S.

       Minneapolis, MN 55408

       US



     Platform:
        x86 "

     Distribution:
        Debian "

     Company Phone Number:
        612


     Company Fax:
        378-9052


     Contact Email Address:
        sales@cranston.com

     Company URL:
        http://cranston.com

     Primary Contact:
        M.A. al-Kabir



  54.  VAR ID: US, MN, Donnal Group Inc



       19820 Cottagewood Road

       Excelsior, MN 55331

       US



     Platform:
        x86 "

     Distribution:
        Caldera "

     Company Phone Number:
        612-474-7785


     Company Fax:
        612-474-7793


     Contact Email Address:
        info@donnalgroup.com

     Company URL:
        http://www.donnalgroup.com

     Primary Contact:
        Tim Burke



  55.  VAR ID: US, MO, Atipa Linux Solutions



  2608 S. Main

  Joplin, MO 64804

  US



     Platform:
        x86 "

     Distribution:
        Caldera RedHat "

     Company Phone Number:
        (800) 360-4346


     Company Fax:
        (417) 626-2692


     Contact Email Address:
        info@atipa.com

     Company URL:
        http://www.atipa.com

     Primary Contact:
        Brandon Fuhr



  56.  VAR ID: US, MO, Omnitec Corporatin



       PO Box 411010

       St. Louis, MO 63141

       US



     Platform:
        x86 "

     Distribution:
        Debian RedHat Suse LinuxRouter "

     Company Phone Number:
        3149974600


     Company Fax:
        3149970153



     Contact Email Address:
        info@omnitec.net

     Company URL:
        http://www.omnitec.net

     Primary Contact:
        Lee Lammert



  57.  VAR ID: US, NC, ApeX Systems Integration Corp.



       PO Box 338

       Apex, NC 27502

       US



     Platform:
        x86 "

     Distribution:
        RedHat Suse "

     Company Phone Number:
        919-468-8150


     Company Fax:
        919-468-5288


     Contact Email Address:
        apex@2boot.com

     Company URL:
        http://www.2boot.com

     Primary Contact:
        Joe Ferguson



  58.  VAR ID: US, NC, ComputerNet Inc.



       8320 Univ Exec PK Dr
       Suite 105
       Charlotte, NC 28262

       US



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        704-510-5292


     Company Fax:
        704-510-5296


     Contact Email Address:
        kbrust@computernetinc.com

     Company URL:
        http://http://www.computernetinc.com

     Primary Contact:
        Kurt Brust



  59.  VAR ID: US, NC, Indelible Blue



       3209 Gresham Lake Road
       Suite 135
       Raleigh, NC 27615

       US



     Platform:
        x86 "

     Distribution:
        Caldera Debian RedHat Suse LinuxRouter "

     Company Phone Number:
        1.919.878.9700  or 1.800.776.8284


     Company Fax:
        1.919.878.7479


     Contact Email Address:
        sales@indelible-blue.com

     Company URL:
        http://www.indelible-blue.com

     Primary Contact:
        Mark Turner



  60.  VAR ID: US, NE, BrainStorm Technologies



       1525 GrandView Ste#1

       Papillion, NE

       US



     Platform:
        x86 AXP PPC "

     Distribution:
        RedHat "

     Company Phone Number:
        1-800-598-6732


     Company Fax:
        1-800-598-6732


     Contact Email Address:
        info@bstc.net

     Company URL:
        http://www.bstc.net

     Primary Contact:
        Brian Roberson



  61.  VAR ID: US, NE, BrainStorm Technologies



       1525 GrandView Ste#1

       Papillion, NE

       US



     Platform:
        x86 AXP PPC "

     Distribution:
        RedHat "

     Company Phone Number:
        1-800-598-6732


     Company Fax:
        1-800-598-6732


     Contact Email Address:
        info@bstc.net

     Company URL:
        http://www.bstc.net

     Primary Contact:
        Brian Roberson



  62.  VAR ID: US, NH, DCG Computers, Inc.



       4 Sanborn Rd., # 2

       Londonderry, NH 03053

       US



     Platform:
        x86 AXP Sparc "

     Distribution:
        Caldera Debian RedHat Suse "

     Company Phone Number:
        +1-603-421-1800


     Company Fax:
        +1-603-421-0911


     Contact Email Address:
        sjg@dcginc.com

     Company URL:
        http://www.dcginc.com

     Primary Contact:
        Stephen Gaudet



  63.  VAR ID: US, NON United States, Microway



  Research Park
  Box 79
  Kingston Ma, NON United States 02364

  US



     Platform:
        AXP "

     Distribution:
        RedHat "

     Company Phone Number:
        508-746-7341


     Company Fax:
        508-746-4678


     Contact Email Address:
        info@microway.com

     Company URL:
        http://www.microway.com

     Primary Contact:
        Ann Fried



  64.  VAR ID: US, NON United States, Telenet System Solutions, Inc.



       2480 Kruse Drive

       San Jose, NON United States

       US



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        1-877-BootLinux


     Company Fax:
        408-383-0334



     Contact Email Address:
        linux@tesys.com

     Company URL:
        http://www.tesys.com

     Primary Contact:
        Kamal  Singh



  65.  VAR ID: US, NY, Logicept Corporation



       41 Chenango Street, Suite 201

       Binghamton, NY 13901-2901

       US



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        888.875.1355


     Company Fax:

     Contact Email Address:
        info@logicept.com

     Company URL:
        http://www.logicept.com

     Primary Contact:
        Jaron Rubenstein



  66.  VAR ID: US, OH, 800Linux



       1357 W. Lane Ave suite 211

       Columbus, OH 43221

       US



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        614-324-1610


     Company Fax:
        614-324-1617


     Contact Email Address:
        sales@gtltd.com

     Company URL:
        http://800linux.com

     Primary Contact:



  67.  VAR ID: US, OH, LANshark Systems, Inc.



       784 Morrison Road

       Columbus, OH 43230

       US



     Platform:
        x86 "

     Distribution:
        Caldera Debian RedHat Suse "

     Company Phone Number:
        614-751-1111


     Company Fax:
        614-751-1112


     Contact Email Address:
        info@lanshark.com

     Company URL:
        http://linux.lanshark.com

     Primary Contact:
        Scott Sharkey



  68.  VAR ID: US, OH, The Computer Underground



       1357 West Lane Ave suite 210

       Columbus, OH

       US



     Platform:
        x86 "

     Distribution:
        Caldera Debian RedHat Suse "

     Company Phone Number:
        614-485-0506


     Company Fax:

     Contact Email Address:
        sales@tcu-inc.com

     Company URL:
        http://www.tcu-inc.com

     Primary Contact:
        Mark Nielsen



  69.  VAR ID: US, OH, Unique Systems, Inc.



       6920 Spring Valley Dr.
       Suite 106
       Holland, OH 43528

       US



     Platform:
        x86 AXP "

     Distribution:
        Caldera RedHat Suse "

     Company Phone Number:
        419 861-3331


     Company Fax:
        419 861-3340
     Contact Email Address:
        info@uniqsys.com

     Company URL:
        http://www.uniqsys.com

     Primary Contact:
        Glenn Jacobson



  70.  VAR ID: US, OR, 3D Technology, Inc.



       9150 SW Pioneer Ct.,
       Suite E
       Wilsonville , OR 97070

       US



     Platform:
        x86 "

     Distribution:
        Caldera RedHat "

     Company Phone Number:
        1-503-582-1190


     Company Fax:
        1-503-582-9102


     Contact Email Address:
        netsales@3dtech.net

     Company URL:
        http://www.3dtech.net

     Primary Contact:
        Kerry Lafferty



  71.  VAR ID: US, PR, OG Consulting



       Urb. Santa Clara
       W-1 Anamu
       Guaynabo, PR 00969

       US



     Platform:
        x86 "

     Distribution:
        Caldera RedHat "

     Company Phone Number:
        787-731-4332


     Company Fax:
        787-731-4331


     Contact Email Address:
        james@og-consulting.com

     Company URL:
        http://www.og-consulting.com

     Primary Contact:
        James O'Malley



  72.  VAR ID: US, TX, Computer Innovations International



       2145 NW Military Highway, Suite 103

       San Antonio, TX 78213

       US



     Platform:
        x86 AXP Sparc "

     Distribution:
        Caldera RedHat Suse LinuxRouter "

     Company Phone Number:
        210-348-0850


     Company Fax:
        210-348-0851


     Contact Email Address:
        wvega@txcii.com

     Company URL:
        http://www.txcii.com

     Primary Contact:
        Waldemar Vega



  73.  VAR ID: US, TX, Heights Open Systems



       517 Harvard

       Houston, TX 77007

       US



     Platform:
        x86 AXP "

     Distribution:
        Debian RedHat LinuxRouter "

     Company Phone Number:
        713-864-5676


     Company Fax:
        713-864-5676


     Contact Email Address:
        perry@open-systems.com

     Company URL:
        http://www.open-systems.com

     Primary Contact:
        Perry Piplani



  74.  VAR ID: US, TX, Parachute



       3500 Oakmont
       Suite 101
       Austin, TX 78731

       US



     Platform:
        x86 "

     Distribution:
        RedHat LinuxRouter "

     Company Phone Number:
        (512)374-1898


     Company Fax:
        (512)374-9753


     Contact Email Address:
        kjones@parachute.com

     Company URL:
        http://www.parachute.com

     Primary Contact:
        Kristian  Jones



  75.  VAR ID: US, VA, NetSource of Virginia, Inc.



       7639 Hull Street Rd.
       Suite 202
       Richmond, VA 23235-6438

       US



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        1-804-674-6040


     Company Fax:
        1-804-674-6041


     Contact Email Address:
        netsource@erols.com

     Company URL:
        http://www.erols.com/netsource

     Primary Contact:
        Jeff Davis



  76.  VAR ID: US, WA, Cheek Consulting



  620 5th Ave W
  Suite 309
  Seattle, WA 98119

  US



     Platform:
        x86 "

     Distribution:
        Caldera "

     Company Phone Number:
        +1 (206) 282-2892


     Company Fax:
        +1 (206) 727-6797


     Contact Email Address:
        joseph@cheek.com

     Company URL:
        http://www.cheek.com

     Primary Contact:
        Joseph Cheek



  77.  VAR ID: US, WA, Lodgepole Technology



       14578 NE 177th Drive
       n/a
       Redmond, WA 98072

       US



     Platform:
        AXP "

     Distribution:
        RedHat "

     Company Phone Number:
        1(425)867-9091


     Company Fax:
        1(425)558-5752



     Contact Email Address:
        info@lodgepole.com

     Company URL:
        http://www.lodgepole.com

     Primary Contact:
        Geordy Rostad



  78.  VAR ID: United Arab Emirates, JM Infotech Solutions STPI



       P.O. Box 692
       AL MOTAMEM
       Karama, NON United States 692

       United Arab Emirates



     Platform:
        x86 "

     Distribution:
        RedHat "

     Company Phone Number:
        971 50 6326822


     Company Fax:
        971 4 359295


     Contact Email Address:
        mammen@emirates.net.ae

     Company URL:
        http://linuxsolutions.hypermart.net

     Primary Contact:
        John  Mammen



  79.  VAR ID: United Kingdom, DGC-NMS



       7 Owen Road
       Rainhill, Prescot
       Merseyside, NON United States L35 0PJ

       United Kingdom



     Platform:
        x86 AXP Sparc PPC M68k "

     Distribution:
        Caldera Debian RedHat Suse LinuxPPC "

     Company Phone Number:
        +44 151 289 9250


     Company Fax:
        +44 151 289 7895


     Contact Email Address:
        rich@dgc-nms.co.uk

     Company URL:
        http://www.dgc-nms.co.uk

     Primary Contact:
        Richard Bradshaw



  80.  VAR ID: United Kingdom, Definite Linux Systems Ltd



       264 Ripon Road

       Stevenage, NON United States SG1 4NF

       United Kingdom



     Platform:
        x86 "

     Distribution:
        Caldera Debian RedHat Suse LinuxRouter "

     Company Phone Number:
        +44 1438 223433


     Company Fax:

     Contact Email Address:
        sales@definitelinux.com

     Company URL:
        http://www.definitelinux.com

     Primary Contact:
        Jason Clifford



  81.  VAR ID: United Kingdom, Digital Networks



       Unit 12, New Mill
       Park Road, Dukinfield
       Cheshire, NON United States SK16 5LX

       United Kingdom



     Platform:
        x86 "

     Distribution:
        Caldera RedHat Suse "

     Company Phone Number:
        44 161 339 8555


     Company Fax:
        44 161 339 8666


     Contact Email Address:
        info@dnuk.com

     Company URL:
        http://dnuk.com

     Primary Contact:
        Lee Chisnall



  82.  VAR ID: United Kingdom, iCode Systems Ltd



       Consort Court
       High Street
       Fareham, NON United States PO16 7AL

       United Kingdom



     Platform:
        x86 "

     Distribution:
        Caldera Debian RedHat Suse "

     Company Phone Number:
        +44 1329 829898


     Company Fax:
        +44 1329 829899


     Contact Email Address:
        linux@icode.co.uk

     Company URL:
        http://www.icode.co.uk

     Primary Contact:
        Darren Durbin



  VME Howto
  John Huggins and Michael Wyrick, vmelinux@va.net
  v0.8a, 30 July 1998

  This document came about to show the embedded system community how to
  run Linux on their VMEbus Pentium and other PCI local bus based VMEbus
  processor designs.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Knowledge Required
     1.2 Why use Linux on VMEbus systems?
     1.3 Purpose
     1.4 Feedback
     1.5 VMELinux Revision History
     1.6 Copyright/Distribution

  2. Installation of the VMELinux Kernel Driver

     2.1 Download the Source
     2.2 Install the source to the software
     2.3 Compile the VMELinux components
     2.4 Load the VMELinux Kernel Module
     2.5 Difficulties

  3. How to talk to the VMEbus with the VMEUtils and the VMEShell Packages

     3.1 What is the VMEUtils program
     3.2 What are the VMEShell Scripts
     3.3 The "vmemap" command.
     3.4 Read Byte, Word or Long
     3.5 Write Byte, Word or Long
     3.6 Read the VMEbus to a file
     3.7 Write a file to the VMEbus
     3.8 Parameters
     3.9 Options
     3.10 A Note about DMA mode.

  4. How to talk to the Tundra Universe PCI-VME bridge using the devices drivers.

     4.1 The device drivers used with VMELinux
     4.2 VMEMaster Device Drivers
     4.3 VMESlave Device Drivers
     4.4 Direct Control of the Universe Registers
     4.5 read()
     4.6 write()
     4.7 lseek()
     4.8 ioctl()
     4.9 open() and close()

  5. Advantages of the VMEbus, Linux and VMELinux

     5.1 Pin and socket connectors
     5.2 Eurocard assembly
     5.3 Linux is Low Cost
     5.4 Linux is Stable
     5.5 Linux is Dynamic

  6. Current and planned Board Support

     6.1 Xycom XVME655 Pentium VMEbus Board
     6.2 XyCom XVME656 Pentium VMEBus Board
     6.3 Dynatem DPC1-0367
     6.4 Planned Board Support

  7. Conclusion

  8. FAQ

     8.1 The Shell utilities return a bunch of stars (*) when I access a board I know is there.  What gives?
     8.2 How does VMELinux handle interrupts?
     8.3 I have RedHat 5.1 and can't get VMELinux programs to compile.


  ______________________________________________________________________

  1.  Introduction

  1.1.  Knowledge Required

  Using Linux on an embedded VMEbus processor board is not very
  difficult.  However, more than fundamental knowledge is required.
  This document is not a primer on how to fully configure a Linux
  machine.


  In order to understand this HOWTO document it is assumed that you are
  thoroughly familiar with the following:


  o  Configuring and compiling a Linux kernel to operate the various
     peripherals on your board.  Kernel-HOWTO

  o  Setting up and configuring of network devices NET-3 HOWTO

  o  Setting up of inetd NET-3 HOWTO

  o  Setting up and use of the Tundra Universe PCI to VME Bridge Chip
     Tundra Universe.  The new VMEUtils program makes knowledge of the
     Universe unnecessary for those who do not wish to deal with
     register level Universe access.

  o  Compiling and installing various network packages like Apache Site
     Wu-Ftpd FAQ

  o  The VMEbus Rev. D and VME64.  Excellent information may be found at
     the  VMEbus International Trade Association (VITA).

  If you are uncertain of how to proceed with any of the above it is
  STRONGLY recommended that you use the links provided to familiarize
  yourself with all packages. We may not reply to any mail regarding any
  of the above.  Please direct any questions to the appropriate author
  of the HOWTO or consult the respective hardware manufacturer.

  This document describes the installation and use of VMELinux on a
  Xycom XVME-655 6U VME processor board. Other brands of VME boards that
  use a Pentium and the Tundra Universe chip should be capable of
  running VMELinux.  Please consult the Board Support Section of the
  VMELinux web site for tested boards.  VMELinux Project Web Site



  1.2.  Why use Linux on VMEbus systems?

  Operating systems for VMEbus computers are usually Real-time Operating
  Systems (RTOS) which have high cost and a significant learning curve.
  In return the RTOS offers quick response to real world events for
  control of machinery or response to a process.

  The VMEbus provides a rugged computer enclosure and interconnection
  system. Many system integrators require this ruggedness and also need
  very fast real-time response.  However, there are many times when
  there is little need for real-time response, but the software still
  needs:

  o  networking capability,

  o  remote access via telnet or similar program,


  o  file transfer via FTP or similar programs,

  o  remote booting via BOOTP or similar method,

  o  a way to respond to system interrupts.

     Linux has all these capabilities. Thus, the VMELinux Project
     exists.



  1.3.  Purpose

  The purpose of VMELinux is to give the VME system integrator another
  choice in operating systems. Rich in features, high in reliability and
  low in cost, Linux offers benefits to the embedded computer industry.
  High cost operating systems economically prohibit the use of VME in
  many applications. With Linux and the VMELinux drivers, the rugged
  VMEbus has new possibilities.

  The purpose of the VMELinux Project is to:

  o  Maintain and improve the free VMELinux Kernel Driver software,

  o  Offer added value software components such as the VMEUtils program
     and VMEShell utilities.

  o  Test the software on various makes and brands of manufacturer
     supplied VME processor boards,

  o  Maintain web based documentation on each tested brand and make of
     boards,

  o  Maintain this HOWTO.

  o  Integrate user suggested and user supplied improvements into the
     virgin code so we may all benefit from the programming talents of
     others.

  o  Become the original source for all the above software so VMELinux
     users can be assured of original code from the authors.


  1.4.  Feedback

  As VMELinux is tested in the field, we encourage comments about how
  well or how bad it works. Please feel free to send comments to The
  VMELinux Project


  As we get experience about each brand of VME CPU, we will list the
  different configurations in this HOWTO. For now we will describe only
  the Xycom board.


  1.5.  VMELinux Revision History

  Linux Kernel Driver

  o  November, 1997, v0.2 - Initial version on Xycom Board

  o  December, 1997, v0.3 - Useable version used for actual work with
     project.

  o  February, 1998, v0.6 - DMA mode added to VME access modes.

  o  June, 1998, v0.8 - Fixed a few things to allow the new VMEUtils to
     work.

  o  June 24, 1998, v0.8a - Current version made available on the
     website.

  VMEUtils Program

  o  February, 1998, v0.6 - Created a command line interpreter to access
     the VMEbus

  o  June, 1998, v0.8 - Fixed several issues to allow VMEShell Utilities
     to function

  o  June 24, 1998, v0.8a - Current version made available on the
     website.

  VMEShell Utilities

  o  June, 1998, v0.8 - Created command line utilities that allow access
     to the VMEbus from the Linux shell prompt.  These shell programs
     interface with the VMEUtils program.

  o  June 24, 1998, v0.8a - Changed the name of all the shell programs
     so they all begin with "vme."  Current version made available on
     the website.


  1.6.  Copyright/Distribution

  This document is Copyright 1997-1998 by John Huggins and the VMELinux
  Project.


  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author.  Translations
  are similarly permitted without express permission if it includes a
  notice on who translated it.  Commercial redistribution is allowed and
  encouraged; however please notify The VMELinux Project of any such
  distributions.


  Excerpts from the document may be used without prior consent provided
  that the derivative work contains the verbatim copy or a pointer to a
  verbatim copy.


  Permission is granted to make and distribute verbatim copies of this
  document provided the copyright notice and this permission notice are
  preserved on all copies.


  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we wish to retain copyright on
  this HOWTO document, and would like to be notified of any plans to
  redistribute this HOWTO.


  2.  Installation of the VMELinux Kernel Driver

  2.1.  Download the Source

  Download the distribution from the VMELinux Web Site.



  2.2.  Install the source to the software

  Place the file in a directory reserved for VME usage; We suggest
  /universe. Untar the zipped/tarred file by typing...

  tar -xzf VMELinux_08a.tar.gz



  You should see three directories and one link to ca91c042

  ca91c042
  vmeshell
  vmeutils
  driver



  In ca91c042 you should find:

  ca91c042/
  ca91c042/Makefile
  ca91c042/ca91c042.c
  ca91c042/ca91c042.h
  ca91c042/README
  ca91c042/e
  ca91c042/ins
  ca91c042/stat
  ca91c042/uns



  In vmeshell you should find:

  vmeshell/vmer
  vmeshell/README
  vmeshell/vmeseek
  vmeshell/cmd.vme
  vmeshell/vmew
  vmeshell/vmeregw
  vmeshell/vmeregr
  vmeshell/vmefa
  vmeshell/vmecall
  vmeshell/e
  vmeshell/ec
  vmeshell/fa.vme
  vmeshell/map.vme
  vmeshell/tmp.vme
  vmeshell/vmedb
  vmeshell/vmedl
  vmeshell/vmedw
  vmeshell/vmemap
  vmeshell/vmerb
  vmeshell/vmerf
  vmeshell/vmerl
  vmeshell/vmerw
  vmeshell/vmewb
  vmeshell/vmewf
  vmeshell/vmewl
  vmeshell/vmeww



  In the vmeutils directory you should find:


  vmeutils/commands.cpp
  vmeutils/commands.h
  vmeutils/universe.h
  vmeutils/Makefile
  vmeutils/vmeutils.h
  vmeutils/unilib.h
  vmeutils/unilib.cpp
  vmeutils/vmeutils.cpp
  vmeutils/README



  2.3.  Compile the VMELinux components

  Enter the "ca91c042" directory and make the VMELinux device driver
  module.

  make



  Now you must create the several /dev driver files.  Type:

  make devices



  Once made, you should see the file "ca91c042.o" in the directory.
  This is a loadable module.  See below for loading information.  Plus,
  you should find several "vme..." files in the /dev directory.

  Once the devices are made in the /dev directory you must change their
  permissions.  Type:

  cd /dev
  chmod 666 vme*


  Here is how the files should look:

  hostname:/dev# ls -l vme*
  crw-rw-rw-   1 root     root      70,   8 Jul 30 10:51 vme_ctl
  crw-rw-rw-   1 root     root      70,   0 Jul 30 10:51 vme_m0
  crw-rw-rw-   1 root     root      70,   1 Jul 30 10:51 vme_m1
  crw-rw-rw-   1 root     root      70,   2 Jul 30 10:51 vme_m2
  crw-rw-rw-   1 root     root      70,   3 Jul 30 10:51 vme_m3
  crw-rw-rw-   1 root     root      70,   4 Jul 30 10:51 vme_s0
  crw-rw-rw-   1 root     root      70,   5 Jul 30 10:51 vme_s1
  crw-rw-rw-   1 root     root      70,   6 Jul 30 10:51 vme_s2
  crw-rw-rw-   1 root     root      70,   7 Jul 30 10:51 vme_s3
  hostname:/dev#



  Change to the "vmeutils" directory and type make there.

  make



  This will compile the "vmeutils" program.  This program directly
  speaks to the kernel driver.  It is a reference work for those of you
  who wish to write your own programs to directly speak with the driver.

  Copy the program "vmeutils" to your user binary directory.  On our
  system this is "/usr/local/bin."  Alternatively, you can create a link
  in the user bin directory to the "vmeutils" program.

  Change to the "vmeshell" directory.  There are no files to be compiled
  here.  These are shell programs that use the "vmeutils" program to
  access the VMEbus.  All the files beginning with "vme" should with
  have a link made or be copied to the "/usr/local/bin" directory.

  You are now ready to try the driver.


  2.4.  Load the VMELinux Kernel Module

  Make sure you are root and insert "load" the VMELinux Kernel Module
  for the Universe chip by typing...

  insmod ca91c042



  Or just type "ins" to let the shell script do this for you.  Once
  complete, type...

  stat


  You should see a list of registers displayed on your screen.  Some-
  thing like this...

  Universe driver info:
    Control Pointer = 0000
    Stats  reads = 0  writes = 0  ioctls = 0
    LSI0_CTL = 00800000    LSI1_CTL = 00800000
    LSI0_BS  = C0000000    LSI1_BS  = 00000000
    LSI0_BD  = C0010000    LSI1_BD  = 00000000
    LSI0_TO  = 40009000    LSI1_TO  = 00000000
    LSI2_CTL = 00800000    LSI3_CTL = 00800000
    LSI2_BS  = 00000000    LSI3_BS  = 00000000
    LSI2_BD  = 00000000    LSI3_BD  = 00000000
    LSI2_TO  = 00000000    LSI3_TO  = 00000000
    image_va0   = 00000000     image_va1   = 00000000
    image_va2   = 00000000     image_va3   = 00000000

  Driver Program Status:
    DMACTL 0    = 00000000 DMACTL 1    = 00000000
    DMACTL 2    = 00000000 DMACTL 3    = 00000000
    OkToWrite 0 = 0        OkToWrite 1 = 0
    OkToWrite 2 = 0        OkToWrite 3 = 0
    Mode 0      = 0        Mode 1      = 0
    Mode 2      = 0        Mode 3      = 0


  If not, something went wrong.

  2.5.  Difficulties

  The Universe driver does a good job of finding the Universe chip on a
  PCI bus, but differences in board design may prevent this.  We tested
  all our routines on a Xycom XVME-655 board.  There is little reason
  why this should not work on any other Intel board with a PCI bus and
  the Universe PCI-VME bridge chip.  If you encounter problems, please
  let us know at the The VMELinux Project



  3.  How to talk to the VMEbus with the VMEUtils and the VMEShell Pack-
  ages

  3.1.  What is the VMEUtils program

  This program can be run as is.  Once started, you will see a command
  prompt.  Type ? And you will see a list of commands.  While useful, I
  think you will find the VMEShell scripts a better way to go.  They do
  use this program to speak with the kernel driver so it is necessary to
  have this program available in the current PATH.

  The source code for "vmeutils" is also instruction on how to speak
  directly to the kernel driver.  For those of you who wish to create
  programs that directly speak with the driver, these source files are
  good examples.

  3.2.  What are the VMEShell Scripts

  The VMEShell programs are unix shell scripts.  They offer the operator
  a simple way to access the data on a VMEbus.  Using these commands
  creates temporary files in the user's working directory which store
  information on the last access you did.  This is nice because it will
  be possible to log off the machine, log back in and proceed from where
  you left off without having to re-enter VMEbus information again.
  Plus, these files are stored in the current working directory, so you
  can have different VME access configuration just by setting up
  different directories for each VME board of interest.

  Assuming you placed the shell programs and the "vmeutils" program in
  the /usr/local/bin directory, you should be able to log in as a
  regular user and run them.  What follows assumes exactly this.

  3.3.  The "vmemap" command.

  Login as a regular user and create a directory to experiment with.
  Once in this directory type:

  vmemap


  You should get a help screen like this...

  Usage:  map address count space size type
    where address is VME Address to set Universe image to

      Space = 0 CR/CSR    Space = 1 A16
      Space = 2 A24       Space = 3 A32

      Size  = 1 8 bit     Size  = 2 16 bit
      Size  = 3 32 bit    Size  = 4 64 bit

      Type  = 0 USR/DATA  Type  = 1 USR/PRG
      Type  = 2 SUP/DATA  Type  = 3 SUP/PRG


  This is where you tell VMELinux how you want to access the VMEbus.  We
  assume you already know about the VMEbus' many modes of operation, but
  here is a short list to help you.

  o  address is the actual VMEbus address you wish to see.  This should
     be set to the lower most value of the address range of interest.

  o  count is the number of bytes you consider a valid range to view.
     This is the number of bytes starting at the address specified
     above.

  o  space is the addressing space (mode).  For those of you who do not
     know what we are talking about here, the VMEbus has four
     overlapping address spaces that can be called independant of each
     other.  A16 is a 64 KiloByte space.  A24 is a 16 MegaByte space.
     A32 is a 4 GigaByte space.  There is an A64 space defined the VME
     specification, but the Universe does not support it.

  o  Size refers to the maximum datawidth allowed for the VME board you
     are accessing.  Some VMEbus board only handle 8 bit data paths.
     Others transfer 32 bits (four bytes) at a time.  Some can handle a
     special VME block mode which can move 64 bits per transaction.  The
     Universe can handle all these modes allowing you to mix inexpensive
     serial port boards with hugh memory arrays.

  o  Type is the type of VME transaction performed.  Some VME boards
     make a distinction between "User" access (USR) and "Supervisior"
     access (SUP).  Also, some boards allow access to two "pages" of
     memory: Program (PRG) and Data.  The Universe supports all modes.

     Typing...

     vmemap 0x8000 0x100 1 2 0


  sets up the VMELinux driver to access an A16 board at base address
  8000 Hex with a range of 100H bytes with 16 bit data width and
  USR/DATA mode.

  You will find two new files in your current directory.

  o  fa.vme

  o  map.vme

     fa.vme stores a "fixed adder" value that will be added to all
     subsequent accesses with the programs below.

  map.vme store the parameters above so you do not have to enter them
  every time.

  All the following shell utilities read values from these two files to
  performs VME accesses.


  3.4.  Read Byte, Word or Long

  Syntax:

  o  vmerb -[options] address size

  o  vmerw  -[options] address size

  o  vmerl -[options] address size

  3.5.  Write Byte, Word or Long

  Syntax:

  o  vmewb -[options] address value

  o  vmeww  -[options] address value

  o  vmewl -[options] address value



  3.6.  Read the VMEbus to a file

  Syntax:

  o  vmerf -[options] address size filename

  3.7.  Write a file to the VMEbus

  Syntax:

  o  vmewf -[options] address filename

  3.8.  Parameters

  There are several parameters used with these commands: address, size
  and filename.

  o  address - The actual hexadecimal VMEbus address you wish to read.
     If the map command is set to access A16 VME address space, the
     address should be 0xABCD.  If the space is A24 then use 0xABCDEF.
     For A32 space use 0xABCDEFGH.

  o  size - The number of bytes to read.  This value is always the
     number of bytes regardless of the data word size read.  For
     example, if you want to read 16 bytes of information and use vmerl,
     the display will show 16 bytes displayed as 4 long words.

  o  filename - The name of the file to send "read" VMEbus data to or
     "write" VMEbus data from.

  o  value - a hex value written as "0xXXXX."

  3.9.  Options

  Available options are defined with a single dash with the any
  combination of the following:

  o  q - Hides details on the access to the vmeutils program (default)

  o  Q - Shows details on the access to the vmeutils program

  o  p - Single access PCI addressing mode (opposite of d) (default)

  o  d - DMA access PCI addressing mode (opposite of p) (very fast
     access to the VMEbus)

  o  0, 1, 2, or 3 - Which Universe chip "Image" to use (defaults to 0)

  o  b - binary mode off (default)

  o  B - binary mode on

  o  v - turn off verbose parameter printing (default)

  o  V - turn on verbose parameter printing to see how the driver is
     begin used

  3.10.  A Note about DMA mode.

  VMELinux offers access to all the features of the Universe Chip.
  Especially useful is access to the DMA engine on the chip.  With this
  feature the Universe chip transfers data on the PCI bus by becoming a
  PCI master.  This is nice, but the real benefit comes from the VMEbus
  accesses.  Even if the VMEbus interface is not using block mode
  transfers, the Universe chip can complete VMEbus transfers under 400
  nanoseconds sustained.  This is the direct result of the Universe
  taking complete control of both the PCI bus and the VMEbus.  Thus, it
  is possible to access non block mode VMEbus peripherals much faster
  than older technologies.


  4.  How to talk to the Tundra Universe PCI-VME bridge using the
  devices drivers.

  4.1.  The device drivers used with VMELinux


  o  /dev/vme_ioctl

  o  /dev/vme_m0

  o  /dev/vme_m1

  o  /dev/vme_m2

  o  /dev/vme_m3

  o  /dev/vme_s0

  o  /dev/vme_s1

  o  /dev/vme_s2

  o  /dev/vme_s3

  4.2.  VMEMaster Device Drivers

  /dev/vme_m* are drivers used to access the VMEbus as a bus master.

  The Universe chip offers the programmer four VMEMaster windows to the
  VMEbus.  These windows are called Images.  The details of the
  registers within these windows is beyond the scope of this Howto.
  Please refer to the Universe documentation for details. Tundra
  Universe

  4.3.  VMESlave Device Drivers

  /dev/vme_s* are drivers used to allow another VMEbus master to access
  this device.

  The Universe chip offers the programmer four VMESlave windows to the
  VMEbus.  These windows are called Images.  The details of the
  registers within these windows is beyond the scope of this Howto.
  Please refer to the Universe documentation for details. Tundra
  Universe

  Slave VME modes are not yet supported by VMELinux.

  4.4.  Direct Control of the Universe Registers

  /dev/vme_ioctl allows read and write access to the Universe registers.

  For experienced users, this device allows direct access to the
  Universe chip's internal registers.  Explanation of these registers
  and what they do is beyond the scope of this howto. Please consult the
  Universe documentation available from Tundra Universe

  4.5.  read()

  n = read(vme_handle,buf,len);


  Where:

  o  vme_handle = The value returned by "open,"

  o  buf = pointer to data block,

  o  len = number of bytes to read from the VMEbus.

  4.6.  write()

  write(vme_handle,buf,len);

  Where:

  o  vme_handle = The value returned by "open,"

  o  buf = pointer to data block,

  o  len = number of bytes to write to the VMEbus.

  4.7.  lseek()

  lseek(vme_handle,vme_pnt,Seek_Type);

  Where:

  o  vme_handle = The value returned by "open,"

  o  vme_pnt = The actual VME address to access,

  o  Seek_Type = SEEK_SET or SEEK_CUR

  4.8.  ioctl()

  ioctl(vme_handle, command, argument);

  Where:

  o  vme_handle = The value returned by "open,"

  o  command = IOCTL_SET_CTL or IOCTL_SET_MODE or IOCTL_SET_BS or
     IOCTL_SET_BD or IOCTL_SET_TO

  o  argument to be sent

     And:

  o  IOCTL_SET_CTL = Sets the image CTL register to argument. Argument
     must be 32 bits.

  o  IOCTL_SET_MODE = "MODE_DMA" or "MODE_PROGRAMMED" - Sets the mode by
     which the Universe chips communicates to the PCI bus (Not VME Block
     Mode)

  o  IOCTL_SET_BS = Sets the image BS register to arguments.  NOTE: The
     BD register must already be set prior to making this call.

  o  IOCTL_SET_BD = Sets the image BD register to argument.

  o  IOCTL_SET_TO = Set the image TO register to argument.

  4.9.  open() and close()

  Here is where you open and close the four VMELinux Master or Slave
  devices plus the Control device.  Slave images are not yet supported.

  o  vme_handle = open("//dev//vme_m0",O_RDWR,0);

  o  uni_handle = open("//dev//vme_ctl",O_RDWR,0);


  o  close(vme_handle);

  o  close(uni_handle);


  5.  Advantages of the VMEbus, Linux and VMELinux

  5.1.  Pin and socket connectors

  The VMEbus standard uses pin and socket connectors. This is superior
  to edge connections in that the connection is not exposed to humidity
  and other environmental conditions. It is a more expensive way of
  doing things, but offers longer times before failure.

  5.2.  Eurocard assembly

  A VMEboard is either a 3U (160 x 100 mm) or a 6U size (160 x 233.35
  mm). These sizes correspond to the Eurocard standard for board modules
  and card cages. Eurocard is a popular format used by many different
  busses including CompactPCI. This popularity makes the materials
  needed for cage assembly inexpensive and easy to obtain.

  5.3.  Linux is Low Cost

  The nature of Linux is in its user supported and freely available
  format. The number of people using Linux is growing. The number of
  people contributing to the continued development of the Linux software
  base is growing. It is unfair to state that Linux is a good value
  because it is available for little to no charge. Linux is a good value
  because it works.

  5.4.  Linux is Stable

  There are those who say that Linux us an unstable operating system. It
  is true that the new Linux kernels in development are experimental and
  should not be relied on for critical applications. However, stable
  versions of the Linux OS are always available and provide very stable
  operation. VMELinux is always based on the stable versions of the
  kernel source; Today's stable kernels are the 2.0.X series.

  5.5.  Linux is Dynamic

  Because so many people are developing Linux, you do not have to wait
  long for improvements, fixes or new features to become part of the
  Linux distribution.

  6.  Current and planned Board Support

  While the VMELinux driver should work with any PCI based design, the
  following boards have actually run our software.

  6.1.  Xycom XVME655 Pentium VMEbus Board


  o  This XyCom board is compatible with the standard VMELinux kernel
     driver package from VMELinux Project

  o  A prepared kernel will be available soon.  It will be based on the
     newest version of the Linux kernel and will include appropriate
     drivers for the onboard NE2100 Ethernet interface.  Check the
     website for details.
  6.2.  XyCom XVME656 Pentium VMEBus Board


  o  This XyCom board is compatible with the standard VMELinux kernel
     driver package from VMELinux Project

  o  A prepared kernel will be available soon.  It will be based on the
     newest version of the Linux kernel and will include appropriate
     drivers for the onboard AHA2940/AIC7000 SCSI and 82558 Intel
     EtherExpress Ethernet peripherals.  Check the website for details.

  6.3.  Dynatem DPC1-0367


  o  This board is compatible with the standard VMELinux kernel driver
     package from VMELinux Project

  o  A prepared kernel will be available soon.  It will be based on the
     newest version of the Linux kernel and will include appropriate
     drivers for the onboard SCSI and Tulip Ethernet peripherals.  Check
     the website for details.

  6.4.  Planned Board Support

  If you do not see VMELinux support for your board let us know. Maybe
  the manufacture will lend us a board for development.

  7.  Conclusion

  VMELinux offers the user a low cost way to implement a VMEbus system
  quickly, reliably and with all the advantages of a unix environment.
  We are using VMELinux in our projects so you can be sure future
  developments will come quick.  On the drawing board for this year are:

  o  Implementation of Interrupts and Handling thereof,

  o  Porting to other brands of Intel VMEbus boards,

  o  Porting of VMELinux to other processors that use the Universe chip,

  o  A study of running the VMELinux kernel driver module as a RT-Linux
     task.

  This document outlines the steps you need to install the VMELinux
  Kernel Driver into the example Xycom XVME-655 Pentium VME board.  It
  is our hope that others will attempt installation of VMELinux into
  other boards and let us know their success.


  Mail any responses to The VMELinux Project.  If you have a question or
  an update to the document let us know and we will add it.



  8.  FAQ


  8.1.  The Shell utilities return a bunch of stars (*) when I access a
  board I know is there.  What gives?

  Check to be sure the /dev/vme... files have their permissions set to
  666.  If not, the shell utilities will return a * in place of data to
  indicate an error condition similar to a VME bus error.



  8.2.  How does VMELinux handle interrupts?

  Right now it doesn't.  However, we are planning to get that part going
  soon.  Please be patient.

  8.3.  I have RedHat 5.1 and can't get VMELinux programs to compile.

  RedHat 5.1 includes a new compiler.  If you manually edit the Makefile
  in each directory to call up the new egcs compiler, things should
  compile.  We fully intend to support RedHat 5.1 installations, but for
  now I suggest using 5.0 or Slackware.



  From VMS to Linux HOWTO
  By Guido Gonzato,  <guido ``at'' ibogeo.df.unibo.it>, and
  Mike Miller,  <miller5@uiuc.edu>
  v1.1.3, 17 September 1999

  This HOWTO is aimed at all those who have been using VMS and now need
  or want to switch to Linux, the free UNIX clone. The transition is
  made (hopefully) painless with a step--to--step comparison between
  commands and available tools.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Why Linux?
     1.2 Comparing Commands and Files

  2. Short Intro

     2.1 Files
     2.2 Directories
     2.3 Programs
     2.4 Quick Tour

  3. Editing Files

  4. TeXing

  5. Programming

     5.1 Fortran
     5.2 Using
     5.3 Shell Scripts
     5.4 C

  6. Graphics

  7. Mail and Internet Tools

  8. Advanced Topics

     8.1 Permissions and Ownership
     8.2 Multitasking: Processes and Jobs
     8.3 Files, Revisited
     8.4 Print Queues

  9. Configuring

  10. Useful Programs

     10.1 Browsing Files:
     10.2 Numbered Backups Under Linux
     10.3 Archiving: tar & gzip

  11. Real Life Examples

  12. Tips You Can't Do Without

  13. Reading VMS tapes from Linux

     13.1 Introduction
     13.2 The Basics
     13.3 Some details
     13.4 Comment on Block Size

  14. The End

     14.1 Copyright
     14.2 Disclaimer


  ______________________________________________________________________

  1.  Introduction



  1.1.  Why Linux?


  You've heard that UNIX is difficult and balk at the prospect of
  leaving VMS, don't you? Don't worry. Linux, one of the finest UNIX
  clones, is not more difficult to use than VMS; actually, I find it
  easier. Although VMS aficionados may not agree, in many people's
  opinion Linux is much more powerful and versatile.

  Linux and VMS are both good operating systems and accomplish
  essentially the same tasks, but Linux has a few features that make it
  a good alternative to VMS. Moreover, Linux is available for PCs while
  VMS is not, and modern Pentium-based Linux machines can outperform a
  VAX. The icing on the cake is the excellent performance of modern
  video cards, which turn an X11-based Linux box into a fast graphic
  workstation; nearly always, quicker than dedicated machines.

  I imagine you're a university researcher or a student, and that you
  use VMS for the following everyday tasks:


  o  writing papers with TeX/LaTeX;

  o  programming in Fortran;

  o  doing some graphics;

  o  using Internet services;

  o  et cetera.

  In the following sections I'm going to explain to you how to do these
  tasks under Linux, exploiting your experience with VMS. Prerequisites:


  o  Linux and X Window System are properly installed;

  o  there's a system administrator to take care of the technical
     details (please get help from them, not from me ;-) ;

  o  your shell---the equivalent of DCL---is bash (ask your sysadm).

  Please note that this HOWTO is not enough to acquaint you fully with
  Linux: it only contains the bare essential to get you started. You
  should learn more about Linux to make the most of it (advanced bash
  features, programming, regular expressions...). From now on, RMP means
  `please read the man pages for further details'. The man pages are the
  equivalent of the command HELP.

  The Linux Documentation Project documents, available on
  <ftp://sunsite.unc.edu:/pub/Linux/docs/LDP>, are an important source
  of information. I suggest that you read Larry Greenfield's ``Linux
  User Guide''---it's invaluable for the novice user.

  And now, go ahead.


  1.2.  Comparing Commands and Files


  This table attempts to compare VMS' and Linux' most used commands.
  Please keep in mind that the syntax is often very different; for more
  details, refer to the following sections.



  VMS                             Linux                   Notes
  ------------------------------------------------------------------------------

  @COMMAND                        command                 must be executable
  COPY file1 file2                cp file1 file2
  CREATE/DIR [.dirname]           mkdir dirname           only one at a time
  CREATE/DIR [.dir1.dir2]         mkdirhier dir/name
  DELETE filename                 rm filename
  DIFF file1 file2                diff -c file1 file2
  DIRECTORY                       ls
  DIRECTORY [...]file             find . -name file
  DIRECTORY/FULL                  ls -al
  EDIT filename                   vi filename,            you won't like it
                                  emacs filename,         EDT compatible
                                  jed filename            ditto---my favourite
  FORTRAN prog.for                g77 prog.f,             no need to do LINK
                                  f77 prog.f,
                                  fort77 prog.f
  HELP command                    man command             must specify `command'
                                  info command            ditto
  LATEX file.tex                  latex file.tex
  LOGIN.COM                       .bash_profile,          `hidden' file
                                  .bashrc                 ditto
  LOGOUT.COM                      .bash_logout            ditto
  MAIL                            mail,                   crude
                                  elm,                    much better
                                  pine                    better still
  PRINT file.ps                   lpr file.ps
  PRINT/QUEUE=laser file.ps       lpr -Plaser file.ps
  PHONE user                      talk user
  RENAME file1 file2              mv file1 file2          not for multiple files
  RUN progname                    progname
  SEARCH file "pattern"           grep pattern file
  SET DEFAULT [-]                 cd ..
  SET DEFAULT [.dir.name]         cd dir/name
  SET HOST hostname               telnet hostname,        not exactly the same
                                  rlogin hostname
  SET FILE/OWNER_UIC=joe          chown joe file          completely different
  SET NOBROADCAST                 mesg
  SET PASSWORD                    passwd
  SET PROT=(perm) file            chmod perm file         completely different
  SET TERMINAL                    export TERM=            different syntax
  SHOW DEFAULT                    pwd
  SHOW DEVICE                     du, df
  SHOW ENTRY                      lpq
  SHOW PROCESS                    ps -ax
  SHOW QUEUE                      lpq
  SHOW SYSTEM                     top
  SHOW TIME                       date
  SHOW USERS                      w
  STOP                            kill
  STOP/QUEUE                      kill,                   for processes
                                  lprm                    for print queues
  SUBMIT command                  command &
  SUBMIT/AFTER=time command       at time command
  TEX file.tex                    tex file.tex
  TYPE/PAGE file                  more file
                                  less file               much better



  But of course it's not only a matter of different command names. Read
  on.


  2.  Short Intro


  This is what you absolutely need to know before logging in the first
  time. Relax, it's not much.


  2.1.  Files



  o  Under VMS filenames are in the form filename.extension;version.
     Under Linux, the version number doesn't exist (big limitation, but
     see Section ``Numbered Backups Under Linux''); the filename has
     normally a limit of 255 characters and can have as many dots as you
     like. Example of filename: This.is_a_FILEname.txt.

  o  Linux distinguishes between upper case and lower case characters:
     FILENAME.txt and filename.txt are two different files; ls is a
     command, LS is not.

  o  A filename starting with a dot is a `hidden' file (that is, it
     won't normally show up in dir listings), while filenames ending
     with a tilde '~' represent backup files.


  Now, a table to sum up how to translate commands from VMS to Linux:



       VMS                                     Linux
       ---------------------------------------------------------------------

       $ COPY file1.txt file2.txt              $ cp file1.txt file2.txt
       $ COPY [.dir]file.txt []                $ cp dir/file.txt .
       $ COPY [.dir]file.txt [-]               $ cp dir/file.txt ..
       $ DELETE *.dat;*                        $ rm *dat
       $ DIFF file1 file2                      $ diff -c file1 file2
       $ PRINT file                            $ lpr file
       $ PRINT/queue=queuename file            $ lpr -Pprintername file
       $ SEARCH *.tex;* "geology"              $ grep geology *tex



  For other examples involving directories, see below; for details about
  protections, ownership, and advanced topics, see Section ``Advanced
  Topics''.


  2.2.  Directories



  o  Within the same node and device, directories names under VMS are in
     the form [top.dir.subdir]; under Linux, /top/dir/subdir/. On the
     top of the directory tree lies the so--called `root directory'
     called /; underneath there are other directories like /bin, /usr,
     /tmp, /etc, and others.

  o  The directory /home contains the so--called users' `home
     directories': e.g. /home/guido, /home/warner, and so on.  When a
     user logs in, they start working in their home dir; it's the
     equivalent of SYS$LOGIN. There's a shortcut for the home directory:
     the tilde '~'. So, cd ~/tmp is the same as, say, cd
     /home/guido/tmp.

  o  Directory names follow the same rules as file names. Furthermore,
     each directory has two special entries: one is . and refers to the
     directory itself (like []), and .. that refers to the parent
     directory (like [-]).


  And now for some other examples:



       VMS                                     Linux
       ---------------------------------------------------------------------

       $ CREATE/DIR [.dirname]                 $ mkdir dirname
       $ CREATE/DIR [.dir1.dir2.dir3]          $ mkdirhier dir1/dir2/dir3
          n/a                                  $ rmdir dirname
                                               (if dirname is empty)
                                               $ rm -R dirname
       $ DIRECTORY                             $ ls
       $ DIRECTORY [...]file.*;*               $ find . -name "file*"
       $ SET DEF SYS$LOGIN                     $ cd
       $ SET DEF [-]                           $ cd ..
       $ SET DEF [top.dir.subdir]              $ cd /top/dir/subdir
       $ SET DEF [.dir.subdir]                 $ cd dir/subdir
       $ SHOW DEF                              $ pwd



  For protections, ownership, and advanced topics, see Section
  ``Advanced Topics''.


  2.3.  Programs



  o  Commands, compiled programs, and shell scripts (VMS' `command
     files') don't have sort of mandatory extensions like .EXE or .COM
     and can be called whatever you like. Executable files are marked by
     an asterisk '*' when you issue ls -F.

  o  To run an executable file, just type its name (no RUN PROGRAM.EXE
     or @COMMAND). Caveat: it's essential that the file be located in a
     directory included in the path of executables, which is a list of
     directories. Typically, the path includes dirs like /bin, /usr/bin,
     /usr/X11R6/bin, and others. If you write your own programs, put
     them in a directory you have included in the path (see how in
     Section ``Configuring''). As an alternative, you may run a program
     specifying its complete path: e.g., /home/guido/data/myprog; or
     ./myprog, if the current directory isn't in the path.

  o  Command switches are obtained with /OPTION= under VMS, and with
     -switch or --switch under Linux, where switch is a letter, more
     letters combined, or a word. In particular, the switch -R
     (recursive) of many Linux commands performs the same action as
     [...]  under VMS;

  o  You can issue several commands on the command line:



  $ command1 ; command2 ; ... ; commandn



  o  Most of the flexibility of Linux comes from two features awkwardly
     implemented or missing in VMS: I/O redirection and piping. (I have
     been told that recent versions of DCL support redirection and
     piping, but I don't have that version.) Redirection is a side
     feature under VMS (remember the switch /OUTPUT= of many commands),
     or a fastidious process, like:



       $ DEFINE /USER SYS$OUTPUT OUT
       $ DEFINE /USER SYS$INPUT IN
       $ RUN PROG



  which has the simple Linux (UNIX) equivalent:



       $ prog < in > out



  Piping is not readily available under VMS, but has a key role under
  UNIX. A typical example:



       $ myprog < datafile | filter_1 | filter_2 >> result.dat 2> errors.log &



  which means: the program myprog gets its input from the file datafile
  (via <), its output is piped (via |) to the program filter_1 that
  takes it as input and processes it, the resulting output is piped
  again to filter_2 for further processing, the final output is appended
  (via >>) to the file result.dat, and error messages are redirected
  (via 2>) onto the file errors.log. All this in background (& at the
  end of the command line). More about this in Section ``Examples''.


  For multitasking, `queues', and the like, see Section ``Advanced
  Topics''.


  2.4.  Quick Tour


  Now you are ready to try Linux out. Enter your login name and password
  exactly as they are. For example, if your login name and password are
  john and My_PassWd, don't type John or my_passwd.  Remember, UNIX
  distinguishes between capital and small letters.


  Once you've logged in, you'll see a prompt; chances are it'll be
  something like machinename:$. If you want to change the prompt or make
  some programs start automatically, you'll have to edit a `hidden' file
  called .profile or .bash_profile (see example in Section
  ``Configuring''). This is the equivalent of LOGIN.COM.

  Pressing ALT--F1, ALT--F2, ... ALT--F6 switches between `virtual
  consoles'.  When one VC is busy with a full--screen application, you
  can flip over to another and continue to work. Try and log in to
  another VC.

  Now you may want to start X Window System (from now on, X). X is a
  graphic environment very similar to DECWindows---actually, the latter
  derives from the former. Type the command startx and wait a few
  seconds; most likely you'll see an open xterm or equivalent terminal
  emulator, and possibly a button bar. (It depends on how your sysadm
  configured your Linux box.)  Click on the desktop (try both mouse
  buttons) to see a menu.

  While in X, to access the text mode (`console') sessions press
  CTRL--ALT--F1 ... CTRL--ALT--F6. Try it. When in console, go back to X
  pressing ALT--F7. To quit X, follow the menu instructions or press
  CTRL--ALT--BS.

  Type the following command to list your home dir contents, including
  the hidden files:



       $ ls -al



  Press SHIFT--PAG UP to back-scroll. Now get help about the ls command
  typing:



       $ man ls



  pressing 'q' to exit. To end the tour, type exit to quit your session.
  If now you want to turn off your PC, press CTRL--ALT--DEL and wait a
  few seconds (never switch off the PC while in Linux! You could damage
  the filesystem.)

  If you think you're ready to work, go ahead, but if I were you I'd
  jump to Section ``Advanced Topics''.



  3.  Editing Files


  Linux doesn't have EDT, but there are scores of editors available. The
  only one that's guaranteed to be included in every UNIX version is
  vi---forget it, your sysadm must have installed something better.
  Probably the most popular editor is emacs, which can emulate EDT to a
  certain degree; jed is another editor that provides EDT emulation.

  These two editors are particularly useful for editing program sources,
  since they have two features unknown to EDT: syntax hilighting and
  automatic indentation. Moreover, you can compile your programs from
  within the editor (command ESC-X compile); in case of a syntax error,
  the cursor will be positioned on the offending line. I bet that you'll
  never want to use the true blue EDT again.

  If you have emacs: start it, then type ESC-X edt-emulation-on.
  Pressing ALT--X or ESC-X is emacs' way of issuing commands, like EDT's
  CTRL--Z. From now on, emacs acts like EDT apart from a few commands.
  Differences:


  o  don't press CTRL--Z to issue commands (if you did, you stopped
     emacs. Type fg to resume it);

  o  there's an extensive on-line help. Press CTRL-H ?, or CTRL-H T to
     start a tutorial;

  o  to save a file, press CTRL-X CTRL-S;

  o  to exit, press CTRL-X CTRL-C;

  o  to insert a new file in a buffer, press CTRL-X CTRL-F, then CTRL-X
     B to switch among buffers.

  If you have jed: ask your sysadm to configure jed properly.  Emulation
  is already on when you start it; use the normal keypad keys, and press
  CTRL--H CTRL--H or CTRL-? to get help. Commands are issued in the same
  way as emacs'. In addition, there are some handy key bindings missing
  in the original EDT; key bindings can also be tailored to your own
  taste. Ask your sysadm.

  In alternative, you may use another editor with a completely different
  interface. emacs in native mode is an obvious choice; another popular
  editor is joe, which can emulate other editors like emacs itself
  (being even easier to use) or the DOS editor. Invoke the editor as
  jmacs or jstar and press, respectively, CTRL-X H or CTRL-J to get
  online help. emacs and jed are much more powerful than good ol' EDT.



  4.  TeXing


  TeX and LaTeX are identical to their VMS counterparts---only quicker
  :-), but the tools to handle the .dvi and .ps files are superior:


  o  to run a TeX file through TeX, do as usual: tex file.tex;

  o  to turn a .dvi file into a .ps file, type dvips -o filename.ps
     filename.dvi;

  o  to visualize a .dvi file, type within an X session: xdvi
     filename.dvi &. Click on the page to magnify. This program is
     smart: if you edit and run TeX producing newer versions of the .dvi
     file, xdvi will update it automatically;

  o  to visualize a .ps file, type within an X session: ghostview
     filename.ps &. Click on the page to magnify. The whole document or
     selected pages can be printed. A newer and better program is gv.

  o  to print the .ps: usually the command lpr mypaper.ps will do, but
     if the PostScript printer is called, say, `ps' (ask your sysadm)
     you'll do: lpr -Pps mypaper.ps. For more information about print
     queues, go to Section ``Print Queues''.


  5.  Programming


  Programming under Linux is much better: there are lots of tools that
  make programming easier and quicker. For instance, the drudgery of
  editing--saving--exiting--compiling--re-editing can be cut short by
  using editors like emacs or jed, as seen above.


  5.1.  Fortran


  Not substantial differences here, but note that at the time of writing
  the available (free) compilers are not 100% compatible with VMS';
  expect some minor quirks. (It's actually the VMS compiler which has
  non-standard extensions.) See /usr/doc/g77/DOC or /usr/doc/f2c/f2c.ps
  for details.

  Your sysadm has installed a native compiler called g77 (good but, as
  of version 0.5.21, still not perfectly compatible with DEC Fortran) or
  possibly the Fortran to C translator, f2c, and one of the front-ends
  that make it mimic a native compiler. In my experience, the package
  yaf77 is the one that provides best results.

  To compile a Fortran program with g77, edit the source, save it with
  extension .f, then do:



       $ g77 myprog.f



  which creates by default an executable called a.out (you don't have to
  link anything). To give the executable a different name and do some
  optimisation:



       $ g77 -O2 -o myprog myprog.f



  Beware of optimisations! Ask your sysadm to read the documentation
  that comes with the compiler and tell you if there are any problems.

  To compile a subroutine:



       $ g77 -c mysub.f



  This creates a file mysub.o. To link this subroutine to a program,
  you'll do



       $ g77 -o myprog myprog.f mysub.o



  If you have many external subroutines and you want to make a library,
  do the following:



       $ cd subroutines/
       $ cat *f >mylib.f ; g77 -c mylib.f



  This will create mylib.o that you can link to your programs.

  Finally, to link an external library called, say, libdummy.so:



       $ g77 -o myprog myprog.f -ldummy



  If you have f2c, you only have to use f77 or fort77 instead of g77.

  Another useful programming tool is make, described below.



  5.2.  Using make


  The utility make is a tool to handle the compilation of programs that
  are split into several source files. The VMS counterparts are MMS and
  MMK, which have a different syntax.

  Let's suppose you have source files containing your routines,
  file_1.f, file_2.f, file_3.f, and a source file of the main program
  that uses the routines, myprog.f. If you compile your program
  manually, whenever you modify one of the source files you have to
  figure out which file depends on which, which file to recompile first,
  and so on.

  Instead of getting mad, you can write a `makefile'. This is a text
  file containing the dependencies between your sources: when one is
  modified, only the ones that depend on the modified file will be
  recompiled.

  In our example, you'd write a makefile like this:



  ______________________________________________________________________

  # This is makefile
  # Press the <TAB> key where you see <TAB>!
  # It's important: don't use spaces instead.

  myprog: myprog.o file_1.o file_2.o file_3.o
  <TAB>g77 -o myprog myprog.o file_1.o file_2.o file_3.o
  # myprog depends on four object files

  myprog.o: myprog.f
  <TAB>g77 -c myprog.f
  # myprog.o depends on its source file

  file_1.o: file_1.f
  <TAB>g77 -c file_1.f
  # file_1.o depends on its source file

  file_2.o: file_2.f file_1.o
  <TAB>g77 -c file_2.f file_1.o
  # file_2.o depends on its source file and an object file

  file_3.o: file_3.f file_2.o
  <TAB>g77 -c file_3.f file_2.o
  # file_3.o depends on its source file and an object file

  # end of makefile.
  ______________________________________________________________________



  Save this file as Makefile and type make to compile your program;
  alternatively, save it as myprog.mak and type make -f myprog.mak.  And
  of course, RMP.



  5.3.  Shell Scripts


  Shell scripts are the equivalent of VMS' command files, and allow for
  very powerful constructs.

  To write a script, all you have to do is write a standard ASCII file
  containing the commands, save it, then make it executable with the
  command chmod +x <scriptfile>. To execute it, type its name.

  Writing scripts under bash is such a vast subject it would require a
  book by itself, and I will not delve into the topic any further. I'll
  just give you a more-or-less comprehensive and (hopefully) useful
  example you can extract some basic rules from.

  EXAMPLE: sample.sh



  ______________________________________________________________________
  #!/bin/sh
  # sample.sh
  # I am a comment
  # don't change the first line, it must be there
  echo "This system is: `uname -a`" # use the output of the command
  echo "My name is $0" # built-in variables
  echo "You gave me the following $# parameters: "$*
  echo "First parameter is: "$1
  echo -n "What's your name? " ; read your_name
  echo notice the difference: "hi $your_name" # quoting with "
  echo notice the difference: 'hi $your_name' # quoting with '
  DIRS=0 ; FILES=0
  for file in `ls .` ; do
    if [ -d ${file} ] ; then # if file is a directory
      DIRS=`expr $DIRS + 1`  # this means DIRS = DIRS + 1
    elif [ -f ${file} ] ; then
      FILES=`expr $FILES + 1`
    fi
    case ${file} in
      *.gif|*jpg) echo "${file}: graphic file" ;;
      *.txt|*.tex) echo "${file}: text file" ;;
      *.c|*.f|*.for) echo "${file}: source file" ;;
      *) echo "${file}: generic file" ;;
    esac
  done
  echo "there are ${DIRS} directories and ${FILES} files"
  ls | grep "ZxY--!!!WKW"
  if [ $? != 0 ] ; then # exit code of last command
    echo "ZxY--!!!WKW not found"
  fi
  echo "enough... type 'man bash' if you want more info."
  ______________________________________________________________________



  5.4.  C


  Linux is an excellent environment to program in C. Taken for granted
  that you know C, here are a couple of guidelines. To compile your
  standard hello.c you'll use the gcc compiler, which comes as part of
  Linux and has the same syntax as g77:



       $ gcc -O2 -o hello hello.c



  To link a library to a program, add the switch -l<libname>.  For
  example, to link the math library and optimize do



       $ gcc -O2 -o mathprog mathprog.c -lm



  (The -l<libname> switch forces gcc to link the library
  /usr/lib/lib<libname>.a; so -lm links /usr/lib/libm.a).


  When your program is made of several source files, you'll need to use
  the utility make described above. Just use gcc and C source files in
  the makefile.

  You can invoke some help about the C functions, that are covered by
  man pages, section 3; for example,



       $ man 3 printf



  There are lots of libraries available out there; among the first
  you'll want to use are ncurses, to handle text mode effects, and
  svgalib, to do graphics.



  6.  Graphics


  Among the scores of graphic packages available, gnuplot stands out for
  its power and ease of use. Go to X and type gnuplot, and have two
  sample data files ready: 2D-data.dat (two data per line), and 3D-
  data.dat (three data per line).

  Examples of 2-D graphs:



       gnuplot> set title "my first graph"
       gnuplot> plot '2D-data.dat'
       gnuplot> plot '2D-data.dat' with linespoints
       gnuplot> plot '2D-data.dat', sin(x)
       gnuplot> plot [-5:10] '2D-data.dat'



  Example of 3-D graphs (each `row' of X values is followed by a blank
  line):



       gnuplot> set parametric ; set hidden3d ; set contour
       gnuplot> splot '3D-data.dat' using 1:2:3 with linespoints



  A single-column datafile (e.g., a time series) can also be plotted as
  a 2-D graph:



       gnuplot> plot [-5:15] '2D-data-1col.dat' with linespoints



  or as a 3-D graph (blank lines in the datafile, as above):



  gnuplot> set noparametric ; set hidden3d
  gnuplot> splot '3D-data-1col.dat' using 1 with linespoints



  To print a graph: if the command to print on your Postscript printer
  is lpr -Pps file.ps, issue:



       gnuplot> set term post
       gnuplot> set out '| lpr -Pps'
       gnuplot> replot



  then type set term x11 to restore. Don't get confused---the last print
  will come out only when you quit gnuplot.

  For more info, type help or see the examples in directory
  /usr/lib/gnuplot/demos/, if you have it.



  7.  Mail and Internet Tools


  Since Internet was born on UNIX machines, you find plenty of nice and
  easy-to-use applications under Linux. Here are just some:


  o  Mail: use elm or pine to handle your email; both programs have on-
     line help. For short messages, you could use mail, as in mail -s
     "hello mate" user@somewhere < msg.txt. You may like programs like
     xmail or some such.

  o  Newsgroups: use tin or slrn, both very intuitive and self-
     explanatory.

  o  ftp: apart from the usual character-based ftp, ask your sysadm to
     install the full-screen ncftp or a graphical ftp client like xftp.

  o  WWW: the ubiquitous netscape, or xmosaic, chimera, and arena are
     graphical web browsers; a character-based one is lynx, quick and
     effective.


  8.  Advanced Topics


  Here the game gets tough. Learn these features, then you'll be ready
  to say that you `know something about Linux' ;-)



  8.1.  Permissions and Ownership


  Files and directories have permissions (`protections') and ownership,
  just like under VMS. If you can't run a program, or can't modify a
  file, or can't access a directory, it's because you don't have the
  permission to do so, and/or because the file doesn't belong to you.
  Let's have a look at the following example:

       $ ls -l /bin/ls
       -rwxr-xr-x   1 root     bin         27281 Aug 15  1995 /bin/ls*



  The first field shows the permissions of the file ls (owner root,
  group bin). There are three types of ownership: owner, group, and
  others (similar to VMS owner, group, world), and three types of
  permissions: read, write (and delete), and execute.

  From left to right, - is the file type (- = ordinary file, d =
  directory, l = link, etc); rwx are the permissions for the file owner
  (read, write, execute); r-x are the permissions for the group of the
  file owner (read, execute); r-x are the permissions for all other
  users (read, execute).

  To change a file's permissions:



       $ chmod <whoXperm> <file>



  where who is u (user, that is owner), g (group), o (other), X is
  either + or -, perm is r (read), w (write), or x (execute). Examples:



       $ chmod u+x file



  this sets the execute permission for the file owner. Shortcut: chmod
  +x file.



       $ chmod go-wx file



  this removes write and execute permission for everyone except the
  owner.



       $ chmod ugo+rwx file



  this gives everyone read, write, and execute permission.

  A shorter way to refer to permissions is with numbers: rwxr-xr-x can
  be expressed as 755 (every letter corresponds to a bit: --- is 0, --x
  is 1, -w- is 2...).

  For a directory, rx means that you can cd to that directory, and w
  means that you can delete a file in the directory (according to the
  file's permissions, of course), or the directory itself. All this is
  only part of the matter---RMP.
  To change a file's owner:



       $ chown username file



  To sum up, a table:



       VMS                             Linux                   Notes
       ------------------------------------------------------------------------------

       SET PROT=(O:RW) file.txt        $ chmod u+rw file.txt
                                       $ chmod 600 file.txt
       SET PROT=(O:RWED,W) file        $ chmod u+rwx file
                                       $ chmod 700 file
       SET PROT=(O:RWED,W:RE) file     $ chmod 755 file
       SET PROT=(O:RW,G:RW,W) file     $ chmod 660 file
       SET FILE/OWNER_UIC=JOE file     $ chown joe file
       SET DIR/OWNER_UIC=JOE [.dir]    $ chown joe dir/



  8.2.  Multitasking: Processes and Jobs


  More about running programs. There are no `batch queues' under Linux
  as you're used to; multitasking is handled very differently. Again,
  this is what the typical command line looks like:



       $ command -s1 -s2 ... -sn par1 par2 ... parn < input > output &



  where -s1, ..., -sn are the program switches, par1, ..., parn are the
  program parameters.

  Now let's see how multitasking works. Programs, running in foreground
  or background, are called `processes'.


  o  To launch a process in background:


       $ progname [-switches] [parameters] [< input] [> output] &
       [1] 234



  the shell tells you what the `job number' (the first digit; see below)
  and PID (Process IDentifier) of the process are. Each process is iden-
  tified by its PID.

  o  To see how many processes there are:

  $ ps -ax



  This will output a list of currently running processes.

  o  To kill a process:


       $ kill <PID>



  You may need to kill a process when you don't know how to quit it the
  right way... ;-). Sometimes, a process will only be killed by one of
  the following:


       $ kill -15 <PID>
       $ kill -9 <PID>



  In addition to this, the shell allows you to stop or temporarily
  suspend a process, send a process to background, and bring a process
  from background to foreground. In this context, processes are called
  `jobs'.


  o  To see how many jobs there are:


       $ jobs



  jobs are identified by the numbers the shell gives them, not by their
  PID.

  o  To stop a process running in foreground:


       $ CTRL-C



  (it doesn't always work)

  o  To suspend a process running in foreground:


       $ CTRL-Z



  (ditto)

  o  To send a suspended process into background (it becomes a job):

  $ bg <job>



  o  To bring a job to foreground:


       $ fg <job>



  o  To kill a job:


       $ kill <%job>



  8.3.  Files, Revisited


  More information about files.


  o  stdin, stdout, stderr: under UNIX, every system component is
     treated as if it were a file. Commands and programs get their input
     from a `file' called stdin (standard input; usually, the keyboard),
     put their output on a `file' called stdout (usually, the screen),
     and error messages go to a `file' called stderr (usually, the
     screen).

     Using < and > you redirect input and output to a different file.
     Moreover, >> appends the output to a file instead of overwriting
     it; 2> redirects error messages (stderr); 2>&1 redirects stderr to
     stdout, while 1>&2 redirects stdout to stderr.  There's a `black
     hole' called /dev/null: everything redirected to it disappears;

  o  wildcards: '*' is almost the same. Usage: * matches all files
     except the hidden ones; .* matches all hidden files; *.* matches
     only those that have a '.' in the middle, followed by other
     characters; p*r matches both `peter' and `piper'; *c* matches both
     `picked' and `peck'.  []. Usage: [abc]* matches files starting with
     a, b, c; *[I-N,1,2,3] matches files ending with I, J, K, L, M, N,
     1, 2, 3;

  o  mv (RENAME) doesn't work for multiple files; that is, mv *.xxx
     *.yyy won't work;

  o  use cp -i and mv -i to be warned when a file is going to be
     overwritten.



  8.4.  Print Queues


  Your prints are queued, like under VMS. When you issue a print
  command, you may specify a printer name. Example:

       $ lpr file.txt          # this goes to the standard printer
       $ lpr -Plaser file.ps   # this goes to the printer named 'laser'



  To handle the print queues, you use the following commands:



       VMS                                     Linux
       ------------------------------------------------------------------------------

       $ PRINT file.ps                         $ lpr file.ps
       $ PRINT/QUEUE=laser file.ps             $ lpr -Plaser file.ps
       $ SHOW QUEUE                            $ lpq
       $ SHOW QUEUE/QUEUE=laser                $ lpq -Plaser
       $ STOP/QUEUE                            $ lprm <item>



  9.  Configuring


  Your sysadm has already provided you with a number of configuration
  files like .xinitrc, .bash_profile, .inputrc, and many others. The
  ones you may want to edit are:


  o   .bash_profile or .profile: read by the shell at login time. It's
     like LOGIN.COM;

  o   .bash_logout: read by the shell at logout. It's like LOGOUT.COM;

  o   .bashrc: read by non--login shells.

  o   .inputrc: this file customises the key bindings and the behaviour
     of the shell.

  To give you an example, I'll include my .bash_profile (abridged):



  ______________________________________________________________________
  # $HOME/.bash_profile

  # don't redefine the path if not necessary
  echo $PATH | grep $LOGNAME > /dev/null
  if [ $? != 0 ]
  then
    export PATH="$PATH:/home/$LOGNAME/bin"  # add my dir to the PATH
  fi

  export PS1='LOGNAME:\w\$ '
  export PS2='Continued...>'

  # aliases

  alias bin="cd ~/bin" ; alias cp="cp -i" ; alias d="dir"
  alias del="delete" ; alias dir="/bin/ls $LS_OPTIONS --format=vertical"
  alias ed="jed" ; alias mv='mv -i'
  alias u="cd .." ; alias undel="undelete"

  # A few useful functions

  inst() # Install a .tar.gz archive in current directory.
  {
    gzip -dc $1 | tar xvf -
  }
  cz() # List the contents of a .zip archive.
  {
    unzip -l $*
  }
  ctgz() # List the contents of a .tar.gz archive.
  {
    for file in $* ; do
      gzip -dc ${file} | tar tf -
    done
  }
  tgz() # Create a .tgz archive a la zip.
  {
    name=$1 ; tar -cvf $1 ; shift
    tar -rf ${name} $* ; gzip -S .tgz ${name}
  }
  ______________________________________________________________________



  And this is my .inputrc:



  ______________________________________________________________________
  # $HOME/.inputrc
  # Last modified: 16 January 1997.
  #
  # This file is read by bash and defines key bindings to be used by the shell;
  # what follows fixes the keys END, HOME, and DELETE, plus accented letters.
  # For more information, man readline.

  "\e[1~": beginning-of-line
  "\e[3~": delete-char
  "\e[4~": end-of-line

  set bell-style visible
  set meta-flag On
  set convert-meta Off
  set output-meta On
  set horizontal-scroll-mode On
  set show-all-if-ambiguous On

  # (F1 .. F5) are "\e[[A" ... "\e[[E"

  "\e[[A": "info "
  ______________________________________________________________________



  10.  Useful Programs



  10.1.  Browsing Files: less


  You'll use this file browser every day, so I'll give you a couple of
  tips to use it at best. First of all, ask your sysadm to configure
  less so as it can display not only plain text files, but also
  compressed files, archives, and so on.

  Like recent versions of TYPE, less lets you browse files in both
  directions. It also accepts several commands that are issued pressing
  a key. The most useful are:


  o  first of all, press q to leave the browser;

  o  h gives you extensive help;

  o  g to go to beginning of file, G to the end, number+g to go to line
     `number' (e.g. 125g), number+% to move to that percentage of the
     file;

  o  /pattern searches forwards for `pattern'; n searches forwards for
     the next match; ?pattern and N search backwards;

  o  m+letter marks current position (e.g. ma); '+letter go to the
     marked position.

  o  :e examines a new file;

  o  !command executes the shell command.



  10.2.  Numbered Backups Under Linux


  Alas, Linux doesn't still support file version numbers, but you
  overcome this limitation in two ways. The first is to use RCS, the
  Revision Control System, which allows you to keep previous versions of
  a file. RCS is covered in ``The RCS MINI-HOWTO'' (
  <http://sunsite.unc.edu/mdw/HOWTO/mini/RCS.html>).

  The second way is to use an editor that knows how to deal with
  numbered backups; emacs and jed are OK. In emacs, add these lines in
  your .emacs:



       (setq version-control t)
       (setq kept-new-versions 15) ;;; or any other value
       (setq kept-old-versions 15)
       (setq backup-by-copying-when-linked t)
       (setq backup-by-copying-when-mismatch t)



  In jed, make sure you have version 0.98.7 or newer; the patch for
  numbered backups is available on
  <http://ibogeo.df.unibo.it/guido/slang/backups.sl> .



  10.3.  Archiving: tar & gzip


  Under UNIX there are some widely used applications to archive and
  compress files. tar is used to make archives, that is collections of
  files. To make a new archive:



       $ tar -cvf <archive_name.tar> <file> [file...]



  To extract files from an archive:



       $ tar -xpvf <archive_name.tar> [file...]



  To list the contents of an archive:



       $ tar -tf <archive_name.tar> | less



  Files can be compressed to save disk space using compress, which is
  obsolete and shouldn't be used any more, or gzip:


       $ compress <file>
       $ gzip <file>



  that creates a compressed file with extension .Z (compress) or .gz
  (gzip). These programs don't make archives, but compress files
  individually. To decompress, use:



       $ compress -d <file.Z>
       $ gzip -d <file.gz>



  RMP.

  The unarj, zip and unzip utilities are also available. Files with
  extension .tar.gz or .tgz (archived with tar, then compressed with
  gzip) are very common in the UNIX world. Here's how to list the
  contents of a .tar.gz archive:



       $ tar -ztf <file.tar.gz> | less



  To extract the files from a .tar.gz archive:



       $ tar -zxf <file.tar.gz>



  11.  Real Life Examples


  UNIX' core idea is that there are many simple commands that can linked
  together via piping and redirection to accomplish even really complex
  tasks.  Have a look at the following examples. I'll only explain the
  most complex ones; for the others, please study the above sections and
  the man pages.

  Problem: ls is too quick and the file names fly away.

  Solution:



       $ ls | less



  Problem: I have a file containing a list of words. I want to sort it
  in reverse order and print it.

  Solution:



       $ cat myfile.txt | sort -r | lpr



  Problem: my data file has some repeated lines! How do I get rid of
  them?

  Solution:



       $ sort datafile.dat | uniq > newfile.dat



  Problem: I have a file called 'mypaper.txt' or 'mypaper.tex' or some
  such somewhere, but I don't remember where I put it. How do I find it?

  Solution:



       $ find ~ -name "mypaper*"



  Explanation: find is a very useful command that lists all the files in
  a directory tree (starting from ~ in this case). Its output can be
  filtered to meet several criteria, such as -name.

  Problem: I have a text file containing the word 'entropy' in this
  directory, is there anything like SEARCH?

  Solution: yes, try



       $ grep -l 'entropy' *



  Problem: somewhere I have text files containing the word 'entropy',
  I'd like to know which and where they are. Under VMS I'd use search
  entropy [...]*.*;*, but grep can't recurse subdirectories. Now what?

  Solution:



       $ find . -exec grep -l "entropy" {} \; 2> /dev/null



  Explanation: find . outputs all the file names starting from the
  current directory, -exec grep -l "entropy" is an action to be
  performed on each file (represented by {}), \ terminates the command.
  If you think this syntax is awful, you're right.
  In alternative, write the following script:


  ______________________________________________________________________
  #!/bin/sh
  # rgrep: recursive grep
  if [ $# != 3 ]
  then
    echo "Usage: rgrep --switches 'pattern' 'directory'"
    exit 1
  fi
  find $3 -name "*" -exec grep $1 $2 {} \; 2> /dev/null
  ______________________________________________________________________



  Explanation: grep works like search, and combining it with find we get
  the best of both worlds.

  Problem: I have a data file that has two header lines, then every line
  has 'n' data, not necessarily equally spaced. I want the 2nd and 5th
  data value of each line. Shall I write a Fortran program...?

  Solution: nope. This is quicker:



       $ awk 'NL > 2 {print $2, "\t", $5}' datafile.dat > newfile.dat



  Explanation: the command awk is actually a programming language: for
  each line starting from the third in datafile.dat, print out the
  second and fifth field, separated by a tab. Learn some awk---it saves
  a lot of time.

  Problem: I've downloaded an FTP site's ls-lR.gz to check its contents.
  For each subdirectory, it contains a line that reads "total xxxx",
  where xxxx is size in kbytes of the dir contents. I'd like to get the
  grand total of all these xxxx values.

  Solution:



       $ zcat ls-lR.gz | awk ' $1 == "total" { i += $2 } END {print i}'



  Explanation: zcat outputs the contents of the .gz file and pipes to
  awk, whose man page you're kindly requested to read ;-)

  Problem: I've written a Fortran program, myprog, to calculate a
  parameter from a data file. I'd like to run it on hundreds of data
  files and have a list of the results, but it's a nuisance to ask each
  time for the file name. Under VMS I'd write a lengthy command file,
  and under Linux?

  Solution: a very short script. Make your program look for the data
  file 'mydata.dat' and print the result on the screen (stdout), then
  write the following script:



  ______________________________________________________________________
  #!/bin/sh
  # myprog.sh: run the same command on many different files
  # usage: myprog.sh *.dat
  for file in $*  # for all parameters (e.g. *.dat)
  do
    # append the file name to result.dat
    echo -n "${file}:    " >> results.dat
    # copy current argument to mydata.dat, run myprog
    # and append the output to results.dat
    cp ${file} mydata.dat ; myprog >> results.dat
  done
  ______________________________________________________________________



  Problem: I want to replace `geology' with `geophysics' in all my text
  files. Shall I edit them all manually?

  Solution: nope. Write this shell script:


  ______________________________________________________________________
  #!/bin/sh
  # replace $1 with $2 in $*
  # usage: replace "old-pattern" "new-pattern" file [file...]
  OLD=$1          # first parameter of the script
  NEW=$2          # second parameter
  shift ; shift   # discard the first 2 parameters: the next are the file names
  for file in $*  # for all files given as parameters
  do
  # replace every occurrence of OLD with NEW, save on a temporary file
    sed "s/$OLD/$NEW/g" ${file} > ${file}.new
  # rename the temporary file as the original file
    /bin/mv ${file}.new ${file}
  done
  ______________________________________________________________________



  Problem: I have some data files, I don't know their length and have to
  remove their last but one and last but two lines. Er... manually?

  Solution: no, of course. Write this script:


  ______________________________________________________________________
  #!/bin/sh
  # prune.sh: removes n-1th and n-2th lines from files
  # usage: prune.sh file [file...]
  for file in $*   # for every parameter
  do
    LINES=`wc -l $file | awk '{print $1}'`  # number of lines in file
    LINES=`expr $LINES - 3`                 # LINES = LINES - 3
    head -n $LINES $file > $file.new        # output first LINES lines
    tail -n 1 $file >> $file.new            # append last line
  done
  ______________________________________________________________________



  I hope these examples whetted your appetite...



  12.  Tips You Can't Do Without



  o  Command completion: pressing <TAB> when issuing a command will
     complete the command line for you. Example: you have to type less
     this_is_a_long_name; typing in less thi<TAB> will suffice. (If you
     have other files that start with the same characters, supply enough
     characters to resolve any ambiguity.)

  o  Back-scrolling: pressing SHIFT--PAG UP (the grey key) allows you to
     backscroll a few pages, depending on your PC's video memory.

  o  Resetting the screen: if you happen to more or cat a binary file,
     your screen may end up full of garbage. To fix things, blind type
     reset or this sequence of characters: echo CTRL-V ESC c RETURN.

  o  Pasting text: in console, see below; in X, click and drag to select
     the text in an xterm window, then click the middle button (or the
     two buttons together if you have a two-button mouse) to paste.

  o  Using the mouse: ask your sysadm to install gpm, a mouse driver for
     the console. Click and drag to select text, then right click to
     paste the selected text. It works across different VCs.



  13.  Reading VMS tapes from Linux


  (This section was written by Mike Miller)


  13.1.  Introduction


  From time to time you may want to read tapes made on a VMS machine (or
  tapes that are made to be readable by VMS and *nix systems). In
  general, this is quite easy for DECFILES11A tapes.

  Although you may be reading this as part of a Linux mini-HOWTO, I
  believe that the information here is applicable to any *nix system -
  I've done this on Linux, HP, Sun and DEC *nix systems. The main
  platform dependences that I know are device names, which can differ on
  different systems, and the options to mt for specifying the device
  name (for example, mt -f on Linux and mt -t on HPUX 9).

  Caveat - I've only tried this with Exabyte 8mm SCSI tape drives. If
  you've read other formats (still got those 9-tracks lying around?) let
  me know and I'll add a note here.



  13.2.  The Basics


  When reading a tape that has been made with the VMS ``copy'' command
  (or has at least been made to look like it was made with copy) all you
  need to know is there will be three files on the tape for each actual
  data file - a header, the data, and a trailer.  The header and trailer
  are interesting in that they contain info on the file as it existed
  under VMS.  The data is, well, the data.  Each of these files can be
  extracted from the tape with the dd command.  The tape can be
  positioned by skipping around with the mt command.


  Example: I've got VMS tape with a series of files on it.  The first
  two were originally named ce66-2.evt and ce66-3.evt on a VMS system.
  The tape label is c66a2.

  If I execute these commands:



       > dd if=$TAPE bs=16k of=header1
       > dd if=$TAPE bs=16k of=data1
       > dd if=$TAPE bs=16k of=trailer1
       > dd if=$TAPE bs=16k of=header2
       > dd if=$TAPE bs=16k of=data2
       > dd if=$TAPE bs=16k of=trailer2



  I'm left with six files: header1, data1, trailer1, header2, data2 and
  trailer2.  The syntax here is if="input file", bs="block size" and
  of="output file".  TAPE is expected to be a variable containing the
  device name of your tape drive - for example, /dev/nts0 if you are
  using the first SCSI tape on Linux.

  If you wanted to read the second file, but not the first, you didn't
  care about the header, and you wanted to use the original file name,
  do this:



       > mt -f $TAPE fsf 4
       > dd if=$TAPE bs=16k of=ce66-2.evt
       > mt -f $TAPE fsf 1



  Note the 4 - skip three files for the first file on the tape and one
  for the next header.  The second mt skips the second file's trailer
  and positions the tape at the beginning of the next file - the third
  VMS header.  You can also use mt to skip backwards (bsf), rewind
  (rewind) and rewind and unload the tape (offline, rewoffl).



  13.3.  Some details



  The header and trailer files contain uppercase ASCII data used by VMS
  to store file information such as block size.  They also contain the
  file name, which can be handy if you want to build scripts that
  automate read files or search for a particular file. The first header
  on a tape volume is slightly different than subsequent headers.

  For a file that is the first file on the tape, as in header1 of the
  above example, the first four characters will be "VOL1" followed by
  the volume name.  In the example, header1 starts with "VOL1C66A2".
  This is followed by a series of spaces terminated with a numeral.
  After that is the string "HDR1" which indicates that this is a file
  header.  The characters immediately following the HDR1 string are the
  VMS file name.  In in the example, this is "HDR1CE66-2.EVT".  The next
  field is the volume name again.

  For files that are not the first file on the tape, the initial VOL1
  field is not present.  Other than that the header has the same
  structure as for the initial file.  Another useful field is the 7th
  field, which will end with "DECFILES11A".  This must be present on
  tapes that conform to the DEC Files11A standard.



              field     initial header         subsequent headers
              =====     =============          ==================
                1       VOL1 + volume name     HDR1 + file name
                2       3HDR1 + file name      volume name
                3       volume name

                6                              ...DECFILES11A
                7      ...DECFILES11A



  For full details on the header and trailer format, see the DEC
  FILES11A documentation (on the orange/grey wall - ask your local VMS
  folks :-).



  13.4.  Comment on Block Size


  In the example, I used a block size of 16k.  On a *nix system, there
  is no block size associated with a file on disk while, under VMS, each
  file has a specific block size.  That means that block size doesn't
  matter too much on the Linux end... unless it makes it hard to read
  the tape.  If you have difficulty figuring out the block size and
  reading a tape, you can try setting the hardware block size on your
  tape drive using `mt -f $TAPE setblk 0'.  The exact form of the setblk
  option (and its availability) may depend on the version of mt, the
  tape drive hardware interface and on your particular flavor of *nix.

  (Thanks to Wojtek Skulski ( <skulski@nsrlc6.nsrl.rochester.edu>) for
  pointing out setblk.)



  14.  The End



  14.1.  Copyright


  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at  <linux-howto@sunsite.unc.edu> via email.



  14.2.  Disclaimer


  This work was written following the experience we had at the Settore
  di Geofisica of the Universita' di Bologna (Italy), where a VAX 4000
  has been superseded and replaced by Linux-based Pentium PCs. Most of
  my colleagues are VMS users, and some of them have switched to Linux.

  ``From VMS to Linux HOWTO'' was written by Guido Gonzato,  <guido
  ``at'' ibogeo.df.unibo.it>, and Mike Miller, <miller5@uiuc.edu> who
  contributed the section on reading VMS tapes.  Many thanks to my
  colleagues and friends who helped me define the needs and habits of
  the average VMS user, especially to Dr. Warner Marzocchi.

  Please help me improve this HOWTO. I'm not a VMS expert and never will
  be, so your suggestions and bug reports are more than welcome.

  Enjoy,

  Guido =8-)



  VMailMgr HOWTO
  Bruce Guenter <bruceg@em.ca>, Dan Kuykendall <dan@kuyk
  endall.org>
  v1.1, 23 April 2000

  This document explains how to setup VMailMgr support pop3 virtual
  domain   services in conjunction with Qmail.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 What is VMailMgr and why should I use it?
     1.2 New versions
     1.3 Comments
     1.4 History
     1.5 Version History
     1.6 Copyrights and Trademarks
     1.7 Acknowledgements and Thanks

  2. Installation

     2.1 Get the files   Visit the VMailMgr website
     2.2 Install with RPMS
        2.2.1 Compiling SRC.RPM's
        2.2.2 Installing RPM's
     2.3 Install with source

  3. Setup

     3.1 Setting Up a Virtual Domain
     3.2 Using one IP address for mutiple domains
        3.2.1 Logging in as a virtual user?
     3.3 Catch all misdirected mail?
     3.4 Setup VMailMgr IMAP support?


  ______________________________________________________________________

  1.  Introduction

  VMailMgr (short for Virtual MAIL ManaGeR) is a package of programs
  designed to manage multiple domains of mail addresses and mailboxes on
  a single host. It co-operates with qmail for mail delivery and program
  control.

  1.1.  What is VMailMgr and why should I use it?

  VMailMgr is:

  A series of utilities for managing virtual domains which include a
  password checking interface for qmail which replaces the usual
  checkpassword, and an authentication module for Courier IMAP, that
  provide access to the virtual mailboxes by one of three methods:

    IP-based virtual server access (invisible to the POP3 user)

    username-based access (username-virtualuser)

    hostname-based access (virtualuser@virtual.host or
     virtualuser:virtual.host)

  You should use it if:

  You prefer to have each domain controlled by a seperate username,
  allowing the use of system quotas and better security

  1.2.  New versions

  The newest version of this can be found on my homepage
  <http://www.clearrivertech.com/linux/HOWTO> as SGML source, as HTML
  and as TEXT.  Other versions may be found in different formats at the
  LDP homepage  <http://www.linuxdoc.org/>.  A copy can also be found on
  the VMailMgr homepage  <http://em.ca/~bruceg/vmailmgr/> in its HTML
  version as well as in the VMailMgr source package as both SGML source
  and as HTML.

  1.3.  Comments

  Comments on this HOWTO should be directed to the VMailMgr mailing
  list.  To subscribe, send an email to vmailmgr@lists.em.ca
  <mailto:vmailmgr@lists.em.ca>.

  1.4.  History

  This document was started by Bruce Guenter and reworked by Dan
  Kuykendall.

  1.5.  Version History

  Old Version


    Created by Bruce, wasn't in SGML HOWTO format.

  v1.0 (April 20, 2000)


    Built proper SGML version.

    Included the FAQ.

    Other minor additions.

  v1.1 (April 23, 2000)


    Split the FAQ to a seperate file, but included some important info
     from the FAQ.

    Updated the Courier-IMAP support section.

    Switched the license to the GNU FDL.

    Other minor additions.

  1.6.  Copyrights and Trademarks

  Copyright (c)  Dan Kuykendall.  Permission is granted to copy,
  distribute and/or modify this document under the terms of the GNU Free
  Documentation License, Version 1.1 or any later version published by
  the Free Software Foundation

  A copy of the license is available at GNU Free Documentation License
  <http://www.gnu.org/copyleft/fdl.txt>.

  1.7.  Acknowledgements and Thanks

  Thanks to Bruce Guenter for VMailMgr and the core of this HOWTO.
  Thanks to Mike Bell, who always seems to have the answers to my
  questions. Finally, thanks to all those on the vmailmgr@lists.em.ca
  <mailto:vmailmgr@lists.em.ca> mailing list who have helped me, or
  asked the same stuff so many times that I had to write this to stop
  the repeat questions.

  2.  Installation

  2.1.  Visit the VMailMgr websiteurlnam
  <http://em.ca/~bruceg/vmailmgr/> to get the package.  Get the files

  If you get the binary RPMS you will need at least the vmailmgr and
  vmailmgr-daemon packages.

  2.2.  Install with RPMS

  2.2.1.  Compiling SRC.RPM's

  Simply compile the src.rpm file with the `rpm --rebuild` command.
  -Example-

  ______________________________________________________________________
    rpm -ivh vmailmgr-0.96.6-1.src.rpm
  ______________________________________________________________________



  2.2.2.  Installing RPM's

  After compiling the source rpms, the binaries will be located in
  `/usr/src/redhat/RPMS/i386/` or something similar.

  Simply run the following command for each package

    rpm -ivh <location>/<package.i386.rpm>


  -Example-

  ______________________________________________________________________
    rpm -ivh /usr/src/redhat/RPMS/i386/vmailmgr-0.96.6-1.i386.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/VMailMgr-daemon-0.96.6-1.i386.rpm
  ______________________________________________________________________



  2.3.  Install with source

  If you dont ue RPMS you can install from source.

  Run the following command

    (As non-root user)
    tar zxf <package.tar.gz>
    cd <newly created dir>
    ./configure
    make
    (As root)
    make install


  -Example-



  ______________________________________________________________________
    (As non-root user)
    tar zxf vmailmgr-0.96.6.tar.gz
    cd vmailmgr-0.96.6
    ./configure
    make
    (As root)
    make install
  ______________________________________________________________________


  That should do it.

  3.  Setup

  3.1.  Setting Up a Virtual Domain

  The following steps are necessary to set up a virtual domain with
  vmailmgr (assuming vmailmgr has been compiled and installed). As an
  example, we'll set up a virtual user `me@mydomain.org`, with aliases
  of `myself@mydomain.org` and `myname@mydomain.org`.

  1. Set up a DNS entry for the domain. I won't cover this here, as it
     is dependant on far too many other things.  I will mention that to
     make IP based virtual domains work a PTR record which matches an
     entry in virtualdomains is nessesary, for example, if nslookup
     10.56.33.122 returns mail.mydomain.com, `virtualdomains` needs an
     entry like `mail.mydomain.com:myuser`

     For the example, we'll assume that the mail exchanger for
     mydomain.org is already set up to point to your computer.

  2. Set up a base user for the domain. Create a user, with a name of
     your choosing.  Since the maildirs for all the users in the virtual
     domain will be stored under this user's home directory, make sure
     you set the user up in a partition or disk that is appropriate for
     such storage. The tools that you should use to accomplish this step
     vary greatly between different systems. For our example, I'll add a
     user `myuser`.

  3. Configure qmail to recognize the domain. To do this, you need to
     modify two of qmail's configuration files in `/var/qmail/control`
     `rcpthosts` and `virtualdomains`.

    To `rcpthosts` : add the line `mydomain.org`.

    To `virtualdomains` : add the line `mydomain.org:myuser`.

     If you wish to have mail to `anything.mydomain.org` be delivered in
     the same way, add the following

    To `rcpthosts` : add the line `.mydomain.org`.

    To `virtualdomains` : add the line `.mydomain.org:myuser`.

  4. Configure qmail-popup/qmail-pop3d to use `checkvpw` as the password
     checker. This step is dependant on how you have installed qmail.

    Replace `checkpassword` in the command you use to invoke qmail-
     popup/qmail-pop3d (either in `/etc/inet.conf` or in a `tcpserver`
     command) with `checkvpw`.

    And/Or at the prompt type: `echo checkvpw >
     /var/qmail/control/checkpassword`


  5. Add users or aliases to the domain. Either change user to the user
     you just created (for example, type `su - myuser`) or log in (with
     either telnet or at the console) as the new user, and use the
     included programs to add users and aliases.

     For our example, we would

    type: `vadduser me` (which prompts for a password)

    type: `vaddalias me myself`

    and type: `vaddalias me myname`

     After you have completed all these steps, you will need to kill and
     restart `qmail-send` to make it read the new `virtualdomains`
     table.

  If you are using `inetd` to launch `qmail-popup`, `kill -HUP` the
  `inetd` process as well.

  3.2.  Using one IP address for mutiple domains

  3.2.1.  Logging in as a virtual user?

  There are two ways to log in without using multiple IP addresses.


  1. The first way is to log in as `userSEPvirtual.domain.org`, where
     `user` is the mailbox name of the virtual user, SEP is one of `@`
     or `:` (by default, this is configurable in the `/etc/vmailmgr/'
     directory), and `virtual.domain.org' is the virtual domain's name,
     as listed in `/var/qmail/control/virtualdomains'.

  2. The second way is to use the internal form of the mailbox name --
     that is, `baseuser-user', where `user' is the same as above, and
     `baseuser' is the username of the managing user.

     Example: `/var/qmail/control/virtualdomains' contains

       testdomain.org:testuser


  User `myuser' exists, and has set up a virtual mailbox with the name
  `me'. The `separators' variable in `/etc/vmailmgr/' contains `@:'.
  This virtual user could log in as `me@mydomain.com', `me:mydomain.cm',
  or `myuser-me'.


  3.3.  Catch all misdirected mail?

  In the `vmailmgr/' configuration directory, there is an entry called
  `default-username'. If mail to a virtual domain does not match any
  users or aliases in that domain, it is delivered to the name listed in
  this configuration item if it exists (which defaults to `+'). To make
  this deliver to you, simply type:

    vaddalias me +



  3.4.  Setup VMailMgr IMAP support?

  VMailMgr supports Courier-IMAP, but Courier-IMAP does not auto detect
  VMailMgr.  This means that some minor work is required for making the
  two work together.

    You must copy `/usr/local/bin/authvmailmgr` to `/usr/lib/courier-
     imap/libexec/authlib/authvmailmgr`.

    Then modify the `AUTHMODULES` statement in `/usr/lib/courier-
     imap/etc/imapd.config` and add `authvmailmgr` as the first
     authentication module.



  VPN HOWTO
  Matthew D. Wilson, matthew@shinythings.com
  <mailto:matthew@shinythings.com>
  v 1.0, Dec 1999

  This HOWTO describes how to set up a Virtual Private Network with
  Linux.

  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Why I wrote this HOWTO
     1.2 Acknowledgements and Thanks
     1.3 Format of this document
     1.4 Copyright and Disclaimer
     1.5 Document History
     1.6 Related Documents

  2. Theory

     2.1 What is a VPN?
        2.1.1 But really, what IS a VPN?
        2.1.2 So how does it work?
     2.2 SSH and PPP
     2.3 Alternative VPN Systems
        2.3.1 PPTP
        2.3.2 IP Sec
        2.3.3 CIPE

  3. Server

     3.1 Security - keeping people out
        3.1.1 Trim your daemons
        3.1.2 Don't allow passwords
     3.2 User Access - letting people in
        3.2.1 Configuring
     3.3 Restricting Users
        3.3.1 sudo or not sudo
     3.4 Networking
        3.4.1 The Kernel
        3.4.2 Filter Rules
        3.4.3 Routing

  4. Client

     4.1 The Kernel
     4.2 Bring up the link
     4.3 scripting
     4.4 LRP - Linux Router Project

  5. Implementation

     5.1 Planning
     5.2 Gather the tools
        5.2.1 For the Server:
        5.2.2 For the Client:
     5.3 Server: Build the kernel
     5.4 Server: Configure Networking
        5.4.1 Configuring the interfaces
        5.4.2 Setting routes
        5.4.3 Making filter rules
        5.4.4 Routing
     5.5 Server: Configure
        5.5.1 (TT
        5.5.2 (TT
        5.5.3 Avoiding conflicts
     5.6 Server: Configure
     5.7 Server: Set up user accounts
        5.7.1 Add
        5.7.2 create the
        5.7.3 The
        5.7.4 Adding users
     5.8 Server: Administration
     5.9 Client: Build the kernel
     5.10 Client: Configure Networking
        5.10.1 Interface
        5.10.2 Filter rules
        5.10.3 Routing
     5.11 Client: Configure
     5.12 Client: Configure
     5.13 Client: Bring up the connection
     5.14 Client: Set the routes
     5.15 Client: Scripting
        5.15.1 Keeping it running

  6. Addenda

     6.1 Pitfalls
        6.1.1 read: I/O error
        6.1.2 SIOCADDRT: Network is unreachable
        6.1.3 IPv4 Forwarding and 2.2 kernels
        6.1.4 Routing
     6.2 Hardware and Software Requirements
        6.2.1 Minimum Hardware Requirements
        6.2.2 Software Requirements


  ______________________________________________________________________

  1.

  Introduction

  1.1.

  Why I wrote this HOWTO

  I work Real Networks, and we needed VPN service.  This was my first
  real project, and I truly learned more about Linux with this than with
  any other task.  I ended up using my experience with that project to
  write this document, to share with others what I learned, so that they
  can do ultra-nifty things with Linux too!

  1.2.

  Acknowledgements and Thanks

  I want to first and foremost thank my wife Julie, without her, I
  wouldn't be where I am today.  I also want to thank Arpad Magosanyi,
  the author of the first VPN mini-howto and pty-redir, the utility that
  makes all of this possible.  Jerry, Rod, Glen, Mark V., Mark W., and
  David, You guys rock!  Thanks for all your help.

  1.3.

  Format of this document

  This document is broken down into 5 sections.



     Section 1: Introduction
        This section


     Section 2: Theory
        Basic VPN theory.  What is a VPN, and how does it work.  Read
        this if you are entirely new to VPN.



     Section 3: Server
        This section describes how a VPN server is set up.


     Section 4: Client
        This section describes how a VPN client is set up.


     Section 5: Implementation
        A step by step implementation of a sample VPN setup.


     Section 6: Addenda
        Other bits and pieces of info that you might find helpful.

  1.4.

  Copyright and Disclaimer

  Copyright (c) by Matthew Wilson. This document may be distributed only
  subject to the terms and conditions set forth in the LDP License at
  http://www.linuxdoc.org/COPYRIGHT.html
  <http://www.linuxdoc.org/COPYRIGHT.html>, except that this document
  must not be distributed in modified form without the author's consent.

  The author assumes no responsibility for anything done with this
  document, nor does he make any warranty, implied or explicit.  If you
  break it, it's not my fault.  Remember, what you do here could make
  very large holes in the security model of your network.  You've been
  warned.

  1.5.

  Document History

  The original VPN mini-HOWTO was written by Arpad Magosanyi
  <mag@bunuel.tii.matav.hu> in 1997.  He has since allowed me to take up
  the document and extend it into a full HOWTO.  All of this would not
  be possible without his original document.  Thanks again Arpad. :)

  Version 1.0 of this HOWTO was completed on December 10, 1999.

  1.6.

  Related Documents


  o  Networking Overview HOWTO </HOWTO/Networking-Overview-HOWTO.html>

  o  Networking HOWTO </HOWTO/NET3-4-HOWTO.html>

  o  VPN-Masquerade HOWTO </HOWTO/VPN-Masquerade-HOWTO.html>

  2.

  Theory

  2.1.

  What is a VPN?

  VPN stands for Virtual Private Network.  A VPN uses the Internet as
  it's transport mechanism, while maintaining the security of the data
  on the VPN.


  2.1.1.

  But really, what IS a VPN?

  Well, there are several answers to that question.  It really depends
  on your network layout.  The most common configuration is to have a
  single main internal network, with remote nodes using VPN to gain full
  access to the central net.  The remote nodes are commonly remote
  offices or employees working from home.  You can also link two smaller
  (or even larger!) networks to form an even larger single network.

  2.1.2.

  So how does it work?

  Put simply, to make a VPN, you create a secure tunnel between the two
  networks and route IP through it.  If I've lost you already, you
  should read The Linux Networking Overview HOWTO
  <http://www.linuxdoc.org/HOWTO/Networking-Overview-HOWTO.html> to
  learn about networking with Linux.

  Please bear with me, my ASCII art could use some work.


                                  \          \
                   --------       /          /      --------
     Remote ______| Client |______\ Internet \_____| Server |______ Private
     Network      | Router |      /          /     | Router |       Network
                   --------       \          \      --------
                                  /          /


                           Client Router
                 ----------------------------------------------------
                |   /->    10.0.0.0/255.0.0.0   \                    |
    Remote      |  |-->  172.16.0.0/255.240.0.0  |--> Tunnel >---\   |
    Network >---|--|--> 192.168.0.0/255.255.0.0 /                 |--|----> Internet
   192.168.12.0 |  |                                              |  |
                |   \-----> 0.0.0.0/0.0.0.0 --> IP Masquerade >--/   |
                 ----------------------------------------------------


                          Server Router
               ----------------------------------------------------
              |                   /->    10.0.0.0/255.0.0.0    \   |
              |   /--> Tunnel >--|-->  172.16.0.0/255.240.0.0   |--|----> Private
  Internet >--|--|                \--> 192.168.0.0/255.255.0.0 /   |      Network
              |  |                                                 |     172.16.0.0/12
              |   \-----> 0.0.0.0/0.0.0.0 -----> /dev/null         |    192.168.0.0/16
               ----------------------------------------------------



  The above diagram shows how the network might be set up.  If you don't
  know what IP Masquerade is, you probably shouldn't be here.  Go read
  the The Linux Networking Overview HOWTO </HOWTO/Networking-Overview-
  HOWTO.html> and come back once you've figured it out.

  The Client Router is a Linux box acting as the gateway/firewall for
  the remote network.  As you can see, the remote network uses the local
  net 192.168.12.0.  For the sake of a simple diagram, I let out the
  local routing information in the routers.  The basic idea is to route
  traffic for all of the private networks (10.0.0.0, 172.16.0.0, and
  192.168.0.0) through the tunnel.  The setup shown here is one way.
  That is, while the remote network can see the private network, the
  private network cannot necessarily see the remote network.  In order
  for that to happen, you must specify that the routes are
  bidirectional.

  From the diagram you should also note that all of the traffic coming
  out of the client router appears to be from the client router, that
  is, it's all from one IP address.  You could route real numbers from
  inside your network but that brings all sorts of security problems
  with it.

  2.2.

  SSH and PPP

  The system that I describe to implement VPN uses SSH and PPP.
  Basically I use ssh to create a tunnel connection, and then use pppd
  to run TCP/IP traffic though it. That's what makes up the tunnel.

  The real trick to getting ssh and pppd to play well together is the
  utility written by Arpad Magosanyi that allows the redirection of
  standard in and standard out to a pseudo tty.  This allows pppd to
  talk through ssh as if it were a serial line.  On the server side,
  pppd is run as the users shell in the ssh session, completing the
  link.  After that, all you need to do is the routing.

  2.3.

  Alternative VPN Systems

  There are of course other ways of setting up a VPN, here are a couple
  of other systems.

  2.3.1.

  PPTP

  PPTP is a Microsoft protocol for VPN.  It is supported under Linux,
  but is known to have serious security issues.  I do not describe how
  to use it here since it is covered by the Linux VPN Masquerade HOWTO
  <http://www.linuxdoc.org/HOWTO/VPN-Masquerade-HOWTO.html>.

  2.3.2.

  IP Sec

  IP Sec is a different set of protocols from SSH.  I don't actually
  know all that much about it, so if someone wants to help me out with a
  description, I'd be most appreciative.  Again, I do not describe how
  to use it here since it is covered by the Linux VPN Masquerade HOWTO
  <http://www.linuxdoc.org/HOWTO/VPN-Masquerade-HOWTO.html>.

  2.3.3.

  CIPE

  CIPE is a kernel level network encryption system that may be better
  suited to enterprise setups.  You can find out more about it at the
  CIPE      homepage
  <http://sites.inka.de/sites/bigred/devel/cipe.html>.  I plan on
  looking into it more, so maybe I'll have info about it here someday.

  3.

  Server

  This section tells you how to set up the server side of things, I
  figured that this should go first since without a server, your client
  is kind of useless.

  3.1.

  Security - keeping people out

  Security is very important for a VPN.  That's why you're building one
  in the first place, isn't it?  You need to keep a few things in mind
  while setting up your server.

  3.1.1.

  Trim your daemons

  Since this server is going to be on both sides of your firewall, and
  set up to forward traffic into your network, it's a good idea to
  secure the box as well as you possibly can.  You can read up more on
  Linux security in the Linux Security      HOWTO </HOWTO/Security-
  HOWTO.html> For my purposes, I've killed everything but sshd and a
  Roxen Web server. I use the web server to download a couple of files
  (my scripts, etc) for setting up new machines to access the VPN.  I
  don't use an FTP server since it's harder to configure one to be
  secure than it is to just make a few files available with a web
  server.  Plus, I only need to be able to download files.  If you
  really want to run different servers on your gateway, you might want
  to think about restricting access to them to only those machines on
  your private network.

  3.1.2.

  Don't allow passwords

  Yes, it sounds kind of silly, but it got your attention, didn't it?
  No, you don't use passwords, you disable them completely.  All
  authentication on this machine should be done via ssh's public key
  authentication system.  This way, only those with keys can get in, and
  it's pretty much impossible to remember a binary key that's 530
  characters long.

  So how do you do that?  It requires editing the /etc/passwd file.  The
  second field contains either the password hash, or alternatively 'x'
  telling the authentication system to look in the /etc/shadow file.
  What you do is change that field to read '*' instead.  This tells the
  authentication system that there is no password, and that none should
  be allowed.


  Here's how a typical /etc/passwd file looks:

  ...
  nobody:x:65534:100:nobody:/dev/null:
  mwilson:x:1000:100:Matthew Wilson,,,:/home/mwilson:/bin/bash
  joe:*:504:101:Joe Mode (home),,,:/home/vpn-users:/usr/sbin/pppd
  bill:*:504:101:Bill Smith (home),,,:/home/vpn-users:/usr/sbin/pppd
  frank:*:504:101:Frank Jones (home),,,:/home/vpn-users:/usr/sbin/pppd
  ...


  Note that I've done more than just editing the second field.  I'll say
  more about the other fields later on.

  3.2.

  User Access - letting people in


  User access is done via ssh's authentication scheme.  As I've stated
  above, this is how users get access to the system, while maintaining a
  high level of security.  If you're not familiar with ssh, check out
  http://www.ssh.org/ <http://www.ssh.org/> Note that I am using ssh
  version 1, not version 2.  There is a big difference, notably that
  version 1 is free, and 2 isn't.

  3.2.1.

  Configuring sshd

  You'll need to configure sshd.  The following options should be
  present.  The idea is to disable password authentication and rhosts
  authentication. The following options should be present in your
  /etc/sshd_config file.


  PermitRootLogin yes
  IgnoreRhosts yes
  StrictModes yes
  QuietMode no
  CheckMail no
  IdleTimeout 3d
  X11Forwarding no
  PrintMotd no
  KeepAlive yes
  RhostsAuthentication no
  RhostsRSAAuthentication no
  RSAAuthentication yes
  PasswordAuthentication no
  PermitEmptyPasswords no
  UseLogin no



  3.3.

  Restricting Users

  Now that you're keeping the bad people out, and only letting the good
  people in, you may need to make sure that the good people behave
  themselves.  This is most easily done by not letting them do anything
  except run pppd.  This may or may not be necessary.  I restrict users
  because the system that I maintain is dedicated to VPN, users have no
  business doing anything else on it.

  3.3.1.

  sudo or not sudo

  There is this neat little program called sudo that allows the admin on
  a Unix system to grant certain users the ability to run certain
  programs as root.  This is necessary in this case since pppd must be
  run as root.  You'll need to use this method if you want to allow
  users shell access.  Read up on how to setup and use sudo in the sudo
  man page.  Using sudo is best on multi-use systems that typically host
  a small number of trusted users.

  If you decide to not allow users to have shell access, then the best
  way to keep them from gaining it is to make their shell be pppd.  This
  is done in the /etc/passwd file. You can see ``above'' that that is
  what I did for the last three users.  The last field of the
  /etc/passwd file is the user's shell.  You needn't do anything special
  to pppd in order to make it work.  It gets executed as root when the
  user connects.  This is certainly the simplest setup to be had, as
  well as the most secure. It's the ideal for large scale and corporate
  systems.  I describe exactly what all needs to be done later in this
  document.  You can ``jump ahead'' if you like.

  3.4.

  Networking

  Now that your users have access to the system, we need to make sure
  that they have access to the network.  We do that by using the Linux
  kernel's firewalling rules and routing tables.  Using the route and
  ipfwadm commands, we can set up the kernel to handle network traffic
  in the appropriate ways.  For more info on ipfwadm, ipchains and route
  see the Linux Networking HOWTO <http://www.linuxdoc.org/HOWTO/Linux-
  Networking-HOWTO.html>.

  3.4.1.

  The Kernel

  In order for any of this to work, you must have your kernel configured
  correctly.  If you don't know how to build your own kernel, then you
  should read the Kernel      HOWTO
  <http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html>. You'll need to make
  sure that the following kernel options are turned on in addition to
  basic networking.  I use a 2.0.38 kernel in my system.

  For 2.0 kernels:

  o  CONFIG_FIREWALL

  o  CONFIG_IP_FORWARD

  o  CONFIG_IP_FIREWALL

  o  CONFIG_IP_ROUTER

  o  CONFIG_IP_MASQUERADE (optional)

  o  CONFIG_IP_MASQUERADE_ICMP (optional)

  o  CONFIG_PPP

  For 2.2 kernels:

  o  CONFIG_FIREWALL

  o  CONFIG_IP_ADVANCED_ROUTER

  o  CONFIG_IP_FIREWALL

  o  CONFIG_IP_ROUTER

  o  CONFIG_IP_MASQUERADE (optional)

  o  CONFIG_IP_MASQUERADE_ICMP (optional)

  o  CONFIG_PPP

  3.4.2.

  Filter Rules

  First, we write firewall filter rules that allow our users to access
  our internal nets, while restricting them from accessing the outside
  internet. If this sounds wierd, but think about it this way: they
  already have access to the internet, so why let them use the tunnel to
  access the net?  It wastes both our bandwidth and processor.

  The filter rules that we use depend upon which internal nets we use.
  But basically they say: "Allow traffic coming from our VPNs that is
  destined for our internal nets to go there."  So how do we do that?
  As always, it depends.  If you are running a 2.0 kernel, you use the
  tool called ipfwadm, if on the other hand you are using a 2.2 kernel,
  you use the utility called ipchains.

  To set the rules with ipfwadm, run it with options similar to the
  following:


  # /sbin/ipfwadm -F -f
  # /sbin/ipfwadm -F -p deny
  # /sbin/ipfwadm -F -a accept -S 192.168.13.0/24 -D 172.16.0.0/12



  To set the rules with ipchains, run it with options similar to the
  following:


  # /sbin/ipchains -F forward
  # /sbin/ipchains -P forward DENY
  # /sbin/ipchains -A forward -j ACCEPT -s 192.168.13.0/24 -d 172.16.0.0/12



  For those using 2.2 kernels, please read ``this''.

  3.4.3.

  Routing

  So, now our users are allowed to access our nets, now we need to tell
  the kernel where to send the packets.  On my system, I have two
  ethernet cards, one is on the external network, while the other is on
  the internal network. This helps keep things secure, as outbound
  traffic is masqueraded by our gateway, and any incoming traffic is
  filtered and routed by our Cisco.  For most setups, the routing should
  be simple.

  What we do is route all traffic destined for the private networks out
  the internal interface, and all other traffic out the external
  interface.  The specific routing commands depend on which internal
  nets you are using.  Below is an example of what they might look like.
  These lines are of course in addition to your basic routes for your
  local nets.  I also doubt that you are using all 3 groups of internal
  numbers.


  Assuming that 172.16.254.254 is our internal gateway:

  # /sbin/route add -net 10.0.0.0 netmask 255.0.0.0 gw 172.16.254.254 dev eth1
  # /sbin/route add -net 172.16.0.0 netmask 255.240.0.0 gw 172.16.254.254 dev eth1
  # /sbin/route add -net 192.168.0.0 netmask 255.255.0.0 gw 172.16.254.254 dev eth1



  One additional note on routing.  If you are using two way routing for
  say, a remote office, then you will need to do one more thing.  You'll
  need to set up routes on the server that point back to the client.
  The easiest way to accomplish this is to run a cron job every minute
  that quietly sets back routes.  It's not a big deal if the client
  isn't connected, route will just spit out an error (that you've
  conveniently sent to /dev/null.)

  4.

  Client

  Now we examine the client end.  In practice, when used to allow access
  to a remote network, this box can easily serve as a Samba (Windows
  Networking) server, DHCP server, and even an internal web server.  The
  important thing to remember is that this box should be as secure as
  possible, as it runs your whole remote network.

  4.1.

  The Kernel

  First things first, you must have ppp available in your kernel.  If
  you are going to allow multiple machines to use the tunnel, then you
  need to have firewalling and forwarding available too.  If the client
  is going to be a single machine, ppp is enough.

  4.2.

  Bring up the link

  The link is created by running pppd through a pseudo terminal that is
  created by pty-redir and connected to ssh.  This is done with
  something similar to the following sequence of commands:


  # /usr/sbin/pty-redir /usr/bin/ssh -t -e none -o 'Batchmode yes' -c blowfish -i /root/.ssh/identity.vpn -l joe > /tmp/vpn-device
  # sleep 10

  # /usr/sbin/pppd `cat /tmp/vpn-device`
  # sleep 15

  # /sbin/route add -net 172.16.0.0 gw vpn-internal.mycompany.com netmask 255.240.0.0
  # /sbin/route add -net 192.168.0.0 gw vpn-internal.mycompany.com netmask 255.255.0.0



  Simply, what this does is run ssh, redirecting it's input and output
  to pppd.  The options passed to ssh configure it to run without escape
  characters (-e), using the blowfish crypto algorithm (-c), using the
  identity file specified (-i), in terminal mode (-t), with the options
  executions of the commands so that each can complete their startup
  before the next is run.

  4.3.

  scripting

  Of course you don't want to have to type those commands in every time
  that you want to get the tunnel running.  I've written a set of bash
  scripts that keep the tunnel up and running.  You can download the
  package from here <http://www.shinythings.com/vpnd/vpnd.tar.gz>. Just
  download that an uncompress it into /usr/local/vpn.  Inside you'll
  find three files:


  o  vpnd: The script that controls the tunnel connection.

  o  check-vpnd: a script to be run by cron to check that vpnd is still
     up.


  o  pty-redir: a small executable needed to initialize the tunnel.

  You'll need to edit the vpnd script to set things like the client's
  username and the server's names.  You may also need to modify the
  starttunnel section of the script to specify which networks you are
  using.  Below is a copy of the script for your reading enjoyment.
  You'll note that you could put the script in a different directory,
  you just need to change the VPN_DIR variable.



  #! /bin/bash
  #
  # vpnd: Monitor the tunnel, bring it up and down as necessary
  #

  USERNAME=vpn-username
  IDENTITY=/root/.ssh/identity.vpn

  VPN_DIR=/usr/local/vpn
  LOCK_DIR=/var/run
  VPN_EXTERNAL=vpn.mycompany.com
  VPN_INTERNAL=vpn-internal.mycompany.com
  PTY_REDIR=${VPN_DIR}/pty-redir
  SSH=${VPN_DIR}/${VPN_EXTERNAL}
  PPPD=/usr/sbin/pppd
  ROUTE=/sbin/route
  CRYPTO=blowfish
  PPP_OPTIONS="noipdefault ipcp-accept-local ipcp-accept-remote local noauth nocrtscts lock nodefaultroute"
  ORIG_SSH=/usr/bin/ssh


  starttunnel () {
     $PTY_REDIR $SSH -t -e none -o 'Batchmode yes' -c $CRYPTO -i $IDENTITY -l $USERNAME > /tmp/vpn-device
     sleep 15

     $PPPD `cat /tmp/vpn-device` $PPP_OPTIONS
     sleep 15

     # Add routes (modify these lines as necessary)
     /sbin/route add -net 10.0.0.0 gw $VPN_INTERNAL netmask 255.0.0.0
     /sbin/route add -net 172.16.0.0 gw $VPN_INTERNAL netmask 255.240.0.0
     /sbin/route add -net 192.168.0.0 gw $VPN_INTERNAL netmask 255.255.0.0
  }

  stoptunnel () {
     kill `ps ax | grep $SSH | grep -v grep | awk '{print $1}'`
  }

  resettunnel () {
     echo "reseting tunnel."
     date >> ${VPN_DIR}/restart.log
     eval stoptunnel
     sleep 5
     eval starttunnel
  }

  checktunnel () {
     ping -c 4 $VPN_EXTERNAL 2>/dev/null 1>/dev/null

     if [ $? -eq 0 ]; then
        ping -c 4 $VPN_INTERNAL 2>/dev/null 1>/dev/null
        if [ $? -ne 0 ]; then
           eval resettunnel
        fi
     fi
  }

  settraps () {
     trap "eval stoptunnel; exit 0" INT TERM
     trap "eval resettunnel" HUP
     trap "eval checktunnel" USR1
  }

  runchecks () {
     if [ -f ${LOCK_DIR}/tunnel.pid ]; then
        OLD_PID=`cat ${LOCK_DIR}/vpnd.pid`
        if [ -d /proc/${OLD_PID} ]; then
           echo "vpnd is already running on process ${OLD_PID}."
           exit 1
        else
           echo "removing stale pid file."
           rm -rf ${LOCK_DIR}/vpnd.pid
           echo $$ > ${LOCK_DIR}/vpnd.pid
           echo "checking tunnel state."
           eval checktunnel
        fi
     else
        echo $$ > ${LOCK_DIR}/vpnd.pid
        eval starttunnel
     fi
  }

  case $1 in
      check)  if [ -d /proc/`cat ${LOCK_DIR}/vpnd.pid` ]; then
                 kill -USR1 `cat ${LOCK_DIR}/vpnd.pid`
                 exit 0
              else
                 echo "vpnd is not running."
                 exit 1
              fi ;;

      reset)  if [ -d /proc/`cat ${LOCK_DIR}/vpnd.pid` ]; then
                 kill -HUP `cat ${LOCK_DIR}/vpnd.pid`
                 exit 0
              else
                 echo "vpnd is not running."
                 exit 1
              fi ;;

     --help | -h)
              echo "Usage: vpnd [ check | reset ]"
              echo "Options:"
              echo "     check    Sends running vpnd a USR1 signal, telling it to check"
              echo "              the tunnel state, and restart if neccesary."
              echo "     reset    Sends running vpnd a HUP signal, telling it to reset"
              echo "              it's tunnel connection." ;;
  esac

  ln -sf $ORIG_SSH $SSH
  settraps
  runchecks

  while true; do
     i=0
     while [ $i -lt 600 ]; do
        i=((i+1))
        sleep 1
     done
     eval checktunnel
  done



  4.4.

  LRP - Linux Router Project

  I actually run this setup on pentium 90's running the LRP distribution
  of Linux.  LRP is a distribution of Linux that fits in, and boots off
  of a single floppy disk.  You can learn more about it at
  http://www.linuxrouter.org/ <http://www.linuxrouter.org/> You can
  download my LRP package for the VPN client from here
  <http://www.shinythings.com/vpnd/vpnd.lrp>.  You will also need both
  the ppp and ssh packages from the LRP site.

  5.

  Implementation

  In this section, I explain step by step how to set up your VPN system.
  I'll start with the server, and then move on to the client.  For the
  purposes of an example, I will invent a situation that would require a
  couple of different kinds of VPN set up.

  5.1.

  Planning

  Let's imagine that we have a company, called mycompany.com.  At our
  head office, we are using the 192.168.0.0 reserved network, breaking
  the class B into 256 class C networks to allow routing.  We have just
  set up two small remote offices, and want to add them to our network.
  We also want to allow employees who work from home to be able to use
  their DSL and cable modem connections instead of making them use
  dialup.  To start, we need to plan things out a little.

  I decide that I want to give each remote office a class C network
  range to allow them to expand as necessary.  So, I reserve the
  192.168.10.0 and 192.168.11.0 nets.  I also decide that for home
  users, I've got enough numbers that I don't need to masquerade them on
  the VPN server side.  Each client gets it's own internal IP.  So, I
  need to reserve another class C for that, say 192.168.40.0.  The only
  thing that I must now do is to add these ranges to my router.  Let's
  imagine that our company owns a small Cisco (192.168.254.254) that
  handles all of the traffic through our OC1.  Just set routes on the
  Cisco such that traffic headed to these reserved nets goes to our VPN
  server (192.168.40.254).  I put the VPN server into the home user's
  net for reasons that should become clear later.  We'll name the
  external interface of the server vpn.mycompany.com, and the internal
  vpn-internal.mycompany.com.

  As for external numbers, we don't need to know them explicitly. You
  should have your own numbers, supplied by your ISP.

  5.2.

  Gather the tools

  we're going to need a few pieces of software.  Get the following
  packages, and install them where specified.

  5.2.1.

  For the Server:


  o  pppd (version 2.3 or greater)

  o  ssh (version 1.2.26 or better)

  5.2.2.

  For the Client:


  o  pppd (same version as server)


  o  ssh

  o  pty-redir <ftp://ftp.vein.hu/ssa/contrib/mag/pty-redir-0.1.tar.gz>

  5.3.

  Server: Build the kernel

  To start, you'll probably need to rebuild your kernel for the server.
  You need to make sure that the following kernel options are turned on
  in addition to basic networking and everything else that you might
  need. If you've never built your own kernel before, read the Kernel
  HOWTO </HOWTO/Kernel-HOWTO.html>.

  For 2.0 kernels:

  o  CONFIG_FIREWALL

  o  CONFIG_IP_FORWARD

  o  CONFIG_IP_FIREWALL

  o  CONFIG_IP_ROUTER

  o  CONFIG_PPP

  For 2.2 kernels:

  o  CONFIG_FIREWALL

  o  CONFIG_IP_ADVANCED_ROUTER

  o  CONFIG_IP_FIREWALL

  o  CONFIG_IP_ROUTER

  o  CONFIG_PPP

  5.4.

  Server: Configure Networking

  If you are building a server that has only one network card, I suggest
  that you think about buying another, and rewiring your network.  The
  best way to keep your network private is to keep it on it's own wires.
  So if you do have two network cards, you'll need to know how to
  configure both of them.  We'll use eth0 for the external interface,
  and eth1 for the internal interface.

  5.4.1.

  Configuring the interfaces

  We first should configure the external interface of the server.  You
  should already know how to do this, and probably already have it done.
  If you don't, then do so now.  If you don't know how, go back and read
  the Networking HOWTO </HOWTO/NET3-4-HOWTO.html>

  Now we bring up the internal interface.  According to the numbers that
  we've chosen, the internal interface of the server is 192.168.40.254.
  so we have to configure that interface.

  For 2.0 kernels, use the following:



  # /sbin/ifconfig eth1 192.168.40.254 netmask 255.255.255.0 broadcast 192.168.40.255
  # /sbin/route add -net 192.168.40.0 netmask 255.255.255.0 dev eth1



  For 2.2 kernels, use the following:


  # /sbin/ifconfig eth1 192.168.40.254 netmask 255.255.255.0 broadcast 192.168.40.255



  That get's our basic interfaces up.  You can now talk to machines on
  both local networks that are attached to the server.

  5.4.2.

  Setting routes

  We can now talk to machines on our local nets, but we can't get to the
  rest of our internal network.  That requires a few more lines of code.
  In order to reach the other machines on other subnets, we need have a
  route that tells traffic to go to the Cisco router. Here's that line:

  # /sbin/route add -net 192.168.0.0 gw 192.168.254.254 netmask 255.255.0.0 dev eth1



  That line tells the kernel that any traffic destined for the
  192.168.0.0 network should go out eth1, and that it should be handed
  off to the Cisco.  Traffic for our local net still gets where it is
  supposed to because the routing tables are ordered by the size of the
  netmask.  If we were to have other internal nets in our network, we
  would have a line like the above for each net.

  5.4.3.

  Making filter rules

  Ok, so we can reach every machine that we could need to.  Now we need
  to write the firewall filtering rules that allow or deny access
  through the VPN server.

  To set the rules with ipfwadm, run it like so:


  # /sbin/ipfwadm -F -f
  # /sbin/ipfwadm -F -p deny
  # /sbin/ipfwadm -F -a accept -S 192.168.40.0/24 -D 192.168.0.0/16
  # /sbin/ipfwadm -F -a accept -b -S 192.168.10.0/24 -D 192.168.0.0/16
  # /sbin/ipfwadm -F -a accept -b -S 192.168.11.0/24 -D 192.168.0.0/16



  To set the rules with ipchains, run it like so:


  # /sbin/ipchains -F forward
  # /sbin/ipchains -P forward DENY
  # /sbin/ipchains -A forward -j ACCEPT -s 192.168.40.0/24 -d 192.168.0.0/16
  # /sbin/ipchains -A forward -j ACCEPT -b -s 192.168.10.0/24 -d 192.168.0.0/16
  # /sbin/ipchains -A forward -j ACCEPT -b -s 192.168.11.0/24 -d 192.168.0.0/16



  This tells the kernel to deny all traffic except for the traffic that
  is coming from the 192.168.40.0/24 network and destined for the
  192.168.0.0/16 network. It also tells the kernel that traffic going
  between the 192.168.10.0/24 and 192.168.0.0/16 nets is allowed, and
  the same for the 192.168.11.0 net.  These last two are bidirectional
  rules, this is important for getting the routing to work going both
  ways.

  5.4.4.

  Routing

  For the home users, everything will work just fine to here.  However,
  for the remote offices, we need to do some routing.  First of all, we
  need to tell the main router, or Cisco, that the remote offices are
  behind the VPN server.  So specify routes on the Cisco that tell it to
  send traffic destined for the remote offices to the VPN server.  Now
  that that is taken care of, we must tell the VPN server what to do
  with the traffic destined for the remote offices.  To do this, we run
  the route command on the server.  The only problem is that in order
  for the route command to work, the link must be up, and if it goes
  down, the route will be lost.  The solution is to add the routes when
  the clients connects, or more simply, to run the route command
  frequently as it's not a problem to run it more than is necessary.
  So, create a script and add it to your crontab to be run every few
  minutes,  in it, put the following:


  /sbin/route add -net 192.168.11.0 gw 192.168.10.253 netmask 255.255.255.0
  /sbin/route add -net 192.168.10.0 gw 192.168.11.253 netmask 255.255.255.0



  5.5.

  Server: Configure pppd

  Now we will configure pppd on the server to handle VPN connections.
  If you are already using this server to handle dialup users or even
  dialing out yourself, then you should note that these changes may
  affect those services.  I go over how to avoid conflicts at the end of
  this section.

  5.5.1.

  /etc/ppp/

  This directory may contain a number of files.  You probably already
  have a file called options.  This file holds all of the global options
  for pppd.  These options cannot be overridden by pppd on the command
  line.

  5.5.2.

  /etc/ppp/options

  Your options file should contain at least the following:


  ipcp-accept-local
  ipcp-accept-remote
  proxyarp
  noauth



  The first two lines tell pppd to accept what the other end specifies
  for IP addresses.  This is necessary when hooking up remote offices,
  but can be disabled if you are only connecting home users.  It's ok to
  leave it on, as it does not prevent the server from assigning
  addresses, it only tells it that it's ok to accept what the client
  asks for.

  The third line is very important.  From the pppd man page:


  proxyarp
         Add an entry to this system's ARP [Address  Resolu-
         tion  Protocol]  table  with  the IP address of the
         peer and the Ethernet address of this system.  This
         will  have  the effect of making the peer appear to
         other systems to be on the local ethernet.



  This is important because if it is not done, local traffic will not be
  able to get back through the tunnel.

  The last line is just as important.  This tells pppd to allow
  connections without username and password.  This is safe since
  authentication is already handled by sshd.

  5.5.3.

  Avoiding conflicts

  If you are handling other services with pppd, you should consider that
  the configurations for these other services may not be the same as
  what the VPN system needs.  pppd is designed such that the options in
  the main options file /etc/ppp/options cannot be overridden by options
  specified at runtime.  This is done for security reasons. In order to
  avoid conflict, determine which options cause the conflict, and move
  them from the main file into a separate options file that is loaded
  when the appropriate application of pppd is run.

  5.6.

  Server: Configure sshd

  The following is what my /etc/sshd_config file looks like.  Yours
  should look the same or similar:



  # This is the ssh server system wide configuration file.

  Port 22
  ListenAddress 0.0.0.0
  HostKey /etc/ssh_host_key
  RandomSeed /etc/ssh_random_seed
  ServerKeyBits 768
  LoginGraceTime 600
  KeyRegenerationInterval 3600
  PermitRootLogin yes
  IgnoreRhosts yes
  StrictModes yes
  QuietMode no
  FascistLogging yes
  CheckMail no
  IdleTimeout 3d
  X11Forwarding no
  PrintMotd no
  KeepAlive yes
  SyslogFacility DAEMON
  RhostsAuthentication no
  RhostsRSAAuthentication no
  RSAAuthentication yes
  PasswordAuthentication no
  PermitEmptyPasswords no
  UseLogin no



  The important points to note are that password authentication is
  disabled as are all of the "r" services.  I have also turned off mail
  checking and the message of the day as they can confuse pppd on the
  client side.  I still allow root login, but as this can only be done
  with a key, it is adequately safe.

  5.7.

  Server: Set up user accounts

  Now we'll set up the user accounts.

  5.7.1.

  Add vpn-users  group

  just run:


  # /usr/sbin/groupadd vpn-users



  Now cat the /etc/group file and look at the last line.  It should be
  the entry for the vpn-users group.  Note the third field.  This is the
  group ID (GID).  Write it down, as we'll need it in a minute.  For
  this example, the GID is 101.

  5.7.2.

  create the vpn-users  home directory

  We're going to use a single home directory for all of the users.  So
  just run:



  # mkdir /home/vpn-users



  5.7.3.

  The .ssh  directory

  Now create the .ssh directory in the vpn-users home directory.


  # mkdir /home/vpn-users/.ssh



  5.7.4.

  Adding users

  Now comes the fun part.  We're going to edit the /etc/passwd file by
  hand.  :)  Normally you let the system handle this file, but for a
  wierd setup like this, it is easier to do it yourself.  To start,
  let's open the /etc/passwd file and see what's in there.  Here's an
  example of what you might find:


  ...
  nobody:x:65534:100:nobody:/dev/null:
  mwilson:x:1000:100:Matthew Wilson,,,:/home/mwilson:/bin/bash
  joe:*:1020:101:Joe Mode (home),,,:/home/vpn-users:/usr/sbin/pppd
  bill:*:1020:101:Bill Smith (home),,,:/home/vpn-users:/usr/sbin/pppd
  frank:*:1020:101:Frank Jones (home),,,:/home/vpn-users:/usr/sbin/pppd
  ...



  You'll find the first user on most any system.  The second one is me.
  :) After that are a few made up vpn-users. The first field is the
  username, and the second is the password field. The third is user ID
  (UID) and the fourth is the group ID (GID).  After that comes some
  info on who the people are in the fifth field. The sixth field is the
  user's home directory, and the last is their shell.  As you can see,
  each field is separated by a colon.  Look at the last three lines. The
  only difference between them is the username in the first field, and
  the user info in the fifth field.  What we want to do is create lines
  like this for each user.  Don't just use one user for all of the
  connections, you'll never be able to tell them apart if you do.  So,
  copy the last line of this file and edit it so that it looks something
  like the above.  Make sure that the second field has an asterisk (*).
  The second field should be unique to all the other IDs in the file.  I
  used 1020.  You should use a number above 1000, since those below are
  typically reserved for system use.  The fourth field should be the
  group ID for vpn-users.  I told you to write it down, now is the time
  that you need it. So put the group ID in there.  Lastly, change the
  home directory to /home/vpn-users, and the shell to /usr/sbin/pppd.
  That's it.  Now copy that line to make more users.  Just edit the
  first the fifth fields and you're set.

  5.8.

  Server: Administration

  One of the advantages to using this system for user accounts is that
  you can take advantage of the UNIX user administration commands.
  Since each client is logged in as a user, you can use standard methods
  to get user statistics.  The following are a few commands that I like
  to use to see what all is going on.



     who
        Prints the users currently logged in, as well as when they
        logged in, from where (name or IP), and on which port.


     w  This command prints a more extensive listing of who is currently
        logged in.  It also tells you uptime and load averages for the
        system.  It also lists the user's current process (which should
        be -pppd for VPN clients) as well as idle time, and current CPU
        usage for all processes as well as the current process.  Read
        the w man page for more info.


     last [username]
        This lists the login history for the specified user, or for all
        users if a username is not provided.  It's most useful for
        finding out how well the tunnels are running as it prints the
        length of time that the user was logged in, or states that the
        user is still logged in. I should warn you that on a system that
        has been up a long time, this list can grow extremely long.
        Pipe is through grep or head to find out exactly what you want
        to know.

  You can also control which users are allowed to connect by modifying
  the /home/vpn-users/.ssh/authorized_keys file.  If you remove the
  user's public key line from this file, they won't be able to log in.

  5.9.

  Client: Build the kernel

  Now we move onto the client.  First we must rebuild the kernel so that
  it can support all of the functions that we need.  The minimum
  requirement is to have ppp in the kernel.  After that, you will need
  forwarding, firewalling, and gatewaying only if you are going to allow
  other machines access to the tunnel.  For this example, I will setup
  one of the remote office machines in my example layout.  Add the
  following options to your kernel.  Again, if you've never built a
  kernel before, read the Kernel HOWTO </HOWTO/Kernel-HOWTO.html>.

  For 2.0 kernels:

  o  CONFIG_PPP

  o  CONFIG_FIREWALL

  o  CONFIG_IP_FORWARD

  o  CONFIG_IP_FIREWALL

  o  CONFIG_IP_ROUTER

  o  CONFIG_IP_MASQUERADE

  o  CONFIG_IP_MASQUERADE_ICMP

  For 2.2 kernels:

  o  CONFIG_PPP

  o  CONFIG_FIREWALL

  o  CONFIG_IP_ADVANCED_ROUTER

  o  CONFIG_IP_FIREWALL

  o  CONFIG_IP_ROUTER

  o  CONFIG_IP_MASQUERADE

  o  CONFIG_IP_MASQUERADE_ICMP

  5.10.

  Client: Configure Networking

  Now we should setup the networking on our client box.  Let's assume
  that we've configured the external network and that it works.  Now we
  will configure the internal interface of the client to service our
  intranet.

  5.10.1.

  Interface

  We need to first bring up the internal network interface.  To do this,
  add the following to your /etc/rc.d/rc.inet1 (or equivalent) file:

  For 2.0 Kernels:


  /sbin/ifconfig eth1 192.168.10.253 broadcast 192.168.10.255 netmask 255.255.255.0
  /sbin/route add -net 192.168.10.0 netmask 255.255.255.0 dev eth1



  For 2.2 Kernels:


  /sbin/ifconfig eth1 192.168.10.253 broadcast 192.168.10.255 netmask 255.255.255.0



  5.10.2.

  Filter rules

  For setting up the remote office, we will want to set up our filter
  rules that allow traffic to go both directions through the tunnel.
  Add the following lines to your /etc/rc.d/rc.inet1 (or equivalent)
  file:

  For 2.0 kernels:


  /sbin/ipfwadm -F -f
  /sbin/ipfwadm -F -p deny
  /sbin/ipfwadm -F -a accept -b -S 192.168.10.0/24 -D 192.168.0.0/16



  For 2.2 kernels:


  /sbin/ipchains -F forward
  /sbin/ipchains -P forward DENY
  /sbin/ipchains -A forward -j ACCEPT -b -s 192.168.10.0/24 -d 192.168.0.0/16

  You may have noticed that these lines look like what we have on the
  server.  That's because they are the same.  These rules just say where
  traffic is allowed to go, that is, between these two networks.

  5.10.3.

  Routing

  The only extra routes that are needed are created by the script that
  bring the tunnel up.

  5.11.

  Client: Configure pppd

  You may not need to edit the client's /etc/ppp/options file at all.
  You will if the "auth" option is present, or some of the other
  priveledged options.  Try it, and if it fails, a black
  /etc/ppp/options will work. just keep adding the options from the old
  file to figure out which one broke it (if it's not obvious) and see if
  you can get around that.  Maybe you don't need them at all.  You
  probably don't if you don't use pppd for anything else.

  5.12.

  Client: Configure ssh

  As root on the client, run the following lines:


  # mkdir /root/.ssh
  # ssh-keygen -f /root/.ssh/identity.vpn -P ""



  This will create two files, identity.vpn and identity.vpn.pub in the
  .ssh directory.  The first is your private key, and should be kept
  such.  NEVER SEND THIS OVER THE NET unless it is via an encrypted
  session.  The second file is your public key, and you can send this
  anywhere you want, it only serves to allow you access to other
  systems, and cannot be used to get into your own.  It is a text file
  with one line in it that is your actual key.  At the end of the line
  is the comment field which you may change without fear of breaking the
  key.  an example key looks something like this:


  1024 35 1430723736674162619588314275167.......250872101150654839 root@vpn-client.mycompany.com



  It's actually a lot longer than that, but it wouldn't fit on the page
  if I showed the whole thing.  Copy your key into the /home/vpn-
  users/.ssh/authorized_keys file on the server.  Make sure that there
  is only one key per line, and that each key is not broken onto
  multiple lines.  You may alter the comment field all that you like in
  order to help you remember which line goes with which user.  I highly
  recommend doing so.

  5.13.

  Client: Bring up the connection

  Now we'll try to actually make the connection to the VPN server.
  First we'll need to make a single connection the set up ssh's
  known_hosts file.  Run this:

  # ssh vpn.mycompany.com



  Answer ''yes'' when it asks you if you want to continue connecting.
  The server will tell you ''permission denied'', but that''s ok. It's
  important that you use the same name for the server that you are using
  in your connection scripts.  Now run the following lines.  You will
  obviously need to change most of the options to fit your setup.


  # /usr/sbin/pty-redir /usr/bin/ssh -t -e none -o 'Batchmode yes' -c blowfish -i /root/.ssh/identity.vpn -l vpn-user vpn.mycompany.com > /tmp/vpn-device

          (now wait about 10 seconds)

  # /usr/sbin/pppd `cat /tmp/vpn-device` 192.168.10.254:192.168.40.254



  Note the IP addresses specified on the pppd line.  The first is the
  address of the client end of the tunnel.  The second is the address of
  the server end of the tunnel, which is set to the server's internal
  address.  If all of that seemed to work, move on.  If not, check that
  you have all of the options, and that they are spelled right.  If
  something is still going wrong, check the ``Pitfalls section''.

  5.14.

  Client: Set the routes

  Now set the route to send traffic through the tunnel.  Just run this:


  # /sbin/route add -net 192.168.0.0 gw vpn-internal.mycompany.com netmask 255.255.0.0



  You should now be able to communicate with machines on the other side
  of the tunnel.  Give it a try.  Neat huh?  If it doesn't work, try
  using ping and traceroute to figure out where your problem might be.
  If in fact it does work, move on to setting up scripts to do the work
  for you.

  5.15.

  Client: Scripting

  Use the vpnd script that I show ``here''.  Only, you need to modify it
  a little.  Make the following changes:


  o  Change the variables at the top to match your setup.  Most should
     be just fine as they are, but you can change them should you need
     to.

  o  Line 27: add the local and remote IP addresses before $PPP_OPTIONS

  o  Line 31: Change this line, and the two after it to set routes for
     your internal nets.

  5.15.1.

  Keeping it running

  While bash scripts are generally stable, they have been known to fail.
  In order to make sure that the vpnd script keeps running, add an entry
  to the client's crontab that runs the check-vpnd script. I run mine
  every 5 minutes or so.  If vpnd is indeed running, check-vpnd doesn't
  use much CPU.

  6.

  Addenda

  6.1.

  Pitfalls

  Here are just a few of the snags that I've run into while using this
  system. I put them here so that you can hopefully avoid them.  If you
  run into any new ones, please email them to me
  <mailto:matthew@shinythings.com> so that I can keep track, and help
  others avoid them.

  6.1.1.

  read: I/O error

  This error apparently comes from pppd.  It's associated with mis-
  matched versions off pppd.  If you get it, try upgrading both ends of
  the connection to the latest version of pppd.  I've found that pppd
  version 2.2 has this problem, and use version 2.3.7 or 2.3.8 instead.

  6.1.2.

  SIOCADDRT: Network is unreachable

  This error is generated by route.  I've seen it happen when the sleep
  time between ssh and pppd is not long enough. If you get this error,
  run ifconfig, you may see that there is no pppX interface.  This means
  that ssh was not done authenticating before pppd was launched, and
  therefore pppd did not make the connection.  just increase the delay,
  and your problems will be solved.

  I wonder however if there might be some pppd option that will fix this
  problem.

  6.1.3.

  IPv4 Forwarding and 2.2 kernels

  In the new 2.2 kernel, you must specifically enable IP forwarding in
  the kernel at boot up.  This with the following command:


  # echo 1 > /proc/sys/net/ipv4/ip_forward



  Without this, the kernel will not forward any packets, and hence the
  server will not work, nor will any of the gatewaying clients.

  6.1.4.

  Routing

  it should go without saying, but be careful when you are routing real
  numbers that you don't route traffic destined for the VPN server's
  external address through the tunnel.  It won't make it.  (yes, this is
  from personal experience.)


  6.2.

  Hardware and Software Requirements

  6.2.1.

  Minimum Hardware Requirements

  Believe it or not, this system has been run on a 486SX33 with 8
  megabytes of RAM.  It didn't run very well though, it had trouble
  handling heavy traffic.

  It doesn't take much more to make it work though.  This system does
  work very well on a Pentium 75 with 16 megs of RAM, using an LRP
  distribution running off of a floppy, with a 6 meg ramdisk, and 10
  megs of main memory. I've tested this setup by running a 700kbit
  RealVideo stream through it for over an hour.

  I now typically run it on Pentium 90's, as their PCI clocking plays
  nicer with cheap 100Mbit Ethernet cards.

  6.2.2.

  Software Requirements

  This system works with both the 2.0 and 2.2 kernels.  The script to
  keep the tunnel up requires a reasonably modern bash.  I have however
  noticed that certain distribution's versions of bash don't play too
  well with the script.

  Also, if someone could help me refine my scripts (or even write an
  executable?) that would helps things a lot.  I'm not sure why, but
  even my own bash doesn't follow the rules and doesn't seem to
  interpret signals correctly.  If you do make any improvements, please
  email me at matthew@shinythings.com <mailto:matthew@shinythings.com>



  Linux VPN Masquerade HOWTO
  John D. Hardin <jhardin@wolfenet.com>
  v2.2, 9 September 1999

  This document describes how to configure a Linux firewall to masquer-
  ade IPsec- and PPTP-based Virtual Private Network traffic, allowing
  you to establish a VPN connection without losing the security and
  flexibility of your Linux firewall's internet connection and allowing
  you to make available a VPN server that does not have a registered
  internet IP address.  Information on configuring the VPN client and
  server is also given.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Introduction
     1.2 Feedback, Credits & Resources
     1.3 Copyright & Disclaimer

  2. Background Knowledge

     2.1 What is a VPN?
     2.2 What is IPsec?
     2.3 What is PPTP?
     2.4 Why masquerade a VPN client?
     2.5 Can several clients on my local network use IPsec simultaneously?
     2.6 Can several clients on my local network use PPTP simultaneously?
     2.7 Can I access the remote network from my entire local network?
     2.8 Why masquerade the VPN server?
     2.9 Why patch the Linux kernel?
     2.10 Current Status

  3. Configuring the Linux firewall

     3.1 Example network
     3.2 Determining what needs to be done on the firewall
     3.3 Patching and configuring the 2.0.x kernel for VPN Masquerade support
     3.4 Patching and configuring the 2.2.x kernel for VPN Masquerade support
     3.5 ipfwadm setup for a Private-IP VPN Client or Server
     3.6 ipchains setup for a Private-IP VPN Client or Server
     3.7 A note about dynamic IP addressing
     3.8 Additional setup for a Private-IP VPN Server
     3.9 ipfwadm setup for a Registered-IP VPN Server
     3.10 ipfwadm setup for a Registered-IP VPN Client

  4. Configuring the VPN client

     4.1 Configuring a MS W'95 or W'98 client
     4.2 Configuring a MS NT client

  5. Troubleshooting

     5.1 Testing
     5.2 Possible problems
     5.3 Troubleshooting
     5.4 MS PPTP Clients and domain-name issues
     5.5 MS PPTP Clients and Novell IPX
     5.6 MS network password issues
     5.7 If your IPsec session always dies after a certain amount of time

  6. IPsec masquerade technical notes and special security considerations

     6.1 Limitations and weaknesses of IPsec masquerade
     6.2 Proper routing of inbound encrypted traffic


  ______________________________________________________________________

  1.  Introduction



  1.1.  Introduction

  This document describes how to configure masquerading of IPsec and
  PPTP VPN traffic. SSH-based VPNs (such as that sold by F-Secure and
  outlined in the VPN mini-HOWTO) are based on standard TCP traffic and
  do not need any special kernel modifications.

  VPN Masquerade allows you to establish one or more IPsec and/or PPTP
  sessions to internet-accessible VPN servers via your Linux internet
  firewall without forcing you to connect to your ISP directly from the
  VPN client system - thus retaining all of the benefits of your Linux
  internet firewall. It also allows you to set up a VPN server with a
  Private Network IP address (as described in RFC1918) behind a
  masquerading Linux firewall, permitting you to provide relatively
  secure access to a private network via only one registered IP address
  - even if that IP address represents a dynamic dial-up link.

  It is strongly recommended that you understand, configure and test
  regular IP Masquerading before you attempt to set up VPN masquerading.
  Please see the IP Masquerade HOWTO and the IP Masquerade Resource page
  at <http://ipmasq.cjb.net/> before proceeding.

  The patch for the 2.0.x-series kernels works well on Linux kernel
  version 2.0.36, has been incorporated into the 2.0.37 release, may
  work on versions earlier than 2.0.36, and should work on Linux kernels
  up to about version 2.1.102. The IP masquerade code in the kernel was
  restructured at about version 2.1.103, requiring a different patch for
  the 2.1.105+ and 2.2.x series of kernels. A patch is available for
  kernels from 2.2.5 to 2.2.12, and it may work on earlier kernels.



  1.2.  Feedback, Credits & Resources

  Please feel free to send any feedback or comments regarding this
  document to me at <jhardin@wolfenet.com>.

  I personally have experience with masquerading a MS NT-Server-based
  PPTP client, configuring a registered-IP PPTP server, and using PPTP
  for network-to-network routing.  The information on masquerading a
  Private-IP PPTP server is from discussions with Len Bayles
  <len@isdi.com>, Simon Cocking <simon@ibs.com.au> and C. Scott Ananian
  <cananian@lcs.mit.edu>.

  The current version of this document can be found at
  <ftp://ftp.rubyriver.com/pub/jhardin/masquerade/VPN-Masquerade.sgml> -
  it and other formats (such as HTML) can be found via the Linux
  Documentation Project's HOWTO repository and in the /usr/doc/HOWTO/
  directory on your nearest Linux system.

  The home page for the Linux VPN Masquerade kernel patch is
  <http://www.wolfenet.com/~jhardin/ip_masq_vpn.html>

  The home page for the PPTP-only Masquerade kernel patch for the
  2.1.105+ and 2.2.x kernel series is
  <http://bmrc.berkeley.edu/people/chaffee/linux_pptp.html>.

  The home page for the ipportfw port-forwarding kernel patch and
  configuration tool is
  <http://www.ox.compsoc.org.uk/~steve/portforwarding.html>.

  The home page for the ipfwd generic IP redirector is
  <http://www.pdos.lcs.mit.edu/~cananian/Projects/IPfwd/>.

  Profuse thanks to Gordon Chaffee <chaffee@cs.berkeley.edu> for coding
  and sharing a patch to traceroute that allows tracing GRE traffic. It
  should prove invaluable in troubleshooting if your GRE traffic is
  being blocked somewhere. The patch is available at
  <http://www.wolfenet.com/~jhardin/pptp-traceroute.patch.gz>

  More thanks to Steve Chinatti <chinatti@alumni.Princeton.EDU> for
  contributing his original IPsec masquerade hack, from which I
  shamelessly stole some very important ideas...
  More information on setting up firewall rules to run automatically -
  including how to automatically use the correct IP address in a
  dynamic-IP environment - can be found at
  <http://www.wolfenet.com/~jhardin/ipfwadm/invocation.html>

  The home page for Linux FreeS/WAN (IPsec for Linux) is
  <http://www.xs4all.nl/~freeswan>

  The home page for the Linux PPTP project is
  <http://www.pdos.lcs.mit.edu/~cananian/Projects/PPTP> and a patch to
  add PPTP server capability is available at
  <http://debs.fuller.edu/cgi-bin/display?list=pptp&msg=222>

  A second Linux PPTP server called PoPToP is available at
  <http://www.moretonbay.com/vpn/pptp.html>

  Paul Cadach <paul@odt.east.telecom.kz> has made patches that add MS-
  CHAP-v2, MPPE and Multilink support to Linux pppd. See
  <ftp://ftp.east.telecom.kz/pub/src/networking/ppp/ppp-2.3.5-my.tgz>
  for MS-CHAP and MPPE, and
  <ftp://ftp.east.telecom.kz/pub/src/networking/ppp/multilink/ppp-2.3.5-mp.tgz>
  for Multilink.



  1.3.  Copyright & Disclaimer

  This document is copyright (C) 1999 by John D. Hardin.  Permission is
  granted to redistribute it under the terms of the GNU General Public
  License.

  The information presented in this document is correct to the best of
  my knowledge. IP Masquerading is experimental, and it is possible that
  I have made a mistake in writing or testing the kernel patch or
  composing the instructions in this document; you should determine for
  yourself if you want to make the changes outlined in this document.


       THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGES INCURRED DUE
       TO ACTIONS TAKEN BASED ON THE INFORMATION IN THIS DOCUMENT.
       BACK UP ANY AND ALL CRITICAL INFORMATION BEFORE IMPLEMENTING
       THE CHANGES OUTLINED IN THIS DOCUMENT. MAKE SURE YOU HAVE A
       WORKING, BOOTABLE KERNEL AVAILABLE BEFORE PATCHING AND
       RECOMPILING YOUR KERNEL AS OUTLINED IN THIS DOCUMENT.


  In other words, take sensible precautions.



  2.  Background Knowledge



  2.1.  What is a VPN?

  A Virtual Private Network, or "VPN", is a tunnel that carries private
  network traffic from one endpoint system to another over a public
  network (such as the Internet) without the traffic being aware that
  there are intermediate hops between the endpoints, or the intermediate
  hops being aware they are carrying the network packets that are
  traversing the tunnel.  The tunnel may optionally compress and/or
  encrypt the data, providing enhanced performance and some measure of
  security.


  The "Virtual" part stems from the fact that you are constructing a
  private link over a public network, rather than actually buying a
  direct hardwired link over leased lines. The VPN allows you to pretend
  you are using a leased line to communicate between the endpoints.

  You may find the VPN FAQ at
  <http://kubarb.phsx.ukans.edu/~tbird/FAQ.html> informative.



  2.2.  What is IPsec?

  IPsec is a set of standard protocols for implementing secure
  communications and encryption key exchange between computers. It can
  be used to implement a VPN.

  An IPsec VPN generally consists of two communications channels between
  the the endpoints: a key-exchange channel over which authentication
  and encryption key information is passed, and one or more data
  channels over which private network traffic is carried.

  The key-exchange channel is a standard UDP connection to and from port
  500. The data channels carrying the traffic between the client and
  server use IP protocol number 50 (ESP).

  More information is available in F-Secure's IPsec FAQ at
  <http://www.data-fellows.com/f-secure/support/vpn-
  plus/faq/techfaq.htm>, and in RFC2402 (the AH protocol), RFC2406 (the
  ESP protocol), and RFC2408 (the ISAKMP key-exchange protocol).

  Important note: If your VPN is based on the AH protocol, it cannot be
  masqueraded. The AH protocol specifies a cryptographic checksum across
  portions of the IP header, including the IP addresses. IP Masquerade
  is implemented by modifying the source IP address for outbound packets
  and the destination IP address for inbound packets. Since the
  masquerading gateway cannot participate in the encryption key
  exchange, it cannot generate the correct cryptographic checksums for
  the modified IP headers. Thus the modified IP packets will be
  discarded by the recipient as invalid, because they fail the
  cryptographic checksum test.


  2.3.  What is PPTP?

  PPTP stands for Point-to-Point Tunnelling Protocol. It is a Microsoft-
  proposed protocol for implementing a VPN.

  The PPTP VPN protocol consists of two communications channels between
  the client and server: a control channel over which link-management
  information is passed, and a data channel over which (possibly
  encrypted) private network traffic is carried.

  The control channel is a standard TCP connection to port 1723 on the
  server. The data channel carrying the private network traffic uses IP
  protocol number 47 (GRE), a generic encapsulation protocol described
  in RFC1701. The transparent transmission of data over the data channel
  is achieved by negotiating a standard PPP connection over it, just as
  if it were a dialup connection directly from the client to the server.
  The options negotiated over the tunnel by PPP control whether the data
  is compressed and/or encrypted, thus PPTP itself has nothing to do
  with encryption.

  The details of the PPTP protocol are documented at
  <http://www.ietf.org/internet-drafts/draft-ietf-pppext-pptp-08.txt>.


  Microsoft's implementation of the PPTP protocol is not considered very
  secure. If you're interested in the details, here are three seperate
  analyses:

  <http://www.counterpane.com/pptp.html>

  <http://www.geek-girl.com/bugtraq/1999_1/0664.html>

  <http://oliver.efri.hr/~crv/security/bugs/NT/pptp2.html>



  2.4.  Why masquerade a VPN client?

  Most current VPN clients assume you will be connecting the client
  computer directly to the internet. Doing this when you have only a
  single connection for internet access bypasses your Linux firewall and
  the security and access-sharing capabilities that it provides.
  Extending the Linux firewall to also masquerade VPN traffic allows you
  to retain the firewalling security provided by the Linux firewall as
  well as permitting the other systems on your local network to access
  the internet regardless of whether or not the VPN network connection
  is active.

  If your firewall is being used in a corporate setting you may also
  wish to require your VPN client users to go through that firewall for
  security reasons, rather than providing them with modems so they can
  dial out on their own when they need to use VPN. VPN Masquerade allows
  you to do so even if the desktops do not have registered IP addresses.



  2.5.  Can several clients on my local network use IPsec simultane-
  ously?

  Yes, though there may occasionally be minor problems.

  The IPsec protocols define a method for identifying the traffic
  streams called the Security Parameters Index ("SPI"). Unfortunately
  the SPI used by outbound traffic is different from the SPI used by
  inbound traffic, and there is no other identifying information
  available that is not encrypted, so association of the inbound and
  outbound data streams is difficult and not perfectly reliable.

  IPsec Masquerade attempts to associate inbound and outbound ESP
  traffic by serializing new connections. While this has worked well in
  testing, it cannot be guaranteed to be perfectly reliable, and the
  serialization of new traffic may result in some timeouts if the link
  is saturated or if many local IPsec hosts attempt to initiate
  communications or rekey with the same remote IPsec host
  simultaneously.

  It is also assumed that should this association scheme fail to
  associate the traffic streams correctly, the IPsec hosts themselves
  will discard the incorrectly routed traffic because it will have the
  wrong SPI values. This is required by the IPsec RFC.

  These problems could be eliminated if there was some way to sniff the
  new SPI values from the ISAKMP key exchange before any ESP traffic
  appears, but unfortunately that portion of the key exchange is
  encrypted.

  To minimize the problems associated with this, it is recommended that
  you open a command window on your masqueraded IPsec host and run the
  "ping" program pinging a host on the remote network for as long as you
  have the tunnel up.
  See the IPsec technical notes at the end of the document for more
  details.



  2.6.  Can several clients on my local network use PPTP simultaneously?

  Yes.

  You must enable PPTP Call ID masquerade when configuring your kernel
  in order to distinguish between multiple data streams from the same
  server.  PPTP masq with Call ID masq enabled will support many
  concurrent masqueraded sessions with no restrictions on which server a
  client can call.

  For another alternative, see the next question...



  2.7.  Can I access the remote network from my entire local network?

  Yes. However, your VPN client must be able to forward IP traffic.

  This means that you'll either have to use a Linux VPN client or a MS
  NT VPN client. The IP stack in W'95 and W'98 does not support IP
  forwarding. NT Workstation will work for this, and is less expensive
  than NT Server if you're only using it to route encrypted traffic.

  If you cannot install a Linux or NT-based VPN client, then you'll have
  to enable PPTP Call-ID masquerade if you are using PPTP, and install
  VPN client software on every system you want to provide access for.
  This is inefficient, aesthetically revolting and a security weakness,
  but it's cheaper than licensing NT.

  Network-to-network routing this way works very well. This is how I
  have my home network set up for telecommuting. It does require a
  little more networking knowhow than simply giving everybody their own
  VPN client.

  In my experience, network-to-network routing in a pure-MS environment
  requires RRAS be installed at both ends of the tunnel.



  2.8.  Why masquerade the VPN server?

  If your VPN server has a registered IP address you do not need to
  masquerade it, simply configure your firewall to route the VPN traffic
  properly as described below.

  If your VPN server has a Private-Network IP address you will need to
  redirect the inbound traffic to it and masquerade the outbound traffic
  from it. Masquerading allows you to make a VPN server available to the
  internet even if you only have one assigned IP address. This should
  work even if your IP address is dynamically assigned: you would
  publicize the IP address for clients through the use of a third-party
  dynamic DNS service such as that provided by DDNS.ORG and configure
  the clients to connect to a system named our-company.ddns.org or
  something similar. Note that this is a security risk, because it is
  possible for an incorrect IP address to be retrieved from the dynamic
  DNS server through timing problems, a failure to properly register the
  current dynamic IP address, or a third party registering a different
  IP address under the system name.



  2.9.  Why patch the Linux kernel?

  The largest problem in masquerading VPN traffic is that the stock
  2.0.x Linux kernel has no special awareness of IP protocols other than
  TCP, UDP and ICMP.

  All IP traffic may be forwarded and filtered by IP address, but
  filtering on or masquerading IP protocols other than TCP, UDP and ICMP
  requires modifying the kernel.

  The PPTP control channel is plain TCP and requires no special setup
  beyond letting it through the firewall and masquerading it.

  Masquerading the IPsec and PPTP data channels requires a modification
  that adds support for the ESP and GRE protocols to the masquerading
  code, and masquerading the ISAKMP key exchange protocol requires a
  modification that prevents masquerade from altering the UDP source
  port number and adds tracking of the ISAKMP cookie values.



  2.10.  Current Status

  The 2.0.x kernel patch works on kernel 2.0.36 and is incorporated into
  the standard 2.0.37 kernel release. It may work on earlier kernels but
  I have not tested it, and I recommend you upgrade to the latest kernel
  anyway for security reasons if you are running a kernel that old.

  The 2.2.x kernel patch works on kernels from 2.2.5 to 2.2.12 and may
  work on earlier kernels, but that has not been tested. It will be
  submitted for inclusion in the standard 2.2.13 release if all goes
  well.

  The 2.0.x kernel patch has been tested and works on x86 and Sparc
  systems, and the 2.2.x kernel patch has been tested and works on x86
  systems, but there should be no major problems in porting to other
  architectures. I believe the architecture dependencies are only in
  endian-ness within the bitmaps in the GRE header definition used to
  format debugging log messages.  If anyone ports this to a non-Intel
  architecture I'd appreciate hearing about it so I can merge any
  changes into the master copy.

  A PPTP-only kernel patch for the 2.1.105+ and 2.2.x kernel series is
  available at
  <http://bmrc.berkeley.edu/people/chaffee/linux_pptp.html>.

  See the VPN Masquerade home page at
  <http://www.wolfenet.com/~jhardin/ip_masq_vpn.html> for the status of
  the VPN Masq patches, and
  <http://bmrc.berkeley.edu/people/chaffee/linux_pptp.html> for the
  status of the 2.1.105+/2.2.x PPTP-only Masq patch.



  3.  Configuring the Linux firewall



  3.1.  Example network

  For the Private-IP configuration examples in this document we will use
  this sample network:



  Internet-------- 200.200.200.*   ppp0 or  200.200.200.200 eth1
                                   Dual-Homed Linux Firewall
              .--- 10.0.0.1        eth0
              |
              |--- 10.0.0.2        VPN client or server
              |



  For the registered-IP configuration examples in this document we will
  use this sample network:


       Internet-------- 200.200.200.200 eth1
                                        Dual-Homed Linux Firewall
                   .--- 222.0.0.1       eth0
                   |
                   |--- 222.0.0.2       VPN client or server
                   |



  The VPN server that the example clients connect to will be 199.0.0.1

  The VPN clients that the connect to the example server will be
  199.0.0.2 and 199.0.0.3



  3.2.  Determining what needs to be done on the firewall

  If your VPN client or server has a registered internet IP address you
  do not need to masquerade or modify your kernel - the stock kernel
  will successfully route all VPN traffic. You can skip directly to the
  registered-IP setup sections below.

  If your VPN client or server has a Private-Network IP address as
  described in RFC1918 you will need to patch your kernel (unless your
  kernel is 2.0.37 or higher in the 2.0.x series).

  If you are setting up a masqueraded VPN server, you will also have to
  obtain and install the following two packages:


  o  To redirect the inbound TCP/UDP traffic (the 1723/tcp PPTP control
     channel or the 500/udp ISAKMP channel), you need the appropriate
     ipportfw port-forwarding kernel patch and configuration tool from
     <http://www.ox.compsoc.org.uk/~steve/portforwarding.html>.  Port
     forwarding has been incorporated into the 2.2.x kernel. See man
     ipmasqadm for configuration details.

     If ipmasqadm is not included with your distribution it can be
     obtained at  <http://juanjox.linuxhq.com/>


  o  To redirect the initial inbound tunnel traffic (GRE for PPTP and
     ESP for IPsec), you need the ipfwd generic-IP proxy from
     <http://www.pdos.lcs.mit.edu/~cananian/Projects/IPfwd/>.

  You do not need port forwarding or ipfwd if you are only masquerading
  clients.



  3.3.  Patching and configuring the 2.0.x kernel for VPN Masquerade
  support


  1. Install the kernel source (preferably version 2.0.37), which you
     can obtain from  <http://www.kernel.org/> or a mirror. The sources
     should be automatically extracted into a directory named
     /usr/src/linux.


  2. Configure and test standard IP Masquerading (see the IP Masquerade
     HOWTO). Doing this will familiarize you with recompiling your
     kernel and introduce you to IP Masquerading in general.


  3. Back up your kernel sources.


  4. Obtain the kernel patch if necessary.

     If your kernel version is 2.0.36 or lower, obtain the 2.0.x VPN
     Masquerade kernel patch from the VPN Masquerade home page in the
     "Resources" section above.

     If your kernel version is 2.0.37 or higher in the 2.0.x series, you
     do not need to apply any patches. The VPN Masquerade code is
     included in the kernel. Skip the discussion of patching the kernel.

     For the purposes of this document we'll assume you've saved the
     appropriate patch in /usr/src/ip_masq_vpn.patch.gz.


  5. Apply the VPN Masquerade patch to your kernel if necessary:


  o  Change to the kernel source directory:

       cd /usr/src/linux



  o  Apply the patch:

       gzcat ../ip_masq_vpn.patch.gz | patch -l -p0 > vpn-patch.log



       Note that the options are "dash lowercase L, dash lowercase
       P zero".



       Also, you may get odd results if you change the order of the
       arguments. Patch seems to be sensitive to the order they
       appear on the command line.



  o  Check the vpn-patch.log file to see if any hunks failed.  If you
     get failed hunks, then you probably either omitted the options or
     ran the patch program from the wrong directory. Restore your kernel
     from the backup and try again.


  6. If you are masquerading a VPN server, obtain and install the
     ipportfw patch from the site given above.
     There is a known conflict between the VPN Masquerade patch and two
     other networking patches: the IP Firewall Chains patch and the
     ipportfw patch.  They are all trying to add options at the same
     location in net/ipv4/Config.in, and the changes made by one patch
     alter the context that the other patches are looking for.

     If you're applying the VPN Masquerade patch and the IP Firewall
     Chains or ipportfw patches to your 2.0.x kernel, you will have to
     manually edit net/ipv4/Config.in and add the block of configuration
     options from the patch file that fails to work. Looking at the
     patch file should show you where in net/ipv4/Config.in the new
     options should be added.

     The syntax of patch files is simple. For each block of changes to
     make, there are two sections: the first shows the "before" state,
     with an indication of lines to be changed or deleted; the second
     shows the "after" state, with an indication of the lines that have
     been changed or added. Use the first section to find where to add
     the lines, and add the lines that are indicated in the second
     section.

     This should not be a problem once those patches are updated for
     2.0.37+



  7. Configure your kernel and select the following options - say YES to
     the following:



    * Prompt for development and/or incomplete code/drivers
      CONFIG_EXPERIMENTAL
      - You must enable this to see the VPN Masq options.

    * Networking support
      CONFIG_NET

    * Network firewalls
      CONFIG_FIREWALL

    * TCP/IP networking
      CONFIG_INET

    * IP: forwarding/gatewaying
      CONFIG_IP_FORWARD

    * IP: firewalling
      CONFIG_IP_FIREWALL

    * IP: masquerading (EXPERIMENTAL)
      CONFIG_IP_MASQUERADE
      - This is required.

    * IP: PPTP masq support (EXPERIMENTAL)
      CONFIG_IP_MASQUERADE_PPTP
      - Enables PPTP data channel masquerading, if you are
        masquerading a PPTP client or server.

    * IP: PPTP Call ID masq support (EXPERIMENTAL)
      CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT
      - Enables PPTP Call ID masquerading; only necessary if
        you will be masquerading more than one client trying
        to connect to the same remote server. DO NOT enable
        this option if you will be masquerading a PPTP server.

    * IP: IPsec ESP & ISAKMP masq support (EXPERIMENTAL)
      CONFIG_IP_MASQUERADE_IPSEC
      - Enables IPsec masquerade, if you are masquerading an
        IPsec host.

    * IP: IPSEC masq table lifetime (minutes)
      - See your network administrator to determine what the
        "rekey interval" or "key lifetime" is set to. The
        default lifetime of masq table entries is thirty minutes.
        If your rekey interval is greater than thirty minutes,
        then you should increase the lifetime to a value slightly
        greater than the rekey interval.

    * IP: always defragment
      CONFIG_IP_ALWAYS_DEFRAG
      - Highly recommended for a firewall.



  NOTE: These are just the settings you need for masquerading.  Select
  whatever other options you need for your specific setup.



  8. Recompile the kernel and install it for testing. Don't replace a
     known working kernel with your new kernel until you have proven it
     works.


  To determine whether the running kernel includes VPN Masquerade
  support, run the following command:


       grep masq /proc/ksyms



  Look for the following entries:

  o  IPsec masquerade: ip_masq_out_get_isakmp, ip_masq_in_get_isakmp,
     ip_fw_masq_esp and ip_fw_demasq_esp

  o  PPTP masquerade: ip_fw_masq_gre and ip_fw_demasq_gre

  o  PPTP Call-ID masquerade: ip_masq_pptp

  If you don't see these entries, VPN Masquerade support is probably not
  available. If you get complaints about /proc/ksyms not being available
  or /proc not being available, make sure that you have enabled the
  /proc filesystem in your kernel configuration.


  See the Kernel HOWTO for more details on configuring and recompiling
  your kernel.



  3.4.  Patching and configuring the 2.2.x kernel for VPN Masquerade
  support


  1. Install the kernel source (preferably version 2.2.10 or later),
     which you can obtain from  <http://www.kernel.org/> or a mirror.
     The sources should be automatically extracted into a directory
     named /usr/src/linux.


  2. Configure and test standard IP Masquerading (see the IP Masquerade
     HOWTO). Doing this will familiarize you with recompiling your
     kernel and introduce you to IP Masquerading in general.


  3. Back up your kernel sources.


  4. Obtain the kernel patch from the VPN Masquerade home page in the
     "Resources" section above.

     For the purposes of this document we'll assume you've saved the
     appropriate patch in /usr/src/ip_masq_vpn.patch.gz.


  5. Apply the VPN Masquerade patch to your kernel if necessary:


  o  Change to the source directory:

       cd /usr/src



  o  Apply the patch:


  gzcat ip_masq_vpn.patch.gz | patch -l -p0 > vpn-patch.log



       Note that the options are "dash lowercase L, dash lowercase
       P zero".



       Also, you may get odd results if you change the order of the
       arguments. Patch seems to be sensitive to the order they
       appear on the command line.



       Also note that the directory you run the patch command in is
       different for the 2.2.x kernel patch



  o  Check the vpn-patch.log file to see if any hunks failed.  If you
     get failed hunks, then you probably either omitted the options or
     ran the patch program from the wrong directory. Restore your kernel
     from the backup and try again.


  6. If you are masquerading a VPN server you do not need the ipportfw
     patch as port forwarding is now built-in. See the ipmasqadm man
     page for more details.



  7. Configure your kernel and select the following options - say YES to
     the following:



    * Prompt for development and/or incomplete code/drivers
      CONFIG_EXPERIMENTAL
      - You must enable this to see the VPN Masq options.

    * Networking support
      CONFIG_NET

    * Network firewalls
      CONFIG_FIREWALL

    * TCP/IP networking
      CONFIG_INET

    * IP: firewalling
      CONFIG_IP_FIREWALL

    * IP: always defragment
      CONFIG_IP_ALWAYS_DEFRAG
      - Required for masquerading

    * IP: masquerading (EXPERIMENTAL)
      CONFIG_IP_MASQUERADE
      - This is required.

    * IP: masquerading special modules support
      CONFIG_IP_MASQUERADE_MOD
      - This is required.

    * IP: ipportfw masq support (EXPERIMENTAL)
      CONFIG_IP_MASQUERADE_IPPORTFW
      - Enable this if you will be masquerading a VPN server.

    * IP: PPTP masq support
      CONFIG_IP_MASQUERADE_PPTP
      - Enables PPTP data channel masquerading, if you are
        masquerading a PPTP client or server. This is now
        available as a module.
        Note that you no longer need to specify Call-ID masquerade.

    * IP: IPsec ESP & ISAKMP masq support (EXPERIMENTAL)
      CONFIG_IP_MASQUERADE_IPSEC
      - Enables IPsec masquerade, if you are masquerading an
        IPsec host. This is now available as a module.

    * IP: IPsec masq table lifetime (minutes)
      - See your network administrator to determine what the
        "rekey interval" or "key lifetime" is set to. The default
        lifetime of masq table entries is thirty minutes.
        If your rekey interval is greater than thirty minutes,
        then you should increase the lifetime to a value slightly
        greater than the rekey interval.

    * IP: Enable parallel sessions (possible security risk - see help)
      CONFIG_IP_MASQUERADE_IPSEC_PAROK
      - See the IPsec masquerade technical notes and
        special security considerations section of the HOWTO for
        security considerations to be aware of when
        masquerading IPsec traffic. If you are only masquerading
        one IPsec client this setting has no effect.



  NOTE: These are just the settings you need for masquerading.  Select
  whatever other options you need for your specific setup.
  8. Recompile the kernel and install it for testing. Don't replace a
     known working kernel with your new kernel until you have proven it
     works.



  To determine whether the running kernel includes VPN Masquerade
  support, run the following command:


       grep masq /proc/ksyms



  Look for the following entries:

  o  IPsec masquerade: ip_fw_masq_esp and ip_fw_demasq_esp

  o  PPTP masquerade: ip_fw_masq_gre and ip_fw_demasq_gre

  If you don't see these entries, VPN Masquerade support is probably not
  available (did you remember to modprobe ip_masq_pptp or modprobe
  ip_masq_ipsec if you compiled them as modules?). If you get complaints
  about /proc/ksyms not being available or /proc not being available,
  make sure that you have enabled the /proc filesystem in your kernel
  configuration.


  See the Kernel HOWTO for more details on configuring and recompiling
  your kernel.



  3.5.  ipfwadm setup for a Private-IP VPN Client or Server

  The firewall must now be configured to masquerade the outbound VPN
  traffic.  You may wish to visit
  <http://www.wolfenet.com/~jhardin/ipfwadm.html> to take a look at a
  GUI wrapper around the ipfwadm command that automates a lot of
  security-related packet filtering setup.

  The minimum firewall rules are:


       # Set the default forwarding policy to DENY:
       ipfwadm -F -p deny
       # Allow local-network traffic
       ipfwadm -I -a accept    -S 10.0.0.0/8 -D 0.0.0.0/0  -W eth0
       ipfwadm -O -a accept    -S 0.0.0.0/0  -D 10.0.0.0/8 -W eth0
       # Masquerade traffic for internet addresses and allow internet traffic
       ipfwadm -F -a accept -m -S 10.0.0.0/8 -D 0.0.0.0/0  -W ppp0
       ipfwadm -O -a accept    -S 0.0.0.0/0  -D 0.0.0.0/0  -W ppp0
       ipfwadm -I -a accept    -S 0.0.0.0/0  -D 0.0.0.0/0  -W ppp0


       or, if you have a permanent connection,

       ipfwadm -F -a accept -m -S 10.0.0.0/8 -D 0.0.0.0/0  -W eth1
       ipfwadm -O -a accept    -S 0.0.0.0/0  -D 0.0.0.0/0  -W eth1
       ipfwadm -I -a accept    -S 0.0.0.0/0  -D 0.0.0.0/0  -W eth1



  This is a completely open setup, though. It will masquerade any
  traffic from any host on the local network destined for any host on
  the internet, and provides no security at all.

  A tight firewall setup would only allow traffic between the client and
  the server, and would block everything else:


       # Set the default policy to DENY:
       ipfwadm -I -p deny
       ipfwadm -O -p deny
       ipfwadm -F -p deny
       # Allow local-network traffic
       ipfwadm -I -a accept -S 10.0.0.0/8 -D 0.0.0.0/0  -W eth0
       ipfwadm -O -a accept -S 0.0.0.0/0  -D 10.0.0.0/8 -W eth0
       # Masquerade only VPN traffic between the VPN client and the VPN server
       ipfwadm -F -a accept -m -P udp -S 10.0.0.2/32 500 -D 199.0.0.1/32 500  -W ppp0
       ipfwadm -F -a accept -m -P tcp -S 10.0.0.2/32     -D 199.0.0.1/32 1723 -W ppp0
       ipfwadm -F -a deny      -P tcp -S 10.0.0.2/32     -D 199.0.0.1/32      -W ppp0
       ipfwadm -F -a deny      -P udp -S 10.0.0.2/32     -D 199.0.0.1/32      -W ppp0
       ipfwadm -F -a accept -m -P all -S 10.0.0.2/32     -D 199.0.0.1/32      -W ppp0
       ipfwadm -O -a accept    -P udp -S 200.200.200.0/24 500 -D 199.0.0.1/32 500  -W ppp0
       ipfwadm -O -a accept    -P tcp -S 200.200.200.0/24     -D 199.0.0.1/32 1723 -W ppp0
       ipfwadm -O -a deny      -P tcp -S 200.200.200.0/24     -D 199.0.0.1/32      -W ppp0
       ipfwadm -O -a deny      -P udp -S 200.200.200.0/24     -D 199.0.0.1/32      -W ppp0
       ipfwadm -O -a accept    -P all -S 200.200.200.0/24     -D 199.0.0.1/32      -W ppp0
       ipfwadm -I -a accept    -P udp -S 199.0.0.1/32 500     -D 200.200.200.0/24 500 -W ppp0
       ipfwadm -I -a accept    -P tcp -S 199.0.0.1/32 1723    -D 200.200.200.0/24     -W ppp0
       ipfwadm -I -a deny      -P tcp -S 199.0.0.1/32         -D 200.200.200.0/24     -W ppp0
       ipfwadm -I -a deny      -P udp -S 199.0.0.1/32         -D 200.200.200.0/24     -W ppp0
       ipfwadm -I -a accept    -P all -S 199.0.0.1/32         -D 200.200.200.0/24     -W ppp0


       or, if you have a permanent connection,

       ipfwadm -F -a accept -m -P udp -S 10.0.0.2/32 500 -D 199.0.0.1/32 500  -W eth1
       ipfwadm -F -a accept -m -P tcp -S 10.0.0.2/32     -D 199.0.0.1/32 1723 -W eth1
       ipfwadm -F -a deny      -P tcp -S 10.0.0.2/32     -D 199.0.0.1/32      -W eth1
       ipfwadm -F -a deny      -P udp -S 10.0.0.2/32     -D 199.0.0.1/32      -W eth1
       ipfwadm -F -a accept -m -P all -S 10.0.0.2/32     -D 199.0.0.1/32      -W eth1
       ipfwadm -O -a accept    -P udp -S 200.200.200.200/32 500 -D 199.0.0.1/32 500  -W eth1
       ipfwadm -O -a accept    -P tcp -S 200.200.200.200/32     -D 199.0.0.1/32 1723 -W eth1
       ipfwadm -O -a deny      -P tcp -S 200.200.200.200/32     -D 199.0.0.1/32      -W eth1
       ipfwadm -O -a deny      -P udp -S 200.200.200.200/32     -D 199.0.0.1/32      -W eth1
       ipfwadm -O -a accept    -P all -S 200.200.200.200/32     -D 199.0.0.1/32      -W eth1
       ipfwadm -I -a accept    -P udp -S 199.0.0.1/32 500  -D 200.200.200.200/32 500 -W eth1
       ipfwadm -I -a accept    -P tcp -S 199.0.0.1/32 1723 -D 200.200.200.200/32     -W eth1
       ipfwadm -I -a deny      -P tcp -S 199.0.0.1/32      -D 200.200.200.200/32     -W eth1
       ipfwadm -I -a deny      -P udp -S 199.0.0.1/32      -D 200.200.200.200/32     -W eth1
       ipfwadm -I -a accept    -P all -S 199.0.0.1/32      -D 200.200.200.200/32     -W eth1



  Note: these rules only allow VPN traffic and block everything else.
  You will have to add rules for any other traffic you wish to permit,
  such as DNS, HTTP, POP, IMAP, etc.



  3.6.  ipchains setup for a Private-IP VPN Client or Server

  The minimum ipchains firewall rules are:



  # Set the default forwarding policy to DENY:
  ipchains -P forward DENY
  # Allow local-network traffic
  ipchains -A input   -j ACCEPT -s 10.0.0.0/8 -d 0.0.0.0/0  -i eth0
  ipchains -A output  -j ACCEPT -s 0.0.0.0/0  -d 10.0.0.0/8 -i eth0
  # Masquerade traffic for internet addresses and allow internet traffic
  ipchains -A forward -j MASQ   -s 10.0.0.0/8 -d 0.0.0.0/0  -i ppp0
  ipchains -A output  -j ACCEPT -s 0.0.0.0/0  -d 0.0.0.0/0  -i ppp0
  ipchains -A input   -j ACCEPT -s 0.0.0.0/0  -d 0.0.0.0/0  -i ppp0


  or, if you have a permanent connection,

  ipchains -A forward -j MASQ   -s 10.0.0.0/8 -d 0.0.0.0/0  -i eth1
  ipchains -A output  -j ACCEPT -s 0.0.0.0/0  -d 0.0.0.0/0  -i eth1
  ipchains -A input   -j ACCEPT -s 0.0.0.0/0  -d 0.0.0.0/0  -i eth1



  This is a completely open setup, though. It will masquerade any traf-
  fic from any host on the local network destined for any host on the
  internet, and provides no security at all.

  A tight firewall setup would only allow traffic between the client and
  the server, and would block everything else:


       # Set the default policy to DENY:
       ipchains -P input   DENY
       ipchains -P output  DENY
       ipchains -P forward DENY
       # Allow local-network traffic
       ipchains -A input  -j ACCEPT -s 10.0.0.0/8 -d 0.0.0.0/0  -i eth0
       ipchains -A output -j ACCEPT -s 0.0.0.0/0  -d 10.0.0.0/8 -i eth0
       # Masquerade only VPN traffic between the VPN client and the VPN server
       # IPsec
       ipchains -A forward -j MASQ   -p udp -s 10.0.0.2/32 500      -d 199.0.0.1/32 500     -i ppp0
       ipchains -A output  -j ACCEPT -p udp -s 200.200.200.0/24 500 -d 199.0.0.1/32 500     -i ppp0
       ipchains -A input   -j ACCEPT -p udp -s 199.0.0.1/32 500     -d 200.200.200.0/24 500 -i ppp0
       ipchains -A forward -j MASQ   -p 50  -s 10.0.0.2/32          -d 199.0.0.1/32         -i ppp0
       ipchains -A output  -j ACCEPT -p 50  -s 200.200.200.0/24     -d 199.0.0.1/32         -i ppp0
       ipchains -A input   -j ACCEPT -p 50  -s 199.0.0.1/32         -d 200.200.200.0/24     -i ppp0
       # PPTP
       ipchains -A forward -j MASQ   -p tcp -s 10.0.0.2/32       -d 199.0.0.1/32 1723 -i ppp0
       ipchains -A output  -j ACCEPT -p tcp -s 200.200.200.0/24  -d 199.0.0.1/32 1723 -i ppp0
       ipchains -A input   -j ACCEPT -p tcp -s 199.0.0.1/32 1723 -d 200.200.200.0/24  -i ppp0
       ipchains -A forward -j MASQ   -p 47  -s 10.0.0.2/32       -d 199.0.0.1/32      -i ppp0
       ipchains -A output  -j ACCEPT -p 47  -s 200.200.200.0/24  -d 199.0.0.1/32      -i ppp0
       ipchains -A input   -j ACCEPT -p 47  -s 199.0.0.1/32      -d 200.200.200.0/24  -i ppp0


       or, if you have a permanent connection,



  # IPsec
  ipchains -A forward -j MASQ   -p udp -s 10.0.0.2/32 500        -d 199.0.0.1/32 500       -i eth1
  ipchains -A output  -j ACCEPT -p udp -s 200.200.200.200/32 500 -d 199.0.0.1/32 500       -i eth1
  ipchains -A input   -j ACCEPT -p udp -s 199.0.0.1/32 500       -d 200.200.200.200/32 500 -i eth1
  ipchains -A forward -j MASQ   -p 50  -s 10.0.0.2/32            -d 199.0.0.1/32           -i eth1
  ipchains -A output  -j ACCEPT -p 50  -s 200.200.200.200/32     -d 199.0.0.1/32           -i eth1
  ipchains -A input   -j ACCEPT -p 50  -s 199.0.0.1/32           -d 200.200.200.200/32     -i eth1
  # PPTP
  ipchains -A forward -j MASQ   -p tcp -s 10.0.0.2/32        -d 199.0.0.1/32 1723  -i eth1
  ipchains -A output  -j ACCEPT -p tcp -s 200.200.200.200/32 -d 199.0.0.1/32 1723  -i eth1
  ipchains -A input   -j ACCEPT -p tcp -s 199.0.0.1/32 1723  -d 200.200.200.200/32 -i eth1
  ipchains -A forward -j MASQ   -p 47  -s 10.0.0.2/32        -d 199.0.0.1/32       -i eth1
  ipchains -A output  -j ACCEPT -p 47  -s 200.200.200.200/32 -d 199.0.0.1/32       -i eth1
  ipchains -A input   -j ACCEPT -p 47  -s 199.0.0.1/32       -d 200.200.200.200/32 -i eth1



  Note: these rules only allow VPN traffic. You will have to add rules
  for any other traffic you wish to permit, such as DNS, HTTP, POP,
  IMAP, etc.

  Also note how there rules are much neater and easier to make sense of
  than the equivalent ipfwadm rules. This is because ipchains allows
  specification of all IP protocols, not just TCP, UDP, ICMP or ALL.



  3.7.  A note about dynamic IP addressing

  If your firewall is assigned a dynamic IP address by your ISP (dialup
  accounts are this way, as are some cable internet services), then you
  should add the following to the startup script /etc/rc.d/rc.local:


       echo 7 > /proc/sys/net/ipv4/ip_dynaddr



  This enables dynamic IP address following, which means that should
  your connection drop and be reestablished, any active sessions will be
  updated to the new IP address rather than using the old IP address.
  This does not mean that the session will continue across the interrup-
  tion, rather that it will be closed down quickly.

  If you do not do this, then there may be a "dead period" after you
  redial and before old masq table entries expire where you're being
  masqueraded with the wrong IP address, which will prevent your
  establishing a connection.

  This is particularly helpful if you are using a demand-dial daemon
  such as diald to manage your dialup connection.

  See /usr/src/linux/Documentation/networking/ip_dynaddr.txt for more
  details.



  3.8.  Additional setup for a Private-IP VPN Server

  If you are setting up VPN masquerade for a Private-IP VPN server (that
  is, you wish to provide for inbound connections as well as outbound
  connections), you also need to install two packet-forwarding
  utilities. One (ipportfw) forwards inbound TCP or UDP traffic
  addressed to a specific port on the firewall system to a system on the
  local network behind the firewall. This is used to redirect the
  initial inbound 1723/tcp PPTP control channel or 500/udp ISAKMP
  traffic to the VPN server. The other (ipfwd) is a more generic
  forwarding utility that allows you to do this for any IP protocol. It
  is used to forward the initial inbound 47/ip (GRE) or 50/ip (ESP) data
  channel traffic to the VPN server.

  Outbound responses to the inbound 1723/tcp or 500/udp traffic are
  masqueraded using the normal IP-Masquerade facilities in the Linux
  kernel.  The outbound 47/ip or 50/ip traffic is masqueraded using the
  VPN-Masquerade kernel patch you installed earlier.

  Once these utilities are installed, you must configure them to forward
  the traffic to the VPN server.



  o  Configuring ipportfw

     The following commands will set up ipportfw to forward the initial
     inbound 500/udp traffic to the IPsec server:


       # Static-IP ipportfw setup for IPsec
       # Clear the ipportfw forwarding table
       /sbin/ipportfw -C
       # Forward traffic addressed to the firewall's 500/udp port
       # to the IPsec server's 500/udp port
       /sbin/ipportfw -A -u 200.200.200.200/500 -R 10.0.0.2/500



  The following commands will set up ipportfw to forward the initial
  inbound 1723/tcp traffic to the PPTP server:


       # Static-IP ipportfw setup for PPTP
       # Clear the ipportfw forwarding table
       /sbin/ipportfw -C
       # Forward traffic addressed to the firewall's 1723/tcp port
       # to the PPTP server's 1723/tcp port
       /sbin/ipportfw -A -t 200.200.200.200/1723 -R 10.0.0.2/1723



  Note that the ipportfw command line requires the internet IP address
  of the firewall, and you cannot specify the interface (e.g. ppp0) as
  you can with ipfwadm. This means that for a dynamic-IP connection
  (such as a typical dialup PPP connection) you have to run these com-
  mands every time you connect to the internet and are assigned a new IP
  address. You can do this quite easily - simply add the following to
  your /etc/ppp/ip-up or /etc/ppp/ip-up.local script:


       # Dynamic-IP ipportfw setup for IPsec
       # Clear the ipportfw forwarding table
       /sbin/ipportfw -C
       # Forward traffic addressed to the firewall's 500/udp port
       # to the IPsec server's 500/udp port
       /sbin/ipportfw -A -u ${4}/500 -R 10.0.0.2/500



  or:


       # Dynamic-IP ipportfw setup for PPTP
       # Clear the ipportfw forwarding table
       /sbin/ipportfw -C
       # Forward traffic addressed to the firewall's 1723/tcp port
       # to the PPTP server's 1723/tcp port
       /sbin/ipportfw -A -t ${4}/1723 -R 10.0.0.2/1723



  See  <http://www.wolfenet.com/~jhardin/ipfwadm/invocation.html> for
  more information on firewalling with a dynamic IP.



  o  Configuring ipfwd

     The following command will set up ipfwd to forward the initial
     inbound 50/ip traffic to the IPsec server:


       /sbin/ipfwd --masq 10.0.0.2 50 &



  The following command will set up ipfwd to forward the initial inbound
  47/ip traffic to the PPTP server:


       /sbin/ipfwd --masq 10.0.0.2 47 &



  It should only be run once, from your /etc/rc.d/rc.local script.


  The techniques described here can be generalized to allow masquerading
  of most any type of server - HTTP, FTP, SMTP, and so forth. Servers
  that are purely TCP- or UDP-based will not require ipfwd.


  If you are masquerading a PPTP server you also need to make sure that
  you have not enabled PPTP Call ID masquerade in the kernel. Enabling
  PPTP Call ID masquerade builds in some assumptions that you're
  masquerading only PPTP clients, so enabling it will prevent proper
  masquerade of the PPTP server traffic. This also means that with this
  version of the patch you cannot simultaneously masquerade a PPTP
  server and PPTP clients. Contact me if this limitation causes you
  problems.



  3.9.  ipfwadm setup for a Registered-IP VPN Server

  Setting up a registered-IP VPN server behind a Linux firewall is a
  simple matter of making sure the appropriate routing and packet-filter
  commands are in place. Masquerading is not required.

  Unfortunately the 2.0.x-series kernels will not let us specify IP
  protocol 47 or 50 directly, so this firewall is less secure than it
  could be. If this is a problem for you, then install the IP Firewall
  Chains kernel patch or move to the 2.1.x or 2.2.x series kernel, where
  you can filter by IP protocol.

  The firewall rules will look something like this:


       # This section should follow your other firewall rules.

       # Specify the acceptable clients explicitly for tighter security.
       # Allow the IPsec ISAKMP traffic in and out.
       ipfwadm -I -a accept -W eth1 -V 200.200.200.200 -P udp -S 199.0.0.2/32 500 -D 222.0.0.2/32 500
       ipfwadm -O -a accept -W eth1 -V 200.200.200.200 -P udp -D 199.0.0.2/32 500 -S 222.0.0.2/32 500
       ipfwadm -I -a accept -W eth1 -V 200.200.200.200 -P udp -S 199.0.0.3/32 500 -D 222.0.0.2/32 500
       ipfwadm -O -a accept -W eth1 -V 200.200.200.200 -P udp -D 199.0.0.3/32 500 -S 222.0.0.2/32 500
       # Allow the PPTP control channel in and out.
       ipfwadm -I -a accept -W eth1 -V 200.200.200.200 -P tcp -S 199.0.0.2/32 -D 222.0.0.2/32 1723
       ipfwadm -O -a accept -W eth1 -V 200.200.200.200 -P tcp -D 199.0.0.2/32 -S 222.0.0.2/32 1723
       ipfwadm -I -a accept -W eth1 -V 200.200.200.200 -P tcp -S 199.0.0.3/32 -D 222.0.0.2/32 1723
       ipfwadm -O -a accept -W eth1 -V 200.200.200.200 -P tcp -D 199.0.0.3/32 -S 222.0.0.2/32 1723

       # Block all other TCP and UDP traffic from the internet.
       # This is essentially a "default deny TCP/UDP" that
       # only applies to the internet interface.
       ipfwadm -I -a deny -W eth1 -V 200.200.200.200 -P tcp
       ipfwadm -I -a deny -W eth1 -V 200.200.200.200 -P udp

       # Specify the acceptable clients explicitly for tighter security.
       # Note that this is too open since we're forced to
       # specify "-P all" rather than "-P 47" or "-P 50"...
       # Allow the PPTP data channel and IPsec ESP traffic in and out.
       ipfwadm -I -a accept -W eth1 -V 200.200.200.200 -P all -S 199.0.0.2/32 -D 222.0.0.2/32
       ipfwadm -0 -a accept -W eth1 -V 200.200.200.200 -P all -D 199.0.0.2/32 -S 222.0.0.2/32
       ipfwadm -I -a accept -W eth1 -V 200.200.200.200 -P all -S 199.0.0.3/32 -D 222.0.0.2/32
       ipfwadm -O -a accept -W eth1 -V 200.200.200.200 -P all -D 199.0.0.3/32 -S 222.0.0.2/32

       # Block all other traffic from the internet.
       # This is essentially a "default deny" that
       # only applies to the internet interface.
       ipfwadm -I -a deny -W eth1 -V 200.200.200.200



  If you are installing firewall rules on forwarding and/or output, you
  will have do do something similar. The above example only covers VPN
  traffic; you will have to merge it into your existing firewall setup
  to allow any other traffic you need.



  3.10.  ipfwadm setup for a Registered-IP VPN Client

  Setting up a registered-IP VPN client behind a Linux firewall is
  similar to setting up a registered-IP VPN server.

  The firewall rules will look something like this:



  # Allow the IPsec ISAKMP traffic out and in.
  ipfwadm -O -a accept -W eth1 -V 200.200.200.200 -P udp -S 222.0.0.2/32 500 -D 199.0.0.1/32 500
  ipfwadm -I -a accept -W eth1 -V 200.200.200.200 -P udp -D 222.0.0.2/32 500 -S 199.0.0.1/32 500
  # Allow the PPTP control channel out and in.
  ipfwadm -O -a accept -W eth1 -V 200.200.200.200 -P tcp -S 222.0.0.2/32 -D 199.0.0.1/32 1723
  ipfwadm -I -a accept -W eth1 -V 200.200.200.200 -P tcp -D 222.0.0.2/32 -S 199.0.0.1/32 1723

  # Block all other TCP and UDP traffic from the internet.
  # This is essentially a "default deny TCP/UDP" that
  # only applies to the internet interface.
  ipfwadm -I -a deny -W eth1 -V 200.200.200.200 -P tcp
  ipfwadm -I -a deny -W eth1 -V 200.200.200.200 -P udp

  # Note that this is too open since we're forced to
  # specify "-P all" rather than "-P 47" or "-P 50"...
  # Allow the PPTP data channel and IPsec ESP traffic out and in
  ipfwadm -O -a accept -W eth1 -V 200.200.200.200 -P all -S 222.0.0.2/32 -D 199.0.0.1/32
  ipfwadm -I -a accept -W eth1 -V 200.200.200.200 -P all -D 222.0.0.2/32 -S 199.0.0.1/32

  # Block all other traffic from the internet.
  # This is essentially a "default deny" that
  # only applies to the internet interface.
  ipfwadm -I -a deny -W eth1 -V 200.200.200.200



  4.  Configuring the VPN client



  4.1.  Configuring a MS W'95 or W'98 client


  1. Set up your routing so that the Linux firewall is your default
     gateway:


     a. Open Control Panel/Network or right-click "Network Neighborhood"
        and click on Properties.

     b. Click on the Configuration tab.

     c. In the list of installed network components, double-click on the
        "TCP/IP -> whatever-NIC-you-have" line.

     d. Click on the Gateway tab.

     e. Enter the local-network IP address of your Linux firewall.
        Delete any other gateways.

     f. Click on the "OK" button.


  2. Test masquerading. For example, run "telnet my.isp.mail.server
     smtp" and you should see the mail server's welcome banner.

  3. Install and configure the VPN software. For IPsec software follow
     the manufacturer's instructions. For MS PPTP:


     a. Open Control Panel/Network or right-click "Network Neighborhood"
        and click on Properties.


     b. Click on the Configuration tab.

     c. Click on the "Add" button, then double-click on the "Adapter"
        line.

     d. Select "Microsoft" as the manufacturer and add the "Virtual
        Private Networking Adapter" adapter.

     e. Reboot when prompted to.

     f. If you need to use strong (128-bit) encryption, download the
        strong encryption DUN update from the MS secure site at
        <http://mssecure.www.conxion.com/cgi-bin/ntitar.pl> and install
        it, then reboot again when prompted to.

     g. Create a new dial-up phonebook entry for your PPTP server.

     h. Select the VPN adapter as the device to use, and enter the PPTP
        server's internet IP address as the telephone number.

     i. Select the Server Types tab, and check the compression and
        encryption checkboxes.

     j. Click on the "TCP/IP Settings" button.

     k. Set the dynamic/static IP address information for your client as
        instructed to by your PPTP server's administrator.

     l. If you wish to have access to your local network while the PPTP
        connection is up, uncheck the "Use default gateway on remote
        network" checkbox.

     m. Reboot a few more times, just from habit... :)



  4.2.  Configuring a MS NT client


       Note: this section may be incomplete as it's been a while
       since I've installed PPTP on an NT system.



  1. Set up your routing so that the Linux firewall is your default
     gateway:


     a. Open Control Panel/Network or right-click "Network Neighborhood"
        and click on Properties.

     b. Click on the Protocols tab and double-click on the "TCP/IP"
        line.

     c. Enter the local-network IP address of your Linux firewall in the
        "Default Gateway" box.

     d. Click on the "OK" button.


  2. Test masquerading. For example, run "telnet my.isp.mail.server
     smtp" and you should see the mail server's welcome banner.

  3. Install and configure the VPN software. For IPsec software follow
     the manufacturer's instructions. For MS PPTP:

     a. Open Control Panel/Network or right-click "Network Neighborhood"
        and click on Properties.

     b. Click on the Protocols tab.

     c. Click on the "Add" button, then double-click on the "Point-to-
        Point Tunneling Protocol" line.

     d. When it asks for the number of Virtual Private Networks, enter
        the number of PPTP servers you could possibly be communicating
        with.

     e. Reboot when prompted to.

     f. If you need to use strong (128-bit) encryption, download the
        strong encryption PPTP update from the MS secure site at
        <http://mssecure.www.conxion.com/cgi-bin/ntitar.pl> and install
        it, then reboot again when prompted to.

     g. Create a new dial-up phonebook entry for your PPTP server.

     h. Select the VPN adapter as the device to use, and enter the PPTP
        server's internet IP address as the telephone number.

     i. Select the Server Types tab, and check the compression and
        encryption checkboxes.

     j. Click on the "TCP/IP Settings" button.

     k. Set the dynamic/static IP address information for your client as
        instructed to by your PPTP server's administrator.

     l. If you wish to have access to your local network while the PPTP
        connection is up, see MS Knowledge Base article Q143168 for a
        registry fix.  (Sigh.)

     m. Make sure you reapply the most recent Service Pack, to ensure
        that your RAS and PPTP libraries are up-to-date for security and
        performance enhancements.



  5.  Troubleshooting



  5.1.  Testing

  To test VPN Masquerade:


  1. Bring up your ISP connection from your Linux box and verify that it
     still works properly.

  2. Verify that regular masquerading still works properly by, for
     example, trying to browse a Web site or access an FTP server from a
     masqueraded box on your local network.

  3. PPTP: Verify that you have masquerading of the PPTP control channel
     properly configured: try to telnet from the PPTP client system to
     port 1723 on your PPTP server. Don't expect to see anything, but if
     you get a timeout or an error saying the connection failed, take a
     look at the masquerade rules on your Linux box to ensure that you
     are indeed masquerading traffic from your PPTP client to TCP port
     1723 on your PPTP server.
  4. PPTP: Attempt to establish a PPTP connection. I recommend you also
     run RASMON if it is available, as this will give you a minimal
     amount of information about the status of the connection. If you
     establish a PPTP connection on the first try, congratulations!
     You're done!

  5. IPsec: Attempt to establish an IPsec connection.



  5.2.  Possible problems

  There are several things that may prevent a VPN session from being
  established.  We'll work through them going from the client to the
  server and back again.  We will assume you're using a Windows-based
  client for the examples, as that's the most common case.


  1. Connect information: the "telephone number" in the VPN dialup
     configuration must be the Internet IP address of the VPN server, or
     the IP address of the firewall if the server is being masqueraded.

  2. PPTP and strong encryption: unless both client and server have the
     128-bit NDISWAN.SYS or W'95/'98 PPTP software, you will not be able
     to establish a strongly-encrypted session. Unfortunately in my
     experience this problem does not generate any obvious error
     messages, it just keeps trying and trying and trying... The strong
     encryption update can be obtained from the Microsoft secure site
     URL given int he "Configuring a MS Client" section.

     This may also affect IPsec clients, if they use the MS-supplied
     encryption libraries rather than using their own libraries.


  3. Routing: verify that the default route on your VPN client is
     pointing at the Linux masquerade box. Run the route print command
     and look for an 0.0.0.0 entry.

     If other masqueraded services (such as HTTP, FTP, IRC, etc.) work
     from your VPN client system then this probably is not the problem.


  4. Masquerading: there are two parts to the VPN session.

     For IPsec, the authentication and key exchange service (ISAKMP),
     which is a normal UDP session to port 500 on the remote IPsec host,
     must be configured for masquerading as you would any other UDP
     service (such as DNS).

     For PPTP, the control channel, which is a normal TCP session to
     port 1723 on the PPTP server, must be configured for masquerading
     as you would any other TCP service (such as HTTP).

     The encrypted data channel in IPsec is carried over ESP, IP
     protocol 50.  The encrypted data channel in PPTP is carried over
     GRE, IP protocol 47.  (Note that these are not TCP or UDP port
     numbers!)  Since the 2.0 Linux kernel only lets you specify TCP,
     UDP, ICMP and ALL IP protocols when creating masquerade rules, you
     must also masquerade ALL protocol traffic if you are masquerading
     only specific services. If you are masquerading everything, you
     don't need to worry about this.

     In order to isolate the firewall rules from the kernel masquerade
     code, try establishing a VPN connection with your firewall
     completely open, then if it works, tighten the firewall rules.

     2.0.x ipfwadm completely open firewall:


       ipfwadm -I -p accept
       ipfwadm -O -p accept
       ipfwadm -F -a accept -m



  2.2.x ipchains completely open firewall:


       ipchains -P input   ACCEPT
       ipchains -P output  ACCEPT
       ipchains -P forward MASQ



  Do not leave your firewall completely open for any longer than it
  takes to prove that a masqueraded VPN connection can be established!


  5. Intermediary hops and the Internet: All routers between your Linux
     firewall and the remote IPsec host must forward packets carrying IP
     protocol 50.  All routers between your Linux firewall and the PPTP
     server must forward packets carrying IP protocol 47.  If you had
     IPsec or PPTP working when your VPN client system directly dialled
     your ISP then this probably is not the problem.

     To isolate whether an intermediary hop is blocking GRE traffic, use
     a patched traceroute to trace the progress of GRE packets. See the
     resources section for information on the traceroute patch. A
     similar patch for ESP is in the works.


  6. The remote firewall: the firewall at the server end must allow a
     system with the IP address assigned to your Linux box by your ISP
     to connect to port 500/udp on the IPsec host or port 1723/tcp on
     the PPTP server. If you had the VPN working when your VPN client
     system directly dialled your ISP then this probably is not the
     problem.

  7. The server firewall and ESP: the IPsec encrypted data is carried
     over IP protocol 50. If the firewall the remote IPsec host is
     behind does not forward ESP traffic in both directions, IPsec will
     not work. Again, if you had IPsec working when your IPsec client
     system directly dialled your ISP then this probably is not the
     problem.

  8. The server firewall and GRE: the PPTP data channel is carried as a
     GRE-encapsulated (IP protocol 47) PPP session. If the firewall your
     PPTP server is behind does not forward GRE traffic in both
     directions, PPTP will not work. Again, if you had PPTP working when
     your PPTP client system directly dialed your ISP then this probably
     isn't the problem.

  9. The patch: If your IPsec client successfully authenticates you but
     cannot establish a network connection, the patch may not be
     masquerading ESP traffic properly. If your PPTP client establishes
     the control channel (RASMON beeps and the little telephone lights
     up) and sends GRE traffic (the upper light in RASMON blinks) but
     gets no GRE traffic back (the lower light in RASMON does not blink
     in response) the patch may not be masquerading GRE traffic
     properly.
     Look in /var/log/messages for log entries showing that VPN traffic
     was seen. Turning on VPN debugging may help you to determine
     whether or not the patch is at fault. Also run a sniffer on your
     internet connection and look for outbound VPN traffic (see below).


  10.
     Multiple clients: the older PPTP patch does NOT support
     masquerading of multiple PPTP clients attempting to access the same
     PPTP server. If you're trying to do this, you should take a look at
     your network design and consider whether you should set up a PPTP
     router for your local clients. The 2.0 patch incorporates Call-ID
     masquerading, which allows multiple simultaneous sessions. Note: do
     not enable PPTP Call-ID masquerade if you are masquerading a PPTP
     Server. At the current time this will prevent the server's outbound
     traffic from being masqueraded.



  5.3.  Troubleshooting

  Most problems can be localized by running a packet sniffer (e.g.
  tcpdump with the -v option) on your VPN firewall.  If everything is
  working properly, you'll see the following traffic:


  o  Client local network:

     IPsec: UDP (destination UDP port 500) and ESP (IP protocol 50)
     traffic from your IPsec client local network IP to the remote IPsec
     host's Internet IP. If you don't see this, your IPsec client is
     misconfigured.

     PPTP: TCP (destination TCP port 1723) and GRE (IP protocol 47)
     traffic from your PPTP client local network IP to the PPTP server's
     Internet IP. If you don't see this, your PPTP client is
     misconfigured.


  o  ISP side of client firewall: UDP and ESP or TCP and GRE traffic
     from the client firewall Internet IP (remember - we're
     masquerading) to the VPN server's Internet IP. If you don't see
     this, your masquerade is misconfigured or the patch isn't working.

  o  ISP side of server firewall: UDP and ESP or TCP and GRE traffic
     from the client Internet IP to the VPN server's Internet IP. If you
     don't see this, the Internet is down :) or some intermediary is
     blocking ESP or GRE traffic.

  o  Boundary network (DMZ) side of server firewall: UDP and ESP or TCP
     and GRE traffic from the client internet IP to the server IP. If
     you don't see this, check your firewall rules for forwarding UDP
     port 500 and IP protocol 50 or TCP port 1723 and IP protocol 47,
     and the configuration of ipportfw and ipfwd if you're masquerading
     the server.

  o  Boundary network side of server firewall: UDP (source port 500) and
     ESP or TCP (source port 1723) and GRE traffic from the VPN server
     IP to the client internet IP. If you don't see this, check the VPN
     server configuration, including the packet filtering rules on the
     VPN server.

  o  ISP side of server firewall: UDP and ESP or TCP and GRE traffic
     from the VPN server IP (or firewall IP if the server is
     masqueraded) to the client internet IP. If you don't see this,
     check your firewall rules for forwarding UDP port 500 and IP
     protocol 50 or TCP port 1723 and IP protocol 47.

  o  ISP side of client firewall: UDP and ESP or TCP and GRE traffic
     from the VPN server IP to the client firewall internet IP. If you
     don't see this, the Internet is acting up again.

  o  Client local network: UDP and ESP or TCP and GRE traffic from the
     VPN server internet IP to the VPN client local network IP. If you
     see the UDP traffic but not the ESP traffic, or the TCP traffic but
     not the GRE traffic, the patch isn't working or wasn't properly
     installed.


  You may find it helpful to turn on VPN debugging and recompile your
  kernel. Add the following to /etc/syslog.conf


       # debugging
       *.=debug           /var/log/debug



  and watch /var/log/messages and /var/log/debug for log messages about
  the VPN traffic. Note that logging - especially verbose logging - will
  cause a great deal of disk activity and will cause the log files to
  grow very large very quickly. Don't turn on debugging unless you need
  to, and turn it off when you're done.



  5.4.  MS PPTP Clients and domain-name issues

  Thanks to Charles Curley <ccurley@trib.com> for the following:


       If you use PPTP (Point to Point Tunneling Protocol) to
       access a Microsoft Networking (SMB) environment and have
       your own Microsoft Networking environment in your local pri-
       vate network (Samba or Windows), give your local workgroup a
       name that does not show up in the remote environment. The
       reason is that while your PPTP client is logged into the
       remote environment, it will see the remote environment's
       domain name servers, and will only see the remote computers
       in that workgroup.

       You should avoid the lazy option. Microsoft ships Windows
       set up for a default workgroup name of WORKGROUP. Some
       people will be lazy and accept that as their workgroup when
       they set up their computers. So there is a good chance that
       the remote environment will have a workgroup called
       WORKGROUP, administrators willing or not.


  I think that this will apply regardless of the VPN in use, as name
  services aren't dependent on the transport. If your client(s) can see
  the WINS servers on the remote network then you may experience this,
  PPTP or no PPTP.



  5.5.  MS PPTP Clients and Novell IPX

  If you're having trouble with IPX traffic over your PPTP link, please
  see sections 3.5 and 5.2 in this MS Knowledge Base article:
  <http://support.microsoft.com/support/kb/articles/q154/0/91.asp>

  Thanks to David Griswold <dgriswol@ix.netcom.com>



  5.6.  MS network password issues

  When you are using a VPN to access a MS network you should remember
  that you will have to provide two different authentication tokens -
  one to connect to the VPN server (the VPN password) and the other to
  access resources on the remote network once the connection is
  established (the network password).

  The VPN password - the username and password you enter into your VPN
  client when initiating the call to the VPN server - is only used by
  the VPN server to grant you permission to connect to the network via
  the VPN. It isn't used for anything else once you're connected.

  The VPN password is not used to prove your identity to other computers
  on the remote network. You must provide another username/password pair
  - your network password - for that.

  There are two ways to supply a network password. Your network password
  may be the same username/password pair you supplied when logging onto
  the local network when you started your computer up. If it is
  different, you can configure your VPN client to ask you for your
  network password for the remote network once the VPN connection is
  established.

  If you are successfully connecting to the VPN server but you cannot
  access any of the resources provided by the remote network, then you
  aren't providing a valid network username/password pair for the remote
  network.  Verify that the username and password for your local network
  will also work on the remote network, or set your VPN client to prompt
  you for a username and password for use on the remote network and "log
  on" to the remote network once the VPN connection is established.



  5.7.  If your IPsec session always dies after a certain amount of time

  If you're having trouble with your IPsec tunnel regularly dying,
  particularly if checking the system logs on the firewall shows that
  ISAKMP packets with "zero cookie" values are being seen, here's what's
  happening:

  Earlier versions of the IPsec Masq patch did not change the timeout
  for masq table entries for ISAKMP UDP packets. The masq table entries
  for the ISAKMP UDP traffic would time out fairly quickly (relative to
  the data channel) and be removed; if the remote IPsec host then
  decided to initiate rekeying before the local IPsec host did, the
  inbound ISAKMP traffic for the rekey couldn't be routed to the
  masqueraded host. The rekey traffic would be discarded, the remote
  IPsec host would think the link had failed, and the connection would
  eventually be terminated.

  The 2.0.36 patch has been modified to increase the timeout on ISAKMP
  UDP masq table entries. Get the current version of the patch,
  available via the sites given in the Resources section, and repatch
  and recompile your kernel.

  Also verify that your IPsec Masq Table Lifetime parameter is
  configured to be the same as or slightly longer than your rekey
  interval.

  6.  IPsec masquerade technical notes and special security considera-
  tions


  6.1.  Limitations and weaknesses of IPsec masquerade

  Traffic that uses the AH protocol cannot be masqueraded. The AH
  protocol incorporates a cryptographic checksum across the IP addresses
  that the masquerade gateway cannot correctly regenerate. Thus, all
  masqueraded AH traffic will be discarded as having invalid checksums.

  IPsec traffic  using transport-mode ESP also cannot be reliably
  masqueraded.  Transport mode ESP essentially encrypts everything after
  the IP header.  Since, for example, the TCP and UDP checksums include
  the IP source and destination addresses, and the TCP/UDP checksum is
  within the encrypted payload and thus cannot be recalculated after the
  masquerade gateway alters the IP addresses, the TCP/UDP header will
  fail the checksum test at the remote gateway and the packet will be
  discarded. Protocols that do not include information about the source
  or destination IP addresses may successfully use masqueraded transport
  mode.

  Apart from these limitations, IPsec masquerade is secure and reliable
  when only one IPsec host is being masqueraded at a time, or when each
  masqueraded host is communicating with a different remote host. When
  more than one masqueraded host is communicating with the same remote
  host, a few weaknesses show up:


  o  Transport-mode communications are subject to collisions.

     If two or more masqueraded hosts are using transport mode to
     communicate with the same remote host, and the security policy of
     the remote host permits multiple transport-mode sessions with the
     same peer, it is possible for sessions to experience collisions.
     This happens because the IP address of the masquerading gateway
     will be used to identify the sessions, and any other identifying
     information cannot be masqueraded because it is within the
     encrypted portion of the packet.

     If the remote host's security policy does not permit multiple
     transport-mode sessions with the same peer, the situation is even
     worse: the more-recently-negotiated transport mode session will
     likely completely take over all of the traffic from the older
     session, causing the older session to "go dead". While the
     established sessions from the older transport-mode IPsec session
     may be quickly reset if the remote host isn't expecting to receive
     the traffic, at least one packet of information will be sent to the
     wrong host. This information will probably be discarded by the
     recipient, but it will still be sent.

     Thus, a transport-mode collision may result in leaking of
     information between the two sessions or termination of one or both
     sessions. Using IPsec in transport mode via a masquerading gateway
     is not recommended if there is the possibility that other transport
     mode IPsec sessions will be attempted via the same masquerading
     gateway to the same remote IPsec host.

     IPsec using tunnel mode with extruded network addressing (where the
     masqueraded IPsec host is assigned an IP address from the remote
     host's network) is not subject to these problems, as the IP
     addresses assigned from the remote network will be used to identify
     the sessions instead of using the IP address of the masquerading
     host.


  o  ISAKMP communications are subject to cookie collisions.

     If two or more masqueraded hosts establishing a session to the same
     remote host happen to select the same initiator cookie when
     initiating ISAKMP traffic, the masquerading gateway will route all
     of the ISAKMP traffic to the second host. There is a 1 in 2^64
     (i.e. very small) chance of this collision happening for each host,
     at the time of establishing the initial ISAKMP connection.

     Correcting this requires including the responder cookie in the key
     used to route inbound ISAKMP traffic. This modification will be
     incorporated into IPsec masquerade for the 2.2.x kernel, and the
     short window between the time the masqueraded host initiates the
     ISAKMP exchange and the remote host responds is covered by
     discarding any new ISAKMP traffic that would collide with the
     current outstanding traffic. This modification will be backported
     to the 2.0.x code soon.



  o  There may be a collision between SPI values on inbound traffic.

     Two or more masqueraded IPsec hosts communicating with the same
     remote IPsec host may negotiate to use the same SPI value for
     inbound traffic. If this happens the masquerading gateway will
     route all of the inbound traffic to the first host to receive any
     inbound traffic using that SPI. The possibility of this happening
     is about 1 in 2^32 for each outstanding ESP session, and may occur
     on any rekey.

     Since the SPI values refer to different SAs having different
     encryption keys the first host will not be able to decrypt the data
     intended for the other hosts, so no data leakage will occur. There
     is no way for the masquerading gateway to detect or prevent this
     collision. The only way to prevent this collision is for the remote
     IPsec host to check the SPI value proposed by the masqueraded host
     to see if that SPI value is already in use by another SA from the
     same IP address. It is not likely that this will be done, since it
     imposes more overhead on an already expensive operation (the rekey)
     to benefit a small percentage of users in case of a relatively rare
     event.



  o  Inbound and outbound SPI values may be misassociated.

     This is discussed in detail in the next section.


  The 2.2.x code by default prevents the establishment of multiple
  connections to the same remote host. If the weaknesses exposed by
  multiple connections to the same remote host are acceptable, you can
  enable "parallel sessions".



  6.2.  Proper routing of inbound encrypted traffic

  The portion of the ISAKMP key exchange where the ESP SPI values are
  communicated is encrypted, so the ESP SPI values must be determined by
  inspection of the actual ESP traffic. Also, the outbound ESP traffic
  does not contain any indication of what the inbound SPI will be. This
  means there is no perfectly reliable way to associate inbound ESP
  traffic with outbound ESP traffic.


  IPsec masq attempts to associate inbound and outbound ESP traffic by
  serializing initial ESP traffic on a by-remote-host basis. What this
  means is:


  o  If an outbound ESP packet with an SPI value that has not previously
     been seen (or whose masquerade table entry has expired) is received
     (which shall hereafter be called an "initial packet"), a masquerade
     table entry for that SourceAddr+SPI+DestAddr combination is
     created. It is marked as "outstanding", that is, no inbound ESP
     traffic has been received for it yet. This is done by setting the
     "inbound SPI" value in the masq table entry to zero, which is a
     value reserved for uses such as this. This will happen at the
     initiation of a new ESP connection and at regular intervals when an
     existing ESP connection rekeys.


  o  As long as the masq table entry is outstanding, no other initial
     ESP packets for the same remote host will be processed. The packets
     are immediately discarded, and a system log entry is made saying
     the traffic is temporarily blocked. This also applies to initial
     traffic from the same masqueraded host going to the same remote
     host if the SPI values differ. Traffic to other remote hosts, and
     traffic where both SPI values are known ("established" traffic) is
     not affected by this.


  o  This could easily lead to a Denial of Service of the remote host,
     so this outstanding ESP masq table entry is given a short lifetime,
     and only a limited number of retries of the same traffic are
     allowed. This permits round-robin access to the remote host if
     several masqueraded hosts are attempting to initialize
     simultaneously and responses aren't coming back very quickly, for
     example due to network congestion or a slow remote host.  The retry
     limitation begins once there is a collision, so the masqueraded
     IPsec host can wait as long as necessary for a reply until there's
     a need for serialization.


  o  When an ESP packet from the outstanding remote host is received and
     the SPI value does not appear in any masq table entry, it is
     assumed that the packet is the response to the outstanding initial
     packet. The SPI value is stored in that masq table entry, thus
     associating the SPI values, and the inbound ESP traffic is routed
     to the masqueraded host. At this point another initial packet for
     the remote server may be processed.


  o  Any ESP traffic with a zero SPI value is discarded as invalid, per
     the RFC requirements.


  There are several ways this can fail to associate traffic properly:


  o  Network delays or a slow remote host can cause the response to the
     first initial packet to be delayed long enough that the init masq
     table entry expires and a different masqueraded host is given a
     chance to initialize. This could cause the response to be
     associated with the wrong outbound SPI, which would cause inbound
     traffic to be routed to the wrong masqueraded host. If this happens
     the masqueraded host receiving the traffic in error will discard it
     because it has an unexpected SPI value, and everybody will
     eventually time out, rekey and try again. This can be addressed by
     editing /usr/src/linux/net/ipv4/ip_masq.c and increasing the INIT
     lifetime or the number of INIT retries permitted, at the cost of
     increasing the blocking (and DoS) window.


  o  Sessions idle or semi-idle (with infrequent inbound traffic and no
     outbound traffic) for a long period of time may be idle long enough
     for the masq table entry to expire. If the remote host sends
     traffic to an established yet expired session while an outstanding
     init to the same remote host is underway, the traffic may be
     misrouted for the same reason as described above. This can be
     addressed by making sure the IPsec Masq Table Lifetime kernel
     configuration parameter is slightly longer than the rekey interval,
     which is the longest time any given SPI pair will be used.  The
     problem here is that you may not know all of the rekey intervals if
     you're masquerading for many remote servers, or some may have their
     rekey intervals set to unreasonably high values, such as several
     hours.


  o  If there is a delay between a rekey and the transmission of
     outbound ESP traffic using the new SPI, and during this delay
     inbound ESP traffic using the new SPI is received, there will be no
     masq table entry describing how to route the inbound traffic. If
     another masqueraded host has a pending init with the same remote
     host, the traffic will be misassociated. Note that serialization of
     ESP initial traffic does not affect ISAKMP rekey traffic.

  The best solution is to have some way to preload the masq table with
  the properly associated out-SPI/in-SPI pair or some other mapping of
  remote_host + inbound_SPI to masqueraded_host. This cannot be done by
  inspecting the ISAKMP key exchange, as it is encrypted. It may be
  possible to use RSIP (a.k.a. Host-NAT) to communicate with the
  masqueraded IPsec host and request notification of SPI information
  once it has been negotiated. This is being investigated. If something
  is done to implement this it will be done no sooner than the 2.3.x
  series, as RSIP is a fairly complex client/server NAT protocol.

  When an inbound ESP packet with a new SPI is received the masquerading
  firewall attempts to guess which masqueraded host(s) the unassociated
  inbound traffic is intended for. If the inbound ESP traffic is not
  matched to an established session or a pending session initialization,
  then the packet is sent to the masqueraded host(s) who most recently
  rekeyed with that remote host. The "incorrect" masqueraded hosts will
  discard the traffic as being improperly encrypted, and the "correct"
  host will get its data. When the "correct" host responds, the normal
  ESP init serialization process occurs.



  Vim Color Editor HOW-TO (Vi Improved with syntax color high
  lighting)
  Al Dev (Alavoor Vasudevan)        alavoor@yahoo.com
  v12.0, 10 July 2000

  This document is a guide to quickly setting up the Vim color editor on
  Linux or Unix systems. The information here will improve the produc
  tivity of programmers because the Vim editor supports syntax color
  highlighting and bold fonts, improving the "readability" of program
  code. A programmer's productivity improves 2 to 3 times with a color
  editor like Vim.  The information in this document applies to all
  operating sytems where Vim works, such as Linux, Windows 95/NT, Apple
  Mac, IBM OSes, VMS, BeOS and all flavors of Unix like Solaris, HPUX,
  AIX, SCO, Sinix, BSD, Ultrix etc.. (it means almost all operating sys
  tems on this planet!)
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Before you Install
     1.2 Install Vim on Redhat Linux
     1.3 Install Vim on GNU Debian Linux
     1.4 Install Vim on Unixes
     1.5 Install Vim on Microsoft Windows 95/NT
     1.6 Install Vim on VMS
        1.6.1 Download files
        1.6.2 Compiling
        1.6.3 Deploy
        1.6.4 Practical usage
        1.6.5 GUI mode questions
     1.7 Install Vim on OS/2
     1.8 Install Vim on Apple Macintosh

  2. Setup gvim init files

     2.1 Sample gvimrc file
     2.2 Xdefaults parameters

  3. Color Syntax init files

  4. VIM Usage

  5. Vi companions

     5.1 Ctags for ESQL
     5.2 Ctags for JavaScript programs, Korn, Bourne shells
     5.3 Debugger gdb

  6. Online VIM help

  7. Vim Home page and Vim links

  8. Vim Tutorial

     8.1 Vim Hands-on Tutorial
     8.2 Vi Tutorials on Internet

  9. Vi Tutorial

     9.1 Cursor Movement Commands
     9.2 Repeat Counts
     9.3 Deleting Text
     9.4 Changing Text
     9.5 Yanking (Copying) Text
     9.6 Filtering text
     9.7 Marking Lines and Characters
     9.8 Naming Buffers
     9.9 Substitutions
     9.10 Miscellaneous "Colon Commands"
     9.11 Setting Options
     9.12 Key Mappings
     9.13 Editing Multiple Files
     9.14 Final Remarks

  10. Vim Reference Card

     10.1 Vi states
     10.2 Shell Commands
     10.3 Setting Options
     10.4 Notations used
     10.5 Interrupting, cancelling
     10.6 File Manipulation
     10.7 Movement
     10.8 Line Positioning
     10.9 Character positioning
     10.10 Words, sentences, paragraphs
     10.11 Marking and returning
     10.12 Corrections during insert
     10.13 Adjusting the screen
     10.14 Delete
     10.15 Insert, change
     10.16 Copy and Paste
     10.17 Operators (use double to affect lines)
     10.18 Search and replace
     10.19 General
     10.20 Line Editor Commands
     10.21 Other commands

  11. Related URLs

  12. Other Formats of this Document

  13. Copyright Notice



  ______________________________________________________________________

  1.  Introduction

  Vim stands for 'Vi Improved'. Vi is the most popular and powerful
  editors in the Unix world. Vi is an abbreviation for "Visual" editor.
  One of the first editors was a line editor called 'ed' (and 'ex'). The
  Visual editor like Vi was a vast improvement over line editors like
  'ed' (or 'ex'). The editors 'ed' and 'ex' are still available on
  Linux: see 'man ed' and 'man ex'.

  A good editor improves programmer productivity. Vim supports color
  syntax highlighting of program code and also emphasises text using
  different fonts like normal, bold or italics. A color editor like Vim
  can improve the productivity of programmers by 2 to 3 times!!
  Programmers can read the code much more rapidly as the code syntax is
  colored and highlighted.

  1.1.  Before you Install

  Before you install Vim, please refer to the OS specific release notes
  and information about compiling and usage of Vim at -

    Go to this location and look for files os_*.txt
     <http://cvs.vim.org/cgi-bin/cvsweb/vim/runtime/doc>

     If you do not have the Vim package (RPM, DEB, tar, zip) then
     download the Vim source code by ftp from the official Vim site

    The home page of vim is at  <http://www.vim.org>

    Mirror site in US is at  <http://www.us.vim.org>

    Ftp site  <ftp://ftp.vim.org/pub/vim>

    Or use one of the mirrors  <ftp://ftp.vim.org/pub/vim/MIRRORS>

  1.2.  Install Vim on Redhat Linux

  To use Vim install the following RPM packages on Redhat Linux -



  ______________________________________________________________________
          rpm -i vim*.rpm
  OR do this -
          rpm -i vim-enhanced*.rpm
          rpm -i vim-X11*.rpm
          rpm -i vim-common*.rpm
          rpm -i vim-minimal*.rpm
  ______________________________________________________________________


  You can see the list of files the vim rpm installs by -

  ______________________________________________________________________
          rpm -qa | grep ^vim | xargs rpm -ql | less
  or
          rpm -qa | grep ^vim | awk '{print "rpm -ql " $1 }' | /bin/sh | less
  ______________________________________________________________________


  and browse output using j,k, CTRL+f, CTRL+D, CTRL+B, CTRL+U or using
  arrow keys, page up/down keys.  See 'man less'.

  Note that the RPM packages for Redhat Linux use a Motif interface. If
  you have installed the GTK libraries on your system, consider
  compiling Vim from the source code for a clean GUI interface. For
  information on compiling Vim from the source code, see "Install Vim on
  Unixes", below.


  1.3.  Install Vim on GNU Debian Linux

  To install Vim on Debian Linux (GNU Linux), login as root and when
  connected to internet type -

  ______________________________________________________________________
  apt-get install vim vim-rt
  ______________________________________________________________________


  It will download the latest version of vim, install it, configure it,
  and erase the .deb file it downloaded. The first package listed is
  vim, the standard editor, compiled with X11 support, vim-rt is the vim
  runtime, it holds all the syntax and help files.


  1.4.  Install Vim on Unixes

  For other flavors of unixes like Solaris, HPUX, AIX, Sinix, SCO
  download the source code file ( see ``'' )

  ______________________________________________________________________

          zcat vim.tar.gz | tar -xvf -
          cd vim-5.5/src
          ./configure --enable-gui=motif
          make
          make install
  ______________________________________________________________________



  1.5.  Install Vim on Microsoft Windows 95/NT

  For Windows 95/NT, download the Vim zip file. For Windows 95/NT you
  must download TWO zip files -
    Runtime support file vim*rt.zip

    Vim command file vim*56.zip. Where Vim version is 5.6.

  Get these two zip files ( see ``'' ) Unpack the zip files using the
  Winzip  <http://www.winzip.com>.  Both the zip files (vim*rt.zip and
  vim*56.zip) must be unpacked in the same directory like say c:\vim.

  For Windows 95/98, set the environment variable VIM in autoexec.bat by
  adding this line -

  ______________________________________________________________________
  set VIM=c:\vim\vim56
  ______________________________________________________________________


  For Windows NT, add the environment variable VIM to the Control Panel
  | System | Environment | System Properties dialog:

  ______________________________________________________________________
  VIM=c:\vim\vim56
  ______________________________________________________________________



  The VIM variable should point to whereever you installed the vim56
  directory.  You can also set your PATH to include the gvim.exe's path.

  You may need to logoff and relogin to set your environment. At an MS-
  DOS prompt type -

  ______________________________________________________________________
          set vim
  ______________________________________________________________________


  And you should see - VIM=c:\vim\vim56

  Create a short-cut on to your desktop by click-and-drag from
  c:\vim\vim56\gvim.exe. Copy the gvimrc_example file to the
  $VIM\_gvimrc. In my case it is c:\vim\vim56\_gvimrc.

  1.6.  Install Vim on VMS


  1.6.1.  Download files

  You will need both the Unix and Extra archives to build vim.exe for
  VMS.  For using Vim's full power you will need the runtime files as
  well.  Get these files ( see ``'' )

  You can download precompiled executables from:
  <http://www.polarfox.com/vim>

  VMS vim authors are -

     zoltan.arpadffy@essnet.se

     arpadffy@altavista.net

     cec@gryphon.gsfc.nasa.gov

     BNHunsaker@chq.byu.edu

     sandor.kopanyi@altavista.net

  1.6.2.  Compiling

  Unpack the Unix and Extra archives together into one directory.  In
  the <.SRC> subdirectory you should find the make file OS_VMS.MMS.  By
  editing this file you may choose between building the character, GUI
  and debug version. There are also additional options for Perl, Python
  and Tcl support.

  You will need either the DECSET mms utility or the freely available
  clone of it called mmk (VMS has no make utility in the standard
  distribution). You can download mmk from
  http://www.openvms.digital.com/freeware/MMK/

  If you have MSS on your system, the command

  >       mms /descrip=os_vms.mms

  will start building your own customised version of Vim.  The
  equivalent command for mmk is:

  >       mmk /descrip=os_vms.mms

  1.6.3.  Deploy

  Vim uses a special directory structure to hold the document and
  runtime files:


  ______________________________________________________________________
     vim (or wherever)
      |- tmp
      |- vim55
      |----- doc
      |----- syntax
      |- vim56
      |----- doc
      |----- syntax
      vimrc    (system rc files)
      gvimrc

  Use:

  >       define/nolog device:[leading-path-here.vim]       vim
  >       define/nolog device:[leading-path-here.vim.vim56] vimruntime
  >       define/nolog device:[leading-path-here.tmp]       tmp
  ______________________________________________________________________



  to get vim.exe to find its document, filetype, and syntax files, and
  to specify a directory where temporary files will be located. Copy the
  "runtime" subdirectory of the vim distribution to vimruntime.

  Note: Logicals $VIMRUNTIME and $TMP are optional. Read more at :help
  runtime

  1.6.4.  Practical usage

  Usually you want to run just one version of Vim on your system,
  therefore it is enough to dedicate one directory for Vim.  Copy all
  Vim runtime directory structure to the deployment position.  Add the
  following lines to your LOGIN.COM (in SYS$LOGIN directory).  Set up
  logical $VIM as:



  ______________________________________________________________________
  >       $ define VIM device: <path>
  ______________________________________________________________________



  Set up some symbols:


  ______________________________________________________________________
  >       $ ! vi starts Vim in chr. mode.
  >       $ vi*m  :== mcr device:<path>VIM.EXE

  >       $ !gvi starts Vim in GUI mode.
  >       $ gv*im :== spawn/nowait mcr device:<path>VIM.EXE -g
  ______________________________________________________________________



  Create .vimrc and .gvimrc files in your home directory (SYS$LOGIN).

  The easiest way is just rename example files. You may leave the menu
  file (MENU.VIM) and files vimrc and gvimrc in the original $VIM
  directory. It will be default setup for all users, and for users is
  enough just to have their own additions or resetting in home directory
  in files .vimrc and .gvimrc.  It should work without problems.

  Note: Remember, system rc files (default for all users) do not have
  the leading "." So, system rc files are:


  ______________________________________________________________________
  >       VIM$:vimrc
  >       VIM$:gvimrc
  >       VIM$:menu.vim
  ______________________________________________________________________


  and user's customised rc files are:

  ______________________________________________________________________
  >       sys$login:.vimrc
  >       sys$login:.gvimrc
  ______________________________________________________________________



  You can check that everything is on the right place with the :version
  command.


  ______________________________________________________________________
  Example LOGIN.COM:

  >       $ define/nolog VIM RF10:[UTIL.VIM]
  >       $ vi*m  :== mcr VIM:VIM.EXE
  >       $ gv*im :== spawn/nowait mcr VIM:VIM.EXE -g
  >       $ set disp/create/node=192.168.5.223/trans=tcpip
  ______________________________________________________________________



  Note: This set-up should be enough if you are working in a standalone
  server or clustered environment, but if you want to use Vim as an
  internode editor, it should suffice. You just have to define the
  "whole" path:
  ______________________________________________________________________
  >       $ define VIM "<server_name>[""user password""]::device:<path>"
  >       $ vi*m :== "mcr VIM:VIM.EXE"
  ______________________________________________________________________



  as for example:


  ______________________________________________________________________
  >       $ define VIM "PLUTO::RF10:[UTIL.VIM]"
  >       $ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required
  ______________________________________________________________________



  You can also use $VIMRUNTIME logical to point to proper version of Vim
  if you have multiple versions installed at the same time. If
  $VIMRUNTIME is not defined Vim will borrow value from $VIM logical.
  You can find more information about $VIMRUNTIME logical by typing
  :help runtime as a Vim command.

  1.6.5.  GUI mode questions

  VMS is not a native X window environment, so you can not start Vim in
  GUI mode "just like that". But it is not too complicated to get a
  running Vim.


  ______________________________________________________________________
  1) If you are working on the VMS X console:
     Start Vim with the command:

  >       $ mc device:<path>VIM.EXE -g

     or type :gui as a command to the Vim command prompt. For more info :help gui

  2) If you are working on other X window environment as Unix or some remote X
     VMS console. Set up display to your host with:

  >       $ set disp/create/node=<your IP address>/trans=<transport-name>

     and start Vim as in point 1. You can find more help in VMS documentation or
     type: help set disp in VMS prompt.
     Examples:

  >       $ set disp/create/node=192.168.5.159             ! default trans is DECnet
  >       $ set disp/create/node=192.168.5.159/trans=tcpip ! TCP/IP network
  >       $ set disp/create/node=192.168.5.159/trans=local ! display on the same node
  ______________________________________________________________________



  Note: you should define just one of these.  For more information type
  $help set disp in VMS prompt.

  1.7.  Install Vim on OS/2

  Read the release notes for Vim on OS/2, see ``'' .

  At present there is no native PM version of the GUI version of vim:
  The OS/2 version is a console application.  However, there is now a
  Win32s-compatible GUI version, which should be usable by owners of
  Warp 4 (which supports Win32s) in a Win-OS/2 session.  The notes in
  this file refer to the native console version.
  To run Vim, you need the emx runtime environment (at least rev. 0.9b).
  This is generally available as (ask Archie about it):

  ______________________________________________________________________
      emxrt.zip     emx runtime package
  ______________________________________________________________________



  1.8.  Install Vim on Apple Macintosh

  Read the release notes for Vim on OS/2, see ``'' .

  The author of Vim on Mac is

  ______________________________________________________________________
  Eric Fischer
  5759 N. Guilford Ave
  Indianapolis IN 46220 USA
  ______________________________________________________________________


  Email to enf1@midway.uchicago.edu or to eric@jcp.uchicago.edu or  to
  etaoin@uchicago.edu

  Mac Bug Report When reporting any Mac specific bug or feature change,
  makes sure to include the following address in the "To:" or "Copy To:"
  field.

  dany.stamant@sympatico.ca

  Vim compiles out of the box with the supplied CodeWarrior project when
  using CodeWarrior 9. If you are using a more recent version (e. g. CW
  Pro) you have to convert the project first.  When compiling Vim for
  68k Macs you have to open the "size" resource in ResEdit and enable
  the "High level events aware" button to get drag and drop working.
  You have to increase the memory partition to at least 1024 kBytes to
  prevent Vim from crashing due to low memory.

  ______________________________________________________________________
   vim:ts=8:sw=8:tw=78:
  ______________________________________________________________________



  2.  Setup gvim init files

  To enable the syntax color highlighting you MUST copy the gvimrc file
  to your home directory. This will also put the "Syntax" Menu with gvim
  command.  You can click on Syntax Menu and select appropriate
  languages like C++, Perl, Java, SQL, ESQL etc..

  ______________________________________________________________________
  cd $HOME
  cp /usr/doc/vim-common-5.3/gvimrc_example  ~/.gvimrc
  ______________________________________________________________________


  Comment lines in .gvimrc begin with double-quotes (").  You can cus
  tomize gvim by editing the file $HOME/.gvimrc and put the following
  lines -



  ______________________________________________________________________
  " This line is a comment .... one which begins with double-quotes
  " The best is the bold font, try all of these and pick one....
  set guifont=8x13bold
  "set guifont=9x15bold
  "set guifont=7x14bold
  "set guifont=7x13bold
  "
  " Highly recommended to set tab keys to 4 spaces
  set tabstop=4
  set shiftwidth=4
  "
  " The opposite is 'set wrapscan' while searching for strings....
  set nowrapscan
  "
  " The opposite is set noignorecase
  set ignorecase
  ______________________________________________________________________


  It is very  strongly recommended that you set the tabstop to 4 and
  shiftwidth to 4.  The tabstop is the number of spaces the TAB key will
  indent while editing with gvim. The shiftwidth is the number of spaces
  the lines will be shifted with ">>" or "<<"  vi commands. Refer to Vi
  tutorials ``'' for more details.

  To see the list of available fonts on Linux/Unix see the command
  xlsfonts. Type -

  ______________________________________________________________________
          bash$ xlsfonts | less
          bash$ xlsfonts | grep -i bold | grep x
          bash$ man xlsfonts
  ______________________________________________________________________



  2.1.  Sample gvimrc file

  You can change the settings like color, bold/normal fonts in your
  $HOME/.gvimrc file.  It is very strongly recommended that you set the
  background color to lightyellow or white with black foreground.
  Ergonomics says that best background color is lightyellow or white
  with black foreground. Hence change the variable 'guibg' in your
  $HOME/.gvimrc file as follows:

  ______________________________________________________________________
          highlight Normal guibg=lightyellow
  ______________________________________________________________________



  The sample gvimrc from /usr/doc/vim-common-5.3/gvimrc_example is as
  follows:



  ______________________________________________________________________
  " Vim
  " An example for a gvimrc file.
  " The commands in this are executed when the GUI is started.
  "
  " To use it, copy it to
  "     for Unix and OS/2:  ~/.gvimrc
  "             for Amiga:  s:.gvimrc
  "  for MS-DOS and Win32:  $VIM\_gvimrc

  " Make external commands work through a pipe instead of a pseudo-tty
  "set noguipty

  " set the X11 font to use. See 'man xlsfonts' on unix/linux
  " set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1
  set guifont=8x13bold
  "set guifont=9x15bold
  "set guifont=7x14bold
  "set guifont=7x13bold
  "
  " Highly recommended to set tab keys to 4 spaces
  set tabstop=4
  set shiftwidth=4
  "
  " The opposite is 'set wrapscan' while searching for strings....
  set nowrapscan
  "
  " The opposite is set noignorecase
  set ignorecase

  " Make command line two lines high
  set ch=2

  " Make shift-insert work like in Xterm
  map <S-Insert> <MiddleMouse>
  map! <S-Insert> <MiddleMouse>

  " Only do this for Vim version 5.0 and later.
  if version >= 500

    " I like highlighting strings inside C comments
    let c_comment_strings=1

    " Switch on syntax highlighting.
    syntax on

    " Switch on search pattern highlighting.
    set hlsearch

    " For Win32 version, have "K" lookup the keyword in a help file
    "if has("win32")
    "  let winhelpfile='windows.hlp'
    "  map K :execute "!start winhlp32 -k <cword> " . winhelpfile <CR>
    "endif

    " Hide the mouse pointer while typing
    set mousehide

    " Set nice colors
    " background for normal text is light grey
    " Text below the last line is darker grey
    " Cursor is green
    " Constants are not underlined but have a slightly lighter background
    highlight Normal guibg=grey90
    highlight Cursor guibg=Green guifg=NONE
    highlight NonText guibg=grey80
    highlight Constant gui=NONE guibg=grey95
    highlight Special gui=NONE guibg=grey95

  endif
  ______________________________________________________________________


  See also sample vimrc used for console mode vim command from
  /usr/doc/vim-common-5.3/vimrc_example.

  2.2.  Xdefaults parameters

  You can set some of the Vim properties in Xdefaults file.

   WARNING: Do not set Vim*geometry as it will break the gvim menu, use
  Vim.geometry instead.

  Edit the $HOME/.Xdefaults file and add the following lines:

  ______________________________________________________________________
  ! GVim great Colors.
  Vim*useSchemes:         all
  Vim*sgiMode:            true
  Vim*useEnhancedFSB:     true
  Vim.foreground:         Black
  !Vim.background:        lightyellow2
  Vim*background:         white
  ! Do NOT use Vim*geometry , this will break the menus instead
  ! use Vim.geometry. Asterisk between Vim and geometry is not allowed.
  ! Vim.geometry: widthxheight
  Vim.geometry:           88x40
  !Vim*font:              -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-15-*5
  Vim*menuBackground: yellow
  Vim*menuForeground: black
  ______________________________________________________________________


  In order for this change to take effect, type -

  ______________________________________________________________________
          xrdb -merge $HOME/.Xdefaults
          man xrdb
  ______________________________________________________________________



  You can also edit the ~/.gvimrc file to change the background colors

  ______________________________________________________________________
          gvim $HOME/.gvimrc
  The best background color is lightyellow or white, with black foreground.
          highlight Normal guibg=lightyellow
  ______________________________________________________________________



  3.  Color Syntax init files

  Instead of using "Syntax" menu you can also manually source in the
  syntax file. Edit the file with gvim and at : (colon) command give
  'so' command. For example -



  ______________________________________________________________________
          gvim foo.pc
          :so $VIM/syntax/esqlc.vim
  ______________________________________________________________________


  The syntax source files are at /usr/share/vim/syntax/*.vim. Vim sup
  ports more than 120 different syntax files for different languages
  like C++, PERL, VHDL, JavaScript,...and so on!!

  Each syntax file supports one or more default file name extensions,
  for example, JavaScript syntax file supports the *.js extension. If
  you happen to use an extension that conflicts with another default
  syntax file (such as adding JavaScript to a *.html file) than you can
  source in the additional syntax file with the command :so
  $VIM/syntax/javascript.vim.  To avoid all of this typing, you can
  create a soft link like -

  ______________________________________________________________________
          ln -s $VIM/syntax/javascript.vim js
          gvim foo.html  (... this file contains javascript functions and HTML)
          :so js
  ______________________________________________________________________



  4.  VIM Usage

  You can use Vim in two modes - one with GUI and other without GUI.  To
  use GUI use command -

  ______________________________________________________________________
          gvim foo.cpp
  ______________________________________________________________________


  To use non-gui mode give -

  ______________________________________________________________________
          vim foo.cpp
  OR plain vanilla mode
          vi foo.cpp
  ______________________________________________________________________


  It is very strongly recommended that you always use gvim instead of
  vim, since GUI mode with colors will definitely improve your produc
  tivity.

  GUI mode gvim provides the following -

    You can mark the text using the mouse to do cut, copy and paste.

    You can use the Menu bar which has - File, Edit, Window, Tools,
     Synatx and Help buttons.

    Also in near future in gvim - a second menu bar will display the
     list of files being edited, and you can switch files by clicking on
     the filenames, until then you can use vi commands - :e#, :e#1,
     :e#2, :e#3, :e#4, ....so on to select the files.

  5.  Vi companions

  Generally Vim is used in conjunction with other powerful tools like
  ctags and gdb. ctags is for very rapid navigation through millions of
  lines of "C/C++" code and gdb is for debugging the "C/C++" code.  A
  brief introduction of these two indispensable commands will be given
  in this chapter.

  ctags is the most powerful command available for coding C, C++, Java,
  Perl, Korn/Bourne shell scripts or Fortran. Developers very
  extensively use ctags to navigate through thousands of functions
  within C/C++ programs. See 'man ctags' on Unix.  It is very important
  that you learn how to use ctags to develop programs in C or C++, Java,
  etc.. Navigation is the single most important task while doing
  development of C or C++ code. Using ctags you can very quickly read
  the code by jumping from a calling line to the called function, drill
  down deeper into nested function calls, and unwind back all the way up
  to the top. You can go back and forth from function to function very
  quickly.

  Without NAVIGATION you will be completely lost! ctags is like the
  magnetic COMPASS needle for the programmers.

  Usage of ctags :

  ______________________________________________________________________
          ctags *.cpp
          gvim -t foo_function
          gvim -t main
  ______________________________________________________________________


  This will edit the C++ program file which contains the function
  foo_function() and will automatically place the cursor on the first
  line of the function foo_function(). The second command takes you to
  the line with the main() function definition.

  Inside the Vim editor, you can jump to a function by typing : (colon)
  tag < function name >as below -

  ______________________________________________________________________
          :tag sample_function
  ______________________________________________________________________


  This will place the cursor on first line of sample_function()

  If you want to jump into the function from a line in file which
  contains the function name, place the cursor just before the function
  name and press CTRL+] (press control key and left-square-bracket key
  simultaneously).

  ______________________________________________________________________
                  // example code
                  switch(id_number) {
                          Case 1:
                                  if ( foo_function( 22, "abcef") == 3 )
                                      ^
                                      |
                                      |
                                      |
                    Place the cursor here (just before foo_function) and press CTRL+]
                    This takes you to the function named "foo_function".
                    To come back to this line press CTRL+t
  ______________________________________________________________________


  To go back to the calling line press CTRL+t (Control key and letter
  't' together). Keep pressing CTRL+t to unwind and go to the first line
  where you started the navigation. That is you can keep pressing CTRL+]
  and then keep pressing CTRL+t to go back. You can repeat these as many
  times as you want to have complete navigation through all the func
  tions of C or C++.

  5.1.  Ctags for ESQL

  Since ctags does not directly support the Embedded SQL/C (ESQL)
  language, the following shell script can be used to create tags for
  esql. ESQL/C is database SQL commands embedded inside the "C"
  programs.  Oracle's ESQL/C is called Pro*C and Sybase, Informix have
  ESQL/C and PostgreSQL has product "ecpg".

  Save this file as "sqltags.sh" and do chmod a+rx tags_gen.sh.



  ______________________________________________________________________
  #!/bin/sh

  # Program to create ctags for ESQL, C++ and C files
  ESQL_EXTN=pc
  tag_file1=tags_file.1
  tag_file2=tags_file.2

  which_tag=ctags

  rm -f $tag_file1 $tag_file2 tags

  aa=`ls *.$ESQL_EXTN`
  #echo $aa
  for ii in $aa
  do
          #echo $ii
          jj=`echo $ii | cut -d'.' -f1`
          #echo $jj

          if [ ! -f $jj.cpp ]; then
                  echo " "
                  echo " "
                  echo "***********************************************"
                  echo "ESQL *.cpp files does not exist.. "
                  echo "You must generate the *.cpp from *.pc file"
                  echo "using the Oracle Pro*C pre-compiler or Sybase"
                  echo "or Informix esql/c pre-compiler."
                  echo "And then re-run this command"
                  echo "***********************************************"
                  echo " "
                  exit
          fi

          rm -f tags
          $which_tag $jj.cpp
          kk=s/$jj\.cpp/$jj\.pc/g

          #echo $kk > sed.tmp
          #sed -f sed.tmp tags >> $tag_file1

          #sed -e's/sample\.cpp/sample\.pc/g' tags >> $tag_file1
          sed -e $kk tags >> $tag_file1
  done

  # Now handle all the C++/C files - exclude the ESQL *.cpp files
  rm -f tags $tag_file2
  bb=`ls *.cpp *.c`
  aa=`ls *.$ESQL_EXTN`
  for mm in $bb
  do
          ee=`echo $mm | cut -d'.' -f1`
          file_type="NOT_ESQL"
          # Exclude the ESQL *.cpp and *.c files
          for nn in $aa
          do
                  dd=`echo $nn | cut -d'.' -f1`
                  if [ "$dd" = "$ee" ]; then
                          file_type="ESQL"
                          break
                  fi
          done

          if [ "$file_type" = "ESQL" ]; then
                  continue
          fi
          rm -f tags
          $which_tag $mm
          cat tags >> $tag_file2
  done

  mv -f $tag_file2 tags
  cat  $tag_file1 >> tags
  rm -f $tag_file1

  # Must sort tags file for it work properly ....
  sort tags > $tag_file1
  mv $tag_file1 tags
  ______________________________________________________________________



  5.2.  Ctags for JavaScript programs, Korn, Bourne shells

  The shell script given below can be used to generate tags for a very
  large variety of programs written in JavaScript, PHP/FI scripts, Korn
  shell, C shell, Bourne shell and many others. This is a very generic
  module.

  Save this file as tags_gen.sh and do chmod a+rx tags_gen.sh.



  ______________________________________________________________________
  #!/bin/sh

  tmp_tag=tags_file
  tmp_tag2=tags_file2

  echo " "
  echo " "
  echo " "
  echo " "
  echo " "
  echo "Generate tags for ...."
  while :
  do
          echo "    Enter file extension for which you want to generate tags."
          echo -n "    File-extension should be like sh, js, ksh, etc... : "
          read ans

          if [ "$ans" == "" ]; then
                  echo " "
                  echo "Wrong entry. Try again!"
          else
                  break
          fi
  done

  \rm -f $tmp_tag

  aa=`ls *.$ans`

  for ii in $aa
  do
          jj=`echo $ii | cut -d'.' -f1`
          #echo $jj
          cp $ii $jj.c
          ctags $jj.c
          echo "s/$jj.c/$ii/g" > $tmp_tag2
          sed -f $tmp_tag2 tags >> $tmp_tag
          \rm -f tags $jj.c
  done

  sort $tmp_tag > tags

  \rm -f $tmp_tag $tmp_tag2
  ______________________________________________________________________



  5.3.  Debugger gdb

  You would be using gdb extensively along with Vi.  Debugging is the
  most important aspect of programming as the major cost of software
  projects goes into debugging and testing.

  To debug C++/C programs use 'gdb' tool. See 'man gdb'.  You must
  compile your programs with -g3 option like


               gcc -g3 foo.c foo_another.c sample.c



  To set up easy aliases do -


    Setup an alias in your ~/.bash_profile
          alias gdb='gdb -directory=/home/src -directory=/usr/myname/src '
    Give -
          gdb foo.cpp
          gdb> dir /hom2/another_src
          This will add to file search path
          gdb> break 'some_class::func<TAB><TAB>
    This will complete the function name saving you typing time... and will output like -
          gdb> break 'some_class::function_foo_some_where(int aa, float bb)'



  Pressing TAB key twice is the command line completion, which will save
  you lots of typing time. This is one of the most important technique
  of using gdb.

  To get online help do -


               gdb> help
         Gives online help
               gdb> help breakpoints
         Gives more details about breakpoints.



  To set breakpoints and do debugging


               unixprompt> gdb exe_filename
               gdb> b main
         This will put breakpoint in main() function
               gdb> b 123
         This will put breakpoint in line 123 of the current file
               gdb> help breakpoints
         Gives more details about breakpoints.



  To analyze the core dumps do


               unixprompt> gdb exe_filename  core
               gdb> bt
         Gives backtrace of functions and line numbers where the program failed
               gdb> help backtrace
         Gives more details about backtrace.



  You can also use GUI version of gdb called xxgdb.

  Memory leak tools -

    Freeware Electric Fence on linux cd,

    Commercial tools Purify  <http://www.rational.com>

    Insure++  <http://www.insure.com>



  6.  Online VIM help

  See the online man pages. At unix shell prompt type 'man vim' and 'man
  gvim'.

  Or inside the gvim session type :help to get the help page. See also
  ``''



                               VIM - main help file

             Move around:  Use the cursor keys, or "h" to go left,
                           "j" to go down, "k" to go up, "l" to go right.
                           ":1" takes you to 1st line of page
                           ":n" takes you to nth line of page
                           "<SHIFT>g" takes you to bottom of page
                           ":/someword/ will search for "someword" in doc

       Close this window:  Use ":q<Enter>".

       Jump to a subject:  Position the cursor on a tag between |bars| and hit CTRL-].

          With the mouse:  ":set mouse=a" to enable the mouse (in xterm or GUI).
                           Double-click the left mouse button on a tag between |bars|.

               jump back:  Type CTRL-T or CTRL-O.

       Get specific help:  It is possible to go directly to whatever you want help
                           on, by giving an argument to the ":help" command |:help|.
                           It is possible to further specify the context:
                                 WHAT                  PREPEND    EXAMPLE      ~
                             Normal mode commands     (nothing)   :help x
                             Visual mode commands        v_       :help v_u
                             Insert mode commands        i_       :help i_<Esc>
                             command-line commands       :        :help :quit
                             command-line editing        c_       :help c_<Del>
                             Vim command arguments       -        :help -r
                             options                     '        :help 'textwidth'

       list of documentation files:

       |howto.txt|     how to do the most common things
       |intro.txt|     introduction to Vim
       |index.txt|     alphabetical index for each mode
       |autocmd.txt|   automatically executing commands on an event
       |change.txt|    delete and replace text



  7.  Vim Home page and Vim links

  The home page of vim is at  <http://www.vim.org> and mirror site in US
  is at  <http://www.us.vim.org>

  Vim FAQ is at  <http://www.grafnetix.com/~laurent/vim/faq.html> and at
  <http://www.vim.org/faq>

  Eli's Vim Page at  <http://www.netusa.net/~eli/src/vim.html>

  The Vi Lovers Home Page  <http://www.cs.vu.nl/~tmgil/vi.html>

  Vim Reference Guide at  <http://scisun.sci.ccny.cuny.edu/~olrcc/vim/>


  Vim mailing list at
  <http://www.findmail.com/listsaver/vimannounce.html> and
  <http://www.vim.org/mail.html>

  Mailing list archives are kept at:

    <http://www.egroups.com/group/vim>

    <http://www.egroups.com/group/vimdev>

    <http://www.egroups.com/group/vimannounce>

  Vim macros  <http://www.grafnetix.com/~laurent/vim/macros.html>

  8.  Vim Tutorial


  8.1.  Vim Hands-on Tutorial

  On Linux system see the tutorial at /usr/doc/vim-common-5.*/tutor, on
  other unix systems go to directory where vim is installed and look for
  doc directory.

  ______________________________________________________________________
          bash$ cd /usr/doc/vim-common*/tutor
          bash$ less README.txt
          bash$ cp tutor $HOME
          bash$ cd $HOME
          bash$ less tutor
  ______________________________________________________________________



  8.2.  Vi Tutorials on Internet


    Purdue University
     <http://ecn.www.ecn.purdue.edu/ECN/Documents/VI/>



    Quick Vi tutorial  <http://linuxwww.db.erau.edu/LUG/node165.html>



    Advanced Vi tutorial  <http://www.yggdrasil.com/bible/bible-
     src/user-alpha-4/guide/node171.html>



    Tutorials  <http://www.cfm.brown.edu/Unixhelp/vi_.html>



    Tutorials
     <http://www.linuxbox.com/~taylor/4ltrwrd/section3_4.html>



    Unix world online vi tutorial
     <http://www.networkcomputing.com/unixworld/unixhome.html>



    Univ of Hawaii tutorial  <http://www.eng.hawaii.edu/Tutor/vi.html>

    InfoBound   <http://www.infobound.com/vi.html>



    Cornell Univ  <http://www.tc.cornell.edu/Edu/Tutor/Basics/vi/>



    Vi Lovers home page:  <http://www.cs.vu.nl/~tmgil/vi.html>

    After Sept 2000, will moveto
     <http://www.thomer.com/thomer/vi/vi.html>



    Beginner's Guide to vi
     <http://www.cs.umr.edu/unixinfo/general/packages/viguide.html>



    vi Help file  <http://www.vmunix.com/~gabor/vi.html>



    vim FAQ  <http://www.math.fu-berlin.de/~guckes/vim/faq/>

     There are many Vi Tutorials on internet. In Yahoo (Lycos, excite or
     Hotbot) enter "Vi Tutorial" in search field and search engine will
     return many pointers.

  9.  Vi Tutorial

  In this tutorial, we describe some "advanced" vi concepts and
  commands, so you can appreciate the power of vi and so you decide how
  to build your knowledge of vi commands. Nearly all vi references list
  the available commands, but many don't bother to discuss how the
  commands interrelate; this topic is the main purpose of this tutorial.

  9.1.  Cursor Movement Commands

  The vi cursor movement commands allow you to position the cursor in
  the file and/or on the screen efficiently, with a minimum number of
  keystrokes. There are oodles of cursor movement commands - don't try
  memorizing them all at once! Later, we'll see that much of the power
  of vi comes from mixing cursor movement commands with other commands
  to delete, change, yank (copy), and filter text.

  Please edit a large text file (say, wknight) so you can experiment
  with each command as it is described. Keep in mind these commands will
  only work in Command Mode, not Insert Mode; if you start getting your
  "commands" in your text, press the ESC key to return to Command Mode.


    cursor keys : As we've seen, cursor keys move by single character
     amounts left, down, up, and right. Movement above the top of the
     file, below the bottom, to the right of the end of a line, or left
     of the beginning is not allowed (no line wrapping).



    hjkl : When vi was written (around 1978), many terminals on UNIX
     systems did not have cursor keys! h, j, k, and l were chosen as
     commands to move left, down, up, and right, respectively.  Try
     them! Most vi diehards prefer these to the cursor keys because


    (a) they are in the same place on all keyborads, and

    (b) they fit nicely under the fingers, unlike most cursor keys,
     which are arranged in a box or "T" or some other nonlinear shape.


     Why h, j, k, and l? Well, in the ASCII character set, CTRL-H is
     backspace (moves left), CTRL-J is linefeed (moves down), and, of
     course, k and l are next to h and j, so you see, they're mnemonic.



    0 : ("zero", not "oh") Move to the beginning of current line. (To
     try this and the next few commands, use the cursor keys or h j k l
     to move to an indented text line that contains few "e" characters.
     If you can't find an indented line in your file, create one by
     inserting a few space characters at the beginning of a line.)



     ^  : Move to first non-white character of current line. (For
     indented line, 0 and ^ are different.)



     $  : Move to last character of current line.



     tC  : Move to (but not on) next character c in current line.
     (Press 0, then press te. This will move to the first e in the
     curent line.)



     fC  : Find (move on top of) next character c in current line.
     (Press fe, and the cursor will find - that is, move on top - the
     next e in the current line.)



     TC  : Move to (but not on) the previous character c in current
     line (Press $, then Te.)



     FC  : Find (move on top of) the previous character c in current
     line.  (Press Fe.)



     n|  : Move to column n in current line. (Try 20 |. The digits 2
     and 0 will not be displayed as you type them, but when you press |
     the cursor will move to column 20.)

     Try some experiments with t f T F | . When you do something
     illegal, vi will beep your terminal.



     w  : Forward to beginning of next "small" word ( a "small" word
     consists of unbroken alphanumeric characters or punctuation
     characters, but not mixed alphanumeric and punctuation). Try
     tapping w a dozen times or so - note what happens at punctuation.


     W  : Forward to beginning of next "big" word (alphanumeric and
     punctuation mixed). Try W a dozen times or so.



     b  : Backward to beginning of "small" word.



     B  : Backward to beginning of "big" word.



     e  : Forward to end of "small" word.


     E  : Forward to end of "big" word.



     + Return  : Move to first non-white space character on next line.
     (+ and the Return key have the same effect.)



     -  : Move to first non-white space character on previous line.



     )  : Move to the end of sentence. (A sentence ends either at a
     blank line or at a period or examination mark followed by two space
     characters or at the end of a line. A period or exclamation mark
     followed by one space character does not end a sentence; this is
     correct behaviour, according to traditional rules of how sentences
     should appear in typed documents, but often appears wrong to those
     who have never suffered through a formal typing class.)



     (  : Move to beginning of sentence.



     }  : Move to end of paragraph. (Paragraphs are seperated with
     blank lines, by vi's definition.)



     {  : Move to beginning of paragraph.



     H  : Move to home position (top line) on the screen



     M  : Move to middle line on the screen.



     L  : Move to last line on the screen.



     nG  : Move to line n. If n is not given, move to the last line in
     the file.  (Try 15G to move to line 15, for example. The CTRL-G
     command displays the name of the file, some status information, and
     the current line number. To move to the top of the file: 1G)



     CTRL-d  : Scroll down half-screen (see note).

     CTRL-u  : Scroll up half-screen (see note).

     CTRL-f  : Move forward one-screen (see note).

     CTRL-b  : Move backward one-screen (see note).

     Note  : These four scrolling/paging commands cannot be used with
     the delete, change, yank, or filter commands.



     /reg_exp  : Move to next occurrence of the regular expression
     reg_exp When you press /, the cursor drops to the lower left corner
     of the screen and waits for you to type in the regular expression.
     Press the Return key to finish; vi then searches forward for the
     next occurrence of the regular expression. For example, press /the
     followed by Return. This moves forward to the next occurrence of
     the, perhaps imbedded in the middle of some longer word (other,
     weather, etc.). If you just press / and then Return, vi searches
     for the next occurrence of whatever the last regular expression was
     that you searched for.



     n  : Has the same effect as pressing / and then Return; i.e.,
     searches for the next occurrence of whatever the last regular
     expression was that you searched for.



     ?reg_exp  : Searches backward, rather than forward. If no reg_exp
     is given, it searches for the last regular expression that was
     entered.  Both / and ? wrap around, so searching "below" the bottom
     or "above" the top of the file is legal.



     N  : Same as pressing ? and then Return.

  9.2.  Repeat Counts

  Many of the movement commands discussed above can be preceded with a
  repeat count; the movement is simply repeated the given number of
  times:

     3w  : Move forward three words

     5k  : Move up four characters

     3fa  : Find the third succeeding a in current line

     6+  : Move down six lines

     For some commands, the "repeat counts" has special meaning:

     4H  : Move to Line 4 on the screen (home plus 3)

     8L  : Move to the eigth line from the bottom of the screen

     3$  : Move to the end of the third line down

     For some commands (e.g., ^) the repeat count is ignored; for others
     (e.g., / and ? ) it is illegal

  9.3.  Deleting Text

  We've seen that dd deletes the current line. This can be used with a
  repeat count: 3dd deletes three lines, the current line, and the two
  following lines.

  The d command can be used as a "prefix" on most of the movement
  commands above to delete nearly arbitrary chunks of text. When used
  with d, the movement commands are called target specifiers. d can be
  given a repeat count. (As you try these experiments, remember to press
  u after each command to undo the deletion).


     dw  : Delete "small" word forward

     d3w  : Delete three "small" words forward

     3dw  : Three times, delete "small" word forward

     3d3w  : Three times, delete three "small" words forward (that is,
     delete nine "small" words forward)

     d+  : Delete current line and next line down

     d/the : Delete from current character up to but not including the
     next occurrence of the pattern the.

     d$  : Delete to end of line

     d0  : Delete to beginning of line

     d30G  : Delete from the curent line to and including Line 30

     dG  : Delete from current line to and including last line

     d1G  : Delete from current line to and including Line 1

     To delete single characters, use x. x can be given a repeat count:

     15x  : Delete current and 14 following characters

     x is actually just an abbreviation of d1; that is, delete one
     character right.

  9.4.  Changing Text

  The c command is similar to d, except it toggles vi into Insert Mode,
  allowing the original (unwanted) text to be changed to something else.

  For example, put the cursor on the beginning of a word (press w to get
  to the beginning of the next word). Then, press cw to change that
  word. On the screen, the last character in the word being changed will
  be replaced with a $ symbol indicating the boundary of the change;
  type in a new word (you will overwrite the original word on the
  screen) and press the ESC key when done.  Your input may be longer or
  shorter than the word being changed.

  Put the cursor at the beginning of a line containing at least three
  words, and try c3w to change three words. Try c$ to change to the end
  of the current line.  In all cases where the change affects only the
  current line, the boundary of the change is indicated with $.
  When a change affects more than just the current line, vi deletes the
  original text from the screen and toggles into Insert Mode. For
  example, try c3+ to change the current and the next three lines; vi
  deletes the four original lines from the screen and toggles into
  Insert Mode in a new blank line.  As usual, press the ESC key when you
  have finished entering your new text.

  Some other change commands:

     cc  : Change current line

     5cc  : Change five lines (current and next four)

     c/the  : Change from current character up to but not including the
     next occurrence of the pattern the

     c$  : Change to end of line

     c30G  : Change from the current line to and including Line 30

     cG  : Change from curernt line to and including last line

     c1G  : Change from curernt line to and including Line 1

  9.5.  Yanking (Copying) Text

  The y command yanks a copy of  text into a buffer; the yanked text can
  then be put (or pasted) elsewhere in the file using p or P.

  The simplest form of yank is yy to yank the current line; after yy,
  try p to put a copy of the yanked line after the cursor. Following yy,
  you can make as many copies of the yanked line as you want by moving
  up and down in the file and pressing p.

  To copy multiple lines, try, for example, 5yy (yank the current and
  next four lines). p puts a copy of the yanked lines after the cursor;
  the sequence 5yyp "works" but it probably doesn't do what you would
  like. The P command is like p, but puts a copy of the yanked text
  ahead of the cursor; try the sequence 5yyP.

  Other yank commands:

     y3w  : Yank three words

     y$  :  Yank to end of current line

     y1G  : Yank from current line to and including Line 1

  9.6.  Filtering text

  The filter command !, prompts for the name of a UNIX command (which
  should be a filter), then passes selected lines through the filter,
  replacing those selected line in the vi buffer with the output of the
  filter command. vi's ability to pass nearly arbitrary chunks of text
  through any UNIX filter adds incredible flexibility to vi, at no
  "additional cost" in size or performance to vi itself.

  Some examples will help illustrate. Create a line in your file
  containing just the word who and absolutely no other text. Put the
  cursor on this line, and press !!  This command is analogous to dd,
  cc, or yy, but instead of deleting, changing, or yanking the current
  line, it filters the current line. When you press the second !, the
  cursor drops down to the lower left corner of the screen and a single
  ! is displayed, prompting you to enter the name of a filter. As the
  filter name, type sh and press the Return key. sh (the Bourne shell)
  is a filter!  It reads standard input, does some processing of its
  input (that is, executes commands), and sends its output (the output
  of those commands) to standard output. Filtering the line containing
  who through sh causes the line containing who to be replaced with a
  list of the current users on the system - right in your file!

  Try repeating this process with date. That is, create a line
  containing nothing but the word date, then put the cursor on the line,
  and press !!sh and the Return key. The line containing date is
  replaced with the output of the date command.

  Put your cursor on the first line of the output of who. Count the
  number of lines.  Suppose, for example, the number is six. Then select
  those six lines to be filtered through sort; press 6!!sort and the
  Return key. The six lines will be passed through sort, and sort's
  output replaces the original six lines.

  The filter command can only be used on complete lines, not on
  characters or words.

  Some other filter commands (here, < CR > means press Return):

    !/the < CR > sort < CR > : Sort from the current line up to and
     including the next line containing the

     !1Ggrep the < CR > : Replace from the current line to and
     including Line 1 with just the lines that contain the

     !Gawk '{print $1}' < CR > : From the current line to the end of
     file, replace every line with just its first word.

  9.7.  Marking Lines and Characters

  You can mark lines and characters to be used as targest for movement,
  deletion, change, yanking, and filtering using the command mc, where c
  is a lowercase letter.

  For example, put the cursor in the middle of some word and press ma.
  This marks the character under the cursor as mark a.

  Now, move the cursor off the marked character and to a different line
  ( use the cursor keys, CTRL-u, or whatever). To return to the marked
  line, press 'a (that is, single quote, then a). This moves to the
  first non-white space character on the line containing mark a.

  Move off that line again. To return to the marked character, press `a
  (that is, backquote, then a). This moves on top of the character
  marked with a.

  Marking is usually used with deleting, changing, yanking or filtering.
  For example, move the cursor to a line other than the one containing
  mark a, and then press d'a (d, single quote, a). This deletes from the
  current line to and including the line marked with a.

  Put the cursor in the middle of a different word and press mb to set
  mark b.  Now, move the cursor away from that word (but only a few
  lines, so you can see what we're about to do more easily), and then
  press d`b (d, backquote, b).  This deletes from the current CHARACTER
  to and including the CHARACTER marked with b.

  As another example, to sort the output of who, mark the first line
  (ma), then move the cursor to the last line and press !'asort and the
  Return key.

  If you jump to a mark and decide you want to jump back to whatever you
  jumped from, you can press '' (jump back to line) or `` (jump back to
  character).
  9.8.  Naming Buffers

  When you delete, change, or yank text, the original text is stored
  (until the next delete, change, or yank) in an unnamed buffer from
  which it can be put using p or P. Using the unnamed buffer, only the
  most recently deleted, changed or yanked text may be recovered.

  If you wish to delete, change, or yank multiple sections of text and
  remember them all (up to a maximum of 26), you can give a buffer name
  ahead of the delete change or yank command. A buffer name has the form
  "c (double quote, lowercase c).

  For example, press "ayy to yank the current line into buffer a, then
  move to a different line and press "byy to yank that line into buffer
  b. Now, move elsewhere in the file and press "ap and "bp to put copies
  of the text stored in buffers a and b.

  Some other named buffer commands:

     "a6yy  : Yank six lines (current and next five) into buffer a

     "bd1G  : Delete from the curernt line to and including Line 1,
     storing the deleted lines in buffer b

     "cy'c  : Yank from the current line to the line marked c into
     buffer c (marks and buffers are distinct, and may have the same
     name without confusing vi)

  9.9.  Substitutions

  To substitute one chunk of text for another in lines throughout your
  file, use the :s command. Some substitute examples:

     :1,$s/the/THE/g   From Line 1 to the last line (line $),
     substitute for the text THE; do this globally in each line where
     the occurrs

     :'a,.s/.*/ha ha/  From the line marked a to the current line (line
     .), substitute for everything on the line the text ha ha

  9.10.  Miscellaneous "Colon Commands"

  All colon commands begin with a colon; when you press the colon, the
  cursor drops to the lower left corner of the screen, and a colon
  prompt is displayed waiting for you to finish your colon command.

  Some important examples:

    :w  Write the buffer contents to the file without quitting from vi

    :w abc Write the buffer contents to the file abc (creating abc if
     it doesn't exist, or overwriting current contents if it does exist)
     without quitting from vi

    :1,10w  abc  Write lines 1 through 10 to file abc

    :'a,$w abc  Write from the line marked a to the last line into file
     abc

    :e abc Edit file abc, instead of the current file. vi prints an
     error message if changes have been made to the curernt file that
     have not been saved with :w

    :e! abc Edit file abc, throwing away any changes that may have been
     made to the current file

    :e #  Edit the prior file edited (successive :e# commands toggle
     back and forth between two files)

    :f abc  Change the file anme for the current vi buffer to abc

    :q Quit, unless unsaved chanegs have been made

    :q! Quit, throwing away any changes that may have been made

    :r abc Read the file abc into current vi buffer, after the line the
     cursor is on (try :r croc to read in a copy of the croc file)

    :!cmd Execute command cmd (who, sort, ls, etc.)

  9.11.  Setting Options

  Various options affect the "feel" of vi. You can display all the
  various options that can be set using the colon command :set all. You
  can also use set to change options.

  For example, if you want to see line numbers for the lines in the file
  you're editing, use the command :set number. To turn off line
  numbering, use the command :set nonumber. Most options can be
  abbreviated; :set nu turns on line numbering and :set nonu turns off
  line numbering.

  If you :set nomagic, the special meanings of regular expression
  characters (period, asterisk, square bracket, etc.) are switched off.
  Use :set magic to restore the special meanings.

  Some options take a value. For example, :set tabstop=4 causes tabs to
  be displayed as four space characters, rather than the usual eight.

  If you find you always want certain options set certain ways, you can
  put the set commands you want ina file .exrc, or you can set up the
  environment variable EXINIT to specify the options you want.

  For example, if your login shell is Bourne shell, this line could go
  in your .profile file:

  ______________________________________________________________________
          EXINIT='set nomagic nu tabstop=4'; export EXINIT
  ______________________________________________________________________


  If your login shell is a C shell, this line could go in your .login
  file:

  ______________________________________________________________________
          setenv EXINIT 'set nomagic nu tabstop=4'
  ______________________________________________________________________



  9.12.  Key Mappings

  If you find you're performing a series of simple commands over and
  over, you can map the command series to an unused command key using
  the :map command. If your mapping must include control characters such
  as Return key (CTRL-M in ASCII) or the ESC (CTRL-[ in ASCII) key,
  precede such characters with CTRL-v to suppress their usual special
  meaning.

  For example, this command maps CTRL-A to move the cursor forward 55
  lines, then back up to the most recent blank line, then change that
  blank line to a formfeed (CTRL-L) and three blank lines. That is, each
  CTRL-A will paginate the next page, without splitting paragraphs
  across pages.

  Note: In this command, each control character is shown as ^C, where C
  is some uppercase letter. For example, CTRL-M is shown as ^M. Also,
  when you enter this command you will not see the CTRL-v characters as
  shown: each CTRL-v merely suppresses the usual special meaning of the
  following control character, so when you press the sequence ^V^M, all
  you will see on the screen is ^M. In this command, ^M is the Return
  key and ^[ is the ESC key.

  ______________________________________________________________________
          :map ^A  55+?^$^V^Mcc^V^L^V^M^V^M^V^M^V^[
  ______________________________________________________________________



  9.13.  Editing Multiple Files

  You can edit multiple files with vi by giving multiple file names as
  command line arguments:

  ______________________________________________________________________
          vi croc fatherw  wknight
  ______________________________________________________________________


  Three colon commands are used to move through the multiple files:

     :n  Move to the next file in the argument list (you must save
     changes with :w or vi will print an error message)

     :N  Move to the previous file in the argument list (you must save
     changes with :w or vi will print an error message)

     :rew Rewind and start over with the first file in the argument
     list

     The :n, :N, and :rew commands are somewhat clumsy, but there are
     some important benefits: the contents of named buffers ("a, "b, "c,
     etc.) are remembered across files, so you can use :n and :rew with
     p and P to copy text back and forth between files. Also, the most
     recent search string for the / and ? commands remembered across
     files, so you can do repetitive searches in multiple files rather
     easily.

  For example, try the following experiment: First get out of vi, then
  execute vi with croc and wknight as arguments:

  ______________________________________________________________________
          $ vi croc wknight
  ______________________________________________________________________


  In croc, search for the

       /the < CR >

  Yank this line into buffer a:

       "ayy

  Now go to the next file (you've made no change to croc, so this will
  work):


       :n < CR >

  Search for the "next" line containing the, without retyping the search
  string:

       n

  Put a copy of buffer a after the current line in wknight:

       "ap

  Move down two lines, and yank the current line into buffer b:

       jj"byy

  Save the changes to wknight

       :w < CR >

  Now, rewind to croc

       :rew < CR >

  Search again, and put a copy of buffer b after the found line:

       n"bp

  Save the changes, and exit vi

       ZZ

  9.14.  Final Remarks

  This tutorial was intended to introduce some of the vi capabilities
  that you might overlook in your system's vi manual or that might not
  be mentioned in the manual (different systems have manuals of widely
  varying quality).

  You will not be a vi expert after reading this tutorial, but you will
  have a good appreciation of vi's capabilities. Only time and effort
  can make a vi expert. But the efficiency and universality of vi make
  this effort pay off in the long run.

  You may have decided you hate vi. So be it! But be aware that vi
  remains the standard UNIX text editor - the one editor you can count
  on being available on every UNIX system you'll use - so even if you
  prefer to use something else day-to-day, you'd be well advised to know
  the bare minimum vi material covered in this tutorial.

  10.  Vim Reference Card


  10.1.  Vi states

  Vi has 3 modes:

  1. command mode - Normal and initial state; others return here (use
     ESC to abort a partially typed command)

  2. input mode - entered by specific commands a i A I o O c C s S R
     and ended by ESC or abnormally with interrupt

  3. line mode - i.e. waiting for input after a : , / , ?  or a !
     command (end with CR, abort with CTRL-c). CTRL is the control key:
     CTRL-c means "control c"

  10.2.  Shell Commands


  1. TERM= code Puts a code name for your terminal into the variable
     TERM

  2. export TERM Conveys the value of TERM (the terminal code) to any
     UNIX system program that is terminal dependant.

  3. tput init Initializes the terminal so that it will function
     properly with various UNIX system programs.

  4. vi  filename Accesses the vi screen editor so that you can edit a
     specified file.

  5. vi  file1 file2 file3 Enters three files into the vi buffer to be
     edited. Those files are file1, file2, and file3.

  6. view  file Invoke vi editor on file in read-only mode

  7. vi -R  file Invoke vi editor on file in read-only mode

  8. vi -r  file Recover file and recent edits after system crash

  9. vi -r  file Recover file and recent edits after system crash

  10.3.  Setting Options


  1. :set option Activate option

  2. :set option=value Assign value to option

  3. :set no option Deactivate option

  4. :set  Display options set by user

  5. :set all Display list of all current options, both default and
     those set by the user

  6. :set  option? Display values of option

  10.4.  Notations used

  Notations:

  1. CTRL-c CTRL is the control key: CTRL-c means "control c"

  2. CR is Carriage return (ENTER key)

  10.5.  Interrupting, cancelling


    ESC end insert or incomplete command

    CTRL-? CTRL is the control key: CTRL-? means "control ?" delete or
     rubout interrupts

    CTRL-l reprint/refresh screen if CTRL-? scrambles it

  10.6.  File Manipulation


    ZZ Save the file and exit vi


    :wq Save the file and exit vi

    :w Write the current file

    :w! Force write the current file, if file is read-only

    :wname Write to file name

    :q Exit from vi

    :q! Force exit from vi (discarding changes)

    :e name Edit file name

    :e! reedit, discard changes

    :e + name edit file name, starting at end

    :e + n edit starting at line n

    :e # edit alternate file

    :n edit next file in arglist

    :args list files in current filelist

    :rew rewind current filelist and edit first file

    :n args specify new arglist

    :f  show current file and line

    CTRL-G synonym for :f , show current file and line

    :ta tag  to tag file entry tag

    CTRL-]  :ta, following word is tag

  10.7.  Movement


    Arrows Move the cursor

    CTRL-d Scroll half page down

    CTRL-u Scroll half page up

    CTRL-f Scroll a full page down

    CTRL-b Scroll a full page up

    :0 Move to start of file

    :n Move to line number n

    :$ Move to end of file

    0 Move to start of line

    ^ Move to first non-blank character

    $ Move to end of line

    CR Move to the start of next line


    - Move to the start of previous line

    % Find matching bracket

    G  goto line (last line default)

    ]]  next section/function

    [[  previous section/function

  10.8.  Line Positioning


    H  Home window line

    L  Last window line

    M  Middle window line

    +  Next line, at first non-white

    -  Previous line, at first non-white

    CR  return, same as +

    j  next line, same column

    k  previous line, same column

  10.9.  Character positioning


    0  beginning of line

    $  end of line

    h  forward

    l  backwards

    SPACE  same as l

    fx  find x forward

    Fx  find x backward

    ;  repeat last f F

    ,  inverse of ;

    |  to specified column

    %  find matching { or }

  10.10.  Words, sentences, paragraphs


    w  Word forward

    b  Word backward

    e  End of word

    )  To next sentence


    (  Back sentence

    }  To next paragraph

    {  Back paragraph

    W  Blank delimited word

    B  Back W

    E  To end of W

  10.11.  Marking and returning


    `` (press twice the back-quote ` key) Previous context

    .nr bi 1

     mx mark position with letter x

    `x (back quote key and letter x) goto mark x

  

  10.12.  Corrections during insert


    CTRL-h Erase last character

    CTRL-w Erase last word

    erase  Press DELETE key, same as CTRL-h

    kill  Your kill key, erase input this line

    \  Escapes CTRL-h, DELETE and kill

    ESC  Ends insertion, back to command

    CTRL-?  Interrupt, terminates insert

    CTRL-d  Backtab over autoindent

    CTRL-v  Quote non-printing character

  10.13.  Adjusting the screen


    CTRL-l Clear and redraw

    CTRL-r retype, eliminate @lines

    z-CR redraw, current line at window top

    z- redraw, current line at window bottom

    z. redraw, current line at window center

    /pat/z- pat line bottom

    tn Use n line window

    CTRL-e Scroll window down 1 line


    CTRL-y Scroll window up 1 line

  10.14.  Delete


    x Delete the character under the cursor

    X Delete the charater before the cursor

    D Delete to the end of line

    d^ Delete back to start of line

    dd Delete the current line

    ndd Delete n lines starting with the current one

    dnw Delete n words starting from cursor

  10.15.  Insert, change


    i Enter input mode inserting before the cursor

    I Enter input mode inserting before the first non-blank character

    a Enter input mode inserting after the cursor

    A Enter input mode inserting after the end of the line

    o Open a new line below current line and enter input mode

    O Open a new line above current line and enter input mode

    r Replace the character under the cursor (does NOT enter input
     mode)

    R Enter input mode replacing characters

    C shift-c. Change rest of line

    D shift-d. Delete rest of line

    s Substitute chars

    S Substitute lines

    J Join lines

    J Join lines

  10.16.  Copy and Paste

  The "yank buffer" is filled by EVERY delete command, or explicitely by
  Y and yy.

    Y Copy the current line to the yank buffer

    nyy Copy n lines starting from the current to the yank buffer

    p Paste the yank buffer after the cursor (or below the current
     line)

    P Paste the yank buffer before the cursor (or above the current
     line)

    "xp  Put from buffer x

    "xy  Yank to buffer x

    "xd  Delete into buffer x

  10.17.  Operators (use double to affect lines)


    d  delete

    c  change

    <  left shift

    >  right shift

    !  filter through command

    =  indent for LISP

    y  yank text to buffer

  10.18.  Search and replace


    /text Search forward for text

    ?text Search backward for text

    n Repeat the last search in the same direction

    N Repeat the last search in the reverse direction

    / Repeat the last search forward

    ? Repeat the last search backward

    [ addr ] s/from/to/ [ g ]  Search for the occurence of from and
     replace it with to in the current line, or in the range addr (two
     line numbers seperated by command; 1,$ is the whole file).
     Replaces one occurrence per line, or all occurrences if g is
     specified.  For example, :3,20s/someword/anotherword/g  Will
     replace "someword" with "anotherword" starting from line 3 to line
     20. 'g' is global means replace all occurrences of "someword".

  10.19.  General


    :sh Forks a shell (to be exited with CTRL-d)

    :!command Forks a shell to execute command

    :set number Switch on line numbering

    :set nonumber Switch off line numbering

  10.20.  Line Editor Commands


    : Tells vi that the next commands you issue will be line editor
     commands.

    :sh Temporarily returns to the shell to perform some shell commands
     without leaving vi.

    CTRL-d Escapes the temporary return to the shell and returns to vi
     so you can edit the current window.

    :n Goes to the nth line of the buffer.

    :x,zw filename Writes lines from the numbers x through the number z
     into a new file called filename.

    :$ Moves the cursor to the beginning of the last line in the
     buffer.

    :.,$d Deletes all the lines from the current line to the last line

    :r filename Inserts the contents of the file filename under the
     current line of the buffer.

    :s/text/new_text/ Replaces the first instance of text on the
     current line with new_text

    :s/text/new_text/g Replaces the every occurrence of text on the
     current line with new_text

    :g/text/s//new_text/g Changes every occurrence of text on the
     buffer to new_text.

  10.21.  Other commands


    u Undo the last change

    U Restore the current line

    ~ Change case

    J Join the currentline with the next line

    . Repeat last text changing command

    CTRL-g Show file name and line number

  11.  Related URLs

  Related VIM URLs are at -

    C and C++ Beautifer  <http://www.metalab.unc.edu/LDP/HOWTO/C-
     C++Beautifier-HOWTO.html>

    Linux goodies  <http://www.aldev.8m.com> or at
     <http://www.aldev.webjump.com>

  12.  Other Formats of this Document

  This document is published in 11 different formats namely - DVI,
  Postscript, Latex, Adobe Acrobat PDF, LyX, GNU-info, HTML, RTF(Rich
  Text Format), Plain-text, Unix man pages and SGML.

    You can get this HOWTO document as a single file tar ball in HTML,
     DVI, Postscript or SGML formats from -
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/>

    Plain text format is in:
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO>

    Translations to other languages like French, German, Spanish,
     Chinese, Japanese are in
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> Any help from you to
     translate to other languages is welcome.

     The document is written using a tool called "SGML-Tools" which can
     be got from - <http://www.sgmltools.org> Compiling the source you
     will get the following commands like

    sgml2html CVS-HOWTO.sgml     (to generate html file)

    sgml2rtf  CVS-HOWTO.sgml     (to generate RTF file)

    sgml2latex CVS-HOWTO.sgml    (to generate latex file)

  LaTeX documents may be converted into PDF files simply by producing a
  Postscript output using sgml2latex ( and dvips) and running the output
  through the Acrobat distill ( <http://www.adobe.com>) command as
  follows:

  ______________________________________________________________________
  bash$ man sgml2latex
  bash$ sgml2latex filename.sgml
  bash$ man dvips
  bash$ dvips -o filename.ps filename.dvi
  bash$ distill filename.ps
  bash$ man ghostscript
  bash$ man ps2pdf
  bash$ ps2pdf input.ps output.pdf
  bash$ acroread output.pdf &
  ______________________________________________________________________


  Or you can use Ghostscript command ps2pdf.  ps2pdf is a work-alike for
  nearly all the functionality of Adobe's Acrobat Distiller product: it
  converts PostScript files to Portable Document Format (PDF) files.
  ps2pdf is implemented as a very small command script (batch file) that
  invokes Ghostscript, selecting a special "output device" called
  pdfwrite. In order to use ps2pdf, the pdfwrite device must be included
  in the makefile when Ghostscript was compiled; see the documentation
  on building Ghostscript for details.

  This howto document is located at -

    <http://sunsite.unc.edu/LDP/HOWTO/CVS-HOWTO.html>

  Also you can find this document at the following mirrors sites -

    <http://www.caldera.com/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.WGS.com/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.cc.gatech.edu/linux/LDP/HOWTO/CVS-HOWTO.html>

    <http://www.redhat.com/linux-info/ldp/HOWTO/CVS-HOWTO.html>

    Other mirror sites near you (network-address-wise) can be found at
     <http://sunsite.unc.edu/LDP/hmirrors.html> select a site and go to
     directory /LDP/HOWTO/CVS-HOWTO.html


  In order to view the document in dvi format, use the xdvi program. The
  xdvi program is located in tetex-xdvi*.rpm package in Redhat Linux
  which can be located through ControlPanel | Applications | Publishing
  | TeX menu buttons.  To read dvi document give the command -



          xdvi -geometry 80x90 howto.dvi
          man xdvi



  And resize the window with mouse.  To navigate use Arrow keys, Page
  Up, Page Down keys, also you can use 'f', 'd', 'u', 'c', 'l', 'r',
  'p', 'n' letter keys to move up, down, center, next page, previous
  page etc.  To turn off expert menu press 'x'.

  You can read postscript file using the program 'gv' (ghostview) or The
  ghostscript program is in ghostscript*.rpm package and gv program is
  in gv*.rpm package in Redhat Linux which can be located through
  ControlPanel | Applications | Graphics menu buttons. The gv program is
  much more user friendly than ghostscript.  Also ghostscript and gv are
  available on other platforms like OS/2, Windows 95 and NT, you view
  this document even on those platforms.


    Get ghostscript for Windows 95, OS/2, and for all OSes from
     <http://www.cs.wisc.edu/~ghost>

  To read postscript document give the command -


                       gv howto.ps
                       ghostscript howto.ps



  You can read HTML format document using Netscape Navigator, Microsoft
  Internet explorer, Redhat Baron Web browser or any of the 10 other web
  browsers.

  You can read the latex, LyX output using LyX a X-Windows front end to
  latex.

  13.  Copyright Notice

  Copyright policy is GNU/GPL as per LDP (Linux Documentation project).
  LDP is a GNU/GPL project.  Additional restrictions are - you must
  retain the author's name, email address and this copyright notice on
  all the copies. If you make any changes or additions to this document
  then you should notify all the authors of this document.



  Virtual Services Howto
  Brian Ackerman, brian@nycrc.net
  v2.1, 15 August 1998

  This document came about to satisfy the ever increasing need to know
  how to virtualize a service.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Knowledge Required
     1.2 Purpose
     1.3 Feedback
     1.4 Revision History
     1.5 Copyright/Distribution

  2. IP Aliasing

  3. Virtuald

     3.1 Introduction
     3.2 Inetd
     3.3 Config File
     3.4 Source

  4. Shell Scripts

     4.1 Virtfs
     4.2 Virtexec
     4.3 Notes

  5. DNS

  6. Syslogd

     6.1 Problem
     6.2 Solution
        6.2.1 Setup Links
        6.2.2 Syslogd.init
     6.3 Multiple Syslogd's
        6.3.1 One Per Disk
        6.3.2 One Per Domain

  7. Virtual FTP

     7.1 Inetd
     7.2 Anonymous FTP
     7.3 Virtual FTP Users

  8. Virtual Web

     8.1 Running With Virtuald
        8.1.1 Not recommended
        8.1.2 Inetd
        8.1.3 Httpd.conf
        8.1.4 Configuration
        8.1.5 Httpd.init
     8.2 Running With Apache VirtualHost
        8.2.1 Access.conf
        8.2.2 Httpd.conf
        8.2.3 Srm.conf
        8.2.4 Httpd.init
     8.3 File Descriptor Overflow
        8.3.1 Warning
        8.3.2 Multiple Apache Servers
     8.4 Sharing Servers With One IP
        8.4.1 Saving IPs
        8.4.2 Drawback
     8.5 More Information

  9. Virtual Mail/Pop

     9.1 Problem
     9.2 Solution
     9.3 Sendmail Solution
        9.3.1 Introduction
        9.3.2 Create Sendmail Configuration File
        9.3.3 Edit Sendmail Configuration File
        9.3.4 Sendmail Local Delivery
        9.3.5 Sendmail Between Virtual Domains: The Hack (PRE8.8.6)
        9.3.6 Sendmail Between Virtual Domains: New Sendmail Feature (POST8.8.6)
        9.3.7 Sendmail.init
        9.3.8 Inetd Setup
     9.4 Qmail Solution
        9.4.1 Introduction
        9.4.2 Setup Virtual Domains
        9.4.3 Setup Domain Master User
        9.4.4 Tcpserver
        9.4.5 Qmail.init
        9.4.6 Source
        9.4.7 Source
     9.5 Acknowledgement

  10. Virtual Samba

     10.1 Setup
     10.2 Inetd
     10.3 Smb.init

  11. Virtual Other

  12. Conclusion

  13. FAQ



  ______________________________________________________________________

  1.  Introduction

  1.1.  Knowledge Required

  Creating a virtual services machine is not all that difficult,
  however, more than fundamental knowledge is required.  This document
  is not a primer to how to fully configure a Linux machine.


  In order to understand this HOWTO document it is assumed that you are
  thoroughly familiar with the following:


  o  Compiling a Linux kernel and adding IP aliasing support IP alias
     mini-HOWTO

  o  Setting up and configuring of network devices NET-3 HOWTO

  o  Setting up of inetd NET-3 HOWTO

  o  Various network packages like Sendmail Apache Qmail SAMBA

  o  Setting up DNS DNS HOWTO

  o  Understanding basic system administration Linux Systems
     Administrators's Guide

  o  Understanding how to setup a Web Server WWW HOWTO

  If you are uncertain of how to proceed with any of the above it is
  STRONGLY recommended that you use the html links provided to
  familiarize yourself with all packages.  I will NOT reply to mail
  regarding any of the above.  Please direct your questions to the
  appropriate author of the HOWTO.


  1.2.  Purpose

  The purpose of virtual services is to allow a single machine to
  recognize multiple IP addresses without multiple network cards.  IP
  aliasing is a kernel option that allows you to assign each network
  device more than one IP address.  The kernel then multiplexes (swaps
  between them very fast) in the background and to the user it appears
  like you have more than one server.



  This multiplexing allows multiple domains (www.domain1.com,
  www.domain2.com, etc.) to be hosted by the same machine for the same
  cost as hosting one domain.  Unfortunately, most services (FTP, web,
  mail) were not designed to handle muliple domains.  In order to make
  them work properly you must modify both configuration files and source
  code.  This document describes how to make these modifications in the
  setting up of a virtual machine.


  A deamon is also required in order to make virtual services function.
  The source for this daemon (virtuald) is provided later in this
  document.


  1.3.  Feedback

  This document will expand as packages are updated and source or
  configuration modifications change.   If there are any portions of
  this document that are unclear please feel free to email me with your
  suggestions or questions.  So that I do not have to go searching
  through the entire HOWTO please make certain that all comments are as
  specific as possible and include the section where the uncertainty
  lies.  It is important that all mail be addressed with VIRTSERVICES
  HOWTO in the subject line.  Any other mail will be considered personal
  and all my friends know that I do not ever read my personal mail so it
  will probably get discarded with theirs.


  Please note that my examples are just that, examples and should not be
  copied verbatim.   You may have to insert your own values.   If you
  are having trouble, send me mail.  Include all the pertinent
  configuration files and the error messages you get when installing and
  I will look them over and reply with my suggestions.


  1.4.  Revision History

  V1.0

  Initial version


  V1.1

  Fixed error in Virtual Web Section


  V1.2


  Fixed the date


  V2.0


  Updated html links.

  Web updates.

  New Sendmail option.

  New Qmail section.

  Syslogd updates.

  FTP updates.

  Virtuald default option.

  New SAMBA section.

  FAQ updates.


  V2.1

  Changed all paths to /usr/local.

  Added virtuald VERBOSELOG compile option.

  Fixed setuid/setgid bug in virtmailfilter.

  Fixed execl bug in virtmailfilter.

  Fixed capitialization bug in virtmailfilter.

  Fixed environment variable sanity check in virtmailfilter.

  Removed mbox code from virtmailfilter/virtmaildelivery.

  Added tcpserver.init pop section for Qmail.

  Added alias domain name question to the FAQ.

  Fixed virtmailfilter to send home directory to virtmaildelivery.


  1.5.  Copyright/Distribution

  This document is Copyright (c) 1997 by The Computer Resource Center
  Inc.


  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author.  Translations
  are similiarly permitted without express permission if it includes a
  notice on who translated it.  Commercial redistribution is allowed and
  encouraged; however please notify Computer Resource Center of any such
  distributions.


  Excerpts from the document may be used without prior consent provided
  that the derivative work contains the verbatim copy or a pointer to a
  verbatim copy.

  Permission is granted to make and distribute verbatim copies of this
  document provided the copyright notice and this permission notice are
  preserved on all copies.


  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, I do wish to retain copyright
  on this HOWTO document, and would like to be notified of any plans to
  redistribute this HOWTO.


  2.  IP Aliasing

  IP aliasing is a kernel option that needs to be set up in order to run
  a virtual hosting machine.  There is already a mini-HOWTO on IP
  aliasing.  Consult that for any questions on how to set it up.


  3.  Virtuald

  3.1.  Introduction

  Every network connection is made up of two IP address/port pairs.  The
  API (Applications Program Interface) for network programming is called
  the Sockets API.  The socket acts like an open file and by
  reading/writing to it you can send data over a network connection.
  There is a function call  getsockname  that will return the IP address
  of the local socket.  Virtuald uses  getsockname to determine which IP
  on the local machine is being accessed.  Virtuald reads a config file
  to retrieve the directory associated with that IP.  It will
   chroot  to that directory and hand the connection off to the service.
  Chroot  resets / or the root directory to a new point so everything
  higher in the directory tree is cut off from the running program.
  Therefore, each IP address gets their own virtual filesystem.   To the
  network program this is transparent and the program will behave like
  nothing happened.  Virtuald in conjunction with a program like inetd
  can then be used to virtualize any service.


  3.2.  Inetd

  Inetd is a network super server that listens at multiple ports and
  when it receives a connection (for example, an incoming pop request),
  inetd performs the network negotiation and hands the network
  connection off to the specified program.  This prevents services from
  running idly when they are not needed.


  A standard /etc/inetd.conf file looks like this:


  ftp stream tcp nowait root /usr/sbin/tcpd \
          wu.ftpd -l -a
  pop-3 stream tcp nowait root /usr/sbin/tcpd \
          in.qpop -s



  A virtual /etc/inetd.conf file looks like this:


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp wu.ftpd -l -a
  pop-3 stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.pop in.qpop -s

  3.3.  Config File

  Each service gets a config file that will control what IPs and
  directories are allowed for that service.  You can have one master
  config file or several config files if you want each service to get a
  different list of domains.   A config file looks like this:


  # This is a comment and so are blank lines

  # Format IP SPACE dir NOSPACES
  10.10.10.129 /virtual/domain1.com
  10.10.10.130 /virtual/domain2.com
  10.10.10.157 /virtual/domain3.com

  # Default option for all other IPs
  default /



  3.4.  Source

  This is the C source code to the virtuald program.  Compile it and
  install it in /usr/local/bin with permission 0755, user root, and
  group root.  The only compile option is VERBOSELOG which will turn
  on/off logging of connections.



  #include <netinet/in.h>
  #include <sys/socket.h>
  #include <arpa/inet.h>
  #include <stdarg.h>
  #include <unistd.h>
  #include <string.h>
  #include <syslog.h>
  #include <stdio.h>

  #undef VERBOSELOG

  #define BUFSIZE 8192

  int getipaddr(char **ipaddr)
  {
          struct sockaddr_in virtual_addr;
          static char ipaddrbuf[BUFSIZE];
          int virtual_len;
          char *ipptr;

          virtual_len=sizeof(virtual_addr);
          if (getsockname(0,(struct sockaddr *)&virtual_addr,&virtual_len)<0)
          {
                  syslog(LOG_ERR,"getipaddr: getsockname failed: %m");
                  return -1;
          }
          if (!(ipptr=inet_ntoa(virtual_addr.sin_addr)))
          {
                  syslog(LOG_ERR,"getipaddr: inet_ntoa failed: %m");
                  return -1;
          }
          strncpy(ipaddrbuf,ipptr,sizeof(ipaddrbuf)-1);
          *ipaddr=ipaddrbuf;
          return 0;
  }

  int iptodir(char **dir,char *ipaddr,char *filename)
  {
          char buffer[BUFSIZE],*bufptr;
          static char dirbuf[BUFSIZE];
          FILE *fp;

          if (!(fp=fopen(filename,"r")))
          {
                  syslog(LOG_ERR,"iptodir: fopen failed: %m");
                  return -1;
          }
          *dir=NULL;
          while(fgets(buffer,BUFSIZE,fp))
          {
                  buffer[strlen(buffer)-1]=0;
                  if (*buffer=='#' || *buffer==0)
                          continue;
                  if (!(bufptr=strchr(buffer,' ')))
                  {
                          syslog(LOG_ERR,"iptodir: strchr failed");
                          return -1;
                  }
                  *bufptr++=0;
                  if (!strcmp(buffer,ipaddr))
                  {
                          strncpy(dirbuf,bufptr,sizeof(dirbuf)-1);
                          *dir=dirbuf;
                          break;
                  }
                  if (!strcmp(buffer,"default"))
                  {
                          strncpy(dirbuf,bufptr,sizeof(dirbuf)-1);
                          *dir=dirbuf;
                          break;
                  }
          }
          if (fclose(fp)==EOF)
          {
                  syslog(LOG_ERR,"iptodir: fclose failed: %m");
                  return -1;
          }
          if (!*dir)
          {
                  syslog(LOG_ERR,"iptodir: ip not found in conf file");
                  return -1;
          }
          return 0;
  }

  int main(int argc,char **argv)
  {
          char *ipaddr,*dir;

          openlog("virtuald",LOG_PID,LOG_DAEMON);

  #ifdef VERBOSELOG
          syslog(LOG_ERR,"Virtuald Starting: $Revision: 1.49 $");
  #endif
          if (!argv[1])
          {
                  syslog(LOG_ERR,"invalid arguments: no conf file");
                  exit(0);
          }
          if (!argv[2])
          {
                  syslog(LOG_ERR,"invalid arguments: no program to run");
                  exit(0);
          }
          if (getipaddr(&ipaddr))
          {
                  syslog(LOG_ERR,"getipaddr failed");
                  exit(0);
          }
  #ifdef VERBOSELOG
          syslog(LOG_ERR,"Incoming ip: %s",ipaddr);
  #endif
          if (iptodir(&dir,ipaddr,argv[1]))
          {
                  syslog(LOG_ERR,"iptodir failed");
                  exit(0);
          }
          if (chroot(dir)<0)
          {
                  syslog(LOG_ERR,"chroot failed: %m");
                  exit(0);
          }
  #ifdef VERBOSELOG
          syslog(LOG_ERR,"Chroot dir: %s",dir);
  #endif
          if (chdir("/")<0)
          {
                  syslog(LOG_ERR,"chdir failed: %m");
                  exit(0);
          }
          if (execvp(argv[2],argv+2)<0)
          {
                  syslog(LOG_ERR,"execvp failed: %m");
                  exit(0);
          }

          closelog();

          exit(0);
  }



  4.  Shell Scripts

  4.1.  Virtfs

  Each domain should get their own directory structure.  Since you are
  using  chroot  you will require duplicate copies of the shared
  libraries, binaries, conf files, etc.  I use /virtual/domain1.com for
  each domain that I create.


  I realize that you are taking up more disk space but it is cheaper
  than a whole new machine and network cards.  If you really want to
  preserve space you can hard link the files together so only one copy
  of each binary exists.  The filesystem that I use takes up a little
  over 2M.  However, this script attempts to copy all the files from the
  main filesystem in order to be as generic as possible.



  Here is a sample virtfs script:



  #!/bin/sh

  echo '$Revision: 1.49 $'

  echo -n "Enter the domain name: "
  read domain

  if [ "$domain" = "" ]
  then
          echo Nothing entered: aborting
          exit 0
  fi

  leadingdir=/virtual

  echo -n "Enter leading dir: (Enter for default: $leadingdir): "
  read ans

  if [ "$ans" != "" ]
  then
          leadingdir=$ans
  fi

  newdir=$leadingdir/$domain

  if [ -d "$newdir" ]
  then
          echo New directory: $newdir: ALREADY exists
          exit 0
  else
          echo New directory: $newdir
  fi

  echo Create $newdir
  mkdir -p $newdir

  echo Create bin
  cp -pdR /bin $newdir

  echo Create dev
  cp -pdR /dev $newdir

  echo Create dev/log
  ln -f /virtual/log $newdir/dev/log

  echo Create etc
  mkdir -p $newdir/etc
  for i in /etc/*
  do
          if [ -d "$i" ]
          then
                  continue
          fi
          cp -pd $i $newdir/etc
  done

  echo Create etc/skel
  mkdir -p $newdir/etc/skel

  echo Create home
  for i in a b c d e f g h i j k l m n o p q r s t u v w x y z
  do
          mkdir -p $newdir/home/$i
  done

  echo Create home/c/crc
  mkdir -p $newdir/home/c/crc
  chown crc.users $newdir/home/c/crc

  echo Create lib
  mkdir -p $newdir/lib
  for i in /lib/*
  do
          if [ -d "$i" ]
          then
                  continue
          fi
          cp -pd $i $newdir/lib
  done

  echo Create proc
  mkdir -p $newdir/proc

  echo Create sbin
  cp -pdR /sbin $newdir

  echo Create tmp
  mkdir -p -m 0777 $newdir/tmp
  chmod +t $newdir/tmp

  echo Create usr
  mkdir -p $newdir/usr

  echo Create usr/bin
  cp -pdR /usr/bin $newdir/usr

  echo Create usr/lib
  mkdir -p $newdir/usr/lib

  echo Create usr/lib/locale
  cp -pdR /usr/lib/locale $newdir/usr/lib

  echo Create usr/lib/terminfo
  cp -pdR /usr/lib/terminfo $newdir/usr/lib

  echo Create usr/lib/zoneinfo
  cp -pdR /usr/lib/zoneinfo $newdir/usr/lib

  echo Create usr/lib/\*.so\*
  cp -pdR /usr/lib/*.so* $newdir/usr/lib

  echo Create usr/sbin
  cp -pdR /usr/sbin $newdir/usr

  echo Linking usr/tmp
  ln -s /tmp $newdir/usr/tmp

  echo Create var
  mkdir -p $newdir/var

  echo Create var/lock
  cp -pdR /var/lock $newdir/var

  echo Create var/log
  mkdir -p $newdir/var/log

  echo Create var/log/wtmp
  cp /dev/null $newdir/var/log/wtmp

  echo Create var/run
  cp -pdR /var/run $newdir/var

  echo Create var/run/utmp
  cp /dev/null $newdir/var/run/utmp

  echo Create var/spool
  cp -pdR /var/spool $newdir/var

  echo Linking var/tmp
  ln -s /tmp $newdir/var/tmp

  echo Create var/www/html
  mkdir -p $newdir/var/www/html
  chown webmast.www $newdir/var/www/html
  chmod g+s $newdir/var/www/html

  echo Create var/www/master
  mkdir -p $newdir/var/www/master
  chown webmast.www $newdir/var/www/master

  echo Create var/www/server
  mkdir -p $newdir/var/www/server
  chown webmast.www $newdir/var/www/server

  exit 0



  4.2.  Virtexec


  To execute commands in a virtual environment you have to
   chroot  to that directory and then run the command.  I have written a
  special shell script called virtexec that handles this for any
  command:



  #!/bin/sh

  echo '$Revision: 1.49 $'

  BNAME=`basename $0`
  FIRST4CHAR=`echo $BNAME | cut -c1-4`
  REALBNAME=`echo $BNAME | cut -c5-`

  if [ "$BNAME" = "virtexec" ]
  then
          echo Cannot run virtexec directly: NEED a symlink
          exit 0
  fi

  if [ "$FIRST4CHAR" != "virt" ]
  then
          echo Symlink not a virt function
          exit 0
  fi

  list=""
  num=1
  for i in /virtual/*
  do
          if [ ! -d "$i" ]
          then
                  continue
          fi
          if [ "$i" = "/virtual/lost+found" ]
          then
                  continue
          fi
          list="$list $i $num"
          num=`expr $num + 1`
  done

  if [ "$list" = "" ]
  then
          echo No virtual environments exist
          exit 0
  fi

  dialog --clear --title 'Virtexec' --menu Pick 20 70 12 $list 2> /tmp/menu.$$
  if [ "$?" = "0" ]
  then
          newdir=`cat /tmp/menu.$$`
  else
          newdir=""
  fi
  tput clear
  rm -f /tmp/menu.$$

  echo '$Revision: 1.49 $'

  if [ ! -d "$newdir" ]
  then
          echo New directory: $newdir: NOT EXIST
          exit 0
  else
          echo New directory: $newdir
  fi

  echo bname: $BNAME

  echo realbname: $REALBNAME

  if [ "$*" = "" ]
  then
          echo args: none
  else
          echo args: $*
  fi

  echo Changing to $newdir
  cd $newdir

  echo Running program $REALBNAME

  chroot $newdir $REALBNAME $*

  exit 0



  Please note that you must have the  dialog  program installed on your
  system for this to work.  To use virtexec just symlink a program to
  it.  For example,


  ln -s /usr/local/bin/virtexec /usr/local/bin/virtpasswd
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtvi
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtpico
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtemacs
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtmailq



  Then if you type virtvi or virtpasswd or virtmailq it will allow you
  to vi a program, change a user's password or check the mail queue on
  your virtual system.  You can create as many virtexec symlinks as you
  want.  Please note that if your program requires a shared library it
  has to be in the virtual filesystem as well as the binary.


  4.3.  Notes

  I install all the scripts in /usr/local/bin.  Anything that I do not
  want to put on the virtual filesystem I put in /usr/local.  The script
  does not copy any of the files in /usr/local to the virtual
  filesystem.  Any files that are important to not cross virtual
  filesystems should be removed.  For example, ssh is installed on my
  system and I did not want the private key for the server available on
  all the virtual filesystems so I remove it from each virtual
  filesystem after I run virtfs.  I also change resolv.conf and remove
  anything that has the name of another domain on it for legal reasons.
  For example, /etc/hosts and /etc/HOSTNAME.


  The programs that I symlink to virtexec are:


  o  virtpasswd -- change a user password

  o  virtadduser -- create a user

  o  virtdeluser -- delete a user

  o  virtsmbstatus -- see SAMBA status

  o  virtvi -- edit a file


  o  virtmailq -- check out the mailq

  o  virtnewaliases -- rebuild alias tables


  5.  DNS

  You can configure DNS normally.  There is a HOWTO on DNS.


  6.  Syslogd

  6.1.  Problem

  Syslogd is the system logging utility commonly used on UNIX systems.
  Syslogd is a daemon that opens a special file called a FIFO.  A FIFO
  is a special file that acts like a pipe.  Anything that is written to
  the write side will come out the read side.  Syslogd waits for data
  from the read side.  There are C functions that write to the write
  side.  If your program uses these C functions your output will go to
  syslogd.


  Remember that we have used a  chroot  environment and the FIFO that
  syslogd is reading from (/dev/log) is not present.  That means all the
  virtual environments will not log to syslogd.


  6.2.  Solution

  6.2.1.  Setup Links


  Syslogd can look to a different FIFO if you tell it on the command
  line so run syslogd with the argument:


  syslogd -p /virtual/log



  Then symlink /dev/log to /virtual/log by:


  ln -sf /virtual/log /dev/log



  Then hard link all the /dev/log copies to this file by running:


  ln -f /virtual/log /virtual/domain1.com/dev/log



  The virtfs script above already does this.  Since /virtual is one
  contiguous disk and the /dev/log's are hard linked they have the same
  inode number and point to the same data.  The  chroot  cannot stop
  this so all your virtual /dev/log's will now function.  Note that all
  the messages from all the environments will be logged in one place.
  However, you can write separate programs to filter out the data.



  6.2.2.  Syslogd.init

  This version of the syslogd.init file hard links the /dev/log's each
  time you start it because syslogd deletes and creates the /dev/log
  FIFO each time it runs.  Here is a modified syslogd.init file:


  #!/bin/sh

  . /etc/rc.d/init.d/functions

  case "$1" in
    start)
          echo -n "Starting dev log: "
          ln -sf /virtual/log /dev/log
          echo done
          echo -n "Starting system loggers: "
          daemon syslogd -p /virtual/log
          daemon klogd
          echo
          echo -n "Starting virtual dev log: "
          for i in /virtual/*
          do
                  if [ ! -d "$i" ]
                  then
                          continue
                  fi
                  if [ "$i" = "/virtual/lost+found" ]
                  then
                          continue
                  fi
                  ln -f /virtual/log $i/dev/log
                  echo -n "."
          done
          echo " done"
          touch /var/lock/subsys/syslogd
          ;;
    stop)
          echo -n "Shutting down system loggers: "
          killproc syslogd
          killproc klogd
          echo
          rm -f /var/lock/subsys/syslogd
          ;;
    *)
          echo "Usage: syslogd {start|stop}"
          exit 1
  esac

  exit 0



  6.3.  Multiple Syslogd's

  6.3.1.  One Per Disk

  If you run out of space on one filesystem and you have to break up
  your virtual domains onto different disks remember that hard links
  will not cross disks.  That means you will have to run a separate
  syslogd for each group of domains on a disk.  For example, if you had
  thirteen domains on /virtual1 and fifteen domains on /virtual2, you
  would hard link thirteen domains to /virtual1/log and run one syslogd
  with  syslogd -p /virtual1/log  and hard link fifteen other domains to
  /virtual2/log with a syslogd running with  syslogd -p /virtual2/log .
  6.3.2.  One Per Domain

  If you do not want to centralize the logs to one place you could also
  run one syslogd per domain.  This wastes process ID's so I do not
  recommend it but it is easier to implement.   You would have to alter
  your syslogd.init file to run syslogd as  chroot /virtual/domain1.com
  syslogd  for each domain.  This will run each syslogd within the
  chroot  and the logs will be in /virtual/domain1.com/var/log rather
  than all combined in /var/log.  Do not forget to run a syslogd
  normally  syslogd  for the main system and a kernel logger  klogd .


  7.  Virtual FTP

  7.1.  Inetd

  Wu-ftpd comes with built in support to make it virtual.  However, you
  cannot maintain separate password files for each domain.  For example,
  if
   bob@domain1.com  and  bob@domain2.com  both want an account you would
  have to make one of them bob2 or have one of the users choose a
  different user name.  Since you now have a virtual filesystem for each
  domain you have separate password files and this problem goes away.
  Just create a virtnewuser script and a virtpasswd script in the way
  mentioned above and you are all set.


  The inetd.conf entries for wu-ftpd:


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp wu.ftpd -l -a



  7.2.  Anonymous FTP

  These are unaffected by the virtuald setup.  For an anonymous user
  just create the FTP user in /virtual/domain1.com/etc/passwd like you
  would normally.


  ftp:x:14:50:Anonymous FTP:/var/ftp:/bin/false



  Then setup the anonymous FTP directory.  You have separate password
  files for each domain so you can restrict which domain has an
  anonymous FTP account.  Please note that since the FTP server is
  already  chrooted into the /virtual/domain1.com directory you do not
  have to prefix any paths with it.


  7.3.  Virtual FTP Users

  Wu-ftpd supports something called a guest group.  This allows you to
  create different FTP areas for each user.  The FTP server does a
  chroot  to the specified area so the user cannot go outside that
  directory tree.  If you create the users within a virtual domain this
  way they will not be able to view the system files.


  Add the guest's group to the /virtual/domain1.com/etc/ftpaccess file.


  Create an entry in /virtual/domain1.com/etc/passwd with the  chroot
  dir and the starting home directory separated by  /./ :


  guest1:x:8500:51:Guest FTP:/home/g/guest1/./incoming:/bin/false



  Then setup guest's home like you would for anonymous FTP.  You have
  separate password files for each domain so you can specifiy which
  domains have guest accounts and which users within a domain are guest
  users.  Please note that since the FTP server is already  chrooted
  into the /virtual/domain1.com directory you do not have to prefix any
  paths with it.


  8.  Virtual Web

  8.1.  Running With Virtuald

  8.1.1.  Not recommended

  Apache has their own support for virtual domains.  This is the only
  program I recommend using the internal virtual domain mechanism.
  When you run something through inetd there is a cost, the program has
  to start up each time you run it.  This results in slower response
  time, which is perfectly fine for most services but is completely
  unacceptable for web service.  Apache also has a mechanism for
  stopping connections when too many come in, which can be critical for
  even medium volume sites.


  Simply stated, virtualizing Apache with virtuald is a really bad idea.
  The whole point of virtuald is to fill the gap created when services
  DO NOT have their own internal mechanism to do the job.  Virtuald is
  not meant to replace good code that already completes the task at
  hand.


  The above not withstanding here is how to do it for those who are
  foolhardy enough to do so.


  8.1.2.  Inetd

  Edit /etc/inetd.conf


  vi /etc/inetd.conf # Add this line
  www stream tcp nowait www /usr/local/bin/virtuald \
          virtuald /virtual/conf.www httpd -f /var/www/conf/httpd.conf



  8.1.3.  Httpd.conf

  Edit /var/www/conf/httpd.conf



  vi /var/www/conf/httpd.conf # Or wherever you put the Apache config files
  It should say:
  ServerType standalone

  Replace it with:
  ServerType inetd



  8.1.4.  Configuration

  Then configure each instance of the Apache server like you would
  normally for single domain use.


  8.1.5.  Httpd.init

  An httpd.init file is not needed since the server is run through
  inetd.


  8.2.  Running With Apache VirtualHost

  Apache has three configuration files  access.conf ,  httpd.conf , and
  srm.conf .  Newer versions of Apache have made the three configuration
  files unnecessary.  However, I find that breaking up the configuration
  into three sections makes it easier to manage so I will be keeping
  with that style in this HOWTO document.


  8.2.1.  Access.conf

  This configuration file is used to control the accessibility of
  directories in the web directory structure.  Here is a sample
  configuration file that shows how to have different options for each
  domain.


  # /var/www/conf/access.conf: Global access configuration

  # Options are inherited from the parent directory
  # Set the main directory with default options
  <Directory />
  AllowOverride None
  Options Indexes
  </Directory>

  # Give one domain a passwd protected directory
  <Directory /virtual/domain1.com/var/www/html/priv>
  AuthUserFile /var/www/passwd/domain1.com-priv
  AuthGroupFile /var/www/passwd/domain1.com-priv-g
  AuthName PRIVSECTION
  AuthType Basic
  <Limit GET PUT POST>
  require valid-user
  </Limit>
  </Directory>

  # Give another domain Server Side Includes
  <Directory /virtual/domain2.com/var/www/html>
  Options IncludesNOEXEC
  </Directory>



  8.2.2.  Httpd.conf

  This configuration file is used to control the main options for the
  Apache server.  Here is a sample configuration file that shows how to
  have different options for each domain.



  # /var/www/conf/httpd.conf: Main server configuration file

  # Begin: main conf section

  # Needed since not using inetd
  ServerType standalone

  # Port to run on
  Port 80

  # Log clients with names vs IP addresses
  HostnameLookups on

  # User to run server as
  User www
  Group www

  # Where server config, error and log files are
  ServerRoot /var/www

  # Process Id of server in this file
  PidFile /var/run/httpd.pid

  # Internal server process info
  ScoreBoardFile /var/www/logs/apache_status

  # Timeout and KeepAlive options
  Timeout 400
  KeepAlive 5
  KeepAliveTimeout 15

  # Number of servers to run
  MinSpareServers 5
  MaxSpareServers 10
  StartServers 5
  MaxClients 150
  MaxRequestsPerChild 30

  # End: main conf section

  # Begin: virtual host section

  # Tell server to accept requests for ip:port
  # I have one for each IP needed so you can explicitly ignore certain domains
  Listen 10.10.10.129:80
  Listen 10.10.10.130:80

  # VirtualHost directive allows you to specify another virtual
  # domain on your server.  Most Apache options can be specified
  # within this section.
  <VirtualHost www.domain1.com>

  # Mail to this address on errors
  ServerAdmin webmaster@domain1.com

  # Where documents are kept in the virtual domain
  DocumentRoot /virtual/domain1.com/var/www/html

  # Name of the server
  ServerName www.domain1.com

  # Log files Relative to ServerRoot option
  ErrorLog logs/domain1.com-error_log
  TransferLog logs/domain1.com-access_log
  RefererLog logs/domain1.com-referer_log
  AgentLog logs/domain1.com-agent_log
  # Use CGI scripts in this domain
  ScriptAlias /cgi-bin/ /var/www/cgi-bin/domain1.com/
  AddHandler cgi-script .cgi
  AddHandler cgi-script .pl
  </VirtualHost>

  <VirtualHost www.domain2.com>

  # Mail to this address on errors
  ServerAdmin webmaster@domain2.com

  # Where documents are kept in the virtual domain
  DocumentRoot /virtual/domain2.com/var/www/html

  # Name of the server
  ServerName www.domain2.com

  # Log files Relative to ServerRoot option
  ErrorLog logs/domain2.com-error_log
  TransferLog logs/domain2.com-access_log
  RefererLog logs/domain2.com-referer_log
  AgentLog logs/domain2.com-agent_log

  # No CGI's for this host
  </VirtualHost>
  # End: virtual host section



  8.2.3.  Srm.conf

  This configuration file is used to control how requests are serviced
  and how results are formatted.   You do not have to edit anything here
  for the virtual domains.  The sample config file from Apache should
  work.


  8.2.4.  Httpd.init

  Nothing special has to be done to the httpd.init file.  Use a standard
  one that comes with the Apache configuration.


  8.3.  File Descriptor Overflow

  8.3.1.  Warning

  This only applies to the standalone style Apache server.  A server run
  through inetd does not interact with the other domains so it has the
  whole file descriptor table.


  Every log file that the Apache server opens is another file descriptor
  for the process.  There is a limit of 256 file descriptors per process
  in Linux.  Since you have multiple domains you are using a lot more
  file descriptors.  If you have too many domains running off of one
  Apache web server process you can overflow this table.  This would
  mean that certain logs would not work and CGI's would fail.


  8.3.2.  Multiple Apache Servers

  If you assume five file descriptors per domain you can have 50 domains
  running on your Apache server without any problems.  However, if you
  find your server having problems like this you could create /var/www1
  with an Apache server in charge of domain1 - domain25 and /var/www2
  with an Apache server in charge of domain26 - domain50 and so on.
  This would give each server their own configuration, error, and log
  directory.  Each server should be configured separately with their own
  Listen and VirtualHost directives.  Do not forget to run multiple
  servers in your httpd.init file.


  8.4.  Sharing Servers With One IP

  8.4.1.  Saving IPs

  The HTTP (HyperText Transfer Protocol) version 1.1 added a feature
  that communicates the name of the server to the client.  This means
  that the client does not need to look up the server from its IP
  address.  Therefore, two virtual servers could have the same IP
  address and be different web sites. The Apache configuration is the
  same as above except that you do not have to put in a different Listen
  directive since the two domains will have the same IP.


  8.4.2.  Drawback

  The only problem is that virtuald uses IP addresses to distinguish
  between domains.  In its current form virtuald would not be able to
  chroot to different spool directories for each domain.  Therefore,
  mail would only be able to respond as one IP and there would no longer
  be a unique spool directory for each domain.  All the web sharing IP
  clients would have to share that IPs spool directory.  That would mean
  duplicate usernames would be an issue again.  However, that is the
  price you pay for sharing IPs.


  8.5.  More Information

  This HOWTO only shows how to implement virtual support on the Apache
  web server.  Most web servers use a similar interface.  For more
  information on virtual web hosting consult the WWW HOWTO, the
  documentation for Apache at Apache's Site, or the documentation at
  ApacheWeek.


  9.  Virtual Mail/Pop

  9.1.  Problem

  Virtual mail support is in ever increasing demand.  Sendmail says it
  supports virtual mail.  What it does support is listening for incoming
  mail from different domains.  You can then specify to have the mail
  forwarded somewhere.  However, if you forward it to the local machine
  and have incoming mail to bob@domain1.com and bob@domain2.com they
  will go to the same mail folder.  This is a problem since both bob's
  are different people with different mail.


  9.2.  Solution

  You can make sure that each user name is unique by using a numbering
  scheme: bob1, bob2, etc or prepending a few characters to each
  username dom1bob, dom2bob, etc.  You could also hack mail and pop to
  do these conversions behind the scenes but that can get messy.
  Outgoing mail also has the banner maindomain.com and you want each
  subdomain's outgoing mail banner to be different.



  I have two solutions.  One works with sendmail and one works with
  Qmail.  The solution with sendmail should work with a stock install of
  sendmail.  However, it shares all the limitations built into sendmail.
  It also requires that one sendmail has to be run in queue mode for
  each domain.  Having 50 or more sendmail queue processes that wake up
  every hour can put a little strain on a machine.


  The solution offered with Qmail does not require multiple instances of
  Qmail and can run out of one queue directory.  It does require an
  extra program since Qmail does not rely on virtuald.  I believe a
  similar procedure can be done with sendmail.  However, Qmail lends
  itself to this solution more readily.


  I do not endorse any one program over the other.  The sendmail install
  is a little more straight forward but Qmail is probably the more
  powerful of the two mail server packages.


  9.3.  Sendmail Solution

  9.3.1.  Introduction

  Each virtual filesystem gives a domain its own /etc/passwd.  This
  means that bob@domain1.com and bob@domain2.com are different users in
  different /etc/passwds so mail will be no problem.  They also have
  their own spool directories so the mail folders will be different
  files on different virtual filesystems.


  9.3.2.  Create Sendmail Configuration File

  Create /etc/sendmail.cf like you would normally through m4.  I used:


  divert(0)
  VERSIONID(`tcpproto.mc')
  OSTYPE(linux)
  FEATURE(redirect)
  FEATURE(always_add_domain)
  FEATURE(use_cw_file)
  FEATURE(local_procmail)
  MAILER(local)
  MAILER(smtp)



  9.3.3.  Edit Sendmail Configuration File

  Edit /virtual/domain1.com/etc/sendmail.cf to respond as your virtual
  domain:


  vi /virtual/domain1.com/etc/sendmail.cf # Approximately Line 86
  It should say:

  #Dj$w.Foo.COM

  Replace it with:

  Djdomain1.com



  9.3.4.  Sendmail Local Delivery

  Edit /virtual/domain1.com/etc/sendmail.cw with the local hostnames.


  vi /virtual/domain1.com/etc/sendmail.cw
  mail.domain1.com
  domain1.com
  domain1
  localhost



  9.3.5.  Sendmail Between Virtual Domains: The Hack (PRE8.8.6)

  However, sendmail requires one minor source code modification.
  Sendmail has a file called /etc/sendmail.cw and it contains all
  machine names that sendmail will deliver mail to locally rather than
  forwarding to another machine.  Sendmail does internal checking of all
  the devices on the machine to initialize this list with the local IPs.
  This presents a problem if you are mailing between virtual domains on
  the same machine.  Sendmail will be fooled into thinking another
  virtual domain is a local address and spool the mail locally.  For
  example, bob@domain1.com sends mail to fred@domain2.com.  Since
  domain1.com's sendmail thinks domain2.com is local, it will spool the
  mail on domain1.com and never send it to domain2.com.  You have to
  modify sendmail (I did this on v8.8.5 without a problem):


  vi v8.8.5/src/main.c # Approximately Line 494
  It should say:

  load_if_names();

  Replace it with:

  /* load_if_names(); Commented out since hurts virtual */



  Note only do this if you need to send mail between virtual domains
  which I think is probable.

  This will fix the problem.  However, the main ethernet device eth0 is
  not removed.  Therefore, if you send mail from a virtual IP to the one
  on eth0 on the same box it will delivery locally.  Therefore, I just
  use this as a dummy IP virtual1.maindomain.com (10.10.10.157).  I
  never send mail to this host so neither will the virtual domains.
  This is also the IP I would use to ssh into the box to check if the
  system is ok.


  9.3.6.  Sendmail Between Virtual Domains: New Sendmail Feature
  (POST8.8.6)

  As of Sendmail V8.8.6, there is a new option to disable loading of the
  extra network interfaces.  This means you do NOT have to alter the
  code in any way.  It is called  DontProbeInterfaces .


  Edit /virtual/domain1.com/etc/sendmail.cf



  vi /virtual/domain1.com/etc/sendmail.cf # Add the line
  O DontProbeInterfaces=True



  9.3.7.  Sendmail.init

  Sendmail cannot be started stand alone anymore so you have to run it
  through inetd.  This is inefficient and will result in lower start up
  time but if you had such a high hit site you would not share it on a
  virtual box with other domains.  Note that you are NOT running with
  the  -bd  flag.  Also note that you need a  sendmail -q  running for
  each domain to queue up undelivered mail. The new sendmail.init file:


  #!/bin/sh

  . /etc/rc.d/init.d/functions

  case "$1" in
    start)
          echo -n "Starting sendmail: "
          daemon sendmail -q1h
          echo
          echo -n "Starting virtual sendmail: "
          for i in /virtual/*
          do
                  if [ ! -d "$i" ]
                  then
                          continue
                  fi
                  if [ "$i" = "/virtual/lost+found" ]
                  then
                          continue
                  fi
                  chroot $i sendmail -q1h
                  echo -n "."
          done
          echo " done"
          touch /var/lock/subsys/sendmail
          ;;
    stop)
          echo -n "Stopping sendmail: "
          killproc sendmail
          echo
          rm -f /var/lock/subsys/sendmail
          ;;
    *)
          echo "Usage: sendmail {start|stop}"
          exit 1
  esac

  exit 0



  9.3.8.  Inetd Setup

  Pop should install normally with no extra effort.  It will just need
  the inetd entry for it with the virtuald part added.  The inetd.conf
  entries for sendmail and pop:



  pop-3 stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.pop in.qpop -s
  smtp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.mail sendmail -bs



  9.4.  Qmail Solution

  9.4.1.  Introduction

  This solution takes over the delivery responsibilities of qmail-local,
  so use of the .qmail files in the virtual home directories will not
  work.  However, each domain will still get a domain master user that
  will control aliasing for the whole domain.  Two external programs
  will be used for that domain masters .qmail-default file.  The mail
  will be passed through these two programs in order to deliver mail for
  each domain.


  Two programs are required since one of them is run setuid root.  It is
  a small program that changes to a non-root user and then runs the
  second program.  Consult your nearest security related site for a
  discussion as to why this is necessary.


  This solution bypasses the need for using virtuald.  Qmail is flexible
  enough to not require a general virtuald setup.  Qmail's design
  utilizes the chaining of programs together to deliver mail.  This
  design makes it very easy to insert the virtual section into the Qmail
  delivery process without altering a stock install of Qmail.


  A note that since you are using one Qmail any unqualified domain name
  will be expanded with the domain of the main server.  This is because
  you do not have a separate Qmail server for each domain.  Therefore,
  make sure that your client (Eudora, elm, mutt, etc.) knows to expand
  all of your unqualified domain names.


  9.4.2.  Setup Virtual Domains

  Qmail has to be configured to accept mail for each of the virtual
  domains you will be serving.  Type the following commands.


  echo "domain1.com:domain1" >> /var/qmail/control/virtualdomains



  9.4.3.  Setup Domain Master User

  Add to your main /etc/passwd file the user domain1.  I would make the
  shell /bin/false so that the domain master cannot log in.   That user
  will be able to add .qmail files and all mail for domain1 will route
  through that account.  Note that usernames can only be eight
  characters long and domain names can be longer.  The remaining
  characters are truncated.  That means that user domain12 and domain123
  are going to be the same user and Qmail might get confused.  So be
  careful in your master domain user naming convention.


  Create the domain master's .qmail files with the following commands.
  Add any other system aliases at this point.  For example, webmaster or
  hostmaster.


  echo "user@domain1.com" > /home/d/domain1/.qmail-mailer-daemon
  echo "user@domain1.com" > /home/d/domain1/.qmail-postmaster
  echo "user@domain1.com" > /home/d/domain1/.qmail-root



  Create the domain master's .qmail-default file.  This will filter all
  mail to the virtual domain.


  echo "| /usr/local/bin/virtmailfilter" > /home/d/domain1/.qmail-default



  9.4.4.  Tcpserver

  Qmail requires a special pop that can support the Maildir format.  The
  pop program has to be virtualized.  The author of Qmail recommends
  using tcpserver (an inetd replacement) with Qmail so my examples use
  tcpserver and NOT inetd.


  Tcpserver does not require a config file.  All the information can be
  passed to it via the command line.  Here is the tcpserver.init file
  that you would use for the mail daemon and popper:


  #!/bin/sh

  . /etc/rc.d/init.d/functions

  QMAILDUSER=`grep qmaild /etc/passwd | cut -d: -f3`
  QMAILDGROUP=`grep qmaild /etc/passwd | cut -d: -f4`

  # See how we were called.
  case "$1" in
    start)
          echo -n "Starting tcpserver: "
          tcpserver -u 0 -g 0 0 pop-3 /usr/local/bin/virtuald \
                  /virtual/conf.pop qmail-popup virt.domain1.com \
                  /bin/checkpassword /bin/qmail-pop3d Maildir &
          echo -n "pop "
          tcpserver -u $QMAILDUSER -g $QMAILDGROUP 0 smtp \
                  /var/qmail/bin/qmail-smtpd &
          echo -n "qmail "
          echo
          touch /var/lock/subsys/tcpserver
          ;;
    stop)
          echo -n "Stopping tcpserver: "
          killall -TERM tcpserver
          echo -n "killing "
          echo
          rm -f /var/lock/subsys/tcpserver
          ;;
    *)
          echo "Usage: tcpserver {start|stop}"
          exit 1
  esac

  exit 0

  9.4.5.  Qmail.init

  You can use the standard Qmail init script provided.  Qmail comes with
  very good documentation describing how to set this up.


  9.4.6.  Source

  You require two other programs to get virtual mail working with Qmail.
  They are virtmailfilter and virtmaildelivery.  This is the C source to
  virtmailfilter.  It should be installed in /usr/local/bin with
  permissions 4750, user root, and group nofiles.



  #include <sys/wait.h>
  #include <unistd.h>
  #include <string.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <ctype.h>
  #include <pwd.h>

  #define VIRTPRE                 "/virtual"

  #define VIRTPWFILE              "etc/passwd"
  #define VIRTDELIVERY            "/usr/local/bin/virtmaildelivery"
  #define VIRTDELIVERY0           "virtmaildelivery"

  #define PERM                    100
  #define TEMP                    111
  #define BUFSIZE                 8192

  int main(int argc,char **argv)
  {
          char *username,*usernameptr,*domain,*domainptr,*homedir;
          char virtpath[BUFSIZE];
          struct passwd *p;
          FILE *fppw;
          int status;
          gid_t gid;
          pid_t pid;

          if (!(username=getenv("EXT")))
          {
                  fprintf(stdout,"environment variable EXT not set\n");
                  exit(TEMP);
          }

          for(usernameptr=username;*usernameptr;usernameptr++)
          {
                  *usernameptr=tolower(*usernameptr);
          }

          if (!(domain=getenv("HOST")))
          {
                  fprintf(stdout,"environment variable HOST not set\n");
                  exit(TEMP);
          }

          for(domainptr=domain;*domainptr;domainptr++)
          {
                  if (*domainptr=='.' && *(domainptr+1)=='.')
                  {
                          fprintf(stdout,"environment variable HOST has ..\n");
                          exit(TEMP);
                  }
                  if (*domainptr=='/')
                  {
                          fprintf(stdout,"environment variable HOST has /\n");
                          exit(TEMP);
                  }

                  *domainptr=tolower(*domainptr);
          }

          for(domainptr=domain;;)
          {
                  snprintf(virtpath,BUFSIZE,"%s/%s",VIRTPRE,domainptr);
                  if (chdir(virtpath)>=0)
                          break;
                  if (!(domainptr=strchr(domainptr,'.')))
                  {
                          fprintf(stdout,"domain failed: %s\n",domain);
                          exit(TEMP);
                  }

                  domainptr++;
          }

          if (!(fppw=fopen(VIRTPWFILE,"r+")))
          {
                  fprintf(stdout,"fopen failed: %s\n",VIRTPWFILE);
                  exit(TEMP);
          }

          while((p=fgetpwent(fppw))!=NULL)
          {
                  if (!strcmp(p->pw_name,username))
                          break;
          }

          if (!p)
          {
                  fprintf(stdout,"user %s: not exist\n",username);
                  exit(PERM);
          }

          if (fclose(fppw)==EOF)
          {
                  fprintf(stdout,"fclose failed\n");
                  exit(TEMP);
          }

          gid=p->pw_gid;
          homedir=p->pw_dir;

          if (setgid(gid)<0 || setuid(p->pw_uid)<0)
          {
                  fprintf(stdout,"setuid/setgid failed\n");
                  exit(TEMP);
          }

          switch(pid=fork())
          {
                  case -1:
                          fprintf(stdout,"fork failed\n");
                          exit(TEMP);
                  case 0:
                          if (execl(VIRTDELIVERY,VIRTDELIVERY0,username,homedir,NULL)<0)
                          {
                                  fprintf(stdout,"execl failed\n");
                                  exit(TEMP);
                          }
                  default:
                          if (wait(&status)<0)
                          {
                                  fprintf(stdout,"wait failed\n");
                                  exit(TEMP);
                          }
                          if (!WIFEXITED(status))
                          {
                                  fprintf(stdout,"child did not exit normally\n");
                                  exit(TEMP);
                          }
                          break;
          }
          exit(WEXITSTATUS(status));
  }



  9.4.7.  Source

  You require two other programs to get virtual mail working with Qmail.
  They are virtmailfilter and virtmaildelivery.  This is the C source to
  virtmaildelivery.  It should be installed in /usr/local/bin with
  permissions 0755, user root, and group root.



  #include <sys/stat.h>
  #include <sys/file.h>
  #include <stdlib.h>
  #include <string.h>
  #include <unistd.h>
  #include <stdio.h>
  #include <errno.h>
  #include <time.h>

  #define TEMP                    111
  #define BUFSIZE                 8192
  #define ATTEMPTS                10

  int main(int argc,char **argv)
  {
          char *user,*homedir,*dtline,*rpline,buffer[BUFSIZE],*p,mail[BUFSIZE];
          char maildir[BUFSIZE],newmaildir[BUFSIZE],host[BUFSIZE];
          int fd,n,nl,i,retval;
          struct stat statp;
          time_t thetime;
          pid_t pid;
          FILE *fp;

          retval=0;

          if (!argv[1])
          {
                  fprintf(stdout,"invalid arguments: need username\n");
                  exit(TEMP);
          }

          user=argv[1];

          if (!argv[2])
          {
                  fprintf(stdout,"invalid arguments: need home directory\n");
                  exit(TEMP);
          }

          homedir=argv[2];

          if (!(dtline=getenv("DTLINE")))
          {
                  fprintf(stdout,"environment variable DTLINE not set\n");
                  exit(TEMP);
          }

          if (!(rpline=getenv("RPLINE")))
          {
                  fprintf(stdout,"environment variable RPLINE not set\n");
                  exit(TEMP);
          }

          while (*homedir=='/')
                  homedir++;
          snprintf(maildir,BUFSIZE,"%s/Maildir",homedir);
          if (chdir(maildir)<0)
          {
                  fprintf(stdout,"chdir failed: %s\n",maildir);
                  exit(TEMP);
          }

          time(&thetime);
          pid=getpid();
          if (gethostname(host,BUFSIZE)<0)
          {
                  fprintf(stdout,"gethostname failed\n");
                  exit(TEMP);
          }

          for(i=0;i<ATTEMPTS;i++)
          {
                  snprintf(mail,BUFSIZE,"tmp/%u.%d.%s",thetime,pid,host);
                  errno=0;
                  stat(mail,&statp);
                  if (errno==ENOENT)
                          break;

                  sleep(2);
                  time(&thetime);
          }
          if (i>=ATTEMPTS)
          {
                  fprintf(stdout,"could not create %s\n",mail);
                  exit(TEMP);
          }

          if (!(fp=fopen(mail,"w+")))
          {
                  fprintf(stdout,"fopen failed: %s\n",mail);
                  retval=TEMP; goto unlinkit;
          }

          fd=fileno(fp);

          if (fprintf(fp,"%s",rpline)<0)
          {
                  fprintf(stdout,"fprintf failed\n");
                  retval=TEMP; goto unlinkit;
          }

          if (fprintf(fp,"%s",dtline)<0)
          {
                  fprintf(stdout,"fprintf failed\n");
                  retval=TEMP; goto unlinkit;
          }

          while(fgets(buffer,BUFSIZE,stdin))
          {
                  for(p=buffer;*p=='>';p++)
                          ;

                  if (!strncmp(p,"From ",5))
                  {
                          if (fputc('>',fp)<0)
                          {
                                  fprintf(stdout,"fputc failed\n");
                                  retval=TEMP; goto unlinkit;
                          }
                  }

                  if (fprintf(fp,"%s",buffer)<0)
                  {
                          fprintf(stdout,"fprintf failed\n");
                          retval=TEMP; goto unlinkit;
                  }
          }

          p=buffer+strlen(buffer);
          nl=2;
          if (*p=='\n')
                  nl=1;
          for(n=0;n<nl;n++)
          {
                  if (fputc('\n',fp)<0)
                  {
                          fprintf(stdout,"fputc failed\n");
                          retval=TEMP; goto unlinkit;
                  }
          }

          if (fsync(fd)<0)
          {
                  fprintf(stdout,"fsync failed\n");
                  retval=TEMP; goto unlinkit;
          }

          if (fclose(fp)==EOF)
          {
                  fprintf(stdout,"fclose failed\n");
                  retval=TEMP; goto unlinkit;
          }

          snprintf(newmaildir,BUFSIZE,"new/%u.%d.%s",thetime,pid,host);
          if (link(mail,newmaildir)<0)
          {
                  fprintf(stdout,"link failed: %s %s\n",mail,newmaildir);
                  retval=TEMP; goto unlinkit;
          }

  unlinkit:
          if (unlink(mail)<0)
          {
                  fprintf(stdout,"unlink failed: %s\n",mail);
                  retval=TEMP;
          }

          exit(retval);
  }



  9.5.  Acknowledgement

  Thank you Vicente Gonzalez (vince@nycrc.net) for helping make the
  Qmail solution possible.  You can certainly mail your thanks to Vince,
  however all questions and comments including issues regarding Qmail,
  about this HOWTO should continue to be directed to me.


  10.  Virtual Samba

  10.1.  Setup

  Virtual SAMBA is very simple to install.  Make sure that the following
  files are setup properly:


  o  /virtual/domain1.com/etc/smb.conf FILE

  o  /virtual/domain1.com/var/lock/samba DIRECTORY

  o  /virtual/domain1.com/var/log DIRECTORY

  o  /usr/local/bin/virtsmbstatus SYMLINK /usr/local/bin/virtexec


  10.2.  Inetd

  Edit /etc/inetd.conf


  vi /etc/inetd.conf # Add this line
  netbios-ssn stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.smbd smbd



  10.3.  Smb.init

  An smb.init file is not needed since the server is run through inetd.


  11.  Virtual Other


  Any other service should be a similar procedure.


  o  Run virtfs to add the binaries and libraries to the virtual
     filesystem.

  o  Add it to /etc/inetd.conf.

  o  Create a /virtual/conf.service file.

  o  Create any virtual scripts that need to be made.


  12.  Conclusion

  Those are all the steps you need. Again mail any responses to Computer
  Resource Center.  If you have a question or an update to the document
  let me know and I will add it.


  The document has met with a very good response.  I thank all the
  people who sent me questions as they are helping to shape the document
  to meet the needs of users everywhere.  Before you ask a question I
  urge you to read the FAQ to see if it has been already asked and
  answered.  Thanks again.  Brian


  13.  FAQ

  Q1. I created sendmail.init and syslogd.init.  I put them in
  /usr/local/bin and tried to run them but I got errors.


  A1. These files are called init scripts.  They are run by the program
  init when your computer boots.  They do not go with the /usr/local
  binaries.  Consult the Linux System Administrators Guide or the Linux
  Getting Started Guide for information on how to use the init scripts
  system.


  Q2. I put these lines into /etc/sendmail.cf



  divert(0)
  VERSIONID(`tcpproto.mc')
  OSTYPE(linux)
  FEATURE(redirect)
  FEATURE(always_add_domain)
  FEATURE(use_cw_file)
  FEATURE(local_procmail)
  MAILER(local)
  MAILER(smtp)



  And I got really stange output.  Why?


  A2. You do not put these lines directly in /etc/sendmail.cf.  The
  sendmail.cf file was written to be easy for sendmail to understand and
  hard for humans to read.  Therefore, to make it easy to configure we
  use a program called m4 and its macro capabilities to create the
  sendmail.cf file.  The FEATURE lines are actually macros that expand
  to sendmail configuration statements.   See the sendmail docs on how
  to configure sendmail through this method.  Also note that you create
  a main /etc/sendmail.cf file and the virtfs script then copies this to
  /virtual/domain1.com/etc/sendmail.cf.  Then you edit that sendmail.cf
  file to respond as your domain.


  Q3. Where do I get virtuald, what is it, and how do I use it?


  A3. Virtuald is C source that I wrote to run a virtual service.  It is
  included with this HOWTO.  You compile it like a normal C program
   make virtuald .  The resulting binary is placed into /usr/local/bin.
  Add lines to /etc/inetd.conf that use virtuald as a wrapper to a
  normal network server program.


  Q4. I do not have dialog installed on my system?


  A4. Dialog is a program that allows you to put dialog pop up windows
  into your shell scripts.  It is required for my virtual shell script
  examples to work.  You can get a copy of dialog at sunsite.  It
  compiles very easily and should be no problem to install.


  Q5. How can I know if virtual syslogd is working?


  A5. When virtuald runs it should output the following messages to
  syslogd (/var/log/messages):


  Nov 19 17:21:07 virtual virtuald[10223]: Virtuald Starting: $Revision: 1.49 $
  Nov 19 17:21:07 virtual virtuald[10223]: Incoming ip: 204.249.11.136
  Nov 19 17:21:07 virtual virtuald[10223]: Chroot dir: /virtual/domain1.com



  The  Chroot  dir message is sent by virtuald after the  chroot  system
  call is performed.  If this message appears virtual syslogd is
  working.   If the service you are virtualizing logs messages to
  syslogd and you see them that is also a sign that virtual syslogd is
  correctly setup.


  Note that if you have not turned on the compile time option
  VERBOSELOG, virtuald will not log at all.  The only way to tell if
  virtual syslogd is working at that point is if the daemon you are
  virtualizing independently logs something to syslogd.


  Q6.  How can I setup quotas across virtual filesystems?


  A6.  You setup quotas like you would normally.  See the Quota mini-
  HOWTO.  However, you have to make sure there are no uid conflicts
  across domains.  If there are conflicts you will have users sharing a
  quota.  Set aside a range of uid's that you know will have quota's
  enabled and tell your domains that they cannot have any users in that
  range except the ones registered to have a quota.


  Q7.  What is this \ notation in all the inetd.conf entries?


  A7.  That is just a method of breaking up config files across two
  lines.  I did that so the line would word wrap in a nice place.  You
  can just ignore the \ and join the two lines back together.


  Q8.  When I run passwd or other login programs I get  permission
  denied .  When I run FTP or su I get  no modules loaded for service
  XXX .  Why?


  A8.  Those are PAM error messages.  I wrote these scripts before PAM
  was out.  My virtfs script does not copy /etc/pam.d,
  /usr/lib/cracklib_dict.*, /lib/security or any of the other files PAM
  requires.  PAM needs these to function.  If you edit my virtfs script
  to copy these files the problem will go away.


  Q9.  Can virtuald work with tcpd hosts.allow and hosts.deny files?


  A9.  Yes it can with some modifications.


  First the source has to be changed in two places.


  This has to be inserted where the arguments are checked.


          if (!argv[3])
          {
                  syslog(LOG_ERR,"invalid arguments: no program to run");
                  exit(0);
          }



  The exec line has to be changed from:


          if (execvp(argv[2],argv+2)<0)



  to:

          if (execvp(argv[2],argv+3)<0)



  Second the inetd.conf lines have to be changed from:


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp wu.ftpd -l -a



  to:


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp tcpd wu.ftpd -l -a



  Third edit the /virtual/domain1.com/etc/hosts.allow and
  /virtual/domain1.com/etc/hosts.deny files accordingly.


  Q10.  Can my virtual hosts run CGI's?


  A10.  Yes they can but I recommend putting the /cgi-bin in a place
  outside of the  chroot  that only you have access to.  For example,
  /var/www/cgi-bin/domain1.com.  Giving clients access to /cgi-bin is
  giving them the opportunity to run programs on your sever.  This is a
  big security hole.  Be careful.  I do not let any cgi run on my
  systems that I have not personally inspected for bugs.


  Q11.  My configuration files are different from your examples.   What
  do I do?


  A11.  There are two basic configuration styles: SystemV and BSD.  The
  examples provided in the HOWTO are based on SystemV style
  configuration files.  Virtual services works equally well on either
  system.  For information on BSD style configuration files consult the
  origin of your distribution or the nearest LDP site.


  Q12.  I sent you mail and have not heard a response from you or your
  response took a long time.  Why?


  A12.  Probably because you did not put VIRTSERVICES HOWTO in your
  subject header.  Please bear in mind that I am a network administrator
  and that among the other things I do in my 20 hour days is
  administering my own virtual boxes and those of my clients.  Mail that
  is properly addressed is always responded to within two or three days.
  Mail that is improperly addressed does not get filtered into my
  VIRTSERVICES mailbox and can lie around unnoticed for days or weeks.


  Q13.  Does virtuald work under 100Mbit?


  A13   The speed of the network card is unrelated to whether virtuald
  will work or not.  Try making sure that your server works under 10Mbit
  and that your 100Mbit network card works normally without a virtual
  server.
  Q14.  Should I use sendmail's virthost table?


  A14.  No.  That is sendmail's feature to accept info for multiple
  domains.  Virtuald gives each sendmail its own separate  chroot
  environment.  Install virtuald and then configure sendmail like you
  would normally for each domain.


  Q15.  Can I setup virtual telnet on my machine?  What about creating a
  virtual root account so clients can administer their own domains?


  A15.  These questions come to me quite often and to be honest, I am
  getting a bit tired of them.  The answer, as stated numerous times in
  the documentation, is that any service run through inetd can be
  virtualized using virtuald so there is nothing to stop you from doing
  either of the above.  Nothing except common sense.  Whatever benefits
  you might derive from allowing telnet are heavily outweighed by the
  cost to the virtual box (and thus the sites you are supposed to be
  hosting in a responsible manner) in terms of security.  Here are just
  a few issues involved:


  o  In order to completely fool an incoming telnet session you have to
     hack the kernel to get multiple procs working, reset your source IP
     address for outgoing connections, fool gethostname so it uses the
     virtual hostname and not the system hostname, etc.  If you are an
     advanced user then by all means hack the kernel.  For the newbie I
     do not recommend it.

  o  By allowing users to come into your box via telnet you allow them
     to run arbitrary programs.  Through known hacks you can get root
     and cause damage to the system.

  o  Giving a root telnet account on a virtual box is very bad.  A root
     virtual user can still read raw device files which nullifies the
     chroot , shutdown the system, and can kill other processes on the
     system.

  o  The programs that these telnet sessions are running take up
     valuable CPU time that the network services could be using.

  o  Telnet is an insecure network service.  Plain text passwords are
     sent out over the net.  If a malicious user gets this password
     he/she can use the above mentioned attacks to harm your system.

  o  Your virtual environments will have to be bigger.  You will need
     more shared libraries, more configuration files, and more binaries.
     A six gigabyte disk can run out of space really fast.


  The bottom line is that allowing login's on a virtual box is a really
  bad idea.  If permitted, every site hosted on that machine is at risk.
  If you want to allow a site holder to administer users then you are
  advised to write (not script) the code necessary to run the virtual
  processes that allow them to add, delete or modify users upon login
  through ssh.  This should be completely menu driven, should never
  allow a console and should not run as root.  In order to accomplish
  this you will have to change ownership of the pertinent files from
  root to some other user.  If done in this manner it is marginally safe
  to incorporate into a virtual machine.  There is never an acceptable
  time to allow root login's either through telnet or ssh.  Doing so is
  simply an invitation to disaster.  If there is an overwhelming reason
  to run telnet then the site should be hosted on a dedicated machine
  where the only risk is to the individual site.  No responsible
  administrator would ever do otherwise and so I will waste no more time
  on this issue.


  Q16.  Is there an rpm, tar, web site, mailing list, etc. associated
  with virtuald and the Virtual-Services HOWTO?


  A16.  Currently there is nothing like that available.  This HOWTO is
  the only source of information to everything I do concerning this
  project.  I find the HOWTO to be fairly self contained making the need
  for other pieces of information superfluous.


  Q17.  When I try to run virtexec as a regular user I get  chroot:
  operation not permitted .  Why?


  A17.   Chroot  is a root restricted system call.  Only the superuser
  can execute it.  The virtexec script runs the  chroot  program which
  is why you need to be root in order to run it.


  Q18.  I setup pop and sendmail but popping mail does not seem to work.
  How come?


  A18.  Some pop programs come with /usr/spool/mail as their place for
  mail files.  I know that qpop has to be manually editted to fix this.
  Either recompile the source to your program or symlink
  /virtual/domain1.com/usr/spool to /virtual/domain1.com/var/spool.


  Q19.  I did not use the program mentioned in your HOWTO, I used
  program XXX.  It does not work.  Why?


  A19.  I tried to make sure to use the most generic of each server in
  my examples.  However, I know that everyone has their favorite version
  of each server.   Send me as much information as possible and I will
  try to figure out how to solve your problem and document it in the
  FAQ.  The most important piece of information to send me is where to
  get the version of the software you are running (in the form
  ftp://ftp.domain1.com/subdir/subdir/file.tgz).


  Q20.  When I run virtexec is says  symlink not a virt function .  What
  does this mean and how do I fix it?


  A20.  Virtexec is a program that will take its zero argument, strip
  off the first four characters, and run the remaining name in the
  virtual environment.  For example, virtpasswd runs passwd.  If the
  first four characters that it strips off are not  virt  it complains
  and outputs that error message.  Virtexec is written in shell script
  and should be fairly simple to follow.  Refer to the manual pages on
  bash or whatever shell you run for questions about shell script
  programming.


  Q21.  I have a question about Qmail, SAMBA, Apache, etc. that is
  unrelated to the virtuald setup or how the package interfaces to
  virtuald.



  A21.  All the packages described here are fully documented.  Some even
  have full web sites like www.packagename.org dedicated to them.
  Please consult them about questions dealing with the package that are
  unrelated to their virtual hosting functionality.


  Q22.  I have several domain aliases to domain1.com but mail keeps
  bouncing from the aliases.   How come?


  A22.  Virtmaildelivery relies on the environment variables passed to
  it to determine which /virtual/domain1.com directory to deliver to.
  It does not perform any DNS lookups to determine the address of the
  mail.  However, if the address is submail.mail.domain1.com,
  virtmaildelivery will first try that address and then mail.domain1.com
  and then domain1.com and then com in that order until either a match
  happens or there is no domain name left.


  However, if you have domain aliases that are not subdomains of one
  another you have to create symlinks like so:


  cd /virtual
  ln -s domain1.com domain1alias.com



  That way virtmaildelivery will be fooled into thinking that both
  directories exist even though one is a symlink and mail will be able
  to be delivered to user@domain1.com or user@domain1alias.com.  Note
  that virtexec will list both of the domains in the dialog box when
  your run it.  You can choose either one since they will be the same
  virtual filesystem.



  Linux WWW HOWTO
  by Mr. Poet, poet@linuxports.com
  v0.85, 21 August 1999

  This document contains information about setting up WWW services under
  Linux (both server and client).  It tries not to be a in detail manual
  but an overview and a good pointer to further information.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Copyright
     1.2 Feedback
     1.3 New versions of this Document

  2. Setting up WWW client software (Antiquated)

     2.1 Overview

  3. Lynx

     3.1 Where to get

  4. Emacs-W3

     4.1 Where to get

  5. Netscape Navigator/Communicator

     5.1 Different versions and options.
     5.2 Where to get
     5.3 Installing

  6. Setting up WWW server systems

     6.1 Overview

  7. Apache

     7.1 Where to get
     7.2 Compiling and Installing
     7.3 Configuring
     7.4 Hosting virtual websites
        7.4.1 IP based virtual hosting
        7.4.2 Shared IP virtual hosting
     7.5 CGI scripts
     7.6 Users Web Directories
     7.7 Daemon mode vs. Inetd mode
     7.8 Allowing put and delete commands
     7.9 User Authentication/Access Control
     7.10 su-exec
     7.11 Imagemaps
     7.12 SSI/XSSI
     7.13 Module system

  8. Web Server Add-ons

  9. Intranet Section

     9.1 What is required
     9.2 New versions of this document
     9.3 Feedback

  10. Install the HTTP server

     10.1 Preparation before downloading
        10.1.1 The Operating System
        10.1.2 Process type (ServerType)
        10.1.3 Binding Port (Port)
        10.1.4 Server user identity (User)
        10.1.5 Server group identity (Group)
        10.1.6 Server administrator email address (ServerAdmin)
        10.1.7 Location of server directory (ServerRoot)
        10.1.8 Location of HTML files (DocumentRoot)
     10.2 Compiling HTTPd
  11. Testing HTTPd

  12. Connecting to the Linux Server

     12.1 Setup the Linux server
     12.2 Setup the Netware server
     12.3 Setup the Netware Client
        12.3.1 Windows 3.x
        12.3.2 Windows 95
     12.4 Setup Microsoft Client
        12.4.1 Windows for Workgroups
        12.4.2 Windows 95
        12.4.3 Windows NT
     12.5 Setup TCP/IP on Macintosh
        12.5.1 MacTCP

  13. Setting up the Intranet

     13.1 NCPFS
        13.1.1 Installation
        13.1.2 Mounting NCPFS
     13.2 SMBFS
        13.2.1 Installation
        13.2.2 Mounting SMBFS
     13.3 NFS

  14. Accessing the Web

     14.1 Accessing the mounted filesystems
     14.2 Connecting to the Internet
     14.3 Other uses

  15. More things to do

  16. Credits and Legalities

     16.1 Thanks
     16.2 Copyright information

  17. For further reading

     17.1 O'Reilly & Associates Books
     17.2 Internet Request For Comments (RFC)


  ______________________________________________________________________

  1.  Introduction


  Many people are trying Linux because they are looking for a really
  good Internet capable operating system.  Also, there are institutes,
  universities, non-profits, and small businesses which want to set up
  Internet sites on a small budget. This is where the WWW-HOWTO comes
  in. This document explains how to set up clients and servers for the
  largest part of the Internet - The World Wide Web.

  All prices in this document are stated in US dollars.  This document
  assumes you are running Linux on an Intel platform.  Instructions and
  product availability my vary from platform to platform.  There are
  many links for downloading software in this document.  Whenever
  possible use a mirror site for faster downloading and to keep the load
  down on the main server.



  1.1.  Copyright

  This document is Copyright (c) 1999 by Mr. Poet

  This document is Copyright (c) 1997 by Wayne Leister. The original
  author of this document was Peter Dreuw.(All versions prior to 0.8)


  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.


  This document is distributed in the hope that it will be useful, but
  without any warranty; without even the implied warranty of
  merchantability or fitness for a particular purpose. See the GNU
  General Public License for more details.


  You can obtain a copy of the GNU General Public License by writing to
  the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.

  Trademarks are owned by there respective owners.



  1.2.  Feedback

  Any feedback is welcome.  I do not claim to be an expert.  Some of
  this information was taken from badly written web sites; there are
  bound to be errors and omissions.  But make sure you have the latest
  version before you send corrections; It may be fixed in the next
  version (see the next section for where to get the latest version).
  Send feedback to poet@linuxports.com.


  1.3.  New versions of this Document

  New versions of this document are always available at the LinuxPorts
  Website.



  2.  Setting up WWW client software (Antiquated)


       Please note that the following section is very outdated and
       was last updated in 1997. This section is being kept here
       for historical purposes only. All major distributions of
       Linux come with Netscape and Lynx. These are the two most
       popular browsers for the Linux Operating System. If you do
       not have these browsers installed currently please go to
       their respective sections for download information.


  The following chapter is dedicated to the setting up web browsers.
  Please feel free to contact me, if your favorite web browser is not
  mentioned here.   In this version of the document only a few of the
  browsers have there own section, but I tried to include all of them
  (all I could find) in the overview section.  In the future those
  browsers that deserve there own section will have it.
  The overview section is designed to help you decide which browser to
  use, and give you basic information on each browser.  The detail
  section is designed to help you install, configure, and maintain the
  browser.

  However I use Lynx when I don't feel like firing up the X-
  windows/Netscape monster.


  2.1.  Overview


     ``Navigator/Communicator''
        Netscape Navigator is the only Linux browser mentioned here,
        which is capable of advanced HTML features.  Some of these
        features are frames, Java, Javascript, automatic update, and
        layers.  It also has news and mail capability.  But it is a
        resource hog; it takes up lots of CPU time and memory.  It also
        sets up a separate cache for each user wasting disk space.

        Netscape is currently an OpenSource product and can be
        downloaded from ftp.netscape.com=>.  <tag><ref id= name="Lynx">
        Lynx is the one of the smallest web browsers.  It is the king of
        text based browsers.  It's free and the source code is available
        under the GNU public license.  It's text based, but it has many
        special features. Lynx now supports tables, color (via curses)
        and frames.


          Note on frame support for lynx:


     The frame support for lynx is limited, it will notice the frames
     and show the title of the frames for your to select as hot links.
     Since, frame titles are usually very undescriptive for coding
     simplicity this can be confusing.



     Kfm
        Kfm is part of the K Desktop Environment (KDE).  KDE is a system
        that runs on top of X-windows.  It gives you many features like
        drag an drop, sounds, a trashcan and a unified look and feel.
        Kfm is the K File Manager, but it is also a web browser. It is
        very usable as a web browser and it supports frames, tables, ftp
        downloads, looking into tar files, and more.  The current
        release of KDE is 1.1.1 with 1.1.2 very near by.  Kfm can be
        used without KDE, but you still need the librarys that come with
        KDE.  For more information about KDE and Kfm visit the KDE
        website at  <http://www.kde.org>.


     ``Emacs''
        Emacs is the one program that does everything.  It is a word
        processor, news reader, mail reader, and web browser.  It has a
        steep learning curve at first, because you have to learn what
        all the keys do.  The X-windows version is easier to use,
        because most of the functions are on menus.  Another drawback is
        that it's mostly text based. (It can display graphics if you are
        running it under X-windows).  It is also free, and the source
        code is available under the GNU public license.


     NCSA Mosaic
        Mosaic is an X-windows browser developed by the National Center
        for Supercomputing Applications (NCSA) at the University of
        Illinois.  NCSA spent four years on the project and has now
        moved on to other things.  Again, Mosaic is no longer supported.
        However since the source is free for non-commercial use it might
        make an interesting project for someone who wants to develop a
        new browser.


     Amaya
        Amaya is the X-windows concept browser for the W3C for HTML 3.2.
        Therefore it supports all the HTML 3.2 standards.  It also
        supports some of the features of HTML 4.0.  It supports tables,
        forms, client side image maps, put publishing, gifs, jpegs, and
        png graphics.  It is both a browser and authoring tool.  The
        latest public release is 1.0 beta.  Version 1.1 beta is in
        internal testing and is due out soon.  For more information
        visit the Amaya web site at  <http://www.w3.org/Amaya/>.  It can
        be downloaded from <ftp://ftp.w3.org/pub/Amaya-LINUX-
        ELF-1.0b.tar.gz>.


     Qweb
        Qweb is yet another basic X-windows browser.  It supports
        tables, forms, and server site image maps.  The latest version
        is 1.3.  For more information visit the Qweb website at
        <http://sunsite.auc.dk/qweb/> The source is available from
        <http://sunsite.auc.dk/qweb/qweb-1.3.tar.gz> The binaries are
        available in a Red Hat RPM from
        <http://sunsite.auc.dk/qweb/qweb-1.3-1.i386.rpm>


  It is the reccomendation of this author that users of web browsers use
  either Netscape 4.x, Lynx or Netscape 5.xAlpha. They are the only one
  currently available for Linux that support most features. Personally I
  suggest Netscape5.xAlpha, even though it is Alpha Software it is quite
  stable and frankly implements the standards better than the 4.x
  versions do.



  3.  Lynx

  Lynx is one of the smaller (around 600 K executable) and faster web
  browsers available. It does not eat up much bandwidth nor system
  resources as it only deals with text displays.  It can display on any
  console, terminal or xterm. You will not need an  X Windows system or
  additional system memory to run this little browser.


  3.1.  Where to get

  Most distributions have Lynx in them.  Therefore I will not bore you
  with the details of compiling and installing Lynx.

  The latest version is 2.8.2 and can be retrieved from
  <http://www.slcc.edu/lynx/fote/> or from almost any friendly Linux FTP
  server like ftp://sunsite.unc.edu under /pub/Linux/apps/www/broswers/
  or mirror site.

  For more information on Lynx try these locations:

     Lynx Links
        <http://www.crl.com/~subir/lynx.html>


     Lynx Pages
        <http://lynx.browser.org>

     Lynx Help Pages
        <http://www.crl.com/~subir/lynx/lynx_help/lynx_help_main.html>
        (the same pages you get from lynx --help and typing ? in lynx)

  Note: The Lynx help pages have recently moved.  If you have an older
  version of Lynx, you will need to change your lynx.cfg (in /usr/lib)
  to point to the new address(above).

  I think the most special feature of Lynx against all other web
  browsers is the capability for batch mode retrieval. One can write a
  shell script which retrieves a document, file or anything like that
  via http, FTP, gopher, WAIS, NNTP or file:// - url's and save it to
  disk.  Furthermore, one can fill in data into HTML forms in batch mode
  by simply redirecting the standard input and using the -post_data
  option.

  For more special features of Lynx just look at the help files and the
  man pages.  If you use a special feature of Lynx that you would like
  to see added to this document, let me know.



  4.  Emacs-W3

  There are several different flavors of Emacs.  The two most popular
  are GNU Emacs and XEmacs.  GNU Emacs is put out by the Free Software
  Foundation, and is the original Emacs.  It is mainly geared toward
  text based terminals, but it does run in X-Windows.  XEmacs (formerly
  Lucid Emacs) is a version that only runs on X-Windows.  It has many
  special features that are X-Windows related (better menus etc).


  4.1.  Where to get


  Most distributions include GNU Emacs.

  The most recent GNU emacs is 19.34.  It doesn't seem to have a web
  site.  The FTP site is at  <ftp://ftp.gnu.ai.mit.edu/pub/gnu/>.

  The latest version of XEmacs is 20.2.  The XEmacs FTP site is at
  <ftp://ftp.xemacs.org/pub/xemacs>.  For more information about XEmacs
  goto see its web page at <http://www.xemacs.org>.

  Both are available from the Linux archives at ftp://sunsite.unc.edu
  under /pub/Linux/apps/editors/emacs/


  If you got GNU Emacs or XEmacs installed, you probably got the W3
  browser running to.

  The Emacs W3 mode is a nearly fully featured web browser system
  written in the Emacs Lisp system. It mostly deals with text, but can
  display graphics, too - at least - if you run the emacs under the X
  Window system.

  To get XEmacs in to W3 mode, goto the apps menu and select browse the
  web.

  I don't use Emacs, so if someone will explain how to get it into the
  W3 mode I'll add it to this document.  Most of this information was
  from the original author.  If any information is incorrect, please let
  me know.  Also let me know if you think anything else should be added
  about Emacs.



  5.  Netscape Navigator/Communicator


  5.1.  Different versions and options.

  Netscape Navigator is the King of WWW browsers.  Netscape Navigator
  can do almost everything. But on the other hand, it is one of the most
  memory hungry and resource eating program I've ever seen.

  There are 3 different versions of the program:

  Netscape Navigator includes the web browser, netcaster (push client)
  and a basic mail program.

  Netscape Communicator includes the web browser, a web editor, an
  advanced mail program, a news reader, netcaster (push client), and a
  group conference utility.

  Netscape Communicator Pro includes everything Communicator has plus a
  group calendar, IBM terminal emulation, and remote administration
  features (administrators can update thousands of copies of Netscape
  from their desk).

  In addition to the three versions there are two other options you must
  pick.

  The first is full install or base install.  The full install includes
  everything.  The base install includes enough to get you started.  You
  can download the additional components as you need them (such as
  multimedia support and netcaster).  These components can be installed
  by the Netscape smart update utility (after installing goto
  help->software updates).  At this time the full install is not
  available for Linux.

  The second option is import or export.  If you are from the US are
  Canada you have the option of selecting the import version.  This
  gives you the stronger 128 bit encryption for secure transactions
  (SSL).  The export version only has 40 bit encryption, and is the only
  version allowed outside the US and Canada.

  The latest version of the Netscape Navigator/Communicator/Communicator
  Pro is 4.6.1.  There are two different versions for Linux.  One is for
  the old 1.2 series kernels and one for the new 2.x kernels.  If you
  don't have at least a 2.0 kernel I suggest you upgrade; there are many
  improvements in the new kernel.

  Beta versions are also available.  If you try a beta version, they
  usually expire in a month or so!

  You can also try the 5.0 alpha at the Mozilla project located at
  www.mozilla.org. I suggest this highly, the new Netscape 5 is the best
  browser I have seen in a long time. It is extremely flexible and
  mostly stable even for an Alpha release.

  5.2.  Where to get


  The best way to get Netscape software is to go through their web site
  at <http://www.netscape.com/download/>.  They have menu's to guide you
  through the selection.  When it ask for the Linux version, it is
  referring to the kernel (most people should be using 2.0 by now).  If
  your not sure which version kernel you have run 'cat /proc/version'.
  Going through the web site is the only way to get the import versions.

  If you want an export version you can download them directly from the
  Netscape FTP servers.  The FTP servers are also more up to date. For
  example when I first wrote this the web interface did not have the
  non-beta 4.03 for Linux yet, but it was on the FTP site.  Here are the
  links to the export Linux 2.0 and 2.2 versions:

  Netscape Navigator 4.6.1 is at
  <ftp://ftp.netscape.com/pub/communicator/4.6/shipping/english/unix/linux20/navigator_standalone/navigator-
  v403-export.x86-unknown-linux2.0.tar.gz>

  Netscape Communicator 4.6.1 for Linux 2.0 (kernel) is at
  <ftp://ftp.netscape.com/pub/communicator/4.6/shipping/english/unix/linux20/base_install/communicator-
  v403-export.x86-unknown-linux2.0.tar.gz>

  These url's will change as new versions come out.  If these links
  break you can find them by fishing around at the FTP site
  <ftp://ftp.netscape.com/pub/communicator/>.

  These servers are heavily loaded at times.  Its best to wait for off
  peak hours or select a mirror site.  Be prepared to wait, these
  archives are large.  Navigator is almost 8megs, and Communicator base
  install is 10megs.


  5.3.  Installing

  This section explains how to install version 4 of Netscape Navigator,
  Communicator, and Communicator Pro.

  First unpack the archive to a temporary directory.  Then run the ns-
  install script (type ./ns-install).  Then make a symbolic link from
  the /usr/local/netscape/netscape binary to /usr/local/bin/netscape
  (type ln -s /usr/local/netscape/netscape /usr/local/bin/netscape).
  Finally set the system wide environment variable $MOZILLA_HOME to
  /usr/local/netscape so Netscape can find its files.  If you are using
  bash for your shell edit your /etc/profile and add the lines:



       MOZILLA_HOME="/usr/local/netscape"
       export MOZILLA_HOME



  After you have it installed the software can automatically update
  itself with smart update.  Just run Netscape as root and goto
  help->software updates.  If you only got the base install, you can
  also install the Netscape components from there.

  Note: This will not remove any old versions of Netscape, you must
  manually remove them by deleting the Netscape binary and Java class
  file (for version 3).



  6.  Setting up WWW server systems

  This section contains information on different http server software
  packages and additional server side tools like script languages for
  CGI programs etc.  There are several dozen web servers, I only covered
  those that are fully functional.  As some of these are commercial
  products, I have no way of trying them.  Most of the information in
  the overview section was pieced together from various web sites.  If
  there is any incorrect or missing information please let me know.

  For a technical description on the http mechanism, take a look at the
  RFC documents mentioned in the chapter "For further reading" of this
  HOWTO.

  I prefer to use the Apache server.  It has almost all the features you
  would ever need and its free!  I will admit that this section is
  heavily biased toward Apache.  I decided to concentrate my efforts on
  the Apache section rather than spread it out over all the web servers.
  I may cover other web servers in the future.



  6.1.  Overview


     Cern httpd
        This was the first web server.  It was developed by the European
        Laboratory for Particle Physics (CERN).  CERN httpd is no longer
        supported.  The CERN httpd server is reported to have some ugly
        bugs, to be quite slow and resource hungry.  The latest version
        is 3.0.  For more information visit the CERN httpd home page at
        <http://www.w3.org/Daemon/Status.html>.  It is available for
        download at
        <ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/httpd-3.0.term.tpz>
        (no it is not a typo, the extension is actually .tpz on the
        site; probably should be .tgz)


     NCSA HTTPd
        The NCSA HTTPd server is the father to Apache (The development
        split into two different servers).   Therefore the setup files
        are very similar.  NCSA HTTPd is free and the source code is
        available.  This server not covered in this document, although
        reading the Apache section may give you some help.  The NCSA
        server was once popular, but most people are replacing it with
        Apache.  Apache is a drop in replacement for the NCSA
        server(same configuration files), and it fixes several
        shortcomings of the NCSA server.  NCSA HTTPd accounts for 4.9%
        (and falling) of all web servers. (source September 1997
        Netcraft survey <http://www.netcraft.com/survey/>).  The latest
        version is 1.5.2a.  For more information see the NCSA website at
        <http://hoohoo.ncsa.uiuc.edu>.


     ``Apache''
        Apache is the king of all web servers.  Apache and its source
        code is free.  Apache is modular, therefore it is easy to add
        features.  Apache is very flexible and has many, many features.
        Apache and its derivatives makes up 55% of all web domains.
        There are over 3,928,112 Apache servers in operation (source
        August 1999 Netcraft survey <http://www.netcraft.com/survey/>).

        The official Apache is missing SSL, but there are two
        derivatives that fill the gap.  Stronghold is a commercial
        product that is based on Apache.  It retails for $995; an
        economy version is available for $495 (based on an old version
        of Apache).  Stronghold is the number two secure server behind
        Netscape (source C2 net <http://www.c2.net/products/stronghold>
        and Netcraft survey <http://www.netcraft.com/survey/>).  For
        more information visit the Stronghold website at
        <http://www.c2.net/products/stronghold/>.  It was developed
        outside the US, so it is available with 128 bit SSL everywhere.

        Apache-SSL is a free implementation of SSL, but it is not for
        commercial use in the US (RSA has US patents on SSL technology).
        It can be used for non-commercial use in the US if you link with
        the free RSAREF library.  For more information see the website
        at <http://www.algroup.co.uk/Apache-SSL/>.


     Netscape Fast Track Server
        Fast Track was developed by Netscape, but the Linux version is
        put out by Caldera.  The Caldera site lists it as Fast Track for
        OpenLinux.  I'm not sure if it only runs on Caldera OpenLinux or
        if any Linux distribution will do (E-mail me if you have the
        answer).  Netscape servers account for 6.11% (and RISING!) of
        all web servers (source August 1999
        <http://www.netcraft.com/survey/>).  The server sells for $295.
        It is also included with the Caldera OpenLinux Standard
        distribution which sells for $399 ($199.50 educational).  The
        web pages tell of a nice administration interface and a quick 10
        minute setup.  The server has support for 40-bit SSL.  To get
        the full 128-bit SSL you need Netscape Enterprise Server.
        Unfortunately that is not available for Linux :( The latest
        version available for Linux is 2.0 (Version 3 is in beta, but
        its not available for Linux yet).  To buy a copy goto the
        Caldera web site at
        <http://www.caldera.com/products/netscape/netscape.html> For
        more information goto the Fast Track page at
        <http://www.netscape.com/comprod/server_central/product/fast_track/>



     WN WN has many features that make it attractive.  First it is
        smaller than the CERN, NCSA HTTPd, an Apache servers.  It also
        has many built-in features that would require CGI's.  For
        example site searches, enhanced server side includes.  It can
        also decompress/compress files on the fly with its filter
        feature.  It also has the ability to retrieve only part of a
        file with its ranges feature.  It is released under the GNU
        public license.  The current version is 2.08. For more
        information see the WN website at <http://hopf.math.nwu.edu/>.


     AOLserver
        AOLserver is made by America Online.  I'll admit that I was
        surprised by the features of a web server coming from AOL.  In
        addition to the standard features it supports database
        connectivity.  Pages can query a database by Structured Query
        Language (SQL) commands.  The database is access through Open
        Database Connectivity (ODBC).  It also has built-in search
        engine and TCL scripting.  If that is not enough you can add
        your own modules through the c Application Programming Interface
        (API).  I almost forgot to mention support for 40 bit SSL.  And
        you get all this for free!  For more information visit the
        AOLserver site at <http://www.aolserver.com/server/>


     CL-HTTP
        CL-HTTP stands for Common Lisp Hypermedia Server.  If you are a
        Lisp programmer this server is for you.  You can write your CGI
        scripts in Lisp.  It has a web based setup function.  It also
        supports all the standard server features.  CL-HTTP is free and
        the source code is available.  For more information visit the
        CL-HTTP website at <http://www.ai.mit.edu/projects/iiip/doc/cl-
        http/home-page.html>

  If you have a commercial purpose (company web site, or ISP), I would
  strongly recommend that you use Apache.  I've also heard that the
  Netscape Server is easy to setup. If you have an internal use you can
  be a bit more flexible. But unless one of them has a feature that you
  just have to use,

  This is only a partial listing of all the servers available.  For a
  more complete list visit Netcraft at
  <http://www.netcraft.com/survey/servers.html> or Web Compare at
  <http://webcompare.internet.com>.



  7.  Apache

  The current version of Apache is 1.3.9.  The main Apache site is at
  <http://www.apache.org/>.  Another good source of information is
  Apacheweek at <http://www.apacheweek.com/>.  The Apache documentation
  is ok, so I'm not going to go into detail in setting up apache.  The
  documentation is on the website and is included with the source (in
  HTML format).  There are also text files included with the source, but
  the HTML version is better.  The documentation should get a whole lot
  better once the Apache Documentation Project gets under way.  Right
  now most of the documents are written by the developers.  Not to
  discredit the developers, but they are a little hard to understand if
  you don't know the terminology.


  7.1.  Where to get

  Apache is included in the Red Hat, Slackware, and OpenLinux
  distributions.  Although they may not be the latest version, they are
  very reliable binaries.  The bad news is you will have to live with
  their directory choices (which are totally different from each other
  and the Apache defaults).

  The source is available from the Apache web site at
  <http://www.apache.org/dist/> Binaries are are also available at
  apache at the same place.  You can also get binaries from sunsite at
  <ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/>.  And for those of
  us running Red Hat the latest binary RPM file can usually be found in
  the contrib directory at <ftp://ftp.redhat.com/pub/contrib/i386/>

  If your server is going to be used for commercial purposes, it is
  highly recommended that you get the source from the Apache website and
  compile it yourself.  The other option is to use a binary that comes
  with a major distribution.  For example Slackware, Red Hat, or
  OpenLinux distributions.  The main reason for this is security.  An
  unknown binary could have a back door for hackers, or an unstable
  patch that could crash your system. This also gives you more control
  over what modules are compiled in, and allows you to set the default
  directories.  It's not that difficult to compile Apache, and besides
  you not a real Linux user until you compile your own programs ;)



  7.2.  Compiling and Installing

  First untar the archive to a temporary directory.  Next change to the
  src directory.  Then edit the Configuration file if you want to
  include any special modules.  The most commonly used modules are
  already included.  There is no need to change the rules or makefile
  stuff for Linux.  Next run the Configure shell script (./Configure).
  Make sure it says Linux platform and gcc as the compiler.  Next you
  may want to edit the httpd.h file to change the default directories.
  The server home (where the config files are kept) default is
  /usr/local/etc/httpd/, but you may want to change it to just
  /etc/httpd/.  And the server root (where the HTML pages are served
  from) default is /usr/local/etc/httpd/htdocs/, but I like the
  directory /home/httpd/html (the Red Hat default for Apache).  If you
  are going to be using su-exec (see special features below) you may
  want to change that directory too.  The server root can also be
  changed from the config files too.  But it is also good to compile it
  in, just encase Apache can't find or read the config file.  Everything
  else should be changed from the config files.  Finally run make to
  compile Apache.

  If you run in to problems with include files missing, check the
  following things. Make sure you have the kernel headers (include
  files) installed for your kernel version. Also make sure you have
  these symbolic links in place:


       /usr/include/linux should be a link to /usr/src/linux/include/linux
       /usr/include/asm should be a link to /usr/src/linux/include/asm
       /usr/src/linux should be a link to the Linux source directory (ex.linux-2.0.30)



  Links can be made with ln -s, it works just like the cp command except
  it makes a link (ln -s source-dir destination-link)

  When make is finished there should be an executable named httpd in the
  directory.  This needs to be moved in to a bin directory.  /usr/sbin
  or /usr/local/sbin would be good choices.

  Copy the conf, logs, and icons sub-directories from the source to the
  server home directory.  Next rename 3 of the files files in the conf
  sub-directory to get rid of the -dist extension (ex. httpd.conf-dist
  becomes httpd.conf)

  There are also several support programs that are included with Apache.
  They are in the support directory and must be compiled and installed
  separately.  Most of them can be make by using the makefile in that
  directory (which is made when you run the main Configure script).  You
  don't need any of them to run Apache, but some of them make the
  administrators job easier.


  7.3.  Configuring

  Now you should have four files in your conf sub-directory (under your
  server home directory).  The httpd.conf sets up the server daemon
  (port number, user, etc).  The srm.conf sets the root document tree,
  special handlers, etc.  The access.conf sets the base case for access.
  Finally mime.types tells the server what mime type to send to the
  browser for each extension.

  The configuration files are pretty much self-documented (plenty of
  comments), as long as you understand the lingo.  You should read
  through them thoroughly before putting your server to work.  Each
  configuration item is covered in the Apache documentation.

  The mime.types file is not really a configuration file.  It is used by
  the server to translate file extensions into mime-types to send to the
  browser.  Most of the common mime-types are already in the file.  Most
  people should not need to edit this file.  As time goes on, more mime
  types will be added to support new programs.  The best thing to do is
  get a new mime-types file (and maybe a new version of the server) at
  that time.

  Always remember when you change the configuration files you need to
  restart Apache or send it the SIGHUP signal with kill for the changes
  to take effect.  Make sure you send the signal to the parent process
  and not any of the child processes.  The parent usually has the lowest
  process id number.  The process id of the parent is also in the
  httpd.pid file in the log directory.  If you accidently send it to one
  of the child processes the child will die and the parent will restart
  it.

  I will not be walking you through the steps of configuring Apache.
  Instead I will deal with specific issues, choices to be made, and
  special features.

  I highly recommend that all users read through the security tips in
  the Apache documentation.  It is also available from the Apache
  website at <http://www.apache.org/docs/mics/security_tips.html>.


  7.4.  Hosting virtual websites

  Virtual Hosting is when one computer has more than one domain name.
  The old way was to have each virtual host have its own IP address.
  The new way uses only one IP address, but it doesn't work correctly
  with browsers that don't support HTTP 1.1.

  My recommendation for businesses is to go with the IP based virtual
  hosting until most people have browsers that support HTTP 1.1 (give it
  a year or two).   This also gives you a more complete illusion of
  virtual hosting.  While both methods can give you virtual mail
  capabilities (can someone confirm this?), only IP based virtual
  hosting can also give you virtual FTP as well.

  If it is for a club or personal page, you may want to consider shared
  IP virtual hosting.  It should be cheaper than IP based hosting and
  you will be saving precious IP addresses.

  You can also mix and match IP and shared IP virtual hosts on the same
  server.  For more information on virtual hosting visit Apacheweek at
  <http://www.apacheweek.com/features/vhost>.


  7.4.1.  IP based virtual hosting

  In this method each virtual host has its own IP address.  By
  determining the IP address that the request was sent to, Apache and
  other programs can tell what domain to serve.  This is an incredible
  waste of IP space.  Take for example the servers where my virtual
  domain is kept.  They have over 35,000 virtual accounts, that means
  35,000 IP addresses.  Yet I believe at last count they had less than
  50 servers running.

  Setting this up is a two part process.  The first is getting Linux
  setup to accept more than one IP address.  The second is setting up
  apache to serve the virtual hosts.

  The first step in setting up Linux to accept multiple IP addresses is
  to make a new kernel.  This works best with a 2.0 series kernel (or
  higher).  You need to include IP networking and IP aliasing support.
  If you need help with compiling the kernel see the kernel howto
  <http://sunsite.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>.

  Next you need to setup each interface at boot.  If you are using the
  Red Hat Distribution then this can be done from the control panel.
  Start X-windows as root, you should see a control panel.  Then double
  click on network configuration.  Next goto the interfaces panel and
  select your network card.  Then click alias at the bottom of the
  screen.  Fill in the information and click done.  This will need to be
  done for each virtual host/IP address.

  If you are using other distributions you may have to do it manually.
  You can just put the commands in the rc.local file in /etc/rc.d
  (really they should go in with the networking stuff).  You need to
  have a ifconfig and route command for each device.  The aliased
  addresses are given a sub device of the main one.  For example eth0
  would have aliases eth0:0, eth0:1, eth0:2, etc.  Here is an example of
  configuring a aliased device:


       ifconfig eth0:0 192.168.1.57
       route add -host 192.168.1.57 dev eth0:0



  You can also add a broadcast address and a netmask to the ifconfig
  command.  If you have alot of aliases you may want to make a for loop
  to make it easier.  For more information see the IP alias mini howto
  <http://sunsite.unc.edu/LDP/HOWTO/mini/IP-Alias.html>.

  Then you need to setup your domain name server (DNS) to serve these
  new domains.   And if you don't already own the domain names, you need
  to contact the Internic <http://www.internic.net> to register the
  domain names.  See the DNS-howto for information on setting up your
  DNS.

  Finally you need to setup Apache to server the virtual domain
  correctly.  This is in the httpd.conf configuration file near the end.
  They give you an example to go by.  All commands specific to that
  virtual host are put in between the virtualhost directive tags.  You
  can put almost any command in there.  Usually you set up a different
  document root, script directory, and log files. You can have almost
  unlimited number of virtual hosts by adding more virtualhost directive
  tags.

  In rare cases you may need to run separate servers if a directive is
  needed for a virtual host, but is not allowed in the virtual host
  tags.  This is done using the bindaddress directive.   Each server
  will have a different name and setup files.  Each server only responds
  to one IP address, specified by the bindaddress directive.  This is an
  incredible waste of system resources.


  7.4.2.  Shared IP virtual hosting

  This is a new way to do virtual hosting.  It uses a single IP address,
  thus conserving IP addresses for real machines (not virtual ones).  In
  the same example used above those 30,000 virtual hosts would only take
  50 IP addresses (one for each machine).  This is done by using the new
  HTTP 1.1 protocol.  The browser tells the server which site it wants
  when it sends the request.  The problem is browsers that don't support
  HTTP 1.1 will get the servers main page, which could be setup to
  provide a menu of virtual hosts available.  That ruins the whole
  illusion of virtual hosting.  The illusion that you have your own
  server.

  The setup is much simpler than the IP based virtual hosting.  You
  still need to get your domain from the Internic and setup your DNS.
  This time the DNS points to the same IP address as the original
  domain.  Then Apache is setup the same as before.  Since you are using
  the same IP address in the virtualhost tags, it knows you want Shared
  IP virtual hosting.

  There are several work arounds for older browsers.  I'll explain the
  best one.  First you need to make your main pages a virtual host
  (either IP based or shared IP).  This frees up the main page for a
  link list to all your virtual hosts.  Next you need to make a back
  door for the old browsers to get in.  This is done using the
  ServerPath directive for each virtual host inside the virtualhost
  directive.  For example by adding ServerPath /mysite/ to
  www.mysite.com old browsers would be able to access the site by
  www.mysite.com/mysite/.  Then you put the default page on the main
  server that politely tells them to get a new browser, and lists links
  to all the back doors of all the sites you host on that machine.  When
  an old browser accesses the site they will be sent to the main page,
  and get a link to the correct page.  New browsers will never see the
  main page and will go directly to the virtual hosts.  You must
  remember to keep all of your links relative within the web sites,
  because the pages will be accessed from two different URL's
  (www.mysite.com and www.mysite.com/mysite/).

  I hope I didn't lose you there, but its not an easy workaround.  Maybe
  you should consider IP based hosting after all.  A very similar
  workaround is also explained on the apache website at
  <http://www.apache.org/manual/host.html>.

  If anyone has a great resource for Shared IP hosting, I would like to
  know about it.  It would be nice to know what percent of browsers out
  there support HTTP 1.1, and to have a list of which browsers and
  versions support HTTP 1.1.


  7.5.  CGI scripts

  There are two different ways to give your users CGI script capability.
  The first is make everything ending in .cgi a CGI script.  The second
  is to make script directories (usually named cgi-bin).  You could also
  use both methods.  For either method to work the scripts must be world
  executable (chmod 711).  By giving your users script access you are
  creating a big security risk.  Be sure to do your homework to minimize
  the security risk.

  I prefer the first method, especially for complex scripting.  It
  allows you to put scripts in any directory.  I like to put my scripts
  with the web pages they work with.  For sites with allot of scripts it
  looks much better than having a directory full of scripts.  This is
  simple to setup.  First uncomment the .cgi handler at the end of the
  srm.conf file.  Then make sure all your directories have the option
  ExecCGI or All in the access.conf file.

  Making script directories is considered more secure.  To make a script
  directory you use the ScriptAlias directive in the srm.conf file.  The
  first argument is the Alias the second is the actual directory.  For
  example ScriptAlias /cgi-bin/ /usr/httpd/cgi-bin/ would make
  /usr/httpd/cgi-bin able to execute scripts.  That directory would be
  used whenever someone asked for the directory /cgi-bin/.  For security
  reasons you should also change the properties of the directory to
  Options none, AllowOveride none in the access.conf (just uncomment the
  example that is there).  Also do not make your script directories
  subdirectories of your web page directories.  For example if you are
  serving pages from /home/httpd/html/, don't make the script directory
  /home/httpd/html/cgi-bin; Instead make it /home/httpd/cgi-bin.

  If you want your users to have there own script directories you can
  use multiple ScriptAlias commands.  Virtual hosts should have there
  ScriptAlias command inside the virtualhost directive tags.  Does
  anyone know a simple way to allow all users to have a cgi-bin
  directory without individual ScriptAlias commands?



  7.6.  Users Web Directories

  There are two different ways to handle user web directories.  The
  first is to have a subdirectory under the users home directory
  (usually public_html).  The second is to have an entirely different
  directory tree for web directories.  With both methods make sure set
  the access options for these directories in the access.conf file.

  The first method is already setup in apache by default.  Whenever a
  request for /~bob/ comes in it looks for the public_html directory in
  bob's home directory.  You can change the directory with the UserDir
  directive in the srm.conf file.  This directory must be world readable
  and executable.  This method creates a security risk because for
  Apache to access the directory the users home directory must be world
  executable.

  The second method is easy to setup.  You just need to change the
  UserDir directive in the srm.conf file.  It has many different
  formats; you may want to consult the Apache documentation for
  clarification.  If you want each user to have their own directory
  under /home/httpd/, you would use UserDir /home/httpd.  Then when the
  request /~bob/ comes in it would translate to /home/httpd/bob/.  Or if
  you want to have a subdirectory under bob's directory you would use
  UserDir /home/httpd/*/html.  This would translate to
  /home/httpd/bob/html/ and would allow you to have a script directory
  too (for example /home/httpd/bob/cgi-bin/).


  7.7.  Daemon mode vs. Inetd mode

  There are two ways that apache can be run.  One is as a daemon that is
  always running (Apache calls this standalone).  The second is from the
  inetd super-server.

  Daemon mode is far superior to inetd mode.  Apache is setup for daemon
  mode by default.  The only reason to use the inetd mode is for very
  low use applications.  Such as internal testing of scripts, small
  company Intranet, etc.  Inetd mode will save memory because apache
  will be loaded as needed.   Only the inetd daemon will remain in
  memory.

  If you don't use apache that often you may just want to keep it in
  daemon mode and just start it when you need it.  Then you can kill it
  when you are done (be sure to kill the parent and not one of the child
  processes).

  To setup inetd mode you need to edit a few files.  First in
  /etc/services see if http is already in there.  If its not then add
  it:


       http    80/tcp



  Right after 79 (finger) would be a good place.  Then you need to edit
  the /etc/inetd.conf file and add the line for Apache:



  http    stream  tcp     nowait  root    /usr/sbin/httpd httpd



  Be sure to change the path if you have Apache in a different location.
  And the second httpd is not a typo; the inet daemon requires that.  If
  you are not currently using the inet daemon, you may want to comment
  out the rest of the lines in the file so you don't activate other ser-
  vices as well (FTP, finger, telnet, and many other things are usually
  run from this daemon).

  If you are already running the inet deamon (inetd), then you only need
  to send it the SIGHUP signal (via kill; see kill's man page for more
  info) or reboot the computer for changes to take effect.  If you are
  not running inetd then you can start it manually.  You should also add
  it to your init files so it is loaded at boot (the rc.local file may
  be a good choice).


  7.8.  Allowing put and delete commands

  The newer web publishing tools support this new method of uploading
  web pages by http (instead of FTP).  Some of these products don't even
  support FTP anymore!  Apache does support this, but it is lacking a
  script to handle the requests.  This script could be a big security
  hole, be sure you know what you are doing before attempting to write
  or install one.

  If anyone knows of a script that works let me know and I'll include
  the address to it here.

  For more information goto Apacheweek's article at
  <http://www.apacheweek.com/features/put>.


  7.9.  User Authentication/Access Control


  This is one of my favorite features.  It allows you to password
  protect a directory or a file without using CGI scripts.  It also
  allows you to deny or grant access based on the IP address or domain
  name of the client.  That is a great feature for keeping jerks out of
  your message boards and guest books (you get the IP or domain name
  from the log files).

  To allow user authentication the directory must have AllowOverrides
  AuthConfig set in the access.conf file.  To allow access control (by
  domain or IP address) AllowOverrides Limit must be set for that
  directory.

  Setting up the directory involves putting an .htaccess file in the
  directory.  For user authentication it is usually used with an
  .htpasswd and optionally a .htgroup file.  Those files can be shared
  among multiple .htaccess files if you wish.

  For security reasons I recommend that everyone use these directives in
  there access.conf file:



       <files ~ "/\.ht">
       order deny,allow
       deny from all
       </files>

  If you are not the administrator of the system you can also put it in
  your .htaccess file if AllowOverride Limit is set for your directory.
  This directive will prevent people from looking into your access
  control files (.htaccess, .htpasswd, etc).

  There are many different options and file types that can be used with
  access control.  Therefore it is beyond the scope of this document to
  describe the files.  For information on how to setup User
  Authentication see the Apacheweek feature at
  <http://www.apacheweek.com/features/userauth> or the NCSA pages at
  <http://hoohoo.ncsa.uiuc.edu/docs-1.5/tutorials/user.html>.


  7.10.  su-exec

  The su-exec feature runs CGI scripts as the user of the owner.
  Normally it is run as the user of the web server (usually nobody).
  This allows users to access there own files in CGI scripts without
  making them world writable (a security hole).  But if you are not
  careful you can create a bigger security hole by using the su-exec
  code.  The su-exec code does security checks before executing the
  scripts, but if you set it up wrong you will have a security hole.

  The su-exec code is not for amateurs.  Don't use it if you don't know
  what you are doing.  You could end up with a gaping security hole
  where your users can gain root access to your system.  Do not modify
  the code for any reason.  Be sure to read all the documentation
  carefully.  The su-exec code is hard to setup on purpose, to keep the
  amateurs out (everything must be done manually, no make file no
  install scripts).

  The su-exec code resides in the support directory of the source.
  First you need to edit the suexec.h file for your system.  Then you
  need to compile the su-exec code with this command:


       gcc suexec.c -o suexec



  Then copy the suexec executable to the proper directory.  The Apache
  default is /usr/local/etc/httpd/sbin/.  This can be changed by editing
  httpd.h in the Apache source and recompiling Apache.  Apache will only
  look in this directory, it will not search the path.  Next the file
  needs to be changed to user root (chown root suexec) and the suid bit
  needs to be set (chmod 4711 suexec).  Finally restart Apache, it
  should display a message on the console that su-exec is being used.

  CGI scripts should be set world executable like normal.  They will
  automaticaly be run as the owner of the CGI script.  If you set the
  SUID (set user id) bit on the CGI scripts they will not run.  If the
  directory or file is world or group writable the script will not run.
  Scripts owned by system users will not be run (root, bin, etc.).  For
  other security conditions that must be met see the su-exec
  documentation.  If you are having problems see the su-exec log file
  named cgi.log.

  Su-exec does not work if you are running Apache from inetd, it only
  works in daemon mode.  It will be fixed in the next version because
  there will be no inetd mode.  If you like playing around in source
  code, you can edit the http_main.c.  You want to get rid of the line
  where Apache announces that it is using the su-exec wrapper (It
  wrongly prints this in front of the output of everything).


  Be sure and read the Apache documentation on su-exec.  It is included
  with the source and is available on the Apache web site at
  <http://www.apache.org/docs/suexec.html>


  7.11.  Imagemaps

  Apache has the ability to handle server side imagemaps.  Imagemaps are
  images on webpages that take users to different locations depending on
  where they click.  To enable imagemaps first make sure the imagemap
  module is installed (its one of the default modules).  Next you need
  to uncomment the .map handler at the end of the srm.conf file.  Now
  all files ending in .map will be imagemap files.  Imagemap files map
  different areas on the image to separate links.  Apache uses map files
  in the standard NCSA format.  Here is an example of using a map file
  in a web page:


       <a href="/map/mapfile.map">
       <img src="picture.gif" ISMAP>
       </a>



  In this example mapfile.map is the mapfile, and picture.gif is the
  image to click on.

  There are many programs that can generate NCSA compatible map files or
  you can create them yourself.  For a more detailed discussion of
  imagemaps and map files see the Apacheweek feature at
  <http://www.apacheweek.com/features/imagemaps>.


  7.12.  SSI/XSSI

  Server Side Includes (SSI) adds dynamic content to otherwise static
  web pages.  The includes are embedded in the web page as comments.
  The web server then parses these includes and passes the results to
  the web server.  SSI can add headers and footers to documents, add
  date the document was last updated, execute a system command or a CGI
  script.  With the new eXtended Server Side Includes (XSSI) you can do
  a whole lot more.  XSSI adds variables and flow control statements
  (if, else, etc).  Its almost like having an programming language to
  work with.

  Parsing all HTML files for SSI commands would waste allot of system
  resources.  Therefore you need to distinguish normal HTML files from
  those that contain SSI commands.  This is usually done by changing the
  extension of the SSI enhanced HTML files.  Usually the .shtml
  extension is used.

  To enable SSI/XSSI first make sure that the includes module is
  installed.  Then edit srm.conf and uncomment the AddType and
  AddHandler directives for .shtml files.   Finally you must set Options
  Includes for all directories where you want to run SSI/XSSI files.
  This is done in the access.conf file.  Now all files with the
  extension .shtml will be parsed for SSI/XSSI commands.

  Another way of enabling includes is to use the XBitHack directive.  If
  you turn this on it looks to see if the file is executable by user.
  If it is and Options Includes is on for that directory, then it is
  treated as an SSI file.  This only works for files with the mime type
  text/html (.html .htm files).  This is not the preferred method.


  There is a security risk in allowing SSI to execute system commands
  and CGI scripts.  Therefore it is possible to lock that feature out
  with the Option IncludesNOEXEC instead of Option Includes in the
  access.conf file.  All the other SSI commands will still work.

  For more information see the Apache mod_includes documentation that
  comes with the source.  It is also available on the website at
  <http://www.apache.org/docs/mod/mod_include.html>.

  For a more detailed discussion of SSI/XSSI implementation see the
  Apacheweek feature at  <http://www.apacheweek.com/features/ssi>.

  For more information on SSI commands see the NCSA documentation at
  <http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html>.

  For more information on XSSI commands goto
  <ftp://pageplus.com/pub/hsf/xssi/xssi-1.1.html>.


  7.13.  Module system

  Apache can be extended to support almost anything with modules.  There
  are allot of modules already in existence.  Only the general interest
  modules are included with Apache.   For links to existing modules goto
  the

  Apache Module Registry at <http://www.zyzzyva.com/module_registry/>.

  For module programming information goto
  <http://www.zyzzyva.com/module_registry/reference/>



  8.  Web Server Add-ons

  Sorry this section has not been written yet.

  Coming soon: mSQL, PHP/FI, cgiwrap, Fast-cgi, MS frontpage extentions,
  and more.



  9.  Intranet Section



  In simple terms, the Intranet is the descriptive term being used for
  the implementation of Internet technologies within a corporate
  organisation, rather than for external connection to the global
  Internet. This implementation is performed in such a way as to
  transparently deliver the immense informational resources of an
  organisation to each individuals desktop with minimal cost, time and
  effort. This document attempts to explain in simple terms how to setup
  an Intranet using tools which are readily available and are generally
  costing little or are free.

  This document assumes that you already know how to install TCP/IP on
  your Linux server and connect it physically to your LAN using an
  Ethernet network card. This also assumes you have some basic knowledge
  of Netware, WinNT and Mac systems. The configuration of the Netware
  server has been shown using version 3.1x as the basis. You can also
  use INETCFG to achieve the same result. On the client side the
  discussion is with respect to Windows 3.1x, Windows for Workgroups and
  Win95, WinNT and the Apple PowerMac.

  I am using the private network addresses (RFC-1918) of 172.16.0.0 and
  172.17.0.0 only as examples. You may choose suitable addresses
  depending on your configuration.



              Linux       Netware      WFWG/WinNT
              Server      Server       Server
             172.16.0.1   172.16.0.2   172.16.0.3
                |           |           |    172.16.0.0
          ------+-----+-----+--------+--+--------------
                      |              | 172.16.0.254
                    W/S 1          Router
                  172.16.0.5         | 172.17.0.254
                                     |
                           ----------+-------+--------
                      172.17.0.0             |
                                           W/S 2
                                         172.17.0.5



  9.1.  What is required

  You will need the following software before attempting the
  installation.

  o  the HTTP server software which can be downloaded from OneStep NCSA
     HTTPd Downloader at
     http://hoohoo.ncsa.uiuc.edu/docs/setup/OneStep.html page.

  o  The Novell Netware Client available from HTTP://support.novell.com/
     (The TCP/IP files are included with the client).

  o  The Microsoft TCP/IP client available from
     HTTP://www.microsoft.com/

  o  The Apple MacTCP client available from HTTP://www.apple.com/

  o  WWW Browsers like Netscape at HTTP://home.netscape.com/ or MS
     Internet Explorer at HTTP://www.microsoft.com/ or NCSA Mosaic from
     http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/NCSAMosaicHome.html


  9.2.  New versions of this document

  New versions of the Linux Intranet Server HOWTO will be periodically
  posted to comp.os.linux.announce and comp.os.linux.help. They will
  also be uploaded to various Linux FTP sites, including
  sunsite.unc.edu.

  The Latest version of this document is available in HTML format at
  http://www.linuxports.com/


  9.3.  Feedback

  If you have questions or comments about this document, please feel
  free to mail Mr. Poet, at poet@linuxports.com. Suggestions, criticism
  and mail are always welcome. If you find a mistake with this document,
  please let me know so I can correct it in the next version. Thanx.
  10.  Install the HTTP server

  When you download the server you have two options: To get the source
  and compile it yourself, or get the precompiled binaries. The
  precompiled binaries for Linux (ELF) version are available at NCSA but
  not the older versions.


  10.1.  Preparation before downloading

  The server at NCSA will guide you through the steps for configuration
  options and prepare the various files for you. But before you attempt
  to download HTTPd be prepared with answers to the following questions


  10.1.1.  The Operating System

  First, you must choose whether to download the source or a pre-
  compiled version of the software. If your particular system doesn't
  appear in the menu, then you will have to get the default source, and
  compile it yourself.

  To check the version of your Linux go to the command prompt on your
  Linux machine and type


         linux:~$  uname -a



  which will respond with a line which looks similar to this


          linux:~$  uname -a
          Linux linux 2.0.29 #4 Tue Sep 13 04:05:51 CDT 1994 i586
          linux:~$



  The version of Linux is 2.0.29.

  The remaining parameters can be specified before downloading or
  configured later by modifying the file srm.conf in the
  /usr/local/etc/httpd/conf directory. The names of the actual
  directives that appear in the file httpd.conf are shown in brackets.
  The only exception is the directive DocumentRoot which appears in the
  file srm.conf


  10.1.2.  Process type (ServerType)

  This specifies how your machine will run your HTTPd server. The
  preferred method is "standalone". This makes the HTTP daemon to be
  running constantly. If you choose to load HTTPd under "inetd", the
  server binary will be reloaded into memory for every request, which
  may slow your server down.


  10.1.3.  Binding Port (Port)

  This specifies which port of your machine that the HTTPd daemon will
  bind to and listen for HTTP requests. If you can login as "root", use
  the default setting of 80.  Otherwise choose a setting between 1025
  and 65535.
  10.1.4.  Server user identity (User)

  This is the user id the server will change to when answering requests
  and acting on files.This question needs to be answered only if you are
  running the server as "standalone".  If you are someone without root
  permissions, just use your own login name. If you are system
  administrator, you might want to create a special user so you can
  control file permissions.


  10.1.5.  Server group identity (Group)

  This is the group id the server will change to when answering requests
  and acting on files. This is similar to Server User identity and is
  applicable only if you are running the server as standalone.

  If you do not have root permissions, just use the name of your primary
  group. You can find out your group by typing groups at the Linux
  command prompt.


  10.1.6.  Server administrator email address (ServerAdmin)

  This is the email address that the user should send an email message
  to when reporting a problem with the server. You can put your personal
  e-mail address.


  10.1.7.  Location of server directory (ServerRoot)

  This is where the server resides on your system. If you have root
  permissions leave it in its recommended location /usr/local/etc/httpd.
  If you cannot login as root, choose a subdirectory in your home path.
  You can find out the path of your home directory with the pwd command.


  10.1.8.  Location of HTML files (DocumentRoot)

  This is where the HTML files to be served are located. The default
  location is /usr/local/etc/httpd/htdocs.  You could however set it to
  be the home directory of the special user you chose in Server user
  identity, or a subdirectory in your home directory if you can't login
  as root.

  When in doubt, use the default settings. Now that you have answers to
  the above questions you can Download NCSA HTTPd at
  http://hoohoo.ncsa.uiuc.edu/docs/setup/OneStep.html.  You should read
  the HTTPd Documentation at http://hoohoo.ncsa.uiuc.edu/docs/ before
  you attempt installation. If you are planning to compile the code then
  you need to modify the makefiles in each of the th ree directories
  support, src, cgi-src. If your version of Linux is already supported
  then you just have to type make linux at the top level directory (i.e.
  /usr/local/etc/httpd)


  10.2.  Compiling HTTPd

  Compiling is simple, just type make linux at the prompt in the server
  root directory.  Note: Users of pre-ELF Linux have to uncomment
  #define NO_PASS in file portability.h and set DBM_LIBS= -ldbm in the
  Makefile before compiling HTTPd.



  11.  Testing HTTPd

  After you have installed HTTPd, login as root and start it by typing
  httpd & . (assuming you have installed as standalone) You should now
  be able to see it in the list generated by ps. The simplest way to
  test HTTPd is by Telnet. At the Linux command prompt type


          linux:~$  telnet 172.16.0.1 80



  where 80 is the default port for HTTP. If you have configured "Port"
  as something different then type that number instead. You should get a
  response which looks like this


          Trying 172.16.0.1...
          Connected to linux.mydomain.
          Escape character is '^]'.



  Now if you type in any character and press Enter you should get a
  response similar to the one shown below.


          HTTP/1.0 400 Bad Request
          Date: Wed, 10 Jan 1996 10:24:37 GMT
          Server: NCSA/1.5
          Content-type: text/html

          <HEAD><TITLE>400 Bad Request < /TITLE> < /HEAD>
          <BODY><H1>400 Bad Request < /H1>
          Your client sent a query that this server could
          not understand.<P>
          Reason: Invalid or unsupported method.<P>
          < /BODY>



  Now we are ready to connect to this server using another PC and a WWW
  Browser.


  12.  Connecting to the Linux Server

  Please refer to the diagram shown in the chapter ``Introduction'' for
  the addressing scheme used. Workstation 1 (W/S1) is on network
  172.16.0.0 and can access the Linux server directly whereas
  Workstation 2 (W/S2) is on network 172.17.0.0 and needs to use the
  gateway (router) 172.17.0.254 to access the Linux box. This gateway
  information needs to be provided while configuring the clients only on
  W/S2. Netware refers to the gateway as 'ip_router'.

  I am using W/S2 to illustrate the client setup. To setup W/S1 just
  change the address 172.17.0.5 to 172.16.0.5 and ignore all references
  to the gateway/router.

  If you do not have a router you can skip the next section and proceed
  to


  o  ``Setup Netware Server'' if you use a Netware server.

  o  ``Setup MS Windows Client'' if you use the Microsoft Client.


  12.1.  Setup the Linux server

  You may skip this section if you do not have a router.

  You have to configure the Linux server to recognise the router thus
  allowing Workstation 2 to connect to the Web server. In order to setup
  the Linux server you should login as root. At the server prompt type


          route add gw default 172.16.0.254



  To use this gateway everytime you boot the Linux server edit the file
  /etc/rc.d/rc.inet1 and change the line containing the gateway defini-
  tion to GATEWAY = "172.16.0.254". Make sure the line for adding the
  gateway is not commented out.

  ALT: You can add routes to the networks on the other side of the
  router. This would be done as


          route add -net 172.17.0.0 gw 172.16.0.254



  To add this route everytime you boot Linux add the command to your
  /etc/rc.d/rc.local file.



  12.2.  Setup the Netware server

  In order to setup the Netware server you should have Supervisor
  permissions or atleast Console operator permissions. If these cannot
  be got, try asking your Network Administrator to help you with the
  setup.  At the Server enable the Ethernet_II frame type on the LAN by
  typing these commands or include them in the AUTOEXEC.ncf file.


          load NE2000 frame=Ethernet_II name=IPNET
          load TCPIP
          bind IP to IPNET addr=172.16.0.2 mask=FF.FF.FF.0



  You might have to specify the slot or board number while loading the
  NE2000 driver depending on your machine configuration. (eg: load
  NE2000 slot=3 frame=.....)


  12.3.  Setup the Netware Client

  On the PC you have the choice of Win3.1,WFWG or Win95. The
  installation procedure differs between Win95 and the older windows if
  you are using the 32bit client from Microsoft or Novell. If you are
  going to use the 16bit client, the procedure is the same and you can
  refer to the Windows 3.x installation instructions. For installing the
  32bit client for Win95 skip to ``Windows 95 installation''.


  12.3.1.  Windows 3.x

  If you are using Win3.1 or WFWG you can install the Netware Client
  (VLMs) and some additional files which are provided with the TCP/IP
  diskette, namely

  TCPIP.exe, VTCPIP.386, WINSOCK.dll and WLIBSOCK.dll

  Note that the WINSOCK.dll file is different from the ones provided
  with Win95 and Trumpet. Install the Netware Client with the support
  for windows. Copy VTCPIP.386, WINSOCK.dll and WLIBSOCK.dll to the
  SYSTEM directory and TCPIP.exe to the NWCLIENT directory. Now modify
  the STARTNET.bat in the NWCLIENT directory to


          lsl
          ne2000     ---> your network card driver
          c:\windows\odihlp.exe     ---->if you are using WFWG
          ipxodi
          tcpip        ---> add this line
          nwip         ---> if you use Netware/IP
          vlm



  Create a subdirectory (say) \NET\TCP and copy the files HOSTS,
  NETWORKS, PROTOCOLS and SERVICES from /etc on your Linux server or the
  directory SYS:ETC on your Netware server. Edit the copied HOSTS file
  to add the line for your new Linux server. This will enable you to
  refer to the Linux server as http://linux.mydomain/ instead of
  http://172.16.0.1/in your WWW browser


          127.0.0.1      localhost
          172.16.0.1      linux.mydomain



  Edit the NET.cfg file in NWCLIENT directory



     Link Driver NE2000
         port 300
         int 3
         MEM D0000
         FRAME Ethernet_802.2

  ; ---- add these lines ----

        FRAME Ethernet_II

     Protocol TCPIP
        PATH TCP_CFG C:\NET\TCP
        ip_address  172.17.0.5
        ip_netmask  255.255.255.0
        ip_router   172.17.0.254     ---> add the address of your gateway only
                                    ---> if you have to use this
                                    ---> gateway to reach your HTTP server

     Link Support
        MemPool 6192       ---> the minimum is 1024. Try with different values
        Buffers 10 1580    ---> this again can be fine tuned

  ;---------------------------------
  ; You may need to add lines like these if you are using Netware/IP
  ;
     NWIP
        NWIP_DOMAIN_NAME  mydomain
        NSQ_BROADCAST   ON
        NWIP1_1 COMPATIBILITY   OFF
        AUTORETRIES     1
        AUTORETRY SECS  10



  Edit the SYSTEM.ini file in the WINDOWS directory and add this entry
  for VTCPIP.386


          [386Enh]
          .....
          network=*vnetbios, vipx.386, vnetware.386, VTCPIP.386
          .....



  Reboot your PC, run STARTNET.bat and you can now use your favorite WWW
  browser to access your Web pages. You need not login to Netware and
  you don't have to run TCPMAN (if you use Trumpet Winsock).


  12.3.2.  Windows 95

  This section explains how to install the 32bit client on Win95.
  Firstly you must install the following


          Client for Netware Networks (from Microsoft or Novell)
          Microsoft TCP/IP Protocol
          Network Adapter



  To install these items, click on My Computer, Control Panel, Networks.
  Click Add. You will now be in a window that displays Client, Adapter,
  Protocol and Service.  To install the Client for Netware Networks:


         1. DoubleClick on Client
         2. Click on Microsoft or Novell
         3. DoubleClick on Client for Netware Networks



  To install the TCP/IP Protocol:


         1. DoubleClick on Protocol
         2. Click on Microsoft
         3. DoubleClick on TCP/IP



  Windows 95 by default installs several other protocols automatically.
  Remove them by clicking on them and clicking the Remove button.
  Typically Win95 installs the Microsoft NetBeui protocol, and IPX/SPX
  compatible protocol. You can delete the NetBEUI protocol, but you will
  need the IPX/SPX protocol if you wish to login to the Netware Server.

  To setup TCP/IP click on TCP/IP, click on Properties, click on the tab
  IP address


         Enter your IP address in the "Specify an IP address "
                               box as 172.17.0.5
         In the Subnet Mask box enter 255.255.255.0



  select the tab Gateway


         Enter your gateway (router) address in the box New gateway
            as 172.17.0.254
         Click the Add button



  The gateway address should now appear under the installed gateways
  box. Now Click OK.

  You should get a message to reboot. Do so. You should now be able to
  use the Browser to connect to your HTTP Server.


  12.4.  Setup Microsoft Client

  If you are using the Microsoft Client for accessing your network, then
  this section details how to install TCP/IP for

  o  ``Windows for Workgroups (WFWG)''

  o  ``Windows 95''


  o  ``Windows NT 4.0''

     Note: To enable you to refer to the Linux server as
     http://linux.mydomain/ instead of http://172.16.0.1/ in the WWW
     browser and all your intranet commands you need to edit the hosts
     file. You can add more entries for each of your other hosts
     (Netware, Unix, WinNT) as well. The Windows family keeps its HOSTS
     file in \WINDOWS or in \WINDOWS\SYSTEM depending on the version.
     Edit this file and add a line for your Linux server as:


          127.0.0.1      localhost
          172.16.0.1     linux.mydomain

          172.16.0.2     netware.mydomain
          172.16.0.3     winNT.mydomain
          172.16.0.5     ws_1



  12.4.1.  Windows for Workgroups

  This section explains how to install the 32bit client on WFWG. Firstly
  you must download the TCP/IP drivers for Windows from Microsoft. The
  current version is 3.11b and is available at ftp://ftp.microsoft.com
  or other sites as tcp32b.exe. Make sure that you have load Win32s
  before trying to load the TCP/IP-32bit driver.

  Having expanded the TCP/IP files into a temporary directory (say
  C:\TEMP), check your \WINDOWS\SYSTEM directory for copies of
  OEMSETUP.INF. If there are any, rename them. Now copy the OEMSETUP.INF
  file from the TEMP directory to the \WINDOWS\SYSTEM directory. If you
  have loaded any other TCP/IP stacks on your system, please remove them
  before you proceed.

  Start Network Setup or Windows Setup/Change Network settings


           Click the Networks button
           Click Install Microsoft Windows Network.
             Choose support for additional networks (if required)
           Click OK



  You should be prompted for your network adapter - select the appropri-
  ate one. If you are not prompted, then


            Click the Adapter button
                select an adapter (say NE2000)
                Click OK
            Click the Protocol button
                select the MS TCP/IP-32 protocol
                click OK



  You will now be prompted to configure the TCP/IP protocol stack. You
  can always reconfigure this by highlighting the TCP/IP protocol shown
  in the box Adapters and clicking the Setup button.

     In the IP address box enter 172.17.0.5
     In the Subnet Mask box enter 255.255.255.0
     Enter your gateway (router) address in the box default gateway
       as 172.17.0.254



  Click OK. The computer will ask you to restart. Do so. You should now
  be able to use the Browser to connect to your HTTP Server.


  12.4.2.  Windows 95

  This section explains how to install the 32bit client for Microsoft on
  Win95. Firstly you must install the following


          Client for Microsoft Networks
          Microsoft TCP/IP Protocol
          Network Adapter



  To install these items, click on My Computer, Control Panel, Networks.
  Click Add. You will now be in a window that displays Client, Adapter,
  Protocol and Service.  To install the Client for Microsoft Networks:


         1. DoubleClick on Client
         2. Click on Microsoft
         3. DoubleClick on Client for Microsoft Networks



  To install the TCP/IP Protocol:


         1. DoubleClick on Protocol
         2. Click on Microsoft
         3. DoubleClick on TCP/IP



  Windows 95 by default installs several protocols automatically. Remove
  them by clicking on them and clicking the Remove button. Typically
  Win95 installs the Microsoft NetBeui protocol.

  To setup TCP/IP click on TCP/IP, click on Properties, click on the tab
  IP address


         Enter your IP address in the "Specify an IP address "
                               box as 172.17.0.5
         In the Subnet Mask box enter 255.255.255.0



  select the tab Gateway



    Enter your gateway (router) address in the box New gateway
       as 172.17.0.254
    Click the Add button



  The gateway address should now appear under the installed gateways
  box. Now Click OK.

  You should get a message to reboot. Do so. You should now be able to
  use the Browser to connect to your HTTP Server.


  12.4.3.  Windows NT

  This section details how to Install the TCP/IP client for WinNT 4.0.
  Start Control Panel/ Network


           Select the Adapter tab.
               Click Add to add a new adapter (if you don't have one)



  You should be prompted for your network adapter - select the appropri-
  ate one. To add the protocols.


           Select the Protocols tab
               Click Add
               Select the TCP/IP protocol
               Click OK



  You will now be prompted to configure the TCP/IP protocol stack. You
  can always reconfigure this by highlighting the TCP/IP protocol and
  clicking the Properties button.


          Select the tab IP Address
             Mark the checkbox 'Specify an IP address'
             In the IP address box enter 172.17.0.5
             In the Subnet Mask box enter 255.255.255.0
             Enter your gateway (router) address in the box Default Gateway
                 as 172.17.0.254



  Click OK. The computer will ask you to restart. You can now use any
  Browser to connect to your HTTP Server.


  12.5.  Setup TCP/IP on Macintosh

  If you are using the Macintosh for accessing your network, then this
  section details how to install MacTCP for the PowerMacs.

  Note: To enable you to refer to the Linux server as
  http://linux.mydomain/ instead of http://172.16.0.1/ in the WWW
  browser and all your intranet commands you need to edit the hosts
  file. The format of the hosts file is different from the one used in
  Unix. The Mac hosts file is based on RFC-1035. You can add more
  entries for each of your other hosts (Netware, Unix, WinNT) as well.
  The MacOS  keeps its HOSTS file in the Preferences folder under the
  System folder. Edit this file and add a line for your Linux server as:


         linux.mydomain    A  172.16.0.1

         netware.mydomain  A  172.16.0.2
         winNT.mydomain    A  172.16.0.3
         ws_1              A  172.16.0.5



  12.5.1.  MacTCP

  This section explains how to install MacTCP. Firstly you must download
  the MacTCP files from Apple or install it from the Internet Connection
  CD.  To configure MacTCP, click the Apple Menu/ Control Panels/
  TCP/IP. In the screen change the setting for 'Connect via:' to
  'Ethernet'

  Change the 'Configure' setting to 'Manually'


         In the IP address box enter 172.17.0.5
         In the Subnet Mask box enter 255.255.255.0
         Enter your gateway (router) address in the box
           Router address as 172.17.0.254



  Click OK. You should now be able to use the Browser to connect to your
  HTTP Server.



  13.  Setting up the Intranet

  An Intranet cannot be complete without sharing the resources on the
  different platforms. You will need support for other filesystems, so
  that you can access the data available on them. This document provides
  instructions to connect Linux to the following popular filesystems.

  o  ``NCP filesystem for Netware''

  o  ``SMB filesystem for Windows''

  o  ``NFS filesystem for Unix''

  These filesystems can be compiled into the Linux kernel or added as
  modules, depending on the version of Linux. If you are not familiar
  with compiling the kernel you can refer to the Kernel HOWTO
  http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html and the Module
  HOWTO http://sunsite.unc.edu/mdw/HOWTO/Module-HOWTO.html for compiling
  the kernel with modules.



  13.1.  NCPFS

  To share the files on the Netware server you will need support for NCP
  (ncpfs). NCPFS works with kernel version 1.2.x and 1.3.71 upwards. It
  does not work with any earlier 1.3.x kernel. It cannot access the NDS
  database in Netware 4.x, but can make use of the bindery. If you are
  using Netware 4.x you can enable bindery support for specific
  containers using the command Set Bindery Context at the console as:



         set Bindery Context = CORP.MYDOM;WEBUSER.MYDOM



  In the above example two containers have bindery support enabled.

  You will need to download the NCP filesystem utilities using the URL
  ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/ncpfs.tgz
  (currently ncpfs-2.0.10) from Sunsite.


  13.1.1.  Installation

  To install the ncpfs utilities, type


          zcat ncpfs.tgz | tar xvf -



  to expand the files into its own directory. In this case you will get
  a directory ncpfs-2.0.10 Change your directory to this ncpfs directory
  before proceeding with the installation. Read the README and edit the
  Makefile if necessary.

  The installation of ncpfs depends on the kernel version you are using.
  For kernel 1.2, you should simply type 'make'. Subsequently typing
  'make install' will install the executables and man pages.

  If you use Kernel 1.3.71 or later, you might have to recompile your
  kernel. With these kernels, the kernel part of ncpfs is already
  included in the main source tree. To check if the kernel needs to be
  recompiled type


          cat /proc/filesystems



  It should show you a line saying that the kernel knows ncpfs.

  If ncpfs is not there, you can either recompile the kernel or add
  ncpfs as a module. For recompiling the kernel you should type 'make
  config' and when it asks you for

  The IPX protocol (CONFIG_IPX) [N/y/?]

  simply answer 'y'. Probably you do not need the full internal net that
  you are asked for next. Once the kernel is successfully installed,
  reboot, check /proc/filesystems and if everything is OK proceed with
  the installation of the ncpfs utilities. Change directory to the
  location holding your downloaded ncpfs files, and type 'make'. After
  the compilation is finished type 'make install' to install the various
  utilities and man pages.


  13.1.2.  Mounting NCPFS

  To check the installation type


          ipx_configure --auto_interface=on --auto_primary=on

       ....wait for 10 seconds and type

          slist



  You should be able to see a list of your Netware servers. Now we are
  ready to share files from the Netware server.

  Suppose we need to access HTML files from directory \home\htmldocs on
  volume VOL1: on the server MYDOM_NW, I recommend that you create a new
  user (say) 'EXPORT' with password 'EXP123' on this server to whom you
  grant appropriate access rights to this directory using SYSCON or
  NWADMIN.

  On the Linux machine create a new directory /mnt/MYDOM_NW. Now type
  the command


          ncpmount -S MYDOM_NW -U EXPORT -P EXP123 /mnt/MYDOM_NW



  to mount the netware file system. Typing the command


          ls /mnt/MYDOM_NW/vol1/home/htmldocs



  will show you a list of all the files in MYDOM_NW/VOL1:\HOME\HTMLDOCS
  (using Netware file notation). If you have any problems please read
  the IPX HOWTO at http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html for
  more insights into the IPX system.



  13.2.  SMBFS

  To share the files on the Windows server you will need support for SMB
  (smbfs).

  You will need to download the SMB filesystem utilities from
  ftp://sunsite.unc.edu/pub/Linux/system/filesystems/smbfs/smbfs.tgz
  (currently smbfs-2.0.1) from Sunsite.


  13.2.1.  Installation

  To install the smbfs utilities, type


          zcat smbfs.tgz | tar xvf -



  to expand the files into its own directory. In this case you will get
  a directory smbfs-2.0.1 Change your directory to this smbfs directory
  before proceeding with the installation. Read the README and edit the
  Makefile if necessary.

  The installation of smbfs depends on the kernel version you are using.
  For kernel 1.2, you should simply type 'make'. Subsequently typing
  'make install' will install the executables and man pages.

  If you use Kernel 2.0 or later, you might have to recompile your
  kernel. With these kernels, the kernel part of smbfs is already
  included in the main source tree. To check if the kernel needs to be
  recompiled type


          cat /proc/filesystems



  It should show you a line saying that the kernel knows smbfs.

  If smbfs is not there, you can either recompile the kernel or add
  smbfs as a module. For recompiling the kernel you should type 'make
  config' and when it asks you for adding SMB filesystem support simply
  answer yes. Once the kernel is successfully installed, reboot, check
  /proc/filesystems and if everything is OK proceed with the
  installation of the smbfs utilities. Change directory to the location
  holding your downloaded smbfs files, and type 'make'. After the
  compilation is finished type 'make install' to install the various
  utilities and man pages.


  13.2.2.  Mounting SMBFS

  In our example let us assume that the WinNT server is called
  'MYDOM_NT' and is sharing its directory C:\PUB\HTMLDOCS with a share
  name of 'HTMLDOCS' without a password. On the Linux machine create a
  new directory /mnt/MYDOM_NT. Now type the command


          smbmount //MYDOM_NT/HTMLDOCS /mnt/MYDOM_NT -n



  to mount the SMB (windows share) file system. If this does not work
  try


          smbmount //MYDOM_NT/COMMON /mnt/MYDOM_NT -n -I 172.16.0.3



  Typing the command


          ls /mnt/MYDOM_NT



  will show you a list of all the files in bsol;bsol;MYDOM_NT\PUB\HTML-
  DOCS (using Windows file notation).

  13.3.  NFS

  First you will need a kernel with the NFS file system either compiled
  in or available as a module.

  Suppose you have a Unix host running NFS with the name MYDOM_UNIX and
  an IP address of 172.16.0.4. You can check the directories that are
  being exported (shared) by this host by typing the command



          showmount -e 172.16.0.4



  Once we know the exported directories you can mount them by entering a
  appropriate mount command. I recommend that you create a subdirectory
  under '/mnt' (say) 'MYDOM_UNIX' and use that as your mount point.



          mount -o rsize=1024,wsize=1024 172.16.0.4:/pub/htmldocs /mnt/MYDOM_UNIX



  The rsize and wsize may have to be changed depending on your environ-
  ment.

  If you have any problems please read the NFS HOWTO at
  http://sunsite.unc.edu/mdw/HOWTO/NFS-HOWTO.html for more insights into
  the NFS system.



  14.  Accessing the Web

  Now that we have setup the HTTP server, the clients and interconnected
  the Linux server with the other servers, we need to make some small
  adjustments on the Linux server to be able to access these mounted
  filesystems from the Web Browser.


  14.1.  Accessing the mounted filesystems

  To access the mounted directories in your HTML pages you have two
  methods:

  o  Create a link in DocumentRoot (/usr/local/etc/httpd/htdocs) to
     refer to the mounted directory as


          ln -s /mnt/MYDOM_NW/vol1/home/htmldocs netware
                            or

          ln -s /mnt/MYDOM_NT    winNT
                            or

          ln -s /mnt/MYDOM_UNIX    unix



  o  to edit the file srm.conf in your /usr/local/etc/httpd/conf
     directory and add a new alias.
         # Alias fakename realname
         Alias /icons/     /usr/local/etc/httpd/icons/

         # alias for netware server
         Alias /netware/   /mnt/MYDOM_NW/vol1/home/htmldocs/
         Alias /winNT/     /mnt/MYDOM_NT/
         Alias /unix/      /mnt/MYDOM_UNIX



  And restart your HTTPd. You can access the documents on the netware
  server by referring to them as http://linux.mydomain/netware/index.htm
  for the netware files and similar notations for the others.


  14.2.  Connecting to the Internet

  You can finally connect your Intranet to the Internet to access E-Mail
  and all the wonderful information out there. I propose to write a
  brief note on how to do this in a future revision. Detailed
  explanations are available in the ISP Hookup HOWTO from
  http://sunsite.unc.edu/mdw/HOWTO/ISP-Hookup-HOWTO.html and Diald mini
  HOWTO at http://sunsite.unc.edu/mdw/HOWTO/mini/Diald for setting up
  these connections.


  14.3.  Other uses

  The HTTP server can be used in the office to provide transparent
  access to information residing on different servers, at several
  locations and directories. The data can be simple documents in Word,
  Lotus spreadsheets, or complex databases.

  The application of this technology is being typically used as
  follows:-


  o  Publishing corporate documents

     These documents can include newsletters, annual reports, maps,
     company facilities, price lists, product information literature,
     and any document which is of value within the corporate entity.

  o  Access into searchable directories

     Rapid access to corporate phone books and the like. This data can
     be mirrored at a Web site or, via CGI scripts, the Web server can
     serve  as a gateway to back-end pre-existing or new applications.
     This means that, using the same standard access mechanisms,
     information can be made more widely available and in a simpler
     manner.  This means that it can be used to create an interface with
     RDBMS  like ORACLE and SYBASE for generating real-time information.
     Here is a list of links to such sites on the Web.

     - Web Access -
     http://cscsun1.larc.nasa.gov/~beowulf/db/web_access.html - CGI
     gateways - HTTP://www.w3.org/hypertext/WWW/RDBGate/Overview.html


  o  Corporate/Department/Individual pages

     As cultures change within organistions to the point where even each
     department moves towards their own individual mission statements,
     the Intranet technology provides the ideal medium to communicate
     current information to the Department or Individual. Powerful
     search engines provide the means for people to find the group or
     individual who has the answers to the continuous questions which
     arise in the normal day-to-day course of doing business.

  o  Simple Groupware applications

     With HTML forms support, sites can provide sign-up sheets, surveys
     and simple scheduling.

  o  Software distribution

     Administrators can use the Intranet to deliver software and up-
     dates on-demand to users across the corporate network . This can be
     done with 'Java' which allows the creation and transparent
     distribution of objects on-demand rather than just data or
     applications. This is indeed possible more easily with the newer
     versions of Linux which has builtin support for Java.

  o  Mail

     With the move to the use of Intranet mail products with standard
     and simple methods for attachment of documents, sound, vision and
     other multimedia between individuals, mail is being pushed further
     forward as a simple, de facto communications method. Mail is
     essentially individual to individual, or individual to small group,
     communication. Several utilities are available on the Linux
     platform to setup an E-mail system like sendmail, pop3d, imapd.


  o  User Interface

     The Intranet technology is evolving so rapidly that the tools
     available, in particular HTML, can be used to dramatically change
     the way we interface with systems. With HTML you can build an
     Interface which is only limited by the creators imagination. The
     beauty about using Intranet technologies for this is that it is so
     simple. Clicking a hyperlink from HTML can take you to another
     page, it could ring an alarm, run a yearend procedure or anything
     else that a computer program can do.


  15.  More things to do

  Here is a list of other interesting things to do with your Linux
  Intranet server. All the software mentioned below is freeware or
  shareware.

  o  Browse the Linux server using Network Neighbourhood in Win95/ NT;
     Setup a WINS like NBT server. Check out the SAMBA Web page at
     http://lake.canberra.edu.au/pub/samba/samba.html

  o  Implement a search engine on your Intranet. Connect to ht://Dig at
     http://htdig.sdsu.edu/

  o  Use CUSeeMe by setting up a local reflector. Refer to their page at
     Cornell http://cu-seeme.cornell.edu/

  o  Setup Web Conferencing. Use COW from http://thecity.sfsu.edu/COW/

  o  Deploy a SQL database. Refer to the mSQL Home page at
     http://Hughes.com.au/

  o  Setup FTP,Gopher,Finger,Bootp servers on the Netware server. Get
     them at http://mft.ucs.ed.ac.uk/


  o  Emulate a Netware server. Check out the NCP Utilities at
     ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/

     If you find other interesting things to do with your Linux Intranet
     server, please feel free to mail me.


  16.  Credits and Legalities



  16.1.  Thanks

  Thanks to the people at NCSA for providing such excellent
  documentation, David Anderson and all others for trying out this HOWTO
  and sending in their comments. The details on Netware/IP are courtesy
  Romel Flores (rom@mnl.sequel.net).



  16.2.  Copyright information

  This document is copyrighted (C) 1999 {Poet} and LinuxPorts, it is
  distributed under the following terms:


  o  Linux HOWTO documents may be reproduced and distributed in whole or
     in part, in any medium physical or electronic, as long as this
     copyright notice is retained on all copies. Commercial
     redistribution is allowed and encouraged; however, the author would
     like to be notified of any such distributions.

  o  All translations, derivative works, or aggregate works
     incorporating any Linux HOWTO documents must be covered under this
     copyright notice.  That is, you may not produce a derivative work
     from a HOWTO and impose additional restrictions on its
     distribution. Exceptions to these rules may be granted under
     certain conditions; please contact the Linux HOWTO coordinator at
     the address given below.

  o  If you have questions, please contact Tim Bynum, the Linux HOWTO
     coordinator, at linux-howto@sunsite.unc.edu  Finger for phone
     number and snail mail address.



  17.  For further reading



  17.1.  O'Reilly & Associates Books

  In my humble opinion O'Reilly & Associates make the best technical
  books on the planet.  They focus mainly on Internet, Unix and
  programming related topics. They start off slow with plenty of
  examples and when you finish the book your an expert.  I think you
  could get by if you only read half of the book.  They also add some
  humor to otherwise boring subjects.

  They have great books on HTML, PERL, CGI Programming, Java,
  JavaScript, C/C++, Sendmail, Linux and much much more.  And the fast
  moving topics (like HTML) are updated and revised about every 6 months
  or so.  So visit the O'Reilly & Associates <http://www.ora.com/> web
  site or stop by your local book store for more info.


  And remember if it doesn't say O'Reilly & Associates on the cover,
  someone else probably wrote it.


  17.2.  Internet Request For Comments (RFC)


  o  RFC1866 written by T. Berners-Lee and D. Connolly, "Hypertext
     Markup Language - 2.0", 11/03/1995

  o  RFC1867 writtenm by E. Nebel and L. Masinter, "Form-based File
     Upload in HTML", 11/07/1995

  o  RFC1942 written by D. Raggett, "HTML Tables", 05/15/1996

  o  RFC1945 by T. Berners-Lee, R. Fielding, H. Nielsen, "Hypertext
     Transfer Protocol -- HTTP/1.0", 05/17/1996.

  o  RFC1630 by T. Berners-Lee, "Universal Resource Identifiers in WWW:
     A Unifying Syntax for the Expression of Names and Addresses of
     Objects on the Network as used in the World-Wide Web", 06/09/1994

  o  RFC1959 by T. Howes, M. Smith, "An LDAP URL Format", 06/19/1996



  A mSQL and perl Web Server Mini HOWTO
  Oliver Corff, corff@zedat.fu-berlin.de
  v0.1, 17 September 1997

  This Mini HOWTO, highly inspired by Michael Schilli's article
  Gebunkert: Datenbankbedienung mit Perl und CGI, published in the ger-
  man computer magazine iX 8/1997, describes how to build a SQL
  client/server database using WWW and HTML for the user interface.
  ______________________________________________________________________

  Table of Contents


  1. About this Document

     1.1 Intended Audience
     1.2 Conventions used in this text

  2. Introduction

  3. Installation Procedure

     3.1 Hardware Requirements
     3.2 Software Requirements
     3.3 Installing the Operating System
     3.4 The http Server
     3.5 The Browsers
        3.5.1 Configuring Lynx
        3.5.2 Configuring Arena
        3.5.3 Installing and Configuring Netscape
     3.6 Cooperation of Apache and Browsers
     3.7 The Database Engine and its Installation
        3.7.1 Installing msql-1.0.16
        3.7.2 Testing msql-1
        3.7.3 Installing msql-2.0.1
        3.7.4 Testing msql-2
     3.8 Choice of Interfaces: DBI/mSQL, MsqlPerl, and Lite
        3.8.1 DBI and DBD-mSQL
        3.8.2 MsqlPerl
        3.8.3 msql's own scripting language: Lite
     3.9 Going the generic way: DBI and DBD-msql
        3.9.1 Installing perl's Database Interface DBI
        3.9.2 perl's msql Driver DBD-mSQL
     3.10 The MsqlPerl Interface
     3.11 perl's CGI library
     3.12 Installation Checklist

  4. Running an Example Database

     4.1 Adapting the sample script for MsqlPerl
     4.2 Adapting the sample script for msql-2

  5. Conclusion and Outlook



  ______________________________________________________________________

  1.  About this Document


  1.1.  Intended Audience

  Everybody who wants to install a web server database but does not know
  which software is necessary and how it is installed should benefit
  from reading this text. This text provides all information necessary
  to get a SQL database for a web server going; it does not go into any
  detail of CGI programming, nor does it explain the SQL database
  language. Excellent books are available on both topics, and it is the
  intention of this text to provide a working platform based on which a
  user can then study CGI programming and SQL.

  For getting a small scale SQL system running (not the notorious
  example of a major airline booking system, or space mission management
  database) it will be sufficient to have the software described in this
  text and the documentation accompanying it. The user manual of msql (a
  database introduced in this text) provides sufficient information on
  SQL for building your own database.

  The reader of this text should have a working knowledge of how to
  obtain files via ftp if he has no access to CD-ROMs, and a basic
  understanding of how to build binaries from sources. Anyway, all steps
  explained in this text were tested on a real life system and should
  also work on the reader's system.


  1.2.  Conventions used in this text


  A user command:

  # make install



  Screen output from a program:


       Program installed. Read README for details on how to start.



  Sample code of a file:

  ______________________________________________________________________
  # My comment
  char letter;
  ______________________________________________________________________



  2.  Introduction

  It can be safely assumed that databases with a high volume of data or
  a complicated relational setup (like, perhaps,  a lexical database for
  a living language) must be accessible to many users and operators at
  the same time. Ideally, it should be possible to use existing
  different hardware and software platforms that can be combined into
  the actual system. In order to reduce the implementation cost, only
  one system, the database server, needs to be powerful; the user
  stations typically just display data and accept user commands, but the
  processing is done on one machine only which led to the name client-
  server database.  In addition, the user interface should be easy to
  maintain and should require as little as possible on the client side.

  A system which meets these criteria can be built around the following
  items of protocols, concepts and software:

     Linux
        supplies the operating system. It is a stable Unix
        implementation providing true multi-user multi-tasking services
        with full network (TCP/IP e. a.) support.  Except from the
        actual media and transmission cost, it is available free of
        charge and comes in form of so-called distributions which
        usually include everything needed from the basic OS to text
        processing, scripting, software development, interface builders,
        etc.

     HTML
        is the Hypertext Markup Language used to build interfaces to
        network systems like Intranets and the WWW, the World Wide Web.
        HTML is very simple and can be produced with any ASCII-capable
        text editor.

     Browsers
        are text-based (e. g. Lynx) or graphical (e. g. Mosaic,
        Netscape, Arena etc.) applications accepting, evaluating and
        displaying HTML documents.  They are the only piece of software
        which is directly operated by the database user. Using browsers,
        it is possible to display various types of data (text, possibly
        images) and communicate with http servers (see next) on about
        every popular computer model for which a browser has been made
        available.

     http servers
        provide access to the area of a host computer where data
        intended for public use in a network are stored. They understand
        the http protocol and procure the information the user requests.

     SQL
        Structured Query Language is a language for manipulating data in
        relational databases. It has a very simple grammar and is a
        standard with wide industry support.  SQL-based databases have
        become the core of the classical client/server database concept.
        There are many famous SQL systems available, like Oracle,
        Informix etc., and then there is also msql which comes with a
        very low or even zero price tag if it is used in academical and
        educational environments.

     CGI
        Common Gateway Interface is the programming interface between
        the system holding the data (in our case an SQL-based system)
        and the network protocol (HTML, of course).  CGIs can be built
        around many programming languages, but a particularly popular
        language is perl.

     perl
        is an extremely powerful scripting language which combines all
        merits of C, various shell languages, and stream manipulation
        languages like awk and sed.  Perl has a lot of modularized
        interfaces and can be used to control SQL databases, for
        example.


  3.  Installation Procedure



  3.1.  Hardware Requirements

  No general statement can be made about the hardware requirements of a
  database server. Too much depends on the expected number of users, the
  kind of application, the network load etc. In a small environment with
  only a few users and little network traffic a i486-equivalent machine
  with 16 MB of RAM can be completely sufficient. Linux, the operating
  system, is very efficient in terms of resources, and can supply enough
  horse-power for running a broad variety of applications at the same
  time. Of course, faster processors and more RAM mean more speed, but
  much more important than the processor is the amount of RAM. The more
  RAM the system has the less it is forced to swap memory intensive
  processes to disk in case a bottleneck occurs.

  Given anything like 32 MB RAM and a PCI bus, searches and sorting
  operations can be done without much resorting to swap files etc.,
  resulting in lightening fast speed.

  The model installation described in this article was made on a IBM 686
  (133Mhz) with 32 MB RAM and a 1.2 GB IDE hard disk.  Assuming that the
  installation process starts from scratch, here is a list of the
  necessary steps.


  3.2.  Software Requirements


  The software described in this article is available from the Internet
  or from CD-ROM. The following products were used:

  o  Red Hat Linux PowerTools: 6 CD's Complete Easy-to-Use Red Hat 4.2,
     Summer '97; alternatively from http://www.redhat.com;

  o  msql SQL database server: it is now available in two versions. The
     versions have differences in the number of transactions they can
     handle, the administration interface, etc. The elder version,
     1.0.16, is available from Sunsite mirrors. The ELF executable can
     be found at sunsite:apps/database/sql/msql-1.0.16 or on CD-ROM
     (here: disc 4 of InfoMagic Linux Developer's Resource, 6-CD set,
     December 1996) or alternatively from the following URL:
     http://www.infomagic.com.

     The newer version, 2.0.1, can be directly obtained from Hughes'
     homepage in Australia (http://www.hughes.com.au) or from numerous
     mirror sites around the world;

  o  perl from CPAN: The Comprehensive Perl Archive Network.  Walnut
     Creek CDROM, ISBN 1-57176-077-6, May 1997;

  o  Michael Schilli's CGI example program from computer journal iX
     8/1997, pages 150--152, available via ftp from ftp.uni-
     paderborn.de:/doc/magazin/iX;


  3.3.  Installing the Operating System

  Linux is installed in form of the Red Hat Linux Distribution 4.2. In
  order to install successfully, the machine must either have a DOS-
  accessible CD-ROM drive, a bootable CD-ROM drive, or else a boot disk
  must be made following the instructions on the Linux CD.

  During installation the user has the choice to select and configure
  numerous software packages. It is convenient to select the following
  items now:


  o  TCP/IP network support,

  o  the http server Apache, and

  o  the scripting language perl, and

  o  the X Window System, as well as

  o  the browsers Arena (graphical) and Lynx (text-based).

  All these packages are provided with the Linux distribution.  If you
  do not install these packages now you still have the chance to do this
  later with the assistance of glint, the graphical and intuitive
  software package installation manager. Be sure to be root when
  installing these packages.

  It is beyond the scope of this article to describe the network
  installation and initialization procedure. Please consult the online
  (manpages, HTML, texinfo) and printed (Linux Bible, etc. etc.)
  documentation.

  The installation procedure of Red Hat is very mature and requires only
  little user attention besides the usual choices (like providing host
  names, etc.). Once the installation ends successfully, the system is
  basically ready to go.

  Installing the X Window System is not mandatory for a pure server but
  it makes local access and testing much easier. The X installation
  procedure is done by any of several programs; XF86Setup offers the
  most extensive self-testing facilities and needs the least handling of
  hairy details (like video clock programming, etc.). The only
  requirement is that the software can detect the video adapter. A cheap
  accelerated graphics adapter (like Trio S64 based cards prior to
  S64UV+) usually works ``out of the box''.

  At this point we assume that our system is up and running and that
  Apache, Perl and the X Window System have been successfully installed.
  We further assume that all standard structures like the file and
  directory structure are kept as they are defined in the installation.
  Last but not least we leave the host name as it is, and do at this
  moment accept the name localhost. We'll use this name for testing the
  installation; once the whole system works the true name can be added.
  Please note that the network setup also requires editing the files
  /etc/hosts, among others. Ideally this should be done with the
  administration tools provided to user root.



  3.4.  The http Server


  The http server supplied with Linux is known as Apache to humans and
  as httpd to the system. The manpage (man httpd) explains how to
  install and start the http daemon (hence httpd) but, as mentioned, if
  the installation went without problems then the server should be
  running.  You can verify the directory tree: there must be a directory
  /home/httpd/ with three subdirectories: ../cgi-bin/, ../html/ and
  ../icons/. In ../html/ there must be a file index.html. Later we will
  manipulate or replace this file by our own index.html. All
  configuration information is stored in/etc/httpd/conf/. The system is
  well preconfigured and does not need further setup provided the
  installation went without error.


  3.5.  The Browsers


  There are essentially three types of browsers available for Linux:
  pure text-based systems like Lynx, experimental and simple ones like
  Arena (free!) and commercial ones like Netscape (shareware!) with Java
  support. While Lynx and Arena come with Linux, Netscape must be
  procured from other sources. Netscape is available as a precombiled
  binary for Linux on ix86 architectures and will run ``out of the box''
  as soon as the archive is unpacked.
  3.5.1.  Configuring Lynx


  Once Lynx is started it will look for a `default URL' which is usually
  not very meaningful if the system does not have permanent Internet
  access.  In order to change the default URL (and lots of other
  configuration details) the system administrator should edit
  /usr/lib/lynx.cfg. The file is big, around 57000 bytes and contains
  occasionally contradicting information. It states its own home as
  /usr/local/lib/. Not far from top is a line beginning with STARTFILE.
  We replace this line by the following entry:
  STARTFILE:http://localhost and make sure that no spacing etc. is
  inserted:

  ______________________________________________________________________
  # STARTFILE:http://www.nyu.edu/pages/wsn/subir/lynx.html
  STARTFILE:http://localhost
  ______________________________________________________________________


  After saving the file, Lynx should now reveal our index.html document
  if started without arguments.


  3.5.2.  Configuring Arena


  Arena first looks for its own default URL when started without
  arguments.  This URL is hard-wired into the executable but can be
  overrun by the environment variable WWW_HOME. The system administrator
  can place a line saying WWW_HOME="http://localhost" in /etc/profile.
  The variable must then be exported, either by a separate statement
  (export WWW_HOME) or by appending WWW_HOME to the existing export
  statement:

  ______________________________________________________________________
  WWW_HOME="http://localhost"
  export WWW_HOME
  ______________________________________________________________________


  After relaunching a login shell, the new default URL is now system-
  wide known to Arena.



  3.5.3.  Installing and Configuring Netscape


  Netscape is a commercial product and thus not included with the Linux
  distributions. It is either downloadable from the Internet or
  available from software collections on CDROM. Netscape comes in form
  of precompiled binaries for every important hardware platform. For
  installation purposes, it is useful to create a directory
  /usr/local/Netscape/ where the archive is unpacked. The files can be
  kept in place (except for the Java library: follow the instructions in
  the README file that comes with the Netscape binary), and it is
  sufficient to create a soft link in /usr/local/bin/ by issuing the
  command

  # ln -s /usr/local/Netscape/netscape .


  from within /usr/local/bin/.


  Netscape is now ready for use and can be configured via the
  ``Options'' menu. In ``General Preferences'' there is a card
  ``Appearance'' with the entry ``Home Page Location''. Enter
  http://localhost here and do not forget to save the options (via
  ``Options'' --- ``Save Options'') before exiting Netscape. At the next
  startup, Netscape will now show the Apache `homepage'.


  3.6.  Cooperation of Apache and Browsers


  You can now conduct the first real test of both the browser and the
  http server: simply start any of the available browsers and the
  Apache: Red Hat Linux Web Server page will pop up.  This page shows
  the file locations and other basics of http server installation. If
  this page is not displayed please check whether the files mentioned
  above are in place and whether the browser configuration is correct.
  Close edited configuration files before you start the browser again.
  If all files are in place and the browsers seem to be configured
  correctly then examine the network setup of your machine. Either the
  host name is different from what was entered in the configuration, or
  the network setup as such is not correct. It is utterly important that
  /etc/hosts contains at least a line like

  ______________________________________________________________________
  127.0.0.1               localhost localhost.localdomain
  ______________________________________________________________________


  which implies that you can connect locally to your machine. One can
  verify this by issuing any network-sensitive command requiring a host
  name as argument, like telnet localhost (provided telnet is
  installed). If that does not work then the network setup must be veri-
  fied before continuing with the main task.



  3.7.  The Database Engine and its Installation


  Installing the database requires only little more preparation than the
  previous installation steps. There are a few SQL database engines
  available with different runtime and administrative requirements, and
  possibly one of the most straightforward systems is msql, or ``Mini-
  SQL'' by David Hughes. msql is shareware. Depending on the version
  used, commercial sites are charged USD 250.00 and more, private users
  are charged USD 65.00 and more, and only educational institutions and
  registered non-profit organizations can use this software free of
  charge.  Please note that the exact figures are provided in the
  licence notes of the database documentation. The figures given here
  serve as a rough indicator only.

  A few words are in place here why the author chose msql. First of all,
  there is personal experience. While searching for a database engine
  the author found msql to be about the easiest to install and maintain,
  and it provides enough coverage of the SQL language to meet general
  needs. Only when writing these lines, the author discovered the
  following words of praise in  Alligator Descartes' DBI FAQ (perl
  database interface FAQ):


       From the current author's point of view, if the dataset is
       relatively small, being tables of less than 1 million rows,
       and less than 1000 tables in a given database, then mSQL is
       a perfectly acceptable solution to your problem.  This
       database is extremely cheap, is wonderfully robust and has
  excellent support. [...]


  Msql is available in two versions now, msql-1.0.16 and msql-2.0.1,
  which differ in performance (not noticeable in small scale projects)
  and accompanying software (the newer version comes with more tools,
  its own scripting language, etc.).  We will describe both versions of
  msql since their installion differs in a few points.


  3.7.1.  Installing msql-1.0.16


  msql is available as source and as compiled executable with ELF
  support.  Using the ELF binaries makes installation easy since the
  archive file msql-1.0.16.ELF.tgz contains a complete absolute
  directory tree so that all directories are generated properly when
  unpacked from /.

  If you decide to compile msql-1.0.16 yourself and are going to use the
  MsqlPerl package rather than the DBI interface (see a detailed
  discussion on the difference between these two further down) then be
  prepared that MsqlPerl might complain during the test suites that some
  instruction inside msql failed. In this case a patch may be necessary
  which is described in the MsqlPerl documentation (file
  patch.lost.tables). Notably, this demands including three lines in
  msqldb.c after line 1400 which says  entry->def = NULL;:

          *(entry->DB) = 0;
          *(entry->table) = 0;
          entry->age = 0;


  The code fragment should now look like

  ______________________________________________________________________
          freeTableDef(entry->def);
          safeFree(entry->rowBuf);
          safeFree(entry->keyBuf);
          entry->def = NULL;
          *(entry->DB) = 0;
          *(entry->table) = 0;
          entry->age = 0;
  ______________________________________________________________________



  Compiling msql involves several steps. After unpacking the source
  archive, it is necessary to build a target directory. This is done by
  saying

  # make target


  If successful, the system will then answer with


       Build of target directory for Linux-2.0.30-i486 complete



  You must now change into this newly created directory and run a

  # ./setup

  command first. The ./ sequence is necessary to make sure that really
  the command setup in this directory and not another command which hap-
  pens to have the same name is executed. You will then be asked ques-
  tions on the location of the source directory and whether a root
  installation is desired. These questions answered, the system should
  then run a number of tests checking for available software (compilers,
  utilities etc.) and finally say


       Ready to build mSQL.

       You may wish to check "common/site.h" although the defaults should be
       fine.  When you're ready, type  "make all" to build the software



  We say

  # make all


  If everything went as intended, we'll read:


       make[2]: Leaving directory `/usr/local/Minerva/src/msql'
       <-- [msql] done

       Make of mSQL complete.
       You should now mSQL using make install

       NOTE : mSQL cannot be used free of charge at commercial sites.
              Please read the doc/License file to see what you have to do.

       make[1]: Leaving directory `/usr/local/Minerva/src'



  All binaries must then be made visible to the search paths by creating
  soft links in /usr/local/bin/. Change to that directory and issue the
  command

  # ln -s /usr/local/Minerva/bin/* .


  after which the links will be properly set.


  3.7.2.  Testing msql-1


  After the installation it is now possible to test whether the database
  works. Before anything else is done, the server daemon must be
  started.  The system administrator holding root privileges issues the
  command

  # msqld &


  (do not forget to add the &, otherwise msql won't run in the back-
  ground.) after which the following screen message appears:



  mSQL Server 1.0.16 starting ...

  Warning : Couldn't open ACL file: No such file or directory
  Without an ACL file global access is Read/Write



  This message tells us that everything so far worked since we did not
  set up any access restrictions. For the moment it is sufficient to
  start the msql daemon from within a shell but later we may want to
  have the system startup automatically execute this command for us.
  The command must then be mentioned in a suitable rc.d script.  Only
  now the administrator can issue the first genuine database command:

  # msqladmin create inventur


  msql replies by saying Database "inventur" created.. As a further
  proof, we find that the directory /usr/local/Minerva/msqldb/ contains
  now the empty subdirectory ../inventur/. We could manipulate the newly
  created database with the administration tools; these procedures are
  all covered in detail in the msql documentation.


  3.7.3.  Installing msql-2.0.1


  There is now a newer, more powerful version of Hughes' mSQL server
  available the installation of which is different in a few points.
  Installing msql-2 from scratch involves the following steps. Copy the
  archive to your extraction point, e. g.  /usr/local/msql-2/, then
  untar the archive:

  # tar xfvz msql-2.0.1.tar.gz



  Change to the root direction of the install tree and issue a

  # make target



  Change to targets and look for your machine type. There should be a
  new subdirectory Linux-(your version)-(your cpu)/.  Change to that
  directory and start the setup facility located here:

  # ./setup



  There is also a file site.mm which can be edited. Maybe you have got
  used to the directory name /usr/local/Minerva/ and want to preserve
  it? In this case change the INST_DIR=...  line to your desired target
  directory. Otherwise, leave everything as it is.

  Now you can start building the database:

  # make
  # make install



  If everything went successfully, we'll see a message like:


       [...]

       Installation of mSQL-2 complete.

       *********
       **   This is the commercial, production release of mSQL-2.0
       **   Please see the README file in the top directory of the
       **   distribution for license information.
       *********



  After all is installed properly we have to take care of the
  administration details. Here, the real differences from msql-1 begin.
  First, a user msql is created which is responsible for database
  administration.


  # adduser msql



  Then we have to change all ownerships in the mSQL directory to msql by
  saying:

  # cd /usr/local/Minerva
  # chown -R msql:msql *



  Then we create soft links for all database binaries in /usr/local/bin/
  by saying:

  # ln -s /usr/local/Minerva/bin/* .



  3.7.4.  Testing msql-2

  We can now start the database server by issuing the command msql2d &
  and should get a response similar to this one:


       Mini SQL Version 2.0.1
       Copyright (c) 1993-4 David J. Hughes
       Copyright (c) 1995-7 Hughes Technologies Pty. Ltd.
       All rights reserved.

               Loading configuration from '/usr/local/Minerva/msql.conf'.
               Server process reconfigured to accept 214 connections.
               Server running as user 'msql'.
               Server mode is Read/Write.

       Warning : No ACL file.  Using global read/write access.



  That looks perfect. The database is compiled and in place, and we can
  now continue with the perl modules since these rely partially on the
  presence of a working database server for testing.

  Accidentally, this is also a good moment to print the complete manual
  that comes with msql-2.0.1:

  # gzip -d manual.ps.gz
  # lpr manual.ps



  We can proceed to building the interfaces now, but it is a good idea
  to keep the newly created SQL server up and running since that makes
  testing the interface libraries somewhat simpler.



  3.8.  Choice of Interfaces: DBI/mSQL, MsqlPerl, and Lite

  A frequently quoted saying in the Camel Book (the authorative perl
  documentation) states that there is more than one way to achieve a
  result when using perl. This, alas, holds true for our model
  application, too. Basically there are three ways to access an msql
  database via CGI. First of all the question is whether or not perl
  shall be used. If we use perl (on which this article focuses) then we
  still have the choice between two completely different interface
  models. Besides using perl, we can also employ msql's own scripting
  language, called Lite, which is reasonably simple and a close clone of
  C.


  3.8.1.  DBI and DBD-mSQL

  By the time of this writing, using perl's generic database interface
  called DBI is the method of choice. DBI has a few advantages: It
  provides unified access control to a number of commercial databases
  with a single command set. The actual database in use on a given
  system is then contacted through a driver which effectively hides the
  pecularities of that database from the programmer. Being such, using
  DBI provides for a smooth transition between different databases by
  different makers. In one single script it is even possible to contact
  several different databases. Please refer to the DBI-FAQ for details.
  There is, however, one drawback: The DBI interface is still under
  development and shows rapidly galloping version numbers (sometimes
  with updates taking place within less than a month). Similarly, the
  individual database drivers are also frequently updated and may rely
  on specific versions of the database interface. Users making first-
  time installations should stick to the version numbers given in this
  article since other versions may cause compilation and testing
  problems the trouble shooting of which is nothing for the faint-
  hearted.



  3.8.2.  MsqlPerl

  MsqlPerl is a library for directly accessing msql from perl scripts.
  It bypasses the DBI interface and is fairly compact. Though it works
  fine with both versions of msql, its usage is not promoted anymore in
  favour of the generalized DBI interface. Nonetheless, in a given
  installation it may prove to be the interface of choice since it is
  small and easy to install. Notably, it has less version dependencies
  than revealed by the interaction of DBI and particular database
  drivers.
  3.8.3.  msql's own scripting language: Lite

  Last but not least msql-2 comes with its own scripting language: Lite.
  The language is a close relative of C stripped of its oddities with
  additional shell-like features (in a way, something like a very
  specialized version of perl). Lite is a simple language and is well
  documented in the msql-2 manual. The msql-2 package also comes with a
  sample application sporting Lite.

  We will not describe Lite here because it is well documented but
  fairly specific to msql-2, and because it is assumed that the readers
  of this article have a basic interest in and a basic understanding of
  perl.  Nonetheless it is highly recommended to have a closer look at
  Lite: it may well be the case that Lite offers the solution of choice
  in an exclusive msql-2 environment (implying no other databases are
  involved) due to its simplicity and straightforward concept.



  3.9.  Going the generic way: DBI and DBD-msql

  We assume that perl was installed during the system setup or via the
  package manager mentioned above. No further details will be given
  here.  Nonetheless we first test whether our version of perl is up to
  date:


  # perl -v



  perl should respond with the following message:



       This is perl, version 5.003 with EMBED
               Locally applied patches:
                 SUIDBUF - Buffer overflow fixes for suidperl security

               built under linux at Apr 22 1997 10:04:46
               + two suidperl security patches

       Copyright 1987-1996, Larry Wall
       [...]



  So far, everything is fine. The next step includes installing the perl
  libraries for databases in general (DBI), the msql driver (DBD-mSQL)
  and CGI. The CGI driver is necessary in any case.  The following
  archives are necessary:

  1. DBI-0.81.tar.gz

  2. DBD-mSQL-0.65.tar.gz

  3. CGI.pm-2.31.tar.gz (or higher)

  A caveat is necessary here for beginners: the test installation
  described here works fine using software with exactly these version
  numbers, and combinations of other versions failed in one or the other
  way. Debugging flawed version combinations is nothing for those who
  are not very familiar with the intimate details of the calling
  conventions etc. of the interfaces. Sometimes only a method is renamed
  while performing the same task, but sometimes the internal structure
  changes significantly. So, again, stick with these version numbers if
  you want to be on the safe side even if you discover that version
  numbers have increased in the meantime. Frequent updates of these
  interfaces are the rule rather than the exception, so you should
  really anticipate problems when installing other versions than those
  indicated here.

  It is very important that the database driver for mSQL (DBD-mSQL) is
  installed after the generic interface DBI.

  We start by creating the directory /usr/local/PerlModules/ as it is
  very important to keep the original perl directory tree untouched.  We
  could also choose a different directory name since the name is
  completely uncritical, and unfortunately that is not really mentioned
  in the README files of the verious perl modules.  Having copied the
  above-mentioned archives to /usr/local/PerlModules/ we unpack them
  saying

  # tar xzvf [archive-file]



  for every single of the three archives. Do not forget to supply the
  real archive name to tar. The installation process for the three
  modules is essentially stardardized; only the screen messages showing
  important steps of individual packages are reproduced here.


  3.9.1.  Installing perl's Database Interface DBI


  The database interface must always be installed before installing the
  specific database driver.  Unpacking the DBI archive creates the
  directory /usr/local/PerlModules/DBI-0.81/. Change to that directory.
  There are a README file (you should read it) and a perl-specific
  makefile. Now issue the command

  # perl Makefile.PL



  The system should answer with a lengthy message of which the most
  important part is shown here::



       [...]
       MakeMaker (v5.34)
       Checking if your kit is complete...
       Looks good
               NAME => q[DBI]
               PREREQ_PM => {  }
               VERSION_FROM => q[DBI.pm]
               clean => { FILES=>q[$(DISTVNAME)/] }
               dist => { DIST_DEFAULT=>q[clean distcheck disttest [...]
       Using PERL=/usr/bin/perl

       WARNING! By default new modules are installed into your 'site_lib'
       directories. Since site_lib directories come after the normal library
       directories you MUST delete old DBI files and directories from your

       Writing Makefile for DBI



  This looks good, as the program says, and we can proceed with the next
  step:

  # make


  If no error message occurs (the detailed protocol dumped on screen is
  not an error message) we test the newly installed library with the
  command

  # make test


  Watch the output for the following lines (you can always scroll back
  with [Shift]-[PgUp]):


       [...]
       t/basics............ok
       t/dbidrv............ok
       t/examp.............ok
       All tests successful.
       [...]
       DBI test application $Revision: 1.20 $
       Switch: DBI-0.81 Switch by Tim Bunce, 0.81
       Available Drivers: ExampleP, NullP, Sponge
       ExampleP: testing 2 sets of 5 connections:
       Connecting... 1 2 3 4 5
       Disconnecting...
       Connecting... 1 2 3 4 5
       Disconnecting...
       Made 10 connections in  0 secs ( 0.00 usr  0.00 sys =  0.00 cpu)

       test.pl done



  The final step is to install all files in their proper directories.
  The following command will take care of it:

  # make install


  No more duties are left. If for some reason the installation failed
  and you want to redo it do not forget to issue

  # make realclean


  first. This will remove stale leftovers of the previous installation.
  You can also remove the files which were installed by copying the
  screen contents (shown abbreviated)


       Installing /usr/lib/perl5/site_perl/i386-linux/./auto/DBI/DBIXS.h
       Installing /usr/lib/perl5/site_perl/i386-linux/./auto/DBI/DBI.so
       Installing /usr/lib/perl5/site_perl/i386-linux/./auto/DBI/DBI.bs
       [...]
       Writing /usr/lib/perl5/site_perl/i386-linux/auto/DBI/.packlist
       Appending installation info to /usr/lib/perl5/i386-linux/5.003/perllocal.pod



  into a file, replacing every Installing with rm. Provided you named
  the file uninstall you can then say

  # . uninstall


  which will remove the recently installed files.


  3.9.2.  perl's msql Driver DBD-mSQL


  The msql driver can only be installed after a successful installation
  of perl's generic database interface.

  The basic steps are the same as above; so first go through

  # perl Makefile.PL



  Here, the system should answer with an urgent warning to read the
  accompanying documentation. It will then detect where msql resides,
  and asks which version you use:



       $MSQL_HOME not defined. Searching for mSQL...
       Using mSQL in /usr/local/Hughes

        -> Which version of mSQL are you using [1/2]?



  State your correct version number. Quite a few lines of text will fol-
  low. Watch for the following ones:


       Splendid! Your mSQL daemon is running. We can auto-detect your configuration!

       I've auto-detected your configuration to be running on port: 1114



  You can now test the driver by saying

  # make test


  Again, a lengthy output follows. If it ends with


       Testing: $cursor->func( '_ListSelectedFields' ). This will fail.
               ok: not a SELECT in msqlListSelectedFields!
       Re-testing: $dbh->do( 'DROP TABLE testaa' )
               ok
       *** Testing of DBD::mSQL complete! You appear to be normal! ***



  you are on the safe side of life and can install your driver by saying

  # make install

  You are now ready to go and can skip the next paragraph.



  3.10.  The MsqlPerl Interface

  If you decide to use the exclusive MsqlPerl interface then no generic
  database driver is needed, only MsqlPerl-1.15.tar.gz, since, as
  mentioned earlier, MsqlPerl provides a direct interface between perl
  and the database server without using the DBI interface.  Installing
  and testing is straightforward.

  After saying perl Makefile.PL the make utility can be started.  First
  you have to answer the question where mSQL resides. If it resides in
  /usr/local/Minerva/ the default answer can be confirmed.

  Then do a make test. Before doing so you must ensure that you have a
  database named test and that you have read and write permissions for
  it. This can be done by

  # msqladmin create test



  3.11.  perl's CGI library


  Installing perl's CGI part is the simpliest of the three steps.
  Execute the following commands in the given order and everything is
  done:


  # perl Makefile.PL
  # make
  # make install



  Unlike the previous drivers this interface does not have a test option
  (# make test) whereas the other modules should be tested in any case.

  A subdirectory with CGI example scripts is also created. You can copy
  the contents of this directory into /home/http/cgi-bin/ and use the
  browser to experiment with the scripts.



  3.12.  Installation Checklist

  We went through the following steps, in this order:

  1. Install Linux with networking support

  2. Install a http server, e. g. Apache

  3. Install a browser, e. g. Arena, lynx or Netscape

  4. Install an SQL server, e. g. msql

  5. Install a suitable perl SQL interface


  6. Install the CGI files

  Finally, you can do some clean-up. All source trees for msql and the
  perl modules can be safely deleted (however, you should not delete
  your archive files!) since the binaries and documentation are now
  based in different directories.


  4.  Running an Example Database


  After completing the system installation we can now finally run a
  model application. Depending on the version of msql installed and the
  perl database interface used, we have to modify the sample programs in
  a few points.

  First however, the file index.html residing in /home/httpd/html/ must
  be modified to allow calling a sample database application. We can
  place our database (which we call database.cgi or inventur.cgi here
  despite its archive name perl.lst.ck) in /home/httpd/html/test/.

  We add one line (of course, depending on your installation choices)
  similar to the following to index.html:

  ______________________________________________________________________
  <LI>Test the <A HREF="test/database.cgi">Database, DBI:DBD-mSQL style!</A>
  <LI>Test the <A HREF="test/inventur.cgi">Database, MsqlPerl style!</A>
  ______________________________________________________________________


  Usually you should only pick one of these two choices but if you have
  both types of database interface installed you can leave both lines
  here as they are. You can then compare performance, etc.


  4.1.  Adapting the sample script for MsqlPerl

  Our sample script has to be told to use the MsqlPerl interface. The
  modification takes place in several locations. First, near the
  beginning of the file, we change the use clause:

  ______________________________________________________________________
  #
  # use DBI;            # Generisches Datenbank-Interface
  use Msql;
  ______________________________________________________________________



  Then, near line 27, the MsqlPerl syntax does not require the
  mentioning of a specific driver:

  ______________________________________________________________________
  # $dbh = DBI->connect($host, $database, '', $driver) ||
  $dbh = Msql->connect($host, $database) ||
  ______________________________________________________________________



  Then, from line 33 onward throughout the whole script,  we have to
  change all instances of do against query:



  ______________________________________________________________________
  # $dbh->do("SELECT * FROM hw") || db_init($dbh);
  $dbh->query("SELECT * FROM hw") || db_init($dbh);
  ______________________________________________________________________



  Finally, in MsqlPerl speak, line 207 can be commented out:

  ______________________________________________________________________
  # $sth->execute || msg("SQL Error:", $sth->errstr);
  ______________________________________________________________________



  In addition, it may become necessary to swap all errstr calls like the
  one in the preceding code fragment against errmsg.  This is also
  version dependent.

  After these modifications, the script should run smoothly.


  4.2.  Adapting the sample script for msql-2

  The SQL syntax was redefined during the development of mslq-2. The
  original script will fail to execute the table initialization
  statements in lines 45 -- 58. The primary key modifier is no longer
  supported by msql-2, and should simply be skipped:

  ______________________________________________________________________
      $dbh->do(<<EOT) || die $dbh->errstr; # Neue Personen-Tabelle
          create table person (
  # We do not need the 'primary key' modifier anymore in msql-2!
  #           pn        int primary key,   # Personalnummer
              pn        int,               # Personalnummer
              name      char(80),          # Nachname, Vorname
              raum      int                # Raumnummer
          )
  EOT
      $dbh->do(<<EOT) || die $dbh->errstr; # Neue Hardware-Tabelle
          create table hw (
  # We do not need the 'primary key' modifier anymore in msql-2!
  #           asset int primary key,       # Inventurnummer
              asset int,                   # Inventurnummer
              name   char(80),             # Bezeichnung
              person int                   # Besitzer
          )
  EOT
  ______________________________________________________________________



  Unfortunately, this specific script will then accept new entries with
  identical personnel numbers; the msql-1 modifier primary key intends
  to prevent exactly this behaviour. The msql-2 documentation shows how
  to use the CREATE INDEX clause to create unique entries.


  5.  Conclusion and Outlook

  If you have installed msql-2 on your system then you can have a look
  at the sample programs written in Lite, msql-2's own scripting
  language.

  Either version of msql comes with a basic set of administration tools
  which allow the user to create and drop tables (msqladmin) and examine
  database structures (relshow).

  The second generation msql (i.e. msql-2) has a few more genuinely
  useful utilities: msqlimport and msqlexport. These allow the dumping
  of flat line data files into and out of the SQL database. They can be
  used for loading quantities of existing data d'un coup into existing
  tables, or extract flat data from tables, and the user does not have
  to deal with writing a single line of perl or SQL or whatever code for
  this task.

  If you want to write your own perl scripts dealing with databases
  you'll find sufficient support in the example files and the extensive
  on-line documentation that comes with the DBI module.

  Anyway, you are now ready to go and present your data to the users of
  your own network, or even the WWW.



  Wacom Tablet HOWTO
  Stefan Runkel <runkel@runkeledv.de>
  Version 1.0.6 of Mar 28, 2000

  Installation of (not only) Wacom graphic tablets under linux and  / or
  xfree86
  ______________________________________________________________________

  Table of Contents



  1. Copyright

  2. Introduction

     2.1 New Versions of this Document
     2.2 Feedback and Corrections
     2.3 Acknowledgements

  3. Requirements

     3.1 Which Hardware is supported
     3.2 Which Software is needed
     3.3 Which Software is supported

  4. Tablets as Mouse-Replacement for the Linux-Console

     4.1 Tablets and gpm

  5. Tablets with XFree

     5.1 Required XFree Version
     5.2 Sample XF86Config snippet (simple)
     5.3 Section Module
     5.4 Device Types
     5.5 DeviceName
     5.6 Port
     5.7 DebugLevel
     5.8 Serial Num (intuos series only)
        5.8.1 How to find out the serial number of a device
        5.8.2 Serial Num - Example of what has been logged
     5.9 Mode absolute, Mode relative
     5.10 Device Modes Extension, Core, AlwaysCore
     5.11 HistorySize
     5.12 Suppress
     5.13 TiltMode (intuos only)
     5.14 TopX, TopY, BottomX, BottomY Statements
        5.14.1 Getting the maximal X, Y Values, current configuration, and the resolution
        5.14.2 Getting Resolution - Example of what has been logged
     5.15 KeepShape
     5.16 Threshold

  6. Changing configuration from within a running X-Server

     6.1 Setting up the Gimp to use XInput devices
     6.2 The Switch Device
     6.3 Buttons
     6.4 Button Mapping with xmodmap for Devices in Core Mode
     6.5 Button Mapping with xinput  for Devices in Extension Mode
     6.6 xsetmode - changing absolute / relative mode
     6.7 xsetpointer - setting the default core device
     6.8 Keys
     6.9 Utilities to use more than one tablet and for toggle support on  / off

  7. XFree FAQ - Problems And Questions

     7.1 Gnome and Gimp only work like a usual mouse, without pressure and tilt. Gimp Input Devices Dialog shows "No Input Devices"
     7.2 Is the wheel of the mouse (cursor) supported ?
     7.3 How can I find out the intuos Serial Num of my tool ?
     7.4 How do I change the action of each button of my tool?
     7.5 How can I use the intuos/artpad/ultrapad  macro area ?
     7.6 Is it possible to define multiple active areas on the same tablet ?
     7.7 Can I use more than one tablet at the same time ?

  8. Gpm FAQ - Problems And Questions

     8.1 NCurses programs only support cut and paste with my new gpm
  9. Further Information / Used Documents



  ______________________________________________________________________

  1.  Copyright

  Copyright (c) 1999,2000 by Stefan Runkel Runkel@runkeledv.de

  This document describes the installation of Wacom tablets under linux.
  It may be distributed, at your choice, under either the terms of the
  GNU Public License version 2 or later or the standard Linux
  Documentation Project terms. These licenses should be available from
  where you got this document. Please note that since the LDP terms
  don't allow modification (other than translation), modified versions
  can be assumed to be distributed under the GPL.


  2.  Introduction



  Graphic tablets are now quite inexpensive and can help allot with the
  work of image manipulation. In addition to that what a mouse can do
  for you they have the following features:


  o  pressure and tilt sensitivity

  o  high resolution motion control

  o  sub-pixel positioning

  o  an input device that looks like and is handled like a normal Pen.

  This document addresses mainly the products from Wacom, because I own
  3 different products of them and because their products are highly
  available in the region of Europe.

  Nevertheless I think it should be easy to adapt the shown concepts to
  other products.


  I have written this document because I have not found a document about
  this subject which contained completely what I wanted to know.  So I
  got small parts of information from various people in the net and
  assembled them to this HOWTO. Regarding the questions of my readers, I
  must realize that this document also is not complete and never will
  be. But from the same questions I can tell that it helped many people
  on the way, and each new question lets this HOWTO grow.


  2.1.  New Versions of this Document



  The latest version of this document will be available at
  http://www.runkeledv.de/linux.htm .


  2.2.  Feedback and Corrections



  Comments, corrections, and additions are greatly be appreciated. I can
  be contacted at:

  Runkel@runkeledv.de or at RunkelEDV@t-online.de

  2.3.  Acknowledgements



  I would like to thank all authors listed in the ``Further Information
  / used documents'' Section as well as everyone who answered my
  questions by email.  This HOWTO reflects much of their work.


  3.  Requirements



  This chapter is about what is needed to get your tablet working.

  3.1.  Which Hardware is supported



  First of all, you should have a tablet, of course. This should be a
  product that connects to the serial port (RS232) of your computer,
  because USB support for linux is still under development. At the time
  of writing (Mar 2000) kernel support starts for the newer usb products
  graphire and intuos, and it is worked on the XFree driver.  Gpm is
  unmaintained for now, so we can not expect an usb driver for it in the
  near future.


  The following Wacom tablets are supported:



  o  ArtZ II series (known in Europe as the UltraPad series - the same
     UltraPad name also was used for earlier tablets that only work
     partially.)

  o  ArtPad II

  o  PL300 (combined LCD screen and tablet)

  o  Pen Partner

  o  Graphire alias FAVO (mouse and pen, get at least the alpha 16
     driver for full support from http://www.lepied.com/xfree86/).

  o  Intuos series (support may be only partial with the driver of your
     distribution, get  updated alpha versions from Frederic Lepied's
     page: http://www.lepied.com/xfree86/)


  The older SD and HD series are not supported by the standard XFree86
  driver, however, a modified driver that supports these devices as well
  some OEM products with embedded screens including the IBM Thinkpad 360
  PE and Toshiba T200 is available from: http://hwr.nici.kun.nl/pen-
  computing/pen-computing-formats.html


  3.2.  Which Software is needed



  o   If you want support for the linux console, get the latest version
     of gpm from ftp://ftp.prosa.it/pub/gpm or from
     ftp://animal.unipv.it/pub/gpm (mirror)



  o   If you want support for XFree86, use at least version 3.3.3.1 or
     get the latest from http://www.xfree.org


  3.3.  Which Software is supported



  o  For the linux console, the only program I know is gpm.


  o  For XFree, the keyword is XInput. This specification has to be
     supported by device drivers which provide extra information. In
     turn, XInput has to be understood by programs which want to use
     alternative pointer devices.

  There is a big number of programs based on the gtk library. The gtk
  has XInput support and makes it very easy to use.
  At least the following applications support XInput:



  o  The Gimp - a powerful image manipulation program in the style of
     Photoshop. The 1.1.x instable development version includes XInput
     support as a standard feature. We are awaiting the next stable
     release, Version 1.2.x.


     Obtain Gimp from http://www.gimp.org , it really deserves it !  I
     am sure most of you know this and it was the reason to buy a
     tablet.



  o  gsumi - a simple B/W drawing program that supports drawing /
     erasing with pressure and tilt sensitivity.  Get it from the gsumi
     web page: http://www.gtk.org/~otaylor/gsumi/



  o  xink (By Ralph Levien) - another rudimentary drawing program for X.

     xink is available from:
     ftp://kiwi.cs.berkeley.edu/pub/raph/xink.tar.gz


  o  RasMol - a molecular visualization program that supports a hardware
     dial box using XInput. look at
     http://www.umass.edu/microbio/rasmol/distrib/rasman.htm .



  o  xinput (by Frederic Lepied) - a very useful utility for configuring
     and testing XInput devices.

     xinput is available from:
     ftp://ftp.x.org/contrib/utilities/xinput-1.2.tar.gz


  4.  Tablets as Mouse-Replacement for the Linux-Console



  4.1.  Tablets and gpm



  The ``gpm'' daemon supports allot of input devices, including tablets.
  If you want a list of the supported devices of your gpm,  do a

       gpm -t help


  and you get it.

  The Wacom driver of gpm 1.18.0 and below seems to be for the very old
  artpad models, the documentation does not say anything about this. I
  tested it with ultrapad, penpartner, graphire and intuos models but it
  did not work.  I have rewritten the wacom driver for gpm, to use it
  you need at least gpm version 1.18.2 . Since 1.18.2, the old wacom
  driver has been replaced with my driver for wacom graphire, penpartner
  and ultrapad products.

  However, if you own an old artpad, use gpm < 1.18.1 and try:

       killall gpm ; gpm -t wacom -m /dev/ttyS0


  and it should work.


  If you own a graphire, use gpm > 1.18.1 instead and use

  for the relative (mouse-like) mode:

       killall gpm ; gpm -t wacom -o relative -m /dev/ttyS0


  for the absolute (tablet-like) mode:

       killall gpm ; gpm -t wacom -o absolute -m /dev/ttyS0


  Of course, you get only the buttons and the movement function,
  pressure and tilt are not supported because they are not too useful in
  text-based applications.
  There is no support for ultrapad macro buttons or graphire mouse
  wheel.

  If you use gpm and XFree86, you may or may not run in problems,
  because normally a device can be opened only by one program at a time.
  There are two solutions for that:



  o  The gpm repeater mode. If you start gpm with the "-R protocol"
     option, it will repeat all data it gets to the device /dev/gpmdata.
     Let us say, you have a ps2 type mouse and your gpm call looks like:
     gpm -t ps2 -Rmman then gpm gets your ps2 mouse data and tries to
     translate this into a mman packet, which it will emit to
     /dev/gpmdata. Unfortunately, gpm can translate to only a few
     protocols at the time of writing. Since gpm 1.18.1, these protocols
     to which can be translated are marked with an asterix at the first
     column.  Again, do a gpm -t help to get the list.
     If you want to omit the translation and only get the data byte for
     byte, just call gpm -t ps2 -R raw . You can then make XFree use
     that second device by putting the line Device      "/dev/gpmdata"
     in your XF86Config in the pointer section or the XInput section.


  o  If you use startx, you can modify it that it does a gpm -k before
     the X-Server is started. This option kills a running gpm.


  5.  Tablets with XFree



  5.1.  Required XFree Version



  Minimum ``XFree'' version should be 3.3.3.1 because this version has
  extended XInput support, the second side switch works now and the
  blocking mouse effect has been fixed.

  If you must use any prior version, XInput support should be available
  since 3.1.2.d.


  XInput support in XFree is configured basically in a file called
  XF86Config.  In most cases the XF86Config file is located in /etc or
  in /etc/x11. I will show now a very short configuration section and
  explain then what can be changed and why  this is needed.


  5.2.  Sample XF86Config snippet (simple)



       Section "Module"
       # Wacom Device Driver
       Load "xf86Wacom.so"
       EndSection

       Section "XInput"
       # Settings for Wacom pen
         SubSection "WacomStylus"    # type of input device
           Port "/dev/ttyS0"         # Serial Port
           DeviceName "Pen1"         # Name, choose it free
           Baudrate 9600             # Usable only for intuos
           Mode Absolute             # Map Tablet Area to Screen
           AlwaysCore                # See text
           HistorySize 200           # Buffer size for motion events
         EndSubSection
       EndSection



  5.3.  Section Module



  XInput support in XFree is reached due to the use of modules. The
  device driver module for Wacom is called ``xf86Wacom.so'' . This goes
  to the "Module" section and has to be appear only once per XF86Config
  file.



  5.4.  Device Types



  A physical device can be:

  o  The tip of your pen

  o  The eraser of your pen

  o  A mouse like the Wacom products lens cursor, 4d-mouse, graphire-
     mouse

  o  The airbrush

  The  penpartner and graphire products simply recognize the type of a
  device, but they can not distinguish them. For example, you can not
  use two different pens, say, one configured red  and one configured
  blue - all what these products say is: "I found a pen tip on my
  surface", or "I found an Eraser on my surface", or "I found a mouse on
  my surface".


  XInput maps the device types to devices, these device types are later
  specified in the XF86Config as a subsection in the Section XInput:

  o  WacomStylus Tip of a pen or airbrush

  o  WacomEraser Eraser of a pen or airbrush

  o  WacomCursor Mice, like graphire mouse, lens cursor, 4d-mouse

  5.5.  DeviceName



  You must give every configured device a unique name. This name will be
  used later in your program to talk to that device. You can choose this
  name free.



  5.6.  Port



  XInput wants to know at which serial port this device can be found.
  This allows me to use two different tablets at the same time, for
  example a graphire connected to /dev/ttyS0 and a penpartner connected
  to /dev/ttyS1.


  5.7.  DebugLevel



  This statement controls how verbose the Wacom driver is. The Level
  goes from 0 to 10. If this statement is not given, DebugLevel 0 is
  used, which logs the very less.

  Example:

  SubSection "WacomStylus" # Pen
    DeviceName "PenRed"    # Name, choose it free
    ...
    DebugLevel 10          # be very verbose
    ...
  EndSubSection



  5.8.  Serial Num (intuos series only)



  The intuos product is more efficient than penpartner and graphire
  because it can distinguish many devices of the same type. This means
  that it is now possible to use two pens, one configured red  and one
  configured blue. As you see, the use of device types is not enough
  information to handle different pens. Therefore, each intuos device,
  be it a pen, ink pen, mouse, or whatever has a serial number, which
  you can specify to aid XInput in resolving the right device. This
  would look like:



       Section "XInput"
         SubSection "WacomStylus" # Pen
           DeviceName "PenRed"    # Name, choose it free
           ...
           Serial 2609917443      # Serial Number of that device
           ...
         EndSubSection
         SubSection "WacomStylus" # another Pen
           DeviceName "PenBlue"   # Name, choose it free
           ...
           Serial 2609918664      # Serial Number of that device
           ...
         EndSubSection
       EndSection



  It should be said that combined input devices like pens have only one
  serial number. The driver uses the serial number it gets to recognize
  one specific pen and the device type to distinguish the tip of that
  specific pen from its eraser.



  5.8.1.  How to find out the serial number of a device


  1. Set DebugLevel to  6

  2. Start the  X-Server by typing X 2>t

  3. Tip all devices down on the tablet and make a notice of the order
     you tipped them.

  4. Kill the X-Server (usually  Ctrl+Alt+Backspace)

  5. Do a grep serial_num t

  You should get a list of your different numbers.



  5.8.2.  Serial Num - Example of what has been logged



       BEGIN xf86WcmProc dev=0x8354d60 priv=0x833e3f0 type=stylus flags=9 what=1
       xf86WcmProc pWcm=0x8354d60 what=ON
       END xf86WcmProc Success what=1 dev=0x8354d60 priv=0x833e3f0
       device_id=0x96 serial_num=2595227137 type=cursor
       [cursor] abs prox=false x=0 y=0 z=0 button=false buttons=0



  (serial_num is in Line 4 Word 2).



  5.9.  Mode absolute, Mode relative



  If you set a device in mode absolute, this means, that the active area
  of the tablet will be mapped to the screen. Every time you go down to
  the tablet at the same point with an absolute device the pointer will
  appear at the same point of the screen.


  If you set a device in mode relative, you will get the well known
  behavior of a mouse. This means, that if you take the mouse off from
  the surface, move it and go down again, the pointer does (ideally) not
  move.


  Example:
  Mode Absolute


  5.10.  Device Modes Extension, Core, AlwaysCore



  XFree knows two pointers: one with only the standard features
  (buttons, moving-capabilities), which is used for selecting menus,
  text, clicking buttons and doing other controlling stuff. This is the
  Core Device.

  The other pointer is used by applications which want more information,
  like pressure and tilt.
  This is the extension device.


  Starting with version 3.3.3.1, the Statement AlwaysCore tells the
  driver that it should send both types of events.


  If you do not specify Alwayscore in your XF86Config, then this device
  is initially used as extension device, this means it is usable only in
  applications but you can not control the menus of your window manager
  with it.



  If Alwayscore is given, then your device acts as core pointer (in
  addition to the mouse) as well as it sends tilt and pressure
  information to applications which opened the device in extension mode.

  You can configure two different logical devices, one in Core-Mode and
  one in Extension-Mode, to the same physical device.
  To do so, simply type two identical sections, only the DeviceName
  statement must differ.  Then specify AlwaysCore only for the last
  section.

  Example:
  AlwaysCore


  5.11.  HistorySize



  This statement sets the buffer size that is used to cache motion
  events.



  5.12.  Suppress



  This statement specifies how many units the device must move before
  the driver moves the pointer. This can be necessary if very large
  resolutions are used.

  Example:
  Suppress 6



  5.13.  TiltMode (intuos only)



  TiltMode enables sending of tilt information for intuos devices. If
  this statement is missing, only pressure information is transferred.



  5.14.  TopX, TopY, BottomX, BottomY Statements



  These four statements allow to reduce the active area of the tablet.
  My intuos A4 oversize, for example, is so big that you can not do
  painting work with it because the ways of  the pen are too long. I use
  these four Statements to tell the driver that it should map only the
  lower left quarter of the tablet to the screen.
  It is possible to define more than one active area on the same tablet:
  Define as many subsections as you need with the same Port Statement
  but with different Top... statements and Devicenames. This results in
  multiple logical devices all of them restricted to their individual
  bounds. You may use one device in absolute mode and one in relative
  mode as well.

  Example:



  TopX        0 #coord of top left point
  TopY     5000
  BottomX  5000 #coord of bottom right point
  BottomY 10000



  5.14.1.  Getting the maximal X, Y Values, current configuration, and
  the resolution

  If you use the above four statements, you sometimes want to make some
  calculations on the size and position of the rectangle to be defined.
  Often the maximal tablet coordinates and the resolution are needed for
  this. To get these values, start your server: X 2>t.  Kill the X-
  Server (usually  Ctrl+Alt+Backspace) and do a grep "X=" t .You should
  get back the values in question.



  5.14.2.  Getting Resolution - Example of what has been logged



       (--) Wacom IV tablet maximum X=5103 maximum Y=3711 X
            resolution=1000 Y resolution=1000 suppress=6
       (--) Wacom tablet top X=0 top Y=0 bottom X=5103 bottom Y=3711
       (--) Wacom tablet top X=0 top Y=0 bottom X=5103 bottom Y=3711
       (--) Wacom tablet top X=0 top Y=0 bottom X=5103 bottom Y=3711



  5.15.  KeepShape



  This option uses the TopX, TopY statements (or their built in
  defaults, if omitted) and adjusts the BottomX, BottomY statements so
  that


  o  The ratio height / width of the screen is the same ratio on the
     tablet

  o  The active area starting at TopX, TopY of the tablet is as big as
     it can be with the above condition.

  Any given BottomX, BottomY statement is ignored, because these values
  will be calculated.



  5.16.  Threshold

  This is available since alpha 16 and is used to control the  minimum
  pressure that is needed to detect that a tool is pressed on the
  surface. It works with intuos and graphire. Please note that the
  integer value has to be coded as String, unlike all other integer
  values.

  Example:


       Threshold "5"



  6.  Changing configuration from within a running X-Server



  6.1.  Setting up the Gimp to use XInput devices



  ``Gimp'' has built-in XInput support since Version 1.1.x.

  Gimp must know which devices it should use and in what mode. You have
  to open the File/Dialogs/Input Devices - dialog for setting this up.
  You will find two listbox-controls at the top of that window labeled
  Device and Mode . Choose the device to set up from the Device control
  and choose a mode from the Mode -control.

  The modes are:


  o  disabled: Gimp does not use this device.

  o  window: Gimp uses this device. (The cursor is drawn by the
     application ???)

  o  screen: Gimp uses this device.   (The cursor is drawn by the X-
     Server ??? )


  If you see two cursors linked to your device, you have two solutions:

  o  Use mode screen but you may or may not loose the special gimp-tool
     cursors; If so, all cursors will be replaced by the pen cursor.

  o  Configure two different devices in the XF86Config file, one
     AlwaysCore and one not. Tell gimp to use the later one in mode
     window. If you do so and have one of the statements TopX, TopY,
     BottomX, BottomY in your XF86Config, take care to use the same
     adjustments for that statements in both logical devices. If you do
     not, then you get confused because X draws a cursor of the one
     device while the other is active. the effect of this is a cursor,
     very far away from the point of action (hotspot).


  Below the two listbox-controls there is a tab-control with the two
  register tabs Axes and Keys .  Axes assigns an axis a function, it is
  mostly not necessary to change this. But think about a touch-screen
  device which is built in a table rotated by 90 degrees, then you might
  want to swap the x and y axis.


  Some tablets have so called macro keys at the top which may hold some
  often used functions. The Keys tab lets you assign a character to a
  macro key. For example, you can put Ctrl+Shift+R, to a macro key. If
  you activate this key, then the rulers are toggled.
  The current Wacom driver supports only the macro keys of the ultrapad
  series, the macro area of the intuos products is not yet usable for
  that.
  Now we should talk about how the devices can be used. Open the
  File/Dialogs/Device Status -dialog. Open an image.

  You set up each device independently from each other in gimp.

  If you move the cursor with different devices in the image window you
  can see the devices change in the Device Status dialog. If you pick a
  tool, brush, pattern or color with a device, again the changes are
  reflected in the dialog.  You can save the settings in the Status
  Dialog, so that they will be restored before your next session.



  6.2.  The Switch Device



  This is a special device that is always present. It generates an event
  every time a new device becomes the core pointer. It has a pseudo
  "axis".  The "value" of  this axis is the id of the core pointer
  device. I do not know what a user can do with it - this is mainly
  helpful for internal use.


  6.3.  Buttons



  The buttons of the devices are as different as the devices are:
  A pen has at least a tip, but it may have one or two side switches and
  an eraser. A mouse may have up to 32 buttons (but usually 3). Buttons
  are numbered from 1 to the number of buttons. With the next two
  utilities you can change, to what number a button is mapped.


  6.4.  Button Mapping with xmodmap for Devices in Core Mode



  xmodmap will only modify the Core Pointer. As there is only one Core
  pointer at a time, it makes no difference between the physical devices
  which may become the Core Pointer. For the moment, let us forget the
  whole XInput stuff and think of a left-hander who just wants to swap
  the left and right mouse buttons.  You would execute xmodmap -pp to
  look what the current assignment is. You should get the following
  table back:


       Physical        Button
       Button          Code
       1              1      # ( Left   Button )
       2              2      # ( Right  Button )
       3              3      # ( Middle Button )



  To swap the buttons, you do a xmodmap -e "pointer = 2 1 3" , and to
  get back, xmodmap -e "pointer = default" . This should work with every
  device with at least two buttons. Note that  the term "pointer = x x
  x" has to be quoted to prevent it from being changed by the shell.



  6.5.  Button Mapping with xinput  for Devices in Extension Mode



  Back to XInput now. If you use the gimp, you may want to change the
  button mapping for each device separately (may be you are happy with
  the mouse but want to swap the two side-switches of the pen). Frederic
  Lepied has written a utility called ``xinput'' for that.

  To swap the side-switches, you would do a xinput list to get a list of
  the devices and their current settings. Swapping is done with xinput
  set-button-map Pen1 1 3 2 where Pen1 is the Device to change.

  Starting with XFree 3.3.2 this works also with devices that are
  configured AlwaysCore in XF86Config.



  6.6.  xsetmode - changing absolute / relative mode



  With xsetmode you can change the mode of a device between absolute and
  relative.

  Example:
  xsetmode GraphireMouse ABSOLUTE .



  6.7.  xsetpointer - setting the default core device



  If you have none of your devices configured AlwaysCore and you want a
  device to become  the core-pointer, then xsetpointer must be used.

  Do a xsetpointer Devicename . The old core-device (usually the mouse)
  is not usable anymore and the one you specified should be active. For
  example I can make the graphire mouse the standard core device from
  within a running XFree.

  xsetpointer -l lists all devices and the modes they are in.


  6.8.  Keys


  Some devices have macro keys or pads on them, to which a scancode or
  string may be assigned. This works only for devices in extension mode
  and is therefore done in the application you want use the keys with.

  xinput -l gives information about the number of keys and things like
  the first scancode.



  6.9.  Utilities to use more than one tablet and for toggle support on
  / off



  I own myself 3 tablets of Wacom and use them on my notebook. Whenever
  no tablets are connected and I start X, I have to wait very long until
  the driver gives up. If xdm is used, this increases to multiple of
  that timeouts.

  I have written two utilities which should make live easier with that:


  o  The shell script sx for those who use startx.  sx uses the dialog
     tool to present a nice menu where the user can choose:

  o  one of up to 10 devices (tablet, joystick, ...)

  o  for notebooks, which display to use (internal or external display)

  o  which window-manager to use



  o  The small gtk-application xinput-chooser for those who use xdm.
     xinput-chooser presents the user a menu whenever the xdm login
     screen is shown, from which one of up to ten different
     configurations can be chosen.


  The concept behind this is that a XF86Config file is split in at least
  a XF86Config.bare file, which holds the information common to all
  configurations, and various snippets, each of them holding the special
  information for a particular configuration.

  The two utilities will then concat the parts back to a working
  configuration.


  You can get this packet from http://www.runkeledv.de/download , it is
  named xinput_chooser_sr.



  7.  XFree FAQ - Problems And Questions



  7.1.  Gimp Input Devices Dialog shows "No Input Devices" Gnome and
  Gimp only work like a usual mouse, without pressure and tilt.

  It seems that you have not compiled your gtk with XInput-support.
  Please rebuild gtk and use ./configure --with-xinput=xfree for
  building the Makefile. Then do a make && make install. Then rebuild
  your gimp so that it uses this extendet gtk.


  7.2.  Is the wheel of the mouse (cursor) supported ?

  Yes, it generates button 4 and button 5 events.


  7.3.  How can I find out the intuos Serial Num of my tool ?

  read the section about ``Serial_Num''


  7.4.  How do I change the action of each button of my tool?

  Read the section about ``buttons''.


  7.5.  How can I use the intuos/artpad/ultrapad  macro area ?

  You can not use the intuos macro area, sorry.
  Only Artpad / Ultrapad Macro stripes work.  Read the section about
  ``Gimp Keys''.


  7.6.  Is it possible to define multiple active areas on the same
  tablet ?

  Yes, read the section about the ``Top... Statements''


  7.7.  Can I use more than one tablet at the same time ?

  Yes, read the section about the ``Port Statement''


  8.  Gpm FAQ - Problems And Questions



  8.1.  NCurses programs only support cut and paste with my new gpm

  You probably mixed a new gpm with an old gpm library.  Or You use an
  old client which searches the socket gpmctl in /var/run instead in
  /dev. In the later case you have two options: get new clients and
  recompile them or change gpm.h so that it uses /var/run instead of
  /dev and recompile gpm and libgpm.



  9.  Further Information / Used Documents



  gpm:
  gpm man page, gpm FAQ, source code file mice.c

  XInput:
  XInput HOWTO by Owen Taylor

  XFree and Wacom:
  XF86Config man page

  Frederic Lepied's site

  much, much, e-mails...



  Wearable-HOWTO.
  Lionel, trollhunter Bouchpan-Lerust-Juery <trollhunter@lin-
  uxfr.org>

  v0.0.7 March 2000

  Nomadism is one of the major trends of our society, now most of the
  people can work with a laptop computer, but few did the next step: to
  live, or if you prefer to wear one computer that is a wearable.
  ______________________________________________________________________

  Table of Contents



  1. Copyright, Disclaimer and Trademarks

     1.1 GNU Free Documentation Licence.

  2. Foreword

  3. What is a Wearable anyway ?

  4. Advocacy

     4.1 Why ?
     4.2 The Wearable concept is not a revolution, it is just an evolution.
     4.3 The Wearable may give its user an edge.
     4.4 The Wearable concept: a stealth menace.
     4.5 Wearable computing: an emerging industry.

  5. What CPU ?

     5.1 PDA based Wearables
     5.2 PC/104 and laptop based Wearables.
        5.2.1 What is PC/104 ?
        5.2.2 What about PC/104-plus ?
     5.3 Transmeta's processor the Crusoe.
     5.4 Misc

  6. Power supply

  7. OS.

  8. The Sulawesi project.

  9. Input

     9.1 Variations around the keyboard
        9.1.1 Mini keyboards
        9.1.2 One hand keyboard.

  10. Audio Output

  11. Visual Output

     11.1 Head Down displays.
        11.1.1 Wristwatch type
           11.1.1.1 Commercial Solutions.
           11.1.1.2 The Wristwatchcomputer.
        11.1.2 PDA type
     11.2 Head UP displays
        11.2.1 Obstrusives displays
           11.2.1.1 Hacks with LEDs
           11.2.1.2 Sony GLASSTRON
           11.2.1.3 The M1
           11.2.1.4 The VRD ( Virtual Retinal Display )
        11.2.2 Nonobstrusives displays

  12. Comms

  13. How can I have my Wearable ?

     13.1 Commercial Solutions.
     13.2 Do it yourself.

  14. PalmPilot and its clone  ( IBM, HandSpring, TRG ): a new breed of wearables.

     14.1 The palm family.
     14.2 PDAs runing Linux.

  15. How to carry my wearable ?

  16. Applications with Wearables.

     16.1 In the army now.
     16.2 At the hospital
     16.3 With the firefighters
     16.4 Wearable for the disabled.

  17. A borg's life.

  18. Sources of Information.

     18.1 Non commercial
     18.2 Commercial.
     18.3 Reading.

  19. To do List.

  20. Revision History.

  21. Thanks and Credits.



  ______________________________________________________________________

  1.

  Copyright, Disclaimer and Trademarks


  Copyright (C) 1999-2000 by Lionel, trollhunter Bouchpan-Lerust-Juery.
  This document may be distributed under the terms set forth in the GNU
  Free Documentation Licence http://www.gnu.org/copyleft/fdl.txt
  <http://www.gnu.org/copyleft/fdl.txt> .

  This documentation is distributed in the hope that it will be useful,
  but without any warranty. The information in this document is correct
  to the best of my knowledge, but there's a always a chance I've made
  some mistakes, so don't follow everything too blindly, especially if
  it seems wrong. Nothing here should have a detrimental effect on your
  computer, but just in case I take no responsibility for any damages
  ocurred from the use of the information contained herein.

  In this document you will encounter some commercial products and
  brands. Theses products are cited for information purpose, it is not
  an endorsement from the author. The trademarks belong to their
  respective owners.

  Permission is granted to copy, distribute and/or modify this document
  under the terms of the GNU Free Documentation License, Version 1.1 or
  any later version published by the Free Software Foundation; with the
  Invariant Sections being : "Foreword", "What is a Wearable anyway ?",
  "Advocacy", "What CPU ?", "Power supply", "Os.", "The Sulawesi
  project.", "Input", "Audio Output", "Visual Output", "Comms.", "How
  can I have my Wearable ?", "PalmPilot and its clone  ( IBM,
  HandSpring, TRG ): a new breed of wearables.", "How to carry my
  wearable ?", "Applications with Wearables.", "A borg's life.",
  "Sources of Information.", "To do List.", "Revision History.", "Thanks
  and Credits.",

  , with the Front-Cover Texts being "title" and "abstract" , and with
  no Back-Cover Texts .  A copy of the license is included in the
  section entitled "GNU Free Documentation License".

  1.1.  GNU Free Documentation Licence.



  ______________________________________________________________________
  0. PREAMBLE

  The purpose of this License is to make a manual, textbook, or other
  written document "free" in the sense of freedom: to assure everyone
  the effective freedom to copy and redistribute it, with or without
  modifying it, either commercially or noncommercially.  Secondarily,
  this License preserves for the author and publisher a way to get
  credit for their work, while not being considered responsible for
  modifications made by others.

  This License is a kind of "copyleft", which means that derivative
  works of the document must themselves be free in the same sense.  It
  complements the GNU General Public License, which is a copyleft
  license designed for free software.

  We have designed this License in order to use it for manuals for free
  software, because free software needs free documentation: a free
  program should come with manuals providing the same freedoms that the
  software does.  But this License is not limited to software manuals;
  it can be used for any textual work, regardless of subject matter or
  whether it is published as a printed book.  We recommend this License
  principally for works whose purpose is instruction or reference.


  1. APPLICABILITY AND DEFINITIONS

  This License applies to any manual or other work that contains a
  notice placed by the copyright holder saying it can be distributed
  under the terms of this License.  The "Document", below, refers to any
  such manual or work.  Any member of the public is a licensee, and is
  addressed as "you".

  A "Modified Version" of the Document means any work containing the
  Document or a portion of it, either copied verbatim, or with
  modifications and/or translated into another language.

  A "Secondary Section" is a named appendix or a front-matter section of
  the Document that deals exclusively with the relationship of the
  publishers or authors of the Document to the Document's overall subject
  (or to related matters) and contains nothing that could fall directly
  within that overall subject.  (For example, if the Document is in part a
  textbook of mathematics, a Secondary Section may not explain any
  mathematics.)  The relationship could be a matter of historical
  connection with the subject or with related matters, or of legal,
  commercial, philosophical, ethical or political position regarding
  them.

  The "Invariant Sections" are certain Secondary Sections whose titles
  are designated, as being those of Invariant Sections, in the notice
  that says that the Document is released under this License.

  The "Cover Texts" are certain short passages of text that are listed,
  as Front-Cover Texts or Back-Cover Texts, in the notice that says that
  the Document is released under this License.

  A "Transparent" copy of the Document means a machine-readable copy,
  represented in a format whose specification is available to the
  general public, whose contents can be viewed and edited directly and
  straightforwardly with generic text editors or (for images composed of
  pixels) generic paint programs or (for drawings) some widely available
  drawing editor, and that is suitable for input to text formatters or
  for automatic translation to a variety of formats suitable for input
  to text formatters.  A copy made in an otherwise Transparent file
  format whose markup has been designed to thwart or discourage
  subsequent modification by readers is not Transparent.  A copy that is
  not "Transparent" is called "Opaque".

  Examples of suitable formats for Transparent copies include plain
  ASCII without markup, Texinfo input format, LaTeX input format, SGML
  or XML using a publicly available DTD, and standard-conforming simple
  HTML designed for human modification.  Opaque formats include
  PostScript, PDF, proprietary formats that can be read and edited only
  by proprietary word processors, SGML or XML for which the DTD and/or
  processing tools are not generally available, and the
  machine-generated HTML produced by some word processors for output
  purposes only.

  The "Title Page" means, for a printed book, the title page itself,
  plus such following pages as are needed to hold, legibly, the material
  this License requires to appear in the title page.  For works in
  formats which do not have any title page as such, "Title Page" means
  the text near the most prominent appearance of the work's title,
  preceding the beginning of the body of the text.


  2. VERBATIM COPYING

  You may copy and distribute the Document in any medium, either
  commercially or noncommercially, provided that this License, the
  copyright notices, and the license notice saying this License applies
  to the Document are reproduced in all copies, and that you add no other
  conditions whatsoever to those of this License.  You may not use
  technical measures to obstruct or control the reading or further
  copying of the copies you make or distribute.  However, you may accept
  compensation in exchange for copies.  If you distribute a large enough
  number of copies you must also follow the conditions in section 3.

  You may also lend copies, under the same conditions stated above, and
  you may publicly display copies.


  3. COPYING IN QUANTITY

  If you publish printed copies of the Document numbering more than 100,
  and the Document's license notice requires Cover Texts, you must enclose
  the copies in covers that carry, clearly and legibly, all these Cover
  Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
  the back cover.  Both covers must also clearly and legibly identify
  you as the publisher of these copies.  The front cover must present
  the full title with all words of the title equally prominent and
  visible.  You may add other material on the covers in addition.
  Copying with changes limited to the covers, as long as they preserve
  the title of the Document and satisfy these conditions, can be treated
  as verbatim copying in other respects.

  If the required texts for either cover are too voluminous to fit
  legibly, you should put the first ones listed (as many as fit
  reasonably) on the actual cover, and continue the rest onto adjacent
  pages.

  If you publish or distribute Opaque copies of the Document numbering
  more than 100, you must either include a machine-readable Transparent
  copy along with each Opaque copy, or state in or with each Opaque copy
  a publicly-accessible computer-network location containing a complete
  Transparent copy of the Document, free of added material, which the
  general network-using public has access to download anonymously at no
  charge using public-standard network protocols.  If you use the latter
  option, you must take reasonably prudent steps, when you begin
  distribution of Opaque copies in quantity, to ensure that this
  Transparent copy will remain thus accessible at the stated location
  until at least one year after the last time you distribute an Opaque
  copy (directly or through your agents or retailers) of that edition to
  the public.

  It is requested, but not required, that you contact the authors of the
  Document well before redistributing any large number of copies, to give
  them a chance to provide you with an updated version of the Document.


  4. MODIFICATIONS

  You may copy and distribute a Modified Version of the Document under
  the conditions of sections 2 and 3 above, provided that you release
  the Modified Version under precisely this License, with the Modified
  Version filling the role of the Document, thus licensing distribution
  and modification of the Modified Version to whoever possesses a copy
  of it.  In addition, you must do these things in the Modified Version:

  A. Use in the Title Page (and on the covers, if any) a title distinct
     from that of the Document, and from those of previous versions
     (which should, if there were any, be listed in the History section
     of the Document).  You may use the same title as a previous version
     if the original publisher of that version gives permission.
  B. List on the Title Page, as authors, one or more persons or entities
     responsible for authorship of the modifications in the Modified
     Version, together with at least five of the principal authors of the
     Document (all of its principal authors, if it has less than five).
  C. State on the Title page the name of the publisher of the
     Modified Version, as the publisher.
  D. Preserve all the copyright notices of the Document.
  E. Add an appropriate copyright notice for your modifications
     adjacent to the other copyright notices.
  F. Include, immediately after the copyright notices, a license notice
     giving the public permission to use the Modified Version under the
     terms of this License, in the form shown in the Addendum below.
  G. Preserve in that license notice the full lists of Invariant Sections
     and required Cover Texts given in the Document's license notice.
  H. Include an unaltered copy of this License.
  I. Preserve the section entitled "History", and its title, and add to
     it an item stating at least the title, year, new authors, and
     publisher of the Modified Version as given on the Title Page.  If
     there is no section entitled "History" in the Document, create one
     stating the title, year, authors, and publisher of the Document as
     given on its Title Page, then add an item describing the Modified
     Version as stated in the previous sentence.
  J. Preserve the network location, if any, given in the Document for
     public access to a Transparent copy of the Document, and likewise
     the network locations given in the Document for previous versions
     it was based on.  These may be placed in the "History" section.
     You may omit a network location for a work that was published at
     least four years before the Document itself, or if the original
     publisher of the version it refers to gives permission.
  K. In any section entitled "Acknowledgements" or "Dedications",
     preserve the section's title, and preserve in the section all the
     substance and tone of each of the contributor acknowledgements
     and/or dedications given therein.
  L. Preserve all the Invariant Sections of the Document,
     unaltered in their text and in their titles.  Section numbers
     or the equivalent are not considered part of the section titles.
  M. Delete any section entitled "Endorsements".  Such a section
     may not be included in the Modified Version.
  N. Do not retitle any existing section as "Endorsements"
     or to conflict in title with any Invariant Section.

  If the Modified Version includes new front-matter sections or
  appendices that qualify as Secondary Sections and contain no material
  copied from the Document, you may at your option designate some or all
  of these sections as invariant.  To do this, add their titles to the
  list of Invariant Sections in the Modified Version's license notice.
  These titles must be distinct from any other section titles.

  You may add a section entitled "Endorsements", provided it contains
  nothing but endorsements of your Modified Version by various
  parties--for example, statements of peer review or that the text has
  been approved by an organization as the authoritative definition of a
  standard.

  You may add a passage of up to five words as a Front-Cover Text, and a
  passage of up to 25 words as a Back-Cover Text, to the end of the list
  of Cover Texts in the Modified Version.  Only one passage of
  Front-Cover Text and one of Back-Cover Text may be added by (or
  through arrangements made by) any one entity.  If the Document already
  includes a cover text for the same cover, previously added by you or
  by arrangement made by the same entity you are acting on behalf of,
  you may not add another; but you may replace the old one, on explicit
  permission from the previous publisher that added the old one.

  The author(s) and publisher(s) of the Document do not by this License
  give permission to use their names for publicity for or to assert or
  imply endorsement of any Modified Version.

  5. COMBINING DOCUMENTS

  You may combine the Document with other documents released under this
  License, under the terms defined in section 4 above for modified
  versions, provided that you include in the combination all of the
  Invariant Sections of all of the original documents, unmodified, and
  list them all as Invariant Sections of your combined work in its
  license notice.

  The combined work need only contain one copy of this License, and
  multiple identical Invariant Sections may be replaced with a single
  copy.  If there are multiple Invariant Sections with the same name but
  different contents, make the title of each such section unique by
  adding at the end of it, in parentheses, the name of the original
  author or publisher of that section if known, or else a unique number.
  Make the same adjustment to the section titles in the list of
  Invariant Sections in the license notice of the combined work.

  In the combination, you must combine any sections entitled "History"
  in the various original documents, forming one section entitled
  "History"; likewise combine any sections entitled "Acknowledgements",
  and any sections entitled "Dedications".  You must delete all sections
  entitled "Endorsements."


  6. COLLECTIONS OF DOCUMENTS

  You may make a collection consisting of the Document and other documents
  released under this License, and replace the individual copies of this
  License in the various documents with a single copy that is included in
  the collection, provided that you follow the rules of this License for
  verbatim copying of each of the documents in all other respects.

  You may extract a single document from such a collection, and distribute
  it individually under this License, provided you insert a copy of this
  License into the extracted document, and follow this License in all
  other respects regarding verbatim copying of that document.



  7. AGGREGATION WITH INDEPENDENT WORKS

  A compilation of the Document or its derivatives with other separate
  and independent documents or works, in or on a volume of a storage or
  distribution medium, does not as a whole count as a Modified Version
  of the Document, provided no compilation copyright is claimed for the
  compilation.  Such a compilation is called an "aggregate", and this
  License does not apply to the other self-contained works thus compiled
  with the Document, on account of their being thus compiled, if they
  are not themselves derivative works of the Document.

  If the Cover Text requirement of section 3 is applicable to these
  copies of the Document, then if the Document is less than one quarter
  of the entire aggregate, the Document's Cover Texts may be placed on
  covers that surround only the Document within the aggregate.
  Otherwise they must appear on covers around the whole aggregate.


  8. TRANSLATION

  Translation is considered a kind of modification, so you may
  distribute translations of the Document under the terms of section 4.
  Replacing Invariant Sections with translations requires special
  permission from their copyright holders, but you may include
  translations of some or all Invariant Sections in addition to the
  original versions of these Invariant Sections.  You may include a
  translation of this License provided that you also include the
  original English version of this License.  In case of a disagreement
  between the translation and the original English version of this
  License, the original English version will prevail.


  9. TERMINATION

  You may not copy, modify, sublicense, or distribute the Document except
  as expressly provided for under this License.  Any other attempt to
  copy, modify, sublicense or distribute the Document is void, and will
  automatically terminate your rights under this License.  However,
  parties who have received copies, or rights, from you under this
  License will not have their licenses terminated so long as such
  parties remain in full compliance.


  10. FUTURE REVISIONS OF THIS LICENSE

  The Free Software Foundation may publish new, revised versions
  of the GNU Free Documentation License from time to time.  Such new
  versions will be similar in spirit to the present version, but may
  differ in detail to address new problems or concerns. See
  http:///www.gnu.org/copyleft/.

  Each version of the License is given a distinguishing version number.
  If the Document specifies that a particular numbered version of this
  License "or any later version" applies to it, you have the option of
  following the terms and conditions either of that specified version or
  of any later version that has been published (not as a draft) by the
  Free Software Foundation.  If the Document does not specify a version
  number of this License, you may choose any version ever published (not
  as a draft) by the Free Software Foundation.

  ______________________________________________________________________



  2.

  Foreword

  I am not a guru in wearable computing, simply after some years using
  HP95LX and HP200LX palmtop computers more like  wearables than like a
  PDA ( thanks to DOS 5, the HP200LX even allowed me to do a semester CS
  project using turbo pascal while commuting in the subway ),  and
  living with a palm IIIx and a laptop running Linux, to me the next
  step is having a wearable running Linux, thus I have spent more than a
  year reading various informations on wearable and taking a little part
  in the wear-hard mailing list. As more an more people will be
  interested in the wearable concept I have decided to start this HOWTO
  in order to help them ( At the time of this writing I am building my
  own wearable using my laptop ( Toshiba 430CDT ) with a twiddler
  keyboard, emacspeak, and camcorders batteries. )

  Some people may, at least, be surprised to find the "In the army now"
  section so I would like to explain my position: I am trying to write
  this HOWTO both as a journalist and a scientist would do: this implies
  as a journalist to look for information from every source available,
  and as a scientist to be neutral: and as the US Army is willing to
  purchase more than 30.000 units one can hardly overlook this user
  group.  This document is  intended to be the starting point of a long
  term work. If you have any information ( that can be checked ) that
  you think is of interest, do not hesitate contact me.



  3.  What is a Wearable anyway ?

  Well, as it name implies a wearable is a computer you are supposed to
  wear, actually very few wearables fill this definition. On a more
  practical point of view one can define a wearable as a computer you
  can use on the run relying only on its  power supply ( see the power
  supply section for more information ). So with such a definition PDAs,
  palmcomputers, customized laptops are wearables too. As Wearable
  computing is a new field, there is no standard definition for a
  Wearable computer, but you may find Professor Steve Mann's definition
  very . To me medical devices such as pacemakers too are Wearable
  computers and they don't fit in Professor Steve Mann's definition
  <http://wearcomp.org/wearcompfaq.htm> ( actually Professor Steve Mann
  is one of the Pionneers in Wearable computing ) On the Wearcomp
  website there is also a   FAQ
  <hthttp://wearcomp.org/wearcompfaq.html> trying to define what a
  Wearable is.

  I am not a specialist in wearables, simply I have a very strong
  interest in nomadic computing and I studying a lot its implementations
  both from a technical point of view and from the way nomadic computing
  is going to change our every day life and the way we interacts as we
  are getting more and more connected.

  This text is included in the LINUX DOCUMENTATION PROJECT
  http://www.linuxdoc.org/HOWTO <http://www.linuxdoc.org/HOWTO> .

  The latest version of this document is available in HTML format at
  http://infonomade.linuxfr.org/Wearable-HOWTO.html
  <http://infonomade.linuxfr.org/wearable/Wearable-HOWTO.html>, you can
  retrieve the sgml format at  http://infonomade.linuxfr.org/Wearable-
  HOWTO.sgml <http://infonoamde.linuxfr.org/wearable/Wearable-
  HOWTO.html>

  I will maintain the French version too. If you wish to mirror it or to
  translate it, please contact me.
  Lionel, Trollhunter Bouchpan-Lerust-Juery <trollhunter@linuxfr.org> or
  at <boucli27@altavista.net>



  4.

  Advocacy

  Some people may want to know why you want to build a wearable or you
  may have to sell your idea to the people who are responsible for the
  purchase.  Here are some ideas you may use.


  4.1.

  Why ?

  Because, you want to experiment by yourself, because you think that
  Human Computer Interaction is not a matter of designing the n-th
  windowmanager, because you feel that enhanced reality is the cutting
  edge of your evolution.



  4.2.

  The Wearable concept is not a revolution, it is just an evolution.

  Some people are afraid of revolutionary or so called products, thus
  the good news is that the wearable may look like a revolutionary
  concept but it is actually just an evolution of the computing
  hardware.  Let me explain that : At first there was the Mainframe,
  then came the desktop computer enabling people to work in their
  office, latter the PC enabled these people to work at home too, as
  time passed the portable PC enabled people to work in a Hotel room, or
  everywhere they could find a power plug ( yes an Osborne or an IBM's
  convertible were definitively not laptop computers ), at the same time
  some pocket computers appeared on the market : Sharp PC1500, Canon
  X07, Casio PB100 then the first one weighted less and less, the second
  one disappeared but the LCD screen was, with other things their legacy
  allowing the laptop to emerge, as the laptop went mainstream, its size
  went smaller allowing people to work in the train, at the library ...,
  then palmtop PC's such as the HP95LX and PDA's appeared, ( at this
  time the most successful is the PalmPilot family and its clones )
  allowing people to work on the move, so the wearable is just the next
  step in this move towards miniaturization.  ( If you want to learn
  more about Laptops and Linux you should read the Laptop-HOWTO, the
  latest version can be found at Werner's Heuser Homepage
  <http://www.snafu.de/~wehe/index_li.html> )

  4.3.

  The Wearable may give its user an edge.


  In today's competitive world it is very important to get an edge over
  the other company, thus for example in a plane repair company the
  engineers who are using wearables do not waste time in asking for
  blueprints but instead have the blueprint and the technical data at
  will while performing their job, thus they will be able to repair the
  planes faster. You may choose an example in your job.



  4.4.

  The Wearable concept: a stealth menace.

  When they made their first appearance on the market, some products or
  technologies were, to say the least, less than perfect. This is a
  stealth menace, if you read Clayton Christensen's book "The
  innovator's dilemma: when new technologies cause great firms to fail"
  or Andy's Grove "Only the paranoid survives" you will see that some
  corporations that relies on a product and that have a king of the hill
  may fall down because they overlooked a new product/technology that
  was clumsy at its beginning and was at first in a market niche, then
  the contender took over the market.


  4.5.

  Wearable computing: an emerging industry.

  The people who decide to fund your project are not always very found
  about technical details, thus you will have to use other arguments,
  otherwise your pet project will be sent to /dev/null.  If one reads
  again chapter 2 of AP Sloan's book: "My years with General Motors" it
  is obvious that the Wearable industry is going into the same changes
  as did the automobile industry in the US at the turn of the century :
  it turned from a Hobby with some small manufacturers to a mass market
  Industry. It took nearly 30 years to the automobile industry to
  change, but the wearable industry should have done this changes in
  less than 5 years, so if they don't invest on this product others will
  do.


  5.

  What CPU ?


  5.1.

  PDA based Wearables

  Usually they use non Intel CPU ( except the HP95/100/200LX ) See the
  PalmPilot : a new breed of wearables section.


  5.2.

  PC/104 and laptop based Wearables.

  Theses devices are using usually an Intel or Intel compatible CPU.


  5.2.1.

  What is PC/104 ?

  PC/104 is an industrial standard, for PC based systems that can be
  stacked together in order to create an embedded system.  The footprint
  of theses boards is 4"x4" so as you can see it is a good base in order
  to start a wearable project.


  5.2.2.

  What about PC/104-plus ?

  It is a PCI addition to the PC/104 standard.  you can read the PC-104
  FAQ <http://www.controlled.com/pc104faq>

  5.3.  Transmeta's processor the Crusoe.

  It seems that Transmeta hasn't build the fastest chip on the market
  but has indeed focused on power saving making its processor and ideal
  choice for a wearable project, moreover it seems that motherboards
  will be available very soon as Phoenix Bios released their Bios for
  this chip.

  5.4.

  Misc

  Last year there were some alpha based Multia sold for around $100, but
  it seemed AFAIK that nobody ever managed to build a wearable around
  one of theses devices.


  6.

  Power supply

  There is plenty of choice as long as you use batteries. But be careful
  __NEVER__ use liquid acid filled batteries it is a Health Hazard for
  this application.

  7.

  OS.

  For the people whose Wearable is based on a PDA, there is little
  choice : most of the time they have to do with the PDA's manufacturer
  OS, AFAIK Linux on Psion series 5 is not mainstream.  a commercial
  solution called WindStone primary targeted to palmpilots with a
  project to port it to ARM based computers it is made by OSK
  <http://www.oski.co.kr/>, so and see. For  Mips based PDA
  <http://www.freebsd.org/~imp/pdamips.html> type; some of them seem to
  be able to run NetBSD <http://www.netbsd.org> ( it is a member of the
  *BSD family of unices running on a lot of platforms ).


  For those using a PC derivative, the choice seems to be between
  Microsoft products or Linux, Well,  Microsoft products are not exactly
  the best choice and DEBIAN/GNU Linux is the winner ( I don't think
  that for general purposes one has to use a posix .4 compliant kernel
  ).

  There is another contender QNX <http://www.qnx.com>, but is more
  industrial oriented, so for hobby or research it is not the best
  choice.


  8.

  The Sulawesi project.

  This project deals as well with input modalities and with output
  modalities thus its section is just before the Input/Output part of
  this document.

  It is meant to accept input from different modalities and to do its
  input to a number of different modalities, this is written in Java;
  The good news is that it is highly portable, the bad news is that
  today a JVM is a memory and resource hog ( but, to me, Java and the
  related technologies such as Jini, just like the wearable, is a
  stealth menace ).  One of the nice features of this project is the
  fact that, because of a clever design, it can deal with with a great
  input and output modalities that exists today, and when new modalities
  one hadn't even think about will be available, it should be able to
  deal with them in a very short time and with little effort.

  Today, it can accept input from a GPS too.  You can find more
  information at : Sulawesi Home Page
  <http://vasewww.essex.ac.uk/projects/>

  9.

  Input


  9.1.

  Variations around the keyboard


  9.1.1.

  Mini keyboards

  Usually theses devices are on the wearer's forearm or wrist.

  The WristPC <http://www.pfuca.com/products/hhkb/hhcindex.html>
  Keyboard  and the Arm mount micro keyboard
  <http://www.ivpgi.com/1accessory.htm> from the Phoenix Group Inc.  are
  typical from this concept.


  9.1.2.

  One hand keyboard.

  IMHO it is the best concept because it doesn't require you to look at
  the keyboard while typing is the less intrusive when you have to deal
  with other people, and in order to be accepted by other a Wearable
  wearer's must have the lowest visual signature.

  The archetype of this concept is the Twiddler
  <http://www.handykey.com> and all of its clones.

  At first using a twiddler may seem to be a little bit confusing. The
  very first thing to do is to read the manual ( don't forget to plug
  the keyboard or the PS/2 adaptator or your twiddler won't work because
  it will get no power supply. ) The reference card may, at first, seem
  confusing because when you are working with your twiddler you are
  behind the buttons and the reference card show you the buttons from
  the front side not from the rear so you will have to switch right and
  left. When you have passed theses steps you will quickly learn how to
  use it and IMHO it feels very comfortable to use. The way the
  integrated mouse operates is very natural too.



  10.

  Audio Output

  When your system doesn't output too much data, or in order to signal
  some special events an audio output can do the job.  Most laptops come
  with a Sound Blaster compatible sound card and a lot of PC-104 cards
  are sold with such a sound card on board or you should buy a sound
  module. The next step is to redirect your text output to a
  text_to_speak program.

  As a lot of input is done using emacs, it seems to be a good idea to
  use  Emacsspeak
  <http://www.cs.cornell.edu/home/raman/emacspeak/emacspeak.html>



  11.

  Visual Output



  11.1.

  Head Down displays.

  11.1.1.

  Wristwatch type


  11.1.1.1.  Commercial Solutions.

  Some manufacturers ( eg Seiko, Citizen, Casio ) manufactured
  Wristwatches that could be linked to a computer, ( I remember that in
  1982 Seiko showed a prototype of a wirstwatch TV ( monochrome LCD )).


  Casio  <http://www.casio.com> has a broad set of wristwatches, some of
  them could be descibed as Wearables that can display time among other
  things, of interest are the

  o  The PC Unite that can exchange data with a computer using an infra
     red link.

  o  The ATC1200-1V Forester features an electronic compass.  plus
     thermometer and barometer. I used to own one of these it is a great
     piece of hardware

  o  The Technowear products have different features including voice
     recording, IR remote control, Databank...

  o  The GPS  <http://205.158.10.200/gps/top.html>watch is one of the
     most intruiging watch I have ever seen


  11.1.1.2.  The Wristwatchcomputer.

  In 1998 S. Mann displayed a Wristwatch
  <http://www.wearcam.org/wristwatchcomputer/>videoconferencing
  computer, it runs GNU/Linux and uses an XF86 Server, there is a
  pinhole video camera on the watch itself. This device is to say the
  least impressive, some of the software, is downlable
  <http://www.wearcam.org/orbits/orbits_v1.08.tar.gz> and GPLed.


  It is also possible to use a 4 lines LCD display connected to the
  serial port of your laptop ( numerous paper or online electronics
  magazine offer schematics ).



  11.1.2.

  PDA type

  PDA's seem to be a cheap and efficient way of sending and displaying
  data for a wearable, actually any PDA with a VT100 emulation program
  and a serial link can be used effectively as a terminal ( I have
  successfully used my HP200LX running kermit
  <http://www.columbia.edu/kermit>

  as a terminal for my desktop, giving me an emergency access to it if
  the display failed )



  11.2.

  Head UP displays

  The distinction between obstrusives an non obstrusives ones is not
  from the wearer point of view but from the other people, that is is
  the display forbid to see the wearer's eyes

  11.2.1.

  Obstrusives displays


  11.2.1.1.

  Hacks with LEDs

  Some people managed to use blinking LEDs in order to retrieve
  information from their device. This is one of the simplest display one
  can imagine : a LED or a row of LED blinking.


  11.2.1.2.

  Sony GLASSTRON

  Sony sells a device called the Glasstron; in Paris, France the FNAC
  Montparnasse sells the PVD-V30 glasstron 55 at 13999F ( this is about
  US $2333 ).


  11.2.1.3.  The M1

  Tekgear <http://www.tekgear.ca/displays/m1.html> manufactures the M1.


  11.2.1.4.

  The VRD ( Virtual Retinal Display )

  With this device a manufactured by Microvison <http://www.mvis.com> a
  LASER LED draws the image on the wearer's retina, the US Navy tested
  it in the summer 1999, at Hawaii ( see in the army now ).

  11.2.2.

  Nonobstrusives displays

  The Microptical  <http://www.microopticalcorp.com>corporation
  manufactures two displays the Integrated Eyeglass display and the
  ClipOn display.
  12.

  Comms

  AFAIK Most of the time it is with a radio link, should it be with a
  radio transceiver or via a cell phone.

  It seems that IBM's Personal Area Network
  <http://www.research.ibm.com/research/pan.html> or the Bluetooth
  <http://www.bluetooth.com.> technology will enable building LANs of
  Wearables very easyly. ( actualy IBM is also a member of the Bluetooth
  SIG ).


  13.

  How can I have my Wearable ?


  13.1.

  Commercial Solutions.

  Some companies sells Wearables ready to use out of the Box, hereafter
  is a list of them.


  o  Genesys Technology  <http://www.genesistech2000.com/product.html>
     manufactures a Wearable that uses a HMD display.

  o  handsfreemobile  <http://www.handsfreemobile.com> sells the Mid
     Riff Brain, it is mostly an LCD touchpad based solution and the
     unit is in a pouch fixed on the waistband.

  o  Teltronics  <http://www.teltronics.com/is/hardware.html > sells the
     Mentis. It is a modular wearable.

  o  Via  <http://www.flexipc.com/ > sells the VIA II PC a Wearable that
     is worn on the waistband.

  o  Xybernaut  <http://www.xybernaut.com/F00005.htm > sells the Mobile
     Assistant IV ( MA IV ) available with RedHat Linux 6.1, Suse Linux
     ,Windows 9x and Windows NT4

  13.2.

  Do it yourself.

  As wearable computing is in its very early beginning you should make
  various experiments and share them with your peers.  Doing this with
  an open and versatile OS such as Linux should give you a lot of fun (
  after all, desktop computer is just a plain vanilla computer), because
  you play with both the OS and the hardware.  If you are unsure of the
  technical decisions you are going to make, you can start with a proven
  design. On the net you can find the specifications of some wearable
  systems thus you will not have to reinvent the wheel and you will
  avoid some pitfalls. ( the designs are sorted by alphabetical order ).



  o  The Lizzi  <http://wearables.www.media.mit.edu/projects/wearables>
     ; it is the MIT's wearable design.

  o  In the UK you can find the Vase Lab Wearable
     <http://wearables.essex.ac.uk/spec/wear-spec.html> it is from Neil
     Newman at the University of Essex.
  o  In Canada, the Wearcomp  <http://www.wearcomp.org/wearhow/> is a
     proven design, by Prof. Steve Mann at the University of Toronto.


  14.

  PalmPilot and its clone  ( IBM, HandSpring, TRG ): a new breed of
  wearables.


  14.1.  The palm family.

  The PalmPilot family and its clone is a hit among PDAs, but less known
  is the fact that it is more than a PDA it is one of the first off the
  shelves wearable.  You can connect it to your cell phone, When on the
  move you may need an input device more convenient than Graffiti: a
  keyboard for example, one device exists that allow you to plug a PS/2
  keyboard in your palm: Happy Hacking cradle Specially for the Palm.

  PFU <http://www.pfuca.com/products/hhkb/hhcindex.html> Happy Hacking
  sells a PS/2 adapter for the Palm, thus one should be able to hook any
  PS/2 keyboard on this device.  It is battery ( 2 AA ) powered.

  It seems that someone has managed to get a twiddler keyboard working
  with the PalmPilot.  If you want to do land navigation it exists an
  electronic compass you can plug into your palm it is called Palm
  Navigator and it is manufactured by Precision Navigation
  <http://www.precisionnav.com> They even sell a weather station.

  If you have more money to spend or want more precision you can
  purchase a GPS receiver called Earthmate; it is manufactured by
  Precision Navigation <http://www.delorme.com> Some of you may want a
  software only solution: this can be done.  If you have some highly
  specialized needs like commuting without having the subway map and
  want a readily made solution you can use a program like Route Expert,
  I use it on a daily basis, it works great with Paris's subway and I
  will test it with Berlin's subway at the end of the year ( of course
  it exists other programs but this one is the one I am using ). I guess
  everyone can find the North using the sun and a wirtswatch, a
  PalmPilot can do it with more precision using readymade programs such
  as T.J's Sun-Compass ( once again there exists other programs but this
  one is the one I am using ).

  The most important with the PalmPilot for the Linux community is the
  fact that there exists two ports of Linux for it ( DragonBall is a
  member of the 68000 family after all ). One is GPLed

  You can find more information at : uClinux <http://www.uclinux.org>

  the second one is commercial, it is based in Korea.  WindStone
  <http://www.oski.co.kr> it is based on uClinux and it is coming  with
  its own GUI and widgets.

  Thus with the next generation of Palms, the CPU speed will be twice
  today's speed, and with Linux on board we will be able to run a lot of
  software that are hardware independent and have been written for
  today's x86 Linux based wearables.


  14.2.  PDAs runing Linux.

  Samsung displayed a PDA named theYopi
  <http://www.sem.samsung.co.kr/eng/product/digital/pda/> runing Linux.
  It is an ARMLinux based PDA, 32 MB RAM, featuring a voice recorder,
  mp3 player,IrDa port, compact flash slot, a 4" color TFT and
  HandWritting Recognition, plus Serial and USB interface. Word has
  spread that it should be sold this summer but unti then wait and see.

  It exists a  Mips based PDA info Center
  <http://www.freebsd.org/~imp/pdamips.html> This site focuses both on
  NetBSD and LinuxCE on MIPS based PDAs.

  You can find some information on the  LinuxCE
  <http://www.linuxce.org> port; and you may wish to read the  LinuxCE
  FAQ <http://linuxce.2gn.com/faq> With theses PDAs one should be able
  to consider building a nice PDA based Wearable.


  15.

  How to carry my wearable ?

  Depending on your wearable's family ( eg Palm, palmtop computer,
  laptop based, PC/104 ) there seem to be 3 convenient ways of carrying
  it around.  You can carry it on tour wrist, or in a backpack or you
  can hang it on your waistband.


  16.

  Applications with Wearables.

  As a rule of thumb the first people who are going to use extensively
  the wearables are the people whose work is a matter of life and death.


  16.1.

  In the army now.

  It is very important in an army to have an edge other the enemy, that
  is what we have always seen in history, and moreover the army is known
  to spend vast amount of money in order to get this edge.

  Some years ago the infantryman was ordered to carry different  pieces
  of ordnance that came from different sources and were not part of a
  whole thing, and to try to do his best with theses ( looks like
  Frankenstein to me ). With theses new projects the infantryman is the
  centerpiece of a coherent, complementary weapons and equipment system.


  o  Australian Army.


     In Australia there is a program called Land 125 Soldier Combat
     System ( formerly "Wundurra" ( the aboriginal word for Warrior ) ),
     there is some information on DTSO
     <http://www.dsto.defence.gov.au/>'s website; and according to the
     ATSE  <http://www.atse.org.au/>this project should be on phase 2 on
     year 2000/2001.

     According to DTSO the soldiers should have intra-section radios,
     night vision and sighting capability and head up display.


  o  French Forces.

     In France there is a project called FELIN ( Fantassin a Equipement
     et Liaison Integrees ( Foot soldier with integrated equipment and
     links ) )

     in order to enhance the efficiency of the soldier a set of devices
     had been developed with very careful limitations : historically the
     foot soldier has been a beast of burden, thus the FELIN project
     wishes to limit its load at 25kg. The soldier has got a radio link,
     a computer and a camera on his weapon ( allowing him to open fire
     from cover ). The display is done  with a monocular HMD.

  o  UK Forces.

     The FIST ( Future Integrated Soldier Technology ) project: Early
     tests were conducted on Salisbury Plain to determine if the soldier
     could access information either 'Head Up' ( in a helmet display ),
     'Head Down' ( on a wrist mounted display ), via a palmtop computer
     or if necessary  a map

     lessons learned ( in L'armement issue 67 September 1999 )

  o  There is no scope for enhancing soldier performance through the
     provision of tactical information unless the soldier can access
     information 'on the move'

  o  The preference, both by day and night was the helmet display.

     The FIST Digitization Trials will be conducted on Salisbury Plain
     in June and November 2000. The June trial addresses information
     flow, the November trial will address the benefits of enhanced
     information to determine if there is a consequent increase in the
     'Tempo of Operation'.

  o  US Forces


  o  The land warrior program

     It is a system made of 5 subsystems cooperating together.

  o  A Pentium Computer/Radio Subsystem (C/RS) made by Motorola
     featuring an integrated GPS receiver

  o  The Protective Clothing and Individual Equipment Subsystem (PCIE)
     made by Gentex

  o  The Weapon Subsystem (WS) made by Raytheon

  o  The Software Subsystem made by Raytheon

  o  The Integrated Helmet Assembly Subsystem (IHAS) made by Honeywell

     The location of each squad member will be available through the
     IHAS, as well as digitized maps and tactical information.  Every
     soldier will have an integrated GPS as well as video recording
     capabilities.  Of course the soldier will have night vision
     capability as well as deported sighting. Tests should take place
     during year 2000.  More info on the Land Warrior program at

     http://www.sbccom.army.mil/programs/lw/index.htm
     <http://www.sbccom.army.mil/programs/lw/index.htm >

     ( There is even a FAQ and pictures ).  AFAIK this is going to be
     the biggest test for the wearable concept because the Army is
     planning to purchase 34000 units plus spares.

  o  The navy.

     During the summer 1999 news poured that the US Navy tested the
     Virtual Retinal Display at Hawaii. The explanation is that there
     doesn't seem to be enough space in the fighting ships because of
     the numerous CRT, so it is conceivable for the crew to wear VRDs

     Needless to say, that some very low profile and highly specialized
     units should have adopted the wearable concept but as far as we
     cannot have evidence we can only speculate on that.

  16.2.

  At the hospital

  The Microvison <http://www.mvis.com>'s VRD has been delivered
  <http://www.mvis.com/2-medi.htm> to the Wallace Kettering Neuroscience
  Institute, Dayton Ohio, for neurosurgery applications.  This is not a
  full featured wearable solution but it is a big step toward the
  adoption of wearables in health care activity.  ( on the website you
  can view a simulated image <http://www.mvis.com/dr_pov4jpg.htm>  ).



  16.3.

  With the firefighters

  Firefighters are using thermal cameras in order to see through the
  smoke, in the next years theses devices should be miniaturized and
  with a wearable firefighters should have both hands free and will have
  real time access to data such as the map of the building and numerous
  helpful informations.


  16.4.

  Wearable for the disabled.

  One can easily think that a wearable computer can be very helpfull for
  the disabled people, for example for blind people a wearable with a
  GPS receiver, some maps of the surroundings and even more, interacting
  with its surroundings by means of active beacons can be a very good
  substitute for a dog, the elements exists for a long time.

  This should be easily done : the linux comunity has good text to
  speech applications, voice recognition is quite ready for this
  application , the IrDA or Modem radio drivers are OK, the same applies
  to the GPS programs, we have to develop an electronic blind walking
  stick in order to detect the obstacles at a much reater range and
  last, but not the least to convince the autorities.


  17.

  A borg's life.

  This section deals with Human-Human interaction.  As the wearable is
  quite new for the layman one has to expect some strange reactions from
  the other people.  When I go out and read my PalmPilot's screen while
  walking or in the subway people have one of the following reactions :

  o  No reaction: because they are in their own world or because they
     don't care.

  o  Curiosity: they come to me and ask me questions like "what it is",
     "what are you doing with it" and "how much does it cost ?"

  o  Disdain : they may think I want to draw attention.


  o  Hostility/Fear : "this guy is nut: avoid him".

     Steve Mann Gave an interview in the New Scientist magazine and as
     he was one of the first to test the waters, so he has a long
     experience in this field.  The second problem is that the
     wearable's hardware is quite expensive and some predators will spot
     a new device that can be easily stolen and sold at a good price, or
     just in order to have one of them.  As a conclusion you have to be
     very cautious.


  18.

  Sources of Information.


  18.1.

  Non commercial


  A good starting point to gather information is to subscribe to the
  wear-hard@haven.org mailing list, you have to send a message with the
  word subscribe in the subject to wear-hard-request@haven.org.

  The archive of this mailing list is mirrored at Wearable Central
  <http://wearables.blu.org> This site was founded to be an archive
  center for the mailing list and the newsgroup.  It is maintened by R.
  Paul McCarty.

  You can also read one of the very good FAQs such as the wearcompfaq
  <http://wearcomp.org/wearcompfaq.html> or you may go to the wearable
  webring  <http://www.webring.org/cgi-bin/webring?ring=wearit;list>  (
  at the time of this writting the webring lists 35 sites ).

  18.2.

  Commercial.

  You can find information on the web sites of the company cited in the
  various sections of this document and as stated earlier in this
  document : The companies quoted here are just for your information
  only, I do not endorse any of their product, this just in order to
  help you.


  18.3.  Reading.

  Some science fiction books can be a good introduction to Wearable
  computing. Among other books one can think of ( alphabetical listing
  ):

  o  Diamond Age by Neal Stephenson ( a lot of nanotechnology too ).

  o  Snow Crash by Neal Stephenson

  o  Virtual Light by Willian Gibson


  19.

  To do List.

  This section is about things that have to be done for the next
  releases if you wish to contribute it is a good place to look at.

  o  To review more in depth the sulawesi project.

  o  Organic Leds are very interesting, I should cover theses too.

  o  To expand the input/visual output sections.

  o  To expand and reorder the advocacy section.

  o  To have an "in the car" section.

  o  The concept of an UW wearable seems viable lets think about it.

  o  List and describe all projects.

  o  List and describe all products.

  o  To get some sleep ;-).


  20.

  Revision History.


  o  v 0.0.7 March 2000, second release.

  o  v 0.0.5 December 1999, first release.

  o  v 0.0.1 November 1999, first draft.

  21.

  Thanks and Credits.

  I would like to thank among other people:

  o  Werner Heuser <wehe@snafu.de> <mailto:wehe@snafu.de> for the work
     he has done maintaining his Laptop-HOWTO
     <http://www.snafu.de/~wehe/index_li.html>

  o  The people of the Wearable mailing list which proved to be very
     informative and open minded.

  o  My friend Manu Coutris for his never ending patience and kindness.

  o  The people of the Wearable community whose discussion and web sites
     strengthen my confidence in the wearable concept.

  o  Professor Steve Mann for his patience and for beeing one of the
     pionners in the Wearable Computing field. I also wish to thank him
     for the wearcompdef, wearcompfaq and wristwatch wearable links.



  The Winmodems-and-Linux HOWTO
  Alexandre J., alexandre12@mageos.com
  v1.0, April 2000

  This document helps users having a Winmodem for getting it working
  under Linux.
  ______________________________________________________________________

  Table of Contents


  1. What are Winmodems ?

     1.1 They are modems...
     1.2 ...not as real modems are !
     1.3 How to know I have a Winmodem ?

  2. ISA or PCI ?

     2.1 PCI ?
     2.2 or ISA ?

  3. Installing a modem driver

     3.1 The LT WinModem (from Lucent)
     3.2 The LTMODEM program (OpenSource driver)

  4. The end...

     4.1 Licence, Copyright
     4.2 Contact
     4.3 Resources


  ______________________________________________________________________

  1.  What are Winmodems ?


  1.1.  They are modems...

  A Winmodem, like other modems, is used for accessing to phone
  services, as BBS, Internet, Voice Phone, Fax, etc. It is raccorded to
  a phone line and is caracterized by its speed. If you want to learn
  more about modems, I report you to the Modems-HOWTO.

  1.2.  ...not as real modems are !

  But they are WINmodems. That is, they need Windows to work. Why ?
  Simply because they are stupid. They need a special software, a
  driver, to accomplice their complete task. Who says software says OS,
  and the drivers included with the modem are, at 99%, exclusively for
  the MS-Windows platform. But with the democratization of Linux, some
  manufacturers, like LT or Motorola, decided to create a linux driver
  for their modems. But they have not understand linux philosophy: the
  drivers they provide works, of course, but they are 'Closed Source'.
  They are free, at the sense of the price, but not under the GPL. It
  means that the sources are not available.

  So, some 'hackers' decided to make an Open Source driver, but they do
  not know a lot about their modems, because manufacturers don't want to
  communicate the specifications of their modems, so the OpenSource
  drivers are often in the alpha or beta status.



  1.3.  ?  How to know I have a Winmodem

  1. Try to get the name of the serial port where your modem is
  connected (under Windows or MSDOS, example: COM1 COM2, ...).

  The name of your modem under Linux is /dev/ttySx, where x is the
  number of the serial port under DOS, - 1. < Example: Under DOS: COM1,
  under Linux ttySx, with x=1-1, so ttyS0

  2nd example: Under DOS: COM3, under Linux ttyS2

  and so on


  2. Make a symlink from /dev/ttySx to /dev/modem, by typing

  ______________________________________________________________________
  rm -f /dev/modem<p>
  ln -s /dev/ttySx /dev/modem
  ______________________________________________________________________



  3. Download and install the minicom package. Then run 'minicom -s'.

  Choose 'Serial Port Setup', type 'A' for setting 'Serial Device',
  delete all the line, and type '/dev/modem'. Then validate by [Enter].
  Type [Esc], and choose 'save setup as dfl, then choose 'Exit'.

  Wait a little time, then type 'AT' if the modem answers 'OK' then you
  have NOT a Winmodem, you have a standard modem...

  If the initialisation time takes too long, then you have a Winmodem.
  Use this document for try making it useful. Log in as root.


  4. Exit from Minicom by typing CTRL+A, then X.



  2.  ISA or PCI ?


  2.1.  PCI ?

  Ok, now we have a Winmodem... But there are two types of Winmodems:
  ISA or PCI. For making the things harder, the two interfaces are
  pretty different. So, we'll now test if we have a PCI or ISA modem.
  First, you must configure your kernel. During the make *config, you
  must answer 'yes' to the following questions:



    In Loadable module support: 'Enable loadable module support
     (CONFIG_MODULES)', and 'Set version information on all modules for
     symbols (CONFIG_MODVERSIONS)' (note that you must have the modutils
     package installed ; See the Kerneld-HOWTO)

    In General setup:


     Choose 'Any' in 'PCI Access Mode' (CONFIG_PCI_GOBIOS)



    In Filesystems



     If you have never recompiled your kernel, maybe the kernel of your
     distribution will contains this. If you want to recompile it and
     you have never done it, read the Kernel-HOWTO.


  Now, we assume that your new kernel is installed.


  Now run 'cat /proc/pci'. If you see the name of your modem in the
  lines returned by the command then you have a PCI Winmodem. Jump to
  'Installing the driver'



  2.2.  or ISA ?

  If you don't find it, maybe you have an ISA modem. How to be sure ?

  ISA support is not assumed by the Kernel (the 2.4.* kernel will do it,
  but it is yet in a not-stable version...). It is a third-party
  software, named isapnp, who does it. First you must be sure that you
  have this package installed. If not install it by downloading the
  isapnptools package.

  Once isapnptools is installed, we'll run a special program, pnpdump,
  who inspects your computer for finding ISA devices. Then it tries to
  guess the resources used by the devices and prints them to a file,
  /etc/isapnp.conf. Then you edit this file and run an other program,
  isapnp, which reads the isapnp.conf file and auto configure your
  devices.


  Eh ? It sounds hard ? Then follow these steps:


  1. Run 'pnpdump > /etc/isapnp.conf'.

  2. Edit it with your favourite text editor

  3. Locate the section where your modem is described.

  4. Uncomment some lines in the file (Remove the # at the beginning of
  the line. You need:

  1 line '(IO 0 ...)'

  1 line '(INT 0 ...)'

  1 line '(DMA 0 ...)'

  1 line '(DMA 1 ...)'

  1 line '(IO 1...)'

  5. Remove the '(CHECK)' in all uncommented IO lines

  6. Run 'isapnp /etc/isapnp.conf'. If you get errors, edit the file
  isapnp.conf and try changing parameters, help you with the error
  message. If you get no errors, edit isapnp.conf and uncomment the
  '(ACT Y)' line in the secton of your modem. Then re-run 'isapnp
  /etc/isapnp.conf'. It must answer you " [[Name of your modem]] Enabled
  OK"
  7. Add 'isapnp /etc/isapnp.conf' to your /etc/rc.d/rc.local, by typing
  'echo "isapnp /etc/isapnp.conf" >> /etc/rc.d/rc.local'. It is useful
  for auto-configuring your devices at each startup


  If it can help , here is an extract of my /etc/isapnp.conf file (I
  have commented this file, and original file comments are preceded by
  ##)



  ______________________________________________________________________

  # Snip details ...
  ## (DEBUG)
  (READPORT 0x0203)
  (ISOLATE PRESERVE)
  (IDENTIFY *)
  (VERBOSITY 2)
  (CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING

  # Identification of my modem card

  ## Card 1: (serial identifier e2 00 00 01 00 05 50 c3 1e)
  ## Vendor Id GVC5005, Serial Number 256, checksum 0xE2.
  ## Version 1.0, Vendor version 0.1
  ## ANSI string -->LT Win Modem<--
  ##
  ## Logical device id HSM0140
  ##     Device support I/O range check register
  #

  # We want to configure the GVC5005/256 card

  (CONFIGURE GVC5005/256 (LD 0

  # I/O Base address 0x03f8, with a range of 8
  (IO 0 (SIZE 8) (BASE 0x03f8) )
  # IRQ 4
  (INT 0 (IRQ 4 (MODE +E)))
  # DMA 5
  (DMA 0 (CHANNEL 5))
  # DMA 7
  (DMA 1 (CHANNEL 7))
  # I/O Base Address 2  0x0100, range 8
  (IO 1 (SIZE 8) (BASE 0x0100) )
  # Name of the card
   (NAME "GVC5005/256[0]{LT Win Modem        }")
  # Activitate it
  (ACT Y)
  # End configuration
  ))

  ######## The parameters for my other ISA devices ##############

  ## Returns all cards to the "Wait for Key" state
  (WAITFORKEY)
  ______________________________________________________________________



  3.  Installing a modem driver

  You have not to read this section entirely; just read one matching
  with your modem. For the moment, it just describes how to install a LT
  Modem, using the Lucent and OpenSource driver. If you have written or
  used an other Winmodem driver, Open or Closed Source, you can email me
  (alexandre12@mageos.com), and I will include it in this section.



  3.1.  The LT WinModem (from Lucent)

  URL: http://www.linmodems.org/linux568.zip

  Author: Lucent Technologies

  License: Non-GPL

  Supports: ISA/PCI modems, with a Lucent chipsets (Mars family)

  Features: Kernel module; simulate a serial port. Does PPP, Fax and
  Voice

  Current version (as far as I know): 5.68

  Documentation: README

  Requires: A 2.2.12 or higher RedHat kernel; loadable module support

  How-to-use: Unzip the package ('unzip linux568.zip'), and run
  ./ltinst. That's all !

  Problems:


  


  

  

  

    You have no lt modem or compliant installed

    If you have a ISA modem, it is not configured by isapnp

    If you have a PCI modem, the PCI support in the kernel was not
     configured


  3.2.  The LTMODEM program (OpenSource driver)

  URL: http://www.close-u-net.com

  Authors: Richard Close and Pavel Machek

  License: GPL

  Supports: ISA/PCI modems, with Lucent chipsets (Mars family)

  Feature: User-space driver; does Voice calls; does not PPP (V90)

  Current version (as far as I know): 0.9.2

  Documentation: README

  Requires: GNU C Compiler, automake

  How-to-use:


  


    PCI: make ; make install - Then use the 'ltmodem' program to
     communicate with the modem

    ISA: (read the README.ISA file) mv Makefile Makefile.PCI ; mv
     Makefile.ISA Makefile ; edit config.h and change for the correct
     values for your modem (I/O Address, DMA, IRQ) ; make ; make install
     - The use 'ltmodem' program to communicate with the modem.


     Problems:


    "Sorry, I can't found any modem...":


    You have not LT modem

    You have an ISA modem not configured by isapnp

    You have an ISA modem configured ; but ltmodem was not compiled as
     ISA

    You have a PCI modem with no PCI support included in the kernel

    You have a PCI modem and a compliant kernel, but ltmodem was not
     compiled as PCI


  4.  The end...


  4.1.  Licence, Copyright

  Copyright (C) 2000  Alexandre J.

  This program is free software; you can redistribute it and/or modify

  it under the terms of the GNU General Public License as published by

  the Free Software Foundation; either version 2 of the License, or

  (at your option) any later version.


  This program is distributed in the hope that it will be useful,

  but WITHOUT ANY WARRANTY; without even the implied warranty of

  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

  GNU General Public License for more details.


  You should have received a copy of the GNU General Public License

  along with this program; if not, write to the Free Software

  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  USA

  4.2.  Contact

  If you have any ideas about this document, pleace email me:
  alexandre12@mageos.com.


  4.3.  Resources


    The Linmodems project home page: http://www.linmodems.org


    The LTModem project home page: http://www.close-u-net.com


    The Lucent Technologies home page: http://www.lucent.com


    The Linux Kernel: http://www.kernel.org


    The isapnptools home page:
     http://www.roestock.demon.co.uk/isapnptools


    The LDP Home Page (for getting HOWTOs):
     http://www.redhat.com/mirrors/LDP



  The Linux XFree86 HOWTO
  by Eric S. Raymond
  v6.1, 21 April 2000

  This document describes how to obtain, install, and configure version
  4.0 of the XFree86 version of the X Window System (X11R6) for Linux
  systems. It is a step-by-step guide to configuring XFree86 on your
  system.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Other sources of information
     1.2 New versions of this document
     1.3 Feedback and Corrections

  2. Hardware requirements

  3. Installing XFree86

  4. Configuring XFree86

     4.1 Normal Configuration
     4.2 Troubleshooting
     4.3 Custom Configuration
     4.4 Using 16-bit Color

  5. Running XFree86

     5.1 Terms of Use
     5.2 Acknowledgements

  6. Translations



  ______________________________________________________________________

  1.  Introduction

  The X Window System is a large and powerful (some might say
  excessively large and overly complex) graphics environment for UNIX
  systems. The original X Window System code was developed at MIT;
  commercial vendors have since made X the industry standard for UNIX
  platforms. Virtually every UNIX workstation in the world runs some
  variant of the X Window system.

  A freely redistributable port of the MIT X Window System version 11,
  release 6 (X11R6) for 80386/80486/Pentium UNIX systems has been
  developed by a team of programmers originally headed by David
  Wexelblat <dwex@XFree86.org>. The release, known as XFree86, is
  available for System V/386, 386BSD, and other x86 UNIX
  implementations, including Linux. It includes all of the required
  binaries, support files, libraries, and tools.

  Complete information on XFree86 is available at the XFree86 web site,
  <http://www.XFree86.org>.

  In this document, we'll give a step-by-step description of how to
  install and configure XFree86 for Linux, but you will have to fill in
  some of the details yourself by reading the documentation released
  with XFree86 itself. (This documentation is discussed below.)
  However, using and customizing the X Window System is far beyond the
  scope of this document---for this purpose you should obtain one of the
  many good books on using the X Window System.


  1.1.  Other sources of information

  If you have never heard of Linux before, there are several sources of
  basic information about the system. The best place to find these is at
  the Linux Documentation Project home page at
  <http://metalab.unc.edu/LDP>.  You can find the latest, up-to-date
  version of this document there, as
  <http://metalab.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>


  1.2.  New versions of this document

  New versions of the Linux XFree86 HOWTO will be periodically posted to
  comp.os.linux.help and  and news.answers <news:news.answers>.  They
  will also be uploaded to various Linux WWW and FTP sites, including
  the LDP home page.

  You can always view the latest version of this on the World Wide Web
  via the URL  <http://metalab.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>.


  1.3.  Feedback and Corrections

  If you have questions or comments about this document, please feel
  free to mail Eric S. Raymond, at esr@thyrsus.com. I welcome any
  suggestions or criticisms. If you find a mistake with this document,
  please let me know so I can correct it in the next version. Thanks.

  Please do not mail me questions about how to make your video card and
  monitor work with X.  This HOWTO is intended to be a rapid, painless
  guide to normal installation using the new interactive configurator.
  If you run into problems, browse the XFree86 Video Timings HOWTO,
  <http://metalab.unc.edu/LDP/HOWTO/XFree86-Video-Timings-HOWTO.html>.
  (This is the up-to-date HTML version of XFree86's `Videomodes.doc'
  file.)  That document tells everything I know about configuration
  troubleshooting.  If it can't help you, I can't either.


  2.  Hardware requirements

  You can find an up-to-date list of supported cards and chipset types
  at http://www.xfree86.org/4.0/Status.html
  <http://www.xfree86.org/4.0/Status.html>.

  The documentation included with your video adaptor should specify the
  chipset used. If you are in the market for a new video card, or are
  buying a new machine that comes with a video card, have the vendor
  find out exactly what the make, model, and chipset of the video card
  is. This may require the vendor to call technical support on your
  behalf; in general vendors will be happy to do this. Many PC hardware
  vendors will state that the video card is a ``standard SVGA card''
  which ``should work'' on your system. Explain that your software
  (mention Linux and XFree86!)  does not support all video chipsets and
  that you must have detailed information.

  You can also determine your videocard chipset by running the
  SuperProbe program included with the XFree86 distribution.  This is
  covered in more detail below.

  Supported video cards will work with all bus types, including ISA and
  VLB and PCI.

  One problem faced by the XFree86 developers is that some video card
  manufacturers use non-standard mechanisms for determining clock
  frequencies used to drive the card. Some of these manufacturers either
  don't release specifications describing how to program the card, or
  they require developers to sign a non-disclosure statement to obtain
  the information. This would obviously restrict the free distribution
  of the XFree86 software, something that the XFree86 development team
  is not willing to do. For a long time, this has been a problem with
  certain video cards manufactured by Diamond, but as of release 3.1 of
  XFree86, Diamond has started to work with the development team to
  release free drivers for these cards.

  The suggested setup for XFree86 under Linux is a 486 or better with at
  least 8 megabytes of RAM, and a video card with a chipset listed
  above. For optimal performance, we suggest using an accelerated card,
  such as an S3-chipset card. You should check the documentation for
  XFree86 and verify that your particular card is supported before
  taking the plunge and purchasing expensive hardware.

  As a side note, the personal Linux system of Matt Welsh (this FAQ's
  originator) was a 486DX2-66, 20 megabytes of RAM, equipped with a VLB
  S3-864 chipset card with 2 megabytes of DRAM.  He ran X benchmarks on
  this machine as well as on Sun Sparc IPX workstations.  The Linux
  system was roughly 7 times faster than the Sparc IPX (for the curious,
  XFree86-3.1 under Linux, with this video card, runs at around 171,000
  xstones; the Sparc IPX at around 24,000). In general, XFree86 on a
  Linux system with an accelerated SVGA card will give you much greater
  performance than that found on commercial UNIX workstations (which
  usually employ simple framebuffers for graphics).

  Your machine will need at least 4 megabytes of physical RAM, and 16
  megabytes of virtual RAM (for example, 8 megs physical and 8 megs
  swap).  Remember that the more physical RAM that you have, the less
  that the system will swap to and from disk when memory is low. Because
  swapping is inherently slow (disks are very slow compared to memory),
  having 8 megabytes of RAM or more is necessary to run XFree86
  comfortably.  16 is better.  A system with 4 megabytes of physical RAM
  could run much (up to 10 times) more slowly than one with 8 megs or
  more.


  3.  Installing XFree86

  It's quite likely that you obtained XFree86 as part of a Linux
  distribution, in which case downloading the software separately is not
  necessary.  Or you may be able to get RPM binary packages built for
  your machine, in which case you can just install those using rpm(1).
  In either case you can skip this the rest of this section.

  The Linux binary distributions of XFree86 can be found on a number of
  FTP sites.  On the XFree86 site they are under
  <ftp://ftp.xfree86.org/pub/XFree86/current/binaries/>.  You will want
  either the Linux-axp-glibc21, Linux-ix86-glibc20, or Linux-
  ix86-glibc21 subdirectories, depending on your processor type
  (axp=alpha, ix86=Intel 80x86) and Gnu C library version.

  Before doing anything else, download and run the `Xinstall.sh' shell
  script first.  This may tell you about prerequisites you'll need to
  have in place before continuing your installation.  Complete
  instructions for installing the XFree86 nbinary distribution are at
  <http://www.xfree86.org/4.0/Install2.html>.

  The binary directory should contain release notes for the current
  version in RELNOTES.  Consult those for installation details


  All that is required to install XFree86 is to obtain the above files,
  create the directory /usr/X11R6 (as root), and unpack the files from
  /usr/X11R6 with a command such as:


       gzip -dc Xbin.tgz | tar xfB -



  Remember that these tar files are packed relative to /usr/X11R6, so
  it's important to unpack the files there.

  You need to make sure that /usr/X11R6/bin is on your path.  This can
  be done by editing your system default /etc/profile or /etc/csh.login
  (based on the shell that you, or other users on your system, use). Or
  you can simply add the directory to your personal path by modifying
  .bashrc or .cshrc, based on your shell.

  You also need to make sure that /usr/X11R6/lib can be located by
  ld.so, the runtime linker. To do this, add the line


       /usr/X11R6/lib



  to the file /etc/ld.so.conf, and run /sbin/ldconfig, as root.


  4.  Configuring XFree86


  4.1.  Normal Configuration

  Configuring XFree86 to use your mouse, keyboard, monitor, and video
  card correctly used to be something of a black art, requiring
  extensive hand-hacking of a complex configuration file.  No more;
  recent releases have made the process nearly trivial.  It simplifies
  matters a lot that there are no longer separate servers for different
  kinds of cards, just modules loaded by a common server.  All you do to
  configure it is fire up the program XF86Setup.

  This program depends on the fact that all new PC hardware these days
  ships with EGA/VGA capable monitors.  It invokes the VGA16 server and
  uses it to bring up X in a lowest-common-denominator 640x480 mode.
  Then it runs an interactive program that walks you through a series of
  five configuration panels -- mouse, keyboard, (video) card, monitor,
  and `other' (miscellaneous server options). The whole process is quite
  painless.

  (If you're running Red Hat Linux, you may see a different program
  called xf86config.  This works fairly similarly to XF86Setup but does
  not itself use an X interface and the VGA16 server.)

  One minor point to keep in mind is that, if you're like most people
  using a current PC, your keyboard is actually what XF86Setup calls
  `Generic 102-key PC (intl)' rather than the default `Generic 101-key
  PC'.  If you pick the default (101) the key cluster on the extreme
  right of your keyboard (numeric keypad and friends) may stop working.

  If you're not sure of your monitor type, you can try the listed ones
  in succession.  Work your way from top down (upper choices involve
  lower dot-clock speeds and are less demanding on the hardware).  Back
  off if you get hash or a seriously distorted picture. Minor
  distortions (picture slightly too large, slightly too small, or
  slightly off-center) are no problem; you'll get a chance to correct
  those immediately by fine-tuning the mode.

  And, when the program brings up xvidtune to allow you to tweak your
  video mode, don't let the initial warning box make you nervous.
  Modern multisync monitors (unlike their fixed-frequency predecessors)
  are not easy to damage this way.

  XF86Config may assume that your mouse device is /dev/mouse.  If you
  find this doesn't work, you may need to link /dev/mouse to whatever
  /dev/ca[01] the mouse is on.   If you find that XFree86 gives you a
  "mouse busy" error when gpm is running, you may need to link to
  /dev/ttyS[01] instead.

  The configuration process operates by selecting a server module
  corresponding to to the general type of your video card and
  configuring an XF86Config that the server will read on startup to get
  specific parameters for your installation.  The location of XF86Config
  varies depending on your OS, but one place to look for it is /etc/X11.

  On older versions of XFree86, XF86Setup links the `X' command directly
  to the chosen server.  In recent versions, `X' is instead linked to a
  set-user-id wrapper program called Xwrapper.  The idea is that all the
  setuid root stuff gets localized in Xwrapper so the server doesn't
  have to run setuid root.


  4.2.  Troubleshooting


  Occasionally, something will not be quite right when you initially
  fire up the X server. This is almost always caused by a problem in
  your configuration file. Usually, the monitor timing values are off,
  or the video card dot clocks set incorrectly. Minor problems can be
  fixed with xvidtune; a really garbled screen usually means you need to
  go back into XF86Setup and choose a less capable monitor type.

  If your display seems to roll, or the edges are fuzzy, this is a clear
  indication that the monitor timing values or dot clocks are wrong.
  Also be sure that you are correctly specifying your video card
  chipset, as well as other options for the Device section of
  XF86Config. Be absolutely certain that you are using the right X
  server and that /usr/X11R6/bin/X is a symbolic link to this server.

  If all else fails, try to start X ``bare''; that is, use a command
  such as:


       X > /tmp/x.out 2>&1



  You can then kill the X server (using the ctrl-alt-backspace key com
  bination) and examine the contents of /tmp/x.out. The X server will
  report any warnings or errors---for example, if your video card
  doesn't have a dot clock corresponding to a mode supported by your
  monitor.

  Remember that you can use ctrl-alt-numeric + and ctrl-alt-numeric - to
  switch between the video modes listed on the Modes line of the Screen
  section of XF86Config. If the highest resolution mode doesn't look
  right, try switching to lower resolutions. This will let you know, at
  least, that those parts of your X configuration are working correctly.

  Also, check the vertical and horizontal size/hold knobs on your
  monitor.  In many cases it is necessary to adjust these when starting
  up X. For example, if the display seems to be shifted slightly to one
  side, you can usually correct this using the monitor controls.

  The USENET newsgroup comp.windows.x.i386unix is devoted to discussions
  about XFree86, as is comp.os.linux.x.  It might be a good idea to
  watch that newsgroup for postings relating to your video
  configuration---you might run across someone with the same problems as
  your own.


  4.3.  Custom Configuration

  You will need to hand-hack your X configuration to get optimal
  performance if your monitor can support 1600x1200 -- the highest
  canned resolution XF86Setup supports is 1280x1024.

  If you want to hand-hack your video configuration for this or any
  other reason, go see the LDP's XFree86 Video Timings HOWTO,
  <http://metalab.unc.edu/LDP/HOWTO/XFree86-Video-Timings-HOWTO.html>.
  (This is the up-to-date HTML version of XFree86's `Videomodes.doc'
  file.)


  4.4.  Using 16-bit Color


  By default, X uses 8-bit color depth giving 256 colors. To circumvent
  this restriction, many applications allocate their own colormaps,
  resulting in sudden color jumps when the cursor moves between two
  windows each having a color map of its own. The Arena WWW browser does
  it this way.

  If you want to use advanced graphic applications 256 colors may be not
  sufficient.  You may need to go to 16-bit color depth (65,536 colors).
  But beware, not all applications will work with 16bit colors.

  You can use 16bit color depth with 65K different colors simply by
  starting X with


  ______________________________________________________________________
      startx -- -bpp 16
  ______________________________________________________________________



  or putting


  ______________________________________________________________________
      exec X :0 -bpp 16
  ______________________________________________________________________



  into your .xserverrc file.  In order for this to work, however, you
  need to have a

  ______________________________________________________________________
  screen
  ______________________________________________________________________



  ______________________________________________________________________
      DefaultColorDepth 16
  ______________________________________________________________________



  If you're using xdm, you may need to change the Xservers file, which
  is probably located in /etc/X11/xdm/.  A typical configuration has
  just one uncommented line, looking something like


  ______________________________________________________________________
        :0 local /usr/X11R6/bin/X
  ______________________________________________________________________



  Add

  ______________________________________________________________________
  -bpp 16
  ______________________________________________________________________



  ______________________________________________________________________
        :0 local /usr/X11R6/bin/X -bpp 16
  ______________________________________________________________________



  Also, you'll need to add to the `screen' section of your X
  configuration a Display part with a Depth value of 16.  Generally you
  can just duplicate the 8-bit Display section and change the Depth
  field.

  More colors makes your video card transfer more data during the same
  time. If your video card cannot cope, then either the resolution has
  or the refresh rate has to be reduced.  By default, XFree reduces the
  resolution.  If you want to keep the resolution and reduce the refresh
  rate, you must insert a new appropriate Modeline into your XF86Config
  file which defines that resolution with a lower refresh rate. For
  instance replace the old value


       Modeline "1024x768"  75  1024 1048 1184 1328 768 771 777 806 -hsync -vsync



  with


       Modeline "1024x768"  65  1024 1032 1176 1344 768 771 777 806 -hsync -vsync.



  The magic numbers 75 and 65 are the respective clock rates which you
  find reported by X in your .X.err file. Consult the monitors file in
  the XF86 documentation for Modelines suitable to the maximum clock
  rate your video card can deliver under 16bit color depth.



  5.  Running XFree86

  With your XF86Config file configured, you're ready to fire up the X
  server and give it a spin. First, be sure that /usr/X11R6/bin is on
  your path.

  The command to start up XFree86 is

       startx


  This is a front-end to xinit (in case you're used to using xinit on
  other UNIX systems).

  This command will start the X server and run the commands found in the
  file .xinitrc in your home directory. .xinitrc is just a shell script
  containing X clients to run. If this file does not exist, the system
  default /usr/X11R6/lib/X11/xinit/xinitrc will be used.

  A standard .xinitrc file looks like this:


       #!/bin/sh

       xterm -fn 7x13bold -geometry 80x32+10+50 &
       xterm -fn 9x15bold -geometry 80x34+30-10 &
       oclock -geometry 70x70-7+7 &
       xsetroot -solid midnightblue &

       exec fvwm2



  This script will start up two xterm clients, an oclock, and set the
  root window (background) color to midnightblue.  It will then start up
  fvwm2, the window manager. Note that fvwm2 is executed with the
  shell's exec statement; this causes the xinit process to be replaced
  with fvwm2. Once the fvwm2 process exits, the X server will shut down.
  You can cause fvwm2 to exit by using the root menus: depress mouse
  button 1 on the desktop background---this will display a pop up menu
  which will allow you to Exit Fvwm2.

  Be sure that the last command in .xinitrc is started with exec, and
  that it is not placed into the background (no ampersand on the end of
  the line). Otherwise the X server will shut down as soon as it has
  started the clients in the .xinitrc file.

  Alternately, you can exit X by pressing ctrl-alt-backspace in
  combination. This will kill the X server directly, exiting the window
  system.

  The above is a very, very simple desktop configuration. Many wonderful
  programs and configurations are available with a bit of work on your
  .xinitrc file.

  If you are new to the X Window System environment, we strongly suggest
  picking up a book such as The Joy of X: An Overview of the X Window
  System by Niall Mansfield (Addison-Wesley 1993, ISBN 0201-565129).
  Using and configuring X is far too in-depth to cover here. See the man
  pages for xterm, oclock, and fvwm2 for clues on getting started.



  5.1.  Terms of Use

  This document is copyright 1996 by Eric S. Raymond. You may use,
  disseminate, and reproduce it freely, provided you:


    Do not omit or alter this copyright notice.

    Do not omit or alter the version number and date.

    Do not omit or alter the document's pointer to the current WWW
     version.

    Clearly mark any condensed or altered versions as such.

  These restrictions are intended to protect potential readers from
  stale or mangled versions.  If you think you have a good case for an
  exception, ask me.


  5.2.  Acknowledgements

  This document was originated by Matt Welsh in the dim and backward
  abysm of time.  Thanks, Matt!



  6.  Translations


    Italian <http://www.pluto.linux.it/ildp/HOWTO/XFree86-HOWTO.html>

    Slovenian <http://www.lugos.si/delo/slo/HOWTO-sl/XFree86-HOWTO-
     sl.html>

    Croatian <http://meta.mioc.hr/XFree86-KAKO.html>

    Dutch <http://www.nl.linux.org/doc/HOWTO/>

    <>Hungarian"
     url="http://www.ppk.ini.hu/texts/XFree86-HOGYAN/XFree86-HOGYAN.html">



  Linux Touch Screen HOWTO
  Christoph Baumann, cgb@debian.org
  Dec 10, 1999

  This document describes how to set up a touch screen input device
  under XFree86. As the author had only the opportunity to work with
  devices from EloTouch(R) and MicroTouch(R) this HOWTO is rather spe-
  cific for these devices.
  ______________________________________________________________________

  Table of Contents


  1. Which sort of devices are described here?

  2. How to configure the device

  3. Activating the device

  4. Suggested reading



  ______________________________________________________________________

  1.  Which sort of devices are described here?

  This HOWTO concentrates on devices connected via the serial port i.e.
  /dev/ttyS0 or /dev/ttyS1.

  2.  How to configure the device

  Touch screen devices are configured in the Xinput section in the
  XF86Config file (mostly /etc/X11/XF86Config or /etc/XF86Config).  At
  first verify that the device driver modules exist. They are located in
  /usr/X11R6/lib/modules/ (the modules for the above mentioned devices
  are xf86Elo.so and xf86MuTouch.so). Now have a look into XF86Config.
  There should be a section looking like this:


  Section "Files"
  ...
  ModulePath "/usr/X11R6/lib/modules"
  ...
  EndSection



  To get the module loaded by the X server there has to be a section
  like this:


  Section "Module"
  Load "xf86Elo.so"
  EndSection



  Now the more tricky part. X needs to know some parameters about the
  device.  The section for this looks like this (see "man XF86Config"
  for more details):



  Section "Xinput"
   SubSection "Elographics"
  #the entry for a MicroTouch device would be SubSection "MicrotouchFinger"
    Port "/dev/ttyS1" # for a device at serial port 2
    DeviceName "TouchScreen" #could be any unambiguous name
    MinimumXPosition 300
    MaximumXPosition 3700
    MinimumYPosition 300
    MaximumYPosition 3700
    UntouchDelay 10 #not supported with MuTouch
    ReportDelay 10  #not supported with MuTouch
   EndSubSection
  EndSection



  The values for the entries MinimumXPosition etc. are of course
  specific for the setup of the hardware (i.e. depend on the position of
  the touch screen relative to the monitor). The values determine where
  the points (0,0) and (xmax,ymax) on your monitor (xmax and ymax depend
  on the resolution chosen for the Xserver, such as 1024x768) are mapped
  on the touch screen.  The device driver reads these values and
  interpolishes the other coordinates.  For illustration:


   --------------touch screen area-----------------
   I                                              I
   I  ########visible monitor area##############  I
   I  #x                                       #  I
   I  # (0,0)                                  #  I
   I  # (MinimumXPosition,MinimumYPosition)    #  I
   I  #                                        #  I
   I  #                                        #  I
   I  #                                        #  I
   I  #                                        #  I
   I  #                                        #  I
   I  #                                        #  I
   I  #                                        #  I
   I  #     (MaximumXPosition,MaximumYPosition)#  I
   I  #                             (xmax,ymax)#  I
   I  #                                       x#  I
   I  ##########################################  I
   I                                              I
   ------------------------------------------------



  This mapping can be done by trial and error or by reading the raw
  output of the device (needs some serial port programming, see "The
  Linux Serial Programming HOWTO"). For the types EloTouch and
  MicroTouch exists a rudimentary calibration tool (written by the
  author of this document, it can be found at
  ftp://metalab.unc.edu/pub/linux/X11/xutils/touchcal-0.1.tar.gz
  <ftp://metalab.unc.edu/pub/linux/X11/xutils/touchcal-0.1.tar.gz>).

  3.  Activating the device

  After starting X, type in an Xterminal the command

  xsetpointer <devicename>

  where<devicename> is the name defined in XF86Config with the line
  DeviceName ".....", in this example it would be TouchScreen.



  4.  Suggested reading


  o  Manpage for XF86Config

  o  http://www.elotouch.com/linux.html
     <http://www.elotouch.com/linux.html>

  o  The manual shipped with your touch screen :-)



  XFree86 Video Timings HOWTO
  Eric S. Raymond <esr@thyrsus.com>
  Version 4.4, 13 Mar 2000

  How to compose a mode line for your card/monitor combination under
  XFree86.  The XFree86 distribution now includes good facilities for
  configuring most standard combinations; this document is mainly useful
  if you are tuning a custom mode line for a high-performance monitor or
  very unusual hardware.  It may also help you in using kvideogen to
  generate mode lines, or xvidtune to tweak a standard mode that is not
  quite right for your monitor.
  ______________________________________________________________________

  Table of Contents



  1. Disclaimer

  2. Introduction

  3. Tools for Automatic Computation

  4. How Video Displays Work

  5. Basic Things to Know about your Display and Adapter

     5.1 The monitor sync frequencies
     5.2 The monitor's video bandwidth
     5.3 The card's dot clock
     5.4 What these basic statistics control

  6. Interpreting the Basic Specifications

     6.1 About Bandwidth
     6.2 Sync Frequencies and the Refresh Rate:

  7. Tradeoffs in Configuring your System

  8. Memory Requirements

  9. Computing Frame Sizes

  10. Black Magic and Sync Pulses

     10.1 Horizontal Sync:
     10.2 Vertical Sync:

  11. Putting it All Together

  12. Overdriving Your Monitor

  13. Using Interlaced Modes

  14. Questions and Answers

  15. Fixing Problems with the Image.

     15.1 The image is displaced to the left or right
     15.2 The image is displaced up or down
     15.3 The image is too large both horizontally and vertically
     15.4 The image is too wide (too narrow) horizontally
     15.5 The image is too deep (too shallow) vertically

  16. Plotting Monitor Capabilities

  17. Credits



  ______________________________________________________________________

  1.  Disclaimer


  You use the material herein SOLELY AT YOUR OWN RISK.  It is possible
  to harm both your monitor and yourself when driving it outside the
  manufacturer's specs. Read ``Overdriving Your Monitor'' for detailed
  cautions. Any damage to you or your monitor caused by overdriving it
  is your problem.

  The most up-to-date version of this HOWTO can be found at the Linux
  Documentation Project <http://metalab.unc.edu/LDP> web page.
  Please direct comments, criticism, and suggestions for improvement to
  esr@snark.thyrsus.com. Please do not send email pleading for a magic
  solution to your special monitor problem, as doing so will only burn
  up my time and frustrate you -- everything I know about the subject is
  already in here.


  2.  Introduction


  The XFree86 server allows users to configure their video subsystem and
  thus encourages best use of existing hardware.  This document is
  intended to help you learn how to generate your own timing numbers to
  make optimum use of your video card and monitor.

  We'll present a method for getting something that works, and then show
  you how you can experiment starting from that base to develop settings
  that optimize for your taste.

  If you already have a mode that almost works (in particular, if one of
  predefined VESA modes gives you a stable display but one that's
  displaced right or left, or too small, or too large) you can go
  straight to the section on ``Fixing Problems with the Image''.  This
  will enlighten you on ways to tweak the timing numbers to achieve
  particular effects.

  Don't assume that you need to get all the way into mode tuning just
  because your X comes up with a scrambled display first time after
  installation; it may be that most of the factory mode lines are OK and
  you just happened to default to one that doesn't fit your hardware.
  Instead, cycle through all your installed modes with CTRL-ALT-KP+. If
  some of the modes look OK, try commenting out all but a 640x480 and
  check that that mode works. If it does then uncomment a couple of
  other modes, e.g. an 800x600 and a 1024x768 at a frequency that your
  monitor should be able to handle.

  More help is on the way.  Many driver modules in the just-released
  XFree86 4.0 support DDC, the VESA Display Data Channel facility.  When
  DDC is enabled, the monitor actually tells XFree86 what modelines it
  can support.  So with 4.0 and any recently-manufactured monitor you
  are likely not to have to do any configuration at all.


  3.  Tools for Automatic Computation

  If you have a relatively new monitor (1996 or later) that supports the
  PnP specification, there is a chance that you use the read-edid
  program to ask the monitor for its stastics and compute a mode line
  for you.  See  <http://altern.org/vii/programs/linux/read-edid/>.

  Starting with XFree86 3.2, XFree86 provides an XF86Setup(1) program
  that makes it easy to generate a working monitor mode interactively,
  without messing with video timing number directly.  So you shouldn't
  actually need to calculate a base monitor mode in most cases.
  Unfortunately, XF86Setup(1) has some limitations; it only knows about
  standard video modes up to 1280x1024.  If you have a very high-
  performance monitor capable of 1600x1200 or more you will still have
  to compute your base monitor mode yourself.

  There is a KDE tool called KVideoGen
  <http://without.netpedia.net/kvideogen/> that computes modelines from
  basic monitor and card statistics.  I've experimented with generating
  modelines from it, but haven't tried them live.  Note that its
  horizontal and vertical `refresh rate' parameters are the same as the
  sync frequencies HSF and VSF we describe below.  The `horizontal sync
  pulse' number seems to be a sync pulse width in microseconds, HSP
  (with the tool assuming fixed `front porch' HGT1 and `back porch' HGT2
  values).  If you don't know the `horizontal sync pulse' number it's
  safe to use the default.


  Recent versions of XFree86 provide a tool called xvidtune(1) which you
  will probably find quite useful for testing and tuning monitor modes.
  It begins with a gruesome warning about the possible consequences of
  mistakes with it.  If you pay careful attention to this document and
  learn what is behind the pretty numbers in xvidtune's boxes, you will
  become able to use xvidtune effectively and with confidence.

  If you have xvidtune(1), you'll be able to test new modes on the fly,
  without modifying your X configuration files or even rebooting your X
  server.  Otherwise, XFree86 allows you to hot-key between different
  modes defined in Xconfig (see XFree86.man for details).  Use this
  capabilty to save yourself hassles!  When you want to test a new mode,
  give it a unique mode label and add it to the end of your hot-key
  list.  Leave a known-good mode as the default to fall back on if the
  test mode doesn't work.

  Towards the end of this document, we include a `modeplot' script that
  you can use to produce an analog graph of available modes.  This is
  not directly helpful for generating modelines, but it may help you
  better understand the relationships that define them.


  4.  How Video Displays Work

  Knowing how the display works is essential to understanding what
  numbers to put in the various fields in the file Xconfig.  Those
  values are used in the lowest levels of controlling the display by the
  XFree86 server.

  The display generates a picture from what you could consider to be a
  series of raster dots. The dots are arranged from left to right to
  form lines.  The lines are arranged from top to bottom to form the
  picture.  The dots emit light when they are struck by the electron
  beams inside the display, one for each primary color.  To make the
  beams strike each dot for an equal amount of time, the beams are swept
  across the display in a constant pattern, called a raster.

  We say "what you could consider to be a series of dots" because these
  raster dots don't actually correspond to physical phosphor dots.  The
  physical phosphor dots are much smaller than raster dots -- they have
  to be, otherwise the display would suffer from severe moire-pattern
  effects.  The raster dots are really samples of the analog driver
  signal, and display as a grid of dots only because the peaks and
  valleys in the signal are quite regularly and finely spaced.

  The pattern starts at the top left of the screen, goes across the
  screen to the right in a straight line, moving ever so slightly
  "downhill" (the downhill slope is too small to be perceptible). Then
  the beams are swept back to the left side of the display, starting at
  a new line.  The new line is swept from left to right just as the
  first line was.  This pattern is repeated until the bottom line on the
  display has been swept.  Then the beams are moved from the bottom
  right corner of the display (sweeping back and forth a few times) to
  the top left corner, and the pattern is started over again.

  There is one variation of this scheme known as interlacing: here only
  every second line is swept during one half-frame and the others are
  filled in during a second half-frame.

  Starting the beams at the top left of the display is called the
  beginning of a frame.  The frame ends when the beams reach the the top
  left corner again as they come from the bottom right corner of the
  display.  A frame is made up of all of the lines the beams traced from
  the top of the display to the bottom.

  If the electron beams were on all of the time they were sweeping
  through the frame, all of the dots on the display would be
  illuminated.  There would be no black border around the edges of the
  display.  At the edges of the display the picture would become
  distorted because the beams are hard to control there.  To reduce the
  distortion, the dots around the edges of the display are not
  illuminated by the beams (because they're turned off) even though the
  beams, if they were turned on, would be pointing at them.  The
  viewable area of the display is reduced this way.

  Another important thing to understand is what becomes of the beams
  when no spot is being painted on the visible area.  The time the beams
  would have been illuminating the side borders of the display is used
  for sweeping the beams back from the right edge to the left. The time
  the beams would have been illuminating the top and bottom borders of
  the display is used for moving the beams from the bottom-right corner
  of the display to the top-left corner.

  The adapter card generates the signals which cause the display to turn
  on the electron beams (according to the desired color) at each dot to
  generate a picture. The card also controls when the display moves the
  beams from the right side back to the left by generating a signal
  called the horizontal sync (for synchronization) pulse.  One
  horizontal sync pulse occurs at the end of every line.  The adapter
  also generates a vertical sync pulse which signals the display to move
  the beams to the top-left corner of the display.  A vertical sync
  pulse is generated near the end of every frame.

  The display requires that there be short time periods both before and
  after the horizontal and vertical sync pulses so that the position of
  the electron beams can stabilize.  If the beams can't stabilize, the
  picture will not be steady.

  For more information, see TV and Monitor Deflection Systems
  <http://fribble.cie.rpi.edu/~repairfaq/REPAIR/F_deflfaq.html>.

  In a later section, we'll come back to these basics with definitions,
  formulas and examples to help you use them.


  5.  Basic Things to Know about your Display and Adapter


  There are some fundamental things you need to know before hacking an
  Xconfig entry.  These are:


  o  your monitor's horizontal and vertical sync frequency options

  o  your monitor's bandwidth

  o  your video adapter's driving clock frequencies, or "dot clocks"


  5.1.  The monitor sync frequencies

  The horizontal sync frequency is just the number of times per second
  the monitor can write a horizontal scan line; it is the single most
  important statistic about your monitor.  The vertical sync frequency
  is the number of times per second the monitor can traverse its beam
  vertically.

  Sync frequencies are usually listed on the specifications page of your
  monitor manual.  The vertical sync frequency number is typically
  calibrated in Hz (cycles per second), the horizontal one in KHz
  (kilocycles per second).  The usual ranges are between 50 and 150Hz
  vertical, and between 31 and 135KHz horizontal.

  If you have a multisync monitor, these frequencies will be given as
  ranges.  Some monitors, especially lower-end ones, have multiple fixed
  frequencies.  These can be configured too, but your options will be
  severely limited by the built-in monitor characteristics.  Choose the
  highest frequency pair for best resolution.  And be careful --- trying
  to clock a fixed-frequency monitor at a higher speed than it's
  designed for can easily damage it.

  Earlier versions of this guide were pretty cavalier about overdriving
  multisync monitors, pushing them past their nominal highest vertical
  sync frequency in order to get better performance.  We have since had
  more reasons pointed out to us for caution on this score; we'll cover
  those under ``Overdriving Your Monitor'' below.


  5.2.  The monitor's video bandwidth

  Your monitor's video bandwidth should be included on the manual's spec
  page.  If it's not, look at the monitor's higest rated resolution.  As
  a rule of thumb, here's how to translate these into bandwidth
  estimates (and thus into rough upper bounds for the dot clock you can
  use):



               640x480                 25
               800x600                 36
               1024x768                65
               1024x768 interlaced     45
               1280x1024               110
               1600x1200               185



  BTW, there's nothing magic about this table; these numbers are just
  the lowest dot clocks per resolution in the standard XFree86 Modes
  database (except for the last, which I extrapolated).  The bandwidth
  of your monitor may actually be higher than the minimum needed for its
  top resolution, so don't be afraid to try a dot clock a few MHz
  higher.

  Also note that bandwidth is seldom an issue for dot clocks under 65MHz
  or so.  With an SVGA card and most hi-res monitors, you can't get
  anywhere near the limit of your monitor's video bandwidth.  The
  following are examples:



          Brand                           Video Bandwidth
          ----------                      ---------------
          NEC 4D                          75Mhz
          Nano 907a                       50Mhz
          Nano 9080i                      60Mhz
          Mitsubishi HL6615               110Mhz
          Mitsubishi Diamond Scan         100Mhz
          IDEK MF-5117                    65Mhz
          IOCOMM Thinksync-17 CM-7126     136Mhz
          HP D1188A                       100Mhz
          Philips SC-17AS                 110Mhz
          Swan SW617                      85Mhz
          Viewsonic 21PS                  185Mhz
          PanaSync/Pro P21                220Mhz



  Even low-end monitors usually aren't terribly bandwidth-constrained
  for their rated resolutions.  The NEC Multisync II makes a good
  example --- it can't even display 800x600 per its spec.  It can only
  display 800x560.  For such low resolutions you don't need high dot
  clocks or a lot of bandwidth; probably the best you can do is 32Mhz or
  36Mhz, both of them are still not too far from the monitor's rated
  video bandwidth of 30Mhz.

  At these two driving frequencies, your screen image may not be as
  sharp as it should be, but definitely of tolerable quality. Of course
  it would be nicer if NEC Multisync II had a video bandwidth higher
  than, say, 36Mhz.  But this is not critical for common tasks like text
  editing, as long as the difference is not so significant as to cause
  severe image distortion (your eyes would tell you right away if this
  were so).


  5.3.  The card's dot clock

  Your video adapter manual's spec page will usually give you the card's
  maximum dot clock (that is, the total number of pixels per second it
  can write to the screen).

  If you don't have this information, the X server will get it for you.
  Recent versions of the X servers all support a --probeonly option that
  prints out this information and exits without actually starting up X
  or changing the video mode.

  If you don't have -probeonly, don't depair.  Even if your X locks up
  your monitor, it will emit a line of clock and other info to standard
  error.  If you redirect this to a file, it should be saved even if you
  have to reboot to get your console back.

  The probe result or startup message should look something like one of
  the following examples:

  If you're using XFree86:



  Xconfig: /usr/X11R6/lib/X11/Xconfig
  (**) stands for supplied, (--) stands for probed/default values
  (**) Mouse: type: MouseMan, device: /dev/ttyS1, baudrate: 9600
  Warning: The directory "/usr/andrew/X11fonts" does not exist.
           Entry deleted from font path.
  (**) FontPath set to "/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/"
  (--) S3: card type: 386/486 localbus
  (--) S3: chipset:   924
                      ---
      Chipset -- this is the exact chip type; an early mask of the 86C911

  (--) S3: chipset driver: s3_generic
  (--) S3: videoram:  1024k
                      -----
           Size of on-board frame-buffer RAM

  (**) S3: clocks:  25.00  28.00  40.00   3.00  50.00  77.00  36.00  45.00
  (**) S3: clocks:   0.00   0.00  79.00  31.00  94.00  65.00  75.00  71.00
                    ------------------------------------------------------
                                Possible driving frequencies in MHz

  (--) S3: Maximum allowed dot-clock: 110MHz
                                      ------
                                     Bandwidth
  (**) S3: Mode "1024x768": mode clock =  79.000, clock used =  79.000
  (--) S3: Virtual resolution set to 1024x768
  (--) S3: Using a banksize of 64k, line width of 1024
  (--) S3: Pixmap cache:
  (--) S3: Using 2 128-pixel 4 64-pixel and 8 32-pixel slots
  (--) S3: Using 8 pages of 768x255 for font caching



  If you're using SGCS or X/Inside X:


  WGA: 86C911 (mem: 1024k clocks: 25 28 40 3 50 77 36 45 0 0 79 31 94 65 75 71)
  ---  ------       -----         --------------------------------------------
   |     |            |                 Possible driving frequencies in MHz
   |     |            +-- Size of on-board frame-buffer RAM
   |     +-- Chip type
   +-- Server type



  Note: do this with your machine unloaded (if at all possible).
  Because X is an application, its timing loops can collide with disk
  activity, rendering the numbers above inaccurate.  Do it several times
  and watch for the numbers to stabilize; if they don't, start killing
  processes until they do.  Your mouse daemon process, if you have one,
  is particularly likely to trip you up (that's gpm for Linux users,
  mousemgr for SVr4 users).

  In order to avoid the clock-probe inaccuracy, you should clip out the
  clock timings and put them in your Xconfig as the value of the Clocks
  property --- this suppresses the timing loop and gives X an exact list
  of the clock values it can try.  Using the data from the example
  above:


  wga
          Clocks  25 28 40 3 50 77 36 45 0 0 79 31 94 65 75 71



  On systems with a highly variable load, this may help you avoid
  mysterious X startup failures.  It's possible for X to come up, get
  its timings wrong due to system load, and then not be able to find a
  matching dot clock in its config database --- or find the wrong one!


  5.4.  What these basic statistics control


  The sync frequency ranges of your monitor, together with your video
  adapter's dot clock, determine the ultimate resolution that you can
  use.  But it's up to the driver to tap the potential of your hardware.
  A superior hardware combination without an equally competent device
  driver is a waste of money.  On the other hand, with a versatile
  device driver but less capable hardware, you can push the hardware's
  envelope a little.  This is the design philosophy of XFree86.

  You should match the dot clock you use to the monitor's video
  bandwidth.  There's a lot of give here, though --- some monitors can
  run as much as 30% over their nominal bandwidth.  The risks here have
  to do with exceeding the monitor's rated vertical-sync frequency;
  we'll discuss them in detail below.

  Knowing the bandwidth will enable you to make more intelligent choices
  between possible configurations.  It may affect your display's visual
  quality (especially sharpness for fine details).


  6.  Interpreting the Basic Specifications


  This section explains what the specifications above mean, and some
  other things you'll need to know.  First, some definitions.  Next to
  each in parens is the variable name we'll use for it when doing
  calculations


     horizontal sync frequency (HSF)
        Horizontal scans per second (see above).


     vertical sync frequency (VSF)
        Vertical scans per second (see above).  Mainly important as the
        upper limit on your refresh rate.


     dot clock (DCF)
        More formally, `driving clock frequency'; The frequency of the
        crystal or VCO on your adaptor --- the maximum dots-per-second
        it can emit.


     video bandwidth (VB)
        The highest frequency you can feed into your monitor's video
        input and still expect to see anything discernible. If your
        adaptor produces an alternating on/off pattern, its lowest
        frequency is half the DCF, so in theory bandwidth starts making
        sense at DCF/2. For tolerately crisp display of fine details in
        the video image, however, you don't want it much below your
        highest DCF, and preferably higher.


     frame length (HFL, VFL)
        Horizontal frame length (HFL) is the number of dot-clock ticks
        needed for your monitor's electron gun to scan one horizontal
        line, including the inactive left and right borders.  Vertical
        frame length (VFL) is the number of scan lines in the entire
        image, including the inactive top and bottom borders.


     screen refresh rate (RR)
        The number of times per second your screen is repainted (this is
        also called "frame rate").  Higher frequencies are better, as
        they reduce flicker.  60Hz is good, VESA-standard 72Hz is
        better.  Compute it as


                  RR = DCF / (HFL * VFL)



     Note that the product in the denominator is not the same as the
     monitor's visible resolution, but typically somewhat larger.  We'll
     get to the details of this below.

     The rates for which interlaced modes are usually specified (like
     87Hz interlaced) are actually the half-frame rates: an entire
     screen seems to have about that flicker frequency for typical
     displays, but every single line is refreshed only half as often.

     For calculation purposes we reckon an interlaced display at its
     full-frame (refresh) rate, i.e. 43.5Hz. The quality of an
     interlaced mode is better than that of a non-interlaced mode with
     the same full-frame rate, but definitely worse then the non-
     interlaced one corresponding to the half-frame rate.


  6.1.  About Bandwidth


  Monitor makers like to advertise high bandwidth because it constrains
  the sharpness of intensity and color changes on the screen.  A high
  bandwidth means smaller visible details.

  Your monitor uses electronic signals to present an image to your eyes.
  Such signals always come in in wave form once they are converted into
  analog form from digitized form.  They can be considered as
  combinations of many simpler wave forms each one of which has a fixed
  frequency, many of them are in the Mhz range, eg, 20Mhz, 40Mhz, or
  even 70Mhz.  Your monitor video bandwidth is, effectively, the
  highest-frequency analog signal it can handle without distortion.

  For our purposes, video bandwidth is mainly important as an
  approximate cutoff point for the highest dot clock you can use.


  6.2.  Sync Frequencies and the Refresh Rate:


  Each horizontal scan line on the display is just the visible portion
  of a frame-length scan.  At any instant there is actually only one dot
  active on the screen, but with a fast enough refresh rate your eye's
  persistence of vision enables you to "see" the whole image.

  Here are some pictures to help:



       _______________________
      |                       |     The horizontal sync frequency
      |->->->->->->->->->->-> |     is the number of times per
      |                      )|     second that the monitor's
      |<-----<-----<-----<--- |     electron beam can trace
      |                       |     a pattern like this
      |                       |
      |                       |
      |                       |
      |_______________________|
       _______________________
      |        ^              |     The vertical sync frequency
      |       ^ |             |     is the number of times per
      |       | v             |     second that the monitor's
      |       ^ |             |     electron beam can trace
      |       | |             |     a pattern like this
      |       ^ |             |
      |       | v             |
      |       ^ |             |
      |_______|_v_____________|



  Remember that the actual raster scan is a very tight zigzag pattern;
  that is, the beam moves left-right and at the same time up-down.

  Now we can see how the dot clock and frame size relates to refresh
  rate.  By definition, one hertz (hz) is one cycle per second.  So, if
  your horizontal frame length is HFL and your vertical frame length is
  VFL, then to cover the entire screen takes (HFL * VFL) ticks.  Since
  your card emits DCF ticks per second by definition, then obviously
  your monitor's electron gun(s) can sweep the screen from left to right
  and back and from bottom to top and back DCF / (HFL * VFL) times/sec.
  This is your screen's refresh rate, because it's how many times your
  screen can be updated (thus refreshed) per second!

  You need to understand this concept to design a configuration which
  trades off resolution against flicker in whatever way suits your
  needs.

  For those of you who handle visuals better than text, here is one:


          RR                                      VB
           |   min HSF                     max HSF |
           |    |             R1        R2  |      |
  max VSF -+----|------------/----------/---|------+----- max VSF
           |    |:::::::::::/::::::::::/:::::\     |
           |    \::::::::::/::::::::::/:::::::\    |
           |     |::::::::/::::::::::/:::::::::|   |
           |     |:::::::/::::::::::/::::::::::\   |
           |     \::::::/::::::::::/::::::::::::\  |
           |      \::::/::::::::::/::::::::::::::| |
           |       |::/::::::::::/:::::::::::::::| |
           |        \/::::::::::/:::::::::::::::::\|
           |        /\:::::::::/:::::::::::::::::::|
           |       /  \:::::::/::::::::::::::::::::|\
           |      /    |:::::/:::::::::::::::::::::| |
           |     /     \::::/::::::::::::::::::::::| \
  min VSF -+----/-------\--/-----------------------|--\--- min VSF
           |   /         \/                        |   \
           +--/----------/\------------------------+----\- DCF
             R1        R2  \                       |     \
                            min HSF                |    max HSF
                                                   VB

  This is a generic monitor mode diagram.  The x axis of the diagram
  shows the clock rate (DCF), the y axis represents the refresh rate
  (RR). The filled region of the diagram describes the monitor's
  capabilities: every point within this region is a possible video mode.

  The lines labeled `R1' and `R2' represent a fixed resolutions (such as
  640x480); they are meant to illustrate how one resolution can be
  realized by many different combinations of dot clock and refresh rate.
  The R2 line would represent a higher resolution than R1.

  The top and bottom boundaries of the permitted region are simply
  horizontal lines representing the limiting values for the vertical
  sync frequency. The video bandwidth is an upper limit to the clock
  rate and hence is represented by a vertical line bounding the
  capability region on the right.

  Under ``Plotting Monitor Capabilities'') you'll find a program that
  will help you plot a diagram like this (but much nicer, with X
  graphics) for your individual monitor.  That section also discusses
  the interesting part; the derivation of the boundaries resulting from
  the limits on the horizontal sync frequency.


  7.  Tradeoffs in Configuring your System


  Another way to look at the formula we derived above is



               DCF = RR * HFL * VFL



  That is, your dot clock is fixed.  You can use those dots per second
  to buy either refresh rate, horizontal resolution, or vertical resolu-
  tion.  If one of those increases, one or both of the others must
  decrease.

  Note, though, that your refresh rate cannot be greater than the
  maximum vertical sync frequency of your monitor.  Thus, for any given
  monitor at a given dot clock, there is a minimum product of frame
  lengths below which you can't force it.

  In choosing your settings, remember: if you set RR too low, you will
  get mugged by screen flicker. Keep it above 60Hz.  72Hz is the VESA
  ergonomic standard. 120Hz is the flicker rate of fluorescent lights;
  if you're sensitive to those, you need to keep it above that.

  Flicker is very eye-fatiguing, though human eyes are adaptable and
  peoples' tolerance for it varies widely.  If you face your monitor at
  a 90% viewing angle, are using a dark background and a good
  contrasting color for foreground, and stick with low to medium
  intensity, you *may* be comfortable at as little as 45Hz.

  The acid test is this: open a xterm with pure white back-ground and
  black foreground using xterm -bg white -fg black and make it so large
  as to cover the entire viewable area.  Now turn your monitor's
  intensity to 3/4 of its maximum setting, and turn your face away from
  the monitor.  Try peeking at your monitor sideways (bringing the more
  sensitive peripheral-vision cells into play).  If you don't sense any
  flicker or if you feel the flickering is tolerable, then that refresh
  rate is fine with you.  Otherwise you better configure a higher
  refresh rate, because that semi-invisible flicker is going to fatigue
  your eyes like crazy and give you headaches, even if the screen looks
  OK to normal vision.

  For interlaced modes, the amount of flicker depends on more factors
  such as the current vertical resolution and the actual screen
  contents.  So just experiment.  You won't want to go much below about
  85Hz half frame rate, though.

  So let's say you've picked a minimum acceptable refresh rate.  In
  choosing your HFL and VFL, you'll have some room for maneuver.


  8.  Memory Requirements

  Available frame-buffer RAM may limit the resolution you can achieve on
  color or gray-scale displays.  It probably isn't a factor on displays
  that have only two colors, white and black with no shades of gray in
  between.

  For 256-color displays, a byte of video memory is required for each
  visible dot to be shown.  This byte contains the information that
  determines what mix of red, green, and blue is generated for its dot.
  To get the amount of memory required, multiply the number of visible
  dots per line by the number of visible lines.  For a display with a
  resolution of 1024x768, this would be 1024 x 768 = 786432, which is
  the number of visible dots on the display.  This is also, at one byte
  per dot, the number of bytes of video memory that will be necessary on
  your adapter card.

  Thus, your memory requirement will typically be (HR * VR)/1024 Kbytes
  of VRAM, rounded up (it would come to 768K exactly in this example).
  If you have more memory than strictly required, you'll have extra for
  virtual-screen panning.

  However, if you only have 512K on board yor video card, then you won't
  be able to use this resolution.  Even if you have a good monitor,
  without enough video RAM, you can't take advantage of your monitor's
  potential.  On the other hand, if your SVGA has one meg, but your
  monitor can display at most 800x600, then high resolution is beyond
  your reach anyway (see ``Using Interlaced Modes'' for a possible
  remedy).

  Don't worry if you have more memory than required; XFree86 will make
  use of it by allowing you to scroll your viewable area (see the
  Xconfig file documentation on the virtual screen size parameter).
  Remember also that a card with 512K bytes of memory really doesn't
  have 512,000 bytes installed, it has 512 x 1024 = 524,288 bytes.

  If you're running X/Inside using an S3 card, and are willing to live
  with 16 colors (4 bits per pixel), you can set depth 4 in Xconfig and
  effectively double the resolution your card can handle.  S3 cards, for
  example, normally do 1024x768x256.  You can make them do 1280x1024x16
  with depth 4.


  9.  Computing Frame Sizes


  Warning: this method was developed for multisync monitors.  It will
  probably work with fixed-frequency monitors as well, but no
  guarantees!

  Start by dividing DCF by your highest available HSF to get a
  horizontal frame length.

  For example; suppose you have a Sigma Legend SVGA with a 65MHz dot
  clock, and your monitor has a 55KHz horizontal scan frequency.  The
  quantity (DCF / HSF) is then 1181 (65MHz = 65000KHz; 65000/55 = 1181).

  Now for our first bit of black magic.  You need to round this figure
  to the nearest multiple of 8.  This has to do with the VGA hardware
  controller used by SVGA and S3 cards; it uses an 8-bit register, left-
  shifted 3 bits, for what's really an 11-bit quantity.  Other card
  types such as ATI 8514/A may not have this requirement, but we don't
  know and the correction can't hurt.  So round the usable horizontal
  frame length figure down to 1176.

  This figure (DCF / HSF rounded to a multiple of 8) is the minimum HFL
  you can use.  You can get longer HFLs (and thus, possibly, more
  horizontal dots on the screen) by setting the sync pulse to produce a
  lower HSF.  But you'll pay with a slower and more visible flicker
  rate.

  As a rule of thumb, 80% of the horizontal frame length is available
  for horizontal resolution, the visible part of the horizontal scan
  line (this allows, roughly, for borders and sweepback time -- that is,
  the time required for the beam to move from the right screen edge to
  the left edge of the next raster line).  In this example, that's 944
  ticks.

  Now, to get the normal 4:3 screen aspect ratio, set your vertical
  resolution to 3/4ths of the horizontal resolution you just calculated.
  For this example, that's 708 ticks.  To get your actual VFL, multiply
  that by 1.05 to get 743 ticks.

  The 4:3 is not technically magic; nothing prevents you from using a
  different ratio if that will get the best use out of your screen real
  estate.  It does make figuring frame height and frame width from the
  diagonal size convenient, you just multiply the diagonal by by 0.8 to
  get width and 0.6 to get height.

  So, HFL=1176 and VFL=743.  Dividing 65MHz by the product of the two
  gives us a nice, healthy 74.4Hz refresh rate.  Excellent!  Better than
  VESA standard!  And you got 944x708 to boot, more than the 800 by 600
  you were probably expecting.  Not bad at all!

  You can even improve the refresh rate further, to almost 76 Hz, by
  using the fact that monitors can often sync horizontally at 2khz or so
  higher than rated, and by lowering VFL somewhat (that is, taking less
  than 75% of 944 in the example above).  But before you try this
  "overdriving" maneuver, if you do, make sure that your monitor
  electron guns can sync up to 76 Hz vertical.  (the popular NEC 4D, for
  instance, cannot.  It goes only up to 75 Hz VSF).  (See ``Overdriving
  Your Monitor'' for more general discussion of this issue. )

  So far, most of this is simple arithmetic and basic facts about raster
  displays.  Hardly any black magic at all!


  10.  Black Magic and Sync Pulses


  OK, now you've computed HFL/VFL numbers for your chosen dot clock,
  found the refresh rate acceptable, and checked that you have enough
  VRAM.  Now for the real black magic -- you need to know when and where
  to place synchronization pulses.

  The sync pulses actually control the horizontal and vertical scan
  frequencies of the monitor.  The HSF and VSF you've pulled off the
  spec sheet are nominal, approximate maximum sync frequencies.  The
  sync pulse in the signal from the adapter card tells the monitor how
  fast to actually run.

  Recall the two pictures above?  Only part of the time required for
  raster-scanning a frame is used for displaying viewable image (ie.
  your resolution).


  10.1.  Horizontal Sync:


  By previous definition, it takes HFL ticks to trace the a horizontal
  scan line.  Let's call the visible tick count (your horizontal screen
  resolution) HR.  Then Obviously, HR < HFL by definition.  For
  concreteness, let's assume both start at the same instant as shown
  below:


    |___ __ __ __ __ __ __ __ __ __ __ __ __
    |_ _ _ _ _ _ _ _ _ _ _ _                |
    |_______________________|_______________|_____
    0                       ^               ^     unit: ticks
                            |   ^       ^   |
                            HR  |       |  HFL
                            |   |<----->|   |
                            |<->|  HSP  |<->|
                            HGT1         HGT2



  Now, we would like to place a sync pulse of length HSP as shown above,
  ie, between the end of clock ticks for display data and the end of
  clock ticks for the entire frame.  Why so?  because if we can achieve
  this, then your screen image won't shift to the right or to the left.
  It will be where it supposed to be on the screen, covering squarely
  the monitor's viewable area.

  Furthermore, we want about 30 ticks of "guard time" on either side of
  the sync pulse.  This is represented by HGT1 and HGT2.  In a typical
  configuration HGT1 != HGT2, but if you're building a configuration
  from scratch, you want to start your experimentation with them equal
  (that is, with the sync pulse centered).

  The symptom of a misplaced sync pulse is that the image is displaced
  on the screen, with one border excessively wide and the other side of
  the image wrapped around the screen edge, producing a white edge line
  and a band of "ghost image" on that side.  A way-out-of-place vertical
  sync pulse can actually cause the image to roll like a TV with a mis-
  adjusted vertical hold (in fact, it's the same phenomenon at work).

  If you're lucky, your monitor's sync pulse widths will be documented
  on its specification page.  If not, here's where the real black magic
  starts...

  You'll have to do a little trial and error for this part.  But most of
  the time, we can safely assume that a sync pulse is about 3.5 to 4.0
  microsecond in length.

  For concretness again, let's take HSP to be 3.8 microseconds (which
  btw, is not a bad value to start with when experimenting).

  Now, using the 65Mhz clock timing above, we know HSP is equivalent to
  247 clock ticks (= 65 * 10**6 * 3.8 * 10^-6) [recall M=10^6,
  micro=10^-6]

  Some makers like to quote their horizontal framing parameters as
  timings rather than dot widths.  You may see the following terms:


     active time (HAT)
        Corresponds to HR, but in time units (usually microseconds).
        HAT * DCF = HR.


     blanking time (HBT)
        Corresponds to (HFL - HR), but in time units (usually
        microseconds).  HBT * DCF = (HFL - HR).


     front porch (HFP)
        This is just HGT1.


     sync time
        This is just HSP.


     back porch (HBP)
        This is just HGT2.



  10.2.  Vertical Sync:


  Going back to the picture above, how do we place the 247 clock ticks
  as shown in the picture?

  Using our example, HR is 944 and HFL is 1176.  The difference between
  the two is 1176 - 944=232 < 247!  Obviously we have to do some
  adjustment here.  What can we do?

  The first thing is to raise 1176 to 1184, and lower 944 to 936.  Now
  the difference = 1184-936= 248. Hmm, closer.

  Next, instead using 3.8, we use 3.5 for calculating HSP; then, we have
  65*3.5=227.  Looks better.  But 248 is not much higher than 227.  It's
  normally necessary to have 30 or so clock ticks between HR and the
  start of SP, and the same for the end of SP and HFL.  AND they have to
  be multiple of eight!  Are we stuck?

  No.  Let's do this, 936 % 8 = 0, (936 + 32) % 8 = 0 too.  But 936 + 32
  = 968, 968 + 227 = 1195, 1195 + 32 = 1227.  Hmm.. this looks not too
  bad.  But it's not a multiple of 8, so let's round it up to 1232.

  But now we have potential trouble, the sync pulse is no longer placed
  right in the middle between h and H any more.  Happily, using our
  calculator we find 1232 - 32 = 1200 is also a multiple of 8 and (1232
  - 32) - 968 = 232 corresponding using a sync pulse of 3.57
  microseconds long, still reasonable.

  In addition, 936/1232   0.76 or 76%, still not far from 80%, so it
  should be all right.

  Furthermore, using the current horizontal frame length, we basically
  ask our monitor to sync at 52.7khz (= 65Mhz/1232) which is within its
  capability.  No problems.

  Using rules of thumb we mentioned before, 936*75%=702, This is our new
  vertical resolution.  702 * 1.05 = 737, our new vertical frame length.

  Screen refresh rate = 65Mhz/(737*1232)=71.6 Hz.  This is still
  excellent.


  Figuring the vertical sync pulse layout is similar:


     |___ __ __ __ __ __ __ __ __ __ __ __ __
     |_ _ _ _ _ _ _ _ _ _ _ _                |
     |_______________________|_______________|_____
     0                      VR              VFL     unit: ticks
                             ^   ^       ^
                             |   |       |
                             |<->|<----->|
                              VGT    VSP



  We start the sync pulse just past the end of the vertical display data
  ticks.  VGT is the vertical guard time required for the sync pulse.
  Most monitors are comfortable with a VGT of 0 (no guard time) and
  we'll use that in this example.  A few need two or three ticks of
  guard time, and it usually doesn't hurt to add that.

  Returning to the example: since by the defintion of frame length, a
  vertical tick is the time for tracing a complete HORIZONTAL frame,
  therefore in our example, it is 1232/65Mhz=18.95us.

  Experience shows that a vertical sync pulse should be in the range of
  50us and 300us.  As an example let's use 150us, which translates into
  8 vertical clock ticks (150us/18.95us 8).

  Some makers like to quote their vertical framing parameters as timings
  rather than dot widths.  You may see the following terms:


     active time (VAT)
        Corresponds to VR, but in milliseconds.  VAT * VSF = VR.

     blanking time (VBT)
        Corresponds to (VFL - VR), but in milliseconds.  VBT * VSF =
        (VFL - VR).

     front porch (VFP)
        This is just VGT.

     sync time
        This is just VSP.

     back porch (VBP)
        This is like a second guard time after the vertical sync pulse.
        It is often zero.


  11.  Putting it All Together


  The Xconfig file Table of Video Modes contains lines of numbers, with
  each line being a complete specification for one mode of X-server
  operation.  The fields are grouped into four sections, the name
  section, the clock frequency section, the horizontal section, and the
  vertical section.

  The name section contains one field, the name of the video mode
  specified by the rest of the line.  This name is referred to on the
  "Modes" line of the Graphics Driver Setup section of the Xconfig file.
  The name field may be omitted if the name of a previous line is the
  same as the current line.


  The dot clock section contains only the dot clock (what we've called
  DCF) field of the video mode line.  The number in this field specifies
  what dot clock was used to generate the numbers in the following
  sections.

  The horizontal section consists of four fields which specify how each
  horizontal line on the display is to be generated.  The first field of
  the section contains the number of dots per line which will be
  illuminated to form the picture (what we've called HR).  The second
  field of the section (SH1) indicates at which dot the horizontal sync
  pulse will begin.  The third field (SH2) indicates at which dot the
  horizontal sync pulse will end.  The fourth field specifies the toal
  horzontal frame length (HFL).

  The vertical section also contains four fields.  The first field
  contains the number of visible lines which will appear on the display
  (VR).  The second field (SV1) indicates the line number at which the
  vertical sync pulse will begin.  The third field (SV2) specifies the
  line number at which the vertical sync pulse will end.  The fourth
  field contains the total vertical frame length (VFL).

  Example:


            #Modename    clock  horizontal timing  vertical timing

            "752x564"     40    752 784  944 1088  564 567 569 611
                          44.5  752 792  976 1240  564 567 570 600



  (Note: stock X11R5 doesn't support fractional dot clocks.)

  For Xconfig, all of the numbers just mentioned - the number of
  illuminated dots on the line, the number of dots separating the
  illuminated dots from the beginning of the sync pulse, the number of
  dots representing the duration of the pulse, and the number of dots
  after the end of the sync pulse - are added to produce the number of
  dots per line.  The number of horizontal dots must be evenly divisible
  by eight.

  Example horizontal numbers: 800 864 1024 1088

  This sample line has the number of illuminated dots (800) followed by
  the number of the dot when the sync pulse starts (864), followed by
  the number of the dot when the sync pulse ends (1024), followed by the
  number of the last dot on the horizontal line (1088).

  Note again that all of the horizontal numbers (800, 864, 1024, and
  1088) are divisible by eight!  This is not required of the vertical
  numbers.

  The number of lines from the top of the display to the bottom form the
  frame.  The basic timing signal for a frame is the line.  A number of
  lines will contain the picture.  After the last illuminated line has
  been displayed, a delay of a number of lines will occur before the
  vertical sync pulse is generated.  Then the sync pulse will last for a
  few lines, and finally the last lines in the frame, the delay required
  after the pulse, will be generated.  The numbers that specify this
  mode of operation are entered in a manner similar to the following
  example.

  Example vertical numbers: 600 603 609 630


  This example indicates that there are 600 visible lines on the
  display, that the vertical sync pulse starts with the 603rd line and
  ends with the 609th, and that there are 630 total lines being used.

  Note that the vertical numbers don't have to be divisible by eight!

  Let's return to the example we've been working.  According to the
  above, all we need to do from now on is to write our result into
  Xconfig as follows:


       <name>   DCF     HR  SH1 SH2   HFL   VR  SV1 SV2 VFL



  where SH1 is the start tick of the horizontal sync pulse and SH2 is
  its end tick; similarly, SV1 is the start tick of the vertical sync
  pulse and SV2 is its end tick.

  To place these, recall the discussion of black magic and sync pulses
  given above.  SH1 is the dot that begins the leading edge of the
  horiziontal sync pulse; thus, SH1 = HR + HGT1.  SH2 is the trailing
  edge; thus, SH2 = SH1 + HSP.  Similarly, SV1 = VR + VGT (but VGT is
  usually zero) and SV2 = SV1 + VSP.



       #name    clock   horizontal timing   vertical timing    flag
       936x702  65      936 968 1200 1232   702 702 710 737



  No special flag necessary; this is a non-interlaced mode.  Now we are
  really done.


  12.  Overdriving Your Monitor


  You should absolutely not try exceeding your monitor's scan rates if
  it's a fixed-frequency type.  You can smoke your hardware doing this!
  There are potentially subtler problems with overdriving a multisync
  monitor which you should be aware of.

  Having a pixel clock higher than the monitor's maximum bandwidth is
  rather harmless, in contrast.  It's exceeding the rated maximum sync
  frequencies that's problematic.  Some modern monitors might have
  protection circuitry that shuts the monitor down at dangerous scan
  rates, but don't rely on it.  In particular there are older multisync
  monitors (like the Multisync II) which use just one horizontal
  transformer. These monitors will not have much protection against
  overdriving them.  While you necessarily have high voltage regulation
  circuitry (which can be absent in fixed frequency monitors), it will
  not necessarily cover every conceivable frequency range, especially in
  cheaper models. This not only implies more wear on the circuitry, it
  can also cause the screen phosphors to age faster, and cause more than
  the specified radiation (including X-rays) to be emitted from the
  monitor.


  However, the basic problematic magnitude in question here is the slew
  rate (the steepness of the video signals) of the video output drivers,
  and that is usually independent of the actual pixel frequency, but (if
  your board manufacturer cares about such problems) related to the
  maximum pixel frequency of the board.

  So be careful out there...


  13.  Using Interlaced Modes


  (This section is largely due to David Kastrup
  <dak@pool.informatik.rwth-aachen.de>)

  At a fixed dot clock, an interlaced display is going to have
  considerably less noticable flicker than a non-interlaced display, if
  the vertical circuitry of your monitor is able to support it stably.
  It is because of this that interlaced modes were invented in the first
  place.

  Interlaced modes got their bad repute because they are inferior to
  their non-interlaced companions at the same vertical scan frequency,
  VSF (which is what is usually given in advertisements). But they are
  definitely superior at the same horizontal scan rate, and that's where
  the decisive limits of your monitor/graphics card usually lie.

  At a fixed refresh rate (or half frame rate, or VSF) the interlaced
  display will flicker more: a 90Hz interlaced display will be inferior
  to a 90Hz non-interlaced display. It will, however, need only half the
  video bandwidth and half the horizontal scan rate. If you compared it
  to a non-interlaced mode with the same dot clock and the same scan
  rates, it would be vastly superior: 45Hz non-interlaced is
  intolerable. With 90Hz interlaced, I have worked for years with my
  Multisync 3D (at 1024x768) and am very satisfied. I'd guess you'd need
  at least a 70Hz non-interlaced display for similar comfort.

  You have to watch a few points, though: use interlaced modes only at
  high resolutions, so that the alternately lighted lines are close
  together. You might want to play with sync pulse widths and positions
  to get the most stable line positions. If alternating lines are bright
  and dark, interlace will jump at you. I have one application that
  chooses such a dot pattern for a menu background (XCept, no other
  application I know does that, fortunately). I switch to 800x600 for
  using XCept because it really hurts my eyes otherwise.

  For the same reason, use at least 100dpi fonts, or other fonts where
  horizontal beams are at least two lines thick (for high resolutions,
  nothing else will make sense anyhow).

  And of course, never use an interlaced mode when your hardware would
  support a non-interlaced one with similar refresh rate.

  If, however, you find that for some resolution you are pushing either
  monitor or graphics card to their upper limits, and getting
  dissatisfactorily flickery or outwashed (bandwidth exceeded) display,
  you might want to try tackling the same resolution using an interlaced
  mode. Of course this is useless if the VSF of your monitor is already
  close to its limits.

  Design of interlaced modes is easy: do it like a non-interlaced mode.
  Just two more considerations are necessary: you need an odd total
  number of vertical lines (the last number in your mode line), and when
  you specify the "interlace" flag, the actual vertical frame rate for
  your monitor doubles. Your monitor needs to support a 90Hz frame rate
  if the mode you specified looks like a 45Hz mode apart from the
  "Interlace" flag.

  As an example, here is my modeline for 1024x768 interlaced: my
  Multisync 3D will support up to 90Hz vertical and 38kHz horizontal.
       ModeLine "1024x768" 45 1024 1048 1208 1248 768 768 776 807 Interlace



  Both limits are pretty much exhausted with this mode. Specifying the
  same mode, just without the "Interlace" flag, still is almost at the
  limit of the monitor's horizontal capacity (and strictly speaking, a
  bit under the lower limit of vertical scan rate), but produces an
  intolerably flickery display.

  Basic design rules: if you have designed a mode at less than half of
  your monitor's vertical capacity, make the vertical total of lines odd
  and add the "Interlace" flag. The display's quality should vastly
  improve in most cases.

  If you have a non-interlaced mode otherwise exhausting your monitor's
  specs where the vertical scan rate lies about 30% or more under the
  maximum of your monitor, hand-designing an interlaced mode (probably
  with somewhat higher resolution) could deliver superior results, but I
  won't promise it.


  14.  Questions and Answers


  Q. The example you gave is not a standard screen size, can I use it?

  A. Why not?  There is NO reason whatsover why you have to use 640x480,
  800x600, or even 1024x768.  The XFree86 servers let you configure your
  hardware with a lot of freedom.  It usually takes two to three tries
  to come up the right one.  The important thing to shoot for is high
  refresh rate with reasonable viewing area. not high resolution at the
  price of eye-tearing flicker!

  Q. It this the only resolution given the 65Mhz dot clock and 55Khz
  HSF?

  A. Absolutely not!  You are encouraged to follow the general procedure
  and do some trial-and-error to come up a setting that's really to your
  liking.  Experimenting with this can be lots of fun.  Most settings
  may just give you nasty video hash, but in practice a modern multi-
  sync monitor is usually not damaged easily. Be sure though, that your
  monitor can support the frame rates of your mode before using it for
  longer times.

  Beware fixed-frequency monitors!  This kind of hacking around can
  damage them rather quickly. Be sure you use valid refresh rates for
  every experiment on them.

  Q. You just mentioned two standard resolutions. In Xconfig, there are
  many standard resolutions available, can you tell me whether there's
  any point in tinkering with timings?

  A. Absolutely!  Take, for example, the "standard" 640x480 listed in
  the current Xconfig.  It employes 25Mhz driving frequency, frame
  lengths are 800 and 525 => refresh rate   59.5Hz. Not too bad.  But
  28Mhz is a commonly available driving frequency from many SVGA boards.
  If we use it to drive 640x480, following the procedure we discussed
  above, you would get frame lengths like 812 (round down to 808) and
  505.  Now the refresh rate is raised to 68Hz, a quite significant
  improvement over the standard one.

  Q. Can you summarize what we have discussed so far?


  A. In a nutshell:


  1. for any fixed driving frequency, raising max resolution incurs the
     penalty of lowering refresh rate and thus introducing more flicker.

  2. if high resolution is desirable and your monitor supports it, try
     to get a SVGA card that provides a matching dot clock or DCF. The
     higher, the better!


  15.  Fixing Problems with the Image.


  OK, so you've got your X configuration numbers.  You put them in
  Xconfig with a test mode label.  You fire up X, hot-key to the new
  mode, ... and the image doesn't look right.  What do you do?  Here's a
  list of common video image distortions and how to fix them.

  (Fixing these minor distortions is where xvidtune(1) really shines.)

  You move the image by changing the sync pulse timing.  You scale it by
  changing the frame length (you need to move the sync pulse to keep it
  in the same relative position, otherwise scaling will move the image
  as well).  Here are some more specific recipes:

  The horizontal and vertical positions are independent.  That is,
  moving the image horizontally doesn't affect placement vertically, or
  vice-versa.  However, the same is not quite true of scaling.  While
  changing the horizontal size does nothing to the vertical size or vice
  versa, the total change in both may be limited.  In particular, if
  your image is too large in both dimensions you will probably have to
  go to a higher dot clock to fix it.  Since this raises the usable
  resolution, it is seldom a problem!


  15.1.  The image is displaced to the left or right


  To fix this, move the horizontal sync pulse.  That is, increment or
  decrement (by a multiple of 8) the middle two numbers of the
  horizontal timing section that define the leading and trailing edge of
  the horizontal sync pulse.

  If the image is shifted left (right border too large, you want to move
  the image to the right) decrement the numbers.  If the image is
  shifted right (left border too large, you want it to move left)
  increment the sync pulse.


  15.2.  The image is displaced up or down


  To fix this, move the vertical sync pulse.  That is, increment or
  decrement the middle two numbers of the vertical timing section that
  define the leading and trailing edge of the vertical sync pulse.

  If the image is shifted up (lower border too large, you want to move
  the image down) decrement the numbers.  If the image is shifted down
  (top border too large, you want it to move up) increment the numbers.


  15.3.  The image is too large both horizontally and vertically



  Switch to a higher card clock speed. If you have multiple modes in
  your clock file, possibly a lower-speed one is being activated by
  mistake.


  15.4.  The image is too wide (too narrow) horizontally


  To fix this, increase (decrease) the horizontal frame length.  That
  is, change the fourth number in the first timing section.  To avoid
  moving the image, also move the sync pulse (second and third numbers)
  half as far, to keep it in the same relative position.


  15.5.  The image is too deep (too shallow) vertically


  To fix this, increase (decrease) the vertical frame length.  That is,
  change the fourth number in the second timing section.  To avoid
  moving the image, also move the sync pulse (second and third numbers)
  half as far, to keep it in the same relative position.

  Any distortion that can't be handled by combining these techniques is
  probably evidence of something more basically wrong, like a
  calculation mistake or a faster dot clock than the monitor can handle.

  Finally, remember that increasing either frame length will decrease
  your refresh rate, and vice-versa.

  Occasionally you can fix minor distortions by fiddling with the
  picture controls on your monitor.  The disadvantage is that if you
  take your controls too far off the neutral (factory) setting to fix
  graphics-mode problems, you may end up with a wacky image in text
  mode.  It's better to get your modeline right.


  16.  Plotting Monitor Capabilities


  To plot a monitor mode diagram, you'll need the gnuplot package (a
  freeware plotting language for UNIX-like operating systems) and the
  tool modeplot, a shell/gnuplot script to plot the diagram from your
  monitor characteristics, entered as command-line options.

  Here is a copy of modeplot:



  #!/bin/sh
  #
  # modeplot -- generate X mode plot of available monitor modes
  #
  # Do `modeplot -?' to see the control options.
  #

  # Monitor description. Bandwidth in MHz, horizontal frequencies in kHz
  # and vertical frequencies in Hz.
  TITLE="Viewsonic 21PS"
  BANDWIDTH=185
  MINHSF=31
  MAXHSF=85
  MINVSF=50
  MAXVSF=160
  ASPECT="4/3"
  vesa=72.5       # VESA-recommended minimum refresh rate

  while [ "$1" != "" ]
  do
          case $1 in
          -t) TITLE="$2"; shift;;
          -b) BANDWIDTH="$2"; shift;;
          -h) MINHSF="$2" MAXHSF="$3"; shift; shift;;
          -v) MINVSF="$2" MAXVSF="$3"; shift; shift;;
          -a) ASPECT="$2"; shift;;
          -g) GNUOPTS="$2"; shift;;
          -?) cat <<EOF
  modeplot control switches:

  -t "<description>"  name of monitor            defaults to "Viewsonic 21PS"
  -b <nn>                 bandwidth in MHz           defaults to 185
  -h <min> <max>          min & max HSF (kHz)        defaults to 31 85
  -v <min> <max>          min & max VSF (Hz)         defaults to 50 160
  -a <aspect ratio>       aspect ratio               defaults to 4/3
  -g "<options>"      pass options to gnuplot

  The -b, -h and -v options are required, -a, -t, -g optional.  You can
  use -g to pass a device type to gnuplot so that (for example) modeplot's
  output can be redirected to a printer.  See gnuplot(1) for  details.

  The modeplot tool was created by Eric S. Raymond <esr@thyrsus.com> based on
  analysis and scratch code by Martin Lottermoser <Martin.Lottermoser@mch.sni.de>

  This is modeplot $Revision: 1.13 $
  EOF
                  exit;;
          esac
          shift
  done

  gnuplot $GNUOPTS <<EOF
  set title "$TITLE Mode Plot"

  # Magic numbers.  Unfortunately, the plot is quite sensitive to changes in
  # these, and they may fail to represent reality on some monitors.  We need
  # to fix values to get even an approximation of the mode diagram.  These come
  # from looking at lots of values in the ModeDB database.
  F1 = 1.30       # multiplier to convert horizontal resolution to frame width
  F2 = 1.05       # multiplier to convert vertical resolution to frame height

  # Function definitions (multiplication by 1.0 forces real-number arithmetic)
  ac = (1.0*$ASPECT)*F1/F2
  refresh(hsync, dcf) = ac * (hsync**2)/(1.0*dcf)
  dotclock(hsync, rr) = ac * (hsync**2)/(1.0*rr)
  resolution(hv, dcf) = dcf * (10**6)/(hv * F1 * F2)
  # Put labels on the axes
  set xlabel 'DCF (MHz)'
  set ylabel 'RR (Hz)' 6  # Put it right over the Y axis

  # Generate diagram
  set grid
  set label "VB" at $BANDWIDTH+1, ($MAXVSF + $MINVSF) / 2 left
  set arrow from $BANDWIDTH, $MINVSF to $BANDWIDTH, $MAXVSF nohead
  set label "max VSF" at 1, $MAXVSF-1.5
  set arrow from 0, $MAXVSF to $BANDWIDTH, $MAXVSF nohead
  set label "min VSF" at 1, $MINVSF-1.5
  set arrow from 0, $MINVSF to $BANDWIDTH, $MINVSF nohead
  set label "min HSF" at dotclock($MINHSF, $MAXVSF+17), $MAXVSF + 17 right
  set label "max HSF" at dotclock($MAXHSF, $MAXVSF+17), $MAXVSF + 17 right
  set label "VESA $vesa" at 1, $vesa-1.5
  set arrow from 0, $vesa to $BANDWIDTH, $vesa nohead # style -1
  plot [dcf=0:1.1*$BANDWIDTH] [$MINVSF-10:$MAXVSF+20] \
    refresh($MINHSF, dcf) notitle with lines 1, \
    refresh($MAXHSF, dcf) notitle with lines 1, \
    resolution(640*480,   dcf) title "640x480  " with points 2, \
    resolution(800*600,   dcf) title "800x600  " with points 3, \
    resolution(1024*768,  dcf) title "1024x768 " with points 4, \
    resolution(1280*1024, dcf) title "1280x1024" with points 5, \
    resolution(1600*1280, dcf) title "1600x1200" with points 6

  pause 9999
  EOF



  Once you know you have modeplot and the gnuplot package in place,
  you'll need the following monitor characteristics:


  o  video bandwidth (VB)

  o  range of horizontal sync frequency (HSF)

  o  range of vertical sync frequency (VSF)

  The plot program needs to make some simplifying assumptions which are
  not necessarily correct.  This is the reason why the resulting diagram
  is only a rough description. These assumptions are:


  1. All resolutions have a single fixed aspect ratio AR = HR/VR.
     Standard resolutions have AR = 4/3 or AR = 5/4.  The modeplot
     programs assumes 4/3 by default, but you can override this.

  2. For the modes considered, horizontal and vertical frame lengths are
     fixed multiples of horizontal and vertical resolutions,
     respectively:



               HFL = F1 * HR
               VFL = F2 * VR



  As a rough guide, take F1 = 1.30 and F2 = 1.05 (see ``'' "Computing
  Frame Sizes").

  Now take a particular sync frequency, HSF.  Given the assumptions just
  presented, every value for the clock rate DCF already determines the
  refresh rate RR, i.e. for every value of HSF there is a function
  RR(DCF).  This can be derived as follows.

  The refresh rate is equal to the clock rate divided by the product of
  the frame sizes:



               RR = DCF / (HFL * VFL)          (*)



  On the other hand, the horizontal frame length is equal to the clock
  rate divided by the horizontal sync frequency:



               HFL = DCF / HSF                 (**)



  VFL can be reduced to HFL be means of the two assumptions above:



               VFL = F2 * VR
                   = F2 * (HR / AR)
                   = (F2/F1) * HFL / AR        (***)



  Inserting (**) and (***) into (*) we obtain:



               RR = DCF / ((F2/F1) * HFL**2 / AR)
                  = (F1/F2) * AR * DCF * (HSF/DCF)**2
                  = (F1/F2) * AR * HSF**2 / DCF



  For fixed HSF, F1, F2 and AR, this is a hyperbola in our diagram.
  Drawing two such curves for minimum and maximum horizontal sync
  frequencies we have obtained the two remaining boundaries of the
  permitted region.

  The straight lines crossing the capability region represent particular
  resolutions. This is based on (*) and the second assumption:



               RR = DCF / (HFL * VFL) = DCF / (F1 * HR * F2 * VR)



  By drawing such lines for all resolutions one is interested in, one
  can immediately read off the possible relations between resolution,
  clock rate and refresh rate of which the monitor is capable. Note that
  these lines do not depend on monitor properties, but they do depend on
  the second assumption.

  The modeplot tool provides you with an easy way to do this.  Do
  modeplot -? to see its control options. A typical invocation looks
  like this:



               modeplot -t "Swan SW617" -b 85 -v 50 90 -h 31 58



  The -b option specifies video bandwidth; -v and -h set horizontal and
  vertical sync frequency ranges.

  When reading the output of modeplot, always bear in mind that it gives
  only an approximate description. For example, it disregards
  limitations on HFL resulting from a minimum required sync pulse width,
  and it can only be accurate as far as the assumptions are.  It is
  therefore no substitute for a detailed calculation (involving some
  black magic) as presented in ``Putting it All Together''. However, it
  should give you a better feeling for what is possible and which
  tradeoffs are involved.


  17.  Credits


  The original ancestor of this document was by Chin Fang
  <fangchin@leland.stanford.edu>.

  Eric S. Raymond <esr@snark.thyrsus.com> reworked, reorganized, and
  massively rewrote Chin Fang's original in an attempt to understand it.
  In the process, he merged in most of a different how-to by Bob Crosson
  <crosson@cam.nist.gov>.

  The material on interlaced modes is largely by David Kastrup
  <dak@pool.informatik.rwth-aachen.de>

  Nicholas Bodley <nbodley@alumni.princeton.edu> corrected and clarified
  the section on how displays work.

  Payne Freret <payne@freret.org> corrected some minor technical errors
  about monitor design.

  Martin Lottermoser <Martin.Lottermoser@mch.sni.de> contributed the
  idea of using gnuplot to make mode diagrams and did the mathematical
  analysis behind modeplot.  The distributed modeplot was redesigned and
  generalized by ESR from Martin's original gnuplot code for one case.



  The X Window User HOWTO
  by Ray Brigleb, ray@aracnet.com
  v2.0, 1 September 1999

  This document contains information on configuring the X Window envi-
  ronment for the Linux user, as well as for the beginning system admin-
  istrator attempting to sort through the many configuration options and
  details of X Window. A basic knowledge of software configuration and
  installation is assumed, as is the presence of X on the users system.
  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Other Sources Of Information
     1.2 Versions Of This Document
     1.3 Feedback And Corrections
     1.4 Acknowledgments
     1.5 Copyright

  2. Getting Started

     2.1 The X Window System: History and Architecture
     2.2 Anatomy of Your Desktop
     2.3 Invoking X Window
     2.4 The X Display Manager

  3. Choosing a Window Manager

     3.1 FVWM And Its Ancestors
     3.2 The Wide World of Window Systems
     3.3 The X Graphical Interfaces
     3.4 The X Desktop Environments
     3.5 The Flashy Window Managers

  4. Working In X

     4.1 Command Line Options
     4.2 Display Names
     4.3 XTerm Versus Rxvt, or, Know Thy Terminal Emulator

  5. X Startup

     5.1 A Sample Starting Configuration
     5.2 A More Intelligent Startup
     5.3 Getting The Windows Where You Want Them

  6. Configuring the Window Manager

     6.1 Basic FVWM2 Configuration
     6.2 Advanced FVWM2 Configuration
     6.3 FVWM2 Configuration Shortcuts
     6.4 FVWM2 Themes

  7. Fonts and Colors

     7.1 Fonts Demystified
     7.2 Font Aliases and Configuration
     7.3 Using Type 1 Fonts in X
     7.4 Using TrueType Fonts in X
     7.5 Colors

  8. The X Resources

     8.1 X Resources: The Basics
     8.2 Inside The X Resource Database With
     8.3 The Anatomy of X Resources
     8.4 Making Your Changes Last With
     8.5 Your Own User Resource Directory

  9. Clients and Application Tips

     9.1 Screen Savers for X
     9.2 Emacs and XEmacs
     9.3 Some Useful Programs and Tricks

  10. Advanced X Usage

     10.1 Libraries and Compiling X Applications
     10.2 Basic X Security
     10.3 More About X Authority

  11. Bibliography and Other Resources



  ______________________________________________________________________

  1.  Introduction

  The X Window System is an advanced, network transparent, windowing,
  graphical environment, developed at the Massachusetts Institute of
  Technology, and first released in 1984. This document assumes that you
  have installed X and it is functional. We intend to learn how to use X
  productively, not so much how to compile the programs; most Linux
  distributions come with X as an option during installation, compiled
  and ready to go.


  1.1.  Other Sources Of Information

  If you are just starting out, you may find the XFree86 HOWTO and
  XFree86 Video Timings HOWTOs to be more helpful, and you should be
  able to find that in the same place you found this. At the end of the
  document you will also find a Bibliography And Resources section, to
  find even more information. Oh, and don't forget to read the man
  pages.


  1.2.  Versions Of This Document

  New versions of this HOWTO may be periodically posted to
  comp.os.linux.help <news:comp.os.linux.help> They will also be
  uploaded to various Linux WWW and FTP sites, including Linux
  Documentation Project <http://metalab.unc.edu/LDP> web site.  The
  latest version can usually be found at
  <http://www.croftj.net/~ray/howto>, but the Metalab repository is the
  canonical distribution point.

  Changes in version 1.1 include more coverage of rxvt, expanded
  coverage of X Resources, more trivial history of X, corrected
  references to SunSite to point to MetaLab, and instructions on using
  Type 1 fonts with X.

  Changes in version 1.2 include much-requested coverage of using
  TrueType fonts in X, more details about setting up xdm, and a few more
  added resources. There is also a correction to my discussion of screen
  blanking features (thanks to Heinrich Langos for the correction!).

  Changes in version 1.3 include some fixes, info for corrupted font
  paths in some recent distributions, and lots more info about basic X
  security. I've also added some tips about KDE and an e-mail address
  update.

  Changes in version 1.4 include corrections and additions from Anthony
  J., and some very good security tips from Tomasz Motylewski.

  Changes in this version (2.0) includes corrections from Guus Bosch,
  Brian J. Miller, and myself, as well as lots of new updates and info,
  and a plea for a new maintainer!



  1.3.  Feedback And Corrections

  If you have questions or comments about this document, please feel
  free to email Ray Brigleb at my current (ray@aracnet.com) or
  ``permanent'' (rayola@mindless.com) address. I readily welcome any
  suggestions or criticisms. If you find any mistakes with this
  document, please let me know so I can correct them in the next
  revision. If you have information you would like to see in future
  revisions, or you would like to contribute to a future revision, drop
  me a line.  I'm also looking for more resources to add to the sections
  and bibliography.  While we're at it, I'm also looking for someone
  interested in taking over maintenance of this document, please let me
  know if you're interested.  I think another maintainer might be able
  to breathe life into this project that I have not had as of late, and
  judging from the feedback I receive this is still a very viable and
  useful text.


  1.4.  Acknowledgments

  A special thanks to the HOWTO coordinator Tim Bynum for help and
  suggestions, and the XFree86 Group for the man pages and help files
  that come with XFree86.  I really need to thank all of those who have
  written documentation and descriptions of their offerings in the past,
  I have just gleaned a selection of the most relevant items from their
  material for this document. Also, thanks are due to Matt Chapman,
  author of the Window Managers Guide website, and Scott Scriven, for
  the FVWM2 Themes tips and tricks I stole from some of his hacks.
  Thanks are also due to Joe Croft for the Internet service, invaluable
  to the ongoing development of this HOWTO, and Claire Galper, for moral
  support and miscellaneous tips. Last but not least, thanks to the
  whole GNU/Linux community, for everything, and Mr. Stallman, for this
  text editor (and philosophy).


  1.5.  Copyright

  Copyright (c) 1998, 1999 by Ray Brigleb.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator for more information.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would very much like to be notified of any
  plans to redistribute the HOWTOs, this one in particular!

  Many of the terms mentioned in this document are trade names. Unless
  otherwise stated, all trademarks are property of their respective
  owners.



  2.  Getting Started



  2.1.  The X Window System: History and Architecture

  The X Window System was developed in the Laboratory for Computer
  Science at the Massachusetts Institute of Technology, as part of
  project Athena in cooperation with DEC, and first released in 1984.
  The project lead of the main development was Robert Scheifler, and the
  origins of X owe much debt to the ``W'' Windowing package, developed
  by Paul Asente at Stanford. In September of 1987, MIT issued the first
  release of the X11 that we know and use today. As of X11R2, control
  passed from MIT to the X Consortium, formed in January of 1988.

  Many of the ideas that went into X Window also came from research at
  Xerox Corporation's Palo Alto Research Center (PARC), where they were
  working on computers like the Parc and the Star in the late seventies.
  None of these computers made it to market, but when Xerox demonstrated
  a window system custom built to run Smalltalk 80, people were hooked.
  These series of three computers demonstrated the WIMP (Windows, Icons,
  Menus, Pointer) interface so well that it spawned a revolution in
  computing almost overnight. Within a few years many computer users got
  a taste of a windowing system of some kind, and you might say they
  never looked back.

  X Window is currently developed and distributed by the X Consortium,
  however, a liberal license permits the existence of free and low-cost
  implementations.  The version of X used on Linux is XFree86. XFree86
  is a collection of X servers for UNIX-like OSs on Intel x86 platforms.
  The work is derived from X386, and much of it is contributed back into
  X11R6 thereafter. We can think of XFree86, for all intents and
  purposes, to be X Window for Linux, unless you have purchased another
  X server.

  X Window is built upon a great many toolkits, or libraries. It is
  built upon the X Toolkit Intrinsics and the Athena Widgets. Many
  programs use XView or Motif tools. More still are part of a newer,
  unified windowing and communication system, like GNOME or KDE. If you
  find many of your programs not compiling, or are getting strange and
  inexplicable errors, you may wish to make sure that you have installed
  X correctly, because most of these libraries (with the exception of
  Motif) are free and most likely preinstalled with X on your system.

  And remember, it's called X Window, not X Windows!


  2.2.  Anatomy of Your Desktop

  There are a few basic principles and terms you should familiarize
  yourself with to make using X much more straightforward. These terms
  will appear over and over again in the manual pages and help files,
  which it is suggested that you consult whenever necessary.

  The screen is your whole ``desktop'', and the words may be used
  interchangeably.  Technically it means the primary video display you
  view X with, and you can have more than one screen, in fact you can
  have more than one computer running off a single X server. This is
  beyond the scope of this humble document, but you should be aware of
  the distinction.

  The root window is the background of your screen. It is referred to a
  window in name alone, it does not behave like any other window, but
  rather you run your applications on the root window, or put a picture
  on it, or just a solid color.

  The window manager is the main interface between the X Window system
  and the user. Without the window manager, the system would be rather
  difficult to use, and would certainly not be a very productive tool.
  The window manager provides such functionality as window borders,
  menus, icons, virtual desktops, button bars, tool bars, and allows the
  user to customize it at will, often adding to its functionality in the
  process.

  The pointer is the arrow or indicator of any given shape which
  represents the location your mouse (or other pointing device)
  corresponds to on the screen.  The pointer often changes to give you
  contextual feedback as to what will happen when you use the mouse at
  that point on the screen.

  The window is a frame in which any given application resides which is
  ``managed'' by the window manager. This includes pretty much anything
  except the so-called root window. Even windows which do not appear to
  have frames, titles, or normal borders of any kind are being managed
  by your window manger. The active window is the window you are
  currently using, the window that will receive text when you type, and
  is traditionally denoted by the fact that your mouse cursor is
  pointing at it, though this is not always the case. The active window
  is said to have ``focus,'' the rest of the windows on your display
  being ``unfocused.''

  Menus and icons behave in X similar to the way they behave in other
  windowing systems, and the same general principles apply. Windows with
  text only are called terminal emulators, an example would be xterm,
  and these basically emulate a console text-only display, but let you
  multiplex and use more than one at a time, and have many other
  advantages available due to their being used in X. We shall discuss
  many of these later on.


  2.3.  Invoking X Window

  Starting X can be done in several ways. On your system it may be set
  up to start automatically, and you will not need to read this section.
  Most Linux systems, however, presently start at the command line upon
  login, and you have to decipher this for yourself.

  The most basic way to start X is with xinit. This will put you at a
  blank desktop, by default, and with no window manager loaded. If no
  client program is specified on the command line, xinit will look for
  the .xinitrc file to run as a shell script, to start up client
  programs. If this file does not exist, xinit will use the following
  command as a default:



        xterm -geometry +1+1 -n login -display :0



  As you see, this is not very helpful. The most common way to start X
  is with the command startx. This is the most civilized fashion to
  start the windowing system, but requires that you log in from a text
  shell, and start the windowing system yourself. For many Linux users
  this is the most common way to start X, it is also the most flexible.
  You can issue commands such as the following:



   startx -- -bpp 8    #start x in 256 color mode
   startx -- -bpp 32   #start x in true color mode



  The double dashes pass arguments directly to xinit, and this way you
  can start up X in the resolution your work will require, and still
  have it use the configuration files we will cover later in this
  document.


  2.4.  The X Display Manager

  The program xdm provides similar services to  getty and login, which
  allow users to log into a  system and start their basic shell. If you
  start X with xdm,  however, users need only to type in their username
  and password at a  friendly prompt, and they are dropped directly into
  the graphical  environment. This is simple and easy to use, and is
  seen frequently  in college campuses, cyber cafes, business
  environments, anywhere you  have users not necessarily familiar with
  Unix to any great extent.

  xdm can be configured with configuration  files located in
  /usr/X11R6/lib/X11/xdm on your Linux  system. The file xdm-config is
  for configuring how the  login screen appears to users, and Xsetup_0
  is used to tell   xdm what programs should be launched when X is
  started. Some of the  configuration a normal user would put in their
  .xinitrc file  should go in here, if xdm is to be normally used.

  Here is a sample Xsetup_0 file to look at, which might help to
  configure your system. The xfstt program is the TrueType font server,
  and is discussed later in  this document. Also, notice that we're
  using a shell script here, and it's trying to call xv to set the
  background to a nice picture (instead of the boring black and white
  background pattern), and if that call fails, xsetroot is called, to at
  least try to set the background to a nice blue color.



        #!/bin/sh
        xconsole -geometry 480x100-0-0 -daemon -notify -verbose -fn \
        '-schumacher-clean-medium-r-*-*-10-*-*-*-*-*-*-*' -exitOnFail
        /usr/X11R6/bin/xfstt &
        /usr/X11R6/bin/xv -quit -root                               \
        /usr/local/share/WindowMaker/Backgrounds/InDreams.jpg       \
        || xsetroot -solid darkblue
        xset fp+ unix/:7100



  Many distributions of Linux include this facility automatically.  If
  you are able to look at the run levels for your Linux system, you can
  probably see that run level 3 is the normal startup (look under
  /etc/rc.d) unless you're booting into something like xdm.  If you are,
  you're going to be starting in run level 5.  This is something of a
  standard on Linux (and similar) systems.  Programs such as linuxconf
  and its functional equivalents should be able to adjust this.

  Also on many newer Linux systems are facilities such as gdm and kdm,
  which are GNOME and KDE aware equivalents of this program.  Primarily,
  this just changes the look and feel to suit your desktop preferance,
  but often these other versions contain more features, such as
  remembering which desktop environment you last logged in to, the
  ability to shutdown and reboot from the console, and so forth.


  3.  Choosing a Window Manager

  This is a discussion of the window managers available to the X Window
  user, with a comparison of some finer ones to choose from. In order to
  prevent this document from becoming overwhelmingly large (and
  proportionally difficult to maintain, as well) I am limiting the
  discussion to the more popular and well known window managers out
  there. I believe these are most representative for our purposes, and
  once you grasp the basic concepts of a few, you more or less will have
  the hang of them all.

  Your choice of window manager can dramatically influence how pleasant
  your computing experience will be. You spend much of your time dealing
  with windows when you're in X, and you don't want something that's too
  obtrusive, one that will get in your way. Some window managers are
  extremely customizable, to the point that you can pretty much feel
  like it's a new operating system. If you don't like icons, get rid of
  them! If you miss that toolbar, you can build a better one, and it can
  be a pretty painless and rewarding process besides.


  3.1.  FVWM And Its Ancestors

  The most common window managers nowadays have their roots in Robert
  Nation's FVWM window manager. These include FVWM, FVWM2, FVWM95, and
  many more. FVWM itself is derived partly from TWM, which comes with an
  X Window installation, but which we will not cover here.  The syntax
  and usage of TWM is similar to FVWM, but it actually uses more memory,
  and feels clumsy and awkward to most users.

  FVWM is the original and old standby favorite Linux window manager.
  Now that the 2.0 of versions of FVWM have become stable and in more
  general usage, this newer version is preferred, for the syntax is much
  more direct and simplified, and much more flexible as well. However,
  many people still have the original FVWM on their systems, as it has
  been a long time favorite and standard, and most of the examples in
  this text are equally applicable to this older version. And if the
  older one is working fine for you, there may be no need to upgrade,
  since it may break your configuration files to some degree, for some
  of the syntax has indeed changed, and is not altogether backward
  compatible. Such is the nature of progress.

  Nobody seems quite sure what F in FVWM stands for (not even the
  author, from what I can tell!), but the VWM would seem to (correctly)
  indicate Virtual Window Manager, and indeed the FVWM series are
  virtual window managers, and that is one of their strengths. You can
  bind keys to any function, including the switching between the virtual
  desktops, and do this with ease.

  FVWM2 is the new standard, including many improvements and features
  not found in the previous version. Unlike many newer window managers,
  it works just fine on 8-bit, 256 color displays, which I am using at
  the moment, and still can be improved with little icons and gradients,
  to look as much like the Win98 interface as you may or may not want.
  This version is also much more extensible in general, and allows the
  use of themes and dynamic menus. Technically, FVWM2 is still in beta,
  but it works just great, and I have not yet had a single problem with
  it.


     Resources:
        The official FVWM and FVWM2 site is
        <http://www.hpc.uh.edu/fvwm/>.  The latest version should always
        be available at  <ftp://ftp.hpc.uh.edu/pub/fvwm/>.


  3.2.  The Wide World of Window Systems

  For users more familiar with other window environments on other
  operating systems, there are plenty of window managers to emulate the
  desktop you're accustomed to.

  The icewm <http://berta.fri.uni-lj.si/~markom/icewm> window manager is
  aimed at a more consistent look and feel, and can emulate many other
  windowing system standards, hot key bindings, and such.  The OS/2
  emulations are particularly nice.  AmiWM
  <http://www.lysator.liu.se/~marcus/amiwm.html> is an Amiga Workbench
  type window manager, mlvwm <http://www.bioele.nuee.nagoya-
  u.ac.jp/member/tak/mlvwm.html> is a MacOS emulator. A nice addition to
  these window managers is dfm <http://www-c.informatik.uni-
  hannover.de/~kaiser/dfm/dfm.html>, a desktop and file manager that
  pleasantly resembles the OS/2 Workplace Shell.


     Resources:
        The Window Managers website can be found at
        <http://www.PLiG.org/xwinman/>, and is a consistently good
        resource for finding out about the variety of window managers
        available, particularly for finding good window managers to
        emulate other windowing environments. Many more still are listed
        at  <http://www.PLiG.org/xwinman/others.html>, provided by the
        same author as the previous link, and this is quite a formidable
        and complete list indeed. You can download Linux versions of
        most popular window managers at the metalab
        <ftp://metalab.unc.edu/pub/Linux/X11/window-managers> archive.


  3.3.  The X Graphical Interfaces

  Open Look and Motif were early attempts to standardize X Window, and
  make it usable in more mainstream environments, around a greater
  variety of workstations. Both were somewhat successful at those
  attempts (in look and feel, if not politically) and can be used under
  a modern Linux system.  Both require specific libraries, which can be
  used to compile a variety of applications specifically designed for
  one or the other environment, to give all programs a similar look and
  feel.

  Starting with X11 Release 5, Sun Microsystem's OpenWindows graphical
  interface was available to X users. This includes two versions of the
  Open Look Window Manager, olwm and olvwm (with a virtual desktop).
  This was developed by Sun in hopes of making a standard windowing
  environment, and indeed it was standard with Solaris for many years.
  If your distribution of Linux did not come with this windowing system
  installed, you must remember to install the XView libraries to get it
  to work, and you will also have to put the /usr/openwin/...
  directories in your search path.

  If you want the actual OSF/Motif Toolkit for Linux, you'll have to
  pay, the programs and toolkit are not free. However, the Hungry
  Programmers have written LessTif, which allows you to compile Motif
  programs more or less as if you owned to toolkit. LessTif is a clone
  of the Motif toolkit. Currently LessTif is partially implemented with
  most of the API in place. Many programs already work under this free
  version of the toolkit, and it even comes with a window manager,
  derived from FVWM code, which you'd swear was the Motif Window
  Manager.

  The most useful feature of this toolkit, however, is compiling
  programs dependent on having a Motif library on your system. The
  window manager is nothing spectacular, and mostly useful if you're
  migrating from the original Motif, and want to keep your configuration
  file. For all intents and purposes, you will find FVWM much more
  feature-filled and useful, and it looks and behaves almost
  identically, even recognizing the window hints supplied by programs
  built with the Motif toolkit.


     Resources:
        The Hungry Programmers LessTif can be found at
        <http://www.lesstif.org/>.


  3.4.  The X Desktop Environments

  The second generation of Linux window managers was brought about by
  KDE, and soon joined by GNOME. There are some striking similarities,
  and some great differences, between these two, and I will attempt to
  cover them here. The most important thing to remember at this point is
  that neither of them is in any way a complete product. Both are at the
  start of a long development cycle, and not completely stable yet, and
  as such are not suited to mission-critical work at this time.

  The KDE Desktop Environment

  (A quote from the home page:) ``KDE is a completely new desktop,
  incorporating a large suite of applications for Unix workstations.
  While KDE includes a window manager, file manager, panel, control
  center and many other components that one would expect to be part of a
  contemporary desktop environment, the true strength of this
  exceptional environment lies in the interoperability of its
  components.''

  The KDE Desktop Environment is an attempt to make a desktop
  environment, not just a window manager. The tools of KDE work together
  so well, for instance, one might be fooled into thinking KDE was an
  entire operating system. All the tools to work in a windowing system
  are included, and many more have been ported to the KDE environment.
  KDE has achieved a surprising level of maturity already, but many are
  reluctant to install it on their desktop, because of the licensing
  stipulations of the QT toolkit, upon which KDE is based. This has
  changed a little lately, and the licence now qualifies as Open Source
  by definition, but is not the same as that of GNU software.

  For those just looking to get down to business, KDE is often the way
  to go.  This project has been around for some time now, and has let go
  of some flashiness for the ability to get lots done.  In many ways you
  can become fooled into thinking you're using a product strikingly
  similar to the good parts of Windows.  Which can be a good thing.  But
  it can also be somewhat frustrating, and one longs after a while for
  something a little different from the paradigm upon which KDE is
  firmly based.

  GNOME: The GNU Object Model Environment

  (A quote from the home page:) ``GNOME stands for GNU Network Object
  Model Environment. The GNOME project intends to build a complete,
  user-friendly desktop based entirely on free software. GNOME is part
  of the GNU project, and GNOME is part of the OpenSource(tm) movement.
  The desktop will consist of small utilities and larger applications
  which share a consistent look and feel. GNOME uses GTK+ as the GUI
  toolkit for all GNOME-compliant applications.''


  The GNOME project is an attempt to do much of the same work as KDE,
  but even a little more than that. GNOME is less tied to one window
  manager, for instance, and it is interoperable not just between
  applications, but computers and platforms, as it uses the Common
  Object Resource Broker Architecture (CORBA).  Also, and to many most
  importantly, GNOME is based on the GTk+ toolkit, which is free and
  open source, unlike the underlying toolkit of KDE, thereby following
  in the philosophy of Linux itself.


     Resources:
        The official KDE website is  <http://www.kde.org/>. The official
        GNOME website is  <http://www.gnome.org/>. More detailed
        information regarding the issues surrounding GNOME can be found
        at  <http://www.gnome.org/gnomefaq/FAQ.txt>.  The home page of
        CORBA is located at  <http://www.corba.org/> , and the GTk+
        toolkit home is  <http://www.gtk.org/> .


  3.5.  The Flashy Window Managers

  The latest generation of window manger is very very pretty indeed.
  Sporting every convenience you could think of, and emulating the most
  beautiful operating systems ever used on the most gorgeous
  workstations in the world, these are the window managers to run if
  you've got the memory and CPU cycles to burn.

  Window Maker

  (A quote from the home page:) ``Window Maker is an X11 window manager
  designed to give additional integration support for GNUstep
  applications. It tries to emulate the elegant look and feel of the
  NEXTSTEP(tm) GUI. It is relatively fast, feature rich, and easy to
  configure and use.''

  A big strength of this window manager is that it supports the GNU
  desktop, meaning that it makes a great and very pretty front-end to
  GNOME. This is also one of the most easily configurable window
  managers, and can be configured from a graphical interface, and
  supports the OffiX drag and drop protocol, easy switching of desktop
  themes, and it's now available within the popular Red Hat
  distribution, so it's easy and painless to switch from FVWM when the
  mood finally strikes. As of the 0.50 release, Window Maker supports
  KDE compliance as well.

  AfterStep

  (A quote from the home page:) ``AfterStep is a Window Manager for X
  which started by emulating the NEXTSTEP look and feel, but which has
  been significantly altered according to the requests of various users.
  Many adepts will tell you that NEXTSTEP is not only the most visually
  pleasant interface, but also one of the most functional and intuitive
  out there. AfterStep aims to incorporate the advantages of the
  NEXTSTEP interface, and add additional useful features.  The
  developers of AfterStep have also worked very hard to ensure stability
  and a small program footprint.''

  Enlightenment

  Enlightenment is more than just a window manager, it is an extreme,
  detailed, and configurable environment, and is particularly attractive
  in that it allows irregular and completely customizable window shapes.
  It is open in design, and instead of dictating a policy it allows the
  user to define their own policy right down to the minute and
  infinitesimal details; from its functionality right on through to its
  looks.
  If you are using GNOME, you will find that Enlightenment is the
  default window manager, and in fact, it must be installed for GNOME to
  function.  It is also basically the de facto implementation of the
  GNOME features for integration, making it the most practical choice
  for a desktop in that situation.  Many other window managers will work
  alright with GNOME, but you will find that Enlightement excels.
  Unfortunately, it is still in development, and runs slowly and
  imperfectly from time to time.


     Resources:
        The official Window Maker website is
        <http://www.windowmaker.org/>. The official AfterStep website is
        <http://www.afterstep.org/>.  Enlightenment can be found,
        somewhat predictably, at  <http://www.enlightenment.org/>.


  4.  Working In X

  In this section we will become familiar with running clients in X
  Window and the basic procedures involved in using the system. X is not
  an intuitive interface on its own, and without any window manager, it
  is easiest to use as a display for programs started from the command
  line. One of the most common uses for X is just to have several xterm
  windows open at the same time. Not exactly maxing out the graphics
  capabilities of the computer, but it's a nice feature to start with.

  The flexibility and usefulness of the command line is so great, in
  fact, that you don't really need a window manager. It's nice, and you
  will want it very quickly, but the fact is that you can get by without
  one, just the command line and the mouse. If you give it a shot,
  you'll be surprised as to the exact distinctions between the clients
  and the window manager. If you start toying around with this, however,
  remember that the key combination Ctrl-Alt-Backspace gets you out of X
  Window in a pinch.


  4.1.  Command Line Options

  Most X programs try to use the same basic names for command line
  options.  All applications written using the MIT X Toolkit Intrinsics
  automatically accept the following options:



     -display display
        This option specifies the X server to use. See the section on
        Display Names for details.


     -geometry geometry
        The initial size and location of the window, in a format such as
        widthxheight+hoffset+voffset or +hoffset-voffset. Note that if
        you put in a negative horizontal or vertical offset, the window
        will be placed counting backward from the right or the bottom of
        the screen, respectively.


     -font font
        The font to use for displaying the text in your window.


     -bg color
        The color to use for the window background.


     -fg color
        The color to use for the window foreground.


     -name resource-name
        Useful for specifying the name under which the resources for
        this application will be found. This is useful to distinguish
        between invocations of the same application, for example, two
        xterms can be named differently so that they may inherit
        different resources based upon those names in the resource
        database.


     -title string
        This is the title to be used for the window on your display,
        generally used by the window manager to put a descriptive title
        at the top of the window. Not to be confused with the -name
        option.


     -iconic
        Invoke window as an icon.


     -xrm resource-string
        This option specifies a resource name and value to override any
        defaults that may already be set. Also useful for setting X
        resources that do not have explicit command line options. For
        instance, the command line xterm -xrm "xterm*background: blue"
        is functionally identical to typing xterm -bg blue.



  4.2.  Display Names

  Every X Server has a display name of the form:

  hostname:displaynumber.screennumber

  The hostname specifies the name of the machine to which the display is
  actually, physically connected. The hostname can be omitted, and if
  so, the server on the same machine will be chosen. In fact, if you are
  the only one using X on your computer, you will want to just leave
  this off of your display specifications. The displaynumber should
  probably be zero, this is used if the X Server is controlling more
  than one keyboard and monitor unit, for instance, a network of X
  terminals. The screennumber specifies which monitor in a multiple
  monitor setup should be used. Following this specification, you would
  open an xterm window on your local machine with the option -display
  :0.0. You can see that we have omitted the hostname from the option,
  so the current machine is assumed.

  On Linux systems, your DISPLAY variable holds your display name, which
  on my system is :0.0. This is usually set by xterm, or one of the
  scripts that starts X Window for you, although you can set it
  yourself, or as discussed above, use the -display command line option
  when invoking your application.

  If you have opened an xterm or rxvt window, and then opted to do
  super-user work via the su command, you will find that if you try to
  launch an X application you will have no display to launch it on.
  Silly it seems, because you are sitting right in front of your
  display, but the trick to getting this to work is to pass an option on
  the command line to the program such as -display :0.0, and it will
  work fine.

  4.3.  XTerm Versus Rxvt, or, Know Thy Terminal Emulator

  Your choice of terminal emulator can affect your experience in X
  almost as much as your window manager, so a little discussion of your
  best options is due here. A terminal emulator is a program such as
  xterm, discussed above, which lets you emulate the simple console of
  Linux in X. You will rely heavily on the program you choose, so it
  pays to choose it wisely to begin with.

  If you have a slow video card, the first thing you should consider
  doing is switching to rxvt. Using xterm is a good starting point,
  mainly because it comes standard with all X distributions, but it's
  not always the best choice. It contains a lot of legacy code, and is
  quite bloated for a simple terminal emulator. This is partly due to
  the fact that it's not just a plain text terminal emulator, but also
  emulates graphics modes that you simply will never use. Because of
  this, you may wish to switch to rxvt, and also because xterm can be
  extremely slow. I'm not sure why it's so slow, but if you have a slow
  video card you'll know what I mean, and you'll be amazed at the
  difference when you dump xterm.

  Some other perks of rxvt include pixmap backgrounds, and a much nicer
  scrollbar. If you specify the -pixmap option on the command line (and
  have support compiled in to your version!) you will get any .xpm-type
  picture in the background. A very cool feature, and it surprisingly
  doesn't slow down your output at all, it still redraws faster than
  your xterm window. Give it a shot, I haven't seen it around lately but
  I think it can be found on metalab.


  5.  X Startup

  We will presume for the following examples that we have picked a
  fairly stable window manager, such as FVWM2, to try out some sample
  configurations.  I would suggest giving that a shot for the purpose of
  learning these topics, as most of what you will learn here and in the
  following sections will apply to any window manager out there, but the
  topics seem most easily picked up using FVWM2.


  5.1.  A Sample Starting Configuration

  Our first step is to write ourselves an initialization file for X
  itself.  This file can be either a system-wide file, in which case it
  would likely be placed in /var/X11R6/lib/xinit/xinitrc, or it can be
  overridden on a per-user basis by placing the file .xinitrc in your
  home directory. Generally, it is expected that there will be a basic,
  default file in the system-wide location, possibly enforced if
  necessary for security reasons, but otherwise users will probably wish
  to configure the file themselves.

  First let's create a file in your home directory called .xinitrc. Open
  up your ``favorite'' text editor, and paste the following, or
  something like it, in that file:



   #!/bin/sh

   # if your backspace and delete are reversed, try this:
   xmodmap -e "keysym BackSpace=Delete" -e "keysym
  Delete-BackSpace"

   xsetroot -solid darkslateblue

   # start some basic applications
   xclock -geometry 96x96+2+2 -bg grey40 -fg black -hl white &
   xload -geometry 120x96+2+147 -bg grey40 -fg white -hl darkred -update 4
  &
   xterm -sb -ls -geom 80x25-2+2 -title "shell" &
   xterm -sb -ls -geom 80x25-2-2 &

   # start the window manager
   /usr/X11R6/bin/fvwm2



  There are plenty of things to learn from this example. First of all,
  this file will be a shell script, as indicated by the first line. The
  xsetroot command on the second line turns the background of our
  desktop to a pleasant blue color, not a bad idea if we're going to be
  staring at that color predominantly all day.

  The third and fourth lines are some programs that I like to leave
  running while I'm fast at work. You'll notice that some of the options
  make for a nicer setup, for example, specifying the colors and
  geometry (location on screen).  I'll give you some tips for figuring
  this stuff out in a bit. The fifth and sixth lines follow similarly,
  opening up two handy xterm windows for us, which we will no doubt be
  needing soon.

  The last line is very important--it is this line that starts up your
  window manager! Notice that the only commands we did not run as
  background processes (by putting the & at the end) were xsetroot,
  xmodmap, fvwm2. With these first two it doesn't matter, as the
  programs exit immediately. But all the rest of the programs have to be
  in the background, otherwise when you closed one, it would kill your X
  Window session. That would not be very pleasant, nor very expected. As
  shown above, when you close fvwm2, you exit X.


  5.2.  A More Intelligent Startup

  We can add lots to our primitive example of a startup file. For
  instance, this is a good way to warn yourself when you may have
  carelessly stared X as the root user.  Red Hat users seem to do this
  often, for many of the configuration programs which must be run as
  root, must also be run in X.  You can avoid this by issuing an su
  command to become root during your normal X user session, and then
  calling the program you need to run as root with the option -display
  :0.0 discussed above.



   # change background color for root
   if [ "$USER" = "root" ];
   then
        xsetroot -solid darkred
   else xsetroot -solid darkslateblue
   fi



  This will check to see if you are the user named root, and if you are,
  it will set the background to a harsh red, rather than the usual
  friendly blue, to warn you. This next bit of code, also intended for
  your .xinitrc file, will merge in your user-specific and system-wide
  resources, first checking to be sure the files exist.



        userresources=$HOME/.Xresources
        usermodmap=$HOME/.Xmodmap
        sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
        sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap
        # Merge in defaults and keymaps
        if [ -f $sysresources ]; then
           xrdb -merge $sysresources; fi
        if [ -f $sysmodmap ]; then
           xmodmap $sysmodmap; fi
        if [ -f $userresources ]; then
           xrdb -merge $userresources; fi
        if [ -f $usermodmap ]; then
           xmodmap $usermodmap; fi



  5.3.  Getting The Windows Where You Want Them

  Placing everything on your screen by guesswork with the -geometry
  option can get very tedious indeed. Particularly when you consider
  that you can specify the -geometry option to pretty much any program
  you can run in X. This allows a great precision in tuning the
  interface, but that's a heck of a lot of options to set, indeed.

  This brings up one very nice feature of the FVWM window managers. By
  default, when you move a window around the screen, you see the
  geometry specification appear on the screen. Go ahead, try moving a
  window around with the left button.  Now try resizing it. As you can
  see, you can get some primitive specifications this way. However, even
  this method can be a little difficult, and it would be nice to have
  all the details about your window in one concise list.

  It is at this point that we will introduce the program xwininfo. To
  use this program, go to an xterm window and type in that program name.
  It will ask you to click on another window that you want information
  about, and after you click it will dump out useful information that it
  knows about that window.  This is useful for plugging information
  about windows once you have them set up how you want them on your
  screen - run this program, then click on the window, then put in those
  parameters in your startup file, and your window system will
  henceforth be frozen in a pristine state of immaculate precision.



  6.  Configuring the Window Manager

  Now we take a look at the files to configure your window manager.
  These vary from manager to manager, but for our examples we will focus
  on the per-user files, and we are looking at FVWM2 in this example, so
  you will modify the file .fvwm2rc in your home directory.


  6.1.  Basic FVWM2 Configuration

  Configuring your window manager resource file in earlier versions of
  FVWM was a rather arduous process, because the order of the items in
  the file needed to be very particular, but that has relaxed quite a
  bit in this version. To my knowledge, the only crucial part of the
  ordering is the bindings for the menus, but we'll cover that a bit
  later. Your FVWM2 installation should have come with an example
  resource file, and you should be able to find that in
  /var/X11R6/lib/fvwm2/system.fvwm2rc. This is the default system-wide
  configuration file. A good idea would be to copy that file into your
  home directory and call it .fvwm2rc. From that point on, when FVWM2
  starts up it will read the file in your home directory, and ignore the
  system-wide configuration file.

  Now that you've got a working, personalized copy of the window manager
  resource file in your home directory, open it in your favorite text
  editor, and take a look at it. If you're in X at the moment, you can
  see the correlation between the file and what you see on your desktop.
  Very helpful indeed. Let's try changing something and see if we can
  make it look a little better. Probably the first entry in your file
  (that is not followed by the # comment character) is the WindowFont
  entry, followed by a very bizarre font name. If you want to figure out
  how to set up the fonts and colors to their fullest, skip ahead to the
  next section on X Fonts and Colors.


  6.2.  Advanced FVWM2 Configuration

  Configuring FVWM2 can get incredibly subtle and complex. Take this
  code snippet from the fvwm2gnome setup for the .fvwm2rc file:



        # import config files

        Echo -Styles-
        Read .fvwm2gnome/config/styles/app.styles
        Read .fvwm2gnome/config/styles/window.styles

        Echo -Buttons & Keys-
        Read .fvwm2gnome/config/buttons.config



  This is an example of a way to read in other configurations. In this
  fashion you can modularize your .fvwm2rc -- not a bad idea,
  considering how jumbled one huge configuration file can become. This
  can make it easier to change and to debug, and it also makes it easier
  to configure so-called themes, which we will cover in a moment.


  6.3.  FVWM2 Configuration Shortcuts

  A really neat way to configure your script for FVWM2 (and FVWM, and
  bash, and a whole lot of other programs besides!) is to use the
  Dotfile Generator, by Jesper K. Pedersen, available from
  <http://www.imada.ou.dk/~blackie/dotfile/>.  You will need to have a
  recent version of Tcl/Tk installed (available with most Linux
  distributions). This program starts with a configuration preset, or
  takes the one you presently have, and allows you to tweak it via many
  structured menus of options.

  Be warned, however, for I advise learning how to set up your
  configuration file yourself! Not only is this the Unix Way (for what
  that's worth) but it's much easier to make small and incremental
  changes to your .fvwm2rc file that way, and get things exactly how you
  like them. Also, being a Tcl/Tk program, it's a little slow.
  Nevertheless, if you want a painless way to start with a decent
  configuration, this is definitely worth a shot.


  6.4.  FVWM2 Themes

  Among the many new possibilities of FVWM2 are something commonly
  called themes. This basically means that you can switch between a
  basic look for all of your windows on your desktop, on the fly. Note
  that if you've made the distinction between the functions of the
  window manager and the functions of the applications themselves, you
  will realize that a window manager theme is not going to affect the
  look and feel of the applications themselves. Integrated toolkits such
  as KDE and GNOME do have this capability, however, and the two might
  be used together very effectively.

  In order to generate a theme, you must roll up your sleeves and modify
  your .fvwm2rc file a little bit. Here's something I added near the
  beginning of my file, try putting it right after your Style
  definitions:



        # Blue Theme
        DestroyDecor Blue
        AddToDecor Blue
        + WindowFont -b&h-lucida-bold-r-*-*-*-140-*-*-*-*-*-*
        + TitleStyle ActiveDown (Solid DarkSteelBlue)\
            ActiveUp (Solid SteelBlue) Inactive (Solid Grey)
        + HilightColor white blue
        + ButtonStyle 1 -- UseBorderStyle
        Style Blue UseDecor Blue, BorderWidth 5, HandleWidth 5,\
            MWMborder, MWMbuttons

        # Function to change all windows to a new style.
        DestroyFunc ChangeStyle
        AddToFunc ChangeStyle
        + "I" Style $0 $1
        + "I" Recapture



  That's a lot to swallow, I know. Basically we're first defining a
  theme called ``Blue,'' and you can use that first half as a model to
  design other themes. Themes can describe many more features than that,
  in fact, and can be quite remarkably different from one another. Then
  we're defining a function to change all the windows to a new style.
  Notice in both sections above that we destroy the object before
  creating it. This is a good idea since you may well be restarting
  FVWM2 a lot to try out your different styles, and this makes it work a
  bit more smoothly.

  The function call is needed as a generic interface to call the
  definitions of the styles we have defined. Now we will make the menu
  items to call them.



        DestroyMenu "Themes"
        AddToMenu "Themes"
        + "Choose a theme..." Title
        + "" Nop
        + "Blue" ChangeStyle "*" "UseStyle Blue"
        + "Mwm" ChangeStyle "*" "UseStyle Mwm"
        + "Flat" ChangeStyle "*" "UseStyle Flat"



  We're being a little terse with the menu definition here, but there
  should be a lot more in the sample file on your system. What we're
  doing is calling the ChangeStyle function that we defined above to
  change the style for all the windows on the screen to one of the
  presets we defined above that. Notice, again, our good practice in
  destroying the menu before creating it. Now if you restart FVWM2 (you
  should also have a menu option for that, hopefully!)  you will see a
  new Themes menu selection, and you should be able to try out the
  different themes.

  For more examples of FVWM2 Themes, visit
  <http://www.vis.colostate.edu/~scriven/Linux/fvwm/index.html>.


  7.  Fonts and Colors

  There are a lot of tricks to the fonts and colors used in X. They are
  not quite as simple as in some other systems, for instance, the font
  is not just a one-word name. You specify these resources quite
  explicitly, and it seems rather complex at first, but with a little
  explanation you'll be a whiz in no time.


  7.1.  Fonts Demystified

  The X Logical Font Description (``XLFD'') is the full name for a font.
  It consists of the following fields:


  o  fndry - font foundry, the company or individual which made the font

  o  fmly - font family, the popular nickname of the font

  o  wght - font weight (bold, medium, etc.)

  o  slant - font slant (italics, oblique, roman (normal), etc.)

  o  sWdth - font width (normal, condensed, extended, etc.)

  o  adstyl - additional style (sans serif, serif, etc.)

  o  pxlsz - pixel size, the number of pixels vertically in a character

  o  ptSz - approximate point size of the text (similar to pxlsz)

  o  resx - horizontal resolution, in dpi


  o  resy - vertical resolution, in dpi

  o  spc - spacing, only useful, apparently, in the Schumacher fonts

  o  avgWidth - average character width of the font

  o  rgstry - the recognized registry that lists the font

  o  encdng - nationality encoding

  In light of this chaos, the program xfontsel (the default X Window
  font selection program) will come in enormously useful to you.  Try
  launching it right now. You will see a strange nothing helpful in the
  main window, but try holding the left button down on the fndry button.
  If all your fonts are in order, you will see a menu of selections such
  as adobe and b&h and bitstream and so forth. Select one such as b&h
  and you will notice that the font in the lower window changes to
  something intelligible. This is generally the way you will select
  fonts with this program, starting from the left, which is the most
  general selection, and moving toward the right, to the more specific
  options. Selecting an option toward the rightmost end will not make
  much sense before the foundry, for instance, is selected, because the
  options are generally ordered by their dependence on each other.

  When you go to select from the fmly selection, you will see most of
  the options greyed out, and only three remaining. That means that
  these three are the only families of font made by this foundry. Some
  families appear under more than one foundry, for instance, both Adobe
  and Bitstream make a variation of the Courier font. Now you can select
  the wght, and so forth. After you get far enough you will have
  narrowed it down to the font that you want.  You don't necessarily
  have to fill in all the options to choose a single font, there's not
  that many fonts on your system! The options that you do not select
  will be represented by a * indicating that any option will do in that
  spot.

  When you are happy with your font selection, you can hit the select
  button, and your selection will be placed in the X clipboard, ready to
  be pasted into your document or whatever you are working on. For
  instance, go to your xterm window and type in something like xterm
  -font  followed by an opening quotation mark. Then point to that spot
  on your screen, and click your middle mouse button (or click both the
  left and right, if you're middle-button impaired).  This will paste
  the selection from the clipboard, which should be the font you just
  selected. Then enter the closing quote, and hit Enter. For instance, a
  nice big xterm with a Courier font specified would look like this:
  xterm -font "-adobe-courier-medium-r-*-*-14-*-*-*-*-*-*-*" A fresh
  xterm should the pop up using the font that you selected.

  The utility xfd is very helpful for examining a font.  If you launch
  it with a command line such as xfd -fn fixed, it will show you the
  character set for the font, much like the keycaps utility on a
  Macintosh.  Note that you can also limit the number of fonts that you
  want xfontsel to display with the command line option -pattern,
  followed by a quoted font specification, as discussed above.


  7.2.  Font Aliases and Configuration

  Sometimes it gets tiresome to remember all of the long font names, and
  very impractical too. Luckily, it is not necessary to type in a
  hundred keystrokes or so just to get the font name you want, for X
  provides something called font aliases.

  If you look in the directory /usr/X11R6/lib/fonts/misc/fonts.alias,
  you will find shortcut names for many of the fonts. For example, 8x16
  is listed as a shortcut for -sony-fixed-medium-r-
  normal--16-120-100-100-c-80-iso8859-1, and anywhere you enter 8x16 as
  an X font resource or at a command line for a font name, the long
  version of the font will be substituted.  The 75dpi and 100dpi
  directories have similar aliases to take advantage of, on most systems
  the Lucida Sans font has a nice shortcut.

  If you add fonts or aliases to your system, you will have to issue a
  few commands (probably as root).  If you add fonts, you will have to
  issue the following two commands (these are examples, you will have to
  put in the correct directory, or perhaps leave it off altogether, to
  have your fonts re-read correctly.



        mkfontdir /usr/lib/X11/fonts/misc
        xset fp rehash



  If you change the alias file for a font, you may only have to issue
  the last command above, but it may be a good idea to issue them both,
  to be sure.  With the xset command you can explicitly issue a font
  path you wish the server to use, you can delete a specific directory
  from your font path, see the man page for more information.

  Another common problem is that some distributions (notably Red Hat
  5.2, at the moment) come with the fonts configured in the wrong order.
  If you take a look at your /etc/XF86Config (it may be somewhere else
  in some distributions, unfortunately, and I'm not sure where it is in
  Red Hat at the moment, so maybe locate it...)  Take a look at this
  file if your fonts are ugly in X (as in, very difficult to read even
  at large sizes).  You will see a bunch of entries that look something
  like this:



        FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
        FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
        FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
        FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
        FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"



  The important thing to note here is that we have the unscaled
  bitmapped fonts (the directories misc, 75dpi, 100dpi) before the
  scaled fonts (such as Type1 and Speedo).  Bitmapped fonts are
  preferred for the X Server, because scaled fonts don't look very
  pretty for common use, they're better for things like The Gimp or
  Netscape, perhaps.  You should also do a sanity check to see that
  these directories all do, in fact exist, and if you have modified any
  lately, you might need to (as root) go in and issue an mkfontdir *
  command in the fonts directory.

  Note that if you are running a more recent distribution, such as one
  based on Red Hat 6.0 or later, you won't have to worry about this, as
  the xttfs True Type font server is the default, and does not use the
  path system to find your fonts.



  7.3.  Using Type 1 Fonts in X

  The font types X generally accepts are of limited use, considering
  that about the only place you'll find fonts of that kind used are in
  the X Window System itself, and unfortunately most media junkies and
  fontaholics work in operating systems that prefer other formats.  Type
  1 fonts, most commonly used in conjunction with PostScript document
  formats, can be found for free on the internet with considerable ease.
  Try  <ftp://ftp.cdrom.com/pub/os2/fonts/> for starters.

  To make use of these fonts is not that difficult, and graphics
  programs like GIMP will take advantage of them tremendously, and best
  of all, the Linux X servers understand Type 1 fonts ``out of the
  box.''  To use them, first unpack the archive using the appropriate
  commands, and put the fonts with a .pfb extension in
  /usr/X11R6/lib/X11/fonts/type1/ on your system. Then, add mention of
  those fonts in the fonts.scale file in that directory, using the
  format for the other fonts, already there. Then save the file.

  Now, you should be able to mkfontdir to tell the X server about the
  updates, and then run xset fp rehash to re-read the font path. If this
  doesn't work for you, you might have to restart X to see the changes.

  If you find yourself using Type 1 fonts a lot, and for things other
  than just X (GhostScript, for instance, can handle this font format as
  well), you'll want to check out the type1inst utility by James
  Macnicol. This program can configure Type 1 fonts for GhostScript and
  X, and it can also generate sample sheets for your fonts, and does
  most of the work of configuration for you. This program can usually be
  found at  <ftp://metalab.unc.edu/pub/Linux/X11/xutils/>.


  7.4.  Using TrueType Fonts in X

  If you have been using an operating system such as Windows or the
  MacOS, you may have lots of fonts sitting on your computer already
  that are TrueType fonts. TrueType fonts are considered best on
  smaller,  low-resolution displays, such as your computer monitor, and
  attempt to  provide nice features like shading and antialiasing,
  making your display look smoother. It is also really easy to find
  cheap TrueType fonts in bulk, and CD's featuring upwards of 500 fonts
  in the TrueType format are common in computer stores.

  X does not understand TrueType fonts, and has no innate capability (at
  present) to do so, and so it needs a separate program to do the font
  rendering for it.  There is a FreeType library to do this, but if you
  just want to use them on your computer, all you will need is a program
  called xfstt, the X font server for TrueType.  This program should be
  available at  <ftp://metalab.unc.edu/pub/Linux/X11/fonts/>.

  Installation is fairly straightforward.  Extract the archive, and make
  the file, and then make install. You may get a few errors that don't
  make sense after the second command; ignore them.  What you need to do
  next is create a writable directory called /usr/ttfonts and put some
  of your .ttf fonts there, just to make sure it's going to work.  Then
  synchronize the font server with the command xfstt --sync.

  If you got no errors there, run the font server in the background with
  the command xfstt & and tell your X11 server about the font service
  with the command xset fp+ unix/:7100.  If you got no errors, you
  should be able to run Netscape, the GIMP, even xfontsel, and have
  those fonts available to you. Your biggest problem may be finding the
  font you want, but that's not really a bad thing.

  It has been brought to my attention that more recent versions of xset
  require a slightly modified version of this command, because of
  changes in the code of xset.  If you are running a distribution based
  on Red Hat 6.0 or later, or something equivalent, you will first want
  to try xset fp+ unix/:7101.

  If everything seems to be working fine, at this point you will want to
  configure your system so that the fonts will be working when you start
  X.  If you are just starting X from the command line, this is easy.
  All you have to do is add the two commands from the previous paragraph
  to your .xinitrc file, in that order.  When you next start X, it
  should work just fine.  If you are starting X via xdm, you will need
  to add /usr/X11R6/bin/xfstt & to /usr/X11R6/lib/X11/xdm/Xsetup_0. Got
  that? Then add xset fp+ unix/:7100 as well.

  Bear in mind that the installation of a TrueType font server can be
  tricky business. Remember that the order that you issue the above
  commands is important. The font server must be started before X is
  started, otherwise you will run into problems. Be sure to read the FAQ
  file that came with the distribution, and the xfstt man page too.
  Many newer Linux versions come with this already working, so see if
  that's not already the case before worrying too much about it.


  7.5.  Colors

  Let's go back to our terminal window and try some more things. Try
  opening an xterm with a command line like the following:



        xterm -fg darkslateblue -bg red3 &



  While that window may not be pretty, and you may not do much of your
  best work in it, it demonstrates one interesting theme of X, the names
  of the colors.  While not very precise, this is a nice way to remember
  the colors more easily than remembering a series of hexadecimal
  numbers. Note that color names are never case-sensitive.

  If you're interested in the gory details, or want to see the samples,
  or even want to replace those silly color names with your own for some
  strange reason, you can find the file listing all the colors with
  their hexadecimal representation in /usr/X11R6/lib/X11/rgb.txt on your
  system. There are also some extremely useful utilities with names like
  xcolorsel and such. They can be found in the usual locations, on
  <http://metalab.unc.edu/pub/Linux/> and elsewhere.

  A more precise way of specifying colors is through the numerical
  definition.  This consists of a color space name and a set of values
  in the following syntax:

  <colorspace-name>:<value>/.../<value>

  An RGB Device, which you will most likely be using, is specified with
  the prefix "rgb:" and has the following syntax:

  rgb:<red>/<green>/<blue> , where <color> is a 1 to 4 digit hexadecimal
  number.

  As an example, you might represent the color red with rgb:ffff/0/0.
  For backward compatibility, you can also specify red with a syntax
  such as #ff0000 or #ffff00000000, and you will likely be seeing that
  (older) syntax a lot.

  8.  The X Resources

  We will at this point consider some finer modifications to your
  system. Configuring the window manager only gets you so far. The
  window manager lets you customize everything that happens outside the
  windows, the frames, the borders, the buttons, the desktop... but what
  about making the inside of the windows pretty? The only way to do this
  is by modifying the X Resources for your system.

  X Resources provide a mechanism for storing default values for program
  resources and tailoring your windowing environment to your favored
  look and feel. Resources are specified as text strings that are read
  in from various places when an application is run. Program components
  are named in a hierarchical fashion, with each object in the hierarchy
  identified by a class as well as an instance name. At the top level of
  the hierarchy is the class and instance name of the application
  itself. By convention, the class name of the application is the same
  as the program name, but with the first letter capitalized (e.g.
  Bitmap or Emacs) although some programs that begin with the letter
  ``X'' also capitalize the second letter for historical reasons (e.g.
  XTerm).


  8.1.  X Resources: The Basics

  Let's try a few examples to ease you into the world of resources.
  Start by opening an xterm window. Most likely you have one open
  already, can open one with a menu selection, or may wish to backtrack
  a bit in this document to get your bearings! Type something like this
  into the xterm window:



        xterm -background blue &



  This command should have resulted in another xterm window popping up
  on your screen, but this time with a blue background. ``Wow,'' you
  say, ``that's amazing!'' Yes, indeed it is.

  We'll need a little more background for our next example. Type exit in
  that xterm (which will close that window) and go back to the original
  window that you typed that command in. Try this: hold the Ctrl key and
  then hold the left mouse button. Now try that with the middle mouse
  button. Now the right.  All xterm windows give you options to try
  while they are running. With the right button, for instance, you can
  change the font of the window. Notice the color of these menus. Now
  try this example:



        xterm -xrm 'xterm*fontMenu*background: green' &



  This time, it just looks like a normal xterm window. But if you try
  holding Ctrl and the right mouse button in that window, you will see
  that this menu (the ``fontMenu'' mentioned in the above example) is
  green.  What just happened?  If you look at the man page for xterm,
  you will see many command-line options, such as -background or -font,
  that you can set when you launch any given window in X, listed after
  the options just for xterm windows. These particular options are
  called X Toolkit Options, and they apply to just about anything in X.


  8.2.  Inside The X Resource Database With editres

  To really get inside the resources of X, we need to run editres. Go
  ahead and launch it (and a sample program to play with) now:



        xclock &
        editres &



  Probably you will see a simple clock, and the rather innocent looking,
  mostly-blank window of editres.  The main window is showing us the
  resource tree of any given window on our desktop, and upon program
  launch, there is none. So let's give it one. Hold down the left button
  on the Commands menu, and select Get Tree. In the top of the window
  will appear Click the mouse pointer on any toolkit client. This
  message is more than it seems, and it is a hint to us that not all X
  applications are toolkit clients (though most of the basic ones are,
  and the program will usually tell us if it is not in the manual page).
  The mouse cursor will turn to a crosshair, and wait for you to click
  on another window.

  For this example, let's first click on the xclock. You will see a
  couple things appear in the editres window. These are the configurable
  branches that the toolkit sees. Click on the bottom right one (clock).
  It should invert.  Now select ``Show Resource Box'' from the
  ``Commands'' menu. You will see another window pop up, with the
  heading ".xclock.clock.unknown". Bingo!

  >From here you can toy with the configuration options of the main
  xclock window. First, click on ``Set Save File'' at the bottom, and
  put in a filename such as /home/yourname/resources, to indicate that
  you're testing some of the resources here. Now click on ``foreground''
  and put in ``blue'' next to the ``Enter Resource Value:'' prompt. Then
  hit ``Apply'' at the bottom. The minute notches around the clock
  should turn blue. Go to ``background'' and enter ``navajowhite'' (or
  whatever color you prefer). Then apply that. As you can see, we can
  configure the whole window just fine this way. But if you were to try
  launching another xclock, it would appear just as this one appeared
  before any changes. We need to save these changes.

  Click ``Save'' and then ``Popdown Resource Box'' (a fancy name indeed
  for the ``Close'' function!). If you view the file you just created
  (cat /home/yourname/resources perhaps) you will see all those
  resources spelled out, in correct X Toolkit format, for your
  convenience. But that does us little good, for if you try launching
  another xclock, it will still look Plain Jane. So here is the last and
  final step in loading in your resources:



        xrdb -merge /home/yourname/resources



  This command merges the resources we just wrote into the X Resource
  Database (xrdb) for your session of X Window.  That means that for all
  future invocations of the X applications we modified, our changes will
  take place, and remain binding. So if you run another xclock, it will
  look as nice as you have just now set it up, every time you run it.
  Mind you, xrdb is a complex program, and you may want to have a look
  at the man page before moving on, or playing around with it some more.
  If you added the modification to .xinitrc listed earlier in this
  document, to load the resources automatically on X startup, you should
  only have to worry about the xrdb command when you make changes during
  your X session.


  8.3.  The Anatomy of X Resources

  As you can see we have stumbled across a plethora of configuration
  options here. This method of configuring X, as has been stated, offers
  nearly limitless possibilities, and an equivalent amount of confusion.
  To get some picture of the scope of the resources in just the X
  Toolkit Intrinsics alone, run the program viewres, and play around
  with it a bit. This program graphically displays the tree of resources
  in the Xt Library.

  If you read the manual page for X, you will find a rather obscure
  definition of the exact syntax for defining resources it understands.
  We can simplify this quite a bit and break it down into this essential
  syntax definition:

  <program><binding><widget><binding><widget><...><resource>:<value>

  That doesn't really seem that simple, actually. Well, let's define
  some things about what has just been said, and it will all start to
  make sense after all. You can peek ahead to the examples in the next
  section as you read along, if you wish.

  The program in this definition is the invocation of an application in
  the resource database. This would be XTerm for an invocation of xterm,
  emacs for an invocation of the emacs text editor, or a user-defined
  name that was given when the applications was launched with the -name
  command line option. In this way you can define separate resources for
  xterms which will be used in different ways. Which is pretty cool,
  really.

  The binding can be one of two characters to separate the widgets and
  such.  If you use a . (period), you get a tight binding, which means
  that one widget is directly above or below the other in the widget
  hierarchy. This also has the highest precedence of the specification
  methods. If you use a * (asterisk), you get a so-called loose binding,
  and you will skip any number of widgets in the hierarchy, and it will
  attempt to match the next possible widget defined.

  The widget entries are items in the widget tree, in order of most-
  specific to least-specific, that they appear in the widget tree,
  visible with editres.  Any single widget entry can also be replaced
  with a ? (question mark) to skip a single widget definition, and match
  any possible widget item.

  The resource item must be specified, and cannot be replaced with the ?
  character. This is the most-specific item in the hierarchy, and
  usually contains items like the actual color to define, actual font to
  define, and so forth.  In fact, everything else before the resource in
  this definition can be left out and replaced with a single asterisk,
  but the actual resource to define must be present. If you just put an
  asterisk and the most-specific resource name, such as *background:
  blue, X will attempt to define that resource globally, for all its
  clients, if possible.
  Following the colon is the value entry. This entry defines what the
  resource will be set to, such as a font name or color value. The value
  can be specified (depending on context) as a boolean, numeric, or text
  data type. The value entry, also, cannot be omitted in a valid
  resource definition.


  8.4.  Making Your Changes Last With .Xdefaults

  There is a magic file you can put in your home directory called
  .Xdefaults. If you copy the lines in the resources file from the last
  example into the .Xdefaults in your home directory, you will never
  have to configure xclock again! While this might not be the finest
  example of its utility, it makes its point. This file can be crammed
  full of every option you prefer for every type of program you run in
  X, and if you take proper care of it, you can still easily go back and
  make slight changes when you need to. But making lots of changes, and
  hunting down lots of subtle resources using editres can be an
  extremely tiring and painstaking procedure. Indeed, sometimes that's
  too much work, and most of these resources are already waiting for
  you, neat and orderly, grouped by program, on your system.

  In the directory /var/X11R6/lib/app-defaults you will find a great
  many files, all named after an X Toolkit program. If you examine these
  files you will find that they contain a great many configuration
  options for each one, and I do mean a great many! You would not want
  all of these options from all of these files in your .Xdefaults file,
  that would be quite tiresome to deal with. These are the defaults, and
  it is from these that you can decide what you would like to see
  changed for your particular configuration.

  The following are some samples from my .Xdefaults file. Notice a few
  things we have not yet mentioned about the resource definition files.
  If a line begins with ! (exclamation point), it is considered a
  comment, and the rest of the line is ignored. If the line begins with
  #include filename, that line is an include directive, and at that
  point in the resources another file will be merged, when it is loaded.
  This can help keep your resource files from becoming too bloated. And
  here are some examples:



   ! Default resources for me@localhost xterms
   ! start with the generic, move to the specific...
   *Dialog*Text*font:     -b&h-lucida-medium-r-*-*-12-*-*-*-*-*-*-*
   *dialog*value*background: white
   *Dialog*Label*font:    -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
   *MenuButton*font:      -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
   *MenuButton*background:        grey80
   *MenuButton*foreground:        black
   *Label.font:           -adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*
   *Label*shadowWidth:    1
   *SmeBSB.font:          -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
   *SimpleMenu*font:      -adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*
   *OptionMenu*font:      -adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*
   *Command.font:         -linotype-helvetica-bold-r-narrow-*-12-*-*-*-*-*-*-*
   *commandBox*font:      -b&h-lucida-bold-r-*-*-12-*-*-*-*-*-*-*
   *Toggle.font:          -adobe-helvetica-bold-o-*-*-12-*-*-*-*-*-*-*
   *Form.background:      grey70
   *TransientShell*Dialog.background: grey70
   *Scrollbar.Foreground: grey80
   *Scrollbar.Background: grey50
   *Scrollbar*cursorName: top_left_arrow
   *Scrollbar*width:      16
   *shapeStyle:           Rectangle
   *XlwMenu.shadowThickness: 1
   *shadowWidth:          1

   ! xterm stuff
   xterm*scrollbar.background: grey40
   xterm*foreground: grey90
   xterm*background: grey25
   xterm*cursorColor: white
   xterm*visualbell: on
   ! rxvt stuff (a quicker, better xterm)
   rxvt*color12: steelblue
   rxvt*color15: white
   rxvt*color9: rgb:ff/7f/5f
   rxvt*foreground: grey90
   rxvt*background: grey10
   rxvt*cursorColor: white
   rxvt*font: lucidasanstypewriter-12
   rxvt*loginShell: false
   rxvt*saveLines: 1024
   rxvt*title: shell
   rxvt*geometry: 80x25
   ! Make Xman just a little bit more sane
   xman*topBox: false
   xman*background: lightsteelblue
   xman*foreground: black
   ! xcalc is too bland by default...
   xcalc*Command.font: -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
   xcalc*customization: -color
   ! Disallow the <blink> tag in Netscape
   Netscape*blinkingEnabled: False

   ! Merge other resources (example)
   # include $HOME/.otherXresources



  One word of warning with regard to X resources, for KDE users.
  There's a setting in the control panel which will cause all your X
  Resources to be overwritten in your applications. This can be a really
  nice feature, but it can also be an annoyance if you have
  painstakingly configured your resources.  Open the control panel and
  find the ``Fonts etc.''  section.  There's an option to ``Apply style
  to non-KDE apps''.  If you turn this on, all your programs will adopt
  the look and feel configured by KDE (you may need to restart X to
  notice this).  If you leave this option turned off, your resources
  will remain as you have configured them.


  8.5.  Your Own User Resource Directory

  You can also create a directory of resource files, just like the
  system-wide app-defaults directory mentioned above, with one file per
  program. Just create the directory (for our example we'll use app-
  defaults under your home directory,) and then set the environment
  variable XAPPLRESDIR to point to it. A good place to set this variable
  would be in the beginning of your .xinitrc file, for example, put in
  the line export XAPPLRESDIR=$HOME/app-defaults (if your files are
  going to be in an app-defaults directory under your home directory).

  Now, whenever you start an X program, this directory will be searched
  for a file with the same name as the resource name of the program,
  just like the system-wide directory.  This is the client name that you
  used in .Xdefaults files.

  For example, a file called XTerm could contain the line *background:
  gold, and all your xterms would, by default, come up with a gold
  background. This is a nice alternative to a single .Xdefaults file,
  and makes it more clear when trying to decide which settings to
  configure later on, and to find the ones for a certain program. There
  are still uses for the .Xdefaults, though.  It's useful for setting
  resources not bound to a single program, like modifications that you
  would make to turn all of a certain kind of button blue, regardless of
  the application.


  9.  Clients and Application Tips

  We have covered a few clients in X, and this section will cover some
  more.  We will limit our discussion here to the most basic and
  important core items, those which come with X or you are likely to
  find yourself using with X. If you have installed an integrated
  desktop environment such as KDE or GNOME, you will have many others to
  choose from which likely perform many of the same functions. However,
  it is important to know about and understand many of the fundamental
  programs in X, because they can be very useful for working with your
  environment and such.  Also X offers many new options that even your
  normal console applications can take advantage of.


  9.1.  Screen Savers for X

  A common feature of many operating systems is the ability to blank the
  screen after a specified amount of time, and optionally display some
  sort of nifty graphics demo thing, a screen saver.  There are a couple
  ways to do that in X, too.

  The most basic way to use this feature is by putting a command in your
  .xinitrc startup file such as xset dpms 2400 3600 4800.   The xset
  program can configure the screen saving features of  the X server, not
  to be confused with the screen blanking that the  kernel does when you
  are at the text console.  With the dpms  option, X can use the power
  saving features of your monitor as well.   The first option configures
  how many seconds before the screen blanks,  the second option is how
  many seconds before the power saving  feature starts, and the third
  option is for the "off" mode.  Turning on an option implicitly enables
  the feature, setting a feature  to zero explicitly disables it.

  Many Linux distributions come with xlock preinstalled, or as an
  option.  This is a pretty basic and fairly nice screen saver.  If you
  run it with the -nolock option, you can see some of the modes that it
  offers, and if you leave that option off, it will ask you for a
  password when you move the mouse or press a key, as a security
  feature.  Note that this is no real security, for at a Linux console a
  user could restart the computer or just drop out of X with a
  combination of keystrokes.  The last method can be disabled, however,
  and if you are using xdm, it will offer as much security as your
  login, so it may be that only rebooting will let someone in.

  A newer and better program is xscreensaver by Jamie Zawinski.  This
  program offers a great many niceties, for instance, it can run its
  processes at a nicer priority level, lessening the load to the system
  while it's running, and it automatically detects when the screen has
  been powered down by xset and doesn't waste processor time. Also, all
  of the graphics routines it calls are modular demos, and you can add
  routines without upgrading the whole package, and it can also call
  other programs, such as xearth or xdaliclock, as modules.

  The latest version of xscreensaver can be found at
  <http://www.jwz.org/xscreensaver/>.  Once you get it installed and
  ready to go, here are some nice additions you might wish to add to
  your .Xdefaults file:



        !!! some XScreenSaver sample defaults
        ! Time out after 3 minutes, cycle mode after each 2
        xscreensaver.timeout: 3
        xscreensaver.cycle: 2
        ! Run very low priority, and fade between modes
        xscreensaver.nice: 12
        xscreensaver.fadeSeconds: 2



  9.2.  Emacs and XEmacs

  If you are a fan of the text editor EMACS, or just someone who uses it
  a lot, you will find your work even easier in X Windows.  If you have
  not tried XEmacs, you may want to get it for use in X.  There are
  features in XEmacs that are nice even if you are not in X, for
  instance, your text can be colored to match the markup style you are
  editing automatically.  You should give the following modification to
  your .emacs file a shot, and read the info pages for more options.
  Also look for an option to edit faces in the menus.



        (global-font-lock-mode t)
        (setq font-lock-maximum-decoration t)



  9.3.  Some Useful Programs and Tricks



     appres
        The appres program prints the resources seen by an application
        (or sub-hierarchy of an application) with the specified class
        and instance names.  It can be used to determine which resources
        a particular program will load.  Useful for debugging your X
        defaults and such.


     rclock
        Many distributions come with this nice replacement for xclock,
        which saves memory, alerts you when your mail comes, and can pop
        up reminder messages and launch programs.  The Battery-Powered
        Mini-HOWTO contains instructions on patching this utility to
        show how much battery is left in your laptop, too.


     rxvt
        A nice replacement for xterm - uses less memory, works faster,
        lets you put in a background pixmap, and lets you switch fonts
        with keyboard hotkeys, rather than menus.


     xcpustate
        Displays CPU state (idle, nice, system, kernel) statistics, as
        well as Ethernet information.


     xearth
        Display the earth on your root window, many options for display
        available. Xscreensaver can use this as a screensaver module,
        for maximum fun.


     xfig
        A vector drawing program, particularly useful for charts and
        documentation. Quite useful but hard to get the hang of at
        first.


     xfontsel
        Font selection utility for X Window.  Try the command xterm -fn
        `xfontsel -print` & to pick a font and then open the xterm
        window using that font.


     xload
        Monitor your memory usage with a moving graph or the lights on
        your keyboard! If you use Window Maker, look for wmmon to do the
        same, but prettier.


     xmag
        A magnifying glass for X, with a couple other useful features.


     xman
        Manual page browser for X.  If the little box it starts with
        gets annoying, launch it with the -notopbox option.


     xmodmap
        Edit and display the keyboard modifier map and keymap table that
        are used by client applications to convert event keycodes into
        keysyms, usually run from user's startup script. An example was
        given earlier in this document, see the man pages for more info.

     xpaint
        Basic bitmap painting program, for any real work you should grab
        GIMP <http://www.gimp.org/>.


     xset
        User preference utility for X. You can change all sorts of stuff
        with this.  For instance, xset s 600 sets the screen to blank
        after ten minutes.


     xsetroot
        Change the color of your desktop.  If you have a color selector
        program like xcolorsel installed, try a command like xsetroot
        -solid `xcolorsel` to pick a color and set your desktop to that
        color.


     xwininfo
        You can run this program and click on any window for lots of
        useful information about it.


     The Intellimouse
        You can use the Intellimouse in X with a great many
        applications.  There is an excellent resource page located at
        <http://www.inria.fr/koala/colas/mouse-wheel-scroll/>.



  10.  Advanced X Usage

  There's a lot to learn about X, a lot of info buried in the
  inscrutible land of man pages, a lot of things most folks don't bother
  reading.  Some if it is rather important, and it's easy to make some
  mistakes, and get completely stuck.  It can be much harder to build a
  program in X, or check the security of X, or many other things,
  because X and all the things that run on top of it are so vast.  This
  section is an attempt to cover some of the more advanced and confusing
  situations that may arise.


  10.1.  Libraries and Compiling X Applications

  Sooner or later you will have to deal with compiling applications of
  your own. Later, if you just installed a nice distribution of linux,
  and are happy with what you've got, sooner, if you're the kind of
  person who likes to tinker and install. Remember, this is a privilege,
  not a right, so have fun with it!

  First, a few pointers on compiling programs with X. Many newer
  applications, GNU applictions in particular, come with a script in the
  root directory called configure.  This assumes of course that you've
  extracted the file and are in the directory. This program should be
  run as ./configure, and will automatically detect many things about
  your system.  Afterwards, simply running make and perhaps becoming
  root and running make install will get the program up on your system.

  You may have to do a little more tinkering if you do not have a
  configure script available. Many X programs require you to run a
  program to make the Makefile, called xmkmf.  If you don't see a
  Makefile in your directory, this will sometimes work, and will
  generate a suitable configuration for you, and you'll be ready to make
  from there.


  Sometimes you will have run the configure script, and have been warned
  that you lack a library that would be helpful or necessary to properly
  use that application. For instance, I recently installed the
  xscreensaver application, and found that it would support several 3D
  modes if the Mesa library was installed. If you run into this
  situation and want that library installed, the first thing you should
  do is check the CD or installation media for your Linux distribution
  to see if you have the library on there.  That may save you lots of
  trouble trying to compile the library.

  Once you get a library compiled and installed and ready to use, you
  can go back to the directory you were installing your X program from,
  remove the config.cache file, and run the configure script again.
  Hopefully it will find the library you have installed. Sometimes it
  does not, and you have to tinker to get it working. This happens
  occasionally with libraries you download off the net, that do not
  adequately support the Linux File System Standard (most do, however).


  10.2.  Basic X Security

  It has often been said that X has a very simple security model: All or
  Nothing. This is not much of an exaggeration at all. X can be
  configured to use somewhat sophisticated security, via encryption, but
  that is beyond the scope of this HOWTO (for the present).  It is
  assumed that the user is not using any encryption for this discussion.

  First of all, you should try and follow some simple rules when you're
  compiling programs for X (or for any reason, really).  Try not to
  become root any more than necessary.  Configure your programs as a
  normal user with the ./configure && make (or just make if there's no
  configure script), and then issue the single command to install it as
  root by typing su -c "make install", and then typing in the root
  password at the prompt.  That way you won't have to be logged in as
  root, you can just issue a single command, and you're back to your
  normal user prompt. This is a smart, safe way to install software.

  The next thing to think about is running X software as root. Realize
  that X is more or less inherently insecure, and if your primary
  concern for a particular Linux box is security, you really don't want
  to install X at all! Having said that, some folks want to run nice
  fancy configuration programs or package management tools in X. I do
  not recommend starting X as root. It's just not a good idea.  There's
  much, much better ways to do these things!

  If you want to run an X application as root, just log in under your
  normal user account, and launch it from there. As I mentioned above,
  you don't want to be logged in as root any more than absolutely
  necessary. The root user has the ability to do just about anything on
  the system, including about a million ways to destroy it completely.
  Simply go to your xterm or such application and type in a command such
  as su -c "glint -display :0.0" to launch the window on your desktop.
  Now you have a single window running as root, and not the whole
  desktop. You might also want to consider using the complete pathname
  to the program you're running as root, for extra security.

  Tomasz Motylewski also offers the following tip for ssh and ssh-agent
  lovers.  If you put the following in your
  /usr/X11R6/lib/xinit/Xclients file:



        eval "exec ssh-agent fvwm${FVWMVER} ${FVWMOPTIONS}" >
        "$HOME"/.FVWM${FVWMVER}-errors 2>&


  That is, replace your standard fvwm${FVWMVER} ${FVWMOPTIONS} command
  with the preceeding. That is to start your window manager as a child
  of ssh-agent. Then you should try ssh-add < /dev/null from an xterm
  session (if you have  your identity RSA key in the file
  /.ssh/identity). If this works for you then you should find that you
  are authenticated in all your X windows.

  It should be noted that this is a suggestion from the reader, and the
  author has no experience with ssh at the present, so proceed at your
  own risk!  More recent Linux distributions allow for setting up ssh
  automatically, via setup or something similar, which means that you
  may not have to worry too much about setting it up, just understanding
  how it works.


  10.3.  More About X Authority

  The mysteries of user authentication in X are a prime example of the
  security problems many users encounter with X.  Tomasz Motylewski
  relates the following story, which sums up the situation quite well.

  ``...in the default XFree86 configuration X session started by
  ``startx'' accepts commands from everyone connecting from localhost.
  If you start X as user1 and you have user2 remotely logged in, user2
  has full access to your keyboard and desktop (once my friend played a
  joke on me and put in his cron commands dumping my X desktop image and
  sending to him every hour). I did not notice it for 2 weeks!''

  Well that's not exactly a good thing, but unfortunately many readers
  have this exact problem.  Tomasz goes on to point out that if you use
  xdm to log in (as detailed earlier in this HOWTO), rather than just
  running startx, this won't be a problem because access is controlled
  by the xauth program.  By issuing the xhost command, you can see who
  is allowed access to your X session.  Any user from the hosts that are
  listed in the output of the xhost command is authorized full access to
  your screen and keyboard.

  If you want to start your X server in a secure fashion from the
  command line, you will need to make the following modifications to
  your configuration.  First, modify startx (probably at
  /usr/X11R6/bin/startx) by changing the last line xinit $clientargs --
  $serverargs to read exec xinit $clientargs -- $serverargs -auth
  ~/.Xauthority.

  Then you will also need to edit your .xinitrc or your system-wide
  /usr/X11R6/lib/xinit/xinitrc (whichever you are actually using,
  probably the one in your home directory), by adding this at the
  beginning of the file:



        # if Xserver has been run with "-auth ~/.Xauthority" option
       this will
        # prevent other users on your machine to connect to your X server
        # unless you allow it explicitly using xhost +host or give them
        # your ~/.Xauthority file.
        xauth generate $DISPLAY . trusted



  Always be sure and run xhost to check the security that you have
  configured, to make sure everything is working correctly.


  11.  Bibliography and Other Resources

  There is lots of information on X Window to be found, on your computer
  right now, on the Internet, and in some excellent books available at
  your favorite bookseller. Give some of the following resources a try,
  they have been extremely helpful to the author, and can be extremely
  helpful to you, too.


  o  Check the Linux  Documentation Project <http://metalab.unc.edu/LDP>
     website for a lot more documentation on Linux, X, and related
     items.

  o  <http://www.x11.org/>is sort of a clearinghouse for all things X.

  o  <http://www.themes.org/>is a headquarters for themes for various
     window managers.

  o  The X Consortium's web site is  <http://www.x.org/>... or perhaps
     it's moved to  <http://www.opengroup.com/>.

  o  XFree86 can be found at <http://www.xfree86.org/>.

  o  The O'Reilly series on X Window! Visit  <http://www.ora.com/>for
     the definitive books on X.

  o  Much more information on using TrueType with X is at
     <http://www.freetype.org/>.

  o  The man pages for X, xterm, XFree86, and for any other clients you
     find yourself using often, are very useful and quite information-
     packed, and highly recommended.  As the oft-repeated saying goes,
     RTFM.

  o  There is a Remote X Apps MINI-HOWTO that is very helpful in
     figuring out how to run local and remote clients with X.

  o  Don't forget to visit  <http://www.gnome.org/> and
     <http://www.kde.org/> for the latest on unified desktop
     environments in Linux, which are becoming more and more commonplace
     all the time.



  Using the Xinerama Extensions to MultiHead X V. 4.0
  Dennis Baker drbaker@softhome.net
  v1.0, May 2, 2000

  This document describes how to configure XFree86 Version 4.0 with Mul
  tiple monitors and the Xinerama extentions.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Planning

  3. Video Card set up.

  4. Scan the PCI Bus

  5. Editing your XConfig File

     5.1 Adding all of your video cards
     5.2 Identifying Your Video Cards
     5.3 Configuring the ServerLayout Section

  6. Testing Your Configuration

  7. Editing your startup files

  8. Sample XF86Config Files



  ______________________________________________________________________

  1.  Introduction

  This is not meant to be a guide on how to set up your specific
  monitor,  or videocard.  In fact,  I assume that you already have X
  windows running for your setup.  Please refer to the XF86
  Documentation for more information.

  As far as I know,  there are no limits to which video cards you can
  configure this way,  nor does it seem to matter if you mix different
  types of video cards in a setup,  The sample configuration I use in
  this documentation uses two different video cards,  a AGP Fire GL 1000
  and a PCI Matrox Millenium II.  What effect this has on 3d
  Accelleration I don't know as I don't currently accellerate either of
  my video cards.


  This Howto assumes that you know how to edit text files,  do basic
  video card configuration for X Windows, add and remove hardware from
  your system, start and stop system services, and follow simple
  instructions.  If feel you will have trouble with any of these things,
  please seek help.  I am not responsible if you damage any of your
  stuff.


  2.  Planning

  Planning a Xinerama setup is pretty straight forward.  There as
  essentially three things you need to take into account,  screen
  resolution, color depth, and screen layout.


  It is possible to have each physical screen in your Xinerama setup to
  have a different resolution. There are some advantages to this,  I was
  able to use an old monitor which only operates at 640x480,  and a
  bigger 17" at 1280x1024 in my setup.  I have also heard of web
  developers and graphics designed who use one big "preview" screen and
  flank it with one or two smaller screens.  I think this is one of the
  great things about the Xinerama extensions.


  There is one significant problem with using multiple screen
  reolutions.  Current generation window managers assume the screen is
  rectangular and will assume this rectangle is equal in size to the
  heighth and width of your total desktop.  If you have one monitor at
  1600x1200 and another at 800x600,  your window manager will assume
  your desktop is 2400x1200.  This leaves a big area below the smaller
  screen which the window manager interprets as "Empty", many window
  managers will try to utilize this space for new windows.  There are
  ways to configure your window manager to minimize this problem but is
  a nuisance. As window managers become Xinerama aware and this problem
  will go away quickly.



  Unlike with screen resolotion, Xinerama limits your entire virtual
  screen to one color depth.  If you were planning on pulling out a
  cheap video card for your second display you need to keep this in
  mind.  If your old video card only supports 8 bit color you might get
  a bigger display but most newer programs look lousy in 256 colors.


  Layout decisions are fairly simple,  you just need to decide how you
  want to lay out your monitors.  Most people will simply place their
  monitors in a row and view their desktop as one giant monitor.  It is
  also possible to overlap displays, or place them in more complex
  layouts.  Keep in mind though what I said above about window managers
  expecting rectangular displays.


  3.  Video Card set up.

  This is a good time to back up your existing config file: I did it
  like this:


       root# > cp /etc/X11/XF86Config /etc/X11/XFree86Config.working



  Before we start the multihead portion of this process you need to have
  ALL of your existing cards working properly with the display they will
  have in the final configuration.  If you haven't already,  configure
  and install each different video card/ monitor combination you are
  going to have in your final setup.  If you have several identical
  video cards you can get away with configuring one and copying the
  configuration for the other cards.


  After you have each card set up, back up or print it's config file as
  you will need it later.  Here's how I did it:


       root# > cp /etc/X11/XF86Config /etc/X11/XFree86Config.Matrox



  If your video cards are identical you can probably get away with just
  one copy.  However don't skip this step,  If all else fails this will
  be you backup config file incase my instructions lead you astray.


  Once you have all of your displays configured you are almost there...


  4.  Scan the PCI Bus

  This is a good time to put all of your video cards into your system
  and set up your monitors.  Set everything up the way you want it when
  you are done,  as you will have to repeat steps later if you change
  things.

  This next step needs to be done from the console with-out X running.
  If you are in X, exit now.  If your system uses a display manager such
  as xdm or gdm exit you need to stop that service.  If you need to stop
  a display manager from RedHat the easiest way is like this:


       root# > telinit 3


  for Debian,  Storm or Corel :


       root# > /etc/init.d/xdm stop


  If neither of these methods work you, reboot your computer and start
  up in single user mode.


  In a multi-head setup you need to explicitly identify each video card
  in your config file.  To do this you need to use the PCI Bus
  Identifier your system assigns the card.  At this time, all video
  cards need to be in your system.

  To find out what your PCI bus IDs are:


       root# > XFree86 -scanpci


  X will then output a code for each device on your PCI bus.


       ______________________________________________________________________
       (0:0:0) Intel 82443BX Host
       (0:1:0) Intel 82443BX AGP
       (0:7:0) Intel 82371AB PIIX4 ISA
       (0:7:1) Intel 82371AB PIIX4 IDE
       (0:7:2) Intel 82371AB PIIX4 USB
       (0:7:3) Intel 82371AB PIIX4 ACPI
       (0:9:0) Adaptec 2940U/UW
       (0:11:0) 3COM 3C900 10b Combo
       (0:12:0) Matrox unknown card (0x2007) using a Matrox MGA 2164W
       (1:0:0) unknown card (0x1092/0x0152) using a Texas Instruments Permedia 2
       ______________________________________________________________________



  PCI cards and devices are identified with a leading 0, AGP cards with
  a 1.  In my case I have a Matrox Millenium II (0:12:0) and a Diamond
  FireGL(1:0:0).  Find your video cards and write down the numbers
  associated with them.  It is important that you know which number goes
  with which card.


  5.  Editing your XConfig File

  If I haven't lost you so far,  we are in the home stretch now.  This
  section is pretty confusion so I suggest you also read the manpage for
  XF86Config,  or at least skim it.  Do it now... I'll wait.



        root# > man XF86Config



  5.1.  Adding all of your video cards

  Open your current XF86Config file and scroll down to the Monitor
  Section.  You want to copy the following sections from the XF86Config
  backup files you created above : Monitor, Device, Screen.  These
  sections should go in your XF86Config file after the coresponding
  section in the file you have open.  As you copy each section make
  certain that the Identifier is unique for each section,  you will
  reference these identifies later.


  Clear as Mud Right?  You should now have a Monitor Section, a Device
  Section,  and a Screen Section for EACH video card/monitor
  combination, each Section should have a unique Identifier.  If you are
  still confused reread the prior paragraph.  If that doesn't help, look
  at the sample ``'' I have included at the end.  You did read the
  manpage right?


  5.2.  Identifying Your Video Cards

  Now you need to add the coresponding PCI BusID as an option at the end
  of each Device Section.  The entry should look like this: BusID
  "PCI:0:12:0",  substituting the three numbers with the PCI bus ID
  which identifies YOUR video card you should have this ID from the
  ``''.  Here is a sample Device Section for one of my video cards.



       ______________________________________________________________________
       Section "Device"
           Identifier  "FireGL"
           Driver      "glint"
           BusID      "PCI:1:0:0"
       EndSection
       ______________________________________________________________________



  Please note,  even AGP cards use this layout.


  5.3.  Configuring the ServerLayout Section

  Now you need to edit the ServerLayout Section at the end of the
  XF86Config File.  The ServerLayour Section is exactally that,  it
  tells you what Screens to use, how to lay them out logically, and what
  input devices to assign to them.  Your current layout is for one
  screen, keyboard, and mouse.  For each Screen section you have created
  about you need reference in this section for them to appear in your
  display.


  Using the existing screen reference as a starting point,  create
  additional references for your other Screen Sections.  The reference
  looks like this:


       Screen "Screen 2" Relationship "Screen 1"


  This defines the relationship between the "Screen 2" and "Screen 1".
  Valid Relationships include: RightOf, Below, Above, LeftOf, Absolute X
  Y, Relative.  Use of the first four relationships is pretty obvious as
  illustrated in my sample:


       ______________________________________________________________________
       Section "ServerLayout"
           Identifier  "Simple Layout"
           Screen "Screen 2"
           Screen "Screen 1" RightOf "Screen 2"
           InputDevice "Mouse1" "CorePointer"
           InputDevice "Keyboard1" "CoreKeyboard"
       EndSection
       ______________________________________________________________________



  I have other examples in the ``'' section.

  6.  Testing Your Configuration

  Once you have completed changing your XF86Config file, save it and
  your can now test your configuration :



        root# > startx -- +xinerama


  Hopefully you can now enjoy X with multiple partners... er that is,
  Monitors.


  7.  Editing your startup files

  If this worked you will probably want to change your X configuration
  to start X this way automatically.  There are lots of ways to do this
  and there are probably better ways than what I've shown below.  Here
  are the methods I used for changing startx and gdm.


  If you run X from the command prompt add the +xinerama option to the
  startx script.



        root# > vi /usr/X11R6/bin/startx


  At the very end of the file the script starts X with the command
  xinit.  Add the +xinerama option to the very end of that line.


  To Configure gdm to start with the xinerama extentions look for
  [servers] section at the bottom of /etc/X11/gdm/gdm.conf.  Add the
  +xinerama extension to the end of the line that starts with 0=.  It
  should look like this :



        0=/usr/bin/X11/X +xinerama


  I am certain configuring KDE, and xdm to start xinerama are equally
  easy,  if you figure it out please drop me a note and I will add it to
  this Howto.


  8.  Sample XF86Config Files

  My current XF86Config File :



  ______________________________________________________________________

  Section "Module"
      Load        "dbe"       # Double buffer extension
      SubSection  "extmod"
        Option    "omit xfree86-dga"   # don't initialise the DGA extension
      EndSubSection
      Load        "type1"
      Load        "freetype"
  # This loads the GLX module
  #    Load       "glx"
  EndSection

  Section "Files"
      RgbPath     "/usr/X11R6/lib/X11/rgb"
      FontPath   "/usr/X11R6/lib/X11/fonts/local/"
      FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
      FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
      FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
      FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
      FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
      FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
      FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
  # The module search path.  The default path is shown here.
  #    ModulePath "/usr/X11R6/lib/modules"
  EndSection

  Section "ServerFlags"

  EndSection

  Section "InputDevice"
      Identifier  "Keyboard1"
      Driver      "Keyboard"
      Option "AutoRepeat" "500 30"
      Option "XkbRules"       "xfree86"
      Option "XkbModel"       "pc101"
      Option "XkbLayout"      "us"
  EndSection

  Section "InputDevice"
      Identifier  "Mouse1"
      Driver      "mouse"
      Option "Protocol"    "PS/2"
      Option "Device"      "/dev/psaux"
  EndSection

  Section "Monitor"
      Identifier  "Mini"
      HorizSync   31.5
      VertRefresh 50-90
  EndSection

  Section "Monitor"
      Identifier  "Impression"
      HorizSync   31.5 - 82.0
      VertRefresh 50-100
  EndSection

  # Video Card #1, Matrox Millenium II PCI Video Card
  Section "Device"
      Identifier  "Matrox"
      Driver      "mga"
      VideoRam 8192
      BusID      "PCI:0:12:0"
  EndSection
  # Video Card # 2, Fire GL 1000 AGP video card.
  Section "Device"
      Identifier  "FireGL"
      Driver      "glint"
      #VideoRam    8192
      BusID      "PCI:1:0:0"

  EndSection

  Section "Screen"
      Identifier  "Screen 2"
      Device      "FireGL"
      Monitor     "Impression"
      DefaultDepth 16

      Subsection "Display"
          Depth       16
          Modes       "1280x1024" "640x480"
          ViewPort    0 0
      EndSubsection
  EndSection

  # My Miniature monitor,  notice that I used the virtual option so it is
  #   the same heighth as the larger monitor,  this is not necessary.
  Section "Screen"
      Identifier  "Screen 1"
      Device      "Matrox"
      Monitor     "Mini"
      DefaultDepth 16

      Subsection "Display"
          Depth       16
          Modes       "640x480"
          ViewPort    0 0
          Virtual     640 1024
      EndSubsection
  EndSection

  Section "ServerLayout"
      Identifier  "Simple Layout"
      Screen "Screen 2"
      Screen "Screen 1" Rightof "Screen 2"
      InputDevice "Mouse1" "CorePointer"
      InputDevice "Keyboard1" "CoreKeyboard"
  EndSection
  ______________________________________________________________________



  An alternate ServerLayout Section with one Monitor above the other.

  ______________________________________________________________________
  Section "ServerLayout"
      Identifier  "Simple Layout"
      Screen "Screen 2"
      Screen "Screen 1" Below "Screen 2"
      InputDevice "Mouse1" "CorePointer"
      InputDevice "Keyboard1" "CoreKeyboard"
  EndSection
  ______________________________________________________________________



  Screens can overlap too.  In this configuration I make the two
  monitors overlap by 80 pixels..

  ______________________________________________________________________
  Section "ServerLayout"
      Identifier  "Simple Layout"
      Screen "Screen 2"
      Screen "Screen 1" Relative "Screen 2" 1200 0
      InputDevice "Mouse1" "CorePointer"
      InputDevice "Keyboard1" "CoreKeyboard"
  EndSection
  ______________________________________________________________________



  call-back mini HOWTO
  by Pawel Skonecki, stona@fizyka.umcs.lublin.pl
  v1.1a, June 2000

  This document describes how to set up call-back by using the Linux
  system and modem. I would like to thank Anna for her patience.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 OPINION
     1.2 PUBLISHING

  2. Procedure

     2.1 PART I: Net at home ?
     2.2 PART II: The first steps with modem.
     2.3 PART III Call Linux
     2.4 PART IV Linux calls us
     2.5 PART V Summary


  ______________________________________________________________________

  1.  Introduction

  1.1.  OPINION

  I'll will be waiting for all opinions about this document. I have
  tried to gather information as complete as possible. Tell me when your
  find any mistakes. I'll be grateful to people who will send me any
  suggestions or corrections. Their contributions will make this
  document better.  I don't mind answering your questions but I'd rather
  you read the whole article first.


  1.2.  PUBLISHING

  This document can by published under the conditions of Linux
  Documentation Project. Get in touch with the author if you can't get
  this license.  This document is free.


  2.  Procedure

  2.1.  PART I: Net at home ?

  Most of us use the Internet in a place of work. However we offen need
  the net at home or outside the place of work. It may be possible that
  the work from home is cheaper then from a company building. I think
  that the best solution is to install call-back software on the Linux
  server. Call-back makes it possible to re-call index number at the
  cost of the company. I'll try to present how it works. An entitled
  person calls modem is varied for the first time in Linux server. Then
  on the user's side the "hang up modem" is switched on. At the same
  time Linux calls the user. User is verified again. We have connection
  and the server is charged. The user pays only for the initiation of
  connection. The double verification and extra options in the call-back
  program unable the unsuitable persons to charge our bill. We can
  restrict the access to the connection only to corporation network or
  Internet.  Call-back is very flexible. Below, I'll try to present the
  configuration of a call-back server on Linux system and I'll show you
  how to set up your computer for re-calling the connection.
  2.2.  PART II: The first steps with modem.

  The administrators prefer different modem but while buying a modem we
  should remember about certain rules:


    Don't buy the Win-Modem because it doesn't work with Linux

    The external modem works faster than the modem which is inside your
     computer

    The internal modem with ISA slot is better then the are with PCI
     slot (you can use your PCI slot for something different)

    Don't use Plug&Play modem. If you have it set off, Plug&Play
     options and set up modem on free com (read Plug&Play-HOWTO).


  When we have the suitable modem we have to set it up in our system.
  We have to check on which com our modem is. Then we have to make a
  symbolic link to this hardware and /dev/modem. For example, if we have
  the modem for the 2nd com we write:


  ln -s /dev/cua1 /dev/modem



  We check it


  lrwxrwxrwx 1 root uucp 9 Sep 19 19:10 /dev/modem -> /dev/cua1



  If we have the modem on different com we have to remember that


  /dev/cua0 is com1

  /dev/cua1 is com2

  /dev/cua2 is com3

  /dev/cua3 is com4



  For new kernels:


  /dev/ttyS0 is com1

  /dev/ttyS1 is com2

  /dev/ttyS2 is com3

  /dev/ttyS3 is com4



  Now, we check our configuration using the program minicom.



  2.3.  PART III Call Linux

  The first step to make the call-back on Linux accessible is to set up
  a suitable parameter in kernel. Then we check whether our kernel
  serves the protocol ppp. If you don't have ppp in your kernel or in
  module you will have to compile your kernel and add ppp. You will find
  more information in Kernel-HOWTO. OK. We have a good kernel.  Now, we
  have to set up software to our system. The call-back program is a part
  of mgetty-sendfax and ppp. You will find it all in your distribution.
  Because call-back system we have double verification and we create a
  user who will be running ppp on the side of server.


  pppuser:klkIOM89mn65H:230:PPP Dialin:/home/pppuser:/etc/ppp/ppplogin



  Then change the password. We have to add information abut password in
  the file /etc/ppp/pap-secrets (more in man pppd)


  pppuser * password_for_pppuser *



  This user doesn't have a usual shell but a file /etc/ppp/ppplogin.  We
  have to make it ourselves. for example vi /etc/ppp/ppplogin and we
  type:


  #!/bin/sh

  exec /usr/sbin/pppd -detach 192.168.1.1:192.168.1.2



  where the address 192.168.1.1 is the address of server with modem and
  the address 192.168.1.2 is the address which we assigned to our modem.
  We set up executable options for this file. Because we will use the
  ppp demon we have to set up the options for this demon. We edit file
  /etc/ppp/options:


  netmask 255.255.255.0

  proxyarp

  lock

  crtscts

  modem



  Proxyarp is the most important from the above options, because you can
  go to Internet by the modem in the server. The remaining options are
  used control your modem. Your user can work only in local network if
  you remove proxyarp option. You have to see PPP-HOWTO and man pppd for
  more information. We will set up our modem now. Our server must be
  ready to receive a connection after start. We edit file /etc/inittab
  and we add it's to modem on the 2en com.


  s1:2345:respawn:/sbin/mgetty ttyS1 -D /dev/ttyS1 vt100

  For the 1st com line looks as follows:


  s0:2345:respawn:/sbin/mgetty ttyS1 -D /dev/ttyS1 vt100



  We make init q. If we don't have information about any mistakes in
  logs we go to the next step. We come back to directory /etc/ppp and
  create options.ttyS1 (for modem com1 options.ttyS0)


  IP_local: IP_remote



  for our net it will be


  192.168.1.1:192.168.1.2



  We have done a lot work so far. Now, we check the file
  /etc/mgetty+sendfax/login.config. The most important line is:


  /AutoPPP/ - a_ppp /usr/sbin/pppd auth -chap +pap login detach kdebug 7 debug



  The remaining lines can be marked #.


  We have to set up suid for ppp demon, because pppuser has to run pppd
  and make interface work.


  chmod u+s /usr/sbin/pppd



  and its effect is:


  -rwsr-xr-x 1 root root 106892 Jan 11 1999 /usr/sbin/pppd



  I think that it is a good idea is to add it to cron becouse I had a
  problem after restart of my server pppd changed preference.  Our
  server will work as router. We have to enable IP forwarding and we add
  this line for the file /etc/rc.d/rc.local :


  echo "1" > /proc/sys/net/ipv4/ip_forward



  If you are RedHat user you can change in /etc/sysconfig/network from
  FORWARD_IPV4=false to FORWARD_IPV4=true.


  For verification we call to Linux. We use scripts for it. If we do
  this in MS Windows we mark options "call out a terminal after
  connection".  We login as pppuser with its password. I hope that all
  is OK.


  2.4.  PART IV Linux calls us

  We can already call our Linux. Now it's time Linux called us. It's not
  very diffucalt. We have to edit only two files. We create a file
  /etc/mgetty+sendfax/callback.conf and we leave it empty.


  Then we have to ask our users for their phone number. It's time to
  write the numbers we have connected earlier. In order to do it we edit
  /etc/mgetty+sendfax/login.conf and add line:


  call - - /usr/sbin/callback - S 123456



  where call is a pseudo-user needed to initiate the connection. The
  line in the /etc/mgetty+sendfax/login.conf puts in motion the program
  calling the given number (in this case it's 123456). The same
  procedures can be applied to other users. I'll try to explain how it
  works. When we call a server. It asks us to give verification. We
  login as pseudo-user, in this case it calls. The script in our
  computer hangs up the modem.  We wait and the connection is cut off.
  The program call-back starts working and recalls us. We verify
  ourselves again as pppuser with password. We combine the connection
  and interface ppp. That's all. The configuration of work-stations is
  very simple. When you have MS Windows, you have to install dial-up for
  your number. In the modem propriety we find "
  propriety--->extended---> extra options" where we write.


  &c0s0=1



  We close the window and call. We log in according to the description
  given above. If we want to use Linux, we must refer to the script.
  It's difficult to give only one good script for our Linux. A good
  configuration of ppp in the system is of primary importance. (You can
  call it as pppuser through the scripts first).The scripts below were
  whiten by A. Gozdz. I suggest putting everything to catalogue.  It is
  only my suggestion & you don't have to start the scripts here.
  Detailed information cocernig writing scripts on Linux can found in
  PPP-HOWTO.


  THESE SCRIPTS WORK WELL WITH SLACKWARE


  The configuration file of daemon ppp (an example for modem on com2)
  /etc/options



  lock

  defaultroute

  noipdefault

  modem

  /dev/cua1

  33600

  crtscts

  debug

  passive

  asyncmap 0



  and the specific scripts


    the first named /etc/ppp/ppp-call


     #!/bin/bash

     teksta="Connection failed"

     tekstb="Probably, You will be connect"

     # /sbin/setserial /dev/cua1 spd_vhi

     killall -INT pppd 2>/dev/null

     rm -f /var/lock/LCK* /var/run/ppp*.pid

     (/usr/sbin/pppd -detach /dev/ttyS1 115200 \

     connect "/usr/sbin/chat -v -f /etc/ppp/pppcallback" &) || \

     (echo $teksta; ls marsss >/dev/null; exit 1)

     echo $tekstb

     exit 0



    the second file called /etc/ppp/pppcallback



     TIMEOUT 60

     ABORT 'ERROR'

     ABORT 'BUSY'

     ABORT 'NO ANSWER'

     ABORT 'NO DIALTONE'

     ABORT '\nVOICE\r'

     ABORT '\nRINGING\r\n\r\nRINGING\r'

     
     TIMEOUT 75

     OK ATDT123456

     CONNECT ''

     ogin:-ogin: ppp_pseudouser


     TIMEOUT 180


     CONNECT ''

     TIMEOUT 20

     ogin:-ogin: pppuser

     sword:-sword password_for_pppuser



    You can ppp-call, now. :)


  THESE SCRIPTS WORK GOOD WITH LINUX RED HAT 6.x


    /etc/ppp/options


     lock

     defaultroute

     noipdefault

     modem

     33600

     crtscts

     debug

     passive

     asyncmap 0



    /etc/ppp/pppcallback


     TIMEOUT 5

     ABORT 'ERROR'

     ABORT 'BUSY'

     ABORT 'NO ANSWER'

     ABORT 'NO DIALTONE'

     ABORT '\nVOICE\r'

     ABORT '\nRINGING\r\n\r\nRINGING\r'

     
     TIMEOUT 40

     OK ATDT5376443 CONNECT ''

     ogin:-ogin: ppp-pseudo-user


     TIMEOUT 180


     CONNECT ''

     TIMEOUT 20

     ogin:-ogin: pppuser

     sword:-sword password_for_ppuser



    /usr/bin/ppp-call


     #!/bin/bash

     teksta="Connection failed"

     tekstb="Probably, You will be connect"

     # /sbin/setserial /dev/cua1 spd_vhi

     killall -INT pppd 2>/dev/null

     rm -f /var/lock/LCK* /var/run/ppp*.pid

     (/usr/sbin/pppd -detach call ppp_call &) || \

     (echo $teksta; ls marsss >/dev/null; exit 1)

     echo $tekstb

     exit 0



    You can run ppp-call, now. :)


  If you have M$ Windows you can use this script for conection. I don't
  test it (I use terminal) you can ask some more Adrian Debkowski
  (adrian@cr-media.pl).


  proc main

  delay 1

  waitfor "ogin:"

  transmit "call^M"

  waitfor "RING"

  transmit "ATA^M"

  waitfor "CONNECT"

  waitfor "ogin:"

  transmit "pppuser^M"

  waitfor "word:"

  transmit "ppp^M"

  endproc



  2.5.  PART V Summary

  The Configuration of call-back is not complicated. The most important
  thing is a proper arrangement of ppp server on Linux. I don't know a
  better way of setting up an access - server. The configuration
  presented above is a result of numerous attempts and it can be done in
  a different way. That's way I suggest reading all documents concerning
  this issue man pppd, NET4-HOWTO, PPP-HOWTO.




PHHTTPD

Zach Brown

   Copyright  2000 by Zach Brown
     _________________________________________________________________
   
   Table of Contents
   1. [1]Introduction
          
        [2]Architectural Overview
        [3]Supported Systems
                
   2. [4]Configuration File
          
        [5]Overview
        [6]Global config section
        [7]Virtual Servers
                
   3. [8]Logging
          
        [9]Overview
        [10]Configuration
        [11]Format and Strange Behaviour
                
   4. [12]Run Time Facilities
          
        [13]Overview
        [14]Log Rotating
        [15]Status Reporting
     _________________________________________________________________
   
Chapter 1. Introduction

   phhttpd is an HTTP accelerator. It serves fast static HTTP fetches
   from a local file-system and passes slower dynamic requests back to a
   waiting server. It features a lean networking I/O core and an
   aggressive content cache that help it perform its job efficiently.
     _________________________________________________________________
   
Architectural Overview

   phhttpd features a very slim I/O core. It does all its networking work
   using non-blocking system calls driven by whatever event model is most
   appropriate for the host operating system. This allows a single
   execution context to handle as many client connections as the event
   model dictates.
   
   phhttpd's job is to serve static content as quickly as it possibly
   can. To do this it maintains a cache of content in memory. When a
   request is serviced, phhttpd saves a reference to the on disk content
   and whatever HTTP headers are dependent on the content. Next time a
   request for this content is received, phhttpd can service it very
   quickly. This cache can be prepopulated-populated at run time, or can
   be built dynamically as requests come in. Its size may also be capped
   by the administrator so that it doesn't overwhelm a system.
   
   phhttpd is a threaded stand alone daemon. The number of threads is
   currently statically defined at run time. Incoming connections are
   evenly balanced among the running threads, regardless of what content
   they may be serving. Connections are served by the thread that
   accepted them until the transfer is done.
     _________________________________________________________________
   
Supported Systems

   phhttpd is currently only expected to build and run on Linux systems
   using glibc2.1 under a kernel that supports passing POLL* information
   over real-time SIGIO signals. This means later 2.3.x kernels or a
   2.2.x kernel that has been patched.
   
   I badly want this to change. If you're interested in doing porting
   work to other Operating Systems, please do let me know.
     _________________________________________________________________
   
Chapter 2. Configuration File

Overview

   phhttpd uses an XML config file format to express how it should behave
   while running. More information on XML may be found near
   [16]http://www.w3.org/XML/
   
   phhttpd's configuration centers around the concept of virtual servers.
   For us, a virtual server may be thought of as the merging of a
   document tree and the actions phhttpd takes while serving that
   content.
   
   phhttpd.conf may be thought of as having two main sections. The global
   section, which defines properties that are consistent across the
   entire running phhttpd server, and multiple virtual sections that
   describe properties of that only apply to a virtual server. There will
   only be one global section while multiple virtual sections are
   allowed.
     _________________________________________________________________
   
Global config section

   The global section defines properties of the running server that don't
   apply to a single virtual server. It should be enclosed in
   
   Global config entities
   
   cache max=NUM
          Sets the maximum number of cached responses that will be held
          in memory. Each cached responses holds a minimal amount of
          memory. More importantly, each cached response holds an open
          file descriptor to the file with real content and an mmap()ed
          region of that content. phhttpd will start pruning the cache
          when it notices either of these two resources coming under
          pressure, but has no way to easily deduce that its running low
          on memory. The administrator may set this value to set an upper
          bound on the number of responses to keep in memory.
          
   control file=PATH
          This specifies the file that will be used to talk with
          phhttpd_ctl.
          
   globallog file=PATH
          This specifies the file to which global messages will be
          logged.
          
   mime file=PATH
          This specifies the file that contains the mapping of file
          extensions to MIME types. It should be of the form:
          
text/sgml                       sgml sgm
video/mpeg                      mpeg mpg mpe

   timeout inactivity=NUM
          Controls various network connection timeouts. 'inactivity' sets
          the amount of time that a connection can be idle before phhttpd
          will forcibly disconnect it. inactivity defaults to 0, which
          lets the connections idle until TCP timeouts take effect.
          
   sendfile
          Enabling this option tells phhttpd to use sendfile() rather
          than write()ing from an mmap()ed region. Avoiding calling
          mmap() will shorten the amount of time it takes to build cached
          responses.
     _________________________________________________________________
   
Virtual Servers

   A Virtual Server can be thought of the abstraction of serving up a
   content tree ( "docroot" in apache speak). There are a set of
   attributes that are used to define a virtual server. These attributes
   are used to decide which virtual server will process a client's
   request. Then there are attributes which define how the content is
   served.
   
   A virtual server must have a docroot. The virtual tag in the config
   file has a docroot attribute that must be set.
   
<virtual docroot=PATH>
        ...
</virtual>

   There can be as many virtual sections in the configuration file as one
   likes.
   
   Global config entities
   
   md5
          This enables the generation of the Content-MD5: header. This
          greatly increases the cost of creating a cached response for
          this virtual, because the MD5 function must be applied to the
          entire content of the response. Once the response is created,
          though, there is no per-request overhead.
          
   prepop
          This will cause phhttpd to traverse the entire docroot at
          initialization time and prepare cached responses for all the
          files it finds. This happens in the back ground during normal
          operation, so there is no dramatic increase in the time it
          takes for phhttpd to start serving connections.
          
   name
          This tag surrounds the string that will be used to identify the
          server. This string will be compared to the Host: header given
          in the request from the client, or will be compared to the
          'host part' of the full URL if that was given. This will be
          used in combination with the network address and port pair to
          determine if a request should be served by a virtual server.
          
   listen v4=DOT.TED.QU.AD port=PORT
          This virtual server will be chosen to serve an incoming request
          if that request was made to the network address specified in
          this entity. There can be as many of these as one likes in a
          given virtual server, and '*' may be specified for either
          parameter to indicate that all addresses or ports should match.
          
   logs
          The logs section of the virtual server define the per virtual
          log files that should be written to during operation. See the
          following section on logging.
     _________________________________________________________________
   
Chapter 3. Logging

   "All kids love log!"
     _________________________________________________________________
   
Overview

   phhttpd maintains log buffers for each log it writes too. Logged
   events are put in these buffers at reporting time rather than being
   immediately written to disk. These logs are written as they are filled
   during normal operation, or at regular intervals. This greatly reduces
   the performance impact of keeping detailed logs.
     _________________________________________________________________
   
Configuration

   phhttpd keeps interesting logs on a virtual server granularity. The
   action of recording lots is specified by including an entity in the
   log section of a virtual for the log source that wants to be kept.
   There is an entity for each source of logging, and attributes to that
   entity define where it is logged to. It looks something like this:
<logs>
        <LOGSOURCE mode=OCTALMODE file=PATH>
        ...
</logs>

   mode is the octal permissions mode of the file that is to be opened.
   As it is parsed by dumb routines, a leading 0 is highly recommended.
   fileis the file the logged events will be written to. The LOG_SOURCE
   is one of:
   
   access Successfully answered requests
   agent The value given in the 'User-Agent' HTTP request header
   referer The string given in the 'Referer' HTTP request header
     _________________________________________________________________
   
Format and Strange Behaviour

   phhttpd log entries are contained with a single line in a text file.
   They contain the time the log entry was written, an opaque token that
   is associated with the connection that caused the log entry, followed
   by the actual entry.
   
   The contents of the 'referer' and 'agent' log entries is simply the
   string that was given with the header. The contents of the 'access'
   log is a little more interesting. It has the decoded relative URL that
   was asked for, followed by the total bytes that were transfered, and
   the time in seconds that it took to transfer.
387f7a45 387f7a45800210ac8910500 /index.html - 2132 0

   is an entry from an 'access' log.
   
   The first field is the time in seconds since the Unix epoch, a.k.a.
   time_t. The second field is associated with the client connection that
   caused the log entry. It is constant for the duration of the
   connection, and is written to all the logs entries, of whatever type,
   that are generated. This allows a log parser to do more complete
   connection granularity analysis. As it happens, this opaque token is
   currently built up of the time the client was connected, its remote
   and local network address, etc, but these values most _not_ be parsed
   as they may change in the future.
   
   Entries generated by a thread will be written in chronological order.
   If, however, multiple threads are sharing an output file the resulting
   entries may not be written in chronological order. It is up to the
   parsing programs to use the 'time' field to sort by, if they care
   about chronological order.
     _________________________________________________________________
   
Chapter 4. Run Time Facilities

Overview

   While phhttpd is running it listens to a 'control' socket for messages
   from the administrator. The currently provided phhttpd_ctl program
   allows the administrator to minimally interact with phhttpd. This
   provides both control and status reporting.
   
   phhttpd_ctl always wants a --control argument that specifies the
   control socket of the running phhttpd daemon. This should match the
   <control> tag specified in the config file.
     _________________________________________________________________
   
Log Rotating

   phhttpd can be told to rotate its logs so that existing logs may be
   processed.
   
   The --rotate argument to phhttpd_ctl tells phhttpd to rename the
   existing files to a unique name, open new files with the previously
   used names, then close the renamed logs and start using the newly
   created files. phhttpd_ctl will output the names of the newly created
   files which will be safe to use once the command exits.
   
   The --reopen argument to phhttpd_ctl tells phhttpd to close the
   existing file logs and reopen the files with the filenames that were
   configured. This implies that an external entity has moved the files
   to new names and wants phhttpd to stop using them.
     _________________________________________________________________
   
Status Reporting

   The --status argument to phhttpd_ctl tells phhttpd to return a quick
   status blurb about the server. It contains miscellaneous information
   about the running state of the server.

References

   1. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN10
   2. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN13
   3. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN18
   4. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN22
   5. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN24
   6. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN30
   7. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN74
   8. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN110
   9. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN114
  10. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN117
  11. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN136
  12. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN144
  13. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN146
  14. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN153
  15. file://localhost/export/sunsite/users/gferg/work/00_phhttpd-HOWTO.html#AEN163
  16. http://www.w3.org/XML/
D BELGIAN                           	Belgian
D CHINESE                           	Chinese
D CYRILLIC                          	Cyrillic
D DANISH                            	Danish
D ESPERANT                          	Esperanto
D FINNISH                           	Finnish
D FRANCOPH                          	Francophones
D GERMAN                            	German
D HEBREW                            	Hebrew
D HELLENIC                          	Hellenic
D ITALIAN                           	Italian
D POLISH                            	Polish
D PORTUGUE                          	Portuguese
D SERBIAN                           	Serbian
D SLOVENIA                          	Slovenian
D SPANISH                           	Spanish
D THAI                              	Thai
D TURKISH                           	Turkish
  The 3 Button Serial Mouse mini-HOWTO
  Geoff Short, geoff@kipper.york.ac.uk
  v1.33, 31 May 1998

  How to get a 3 button serial mouse working properly under Linux.
  ______________________________________________________________________

  Table of Contents


  1. Disclaimer

  2. Introduction

  3. Serial Ports

  4. Switched Mice

  5. Normal Mice

  6. Switching a Mouse to 3-Button Mode

  7. Wheeled mice

  8. Using gpm to Switch Mouse Modes

  9. Using two mice

  10. XF86Config and Xconfig file examples

  11. Cables, extensions and adaptors

  12. Miscellaneous Problems and Setups

  13. Models Tested

  14. Further Information

  15. Mouse Tail

  ______________________________________________________________________

  1.  Disclaimer

  The following document is offered in good faith as comprising only
  safe programming and procedures. No responsibility is accepted by the
  author for any loss or damage caused in any way to any person or
  equipment, as a direct or indirect consequence of following these
  instructions.


  2.  Introduction

  The most recent version of this document can always be found at
  http://kipper.york.ac.uk/mouse.html

  There is a Japanese translation at http://jf.gee.kyoto-u.ac.jp/JF/JF-
  ftp/euc/3-Button-Mouse.euc; and a French one at
  http://www.freenix.fr/linux/HOWTO/mini/3-Button-Mouse.html.  Other
  translations may be available - check your local LDP mirrors.


  Most X applications are written with the assumption that the user will
  be working with a 3 button mouse.  Serial mice are commonly used on
  computers and are cheap to buy.  Many of these mice have 3 buttons and
  claim to use the Microsoft protocol, which in theory means they are
  ideal for the X windows setup.  (The record for the cheapest working 3
  button mouse currently stands at $1.14!)


  Most dual-protocol mice will work in two modes:

    2-button Microsoft mode.

    3-button MouseSystems mode.

     This document leads you through the different steps needed to
     configure your mouse in these two different modes, especially the
     steps needed to use the more useful 3-button mode.


  As distributions become easier to set up, some of the problems ought
  to go away.  For instance, RedHat have a mouseconfig program to set
  things up for you.  However, some versions of RH5.0 had a bug in
  mouseconfig, so make sure you check for patches.


  3.  Serial Ports

  The first thing to do is to make sure the software can find the mouse.
  Work out which serial port your mouse is connected to - usually this
  will be /dev/ttyS0 (COM1 under DOS) or /dev/ttyS1 (COM2). (ttyS0 is
  usually the 9 pin socket, ttyS1 the 25 pin socket, but of course there
  is no hard and fast rule about these things.)  There are also an
  equivalent number of /dev/cua devices, which are almost the same as
  the ttyS ones, but their use is now discouraged.  For convenience make
  a new link /dev/mouse pointing at this port.  For instance, for ttyS0:


       ln -s /dev/ttyS0 /dev/mouse

  4.  Switched Mice

  Some mice, not usually the cheapest ones, have a switch on the bottom
  marked `2/3'. Sometimes this may be `PC/MS'. In this case the `2'
  setting is for 2 button Microsoft mode, and the `3' for 3 button
  MouseSystems mode. The `PC/MS' switch is a bit more complicated.  You
  will probably find the `MS' setting is for Microsoft, and the `PC' is
  for MouseSystems. You may find the `PC' setting described as ps/2
  mode, but it should do MouseSystems as well.  If you have such a
  mouse, you can switch the switch to `3' or `PC', put the MouseSystems
  settings in your XConfigs (see below) and the mouse should work
  perfectly in 3-button mode.

  5.  Normal Mice

  If you don't have any switches, and no instructions, then a little bit
  of experimentation is needed.  The first thing to try is to assume the
  mouse maker is telling the truth, and the mouse is full Microsoft. Set
  up your Xconfigs to expect a Microsoft mouse (see the Xconfig section)
  and give it a try.


  If the mouse didn't work at all, then you don't have a Microsoft
  mouse, or there is some other problem. Try the other protocols in the
  configs, the man page for the config file is the best place to start
  looking. Also look in the Miscellaneous Problems section below.


  What you will probably find is that when you run X, the mouse works
  fine but only the outer two buttons do anything.  You can of course
  accept this, and emulate the third button (press both buttons at once
  to click the middle one) like you do with a two button mouse. To do
  this, change your Xconfig file as shown in the Xconfig example section
  below.  This may mean you have bought a 3 button mouse for no good
  reason, and you are certainly no further forward. So, now you need to
  look at your hardware.

  6.  Switching a Mouse to 3-Button Mode

  Even cheap mice can also work under the Mouse Systems protocol, with
  all three buttons working.  The trick is to get the mouse to think
  it's a Mouse Systems one, something you rarely see in your
  instructions.


    Before you power up your computer, hold down the left mouse button
     (and keep it held down until it has booted to be on the safe side).

  When the mouse first gets power, if the left button is held down it
  switches into Mouse Systems mode. A simple fact, but not always
  publicised. Note that a soft reboot of your computer may not cut the
  mouse power and therefore may not work. There are a number of other
  ways of switching the mode, which may or may not work with your
  particular mouse. Some of these are less drastic than rebooting your
  computer, two are more so!


    If your computer is get-at-able you can unplug the mouse and plug
     it back in with the button held down (although you shouldn't
     normally plug things in to a live computer, the RS232 spec says it
     is OK).

    You may be able to reset the mouse by typing echo "*n" >
     /dev/mouse, which should have the same effect as unplugging it.
     Hold the left button down for Mouse Systems mode, not for
     Microsoft. You could put this in whatever script you use to start X
     up.

    Bob Nichols (rnichols@interaccess.com) has written a small c
     program to do the same thing, which may work if echo "*n" does not
     (and vice versa). You can find a copy of his source code at
     http://kipper.york.ac.uk/src/fix-mouse.c

    Someone has reported that the `ClearDTR' line in the Xconfig is
     enough to switch their mouse into Mouse Systems mode.

    If you are brave enough, open the mouse up (remember that this will
     invalidate your warranty) and have a look inside. In some cases,
     the mouse may have a switch inside, for some strange reason known
     only to the manufacturer. More likely on the cheap mice is a jumper
     which you can move. The switch or jumper may have the same effect
     as a `MS/PC' switch described in the ``Switched Mice section''
     above.  You may find that the circuit board is designed for a
     switch between 2 & 3 buttons, but it hasn't been fitted. It will
     look something like:

           -----------
          | o | o | o |  SW1
           -----------
            1   2   3

  Try linking pins 1-2 or 2-3, and see if it changes the behaviour of
  the mouse.  If it does, you can either fit a small switch, or solder
  across the contacts for a quick and permanent solution.

    Another soldering solution which might be a last-resort for mice
     which don't understand MouseSystems at all, from Peter Benie
     (pjb1008@chiark.chu.cam.ac.uk).  If the middle button's switch is
     double-pole, connect one side of the switch to the left button's
     switch, and the other side to right button's switch.  If it's not a
     double pole switch then use diodes rather than wire.  Now, the
     middle button pushes the left and right buttons down together.
     Select ChordMiddle in the XF86Config and you have a working middle
     button.

    The ultimate recourse with the soldering iron was first described
     to me by Brian Craft (bcboy@pyramid.bio.brandeis.edu). Two common
     generic mouse chips are the 16 pin Z8350, and the 18 pin HM8350A.
     On each of these chips, one pin controls the mode of the chip, as
     follows.


       Pin 3   Mode
       -----   ----
       Open    Default Microsoft. Mouse Systems if a button is held on power-up.
       GND     Always Mouse Systems.
       Vdd     Always Microsoft.

  (Pins are numbered as follows:)


               ____
       pin1  -| \/ |-
       pin2  -|    |-
       pin3  -|    |-
             -|    |-
             -|    |-
             -|    |-
             -|    |-
       pin8  -|____|-

  (This info comes courtesy of Hans-Christoph Wirth, and Juergen Exner,
  who posted it to de.comp.os.linux.hardware)  You can solder a link
  between pin 3 and gnd, which will fix the mouse into MouseSystems
  mode.

    Peter Fredriksson (peterf@lysator.liu.se) has tried the SYSGRATION
     SYS2005 chip, and found that linking Pin 3 to Gnd forced Mouse
     System mode.


    Uli Drescher (ud@digi.ruhr.de) confirms it works on an HN8348A
     chip; Ben Ketcham (bketcham@anvilite.murkworks.net) confirms the
     HM8348A (Pin 9 is Gnd).

    Urban Widmark (ubbe@ts.umu.se) says the same applies to the
     EC3567A1 chip, where Pin 8 is ground.  I've tried it as well and it
     works fine.

    Timo T Metsala (metsala@cc.helsinki.fi) has found that on the
     HT6510A chip pin 3 is mode select, pin 9 is Gnd.  The same works
     for the HT6513A chip.  Holtek also make HT6513B and HT6513F chips -
     on these, pin 8 is Gnd.

    Robert Romanowski (robin@cs.tu-berlin.de) says pin 3 - pin 8 (Gnd)
     works on an EM83701BP chip too.

    Robert Kaiser (rkaiser@sysgo.de) confirms that pin 3 - Gnd works on
     a EC3576A1 chip too.

    Sean Cross (secross@whidbey.com) found it was pin 2 - pin 7 (Gnd)
     on a HM8370GP chip.

    Peter Fox (fox@roestock.demon.co.uk) used pin 3 - pin 8 on a
     HM8348A chip.

    Jon Klein (jbklein@mindspring.com) found pin 3 - pin 9 did the
     trick for a UA5212S chip.

    As an alternative to the above soldering methods, you can get the
     mouse to hold it's own button down when booting:  this circuit from
     Mathias Katzer.


                -----
             ---  R  ---------O------ + Supply
            |   -----   |        |                     C = 100nF capacitor
            |           | E      |                     R = 100kOhm
            |       __ /         |                     T = BC557 transistor
            |      /  \          O
            |   B | #V | T         /
            |-----|-#  |          /   Left button switch of the mouse
            |     | #\ |         O
            |      \__/          |
           ---         \  C      |
           --- C        ------O----------> (to somewhere deep inside the mouse)
            |
           ###  Ground

  The test mouse was a no-name model MUS2S - whether this works in other
  mice depends on the circuit of the mouse; if the switch is connected
  to ground and not to +Supply, an npn-transistor like the BC547 should
  work; R and C have to be swapped then, too.

  So there you have it, the choice is yours. Stick with the default
  Microsoft two buttons, or work out how to switch the mode and set X up
  to take advantage of this.


  7.  Wheeled mice

  Mice with wheels have emerged in the last few years, starting with the
  Microsoft Intellimouse and spreading to other manufacturers.  The
  wheel can be clicked like a button, or rolled up and down.  Far and
  away the best reference for information is
  http://www.inria.fr/koala/colas/mouse-wheel-scroll/ which describes
  how to get lots of X applications to recognise the scrolling action.


  In general, you'll need a fairly new Xserver to use the scrolling
  action, but some older servers will recognise the clicking actions.
  For instance, the Intellimouse is supported by XFree 3.3.1 and later.


  8.  Using gpm to Switch Mouse Modes

  gpm is the program that lets you use the mouse in console mode.  It is
  usually included in linux distributions, and can be started from the
  command line or in the startup script /etc/rc.d/rc.local.  Note that
  distributions don't always have the most recent version (1.13 at time
  of writing) which can be found on mirrors of sunsite.unc.edu.


  The main modes for serial mice under gpm are:


       gpm -t ms
       gpm -t msc
       gpm -t help

  for Microsoft or MouseSystems modes, or to probe the mouse for you and
  tell you what it found.  To run gpm in MouseSystems mode, you may need
  a -3 flag, and possibly a DTR option, using the -o dtr flag:


       gpm -3 -o dtr -t msc


  gpm is often able to recognise all three buttons of the mouse even in
  Microsoft mode.  And newer versions (Version 1.0 and later (?))  can
  then make this information available to other programs.  For this to
  work, you need to run gpm with the -R tag, like this:

       gpm -R -t ms


  This will make gpm re-export the mouse data to a new device, called
  /dev/gpmdata, which looks like a mouse to any other program.  Note
  that this device always uses the MouseSystems protocol.  You can then
  set your Xconfig to use this instead of /dev/mouse as shown below, but
  of course you must ensure gpm is always running when you use X.  Some
  people have reported that some middle-button events are not correctly
  interpreted by X using this technique, this may be down to an individ
  ual mouse setup.

  Changing button mapping for gpm and X (gustafso@math.utah.edu)

  You may find that gpm uses different default button mappings to X, so
  using both systems on the same machine can be confusing.  To make X
  use the same buttons for select and paste operations as gpm, use the X
  command


       xmodmap -e "pointer = 1 3 2"


  which causes the left button to select and the right button to paste,
  for either 2-button or 3-button mice.  To force gpm to use the X stan
  dard button mapping, start it with a -B command, eg:

       gpm -t msc -B 132

  9.  Using two mice

  In some cases, for instance a laptop with a built-in pointing device,
  you may wish to use a serial mouse as a second device.  In most cases
  the built-in device uses the PS/2 protocol, and can be ignored if you
  don't wish to use it.  Simply configure gpm or X to use /dev/ttyS0 (or
  whatever) as usual.


  To use both at once, you can use gpm -M to re-export the devices.
  More details in the gpm man page.  Also, XFree 3.3.1 and later support
  muliple input devices, using the XInput mechanism.  Auto-generated
  XF86Config files should have the necessary comments in them.

  10.  XF86Config and Xconfig file examples

  The location of your configuration file for X depends on the
  particular release and distribution you have. It will probably be
  either /etc/Xconfig, /etc/XF86Config or /usr/X11/lib/X11/XF86Config.
  You should see which one it is when you start X - it will be echoed to
  the screen before all the options are displayed. The syntax is
  slightly different between the XF86Config and Xconfig files, so both
  are given.


  Microsoft Serial Mouse


    XF86config:


       Section "Pointer"
           Protocol "microsoft"
           Device "/dev/mouse"
       EndSection

    Xconfig:


       #
       # Mouse definition and related parameters
       #
       Microsoft      "/dev/mouse"

  Microsoft Serial Mouse with Three Button Emulation


    XF86config:


       Section "Pointer"
           Protocol "microsoft"
           Device "/dev/mouse"
           Emulate3Buttons
       EndSection

    Xconfig:


       #
       # Mouse definition and related parameters
       #
       Microsoft      "/dev/mouse"
       Emulate3Buttons

  MouseSystems Three Button Serial Mouse


    XF86config:


       Section "Pointer"
           Protocol "mousesystems"
           Device "/dev/mouse"
           ClearDTR            #  These two lines probably won't be needed,
           ClearRTS            #  try without first and then just the DTR
       EndSection

    Xconfig:


       #
       # Mouse definition and related parameters
       #
       MouseSystems    "/dev/mouse"
       ClearDTR                #  These two lines probably won't be needed,
       ClearRTS                #  try without first and then just the DTR

  Microsoft Serial Mouse with gpm -R


    XF86config:

  Section "Pointer"
      Protocol "MouseSystems"
      Device "/dev/gpmdata"
  EndSection

    Xconfig:


       #
       # Mouse definition and related parameters
       #
       MouseSystems      "/dev/gpmdata"

  11.  Cables, extensions and adaptors

  The only wires needed in a mouse cable are as follows: TxD and RxD for
  data transfer, RTS and/or DTR for power sources, and ground.
  Translated into pin numbers, they are:


                   9-pin port     25-pin port
               TxD     3                2
               RxD     2                3
               RTS     7                4
               DTR     4               20
               Gnd     5                7

  The above table may be of use if you wish to make adaptors between 9-
  and 25-pin plugs, or extension cables.

  12.  Miscellaneous Problems and Setups


    If you have trouble with your mouse in X or console mode, check you
     are not running a getty on the serial line, or anything else such
     as a modem for that matter. Also check for IRQ conflicts.

    It is possible that you need to hold down the left button when
     booting X windows.  Some systems may send some sort of signal or
     spike to the mouse when X starts.

    Problems with serial devices may be due to the serial port not
     being initialised correctly at boot. This is done by the setserial
     command, run from the start-up script /etc/rc.d/rc.serial. Check
     the man page for setserial and the Serial-HOWTO for more details.
     It may be worth a little experimentation with types, for instance
     try setserial /dev/mouse uart 16550 or 16550a regardless of what
     port you actually have.  (For instance, mice don't like the
     16c550AF).

    The ClearDTR flag may not work properly on some systems, unless you
     disable the RTS/CTS handshaking with the command:


  stty -crtscts < /dev/mouse


  (Tested on UART 16450/Pentium by Vladimir Geogjaev geog
  jaev@wave.sio.rssi.ru)

    Logitech mice may require the line ChordMiddle to enable the middle
     of the three buttons to work. This line replaces Emulate3Buttons or
     goes after the /dev/mouse line in the config file. You may well
     need the ClearDTR and ClearRTS lines in your Xconfig.  Some
     Logitech mice positively do not need the ChordMiddle line - one
     symptom of this problem is that menus seem to move with the mouse
     instead of scrolling down. (From: chang@platform.com)

    Swapping buttons: use the xmodmap command to change which physical
     button registers as each mouse click. eg:  xmodmap -e "pointer = 3
     2 1"  will turn round the buttons for use in the left hand. If you
     only have a two-button mouse then it's just numbers 1 & 2.

    Acceleration: use the xset m command to change the mouse settings.
     eg xset m 2  will set the acceleration to 2. Look at the manpage
     for full details.

    Pointer offset: If the click action appears to be coming from the
     left or right of where the cursor is, it may be that your screen is
     not aligned. This is a problem with the S3 driver, which you may be
     able to fix using xvidtune. Try Invert_VCLK/InvertVCLK, or EarlySC.
     This info from Bill Lavender (lavender@MCS.COM) and Simon Hargrave.
     In the XF86Config, it might look like this:

       Subsection "Display"
           Modes       "1024x768" "800x600" "640x480" "1280x1024"
           Invert_VCLK "*" 1
           ...

    If you are getting `bouncing' of the mouse buttons, ie two clicks
     when you only wanted one, there may be something wrong with the
     mouse.  This problem has been solved for Logitech mice by Bob
     Nichols (rnichols@interaccess.com) and involves soldering some
     resistors and a chip in the mouse to debounce the microswitches.

    If some users cannot get the mouse to work but some (eg root) can,
     it is possible that the users are not running exactly the same
     thing - for instance a different version of X or a different
     Xconfig.  Check the X start-up messages carefully to make sure.

    If you find the mouse pointer is erasing things from your screen,
     you have a server config problem.  Try adding the option linear, or
     maybe nolinear to the graphics card section, or if it is a PCI
     board, the options tgui_pci_write_off and tgui_pci_read_off.  (This
     seems to be a Trident Card problem.)

    If the mouse cursor doesn't show up on the screen, but otherwise
     seems to be working, try the option "sw_cursor" in the Device
     section of the config file.

    If your mouse stops working when its sunny or when you turn a light
     on, it may be that the sensors are being swamped by light getting
     through the case.  You could try painting the inside of the case
     black, or putting some card in the top.

    Microsoft Brand mice are often a cause of problems. The newest
     ``Microsoft Serial Mouse 2.1A'' has been reported not to work on
     many systems, although unplugging it and plugging it in again may
     help.  gpm version 1.13 and higher should also support 2.1A mice,
     using the pnp mouse type.  (See the gpm section for how to re-
     export this.)  The ``Microsoft Intellimouse'' also causes problems,
     although it should now be supported by XFree version 3.3 and later.


  13.  Models Tested

  There are a lot of different mice out there, and I cannot honestly say
  that you should go out and buy one rather than the other. What I can
  do is give a list of what I think these mice do, based on experience
  and heresay.  Even with this information you should be a little
  cautious - we had two identical mice in our office on two computers,
  some things worked on one and not t'other!  Any additions to this list
  would be welcome.


  Mouse Systems optical mouse, serial version
  Works well (as you might expect from the name!) without ClearDTR or
  ClearRTS in the config.
  WiN mouse, as sold by Office World for eight quid.
  Standard dual-mode Microsoft/MouseSystems.
  Agiler Mouse 2900
  Standard dual-mode Microsoft/MouseSystems. SYSGRATION SYS2005 chip is
  solderable.
  Sicos mouse,
  Works ok, needs ClearDTR & Clear RTS in config.
  Index sell a mouse for 10 quid,
  Doesn't work in 3 button mode, but does have nice instructions :-)
  Artec mouse
  Usual dual-protocol mouse, needs `ClearDTR' set in config, NOT
  `ClearRTS'
  DynaPoint 3 button serial mouse.
  Usual dual-protocol mouse, needs `ClearDTR' AND `ClearRTS' in Xconfig.
  Genius Easymouse 3 button mouse
  Works fine with Mouseman protocol without the ChordMiddle parameter
  set.  From Roderick Johnstone (rmj@ast.cam.ac.uk)
  Truemouse, made in Taiwan
  Works OK, needs `ClearDTR' in config. (From Tim MacEachern)
  Champ brand mouse
  Needs to have switch in PC mode, which enables MouseSystems protocol
  also. (From tnugent@gucis.cit.gu.edu.au)
  MicroSpeed mouse
  Usual dual-protocol mouse.
  Venus brand ($7)
  Has a jumper inside to switch between 2 and 3 button mode.  (From
  mhoward@mth.com )
  Saturn
  Switched mouse, works OK as MouseSystems in 3-button position.  (From
  grant@oj.rsmas.miami.edu .)
  Manhattan mouse.
  Switch for `MS AM' / `PC AT' modes, MS mode works fine with the gpm -R
  method. (From komanec@umel.fee.vutbr.cz).
  Inland mouse.
  Switch for `PC/MS' modes, works fine. (From
  http://ptsg.eecs.berkeley.edu/~venkates).
  qMouse (3-button), FCC ID E6qmouse X31.
  Sells in the USA for about $10. Works with `gpm -t msc -r 20'.  No
  jumpers or switches for MouseSystems 3-button mode. Unreliable in X.
  Does not respond to echo "*n" > /dev/mouse.
  Mitsumi Mouse (2-button), FCC ID EW4ECM-S3101.
  Sells in the USA for about $12. Reliable in X and under gpm, smooth
  double-button. (These two from gustafso@math.utah.edu)
  PC Accessories mouse that i got from CompUSA for under $10.
  Has PC/MS switch on bottom.  Works OK. (From steveb@communique.net)
  First Mouse - seriously cheap at 7.79 pounds at Tempo.
  Dual Microsoft/MouseSystems, mode set by button depress at power-up.
  No switches, no links.  Four wire connection, echo '*n' doesn't work.
  `gpm -R' works a treat. (From peterk@henhouse.demon.co.uk)
  Trust 3-button mouse.
  Dual-mode with switch, works OK as MouseSystems in `PC' mode.  gpm
  doesn't like the Microsoft mode.
  Chic 410
  Works perfectly when kept in ms mode and used with the gpm -R command.
  From Stephen M. Weiss (steve@esc.ie.lehigh.edu)
  KeyMouse 3-button mouse.
  Works OK with ClearDTR and ClearRTS in Xconfig; `-o dtr' needed with
  gpm. (From EZ4PHIL@aol.com)
  Qtronix keyboard `Scorpio 60'
  All three buttons work in MouseSystems protocol.  (From
  hwe@uebemc.siemens.de)
  Tecra 720 laptop
  The glidepoint is on /dev/cua0; the stick is on /dev/psaux.  (From
  apollo@anl.gov)
  Anubis mouse
  Works fine, need to hold down left button whenever switching to the X
  virtual console.  (From Joel Crisp)
  Yakumo No.1900 mouse
  Works with gpm -R -t ms exporting to X.  (From Oliver Schwank)
  Genius `Easy Trak' Trackball
  Is not Microsoft compatible, use Mouseman in the Xconfig and it will
  work fine.  (From VTanger@aol.com.)
  Highscreen Mouse Pro
  `Works fine' says alfonso@univaq.it.
  Logitech CA series
  Works in X using MMseries protocol, at 2400 Baud, 150 SampleRate.
  (Should also apply to Logitech CC, CE, C7 & C9 mice).  (From
  vkochend@nyx.net.)
  A4-Tech mouse
  Works OK, needs DTR line under both X and gpm.  (From
  deane@gooroos.com)
  Vertech mouse
  Normal Microsoft/Mousesystems behaviour, can be soldered for a
  permenant fix.  (From duncan@fs3.ph.man.ac.uk.)
  Boeder M-7 ``Bit Star'' (and other M series apart from M13)
  Switches to Mousesystems protocol by holding any button down at power-
  on.  (From mailto:sjt@tappin.force9.co.uk.)
  Mouse Systems ``Scroll'' Mouse (four buttons and a roller/button)
  Has a 2/3 switch - in mode 3 functions as a three button MouseSystems
  mouse, ignoring extra button & wheel.  Doesn't need ClearRTS/DTR.
  (From parker1@airmail.net.)
  Radio Shack 3-button Serial Mouse
  Model 26-8432, available in Tandy for about 20 quid. Works as
  Mousesystems with ClearDTR. (From Sherilyn@sidaway.demon.co.uk.)
  Dexxa serial mouse
  Works fine using Microsoft protocol in Xconfig, no ChordMiddle or
  anything needed.  (From mailto:slevy@ncsa.uiuc.edu.)
  Belkin 3 button mouse
  As purchased from Sears (\$10), needs -o rts under gpm (and probably
  ClearRTS under X) when in PC mode.  (From mailto:mmicek@csz.com.)

  14.  Further Information


    Mouse Systems has a web site at http://www.mousesystems.com/.  They
     have a Windows driver if you need one.

    The Linux Serial HOWTO is available from mirrors of sunsite around
     the world.  If you don't know where your nearest mirror is, start
     at http://sunsite.unc.edu/mdw/linux.html

    There is a very good explanation of how mice work at
     http://www.4QD.co.uk/faq/meece.html.

    Fuller details of the Xconfig and XF86Config files are found on the
     relevant man pages, and in the documentation about installing X
     windows such as the Xfree86 HOWTO. Also, see the XFree86 FAQ at a
     mirror of http://www.XFree86.org/.

    Information about gpm can be found on the man page, also try the
     web page of Darin Ernst at http://www.castle.net/X-
     notebook/mouse.txt.

    Lots of information on mice hardware and software can be found at
     http://www.hut.fi/Misc/Electronics/pc/interface.html#mouse


  15.  Mouse Tail

  Much of the information for this document has been trawled from the
  various linux newsgroups. I am sorry I did not keep a record of
  everyone who has indirectly contributed by this route, thank you all
  very much.


  So, to sum up:


    Even cheap 3 button Microsoft mice can be made to work.

    Configure your copy of X to expect a Mouse Systems mouse.

    Hold down the left button at power-on to switch the mouse to
     MouseSystems mode.

    You might need to hold the left button down when starting X.

    Mice are more intelligent than you think.

  ADSL HOWTO for Linux Systems
  David Fannin, dfannin@sushisoft.com
  v0.92, 10 April 1999

  How to setup a Linux System to work with Asymmetric Digital Subscriber
  Loop (ADSL), a new high-speed digital access line technology available
  from Telcos. ADSL is one of a family of digital subscriber line (DSL)
  technologies available to residential and business customers using
  existing copper loops, providing speeds from 384kbps to 1.5Mbps. This
  document provides an introduction to ADSL, and information on how to
  install, configuration and turn up service.
  ______________________________________________________________________

  Table of Contents


  1. Legal Stuff

  2. Introduction

  3. ADSL Overview

     3.1 What is ADSL?
     3.2 ADSL Applications
     3.3 What is xDSL/DSL?
     3.4 Why so many speeds?

  4. How it works.

     4.1 CPE: ADSL ANT and NIC
     4.2 Splitter or Splitterless Design
     4.3 DSLAM
     4.4 ISP connection

  5. Ordering Service

     5.1 Home Requirements
     5.2 Telco Options
     5.3 ISP Options

  6. Wiring it up

     6.1 Wire the Splitter/NID (at the SNI)
     6.2 Wire the DSL Jack (at the computer location)
     6.3 Install the ANT (at the computer location)

  7. Configuring Linux

     7.1 Install and Connect the NIC card
     7.2 Configure the Ethernet Interface
     7.3 Setting up a Router
     7.4 Setting up a Firewall/Masquerading

  8. Appendix

     8.1 FAQs
     8.2 Links
     8.3 Credits
     8.4 Glossary


  ______________________________________________________________________



  1.  Legal Stuff

  ADSL HOWTO for Linux Systems

  Copyright (C)1998,1999 David Fannin.

  This document  is free; you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free
  Software Foundation; either version 2 of the License, or (at your
  option) any later version.

  This document is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You can get a copy of the GNU GPL at at
  <http://www.gnu.org/copyleft/gpl.html>.


  2.  Introduction

  This document addresses the ordering, installation and configuration
  of ADSL service for use on Linux Systems.


  ADSL or Asymmetric Digital Subscriber Loop is a high-speed  Internet
  access technology that uses a commonly available telephone copper loop
  (same wire as your phone service).  Designed to run on up to 80% of
  the telephone available in the United States,  and utilizing line-
  adaptive modulation,  ADSL provides data speeds from 384kbps to 1.5
  Mbps, normally using different speeds for the upstream and downstream
  channel (hence the " Asymmetric" ).  ADSL provides a direct, dedicated
  pipe to an ISP.


  ADSL was designed for SOHO applications, such as a small business with
  5-30 systems, or the high-end Linux user that has wants bandwidth and
  has some money to spend.   Applications range from low-bandwidth
  server interconnection to streaming video applications.  ADSL is
  designed and priced somewhere in between ISDN and T1 service,
  providing near T1 speeds without the cost/complexity/availability
  issues of T1.  Since ADSL is a dedicated service, it avoids the delays
  and use charges inherent in ISDN service.

  This HOW-TO starts with a description of ADSL services and it many
  variants, and a block diagram of the components that make up the
  service.  Next, a list of requirements for ordering ADSL are provided.
  Also included is guide on ADSL wiring and configuring your Linux
  System.  I have also included an Appendix with a FAQ, a listing of
  interesting Links,and a Glossary.

  I welcome any and all comments on this document; They can be sent to
  dfannin@dnai.com .

  The latest version of this FAQ is available from
  <http://www.sushisoft.com/adsl/>.


  3.  ADSL Overview


  3.1.  What is ADSL?

  Asymmetric Digital Subscriber Line (ADSL) is:

    A Telephone Loop Technology that uses existing phone lines

    Provides high-speed data and analog voice (Data over Voice)

    Dedicated digital line for an IP connection

    Data rates (North America) combinations of :
     Upstream/downstream
     256 kbps/256 kbps
     384 kbps/128 kbps
     384 kbps/384 kbps
     384 kbps/1.5 Mbps
     and many others

    Wide range of CPE options, including Ethernet 10baseT Interfaces.

    Dedicated ISP connection (static or dynamic addresses)

    Can support an IP subnet (from 1 to 254 IP addresses, depending on
     ISP)

    Priced lower than dedicated private line (T1) connections



  3.2.  ADSL Applications

  ADSL was designed to provide a dedicated, high-speed data connection
  for Internet/Intranet Access, using existing copper phone lines.  This
  allows ADSL to work on over 60-80% of the phone lines existing in the
  U.S. without modification.  Additionally, ADSL provides speeds
  approaching T1 (1.5Mbps), which are much greater than analog modems
  (56kbps) or ISDN (128kbps) services provided over the same type of
  line.  ADSL is usually priced to be much less other dedicated digital
  services, and is expected to priced somewhere between T1 and ISDN
  services (including the ISDN usage charges).

  The Telcos see ADSL as a competitive offering to the Cable Company's
  Cable Modems, and as such, are expected to provide competitive
  pricing/configuration offerings.  Although Cable Modems  are
  advertised as having 10-30Mbps bandwidth, they use a shared
  transmission medium with many other users on the same line, and
  therefore performance varies, perhaps greatly, with the amount of
  traffic and other users.


  ADSL is positioned for Home and Small Office (SOHO) applications that
  require high-speed Internet Access. Since it also provides dedicated
  access, It can be used for interconnecting low-bandwidth servers to
  the Internet, and would provide a great access solution for 5-20 PCs
  in an Office location.  It is also a great solution for those Linux
  power users that just want high speed access from home:-).


  3.3.  What is xDSL/DSL?

  Digital Subscriber Line (DSL) provides a dedicated digital circuit
  from your home to the Telcos central office, using analog telephone
  line.  DSL also provides a separate channel for voice phone
  conversations, which means analog calls (voice, fax. etc.) can be
  carried at the same time high-speed data is flowing across the line.
  DSL uses the frequency spectrum between 0kHz-4kHz for Analog Voice,
  and 4kHz-2.2MHz for data.  xDSL is a generic acronym for a family of
  dedicated services, where the " x"stands for:


    ADSL Asymmetric Digital Subscriber Line:     1.5
     Mbps-384kbps/384-128kbps

    HDSL High-bit-rate Digital Subscriber Line:  1.5 Mbps/1.5 Mbps
     (4Wire)

    SDSL Single-line Digital Subscriber Line:    1.5 Mbps/1.5 Mbps
     (2Wire)

    VDSL Very high Digital Subscriber Line:      13 Mbps-52 Mbps/1.5
     Mbps- 2.3 Mbps.

    IDSL ISDN Digital Subscriber Line:   128 Kbps/128 Kbps.

    RADSL Rate Adaptive Digital Subscriber Line:  384kbps/128kbps

    UDSL Universal Digital Subscriber Line:
     1.0Mbps-384kbps/384kbps-128kbps
     also called " splitterless" DSL or DSL-Lite, as it doesn't require
     a splitter.

  where Xbps/Ybps is X=Downstream Bit rate, Y=Upstream Bit rate

  3.4.  Why so many speeds?

  ADSL has to work over existing phone lines, which were designed 100
  years ago, and were never designed for digital services (See the FAQ
  answers for more information). Also, ADSL is a new service, and all
  the providers are trying to find the right price/feature combinations
  that will make it in the market.

  For the average user, the basic way of thinking about it is to segment
  the options into three categories:

    Low End Residential

       Speed ranges from 384kbps-128kbps, Asymmetric


    High End Residential or Business End User

       Speed ranges from 1.5Mbps-384kbps, Asymmetric


    High End Server

       Speed ranges from +2.0Mbps-1.1kbps, Symmetric



  4.  How it works.

  ADSL is made up of several parts (shown by Figures 1 and 2):


    ADSL Network Termination (ANT) and Network Interface Card (NIC)

    Splitter or Splitterless Design

    DSLAM and Telco Loop

    ISP connection



  Figure 1: ADSL Block Diagram (POTS Splitter)


  <-------Home/Office--------------->              <-----Telco Central Office---->
                                 NID
                                -----               -----
  2 wire     X-----------Voice-=| S |               | D |
  phone                         | P |               | S |=----- Voice Switch
  line                          | L |    2 wire     | L |
                                | I |=-------------=| A |
                                | T |   Local Loop  | M |=----- ISP Connection
  10baseT       ---------- Data | T |               |   |
  Ethernet  X--=|        |=----=| E |               -----
    or          ----------      | R |
  ATMF            ADSL          -----
  NIC             ANT



  4.1.  CPE: ADSL ANT and NIC

  The Customer Premises Equipment (CPE) for ADSL consists of the ANT
  and/or NIC card.  The ADSL Network Termination (ANT), shown in Figure
  1, is located at your home or office, provides an IP connection. ANTs
  come in several types:

    Router ANT with 10/100baseT Interface

    Bridge ANT with 10/100baseT Interface

    ANT with ATMF Interface

    ANT with USB Interface

    Integrated ANT/NIC Card

  In each case, the ANT/NIC  provides the a router address to an ISP.
  Each Telco will specify the configurations that they will allow.  The
  most desirable configuration for the Linux user is the ANT with a
  10baseT Interface, since the cost/setup is the easiest. The other
  options require special drivers, which have, to date, not been made
  available for Linux. The bad news is that some providers  allow only
  integrated ANT/NIC PCI cards that do not have Linux Drivers.

  Warning!  Make sure any third party ANT/NIC you may purchase are
  compatible with your Telco provider. There are two major line
  encodings for ADSL (CAP, DMT), and several options for IP
  encapsulation. Your Telco should provide you a list of allowable
  options.

  The ANT is connected to your house's inside wire (2 wire phone line).
  This inside wire is connected to the data side of a POTS splitter, or,
  in the case of the splitterless version, directly connected to the
  local loop.  Figure 1 shows the POTS splitter wiring, and Figure 2
  shows a splitterless type.

  In my case, I was provided with an Alcatel ANT, which supports a
  10baseT (wired as a Crossover) RJ45 jack. I understand that a NIC card
  that fits directly in the PC will be available sometime in the future.



  Figure 2: ADSL Block Diagram (Splitterless Design)


  <-------Home/Office--------------->           <-----Telco Central Office---->
                               SNI
                                -               -----
  2 wire    X-[RJ11]---Voice----|               | D |
  phone       Filter            |               | S |=----- Voice Switch
  line                          |    2 wire     | L |
                                |=-------------=| A |
                                |   Local Loop  | M |=----- ISP Connection
  10baseT       ---------- Data |               |   |
  Ethernet  X--=|        |=-----|               -----
    or          ----------
  ATMF            ADSL
  NIC             ANT



  4.2.  Splitter or Splitterless Design

  Somehow, the digital and analog signals need to be separated  for all
  of this to work. Thus, a filter needs to be placed in the signal path
  at some point.  There are two methods for doing this: Using a POTS
  Splitter or using RJ11 phone jack filters.

  First, in the POTS splitter method, device  is located on the "side of
  the house" where the Telco line is connected. The splitter provides
  two functions. First, it is the "demarcation point" that separates the
  Telco wiring from the inside wiring. Second, it "splits" the DSL
  signal from Telco into a separated data channel and a voice channel.
  The voice channel is a normal analog phone line (2 wire), and the data
  channel is sent to the ANT.  The splitter is a passive, non-powered
  device, which will allow the voice channel to operate even if the
  power fails at the home location. The Telco signal is sent to the
  splitter using an existing 2 wire line to the home.  The Splitter is
  housed in the Network Interface Device (NID) on the outside of your
  house.

  Second, in the splitterless design, shown in Figure 2, the outside
  local loop is connected directly to the inside wire at the Subscriber
  Network Interface (SNI), the same box that is used today at your
  house. At each extension jack where you wish to plug in an analog
  phone, you place a special jack that contains a filter that removes
  the digital signal. This is called an RJ11 filter (RJ11 is the
  official Telco term used for your 4/6 pin phone jack).  The extension
  used for your ANT does NOT use a filter (otherwise it won't work).
  That's all there is to it!  It should also be noted that some low
  speed ADSLs will  not require RJ-11 filters.

  The splitterless design is very desirable from the Telco point of
  view, as they won't have to roll any trucks to do the install work,
  and allows them to offer ADSL at a lower price. For most users, it
  doesn't really matter, in fact, the analog phones will still work
  without the RJ11 filter in place. The only thing is that you will hear
  a bit of a high pitched whine when you use the phone.  However, this
  is not recommended, as later version may damage the phone or have some
  other nasty effect.


  4.3.  DSLAM

  The DSLAM is the equipment at the Telco Central Office that that
  splits the signal and connects the user to the Voice Switch and ISP.
  That's all you need to know from a user perspective.

  4.4.  ISP connection

  An ISP connects to the DSLAM via a high-speed data connection, usually
  ATM over a T3 (45Mbps) or OC-3 (155Mbps).  The important thing here is
  that an ISP must "subscribe" with your Telco to provide this
  connection.


  5.  Ordering Service

  The basic procedure is as follows:

    Check to see if you meet the following requirements for ADSL.

    Select a Telco and ISP, and see what configurations they offer.

    Call the Telco and order the service.

  Once you have ordered the service, the Telco should provide you with a
  Due Date. I was able to do the entire order in one phone call through
  my Telco, and they coordinated with the order with my ISP.  I was
  given a due date that was one week later, and everything was completed
  on time, with no problems.


  5.1.  Home Requirements


    An appropriate NIC card

     The system (PC, workstation, router or hub) that will be directly
     connected to the ADSL ANT .


    Inside Wiring

     You need inside wire (2 or 4 wire) from the Telco Demarcation Point
     (the side of your house) to your PC location. Your existing phone
     line can be used. However, this inside wire can only be used for
     the ANT, and no other phones or extensions can be connected to this
     line. The Telcos or other companies can be contracted to install a
     new wire for you as well.


    Installation


     Who will wire it up in your house?  You can do the splitter wiring
     yourself (My local Telco provided a wiring kit and instructions for
     performing the inside wiring ) or you can contract them do it for
     an additional fee.  You can save around $ 150-250 dollars by doing
     it yourself, which I did, or you can save yourself the hassle and
     have them do it. You can decide what you want to do after reading
     the procedure that I have included in this document.  The bottom
     line is if you are used to dealing with phone and/or network LAN
     wiring procedures, and feel comfortable with doing this, then you
     should consider going for it.  If you haven't, and your company is
     going to pay for it, then have them do it.



  5.2.  Telco Options


    Qualified Copper Loop

     The Telco will normally test your line before you order service to
     see if it is can pass the ADSL signal.  You must be within 2-3
     miles (11-16 kilofeet) of the Central Office, and have a loop that
     has no loading coils, bridge taps, DAMLs, or other impediments.
     Most of the Loops that support ISDN can also support ADSL, but
     since ADSL is more restrictive, this is no guarantee of success.
     Your Telco will help you here.


    ADSL Available from your Telco

     Is the ADSL/DSLAM equipment is available at your Central Office?
     Again, the Telco will check to see if it available in your area.
     Every major Telco in the US, and many new dedicated ADSL providers
     have announced plans for ADSL. I expect wide scale deployment by
     1Q99.


    Bit Rate

     ADSL is priced according to the Bit Rate - Check with your Telco.
     You can usually order some combination of 128k,256k,384k, or 1.5M
     speeds.  Your loop may restrict the bit rate you can be offered.
     My Telco also prices the service differently if you're a Residence
     or Business Customer.


    POTS Service


     Some providers (usually the big Telcos) offer POTS with ASDL. If
     you choose this option, you will need to specify which phone number
     (new or existing) you want assigned to it. You will need to
     designation whether you want the ADSL to go over an existing POTS
     service, or whether you want a new phone number for the analog
     phone line. If you have ISDN service, and want to use the same
     line, the ISDN service must first be disconnected. Note that some
     Telcos (usually dedicated DSL providers) do not offer this option.



  5.3.  ISP Options


    ISP Presubscription

     Your ISP of choice must be presubscribed with the ADSL Telco
     provider. Check with your ISP to see if they are connected.  If
     they are not connected then you must either move to another ISP,
     convince them to connect up, or decide not to use ADSL.



    IP Subnet and Address.

     First, you'll need to know whether your IP addressing will be
     static or dynamic. Dynamic addressing is set through the use of
     DHCP.

     Additionally, for static addressing, ISPs will allow anywhere from
     1 to 254 IP addresses to be assigned to an ADSL line, with the
     corresponding Variable Length Subnet Mask (VLSM).

     My ISP charges more money as you get more hosts. I suspect that
     most applications will use either 1 host (32 bit mask) or 6 hosts
     (29 bit mask).  If your confused, then read the IP-Subnetting
     HOWTO.  Also remember than multi-host subnets require 1 of the
     hosts to be the ISP router address (meaning that the 6 host subnet
     is really 5 hosts to you) and you can use IP Masquerading/ (see the
     HOWTO) or Network Address Translation (NAT) to support a larger
     number of addresses behind your LAN. If you request more than 30
     hosts, be prepared to fill out a justification form for your ISP.


    Gateway Address

     The default gateway address. Normally, this is the first host
     address in your subnet. (e.g. if your subnet range and mask is
     192.168.1.240/29, then your host range is .241 through .246, with
     the default gateway assigned to the .241 address.


    Number of MAC addresses

     The ANTs can support a set number of MAC addresses for bridging.
     For example, the ADSL ANT that I use is limited to 16 MAC
     addresses. This should be sufficient for most applications.
     However, if you plan to support a large number of machines directly
     off the hub of the  ANT, you should check first to see what your
     limit is.


    DNS Servers

     The ISP should provide you with one or more DNS server addresses to
     support Domain Name Lookups.  Some ISPs also provide Domain Name
     Server hosting (either primary or secondary server) for you as part
     of the dedicated service packages. See your ISP for more details.


    User ID and Password.

     The ISP will normally assign you a login/password for shell, mail,
     etc. access. My ISP also provides web space, mail server, and some
     other goodies.



  6.  Wiring it up

  If you have ordered the installation option from the Telco, then you
  can skip this section and move to " Configuring Linux" .  The
  following procedures are meant to illustrate the wiring process.
  Please note that your procedures may be different at your location.
  Make sure you follow any warnings or safety instructions provided, and
  that you are familiar with Telco wiring procedures.

  The first step will be to wire up the connections from your Telco.
  Identify the line on which service will be installed, and the
  locations of your splitter and DSL jacks.

  6.1.  Wire the Splitter/NID (at the SNI)

  If you have the splitterless design, you can skip this part.

  The splitter will consist of two parts, the splitter and a small
  outdoor housing, called the Network Interface Device.  Mount the
  splitter and NID housing per the Telcos instructions at the Subscriber
  Network Interface (SNI) point, usually the side of your house where
  the phone line is located.  The phone company will need to access the
  splitter for maintenance, so its advisable to locate it on the outside
  where they can get at it.  Connect the incoming 2W Telco line to the "
  LINE"side of the splitter. Then wire the inside pair for your
  telephone to the "VOICE" , and your inside wire pair for the ANT to
  "DATA".

  Checkstep At this point, you should be able to pull dial tone off the
  voice side of the splitter. If this doesn't work, then either you've
  wired it wrong, or the ADSL service is not yet connected on the Telco
  side.


  6.2.  Wire the DSL Jack (at the computer location)

  Wire up the DSL jack (RJ11)  at your computer location (connected to
  the DATA side of the splitter). The specifics differ greatly for each
  situation, but basically you will have a 2 wire pair that you will
  connect to the DSL jack. Make sure you read the directions, as the
  DSL-RJ11 wiring is different for phones and ADSL jacks.  In my case,
  you wire the phone jack on the red/green pair (the two inside prongs
  of the RJ11 jack) and the ADSL jack is wired on the yellow/black pair
  (the two outside prongs of the RJ11 jack).

  6.3.  Install the ANT (at the computer location)

  Connect up the ANT's power cord, and connect the phone line (category
  3 cable) between the DSL jack and the ANT.  This cable is usually
  provided.

  Checkstep  At this point, verify the ANT syncs up to the Telco signal.
  Most ANTs have an green LED that lights up when the signal is good.
  If it doesn't sync, then check your wiring, or make sure that the
  Telco signal is being sent (do this by calling your Telco and
  verifying they have activated the service. Note that having dial tone
  on the line does NOT confirm the presence of the ADSL data signal.)

  If you have completed the previous steps, you are now ready to move on
  to connecting your Linux System.


  7.  Configuring Linux

  After you have wired up the  ANT and you're getting the sync signal,
  then you're ready to configure your Linux System and verify your
  connection to your ISP.  Although I will refer to a Linux System, you
  can connect any type of 10baseT device to the ANT. This includes a
  router, hub, PC, or any other system that you wish to use.

   Caution! Before you connect to your ISP, make sure you understand all
  security issues of having a direct connection to the Internet via
  ADSL. Depending on your ISP, most outside uses can access your
  systems, and you should setup any firewalls, deactivate
  ports/services, and setup any passwords prior to connecting your
  machine to the world.  Read the Security-HOWTO if you need a good
  overview on this subject.


  7.1.  Install and Connect the NIC card

  Install your NIC card in your Linux machine, configure the kernel,
  etc., etc.  See the various Linux references for doing this. See the
  Ethernet-HOWTO for more information.

  Connect the RJ45 cable between the NIC and the ANT. Note A gotcha here
  is that some ANTs are already wired as a 10baseT crossover, and
  require a direct Category 5 cable for a direct connection to a NIC,
  rather than a crossover cable.  I lost around 12 hours figuring this
  one out, so don't make the same mistake -  make sure you read the
  instructions first.


  7.2.  Configure the Ethernet Interface

  Configure the IP address, Subnet Mask, Default Gateway, and DNS server
  information.  Each Linux Distribution (RH, debian, Slackware,
  S.U.S.E.)  has a different way of doing this, so check on your
  particulars.  You can also do this manually using the ifconfig and
  route commands. See the NET3-HOWTO for information for more
  information.

  Once your system is configured, see if you can ping to the your
  default gateway address provided by the ISP.  If the ping is
  successful, the you should see around 20 ms roundtrip delay for this
  connection.  Congratulations, you're connected to the Net!


  7.3.  Setting up a Router

  Depending on your local setup, you should consider some other issues.
  These include a firewall setup, and any associated configurations.
  For my setup, shown in Figure 3, I use an old i486 machine configured
  as a firewall/router between the ADSL connection and the rest of my
  machines.  I use private IP addresses on my Private LAN subnet, and
  have configured my router to provide IP Masquerading and Firewalling
  between the LAN and Internet connection. See the IP_Masquerading-
  HOWTO, and Firewall-HOWTO for more information. My experience is that
  Linux provides superior routing/firewalling performance , and is much
  cheap than a commercial router, if you find an old 386/486 machine
  that you may be using as a doorstop somewhere.



  Figure 3: My  SOHO Network Setup


  <-Private Subnet-->         <-Public Subnet->    <-ADSL Line--------->
                                       |
                                  X----|
                                       |
       X------|                   X----|     |----|
              |      |--------|        |     |ADSL|            Internet
              |      | Linux  |        |-----|ANT |----------> Service
       X------|------| System |--------|     |    |            Provider
              |    E1|(Router)|E0      |     |----|            Router
              |      |--------|        |
       X------|        IP_Masq      10baseT
                     IP_Firewall     Hub



  What I did is setup a router (Linux RH 5.0  on a i486) with two
  Ethernet interfaces.  One interface routes to the ISP subnet/gateway,
  and the other interface supports a class private network  address
  (i.e. 192.168.2.x).   Using the private network address behind your
  router allows some additional security because it is not directly
  addressable from outside your ISP.   You have to explicitly masquerade
  your private  addresses in order to connect to the Internet.

  Caution Make sure your kernel is complied with IP forwarding and the
  IP forwarding is turned on. You can check this by

  cat /proc/sys/net/ipv4/ip_forward


  The value is "1" for on, and "0" for off.  You can change this value
  by echoing the desired value into this file.

  (e.g.) echo 1 > /proc/sys/net/ipv4/ip_forward


  Will turn forwarding on.


  7.4.  Setting up a Firewall/Masquerading

  If you have a direct connection to the Internet, then you want to also
  turn on Firewall Administration and Masquerading. Figure 4 shows a
  picture of this.

  Caution!  I also need to stress that this configuration is only part
  of the things that need to be performed to create a secure
  environment. Other considerations include turning off ftp, telnet, and
  other services on the Router, and ensuring all password, login, etc.
  configurations are correctly setup for your environment.  Make sure
  you read the Security-HOWTO.

  Figure 4: Firewall/Masquerading for ADSL

         |-------|       |-------|     |-X
  ======X| ADSL  |=------| Linux |-----|
  ADSL   |  ANT  |     E0|       |E1   |-X   Private Network
  Line   |-------|       |-------|     |     (e.g. 192.168.2.x)
                 <------->             |...
               ISP Subnet or host
              (Public Net Address)



  The kernel for the Linux  router is complied for IP
  forwarding/masquerading, and has the "ipfwadm" (IP firewall software)
  installed with the following options:

  file: /etc/rc.d/rc.firewall  (called by rc.sysinit in RH5.0)



  echo "Setting up the firewall"
  #
  # From the "Firewall-HOWTO"
  #
  # flushes all setting
  #
  ipfwadm -F -f
  #
  # set the firewall
  #
  ipfwadm -F -p deny
  #
  # allow any machine with address 192.168.2.x to masquerade.
  #
  ipfwadm -F -a accept -m -S 192.168.2.0/24 -D 0.0.0.0/0
  #
  # allow the domain name server to work (udp 53)
  #
  ipfwadm -F -a accept -b -P udp -S 0.0.0.0/0 53 -D 192.168.2.0/24
  ipfwadm -F -p masquerade
  #
  # the rest just list out the options for your enjoyment
  #
  ipfwadm -F -l
  ipfwadm -O -l
  ipfwadm -I -l



  You need to be careful, as some application will still not work
  without special modules (namely ftp, real audio, and some others).
  Check the ipfwadm documentation for more information.  I found this
  pretty easy to set up.

  Additionally, using the private network addressing scheme is cheap,
  and gives an administrator complete flexibility in setting up their
  local LAN.  The drawback is that Masquerading has a limit on the
  number of private hosts that it can reasonably support, and that some
  IP applications that pass the host address in their data fields will
  not work, but this tends to be a limited number.


  8.  Appendix

  8.1.  FAQs

  This is the Frequently Asked Questions (FAQ) section for ADSL.


  1. Q: Are there ADSL Standards.

     A: Sort of. The U.S. Bell Operating Companies have standardized on
     Discrete Multi-Tone (DMT) ANTs (ANSI T1.413)  in their current
     rollout.  Most others should follow their lead in the states. There
     are other types of ANTs, most notably Carrier-less Amplitude Phase
     Modulation (CAP), which, of course, are incompatible with each
     other.

     A biased comparison from an DMT-based vendor on this subject can be
     found at the Aware <http://www.aware.com>.  Still, it provides the
     best detail on this issue I have seen so far.

     A rather expensive copy of the ANSI standard can be ordered at:
     American National Standards Institute ANSI Home Page
     <http://www.ansi.org>
     Asymmetric Digital Subscriber Line (ADSL) Metallic Interface
     ANSI TI.413-1995
     Note: ANSI TI.413 Issue 2 was released September 26, 1997


  2. Q: Can I use ATM to connect to ADSL ANT?

     A: Yes, you can! Some ADSL ANT (at least the Alcatel version) has a
     ATM Forum 25Mbps interface, which connects to a PCI NIC card.
     However, I have not yet heard of any Linux drivers for such cards.


  3. Q: Why the heck does ADSL have all these bit rates
     (384/1.5/8M/20M/etc) options?

     A: The basic problem is the 100 year old design of the copper loop.
     It works great for analog phone, but it presents a real challenge
     for a digital signal. Remember that the distance of a loop is
     inversely proportional to the data rate that it can carry.  Rate-
     Adaptive technologies are great for making a digital signal work in
     many situations, but it can't provide a consistent bandwidth for
     all applications, especially for very long (over 18 kilofeet)
     loops.  The different bandwidth that you see advertised reflect
     various marketing wars of vendors equipment, and the Telco struggle
     to finalize on a ''standard'' set of data rates.  I think that the
     384k/1.5Mbps will become the standard for now. The high bit rates
     will only be available for special application and/or situations,
     since they can only be provided on a small percentage of the
     available loops.

     Also, check out the next question on the loop imparments that cause
     this to happen.


  4. Q: What are all these loop imparments (bridge taps, loading coils)
     that could disqualify my line from using ADSL? (thanks to Bruce
     Ediger)

     Load coils: in-line inductances that improve voice-frequency
     transmission characteristics of a telephone circuit.  Essentially,
     a "load" steals energy from high frequencies and gives it to lower
     frequencies.  Typically only used in very long (>9,000 ft) phone
     lines.

     By "bridges" I assume you mean "bridged taps".  In older
     neighborhoods, the phone wiring will have been used by more than
     one customer.  Perhaps these customers lived at different (though
     near-by) addresses.  The unconnected "spur" of wiring is a "bridged
     tab" on the currently connected circuit.

     Digital loop carriers: there's a bunch of systems for carrying more
     than one voice transmission on a single pair of wires.  You can
     shift the frequencies up or down, or you can digitize the voice
     transmissions and divide the telephone circuit by time or code or
     something.  The more general term is "pair gain".

     These things cause different problems for high-frequency
     communication.

     Loads will completely mess up things by filtering high frequencies
     and passing low frequencies.  They probably also change the "delay
     envelope", allowing some frequencies to arrive before others.  One
     byte's tones will interfere with the next byte's.

     Bridged taps act as shunt capacitances if they're long in relation
     to the signals wavelength, and they'll actually act as band pass
     filters if they're about 1/4 wavelength of the signal.  That is,
     they'll pass particular frequencies freely.  Particular tones of a
     DMT modem might get shunted back, rather than passed along to the
     receiving modem, reducing bandwidth for that telephone line.

     Pair gain, digital or analog, limit the bandwidth available to one
     transmission in order to multiplex several on one wire.  High and
     low tones of a DMT transmission get filtered out by the apparatus.

     The book "Subscriber Loop Signaling and Transmission Handbook", by
     Whitham D. Reeve, , IEEE Press 1992, ISBN 0-87942-274-2 covers the
     math of how to calculate the effect of line length, bridged tap,
     etc on the transmission characteristics of a telephone line.  It's
     pretty expensive, however.


  5. Q: Do you have examples of ADSL ANTs?

     A: Short Answer: Yes. Real Answer: The evolution of this technology
     is  moving too rapidly for anyone to keep up to date in a HOWTO.  A
     good source of ADSL ANTs is the ADSL Forum Home Page
     <http://www.adsl.com>.  Go to the Vendors pages to see what's
     happening.

     However, I will provide a list of some of the current technology as
     of June 1998.



    Router ANT with 10/100baseT Interface


     Examples: Flowpoint 2000 DSL (CAP), Netspeed Speedrunner 202 (CAP),
     Speedrunner 204 (CAP), 3COM Viper-DSL (CAP), StarNet Ezlink 500/100
     (DMT), Westell ATU-R-Flexcap (CAP), Aware x200


    Bridge ANT with 10/100baseT Interface

     Examples: Alcatel A1000 (DMT),  Westell ATU-R-Flexcap2 (CAP)


    ANT with ATMF Interface

     Examples: Alcatel A1000 (DMT), Netspeed Speedrunner 203 (CAP),
     Ariel Horizon II


    Bridge ANT with V.35 Serial Interface (T1, Serial Router)

     Examples: Westell ATU-R


    ANT with USB Interface


     Rumored to being pushed by Intel.


    Integrated ANT/NIC Card

     Examples: Netspeed PCI Runner (CAP), Efficient Networks Speedstream
     3020 (DMT)

     These are NOT endorsements of the products listed, just provided
     for illustration.;-).

  8.2.  Links


    ADSL Forum Home Page <http://www.adsl.com> A comprehensive web site
     created by the adsl vendors. Fairly complete for reference
     information on ADSL.


    Dan Kegels ADSL Page
     <http://www.alumni.caltech.edu/~dank/isdn/adsl.html> A good general
     reference on xDSL - includes vendor, service provider, and other
     links. This page was getting a little long in the tooth as of 2Q98.
     Dan also maintains a super page on ISDN.


    PacBell's ADSL Page
     <http://www.pacbell.com/products/business/fastrak/adsl/index.html>
     Pacific Bell is the local Telco and my provider of ADSL service.



    Jeremie's Unofficial Ameritech ADSL FAQ
     <http://www.rc.lsa.umich.edu/~jeremie/adsl/>


    Telechoice xDSL News Page
     <http://www.telechoice.com/xdslnewz/indexDSL.cgi>


    ADSL Deployment 'round the World
     <http://www.geocities.com/Paris/Metro/5013/adsl.html> Claims to
     have a complete list - looked accurate for my area - gives
     providers, prices, speeds, etc.


    Bell Atlantic ADSL Home Page <http://www.bell-atl.com/adsl>


    comp.dcom.xdsl FAQ <http://homepage.interaccess.com/~jkristof/xdsl-
     faq.txt>



  8.3.  Credits

  Thanks to all those that contributed information to this HOWTO.  I
  have anti-spammed their email addresses for their safety (and mine!).
  Remove the X's from their names.


    B Ediger (Xbediger@csn.net) Great Description of loop impairment.

    C Wiesner ( Xcraig@wkmn.com)  List of many ADSL URLs.

    J Leeuw ( Xjacco2@dds.nl) Many tips on ADSL, especially in Europe

    J Kass ( Xjeremie@umich.edu) Unoffical Ameritech ASDL FAQ

    N Silberstein ( Xnick@tpdinc.com) Info on Netrunner and his
     experience with US Worst.



  8.4.  Glossary

  A dictionary of some of the jargon I use in this FAQ.

     2 wire Copper Loop
        The two wire twisted pair from the Telco Central Office that
        terminates at a customer location.


     ADSL
        Asymmetric Digital Subscriber Line


     ANT
        ADSL Network Termination (a.k.a. the ADSL modem)


     ATM
        Asynchronous Transfer Mode - provides high-speed packet
        switching from 155 Mbps to (currently) 2Gbps. Used to provide
        backbone switching for the Internet.


     ATMF-25Mbps
        ATM Forum Interface - 25Mbps speed, provided by a PCI NIC card..
        One of the interfaces used between the ANT and PC.


     Central Office
        Usually refers to one of two meanings -1) The Telco Building
        that houses Telephone equipment 2) The Telco Voice Switch that
        provides dial tone.


     CPE
        Customer Premises Equipment - The Telco term for customer
        equipment (i.e. the stuff you are responsible for fixing).
        Examples are CSU/DSU, modems, ANTs, and your phone.


     DHCP
        Dynamic Host Configuration Protocol - The IP protocol used to
        set up dynamically assigned IP addresses.


     DS0
        The basic digital circuit for Telcos - offered at 56 kbps or
        64kbps. Can support one analog voice channel.


     DSLAM
        Digital Subscriber Line Access Multiplexer - The Telco equipment
        that concentrates and multiplexes the DSL lines.


     xDSL
        Digital Subscriber Line - A term describing a family of DSL
        services, including ADSL, SDSL, VDSL, etc.


     HDC
        See Section 2


     ISDN
        Innovations Subscribers Don't Need; I Still Don't kNow or maybe
        Integrated Services Digital Network, a digital phone service
        that uses a single copper pair to run 2B (64k) + 1D(16k)
        channels that can be used for switched voice or data.


     ISP
        Internet Service Provider


     NID
        Network Interface Device -  The housing used to protect the ADSL
        splitter from the elements.


     NIC
        Network Interface Card - A PC card (PCI/ISA) that supports the
        required network interface. Usually an Ethernet 10baseT or an
        ATMF-25Mbps Card..


     POTS
        Plain Old Telephone Service - The service that provides a single
        analog voice line. (i.e. your phone line)


     Recursion
        See "Recursion"


     SNI
        Subscriber Network Interface - The Telco term for the phone
        wiring housing on the side of your house. It designates the
        point between the Telco side and the Inside Wire.  This is also
        called the Demarcation Point.


     Splitter
        The passive device (low-bandpass filter) at the SNI that splits
        the ADSL signal into separate voice and data channels.


     Splitterless
        An ADSL installation that does not require the Splitter. For
        higher speeds, a RJ11 filter is placed on every extension phone
        jack where an analog phone is used, thus providing the filtering
        at the jack, rather than at the NID.  For lower speeds, no
        filter is required.


     SOHO
        Small Office HOme


     T1 a.k.a DS1 - A digital dedicated line at 1.544 Mbps, used for
        both Voice (24 DS0s) or Data.


     T3 a.k.a DS3 - A digital dedicated line at 44.736 Mbps, provides
        for both Voice (672 DS0s or 28 DS1s) or Data



  Linux ADSM Mini-Howto
  by Thomas Knig, Thomas.Koenig@ciw.uni-karlsruhe.de
  v, 15 January 1997

  This document describes how to install and use a client for the com
  mercial ADSM backup system for Linux/i386.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Installing the iBCS module

  3. Installing the ADSM client

  4. Running the client

  5. Known Problems

  ______________________________________________________________________

  1.  Introduction

  ADSM is a network-based backup system, sold by IBM, in use at many
  organizations.  There are clients for a large variety of systems
  (different UNIX brands, Windows, Novell, Mac, Windows NT).
  Unfortunately, at the time of this writing, there is no native Linux
  version.

  You will have to use the SCO binary, and install the iBCS2-emulator
  for running ADSM.  This description is for ADSM v2r1.

  At the time if this writing, I am only aware of a version which works
  with the i386 version of Linux.

  2.  Installing the iBCS module

  The iBCS2 module is available from
  ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2.  If you are running kernel
  version 1.2.13, get ibcs-1.2-950721.tar.gz, unpac it and apply the
  patches ibcs-1.2-950808.patch1 and ibcs-1.2-950828.patch2.  You can
  then type "make" and install the iBCS modlue with "insmod".

  For a 2.0 kernel version, get ibcs-2.0-960610.tar.gz, unpack it in a
  suitable place, chdir into that directory, and apply the following
  patch:


  --- iBCSemul/ipc.c.orig Wed Jan 15 21:32:15 1997
  +++ iBCSemul/ipc.c      Wed Jan 15 21:32:31 1997
  @@ -212,7 +212,7 @@
          switch (command) {
                  case U_SEMCTL:
                          cmd = ibcs_sem_trans(arg3);
  -                       arg4 = (union semun *)get_syscall_parameter (regs, 4);
  +                       arg4 = (union semun *)(((unsigned long *) regs->esp) + (5));
                          is_p = (struct ibcs_semid_ds *)get_fs_long(arg4->buf);
   #ifdef IBCS_TRACE
                          if ((ibcs_trace & TRACE_API) || ibcs_func_p->trace)

  Then, copy CONFIG.i386 to CONFIG, and type make.

  If you don't have them already, create the needed device files by
  executing

  # cd /dev
  # ln -s null XOR
  # ln -s null X0R
  # mknod socksys c 30 0
  # mknod spx c 30 1

  3.  Installing the ADSM client

  The SCO binary is supplied as three tar files, or disks.  Change to
  the root directory, set your umask according to your policies, and
  unpack them from there (as root).  In your Directory /tmp, you will
  find an installation script; execute that.

  You will then have to hand-edit /usr/adsm/dsm.sys and
  /usr/adsm/dsm.opt.  In dsm.sys, important lines to specify are:

     Servername
        The name of the server

     TCPServeraddress
        The fully qualified host name of the server

     NODename
        Your own hostname

  In dsm.opt, you will have to specify

     Server
        As before

     Followsymbolic
        Wether or not to follow symbolic links (not a good idea, in
        general)

     SUbdir
        Wether to back up subdirectories (you usually want that)

     domain
        The file systems to back up

  You will then have to create a SCO-compatible /etc/mnttab from your
  /etc/fstab.  You can use the following Perl script, fstab2mnttab, for
  this.

  ______________________________________________________________________
  #!/usr/bin/perl

  $mnttab_struct = "a32 a32 I L";

  open(MTAB, "/etc/mtab") || die "Cannot open /etc/mtab: $!\n";
  open(MNTTAB, ">/etc/mnttab") || die "Cannot open /etc/mnttab: $!\n";

  while(<MTAB>) {
      next if /pid/;
      chop;
      /^(\S*)\s(\S*)\s(\S*)\s.*$/;
      $device = $1;
      $mountpt = $2;
      $fstype = $3;
      if($fstype ne "nfs" && $fstype ne "proc") {
          $mnttab_rec =
              pack($mnttab_struct, $device, $mountpt, 0x9d2f, time());
          syswrite(MNTTAB, $mnttab_rec, 72);
          print "Made entry for: $device $mountpt $fstype\n";
      }
  }

  close(MNTTAB);
  exit 0;
  ______________________________________________________________________

  You do not need to install any shared libraries for these clients;
  everything is linked statically.

  4.  Running the client

  There are two clients, dsm, which is an X11 interface, and dsmc, a
  command-line interface.  Your computer centre will tell you how to run
  it.  Some startup script at boot, for example

  dsmc schedule -quiet 2>&1 >/dev/null &


  will probably be required.

  5.  Known Problems

  Unfortunately, SCO can only deal with hostnames no longer than eight
  characters.  If your hostname is longer, or fully qualified, you may
  need to specify your hostname on the NODename line in
  /usr/adsm/dsm.sys.

  If you use the DISPLAY variable, you will have to supply the fully
  qualified host name (i.e. DISPLAY=host.full.do.main:0 instead of
  DISPLAY=host:0).

  Linux Advocacy mini-HOWTO
  Paul L. Rogers, Paul.L.Rogers@li.org
  v0.5c, 3 May 2000

  This document provides suggestions for how the Linux community can
  effectively advocate the use of Linux.
  ______________________________________________________________________

  Table of Contents


  1. About this document

  2. Copyright Information

  3. Introduction

  4. Related Information

  5. Advocating Linux

  6. Canons of Conduct

  7. User Groups

  8. Vendor Relations

  9. Media Relations

  10. Acknowledgements



  ______________________________________________________________________

  1.  About this document


  This is the Linux Advocacy mini-HOWTO and is intended to provide
  guidelines and ideas to assist with your Linux advocacy efforts.

  This mini-HOWTO was inspired by Jon ``maddog'' Hall when he responded
  to a request for feedback on guidelines for advocating Linux during
  NetDay <http://www.netday.org> activities.  He responded positively to
  the guidelines and observed that they were the basis of a list of
  ``canons of conduct'' that would benefit the Linux community.

  This document is available in HTML form at
  http://www.datasync.com/~rogerspl/Advocacy-HOWTO.html.

  Nat Makarevitch <nat@nataa.fr.eu.org> has translated this document
  into French < http://www.linux-
  france.org/article/these/advocacy/Advocacy-HOWTO-fr.html>.

  Chie Nakatani <jeanne@mbox.kyoto-inet.or.jp> has translated this
  document into Japanese <http://jf.linux.or.jp/JFdocs/Advocacy.html>.

  Janusz Batko <janus@krakow.linux.org.pl> has translated this document
  into Polish <http://www.jtz.org.pl/Html/mini/Advocacy.pl.html>.

  Bruno H. Collovini <buick@microlink.com.br> has translated this
  document into Portuguese
  <http://www.microlink.com.br/~buick/dragons/op1/minihowtos/br-
  advocacy.html>.


  Mauricio Rivera Pineda <rmrivera@hotmail.com> has translated this
  document into Spanish <http://www.linux-
  es.com/docs/HOWTO/translations/es/mini/Advocacy-Mini-Como>.

  The author and maintainer of the Linux Advocacy mini-HOWTO is Paul L.
  Rogers <Paul.L.Rogers@li.org>.

  Comments and proposed additions are welcome.

  If you need to know more about the Linux Documentation Project or
  about Linux HOWTO's, feel free to contact the supervisor Tim Bynum
  <linux-howto@sunsite.unc.edu>.  Tim Bynum will post this document to
  several national and international newsgroups on a monthly basis.

  A personal note: Due to various circumstances, I have not been able to
  dedicate as much time to maintaining this mini-HOWTO and interacting
  with the Linux community as I would have desired.  I apologize for
  this and if you have attempted to contact me and I was slow in
  responding, please forgive me being so inconsiderate.  While I still
  have many other commitments, I am anticipating that they will start
  requiring less time to meet and allow me to catch up on other parts of
  my life.  I appreciate your patience and would like to extend a
  special thanks to all who have taken the time to suggest additions and
  corrections.


  2.  Copyright Information


  This mini-HOWTO is Copyright  1996-2000 by Paul L. Rogers.  All
  rights reserved.

  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author.  Translations
  are similarly permitted without express permission if it includes a
  notice on who translated it.

  Short quotes may be used without prior consent by the author.
  Derivative work and partial distributions of the Advocacy mini-HOWTO
  must be accompanied with either a verbatim copy of this file or a
  pointer to the verbatim copy.

  Commercial redistribution is allowed and encouraged; however, the
  author would like to be notified of any such distributions.

  In short, we wish to promote dissemination of this information through
  as many channels as possible.  However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  We further want that all information provided in the HOWTOs is
  disseminated.  If you have questions, please contact Tim Bynum, the
  Linux HOWTO coordinator, at linux-howto@sunsite.unc.edu.



  3.  Introduction


  The Linux community has known for some time that for many
  applications, Linux is a stable, reliable, robust (although not
  perfect) product.  Unfortunately, there are still many people,
  including key decision-makers, that are not aware of the existence of
  Linux and its capabilities.


  If Linux and the many other components that make up a Linux
  distribution are to reach their full potential, it is critical that we
  reach out to prospective ``customers'' and advocate (being careful not
  to promise too much) the use of Linux for appropriate applications.
  The reason that many a company's products have done well in the
  marketplace is not so much due to the product's technical superiority
  but the company's marketing abilities.

  If you enjoy using Linux and would like to contribute something to the
  Linux community, please consider acting on one or more of the ideas in
  this mini-HOWTO and help others learn more about Linux.



  4.  Related Information


  Lars Wirzenius, former comp.os.linux.announce moderator and long-time
  Linux activist, also has some thoughts
  <http://www.iki.fi/liw/texts/advocating-linux.html> about Linux
  advocacy.

  Eric S. Raymond provides an analysis
  <http://www.tuxedo.org/~esr/writings/cathedral-bazaar/cathedral-
  bazaar.html> of why the development model used by the Linux community
  has been so successful.

  The free software community has recognized that the terms "free
  software" and "freely available software" are not appropriate in all
  contexts.  For more information about using the term "open-source
  software" when marketing "free software", please visit the Open Source
  <http://www.opensource.org/> site.

  If you need to brush up on your Linux sales techniques, take a look at
  the Linuxmanship <http://zgp.org/~dmarti/linuxmanship/> essay by
  Donald B. Marti, Jr.

  The Linux PR <http://www.cse.unsw.edu.au/~conradp/linux/pr/> site
  discusses the importance of press releases to the Linux community.
  Another way to gain valuable experience in this area is to organize a
  NetDay at a local school using the guidelines presented in the NetDay
  How-To Guide <http://www.netday.org/NetDay/howto/guide/>.

  Linux International's <http://www.li.org/> goal is to promote the
  development and use of Linux.

  The Linux Documentation Project <http://www.linuxdoc.org/> is an
  invaluable resource for Linux advocates.

  The Linux Center Project <http://www.portalux.com/> provides a
  thematical index of resources about Linux and free software.

  The Linux Business Applications <http://www.m-tech.ab.ca/linux-biz/>
  site provides a forum for organizations that depend on Linux for day-
  to-day business operations to share their experiences.

  Linux Enterprise Computing <http://linas.org/linux/> and Freely
  Redistributable Software in Business
  <http://www.cyber.com.au/misc/frsbiz/> cover resources and topics of
  interest to those deploying Linux in a business/commercial/enterprise
  setting.

  The Linux Advocacy Project's <http://www.10mb.com/linux/> goal is to
  encourage commercial application developers to provide native Linux
  versions of their software.

  The Linux CD and Support Giveaway
  <http://visar.csustan.edu/giveaway.html> program is helping make Linux
  more widely available by encouraging the reuse of Linux CD-ROMs.

  Specialized Systems Consultants, Inc. (SSC) hosts the Linux Resources
  <http://www.linuxresources.com/> site and publishes the Linux Journal
  <http://www.linuxjournal.com/>.

  The linux-biz <http://www.lege.com/linux-biz.html> mailing list is a
  forum created to discuss the use of Linux in a business environment.

  The Linux Mission Critical Systems survey
  <http://wauug.erols.com/mclinux/results.html> documents successful
  existing systems which have a large load and are up 24 hours per day.

  A number of online publications are now devoted to covering Linux.
  These include:

    LinuxFocus <http://mercury.chem.pitt.edu/~angel/LinuxFocus/>

    Linuxove noviny <http://www.linux.cz/noviny/>

    Linux Gazette <http://www.ssc.com/lg/>

    PLUTO Journal <http://www.pluto.linux.it/journal/>.

  Additional links to online publications can be found at the Linux
  Documentation Project <http://www.linuxdoc.org/links/media.html> and
  the Linux Center Project
  <http://www.portalux.com/informations/journals/>.


  5.  Advocating Linux



    Share your personal experiences (good and bad) with Linux.
     Everyone knows that software has bugs and limitations and if we
     only have glowing comments about Linux, we aren't being honest.  I
     love to tell people about having to reboot four times (three
     scheduled) in three years.

    If someone has a problem that Linux may be able to solve, offer to
     provide pointers to appropriate information (Web pages, magazine
     articles, books, consultants, ...).  If you haven't actually used
     the proposed solution, say so.

    If you are available for making presentations about Linux, register
     with the Linux Speakers Bureau
     <http://noframes.linuxjournal.com/lsb/listing.html>.

    Offer to help someone start using Linux.  Follow up to make sure
     that they are able to use their system effectively.

    Some people still believe that Linux and similar systems operate
     only in text-mode.  Make sure that they are aware of the
     availability of graphical applications, such as the Gimp
     <http://www.gimp.org/>.

    Try to respond to one ``newbie'' posting each week.  Seek out the
     tough questions, you may be the only one to respond and you may
     learn something in the process.  However, if you aren't confident
     that you can respond with the correct answer, find someone that
     can.


    Seek out small software development firms and offer to make a
     presentation about Linux.

    If the opportunity arises, make a presentation to your employer's
     Information Technology group.

    Participate in community events such as NetDay
     <http://www.netday.org/>.  While your first priority must be to
     contribute to the success of the event, use the opportunity to let
     others know what Linux can do for them.

    Always consider the viewpoints of the person to whom you are
     ``selling'' Linux.  Support, reliability, interoperability and cost
     are all factors that a decision-maker must consider.  Of the above,
     cost is often the least important portion of the equation.

    Availability of support is often mentioned as a concern when
     considering the adoption of Linux.  Companies such as Caldera
     <http://www.caldera.com/>, Cygnus Solutions
     <http://www.cygnus.com/>, Red Hat <http://www.redhat.com/>, and
     S.u.S.E. <http://www.suse.com/> offer support for some or all
     components of a typical Linux distribution.  In addition, the Linux
     Consultants HOWTO <http://www.linuxdoc.org/HOWTO/Consultants-
     HOWTO.html> provides a listing of companies providing commercial
     Linux related support.  Of course, some of the best support is
     found in the comp.os.linux and linux newsgroup hierarchies.


    Point out that the production of open-source software
     <http://www.opensource.org/> takes place in an environment of open
     collaboration between system architects, programmers, writers,
     alpha/beta testers and end users which often results in well
     documented, robust products such as Apache
     <http://www.apache.org/>, GNU Emacs <http://www.gnu.org/>, Perl
     <http://www.perl.com/> and the Linux kernel
     <http://www.linuxhq.com/>.

    Stand up and be counted! Register with the Linux Counter
     <http://counter.li.org/>.


    Report successful efforts of promoting Linux to Linux International
     (li@li.org) and similar organizations.

    Find a new home for Linux CD-ROMs and books that you no longer
     need.  Give them to someone interested in Linux, a public library
     or a school computer club.  A book and its CD-ROM would be most
     appropriate for a library.  However, please be sure that making the
     CD-ROM publicly available does not violate a licensing agreement or
     copyright.  Also, inform the library staff that the material on the
     CD-ROM is freely distributable.  Follow up to make sure it is
     available on the shelves.

    When purchasing books about software distributed with Linux, give
     preference to books written by the author of the software.  The
     royalties that authors receive from book sales may be the only
     monetary compensation received for their efforts.

     <-- Need to fix or change the Powered by Linux text -->

    Encourage Linux-based sites to submit their entry for the Powered
     by Linux <http://sunsite.nus.edu.sg/pub/LDP/powered.html> page and
     suggest that banners promoting Linux
     <http://www.cse.unsw.edu.au/~conradp/banners/>, Apache
     <http://www.apache.org/>, GNU <http://www.gnu.org/>, Perl
     <http://www.perl.com/> ... be displayed on their site.
    Participate! If you have benefited from open-source software
     <http://www.opensource.org/>, please consider assisting the free
     software community by:

    submitting detailed bug reports

    writing documentation

    creating artwork

    supplying management skills

    suggesting enhancements

    providing technical support

    contributing software

    donating equipment

    furnishing financial support.

     The Linux Documentation Project <http://www.linuxdoc.org/> provides
     a list <http://www.linuxdoc.org/devel.html> of Linux and Linux-
     related projects.

    Finally, keep in mind that we all have infinitely more important
     issues to deal with than the selection of a computing environment.


  6.  Canons of Conduct



    As a representative of the Linux community, participate in mailing
     list and newsgroup discussions in a professional manner. Refrain
     from name-calling and use of vulgar language.  Consider yourself a
     member of a virtual corporation with Mr. Torvalds as your Chief
     Executive Officer.  Your words will either enhance or degrade the
     image the reader has of the Linux community.

    Avoid hyperbole and unsubstantiated claims at all costs. It's
     unprofessional and will result in unproductive discussions.

    A thoughtful, well-reasoned response to a posting will not only
     provide insight for your readers, but will also increase their
     respect for your knowledge and abilities.


    Don't bite if offered flame-bait.  Too many threads degenerate into
     a ``My O/S is better than your O/S'' argument.  Let's accurately
     describe the capabilities of Linux and leave it at that.

    Always remember that if you insult or are disrespectful to someone,
     their negative experience may be shared with many others.  If you
     do offend someone, please try to make amends.

    Focus on what Linux has to offer.  There is no need to bash the
     competition.  Linux is a good, solid product that stands on its
     own.

    Respect the use of other operating systems.  While Linux is a
     wonderful platform, it does not meet everyone's needs.

    Refer to another product by its proper name.  There's nothing to be
     gained by attempting to ridicule a company or its products by using
     ``creative spelling''.  If we expect respect for Linux,  we must
     respect other products.

    Give credit where credit is due.  Linux is just the kernel.
     Without the efforts of people involved with the GNU project
     <http://www.gnu.org/gnu/linux-and-gnu.html>, MIT, Berkeley and
     others too numerous to mention, the Linux kernel would not be very
     useful to most people.

    Don't insist that Linux is the only answer for a particular
     application. Just as the Linux community cherishes the freedom that
     Linux provides them, Linux only solutions would deprive others of
     their freedom.

    There will be cases where Linux is not the answer.  Be the first to
     recognize this and offer another solution.



  7.  User Groups



    Participate in a local user group.  An index
     <http://www.linuxdoc.org/links/#lug> of Linux User Group registries
     is part of the Linux Documentation Project
     <http://www.linuxdoc.org/>.  If a user group does not exist in your
     area, start one.

    The Linux User Group HOWTO <http://www.linuxdoc.org/HOWTO/User-
     Group-HOWTO.html> covers many of the issues involved with starting
     an user group and discusses the importance of Linux advocacy as one
     of the goals of a user group.

    Make speakers available to organizations interested in Linux.

    Issue press releases
     <http://www.cse.unsw.edu.au/~conradp/linux/pr/> about your
     activities to your local media.

    Volunteer to configure a Linux system to meet the needs of local
     community organizations.  Of course, the installation process must
     include training the user community to use the system and adequate
     documentation for ongoing maintenance.

    Discus the Linux Advocacy mini-HOWTO at a meeting.  Brainstorm and
     submit new ideas.



  8.  Vendor Relations



    When contemplating a hardware purchase, ask the vendor about Linux
     support and other user's experiences with the product in a Linux
     environment.

    Consider supporting vendors that sell Linux based products and
     services.  Encourage them to have their product listed in the Linux
     Commercial HOWTO <http://www.linuxdoc.org/HOWTO/Commercial-
     HOWTO.html>.

    Support vendors that donate a portion of their income to
     organizations such as the Free Software Foundation
     <http://www.gnu.org/help/help.html>, the Linux Development Grant
     Fund <http://li.org/li/fund/grants.shtml>, the XFree86 Project
     <http://www.xfree86.org/donations.html> or Software in the Public
     Interest <http://www.debian.org/donations.html>.  If possible, make
     a personal donation to these or other organizations that support
     open-source software <http://www.opensource.org/>.  Don't forget
     that some employers offer a matching gift program program.

    If you need an application that is not supported on Linux, contact
     the vendor and request a native Linux version.



  9.  Media Relations



    Linux International is collecting press clippings
     <http://www.li.org/li/resources/pressclippings.shtml> that mention
     Linux, GNU and other freely redistributable software.  When you see
     such an article, please send the following information to
     clippings@li.org:

    Name of publication

    Publisher's contact address

    Name of author

    Author's contact address

    Title of article

    Page number where the article starts

    The URL if available online

    A summary of the article, including your opinion


    If you believe that Linux was not given fair treatment in an
     article, review or news story, send the details, including the
     above information, to li@li.org so that an appropriate response can
     be sent to the publisher.  If you contact the publisher directly,
     be professional and sure of your facts.

    If you involved with a Linux related project, issue press releases
     <http://www.cse.unsw.edu.au/~conradp/linux/pr/> to appropriate news
     services on a regular basis.



  10.  Acknowledgements


  Grateful acknowledgement is made to all contributors, including:



  Kendall G. Clark          <kclark@cmpu.net>
  Wendell Cochran           <atrypa@eskimo.com>
  Bruno H. Collovini        <buick@microlink.com.br>
  Allan "Norm" Crain        <allanc@idea-inc.com>
  Jon "maddog" Hall         <maddog@zk3.digital.com>
  Greg Hankins              <gregh@cc.gatech.edu>
  Eric Ladner               <eladner@goldinc.com>
  Chie Nakatani             <jeanne@mbox.kyoto-inet.or.jp>
  Daniel P. Kionka          <dkionka@worldtalk.com>
  Nat Makarevitch           <nat@nataa.fr.eu.org>
  Martin Michlmayr          <tbm@cyrius.com>
  Rafael Caetano dos Santos <rcaetano@dijkstra.ime.usp.br>
  Idan Shoham               <idan@m-tech.ab.ca>
  Adam Spiers               <adam.spiers@new.ox.ac.uk>
  C. J. Suire               <suire@datasync.com>
  Juhapekka Tolvanen        <juhtolv@silmu.cc.jyu.fi>
  Lars Wirzenius            <liw@iki.fi>
  Sean Woolcock             <sbwoolco@eos.ncsu.edu>



  Alsa-sound-mini-HOWTO
  Valentijn Sessink valentyn@alsa-project.org
  v2.0-pre1, 12 November 1999

  Describes the installation of the ALSA sound drivers for Linux. These
  sound drivers can be used as a replacement for the regular sound
  drivers, as they are fully compatible.
  ______________________________________________________________________

  Table of Contents

  1. Introduction

     1.1 Acknowledgments
     1.2 Revision History
     1.3 New versions of this document
     1.4 Feedback
     1.5 Distribution Policy

  2. NOWTO - a quick install guide

     2.1 Installing ALSA for kernels 2.2.x
     2.2 Playing and recording sound
     2.3 Installing ALSA for 2.0.x
     2.4 Playing and recording sound

  3. Before you start

     3.1 Introduction
     3.2 General information about the ALSA drivers
     3.3 Supported hardware
     3.4 Other HOWTO's
        3.4.1 Sound cards
        3.4.2 Plug and Play cards
        3.4.3 Loadable modules
        3.4.4 Kerneld

  4. How to install ALSA sound drivers

     4.1 What you need
     4.2 Getting the drivers
     4.3 ALSA versions
     4.4 Extracting
     4.5 Compiling
     4.6 Preparing the devices

  5. Loading the driver

     5.1 Inserting with modprobe
     5.2 Which module for which card?
        5.2.1 Gravis UltraSound Extreme
        5.2.2 Gravis UltraSound MAX
        5.2.3 ESS AudioDrive
        5.2.4 ESS AudioDrive 18xx
        5.2.5 Gravis UltraSound PnP
        5.2.6 UltraSound 32-Pro
        5.2.7 Soundblaster
        5.2.8 Soundblaster 16
        5.2.9 OAK Mozart
        5.2.10 OPTi 82C9xx
        5.2.11 AD1847/48 and CS4248
        5.2.12 Yamaha OPL3-SA2/SA3 soundcards
        5.2.13 S3 SonicVibes
        5.2.14 Ensoniq/Soundblaster PCI64
        5.2.15 CS4231
        5.2.16 CS4232/4232A
        5.2.17 4235 and higher
        5.2.18 4610/4612/4615 and 4680
        5.2.19 ESS Solo 1
        5.2.20 Trident 4DWave DX/NX
        5.2.21 ForteMedia FM801
     5.3 modprobe for drivers without auto-probing
        5.3.1 OPL3-SA2 and OPL3-SA3
        5.3.2 CS4231 chips
        5.3.3 CS4232/CS4232A chips
        5.3.4 CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239 chips
     5.4 The kerneld approach
     5.5 Backwards compatibility

  6. Testing and using

     6.1 The /proc filesystem
     6.2 The mixer
        6.2.1 Mixer settings for playing
        6.2.2 Mixer parts
        6.2.3 Mixer settings for recording
        6.2.4 Other mixer settings
     6.3 The /dev/snd/ devices
     6.4 Additional information
        6.4.1 /proc/asound/#/pcm#0
        6.4.2 /proc/asound/#card#/sb16

  7. Tips and Troubleshooting

     7.1 Compiling the driver
        7.1.1 Linux kernel sourcetree
        7.1.2 Cannot create executables
     7.2 Loading the driver
        7.2.1 Sound devices
        7.2.2 Sound card compatibility
        7.2.3 ``Device busy'' or ``unresolved symbols''
           7.2.3.1 2.0 kernels
           7.2.3.2 2.2 kernels
        7.2.4 References to other drivers
        7.2.5 Unresolved symbols revisited
        7.2.6 Check the PnP setup
        7.2.7 Are your parameters right ?
     7.3 Driver loaded... but no (or hardly any) sound
        7.3.1 Unmuting
        7.3.2 Gain
        7.3.3 OSS/Linux compatibility
        7.3.4 Cannot open mixer
     7.4 General suggestions
        7.4.1 Try using ``insmod''
        7.4.2 Read the INSTALL file.
        7.4.3 Debug messages
        7.4.4 If all else fails...
     7.5 Bug reports
     7.6 Tip: playing CD's
     7.7 Tip: installing the MIDI serial driver
     7.8 Tip: new kernel? New modules!
     7.9 Tip: KDE and ALSA drivers
     7.10 Tip: use the ALSA devices
     7.11 Tip: removing all modules


  ______________________________________________________________________

  1.  Introduction

  This is the ALSA Sound drivers mini-HOWTO. It gives you information
  about installing and using the ALSA sound drivers for your soundcard.
  The ALSA drivers are fully modularized sound drivers that support
  kerneld and kmod. They are compatible with, but surpass the
  possibilities of, the current OSS API. In other words: compatible, but
  better.

  1.1.  Acknowledgments

  This documents contains information I got from the ALSA driver page.
  The structure was ripped off the SB-mini-HOWTO, mainly because it had
  about the structure I was looking for. Thanks to the SGML Tools
  package, this HOWTO is available in several formats, all generated
  from a common source file. Thanks to Erik Warmelink for proof reading,
  thanks to Alfred Munnikes for a couple of questions and helpful
  suggestions. Yamahata Isaku thanks for the Japanese translation,
  Miodrag Vallat for the translation in French. Later on, Steve Crowder
  did a great job by reading and editing the whole text. Thanks to
  Cserna Zsolt for the Hungarian translation and Marco Meloni for the
  Italian one.  Thanks to Mohamed Ismail Mohamed-Ibrahim who sent me a
  document about the Trident 4DWave DX/NX soundcard with a lot of useful
  information, thanks to Gerard Haagh who sent me a lot of useful
  information and who also pointed out a few unclear sections.

  Thanks to Marc-Aur`ele Darche, Piotr Ingling, Juergen Kahrs, Tim
  Pearce, Patrick Stoddard, Rutger de Graaf, Shuly Wintner, Jyrki
  Saarela, Jonas Lofwander, Kumar Sankaran and many others for useful
  tips and additions.

  1.2.  Revision History

  Version 2.0-pre1 - November 12, 1999. Updating a couple of sections to
  ALSA 0.4.1e., added various links.

  Version 1.7 - July 29, 1999. A few fixes.

  Version 1.6 - July 26, 1999. Added a section about ALSA-versions

  Version 1.5 - May 21, 1999. Changed the mixer section, added a quick
  install section

  Version 1.4 - May 18, 1999. Included the URL to the French version,
  changed more URLs.

  Version 1.3 - May 16, 1999. Thanks to Jaroslav this HOWTO has found a
  home at the ALSA-project website.  As a result of that, some updates
  in mail and web addresses.

  Version 1.2 - May 11, 1999. Several updates.

  Version 1.1 - March 11, 1999. Added a couple of sound cards from the
  new 0.3 series drivers, wrote a bit about the 2.2 series kernel.

  Version 1.0 - February 8, 1999. Added a few things to the
  troubleshooting section, but we seem fairly complete.

  Version 0.3 beta - January 20, 1999. A link on the ALSA-homepage. Ha,
  we're official!

  Version 0.2 alpha - Mid January 1999, first .sgml-version.

  Version 0.1 alpha - January 1999, first version, mostly HTML.

  Still: please submit any patches in plain English, you native
  speakers!

  There are a couple of additions that need to be added to the HOWTO
  now. Notably, Mohamed Ismail Mohamed-Ibrahim and Gerard Haagh wrote
  wonderful additions to the HOWTO, that will keep me off my regular
  work for some more time. So this is 2.0-pre1 and more pre's are to
  follow.


  1.3.  New versions of this document

  The latest version can be found at http://www.alsa-
  project.org./~valentyn


  Other formats (full size html, sgml, txt) are in the directory other-
  formats. Unfortunately, I have not succeeded in compiling a Postscript
  version, as the sgml2latex-script returns a bunch of errors.

  Yamahata Isaku has translated a Japanese version, which will be
  available at the Japanese ALSA site,
  http://plaza21.mbn.or.jp/~momokuri/alsa/index.html

  Miodrag Vallat translated a French version, which is available at
  http://www.freenix.fr/unix/linux/HOWTO/mini/Alsa.html.

  Cserna Zsolt has translated the Hungarian version of the ALSA-HOWTO.
  You can find it at http://kib4.vein.hu/~zsolt/alsa.html.

  Marco Meloni did an Italian version, you can get it at
  http://pluto.linux.it/ildp/index.html.

  If you make a translation of this document into another language, let
  me know and I'll include a reference to it here. Ook een Nederlandse
  versie is welkom, ik heb zelf geen tijd om deze te schrijven. Leve de
  koningin!

  1.4.  Feedback

  I rely on you, the reader, to make this HOWTO useful. If you have any
  suggestions, corrections or comments, please send them to me (alsa-
  howto@alsa-project.org), and I will try to incorporate them in the
  next revision.

  Please note: I do not get a lot of mail about the ALSA drivers and any
  addition is welcome. Even a ``thank you for'' is appreciated - maybe
  it's not too much work to add a ``I appreciated most'' or ``this-or-
  that was not immediately clear to me''-section.

  If you publish this document on a CD-ROM or in hardcopy form, a
  complimentary copy would be appreciated. Mail me for my postal
  address. Also consider making a donation to the Linux Documentation
  Project to help support free documentation for Linux. Contact the
  Linux HOWTO co-ordinator, Tim Bynum linux-howto@metalab.unc.edu, for
  more information.

  1.5.  Distribution Policy

  Copyright 1998/1999 Valentijn Sessink

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This document is distributed in the hope that it will be useful, but
  without any warranty; without even the implied warranty of
  merchantability or fitness for a particular purpose. See the GNU
  General Public License for more details.

  You can obtain a copy of the GNU General Public License by writing to
  the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.


  2.  NOWTO - a quick install guide

  If you want sound and you want it NOW! and not after reading this
  HOWTO, this quick tour through the ALSA driver installation might be
  of help. Please note: there are a couple of differences between the
  ALSA versions that support 2.0 kernels and those that support 2.2
  kernels.

  2.1.  Installing ALSA for kernels 2.2.x

  You will probably want to use the ALSA 0.4.1e (or later) version if
  your kernel is 2.2.x.  If your kernel is older, please use 0.3.0-pre4
  and see below.

  Just the all time ``./configure - make - make install'' stuff. Do this
  for drivers, library and utilities.  You need all three because the
  utilities help you to unmute your card. Kernels 2.2.x need to have
  general sound support in the kernel (without choosing a specific
  card).

  The ALSA drivers have their own devices, you can make them usinge the
  ./snddevices script.

  You need to load the module for your card (or use kmod) and if you
  want sound to be backwards compatible with the Linux kernel sound
  drivers (yes you want this) you need two other modules called snd-
  pcm1-oss and snd-mixer-oss. See the section ``Which module for which
  card'' to find out which module to load. After loading, you can look
  in /proc/asound for various information about the ALSA drivers.

  2.2.  Playing and recording sound

  A few remarks. ALSA has it's own devices in /dev/snd, for example
  /dev/snd/pcmC0D1 is Card 0, Device 1.  You can use the old /dev/pcmXY
  devices if you loaded snd-pcm1-oss for backwards compatibility. You'll
  also want to use /dev/mixer, so load snd-mixer-oss as well. Before you
  can play any sound, you need to unmute the card with ``amixer''. Type
  ``amixer groups'', then try something like

  amixer set PCM 100 unmute

  Generally you can use options ``mute'' or ``unmute'', ``capture'' or
  ``nocapture'' and numbers.

  That's it! Now if it works, it works. If it doesn't work, you may need
  to actually read this HOWTO...


  2.3.  Installing ALSA for 2.0.x

  The ALSA drivers versions 0.3.0, 0.3.1 and 0.3.2 have various problems
  due to the restructuring of the mixer interface. Later versions do not
  support kernel 2.0.x, so you definately will want to use version
  0.3.0-pre4 if you have a 2.0 version kernel.

  Just the all time ``./configure - make - make install'' stuff. Do this
  for drivers, library and utilities.  You need all three because the
  utilities help you to unmute your card. Kernels 2.0.x need to have all
  sound support disabled in the kernel setup

  The ALSA drivers have their own devices, you can make them usinge the
  ./snddevices script.

  You need to load the module for your card (or use kmod) and if you
  want sound to be backwards compatible with the Linux kernel sound
  drivers (yes you want this) you need another modules called snd-
  pcm1-oss. See the section ``Which module for which card'' to find out
  which module to load. After loading, you can look in /proc/asound for
  various information about the ALSA drivers.

  2.4.  Playing and recording sound

  A few remarks. ALSA has it's own devices in /dev/snd, for example
  /dev/snd/pcmC0D1 is Card 0, Device 1.  You can use the old /dev/pcmXY
  devices if you loaded snd-pcm1-oss for backwards compatibility. Before
  you can play any sound, you need to unmute the card with ``amixer''.
  Type ``amixer'', then try something like

  amixer pcm 100 unmute

  Generally you can use options ``mute'' or ``unmute'', ``rec'' or
  ``norec'', numbers or left:right.

  That's it! Now if it works, it works. If it doesn't work, you may need
  to actually read this HOWTO...

  3.  Before you start

  3.1.  Introduction

  This document tries to help you install and use the ALSA sound drivers
  in your Linux system. The reference system is a Slackware 4.0
  distribution of Linux on an AMD/K6 computer (x86 compatible), but it
  should work with any other Linux distribution. I do not know if the
  ALSA drivers work on other platforms, according to the documentation,
  Alpha has been tested and proven to work.  I have only x86 PC's here,
  so any additional information you may have would be appreciated.

  It might be handy to read the Linux Sound HOWTO (see section Other
  HOWTO's), but that HOWTO focuses on the built-in kernel drivers.

  3.2.  General information about the ALSA drivers

  The ALSA sound driver was originally written as a replacement for the
  Linux kernel sound for Gravis UltraSound (GUS) cards. As this GUS
  replacement proved to be a success, the author started the ALSA
  project for a generic driver for several sound chips, with fully
  modularized design.

  It is compatible with the OSS/Free and OSS/Linux sound drivers (the
  drivers in the kernel), but has its own interface that is even better
  than the OSS drivers. A list of features can be found at
  http://www.alsa-project.org/intro.html

  Please note that the ALSA drivers are still under development. Things
  may change over time, and some programs that rely on ALSA only work
  under specific versions of it. Apart from that: I think they're great.
  I use ALSA for 10 months now and will never go back to the dark ages
  of closed source sound drivers - hint ;)

  The main page of the ALSA project is http://www.alsa-project.org/


  3.3.  Supported hardware

  The ALSA drivers support only a subset of all sound cards available.
  As the time of writing, the following cards are supported.

    Cards with a Trident 4D Wave DX/NX chipset, thanks to Trident
     Microsystems who offered ALSA ``first cut'' GPL'd drivers (MIXER
     and PCM devices only) and documentation for their 4D Wave PCI audio
     chipsets.  See
     http://www.tridentmicro.com/HTML/products%20folder/audio.htm for
     more information.
     Cards using this chipset include: Best Union  Miss Melody 4DWave
     PCI, HIS  4DWave PCI, Warpspeed  ONSpeed 4DWave PCI, AzTech  PCI
     64-Q3D, Addonics  SV 750, CHIC  True Sound 4Dwave, Shark
     Predator4D-PCI and Jaton SonicWave 4D.

    Gravis Ultrasound (GUS): ``PnP'',  Extreme, Classic/ACE, MAX

    Cards with a GUS chipset: Dynasonic 3-D, STB Sound Rage 32,
     UltraSound 32-Pro (STB), ExpertColor MED3201 and others with AMD
     InterWave(TM) chip, notably some STB cards by Compaq

    Soundblaster: 1.0, 2.0, Pro, 16, AWE32/64, PCI64

    ESS AudioDrive ESx688

    ESS ES968 chip based cards (PnP only).

    ESS ES18xx (chipsets). Please note that I personally experienced a
     lot of trouble with the ESS1888. The developer of the driver for
     this card did his best, but to no avail.

    ESS Solo-1 ES1938 and ES1946. Only one of the two channels works,
     which means that recording is not possible. The author of the
     ES1938 code ``is aware of the problem and is currently
     investigating it''.

    Yamaha: OPL3-SA2, OPL3-SA3 (chipsets)

    OAK Mozart

    Schubert 32 PCI (PINE, S3 SonicVibes PCI chipset)

    Ensoniq AudioPCI ES1370/1371 PCI soundcards (Soundblaster PCI64)

    SonicVibes PCI soundcards (PINE Schubert 32 PCI)

    ForteMedia FM801 based cards (in 0.3.2)

    OPTi 82C9xx chipset based soundcards

    AD1847, AD1848 and CS4248 chipset based cards

    AZT2320 chip based soundcards (PnP only).

    Advance Logic ALS100/ALS120 based cards

    C-Media CMI8330 based cards

     Then a whole lot of Crystal Semiconductors-based sound boards are
     supported.  These chips can be found in a lot of hardware, in
     separate cards (some Philips PCA series) and on motherboards (e.g.
     IBM Aptiva, Dell computers). Boards based on the following chipsets
     are supported:

    4231

    4232

    4232A

    4235

    4236B

    4237B

    4238B

    4239

    4280

    4610

    4612

    4614

    4615

    4680

     The best thing is: ALSA now supports computers without a soundcard
     to produce video! This is done with a dummy driver, that tricks
     programs like Realplayer into thinking that there is a sound card
     available.

  A more recent list may be found inside the driver package itself, that
  is in doc/SOUNDCARDS

  3.4.  Other HOWTO's

  This ALSA-sound-mini-HOWTO is just mini - although it seems to grow
  fast. Other HOWTO's may help you out in case this one is too terse. I
  will name a few things you may come across while trying to install the
  ALSA drivers. HOWTO's can generally, be found at mirrors of Metalab
  (the former Sunsite). So take a look at
  http://metalab.unc.edu/LDP/mirrors.html and pick out your closest
  mirror site. You can find HOWTO's in the directory LDP/HOWTO/.  Please
  note: the links in this document will all be relative to
  /LDP/HOWTO/mini. If you look at this document from a reasonably good
  mirror site, you will find the HOWTO's.

  Then a note for the 2.2.x kernel series. For the 2.2.x kernel series,
  sound support is like any other support: it works, but it is different
  from what you used to do. This HOWTO (like any other HOWTO) will from
  version 2.0pre1 concentrate on the 2.2 series kernel, although I'll
  try to point out the differences.

  3.4.1.  Sound cards

  Perhaps you bought a sound card already, or maybe it has been
  installed in your computer for ages. And now you are going to use it!
  Have a look at the Sound-HOWTO to see if this is all worth the
  trouble. (You might want to buy this new Mega-Rumble-Blaster first,
  then try the ALSA drivers.)

  3.4.2.  Plug and Play cards

  Most modern sound cards for the Intel platform are ISA PnP cards,
  which is an abbreviation for ''Plug and Play''. This means, that the
  card has to be configured by the operation system. This has to be done
  through an initialization routine at boot time. You probably need to
  configure your card with the PnP-utils-package. Every recent Linux
  distribution includes these tools. For usage have a look at the Plug-
  and-Play-HOWTO

  The ALSA-drivers seem to have built in their own ISA-PnP-support for a
  couple of sound cards. Unfortunately, as I cannot find documentation
  about this, I cannot tell you how it works. If anyone out there wants
  to try ALSA sound support while deliberately not using the ISA-PnP-
  tools, please drop me a line.
  3.4.3.  Loadable modules

  The ALSA sound drivers are built as modules. You can find more
  information about modules in the Kernel-HOWTO.  There is also a
  module-HOWTO, but that is unmaintained at the moment; take a look at
  the umaintained section of the Howto-HOWTO. There is a Modules-mini-
  HOWTO though that may be useful.

  3.4.4.  Kerneld

  Another HOWTO that will be useful for some, is the Kerneld-mini-HOWTO.
  Kerneld is a daemon that installs and removes kernel modules as
  needed. (I have zero experience with it, so additional information on
  the topic is welcome. The ALSA driver documentation contains some
  information about configuration of the kerneld, this has been included
  in this mini-HOWTO.)

  As the kernel module loader is included in kernel 2.2.x, things have
  changed. But as I am one of those guys that rather modprobes something
  than have some daemon handle it, I have no info on this.


  4.  How to install ALSA sound drivers

  4.1.  What you need

    a functional Linux system (e.g. the Slackware distribution), with
     the "Development" packages installed (i.e. gcc, make etc.)

    some knowledge about Linux (meaning you know how to use "ls", "cd",
     "tar" etc.)

    a root-account

     The great thing is: you don't need a supported sound card anymore,
     as ALSA now has a dummy driver that does nothing!  (No, it really
     does nothing, but some programs will work now that they believe
     there is a sound card available).

  If you have a PnP card, you will also need:

    the isapnptools software package.

     The INSTALL text in the driver directory suggests that for some
     cards, PnP support is native. I also received a suggestion from
     Jaroslav about this.  When I get further information about this
     topic I will add it to this mini-HOWTO.

  Please note that you should not have any sound drivers active when you
  want to use the ALSA drivers. If you have a kernel with sound drivers
  compiled in, you'll need a kernel recompilation. If you have the old
  "sound.o" module active, you need to deactivate it. If you use
  kerneld, this probably means deleting sound.o from the
  /lib/modules/<kernel_version>/misc directory.  Newer RedHat systems
  have a different sound approach, with several sound modules active.
  You need to deactivate them all.

  The 2.2 series kernel has a new approach to sound. You should include
  sound support here ! Yep, that's right: you add sound support to the
  kernel, but do not include any sound card. Then compile and install
  the kernel and after that, compile the ALSA-drivers.

  4.2.  Getting the drivers

  The ALSA drivers are available from ftp://ftp.alsa-project.org/pub/
  and there are mirrors at

    US: ftp://ftp.silug.org/pub/alsa

    US: ftp://ftp.eecs.umich.edu/pub/linux/alsa

    Netherlands: ftp://linux.a2000.nl/alsa

    Poland: ftp://ftp.task.gda.pl/pub/linux/misc/alsa

    Germany: ftp://ftp.tu-clausthal.de/pub/linux/alsa

    Slovakia: ftp://ftp.phacka.sk/pub/alsa

    Australia: ftp://ftp.suburbia.com.au/pub/alsa

  For a fully functional ALSA-installation, you will need the driver,
  the libs and the utilities; e.g if you chose the A2000 mirror you
  would get ftp://linux.a2000.nl/alsa/driver/alsa-driver-0.4.1e.tar.gz,
  ftp://linux.a2000.nl/alsa/lib/alsa-lib-0.4.1d.tar.gz and
  ftp://linux.a2000.nl/alsa/utils/alsa-utils-0.4.1.tar.gz


  4.3.  ALSA versions

  The ALSA drivers have come a long way. Development started during the
  2.0 version kernel, then the 2.2 series showed up (with their own
  sound kernel).

  As the 0.4 versions work perfectly for me, I think it is safe to use
  0.4.1e (or newer, if you want). If you have a 2.0.x kernel, you will
  definately not want to use 0.3.0 or later. Instead, use alsa-
  driver-0.3.0-pre4, alsa-lib-0.3.0-pre4 and alsa-utils-0.3.0-pre3.

  The older versions, 0.2.0-pre10p3 and older do work under 2.0.x, but I
  cannot get them to work under 2.2.x (probably due to the lack of
  interfacing with the soundcore module of the kernel).


  4.4.  Extracting

  You extract the drivers by some reasonable command, like the all-time
  tar -zxf <file>. Most likely you would do that in the /usr/src
  directory, so you need root priviliges for this.  Type ``su'' and then
  the root password to become root. But please note: it is unwise to use
  your system as the ``root'' user if it is not necessary. So:

       cd /usr/src

       tar -zxf ~/alsa-driver-0.4.1e.tar.gz

  tar -zxf ~/alsa-lib-0.4.1d.tar.gz

       tar -zxf ~/alsa-utils-0.4.1.tar.gz

  Also working and more fun: find ~ -name alsa* -exec tar -zxf {} \;
  (Don't try this at home kids, it's just an example). Note that when
  downloading the drivers with Netscape, you may accidentally get
  unpacked drivers with a ".tgz" extension. If tar complains about the
  file format, you may get better results by leaving off the "z" in the
  tar options.

  4.5.  Compiling

  You need the drivers before you can compile and use the libs. You need
  the libs before you can compile or use the utils. So let's begin:


       cd alsa-driver-0.4.1e

  (and for those not so experienced: try typing a <tab> (the "tab"-key)
  after "alsa-d". That's called command line completion.)


       ./configure

  If you want to use the built-in PnP interfacing, you should use


       ./configure --with-isapnp=yes

       make

  Now you need to be 'root' to install the stuff (you probably were
  "root" already)


       make install

  If this tells you that something like ``version.h'' cannot be found,
  then you probably do not have a proper kernel source tree. You need a
  couple of files of your kernel source to be able to compile the ALSA-
  drivers. Unpack your favorite linux-2.x.y.tar.gz in /usr/src, and
  issue a make menuconfig. (Actually, make symlinks may be enough).  Now
  compile the libraries:


       cd ../alsa-lib-0.4.1d

       ./configure

       make

       make install

  OK, you're getting it, the utilities:


       cd ../alsa-utils-0.4.1

       ./configure

       make

       make install

  Note: you can leave out the "make install" for the utilities at first.
  You could even leave out the whole library-making and utility-making,
  just to check if the driver works.


  4.6.  Preparing the devices

  There is a script in the driver-directory that will install the ALSA-
  sound-devices in your /dev directory. Type


       ./snddevices

  from the driver-directory. There should be a /dev/snd subdirectory now
  (test if it is there. If you are not familiar with even the "ls" com
  mand, please consider reading other HOWTO's first. You should have
  some basic Linux knowledge to install these drivers).

  Now you're ready to insert the driver, so please turn over to the next
  paragraph.

  5.  Loading the driver

  There are two ways to use the ALSA-sound-modules. I personally prefer
  using the manual method, meaning that I insert the driver at startup.
  The ALSA-drivers were designed as loadable/unloadable modules - for
  instance they do not reset the mixer after loading - so you can easily
  use the kerneld approach.

  Please do read the section ``Backwards Compatibility''.  You need it
  to have sound support ``the old way''.

  5.1.  Inserting with modprobe

  Note: If you have a PnP audio-card, you first need to set it to the
  right (or at least some known) IO/IRQ/DMA. See the Plug-and-Play-
  HOWTO. Did you configure your Plug-and-Play-soundcard? Ok, then read
  on please.  The main part is: do a "modprobe snd-card-<soundcard>".
  This should do the trick. Please note that not all distributions do
  include /sbin in your path.  If you get a "bash: modprobe: command not
  found", this will most likely mean that modprobe is not in your path.
  Try ``/sbin/modprobe snd-card-sb16'', or try to find the modprobe
  utility elsewhere.

  The most important difficulty is with the Crystal chipsets, for these
  the ALSA-drivers are not auto probing. More recent information may be
  acquired from the INSTALL file in the driver-directory. Two examples,
  then a list: Gravis UltraSound (GUS) and compatibles:


       /sbin/modprobe snd-card-gusclassic

  For all 16-bit Soundblaster-cards (SoundBlaster 16 (PnP), SoundBlaster
  AWE 32 (PnP), SoundBlaster AWE 64 (PnP):


       /sbin/modprobe snd-card-sb16

  However, if you have a 0.3.0-pre4 package, the GUS Classic driver is
  called ``snd-gusclassic'' and the SoundBlaster 16 module is called
  ``snd-sb16'' (so, without the ``card'' part).

  5.2.  Which module for which card?

  Please note that ALSA versions before 0.4.x sometimes had different
  names. You need to leave out the ``card'' part for those drivers. This
  is indicated by an asterisk (*).


  5.2.1.  Gravis UltraSound Extreme``(*)''


  modprobe snd-card-gusextreme

  5.2.2.  Gravis UltraSound MAX``(*)''


  modprobe snd-card-gusmax


  5.2.3.  ESS AudioDrive``(*)''

  ESS AudioDrive ES-1688 and ES-688 soundcards

  modprobe snd-card-audiodrive1688


  5.2.4.  ESS AudioDrive 18xx``(*)''

  ESS AudioDrive ES-18xx based soundcards

  modprobe snd-card-audiodrive18xx


  5.2.5.  Gravis UltraSound PnP``(*)''

  Gravis UltraSound PnP, Dynasonic 3-D/Pro, STB Sound Rage 32,
  ExpertColor MED3201 and other soundcards based on AMD InterWave(TM)
  chip.

  modprobe snd-card-interwave

  5.2.6.  UltraSound 32-Pro``(*)''

  UltraSound 32-Pro (soundcard from STB used by Compaq) and other
  soundcards based on AMD InterWave (tm) chip with TEA6330T circuit for
  extended control of bass, treble and master volume

  modprobe snd-card-interwave-stb

  5.2.7.  Soundblaster``(*)''

  8-bit Soundblaster cards (SoundBlaster 1.0, SoundBlaster 2.0,
  SoundBlaster Pro)

  modprobe snd-card-sb8

  5.2.8.  Soundblaster 16``(*)''

  16-bit SoundBlaster cards (SoundBlaster 16 (PnP), SoundBlaster AWE 32
  (PnP), SoundBlaster AWE 64 (PnP). Please note: this module does not
  support the SoundBlaster VibraX16 soundcard.

  modprobe snd-card-sb16

  5.2.9.  OAK Mozart``(*)''


  modprobe snd-mozart

  5.2.10.  OPTi 82C9xx``(*)''

  Various sound cards that use the OPTi 82C9xx chipset, like Audio 16
  Pro EPC-SOUN9301 (82C930 based), ExpertColor MED-3931 v2.0 (82C931
  based), ExpertMedia Sound 16 MED-1600 (82C928 based - AD1848), Mozart
  S601206-G (OPTI601 based - CS4231) and Sound Player S-928

  modprobe snd-card-opti9xx

  5.2.11.  AD1847/48 and CS4248


  modprobe snd-card-ad1848

  5.2.12.  Yamaha OPL3-SA2/SA3 soundcards``(*)''

  Just "modprobe snd-opl3sa" will not work, this driver does not do
  autoprobing.  See below.

  5.2.13.  S3 SonicVibes``(*)''

  S3 SonicVibes PCI soundcards. (PINE Schubert 32 PCI)

  modprobe snd-card-sonicvibes


  5.2.14.  Ensoniq/Soundblaster PCI64``(*)''

  Ensoniq AudioPCI ES1370/1371 PCI soundcards. (SoundBlaster PCI 64)

  modprobe snd-card-audiopci

  5.2.15.  CS4231

  Just ``modprobe snd-card-cs4231'' will not work, no auto-probing. See
  below.

  5.2.16.  CS4232/4232A

  All soundcards based on CS4232/CS4232A chips.  Just "modprobe snd-
  card-cs4232" will not work, no auto-probing. See below.


  5.2.17.  4235 and higher

  All soundcards based on CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239
  chips.  Just "modprobe snd-card-cs4236" will not work, no auto-
  probing. See below.


  5.2.18.  4610/4612/4615 and 4680


  modprobe snd-card-cs461x

  5.2.19.  ESS Solo 1``(*)''

  ESS Solo-1, 128iPCI card (es1938, ESS-SOLO-1). Jonas Lofwander sent me
  a link to a document that will help you installing this card - which
  is, basically, nothing more than modprobe snd-card-esssolo1 ... but
  http://dice.shopcenter.nu/alsa/ can be of help. If you have an IBM
  Thinkpad 1412 you can also refer to
  http://www.geocities.com/SiliconValley/Peaks/3649/1412.html, thanks to
  Kumar Sankaran.

  5.2.20.  Trident 4DWave DX/NX``(**)''

  Best Union  Miss Melody 4DWave PCI, HIS  4DWave PCI, Warpspeed
  ONSpeed 4DWave PCI, AzTech  PCI 64-Q3D, Addonics  SV 750, CHIC  True
  Sound 4Dwave, Shark  Predator4D-PCI, Jaton  SonicWave 4D.

  modprobe snd-card-trident

  5.2.21.  ForteMedia FM801

  These are PCI cards based on the FM801 chip.

  modprobe snd-card-fm801

  (*) For ALSA version 0.3.0-pre4, you need to leave out the ``card-''
  part in most (not all!) of the drivernames.  So ``snd-card-sb16''
  becomes ``snd-sb16'', however, ``snd-card-cs4232'' remains ``snd-card-
  cs4232'' (modprobe snd-cs4232 will do something, but it will not
  produce any sound!)

  (**) In older ALSA versions this driver was called ``snd-card-
  trid4wave'' and ``snd-trid4wave''.

  5.3.  modprobe for drivers without auto-probing

  If you have a non-autoprobing driver, you need to supply additional
  info at startup to have the driver work. More information can be found
  in the file INSTALL in the driver directory.

  5.3.1.  OPL3-SA2 and OPL3-SA3

  According to the INSTALL file you need to supply all the information
  for this driver. If you initialized the card with the isapnp-tools,
  you can probably get info from the /etc/isapnp.conf file for the
  following values:


       snd_port - control port # for OPL3-SA chip
       snd_wss_port - WSS port # for OPL3-SA chip (0x530,0xe80,0xf40,0x604)
       snd_midi_port - port # for MPU-401 UART (0x300,0x330), -1 = disable
       snd_fm_port - FM port # for OPL3-SA chip (0x388), -1 = disable
       snd_irq - IRQ # for OPL3-SA chip (5,7,9,10)
       snd_dma1 - first DMA # for Yamaha OPL3-SA chip (0,1,3)
       snd_dma1_size - max first DMA size in kB (4-64kB)
       snd_dma2 - second DMA # for Yamaha OPL3-SA chip (0,1,3), -1 = disable
       snd_dma2_size - max second DMA size in kB (4-64kB)

  You would do a "modprobe snd-card-opl3sa snd_port=0xNNN
  snd_wss_port=0x530 snd_midi_port=-1 snd_fm_port=0x388 snd_irq=5
  snd_dma1=0 snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" to load this
  driver (without midi-support. I am still convinced that midi-support
  is the thing you need when you have synthesizers and stuff and want to
  connect them to your Linux box. Never needed Midi-support even to play
  midi-files.)

  Note that the "NN" values need to be supplied, only I do not know what
  would be reasonable values. I do not know if the dma size option is
  really required.

  If you happen to have an IBM Thinkpad with this chipset, then
  http://www.cirs.org/patrick/index.html might be of help.

  If you use the driver from 0.3.0-pre4, then leave out the ``card-''
  part in the name.


  5.3.2.  CS4231 chips

  According to the INSTALL file you need to supply the main port for
  this card. Note that with the driver for 3235/6/7/8/9 cards, the one
  below, I ended up supplying all information (except DMA-size),
  otherwise the driver did not work.  So you may as well use the whole
  command line to insert the driver. If you initialized the card with
  the isapnp-tools, you can probably get info from the /etc/isapnp.conf
  file for the following values:


       snd_port - port # for CS4232 chip (PnP setup - 0x534)
       snd_mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable
       snd_irq - IRQ # for CS4232 chip (5,7,9,11,12,15)
       snd_mpu_irq - IRQ # for MPU-401 UART (9,11,12,15)
       snd_dma1 - first DMA # for CS4232 chip (0,1,3)
       snd_dma1_size - max first DMA size in kB (4-64kB)
       snd_dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable
       snd_dma2_size - max second DMA size in kB (4-64kB)

  You would do a "modprobe snd-card-cs4231 snd_port=0x534
  snd_mpu_port=-1 snd_irq=5 snd_dma1=0 snd_dma1_size=NN snd_dma2=1
  snd_dma2_size=NN" to load the driver for a "standard configured"
  soundcard. (Without midi-support, see the note at Yamaha OPL-3).  If
  you used different values in /etc/isapnp.conf, then you would use the
  values here also (Note: it can be wise to use your brains anyway ;)

  Note that the "NN" values need to be supplied, only I do not know what
  would be reasonable values. I do not know if the dma size option is
  really required.


  5.3.3.  CS4232/CS4232A chips

  According to the INSTALL file you need to supply the main port for
  this card. Note that with the driver for 3235/6/7/8/9 cards, the one
  below, I ended up supplying all information (except DMA-size),
  otherwise the driver did not work.  So you may as well use the whole
  command line to insert the driver. If you initialized the card with
  the isapnp-tools, you can probably get info from the /etc/isapnp.conf
  file for the following values:

  snd_port - port # for CS4232 chip (PnP setup - 0x534)
  snd_cport - control port # for CS4232 chip (PnP setup - 0x120)
  snd_mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable
  snd_fm_port - FM port # for CS4232 chip (PnP setup - 0x388), -1 = disable
  snd_jport - joystick port for CS4232 chip (PnP setup - 0x200), -1 =
  disable
  snd_irq - IRQ # for CS4232 chip (5,7,9,11,12,15)
  snd_mpu_irq - IRQ # for MPU-401 UART (9,11,12,15)
  snd_dma1 - first DMA # for CS4232 chip (0,1,3)
  snd_dma1_size - max first DMA size in kB (4-64kB)
  snd_dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable
  snd_dma2_size - max second DMA size in kB (4-64kB)

  You would do a "modprobe snd-card-cs4232 snd_port=0x534
  snd_cport=0x120 snd_mpu_port=-1 snd_fm_port=0x388 snd_jport=-1
  snd_irq=5 snd_dma1=0 snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" to
  load the driver for a "standard configured" soundcard. (Without midi-
  support, see the note at Yamaha OPL-3, and no joystick support). If
  you used different values in /etc/isapnp.conf, then you would use the
  values here also (Note: it can be wise to use your brains anyway ;)

  Note that the "NN" values need to be supplied, only I do not know what
  would be reasonable values. I do not know if the dma size option is
  really required.

  5.3.4.  CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239 chips

  According to the INSTALL file you need to supply the main port and
  control ports for this card. Note that with a CS4237B card, I ended up
  supplying all information (except DMA-size), otherwise the driver did
  not work. So you may as well use the whole command line to insert the
  driver, and not only supply snd_port and snd_cport. If you initialized
  the card with the isapnp-tools, you can probably get info from the
  /etc/isapnp.conf file for the following values:


       snd_port - port # for CS4232 chip (PnP setup - 0x534)
       snd_cport - control port # for CS4232 chip (PnP setup - 0x120)
       snd_mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable
       snd_fm_port - FM port # for CS4232 chip (PnP setup - 0x388), -1 = disable
       snd_jport - joystick port for CS4232 chip (PnP setup - 0x200), -1 = disable
       snd_irq - IRQ # for CS4232 chip (5,7,9,11,12,15)
       snd_mpu_irq - IRQ # for MPU-401 UART (9,11,12,15)
       snd_dma1 - first DMA # for CS4232 chip (0,1,3)
       snd_dma1_size - max first DMA size in kB (4-64kB)
       snd_dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable
       snd_dma2_size - max second DMA size in kB (4-64kB)

  You would do a "modprobe snd-card-cs4236 snd_port=0x534
  snd_cport=0x120 snd_mpu_port=-1 snd_fm_port=0x388 snd_jport=-1
  snd_irq=5 snd_dma1=0 snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" to
  load the driver. (Without midi-support, see the note at Yamaha OPL-3,
  and no joystick support).  Notes:

    the "NN" values need to be supplied, only I do not know what would
     be reasonable values.

    my CS4237B works fine without explicit dma size option.


  5.4.  The kerneld approach

  kerneld is a daemon that inserts modules on request, and unloads them
  once they are not in use anymore. Since I have no experience with
  kerneld, I do not know if the information below is accurate. The info
  comes from the INSTALL file in the ALSA-drivers package. Excellent
  information about kerneld can be found in the kerneld-mini-HOWTO.

  Follow these steps:

    Edit your /etc/conf.modules (see below for examples)

    Run 'modprobe snd-card' where card is name of your card [Which I
     find rather strange, since kerneld is supposed to load them? VS]

     Example for /etc/conf.modules for Gravis UltraSound PnP soundcard:


       alias char-major-14 snd
       alias snd-minor-oss-0 snd-interwave
       alias snd-minor-oss-3 snd-pcm1-oss
       alias snd-minor-oss-4 snd-pcm1-oss
       alias snd-minor-oss-5 snd-pcm1-oss
       alias snd-minor-oss-12 snd-pcm1-oss
       alias snd-card-0 snd-interwave
       options snd snd_major=14 snd_cards_limit=1
       options snd-interwave snd_index=1 snd_id="guspnp" snd_port=0x220 snd_irq=5
       snd_dma1=5 snd_dma2=6

  Example if you want use more soundcards in one machine (configuration
  below is for Sound Blaster 16 and Gravis UltraSound Classic):


       alias char-major-14 snd
       alias snd-minor-oss-0 snd-mixer
       alias snd-minor-oss-3 snd-pcm1-oss
       alias snd-minor-oss-4 snd-pcm1-oss
       alias snd-minor-oss-5 snd-pcm1-oss
       alias snd-minor-oss-12 snd-pcm1-oss
       alias snd-card-0 snd-sb16
       alias snd-card-1 snd-gusclassic
       options snd snd_major=14 snd_cards_limit=2
       options snd-sb16 snd_index=1 snd_port=0x220 snd_irq=5 snd_dma8=1 snd_dma16=5
       options snd-gusclassic snd_index=2 snd_irq=11 snd_dma1=6 snd_dma2=7

  Example if two Gravis UltraSound Classic soundcards are present in
  system:

  alias char-major-14 snd
  alias snd-minor-oss-0 snd-mixer
  alias snd-minor-oss-3 snd-pcm1-oss
  alias snd-minor-oss-4 snd-pcm1-oss
  alias snd-minor-oss-5 snd-pcm1-oss
  alias snd-minor-oss-12 snd-pcm1-oss
  alias snd-card-0 snd-gusclassic
  alias snd-card-1 snd-gusclassic
  options snd snd_major=14 snd_cards_limit=2
  options snd-gusclassic snd_index=1,2 snd_port=0x220,0x260 snd_irq=5,11
  snd_dma1=5,6 snd_dma2=7,3

  5.5.  Backwards compatibility

  If you want to preserve OSS/Free or OSS/Linux compatibility, you need
  to insert one more driver: the snd-pcm1-oss driver for OSS-
  compatibility.  Issue a


       modprobe snd-pcm1-oss

  This will give you /dev/audio and /dev/dsp-support, just as the
  OSS/Free (kernel) drivers and OSS/Linux (the $25 ones) do. Note that
  this is only an emulation.


  6.  Testing and using

  Now you should test if the sound driver really is available, then try
  to use it.

  6.1.  The /proc filesystem

  You can find a lot of useful information about your system in the
  /proc subdirectory. /proc is a "virtual" filesystem, meaning that it
  does not exist in real life, but merely is a mapping to various
  processes and tasks in your computer. In order for /proc to work, you
  need to have support for it compiled into your kernel. Most linux
  distributions have this as a default, but if you compiled a kernel and
  left /proc out obviously there won't be anything in /proc.

  /proc/modules gives information about loaded modules. Once the ALSA
  sound drivers are loaded, if you type cat /proc/modules you should see
  something like:


       snd-pcm1-oss      4            0
       snd-sb16          1            1
       snd-sb-dsp        4    [snd-sb16]      0
       snd-pcm1          4    [snd-pcm1-oss snd-sb-dsp]      0
       snd-pcm           3    [snd-pcm1-oss snd-sb16 snd-sb-dsp snd-pcm1]    0
       snd-mixer         3    [snd-pcm1-oss snd-sb16 snd-sb-dsp]      1
       snd-mpu401-uart   1    [snd-sb16]      0
       snd-midi          4    [snd-sb16 snd-sb-dsp snd-mpu401-uart]   0
       snd-opl3          1    [snd-sb16]      0
       snd-synth         1    [snd-sb16 snd-opl3]     0
       snd-timer         1    [snd-opl3]      0
       snd               8    [snd-pcm1-oss snd-sb16 snd-sb-dsp snd-pcm1 snd-pcm snd-mixer snd-mpu401-uart snd-midi snd-opl3 snd-synth snd-timer]    0

  If something went wrong during the installation of the driver, you
  will still see a couple of "snd" devices, but there won't be sound
  support.

  For example (Note: you should never issue this command as follows, the
  cs4236 driver needs options):


       win3:~# modprobe snd-card-cs4236
       /lib/modules/2.0.35/misc/snd-card-cs4236.o: init_module: Device or resource busy
       snd-mixer: Device or resource busy
       win3:~# cat /proc/modules
       snd-cs4236        2           0
       snd-cs4231        3    [snd-cs4236]    0
       snd-timer         1    [snd-cs4231]    0
       snd-pcm1          4    [snd-cs4236 snd-cs4231] 0
       snd-mixer         3    [snd-cs4236 snd-cs4231] 0
       snd-pcm           3    [snd-cs4236 snd-cs4231 snd-pcm1]       0
       snd-mpu401-uart   1           0
       snd-midi          4    [snd-mpu401-uart]       0
       snd-opl3          1           0
       snd-synth         1    [snd-opl3]      0
       snd-timer         1    [snd-cs4231 snd-opl3]   0
       snd               8    [snd-cs4231 snd-timer snd-pcm1 snd-mixer snd-pcm]     0

  You can check the existence of a soundcard by looking in
  /proc/asound/cards.  For example:


       bash$ cat /proc/asound/cards
       0 [card1          : SB16 - Sound Blaster 16
                           Sound Blaster 16 at 0x220, irq 5, dma 1&5

  In the previous example (where I forgot the options) the output would
  have been:


       win3:~# cat /proc/asound/cards
       --- no soundcards ---

  A working CS4236 card would produce


       0 [card1         ]: CS4236 - CS4237B
                           CS4237B at 0x534, irq 7, dma 1&0

  If you checked and doublechecked your settings and still see no sound
  card, take a look at the troubleshooting section.

  The /proc/asound/ virtual directory shows lots of other information
  about the driver. Please note that /proc/asound/ will only exist after
  you inserted the first ALSA module. If there is no /proc/asound, it
  simply means that the "snd" module was not loaded properly. You can
  find installed cards in /proc/asound/cards, then find information
  about card0 in /proc/asound/0, /proc/asound/1 for card1 etcetera.

  If cat /proc/asound/card1/pcm0 shows something like


             ES1370 DAC2/ADC
             Playback isn't active.
             Record isn't active.

  this means that your driver is ready to go, but is not doing anything
  right now. (So everything went well).

  For users of a 2.0.x kernel there is a third method to find
  information about the sound devices, namely if you inserted the OSS
  compatible driver there is a /dev/sndstat device. The ALSA drivers
  kindly request that you not to rely on this information as it is only
  there for compatibility with the OSS drivers and better information
  can easily be obtained from /proc/asound/. In kernel 2.2.x ALSA uses
  the kernel soundcore and therefor cannot emulate /dev/sndstat, since
  it would interfere with the OSS drivers.


  6.2.  The mixer

  Once the drivers for your sound card have been installed and your
  /proc filesystem tells you so, you can try to make a real sound. To do
  this, you need to set the mixer volumes to a reasonable value. You
  need the ``amixer'' from the alsa-utils package for this. First of
  all, install the utility package, or at least put the "amixer" command
  in some reasonable place (like /usr/local/bin).

  Version 0.3.2 and later have an interface that differs from the OSS
  drivers. If you type just ``amixer'' you will see the mixer elements
  and their value. One of these elements could be ``Master volume'' for
  example, and could look like:

       Group 'Master',0
         Capabilities: volume
         Channels: Front-Left Front-Right
         Limits: min = 0, max = 31
         Front-Left: 31 [100%] [on] [---]
         Front-Right: 26 [84%] [on] [---]

  Unfortunately, I do not know how to set left and right volumes
  independently. With amixer, you can change volumes with the ``amixer
  set'' command. For example, to change the Master volume, you would
  issue a

       amixer set Master 15

  Please note that the names of the elements can be different for
  different types of sound cards. Also note that amixer is case
  dependent, so ``amixer set masteR 10'' will not work.  For more
  information, please look in the amixer man page.
  If you have a 0.3.0-pre4 ALSA, then amixer works just like normal
  mixer programs.  You can look at the mixer settings by typing
  ``amixer''. This command lists the ``mixer settings'', or as you would
  normally call it, the volume settings of the various parts of the
  soundcard.  The output from amixer can greatly differ from card to
  card. My Soundblaster 16 shows:


       Master         0  % (-14.00dB) : 0  % (-14.00dB)
       Bass           0  % (-14.00dB) : 0  % (-14.00dB)
       Treble         0  % (-14.00dB) : 0  % (-14.00dB)
       Synth          0  % (-62.00dB) : 0  % (-62.00dB)
       PCM            0  % (-62.00dB) : 0  % (-62.00dB)
       Line-In        0  % (-62.00dB) : 0  % (-62.00dB) Mute
       MIC            0  % (-62.00dB) : 0  % (-62.00dB) Mute
       CD             0  % (-62.00dB) : 0  % (-62.00dB) Mute
       In-Gain        0  % (-18.00dB) : 0  % (-18.00dB)
       Out-Gain       0  % (-18.00dB) : 0  % (-18.00dB)
       PC Speaker     0  % (-18.00dB) : 0  % (-18.00dB)

  If you only get a message like ``amixer: Specify command...'', then
  you are using the ALSA 3.2 utilities. I suggest you to upgrade to
  0.4.1e or later, or to go back to 0.3.0-pre4.


  6.2.1.  Mixer settings for playing

  You have noticed the "Mute" entry for some devices. This means that
  this particular device will be zeroed out, whatever volume setting you
  use. Some cards (the CS4237B in the example) even mute their master
  channel.  So, for the CS4237B, I would have to type

  amixer set "Master d" unmute

  to even be able to produce any sound at all. The Soundblaster does not
  have muted output, but

  amixer set Master 100 unmute

  would set the volume to 100% - and unmute it if it would have been
  muted.  You can use a number, a word like "mute" or "unmute", or both.
  Type

  amixer set "Master d" 100; amixer set PCM 100 unmute

  to set the CS4237B card to maximum master volume and unmute PCM volume
  and set it to maximum.

  If you use an older version of amixer, you need to leave out the
  ``set'' part of the command, so you would just type

  amixer "master d" 100


  6.2.2.  Mixer parts

  The various mixer parts may confuse you if you have no knowledge of
  digital sound production. The sound-HOWTO may help a bit, but a very
  short introduction is here.

  You will probably only need few mixer elements: one of them is the
  ``CD'' setting (this is analog sound of your CD player, most CD
  players are connected with a 3 or 4 wire red/white/black cable).
  The ``PCM'' setting is used for most applications. Programs like
  mpg123, xmms, speakfreely, realplayer and most others use the PCM
  channel.

  ``MIC'' stands for microphone, ``line-in'' is an (optional) extra
  input at the back of your sound card.

  The various ``gain'' parts offer extra amplification for various uses
  and are pretty self-explanatory. (Like: record-gain is extra
  amplification for the recording channel, which can be useful if you
  use a microphone).


  6.2.3.  Mixer settings for recording

  You would set the CD channel to record by typing

  amixer set CD capture

  and stop the recording setting again by typing

  amixer set CD nocapture.

  Note that older amixer programs use ``amixer CD rec'' and ``amixer CD
  norec'' for this.

  If you would like to record something from the microphone, you would
  probably use

  amixer set "Input Gain" 100; amixer set Mic 100 capture mute.

  (Using the microphone input unmuted will produce loud high-pitched
  sound if your mic picks up its own signal from the speakers again).
  Most microphones have a ``gain'' setting to boost the microphone
  volume; you are most likely going to need it to pick up any sound from
  the microphone at all.

  Again, older amixer programs use ``amixer "input gain" 100; amixer mic
  100 rec mute''.


  6.2.4.  Other mixer settings

  Unfortunately I have not been able to change the volume of the "3d
  center" and "3d space" settings with amixer 0.3.0-pre4. I haven't
  tried yet with 0.4.1e (this particular machine is still running
  2.0.38). If anyone succeeds please let me know. I can use alsamixer
  for this job, but alsamixer was not ported to the 0.4.1e version yet.

  The ALSA FAQ says that it is possible to restore mixer settings with
  cat <file> > /proc/asound/#/mixerC0D0, where <file> was obtained from
  /proc/asound/#/mixerC0D0. I have not been able to reproduce this as my
  system complains about non-existing devices. Then there is the
  ``alsactl'' program, which I don't use. I invite you (yes, you!)  to
  write this section.


  6.3.  The /dev/snd/ devices

  The alsa drivers have native sound-devices in the /dev/snd/ directory.
  If you have  one card you might see the following devices:

  /dev/snd/pcmC0D0 - the raw audio device for the card
  /dev/snd/mixerC0D0 - the mixer for card 0
  /dev/snd/controlC0D0 - the control device for card 0

  The first number means the number of the soundcard, the second number
  (if any) is the number of the device. A sound card with two PCM
  devices would have a pcmC0D0 and pcmC0D1 device.  Please note: the
  ALSA devices have changed between the previous version. Older ALSA
  drivers use /dev/snd/pcm00 (first number is the card, second number is
  the device).  If this HOWTO uses the older notation, please drop me a
  line so I can correct it.

  Now you are ready to put any soundfile you want into the PCM device of
  the first card. So try to cat any textfile (any file) to
  /dev/snd/pcmC0D0, like this: cat <filename> > /dev/snd/pcmC0D0. The
  filename can be any file, as long as it has some length. If you have a
  soundfile lying around somewhere, you could try that. You could also
  get the file at http://www.ldp.org/sounds/english.au this is Linus
  Torvalds saying how to pronounce Linux.

  The default setting of your sound device is 8000 Hz, 8 bit. That means
  that the "english.au" file mentioned above will produce speech, other
  test files will probably just produce noise. If you do not hear
  anything, check your speakers, try to run "amixer" again or consult a
  doctor.  (Later on you can easily use the full 48 KHz, 16 bit features
  of your sound card, by using your favourite sound player like sox or
  mpg123).

  If you loaded the ``snd-pcm1-oss'' module, you can also use the OSS-
  compatibility to access your sound card. The following mappings are
  made:


       /dev/snd/pcmC0D0 -> /dev/audio0 (/dev/audio) -> minor 4
       /dev/snd/pcmC0D0 -> /dev/dsp0 (/dev/dsp) -> minor 3
       /dev/snd/pcmC0D1 -> /dev/adsp0 (/dev/adsp) -> minor 12
       /dev/snd/pcmC1D0 -> /dev/audio1 -> minor 4+16 = 20
       /dev/snd/pcmC1D0 -> /dev/dsp1 -> minor 3+16 = 19
       /dev/snd/pcmC1D1 -> /dev/adsp1 -> minor 12+16 = 28
       /dev/snd/pcmC2D0 -> /dev/audio2 -> minor 4+32 = 36
       /dev/snd/pcmC2D0 -> /dev/dsp2 -> minor 3+32 = 35
       /dev/snd/pcmC2D1 -> /dev/adsp2 -> minor 12+32 = 44

  You probaly want to use the ``snd-mixer-oss'' module as wel, so you
  can use the backwards compatible mixer.


  6.4.  Additional information

  The INSTALL file in the ALSA driver directory mentions some tricks to
  tell the driver which settings to use. If you need these commands it
  will depend on the application you use to play sound. Regular sound
  playing applications, like mpg123, sox (mostly called with the
  ``play'' command), or X11 applications like RealPlayer will probably
  do fine without these. I never used these anyway.

  6.4.1.  /proc/asound/#/pcm#0

       "Playback erase" - erase all additional informations about OSS applications
       "Playback <app_name> <fragments> <fragment_size> [<options>]"
       "Record erase" - erase all additional informations about OSS applications
       "Record <app_name> <fragments> <fragment_size> [<options>]"

  <app_name> - name of application with (highter priority) or without
  path

  <fragments> - number of fragments or zero if auto

  <fragment_size> - size of fragment in bytes or zero if auto

  <options> - optional parameters

  WR_ONLY - if application tries open pcm device with O_RDWR driver
  rewrites this to O_WRONLY (playback) - good for Quake etc...

  Examples:


       echo "Playback x11amp 128 16384" > /proc/asound/0/pcm0o
       echo "Playback squake 0 0 WR_ONLY" > /proc/asound/0/pcm0o

  6.4.2.  /proc/asound/#card#/sb16

       "Playback 8" -> driver will use always 8-bit DMA channel for playback.
       "Playback 16" -> driver will use always 16-bit DMA channel for playback.
       "Playback auto" (default) -> driver will use auto mode (first opened direction will use 16-bit DMA channel).
       "Record 8" -> driver will use always 8-bit DMA channel for record.
       "Record 16" -> driver will use always 16-bit DMA channel for record.
       "Record auto" (default) -> driver will use auto mode (first opened direction will use 16-bit DMA channel).

  Example: echo "Record 16" > /proc/asound/0/sb16

  For further reference, please consult the INSTALL file.

  7.  Tips and Troubleshooting

  Please take a look at the FAQ file in the sound driver directory. This
  section is still under construction.

  7.1.  Compiling the driver


  7.1.1.  Linux kernel sourcetree

  If your ALSA drivers do not compile correctly and tell you things
  about ``version.h'' or other header-files that cannot be found, this
  can mean that you do not have the kernel header files.  Take a look at
  the kernel-HOWTO, unpack a recent kernel in /usr/src and issue a make
  config.

  7.1.2.  Cannot create executables

  The utils also contain code written in c++. Most of us have a c++
  compiler either from gcc or egcs but make sure you also have the
  libstdc++-devel package installed, else when you run the configure
  script for the utils, your system will stump you with an error message
  saying your ``c++ compiler cannot create executables''.


  7.2.  Loading the driver

  Please check the following items.


  7.2.1.  Sound devices

  ALSA uses special devices in the /dev-tree. Make sure you have run the
  ./snddevices script in the alsa-drivers source directory.


  7.2.2.  Sound card compatibility

  Are you 100% sure that your sound card IS supported ? Do check it
  again.  Sometimes an X123 is not exactly an X123b and you might be
  wasting time.  On the other hand, even a supported card can give you
  troubles - it took me two hours to figure out the installation of a
  CS4237B which was, after all, just a fine example of RTFM.


  7.2.3.  ``Device busy'' or ``unresolved symbols''

  You might have a 2.0.x kernel with sound support compiled in, or the
  OSS/Lite (kernel) sound driver could be loaded (check with cat
  /proc/modules). Remove the driver or recompile the kernel (have a look
  at the Kernel-HOWTO).

  The sound module in the 2.0 series kernel is called ``sound.o'' and
  should not be active.  (The ALSA driver ``snd.o'' is OK, though).

  If you have a 2.2.x series kernel without sound driver compiled in,
  the ALSA drivers will not work, too.


  7.2.3.1.  2.0 kernels

  I know it this is confusing, so let me try to explain it one more
  time. If you have a 2.0.x series kernel (the command ``uname -a''
  tells you something like ``Linux penguin 2.0.35 #6 Wed Sep 23 10:19:16
  CEST 1998 i686 unknown'') then you need to leave out sound drivers in
  the kernel. ALSA 0.4.x and later do not work with the 2.0 series
  kernel


  7.2.3.2.  2.2 kernels

  If you have a 2.2.x series kernel you do need the sound drivers. A 2.2
  series kernel should be compiled with sound support, but without any
  sound card driver. So you select sound support but make sure that no
  specific sound card driver will be compiled.


  7.2.4.  References to other drivers

  Another reason why the driver complains that the device is busy could
  be that the file /etc/conf.modules still has references to the
  soundcard drivers. You should delete these and leave only the
  references to the ALSA-driver.  (If there are other non-sound-related
  drivers there, then you can probably leave these as-is).


  7.2.5.  Unresolved symbols revisited

  Another source of ``unresolved symbols'' messages could be a new
  kernel with older drivers. Please recompile the ALSA drivers after you
  recompile a new kernel. This will make sure that the drivers match
  your new kernel.


  7.2.6.  Check the PnP setup

  Are you sure that your card is active? Take another look at the PnP-
  HOWTO and check if you activated your sound card correctly.


  7.2.7.  Are your parameters right ?

  Check, doublecheck your sound card parameters. Please note: 534 is not
  543, nor is 0x534 the same as 534.

  Also, some sound cards must be loaded by a different name than might
  be expected. Take a break, a beer or whatever, and look again at your
  ``modprobe'' command. For example the Crystal 4232 driver should be
  inserted by modprobe snd-card-cs4232, not ``snd-cs4231'', and the
  SoundBlaster PCI 64 should be loaded with ``snd-card-audiopci'', not
  snd-es1370. (It's all in the docs, and even though I wrote the HOWTO,
  I once spent an evening trying to persuade snd-cs4231 to make sound).


  7.3.  Driver loaded... but no (or hardly any) sound

  7.3.1.  Unmuting

  The ALSA drivers can use the ``muting'' facilities that most
  soundcards have. If you loaded the sound drivers and everything is
  fine but you get nothing but silence, then you probably forgot to
  unmute your card. You need ``amixer'' or ``alsamixer'' for this, both
  from the ALSA-util package.  Just typing


       amixer set -c 1 Master 70 unmute
       amixer set -c 1 PCM 70 unmute
       amixer set -c 1 CD 70 unmute

  should do for most applications. Please note that for the older amixer
  command you need to leave out the ``set'' in the command line.


  7.3.2.  Gain

  Most sound cards have a separate mixer part for extra input or output
  boosting. This entry is most likely called the ``gain'', ``in-gain''
  for input and ``out-gain'' for output. Setting this gain to an
  appropriate level will greatly help you getting the maximum volume out
  of your speakers (think about your parents/neighbours/ears though).
  So a command like


  amixer set out-gain 100 unmute

  will probably help.


  7.3.3.  OSS/Linux compatibility

  If this is the first time you use the ALSA drivers and you used the
  built-in sound drivers before, you probably want to have backwards
  compatible sound (i.e. use the /dev/pcmX devices). You need to load
  the ``OSS compatibility driver'' for this. Do a modprobe snd-pcm1-oss
  && modprobe snd-mixer-oss. (See the end of the section about loading
  the driver). Please note: snd-pcm1-oss is not equal to snd-pcm1, you
  need snd-pcm1-oss for old-fashioned sound support and snd-mixer-oss
  for (you guessed it) the mixer.


  7.3.4.  Cannot open mixer

  If you have tried to install a couple of different ALSA versions, then
  sometimes the mixer cannot be opened anymore. This happens if you have
  tried 0.3.2 and want to downgrade to 0.3.0-pre4 (IIRC). You should
  delete all libasound files and links from /usr/lib and then recompile
  libraries and utils:


       rm /usr/lib/libasound.*

  Just to be safe, remove all ALSA sound drivers afterwards, then recom
  pile and install and reload the drivers.


  7.4.  General suggestions

  7.4.1.  Try using ``insmod''

  It can always be useful to start with "insmod" instead of kerneld.
  Maybe you actually see the error on screen.


  7.4.2.  Read the INSTALL file.

  A lot of information can be found in the INSTALL file in the drivers
  directory. If your driver won't work check if there is additional
  information available.


  7.4.3.  Debug messages

  As a last resort, you can rebuild the driver and tell it to send debug
  information to /var/log/messages. Go to the driver-directory with cd
  /usr/src/alsa-driver-....  and type:

       ./configure --with-debug=detect; make clean; make


  Remove the driver (as far as it is active, see below for a general
  remove statement).  Then use the "modprobe" statement you used before
  to insert the newly compiled driver.  Look in /var/log/messages if
  there are any messages.


  7.4.4.  If all else fails...

  If these messages doesn't help you, send a message to the ALSA users
  mailing list, alsa-user@alsa-project.org.

  Include the following information:

    soundcard name + chip names present on your soundcard

    relevant sections in your isapnp.conf if you have ISA PnP soundcard

    your conf.modules or line which you activate ALSA driver

    all messages from /var/log/messages which should be relevant to the
     ALSA driver


  7.5.  Bug reports

  If you found a bug, the ALSA developers would like to know the
  following things (at minimum)

  1. driver + kernel version: 'cat /proc/asound/version'

  2. soundcard info

    soundcard name provided by manufacture

    list of chips which soundcard have onboard

    contents of 'cat /proc/asound/cards'

  3. all messages from /var/log/messages which should be relevant to
     ALSA driver

  4. problem description


  7.6.  Tip: playing CD's

  If you use kmod/kerneld and the ALSA drivers to play CD's, then
  kmod/kerneld probably do not load the drivers as expected. This is due
  to the fact that a command line CD player only tells the CD player to
  start playing without using any of the devices that tell kmod/kerneld
  that there is sound to occur. Using modprobe may be your only solution
  to this problem.


  7.7.  Tip: installing the MIDI serial driver

  Normally, the IO port of the serial device is owned by the standard
  serial device driver. So before you can do ``modprobe snd-serial'' we
  have to tell the driver to release the serial device.

  Here is the procedure.

  setserial /dev/ttyS0 uart none
  modprobe snd-serial

  (Replace /dev/ttyS0 with the appropriate /dev/ttySx device if your
  MIDI device uses a different serial device).


  7.8.  Tip: new kernel? New modules!

  After you upgrade your kernel, you probably need to recompile the ALSA
  drivers. If they are still in the original /usr/src directory, then
  please do not forget to issue a make clean before you do the
  ./configure, make, make install thing.

  Oh, and then there is this anomaly in kernel numbering: a ``2.2.0ac1''
  kernel that is ``not a number'' - says the configure script. I think
  this was resolved in newer scripts, otherwise you should maybe change
  the kernel version in the source.


  7.9.  Tip: KDE and ALSA drivers

  Suppose you have KDE up and running but you cannot get system sounds
  to work, like for opening windows, changing desktops, etc. Sound works
  in general.  If your cd player and mp3 player and mixer all do work,
  then it's probably just "kwmsound" that's lacking.

  So: make sure "kwmsound" is in your startscript ($KDEDIR/bin/startkde)


  7.10.  Tip: use the ALSA devices

  If you had sound support in your Linux before, then your applications
  will probably all point to /dev/pcm0, /dev/audio and /dev/mixer. This
  is fine, if you use OSS compatibility with the snd-pcm1-oss module. It
  might be better, however, to use the real ALSA devices, those found in
  /dev/snd/.


  7.11.  Tip: removing all modules

  Removing 10+ modules one by one is not the way to go. Luckily, all
  modules start with the "snd-" prefix, so a little command line
  programming will do.  You can easily remove ALSA sound by issuing a
  command like:

       cat /proc/modules|gawk '/^snd-/{print $1}'|xargs -i rmmod {}

  Juergen Kahrs wrote: ``I have a script that also removes soundcore and
  soundlow and sound if present and if they are not in use. This script
  processes /proc/modules three times so there should not be too many
  modules left after processing''. His solution is

       awk '/^snd/||/^sound/&&($3==0){system("rmmod " $1)}' /proc/modules /proc/modules /proc/modules


  Please note: if some module is dependent on another module you cannot
  just remove the "higher" one.  This means that you might need to issue
  a second removal statement. (I never encountered this situation
  though, it seems that you can remove the ALSA modules in the order
  they appear in /proc/modules).

  Linux Apache SSL PHP/FI frontpage mini-HOWTO
  Marcus Faure, marcus@faure.de
  v1.1, July 1998

  This document is about building a multipurpose webserver that will
  support dynamic web content via the PHP/FI scripting language, secure
  transmission of data based on Netscape's SSL, secure execution of
  CGI's and M$ Frontpage Server Extensions
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Description of the components
     1.2 Working configurations
     1.3 History

  2. Component installation

     2.1 Preparations
     2.2 Adding PHP
     2.3 Adding SSL
     2.4 Adding frontpage

  3. Putting it all together

     3.1 Apache modules to try
     3.2 Giving CGI's more security
     3.3 Compiling and installing the server daemon
     3.4 Adding frontpage support to a web
     3.5 Starting the daemon
     3.6 Some considerations left
     3.7 Known bugs
     3.8 The final word


  ______________________________________________________________________

  1.  Introduction

  Before you start reading: I am not a native speaker, so there are
  probably spelling/grammatical errors in this document. Feel encouraged
  to inform me of mistakes.


  1.1.  Description of the components

  The webserver you hopefully will get after having read this howto is
  composed of several parts, the original apache sources with some
  (well, many) patches and some external executables. I recommend using
  the software versions I tried, they will probably compile without
  greater problems and result in a fairly stable daemon. If you are
  courageous, you can try to compile all the latest-stuff-with-tons-of-
  new-features, but  don't blame me if something fails ;-). However, you
  may report other working configurations to be included in future
  versions of this document. All of the steps were tested on a linux
  2.0.35 box, so the howto is somewhat linux-specific, but you should be
  able to use it for other unixes as well.

  You do not necesserily have to compile in all components. I tried to
  structure this howto so that you can skip the parts you are not
  interested in.


  The document is neither a user manual to Apache, SSL, PHP/FI nor
  frontpage.  Its prime intention is to save webservice providers some
  headaches when installing their server and to do my little
  contribution to the linux community.

  PHP is a scripting language that supports dynamic HTML pages. It is a
  bit like Apache's SSI, but by far more complex and has database
  modules for many popular dbs. The GD libraries are needed by PHP.

  SSL is an implementation of Netscape's Secure Socket Layer that allow
  secure connections over insecure networks, e.g. to transmit credit
  card numbers to web based forms.

  frontpage is a wysiwyg web authoring tool that makes use of some
  server-specific extensions called webbots. Some people think frontpage
  is cool because you can create feedback forms and discussion webs
  without having to know a bit about html or cgi. It even protects the
  designer from uploading his/her site via ftp by using a builtin
  publisher. If you wish to support frontpage but do not like to setup a
  windows server, the apache server extensions are your choice.


  1.2.  Working configurations

  Though this document has been downloaded some 100 times since I
  published it, I received only little feedback. In particular, noone
  told me of other working combinations. Combinations that work for me
  are:

  o  Linux 2.0.31, Apache 1.2.4, PHP 2.0.0, SSL 0.8.0, fp 98 3.0.3 (*)

  o  Linux 2.0.33, Apache 1.2.5, PHP 2.0.1, SSL 0.8.0, fp 98 3.0.3 (*)

  o  Linux 2.0.35, Apache 1.2.6, PHP 3, SSL 0.8.0, fp 98 3.0.4

     (*) version 3.0.3 is ``not recommended''


  1.3.  History


  v0.0/Apr 98:    Preview version

  v1.0/Jun 98:    Now using Apache 1.2.6, updated fp section, minor
  corrections

  v1.1/Jul 98:    Sgmlized and restructered version

  You can find the latest version of this document at
  <http://www.faure.de>


  2.  Component installation

  2.1.  Preparations

  You will need:

  o  Apache 1.2.6  <http://www.apache.org/dist/apache_1_2_6.tar.gz>

  o  PHP/FI Extensions
     <http://php.iquest.net/files/download.phtml?/files/php-2.01.tar.gz>

  o  GD Library  <http://siva.cshl.org/gd/gd.html>


  o  SSL 0.8.0 <ftp://ftp.ox.ac.uk/pub/crypto/SSL/SSLeay-0.8.0.tar.gz>

  o  SSL patch for Apache 1.2.6
     <ftp://ftp.ox.ac.uk/pub/crypto/SSL/apache_1.2.6+ssl_1.17.tar.gz>

  o  frontpage 98 server extensions and install script
     <http://www.rtr.com/fpsupport/download.htm>

  Get the sources you want. Untar apche, php, gd and ssl to /usr/src.
  Untar the SSL patch to /usr/src/apache_1.2.6.


  2.2.  Adding PHP

  cd to /usr/src/gd1.2 and type make. This will build the GD library
  libgd.a, that should be copied to /usr/lib.  Now cd to php-2.0.1 and
  run ./install.

  The relevant questions are:

  Would you like to compile PHP/FI as an Apache module? [yN] y
  Are you compiling for an Apache 1.1 or later server? [Yn] y
  Are you using Apache-Stronghold? [yN] y
  Does your Apache server support ELF dynamic loading? [yN] y
  Apache include directory (which has httpd.h)? [/usr/local/include/apache] /usr/src/apache_1.2.6/src
  Would you like to build an ELF shared library? [yN] y
  Additional directories to search for .h files []: /usr/src/gd1.2
  Would you like the bundled regex library? [yN] n



  Like the frontpage extensions, phtml includes a security problem
  because it is run under the uid of the webserver. Be sure to turn on
  safe mode in src/php.h and restrict the search path to a save value.
  There are some other options in php.h you may want to edit. If you are
  very concerned about security, compile php as a cgi. However, this
  will be a performance loss and not as smart as the module version.

  Type make to build all files. When the compilation is done, copy
  mod_php.* and libphp.a to /usr/src/apache_1.2.6/src Add a line

  Module php_module mod_php.o


  to the end of /usr/src/apache_1.2.6/src/Configuration, add

  -lphp -lm -lgdbm -lgd


  to the EXTRA_LIBS in the same file,

  application/x-httpd-php phtml


  to Apache's mime.types and

  AddType  application/x-httpd-php .phtml


  to Apache's srm.conf.

  You may also want to add index.phtml to DirectoryIndex in that file so
  that a file index.phtml is automatically loaded when its directory is
  requested.


  2.3.  Adding SSL

  cd /usr/src/SSL-0.8.0; ./Configure linux-elf; make; make rehash This
  will create libraries needed by apache. You may issue make test to
  verify the compilation.  You have to apply a patch to apache. It is
  important that you apply it before the frontpage patch, otherwise
  frontpage will not work.  cd to /usr/src/apache_1.2.6/src and issue
  patch < /usr/src/apache_1.2.6/SSLpatch.  Set
  SSL_BASE=/usr/src/SSLeay-0.8.0 in Configuration. Make sure that Module
  proxy_module is disabled otherwise Apache won't compile. If you are in
  need of a proxy, go for Squid http://squid.nlanr.net/

  Now make certificate to generate SSLconf/conf/httpsd.pem.


  2.4.  Adding frontpage

  Rename the fp30.linux.tar.Z file to fp30.linux.tar.gz, otherwise the
  install script will not find it. Run ./fp_install to copy the
  extension files to /usr/local/frontpage. zcat can usually be invoked
  as /usr/bin/zcat.

  You now have to apply the FP patch. cd to /usr/src/apache_1.2.6/src
  and type patch < /usr/src/frontpage/version3.0/apache-fp/fp-patch-
  apache_1.2.5 This will create the mod_frontpage.* files and do some
  modifications to Configuration etc. The 1.2.5 patch will work with
  both apache 1.2.5 and 1.2.6. Skip the part about installing webs, you
  can do that later


  3.  Putting it all together

  3.1.  Apache modules to try

  The modules I use besides SSL, PHP and frontpage are:

  Module env_module          mod_env.o
  Module config_log_module   mod_log_config.o
  Module mime_module         mod_mime.o
  Module negotiation_module  mod_negotiation.o
  Module dir_module          mod_dir.o
  Module cgi_module          mod_cgi.o
  Module asis_module         mod_asis.o
  Module imap_module         mod_imap.o
  Module action_module       mod_actions.o
  Module alias_module        mod_alias.o
  Module rewrite_module      mod_rewrite.o
  Module access_module       mod_access.o
  Module auth_module         mod_auth.o
  Module anon_auth_module    mod_auth_anon.o
  Module digest_module       mod_digest.o
  Module expires_module      mod_expires.o
  Module headers_module      mod_headers.o
  Module browser_module      mod_browser.o



  3.2.  Giving CGI's more security

  If you are an ISP (you probably are when you read this) you will want
  to improve security. The suexec utility allows you to do so; it will
  execute cgi's under the UID of the webowner instead of executing it
  under the webservers UID.  Go to /usr/src/apache_1.2.6/support and
  make suexec.  chmod 4711 suxec and copy it to the location specified
  in ../src/httpd.h which is /usr/local/etc/httpd/sbin/suexec by
  default. If the path seems a little cryptic to you - it did to me -
  edit httpd.h and set the path to a more comfortable value.


  3.3.  Compiling and installing the server daemon

  Enter /usr/src/apache_1.2.6/src and edit Configuration to set all the
  Modules you want to include in your Apache daemon. When done, run
  ./Configure and make. This is the last (and most complicated)
  compilation step, so cross your fingers. If it succeeds, cp httpsd to
  /usr/sbin. The daemon is somewhat big, consider this when assembling
  your webserver. Create the directory /var/httpd with subdirectories
  cgi-bin, conf, htdocs, icons, virt1, virt2 and logs. In
  /usr/src/apache_1.2.6/conf edit access.conf-dist, mime.types and
  srm.conf-dist to suit your needs and copy them to
  var/httpd/conf/access.conf, srm.conf and mime.types. Copy the
  httpsd.pem you created with make certificate to /var/httpd/conf. Use
  the following httpd.conf:



  ServerType standalone
  Port 80
  Listen 80
  Listen 443
  User wwwrun
  Group wwwrun
  ServerAdmin webmaster@yourhost.com
  ServerRoot /var/httpd
  ErrorLog logs/error_log
  TransferLog logs/access_log
  PidFile logs/httpd.pid
  ServerName www.yourhost.com
  MinSpareServers 3
  MaxSpareServers 20
  StartServers 3

  SSLCACertificatePath /var/httpd/conf
  SSLCACertificateFile /var/httpd/conf/httpsd.pem
  SSLCertificateFile /var/httpd/conf/httpsd.pem
  SSLLogFile /var/httpd/logs/ssl.log

  <VirtualHost www.virt1.com>
  SSLDisable
  ServerAdmin webmaster@virt1.com
  DocumentRoot /var/httpd/virt1
  ScriptAlias /cgi-bin/ /var/httpd/virt1/cgi-bin/
  ServerName www.virt1.com
  ErrorLog logs/virt1-error.log
  TransferLog logs/virt1-access.log
  User virt1admin
  Group users
  </VirtualHost>

  <VirtualHost www.virt1.com:443>
  ServerAdmin webmaster@virt1.com
  DocumentRoot /var/httpd/virt1
  ScriptAlias /cgi-bin/ /var/httpd/virt1/cgi-bin/
  ServerName www.virt1.com
  ErrorLog logs/virt1-ssl-error.log
  TransferLog logs/virt1-ssl-access.log
  User virt1admin
  Group users
  SSLCACertificatePath /var/httpd/conf
  SSLCACertificateFile /var/httpd/conf/httpsd.pem
  SSLCertificateFile /var/httpd/conf/httpsd.pem
  SSLLogFile /var/httpd/logs/virt1-ssl.log
  SSLVerifyClient 0
  SSLFakeBasicAuth
  </VirtualHost>

  <VirtualHost www.virt2.com>
  SSLDisable
  ServerAdmin webmaster@virt2.com
  DocumentRoot /var/httpd/virt2
  ScriptAlias /cgi-bin/ /var/httpd/virt2/cgi-bin/
  ServerName www.virt2.com
  ErrorLog logs/virt2-error.log
  TransferLog logs/virt2-access.log
  </VirtualHost>



  Depending on the modules compiled in, not all directives may be
  available.  You can retrieve a list of available directives with
  httpsd -h.

  3.4.  Adding frontpage support to a web

  Enter /usr/local/frontpage/version3.0/bin and load ./fpsrvadm. Choose
  install and apache-fp. The next questions should be answered the
  following way:

  Enter server config filename: /var/httpd/conf/httpd.conf
  Enter host name for multi-hosting []: www.virt2.com
  Starting install, port: www.virt2.com:80, web: ""
  Enter user's name []: virt2admin
  Enter user's password:
  Confirm password:
  Creating root web
  Recalculate links for root web
  Install completed.



  The user name must be the unix login of the webowner. The password
  does not necessarily have to match the system password.  You have to
  manually add sendmailcommand:/usr/sbin/sendmail %r to
  /usr/local/frontpage/www.virt2.com:80.conf, otherwise your users will
  not be able to send web-generated eMails.  kill -HUP your httpsd to
  make fp reread its config. You can now access www.virt2.com with your
  frontpage client.

  Under some circumstances fpsrvadm complaints that a root web has to be
  installed first. This is pretty useless, but you should do so to
  silence fpsrvadm.


  3.5.  Starting the daemon

  Start Apache with httpsd -f /var/httpd/conf/httpd.conf. You can now
  access www.virt1.com both through http and https which is pretty cool.
  Of course you have to pay for a real certificate if you want to offer
  webwide SSL or users might laugh at you.

  Copy one of the demo files from the php examples directory to virt1 to
  test phtml.


  3.6.  Some considerations left

  Do not use frontpage 97 extensions. They do not work, at least under
  Linux. When installing specific versions of the c++ libraries, they
  appear to work but your logs will soon fill with premature end of
  script headers and your mailbox will fill with complaints.  Do not use
  frontpage 98 extensions before version 3.0.2.1330. Do not be confused,
  version numbers are somewhat inheterogenous. When telnetting to port
  80, typing "get / http/1.0" and hitting return twice, you get a
  version number 3.0.4 for frontpage.

  You can find out the more specific version number by executing
  /usr/local/frontpage/currentversion/exes/_vti_bin/shtml.exe -version.
  Older versions have a nasty bug that requires httpd.conf to be
  writable by the gid of the webserver. This should make you scream if
  you are at all concerned about security.  Versions since 3.0.2.1330
  are more usable.


  3.7.  Known bugs

  When touching Recalculate Links in the frontpage client, the server
  starts a process that consumes 99% cpu cycles and some 10 mb of
  memory. But even for medium-sized webs and fast machines, the client
  sometimes recieves a timeout message, though the calculation will be
  finished correctly. Inform frontpage users to be patient and not to
  hit Recalculate Links several times. Inform yourself to equip the
  server with at least 64MB.

  Please note that at the time of writing both SSL and frontpage work,
  but not at the same time, that means you can neither publish your web
  using ssl nor make use of the webbots through https. You can publish
  your web on port 80 and access it encrypted on port 443, but your
  counters etc. will be broken. I consider this a bug. This problem
  shall be fixed in SSL 0.9.0.


  3.8.  The final word

  For those who think the title of this howto is nearly as long as the
  document: Did you ever listened to Meat Loaf?

  O.K. readers, you're done for today. Feel free to send me your
  feedback, eternal gratitude, flowers, ecash, cars, oil sources etc.



  Apache+DSO+mod_ssl+mod_perl+php+mod_auth_nds+mod_auth_mysql+mod_fastcgi
  Ray Van Dolson, rayvd@firetail.org
  v0.91, 5 April 2000

  Details the installation of an Apache based webserver suite configured
  to handle DSO, and various useful modules including mod_perl, mod_ssl
  and php.
  ______________________________________________________________________

  Table of Contents


  1. Legal Stuff

  2. Introduction

     2.1 Description of the Components
     2.2 History

  3. Component Installation

     3.1 Preparations
     3.2 mod_ssl
        3.2.1 Installing and Compiling OpenSSL
        3.2.2 Installing and Compiling RSAREF 2.0
        3.2.3 Installing and Compiling MM
        3.2.4 Installing and Compiling mod_ssl (at last!)
     3.3 Apache
     3.4 MySQL
     3.5 PHP 3.0.15
        3.5.1 GD
        3.5.2 IMAP
        3.5.3 OpenLDAP
        3.5.4 Installing and Compiling PHP 3.0.15
     3.6 mod_perl
        3.6.1 Required Perl Modules
        3.6.2 Installing and Compiling mod_perl 1.2x
     3.7 mod_auth_mysql
     3.8 mod_auth_nds
        3.8.1 ncpfs
        3.8.2 Compiling and Installing mod_auth_nds
     3.9 mod_fastcgi

  4. Final Words

     4.1 Credits
     4.2 Contact Information
     4.3 Anything Else


  ______________________________________________________________________

  1.  Legal Stuff

  Apache+mods mini-HOWTO for Linux Systems

  Copyright (C)2000 Ray Van Dolson.

  This document is free; you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free
  Software Foundation; either version 2 of the License, or (at your
  option) any later version.

  This document is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  General Public License for more details.

  You can get a copy of the GNU GPL at at
  http://www.gnu.org/copyleft/gpl.html
  <http://www.gnu.org/copyleft/gpl.html>.

  2.  Introduction

  This document outlines the process used to install Apache & modules
  onto the web-server at Walla Walla College (www.wwc.edu).  While it
  will be, for the most part, system specific--hopefully it can serve as
  a useful reference for performing other installations.

  This document will attempt to outline the exact process used to
  install the server.  Notes will be made when things should have been
  gone about differently, but the original steps will be given (assuming
  they worked).

  2.1.  Description of the Components

  The platform on which the web-server was set up is a Red Hat 6.1 based
  system.  Linux kernel 2.2.14 (compiled from scratch) running on a Dual
  PIII 600 based system with RAID5 and lots of other goodies.

  The web-server software is Apache 1.3.12.  The following modules were
  added to the server:


  o  mod_fastcgi SNAP (also mod_rewrite), for use with Zope.

  o  Auth-MySQL 2.20

  o  mod_ssl 2.6.2 (Open-SSL 0.9.5)

  o  mod_perl 1.21

  o  PHP 3.0.15

  o  mod_auth_nds 0.3a

  2.2.  History

  v0.91 (April 5, 2000)

  o  Updated mod_fastcgi to correct version.

  v0.9 (April 4, 2000)

  o  Completed first draft

  o  Spelling/Grammar errors

  v0.1 (March 2000)

  o  Initial draft

  3.  Component Installation

  3.1.  Preparations

  You will need the following software:

  o  Apache 1.3.12 <http://www.apache.org/dist/apache_1.3.12.tar.gz>

  o  PHP 3.0.15 <http://www.php.net/distributions/php-3.0.15.tar.gz>

  o  GD 1.3 (to make use of GIF files)

  o  Source <http://www.boutell.com/gd/http/gd-1.3.tar.gz>

  o  RPM
     <ftp://rpmfind.net/linux/redhat/redhat-6.0/i386/RedHat/RPMS/gd-1.3-5.i386.rpm>

  o  RPM-devel
     <ftp://rpmfind.net/linux/redhat/redhat-6.0/i386/RedHat/RPMS/gd-
     devel-1.3-5.i386.rpm>

  o  GD 1.8.1 (to make use of PNG files)

  o  Source <http://www.boutell.com/gd/http/gd-1.8.1.tar.gz>

  o  RPM
     <ftp://rpmfind.net/linux/contrib/libc6/i386/gd-1.8.1-1.i386.rpm>

  o  RPM-devel <ftp://rpmfind.net/linux/contrib/libc6/i386/gd-
     devel-1.8.1-1.i386.rpm>

  o  IMAP 4.5+

  o  Source <ftp://ftp.cac.washington.edu/imap/imap-4.7b.tar.Z>

  o  RPM
     <ftp://rpmfind.net/linux/redhat/redhat-6.1/i386/RedHat/RPMS/imap-4.5-4.i386.rpm>

  o  OpenLDAP 1.2.9+

  o  Source <ftp://ftp.openldap.org/pub/OpenLDAP/openldap-
     release/openldap-1.2.9.tgz>

  o  RPM
     <ftp://rpmfind.net/linux/rawhide/1.0/i386/RedHat/RPMS/openldap-1.2.9-5.i386.rpm>

  o  RPM-devel
     <ftp://rpmfind.net/linux/rawhide/1.0/i386/RedHat/RPMS/openldap-
     devel-1.2.9-5.i386.rpm>

  o  mod_perl 1.22+ <http://perl.apache.org/dist/mod_perl-1.22.tar.gz>

  o  Perl5 Modules Required

  o  MIME::Base64 <http://amaunet.informatik.uni-dortmund.de/cgi-
     bin/CPAN/authors/id/GAAS/MIME-Base64-2.11.tar.gz>

  o  URI <http://www.perl.com/CPAN-local/modules/by-
     module/URI/URI-1.05.tar.gz>

  o  HTML-Parser <http://www.perl.com/CPAN-local/modules/by-
     module/HTML/HTML-Parser-3.07.tar.gz>

  o  Digest-MD5 <http://www.perl.com/CPAN-local/modules/by-
     module/Digest/Digest-MD5-2.09.tar.gz>

  o  libnet <http://www.perl.com/CPAN-local/modules/by-
     module/Net/libnet-1.0703.tar.gz>

  o  libwww <http://www.perl.com/CPAN-local/modules/by-
     module/WWW/libwww-perl-5.47.tar.gz>

  o  mod_ssl 2.6.2+
     <http://www.modssl.org/source/mod_ssl-2.6.2-1.3.12.tar.gz>


  o  OpenSSL 0.9.5

  o  Source <http://www.openssl.org/source/openssl-0.9.5.tar.gz>

  o  RPM
     <ftp://rpmfind.net/linux/contrib/libc6/i386/openssl-0.9.5-1.i386.rpm>

  o  RPM-devel <ftp://rpmfind.net/linux/contrib/libc6/i386/openssl-
     devel-0.9.5-1.i386.rpm>

  o  RSAREF 2.0
     <ftp://ftp.wwc.edu/pub/apache/modules/mod_ssl/depend/rsaref20.1996.tar.Z>

  o  MM 1.0.12 <http://www.engelschall.com/sw/mm/mm-1.0.12.tar.gz>

  o  MySQL 3.22.32
     <http://www.mysql.com/Downloads/MySQL-3.22/mysql-3.22.32.tar.gz>

  o  mod_auth_nds 0.4
     <ftp://vrooom.at.drew.edu/pub/mod_auth_nds/mod_auth_nds-0.4.tar.gz>

  o  ncpfs 2.2.0.17
     <ftp://vrooom.at.drew.edu/pub/mod_auth_nds/ncpfs/ncpfs-2.2.0.17.tgz>
     Note: the kernel must also be compiled with IPX support.

  o  mod_auth_mysql 2.20
     <http://bourbon.netvision.net.il/mysql/mod_auth_mysql/mod_auth_mysql-2.20.tar.gz>

  o  mod_fastcgi SNAP Oct06
     <http://www.FastCGI.com/dist/mod_fastcgi_SNAP_Oct06.tar.gz>

  This is the directory layout scheme I use and recommend:



  + /usr/src
  |
  +-+ apache
    |
    +-+ apache-1.3.12
    |
    +-+ modules
    | |
    | +-+ mod_perl
    | | |
    | | +- mod_perl-1.21
    | | |
    | | +-+ depend
    | |   |
    | |   +- <perl modules here>
    | |
    | +-+ mod_ssl
    | | |
    | | +- mod_ssl-2.6.2-1.3.12
    | | |
    | | +-+ depend
    | |   |
    | |   +- openssl-0.9.5
    | |   |
    | |   +- rsaref-2.0
    | |   |
    | |   +- mm-1.0.12
    | |
    | +-+ mod_fastcgi_SNAP
    | |
    | +-+ php
    | | |
    | | +- php-3.0.15
    | | |
    | | +-+ depend
    | |   |
    | |   +- gd-1.3
    | |   |
    | |   +- imap-4.5
    | |   |
    | |   +- openldap-1.2.9
    | |
    | +-+ mod_auth_nds
    | | |
    | | +- mod_auth_nds-0.4
    | | |
    | | +-+ depend
    | |   |
    | |   +- ncpfs-2.2.0.17
    | |
    | +-+ mod_auth_mysql
    |
    +-+ mysql



  Check to see if some of the above modules/software packages are
  already installed on your system.  It usually doesn't hurt, however,
  to download everything and install it just in case.  You might have an
  older version installed on your system.

  3.2.  mod_ssl



  3.2.1.  Installing and Compiling OpenSSL

  mod_ssl requires some sort of SSL engine be installed.  OpenSSL is the
  natural choice for the Linux environment.  You can either install it
  via RPM (as I did), or compile it from source.  Since I did not
  compile it from source, you're on your own, although I would think it
  pretty straightforward.  Most likely you'll either install it on the
  system (into /usr/local or something) or leave it in its directory and
  simply point whichever applications need OpenSSL to its directory.

  RPM will install OpenSSL into system directories.

  3.2.2.  Installing and Compiling RSAREF 2.0

  Create the rsaref-2.0 directory wherever you like.  For me this is in
  /usr/src/apache/modules/mod_ssl-blah/depend/.  Change to this
  directory.


  cd rsaref-2.0
  cp -rp install/unix local
  cd local
  make
  mv rsaref librsaref.a



  These commands should build you the rsaref library!  Just leave the
  stuff here and when you need to link against it, just point the
  appropriate configure script to this location.

  3.2.3.  Installing and Compiling MM

  Extract mm-1.0.12 (or whichever version is most current) to the depend
  directory of the mod_ssl-blah subdirectory.  Perform the following
  steps:


  cd mm-1.0.12
  ./configure --disable-shared
  make



  This should build your mm libraries.  As above, reference this path
  when needed.  You're on your own if you want to install this library
  to the system.

  3.2.4.  Installing and Compiling mod_ssl (at last!)

  The normal procedure with apxs is to compile Apache first, and then,
  using apxs, compile the modules you want to use and insert them into
  the server.  However, mod_ssl needs to be compiled into the server the
  normal way before you can use it via apxs.  Once mod_ssl is in the
  server for the first time, you can then upgrade it via apxs without
  having to completely recompile Apache.

  Enter the directory where you are compiling mod_ssl and execute the
  following configuration directive (here is the file I use) for the
  initial compile:



  #!/bin/sh

  ./configure \
          --with-apache=/usr/src/apache/apache_1.3.12 \
          --with-ssl \
          --with-rsa=../depend/rsaref-2.0/local \
          --with-mm=../depend/mm-1.0.12 \
          --enable-shared=ssl



  You don't need to run 'make' or anything here.  When we compile
  Apache, it will do it all for us.

  This configuration line gives two examples of how your system could be
  set up.  In my case, OpenSSL was already installed somewhere in the
  system (probably in /usr/lib, /usr/include).  Therefore, I didn't need
  to pass it any location parameters.  However, rsa and mm were -not- on
  the system, and I compiled them myself and left them within their
  source trees (didn't run make install, et al).  In that case, you need
  to point configure to the appropriate directory so it can find the
  headers/libraries.

  From this point on, unless you upgrade Apache (in which case you'd
  need to perform the above step again for the new version of Apache),
  you can use apxs to upgrade and recompile mod_ssl.  Here is the
  configure script I use for this:


  ./configure \
          --with-apxs=/apps/apache-1.3.12/bin/apxs \
          --with-ssl=../depend/openssl-0.9.4 \
          --with-rsa=../depend/rsaref-2.0/local \
          --with-mm=../depend/mm-1.0.12



  Or some combination of the above.  Then run:


  make
  make install
  make distclean



  to complete the installation.

  Notes: MM is -not- required to compile mod_ssl.  If you're having
  problems getting it to work, simply omit compiling it and also from
  the ./configure line(s).

  When I compiled mod_ssl, I had errors regarding DBM.  To fix this, I
  had to add -lndbm to the Makefile:


  o  Run the above configure script.

  o  cd to pkg.sslmod

  o  Edit the makefile and add -lndbm to LIBS_SHLIB.  It should look
     like:

  o  LIBS_SHLIB=-lm -lcrypt -lndbdm


  Hopefully that will save you some grief.

  3.3.  Apache

  Extract apache-1.3.12.tar.gz to /usr/src/apache or wherever.  Next we
  want to compile Apache enabling the following options:


  o  mod_ssl (In order to compile mod_ssl as a DSO, it has to be first
     compiled into the server normally.  After doing this, the module
     can then be upgraded via apxs.)

  o  mod_proxy

  o  mod_so

  o  mod_rewrite (For use with Zope)

  Here is the configuration file I used to initially compile Apache:


  #!/bin/sh

  SSL_BASE=../depend/openssl-0.9.4 \
  RSA_BASE=../depend/rsaref-2.0/local \
  EAPI_MM=../depend/mm-1.0.12 \
  ./configure \
          --enable-module=ssl \
          --enable-module=proxy\
          --enable-shared=proxy\
          --enable-module=rewrite \
          --enable-shared=rewrite \
          --prefix=/apps/apache-1.3.12 \
          --enable-shared=ssl \
          --enable-rule=SHARED_CORE \
          --enable-rule=SHARED_CHAIN \
          --enable-module=so



  Then run


  make
  make certificate
  make install



  Apache should now be compiled and installed into whicever directory
  you specified with --prefix.  Test it out and make sure it starts up.

  /path/to/apache/bin/apachectl start

  or

  /path/to/apache/bin/apachectl startssl

  Hopefully it all runs smoothly.  If not, trace back over your steps
  and ensure you didn't forget anything.

  3.4.  MySQL

  php as well as mod_auth_mysql and possibly mod_perl will require that
  MySQL be installed and running on your system.  It is beyond the scope
  of this document to go into the details of installing MySQL, but
  download the archive and follow the directions in the INSTALL file(s).
  It is a fairly straight-forward procedure to get MySQL up and running.
  Something like:


  ./configure
  make
  make install



  Should get everything installed so that you can compile the other
  Apache modules.

  3.5.  PHP 3.0.15

  We will compile php-3.0.15 as a DSO which means that it is a separate
  module that can be loaded and unloaded from the server.  This makes it
  easy to upgrade php without having to recompile everything (which can
  be a pain if you use a lot of modules with Apache).

  3.5.1.  GD

  In our installation of Apache, php uses gd to create images, and such.
  I used an older version of gd (installed via RPM) to link php against.
  This way we can use output GIF files.  This probably isn't too
  desirable do to copyright issues, and thus you may wish to use a
  version later than 1.3 which only supports PNG files.

  Either install via RPM (rpm -i gd*.rpm) or compile from source and
  install to the system.

  3.5.2.  IMAP

  If you want IMAP support, the procedure is similar to that of gd.  I
  used the RPM since I'm on a Red Hat system, but installing from source
  should be a relatively simple procedure of ./configure;make;make
  install.

  3.5.3.  OpenLDAP

  Once again you can install OpenLDAP either via RPM or source.  I chose
  to do it via source since the latest version was not yet available via
  RPM at the time we were setting things up.


  ./configure
  make
  make install



  should do the trick!  (Or rpm -i openldap*.rpm)

  3.5.4.  Installing and Compiling PHP 3.0.15

  Once the above items are installed and working, we can go ahead and
  compile PHP as a DSO.  The process is very straightforward and simple.



  cd /usr/src/apache/modules/php/php-3.0.15

  ./configure \
          --with-apxs=/apps/apache/bin/apxs \
          --with-config-file-path=/apps/etc \
          --with-gd \
          --with-imap \
          --with-mysql=/apps/mysql \
          --with-ldap=/apps \
          --with-zlib \
          --enable-track-vars



  Make sure that if any of your --with libraries are not installed in
  /usr/local or /usr, that you tack on an =/location/ line so that
  configure can find the stuff it needs!


  make
  make install



  If everything completes properly, 'make install' will use apxs to
  install libphp3.so to /apache/libexec/libphp3.so and add the proper
  entries into httpd.conf and activate php3.  Pretty slick.

  3.6.  mod_perl

  This section documents the installation of mod_perl as a DSO for
  Apache.  There are a number of perl modules (in addition, of course,
  to perl5, which I will assume you already have installed) that must be
  added before mod_perl will compile without complaining.  If you don't
  install these modules, mod_perl should complain and tell you which
  ones you are missing.

  There is a certain order in which the modules must be installed.  Some
  depend on others and thus I've listed the install order that I used
  without any problems.

  3.6.1.  Required Perl Modules

  The perl modules can be obtained from locations detailed further up in
  this document.  Download them and put them wherever you like or in the
  location I used as depicted in the directory map (also above).
  Installing a module is fairly simple.  After extracting the module to
  a directory (usually with tar xvfz), you simply change to that
  directory and execute the following commands:


  perl Makefile.PL
  make
  make install



  If everything goes as it should, this will configure, build and
  install the perl module for you.  Of course, check the README for each
  module if things don't work quite as expected.

  Here is the order I used to install the modules necessary for
  mod_perl:



  1. MIME::Base64

  2. URI

  3. HTML::Parser

  4. Digest-MD5

  5. libnet

  6. libwww

  3.6.2.  Installing and Compiling mod_perl 1.2x

  After installing the perl modules, we're ready to compile and install
  mod_perl into Apache.  Change to the directory where you extracted
  mod_perl to, and run the following script:


  perl Makefile.PL \
          USE_APXS=1 \
          WITH_APXS=/path/to/apache/bin/apxs \
          EVERYTHING=1



  This will set up your Makefile and tell mod_perl to compile itself as
  a DSO using apxs (the location of which you must specify).  After this
  step, simply run


  make
  make install



  And mod_perl will be moved to the appropriate directory and lines
  added to your httpd.conf file.

  3.7.  mod_auth_mysql

  mod_auth_mysql lets the Apache web-server authorize against a MySQL
  user database.  Installation of the module as a DSO isn't exactly
  documented in the README file, but it can be done.

  First, change to the directory you extracted mod_auth_mysql to.  I
  assume that you have MySQL installed somewhere (along with the
  headers, etc).  Make sure you know the location of the MySQL libraries
  and header files.  If in doubt, check /usr/lib/mysql and
  /usr/include/mysql.

  In order to compile mod_auth_mysql, we'll first have to rename the
  'config.h' file to 'auth_mysql_config.h'.  I'm not sure why this file
  wasn't named correctly, but simply execute the following command:


  cp config.h auth_mysql_config.h



  Now for the final step:


  /path/to/apache/bin/apxs -i -a -I/usr/include/mysql -L/usr/lib/mysql \
          -lmysqlclient -c mod_auth_mysql.c

  You may need to run as root if you do not have read/write access to
  the Apache directory.

  3.8.  mod_auth_nds

  At my school, the Windows network of choice is Netware.  It's been in
  place for a long time, and although hopefully someday it will be
  retired, for now it is still the main network on campus for
  filesharing and email.  Every student has a Netware account on which
  their personal files--including their webpages are stored.  We mount
  these directories on our linux server and it's nice to be able to
  password protect certain ones with the Netware username and password
  information.  With this module, Apache can authenticate straight to
  the Netware server itself.

  3.8.1.  ncpfs

  In order to compile mod_auth_nds, we need to have ncpfs installed
  (along with its headers of course).  Before compiling ncpfs, you must
  ensure that your kernel has IPX support compiled in.  If this is the
  case, simply running


  ./configure
  make
  make install (optional)



  will compile (and install) the libraries.

  3.8.2.  Compiling and Installing mod_auth_nds

  With ncpfs installed, running the following command should compile
  mod_auth_nds as a DSO:


  /path/to/apache/bin/apxs -c -lncp -L/usr/lib -I/usr/include mod_auth_nds.c
  /path/to/apache/bin/apxs -i mod_auth_nds.so



  Then add the following lines to your httpd.conf (by hand):


  LoadModule nds_auth_module libexec/mod_auth_nds.so
  AddModule mod_auth_nds.c



  Then, restart Apache!

  3.9.  mod_fastcgi

  Installing mod_fastcgi is necessary if you want to allow access to
  your Zope server through Apache.  This might be useful simply because
  Apache is inherently more secure and much more configurable than the
  Zope server itself.

  The current stable version of mod_fastcgi is 2.2.2, however, this
  version does not work properly with Zope.  You must get the SNAP
  release which is dated Oct 06.  The link is provided above.

  Change to the mod_fastcgi directory and run the following commands:


  /path/to/apache/bin/apxs -o mod_fastcgi.so -c *.c
  /path/to/apache/bin/apxs -i -a -n fastcgi mod_fastcgi.so



  See the mod_fastcgi documentation for a description of its use.

  4.  Final Words

  Much of this information can be obtained by reading the README and
  INSTALL files included with the various modules.  However, this
  document is useful in the cases which didn't work as expected for me,
  or else for which the installation procedure was not as well defined
  as I would have liked.  It also has the added benefit of being one,
  sequential document, which should hopefully be easier to follow and
  understand than a slew of README files.

  4.1.  Credits


  Phillip R. Wilson <pwilson@drew.edu>, author of mod_auth_nds, for helping me get
   mod_auth_nds to compile and install with apxs.

  John Ash <jash@wwc.edu>, my boss, for all sorts of help and of course, a job.

  Marcus Faure <marcus@faure.de>, author of the Apache SSL PHP/FI frontpage mini-
   HOWTO, whose document this one is loosely based on.



  4.2.  Contact Information

  If you find any blatant errors in this document, spelling,
  grammatical, content or otherwise, please don't hesitate to drop me an
  email.  You can get ahold of me via a number of means.


  Ray Van Dolson
  Email: <url url="mailto:rayvd@firetail.org" name="rayvd@firetail.org">
  IRC: DALnet, #Bludgeon (nick Variant)



  4.3.  Anything Else

  Everything mentioned in this document will eventually be available for
  ftp from ftp.wwc.edu/pub/apache.  I will have everything laid out as
  described above, and hopefully installation scripts to install
  everything from scratch.  (A very dumb script mind you).



  Automount mini-Howto
  don@sabotage.org
  v0.4, 17 April 1999

  This file describes the autofs automounter, how to configure it, and
  points out some problems to avoid.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Automount - what and why
     1.2 Types of automounting

  2. Installation

  3. Configuration

  4. That long wait to unmount

  5. Questions

     5.1 I don't see /auto/floppy, or whatever mountpoint I'm looking for.
     5.2 How do I see what's mounted?
     5.3 I put in a win95 disk ("vfat") and it was autodetected as only a regular FAT disk.
     5.4 My filesystem
     5.5 What happens if I make / the directory for the automounter
     5.6 Can I have two map files on the same directory?
     5.7 I'm using SuSE 6.0 and needed
     5.8 How do I set the permissions and ownership for the filesystem (IE FAT)
     5.9 Who do I thank for autofs?
     5.10 Where can I learn more about automounting?


  ______________________________________________________________________

  1.  Introduction

  1.1.  Automount - what and why

  Automouting is the process where mounting (and unmounting) of certain
  filesystems is done automatically by a daemon. If the filesystem is
  unmounted, and a user attempts to access it, it will be automatically
  (re)mounted. This is especially useful in large networked environments
  and for crossmounting filesystems between a few machines (especially
  ones which are not always online). It may also be very useful for
  removable devices, or a few other uses, such as easy switching between
  a forced-on ascii conversion mount of a dos filesystem and a forced-
  off ascii conversion mount of the same dos fs.


  1.2.  Types of automounting

  There are two types of automounters in linux; AMD and autofs. AMD is
  the automount daemon, and supposedly works like the SunOS AMD. It is
  implemented in user space, meaning it's not part of the kernel. It's
  not necessary for the kernel to understand automounting if you NFS
  mount to the local host, through the AMD daemon, which routes all
  automount filesystem traffic through the NFS system. Autofs is a newer
  system assisted by the kernel, meaning that the kernel's filesystem
  code knows where the automount mount points are on an otherwise normal
  underlying fs, and the automount program takes it from there. Only
  autofs will be described in this mini-howto.

  2.  Installation

  Because autofs is implemented in kernel-space, your kernel must have
  support compiled in. In 2.0.xx it is an experimental option, but
  appears to be quite stable. In 2.2.xx it is a normal option.


  The automount program and its configuration files are also necessary;
  using the rpms (from RedHat, as part of the install) is a great way to
  go. The automount program should be started by an rc script under the
  /etc/rc.d/init.d directory . The rpm installs this, but you will need
  to make sure it gets started, either by linking it from your rc?.d
  directory, using Redhat's control-panel, or on another distribution by
  getting the thing started anyway you care to.  Non-rpm distros will
  have to do whatever's applicable to their system. And don't look too
  hard at what the rc script does; if you're reading this howto you
  probably don't want to know.


  3.  Configuration

  Installing the RPM's will get you to this point easily enough, but
  here's the part you might not be sure about if you haven't done this
  before.


  There are two files in /etc, one called auto.master and one called
  auto.misc.  My auto.master looks like this:

  /auto   /etc/auto.misc  --timeout 60

  The first entry is not the mount point. It's where the set of mount
  points (found in the second entry) are going to be. The third option
  says that the mounted filesystems can try to unmount themselves 60
  seconds after use. They can't unmount if being used, of course.

  Auto.misc is a "map file". The map file can have any name; this one is
  named auto.misc because it originally controlled /misc. Multiple map
  files can be defined in auto.master.  My auto.misc looks like this:

  kernel          -ro,soft,intr           ftp.kernel.org:/pub/linux
  cd              -fstype=iso9660,ro      :/dev/cdrom
  zip             -fstype=auto            :/dev/hdd4
  floppy          -fstype=vfat            :/dev/fd0

  The first column (the "key") is the mount point. In this case it would
  be /auto/floppy or whatever. The middle set are the options; read the
  mount manpage for details on this. And the last column specifies where
  the fs comes from. The "kernel" entry is supposed to be an NFS mount.
  The : on all the other lines means its a local device.

  4.  That long wait to unmount

  Some of you may be eyeing that 60 second timeout and thinking, that's
  a long time to wait to eject a floppy.. Maybe I'll just sync the disks
  and pop it out mounted and nobody will notice. Let me suggest saner
  alternatives.  First of all, you can change the timeout. But that
  could be a little inefficient; telling the system to unmount stuff
  after only 15 seconds or whatever. Depending on your setup, you may be
  able to simply run the umount command as a normal user.  But there is
  actually a way to ask the automount program to umount. If you send
  (with the program kill) the signal SIGUSR1 to the automount process,
  it will unmount everything it can. But before people start making
  unmount buttons on their window managers, there's a little problem.

  The automount process is run by root, and it will only accept signals
  from root. Half of the reason you're probably doing automounting is so
  you can mount an unmount *without* being root. It would be easy to
  make a suid-root C program which does the dirty deed. However, by
  using sudo it is possible to allow users to send the proper kill
  signal. The only problem is that sudo will not let you use ` to
  process subcommands, which you would have to do to find the current
  PID. You should have a program called killall, which will let you do
  this: (thanks for the suggestions)

  ALL     ALL=NOPASSWD:/usr/bin/killall -USR1 automount


  Otherwise, you would have to allow your users to send -SIGUSR1 to all
  processes.  That has various effects on programs; it will recycle some
  window managers, but kills xemacs. So here's hoping there's no buffer
  overruns in killall...


  5.  Questions

  5.1.  I don't see /auto/floppy, or whatever mountpoint I'm looking
  for.

  If automount is setup properly, whatever mount point you're looking
  for will be there if you try and use it, even though you don't see it
  when not in use. If you're browsing the directory with a graphical
  tool, you may need to type in the name manually; most programs will
  try what you give it, and the drive will be mounted before it notices.
  Unfortunately not being able to choose from the available invisible
  mount points is probably the major drawback of autofs. If it really
  bugs you, edit the configuration files.  (Hint, the ones that end in
  .c for "configuration")

  One workaround several people have tried is to create symbolic links
  to where automount will create something once it's mounted. This will
  likely prevent the program from complaining a directory doesn't exist
  (if the mount works, that is) but careless directory listings will
  cause filesystems to be mounted.


  5.2.  How do I see what's mounted?

  The df command. mount with no options will do the same, plus show the
  options its mounted with.

  5.3.  I put in a win95 disk ("vfat") and it was autodetected as only a
  regular FAT disk.

  This is not a problem with automount. As of this writing, the "auto"
  fs type does not attempt a vfat mount before it successfully mounts an
  msdos filesystem. VFAT is the Win95 and WinNT long filenames crammed
  into a FAT/MSDOS filesystem.

  According to one of the authors of mount, since mount is only a
  wrapper around a system call which must specify the filesystem type,
  it's still the responsibility of the user to come up with the fs type.
  Having mount take a list of filesystems to try in order, rather than
  the current "heuristic" is under consideration. Some users have simply
  not compiled msdos into the kernel; this prevents it from being tested
  prior to vfat. This will work for most people; a few actually need
  msdos fs and it caused me quite some frustration to not have a module
  handy when I actually needed it.

  I'm sure that if anyone wants to go to the effort of finding the
  owner(s) of the mount program, your comments would be welcome. So
  unless you don't compile msdos in, for now this means that you can't
  mount vfat unless you give up the ability to autodetect all other
  fs's. Hopefully it will be configurable someday. In the mean time,
  feel free to create multiple mount points with different fs types
  specified.

  5.4.  My filesystem /auto/grumblesmurf  is mounted and kill -SIGUSR1
  won't unmount it.

  It's being used by something. Root probably can't manually unmount it
  either. If you're the one who caused it to be mounted (i.e. it can't
  be someone else using it) look around for a shell that might be in
  that directory. If there are none, look for something else
  (particularly something that might have gone though that directory
  like a directory browser) that might have left an invisible foot in
  the door so to speak. If you've given up looking, try using the fuser
  program.


  5.5.  What happens if I make / the directory for the automounter

  Oooh. Well, out of a statistical sample of only one person, none of
  the results were positive. You have been warned. If you want
  /grumblesmurf, then I suggest a symbolic link. Much safer.


  5.6.  Can I have two map files on the same directory?

  Not as far as I know. Try using one map file, with specific options
  for individual entries.


  5.7.  I'm using SuSE 6.0 and needed ---timeout  instead of --timeout

  Uh. Ok, I've made a note about it. Another solution to "timeout not
  working" problems would be to add a -t time option to the autofs
  script.


  5.8.  How do I set the permissions and ownership for the filesystem
  (IE FAT)

  Check the man page for mount for some of the options, such as setting
  the uid=value or umask=value options. One option that appears to be
  missing for FAT filesystems is mode=value. Sorry. Check in with the
  people who do mounting.


  5.9.  Who do I thank for autofs?

  Not me. I didn't have anything to do with it. I just wanted to bring
  everyone's attention to what a great job had been done with autofs,
  and how easy it is to use. Compared to the original perpetrators of
  AMD (Hint, they sell an overpriced unice with prehistoric versions of
  free tools) the autofs is very well documented and the implementors
  have my sincere thanks. Everything is stamped copyright Transmeta so
  sorry I can't provide a credits list, but I would bet Peter Anvin is
  responsible for quite a bit of it. Peter also held a session on autofs
  at linuxworldexpo on March 3, 1999.


  5.10.  Where can I learn more about automounting?

  There's a autofs tutorial at  <
  http://www.linuxhq.com/lg/issue24/nielsen.html>.  See also am-utils at
  <http://www.cs.columbia.edu/~ezk/am-utils>

  (Thanks for these URLs)

  The BTTV Mini-HOWTO
  By Eric Sandeen, eric_sandeen@bigfoot.com
  v0.3, February 2000

  This document describes the hardware, software, and procedures needed
  to use a bt8x8 chipset based frame grabber or TV tuner card under
  Linux.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright of this document
     1.2 Where to get this document
     1.3 Acknowledgments
     1.4 Disclaimer

  2. Hardware Requirements

  3. Software Requirements

  4. System Configuration

     4.1 Hardware Installation
     4.2 Kernel Configuration
     4.3 Using the updated 0.6.x packages
     4.4 Special files in
     4.5 Loading the Modules
     4.6 Automating the process

  5. Applications

  6. Appendix - Arguments for All Modules



  ______________________________________________________________________

  1.  Introduction

  The ability to capture and view  video sources is one of the more
  interesting multimedia features of Linux.  Many different types of
  video devices are supported via the video4linux API (), including
  several TV tuner cards based on the Conexant bt848 and bt878 chipsets.
  This document explains how to use these cards on a Linux system.


  1.1.  Copyright of this document

  This HOWTO is copyrighted 1999 Eric Sandeen.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO co-ordinator at the address given below.
  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO co-
  ordinator, at linux-howto@metalab.unc.edu via email.


  1.2.  Where to get this document

  The most recent official version of this document can be obtained from
  the Linux Documentation Project  <http://metalab.unc.edu/LDP/>.


  1.3.  Acknowledgments

  Thanks to Ralph Metzler and Marcus Metzler for writing the original
  bttv driver.  Also, Alan Cox for creating the Video4Linux API, Gerd
  Knorr for his work on the radio cards, subsequent bttv releases, and
  xawtv.  And everyone else who contributed to Linux support for these
  cards.  Thanks to William Burrow, who also wrote a BTTV Howto (which I
  learned about after I wrote this document...)  I have improved this
  guide, thanks to his work.

  In writing this HOWTO I have drawn heavily on the bttv and xawtv
  documentation.


  1.4.  Disclaimer

  Use the information in this document at your own risk. I disavow any
  potential liability for the contents of this document. Use of the
  concepts, examples, and/or other content of this document is entirely
  at your own risk.

  All copyrights are owned by their owners, unless specifically noted
  otherwise.  Use of a term in this document should not be regarded as
  affecting the validity of any trademark or service mark.

  Naming of particular products or brands should not be seen as
  endorsements.  You are strongly recommended to take a backup of your
  system before major installation and backups at regular intervals.


  2.  Hardware Requirements


  From the bttv README:

  Bttv is a device driver for frame grabber cards using the Conexant (
  <http://www.conexant.com>) Bt848 family of video decoder chips.  Among
  those are the Bt848, Bt848A, Bt849, Bt878 and Bt879.  The only major
  differences between the cards by different manufacturers are the types
  of tuners and extra components on the boards.  E.g., some cards by
  Hauppauge have an additional Videotext decoder and/or sound decoder
  chip.  Only some of these additional components are supported by bttv.
  Also, type (Composite or S-Video) and number of inputs differ.

  The following cards should work:

  o  AverMedia TV98

  o  <http://www.aver.com/products.html>


  o  AVerMedia TV-Phone

  o  <http://www.aver.com/lite/products/avertvphone.html>



  o  Diamond DTV2000

  o  <http://www.diamondmm.com/products/current/dtv-2000.cfm>



  o  Hauppauge Win/TV pci (and other Hauppauge cards)

  o  <http://www.hauppauge.com/>



  o  IDS Imaging FALCON

  o  <http://www.ids-imaging.de/>



  o  Lifeview Flyvideo II

  o  <http://www.lifeview.de/lifeview/html/produkte.htm#karte>



  o  Matrix Vision MV-Delta

  o  <http://www.matrix-vision.de/>



  o  miroVIDEO PCTV

  o  <http://www.pinnaclesys.com/>



  o  Osprey-100

  o  <http://www.mmac.com/products/osprey/osprey100.html>



  o  STB TV PCI

  o  <http://www.stb.com/products/multimedia/tvpci/tvpci.html>



  o  Terratec TERRA TV+

  o  <http://www.terratec.de/produkte/terratv/terratv_info.htm>



  o  Videologic Captivator PCI

  o  <http://www.videologic.com/Productinfo/capt_pci.htm>



  If you know of other cards which work, please email me and I'll add
  them in the next revision of this document.


  3.  Software Requirements

  To use these TV tuner cards under Linux, you will need the appropriate
  kernel drivers.  The bttv drivers have been a part of the kernel
  distribution since version 2.2.0.

  Alternately, you can get the latest version of tbe driver package and
  use it with 2.0.35 or newer kernels.  However, it's not guaranteed to
  work with the older 2.0.x series kernels.  The updated bttv package is
  available from , and an even more updated version is available from
  Gerd Knorr at These packages add support for more audio chips,
  including the TEA6300, TDA8425, and DPL3518.

  If you're new to the world of the bttv driver, I would suggest
  starting with the version included with the latest kernel.  If you
  find that you have trouble with it, or that it does not support your
  card, then venture out to the updated 0.6 series drivers at the
  locations shown above.  If you're feeling really adventurous, you can
  try Gerd Knorr's 0.7 series drivers, due to be incorporated in the 2.4
  kernel.  The 0.7 series drivers are also available at .

  This document is based primarily on the 2.2.14 kernel drivers, with
  some mention of the features available in the updated 0.6 series
  driver packages.  The 0.7 series is currently not covered, as it is in
  heavy development at the time of this writing.



  4.  System Configuration


  4.1.  Hardware Installation

  (Thanks to William Burrow for this section.)

  If you are afraid to open the case of your computer, be sure to read
  over this entire HOWTO first and make notes about the card, such as
  its tuner type, integrated circuit numbers, the frequencies of the
  crystal(s) and so on.  Then get someone competent to install the card
  for you.

  Otherwise, open the case and install the card in an available slot.
  Pick one that supports PCI bus transfers and PCI bus mastering, if
  your mainboard is picky about this (see your mainboard's manual). You
  will want this for overlay mode.

  For sound, there are two different ways to connect your video grabber
  card and your sound card. One way is internal routing. Connect your
  CD-ROM audio cable to the video card sound input and the video card
  output to the sound card CD-ROM or Tuner audio input. Another way is
  to connect the external 1/8'' audio jack on the video card to the
  audio card's 1/8'' line audio in jack. You can also just plug
  amplified speakers into the grabber card audio out if you do not have
  an audio card or don't want to route through the sound card.  (A few
  of the newer bt878 cards don't have any sound connector, because they
  send digital audio data across the PCI bus.  There is no support for
  this at the time of this writing.)

  A video source is also handy, especially for determining if the card
  is working or not. Many cards handle composite video in, S-Video in
  and, if equipped with a tuner, RF in. There is a separate connector
  for each of these inputs.
  4.2.  Kernel Configuration


  Your kernel will need to be correctly configured to support your card.
  Most newer Linux distributions come with the necessary modules already
  compiled, so if you can find the videodev.o, bttv.o, and tuner.o under
  /lib/modules/2.x.x/misc, you should be ready to go.


  If not, you'll need to recompile your kernel with

  CONFIG_VIDEO_DEV

  and

  CONFIG_VIDEO_BT848

  enabled, preferably as loadable modules.  See the Linux Kernel HOWTO (
  <http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html>) for details on
  recompiling your kernel.



  4.3.  Using the updated 0.6.x packages

  If you want to use the updated 0.6.x package, you should first
  retrieve the archive from one of the sites mentioned above.  Extract
  it with


  tar -xvzf bttv-0.6.x.tar.gz

  and change to the newly created directory.  su to root, and type

  make

  in the main directory to create the drivers.  (You can safely ignore
  the information in the INSTALL file about editing makefiles, and the
  like, since we will pass this information to the driver as module
  parameters.) Then, type

  make install

  to install them.  Finally, run

  /sbin/depmod -a

  to update your module dependency information.


  4.4.  Special files in /dev

  Next, you may need to make the special character files in the /dev
  directory.  Type ls /dev/video*; ls /dev/radio* to see if these
  devices already exist.  If not, you'll need to create them.  All of
  the files have major device number 81, and the minor device numbers
  depend on the specific device (video, radio, etc.) as well as multiple
  instances of these files.  See the Video4Linux API () for the
  programming-related details.



  There is a MAKEDEV script in the driver directory of the bttv driver
  package which will create four video devices for you.  You can also do
  it yourself fairly easily if you only have one video capture card.  As
  root, type:
  mknod /dev/video0 c 81 0

  chmod 666 /dev/video0

  ln -s /dev/video0 /dev/video


  mknod /dev/radio0 c 81 64

  chmod 666 /dev/radio0

  ln -s /dev/radio0 /dev/radio



  There are also videotext and VBI devices which can be created if you
  have an application which needs them.  (Currently, there are only a
  few.)  Type:

  mknod /dev/vtx0 c 81 192

  chmod 666 /dev/vtx0

  ln -s /dev/vtx0 /dev/vtx


  mknod /dev/vbi0 c 81 224

  chmod 666 /dev/vbi0

  ln -s /dev/vbi0 /dev/vbi



  4.5.  Loading the Modules

  The bttv driver provides many different modules, with many different
  options, as described in the appendix of this document.  With so many
  modules and options, you may wish to do this by hand until you get
  everything working.   On the off chance that this causes your box to
  crash, it wouldn't hurt to type

  sync; sleep 1; sync

  to flush any dirty disk buffers before proceeding.  Then, using the
  insmod command as root, try loading up the modules.  The first two are
  easy, because they don't usually need any options:

  insmod videodev

  insmod i2c

  Now you're ready to load the bttv module itself:

  modprobe bttv

  By default, the bttv module attempts to autodetect your card type.
  Watch /var/log/messages to see what it finds.  If it doesn't
  autodetect properly, you can add the card=n option to the end of the
  previous command to force a card type, with n chosen from the
  following list.  (Types 0 through 19 are provided in the kernel series
  driver, bttv-0.6.4h contains support for types 20 through 27) You can
  also add the radio=1 option if your card has FM tuner functionality.


  ______________________________________________________________________
  card=n          card type
                  0:  Auto-Detect
                  1:  Miro
                  2:  Hauppauge (old bt848 boards)
                  3:  STB
                  4:  Intel
                  5:  Diamond
                  6:  AVerMedia
                  7:  MATRIX Vision MV-Delta
                  8:  FlyVideo
                  9:  TurboTV
                  10: Hauppauge (new bt878 boards)
                  11: MIRO PCTV pro
                  12: Terratec/Vobis TV-Boostar
                  13: Newer Hauppauge WinCam (bt878)
                  14: MAXI TV Video PCI2
                  15: Terratec TerraTV+
                  16: Aimslab VHX
                  17: PXC200
                  18: AVermedia98
                  19: FlyVideo98 (newer FlyVideo cards)
                  20: Zoltrix TV-Max
                  21: iProTV
                  22: ADS Technologies Channel Surfer TV
                  23: Pixelview PlayTV (bt878)
                  24: Leadtek WinView 601
                  25: AVEC Intercapture
                  26: LifeView FlyKit w/o Tuner
                  27: Intel Create and Share PCI
  ______________________________________________________________________



  Next, load the tuner module, with

  modprobe tuner type=n

  You will probably need to dig into your case to see which tuner you
  have.  Some cards (Miro and Hauppauge) allow the tuner to be
  automatically detected, but you may need to specify it.  The tuner
  should be marked with the brand name, and you can look at the crystals
  (little aluminum cans) on the board to see if you have an NTSC or a
  PAL tuner.  For PAL, the crystal is marked 28.xxxMHz (where xxx are
  three digits). For NTSC, the canister should say 35.xxxMHz.  Once you
  have identified your tuner, select the value of n from the following
  list (types 8 and 9 are included only in bttv-0.6.4h):


  ______________________________________________________________________
  type=n          type of the tuner chip. n as follows:
                  0: Temic PAL tuner
                  1: Philips PAL_I tuner
                  2: Philips NTSC tuner
                  3: Philips SECAM tuner
                  4: no tuner
                  5: Philips PAL tuner
                  6: Temic NTSC tuner
                  7: Temic PAL tuner
                  8: Alps TSBH1 NTSC tuner
                  9: Alps TSBE1 PAL tuner
  ______________________________________________________________________



  Finally, insert any sound modules you may need.  Again, you will
  probably need to take a very close look at the card to see what you've
  got.  Note that drivers for TEA6300, TDA8425, TDA9855, and DPL3518
  chips are only included in the 0.6.4h series driver, and are not
  included with the current (2.2.14) kernel drivers.


  modprobe msp3400 or tea3600 or tda8425 or tda9855 or dpl3518(see the
  appendix for details and options)

  Fire up your favorite video4linux program, and see if it works.  If
  you can't change the channel, make sure you have inserted the correct
  tuner module.  If you can't hear any sound, double check the sound
  module, and make sure that the channel is not muted, if you're running
  the audio through your sound card.


  4.6.  Automating the process

  After you know which modules and options you need, you can automate
  the process by putting the information into /etc/conf.modules.  Then,
  running an application which needs the driver will cause it to be
  loaded automatically.  I use the following:


  ______________________________________________________________________
  # TV
  alias   char-major-81   bttv
  pre-install bttv        modprobe -k tuner; modprobe -k msp3400
  options bttv            radio=1 card=3
  options tuner           type=2
  ______________________________________________________________________


  Be sure change this to reflect the proper modules and options for your
  particular card.  (Run an /sbin/depmod -a to make sure all your module
  dependency information is up to date, as well.)


  5.  Applications

  Now that your kernel is configured, your devices have been configured,
  and your modules are inserted, you will also need an application to
  actually view or capture the images from  your card.  There are many
  available:


  o  bttvgrab - Provides high-quality grabbing suitable for video
     recording

  o


  o  Gnome-o-Vision - A viewer for the Gnome desktop environment
     (currently under development in the Gnome CVS)

  o

  o  kwintv - Qt-based TV viewer for the KDE environment

  o


  o  wmtune - window maker radio tuner applet for bttv based TV/radio
     cards

  o


  o  wmtv - WindowMaker TV dock.app

  o


  o  XawTV - a TV application and a few utilities

  o


  o  XtTV - Simple TV/Video program for Linux/X Windows

  o


  There is also a driver available for the FlyVideo98 Remote control
  card at

  Be sure to read the documentation for any applications you plan to
  use.  Many of them require detailed configuration files to be edited
  before the application will work properly!  Due to the many different
  types of cards out there, you must take the time to read the
  documentation on most of these, as the application defaults will most
  likely not work for your card.


  6.  Appendix - Arguments for All Modules

  Items preceded with a "*" are only available in the 0.6.4h series
  driver



  ______________________________________________________________________

  videodev.o
          this is the basic video4linux module, all video
          drivers (incl. bttv) register themselves here.

  i2c.o
          the generic i2c module. It does much of the i2c bus
          management, all other modules (except videodev.o)
          use this one

          insmod args:
                  scan=1          scan the bus for i2c devices
                  verbose=0       shut up i2c
                  i2c_debug=1     for debugging, it sticks the
                                  whole (software) i2c bus
                                  traffic to the syslog

  bttv.o
          the bt848 (grabber chip) driver

          insmod args:
                  remap=adr       remap Bt848 memory to adr<<20
                  vidmem=base     frame buffer address>>20 (of graphic card)
                  triton1=0/1     for Triton1 compatibility
                                  Triton1 is automatically recognized
                                  but this might also help with other chipsets
                  pll=0/1/2       pll settings
                                  0: don't use PLL
                                  1: 28 MHz crystal installed
                                  2: 35 MHz crystal installed
                  radio=0/1       card supports radio
                  card=n          card type
                                  0:  Auto-Detect
                                  1:  Miro
                                  2:  Hauppauge (old bt848 boards)
                                  3:  STB
                                  4:  Intel
                                  5:  Diamond
                                  6:  AVerMedia
                                  7:  MATRIX Vision MV-Delta
                                  8:  FlyVideo
                                  9:  TurboTV
                                  10: Hauppauge (new bt878 boards)
                                  11: MIRO PCTV pro
                                  12: Terratec/Vobis TV-Boostar
                                  13: Newer Hauppauge WinCam (bt878)
                                  14: MAXI TV Video PCI2
                                  15: Terratec TerraTV+
                                  16: Aimslab VHX
                                  17: PXC200
                                  18: AVermedia98
                                  19: FlyVideo98 (newer FlyVideo cards)
                                  *20: Zoltrix TV-Max
                                  *21: iProTV
                                  *22: ADS Technologies Channel Surfer TV
                                  *23: Pixelview PlayTV (bt878)
                                  *24: Leadtek WinView 601
                                  *25: AVEC Intercapture
                                  *26: LifeView FlyKit w/o Tuner
                                  *27: Intel Create and Share PCI

          remap, card, radio and pll accept up to four comma-separted arguments
          (for multiple boards).  The CARD and PLL defines from the Makefile
          are used as defaults.

  msp3400.o
          The driver for the msp34xx sound processor chips. If you have a
          stereo card, you probably want to insmod this one.

          insmod args:
                  debug=1/2       print some debug info to the syslog,
                                  2 is more verbose.

  *tea6300.o
          The driver for the tea6300 fader chip.  If you have a stereo
          card and the msp3400.o doesn't work, you might want to try this
          one.  This chip is seen on most STB TV/FM cards (usually from
          Gateway OEM sold surplus on auction sites).

          insmod args:
                  debug=1         print some debug info to the syslog.

  *tda8425.o
          The driver for the tda8425 fader chip.  This driver used to be
          part of bttv.c, so if your sound used to work but does not
          anymore, try loading this module.

          insmod args:
                  debug=1         print some debug info to the syslog.

  *tda9855.o
          The driver for the tda9855 stereo decoder / audio processor chip.

          insmod args:
                  debug=1         print some debug info to the syslog.

  *dpl3518.o
          Driver for the dpl3518a Dolby Pro Logic Processor

          insmod args:
                  debug=1         print some debug info to the syslog.

  tuner.o
          The tuner driver.  You need this unless you want to use only
          with a camera or external tuner ...

          insmod args:
                  debug=1         print some debug info to the syslog
                  type=n          type of the tuner chip. n as follows:
                                  0: Temic PAL tuner
                                  1: Philips PAL_I tuner
                                  2: Philips NTSC tuner
                                  3: Philips SECAM tuner
                                  4: no tuner
                                  5: Philips PAL tuner
                                  6: Temic NTSC tuner
                                  7: Temic PAL tuner
                                  *8: Alps TSBH1 NTSC tuner
                                  *9: Alps TSBE1 PAL tuner

  i2c_chardev.o
          provides a character device for i2c bus access.  Works for 2.1.x
          only, not compiled by default.
  ______________________________________________________________________



  Backup-With-MSDOS mini-HOWTO
  Christopher Neufeld, neufeld@physics.utoronto.ca
  v, 5 August 1997

  This HOWTO describes how to use a Linux-compatible tape drive
  installed on an MS-DOS machine to back up the filesystem of a Linux
  machine.
  ______________________________________________________________________

  Table of Contents


  1. Preface/Introduction

  2. The technique

  3. Notes

  4. Copyright

  ______________________________________________________________________

  1.  Preface/Introduction

  Earlier I posed the question on the Net, how does one back up a Linux
  machine to a Colorado Jumbo 250 tape drive on an MS-DOS machine.  From
  the email I received, it seems that this is a frequently pondered
  problem.  Now that I've figured it out, I'm posting the method.  If
  anybody wants to massage this into a HOWTO document, let me know.  I
  should thank Jim Nance (jlnance@isscad.com) for pointing out that an
  MS-DOS machine need not always be an MS-DOS machine.  This technique
  should also work for any other tape drive supported by the ftape
  module, and for SCSI tape drives with suitable obvious changes (i.e.
  substituting /dev/st0 for /dev/ftape).

  The criteria I set were that the resulting setup should be as secure
  as possible and should be fairly simple, and take up little or no
  space on the MS-DOS machine's hard drive. It should also be capable of
  recovering from the worst system corruptions, up to and including the
  theft of the hard disk, requiring a restore to a bare Linux file
  system.  The technique described here uses no hard drive space on the
  MS-DOS machine, though it requires that that machine be assigned an
  IP#.  You will need three formatted, blank 1.44MB diskettes.

  2.  The technique

  Throughout this description I will refer to two machines as ``msdos''
  and ``linux''. ``msdos'' is the name of the machine which has the tape
  drive and is usually running MS-DOS.  ``linux'' is the Linux machine
  whose disk you are trying to back up or restore to the tape drive.
  For simplicity I will refer to the first machine as ``msdos'' even
  when it is booted into and running Linux.  Further, all path names in
  this document should be considered to be relative to the Linux machine
  with the Search-And-Rescue (SAR) disks mounted somewhere on the
  system.  That means that the file /etc/passwd is the password file for
  your Linux machine's hard drive, while, for instance,
  /tape144/etc/passwd is the corresponding file on the floppy disk.


  I am using Karel Kubat's backup scripts, version 1.03, available at

       <ftp://sunsite.enc.edu:/pub/Linux/system/Backup/backup-1.03.tar.gz>


  Throughout this document I will refer to these simply as ``the backup
  scripts''.  You do not have to use these scripts for your own backups
  to tape.  I like these scripts as they use afio to form an uncom
  pressed archive of compressed files, rather than a compressed archive
  of uncompressed files.  The former is much safer if there is a media
  read error during the restore.  I understand that Karel is no longer
  supporting backup, and now has produced 'tob', or tape oriented
  backup.  While I haven't tried the new package myself, it cannot make
  a significant difference to the procedure outlined here.

  First of all, obtain the ftape module. It is a part of all modern
  kernels, but if you are using an older kernel you can find the module
  at:

       <ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/ftape-2.05.tar.gz>


  Next, get a Slackware boot disk (I got the net disk, but it doesn't
  make much difference) and the tape144 root disk, and put the images
  onto 3"1/2 floppies.

  The ftape module will only work if it is installed in the kernel which
  was running when you compiled it.  I could not get it to work with the
  ftape.o module on the tape144 root disk, I think because that module
  has been stripped of symbols and won't install.  So, you now have to
  make a new kernel with network and ftape support, and if you're
  running an old kernel, a new ftape.o.  Read the directions which ship
  with the ftape archive for directions at this stage.  Remember that
  the kernel you compile must support the Ethernet cards on both the
  Linux machine and the MS-DOS machine.

  Copy the newly created kernel image over top of the one on the Net
  boot disk.  Use /bin/cp, do not create a boot disk with the ``dd''
  command as you would to create a bootable kernel image.  Write protect
  the boot disk, and label it: SAR#1.

  Now, mount the tape144 root disk.  I'll assume that the mount point is
  /tape144, to avoid confusion in file names.  We need to free some
  space on it, so delete the following files:


       /tape144/bin/dialog
       /tape144/bin/elvis
       /tape144/bin/vi
       /tape144/boot/ftape.o

  Now, create a new file:


       /tape144/etc/exports

  which contains the following line:


       /mnt    msdos(ro)

  Where ``msdos'' should be replaced with the name or IP# of the MS-DOS
  machine which has the tape drive installed.

  Next, so that you don't have to rely on a name server, add lines to
  the file /tape144/etc/hosts with the names and IP numbers of the Linux
  and MS-DOS machines.  For instance, mine contains the following two
  lines:


       128.100.75.114  caliban.physics.utoronto.ca caliban caliban.physics
       128.100.75.111  ariel.physics.utoronto.ca ariel ariel.physics

  Now, there's some sort of problem with the inetd configuration.  We
  have to put the full path name of the rsh daemon in it.  Change line
  19 of /tape144/etc/inetd.conf to read:


       shell   stream  tcp     nowait  root    /usr/etc/tcpd   /usr/etc/in.rshd

  Add local net routing information to /tape144/etc/rc.d/rc.inet1 to
  enable the MS-DOS machine to use the network.  The format of this
  depends on your network configuration, you can just copy the
  appropriate format out of your Linux /etc/rc.d/rc.inet1.  For my
  network, the lines that have to be added are:


       /etc/ifconfig eth0 128.100.75.111 broadcast 128.100.75.0 netmask 255.255.255.0
       /etc/route add -net 128.100.75.0 netmask 255.255.255.0

  The IP# in the ifconfig entry is that of the MS-DOS machine.

  Now, copy this file into /tape144/etc/rc.d/rc.inet1-l, and change the
  IP# in the new file to reflect that of the Linux machine rather than
  the MS-DOS machine.

  Next, clip out lines 3 to 11 of /tape144/etc/rc.local.  That's an if
  statement which executes the rc.inet* files.  We don't want this to
  happen during the bootup.

  Create a new file: /tape144/root/.rhosts containing the line:


       linux root

  where, again, ``linux'' is replaced with the full machine name
  (including domain) or the IP# of the Linux machine.

  Fill in the password field in /tape144/etc/passwd for the root login
  to keep people from logging onto the MS-DOS machine while you're doing
  the backup.  You can do this by copying the corresponding field from
  your Linux machine's /etc/passwd file.

  Copy /usr/bin/rsh into /tape144/usr/bin.


  Copy the following files from /usr/etc into /tape144/usr/etc:


       in.rshd
       rpc.mountd
       rpc.nfsd
       rpc.portmap
       services
       tcpd

  Create a new script, /tape144/bin/tapesetup, which consists of the
  following: (change ``linux'' to reflect your Linux machine name).


       #! /bin/sh

       /bin/sh /etc/rc.d/rc.inet1
       /bin/sh /etc/rc.d/rc.inet2

       /bin/mount linux:/nfs /mnt
       /bin/insmod /mnt/ftape.o

  Note that newer kernels will not require the insmod line.

  Next, create another new script, /tape144/bin/msdosset, as follows:
  (change ``linux'' to reflect your Linux machine name).


       #! /bin/sh

       /bin/sh /etc/rc.d/rc.inet1
       /bin/sh /etc/rc.d/rc.inet2

       mount linux:/mnt /mnt
       /bin/insmod /mnt/ftape.o

  As above, newer kernels will not require the insmod line.

  Create a readable file, /tape144/root/notes, which contains this
  helpful information for use in full recovery:

  For a full recovery to a trashed hard disk,
  boot the Linux machine with the SAR disks #1 and #2
  then type the following:

     /bin/sh /etc/rc.d/rc.inet1-l
     /bin/sh /etc/rc.d/rc.inet2

     /usr/etc/rpc.portmap
     /usr/etc/rpc.mountd
     /usr/etc/rpc.nfsd

  Next, insert SAR disk #3 and type:

     mount /dev/fd0 /mnt

  Create a new mount point, with:

     mkdir /mnt2

  and mount your Linux hard disk partition on this point.
  You may have to reformat the partition first, if so,
  follow the directions in the Linux Installation HOWTO.
  The SAR disks contain all the files necessary to do the reformat.

  Finally, use disks SAR#1 and SAR#2 to boot up
  the MS-DOS machine and run the /bin/msdosset script on that machine.
  It will take about a minute to run that script because it is getting
  an NSF file from a floppy drive, so be patient.
  Now, recover the tape to /mnt2 on the Linux machine.

  If you are using the backup scripts you will need to copy 'afio' into
  the /tape144/local/bin subdirectory.  It is not necessary to have the
  rest of the backup script files on the recovery disks, an archive can
  be recovered using only 'afio' and 'gzip'.

  I was unable to use the backup scripts as they come shipped.  The tape
  archive appears to build cleanly, but it is unrecoverable.  I found
  that removing the block size and conversion statements fixed it.  Here
  is the patch to the ``netbackup'' script.  Apply this patch to the
  Linux machine's hard disk copy of 'netbackup' as well as to the copy
  on the SAR disks.

  *** netbackup.orig      Mon Jan  9 17:22:32 1995
  --- netbackup   Mon Jan  9 17:23:25 1995
  ***************
  *** 35,41 ****
                    "'mknod", devname, "p'");
        exec ("su -", USERNAME, "-c",
                    "'rsh ", REMOTE_HOST,
  !                       "\"dd", "of=" REMOTE_DEVICE, "obs=20k", "conv=sync\"",
                          "<", devname,
                  "'&"
           );
  --- 35,41 ----
                    "'mknod", devname, "p'");
        exec ("su -", USERNAME, "-c",
                    "'rsh ", REMOTE_HOST,
  !                       "\"dd", "of=" REMOTE_DEVICE, "\"",
                          "<", devname,
                  "'&"
           );
  ***************
  *** 50,56 ****
                    "'mknod", devname, "p'");
        exec ("su", USERNAME, "-c",
                    "'rsh ", REMOTE_HOST,
  !                       "\"dd", "if=" REMOTE_DEVICE, "ibs=20k", "conv=sync\"",
                          ">", devname,
                  "'&"
           );
  --- 50,56 ----
                    "'mknod", devname, "p'");
        exec ("su", USERNAME, "-c",
                    "'rsh ", REMOTE_HOST,
  !                       "\"dd", "if=" REMOTE_DEVICE, "\"",
                          ">", devname,
                  "'&"
           );

  You have now finished your SAR disk #2.  Write protect it.

  Next, mount a clean, formatted disk (create it with fdformat and
  mkfs).  Copy the ftape.o file onto it, and label it SAR#3.  For some
  reason things go badly if you write protect this disk, so leave it
  write-enabled.

  On the Linux machine, create a new directory for NFS file serving.  I
  made a directory:


       /nfs

  Put the ftape.o (unstripped, about 500+ kB) into this subdirectory.
  Create an entry in your Linux's exports file /etc/exports:


       /nfs    msdos(ro)

  Note that all files in your NFS directory and it's subdirectories are
  not secure.  Somebody else could boot the MS-DOS machine into Linux
  with his own boot disks and mount this directory, so be certain that
  you don't put anything sensitive in your NFS subdirectory.

  Restart your NFS daemons, rpc.mountd and rpc.nfsd.  They don't seem to
  take kindly to a SIGHUP restart, so kill them and reinvoke them.  If
  you're not activating these daemons in your /etc/rc.d/rc.inet2 you
  might want to do so now.

  OK, now we're all set to back up and recover.  To make a full backup
  from the Linux machine, boot the MS-DOS machine with SAR#1.  When
  prompted for the second disk, load SAR#2. Log in as root, and execute
  the script: /bin/tapesetup.  Log out of the MS-DOS machine.  If you're
  using the backup scripts, the netbackup command will now work.  You
  can also use the ``-f msdos:/dev/ftape'' switch on GNU tar, cpio, or
  mt, and make your backup this way.  If you have a backup program,
  which is only capable of writing to a local file, do the following.
  Assume that the backup program is called ``localbackup'' and writes to
  the file represented by its command line argument:


       mknod /tmp/tapepipe p
       rsh msdos dd of=/dev/ftape < /tmp/tapepipe &
       localbackup /tmp/tapepipe

  when it's done, delete /tmp/tapepipe.

  Recovering to a live Linux machine: the netbackup script, tar, cpio,
  and so on will all work without special actions on the part of the
  operator.  If you have a local recovery program which recovers from a
  file, do this:


       mknod /tmp/tapepipe p
       rsh -n msdos dd if=/dev/ftape >> /tmp/tapepipe &
       localrecovery /tmp/tapepipe

  and delete /tmp/tapepipe when you're done.

  Notice that I'm using 'rsh' to the root user on the MS-DOS machine.
  This works with a correct .rhosts entry.  The configuration on the
  'tape144' disk allows rsh to root, but does not allow telnet or rlogin
  to root, logins are restricted to the console.  This is good for
  security.

  If you are worried about a root .rhost file, you can create a new user
  on SAR#2, ``tapeuser'', with permissions to operate the tape drive but
  not the disks (create a new group and put tapeuser in that group, then
  chown and chmod the files /dev/rft* and /dev/nrft*).  Your backup
  program then has to know to rsh to that username rather than to root.
  Of course, now there must be an .rhosts file in ~tapeuser on SAR#2.
  For my own use, I have chosen this course, rather than a root .rhosts.

  Finally, the directions for a complete recovery to a trashed hard
  disk.  This assumes that the Linux partition is completely
  unrecoverable.  If necessary, reformat that partition as described in
  the Linux Installation HOWTO. Boot the Linux machine from SAR disk #1.
  When prompted, insert disk #2.  Now, follow the directions in the file
  /root/notes (this was /tape144/root/notes when it was mounted on your
  Linux machine).  Once both machines have been booted up, run the
  recovery routine you need.  If you are running the backup scripts you
  can do it as follows:

  1. change directory to the mount point of the hard disk partition
     which you will be recovering.

  2. if any mounted volumes are on the backup, and you want to recover
     them, create the mount points within the hard disk partition and
     mount the volumes.

  3. Enter the command:


       rsh -n msdos dd if=/dev/ftape | afio -i -v -Z -c 1024 -

  or


       rsh -n -l tapeuser msdos dd if=/dev/ftape | afio -i -v -Z -c 1024 -

  or


       mknod /tmp/backpipe p
       rsh -n msdos dd if=/dev/ftape >> /tmp/backpipe &
       afio -i -v -Z -c 1024 /tmp/backpipe

  This reads the tape on the remote machine, writing the result to std
  out, where afio picks it up.  The '-i' switch tells it to recover the
  files relative to the current working directory (which is the root of
  the hard disk partition).  '-v' is verbose, listing the files as they
  are recovered.  '-Z' tells afio that this is an archive of individu
  ally compressed files.  '-c 1024' tells it to use a 5 MB streaming
  buffer to avoid a lot of tape rewinding.

  3.  Notes

  The commands listed in the /tape144/root/notes file could be run from
  a script.  When I tried, I got rpc setup errors.  I suspect it was
  just that the commands were run too quickly, and the portmapper hadn't
  properly installed itself.  I found that typing the sequence in
  manually worked fine, so I've recommended that.

  I think this setup is secure.  Note that somebody can still get access
  to all your files if they go to the tape drive and pull the tape out
  before you get there, then then read the tape themselves.  People with
  very sensitive data might consider encrypting the stream from the
  archiver.  Archive to standard output and pipe the output to the
  encrypter, and redirect the output of the encrypter to append to the
  named pipe /tmp/tapepipe as described above. Note that errors in the
  recovery process will result in all files after that point being
  unrecoverable, as the entire archive is now a single DES-encrypted
  stream.  It is possible to use options on afio to send each file in
  the archive first through gzip, then into an encryption program like
  des, but note that this compressing first does provide a fair amount
  of known plaintext for determined code breakers to work with, so a
  better approach might be to skip the gzip step and simply encrypt it
  with des, at the expense of significantly more tape area. Needless to
  say, DES encrypted files don't compress.

  The rc.inet1 directions I've included will allow only communication
  with the local network, not the rest of the world through a gateway.

  During a full recovery to a blank hard disk the SAR disk #3 provides
  ftape.o to the MS-DOS machine through NFS.  This is because some old
  versions of the ftape module can't control some tape drives when there
  is a disk mounted in the floppy drive. With newer kernels, the entire
  NFS stuff can be omitted.

  This is very important.  ***TEST*** the SAR recovery procedure.  I
  did, but don't leave anything to chance.  Make sure that you can
  recover at least one file from your tape to the Linux machine using
  only the SAR disks (i.e. without mounting the hard disk).  If you
  can't reboot the Linux machine without inconveniencing a lot of users,
  change the setup information on the SAR disks to assign the ``linux''
  identity to another MS-DOS machine and then boot the two MS-DOS
  machines into Linux to make sure everything works.  Then, change the
  ``linux'' identity back again so that you have usable SAR disks.

  4.  Copyright

  Copyright Jan 10, 1995 by Christopher Neufeld
  (neufeld@physics.utoronto.ca)

  Modified Feb 6, 1996.

  Modified Aug 5, 1997.

  Battery Powered Linux Mini-HOWTO
  Hanno Mueller, hanno@lava.de http://www.lava.de/~hanno/
  v, 21 December 1997

  This document describes how to reduce a Linux system's power consump
  tion by tweaking some of its configuration settings. This will be
  helpful for everyone who runs Linux on a portable computer system.
  There is also some general information about how to take care of your
  battery. If you are using Linux on a desktop system, you probably
  don't need to read all this.

  1.  Introduction


  ``Ages 6 and up. Batteries included.''

  1.1.  Before you ask


  This document does not describe how to install Linux on laptops, but
  how to optimize a ready-configured Linux for use on laptops. Please
  read the Installation-HOWTO or your distributor's handbook for help
  with installing Linux.


  This document does not describe how to use an uninterruptable power
  supply and the powerd daemon, either (even though a ups is a big
  battery). Read the UPS-HOWTO for details about that subject.

  1.2.  What this document is about


  More and more people own portable computers these days and in turn,
  more and more people install Linux on such machines.


  Installing and using Linux on a laptop is usually no problem at all,
  so go ahead and give it a try. Unlike some other operating systems,
  Linux still supports and runs well on even very old hardware, so you
  might give your outdated portable a new purpose in life by installing
  Linux on it.


  If you need help with installing Linux on a laptop or if you have
  questions about laptop hardware, you can check the excellent Linux
  Laptop webpage at http://www.cs.utexas.edu/users/kharker/linux-laptop/
  where you will find a lot of useful information and detailed help. The
  Linux Laptop page describes hardware configuration for specific laptop
  models and chipsets.


  This HOWTO however will focus on the one problem that is common to all
  portable systems: Power consumption.


  Yet, I have not found a Linux distribution that comes with a
  configuration optimized for laptops. Since I could not find this kind
  of information anywhere else, I have started to collect a few simple
  but effective tricks that will help you save battery power and in turn
  increase your system's uptime while running on battery.


  (Sidenote. I received a complaint by a reader that these tips were not
  very effective with his laptop. So does all this really work? Yes, but
  don't expect miracles. I was able to increase my laptop's battery time
  from 90 minutes to more than 120 minutes.)

  1.3.  Roadmap


  If you are a laptop pro, you can probably skip the ``General
  Information'' section. If you are a Linux pro, what you really want to
  know can be found in the ``Changing some general system settings''
  section. If you are a Linux distributor, please read ``A message to
  Linux distributors''.

  1.4.  Feedback


  Your feedback is welcome. Please send comments to hanno@lava.de. Did
  it work on your system? Do you have new tips? Are there any outdated
  links or addresses in this text?


  I am sorry, but I will not be able to help you with questions about
  specific laptop models. I don't claim to be a laptop guru, I just
  happen to own one laptop myself and I simply want to share the
  information I collected. Please check the Linux Laptop webpage first,
  probably someone else has already written a page dedicated to your
  model. Ask your manufacturer's technical support. Or go the the laptop
  newsgroup comp.sys.laptops and ask there.

  1.5.  Disclaimer


  All methods described here were tested by me and worked fine on my
  laptop, unless noted otherwise. However, I cannot guarantee that any
  of this won't crash or seriously damage your system. Life is
  dangerous, so keep backup copies of your important files before
  playing with your Linux configuration. If things go wrong, I do not
  take any responsibility for your data loss. In other words: Don't sue
  me. Thank you.

  1.6.  Copyright


  This document shall be distributed under the standard HOWTO-copyright
  notice, found in the HOWTO folder at
  http://sunsite.unc.edu/mdw/linux.html.

  2.  General information


  This section describes a few technical things about laptop batteries
  and some general power saving tips. This information is not Linux-
  specific and if you are experienced with laptops, you might already
  know all this.

  2.1.  Be kind to your battery


  (Please note the ``credits'' for this section.)


  There are currently three types of batteries commonly used for
  portable computers.

    NiCd batteries were the standard technology for years, but today
     they are out of date and new laptops don't use them anymore. They
     are heavy and very prone to the ``memory effect''. When recharging
     a NiCd battery that has not been fully discharged, it ``remembers''
     the old charge and continues there the next time you use it.


     The memory effect is caused by crystallization of the battery's
     substances and can permanently reduce your battery's lifetime, even
     make it useless. To avoid it, you should completely discharge the
     battery and then fully recharge it again at least once every few
     weeks.


     (A sidenote about the memory effect. James Youngman knows of a
     rather drastic method to - uhm - ``repair'' batteries: ``If your
     NiCd battery is suffering from the memory effect, remove it from
     your computer, hold it about 30cm above a desk or the floor, and
     drop it (make sure it lands flat).'' He says that this will break
     the whiskers that have formed in the battery and that are the cause
     of the memory effect if your battery is already affected by it. ``I
     don't know if this works for non-NiCd batteries or not.'')

     Cadmium is a very hazardous poison, but if returned to your dealer,
     the material can almost be fully recycled.


     Just in case you might be interested, here are some specs for NiCd:

       Cell voltage: 1,2 V
       Energy / mass: 40 Wh/kg
       Energy / volume: 100 Wh/l
       max. Energy: 20 Wh
       Charge temp.: 10 to 35 C (50 to 95 F)
       Discharge temp.: -20 to 50 C (-5 to 120 F)
       Storage temp.: 0 to 45 C (30 to 115 F)

    NiMh batteries are the current standard used in most low price
     laptops to date. They can be made smaller and are less affected by
     the memory effect than NiCd.


     However, they have problems at very high or low room temperatures.
     And even though they use less hazardous and non-poisonous
     substances, they cannot be fully recycled yet (but this will
     probably change in the future).


     NiMh specs:

       Cell voltage: 1,2 V
       Energy / mass: 55 Wh/kg
       Energy / volume: 160 Wh/l
       max. Energy: 35 Wh
       Charge temp.: 10 to 35 C (50 to 95 F)
       Discharge temp.: 0 to 45 C (30 to 115 F)
       Storage temp.: 0 to 30 C (30 to 85 F)

    The new high performance batteries use LiIon technology. In theory,
     there is no memory effect at all with these batteries, but on
     occasion, they seem to have similar problems. Their substances are
     non-hazardous to the enviroment, but they should be returned for
     recycling as well.


     LiIon specs:

       Cell voltage: 3,6 V
       Energy / mass: 100 Wh/kg
       Energy / volume: 230 Wh/l
       max. Energy: 60 Wh
       Charge temp.: 0 to 45 C (30 to 115 F)
       Discharge temp.: -20 to 60 C (-5 to 140 F)
       Storage temp.: -20 to 60 C (-5 to 140 F)

  Even if the battery case looks the same, you cannot just upgrade to
  another battery technology. The recharging process is different for
  the kind of battery you use.


  Some manufacturers integrate the recharging circuit inside the
  laptop's external ac adapter, so you might just get away with buying a
  new power supply to upgrade. A good indication for an external
  recharging unit is when your ac adapter uses a proprietary connector
  with a lot of power lines.


  Other manufacturers put the recharging unit inside the laptop case
  where users cannot simply replace it with a newer technology. If your
  ac adapter only uses two power lines to connect to the computer (just
  like mine), the recharging unit is probably inside the laptop.


  When in doubt, ask your manufacturer if your laptop supports a more
  modern battery.


  A battery that is not used for a long time will slowly discharge
  itself. And even with greatest care, a battery needs to be replaced
  after 500 to 1000 recharges. But still it is not recommended to run a
  laptop without the battery while on ac power - the battery often
  serves as a big capacitor to protect against voltage peaks from your
  ac outlet.


  As the manufacturers change the shapes of their batteries every few
  months, you might have problems to find a new battery for your laptop
  in a few years from now. Buy a spare battery now - before it's out of
  stock.

  2.2.  Power saving - The obvious stuff


  There are some obvious things that you can do to reduce your system's
  power consumption. Well, maybe not so obvious, since not very many
  people follow these rules...

    Decrease or turn off your display's backlight when you don't need
     it. By the way, tft displays use more power than dstn (so now you
     have a fine excuse why you bought the cheaper laptop...).


     (David Bateman tells me that using a crt screen while on battery
     and turning off the laptop display will extend battery time by
     about 30%: ``Not that this is a very useful piece of knowledge
     though, if you've got the crt plugged in then why not the laptop
     too.'')


    How much processing power do you really need? I doubt that you will
     be doing very much more than text editing when on the road (well,
     at least I don't compile linux kernels then). While on battery,
     reducing the cpu clock speed will decrease power consumption, too.
     Quite a few laptops offer a cpu clock selector that will toggle
     between normal and slow speed.

    Turn off the cpu cooler (if you have one). Many recent laptops
     offer a bios option called ``cooling control''. If your system's
     cpu is becoming too hot, this option allows you to have it cooled
     by a tiny fan (setting ``performance'') or to have its cpu clock
     slowed down (setting ``silence''). To increase your uptime while on
     battery, use ``silence''.

    Avoid using external devices (printer, crt screen, zip drive,
     portable camera etc.) with your computer while on battery. When
     connected to a standard ink jet printer, my laptop's battery time
     is reduced from up to 120 minutes down to 20 minutes.

    Avoid using any built in device unless necessairy: Diskette drive,
     harddisk, cd-rom. Especially cd-rom access will dramatically
     decrease your battery time.

    Pcmcia cards can also consume a lot of power, so don't leave your
     modem or network adapter plugged in when it is not in use. But this
     is different between the various pcmcia manufacturers, so check the
     product specs before you buy (e. g. some cards never turn
     themselves off even when not in use).


     (By the way, I recently read that pcmcia cards are the biggest
     problem for windows ce palmtops - they drain so much power that the
     tiny machines' little batteries have to be replaced within
     minutes...)

    Use simple software. A full blown multimedia application will
     create a lot more system load and harddisk / cd-rom activity than a
     small simple word processor.

    Grant Taylor has a tip for those of us who want to upgrade their
     system: ``Newer versions of some upgradable components consume less
     power. For example, IBM's Travelstar 2.5 inch 1.6 gigabyte ide
     harddisk drive consumes 20 percent less than the 500 megabyte
     toshiba harddisk my laptop came with.''

    If you are yet about to buy a laptop - don't buy a laptop with a
     2nd level cache if battery uptime is important. A computer with 2nd
     level cache is about 10% to 20% faster and it will be a lot better
     with multimedia applications and number crunching, but it consumes
     a lot of power. Bjoern Kriews tells me that he has two almost
     identical laptops and the one without cache ram runs 4h30 compared
     to 2h30 with cache.


     If you already have 2nd level cache installed, turning it off will
     probably not help you very much.  Give it a try and write me about
     your experience.

    Another tip for those still buying a laptop - don't buy the latest,
     fastest cpu type. Usually, the older generations are optimized by
     the manufacturer after some time without notice. The ``new''
     versions of old cpu types often create less heat and consume less
     power than the product's premiere version.


     There are also frankenstein laptops available that use cpus not
     optimized for portable systems. As I wrote this in May 97, the
     newest generation pentium-200 laptops ran about 20 minutes on
     battery and became so hot that they burnt your lap. When writing
     the second revision in Oct 97, pentium-233 laptops run two hours or
     longer without ac power. Go figure.

  Well, you get the idea. Most of these are restrictions that will
  probably stop you from doing any serious work with your Linux system.
  (The best way to save power while on battery is... not to do anything
  at all. That increases my laptop's battery uptime by almost 100
  percent.)


  So let's go ahead to some other, more useful measures that will save
  power without disturbing your work.
  3.  Advanced Power Management


  Portable systems in general, but even many desktop computers come
  equipped with support for apm, the ``advanced power management''
  scheme. This section describes how to activate apm support in your
  Linux kernel. People who are experienced with Linux may find this
  section rather boring and want to skip to the next.

  3.1.  What APM can do for you


  I won't describe it in detail here, check the Linux APM drivers page
  at http://www.cs.utexas.edu/users/kharker/linux-laptop/apm.html for
  more information. All that you need to know is that with the help of
  apm, the cpu can tell the bios when there's nothing really exciting
  going on so that the bios can take care of some power saving by itself
  - e. g. reducing the cpu clock, turning off the harddisk, turning off
  the display's backlight etc.


  Apm is also responsible for the ``system suspend'' (or ``sleep'') mode
  and for the ``suspend to disk'' (or ``hiberntation'') mode. And yet
  another cool, though not very important feature is that with the help
  of apm, shutdown -h will not just halt your system, but also turn it
  off.


  (By the way, most Linux systems put a shutdown -r in their
  /etc/inittab and map it to pressing control-alt-delete. I prefer
  having shutdown -h there, so when pressing the famous key combination,
  my laptop simply turns itself off.)


  Not all manufacturers implement a correct apm bios, so some laptops
  have trouble with the Linux apm drivers (if your machine has trouble
  with apm, it will most likely either lock up at Linux' boot up or
  after returning from suspend). If you are not sure, check the Linux
  laptop page for your specific model.

  3.2.  How to activate APM support in Linux


  It's easy - just recompile the Linux kernel. Check the Kernel-HOWTO if
  you don't know how to do that.


  When the configuration script reaches the ``character devices''
  section, the default setting for full apm bios support in kernel
  version 2.0.30 or higher is:

       Advanced Power Management BIOS support: Yes
       Ignore USER SUSPEND: No
       Enable PM at boot time: Yes
       Make CPU Idle calls when idle: Yes
       Enable console blanking using APM: Yes
       Power off on shutdown: Yes


  Please read the configuration script's help texts. They explain in
  detail what each option does, so I won't repeat them here.


  If your system does not fully support the apm bios standard, some of
  those options might crash your system. Test all apm features with the
  new kernel to make sure that everything works as it should.


  (A sidenote about console blanking: David Bateman tells me that you
  should not enable it because it can cause problems with the current
  version of XFree 3.2: ``The symptoms are that the screen will be blank
  when X starts, and it can be fixed usually by just hitting a key. It's
  a small but annoying problem. The next relase of XFree, will have
  pretty good DPMS support for a lot of laptop chipset, which should
  include code to turn off the LCD. Check out the manpage for xset in
  XFree 3.2A.'' David also notes that the lifetime of your display's
  backlight is determined by the number of times it's switched on and
  off: ``So its a compromise, lifetime of the battery versus lifetime of
  the backlight.'')


  (Update: With XFree 3.3, this problem still remained on my laptop. I
  am told that this will be fixed in a future kernel version.)

  3.3.  APM support and the PCMCIA drivers


  After recompiling the kernel, don't forget to recompile the linux
  pcmcia drivers as well.


  The precompiled pcmcia drivers that come with most linux distribution
  have apm support disabled, so that the bios can't instruct your card
  adapters to turn off.


  Also, you must recompile the drivers if you upgrade to a new kernel
  version and your old kernel was compiled with module version
  information turned on (this option is found in the ``loadable module
  support'' section of the kernel configuration).


  Read the PCMCIA-HOWTO for detailed instructions on how to compile the
  drivers or go to the Linux PCMCIA drivers homepage at
  http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html.

  3.4.  The apmd package


  Now that you have APM support installed, go and get the apmd package
  from the Linux APM drivers page. You don't really need it, but it is a
  very useful collection of programs. The apmd daemon logs your
  battery's behaviour and it will send out a warning if you are on low
  power. The apm command will suspend your system with a shell command
  and xapm shows the current state of your battery.


  (BTW, if you have problems with pcmcia cards after returning from
  suspend, you can check out an alternative apmd package at
  http://www.cut.de/bkr/linux/apmd/apmd.html. It unloads the pcmcia
  driver module before going to suspend and reloads the module on
  resume.)


  Grant Taylor has been playing a little with the apmd package and came
  up with helpful tips.


  He found that his laptop's harddisk forgets its hdparm -S standby
  period when returning from suspend: ``I modified apmd to reset this
  setting on each resume. This may be system-specific; but it's an
  important thing to do...''


  (Note: On my own laptop, the bios takes care of the harddisk standby
  period and resets the value on resuming. So I could not test if this
  little problem is system-specific. If it happens to you as well, send
  me a message.)


  Grant also had a nice trick for screen blanking with ``the XFree86
  package'' and the help of the apmd package, you'll find it there.

  3.5.  And if my laptop does not support APM?


  If your computer's bios does not offer any power saving settings (even
  the old ones without apm should at least allow to set harddisk and
  display standby), you can use hdparm -S to define your harddisk's
  standby period. This will already help a lot, since harddisk activity
  consumes a lot of power. Your system should have hdparm installed, so
  read man hdparm for the command syntax.

  4.  Changing some general system settings


  After I got Linux up and running on my laptop, I found it accessing
  the harddisk every few seconds, even when there was no user logged in
  to the system. The harddisk could never enter its power saving mode.
  Reducing harddisk activity can greatly increase the battery runtime,
  so this is why I collected the following recipes.


  I tested all this with RedHat 4.1, the locations of some configuration
  settings may be different for your distribution. (If so, please let me
  know.)

  4.1.  The crond daemon and atrun


  Check your /etc/crontab file if it starts a process every minute. You
  will often find atrun there.


  With the at command, you can spool commands that must be invoked some
  time in the future. Some Linux systems use a dedicated atd daemon to
  take care of this, others (e. g. RedHat) let the crond daemon run
  atrun once every minute.

  This is not really necessairy on most systems, since at commands
  rarely depend upon being invoked on exact time. So if you find a line
  like this in your /etc/crontab:

       # Run any at jobs every minute
       * * * * * root [ -x /usr/sbin/atrun ] && /usr/sbin/atrun

  Then you can safely change this to:

       # Run any at jobs every hour
       00 * * * * root [ -x /usr/sbin/atrun ] && /usr/sbin/atrun

  Read man 5 crontab for details. Some folks can even work fine without
  the crond daemon, so if you know what you are doing, you might want to
  consider disabling it completely.

  4.2.  The update / bdflush daemon


  Linux deals with a lot of open file buffers at any given moment, so
  the system must make sure that file changes are saved to the harddisk
  as soon possible. Otherwise, those changes will be lost after a system
  crash.


  The update / bdflush daemon takes care of this. (These are two names
  for the same program, so you can use either name to start the daemon).
  The default settings will make this daemon call flush every 5 seconds
  and sync every 30 seconds.


  With my Fujitsu disk this caused non-stop access. (It seems that this
  harddisk flushes its ram cache even when nothing has changed. But this
  depends on your harddisk's firmware: Other people told me that their
  harddisk does enter its power saving mode even without the following
  modification.)


  Since Linux does not crash very often anymore, I have changed both
  values to 3600 seconds (= one hour). This caused no problems at all
  and the constant disk access has stopped. (But if my system crashes
  now, there will be more broken files, of course.)


  RedHat 4.1: In /etc/inittab, change the update call to:

       ud::once:/sbin/update -s 3600 -f 3600

  Suse 4.4.1: update is called in /sbin/init.d/boot.


  Slackware: update is called in /etc/rc.d/rc.S.


  See man update for details.

  4.3.  The syslogd daemon


  The syslogd daemon is responsible for the various Linux system log
  files that are found in the /var/log/ directory. By default syslogd
  will sync the log file each time after logging a system message.


  You can turn that off by preceding the filename with a dash in
  /etc/syslog.conf. Here's an example as found in my system's
  syslog.conf:

       # Log anything (except mail) of level info or higher.
       # Don't log private authentication messages!
       *.info;mail.none;authpriv.none                  -/var/log/messages

  This again means that if the system crashes, the message that reported
  the problem may not have been stored to disk. Dilemma...

  4.4.  The init command


  During the bootup, the initial processes and daemons will be started
  using the init command. This command (yet again) calls sync before
  each process it creates.


  You can change this by removing the sync() call in the source code and
  recompiling the command.


  To avoid problems with lost file buffers, you should add a call to
  sync in your system's /etc/rc.d/init.d/halt script, right before the
  script unmounts the file systems.

  4.5.  The swap partition


  The Linux swap partition is used to increase the physical ram space
  with virtual memory. This again is a possible reason for harddisk
  access. If your laptop already has a lot of ram or if the applications
  that you use are quite simple (think of vi), you might want to
  consider turning it off.

  This of course depends on what you plan to do. 4 to 8 megs are not
  enough, you must use a swap partition then. With 8 to 16 megs, text
  console applications will work fine and if you can avoid using a lot
  of multitasking features, you can safely disable swap. The X-Windows
  enviroment requires a lot of ram and you should not use it without a
  swap partition unless you really have a lot more than 16 megs.


  (Sidenote: My laptop with 16 megs and disabled swap partition can run
  an emacs session, four bash shells and compile a kernel without
  running out of memory. That's enough for me.)


  If you already have installed a swap partition, you can disable it by
  preceding the swapon command that is called in /etc/rc.d/rc.sysinit
  with a hash mark. If you don't want to make it a permanent move, let
  the system ask during boot if you want to use the swap partition. In
  /etc/rc.d/rc.sysinit (RedHat 4.1) or /sbin/init.d/boot (Suse 4.4.1):

       echo "Should the system use swap?"
       echo "  0: No."
       echo "  1: Yes."
       /bin/echo "Your choice: \c"
       read SWAPCHOICE

       case "$SWAPCHOICE" in
           0)
               # Do nothing.
               echo "(Swap partitions disabled)"
               ;;
           *)
               # Start up swapping.
               echo "Activating swap partitions"
               swapon -a
       esac

  Then you can use the swap partition while on ac power and drop it
  while on battery.

  4.6.  The apache httpd webserver daemon


  I am using my laptop to develop and test cgi scipts for websites, that
  is why I am running a local webserver on it. The standard
  configuration is a bit too much if all you want to do is just test a
  script or check a page from time to time.


  In httpd.conf, just change the values of MinSpareServers and
  StartServers to 1. This will be enough for a local test site.


  If you wish to turn off the webserver's logging, you must recompile
  the httpd daemon. Read the documentation for details.


  Grant Taylor recompiled apache's logging and found that this ``didn't
  make it stop churning the disk. So I used another, IMHO better,
  solution: I configured apache to run from inetd instead of
  standalone.'' Read man inetd for details.

  4.7.  The XFree86 package


  Configuring XFree86 for laptops is a story of its own. And yet again,
  I have to refer you to the Linux Laptop page where you will find a lot
  of help on this.


  X's console blanking only turns the screen black, but does not turn it
  off. As mentioned in the ``sidenote about console blanking'', you can
  use xset's dpms option to change this.  However, this feature depends
  on your laptop's graphics chipset and bios.


  Grant Taylor uses the following setup to send his laptop to sleep with
  the help of apmd and the screensaver:

       # Run xscreensaver with APM program
       xscreensaver -timeout 5 \
                    -xrm xscreensaver.programs:apm_standby \
                    -xrm xscreensaver.colorPrograms:apm_standby &

  Where ``apm_standby is a suid perl script that allows only certain
  people to run apm -S.''

  4.8.  The emacs editor


  Ok, emacs is not an editor, but a way of life. Here's a tip from
  Florent Chabaud: ``If you use emacs, perhaps you have noticed that the
  editor makes some automatic saves.  This is of course useful and
  should not be disabled, but the default parameters can be adjusted to
  a laptop use.


  I have put in the file /usr/share/emacs/site-lisp/site-start.el the
  two following lines:

       (setq auto-save-interval 2500)
       (setq auto-save-timeout nil)

  This disables auto-saving based on time, and makes the auto-saving be
  done every 2500 keyboard actions. Of course if you are typing a text
  this last parameter should be reduced, but for programming it is
  sufficient. Since every action (up, down, left, backspace, paste,
  etc...) is counted, 2500 actions are reached very rapidly.''

  4.9.  How to find more ways to optimize


  If your Linux system still seems to access the harddisk too often, you
  can find out what is going on inside by using the ps ax command. This
  will show all running processes and their full name, sometimes it also
  reveals the command line arguments of each process.


  Now read the man page of each process to find out what it does and how
  to change its behaviour. With this method, you will most likely find
  the process that is responsible. You may also find strace helpful.


  Please send me an email if you found something new.

  5.  Appendix

  5.1.  A message to Linux distributors


  If you happen to be a Linux distributor, thank you for reading all
  this. Laptops are becoming more and more popular, but still most Linux
  distributions are not very well prepared for portable computing.
  Please make this document obsolete and change this for your
  distribution.

    The installation routine should include a configuration, optimized
     for laptops. The ``mimimal install'' is often not lean enough.
     There are a lot of things that a laptop user does not need on the
     road. Just a few examples. There is no need for three different
     versions of vi (as found in Suse Linux). Most portable systems do
     not need printing support (they will never be connected to a
     printer, printing is usually done with the desktop system at home).
     Quite a few laptops do not need any network support at all.

    Don't forget to describe laptop-specific installation problems, e.
     g. how to install your distribution without a cd-rom drive or how
     to setup the plip network driver.

    Add better power management and seamless pcmcia support to your
     distribution. Add a precompiled kernel and an alternative set of
     pcmcia drivers with apm support that the user can install on
     demand. Include a precompiled apmd package with your distribution.

    Add support for dynamically switching network configurations. Most
     Linux laptops travel between locations with different network
     settings (e. g. the network at home, the network at the office and
     the network at the university) and have to change the network id
     very often. Changing a Linux system's network id is a pain with
     most distributions.

  Please mail me if your distribution is optimized for portable
  computing and what kind of features you added for that. Future
  versions of this HOWTO will include a section where you can advertise
  your distribution's laptop features.

  5.2.  Credits

    The information about battery technology is mostly based on the
     article ``Stromkonserve'' by Michael Reiter, published in ``c't
     Magazin fuer Computertechnik'' (Heise Verlag Hannover, Germany),
     edition 10/96, page 204. Used by permission. Visit their website at
     http://www.heise.de/.

    The following people contributed to this document:

       Frithjof Anders <anders@goethe.ucdavis.edu>
       David Bateman <dbateman@ee.uts.edu.au>
       Florent Chabaud <chabaud@celar.fr>
       Markus Gutschke <gutschk@uni-muenster.de>
       Kenneth E. Harker <kharker@cs.utexas.edu>
       Bjoern Kriews <bkr@rrz.uni-hamburg.de>
       R. Manmatha <manmatha@bendigo.cs.umass.edu>
       Juergen Rink <jr@ct.heise.de>
       Grant Taylor <gtaylor@picante.com>
       James Youngman <JYoungman@vggas.com>

  5.3.  About this document


  This text mentions batteries 53 times.


  The current version of this and many other HOWTOs, most of them a lot
  more useful than this one, can be found at the main Linux
  documentation site http://sunsite.unc.edu/mdw/linux.html or at one of
  its many mirror sites.


  Most of this text was written during my trips between Hamburg and
  Hannover on German rail. (The new ice-2 coaches have power outlets for
  laptops, yeah!).


  And now hum along with me: ``...on the road again...''


   BOCA-HOWTO
   _Installing a Boca 16-port serial card (Boca 2016) with Linux_

   Last updated 1 August 1997

   This HOWTO is being maintained by David H Dennis, david@freelink.net,
   to try and help any other individuals who may have acquired a
   BocaBoard, stared at it and found out that it didn't seem to do
   anything.

   A very high percentage of those interested in the BocaBoard are also
   interested in becoming Internet Service Providers (ISPs). If you are
   one of them, please feel free to drop by my web site,
   http://www.amazing.com , and check out my Inet-Access FAQ, over 9,000
   lines detailing how to hook up to the net and how to make your
   Internet provider business succeed in these most interesting times.

   Kevin Traas has issued a helpful update to this FAQ that contains a
   major correction to the information on mknod. He is also standing in
   as a new source for cables for the device.

   W a r n i n g !

   _Multi-Port serial cards, such as the BocaBoard, are all but dead._ If
   you are in business as an Internet Service Provider (ISP), you will
   _not_ want to use any of these devices, because the new 56k modem
   standards will not support them. Instead, you need digital
   modem/terminal server combinations such as the Livingston PM3, Cisco
   5200 or US Robotics Total Control. Otherwise, you simply won't be
   competitive in major markets. Users want high speeds; you won't be
   able to provide them with a BocaBoard or other multi-port serial card.

   _Even as a multi-port serial card, the BocaBoard is hopelessly
   obsolete._ The overwhelming majority of people who want to buy a
   BocaBoard would be better off getting a accelerated card such as the
   Cyclades or Rocketport. (When last I looked, Rocketport was a better
   board, but Cyclades had the most stable kernel support). Accelerated
   cards use less of the CPU of your machine, and so you can support more
   ports per computer with less performance degradation.

   That being said, perhaps you own one of these devices and want to make
   use of it, or perhaps you are planning an ISP based on a low-cost
   business model that basically means the use of cast-off equipment from
   others. In that case, the information in this document should be
   useful for you. But again, I repeat: _The person who buys a new
   BocaBoard at this point probably needs a few more clues before
   starting his ISP or other venture._



   The information here was obtained by begging many people for help.
   Unfortunately, I have forgotten their names due to a pressing need for
   disk space on my Netcom account. :-( Nonetheless, I thank them very
   much for their assistance when things looked blackest. This is my way
   of paying some of that back.

   At the end of this document, there is additional information on a
   special $ 80 piece of equipment you will need in addition to your
   BocaBoard, and some comments on Boca customer service and
   availability.

   WHAT DO YOU NEED TO DO TO INSTALL A BOCABOARD?

   In outline, the following:

    1. The board itself and its manuals
    2. Your Linux source tree
    3. Patience



   Here's the basic procedure:

   Recompiling The Kernel

   The first step is to change your kernel so that it knows you have a
   BocaBoard. Unfortunately, this is not a part of the configure script;
   you must go in and modify the source by hand. This consists of putting
   the following line at the beginning of linux/drivers/char/serial.c:


   #define CONFIG_BOCA  1

   Well, it used to work that way. As of some kernel version or another,
   this has changed. To make it work with newer kernels, search for the
   "BOCA_FLAGS" #define in serial.c, and change the value to

   #define BOCA_FLAGS  ASYNC_BOOT_AUTOCONF

   You can then recompile your kernel using the instructions included
   with the source tree. I recommend running the new kernel from a floppy
   until you're very sure it works; otherwise, the procedure for getting
   back your system is mind-numbing at best.

   At least to me, digging into my kernel and re-compiling it was quite a
   stressful venture! Relax; as long as you copy it to a floppy, your new
   kernel is completely harmless. It won't bite! Honest! :-)

   Installing The Card

   The default address on both the card and the Linux software for the
   configuration is 0x100; leave that alone. Set the IRQ on the card to
   Linux' default of 12. If you want to change the IRQ, you will have to
   search for "BOCA_FLAGS" in the file. You will find lines like this:


        { BASE_BAUD, 0x100, 12, BOCA_FLAGS },   /* ttyS16 */
        { BASE_BAUD, 0x108, 12, BOCA_FLAGS },   /* ttyS17 */
        ...

   You can change the IRQ from 12 by changing the 12 to any valid IRQ. I
   have not tried this, however.

   Telling Linux About Your Card

   Once you have compiled your new kernel, switch off the machine and
   install the card. Then, turn your machine on with the new kernel
   floppy in the drive. If the installation succeeded, you should see all
   sorts of strange stuff about 16550 UARTS being connected to
   ttyS16-ttyS32. The system will then come up normally.

   The odds are pretty good that you don't actually have entries in /dev
   for those lines. Remember that they start at 16 and go on to 32. If
   you look at the source code, you'll see why; support for other cards
   is included in the code for lower line numbers. Creating them is
   pretty simple, once you know the trick.

   To create entries for dial-out lines (where you call out), type:


    mknod /dev/cuaxx c 4 N

   n = 64 + <line number> . The C indicates that this is a character mode
   device. For example, to create the first couple of lines on your
   board, type:


    mknod /dev/cua16 c 4 80
    mknod /dev/cua17 c 4 81
     ...

   To create dial-in lines (where users call you), type

    mknod /dev/ttySxx c 5 n

   where N is the same as described above. For example, to create the
   first couple of lines on your BocaBoard, type:

    mknod /dev/ttyS16 c 5 80
    mknod /dev/ttyS17 c 5 81
      ...

   It is recommended that you create both dial in and dial out lines for
   each port, so that you have maximum flexibility. It turns out to be
   very handy to call another line of your system by activating one of
   your lines as dial-out and calling your main number. I've done this
   already and it works great! It's most useful for checking how things
   look "on the other side of the fence"; I used it to find out how my
   software looked at 2400bps. (It's slower than the Linux console. A LOT
   slower, in fact).

   Once you've finished with this, you can add entries to your inittab
   file in the same way as you would for a standard ttySx entry, and the
   modems or terminals should come up!

   Possible Problems

   If you have problems, you may find that this is due to conflicts
   between your Boca board and systems with dual IDE controllers.
   According to Kevin Traas:

     Is the kernel recognising the board? i.e. Right at the start of the
     boot process, all sixteen ports should be listed onscreen with
     ttySxx, I/O Port, and IRQ identified. Also, `setserial -bg ttyS*`
     should list *every* port in your system.

     By default, the BB2016 is configured to use IO Ports between 0100
     and 017f. This creates problems on systems with two IDE controllers.
     The second controller, ide1, uses 0170-0177 which falls into this
     range. Big problems!!!

     So, the solution, in my cases, is to go with an IO base of 0200
     through 027f. I haven't had any conflicts in this region; however,
     you may want to check you system to be sure. (run `cat
     /proc/ioports` - better run `cat /proc/interrupts` to make sure IRQ
     12 isn't used either.)

     Once you've found an IO range and IRQ that isn't used, you'll have
     to change the jumpers on the BB2016 and edit
     /usr/src/linux/drivers/char/serial.c to reflect the new settings.
     Then, compile the kernel and install as per normal.

   THE BIG GOTCHA: Something extra you will need, and service comments

   If you want to use your new Boca card with any standard DB-25 RS232
   connector, you will have to get a special breakout box, which costs
   about $ 80. The card itself comes with a breakout box that plugs into
   the card through a truly formidable cable. It then supplies phone-like
   cables for the ports. The special $ 80 box has phone-like cables that
   plug into the breakout box included with the Boca card; you can then
   plug your modems or terminals into standard RS-232 connectors on the
   box. Unless you actually have a system that accepts the phone-like
   connectors, you should add the price of the box to the cost of the
   card when comparing it to other alternatives.

   I got my Boca 2016 card through a special wholesale deal that I don't
   think many people will be able to reproduce. It was available quickly.
   However, the breakout box for RS-232 took about two weeks to ship. You
   should be aware of your need for this box before you acquire the card.
   The 2016 board was $ 235 and the additional box was $ 79.95.

   I've heard that this breakout box is no longer available, and that now
   people just have special cables made. I'm not sure how you would go
   about doing this, though.

   Only one port of my first Boca 2016 worked. I called Boca, expecting
   to hear a long string of questions and advice. When they said, "Linux?
   What's that?" I feared the worst. However, upon hearing my actual
   problem, they cheerfully told me that the card was defective and I
   should send it back; full 5-year factory warranty, 30-days exchange. I
   was struck by how cheery the lady was. It was as though they were
   expecting the worst, and very kindly making the most of it!

   I had my hardware guy exchange the card. Unfortunately, the cards were
   back-ordered and they took about two more weeks to give me my new
   card. I have to say that I was quite annoyed at this, since I was
   anxiously chomping at the bit to get this thing up and running.

   Some people have problems with ports past the first eight. I have
   tested my card up to port 11 and all the ports appear to be working.
   Boca Research quality control may be lacking; I would recommend that
   people with troubles with the card call Boca and deal with them
   directly. I suspect that if I'd exchanged the card directly through
   the factory I would have had better service than through my dealer.
   The factory people were all quite nice and eager to please.

   Right now, I have only four phone lines. I bought the 16-port card for
   two reasons: Because it has modem control, unlike the smaller ones,
   and in anticipation of future expansion.

   Some additional information on this subject from Kevin Traas of Baan
   Business Systems:

     BTW, I've used the BB2016 several times and found to work really
     well under Linux. I'm extremely happy with them. They perform very
     well, are very inexpensive, and are reliable. They claim 115200 bps
     per port. I've got a unique situation whereby I've got two systems
     with a PPP serial link between them. I'm running this link at 115200
     and I experience almost 0% error rate (with hundreds of thousands of
     packets transmitted). My next step is to implement EQL and
     additional PPP links between the boxes to increase the bandwidth...
     We'll see how it goes.

     One final note. Contrary to the suggestion in the Howto, I build my
     own cables for the BB2016 (they've got RJ ports on them). At first,
     I "dabbled" with RJ45-8 conductor plugs, but the BB2016 has RJ48-10
     conductor jacks, so to get full modem support, I ended up going that
     route.

     I now run all 10 wires between the BB2016 and my modems. It works
     great! No problems, no regrets! The only initial problem I had was
     finding a source for RJ48 plugs, 10 conductor wire, and RJ48 to DB25
     adapters..... None of these are very cheap due to the low demand.
     Oh, yeah, and you need an RJ48 crimper as well.

     If you want, I can build these cables for you and send them to you.
     If you're interested, e-mail me and I'll let you know pricing, etc.
     I found building my own was cheaper than the adapter that is
     mentioned in the Howto - which I couldn't find a source for anyway.



   I believe the adapter mentioned in this document is no longer being
   manufacturered, leaving cables such as your own the only remaining way
   of connecting the device.
  BogoMips mini-Howto
  Wim van Dorst, baron@clifton.hobby.nl
  2000-02-06

  This text gives some information about BogoMips, compiled from various
  sources such as news and e-mail. This text is retrievable from the
  various Linux archives in the file HOWTO/mini/BogoMips.  Translations
  are available, as far as I know, in French, Japanese, Italian, German,
  Polish, Portuguese, Chinese, and Hungarian from appropriate archives.
  An explanatory article, titled 'the Quintessential Linux Benchmark,'
  was published in the Linux Journal, issue January 1996. The BogoMips
  is also explained in The Jargon File.  New mini-Howto entries for
  unlisted CPUs will be highly appreciated. They can be send per e-mail
  to the author.
  ______________________________________________________________________

  Table of Contents


  1. Lowest and highest BogoMips ratings

     1.1 The lowest Linux boot sequence BogoMips value
     1.2 The highest single-CPU Linux boot sequence BogoMips value
     1.3 The highest multiple-CPU (SMP) Linux boot sequence BogoMips value
     1.4 The highest non-Linux BogoMips value

  2. The frequently asked questions about BogoMips

     2.1 What are BogoMips
     2.2 How to estimate what the proper BogoMips rating should be
     2.3 How to determine what the current BogoMips rating is
     2.4 Variations in BogoMips rating
     2.5 BogoMips ... failed
     2.6 What about clone CPUs (Cyrix, NexGen, AMD, etc)
     2.7 Why to pay attention to BogoMips

  3. Compilation of ratings

     3.1 Oddly or faultly configured 386 systems
     3.2 Normal 386 systems: SX, DX, Nexgen
     3.3 Oddly or faultly configured 486 systems
     3.4 Normal 486 systems
     3.5 Normal 486 variations: Cyrix/IBM, UMC
     3.6 Oddly or faultly configured Pentium systems, or variations
     3.7 Normal Pentium systems
     3.8 Normal Pentium variations: Intel
     3.9 Normal Alpha systems
     3.10 Normal Motorola systems
     3.11 Other Systems: Sparc, PowerPC, Mips, Intel 8088/286 ELKS
     3.12 Normal Multi CPU systems
     3.13 Non-Linux systems (reference only)

  4. Signature



  ______________________________________________________________________

  Note: during the period February/May 1999 I received very interesting
  BogoMips information. Unfortunately due to hardware failure (and my
  additional erroneous behaviour) the archive file of these was lost. So
  in case you did send me information, but it doesn't show in this file,
  please send me the data again. I apologize for the misser. WvD.



  1.  Lowest and highest BogoMips ratings

  The following are the lowest and the highest BogoMips ratings, are
  reported directly to me, or published on Usenet.


  1.1.  The lowest Linux boot sequence BogoMips value


  o  Tim Van der Linden, timvdl@innet.be

  o  Intel 8088, at 4.77 MHz, ELKS

  o  0.02 BogoMips


  1.2.  The highest single-CPU Linux boot sequence BogoMips value


  o  Jon Berlin jberlin@worldbank.org

  o  Laurent blackm@pop.multimania.com

  o  AMD K6-2 3D at 500MHz

  o  999.42 BogoMips


  1.3.  The highest multiple-CPU (SMP) Linux boot sequence BogoMips
  value


  o  Richard Langis, rlangis@primux.geekfest.net

  o  8x Pentium III (Xeon) at 500 MHz

  o  3996.06 BogoMips


  1.4.  The highest non-Linux BogoMips value


  o  omega@sequent.com

  o  Sequent NUMA-Q, 32 CPUs P6, at 180 MHz

  o  Dynix operating system

  o  3776.00 BogoMips


  2.  The frequently asked questions about BogoMips

  Several authors have contributed to my knowledge of BogoMips. In this
  place, I would like to thank them highly.


  2.1.  What are BogoMips

  Quoted from the Internet, origin currently unknown but brought to the
  attention by Eric S Raymond esr@thyrsus.com, and Geoff Mackenzie
  freon@dialstart.net, there is an humourously illustrative definition
  of BogoMips as ''the number of million times per second a processor
  can do absolutely nothing.''


  On a more precise basis, from Lars Wirzenius'
  wirzeniu@kruuna.Helsinki.FI mail of 9 September 1993, explaining
  Bogomips, with additional detailed information by Alessandro Rubini,
  rubini@norgana.systemy.it, and by Wim van Dorst:


       `MIPS is short for Millions of Instructions Per Second.  It
       is a measure for the computation speed of a program.  Like
       most such measures, it is more often abused than used prop-
       erly (it is very difficult to justly compare MIPS for dif-
       ferent kinds of computers).

       BogoMips are Linus's invention. The kernel (or was it a
       device driver?) needs a timing loop (the time is too short
       and/or needs to be too exact for a non-busy-loop method of
       waiting), which must be calibrated to the processor speed of
       the machine. Hence, the kernel measures at boot time how
       fast a certain kind of busy loop runs on a computer. "Bogo"
       comes from "bogus", i.e, something which is a fake. Hence,
       the BogoMips value gives some indication of the processor
       speed, but it is way too unscientific to be called anything
       but BogoMips.

       The reasons (there are two) it is printed during bootup is
       that a) it is slightly useful for debugging and for checking
       that the computers caches and turbo button work, and b)
       Linus loves to chuckle when he sees confused people on the
       news.'


  BogoMips are being determined in /usr/src/linux/init/main.c (simple C
  algorithm), and the pertaining kernel variable loops_per_sec is used
  in several drivers for more serious purpose. The actual delay function
  udelay() is in assembler, and therefore each port has its own
  definition in /include/asm/delay.h.  The loops_per_sec variable and
  the udelay() function are used in numerous drivers, see:

  cd /usr/src/linux #or where else source is located
  find . -name '*.[hcS]' -exec fgrep loops_per_sec {} /dev/null \;
  find . -name '*.[hcS]' -exec fgrep udelay {} /dev/null \;



  2.2.  How to estimate what the proper BogoMips rating should be

  >From a initiative by Ian Jackson, ijackson@nyx.cs.du.edu, and Przemek
  Klosowski, much updated and expanded by Wim van Dorst for current
  data, as listed below:

  As a very approximate guide, the BogoMips can be calculated by:



  System                      BogoMips           Comparison
  Intel 8088                  clock * 0.004         0.02
  Intel/AMD 386SX             clock * 0.14          0.8
  Intel/AMD 386DX             clock * 0.18          1 (definition)
  Motorola 68030              clock * 0.25          1.4
  Cyrix/IBM 486               clock * 0.34          1.8
  Intel Pentium               clock * 0.40          2.2
  Intel 486                   clock * 0.50          2.8
  AMD 5x86                    clock * 0.50          2.8
  Mips R4000/R4400            clock * 0.50          2.8
  Nexgen Nx586                clock * 0.75          4.2
  PowerPC 601                 clock * 0.84          4.7

  Alpha 21064/21064A          clock * 0.99          5.5
  Alpha 21066/21066A          clock * 0.99          5.5
  Alpha 21164/21164A          clock * 0.99          5.5
  Intel Pentium Pro           clock * 0.99          5.5
  Cyrix 5x86/6x86             clock * 1.00          5.6
  Intel Pentium II/III        clock * 1.00          5.6
  Intel Celeron               clock * 1.00          5.6
  AMD K7/Athlon               clock * 1.00          5.6
  Mips R4600                  clock * 1.00          5.6

  Alpha 21264                 clock * 1.99         11.1
  AMD K5/K6/K6-2/K6-III       clock * 2.00         11.1
  UltraSparc II               clock * 2.00         11.1
  Pentium MMX                 clock * 2.00         11.1
  PowerPC 604/604e/750        clock * 2.00         11.1
  Motorola 68060              clock * 2.01         11.2

  Motorola 68040              not enough data (yet)
  IBM S390                    not enough data (yet)



  Note that the BogoMips calculation loop does not take full advantage
  of the parallelism of various processors, such as the Intel Pentium
  and the Alpha 21164.

  Note that the BogoMips calculation loop for the non-Intel CPUs is
  similar but not the same.



  2.3.  How to determine what the current BogoMips rating is

  There are three methods to determing the current BogoMips, viz.


  1. looking in /proc/cpuinfo, e.g., with `cat /proc/cpuinfo`. This
     method is highly preferred above the alternatives.

  2. looking in the syslog output to see what was printed there during
     booting (if necessary retrieving the information explicitly with
     dmesg or syslogk). This alternative gives accurate information but
     is more work.

  3. using the standalone bogomips program. This is only recommended for
     non-Linux system, for reasons pointed out below.

  A non-determinative alternative, which is also applicable for non-
  Linux systems such as Crays and so, may be the standalone BogoMips
  program. From the readme file by Jeff Tranter, jeff_tranter@mitel.com:


       `Tired of rebooting your system so you can see how many
       BogoMIPS it's running at today?  [...] "Bogomips" is a stan-
       dalone program that displays your system performance using
       one of the world's most recognized benchmarks.  It uses the
       same code that is used in the Linux kernel while booting,
       but runs as a user program. [...] Version 1.3 of BogoMIPs is
       now portable and should run on any system that supports an
       ANSI C compiler and library.'


  Note that due to system load values calculated with the standalone
  program on Linux systems may be lower than registered in the list
  below. Intrinsically the standalone cannot give precisely similar
  information to the boot sequence BogoMips, since system load will
  compete with this program run by an ordinary user.  Therefore only
  boot sequence BogoMips ratings are listed below.

  Be aware that the file
  sunsite.unc.edu:/pub/Linux/system/status/bogo-1.2.tar.gz/ contains the
  latest version 1.3 (sic), which is yet rather outdated.  Nonetheless,
  due to its good portability, it should compile and run on nearly every
  system with a C compiler.



  2.4.  Variations in BogoMips rating

  >From Linus Torvalds, torvalds@cc.helsinki.fi, explaining about the
  variation one may see in the BogoMips rating, in c.o.l.development, at
  28 April 1994


       `The BogoMips calculation loop is "quantizised", so you're
       most likely to get the exact same number all the time.  You
       usually will get different numbers only if the speed is just
       on the "edge", when small variations (different time for
       interrupt ticks etc) will make it jump from one value to the
       other.'


  If a kernel is not compiled specifically for the pertaining CPU, also
  some (even large) variations of the BogoMips ratings can occur, mainly
  due to erroneous alignment. This problem apparently only occurs on the
  various x86 CPUs (Intel and clones). Fortunately it can easily be
  solved: recompile the kernel specifically for your CPU.

  Note that the BogoMips algorithm, contrarily to popular believe, did
  NOT change significantly over the various kernel versions.


  2.5.  BogoMips ... failed

  Suggested by various questions on the net and private mail, e.g., by
  Lily, lbliao@alumni.caltech.edu, and by Pierre Frenkiel,
  frenkiel@cdfap2.in2p3.fr. In March 1995 they asked:


       `When I boot Linux I get the message:

             Calibrating delay loop.. ok - 23.96 BogoMips
             failed


       Where/why has the calibration delay loop failed?'


  It didn't fail. If it had failed the text would have been


             Calibrating delay loop.. failed



  What likely did fail was a driver for some gadget which you may not
  have in your machine. Just after calculating the BogoMips rating all
  device drivers are initiated.  First the SCSI devices, then Net
  devices, etc.  Any failure is duly reported. Noteworthy is the AHA152x
  driver. Other effects of failing drivers (and not of failing BogoMips
  calculations) are systems crashes, long waits, and complete system
  locks, somewhere close to (just before or just after) outputting the
  ok - xx.xx BogoMips text.

  Since Linux 1.2 many error messages have improved, so upgrade to at
  least that version to find out which particular driver it is that is
  failing. Also recompile the kernel to only include the drivers that
  are actually needed for your hardware configuration.



  2.6.  What about clone CPUs (Cyrix, NexGen, AMD, etc)

  Cyrix 486-like CPUs need cache enabling software, sometimes referred
  to as BogoBoost software. Cyrix 5x86 and 6x86 CPUs may have their
  BogoMips improved drastically by branch-prediction (BIOS option). Note
  that the performance improvement may be marginal. There are several
  packages available for adjusting Cyrix CPUs, such as the bogoboost
  patch, cx5x86mod, and set6x86, all from the normal archives, in
  obvious places. It is reported the Cyrix 6x86 CPUs may give better
  performance when the kernel is compiled with 486-optimization, instead
  Pentium-optimization.

  NexGen 386-enhanced CPUs, marked as Nx586, are listed as 386-like,
  since the fact that they are performing like Pentium machines is not
  relevant to BogoMips.

  AMD 5x86, also denoted as AMD 486DX5, are quadrupled 486/33 machines.
  They are fully in line with other 486 CPUs. The AMD K5 and the K6 are
  Pentium-like CPUs, with their own BogoMips multipliers.



  2.7.  Why to pay attention to BogoMips

  Let me add that there are only two reasons for paying attention to the
  BogoMips rating that is presented on booting Linux:


  1. To see whether it is in the proper range for the particular
     processor, its clock frequency, and the potentially present cache.
     Many CPUs are prone to faulty setups of

  o  memory cache setting (write-back is wrong for BogoMips, often
     reported lower than 5; write-through is ok)

  o  turbo-buttons (should be ON)

  o  BIOS-software emulated fake cache (change it for real cache)

  o  similar cache and clock related things, sometimes also BIOS-
     software related

  2. To see whether your system is faster than mine. Of course this is
     completely wrong, unreliable, ill-founded, and utterly useless, but
     all benchmarks suffer from this same problem. So why not use it?
     This inherent stupidity has never before stopped people from using
     benchmarks, has it? :-)

  Note that more serious uses for real benchmarking are addressed in the
  Linux Benchmarking Howto by Andr D. Balsa.



  3.  Compilation of ratings

  The following table gives some reported BogoMips ratings for various
  systems (more than 1000 entries by more than 800 different persons,
  from about 50 different countries. Note that the ratings here are from
  the actual Linux booting sequence, except of course for the section on
  Non-Linux Systems.


  3.1.  Oddly or faultly configured 386 systems


     System              BogoMips  Reporter
     386DX/16 387 nocache   0.57   H. Peter Anvin <hpa@nwu.edu>
     386DX/25               0.82   P Wright <philip.wright@purplet.demon.co.uk>
     386DX/25 nocache       1.03   Mark A. Horton <mahmha@crl.com>
     386SX/16               1.5    Stefan Kromer <sk@galaxy.sunflower.sub.org>
     386SX/16               1.6    Bill Davidsen <davidsen@tmr.com>
     386SX/20               1.87   Paul C. Dulany <pcdulany@wam.umd.edu>
     386SX/20               2.45   Roger Harkess <roger@visi.com>
     386DX/25(?) 128c       6.03   Chuck Meo <meo@solbourne.com>
     386DX/20              13      Ed Runnion <erunnio@hubcap.clemson.edu>



  3.2.  Normal 386 systems: SX, DX, Nexgen



     System              BogoMips  Reporter
     386SX/8 undercl        1.04   Andrew Costa <c_chaos@wahnapitae.on.ca>
     386SX/12               1.78   Klaus Kettner <kk@sesom.de>
     386SX/16               1.99   James Vahn <jvahn@short.circuit.com>
     386SX/16 Packard Bell  2.05   <root@Belvedere\%hip-hop.suvl.ca.us>
     386SX/16               2.09   David E. Fox <dfox@belvedere.sbay.org>
     386SX/16               2.15   W Stevens <wgsteven@math.uwaterloo.co>
     386SX/16               2.2    Lech Marcinkowski <puolalm@tekla.fi>
     386SX/16               2.23   Andrew Bulhak <acb@yoyo.cc.monash.edu.au>
     386SX/16               2.23   Steven M. Gallo <smgallo@cs.buffalo.edu>
     386SX/16               2.34   Kevin Burtch <kburtch@pts.mot.com>
     386SX/16 turbo         2.38   Andrew Haylett <ajh@gec-mrc.co.uk>
     386SX/16 0c            2.43   Adam Clarke <adamc@loose.apana.org.au>
     386SX/16               2.49   Waymon <waymon@pacifier.com>
     386SX/20               2.7    Alex Strasheim <astrashe@nyx.cs.du.edu>
     386SX/20               2.70   J.L. Brothers <brothers@halcyon.com>
     386SX/20               2.89   Anders Stenback <stenback@hehe.com>
     386SXL/25 AMD          2.9    Vaughan R. Pratt <pratt@sunburn.stanford.edu>
     386SX/25 AMD 0c        3.06   K.J. MacDonald <kenny@festival.ed.ac.uk>
     386SX/25 AMD           3.38   Hamish Coleman <hamish@zot.apana.org.au>
     386SX/25 0c            3.52   Rogier Wolff <r.e.wolff@et.tudelft.nl>
     386SL/25 Intel         3.57   S Harris <harris@teaching.physics.ox.ac.uk>
     386SX/25 AMD           3.62   S Harris <harris@teaching.physics.ox.ac.uk>
     386SXL/25 AMD 0c       3.71   David E.A. Wilson <david@cs.uow.edu.au>
     386SX/25 Intel         3.92   Yves Bellefeuille <yan@storm.ca>
     386SX/33 Intel         4.06   Kenneth J. Hoover <ken@psuedvax.psu.edu>
     386SX/33               4.71   Alexander Komlik <apkom@l.ukrcom.kherson.ua>
     386SX/40 Intel 0c      6.03   Michael Kenyon <u3g12@keele.ac.uk>

     386DX/16               2.49   Mike <mike@emgee.demon.co.uk>
     386DX/20 Intel         3.0    Malcolm Reeves <reeves@rocky1.usask.ca>
     386DX/20 Intel         3.08   Si. Harris <harris@teaching.physics.ox.ac.uk>
     386DX/20 Nec Powermate 3.22   David J Dawkins <davidd@isl.co.uk>
     386DX/20 Micronics     3.25   M Haardt <u31b3hs@informatik.rwth-aachen.de>
     386DX/20               3.67   Joost Helberg <jhelberg@nlsun8.oracle.nl>
     386DX/25               3.91   Ian McCloghrie <imcclogh@cs.ucsd.edu>
     386DX/25               3.95   Grant Edwards <grante@aquarius.rosemount.com>
     386DX/25 0cache        3.96   J.O. Williams <jow@techbase.com>
     386DX/25 32cache       4.53   J.M.A. Lahtinen <jmalahti@klaava.Helsinki.FI>
     386DX/33               5.86   Tim Lacy <timla@microsoft.com>
     386DX/33 64cache       5.99   Lars Wirzenius <wirzeniu@kruuna.Helsinki.FI>
     386DX/33 Intel         5.99   Harri Pasanen <hpasanen@cs.hut.fi>
     386DX/33 no387         6.03   Joel B.Levin <levin@bbn.com>
     386DX/33 387           6.03   Peter Bechtold <peter@fns.greenie.muc.de>
     386DX/40               6.21   J.L. Brothers <brothers@halcyon.com>
     386DX/33               6.46   Dennis Robinson <djrobins@uxa.cso.uiuc.edu>
     386DX/33               6.5    Dean Nelson <deannelson@aol.com>
     386DX/33 387 256cache  6.65   Wim van Dorst <baron@clifton.hobby.nl>
     386DX/33               6.65   Rick Lim <ricklim@opus.freenet.vancouver.bc.ca>
     386DX/33               6.7    Craig Hagan <hagan@cih.com>
     386DX/40               6.99   Ken Wilcox <wilcox@math.psu.edu>
     386DX/40 AMD           7.76   Joe Phillips <rchandra@letter.com>
     386DX/40 AMD           7.10   Kerry Person <kperson@plains.NoDak.edu>
     386DX/40               7.10   D. Bikram Singh <a336dhal@cdf.toronto.edu>
     386DX/40 128cache      7.23   Julian Francis Day <jfd0@aber.ac.uk>
     386DX/40 bogoboosted   7.23   Pat St Jean <stjean@math.enmu.edu>
     386DX/40 AMD 128cache  7.23   R.Bergs <rabe@akela.informatik.rwth-aachen.de>
     386DX/40 slow DRAM     7.26   John Lockwood <lockwood@pan.vlsi.uiuc.edu>
     386DX/40 128c          7.29   Karsten Friese <ftdkafr@ftd.ericsson.se>
     386DX/40               7.29   E.C. Garrison <ericg@nickel.ucs.indiana.edu>
     386DX/40               7.29   Darin Cowan <cowan@rubicon.org>
     386DX/40               7.29   Bonne van Dijk <bonne@cs.utwente.nl>
     386DX/40 AMD           7.76   Todd Lindner <tlindner@panix.com>
     386DX/40               7.76   Bear Giles <bear@indra.com>
     386DX/40 AMD 387 64c   7.91   <wires@gnu.ai.mit.edu>
     386DX/40               7.98   Frank Pilhofer <fp@informatik.uni-frankfurt.de>
     386DX/40 64c           7.98   Dean Junk <dpjunk@mm.com>
     386DX/40 AMD 32c       7.98   Tommy Olsen <tommyo@ifi.uio.no>
     386DX/40 AMD           7.98   James Reith <reith@racores.com>
     386DX/40               7.98   Aaron T. Baldie <atb@u.washington.edu>
     386DX/40 128c          7.98   John Pate <jpate@easynet.co.uk>
     386DX/40               7.98   Christian Nelson <cnelson@csugrad.cs.vt.edu>
     386DX/40               7.98   Alan Peckham <peckham@drei.enet.dec.com>
     386DX/40               8.06   Michael Guslick <michaelg@alpha2.csd.uwm.edu>
     386DX/40               8.06   Richard Brown <brown@midget.towson.edu>
     386DX/40               8.06   Bill G. Bohling <bs146@tali.uchsc.edu>

     Nx586/90 NexGen       67.44   <root@wgw.mnsinc.com>
     Nx586/90 NexGen       67.44   Robert Gehring <rag@cs.tu-berlin.de>
     Nx586/90 NexGen       67.48   David G. Eckard <dgeckard@eos.ncsu.edu>
     Nx586/100 NexGen      74.34   Cameron L. Spitzer <cls@truffala.sj.ca.us>
     Nx586/100 NexGen 256c 74.56   Marius Groenendijk <marius@cray-systems.lu>
     Nx586/110 NexGen 256c 81.51   Michael J. Micek <mmicek@muddcs.cs.hmc.edu>
     Nx586/110 NexGen      81.51   Ron Marsh <rmarsh@plains.nodak.edu>



  3.3.  Oddly or faultly configured 486 systems



     System              BogoMips  Reporter
     486DX/33 0c            1.45   Mark Gray <vatavian@gvu1.gatech.edu>
     486SL/25 0c            1.95   Paraskevas Evripidou <skevos@seas.smu.edu>
     486DLC/40 0c           2.45   S.Schendel <sschend@magnus.acs.ohio-state.edu>
     486DX/33 128c          2.94   P.J. Nefkens <p.nefkens@student.utwente.nl>
     486DX4/120 AMD         3.04   Andrew Steinbach <stei0113@maroon.tc.umn.edu>
     486DX5/133 AMD         3.05   Eric Hagen <ehagen@hawaii.edu>
     486DX4/100 Cyrix       3.06   Stuart Harvey <sharvey@primenet.com>
     486DX5/133 AMD         3.06   Charles Galpin <chg@severn.wash.inmet.com>
     486DX4/100             3.06   Bear Giles <bear@indra.com>
     486DX2/80              3.08   Gerald E. Butler <gbutler@phoenix.kent.edu>
     486DX4/120 AMD         3.08   Charles Hines <chuck_hines@vnet.ibm.com>
     486DX4/66 256c         3.10   Riccardo Capella <mc8508@mclink.it>
     486DX4/100 wb-cache    3.10   Paul Close <pdc@sgi.com>
     486DX4/120             3.13   Brian Perkins <bperkins@netspace.com>
     486DX4/120 AMD         3.15   <eruston@net2.intserv.com>
     486DX4/100             3.17   Thomas Sudbrak <sudbrak@borneo.gmd.de>
     486SLC2/50 Cyrix       3.30   Colin J. Wynne <cwynne@sage.wlu.edu>
     486DX/33               3.61   Marten van de Laan <marten@cs.rug.nl>
     486DX/33 noturbo       3.61   Dimitris Evmorfopoulos <devmorfo@mtu.edu>
     486DX4/120             3.74   Brian Wheeler <bdwheele@indiana.edu>
     486DX4/120 AMD         3.74   Frank Pilhofer <fp@informatik.uni-frankfurt.de>
     486DX4/100 Cyrix 256c  4      Joel Kelso <joel@cs.murdoch.edu.au>
     486DX/33 256c noturbo  4.25   Wouter Liefting <wlieftin@cs.vu.nl>
     486DX/33               4.66   Mark Gray <vatavian@gvu1.gatech.edu>
     486Rx2 Cyrix 25/50     4.85   <cosc19v2@menudo.uh.edu>
     486SX/33 noturbo       5.21   Scott D. Heavner <sdh@fishmonger.uucp>
     486DX2/66 overdrive    5.37   Jeremy Orr <jeremy@careercenter.sfsu.edu>
     486DX/33               5.66   Ryan Tucker <rtucker@ttgcitn.com>
     486DX2/66              5.88   P.J. Nefkens <p.nefkens@student.utwente.nl>
     486DX4/100             5.94   Howard Goldstein <hg@n2wx.ampr.org>
     486DX4/100 AMD         5.94   Mr Pink <vince@dallas.demon.co.uk>
     486DX4/100 notebook    6.55   Thomas <tom@dirac.physik.uni-konstanz.de>
     486DX4/100 notebook    6.55   Hugh McCurdy <hmccurdy@ix.netcom.com>
     486SLC Cyrix           7      Pieter Verhaeghe <pive@uia.ac.be>
     486SX/33               7.84   Paul Hedderly <prh6@unix.york.ac.uk>
     486DLC/40              7.98   Wil Cromer <nwc2@Ra.MsState.Edu>
     486DX/33 256c          8.27   Rohan Tronson <rohan@kihi.com.au>
     486DX4/100            11.11   NN <usenet@uxmail.ust.hk>
     486DX4/100            11.3    Earl Gooch <egooch@mc.com>
     486/66 Cyrix          13.02   Mike Baptiste <baptiste@bnr.ca>
     486SLC2/25            14.6    Vaughan R. Pratt <pratt@Sunburn.Stanford.EDU>
     486DX2/66 laptop      14.46   Robert Knop <rknop@netcom.com>
     486SLC2/66            18.94   <root@avalon.net>
     486DX/33 turbo        19.98   C Vetter <cbvetter@informatik.th-darmstadt.de>
     486DX4/75             21.5    Theo Scott <rkwtgs@pukrs3.puk.ac.za>
     486DX4/75             24.13   Sherman Hsieh <shieh@csua.berkeley.edu>
     486DX2/58             26.3    Vassili Leonov <leonov@iedv7.acd.com>
     486DX4/100 overclock  28.67   Theo Scott <rkwtgs@pukrs3.puk.ac.za>
     486DX2/80             36      Mark Lee <mlee@heartlab.rri.uwo.ca>
     486DX2/80             50.08   Mark Lee <mlee@heartlab.rri.uwo.ca>
     486DX4/100            60      Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
     486DX2/100 overclock  60.45   Tony D Shan <tdsst9+@pitt.edu>
     486DX5/133 AMD        75.40   Jeff Hyche <jwhyche@scott.net>
     486DX5/133 AMD        80.08   NN <guesta@slip-29-7.ots.utexas.edu>
     486DX5/133 AMD        87      John Wiggins <jwiggins@comp.uark.edu>



  3.4.  Normal 486 systems



     System             BogoMips   Reporter
     486SX/20 DECpc         9.98   Thomas Pfau <pfau@cnj.digex.com>
     486SX/25              12.24   M. Buchenrieder <mibu@scrum.greenie.muc.de>
     486SX/25              12.3    Darren McKay <e9bh@unb.ca>
     486SX/25              12.42   Mark R. Lindsey <mlindsey@nyx.cs.du.edu>
     486SX/25              12.42   Samuel Thibault <samuel.thibault@fnac.net>
     486DX/25              12.5    Phillip Hardy <phillip@mserve.kiwi.gen.nz>
     486SX/25              12.52   Emmanual Emore <emor7672@elan.rowan.edu>
     486DX/33 256c         16.33   Eric Kemminan <ekemmina@pms709.ms.ford.com>
     486DX/33              16.35   Christopher L. Morrow <cm43@andrew.cmu.edu>
     486DX/33              16.43   Rob Janssen <pe1chl@amsat.org>
     486DX/33 64cache      16.44   H. Peter Anvin <hpa@nwu.edu>
     486DX/33 256c DIY     16.44   Wouter Liefting <wlieftin@cs.vu.nl>
     486DX/33 Intel 128c   16.44   Rafal Kustra <g1krakow@cdf.toronto.edu>
     486DX/33              16.5    Alex Freed <freed@europa.orion.adobe.com>
     486DX/33              16.6    Vaughan R. Pratt <pratt@Sunburn.Stanford.EDU>
     486DX/33 noturbo      16.61   C Vetter <cbvetter@informatik.th-darmstadt.de>
     486DX/33              16.61   Jeffrey L. Newbern <jnewbern@athena.mit.edu>
     486DX/33              16.61   Giuseppe De Marco <gdemarco@freenet.hut.fi>
     486DX/33              16.61   M Heuler <heuler@informatik.uni-wuerzburg.de>
     486DX/33              16.61   Frank Lofaro <ftlofaro@unlv.edu>
     486SX/33              16.64   Jacob Papenfuss <webmaster@the-corridor.com>
     486SX/33              16.64   Samuel Thibault <samuel.thibault@fnac.net>
     486DX/33              16.77   Donald Lewis <dlewis@jackson.freenet.org>
     486DX/33              16.77   Stephan Boettcher <staphan@alzt.tau.ac.il>
     486DX/33 256c         16.77   David Manchester <mustang@tartarus.uwa.edu.au>
     486DX/40              19.8    Jose Calhariz <cal@minerva.inesc.pt>
     486DX/40              19.91   M Heuler <heuler@informatik.uni-wuerzburg.de>
     486DX/40              19.96   David A. Ranch <dranch@ecst.csuchico.edu>
     486DX/40 AMD          19.97   M Haardt <u31b3hs@informatik.RWTH-Aachen.DE>
     486DX/40 Intel        19.97   Paul van Spronsen <vspr@teppic.sun.ac.za>
     486DX/40              19.97   Ulf Tietz <ulf@rio70.bln.sni.de>
     486DX/40              19.97   <Eberhard_Moenkeberg@p27.rollo.central.de>
     486DX/40              19.97   Zoltan Lajber <lajbi@lajli.gau.hu>
     486DX/40              19.97   Wim van Dorst <baron@wiesje.hobby.nl>
     486DX/40 AMD          20      Chuck Munro <chuckm@canada.hp.com>
     486DX/40 AMD          20.09   Pieter Eendebak <peendebak@bbsw.idn.nl>
     486DX/50              24.48   Arnd Gehrmann <arnd@rea>
     486DX/50 AMD          24.85   Klaas Hemstra <hst@mh.nl>
     486DX/50 DTK          24.85   Randolph Christophers <randyc@lna.oz.au>
     486DX/50              24.85   Kevin Lentin <kevinl@bruce.cs.monash.edu.au>
     486DX2/50             24.85   Jason Matthew <jmatthew@kn.pacbell.com>
     486DX2/50             24.85   Gregory P. Smith <smithgr@cs.colorado.edu>
     486DX/50 VLB          24.97   Tom Miller <tvtom@en.com>
     486DX/50              24.99   Jeff <css@erols.com>
     486DX/50 Intel 256c   24.99   Mike <mike@emgee.demon.co.uk>
     486DX/50              25      Robert Herzog <rherzog@rc1.vub.ac.be>
     486DX2/50             25      M. Abrahamsson <swmike@uplift.df.lth.se>
     486DX2/50             25.0    Christian Holtje <choltje@ux1.cso.uiuc.edu>
     486DX2/50 DECpc       25.04   Thomas Pfau <pfau@cnj.digex.com>
     486DX2/50 Eisa        25.04   John Willing <willing@cimage.com>
     486DX2/50 256c        25.04   Zhou Yanmo <zhou@gauss.math.usf.edu>
     486DX/50              25.04   Michael Kress <kress@hal.saar.de>
     486DX2/50             25.04   Mats Wikholm <mwikholm@news.abo.fi>
     486DX2/50             25.04   Jean C Delepine <delepine@linux.u-picardia.fr>
     486DX/50              25.04   Jean C Delepine <delepine@linux.u-picardia.fr>
     486DX/50              25.04   Kevin Burtch <kburtch@pts.mot.com>
     486DX/50 notebook     25.04   Pierre Frenkiel <frenkiel@cdfap1.in2p3.fr>
     486DX/50              25.10   M Heuler <heuler@informatik.uni-wuerzburg.edu>
     486DX2/50             25.4    Brian Kennedy <bkenned@hubcap.clemson.edu>
     486DX2/66             32      Lee Sau Dan <h9210876@khuxa.hku.hk>
     486DX2/66             32.87   Samuel Thibault <samuel.thibault@fnac.net>
     486DX2/66             32.9    Frederick <niles@axp745.gsfc.nasa.gov>
     486DX2/66             33      Alec Muffett <alecm@uk-usenet.uk.sun.com>
     486DX2/66             33      NN <coolefa@pmifeg.com>
     486DX2/66             33      Steve Tinney <sjt@enlil.museum.upenn.edu>
     486DX2/66 Intel       33      Chuck Munro <chuckm@canada.hp.com>
     486DX2/66 VLB         33.0    Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
     486DX2/66 AMD         33.05   G. Skinner <gskinner@gwsunix1.crystalball.com>
     486DX2/66 VLB         33.18   Pablo Iranzo Gomez <iranzop@gong.ci.uv.es>
     486DX2/66 VLB         33.18   Dag Wieers <dag@digibel.be>
     486DX2/66             33.20   Arnd Gehrmann <arnd@rea.com>
     486DX2/66 Intel/PCI   33.22   C. Menke <carsten.menke@post.uni-bielefeld.de>
     486DX2/66             33.22   Brian Ricker <gt2327c@prism.gatech.edu>
     486DX2/66             33.22   Don Bennett < <don@engr.mun.ca>
     486DX2/66             33.22   Robert Heller <heller@cs.umass.edu>
     486DX2/66             33.22   Warwick Ward-Cox <wwar@lostlink.alt.za>
     486DX2/66             33.22   Chien-An Chen <giant@nwu.edu>
     486DX2/66 Eisa/VL     33.22   Serge <sviznyuk@magnus.acs.ohio-state.edu>
     486DX2/66 AMD         33.22   Wayne Robinson <wayner@renoir.cftnet.com>
     486DX2/66 Intel       33.22   Jim Barber <yeul@marsh.cs.martin.edu.au>
     486DX2/66             33.22   Tom Lowery <tlowery@mcs.kent.edu>
     486DX2/66             33.27   S Viznyuk <sviznyuk@magnus.acs.ohio-state.edu>
     486SX2/66             33.28   Jacob Papenfuss <root@the-corridor.com>
     486DX2/66             33.3    Devon Tuck <devon@netcom.com>
     486DX2/66 256cache    33.4    H. Peter Anvin <hpa@nwu.edu>
     486DX2/66             33.5    Jongyoon Lee <mr2@netcom.com>
     486DX2/66             33.5    Petrovsky Alexey <gong@cs.msu.su>
     486DX2/66             33.5    Sung Lee <slee2@umbc.edu>
     486DX2/66             33.55   Gene McCulley <mcculley@greatwall.cctt.com>
     486DX2/66             33.55   W. Zeilinger <wzeil@doradus.ast.univie.ac.at>
     486DX2/66             33.55   Donald Lewis <dlewis@jackson.freenet.org>
     486DX2/66             33.55   Eric Malkowski <malk@world.std.com>
     486DX2/66 0c          33.55   Chris Petit <mystere@ix.net.com>
     486DX2/66             33.55   <al-b@minster.york.ac.uk>
     486DX2/66             33.55   Jesper de Jong <jesper@cas.et.tudelft.nl>
     486DX2/66             33.55   John Paul Morrison <jmorriso@bogomips.com>
     486DX2/66             33.55   Arash <ei39594@ios.chalmers.se>
     486DX2/66             33.55   Ralph Lewis <rlewis@mail.wsu.edu>
     486DX2/66             33.55   Ulisses Alonso Camaro <alonso@bebe.uv.es>
     486DX2/66             33.55   Bussmann <bussmann@wolpi.infomatik.uni-bonn.de>
     486DX2/66 Intel/PCI   33.55   Louis J. LaBash <labash@lcjones.aclib.siue.edu>
     486DX2/66 Intel       33.55   Andrew Tubbiolo <enigma@seds.lpl.arizona.edu>
     486DX2/66             33.55   W Fink <werner.fink@physik.uni-stuttgart.de>
     486DX2/66 ICL         33.55   Mathias Koerber <mathias@solomon.technet.sg>
     486DX2/66             33.55   Bill Pogue <gwp@dithots.dithots.org>
     486DX2/66 256c        33.58   Theo Scott <rkwtgs@pukrs3.puk.ac.za>
     486DX2/66             33.7    C Triantafillou <triant@pegasus.montcleair.edu>
     486DX2/66 256c Intel  33.81   S Harris <harris@teaching.physics.ox.ac.uk>
     486DX2/66             33.9    Magnus Back <erambk@eraj.ericsson.se>
     486DX2/66 notebook    33.9    Robert A Knop <rknop@mop.caltech.edu>
     486DX2/66             34.06   Al Clark <aclark@netcom.com>
     486DX4/75             37.47   G Asmundarson <grettir@wordperfect.com>
     486DX2/80             39.83   Samuel Thibault <samuel.thibault@fnac.net>
     486DX2/80             39.93   Andrew Tubbiolo <enigma@seds.lpl.arizona.edu>
     486DX2/80 overcl/66   39.94   Mario L. Guttierez <mgutier@mentor.sdu.edu>
     486DX2/80 AMD         39.94   Corey D Brenner <brenner@umr.edu>
     486DX2/80             39.94   Dan Delaney <cgdela01@homer.louisville.edu>
     486DX2/80             39.94   D t Haar <danny@caution.cistron.nl.mugnet.org>
     486DX2/80 overcl      39.94   Peter Suetterlin <ps@kis.uni-freiburg.de>
     486DX2/80 overcl      39.94   Alex Montaron <canal@multimania.com>
     486DX2/80 AMD         39.94   JL Gomez <kitana!sysop@caprica.com>
     486DX2/80 AMD         39.94   Pete Krawczyk <pkrawczy@uiuc.edu>
     486DX2/80 AMD         40      Rene Baart <baart@simplex.nl>
     486DX2/80 AMD         40      Wolfgang Kalthoff <wo@rio70.bln.sni.de>
     486DX2/80             40.0    Rick Brown <ccastrb@prism.gatech.edu>
     486DX2/80 AMD         40.14   Jon Lewis <jlewis@inorganic5.chem.ufl.edu>
     486DX2/80 AMD         40.14   Richard S. Stone <rstone@edgp.com>
     486DX2/80             40.15   Oleg <oleg@hpcms.co.il>
     486DX2/80 AMD         40.18   Adri Verhoef <a3@a3.xs4all.nl>
     486DX2/80             40.18   Mats Andtbacka <mandtback@abo.fi>
     486DX2/100 AMD overcl 49.14   Jon Lewis <jlewis@inorganic5.chem.ufl.edu>
     5x86/100 AMD undercl  49.66   NN <root@tailor.aleim.net>
     486DX4/100            49.66   Pete Cervasio <cervasio@airmail.net>
     486DX4/100 256c       49.71   Lutz Pressler <lutz.pressler@med-stat.GWDG.de>
     486DX4/100            49.71   Brett Gersekowski <bgrerseko@powerup.com.au>
     486DX4/100 Intel 256c 49.77   Angelo Haritsis <ah@doc.ic.ac.uk>
     5x86/100 AMB undercl  49.77   Bernd Hentig <bernd.hentig@guug.de>
     486DX4/100            49.78   Aurel Balmosan <aurel@xylo.owl.de>
     486DX4/100            49.87   Chris Saia <minkie@concentric.net>
     486DX4/100            49.87   Aaron Brick <abrick@dcc.uchile.cl>
     486DX4/100            50      Donald Lewis <dlewis@jackson.freenet.org>
     486DX4/100            50.02   Peter Skov Knudsen <gogol@ask.diku.dk>
     486DX4/100            50.02   Shadow Weaver <djamison@students.wisc.edu>
     486DX4/100 AMD        50.3    Dave <shodan@shodan.clark.net>
     486DX4/100 AMD        50.04   Tony Smolar <asmolar@fast.net>
     486DX4/100            50.05   fredk <fredk@shadow.net>
     486DX4/100            50.06   Ronald Prague <ronp@fisnet.net>
     486DX4/100            50.08   Matt Gisher <matt@matt.fidalgo.net>
     486DX4/100            50.08   Steven A. Duchene <sduchene@cis.ysu.edu>
     486DX4/100            50.08   Miles O'Neal <meo@schoneal.com>
     486DX4/100            50.08   Will <zxmvg07@hp12.zdv.uni-tuebingen.de>
     486DX4/100            50.08   Piet de Bondt <bondt@dutiws.twi.tudelft.nl>
     486DX4/100 laptop     50.08   Karl Kleinpaste <karl_kleinpaste@cs.cmu.edu>
     486DX4/100 256c       50.08   Thomas Kanschik <y0000997@ws.rz.tu-bs.de>
     486DX4/100            50.08   Linas Vepstas <linas@fc.net>
     486DX4/100            50.08   Ed Daiga <daiga@engin.umich.edu>
     486DX4/100 notebook   50.08   Gerry Quejada <fd863@cleveland.freenet.edu>
     486DX4/100 AMD        50.08   B Schuller <schuller@ind136a.wi.leidenuniv.nl>
     486DX4/100            50.08   J.L. Brothers <brothers@halcyon.com>
     486DX4/100            50.08   David E.A. Wilson <david@cs.uow.edu.au>
     486DX4/100            50.08   Mark Lumsden <root@titan2.physics.mcmaster.ca>
     486DX4/100            50.08   Ashar <ashar@netcom12.netcom.com>
     486DX4/100            50.08   Jacob Waltz <waltz@pcjiw.lampf.lanl.gov>
     486DX4/100            50.08   Tom Sinclair <sinner@cafe.net>
     486DX4/100 AMD        50.08   G. Skinner <gskinner@gwsunix1.crystalball.com>
     486DX4/100 AMD        50.08   Nick Savoiu <nick@ritz.mordor.com>
     486DX4/100            50.08   Thomas J Fisher <twb5odt@nmia.com>
     486DX4/100            50.08   Pascal Pensa <pensa@aurora.unice.fr>
     486DX4/100            50.08   Julian Bradbury <julian@xabcs.demon.co.uk>
     486DX4/100            50.51   Frederic Potter <frederic@swing.ibp.fr>
     486DX4/100            50.66   Bill Stegers <bill_ste@zeelandnet.nl>
     486DX4/120 256c       59.1    Kevin <kalichwa@oakland.edu>
     486DX4/120 AMD        59.80   Mark Tranchant <mat92@ecs.soton.ac.uk>
     486DX4/120 AMD        59.80   Fred Broce <fbroce@atlanta.com>
     486DX4/120 AMD        59.90   Marko Ovaska <ovaska@cc.helsinki.fi>
     486DX4/120 AMD        59.80   Bob Purdon <bobp@mpx.com.au>
     486DX4/120 AMD        59.80   Pat Young <dice@netbsd.warped.com>
     486DX4/120            59.91   Will <zxmvg07@hp12.zdv.uni-tuebingen.de>
     486DX4/120 AMD 256c   60.01   Angelo Haritsis <ah@doc.ic.ac.uk>
     486DX4/120 overcl     60.45   Pascal Pensa <pensa@aurora.unice.fr>
     486DX4/120            60.45   Neal Howard <neal@metronet.com>
     486DX4/120 AMD        60.45   Oscar Belmar Madrid <obelmar@anakena.usach.cl>
     486DX4/120            60.45   Jason Buchanan <jsb@digistar.com>
     486DX4/120            60.45   Foersterling <dirk@informatik.uni-frankfurt.de>
     486DX4/120            60.45   Bernd Hentig <bernd@finow.snafu.de>
     5x86/133 AMD          66.15   NN <root@tailor.aleim.net>
     5x86/133 AMD          66.15   Brad Wilson <bwilson@deltanet.com>
     5x86/133 AMD          66.15   Paul S. Doyle <paul.doyle@mci.com>
     5x86/133 AMD          66.44   P Yli-Krekola <perttu@ntcmar01ba.ntc.nokia.com>
     5x86/133 AMD          66.44   V. Tailor <vtailor@ibm.net>
     5x86/133 AMD          66.55   Andrew B. Cramer <cramer@ripco.com>
     5x86/133 AMD          66.56   Bob Nielsen <nielsen@primenet.com>
     5x86/133 AMD          66.65   Geoff Raye <gtraye@igsrsparc2.er.usgs.gov>
     5x86/133 AMD          66.7    Klaas Hemstra <hst@mh.nl>
     5x86/133 AMD          66.80   N.N. <vp24njcb@ubvms.cc.buffalo.edu>
     5x86/133 AMD   256c   67.10   Vasily Lewis
     5x86/133 AMD          67.10   James Reith <reith@racores.com>
     5x86/133 AMD   256c   67.10   Yves Rougy <yrougy%siam@cal.fr>
     5x86/133 AMD   256c   67.10   Peter A. Koren <pkoren@lvdc20.dseg.ti.com>
     5x86/133 AMD   256c   67.10   Wim Joppe <joppe@xs4all.nl>
     5x86/133 AMD   256c   67.10   Gunnar Stefansson <gunnars@rhi.hi.is>
     5x86/133 AMD   256c   67.10   Vernard Martin <vernard.martin@cc.gatech.edu>
     5x86/150 AMD overcl   74.75   Sergio Riveros <riveros@musca.unm.edu>
     5x86/150 AMD overcl   74.75   Arthur K. Chan <artchan@cs.ucr.edu>
     5x86/160 AMD overcl   79.87   M.Suencksen <msuencks@techfak.uni-bielefeld.de>
     5x86/160 AMD overcl   79.87   J. Chris Hammond <cosmo@pcisys.net>
     5x86/160 AMD overcl   79.87   Bird Chen <luca@linux.taiwan.hp.com>
     5x86/160 AMD overcl   79.89   Geir Skaugen <geir.skaugen@energy.sintef.no>
     5x86/160 AMD overcl   79.89   Martin Vernon <martin@gw6hva.demon.co.uk>
     5x86/160 AMD overcl   79.92   T. Zerucha <zerucha@shell.portal.com>
     5x86/160 AMD overcl   80.36   Paul Colucci <pcolucci@acsu.buffalo.edu>
     5x86/160 AMD overcl   80.36   Steinar Haug <sthaug@nethelp.no>
     5x86/160 AMD overcl   80.36   James Daniel <triadmin@bga.com>
     5x86/160 AMD          80.36   David H.S. Oh <david@std.net>



  3.5.  Normal 486 variations: Cyrix/IBM, UMC


     System                BogoMips  Reporter
     486DLC/33                 9.42  Dennis Robinson <djrobins@uxa.cso.uiuc.edu>
     486DLC/33 387DX/40        9.47  Denis Solaro <drzob@vectrex.login.qc.ca>
     486DLC/33 Cyrix wb        9.5   M. Asplund <matt@xenon.cchem.berkely.edu>
     486DLC/33 Cyrix 386      11.2   Alex Freed <freed@europa.orion.adobe.com>
     486DLC/40 256c           11.33  Schendel <sschend@magnus.acs.ohio-state.edu>
     486Dx/40 Cyrix           11.73  Malcolm Bremer <malcolm@strw.LeidenUniv.nl>
     486DRx2/40 Cyrix         13.10  Christopher Lau <clau@acs.ucalgary.ca>
     486DX/33 Cyrix           13.21  M Haardt <u31b3hs@informatik.RWTH-Aachen.DE>
     486DLC/40 bogoboost      13.21  Harry Pasanen <ps@tekla.fi>
     486DLC/40 487 Cyrix      13.21  Ian A. Verschuren <iav@po.CWRU.Edu>
     486DCL Cyrix             13.3   Tracer Bullet P.I. <ges@earth.baylor.edu>
     486DLC/40                13.31  Adam Frampton <frampton@access2.digex.net>
     486DLC/40                13.31  Rick Chow <crc@cacs.usl.edu>
     486SLC-S/33              13.51  Brad Pepers <pepersb@cuug.ab.ca>
     486DLC/40 no Cxpatch     15.47  Sergei O. Naoumov <serge@envy.astro.unc.edu>
     486DLC/40 TI 128c        15.97  Philip K. Roban <phil@seal.micro.umn.edu>
     486DLC/40 Cyrix          15.97  L.J. LaBash <labash@lcjones.aclib.siue.edu>
     486DRx2/40               15.99  Christopher Lau <lauc@fusion.cuc.ab.ca>
     486DX2/66 IBM no-FF      19     NN <coolefa@pmifeg.com>
     486SLC2/66 IBM 64c       18.95  Sujat Jamil <sujat@shasta.ee.umn.edu>
     486SLC2/66 IBM 128c      18.95  Sujat Jamil <sujat@shasta.ee.umn.edu>
     486SLC2/66               19.02  Harry Mangalam <mangalam@uci.edu>
     486SLC/50                19.28  Sion Arrowsmith <sion@bast.demon.co.uk>
     486BL3/75 IBM 256c       21.40  Anders Stenback <stenback@kuai.se>
     486BL3/75 IBM 256c       21.50  Ming S. Chan <ming.chan@canrem.com>
     486DX2/66 Cyrix 128c     26.63  Derek Kwan <dkwan@zeus.UWaterloo.ca>
     486DX2/66 Cyrix          26.63  Adrian Parker <adrian@willen.demon.co.uk>
     486DX2-S/66 256c         26.63  Jean-Marc Wislez <JeanMarc.Wislez@rug.ac.be>
     486DX2/66 Cyrix          26.63  Curran W. Fey <fey@biotech.washington.edu>
     486BL3/100 IBM 256c      28.36  Anders Stenback <stenback@kuai.se>

     486SX-S/33 UMC 0c        20.20  Hynek Med <xmedh02@manes.vse.cz>
     486SX-S/40 UMC 0c        26.52  Hynek Med <xmedh02@manes.vse.cz>
     486SX-U5/40 UMC 0c       26.63  Dusan Mihajlovic <zdule@herkules.co.yu>



  3.6.  Oddly or faultly configured Pentium systems, or variations


     System                BogoMips  Reporter
     Pentium/66                2.18  Bob Myers <root@shyguy.lonestar.org>
     Pentium/90 notebook       9.5   Mark Maybee <markm@cs.colorado.edu>
     6x86/120 Cyrix           52.32  Joel Boring <dwild@eskimo.com>
     Pentium/83 Overdrive     82.85  Brian Smith <smithb@laraby.tiac.net>
     Pentium/83 Overdrive     83.32  Scott Francis <mord@netcom.com>
     Pentium/83 Overdrive     82.94  G. Spiegelberg <greg@owens.ridgecrest.ca.us>
     Pentium/83 Overdrive     83.35  Jacek Polewczak <jacek.polewczak@csun.edu>
     6x86/120 P120+overcl    104.86  Howard Poe <falcor@kingsnet.com>
     Pentium MMX/266         130.66  <yorkchan@hotmail.com>
     Pentium MMX/263 overcl  392.40  John Appleby <jma24@cam.ac.uk>
     AMD K6-2/300            399.95  Chris Ebenezer <chriseb@nortelworks.com>
     Pentium MMX/231         419.43  Juan Domenech <domenech@mail.seric.es>
     Pentium MMX/263 overcl  435.87  Juan Domenech <domenech@mail.seric.es>
     SMP4 Pentium Pro/200    700.13  R. Carrico <robert_carrico@themoneystore.com>



  3.7.  Normal Pentium systems



     System                BogoMips  Reporter
     Pentium/60               23     Chien-An Chen <giant@nwu.edu>
     Pentium/60               23.96  Joost Helberg <jhelberg@nlsun8.oracle.nl>
     Pentium/60               23.96  Ulf Tietz <ulf@rio70.bln.sni.de>
     Pentium/60 Gateway       23.96  Manoj Kasichainula <mvkasich@eos.ncsu.edu>
     Pentium/60               23.96  Pierre Frenkiel <frenkiel@cdfap1.in2p3.fr>
     Pentium/60               23.96  Tim Oosterbroek <tim@astro.uva.nl>
     Pentium/60 NCR 3455      24     Mathias Koerber <mathias@solomon.technet.sg>
     Pentium/60               24     Joe Sloan <jjs@engr.ucr.edu>
     Pentium/60               24.0   Mark H. Wood <mwood@indyvax.iupui.edu>
     Pentium/60               24.13  R.M. van Rijswijk <rijswijk@cs.utwente.nl>
     Pentium/66               25     Chuck Munro <chuckm@canada.hp.com>
     Pentium/66               26.63  Jason M. Naughton <jnaughto@ee.ryerson.ca>
     Pentium/66               26.84  Kelly Carmichael <kcarmich@cln.etc.bc.ca>
     Pentium/75 256c          29.5   Chris Dodd <cdodd@super.win.or.jp>
     Pentium/75               29.79  Scott M. Grim <sgrim@netwalk.com>
     Pentium/75               29.80  Torbjoern Kristoffersen <torbkris@online.no>
     Pentium/75               29.95  Steve Martin <smartin@mrg.uswest.com>
     Pentium/75               30.22  Zoran Marjanski <bagzor@enterprise.ca>
     Pentium/75               30.22  Andrew Buckby <c4ab1@dmu.ac.uk>
     Pentium/75               30.22  Stuart Nuttall <u9230106@sys.uea.ac.uk>
     Pentium/90 notebook      32.73  Rich Neves <neves@cs.colorado.edu>
     Pentium/83 overdrive     33.55  JCS <jean-claude.schwartz@contiteves.com>
     Pentium/90               34.07  A. Galbraith <ajgalb@postman.essex.ac.uk>
     Pentium/90 zappa 256c    35.6   Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
     Pentium/90               35.84  Jason Nunn <jsno@stormfront.com.au>
     Pentium/90               35.88  Joe Anderson <CPJJA@ttacs3.ttu.edu>
     Pentium/90               35.88  Warwick Allison <warwick@cs.uq.oz.au>
     Pentium/90               35.94  Erik Walthinsen <omega@teleport.com>
     Pentium/90               36     Joe Sloan <jjs@engr.ucr.edu>
     Pentium/90               36     Larry Auton <lda@nfa.research.att.com>
     Pentium/90               36     Richard Knipe <knipe@lobby.ti.com>
     Pentium/90               36.0   Werner Almesberger <almesber@lrc.epfl.ch>
     Pentium/90               36.06  Rob J. Nauta <rob@iaehv.nl>
     Pentium/90               36.08  Leung Hon Wa <cshwleun@cs.citu.edu.hk>
     Pentium/90 Zeos          36.08  Chris Laurel <claurel@mr.net>
     Pentium/90               36.08  Ronald Prague <ronp@fishnet.net>
     Pentium/90               36.08  Adrian Blues <adrian@hypereality.co.uk>
     Pentium/90               36.08  Pak Yin Tam "Fred" <ptam@eesun1.tamu.edu>
     Pentium/90               36.08  Jason Heiss <jheiss@cco.caltech.edu>
     Pentium/90               36.08  Tim Krantz <tek@dsinc.com>
     Pentium/90 Gateway       36.08  Pete Stewart <stewart@bae.bellcore.com>
     Pentium/90               36.08  Tom Manos <tmanos@infi.net>
     Pentium/90               36.08  Richard Mundell <R.Mundell@uea.ac.uk>
     Pentium/90               36.08  NN <usenet@uxmail.ust.hk>
     Pentium/90               36.08  Yavuz Batmaz <yavuzb@knidos.cc.metu.edu.tr>
     Pentium/90               36.08  Alan Skelley <askelley@gpu.srv.ualberta.ca>
     Pentium/90               36.08  Ralph Sims <ralphs@locus.halcyon.com>
     Pentium/90               36.08  Julian Bradbury <julian@xabcs.demon.co.uk>
     Pentium/90               36.08  Dan Langrill <langrlld@mussel.cig.mot.com>
     Pentium/90               36.08  Ravi Krishna Swamy <rkswamy@eos.ncsu.edu>
     Pentium/90               36.08  J.L. Brothers <brothers@halcyon.com>
     Pentium/90 Micronics     36.09  Andrew Brown <andrewbrown@acm.org>
     Pentium/90               36.27  Giao H. Phan <giao@concrete.resnet.upenn.edu>
     Pentium/90 Plato         36.4   Joe Valenzuela <smarm@ibm.net>
     Pentium/90               36.5   Mike Kelleher <mikejk@umfacad.maine.edu>
     Pentium/90               36.9   Ted Gaunt <tgaunt@pms701.pms.ford.com>
     Pentium/100 overcl       38.39  Stefan Onderka <stefan.onderka@metronet.de>
     Pentium/100              39.52  Adrian Blues <adrian@hypereality.co.uk>
     Pentium/100 overcl       39.73  Phil Howard <phil@clr.com>
     Pentium/100              39.73  <Peter.Weiss@informatik.uni-oldenburg.de>
     Pentium/100 0c           39.73  Jason Crawford <jasonc1@gramercy.ios.com>
     Pentium/100 overcl       39.83  Stefan Onderka <stefan.onderka@metronet.de>
     Pentium/100              39.93  Tom Miller <tvtom@en.com>
     Pentium/100 Cyrix        39.94  Mike Holland <myk@cygnus.uwa.edu.au>
     Pentium/100              39.94  KAZ Vorpal <kaz@upx.net>
     Pentium/100 overcl       39.94  Donar G.E. Alofs <donar@cs.vu.nl>
     Pentium/100              39.94  Larry Snyder <larry@trauma.iag.net>
     Pentium/100              39.94  Ian Hill <ian@hecate.phy.queensu.ca>
     Pentium/100              39.94  John Crawford <link@spu.edu>
     Pentium/100              39.94  Alexandre de Menezes <menezes@peta.com.br>
     Pentium/100              39.94  Jered <jered@mit.edu>
     Pentium/100 overcl       39.94  Ian <irs2@tweedledum.amp.york.ac.uk>
     Pentium/100              39.94  Brian McGhee <brianm@iceonline.com>
     Pentium/100              39.94  M Skjelland <morten.skjelland@pvv.unit.no>
     Pentium/100              39.96  Dan Kha <dkha@yorku.ca>
     Pentium/100              39.98  Phillipe Charon <charron@ecoledoc.ibp.fr>
     Pentium/100              40.03  <bon@elektron.ikp.physik.th-darmstadt.de>
     Pentium/100              40.08  Ronny Spiegel <rspiegel@htwm.de>
     Pentium/100              40.18  David Baldwin <davidb@exis.net>
     Pentium/100              40.18  <habibie@catevr.fiu.edu>
     Pentium/120 Cyrix        47.8   Simon Ho <simon@epsilon.win-uk.net>
     Pentium/120              47.82  Jorge Juan-Chico <jjchico@imse.cnm.es>
     Pentium/120 Cyrix        47.92  Joel N. Squire <squire@colorado.edu>
     Pentium/120              47.93  Umberto d'Ortona <umberto@grenet.fr>
     Pentium/120 Cyrix        47.93  Jim T. Polk <jtpolk@cris.com>
     Pentium/120              47.93  Jon Trowbridge <trow@mcs.com>
     Pentium/120              47.98  Craig Bates <cbates@psu.edu>
     Pentium/120              47.92   Aaron Brick <abrick@dcc.uchile.cl>
     Pentium/120 Cyrix        48     Steve <horne@mhd2.pfc.mit.edu>
     Pentium/120              48.00  Michael Wazenski <mwazenski@dsrnet.com>
     Pentium/120 Intel        48.02  Scott M. Grim <sgrim@netwalk.com>
     Pentium/120 Cyrix        48.27  Glenn T. Jayaputera <gjt@budgie.apana.org.au>
     Pentium/120              48.27  Roman Mitnitski <mitnits@shany.net>
     Pentium/120              48.27  Peter Walsh <pwalsh@rain.org>
     Pentium/120 Cyrix        48.2   Viznyuk <sviznyuk@magnus.acs.ohio-state.edu>
     Pentium/120              49.27  Simon Hargrave <simon@revell.demon.co.uk>
     Pentium/133              53.04  Wayne Roberts <wroberts@aug.com>
     Pentium/133              53.04  A.J. Wilson <wilston.austin.aj@bhp.com.au>
     Pentium/133              53.04  Gregory Travis <greg@indiana.edu>
     Pentium/133 overcl       53.04  A. Kunigelis <algikun@santaka.sc-uni.ktu.lt>
     Pentium/133 Intel        53.04  Jimmie Farmer <calvin@malchick.com>
     Pentium/133              53.25  Chuck Mattern <cmattern@mindspring.com>
     Pentium/133              53.26  Glenn Holt <gholt@lsil.com>
     Pentium/133              53.26  Heikki Levanto <heikki@lsd.ping.dk>
     Pentium/133              53.26  Chaim Tarshish <chaim@ipl.med.nyu.edu>
     Pentium/133              53.26  Mitchell B. Hamm <hamm@one.net>
     Pentium/133              53.26  Donald Lewis <dlewis@jackson.freenet.org>
     Pentium/133              53.26  Jon Trowbridge <trow@kremlin.emccta.com>
     Pentium/133              53.26  Charny Peete Mitchell <cpmiche@eos.ncsu.edu>
     Pentium/133 256c         53.26  David Wuertele <dave@gctech.com>
     Pentium/133 256c         53.68  Guiseppe Miceli <ferdy@ccii.unipi.it>
     Pentium/133              53.68  Michael Kress <kress@hal.saar.de>
     Pentium/150 Intel        59.80  Joel D. Young <jdyoung@afit.af.mil>
     Pentium/150              60.01  Joost de Greef <joost@stack.nl>
     Pentium/150 overcl       60.21  Duarte Cordeiro <l38404@alfa.ist.utl.pt>
     Pentium/166              66.16  Pedro Soria-Rodriguez <sorrodp@wpi.edu>
     Pentium/166              66.35  K. Visweswaran <kviswesw@lehman.com>
     Pentium/166              66.36  T. Endo <enchan@trc.rwcp.or.jp>
     Pentium/166              66.44  Donald Lewis <dlewis@jackson.freenet.org>
     Pentium/166              66.76  F. Baitinger <baiti@herrenberg.netsurf.de>
     Pentium/166              67.10  Jon Trowbridge <trow@mcs.com>
     Pentium/166              67.10  Dylan <dylan@ert.com>
     Pentium/166 512c         67.10  Dirk Freese <freese@infra.de>
     Centaur C6/200           79.46  James Rotenberry <rotenber@jmr.lasx.com>
     Pentium/200              79.66  Piete Brooks <Piete.Brooks@cl.cam.ac.uk>
     Pentium/200              79.69  Timm Gleason <timm@bess.net>
     Pentium/200              79.89  Dave S. Baker <dave@acedia.demon.co.uk>
     Pentium/200              78.87  Nick D'Apice <ndapice@erols.com>
     Pentium/200              80.08  Anders Stenback <stenback@hehe.com>
     Pentium/200              80.08  Steve Freeland <sfreel@cs.mcgill.ca>
     Pentium/200              81.92  Steve Baur <steve@xemacs.org>
     Centaur C6-2/233        154.83  Joe Noble <noble@flashman.com>



  3.8.  Normal Pentium variations: Intel



     System                BogoMips  Reporter

     Pentium MMX/133         265.77  Ron Peters <rpeters@f15fast.al.intel.com>
     Pentium MMX/150         307.53  Sami Sihvonen <buggy@fix.no>
     Pentium MMX/166 notebk  331.75  n.n. <visionary@aura.title14.com>
     Pentium MMX/166         331.78  Rob Janssen <pe1chl@amsat.org>
     Pentium MMX/166         331.78  Dave Page <dave@vale-housing.co.uk>
     Pentium MMX/166         331.78  Matthew C. Sell <amtmcs@amsta.leeds.ac.uk>
     Pentium MMX/166         333.41  Sjoelie <patrick@sjoel.xs4all.nl>
     Pentium MMX/166         333.41  Viet Yen Nguyen <vt@multiweb.nl>
     Pentium MMX/166         333.41  Marcin Owsiany <porridge@lo4.ids.bielsko.pl>
     Pentium MMX/180         358.81  David Efflandt <efflandt@xnet.com>
     Pentium MMX/200         398.13  Andy Saunders <andi@numenor.oucs.ox.ac.uk>
     Pentium MMX/200         398.13  A. James Lewis <james@vrtx.net>
     Pentium MMX/200         398.13  Sean Horan <sean@psy.ed.asu.edu>
     Pentium MMX/200         398.19  Fabio Comolli <comolli@tin.it>
     Pentium MMX/200         398.95  Reinhold J. Gerharz <rgerharx@erols.com>
     Pentium MMX/200         398.95  Eric Beymer <beymer@soundex.com>
     Pentium MMX/200         398.95  Duane Steel <dsteele@direct.ca>
     Pentium MMX/200         398.95  <ndpilatz@undergrad.math.uwaterloo.ca>
     Pentium MMX/200         399.77  Wei-shi Tsai <perdita@dallas.crosswinds.net>
     Pentium MMX/200         400     Rob Jokinen <rjokinen@rt66.com>
     Pentium MMX/200         400.59  Paul Black <paul@darwin.demon.co.uk>
     Pentium MMX/200         400.59  Juho Cederstrom <cederstrom@kolumbus.fi>
     Pentium MMX/200         400.59  Bart <bart@aceonline.com.au>
     Pentium MMX/210 overcl  416.97  John Saunders <john@nlc.net.au>
     Pentium MMX/225 overcl  448.92  Ingo Reimann <reimann@uni-muenster.de>
     Pentium MMX/225 overcl  448.92  Mattias Hembruch <mghembru@ece.uwaterloo.ca>
     Pentium MMX/225 overcl  448.92  Larry Lade <lade@btigate.com>
     Pentium MMX/230 overcl  461.85  Rene Stanneveld <edge@huizen.nhkanaal.nl>
     Pentium MMX/233         463.67  Rui M.B. Machado <rui@nifdl7.fd.ul.pt>
     Pentium MMX/233         463.67  Rob Janssen <pe1chl@amsat.org>
     Pentium MMX/233         463.67  Jose Maria Perez Box <jmpbox@etsin.upm.es>
     Pentium MMX/233         465.31  Per Andersson <ppan@cntw.com>
     Pentium MMX/233         466.94  Eric George <ergeorge@worldnet.att.net>
     Pentium MMX/233         466.94  Van Overbruggen <marcel@johannes.iconnect.nl>
     Pentium MMX/233         466.94  Erwin Lubbers <erwin@box.nl>
     Pentium MMX/250 overcl  498.07  Maarten van Rossum <m@vr.xs4all.nl>
     Pentium MMX/266 overcl  525.93  Frank <r2@xs4all.nl>
     Pentium MMX/266         532.48  Wade Mealing <root@damage>
     Pentium MMX/290 overcl  581.63  Brian <eradicator@home.com>

     Pentium Pro/133         132.88  John D. Sundberg <jdsundberg@mmm.com>
     Pentium Pro/150         149.50  Rogier Wolff <wolff@bitwizard.nl>
     Pentium Pro/180         179.61  Chuck Fee <fee@ch4549.org>
     Pentium Pro/200         197.42  Michael Griffith <grif@cs.ucr.edu>
     Pentium Pro/200         197.42  Curtis Varner <carner@cs.ucr.edu>
     Pentium Pro/200         198.84  Erik Max Francis <max@alcyone.com>
     Pentium Pro/200         198.84  Marc Winkler <marcus@healthchex.com>
     Pentium Pro/200         199.04  V. Bostrom <Vareck_Bostrom@ccm.jf.intel.com>
     Pentium Pro/200         199.06  Justin Clancy <justin@hippos.demon.co.uk>
     Pentium Pro/200         199.06  Glenn Lamb <mumford@netcom15.netcom.com>
     Pentium Pro/200         199.06  Laszlo Herczeg <las@light-house.com>
     Pentium Pro/200         199.07  Stefan <boresch@schuber.u-strasbg.fr>
     Pentium Pro/200         199.07  Greg Fausak <lgfausak@august.com>
     Pentium Pro/200         199.07  Chris Jones <chris@planetsymphone.com>
     Pentium Pro/200         199.07  Matthew S. Crocker <matthew@crocker.com>
     Pentium Pro/200         199.95  Reinhold J. Gerharz <rgerharx@erols.com>
     Pentium Pro/200         200.32  Gil Megidish <gmegidis@ort.org.il>
     Pentium Pro/200         200.32  Jose Navarro <jnavarro@aoc.nrao.edu>
     Pentium Pro/200         200.32  <Eric_Zucker@om.hp.com>
     Pentium Pro/200         200.32  Wayne Scott <wscott@ichips.intel.com>
     Pentium Pro/200         200.32  Adrian L. Hosey <ahosey@cs.indiana.edu>
     Pentium Pro/233 overcl  234.43  S. Curtarolo <auro@spiro.fisica.unipd.it>

     Pentium II/233          233.47  Torbjoern Kristoffersen <torbkris@online.no>
     Pentium II/233          233.47  Sorin Mitran <mitran@irs.fzk.de>
     Pentium II/266          265.42  Jon Trowbridge <trow@kremlin.emccta.com>
     Pentium II/266          265.42  A. Hochwimmer <a.hochwimmer@auckland.ac.nz>
     Pentium II/266          265.42  Matt Garman <garman@ews.uiuc.edu>
     Pentium II/266          265.44  Nick Ullman <nick@avenza.com>
     Pentium II/266          266.24  Pieter Eendebak <p.t.eendebak@phys.uu.nl>
     Pentium II/266          267.06  James McKinnon <jmack@phys.ualberta.ca>
     Pentium II/266          267.06  Greg <gl2hughes@undergrad.math.uwaterloo.ca>
     Pentium II/266          267.06  Pros Robaer <pros@innet.be>
     Pentium II/266          272.79  Frank Hale <frankhale@worldnet.att.net>
     Pentium II/300 overcl   299.01  Martin Lathoud <nytral@endirect.qc.ca>
     Pentium II/300          299.83  Andy Busch <buschap@acs.wooster.edu>
     Pentium II/333          332.60  Eric Games <frequenc@laf.cioe.com>
     Pentium II/350          349.80  Rizzoli <rizzoli@planet.it>
     Pentium II/350          349.80  Jeff Bishop <jbish@airmail.net>
     Pentium II/400          396.49  Abhijit Menon-Sen <ams@wiw.org>
     Pentium II/400          398.13  Floris Martens <fmartens@bigfoot.com>
     Pentium II/420 overcl   416.15  Rafal <rafamiga@uucp.polbox.pl>
     Pentium II/448 overcl   447.28  Mathieu Bois <mathieu.bois@nomura.co.uk>
     Pentium II/450          447.28  Mathieu Bois <mathieu.bois@nomura.co.uk>
     Pentium II/450          447.28  Stuart Nuttall <stu@etcs.demon.co.uk>
     Pentium II/450          447.28  Richard R. Urena <urena@wilde.oit.umass.edu>
     Pentium II/450          447.28  Brantley Jones <bjones@cte.net>
     Pentium II/450          447.28  Esmail Bonakdarian <esmail@uiowa.edu>
     Pentium II/466          462.03  Bjorn Lindgren <bjorn@chiba.cx>
     Pentium II/504 overcl   502.99  David Hand <dhand@best.com>

     Celeron/300             299.83  Abhijit Menon-Sen <ams@wiw.org>
     Celeron/300             299.97  Helmut <helmut@cancon.com>
     Celeron/333             332.6   Florian <florian@egon-bbs.n-a-m.de>
     Celeron/333             330.96  Douglas E Harmon <genius91@gate.net>
     Celeron/366             367.00  Raul Belisario <storm@gold.com.br>
     Celeron/400             398.13  Polaris <polaris_c@my-deja.com>
     Celeron/466 overcl      462.03  Tim Moore <timothymoore@bigfoot.com>

     Pentium III/450         450.56  Rogier Spieker <rogier@metallica.com>
     Pentium III/500         498.00  Rajko Wehrhahn <seymour@link-c.cl.sub.de>
     Pentium III/500         499.71  Morris Walton <mccw@ipass.net>

  <sect1>Normal Pentium variations: Cyrix, AMD
  <p>
  <verb>
     System                BogoMips  Reporter

     Cyrix 5x86/100          100.16  NN <root@anxa04.cc.ic.ac.uk>
     Cyrix 5x86/100          100.19  Valient Gough <vgough@teton.mines.edu>
     Cyrix 5x86/100          100.47  C.Chan <chan@alfrothul.uchicago.edu>
     Cyrix 5x86/120 P150+    119.60  Wynstan Tong <wynstan@eecg.toronto.ca>
     Cyrix 5x86/120 P150+    119.60  Joel N. Squire <squire@colorado.edu>
     Cyrix 5x86/120 P150+    119.83  Leland Olds <olds@eskimo.com>
     Cyrix 5x86/120 P150+    119.83  NN <root@anxa04.cc.ic.ac.uk>
     Cyrix 5x86/120 P150+    120.68  C.Chan <chan@alfrothul.uchicago.edu>
     Cyrix 5x86/120 P150+    122.01  Andre Coetzee <acoetzee@ctcc.gov.za>

     Cyrix 6x86/100           99.42  Stig M. Valstad <svalstad@sn.no>
     Cyrix 6x86/110 P133+    109.77  Matthew Flint <matthew@philtrum.demon.co.uk>
     Cyrix 6x86/110 P133+    109.77  John Merriam <suprnaut@esslink.com>
     Cyrix 6x86/110 P133+    109.77  Keith Smith <keith@ksmith.com>
     Cyrix 6x86/120 P150+    119     Jean-Claude Gouiran <jcg13@ibm.net>
     Cyrix 6x86/120 P150+    119.60  Taso Lyristis <taso@remus.rutgers.edu>
     Cyrix 6x86/120 P150+    119.60  Hrvoje Stipetic <stipe@zemris.fer.hr>
     Cyrix 6x86/120          119.60  Yakko J. Warner <yakko@wtower.com>
     Cyrix 6x86/120 P150+    119.60  B. James Philippe <bryan@terran.org>
     Cyrix 6x86/120 P150+    119.83  Roger Merchberger <zmerch@northernway.net>
     Cyrix 6x86/120          119.83  Daniel Wold <danw@panix.com>
     Cyrix 6x86/120          120     John C. Beasley <beaslej1@nevada.edu>
     Cyrix 6x86/120 P150+    120.01  Jay Thorne <jay@result.com>
     Cyrix 6x86/120 P150+    120.01  Jeawan Kim <jaewan@harc.edu>
     Cyrix 6x86/120 P150+    120.91  Cymen <cymen@ziplink.net>
     Cyrix 6x86/133 undercl  132.30  Maurice Janssen <mauricej@xs4all.nl>
     Cyrix 6x86/133 P166+    132.71  Holger Kemper <hok@balu.ping.de>
     Cyrix 6x86/133 P166+    132.71  Hrvoje Stipetic <stipe@zemris.fer.hr>
     Cyrix 6x86/133 P166+    132.82  Alex Liffers <aliffers@tartarus.uwa.edu.au>
     Cyrix 6x86/133 P166+    132.82  Brian C. Theobald <theobald@nortel.ca>
     Cyrix 6x86/133 P166+    132.88  Alvaro Lopes <alvieboy@utad.pt>
     Cyrix 6x86/133 P166+    132.88  Craig Andersen <andersen@fastlane.net>
     Cyrix 6x86/133 P166+    133.73  C. Drews <drews_c@informatik.fh-hamburg.de>
     Cyrix 6x86/133 P166+    133.12  Daniel Gritter <dgritt47@calvin.edu>
     Cyrix 6x86/150 P200+    149.50  Evan L. Schemm <elschemm@mtu.edu>
     Cyrix 6x86/150 P200+    149.50  Steven Rainwater <srainwater@ncc.com>
     Cyrix 6x86/150 P200+    149.91  Sid Boyce <szb50@amdahl.com>
     Cyrix 6x86/150 P200+    149.91  Eric Haas <haas@andrew.cmu.edu>
     IBM 6x86/150 P200       149.96  M.D. Guardia <mikedg@ghostbbs.pandora.it>
     Cyrix 6x86MX/166 A-Step 166.71  David Anderson <rovaughn@infoave.net>
     Cyrix 6x86MX/188 P233   186.78  Dominic Baines <rdab100@hermes.cam.ac.uk>
     Cyrix 6x86MX/188 P233   187.19  Dominic Baines <rdab100@hermes.cam.ac.uk>
     Cyrix 6x86/225          223.28  Dean Mills <deanmills@home.com>
     Cyrix 6x86MII/233 P300  233.47  Russell Marks <rus@forfree.at>
     Cyrix 6x86MII/233 P300  233.47  S. Fuller <stu@c49395-a.wodhvn1.mi.home.com>
     Cyrix 6x86MX/300 overcl 280     Terry Porter <tjporter@odyssey.apana.org.au>

     AMD K5/75               149.91  Simon Karpen <slk@linux-shell.net>
     AMD K5/90               179.40  <root@krabi.mbp.ee>
     AMD K5/90               179.40  Ken Edwards <edwards@thor.xon.cuug.ab.ca>
     AMD K5/90               179.40  Marcin Owsiany <porridge@lo4.ids.bielsko.pl>
     AMD K5/90               179.81  Marcin Owsiany <porridge@lo4.ids.bielsko.pl>
     AMD K5/90               180.22  Hector DC Gonzalez <turbo@linux.lsl.com.mx>
     AMD K5/90               181.00  Drew Golden <golden@platinum.nb.net>
     AMD K5/100 PR133        198.66  Trond Solem <trond.solem@homemail.com>
     AMD K5/100 PR133        199.07  Henri Jamgotchian <hjamgot@planete.net>
     AMD K5/100 PR133        199.48  Dark Mind <root@dmh.ml.org>
     AMD K5/100 PR133        199.88  J. Grassel <grassel@heart.cas.und.nodak.edu>
     AMD K5/100 PR133        199.88  Berend Reitsma <berend@united-info.com>
     AMD K5/100 PR133        200.29  Tilman Sommer <sommer@vsun02.ag01.kodak.com>
     AMD K5/100 PR133        200.32  Carlo Politi <cpoliti@mare.gol.grosseto.it>
     AMD K5/100 PR133        199.07  Franco De Angelis <fda@ied.unipr.it>
     AMD K5/100 PR133        199.07  HaJo Simons <hajo@frodo.com>
     AMD K5/116 PR166        233.47  Hans-Joachim Baader <hans@grumber.ika.de>
     AMD K5/116 PR166        233.47  Sean Kelly <s.kelly@newcastle.ac.uk>
     AMD K5/120 PR133 overcl 239.21  Chris Harshman <harshman@paradigm.uor.edu>

     AMD K6-2/150 undercl    299.83  Alex Montaron <canal@multimania.com>
     AMD K6/166              332.60  David Parsons <orc@pell.chi.il.us>
     AMD K6/166              331     Bill Petersen <brp@cuberramp.net>
     AMD K6/200              398.85  n.n. <uh886@freenet.victoria.bc.ca>
     AMD K6/200              398.89  Ian Hanschen <hanschen@uwyo.edu>
     AMD K6/200              398.98  Philip Lijnzaad <lijnzaad@columba.ebi.ac.uk>
     AMD K6/200              399.77  Murtaza Amiji <murti@wpi.edu>
     AMD K6/200              399.78  Dan Hetzel <dan@icor.fr>
     AMD K6/200              400.58  Paco Culebras Amigo <paco@hades.udg.es>
     AMD K6/200              400.59  Sverre H. Huseby <s.h.huseby@usit.uio.no>
     AMD K6/200              400.59  Steve Conley <sconley@muck.leonine.com>
     AMD K6/200              400.59  Mark Lehrer <edge@dux.raex.com>
     AMD K6/200              400.59  Chris Esser <ksqueak@erols.com>
     AMD K6/200              400.59  Federico Pellegrin <fede@triangolo.it>
     AMD K6/200              400.59  Howard Poe <falcor@kingsnet.com>
     AMD K6/200              400.64  Fabrizio Santini <sanfff@tin.it>
     AMD K6/208 overcl       416.15  Jani Halme <jaadha@utu.fi>
     AMD K6/208 overcl       416.15  Donnie Savage <dsavage@cris.com>
     AMD K6/208              417.97  J.F. Ursetto <ursetto@uiuc.edu>
     AMD K6/225              440     n.n. <uh886@freenet.victoria.bc.ca>
     AMD K6/225 overcl       448.92  Paco Culebras Amigo <paco@hades.udg.es>
     AMD K6/225 undercl      448.92  Henrik Storner <storner@image.dk>
     AMD K6/225 overcl       450.56  M. Cramer <mccramer@stuttgart.netscape.de>
     AMD K6/233              463.67  Aduanne Carter <drow@blazenet.net>
     AMD K6/233              465.31  Michael Haardt <haardt@gmd.de>
     AMD K6/233              466.5   R. Garcia <rgarciaitt@aol.com>
     AMD K6/233 overcl       466.84  Francesco <root@fly.cnuce.cnr.it>
     AMD K6/233 overcl       466.94  Paco Culebras Amigo <paco@hades.udg.es>
     AMD K6/233              466.94  Howard Poe <hpoe@nyx.net>
     AMD K6/233              466.94  Andreas Haumer <andreas@xss.co.at>
     AMD K6/233              466.94  Damien Castelltort <eznerald@mail.mnet.fr>
     AMD K6/233              466.94  G. Cantallops Ramis <gcantallopsr@jet.se>
     AMD K6/233              466.94  Juergen Hammelmann <juergen@neptun.stgt.de>
     AMD K6/233              466.94  Chris Gushue <seymour@iname.com>
     AMD K6/239              478.41  Torbjoern Kristoffersen <torbkris@online.no>
     AMD K6/239              478.41  Mark Neill <btech@styx.phy.vanderbilt.edu>
     AMD K6/239              478.41  Louis van Dompselaar <etaoin@xs4all.nl>
     AMD K6/266              534.12  Andreas Czerniak <cognac@toppoint.de>
     AMD K6-2/300            598.02  Pasa Guglielmo <gpasa@omedia.ch>
     AMD K6-2/300 3D overcl  598.02  Jozsef <formater@eunet.yu>
     AMD K6-2/300            599.65  Ivo Plana <ipv@tinet.fut.es>
     AMD K6-2/300            599.65  Juan Domenech <domenech@mail.seric.es>
     AMD K6-2/300            599.65  Scrambo <pinche@my-deja.com>
     AMD K6-2/300            599.65  Ashley Penney <ashp@bastard.co.uk>
     AMD K6-2/300            599.65  Rob <im@home.com>
     AMD K6-2/300            599.65  Stephen Jenuth <jenuths@homacjen.ab.ca>
     AMD K6-2/308            614.40  Erv Walter <walter@chem.wisc.edu>
     AMD K6-2/333            663.55  <kuhn@ernie.lpr.e-technik.tu-muenchen.de>
     AMD K6-2/333            663.55  Sebastian <sebastian882@my-deja.com>
     AMD K6-2/333            665.19  A. Bihlmaier <stormtank@gmx.net>
     AMD K6-2/338 overcl     675.02  Nicola Fabiano <mx8644@mclink.it>
     AMD K6-2/350            699.60  Juan Domenech <domenech@mail.seric.es>
     AMD K6-2/350 3D         699.60  Mirko Schur <mschur@t-online.de>
     AMD K6-2/350 3D         699.60  D. Breuer <dirk.breuer@post.rwth-aachen.de>
     AMD K6-2/366            734.00  Alex Montaron <canal@multimania.com>
     AMD K6-2/366 3D overcl  734.00  Enrico Oreglia <oreglia@ibm.net>
     AMD K6-2/400 overcl     799.54  Ivo Plana <ipv@tinet.fut.es>
     AMD K6-2/400 overcl     799.54  Alex Montaron <canal@multimania.com>
     AMD K6-2/400 3D         799.54  Rajko Wehrhahn <seymour@link-c.cl.sub.de>
     AMD K6-2/400 overcl     801.18  Phillip Deackes <gsmh@gmx.net>
     AMD K6-2/400 overcl     801.18  Jon Riekenberg <jrr8208@ksu.edu>
     AMD K6-2/400 overcl     801.18  Ryan Bethke <immortal26@prodigy.net>
     AMD K6-2/400            799.54  Silvio Nordio <nordio@unive.it>
     AMD K6-2/400            799.54  Chris <cpr@intergate.bc.ca>
     AMD K6-2/400 3D         799.54  Hamid Misnan <hamidmisnan@ieee.org>
     AMD K6-2/400            801.18  Wolfgang Zekoll <wzk@um1.pce.de>
     AMD K6-2/400            801.18  Ignacio Valdes <ivaldes@csi.com>
     AMD K6-2/400            801.18  Ted E. Suter <nexion@home.com>
     AMD K6-2/400            801.29  Birko Bergt <birko.bergt@cdc.com>
     AMD K6-2/400 overcl     801.5   Juan Domenech <domenech@tarraco.seric.es>
     AMD K6-2/400            808.7   Bob <rebry@@atomicsys.com>
     AMD K6-III/417 overcl   833.95  Chris Priest <chris@idol.demon.co.uk>
     AMD K6-2/440            878.18  Steve Bourland <sbourlan@ecn.purdue.edu>
     AMD K6-2/450 overcl     901.12  Ted E. Suter <nexion@home.com>
     AMD K6-2/450 overcl     901.12  Juan Domenech <domenech@tarraco.seric.es>
     AMD K6-2/450            901.12  John Jaeger <john@jjgb.com>
     AMD K6-2/450            901.12  Piet Ekkebus <piet_e@zeelandnet.nl>
     AMD K6-2/453            902.30  Birko Bergt <birko.bergt@cdc.com>
     AMD K6-2/455 3D overcl  914.23  Graham Reed <grwr@ssm.ca>
     AMD K6-2/500            999.42  Jon Berlin <jberlin@worldbank.org>
     AMD K6-2/500 3D         999.42  Laurent <blackm@pop.multimania.com>

     AMD K7/500              498.07  Ludwig <cludwig@informatik.uni-tuebingen.de>
     AMD K7/550              548.86  Kieffer <Jerome.KIEFFER@crans.ens-cachan.fr>
     AMD Athlon/600          598.02  C. Heiming <heiming@informatik.uni-kl.de>
     AMD Athlon/600          598.02  Ted Michael <obliv10n@netscape.net>
     AMD K7/655              652.08  Mark Steele <msteele@belent.com>
     AMD Athlon/755          752.03  Mark Steele <msteele@belent.com>



  3.9.  Normal Alpha systems



     System             BogoMips  Reporter
     21064/150 Jensen        148.37  Linus Torvalds <torvalds@cc.helsinki.fi>
     21064/150 Jensen        149.49  J.L. Brothers <brothers@halcyon.com>
     21064/150 Jensen        148.89  Martin Osterman <ost@comnets.rwth-aachen.de>

     21064A/233 AS225 Avanti 228.58  Roverto Giungato <giungator@acm.org>
     21064A/275 Cabriolet    271.58  Michal Jaegermann <michal@phys.ualberta.ca>
     21064A/275 Cabriolet    272     Linus Torvalds <torvalds@cc.helsinki.fi>
     21064A/275              272     Stephen Gaudet <sjg@tiac.net>
     21064A/275 Cabriolet    272.63  Jay Estabrook <jestabro@amt.tay1.dec.com>
     21064A/275 Cabriolet    273.37  David Mosberger-Tang <davidm@cs.arizona.edu>
     21064A/275              274.11  Kevin Jacobs <jacobs@eek.cwru.edu>
     21064A/300 Cabriolet    298     Jay Estabrook <jestabro@amt.tay1.dec.com>
     21064A/300              298     Stephen Gaudet <sjg@tiac.net>

     21066/166               162.53  Phil Bostley <pbostley@qualcomm.com>
     21066/166               163.05  Matthew Jacob <mjacob@feral.com>
     21066/166               163.05  Jon Spreha <jxs557@psu.edu>
     21066/166               164.59  David Mosberger-Tang <davidm@cs.arizona.edu>
     21066/166 Multia        164.63  Rudolf Gabler <rug@usm.uni-muenchen.de>
     21066/166               165     Gareth Bult <gareth@ftech.net>
     21066/166               165.04  Craig Ruff <cruff@ncar.ucar.edu>
     21066/200               196.9   Danny ter Haar <danny@cistron.nl>
     21066/200 UDB overcl    198     Kari Davidsson <d154402@cs.tut.fi>

     21066A/233 UDB          229.63  Toon van der Pas <toon@vdpas.hobby.nl>
     21066A/233 AS400        230.16  Ophir Ronen <ophir@connectsoft.com>
     21066A/233 AS200 Avanti 230.16  B. James Phillippe <bryan@terran.org>
     21066A/233 NoName       230.67  T. Bogendoerfer <tsbogend@bigbug.franken.de>
     21066A/233 UDB          230.68  Ted Schipper <ted@tedux.hobby.nl>
     21066A/233 NoName       230.76  Mikael Nykvist <viper@ludd.luth.se>
     21066A/233 UDB          231.21  Eric Smith <eric@goonsquad.spies.com>
     21066A/233 NoName       231.21  Jay Estabrook <jestabro@amt.tay1.dec.com>
     21066A/266 NoName ov.cl 261.62  Andreas Johansson <ajo@ludd.luth.se>
     21066A/266 UDB overcl   261.62  Michael Brennen <mbrennen@fni.net>
     21066A/266 NoName ov.cl 262.14  Wim van Dorst <baron@clifton.hobby.nl>
     21066A/266 Multia       264     Joshua Grubman <joshg@dn.net>
     21066A/284 NoName ov.cl 281.0   <imakino@gloria.cord.edu>
     21066A/297 NoName ov.cl 293.6   <imakino@gloria.cord.edu>
     21066A/300 UDB ov.cl    294.65  Topi Kanerva <tkanerva@nks.oulu.fi>

     21164/266 EB164         265.29  Jay Estabrook <jestabro@amt.tay1.dec.com>
     21164/300 EB164         297.79  Hilarius <maurice@ellpspace.math.ualberta.ca>
     21164/300 XLT Alcor     297.79  Dave Wreski <dave@nic.com>
     21164/300 AS1000        297.79  Salvador Pinto Abreu <spa@sc.uevora.pt>
     21164/333 Alcor         331.35  Linus Torvalds <torvalds@cs.helsinki.fi>
     21164/333 Alcor         331.35  David Mosberger-Tang <davidm@azstarnet.com>
     21164/366 PC164 Durango 363.85  Geerten Kuiper <geerten@bart.nl>
     21164/433 PC164         429.89  Paul D. Robertson <proberts@clark.net>
     21164/433 PC164         429.91  Bernd Meyer <bmeyer@cs.monash.edu.au>
     21164/433 Maita         429.91  Bill Broadley <bill@math.ucdavis.edu>
     21164/433 PC164         430.96  <rainer.landes@physik.uni-karlsruhe.de>
     21164/433 EB164         430.96  <Metod.Kozelj@rzs-hm.si>
     21164/433 PC164         430.96  H. Sumargo <habibie@robotic.eng.fiu.edu>
     21164/433 PC164         431.94  Timm Gleason <timm@bess.com>
     21164/466 PC164         464.51  Daryll Strauss <daryll@d2.com>
     21164/500               497     Alex Butcher <alex@asimov.annex.co.uk>
     21164/500 PC164         497.02  C.J. Grayce <cgrayce@wasatch.ps.uci.edu>
     21164/500               497.05  Heiner Kruener <hk@martian.ping.de>
     21164/500 AS500         497.03  Jim Nance <jlnance@avanticorp.com>
     21164/500 P7            497.03  Jan guldentops <jacko@ba.be>
     21164/500 EB164 Durango 497.43  Kevin Jacobs <jacobs@eek.cwru.edu>

     21164A/500  PWS         497.02  Robert Harley <robert.harley@inria.fr>
     21164A/500  PC164       497.02  Stephen Oberski <sfo@deterministic.com>
     21164A/533  PC164LX     529.53  Dumb Kid <dumbkid@hotmail.com>
     21164A/533  PC164LX     529.53  Harvey J. Stein <hjstein@bfr.co.il>
     21164PC/533 PC164SX     529.53  Danny ter Haar <dth@cistron.nl>
     21164PC/533 PC164SX     529.53  Shane Sturrock <sss@holyrood.ed.ac.uk>
     21164PC/533 PC164SX     529.53  Wim van Dorst <baron@clifton.hobby.nl>
     21164A/533  Ruffian     530.57  Andreas Czerniak <cognac@toppoint.de>
     21164A/533  PC164LX     530.57  Ronny Ranerup <ronny@axis.com>
     21164A/533  PC164LX     530.57  Bill Broadley <bill@math.ucdavis.edu>
     21164A/600  PC164LX     595.59  L.F. Donaldson <donaldlf@cs.rose-hulman.edu>
     21164A/600  PC164LX     595.59  <stepan@wesley.informatik.uni-freiburg.de>
     21164A/600  PC164       597.60  Fabrizio Santini <sanfff@tin.it>
     21164A/666  PC164LX     662.70  <stepan@wesley.informatik.uni-freiburg.de>

     21264/400 Pass-1        794.82  Jay Estabrook <jay.estabrook@digital.com>
     21264/466 DS10          920.64  Paul Novarese <novarese@alf.dec.com>
     21264/500 XP1000        996     Wes Bauske <wsb@paralleldata.com>
     21264/500               996.14  Lionel Tricon <lionel.tricon@digital.com>
     21264/500 DS20          996.14  Paul Novarese <novarese@alf.dec.com>
     21264/500 XP1000        996.40  P. Caulfield <patrick@balti.london.sco.com>



  3.10.  Normal Motorola systems



     System                BogoMips  Reporter
     68030/14.7 LCII nofpu     3.69  Ruda Moura <ruda@conectiva.com.br>
     68030/16 Atari Falcon     3.90  Jay T. Millar <jmillar@eaglequest.com>
     68030/16 Atari Falcon     3.90  Bruno Aubin <baubin@lemel.fr>
     68030/16 Atari Falcon     3.95  J.L. Brothers <brothers@halcyon.com>
     68030/16 Atari Falcon     3.98  <Roman.Hodek@informatik.uni-erlangen.de>
     68030/20 MacII Si         4.88  Bill Maloy <maloy@goldinc.com>
     68030/20 0c               4.92  Chris Nadigh <chrnadig@iiic.ethz.ch>
     68030    Amiga 3000       6.08  Andy Wick <awick@vt.edu>
     68030/30 Amiga 4000       6.09  Karsten Merker <km@golf.dinet.com>
     68030/25 Amiga 3000       6.12  Glen Hewlett <hewlett@planeteer.com>
     68030/25 Amiga 3000       6.21  Hamish Macdonald <hamish@bnr.ca>
     68030/25 Amiga 3000       6.21  J.L. Brothers <brothers@halcyon.com>
     68030/32 Atari Falcon     7.91  Franz Korntner <fkorntne@bazis.nl>
     68030    Atari TT         7.96  <schwab@issan.informatik.uni-dortmund.de>
     68030/32 Atari MegaST     7.98  E.J. van den Bussche <busscheh@ksepl.nl>
     68030/33 Atari TT         7.98  <Roman.Hodek@informatik.uni-erlangen.de>
     68030    Atari TT         7.98  Wayne Booth <trek@ihgp114r.ih.att.com>
     68030/60                  8.06  Korey Budgen <kbudgen@st.nepean.uws.edu.au>
     68030/33 Amiga 2000       8.14  W. Haidinger <e9225662@stud1.tuwien.ac.at>
     68030/48 32c             11.89  Martin Rogge <Martin_Rogge@ki.maus.de>
     68030/50 Atari           12     <Roman.Hodek@informatik.uni-erlangen.de>
     68030/50 Amiga 1200      12.36  Chris Sumner <chris@ganymede.sonnet.co.uk>
     68030/50 Amiga 1200      12.4   Richard Jerome <etlrdje@tigger.ericsson.se>
     68030/50 32c             12.42  Michael Plonus <michi@pluto.ping.de>
     68030/50 Amiga 1200      12.33  Detrix <detrix@popd.ix.netcom.com>
     68030/50 Amiga 1200      12.36  E.J.M. Brocklesby <ejb@klamath.demon.co.uk>

     68040/24 Amiga 4000      16.59  Bjarne Wichmann Petersen <mekanix@nospam.dk>
     68040/24 Amiga 4000-40   16.6   Hamish Macdonald <hamish@bnr.ca>
     68040/24 Amiga 4000-20   16.60  J.L. Brothers <brothers@halcyon.com>
     68040/25 Amiga 4000-040  16.61  <Geert.Uytterhoeven@cs.ku-leuven.ac.be>
     68040/25 Amiga 4000      16.61  Lawrence <lawrenc@nextwork.rose-hulmand.edu>
     68040/60 Amiga 4000-40   18.99  Darren Enns <dmenns@surf.pangea.ca>
     68040/28 Mac Quadra650   18.99  Warren James <wjames1@my-deja.com>
     68040/32 Medusa T40      21.25  <Hartmut.Koptein@et-inf.fho-emden.de>
     68040    Amiga 2000      21.86  Ron Flory <rjflory@feist.com>
     68040/40 Amiga 1200      26.52  Gavin Kinsey <gavin@kinsey.u-net.com>

     68060/50 Amiga 1200      99.53  baba <baba@pa.yokogawa.jp>
     68060/50 Amiga 4000      99.74  Stefan Tauche <otauche@uni-paderborn.de>
     68060/50 Amiga 4000     100.16  Jan Johansson <jj@mordor.it.kth.se>
     68060/66 Amiga CS MkII  132.71  Paul Hill <paul@lagernet.clara.co.uk>



  3.11.  Other Systems: Sparc, PowerPC, Mips, Intel 8088/286 ELKS



     System                BogoMips  Reporter
     Sparc sun4c              17.94  J.L. Brothers <brothers@halcyon.com>
     Sparc SLC/20 S1          19.86  Simon Karpen <slk@linux-shell.net>
     Sparc sun4c/25           24.88  Paolo <paolo0@yahoo.com>
     Sparc IPX 4c             39.83  Paul D. Robertson <proberts@clark.net>
     Sparc SS10 super50 4m    39.93  Juan Cespedes <cespedes@etsit.upm.es>
     Sparc microS/50 SS-LX    49.76  Will Shaw <romulan@netwatch.clemson.edu>
     Sparc SS20/50            49.86  Gary A. Donahue <lordgad@webspan.net>
     Sparc hyperS Classic 4m  49.86  Juan Cespedes <cespedes@etsit.upm.es>
     Sparc Voyager portable   59.80  Edward Austin <eastin@shl.com>
     Sparc SS5 Netra          68     Craig Falconer <cf@papanui.school.nz>
     Sparc SS5                69.84  Richard D. Davis <rddavis1@lucent.com>
     Sparc SS50               74.95  Kaz <kaz@latte.cafe.net>
     Sparc SS10 hyperS        99.73  Thomas B. Fox <tfox@oliverdesign.com>
     Sparc SS5/66            109.77  Lance S. Nehring <lnehrin@uswest.com>
     Sparc SS4/110           109.77  Chris Sylvain <csylvain@umms-itg.ab.umd.edu>
     Sparc hSparc sum4m      124.92  Georg Schwarz <schwarz@physik.tu-berlin.de>
     Sparc hSparc/150 Sun4m  150.32  Tethys <tethys@ml.com>

     Sparc Ultra I/143       278.00  Helmut <helmut@cancon.com>
     Sparc Ultra I sun4u     284.05  Iban Cardona <icc@seric.es>
     Sparc Ultra II/270      539.03  Pieter Krul <pieter@dare.demon.nl>
     Sparc Ultra II/360      719.26  Bjoern Augustsson <d3august@dtek.chalmers.se>

     PowerPC 601    Mac       33.28  David Wetzel <dave@turbocat.de>
     PowerPC 601/60 Mac6100   45.24  J.L. Brothers <brothers@halcyon.com>
     PowerPC 601/66 Mac       51.62  Fred Klein <klein@des3.u-strasbg.fr>
     PowerPC 601/60 Mac6100   59.38  Kent Radek <goo@itd.sterling.com>
     PowerPC 601/75 Mac7200   73.93  Dimitris Tsifakis <jimmy@typhoeus.dg.uoa.gr>
     PowerPC 601/90 Mac7200   89.00  Heinrich H. Beck <thebigduck@earthlink.net>
     PowerPC 601/100 Mac7500  98.91  Russ Hoffman <reh@fore.com>
     PowerPC 601/110 Mac8100 108     Charles Eicher <ceicher@inav.net>

     PowerPC 603/100          66.56  A. Costa <c_chaos@chaosnet.wahnapitae.on.ca>

     PowerPC 604/100 PPS6050  99.74  Evaldas Darcianovas <evaldas@isi.kvm.lt>
     PowerPC 604/100         199     Hamish Marson <hamish@aixrules.nz.ibm.com>
     PowerPC 604/100 PPS7248 199.48  Evaldas Darcianovas <evaldas@isi.kvm.lt>
     PowerPC 604     Mac8500 239.21  Steve <sjs132@psu.edu>
     PowerPC 604/132 Mac9500 263.78  Matt Templeton <cybear@pacbell.net>
     PowerPC 604/132 Mac7500 263.78  Patrick Murmann <murmann@mi.uni-erlangen.de>
     PowerPC 604/133 MOT PS  266.24  Christoper Harrel <cnh@eng.mindspring.net>
     PowerPC 604/150 Mac9500 297.73  Jean-Philippe Lord <jpl@binex.com>
     PowerPC 604e/195        359.63  Michael Potts <pottsjam@flyernet.udayton.edu>
     PowerPC 604/200 Mac8600 320     Julien Sebot <sebot@lri.fr>
     PowerPC 604/180 SM900   367.82  J.E. Cook <jcojones@mail.athen1.ga.home.com>
     PowerPC 604e/200 SM4000 399.12  Roland Kuhn <kuhn@physik.uni-kassel.de>

     PowerPC 750/266 Mac     532.48  Fritz Anderson <fritza@tezcat.com>
     PowerPC 750/292 Mac     586.38  John McAulay <johnmcaulay@ndirect.co.uk>

     Mips R4000/100           48.30  J.L. Brothers <brothers@halcyon.com>
     Mips R4000/100 Magnum    50.03  Andreas Busse <andy@soft-n-hard.de>
     Mips R4400/134 Acer Pica 67.10  Andreas Busse <andy@soft-n-hard.de>
     Mips R4400/134 Acer Pica 67.10  Ralf Baechle <ralf@waldorf-gmbh.de>
     Mips R4600/133 Tyne     133.12  Ralf Baechle <ralf@waldorf-gmbh.de>
     Mips R4600/133 RM200    133.08  Ralf Baechle <ralf@julia.de>
     Mips R5000/150 Indy     154.83  Ralf Baechle <ralf@julie.de>

     Intel 8088/4.77           0.02  Tim Van der Linden <timvdl@innet.be>
     Intel 8088/10             0.05  Tim Van der Linden <timvdl@innet.be>
     Intel 8086                0.5   Kin Lau <gabe@zot.io.org>
     Intel 286 Tandy           0.75  Joey Hess <joey@kite.ml.org>
     Intel 286 Nec V20/16      0.88  Vasilhs Ventirozos <r00t666@hotmail.com>
     Intel 286                 0.99  Anders Stenback <stenback@hehe.com>
     Intel 286/8 VAXMate       1.03  Andrew Costa <c_chaos@wahnapitae.on.ca>
     Intel 286/10 Commodore    1.30  Hans-Joachim Baader <hans@grumber.inka.de>
     Intel 286 PS2             2.32  Morillas C.H. Antonio <morilla@fie.us.es>
     Intel 286 PS2             2.34  Joey Hess <joey@kite.ml.org>



  3.12.  Normal Multi CPU systems



     System                BogoMips  Reporter
     SMP2 Pentium/75          59.50  Michael Engel <engel@unix-ag.uni-siegen.de>
     SMP2 Pentium/90          71.68  Edwin Whitelaw <elw@ivc.com>
     SMP2 Pentium/90          71.98  Daniel Luhde-Thompson <dl10010@cam.ac.uk>
     SMP2 Pentium/90          72.08  Alan Cox <alan@cymru.net>
     SMP2 Pentium/100         79.46  Lam Dang <dangit@ix.netcom.com>
     SMP2 Pentium/100         80.08  Christian Tan <pigeon@xs4all.nl>
     SMP2 Pentium/100         80.08  McNalley <jmcnalle@attila.stevens-tech.edu>
     SMP2 Pentium/120         95.85  Maurice de Bijl <maurice.d.bijl@topic.nl>
     SMP2 Pentium/133        106.09  Maurice de Bijl <maurice.d.bijl@topic.nl>
     SMP2 Pentium/166        133.53  <Reinhard.Simkovics@jk.uni-linz.ac.at>
     SMP2 Pentium/200        158.72  Ed Hoppitt <edward@dcs.rhbnc.ac.uk>

     SMP2 Pentium MMX/200    794.62  Kristian Koehntopp <kris@koehntopp.de>
     SMP2 Pentium MMX/200    796.26  Eric Clark <eclark@opencominc.com>
     SMP2 Pentium MMX/233    927.33  Jeff White <jwhite@ghq.com>

     SMP2 Pentium Pro/150    299.00  Steven Gallo <smgallo@numenor.csgeeks.org>
     SMP2 Pentium Pro/150    299.01  Eric van Dijken <E.vanDijken@PTT-Telecom.nl>
     SMP2 Pentium Pro/166    331.78  Eric van Dijken <E.vanDijken@PTT-Telecom.nl>
     SMP2 Pentium Pro/180    358.81  Eric van Dijken <E.vanDijken@PTT-Telecom.nl>
     SMP2 Pentium Pro/180    358.81  Frankie East <fae2401@rit.edu>
     SMP2 Pentium Pro/180    358.81  James K. Wiggs <wiggs@wolfenet.com>
     SMP2 Pentium Pro/200    396.25  Will Shaw <shaww@dialup.dstm.com>
     SMP2 Pentium Pro/200    397.32  Abhijit Menon-Sen <ams@wiw.org>
     SMP2 Pentium Pro/200    398.13  David Konerding <dek@cgl.ucsf.edu>
     SMP2 Pentium Pro/200    398.13  B. Heinen <benedikt.heinen@infrasys.ascom.ch>
     SMP2 Pentium Pro/200    398.13  Ramon Huerta <huerta@minerva.ii.uam.es>
     SMP2 Pentium Pro/200    398.14  C.-A. Possamai <camille@sugiton.cnrs-mrs.fr>
     SMP2 Pentium Pro/200    398.14  Leland <llucius@millcom.com>
     SMP2 Pentium Pro/200    398.14  John Lellis <lellis@dmccorp.com>
     SMP2 Pentium Pro/200    398.14  Jim Gifford <jim@mail.rath.peachnet.edu>
     SMP2 Pentium Pro/200    398.14  Manuel Galan <root@ulpgc.es>
     SMP2 Pentium Pro/200    398.6   Bill Davidsen <davidsen@tmr.com>
     SMP2 Pentium Pro/200    398.95  Fons Rademakers <f.rademakers@cern.ch>
     SMP2 Pentium Pro/200    398.98  Greg Fausak <glfausak@august.com>
     SMP2 Pentium Pro/200    400.18  Attila Karpati <karpati@cs.elte.hu>
     SMP2 Pentium Pro/233    464.49  F. Baitinger <baiti@zenon.toplink.net>
     SMP4 Pentium Pro/133    532.07  Erik Walthinsen <omega@sequent.com>
     SMP4 Pentium Pro/200    794.62  Kenneth Hedlund <c415khd@nll.se>
     SMP4 Pentium Pro/200    796.28  John Pelan <j.pelan@am.qub.ac.uk>

     SMP2 Pentium II/233     466.94  Eli Kane <eli@crl.nmsu.edu>
     SMP2 Pentium II/266     530.84  Shon Martin <cshoon@oberlin.edu>
     SMP2 Pentium II/266     534.12  n.n. <service@cprompt.sk.ca>
     SMP2 Pentium II/266     534.12  Emmanuel Tychon <manu@acm.org>
     SMP2 Pentium II/274     546.41  Richard Jellinek <rj@suse.de>
     SMP2 Pentium II/300     597.20  Paul Sheer <psheer@obsidian.co.za>
     SMP2 Pentium II/300     598.02  Hans Ameel <hans@pla.to>
     SMP2 Pentium II/300     599.66  Abhijit Menon-Sen <ams@wiw.org>
     SMP2 Pentium II/300     599.76  S. Curtarolo <auro@spiro.fisica.unpd.it>
     SMP2 Pentium II/333 ov  665.73  S. Curtarolo <auro@spiro.fisica.unpd.it>
     SMP2 Pentium II/350     697.14  Riley <rhw@bigfoot.com>
     SMP2 Pentium II/350     700.42  David Overeem <overeem.1@osu.edu>
     SMP2 Pentium II/350     700.42  Mathijs <matthijs@helena.tux.nu>
     SMP2 Pentium II/350     700.42  Joe Gray <jgray_111@yahoo.com>
     SMP2 Pentium II/400     796.26  Michael Necaise <necaise@jlab.org>
     SMP2 Pentium II/400     800.20  Simon van Sleuwen <sleuwen@hotmail.com>
     SMP2 Pentium II/400     800.36  Gloger <joachim.j.gloger@daimlerchrysler.com>
     SMP2 Pentium II/400     800.36  Marcel Lanz <marcel.lanz@ds9.ch>
     SMP2 Pentium II/400     800.36  Frank <frank@sazza.ping.de>
     SMP2 Pentium II/400     800.47  Jung Pyo Hong <hongjungpyo@my-deja.com>
     SMP2 Pentium II/448 ov  894.57  Rob Leach <dslfreak@pacbell.net>
     SMP2 Pentium II/450     901.12  Abhijit Menon-Sen <ams@wiw.org>
     SMP2 Pentium II/466     925.70  A. Giachino <a.giachine@ekkinc.com>

     SMP2 Celeron/400        796.26  Stuart Hall <stuarthall@mailandnews.com>
     SMP2 Celeron/400        798.21  Stefan Onderka <nop@gameart.com>
     SMP2 Celeron/450        894.57  Stephan Eisler <stephan@lingo.gun.sub.org>
     SMP2 Celeron/500        999.42  Ingimar Rovertsson <iar@skyrr.is>
     SMP2 Celeron/500        999.42  Rob Farrell <rpf@home.com>
     SMP2 Celeron/515 overc 1028.92  Ryan Werber <rwerber@ctel.net>
     SMP2 Celeron/550 overc 1101.00  Olof Zachrisson <eraolza@ks.ericsson.se>
     SMP2 Celeron/550 overc 1101.00  John Katagawa <dhc@50k.com>
     SMP2 Celeron/550 overc 1101.00  Mattias Moberg <mattias.moberg@home.se>
     SMP2 Celeron/550 overc 1101.00  Kieffer <Jerome.KIEFFER@crans.ens-cachan.fr>
     SMP2 Celeron/563 overc 1120     Cecchinel Stephan <inter.zone@free.fr>
     SMP2 Celeron/606 overc 1207.50  Mattias Moberg <mattias.moberg@home.se>

     SMP2 Pentium III/450    899.48  Ramses Smeyers <fatman@khk.org>
     SMP2 Pentium III/450    899.48  Roland Exler <r.exler@jk.uni-linz.ac.at>
     SMP2 Pentium III/500    996.14  Ola Samuelson <ola@datalink.se>
     SMP2 Pentium III/500    996.15  Rob Green <mooncrow@lava.net>
     SMP2 Pentium III/500    999.42  Douglas Osborn <daozb@earthlink.net>
     SMP2 Pentium III/560   1117.39  Nathan Laredo <laredo@gnu.org>
     SMP4 Pentium III/450   1794.00  Glenn Stone <glenns@ami.com>
     SMP4 Pentium III/550   2195.46  Yan P. Yuan <Yanping.Yuan@EMBL-Heidelberg.de>
     SMP8 Pentium III/500   3996.06  Richard Langis <rlangis@primux.geekfest.net>

     SMP2 Sparc SS/50         99.84  Dimitris Tsifakis <sv1det@freemail.gr>



  3.13.  Non-Linux systems (reference only)



     System                      OS      BogoMips Reporter
     Z80 TRS80 model 4           TRSDOS     0.004 <cervasio@airmail.net>
     Z80/4.6 NC100               ZCN        0.013 <rus@forfree.at>
     68000/8 Macintosh Classic   MacOS      0.53  <jimmy@typhoeus.dg.uoa.gr>
     68020/20 Sun 3              SUNOS      2.0   <korpela@ssl.berkeley.edu>
     68020/16 Macintosh LC       MacOS      3.09  <jimmy@typhoeus.dg.uoa.gr>
     68020/25 Sun 3-180          SUNOS      4.0   <korpela@ssl.berkeley.edu>
     Sparc Sun 3-60              SUNOS      4.00  <tranter@software.mitel.com>
     Sparc Sun 3-80              SUNOS      4.00  <tranter@software.mitel.com>
     68030/25 Macintosh IIci     NetBSD     5.62  <kirk-corey@uiowa.edu>
     68040/25 Macintosh LC475    MacOS     12.27  <jimmy@typhoeus.dg.uoa.gr>
     68040/33 HP9000-280         HP-UX     14     <niles@axp745.gsfc.nasa.gov>
     68040/25 Apollo 5500        DomainOS  14.00  <kirk-corey@uiowa.edu>
     Sparc Sun 4-280/20          SUNOS     16.0   <korpela@ssl.berkeley.edu>
     Sparc Sun IPC/40            Solaris   16.00  <gong@cs.msu.su>
     68040/25 HP9000-425         DomainOS  16.00  <kirk-corey@uiowa.edu>
     68040 NextStep              (?)       16.26  <petergun@coffeehaus.com>
     Sparc Sun SS1               SUNOS     18.00  <tranter@software.mitel.com>
     Sparc Sun SS1               SUNOS     18.00  <jimmy@typhoeus.dg.uoa.gr>
     IBM RS6000 320              AIX       18.00  <mg@svtpc3.fb12.tu-berlin.de>
     Sparc Sun SS1+              SUNOS     19     <swmike@uplift.df.lth.se>
     Sparc Sun SS1+              SUNOS     24.00  <tranter@software.mitel.com>
     Sparc Sun IPC               SUNOS     24.00  <tranter@software.mitel.com>
     IBM RS6000 320H             AIX       24.00  <mg@svtpc3.fb12.tu-berlin.de>
     Sparc Sun Sparcstation2     SUNOS     26.00  <gong@cs.msu.su>
     SparcClassic/50             Solaris   32.00  <gong@cs.msu.su>
     Sparc Sun ELC               SUNOS     32.00  <tranter@software.mitel.com>
     HP-PA 9000-720              HP-UX     32.00  <metod.kozelj@rzs-hm.si>
     Sparc Sun SS10              SUNOS     34.00  <tranter@software.mitel.com>
     Sparc Sun SS10              SUNOS     34.00  <makler@man.torun.pl>
     Pentium/100                 Win-NT    36.21  <marcus@healthchex.com>
     Sparc Sun Sparcstation2     SUNOS     38.0   <korpela@ssl.berkeley.edu>
     Mips R4000/100 Indy         (?)       48.00  <p.verwer@organon.akzonobel.nl>
     Mips R4000/100 SGI IndySC   Irix      48.00  <lziegler@csbsju.edu>
     HP-PA 9000-720              HP-UX     48.00  <metod.kozelj@rzs-hm.si>
     Sparc SS10                  SUNOS     48.00  <makler@man.torun.pl>
     IBM RS-6000-250/66          AIX       52.00  <gl23@e4.hrz.uni-giessen.de>
     Sparc Sun Sparcstation10d   SUNOS     54.0   <korpela@ssl.berkeley.edu>
     Sparc SS1000 2CPU           SUNOS     58.00  <gong@cs.msu.su>
     Sparc SS20                  SUNOS     60.00  <makler@man.torun.pl>
     IBM RS6000-250/80           AIX       62.00  <gl23@e4.hrz.uni-giessen.de>
     Alpha 21064/133 Decstation  OSF1      64     <niles@axp745.gsfc.nasa.gov>
     Alpha 21064/133 Dec3000     OSF1      66.00  <daniels@helplaxp1.harvard.edu>
     Sparc Sun SS5               SUNOS     68.00  <tranter@software.mitel.com>
     Sparc Sun SS20              SUNOS     72.00  <tranter@software.mitel.com>
     Sparc Sun SS20/712          Solaris   74     <spohr@qmos.com>
     Mips R4400/150 Challenge    (?)       74.00  <p.verwer@organon.akzonobel.nl>
     Mips R4400/150 Indigo2Extr  (?)       74.00  <p.verwer@organon.akzonobel.nl>
     HP-PA 9000-715              HP-UX     74.00  <metod.kozelj@rzs-hm.si>
     Sparc SS5 sun4m             SUNOS     84.00  <chrisv@allegria.com>
     Sparc SS1000E               SUNOS     84.00  <makler@man.torun.pl>
     Alpha                       OSF1      92.00  <petergun@coffeehaus.com>
     Mips R4400/200 Indigo2Extr  (?)       98.00  <p.verwer@organon.akzonobel.nl>
     HP-PA 9000-735/99           HP-UX     98.00  <lankhors@cs.rug.nl>
     Sparc SS5                   SUNOS    104.00  <makler@man.torun.pl>
     Sparc Sun SS4/110           Solaris  108     <spohr@qmos>
     Sparc Sun SS4               Solaris  108.00  <jimmy@typhoeus.dg.uoa.gr>
     Sparc Sun SS5               SUNOS    110     <swmike@uplift.df.lth.se>
     Alpha 21064A/233            OSF1     114     <niles@axp745.gsfc.nasa.gov>
     Alpha 3000 21064/300        OSF1     120.00  <gl23@e4.hrz.uni-giessen.de>
     HP-PA 700/125               HP-UX    122     <niles@axp745.gsfc.nasa.gov>
     HP-PA 9000-735/125          HP-UX    122.00  <lankhors@cs.rug.nl>
     Mips R4600/133 SGI Indy     Irix     132     <lziegler@csbsju.edu>
     MIPS R5000/150              Irix     148.00  <nachiket@indimax.hydroqual.com>
     IBM 6x86                    OS/2     149.13  <mikedg@ghostbbs.pandora.it>
     Alpha                       OSF1     180.0   <mauger@ensinfo.univ-nantes.fr>
     MIPS R10000/195             Irix     194.00  <nachiket@indimax.hydroqual.com>
     Alpha 21164/333 AS500       OSF1     222.00  <daniels@helplaxp1.harvard.edu>
     Sparc Ultra-1 sun4u         Solaris  254.00  <alternat@rwth-aachen.de>
     PPC604/133 IBM RS6000       AIX      254.00  <kirk-corey@uiowa.edu>
     IBM RS-6000 43P powerpc     AIX      260.00  <gl23@e4.hrz.uni-giessen.de>
     Sparc U-1 sun4u             SunOS    284.00  <gl23@e4.hrz.uni-giessen.de>
     Alpha 21164/433 DPW433au    OSF1     286.00  <daniels@helplaxp1.harvard.edu>
     HP9000-C160/160             HP-UX    316.00  <nicolai@prz.tu-berlin.de>
     Sparc Sun US1/170           Solaris  330     <spohr@qmos>
     Sparc Sun US1/167           Solaris  330     <jimmy@typhoeus.dg.uoa.gr>
     Sparc Ultra-1 sun4u         SUNOS    334.00  <chrisv@allegria.com>
     Alpha 3000-600S             VMS      348.61  <metod.kozelj@rzs-hm.si>
     Alpha server 1000-4/200     VMS      397.68  <metod.kozelj@rzs-hm.si>
     Sparc Sun-Ultra30/248       Solaris  482.00  <marc.Quinton@stna.dgac.fr>
     Sparc US2/296 2cpu          SUNOS    596.00  <manu@acm.org>
     Cray J90 Y-MP/100 16cpu     Unicos   912.00  <lankhors@cs.rug.nl>
     Sequent Symmetry 6xP5/166   Dynix    984.00  <omega@sequent.com>
     Sequent Symmetry 16xP5/66   Dynix   1056.00  <omega@sequent.com>
     HP9000-C160/160             HP-UX   1278.00  <nicolai@prz.tu-berlin.de>
     Sequent NUMA-Q 12x P6/180   Dynix   1416.00  <omega@sequent.com>
     Sequent NUMA-Q 32x P6/180   Dynix   3776.00  <omega@sequent.com>



  4.  Signature

  The news of the little sister Daphne has not lost its attractiveness
  to Big Brother Roderick and Big Sister Isolde. After the wife has gone
  back to work now, I have the pleasant morning job to bring the
  children to school and the daycare center: quite a car load, with
  three  singing kids in there :-). Fortunately, they're quite happy to
  be brought to their respective places, even the school!

  Met vriendelijke groeten, Wim 'Dad' van Dorst.

  ------------------------------------------------------------------------
  Wim van Dorst, Clifton Scientific Text Services, tel/fax +31 355 242 319
                     This sentence have three erors



  Boot + Root + Raid + Lilo : Software Raid HOWTO
  Michael Robinton, Michael@BizSystems.com
  <mailto:michael@bizsystems.com>
  v1.03, May 4, 2000

  This document provides a cookbook for setting up root raid using the
  0.90 raidtools for bootable raid mounted on root using standard LILO.
  Also covered is the conversion of a conventional disk to a raid1 or
  raid5 mirror set without the loss of data on the original disk.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Acknowledgements
     1.2 Bugs
     1.3 Copyright Notice

  2. What you need BEFORE YOU START

     2.1 Required Packages
     2.2 Where to get Up-to-date copies of this document.
     2.3 Documentation -- Recommended Reading
     2.4 RAID resources

  3. Bootable Raid

     3.1 Booting RAID 1 with standard LILO
     3.2 Detailed explaination of lilo.conf for raid boot

  4. Upgrading from non-raid to RAID1/4/5

     4.1 Step 1 - prepare a new kernel
     4.2 Step 2 - set up raidtab for your new raid.
     4.3 Create, format, and configure RAID
     4.4 Copy the current OS to the new raid device
     4.5 Test your new RAID
     4.6 Integrate old disk into raid array

  5. Appendix A. - example raidtab

  6. Appendix B. - SCSI reference implementation RAID5

  7. Appendix C. - ide RAID10 with initrd

  8. Appendix D. - ide RAID1-10 with initrd



  ______________________________________________________________________

  1.  Introduction


  1.1.  Acknowledgements

  The essence of the information I've put together here was originally
  provided by Harald Nordgrd-Hansen <hnh@bukharin.hiof.no
  <mailto:hnh@bukharin.hiof.no>> and posted to the raid mail list in a
  lilo.conf file with commentary by  Martin Bene <mb@sime.com
  <mailto:mb@sime.com>>. Many thanks for your contribution. I've tried
  to put this information and the helpful work of many others who
  contribute to the raid mail list and linux raid project into a
  COOKBOOK form, including many examples from real systems so that
  bootable root raid is easy to set up and understand. One section is
  devoted to the conversion of a standard single drive system to RAID.
  The key to the conversion, in my humble opinion, is the understanding
  of bootable root raid.


  1.2.  Bugs

  Yes, I'm sure there are some. If you'd be good enough to report them,
  I will correct the document. ;-)


  1.3.  Copyright Notice

  This document is GNU copyleft by Michael Robinton
  Michael@BizSystems.com <mailto:michael@bizsystems.com>.

  Permission to use, copy, distribute this document for any purpose is
  hereby granted, provided that the author's / editor's name and this
  notice appear in all copies and/or supporting documents; and that an
  unmodified version of this document is made freely available.  This
  document is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY, either expressed or implied.  While every effort
  has been taken to ensure the accuracy of the information documented
  herein, the author / editor / maintainer assumes NO RESPONSIBILITY for
  any errors, or for any damages, direct or consequential, as a result
  of the use of the information documented herein.



  2.  What you need BEFORE YOU START

  The packages you need and the documentation that answers the most
  common questions about setting up and running raid are listed below.
  Please review them throughly.


  2.1.  Required Packages

  You need to obtain the most recent versions of these packages.

    a linux kernel that supports raid, initrd

       I used linux-2.2.14 <ftp://ftp.kernel.org/pub/linux/ker
       nel/v2.2/> from kernel.org


    ftp://ftp.kernel.org/pub/linux/daemons/raid/alpha/
     <ftp://ftp.kernel.org/pub/linux/daemons/raid/alpha/> the most
     recent tools and patch that adds support for modern raid1/4/5

       I used http://people.redhat.com/mingo/raid-patches/
       <http://people.redhat.com/mingo/raid-patches/raid-2.2.14-B1>



  2.2.  Where to get Up-to-date copies of this document.

  Click here to browse the author's latest version
  <ftp://ftp.bizsystems.com/pub/raid/Boot+Root+Raid+LILO.html> of this
  document. Corrections and suggestions welcome!

  Boot Root Raid minihowto

  Available in LaTeX (for DVI and PostScript), plain text, and HTML.

  http://www.linuxdoc.org/HOWTO/mini/Boot+Root+Raid+LILO.html
  <http://www.linux
  doc.org/HOWTO/mini/Boot+Root+Raid+LILO.html>


  Available in SGML and HTML.

       ftp.bizsystems.net/pub/raid/ <ftp://ftp.bizsys
       tems.net/pub/raid/>



  2.3.  Documentation -- Recommended Reading

  If you plan on using raid1/5 over raid0, please read:

       /usr/src/linux/Documentation/initrd.txt



  as well as the documentation and man pages that accompany the
  raidtools set.


  and..... Software-RAID-HOWTO.html
  <http://metalab.unc.edu/mdw/HOWTO/Software-RAID-HOWTO.html>


  2.4.  RAID resources

  Mailing lists can be joined at:

    This one seems quiet: majordomo@nuclecu.unam.mx
     <mailto:majordomo@nuclecu.unam.mx> send a message to subscribe
     raiddev

     send mail to: raiddev@nuclecu.unam.mx
     <mailto:raiddev@nuclecu.unam.mx>



    Raid development: majordomo@vger.rutgers.edu
     <mailto:majordomo@vger.rutgers.edu> send a message to subscribe
     linux-raid

     send mail to: linux-raid@vger.rutgers.edu <mailto:linux-
     raid@vger.rutgers.edu> (this seems to be the most active list)



  3.  Bootable Raid

  I'm not going to cover the fundamentals of setting up raid0/1/5 on
  Linux, that is covered in detail elsewhere. The problem I will address
  is setting up raid on root and making it bootable with standard LILO.
  The documentation that comes with the LILO sources (not the man pages)
  and with the raidtools-0.90, covers the details of booting and boot
  parameters as well as general raid setup - respectively.


  There are two scenarios which are covered here. Set up of bootable
  root raid and the conversion of an existing non-raid system to
  bootable root raid without data loss.



  3.1.  Booting RAID 1 with standard LILO

  To make the boot information redundant and easy to maintain, set up a
  small RAID1 and mount it on the /boot directory of your system disk.
  LILO does not know about device 0x9?? and can not find the information
  at boot time because the raid sub system is not active then. As a
  simple work around, you can pass LILO the geometry information of the
  drive(s) and from that, LILO can determine the position of the
  information needed to load the kernel even though it is on the RAID1
  partition. This is because the RAID1 partition is the same as a
  standard partition but with a raid super-block written at the end. The
  boot raid set should fall with the first 1024 mbytes of the disk
  drive. In theory the start of the raid partition could fall anywhere
  in the 1024 megs, but in practice I was unable to get it to work
  unless the boot-raid started at the first block of the set. This is
  probably because of something dumb that I did, but it was not worth
  following up at the time. Since then I've simply set up all my systems
  with the boot-raid set as the first partition. I have root raid system
  configurations with bootable RAID1 mounted on /boot with root raid
  sets as follows: RAID1, RAID5, RAID10 & RAID1-10 ( 1 mirror + 1 raid0
  set).  The last has a very peculiar lilo file pair since none of the
  disk geometries are the same, however, the principals are the same for
  the initial boot process. The RAID10 and RAID1-10 root mounts require
  the use of initrd to mount root after the boot process has taken
  place.  See the appendices for the configuration files for all of
  these example systems.


  A conventional LILO config file stripped down looks like this:


  # lilo.conf - assumes drive less than 1024
          boot = /dev/hda
          delay = 40               # extra, but nice
          vga = normal             # not normally needed
          image = /bzImage
          root = /dev/hda1
          read-only
          label = Linux



  A raid LILO config file pair would look like this:



  # lilo.conf.hda - primary ide master
          disk=/dev/md0
          bios=0x80
          sectors=63
          heads=16
          cylinders=39770
          partition=/dev/md1
          start=63
          boot=/dev/hda
          map=/boot/map
          install=/boot/boot.b
          image=/boot/bzImage
          root=/dev/md0
          read-only
          label=LinuxRaid

  # ---------------------

  # lilo.conf.hdc - secondary ide master
          disk=/dev/md0
          bios=0x80                # see note below
          sectors=63
          heads=16
          cylinders=39770
          partition=/dev/md1
          start=63
          boot=/dev/hdc            # this is the other disk
          map=/boot/map
          install=/boot/boot.b
          image=/boot/bzImage
          root=/dev/md0
          read-only
          label=LinuxRaid



  # BIOS=line -- if your bios is smart enough (most are not) to detect
  that that the first disk is missing or failed and will automatically
  boot from the second disk, then bios=81 would be the appropriate entry
  here. This is more common with SCSI bios than IDE bios. I simply plan
  on relocating the drive so it will replace the dead drive C: in the
  event of failure of the primary boot drive.


  The geometry information for the drive can be obtained from fdisk with
  the command:


  fdisk -ul (little L)
  fdisk -ul /dev/hda

  Disk /dev/hda: 16 heads, 63 sectors, 39770 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1            63     33263     16600+  fd  Linux raid autodetect
  /dev/hda2         33264    443519    205128   82  Linux swap
  /dev/hda3        443520  40088159  19822320   fd  Linux raid autodetect

  * note the listing of the START of each partition



  3.2.  Detailed explaination of lilo.conf for raid boot

  The raid lilo.conf file above, commented in detail for each entry.


  # lilo.conf.hda - primary ide master
  #       the location of the /boot directory that will be
  #       designated below as containing the kernel, map, etc...
  #       note that this is NOT the actual partition containing
  #       the boot image and info, but rather the device
  #       that logically contains this directory.
  #       in this example, /dev/md1 is mounted on /dev/md0/boot
       disk=/dev/md0

  #       tell LILO which bios device to use for boot, i.e. C: drive
       bios=0x80

  #       tell LILO the geometry of the device
  #       this is usually but not always the "logical"
  #       geometry. Check the /proc file system or watch
  #       the boot messages when the kernel probes for the drive
  #
       sectors=63
       heads=16
       cylinders=39770

  #       this is a dummy entry to make LILO happy so it
  #       will recognize the raid set 0x9?? and then find
  #       the START of the boot sector. To really see
  #       what this was for, read the documentation
  #       that comes with the LILO source distribution.
  #       This parameter "must" be different than the
  #       disk=  entry above. It can be any other mdx
  #       device, used or unused and need not be the one
  #       that contains the /boot information
  #
       partition=/dev/md1

  #       the first sector of the partition containing /boot information
       start=63

  #       the real device that LILO will write the boot information to
       boot=/dev/hda

  #       logically where LILO will put the boot information
       map=/boot/map
       install=/boot/boot.b

  #       logically where lilo will find the kernel image
       image=/boot/bzImage

  #       standard stuff after this
  #       root may be a raid1/4/5 device
       root=/dev/md0
       read-only
       label=LinuxRaid



  4.  Upgrading from non-raid to RAID1/4/5

  Upgrading a non-raid system to raid is fairly east and consists of
  several discrete steps described below. The description is for a
  system with a boot partition, root partition and swap partition.

  OLD disk in the existing system:

      /dev/hda1     boot, may be dos+lodlin or lilo
      /dev/hda2     root
      /dev/hda3     swap


  We will add an additional disk and convert the entire system to RAID1.
  You could easily add several disks and make a RAID5 set instead using
  the same procedure.


  4.1.  Step 1 - prepare a new kernel

  Download a clean kernel, raidtools-0.90 (or the most recent version),
  and the kernel patch to upgrade the kernel to 0.90 raid.

  Compile and install the raidtools and READ the documentation.

  Compile and install the kernel to support all the flavors (0/1/4/5 ?)
  of raid that you will be using.  Make sure to specify autostart of
  raid devices in the kernel configuration.  Test that the kernel boots
  properly and examine /proc/mdstat to see that the raid flavors you
  will use are supported by the new kernel.


  4.2.  Step 2 - set up raidtab for your new raid.

  The new disk will be added to an additional IDE controller as the
  master device, thus becomming /dev/hdc


      /dev/hdc1     16megs -- more than enough for several kernel images
      /dev/hdc2     most of the disk
      /dev/hdc3     some more swap space, if needed. otherwise add to hdc2



  Change the partition types for /dev/hdc1 and /dev/hdc2 to "fd" for
  raid-autostart.

  Using the failed-disk parameter, create a raidtab for the desired
  RAID1 configuration. The failed disk must be the last entry in the
  table.



  # example raidtab
  # md0 is the root array
  raiddev                 /dev/md0
  raid-level              1
  nr-raid-disks           2
  chunk-size              32
  # Spare disks for hot reconstruction
  nr-spare-disks          0
  persistent-superblock   1
  device                  /dev/hdc2
  raid-disk               0
  # this is our old disk, mark as failed for now
  device                  /dev/hda2
  failed-disk             1

  # md1 is the /boot array
  raiddev                 /dev/md1
  raid-level              1
  nr-raid-disks           2
  chunk-size              32
  # Spare disks for hot reconstruction
  nr-spare-disks          0
  persistent-superblock   1
  device                  /dev/hdc1
  raid-disk               0
  # boot is marked failed as well
  device                  /dev/hda1
  failed-disk               1



  4.3.  Create, format, and configure RAID

  Create the md devices with the commands:

      mkraid /dev/md0
      mkraid /dev/md1



  The raid devices should be created and start. Examination of
  /proc/mdstat should show the raid personalities in the kernel and the
  raid devices running.

  Format the boot and root devices with:

      mke2fs /dev/md0
      mke2fs /dev/md1


  Mount the new root device somewhere handy and create the /boot direc
  tory and mount the boot partition.

      mount /dev/md0 /mnt
      mkdir /mnt/boot
      mount /dev/md1 /mnt/boot



  4.4.  Copy the current OS to the new raid device

  This is pretty straightforward.


      cd /
      # set up a batch file to do this
      cp -a /bin /mnt
      cp -a /dev /mnt
      cp -a /etc /mnt
      cp -a (all directories except /mnt, /proc, and nsf mounts) /mnt


  This operation can be tricky if you have mounted or linked other disks
  to your root file system. The example above assumes a very simple sys
  tem, you may have to modify the procedure somewhat.


  4.5.  Test your new RAID

  Make a boot floppy and rdev the kernel.


      dd if=kernal.image of=/dev/fd0 bs=2k
      rdev /dev/fd0 /dev/md0
      rdev -r /dev/fd0 0
      rdev -R /dev/fd0 1



  Modify the fstab on the RAID device to reflect the new mount points as
  follows:

    /dev/md0        /       ext2    defaults        1 1
    /dev/md1        /boot   ext2    defaults        1 1



  Dismount the raid devices and boot the new file system to see that all
  works correctly.


      umount /mnt/boot
      umount /mnt
      raidstop /dev/md0
      raidstop /dev/md1
      shutdown -r now



  Your RAID system should now be up and running in degraded mode with a
  floppy boot disk. Carefully check that you transferred everything to
  the new raid system. If you mess up here without a backup, YOU ARE
  DEAD!

  If something did not work, reboot your old system and go back and fix
  things up until your successfully complete this step.


  4.6.  Integrate old disk into raid array

  Success in the previous step means that the raid array is now
  operational, but without redundancy. We must now re-partition the old
  drive(s) to fit into the new raid array. Remember that if the
  geometries are not the same, the the partition size on the old drive
  must be the same or larger than the raid partitions or they can not be
  added to the raid set.

  Re-partition the old drive as required. Example:


      /dev/hda1     same or larger than /dev/hdc1
      /dev/hda2     same or larger than /dev/hdc2
      /dev/hda3     anything left over for swap or whatever...



  Change the failed-disk parameter in the raidtab to raid-disk and hot
  add the new (old) disk partitions to the raid array.

      raidhotadd /dev/md1 /dev/hda1
      raidhotadd /dev/md0 /dev/hda2


  Examining /proc/mdstat should show one or more of the raid devices
  reconstructing the data for the new partitions. After a minute or
  two...  or so, the raid arrays should be fully synchronized (this
  could take a while for a large partition).


  Using the procedure described in the first sections of this document,
  set up bootable raid on the new raid pair. Hang on to that boot floppy
  while setting up and testing this last step.


  5.  Appendix A. - example raidtab

  RAID1 example described in the first sections of this document



   df
  Filesystem           1k-blocks      Used Available Use% Mounted on
  /dev/md0              19510780   1763188  16756484  10% /
  /dev/md1                 15860       984     14051   7% /boot

  # --------------------------

   fdisk -ul /dev/hda

  Disk /dev/hda: 16 heads, 63 sectors, 39770 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1            63     33263     16600+  fd  Linux raid autodetect
  /dev/hda2         33264    443519    205128   83  Linux native
  /dev/hda3        443520  40088159  19822320   fd  Linux raid autodetect

  # --------------------------

   fdisk -ul /dev/hdc

  Disk /dev/hdc: 16 heads, 63 sectors, 39770 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdc1            63     33263     16600+  fd  Linux raid autodetect
  /dev/hdc2         33264    443519    205128   82  Linux swap
  /dev/hdc3        443520  40088159  19822320   fd  Linux raid autodetect

  # --------------------------

  # md0 is the root array, about 20 gigs
  raiddev                 /dev/md0
  raid-level              1
  nr-raid-disks           2
  chunk-size              32
  # Spare disks for hot reconstruction
  nr-spare-disks          0
  persistent-superblock   1
  device                  /dev/hda3
  raid-disk               0
  device                  /dev/hdc3
  raid-disk               1

  # md1 is the /boot array, about 16 megs
  raiddev                 /dev/md1
  raid-level              1
  nr-raid-disks           2
  chunk-size              32
  # Spare disks for hot reconstruction
  nr-spare-disks          0
  persistent-superblock   1
  device                  /dev/hda1
  raid-disk               0
  device                  /dev/hdc1
  raid-disk               1

  # --------------------------

  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md0
  # geometry
    bios=0x80
    sectors=63
    heads=16
    cylinders=39770
  # dummy
    partition=/dev/md1
  # start of device "disk" above
    start=63

  boot=/dev/hda
  map=/boot/map
  install=/boot/boot.b

  image=/boot/bzImage
  root=/dev/md0
  label=LinuxRaid
  read-only

  # -------------------------

  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md0
  # geometry
    bios=0x80
    sectors=63
    heads=16
    cylinders=39770
  # dummy
    partition=/dev/md1
  # start of device "disk" above
    start=63

  boot=/dev/hdc
  map=/boot/map
  install=/boot/boot.b

  image=/boot/bzImage
  root=/dev/md0
  label=LinuxRaid
  read-only



  6.  Appendix B. - SCSI reference implementation RAID5

  4 disk SCSI RAID5



   df
  Filesystem           1k-blocks      Used Available Use% Mounted on
  /dev/md0              11753770   2146076   9000678  19% /
  /dev/md1                 15739       885     14042   6% /boot

  # --------------------------

   fdisk -ul /dev/sda

  Disk /dev/sda: 64 heads, 32 sectors, 4095 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/sda1            32     32767     16368   fd  Linux raid autodetect
  /dev/sda2         32768    292863    130048    5  Extended
  /dev/sda3        292864   8386559   4046848   fd  Linux raid autodetect
  /dev/sda5         32800    260095    113648   82  Linux swap
  /dev/sda6        260128    292863     16368   83  Linux native - test

  # ------------------------

   fdisk -ul /dev/sdb

  Disk /dev/sdb: 64 heads, 32 sectors, 4095 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/sdb1            32     32767     16368   fd  Linux raid autodetect
  /dev/sdb2         32768    292863    130048    5  Extended
  /dev/sdb3        292864   8386559   4046848   fd  Linux raid autodetect
  /dev/sdb5         32800    260095    113648   82  Linux swap
  /dev/sdb6        260128    292863     16368   83  Linux native - test

  # ------------------------

  # fdisk -ul /dev/sdc

  Disk /dev/sdc: 64 heads, 32 sectors, 4095 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/sdc2            32    292863    146416    5  Extended
  /dev/sdc3        292864   8386559   4046848   fd  Linux raid autodetect
  /dev/sdc5            64    260095    130016   83  Linux native - development
  /dev/sdc6        260128    292863     16368   83  Linux native - test

  # ------------------------

   fdisk -ul /dev/sdd

  Disk /dev/sdd: 64 heads, 32 sectors, 4095 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/sdd2            32    292863    146416    5  Extended
  /dev/sdd3        292864   8386559   4046848   fd  Linux raid autodetect
  /dev/sdd5            64    260095    130016   83  Linux native - development
  /dev/sdd6        260128    292863     16368   83  Linux native - test

  # --------------------------

  # raidtab
  #
  raiddev /dev/md0
          raid-level      5
          nr-raid-disks   4
          persistent-superblock 1
          chunk-size      32

  # Spare disks for hot reconstruction
          nr-spare-disks  0
          device          /dev/sda3
          raid-disk       0
          device          /dev/sdb3
          raid-disk       1
          device          /dev/sdc3
          raid-disk       2
          device          /dev/sdd3
          raid-disk       3

  # boot partition
  #
  raiddev /dev/md1
          raid-level      1
          nr-raid-disks   2
          persistent-superblock 1
          chunk-size      32

  # Spare disks for hot reconstruction
          nr-spare-disks  0
          device          /dev/sda1
          raid-disk       0
          device          /dev/sdb1
          raid-disk       1

  # --------------------------

  # cat lilo.conf.sda
  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md0
  # geometry
    bios=0x80
    sectors=32
    heads=64
    cylinders=4095
  # dummy
    partition=/dev/md1
  # start of device "disk" above
    start=32

  boot=/dev/sda
  map=/boot/map
  install=/boot/boot.b

  image=/boot/bzImage
  root=/dev/md0
  label=LinuxRaid
  read-only

  # ------------------------
  # cat lilo.conf.sdb
  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md0
  # geometry
    bios=0x80
    sectors=32
    heads=64
    cylinders=4095
  # dummy
    partition=/dev/md1
  # start of device "disk" above
    start=32

  boot=/dev/sdb
  map=/boot/map
  install=/boot/boot.b

  image=/boot/bzImage
  root=/dev/md0
  label=LinuxRaid
  read-only



  7.  Appendix C. - ide RAID10 with initrd

  RAID1 over striped RAID0 pair.... the disks in the RAID0 sets are not
  quite the same size, but close enough.



  /dev/md0 is the /boot partition and is autostarted by the kernel
  /dev/md1 and /dev/md3 are the two RAID0 sets autostarted by the kernel
  /dev/md2 is the root partition and is started by initrd

  df
  Filesystem           1k-blocks      Used Available Use% Mounted on
  /dev/md2                118531     76485     35925  68% /
  /dev/md0                  1917      1361       457  75% /boot

  # ----------------------------

   fdisk -ul /dev/hda

  Disk /dev/hda: 4 heads, 46 sectors, 903 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1            46      4231      2093   fd  Linux raid autodetect
  /dev/hda2          4232    166151     80960   fd  Linux raid autodetect

  # ----------------------------

   fdisk -ul /dev/hdb

  Disk /dev/hdb: 5 heads, 17 sectors, 981 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdb1            17     83384     41684   fd  Linux raid autodetect

  # ----------------------------

   fdisk -ul /dev/hdc

  Disk /dev/hdc: 7 heads, 17 sectors, 1024 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdc1            17     84013     41998+  fd  Linux raid autodetect
  /dev/hdc2         84014    121855     18921   82  Linux swap

  # ----------------------------

   fdisk -ul /dev/hdd

  Disk /dev/hdd: 4 heads, 46 sectors, 903 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdd1            46      4231      2093   fd  Linux raid autodetect
  /dev/hdd2          4232    166151     80960   fd  Linux raid autodetect

  # ----------------------------

  # raidtab
  #
  raiddev /dev/md0
          raid-level      1
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/hda1
          raid-disk       0
          device          /dev/hdd1
          raid-disk       1

  raiddev /dev/md1
          raid-level      0
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/hdd2
          raid-disk       0
          device          /dev/hdb1
          raid-disk       1

  raiddev /dev/md2
          raid-level      1
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/md1
          raid-disk       0
          device          /dev/md3
          raid-disk       1

  raiddev /dev/md3
          raid-level      0
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/hda2
          raid-disk       0
          device          /dev/hdc1
          raid-disk       1

  # ----------------------------

  contents of linuxrc

   cat linuxrc
  #!/bin/sh
  # ver 1.02 2-22-00
  #
  ############# really BEGIN 'linuxrc' ###############
  #
  # mount the proc file system
  /bin/mount /proc

  # start raid 1 made of raid 0's
  /bin/raidstart /dev/md2

  # tell the console what's happening
  /bin/cat /proc/mdstat

  # Everything is fine, let the kernel mount /dev/md2
  # tell the kernel to switch to /dev/md2 as the /root device
  # The 0x900 value is the device number calculated by:
  #  256*major_device_number + minor_device number
  echo "/dev/md2 mounted on root"
  echo 0x902>/proc/sys/kernel/real-root-dev

  # umount /proc to deallocate initrd device ram space
  /bin/umount /proc
  exit

  # ----------------------------

  contents of initrd

  ./bin/ash
  ./bin/echo
  ./bin/raidstart
  ./bin/mount
  ./bin/umount
  ./bin/cat
  ./bin/sh
  ./dev/tty1
  ./dev/md0
  ./dev/md1
  ./dev/md2
  ./dev/md3
  ./dev/md4
  ./dev/console
  ./dev/hda
  ./dev/hda1
  ./dev/hda2
  ./dev/hda3
  ./dev/hdb
  ./dev/hdb1
  ./dev/hdb2
  ./dev/hdb3
  ./dev/hdc
  ./dev/hdc1
  ./dev/hdc2
  ./dev/hdc3
  ./dev/hdd
  ./dev/hdd1
  ./dev/hdd2
  ./dev/hdd3
  ./dev/initrd
  ./dev/ram0
  ./dev/ram1
  ./dev/ram2
  ./dev/ram3
  ./dev/ram4
  ./dev/ram5
  ./dev/ram6
  ./dev/ram7
  ./etc/raidtab
  ./etc/fstab
  ./lib/ld-2.1.2.so
  ./lib/ld-linux.so.1
  ./lib/ld-linux.so.1.9.9
  ./lib/ld-linux.so.2
  ./lib/ld.so
  ./lib/libc-2.1.2.so
  ./lib/libc.so.6
  ./linuxrc
  ./proc



  8.  Appendix D. - ide RAID1-10 with initrd

  This is a system made up of an assortment of odds and ends. The root
  mounted raid device is comprised of a RAID1 made up of one RAID0 array
  from odd sized disks and a larger regular disk partition.  Examination
  of the lilo.conf files may give you better insight into the reasoning
  behind the various parameters.



  /dev/md0 is the /boot partition and is autostarted by the kernel
  /dev/md1 is one half of the mirror set for md2, autostarted by kernel
  /dev/hda3 is the other half of the mirror set for md2
  /dev/md2 is the RAID1 /dev/md1 + /dev/hda3, started by initrd

  df
  Filesystem           1k-blocks      Used Available Use% Mounted on
  /dev/md2                138381     74421     56815  57% /
  /dev/md0                  2011      1360       549  71% /boot

  # ----------------------------

   fdisk -ul /dev/hda

  Disk /dev/hda: 8 heads, 46 sectors, 903 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1            46      4415      2185   fd  Linux raid autodetect
  /dev/hda2          4416     43423     19504   82  Linux swap
  /dev/hda3         43424    332303    144440   83  Linux native

  # ----------------------------

   fdisk -ul /dev/hdc

  Disk /dev/hdc: 8 heads, 39 sectors, 762 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdc1            39      4367      2164+  fd  Linux raid autodetect
  /dev/hdc2          4368     70199     32916   82  Linux swap
  /dev/hdc3         70200    237743     83772   fd  Linux raid autodetect

  # ----------------------------

   fdisk -ul /dev/hdd

  Disk /dev/hdd: 4 heads, 39 sectors, 762 cylinders
  Units = sectors of 1 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hdd1            39    118871     59416+  fd  Linux raid autodetect

  # ----------------------------

  # raidtab
  #
  raiddev /dev/md0
          raid-level      1
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/hdc1
          raid-disk       1
          device          /dev/hda1
          raid-disk       0

  raiddev /dev/md1
          raid-level      0
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/hdc3
          raid-disk       0
          device          /dev/hdd1
          raid-disk       1

  raiddev /dev/md2
          raid-level      1
          nr-raid-disks   2
          persistent-superblock   1
          chunk-size      8
          device          /dev/md1
          raid-disk       1
          device          /dev/hda3
          raid-disk       0

  # ----------------------------

   cat linuxrc
  #!/bin/sh
  # ver 1.02 2-22-00
  #
  ############# really BEGIN 'linuxrc' ###############
  #
  # mount the proc file system
  /bin/mount /proc

  # autostart /boot partition and raid0
  /bin/raidstart /dev/md2

  # tell the console what's happening
  /bin/cat /proc/mdstat

  # Everything is fine, let the kernel mount /dev/md2
  # tell the kernel to switch to /dev/md2 as the /root device
  # The 0x900 value is the device number calculated by:
  #  256*major_device_number + minor_device number
  echo "/dev/md2 mounted on root"
  echo 0x902>/proc/sys/kernel/real-root-dev

  # umount /proc to deallocate initrd device ram space
  /bin/umount /proc
  exit

  # ----------------------------

  contents of initrd.gz

  ./bin
  ./bin/ash
  ./bin/echo
  ./bin/raidstart
  ./bin/mount
  ./bin/umount
  ./bin/cat
  ./bin/sh
  ./dev/tty1
  ./dev/md0
  ./dev/md1
  ./dev/md2
  ./dev/md3
  ./dev/console
  ./dev/hda
  ./dev/hda1
  ./dev/hda2
  ./dev/hda3
  ./dev/hdc
  ./dev/hdc1
  ./dev/hdc2
  ./dev/hdc3
  ./dev/hdd
  ./dev/hdd1
  ./dev/hdd2
  ./dev/hdd3
  ./dev/initrd
  ./dev/ram0
  ./dev/ram1
  ./dev/ram2
  ./dev/ram3
  ./dev/ram4
  ./dev/ram5
  ./dev/ram6
  ./dev/ram7
  ./etc/raidtab
  ./etc/fstab
  ./lib/ld-2.1.2.so
  ./lib/ld-linux.so.1
  ./lib/ld-linux.so.1.9.9
  ./lib/ld-linux.so.2
  ./lib/ld.so
  ./lib/libc-2.1.2.so
  ./lib/libc.so.6
  ./linuxrc
  ./proc

  # ----------------------------

   cat lilo.conf.hda
  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md2
  # geometry
    bios=0x80
    cylinders=903
    heads=8
    sectors=46
  # geometry for 2nd disk
  # bios will be the same because it will have to be moved to hda
  #  cylinders=762
  #  heads=8
  #  sectors=39

  # dummy
    partition=/dev/md0
  # start of device "disk" above
    start=46
  # second device
  #  start=39

  # seem to have some trouble with 2.2.14 recognizing the right IRQ
    append = "ide1=0x170,0x376,12 ether=10,0x300,eth0 ether=5,0x320,eth1"

  boot=/dev/hda
  map=/boot/map
  install=/boot/boot.b

  initrd=/boot/initrd.gz

  image=/boot/zImage
  root=/dev/md2
  label=LinuxRaid
  read-only

  # ----------------------------

   cat lilo.conf.hdc
  # GLOBAL SECTION
  # device containing /boot directory
  disk=/dev/md2
  # geometry
    bios=0x80
  #  cylinders=903
  #  heads=8
  #  sectors=46
  # geometry for 2nd disk
  # bios will be the same because it will have to be moved to hda
    cylinders=762
    heads=8
    sectors=39

  # dummy
    partition=/dev/md0
  # start of device "disk" above
  #  start=46
  # second device
    start=39

  # seem to have some trouble with 2.2.14 recognizing the right IRQ
    append = "ide1=0x170,0x376,12 ether=10,0x300,eth0 ether=5,0x320,eth1"

  boot=/dev/hdc
  map=/boot/map
  install=/boot/boot.b

  initrd=/boot/initrd.gz

  image=/boot/zImage
  root=/dev/md2
  label=LinuxRaid
  read-only



  Bridging mini-Howto
  Christopher Cole  cole@coledd.com
  v1.11, 7 September 1998

  This document describes how to setup an ethernet bridge.  What is an
  ethernet bridge?  An ethernet bridge is a device that controls data
  packets within a subnet in an attempt to cut down the amount of traf
  fic.  A bridge is usually placed between two separate groups of com
  puters that talk within themselves, but not so much with the computers
  in the other group.  A good example of this is to consider a cluster
  of Macintoshes and a cluster of unix machines.  Both of these groups
  of machines tend to be quite chatty amongst themselves, and the traf
  fic they produce on the network causes collisions for the other
  machines who are trying to speak to one another.  A bridge would be
  placed between these groups of computers.  The job of the bridge is
  then to examine the destination of the data packets one at a time and
  decide whether or not to pass the packets to the other side of the
  ethernet segment.  The result is a faster, quieter network with less
  collisions.
  ______________________________________________________________________

  Table of Contents


  1. Setup

  2. Common problems

  ______________________________________________________________________

  1.  Setup


  1. Get ``Bridge Config'':

       <ftp://shadow.cabi.net/pub/Linux/BRCFG.tgz>

  2. Enable multiple ethernet devices on your machine by adding this to
     your /etc/lilo.conf, and re-run lilo:


       append = "ether=0,0,eth1"

  If you have three interfaces on your bridge, use this line instead:


       append = "ether=0,0,eth1 ether=0,0,eth2"

  More interfaces can be found by adding more ether statements.  By
  default a stock Linux kernel probes for a single ethercard, and once
  one is found the probe ceases.  The above append statement tells the
  kernel to keep probing for more ethernet devices after the first one
  is found.
  Alternatively, the boot parameter can be used instead:


       linux ether=0,0,eth1

  Or, with 3 interfaces, use:


       linux ether=0,0,eth1 ether=0,0,eth2

  3. Recompile the kernel with BRIDGING enabled.

  4. A bridge should not have an IP address.  It CAN, but a plain bridge
     doesn't need one.  To remove the IP address from your bridge, go to
     /etc/sysconfig/network-scripts/ (for a RedHat system) and copy
     ifcfg-lo0 to ifcfg-eth0 & ifcfg-eth1.  In these 2 eth files, change
     the line containing ``DEVICE=lo'' to ``DEVICE=eth0'' and
     ``DEVICE=eth1''.  Other distributions may deviate from this, do
     what you need to do!  If there are more than 2 interfaces to this
     bridge, be sure to make the corresponding configurations to those,
     as well.

  5. Reboot, so you are running the new kernel with bridging in it, and
     also to make sure that an IP addresses are not bound to the network
     interfaces.

  6. Once the system is back up, put the ethernet cards into promiscuous
     mode, so they will look at every packet that passes by its
     interface:


       ifconfig eth0 promisc ; ifconfig eth1 promisc

  All interfaces which are connected to network segments to be bridged
  are to be put into promiscuous mode.

  7. Turn bridging ON using the brcfg program:


       brcfg -ena

  8. Verify that there is different traffic on each interface:


       tcpdump -i eth0      (in one window)
       tcpdump -i eth1      (in another window)


  9. Run a sniffer or tcpdump on another machine to verify the bridge is
     separating the segment correctly.

  2.  Common problems


  1.

     Question
        I get the message


          ioctl(SIOCGIFBR) failed: Package not installed

     What does this mean?

     Answer
        You don't have bridging capability in your kernel.  Get a 2.0 or
        greater kernel, and recompile with the BRIDGING option enabled.


  2.

     Question
        Machines on one side cannot ping the other side!

     Answer

       Did you enable bridging using ``brcfg -ena''?  (brcfg should say
        ``bridging is ENABLED'')

       Did you put the interfaces into promiscuous mode?  (issue the
        ``ifconfig'' command.  The ``PROMISC'' flag should be on for
        both interfaces.)

       If using multiple-media interface adapters, make sure that the
        correct one is enabled.  You may need to use the config/setup
        program that came with the network interface card.


  3.

     Question
        I cannot telnet/ftp from the bridge! Why?

     Answer
        This is because there is no IP address bound to any of bridge
        interfaces.  A bridge is to be a transparent part of a network.


  4.

     Question
        What do I need to set up in the way of routing?

     Answer
        Nothing!  All routing intelligence is handled by the bridging
        code in the kernel.  To see the ethernet addresses as they are
        learned by the bridge, use the brcfg program in debug mode:

     brcfg -deb

  5.

     Question
        The bridge appears to work, but why doesn't ``traceroute'' show
        the bridge as a part of the path?

     Answer
        Due to the nature of a bridge, a ``traceroute'' should NOT show
        the bridge as a part of the path. A bridge is to be a
        transparent component of the network.


  6.

     Question
        Is it necessary to compile IP_FORWARD into the kernel?

     Answer
        No. The bridging code in the kernel takes care of the packet
        transport.  IP_FORWARD is for a gateway which has IP addresses
        bound to its interfaces.


  7.

     Question
        Why are the physical ethernet addresses for port 1 and port 2
        the same according to the ``brcfg'' program?  Shouldn't they be
        different?

     Answer
        No. Every port on a bridge intentionally is assigned the same
        physical ethernet address by the bridging code.


  8.

     Question
        Bridging does not appear to be an option when performing a make
        config on the kernel.  How does one enable it?

     Answer
        During the kernel config, answer 'Y' to the question, ``Prompt
        for development and/or incomplete code/drivers
        (CONFIG_EXPERIMENTAL) [Y/n/?]''.


  9.

     Question
        Too many hubs (4 or more) chained one after another (in series)
        cause timing problems on an ethernet.  What effect does a bridge
        have in a subnet that is layered with hubs?

     Answer
        A bridge resets the 3/4/5 hubs rule.  A bridge does not deal
        with packets the way a hub does, and is therefore not a
        contributor to timing problems on a network.

  10.

     Question
        Can a bridge interface to both 10Mb and 100Mb ethernet segments?
        Will such a configuration slow down the rest of the traffic on
        the high speed side?

     Answer
        Yes, a bridge can tie together a 10Mb segment with a 100Mb
        segment.  As long as the network card on the fast network is
        100Mb capable, TCP takes care of the rest.  While it's true that
        the packets from a host in the 100Mb network communicating to a
        host in the 10Mb network are moving at only 10Mb/s, the rest of
        the traffic on the fast ethernet is not slowed down.

  Linux Bridge+Firewall Mini-HOWTO version 1.2.0
  Peter Breuer (ptb@it.uc3m.es)
  v, 19 December 1997
  ____________________________________________________________

  Table of Contents


  1. Introduction

  2. What and Why (and How?)

     2.1 What
     2.2 Why
     2.3 How?

  3. BRIDGING

     3.1 Software
     3.2 Prior Reading.
     3.3 Boot configuration
     3.4 Kernel configuration
     3.5 Network addresses
     3.6 Network routing
     3.7 Card configuration
     3.8 Additional routing
     3.9 Bridge Configuration
     3.10 Try it out
     3.11 Checks

  4. FIREWALLING

     4.1 Software and reading
     4.2 Preliminary checks
     4.3 Default rule
     4.4 Holes per address
     4.5 Holes per protocol
     4.6 Checks


  ______________________________________________________________________

  1.  Introduction

  You should look at the original Bridging mini-HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Bridge> by Chris Cole
  for a different perspective on this.  He is chris@polymer.uakron.edu.
  The version of his HOWTO that I have based this document on
  (alternatively, ripped off) is 1.03 dated Aug 23 1996.

  2.  What and Why (and How?)

  2.1.  What

  A bridge is an intelligent connecting wire betwen two network cards.
  A firewall is an intelligent insulator.


  2.2.  Why

  You might want a bridge if you have several computers:

  1. to save the price of a new hub when you just happen to have an
     extra ethernet card available.

  2. to save the bother of learning how to do IP-forwarding and other
     tricks when you _have_ two cards in your computer.

  3. to avoid maintenance work in the future when things change around!


  ``Several computers'' might be as few as three if those are routing or
  bridging or just moving around the room from time to time! You also
  might want a bridge just for the fun of finding out what it does.
  ``2'' was what I wanted a bridge for.


  If you are really interested in ``1'', you have to be one of the very
  few.  Check the NET-2-HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/NET-2-HOWTO> and the
  Serial-HOWTO <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/Serial-HOWTO>
  for better tricks.


  You want a firewall if


  1. you are trying to protect your network from external accesses, or

  2. you are trying to deny access to the world outside from your
     network.


  Curiously, I needed ``2'' here too.  Policy at my university presently
  is that we should not act as internet service providers to
  undergraduates.


  2.3.  How?

  I started out bridging the network cards in a firewalling machine and
  ended up firewalling without having cut the bridge. It seems to work
  and is more flexible than either configuration alone. I can take down
  the firewall and keep bridging or take down the bridge when I want to
  be more circumspect.


  I would guess that the bridge code lives just above the physical
  device layer and the firewalling code lives one layer higher up, so
  that the bridging and firewalling configurations effectively act as
  though they are running connected together ``in sequence'' and not
  ``in parallel'' (ouch!). Diagram:

       -> Bridge-in -> Firewall-in -> Kernel -> Firewall-out -> Bridge-out ->

  There is no other way to explain how one machine can be a
  ``conductor'' and an ``insulator'' at the same time.  There are a few
  caveats but I'll come to those later.  Basically you must route
  packets that you want to firewall.  Anyway, it all seems to work
  together nicely for me.  Here is what you do ...


  3.  BRIDGING

  3.1.  Software

  Get the bridge configuration utility
  <ftp://shadow.cabi.net/pub/Linux/BRCFG.tgz> from Alan Cox's home
  pages. This is the same reference as in Chris' document. I just didn't
  realize that it was an ftp and not an http URL ...

  3.2.  Prior Reading.

  Read the Multiple Ethernet HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Multiple-Ethernet>
  for some advice on getting more than one network card recognized and
  configured.


  Yet more details of the kind of boot magic that you may need are in
  the Boot Prompt HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/BootPrompt-HOWTO>.


  You may be able to get away without the NET-2 HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/NET-2-HOWTO>. It is a good
  long read and you will have to pick from it the details you need.


  3.3.  Boot configuration

  The reading material above will tell you that you need to prepare the
  kernel to recognize a second ethernet device at boot up by adding this
  to your /etc/lilo.conf, and then re-run lilo:

       append = "ether=0,0,eth1"

  Note the "eth1". "eth0" is the first card. "eth1" is the second card.
  You can always add the boot parameters in your response to the line
  that lilo offers you. This is for three cards:

       linux ether=0,0,eth1 ether=0,0,eth2

  I use loadlin to boot my kernel from DOS:

       loadlin.exe c:\vmlinuz root=/dev/hda3 ro ether=0,0,eth1 ether=0,0,eth2

  Note that this trick makes the kernel probe at bootup. That will not
  happen if you load the ethernet drivers as modules (for safety since
  the probe order can't be determined) so if you use modules you will
  have to add the appropriate IRQ and port parameters for the driver in
  your /etc/conf.modules.  I have at least

       alias eth0 3c509
       alias eth1 de620
       options 3c509 irq=5 io=0x210
       options de620 irq=7 bnc=1

  You can tell if you use modules by using ``ps -aux'' to see if kerneld
  is running and checking that there are .o files in a subdirectory of
  your /lib/modules directory. You want the directory named with what
  uname -r tells you. If you have kerneld and/or you have a foo.o then
  edit /etc/conf.modules and read the man page for depmod carefully.


  Note also that until recently (kernel 2.0.25) the 3c509 driver could
  not be used for more than one card if used as a module. I have seen a
  patch floating around that fixes the oversight. It may be in the
  kernel when you read this.


  3.4.  Kernel configuration

  Recompile the kernel with bridging enabled.

       CONFIG_BRIDGE=y

  I also compiled with firewalling and IP-forwarding and -masquerading
  and the rest enabled. Only if you want firewalling too ...

       CONFIG_FIREWALL=y
       CONFIG_NET_ALIAS=y
       CONFIG_INET=y
       CONFIG_IP_FORWARD=y
       CONFIG_IP_MULTICAST=y
       CONFIG_IP_FIREWALL=y
       CONFIG_IP_FIREWALL_VERBOSE=y
       CONFIG_IP_MASQUERADE=y

  You don't need all of this. What you do need apart from this is the
  standard net configuration:


       CONFIG_NET=y

  and I do not think you need worry about any of the other networking
  options. I have any options that I did not actually compile into the
  kernel available through kernel modules that I can add in later.


  Install the new kernel in place, rerun lilo and reboot with the new
  kernel. Nothing should have changed at this point!

  3.5.  Network addresses

  Chris says that a bridge should not have an IP address but that is not
  the setup to be described here.


  You are going to want to use the machine for connecting to the net so
  you need an address and you need to make sure that you have the
  loopback device configured in the normal way so that your software can
  talk to the places they expect to be able to talk to. If loopback is
  down the name resolver or other net sevices might fail. See the
  NET-2-HOWTO, but your standard configuration should already have done
  this bit:

       ifconfig lo 127.0.0.1 route add -net 127.0.0.0

  You will have to give addresses to your network cards. I altered the
  /etc/rc.d/rc.inet1 file in my slackware (3.x) to setup two cards and
  you should also essentially just look for your net configuration file
  and double or treble the number of instructions in it.  Suppose that
  you already have an address at

       192.168.2.100

  (that is in the private net reserved address space, but never mind -
  it won't hurt anybody if you use this address by mistake) then you
  probably already have a line like

       ifconfig eth0 192.168.2.100 netmask 255.255.255.0 metric 1

  in your configuration. The first thing you are going to probably want
  to do is cut the address space reached by this card in half so that
  you can eventually bridge or firewall the two halves.  So add a line
  which reduces the mask to address a smaller number of machines:

       ifconfig eth0 netmask 255.255.255.128

  Try it too. That restricts the card to at most the address space
  between .0 and .127.


  Now you can set your second card up in the other half of the local
  address space. Make sure that nobody already has the address. For
  symmetry I set it at 228=128+100 here. Any address will do so long as
  it is not in the other card's mask, and even then, well, maybe. Avoid
  special addresses like .0, .1, .128 etc. unless you really know what
  you are doing.

       ifconfig eth1 192.168.2.228 netmask 255.255.255.128 metric 1

  That restricts the second card to addresses between .128 and .255.


  3.6.  Network routing

  This is where I have to announce the caveats in the bridging +
  firewalling scheme: you cannot firewall packets which are not routed.
  No routes, no firewall. At least this appears to be true in the 2.0.30
  and more recent kernels. The firewalling filters are closely involved
  with the ip-forwarding code.


  That does not mean that you cannot bridge. You can bridge between two
  cards and firewall them from a third. You can have only two cards and
  firewall both of them against an outside IP such as a nearby router,
  provided that the router is routed by you to exactly one of the cards.


  In other words, since I will be doing firewalling, so I want to
  precisely control the physical destination of some packets.


  I have the small net of machines attached to a hub hanging off eth0,
  so I configure a net there:

       route add -net 192.168.2.128 netmask 255.255.255.128 dev eth0

  The 128 would be 0 if I had a full class C network there.  I don't, by
  definition, since I just halved the address space.  The "dev eth0" is
  not necessary here because the cards address falls within the mask,
  but it may be necessary for you.  One might need more than one card
  holding up this subnet (127 machines on one segment, oh yeah) but
  those cards would be being bridged under the same netmask so that they
  appear as one to the routing code.


  On the other card I have a line going straight through to a big router
  that I trust.


                                               client 129
           __                                        |    __
  client 1   \    .0                    .128         |   /   net 1
  client 2 --- Hub - eth0 - Kernel - eth1 - Hub - Router --- net 2
  client 3 __/       .100            .228         .2 |   \__ net 3
                                                     |
                                               client 254

  I attach the address of the router to that card as a fixed ("static")
  route because it would otherwise fall within the first cards netmask
  and the kernel would be thinking wrongly about how to send packets to
  the big router. I will want to firewall these packets and that is
  another reason fow wanting to route them specifically.

       route add 192.168.2.2 dev eth1

  I don't need it, since I don't have any more machines in that half of
  the address space, but I declare a net also on the second card.
  Separating my interfaces into two sets via routing will allow me to do
  very tight firewalling eventually , but you can get away with far less
  routing than this.

       route add -net 192.168.2.128 netmask 255.255.255.128 dev eth1

  I also need to send all non-local packets out to the world so I tell
  the kernel to send them to the big router

       route add default gw 192.168.2.2

  3.7.  Card configuration

  So much was standard networking setup, but we are bridging so we also
  have to listen on both (?) cards for packets that are not aimed at us.
  The following should go into the network configuration file.
       ifconfig promisc eth0 ifconfig promisc eth1

  The man page says allmulti=promisc, but it didn't work for me.


  3.8.  Additional routing

  One thing that I noticed was that I had to put at least the second
  card into a mode where it would respond to the big router's questions
  about which machines I was hiding in my local net.

       ifconfig arp eth1

  For good measure I did this to the other card too.

       ifconfig arp eth0.

  3.9.  Bridge Configuration

  Put bridging enabling on and into your configuration file:

       brcfg -enable

  You should have been trying this out in real time all along, of
  course!  The bridge configure will bring up some numbers. You can
  experiment with turning on and off the ports one at a time

       brcfg -port 0 -disable/-enable
        brcfg -port 1 -disable/-enable

  You get status reports anytime by just running

       brcfg

  without any parameters. You will see that the bridge listens,learns,
  and then does forwarding. (I don't understand why the code repeats the
  same hardware addresses for both my cards, but never mind .. Chris'
  howto say that is OK)


  3.10.  Try it out

  If you are still up and running as things are, try out your
  configuration script for real by taking down both cards and then
  executing it:

       ifconfig eth0 down ifconfig eth1 down /etc/rc.d/rc.inet1

  With any luck the various subsystems (nfs, ypbind, etc.)  won't
  notice. Do not try this unless you are sitting at the keyboard!


  If you want to be more careful than this, you should take down as many
  daemons as possible beforehand, and unmount nfs directories. The worst
  that can happen is that you have to reboot in single-user mode (the
  "single" parameter to lilo or loadlin), and take out your changes
  before rebooting with things the way they were before you started.


  3.11.  Checks

  Verify that there is different traffic on each interface:

       tcpdump -i eth0

       tcpdump -i eth1

  You should get used to using tcpdump to look for things that should
  not be happening or that are happening and should not.


  For instance look for packets that have gone through the bridge to the
  second card from the internal net. Here I am looking for packets from
  the machine with address .22:

       tcpdump -i eth1 -e host 192.168.2.22

  Then send a ping from the .22 host to the router. You should see the
  packet reported by tcpdump.

  At this stage you should have a bridge ready that also has two network
  addreses.  Test that you can ping them from outside and inside your
  local net, and that you can telnet and ftp around between inside and
  outside too.


  4.  FIREWALLING

  4.1.  Software and reading

  You should read the Firewall-HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/Firewall-HOWTO>.


  That will tell you where to get ipfwadm if you don't already have it.
  There are other tools you can get but I made no progress until I tried
  ipfwadm. It is nice and low level! You can see exactly what it is
  doing.


  4.2.  Preliminary checks

  You have compiled IP-forwarding and masquerading into the kernel so
  you will want to check that the firewall is in its default (accepting)
  state with

       ipfwadm -I -l ipfwadm -O -l ipfwadm -F -l

  That is respectively, "display the rules affecting the .."  incoming
  or outgoing or forwarding (masquerading) ".. sides of the firewall".
  The "-l" means "list".


  You might have compiled in accounting too:

       ipfwadm -A -l

  You should see that there are no rules defined and that the default is
  to accept every packet. You can get back to this working state anytime
  with

       ipfwadm -I -f
       ipfwadm -O -f
       ipfwadm -F -f

  The "-f" means "flush". You may need to use that.


  4.3.  Default rule

  I want to cut the world off from my internal net and do nothing else,
  so I will want to give as a last (default) rule that the firewall
  should ignore any packets coming in from the internal net and directed
  to outside.  I put all the rules (in this order) into
  /etc/rc.d/rc.firewall and execute it from /etc/rc.d/rc.local at
  bootup.

       ipfwadm -I -a reject -S 192.168.2.0/255.255.255.128 -D 0.0.0.0/0.0.0.0

  The "-S" is the source address/mask. The "-D" is the destination
  address/mask.


  This format to is rather long-winded. Ipfwadm is intelligent about
  network names and some common abbreviations. Check the man pages.


  It is possibly more convenient to put some or all of these rules on
  the outgoing half of the firewall by using "-O" instead of "-I", but
  I'll state the rules here all formulated for the incoming half.


  4.4.  Holes per address

  Before that default rule, I have to place some rules that serve as
  exceptions to this general denial of external services to internal
  clients.


  I want to treat the firewall machines address on the internal net
  specially.  I will stop people logging in to the firewall machine
  unless they have special permission, but once they are there they
  should be allowed to talk to the world.

       ipfwadm -I -i accept -S 192.168.2.100/255.255.255.255 \
        -D 0.0.0.0/0.0.0.0

  I also want the internal clients to be able to talk to the firewalling
  machine. Maybe they can persuade it to let them get out!

       ipfwadm -I -i accept -S 192.168.2.0/255.255.255.128 \
        -D 192.168.2.100/255.255.255.255

  Check at this point that you can get in to the clients from outside
  the firewall via telnet, but that you cannot get out. That should mean
  that you can just about make first contact, but the clients cannot
  send you any prompts. You should be able to get all the way in if you
  use the firewall machine as a staging post. Try rlogin and ping too,
  with tcpdump running on one card or the other. You should be able to
  make sense of what you see.


  4.5.  Holes per protocol

  I went on to relax the rules protocol by protocol. I want to allow
  pings from the outside to the inside to get an echo back, for
  instance, so I inserted the rule:

       ipfwadm -I -i accept -P icmp -S 192.168.2.0/255.255.255.128 \
        -D 0.0.0.0/0.0.0.0

  The "-P icmp" works the protocol-specific magic.

  Until I get hold of an ftp proxy I am also allowing ftp calls out with
  port-specific relaxations. This targets ports 20 21 and 115 on outside
  machines.

       ipfwadm -I -i accept -P tcp -S 192.168.2.0/255.255.255.128 \
        -D 0.0.0.0/0.0.0.0 20 21 115

  I could not make sendmail between the local clients work without a
  nameserver. Rather than set up a nameserver right then on the
  firewall, I just lifted the firewall for tcp domain service queries
  precisely aimed at the nearest existing nameserver and put its address
  in the clients /etc/resolv.conf ("nameserver 123.456.789.31" on a
  separate line).

       ipfwadm -I -i accept -P tcp -S 192.168.2.0/255.255.255.128 \
        -D 123.456.789.31/255.255.255.255 54

  You can find which port number and protocol a service requires with
  tcpdump. Trigger the service with a an ftp or a telnet or whatever to
  or from the internal machine and then watch for it on the input and
  output ports of the firewall with tcpdump:

       tcpdump -i eth1 -e host client04

  for example. The /etc/services file is another important source of
  clues. To let telnet and ftp IN to the firewall from outside, you have
  to allow the local clients to call OUT on a specific port. I
  understand why this is necessary for ftp - it's the server that
  establishes the data stream in the end - but I am not sure why telnet
  also needs this.

       ipfwadm -I -i accept -P tcp -S 192.168.2.0/255.255.255.128 ftp telnet \
        -D 0.0.0.0/0.0.0.0

  There is a particular problem with some daemons that look up the
  hostname of the firewalling machine in order to decide what is their
  networking address. Rpc.yppasswdd is the one I had trouble with. It
  insists on broadcasting information that says it is outside the
  firewall (on the second card). That means the clients inside can't
  contact it.


  Rather than start IP aliasing or change the daemon code, I mapped the
  name to the inside card address on the clients in their /etc/hosts.

  4.6.  Checks

  You want to test that you can still telnet, rlogin and ping from the
  outside. From the inside you should be able to ping out. You should
  also be able to telnet to the firewall machine from the inside and the
  latter should be able to do anything.


  That is it. At this point you probably want to learn about rpc/Yellow
  Pages and the interaction with the password file. The firewalled
  network wants to run without its unprivileged users being able to log
  on to the firewall - and thus get out. Some other HOWTO!

  Bridge + Firewall + DSL Mini-HOWTO
  Derek Ney  derek@hipgraphics.com <mailto:derek@hipgraph
  ics.com>

  Mar 24, 2000

  Configuring a Linux system to act as a firewall and bridge with a DSL
  network connection

  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 History
     1.2 New versions
        1.2.1 Version History
     1.3 Copyrights

  2. Bridging, Firewalls, and DSL connections

     2.1 The Problem
     2.2 The Solution
     2.3 Setup Overview
     2.4 References

  3. Procedure

     3.1 Example Setup
     3.2 Hardware Setup
     3.3 Bridge Config
     3.4 Kernel Configuration
     3.5 Putting It All Together
     3.6 Firewall Setup
     3.7 Local Machine Setup

  4. Quirks and Problems

     4.1 Odd message when using
     4.2 Shared Interrupts


  ______________________________________________________________________

  1.  Introduction

  1.1.  History

  This document was started on December 10, 1999 by Derek Ney
  derek@hipgraphics.com <mailto:derek@hipgraphics.com> after three day's
  worth of frustration with bridging and firewalling after switching
  from a PPP network link to a DSL link.

  1.2.  New versions

  The newest version may be found in different formats at the LDP
  homepage http://www.linuxdoc.org/ <http://www.linuxdoc.org/>.

  1.2.1.  Version History

  v0.03 (Mar 24, 2000)



    Fixed up URL for BRCFG.tgz

  v0.02 (Dec 13, 1999)


    Incorporate revisions from Leonard Dickens (thanks Leonard!)

  v0.01 (Dec 10, 1999)


    Initial version

  1.3.  Copyrights

  (c) 1999,2000 Derek R. Ney

  This document may be distributed under the terms set forth in the LDP
  license at http://www.linuxdoc.org/COPYRIGHT.html
  <http://www.linuxdoc.org/COPYRIGHT.html>.

  2.  Bridging, Firewalls, and DSL connections

  Until recently, our local network was hooked into the global net via
  PPP over a modem. I had installed a firewall using IPChains
  (http://www.linuxdoc.org/HOWTO/IPCHAINS-HOWTO.html
  <http://www.linuxdoc.org/HOWTO/IPCHAINS-HOWTO.html>) with this setup
  and it worked nicely. We recently upgraded to a DSL connection.  I
  thought it would be trivial to simply switch my firewall to insulate
  me from the larger net coming in via the DSL connection. I was wrong.
  It took three days of work to finally get it up and running. I found a
  lot of suspect information on the net that caused a good deal of
  confusion.  This mini-HOWTO was written because I suspected that our
  setup will be a quite common configuration in the future when DSL
  becomes more widespread and I wanted to help people avoid massive
  frustration.

  I guess this is applicable to a cable modem setup, but YMMV as I know
  nothing about cable modem hookups.

  2.1.  The Problem

  The problem I am trying to solve is to configure the system such that
  the firewall code in the kernel (that is manipulated with ipchains)
  can be used to filter the packets that travel back and forth between
  the outside world and the local network. I also needed some of the
  local machines to be "seen" on the global net (though always filtered
  through the firewall). This ruled out IP masquerading (see IP
  Masquerade HOWTO <http://www.linuxdoc.org/HOWTO/IP-Masquerade-
  HOWTO.html>) which would otherwise probably be a simpler solution.
  This is not as simple as it seems.


  2.2.  The Solution

  To accomplish our goal of insulating a local net from the global net
  (over DSL) by using our Linux box, we will use two ethernet (NIC)
  cards.  One card is hooked up to the local net and one to the global
  net. The only machine that can directly talk to the outside world is
  the Linux box. All other machines in our local net must go through the
  Linux box (firewall).

  Configuring the software really consists of two problems:


    Route packets between the local and global net (bridging)

    Filter the packets to stop some from traversing the firewall

  The Briding mini-Howto
  <http://www.linuxdoc.org/HOWTO/mini/Bridge.html> gives detailed
  instructions that solves the first problem by routing packets between
  the two sides of the network (local and global). This works by putting
  both NIC's into "promiscuous" mode such that they sniff all the
  packets on each NIC and transfer packets over when they belong on the
  other side.  This is done transparently; the other computers on the
  net do not even see the bridge, because it does not even have an IP
  address. But this does not totally solve the problem. I wanted the
  firewall to have an IP address (for administration via the network, if
  nothing else) and more importantly, the bridge code in the kernel
  intercepts and bridges packets BEFORE they get to the firewall code,
  so the firewall will have no effect.

  It turns out you can assign your NIC's IP addresses and still use them
  as a bridge. Although the Briding mini-Howto
  <http://www.linuxdoc.org/HOWTO/mini/Bridge.html> does not do this
  (well actually, it uses loopback addresses), it works fine.  That
  solves one problem. For the firewall problem, we turn to a fine kernel
  patch at http://ac2i.tzo.com/bridge_filter/
  <http://ac2i.tzo.com/bridge_filter/> that causes the firewall rules to
  be invoked for packets that are being bridged with a special new rule
  "bridgein".

  2.3.  Setup Overview

  This mini-HOWTO is meant to handle the situation where you have a
  Linux box configured as a gateway/firewall. The system has 2 NIC cards
  installed.  One of the NIC cards is connected to the outside world (in
  our case a DSL modem) and nothing else. The other NIC is connected to
  our local network.

  Note that I have only had one experience with this and it was on my
  i386 (ABIT BP6 MOBO, w/2 celery) box with RedHat 6.0 with the 2.2.13
  kernel, and a DSL modem going to a router, and two Netgear FA310TX NIC
  cards. Your mileage may vary.

  Also note that the steps here will leave your network open to
  potential attack during setup (before the firewall is turned on). If
  you are very paranoid you will want to take extra steps to avoid this.

  2.4.  References

  I found a good deal of information on the net that I used to finally
  get things working. Some of the information was useful, but
  inaccurate.

  The Briding mini-Howto
  <http://www.linuxdoc.org/HOWTO/mini/Bridge.html> was instrumental in
  getting things up. Unfortunately using it alone does not implement a
  firewall.

  The Linux Bridge+Firewall mini-HOWTO
  <http://www.linuxdoc.org/HOWTO/mini/Bridge+Firewall.html> at first
  looked like just what I needed. However, it turns out that I think it
  is inaccurate. I got things sort-of working with it, but in the end I
  realized that it was not necessary to split your sub-net in two like
  it directs and did not use that method. If you look at this document,
  take it with a grain of salt.

  The Bridge Filter Patch <http://ac2i.tzo.com/bridge_filter/> is the
  key to getting the whole thing to work. Oddly enough, the information
  on the web page directs you to the Bridge+Firewall mini-HOWTO. You do
  not need to use the information in Bridge+Firewall mini-HOWTO to get
  things to work.  You will need this patch.

  The IPCHAINS HOWTO <http://www.linuxdoc.org/HOWTO/IPCHAINS-HOWTO.html>
  is invaluable in setting up the firewall itself. I do not attempt to
  cover the details of firewall setup in this document; only issues
  which are different because of the bridging setup are mentioned here.

  3.  Procedure

  The basic procedure is as follows:


    Setup your hardware (and verify that it works)

    Patch and configure the kernel

    Configure your network (ifconfig, route, bridging)

    Configure the firewall

  3.1.  Example Setup

  Throughout this procedure, I will assume a setup with two ethernet
  (NIC) cards, an outside link via DSL (where a DSL modem connects to
  one of the NIC's), and a local net that connects to the other NIC. I
  will arbitrarily call the NIC to the DSL modem "eth1" and the local
  net NIC "eth0". The device naming by the kernel of the NIC's depends
  on what slot they are in.

  I will assume that you have been assigned a subnet of IP addresses at
  192.168.2.128-191, i.e. a netmask of 255.255.255.192, and the router
  provided by the DSL company is at 192.168.2.129. These are all
  arbitrary fictional examples to illustrate the setup. I will use the
  address 192.168.2.130 for the firewall machine (both NIC's), though it
  turns out you can also use distinct IP addresses for each NIC if you
  want.

  3.2.

  Hardware Setup

  You will need two ethernet cards to make this work. The biggest
  problem I had was that I randomly picked a slot in my motherboard for
  the second NIC and it turned out that that slot (PCI) shared an
  interrupt with the first NIC. I did not know that this was a problem
  (in fact there is little information about this, and I thought it
  should work fine). It caused both cards to shut down quietly (no error
  indication) and stop sending and receiving packets. Naturally when you
  are doing all sort of configuration changes, this is the last thing
  you need. I do not know if this is a problem with all PCI NIC cards or
  just ours, but I would advise against sharing interrupts.  The tulip
  driver, which we use, reports the IRQ for each NIC in syslog when you
  boot.  There is a bunch of information out there (see the Ethernet-
  HOWTO <http://www.linuxdoc.org/HOWTO/Ethernet-HOWTO.html> section
  Using More than one Ethernet Card per Machine
  <http://www.linuxdoc.org/HOWTO/Ethernet-HOWTO-3.html#ss3.2>) about
  making the kernel recognize two ethernet cards using boot arguments;
  however, I did not need this (my kernel recognized both cards with no
  arguments).

  Next, you need to hook the second NIC to the DSL modem (or whatever
  links you to the outside world) and make sure that it is working.  You
  should be able to ifconfig the second ethernet card to a proper IP
  address and ping the router on the other end of your outside link.
  This verifies that you can send and receive packets over the DSL link.
  For instance, for the sample net you would do:
    ifconfig eth1 192.168.2.130 netmask 255.255.255.192 broadcast 192.168.2.191



  to configure the NIC. And then


    ifconfig eth0 down # just to make sure it does not interfere with things
    ping 192.168.2.129



  to test that you can get to the router. For good measure, you should
  also test that you can get to the machines on your local network
  through the other NIC:


    ifconfig eth1 down # just to make sure it does not interfere with things
    ifconfig eth0 up
    ping 192.168.2.x # where x is the address for a machine on your local net



  At this point, you have verified that all the hardware is working.

  3.3.  Bridge Config

  You will need the bridge configuration utility
  <ftp://ftp.tux.org/people/alan-cox/BRCFG.tgz> from Alan Cox; this
  allows you to control the bridging in your kernel when CONFIG_BRIDGE
  is turned on. BRCFG is distributed as source with pre-compiled
  executables. I do not know what kernel the executable was compiled
  with, but I got different results after I recompiled it with my kernel
  (2.2.13) include files. Unfortunately, to do this I had to patch them
  slightly. Here are the patches:


  diff -C 3 -r /tmp/BRCFG/brcfg.c ./brcfg.c
  *** /tmp/BRCFG/brcfg.c  Wed Feb 21 19:11:59 1996
  --- ./brcfg.c   Wed Dec  8 12:52:23 1999
  ***************
  *** 1,6 ****

  ! #include <sys/types.h>
  ! #include <sys/socket.h>
    #include <skbuff.h>

    #include "br.h"
  --- 1,6 ----

  ! #include <types.h>
  ! #include <socket.h>
    #include <skbuff.h>

    #include "br.h"



  Apply the patch, recompile brcfg and install it somewhere appropriate
  (I chose /usr/sbin).


  3.4.  Kernel Configuration

  You will need to patch and configure your kernel for bridging and the
  bridging filter (as well as firewalling, networking, etc. if you do
  not already have it). The following kernel configuration items will be
  needed (at least):


    CONFIG_EXPERIMENTAL=y
    CONFIG_BRIDGE=y
    CONFIG_FIREWALL=y
    CONFIG_IP_FIREWALL=y



  You should grab the Bridge Filter Patch
  <http://ac2i.tzo.com/bridge_filter/> and apply it to your kernel.
  Recompile and install your kernel and then reboot.

  3.5.  Putting It All Together

  So you should have your two NIC's working, a newly configured kernel,
  and brcfg installed. Now you need to construct a startup script to put
  it all together. I did this using the RedHat type startup scripts
  (/etc/rc.d). I put specific network addresses and masks in
  /etc/sysconfig/network:


   GATEWAY=192.168.2.129          # the address of the DSL router
   GATEWAYDEV=eth1                # the NIC that the router is connected to
   ETH0_ADDR=192.168.2.130        # the IP address for the NIC on our LAN
   ETH0_MASK=255.255.255.192      # the netmask of our LAN
   ETH0_BROAD=192.168.2.191       # the broadcast address of our LAN
   ETH1_ADDR=192.168.2.130        # the IP address for the NIC on the DSL side
                                  # can be different from ETH0_ADDR if you want
   ETH1_MASK=$ETH0_MASK           # the DSL side netmask, should be the same as eth0
   ETH1_BROAD=$ETH1_BROAD         # ditto for the broadcast address



  Next I created a script in /etc/rc.d/init.d/bridge to setup the
  bridge:



  #!/bin/sh
  #
  # bridge      This shell script takes care of installing bridging for dsl
  #
  # description: Uses brcfg to start bridging and ifconfigs eths
  # processname: bridge
  # config:

  # Source function library.
  . /etc/rc.d/init.d/functions

  # Source networking configuration.
  . /etc/sysconfig/network

  # See how we were called.
  case "$1" in
    start)
          echo -n "Configuring bridge: "
          ifconfig eth0 $ETH0_ADDR netmask $ETH0_MASK broadcast $ETH0_BROAD
          ifconfig eth1 $ETH1_ADDR netmask $ETH1_MASK broadcast $ETH1_BROAD
          route add $GATEWAY dev $GATEWAYDEV
          route add default gw $GATEWAY dev $GATEWAYDEV
          ifconfig eth0 promisc
          ifconfig eth1 promisc
          brcfg -enable
          echo
          ;;
    stop)
          # Stop daemons.
          brcfg -disable
          ifconfig eth0 down
          ifconfig eth1 down
          ;;
    restart)
          $0 stop
          $0 start
          ;;
    status)
          ifconfig eth0
          ifconfig eth1
          brcfg
          ;;
    *)
          echo "Usage: bridge {start|stop|restart|status}"
          exit 1
  esac

  exit 0



  This script is run during bootup. It assigns addresses to each NIC,
  adds a default route that goes to the DSL router, adds a specific
  route direct to the DSL router, puts each NIC in "promiscuous" mode,
  and then enables bridging. I linked this script into the following
  directories in /etc/rc.d:



   /etc/rc.d/rc0.d/K90bridge
   /etc/rc.d/rc1.d/K90bridge
   /etc/rc.d/rc2.d/S11bridge
   /etc/rc.d/rc3.d/S11bridge
   /etc/rc.d/rc4.d/S11bridge
   /etc/rc.d/rc5.d/S11bridge
   /etc/rc.d/rc6.d/K90bridge



  This makes it run right after the network start script. You should
  disable other configuration of eth0 (or eth1) such as done in the
  /etc/rc.d/init.d/network script (in RedHat by removing files ifcfg-
  eth? from /etc/sysconfig/network-scripts/).

  To try things out, I suggest rebooting in single user mode (specify
  "single" as an arg to the kernel, e.g. in lilo "lilo: linux single")
  and running the startup scripts in /etc/rc.d/rc3.d one at a time until
  you get to the bridge startup. Startup the bridge and then see if you
  can reach some machines (you probably want to use "ping -n" for this
  to keep the nameserver out of the equation):


    ping the DSL router

    ping a local machine

    ping a machine on the global net

  If you can ping all those places, there is a good chance that things
  are working.  Note that the bridge takes a few moments to startup. You
  can monitor the status of the bridge by issuing the command brcfg with
  no arguments.

  3.6.  Firewall Setup

  You still need to setup your firewall (assuming you want one) to
  prevent unauthorized access. The Bridge Filter Patch
  <http://ac2i.tzo.com/bridge_filter/> that you applied allows you to
  use a new built-in rule "bridgein" with ipchains. This rule is used
  whenever a packet is going to be forwarded either from eth0 to eth1 or
  vice versa.  The bridgein rule is not used when a packet is destined
  for the firewall itself; you will want to use the input rule for that.
  I will not attempt to delve into the firewall setup in detail; please
  see the IPCHAINS HOWTO <http://www.linuxdoc.org/HOWTO/IPCHAINS-
  HOWTO.html> for that.

  3.7.  Local Machine Setup

  For each of your local machines, you simply have to setup the proper
  IP address and netmask and use the DSL router for the gateway (default
  route). The firewall/bridge will bridge the packets to/from the DSL
  router.

  4.  Quirks and Problems

  4.1.  Odd message when using ipchains -X

  The patch to add the bridgein built-in rule to ipchains makes the
  "delete all chains" command, ipchains -X, issue the following error:


   ipchains: Device or resource busy


  As far as I can tell this is harmless. I suspect that ipchains does
  not understand that the new bridgein rule is a builtin.

  4.2.  Shared Interrupts

  As I mentioned in ``Hardware Setup'', at least for PCI NIC's you do
  not want to share interrupts between the two cards (or probably with
  any other device).



  Bzip2 mini-HOWTO
  David Fetter, david@fetter.org <mailto:david@fetter.org>
  v2.00, 22 August 1999

  This document tells how to use the new bzip2 compression program.  The
  local copy of the sgml at the current site is here <Bzip2-HOWTO.sgml>,
  and the "author-itative" sgml is here <http://fet
  ter.org/Bzip2-HOWTO/>.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 (BF
        1.1.1 v2.00
        1.1.2 v1.92
        1.1.3 v1.91
        1.1.4 v1.9
        1.1.5 v1.8
        1.1.6 v1.7
        1.1.7 v1.6
        1.1.8 v1.5
        1.1.9 v1.4
        1.1.10 v1.3
        1.1.11 v1.2
        1.1.12 v1.1
        1.1.13 v1.0

  2. Getting bzip2

     2.1 Bzip2-HOWTO in your language
     2.2 Getting bzip2 precompiled binaries
     2.3 Getting bzip2 sources
     2.4 Compiling bzip2 for your machine

  3. Using bzip2 by itself

  4. Using bzip2 with tar

     4.1 Easiest to set up:
     4.2 Easy to set up, fairly easy to use, no need for root privileges:
     4.3 Also easy to use, but needs root access.

  5. Using bzip2 with less

  6. Using bzip2 with emacs

     6.1 Changing emacs for everyone:
     6.2 Changing emacs for one person:

  7. Using bzip2 with wu-ftpd

  8. Using bzip2 with grep

  9. Using bzip2 with Netscape under the X.

  10. Using bzip2 to recompress other compression formats

  ______________________________________________________________________

  1.  Introduction

  Bzip2 is a groovy new algorithm for compressing data.  It generally
  makes files that are 60-70% of the size of their gzip'd counterparts.


  This document will take you through a few common applications for
  bzip2.


  Future versions of the document will have applications of libbzip2,
  the bzip2 C library which bzip2's author, Julian Seward
  <mailto:Julian_Seward@muraroa.demon.co.uk> has kindly written.  The
  bzip2 manual, which includes low-level information about the library,
  can be found here <http://www.bzip2.org/bzip2/docs/manual_toc.html>.


  Future versions of the document may also include a summary of the
  discussion over whether (and how) bzip2 should be used in the Linux
  kernel.


  1.1.  Revision History

  1.1.1.  v2.00

  Changed the ``Using bzip2 with less'' section so .tar.bzip2 files can
  actually be read.  Thanks to Nicola Fabiano <mailto:mc8644@mclink.it>
  for the correction.

  Updated buzzit utility.

  Updated tar information.


  1.1.2.  v1.92

  Updated the ``Getting bzip2 binaries'' section, including adding
  S.u.S.E.'s.


  1.1.3.  v1.91

  Corrected a typo and clarified some shell idioms in the ``section on
  using bzip2 with tar''.  Thanks to Alessandro Rubini for these.


  Updated the buzzit tool not to stomp on the original bzip2 archive.


  Added bgrep, a zgrep-like tool.


  1.1.4.  v1.9

  Clarified the gcc 2.7.* problem.  Thanks to Ulrik Dickow for pointing
  this out.


  Added Leonard Jean-Marc's elegant way to work with tar.


  Added Linus kerlund's Swedish translation.

  Fixed the wu-ftpd section per Arnaud Launay's suggestion.


  Moved translations to their own section.


  1.1.5.  v1.8

  Put buzzit and tar.diff in the sgml where they belong. Fixed
  punctuation and formatting.  Thanks to Arnaud Launay for his help
  correcting my copy. :-)


  Dropped xv project for now due to lack of popular interest.


  Added teasers for future versions of the document.


  1.1.6.  v1.7

  Added buzzit utility.  Fixed the patch against gnu tar.


  1.1.7.  v1.6

  Added TenThumbs' Netscape enabler.


  Also changed lesspipe.sh per his sugestion.  It should work better
  now.


  1.1.8.  v1.5

  Added Arnaud Launay's French translation, and his wu-ftpd file.


  1.1.9.  v1.4

  Added Tetsu Isaji's Japanese translation.


  1.1.10.  v1.3

  Added Ulrik Dickow's .emacs for 19.30 and higher.


  (Also corrected jka-compr.el patch for emacs per his suggestion. Oops!
  Bzip2's doesn't yet(?) have an "append" flag.)


  1.1.11.  v1.2

  Changed patch for emacs so it automagically recognizes .bz2 files.


  1.1.12.  v1.1

  Added patch for emacs.


  1.1.13.  v1.0

  Round 1.

  2.  Getting bzip2

  Bzip2's home page is at The UK home site <http://www.bzip2.org/>.  The
  United States mirror site is here
  <http://www.digistar.com/bzip2/index.html>.


  2.1.  Bzip2-HOWTO in your language

  French speakers may wish to refer to Arnaud Launay's French documents.
  The web version is here
  <http://www.freenix.fr/linux/HOWTO/mini/Bzip2.html>, and you can use
  ftp here <ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/mini/Bzip2.gz>
  Arnaud can be contacted by electronic mail at this address
  <mailto:zoro@mygale.org>


  Japanese speakers may wish to refer to Tetsu Isaji's Japanese
  documents here <http://jf.gee.kyoto-u.ac.jp/JF/JF.html>.  Isaji can be
  reached at his home page <http://www2s.biglobe.ne.jp/~kaien/>, or by
  electronic mail at this address. <mailto:isaji@mxu.meshnet.or.jp>


  Swedish speakers may wish to refer to Linus kerlund's Swedish
  documents here <http://user.tninet.se/~uxm165t/linux_doc.html>.  Linus
  can be reached by electronic mail at this address.
  <mailto:uxm165t@tninet.se>


  2.2.  Getting bzip2 precompiled binaries

  See the home sites.


  2.3.  Getting bzip2 sources

  They come from the Official sites (see ``Getting Bzip2'' for where.


  2.4.  Compiling bzip2 for your machine

  If you have gcc 2.7.*, change the line that reads


       CFLAGS = -O3 -fomit-frame-pointer -funroll-loops

  to


       CFLAGS = -O2 -fomit-frame-pointer

  that is, replace -O3 with -O2 and drop the -funroll-loops.  You may
  also wish to add  any -m* flags (like -m486, for example) you use when
  compiling kernels.

  Avoiding -funroll-loops is the most important part, since this will
  cause many gcc 2.7's to generate wrong code, and all gcc 2.7's to
  generate slower and larger code.  For other compilers (lcc, egcs, gcc
  2.8.x) the default CFLAGS are fine.

  After that, just make it and install it per the README.


  3.  Using bzip2 by itself

  Read the Fine Manual Page :)


  4.  Using bzip2 with tar

  Listed below are three ways to use bzip2 with tar, namely

  4.1.  Easiest to set up:

  This method requires no setup at all.  To un-tar the bzip2'd tar
  archive, foo.tar.bz2 in the current directory, do


       /path/to/bzip2 -cd foo.tar.bz2 | tar xf -

  or


       tar --use-compress-prog=bzip2 xf foo.tar.bz2

  These work, but can be a PITA to type often.


  4.2.  Easy to set up, fairly easy to use, no need for root privileges:

  Thanks to Leonard Jean-Marc <mailto:leonard@sct1.is.belgacom.be> for
  the tip.  Thanks also to Alessandro Rubini
  <mailto:rubini@morgana.systemy.it> for differentiating bash from the
  csh's.


  In your .bashrc, you can put in a line like this:


       alias btar='tar --use-compress-program /usr/local/bin/bzip2 '

  In your .tcshrc, or .cshrc, the analogous line looks like this:


       alias btar 'tar --use-compress-program /usr/local/bin/bzip2'

  4.3.  Also easy to use, but needs root access.

  Update your tar to GNU's newest version, which is currently 1.13.10.
  It can be found at GNU's ftp site <ftp://alpha.gnu.org/gnu/tar/> or
  any mirror.
  5.  Using bzip2 with less

  To uncompress bzip2'd files on the fly, i.e. to be able to use "less"
  on them without first bunzip2'ing them, you can make a lesspipe.sh
  (man less) like this:

  #!/bin/sh
  # This is a preprocessor for 'less'.  It is used when this environment
  # variable is set:   LESSOPEN="|lesspipe.sh %s"

    case "$1" in
    *.tar) tar tvvf $1 2>/dev/null ;; # View contents of various tar'd files
    *.tgz) tar tzvvf $1 2>/dev/null ;;
  # This one work for the unmodified version of tar:
    *.tar.bz2) bzip2 -cd $1 $1 2>/dev/null | tar tvvf - ;;
  #This one works with the patched version of tar:
  # *.tar.bz2) tyvvf $1 2>/dev/null ;;
    *.tar.gz) tar tzvvf $1 2>/dev/null ;;
    *.tar.Z) tar tzvvf $1 2>/dev/null ;;
    *.tar.z) tar tzvvf $1 2>/dev/null ;;
    *.bz2) bzip2 -dc $1  2>/dev/null ;; # View compressed files correctly
    *.Z) gzip -dc $1  2>/dev/null ;;
    *.z) gzip -dc $1  2>/dev/null ;;
    *.gz) gzip -dc $1  2>/dev/null ;;
    *.zip) unzip -l $1 2>/dev/null ;;
    *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.man) FILE=`file -L $1` ; # groff src
      FILE=`echo $FILE | cut -d ' ' -f 2`
      if [ "$FILE" = "troff" ]; then
        groff -s -p -t -e -Tascii -mandoc $1
      fi ;;
    *) cat $1 2>/dev/null ;;
  #  *) FILE=`file -L $1` ; # Check to see if binary, if so -- view with 'strings'
  #    FILE1=`echo $FILE | cut -d ' ' -f 2`
  #    FILE2=`echo $FILE | cut -d ' ' -f 3`
  #    if [ "$FILE1" = "Linux/i386" -o "$FILE2" = "Linux/i386" \
  #         -o "$FILE1" = "ELF" -o "$FILE2" = "ELF" ]; then
  #      strings $1
  #    fi ;;
    esac

  6.  Using bzip2 with emacs

  6.1.  Changing emacs for everyone:

  I've written the following patch to jka-compr.el which adds bzip2 to
  auto-compression-mode.

  Disclaimer: I have only tested this with emacs-20.2, but have no
  reason to believe that a similar approach won't work with other
  versions.

  To use it,

  1. Go to the emacs-20.2/lisp source directory (wherever you untarred
     it)

  2. Put the patch below in a file called jka-compr.el.diff (it should
     be alone in that file ;).

  3. Do

   patch < jka-compr.el.diff

  4. Start emacs, and do


        M-x byte-compile-file jka-compr.el

  5. Leave emacs.

  6. Move your original jka-compr.elc to a safe place in case of bugs.

  7. Replace it with the new jka-compr.elc.

  8. Have fun!


     --- jka-compr.el        Sat Jul 26 17:02:39 1997
     +++ jka-compr.el.new    Thu Feb  5 17:44:35 1998
     @@ -44,7 +44,7 @@
      ;; The variable, jka-compr-compression-info-list can be used to
      ;; customize jka-compr to work with other compression programs.
      ;; The default value of this variable allows jka-compr to work with
     -;; Unix compress and gzip.
     +;; Unix compress and gzip.  David Fetter added bzip2 support :)
      ;;
      ;; If you are concerned about the stderr output of gzip and other
      ;; compression/decompression programs showing up in your buffers, you
     @@ -121,7 +121,9 @@


      ;;; I have this defined so that .Z files are assumed to be in unix
     -;;; compress format; and .gz files, in gzip format.
     +;;; compress format; and .gz files, in gzip format, and .bz2 files,
     +;;; in the snappy new bzip2 format from http://www.muraroa.demon.co.uk.
     +;;; Keep up the good work, people!
      (defcustom jka-compr-compression-info-list
        ;;[regexp
        ;; compr-message  compr-prog  compr-args
     @@ -131,6 +133,10 @@
           "compressing"    "compress"     ("-c")
           "uncompressing"  "uncompress"   ("-c")
           nil t]
     +    ["\\.bz2\\'"
     +     "bzip2ing"        "bzip2"         ("")
     +     "bunzip2ing"      "bzip2"         ("-d")
     +     nil t]
          ["\\.tgz\\'"
           "zipping"        "gzip"         ("-c" "-q")
           "unzipping"      "gzip"         ("-c" "-q" "-d")

  6.2.  Changing emacs for one person:

  Thanks for this one go to Ulrik Dickow, ukd@kampsax.dk
  <mailto:ukdATkampsax.dk>, Systems Programmer at Kampsax Technology:

  To make it so you can use bzip2 automatically when you aren't the
  sysadmin, just add the following to your .emacs file.
  ;; Automatic (un)compression on loading/saving files (gzip(1) and similar)
  ;; We start it in the off state, so that bzip2(1) support can be added.
  ;; Code thrown together by Ulrik Dickow for ~/.emacs with Emacs 19.34.
  ;; Should work with many older and newer Emacsen too.  No warranty though.
  ;;
  (if (fboundp 'auto-compression-mode) ; Emacs 19.30+
      (auto-compression-mode 0)
    (require 'jka-compr)
    (toggle-auto-compression 0))
  ;; Now add bzip2 support and turn auto compression back on.
  (add-to-list 'jka-compr-compression-info-list
               ["\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'"
                "zipping"        "bzip2"         ()
                "unzipping"      "bzip2"         ("-d")
                nil t])
  (toggle-auto-compression 1 t)

  7.  Using bzip2 with wu-ftpd

  Thanks to Arnaud Launay for this bandwidth saver.  The following
  should go in /etc/ftpconversions to do on-the-fly compressions and
  decompressions with bzip2. Make sure that the paths (like
  /bin/compress) are right.


   :.Z:  :  :/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
   :   : :.Z:/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
   :.gz: :  :/bin/gzip -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:GUNZIP
   :   : :.gz:/bin/gzip -9 -c %s:T_REG:O_COMPRESS:GZIP
   :.bz2: :  :/bin/bzip2 -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:BUNZIP2
   :   : :.bz2:/bin/bzip2 -9 -c %s:T_REG:O_COMPRESS:BZIP2
   :   : :.tar:/bin/tar -c -f - %s:T_REG|T_DIR:O_TAR:TAR
   :   : :.tar.Z:/bin/tar -c -Z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
   :   : :.tar.gz:/bin/tar -c -z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP
   :   : :.tar.bz2:/bin/tar -c -y -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+BZIP2

  8.  Using bzip2 with grep

  The following utility, which I call bgrep, is a slight modification of
  the zgrep which comes with Linux.  You can use it to grep through
  files without bunzip2'ing them first.

  #!/bin/sh

  # bgrep -- a wrapper around a grep program that decompresses files as needed
  PATH="/usr/bin:$PATH"; export PATH

  prog=`echo $0 | sed 's|.*/||'`
  case "$prog" in
          *egrep) grep=${EGREP-egrep}     ;;
          *fgrep) grep=${FGREP-fgrep}     ;;
          *)      grep=${GREP-grep}       ;;
  esac
  pat=""
  while test $# -ne 0; do
    case "$1" in
    -e | -f) opt="$opt $1"; shift; pat="$1"
             if test "$grep" = grep; then  # grep is buggy with -e on SVR4
               grep=egrep
             fi;;
    -*)      opt="$opt $1";;
     *)      if test -z "$pat"; then
               pat="$1"
             else
               break;
             fi;;
    esac
    shift
  done

  if test -z "$pat"; then
    echo "grep through bzip2 files"
    echo "usage: $prog [grep_options] pattern [files]"
    exit 1
  fi

  list=0
  silent=0
  op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
  case "$op" in
    *l*) list=1
  esac
  case "$op" in
    *h*) silent=1
  esac

  if test $# -eq 0; then
    bzip2 -cd | $grep $opt "$pat"
    exit $?
  fi

  res=0
  for i do
    if test $list -eq 1; then
      bzip2 -cdfq "$i" | $grep $opt "$pat" > /dev/null && echo $i
      r=$?
    elif test $# -eq 1 -o $silent -eq 1; then
      bzip2 -cd "$i" | $grep $opt "$pat"
      r=$?
    else
      bzip2 -cd "$i" | $grep $opt "$pat" | sed "s|^|${i}:|"
      r=$?
    fi
    test "$r" -ne 0 && res="$r"
  done
  exit $res


  9.  Using bzip2 with Netscape under the X.

  tenthumbs@cybernex.net says:


       I also found a way to get Linux Netscape to use bzip2 for Content-
       Encoding just as it uses gzip. Add this to $HOME/.Xdefaults or
       $HOME/.Xresources

       I use the -s option because I would rather trade some decompressing
       speed for RAM usage. You can leave the option out if you want to.

  Netscape*encodingFilters:      \
          x-compress :  : .Z     : uncompress -c  \n\
          compress   :  : .Z     : uncompress -c  \n\
          x-gzip     :  : .z,.gz : gzip -cdq      \n\
          gzip       :  : .z,.gz : gzip -cdq      \n\
          x-bzip2    :  : .bz2   : bzip2 -ds \n

  10.  Using bzip2 to recompress other compression formats

  The following perl program takes files compressed in other formats
  (.tar.gz, .tgz. .tar.Z, and .Z for this iteration) and repacks them
  for better compression.  The perl source has all kinds of neat
  documentation on what it does and how it does what it does.  This
  latest version takes files as input on the command line.  Without
  command line arguments, it tries to repack every file in the current
  working directory.

  #!/usr/bin/perl -w

  #######################################################
  #                                                     #
  # This program takes compressed and gzipped programs  #
  # in the current directory and turns them into bzip2  #
  # format.  It handles the .tgz extension in a         #
  # reasonable way, producing a .tar.bz2 file.          #
  #                                                     #
  #######################################################
  $counter = 0;
  $saved_bytes = 0;
  $totals_file = '/tmp/machine_bzip2_total';
  $machine_bzip2_total = 0;

  @raw = (defined @ARGV)?@ARGV:<*>;

  foreach(@raw) {
      next if /^bzip/;
      next unless /\.(tgz|gz|Z)$/;
      push @files, $_;
  }
  $total = scalar(@files);

  foreach (@files) {
      if (/tgz$/) {
          ($new=$_) =~ s/tgz$/tar.bz2/;
      } else {
          ($new=$_) =~ s/\.g?z$/.bz2/i;
      }
      $orig_size = (stat $_)[7];
      ++$counter;
      print "Repacking $_ ($counter/$total)...\n";
      if ((system "gzip -cd $_ |bzip2 >$new") == 0) {
          $new_size = (stat $new)[7];
          $factor = int(100*$new_size/$orig_size+.5);
          $saved_bytes += $orig_size-$new_size;
          print "$new is about $factor% of the size of $_. :",($factor<100)?')':'(',"\n";
          unlink $_;
      } else {
          print "Arrgghh!  Something happened to $_: $!\n";
      }
  }
  print "You've "
      , ($saved_bytes>=0)?"saved ":"lost "
      , abs($saved_bytes)
      , " bytes of storage space :"
      , ($saved_bytes>=0)?")":"("
      , "\n"
      ;

  unless (-e '/tmp/machine_bzip2_total') {
      system ('echo "0" >/tmp/machine_bzip2_total');
      system ('chmod', '0666', '/tmp/machine_bzip2_total');
  }


  chomp($machine_bzip2_total = `cat $totals_file`);
  open TOTAL, ">$totals_file"
       or die "Can't open system-wide total: $!";
  $machine_bzip2_total += $saved_bytes;
  print TOTAL $machine_bzip2_total;
  close TOTAL;

  print "That's a machine-wide total of ",`cat $totals_file`," bytes saved.\n";

  The Linux Cipe+Masquerading mini-HOWTO
  Anthony Ciaravalo, acj@home.com
  v1.2, 21 April 1999

  How to setup a VPN using Cipe on a linux masquerading firewall.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright statement
     1.2 Disclaimer
     1.3 Feedback
     1.4 Getting the files

  2. Firewall Configuration

     2.1 VPN Network Diagram
     2.2 A little reference
     2.3 Additional notes about scripts and the VPN

  3. Machine A Specific Configuration

     3.1 /etc/cipe/options.machineB
     3.2 /etc/cipe/options.machineC
     3.3 /etc/rc.d/rc.cipe
     3.4 Gateway

  4. Machine B Specific Configuration

     4.1 /etc/cipe/options.machineA
     4.2 /etc/rc.d/rc.cipe
     4.3 Gateway

  5. Machine C Specific Configuration

     5.1 /etc/cipe/options.machineA
     5.2 /etc/rc.d/rc.cipe
     5.3 Gateway

  6. Common Machine Configuration

     6.1 /etc/cipe/ip-up
        6.1.1 Kernel 2.0, ipfwadm, cipe 1.0.x
        6.1.2 Kernel 2.1/2.2, ipchains, cipe 1.2.x
     6.2 /etc/cipe/ip-down
        6.2.1 Kernel 2.0, ipfwadm, cipe 1.0.x
        6.2.2 Kernel 2.1/2.2, ipchains, cipe 1.2.x

  7. Example masquerading firewall scripts

     7.1 Kernel 2.0, ipfwadm
     7.2 Kernel 2.1/2.2, ipchains

  8. Putting it all together

  9. Connecting to the WAN

  10. References

     10.1 Web Sites
     10.2 Documentation


  ______________________________________________________________________

  1.  Introduction

  This is the Linux Cipe+Masquerading mini-HOWTO.  It shows how to setup
  a Virtual Private Network between your LAN and other LAN's using Cipe
  on linux masquerading firewall machines.  It also shows an example
  masquerading firewall configuration.


  1.1.  Copyright statement

  C)opyright 1998, 1999 Anthony Ciaravalo, acj@home.com

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at tjbynum@wallybox.cei.net or linux-
  howto@metalab.unc.edu


  1.2.  Disclaimer

  Use of the information and examples in this document is at your own
  risk.  There are many security issues involved when connecting
  networks across the internet.  Even though information is encrypted,
  an improperly configured firewall may result in a security breach.
  Precautions can be taken to protect your cipe connections, but it does
  not guarantee 100% security.  The author does not guarantee the
  information provided in this document will provide a secure networking
  environment.  Even though I have tried to be as accurate as possible
  creating this document, I am not responsible for any problems or
  damages incurred due to actions taken based on the information in this
  document.


  1.3.  Feedback

  Send questions, comments, suggestions, or corrections to acj@home.com.


  1.4.  Getting the files

  This howto was written based on Cipe versions 1.0.1 and 1.2.0.  See
  reference section for link to Cipe home page.

  2.  Firewall Configuration

  This howto assumes you already configured your kernel to support IP
  masquerade.  See references below for information on configuring your
  kernel for a linux firewall.

  2.1.  VPN Network Diagram

  This setup uses a star/hub configuration.  It will set up a cipe
  connection from Machine A to Machine B and another from Machine A to
  Machine C.

       ______________________________________________________________________

                          Machine A
                       eth0: 192.168.1.1
                       eth1: real ip 1
                      /               \
                     /                 \
            Machine B                  Machine C
          eth0: 192.168.2.1           eth0:192.168.3.1
          eth1: real ip 2             eth1: real ip 3
       ______________________________________________________________________

  2.2.  A little reference

       ______________________________________________________________________

       eth0 is the local network (fake address)
       eth1 is the internet address (real address)

       Port A is any valid port you would like to choose
       Port B is any other valid port you would like to choose

       Key A is any valid key you would like to choose  (read cipe doc for info)
       Key B is any valid key you would like to choose
       ______________________________________________________________________

  2.3.  Additional notes about scripts and the VPN

  The ip-up scripts currently only allow class c traffic through the
  cipe interface.  If you wish for machine B to communicate with Machine
  C then you will need to change the appropriate ip-up and ip-down
  scripts.  Specifically, you need to change the ptpaddr and myaddr
  netmasks.  There are two ip-up scripts, one for ipchains and one for
  ipfwadm.  Same with the ip-down scripts.  Change the appropriate
  incoming, outgoing, and forwarding cipe interface firewall rules
  netmask from /24 to /16. Any cipe firewall rule changes you make in
  ip-up for ipfwadm, make sure the ip-down script reflects the change so
  it will be properly removed from the list when the interface goes
  down.  For the ipchains file, anything added in a chain does not need
  ip-down reflection since ip-down will flush all the rules in the user
  defined chain.

  You will also need to uncomment the network route in the rc.cipe for
  Machine B and C that adds each others network to their route table.

  3.  Machine A Specific Configuration

  3.1.  /etc/cipe/options.machineB

       ______________________________________________________________________

       #uncomment 1 below
       #name for cipe 1.0.x
       #device          cip3b0
       #name for cipe 1.2.x
       device          cipcb0

       # remote internal (fake) ip address
       ptpaddr         192.168.2.1
       # my cipe (fake) ip address
       ipaddr          192.168.1.1
       # my real ip address and cipe port
       me              (real ip 1):(port A)
       # remote real ip address and cipe port
       peer            (real ip 2):(port A)
       #unique 128 bit key
       key             (Key A)
       ______________________________________________________________________

  3.2.  /etc/cipe/options.machineC

       ______________________________________________________________________

       #uncomment 1 below
       #name for cipe 1.0.x
       #device          cip3b1
       #name for cipe 1.2.x
       device          cipcb1

       # remote internal (fake) ip address
       ptpaddr         192.168.3.1
       # my cipe (fake) ip address
       ipaddr          192.168.1.1
       # my real ip address and cipe port
       me              (real ip 1):(port B)
       # remote real ip address and cipe port
       peer            (real ip 3):(port B)
       #unique 128 bit key
       key             (Key B)
       ______________________________________________________________________

  3.3.  /etc/rc.d/rc.cipe

  ______________________________________________________________________

  !#/bin/bash
  #rc.cipe  3/29/1999
  #Send questions or comments to acj@home.com.

  #Setup script path
  PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

  #Options filenames in cipe directory for cipe interfaces
  options="options.machineB options.machineC"

  #Automatically obtain options filenames from cipe directory
  #options=`/bin/ls /etc/cipe/options.*`

  #Uncomment 1 below for the cipe module name
  #cipemod="cip3b"        #for cipe 1.0
  cipemod="cipcb"        #for cipe 1.2

  #Check for cipe module and load if not already loaded
  grep $cipemod /proc/modules >/dev/null
  if [ "$?" = "1" ]; then
          echo Loading cipe module.
          modprobe $cipemod
          if [ "$?" = "1" ]; then
                  echo Error loading cipe module...exiting.
                  exit
          fi
  else
          echo Cipe module already loaded.
  fi

  #Remove any existing cipe interfaces
  cipeif=`cat /proc/net/dev | cut -f1 -d: | grep $cipemod`

  if [ "$cipeif" != "" ]; then
          echo Removing existing cipe interface(s).
          for i in $cipeif; do
                  ifconfig $i down
          done
  fi

  #Setup cipe interfaces
  echo -n "Setting up cipe interface(s): "
  for config in $options; do
          echo -n $config" "
          ciped -o $config
  done
  echo
  echo

  #Add routes for other remote networks via cipe interface(s)
  #route add -net x.x.x.x netmask x.x.x.x gw x.x.x.x

  ______________________________________________________________________

  3.4.  Gateway

  All machines on network 192.168.1.0 must have 192.168.1.1 as gateway.
  If you don't it will not work.


  4.  Machine B Specific Configuration

  4.1.  /etc/cipe/options.machineA

       ______________________________________________________________________

       #uncomment 1 below
       #name for cipe 1.0.x
       #device          cip3b0
       #name for cipe 1.2.x
       device          cipcb0

       #remote internal (fake) ip address
       ptpaddr         192.168.1.1
       # my cipe (fake) ip address
       ipaddr          192.168.2.1
       # my real ip address and cipe port
       me              (real ip 1):(port A)
       # remote real ip address and cipe port
       peer            (real ip 2):(port A)
       #unique 128 bit key
       key             (Key A)
       ______________________________________________________________________

  4.2.  /etc/rc.d/rc.cipe

  ______________________________________________________________________

  !#/bin/bash
  #rc.cipe  3/29/1999
  #Send questions or comments to acj@home.com.

  #Setup script path
  PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

  #Options filenames in cipe directory for cipe interfaces
  options="options.machineA"

  #Automatically obtain options filenames from cipe directory
  #options=`/bin/ls /etc/cipe/options.*`

  #Uncomment 1 below for the cipe module name
  #cipemod="cip3b"        #for cipe 1.0
  cipemod="cipcb"        #for cipe 1.2

  #Check for cipe module and load if not already loaded
  grep $cipemod /proc/modules >/dev/null
  if [ "$?" = "1" ]; then
          echo Loading cipe module.
          modprobe $cipemod
          if [ "$?" = "1" ]; then
                  echo Error loading cipe module...exiting.
                  exit
          fi
  else
          echo Cipe module already loaded.
  fi

  #Remove any existing cipe interfaces
  cipeif=`cat /proc/net/dev | cut -f1 -d: | grep $cipemod`

  if [ "$cipeif" != "" ]; then
          echo Removing existing cipe interface(s).
          for i in $cipeif; do
                  ifconfig $i down
          done
  fi

  #Setup cipe interfaces
  echo -n "Setting up cipe interface(s): "
  for config in $options; do
          echo -n $config" "
          ciped -o $config
  done
  echo
  echo

  #Add routes for other remote networks via cipe interface(s)
  #route add -net x.x.x.x netmask x.x.x.x gw x.x.x.x
  #route to machine C network
  #route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.3.1
  ______________________________________________________________________

  4.3.  Gateway

  All machines on network 192.168.2.0 must have 192.168.2.1 as gateway.
  If you don't it will not work.

  5.  Machine C Specific Configuration

  5.1.  /etc/cipe/options.machineA

       ______________________________________________________________________

       #uncomment 1 below
       #name for cipe 1.0.x
       #device          cip3b0
       #name for cipe 1.2.x
       device          cipcb0

       #remote internal (fake) ip address
       ptpaddr         192.168.1.1
       # my cipe (fake) ip address
       ipaddr          192.168.3.1
       # my real ip address and cipe port
       me              (real ip 3):(port B)
       #remote real ip address and cipe port
       peer            (real ip 1):(port B)
       #unique 128 bit key
       key             (Key B)
       ______________________________________________________________________

  5.2.  /etc/rc.d/rc.cipe

  ______________________________________________________________________

  !#/bin/bash
  #rc.cipe  3/29/1999
  #Send questions or comments to acj@home.com.

  #Setup script path
  PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

  #Options filenames in cipe directory for cipe interfaces
  options="options.machineA"

  #Automatically obtain options filenames from cipe directory
  #options=`/bin/ls /etc/cipe/options.*`

  #Uncomment 1 below for the cipe module name
  #cipemod="cip3b"        #for cipe 1.0
  cipemod="cipcb"        #for cipe 1.2

  #Check for cipe module and load if not already loaded
  grep $cipemod /proc/modules >/dev/null
  if [ "$?" = "1" ]; then
          echo Loading cipe module.
          modprobe $cipemod
          if [ "$?" = "1" ]; then
                  echo Error loading cipe module...exiting.
                  exit
          fi
  else
          echo Cipe module already loaded.
  fi

  #Remove any existing cipe interfaces
  cipeif=`cat /proc/net/dev | cut -f1 -d: | grep $cipemod`

  if [ "$cipeif" != "" ]; then
          echo Removing existing cipe interface(s).
          for i in $cipeif; do
                  ifconfig $i down
          done
  fi

  #Setup cipe interfaces
  echo -n "Setting up cipe interface(s): "
  for config in $options; do
          echo -n $config" "
          ciped -o $config
  done
  echo
  echo

  #Add routes for other remote networks via cipe interface(s)
  #route add -net x.x.x.x netmask x.x.x.x gw x.x.x.x
  #route to machine B network
  #route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
  ______________________________________________________________________

  5.3.  Gateway

  All machines on network 192.168.2.0 must have 192.168.2.1 as gateway.
  If you don't it will not work.

  6.  Common Machine Configuration

  6.1.  /etc/cipe/ip-up

  6.1.1.  Kernel 2.0, ipfwadm, cipe 1.0.x

  ______________________________________________________________________

  #!/bin/bash
  # ip-up <interface> <myaddr> <daemon-pid> <local> <remote> <arg>
  #3/29/1999
  #An example ip-up script for the older 1.x 2.x kernels using ipfwadm that
  #will setup routes and firewall rules to connect your local class c network
  #to a remote class c network.

  #The rules are configured to prevent spoofing and stuffed routing between
  #the networks.  There are also additional security enhancements commented
  #out towards the bottom of the script.
  #Send questions or comments to acj@home.com.

  #--------------------------------------------------------------------------
  #Set some script variables
  device=$1               # the CIPE interface
  me=$2                   # our UDP address
  pid=$3                  # the daemon's process ID
  ipaddr=$4               # IP address of our CIPE device
  vptpaddr=$5              # IP address of the remote CIPE device
  option=$6               # argument supplied via options

  PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

  #comment/uncomment to enable/disbale kernel logging for all unauthorized
  #access attempts. Must be same as ip-down script in order to remove rules.
  log="-o"

  #--------------------------------------------------------------------------
  umask 022

  # just a logging example
  #echo "UP   $*" >> /var/adm/cipe.log

  # many systems like these pid files
  #echo $3 > /var/run/$device.pid

  #--------------------------------------------------------------------------

  #add route entry for remote cipe network
  network=`expr $ptpaddr : '\([0-9]*\.[0-9]*\.[0-9]*\.\)'`0
  route add -net $network netmask 255.255.255.0 dev $device

  #need to add route entry for host in 2.0 kernels
  route add -host $ptpaddr dev $device

  #--------------------------------------------------------------------------
  #cipe interface incoming firewall rules
  #must be inserted into list in reverse order

  #deny all other incoming packets to cipe interface
  ipfwadm -I -i deny -W $device -S 0/0 -D 0/0 $log

  #accept incoming packets from remotenet to localnet on cipe interface
  ipfwadm -I -i accept -W $device -S $ptpaddr/24 -D $ipaddr/24

  #accept incoming packets from localnet to remotenet on cipe interface
  ipfwadm -I -i accept -W $device -S $ipaddr/24 -D $ptpaddr/24

  #deny incoming packets, cipe interface, claiming to be from localnet; log
  ipfwadm -I -i deny -W $device -S $ipaddr/24 -D $ipaddr/24 $log

  #--------------------------------------------------------------------------
  #cipe interface outgoing firewall rules
  #must be inserted into list in reverse order
  #deny all other outgoing packets from cipe interface
  ipfwadm -O -i deny -W $device -S 0/0 -D 0/0 $log

  #accept outgoing from remotenet to localnet on cipe interface
  ipfwadm -O -i accept -W $device -S $ptpaddr/24 -D $ipaddr/24

  #accept outgoing from localnet to remotenet on cipe interface
  ipfwadm -O -i accept -W $device -S $ipaddr/24 -D $ptpaddr/24

  #deny outgoing to localnet from localnet, cipe interface, deny; log
  ipfwadm -O -i deny -W $device -S $ipaddr/24 -D $ipaddr/24 $log

  #--------------------------------------------------------------------------
  #The forwarding is configured so machines on your local network do not get
  #masqueraded to the remote network.  This provides better access control
  #between networks.  Must be inserted into list in reverse order

  #deny all other forwarding through cipe interface; log
  ipfwadm -F -i deny -W $device -S 0/0 -D 0/0 $log

  #accept forwarding from remotenet to localnet on cipe interfaces
  ipfwadm -F -i accept -W $device -S $ptpaddr/24 -D $ipaddr/24

  #accept forwarding from localnet to remotenet on cipe interfaces
  ipfwadm -F -i accept -W $device -S $ipaddr/24 -D $ptpaddr/24

  #--------------------------------------------------------------------------
  #Make sure forwarding is enabled in the kernel. The kernel by default may
  #have forwarding disabled.
  /bin/echo 1 > /proc/sys/net/ipv4/ip_forward

  #--------------------------------------------------------------------------
  #Optional security enhancement - set default forward policy to
  #DENY or REJECT.  If your forwarding default policy is DENY/REJECT
  #you will need to add the following rules to your main forward chain.  It
  #is a good idea to have all default policies set for DENY or
  #REJECT.

  #define machine interfaces
  #localif="eth0"
  #staticif="eth1"                ;cable modem users
  #staticif="ppp0"                ;dialup users

  #a real sloppy way to get the peer ip address from the options file - a new
  #argument with peer ip:port passed to script would be nice.
  #both lines need to be uncommented
  #peerfile=`grep $device /etc/cipe/options.* | cut -f1 -d:`
  #peer=`grep peer $peerfile | cut -f1 -d: | awk '{print $2}'`

  #must log peer ip address for ip-down script
  #echo $peer > /var/run/$device.peerip

  #accept forwarding from localnet to remotenet on internal network interface
  #ipfwadm -F -i accept -W $localif -S $ipaddr/24 -D $ptpaddr/24
  #accept forwarding from remotenet to localnet on internal network interface
  #ipfwadm -F -i accept -W $localif -S $ptpaddr/24 -D $ipaddr/24
  #accept forwarding on staticif from me to peer
  #myaddr=`echo $me | cut -f1 -d:`
  #ipfwadm -F -i accept -W $staticif -S $myaddr -D $peer
  #--------------------------------------------------------------------------
  #Other optional security enhancement
  #block all incoming requests from everywhere to our cipe udp port
  #except our peer's udp port

  #need to determine udp ports for the cipe interfaces
  #get our udp port
  #if [ "$option" = "" ]; then
  #       myport=`echo $me | cut -f2 -d:`
  #else
  #       myport=$option
  #fi

  #get remote udp port -- peerfile variable must be set above
  #peerport=`grep peer $peerfile | cut -f2 -d:`

  #must log peer udp port for ip-down script
  #echo $peerport > /var/run/$device.peerport

  #get our ip address
  #myaddr=`echo $me | cut -f1 -d:`

  #deny and log all requests to cipe udp port must be inserted first
  #ipfwadm -I -i deny -P udp -W $staticif -S 0/0 -D $myaddr $myport $log
  #accept udp packets from peer at udp cipe port to my udp cipe port
  #ipfwadm -I -i accept -P udp -W $staticif -S $peer $peerport \
  #-D $myaddr $myport

  exit 0
  ______________________________________________________________________

  6.1.2.  Kernel 2.1/2.2, ipchains, cipe 1.2.x

  ______________________________________________________________________

  #!/bin/bash
  # ip-up <interface> <myaddr> <daemon-pid> <local> <remote> <arg>
  #3/29/1999
  #An example ip-up script for the newer 2.1/2.2 kernels using ipchains that
  #will setup routes and firewall rules to connect your local class c network
  #to a remote class c network.  This script creates 3 user defined chains
  #-input, output, and forward - for each cipe interface, based on the
  #interface name. It will then insert a rule into each of the built-in
  #input, output, and forward chains to use the user defined chains. The
  #rules are configured to prevent spoofing and stuffed routing between the
  #networks. There are also additional security enhancements commented out
  #towards the bottom of the script.
  #Send questions or comments to acj@home.com.

  #--------------------------------------------------------------------------

  #Set some script variables
  device=$1               # the CIPE interface
  me=$2                   # our UDP address
  pid=$3                  # the daemon's process ID
  ipaddr=$4               # IP address of our CIPE device
  ptpaddr=$5              # IP address of the remote CIPE device
  option=$6               # argument supplied via options

  PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

  #comment/uncomment to enable/disbale kernel logging for all unauthorized
  #access attempts. Must be same as ip-down script in order to remove rules.
  log="-l"

  #--------------------------------------------------------------------------
  umask 022
  # just a logging example
  #echo "UP   $*" >> /var/adm/cipe.log

  # many systems like these pid files
  #echo $3 > /var/run/$device.pid

  #--------------------------------------------------------------------------
  #add route entry for remote cipe network
  network=`expr $ptpaddr : '\([0-9]*\.[0-9]*\.[0-9]*\.\)'`0
  route add -net $network netmask 255.255.255.0 dev $device

  #--------------------------------------------------------------------------
  #create new ipchain for cipe interface input rules
  ipchains -N $device"i"
  #flush all rules in chain (sanity flush)
  ipchains -F $device"i"
  #deny incoming packets, cipe interface, claiming to be from localnet; log
  ipchains -A $device"i" -j DENY -i $device -s $ipaddr/24 -d $ipaddr/24 $log
  #accept incoming packets from localnet to remotenet on cipe interface
  ipchains -A $device"i" -j ACCEPT -i $device -s $ipaddr/24 -d $ptpaddr/24
  #accept incoming packets from remotenet to localnet on cipe interface
  ipchains -A $device"i" -j ACCEPT -i $device -s $ptpaddr/24 -d $ipaddr/24
  #deny all other incoming packets
  ipchains -A $device"i" -j DENY -s 0/0 -d 0/0 $log

  #--------------------------------------------------------------------------
  #create new ipchain for cipe interface output rules
  ipchains -N $device"o"
  #flush all rules in chain (sanity flush)
  ipchains -F $device"o"
  #deny outgoing to localnet from localnet, cipe interface, deny; log
  ipchains -A $device"o" -j DENY -i $device -s $ipaddr/24 -d $ipaddr/24 $log
  #accept outgoing from localnet to remotenet on cipe interface
  ipchains -A $device"o" -j ACCEPT -i $device -s $ipaddr/24 -d $ptpaddr/24
  #accept outgoing from remotenet to localnet on cipe interface
  ipchains -A $device"o" -j ACCEPT -i $device -s $ptpaddr/24 -d $ipaddr/24
  #deny all other outgoing packets
  ipchains -A $device"o" -j DENY -s 0/0 -d 0/0 $log

  #--------------------------------------------------------------------------
  #The forward chain is configured so machines on your local network do not
  #get masqueraded to the remote network.  This provides better access
  #control between networks.

  #create new ipchain for cipe interface forward rules
  ipchains -N $device"f"
  #flush all rules in chain (sanity flush)
  ipchains -F $device"f"
  #accept forwarding from localnet to remotenet on cipe interfaces
  ipchains -A $device"f" -j ACCEPT -i $device -s $ipaddr/24 -d $ptpaddr/24
  #accept forwarding from remotenet to localnet on cipe interfaces
  ipchains -A $device"f" -j ACCEPT -i $device -s $ptpaddr/24 -d $ipaddr/24
  #deny all other forwarding; log
  ipchains -A $device"f" -j DENY -s 0/0 -d 0/0 $log

  #--------------------------------------------------------------------------
  #Make sure forwarding is enabled in the kernel. New kernels by default have
  #forwarding disabled.
  /bin/echo 1 > /proc/sys/net/ipv4/ip_forward

  #--------------------------------------------------------------------------
  #insert rules to main input, output, and forward chains to enable new rules
  #for the cipe interface
  ipchains -I input -i $device -j $device"i"
  ipchains -I output -i $device -j $device"o"
  ipchains -I forward -i $device -j $device"f"

  #--------------------------------------------------------------------------
  #Optional security enhancement - set built-in forward chain policy to
  #DENY or REJECT.  If your main forward chain default policy is DENY/REJECT
  #you will need to add the following rules to your main forward chain.  It
  #is a good idea to have all built-in chain default policies set for DENY or
  #REJECT.

  #define machine interfaces
  #localif="eth0"
  #staticif="eth1"                ;cable modem users
  #staticif="ppp0"                ;dialup users

  #a real sloppy way to get the peer ip address from the options file - a new
  #argument with peer ip:port passed to script would be nice.
  #both lines need to be uncommented
  #peerfile=`grep $device /etc/cipe/options.* | cut -f1 -d:`
  #peer=`grep peer $peerfile | cut -f1 -d: | awk '{print $2}'`

  #must log peer ip address for ip-down script
  #echo $peer > /var/run/$device.peerip

  #accept forwarding from localnet to remotenet on internal network interface
  #ipchains -I forward -j ACCEPT -i $localif -s $ipaddr/24 -d $ptpaddr/24
  #accept forwarding from remotenet to localnet on internal network interface
  #ipchains -I forward -j ACCEPT -i $localif -s $ptpaddr/24 -d $ipaddr/24
  #accept forwarding on staticif from me to peer
  #myaddr=`echo $me | cut -f1 -d:`
  #ipchains -I forward -j ACCEPT -i $staticif -s $myaddr -d $peer
  #--------------------------------------------------------------------------
  #Other optional security enhancement
  #block all incoming requests from everywhere to our cipe udp port
  #except our peer's udp port

  #need to determine udp ports for the cipe interfaces
  #get our udp port
  #if [ "$option" = "" ]; then
  #       myport=`echo $me | cut -f2 -d:`
  #else
  #       myport=$option
  #fi

  #get remote udp port -- peerfile variable must be set above
  #peerport=`grep peer $peerfile | cut -f2 -d:`

  #must log peer udp port for ip-down script
  #echo $peerport > /var/run/$device.peerport

  #get our ip address
  #myaddr=`echo $me | cut -f1 -d:`

  #deny and log all requests to cipe udp port must be inserted first
  #ipchains -I input -j DENY -p udp -i $staticif -s 0/0 \
  #-d $myaddr $myport $log
  #accept udp packets from peer at udp cipe port to my udp cipe port
  #ipchains -I input -j ACCEPT -p udp -i $staticif -s $peer $peerport \
  # -d $myaddr $myport

  #--------------------------------------------------------------------------
  # Set up spoofing protection in kernel as an additional security measure
  #--------------------------------------------------------------------------
  #Why do I have spoofing protection in the firewall rules in addition to
  #this script that sets up spoof protection for each interface in the
  #kernel? Guess I'm paranoid.

  if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
          echo -n "Setting up IP spoofing protection..."
          iface="/proc/sys/net/ipv4/conf/$device/rp_filter"
          echo 1 > $iface
          echo "done."
  else
          echo "Cannot setup spoof protection in kernel for $device" \
                  | mail -s"Security Warning: $device" root
          exit 1
  fi

  exit 0
  ______________________________________________________________________

  6.2.  /etc/cipe/ip-down

  6.2.1.  Kernel 2.0, ipfwadm, cipe 1.0.x

  ______________________________________________________________________

  #!/bin/bash

  # ip-down <interface> <myaddr> <daemon-pid> <local> <remote> <arg>
  #3/29/1999
  #An example ip-down script for the older 1.x 2.x kernels using ipfwadm that
  #will remove firewall rules that were setup to connect your local class c
  #network to a remote class c network.

  #--------------------------------------------------------------------------
  #Set some script variables
  device=$1               # the CIPE interface
  me=$2                   # our UDP address
  pid=$3                  # the daemon's process ID
  ipaddr=$4               # IP address of our CIPE device
  ptpaddr=$5              # IP address of the remote CIPE device
  option=$6               # argument supplied via options

  PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

  #comment/uncomment to enable/disbale kernel logging for all unauthorized
  #access attempts. Must be same as ip-down script in order to remove rules.
  log="-o"

  #--------------------------------------------------------------------------
  umask 022

  # just a logging example
  #echo "DOWN   $*" >> /var/adm/cipe.log

  # many systems like these pid files
  #rm -f /var/run/$device.pid

  #--------------------------------------------------------------------------
  #cipe interface incoming firewall rules

  #delete (deny all other incoming packets to cipe interface)
  ipfwadm -I -d deny -W $device -S 0/0 -D 0/0 $log

  #delete (accept incoming packets from remotenet to localnet on cipe
  #interface)
  ipfwadm -I -d accept -W $device -S $ptpaddr/24 -D $ipaddr/24

  #delete (accept incoming packets from localnet to remotenet on cipe
  #interface)
  ipfwadm -I -d accept -W $device -S $ipaddr/24 -D $ptpaddr/24

  #delete (deny incoming packets, cipe interface, claiming to be from
  #localnet and log)
  ipfwadm -I -d deny -W $device -S $ipaddr/24 -D $ipaddr/24 $log

  #--------------------------------------------------------------------------
  #cipe interface incoming firewall rules

  #delete (deny all other outgoing packets from cipe interface)
  ipfwadm -O -d deny -W $device -S 0/0 -D 0/0 $log

  #delete (accept outgoing from remotenet to localnet on cipe interface)
  ipfwadm -O -d accept -W $device -S $ptpaddr/24 -D $ipaddr/24

  #delete (accept outgoing from localnet to remotenet on cipe interface)
  ipfwadm -O -d accept -W $device -S $ipaddr/24 -D $ptpaddr/24

  #delete (deny outgoing to localnet from localnet, cipe interface, deny
  #and log)
  ipfwadm -O -d deny -W $device -S $ipaddr/24 -D $ipaddr/24 $log

  #--------------------------------------------------------------------------
  #cipe interface forwarding firewall rules

  #delete (deny all other forwarding through cipe interface; log)
  ipfwadm -F -d deny -W $device -S 0/0 -D 0/0 $log

  #delete (accept forwarding from remotenet to localnet on cipe interfaces)
  ipfwadm -F -d accept -W $device -S $ptpaddr/24 -D $ipaddr/24

  #delete (accept forwarding from localnet to remotenet on cipe interfaces)
  ipfwadm -F -d accept -W $device -S $ipaddr/24 -D $ptpaddr/24

  #--------------------------------------------------------------------------
  #Optional security enhancement - set default forward policy to
  #DENY or REJECT.  If your forwarding default policy is DENY/REJECT
  #you will need to add the following rules to your main forward chain.  It
  #is a good idea to have all default policies set for DENY or
  #REJECT.

  #define machine interfaces
  #localif="eth0"
  #staticif="eth1"                ;cable modem users
  #staticif="ppp0"                ;dialup users

  #a real sloppy way to get the peer ip address from the options file - a new
  #argument with peer ip:port passed to script would be nice.
  #both lines need to be uncommented
  #peerfile=`grep $device /etc/cipe/options.* | cut -f1 -d:`
  #peer=`grep peer $peerfile | cut -f1 -d: | awk '{print $2}'`

  #must log peer ip address for ip-down script
  #echo $peer > /var/run/$device.peerip

  #delete (accept forwarding from localnet to remotenet on internal network
  interface)
  #ipfwadm -F -d accept -W $localif -S $ipaddr/24 -D $ptpaddr/24
  #delete (accept forwarding from remotenet to localnet on internal network
  interface)
  #ipfwadm -F -d accept -W $localif -S $ptpaddr/24 -D $ipaddr/24
  #delete (accept forwarding on staticif from me to peer)
  #myaddr=`echo $me | cut -f1 -d:`
  #ipfwadm -F -d accept -W $staticif -S $myaddr -D $peer
  #--------------------------------------------------------------------------
  #Other optional security enhancement
  #block all incoming requests from everywhere to our cipe udp port
  #except our peer's udp port

  #need to determine udp ports for the cipe interfaces
  #get our udp port
  #if [ "$option" = "" ]; then
  #       myport=`echo $me | cut -f2 -d:`
  #else
  #       myport=$option
  #fi

  #get remote udp port -- peerfile variable must be set above
  #peerport=`grep peer $peerfile | cut -f2 -d:`

  #must log peer udp port for ip-down script
  #echo $peerport > /var/run/$device.peerport

  #get our ip address
  #myaddr=`echo $me | cut -f1 -d:`

  #delete (deny and log all requests to cipe udp port must be inserted first)
  #ipfwadm -I -d deny -P udp -W $staticif -S 0/0 -D $myaddr $myport $log
  #delete (accept udp packets from peer at udp cipe port to my udp cipe port)
  #ipfwadm -I -d accept -P udp -W $staticif -S $peer $peerport \
  #-D $myaddr $myport

  exit 0
  ______________________________________________________________________

  6.2.2.  Kernel 2.1/2.2, ipchains, cipe 1.2.x

  ______________________________________________________________________

  #!/bin/sh
  # ip-down <interface> <myaddr> <daemon-pid> <local> <remote> <arg>
  #3/29/1999
  #An example ip-down script for the newer 2.1/2.2 kernels using ipchains
  #that will remove firewall rules that were setup to connect your local
  #class c network to a remote class c network.  Optional security
  #enhancement rules removal is also added and commented towards end of
  #script.
  #Send questions or comments to acj@home.com.

  #--------------------------------------------------------------------------
  #Set some script variables
  device=$1               # the CIPE interface
  me=$2                   # our UDP address
  pid=$3                  # the daemon's process ID
  ipaddr=$4               # IP address of our CIPE device
  ptpaddr=$5              # IP address of the remote CIPE device
  option=$6               # argument supplied via options
  PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

  #comment/uncomment to enable/disbale kernel logging for all unauthorized
  #access attempts
  #must be same as ip-up script in order to remove rules
  log="-l"

  #--------------------------------------------------------------------------
  umask 022

  # Logging example
  #echo "DOWN $*" >> /var/adm/cipe.log

  # remove the daemon pid file
  #rm -f /var/run/$device.pid

  #--------------------------------------------------------------------------
  #remove rules from main input, output, and forward chains for cipe
  #interface
  ipchains -D input -i $device -j $device"i"
  ipchains -D output -i $device -j $device"o"
  ipchains -D forward -i $device -j $device"f"

  #--------------------------------------------------------------------------
  #flush all rules in cipe interface input chain
  ipchains -F $device"i"
  #remove cipe interface input chain
  ipchains -X $device"i"

  #--------------------------------------------------------------------------
  #flush all rules in cipe interface output chain
  ipchains -F $device"o"
  #remove cipe interface output chain
  ipchains -X $device"o"

  #--------------------------------------------------------------------------
  #flush all rules in cipe interface forward chain
  ipchains -F $device"f"
  #remove cipe interface forward chain
  ipchains -X $device"f"

  #--------------------------------------------------------------------------
  #Remove optional security enhancement rules

  #get peer ip address
  #peer=`cat /var/run/$device.peerip`
  #define machine interfaces
  #localif="eth0"
  #staticif="eth1"                ;cable modem users
  #staticif="ppp0"                ;dialup users

  #get our ip address
  #myaddr=`echo $me |cut -f1 -d:`

  #delete (accept forwarding from localnet to remotenet on internal network
  #interface)
  #ipchains -D forward -j ACCEPT -i $localif -s $ipaddr/24 -d $ptpaddr/24
  #delete (accept forwarding from remotenet to localnet on internal network
  #interface)
  #ipchains -D forward -j ACCEPT -i $localif -s $ptpaddr/24 -d $ipaddr/24
  #delete (accept forwarding on staticif from me to peer)
  #ipchains -D forward -j ACCEPT -i $staticif -s $myaddr -d $peer

  #remove peer ip file
  #rm /var/run/$device.peerip

  #--------------------------------------------------------------------------
  #Remove other optional security enhancement rules

  #get peer udp port
  #peerport=`cat /var/run/$device.peerport`

  #get our udp port
  #if [ "$option" = "" ]; then
  #        myport=`echo $me | cut -f2 -d:`
  #else
  #        myport=$option
  #fi

  #delete (deny and log all requests to cipe udp port must be inserted first)
  #ipchains -D input -j DENY -p udp -i $staticif -s 0/0 \
  #-d $myaddr $myport $log
  #delete (accept udp packets from peer at udp cipe port to my udp cipe port)
  #ipchains -D input -j ACCEPT -p udp -i $staticif -s $peer $peerport \
  #-d $myaddr $myport

  #remove peer port file
  #rm /var/run/$device.peerport

  #--------------------------------------------------------------------------

  exit 0
  ______________________________________________________________________

  7.  Example masquerading firewall scripts

  7.1.  Kernel 2.0, ipfwadm

  ______________________________________________________________________

  #!/bin/sh
  #04/04/1999
  #example rc.firewall script for the 2.0 kernels using ipfwadm
  #I cant take full credit for this script.  I had found it a few
  #years ago and made slight modifications.
  #Send questions or comments to acj@home.com.

  #---------------------------------------------------------------------
  #Variables
  #---------------------------------------------------------------------

  #local ethernet interface
  localip=
  localif=eth0

  #static ethernet interface
  staticip=
  staticif=eth1

  PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

  #---------------------------------------------------------------------
  #Incoming Firewall Policies
  #---------------------------------------------------------------------
  #flush incoming firewall policies
  /sbin/ipfwadm -I -f

  #set incoming firewall policy default to deny
  /sbin/ipfwadm -I -p deny

  #---------------------------------------------------------------------

  #local interface, local machines, going anywhere is valid
  /sbin/ipfwadm -I -a accept -V $localip -S $localip/24 -D 0.0.0.0/0
  #remote interface, claiming to be local machines (IP spoofing) deny and log
  /sbin/ipfwadm -I -a deny -V $staticip -S $localip/24 -D 0.0.0.0/0 -o
  #remote interface, any source, going to staticip address is valid
  /sbin/ipfwadm -I -a accept -V $staticip -S 0.0.0.0/0 -D $staticip/32
  #loopback interface is valid
  /sbin/ipfwadm -I -a accept -V 127.0.0.1 -S 0.0.0.0/0 -D 0.0.0.0/0
  #all other incoming is denied and logged
  /sbin/ipfwadm -I -a deny -S 0.0.0.0/0 -D 0.0.0.0/0 -o

  #---------------------------------------------------------------------
  #Outgoing Firewall Policies
  #---------------------------------------------------------------------

  #flush outgoing firewall policies
  /sbin/ipfwadm -O -f

  #set outgoing firewall policy default to deny
  /sbin/ipfwadm -O -p deny

  #---------------------------------------------------------------------

  #local interface, any source going to local net is valid
  /sbin/ipfwadm -O -a accept -V $localip -S 0.0.0.0/0 -D $localip/24
  #outgoing to localnet on static interface, stuffed routing, deny
  /sbin/ipfwadm -O -a deny -V $staticip -S 0.0.0.0/0 -D $localip/24 -o
  #outgoing from localnet on static interface, stuffed masquerading, deny
  /sbin/ipfwadm -O -a deny -V $staticip -S $localip/24 -D 0.0.0.0/0 -o
  #outgoing to localnet on static interface, stuffed masquerading, deny
  /sbin/ipfwadm -O -a deny -V $staticip -S 0.0.0.0/0 -D $localip/24 -o
  #anything else outgoing on remote interface is valid
  /sbin/ipfwadm -O -a accept -V $staticip -S $staticip/32 -D 0.0.0.0/0
  #loopback interface is valid
  /sbin/ipfwadm -O -a accept -V 127.0.0.1 -S 0.0.0.0/0 -D 0.0.0.0/0
  #all other outgoing is denied and logged
  /sbin/ipfwadm -O -a deny -S 0.0.0.0/0 -D 0.0.0.0/0 -o

  #--------------------------------------------------------------------------
  #Forwarding firewall policies
  #--------------------------------------------------------------------------

  #flush forwarding policies
  /sbin/ipfwadm -F -f

  #set forwarding policy default to deny
  /sbin/ipfwadm -F -p deny

  #masquerade from localnet on local interface to anywhere
  /sbin/ipfwadm -F -a masquerade -W $staticif -S $localip/24 -D 0.0.0.0/0
  #all other forwarding is denied
  /sbin/ipfwadm -F -a deny -S 0.0.0.0/0 -D 0.0.0.0/0

  exit 0
  ______________________________________________________________________

  7.2.  Kernel 2.1/2.2, ipchains

  ______________________________________________________________________

  #!/bin/sh
  #04/04/1999
  #example rc.firewall script for the newer 2.1/2.2 kernels using ipchains
  #that creates user defined chains for each interface.  There are firewall
  #rules for spoofing protection which may be unnecessary since the newer
  #kernels can have kernel spoofing protection enabled.  You might say it's
  #super paranoid checking.
  #Send questions or comments to acj@home.com.

  #---------------------------------------------------------------------
  #Variables
  #---------------------------------------------------------------------

  #local ethernet interface
  localip=
  localif=eth0

  #static ethernet interface
  staticip=
  staticif=eth1

  #loopback interface
  loopback=lo

  PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

  #---------------------------------------------------------------------
  #Flush built-in input, output, and forward ipchains; set default policy
  #Good policy to deny all packets especially while setting up chains
  #---------------------------------------------------------------------

  #set incoming firewall policy default to deny
  ipchains -P input DENY

  #flush incoming firewall policies
  ipchains -F input

  #---------------------------------------------------------------------

  #set outgoing firewall policy default to deny
  ipchains -P output DENY

  #flush outgoing firewall policies
  ipchains -F output

  #---------------------------------------------------------------------

  #set forwarding firewall policy default to deny
  ipchains -P forward DENY

  #flush forwarding firewall policies
  ipchains -F forward

  #---------------------------------------------------------------------
  #flush all policies  -redundant for main policies, but also flushes user
  #defined policies
  #ipchains -F

  #remove all user defined policies - you may or may not want to enable this
  #ipchains -X

  #---------------------------------------------------------------------
  #Incoming Firewall Policies
  #---------------------------------------------------------------------
  #create new input chain for static ethernet interface
  ipchains -N $staticif"-i"

  #flush all rules in chain (sanity flush)
  ipchains -F $staticif"-i"

  #block incoming tcp SYN packets to all ports on staticif and log
  #this may be a little harsh but its a nice feature
  #ipchains -A $staticif"-i" -j DENY -p tcp -y -i $staticif -s 0/0 \
  #-d $staticip : -l

  #remote interface, claiming to be local machines (IP spoofing) deny and log
  ipchains -A $staticif"-i" -j DENY -i $staticif -s $localip/16 -d 0/0 -l

  #remote interface, any source, going to staticip address is valid
  ipchains -A $staticif"-i" -j ACCEPT -i $staticif -s 0/0 -d $staticip/32

  #all other incoming is denied and logged
  ipchains -A $staticif"-i" -j DENY -s 0/0 -d 0/0 -l

  #---------------------------------------------------------------------

  #create new input chain for local ethernet interface
  ipchains -N $localif"-i"

  #flush all rules in chain (sanity flush)
  ipchains -F $localif"-i"

  #local interface, local machines, going anywhere is valid
  ipchains -A $localif"-i" -j ACCEPT -i $localif -s $localip/24 -d 0/0

  #all other incoming is denied and logged
  ipchains -A $localif"-i" -j DENY -s 0/0 -d 0/0 -l

  #---------------------------------------------------------------------

  #create new input chain for loopback interface
  ipchains -N $loopback"-i"

  #flush all rules in chain (sanity flush)
  ipchains -F $loopback"-i"

  #loopback interface is valid
  ipchains -A $loopback"-i" -j ACCEPT -i $loopback -s 0/0 -d 0/0

  #all other incoming is denied and logged
  ipchains -A $loopback"-i" -j DENY -s 0/0 -d 0/0 -l

  #--------------------------------------------------------------------------
  #Forwarding firewall policies
  #--------------------------------------------------------------------------

  #create new forward chain for static ethernet interface
  ipchains -N $staticif"-f"

  #flush all rules in chain (sanity flush)
  ipchains -F $staticif"-f"

  #masquerade from localnet on static interface to anywhere
  ipchains -A $staticif"-f" -j MASQ -i $staticif -s $localip/24 -d 0/0

  #all other forwarding is denied and logged
  ipchains -A $staticif"-f" -j DENY -s 0/0 -d 0/0 -l

  #---------------------------------------------------------------------

  #create new forward chain for local ethernet interface
  ipchains -N $localif"-f"

  #flush all rules in chain (sanity flush)
  ipchains -F $localif"-f"

  #all other forwarding is denied and logged
  ipchains -A $localif"-f" -j DENY -s 0/0 -d 0/0 -l

  #---------------------------------------------------------------------

  #create new forward chain for loopback interface
  ipchains -N $loopback"-f"

  #flush all rules in chain (sanity flush)
  ipchains -F $loopback"-f"

  #all other forwarding is denied and logged
  ipchains -A $loopback"-f" -j DENY -s 0/0 -d 0/0 -l


  #---------------------------------------------------------------------
  #Outgoing Firewall Policies
  #---------------------------------------------------------------------

  #create new output chain for static ethernet interface
  ipchains -N $staticif"-o"

  #flush all rules in chain (sanity flush)
  ipchains -F $staticif"-o"

  #outgoing to localnet on remote interface(stuffed routing) deny & log
  ipchains -A $staticif"-o" -j DENY -i $staticif -s 0/0 -d $localip/24 -l

  #outgoing from local net on remote interface, stuffed masquerading, deny
  ipchains -A $staticif"-o" -j DENY -i $staticif -s $localip/24 -d 0/0 -l

  #anything else outgoing on remote interface is valid
  ipchains -A $staticif"-o" -j ACCEPT -i $staticif -s $staticip/32 -d 0/0

  #all other outgoing is denied and logged
  ipchains -A $staticif"-o" -j DENY -s 0/0 -d 0/0 -l

  #---------------------------------------------------------------------

  #create new output chain for local ethernet interface
  ipchains -N $localif"-o"

  #flush all rules in chain (sanity flush)
  ipchains -F $localif"-o"

  #local interface, any source going to local net is valid
  ipchains -A $localif"-o" -j ACCEPT -i $localif -s 0/0 -d $localip/24

  #all other outgoing is denied and logged
  ipchains -A $localif"-o" -j DENY -s 0/0 -d 0/0 -l

  #---------------------------------------------------------------------

  #create new output chain for loopback interface
  ipchains -N $loopback"-o"

  #flush all rules in chain (sanity flush)
  ipchains -F $loopback"-o"

  #loopback interface is valid
  ipchains -A $loopback"-o" -j ACCEPT -i $loopback -s 0/0 -d 0/0
  #all other outgoing is denied and logged
  ipchains -A $loopback"-o" -j DENY -s 0/0 -d 0/0 -l

  #--------------------------------------------------------------------------
  #make sure forwarding is enabled in the kernel
  #--------------------------------------------------------------------------

  /bin/echo 1 > /proc/sys/net/ipv4/ip_forward

  #--------------------------------------------------------------------------
  #Add pointers to built-in chains to enable user defined chains
  #change the order in each chain to optimize filtering for an interface
  #--------------------------------------------------------------------------

  #add local interface input chain
  ipchains -A input -i $localif -j $localif"-i"

  #add static interface input chain
  ipchains -A input -i $staticif -j $staticif"-i"

  #add loopback interface input chain
  ipchains -A input -i $loopback -j $loopback"-i"

  #-------------------------------------------------------------------------

  #add local interface output chain
  ipchains -A output -i $localif -j $localif"-o"

  #add static interface output chain
  ipchains -A output -i $staticif -j $staticif"-o"

  #add loopback interface output chain
  ipchains -A output -i $loopback -j $loopback"-o"

  #-------------------------------------------------------------------------

  #add local interface forward chain
  ipchains -A forward -i $localif -j $localif"-f"

  #add static interface forward chain
  ipchains -A forward -i $staticif -j $staticif"-f"

  #add loopback interface forward chain
  ipchains -A forward -i $loopback -j $loopback"-f"

  #---------------------------------------------------------------------
  #Super Paranoid check --- even though default policy is set for deny,
  #block all packets on any interface
  #---------------------------------------------------------------------

  #all other incoming is denied and logged
  ipchains -A input -j DENY -s 0/0 -d 0/0 -l

  #all other output is denied and logged
  ipchains -A output -j DENY -s 0/0 -d 0/0 -l

  #all other forwarding is denied and logged
  ipchains -A forward -j DENY -s 0/0 -d 0/0 -l

  exit 0
  ______________________________________________________________________

  8.  Putting it all together

  This is an example rc.local script to start everything when your
  system boots.  It will add spoofing protection in the kernel if you
  are using a 2.2 kernel, setup the masquerading firewall policies, and
  start the cipe interface(s).

       ______________________________________________________________________

       #!/bin/bash
       #4/4/99
       #an example rc.local script
       #Send questions or comments to acj@home.com

       echo

       #Set up spoof protection in kernel -- from IPChains HOWTO by Paul Russell

       #this is only for the newer 2.1/2.2 kernels

       #if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
       #   echo -n "Setting up IP spoofing protection..."
       #   for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
       #       echo 1 > $f
       #   done
       #   echo "done."
       #else
       #   echo PROBLEMS SETTING UP IP SPOOFING PROTECTION.  BE WORRIED.
       #   echo "CONTROL-D will exit from this shell and continue system startup."
       #   echo
       #   # Start a single user shell on the console
       #   /sbin/sulogin $CONSOLE
       #fi

       echo

       #Setup firewall policies
       if [ -x /etc/rc.d/rc.firewall ]; then
               echo Setting up firewall packet filtering policies.
               echo
               . /etc/rc.d/rc.firewall
       fi

       #Start cipe interfaces
       if [ -x /etc/rc.d/rc.cipe ]; then
               echo Starting VPN interfaces.
               . /etc/rc.d/rc.cipe
       fi

       exit 0
       ______________________________________________________________________

  9.  Connecting to the WAN

  At this point your cipe interface should be up and running.  Try
  pinging machines on the other network(s).  If you cannot ping check
  the following on the firewall machine:


    Check that forwarding is enabled in the kernel.

    Do an ifconfig to check if the cipe interface is up.

       cipcb0  Link encap:IPIP Tunnel  HWaddr
               inet addr:192.168.1.1  P-t-P:192.168.2.1  Mask:255.255.255.255
               UP POINTOPOINT NOTRAILERS RUNNING NOARP  MTU:1442  Metric:1
               RX packets:28163 errors:6 dropped:0 overruns:0 frame:6
               TX packets:29325 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:100

    Check the route table for a host entry for the other cipe host on
     the cipe interface.

       192.168.2.1    *      255.255.255.255 UH    0   0        0 cipcb0

    Check the route table for a network entry to the other network(s)
     on the cipe interface.

       192.168.2.0    *      255.255.255.0   U     0   0        0  cipcb0

    Check the log files for any error messages.

  If your other machines behind your firewall cannot access machines
  behind the other firewall check that the gateway is properly setup on
  both ends.

  Once you are able to ping, ftp, telnet, etc. to machines on the other
  network, the next step is to get your networks to see each other and
  access each other using SAMBA browsing.  A few hints: lmhosts or wins
  server is required, trusted domains for NT.  I have set these up, but
  that is not the purpose of this document (at least not for now).

  If you used the example firewall masquerading script, then all of your
  machines should also be able to connect to the internet.  If you
  cannot, then you might want to check the log files.  You may also want
  to try using tcpdump to see what is happening with the packets.

  10.  References

  10.1.  Web Sites

  Cipe Home Page <http://sites.inka.de/~bigred/devel/cipe.html>

  Masq Home Page <http://ipmasq.cjb.net>

  Samba Home Page <http://samba.anu.edu.au>

  Linux HQ <http://www.linuxhq.com>  ---great site for lots of linux
  info

  10.2.  Documentation

  cipe.info: info file included with cipe distribution

  Firewall HOWTO, by Mark Grennan, markg@netplus.net

  IP Masquerade mini-HOWTO,by  Ambrose Au, ambrose@writeme.com

  IPChains-Howto, by Paul Russell, Paul.Russell@rustcorp.com.au

  The Clock Mini-HOWTO
  Ron Bean, rbean@execpc.com
  v2, July 1999

  How to set and keep your computer's clock on time.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Basic Timekeeping under Linux

  3. Software

     3.1 Clock(8) and Hwclock(8)
     3.2 Adjtimex(8)
     3.3 Xntpd and ntpd: the Network Time Protocol
     3.4 Chrony

  4. Radio Clocks

     4.1 CHU and the "Gadget Box"
     4.2 WWV and the "Most Accurate Clock"
     4.3 GPS and the "Totally Accurate Clock"
     4.4 Low-frequency Time Signals: DCF77, MSF(Rugby), WWVB

  5. Detailed instructions for clock(8)

     5.1 Checking your installation
     5.2 Measuring your clock's drift rate
     5.3 Example
        5.3.1 To set time
        5.3.2 To reset time and check drift rate
        5.3.3 Calculating the correction factor


  ______________________________________________________________________

  1.  Introduction

  The Real-Time-Clock (RTC) chips used on PC motherboards (and even
  expensive workstations) are notoriously inaccurate, usually gaining or
  losing a consistent amount of time each day.  Linux provides a simple
  way to correct for this in software, which can make the clock *very*
  accurate, even without an external time source. But most people don't
  know how to set it up, for several reasons:

    It's not mentioned in most of the general "how to set up linux"
     documentation, and it can't be set up automatically without an
     external time source, so the default is not to use it.

    If you type "man clock" you may get the man page for clock(3),
     which is not what you want (try "man 8 clock" or "man 8 hwclock"--
     some distributions search in numerical order if you don't give a
     section number, others search in the order specified in
     /etc/man.config).

    Most people don't seem to care what time it is anyway.

    Those few who do care often want to sync the system clock to an
     external time source, such as a network time server or radio clock.
     This makes the accuracy of the RTC irrelevant.


  This mini-HOWTO describes the low-tech approach (which can be very
  accurate by itself), and provides pointers to several more
  sophisticated options. In most cases the documentation is well
  written, so I'm not going to repeat that information here, but I've
  included detailed instructions for the old clock(8) program at the end
  for anyone still running an older system.


     Note
        You must be logged in as "root" to run any program that affects
        the RTC or the system time. Keep this in mind when setting up
        any of the programs described here.


     Note
        If you run more than one OS on your machine, you should only let
        one of them set the CMOS clock, so they don't confuse each
        other. This includes the twice-a-year adjustment for Daylight
        Savings Time.

  If you run a dual-boot system that spends a lot of time running
  Windows, you may want to check out some of the clock software
  available for that OS instead. Follow the links on the NTP website at
  <http://www.eecis.udel.edu/~ntp/software.html>.  Many of the radio
  clocks mentioned here include software for Windows.

  2.  Basic Timekeeping under Linux

  A Linux system actually has two clocks: One is the battery powered
  "Real Time Clock" (also known as the "RTC", "CMOS clock", or "Hardware
  clock") which keeps track of time when the system is turned off but is
  not used when the system is running. The other is the "system clock"
  (sometimes called the "kernel clock" or "software clock") which is a
  software counter based on the timer interrupt. It does not exist when
  the system is not running, so it has to be initialized from the RTC
  (or some other time source) at boot time. References to "the clock" in
  the ntpd documentation refer to the system clock, not the RTC.

  The two clocks will drift at different rates, so they will gradually
  drift apart from each other, and also away from the "real" time. The
  simplest way to keep them on time is to measure their drift rates and
  apply correction factors in software. Since the RTC is only used when
  the system is not running, the correction factor is applied when the
  clock is read at boot time, using clock(8) or hwclock(8).  The system
  clock is corrected by adjusting the rate at which the system time is
  advanced with each timer interrupt, using adjtimex(8).

  A crude alternative to adjtimex(8) is to have chron run clock(8) or
  hwclock(8) periodically to sync the system time to the (corrected)
  RTC. This was recommended in the clock(8) man page, and it works if
  you do it often enough that you don't cause large "jumps" in the
  system time, but adjtimex(8) is a more elegant solution. Some
  applications may complain if the time jumps backwards.

  The next step up in accuracy is to use a program like ntpd to read the
  time periodically from a network time server or radio clock, and
  continuously adjust the rate of the system clock so that the times
  always match. If you always have a network connection at boot time,
  you can ignore the RTC completely and use ntpdate (which comes with
  the ntpd package) to initialize the system clock from the time
  server-- either a local server on a LAN, or a remote server on the
  internet. But if you sometimes don't have a network connection, or if
  you need the time to be accurate during the boot sequence before the
  network is active, then you need to maintain the time in the RTC as
  well.

  It might seem obvious that in this case you would want to sync the RTC
  to the (corrected) system clock. But this turns out to be a bad idea
  if the system is going to stay shut down longer than a few minutes,
  because it interferes with the programs that apply the correction
  factor to the RTC at boot time.

  If the system runs 24/7 and is always rebooted immediately whenever
  it's shut down, then you can just set the RTC from the system clock
  right before you reboot. The RTC won't drift enough to make a
  difference in the time it takes to reboot, so you don't have to know
  its drift rate.

  Of course the system may go down unexpectedly, so some versions of the
  kernel sync the RTC to the system clock every 11 minutes if the system
  clock has been adjusted by another program. The RTC won't drift enough
  in 11 minutes to make any difference, but if the system is down long
  enough for the RTC to drift significantly, then you have a problem:
  the programs that apply the drift correction to the RTC need to know
  *exactly* when it was last reset, and the kernel doesn't record that
  information anywhere.

  Some unix "traditionalists" might wonder why anyone would run a linux
  system less than 24/7, but some of us run dual-boot systems with
  another OS running some of the time, or run Linux on laptops that have
  to be shut down to conserve battery power when they're not being used.
  Other people just don't like to leave machines running unattended for
  long periods of time (even though we've heard all the arguments in
  favor of it). So, the "every 11 minutes" feature becomes a bug.

  This "feature/bug" appears to behave differently in different versions
  of the kernel (and possibly in different versions of xntpd and ntpd as
  well), so if you're running both ntpd and hwclock you may need to test
  your system to see what it actually does. If you can't keep the kernel
  from resetting the RTC, you might have to run without a correction
  factor.

  The part of the kernel that controls this can be found in
  /usr/src/linux-2.0.34/arch/i386/kernel/time.c (where the version
  number in the path will be the version of the kernel you're running).
  If the variable time_status is set to TIME_OK then the kernel will
  write the system time to the RTC every 11 minutes, otherwise it leaves
  the RTC alone. Calls to adjtimex(2) (as used by ntpd and timed, for
  example) may turn this on. Calls to settimeofday(2) will set
  time_status to TIME_UNSYNC, which tells the kernel not to adjust the
  RTC. I have not found any real documentation on this.

  If you don't need sub-second accuracy, hwclock(8) and adjtimex(8) may
  be all you need. It's easy to get enthused about radio clocks and
  such, but I ran the old clock(8) program for years with excellent
  results. On the other hand, if you have several machines on a LAN it
  can be handy to have them automatically sync their clocks to each
  other.

  3.  Software

  3.1.  Clock(8) and Hwclock(8)

  All linux distributions install either the old clock(8) or the newer
  hwclock(8), but without a correction factor. Some may also install
  adjtimex(8), or they may include it on the CD as optional (or you can
  download it from the usual places). Some distributions also include a
  graphical clock setting program that runs in an X-window, but they're
  designed for interactive use and the system will still install
  clock(8) or hwclock(8) for use in the startup scripts.


  Clock(8) requires you to calculate the correction factor by hand, but
  hwclock(8) calculates it automatically whenever you use it to reset
  the clock (using another program to set the time will interfere with
  the drift correction, so always use the same program if you're using a
  correction factor). If you have an older system that still uses
  clock(8) and you want to upgrade, you can find hwclock(8) in the
  "util-linux" package, version 2.7 or later.  See the man page for more
  information.


     Note
        The man page for hwclock(8) may be called "clock" for backward
        compatibility, so try both names. Hwclock(8) will respond to
        commands written for clock(8), but the result may not be the
        same-- in particular, "hwclock -a" is not quite the same as
        "clock -a", so if you're upgrading to hwclock I'd suggest
        replacing all references to "clock" in your startup scripts to
        use hwclock's native commands instead.

  The startup scripts vary from one distribution to another, so you may
  have to search a bit to find where it sets the clock. Typical
  locations are /etc/rc.local, /etc/rc.d/rc.sysinit, /etc/rc.d/boot, or
  some similar place. The correction factor for the RTC is stored in
  /etc/adjtime.

  When you're setting the clock to determine the drift rate, keep in
  mind that your local telephone time announcement may or may not be
  accurate. If you don't have a shortwave radio or GPS receiver, you can
  hear the audio feed from WWV by calling (303)499-7111 (this is a toll
  call to Boulder, Colorado). It will cut you off after three minutes,
  but that should be long enough to set the clock. USNO and Canada's CHU
  also have telephone time services, but I prefer WWV's because there is
  more time between the announcement and the "beep".

  If you get bizarre results from the RTC you may have a hardware
  problem. Some RTC chips include a lithium battery that can run down,
  and some motherboards have an option for an external battery (be sure
  the jumper is set correctly). The same battery maintains the CMOS RAM,
  but the clock takes more power and is likely to fail first. Bizarre
  results from the system clock may mean there is a problem with
  interrupts.

  3.2.  Adjtimex(8)

  Adjtimex(8) allows the user to adjust the kernel's time variables, and
  therefore change the speed of the system clock (you must be logged in
  as "root" to do this). It is cleverly designed to compare the system
  clock to the RTC using the same correction factor used by clock(8) or
  hwclock(8), as stored in /etc/adjtime.  So, once you've established
  the drift rate of the RTC, it's fairly simple to correct the system
  clock as well. Once you've got it running at the right speed, you can
  add a line to your startup scripts to set the correct kernel variables
  at boot time. Since adjtimex(8) was designed to work with clock(8) or
  hwclock(8), it includes a work-around for the "every 11 minutes" bug.

  After you've installed adjtimex(8) you can get more information on
  setting it up by typing "man 8 adjtimex" (there is also an adjtimex(2)
  man page, which is not what you want) and by reading the README file
  in /usr/doc/adjtimex-1.3/README (where the version number in the path
  will be the current version of adjtimex(8)).

  3.3.  Xntpd and ntpd: the Network Time Protocol

  Xntpd (NTPv3) has been replaced by ntpd (NTPv4); the earlier version
  is no longer being maintained.

  Ntpd is the standard program for synchronizing clocks across a
  network, and it comes with a list of public time servers you can
  connect to. It can be a little more complicated to set up than the
  other programs described here, but if you're interested in this kind
  of thing I highly recommend that you take a look at it anyway. The
  "home base" for information on ntpd is the NTP website at
  <http://www.eecis.udel.edu/~ntp/> which also includes links to all
  kinds of interesting time-related stuff (including software for other
  OS's). Some linux distributions include ntpd on the CD.

  A relatively new feature in ntpd is a "burst mode" which is designed
  for machines that have only intermittent dial-up access to the
  internet.

  Ntpd includes drivers for quite a few radio clocks (although some
  appear to be better supported than others). Most radio clocks are
  designed for commercial use and cost thousands of dollars, but there
  are some cheaper alternatives (discussed in later sections). In the
  past most were WWV or WWVB receivers, but now most of them seem to be
  GPS receivers. NIST has a PDF file that lists manufacturers of radio
  clocks on their website at
  <http://www.boulder.nist.gov/timefreq/links.htm> (near the bottom of
  the page). The NTP website also includes many links to manufacturers
  of radio clocks at <http://www.eecis.udel.edu/~ntp/hardware.htm> and
  <http://www.eecis.udel.edu/~mills/ntp/refclock.htm>.  Either list may
  or may not be up to date at any given time :-).  The list of drivers
  for ntpd is at
  <http://www.eecis.udel.edu/~ntp/ntp_spool/html/refclock.htm>.

  Ntpd also includes drivers for several dial-up time services. These
  are all long-distance (toll) calls, so be sure to calculate the effect
  on your phone bill before using them.

  3.4.  Chrony

  Xntpd was originally written for machines that have a full-time
  connection to a network time server or radio clock. In theory it can
  also be used with machines that are only connected intermittently, but
  Richard Curnow couldn't get it to work the way he wanted it to, so he
  wrote "chrony" as an alternative for those of us who only have network
  access when we're dialed in to an ISP (this is the same problem that
  ntpd's new "burst mode" was designed to solve).  The current version
  of chrony includes drift correction for the RTC, for machines that are
  turned off for long periods of time.

  You can get more information from Richard Curnow's website at
  <http://www.rrbcurnow.freenet.co.uk/chrony/index.html>. He distributes
  the program as source code only, but Debian has been including a
  binary in their "unstable" collection. The source file is also
  available at the usual linux archive sites.

  4.  Radio Clocks

  4.1.  CHU and the "Gadget Box"

  CHU, the Canadian shortwave time station near Ottawa, is similar to
  WWV in the US but with one important difference: in addition to
  announcing the time in both French and English, it also broadcasts the
  current time once per minute using the old "Bell 103" (300 baud) modem
  tones. These tones are very easy to decode, and Bill Rossi realised
  that you don't even need a modem-- all you need is a shortwave radio
  and a sound card. If you're able to receive the signal from CHU, this
  may be the cheapest radio clock available. Shortwave reception varies
  throughout the day, but Bill claims that by changing frequencies twice
  a day (morning and evening) he gets almost 24-hour coverage. CHU
  broadcasts on 3.33, 7.335, and 14.670 MHz.
  For more information see Bill Rossi's website at
  <http://www.rossi.com/chu/>. The source file is also available at the
  usual linux archive sites. For information on CHU's time services see
  <http://www.nrc.ca/inms/time/ctse.html>.

  The NTP website has plans for a "gadget box" that decodes the CHU time
  broadcast using an inexpensive 300 baud modem chip and any shortwave
  radio, at <http://www.eecis.udel.edu/~ntp/ntp_spool/html/gadget.htm>.
  The plans include a Postscript image of a 2-sided custom printed
  circuit board, but you have to make the board yourself (or find
  someone who can make it for you).

  Ntpd includes a driver (type 7) for CHU receivers, which works either
  with modems like the "gadget box", or by feeding the audio directly
  into the mic input of a Sun SPARCstation (or any other machine with
  "compatible audio drivers").

  4.2.  WWV and the "Most Accurate Clock"

  You may have heard about Heathkit's "Most Accurate Clock", which
  received and decoded the time signal from WWV and had an optional
  serial port for connecting to a computer. Heathkit stopped selling
  kits a long time ago, but they continued to sell the factory-built
  version of the clock until 1995, when it was also discontinued. For
  Heathkit nostalgia (not including the clock) see
  <http://www.heathkit-museum.com>. The Heathkit company still exists,
  selling educational materials. See <http://www.heathkit.com>.

  According to Dave Mills, Heathkit's patent on the "Most Accurate
  Clock" is due to expire soon, so maybe someone out there would like to
  clone it as a single-chip IC.

  The NTP website has a DSP program (and a PDF file describing it) at
  <http://www.eecis.udel.edu/~mills/resource.htm> that decodes the WWV
  time signal using a shortwave radio and the TAPR/AMSAT DSP-93, a DSP
  kit which is no longer available. It was based on the Texas
  Instruments TMS320C25 DSP chip. The TAPR website at
  <http://www.tapr.org> includes a lot of information on homebrew DSP
  programming.

  Ntpd includes a driver (type 6) for the IRIG-B and IRIG-E time codes,
  using /dev/audio on a Sun SPARCstation, with a note that it is "likely
  portable to other systems". WWV uses the IRIG-H time code.

  WWV is run by NIST, which has a website at
  <http://www.boulder.nist.gov/timefreq/index.html>.  This site includes
  the text of "Special Publication 432", which describes their time and
  frequency services, at
  <http://www.boulder.nist.gov/timefreq/pubs/sp432/sp432.htm>.  WWV
  broadcasts on 2.5, 5, 10, 15, and 20 Mhz.

  4.3.  GPS and the "Totally Accurate Clock"

  GPS signals include the correct time, and some GPS receivers have
  serial ports. Ntpd includes drivers for several GPS receivers. The
  1PPS feature ("One Pulse Per Second", required for high accuracy)
  usually requires a separate interface to connect it to the computer.

  TAPR (Tuscon Amateur Packet Radio) makes a kit for an interface called
  "TAC-2" (for "Totally Accurate Clock") that plugs into a serial port
  and works with any GPS receiver that can provide a 1PPS output--
  including some "bare board" models that can be mounted directly to the
  circuit board. For more information see their website at
  <http://www.tapr.org>. The price (as of June 1999) is around $140, not
  including the GPS receiver. The kit does not include any enclosure or
  mounting hardware.
  The CHU "gadget box" (described in another section) can also be used
  as an interface for the 1PPS signal. The NTP website has a discussion
  of this at <http://www.eecis.udel.edu/~ntp/ntp_spool/html/pps.htm>.

  4.4.  Low-frequency Time Signals: DCF77, MSF(Rugby), WWVB

  These low-frequency stations broadcast a time code by simply switching
  the carrier on and off. Each station uses its own coding scheme, and
  summaries are available on the NTP website at
  <http://www.eecis.udel.edu/~mills/ntp/index.htm> (near the bottom of
  the page). DCF77 in Germany broadcasts on 77.5kHz. MSF in England
  (also called "Rugby", which apparently refers to its location) and
  WWVB in Colorado both broadcast on 60 kHz.

  Inexpensive receivers that can plug into a serial port are reported to
  be available in Europe. Ntpd includes drivers for a couple of MSF
  receivers.

  A number of companies in the US sell relatively inexpensive clocks
  that have built-in WWVB receivers (including several analog wall
  clocks), but I'm only aware of two that can be connected to a
  computer:

  The Ultralink Model 320 sells for about $120 (as of June 1999) and has
  a serial interface and a straightforward ASCII command set, so it
  shouldn't be too hard to program. It draws 1mA from the serial port
  for power. The antenna can be up to 100 feet away from the computer,
  and the unit contains its own clock to maintain the time if it loses
  the signal. They also sell a "bare board" version for about $80 that
  is designed to work with the "BASIC Stamp" series of microcontrollers.
  See  <http://www.ulio.com/timepr.html>.

  Arcron Technology sells a desk clock with an optional serial port for
  about $130, including software for Windows. See
  <http://www.arctime.com>

  Reception of WWVB varies, but there are plans to increase its
  broadcast power, in several stages. You can follow its progress on
  NIST's website at
  <http://www.boulder.nist.gov/timefreq/wwvstatus.html>.

  5.  Detailed instructions for clock(8)

  This section is retained from the earlier version of this mini-HOWTO,
  and is provided for anyone still using the old clock(8) program.
  Everything you need to know is in the man page, but the following
  discussion will walk you through the process.


     Note
        You must be root to run "clock", or any other program that
        affects either the system time or the CMOS clock.

  5.1.  Checking your installation

  Check your system startup files for a command like "clock -a" or
  "clock -ua".  Depending on which distribution you're using, it might
  be in /etc/rc.local, or /etc/rc.d/rc.sysinit, or some similar place.

  If it says "clock -s" or "clock -us", change the "s" to an "a", and
  then check to see if you have the file /etc/adjtime, which contains a
  single line that looks something like this:


       0.000000 842214901 0.000000

  These numbers are the correction factor (in seconds per day), the time
  the clock was last corrected (in seconds since Jan 1, 1970), and the
  partial second that was rounded off last time.  If you don't have this
  file, login as root and create it, with a single line that looks like
  this (all zeros):


       0.0 0 0.0

  Then run "clock -a" or "clock -ua" manually from the shell to update
  the 2nd number (use the "u" if your clock is set to Universal instead
  of local time).

  5.2.  Measuring your clock's drift rate

  First, you need to know what time it is :-). Your local time of day
  number may or may not be accurate. My favorite method is to call WWV's
  voice announcment at (303)499-7111 (this is a toll call). If you have
  access to a network time server, you can use the ntpdate program from
  the xntpd package (use the -b flag to keep the kernel from messing
  with the CMOS clock). Otherwise use "date -s hh:mm:ss" to set the
  kernel time by hand, and then "clock -w" to set the CMOS clock from
  the kernel clock. You'll need to remember when you last set the clock,
  so write down the date someplace where you won't lose it.  If you used
  ntpdate, do "date +%s" and write down the number of seconds since Jan
  1,1970.

  Then come back some days or weeks later and see how far the clock has
  drifted. If you're setting the clock by hand, I'd recommend waiting at
  least two weeks, and only calculate the drift rate to the nearest .1
  sec/day. After several months you could get to the nearest .01 sec/day
  (some people claim more accuracy than that, but I'm being conservative
  here). If you use ntpdate you shouldn't have to wait that long, but in
  any case you can always fine-tune it later.

  You can have cron run "clock -a" at regular intervals to keep the
  system time in line with the (corrected) CMOS time. This command will
  also be run from your startup file every time you boot the system, so
  if you do that often (as some of us do), that may be enough for your
  purposes.

  Note that certain programs may complain if the system time jumps by
  more than one second at a time, or if it jumps backwards.  If you have
  this problem, you can use xntpd or ntpdate to correct the time more
  gradually.

  5.3.  Example

  5.3.1.  To set time

  Login as root.  Dial (303)499-7111 (voice), listen for time
  announcement.  Then type:


       date -s hh:mm:ss

  but don't press enter until you hear the beep. (You could use "ntp
  date" here instead of "date", and skip the phone call) This sets the
  "kernel time". Then type:

  clock -w

  This sets the CMOS time to match the kernel time.  Then type:


       date +%j

  (or "date +%s" if you used "ntpdate" instead of "date" above) and
  write down the number it gives you for next time.

  5.3.2.  To reset time and check drift rate

  Find the date you wrote down last time.  Login as root Then type:


       clock -a

  This sets the kernel time to match the current CMOS time.  Dial
  (303)499-7111 (voice), listen for announcement.  Then type:


       date

  and press enter when you hear the beep, but while you're waiting,
  write down the time they announce, and don't hang up yet.  This tells
  you what time your machine thought it was, when it should have been
  exactly on the minute.  Now type in


       date hh:mm:00

  using the minute *after* the one that was just announced, and press
  enter when you hear the beep again (now you can hang up).  For hh use
  the local hour.  This sets the "kernel time".  Then type:


       clock -w

  which writes the new (correct) time to the CMOS clock.  Now type:


       date +%j

  (or "date +%s" if that's what you used before)

  You now have three numbers (two dates and a time) that will allow you
  to calculate the drift rate.

  5.3.3.  Calculating the correction factor

  When you ran "date" on the minute, was your machine slow or fast? If
  it was fast, you'll have to subtract some number of seconds, so write
  it down as a negative number. If it was slow, you have to add some
  seconds, so write it down as positive.

  Now subtract the two dates. If you used "date +%j", the numbers
  represent the day-of-year (1-365, or 1-366 in leap years). If you've
  passed Jan 1 since you last set the clock you'll have to add 365 (or
  366) to the 2nd number. If you used "date +%s" then your number is in
  seconds, and you'll have to divide it by 86400 to get days.

  If you already had a correction factor in /etc/adjtime, you'll have to
  account for the number of seconds you've already corrected. If you've
  overcorrected, this number will have the opposite sign of the one you
  just measured; if you've undercorrected it will have the same sign.
  Multiply the old correction factor by the number of days, and then add
  the new number of seconds (signed addition-- if the two numbers have
  the same sign, you'll get a larger number, if they have opposite
  signs, you'll get a smaller number).

  Then divide the total number of seconds by the number of days to get
  the new correction factor, and put it in /etc/adjtime in place of the
  old one. Write down the new date (in seconds or days) for next time.

  Here's what my /etc/adjtime looks like:


       -9.600000 845082716 -0.250655

  (note 9.6 seconds per day is nearly five minutes per month!)

  COFFEE-HOWTO
  Georgatos Photis, <gef@ceid.upatras.gr>
  v0.5, 15 January 1998

  One of the most bothering remarks on software, I have ever heard, is
  weather this or that thing can make coffee.  So, Linux DOES make cof
  fee. And it tastes good, instead!

  For a long time, humanity was wondering how could a computer make
  coffee...  People need coffee to get awake and stay asleep in front of
  the computer for a long time.  Everyone knows that coding is better at
  night...


  The main problem is how to control the coffee machine with the
  computer, so that it will be controlled by software.  This generally
  means an ON/OFF switch implemented as a circuit which controls the
  coffee-machine's power supply.


  1.  Menu

  1.1.  French

  Popular coffe among programmers because doesn't need a lot of care,
  like all commercial software.  Its exciting taste has inspired
  thousands of programmers in writing incredible software, written in
  the very first ours of a day.  Windows for example are written at 5:00
  o'clock in the morning, favouring to this coffee! Result is
  guaranteed.


  1.2.  Nescaffe

  Nescaffe is a rather strong coffee, made by pouring hot water in a
  mixture of coffee, sugar and some water.  You usually take 1 spoon of
  coffee and 1 spoon of sugar with just a bit of water, to mix it. In
  the meantime you should have the water boiling. As soon as the water
  is hot enough, you mix them all together and preferably add milk.
  Although you can use something simpler than a coffee-machine to boil
  the water, I have seen this scheme a lot of times...


  1.3.  frappe

  Popular variation of the above mentioned coffee.  Actually, it doesn't
  need any coffee-machine, rather a refridgerator to get cold water and
  ice-cubes.


  1.4.  freddo

  This is a difficult one, read coffee-faq (see references)


  1.5.  cappuccino (To be added)

  1.6.  (To be added) espresso

  2.  Electronic circuit

  A general diagram is like this:

  --------- 0-5V  --------- ~220V  ----------------
  |  PC   |===>===|Circuit|========|Coffee-Machine|
  ---------       ---------        ----------------

  The concept is that we take a controling voltage from the computer,
  which drives an electrically isolated circuit with Relay or Triac.


  You must choose a Relay circuit, if you have a big coffee-machine
  (greater than 200W or so), otherwise you can use a triac-based one.

  All circuits presented are at least once tested, but it's YOURS
  RESPONSIBILITY the results.  If you have no experience with
  electronics you should NOT try with these, otherwise you may get a bad
  one...


  You should be very careful while experimenting with 220V, and there is
  no obsolence in using an appropriate fuse.


  2.1.  Driving voltage 0-5V from the computer

  Here is a simple example to get a voltage 0-5V from the parallel port
  of the computer.

             Back View          -----    Pin 10 - ACK
             Male DB-25         |   |    Pin  9 - D7
             Connector          |   |                           Pin 2 - D0
                                v   v                           v   Pin 1 -
       ~Strobe
              ____________________________________________________________
             /                                                            \
             \     13  12  11  10   9   8   7   6   5   4   3   2   1     /
              \                                                          /
               \     25  24  23  22  21  20  19  18  17  16  15  14     /
                \______________________________________________________/

  Pin 1 is Strobe (inverse logic)

  Pins 2-9 is DATA BUS's signals, exactly what was written to the
  parallel port's latches with an OUTB command.

  Pin 10 is the acknowledge signal (ACK), controlled by you, so that you
  can produce an interrupt to the CPU.

  Pins 18-25 are short-circuited and this is the ground (GND).


  In detail:

  <= in   DB25    Cent    Name of         Reg
  => out  pin     pin     Signal          Bit     Function Notes
  ------  ----    ----    --------        ---     -----------------------------
  =>       1       1      -Strobe         C0-     Set Low pulse >0.5 us to send
  =>       2       2      Data 0          D0      Set to least significant data
  =>       3       3      Data 1          D1      ...
  =>       4       4      Data 2          D2      ...
  =>       5       5      Data 3          D3      ...
  =>       6       6      Data 4          D4      ...
  =>       7       7      Data 5          D5      ...
  =>       8       8      Data 6          D6      ...
  =>       9       9      Data 7          D7      Set to most significant data
  <=      10      10      -Ack            S6+ IRQ Low Pulse ~ 5 uS, after accept
  <=      11      11      +Busy           S7-     High for Busy/Offline/Error
  <=      12      12      +PaperEnd       S5+     High for out of paper
  <=      13      13      +SelectIn       S4+     High for printer selected
  =>      14      14      -AutoFd         C1-     Set Low to autofeed one line
  <=      15      32      -Error          S3+     Low for Error/Offline/PaperEnd
  =>      16      31      -Init           C2+     Set Low pulse > 50uS to init
  =>      17      36      -Select         C3-     Set Low to select printer
  ==      18-25   19-30,  Ground

  2.2.  Controlling with a Relay


  The simplest circuit that somebody can build is:

                                    Vcc
                                     |
                                     +------+
                                     |    __|__
                                   Relay   /^\  Diode 1N4002
                                    Coil  /---\
                                     |      |
                                     +------+
                                     |
                                  | /
                        4.7K    B |/  C
       parallel port >-\/\/\/\/---|        NPN Transistor: BC547A or 2N2222A
       data pi                    |\  E
                                  | V
                                    |
       parallel port >--------------+
       ground pin                   |
                                 Ground

  Connect Vcc with the same voltage as the relay type (usually 5 or
  12V).  Obviously, the relay's specifications should be reasonable for
  your coffee-machine.

  Barmen, usually, tend to put the relay AFTER the transistor, at the
  emitter (E) pin instead of the collector (C) pin. This is a bad
  practice because it biases the transistor badly, and may result in bad
  coffee :-).  Diode 1N4002 is useful to protect the transistor from the
  relay's currents.  If you don't use it the transistor will become
  darker and smelling...

  2.3.  Controlling with TRIAC #1

  If you only want a simple circuit, you can use Motorola's triac driver
  MOC301[012], together with a general purpose TRIAC like SC141D.  This
  method has the advantage that you don't need an extra power supply.


  For non-inductive loads this is the circuitry:

               270     1 +-------+ 6    180
         +5v -VAVAVA-----+       +----VAVAVA-----+-------------- Line Hot
                       2 |  MOC  |               |
         TTL in ---------+ 3012  +nc            VA  SC141D
                         |       | 4           / |
                       nc+       +------------/  |
                         +-------+               +----\/\/\/---- Line Neutral
                                                       LOAD

  If you are going to work with 220V, prefer a 3021.  Inductive loads
  should be used in conjuction with bypass capacitors, see Motorola
  Application Note AN-780.  Coffee-machines are mainly resistive loads
  and not inductive (like a motor), but who knows what's yours...


  2.4.  Controlling with TRIAC #2

       +5VDC
       |    180                      180            2.2k
       +---/\/\/\----+-----+   +----/\/\/-+--/\/\/\---+-------> 120V
                     |    1|   |6         |           |         Hot
                     |    +=====+         |           | MT1
                     |    | MC  | TRIAC   |          +-+
                     |    | 3032| Driver  |        G | | TRIAC
                     |    +=====+         |         /| |
                     \    2|   |4         |        / +-+
              2N3904  |----+   |          |        |  | MT2
                     /     |   +--------- | -------+  |
                    V      \              |        |  |
                    |      /              |        \  |
                    |      \ 43    .01u  ---   10k /  |
                    |      /       500V  ---       \  |
                    |      |              |        /  |
                    +------+              |        |  |            Neutral
                    |                     +--------+--+---o    o--> 120V
                    /                                      load
        >-/\/\--|  2N3904
                    \
                     V
                     |
                    ---
                   ///
       You should change resistors accordingly for 220V.

  Circuit description:

  The MC3032 is an optoisolator TRIAC driver.  The 180-ohm resistor sets
  the current for the LED emitter in the optoisolator.  Change the value
  of this resistor - if necessary - to get reasonable current (e.g., 15
  mA).

  Note that you cannot test this circuit without a load.  The TRIAC will
  not switch unless connected to an AC voltage source, so you can't test
  it for simple switching w/o applying AC and a load. Note the 500V
  rating on the .01 cap.


  3.  Software

  3.1.  Software

  You will have to build an executable that will perform like this:

    Get permissions to use I/O address space, by calling kernel, with
     the command ioperm: eg ioperm( BASE, range ,1);

    Perform an out request instruction, to set the 0-5V voltage to the
     parallel port, eg outb( 1, BASE );

    Wait for enough time so that coffee gets ready. It would be nice if
     that time is read by looking at the command line.

    Then it will turn off the coffee-machine: outb( 0 , BASE );

    Before ending it should give back the paraller port with a ioperm(
     BASE, range, 0);

     Change BASE = 0x3bc for /dev/lp0, 0x378 for /dev/lp1, and 0x278 for
     /dev/lp2, range=8.


  It would be nice if you had that program setuid, so that everybody can
  drink coffee!


  3.2.  Device driver


  Just read kernel hacker's guide, implement a device driver (it could
  even be user space i think).  Please, compile it as a module, so that
  we won't need a kernel compile in every update.  Then write:


  echo cappuccino >/dev/coffee

  And you will have a hot cup of coffee in 1 minute.  Remember to give
  the right permission to /dev/coffee, depending on whether you want
  only root making coffee or not.


  The advantage of this method is that it supports feedback from the
  coffee-machine by using the ACK of parallel port, so that smart
  coffee-machines could produce an interrupt.


  Do it as homework.


  3.3.  Connecting with the Internet

  If you have implemented the C programme (see above), you just have to
  write down a simple CGI script to turn ON and OFF the coffee-machine.
  You should write some nice webpages, explaining how to make coffee,
  and put them at an apache web server...


  4.  Overdose symptoms


    excitement

    nervousness

    insomnia

    tachycardia or cardiac arhythmia

    gastrointestinal disturbance

    restlessness


  5.  Expansions

  These are our ideas:

    All hardware and software described here, can be expanded so that
     it will support toast, beaf, applepies, etc.

    Cluster with 8 coffee-machines. This will let you have coffee even
     when the one gets off. Of course there will be a perfomance hit.

    Parallel vector coffee-machine will be a future release.

    If you want the maximum automation you'll need more circuits and
     censors, so that you can control water flow, temperature, coffee
     quantity etc.

    In the near future we will implement SNMP features.

    Serial coffee-machine at 115Kbps.


  6.  References


    http://daisy.uwaterloo.ca/~alopez-o/caffaq.html This is Internet's
     Coffee-FAQ

    http://lonestar.texas.net/~andrew/f_pc_.htm A lot of circuits in
     ASCII. Some of them are for parallel port.

    http://shell.rmi.net/~hisys/parport.html Whatever you wanted to
     learn about a parallel port and didn't dare to ask.

    http://sunsite.unc.edu/LDP/HOWTO/mini/IO-Port-Programming
     Programming of I/O ports under popular operating system Linux.

    http://www.redhat.com:8080/HyperNews/get/khg.html How to write your
     own device drivers. Come on, do it!

    http://www.hut.fi/Misc/Electronics/circuits/parallel_output.html
     Tomi Engdahl's web page is a *must see* for everyone who likes
     electronics.
    http://www.yahoo.com/Computers_and_Internet/Internet/
     Entertainment/Interesting_Devices_Connected_to_the_Net/Coffee_Machines/
     Coffee-machines on-line. Unfortunatelly, there are no tests.

    http://www.cs.su.oz.au/~bob/coffee.html This coffee-machine offers
     only cappuccino. It should be upgraded!

    http://einstein.et.tudelft.nl/~janssen/ Hot coffee from
     Netherlands.

    http://circe.chinalake.navy.mil/cgi-bin/spion/snapit.cgi

    http://www.cl.cam.ac.uk/coffee/coffee.html

    http://www.menet.umn.edu/coffeecam/


  7.  etc

  7.1.  preface

  This document was initially written in hellenic (greek), originating
  from a small debate in the linux-greek-users list , whether linux can
  make coffee or not.  It has been an article in our beautiful online
  magazine on Linux called "magaz": http://www.linux.gr/magaz.
  Remember, that magaz is greek.


  7.2.  Authorship and maintenance

  My name is Georgatos Photis, still-yet-foralongmaybe student at
  Computer Engineering and Informatics department in University of
  Patras.  Usually, I am pretty busy with the greek documentation and
  webpages maintainance, but I can accept submissions to this HOWTO, as
  long as you don't be anxious on the changes.


  7.3.  Copyrights

  The casual copyright with everything you get with linux...  To find
  it, you'll have to read all of them and count the most common.
  Otherwise, no, you can't copy it.


  7.4.  Credits


    Christofer Colombus. His real name is Cristobal Colon.  He was the
     1st one who brought coffee from America, which was for first
     discovered (among Europeans) by him in 1492.

    Kostas Lialiambis is the one who dared saying that he can't make
     coffee with his Linux box!

    Panagiotis Vrionis, Yannakopoulos Haralambos, for giving me
     interesting and humoristing notes.

  Commercial Port Advocacy mini-HOWTO
  Doug Loss dloss@seul.org
  v0.1, 29 December 1999

  This document discusses methods that can be used to approach commer
  cial software companies to convince them to port their programs to
  Linux.
  ______________________________________________________________________

  Table of Contents


  1. Copyright Information

  2. Why write this?

  3. Other efforts

  4. How to choose companies to approach

  5. The art of cold contacting

  6. What to say

  7. My standard contact message

  8. The final inspirational message

  9. Resources



  ______________________________________________________________________

  1.  Copyright Information

  This mini-HOWTO is Copyright  2000 by Douglas R. Loss.  All rights
  reserved.

  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author.  Translations
  are similarly permitted without express permission if they include a
  notice on who translated them.

  Short quotes may be used without prior consent from the author.
  Derivative work and partial distributions of this mini-HOWTO must be
  accompanied by either a verbatim copy of this file or a pointer to a
  verbatim copy.

  Commercial redistribution is allowed and encouraged; the author would
  like to be notified of any such distributions.

  In short, we wish to promote dissemination of this information through
  as many channels as possible.  However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  We further want all information provided in the HOWTOs to be
  disseminated.  If you have questions, please contact Tim Bynum, the
  Linux HOWTO coordinator, at linux-howto@sunsite.unc.edu.

  2.  Why write this?

  I read over all the other advocacy howtos for Linux that I could find
  (I've listed them in the resource section at the end).  They were
  almost all addressed to convincing end users (either business or
  personal) that Linux could meet their needs on a day-to-day basis.
  That's a very useful thing to do, but it wasn't what I was looking
  for. Only the Linux Advocacy Project came close to what I was looking
  for, and it didn't quite cover what I wanted.  I wanted something that
  would help me approach organizations making software for other
  platforms and convince them to port their works to Linux.  Since I
  couldn't find any howto concerning that I decided to write one.

  In this howto I'll cover how to approach software companies and what
  arguments may be most effective in convincing them to port their
  programs to Linux.  I won't talk about trying to convince them to
  release their Linux ports under open source licenses.  While that
  might be a good idea, I think these things should be done in small
  steps.  Advocating a port to another OS is much more likely to meet
  with interest than advocating what the company may perceive as "giving
  away" product, or advocating a radical change in their basic
  development model.

  3.  Other efforts

  There are other groups and individuals doing their parts in trying to
  get various software and hardware vendors to support Linux.  Norman
  Jacobowitz is a consultant working with SSC, Inc.  on an advocacy
  project that approaches the same problem I'm addressing here, although
  from a different direction.  Here's what he told me about his efforts:


       SSC, Inc, publishers of Linux Journal, maintain a "software
       wish list" at <http://www.linuxresources.com/wish>.  They
       are currently paying an outside consultant to use these
       results and other data to lobby marketing managers at ISVs
       to port their products to Linux.  This is an effective, on
       going project to bring more native software to Linux; so
       please drop by the wish list and vote for your favorite
       software.


  Andrew Mayhew has been trying to convince hardware vendors that making
  Linux drivers, or at least releasing the specifications so the Linux
  community can write the drivers, is a good idea.  Here are his
  thoughts:


       I go to conferences.  I was most recently at Networld-
       Interop in Atlanta (which was shortly followed by the
       Atlanta Linux Expo).  There at Interop I went to many of the
       vendors with two agendas.  First, I was there as a respre
       sentative of the ISP that I work for and was looking for
       solutions.  But secondly, I was there find out who currently
       had Linux support and if they didn't have Linux support, why
       they didn't and was the company considering it.  It is
       interesting to note, that in the large Novell section, there
       were actually two Linux related sub-booths.  Additionally,
       Cobalt Micro was there with their thin server, along with
       RedHat and Caldera.  Fairly small showings in a nearly com
       pletely non-Unix related conference, but a showing none the
       less.



       Most of the companies that I was talking to are primarily
       hardware vendors.  They already don't make any money off of
       their drivers.  They just need to develop the drivers so
       that people will use their hardware.  My typical approach to
       one of these companies was to first ask about the product in
       general, so that they could get through their marketing
  routine quickly, and then ask about driver support.  When
  the only words out of their mouths would be Windows 95, 98,
  and NT, I would ask about other platforms explaining that I
  run in a multiplatform environment and would need interoper
  ability between these platforms.  In introducing the idea
  that they should support other platforms I would only slowly
  work in the idea of Linux as one of them.  I found that
  introducing the idea that I wanted driver support for Linux
  right off typically got me a knee-jerk reaction which would
  basically have the person shutdown and try to find a way to
  get out of the conversation.  But if you can get their
  defenses down then you can explain to them how, in general,
  all they would need to invest to get Linux drivers would be
  to openly publish the specifications for talking to whatever
  hardware and possibly providing hardware to key developers.
  The biggest argument to this, is typically, "We have some
  proprietary ways of doing X and don't want to have that
  information out in the open."  The usual way around this
  problem is to explain that being able to talk and use a
  device does not normally mean having to know what propri
  etary tricks they are pulling.  At least this fits with the
  wireless LAN and the Fibre Channel IP people that I was
  dealing with.



       One smaller company, which I think may attempt to find some
       one in the community to help develop a driver for them came
       up with an interesting solution around the proprietary
       issues as well.  This being that they would have the initial
       developers sign NDAs for the hardware documentation, but the
       source code could be open source so long as the documenta
       tion in the source was not just a copy of what the company
       provided the developer.



       For software companies, I think it is a very good idea to
       point out that there is nothing or very little available of
       their kind of software; whatever that area of software is.
       But it probably should also be noted what does exist.  Of
       particular interest would be the development tools, the
       development support available, and possibly information
       about other porting projects.  In terms of these other pro
       jects they would be interested in the porting problems that
       they have solved or would similarly be tackling.


  4.  How to choose companies to approach

  First, you need to identify an area where Linux is deficient in
  programs.  I wouldn't try to convince any company to port their web
  server to Linux.  There are plenty of such programs available.  I'd
  much rather use my time trying to convince companies to port games or
  kindergarten through 12th grade educational programs to Linux, as
  there's very little of those types available (none in the educational
  area, so far as I know).

  Second, you need to identify companies that are most likely to be
  interested.  I have no hard evidence of this, but I strongly suspect
  that your efforts will meet more success if you concentrate on second-
  tier companies rather than on market leaders in your chosen category.
  Companies with seemingly dated products or products that were aimed at
  obscure platforms would seem to be good targets.  Their software may
  not be dated for Linux users since we're not always taken in by the
  hype factor.  They may well be looking for new markets for their
  products as their present market dwindles along with their ability to
  compete.  I doubt that Disney or Davidson and Co. would consider
  porting their educational programs nearly as quickly as say, Soleil
  Software or Topologika.  Also, if a company provides its software for
  both Windows and Macintosh currently, it may be more likely to
  consider supporting yet another OS than one that is exclusive to the
  Windows or Mac world.  If all the companies in your target category
  are Windows or Macintosh exclusive I'd try the Mac shops first, as a
  Linux port would give them a much greater market expansion (on a
  percentage basis) than it would a Windows-only company.

  5.  The art of cold contacting

  What you will be doing is known in the fund-raising business as "cold
  contacting."  This means that your "target" company won't have known
  that you'll be contacting it, and won't have been primed to hear your
  message.  A 1% response rate is considered normal.  You should be able
  to do better than that.

  In a sense all target companies will be slightly primed to hear about
  Linux due to the remarkable amount of publicity it's been getting of
  late.  In that respect your contact won't be completely cold.  That's
  good.

  The first thing to do is to identify someone in the company to
  contact.  It's always best (if possible) to identify an actual
  individual rather than a job title.  Depending on the size of the
  company and its organizational structure, your best bet is the head of
  program development.  If that isn't a possibility, try for the head of
  whatever technical section the company may have.  If that isn't
  possible, read over whatever bios might be available in the "about the
  company" section of the company's web site (they almost all have
  something like this) and pick the person who seems most likely to be
  intrigued by Linux and to become an internal advocate for a Linux
  port.  Finally, if none of the above things works try contacting the
  head of the company.  Incidentally, it won't hurt to contact more than
  one person in the company if your bio research shows somebody other
  than the head of program development as the most likely person to be
  interested.

  Your initial contact should probably be via email.  First, email
  usually goes directly to the person addressed rather than being
  filtered through various layers of the organization as postal mail and
  telephone calls are.  Second, with email everyone starts equal.
  Physical presentation and elocution don't enter into the contact, so
  the logic of the message may be more apparent.

  The subject of your message should be understated.  "Make Millions
  Easily!" will just get your message deleted as spam.  Try something
  like "A good new market for your programs," or "An overlooked market
  for your software."

  The first sentence in your message should probably be a conditional
  apology for sending the message to the wrong person if the person
  receiving it is the wrong person.  The next sentence should request
  that the message be forwarded to the right person and that that
  person's email address be sent back to you for future contacts.  This
  has a few effects.  The apology establishes that you're not a know-it-
  all and that you are polite.  The request reinforces the politeness
  and quietly lets it be known that this won't be a one-time contact.
  That's important.  It's a lot easier to blow off a message if you
  don't think you'll ever hear from the writer again.

  That brings up another point.  If things work out right, you won't be
  making just a one-time contact with this company.  You will be signing
  up to be an outside contact for them, a source of information about
  things Linux.  As such, there are some guidelines to follow in all
  your contacts.  Be polite.  Be patient.  Be truthful.  Be helpful.
  Stay apart from internal politics.

  Be polite means responding civilly to all messages, even if you
  consider them insulting or moronic.  Remember, "A soft answer turneth
  away wrath."  Besides, it's just possible that you may have
  misunderstood the message.  Asking for a restatement of the message to
  clear up its meaning can't hurt.

  Be patient means answering what you consider obvious questions calmly
  and clearly, and answering them as many times as necessary.  Email
  isn't real-time; you can take a jog around to block to cool down
  before answering yet another, "But doesn't a Linux port mean we'd be
  expected to give our products away?" message.

  Be truthful means answering each question to the best of your ability,
  and saying "I don't know" when that's the correct answer.  However, "I
  don't know" is only the first part of that answer; "but I'll find out
  and get back to you" is the rest of it.

  Be helpful means going beyond just answering the immediate question
  and trying to address the reasons the question was asked.  For
  example, one company asked me how it could publicize the existence of
  a Linux port if it did one.  I mentioned the standard places
  (comp.os.linux.announce, Linux Weekly News, Freshmeat, Slashdot, Linux
  Journal).  Then I brought the question up in the seul-dev-apps mailing
  list.  The discussion there eventually started the development of the
  lu-news system <http://linuxunited.org/projects/news/>.

  Stay apart from internal politics means keeping a little distance
  between yourself and your company contact.  However friendly your
  exchanges are, your role shouldn't be one of confidante but one of
  outside expert and advocate.  You won't force the company into
  supporting Linux.  You can only make sure they know about the
  opportunity and help them find the best way to take advantage of it.

  You should probably be prepared to answer questions about why no one
  else in the target company's market niche is developing for Linux (if
  that's indeed the case), and what capabilities are available in Linux,
  such as multimedia.  Are the available media players exploitable
  commercially?  Do they run efficiently?  You might also make the point
  that a port to Linux of a graphical program will mean a port to the X
  Window System and will mean that the program is much easier to port to
  any other OS that uses X, such as Solaris, AIX, or HPUX.

  Andrew Mayhew brought up this point to me, and it makes a lot of
  sense:


       It has been my (albeit limited) experience that structuring
       the email/letter sent to companies with the idea that I or
       one of my clients is actually interested in their product at
       the beginning (or as closely as reasonable) of the document
       gets more results.  Now, this is only really applicable is
       you mean it.


  6.  What to say

  Okay, enough about what tone to adopt.  What do you say to convince
  them that the Linux community is worth porting for?  Here's what I
  did.

  First, I explained as well as I could just who the Linux community is,
  and why Linux users would be a receptive group for my target company's
  products.  I very carefully didn't exaggerate, and made sure that I
  explained when my figures were estimates rather than hard numbers.  If
  someone comes up with a way of measuring usage, we may be able to get
  the hard numbers we need for market demographics, but till then we
  have to do our best.

  Next I explained why I thought the Linux market would be good for the
  company to enter.

  Then I laid out the ways in which the company's current program line
  could be ported to Linux.  I must say that I lean toward using Abacus
  Research & Development Inc. (ARDI) <http://www.ardi.com> Executor
  technology as a "wrapper" for Macintosh binaries as the easiest and
  quickest way to do that, but WINE <http://www.winehq.com> and the TWIN
  library <http://www.willows.com> (as I understand it,these two groups
  are now working together) are all possible tools to help move programs
  to Linux without full-blown ports.  Incidentally, I cleared my letter
  with ARDI before I mentioned any action that their engineers might be
  able to take for the company.  You would lose credibility if the
  target company acted on your recommendation, contacted someone like
  ARDI, and was essentially told, "We don't know what you're talking
  about."

  There's also Loki Software <http://www.lokisoftware.com>, which does
  ports of commercial software to Linux.  So far they're done only
  games, but when I talked with the president of Loki a while ago he was
  quite willing to consider doing similar ports of other types of
  software.

  Finally, I ended with a personal note on why I was trying to convince
  the company to port to Linux.  Here's a copy of my standard letter;
  don't copy it word for word, but feel free to adapt its organization
  if you like:

  7.  My standard contact message


       Dear Sir or Madam:



       If I've sent this to the wrong address in your organization,
       I apologize; could you please forward it to the appropriate
       person?  Also, could you let me know who that appropriate
       person is so I can direct future communications to him or
       her?  Thank you.



       I know that [insert company name here] has fine educational
       software programs for both the Macintosh and Windows PCs.
       However, I'd like to speak on behalf of a computer community
       that has heretofore been overlooked by the entire educa
       tional software industry; the Linux community.  I'd also
       like to call your attention to porting tools that can make
       moving Windows and especially Macintosh software to Linux
       nearly trivial.



       Linux is the fastest growing operating system in the world.
       It is impossible to put exact numbers on how quickly it is
       growing because it can be downloaded for free off of the
       internet. The last attempt to estimate the total user base
       in early 1998 came up with  7 million users world-wide in
       early 1998 with over 100% growth/year. The explosion of
  Linux publicity since then has undoubtedly kept that growth
  rate alive, putting the current market at around 20 million
  with rapid expansion for some time to come.  That's more
  than the worldwide total of OS/2 users and is near (if not
  more than) the number of Macintosh users.  In addition,
  these numbers should probably be in some part subtracted
  from the Windows and Macintosh user figures, as almost all
  of the computers Linux is used on initially had Windows or
  MacOS installed.



       Just who are these Linux users?  They are primarily male,
       technically educated, and in their early twenties.  The
       first two traits are more standard than the last; Linux
       users range from the teens to probably the mid-40s in age.
       (I'm 46, so I had to extend the range at least that far.)
       This is a prime demographic for the educational software
       market.  These are people who generally have or will soon
       move into well-paying jobs in technical fields, and who are
       often just starting families.  Linux users are usually not
       very patient with MacOS or Windows, and so tend not to see
       or to consider software offerings for those operating sys
       tems.



       To the best of my knowledge, there are currently zero educa
       tional software programs available for Linux.  While many
       Linux users will write their own programs if they can't find
       anything to fit their needs, that has so far not been the
       case with educational software.  This may be because Linux
       only originated in 1991, and has only experienced explosive
       growth in the last 2-3 years.  The market is completely
       open.



       This has only recently been noticed by the Linux community.
       As more of us have young children, the awareness of the need
       for educational software for Linux is growing.  I'm sure it
       will only be a matter of time till someone begins to address
       this need.



       What is the easiest, most cost-effective way to enter this
       market?  It's certainly not impossible to start from source
       code and rewrite the operating-system-specific routines to
       work with Linux.  That's what many Macintosh ISVs did when
       they wanted to enter the Windows market.  However, there are
       easier ways.



       There are "wrapper" programs available for both Windows and
       Macintosh programs, which enable them to run on Linux with
       out having to be rewritten extensively.  For Windows, there
       is the TWIN library from Willows Software <http://www.wil
       lows.com>.  I don't have any direct experience with TWIN,
       but the Willows website gets quite specific on what Windows
       routines move across cleanly and what ones need some touch
       up.  The WINE Project (<http://www.winehq.com>) also has
       Winelib, a similar set of libraries that Corel is planning
       to help develop and use in porting its office applications
       to Linux.
       For Macintosh programs, Abacus Research & Development, Inc.
       (ARDI <http://www.ardi.com/>) has rewritten a substantial
       fraction of the Macintosh OS and toolbox routines, and makes
       this technology available in two different ways.  Executor
       is available both as a Macintosh emulator for end-users and
       as a porting tool for Mac ISVs.  Executor is available for
       Linux, DOS and Windows.  A demo of Executor for Linux is
       included on the Red Hat 5.1 Linux distribution, the most
       popular commercial distribution.  The engineers at ARDI are
       fluent in Macintosh and Linux and can evaluate how hard it
       would be to make a Linux version of your Macintosh software.
       In many cases it can be done without your needing to change
       a single line of code.  A Linux version of your program cre
       ated in this way can easily fit on the same CD-ROM as your
       Mac and Windows executables, thereby giving you a three-OS
       program on one SKU.  The expenditure required to open up
       this potentially lucrative new market is relatively minor;
       certainly much lower than the cost of the ports many compa
       nies made in expanding from the Mac-only market into the
       Windows and Mac market.



       Finally, a personal note.  The reason I'm moved to write to
       you proposing that you enter the Linux educational software
       market is my 6-year-old son.  I run Linux because, of all
       the operating system choices available, it best fills my
       needs and desires.  If there were good educational software
       available for Linux, I'd snap it up.  I know I'm not alone;
       I've heard from other parents every time I've mentioned the
       problem in various Linux forums.  There's a market out here
       waiting to buy your product.  Please don't disappoint us.


  8.  The final inspirational message

  If you decide to take a turn at advocating commercial software ports
  to Linux, remember that in so doing you're not acting as merely one
  individual, but as a representative of our entire community.  I know
  we're more honest than Microsoft; I like to think we're less self-
  satisfied than Apple; I hope we're more generous in helping other
  users in need than any of the other user communities.  Show those
  qualities to the companies you contact--honesty, humility, and
  helpfulness--and you stand a good chance of being successful.

  9.  Resources

  Here is the list of other advocacy documents I looked through before I
  decided to write this one.  While they didn't cover the aspect of
  Linux advocacy I was looking for, they are well worth your time to
  read through.  They have a lot of good advice on how to be an
  effective ambassador to the non-Linuxen out there.


    Linux Advocacy Project <http://www.10mb.com/linux/>

    Linux Advocacy mini-HOWTO
     <http://www.datasync.com/~rogerspl/Advocacy-HOWTO.html>

    Why Linux? <http://www.seul.org/docs/whylinux.html>

    Why Linux? <http://www.mwsoftware.com/linux/whylinux.html>

    Why use Linux? <http://www.croftj.net/~goob/local/why.html>


    Politics <http://www.linux-center.org/en/politics/index.html>

    [No Title] <http://www.flash.net/~landley/linux/index.htm>

    Advocating Linux
     <http://www.cs.helsinki.fi/~wirzeniu/texts/advocating-linux.html>

    Linux FUD Factor
     <http://www.geocities.com/SiliconValley/Hills/9267/fud2.html>

    Linux Myth Dispeller
     <http://www.KenAndTed.com/KensBookmark/linux/index.html>

    Linuxmanship
     <http://electriclichen.com/people/dmarti/linuxmanship.html>

    Four Phases of Linux Acceptance
     <http://www.xunil.com/xunil/j4phases.html>

    To use, or not to use? <http://www.linuxos.org/Why-Linux.html>

    Linux Compared to Other OSs
     <http://www.linuxgazette.com/issue25/sorensen.html>



  Compressed TCP/IP-Sessions using SSH-like tools
  Sebastian Schreiber <Schreib@SySS.de>

  2.2.2000

  1.  Introduction

  In the past, we used to compress files in order to save disk space.
  Today, disk space is cheap - but bandwidth is limited. By compressing
  data streams, you achieve two goals:

  1) You save bandwidth/transfered volume (that is important if you have
  to pay for traffic or if your network is loaded.).

  2) Speeding up low-bandwidth connections (Modem, GSM, ISDN).

  This HowTo explains how to save both bandwith and connection time by
  using tools like SSH1, SSH2, OpenSSH or LSH.

  2.  Compressing HTTP/FTP,...

  My office is connected with a 64KBit ISDN line to the internet, so the
  maximum transfer rate is about 7K/s. You can speed up the connection
  by compressing it: when I download files, Netscape shows up a transfer
  rate of up to 40K/s (Logfiles are compressable by factor 15). SSH is a
  tool that is mainly designed to build up secure connections over
  unsecured networks. Further more, SSH is able to compress connections
  and to do port forwarding (like rinetd or redir).  So it is the
  appropriate tool to compress any simple TCP/IP connection. "Simple"
  means, that only one TCP-connection is opened. An FTP-connections or
  the connection between M$-Outlook and MS-Exchange are not simple as
  several connections are established. SSH uses the LempleZiv (LZ77)
  compression algorithm - so you will achieve the same high compression
  rate as winzip/pkzip. In order to compress all HTTP-connections from
  my intranet to the internet, I just have to execute one command on my
  dial-in machine:

  ssh -l <login ID> <hostname> -C -L8080:<proxy_at_ISP>:80 -f sleep
  10000

  <hostname> = host that is located at my ISP. SSH-access is required.

  <login ID> = my login-ID on <hostname>

  <proxy_at_ISP> =the web proxy of my ISP

  My browser is configured to use localhost:8080 as proxy. My laptop
  connects to the same socket. The connection is compressed and
  forwarded to the real proxy by SSH. The infrastructure looks like:



                    64KBit ISDN
  My PC--------------------------------A PC (Unix/Linux/Win-NT) at my ISP
  SSH-Client         compressed        SSH-Server, Port 22
  Port 8080                             |
   |                                    |
   |                                    |
   |                                    |
   |10MBit Ethernet                     |100MBit
   |not compressed                      |not compressed
   |                                    |
   |                                    |
  My second PC                         ISP's WWW-proxy
  with Netscape,...                    Port 80
  (Laptop)



  3.  Compressing Email

  3.1.  Incoming Emails (POP3, IMAP4)

  Most people fetch their email from the mailserver via POP3. POP3 is a
  protocol with many disadvantages:


  1. POP3 transfers password in clear text. (There are SSL-
     implementations of POP/IMAP and a challenge/response
     authentication, defined in RFC-2095/2195).

  2. POP3 causes much protocol overhead: first the client requests a
     message than the server sends the message. After that the client
     requests the transferred article to be deleted. The server confirms
     the deletion. After that the server is ready for the next
     transaction. So 4 transactions are needed for each email.

  3. POP3 transfers the mails without compression although email is
     highly compressible (factor=3.5).

  You could compress POP3 by forwarding localhost:110 through a
  compressed connection to your ISP's POP3-socket. After that you have
  to tell your mail client to connect to localhost:110 in order to
  download mail. That secures and speeds up the connection -- but the
  download time still suffers from the POP3-inherent protocol overhead.



  It makes sense to substitute POP3 by a more efficient protocol. The
  idea is to download the entire mailbox at once without generating
  protocol overhead.  Furthermore it makes sense to compress the
  connections. The appropriate tool which offers both features is SCP.
  You can download your mail-file like this:



  scp -C -l loginId:/var/spool/mail/loginid /tmp/newmail



  But there is a problem: what happens if a new email arrives at the
  server during the download of your mailbox? The new mail would be
  lost. Therefore it makes more sense to use the following commands:

  ssh -l loginid mailserver -f mv /var/spool/mail/loginid
  /tmp/loginid_fetchme
  scp -C -l loginid:/tmp/my_new_mail /tmp/loginid_fetchme

  A move (mv) is a elementary operation, so you won't get into truble if
  you receive new mail during the execution of the comands. But if the
  mail server directories /tmp/ and /var/spool/mail are not on the same
  disc you might get problems. A solution is to create a lockfile on the
  server before you execute the mv: touch /var/spool/mail/loginid.lock.
  You should remove it, after that.  A better solution is to move the
  file loginid in the same directory:

  ssh -l loginid mailserver -f mv /var/spool/mail/loginid
  /var/spool/mail/loginid_fetchme

  After that you can use formail instead of procmail in order to filter
  /tmp/newmail into the right folder(s): formail -s procmail <
  /tmp/newmail

  3.2.  Outgoing Email (SMTP)

  You send email over compresses and encrypted SSH-connections, in order
  to:


    Save network traffic

    Secure the connection (This does not make sense, if the mail is
     transported over untrusted networks, later.)

    Authenticate the sender.  Many mail servers deny mail relaying in
     order to prevent abuse. If you send an email over an SSH-
     connection, the remote mail server (i.e. sendmail or MS-exchange)
     thinks to be connected, locally.

  If you have SSH-access on the mail server, you need the following
  command:

  ssh -C -l loginid mailserver -L2525:mailserver:25

  If you don't have SSH-access on the mail server but to a server that
  is allowed to use your mail server as relay, the command is:

  ssh -C -l loginid other_server -L2525:mailserver:25

  After that you can configure your mail client (or mail server: see
  "smarthost") to send out mails to localhost port 2525.

  4.  Thoughts about performance.

  Of course compression/encryption takes CPU time. It turned out that an
  old Pentium-133 is able to encrypt and compress about 1GB/hour --
  that's quite a lot. If you compile SSH with the option "--with-none"
  you can tell SSH to use no encryption. That saves a little
  performance. Here is a comprise between several download methods
  (during the test, a noncompressed 6MB-file was transfered from a
  133MHz-Pentium-1 to a 233MHz Pentium2 laptop over a 10MBit ethernet
  without other load).



  +-------------------+--------+----------+-----------+----------------------+
  |                   |  FTP   |encrypted |compressed |compressed & encrypted|
  +-------------------+--------+----------+-----------+----------------------+
  +-------------------+--------+----------+-----------+----------------------+
  |   Elapsed Time    | |7.6s  |   26s    |    9s     |          23s         |
  +-------------------+--------+----------+-----------+----------------------+
  |    Throughput     | 790K/s |  232K/s  |  320K/s   |        264K/s        |
  +-------------------+--------+----------+-----------+----------------------+
  |Compression Factor |   1    |    1     |    3.8    |          3.8         |
  +-------------------+--------+----------+-----------+----------------------+



  5.  Greetings

  Thanks to Harald Knig <koenig@tat.physik.uni-tuebingen.de>, who used
  rcp in order to download complete mailboxes. The latest version of
  this howto is available on http://www.syss.de/howto.




DHCP mini-HOWTO

Vladimir Vuksan

               vuksan@veus.hr
   
   Revision History
   Revision v4.10 July 3, 2000 Revised by: vv
   
   This document attempts to answer basic questions on how to set up your
   Linux box to serve as a DHCP server or a DHCP client.
     _________________________________________________________________
   
   Table of Contents
   1. [1]Introduction
          
        1.1. [2]Standard Disclaimer
        1.2. [3]New Versions of this Document
        1.3. [4]Feedback
        1.4. [5]Contributors
        1.5. [6]Copyright Information
                
   2. [7]DHCP protocol
   3. [8]Client Setup
          
        3.1. [9]Downloading the client daemon (dhcpcd)
        3.2. [10]Slackware
        3.3. [11]RedHat 6.x and Mandrake 6.x
        3.4. [12]RedHat 5.x
        3.5. [13]RedHat 4.x and Caldera OpenLinux 1.1/1.2
        3.6. [14]Debian
        3.7. [15]LinuxPPC and MkLinux
        3.8. [16]Tying it all together
        3.9. [17]Various notes
        3.10. [18]Troubleshooting
        3.11. [19]Alternative DHCP client (ISC dhclient)
                
   4. [20]DHCP Server Setup
          
        4.1. [21]DHCP server for UNIX
        4.2. [22]DHCP server configuration
        4.3. [23]Options for DHCPd
        4.4. [24]Starting the server
        4.5. [25]Other interesting documents
                
1. Introduction

1.1. Standard Disclaimer

   No liability for the contents of this documents can be accepted. Use
   the concepts, examples and other content at your own risk. As this is
   a new edition of this document, there may be errors and inaccuracies,
   that may of course be damaging to your system. Proceed with caution,
   and although this is highly unlikely, I don't take any responsibility
   for that.
   
   Also bear in mind that this is NOT official information. Much content
   in this document are assumptions, which appear to work for people. Use
   the information at your own risk.
     _________________________________________________________________
   
1.2. New Versions of this Document

   New versions of this document are available from
   
   [26]http://www.oswg.org/oswg-nightly/DHCP.html
   
   Following translations of the DHCP mini-HOWTO are available:
   
     * Chinese - [27]http://www.linux.org.tw/CLDP/mini/DHCP.html
     * Japanese - [28]http://www.linux.or.jp/JF/JFdocs/DHCP.html
     * Spanish -
       [29]ftp://cuates.pue.upaep.mx/pub/linux/LuCAS/DHCP-mini-Como/
       
   Permission is hereby granted to all individuals who want to translate
   the document into their own language. I would only ask that you
   provide a link back to this document and inform me of a URL to your
   translation so I can include a link to it.
     _________________________________________________________________
   
1.3. Feedback

   Feedback is most certaintly welcome for this document. Without your
   submissions and input, this document wouldn't exist. So, please post
   your additions, comments and criticisms to
   <[30]vuksan-feedback@veus.hr>.
     _________________________________________________________________
   
1.4. Contributors

   This document has been modified from the original version by Paul
   Makeev.
   
   The following people have contributed to this mini-HOWTO.
   
     * Heiko Schlittermann
     * Jonathan Smith
     * Dan Khabaza
     * Hal Sadofsky
     * Henrik Stoerner
     * Paul Rossington
     * numerous others
     _________________________________________________________________
   
1.5. Copyright Information

   This document is copyrighted (c) 1998 Vladimir Vuksan and distributed
   under the terms of the OpenContent License (OPL). Full text of the
   license can be found at
   
   [31]http://www.opencontent.org/opl.shtml
     _________________________________________________________________
   
2. DHCP protocol

   DHCP is Dynamic Host Configuration Protocol. It is used to control
   vital networking parameters of hosts (running clients) with the help
   of a server. DHCP is backward compatible with BOOTP. For more
   information see RFC 2131 (old RFC 1541) and other. (See Internet
   Resources section at the end of the document). You can also read
   [32]http://web.syr.edu/~jmwobus/comfaqs/dhcp.faq.html.
   
   This mini-HOWTO covers both the DHCP _SERVER_ daemon as well as DHCP
   _CLIENT_ daemon. Most people need the client daemon which is used by
   workstations to obtain network information from a remote server. The
   server daemon is used by system administrators to distribute network
   information to clients so if you are just a regular user you need the
   _CLIENT_ daemon.
     _________________________________________________________________
   
3. Client Setup

   Currently there are three different DHCP client programs for Linux,
   dhcpcd, pump and dhclient. This mini-HOWTO deals primarily with
   dhcpcd.
     _________________________________________________________________
   
3.1. Downloading the client daemon (dhcpcd)

   Depending on your distribution you might have to download the DHCP
   client daemon. If you want to compile it from the source you package
   you need is called dhcpcd and the current version is 1.3.18. It is
   maintained by Sergei Viznyuk <[33]sergei@phystech.com> and today it
   comes as a binary package with most distributions.
   
   dhcpcd source can be downloaded from following locations
   
     * [34]ftp://ftp.phystech.com/pub/ (Primary site)
     * [35]http://www.cps.msu.edu/~dunham/out/
       
   Then follow the instructions below. They should be the same.
     _________________________________________________________________
   
3.2. Slackware

   You can download the latest copy of the DHCPcd from any Metalab mirror
   or following:
   
     * [36]ftp://metalab.unc.edu/pub/Linux/system/network/daemons
     * [37]ftp://ftp.phystech.com/pub/ (Primary site)
       
   Download the latest version of dhcpcd.tar.gz.
   
     * Unpack it
       tar -zxvf dhcpcd-1.3.18pl1.tar.gz
     * cd into the directory and make dhcpcd
       cd dhcpcd-1.3.18pl1
       make
     * Install it (you have to run the following command as root)
       make install
       
   This will create the directory /etc/dhcpc where DHCPcd will store the
   DHCP information and dhcpcd file will be copied into /usr/sbin.
   
   In order to make the system initialize using DHCP during boot type:
   
   cd /etc/rc.d
   
   mv rc.inet1 rc.inet1.OLD
   
   This will move the old network initialization script into
   rc.inet1.OLD. You now need to create the new rc.inet1 script.
   Following code is all you need:
#!/bin/sh
#
# rc.inet1      This shell script boots up the base INET system.

HOSTNAME=`cat /etc/HOSTNAME` #This is probably not necessary but I
                             #will leave it in anyways

# Attach the loopback device.
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

# IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the
# eth0 interface. If you're only using loopback or SLIP, don't include the
# rest of the lines in this file.

/usr/sbin/dhcpcd

   Save it and reboot your computer.
   
   When you are finished go the [38]last step.
     _________________________________________________________________
   
3.3. RedHat 6.x and Mandrake 6.x

   DHCPcd configuration under RedHat 6.0+ is really easy. All you need to
   do is start the Control Panel by typing control-panel.
   
     * Select "Network Configuration"
     * Click on Interfaces
     * Click Add
     * Select Ethernet
     * In the Edit Ethernet/Bus Interface select "Activate interface at
       boot time" as well as select "DHCP" as "Interface configuration
       protocol"
       
   Please note that in RedHat 6.x Redhat as default includes a DHCP
   client called pump instead of above mentioned dhcpcd. CD-ROM does
   include dhcpcd RPM so if you have no luck with pump try with dhcpcd.
   After you install dhcpcd (e.g. rpm -i dhcpcd-1.3.17pl2-1.i386.rpm) you
   will have to make some [39]changes.
   
   Additional notes from Alexander Stevenson
   <[40]alexander.stevenson@home.com>:
   
   I had no luck with DHCPcd. What finally worked for me was "pump",
   which comes with Linux Mandrake 6.0 (and so I assume it is included
   with RedHat as well). The command I used was:
   
   pump -i eth0 -h hostname
   
   It didn't matter what "hostname" was, but without it the server would
   not respond.
   
   I then changed the line in my /sbin/ifup script to reflect the change;
   the default version does not have the -h switch, and so didn't work
   for me.
   
   Basically, if you're using linuxconf, and after setting the adapter to
   "DHCP" it still doesn't work, try adding a "-h hostname" to the pump
   line in the /sbin/ifup script. My script now looks like this:
...
if [ -n "$PUMP" ]; then
    echo -n "Determining IP information for $DEVICE..."
    if /sbin/pump -i $DEVICE -h hostname; then
        echo " done."
    else
        echo " failed."
        exit 1
    fi
else ...

   That is it. Reboot your machine or type /sbin/ifup eth0 on the command
   line.
     _________________________________________________________________
   
3.4. RedHat 5.x

   DHCPcd configuration under RedHat 5.0+ is really easy. All you need to
   do is start the Control Panel by typing control-panel.
   
     * Select "Network Configuration"
     * Click on Interfaces
     * Click Add
     * Select Ethernet
     * In the Edit Ethernet/Bus Interface select "Activate interface at
       boot time" as well as select "DHCP" as "Interface configuration
       protocol"
       
   When you are finished go the [41]last step.
     _________________________________________________________________
   
3.5. RedHat 4.x and Caldera OpenLinux 1.1/1.2

   DHCPcd is included in the standard RedHat distribution as an RPM and
   you can find it on your distribution's CD-ROM in RPMS directory or you
   can download it from:
   
   [42]ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/dhcpcd
   -0.6-2.i386.rpm
   
   Install it with rpm -i dhcpcd-0.6-2.i386.rpm.
   
   Alternatively you can compile your own version by following the steps
   outlined in the [43]Slackware.
   
   The following information was provided to me by nothing
   <[44]nothing@cc.gatech.edu>.
   
     Removed my static ip and name from /etc/resolv.conf. However, I did
     leave in the search line and my two nameserver lines (for some
     reason my dhcpcd never creates a /etc/dhcpc/resolv.conf, so I have
     to use a static /etc/resolv.conf).
     
     In /etc/sysconfig/network I removed the HOSTNAME and GATEWAY
     entries. I left the other entries as is (NETWORKING, DOMAINNAME,
     GATEWAYDEV).
     
     In /etc/sysconfig/network-scripts/ifcfg-eth0 I removed the IPADDR,
     NETMASK, NETWORK, and BROADCAST entries. I left DEVICE and ONBOOT
     as is. I changed the BOOTPROTO line to BOOTPROTO=dhcp.
     
     Save the file. Reboot your computer.
     
   When you are finished go the [45]last step.
     _________________________________________________________________
   
3.6. Debian

   There is a deb package of DHCPcd (make sure it starts with dhcpcd) at:
   
   [46]http://ftp.debian.org/debian/dists/slink/main/binary-i386/net/
   
   Or, follow the [47]Slackware installation instructions.
   
   To unpack the deb package type dpkg -i
   /where/ever/your/debian/packages/are/dhcpcd*deb.
   
   It appears that there isn't a need for any DHCPcd configuration
   because:
   
   
   The dhcpcd package installs it's startup script as usual for debian
   packages in /etc/init.d/package_name, here as /etc/init.d/dhcpcd, and
   links this to the various /etc/rc?.d/ directories.
   
   --From: Heiko Schlittermann <[48]heiko@os.inf.tu-dresden.de>
   
   The contents of the /etc/rc?.d/ dirs is then executed at boot time.
   
   If you don't reboot after installing you should consider starting the
   daemon manually: /etc/init.d/dhcpcd start.
   
   When you are finished go the [49]last step.
     _________________________________________________________________
   
3.7. LinuxPPC and MkLinux

   Following section has been written by R. Shapiro
   
   As of the "1999" (R5) release, Linuxppc is now almost completely
   compatible with Redhat 6, with one caveat (see below). In general the
   instructions are exactly the same as for the current release of
   [50]RedHat 6.x and Mandrake 6.x.
   
   The remaining problem is that Redhat 6 uses the 'pump' client for dhcp
   by default, and 'pump' doesn't work reliably in Linuxppc. To get
   around this, you should install the latest dhcpcd from Sergei Viznyuk,
   and then edit /sbin/ifup to use dhcpcd instead of pump.
   
   Change
if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
     PUMP=true
 fi

 if [ -n "$PUMP" ]; then

   with
 if [  "$BOOTPROTO" = bootp ]; then
       echo " done."
     else
       echo " failed."
       exit 1
     fi
 elif [ "$BOOTPROTO" = dhcp ]; then
     echo -n "Determining IP information for $DEVICE..."
     if /sbin/dhcpcd -d $DEVICE ; then
       if [ -f /etc/dhcpc/dhcpcd-${DEVICE}.exe ]; then
           /etc/dhcpc/dhcpcd-${DEVICE}.exe
       fi

   and a coresponding changes for ifdown. Change
if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
....
fi

   with
if [ "$BOOTPROTO" = bootp ]; then
fi

if [ "$BOOTPROTO" = dhcp ]; then
      if [ -f /var/run/dhcpcd-${DEVICE}.pid ]; then
              kill `cat /var/run/dhcpcd-${DEVICE}.pid`
              rm -f /var/run/dhcpcd-${DEVICE}.pid
      fi
fi

   A working ppc rpm for dhcpcd is included on the Linuxppc 1999 cd; a
   slightly later rpm is available in the contrib directory on
   [51]ftp://ftp.linuxppc.org/. Sources, which compile out of the box in
   Linuxppc 1999, are available from
   [52]ftp://ftp.phystech.com/pub/dhcpcd-1.3.17-pl9.tar.gz.
     _________________________________________________________________
   
3.8. Tying it all together

   After your machine reboots your network interface should be
   configured. Type: ifconfig.
   
   You should get something like this:
          lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:302 errors:0 dropped:0 overruns:0 frame:0
          TX packets:302 errors:0 dropped:0 overruns:0 carrier:0 coll:0

eth0      Link encap:Ethernet  HWaddr 00:20:AF:EE:05:45
          inet addr:24.128.53.102  Bcast:24.128.53.255  Mask:255.255.254.0
          ^^^^^^^^^^^^^^^^^^^^^^^
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24783 errors:1 dropped:1 overruns:0 frame:1
          TX packets:11598 errors:0 dropped:0 overruns:0 carrier:0 coll:96
          Interrupt:10 Base address:0x300

   If you have some normal number under inet addr you are set. If you see
   0.0.0.0 don't despair, it is a temporary setting before dhcpcd
   acquires the IP address. If even after few minutes you are seeing
   0.0.0.0 please check out [53]Troubleshooting. DHCPcd is a daemon and
   will stay running as long as you have your machine on. Every three
   hours it will contact the DHCP server and try to renew the IP address
   lease. It will log all the messages in the syslog (on Slackware
   /var/adm/syslog, RedHat/OpenLinux /var/log/syslog).
   
   One final thing. You need to specify your nameservers. There are two
   ways to do it, you can either ask your provider to provide you with
   the addresses of your name server and then put those in the
   /etc/resolv.conf or DHCPcd will obtain the list from the DHCP server
   and will build a resolv.conf in /etc/dhcpc.
   
   I decided to use DHCPcd's resolv.conf by doing the following:
   
   Back up your old /etc/resolv.conf: mv /etc/resolv.conf
   /etc/resolv.conf.OLD
   
   If directory /etc/dhcpc doesn't exist create it: mkdir /etc/dhcpc
   
   Make a link from /etc/dhcpc/resolv.conf to /etc/resolv.conf: ln -s
   /etc/dhcpc/resolv.conf /etc/resolv.conf
   
   If that doesn't work try this (fix suggested by
   <[54]nothing@cc.gatech.edu> with a little amendment by Henrik
   Stoerner):
   
   This last step I had to perform only because my dhcpcd doesn't create
   an /etc/dhcpc/resolv.conf. In /etc/sysconfig/network-scripts/ifup I
   made the following changes (which are a very poor hack, but they work
   for me):
elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
    echo -n "Using DHCP for ${DEVICE}... "
    /sbin/dhcpcd -c /etc/sysconfig/network-scripts/ifdhcpc-done ${DEVICE}
    echo "echo \$$ > /var/run/dhcp-wait-${DEVICE}.pid; exec sleep 30" | sh

    if [ -f /var/run/dhcp-wait-${DEVICE}.pid ]; then
        ^^^^
        echo "failed."
        exit 1

   I changed to:
elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
    echo -n "Using DHCP for ${DEVICE}... "
    /sbin/dhcpcd
    echo "echo \$$ > /var/run/dhcp-wait-${DEVICE}.pid; exec sleep 30" | sh

    if [ ! -f /var/run/dhcp-wait-${DEVICE}.pid ]; then
        ^^^^^^
       echo "failed."
       exit 1

     Note: Notice the ! (bang) in if [ ! -f
     /var/run/dhcp-wait-${DEVICE}.pid ];
     
   Now sit back and enjoy :-).
     _________________________________________________________________
   
3.9. Various notes

   Following step(s) are not necessary but might be useful to some
   people:
   
    a. If you need network connectivity only occasionally you can start
       dhcpcd from the command line (you have to be root to do this)
       with: /usr/sbin/dhcpcd.
       When you need to down (turn off) the network type /usr/sbin/dhcpcd
       -k.
     _________________________________________________________________
   
3.10. Troubleshooting

   If you have followed the steps outlined above and you are unable to
   access the network there are several possible explanations:
     _________________________________________________________________
   
3.10.1. Your network card is not configured properly

   During the boot up process your Linux will probe your network card and
   should say something along these lines:
eth0: 3c509 at 0x300 tag 1, 10baseT port, address  00 20 af ee 11 11, IRQ 10.
3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov

   If a message like this doesn't appear your ethernet card might not be
   recognized by your Linux system. If you have a generic ethernet card
   (a NE2000 clone) you should have received a disk with DOS utilities
   that you can use to set up the card. Try playing with IRQs until Linux
   recognizes your card (IRQ 9,10,12 are usually good).
     _________________________________________________________________
   
3.10.2. Your DHCP server supports RFC 1541/My DHCP server is Windows NT

   Try running dhcpcd by typing dhcpcd -r.
   
   Use ifconfig to check if your network interface is configured (wait
   few seconds for the configuration process, initally it will say
   Inet.addr=0.0.0.0)
   
   If this solves your problem add the "-r" flag to the boot up scripts,
   ie: instead of /sbin/dhcpcd you will have /sbin/dhcpcd -r.
   
   For example under RedHat edit script
   /etc/sysconfig/network-scripts/ifup and change the following:
        IFNAME=$[ {DEVICE} \
        "/sbin/dhcpcd -r -c /etc/"- etc etc.
     _________________________________________________________________
   
3.10.3. During bootup I get error message "Using DHCP for eth0 ... failed"
but my system works fine.

   You are most likely using RedHat and you haven't followed instructions
   carefully :-). You are missing the ! (bang) in one of the if
   statements. Jump [55]here and check how to fix it.
     _________________________________________________________________
   
3.10.4. My network works for few minutes and then stops responding

   There are some reports of gated (gateway daemon) screwing up routing
   on Linux boxes which results in problem described above. Check if
   gated is running with: ps -auxww | grep gate.
   
   If it is try removing it with RedHat's RPM manager or removing the
   entry in /etc/rc.d/.
     _________________________________________________________________
   
3.10.5. My ethernet card is recognized during boot up but I still get "NO
DHCPOFFER" message in my logs. I also happen to have a PCMCIA ethernet card.

   You need to make sure that you have the 10BaseT port ("phone" plug) on
   your network card activated. Best way to verify it is to check what
   kind of connector your card is configured for during bootup e.g.
eth0: 3c509 at 0x300 tag 1, 10baseT port, address  00 20 af ee 11 11, IRQ 10.
                            ^^^^^^^^^^^^
3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov

   I have received reports of laptop users having this kind of problems
   due to the PCMCIA utilities (specifically ifport) that would set the
   connector type to 10Base2 (thinnet). You have to make sure you use
   10BaseT for your connection. If you are not reconfigure the card and
   restart the computer.
     _________________________________________________________________
   
3.10.6. My DHCP client broadcasts requests but no one answers (Contributed
by Peter Amstutz)

   On some systems, you need to include some hostname for your machine as
   part of the request. With dhcpcd, do this with dhcpcd -h foohost
   Probably the hostname wanted will be your account username on the
   network.
     _________________________________________________________________
   
3.10.7. I have followed all the steps but still my machine is not able to
connect

   The cable modem will usually memorize the ethernet address of your
   network card so if you connect a new computer or switch network cards
   you will somehow have to "teach" your cable modem to recognize the new
   computer/card. Usually you can turn of the modem and bring it back up
   while computer is on or you will have to call tech support and tell
   them that you have changed a network card in the computer.
   
   You have firewall rules (ipfwadm rules) that disallow port 67/68
   traffic used by DHCP to distribute configuration info. Check your
   firewall rules carefully.
     _________________________________________________________________
   
3.10.8. I have MediaOne Express service and I still can't connect.

   It appears that MediaOne has been using adding some things to DHCP
   that shouldn't be there. Supposedly this is not a problem anymore but
   if you experience outages check for these things. If you are (un)lucky
   to have Windows NT on your machine if you go into Event Viewer you
   will see a warning like this:
DHCP received an unknown option 067 of length 005. The raw option data is
given  below.

0000: 62 61 73 69 63            basic

   If this is the problem go to [56]ftp://vanbuer.ddns.org/pub/ and
   either download a binary or get the source for the change.
     _________________________________________________________________
   
3.11. Alternative DHCP client (ISC dhclient)

   If you have not had success getting your Linux connection running with
   the dhcpcd you might want to try ISC dhclient. dhclient comes with the
   DHCP distribution from ISC which includes both a DHCP client and a
   DHCP server. Instructions on how to get and compile the DHCP
   distribution can be found [57]here. When you are done with it please
   return to this section to configure the client.
   
     Note: Following information has been provided by Ted Lemon
     <[58]mellon@isc.org> one of the authors of dhclient.
     
   With the current version of the DHCP client, you don't actually need a
   dhclient.conf. All you have to do is invoke dhclient e.g.:
   /sbin/dhclient.
   
   This will configure all broadcast interfaces. If this doesn't work or
   you want to specify only one interface create a /etc/dhclient.conf
   file with this example configuration.
interface "eth0" {
  send dhcp-client-identifier 1:xx:xx:xx:xx:xx:xx;
  send dhcp-lease-time 86400;
}

   Here we assume that the ethernet interface is eth0. If not change
   accordingly. Also replace xx:xx:xx:xx:xx with your ethernet address.
   This dhclient.conf makes the client look more like a Win95 client.
     _________________________________________________________________
   
4. DHCP Server Setup

4.1. DHCP server for UNIX

   There are several DHCP servers available for U*X-like OSes, both
   commercial and free. One of the more popular free DHCP servers is Paul
   Vixie/ISC DHCPd. Currently the latest version is 2.0 (suggested for
   most users) but 3.0 is in beta testing. You can get them from
   
   [59]ftp://ftp.isc.org/isc/dhcp/
   
   Some of the distributions provide binary packages for dhcpd so skip
   the following section if you got it installed that way.
   
   After you download unpack it. After you do cd into the distribution
   directory and type: ./configure
   
   It will take some time to configure the settings. After it is done
   type: make and make install.
     _________________________________________________________________
   
4.2. DHCP server configuration

   When done with installation type ifconfig -a. You should see something
   like this:
eth0      Link encap:10Mbps Ethernet  HWaddr 00:C0:4F:D3:C4:62
          inet addr:183.217.19.43  Bcast:183.217.19.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2875542 errors:0 dropped:0 overruns:0
          TX packets:218647 errors:0 dropped:0 overruns:0
          Interrupt:11 Base address:0x210

   If it doesn't say MULTICAST you should reconfigure your kernel and add
   multicast support. On most systems you will not need to do this.
   
   Next step is to add route for 255.255.255.255. Quoted from DHCPd
   README:
   
     "In order for dhcpd to work correctly with picky DHCP clients
     (e.g., Windows 95), it must be able to send packets with an IP
     destination address of 255.255.255.255. Unfortunately, Linux
     insists on changing 255.255.255.255 into the local subnet broadcast
     address (here, that's 192.5.5.223). This results in a DHCP protocol
     violation, and while many DHCP clients don't notice the problem,
     some (e.g., all Microsoft DHCP clients) do. Clients that have this
     problem will appear not to see DHCPOFFER messages from the server."
     
   Type: route add -host 255.255.255.255 dev eth0
   
   If you get a message "255.255.255.255: Unknown host", you should try
   adding the following entry to your /etc/hosts file:
255.255.255.255 all-ones

   Then, try:
route add -host all-ones dev eth0

   or
route add 255.255.255.0 dev eth0

   eth0 is of course the name of the network device you are using. If it
   differs change appropriately.
     _________________________________________________________________
   
4.3. Options for DHCPd

   Now you need to configure DHCPd. In order to do this you will have to
   create or edit /etc/dhcpd.conf. There is a graphical interface for
   dhcpd configuration under KDE ( [60]http://www.kde.org/ ) called
   kcmdhcpd that is very similar to the DHCP configurator on Windows NT.
   When KDE 2.0 comes out it should come with kcmdhcpd or you could get
   it directly from:
   
   [61]ftp://ftp.us.kde.org/pub/kde/unstable/apps/network/
   
   If you want to configure it by hand follow instructions below.
   
   Most commonly what you want to do is assign IP addresses randomly.
   This can be done with settings as follows:
# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.org";

subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.10 192.168.1.100;
   range 192.168.1.150 192.168.1.200;
}

   This will result in DHCP server giving a client an IP address from the
   range 192.168.1.10-192.168.1.100 or 192.168.1.150-192.168.1.200. It
   will lease an IP address for 600 seconds if the client doesn't ask for
   specific time frame. Otherwise the maximum (allowed) lease will be
   7200 seconds. The server will also "advise" the client that it should
   use 255.255.255.0 as its subnet mask, 192.168.1.255 as its broadcast
   address, 192.168.1.254 as the router/gateway and 192.168.1.1 and
   192.168.1.2 as its DNS servers.
   
   If you need to specify a WINS server for your Windows clients you will
   need to include the netbios-name-servers option e.g.
option netbios-name-servers 192.168.1.1;

   You can also assign specific IP addresses based on clients ethernet
   address e.g.
host haagen {
   hardware ethernet 08:00:2b:4c:59:23;
   fixed-address 192.168.1.222;
}

   This will assign IP address 192.168.1.222 to a client with ethernet
   address 08:00:2b:4c:59:23.
   
   You can also mix and match e.g. you can have certain clients getting
   "static" IP addresses (e.g. servers) and others being alloted dynamic
   IPs (e.g. mobile users with laptops). There are a number of other
   options e.g. nis server addresses, time server addresses etc., if you
   need any of those options please read the dhcpd.conf man page.
     _________________________________________________________________
   
4.4. Starting the server

   There is only one thing to do before starting the server. In most
   cases DHCP installation doesn't create a dhcpd.leases files. This file
   is used by DHCPd to store information about current leases. It is in
   the plain text form so you can view it during the operation of DHCPd.
   To create dhcpd.leases type:
touch /var/state/dhcp/dhcpd.leases

   This will create an empty file (file size = 0). Some of the older
   version of dhcpd 2.0 placed the file in /etc/dhcpd.leases. You do not
   need to make any changes to the leases file it will be manipulated by
   the dhcpd. If you get a message saying that file exists simply ignore
   it and go to the next step.
   
   You can now invoke the DHCP server. Simply type (or include in the
   bootup scripts)
/usr/sbin/dhcpd

   This will invoke dhcpd on eth0 device. If you want to invoke it on
   another device simply supply it on the command line e.g.
/usr/sbin/dhcpd eth1

   To verify that everything is working fine you should first turn on the
   debugging mode and put the server in foreground. You can do this by
   typing
/usr/sbin/dhcpd -d -f

   Then boot up one of your clients and check out the console of your
   server. You will see a number of debugging messages come up. If
   everything works out fine you are done :-). Quit dhcpd and start it
   without the -d -f and arguments. If you want dhcpd to start at boot-up
   include dhcpd in e.g.
/etc/rc.d/rc.local
     _________________________________________________________________
   
4.5. Other interesting documents

   Linux Magazine has a pretty good article in their April issue called
   [62]Network Nirvana: How to make Network Configuration as easy as DHCP
   that discusses the set up for DHCP.

References

   1. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN17
   2. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN19
   3. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN24
   4. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN41
   5. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN45
   6. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN64
   7. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN69
   8. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN74
   9. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN77
  10. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#SLACKWARE
  11. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#REDHAT6
  12. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN162
  13. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN179
  14. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#DEBIAN
  15. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN226
  16. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#NAMESERVER
  17. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN289
  18. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#TROUBLESHOOTING
  19. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN351
  20. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN365
  21. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#DHCPSERVER
  22. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN378
  23. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN399
  24. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN418
  25. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#AEN436
  26. http://www.oswg.org/oswg-nightly/DHCP.html
  27. http://www.linux.org.tw/CLDP/mini/DHCP.html
  28. http://www.linux.or.jp/JF/JFdocs/DHCP.html
  29. ftp://cuates.pue.upaep.mx/pub/linux/LuCAS/DHCP-mini-Como/
  30. mailto:vuksan-feedback@veus.hr
  31. http://www.opencontent.org/opl.shtml
  32. http://web.syr.edu/~jmwobus/comfaqs/dhcp.faq.html
  33. mailto:sergei@phystech.com
  34. ftp://ftp.phystech.com/pub/
  35. http://www.cps.msu.edu/~dunham/out/
  36. ftp://metalab.unc.edu/pub/Linux/system/network/daemons
  37. ftp://ftp.phystech.com/pub/
  38. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#NAMESERVER
  39. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#LINUXPPC-RH6
  40. mailto:alexander.stevenson@home.com
  41. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#NAMESERVER
  42. ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/dhcpcd-0.6-2.i386.rpm
  43. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#SLACKWARE
  44. mailto:nothing@cc.gatech.edu
  45. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#NAMESERVER
  46. http://ftp.debian.org/debian/dists/slink/main/binary-i386/net/
  47. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#SLACKWARE
  48. mailto:heiko@os.inf.tu-dresden.de
  49. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#NAMESERVER
  50. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#REDHAT6
  51. ftp://ftp.linuxppc.org/
  52. ftp://ftp.phystech.com/pub/dhcpcd-1.3.17-pl9.tar.gz
  53. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#TROUBLESHOOTING
  54. mailto:nothing@cc.gatech.edu
  55. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#ERROR3
  56. ftp://vanbuer.ddns.org/pub/
  57. file://localhost/export/sunsite/users/gferg/howto/00_DHCP.html#DHCPSERVER
  58. mailto:mellon@isc.org
  59. ftp://ftp.isc.org/isc/dhcp/
  60. http://www.kde.org/
  61. ftp://ftp.us.kde.org/pub/kde/unstable/apps/network/
  62. http://www.linux-mag.com/2000-04/networknirvana_01.html
  Linux DPT Hardware RAID HOWTO
  Ram Samudrala (me@ram.org)
  v1.4, 9 April 1999

  How to set up hardware RAID under Linux.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Supported controllers

     2.1 DPT controllers
     2.2 ICP vortex controllers

  3. What hardware should be used?

     3.1 Controller type
     3.2 Enclosure type

  4. Installation

     4.1 Installing and configuring the hardware
     4.2 Configuring the kernel
     4.3 Bootup messages

  5. Usage

     5.1 fdisk, mke2fs, mount, etc.
     5.2 Hotswapping
     5.3 Performance

  6. Features in the EATA DMA driver

  7. Troubleshooting

     7.1 Upon bootup, no SCSI hosts are detected
     7.2 RAID configuration shows up as N different disks
     7.3 Machine/controller is shut down in the middle of a format
     7.4 If all fails...

  8. References

  9. Acknowledgements

  ______________________________________________________________________

  1.  Introduction

  This document describes how to set up SCSI hardware RAID, focusing
  mainly on host-based adapters from DPT, though the principles applied
  here are fairly general.

  Use the information below at your own risk.  I disclaim all
  responsibility for anything you may do after reading this HOWTO. The
  latest version of this HOWTO will always be available at
  http://www.ram.org/computing/linux/dpt_raid.html.

  For the purposes of this HOWTO, I am assuming you have only a Linux
  system running. Also, note that I've only tried this out with the DPT
  Smartcache IV PM2144UW and PM3334UW controllers, with DPT (SmartRAID
  tower) and Wetex enclosures, and I have no experience with other
  setups. So things may be different for your setup.

  2.  Supported controllers

  Currently the only well-supported host-based hardware RAID controller
  (i.e, a controller for which there exists a driver under Linux) is one
  that is made by DPT <http://www.dpt.com>. However, there exist other
  host-based and scsi-to-scsi controllers which may work under Linux.
  These include the ones made by Syred <http://www.syred.com>, ICP-
  Vortex <http://www.icp-vortex.com>, and BusLogic
  <http://www.mylex.com>.  In addition, there exist plenty of SCSI-to-
  SCSI controllers. See the RAID solutions for Linux page
  <http://linas.org/linux/raid.html> for more info.

  If, in the future, there is support for other controllers, I will do
  my best to incorporate that information into this HOWTO. Please send
  me any such information you think is appropriate for this HOWTO.

  2.1.  DPT controllers

  This document is currently DPT-oriented.  Essentially all the
  SmartRAID IV controllers are supported.

  2.2.  ICP vortex controllers

  ICP vortex has a complete line of disk array controllers which support
  Linux.  The ICP driver is in the Linux kernel since version 2.0.31 All
  major Linux Distributors S.u.S.e., LST Power Linux, Caldera and Red
  Hat support the ICP controllers as boot/installation controllers. The
  RAID system can easily be configured with our ROMSETUP (you do not
  have to boot MS-DOS for configuration!).

  With the monitoring utility GDTMON it is possible to manage the
  complete ICP RAID system during operation (check transferrates, set
  parameters for the controller and hard disks, exchange defective hard
  disks, etc.).  Currently available are: 1 and 2 channel wide and ultra
  SCSI controller for RAID 0 and RAID 1 1, 2, 3 and 5 chn. wide and
  ultra SCSI controller for RAID 0, 1, 4, 5 and 10 1 and 2 channel wide
  and ultra2 LVDS SCSI controller for RAID 0 and RAID 1 1, 2, 3 and 5
  chn. wide and ultra2 LVDS SCSI controller for RAID 0, 1, 4, 5 and 10 1
  and 2 port Fibre Channel contollers for RAID 0, 1, 4, 5 and 10 Pretty
  soon there will be also 64-bit controllers available.

  3.  What hardware should be used?

  3.1.  Controller type

  Given all these options, if you're looking for a RAID solution, you
  need to think carefully about what you want.  Depending on what you
  want to do, and which RAID level you wish to use, some cards may be
  better than others.  SCSI-to-SCSI adapters may not be as good as host-
  based adapters, for example (see the DPT comparison between host-based
  and SCSI-to-SCSI adapters <http://www.dpt.com/hstvscsi.htm> for why
  this is the case).  Michael Neuffer (neuffer@kralle.zdv.uni-mainz.de),
  the author of the EATA-DMA driver, has a nice discussion about this on
  his Linux High Performance SCSI and RAID page <http://www.uni-
  mainz.de/~neuffer/scsi/>.

  3.2.  Enclosure type

  The enclosure type affects the hot swapability of the drive, the
  warning systems (i.e., whether there will be indication of failure,
  and whether you will know which drive has failed), and what kind of
  treatment your drive receives (for example, redundant cooling and
  power supplies).  We used the DPT supplied enclosures for an initial
  RAID-5 system of 18 GB, but they are expensive.  We are now using a
  Wetex enclosure (http://www.wetex.com/), which have the same features
  as the DPT ones, but are about 1/4 of the cost.  The Wetex enclosure
  system (14 bays) we use is composed of two RAID-5 arrays, with sizes
  of 45 GB and 63 GB.

  4.  Installation

  4.1.  Installing and configuring the hardware

  Refer to the instruction manual to install the card and the drives.
  For DPT, since a storage manager for Linux doesn't exist yet, you need
  to create a MS-DOS-formatted disk with the system on it (usually
  created using the command "format /s" at the MS-DOS prompt).  You will
  also be using the DPT storage manager for MS-DOS, which you should
  probably make a copy of for safety.

  Once the hardware is in place, boot using the DOS system disk. Replace
  the DOS disk with the storage manager. And invoke the storage manager
  using the command:

       a:\ dptmgr

  Wait a minute or so, and you'll get a nice menu of options.  Configure
  the set of disks as a hardware RAID (single logical array). Choose
  "other" as the operating system.

  The MS-DOS storage manager is a lot easier to use with a mouse, and so
  you might want to have a mouse driver on the initial system disk you
  create.

  Technically, it should be possible to run the SCO storage manager
  under Linux, but it may be more trouble than its worth.  It's probably
  more easier to run the MS-DOS storage manager under Linux.

  4.2.  Configuring the kernel

  You will need to configure the kernel with SCSI support and the
  appropriate low level driver.  See the Kernel HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html> for information
  on how to compile the kernel. Once you choose "yes" for SCSI support,
  in the low level drivers section, select the driver of your choice
  (EATA DMA or EATA ISA/EISA/PCI for most EATA DMA compliant (DPT)
  cards, EATA PIO for the very old PM2001 and PM2012A from DPT).  Most
  drivers, including the EATA DMA and EATA ISA/EISA/PCI drivers, should
  be available in recent kernel versions.

  Once you have the kernel compiled, reboot, and if you've set up
  everything correctly, you should see the driver recognising the RAID
  as a single SCSI disk. If you use RAID-5, you will see the size of
  this disk to be 2/3 of the actual disk space available.

  4.3.  Bootup messages

  The messages you see upon bootup if you're using the EATA DMA driver
  should look something like this:

  EATA (Extended Attachment) driver version: 2.59b
  developed in co-operation with DPT
  (c) 1993-96 Michael Neuffer, mike@i-Connect.Net
  Registered HBAs:
  HBA no. Boardtype    Revis  EATA Bus  BaseIO IRQ DMA Ch ID Pr QS  S/G IS
  scsi0 : PM2144UW     v07L.Y 2.0c PCI  0xef90  11 BMST 1  7  N  64 252 Y
  scsi0 : EATA (Extended Attachment) HBA driver
  scsi : 1 host.
    Vendor: DPT       Model: RAID-5            Rev: 07LY
    Type:   Direct-Access                      ANSI SCSI revision: 02
  Detected scsi disk sda at scsi0, channel 0, id 8, lun 0
  scsi0: queue depth for target 8 on channel 0 set to 64
  scsi : detected 1 SCSI disk total.
  SCSI device sda: hdwr sector= 512 bytes. Sectors= 35591040 [17378 MB] [17.4 GB]

  (The above display is for a setup with a single DPT SCSI controller,
  configured as RAID-5, with three disks of 9 GB each.)

  The messages you see upon bootup if you're using the EATA ISA/EISA/PCI
  driver should look something like this:

       aic7xxx: <Adaptec AHA-294X SCSI host adapter> at PCI 15
       aic7xxx: BIOS enabled, IO Port 0x7000, IO Mem 0x3100000, IRQ 15, Revision B
       aic7xxx: Single Channel, SCSI ID 7, 16/16 SCBs, QFull 16, QMask 0x1f
       EATA0: address 0x7010 in use, skipping probe.
       EATA0: 2.0C, PCI 0x7410, IRQ 11, BMST, SG 252, MB 64, tc:y, lc:y, mq:62.
       EATA0: wide SCSI support enabled, max_id 16, max_lun 8.
       EATA0: SCSI channel 0 enabled, host target ID 6.
       EATA/DMA 2.0x: Copyright (C) 1994-1997 Dario Ballabio.
       scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 4.1.1/3.2.1
       scsi1 : EATA/DMA 2.0x rev. 3.11.00
       scsi : 2 hosts.
       scsi0: Scanning channel A for devices.
         Vendor: IBM OEM   Model: DFHSS2F           Rev: 1818
         Type:   Direct-Access                      ANSI SCSI revision: 02
       Detected scsi disk sda at scsi0, channel 0, id 0, lun 0
         Vendor: SEAGATE   Model: ST41650       TX  Rev: DG01
         Type:   Direct-Access                      ANSI SCSI revision: 02
       Detected scsi disk sdb at scsi1, channel 0, id 0, lun 0
         Vendor: TEAC      Model: FC-1     GF   00  Rev: RV L
         Type:   Direct-Access                      ANSI SCSI revision: 01 CCS
       Detected scsi removable disk sdc at scsi1, channel 0, id 3, lun 0
         Vendor: SONY      Model: CD-ROM CDU-541    Rev: 2.6a
         Type:   CD-ROM                             ANSI SCSI revision: 02
       Detected scsi CD-ROM sr0 at scsi1, channel 0, id 5, lun 0
       EATA0: scsi1, channel 0, id 0, lun 0, cmds/lun 21, sorted, tagged.
       EATA0: scsi1, channel 0, id 3, lun 0, cmds/lun 21, sorted.
       EATA0: scsi1, channel 0, id 5, lun 0, cmds/lun 21, sorted.
       scsi : detected 1 SCSI cdrom 3 SCSI disks total.
       SCSI device sda: hdwr sector= 512 bytes. Sectors= 4404489 [2150 MB] [2.2 GB]
       SCSI device sdb: hdwr sector= 512 bytes. Sectors= 2779518 [1357 MB] [1.4 GB]
       SCSI device sdc: hdwr sector= 256 bytes. Sectors= 4160 [1 MB] [0.0 GB]

  (The above display is for a setup wih two SCSI controllers, DPT
  PM3224W and and Adaptec AHA2940.)

  5.  Usage

  5.1.  fdisk, mke2fs, mount, etc.

  You can now start treating the RAID as a regular disk. The first thing
  you'll need to do is partition the disk (using fdisk).  You'll then
  need to set up an ext2 filesystem.  This can be done by running the
  command:

       % mkfs -t ext2 /dev/sdxN

  where /dev/sdxN is the name of the SCSI partition.  Once you do this,
  you'll be able to mount the partitions and use them as you would any
  other disk (including adding entries in /etc/fstab).

  5.2.  Hotswapping

  We first tried to test hotswapping by removing a drive and putting it
  back in the DPT-supplied enclosure/tower (which you buy for an
  additional cost).  Before we could carry this out to completion, one
  of the disks failed (as I write this, the beeping is driving me
  crazy). Even though one of the disks failed, all the data on the RAID
  drive is accessible.

  Instead of replacing the drive, we just went through the motions and
  put the same drive back in.  The drive rebuilt itself and everything
  seems to be okay.  During the time the disk had filed, and during the
  rebuilding process, all the data was accessible. Though it should be
  noted that if another disk had failed, we'd have been in serious
  trouble.

  5.3.  Performance

  Here's the output of the Bonnie program, on a 2144 UW with 9x3=17 GB
  RAID 5 setup, using the EATA DMA driver. The RAID is on a dual
  processor Pentium Pro machine running Linux 2.0.33. For comparison,
  the Bonnie results for the IDE drive on that machine are also given.

                  -------Sequential Output-------- ---Sequential Input--  --Random--
                  -Per Char- --Block--- -Rewrite-- -Per Char- --Block---  --Seeks---
               MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU   /sec  %CPU
       RAID   100  9210 96.8  1613  5.9   717  5.8  3797 36.1 90931 96.8 4648.2 159.2
       IDE    100  3277 32.0  6325 23.5  2627 18.3  4818 44.8 59697 88.0  575.9  16.3

  Some people have disputed the above timings (and rightly so---I've
  been unable to try it out on our machines since they're completely
  loaded) because the size of the file used may have led to it being
  cached (resulting in an unusually good performance report).  Here are
  some timings with a 3344 UW controller:

          -------Sequential Output-------- ---Sequential Input-- --Random--
          -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
       MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  /sec %CPU
     1000  1714 17.2  1689  6.0  1200  5.7  5263 40.2  7023 12.1  51.3 2.2

  And here are some timings on a host-based RAID system:

            -------Sequential Output-------- ---Sequential Input-- --Random--
            -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
       MB   K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
       64   7465 100.0 70287 98.7 37012 97.7 8074 99.2 *****100.3 ***** 196.6
       128  7289 99.3  67595 98.5 35294 98.6 7792 97.6 *****100.3 ***** 195.8
       256  7222 98.8  44844 69.6 16096 51.8 5787 72.7 ***** 99.8 ***** 85.2
       512  7138 98.4  13871 23.2 7888  29.3 7183 89.3 16488 27.2 1585. 11.5
       1024 6908 95.8  12270 21.5 7161  25.4 7373 90.4 16527 28.2 123.8 1.8
       2047 6081 84.1  12664 22.6 7191  25.6 7289 89.5 16573 28.5 75.0  1.2

       ***** results exceed column width (> 100 MB/sec, > 10000 seeks/sec)

       host:   Dual PII 400 MHz, 2 x U2W, 512 MB RAM, no internal disks
       RAID:   IFT 3102 UA 128 MB Cache, RAID-5, 6 x 9 GB
       OS:     SuSE Linux 6.0 with Kernel 2.2.3

  6.  Features in the EATA DMA driver

  This section describes some of the commands available under Linux to
  check on the RAID configuration.  Again, while references to the
  eata_dma driver is made, this can be used to check up on any driver.

  To see the configuration for your driver, type:

       % cat /proc/scsi/eata_dma/N

  where N is the host id for the controller.  You should see something
  like this:

  EATA (Extended Attachment) driver version: 2.59b
  queued commands:         353969
  processed interrupts:    353969

  scsi0 : HBA PM2144UW
  Firmware revision: v07L.Y
  Hardware Configuration:
  IRQ: 11, level triggered
  DMA: BUSMASTER
  CPU: MC68020 20MHz
  Base IO : 0xef90
  Host Bus: PCI
  SCSI Bus: WIDE Speed: 10MB/sec.
  SCSI channel expansion Module: not present
  SmartRAID hardware: present.
      Type: integrated
      Max array groups:              7
      Max drives per RAID 0 array:   7
      Max drives per RAID 3/5 array: 7
  Cache Module: present.

           Type: 0
           Bank0: 16MB without ECC
           Bank1: 0MB without ECC
           Bank2: 0MB without ECC
           Bank3: 0MB without ECC
       Timer Mod.: present
       NVRAM     : present
       SmartROM  : enabled
       Alarm     : on
       Host<->Disk command statistics:
                Reads:      Writes:
           1k:           0            0
           2k:           0            0
           4k:           0            0
           8k:           0            0
          16k:           0            0
          32k:           0            0
          64k:           0            0
         128k:           0            0
         256k:           0            0
         512k:           0            0
        1024k:           0            0
       >1024k:           0            0
       Sum   :           0            0

  To get advanced command statistics, type:

       % echo "eata_dma latency" > /proc/scsi/eata_dma/N

  Then you can do a:


       % cat /proc/scsi/eata_dma/N

  to get more detailed statistics.

  To turn off advanced command statistics, type:

       % echo "eata_dma nolatency" > /proc/scsi/eata_dma/N

  7.  Troubleshooting

  7.1.  Upon bootup, no SCSI hosts are detected

  This could be due to several reasons, but it's probably because the
  appropriate driver is not configured in the kernel. Check and make
  sure the appropriate driver (EATA-DMA or EATA ISA/EISA/PCI for most
  DPT cards) is configured.

  7.2.  RAID configuration shows up as N different disks

  The RAID has not been configured properly.  If you're using a DPT
  storage manager, you need to configure the RAID disks as a single
  logical array.  Michael Neuffer (neuffer@kralle.zdv.uni-mainz.de)
  writes: "When you configure the controller with the SM start it with
  the parameter /FW0 and/or select Solaris as OS. This will cause the
  array to be setup to be managed internally by the controller."

  7.3.  Machine/controller is shut down in the middle of a format

  As stated in the DPT manual, this is clearly a no-no and might require
  the disks to be returned to the manufactured, since the DPT Storage
  Manager might not be able format it. However, you might be able to
  perform a low level format on it, using a program supplied by DPT,
  called clfmt in their utilities page
  (http://www.dpt.com/techsup/sr4utils.htm). Read the instructions after
  unzipping the clfmt.zip file on how to use it (and use it wisely).
  Once you do the low level format, you might be able to treat the disks
  like new. Use this program carefully!

  7.4.  If all fails...

  Read the SCSI-HOWTO again.  Check the cabling and the termination.
  Try a different machine if you have access to one.  The most common
  cause of problems with SCSI devices and drivers is because of faulty
  or misconfigured hardware.  Finally, you can post to the various
  newsgroups or e-mail me, and I'll do my best to get back to you.

  8.  References

  The following documents may prove useful to you as you set up RAID:


    DPT Technology Library <http://www.dpt.com/library.htm>

    EATA-DMA homepage <http://www.uni-
     mainz.de/~neuffer/scsi/dpt/index.html>

    Linux Disk HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Disk-HOWTO.html>

    Linux Kernel HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Kernel-
     HOWTO.html>

    Linux SCSI HOWTO <http://sunsite.unc.edu/mdw/HOWTO/SCSI-HOWTO.html>

    Multi Disk System Tuning HOWTO
     <http://www.nyx.net/~sgjoen/disk.html>

    RAID Solutions for Linux <http://linas.org/linux/raid.html>

  9.  Acknowledgements

  The following people have been helpful in getting this HOWTO done:


    Andreas Koepf (A_Koepf@icp-vortex.com)

    Boris Fain (fain@zen.stanford.edu)

    Dario Ballabio (Dario_Ballabio@milano.europe.dg.com)

    Heiko Rommel (Heiko.Rommel@Uni-Bielefeld.DE)

    Jos Vos (jos@xos.nl)

    Michael Neuffer (neuffer@kralle.zdv.uni-mainz.de)

    Ralph Wallace (rwallace@rwallace.interaccess.com)

    Russell Brown (russell@lutton.lls.com)

    Syunsuke Ogata (Syunsuke_Ogata@appear.ne.jp)

    Tom Brown (tbrown@baremetal.com)

  Divert Sockets mini-HOWTO
  Ilia Baldine, ibaldin@anr.mcnc.org
  v1.1, 27 February 2000

  This document describes how to get, compile and use FreeBSD divert
  sockets under Linux 2.2.12.
  ______________________________________________________________________

  Table of Contents


  1. Copyright

  2. Disclaimer

  3. Foreword

  4. Introduction

  5. Getting and Compiling the Source Code

     5.1 Getting *The Source*
     5.2 Compiling
        5.2.1 AID CDATA comp-time

  6. Using Divert Sockets

     6.1 Divert sockets vs. other stuff
        6.1.1 Netlink sockets
        6.1.2 Raw sockets
        6.1.3 libpcap
     6.2 Discussion on firewall chains
     6.3 Using ipchains
     6.4 Plain vanilla example
        6.4.1 Example program
     6.5 The sky's the limit

  7. Advanced issues

     7.1 Packet Mangling
     7.2 Injection with no interception
     7.3 Fragmentation

  8. Geting More Information

     8.1 The website
     8.2 The mailing list

  9. Future work



  ______________________________________________________________________

  1.  Copyright

  Copyright 1999(c) by Ilia Baldine. This document may be distributed
  only subject to the terms and conditions set forth in the LDP License
  at, except that this document must not be distributed in modified form
  without the author's consent.


  2.  Disclaimer



  This work has been done as part of a DARPA-funded network security
  project. Neither I (Ilia Baldine), nor my employer (MCNC) nor DARPA
  can be held accountable for any damage real or potential that can come
  to you through the use by you or other parties of the code and/or
  procedures described in this document. As many other network
  mechanisms, divert sockets can be used as much for evil as for good
  and its your choice!


  3.  Foreword



       Here's an easy game to play,
       Here's an easy thing to say:

       If a packet hits a pocket
        on a socket on a port
       And the bus is interrupted
         as a very last resort,
       And the address of the memory
         makes your floppy disk abort,
       Then the socket packet pocket
         has an error to report!!

       If your cursor finds a menu item
         followed by a dash,
       And the double clicking icon puts  your
         window in the trash,
       And your data is corrupted 'cause the
         index doesn't hash,
       Then the situation's hopeless, and your
         system's gonna crash!

       YOU CAN'T SAY THIS? WHAT A SHAME SIR!
       WE'LL FIND ANOTHER GAME SIR

       If the label on the cable on the table
         at your house,
       Says the network is connected to
         the button on your mouse,
       But your packets want to tunnel
         on another protocol,
       That's repeatedly rejected
         by the printer down the hall,
       And your screen is all distorted
         by the side effects of gauss
       So your icons in the window are
         as wavy as a souse,
       Then you  may as well reboot and
         go out with a bang,
         the sucker's gonna hang!
       When the copy of your floppy's
         getting sloppy on the disk
       And the microcode instructions cause
        unnecessary risc,
       Then you have to flash your memory and
         you'll want to RAM your  ROM
       Quickly turn off your computer and
         be sure  to tell your mom!

       -- Anonymous



  4.  Introduction

  Ever wish you could intercept packets traveling up or down the IP
  stack of your host? And I'm not talking about listening in, like raw
  sockets or libpcap (tcpdump). I mean literally stop the packet from
  further propagating through the IP stack and then (possibly after some
  changes), reinjecting it back?  Well, the time to dream is over,
  because divert sockets for Linux are here!


  Divert sockets do exactly that - they filter out certain packets based
  on firewall specifications and bring them to you in user space.  You
  then have the freedom of simply reinjecting them back as if nothing
  happened, mangling them first and then reinjecting them, or not
  reinjecting them at all.


  As the name suggests, this mechanism utilizes a special type of RAW
  socket called divert (IPPROTO_DIVERT) that allow you to receive and
  send on them just like regular sockets.  The difference is that a
  divert socket is bound to a port, into which the firewall can be
  instructed to send certain packets.  Anything that a firewall can
  filter out can be sent into a divert socket.


  Divert sockets first appeared as part of FreeBSD. Divert sockets under
  Linux is a port of this mechanism that strives to be source-code
  compatible in terms of user-space programs that utilize it.


  5.  Getting and Compiling the Source Code

  In order to use divert sockets under Linux you will need two things -
  the kernel source code that has been patched for divert sockets and
  the source code to ipchains-1.3.9 that, also, has been patched to use
  divert sockets.


  5.1.  Getting *The Source*

  Both pieces of source code can be retrieved from the divert socket
  web-site http://www.anr.mcnc.org/~divert
  <http://www.anr.mcnc.org/~divert> You can get the source code for
  divert sockets kernel in two forms - as a patch to linux-2.2.12 that
  you have to apply to a fresh 2.2.12 source, or as an already patched
  kernel tarball (much larger than the patch). ipchains source is
  provided as complete source tarball only.


  5.2.  Compiling

  Compiling ipchains is straightforward - simply say


       make



  in the ipchains-1.3.9 subdirectory.


  When compiling the divert-socket kernel - use your favorite way of
  configuring it:


  make config



  make menuconfig



  make xconfig



  Don't forget to enable "Prompt for development and/or incomplete
  code/drivers" before proceeding. There are only three compile-time
  options that affect the behavior of divert sockets and they are
  explained in the following ``section''


  5.2.1.  Kernel compile-time options

  In order to enable divert sockets in your kernel you must enable
  firewalling and IP firewalling first. The three kernel compile-time
  options that affect the behavior of divert sockets are:

     IP: divert sockets
        Enables the divert sockets in your kernel.

     IP: divert pass-through
        Changes the behavior of DIVERT rules: by default if a DIVERT
        rule is present in a firewall and no application is listening on
        the port that the rule specifies, any packet that satisfies the
        rule is silently dropped, as if it were a DENY rule.

        Enabling the pass-through mode results in such packets
        continuing their way through the IP stack as if nothing
        happened. This could be helpful if you want to have a static
        rule in the firewall, but don't always want to listen on it.

     IP: always defragment
        Changes the way that the sockets deal with fragmentation. By
        default the divert socket receives individual fragments of
        packets that are larger than MTU, which it then forwards to user
        space.  The burden of defragmentation in this case lies with the
        application listening on the divert socket. Also, an application
        cannot inject any fragments that are larger than MTU, because
        they will be dropped (this is the limitation of the kernel, not
        the divert sockets - Linux kernels up to 2.2.x do NOT fragment
        raw packets with IP_HDRINCL option set). Typically, thats OK,
        since if you simply reinject the fragments the way you received
        them, everything will work fine, since none of them are going to
        be larger than MTU.

        If you enable the always defragment option, then all the
        defragmentation will be done for you in the kernel. This
        severely affects the performance of the interception mechanism,
        since now every large packet you want intercepted will first
        have to be reassembled prior to being forwarded to you, and
        then, if you choose to reinject it - it will have to be
        fragmented again (the kernel with this option will be enabled to
        fragment raw packets with IP_HDRINCL)


        This was the only option available for divert sockets under
        Linux 2.0.36 because of the way the firewall code was structured
        - it only looked at the first fragment of every packet and
        passed all other fragments without looking at them. This way, if
        the first fragment were dropped by the firewall, the rest of
        them would be eventually discarded by the defragmenter. That's
        why in order for DIVERT sockets to work you were forced to
        compile the always defragment option in, so that you would
        always get the whole packet diverted to you and not just the
        first fragment.


        In 2.2.12, thanks to changes in the firewall code you now have
        an option of having the kernel or yourself doing
        fragmentation/defragmentation.


        NOTE: the defragmentation feature has not been added as of
        release 1.0.4 of divert sockets. It is in the works though.


  6.  Using Divert Sockets

  This section will give you examples of how divert sockets can be used
  and how they are different of other packet interception mechanisms out
  there.


  6.1.  Divert sockets vs. other stuff

  There are other mechanisms out there that have similar functionality.
  Here is why they are different:


  6.1.1.  Netlink sockets

  Netlink sockets can intercept packets just like divert sockets by
  using firewall filter. They have a special type (AF_NETLINK) and on
  the surface seem to do the same thing. Two major differences are:

  o  Netlink sockets have no ports, so it is difficult to have multiple
     processes intercepting different things (divert sockets have a
     standard 16-bit port space, which means you can have 65535
     processes diverting packets independently)

  o  Netlink sockets have no easy way of injecting the packets that are
     outbound (going on the wire) because no special precautions are
     taken not to reintercept the same packet over and over again as it
     is injected. Divert sockets do this automatically

     To be fair, the scope of netlink sockets is wider than this. In
     general, netlink mechanism is intended to allow communication
     between kernel and user space. There are, for instance, netlink
     routing sockets that allow you to communicate with the routing
     subsystem. However, as a packet interception mechanism, they are
     not as robust as divert sockets.


  6.1.2.  Raw sockets

  RAW sockets can be a good way to listen in on traffic (especially
  under Linux, where RAW sockets can listen in on TCP and UDP traffic,
  although most other UNI*s do not allow that) but a RAW socket can't
  stop a packet from propagating through the IP stack - it simply gives
  you a copy of the packet and there is no way to inject it inbound (on
  the way up the stack) - only outbound. Also, you can only filter
  pockets out by the protocol number, which you specify when you open a
  RAW socket. There is no link between the firewall and RAW sockets.

  6.1.3.  libpcap

  More commonly known for the tool it facilitates - tcpdump, libpcap
  lets you listen in on traffic that hits your interface (whether it be
  ppp or eth or whatever). For ethernet it can also put your NIC into a
  promiscuous mode, so that it will forward to IP the traffic that not
  only is link-layer addressed to it, but to others on the same segment.
  Of course, libpcap allows for no way of actually stopping packets from
  propagating and no way to inject. In fact, libpcap is in many ways
  orthogonal to divert sockets.


  6.2.  Discussion on firewall chains

  Linux provides you with three default chains: input, output and
  forward. There are also accounting chains, but they are of no
  consequence here. Depending on the packet origin it traverses one or
  more of these chains:

     Input chain
        is traversed by all packets that come into the host - packets
        that are addressed to it and packets that will be forwarded by
        it.

     Output chain
        is traversed by all packets originating in the host and by all
        forwarded packets

     Forward chain
        is traversed only by the forwarded packets.


  The order in which a forwarded packet traverses the chains is:

  1. Input

  2. Forward

  3. Output

     This may sometimes create problems for the interception if you are
     interested in a certain type of packets that may or may not
     originate on your host. A lot of times it is not clear which chain
     to use.


  As a rule of thumb, forward chain should only be used to filter
  packets that are forwarded and are not originating and are not
  addressed to your host. If you are interested in a combination of both
  forwarded packets and packets that are originating or addressed to
  your host, then use input or output chain instead.  Intercepting on
  forward and input or output chain for the same type of packet at the
  same time will create problems in reinjection and, more importantly,
  is unnecessary.


  6.3.  Using ipchains

  The patched version of ipchains that you will need to retrieve from
  the website, is the tool that allows you to modify firewall rules from
  a shell (most people want that).  It is also possible to set up
  firewall rules programmatically. See the example code for this -
  setting up a DIVERT rule would be similar to setting up a REDIRECT
  rule - specify DIVERT as a target and the divert port and you are set
  to go.

  The ipchains syntax for setting up firewall rules remains the same. To
  specify a DIVERT rule you must specify -j DIVERT <port num> as a
  target, everything else remains the same. For instance


       ipchains -A input -p ICMP -j DIVERT 1234



  would set up a divert rule for ICMP packets to be diverted from input
  chain to a port 1234.


  The following section explains how to use ipchains in conjunction with
  an interceptor user-space program.


  6.4.  Plain vanilla example

  6.4.1.  Example program

  Here is an example program that reads packets from a divert socket,
  displays them and then reinjects them back. It requires that the
  divert port is specified on the command line.



  #include <stdio.h>
  #include <errno.h>
  #include <limits.h>
  #include <string.h>
  #include <stdlib.h>
  #include <unistd.h>
  #include <getopt.h>
  #include <netdb.h>
  #include <netinet/in.h>
  #include <sys/types.h>
  #include <signal.h>

  #include <netinet/ip.h>
  #include <netinet/tcp.h>
  #include <netinet/udp.h>
  #include <net/if.h>
  #include <sys/param.h>

  #include <linux/types.h>
  #include <linux/icmp.h>
  #include <linux/ip_fw.h>

  #define IPPROTO_DIVERT 254
  #define BUFSIZE 65535

  char *progname;

  #ifdef FIREWALL

  char *fw_policy="DIVERT";
  char *fw_chain="output";
  struct ip_fw fw;
  struct ip_fwuser ipfu;
  struct ip_fwchange ipfc;
  int fw_sock;

  /* remove the firewall rule when exit */
  void intHandler (int signo) {

    if (setsockopt(fw_sock, IPPROTO_IP, IP_FW_DELETE, &ipfc, sizeof(ipfc))==-1) {
      fprintf(stderr, "%s: could not remove rule: %s\n", progname, strerror(errno));
      exit(2);
    }

    close(fw_sock);
    exit(0);
  }

  #endif

  int main(int argc, char** argv) {
    int fd, rawfd, fdfw, ret, n;
    int on=1;
    struct sockaddr_in bindPort, sin;
    int sinlen;
    struct iphdr *hdr;
    unsigned char packet[BUFSIZE];
    struct in_addr addr;
    int i, direction;
    struct ip_mreq mreq;

    if (argc!=2) {
      fprintf(stderr, "Usage: %s <port number>\n", argv[0]);
      exit(1);
    }
    progname=argv[0];
    fprintf(stderr,"%s:Creating a socket\n",argv[0]);
    /* open a divert socket */
    fd=socket(AF_INET, SOCK_RAW, IPPROTO_DIVERT);

    if (fd==-1) {
      fprintf(stderr,"%s:We could not open a divert socket\n",argv[0]);
      exit(1);
    }

    bindPort.sin_family=AF_INET;
    bindPort.sin_port=htons(atol(argv[1]));
    bindPort.sin_addr.s_addr=0;

    fprintf(stderr,"%s:Binding a socket\n",argv[0]);
    ret=bind(fd, &bindPort, sizeof(struct sockaddr_in));

    if (ret!=0) {
      close(fd);
      fprintf(stderr, "%s: Error bind(): %s",argv[0],strerror(ret));
      exit(2);
    }
  #ifdef FIREWALL
    /* fill in the rule first */
    bzero(&fw, sizeof (struct ip_fw));
    fw.fw_proto=1; /* ICMP */
    fw.fw_redirpt=htons(bindPort.sin_port);
    fw.fw_spts[1]=0xffff;
    fw.fw_dpts[1]=0xffff;
    fw.fw_outputsize=0xffff;

    /* fill in the fwuser structure */
    ipfu.ipfw=fw;
    memcpy(ipfu.label, fw_policy, strlen(fw_policy));

    /* fill in the fwchange structure */
    ipfc.fwc_rule=ipfu;
    memcpy(ipfc.fwc_label, fw_chain, strlen(fw_chain));

    /* open a socket */
    if ((fw_sock=socket(AF_INET, SOCK_RAW, IPPROTO_RAW))==-1) {
      fprintf(stderr, "%s: could not create a raw socket: %s\n", argv[0], strerror(errno));
      exit(2);
    }

    /* write a rule into it */
    if (setsockopt(fw_sock, IPPROTO_IP, IP_FW_APPEND, &ipfc, sizeof(ipfc))==-1) {
      fprintf(stderr, "%s could not set rule: %s\n", argv[0], strerror(errno));
      exit(2);
    }

    /* install signal handler to delete the rule */
    signal(SIGINT, intHandler);
  #endif /* FIREWALL */

    printf("%s: Waiting for data...\n",argv[0]);
    /* read data in */
    sinlen=sizeof(struct sockaddr_in);
    while(1) {
      n=recvfrom(fd, packet, BUFSIZE, 0, &sin, &sinlen);
      hdr=(struct iphdr*)packet;

      printf("%s: The packet looks like this:\n",argv[0]);
          for( i=0; i<40; i++) {
                  printf("%02x ", (int)*(packet+i));
                  if (!((i+1)%16)) printf("\n");
          };
      printf("\n");

      addr.s_addr=hdr->saddr;
      printf("%s: Source address: %s\n",argv[0], inet_ntoa(addr));
      addr.s_addr=hdr->daddr;
      printf("%s: Destination address: %s\n", argv[0], inet_ntoa(addr));
      printf("%s: Receiving IF address: %s\n", argv[0], inet_ntoa(sin.sin_addr));
      printf("%s: Protocol number: %i\n", argv[0], hdr->protocol);

      /* reinjection */

  #ifdef MULTICAST
     if (IN_MULTICAST((ntohl(hdr->daddr)))) {
          printf("%s: Multicast address!\n", argv[0]);
          addr.s_addr = hdr->saddr;
          errno = 0;
          if (sin.sin_addr.s_addr == 0)
              printf("%s: set_interface returns %i with errno =%i\n", argv[0], setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &addr, sizeof(addr)), errno);
      }
  #endif

  #ifdef REINJECT
     printf("%s Reinjecting DIVERT %i bytes\n", argv[0], n);
     n=sendto(fd, packet, n ,0, &sin, sinlen);
     printf("%s: %i bytes reinjected.\n", argv[0], n);

     if (n<=0)
       printf("%s: Oops: errno = %i\n", argv[0], errno);
     if (errno == EBADRQC)
       printf("errno == EBADRQC\n");
     if (errno == ENETUNREACH)
       printf("errno == ENETUNREACH\n");
  #endif
    }
  }



  You can simply cut-n-paste the code and compile it with your favorite
  compiler.  If you want to enable reinjection - compile it with the
  -DREINJECT flag, otherwise it will only do the interception.


  In order to get it to work, compile the kernel and ipchains-1.3.8 as
  described ``above''. Insert a rule into any of the firewall chains:
  input, output or forward, then send the packets that would match the
  rule and watch them as they fly through the screen - your interceptor
  program will display them and then reinject them back, if
  appropriately compiled.


  For example:


       ipchains -A output -p TCP -s 172.16.128.10 -j DIVERT 4321
       interceptor 4321



  will divert and display all TCP packets originating on host
  172.16.128.10 (for instance if your host is a gateway). It will inter-
  cept them on the output just before they go on the wire.

  If you did not compile the pass through option into the kernel, then
  inserting the rule effectively will create a DENY rule in the firewall
  for the packets you specified until you start the interceptor program.
  See more on that ``above''


  If you want to set a firewall rule through your program, compile it
  with -DFIREWALL option and it will divert all ICMP packets from the
  output chain. It will also remove the DIVERT rule from the firewall
  when you use Ctrl-C to exit the program.  In this case using pass-
  through vs. non-pass-through divert sockets makes virtually no
  difference.


  6.5.  The sky's the limit

  As far as what you can use divert sockets for - your imagination would
  be the limiting factor. I would be interested to hear about
  applications that utilize divert sockets.


  So, have fun!


  7.  Advanced issues

  7.1.  Packet Mangling

  After you intercept a packet, it is possible to change its header or
  contents before reinjecting it back. Here are a few rules you might
  need to keep in mind:

  o  IP header checksum is always recalculated on injection

  o  IP ID field is filled in for you if you leave it 0.

  o  The length of the packet is updated for you.

     All other parts of the IP header can be modified and its up to you
     to insure their sanity.


  7.2.  Injection with no interception

  It is not necessary to intercept a packet in order to inject it. You
  can form your own packets and inject them into an open and bound
  divert socket. The header rules from above apply.


  In addition, you need to pass to the divert socket a sockaddr_in
  structure (see example program), which will tell the socket where to
  inject. If you leave the structure 0-ed out or pass a NULL - the
  divert socket will attempt to inject the packet in the outbound
  direction (on the wire). If instead you fill the sockaddr_in structure
  with the address of one of the local interfaces, the divert socket
  will attempt to inject the packet inbound, as if it came from that
  interface. All addresses, of course, should be in network byte order.


  Injection of packets that look like they are being forwarded by your
  host must include an address of the incoming interface (actually - any
  valid interface address will probably work).



  7.3.  Fragmentation

  As of this reading, the divert sockets do not handle the
  defragmentation and fragmentation of diverted packets - you always get
  the fragments as they are on the wire and you should not inject
  fragments larger than PMTU. It is anticipated that the
  fragmentation/defragmentation capability will be added in the near
  future.


  8.  Geting More Information

  8.1.  The website

  As mentioned above, most of the information about divert sockets can
  be found on the Divert Sockets for Linux website
  http://www.anr.mcnc.org/~divert <http://www.anr.mcnc.org/~divert>.


  8.2.  The mailing list

  There is also a mailing list, whose archive can be found at the
  website.  To join the mailing list send email with an empty subject
  and the following line in the body:


       subscribe divert



  to anr-majordomo@list.anr.mcnc.org <mailto:anr-major-
  domo@list.anr.mcnc.org>. The list address is divert@list.anr.mcnc.org
  <mailto:divert@list.anr.mcnc.org>.


  To unsubscribe, send mail to anr-majordomo@list.anr.mcnc.org
  <mailto:anr-majordomo@list.anr.mcnc.org> with an empty subject and the
  following line in the body:


       unsubscribe divert



  9.  Future work

  As mentioned in the disclaimer, work on divert sockets is done as part
  of a DARPA-funded network security effort. We will continue to port
  divert sockets to further versions of the kernel as time permits.
  Given that 2.4 kernel is on the horizon, in all likelihood we will
  skip 2.3.x series altogether.



  Setting Up Your New Domain Mini-HOWTO.
  by Christopher Neufeld (neufeld@physics.utoronto.ca)
  (neufeld@caliban.physics.utoronto.ca).
  version 0.10. 2000-02-29.

  This document outlines the things you will probably have to do when
  you want to set up a network of computers under your own domain. It
  covers configuration of network parameters, network services, and
  security settings.
  ______________________________________________________________________

  Table of Contents



  1. Notices

     1.1 Disclaimer
     1.2 Location
     1.3 Copyright

  2. Introduction

  3. Planning Your Network Topology

  4. Obtaining Your Connection

     4.1 Choosing Your Provider
     4.2 Preparing For Hardware Installation
     4.3 Testing The Connection
     4.4 Using A Dynamic IP

  5. Registering A Domain Name

  6. Deciding Which Domain Services You Will Host

     6.1 Primary DNS Authority
     6.2 Electronic Mail
     6.3 Web Space Hosting
     6.4 FTP Site Hosting
     6.5 Packet Filtering

  7. Configuring Your Hosted Services

     7.1 Setting up Name Resolution
        7.1.1 DNS On Private Network, ISP Handles Domain
        7.1.2 Non-DNS Resolution On Private Network, ISP Handles Domain
        7.1.3 You Are Primary DNS Authority For Domain
        7.1.4 Fully Exposed Network, Hosted By ISP
        7.1.5 Preparing DNS Before Moving Your Domain
     7.2 DNS Configuration If You Are Not Hosting Email
     7.3 Setting up Electronic Mail
        7.3.1 A Solution Using "sendmail"
        7.3.2 Solutions Using Other Mail Transfer Agents
     7.4 Setting up Web Space Hosting
     7.5 Setting up FTP Hosting
     7.6 Setting up Packet Filtering

  8. Securing Your Domain

     8.1 Configuring Your Firewall
     8.2 Configuring OpenSSH or SSH1
     8.3 Configuring X
     8.4 Configuring Disk Sharing

  9. Acknowledgements

  10. Glossary of Terms



  ______________________________________________________________________

  1.  Notices

  1.1.  Disclaimer

  This is a preliminary document. I have glossed over many things which
  could be given in much more detail, and have probably missed important
  sections entirely.  Any suggestions for additions, deletions, or areas
  where I ought to provide more or less detail are very welcome.
  1.2.  Location

  The most recent version of this document can be found at
  <http://caliban.physics.utoronto.ca/neufeld/Domain.HOWTO/>.


  1.3.  Copyright

  Copyright (c) by Christopher Neufeld.  This document may be
  distributed only subject to the terms and conditions set forth in the
  LDP License at this location <http://www.linuxdoc.org/COPYRIGHT.html>.



  2.  Introduction

  This is a guide to setting up your own domain of Linux machines, or
  mixed Linux and Windows machines, on an always-up connection with a
  static IP and a named domain. It is not really intended for setups
  which use dynamic IPs, or which are regularly disconnected from their
  provider for long periods of time, though some basic hints for
  operating such a setup are available in section ``Using A Dynamic
  IP''.


  With the increasing availability of permanent connections and static
  IPs, it's becoming easier for people and organizations to set up a
  real domain, with the associated Internet presence. Proper planning at
  the outset can reduce problems later.


  Much of this document describes techniques for implementing
  unobtrusive security on the newly exposed network. This deals with
  protection from external attack, and from casual internal attack. It
  does not claim to provide an extremely secure setup, but is usually
  enough to discourage the less determined attacker.


  This document is primarily directed at small organizations which have
  an existing network of computers, possibly with a shared dialup line,
  which are trying to move to a permanent, relatively high-speed
  connection, either to improve data transfer with the outside world, or
  to create a WWW or FTP site. The document is also directed at new
  organizations which want to skip the early stage and start out with
  higher speed networking and services under their own domain name.


  Throughout this document, I will discuss the configuration of a newly
  registered domain, example.com. Note that the name example.com is
  reserved by the Internet Assigned Numbers Authority for use in
  documentation, and so will never correspond to an actual domain.


  Much of the information in this document is available in other places.
  I have tried to distill the material relevant to the creation of a new
  domain. Where detail on a specific subject is lacking, you may want to
  consult one of the more comprehensive documents.


  This document will also assume a mixed OS environment. Specifically, I
  will assume that some desktop machines are running some version of
  Microsoft Windows, while servers and the private network gateway are
  running Linux.



  3.  Planning Your Network Topology

  While there are arguments which can be made for many different network
  layouts, the requirements of many organizations can be met by putting
  the desktop machines and private servers on a private masqueraded
  subnet, and the publicly accessible machines on valid external IPs.
  The machines on valid external IPs will be referred to in this
  document as ``exposed hosts''. This leads to the following (example)
  topology:



       +--------------+
       |              |               +---------------+
       | ISP-supplied |---------------| FTP server    |
       | router       |        |      +---------------+
       |              |        |
       +--------------+        |      +---------------+
                               |------| WWW server #1 |
                               |      +---------------+
                               |
                               |      +---------------+
                               |------| WWW server #2 |
                               |      +---------------+
                               |
                               ~
                               ~
                               |
                               |      +---------------+
                               |------| Private       |
                                      | Network       |
                                      | Gateway       |
                                      +---------------+
                                             |
                                             |
                                             |
                                             |
            +------------+                   |      +-------------------+
            | Desktop #1 |-------------------|------| Private server #1 |
            +------------+                   |      +-------------------+
                                             |
                   .      -------------------|--------        .
                   .                         |                .
                   .      -------------------|--------        .
                                             |
            +------------+                   |      +-------------------+
            | Desktop #N |-------------------|------| Private server #N |
            +------------+                          +-------------------+



  In this example, the router provided by the ISP (Internet Service
  Provider), FTP server, WWW servers, and the machine labelled ``private
  network gateway'' all have externally visible IP numbers, while the
  desktop and private server machines have IP numbers allocated from RFC
  1918 <http://www.ietf.org/rfc/rfc1918.txt>, reserved for private use.
  The IP numbers you choose for use within the private network
  (everything below the private network gateway machine) should be
  chosen to be unique, not only among the hosts under your control, but
  should also not conflict with numbers assigned on similar private
  subnets at other sites or partner companies with whom you might, at
  some time, want to implement a virtual private network, in order to
  reduce confusion and reconfiguration when the networks are merged in
  that way. As outlined in the RFC, you can choose from any class C
  network from 192.168.0.* to 192.168.255.*, or any class B network from
  172.16.*.* to 172.31.*.*, or the class A network 10.*.*.*. In the rest
  of this document I will assume that your private network (if you've
  chosen to create one) is on the class C network 192.168.1.*, and your
  private network gateway machine is at IP number 10.1.1.9, one of the
  IP numbers provided to you by your provider (note that this is not a
  valid external IP, I use it as an example only). I will also assume
  that there is a machine, betty.example.com, at 10.1.1.10, which will
  handle both www and FTP services.


  Take note of the number of external IP numbers which you need for your
  own machines. You will need one IP number for each machine which lies
  outside the private network gateway, plus one for the gateway itself.
  This count does not include any IP numbers which may be taken by
  routers, broadcast addresses, and so on. You should ask your provider
  for a block of addresses large enough to mount the given number of
  machines. For example, in my office network, of the 8 IP numbers
  allocated from the ISP, three were not usable by my computers, leaving
  enough IP numbers for four machines outside the gateway, plus the
  gateway itself.


  This network topology is not correct for everybody, but it is a
  reasonable starting point for many configurations which don't have
  special needs. The advantages of this configuration include:

  o  Easy expandability. If you suddenly double your number of private
     nodes, you don't have to worry about getting a new IP block from
     your provider and reconfiguring all of the interfaces on your
     machines.

  o  Local network control. Adding a new workstation to your private
     network requires no communication with your provider, unlike
     exposed nodes, which need both forward and reverse DNS (domain name
     service) mappings if they are to perform certain tasks (ssh and
     ftpd may complain if they can't perform reverse and forward DNS on
     incoming connections). A reverse DNS query is an attempt to obtain
     the host name from the IP number.

  o  Centralized security. The private network gateway can enforce
     security over the whole private network, filtering packets and
     logging attacks, rather than having to install such measures on
     each desktop and server on the private network. This can be
     enforced not only on incoming packets, but also on outgoing
     packets, so that a misconfigured desktop machine doesn't
     inadvertently broadcast data to the outside world which ought to
     remain internal.

  o  Easy transplantability. Because the IP numbers within the private
     network are yours for as long as you want them, you can move the
     entire network to a new range of IP numbers without having to make
     any changes to the network configuration on the private network.
     The publicly exposed hosts still have to be reconfigured, of
     course.

  o  Transparent Internet access. The machines on your private network
     can still use FTP, telnet, WWW, and other services with minimal
     obstruction, assuming a Linux masquerading router. The users may
     not even be aware that their machines are not on externally visible
     IP numbers.


  Some of the potential disadvantages of such a configuration are:


  o  Some services will not be available directly to the machines on the
     internal network. NTP synchronization against an outside host,
     certain obscure services which may not have masquerading rules in
     the kernel, and .shosts authentication for logging in to external
     nodes are all difficult or impossible, but simple workarounds are
     almost always available.

  o  More network hardware costs. The private network gateway machine
     needs two network cards, and you need at least two hubs / switches,
     one on the visible network and one on the private network.

  o  Machines outside the private network cannot easily make direct
     connections to machines within the private network. They may have
     to open a session first on the private network gateway machine,
     then log through to the internal host. It is possible to route
     packets transparently through the firewall, but this is not
     recommended for security reasons which will be discussed in a later
     section.


  You should consider these points in planning your network topology,
  and decide if a fully visible network is more appropriate for your
  situation. In the rest of this document I will assume that you have
  configured your network as shown above. If you have chosen to have a
  fully visible network, some details will differ, and I will try to
  point out such differences in this document.


  As a special case, if you do not need any external servers, the ISP-
  supplied router can be attached directly to your external interface on
  the private network gateway machine, rather than with a hub.



  4.  Obtaining Your Connection


  4.1.  Choosing Your Provider

  As with anything, shop around. Determine which services are available
  in your area, as well as the costs associated with those services. Not
  all locations are wired to accept DSL, and some locations may not be
  suitable for wireless connections due to constraints of the landscape,
  architecture, or environment. Be prepared to provide the street
  address of the location where your hookup will be installed, as DSL
  speeds are strongly dependent on your distance from the switch, and
  ask specifically about such details as bandwidth between your machine
  and the provider, what has to be done to install the connection, and
  what hardware is provided in the quoted monthly rate. Also, you should
  have some idea of how many IP numbers you need for your own machines
  (remember that not all IP numbers in the block you get from the
  provider will be available for attaching your computers).  Ask the
  provider what their total bandwidth is out to the outside world, as
  the quoted speed is only between your site and theirs. If the provider
  has insufficient bandwidth to the outside, the customers will suffer
  bottlenecks within the provider's network.


  Once you have narrowed down a list of candidates, ask around, see if
  anybody can provide you with recommendations for the services you're
  considering. Ask them what sort of bandwidth they get to unloaded
  sites. Also, if you intend to have fast connections between the new
  domain and local ISP accounts from home, for telecommuting, or just
  remote administration, it is essential that you do a traceroute from
  your home ISP account to a host operating on the service you're
  considering. This will tell you how many hops, and how much latency
  you should expect, between home and the new domain. Latencies much
  above 100 to 200 milliseconds can be difficult to use for extended
  periods of time. The traceroute should be run around the time of day
  that you expect to make use of the network connection between home and
  the new domain.



  4.2.  Preparing For Hardware Installation

  After you have chosen the provider and service type for the new
  domain, ask about installation details. You may require service calls
  from the telephone company as well as from the ISP in order to install
  the service, and the technicians may need access to controlled areas
  of your building, so inform the building engineer of the installation
  requirements.


  Before the ISP technician arrives, ask for the network parameters,
  specifically the IP number, netmask, broadcast address, gateway
  routing address, DNS server address, and also what cabling you need to
  connect to the hardware delivered by the technician (i.e. straight-
  through or crossover RJ45 cabling, etc.).


  Have one machine available for testing, and put it close to where the
  network connection hardware will be installed. If possible, configure
  it before the service technician arrives, setting the IP number and
  netmask, and have the appropriate cabling ready so that the
  installation and testing can be done quickly.



  4.3.  Testing The Connection

  With your test machine attached to the ISP's hardware, make sure that
  you can ping sites beyond the ISP. If not, a traceroute to the outside
  can help to show where the connection is failing. If traceroute shows
  no successful hops it indicates that your test machine's network
  configuration (default route, interface address, NIC drivers, DNS,
  etc.) is incorrectly set. If it shows one hop, that could mean that
  your router is not correctly configured to communicate with the ISP.
  If it shows several hops before failing, the problem is almost
  certainly in the ISP or in the outside world, and beyond your
  immediate control.



  4.4.  Using A Dynamic IP

  The benefits of a corporate connection, with a static IP block and
  various hosted services, comes with a cost. It can be more than ten
  times as expensive as a high speed home connection on DSL or cable
  modem. If the budget can't support a corporate connection, or if no
  such connections are available in your area, you might want to try to
  set up a domain on a dynamic IP. Instead of a range of IP numbers, you
  typically get exactly one, which means that your private network
  gateway machine will also have to host any incoming services from the
  outside.


  First, you might want to check the legality of it. Many companies'
  user agreements explicitly forbid setting up externally-accessible
  servers on personal accounts. They may enforce this with packet
  filters blocking incoming connections on the http and FTP ports. You
  should also be aware that the quoted connection speed for personal
  accounts such as home DSL or cable modem are the downlink speeds, and
  that the uplink speeds might be much slower. The uplink speed is what
  is important for serving up FTP or web content.


  If you have a dynamic IP, and you want to have incoming connections,
  you will have to subscribe to a dynamic IP hosting service, such as
  DynIP <http://www.dynip.com/>, DynHOST <http://www.dynhost.com/>, TZO
  <http://www.tzo.com/>, or fdns.net <http://www.fdns.net/>. These all
  work by running software on your machine which passes your current IP
  number on to the company's servers. When your current IP number
  arrives at the servers, their DNS tables are updated to reflect the
  new value. You can either get a domain name under their domain name,
  such as ``example.dynip.com'' or ``example.dynhost.com'', or you can
  register your own domain and set the primary DNS authority to point to
  the company providing this service (usually at a higher cost).


  There is also a free hosting service, at Domain Host Services
  <http://www.dhs.org/>. They seem fairly new, and there are few details
  on their web site at the moment, but you might find it worth a look.


  If you have set up a dynamic IP, and subscribed to one of these
  services, it will affect some of the decisions you make in section
  ``Deciding Which Domain Services You Will Host''. In particular, there
  is little point subscribing to a dynamic IP hosting service if you do
  not plan to host at least one of web or FTP services. You will have to
  set primary DNS authority to point to the company you've chosen. You
  should not have a named daemon answering requests from outside your
  private network. Other details, such as handling of email, will depend
  on the specifics of the service you've subscribed to, and can best be
  answered by the support staff of that company.


  One final note: if you want to have remote access to a machine with a
  dynamic IP, but don't need it for hosting other services, the
  inexpensive solution is to create a ``drop box'' on a publicly
  accessible machine with a static IP, and have your dynamic IP host
  send its IP number there, either in email or simply by writing it into
  a file on a shell account. When you want to access your machine
  remotely, first extract the current IP number from the drop box, then
  use slogin to attach directly to that IP number. This is, after all,
  really all that a dynamic IP hosting service does, they just do it
  automatically over standard services, saving you some steps.



  5.  Registering A Domain Name

  In order for people in the outside world to locate your servers under
  the domain name of your choice, whether for web, FTP, or email
  delivery, you will have to register the domain name for insertion into
  the relevant top level domain database.


  Exercise some simple prudence in choosing your domain name. Certain
  words or phrases may be forbidden on the grounds of community
  standards, or may be offensive to visitors whose language or slang
  differs from that of your region. Domain names can contain only the 26
  letters of the Roman alphabet (without accents), the hyphen (though
  not at the beginning or end of the name), and the 10 digits. Domain
  names are not case-sensitive, and can be at least 26 characters long
  (this limit is subject to change). Be careful not to register a name
  which you can reasonably have been expected to know infringes on the
  trademarks of an existing company, the courts are not kind to
  cybersquatters. Some information on the circumstances under which your
  poorly-chosen domain name might be stripped from your control are
  available in this Uniform Domain Name Dispute Resolution Policy
  <http://www.icann.org/udrp/udrp-policy-24oct99.htm>.


  There are many companies which register names in the ``.com'',
  ``.net'', and ``.org'' top level domains. For a current list, check
  the list of accredited registrars
  <http://www.icann.org/registrars/accredited-list.html>.


  To register a name under a country top level domain, such as a
  ``.ca'', ``.de'', ``.uk'', etc., check with the appropriate authority,
  which can be located in the Country Code Top-Level Domains database
  <http://www.iana.org/cctld.html>.


  Typically, you have to provide the registrar with contact information,
  primary and secondary DNS IP numbers, a change request validation
  scheme (you wouldn't want just anybody changing your domain for you),
  and money in the form of an annual fee. If you're not comfortable with
  the change request validation schemes offered by a registrar, let them
  know that you're not willing to use the service until they address
  your security concerns.



  6.  Deciding Which Domain Services You Will Host

  Most full-service ISPs will provide a variety of domain services for
  their customers. This is largely because of the problems associated
  with hosting these services under certain other, more popular desktop
  and server operating systems. These services are much easier to
  provide under Linux, and can be hosted on fairly inexpensive hardware,
  so you should decide what services you want to take on for yourself.
  Some of these services include:

  o  Primary DNS authority on your domain. See section ``Primary DNS
     Authority''.

  o  Electronic mail. See section ``Electronic Mail''.

  o  Web space hosting. See section ``Web Space Hosting''.

  o  FTP space hosting. See section ``FTP Site Hosting''.

  o  Packet filtering. See section ``Packet Filtering''.

  In each of these, you basically have to weigh convenience against
  control. When your ISP performs one or more of these services, you can
  usually be fairly sure that they have people with experience
  maintaining the service, so you have less to learn, and less to worry
  about. At the same time, you lose control over these services. Any
  changes require that you go through the technical support of your ISP,
  something which may sometimes be inconvenient or cause longer delays
  than you would like. There's also a security issue involved, the ISP
  is a much more tempting target to attackers than your own site. Since
  an ISP's servers might host email and/or web space for the dozens of
  companies which are their customers, an attacker who compromises one
  of those servers gets a much higher return for his efforts than one
  who attacks your personal servers, where only one company's data is
  kept.



  6.1.  Primary DNS Authority

  When a person somewhere in the outside world attempts to connect to a
  machine in the new example.com domain, queries are sent between
  various servers on the Internet, ultimately resulting in the IP number
  of that machine being returned to the software of the person
  attempting the connection. The details of this sequence are beyond the
  scope of this document. Neglecting many details, when a request is
  made for the machine fred.example.com, a centralized database is
  consulted to determine what is the IP number of the machine which
  holds primary DNS authority for the example.com domain. This IP number
  is then queried for the IP number of the machine fred.example.com.


  There must be a primary and a secondary DNS server for every domain
  name. The names and IP numbers of these two servers are stored in a
  centralized database whose entries are controlled by domain
  registration authorities such as Network Solutions
  <http://www.networksolutions.com/>.


  If you elect to have primary DNS authority hosted by your ISP, these
  two servers will probably both be machines controlled by the ISP. Any
  time you want to add an externally visible machine to your network,
  you will have to contact the ISP and ask them to put the new machine
  in their database.


  If you elect to hold primary DNS authority on your own host, you will
  still use another machine as your secondary. Technically, you should
  use one on a redundant Internet connection, but it is very common that
  the secondary is held on one of your ISP's machines. If you want to
  add an externally visible machine to your network, you will have to
  update your own database, and then wait for the change to propagate
  (something which takes, typically, a small number of hours). This
  allows you to add barney.example.com without having to go through your
  ISP.


  It is a good idea to set up secondary DNS on a geographically distant
  host, so that a single cable cut near your ISP doesn't take both your
  primary and secondary DNS servers off line. The domain registrar you
  used to register your domain name may provide secondary DNS service.
  There is also a free service, Granite Canyon
  <http://www.granitecanyon.com/>, available to anybody who asks.


  Regardless of whether or not you choose to act as primary DNS
  authority for your domain, see section ``Setting Up Name Resolution''
  for configuration help. You will want some sort of name resolution
  system for your private network, even if you delegate primary DNS
  authority to the ISP.



  6.2.  Electronic Mail

  When you subscribe with your ISP, they will typically supply a number
  of email boxes. You can elect to use this service exclusively, in
  which case all incoming email is stored on the ISP's servers and your
  users read their mail with POP3 clients which connect to the ISP's
  servers. Alternately, you may decide to set up email on your own
  machines. Once again, you should weigh the merits of the two
  approaches, and choose the one which you prefer.


  Things to remember if you use the ISP for all email:

  o  It may be easier to access the email from home, or from other
     locations when you're on a business trip, depending on the security
     which you use to protect your domain.

  o  Email is routinely stored on the ISP's servers, which may be a
     problem if sensitive material is sent unencrypted.

  o  You have a limited number of email accounts, and may have to pay if
     you exceed this limit.

  o  To create a new email address, you have to go through the ISP.


  Things to remember if you provide your own email:

  o  Email is routinely stored on your own servers, with backup storage
     on your ISP if your mail host goes down or its disk fills up.

  o  You have an essentially unlimited number of email accounts, which
     you can create and delete yourself.

  o  You have to support the email clients used on your private network,
     and possibly by people trying to read their email from home.


  One possible approach is to host email yourself, but also use the
  several email addresses provided by the ISP. People who need email
  accessible from outside the private network can have an email address
  in your domain which gets redirected to one of the ISP-supplied email
  addresses. Others can have local email on the private network. This
  requires a bit more coordination and configuration, but gives more
  flexibility than either of the other approaches.


  Should you choose to host email for your domain, see section ``Setting
  Up Email For Your Domain'' for configuration help.


  If you decide not to host email for your domain, refer to section
  ``DNS Configuration If You Are Not Hosting Email'' for important notes
  on the name resolution configuration.



  6.3.  Web Space Hosting

  Your ISP may allocate you a certain amount of space on their web
  servers. You might decide to use that, or you might have a web hosting
  machine which you put on your external network, in one of your
  external IP numbers.


  Points to remember if you choose to use the ISP's web space hosting:

  o  You have a certain disk space allocation which you should not
     exceed. This will include not only web space contents, but also
     data collected from people visiting the site.

  o  The bandwidth between your web server and the outside world will
     almost certainly be higher than it would be if you hosted it on
     your own hardware. In any case, it will not be slower.

  o  It may be difficult to install custom CGI scripts or commercial
     packages on your web site.
  o  Your bandwidth between your network and your web server will almost
     certainly be lower than it would be if you hosted it on your own
     network.


  Points to remember if you choose to host your own web space:

  o  You have much more control over the hosting machine. You can tailor
     your security more precisely for your application.

  o  Potentially sensitive data, such as credit card numbers or mailing
     addresses, remains on machines which you control.

  o  Your backup strategy is probably not as comprehensive as your
     ISP's.


  Notice that I do not mention anything about the ISP having more
  powerful hardware, higher peak data rates, and so on. By the time
  these things become important, you're talking about very high data
  rate network connections, and, quite frankly, you had better be
  delegating these decisions to a skilled consultant, not looking in a
  Linux HOWTO.


  Should you choose to host web space for your domain on your own
  server(s), refer to other documents, such as the WWW-HOWTO
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/WWW-HOWTO>, for
  configuration help. I strongly recommend that this service be run on a
  different machine from the private network gateway machine, for
  security reasons.



  6.4.  FTP Site Hosting

  Basically, the same arguments apply to FTP hosting as apply to WWW
  hosting, with the exception that active content is not an issue for
  FTP, and CGI scripts don't appear. Most of the recent ftpd exploits
  have come from buffer overruns resulting from the creation of large
  directory names in anonymously-writable upload directories, so if your
  ISP allows uploads and is lax in keeping up with security updates on
  the FTP daemon, you might be better off hosting this service yourself.


  Should you choose to host FTP for your domain on your own server(s),
  make sure to get the latest version of your FTP daemon, and consult
  the configuration instructions there. Once more, I strongly recommend
  that this service be run on a different machine from the private
  network gateway machine, for security reasons.


  For wu-ftpd, I would recommend the following configuration options:

  o  --disable-upload - unless you need anonymous uploads

  o  --enable-anononly - encourage your local users to use scp to
     transfer files between machines.

  o  --enable-paranoid - disable whatever features of the current
     release might be considered questionable.



  6.5.  Packet Filtering

  Some ISPs will put packet filters on their network, to protect the
  users of the system from each other, or from external attackers. Cable
  modem networks and similar broadcast networks have had embarrassing
  problems when users of Windows 95 or 98 inadvertently set up disk
  shares, exporting the full contents of their hard drives to anybody on
  the network segment who cared to browse for active servers in the
  neighbourhood.  In some cases, the solution has been to tell the users
  not to do that, but some providers have put filtering into the access
  hardware to prevent people from exporting their data by accident.


  Packet filtering is really something which you ought to do yourself.
  It fits in easily into the kernel running on your private network
  gateway machine and gives you a better idea of what's happening around
  you. You often will find that you have to make small tweaks to the
  firewall to optimize it during the initial setup, and this is much
  easier to do in real time than through a technical support contact.


  Should you choose to do packet filtering for your domain, see section
  ``Setting Up Packet Filtering'' for configuration help.



  7.  Configuring Your Hosted Services

  7.1.  Setting up Name Resolution

  You will want some way for the computers on your network to refer to
  one another by name, and also a way for people in the outside world to
  refer to your exposed hosts by name. There are several ways to go
  about doing this.


  7.1.1.  DNS On Private Network, ISP Handles Domain

  [ Note: if you have chosen not to implement a private network, go to
  section ``Fully Exposed Network, Hosted By ISP''. ]


  In this configuration, you have delegated responsibility for the
  primary DNS authority on your domain to the ISP. You still use DNS
  within your private network when hosts there want to talk to one
  another. You have given your ISP a list of the names and IP numbers of
  all exposed hosts. If you want one externally visible machine, for
  instance betty.example.com, to act both as web and FTP server, you
  should ask the ISP to make CNAME entries for www.example.com and
  ftp.example.com pointing to betty.example.com.


  Set up DNS on your private network gateway machine. This can be done
  securely, and makes upgrading easier, should you later decide to host
  primary DNS authority for your domain.


  I will assume that you have decided to host DNS from the machine
  dns.example.com, which is on the private network gateway, and an alias
  for fred.example.com at 192.168.1.1. Some small modifications have to
  be made to this configuration if this is not the case. I will not
  cover that in this HOWTO unless there is significant interest.



  You will have to download and compile a recent version of BIND, the
  Berkeley Internet Name Domain. It is available at the BIND web site
  <http://www.isc.org/products/BIND/>. Next, you have to configure the
  daemon.  Create the following file, /etc/named.conf:


       ______________________________________________________________________
       options {
               directory "/var/named";
               listen-on { 192.168.1.1 };
       };

       zone "." {
               type hint;
               file "root.hints";
       };

       zone "0.0.127.in-addr.arpa" {
               type master;
               file "pz/127.0.0";
       };


       zone "1.168.192.in-addr.arpa" {
               type master;
               file "pz/1.168.192";
       };

       zone "example.com" {
               type master;
               notify no;
               file "pz/example.com";
       };
       ______________________________________________________________________



  Note that we are declaring ourselves the master for the example.com
  domain. Meanwhile, our ISP is also declaring itself to be the master
  for the same domain. This is not a problem, as long as you are careful
  about the setup. All of the machines on the private network must use
  dns.example.com to perform their name resolution. They must not use
  the name resolvers of the ISP, as the ISP name server believes itself
  to be authoritative over your entire domain, but it doesn't know the
  IP numbers or names of any machines on your private network.
  Similarly, hosts on exposed IP numbers in your domain must use the ISP
  name server, not the private name server on dns.example.com.


  The various files under /var/named must now be created.


  The root.hints file is exactly as described in the BIND documentation,
  or in the DNS HOWTO <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/DNS-
  HOWTO>. At the time of this writing, the following is a valid
  root.hints file:



  ______________________________________________________________________
  H.ROOT-SERVERS.NET.     6d15h26m24s IN A  128.63.2.53
  C.ROOT-SERVERS.NET.     6d15h26m24s IN A  192.33.4.12
  G.ROOT-SERVERS.NET.     6d15h26m24s IN A  192.112.36.4
  F.ROOT-SERVERS.NET.     6d15h26m24s IN A  192.5.5.241
  B.ROOT-SERVERS.NET.     6d15h26m24s IN A  128.9.0.107
  J.ROOT-SERVERS.NET.     6d15h26m24s IN A  198.41.0.10
  K.ROOT-SERVERS.NET.     6d15h26m24s IN A  193.0.14.129
  L.ROOT-SERVERS.NET.     6d15h26m24s IN A  198.32.64.12
  M.ROOT-SERVERS.NET.     6d15h26m24s IN A  202.12.27.33
  I.ROOT-SERVERS.NET.     6d15h26m24s IN A  192.36.148.17
  E.ROOT-SERVERS.NET.     6d15h26m24s IN A  192.203.230.10
  D.ROOT-SERVERS.NET.     6d15h26m24s IN A  128.8.10.90
  A.ROOT-SERVERS.NET.     6d15h26m24s IN A  198.41.0.4
  ______________________________________________________________________



  The pz/127.0.0 file is as follows:


       ______________________________________________________________________
       $TTL 86400

       @               IN      SOA     example.com. root.example.com. (
                                       1       ; Serial
                                       8H      ; Refresh
                                       2H      ; Retry
                                       1W      ; Expire
                                       1D)     ; Minimum TTL
                               NS      dns.example.com.
       1                       PTR     localhost.
       ______________________________________________________________________



  The pz/1.168.192 file is as follows:


       ______________________________________________________________________
       $TTL 86400

       @       IN      SOA             dns.example.com. root.dns.example.com. (
                                       1       ; Serial
                                       8H      ; Refresh 8 hours
                                       2H      ; Retry   2 hours
                                       1W      ; Expire  1 week
                                       1D      ; Minimum 1 day
                               )
                       NS      dns.example.com.

       1               PTR     fred.example.com.
                       PTR     dns.example.com.
                       PTR     mail.example.com.
       2               PTR     barney.example.com.
       3               PTR     wilma.example.com.
       ______________________________________________________________________



  and so on, where you create one PTR record for each machine with an
  interface on the private network. In this example, fred.example.com is
  on IP number 192.168.1.1, and is pointed to by the dns.example.com and
  mail.example.com aliases. The machine barney.example.com is on IP num-
  ber 192.168.1.2, and so on.


  The pz/example.com file is as follows:


       ______________________________________________________________________
       $TTL 86400

       @               IN      SOA     example.com. root.dns.example.com. (
                                       1       ; Serial
                                       8H      ; Refresh 8 hours
                                       2H      ; Retry   2 hours
                                       1W      ; Expire  1 week
                                       1D      ; Minimum 1 day
                               )
                               NS              dns.example.com.
               IN              A               192.168.1.1
               IN              MX          10  mail.example.com.
               IN              MX          20  <ISP mail machine IP>.


       localhost               A           127.0.0.1
       fred                    A           192.168.1.1
                               A           10.1.1.9
       dns                     CNAME       fred
       mail                    CNAME       fred
       barney                  A           192.168.1.2
       wilma                   A           192.168.1.3
       betty                   A           10.1.1.10
       www                     CNAME       betty
       ftp                     CNAME       betty
       ______________________________________________________________________



  Note that we create entries for machines both within the private net-
  work and on external IPs, since machines within the private network
  will not query the ISP's name servers for a request on, say,
  betty.example.com. We also provide both IP numbers for fred, the pri-
  vate and external IP numbers.


  One line in the ``options'' section of /etc/named.conf bears
  discussion:


       listen-on { 192.168.1.1 };



  This will prevent your named daemon from answering DNS requests on the
  outside interface (all requests from the outside must go through the
  ISP's name resolver, not yours).



  7.1.2.  Non-DNS Resolution On Private Network, ISP Handles Domain

  [ Note: if you have chosen not to implement a private network, go to
  section ``Fully Exposed Network, Hosted By ISP''. ]
  In this configuration, you have decided that your private network is
  fairly small and unlikely to change often. You have decided not to use
  the centralized database of a DNS server, and instead to maintain the
  host resolution separately on each machine. All machines should use
  the ISP's DNS server for their host name resolution for machines
  beyond the private network gateway. For name resolution on the private
  network, a hosts table has to be created. For Linux, this means
  entering the names and IP numbers of all of the machines on the
  private network into the /etc/hosts on each machine. Any time a new
  machine is added, or a name or IP number is changed, this file has to
  be updated on each Linux box.


  As in section ``DNS Resolution on Private Network, ISP Handles
  Domain'', the list of host names on exposed IP numbers must be sent to
  the ISP, and any aliases (such as for www and ftp names) should be
  specified so that a CNAME entry can be created by the ISP.



  7.1.3.  You Are Primary DNS Authority For Domain

  While you could set up named resolution on the exposed hosts, and
  private database resolution for the private network, I will not cover
  that case. If you're going to be running named for one service, you
  ought really to do it for both, just to simplify the configuration. In
  this section I will assume that the private network gateway machine is
  handling name resolution both for the private network and for outside
  requests.


  At the time of this writing, under version 8.2.2 of the BIND package,
  there is no way for a single named daemon to produce different answers
  to requests, depending on which interface the request arrives on. We
  want name resolution to act differently if the query comes from the
  outside world, because IP numbers on the private network shouldn't be
  sent out, but have to be available in answer to requests from within
  the private network. There is some discussion of a new ``views''
  keyword which may be added to BIND to fill this need at a later date,
  but until that happens, the solution is to run two named daemons with
  different configurations.


  First, set up the private network domain name server as described in
  section ``DNS Resolution on Private Network, ISP Handles Domain''.
  This will be the name resolver visible from within your private
  network.


  Next, you have to set up DNS for your domain, as visible to hosts in
  the outside world. First, check with your provider to see if they will
  delegate reverse lookups of your IP numbers to them. While the
  original DNS standard didn't account for the possibility of
  controlling reverse DNS on subnets smaller than a class C network, a
  workaround has been developed which works with all compliant DNS
  clients, and has been outlined in RFC 2317
  <http://www.ietf.org/rfc/rfc2317.txt>. If your provider is willing to
  delegate control of reverse DNS on your IP block, you will have to
  determine from them the exact name of the in-addr pseudo-domain they
  have chosen to delegate to (the RFC does not offer a convention they
  recommend for everyday use), and you will have to register control for
  that pseudo-domain. I will assume that the provider has delegated
  control to you, and the name of the pseudo-domain is 8.1.1.10.in-
  addr.arpa. The provider would create CNAME entries of the form


  8.1.1.10.in-addr.arpa.     2H IN CNAME 8.8.1.1.10.in-addr.arpa.
  9.1.1.10.in-addr.arpa.     2H IN CNAME 9.8.1.1.10.in-addr.arpa.
  10.1.1.10.in-addr.arpa.    2H IN CNAME 10.8.1.1.10.in-addr.arpa.
  etc.



  in their zone file for the 1.1.10.in-addr.arpa domain. The configura-
  tion of your 8.1.1.10.in-addr.arpa zone file is given later in this
  section.


  If your provider is willing to delegate control of the reverse DNS to
  you, they will create CNAME entries in their reverse DNS zone table
  for those IP numbers you control, pointing to the corresponding
  records in your pseudo-domain, as shown above. If they are not willing
  to delegate control to you, you will have to ask them to update their
  reverse DNS entries any time you add, delete, or change the name of an
  externally visible host in your domain. If the reverse DNS table is
  not synchronized with your forward DNS entries, certain services may
  generate warnings, or refuse to handle requests issued by machines
  affected by the mismatch.


  You now have to create a second named setup, this one to handle
  requests issued by machines outside the private network gateway. This
  setup lists only those hosts and IP numbers which are externally
  visible, and responds only to requests on the outside interface of the
  private network gateway machine.


  First, create a second configuration file, for instance
  /etc/named.ext.conf for requests from the external interface. In our
  example, it might be as follows:


       ______________________________________________________________________
       options {
               directory "/var/named";
               listen-on { 10.1.1.9; };
       };

       zone "." {
               type hint;
               file "root.hints";
       };

       zone "0.0.127.in-addr.arpa" {
               type master;
               file "pz/127.0.0";
       };


       zone "8.1.1.10.in-addr.arpa" {
               type master;
               file "ext/8.1.1.10";
       };

       zone "example.com" {
               type master;
               notify no;
               file "ext/example.com";
       };
       ______________________________________________________________________

  The root.hints and pz/127.0.0 files, both under /var/named are shared
  with the other running daemon. The file ext/8.1.1.10 is as follows:


       ______________________________________________________________________
       $TTL 86400

       @       IN      SOA             fred.example.com. root.fred.example.com. (
                                       1               ; Serial
                                       10800           ; Refresh       3 hours
                                       3600            ; Retry         1 hour
                                       3600000         ; Expire        1000 hours
                                       86400 )         ; Minimum       24 hours
                       NS      dns.example.com.
       9       IN      PTR     fred.example.com.
                       PTR     dns.example.com.
                       PTR     mail.example.com.
       10      IN      PTR     betty.example.com.
                       PTR     www.example.com.
                       PTR     ftp.example.com.
       ______________________________________________________________________



  The file ext/example.com contains the following:


       ______________________________________________________________________

       $TTL 86400

       @               IN      SOA     example.com. root.fred.example.com. (
                                       10021   ; Serial
                                       8H      ; Refresh 8 hours
                                       2H      ; Retry   2 hours
                                       1W      ; Expire  1 week
                                       1D      ; Minimum 1 day
                               )
                               NS              fred.example.com.
               IN              A               10.1.1.9
               IN              MX          10  mail.example.com.
               IN              MX          20  <ISP Mail Machine>.


       localhost               A           127.0.0.1
       fred                    A           10.1.1.9
       betty                   A           10.1.1.10
       dns                     CNAME       fred
       mail                    CNAME       fred
       www                     CNAME       betty
       ftp                     CNAME       betty
       ______________________________________________________________________



  Start the two daemons on the private network gateway machine. Put the
  following into your network daemon initialization scripts:


       /usr/sbin/named -u dnsuser -g dnsgroup /etc/named.conf
       /usr/sbin/named -u dnsuser -g dnsgroup /etc/named.ext.conf

  I've assumed here that you have created the unprivileged user
  ``dnsuser, and the corresponding unprivileged group ``dnsgroup''. If a
  bug in bind turns up, which allows an attacker to execute code from
  within named, the attacker will find himself restricted to those oper-
  ations available to the unprivileged user. The /var/named directory
  and the files within should not be writable by ``dnsuser''.


  The machines on the private network must have their name resolution
  configured to ask dns.example.com (at IP 192.168.1.1 in our example),
  while the externally visible machines can either query the network
  gateway's outside interface (at IP 10.1.1.9 in our example), or the
  ISP's DNS servers.



  7.1.4.  Fully Exposed Network, Hosted By ISP

  In this configuration, you have chosen to expose all of your hosts.
  You have a real IP number for each machine in your domain, and you've
  given your ISP the list of machine names and IP numbers. The ISP has
  given you at least one IP number for their DNS host(s). Your Linux
  boxes are now configured for name resolution in /etc/resolv.conf:


       ______________________________________________________________________
       search example.com
       nameserver <DNS host 1>
       nameserver <DNS host 2>
       ______________________________________________________________________



  Windows boxes are configured with the same parameters, in the network
  settings dialogues.



  7.1.5.  Preparing DNS Before Moving Your Domain

  If you decide to move your domain to a new IP number, either because
  you have to change your ISP or because you've changed some details of
  your service which require you to move to a new IP number from the
  same ISP, you will have to make a few preparations ahead of the move.


  You want to set things up so that the IP number fetched by a DNS
  lookup somewhere in the outside world points properly to the original
  IP number until you move, and then quickly points to the new IP number
  after you move. Remote sites can have cached your IP number, and
  subsequent queries may be answered locally from the cache, rather than
  querying the appropriate servers. The effect of this might be that
  people who had visited your site recently are unable to connect, while
  new visitors have no problems, because only the new visitors are
  getting valid uncached data. Complicating things further is the fact
  that the root-level servers are only updated twice a day, so it's
  difficult to time a change to the identities of your primary and
  secondary DNS servers in the root servers.


  The easiest way to make the transition is probably to duplicate the
  entire site, or at least the publicly visible components of it, on the
  new IP number, submit the changes, and then wait for the traffic to
  shift completely to the new IP number. This is probably not very
  practical, though.


  What you should do first is to arrange with your new ISP (or your
  current ISP if you've just changing IP numbers within a single ISP) to
  host primary and secondary DNS during the transition. This should be
  done at least a day before the move. Ask them to set the TTL on this
  record to something appropriately small (for instance, five minutes).
  The sample DNS files given earlier in this section all have TTL values
  set to 86400 seconds (1 day). If your TTL is longer than this, you
  will have to arrange the change that much more in advance of the move.
  Ultimately, here's what you have to achieve. If your current domain
  information TTL is, say, N hours, then the following have to be
  finished more than N hours before the move:

  o  Your domain registration entry must show primary and secondary DNS
     on the new ISP's machines in the root database. Allow at least a
     day between the time you submit the change and the time the change
     enters the database.

  o  The new primary and DNS servers should point to the original IP
     numbers of your site, with a fairly small TTL.

     Note that you cannot accelerate this process by reducing your
     current domain TTL value, unless you've also done this at least N
     hours before the move.


  Now, you're ready for the move. Move your machines over to the new IP
  numbers. Synchronize this with an update of the DNS records on your
  ISP to point to the new numbers. Within five minutes (the small TTL
  you set for the move), the traffic should have switched over to the
  new site. You can now rearrange the DNS authority to your liking,
  making yourself primary if that's how you want it, and putting the TTL
  back up to a reasonably large value.



  7.2.  DNS Configuration If You Are Not Hosting Email

  The configurations described in section ``Setting Up Name Resolution''
  have MX records pointing to a machine ``mail.example.com''. The MX
  record with the lowest priority number following tells remote sites
  where to send email. Other MX records with higher priority numbers are
  used as backup email receivers. These backups will hold the mail for a
  certain period of time if the primary email receiver is not able to
  accept the messages for some reason. In the examples in that section,
  I have assumed that fred.example.com, under its alias of
  mail.example.com, is handling email for the domain. If you have chosen
  to let the ISP handle all of your email hosting, you should change
  those MX records to point to the appropriate ISP machines. Ask your
  ISP technical support representative what host names you should use
  for the MX records in the various files.



  7.3.  Setting up Electronic Mail

  If you have chosen to do full electronic mail hosting for your domain,
  you'll have to take special actions for email coming from hosts on the
  private network, and for allowing transparent mail reading from
  anywhere within the private network. Unless you're careful, messages
  are likely to sit around for long times if they are waiting on one
  host, and the intended recipient is logged on another machine. For
  security reasons, I recommend that the incoming email not be
  accessible from the externally visible hosts (this might help to
  discourage a PHB who wants his desktop machine to be on a real IP,
  then wonders why he gets brought down by a ping of death twice a day).
  A transparent email sharing system on the private network fairly
  straight-forward in sendmail. If anybody wants to provide tested
  solutions for other mail handling daemons, I welcome additions.


  7.3.1.  A Solution Using "sendmail"

  In order that email delivered to one host be visible on all machines,
  the simplest solution is to export the mail spool directory with read-
  write privileges over the entire private network. The private network
  gateway machine will also act as mail collector and forwarder for the
  entire private network, and so must have root write privileges to the
  mail spool drive. The other clients may or may not squash root, at
  your discretion. My general security philosophy is not to grant
  privileges unless there is a clear reason for it, so I squash root on
  the mail spool network drive for all hosts except the private network
  gateway machine. This has the effect that root can only read his mail
  from that machine, but this is not a particularly serious handicap.
  Note that the mail spool drive can be a directory on the private
  network gateway machine, exported via NFS, or it can be a directory on
  one of the internal servers, exported to the entire private network.
  If the mail spool drive is resident on the private network gateway,
  there is no issue of squashing root for that machine. If it is on
  another server, then note that email will be undeliverable if that
  server, the gateway machine, or the network connecting them, is down.


  For Windows machines on your private network, you may either set up a
  POP server on the mail spool host, or use samba to export the mail
  spool to those machines. The Windows machines should be configured to
  send and retrieve mail under a Linux username, such as
  joeuser@example.com, so that the email address host name is the bare
  domain name, not a machine name like barney.example.com. The outgoing
  SMTP host should be set to the private network gateway machine, which
  will be responsible for forwarding the mail and doing any address
  rewriting.


  Next, you should configure sendmail to forward email from the machines
  on the private network, rewriting the addresses if necessary. Obtain
  the latest sources to sendmail from the sendmail.org WWW site
  <http://www.sendmail.org/>. Compile the binaries, then go to the
  cf/domain subdirectory within the sendmail source tree, and create the
  following new file: example.com.m4



  ______________________________________________________________________
  divert(-1)
  #
  # Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
  # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
  # Copyright (c) 1988, 1993
  #       The Regents of the University of California.  All rights reserved.
  #
  # By using this file, you agree to the terms and conditions set
  # forth in the LICENSE file which can be found at the top level of
  # the sendmail distribution.
  #
  #

  #
  #  The following is a generic domain file.  You should be able to
  #  use it anywhere.  If you want to customize it, copy it to a file
  #  named with your domain and make the edits; then, copy the appropriate
  #  .mc files and change `DOMAIN(generic)' to reference your updated domain
  #  files.
  #
  divert(0)
  define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl
  FEATURE(redirect)dnl
  MASQUERADE_AS(example.com)dnl
  FEATURE(masquerade_envelope)dnl
  ______________________________________________________________________



  This defines the domain ``example.com''. Next, you have to create the
  sendmail.cf files which will be used on the mail host (the private
  network gateway), and on the other Linux nodes on the private network.


  Create the following file in the sendmail source tree, under cf/cf:
  example.master.m4



  ______________________________________________________________________
  divert(-1)
  #
  # Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
  # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
  # Copyright (c) 1988, 1993
  #       The Regents of the University of California.  All rights reserved.
  #
  # By using this file, you agree to the terms and conditions set
  # forth in the LICENSE file which can be found at the top level of
  # the sendmail distribution.
  #
  #

  #
  #  This is the prototype file for a configuration that supports nothing
  #  but basic SMTP connections via TCP.
  #
  #  You MUST change the `OSTYPE' macro to specify the operating system
  #  on which this will run; this will set the location of various
  #  support files for your operating system environment.  You MAY
  #  create a domain file in ../domain and reference it by adding a
  #  `DOMAIN' macro after the `OSTYPE' macro.  I recommend that you
  #  first copy this to another file name so that new sendmail releases
  #  will not trash your changes.
  #

  divert(0)dnl
  OSTYPE(linux)dnl
  DOMAIN(example.com)dnl
  FEATURE(nouucp)
  FEATURE(relay_entire_domain)
  FEATURE(`virtusertable', `hash /etc/sendmail/virtusertable')dnl
  FEATURE(`genericstable', `hash /etc/sendmail/genericstable')dnl
  define(`confPRIVACY_FLAGS', ``noexpn,novrfy'')dnl
  MAILER(local)
  MAILER(smtp)
  Cw fred.example.com
  Cw example.com
  ______________________________________________________________________



  In this example we have disabled the ``expn'' and ``vrfy'' commands.
  An attacker could troll for aliases with ``expn'', trying names like
  ``staff'', ``allstaff'', ``office'', and so on, until he hits an alias
  which expands out several usernames for him. He can then try the user-
  names against certain weak passwords in hopes of getting in (assuming
  he can get a login prompt - the security settings described in section
  ``Securing Your Domain'' are set up so that no login prompt is avail-
  able for off-site attackers).


  The other file you should create will define the sendmail.cf for the
  slave machines: example.slave.m4



  ______________________________________________________________________
  divert(-1)
  #
  # Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
  # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
  # Copyright (c) 1988, 1993
  #       The Regents of the University of California.  All rights reserved.
  #
  # By using this file, you agree to the terms and conditions set
  # forth in the LICENSE file which can be found at the top level of
  # the sendmail distribution.
  #
  #

  #
  #  This the prototype for a "null client" -- that is, a client that
  #  does nothing except forward all mail to a mail hub.  IT IS NOT
  #  USABLE AS IS!!!
  #
  #  To use this, you MUST use the nullclient feature with the name of
  #  the mail hub as its argument.  You MUST also define an `OSTYPE' to
  #  define the location of the queue directories and the like.
  #  In addition, you MAY select the nocanonify feature.  This causes
  #  addresses to be sent unqualified via the SMTP connection; normally
  #  they are qualified with the masquerade name, which defaults to the
  #  name of the hub machine.
  #  Other than these, it should never contain any other lines.
  #

  divert(0)dnl

  OSTYPE(linux)
  FEATURE(nullclient, fred.$m)
  Cm example.com
  ______________________________________________________________________



  You build the appropriate sendmail.cf files with the command:


       make example.master.cf example.slave.cf



  and then copy the files to the appropriate machines under the name
  sendmail.cf.


  This configuration puts most of the sendmail configuration files under
  the /etc/sendmail/ subdirectory. This configuration causes sendmail to
  parse and use two special files, virtusertable.db and
  genericstable.db. To use these special files, create their parent
  files. First, virtusertable.src:


       ______________________________________________________________________
       John.Public@example.com                 jpublic
       Jane.Doe@example.com                    jdoe@somemachine.somedomain
       abuse@example.com                       root
       Pointyhaired.Boss@example.com           #phb#@hotmail.com
       ______________________________________________________________________

  This maps the email addresses on incoming email to new destinations.
  Mail sent to John.Public@example.com is delivered locally to the Linux
  account jpublic. Mail to Jane.Doe@example.com is redirected to another
  email account, possibly in a different domain. Mail to abuse@exam-
  ple.com is sent to root, and so on.  The other file is generic-
  stable.src:


       ______________________________________________________________________
       jpublic                                 John.Public@example.com
       janedoe                                 Jane.Doe@example.com
       whgiii                                  Pointyhaired.Boss@example.com
       ______________________________________________________________________



  This file renames the sender on outgoing email from locally-sourced
  mail. While it clearly can't affect the return address for mail sent
  directly from jdoe@somemachine.somedomain, it allows you to rewrite
  the sender's email address from the internal usernames to whatever
  email address convention you've chosen. Finally, create the following
  Makefile in /etc/sendmail/:


       ______________________________________________________________________
       all : genericstable.db virtusertable.db

       virtusertable.db : virtusertable.src
               makemap hash virtusertable < virtusertable.src

       genericstable.db : genericstable.src
               makemap hash genericstable < genericstable.src
       ______________________________________________________________________



  Run make to create the hashed files which sendmail can use, and remem-
  ber to re-run make and restart sendmail (or send it a SIGHUP) after
  any changes to either of these ``.src'' files.



  7.3.2.  Solutions Using Other Mail Transfer Agents

  My experience is only with sendmail. If anybody would like to write
  this section, please contact me. Otherwise, I may, at some later time,
  try to provide details myself on such MTAs as Postfix, Exim, or smail.
  I'd really rather somebody wrote these sections who uses those
  programs.



  7.4.  Setting up Web Space Hosting

  You should set up your externally visible web server on a machine
  outside the private network, and not on the private network gateway
  machine, for security reasons. If the web server needs access to
  databases or other resources stored on the private network, the
  situation becomes more complicated, both from a network and a security
  standpoint. Such configurations are beyond the scope of this document.


  The details of setting up the server itself can be found in the apache
  documentation, and in the Linux WWW HOWTO
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/WWW-HOWTO> document.



  7.5.  Setting up FTP Hosting

  Once again, your FTP host should be an externally visible machine, and
  not the private network gateway machine. Follow the setup directions
  which ship with your FTP daemon package. Be sure to download the most
  recent version of the daemon, as there are security vulnerabilities in
  some older versions of many daemons. If your FTP site does not require
  anonymous users to upload files, be sure to disable that feature in
  the daemon. I recommend that user (non-anonymous) FTP logins not be
  permitted on the FTP host, that you require your regular users to use
  scp, the secure shell remote copy command, for any file updating they
  may have to do on the FTP host. This is to help build secure habits in
  the users, and to protect against the ``hostile router'' problem
  described in section ``Securing Your Domain''.



  7.6.  Setting up Packet Filtering

  This is discussed in detail in section ``Configuring Your Firewall''.



  8.  Securing Your Domain

  This section deals with setting up security for your new domain. The
  emphasis is on user-transparent features. If your security is too
  obtrusive, and interferes strongly with the actions of the users, the
  users will develop their own workarounds which may compromise the
  entire domain. The best way to avoid this is to make the security as
  transparent as possible, and to encourage users to come to you first
  when they have difficulties which might be related to the security
  measures of the site. A certain flexibility in attitude is important.
  I know from personal experience that if the security policy is too
  rigid, the users will simply set up their own network tunnels through
  the firewall so they can log in from outside the domain. It's better
  that remote login procedures, or whatever the users are trying to do,
  be set up, inspected, and approved by you.


  This section deals with securing your network against outside attack,
  and against casual snooping from within. Securing your site against
  determined attack from validated users within the private network is a
  more difficult and involved task, and is beyond the scope of this
  document.


  One of the security considerations used in this section is protecting
  against the ``hostile router''. The router provided by your ISP may be
  a remotely configurable computer in its own right, with the
  administrative password held by your provider. There have been
  security problems in the past when the router's manufacturer override
  password (the one used when your ISP forgets the password they
  programmed in) has become known to system crackers. When possible, you
  should design your security around the assumption that the router is
  potentially hostile. That is, it could be using any IP number in your
  public or private network blocks, it could be redirecting traffic on
  outgoing packets to another site, and it could be recording anything
  which goes through.

  8.1.  Configuring Your Firewall

  This section deals with configuring an ipchains-based masquerading,
  forwarding, filtering router. You should probably read the IPCHAINS-
  HOWTO <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/IPCHAINS-HOWTO>
  document first, then look here for additional hints. That HOWTO
  describes the steps necessary to compile a kernel with masquerading
  support, and describes the use of the ipchains binary in detail. You
  should enable firewalling on all machines with exposed IP numbers.


  Check your startup scripts to make sure that the sequence is as
  follows on the private network gateway machine:

  1. Outside Ethernet card is initialized.

  2. Firewall rules are run through ipchains.

  3. Forwarding is turned on.

  4. Network service daemons are started.

  So, as an example, on a Slackware-based system, the firewall
  configuration should come between the execution of rc.inet1 and
  rc.inet2. Further, if any problems arise during the firewall
  configuration steps, a warning should be printed, and the external
  Ethernet card taken off line before the network service daemons are
  run.


  One common problem with ipchains-based firewalls is the tedium of
  making sure that your rules are correctly set for packets arriving
  from the loopback interface, or arriving from either of the internal
  or external interfaces on the firewall machine. These locally-sourced
  packets can be blocked by a firewall. All too often, this is fixed by
  a sort of shotgun debugging approach, whereby the rules for the
  firewall are tweaked until all applications seem to run properly on
  the firewall host again. Unfortunately, this can sometimes result in a
  firewall which has unintended holes. With ipchains it is possible to
  write a firewall script which is easily debugged, and which avoids
  many of the packet source problems. Here is a sample script,
  /sbin/firewall.sh:



  ______________________________________________________________________
  #! /bin/sh
  #
  # New firewalling script using IP chains. Creates a filtering router
  # with network masquerading.
  #

  # define a few variables

  IPCHAINS=/sbin/ipchains

  LOCALNET="192.168.1.0/24"   # the private network
  ETHINSIDE="192.168.1.1"             # fred.example.com's private IP #
  ETHOUTSIDE="10.1.1.9"               # fred.example.com's public IP #
  LOOPBACK="127.0.0.1/8"
  ANYWHERE="0/0"
  OUTSIDEIF=eth1                  # fred.example.com's private interface

  FORWARD_PROCENTRY=/proc/sys/net/ipv4/ip_forward

  #
  # These two commands will return error codes if the rules
  # already exist (which happens if you run the firewall
  # script more than once). We put the commands before "set -e"
  # so that the script doesn't abort in that case.

  $IPCHAINS -N outside
  $IPCHAINS -N portmap

  set -e                  # Abort immediately on error setting
                          # up the rules.


  #
  # Turn off forwarding and clear the tables

  echo "0" > ${FORWARD_PROCENTRY}

  $IPCHAINS -F forward
  $IPCHAINS -F input
  $IPCHAINS -F output
  $IPCHAINS -F outside
  $IPCHAINS -F portmap


  #
  # Masquerade packets from within our local network destined for the
  # outside world. Don't masquerade packets which are local to local

  $IPCHAINS -A forward -s $LOCALNET -d $LOCALNET -j ACCEPT
  $IPCHAINS -A forward -s $ETHOUTSIDE -d $ANYWHERE -j ACCEPT
  $IPCHAINS -A forward -s $LOCALNET -d $ANYWHERE -j MASQ

  #
  # Set the priority flags. Minimum delay connections for www, telnet,
  # ftp, and ssh (outgoing packets only).

  $IPCHAINS -A output -p tcp -d $ANYWHERE www -t 0x01 0x10
  $IPCHAINS -A output -p tcp -d $ANYWHERE telnet -t 0x01 0x10
  $IPCHAINS -A output -p tcp -d $ANYWHERE ftp -t 0x01 0x10
  $IPCHAINS -A output -p tcp -d $ANYWHERE ssh -t 0x01 0x10


  #
  # Anything from our local class C is to be accepted, as are
  # packets from the loopback and fred's external IP.
  $IPCHAINS -A input -s $LOCALNET -j ACCEPT
  $IPCHAINS -A input -s $LOOPBACK -j ACCEPT
  $IPCHAINS -A input -s $ETHOUTSIDE -j ACCEPT



  # We'll create a set of rules for packets coming from the big, bad
  # outside world, and then bind all external interfaces to it. This
  # rule will be called "outside"
  #
  # We also create a "portmap" chain. The sockets used by daemons
  # registered with the RPC portmapper are not fixed, and so it is
  # a bit difficult to set up filter rules for them. The portmap
  # chain is configured in a separate script.


  #
  # Send packets from any outside interface to the "outside"
  # rules chain. This includes the $OUTSIDEIF interface and any
  # ppp interfaces we create for dialout (or dialin).

  $IPCHAINS -A input -i ${OUTSIDEIF} -j outside
  $IPCHAINS -A input -i ppp+ -j outside


  ##################################################
  #
  #  Set up the "outside" rules chain              #
  #
  ##################################################

  #
  # Nobody from the outside should claim to be coming from our localnet
  # or loopback

  $IPCHAINS -A outside -s $LOCALNET -j DENY
  $IPCHAINS -A outside -s $LOOPBACK -j DENY

  #
  # No packets routed to our local net should come in from outside
  # because the outside isn't supposed to know about our private
  #  IP numbers.

  $IPCHAINS -A outside -d $LOCALNET -j DENY

  #
  # Block incoming connections on the X port. Block 6000 to 6010.

  $IPCHAINS -l -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 6000:6010 -j DENY

  #
  # Block NFS ports 111 and 2049

  $IPCHAINS -l -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 111 -j DENY
  $IPCHAINS -l -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 2049 -j DENY
  $IPCHAINS -l -A outside -p UDP -s $ANYWHERE -d $ANYWHERE 111 -j DENY
  $IPCHAINS -l -A outside -p UDP -s $ANYWHERE -d $ANYWHERE 2049 -j DENY

  #
  # Block XDM packets from outside, port 177 UDP

  $IPCHAINS -l -A outside -p UDP -s $ANYWHERE -d $ANYWHERE 177 -j DENY


  #
  # Block the YP/NIS port 653
  $IPCHAINS -l -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 653 -j DENY

  #
  # Don't bother logging accesses on TCP port 80, the www port.

  $IPCHAINS -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 80 -j DENY

  #
  # Accept FTP data and control connections.

  $IPCHAINS -A outside -p TCP -s $ANYWHERE 20:21 -d $ANYWHERE 1024: -j ACCEPT

  #
  # Accept ssh packets

  $IPCHAINS -A outside -p TCP -s $ANYWHERE -d $ANYWHERE ssh -j ACCEPT

  #
  # Accept DNS packets from outside

  $IPCHAINS -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 53 -j ACCEPT
  $IPCHAINS -A outside -p UDP -s $ANYWHERE -d $ANYWHERE 53 -j ACCEPT

  #
  # Accept SMTP from the world

  $IPCHAINS -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 25 -j ACCEPT

  #
  # Accept NTP packets

  $IPCHAINS -A outside -p UDP -s $ANYWHERE -d $ANYWHERE 123 -j ACCEPT

  #
  # Accept no tap ident packets, we don't use them

  $IPCHAINS -A outside -p TCP -s $ANYWHERE -d $ANYWHERE 113 -j DENY

  #
  # Turn off and log all other packets incoming, TCP or UDP, on privileged ports

  $IPCHAINS -l -A outside -p TCP -s $ANYWHERE -d $ANYWHERE :1023 -y -j DENY
  $IPCHAINS -l -A outside -p UDP -s $ANYWHERE -d $ANYWHERE :1023 -j DENY

  #
  # Check against the portmapper ruleset

  $IPCHAINS -A outside -j portmap


  ##############################################
  #
  #    End of "outside" rules chain            #
  #
  ##############################################


  #
  # Block outgoing rwho packets

  $IPCHAINS -A output -p UDP -i $OUTSIDEIF -s $ANYWHERE 513 -d $ANYWHERE -j DENY

  #
  # Prevent netbios packets from leaving

  $IPCHAINS -A output -p UDP -i $OUTSIDEIF -s $ANYWHERE 137 -d $ANYWHERE -j DENY
  #
  # Turn on forwarding

  echo "1" > ${FORWARD_PROCENTRY}
  ______________________________________________________________________



  Notice that the firewall can be used not only to block incoming pack-
  ets, but also outgoing packets which might leak information about your
  private network, such as rwho and netbios packets.


  As noted earlier, the portmapper rules are a bit different, because
  the portmap daemons register themselves with the portmapper and are
  told which ports to listen on. The ports used by a particular daemon
  may change as you change the RPC services used, or change their order
  of startup. The following script, /sbin/firewall.portmap.sh generates
  rule sets for the portmapped daemons:


       ______________________________________________________________________
       #! /bin/sh
       #
       ANYWHERE=0/0

       IPCHAINS=/sbin/ipchains

       $IPCHAINS -F portmap

       # Rules for preventing access to portmapped services by people on the outside
       #
       /usr/bin/rpcinfo -p | tail +2 | \
               { while read program vers proto port remainder
                 do
                       prot=`echo $proto | tr "a-z" "A-Z"`
                       $IPCHAINS -l -A portmap -p $prot -s $ANYWHERE -d $ANYWHERE $port -j DENY || exit 1
                 done
               }
       ______________________________________________________________________



  We didn't have to worry about whether packets coming in were legiti-
  mate packets from the private network, the portmap chain is only
  checked when the packets come in from the outside.


  This firewall configuration logs most suspicious packets through klogd
  with the kern.info logging priority. It will log normal connection
  attempts, as well as all known ``stealth'' probes.


  Now, we put these all together. We'd like to make sure that there
  isn't a small window of vulnerability while the system is starting up,
  so you should configure your startup sequence as follows:



  ______________________________________________________________________
  #! /bin/sh
  #
  # Get the network started, securely
  #
  #
  /etc/rc.d/rc.inet1              # Configure the network interfaces
                                  # and set up routing.
  /sbin/firewall.sh || { echo "Firewall configuration failed"
                         /sbin/ifconfig eth1 down }

  /sbin/ipchains -I outside 1 -j DENY     # Deny all incoming packets

  /etc/rc.d/rc.inet2              # Start the network daemons

  sleep 5                         # Let them stabilize

  # Secure the portmapped services
  /sbin/firewall.portmap.sh || { echo "Portmap firewall configuration failed"
                                 /sbin/ifconfig eth1 down }

  /sbin/ipchains -D outside 1       # Allow incoming packets
  ______________________________________________________________________



  This assumes that eth1 is the interface on the externally visible IP
  number. If any of the ipchains rule sets fail to install, a warning is
  issued and that interface is taken off line. The ``outside'' chain is
  set to deny all packets before the network service daemons are
  started, because the firewalling rules are not yet in place for the
  portmapped services. Once the portmapped services are firewalled, the
  ``outside'' chain is restored to its proper behaviour.



  8.2.  Configuring OpenSSH or SSH1

  At the time of this writing, OpenSSH, like SSH1, now offers a
  configuration setting which allows you to insert scp, ssh, and slogin
  as binaries named rcp, rsh, and rlogin, with transparent fall-through
  in the ssh client programs to the original rsh, rcp, or rlogin when
  the remote site isn't running sshd. Making an invocation of rsh run,
  instead, the ssh client program is, in my opinion, important for
  keeping the security easy to use and out of the way of the users.
  Everybody's scripts, rdist configurations, and so on will continue to
  work without modification if the remote site is running sshd, but data
  will be sent encrypted, with strong host authentication. The converse
  will not always be true. Specifically, if the remote machine is not
  running sshd, the rsh program will echo a diagnostic to the screen
  warning that the connection is unencrypted. This message breaks rdist,
  and possibly other programs. The message cannot be suppressed with
  command line or compile time switches. For rdist, one solution is to
  invoke the program with -p /usr/lib/rsh/rsh.


  Obtain ssh1 from the ssh web site <http://www.ssh.org/>, or OpenSSH
  from the OpenSSH web site <http://www.openssh.org/>, and compile it to
  replace the unencrypted r-programs (rsh, rlogin, and rcp). First, copy
  those three files to /usr/lib/rsh/, then configure the ssh package
  with:


        ./configure --with-rsh=/usr/lib/rsh/rsh --program-transform-name='s/^s/r/' --prefix=/usr

  Install the binaries, and configure according to the directions. On
  the private network gateway machine, make sure that the sshd configu-
  ration has the following entries defined:


       ListenAddress 192.168.1.1       # fred's internal IP
       IgnoreRhosts no
       X11Forwarding yes
       X11DisplayOffset 10
       RhostsAuthentication no
       RhostsRSAAuthentication yes
       RSAAuthentication yes
       PasswordAuthentication yes



  You will have to do further configuration of other entries in the
  /etc/sshd_config file, but try not to change these fields. Once you
  have all of the entries in the file set to your satisfaction, copy
  this entire file into a new file, /etc/sshd_config.ext, for the exter-
  nal network. Change two fields in the new file: the ``ListenAddress''
  should be changed to the private network gateway's external IP number
  (10.1.1.9 in our fred.example.com case), and ``PasswordAuthentica-
  tion'' should be set to ``no'' in /etc/sshd_config.ext. In your net-
  work services startup script, start sshd twice, once with


       /usr/sbin/sshd



  and once with


       /usr/sbin/sshd -f /etc/sshd_config.ext



  This will create two running sshd daemons. The one operating on the
  internal interface will allow logins with passwords, but the external
  interface will require an RSA key validation before anybody can log
  on.


  Next, turn off incoming telnet and shell services in the inetd
  configuration file (note that the firewall configuration listed in
  section ``Configuring Your Firewall'' already prevents access from
  outside, but it's best to defend in depth, don't rely on everything
  working correctly).


  People who want to be able to log in from home, or from out of town,
  will need an RSA key. Make sure they know how to do this, so they
  don't spend their energies trying to figure out another way to do it,
  like running a telnetd on an unprivileged port on your firewall
  machine.


  An RSA key is generated by the command:


       ssh-keygen -b 1024 -f new_rsa_key

  You will be prompted for a pass phrase. This should not be blank. A
  person with access to the file new_rsa_key, and knowledge of the pass
  phrase, has everything necessary to pass an RSA authentication chal-
  lenge. The pass phrase can be an ``unguessable'' password, or a long
  sentence, but make it something non-trivial. The file new_rsa_key can
  be copied to a floppy disk, or onto a laptop, and, along with the pass
  phrase, can be used to log into accounts which are set to grant access
  to that particular RSA key.


  To configure an account to allow access by a particular RSA key,
  simply create a $HOME/.ssh/ directory for that user on the private
  network gateway machine (i.e. the machine which will be receiving the
  login attempt), and copy the file new_rsa_key.pub which was created by
  the "ssh-keygen" command into the file $HOME/.ssh/authorized_keys. See
  the section ``AUTHORIZED_KEYS FILE FORMAT'' in the sshd man page for
  details on other options you can add to the key, such as requiring the
  login to come from a certain IP or host name, or authorizing the key
  only to permit the remote invocation of certain commands (for
  instance, an RSA key which commands a backup to take place, or
  commands a status report to be emailed somewhere off site).


  Only one thing remains to make the RSA key mechanism as gentle as
  possible to the users. If a user is forced to enter the pass phrase
  more than once or twice in a session, they are likely to become bored
  and take security matters into their own hands. Under Linux, arrange
  their login shell to be invoked under ssh-agent. For instance, if the
  company laptop used on business trips runs xdm, and drops users into
  an X session, go into the /var/X11R6/lib/xdm/Xsession_0 file and
  change the lines which invoke the startup, which are probably of the
  form:


       exec "$startup"



  into lines of the form:


       exec ssh-agent "$startup"



  In my xdm setup, there are three such lines which should be altered in
  that one file. Now, when the user logs onto the laptop, he enters the
  command


       ssh-add new_rsa_key



  at any prompt, enters the pass phrase when prompted, and all windows
  will have pass phrase-free access to the account on the private net-
  work gateway until the user logs off his X session on the laptop.


  Run sshd on all of the machines on your private network, as well as on
  any exposed hosts. For machines other than the private network gateway
  machine, the ListenAddress entry in /etc/sshd_config can be set to
  ``0.0.0.0''.  You should set up the host keys with the command:
       ssh-keygen -b 1024 -f /etc/ssh_host_key -N ""



  then run make-ssh-known-hosts and distribute the /etc/ssh_known_hosts
  file among all of the machines on the private and public networks.


  Disable incoming telnet and the unencrypted r-services. Don't delete
  the telnet binary, it's useful for things other than simple telnet
  sessions on port 23. You should allow password authentication on the
  private network, and disable it on the exposed machines, requiring an
  RSA key to log onto the exposed hosts.


  It is convenient for the users if the hosts on the private network are
  mentioned in each other's /etc/hosts.equiv files. The sshd daemons
  will respect those, and allow people to rlogin and rsh between
  machines without passwords or pass phrases. On every connection, the
  machines will be verifying each other's identities with host-level RSA
  keys.


  One difficulty arises when a user logged onto a machine on the private
  network wants to log onto a box on an exposed IP number. You can't use
  /etc/hosts.equiv or $HOME/.shosts to allow password-less validation,
  because the user is coming from a machine whose IP number cannot be
  determined - it will appear to be coming from the masquerading
  firewall machine, but the host keys won't match. There are two
  solutions to this. First, if you insist on using the /etc/hosts.equiv
  or $HOME/.shosts methods, the user will have to log onto the private
  network gateway machine (fred.example.com in our example here), and
  then log through to the exposed machine from there. The other
  technique is to use RSA key authentication, that always works
  regardless of what games are going on with IP numbers and host name
  lookups.



  8.3.  Configuring X

  In the user's continuing quest to prove that he values convenience
  over security, it has become common for people to put


       xhost +



  commands right into their X initialization scripts. This grants X
  server access to everybody in the world. Now the random outsider can
  change your root window graphic to something embarrassing while your
  boss is showing his mother around your office. Alternately, this out-
  sider can quietly monitor every keystroke you issue, and dump the con-
  tents of your screen to his desktop. Needless to say, this doesn't
  bode well for passwords used to log into other sites, or for sensitive
  documents being edited on screen. The xhost protocol itself is inher-
  ently limited, as it is not possible to grant permissions to use the
  screen on a user basis, only on a machine basis.


  Enter xauth authentication. If you have xdm you probably already are
  running xauth authentication, but xhost still works, and might still
  be what people are using to run X processes between machines. Once
  again, the goal is to make the security easy enough to use that the
  users aren't tempted to run the xhost command anymore.


  The sshd setup described in section ``Configuring SSH1'', with the
  ``X11Forwarding'' flag set, is actually simpler to use than the xhost
  technique. Once you have logged into your terminal, you can simply
  rlogin to a remote machine, and run netscape, xv, or whatever you
  like, without having to set the $DISPLAY variable name or allow
  explicit permissions. During ssh login, it configures the system in a
  way transparent to the end user, and even encrypts all of your X
  packets before they go over the network.


  If you are unable to use the sshd X11 forwarding for some reason, you
  should use xauth when you want to authorize other machines to have
  access to your X server. Document this for the users, or create
  specialized shell scripts to help them out. The relevant command to
  authorize a particular login, ``jpublic'', on machine ``barney'' to
  have access to your X server is:



       /usr/X11/bin/xauth extract - $DISPLAY | rsh -l jpublic barney /usr/X11/bin/xauth merge -



  This sequence is not necessary to authorize X connections from
  machines which share a common NFS-mounted home directory. The xauth
  key will be immediately available to that user on all machines which
  mount the same home directory.


  I'd be tempted to delete xhost from your machines entirely. If it
  causes problems with any programs, you will at least know that those
  programs had poorly-designed security. It's simple enough to build a
  shell script as a drop-in replacement for xhost which uses the xauth
  sequence listed above.


  Note that if rsh is not the encrypting ssh program, the xauth key is
  sent plaintext. Anybody who holds the plaintext of the key can access
  your server, so you do not gain much security if you don't use ssh for
  these transactions. Note, also, that if the users' home directories
  are exported via NFS (the Network File System), the xauth key is
  available in plaintext to anybody able to snoop those NFS packets,
  regardless of whether you're running ssh on your systems.



  8.4.  Configuring Disk Sharing

  With email coming to a central machine, the read/send from any host
  setup described here is very convenient, but some care has to be taken
  to protect against trivial snooping by bored local users. NFS without
  AUTH_DES implemented is inherently insecure. NFS relies on the client
  machine to authenticate access, there is no password verification on
  the server to make sure that the client should be permitted to access
  the private files of a particular user. A Windows box can be
  configured to read NFS-exported volumes as any numeric uid, completely
  bypassing UNIX file permissions.  Consequently, NFS exports should
  only be made to machines which are always Linux (or UNIX) boxes under
  your direct control, and never ones which can be dual-booted into
  Windows.  If you want to export the mail spool directory, or any other
  directory, to machines which can sometimes be used as Windows boxes,
  export them with samba, setting the authentication mode to
  ``security=USER''. Connecting the machines on your network with a
  switch rather than a hub will also help, as it leaves very little of
  interest for sniffers on Windows machines. Ultimately, though, it's
  very difficult to secure any disk sharing over the network at the time
  of this writing.


  Why bother, if you can't really secure the network disks? Mostly it's
  an issue of credible defense. If you leave a sheet of paper on your
  desk with confidential information, and somebody in the office reads
  it, he can argue that he didn't realize what the paper was, his
  natural curiosity just got the better of him when he saw it sitting on
  the desk. If the sheet of paper were in a filing cabinet or desk
  drawer, it's an entirely different story. The purpose of taking some
  basic network security measures internally is to ensure that nobody
  ``accidentally'' compromises security.



  9.  Acknowledgements

  This document was written as internal documentation for the DYNACAN
  project, as part of the project's continuing development under the
  control of the Ministry of Human Resources Development Canada.


  This document has benefited considerably from the suggestions of

  o  Rod Smith (rodsmith@rodsbooks.com <mailto:rodsmith@rodsbooks.com>),
     who suggested I provide details on registering a domain name and on
     setting up with a dynamic IP, and pointed me at the various dynamic
     IP hosting services and at Granite Canyon.

  o  Greg Leblanc (gleblanc@my-deja.com <gleblanc@my-deja.com>) for
     useful suggestions on improving the clarity of the document.

  o  Sami Yousif (syousif@iname.com <mailto:syousif@iname.com>), who
     told me about www.dhs.org.

  o  Marc-Andre Dumas (m_a_dumas@hotmail.com
     <mailto:m_a_dumas@hotmail.com>), who suggested the section on
     moving your domain to a new IP number.

  o  Osamu Aoki (aoki@pacbell.net <mailto:aoki@pacbell.net>), who
     suggested www.fdns.net.



  10.  Glossary of Terms

  This is a list of the meanings of some of the words and acronyms used
  in this document.


     CGI Script
        A Common Gateway Interface Script. This is a program which is
        run on demand to generate the content of a web page. If a web
        page has to do more than simply feed an unchanging text and
        graphics display to the viewer, you will probably need some sort
        of dynamic content generation program such as a CGI Script.
        Examples include discussion boards, feedback forms, e-commerce
        shopping carts, and more.

     DHCP
        Dynamic Host Configuration Protocol. A standard, defined in RFC
        1531, for computers on a TCP/IP network to request from a
        central server information such as the IP number they should be
        using, the netmask, the gateway, etc. Rather than an
        administrator entering this information into the machine
        configuration, the machine simply requests it from the server as
        it is preparing to attach to the network.

     DNS
        Domain Name Service. A standard for translating domain names
        into ``IP Number''s, or vice versa, by looking up data in
        centralized databases.

     DSL
        Digital Subscriber Line. A relatively high speed network
        connection, usually delivered through specialized telephone
        wiring.

     Dynamic IP Number
        An ``IP Number'' which is assigned periodically or on a per-
        session basis. No guarantee is made that the number will remain
        constant. A dynamic IP number might change only when your
        network connection hangs up and reconnects, or it might change
        periodically under ``DHCP'' negotiation. Certain session-based
        services such as telnet and ssh will stop working if the IP
        number of either end of the connection is changed during the
        session.

     Forward DNS Query
        A ``DNS'' query which converts a domain name into an ``IP
        Number''.

     FTP
        The File Transfer Protocol. A standard system for sending files
        between machines over the Internet.

     ftpd
        The daemon responsible for providing ``FTP'' services on a host.
        It responds to queries initiated by a remote client.

     Internet Service Provider
        See ``ISP''.

     IP See ``IP Number''.

     IP Number
        The ``address'' of a certain network interface. Under the
        current addressing standard, called ipv4, this number consists
        of four 8-bit values, generally written as base-10 numbers
        separated by dots. Communication between computers on the
        Internet is based on packets of information sent between IP
        numbers.

     ISP
        Internet Service Provider. The company which provides your
        network connectivity, including connection hardware, service
        hosting, and leasing out the IP numbers under their control.

     Masquerading
        A form of filtering in which packets from one machine to the
        outside world have their headers rewritten so that they appear
        to come from an intermediate machine. That intermediate machine
        then passes responses back to the originating machine. The net
        effect is that an entire network of machines can appear to use a
        single IP number, that of the masquerading host, for the purpose
        of outgoing connections.

     named
        The name server daemon. This is the daemon which answers ``DNS''
        queries, and is distributed as part of the BIND package.

     Network Time Protocol
        See ``NTP''.

     NTP
        Network Time Protocol. A standard for synchronizing your system
        clock with the ``true time'', defined as the average of many
        high-accuracy clocks around the world.

     OS Operating system. Linux, Windows, FreeBSD, BeOS, HP-UX, etc.

     PHB
        Pointy-Haired Boss
        <http://www.unitedmedia.com/comics/dilbert/about/html/boss.html>.
        A creation of Scott Adams, of Dilbert fame.

     Provider
        See ``ISP''.

     Reverse DNS Query
        A ``DNS'' query which converts a ``IP Number'' into a domain
        name.

     Router
        A specialized hardware device which implements rules for where
        to send packets based on their ``IP Number''s, and which bridges
        between your Ethernet hardware and whatever communications
        medium connects you to your ``ISP''.

     ssh
        The secure shell. A cryptographically strong replacement for
        rlogin, telnet, ftp, and other programs.  Protects against
        ``spoofing'', man in the middle attacks, and packet sniffing.

     Static IP Number
        An ``IP Number'' which has been assigned or leased to you
        permanently. Barring revocation of the agreement which granted
        you this number, that IP number will always be available for
        your use, and no other machine on the Internet is allowed to use
        that number. Contrast this with ``Dynamic IP Number''s.



  Linux Ext2fs Undeletion mini-HOWTO
  Aaron Crane, aaronc@pobox.com
  v1.3, 2 February 1999

  Picture this.  You've spent the last three days with no sleep, no
  food, not even a shower.  Your hacking compulsion has at last paid
  off: you've finished that program that will bring you world-wide fame
  and recognition.  All that you still need to do is tar it up and put
  it on Metalab.  Oh, and delete all those Emacs backup files.  So you
  say rm * ~.  And too late, you notice the extra space in that command.
  You've just deleted your magnum opus!  But help is at hand.  This doc
  ument presents a discussion of how to retrieve deleted files from a
  Second Extended File System.  Just maybe, you'll be able to release
  that program after all...
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Revision history
        1.1.1 Changes in version 1.1
        1.1.2 Changes in version 1.2
        1.1.3 Changes in version 1.3
     1.2 Canonical locations of this document

  2. How not to delete files

  3. What recovery rate can I expect?

  4. So, how do I undelete a file?

  5. Unmounting the file system

  6. Preparing to change inodes directly

  7. Preparing to write data elsewhere

  8. Finding the deleted inodes

  9. Obtaining the details of the inodes

  10. Recovering data blocks

     10.1 Short files
     10.2 Longer files

  11. Modifying inodes directly

  12. Will this get easier in future?

  13. Are there any tools to automate this process?

  14. Colophon

  15. Credits and Bibliography

  16. Legalities



  ______________________________________________________________________



  1.  Introduction

  This mini-Howto attempts to provide hints on how to retrieve deleted
  files from an ext2 file system.  It also contains a limited amount of
  discussion of how to avoid deleting files in the first place.

  I intend it to be useful certainly for people who have just had, shall
  we say, a little accident with rm; however, I also hope that people
  read it anyway.  You never know: one day, some of the information in
  here could save your bacon.

  The text assumes a little background knowledge about UNIX file systems
  in general; however, I hope that it will be accessible to most Linux
  users.  If you are an outright beginner, I'm afraid that undeleting
  files under Linux does require a certain amount of technical knowledge
  and persistence, at least for the time being.

  You will be unable to recover deleted files from an ext2 file system
  without at least read access to the raw device on which the file was
  stored.  In general, this means that you must be root, but some
  distributions (such as Debian GNU/Linux) provide a disk group whose
  members have access to such devices.  You also need debugfs from the
  e2fsprogs package.  This should have been installed by your
  distribution.

  Why have I written this?  It stems largely from my own experiences
  with a particularly foolish and disastrous rm -r command as root.  I
  deleted about 97 JPEG files which I needed and could almost certainly
  not recover from other sources.  Using some helpful tips (see section
  ``Credits and Bibliography'') and a great deal of persistence, I
  recovered 91 files undamaged.  I managed to retrieve at least parts of
  five of the rest (enough to see what the picture was in each case).
  Only one was undisplayable, and even for this one, I am fairly sure
  that no more than 1024 bytes were lost (though unfortunately from the
  beginning of the file; given that I know nothing about the JFIF file
  format I had done as much as I could).

  I shall discuss further below what sort of recovery rate you can
  expect for deleted files.


  1.1.  Revision history

  The various publicly-released revisions of this document (and their
  publication dates) are as follows:


    v1.0 on 18 January 1997

    v1.1 on 23 July 1997 (see section ``Changes in version 1.1'')

    v1.2 on 4 August 1997 (see section ``Changes in version 1.2'')

    v1.3 on 2 February 1999 (see section ``Changes in version 1.3'')


  1.1.1.  Changes in version 1.1

  What changes have been made in this version?  First of all, the thinko
  in the example of file recovery has been fixed.  Thankyou to all those
  who wrote to point out my mistaek; I hope I've learned to be more
  careful when making up program interaction.

  Secondly, the discussion of UNIX file system layout has been rewritten
  to be, I hope, more understandable.  I wasn't entirely happy with it
  in the first place, and some people's comments indicated that it
  wasn't clear.

  Thirdly, the vast uuencoded gzipped tarball of fsgrab in the middle of
  the file has been removed.  The program is now available on my website
  <http://pobox.com/~aaronc/tech/fsgrab-1.2.tar.gz> and on Metalab
  <http://metalab.unc.edu/pub/Linux/utils/file/> (and mirrors).

  Fourthly, the document has been translated into the Linux
  Documentation Project SGML Tools content markup language.  This markup
  language can be easily converted to any of a number of other markup
  languages (including HTML and LaTeX) for convenient display and
  printing.  One benefit of this is that beautiful typography in paper
  editions is a much more achievable goal; another is that the document
  has cross-references and hyperlinks when viewed on the Web.


  1.1.2.  Changes in version 1.2

  This revision is very much an incremental change.  It's here mainly to
  include changes suggested by readers, one of which is particularly
  important.

  The first change was suggested by Egil Kvaleberg egil@kvaleberg.no,
  who pointed out the dump command in debugfs.  Thanks again, Egil.

  The second change is to mention the use of chattr for avoiding
  deleting important files.  Thanks to Herman Suijs H.P.M.Suijs@kub.nl
  for mentioning this one.

  The abstract has been revised.  URLs have been added for organisations
  and software.  Various other minor changes have been made (including
  fixing typos and so on).


  1.1.3.  Changes in version 1.3

  Though it is the first release in 17 months, there is very little that
  is new here.  This release merely fixes a few minor errors (typos,
  dangling URLs, that sort of thing -- especially the non-link to the
  Open Group), and updates a few parts of the text that have become
  hopelessly out-of-date, such as the material on kernel versions and on
  lde.  Oh, and I've changed `Sunsite' to `Metalab' throughout.

  This release is anticipated to be the last one before release 2.0,
  which will hopefully be a full Howto.  I have been working on some
  substantial changes which will justify an increment of the major
  version number.


  1.2.  Canonical locations of this document

  The latest public release of this document should always be available
  in on the Linux Documentation Project site
  <http://metalab.unc.edu/LDP/> (and mirrors).

  The latest release is also kept on my website
  <http://pobox.com/~aaronc/> in several formats:


    SGML source <http://pobox.com/~aaronc/tech/e2-undel/howto.sgml>.
     This is the source as I have written it, using the SGML Tools
     package.

    HTML <http://pobox.com/~aaronc/tech/e2-undel/html/>.  This is HTML,
     automatically generated from the SGML source.

    Plain text <http://pobox.com/~aaronc/tech/e2-undel/howto.txt>.
     This is plain text, which is also automatically generated from the
     SGML source.



  2.  How not to delete files

  It is vital to remember that Linux is unlike MS-DOS when it comes to
  undeletion.  For MS-DOS (and its bastard progeny Windows 95), it is
  generally fairly straightforward to undelete a file - the `operating
  system' (I use the term loosely) even comes with a utility which
  automates much of the process.  For Linux, this is not the case.

  So.  Rule number one (the prime directive, if you will) is:


       KEEP BACKUPS


  no matter what.  Think of all your data.  Perhaps, like me, you keep
  several years' of accumulated email, contacts, programs, papers on
  your computer.  Think of how your life would be turned upside down if
  you had a catastrophic disk failure, or if -- heaven forbid! -- a
  malicious cracker wiped your disks.  This is not unlikely; I have
  corresponded with a number of people in just such a situation.  I
  exhort all right-thinking Linux users to go out and buy a useful
  backup device, work out a decent backup schedule, and to stick to it.
  Myself, I use a spare hard disk on a second machine, and periodically
  mirror my home directory onto it over the ethernet.  For more
  information on planning a backup schedule, read Frisch (1995) (see
  section ``Bibliography and Credits'').

  In the absence of backups, what then?  (Or even in the presence of
  backups: belt and braces is no bad policy where important data is
  concerned.)

  Try to set the permissions for important files to 440 (or less):
  denying yourself write access to them means that rm requires an
  explicit confirmation before deleting.  (I find, however, that if I'm
  recursively deleting a directory with rm -r, I'll interrupt the
  program on the first or second confirmation request and reissue the
  command as rm -rf.)

  A good trick for selected files is to create a hard link to them in a
  hidden directory.  I heard a story once about a sysadmin who
  repeatedly deleted /etc/passwd by accident (thereby half-destroying
  the system).  One of the fixes for this was to do something like the
  following (as root):



       # mkdir /.backup
       # ln /etc/passwd /.backup



  It requires quite some effort to delete the file contents completely:
  if you say



       # rm /etc/passwd


  then



       # ln /.backup/passwd /etc



  will retrieve it.  Of course, this does not help in the event that you
  overwrite the file, so keep backups anyway.

  On an ext2 file system, it is possible to use ext2 attributes to
  protect things.  These attributes are manipulated with the chattr
  command.  There is an `append-only' attribute: a file with this
  attribute may be appended to, but may not be deleted, and the existing
  contents of the file may not be overwritten.  If a directory has this
  attribute, any files or directories within it may be modified as
  normal, but no files may be deleted.  The `append-only' attribute is
  set with



       $ chattr +a FILE...



  There is also an `immutable' attribute, which can only be set or
  cleared by root.  A file or directory with this attribute may not be
  modified, deleted, renamed, or (hard) linked.  It may be set as
  follows:



       # chattr +i FILE...



  The ext2fs also provides the `undeletable' attribute (+u in chattr).
  The intention is that if a file with that attribute is deleted,
  instead of actually being reused, it is merely moved to a `safe
  location' for deletion at a later date.  Unfortunately this feature
  has not yet been implemented in mainstream kernels; and though in the
  past there has been some interest in implementing it, it is not (to my
  knowledge) available for any current kernels.

  Some people advocate making rm a shell alias or function for rm -i
  (which asks for confirmation on every file you delete).  Indeed, the
  Red Hat distribution <http://www.redhat.com/> does this by default for
  all users, including root.  Personally, I cannot stand software which
  won't run unattended, so I don't do that.  There is also the problem
  that sooner or later, you'll be running in single-user mode, or using
  a different shell, or even a different machine, where your rm function
  doesn't exist.  If you expect to be asked for confirmation, it is easy
  to forget where you are and to specify too many files for deletion.
  Likewise, the various scripts and programs that replace rm are, IMHO,
  very dangerous.

  A slightly better solution is to start using a package which handles
  `recyclable' deletion by providing a command not named rm.  For
  details on these, see Peek, et al (1993) (see section ``Bibliography
  and Credits'').  These however still suffer from the problem that they
  tend to encourage the user to have a nonchalant attitude to deletion,
  rather than the cautious approach that is often required on Unix
  systems.



  3.  What recovery rate can I expect?

  That depends.  Among the problems with recovering files on a high-
  quality, multi-tasking, multi-user operating system like Linux is that
  you never know when someone wants to write to the disk.  So when the
  operating system is told to delete a file, it assumes that the blocks
  used by that file are fair game when it wants to allocate space for a
  new file.  (This is a specific example of a general principle for
  Unix-like systems: the kernel and the associated tools assume that the
  users aren't idiots.)  In general, the more usage your machine gets,
  the less likely you are to be able to recover files successfully.

  Also, disk fragmentation can affect the ease of recovering files.  If
  the partition containing the deleted files is very fragmented, you are
  unlikely to be able to read a whole file.

  If your machine, like mine, is effectively a single-user workstation,
  and you weren't doing anything disk-intensive at the fatal moment of
  deleting those files, I would expect a recovery rate in the same ball-
  park as detailed above.  I retrieved nearly 94% of the files (and
  these were binary files, please note) undamaged.  If you get 80% or
  better, you can feel pretty pleased with yourself, I should think.



  4.  So, how do I undelete a file?

  The procedure principally involves finding the data on the raw
  partition device and making it visible again to the operating system.
  There are basically two ways of doing this: one is to modify the
  existing file system such that the deleted inodes have their `deleted'
  flag removed, and hope that the data just magically falls back into
  place.  The other method, which is safer but slower, is to work out
  where the data lies in the partition and write it out into a new file
  on another file system.

  There are some steps you need to take before beginning to attempt your
  data recovery; see sections ``Unmounting the file system'',
  ``Preparing to change inodes directly'' and ``Preparing to write data
  elsewhere'' for details.  To find out how to actually retrieve your
  files, see sections ``Finding the deleted inodes'', ``Obtaining the
  details of the inodes'', ``Recovering data blocks'' and ``Modifying
  inodes directly''.



  5.  Unmounting the file system

  Regardless of which method you choose, the first step is to unmount
  the file system containing the deleted files.  I strongly discourage
  any urges you may have to mess around on a mounted file system.  This
  step should be performed as soon as possible after you realise that
  the files have been deleted; the sooner you can unmount, the smaller
  the chance that your data will be overwritten.

  The simplest method is as follows: assuming the deleted files were in
  the /usr file system, say:



       # umount /usr

  You may, however, want to keep some things in /usr available.  So
  remount it read-only:



       # mount -o ro,remount /usr



  If the deleted files were on the root partition, you'll need to add a
  -n option to prevent mount from trying to write to /etc/mtab:



       # mount -n -o ro,remount /



  Regardless of all this, it is possible that there will be another
  process using that file system (which will cause the unmount to fail
  with an error such as `Resource busy').  There is a program which will
  send a signal to any process using a given file or mount point: fuser.
  Try this for the /usr partition:



       # fuser -v -m /usr



  This lists the processes involved.  Assuming none of them are vital,
  you can say



       # fuser -k -v -m /usr



  to send each process a SIGKILL (which is guaranteed to kill it), or
  for example,



       # fuser -k -TERM -v -m /usr



  to give each one a SIGTERM (which will normally make the process exit
  cleanly).



  6.  Preparing to change inodes directly

  My advice?  Don't do it this way.  I really don't think it's wise to
  play with a file system at a low enough level for this to work.  This
  method also has problems in that you can only reliably recover the
  first 12 blocks of each file.  So if you have any long files to
  recover, you'll normally have to use the other method anyway.
  (Although see section ``Will this get easier in future?'' for
  additional information.)

  If you feel you must do it this way, my advice is to copy the raw
  partition data to an image on a different partition, and then mount
  this using loopback:



       # cp /dev/hda5 /root/working
       # mount -t ext2 -o loop /root/working /mnt



  (Note that obsolete versions of mount may have problems with this.  If
  your mount doesn't work, I strongly suggest you get the latest
  version, or at least version 2.7, as some very old versions have
  severe security bugs.)

  Using loopback means that if and when you completely destroy the file
  system, all you have to do is copy the raw partition back and start
  over.



  7.  Preparing to write data elsewhere

  If you chose to go this route, you need to make sure you have a rescue
  partition somewhere -- a place to write out new copies of the files
  you recover.  Hopefully, your system has several partitions on it:
  perhaps a root, a /usr, and a /home.  With all these to choose from,
  you should have no problem: just create a new directory on one of
  these.

  If you have only a root partition, and store everything on that,
  things are slightly more awkward.  Perhaps you have an MS-DOS or
  Windows partition you could use?  Or you have the ramdisk driver in
  your kernel, maybe as a module?  To use the ramdisk (assuming a kernel
  more recent than 1.3.48), say the following:



       # dd if=/dev/zero of=/dev/ram0 bs=1k count=2048
       # mke2fs -v -m 0 /dev/ram0 2048
       # mount -t ext2 /dev/ram0 /mnt



  This creates a 2MB ramdisk volume, and mounts it on /mnt.

  A short word of warning: if you use kerneld (or its replacement kmod
  in 2.2.x and later 2.1.x kernels) to automatically load and unload
  kernel modules, then don't unmount the ramdisk until you've copied any
  files from it onto non-volatile storage.  Once you unmount it, kerneld
  assumes it can unload the module (after the usual waiting period), and
  once this happens, the memory gets re-used by other parts of the
  kernel, losing all the painstaking hours you just spent recovering
  your data.

  If you have a Zip, Jaz, or LS-120 drive, or something similar, it
  would probably be a good choice for a rescue partition location.
  Otherwise, you'll just have to stick with floppies.

  The other thing you're likely to need is a program which can read the
  necessary data from the middle of the partition device.  At a pinch,
  dd will do the job, but to read from, say, 600 MB into an 800 MB
  partition, dd insists on reading but ignoring the first 600 MB.  This
  takes a not inconsiderable amount of time, even on fast disks.  My way
  round this was to write a program which will seek to the middle of the
  partition.  It's called fsgrab; you can find the source package on my
  website <http://pobox.com/~aaronc/tech/fsgrab-1.2.tar.gz> or on
  Metalab <http://metalab.unc.edu/pub/Linux/utils/file/> (and mirrors).
  If you want to use this method, the rest of this mini-Howto assumes
  that you have fsgrab.

  If none of the files you are trying to recover were more than 12
  blocks long (where a block is usually one kilobyte), then you won't
  need fsgrab.

  If you need to use fsgrab but don't want to download and build it, it
  is fairly straightforward to translate an fsgrab command-line to one
  for dd.  If we have


       fsgrab -c count -s skip device


  then the corresponding (but typically much slower) dd command is


       dd bs=1k if=device count=count skip=skip


  I must warn you that, although fsgrab functioned perfectly for me, I
  can take no responsibility for how it performs.  It was really a very
  quick and dirty kludge just to get things to work.  For more details
  on the lack of warranty, see the `No Warranty' section in the COPYING
  file included with it (the GNU General Public Licence).



  8.  Finding the deleted inodes

  The next step is to ask the file system which inodes have recently
  been freed.  This is a task you can accomplish with debugfs.  Start
  debugfs with the name of the device on which the file system is
  stored:



       # debugfs /dev/hda5



  If you want to modify the inodes directly, add a -w option to enable
  writing to the file system:



       # debugfs -w /dev/hda5



  The debugfs command to find the deleted inodes is lsdel.  So, type the
  command at the prompt:



  debugfs:  lsdel



  After much wailing and grinding of disk mechanisms, a long list is
  piped into your favourite pager (the value of $PAGER).  Now you'll
  want to save a copy of this somewhere else.  If you have less, you can
  type -o followed by the name of an output file.  Otherwise, you'll
  have to arrange to send the output elsewhere.  Try this:



       debugfs:  quit
       # echo lsdel | debugfs /dev/hda5 > lsdel.out



  Now, based only on the deletion time, the size, the type, and the
  numerical permissions and owner, you must work out which of these
  deleted inodes are the ones you want.  With luck, you'll be able to
  spot them because they're the big bunch you deleted about five minutes
  ago.  Otherwise, trawl through that list carefully.

  I suggest that if possible, you print out the list of the inodes you
  want to recover.  It will make life a lot easier.



  9.  Obtaining the details of the inodes

  debugfs has a stat command which prints details about an inode.  Issue
  the command for each inode in your recovery list.  For example, if
  you're interested in inode number 148003, try this:



       debugfs:  stat <148003>
       Inode: 148003   Type: regular    Mode:  0644   Flags: 0x0   Version: 1
       User:   503   Group:   100   Size: 6065
       File ACL: 0    Directory ACL: 0
       Links: 0   Blockcount: 12
       Fragment:  Address: 0    Number: 0    Size: 0
       ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996
       mtime: 0x313bf4d7 -- Tue Mar  5 08:01:27 1996
       dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       BLOCKS:
       594810 594811 594814 594815 594816 594817
       TOTAL: 6



  If you have a lot of files to recover, you'll want to automate this.
  Assuming that your lsdel list of inodes to recover in is in lsdel.out,
  try this:



       # cut -c1-6 lsdel.out | grep "[0-9]" | tr -d " " > inodes



  This new file inodes contains just the numbers of the inodes to
  recover, one per line.  We save it because it will very likely come in
  handy later on.  Then you just say:



       # sed 's/^.*$/stat <\0>/' inodes | debugfs /dev/hda5 > stats



  and stats contains the output of all the stat commands.



  10.  Recovering data blocks

  This part is either very easy or distinctly less so, depending on
  whether the file you are trying to recover is more than 12 blocks
  long.


  10.1.  Short files

  If the file was no more than 12 blocks long, then the block numbers of
  all its data are stored in the inode: you can read them directly out
  of the stat output for the inode.  Moreover, debugfs has a command
  which performs this task automatically.  To take the example we had
  before, repeated here:



       debugfs:  stat <148003>
       Inode: 148003   Type: regular    Mode:  0644   Flags: 0x0   Version: 1
       User:   503   Group:   100   Size: 6065
       File ACL: 0    Directory ACL: 0
       Links: 0   Blockcount: 12
       Fragment:  Address: 0    Number: 0    Size: 0
       ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996
       mtime: 0x313bf4d7 -- Tue Mar  5 08:01:27 1996
       dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       BLOCKS:
       594810 594811 594814 594815 594816 594817
       TOTAL: 6



  This file has six blocks.  Since this is less than the limit of 12, we
  get debugfs to write the file into a new location, such as
  /mnt/recovered.000:



       debugfs:  dump <148003> /mnt/recovered.000



  Of course, this can also be done with fsgrab; I'll present it here as
  an example of using it:



  # fsgrab -c 2 -s 594810 /dev/hda5 > /mnt/recovered.000
  # fsgrab -c 4 -s 594814 /dev/hda5 >> /mnt/recovered.000



  With either debugfs or fsgrab, there will be some garbage at the end
  of /mnt/recovered.000, but that's fairly unimportant.  If you want to
  get rid of it, the simplest method is to take the Size field from the
  inode, and plug it into the bs option in a dd command line:



       # dd count=1 if=/mnt/recovered.000 of=/mnt/resized.000 bs=6065



  Of course, it is possible that one or more of the blocks that made up
  your file has been overwritten.  If so, then you're out of luck: that
  block is gone forever.  (But just imagine if you'd unmounted sooner!)


  10.2.  Longer files

  The problems appear when the file has more than 12 data blocks.  It
  pays here to know a little of how UNIX file systems are structured.
  The file's data is stored in units called `blocks'.  These blocks may
  be numbered sequentially.  A file also has an `inode', which is the
  place where information such as owner, permissions, and type are kept.
  Like blocks, inodes are numbered sequentially, although they have a
  different sequence.  A directory entry consists of the name of the
  file and an inode number.

  But with this state of affairs, it is still impossible for the kernel
  to find the data corresponding to a directory entry.  So the inode
  also stores the location of the file's data blocks, as follows:


    The block numbers of the first 12 data blocks are stored directly
     in the inode; these are sometimes referred to as the direct blocks.

    The inode contains the block number of an indirect block.  An
     indirect block contains the block numbers of 256 additional data
     blocks.

    The inode contains the block number of a doubly indirect block.  A
     doubly indirect block contains the block numbers of 256 additional
     indirect blocks.

    The inode contains the block number of a triply indirect block.  A
     triply indirect block contains the block numbers of 256 additional
     doubly indirect blocks.

  Read that again: I know it's complex, but it's also important.

  Now, the kernel implementation for all versions up to and including
  2.0.36 unfortunately zeroes all indirect blocks (and doubly indirect
  blocks, and so on) when deleting a file.  So if your file was longer
  than 12 blocks, you have no guarantee of being able to find even the
  numbers of all the blocks you need, let alone their contents.

  The only method I have been able to find thus far is to assume that
  the file was not fragmented: if it was, then you're in trouble.
  Assuming that the file was not fragmented, there are several layouts
  of data blocks, according to how many data blocks the file used:
     0 to 12
        The block numbers are stored in the inode, as described above.


     13 to 268
        After the direct blocks, count one for the indirect block, and
        then there are 256 data blocks.


     269 to 65804
        As before, there are 12 direct blocks, a (useless) indirect
        block, and 256 blocks.  These are followed by one (useless)
        doubly indirect block, and 256 repetitions of one (useless)
        indirect block and 256 data blocks.


     65805 or more
        The layout of the first 65804 blocks is as above.  Then follow
        one (useless) triply indirect block and 256 repetitions of a
        `doubly indirect sequence'.  Each doubly indirect sequence
        consists of a (useless) doubly indirect block, followed by 256
        repetitions of one (useless) indirect block and 256 data blocks.

  Of course, even if these assumed data block numbers are correct, there
  is no guarantee that the data in them is intact.  In addition, the
  longer the file was, the less chance there is that it was written to
  the file system without appreciable fragmentation (except in special
  circumstances).

  You should note that I assume throughout that your blocksize is 1024
  bytes, as this is the standard value.  If your blocks are bigger, some
  of the numbers above will change.  Specifically: since each block
  number is 4 bytes long, blocksize/4 is the number of block numbers
  that can be stored in each indirect block.  So every time the number
  256 appears in the discussion above, replace it with blocksize/4.  The
  `number of blocks required' boundaries will also have to be changed.

  Let's look at an example of recovering a longer file.



       debugfs:  stat <1387>
       Inode: 148004   Type: regular    Mode:  0644   Flags: 0x0   Version: 1
       User:   503   Group:   100   Size: 1851347
       File ACL: 0    Directory ACL: 0
       Links: 0   Blockcount: 3616
       Fragment:  Address: 0    Number: 0    Size: 0
       ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996
       mtime: 0x313bf4d7 -- Tue Mar  5 08:01:27 1996
       dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       BLOCKS:
       8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8583
       TOTAL: 14



  There seems to be a reasonable chance that this file is not
  fragmented: certainly, the first 12 blocks listed in the inode (which
  are all data blocks) are contiguous.  So, we can start by retrieving
  those blocks:



  # fsgrab -c 12 -s 8314 /dev/hda5 > /mnt/recovered.001



  Now, the next block listed in the inode, 8326, is an indirect block,
  which we can ignore.  But we trust that it will be followed by 256
  data blocks (numbers 8327 through 8582).



       # fsgrab -c 256 -s 8327 /dev/hda5 >> /mnt/recovered.001



  The final block listed in the inode is 8583.  Note that we're still
  looking good in terms of the file being contiguous: the last data
  block we wrote out was number 8582, which is 8327 + 255.  This block
  8583 is a doubly indirect block, which we can ignore.  It is followed
  by up to 256 repetitions of an indirect block (which is ignored)
  followed by 256 data blocks.  So doing the arithmetic quickly, we
  issue the following commands.  Notice that we skip the doubly indirect
  block 8583, and the indirect block 8584 immediately (we hope)
  following it, and start at block 8585 for data.



       # fsgrab -c 256 -s 8585 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 8842 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9099 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9356 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9613 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9870 /dev/hda5 >> /mnt/recovered.001



  Adding up, we see that so far we've written 12 + (7 * 256) blocks,
  which is 1804.  The `stat' results for the inode gave us a
  `blockcount' of 3616; unfortunately these blocks are 512 bytes long
  (as a hangover from UNIX), so we really want 3616/2 = 1808 blocks of
  1024 bytes.  That means we need only four more blocks.  The last data
  block written was number 10125.  As we've been doing so far, we skip
  an indirect block (number 10126); we can then write those last four
  blocks.



       # fsgrab -c 4 -s 10127 /dev/hda5 >> /mnt/recovered.001



  Now, with some luck the entire file has been recovered successfully.



  11.  Modifying inodes directly

  This method is, on the surface, much easier.  However, as mentioned
  above, it cannot yet cope with files longer than 12 blocks.

  For each inode you want to recover, you must set the usage count to
  one, and set the deletion time to zero.  This is done with the mi
  (modify inode) command in debugfs.  Some sample output, modifying
  inode 148003 from above:



       debugfs:  mi <148003>
                                 Mode    [0100644]
                              User ID    [503]
                             Group ID    [100]
                                 Size    [6065]
                        Creation time    [833201524]
                    Modification time    [832708049]
                          Access time    [826012887]
                        Deletion time    [833201524] 0
                           Link count    [0] 1
                          Block count    [12]
                           File flags    [0x0]
                            Reserved1    [0]
                             File acl    [0]
                        Directory acl    [0]
                     Fragment address    [0]
                      Fragment number    [0]
                        Fragment size    [0]
                      Direct Block #0    [594810]
                      Direct Block #1    [594811]
                      Direct Block #2    [594814]
                      Direct Block #3    [594815]
                      Direct Block #4    [594816]
                      Direct Block #5    [594817]
                      Direct Block #6    [0]
                      Direct Block #7    [0]
                      Direct Block #8    [0]
                      Direct Block #9    [0]
                     Direct Block #10    [0]
                     Direct Block #11    [0]
                       Indirect Block    [0]
                Double Indirect Block    [0]
                Triple Indirect Block    [0]



  That is, I set the deletion time to 0 and the link count to 1 and just
  pressed return for each of the other fields.  Granted, this is a
  little unwieldy if you have a lot of files to recover, but I think you
  can cope.  If you'd wanted chrome, you'd have used a graphical
  `operating system' with a pretty `Recycle Bin'.

  By the way: the mi output refers to a `Creation time' field in the
  inode.  This is a lie!  (Or misleading, anyway.)  The fact of the
  matter is that you cannot tell on a UNIX file system when a file was
  created.  The st_ctime member of a struct stat refers to the `inode
  change time', that is, the last time when any inode details were
  changed.  Here endeth today's lesson.

  Note that more recent versions of debugfs than the one I'm using
  probably do not include some of the fields in the listing above
  (specifically, Reserved1 and (some of?) the fragment fields).

  Once you've modified the inodes, you can quit debugfs and say:



       # e2fsck -f /dev/hda5



  The idea is that each of the deleted files has been literally
  undeleted, but none of them appear in any directory entries.  The
  e2fsck program can detect this, and will add a directory entry for
  each file in the /lost+found directory of the file system.  (So if the
  partition is normally mounted on /usr, the files will now appear in
  /usr/lost+found when you next mount it.)  All that still remains to be
  done is to work out the name of each file from its contents, and
  return it to its correct place in the file system tree.

  When you run e2fsck, you will get some informative output, and some
  questions about what damage to repair.  Answer `yes' to everything
  that refers to `summary information' or to the inodes you've changed.
  Anything else I leave up to you, although it's usually a good idea to
  say `yes' to all the questions.  When e2fsck finishes, you can remount
  the file system.

  Actually, there's an alternative to having e2fsck leave the files in
  /lost+found: you can use debugfs to create a link in the file system
  to the inode.  Use the link command in debugfs after you've modified
  the inode:



       debugfs:  link <148003> foo.txt



  This creates a file called foo.txt in what debugfs thinks is the
  current directory; foo.txt will be your file.  You'll still need to
  run e2fsck to fix the summary information and block counts and so on.



  12.  Will this get easier in future?

  Yes.  In fact, I believe it already has.  Although as of this writing,
  current stable kernels (in the 2.0.x series) zero indirect blocks,
  this does not apply to development kernels in the 2.1.x series, nor to
  the stable 2.2.x series.  As I write this on 2 February 1999, kernel
  2.2.1 was released a few days ago; Linux vendors are likely to start
  producing distributions containing and supporting 2.2.x kernels a
  month or two from now.

  Once the indirect-zeroing limitation has been overcome in the
  production kernels, a lot of my objections to the technique of
  modifying inodes by hand will disappear.  At the same time, it will
  also become possible to use the dump command in debugfs on long files,
  and to conveniently use other undeletion tools.



  13.  Are there any tools to automate this process?

  As it happens, there are.  Unfortunately, I believe that they
  currently suffer from the same problem as the manual inode
  modification technique: indirect blocks are unrecoverable.  However,
  given the likelihood that this will shortly no longer be a problem,
  it's well worth looking these programs out now.

  I have written a tool called e2recover, which is essentially a Perl
  wrapper around fsgrab.  It makes a reasonable amount of effort to deal
  with zeroed indirect blocks, and seems to work fairly well as long as
  there was no fragmentation.  It also correctly sets the permissions
  (and when possible the ownership) of recovered files, and even makes
  sure that recovered files have the correct length.
  I originally wrote e2recover for the forthcoming major update to this
  Howto; unfortunately this means that much of the useful documentation
  for e2recover is scheduled for inclusion in that update.  Be that as
  it may, it should be useful now; it can be downloaded from my web site
  <http://pobox.com/~aaronc/tech/e2-undel/>, and soon from Metalab.

  Scott D. Heavner is the author of lde, the Linux Disk Editor.  It can
  be used as both a binary disk editor, and as an equivalent to debugfs
  for ext2 and minix file systems, and even for xia file systems (though
  xia support is no longer available in 2.1.x and 2.2.x kernels).  It
  has some features for assisting undeletion, both by walking the block
  list for a file, and by grepping through disk contents.  It also has
  some fairly useful documentation on basic file system concepts, as
  well as a document on how to use it for undeletion.  Version 2.4 of
  lde is available on Metalab
  <http://metalab.unc.edu/pub/Linux/system/filesystems/lde-2.4.tar.gz>
  and mirrors, or on the author's web site
  <http://www.geocities.com/CapeCanaveral/Lab/7731/lde.html>.

  Another possibility is offered by the GNU Midnight Commander, mc.
  This is a full-screen file management tool, based AFAIK on a certain
  MS-DOS program commonly known as `NC'.  mc supports the mouse on the
  Linux console and in an xterm, and provides virtual file systems which
  allow tricks like cd-ing to a tarfile.  Among its virtual file systems
  is one for ext2 undeletion.  It all sounds very handy, although I must
  admit I don't use the program myself -- I prefer good old-fashioned
  shell commands.

  To use the undeletion feature, you have to configure the program with
  the --with-ext2undel option; you'll also need the development
  libraries and include files that come with the e2fsprogs package.  The
  version provided in Debian GNU/Linux <http://www.debian.org/> is built
  in this way; the same may apply to packages for other Linux
  distributions.  Once the program is built, you can tell it to cd
  undel:/dev/hda5, and get a `directory listing' of deleted files.  Like
  many current undeletion tools, it handles zeroed indirect blocks
  poorly -- it typically just recovers the first 12k of long files.

  The current version may be downloaded from the Midnight Commander ftp
  site <ftp://ftp.nuclecu.unam.mx/Midnight/devel/>.



  14.  Colophon

  I intend to produce regular updates to this document as long as I have
  both enough time to do it, and something interesting to say.  This
  means that I am eager to hear comments from readers.  Could my writing
  be clearer?  Can you think of something that would make matters
  easier?  Is there some new tool that does it all automatically?
  Whatever.  If you have something to say about this document or about
  the fsgrab or e2recover tools, drop me a line on aaronc@pobox.com.



  15.  Credits and Bibliography


       `If I have seen farther than others, it is because I was
       standing on the shoulders of giants.' (Isaac Newton)


  This mini-Howto was originally derived from a posting in the
  comp.os.linux.misc newsgroup by Robin Glover swrglovr@met.rdg.ac.uk.
  I would like to thank Robin for graciously allowing me to rework his
  ideas into this mini-Howto.
  I would also like to take this opportunity to thank once again all the
  people who've written to me about the Howto.  Receiving grateful
  comments makes the effort worth while.

  Some bibliographic references:


    Frisch, leen (1995), Essential System Administration, second
     edition, O'Reilly and Associates, Inc., ISBN: 1-56592-127-5.

    Garfinkel, Simson, Daniel Weise and Steven Strassmann (1994), The
     Unix-Haters Handbook, IDG Books, ISBN: 1-56884-203-1.  Much of this
     book is merely the adolescent whinings of people who think that
     their operating system was so much better than Unix, and much of
     the rest simply doesn't apply if you have a well-written user-space
     such as GNU.  But there is some wheat among the chaff; for example,
     the discussion of how easy it is to delete files under Unix is well
     worth reading.

    Glover, Robin (31 Jan 1996), HOW-TO : undelete linux files
     (ext2fs/debugfs), comp.os.linux.misc Usenet posting.

    Peek, Jerry, Tim O'Reilly, Mike Loukides et al (1993), UNIX Power
     Tools, O'Reilly and Associates, Inc./Random House, Inc., ISBN:
     0-679-79073-X.  Second edition, 1998.



  16.  Legalities

  All trademarks are the property of their respective owners.
  Specifically:


    MS-DOS and Windows are trademarks of Microsoft
     <http://www.microsoft.com/>.

    UNIX is a trademark of the Open Group <http://www.opengroup.org/>.

    Linux is a trademark of Linus Torvalds in the USA and some other
     countries.

  This document is Copyright  1997, 1999 Aaron Crane aaronc@pobox.com.
  It may be freely redistributed in its entirety, including the whole of
  this copyright notice, but may not be changed without permission from
  either the author or the Linux Documentation Project HOWTO
  Coordinator.  Dispensation is granted for copying small verbatim
  portions for the purposes of reviews or for quoting; in these
  circumstances, sections may be reproduced in the presence of an
  appropriate citation but without this copyright notice.

  The author requests but does not require that parties intending to
  sell copies of this document, whether on computer-readable or human-
  readable media, inform either him or the Linux HOWTO Coordinator of
  their intentions.

  The Linux HOWTO Coordinator is currently Tim Bynum linux-
  howto@metalab.unc.edu.



  XFree86 Font Deuglification Mini HOWTO
  Doug Holland, meldroc@frii.com <mailto:meldroc@frii.com>
  v1.0, 23 November 1999

  How to fix ugly and unreadable X Window fonts.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Change Log

  2. The XF86Config File

     2.1 Setting The FontPath

  3. X Server Command Line Options

  4. TrueType Fonts (One of the few things Windows is good for)

     4.1 xfstt
        4.1.1 Installation
        4.1.2 Adjusting the default font size
     4.2 xfs
        4.2.1 Installation

  5. KDE

     5.1 Applying KDE fonts & colors to non-KDE apps

  6. Adjusting fonts in specific applications

     6.1 Netscape Navigator/Communicator
     6.2 WordPerfect
     6.3 StarOffice

  7. Credits

  8. Legalities

  ______________________________________________________________________

  1.  Introduction

  One of the most annoying sets of problems I have had to deal with is
  the abysmal default fonts and font settings of X (I'm talking
  specifically about XFree86, other versions of X may be better.) Many
  programs use fixed width default fonts when a variable width font
  would be more appropriate. Other programs use fonts that are
  ridiculously tiny and unreadable. The fonts that are bundled with
  XFree86 are barely adequate for the job. It does come with a halfway
  decent courier font, but its Times and Helvetica fonts are simple
  bitmap fonts that pixelize when they are scaled.  Yuck!

  This HOWTO attempts to show how to adjust various font settings,
  install new fonts, and do other things that will greatly improve the
  appearance and readability of fonts on the X Window Desktop.  This is
  done by adjusting the FontPath in the XF86Config file, by adding
  switches to X server command line in startx or xdm, by adding new
  fonts, by installing the TrueType font server xfstt, and by using a
  feature in the K Desktop Environment 1.1 that automagically adjusts
  font settings in many applications, including non-KDE apps to set
  their fonts and colors to match KDE's style settings.

  Comments, corrections, additions and critiques are always welcome.
  You can reach me at meldroc@frii.com <mailto:meldroc@frii.com>.

  1.1.  Change Log


    0.1:  Feb. 21, 1999: First release.

    0.11: Feb. 27, 1999: Added copyright info to protect my butt.

    0.12: Jun. 10, 1999: Added A Plea for Help.

    0.20: Sep. 14, 1999: Added section on xfs for Redhatters.  Many
     thanks to Hal Burgiss for his contribution.

    1.0: Nov. 23, 1999: Converted document to SGML, for submission to
     the Linux Documentation Project.  Removed Plea for Help.

  2.  The XF86Config File

  The first place to look when seeking to cure font problems is the
  XF86Config file.  (/usr/X11/lib/X11/XF86Config or /etc/X11/XF86Config
  are the usual locations.)  If you haven't guessed already, the most
  important part of this file relating to fonts is the FontPath. Before
  we get into that, this would be a good time to check the other parts
  of your X configuration.  Bad monitor settings can be even more of a
  headache than bad fonts, so make sure your refresh rate is as high as
  your monitor can handle (85 Hz is great, 75 Hz is OK, 60 Hz is
  painful.)

  2.1.  Setting The FontPath

  Use your favorite text editor and edit XF86Config.  Near the top of
  the file, you should see something like this:


  FontPath        "/usr/X11R6/lib/X11/fonts/misc/"
  FontPath        "/usr/X11R6/lib/X11/fonts/Type1/"
  FontPath        "/usr/X11R6/lib/X11/fonts/Speedo/"
  FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/"
  FontPath        "/usr/X11R6/lib/X11/fonts/100dpi/"

  The FontPath tells X where to find the fonts it uses to render text on
  your display.  Order is important -- when an X application asks X to
  render some text, the X server usually has some leeway to choose the
  font that is used.  The X server then goes through the FontPath and
  grabs the first font it sees that matches the X client's criteria, and
  then renders.

  The default FontPath typically puts 75dpi fonts before the 100dpi
  fonts.  If you have a high resolution display, this means very tiny
  fonts.  The first tweak you'll use is to switch the 75dpi & 100dpi
  FontPath lines.


  FontPath        "/usr/X11R6/lib/X11/fonts/misc/"
  FontPath        "/usr/X11R6/lib/X11/fonts/Type1/"
  FontPath        "/usr/X11R6/lib/X11/fonts/Speedo/"
  FontPath        "/usr/X11R6/lib/X11/fonts/100dpi/"
  FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/"


  Next, specify that you prefer to use unscaled bitmap fonts.  If you've
  ever used Netscape or any other program that displays titles using big
  fonts, you'll notice that those fonts are pixelized.  This is very
  ugly and needs to be fixed.  So add :unscaled to the ends of the misc,
  100dpi & 75dpi fonts.  You can even use both unscaled and scaled fonts
  if you want, just put the unscaled FontPath lines first to tell X you
  prefer unscaled fonts if possible.


  FontPath        "/usr/X11R6/lib/X11/fonts/misc:unscaled"
  FontPath        "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
  FontPath        "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
  FontPath        "/usr/X11R6/lib/X11/fonts/Type1"
  FontPath        "/usr/X11R6/lib/X11/fonts/Speedo"
  FontPath        "/usr/X11R6/lib/X11/fonts/misc"
  FontPath        "/usr/X11R6/lib/X11/fonts/100dpi"
  FontPath        "/usr/X11R6/lib/X11/fonts/75dpi"

  After making these changes, restart X.  Doesn't the desktop look
  better already?

  3.  X Server Command Line Options

  The next thing you need to do is adjust the command line options for
  the X server.  You'll want to use the -dpi switch which specifies the
  display resolution in dots per inch.  As a lot of systems use high
  resolution displays these days, chances are they'll be working at 100
  dpi.

  If you start X from the console command prompt, type


  startx -dpi 100.

  If you use xdm for graphical logins, you'll want to edit your
  /usr/X11/lib/X11/xdm/Xservers file, which will have the command line
  for the Xserver in it.  Mine has the line


  :0 local /usr/X11R6/bin/X -dpi 100 -gamma 1.6

  More information is in the X and Xserver man pages.

  4.  TrueType Fonts (One of the few things Windows is good for)

  Because the boys at Redmond are very concerned with the appearance of
  their software (as opposed to the internal workings ;) they built
  TrueType font support into Windows.  Windows 95 and nearly every other
  variety of Windows comes with Arial, Times New Roman, and Courier New,
  which are roughly equivalant to Helvetica, Times and Courier.
  TrueType fonts are scalable, so they look good in large sizes, and
  they are well hinted, so they are readable at small sizes.  Many
  windows applications come with dozens of TrueType fonts.  Don't
  microwave your Windows CD yet, you'll want to get the fonts first.

  4.1.  xfstt

  Unfortunately, XFree86 does not come with built in TrueType support,
  so you'll have to add it yourself.  The easiest way of doing this is
  with xfstt, a free TrueType font server.
  4.1.1.  Installation

  xfstt is very easy to install.  First, you'll want to download the
  tarball from the web.  The most current version is at
  http://metalab.unc.edu/pub/Linux/X11/fonts/Xfstt-0.9.10.tgz
  <http://metalab.unc.edu/pub/Linux/X11/fonts/Xfstt-0.9.10.tgz>

  Once you have the tarball, untar it.


  tar -zxvf Xfstt-0.9.10.tgz

  Then build it and install it.  Read the INSTALL file for quick
  instructions, but it's a no brainer.  make; make install is all you
  have to do.  Once that's done, copy the TrueType fonts you've managed
  to get from various sources to /usr/ttfonts, and you're ready to go.
  Start xfstt by typing


  xfstt --sync        # updates xfstt's font database
  xfstt &             # runs xfstt in the background.

  Then type


  xset +fp unix/:7100 # tells X about xfstt.

  or add


  FontPath "unix/:7100"

  to your XF86Config to tell X about the font service.

  4.1.2.  Adjusting the default font size

  If your TrueType fonts appear to be very tiny, the following commands
  help.

  Add the -dpi switch to your X server command line (see section 3 to do
  this.)

  Use the --res switch to tell xfstt to increase the default resolution.
  Use the following command line.


  xfstt --res 120

  4.2.  xfs

  xfs is an alternative font server that is now being included with
  RedHat based distributions. xfs is based on the FreeType Font library
  and provides similar functionality to xfstt. xfs is able to serve both
  TrueType and Type 1 fonts, as well as legacy X fonts.


  4.2.1.  Installation

  First step is to add TrueType Fonts to your linux filesystem. Su to
  root, and make a directory to hold the fonts:


  mkdir /usr/share/fonts/ttfonts

  Then, add fonts to this directory, either by copying them from your
  Windows system:


  cp /mnt/win/path_to_fonts/*ttf  /usr/share/fonts/ttfonts/

  or by downloading those available directly from Microsoft
  <http://www.microsoft.com/typography/fontpack/default.htm>.

  These fonts are in self-extracting zip archives. You can still install
  them though in linux


  unzip <TTFONT.EXE>

  Note that the font file names must be lower case. One quick and easy
  way to convert them is to copy them to a DOS (FAT16) filesystem and
  then copy them back. DOS doesn't do upper case. For a more linuxian
  way, go to the directory containing the fonts and type this:


  ls *TTF | while read f
  do
   [ -f "$f" ] && mv -f "$f" "`echo \"$f\" | tr A-Z a-z`"
  done

  You'll get the ">" prompt as you type each line, hit return at the end
  of each line above.  Note the punctuation -- those "backquotes" are
  important!  Once the TrueType fonts are properly installed, as root:


  ttmkfdir -o fonts.scale
  mkfontdir

  Rerun these commands anytime the contents of your font directory
  changes.  Next, edit the xfs font config file, /etc/X11/fs/config, to
  add your TrueType fonts to the server's font list:

  catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
              /usr/X11R6/lib/X11/fonts/100dpi:unscaled,
              /usr/X11R6/lib/X11/fonts/75dpi:unscaled,
              /usr/X11R6/lib/X11/fonts/misc,
              /usr/X11R6/lib/X11/fonts/Type1,
              /usr/X11R6/lib/X11/fonts/Speedo,
              /usr/share/fonts/default/Type1,
              /usr/share/fonts/ttfonts,
              /usr/X11R6/lib/X11/fonts/100dpi,
              /usr/X11R6/lib/X11/fonts/75dpi

  Alternately, you can use the 'chkfontpath --add <font>' command to add
  fonts. While you're at it, you may want to change the default point
  size too.


  default-point-size = 140

  This gives me 14 point, instead of the default 12. Some X apps use
  this, some won't.  Next, make sure the FontPath line in
  /etc/X11/XF86Config is:


  FontPath "unix/:-1"

  Note that "unix/:7100" may also do the trick, but did not work with
  the initial release. Comment out any existing FontPath with '#' since
  you no longer need it.  The xfs package itself should be installed
  already with the other XFree packages. To make sure it runs as one of
  the default services either use 'ntsysv' or


  chkconfig --add xfs

  Now xfs will start every time you boot.  Now restart X to force the
  new FontPath and start/restart xfs


  /etc/rc.d/init.d/xfs restart

  You should now have a functioning font server. You can check which
  fonts are being served:


  xlsfonts | less

  or check them out further with xfontsel, and even better, gfontsel!

  5.  KDE

  KDE is one of the best things that have happened to Linux and X in a
  long time.  It provides a consistent user interface that goes a long
  way towards making Linux accessable to the average non-geek.  More
  information about KDE can be found at http://www.kde.org/
  <http://www.kde.org/>.  So why am I singing it's praises here?  This
  is because KDE 1.1 has a new feature that will make the fonts & colors
  in your programs, including non-KDE applications consistent with KDE's
  current style.

  5.1.  Applying KDE fonts & colors to non-KDE apps

  This is very easy.  Simply start up the KDE Control Center, go to
  Desktop, and go to Style inside Desktop.  In there, there will be a
  toggle switch labled "Apply fonts and colors to non-KDE apps".  Turn
  it on, click OK, and your done!  The next time you start up many X
  applications, they will use the same colors and fonts that your KDE
  applications do.  Some people may like this feature better than
  others, but if you don't like it you can always turn it off.

  6.  Adjusting fonts in specific applications

  6.1.  Netscape Navigator/Communicator

  Netscape Communicator is particularly susceptible to font problems.
  If you're using the default FontPath, your fonts will be very tiny and
  very ugly.  The first thing you'll want to do is fix your XF86Config
  FontPath (see section 2.) Using 100dpi fonts improves readability
  immensly.  You'll also want check your font settings under
  Edit/Preferences, under Appearance/Fonts.  To get rid of bitmap font
  pixelization, turn off the option "Allow Scaling" on the font
  selection.

  If you have xfstt or xfs, Netscape is perfectly capable of using
  TrueType fonts.  However, it doesn't handle xfstt's quirkiness very
  gracefully.  In Edit/Preferences, you can specify TrueType fonts as
  the variable and fixed width fonts, however Netscape will not remember
  the size you've picked after you closed it.  If you haven't used the
  -dpi switch when starting the X server or used the --res switch in
  xfstt, you'll get very tiny fonts.  Once I applied these two fixes,
  TrueType fonts work great.

  6.2.  WordPerfect

  Coming soon.

  6.3.  StarOffice

  Coming soon.

  7.  Credits

  Created by Doug Holland

  Email: meldroc@frii.com <mailto:meldroc@frii.com>

  WWW: http://www.frii.com/~meldroc/ <http://www.frii.com/~meldroc/>

  Additional contributions by:

    Hal Burgiss <mailto:hburgess@bellsouth.net>

  Thanks go to:

    The folks at comp.os.linux.x <news:comp.os.linux.x> who gave me a
     hand in figuring all of this out in the first place.

    The Linux community in general who made all of this possible in the
     first place.


    Microsoft and Apple: for providing the fonts that adorn my desktop.


  8.  Legalities

  Copyright  1999 by Doug Holland.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors.  Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies.
  Commercial redistribution is allowed and encouraged; however, the
  author would like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator for more information.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would very much like to be notified of any
  plans to redistribute the HOWTOs, this one in particular!  Web page
  authors are free to link to this HOWTO without restriction, though the
  author would appreciate an email informing him of this, just so he can
  boost his ego by knowing who else reads and links to this document.

  Many of the terms mentioned in this document are trade names. Unless
  otherwise stated, all trademarks are property of their respective
  owners.

  FTP mini-HOWTO
  Matthew Borowski (mkb@yahoo.com )
  v0.2, 9 January 2000

  How to use ftp clients and servers
  ______________________________________________________________________

  Table of Contents


  1. Preamble

     1.1 Contacting Me
     1.2 Legalities and Distribution
     1.3 History of this document

  2. About FTP

  3. Beginner's guide to using ftp

     3.1 Running the
     3.2 Logging into an FTP server
     3.3 File transfer types
     3.4 Navigating and listing directories
     3.5 Downloading and uploading files
     3.6 Running shell commands
     3.7 Hash marks and tick
     3.8 Other ftp commands

  4. Console FTP clients

     4.1 NcFTP
     4.2 lukemftp
     4.3 lftp
     4.4 cftp
     4.5 yafc

  5. X Window FTP clients

     5.1 gFTP
     5.2 WXftp
     5.3 LLNL XDIR and XFTP
     5.4 guiftp

  6. FTP Servers

     6.1 How an FTP Server works
     6.2 Help with FTP Servers
        6.2.1 WU-FTPD
        6.2.2 ProFTPD


  ______________________________________________________________________

  1.  Preamble

  This document was written by Matthew Borowski for the Linux
  Documentation Project. I have not yet finished adding everything I
  want to add. There will be a section with information on operating an
  FTP server.


  1.1.  Contacting Me

  Please contact me if you have any additions or changes for this
  document.  Please do not ask for technical support -- you may purchase
  Unix consulting and support through my company, WorldServe, or you can
  ask for help on newsgroups such as comp.os.linux.*. Please also keep
  in mind that I can only understand English and Farsi.


  1.2.  Legalities and Distribution

  This document is Copyright 1999 by Matthew Borowski. You may freely
  distribute this document as long as the copyright notice remains
  unaltered.  If you distribute this HOWTO as part of a commercial
  product, I would like to recieve a copy, but this is not required. If
  you wish to distribute a modified or translated version of this
  document, please contact me first for permission.


  1.3.  History of this document


    991203: FTP HOWTO first written. Still a work-in-progress.


  2.  About FTP

  FTP (File Transfer Protocol) is a client/server protocol that allows a
  user to transfer files to and from a remote network site. It works
  with TCP and is most commonly used on the Internet, although it can
  also be used on a LAN.


  An FTP site is a computer that is running FTP server software (also
  known an FTP daemon, or ftpd). A public ftp site can usually be
  accessed by anybody by logging in as anonymous or ftp. There are many
  excellent public ftp sites that make repositories of free Unix
  software available. By learning how to use FTP, you give yourself
  access to an indespensible resource.


  Private FTP sites require a user name or password. If you have a shell
  account with your ISP, you may be able to access your files via FTP
  (contact your system administrator to check on this).


  An FTP client is the userland application that provides access to FTP
  servers. There are many FTP clients available. Some are graphical, and
  some are text-based.


  FTP was first developed by the University of California, Berkeley for
  inclusion in 4.2BSD (Berkeley Unix). The RFC (Request for Comments) is
  available at .


  3.  Beginner's guide to using ftp

  A quick guide to using ftp.


  The standard ftp program is the original ftp client. It comes standard
  with most Linux distributions. It first appeared in 4.2BSD, which was
  developed by the University of California, Berkeley.


  3.1.  Running the ftp  program

  It's easy to use ftp. Let's say you want to connect to the anonymous
  ftp site metalab.unc.edu, to download the latest Linux kernel source.
  At the command line, type:



       $ ftp metalab.unc.edu



  The ftp program will attempt to connect to metalab.unc.edu. Another
  way to do this is to run ftp from the command line with no parameters,
  and use the open command, with the site name as an argument:



       $ ftp
       ftp> open metalab.unc.edu



  3.2.  Logging into an FTP server

  When you connect to an FTP site, it will ask you for a login (pressing
  enter will log in as your local user name, in this case, foo: We log
  in as anonymous or ftp, to get to the public archive.



       220 helios.oit.unc.edu FTP server (Version wu-2.6.0(2) Wed Nov 17 14:44:12
       EST 1999) ready.
       Name (metalab.unc.edu:foo):



  Now, we enter a complete e-mail address as the password (this is what
  most public FTP sites request).



       331 Guest login ok, send your complete e-mail address as password.
       Password:



  After a successful login, the following information is given to us:



       Remote system type is UNIX.
       Using binary mode to transfer files.
       ftp>



  3.3.  File transfer types

  After you log in to an ftp site, ftp will print out the file transfer
  type. In our case, it is binary. Binary mode transfers the files, bit
  by bit, as they are on the FTP server. Ascii mode, however, will
  download the text directly. You can type ascii or binary to switch
  between the types.


  You want to download the kernel source, so you leave the file transfer
  type at binary. The binary type is also what you would use for any
  non-text files -- such as graphic images, zip/gzip archives,
  executable programs, etc. If in doubt, use binary mode.



  3.4.  Navigating and listing directories

  You do an ls to see a list of the files. The ls command on ftp servers
  is executed on the remote server, so the command line options that you
  can use with it vary from server to server. The most common options
  are generally available, check the manpage for ls for details.



       ftp> ls
       200 PORT command successful.
       150 Opening ASCII mode data connection for /bin/ls.
       total 33590
       -r--r--r--   1 root     other    34348506 Dec 03 03:53 IAFA-LISTINGS
       lrwxrwxrwx   1 root     other           7 Jul 15  1997 README -> WELCOME
       -rw-r--r--   1 root     other         890 Nov 15 13:11 WELCOME
       dr-xr-xr-x   2 root     other         512 Jul 15  1997 bin
       dr-xr-xr-x   2 root     other         512 Jul 15  1997 dev
       dr-xr-xr-x   2 root     other         512 Jul 18  1997 etc
       drwxrwxrwx  11 ftp      20           4608 Nov 28 16:00 incoming
       lrwxrwxrwx   1 root     other          13 Jun 04  1998 ls-lR -> IAFA-LISTINGS
       dr-xr-xr-x  17 root     root          512 Jun 08 11:43 pub
       dr-xr-xr-x   3 root     other         512 Jul 15  1997 unc
       dr-xr-xr-x   5 root     other         512 Jul 15  1997 usr
       226 Transfer complete.



  If the ls command lists so many files that they scroll off the top of
  the screen, you can use Shift-PageUp to scroll up. This works in Linux
  console mode as well as in xterm or rxvt.


  On public FTP archives, the downloadable resources are usually held in
  the /pub directory. In this example, you already know that the kernel
  sources are in the directory /pub/Linux/kernel, so you type the
  following to get into that directory:



       ftp> cd pub/Linux/kernel
       250-README for kernel
       250-
       250-What you'll find here: kernel sources and patches
       250-
       250-
       250 CWD command successful.

  The messages you see, which begin with "250", are information messages
  sent by the server. In this case, the ftp server is configured to
  automatically send you the README file when you cd into the directory.


  3.5.  Downloading and uploading files

  Now, after doing another ls, you see that you want to cd into the v2.2
  directory. You do yet another ls, and find the file you want to
  download. It is linux-2.2.13.tar.gz. So you type this:



       ftp> get linux-2.2.13.tar.gz
       local: linux-2.2.13.tar.gz remote: linux-2.2.13.tar.gz
       200 PORT command successful.
       150 Opening BINARY mode data connection for linux-2.2.13.tar.gz (15079540
       bytes).



  The ftp program has started saving the remote file linux-2.2.13.tar.gz
  as the local file linux-2.2.13.tar.gz.


  If you wanted to save it as the local file foo.tar.gz, you could have
  specified it like this:



       ftp> get linux-2.2.13.tar.gz foo.tar.gz
       local: foo.tar.gz remote: linux-2.2.13.tar.gz
       200 PORT command successful.
       150 Opening BINARY mode data connection for linux-2.2.13.tar.gz (15079540
       bytes).



  If you want to download more than one file at a time, you'll have to
  use the mget (multiple get) command. You can use mget together with a
  space-delimited list of filenames you want to download, or you can use
  wildcards with the mget command. For example:



       ftp> mget linux*



  Would get all files starting with the string "linux". Normally, mget
  will prompt you for each file before it downloads it. You can toggle
  this by using the prompt command.


  Now let's say you've written a piece of software, and you want to
  upload it to MetaLab to be included in their Linux software archive.
  First, you'd change to the /incoming directory (most public FTP
  servers have a directory, usually called incoming or uploads, where
  files can be uploaded), then you'd use the put command:

       ftp> cd /incoming
       ftp> put foo.tar.gz
       local: foo.tar.gz remote: foo.tar.gz
       200 PORT command successful.
       150 Opening BINARY mode data connection for foo.tar.gz.
       226 Transfer complete.
       10257 bytes sent in 0.00316 secs (3.2e+03 Kbytes/sec)



  The put command works the same way as the get command, so you can use
  mput to upload multiple files at the same time. You can also upload a
  local file with a different filename on the server by specifying the
  remote filename and/or pathname as an argument.


  What if the file foo.tar.gz is not in your current local directory
  when you try to upload it? You can switch local directories by using
  the lcd (local change directory) command:



       ftp> lcd /home/foo/
       Local directory now /home/foo



  3.6.  Running shell commands

  The ftp client supports using the bang (!) to run local commands. For
  example, to get a listing of files in your current local directory, do
  this:



       ftp> !ls



  The way this works is that ftp calls the shell (specified in the
  $SHELL environment variable), and it is the shell which runs ls. Thus,
  you can run any command-line which works with your shell simply by
  prepending "!" to it (the default shell in most Linux distributions is
  bash, the Bourne Again SHell). Please note that !cd does not work as
  you would expect, this is why the lcd command exists.


  3.7.  Hash marks and tick

  Wouldn't it be nice if you could watch the progress while you're
  downloading a file with ftp? You can use the hash command to print out
  hash marks as you download a file:



       ftp> hash
       Hash mark printing on (1024 bytes/hash mark).



  As you can tell, ftp will print a hash mark for every 1024 bytes of
  data you download.


  There is also a tick option.



       ftp> tick
       Tick counter printing on (10240 bytes/tick increment).

       This will print something to this effect as you download a file:

       Bytes transferred: 11680



  3.8.  Other ftp commands

  There are many other ftp commands. If you have the permissions to do
  so (which you should, if you are connected to your own private shell
  account), you can make a directory on the remote server using the
  mkdir command. You can remove a file on the remote server using the
  delete command, or rmdir to remove a directory. You can also change
  file permissions using the chmod command.


  For more elaborate information on using ftp, please see the online
  help in the ftp program (accessible by typing help with no arguments
  for a list of commands, or help <commandname> for specific help on a
  command). You can also read the Unix man page for ftp by typing man
  ftp at your command prompt.


  4.  Console FTP clients

  The original ftp program was the original ftp client, and it is a good
  investment to learn it. It's the only ftp client that you can be
  certain is available on most systems (even Win32 comes with the ftp
  command, albeit an archaic, braindead version of it).


  There are many other console-mode (text-only) ftp clients available.
  The listing here is by no means comprehensive, but includes the most
  popular ones. Search at FreshMeat to find more.



  4.1.  NcFTP

  NcFTP is the all-time favorite ftp client of many Unix users. It comes
  bundled with most Linux distributions, and offers many advanced
  features such as tab completion and bookmarks. Version 2 of NcFTP had
  a curses based full-screen mode. This was done away with in Version 3
  (now in beta).


  It's not 100% compatible with the commands that standard ftp uses. For
  example, get and put in NcFTP act like mget and mput do in standard
  ftp. So if you want to save a remote file as a different local
  filename, you'd have to do get -z remotename localname. Thankfully,
  NcFTP has a nice online help system to assist you in learning the
  commands.
  You can get the latest version of NcFTP at .


  4.2.  lukemftp

  A port of the NetBSD FTP client to other systems, lukemftp derives its
  name from the author of most of the enhanced features, which include:
  command-line editing, command-line fetches of FTP and HTTP URLs
  (including via proxies), context-sensitive word completion, dynamic
  progress bar, IPv6 support, modification time preservation, paging of
  local and remote files, passive mode support (with fallback to active
  mode), SOCKS support, TIS FWTK gate-ftp server support, and transfer
  rate throttling.


  I highly recommend lukemftp to users who don't want to change to
  anything drastically different from the standard ftp client, but want
  more advanced features.


  You can get the latest version of lukemftp at .


  4.3.  lftp

  lftp is a sophisticated command line based FTP client. Like bash, it
  has job control. It uses the GNU readline library for input, so you
  have command line completion and editing. lftp also has bookmarks,
  mirroring support, and can transfer several files in parellel.


  You can get the latest version of lftp at .


  Debian packages are available at .


  4.4.  cftp

  Comfortable FTP (cftp) is a full screen mode client. What it lacks in
  features, it makes up for in ease of use. You browse through the
  directories using the arrow keys and enter.


  You should be able to get the latest version of cftp at .


  4.5.  yafc

  Yafc is a very nice ftp client, with features including directory
  cache, remote filename completion, aliases, colorized ls, recursive
  get/put/ls/rm, nohup mode transfers, tagging (queueing), multiple
  connections, proxy support and more. It has support for Kerberos4
  authentication.


  You can get the latest version of yafc from .


  Debian packages are available at .


  Redhat packages are available at .



  5.  X Window FTP clients

  There are several graphical FTP clients designed to run on the X
  Window system. These clients offer ease of use for users who are used
  to graphical environments, and sometimes offer versatile options that
  would be hard to implement in a text-based ftp client.


  5.1.  gFTP

  gFTP is an FTP client for X Windows written using Gtk. The interface
  has some similarities to the popular WS_FTP software commonly used on
  a certain unstable operating system.


  gFTP features simultaneous downloads, resuming of interrupted file
  transfers, file transfer queues, downloading of entire directories,
  ftp proxy support, remote directory caching, passive and non-passive
  file transfers, drag-n-drop support, a very nice connection manager
  and more.


  If you are running Red Hat Linux and have the GNOME desktop installed,
  then you probably already have gFTP. If not, you can download gFTP
  from its homepage at .


  5.2.  WXftp

  WXftp is an FTP client for the X Window System designed to be used
  mainly on Linux workstations. It is written using the WXWindows
  toolkit, so it can be compiled to use either Motif or GTK+


  It includes an intuitive user interface (much like WS_FTP), a session
  manager, on-line help, a progress bar, and more


  Check out WXftp's homepage at .


  5.3.  LLNL XDIR and XFTP

  LLNL XFTP was one of the first graphical FTP clients for Linux. It
  supports FXP (file transfer between two remote hosts), and has a Motif
  based interface.


  More information is available at .


  5.4.  guiftp

  Guiftp is a simple ftp client written with the GTK+ toolkit. It's good
  if you don't need many features and want a simple, clean look.


  Guiftp's homepage is at .



  6.  FTP Servers



  6.1.  How an FTP Server works

  A traditional FTP server is executed from inetd (the internet
  superserver daemon). The standard FTP port is port 21. When a user
  tries to log in, the FTP server uses a standard system call to check
  the user name and password against the entries in the system password
  file, or the NIS tables if you are using NIS. If the login is correct,
  the user is given access to the system.


  Anonymous FTP works differently. The user logs in with either the
  anonymous or the ftp username (this can be defined in the config
  file). He is then given access to a directory tree that has been
  chroot()'ed. This ensures that the user can not gain access to
  directory trees he is not authorized for. The chrooted directory tree
  usually contains a mock filesystem, with bin/, etc/, and lib/
  directories. The files for download are usually put in the pub/
  directory.


  The reason for a mock filesystem in an anonymous FTP tree is that the
  FTP daemon runs external commands for ls requests. You can also place
  additional programs in the bin directory, and a user can run them with
  the SITE command in his ftp client. For example, Red Hat's FTP
  includes the RPM command (for users to query RPM packages on the
  site).


  Some FTP servers work differently. For example, some will allow user
  accounts to be set up independant of the system-wide password file
  (FTP-only accounts). Some servers (ProFTPD and NcFTPd for instance)
  have built-in ls commands and do not need a special directory tree
  within the chroot structure. Other ftp servers stray altogether from
  the standard ftp concept. FTP4ALL, for example, does not use system
  passwords at all. It uses it's own user and group file, and has
  features such as upload/download ratio and customizable server
  messages.


  6.2.  Help with FTP Servers

  6.2.1.  WU-FTPD

  WU-FTPD is the ftp daemon included with many Linux distributions,
  including Red Hat and Caldera. You can learn more about WU-FTPD at .


  The WU-FTPD FAQ can be found on the web at .


  6.2.2.  ProFTPD

  ProFTPD is a powerful FTP server that includes Apache-style
  configuration, extensive support for virtual hosts, and internal ls.


  A complete command reference and downloads can be found at



  Linux simple fax printer server mini-HOWTO (faxsrv-mini-HOWTO)
  Erez Strauss <erez@newplaces.com> <mailto:Erez Strauss
  <erez@newplaces.com>>
  v1.0, 8 November 1997

  No warranties. Comments are always welcome.  This document describes
  in details one of the simplest ways to setup fax server on your Linux
  system. The fax is available to the users on the local host and to
  network users.

  1.  Introduction

  To get a working printer/fax on the linux machine you should have some
  software and fax modem.

  The Printing software will be using the fax software as a print
  filter.  The efax will find the fax number from the print Job number
  and will send the fax.  The efax software was written be Ed Casas
  <edc@cce.com>.

  The rest of the document is build as Q&A.

  2.  Questions & Answers

  2.1.  What is a fax printer server ?

  A fax printer server is a setup of few programs: efax, and the print
  server, in such a way that sending a fax from the computer is as
  simple as sending printout to a printer.

  2.2.  How to set it up ?

  Setting efax as fax print server includes few problems As I worked it
  out few times, I decided to collect this wisdom in this small mini-
  HOWTO, comments are welcome at <erez@newplaces.com>.  I describe them
  here and the solutions, and all the instruction in short steps:

  2.2.1.  The efax Software

  make sure you have the efax package.

  On RPM based system use the command 'rpm -qv efax'.

  You can get the efax sources in tar.gz format from sunsite:
  ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/efax08a.tar.gz or
  binary rpm package:
  ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/efax-0.8a-3.i386.rpm

  2.2.2.  The printcap entry.

  The efax documentation is missing the :  at the end of the printcap
  entry.

  Solution: Add the following /etc/printcap entry:

       fax:\
               :lp=/dev/null:\
               :sd=/var/spool/fax:\
               :if=/usr/bin/faxlpr:

  2.2.3.  The fax command

  Use hard link and not symbolic link to the fax command.

  Run the command:

       ln /usr/bin/fax /usr/bin/faxlpr

  2.2.4.  The /usr/bin/fax file.

  Edit the /usr/bin/fax to your preferences:

  choose the right Fax Class for your modem:

       CLASS=2.0

  Set the FROM="your international phone number" field

       NAME="Your Name"

  Add the line for conversion of international phone number to local for
  example in Israel you would use:

       TELCVT='sed -e s/+972/0/ -e s/+/00/'  # Israel

  There is a problem in the file in line 586, change the cfile=... with
  the following two lines:

       cfile=`/usr/bin/tail -1 lock`
       cfile=`cat $cfile`

  at lines 586,587 there shouldn't be '-' signs the lines are:

       0) echo "$l" | mail -s "fax to $num succeeded" $user@$host ;;
       *) echo "$l" | mail -s "fax to $num failed   " $user@$host ;;

  2.2.5.  The /var/spool/fax directory.

  create the directory /var/spool/fax

       mkdir /var/spool/fax
       chmod 777 /var/spool/fax

  2.2.6.  The lock file.

  The lock file (/var/spool/fax/lock) is being created with incorrect
  permissions, use the following command to set it correctly:

       touch /var/spool/fax/lock ; chmod 644 /var/spool/fax/lock

  2.2.7.  The /dev/modem special file.

  The efax program is expecting real device file at the /dev/modem and
  will not work with symbolic link, so create a device file with the
  same major and minor number as the /dev/cua? the is connected to the
  modem. The file should have the rw-rw-rw- mode to enable any user to
  use the fax software.

       ls -lL /dev/modem
       rm /dev/modem
       mknod /dev/modem c Mj Mi
       chmod 666 /dev/modem

  Mj is 5, and Mi is 64 for the cua0, 65 for cua1 and so on.  For
  example (for cua1):

       mknod /dev/modem c 5 65

  2.2.8.  The /var/lock directory.

  change the mode at the /var/lock directory

       chmod 1777 /var/lock

  2.3.  How do I use it, for the server ?

  You should use the fax printer using the -P option and the -J option
  with the fax number.

  use one of the following lpr commands:

        lpr -Pfax -J <Fax-Number> [file-names]
        any command | lpr -Pfax -J <Fax-Number>

  2.4.  Where do I specify the target Fax number ?

  After the -J option.

  2.5.  How do I use it from other Unixes on the net ?

  Add the following entry into the /etc/printcap file and the client
  Linux systems, create the spool directory, and so on ...

       fax:\
               :sd=/var/spool/fax:\
               :mx#0:\
               :sh:\
               :rm=host.domain:\
               :rp=fax:

  add the name of the client hosts into the /etc/hosts.lpd on the fax
  server machine.

  use it as before.

  Note:

  The header string that efax adds to the fax pages is not effected by
  the user name that sends the fax. (can be updated).

  2.6.  Caldera, LPRng users

  The LPRng printing management software is using a different method to
  handle the control file.

  Thanks to Luca Montecchiani <m.luca@usa.net>, who found the problem
  and the solution.  Here is an update to the /usr/bin/fax file. The
  following line replace the two simple cfile=... lines at lines 586,587

  # Modified to work also with the LPRng package
  # Luca Montecchiani (08/11/97 m.luca@usa.net)
  if [ !-z "$CONTROL_FILE" ]
      then
          cfile=`cat tail -1 lock`
          cfile=`cat $cfile`
      else
          cfile=$CONTROL_FILE
  fi

  3.  Latest version, Contacting the author.

  The latest version of this file can be accessed through the world wide
  web using URLs

       http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.sgml
       http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.html
       http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.txt
       http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.info

  You can contact me

       Erez Strauss
       erez@newplaces.com
       http://www.newplaces.com/linux/
       http://www.newplaces.com/
       Phone: +972 52 739737
       Fax:  +972 9 954 3034

  Firewall Piercing mini-HOWTO
  Franois-Ren Rideau, fare@tunes.org
  v0.3b, 27 November 1998

  Directions for using ppp over telnet to do network stuff transparently
  through an Internet firewall.
  ______________________________________________________________________

  Table of Contents


  1. Stuff

     1.1 DISCLAIMER
     1.2 Legal Blurp
     1.3 Credits

  2. Introduction

     2.1 Foreword
     2.2 Security problems
     2.3 Other requirements
     2.4 Downloading software

  3. Understanding the problem

     3.1 Giving names to things
     3.2 The problem
     3.3 Additional difficulty

  4. The solution

     4.1 Principle
     4.2 fwprc
     4.3 .fwprcrc

  5. Reverse piercing

     5.1 Rationale
     5.2 Getting the triggering mail

  6. Final notes

     6.1 Other settings
     6.2 HOWTO maintenance
     6.3 Extra copy of IMPORTANT DISCLAIMER --- BELIEVE IT!!!


  ______________________________________________________________________

  1.  Stuff

  1.1.  DISCLAIMER

  READ THIS IMPORTANT SECTION !!!

  I hereby disclaim all responsibility for this hack.  If it backfires
  on you in any way whatsoever, that's the breaks. Not my fault.  If you
  don't understand the risks inherent in doing this, don't do it.  If
  you use this hack and it allows vicious vandals to break into your
  company's computers and costs you your job and your company millions
  of dollars, well that's just tough nuggies.  Don't come crying to me.


  1.2.  Legal Blurp

  Copyright  1998 by Franois-Ren Rideau.

  This document is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version.

  1.3.  Credits

  Even though I rewrote most everything but the disclaimers, I'm
  indebted to Barak Pearlmutter  <mailto:bap@cs.unm.edu> for his Term-
  Firewall mini-HOWTO: I think there was a necessity for a mini-HOWTO
  about piercing firewalls, and despite its shortcomings, his mini-HOWTO
  was a model and an encouragement.

  2.  Introduction

  2.1.  Foreword

  Because system administrators and users have different constraints and
  proficiencies, it so happens that a user may find himself behind a
  firewall, that he may cross, but only in awkward ways.  This mini-
  HOWTO explains a generic and portable way to use standard internet
  tools seamlessly across such firewalls, by the use of an IP emulator
  over a telnet session.

  It is freely inspired by the Term-Firewall mini-HOWTO by Barak
  Pearlmutter  <mailto:bap@cs.unm.edu>, which relies on an ancient and
  no-more-supported program named Term (yet a great program at its
  time), as well as on peculiarities of a not-so-standard telnet
  implementation, that is, many obsolete and non-portable facts.

  2.2.  Security problems

  Of course, if your sysadm has setup a firewall, s/he might have a good
  reason, and you may have signed an agreement to not circumvent it.  On
  the other hand, the fact that you can telnet outside (which is a
  requisite for the presented hacks to work) means that you are allowed
  to access external systems, and the fact that you can log into a
  particular external system somehow means you're allowed to do it, too.

  So this is all a matter of conveniently using legal holes in a
  firewall, and allow generic programs to work from there with generic
  protocols, as opposed to requiring special or modified (and
  recompiled) programs going through lots of special-purpose proxies
  that be misconfigured by an uncaring or incompetent sysadm, or to
  installing lots of special-purpose converters to access each of your
  usual services (like e-mail) through ways supported by the firewall
  (like the web).

  Moreover, the use of a user-level IP emulator such as SLiRP should
  still prevent external attackers from piercing the firewall back in
  the other way, unless explicitly permitted by you (or they are clever
  and wicked, and root or otherwise able to spy you on the remote host).


  All in all, the presented hack should be relatively safe.  However, it
  all depends on the particular circumstances in which you set things
  up, and I can give no guarantee about this hack.  Lots of things are
  intrinsically unsafe about any internet connection, be it with this
  hack or not, so don't you assume anything is safe unless you have good
  reasons, and/or use some kind of encryption all the way.

  To sum it up, don't use this hack unless you know what you're doing.
  Re-read the disclaimer above.

  2.3.  Other requirements

  It is assumed that you know what you're doing; that you know about
  setting up a network connection; that you have shell accounts on both
  sides of the firewall; that you can somehow telnet (or ssh, or
  equivalent) from one account to the other; that you can run an IP
  emulator on both shell accounts; that you have programs able to use
  the IP connection emulated on their side.  Note that any program can
  use the connection, in case the local emulator is pppd talking to the
  Linux kernel; other emulators, like Term, need recompilation and
  linking to a special library.

  Talking about IP emulators, pppd can be found in any good Linux
  distribution or ftp site; so can SLiRP.  If your remote shell account
  is user-level only, you can use SLiRP to connect.

  2.4.  Downloading software

  Most described software should be available from your standard
  distribution, possibly among contrib's; at least all but the two small
  last ones are available in as rpm packages.  In case you want to fetch
  the latest sources or binaries (after all, one of the ends of the
  connection may not be running linux), use the addresses below:

    SLiRP can be found at <http://blitzen.canberra.edu.au/slirp> and/or
     <ftp://www.ibc.wustl.edu/pub/slirp_bin/>.

    zsh can be found at <http://www.peak.org/zsh/>.

    ppp can be found at <ftp://cs.anu.edu.au/pub/software/ppp/>.

    fwprc and cotty can be found at
     <http://www.tunes.org/~fare/files/fwprc/>.

  3.  Understanding the problem

  Understanding a problem is the first half of the path to solving it.


  3.1.  Giving names to things

  If you want this hack to work for you, you'll have to get an idea of
  how it works, so that in case anything breaks, you know where to look
  for.

  The first step toward understanding the problem is to give a name to
  relevant concepts.

  So we'll herein call "local" the machine that initiates the
  connection, as well as programs and files on that machine; conversely,
  we'll call "remote" what's on the other side of the connection.

  3.2.  The problem

  The goal is to connect the input and output of a local IP emulator to
  the output and input respectively of a remote IP emulator.

  Only the communication channels with which IP emulators interact are
  either direct devices (in the usual case of pppd), or the "current
  tty".  The previous case obviously does not happen with telnet
  sessions.  The latter is tricky, because when you launch the local
  emulator from the command line, the "current tty" is linked to the
  command-line user, not to a remote session; also, should we open a new
  session (local or remote) on a new terminal, we must synchronize the
  launching and connection of IP emulators on both sides, least one
  session's garbage output is going to be executed as commands on the
  other session, which would recursively produce more garbage.


  3.3.  Additional difficulty

  To get the best ease of use, the local IP emulator has to provide IP
  to kernel networking, hence be pppd.  However, pppd is dumb enough to
  only accept having data through /dev or thru the current tty; it must
  be a tty, not a pair of pipe (which would be the obvious design).
  This is fine for the remote pppd if any, as it can use the telnet
  session's tty; but for the local pppd, it sucks, as it can't launch
  the telnet session to connect to; hence, there must some kind of
  wrapper around it.

  Telnet behaves almost correctly with a pair of pipe, except that it
  will still insist on doing ioctl's to the current tty, with which it
  will interfere; using telnet without a tty also causes race
  conditions, so that the whole connection will fail on "slow" computers
  (fwprc 0.1 worked perfectly on a P/MMX 233, one time out of 6 on a
  6x86-P200+, and never on a 486dx2/66).

  [Note: if I find the sucker (probably a MULTICS guy, though there must
  have been UNIX people stupid enough to copy the idea) who invented the
  principle of "tty" devices by which you read and write from a "same"
  pseudo-file, instead of having clean pairs of pipes, I strangle him!]

  4.  The solution

  4.1.  Principle

  The firewall-piercing program, fwprc, will use a "tty proxy", cotty,
  that opens two pseudo-tty devices, launches some command on each of
  those devices' slaves, and stubbornly copies every character that one
  outputs to the tty that serves as input of the other command.  One
  command will be telnet connection to remote site, and the other will
  be the local pppd.  pppd can then open and control the telnet session
  with a chat script as usual.


  4.2.  fwprc

  I wrote a very well self-documented script to pierce firewalls, fwprc,
  available from my site  <http://www.tunes.org/~fare/files/fwprc/>,
  together with cotty (which is required by fwprc 0.2 and later).  At
  the time of my writing these lines, latest versions are fwprc 0.3a and
  cotty 0.3a.

  The name "fwprc" is voluntarily made unreadable and unpronounceable,
  so that it will confuse the incompetent paranoid sysadm who might be
  the cause of the firewall that annoys you (of course, there can be
  legitimate firewalls, too, and even indispensible ones; security is
  all a matter of correct configuration).  If you must read it aloud,
  choose the worst way you can imagine.

  CONTEST! CONTEST! Send me a .au audio file with a digital audio
  recording of how you pronounce "fwprc".  The worst entry will win a
  free upgrade and his name on the fwprc 1.0 page!

  I tested the program in several settings, by configuring it through
  resource files.  But of course, by Murphy's law, it will break for
  you.  Feel free to contribute enhancements that will make life easier
  to other people who'll configure it after you.

  4.3.  .fwprcrc

  fwprc can be customized through a file .fwprcrc meant to be the same
  on both sides of the firewall.  Having several alternate
  configurations to choose from is sure possible (for instance, I do
  it), and is left as an exercise to the reader.

  To begin with, copy the appropriate section of fwprc (the previous to
  last) into a file named .fwprcrc in your home directory.  Then replace
  variable values with stuff that fits your configuration.  Finally,
  copy to the other host, and test.

  Default behavior is to use pppd locally, and slirp remotely.  To
  modify that, you can redefine the appropriate function in your
  .fwprcrc with such a line as:

       remote_IP_emu () { remote_pppd }


  Note that SLiRP is safer than pppd, and easier to have access to,
  since it does not require being root on the remote machine.  Anoter
  safe feature is that it will drop packets not directly coming from the
  connected machine (which feature becomes a misfeature if you attempt
  to route a subnetwork onto it with masquerading).  The basic
  functionality in SLiRP works quite well, but I've found advertised
  pluses (like run-time controllability) to be deficient; of course,
  since it is free software, feel free to hack the source so as to
  actually implement whichever feature you need.

  5.  Reverse piercing

  5.1.  Rationale

  Sometimes, only one side of the firewall can launch telnet sessions
  into the other side; however, some means of communication is possible
  (typically, through e-mail).  Piercing the firewall is still possible,
  by triggering with whatever messaging capability is available a telnet
  connection from the ``right'' side of the firewall to the other.


  fwprc includes code to trigger such connections from a PGP-
  authentified e-mail message; all you need is add fwprc as a
  procmail(1) filter to messages using the protocol, (instructions
  included in fwprc itself).  Note however, that if you are to launch
  pppd with appropriate priviledges, you might need create your own suid
  wrapper to become root.  Instructions enclosed in fwprc.

  Also, authentified trigger does not remotely mean secure connection.
  You should really use ssh (perhaps over telnet) for secure
  connections.  And then, beware of what happens between the triggering
  of a telnet connection, and ssh taking over that connection.
  Contribution in that direction welcome.


  5.2.  Getting the triggering mail

  If you are firewalled, your mail may as well be in a central server
  that doesn't do procmail filtering or allow telnet sessions.  No
  problem! You can use fetchmail(1) to run in daemon mode to poll and
  get mail to your client linux system, and/or add a cron-job to
  automatically poll for mail every 1-5 minutes.  fetchmail will forward
  mail to a local address through sendmail(8), which itself will have
  been configured to use procmail(1) for delivery.  Note that if you run
  fetchmail(1) as a background daemon, it will lock away any other
  fetchmail that you'd like to run only at other times, like when you
  open a fwprc; of course, if you can also run a fetchmail daemon as a
  fake user.  Too frequent a poll won't be nice to either the server or
  your host.  Too unfrequent a poll means you'll have to wait before the
  message gets read and the reverse connection gets established.  I use
  two-minute poll frequency.

  6.  Final notes

  6.1.  Other settings

  There are other kinds of firewalls than those that allow for telnet
  connections.  As long as a continuous flow of packets may go through a
  firewall, and transmit information both ways, it is possible to pierce
  it; only the price of writing the piercer may be higher or lower.

  In a very easy case, you can just launch ssh over a pty, and do some
  pppd in the slave tty.  cotty 0.3a should be able to do it, but
  nobody's modified fwprc to take it into account yet.  May be tonight's
  exercise for you.  You may even want to do it without an adverse
  firewall, just so as to build a secure ``VPN'' (Virtual Private
  Network).  See the VPN mini-HOWTO about this.

  If you need cross a 7-bit line, you'll want to use SLIP instead of
  PPP.  I never tried, because lines are more or less 8-bit clean these
  days, but it shouldn't be difficult.

  Now, if the only way through the firewall is a WWW proxy (usually, a
  minimum for an internet-connected network), you might want to write a
  daemon that buffers data in and out, and sends it during in HTTP
  connections, achieving some telnet-over-HTTP over which to run fwprc.
  It might be slow and not very responsive, but still good enough to use
  fetchmail(1), suck(1), and other non-interactive programs.

  If you want more performance, or if the only thing that goes through
  unfiltered is some wierder thing even (DNS queries, ICMP packets,
  whatever), then you're in the very hard case where you'll have to re-
  hack a wierd IP stack, using (for instance) the Fox project's packet-
  protocol functors.  You'll then achieve some direct IP-over-HTTP, IP-
  over-DNS, IP-over-ICMP, or such, which requires not only a complex
  protocol, but also an interface to an OS kernel, both of which are
  costly to implement.

  By the way, if you use some Firewall-piercing HTTP daemon, don't
  forget to have it serve fake pages, so as to mislead suspicious
  adverse firewall administrators.

  6.2.  HOWTO maintenance

  I felt it was necessary to write it, but I don't have that much time
  for that, so this mini-HOWTO is very rough.  So will it stay, until I
  get enough feedback so as to know what sections to enhance.  Feedback
  welcome. Help welcome. mini-HOWTO maintenance take-over welcome.

  In any case, the above sections have shown many problems whose
  solution is just a matter of someone (you?)  spending some time (or
  money, by hiring someone else) to sit down and write it: nothing
  conceptually complicated, though the details might be burdensome or
  tricky.

  Do not hesitate to contribute more problems, and hopefully more
  solutions, to this mini-HOWTO.

  6.3.  Extra copy of IMPORTANT DISCLAIMER --- BELIEVE IT!!!


       I hereby disclaim all responsibility for this hack.  If it
       backfires on you in any way whatsoever, that's the breaks.
       Not my fault.  If you don't understand the risks inherent in
       doing this, don't do it.  If you use this hack and it allows
       vicious vandals to break into your company's computers and
       costs you your job and your company millions of dollars,
       well that's just tough nuggies.  Don't come crying to me.


    This document is not subject to copyright. See section 9 below.
    Version 1.0: 13 November 1997


                           THE GIS-GRASS MINI-HOWTO


    by David A. Hastings
    U. S. Department of Commerce
    National Oceanic and Atmospheric Administration
    National Geophysical Data Center
    Boulder CO 80303
    dah@ngdc.noaa.gov



   _Summary:_ This document describes how to acquire, install and
   configure a powerful scientific public-domain Geographic Information
   System (GIS): the Geographic Resources Analysis Support System
   (GRASS). It provides information on other resources for learning more
   about GRASS, GIS in general, for acquiring data, etc.

   This document also encourages the Linux community to consider
   enhancing this software as a major application of UNIX/Linux. ("When
   will Linux become bundled with public domain or Linux Public License
   'killer aps'"?) For more on this topic, see Section 8 below.

Contents

    1. _What is a GIS?
   What is GRASS?
   A Brief History of GRASS
         1. A Re-Invogorated GRASS Management Model
         2. Continued Assessment of Future GRASS Management
   System Requirements for GRASS
   How to Acquire GRASS
   How to Get GRASS Running on Your Linux-based Computer.
   Web-based Support for GRASS (and for GIS Matters in General)
   The Future of GRASS?
   Copyright Notice, and Notice on Support of this Document
   References_



   _Appendix A: Acquisition/Installation of GRASS4.1.3 Binaries
   Appendix B: Acquisition/Installation of GRASS4.1.5 Binaries
   Appendix C: Acquisition/Compilation of GRASS 4.1.x and 4.2 Source Code

   Appendix D: If you plan to enhance any part of GRASS, read this first!

   Appendix E: Example Linux versions of some critical GRASS files. _
     _________________________________________________________________

  1. What is a GIS?



   There are many ways to describe a Geographic Information System. Here
   are three working definitions (from David A. Hastings, 1992,
   Geographic Information Systems: A Tool for Geoscience Analysis and
   Interpretation):
    1. (The minimal definition): A GIS is a hardware/software system for
       the storage, management, and (with hardcopy or screen graphic)
       selective retrieval capabilities of georeferenced data.
       Definitions like this one are often used by vendors and users of
       vector-only GIS, whose objective is sophisticated management and
       output of cartographic data.
    2. (A parallel definition): A GIS is a hardware/software system for
       managing and displaying spatial data. It is similar to a
       traditional Data Base Management System, where we now think in
       _spatial_ rather than in tabular terms, and where the "report
       writer" now allows output of maps as well as of tables and
       numbers. Thus we can consider a GIS a "spatial DBMS" as opposed to
       traditional "tabular DBMSs." Few people use this definition, but
       it might help to explain GIS to a DBMS user.
    3. (A more aggressive definition): A GIS is a system of hardware,
       software, and data that facilitates the development, enhancement,
       modeling, and display of multivariate (e.g. multilayered)
       spatially referenced data. It performs some analytical functions
       itself, and by its analysis, selective retrieval and display
       capabilities, helps the user to further analyze and interpret the
       data. Properly configured, the GIS can model (e.g. synthetically
       recreate) a feature or phenomenon as a function of other features
       or phenomena which may be related - where all features or
       phenomena are represented (characterized) by spatial and related
       tabular data. The analytical objectives described here are
       sometimes controversial - and often given lip service by
       cartographic GIS specialists who have not yet seen what can be
       accomplished scientifically by a select few GISs that go beyond
       cartographic approaches.
    4. Another definition can be found at
       http://www.geo.ed.ac.uk/home/research/whatisgis.html at the
       University of Edinburgh

  2. What is GRASS?



   GRASS (Geographic Resources Analysis Support System) is a public
   domain raster based GIS, vector GIS, image processing system, and
   graphics production system. Created by the US Army Corps of Engineers,
   Constriction Engineering Research Laboratory (USA/CERL) and enhanced
   by many others, it is used extensively at government offices,
   universities and commercial organizations throughout the world. It is
   written mostly in C for various UNIX based machines. Linux is one of
   its more robust implementations.

   GRASS contains over 40 programs to render images on monitor and paper;
   over 60 raster manipulation programs; over 30 vector manipulation
   programs; nearly 30 multi-spectral image processing manipulation
   programs; 16 data management programs; and 6 point file management
   programs.

   GRASS' strengths lie in several fields. The simple user interface
   makes it an ideal platform for those learning about GIS for the first
   time. Users wishing to write their own code can do so by examining
   existing source code, interfacing with the documented GIS libraries,
   and by using the GRASS Programmers' Manual. This allows more
   sophisticated functionality to be fully integrated within GRASS.

   Other strengths include GRASS' pioneering of mixed resolutions in a
   data base, mixed geographic coverage areas in a data base, raster
   image compression techniques via run-length encoding and
   reclassification lookup tables, GRASS' rescaling of display images on
   the fly to fill the display screen, plus its fundamental design
   criterion of powerful computer-assisted scientific analysis of
   environmental issues (as opposed to merely going for intricate
   cartographic output of relatively simple processes).

   GRASS is usually supplied as free, non-copyright source code to be
   compiled on host machines. Some compiled binaries are also easily
   obtainable at no cost via the Internet. It runs on a variety of UNIX
   platforms.

   (Copied from Project Assist Intro to
   GRASS:http://www.geog.le.ac.uk/assist/grass)

  3. A Brief History of GRASS



   In the early 1980s the U. S. Army Corps of Engineers' Construction
   Engineering Research Laboratory (USA/CERL) in Champaign, Illinois,
   began to explore the possibilities of using Geographic Information
   Systems to conduct environmental research, assessments, monitoring and
   management of lands under the stewardship of the U. S. Department of
   Defense. Part of the motivation for this action was new responsibility
   for the environment encoded into the National Environmental Policy Act
   of the late 1970s.

   Bill Goran of USA/CERL conducted a survey of available GISs, assuming
   that he could find several systems capable of environmental analysis,
   from which he could select one or more to recommend for use by CERL
   and perhaps others in the Department of Defense. However, he was
   surprised to find no GIS that satisfied his needs. What started as a
   selection process turned into a design exercise for his own GIS
   development program.

   USA/CERL hired several programmers, and began by writing a hybrid
   raster-vector GIS for the VAX UNIX environment. This made the team one
   of the first to seriously develop GIS for UNIX. Though they still
   faced challenges with different versions of UNIX, they developed
   procedures of coding in ANSI standard UNIX, avoiding "tweaking" the
   code toward any particular vendor-specific flavor of UNIX.

   GRASS developed a programming style characterized by:
     * Use of UNIX libraries where possible, plus the creation of GRASS
       libraries for repeated GIS-specific acts such as opening raster
       files that might be compressed (by run-length encoding) or not.
     * The ability to handle both major GIS data types: raster and
       vector.
     * The favoring of raster data processing, as scientific analysis was
       easier to encode with raster (than for vector) data models.
     * The ability to handle raster grids of mixed grid sizes in the same
       data base. This was a departure from raster's image processing
       tradition of requiring identical (and perfectly registered) grid
       cell arrays in each and every data layer.
     * The ability to handle raster grids with different areas of
       coverage. Again, this was a departure from raster tradition of
       having all grids be identical in geographic coverage.
     * The ability to run-length encode raster data files, in order to
       greatly reduce file sizes of most files.
     * The separate structure of reclassification files. Such files
       merely contained a look-up table noting the previous and new
       classes. This is MUCH more compact than replicating the original
       grid with different numerical values. A reclassified file of a
       100x100 km square area of 10 metre grid cells would be a few
       hundred bytes, rather than 100 megabytes of uncompressed 8-bit
       raster data.
     * The acceptance of de-facto standard data models. While competitors
       created cumbersome (and in many cases secretive) data formats,
       GRASS accepted the de-facto standard Digital Line Graph vector
       format and unheaded binary raster grid format. GRASS later
       abandoned DLG as its internal vector file format, and let its
       raster format evolve. However, DLG and the unheaded binary raster
       grid are still routinely handled formats for GRASS, and its new
       formats are as open as its previous ones.
     * GRASS code was managed in several directories. Initial
       contributions were placed in the src.contrib directory. More solid
       code was moved to the src.alpha directory. After remaining in the
       src.alpha for one full release cycle, the code, with resultant bug
       fixes, moved to the most honorable level, the src directory.



   GRASS was overseen by three levels of oversight committees. USA/CERL
   kept the ultimate responsibility for GRASS. It implemented most GRASS
   development, and carried out the day-to-day management of GRASS
   testing and release. The GRASS Interagency Steering Committee (GIASC),
   comprised of other Federal agencies, met semi-annually to review
   development progress, and evaluate future directions for GRASS.
   (Academic and commercial participants in GRASS also attended GIASC
   meetings; only part of each meeting was "Federal-Agencies-only." GRASS
   eventually became nominally and officially a "product" of the GIASC,
   though everyone recognized USA/CERL's leadership role. The GRASS
   Military Steering Committee met periodically to review the progress of
   GRASS in serving its original intent: meeting the Department of
   Defense's needs to evaluate and manage the environment of military
   lands.

   The public interacted with CERL and GIASC through USA/CERL's GRASS
   Information Center. GRASS Beta testing was very widespread, and quite
   intensive for the leading users of GRASS. Several leading users, such
   as the National Park Service and the Soil Conservation Service,
   selected GRASS as its prime or only GIS. They made significant
   commitments to enhance and test GRASS, yet considered this investment
   well worth their while. They said that they had more influence over
   the direction of GRASS than they would over any known alternative
   system. They also felt that, despite their major efforts and expenses
   in supporting GRASS, they had a bargain in relevant power for the
   dollar.

   Several universities adopted GRASS as an important training and
   research environment. Many conducted short-courses for the public, in
   addition to using GRASS in their own curricula. Examples of such
   leading academic users of GRASS are Central Washington University, The
   University of Arkansas, Texas A & M University, The University of
   California at Berkeley, and Rutgers University.

   Though GRASS received some criticism (some say) for being so good and
   so public, it was also reputedly borrowed from liberally by some
   developers of other systems. Though the first group might have viewed
   it as unfair competition, the second group may have noted that it was
   not copyright, and was a valuable testbed for GIS concepts. GRASS
   received an award from the Urban and Regional Information Systems
   Association (URISA) for quality software in 1988.

   As CERL and GRASS evolved through the late 1980s and early 1990s, CERL
   attempted to cut overhead costs associated with supporting the public
   domain version. It created and initially funded the Open GRASS
   Foundation, in cooperation with several of the leading users of GRASS.
   The Open GRASS Foundation has since evolved into the Open GIS
   Consortium, which is aiming for more thorough interoperability at the
   data and user interface level, but appears not to be taking advantage
   of the major open GIS testbed (GRASS).

   In 1996 USA/CERL, just before beginning the beta testing for GRASS
   version 5.0, announced that it was formally withdrawing support to the
   public. USA/CERL announced agreements with several commercial GISs,
   and agreed to provide encouragement to commercialization of GRASS. One
   result of this is GRASSLANDS:http://www.las.com/grassland/, a
   commercial adaptation of much of GRASS. Another result is a migration
   of several former GRASS users to COTS (Commercial Off-The-Shelf) GISs.
   However, GRASS' anonymous ftp site contains many enhancements to the
   last full version 4.1 release of GRASS. Many organizations still use
   GRASS feeling that, despite the lack of a major release in five years,
   GRASS still leads the pack in many areas.

    3.1 A Re-Invogorated GRASS Management Model



   In late 1997, a group at Baylor University took the lead in developing
   a new Website for GRASS. This quickly developing Website contains
   GRASS 4.1 source code and Sun Solaris binaries, GRASS 4.1
   documentation, and an on- line manual. By November 1997 this site
   posted the first version of GRASS 4.2 source code and binaries
   currently for Sun Solaris) with Linux and Windows NT under
   consideration). GRASS 4.2 incorporates several enhancements from the
   CERL website, plus some of Baylor's own enhancements. Documentation
   for GRASS 4.2 is appearing; the group encourages cooperation in
   further development of GRASS, and is looking for partners. It hopes to
   use increased use of the World Wide Web in developing and managing
   GRASS. GRASS 5 development and compilation is underway. The site also
   links to the Blackland GRASS site at Texas A&M University, for those
   desiring very inexpensive access to GRASS for Windows 95.

    3.2 Continued Assessment of Future GRASS Management



   Note: An ad-hoc group (which includes myself) is exploring the basic
   issue of continued, reconfigured, yea perhaps increased, value of
   GRASS as a public test-bed for GIS technology. It is exploring
   shepherding the testing and release of GRASS5.0, and exploring
   possibilities for a more distributed management model for GRASS design
   and development. It is exploring the universe of public domain spatial
   data processing software (including geographic information and image
   processing systems), and perhaps tabular data base management systems.
   How can such knowledge be (1) optimized as an open, public test bed
   for such technology and (2) better used by the public? Might this
   involve a Linux management model, perhaps? See Section 8 for more
   discussion on this topic.

  4. System Requirements for GRASS



   Minimum requirements include:
     * 8 Mbytes of memory (of course, more is better..)
     * 100 Mbytes of free disk space
          + ~40 mb for executables,
          + ~40 mb for source code (which you can ignore if you merely
            install the Linux binaries)
          + ~? for data (the veritable bottomless pit can be filled with
            data, if you so choose)


   GRASS runs on Linux kernel versions as old as 1.2.13 (see more
   information in the appendices for various specific binaries).
   GRASS will run in text mode. However, for displays of data, you will
   need X. If you are still running a version of X, it will probably work
   with GRASS.

   If you find any other hardware/OS requirements that should be
   mentioned, please let me know!

  5. How to Acquire GRASS



   GRASS used to be available on tape from various companies that signed
   distribution agreements with USA/CERL. These companies usually
   supported specific platform environments, such as Masscomp, Sun, DEC,
   Hewlett Packard, IBM (risc), PC (running some flavor of UNIX), and
   Macintosh (running AUX). Until recently, the flavors of UNIX working
   on PCs generally were too low-end, or required too much added
   programming support (e.g. programming drivers for high-end graphics
   boards like the Number Nine boards of several years back) to be stable
   or complete. However, with robust systems like Linux, this problem is
   history. Similarly, few people acquire GRASS on tape, though a few do
   on CD-ROM.

   The main way to acquire GRASS is to get it via anonymous ftp from:

   _1. The new site at Baylor University:http://www.baylor.edu/~grass_

   As of the date of this version of the mini-HOWTO, Baylor has source
   code for GRASS 4.1 and 4.2, as well as Sun Solaris compiled binaries.
   Blackland GRASS for Windows 95/NT is linked to from this site. Baylor
   is considering its own Linux and Windows NT binaries, as well. You
   should be able to compile the Baylor source code under Linux yourself,
   using information in this mini-HOWTO.

   _2. The traditional site at USA/CERL:http://www.cecer.army.mil/grass_,
   or from mirrors cited at USA/CERL's website:

   The ftp location is:

   _moon.cecer.army.mil_

   Appendix A describes how to acquire and install GRASS4.13 compiled
   binaries from USA/CERL. (See section 6 before installing GRASS!)

   Appendix B describes how to acquire and install GRASS4.15 compiled
   binaries from USA/CERL. (See section 6 before installing GRASS!)

   Appendix C describes how to acquire and compile GRASS4.14 and
   GRASS4.15 source code from USA/CERL, as well as GRASS4.2 source code
   from Baylor University. (See section 6 before installing GRASS!)

   Linux distribution developers! Might you be interested in including
   GRASS with your distribution? Remember, GRASS source code is in the
   completely unrestricted, copyright-free, public domain. Your
   distribution might be more valuable if it contained source code and/or
   compiled binaries for GRASS.

  6. How to Get GRASS Running on Your Linux-based Computer.



   Appendices A, B, and C describe how to acquire and install GRASS.
   Before actually installing GRASS, you will have to decide where to put
   three parts of the system:
    1. The GRASS binaries, source code (if you install this), man pages,
       documentation, and the like. Many folks put this stuff off
       /usr/local (e.g. /usr/local/grass/bin, /usr/local/grass/src).
    2. The GRASS executable and gmake utilities. Some folks put this
       stuff off /usr/local (e.g. /usr/local/grass/grass4.1 and gmake4.1
       or /usr/local/bin/grass4.1 and gmake4.1).
    3. The GRASS data directories. These can go anywhere, as they are
       specified in configuration files.

       I have used a different scheme for a decade. As GRASS code,
       binaries, and the like (except data owned by users) are all owned
       by the special user "grass" I don't want this stuff to get spread
       around my system. I create a new directory (usually on a separate
       file system) called /user, and put all my GRASS stuff below this.
       For example:

/user/grass4.1/bin   (I usually put grass4.1 and gmake4.1 here...)
              /data
              /dev
              /etc
              /man
              /src
              /src.alpha
              /src.contrib


       I'm currently building a GRASS5.0 site, which then goes under:

/user/grass5/bin
            /data   (some GRASS5 data formats have changed...)
            /dev
            /etc


       The GRASS Installation Guide (described in Section 10 and in
       Appendix C) is useful for getting GRASS running, even if you
       merely install the binaries as described in Appendices A and B.
       Please don't overlook one important detail: Most GRASS
       installations separate user from software manager accounts and
       UNIX permissions. You should create a "grass" (the quotes here are
       for emphasis, and should not be part of the actual user userid)
       user account on your workstation. All installation and
       configuration of grass should be done by user "grass". Untar (or
       un"cpio" files, run setup configuration utilities, run Gmakefiles
       (GRASS versions of makefiles), and edit configuration files as
       user "grass." Then only RARELY run GRASS as user "grass." (I only
       run GRASS as user "grass" when I am making archival data files in
       the PERMANENT mapset.) This is done for much the same reason as
       not running user software as user "root". YOU CAN DO TOO MUCH
       DAMAGE AS USER "grass"!

       Beyond the instructions in these appendices, and information in
       the GRASS Installation Guide, you have some additional
       housekeeping to do, such as developing a data base. You can
       acquire sample data bases from USA/CERL (directory
       pub/grass/grass4.1/data at anonymous "ftp moon.cecer.army.mil"),
       start from scratch following instructions in the GRASS
       Programmer's Manual (and, to a lesser degree, buried in the
       functional descriptions of the GRASS User's Reference Manual).

       I personally recommend that you start with the Spearfish and
       Global databases available from USA/CERL:
         1. The Spearfish data base covers two 7.5 minute topographic
            sheets in the northern Black Hills of South Dakota, USA. It
            is in the Universal Transverse Mercator Projection. It was
            originally created by Larry Batten (now of the Environmental
            Systems Research Institute's office in Boulder, Colorado)
            while he was with the U. S. Geological Survey's EROS Data
            Center in South Dakota. The data base was enhanced by
            USA/CERL and cooperators. It is an excellent, and well-used
            (there are many training materials available for GRASS with
            this data base) example of a county-scale GIS project in the
            UTM projection.
         2. The Global data base was developed by Bob Lozar of USA/CERL
            to prototype a latitude-longitude "projection" data base in
            GRASS for global environmental study and decision support.


       Starting with these two examples, you can build your own data
       bases in UTM and latitude-longitude projections. (Note, many
       people don't call latitude-longitude a projection. Others
       disagree, saying that anything that transfers the Earth's surface
       to two dimensions is a projection.. We'll stay away from that
       debate here. Needless to say, lat-lon is treated as other
       projections are by the computer program.)

  7. Web-based Support for GRASS (and for GIS Matters in General)


       Support for a public domain program? No way, they say! Actually,
       as a user of Linux, you probably know better.

       GRASS started by having a GRASS Information Office at USA/CERL.
       There were also very active users outside USA/CERL, who provided
       valuable user support. GRASS had annual users' meetings,
       listservers for users and developers, etc. Companies provided
       value added support services on a contractual or fee basis.

       Various people have developed valuable books and training
       materials on GRASS. Several universities used to conduct training
       courses in GRASS. I don't know how many of these are continuing.
       If training courses interest you, try asking on the usenet
       newsgroup comp.infosystems.gis (see below for more on this
       newsgroup).

       Valuable "books" available on the Internet are noted in the
       References (Section 10).

       World Wide Web-based training materials, including training in
       GRASS, are highlighted in the CyberInstute Short Course in
       GIS:http://www.ngdc.noaa.gov/seg/tools/gis/referenc.html (then
       scan down for the link(s) to Web-based tutorials in GIS).

       One of the better GRASS tutorials is Project Assist's - Intro to
       GRASS:http://www.geog.le.ac.uk/assist/grass

       Other good sites:

       Central Washington University was an early GRASS user and training
       facility:http://www.csu.edu/~gishome/grass.htm

       "Starting the hunt for mostly free spatial data" by Stephan
       Pollard:http://cast.uark.edu/local/hunt This is based at the
       Center for Advanced Spatial Technology of the University of
       Arkansas, another early educator with GRASS.

       Purdue University has several GRASS
       features:http://pasture.ecn.purdue.edu/~aggrass

       USA/CERL's online GRASS
       manual:http://www.cecer.army.mil/grass/userman/main-alpha.html

       Rutgers University's GRASS Information
       Center:http://deathstar.rutgers.edu/grassinfo.html

       The REGIS project:http://www.regis/berkeley.edu at the University
       of California at Berkeley as a Linux version of GRASS available
       via ftp, and also has a Web-based version of GRASS called
       GRASSLINKS.

       After getting trained by the books and Web-based tutorials noted
       just above, where do you turn to for specific advice???

       Probably the best source of support these days is usenet newsgroup
       comp.infosystems.gis If you're not familiar with newsgroups, ask
       your network administrator or Internet service provider.
       comp.infosystems.gis contains modestly heavy traffic on such
       topics as
          + "how do I find data on this topic for this area?"
          + "how do I convert these data for use in my Aardvark GIS?"
          + "how do I get this function to work in my Aardvark GIS?"
          + "which GIS can I use to solve my particular problem?"


       GRASS used to be one of the top GISs discussed on this group.
       Traffic in GRASS is dropping slightly, as its user community
       matures. However, there are usually answers to your questions, if
       you post them. You might also do a "power search" on subject:GRASS
       [& your own subject of interest here?] and
       newsgroup:comp.infosystems.gis in DejaNews:http://www.dejanews.com
       to see what might appear from the usenet archives.

  8. The Future of GRASS?


       Excellent question! Several possible answers have been thrown out:
         1. USA/CERL's announced intention is to use GRASS and COTS
            (commercial off-the-shelf software) for internal uses, to
            leave the GRASS public web- and ftp-site on its system
            indefinitely, and to sign cooperative research and
            development agreements with three companies: (1) the
            Environmental Sciences Research Institute (ESRI), (2)
            Intergraph, and (3) Logiciels et Applications Scientifiques
            (L.A.S.) Inc. The first two agreements encouraged the
            incorporation of GRASS concepts into ESRI's and Intergraph's
            commercial GISs. The third encouraged the adaptation of
            GRASS' concepts and code into a new commercial GIS by L.A.S.
            L.A.S. also offered to encourage the continuation of a public
            domain GRASS, as a viable stand-alone system and as a
            potential source of new ideas and code for L.A.S.'s
            GRASSLAND. One observer noted that the first two agreements
            might be akin to someone signing Linux over to Microsoft. The
            same observer considers the experiment by/with L.A.S. to be
            an interesting possibility - an attempt to keep viable public
            domain and commercial versions of GRASS.
         2. Some people believe that GRASS will wither without USA/CERL's
            central management. Some believe that the Open GIS Consortium
            will successfully guide industry into an open architecture
            that will benefit all developers and users. Others believe
            that OGIS' effort will lead to a cacophony of almost similar
            (but not quite interoperable) vendor-specific "standards," so
            the loss of GRASS as an open development platform will be
            felt sorely.
         3. Some people believe that developments on some campuses and
            other sites may result in those institutes keeping GRASS for
            awhile, but in non-standard forms. In short, GRASS will
            undergo "cell division" and lead to a cacophony of internally
            valuable, but externally unused, GISs.
         4. Others hope that GRASS' previous management model under
            USA/CERL has left it ready for a new model. Perhaps:
              1. Under a new mentor, such as NASA (which needs an open,
                 powerful and scientific, GIS integrated with image
                 processing system for its Earth Observing System).
              2. Under a distributed management model... perhaps somewhat
                 like Linux?
              3. Perhaps a bit of a hybrid? Perhaps a Web-based effort
                 could spawn a series of usenet discussion groups
                 beginning with
                    # comp.infosystems.gis.grass, and evolving to:
                    # comp.infosystems.gis.grass.academics
                    # comp.infosystems.gis.grass.publicservice
                    # comp.infosystems.gis.grass.commercialvalueadded
                    # comp.infosystems.gis.grass.commercialdistributors
                    # comp.infosystems.gis.grass.programming
                    # comp.infosystems.gis.grass.users
                    # comp.infosystems.gis.grass.centralcommittee
             Clearly the topics are a bit tongue-in-cheek. However, under
                 this model, a Central Committee (including
                 representation of academic, public service [government
                 and nongovernmental organizations], commercial
                 distributors and value added firms, programmers, and
                 users) would guide overall grass development and
                 testing. The other special interest groups would serve
                 their user communities. Academics, for example, would
                 involve GIS and GRASS education, but would also try to
                 pull GRASS development in its direction. Value added
                 commercial developers would serve their own interests,
                 including trying to pull GRASS development in a
                 direction that would help their businesses. Users would
                 help each other learn GRASS, develop workarounds to
                 bugs, etc.


       GRASS offers considerable potential for:
          + Use as a scientific, as well as a traditional graphically
            oriented GIS. Many GISs can make pretty maps. Many of those
            GISs cannot easily perform certain scientific analytical
            functions as easily or powerfully as GRASS. GRASS was
            designed and developed in response to a perceived need for
            scientific GIS, specifically for environmental analysis, and
            the environmental management/protection of public lands.
            Incidentally, there is at least one Web-based GRASS version.
            GRASSLINKS:http://www.regis/berkeley.edu/grasslinks,
            developed at the University of California at Berkeley, uses
            Web forms to submit commands to the server, which creates
            .gif-based display output, places the images into pages, and
            serves them up to the requester. More on that later.
          + Education. GRASS is easier to teach and learn than some other
            GISs. It is easier to modify (for those that want to learn
            GIS as computer science, rather than as "geography") than
            most other GISs that come without source code and treat the
            program as a magical black box. And, of course, it is more
            affordable for the student of GIS than many other GISs.
          + Applications research and development. Many universities have
            used GRASS. Its available source code, easy modification,
            easy scriptability, etc., give it distinct advantages over
            some more closed systems.
          + Public Service. GRASS has been used as a scientific GIS for
            many public service applications. There is considerable value
            in continuing a robust GIS that can ba packaged with any UNIX
            workstation. There is considerably more value if that UNIX
            workstation universe can include Linux (but is not
            constrained only to Linux).
          + GIS research and development. For example - do you want to
            experiment with a different data model? Add it to GRASS!
          + Commercialization. This document gives contact information
            for a commercial version of GRASS. That company (and perhaps
            others?) may welcome your help in enhancing/supporting their
            product.


       Who would be the Linus Torvelds equivalent in this management
       model? Perhaps no single person. I have been involved in GRASS for
       about a decade, when GRASS was the only GIS that satisfied my
       needs in scientific data management and GIS application. Indeed, I
       had been a dedicated avoider of the user-unfriendly UNIX
       environment until GRASS forced me to learn it. Several senior
       GRASS developers are active in GRASS-related activities and would
       like to see the continued vitality of an open GRASS. It's likely
       that a reborn GRASS would attract a new crop of friends. Thus the
       concept of a "Central Committee" to collectively lead GRASS'
       transition to a more open management and development style.

       In short, the Linux community has an opportunity to take under its
       wing a killer ap. GRASS' current public domain status is slightly
       different from Linux's. However, that status could be
       discussed....

       Comments would be appreciated!

  9. Copyright Notice, and Notice on Support of this Document


       Copyright notice:

       This document was prepared by a Federal civil servant in support
       of his work (but mostly on his own time). It is NOT SUBJECT TO
       COPYRIGHT.

       Notice on support of this document:

       I believe that the contents of this document are accurate.
       However, if you use this document, you accept the risks for any
       errors in this document (and in any documents that are cited
       here).

       I would greatly appreciate help in correcting any errors, or in
       enhancing this document. However, "my time is limited" in dealing
       with this issue. Any help that you can provide, that also helps me
       to more efficiently respond to your interest, is more likely to be
       responded to quickly. A complaint might be appreciated, but a
       suggested improvement that includes draft wording might be REALLY
       appreciated.

  10. References


       For general reference material on GIS, try a very good technical
       bookstore (in many cases these are campus bookstores at schools
       with good GIS programs or top-notch technical or general
       bookstores - you know that ones are near you..), or the following
       URL for the CyberInstitute Short Course on Geographic Information
       Systems:hQfttp://www.ngdc.noaa.gov/seg/tools/gis/referenc.html
       (convened by myself):

       Also check
       Baylor University's growing GRASS Home
       Page:http://www.baylor.edu/~grass
       USA/CERL's GRASS Home Page:http://www.cecer.army.mil/grass

       For a good collection of references on GRASS, try this procedure,
       to load up on reference goodies from USA/CERL:


  ftp moon.cecer.army.mil
  login: anonymous
  password: your email address
  cd pub/grass/grass4.1/outgoing
  image
  get grassman.ps.Z  (or grassman.txt.Z, or grassman.wp.Z)
  cd ../documents/programmer/postscript
  image
  get progman.ps.Z
  cd ../../user/postscript
  image
  get refman.ps.Z
  cd ../..
  image
  get installGuide.ps.Z
  bye

  uncompress grassman.ps.Z
  uncompress progman.ps.Z
  uncompress refman.ps.Z
  uncompress installGuide.ps.Z

  lpr *.ps   (or whatever is appropriate for your environment)


       installGuide => The GRASS Installation Guide (you need this to
       compile GRASS source code)
       grassman => The GRASS Beginner's Manual (intro to GRASS)
       refman => The GRASS User's Reference Manual (function guide)
       progman => The GRASS Programmer's Manual (and administrator's
       guide - this is valuable for info about data formats, etc.)

       Browse around the ftp site noted just above, and you may find more
       stuff of interest. Particularly in the
       pub/grass/grass4.1/documents directory, there are tutorials on
       advanced GRASS functions such as r.mapcalc (think of this as math
       applied to raster arrays), r.combine and r.weight (think of this
       as how to combine spatial submodels into one type of model), and
       others.

       Incidentally, do you prefer German? Try The University of
       Hannover's site:http://www.laum.uni-hannover.de/iln/grass/handbuch

         _____________________________________________________________

  Appendix A: Acquisition/Installation of GRASS4.13 Binaries


       This appendix describes how to acquire and install Linux binaries
       for GRASS4.13 (the 3rd update to the last full release of GRASS,
       version 4.1).

       How to get these files:


  ftp moon.cecer.army.mil
  login: anonymous
  password: your email address
  cd pub/grass/grass4.1/release/binaries/linux
  image
  mget grassa*
  bye

Installation instructions:
********************************************************************
* GRASS 4.1 Update 3 for Linux
*
* This package contains GRASS programs only, *NO* GIS
* data is included.  You can find example GRASS data at
* moon.cecer.army.mil
*
* Compiled by: Andy Burnett - burnett@zorro.cecer.army.mil
* compiled on: April 7, 1994

********************************************************************
System Requiremnts:

        35 MB disk space to hold the binary distribution

System library requirements:

        libc4.5.21 or greater

        libX.so.3.1.0 or greater

If you are running libraries that are older than these, this binary
distribution will *NOT* run on your linux system.

--------------------------------------------------------------------------
Files in this release:

        README_4.1.3            what you are currently reading
        ginstall                simple grass installation script
        grassaa --------|
        grassab         |
        grassac         |
        grassad         |
        grassae         |--     the linux GRASS binaries
        grassaf         |
        grassag         |
        grassah         |
        grassai         |
        grassaj         |
        grassak --------|

INSTALLATION:

        To install this binary distribution of grass for linux, you
can simply run the ginstall script or you can unpack the files by
hand.  I recommend using the ginstall script ... it's very simple and
should be bullet proof.  To run the ginstall script, you will need
gawk (gnu awk) installed on your system and it needs to be in your
PATH.

If, however, you want to do things by hand, here's what you need to
do:

o  make the destination directory (/usr/grass, /usr/local/grass,
   whatever)  This will become your GISBASE for grass.

********************* LOOK HERE **************************************
from here on, replace $GISBASE with the name of the directory you just
created
********************* LOOK HERE **************************************

o  cat grassa? | gzip -d | (cd $GISBASE; tar xvf -)
   This will unpack all the grass binaries into the $GISBASE directory

o  copy $GISBASE/etc/moncap.sample to $GISBASE/etc/monitorcap and edit
   it.
o  change all occurrences of GBASE in that file to $GISBASE
o  copy $GISBASE/etc/grass4.1 into a public directory (I suggest
   /usr/bin)
o  edit the copy you just made:
   change all occurrences of GBASE to $GISBASE

         _____________________________________________________________

  Appendix B: Acquisition/Installation of GRASS4.1.5 Binaries


       This appendix describes how to acquire and install Linux binaries
       for GRASS4.15 (the 5th and last update to the last full release of
       GRASS, version 4.1).

       How to get these files:


ftp moon.cecer.army.mil
login: anonymous
password: your email address
cd pub/grass/grass4.1/release/binaries/linux
image
mget linuxa*
bye

Installation instructions:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Files in this release:
        README_4.1.5            what you are currently reading
        install.sh                simple grass installation script
        linuxaa --------|
        linuxab         |
        linuxac         |
        linuxad         |
        linuxae         |--   the linux GRASS binaries, version 4.1.5
        linuxaf         |
        linuxag         |
        linuxah         |
        linuxai --------|

* * * * * * * * * * *** * * * * * * * * * * * * * * * * * * * * * * *
*

The GRASS4.15 for Linux was compiled in my Linux box with the
following configuration:
        Slackware 3.0
        kernel 1.2.13
        gcc 2.7.0
        libc 5.0.9
        flex 3.5.2

~ ~ ~ ~ ~ ~ ~
~ IMPORTANT: ~
~ ~ ~ ~ ~ ~ ~
THE LINUX GRASS 4.15 BINARIES ONLY WORK ON ELF-LINUX. THE BINARIES MAY
NOT WORK WITH EARLY VERSION OF KERNEL AND/OR GCC AND FLEX.

The binaries was tared and gziped, then split into 9 (close to 1.3 MB
- 1200 x 1K block) files named from linuxg.aa to linuxg.ai.

You should ftp all the linuxg.a* in binary mode and also get this
readme file and an installation script - install.sh.  Please put all
of these files in the same directory - source directory.

At the source directory under the UNIX prompt, type
        sh ./install.sh full_path_to_the_destination_directory

and it should automatically unzip and untar the linuxg.a* files to the
destination directory and also edit several site-specific files.  The
total space your need is about 26 MB.

At the destination directory, your can find the grass4.1 script.  It
should have been modified to reflect your installation directory.
Now, either move/copy the grass4.1 file to one of your PATH or use the
link command as below:
        cd /usr/local/bin
        ln -s destination_directory/etc/grass4.1 grass4.1

Now, your are ready to start GRASS by typing grass4.1 and you should
know how to run GRASS afterward.

There is a readme directory in the destination_directory/etc
directory.  This directory has several readme files that come with
some incoming commands.  You can find all the compiled commands of
this binaries in the commands.readme file.  I can't guarantee that all
of them work but I have tested lots of them.  If you find some
commands that don't work, please post a message on the grass user
group and we can solve it all together.

Yung-Tsung Kang,
Michigan State University

         _____________________________________________________________

  Appendix C: Acquisition/Compilation of GRASS Source Code


       The GRASS binaries for Linux tend to work. Why would anyone want
       to mess with the source code?

       Let's try to answer this with another question: "Why can't I get
       the source code to my GIS, so I can see how it works, and maybe
       fix some things to work the way I like them?" (You probably know
       the answers to this question, at least for many commercial
       software packages.)

       If you want to
         1. Add any of the numerous existing alpha and contributed GRASS
            functions,
         2. Understand how a function works (did any programming
            shortcuts or performance enhancements affect the accuracy of
            a function? Can I improve the performance of a function?)
         3. Revise or enhance the code (if you do this, please see
            Appendix D!),
         4. Try compiling several tens of megabytes of source code, this
            appendix is for you. Also check Appendix E.


       First, you need to acquire the source code, and the GRASS
       Installation Guide. You may also want to get the GRASS
       Programmer's Manual and User's Reference Manual. To do this:


ftp moon.cecer.army.mil
login: anonymous
password: your email address
cd pub/grass/grass4.1/release/source
get README.4
get README.5
image
mget s4* (or s5*, your choice)
cd ../../documents
get installGuide.ps.Z
cd /manuals/programmer/postscript
get progman.ps.Z
cd ../../user/postscript
get refman.ps.Z
bye


       Don't forget this site. There are several tutorials on some of
       GRASS' more advanced programs in the pub/grass/grass4.1/document
       directory. There are two options for source code (I'm only
       discussing GRASS version 4.14 here, though version 4.15 is also
       available) The pub/grass/outgoing directory contains many
       contributed functions (and many other candidates for enhancing
       your system).

       Follow the README.4 file for installing GRASS version 4.14 (which
       is sometimes called version 4.1.4) source code. Follow the
       README.5 file for installing GRASS version 4.15 (which is
       sometimes called version 4.1.5) source code.

       After installing the source code, uncompress and print
       installGuide.ps.Z (or the troff version, if you prefer that and
       got it from a neighboring directory). You might also want to
       uncompress and print refman.ps.Z and progman.ps.Z at the same
       time. Note that progman.ps.Z is called the programmer's manual,
       but also contains valuable information about data formats and
       directory structures. Advanced users may also want to know the
       GRASS system utilities, even if they won't be calling them in
       code.

       Now, use the GRASS Installation Guide (from installGuide.ps.Z) to
       guide yourself through the installation. The thickness of this
       document may at first be intimidating. However, if you installed
       Linux yourself, you should be ready to tackle a GRASS
       installation. Don't be surprised if a function or two does not
       compile on your system. I have a couple of uncompiled functions on
       my own Linux system. Fortunately, these are functions that I don't
       use... Some day I'll get back to them, fix them, and compile
       them!?
         _____________________________________________________________



       Here is a late-breaking addition, on how to install the newly
       released GRASS 4.2 from Baylor
       University:http://www.baylor.edu/~grass This text is as provided
       by Baylor, unedited by myself due to its release only a few days
       ago. Please note the similarity with other installations..

    GRASS 4.2 Quick Start
    Installtion Instuctions
   _WARNING:_ These instructions pertain to the 4.2 release of GRASS
       Users are urged to consult the complete installation guide for
       more detailed instructions.

       _$GIS/src_ - This directory contains scripts and files used to
       compile GRASS. By running scripts and changing lists of programs
       you generate GRASS binaries for your system.

       You may mount a disk containing GRASS source on different types of
       machines and compile without making source code copies. You follow
       the following instructions for each machine.

       _WARNING:_ These instructions presume that you have familiarity
       with UNIX, C, make, and shell scripting. Murphy's law visits GRASS
       regularly and your expertise in these matters will be the best
       defense against Mr. Murphy.

       _WARNING:_ These instructions and scripts have been used to
       compile GRASS on various machines. Please mail results of using
       this information for compiling GRASS on your platforms and
       operating system to:

       grass@baylor.edu

       _DIRECTORY CONTENTS_


    GISGEN      script which will compile GRASS

    MAKELINKS   script used after GISGEN to establish the user executable
                commands

    VERSION     current version number and date of the GRASS release

    generic/    system independent files need by gmake
                  gmake     shell script which does compilations
                  make.def  make variables
                  make.tail some additional make rules

    head/       gmake header file(s) for this site.  Header files are
                  created by running the utils/setup command.

    lists/      lists of programs to be compiled
                  GRASS     standard GRASS programs
                  local     site specific GRASS programs
                  ...       architecture dependent GRASS programs

    next_step/  files used by GISGEN to keep track of how far along
                it is in the compilation. Used to restart
                GISGEN (after a failure) where it left off.

    utils/      contains the 'setup' script and all support scripts
                and files needed by 'setup'



       _COMPILATION STEPS OVERVIEW_


 (1) Generate files that contain location and machine specific make
    information.

 (2) Edit files containing lists of location and machine specific
     programs to be compiled (generally printer, digitizer, and graphics
     drivers).

 (3) Run GRASS compilation script

 (4) Run GRASS program linking script

 (5) Edit device driver configuratin files

 (6) Compile GRASS contributed, alpha programs.

 (7) Compile GRASS related and hybrid programs.


       _COMPILATION STEPS (DETAILS) _

       _(1) Generate make support files_

       Each machine and location needs to have GRASS compiled in ways
       that specify different:
          + compilation and load flags
          + system libraries
          + installation directories
          + default data bases and locations
   The shell script utils/setup assists you in define many of the make
       options and definitions that will become part of every
       compile-time generated makefile (about 350). It also creates your
       shell script for compiling individual GRASS programs - gmake4.2.

       Run "utils/setup" and answer the questions.

       The makefile portions are placed in the head/ under a name which
       you specify/approve in the utils/setup process. The executable
       shell script which directs compilation is placed in (by default)
       /usr/local/bin.

       Examine the just created file in head/ to make sure things are ok.
       A brief description for each defined variable follows:


  ARCH            = Key name identifying the architecture of the machine
                    on which you are compiling GRASS.
  GISBASE         = Directory into which compiled GRASS will be contained
  UNIX_BIN        = Local directory where the GRASS entry program and gmake
                    will be contained

  DEFAULT_DATABASE= Directory where local GRASS data bases are contained
  DEFAULT_LOCATION= GRASS data base that users get as the first default

  COMPILE_FLAGS   = Compilation flags
  LDFLAGS         = Load flags

  TERMLIB         = System library containing low-level cursor movement
  CURSES          = System library that supports screen cursor control
  MATHLIB         = System math library
  LIBRULE         = Method for archiving and randomizing libraries

  USE_TERMIO      = Flag to use the termio library if available
  USE_MTIO        = Flag to use the mtio library if available
  CAN_CLEAR       = Flag indicating that the terminal screen can be cleared
  DIGITFLAGS      = Flags to set owner and priority of the v.digit program


       _(2) Edit files containing lists of location and machine specified
       programs_

       The directory lists/ contains files that list directories that
       will be compiled. Directory names are relative to the GRASS src
       directory. The file lists/GRASS lists all basic GRASS programs
       that get compiled at every site. The file lists/local and
       lists/$ARCH.

    -----------------------------------------------------------------
    $ARCH is the architecture name you approved while running the
    utils/setup script.  You can determine this by running:
        gmake4.2 -sh | grep ARCH
    -----------------------------------------------------------------
   There man not be a lists/$ARCH file, but you are free to create it to
       add names of programs you want compiled specifically for this
       architecture. It is an architecture-specific list which allows NFS
       linked source code to compile one set of programs for one machine,
       and another set for another machine. All machines that share the
       same source code via NFS mounts will compile the directories
       listed in lists/local.

       All lists may contain comment lines - indicated by a # as the
       first character in the line. The lists/local file contains lists
       of all digitizer, graphics, and paint (hard-copy map) drivers. All
       machine specific devices are commented out - you must uncomment
       those that are particular to your site or architecture. You are
       encouraged to move the graphics driver items to the appropriate
       lists/$ARCH file.

       _(3) Run GRASS compilation program_

       The script GISGEN drives the compilation process. If all goes well
       you will be able to simply enter the command GISGEN and wait. The
       entire compilation process takes from about 1/2 hour on the faster
       workstations to about 8 hours on the slower workstations.

       GISGEN collects all of the directory names to be compiled from
       lists/GRASS lists/$ARCH and lists/local and begins running
       gmake4.2 in each directory. Screen output is a collection of
       messages from GISGEN and from the UNIX make program. Failure at
       any step will halt compilation. On failure you might do one of the
       following things:


  1 - Fix a compilation problem by modifying code in the directory that
      failed.  After modification, return to this directory and rerun
      GISGEN.  Compilation will pick up at the failed directory and continue
      down the list of directories if successful.

  2 - Restart GISGEN.  If the failure requires modifications to code already
      compiled, or the compilation options you set in step 1, you must
      remove next_step/$ARCH (or next_step/next_step if ar architecture name
      was not specified in step 2.  You may then rerun GISGEN.

  3 - Skip the failed directory.  In this case you must seek through the
      files list/GRASS lists/$ARCH and lists/local to determine the directory
      name that follows the failed directory name.  The failed name is in
      next_step/$ARCH and must be replaced in that file with the next name.
      After editing, rerun GISGEN


       When complete GISGEN will put the word DONE into the next_step
       file and will print the phrase "DONE generating GIS binary code"
       to the screen.

       _(4) Run GRASS program linking script_

       The GISGEN directs a compilation process that stashes the GRASS
       programs away in directories unavailable to the user community.
       Most user commands are actually links to a single program called
       "front.end". Links to this program must be made for every actual
       GRASS program. This is done AFTER GISGEN is finished. To make (or
       re-make) links for all user programs run the script MAKELINKS.

       _(5) Edit device driver configuratin files_

       Your compiled system may any combination of several graphics,
       paint, and digitizer drivers. Refer to the GRASS installation
       instructions for details.

       NOTE: If you have trouble compiling your graphics driver, go to
       the directory $GIS/src/display/devices and compile the proper
       drivers manually using gmake4.2.

       _(6) Compile GRASS contributed, alpha programs._

       GRASS programs come in three flavors:

       MAIN - The programs are those compiled in step 3. They have stood
       the test of time and are generally reliable programs.

       ALPHA - Alpha programs are intended to be included with the MAIN
       programs in the next release.

       CONTRIB - Sites generate lots of special purpose programs in GRASS
       to get some job done, but do not polish the effort sufficiently to
       even be considered alpha code can be distributed in this category.


       ALPHA programs are found in the directory src.alpha. You, the
       installer may visit these programs and compile any that you
       desire. In directories that contain Gmakefile files, simply run:
       gmake4.2

       CONTRIB programs are in the directory src.contrib. The state of
       these programs are varied. Some programs may compile with
       gmake4.2; others are suitable as a starting point for programmers
       who will be writing new software.

       _(7) Compile GRASS related and hybrid programs._

       The GRASS user community has discovered that there are several
       public-domain programs that are very useful in conjunction with
       GRASS. These are found in the directory src.related. Compile these
       programs based on instructions (or lack of instructions) in the
       individual directories.

       Hybrid programs are those that mix the capabilities of GRASS with
       the capabilities of one or more of the "related" programs. These
       are found in the src.garden directory. They require successful
       compilation of the "related" programs and generally compile using
       the gmake4.2 and the included Gmakefile files.
         _____________________________________________________________



       The rest of the compilation should just take some time. If you
       have already installed GRASS binaries, you should back up your
       system (or at least get the working binaries out of the way of
       your compilation!).

       Good Luck! And be secure in the likelihood that you can use the
       compiled binaries if you bail out of a full compilation of the
       source code.
         _____________________________________________________________

  Appendix D: If you plan to enhance any part of GRASS, read this first!


       GRASS has been developed for over a decade as completely
       unrestricted public domain source code and executables. Though
       there was initial resistance to the existence of such robust
       software in the public domain, many competitors learned to take
       advantage of GRASS. It has reputedly been the intellectual
       stimulus for several enhancements to other GISs. Several companies
       conducted business by installing and customizing public domain
       GRASS for customers, and by providing other value-added services
       such as data base development.

       As USA/CERL no longer supports the public version of GRASS, users
       are free to use what currently exists. They're also currently
       completely on their own. At least where the public domain version
       is concerned.

       There is a commercial version of
       GRASS:http://www.las.com/grassland, adapted from the public domain
       version by Logiciels et Applications Scientifiques (L.A.S) Inc. of
       Montreal . In a recent check, LAS sold its GRASSLAND for Sun,
       Linux and Windows NT. LAS is trying to encourage the continuation
       of a robust public domain Linux, partly as a source of new ideas
       and code for their own developments.

  Appendix E: Example Linux versions of some critical GRASS files.


       This appendix is the home of Linux-specific examples of selected
       GRASS configuration files. Currently, only several examples of a
       single file are offered. However, this is the most important file
       for configuration! Later, examples of database configuration files
       (e.g. DEFAULT_WIND) and other files may appear.

       In the Installation Guide (pp. 10-11) you will see mention of the
       [header] file in directory $GIS/src/CMD/header (where $GIS is the
       directory in which you place GRASS - some folks put this in
       /usr/local - I put everything in a GRASS' own filesystem/directory
       /user/grass4.1). The installation guide favors Sun systems, as
       these were the development environment for GRASS4. (In case you
       cared, Masscomp workstations were earlier development
       environments.) Below are examples of this file for linux (which
       you might want to name linux in your $GIS/src/CMD/header
       directory. You may want to refer to this section when running the
       setup ($GIS/src/CMD/utils/setup) command.
         _____________________________________________________________



       One version:

CC                  = gcc
ARCH                =

GISBASE             = /user/grass4.1
UNIX_BIN            = /user/grass4.1/bin

DEFAULT_DATABASE    = /user/grass4.1/data
DEFAULT_LOCATION    = china

COMPILE_FLAGS       = -O2
LDFLAGS             = -s

XCFLAGS             = -D_NO_PROTO -DXM_1_1_BC
XLDFLAGS            =
XINCPATH            =
XMINCPATH           =
XLIBPATH            =
XTLIBPATH           = -L/usr/lib
XMLIBPATH           = -L/usr/lib
XLIB                = -lX11
XTLIB               = -lXt
XMLIB               = -lXm
XEXTRALIBS          =

TERMLIB             =
CURSES              = -lcurses $(TERMLIB)
MATHLIB             = -lm

#                   LIBRULE = ar ruv $@ $?
#                   LIBRULE = ar ruv $@ $?; ranlib $@
#                   LIBRULE = ar ruv $@ $?; ar ts $@
#                   LIBRULE = ar rc $@ `lorder $(OBJ) | tsort`
LIBRULE             = ar ruv $@ $?

USE_TERMIO          = -DUSE_TERMIO
USE_MTIO            = -DUSE_MTIO
USE_FTIME           = -DUSE_FTIME
DIGITFLAGS          = -DUSE_SETREUID -DUSE_SETPRIORITY
VECTLIBFLAGS        =
GETHOSTNAME         = -DGETHOSTNAME_OK

         _____________________________________________________________

       Another version:

#CC                  = gcc
#CC                  = gcc -ggdb -traditional
CC                  = gcc -traditional
#CC                  = gcc -static

ARCH                = linux

GISBASE             = /usr2/local/grass/grass4.1
UNIX_BIN            = /usr/local/bin

DEFAULT_DATABASE    = /usr2/local/grass
DEFAULT_LOCATION    = grass4.1

COMPILE_FLAGS       =
#COMPILE_FLAGS       = -O
LDFLAGS             = -s

XCFLAGS             = -D_NO_PROTO
XLDFLAGS            =
XINCPATH            = -I$GISBASE/xgrass
#XINCPATH            =
XMINCPATH           =
XLIBPATH            = -L/usr/lib
XTLIBPATH           = -L/usr/lib
XMLIBPATH           = -L/usr/lib
XLIB                = -lX11
XTLIB               = -lXt
XMLIB               = -lXm
XEXTRALIBS          =

TERMLIB             =
CURSES              = -lcurses $(TERMLIB)
MATHLIB             = -lm

#                   LIBRULE = ar ruv $@ $?
#                   LIBRULE = ar ruv $@ $?; ranlib $@

#                   LIBRULE = ar ruv $@ $?; ar ts $@
#                   LIBRULE = ar rc $@ `lorder $(OBJ) | tsort`
LIBRULE             = ar ruv $@ $?; ranlib $@

USE_TERMIO          = -DUSE_TERMIO
USE_MTIO            = -DUSE_MTIO
USE_FTIME           = -DUSE_FTIME
DIGITFLAGS          = -DUSE_SETREUID -DUSE_SETPRIORITY
VECTLIBFLAGS        =
GETHOSTNAME         = -DGETHOSTNAME_OK

         _____________________________________________________________



       Another version:

#CC                  = gcc -traditional -ggdb
CC                  = gcc -traditional -m486
#CC                  = gcc
ARCH                = linux

GISBASE             = /usr/local/grass/grass4.1
UNIX_BIN            = /usr/local/bin

DEFAULT_DATABASE    = /usr/local/grass
DEFAULT_LOCATION    = grass4.1

COMPILE_FLAGS       = -O2
LDFLAGS             = -s

XCFLAGS             = -D_NO_PROTO -DXM_1_1_BC
XLDFLAGS            =
XINCPATH            =
XMINCPATH           =
XLIBPATH            = -L/usr/lib
XTLIBPATH           = -L/usr/lib
XMLIBPATH           = -L/usr/lib
XLIB                = -lX11
XTLIB               = -lXt
XMLIB               = -lXm
XEXTRALIBS          = -lXmu

TERMLIB             =
CURSES              = -lcurses $(TERMLIB)
MATHLIB             = -lm

#                   LIBRULE = ar ruv $@ $?
#                   LIBRULE = ar ruv $@ $?; ranlib $@
#                   LIBRULE = ar ruv $@ $?; ar ts $@
#                   LIBRULE = ar rc $@ `lorder $(OBJ) | tsort`
LIBRULE             = ar ruv $@ $?; ranlib $@

#USE_TERMIO          = #-DUSE_TERMIO
USE_TERMIO          = -DUSE_TERMIO
USE_MTIO            = -DUSE_MTIO
USE_FTIME           = -DUSE_FTIME
DIGITFLAGS          = -DUSE_SETREUID -DUSE_SETPRIORITY
VECTLIBFLAGS        =
GETHOSTNAME         = -DGETHOSTNAME_OK

         _____________________________________________________________



       Yet another version:

CC                  = cc
ARCH                = linux

GISBASE             = /usr/local/grass4.15/linux
UNIX_BIN            = /usr/local/grass4.15/linux

DEFAULT_DATABASE    = /data/grassdata
DEFAULT_LOCATION    =

# -fwritable-strings - for ps.map only
#COMPILE_FLAGS       = -O -m486 -fwritable-strings
COMPILE_FLAGS       = -O -m486
LDFLAGS             = -s

XCFLAGS             = -D_NO_PROTO
XLDFLAGS            =
XINCPATH            =
XMINCPATH           =
XLIBPATH            = -L/usr/X11R6/lib
XTLIBPATH           = -L/usr/lib
XMLIBPATH           = -L/usr/lib
XLIB                = -lX11
XTLIB               = -lXt
XMLIB               = -lXm
XEXTRALIBS          =

TERMLIB             =
CURSES              = -lcurses $(TERMLIB)
MATHLIB             = -lm

#                   LIBRULE = ar ruv $@ $?
#                   LIBRULE = ar ruv $@ $?; ranlib $@
#                   LIBRULE = ar ruv $@ $?; ar ts $@
#                   LIBRULE = ar rc $@ `lorder $(OBJ) | tsort`
LIBRULE             = ar ruv $@ $?

USE_TERMIO          = -DUSE_TERMIO
USE_MTIO            = -DUSE_MTIO
USE_FTIME           = -DUSE_FTIME
DIGITFLAGS          = -DUSE_SETREUID -DUSE_SETPRIORITY
VECTLIBFLAGS        = -DPORTABLE_3
GETHOSTNAME         = -DGETHOSTNAME_OK


       Intimidating? It probably shouldn't be if you've configured X
       Windows on your Linux box. These examples should give you patterns
       to look for when running the setup utility in GRASS (described in
       the Installation Guide).

   _

   GTEK BBS-550 with Linux mini-HOWTO _

   by Wajihuddin Ahmed <wahmed@sdnp.org.pk>

   v1.1, 20 August 1997


     _________________________________________________________________

   _

   GTEK's BBS-550 is a 8-port serial card with 16C550 UARTS. Only one IRQ
   can be used for all 8 ports. It does not require any driver on Linux
   therefore the kernel does not have to be recompiled but the kernel
   should have serial support. _


     _________________________________________________________________



   1. What I/O addresses to use?
   2. The rc.serial file and IRQ selection
   3. Setup of uugetty
   4. Final checking...


     _________________________________________________________________



   1. For detailed information of configuring serial ports on Linux refer
   to the Serial-HOWTO. Thats where I started from.

   I have setup the BBS-550 to use I/O address from 0x100 to 0x140 on my
   Linux box (Slackware 2.3, kernel 1.3.93). The main reason being that
   the above _address space was vacant_ in my computer. Page 4 of the
   manual gives the jumper settings. Also this range of I/O addresses is
   seldom used by any other hardware. Just to make sure that this space
   is available on your machine, use the IOMAP.EXE utility which is on
   the GTEK floppy disk.


     _________________________________________________________________



   2. After you have installed the card on your computer _you need to
   configure the serial ports_. This is quite easy since the rc.serial
   file already has entries for BOCA 8 port card which can be used for
   the GTEK. Here is my rc.serial file. _Don't forget_ to execute it from
   the rc.S file by uncommenting the line that executes it.

   --

   #!/bin/sh
   # /etc/rc.serial
   # Initializes the serial ports on your system
   # Version 2.01
   cd /dev
   SETSERIAL="/bin/setserial -a"
   PORTS=`echo cua? cua??`
   echo -n "Configuring serial ports...."
   # Do wild interrupt detection
   #
   #${SETSERIAL} -W ${PORTS}
   # Do AUTOMATIC_IRQ probing
   #
   #AUTO_IRQ=auto_irq
   ${SETSERIAL} /dev/cua16 uart 16550A port 0x100 irq 5
   ${SETSERIAL} /dev/cua17 uart 16550A port 0x108 irq 5
   ${SETSERIAL} /dev/cua18 uart 16550A port 0x110 irq 5
   ${SETSERIAL} /dev/cua19 uart 16550A port 0x118 irq 5
   ${SETSERIAL} /dev/cua20 uart 16550A port 0x120 irq 5
   #${SETSERIAL} /dev/cua21 uart 16550A port 0x128 irq 5
   #${SETSERIAL} /dev/cua22 uart 16550A port 0x130 irq 5
   #${SETSERIAL} /dev/cua23 uart 16550A port 0x138 irq 5
   echo "done."
   ${SETSERIAL} -bg ${PORTS}

   -- _

   Notice that i have used IRQ 5_. Refer to page 6 of the GTEK manual on
   howto set the IRQ.


     _________________________________________________________________



   3. I am using uugetty for dial-in's. Here is an extract from my
   /etc/inittab file (sys V).



   s1:45:respawn:/sbin/uugetty ttyS16 38400 vt100
   s2:45:respawn:/sbin/uugetty ttyS17 38400 vt100
   s3:45:respawn:/sbin/uugetty ttyS18 38400 vt100
   s4:45:respawn:/sbin/uugetty ttyS19 38400 vt100
   s5:45:respawn:/sbin/uugetty ttyS20 57600 vt100
   #s6:45:respawn:/sbin/uugetty ttyS21 38400 vt100
   #s7:45:respawn:/sbin/uugetty ttyS22 38400 vt100
   #s8:45:respawn:/sbin/uugetty ttyS23 38400 vt100



   Make sure that you have the corresponding entries in the
   /etc/gettydefs file. Also don't forget to make new uugetty
   configuration files in the /etc/default directory.


     _________________________________________________________________



   4. At boot up the kernel _will not_ report the new tty's.

   The serial ports are configured when the rc.serial script is run. You
   can see that on the screen during boot up.

   ps ax _should show the uugetty connected_. Here is part of my ps
   output.

   18208 ? S 0:00 /sbin/uugetty ttyS18 38400 vt100
   18247 ? S 0:00 /sbin/uugetty ttyS20 57600 vt100
   18254 ? S 0:00 /sbin/uugetty ttyS19 38400 vt100
   18258 ? S 0:00 /sbin/uugetty ttyS17 38400 vt100
   18260 ? S 0:00 /sbin/uugetty ttyS16 38400 vt100

   Finally test the board by dialing out (using cuaXX) and then dialing
   in (ttySXX).

   Good Luck!
  Handspring-Visor mini-HOWTO
  Ryan VanderBijl
  v0.3, April 7, 2000

  Using the Visor with Linux and your USB port
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 About this Document
     1.2 Disclaimer
     1.3 History
     1.4 Copyright

  2. Installing Stuff

     2.1 Requirements
     2.2 Getting your kernel to support USB
     2.3 Installing pilot link
     2.4 Almost Done! (aka testing)

  3. References



  ______________________________________________________________________

  1.  Introduction

  1.1.  About this Document

  This document was first created by Ryan VanderBijl, April 6, 2:00am.
  It has been edited by Miles Lott.  I recieved my Handvisor today, and
  have struggled getting it to work, and found no good HOWTO yet, so
  thought i'd make one. By some random mutation, you might be able to
  find a new version on my web page, but that is up to chance. Test your
  luck at:

  http://www.calvin.edu/~rvbijl39/ <http://www.calvin.edu/~rvbijl39/>

  or

  http://usbvisor.sourceforge.net <http://usbvisor.sourceforge.net>

  I used the vi editor. Anything else would have been evil. No spell
  check has yet been run on this document. So, if you have a problem
  with my spellling, tuff luck.

  1.2.  Disclaimer

  Hmm... what did I claim? Oh well. I am really a newbie at this
  usb/visor stuff, so i really couldn't answer to many of your
  questions.  There are people who could help you much better, who
  maintain the sites I refer to at the end of the document. However,
  feel free to send me questions, or updates to this document. My email
  address is: rvbijl39@calvin.edu <mailto:rvbijl39@calvin.edu>

  1.3.  History


    v0.1 - initial release


    v0.2 - HTML-ized version

    v0.3 - SGML-ized, Added modifications by Miles Lott

  1.4.  Copyright

  This document is Copyright 2000, by Ryan VanderBijl.  You may
  distribute freely under the terms of the GPL (www.gnu.org).

  2.  Installing Stuff

  2.1.  Requirements

  Some obvious things are required, such as a computer, USB ports, hand
  visor (and USB cradle), Linux, etc. You also should know how to
  compile stuff, like the kernel.

  Most critical is determining which type of USB host controller you
  have. Intel chipset motherboards, i.e. the BX chipset, are typically
  UHCI controllers. Most addon cards are OHCI controllers. You could try


  cat /proc/pci



  or use


  lspci -vv



  and look for your controller in there.  It should say which type you
  have. You should refer to http://www.linux-usb.org <http://www.linux-
  usb.org> for further details. The kernel documentation in the
  directory (Documentation/usb/usb.txt) may also be helpful.

  Now lets see... working USB support was first introduced in the Linux
  Development Kernels, around v2.3.40. The latest version, of this
  writing was v2.3.99pre3. I tried briefly, but that broke a number of
  things on my system, and I was too lazy to fix them. SO. What I did
  instead was to get 'The v2.2 Linux USB drivers backport'. This is
  available from http://www.linux-usb.org <http://www.linux-usb.org>

  http://www.suse.cz/development/usb-
  backport/usb-2.3.50-1-for-2.2.14.diff.gz
  <http://www.suse.cz/development/usb-
  backport/usb-2.3.50-1-for-2.2.14.diff.gz>

  So, the bear minimum kernel version is 2.2.14, which is what I'm
  using.  And it works. Check for the latest backport patch if still
  available or relevant when you are reading this.  If kernel version
  2.4 is out, use that kernel, otherwise use the latest backport patch.

  2.2.  Getting your kernel to support USB

  To install the USB backport, you can do something like this: (cut and
  paste from:http://www.suse.cz/development/usb-backport/)



  cd /usr/src
  tar xzvf linux-2.2.14.tar.gz
  cd linux
  gzip -dc ../usb-2.3.50-1-for-2.2.14.diff.gz | patch -p1
  make distclean



  Configure, and then make your kernel. Make sure to enable:


    USB support (CONFIG_USB),

    the appropriate controller - UHCI, alternate UNCI, or OHCI
     (CONFIG_USB_UHCI, CONFIG_USB_UHCI_ALT, or CONFIG_USB_OHCI)

    USB Serial Converter support (CONFIG_USB_SERIAL)

    USB Handspring Visor Driver (CONFIG_USB_SERIAL_VISOR) (serial
     converter's sub-option)

  I compiled these into the kernel, but as modules should work. The
  developer(s) prefer the module method, but that is up to you.

  After you did that, finish installing your kernel, and reboot.

  Not done yet! To make the Visor drivers work, we need to finish making
  the USB Serial Converter working. For that, you can refer to the Linux
  Kernel Documentation: Documentation/usb/usb-serial.txt.  Basically,
  what it tells you to do is to make the devices. You can do this by
  excuting the commands:


  mknod /dev/ttyUSB0 c 188 0
  mknod /dev/ttyUSB1 c 188 1
  etc...



  Right now its limited to 16 connections/ports/devices, so just from 0
  to 15 need to be done.


  For some reason, the visor gets connected to ttyUSB1, instead of
  ttyUSB0, even when its the only USB device. A "neat" thing to do might
  be to create link to the device, so you can refer to /dev/visor (or
  palm, or pilot, depending on what floats your boat):


  cd /dev
  ln -s /dev/ttyUSB1 visor



  2.3.  Installing pilot link

  pilot-link is the software package which contains many programs to
  talk with you're Visor (or your Palm, if you have one of those). They
  run the same OS, and that's what is important.

  So you can get the version I got (0.9.3) from here:

  ftp://ryeham.ee.ryerson.ca/pub/PalmOS/pilot-link.0.9.3.tar.gz
  <ftp://ryeham.ee.ryerson.ca/pub/PalmOS/pilot-link.0.9.3.tar.gz>


  At the time of writing, http://pilot-link.sourceforge.net was the new
  home for this package. Download it, and compile. Version 0.9.0 did NOT
  work for me, but this one (0.9.3) worked fine. There are some packages
  (rpm,deb) available, but of older versions. (see the PalmOS HOWTO).
  You may also try newwer versions, when they appear.


  tar xvzf pilot-link.0.9.3.tar.gz
  cd pilot-link.0.9.3
  ./configure --prefix=/usr/visor
  make
  make install



  Also, add /usr/visor/bin to your path. Of course, you can also select
  whichever path you prefer. Redhat and other distributions should have
  this package available as well, and they will install in their
  respective system paths, i.e. /usr/bin.

  2.4.  Almost Done! (aka testing)

  We are pretty much done. Now we need to test it. Of course, the visor
  needs to be in the cradle, and the cradle needs to be plugged into
  your USB port.

  To test, we can use the pilot-xfer, in list mode. For the computer to
  realize that the visor really is there, you need to hit the hotsync
  button on the cradle. (When a USB device connects, I've noticed that a
  bunch of info is dumped to the screen). Then you can run pilot-xfer:


  pilot-xfer /dev/visor -l



  (Remember, /dev/visor is a symbolic link to /dev/ttyUSB1). You should
  get a list of programs/things on your visor. From there, use other
  documentation.

  3.  References

  For this document, and, well, learning what i did, i used:


    http://www.orbits.com/Palm/ <http://www.orbits.com/Palm/> (for
     pilot-link info, PalmOS HOWTO)

    ftp://ryeham.ee.ryerson.ca/pub/PalmOS
     <ftp://ryeham.ee.ryerson.ca/pub/PalmOS> (for pilot-link program)

    http://www.linux-usb.org <http://www.linux-usb.org> (for
     backport/kernel stuff)

    http://usbvisor.sourceforge.net <http://usbvisor.sourceforge.net>



Hard Disk Upgrade Mini How-To
=============================

How to copy a Linux system from one hard disk to another

By Yves Bellefeuille <yan@storm.ca>,
and Konrad Hinsen <hinsen@cnrs-orleans.fr>
v2.11, 13 April 2000


This document explains how to transfer, or migrate, an entire Linux
system, including LILO, from one hard disk to another.

In the following explanation, "/dev/hda" (first IDE hard disk) means the
"old" disk, and "/dev/hdb" (second IDE hard disk) means the "new" disk.

Specific partitions on the "old" disk are referred to as "/dev/hda1",
"/dev/hda2", and so on. Specific partitions on the "new" disk are
referred to as "/dev/hdb1", "/dev/hdb2", and so on.

The explanations in this document are based on Red Hat 6.0. They have
also been tested with Debian 2.1, Slackware 3.5 and SuSE 6.2; we
indicate a few differences to note if you're using those distributions.

If the commands don't work properly on your system, please let us know,
mentioning what distribution you're using.


1. Install both disks on your system
====================================

Modern systems can accept four "EIDE" devices on the hard disk
controller, so there shouldn't be any problem installing both disks on
your system at the same time, even if you also have other EIDE devices.
Hard disks and CD-ROM drives are typical EIDE devices. Floppy drives and
tape drives are usually connected to the floppy drive controller rather
than to the hard disk controller.

SCSI adapters are even more flexible and can accept seven devices. If
you're lucky (and rich) enough to have a SCSI adapter, you probably
already know this, and you probably know which of your devices are SCSI
devices! For more information, see the SCSI How-To.

Even the oldest systems can accept two devices on the hard disk
controller, so you can still install both hard disks at the same time.
However, if you already have another device installed in addition to
your hard disk (for example, if you have both a hard disk and a CD-ROM
drive), you'll have to remove the other device to be able to install the
old hard disk and the new hard disk at the same time.

You must configure the disks as "master" or "slave" by installing the
disks' jumpers as appropriate. You'll often find configuration
information on the disks themselves; if not, consult the manuals or the
disks' manufacturers.

You must also inform the BIOS of the disks' presence and of their
"geometry". Usually, you enter the BIOS setup programme by pressing a
key during the system boot-up. Here's what to do for some common BIOSes:

        Acer notebooks: F2 key during Power-On Self-Test (POST)

        American Megatrends (AMI): Del key during Power-On Self-Test

        Award: Del, or Ctrl-Alt-Esc

        Compaq: F10 key after the square appears in the top right corner
        of the screen during boot-up

        Dell: Ctrl-Alt-Enter

        DTK: Esc key during Power-On Self-Test

        Hewlett-Packard Pavilion: F1 key during HP blue splash screen

        IBM Aptiva 535: F1 while the square with the wavy lines is
        displayed in the upper right corner during power-on
        [Does this also apply to other Aptiva models?]

        IBM PS/2: Ctrl-Alt-Del, then Ctrl-Alt-Ins when the cursor is in
        the top right corner

        Mr. BIOS: Ctrl-Alt-S during Power-On Self-Test

        Packard Bell: For some models, F1 or F2 key during Power-On
        Self-Test

        Phoenix: Ctrl-Alt-Esc, or Ctrl-Alt-S, or Ctrl-Alt-Enter

        Many older systems require an Installation or Reference Disk.

(We're interested in receiving information on other BIOSes to add them
to this list.)

Reboot the system and login as root. If you use the "su" command to
become the user root, use "su -", with the hyphen option.


2. Unmount non-Linux partitions and network drives
==================================================

Some people like to mount partitions from other operating systems (DOS,
Windows, OS/2, etc.) so they can use them under Linux. These partitions
must be created and copied under their own operating system, and you
should unmount them before copying your Linux partition. For example, if
you have a DOS partition mounted at /dos, you must unmount it with this
command:

        umount /dos

Note that the command is "umount", without the first letter "n" in the
word "unmount".

You should also unmount network drives.


3. Partition the new disk
=========================

Use this command to partition the new disk:

        fdisk /dev/hdb

EIDE devices are identified as hda, hdb, hdc, and hdd in the /dev
directory. Partitions on these disks can range from 1 to 16 and are also
in the /dev directory. For example, /dev/hda4 refers to partition 4 on
hard disk a (first EIDE hard disk).

SCSI devices are listed as devices sda, sdb, sdc, sdd, sde, sdf, and sdg
in the /dev directory. Similarly, partitions on these disks can range
from 1 to 16 and are also in the /dev directory. For example, /dev/sda3
refers to partition 3 on SCSI disk a (first SCSI hard disk).

For Linux partitions with the ext2 file system, use system ID 83. For
swap partitions, use system ID 82.

For more information on partitioning, see the Installation How-To and
the Partitioning Mini How-To.

If your new disk has over 1024 cylinders, see the Large Disk Mini
How-To. In brief, you should install all files required to boot Linux
within the first 1024 cylinders. One way to do this is to create a small
partition (5 Mb or so) just for the /boot directory at the beginning of
the disk. (Slackware only: The kernel is at /vmlinuz rather than
/boot/vmlinuz, so you should put both the / directory and the /boot
directory in this partition.)

Partitions for systems other than Linux should be created using their
own fdisk or equivalent command rather than with Linux's fdisk.


4. Format the new disk
======================

Use the following command to format Linux partitions using ext2fs on the
new disk:

        mkfs.ext2 /dev/hdb1

To check the disk for bad blocks (physical defects), add the -c option
just before "/dev/hdb1".

If the new disk will have more than one Linux partition, format the
other partitions with "mkfs.ext2 /dev/hdb2", "mkfs.ext2 /dev/hdb3", and
so on. Add the -c option if desired.

(Note: With older distributions, the command "mkfs -t ext2 -c /dev/hdb1"
didn't check for bad blocks under any of Red Hat, Debian or Slackware,
contrary to what the man page stated. This has now been fixed.)

To format a swap partition, use this command:

    mkswap /dev/hdb1

Again, you can add the -c option before "/dev/hdb1" to check for bad
blocks.


5. Mount the new disk
=====================

Create a directory where you'll mount the new disk, for example
/new-disk, and mount it there:

        mkdir /new-disk
        mount -t ext2 /dev/hdb1 /new-disk

If the new disk will have more than one Linux partition, mount them all
under /new-disk with the same organization they'll have later.

Example: The new disk will have four Linux partitions, as follows:

        /dev/hdb1:    /
        /dev/hdb2:    /home
        /dev/hdb3:    /var
        /dev/hdb4:    /var/spool

Mount the four partitions under /new-disk as follows:

        /dev/hdb1:    /new-disk
        /dev/hdb2:    /new-disk/home
        /dev/hdb3:    /new-disk/var
        /dev/hdb4:    /new-disk/var/spool

You must create the mount points for each "level" before you mount the
partitions at that level. Example:

        mkdir /new-disk                               [1st level]
        mount -t ext2 /dev/hdb1 /new-disk

        mkdir /new-disk/home                          [2nd level]
        mount -t ext2 /dev/hdb2 /new-disk/home

        mkdir /new-disk/var                           [2nd level also]
        mount -t ext2 /dev/hdb3 /new-disk/var

        mkdir /new-disk/var/spool                     [3rd level]
        mount -t ext2 /dev/hdb4 /new-disk/var/spool

If you've created a mount point at /new-disk/tmp, you'll need to correct
the directory's permissions to let all users access it:

        chmod 1777 /new-disk/tmp


6. Copy the files from the old disk to the new disk
===================================================

You might want to go to single-user mode before starting to copy the
disk, in order to shut down the system daemons and preserve the state of
the logs, and to prevent users from logging in:

        /sbin/telinit 1

When copying the hard disk, you want to copy all directories and files,
including links.

However, you *don't* want to copy the directory /new-disk, since this
would copy the new disk to itself!

Furthermore, you want to create the /proc directory on the new disk, but
you don't want to copy its contents: /proc is a "virtual" file system
and doesn't have any actual files, but rather contains information on
the processes running on the system.

Here are three different ways to copy the old disk to the new one. This
may take quite a while, especially if you have a large disk or little
memory. You can expect to be able to copy 10 Mb per minute, and possibly
much more.

You can follow the copy's progress by using the command "df" from
another terminal. Try "watch df" or "watch ls -l /new-disk" to see a
report updated every two seconds; press Ctrl-C to end the display. Be
aware that running the "watch" programme itself will slow down the
copying.

a)      cp -ax / /new-disk

        This is the simplest method, but will only work if your original
        Linux system is on a single disk partition.

        The -a option preserves the original system as much as possible.
        The -x option limits cp to a single file system; this is
        necessary to avoid copying the /new-disk and /proc directories.

        (SuSE only: With this method only, you must also create the
        directory /dev/pts on the new disk. Use the command "mkdir
        /new-disk/dev/pts".)

        (Note: When using the -x option, recent versions of cp will
        create the directories /new-disk/new-disk and /new-disk/proc,
        although the directories will be empty. If these directories are
        created, you should delete /new-disk/new-disk, and keep
        /new-disk/proc.)

b)      cd / && echo cp -a `/bin/ls -1Ab |
        egrep -v "^new-disk$|^proc$"` /new-disk | sh

        (write this all on one line)

        This goes to the root directory and then copies all files and
        directories except /new-disk and /proc to /new-disk. Note that
        the first option after ls is the number 1, not the letter L!

        This command should work in all circumstances.

c)      cp -a /bin /boot /dev /etc /home /lib /lost+found
        /mnt /root /sbin /tmp /usr /var /new-disk

        (write this all on one line)

        The last directory, /new-disk, is the destination for the cp
        command. All the other directories are the sources. Therefore,
        we're copying all the directories we're listing to /new-disk.

        With this method, you simply list yourself the directories you
        want to copy. Here we listed all the directories except
        /new-disk and /proc. If you can't use the other methods for any
        reason, you can always use this command to manually specify the
        directories you want to copy.

        With this method only, if there are any files in the root
        directory itself, you need another command to copy them. In
        particular, this is required with Debian and Slackware, since
        these distributions put files in the root directory:

        cp -dp /* /.* /new-disk

Previous versions of the Mini How-To stated that you could also use
"tar" to copy the disk, but this method was found to have a bug. There
are of course many other ways to copy the disks, but these three are the
simplest, quickest, and most reliable.

After using any of these three methods, you must also create the /proc
directory on the new disk, if it doesn't already exist:

        mkdir /new-disk/proc

At this point, you may verify the file structure on the new disk, if you
wish:

        umount /new-disk
        fsck.ext2 -f /dev/hdb1
        mount -t ext2 /dev/hdb1 /new-disk

If the new disk has more than one partition, you must unmount them from
the "bottom up" before running fsck.ext2: in the example mentioned
above, you'd first unmount the 3rd level partitions, then the 2nd level
partitions, and then the 1st level partition.

You may also compare the two disks, to ensure that the files were copied
properly:

        find / -path /proc -prune -o -path /new-disk -prune -o -xtype f
        -exec cmp {} /new-disk{} \;

        (write this all on one line)

(Slackware only: A basic Slackware installation ("A" series only)
doesn't include the "cmp" command, so you won't be able to run this
command if you have only installed the basic files. The "cmp" command is
in the "AP1" series.)

This will only compare regular files, not character or block special
files (in the /dev directory), sockets, etc., since the "cmp" command
doesn't work properly with these. We would welcome suggestions on how to
verify these "special" files.


7. Modify /new-disk/etc/fstab as appropriate
============================================

If your new disk doesn't have the same partitions or organization as the
old disk, modify the file /new-disk/etc/fstab on the new disk as
appropriate.

Make sure that the disk partitions (first column) correspond to the
organization you'll have with the new disk, once the old disk has been
removed, and that you're only mounting one partition at "/" as shown in
the second column.

For more information on the format of the file /etc/fstab, see the Linux
System Administrator's Guide, section 4, under "Mounting and
unmounting".

For swap partitions, use a line similar to this one:

        /dev/hda1   swap    swap    defaults    0  0


8. Prepare LILO to boot the new disk
====================================

(Thanks to Rick Masters for helping with this.)

We're assuming that LILO is installed on the hard disk's Master Boot
Record (MBR); this seems to be the most common configuration. You want
to install LILO on what's presently the second hard disk but will become
the first hard disk.

Edit the file /new-disk/etc/lilo.conf as follows:

        disk=/dev/hdb bios=0x80       # Tell LILO to treat the second
                                      # disk as if it were the first
                                      # disk (BIOS ID 0x80).
        boot=/dev/hdb                 # Install LILO on second hard
                                      # disk.
        map=/new-disk/boot/map        # Location of "map file".
        install=/new-disk/boot/boot.b # File to copy to hard disk's
                                      # boot sector.
        prompt                        # Have LILO show "LILO boot:"
                                      # prompt.
        timeout=50                    # Boot default system after 5
                                      # seconds. (Value is in tenths of
                                      # seconds.)
        image=/new-disk/boot/vmlinuz  # Location of Linux kernel. The
                                      # actual name may include a version
                                      # number, for example
                                      # "vmlinuz-2.0.35".
            label=linux               # Label for Linux system.
            root=/dev/hda1            # Location of root partition on
                                      # new hard disk. Modify this as
                                      # appropriate for your system.
                                      # Note that you must use the name
                                      # of the future location, once the
                                      # old disk has been removed.
            read-only                 # Mount partition read-only at
                                      # first, to run fsck.

(Slackware only: Use "image=/new-disk/vmlinuz".)

If you're using a SCSI hard disk, you may have to add a line with
"initrd". See your existing file /etc/lilo.conf.

Install LILO on the new disk:

        /sbin/lilo -C /new-disk/etc/lilo.conf

The -C option tells LILO what configuration file to use.


9. Make a boot diskette (optional)
==================================

If you wish, you can make a boot diskette, in case you run into problems
when trying to boot the new disk.

Insert an empty diskette, format it, create a file system on it and
mount it:

        fdformat /dev/fd0H1440
        mkfs.ext2 /dev/fd0
        mount -t ext2 /dev/fd0 /mnt

(Debian only: With Debian 2.x, use "/dev/fd0u1440" instead of
"/dev/fd0H1440". With Debian 1.x, use "/dev/fd0h1440", with a lower case
"h".)

(Debian only: With Debian 2.x, use "superformat" instead of "fdformat".
You can ignore the error "mformat: command not found".  With Debian 1.x,
if you don't have the command "fdformat", you can omit it if the floppy
is already formatted. In this case, you should check the diskette for
bad blocks by adding "-c" after the "mkfs.ext2" command.)

(Slackware only: Use "/dev/fd0u1440" instead of "/dev/fd0H1440". With
older versions, try "/dev/fd0h1440", with a lower case "h".)

(SuSE only: Use "/dev/fd0u1440" instead of "/dev/fd0H1440".)

Copy all files in /boot to the diskette:

        cp -dp /boot/* /mnt

(Red Hat only: If the /boot directory contains both vmlinux and vmlinuz
files (note the difference in the last letter), you only need to copy
the vmlinuz files to the boot diskette. They are the same as the vmlinux
files, except that they're compressed to save space.)

(Slackware only: Copy the file /vmlinuz to the boot diskette; use the
command "cp /vmlinuz /mnt".)

Create a new file /mnt/lilo.conf as follows:

        boot=/dev/fd0                 # Install LILO on floppy disk.
        map=/mnt/map                  # Location of "map file".
        install=/mnt/boot.b           # File to copy to floppy's
                                      # boot sector.
        prompt                        # Have LILO show "LILO boot:"
                                      # prompt.
        timeout=50                    # Boot default system after 5
                                      # seconds. (Value is in tenths of
                                      # seconds.)
        image=/mnt/vmlinuz            # Location of Linux kernel on
                                      # floppy. The actual name may
                                      # include a version number, for
                                      # example "vmlinuz-2.0.35".
            label=linux               # Label for Linux system.
            root=/dev/hda1            # Location of root partition on
                                      # new hard disk. Modify this as
                                      # appropriate for your system.
                                      # Note that you must use the name
                                      # of the future location, once the
                                      # old disk has been removed.
            read-only                 # Mount partition read-only at
                                      # first, to run fsck.

Install LILO on the boot diskette:

        /sbin/lilo -C /mnt/lilo.conf

The -C option tells LILO what configuration file to use.

Unmount the diskette:

        umount /mnt


10. Remove the old disk
=======================

Shut down the system and remove the old disk. Remember to modify the
disk jumpers and the BIOS information to reflect the changes.


11. Reboot the system, modify LILO configuration file
=====================================================

Reboot the system. If you have problems, you can use the boot diskette
you just make. To do so, you may have to modify your BIOS's boot-up
sequence to "A:, C:".

You should modify the file /etc/lilo.conf in case you later want to run
LILO again. Here's an example of how the file can look:

        boot=/dev/hda                 # Install LILO on first hard
                                      # disk.
        map=/boot/map                 # Location of "map file".
        install=/boot/boot.b          # File to copy to floppy's
                                      # boot sector.
        prompt                        # Have LILO show "LILO boot:"
                                      # prompt.
        timeout=50                    # Boot default system after 5
                                      # seconds. (Value is in tenths of
                                      # seconds.)
        image=/boot/vmlinuz           # Location of Linux kernel. The
                                      # actual name may include a version
                                      # number, for example
                                      # "vmlinuz-2.0.35".
            label=linux               # Label for Linux system.
            root=/dev/hda1            # Location of root partition on
                                      # new hard disk. Modify this as
                                      # appropriate for your system.
            read-only                 # Mount partition read-only at
                                      # first, to run fsck.

(Slackware only: Use "image=/vmlinuz".)

Acknowledgements:
=================

Thanks to Scott Christensen, Frank Damgaard, Alexandre Fornieles, David
Fullerton, Igor Furlan, Jerry Gaines, Chris Gillespie, Nicola Girardi,
Per Gunnar Hansoe, Richard Hawes, Ralph Heimueller, Gerald Hermant, Andy
Heynderickx, Paul Koning, Hannu Liljemark, Claes Maansson, Rick Masters,
Jason Priebe, Josh Rabinowitz, Douglas Rhodes, Valentijn Sessink, Kragen
Sitaker, Stephen Thomas, and Gerald Willman.

This document may be translated into any language. If you do so, please
send a copy of the translation to Konrad Hinsen
<hinsen@cnrs-orleans.fr>.

  Red Hat Linux 6.X as an Internet Gateway for a Home Network
  Paul Ramsey <pramsey@refractions.net>

  June 22, 2000

  A simple tutorial on configuring Red Hat 6 and related variants to
  operate as an internet gateway to a small home or office network. Top
  ics covered include masquerading, DNS, DHCP, and basic security.

  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Versions
     1.2 Copyright

  2. Plugging Things In

     2.1 With a Hub
     2.2 Without a Hub
     2.3 With Only One Network Card

  3. Configuring Networking

     3.1 Configuring a Network Driver
        3.1.1 Two Identical Network Cards
     3.2 Configuring the Inside Network
        3.2.1 The Network Device
        3.2.2 The DHCP Server
        3.2.3 The Client Computers
        3.2.4 The DNS Server
        3.2.5 Testing the Inside Network
     3.3 Configuring the Outside Network
        3.3.1 With a Static IP
        3.3.2 With DHCP
        3.3.3 Quirks and Anomalies
           3.3.3.1 PPP Over Ethernet (PPPoE)
           3.3.3.2 Stupid DHCP Tricks
           3.3.3.3 Road Runner
        3.3.4 Looking at the Network Entries
     3.4 Security

  4. Configuring Masquerading

  5. Problems

     5.1 ICQ Does Not Work
     5.2 I Have Caldera 2.X Not Red Hat 6.X
     5.3 I Want One of My Internal Machines to be my Web Server


  ______________________________________________________________________

  1.  Introduction

  This page contains a simple cookbook for setting up Red Hat 6.X as an
  internet gateway for a home network or small office network. The
  instructions are very simplified: no special cases will be discussed,
  and some assumptions will be made about which network addresses are to
  be used. The most important assumptions are:



    You have a fulltime Cable or ADSL connection to the Internet.

    You can successfully install Red Hat 6.X on at least one of your
     computers. Note that these directions are also valid for Red Hat
     derivatives, such as Mandrake 6.X which is distributed by MacMillan
     Publishing under a variety of labels.

    Your Linux computer has two network cards installed in it and both
     are compatible with Linux.

    You have an ethernet hub if you are networking more than one
     computer or a cross-over cable if you are only networking one
     computer.

    You know how to edit text files on your Linux machine.

    You can log into your machine as root. You know how to install RPM
     packages from your Linux CDROM.

  If you do not meet any of these assumptions, then this document
  probably isn't for you.

  There is nothing special that you have to do during the installation
  process.  Simply choose an installation which makes sense for you and
  go for it. This document gives directions on installing everything to
  do with networking from scratch, to avoid making any assumptions about
  what was installed or configured during installation. To ensure that
  things work and there is no confusion about what information goes
  where, all the configuration will be done by directly editing the
  system configuration files rather than using the GUI configuration
  tools provided with Red Hat. On the one hand, this might be a little
  harder than it has to be; on the other hand, your knowledge will be a
  good deal more transferable to different distributions and situations
  (like, what if X doesn't work, or you are setting up a headless
  server).

  1.1.  Versions

  The latest version of this document should always be available at
  http://www.coastnet.com/~pramsey/linux/homenet.html for the HTML
  version and http://www.coastnet.com/~pramsey/linux/homenet.sgml for
  the SGML version.


    December 21, 1999 : First version.

    January 2, 2000 : Incorporated suggestions from John Mellor on
     outside networking quirks.

    January 22, 2000 : Minor update about identical network cards and
     info on IP aliasing from Chris Lea.

    March 16, 2000 : Some information on name server security and on
     supporting Caldera from Nelson Gibbs.

    June 22, 1000 : Red Hat 6.2 configuration quirk documented. More
     PPPoE info from Kerr First.

  1.2.  Copyright

  Copyright  2000, Paul Ramsey.

  This manual may be reproduced in whole or in part, without fee,
  subject to the following restrictions:


    The copyright notice above and this permission notice must be
     preserved complete on all complete or partial copies.

    Any translation or derived work must be approved by the author in
     writing before distribution.

    If you distribute this work in part, instructions for obtaining the
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

    Small portions may be reproduced as illustrations for reviews or
     quotes in other works without this permission notice if proper
     citation is given.


  Exceptions to these rules may be granted for academic purposes: Write
  to the author and ask. These restrictions are here to protect us as
  authors, not to restrict you as learners and educators.

  2.  Plugging Things In

  Depending on whether you are using a hub or not, your network topology
  will differ slightly. I am only covering networking with RJ45 cabling
  (the stuff that looks like phone cables on steroids) and not covering
  thin coax.  With thin coax you can network multiple machines without
  requiring a hub, but have to be more careful about terminating
  connections and so on. If you know networking already, these
  instructions will be largely redundant.

  2.1.  With a Hub

  If you have a hub, your network will look like this
  <http://www.coastnet.com/~pramsey/linux/w_hub.gif>.

  Connect the eth0 card on the Linux box to the cable modem or ADSL box
  using the cable supplied by the service provider during their install
  (or one you know works in that configuration. This is important
  because sometimes cable modems like to be connected with a crossover
  and sometimes they like a straight-through through cable: the one the
  company gives you is the one you want to use.

  Connect the eth1 card on the Linux box to the hub with a straight-
  through cable. Connect all your other computers to the hub with
  straight-through cables.

  2.2.  Without a Hub

  If you do not have a hub, you can still connect one computer to your
  Linux box, using a crossover cable. Your topology will look like this
  <http://www.coastnet.com/~pramsey/linux/wo_hub.gif>.

  Connect the eth0 card on the Linux box to the cable modem or ADSL box
  using the cable supplied by the service provider. Connect the eth1
  card on the Linux box to the other computer with a crossover cable.

  2.3.  With Only One Network Card

  This is not a recommended configuration (in this configuration your
  internal and external networks are on the same physical network, and
  are therefor theoretically more susceptible to cracking; in reality,
  the risk is probably very low), but it can be done. Your mileage may
  vary.

  The Linux kernel includes support for "IP aliasing", which allows an
  ethernet card to service two different IP addresses simultaneously.
  The stock kernels shipped with Red Hat and Mandrake include support
  for IP aliasing by default.  To set up your gateway with only one
  ethernet card, in all the subsequent code examples, simply replace
  eth1 with eth0:0.

  In a single-card situation, running a DHCP server is not recommended.

  Plug all your machines and your cable modem or ADSL box into the hub.
  Cross your fingers and continue.

  3.  Configuring Networking

  OK, by now you have installed Linux on your gateway computer. You may
  have even configured one of your networking cards, and set up
  connectivity to the Internet. However, we are going to start from
  scratch and pretend that nothing is configured at all.

  Log in as root. All the instructions given in this document assume you
  are logged in as root.

  The Linux kernel refers to your two ethernet cards as eth0 and eth1,
  so that is how I'll be referring to them from now on too. The trouble
  is, which one is which? Here's a "simple" way of figuring out,
  guaranteed to work at least 50% of the time: lay your computer on the
  desk with the motherboard horizontal and the back panel facing you (as
  you would if you were going to open it and do some work on it). The
  leftmost card is eth0 -- you might want to label it with some masking
  tape. Now, write down on a piece of paper the make and model of both
  eth0 and eth1.

  OK, let's see if eth0 and eth1 are recognized automatically by the
  kernel.  Type ifconfig eth0 and ifconfig eth1. In both cases, if the
  kernel is recognizing your card, you should see something like this
  (bearing in mind that the numbers and whatnot will be different):


  eth0   Link encap: Ethernet   HWaddr 00:60:67:4A:02:0A
         inet addr:0.0.0.0  Bcast:0.0.0.0  Mask:255.255.255.255
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:466 errors:0 dropped:0 overruns:0 frame:0
         TX packets:448 errors:0 dropped:0 overruns:0 carrier:0
         collisions:85 txqueuelen:100
         Interrupt:10 Base address:0xe400



  If the kernel is not recognizing your network card you will see
  something like this:


  eth0: error fetching interface information: Device not found.



  3.1.  Configuring a Network Driver

  If both of your cards were found, skip to the next section. Otherwise,
  read this section.

  OK, so one or both of your cards are not recognized by the kernel.
  This is not a problem, really. What we're going to have to do is tell
  the kernel more explicitly how to find your cards. There are lots of
  twists and turns here, and I'm not going to cover all of them.
  Remember, when the going gets tough, the tough turn to the Ethernet
  HOWTO. Here's some summary advice:
    You have a PCI network card. You are probably sitting pretty,
     assuming it is not so new and cutting edge that no drivers exist.
     You can often find out a great deal about your network cards (and
     other things) by reading through /proc/pci and noting down makes
     and models.

    You have an ISA network card. It is possible you will have to know
     the IO base address and the IRQ the card is operating on. You have
     manuals, right?  Right? If not, this would be a good time to surf
     to the manufacturer's web site and see if they have any online
     references. Or if you have an old DOS configuration diskette, boot
     to DOS and see if there is a setup program which will read and set
     the address and IRQ.

    You have an ISA Plug'n'Play card. You'll have to learn how to
     configure it first -- read the Plug'n'Play HOWTO. Fortunately,
     oncee you've configured your card you will know exactly what the IO
     base and IRQ are.

  Now, since you know what the make and model of eth0 and eth1 are you
  can go to the compatibility page of the Ethernet HOWTO and look up
  your card. Take note of the recommended driver, and any information
  about special options your card may require. Write it down.

  It's time to edit a configuration file! The file we will be editing is
  /etc/conf.modules. Open this file up in the text editor of your
  choice. Because there are so many possibilities and combinations of
  things which can go in this file, I'm going to give my own gateway as
  an example. I have a PCI 10/100Mb card based on the VIA Rhine chip,
  and a plain-jane 10Mb NE2000 ISA clone. I use the 100Mb card for the
  internal network and the 10Mb card for the external connection. My
  /etc/conf.modules file looks like this:


  alias parport_lowlevel parport_pc
  alias eth0 ne
  options ne io=0x300 irq=10
  alias eth1 via-rhine



  My conf.modules file is laid out as follows:


    The first line is there to configure my parallel port for printing.
     You probably have a similar line. Leave it alone.

    The second line (alias eth0 ne) tells the kernel to use the ne
     driver for the eth0 device.

    The third line (options ne io=0x300 irq=10) tells the ne driver at
     which io address and irq interrupt it will find the ISA card at. If
     you have ISA cards you will probably have to use this kind of
     directive, just replace the driver, io and irq directives with the
     correct information for your card.

    The fourth line (alias eth1 via-rhine) tells the kernel to use the
     via-rhine driver for eth1. Because my eth1 card is a PCI card, I do
     not need to provide io or irq information: the PCI subsystem
     configures the device automatically.

  You will want to ensure that you have alias entries in conf.modules
  for both your cards, and correct options lines for all your ISA cards.
  You may already have lines in conf.modules for any ethernet cards you
  configured during installation.
  When you have finished editing conf.modules, try ifconfig eth0 and
  ifconfig eth1 again. You may have to apply some trial and error if you
  are messing with IO addresses and IRQs without a manufacturers manual.

  3.1.1.  Two Identical Network Cards

  So, you were really really smart, bought two identical network cards
  for your Linux gateway, and now you cannot get them to work together?
  Do not worry, getting them to coexist is just a matter of using the
  correct syntax in /etc/conf.modules.  For this example, the addresses
  and IRQ numbers are made up, and I will assume that you have bought a
  matched pair of NE2000 clones (a common choice). Your
  /etc/conf.modules file should look like this:


  alias eth0 ne
  alias eth1 ne
  options ne io=0x330,0x360 irq=7,9



  The addressing options are all given on the same line, and the first
  number for each addressing type is for eth0, the second number for
  eth1.

  3.2.  Configuring the Inside Network

  The "inside network" is the network which all your home/office
  machines will talk on. The "outside network" is the big scary internet
  on the other side of the Linux box. By and large, the inside network
  will be completely insulated from the outside network by the Linux
  box, which will operate as a medium strength firewall.

  3.2.1.  The Network Device

  Now that your drivers are working and you can see both eth0 and eth1
  in ifconfig it is time to set up the internal home network. I am
  assuming that you are going to put your internal network on eth1 and
  your external device on eth0.

  Your internal network is going to be a private network and will
  therefor be on a special network reserved for internal networking:
  192.168.1.0. This is a "private Class C network", in case you want to
  impress your friends.

  First we need to make sure networking is turned on. Edit the file
  /etc/sysconfig/network and make sure the following lines exist:


  NETWORKING=yes
  FORWARD_IPV4=yes



  The first line tells Linux that we want the network devices brought up
  at boot time. The second line tells Linux to enable IP forwarding.
  This is required when we start configuring masquerading in Section 4.

  Redhat 6.2 Note: In order to properly support IP forwarding and
  masquerading, Red Hat 6.2 requires changes to the /etc/sysctl.conf
  file. Make sure the following lines exist and are set to the correct
  values:


  net.ipv4.ip_forward = 1
  net.ipv4.ip_always_defrag = 1



  All the network interface settings for Red Hat and Red Hat derivatives
  are contained in files in the /etc/sysconfig/network-scripts
  directory. Enter that directory, and create a new file ifcfg-eth1. Put
  the following into the ifcfg-eth1 file:


  DEVICE=eth1
  IPADDR=192.168.1.1
  ONBOOT=yes



  This code tells the networking scripts to configure eth1 at boot time
  and to give it a particular IP address. Activate your network with the
  new settings with the following command: /etc/rc.d/init.d/network
  restart

  3.2.2.  The DHCP Server

  A DHCP server will automatically configure devices on your internal
  home network with IP addresses. This is very useful for people with
  laptops: they can simply plug their machines in and be immediately
  properly configured. If you do not want a DHCP server on your internal
  network, just skip to the next section.

  First you need to be sure you have the DHCP server installed. Mount
  your Linux CD and install the dhcp RPM. Now edit the /etc/dhcpd.conf
  file and put the following (and only the following) in it:


  subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.2 192.168.1.60;
    default-lease-time 86400;
    max-lease-time 86400;
    option routers 192.168.1.1;
    option ip-forwarding off;
    option broadcast-address 192.168.1.255;
    option subnet-mask 255.255.255.0;
  }



  If you are going to set up your Linux box as a caching domain name
  server, insert the following option:


  option domain-name-servers 192.168.1.1;



  If you know your outside DNS addresses and you are not going to use
  the Linux box for DNS, insert the following option, where x.x.x.x and
  y.y.y.y are IP numbers of the DNS servers:



  option domain-name-servers x.x.x.x, y.y.y.y;



  If you are going to run Samba file sharing on the Linux box for your
  Windows computers, add the following options to use the Linux box as
  the default WINS and browsing server:


  option netbios-name-servers 192.168.1.1;
  option netbios-dd-server 192.168.1.1;
  option netbios-node-type 8;
  option netbios-scope "";



  Configuring Samba and WINS is well beyond the scope of this document.
  If you need some pointers, start with the SMB HOWTO and go on from
  there.

  There are still a few more steps. Next, edit the
  /etc/rc.d/init.d/dhcpd file and look for the following line:


  /sbin/route add -host 255.255.255.255 dev eth1



  Windows DHCP clients require a particular broadcast address in DHCP
  responses, and this command forces the Linux TCP/IP stack to produce
  it. If you cannot find that line in the file, add it. If you do find a
  line like that one, make sure that the device it references is eth1.

  The next step is to alter the /etc/rc.d/init.d/dhcpd file to use eth1
  as the default device. Replace the line:


  daemon /usr/sbin/dhcpd



  With:


  daemon /usr/sbin/dhcpd eth1



  OK, now we are ready to start up DHCP. First start the DHCP server
  with the command: /etc/rc.d/init.d/dhcpd start.

  Finally, we have to make sure that the DHCP server will start at re-
  boot time. Some RPM packages of the DHCP server do not include
  directives to ensure the server starts every time, so we'll make sure
  it gets started by invoking the command chkconfig dhcpd on.

  This command causes RedHat to add the dhcp startup script to the
  various runlevel directories under /etc/rc.d. In runlevels 3 and 5
  (multiuser console and multiuser X) the DHCP server is started. In
  runlevels 0, 1 and 6 (shutdown, single user and reboot) the DHCP
  server is stopped.
  3.2.3.  The Client Computers

  If you have set DHCP up, configuring your client computers is very
  easy: just enable DHCP configuration. For Windows computers, this
  involves opening the "Control Panel" and then the "Networking" option.
  Find the "TCP/IP" protocol and opt to "Configure" it. Check the box
  that says to "Configure TCP/IP address automatically", apply your
  changes, and reboot.

  Before you reboot, you might want to type the following command: tail
  -f /var/log/messages. This will watch the Linux system log
  continuously. If all goes well, when you reboot your Windows computer,
  you will see it request an IP address and see the DHCP server respond.
  Control-C exits the tail -f command.

  If you have not set up DHCP, configuration is still fairly easy.
  Again, open the "Networking" option from the "Control Panel", and
  choose to configure the TCP/IP protocol. You can assign your client
  computers any address in the 192.168.1.0 network except 192.168.1.0
  (the network address), 192.168.1.255 (the broadcast address) or
  192.168.1.1 (your Linux server). Never give two computers the same IP
  address. Set the "Gateway" address to 192.168.1.1, so that outgoing
  traffic is routed through your Linux gateway.

  The IP Masquerading HOWTO has very detailed information on client
  configuration in the Configuration Section.

  In general, to configure a client computer, either enable DHCP
  configuration, or manually assign it an address in the 192.168.1.X
  network with a gateway of 192.168.1.1. Let the DNS server be either
  192.168.1.1 if you are running a caching DNS server (see below) or
  point the DNS at the addresses assigned by your network provider.

  3.2.4.  The DNS Server

  Setting up your Linux box as a caching DNS server will (slightly)
  improve your netsurfing speed, because commonly used DNS addresses
  will get cached inside your network and not have to be retrieved from
  the outside.

  If you are interesting in doing full blown DNS, there is a great deal
  of complexity to be learned. There is a DNS HOWTO available, and the
  book DNS and BIND is a good (and very comprehensive) paper reference.

  In order for your client machines to take advantage of the caching
  server, they must be configured to use the Linux gateway as their
  primary DNS server.  The DHCP directives given in section 3.2.2 are
  one way to accomplish this.  If you are configuring your client
  computers by hand, you can change the DNS configurations in the same
  control tabs you used to set the IP address of the machine.

  To install the DNS server, first install the bind RPM, then install
  the caching-nameserver RPM. At this point, you are almost ready.

  As installed, the caching server will work fine, but if you know the
  IP addresses of the internet providers DNS servers you can improve
  performance slightly by editing the /etc/named.conf file and adding
  the following line after the directory line (where x.x.x.x and y.y.y.y
  are the primary and secondary DNS servers):


  forwarders { x.x.x.x; y.y.y.y; };



  This change makes your DNS server first query the ISPs DNS servers
  before traversing the internet in search of a given address. The ISPs
  servers often have a rich cache of DNS information and can provide a
  much faster answer than your server could.

  The named daemon has had some security problems over the past 12
  months, so it is very important that you have the latest version
  running, and make some changes to the default settings to enhance
  security.


  1. Check your version of bind and make sure it is at least 8.2.2. Go
     to the Red Hat Updates or Mandrake Updates sites to check for the
     latest version.

  2. Restrict access to your name server to just the local network by
     adding the line allow-query { 192.168.1/24; 127.0.0.1/32; }; to the
     /etc/named.conf file after the forwarders line.

  3. Avoid running your name server as root. If your server is running
     as root, an exploit of the server will grant the exploiter root
     privledges. If you run the server as a powerless user, like nobody,
     you can lower the risk of a name server exploit. To run your name
     server as nobody, edit the /etc/rc.d/init.d/named file and change
     the line daemon named to daemon named -u nobody -g nobody.

  Make sure your DNS server will start at boot time: chkconfig named on.
  Again, this ensures that the server will start in the usual runlevels
  (3 and 5) at boot time.

  OK, now you can start your DNS server: /etc/rc.d/init.d/named start

  3.2.5.  Testing the Inside Network

  Until we configure the outside network, the DNS service will not work
  (since it has to communicate with other DNS servers on the internet),
  but we can test out the basic internal connectivity with the ping
  program.

  On one of your client computers, open up a terminal (MSDOS) window,
  and type ping 192.168.1.1. This will send out packets to your Linux
  computer at regular intervals, and your Linux computer will reflect
  the packets back. If things are working right, you should see a set of
  packet return times.

  3.3.  Configuring the Outside Network

  Now we're ready to configure the outside network. Sometimes this will
  be difficult, depending on how well your internet provider supports
  Linux. If you have difficulty, there is an ADSL mini-HOWTO which
  covers ADSL issues in some detail.  If I can find a Cable Modem HOWTO,
  I will link to it also.

  The main problem with most outside connections is getting an IP
  address.  Some internet providers hand out static IP addresses to
  cable or ADSL subscribers, and in that case configuration is easy.
  However, most providers have now moved to dynamic configuration via
  (you guessed it) DHCP. This means that your Linux computer will likely
  be a DHCP server on your eth1 interface, and a DHCP client on your
  eth0 interface.

  Additionally, many providers have taken to providing their services in
  specialized non-standard ways which assume their customers will be
  using Windows.  Some of those cases will be discussed at the end of
  section 3.3.2.

  3.3.1.  With a Static IP

  If your internet provider has assigned you a static IP address, you
  are sitting pretty. First, create a new interface configuration file,
  /etc/sysconfig/network-scripts/ifcfg-eth0 and put the following in it:


  DEVICE=eth0
  IPADDR=x.x.x.x
  NETMASK=y.y.y.y
  ONBOOT=yes



  Just fill in x.x.x.x and y.y.y.y with the values given by your
  internet provider. Now edit the /etc/resolv.conf file and enter the
  following information:


  search provider_domain_here
  nameserver n.n.n.n
  nameserver m.m.m.m



  The provider_domain should be supplied by your internet provider. Also
  enter the primary and secondary DNS servers in the n.n.n.n and m.m.m.m
  lines.  If you have set up the Linux box as a DNS server, you can add
  a line before the other nameserver entries: nameserver 127.0.0.1. This
  will make your Linux server use the caching server before asking the
  outside servers for DNS information.

  3.3.2.  With DHCP

  If your internet provider uses DHCP configuration, you need to create
  a new interface configuration file, /etc/sysconfig/network-
  scripts/ifcfg-eth0and put the following in it:


  DEVICE=eth0
  BOOTPROTO=dhcp
  ONBOOT=yes



  Now make sure that the dhcpcd client daemon is installed on your
  system.  Go to your Linux CD and install the dhcpcd RPM package.

  It's time to test your new network configuration. Just use the command
  /etc/rc.d/init.d/network restart. Now test your outside connection
  with ping.  Ping a computer on the internet, like www.yahoo.com and
  see if anything comes back.

  3.3.3.  Quirks and Anomalies

  Your situation may differ from the very simple situations described
  above.  Here are some short remarks on the various difficulties and
  links to more authoritative resources and addressing them. Thanks to
  John Mellor for supplying the links and impetus for adding this
  section.



  3.3.3.1.  PPP Over Ethernet (PPPoE)

  Several ADSL providers (Bell Atlantic, for example) are now insisting
  that their new customers connect to the service using the "PPP over
  Ethernet" protocol (PPPoE). To this end, they provide a Windows client
  program: not very useful for Linux users. Fortunately, PPPoE is a
  simple protocol and several efforts are underway to support it under
  Linux.


    The Roaring Penguin PPPoE Client comes highly recommended by reader
     Kerr First.

    PPPoE on Linux for Bell Sympatico

    PPPoE on Linux for Sympatico (General Info) (Linux Info)

  3.3.3.2.  Stupid DHCP Tricks

  One of the favorite tricks network providers play is to tie your
  service to a unique hostname, or even a unique network interface card.
  This is presumably to keep you from plugging multiple computers into
  your ethernet port using a hub (of course, by using Linux and
  Masquerading you're getting the same effect with better security and
  the cable company has no way of knowing!).

  If the provider has given you a hostname and insisted that you set
  your Windows box with that name in order you use their service, then
  you'll have to make sure that your Linux box sends in that hostname
  when requesting an address from the DHCP server.

  The Red Hat DHCP client is called when you set the BOOTPROTO to dhcp
  in the interface configuration file, but it is called without
  reference to a hostname.  To call the program with a hostname, in Red
  Hat 6.1, edit the /etc/sysconfig/network file, and change the line:

  HOSTNAME=

  To read this:

  HOSTNAME=your_isp_assigned_name

  This may not work in some of the Red Hat variants. If it does not
  work, check the /sbin/ifup script and see if the call to dhcpcd and
  pump include a -h $HOSTNAME switch. If they do not, add them, so the
  calls look like /sbin/dhcpcd -i $DEVICE -h $HOSTNAME and /sbin/pump -i
  $DEVICE -h $HOSTNAME.

  3.3.3.3.  Road Runner

  The Road Runner cable service has a special login process which must
  be run before the server can be used. Fortunately, a detailed Linux
  Road Runner HOWTO is available.

  3.3.4.  Looking at the Network Entries

  Now you can admire your work. Type ifconfig to see all your configured
  devices. On my gateway computer, it looks like this:



  eth0  Link encap:Ethernet  HWaddr 00:60:67:4A:02:0A
        inet addr:24.65.182.43  Bcast:24.65.182.255  Mask:255.255.255.0
        UP BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1
        RX packets:487167 errors:0 dropped:0 overruns:0 frame:0
        TX packets:467064 errors:0 dropped:0 overruns:0 carrier:0
        collisions:89 txqueuelen:100
        Interrupt:10 Base address:0xe400
  eth1  Link encap:Ethernet  HWaddr 00:80:C8:D3:30:2C
        inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
        UP BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1
        RX packets:284112 errors:0 dropped:0 overruns:0 frame:1
        TX packets:311533 errors:0 dropped:0 overruns:0 carrier:0
        collisions:37938 txqueuelen:100
        Interrupt:5 Base address:0xe800
  lo    Link encap:Local Loopback
        inet addr:127.0.0.1  Mask:255.0.0.0
        UP LOOPBACK RUNNING  MTU:3924  Metric:1
        RX packets:12598 errors:0 dropped:0 overruns:0 frame:0
        TX packets:12598 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0



  Note that the eth0 interface has a fancy outside IP address, and the
  eth1 address has a private internal address.

  You can look at the network routes by typing the route command. On my
  gateway computer it looks like this:


    Kernel IP routing table
    Destination     Gateway      Genmask         Flags Metric Ref Use Iface
    255.255.255.255 *            255.255.255.255 UH    0      0     0 eth1
    192.168.1.0     *            255.255.255.0   U     0      0     0 eth1
    24.65.182.0     *            255.255.255.0   U     0      0     0 eth0
    127.0.0.0       *            255.0.0.0       U     0      0     0 lo
    default         24.65.182.1  0.0.0.0         UG    0      0     0 eth0



  Here we can see the outside network is set up, the inside network is
  set up, the local device is set up, the special 255.255.255.255
  broadcast address is set up, and the default route is set up to point
  to the internet providers gateway. Perfect!

  Now you have the outside, and the inside. All the remains is to open
  the door between the two. First though, we have to make sure no
  monsters can get in from the outside.

  3.4.  Security

  One of the drawbacks of being permanently connected to the internet
  via ADSL or cable is that your computer is exposed to potential
  security threats 24 hours a day, 7 days a week. Using Linux as a
  gateway reduces the risks, because it hides all your other computers:
  as far as the rest of the internet is concerned, only your Linux box
  is available for connections. This means that your network is only as
  secure as your Linux box, so at this point I'll give a few basic tips
  to make your box more secure.

  First, you need to shut out all the bad guys. To do this, edit the
  file /etc/hosts.deny and make sure it looks just like this:


  #
  # hosts.deny  This file describes the names of the hosts which are
  #             *not* allowed to use the local INET services, as decided
  #             by the '/usr/sbin/tcpd' server.
  #
  #            The portmap line is redundant, but it is left to remind you that
  #        the new secure portmap uses hosts.deny and hosts.allow. In particular
  #             you should know that NFS uses portmap!
  ALL: ALL



  This tells the "TCP wrappers" -- which control 95% of incoming
  connections -- to deny all connections from all hosts. That's a pretty
  good rule! But, it will also keep you from connecting to your Linux
  box from inside your home network, which is annoying, so we will make
  one exception.  Edit the file /etc/hosts.allow and make sure it looks
  just like this:


  #
  # hosts.allow  This file describes the names of the hosts which are
  #              allowed to use the local INET services, as decided
  #              by the '/usr/sbin/tcpd' server.
  #
  ALL: 127.0.0.1
  ALL: 192.168.1.



  This tells the "TCP wrappers" that they can allow connections to all
  services from the local device (127.0.0.1) and from your home network
  (192.168.1.).

  You have now locked the monsters outside, with a strong padlock. If
  you want to put up bars and alarm systems, you will have to be alot
  more sophisticated.  The Security HOWTO is a good place to start if
  you want to learn more about securing your Linux box.

  4.  Configuring Masquerading

  All right! The preliminaries are over, this is where the magic begins.
  IP masquerading is one of the truly magical services Linux provides.
  There are commercial products for Windows which do the same thing, but
  not nearly as efficiently: an ancient 386 can merrily provide IP
  masquerading services to a whole medium sized office, but cannot even
  run Windows 95, let alone the add on masquerading package. (As an
  addendum, I read in some recent reviews that Windows 2000 will support
  "connection sharing" without addon software. It looks like the
  companies which sold connection sharing software have been "embraced
  and extended" by MicroSoft. However, I wouldn't recommend you try the
  Windows 2000 solution on a 386.)

  Linux has an extremely versatile firewalling capability, and we are
  going to be using it in the simplest and crudest possible manner. If
  you want to learn how to do firewalling like an expert, you should
  read both the Firewalling HOWTO for an understanding of the theory and
  the IPChains HOWTO for instructions on the new ipchains firewalling
  tool which ships with the Linux 2.2.X kernel (and by extension Red Hat
  6.X).  There is also now a very good IP Masquerading HOWTO available
  which has more details on masquerading tweaks.

  Configuring simple masquerading is very very easy once your internal
  and external networking is operational. Edit the /etc/rc.d/rc.local
  file and add the following lines to the bottom:


  # 1) Flush the rule tables.
  /sbin/ipchains -F input
  /sbin/ipchains -F forward
  /sbin/ipchains -F output
  # 2) Set the MASQ timings and allow packets in for DHCP configuration.
  /sbin/ipchains -M -S 7200 10 60
  /sbin/ipchains -A input -j ACCEPT -i eth0 -s 0/0 68 -d 0/0 67 -p udp
  # 3) Deny all forwarding packets except those from local network.
  #    Masquerage those.
  /sbin/ipchains -P forward DENY
  /sbin/ipchains -A forward -s 192.168.1.0/24 -j MASQ
  # 4) Load forwarding modules for special services.
  /sbin/modprobe ip_masq_ftp
  /sbin/modprobe ip_masq_raudio



  The last two lines insert kernel modules which allow FTP and RealAudio
  to work for computers on the inside network. There are other modules
  for special services which you can tack on if you need them:


    CUSeeMe (/sbin/modprobe ip_masq_cuseeme)

    Internet Relay Chat (/sbin/modprobe ip_masq_irc)

    Quake (/sbin/modprobe ip_masq_quake)

    VDOLive (/sbin/modprobe ip_masq_vdolive)

  Now you're ready to try masquerading! Run the rc.local script with the
  command /etc/rc.d/rc.local and you are ready to go! Sit down at one of
  your other computers and try some web surfing. With any luck,
  everything is now hunky dory.

  5.  Problems

  There are lots and lots of things which can go wrong using a simple
  document like this, because there are plenty of special cases. The
  majority of possible problems adhere to the configuration of the
  internal and external network devices.  I will try and respond to
  people with problems, figure out what went wrong and add links down
  here so that people with special case problems can track down help.
  Feel free to contact me at pramsey@refractions.net.

  5.1.  ICQ Does Not Work

  Some portions of ICQ work fine over masquerading. Other portions do
  not work well at all. There is a beta quality ICQ module under
  development, however, which addresses some (but not all) of the
  deficiencies of running ICQ over masquerading. The README file in the
  source code distribution describes how to compile the module. Once you
  have it compiled and installed, invoke /sbin/modprobe ip_masq_icq.

  5.2.  I Have Caldera 2.X Not Red Hat 6.X

  Well, firstly congratulations for bucking the trend! Secondly, Nelson
  Gibbs (ngibbs@pacbell.net) sends good news, because most of these
  instructions will work for you. There are some important changes to
  note however:


  1. A GATEWAY=xxx.xxx.xxx.xxx statement in /etc/sysconfig/network-
     scripts/ifcfg-eth0 & eth1 for the interface (local interface uses
     remote interface IP address and remote interface uses service
     provider's gateway IP).

  2. Make sure /etc/sysconfig/daemons/dhcpd script lists ROUTE_DEVICE as
     eth1 not eth0.

  3. /etc/dhcpd.conf requires a subnet statement for both interfaces
     (I'm not entirely sure why as I made my second statement : subnet
     216.102.154.201 netmask 255.255.255.255 { } with no other options
     and the DHCP server listens and sends on eth0 and eth1 as well as
     the fallback). The DHCP server errors out if only one subnet is
     listed.

  4. Do not add host route 255.255.255.255, the /etc/rc.d/init.d/dhcpd
     script Caldera uses already fixes the problem. DO make sure to
     change all references to eth0 in the script to eth1.

  5.3.  I Want One of My Internal Machines to be my Web Server

  Piece of cake! However, you need to have a static IP address for this
  easy set of directions to work. If you have a dynamic IP address, you
  will need some additional scripting to ensure that your IP address
  gets updated in the port forwarding commands when the address changes.

  Bear in mind, forwarding an external port to an inside machine makes
  your "internal" machine less "internal" than before, but it can be
  done very transparently and with little or no performance degredation.
  One of the side effects of the IP masquerading code in the Linux
  kernel is the ability to do some pretty funky stuff with packets as
  they hit the network layer, and the ipmasqadm utility is built to take
  advantage of that.

  For some reason ipmasqadm is not shipped with all the Red Hat and
  Mandrake variants, so will probably have to retrieve it from the
  maintainer's web site -- there is an RPM available there as well as
  source code.

  Once you have the RPM, install it, and then add the following lines to
  your /etc/rc.d/rc.local file:


  /usr/sbin/ipmasqadm portfw -f
  /usr/sbin/ipmasqadm portfw -a -P tcp -L x.x.x.x 80 -R 192.168.1.x 80



  The first command flushes the port forwarding rules and the second
  command adds a forward from port 80 on the external interface to port
  80 on the internal machine. Note that the external static IP address
  goes in the x.x.x.x space and the internal machine IP address goes in
  the 192.168.1.x space.

  Now external requests for port 80 will be transparently sent to port
  80 of the internal machine. Note that you cannot test this by
  telnetting or connecting to your gateway's port 80 from one of your
  inside machine: the port forwarder only honors requests coming in on
  the external interface.



Index of /pub/Linux/docs/HOWTO/mini
-------------------------------------------------------------------------------
o Linux-mini-HOWTOs.tar.gz
        tar file of all the mini-HOWTOs

o other-formats
        Directory containing other formats of the mini-HOWTOs

o 3-Button-Mouse
        How to configure your mouse to use 3 buttons

o ADSL
        Asymmetric Digital Subscriber Loop (ADSL), a new high-speed digital access line technology

o ADSM-Backup
        How to install and use the ADSM backup program

o Advocacy
        Suggestions on how to advocate the use of Linux

o Alsa-sound
        Describes the installation of the Alsa sound drivers for Linux

o Apache+SSL+PHP+fp
        Build a multipurpose webserver.

o Automount
        This file describes the autofs automounter, how to configure it, and points out some problems to avoid

o Backup-With-MSDOS
        How to backup Linux machines with MSDOS

o Battery-Powered
        How to reduce a Linux system's power consumption

o Boca
        How to install a Boca 16-port serial card (Boca 2016)

o BogoMips
        Information about BogoMips

o Bridge+Firewall
        How to setup and ethernet bridge and firewall

o Bridge
        How to setup an ethernet bridge

o Bzip2
        How to use the new bzip2 compression program

o Cipe+Masq
        How to setup a Virtual Private Network between your LAN and other LAN's using cipe through linux masquerading firewall machines

o Clock
        How to set and keep your clock on time

o Coffee
        Thoughts about making coffee with Linux (humorous)

o Commercial-Port-Advocacy
        This document discusses methods that can be used to approach commercial software companies to convince them to port their programs to Linux

o Cyrus-IMAP
        How to install the Cyrus IMAP server

o DPT-Hardware-RAID
        How to configure hardware RAID

o Diald
        How to use 'diald' to dial an ISP

o Domain
        This document outlines the things you will probably have to do when you want to set up a network of computers under your own domain.

o Ext2fs-Undeletion
        How to retrieve deleted files from an ext2 filesystem

o FDU
        How to fix ugly and unreadable X Window fonts

o FTP
        How to use ftp clients and servers

o Fax-Server
        How to setup a fax server

o Firewall-Piercing
        Using ppp over telnet transparently through an Internet firewall

o GIS-GRASS
        How to install Geographic Information System (GIS) software

o GTEK-BBS-550
        How to setup the GTEK BBS-550 multiport board with Linux

o Hard-Disk-Upgrade
        How to copy a Linux system from one hard disk to another

o IO-Port-Programming
        How to use I/O ports in C programs

o IP-Alias
        How to use IP aliasing

o IP-Subnetworking
        Why and how to subnetwork an IP network

o ISP-Connectivity
        How to get mail and news over a dialup connection

o Install-From-ZIP
        How to install Linux from a parallel port ZIP drive

o Kerneld
        How to use 'kerneld' (dynamic module loading)

o LBX
        How to use Low-Bandwidth X (LBX)

o LILO
        Examples of typical LILO installations

o Leased-Line
        How to setup leased line modems

o Linux+DOS+Win95+OS2
        How to use Linux and DOS and OS/2 and Win95 together

o Linux+FreeBSD
        How to use Linux and FreeBSD together

o Linux+NT-Loader
        How to use Linux and the Windows NT boot loader together

o Linux+Win95
        How to use Linux and Windows95 together

o Linux-Modem-Sharing
        How to setup Linux as a modem sharing server for other client computers

o Loadlin+Win95
        How to use Linux and Windows95 together, using loadlin

o Loopback-Root-FS
        How to use the Linux loopback device to create a Linux native filesystem format installation that can be run from a DOS partition without re-partitioning

o Mac-Terminal
        How to use an Apple Macintosh as a serial terminal

o Mail-Queue
        How to queue remote mail and deliver local mail

o Mail2News
        How to set up a mail to news gateway

o Man-Page
        How to write man pages

o Modules
        How to setup and configure kernel modules

o Multiboot-with-LILO
        Howto multiboot between Windows 95, Windows NT, and Linux

o NCD-X-Terminal
        Describes how to connect an NCD X terminal to a UNIX host

o NFS-Root-Client
        How to set up diskless Linux machines using NFS

o NFS-Root
        How to set up diskless Linux machines

o Netrom-Node
        How to setup the ax25-utilities package for Amateur Radio such making Netrom Nodes

o Netscape+Proxy
        How to set up a proxy server for Netscape

o Netstation
        How to hook up a IBM Netstation to your local network using a Linux box as server

o News-Leafsite
        How to set up a leaf news site

o Offline-Mailing
        How to set up email addresses without a dedicated Internet connection

o PLIP
        How to set up PLIP (Parallel Line Interface Protocol)

o Partition-Rescue
        How to rescue deleted Linux partitions

o Partition
        How to choose disk partitions

o Path
        How to use the PATH environment variable

o Pre-Installation-Checklist
        Pre-installation checklist and questionnaire

o Process-Accounting
        How to set up process accounting

o Programming-Languages
        A brief comparison of major programming languages for Linux and major libraries for creating graphical user interfaces (GUIs) under Linux

o Proxy-ARP-Subnet
        How to use proxy ARP with subnetting

o Public-Web-Browser
        How to set up a guest account to use a WWW browser

o Qmail+MH
        How to install qmail and MH

o Quota
        How to set up disk quotas

o RCS
        How to use RCS (Revision Control System)

o RPM+Slackware
        How to install the Red Hat Package Manager (RPM) under Slackware

o RedHat-CD
        How to make your own CDs from the Red Hat Linux distribution equivalent to the ones commercially available from Red Hat

o Remote-Boot
        How to set up a server-based boot selector

o Remote-X-Apps
        How to run remote X applications

o SLIP-PPP-Emulator
        How to use SLIP/PPP emulators with Linux

o Saving-Space
        Squeezing your Linux installation into the least possible space

o Secure-POP+SSH
        How to set up secure POP connections using ssh

o Sendmail+UUCP
        How to use sendmail and UUCP together

o Sendmail-Address-Rewrite
        Set up sendmail's configuration file for the home user's dial-up access

o Small-Memory
        How to run Linux on a system with a small amount of memory

o Soundblaster-AWE
        How to install the Soundblaster AWE 32/64

o StarOffice
        Information on installing the StarOffice suite

o Swap-Space
        How to share swap space between Linux and Windows

o TT-Debian
        This document describes how to configure a Debian system to use TrueType fonts for display and printing

o Term-Firewall
        How to use 'term' over a firewall

o TkRat
        How to install and use the TkRat mail program

o Token-Ring
        How to use token ring cards

o Ultra-DMA
        How to use Ultra-DMA drives and controllers

o Update
        How to stay updated about Linux development

o Upgrade
        How to upgrade your Linux distribution

o VAIO+Linux
        This document explains installation of Linux on Sony VAIO computers

o VPN
        How to set up a VPN (Virtual Private Network)

o Visual-Bell
        How to disable audible bells, and enable visual bells

o WordPerfect
        How to set up SCO WordPerfect for Linux

o X-Big-Cursor
        How to use enlarged cursors with XWindows

o XFree86-XInside
        How to convert XFree86 to XInside modelines

o Xterm-Title
        How to put strings into the titlebar of an xterm

o ZIP-Drive
        Provides a quick reference quide on setting up and using the Iomega ZIP drive with Linux

o ZIP-Install
        How to install Linux onto a ZIP drive

<HTML>
<TITLE>Index of /pub/Linux/docs/HOWTO/mini</TITLE>
<H1>Index of /pub/Linux/docs/HOWTO/mini</H1>
<HR>
<DL>
<DT><A HREF=../INDEX.html>Parent directory</A>
<DD>../
<DT><A HREF="Linux-mini-HOWTOs.tar.gz">Linux-mini-HOWTOs.tar.gz</A>
<DD>tar file of all the mini-HOWTOs
<DT><A HREF="other-formats">other-formats</A>
<DD>Directory containing other formats of the mini-HOWTOs
<DT><A HREF="3-Button-Mouse">3-Button-Mouse</A>
<DD>How to configure your mouse to use 3 buttons
<DT><A HREF="ADSL">ADSL</A>
<DD>Asymmetric Digital Subscriber Loop (ADSL), a new high-speed digital access line technology
<DT><A HREF="ADSM-Backup">ADSM-Backup</A>
<DD>How to install and use the ADSM backup program
<DT><A HREF="Advocacy">Advocacy</A>
<DD>Suggestions on how to advocate the use of Linux
<DT><A HREF="Alsa-sound">Alsa-sound</A>
<DD>Describes the installation of the Alsa sound drivers for Linux
<DT><A HREF="Apache+SSL+PHP+fp">Apache+SSL+PHP+fp</A>
<DD>Build a multipurpose webserver.
<DT><A HREF="Automount">Automount</A>
<DD>This file describes the autofs automounter, how to configure it, and points out some problems to avoid
<DT><A HREF="Backup-With-MSDOS">Backup-With-MSDOS</A>
<DD>How to backup Linux machines with MSDOS
<DT><A HREF="Battery-Powered">Battery-Powered</A>
<DD>How to reduce a Linux system's power consumption
<DT><A HREF="Boca">Boca</A>
<DD>How to install a Boca 16-port serial card (Boca 2016)
<DT><A HREF="BogoMips">BogoMips</A>
<DD>Information about BogoMips
<DT><A HREF="Bridge+Firewall">Bridge+Firewall</A>
<DD>How to setup and ethernet bridge and firewall
<DT><A HREF="Bridge">Bridge</A>
<DD>How to setup an ethernet bridge
<DT><A HREF="Bzip2">Bzip2</A>
<DD>How to use the new bzip2 compression program
<DT><A HREF="Cipe+Masq">Cipe+Masq</A>
<DD>How to setup a Virtual Private Network between your LAN and other LAN's using cipe through linux masquerading firewall machines
<DT><A HREF="Clock">Clock</A>
<DD>How to set and keep your clock on time
<DT><A HREF="Coffee">Coffee</A>
<DD>Thoughts about making coffee with Linux (humorous)
<DT><A HREF="Commercial-Port-Advocacy">Commercial-Port-Advocacy</A>
<DD>This document discusses methods that can be used to approach commercial software companies to convince them to port their programs to Linux
<DT><A HREF="Cyrus-IMAP">Cyrus-IMAP</A>
<DD>How to install the Cyrus IMAP server
<DT><A HREF="DPT-Hardware-RAID">DPT-Hardware-RAID</A>
<DD>How to configure hardware RAID
<DT><A HREF="Diald">Diald</A>
<DD>How to use 'diald' to dial an ISP
<DT><A HREF="Domain">Domain</A>
<DD>This document outlines the things you will probably have to do when you want to set up a network of computers under your own domain.
<DT><A HREF="Ext2fs-Undeletion">Ext2fs-Undeletion</A>
<DD>How to retrieve deleted files from an ext2 filesystem
<DT><A HREF="FDU">FDU</A>
<DD>How to fix ugly and unreadable X Window fonts
<DT><A HREF="FTP">FTP</A>
<DD>How to use ftp clients and servers
<DT><A HREF="Fax-Server">Fax-Server</A>
<DD>How to setup a fax server
<DT><A HREF="Firewall-Piercing">Firewall-Piercing</A>
<DD>Using ppp over telnet transparently through an Internet firewall
<DT><A HREF="GIS-GRASS">GIS-GRASS</A>
<DD>How to install Geographic Information System (GIS) software
<DT><A HREF="GTEK-BBS-550">GTEK-BBS-550</A>
<DD>How to setup the GTEK BBS-550 multiport board with Linux
<DT><A HREF="Hard-Disk-Upgrade">Hard-Disk-Upgrade</A>
<DD>How to copy a Linux system from one hard disk to another
<DT><A HREF="IO-Port-Programming">IO-Port-Programming</A>
<DD>How to use I/O ports in C programs
<DT><A HREF="IP-Alias">IP-Alias</A>
<DD>How to use IP aliasing
<DT><A HREF="IP-Subnetworking">IP-Subnetworking</A>
<DD>Why and how to subnetwork an IP network
<DT><A HREF="ISP-Connectivity">ISP-Connectivity</A>
<DD>How to get mail and news over a dialup connection
<DT><A HREF="Install-From-ZIP">Install-From-ZIP</A>
<DD>How to install Linux from a parallel port ZIP drive
<DT><A HREF="Kerneld">Kerneld</A>
<DD>How to use 'kerneld' (dynamic module loading)
<DT><A HREF="LBX">LBX</A>
<DD>How to use Low-Bandwidth X (LBX)
<DT><A HREF="LILO">LILO</A>
<DD>Examples of typical LILO installations
<DT><A HREF="Leased-Line">Leased-Line</A>
<DD>How to setup leased line modems
<DT><A HREF="Linux+DOS+Win95+OS2">Linux+DOS+Win95+OS2</A>
<DD>How to use Linux and DOS and OS/2 and Win95 together
<DT><A HREF="Linux+FreeBSD">Linux+FreeBSD</A>
<DD>How to use Linux and FreeBSD together
<DT><A HREF="Linux+NT-Loader">Linux+NT-Loader</A>
<DD>How to use Linux and the Windows NT boot loader together
<DT><A HREF="Linux+Win95">Linux+Win95</A>
<DD>How to use Linux and Windows95 together
<DT><A HREF="Linux-Modem-Sharing">Linux-Modem-Sharing</A>
<DD>How to setup Linux as a modem sharing server for other client computers
<DT><A HREF="Loadlin+Win95">Loadlin+Win95</A>
<DD>How to use Linux and Windows95 together, using loadlin
<DT><A HREF="Loopback-Root-FS">Loopback-Root-FS</A>
<DD>How to use the Linux loopback device to create a Linux native filesystem format installation that can be run from a DOS partition without re-partitioning
<DT><A HREF="Mac-Terminal">Mac-Terminal</A>
<DD>How to use an Apple Macintosh as a serial terminal
<DT><A HREF="Mail-Queue">Mail-Queue</A>
<DD>How to queue remote mail and deliver local mail
<DT><A HREF="Mail2News">Mail2News</A>
<DD>How to set up a mail to news gateway
<DT><A HREF="Man-Page">Man-Page</A>
<DD>How to write man pages
<DT><A HREF="Modules">Modules</A>
<DD>How to setup and configure kernel modules
<DT><A HREF="Multiboot-with-LILO">Multiboot-with-LILO</A>
<DD>Howto multiboot between Windows 95, Windows NT, and Linux
<DT><A HREF="NCD-X-Terminal">NCD-X-Terminal</A>
<DD>Describes how to connect an NCD X terminal to a UNIX host
<DT><A HREF="NFS-Root-Client">NFS-Root-Client</A>
<DD>How to set up diskless Linux machines using NFS
<DT><A HREF="NFS-Root">NFS-Root</A>
<DD>How to set up diskless Linux machines
<DT><A HREF="Netrom-Node">Netrom-Node</A>
<DD>How to setup the ax25-utilities package for Amateur Radio such making Netrom Nodes
<DT><A HREF="Netscape+Proxy">Netscape+Proxy</A>
<DD>How to set up a proxy server for Netscape
<DT><A HREF="Netstation">Netstation</A>
<DD>How to hook up a IBM Netstation to your local network using a Linux box as server
<DT><A HREF="News-Leafsite">News-Leafsite</A>
<DD>How to set up a leaf news site
<DT><A HREF="Offline-Mailing">Offline-Mailing</A>
<DD>How to set up email addresses without a dedicated Internet connection
<DT><A HREF="PLIP">PLIP</A>
<DD>How to set up PLIP (Parallel Line Interface Protocol)
<DT><A HREF="Partition-Rescue">Partition-Rescue</A>
<DD>How to rescue deleted Linux partitions
<DT><A HREF="Partition">Partition</A>
<DD>How to choose disk partitions
<DT><A HREF="Path">Path</A>
<DD>How to use the PATH environment variable
<DT><A HREF="Pre-Installation-Checklist">Pre-Installation-Checklist</A>
<DD>Pre-installation checklist and questionnaire
<DT><A HREF="Process-Accounting">Process-Accounting</A>
<DD>How to set up process accounting
<DT><A HREF="Programming-Languages">Programming-Languages</A>
<DD>A brief comparison of major programming languages for Linux and major libraries for creating graphical user interfaces (GUIs) under Linux
<DT><A HREF="Proxy-ARP-Subnet">Proxy-ARP-Subnet</A>
<DD>How to use proxy ARP with subnetting
<DT><A HREF="Public-Web-Browser">Public-Web-Browser</A>
<DD>How to set up a guest account to use a WWW browser
<DT><A HREF="Qmail+MH">Qmail+MH</A>
<DD>How to install qmail and MH
<DT><A HREF="Quota">Quota</A>
<DD>How to set up disk quotas
<DT><A HREF="RCS">RCS</A>
<DD>How to use RCS (Revision Control System)
<DT><A HREF="RPM+Slackware">RPM+Slackware</A>
<DD>How to install the Red Hat Package Manager (RPM) under Slackware
<DT><A HREF="RedHat-CD">RedHat-CD</A>
<DD>How to make your own CDs from the Red Hat Linux distribution equivalent to the ones commercially available from Red Hat
<DT><A HREF="Remote-Boot">Remote-Boot</A>
<DD>How to set up a server-based boot selector
<DT><A HREF="Remote-X-Apps">Remote-X-Apps</A>
<DD>How to run remote X applications
<DT><A HREF="SLIP-PPP-Emulator">SLIP-PPP-Emulator</A>
<DD>How to use SLIP/PPP emulators with Linux
<DT><A HREF="Saving-Space">Saving-Space</A>
<DD>Squeezing your Linux installation into the least possible space
<DT><A HREF="Secure-POP+SSH">Secure-POP+SSH</A>
<DD>How to set up secure POP connections using ssh
<DT><A HREF="Sendmail+UUCP">Sendmail+UUCP</A>
<DD>How to use sendmail and UUCP together
<DT><A HREF="Sendmail-Address-Rewrite">Sendmail-Address-Rewrite</A>
<DD>Set up sendmail's configuration file for the home user's dial-up access
<DT><A HREF="Small-Memory">Small-Memory</A>
<DD>How to run Linux on a system with a small amount of memory
<DT><A HREF="Soundblaster-AWE">Soundblaster-AWE</A>
<DD>How to install the Soundblaster AWE 32/64
<DT><A HREF="StarOffice">StarOffice</A>
<DD>Information on installing the StarOffice suite
<DT><A HREF="Swap-Space">Swap-Space</A>
<DD>How to share swap space between Linux and Windows
<DT><A HREF="TT-Debian">TT-Debian</A>
<DD>This document describes how to configure a Debian system to use TrueType fonts for display and printing
<DT><A HREF="Term-Firewall">Term-Firewall</A>
<DD>How to use 'term' over a firewall
<DT><A HREF="TkRat">TkRat</A>
<DD>How to install and use the TkRat mail program
<DT><A HREF="Token-Ring">Token-Ring</A>
<DD>How to use token ring cards
<DT><A HREF="Ultra-DMA">Ultra-DMA</A>
<DD>How to use Ultra-DMA drives and controllers
<DT><A HREF="Update">Update</A>
<DD>How to stay updated about Linux development
<DT><A HREF="Upgrade">Upgrade</A>
<DD>How to upgrade your Linux distribution
<DT><A HREF="VAIO+Linux">VAIO+Linux</A>
<DD>This document explains installation of Linux on Sony VAIO computers
<DT><A HREF="VPN">VPN</A>
<DD>How to set up a VPN (Virtual Private Network)
<DT><A HREF="Visual-Bell">Visual-Bell</A>
<DD>How to disable audible bells, and enable visual bells
<DT><A HREF="WordPerfect">WordPerfect</A>
<DD>How to set up SCO WordPerfect for Linux
<DT><A HREF="X-Big-Cursor">X-Big-Cursor</A>
<DD>How to use enlarged cursors with XWindows
<DT><A HREF="XFree86-XInside">XFree86-XInside</A>
<DD>How to convert XFree86 to XInside modelines
<DT><A HREF="Xterm-Title">Xterm-Title</A>
<DD>How to put strings into the titlebar of an xterm
<DT><A HREF="ZIP-Drive">ZIP-Drive</A>
<DD>Provides a quick reference quide on setting up and using the Iomega ZIP drive with Linux
<DT><A HREF="ZIP-Install">ZIP-Install</A>
<DD>How to install Linux onto a ZIP drive
</DL>
<HR>
<ADDRESS><A HREF="http://sunsite.unc.edu/tjbynum/">Tim Bynum</A>, <A HREF="mailto:linux-howto@sunsite.unc.edu">linux-howto@sunsite.unc.edu</A>
</ADDRESS>
</HTML>
  Linux I/O port programming mini-HOWTO
  Author: Riku Saikkonen <Riku.Saikkonen@hut.fi>
  v, 28 December 1997

  This HOWTO document describes programming hardware I/O ports and wait
  ing for small periods of time in user-mode Linux programs running on
  the Intel x86 architecture.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Using I/O ports in C programs

     2.1 The normal method
     2.2 An alternate method:

  3. Interrupts (IRQs) and DMA access

  4. High-resolution timing

     4.1 Delays
        4.1.1 Sleeping:
        4.1.2 (TT
        4.1.3 Delaying with port I/O
        4.1.4 Delaying with assembler instructions
        4.1.5 (TT
     4.2 Measuring time

  5. Other programming languages

  6. Some useful ports

     6.1 The parallel port
     6.2 The game (joystick) port
     6.3 The serial port

  7. Hints

  8. Troubleshooting

  9. Example code

  10. Credits

  ______________________________________________________________________

  1.  Introduction

  This HOWTO document describes programming hardware I/O ports and
  waiting for small periods of time in user-mode Linux programs running
  on the Intel x86 architecture. This document is a descendant of the
  very small IO-Port mini-HOWTO by the same author.

  This document is Copyright 1995-1997 Riku Saikkonen. See the Linux
  HOWTO copyright
  <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/COPYRIGHT> for details.

  If you have corrections or something to add, feel free to e-mail me
  (Riku.Saikkonen@hut.fi)...


  Changes from the previous released version (Mar 30 1997):

    Clarified things regarding inb_p/outb_p and port 0x80.

    Removed information about udelay(), since nanosleep() provides a
     cleaner way of using it.

    Converted to Linuxdoc-SGML, and reorganised somewhat.

    Lots of minor additions and modifications.

  2.  Using I/O ports in C programs

  2.1.  The normal method

  Routines for accessing I/O ports are in /usr/include/asm/io.h (or
  linux/include/asm-i386/io.h in the kernel source distribution). The
  routines there are inline macros, so it is enough to #include
  <asm/io.h>; you do not need any additional libraries.

  Because of a limitation in gcc (present at least in 2.7.2.3 and below)
  and in egcs (all versions), you have to compile any source code that
  uses these routines with optimisation turned on (gcc -O1 or higher),
  or alternatively #define extern to be empty before you #include
  <asm/io.h>.

  For debugging, you can use gcc -g -O (at least with modern versions of
  gcc), though optimisation can sometimes make the debugger behave a bit
  strangely. If this bothers you, put the routines that use I/O port
  access in a separate source file and compile only that with
  optimisation turned on.

  Before you access any ports, you must give your program permission to
  do so. This is done by calling the ioperm() function (declared in
  unistd.h, and defined in the kernel) somewhere near the start of your
  program (before any I/O port accesses). The syntax is ioperm(from,
  num, turn_on), where from is the first port number to give access to,
  and num the number of consecutive ports to give access to. For
  example, ioperm(0x300, 5, 1) would give access to ports 0x300 through
  0x304 (a total of 5 ports). The last argument is a Boolean value
  specifying whether to give access to the program to the ports (true
  (1)) or to remove access (false (0)). You can call ioperm() multiple
  times to enable multiple non-consecutive ports. See the ioperm(2)
  manual page for details on the syntax.

  The ioperm() call requires your program to have root privileges; thus
  you need to either run it as the root user, or make it setuid root.
  You can drop the root privileges after you have called ioperm() to
  enable the ports you want to use. You are not required to explicitly
  drop your port access privileges with ioperm(..., 0) at the end of
  your program; this is done automatically as the process exits.

  A setuid() to a non-root user does not disable the port access granted
  by ioperm(), but a fork() does (the child process does not get access,
  but the parent retains it).

  ioperm() can only give access to ports 0x000 through 0x3ff; for higher
  ports, you need to use iopl() (which gives you access to all ports at
  once). Use the level argument 3 (i.e., iopl(3)) to give your program
  access to all I/O ports (so be careful --- accessing the wrong ports
  can do all sorts of nasty things to your computer). Again, you need
  root privileges to call iopl(). See the iopl(2) manual page for
  details.

  Then, to actually accessing the ports... To input a byte (8 bits) from
  a port, call inb(port), it returns the byte it got. To output a byte,
  call outb(value, port) (please note the order of the parameters).  To
  input a word (16 bits) from ports x and x+1 (one byte from each to
  form the word, using the assembler instruction inw), call inw(x). To
  output a word to the two ports, use outw(value, x). If you're unsure
  of which port instructions (byte or word) to use, you probably want
  inb() and outb() --- most devices are designed for bytewise port
  access. Note that all port access instructions take at least about a
  microsecond to execute.

  The inb_p(), outb_p(), inw_p(), and outw_p() macros work otherwise
  identically to the ones above, but they do an additional short (about
  one microsecond) delay after the port access; you can make the delay
  about four microseconds with #define REALLY_SLOW_IO before you
  #include <asm/io.h>. These macros normally (unless you #define
  SLOW_IO_BY_JUMPING, which is probably less accurate) use a port output
  to port 0x80 for their delay, so you need to give access to port 0x80
  with ioperm() first (outputs to port 0x80 should not affect any part
  of the system). For more versatile methods of delaying, read on.

  There are man pages for ioperm(2), iopl(2), and the above macros in
  reasonably recent releases of the Linux manual page collection.

  2.2.  An alternate method: /dev/port

  Another way to access I/O ports is to open() /dev/port (a character
  device, major number 1, minor 4) for reading and/or writing (the stdio
  f*() functions have internal buffering, so avoid them). Then lseek()
  to the appropriate byte in the file (file position 0 = port 0x00, file
  position 1 = port 0x01, and so on), and read() or write() a byte or
  word from or to it.

  Naturally, for this to work your program needs read/write access to
  /dev/port. This method is probably slower than the normal method
  above, but does not need compiler optimisation nor ioperm(). It
  doesn't need root access either, if you give a non-root user or group
  access to /dev/port --- but this is a very bad thing to do in terms of
  system security, since it is possible to hurt the system, perhaps even
  gain root access, by using /dev/port to access hard disks, network
  cards, etc. directly.

  3.  Interrupts (IRQs) and DMA access

  You cannot use IRQs or DMA directly from a user-mode process. You need
  to write a kernel driver; see The Linux Kernel Hacker's Guide
  <http://www.redhat.com:8080/HyperNews/get/khg.html> for details and
  the kernel source code for examples.

  Also, you cannot disable interrupts from within a user-mode program.

  4.  High-resolution timing

  4.1.  Delays

  First of all, I should say that you cannot guarantee user-mode
  processes to have exact control of timing because of the multi-tasking
  nature of Linux. Your process might be scheduled out at any time for
  anything from about 10 milliseconds to a few seconds (on a system with
  very high load). However, for most applications using I/O ports, this
  does not really matter. To minimise this, you may want to nice your
  process to a high-priority value (see the nice(2) manual page) or use
  real-time scheduling (see below).

  If you want more precise timing than normal user-mode processes give
  you, there are some provisions for user-mode `real time' support.
  Linux 2.x kernels have soft real time support; see the manual page for
  sched_setscheduler(2) for details. There is a special kernel that
  supports hard real time; see  <http://luz.cs.nmt.edu/~rtlinux/> for
  more information on this.


  4.1.1.  Sleeping: sleep()  and usleep()

  Now, let me start with the easier timing calls. For delays of multiple
  seconds, your best bet is probably to use sleep(). For delays of at
  least tens of milliseconds (about 10 ms seems to be the minimum
  delay), usleep() should work. These functions give the CPU to other
  processes (``sleep''), so CPU time isn't wasted. See the manual pages
  sleep(3) and usleep(3) for details.

  For delays of under about 50 milliseconds (depending on the speed of
  your processor and machine, and the system load), giving up the CPU
  takes too much time, because the Linux scheduler (for the x86
  architecture) usually takes at least about 10-30 milliseconds before
  it returns control to your process. Due to this, in small delays,
  usleep(3) usually delays somewhat more than the amount that you
  specify in the parameters, and at least about 10 ms.


  4.1.2.  nanosleep()

  In the 2.0.x series of Linux kernels, there is a new system call,
  nanosleep() (see the nanosleep(2) manual page), that allows you to
  sleep or delay for short times (a few microseconds or more).

  For delays <= 2 ms, if (and only if) your process is set to soft real
  time scheduling (using sched_setscheduler()), nanosleep() uses a busy
  loop; otherwise it sleeps, just like usleep().

  The busy loop uses udelay() (an internal kernel function used by many
  kernel drivers), and the length of the loop is calculated using the
  BogoMips value (the speed of this kind of busy loop is one of the
  things that BogoMips measures accurately). See
  /usr/include/asm/delay.h) for details on how it works.


  4.1.3.  Delaying with port I/O

  Another way of delaying small numbers of microseconds is port I/O.
  Inputting or outputting any byte from/to port 0x80 (see above for how
  to do it) should wait for almost exactly 1 microsecond independent of
  your processor type and speed. You can do this multiple times to wait
  a few microseconds. The port output should have no harmful side
  effects on any standard machine (and some kernel drivers use it). This
  is how {in|out}[bw]_p() normally do the delay (see asm/io.h).

  Actually, a port I/O instruction on most ports in the 0-0x3ff range
  takes almost exactly 1 microsecond, so if you're, for example, using
  the parallel port directly, just do additional inb()s from that port
  to delay.

  4.1.4.  Delaying with assembler instructions

  If you know the processor type and clock speed of the machine the
  program will be running on, you can hard-code shorter delays by
  running certain assembler instructions (but remember, your process
  might be scheduled out at any time, so the delays might well be longer
  every now and then). For the table below, the internal processor speed
  determines the number of clock cycles taken; e.g., for a 50 MHz
  processor (e.g. 486DX-50 or 486DX2-50), one clock cycle takes
  1/50000000 seconds (=200 nanoseconds).

       Instruction   i386 clock cycles   i486 clock cycles
       nop                   3                   1
       xchg %ax,%ax          3                   3
       or %ax,%ax            2                   1
       mov %ax,%ax           2                   1
       add %ax,0             2                   1

  (Sorry, I don't know about Pentiums; probably close to the i486. I
  cannot find an instruction which would use one clock cycle on an i386.
  Use the one-clock-cycle instructions if you can, otherwise the
  pipelining used in modern processors may shorten the times.)

  The instructions nop and xchg in the table should have no side
  effects. The rest may modify the flags register, but this shouldn't
  matter since gcc should detect it. nop is a good choice.

  To use these, call asm("instruction") in your program. The syntax of
  the instructions is as in the table above; if you want multiple
  instructions in a single asm() statement, separate them with
  semicolons. For example, asm("nop ; nop ; nop ; nop") executes four
  nop instructions, delaying for four clock cycles on i486 or Pentium
  processors (or 12 clock cycles on an i386).

  asm() is translated into inline assembler code by gcc, so there is no
  function call overhead.

  Shorter delays than one clock cycle are impossible in the Intel x86
  architecture.


  4.1.5.  rdtsc  for Pentiums

  For Pentiums, you can get the number of clock cycles elapsed since the
  last reboot with the following C code:

       ______________________________________________________________________
          extern __inline__ unsigned long long int rdtsc()
          {
            unsigned long long int x;
            __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
            return x;
          }
       ______________________________________________________________________

  You can poll this value to delay for as many clock cycles as you want.

  4.2.  Measuring time

  For times accurate to one second, it is probably easiest to use
  time(). For more accurate times, gettimeofday() is accurate to about a
  microsecond (but see above about scheduling). For Pentiums, the rdtsc
  code fragment above is accurate to one clock cycle.

  If you want your process to get a signal after some amount of time,
  use setitimer() or alarm(). See the manual pages of the functions for
  details.

  5.  Other programming languages

  The description above concentrates on the C programming language. It
  should apply directly to C++ and Objective C. In assembler, you have
  to call ioperm() or iopl() as in C, but after that you can use the I/O
  port read/write instructions directly.

  In other languages, unless you can insert inline assembler or C code
  into the program or use the system calls mentioned above, it is
  probably easiest to write a simple C source file with functions for
  the I/O port accesses or delays that you need, and compile and link it
  in with the rest of your program. Or use /dev/port as described above.

  6.  Some useful ports

  Here is some programming information for common ports that can be
  directly used for general-purpose TTL (or CMOS) logic I/O.

  If you want to use these or other common ports for their intended
  purpose (e.g., to control a normal printer or modem), you should most
  likely use existing drivers (which are usually included in the kernel)
  instead of programming the ports directly as this HOWTO describes.
  This section is intended for those people who want to connect LCD
  displays, stepper motors, or other custom electronics to a PC's
  standard ports.

  If you want to control a mass-market device like a scanner (that has
  been on the market for a while), look for an existing Linux driver for
  it. The Hardware-HOWTO
  <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Hardware-HOWTO> is a good
  place to start.

  <http://www.hut.fi/Misc/Electronics/> is a good source for more
  information on connecting devices to computers (and on electronics in
  general).

  6.1.  The parallel port

  The parallel port's base address (called ``BASE'' below) is 0x3bc for
  /dev/lp0, 0x378 for /dev/lp1, and 0x278 for /dev/lp2. If you only want
  to control something that acts like a normal printer, see the
  Printing-HOWTO <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Printing-
  HOWTO>.


  In addition to the standard output-only mode described below, there is
  an `extended' bidirectional mode in most parallel ports. For
  information on this and the newer ECP/EPP modes (and the IEEE 1284
  standard in general), see  <http://www.fapo.com/> and
  <http://www.senet.com.au/~cpeacock/parallel.htm>. Remember that since
  you cannot use IRQs or DMA in a user-mode program, you will probably
  have to write a kernel driver to use ECP/EPP; I think someone is
  writing such a driver, but I don't know the details.

  The port BASE+0 (Data port) controls the data signals of the port (D0
  to D7 for bits 0 to 7, respectively; states: 0 = low (0 V), 1 = high
  (5 V)). A write to this port latches the data on the pins. A read
  returns the data last written in standard or extended write mode, or
  the data in the pins from another device in extended read mode.

  The port BASE+1 (Status port) is read-only, and returns the state of
  the following input signals:

    Bits 0 and 1 are reserved.

    Bit 2 IRQ status (not a pin, I don't know how this works)

    Bit 3 ERROR (1=high)

    Bit 4 SLCT (1=high)

    Bit 5 PE (1=high)

    Bit 6 ACK (1=high)

    Bit 7 -BUSY (0=high)

     (I'm not sure about the high and low states.)

  The port BASE+2 (Control port) is write-only (a read returns the data
  last written), and controls the following status signals:

    Bit 0 -STROBE (0=high)

    Bit 1 AUTO_FD_XT (1=high)

    Bit 2 -INIT (0=high)

    Bit 3 SLCT_IN (1=high)

    Bit 4 enables the parallel port IRQ (which occurs on the low-to-
     high transition of ACK) when set to 1.

    Bit 5 controls the extended mode direction (0 = write, 1 = read),
     and is completely write-only (a read returns nothing useful for
     this bit).

    Bits 6 and 7 are reserved.

     (Again, I am not sure about the high and low states.)

  Pinout (a 25-pin female D-shell connector on the port) (i=input,
  o=output):


       1io -STROBE, 2io D0, 3io D1, 4io D2, 5io D3, 6io D4, 7io D5, 8io D6,
       9io D7, 10i ACK, 11i -BUSY, 12i PE, 13i SLCT, 14o AUTO_FD_XT,
       15i ERROR, 16o -INIT, 17o SLCT_IN, 18-25 Ground

  The IBM specifications say that pins 1, 14, 16, and 17 (the control
  outputs) have open collector drivers pulled to 5 V through 4.7 kiloohm
  resistors (sink 20 mA, source 0.55 mA, high-level output 5.0 V minus
  pullup). The rest of the pins sink 24 mA, source 15 mA, and their
  high-level output is min. 2.4 V. The low state for both is max. 0.5 V.
  Non-IBM parallel ports probably deviate from this standard. For more
  information on this, see
  <http://www.hut.fi/Misc/Electronics/circuits/lptpower.html>.

  Finally, a warning: Be careful with grounding. I've broken several
  parallel ports by connecting to them while the computer is turned on.
  It might be a good thing to use a parallel port not integrated on the
  motherboard for things like this. (You can usually get a second
  parallel port for your machine with a cheap standard `multi-I/O' card;
  just disable the ports that you don't need, and set the parallel port
  I/O address on the card to a free address. You don't need to care
  about the parallel port IRQ, since it isn't normally used.)

  6.2.  The game (joystick) port

  The game port is located at port addresses 0x200-0x207. For
  controlling normal joysticks, there is a kernel-level joystick driver,
  see  <ftp://sunsite.unc.edu/pub/Linux/kernel/patches/>, filename
  joystick-*.

  Pinout (a 15-pin female D-shell connector on the port):

    1,8,9,15: +5 V (power)

    4,5,12: Ground

    2,7,10,14: Digital inputs BA1, BA2, BB1, and BB2, respectively

    3,6,11,13: ``Analog'' inputs AX, AY, BX, and BY, respectively

  The +5 V pins seem to often be connected directly to the power lines
  in the motherboard, so they should be able to source quite a lot of
  power, depending on the motherboard, power supply and game port.

  The digital inputs are used for the buttons of the two joysticks
  (joystick A and joystick B, with two buttons each) that you can
  connect to the port. They should be normal TTL-level inputs, and you
  can read their status directly from the status port (see below). A
  real joystick returns a low (0 V) status when the button is pressed
  and a high (the 5 V from the power pins through an 1 Kohm resistor)
  status otherwise.

  The so-called analog inputs actually measure resistance. The game port
  has a quad one-shot multivibrator (a 558 chip) connected to the four
  inputs. In each input, there is a 2.2 Kohm resistor between the input
  pin and the multivibrator output, and a 0.01 uF timing capacitor
  between the multivibrator output and the ground. A real joystick has a
  potentiometer for each axis (X and Y), wired between +5 V and the
  appropriate input pin (AX or AY for joystick A, or BX or BY for
  joystick B).

  The multivibrator, when activated, sets its output lines high (5 V)
  and waits for each timing capacitor to reach 3.3 V before lowering the
  respective output line. Thus the high period duration of the
  multivibrator is proportional to the resistance of the potentiometer
  in the joystick (i.e., the position of the joystick in the appropriate
  axis), as follows:


  R = (t - 24.2) / 0.011,


  where R is the resistance (ohms) of the potentiometer and t the high
  period duration (seconds).

  Thus, to read the analog inputs, you first activate the multivibrator
  (with a port write; see below), then poll the state of the four axes
  (with repeated port reads) until they drop from high to low state,
  measuring their high period duration. This polling uses quite a lot of
  CPU time, and on a non-realtime multitasking system like (normal user-
  mode) Linux, the result is not very accurate because you cannot poll
  the port constantly (unless you use a kernel-level driver and disable
  interrupts while polling, but this wastes even more CPU time). If you
  know that the signal is going to take a long time (tens of ms) to go
  down, you can call usleep() before polling to give CPU time to other
  processes.

  The only I/O port you need to access is port 0x201 (the other ports
  either behave identically or do nothing). Any write to this port (it
  doesn't matter what you write) activates the multivibrator. A read
  from this port returns the state of the input signals:

    Bit 0: AX (status (1=high) of the multivibrator output)

    Bit 1: AY (status (1=high) of the multivibrator output)

    Bit 2: BX (status (1=high) of the multivibrator output)

    Bit 3: BY (status (1=high) of the multivibrator output)

    Bit 4: BA1 (digital input, 1=high)

    Bit 5: BA2 (digital input, 1=high)

    Bit 6: BB1 (digital input, 1=high)

    Bit 7: BB2 (digital input, 1=high)

  6.3.  The serial port

  If the device you're talking to supports something resembling RS-232,
  you should be able to use the serial port to talk to it. The Linux
  serial driver should be enough for almost all applications (you
  shouldn't have to program the serial port directly, and you'd probably
  have to write a kernel driver to do it); it is quite versatile, so
  using non-standard bps rates and so on shouldn't be a problem.

  See the termios(3) manual page, the serial driver source code
  (linux/drivers/char/serial.c), and
  <http://www.easysw.com/~mike/serial/index.html> for more information
  on programming serial ports on Unix systems.

  7.  Hints

  If you want good analog I/O, you can wire up ADC and/or DAC chips to
  the parallel port (hint: for power, use the game port connector or a
  spare disk drive power connector wired to outside the computer case,
  unless you have a low-power device and can use the parallel port
  itself for power, or use an external power supply), or buy an AD/DA
  card (most of the older/slower ones are controlled by I/O ports). Or,
  if you're satisfied with 1 or 2 channels, inaccuracy, and (probably)
  bad zeroing, a cheap sound card supported by the Linux sound driver
  should do (and it's quite fast).

  With accurate analog devices, improper grounding may generate errors
  in the analog inputs or outputs. If you experience something like
  this, you could try electrically isolating your device from the
  computer with optocouplers (on all signals between the computer and
  your device). Try to get power for the optocouplers from the computer
  (spare signals on the port may give enough power) to achieve better
  isolation.

  If you're looking for printed circuit board design software for Linux,
  there is a free X11 application called Pcb that should do a nice job,
  at least if you aren't doing anything very complex. It is included in
  many Linux distributions, and available in
  <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/> (filename pcb-*).

  8.  Troubleshooting


     Q1.
        I get segmentation faults when accessing ports.


     A1.
        Either your program does not have root privileges, or the
        ioperm() call failed for some other reason. Check the return
        value of ioperm(). Also, check that you're actually accessing
        the ports that you enabled with ioperm() (see Q3). If you're
        using the delaying macros (inb_p(), outb_p(), and so on),
        remember to call ioperm() to get access to port 0x80 too.


     Q2.
        I can't find the in*(), out*() functions defined anywhere, and
        gcc complains about undefined references.


     A2.
        You did not compile with optimisation turned on (-O), and thus
        gcc could not resolve the macros in asm/io.h. Or you did not
        #include <asm/io.h> at all.


     Q3.
        out*() doesn't do anything, or does something weird.


     A3.
        Check the order of the parameters; it should be outb(value,
        port), not outportb(port, value) as is common in MS-DOS.


     Q4.
        I want to control a standard RS-232 device/parallel
        printer/joystick...


     A4.
        You're probably better off using existing drivers (in the Linux
        kernel or an X server or somewhere else) to do it. The drivers
        are usually quite versatile, so even slightly non-standard
        devices usually work with them. See the information on standard
        ports above for pointers to documentation for them.
  9.  Example code

  Here's a piece of simple example code for I/O port access:

       ______________________________________________________________________
       /*
        * example.c: very simple example of port I/O
        *
        * This code does nothing useful, just a port write, a pause,
        * and a port read. Compile with `gcc -O2 -o example example.c',
        * and run as root with `./example'.
        */

       #include <stdio.h>
       #include <unistd.h>
       #include <asm/io.h>

       #define BASEPORT 0x378 /* lp1 */

       int main()
       {
         /* Get access to the ports */
         if (ioperm(BASEPORT, 3, 1)) {perror("ioperm"); exit(1);}

         /* Set the data signals (D0-7) of the port to all low (0) */
         outb(0, BASEPORT);

         /* Sleep for a while (100 ms) */
         usleep(100000);

         /* Read from the status port (BASE+1) and display the result */
         printf("status: %d\n", inb(BASEPORT + 1));

         /* We don't need the ports anymore */
         if (ioperm(BASEPORT, 3, 0)) {perror("ioperm"); exit(1);}

         exit(0);
       }

       /* end of example.c */
       ______________________________________________________________________

  10.  Credits

  Too many people have contributed for me to list, but thanks a lot,
  everyone. I have not replied to all the contributions that I've
  received; sorry for that, and thanks again for the help.



     _________________________________________________________________

      This page was last updated January 13th 1997.

           MINI HOW-TO ON SETTING UP IP ALIASING ON A LINUX MACHINE

  _GNU Copyleft 1996/1997 Harish Pillay (h.pillay@ieee.org)_

    Primary site: http://home.pacific.net.sg/~harish/linuxipalias.html

   Synopsis:

   This is a cook book recipe on how to set up and run IP aliasing on a
   Linux box. In addition, there are instructions on how to also set up
   the machine to receive e-mail on the aliased IP #s.

   My setup:
     * Latest kernel (2.0.27 - from
       ftp.funet.fi:/pub/Linux/kernel/src/v2.0) - has worked since
       1.3.7x.
     * IP Alias compiled as a loadable module. You would have indicated
       in the "make config" command to make your kernel, that you want
       the IP Masq to be compiled as a (M)odule. Check the Modules HOW-TO
       (if that exists) or check the info in
       /usr/src/linux/Documentation/modules.txt.
     * I have to support 2 additional IPs over and above the IP already
       allocated to me.
     * A D-Link DE620 pocket adapter (not important, works with any Linux
       supported network adapter).

   Commands:
     * First load the IP Alias module (you can skip this step if you
       compiled the module into the kernel):

/sbin/insmod /lib/modules/`uname -r`/ipv4/ip_alias.o
     * Second, setup the loopback, eth0 and all the IP #s beginning with
       the main IP # for the eth0 interface:


/sbin/ifconfig lo 127.0.0.1
/sbin/ifconfig eth0 up
/sbin/ifconfig eth0 172.16.3.1
/sbin/ifconfig eth0:0 172.16.3.10
/sbin/ifconfig eth0:1 172.16.3.100
   172.16.3.1 is the main IP #, while .10 and .100 are the aliases. The
       magic is the eth0:x where x=0,1,2,...n for the different IP #s.
       The main IP # does not need to be aliased.

     * Third, setup the routes. First route the loopback, then the net
       and, finally, the various IP #s starting with the default
       (originally allocated) one:


/sbin/route add -net 127.0.0.0
/sbin/route add -net 172.16.3.0 dev eth0
/sbin/route add -host 172.16.3.1 dev eth0
/sbin/route add -host 172.16.3.10 dev eth0:0
/sbin/route add -host 172.16.3.100 dev eth0:1
/sbin/route add default gw 172.16.3.200

   That's it.

   In the example IP # above, I am using the Private IP #s (RFC 1918) for
   illustrative purposes. Substitute them with your own official or
   private IP #s.

   The example shows only 3 IP #s. The max is defined to be 256 in
   /usr/include/linux/net_alias.h. 256 IP #s on ONE card is a lot :-)!

   Here's what my /sbin/ifconfig looks like:



lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:5088 errors:0 dropped:0 overruns:0
          TX packets:5088 errors:0 dropped:0 overruns:0

eth0      Link encap:10Mbps Ethernet  HWaddr 00:8E:B8:83:19:20
          inet addr:172.16.3.1  Bcast:172.16.3.255  Mask:255.255.255.0
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:334036 errors:0 dropped:0 overruns:0
          TX packets:11605 errors:0 dropped:0 overruns:0
          Interrupt:7 Base address:0x378

eth0:0    Link encap:10Mbps Ethernet  HWaddr 00:8E:B8:83:19:20
          inet addr:172.16.3.10  Bcast:172.16.3.255  Mask:255.255.255.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0
          TX packets:0 errors:0 dropped:0 overruns:0

eth0:1    Link encap:10Mbps Ethernet  HWaddr 00:8E:B8:83:19:20
          inet addr:172.16.3.100  Bcast:172.16.3.255  Mask:255.255.255.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0
          TX packets:0 errors:0 dropped:0 overruns:0

   And /proc/net/aliases:

device           family address
eth0:0           2      172.16.3.10
eth0:1           2      172.16.3.100



   And /proc/net/alias_types:

type    name            n_attach
2       ip              2



   Of course, the stuff in /proc/net was created by the ifconfig command
   and not by hand!

   _Question: How can I keep the settings through a reboot?_

   _Answer:_ Whether you are using BSD-style or SysV-style (Redhat for
   example) init, you can always include it in /etc/rc.d/rc.local. Here's
   what I have on my SysV init system (Redhat 3.0.3 and 4.0):

     * My /etc/rc.d/rc.local: (edited to show the relevant portions)


#setting up IP alias interfaces
echo "Setting 172.16.3.1, 172.16.3.10, 172.16.3.100 IP Aliases ..."
/sbin/ifconfig lo 127.0.0.1
/sbin/ifconfig eth0 up
/sbin/ifconfig eth0 172.16.3.1
/sbin/ifconfig eth0:0 172.16.3.10
/sbin/ifconfig eth0:1 172.16.3.100
#setting up the routes
echo "Setting IP routes ..."
/sbin/route add -net 127.0.0.0
/sbin/route add -net 172.16.3.0 dev eth0
/sbin/route add -host 172.16.3.1 eth0
/sbin/route add -host 172.16.3.10 eth0:0
/sbin/route add -host 172.16.3.100 eth0:1
/sbin/route add default gw 172.16.3.200
#

   _Question: How do I set up the IP aliased machine to receive e-mail on
   the various aliased IP #s (on a machine using sendmail)?_

     * _Answer:_ Create (if not already existing) a file called for
       example, /etc/mynames.cw. It does not have to be this exact name
       nor in the /etc directory.

     * In that file, place the official domain names of the aliased IP
       #s. If these aliased IP #s do not have a domain name, then you can
       place the IP # itself.


/etc/mynames.cw:
----------------
# /etc/mynames.cw - include all aliases for your machine here; # is a comment.
domain.one.net
domain.two.com
domain.three.org
4.5.6.7
     * In your sendmail.cf file, where it defines a file class macro Fw,
       add the following:

.
.
.
##################
#   local info   #
##################
.
.
# file containing names of hosts for which we receive email
Fw/etc/mynames.cw
.
.
.
     * That should do it. Test out the new setting by invoking sendmail
       in test mode for example:


ganymede$ /usr/lib/sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter
> 0 me@4.5.6.7
rewrite: ruleset  0   input: me @ 4 . 5 . 6 . 7
rewrite: ruleset 98   input: me @ 4 . 5 . 6 . 7
rewrite: ruleset 98 returns: me @ 4 . 5 . 6 . 7
rewrite: ruleset 97   input: me @ 4 . 5 . 6 . 7
rewrite: ruleset  3   input: me @ 4 . 5 . 6 . 7
rewrite: ruleset 96   input: me
rewrite: ruleset 96 returns: me
rewrite: ruleset  3 returns: me
rewrite: ruleset  0   input: me
rewrite: ruleset 98   input: me
rewrite: ruleset 98 returns: me
rewrite: ruleset  0 returns: $# local $: me
rewrite: ruleset 97 returns: $# local $: me
rewrite: ruleset  0 returns: $# local $: me
> 0 me@4.5.6.8
rewrite: ruleset  0   input: me @ 4 . 5 . 6 . 8
rewrite: ruleset 98   input: me @ 4 . 5 . 6 . 8
rewrite: ruleset 98 returns: me @ 4 . 5 . 6 . 8
rewrite: ruleset 97   input: me @ 4 . 5 . 6 . 8
rewrite: ruleset  3   input: me @ 4 . 5 . 6 . 8
rewrite: ruleset 96   input: me
rewrite: ruleset 96 returns: me
rewrite: ruleset  3 returns: me
rewrite: ruleset  0   input: me
rewrite: ruleset 98   input: me
rewrite: ruleset 98 returns: me
rewrite: ruleset 95   input:  me
rewrite: ruleset 95 returns: me
rewrite: ruleset  0 returns: $# smtp $@ 4 . 5 . 6 . 8 $: me
rewrite: ruleset 97 returns: $# smtp $@ 4 . 5 . 6 . 8 $: me
rewrite: ruleset  0 returns: $# smtp $@ 4 . 5 . 6 . 8 $: me
>
   Notice when I tested me@4.5.6.7, it delivered the mail to the local
       machine, while me@4.5.6.8 was to be handed off to the smtp mailer.
       That is the correct response.

     * You are all set now.

   Hope the preceding is useful to someone.

   Thanks to all those who have done this great work on Linux and IP
   Aliasing. And especially to Juan Jose Ciarlante for clarifying my
   questions.

   Kudos to the ace programmers!

   If you do find this document useful or have suggestions on
   improvements, do send me an e-mail at h.pillay@ieee.org.

   Enjoy.


     _________________________________________________________________

   Questions?

   Go back to Harish's Home Page
     _________________________________________________________________
  IP Sub-Networking Mini-Howto
  Robert Hart, hartr@interweft.com.au
  v1.0, 31 March 1997

  This document describes why and how to subnetwork an IP network - that
  is using a single A, B or C Class network number to function correctly
  on several interconnected networks.

  1.  Copyright

  This document is distributed under the terms of the GNU Public License
  (GPL).

  This document is directly supported by InterWeft IT Consultants
  (Melbourne, Australia).

  The latest version of this document is available at the InterWeft WWW
  site at InterWeft IT Consultants <http://www.interweft.com.au/> and
  from The Linux Documentation Project <http://sunsite.unc.edu/LDP>.

  2.  Introduction

  With available IP network numbers rapidly becoming an endangered
  species, efficient use of this increasingly scarce resource is
  important.

  This document describes how to split a single IP network number up so
  that it can be used on several different networks.

  This document concentrates on C Class IP network numbers - but the
  principles apply to A and B class networks as well.

  2.1.  Other sources of information

  There are a number of other sources of information that are of
  relevance for both detailed and background information on IP numbers.
  Those recommended by the author are:-

    The Linux Network Administrators Guide
     <http://sunsite.unc.edu/LDP/LDP/nag/nag.html>.

    The Linux System Administration Guide
     <http://linuxwww.db.erau.edu/SAG/>.

    TCP/IP Network Administration by Craig Hunt, published by O'Reilly
     and Associates <http://www.ora.com/catalog/tcp/noframes.html>.

  3.  The Anatomy of IP numbers

  Before diving into the delight of sub-networking, we need to establish
  some IP number basics.

  3.1.  IP numbers belong to Interfaces - NOT hosts!

  First of all, let's clear up a basic cause of misunderstanding - IP
  numbers are not assigned to hosts. IP numbers are assigned to network
  interfaces on hosts.
  Eh - what's that?

  Whilst many (if not most) computers on an IP network will possess a
  single network interface (and have a single IP number as a
  consequence), this is not the only way things happen. Computers and
  other devices can have several (if not many) network interfaces - and
  each interface has its own IP number.

  So a device with 6 active interfaces (such as a router) will have 6 IP
  numbers - one for each interface to each network to which it is
  connected. The reason for this becomes clear when we look at an IP
  network!

  Despite this, most people refer to host addresses when referring to an
  IP number. Just remember, this is simply shorthand for the IP number
  of this particular interface on this host. Many (if not the majority)
  of devices on the Internet have only a single interface and thus a
  single IP number.

  3.2.  IP Numbers as "Dotted Quads"

  In the current (IPv4) implementation of IP numbers, IP numbers consist
  of 4 (8 bit) bytes - giving a total of 32 bits of available
  information.  This results in numbers that are rather large (even when
  written in decimal notation). So for readability (and organisational
  reasons) IP numbers are usually written in the 'dotted quad' format.
  The IP number

               192.168.1.24

  is an example of this - 4 (decimal) numbers separated by (.) dots.

  As each one of the four numbers is the decimal representation of an 8
  bit byte, each of the 4 numbers can range from 0 to 255 (that is take
  on 256 unique values - remember, zero is a value too).

  In addition, part of the IP number of a host identifies the network on
  which the host resides, the remaining 'bits' of the IP number identify
  the host (oops - network interface) itself. Exactly how many bits are
  used by the network ID and how many are available to identify hosts
  (interfaces) on that network is determined by the network 'class'.

  3.3.  Classes of IP Networks

  There are three classes of IP numbers

    Class A IP network numbers use the leftmost 8 bits (the leftmost of
     the dotted quads) to identify the network, leaving 24 bits (the
     remaining three dotted quads) to identify host interfaces on that
     network.
     Class A addresses always have the leftmost bit of the leftmost byte
     a zero - that is a decimal value of 0 to 127 for the first dotted
     quad. So there are a maximum of 128 class A network numbers
     available, with each one containing up to 33,554,430 possible
     interfaces.

     However, the networks 0.0.0.0 (known as the default route) and
     127.0.0.0 (the loop back network) have special meanings and are not
     available for use to identify networks. So there are only 126
     available A class network numbers.

    Class B IP network numbers use the leftmost 16 bits (the leftmost
     two dotted quads) to identify the network, leaving 16 bits (the
     last two dotted quads) to identify host interfaces. Class B
     addresses always have the leftmost 2 bits of the leftmost byte set
     to 1 0. This leaves 14 bits left to specify the network address
     giving 32767 available B class networks. B Class networks thus have
     a range of 128 to 191 for the first of the dotted quads, with each
     network containing up to 32,766 possible interfaces.

    Class C IP network numbers use the leftmost 24 bits (the leftmost
     three bytes) to identify the network, leaving 8 bits (the rightmost
     byte) to identify host interfaces. Class C addresses always start
     with the leftmost 3 bits set to 1 1 0 or a range of 192 to 255 for
     the leftmost dotted quad. There are thus 4,194,303 available C
     class network numbers, each containing 254 interfaces. (C Class
     networks with the first byte greater than 223 are however reserved
     and unavailable for use).

  In summary:

               Network class   Usable range of first byte values (decimal)
                       A                 1 to 126
                       B               128 to 191
                       C               192 to 254

  There are also special addresses that are reserved for 'unconnected'
  networks - that is networks that use IP but are not connected to the
  Internet, These addresses are:-

    One A Class Network
     10.0.0.0

    16 B Class Networks
     172.16.0.0 - 172.31.0.0

    256 C Class Networks 192.168.0.0 - 192.168.255.0

  You will note that this document uses these sequences throughout to
  avoid confusion with 'real' networks and hosts.

  3.4.  Network numbers, interface addresses and broadcast addresses

  IP numbers can have three possible meanings:-

    the address of an IP network (a group of IP devices sharing common
     access to a transmission medium - such as all being on the same
     Ethernet segment). A network number will always have the interface
     (host) bits of the address space set to 0 (unless the network is
     sub-networked - as we shall see);

    the broadcast address of an IP network (the address used to 'talk',
     simultaneously, to all devices in an IP network). Broadcast
     addresses for a network always have the interface (host) bits of
     the the address space set to 1 (unless the network is sub-networked
     - again, as we shall see).

    the address of an interface (such as an Ethernet card or PPP
     interface on a host, router, print server etc). These addresses can
     have any value in the host bits except all zero or all 1 - because
     with the host bits all 0, the address is a network address and with
     the host bits all 1 the address is the broadcast address.

  In summary and to clarify things

       For an A class network...
       (one byte of network address space followed by three bytes of host
       address space)

               10.0.0.0 is an A Class  network number  because all the host
                       bits of the address space are 0
               10.0.1.0 is a host address on this network
               10.255.255.255.255 is the broadcast address of this network
                       because all the host bits of the address space are 1

       For a B class network...
       (two bytes of network address space followed by two bytes of host
       address space)

               172.17.0.0 is a B Class network number
               172.17.0.1 is a host address on this network
               172.17.255.255 is the network broadcast address

       For a C Class network...
       (three bytes of network address space followed by one byte of host
       address space)

               192.168.3.0 is a C Class network number
               192.168.3.42 is a host address on this network
               192.168.3.255 is the network broadcast address

  Almost all IP network numbers remaining available for allocation at
  present are C Class addresses.

  3.5.  The network mask

  The network mask is more properly called the subnetwork mask. However,
  it is generally referred to as the network mask.

  It is the network mask and its implications on how IP addresses are
  interpreted locally on an IP network segment that concerns us most
  here, as this determines what (if any) sub-networking occurs.

  The standard (sub-) network mask is all the network bits in an address
  set to '1' and all the host bits set to '0'. This means that the
  standard network masks for the three classes of networks are:-

    A Class network mask: 255.0.0.0

    B Class network mask: 255.255.0.0

    C Class network mask: 255.255.255.0

  There are two important things to remember about the network mask:-

    The network mask affects only the local interpretation of local IP
     numbers (where local means on this particular network segment);

    The network mask is not an IP number - it is used to modify how
     local IP numbers are interpreted locally.

  4.  What are subnets?

  A subnet is a way of taking a single IP network address and locally
  splitting it up so that this single network IP address can actually be
  used on several interconnected local networks. Remember, a single IP
  network number can only be used on a single network.

  The important word here is locally: as far as the world outside the
  machines and physical networks covered by the sub-netted IP network
  are concerned, nothing whatsoever has changed - it is still just a
  single IP network. This is important - sub-networking is a local
  configuration and is invisible to the rest of the world.

  5.  Why subnetwork?

  The reasons behind sub-networking date back to the early specification
  of IP - where just a few sites were running on Class A network
  numbers, which allow for millions of connected hosts.

  It is obviously a huge traffic and administration problem if all IP
  computers at a large site need to be connected to the same network:
  trying to manage such a huge beast would be a nightmare and the
  network would (almost certainly) collapse under the load of its own
  traffic (saturate).

  Enter sub-networking: the A class IP network address can be split up
  to allow its distribution across several (if not many) separate
  networks.  The management of each separate network can easily be
  delegated as well.

  This allows small, manageable networks to be established - quite
  possibly using different networking technologies. Remember, you cannot
  mix Ethernet, Token Ring, FDDI, ATM etc on the same physical network -
  they can be interconnected, however!

  Other reasons for sub-networking are:-

    Physical site layout can create restrictions (cable run lengths) in
     terms of the how the physical infrastructure can be connected,
     requiring multiple networks. Sub-networking allows this to be done
     in an IP environment using a single IP network number.
     This is in fact now very commonly done by ISPs who wish to give
     their permanently connected clients with local networks static IP
     numbers.

    Network traffic is sufficiently high to be causing significant slow
     downs. By splitting the network up using subnetworks, traffic that
     is local to a network segment can be kept local - reducing overall
     traffic and speeding up network connectivity without requiring more
     actual network bandwidth;

    Security requirements may well dictate that different classes of
     users do not share the same network - as traffic on a network can
     always be intercepted by a knowledgeable user. Sub-networking
     provides a way to keep the marketing department from snooping on
     the R & D network traffic (or students from snooping on the
     administration network)!

    You have equipment which uses incompatible networking technologies
     and need to interconnect them (as mentioned above).

  6.  How to subnetwork a IP network number

  Having decided that you need to subnetwork your IP network number, how
  do you go about it? The following is an overview of the steps which
  will then be explained in detail:-

    Set up the physical connectivity (network wiring and network
     interconnections - such as routers;

    Decide how big/small each subnetwork needs to be in terms of the
     number of devices that will connect to it - ie how many usable IP
     numbers are required for each individual segment.

    Calculate the appropriate network mask and network addresses;

    Give each interface on each network its own IP address and the
     appropriate network mask;

    Set up the routes on the routers and the appropriate gateways,
     routes and/or default routes on the networked devices;

    Test the system, fix problems and then relax!

  For the purpose of this example, we will assume we are sub-networking
  a single C class network number: 192.168.1.0

  This provides for a maximum of 254 connected interfaces (hosts), plus
  the obligatory network number (192.168.1.0) and broadcast address
  (192.168.1.255).

  6.1.  Setting up the physical connectivity

  You will need to install the correct cabling infrastructure for all
  the devices you wish to interconnect designed to meet your physical
  layout.

  You will also need a mechanism to interconnect the various segments
  together (routers, media converters etc.).

  A detailed discussion of this is obviously impossible here. Should you
  need help, there are network design/installation consultants around
  who provide this sort of service. Free advice is also available on a
  number of Usenet news groups (such as comp.os.linux.networking).

  6.2.  Subnetwork sizing

  There is a play off between the number of subnetworks you create and
  'wasted' IP numbers.

  Every individual IP network has two addresses unusable as interface
  (host) addresses - the network IP number itself and the broadcast
  address. When you subnetwork, each subnetwork requires its own, unique
  IP network number and broadcast address - and these have to be valid
  addresses from within the range provided by the IP network that you
  are sub-networking.

  So, by sub-networking an IP network into two separate subnetworks,
  there are now two network addresses and two broadcast addresses -
  increasing the 'unusable' interface (host) addresses; creating 4
  subnetworks creates eight unusable interface (host) addresses and so
  on.

  In fact the smallest usable subnetwork consists of 4 IP numbers:-

    Two usable IP interface numbers - one for the router interface on
     that network and one for the single host on that network.

    One network number.

    One broadcast address.

  Quite why one would want to create such a small network is another
  question! With only a single host on the network, any network
  communication must go out to another network. However, the example
  does serve to show the law of diminishing returns that applies to sub-
  networking.

  In principle, you can only divide your IP network number into 2^n
  (where n is one less that the number of host bits in your IP network
  number) equally sized subnetworks (you can subnetwork a subnetwork and
  combine subnetworks however).

  So be realistic about designing your network design - you want the
  minimum number of separate local networks that is consistent with
  management, physical, equipment and security constraints!

  6.3.  Calculating the subnetwork mask and network numbers

  The network mask is what performs all the local magic of dividing an
  IP network into subnetworks.

  The network mask for an un-sub-networked IP network number is simply a
  dotted quad which has all the 'network bits' of the network number set
  to '1' and all the host bits set to '0'.

  So, for the three classes of IP networks, the standard network masks
  are:-

    Class A (8 network bits) : 255.0.0.0

    Class B (16 network bits): 255.255.0.0

    Class C (24 network bits): 255.255.255.0

  The way sub-networking operates is to borrow one or more of the
  available host bits and make then make interfaces locally interpret
  these borrowed bits as part of the network bits. So to divide a
  network number into two subnetworks, we would borrow one host bit by
  setting the appropriate bit in the network mask of the first (normal)
  host bit to '1'.

  For a C Class address, this would result in a netmask of
  11111111.11111111.11111111.10000000
  or 255.255.255.128

  For our C Class network number of 192.168.1.0, these are some of the
  sub-networking options you have:-

  ______________________________________________________________________
  No of      No of
  subnets    Hosts/net    netmask
  2            126        255.255.255.128 (11111111.11111111.11111111.10000000)
  4             62        255.255.255.192 (11111111.11111111.11111111.11000000)
  8             30        255.255.255.224 (11111111.11111111.11111111.11100000)
  16            14        255.255.255.240 (11111111.11111111.11111111.11110000)
  32             6        255.255.255.248 (11111111.11111111.11111111.11111000)
  64             2        255.255.255.252 (11111111.11111111.11111111.11111100)
  ______________________________________________________________________

  In principle, there is absolutely no reason to follow the above way of
  subnetworking where network mask bits are added from the most
  significant host bit to the least significant host bit. However, if
  you do not do it this way, the resulting IP numbers will be in a very
  odd sequence! This makes it extremely difficult for us humans to
  decide to which subnetwork an IP number belongs as we are not too good
  at thinking in binary (computers on the other hand are and will use
  whatever scheme you tell them with equal equanimity).

  Having decided on the appropriate netmask, you then need to work out
  what the various Network and broadcast addresses are - and the IP
  number range for each of these networks. Again, considering only a C
  Class IP Network number and listing only the final (host part) we
  have:-

  ______________________________________________________________________
  Netmask         Subnets Network B'cast  MinIP   MaxIP   Hosts  Total Hosts
  --------------------------------------------------------------------------
      128            2       0     127       1     126    126
                           128     255     129     254    126     252

      192            4       0      63       1      62     62
                            64     127      65     126     62
                           128     191     129     190     62
                           192     255     193     254     62     248

      224            8       0      31       1      30     30
                            32      63      33      62     30
                            64      95      65      94     30
                            96     127      97     126     30
                           128     159     129     158     30
                           160     191     161     190     30
                           192     223     193     222     30
                           224     255     225     254     30     240
  ______________________________________________________________________

  As can be seen, there is a very definite sequence to these numbers,
  which make them fairly easy to check. The 'downside' of sub-networking
  is also visible in terms of the reducing total number of available
  host addresses as the number of subnetworks increases.

  With this information, you are now in a position to assign host and
  network IP numbers and netmasks.

  7.  Routing

  If you are using a Linux PC with two network interfaces to route
  between two (or more) subnets, you need to have IP Forwarding enabled
  in your kernel. Do a

  ______________________________________________________________________
          cat /proc/ksyms | grep ip_forward
  ______________________________________________________________________

  You should get back something like...

  ______________________________________________________________________
  00141364 ip_forward_Rf71ac834
  ______________________________________________________________________

  If you do not, then you do not have IP-Forwarding enabled in your
  kernel and you need to recompile and install a new kernel.

  For the sake of this example, let us assume that you have decided to
  subnetwork you C class IP network number 192.168.1.0 into 4 subnets
  (each of 62 usable interface/host IP numbers). However, two of these
  subnets are being combined into a larger single network, giving three
  physical networks.
  These are :-

  ______________________________________________________________________
  Network         Broadcast       Netmask                 Hosts
  192.168.1.0     192.168.1.63    255.255.255.192         62
  192.168.1.64    192.168.1.127   255.255.255.192         62
  182.168.1.128   192.168.1.255   255.255.255.126         124 (see note)
  ______________________________________________________________________

  Note: the reason the last network has only 124 usable network
  addresses (not 126 as would be expected from the network mask) is that
  it is really a 'super net' of two subnetworks. Hosts on the other two
  networks will interpret 192.168.1.192 as the network address of the
  'non-existent' subnetwork. Similarly, they will interpret
  192.168.1.191 as the broadcast address of the 'non-existent'
  subnetwork.

  So, if you use 192.168.1.191 or 192 as host addresses on the third
  network, then machines on the two smaller networks will not be able to
  communicate with them.

  This illustrates an important point with subnetworks - the usable
  addresses are determined by the SMALLEST subnetwork in that address
  space.

  7.1.  The routing tables

  Let us assume that a computer running Linux is acting as a router for
  this network. It will have three network interfaces to the local LANs
  and possibly a fourth interface to the Internet (which would be its
  default route.

  Let us assume that the Linux computer uses the lowest available IP
  address in each subnetwork on its interface to that network. It would
  configure its network interfaces as

  ______________________________________________________________________
  Interface       IP Address      Netmask
  eth0            192.168.1.1     255.255.255.192
  eth1            192.168.1.65    255.255.255.192
  eth2            192.168.1.129   255.255.255.128
  ______________________________________________________________________

  The routing it would establish would be

  ______________________________________________________________________
  Destination     Gateway         Genmask         Iface
  192.168.1.0     0.0.0.0         255.255.255.192 eth0
  192.168.1.64    0.0.0.0         255.255.255.192 eth1
  192.168.1.128   0.0.0.0         255.255.255.128 eth2
  ______________________________________________________________________

  On each of the subnetworks, the hosts would be configured with their
  own IP number and net mask (appropriate for the particular network).
  Each host would declare the Linux PC as its gateway/router, specifying
  the Linux PCs IP address for its interface on to that particular
  network.

  Robert Hart Melbourne, Australia March 1997.

  IPMasquerading+Napster mini-HOWTO
  John E. Danner
  v1.6, 11 April 2000

  This mini-HOWTO present a way to allow users behind an IPMasq'd system
  to use Napster.

  For information about Napster, please see their website at Napster
  Homepage <http://www.napster.com/>

  1.  DISCLAIMER

  In order to allow Napster to work correctly, you will need to put a
  hole in the IP Masq'd system. This inherently presents potential
  security problems. Unfortunately I cannot accept responsibility for
  this hack. So if you do this, and you get burned because of it...not
  my fault. Great...now lets get into it...

  2.  INTRODUCTION

  After setting up a network for my roommates and I, the problem arose
  that were not able to use Napster because of the IPMasquerading I was
  doing. So I put some time into and came up with this solution to the
  problem. I hope it works for you like it did for me...but I can't
  promise anything.

  3.  BEFORE YOU BEGIN

  I have tested this solution with the following variables:


  1. Napster v2.0 Beta 5a (for Windows), visit Napster Homepage
     <http://www.napster.com/> to ensure you have the newest version.

  2. One external IP to the internet.

  3. Currently 6 systems behind the IPMasq'd machine, 4 using Napster.

  4. Using Linux kernel version 2.2.12-20 (RedHat v6.1 Distribution)

  5. IPMASQADM utility version 0.42, get it Here
     <http://juanjox.kernelnotes.org/>

  4.  PROCEDURE

  First off, ensure that you have the version (or newer) as listed above
  in the previous section. Also be sure they are installed correctly.


  1. Install Napster on the Windows client PC's

  2. After installation and Napster user setup, this version of Napster
     will begin "Finding Acceptable Local Data Port", after a short time
     an error will occur.  Note: If you have already installed napster
     v2.0 beta 5a, under the file menu select 'Properties.'

  3. At this point select the second option "I am not behind a firewall
     or I configured my firewall - Use TCP port:"

  4. Enter a unique number. Each computer that will be running Napster
     will need to use a different port. It may be easier to use the last
     number of the IP address. For example: if the computer's IP is
     192.168.1.2, then 6702 would be easiest to remember.  Note: make
     sure you don't pick ports for services that are running (i.e. 21,
     110, etc...see /etc/services for a listing)

  5. Repeats steps 1 - 4 for all systems that will be using Napster.

  6. Now login to your IPMasq'd system and modify a startup file of your
     choice (I choose to use /etc/rc.d/rc.local)

     The following lines pass the connection to the Napster clients running on the hosts behind your IPMasq'd system.
     (add them to the startup file - you'll need to one command for each host using Napster)

     /usr/sbin/ipmasqadm portfw -a -P tcp -L xxx.xxx.xxx.xxx 6702 -R 192.168.1.2 6702
     /usr/sbin/ipmasqadm portfw -a -P tcp -L xxx.xxx.xxx.xxx 6703 -R 192.168.1.3 6703
     /usr/sbin/ipmasqadm portfw -a -P tcp -L xxx.xxx.xxx.xxx 6704 -R 192.168.1.4 6704
     /usr/sbin/ipmasqadm portfw -a -P tcp -L xxx.xxx.xxx.xxx 6705 -R 192.168.1.5 6705

     Note: XXX.XXX.XXX.XXX is the IP address of the Linux IPMasqing system (the Internet IP).


  Note: If you are having problems with IPMASQADM or IPMasquerading in
  general see the IPMASQ-HOWTO. This document is provided to help people
  who have their systems configured. The IPMASQ-HOWTO will get into a
  deeper discussion of port forwarding and IPMasq'd in general.


  5.  DYNAMIC IP AREA (Dial-up or DHCP)

  See this and the Procedure section if your IP address changes
  everytime you connect to the internet.

  Thanks to Peter Illmayer for the following submission to me: (This
  will work out best for those of you with dynamic IP's...)

  ------------------------------------------------------------
  IN debian, I created a forward file in /etc/ppp/ip-up.d and put in

  #!/bin/sh
  ppp_ip="`/sbin/ifconfig ppp0 | grep 'inet addr' | awk '{print $2}' | sed -e
  /usr/sbin/ipmasqadm portfw -f
  /usr/sbin/ipmasqadm portfw -a -P tcp -L ${ppp_ip} 6702 -R 192.168.0.2 6702

  This is in a 2.2.x kernel with ipmasqadm installed with the appropriate
  kernel modules compiled in.
  ---------------------------------------------------------------


  Charles J. Fisher pointed out that a similar script can be used if you
  are using DHCP, insert the following lines in a script that runs after
  you get your IP address.

  net_ip="`ifconfig eth0 | awk '/inet/ {sub(/addr:/,"",$2); print $2}'`"
  /usr/sbin/ipmasqadm portfw -f
  /usr/sbin/ipmasqadm portfw -a -P tcp -L ${net_ip} 6702 -R 192.168.1.2 6702


  Of course the more machines using Napster behind your IPMasq'd machine
  the more port forwards you need to do.

  6.  FINISHED PRODUCT

  This system will allow Napster to operate properly behind an IPMasq'd
  system.  Hopefully it works for you as well as it does for me! Please
  direct comments/suggestions/flames to   jed204@psu.edu

  7.  HOWTO MAINTENANCE

  This is the initial version of this document. Very rough. If the
  interest is out there and things changes, so will this document. If
  anyone else has a solution they think is better...please, all means,
  let me know and we can discuss what the best solution possible is.

  8.  Copyright and License

  Copyright (c) 2000 by John E. Danner

  Please freely copy and distribute (sell or give away) this document in
  any format. It's requested that corrections and/or comments be
  fowarded to the document maintainer. You may create a derivative work
  and distribute it provided that you:

  1.Send your derivative work (in the most suitable format such as sgml)
  to the LDP (Linux Documentation Project) or the like for posting on
  the Internet. If not the LDP, then let the LDP know where it is
  available.

  2.License the derivative work with this same license or use GPL.
  Include a copyright notice and at least a pointer to the license used.

  3.Give due credit to previous authors and major contributors.

  If you're considering making a derived work other than a translation,
  it's requested that you discuss your plans with the current
  maintainer.



  ISP-Connectivity-mini-HOWTO
  Michael Strates, mstrates@croftj.net
  v2.0, 6 November 1997

  This document describes how to setup PPP, connect up to your ISP, con-
  figure mail and news, get a permanent IP (if available), get a domain
  name, and have a bonda fide system running in a little over thirty
  minutes.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 New versions of this document
     1.2 Feedback
     1.3 Standard Disclaimer
     1.4 Copyright Information

  2. Connecting to the Outside World

     2.1 Talking and Communicating with pppd and chat
     2.2 IP's, Domain Names and Subnets

  3. Electronic Mail on your Linux Box

  ______________________________________________________________________

  1.  Introduction

  The main goal of this document obviously is to make the new user
  friendly with the many terms of connecting your Linux PC up to the
  Internet, obtaining IP addresses, domain names, and setting things up.
  This guide is intended for the intermediate user in mind, although
  intelligent newbies shouldn't have any problems.

  1.1.  New versions of this document

  New versions of this document will be periodically posted to
  comp.os.linux.answers.  They will also be added to the various
  anonymous FTP sites who archive such information, including:

  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO

  In addition, you should generally be able to find this document on the
  Linux Documentation Project page via:

  http://sunsite.unc.edu/LDP/


  1.2.  Feedback

  I certaintly welcome any feedback about this HOWTO, spelling mistakes,
  how it all worked out, thankyou notes and critisisms. I hope I helped
  a few people with this HOWTO, and if I did, I'd be really happy to
  hear from you.

  mstrates@croftj.net

  http://linloft.home.ml.org/


  1.3.  Standard Disclaimer

  No liability for the contents of this documents can be accepted.  Use
  the concepts, examples and other content at your own risk.  As this is
  a new edition of this document, there may be errors and inaccuracies,
  that may of course be damaging to your system.  Proceed with caution,
  and although this is highly unlikely, I don't take any responsibility
  for that.

  Naturally, there are probably better and easier ways to do things in
  this document. There will always be another way in the Linux World.
  This is the way I've done things, and that's the way I'll be
  presenting them in this HOWTO.

  1.4.  Copyright Information

  This document is copyrighted (c)1997 Michael Strates and distributed
  under the following terms:

  o  Linux HOWTO documents may be reproduced and distributed in whole or
     in part, in any medium physical or electronic, as long as this
     copyright notice is retained on all copies. Commercial
     redistribution is allowed and encouraged; however, the author would
     like to be notified of any such distributions.

  o  All translations, derivative works, or aggregate works
     incorporating any Linux HOWTO documents must be covered under this
     copyright notice.  That is, you may not produce a derivative work
     from a HOWTO and impose additional restrictions on its
     distribution. Exceptions to these rules may be granted under
     certain conditions; please contact the Linux HOWTO coordinator at
     the address given below.

  o  If you have questions, please contact Tim Bynum, the Linux HOWTO
     coordinator, at

  linux-howto@sunsite.unc.edu Finger for phone number and snail mail
  address.


  2.  Connecting to the Outside World

  In this document, we'll explain how to do this using PPP (Point to
  Point Protocol), a popular protocol nearly always used over the
  Internet. It allows your modem to speak to the outside world. This is
  what applications like Trumpet Winsock in Windows 3.x did, and many
  other programs that you've probably have never seen.

  In Linux, we use a thing called chat to do the dialing up to the ISP
  and then use a utility called pppd to 'use' the connection. In a
  sense, chat is your dialer, and pppd is your protocol. We'll describe
  how to setup both below.

  2.1.  Talking and Communicating with pppd and chat

  Probably the easiest way to go about things is to make a shell script
  in root's home directory called ppp-connect and involke the script
  whenever you wish to make your connection. We'll discuss this method.

  Open up your favourite editor as root on  /ppp-connect. You'll then
  have to decide on your parameters.

  pppd connect 'chat -v "" "your_init_string" "" ATDTisp_number CONNECT
  "" ogin: your_username word: your_passwd' /dev/tty(0/1/2) speed modem

  pppd involkes /usr/sbin/pppd on my system, then loads up chat to do
  the dialing. Chat sends your_init_string to the modem, then dials
  isp_number. It then waits for CONNECT, then waits for ogin: (l removed
  as the first character is sometimes lost), sends your_passwd, chat
  then terminates and hands the show over to pppd.

  The last of the command specifies your modem port (mine's /dev/ttyS1).
  In most cases it will be ttyS1 (COM2: in DOS), ttyS0 (COM1: in DOS),
  or if your using Slackware, cua1 or cua0. The speed is the speed of
  the modem. I use 115200 for my modem (a 33.6k). If you have got a
  fairly recent computer (one with a 16550 UART), then I wouldn't go any
  lower than 57600.  Otherwise, for 14.4k 38400. Modem just tells pppd
  that it's a serial/modem based connection. Remove the -v option if you
  don't want verbose logging to your logfiles.

  The scenario below is one of a person who dials up an ISP that
  automatically starts PPP for them, ie; they don't have a shell that
  actually starts. This is his command in his  /ppp-connect:

  pppd connect 'chat "" "ATZ" "" ATDT555-1800 CONNECT "" ogin: johnny
  word: blackjak' /dev/ttyS1 115200 modem

  But for some people, they're ISP starts up a shell and doesn't
  automatically start PPP this may be a problem. Luckily, chat can deal
  with that too. You just add another command to your chat script. For
  example, below this johnny character is using an ISP that just dumps
  him to a shell, requiring him to type ppp to get a ppp connection. His
  shell prompt ends with a $.  pppd connect 'chat "" "ATZ" ""
  ATDT555-1800 CONNECT "" ogin: johnny word: blackjak $ ppp' /dev/ttyS1
  115200 modem

  If it's more than one word, ensure you quote it. I hope you can see
  the drift of this, and are able to create your own script up to suit
  your connection. Simply modify either the first johnny or the second
  johnny script to suit your taste, port, server, etc and save the file.

  Now you've made your file, ensure that only root can execute, read or
  write to it. This is extreemly important. Also make sure nobody can
  read your logfiles, if you decide to leave the -v option in, as your
  password is seen in cleartext in the logs (I don't see much need for
  -v, if you don't know what I'm talking about, leave -v out).

  2.2.  IP's, Domain Names and Subnets

  For most people using the options above, a changing IP address won't
  bother them. These people include basic, easy going users, that just
  have dialup accounts, and aren't very technically minded. For those
  people, skim read this section, I'll come to important things you need
  to do to setup your system properly. Newbies, skip the sections
  dealing with permanent IP, Domain Names, Subnets, and just read the
  last bit of this section.

  Getting a permanent IP address might be free for your ISP, so if in
  doubt ask them. Personally, I'd pay for a permanent IP address. It
  lets you send e-mail to and from using a unique IP or domain, etc. If
  you want to get yourself a permanent IP, write an e-mail to
  root@yourisp.com, and ask him nicely if he can arrange a permanent IP
  for you.


  When you get your permanent IP address, grep through your /etc
  directory to find where your old IP addresses are. I had to change
  files in my sendmail directory and /etc/hosts. There are some other
  key files that you will only discover with grepping. Open up
  /etc/hosts, and add your new IP address in the standard format. Reboot
  your computer, and you should be ready to go.

  You'll now need to change your chat script to reflect your new
  settings.  If you are forced into PPP as soon as you start your
  connection, you'll need to tell your System Administrator of your ISP
  to ensure their PPP system recognises that you have a permanent IP
  address and allocates you that instead of a changing one. If you get
  dumped at a shell prompt, and you need to type ppp or something to
  start the connection, instead of typing that, change your  /ppp-
  connect script to send this instead of just ppp or whatever when it
  sees $ or whatever your shell prompt is.

  /usr/sbin/pppd :Your_IP_Address

  Substitute your IP address for the IP address your ISP gave to you. Be
  sure you encapsulate the thing in " " marks when you put it into your
  chat script. If this doesn't work, consult your ISP where your PPP
  daemon is located, and ask him for the command to give. You could just
  try leaving it as is and seeing if the server will recognise you and
  give you your rightful address.

  The next thing probably to do is to get yourself a domain name. I know
  that in Australia, .asn.au and .org.au are free. In the United States,
  you can get a .us domain for free, but they tend to be long. If your
  in Australia, you must go to http://www.aunic.net/ to register your
  domains. In the United States, it is http://www.internic.net/ .

  To register domains you need to be able to provide DNS services, and
  gorey stuff like that. If your ISP can't provide these, throw out an
  official .asn.au or whatever domain out the window, and get a Monolith
  Internet Domain.

  Monolith offer free domains to anybody and anyone all around the
  world.  Everything is done without human interaction, via a web forms
  interface with your browser. Your domain comes in the form of
  Your_Choice.ml.org.  Monolith will then host the DNS locally for you.
  If you want to send and receive mail from that domain, ask your ISP to
  become a mail exchanger for you.

  Go to http://www.ml.org/ and fill out an application, enter the NIC
  with your username and password, and make a FREED domain. You'll need
  to enter your IP address, so have that ready. Your domain will be in
  the DNS in a couple of days.

  Okay now, we'll move onto the newbies section, or for those people who
  can't get a permanent IP address or a domain name. All you have to do
  is edit /etc/hosts as root, call your site something that won't clash,
  give it a 10.10.10 or something for an IP address and reboot your
  computer.

  There you go, you've just setup your computer with pppd and chat in
  just ten minutes. Now let's move onto the next section, which deals
  with Electronic Mail.

  3.  Electronic Mail on your Linux Box

  One of the most important aspects of the Internet, is it's fasinating
  capaiblity to transfer mail to and from countries, or more locally
  perhaps. Linux is extreemly strong in easy mail packages for the
  console.  The one we're going to document today is called Pine
  (Program for Internet Mail and News), made by the University of
  Washington, and to download the mail, a program called Fetchmail, made
  by Eric S. Raymond. Both should be included in your Linux
  distribution.

  Fetchmail is a program that downloads your e-mail from your server
  using POP, transfers the mail onto your computer and then deletes it
  off the server, much like programs like Eudora or Microsoft Internet
  Mail/Exchange do. To configure and automate fetchmail, you use a file
  in your home directory called .fetchmailrc. Simply open up
   /.fetchmailrc (Remember: your doing this bit as yourself, not as
  root) with your favourite editor and observe the command lin eoptions
  below:

  poll mail.yourisp.com proto pop3 user login_name password your_passwd

  user login_name with pass your_passwd is login_name here

  All you have to do is replace mail.yourisp.com with the name of the
  mail server of your ISP, your_passwd with your password, and
  login_name with your login name.

  An important thing to note. For Pine and this procedure to work
  correctly, your login name must corrospond with the login name you use
  on your ISP.  That is your local login name must match the one you use
  on your server, and your e-mail address.

  Next, ensure that .fetchmailrc has the correct permissions (user
  read/write only) and your laughing. Fetchmail can be started in two
  ways, in standard mode (where it'll fetch messages from the server and
  terminate), or in daemon mode (where it will stay active, and
  check/download mail every X seconds). To use daemon mode, type
  fetchmail -a -d(Seconds between Polls). -a ensures it downloads all
  mail. To use the standard mode, just type fetchmail -a.

  Next, you need to setup Pine. Open up Pine, by typing pine at your
  prompt, choose Setup - Configuration. Setup your userdomain as the
  domain in your e-mail address, for example jack@linux.org, would be
  linux.org. Next, setup smtp-server as your POP mail server (the same
  you used in the fetchmail setup). So we enter www.linux.org. If you
  want news, setup your nntp server to your ISP's news server.

  So there you have it folks, everything should be working now. To
  connect up to your ISP, just run  /ppp-connect as root. Then, to get
  your e-mail run fetchmail -a as yourself. To browse your e-mail and
  news, use Pine. Install a text-based browser such as Lynx to browse
  the web if you like.

  Send any comments questions and suggestions to mstrates@croftj.net

  Linux Install From PPA-Zip drive mini-HOWTO
  by Kevin Snively, k.snively@seaslug.org
  v01.04, 29 April 1998

  This document describes how to install Linux from a parallel port zip
  drive using the Slackware Linux distribution.
  ______________________________________________________________________

  Table of Contents


  1. Prelude

     1.1 Intro:
     1.2 Background:
     1.3 Advantages:
     1.4 Material:
     1.5 Conventions:
     1.6 Other reading:
        1.6.1 Slackware

  2. Slackware

     2.1 Making the first zip disk.
     2.2 Making the second zip disk.
     2.3 Making the boot floppy.

  3. The install:

     3.1 Round 1.
     3.2 Round 2.
     3.3 Library Trouble

  4. Thank you

  ______________________________________________________________________

  1.  Prelude

  1.1.  Intro:

  The following method has been written for use with the Slackware Linux
  distribution. It assumes some familiarity with it's installation. The
  installer will also need access to a working Linux system of any
  distribution.  It also assumes the destination system has 4 to 6 megs
  ram.  More powerful systems can use this method also but you will
  probably be able to find a faster easier way.  It is not intended to
  be used by first time installers or by people new to Linux.  Only
  issues specific to the use of a zip drive as source media will be
  covered here.


  1.2.  Background:


  I have an OLD 486/20 slc with a 120 meg hd, 4 megs ram and a 2400 baud
  modem that I wanted to run Linux on. It has no cdrom drive or pcmcia
  connectivity, and will never see a network card (parallel port style).
  There is nothing left that can be upgraded on this unit.

  Linux has been at the cutting edge from the start but also breathes
  new life into some older 386 and 486 hardware.  The documentation says
  "386 with 2 megs ram no math coprocessor" but try to find a
  distribution that will do it today.  Slackware can be placed on a 4
  meg machine with some work and a prayer. The following system greatly
  reduces the work.  Prayer always helps, even with the best of systems.

  I've  used the following system with 3 other laptops, and one 386
  desktop machine. The lamest being a 386 with 4 megs ram & 60 meg HD no
  math coprocessor.  While this system works well I'd like to be able to
  do similar tricks with Debian, RedHat, Caldera Lite, and some of the
  other popular distributions offering more choice to Linux users I help
  this way.

  1.3.  Advantages:

  Installing from cdrom or Ethernet are the methods of choice when
  available.  In cases where floppy disk install appears to be the only
  choice a parallel port zip drive offers numerous advantages.  These
  include better speed than a floppy disk, and fewer disk changes. In
  addition on systems with minimal ram "6 megs. or less" the ability to
  install a swap file on the root disk uncomplicates the install greatly
  by freeing you from the need to creat one on the hard disk before
  running setup. When installing Slackware the swap file allows
  installers to choose the color.gz root disk or text.gz. The color.gz
  is not recommended for floppy based installs on machines with such
  limited resources. With a zip disk you may also produce an emergency
  boot disk during the initial install, by freeing the first floppy
  drive. Something not possible during a normal floppy based install on
  systems of this type.


  1.4.  Material:


  This method has been used with Slackware Ver's. 3.1, through 3.4 A
  full Slackware install requires 2 zip disk's not counting source
  packages if they are desired. You will need one parallel port zip
  drive & cables, and a 1.44 meg boot disk. Pencil and paper are
  optional for making a few notes during install.

  At least two systems are required to use this install method. The
  first (host) system is used to prepare the installation media and must
  contain a working Linux system. The second will be the target system.
  Once the media has been prepared it can be used to install to as many
  target systems as you like.  I work from cdrom but you can down load
  your distribution from the Internet if you have a fast enough
  connection.  For me this is not practical.

  1.5.  Conventions:

       let (floppy)    represent the path to and directory you
                       mount your 1.44 meg floppy disk on.

       let    (zip)    represent the path to and directory you
                       mount your zip disk on.

       let  (cdrom)    represent the path to and directory you
                       mount your cdrom on.

       let (verx.x)    represent the distribution version you
                       are installing.


  If you down load your disk images please let (cdrom)/slakware the path
  and directory to those images.  My parallel port zip drive shows up on
  my system as

               /dev/sda4

  I've never seen it come up as any thing else unless I run fdisk on it
  and change the partition table, creating more than one partition on
  the disk. Then I always get corrupt disk error messages when I try to
  use it. You may however mark the partition type 83 Linux etc... if you
  wish with out trouble.  You also need to know the device names of your
  cdrom and 1.44 meg floppy drives. Mine are

              /dev/hdc     cdrom
              /dev/fd0     1.44 meg floppy

  I'll use my device names, you use yours ;-|)

  About Slackware and slakware (note the missing c in slakware).
  Slackware is the name of the overall distribution and slakware is the
  name of the directory where Patrick Volkerding places the stable "not
  experimental or developmental" packages for installation. Whenever I'm
  writing about slakware I'm writing about the directory.


  1.6.  Other reading:


  Linux Installation and Getting Started by Matt Welsh

  If you are having trouble accessing your zip drive please see the
  Linux ZIP drive mini-HOWTO by Grant Guenther

  When you have completed your install I can not recommend strongly
  enough that you work through the Small-Memory mini-HOWTO by Todd
  Burgess

  1.6.1.  Slackware

  I also recommend the LOWMEM.TXT document from the Slackware
  documentation on your cdrom or Slackware ftp site. This document
  discribes a system that eleminates many of the difficulties discribed
  in that document.

  2.  Slackware

  2.1.  Making the first zip disk.


  1)    Attach zip drive to host system, insert blank zip disk into the
  drive and boot the system to Linux

  2)    Login. You probably need to login as root or the user you log in
  as will need to be able to write file systems, mount and unmount disks
  etc....

  3)    Install an ext2fs file system on the zip disk.  with the
  command:


                /sbin/mke2fs -b 1024 /dev/sda4

  4)    Mount the zip disk with:


                mount /dev/sda4 /(zip)

  5)    Insert your cdrom into its drive and mount it:


                mount /dev/hdc /(cdrom)

  6)    Make a directory to install the slakware disk images in:


                mkdir /(zip)/slakware

  7)    Make a writable ( non zip disk ) temporary directory on your
  main disk to work in. May I suggest:


                mkdir /root/slakware/(verx.x)

  8)    Copy the root disk image to the above named directory:


                cp /(cdrom)/rootdsks/text.gz /root/slakware/(verx.x)/

  9)    Change directories to the one the root disk image was copied to
  and decompress it with the commands:


                cd /root/slakware/(verx.x)
                gunzip text.gz

  10)   Install a 1.44 meg floppy with a dos or ext2fs file system on it
  in its drive and copy the root disk image to it this time with the dd
  command:


                dd if=text of=/dev/fd0

  11)   Mount the 1.44 meg floppy with the command:


                mount /dev/fd0 /(floppy)

  12)   Copy the root disk image to the zip disk:


                cp -dpR /(floppy)/* /(zip)/

  13)   In order to ease the install process later we will want to cre
  ate a swap file on the zip disk of about 8 megs. with:


                dd if=/dev/zero of=/(zip)/swap bs=1024 count=8208

  14)    Initialize the swap file with:


                /sbin/mkswap /(zip)/swap 8208

  15)    Next with your favorite text editor you will need to edit the
  file   /(zip)/etc/rc   and after the line /bin/mount -av -t nonfs
  insert a new line


                /sbin/swapon /swap

  16)   Copy the disk images to the zip disk:
                cp -r /(cdrom)/slakware/[a-ty]* /(zip)/slakware/ &

  include the square brackets [a-ty]* exactly as shown above. the & sign
  at the end of the line will make this command execute in the back
  ground.  It takes about 20 min to complete. Use this time for some
  coffee and reading more HOWTO's.

  17)  External zip drives have two lights--mine are green and yellow;
  the internal drives appear to have only one. When my zip disk has
  finished receiving information the yellow light goes out and I'm left
  with just the green power light. on internal drives the single
  "status?" light will go out.

  It is now time to prepare the floppy and zip disks for removal from
  their drives by unmounting them:


                cd
                umount /dev/fd0
                umount /dev/sda4

  18)  Life will be easier later if we check the root disk's file system
  before we try to use it with the command:


                /sbin/e2fsck -f /dev/sda4

  When disk activity ends if there are no errors you may remove the zip
  disk from the drive and label it Slackware Root disk. I also include
  the version number in pencil.


  2.2.  Making the second zip disk.

  If the X window system is to be installed or you will be needing one
  of the other prebuilt kernels it is now time to build the 2nd. zip
  disk.


  x1)  Insert disk 2 in the zip drive. I like to write an ext2fs file
  system on this disk also, but if it has a M$ Dos file system that will
  work also. I use the up arrow key on my keyboard to recall previously
  used commands from my history file because I'm a bit lazy, but if you
  want to retype the command repeat instructions 3), 4), and 6) above.

  x2)  Copy the X11R6 "X Window" packages to zip


                cp -r /(cdrom)/slakware/x* /(zip)/slakware/ &

  again in the background. This will take about 1/2 as long as step 9)
  did.  If your system was slow then it will be again. More coffee and
  HOWTO reading.

  x3)  There is also room on this disk for the custom kernels directory.
  It is classy to install one that meets the system's needs as closely
  as possible to go with the one needed to access the zip drive.  Make
  this kernel the system default. So now we will make a directory for
  that and then copy the information to it:

                mkdir /(zip)/kernels
                cp -r /(cdrom)/kernels/* /(zip)/kernels/ &

  This will take another 10 or 15 min. Dispose of the used coffee? Read
  more Linux Documentation?

  x4)  When disk activity is at an end unmount the disk and run fsck on
  it:


                umount /dev/sda4
                /sbin/e2fsck -f /dev/sda4

  x5)  When e2fsck is done with the disk and the command prompt returns
  to the screen eject the disk and label it.


  2.3.  Making the boot floppy.


  b1)  I now make a 1.44 meg boot disk. Use the
  /(cdrom)/bootdsks.144/iomega.s image. Install a new 1.44 meg floppy
  disk in the proper drive. The command to make the disk is:


                dd if=/(cdrom)/bootdsks.144/iomega.s of=/dev/fd0

  b2)  Check the file systems of the boot disk:


                /sbin/e2fsck -f /dev/fd0

  When disk activity ends if there are no errors you may remove all your
  disks, write protect your boot floppy and label it including version
  number.

  3.  The install:

  After connecting everything up to the target machine and putting the
  zip disk in place I boot the machine with the appropriate boot disk.
  Before logging in it is a good idea to use the scroll back feature
  built into Linux and check to see all your hardware was detected
  properly. To do this hold the shift key and use the page up and page
  down keys as appropriate. Getting a login prompt at all usually means
  the boot time errors were not too bad.


  3.1.  Round 1.

  Slackware will present some instructions. Please read them Carefully.
  Login as root and fdisk root and swap partitions on the target drive
  if needed. Reboot the machine if you ran fdisk and Carefully reread
  the instructions on the screen if there are any, then login as root.

  Even on machines with only 4 megs. of ram you will not need to create
  a swap partition until prompted to do so in the setup program. We
  already have swap running on the zip disk. Run the Slackware setup
  program:


                 setup

  CAREFULLY read and follow the instructions the menus provide.  The
  first thing setup will want to do is create and initialize your swap
  partition on your hard drive this is ok despite the dire warnings and
  will not affect the swap file on the zip drive.

  You do not want to allow /dev/sda4 to be automatically mounted and
  when questions come up about this in the menus. Do not add it unless
  this zip drive is dedicated to the target machine full time.

  When you get the menu that asks where the source of the installation
  media is select item number 4. "Install from a premounted directory".
  The next screen will ask for its name, it is /slakware.

  I recommend installing only the "a" disk set at this time. It will
  crash the install if the person selecting packages gets greedy and
  fills the disk before lilo is written and the kernel is installed.
  During basic install I install the kernel from the boot disk only.
  There are relatively few choices to be made from here and the
  Slackware documentation from the cdrom or your ftp site will do you
  much better than I can from here.

  Leave the zip drive and disk in place after the initial install is
  complete.  Remove the floppy when prompted to do so and reboot.  If
  all is right in the world Bill, er, your friend/customer will have a
  working Linux system come up.


  3.2.  Round 2.

  After rebooting the system login as root and mount the zip disk again:


                 mount /dev/sda4 /mnt

  Check available drive space:


                 df

  Run setup again from your new system:


                 setup

  Choose "s" SOURCE from the menu and press the enter key.  Select item
  number 4. "Install from a premounted directory" and press the enter
  key again.

  Enter the directory name. This time use:


                 /mnt/slakware

  Choose the packages you want or need. All are available except those
  which start with "x". When you're finished installing packages from
  this disk exit setup and run:


                 umount /dev/sda4

  You may now remove the disk and if X will be installed insert the 2nd
  zip disk and work through setup again this time only packages
  beginning with X will be available. If you will be installing a custom
  kernel from the prebuilt kernels you may also do this while the 2nd.
  zip disk is installed.


  3.3.  Library Trouble

  Some times I have trouble with the links for the libraries either on
  the root zip disk or on the final destination machine. There are two
  possible fixes for this.

  Fix 1) If the system boots to a command prompt and you can login as
  root in single user mode try the command:


                 ldconfig

  If things are not broken so badly that this command will not run then
  reboot and watch for library related errors. If there are none your in
  business.

  Fix 2) If ldconfig can not repair things you will need to re master
  the root floppy disk and recopy the files from it as in instruction
  ``8)'' through 12) or reinstall Linux to the destination system as
  appropriate.

  4.  Thank you

  This mini-HOWTO brought to you by the letters G. N. and U. and the
  Linux documentation project.

  Special thanks to Dr. Randolph Bentson whose devotion to Linux
  inspired me to give something back to the people who gave us the ONE
  TRUE OPERATING SYSTEM.


           I hope this helps someone.

           Sincerely

           Kevin Snively
           P.O. Box 1013
           Everett Wa. 98206-1013
           USA

  k.snively@seaslug.org


           root@aldrovanda


   experimental mini-HOWTO for Linux (Unix) to setup international
   keyboards.
   
   This xmodmap and kimap solutions will work for you in setting up any
   international keyboard for (Debian, RedHat, Mandrake, Corel Linux)
   Linux, FreeBSD, OpenBSD, NetBSD and possibly every Unix that uses
   Xfree86 and KDE. The advantage of this package is that it is not
   architecture specific and will work on SPARK, MIPS and all other
   systems. I don't want to say that other packages are architecture
   independent, but I don't like writing garbage in the bash_profile and
   XF86Config or possibly somewhere else. This was written by Juraj Sipos
   (c) on 4/22/2000, [1]xvudpapc@savba.sk
   
   INTRODUCTION
   
   Imagine you use Linux or a BSD OS and want to write a business letter
   to a person that has a foreign name with a slash or idiaresis. Danish
   language uses signs like  and Portuguese like . With this
   information you can make your own international keyboard layout
   without installing any additional packages. The following information
   will help you set up German, Spanish, Italian, Slovak, Czech, Polish,
   Slovenian, Croatian, Danish, Dutch, French, Finnish, Norwegian,
   Estonian, Latvian, Swedish and other keyboards without additional
   installing of national packages and without writing garbage to
   bash_profile and XF86Config files. You can also alternatively look at
   my homage at [2]http://www.home.sk/www/man/bsd1.htm
   to see pictures of various keyboards. In case you want to install
   Greek, Hebrew or Russian language, follow my information and apply
   changes pertinent to these languages (e.g., to install Greek fonts,
   etc.).
   
   The biggest problem with kikbd or international keyboard under KDE in
   X Windows is that it doesn't work in Xfree86 that easily (you have to
   install some national packages and write garbage with complicated
   syntax to the above-mentioned files). A user expects a simple way for
   configuring his or her keyboard for international settings. A simple
   way is to start KDE, change the international keyboard settings and
   immediately write in the language we chose (this will work for German
   and other languages, but in Eastern European keyboards some letters
   don't function). According to the KDE documentation it should work,
   but it doesn't. After exploring many KDE resources on the net, I
   didn't find a solution (except for the one that forces you to install
   some national package). I know that some locale settings should be
   included in my bash_profile or csh logic scripts, but after applying
   these settings I couldn't change (and install) keyboards in FreeBSD
   and it appeared like going through a darker forest compared to the
   information I already had regarding localization of KDE and X Windows
   under Xfree86.
   
   Here are some solutions for installing international keyboard
   layouts.  The following information will help you set up any European
   keyboard layout. The solution works for Xfree86 in 3.1 RELEASE in
   FreeBSD (.Xmodmap solution), Corel Linux, Debian Linux, RedHat and
   FreeBSD 3.3 RELEASE and 4.0 RELEASE (KDE *.kimap solution). I tested
   it on those systems. Note: .Xmodmap solution works well with other
   windows managers. Some Unixes override .Xmodmap setting when used with
   KDE. If .Xmodmap doesn't work, change must be made to the KDE kimap
   files in .../kikbd directory.
   
   If .Xmodmap solution doesn't work in KDE, copy skz.kimap (at the end
   of this article) to /usr/local/share/apps/kikbd, which is your KDE
   keyboard directory. The problem with KDE is that after installing
   another keyboard, you have no chance to use it as KDE documentation
   doesn't clearly state how to define your locale settings in a
   bash_profile. After I installed Slovak keyboard in KDE, I couldn't
   write in Slovak or Czech, so I made few changes to skz.kimap file,
   which are explained later in this file. After applying these changes,
   no other changes are necessary - you don't need to write any special
   commands to your bash_profile or XF86Config. BUT WHEN YOU INSTALL
   ANOTHER KEYBOARD in START/SETTINGS/INPUT DEVICES/INTERNATIONAL
   KEYBOARDS from your KDE menu, CHECK AUTOSTART. Then everything will
   work fine.  The difference between skz.kimap and sky.kimap (and
   csz.kimap and csy.kimap) is that y,Y and z,Z are swapped, so with
   skz.kimap or csz.kimap you will have z,Z instead of y,Y, but with
   sky.kimap or csy.kimap, y,Y doesn't change its position on the IBM
   English keyboard layout.
   
   How it all works:
   
   a) Copy the "Compose" file from /usr/X11R6/lib/X11/locale/iso8859-2
   to:
      /usr/X11R6/lib/X11/locale/iso8859-1  directory (yes, iso8859-1, not
   iso8859-2). Back up
      the original "Compose" file if you want (alternatively, copy other
   iso885*** Compose
      file to iso8859-1 directory).
   b) Put the included .Xmodmap file to your root directory (Slovak
   language, or make your own
      .Xmodmap file) (or possibly put your own *.kimap file to the kikbd
   directory if Xmodmap
      will not work)
   c) Install ISO8859-2 fonts (or other pertinent fonts).
   d) Disable every "Scroll lock" uncommented line in your XF86Config,
   because our .Xmodmap
      uses scroll lock to switch between keyboards.
   e) Put the appropriate fontpath for your newly installed fonts in your
   XF86Config file, if
      necessary.
   
   The .Xmodmap solution may be applied to all  X keyboards except
   Hebrew, I suppose (I'm joking). The .Xmodmap file overrides all
   settings of keyboard layouts as defined in
   /usr/X11R6/lib/X11/xkb/symbols/, where are symbols for many
   international keyboards. The .Xmodmap solution will give you an
   enhanced Slovak typewriter keyboard layout.
   
   First, I must say that in my solution, different mapping is used for
   .Xmodmap file (and kimap file) for some ISO definitions. This means
   that the ISO definitions will either give you what they say they are
   (aacute [], eacute [], etc.), or they will not give you what they
   say they are (putting "threequarters" in your .Xmodmap file will give
   not give you "3/4" but "z" with a caron above it). For example, "mu"
   will give lcaron, "oslash" rcaron, etc. (Obviously, in other case you
   need to install some national packages to use "lcaron" definition
   instead of "mu"). Normally, you can not put "lcaron" to the .Xmodmap
   file, because it will not give you lcaron; you must write "mu"
   instead, or "guillemotright" for tcaron. I also tried hexadecimal
   numbers and they work. However, other  key definitions, for example,
   adieresis (a with two dots above it), uacute (u with slash above it),
   as well as dead_diaeresis do not require a substitution of other
   definitions and work pretty well as they're defined everywhere (dead
   key is a key  you press, you hold it and nothing happens, but after
   pressing another key you will get a special letter). The original
   "Compose" file in .../iso8859-1 directory can be fully utilized for
   Slovak or Czech keyboard layouts (Polish, Hungarian, Slovenian,
   Croatian), but there is only one problem with the Slovak or Czech
   keyboard (and other languages too) layout - dead_caron doesn't work.
   That's why you have to copy the "Compose" file from the iso8859-2
   directory to iso8859-1 directory, or alternatively, you can edit the
   "Compose" file in iso8859-1 directory and put all references about
   "dead_caron" from iso8859-2/Compose to iso8859-1/Compose file.
   
   You can leave the Keyboard section in your XF86Config without much
   change. Put (if it's not already there) the following in the
   "Keyboard" section:
   
   Section "Keyboard"
   Protocol "Standard"
   XkbRules "xfree86"
   XkbModel "pc101"
   XkbLayout "us"
   
   Some X Windows managers and/or environments override .Xmodmap
   settings, so if you use KDE and .Xmodmap doesn't work, use kikbd
   keymap instead of .Xmodmap. (A sample kikbd kimap for the Slovak
   language is included at the bottom of this file). The
   Slovak/Czech/English keyboard layout  is switched to by scroll lock
   with .Xmodmap. You may use languages only with the applications that
   have access to your ISO-8859-2 (or other fonts) fonts (this may not
   work with StarOffice or with other applications that have their own
   built-in fonts). StarOffice has its own fonts directory - afm fonts in
   ../xp3/fontmetrics/afm, and ps fonts in ../xp3/pssoftfonts, so you
   must add the ISO8859-2 fonts directory to these directories (to tell
   StarOffice to use these fonts too) and edit fonts.dir file and add the
   symlinked fonts there. I can easily use any language in StarOffice.
   
   Important note: If you want to exchange documents between StarOffice
   or WordPerfect and MS Word, you must include the information about
   windows 1250 encoding to the file you write (win1250 is similar to
   iso8859-2, but it's a little bit different). There's a solution: use a
   converter from iso8859-2 to win1250 (you can find one at my home page
   at [3]http://www.home.sk/www/man/bsd1.htm).
   
   If you want to edit and make your own .Xmodmap keyboard layout
   definitions, I'll explain one line of the .Xmodmap file to make clear
   what you should do. This explanation can be used for all keycodes.
   
   For example, the line:
   
   keycode 0x11 = 8 asterisk aacute 8
   
   (note: keycode 0x11 is derived from xkeycaps utility)
   says that the first pair, the default one, (number "8" and "asterisk")
   will display number "8" when you press keycode 0x11 ("8"), will
   display asterisk when a "shift" key is pressed. After pressing the
   scroll lock, there's another definition: ISO_NEXT_GROUP, which means
   that when you press the default "8" key, no "8" will be displayed, but
   aacute (""), when you press the "shift" key, number "8" will be
   displayed. So if you change "aacute" and "8", anything you put instead
   of "aacute" and "8" will be displayed, for example:
   
   keycode 0x11 = 8 asterisk semicolon colon
   
   will give you "semicolon" and "colon" in your 0x11 keycode after
   pressing the scroll lock. If you delete the ISO_NEXT_GROUP (the next
   pair of definitions on the right), you will have only one group of
   keyboard definitions ("8" and "asterisk"). Be careful when editing the
   .Xmodmap file. You mustn't delete definitions that enable utilization
   of the scroll lock unless you know what you are doing. These are the
   lines such as:
   
   keycode 0x4e = ISO_Next_Group
   add mod5 = ISO_Next_Group
   
   etc. You must also keep in mind that Unixes are case sensitive.
   
   If you want to find out more about keycodes, install a package
   "xkeycaps".
   
   ________________cut_here______________________________________________
   ____
   
   ! This is an `xmodmap' input file for PC 101 key #2 (FreeBSD/XFree86;
   US)
   ! keyboards created by XKeyCaps, modified by Juraj Sipos on 8/17/1999.
   ! XKeyCaps 2.38 is Copyright (c) 1997 Jamie Zawinski
   <jwz@netscape.com.
   ! http://people.netscape.com/jwz/xkeycaps/ This is an .Xmodmap
   solution for
   ! Slovak keyboard. You must have ISO-8859-2 fonts installed with a
   ! pointer in /etc/XF86Config
   ! NOTE: "!" is a comment. Some information follows but I deleted
   ! it as it is commented and not important.
   ! If you want to know what I deleted, start xkeycaps utility and
   generate your
   ! own Xmodmap file.
   ! The "0 Ins" key generates KP_Insert and KP_0
   ! The ". Del" key generates KP_Delete and KP_Decimal
   
   !#define XK_dead_semivoiced_sound 0xFE5F
   
   !dead_iota, dead_voiced_sound, dead_belowdot, dead_tilde, dead_macron
   
   keycode 0x09 = Escape
   keycode 0x43 = F1 F11 F1 Multi_key
   keycode 0x44 = F2 F12 F2 F12
   keycode 0x45 = F3 F13 F3 F13 idiaeresis
   keycode 0x46 = F4 F14 F4 F14 mu yen
   keycode 0x47 = F5 F15 F5 F15 guillemotright guillemotleft
   keycode 0x48 = F6 F16 F6 F16 ograve
   keycode 0x49 = F7 F17 F7 dead_abovedot oacute
   keycode 0x4A = F8 F18 F8 dead_breve acute
   keycode 0x4B = F9 F19 F9 dead_cedilla ugrave
   keycode 0x4C = F10 F20 F10 dead_ogonek
   keycode 0x5F = F11 F21 dead_acute dead_caron
   keycode 0x60 = F12 F22 dead_abovering dead_diaeresis
   !keycode 0x6F = Print Execute dead_doubleacute dead_circumflex
   keycode 0x6F = Print Execute dead_iota
   keycode 0x4E = ISO_Next_Group
   keycode 0x6E = Pause
   keycode 0x31 = grave asciitilde semicolon dead_diaeresis
   keycode 0x0A = 1 exclam plus 1
   keycode 0x0B = 2 at mu 2
   keycode 0x0C = 3 numbersign onesuperior 3
   keycode 0x0D = 4 dollar egrave 4
   keycode 0x0E = 5 percent 0x0bb 5
   keycode 0x0F = 6 asciicircum threequarters 6
   keycode 0x10 = 7 ampersand yacute 7
   keycode 0x11 = 8 asterisk aacute 8
   keycode 0x12 = 9 parenleft iacute 9
   keycode 0x13 = 0 parenright eacute 0
   keycode 0x14 = minus underscore equal percent
   keycode 0x15 = equal plus dead_acute dead_caron
   keycode 0x33 = backslash bar ograve parenright
   keycode 0x16 = BackSpace
   keycode 0x6A = Insert
   keycode 0x61 = Home
   keycode 0x63 = Prior
   keycode 0x4D = Num_Lock Pointer_EnableKeys
   keycode 0x70 = KP_Divide slash
   keycode 0x3F = KP_Multiply asterisk
   keycode 0x52 = KP_Subtract minus
   keycode 0x17 = Tab ISO_Left_Tab
   keycode 0x18 = q Q
   keycode 0x19 = w W
   keycode 0x1A = e E
   keycode 0x1B = r R
   keycode 0x1C = t T
   keycode 0x1D = y Y z Z
   keycode 0x1E = u U
   keycode 0x1F = i I
   keycode 0x20 = o O
   keycode 0x21 = p P
   keycode 0x22 = bracketleft braceleft acute slash
   keycode 0x23 = bracketright braceright diaeresis parenleft
   keycode 0x24 = Return
   keycode 0x6B = Delete
   keycode 0x67 = End
   keycode 0x69 = Next
   keycode 0x4F = KP_Home 7 KP_Home
   keycode 0x50 = KP_Up 8
   keycode 0x51 = KP_Prior 9
   keycode 0x56 = KP_Add plus
   keycode 0x42 = Caps_Lock
   keycode 0x26 = a A
   keycode 0x27 = s S
   keycode 0x28 = d D
   keycode 0x29 = f F
   keycode 0x2A = g G
   keycode 0x2B = h H
   keycode 0x2C = j J
   keycode 0x2D = k K
   keycode 0x2E = l L
   keycode 0x2F = semicolon colon ocircumflex quotedbl
   keycode 0x30 = apostrophe quotedbl section exclam
   keycode 0x53 = KP_Left 4
   keycode 0x54 = KP_Begin 5
   keycode 0x55 = KP_Right 6
   keycode 0x32 = Shift_L ISO_Next_Group
   keycode 0x34 = z Z y Y
   keycode 0x35 = x X
   keycode 0x36 = c C
   keycode 0x37 = v V
   keycode 0x38 = b B
   keycode 0x39 = n N
   keycode 0x3A = m M
   keycode 0x3B = comma less comma question
   keycode 0x3C = period greater period colon
   keycode 0x3D = slash question minus underscore
   keycode 0x3E = Shift_R
   keycode 0x62 = Up
   keycode 0x57 = KP_End 1
   keycode 0x58 = KP_Down 2
   keycode 0x59 = KP_Next 3
   keycode 0x6C = KP_Enter Return
   keycode 0x25 = Control_L ISO_Next_Group
   !keycode 0x40 = Alt_L Meta_L
   keycode 0x40 = Meta_L Alt_L
   keycode 0x41 = space
   keycode 0x71 = Alt_R Meta_R
   keycode 0x6D = Control_R
   keycode 0x64 = Left
   keycode 0x68 = Down
   keycode 0x66 = Right
   keycode 0x5A = KP_Insert 0
   keycode 0x5B = KP_Delete period
   
   !keysym Alt_L = Meta_L
   !keysym F12 = Multi_key
   
   clear Shift
   !clear Lock
   clear Control
   clear Mod1
   clear Mod2
   clear Mod3
   clear Mod4
   clear Mod5
   
   add Shift = Shift_L Shift_R
   add Control = Control_L Control_R
   !add Mod1 = Alt_L Alt_R
   add Mod1 = Meta_L Alt_R
   add Mod2 = Num_Lock
   add Mod5 = ISO_Next_Group
   !add Mod1 =
   !add Mod2 = Alt_R Alt_L Mode_switch
   
   keycode 0x73 = ISO_Next_Group
   keycode 0x74 = dead_acute dead_diaeresis
   keycode 0x75 = dead_caron dead_abovering
   
   _____________cut_here_________________________________________________
   _________
   
   # KDE skz.kimap Config File, modified by Juraj Sipos
   # name this file as skz.kimap and copy it to KDE .../kikbd directory
   
   [International Keyboard]
   Label=Skz
   Locale=sk
   
   # *** here was some info I deleted.
   
   [KeyboardMap]
   CapsSymbols=q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b,n,m
   keysym0=1,plus,1,exclam,,
   keysym1=2,mu,2,at,,
   keysym2=3,onesuperior,3,numbersign,,
   keysym3=4,egrave,4,dollar,,
   keysym4=5,0x0bb,5,percent,,
   keysym5=6,threequarters,6,asciicircum,,
   keysym6=7,yacute,7,ampersand,,
   keysym7=8,aacute,8,asterisk,,
   keysym8=9,iacute,9,parenleft,,
   keysym9=0,eacute,0,parenright,,
   keysym10=minus,equal,percent,minus,underscore,
   keysym11=grave,dead_diaeresis,dead_circumflex,grave,asciitilde,
   keysym12=equal,dead_acute,dead_caron,equal,plus,
   keysym13=bracketleft,uacute,slash,bracketleft,braceleft,
   keysym14=bracketright,adiaeresis,parenleft,bracketright,braceright,
   keysym15=semicolon,ocircumflex,quotedbl,semicolon,colon,
   keysym21=y,z,Z,,,
   keysym22=z,y,Y,,,
   # I changed some keysyms above (as "mu" instead of "lcaron") and added
   the following lines
   keycode43=51,ograve,parenright,backslash,bar,
   keycode40=48,section,exclam,apostrophe,quotedbl,
   keycode51=59,comma,question,less,comma,
   keycode52=60,period,colon,period,greater,
   keycode53=61,minus,underscore,slash,question,
   ____cut_here__________________________________________________________
   _________________
   
   (The numbers of keycodes are derived from the "xkeycaps" utility)
   
   The purpose of the following info is to help you build any .Xmodmap
   keyboard layout with iso8859-2 or other character sets.  If you're
   going to use other languages than the Central European ones, find a
   pertinent table for your ISO*** character set on Internet. The
   gdkkeysyms.h file is in (RedHat) /usr/include/gdk/gdkkeysyms.h and it
   contains all the special names we're using here (it also contains
   names of Greek characters).
   
   UNIX
   
   ISO-8859-2 (ISO Latin2) character set
   
   octal hex (you can use it for other languages too)
   
   ----------------------------------------------------------------------
   First, try to see if definitions will give you (after installing
   pertinent fonts and keyboard in X) what they say they are. If they
   will not give you what they say they are (some keycodes will be
   unfunctional), then you must make a substitution. Definitions which
   will not give you what they say they are can be traced by their visual
   shape in Western Latin 1 encoding. For example, if you load a Slovak
   website, do not use ISO8859-2 character set encoding for viewing, but
   Western ISO8859-1 encoding for viewing. Thus you will see bad fonts
   with letters like  and so on. You will see what you must substitute.
   But if you don't know what "" is called in ISO terminology, find and
   download an appropriate character set table for ISO-8859-1. It must be
   somewhere on the net. The symbols on your right (for example, mu
   [micro], which is , will give you lcaron instead of ) will give you
   what's on their left. NOTE: vowel *acute signs require no
   substitution, therefore I omitted iacute (), aacute (), etc.
   
   0243 0xa3 /Lslash      (Explanation: writing the name of  ["pound"
   in our case]
                           to Xmodmap or kimap file will give you Lslash.
   But Lslash can be
                           obtained by a dead_caron - you press a
   dead_caron and L). The sign
                           on the right, if put in Xmodmap or kimap
   files, will
                           print you the character which is on its left
   0245 0xa5 /Lcaron      Thus, writing "yen" to kimap or Xmodmap file
   will give us Lcaron
   0251 0xa9 /Scaron      copyright (will give us Scaron)
   0253 0xab /Tcaron      guillemotleft (will give us Tcaron)
   0256 0xae /Zcaron      registered
   0265 0xb5 /lcaron      mu
   0271 0xb9 /scaron      onesuperior
   0273 0xbb /tcaron      guillemotright
   0276 0xbe /zcaron      threequarters
   0306 0xc6 /Cacute      find out yourself
   0312 0xca /Eogonek     find out yourself
   0313 0xcb /Edieresis   Edieresis
   0314 0xcc /Ecaron      find out yourself
   0317 0xcf /Dcaron      find out yourself
   0321 0xd1 /Nacute      Ograve
   0322 0xd2 /Ncaron      find out yourself
   0324 0xd4 /Ocircumflex  Ocircumflex
   0325 0xd5 /Ohungarumlaut  find out yourself
   0330 0xd8 /Rcaron      find out yourself
   0331 0xd9 /Uring       find out yourself
   0333 0xdb /Uhungarumlaut 
   0336 0xde /Tcedilla 
   0343 0xe3 /abreve 
   0345 0xe5 /lacute 
   0346 0xe6 /cacute 
   0350 0xe8 /ccaron     egrave
   0352 0xea /eogonek 
   0354 0xec /ecaron 
   0357 0xef /dcaron 
   0361 0xf1 /nacute     ntilde
   0362 0xf2 /ncaron 
   0365 0xf5 /ohungarumlaut 
   0370 0xf8 /rcaron 
   0371 0xf9 /uring 
   0373 0xfb /uhungarumlaut 
   0376 0xfe /tcedilla 
   0377 0xff /dotaccent 
   
   You may experiment to find out which definitions will give you which
   characters, it shouldn't be difficult. This is just a hint on how to
   start. I didn't go on to investigate further definitions because I
   have my Slovak and Czech keyboards and I'm not, for now, interested to
   use other keyboards.  Look at my homage and build your own keyboard.
   
   Enjoy.
   Juraj Sips

References

   1. mailto:xvudpapc@savba.sk
   2. http://www.home.sk/www/man/bsd1.htm
   3. http://www.home.sk/www/man/bsd1.htm

Linux kerneld mini-HOWTO

Henrik Storner

   kerneld-howto@linuxdoc.org
   
   Copyright  2000 by Linux Documentation Project
   Revision History
   Revision v2.0 22 May 2000
   conversion from HTML to DocBook SGML.
     _________________________________________________________________
   
   Table of Contents
   [1]About the kerneld mini-HOWTO
          
        [2]Credits
                
   [3]What is kerneld?
          
        [4]Why do I want to use it ?
        [5]Where can I pick up the necessary pieces ?
                
   [6]How do I set it up?
          
        [7]Trying out kerneld
                
   [8]How does kerneld know what module to load?
          
        [9]Block devices
        [10]Character devices
        [11]Network devices
        [12]Binary formats
        [13]Line disciplines (slip, cslip and ppp)
        [14]Network protocol families (IPX, AppleTalk, AX.25)
        [15]File systems
                
   [16]Devices requiring special configuration
          
        [17]char-major-10 : Mice, watchdogs and randomness
        [18]Loading SCSI drivers: The scsi_hostadapter entry
        [19]When loading a module isn't enough: The post-install entry
                
   [20]Spying on kerneld
   [21]Special kerneld uses
   [22]Common problems and things that make you wonder
          
About the kerneld mini-HOWTO

   This document explains how to install and use the automatic kernel
   module loader "kerneld". The latest released version of this document
   can be found at [23]the Linux Documentation Project
     _________________________________________________________________
   
Credits

   This document is based on an original HTML version 1.7 dated July 19,
   1997 by Henrik Storner <[24]storner@osiris.ping.dk> and was revised
   and translated to DocBook DTD by Gary Lawrence Murphy
   <[25]garym@teledyn.com> May 20, 2000.
   
   The following people have contributed to this mini-HOWTO at some
   point:
   
     * Bjorn Ekwall bj0rn@blox.se
     * Ben Galliart bgallia@luc.edu
     * Cedric Tefft cedric@earthling.net
     * Brian Miller bmiller@netspace.net.au
     * James C. Tsiao jtsiao@madoka.jpl.nasa.gov
       
   If you find errors in this document, please send email to
   <[26]kerneld-howto@linuxdoc.org>. Your comments, encouragement and
   suggestions are welcome and appreciated, and help ensure this guide
   remains current and accurate.
     _________________________________________________________________
   
What is kerneld?

   The kerneld feature was introduced during the 1.3 development kernels
   by Bjorn Ekwall. It allows kernel modules such as device drivers,
   network drivers and filesystems to be loaded automatically when they
   are needed, rather than having to do it manually with modprobe or
   insmod.
   
   And for the more amusing aspects, although these are not (yet ?)
   integrated with the standard kernel:
   
     * It can be setup to run a user-program instead of the default
       screen blanker, thus letting you use any program as a
       screen-saver.
     * Similar to the screen-blanker support, you can also change the
       standard console beep into something completely different.
       
   kerneld consists of two components:
   
     * Support in the Linux kernel for sending requests to a daemon
       requesting a module for a certain task.
     * A user-space daemon that can figure out what modules must be
       loaded to fulfill the request from the kernel.
       
   Both components must be working for the kerneld support to function;
   it is not enough that only one or the other has been setup.
     _________________________________________________________________
   
Why do I want to use it ?

   There are some good reasons for using kerneld. The ones I will mention
   are mine, others have other reasons.
   
     * If you have to build kernels for several systems that only differ
       slightly - different kind of network card, for instance - then you
       can build a single kernel and some modules, instead of having to
       build individual kernels for each system.
     * Modules are easier for developers to test. You don't need to
       reboot the system to load and unload the driver; this applies to
       all modules, not just kerneld-loaded ones.
     * It cuts down on the kernel memory usage leaving more memory
       available for applications. Memory used by the kernel is never
       swapped out, so if you have 100Kb worth of unused drivers compiled
       into your kernel, they are simply wasting RAM.
     * Some of the things I use, the ftape floppy-tape driver, for
       instance, or iBCS, are only available as modules, but I don't want
       to bother with loading and unloading them whenever I need them.
     * People making Linux distributions don't have to build 284
       different boot images: Each user loads the drivers he needs for
       just his hardware. Most modern Linux distributions will detect
       your hardware and will only load those modules actually required.
       
   Of course, there are also reasons why you may not want to use it. If
   you prefer to have just one kernel image file with all of your drivers
   built in, you are reading the wrong document.
     _________________________________________________________________
   
Where can I pick up the necessary pieces ?

   The support in the Linux kernel was introduced with Linux 1.3.57. If
   you have an earlier kernel version, you will need to upgrade if you
   want the kerneld support. The current Linux kernel sources can be
   found at most Linux FTP archive sites including:
   
     * [27]Kernel.Org Archive
     * [28]Metalab Linux Archive
     * [29]TSX-11 at MIT
       
   The user-space daemon is included with the modules package. These are
   normally available from the same place as the kernel sources
   
     Note: If you want to try module-loading with the latest development
     kernels, you should use the newer modutils package and not the
     modules. Always check the Documentation/Changes file in the kernel
     sources for the minimum required version number for your kernel
     image. Also see about the problems with modules and 2.1 kernels.
     _________________________________________________________________
   
How do I set it up?

   First get the necessary parts: A suitable kernel and the latest
   modules package. Then you should install the module utilities as per
   the instructions included in the package. Pretty simple: Just unpack
   the sources and run make install. This compiles and installs the
   following programs in /sbin: genksysm, insmod, lsmod, modprobe, depmod
   and kerneld. I recommend you add some lines to your startup-scripts to
   do some necessary setup whenever you boot Linux. Add the following
   lines to your /etc/rc.d/rc.S file (if you are running Slackware), or
   to /etc/rc.d/rc.sysinit if you are running SysVinit, i.e. Debian,
   Corel, RedHat, Mandrake or Caldera:
        # Start kerneld - this should happen very early in the
        # boot process, certainly BEFORE you run fsck on filesystems
        # that might need to have disk drivers autoloaded
        if [ -x /sbin/kerneld ]
        then
                /sbin/kerneld
        fi

        # Your standard fsck commands go here
        # And you mount command to mount the root fs read-write

        # Update kernel-module dependencies file
        # Your root-fs MUST be mounted read-write by now
        if [ -x /sbin/depmod ]
        then
                /sbin/depmod -a
        fi

   These commands may already be installed in your SysV init scripts. The
   first part starts kerneld itself. The second calls depmod -a at
   startup to build a list of all available modules and analyzes their
   inter-dependencies. The depmod map then tells kerneld if one module
   needs to have another loaded before it will itself load.
   
     Note: Recent versions of kerneld have an option to link with the
     GNU gdbm library, libgdbm. If you enable this when building the
     module utilities, kerneld will not start if libgdbm is not
     available which may well be the case if you have /usr on a separate
     partition and start kerneld before /usr is mounted. The recommended
     solution is to move /usr/lib/libgdbm to /lib, or to link kerneld
     statically.
     
   Next, unpack the kernel sources, configure and build a kernel to your
   liking. If you have never done this before, you should definitely read
   the README file at the top level of the Linux sources. When you run
   make xconfig to configure the kernel, you should pay attention to some
   questions that appear early on:
  Enable loadable module support (CONFIG_MODULES) [Y/n/?] Y

   You need to select the loadable module support, or there will be no
   modules for kerneld to load! Just say Yes.
  Kernel daemon support (CONFIG_KERNELD) [Y/n/?] Y

   This, of course, is also necessary. Then, a lot of the things in the
   kernel can be built as modules - you will see questions like
  Normal floppy disk support (CONFIG_BLK_DEV_FD) [M/n/y/?]

   where you can answer with an M for "Module". Generally, only the
   drivers necessary for you to boot up your system should be built into
   the kernel; the rest can be built as modules.
   
   Essential drivers
   
   Essential drivers required to boot your system must be compiled into
   the core kernel and cannot be loaded as modules. Typically this will
   include the hard-disk driver and the driver for the root filesystem.
   If you have a dual-boot machine and rely on files found in the foreign
   partition, you must also compile support for that filesystem into the
   core kernel.
   
   When you have gone through the make config, compile and install the
   new kernel and the modules with make dep clean bzlilo modules
   modules_install.
   
   Phew.
   
     Compiling a Kernel Image: The make zImage command will stop short
     of installing a kernel and will leave the new kernel image in the
     file arch/i386/boot/zImage. To use this image, you will need to
     copy it to where you keep your boot-image and install it manually
     with LILO.
     
     For more information about configuring, building and installing
     your own kernel, check out the Kernel-HOWTO posted regularly to
     comp.os.linux.answers, and available from [30]the Linux
     Documentation Project and its mirrors.
     _________________________________________________________________
   
Trying out kerneld

   Now reboot with the new kernel. When the system comes back up, you can
   run ps ax, and you should see a line for kerneld:
    PID TTY STAT  TIME COMMAND
     59  ?  S     0:01 /sbin/kerneld

   One of the nice things with kerneld is that once you have the kernel
   and the daemon installed, very little setup is needed. For a start,
   try using one of the drivers that you built as a module; it is more
   likely than not that it will work without further configuration. If I
   build the floppy driver as a module, I could put a DOS floppy in the
   drive and type
  osiris:~ $ mdir a:
   Volume in drive A has no label
   Volume Serial Number is 2E2B-1102
   Directory for A:/

  binuti~1 gz       1942 02-14-1996  11:35a binutils-2.6.0.6-2.6.0.7.diff.gz
  libc-5~1 gz      24747 02-14-1996  11:35a libc-5.3.4-5.3.5.diff.gz
          2 file(s)        26689 bytes

   The floppy driver works! It gets loaded automatically by kerneld when
   I try to use the floppy disk.
   
   To see that the floppy module is indeed loaded, you can run
   /sbin/lsmod to list all currently loaded modules:
  osiris:~ $ /sbin/lsmod
  Module:        #pages:  Used by:
  floppy            11    0 (autoclean)

   The "(autoclean)" means that the module will automatically be removed
   by kerneld when it has not been used for more than one minute. So the
   11 pages of memory (= 44kB, one page is 4 kB) will only be used while
   I access the floppy drive - if I don't use the floppy for more than a
   minute, they are freed. Quite nice, if you are short of memory for
   your applications!
     _________________________________________________________________
   
How does kerneld know what module to load?

   Although kerneld comes with builtin knowledge about the most common
   types of modules, there are situations where kerneld will not know how
   to handle a request from the kernel. This is the case with things like
   CD-ROM drivers or network drivers, where there are more than one
   possible module that can be loaded.
   
   The requests that the kerneld daemon gets from the kernel is for one
   of the following items:
   
     * a block-device driver
     * a character-device driver
     * a binary format
     * a tty line discipline
     * a filesystem
     * a network device
     * a network service (e.g. rarp)
     * a network protocol (e.g. IPX)
       
   The kerneld determines what module should be loaded by scanning the
   configuration file /etc/conf.modules[31][1]. There are two kinds of
   entries in this file: Paths where the module-files are located, and
   aliases assigning the module to be loaded for a given service. If you
   don't have this file already, you could create it by running
  /sbin/modprobe -c | grep -v '^path' /etc/conf.modules

   If you want to add yet another path directive to the default paths,
   you must include all the default paths as well, since a path directive
   in /etc/conf.modules will replaceall the ones that modprobe knows by
   default!
   
   Normally you don't want to add any paths by your own, since the
   built-in set should take care of all normal setups (and then some...),
   I promise!
   
   On the other hand, if you just want to add an alias or an option
   directive, your new entries in /etc/conf.modules will be added to the
   ones that modprobe already knows. If you should redefine an alias or
   an option, your new entries in /etc/conf.modules will override the
   built-in ones.
     _________________________________________________________________
   
Block devices

   If you run /sbin/modprobe -c, you will get a listing of the modules
   that kerneld knows about, and what requests they correspond to. For
   instance, the request that ends up loading the floppy driver is for
   the block-device that has major number 2:
  osiris:~ $ /sbin/modprobe -c | grep floppy
  alias block-major-2 floppy

   Why block-major-2 ? Because the floppy devices /dev/fd* use major
   device 2 and are block devices:
  osiris:~ $ ls -l /dev/fd0 /dev/fd1
  brw-rw-rw-   1 root     root       2,   0 Mar  3  1995 /dev/fd0
  brw-r--r--   1 root     root       2,   1 Mar  3  1995 /dev/fd1
     _________________________________________________________________
   
Character devices

   Character devices are dealt with in a similar way. E.g. the ftape
   floppy tape driver sits on major-device 27:
  osiris:~ $ ls -lL /dev/ftape
  crw-rw----   1 root     disk      27,   0 Jul 18  1994 /dev/ftape

   However, kerneld does not by default know about the ftape driver - it
   is not listed in the output from /sbin/modprobe -c. So to setup
   kerneld to load the ftape driver, I must add a line to the kerneld
   configuration file, /etc/conf.modules:
  alias char-major-27 ftape
     _________________________________________________________________
   
Network devices

   You can also use the device name instead of the char-major-xxx or
   block-major-yyy setup. This is especially useful for network drivers.
   For example, a driver for an ne2000 netcard acting as eth0 would be
   loaded with
  alias eth0 ne

   If you need to pass some options to the driver, for example to tell
   the module about what IRQ the netcard is using, you must add an
   "options" line:
  options ne irq=5

   This will cause kerneld to load the NE2000 driver with the command
  /sbin/modprobe ne irq=5

   Of course, the actual options available are specific to the module you
   are loading.
     _________________________________________________________________
   
Binary formats

   Binary formats are handled in a similar way. Whenever you try to run a
   program that the kernel does not know how to load, kerneld gets a
   request for binfmt-xxx, where xxx is a number determined from the
   first few bytes of the executable. So, the kerneld configuration to
   support loading the binfmt_aout module for ZMAGIC (a.out) executables
   is
  alias binfmt-267 binfmt_aout

   Since the magic number for ZMAGIC files is 267, if you check
   /etc/magic, you will see the number 0413; keep in mind that /etc/magic
   uses octal numbers where kerneld uses decimal, and octal 413 = decimal
   267. There are actually three slightly different variants of a.out
   executables (NMAGIC, QMAGIC and ZMAGIC), so for full support of the
   binfmt_aout module we need
  alias binfmt-264 binfmt_aout  # pure executable (NMAGIC)
  alias binfmt-267 binfmt_aout  # demand-paged executable (ZMAGIC)
  alias binfmt-204 binfmt_aout  # demand-paged executable (QMAGIC)

   a.out, Java and iBCS binary formats are recognized automatically by
   kerneld, without any configuration.
     _________________________________________________________________
   
Line disciplines (slip, cslip and ppp)

   Line disciplines are requested with tty-ldisc-x, with x being usually
   1 (for SLIP) or 3 (for PPP). Both of these are known by kerneld
   automatically.
   
   Speaking of ppp, if you want kerneld to load the bsd_comp data
   compression module for ppp, then you must add the following two lines
   to your /etc/conf.modules:
  alias tty-ldisc-3 bsd_comp
  alias ppp0 bsd_comp
     _________________________________________________________________
   
Network protocol families (IPX, AppleTalk, AX.25)

   Some network protocols can be loaded as modules as well. The kernel
   asks kerneld for a protocol family (e.g. IPX) with a request for
   net-pf-X where X is a number indicating what family is wanted. E.g.
   net-pf-3 is AX.25, net-pf-4 is IPX and net-pf-5 is AppleTalk; These
   numbers are determined by the AF_AX25, AF_IPX etc. definitions in the
   linux source file include/linux/socket.h. So to autoload the IPX
   module, you would need an entry like this in /etc/conf.modules:
  alias net-pf-4 ipx

   See [32]Common Problems for information about how you can avoid some
   annoying boot-time messages related to undefined protocol families.
     _________________________________________________________________
   
File systems

   kerneld requests for filesystems are simply the name of the filesystem
   type. A common use of this would be to load the isofs module for
   CD-ROM filesystems, i.e. filesystems of type iso9660:
  alias iso9660 isofs
     _________________________________________________________________
   
Devices requiring special configuration

   Some devices require a bit of extra configuration beyond the normal
   aliasing of a device to a module.
   
     * Character devices on major number 10: [33]The miscellaneous
       devices
     * [34]SCSI devices
     * [35]Devices that require special initialization
     _________________________________________________________________
   
char-major-10 : Mice, watchdogs and randomness

   Hardware devices are usually identified through their major device
   numbers, e.g. ftape is char-major-27. However, if you look through the
   entries in /dev for char major 10, you will see that this is a bunch
   of very different devices, including
   
     * Mice of various sorts (bus mice, PS/2 mice)
     * Watchdog devices
     * The kernel random device
     * APM (Advanced Power Management) interface
       
   These devices are controlled by several different modules, not a
   single one, and therefore the kerneld configuration for these misc.
   devices use the major number and the minor number:
        alias char-major-10-1 psaux     # For PS/2 mouse
        alias char-major-10-130 wdt     # For WDT watchdog

   You need a kernel version 1.3.82 or later to use this; earlier
   versions do not pass the minor number to kerneld, making it impossible
   for kerneld to figure out which of the misc. device modules to load.
     _________________________________________________________________
   
Loading SCSI drivers: The scsi_hostadapter entry

   Drivers for SCSI devices consist of a driver for the SCSI host adapter
   (e.g. an Adaptec 1542), and a driver for the type of SCSI device you
   use, e.g. a hard disk, a CD-ROM or a tape-drive. All of these can be
   loaded as modules. However, when you want to access e.g. the CD-ROM
   drive that is connected to the Adaptec card, the kernel and kerneld
   only knows that it needs to load the sr_mod module in order to support
   SCSI CD-ROM's; it does not know what SCSI controller the CD-ROM is
   connected to, and hence does not know what module to load to support
   the SCSI controller.
   
   To resolve this, you can add an entry for the SCSI driver module to
   your /etc/conf.modules that tells kerneld which of the many possible
   SCSI controller modules it should load:
        alias scd0 sr_mod               # sr_mod for SCSI CD-ROM's ...
        alias scsi_hostadapter aha1542  # ... need the Adaptec driver

   This only works with kernel version 1.3.82 or later.
   
   This works if you have only one SCSI controller. If you have more than
   one, things become a little more difficult.
   
   In general, you cannot have kerneld load a driver for a SCSI host
   adapter, if a driver for another host adapter is already installed.
   You must either build both drivers into your kernel (not as modules),
   or load the modules manually.
   
     Tip: There is a way that you can have kerneld load multiple SCSI
     drivers. James Tsiao came up with this idea:
     
     You can easily have kerneld load the second scsi driver by setting
     up the dependency in your modules.dep by hand. You just need an
     entry like:
     
      /lib/modules/2.0.30/scsi/st.o: /lib/modules/2.0.30/scsi/aha1542.o

     To have kerneld load the aha1542.o before it loads st.o. My machine
     at home is set up almost exactly like the setup above, and it works
     fine for all my secondary scsi devices, including tape, cd-rom, and
     generic scsi devices. The drawback is that depmod -a can't
     autodetect these dependencies, so the user needs to add them by
     hand, and not run depmod -a on boot up. But once it is set up,
     kerneld will autoload the aha1542.o just fine.
     
   You should be aware, that this technique only works if you have
   different kinds of SCSI devices on the two controllers, for example,
   hard disks on one controller, and cd-rom drives, tapes or generic SCSI
   devices on another.
     _________________________________________________________________
   
When loading a module isn't enough: The post-install entry

   Sometimes, just loading the module is not enough to get things
   working. For instance, if you have your sound card compiled as a
   module, it is often convenient to set a certain volume level. Only
   problem is, the setting vanishes the next time the module is loaded.
   Here is a neat trick from Ben Galliart (<[36]bgallia@luc.edu>):
   
     The final solution required installing the [37]setmix package and
     then adding the following line to my /etc/conf.modules:
     
post-install sound /usr/local/bin/setmix -f /etc/volume.conf

   What this does is that after the sound module is loaded, kerneld runs
   the command indicated by the post-install sound entry. So the sound
   module gets configured with the command /usr/local/bin/setmix -f
   /etc/volume.conf.
   
   This may be useful for other modules as well, for example the lp
   module can be configured with the tunelp program by adding
        post-install lp tunelp options

   For kerneld to recognize these options, you will need a version of
   kerneld that is 1.3.69f or later.
   
     Note: An earlier version of this mini-HOWTO mentioned a pre-remove
     option, that might be used to run a command just before kerneld
     removed a module. However, this has never worked and its use is
     therefore discouraged - most likely, this option will disappear in
     a future kerneld release. The whole issue of module settings is
     undergoing some change at the moment, and may look different on
     your system by the time you read this.
     _________________________________________________________________
   
Spying on kerneld

   If you have tried everything, and just cannot figure out what the
   kernel is asking kerneld to do, there is a way of seeing the requests
   that kerneld receives, and hence to figure out what should go into
   /etc/conf.modules: The kdstat utility.
   
   This nifty little program comes with the modules-package, but it is
   not compiled or installed by default. To build it, go to the directory
   where you have the kerneld sources and type make kdstat. Then, to make
   kerneld display information about what it is doing, run kdstat debug
   and kerneld will start spewing messages on the console about what it
   is doing. If you then try and run the command that you want to use,
   you will see the kerneld requests; these can be put into
   /etc/conf.modules and aliased to the module needed to get the job
   done.
   
   To turn off the debugging, run /sbin/kdstat nodebug.
     _________________________________________________________________
   
Special kerneld uses

   I knew you would ask about how to setup the screen-saver module!
   
   The kerneld/GOODIES directory in modules package has a couple of
   kernel patches for screen-saver and console-beep support in kerneld;
   these are not yet part of the official kernel, so you will need to
   install the kernel-patches and rebuild the kernel.
   
   To install a patch, you use the patch command:
  cd /usr/src/linux
  patch -s -p1 /usr/src/modules-*/kerneld/GOODIES/blanker_patch

   Then rebuild and install the new kernel.
   
   When the screen-saver triggers, kerneld will run the command
   /sbin/screenblanker; this file may be anything you like, for example,
   a shell script that runs your favorite screen-saver.
   
   When the kernel wants to unblank the screen, it sends a SIGQUIT signal
   to the process running /sbin/screenblanker. Your shell script or
   screen-saver should trap this, and terminate. Remember to restore the
   screen to the original text mode!
     _________________________________________________________________
   
Common problems and things that make you wonder

   1. [38]Why do I get Cannot locate module for net-pf-X messages when I
          run /sbin/ifconfig?
          
   2. [39]After starting kerneld, my system slows to a crawl when I
          activate my ppp-connection
          
   3. [40]kerneld does not load my SCSI driver!
   4. [41]modprobe complains about gcc2_compiled being undefined
   5. [42]My sound driver keeps forgetting its settings for volume etc
   6. [43]DOSEMU needs some modules; how can I get kerneld to load those
          ?
          
   7. [44]Why do I get Ouch, kerneld timed out, message failed messages ?
   8. [45]Mount doesn't wait for kerneld to load the filesystem module
   9. [46]kerneld fails to load the ncpfs module
   10. [47]kerneld fails to load the smbfs module
   11. [48]I built everything as modules, and now my system cannot boot
          or kerneld fails to load the root filesystem module!
          
   12. [49]kerneld will not load at boot time; it complains about libgdbm
   13. [50]I get Cannot load module xxx but I just reconfigured my kernel
          without xxx support!
          
   14. [51]I rebuilt my kernel and modules, and still get messages about
          unresolved symbols when booting
          
   15. [52]I installed Linux 2.1/2.3 and now I cannot load any modules!
   16. [53]What about dial-on-demand networking?
          
   1. Why do I get Cannot locate module for net-pf-X messages when I run
   /sbin/ifconfig?
   
   Around kernel version 1.3.80, the networking code was changed to allow
   loading protocol families (e.g. IPX, AX.25 and AppleTalk) as modules.
   This caused the addition of a new kerneld request: net-pf-X, where X
   is a number identifying the protocol (see
   /usr/src/linux/include/linux/socket.h for the meaning of the various
   numbers). Unfortunately, ifconfig accidentally triggers these
   messages, so a lot of people get a couple of messages logged when the
   system boots and it runs ifconfig to setup the loopback device. The
   messages are harmless, and you can disable them by adding the lines
        alias net-pf-3 off      # Forget AX.25
        alias net-pf-4 off      # Forget IPX
        alias net-pf-5 off      # Forget AppleTalk

   to /etc/conf.modules. Of course, if you do use IPX as a module, you
   should not add a line to disable IPX.
   
   2. After starting kerneld, my system slows to a crawl when I activate
   my ppp-connection
   
   There have been a couple of reports of this. It seems to be an
   unfortunate interaction between kerneld and the tkPPP script that is
   used on some systems to setup and monitor the PPP connection. The
   script apparently runs loops while running ifconfig. This triggers
   kerneld, to look for the net-pf-X modules (see above), keeping the
   system load high and possibly pouring lots of Cannot locate module for
   net-pf-X messages into the system log. There is no known workaround,
   other than not use tkPPP, or change it to use some other way of
   monitoring the connection.
   
   3. kerneld does not load my SCSI driver!
   
   Add an entry for the SCSI hostadapter to your /etc/conf.modules. See
   the description of the [54]scsi_hostadapter entry above.
   
   4. modprobe complains about gcc2_compiled being undefined
   
   This is a bug in the module utilities, that show up only with binutils
   2.6.0.9 and later, and it is also documented in the release note for
   the binutils. So read that, or fetch an upgrade to the
   module-utilities that fix this bug.
   
   5. My sound driver keeps forgetting its settings for volume etc
   
   The settings for a module are stored inside the module itself when it
   is loaded. So when kerneld auto-unloads a module, any settings you
   have made are forgotten, and the next time the module loads it reverts
   to the default settings.
   
   You can tell kerneld to configure a module by running a program after
   the module has been auto-loaded. See [55]Pre/Post Install on the
   post-install entry.
   
   6. DOSEMU needs some modules; how can I get kerneld to load those ?
   
   You cannot. None of the dosemu versions, official or development
   versions, support loading the dosemu modules through kerneld. However,
   if you are running kernel 2.0.26 or later, you do not need the special
   dosemu modules any longer; just upgrade dosemu to 0.66.1 or higher.
   
   7. Why do I get Ouch, kerneld timed out, message failed messages ?
   
   When the kernel sends a request off to to kerneld, it expects to
   receive an acknowledgment back within one second. If kerneld does not
   send this acknowledgment, this message is logged. The request is
   retransmitted, and should get through eventually.
   
   This usually happens on systems with a very high load. Since kerneld
   is a user-mode process, it is scheduled just like any other process on
   the system. At times of high load, it may not get to run in time to
   send back the acknowledgment before the kernel times out.
   
   If this happens even when the load is light, try restarting kerneld.
   Kill the kerneld process, and start it again with the command
   /usr/sbin/kerneld. If the problem persists, you should mail a bug
   report to <[56]linux-kernel@vger.rutgers.edu>, but please make sure
   that your versions of the kernel, kerneld and the module utilities are
   up-to-date before posting about the problem. Check the requirements in
   linux/Documentation/Changes
   
   8. Mount doesn't wait for kerneld to load the filesystem module
   
   There has been a number of reports that the mount(8) command does not
   wait for kerneld to load the filesystem module. lsmod does show that
   kerneld loads the module, and if you repeat the mount command
   immediately it will succeed. This appears to be a bug in the
   module-utilities version 1.3.69f that affects some Debian users. It
   can be fixed by getting a later version of the module-utilities.
   
   9. kerneld fails to load the ncpfs module
   
   You need to compile the ncpfs utilities with -DHAVE_KERNELD. See the
   ncpfs Makefile.
   
   10. kerneld fails to load the smbfs module
   
   You are using an older version of the smbmount utilities. Get the
   latest version (0.10 or later) from [57]the SMBFS archive one TSX-11
   
   11. I built everything as modules, and now my system cannot boot or
   kerneld fails to load the root filesystem module!
   
   You cannot modularize everything: The kernel must have enough drivers
   built in for it to be able to mount your root filesystem, and run the
   necessary programs to start kerneld[58][2]. You cannot modularize
   
     * the driver for the hard disk where your root filesystem lives
     * the root filesystem driver itself
     * the binary format loader for init, kerneld and other programs
       
   12. kerneld will not load at boot time; it complains about libgdbm
   
   Newer versions of kerneld need the GNU dbm library, libgdbm.so, to
   run. Most installations have this file in /usr/lib, but you are
   probably starting kerneld before the /usr filesystem is mounted. One
   symptom of this is that kerneld will not start during boot-up (from
   your rc-scripts), but runs fine if you start it by hand after that
   system is up. The solution is to either move the kerneld startup to
   after your /usr is mounted, or move the gdbm library to your root
   filesystem, e.g. to /lib.
   
   13. I get Cannot load module xxx but I just reconfigured my kernel
   without xxx support!
   
   The Slackware installation (possibly others) builds a default
   /etc/rc.d/rc.modules which does an explicit modprobe on a variety of
   modules. Exactly which modules get modprobed depends on the original
   kernel's configuration. You have probably reconfigured your kernel to
   exclude one or more of the modules that is getting modprobed in
   rc.modules, thus, the error message(s). Update your rc.modules by
   commenting out any modules you no longer use, or remove the rc.modules
   entirely and let kerneld load the modules when they are needed.
   
   14. I rebuilt my kernel and modules, and still get messages about
   unresolved symbols when booting
   
   You probably reconfigured/rebuilt your kernel and excluded some
   modules. You've got some old modules that you no longer use hanging
   around in the /lib/modules directory. The easiest fix is to delete
   your /lib/modules/x.y.z directory and do a make modules_install from
   the kernel source directory again. Note that this problem only occurs
   when reconfiguring your kernel without changing versions. If you see
   this error when moving to a newer kernel version you've got some other
   problem.
   
   15. I installed Linux 2.1/2.3 and now I cannot load any modules!
   
   Odd numbered Linux are development kernels. As such, it should be
   expected that things break from time to time. One of the things that
   has changed significantly is the way modules are handled, and where
   the kernel and modules are loaded into memory.
   
   In brief, if you want to use modules with a development kernel, you
   must
   
     * read the Documentation/Changes file and see what packages need
       upgrading on your system
     * use the latest modutils package, available from [59]AlphaBits on
       Red Hat or the mirror site at [60]TSX-11
       
   I recommend using at least kernel 2.1.29, if you want to use modules
   with a 2.1 kernel.
   
   16. What about dial-on-demand networking?
   
   kerneld originally had some support for establishing dial-up network
   connections on demand; trying to send packets to a network without
   being connected would cause kerneld to run the /sbin/request_route
   script to setup a PPP or SLIP connection.
   
   This turned out to be a bad idea. Alan Cox of Linux networking fame
   wrote on the linux-kernel mailing list
   
     The request-route stuff is obsolete, broken and not required [...]
     Its also removed from 2.1.x trees.
     
   Instead of using the request-route script and kerneld, I highly
   recommend Eric Schenk's [61]diald package to manage your demand
   dialing.
   
  Notes
  
   [62][1]
   
   Some distributions call this file modules.conf
   [63][2]
   
   Actually, this is not true. Late 1.3.x and all 2.x kernels support the
   use of an initial ram-disk that is loaded by LILO or LOADLIN; it is
   possible to load modules from this disk very early in the boot
   process. How to do it is described in the
   linux/Documentation/initrd.txt file that comes with the kernel
   source-files.

References

   1. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN26
   2. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#CREDITS
   3. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#INTRODUCTION
   4. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#WHY
   5. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#WHERE
   6. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#SETUP
   7. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#TESTING
   8. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#CONFIGURATION
   9. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#BLOCKDEV
  10. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#CHARDEV
  11. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#ETH0
  12. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#BINFMT
  13. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#LDISC
  14. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#NET-PF
  15. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#FS
  16. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#SPECIAL-DEVS
  17. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#MISCDEVS
  18. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#SCSIDEVS
  19. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#PRE-POST
  20. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#SPYING
  21. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#GOODIES
  22. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#COMMONPROBLEMS
  23. http://www.linuxdoc.org/
  24. mailto:storner@osiris.ping.dk
  25. mailto:garym@teledyn.com
  26. mailto:kerneld-howto@linuxdoc.org
  27. ftp://ftp.kernel.org/pub/linux/kernel/
  28. ftp://metalab.unc.edu/pub/Linux/kernel/
  29. ftp://tsx-11.mit.edu/pub/linux/sources/system/
  30. http://www.linuxdoc.org/
  31. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#FTN.AEN192
  32. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#COMMONPROBLEMS
  33. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#MISCDEVS
  34. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#SCSIDEVS
  35. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#PRE-POST
  36. mailto:bgallia@luc.edu
  37. ftp://sunsite.unc.edu/pub/Linux/apps/sound/mixers/
  38. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN381
  39. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN398
  40. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN410
  41. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN418
  42. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN424
  43. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN432
  44. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN437
  45. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN449
  46. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN455
  47. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN464
  48. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN472
  49. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN488
  50. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN498
  51. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN507
  52. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN516
  53. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN532
  54. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#SCSIDEVS
  55. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#PRE-POST
  56. mailto:linux-kernel@vger.rutgers.edu
  57. ftp://tsx-11.mit.edu/pub/linux/filesystems/smbfs/
  58. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#FTN.AEN477
  59. ftp://ftp.redhat.com/pub/alphabits/
  60. ftp://tsx-11.mit.edu/pub/linux/packages/alphabits/
  61. http://www.dna.lth.se/~erics/diald.html
  62. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN192
  63. file://localhost/export/sunsite/users/gferg/howto/00_Kerneld.html#AEN477
  The LBX Mini-HOWTO
  Paul D. Smith, psmith@baynetworks.com
  v1.04, 11 December 1997

  LBX (Low Bandwidth X) is an X server extension which performs compres
  sion on the X protocol.  It is meant to be used in conjunction with X
  applications and an X server which are separated by a slow network
  connection, to improve display and response time.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. What's The Status Of LBX?

  3. Who Can Benefit From LBX?

  4. Who Doesn't Need LBX?

  5. How Does LBX Work?

  6. What Do I Need To Use LBX?

  7. What Don't I Need To Use LBX?

  8. How Do I Start LBX?

  9. Problems

  10. Documentation

  11. Alternatives

     11.1 dxpc - The Differential X Protocol Compressor
        11.1.1 Advantages
        11.1.2 Disadvantages
        11.1.3 Where Can I Get dxpc?
     11.2 Ssh (Secure Shell)
     11.3 Which Is Better?


  ______________________________________________________________________

  1.  Introduction

  Low-Bandwidth X (LBX) attempts to recognize that in this day and age,
  not everyone will be a fast LAN hop or two away from the system that
  they are running their applications on.

  The X protocol can generate an extraordinary amount of traffic,
  especially for simple-seeming things such as creating new windows.  As
  anyone who has tried to use X over a dial-in modem at 28.8 or even
  higher can attest, creating new X windows can involve an excruciating
  wait.

  LBX is fundamentally a compression and caching scheme designed to
  minimize the amount of X traffic generated between two systems.

  2.  What's The Status Of LBX?

  As of the X Consortium's release of X11R6.3 in December, 1996, LBX is
  a full extension to the X protocol.  For XFree86 folks, that's XFree86
  version 3.3.

  3.  Who Can Benefit From LBX?

  If you use a modem to dial into a service provider, then run X
  applications on remote machines with their DISPLAYs set to your local
  machine (or vice versa), LBX will speed up that connection.  Also if
  you set DISPLAYs from systems across WANs (other countries, for
  example) or other slow links, LBX can help.

  4.  Who Doesn't Need LBX?

  LBX is useless, of course, if you're only running applications
  locally, or if you're not running X at all.

  Also, if you're running on a fast LAN, LBX won't be much help.  Some
  people say "if LBX cuts down on network traffic, wouldn't it be good
  to use even on fast LANs?"  It might be, if your goal is to reduce
  network traffic.  But if your goal is to get better response time LBX
  probably isn't what you want.  Although it does introduce caching and
  compression, that comes at a cost on both ends (extra memory for
  caching, and extra CPU for decompression).  If your link is fairly
  speedy LBX will probably result in an overall slowdown.

  5.  How Does LBX Work?

  LBX works by introducing a proxy server at the client side, which
  performs caching and compression.  The X server knows that the client
  is using a proxy server, and decompresses accordingly.

  Here's a normal setup for remote X clients.  In our discussion, LOCAL
  is always the workstation sitting in front of you, whose monitor
  you're looking at, and REMOTE is the remote workstation, where the
  actual application is running.

       ______________________________________________________________________
            REMOTE                               LOCAL
        +-----+                                             +-----+
        | APP |-\          Network            +----------+  |     |\
        +-----+  \--------------------------->| X SERVER |=>|     ||
        +-----+  /       (X Protocol)         +----------+  +-----+\
        | APP |-/                                          /_____//
        +-----+
       ______________________________________________________________________

  When using LBX, a proxy server (lbxproxy) is introduced on the remote
  side, and the applications talk to that process instead of directly to
  the LOCAL server.  That process then performs the caching and
  compression of X requests and forwards them.  It looks like this:

  ______________________________________________________________________
       REMOTE                                         LOCAL
                                                                 +-----+
   +-----+  +-------+           Network            +----------+  |     |\
   | APP |->| PROXY |----------------------------->| X SERVER |=>|     ||
   +-----+  +-------+       (LBX/X Protocol)       +----------+  +-----+\
   +-----+   /                                                  /_____//
   | APP |--/
   +-----+
  ______________________________________________________________________

  Details on exactly what caching and compression LBX does is beyond the
  scope of this document.

  6.  What Do I Need To Use LBX?

  You need an X server on your LOCAL system which has the LBX extension
  compiled in.  Unless you explicitly told it not to when building it,
  X11R6.3 servers automatically enable LBX.  Also, all XFree86 3.3
  servers have LBX enabled by default.

  You can use the xdpyinfo command to see if your server has the LBX
  extension: run xdpyinfo and look at the list just under "number of
  extensions"; you should see "LBX" listed there.

  Next, you need to get an lbxproxy program compiled for the REMOTE
  system.  This is the tricky part.  If the remote system is not the
  same type as your local system, the lbxproxy on your local system will
  do you no good, of course.

  There is unfortunately no "broken out" distribution of lbxproxy, so
  you will have to either (a) get and build most, if not all, of X11R6.3
  for the remote system, or (b) find someplace to get a pre-compiled
  lbxproxy binary for your system.  The latter is much simpler of
  course.

  The lbxproxy is simply a single executable.  There are no
  configuration files, resource files, etc. associated with it.

  7.  What Don't I Need To Use LBX?

  The REMOTE system does not need a new X server (as always, the REMOTE
  system doesn't need any X server running).

  The application you want to run does not need to be linked with any
  special version of X, or any special libraries; I regularly use
  commercial X11R5 apps over LBX with no trouble.

  You do not need root or other privileged access on the REMOTE system;
  the lbxproxy process runs under your normal access permissions.
  Further, you can run it right from your home directory: it does not
  have to be installed anywhere.

  8.  How Do I Start LBX?

  OK, here it is... after all that it's actually quite simple.  Replace
  LOCAL and REMOTE below with the hostnames of your local workstation
  and remote system, respectively (don't get them mixed up!)

  On LOCAL:


  1. Start your X server.

  2. Tell your X server that the remote system is allowed access.  Using
     the host-list method, type xhost +REMOTE.  If you use xauth you may
     need to do more than this; see the xauth(1) man page for more
     information.

     You should consult the Remote X Apps Mini-HOWTO
     <http://www.xs4all.nl/~zweije/xauth.html> if you're not familiar
     with remote X access permission setup.

  On REMOTE:


  1. Start lbxproxy and tell it to forward to the LOCAL X server, like
     this:

         $ lbxproxy -display LOCAL:0 :1 &

  This tells lbxproxy to use display :1 on the REMOTE system; if that
  system has >1 display already you can use :2 or whatever instead.

  2. Set your DISPLAY environment variable to point to the display that
     lbxproxy is providing, instead of the normal display:

         $ DISPLAY=:1
         $ export DISPLAY

  Or, if you use csh or clones:

         % setenv DISPLAY :1

  3. If you're using xauth you will need to ensure that your cookie is
     available locally.  See the Remote X Apps Mini-HOWTO
     <http://www.xs4all.nl/~zweije/xauth.html> for more information on
     this.

  4. Start your X applications!

  That's it; all X apps that are started up pointing to :1 will use LBX.
  Of course, there's no reason you couldn't also start X apps pointing
  to LOCAL:0 and have both running at the same time.

  9.  Problems

  Here are some common problems:


     Q) lbxproxy exits with an "access denied" error.


     A) This means the LOCAL system isn't accepting connections from the
        REMOTE system due to permissions errors.  See the Remote X Apps
        Mini-HOWTO <http://www.xs4all.nl/~zweije/xauth.html> for details
        on these issues.

        As a simple trouble-shooting measure, try running a simple X app
        like xclock on REMOTE and have it display on the local system
        without using lbxproxy:

            $ xclock -display LOCAL:0

     If that doesn't work, it's xhost or some other basic X problem, not
     LBX.


  10.  Documentation

  The only documentation available in a standard X distribution may be
  the lbxproxy(1) man page.

  If you have access to the X source tree, then very interesting
  information on LBX is available there:


    xc/doc/specs/Xext/lbx.mif (Framemaker MIF)

    xc/doc/hardcopy/Xext/lbx.PS.Z (Compressed Postscript)

    xc/doc/hardcopy/Xext/lbxTOC.html (HTML)

  More detailed discussion of specific LBX algorithms is available here:


    xc/doc/specs/Xext/lbxalg.mif (Framemaker MIF)

    xc/doc/specs/Xext/lbxalg.PS.Z (Compressed Postscript)

  If you don't have access to the X11 source, you can obtain these files
  from the X Consortium's FTP site <ftp://ftp.x.org/pub/R6.3/xc/doc/>.

  11.  Alternatives

  If you don't like lbxproxy for some reason: you're not satisfied with
  the performance, it doesn't work for you, you don't want to hassle
  with creating an lbxproxy for the remote host, or you simply are
  interested in trying other options, there is at least one other
  package for X protocol compression (anyone have others?)

  11.1.  dxpc - The Differential X Protocol Compressor


    Original Author: Brian Pane <brianp@cnet.com>

    Current Maintainer: Zachary Vonler <lightborn@mail.utexas.edu>

  dxpc <http://ccwf.cc.utexas.edu/~zvonler/dxpc/> works in essentially
  the same way as LBX.  However, to avoid having to implement an X
  extension and modify the X server code, dxpc uses two proxies: one
  that runs on the REMOTE host, like lbxproxy, and one that runs on the
  LOCAL host.

  The REMOTE host proxy communicates between the X clients and the LOCAL
  host proxy, and the LOCAL host proxy communicates between the X server
  and the REMOTE host proxy.

  So, to both the X clients and the X server, it looks like X protocol
  as usual.


  11.1.1.  Advantages


    Since it's a completely separate application that does not require
     any X internals, it's much simpler to compile and install.

    It's maintained separately, so you don't have to wait for the OSF
     to release new X versions for enhancements or fixes.

    It provides more and better compression information and statistics
     than lbxproxy.


  11.1.2.  Disadvantages


    It is not a standard part of X; you must obtain and build it
     separately.

    It is slightly more complex to set up, since it requires a LOCAL-
     side proxy as well as the REMOTE proxy.


  11.1.3.  Where Can I Get dxpc?

  The source for dxpc is available at ftp.x.org
  <ftp://ftp.x.org/contrib/utilities/>.

  There is a WWW homepage for dxpc that gives a lot of good information,
  including pointers to the dxpc mailing list, access to the source
  code, and a number of pre-built binaries for various platforms:

  <http://ccwf.cc.utexas.edu/~zvonler/dxpc/>


  11.2.  Ssh (Secure Shell)

  Ken Chase <lbxhowto@sizone.org> notes that ssh
  <http://www.cs.hut.fi/ssh/> can be used for compression.  Although its
  main purpose is to provide security, it also compresses the data it
  sends.

  Thus, if you run X over a ssh link you will automatically obtain some
  amount of compression.

  11.3.  Which Is Better?

  I don't know.  Both LBX and dxpc are certainly better at raw
  compression than ssh.  Of course, ssh provides the added advantage of
  security.  And of course, there's no reason you can't use both ssh and
  one of the other two, to get good compression and security.

  It shouldn't be hard to run some benchmarking against these options
  and get both subjective and statistical measurings of performance.
  But I haven't done this, and I don't know of anyone who has.

  Lilo mini-Howto
  Cameron Spitzer (cls@truffula.sj.ca.us), Alessandro Rubini
  (rubini@linux.it).
  v2.02, 16 August 1998

  LILO is the most used Linux Loader for the x86 flavour of Linux; I'll
  call it Lilo rather than LILO here because I don't appreciate upper
  case.  This file describes some typical Lilo installations.  It's
  intended as a supplement to the Lilo User's Guide.  I think examples
  are informative even if your setup isn't much like mine.  I hope this
  saves you trouble. Since Lilo's own documentation is very good, who's
  interested in the details is referred to /usr/doc/lilo*
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Background Information and Standard Installation

     2.1 Where Should I Install Lilo?
     2.2 How Should I Configure my IDE Hard Drives?
     2.3 How Can I Interact at Boot Time?
     2.4 How Can I Uninstall Lilo?

  3. The Simple Configuration

     3.1 How to Deal with Big Kernels
     3.2 Other Sources of Information

  4. Installing

  5. Using Lilo When the BIOS Can't See the Root Partition

  6. Accessing Huge Disks When the BIOS Can't

  7. Booting from a Rescue Floppy

  ______________________________________________________________________

  1.  Introduction

  Although the documentation found in Lilo's sources (the one installed
  in /usr/doc/lilo-version) is very comprehensive, most Linux users
  experience some trouble in building their own /etc/lilo.conf file.
  This document is meant to support them by giving the minimal
  information and by showing five sample installations:


    The first example is the classical ``Linux and other''
     installation.

    The next one shows how to install Lilo on a hard drive connected as
     /dev/hdc that will boot as /dev/hda.  This is usually needed when
     you install a new Linux drive from your own running system. This
     also tells how to boot from SCSI disks when your BIOS is modern
     enough.

    The third example shows how to boot a Linux system whose root
     partition can't be accessed by the BIOS.

    The next sample file is used to access huge disks, that neither the
     BIOS nor DOS can access easily (this one is somehow outdated).
    The last example shows how to restore a damaged disk, if the damage
     resulted from installing another operating system).


  The last three examples are by Cameron, cls@truffula.sj.ca.us, who
  wrote the original document. Alessandro (tt/rubini@linux.it/, the
  current maintainer doesn't run anything but Linux, so he can't check
  nor update them by himself. Needless to say, any feedback is welcome.


  2.  Background Information and Standard Installation

  When Lilo boots the system, it uses BIOS calls to load the Linux
  kernel off the disk (IDE drive, floppy or whatever). Therefore, the
  kernel must live in some place that can be accessed by the bios.

  At boot time, Lilo is not able to read filesystem data, and any
  pathname you put in /etc/lilo.conf is resolved at installation time
  (when you invoke /sbin/lilo). Installation time is when the program
  builds the tables that list which sectors are used by the files used
  to load the operating system. As a consequence, all of these files
  must live in a partition that can be accessed by the BIOS (the files
  are usually located in the /boot directory, this means that only the
  root partition of your Linux system needs to be accessed via the
  BIOS).

  Another consequence of being BIOS-based is that you must reinstall the
  loader (i.e., you must reinvoke /sbin/lilo) any time you modify the
  Lilo setup. Whenever you recompile your kernel and overwrite your old
  image you must reinstall Lilo.


  2.1.  Where Should I Install Lilo?

  The boot= directive in /etc/lilo.conf tells Lilo where it should place
  its primary boot loader. In general, you can either specify the master
  boot record (/dev/hda) or the root partition of your Linux
  installation (is usually is /dev/hda1 or /dev/hda2).

  If you have another operating system installed in your hard drive,
  you'd better install Lilo to the root partition instead of the MBR. In
  this case, you must mark the partition as ``bootable'' using the ``a''
  command of fdisk or the ``b'' command of cfdisk. If you don't
  overwrite the master boot sector you'll find it easier to uninstall
  Linux and Lilo if needed.


  2.2.  How Should I Configure my IDE Hard Drives?

  I personally don't use LBA or LARGE settings in the BIOS (but I only
  run Linux); they are horrible kludges forced on by design deficiencies
  in the PC world. This requires that the kernel lives in the first 1024
  cylinders, but this is not a problem as long as you partition your
  hard drives and keep root small (as you should do anyways).

  If your hard disk already carries another operating system, you won't
  be able to modify the BIOS settings, or the old system won't work any
  more. All recent Lilo distribution are able to deal with LBA and LARGE
  disk settings.

  Note that the "linear" keyword in /etc/lilo.conf can help in dealing
  with geometry problems. The keyword instructs Lilo to use linear
  sector addresses instead of sector/head/cylinder tuples.  Conversion
  to 3D addresses is delayed to run-time, therefore making the setup
  more immune to geometry problems.

  If you have more than one hard disk and some of them are only used by
  Linux and are not involved in the boot process, you can tell your BIOS
  that they are not installed. Your system will boot more quickly and
  Linux will autodetect all the disks in no time. I often switch disks
  in my computers, but I never touch the BIOS configuration.


  2.3.  How Can I Interact at Boot Time?

  When you see the Lilo prompt, you can hit the <Tab> key to show the
  list of possible choices. If Lilo is not configured to be interactive,
  press and hold the <Alt> or <Shift> key before the ``LILO'' message
  appears.

  If you choose to boot a Linux kernel, you can add command-line
  arguments after the name of the system you choose. The kernel accepts
  many command-line arguments. All the arguments are listed in the
  ``BootPrompt-HOWTO'' by Paul Gortmaker, and I won't replicate it here.
  A few command line arguments, however, are particularly important and
  worth describing here:


    root=: you can tell the Linux kernel to mount as root a different
     partition than the one appearing in lilo.conf.  For example, my
     system has a tiny partition hosting a minimal Linux installation,
     and I've been able to boot the system after destroying my root
     partition by mistake.

    init=: verson 1.3.43 and newer of the Linux kernel can execute
     another command instead of /sbin/init, as specified on the command
     line. If you experience bad problems during the boot process, you
     can access the bare system by specifying init=/bin/sh (when you are
     at the shell prompt you most likely will need to mount your disks:
     try ``mount -w -n -o remount /; mount -a'', and remember to
     ``umount -a'' before turning off the computer).

    A number: by specifying a number on the kernel command line, you
     instruct init to enter a specific run-level (the default is usually
     3 or 2, according to the distribution you chose).  Refer to the
     init documentation, to /etc/inittab and to /etc/rc*.d to probe
     further.


  2.4.  How Can I Uninstall Lilo?

  When Lilo overwrites a boot sector, it saves a backup copy in
  /boot/boot.xxyy, where xxyy are the major and minor numbers of the
  device, in hex. You can see the major and minor numbers of your disk
  or partition by running ``ls -l /dev/device''. For example, the first
  sector of /dev/hda (major 3, minor 0) will be saved in
  /boot/boot.0300, installing Lilo on /dev/fd0 creates /boot/boot.0200
  and installing on /dev/sdb3 (major 8, minor 19) creates
  /boot/boot.0813. Note that Lilo won't create the file if there is
  already one so you don't need to care about the backup copy whenever
  you reinstall Lilo (for example, after recompiling your kernel). The
  backup copies found in /boot/ are always the snapshot of the situation
  before installing any Lilo.

  If you ever need to uninstall Lilo (for example, in the unfortunate
  case you need to uninstall Linux), you just need to restore the
  original boot sector. If Lilo is installed in /dev/hda, just do ``dd
  if=/boot/boot.0300 of=/dev/hda bs=446 count=1'' (I personally just do
  ``cat /boot/boot.0300 > /dev/hda'', but this is not safe, as this will
  restore the original partition table as well, which you might have
  modified in the meanwhile). This command is much easier to run than
  trying ``fdisk /mbr'' from a DOS shell: it allows you to cleanly
  remove Linux from a disk without ever booting anything but Linux.
  After removing Lilo remember to run Linux' fdisk to destroy any Linux
  partition (DOS' fdisk is unable to remove non-dos partitions).

  If you installed Lilo on your root partition (e.g., /dev/hda2),
  nothing special needs to be done to uninstall Lilo.  Just run Linux'
  fdisk to remove Linux partitions from the partition table. You must
  also mark the DOS partition as bootable.


  3.  The Simple Configuration

  Most Lilo installations use a configuration file like the following
  one:


  boot = /dev/hda   # or your root partition
  delay = 10        # delay, in tenth of a second (so you can interact)
  vga = 0           # optional. Use "vga=1" to get 80x50
  #linear           # try "linear" in case of geometry problems.

  image = /boot/vmlinux  # your zImage file
    root = /dev/hda1     # your root partition
    label = Linux        # or any fancy name
    read-only            # mount root read-only

  other = /dev/hda4   # your dos partition, if any
    table = /dev/hda  # the current partition table
    label = dos       # or any non-fancy name

  You can have multiple ``image'' and ``other'' sections if you want.
  It's not uncommon to have several kernel images configured in your
  lilo.conf, at least if you keep up to date with kernel development.


  3.1.  How to Deal with Big Kernels

  If you compile a ``zImage'' kernel and it is too big to fit in half a
  megabyte (this is commong with new 2.1 kernels), you should build a
  ``big zImage'' instead: ``make bzImage''. To boot a big kernel image
  nothing special is needed, but you need version 18 or newer of Lilo.
  If your installation is older, you should upgrade your Lilo package.


  3.2.  Other Sources of Information

  In addition to the Lilo docs, there are a number of mini-howto's that
  can be useful for your needs. All of them are called
  ``Linux+foobarOS'', for some foobarOS, they deal with coexistence of
  Linux and other operationg system(s). Also, ``Multiboot-with-LILO''
  describes how the various Windows flavours can be made to coexist with
  Linux.


  4.  Installing hdc  to Boot as hda  and Using bios=

  Lilo allows to map the kernel image from one disk and instruct the
  BIOS to retrieve it from another disk. For example, it's common for me
  to install Linux on a disk I connect to hdc (master disk of secondary
  controller) and boot it as a standalong system on the primary IDE
  controller of another computer. I copied the installation floppy to a
  tiny partition, so I can run chroot in a virtual console to install
  hdc while I use the system to do something else.

  The lilo.conf file I use to install Lilo looks like:


  # This file must be used from a system running off /dev/hdc
  boot = /dev/hdc   # overwrite MBR of hdc
  disk = /dev/hdc   # tell how hdc will look like:
     bios = 0x80    #  the bios will see it as first drive
  delay = 0
  vga = 0

  image = /boot/vmlinux  # this is on /dev/hdc1
    root = /dev/hda1     # but at boot it will be hda1
    label = Linux
    read-only

  This configuration file must be read by a Lilo running off /dev/hdc1.
  The Lilo maps that get written the boot sector (/dev/hdc) must refer
  to the files in /boot (currently installed as hdc); such files will be
  accessed under hda when this disk will be booted as a standalone
  system.

  I call this configuration file /mnt/etc/lilo.conf.hdc (/mnt is where
  hdc is mounted during the installation. I install Lilo by invoking
  ``cd /mnt; chroot . sbin/lilo -C /etc/lilo.conf.hdc''. Refer to the
  manual page for chroot if this looks magic.

  The ``bios='' directive in lilo.conf is used to tell Lilo what the
  BIOS thinks of your devices. BIOS calls identify floppy disks and hard
  drives with a number: 0x00 and 0x01 select the floppy drives, 0x80 and
  the following numbers select hard disks (old BIOSes can only access
  two disks). The meaning of ``bios = 0x80 in the previous sample file
  is therefore ``use 0x80 in your BIOS calls for /dev/hdc''.

  This Lilo directive can be handy in other situations, for example when
  your BIOS is able to boot from SCSI disks instead of IDE ones. When
  both IDE and SCSI devices are there, Lilo can't tell whether 0x80 will
  refer to one or the other because the user is able to choose it in the
  BIOS configuration menus, and the BIOS can't be accessed while Linux
  is running.

  By default, Lilo assumes that IDE drives are mapped first by the BIOS,
  but this can be overridden by using instructions like these in
  /etc/lilo.conf:


  disk = /dev/sda
    bios = 0x80

  5.  Using Lilo When the BIOS Can't See the Root Partition

  I have two IDE drives, and a SCSI drive.  The SCSI drive can't be seen
  from BIOS.  The Linux Loader, Lilo, uses BIOS calls and can only see
  drives that BIOS can see.  My stupid AMI BIOS will only boot from "A:"
  or "C:" My root file system is on a partition on the SCSI drive.

  The solution consists in storing the kernel, map file, and chain
  loader in a Linux partition on the first IDE.  Notice that it is not
  necessary to keep your kernel on your root partition.

  The second partition on my first IDE (/dev/hda2, the Linux partition
  used to boot the system) is mounted on /u2.  Here is the
  /etc/lilo.conf file I used.


  #  Install Lilo on the Master Boot Record
  #  on the first IDE.
  #
  boot = /dev/hda
  #  /sbin/lilo (the installer) copies the Lilo boot record
  #  from the following file to the MBR location.
  install = /u2/etc/lilo/boot.b
  #
  #  I wrote a verbose boot menu.  Lilo finds it here.
  message = /u2/etc/lilo/message
  #  The installer will build the following file. It tells
  #  the boot-loader where the blocks of the kernels are.
  map = /u2/etc/lilo/map
  compact
  prompt
  #  Wait 10 seconds, then boot the 1.2.1 kernel by default.
  timeout = 100
  #  The kernel is stored where BIOS can see it by doing this:
  #      cp -p /usr/src/linux/arch/i386/boot/zImage /u2/z1.2.1
  image = /u2/z1.2.1
          label = 1.2.1
  #  Lilo tells the kernel to mount the first SCSI partition
  #  as root.  BIOS does not have to be able to see it.
          root = /dev/sda1
  #  This partition will be checked and remounted by /etc/rc.d/rc.S
          read-only
  #  I kept an old Slackware kernel lying around in case I built a
  #  kernel that doesn't work.  I actually needed this once.
  image = /u2/z1.0.9
          label = 1.0.9
          root = /dev/sda1
          read-only
  #  My DR-DOS 6 partition.
  other = /dev/hda1
          loader=/u2/etc/lilo/chain.b
          label = dos
          alias = m

  6.  Accessing Huge Disks When the BIOS Can't

  The system in my office has a 1GB IDE drive.  The BIOS can only see
  the first 504 MB of the IDE.  (Where MB means 2**10 bytes, not 10**6
  bytes.)  So I have MS-DOS on a 350 MB partition /dev/hda1 and my Linux
  root on a 120 MB partition /dev/hda2.

  MS-DOS was unable to install itself correctly when the drive was
  fresh.  Novell DOS 7 had the same problem.  Luckily for me, "Options
  by IBM" forgot to put the "OnTrack" diskette in the box with the
  drive.  The drive was supposed to come with a product called "OnTrack
  Disk Manager."  If you only have MSDOS, I guess you have to use it.

  So I made a partition table with Linux' fdisk.  MSDOS-6.2 refused to
  install itself in /dev/hda1.  It said something like ``this release of
  MS-DOS is for new installations.  Your computer already has MS-DOS so
  you need to get an upgrade release from your dealer.''  Actually, the
  disk was brand new.

  What a crock!  So I ran Linux' fdisk again and deleted partition 1
  from the table.  This satisfied MS-DOS 6.2 which proceeded to create
  the exact same partition 1 I had just deleted and installed itself.
  MS-DOS 6.2 wrote its Master Boot Record on the drive, but it couldn't
  boot.

  Luckily I had a Slackware kernel on floppy (made by the Slackware
  installation program "setup"), so I booted Linux and wrote Lilo over
  MS-DOS' broken MBR.  This works.  Here is the /etc/lilo.conf file I
  used:


  boot = /dev/hda
  map = /lilo-map
  delay = 100
  ramdisk = 0             # Turns off ramdisk in Slackware kernel
  timeout = 100
  prompt
  disk = /dev/hda         # BIOS only sees first 500 MB.
     bios = 0x80          # specifies the first IDE.
     sectors = 63         # get the numbers from your drive's docs.
     heads = 16
     cylinders = 2100
  image = /vmlinuz
    append = "hd=2100,16,63"
    root = /dev/hda2
    label = linux
    read-only
    vga = extended
  other = /dev/hda1
    label = msdos
    table = /dev/hda
    loader = /boot/chain.b

  After I installed these systems, I verified that the partition
  containing the zImage, boot.b, map, chain.b, and message files can use
  an msdos file system, as long as it is not "stackered" or
  "doublespaced."  So I could have made the DOS partition on /dev/hda1
  500 MB.

  I have also learned that "OnTrack" would have written a partition
  table starting a few dozen bytes into the drive, instead of at the
  beginning, and it is possible to hack the Linux IDE driver to work
  around this problem.  But installing would have been impossible with
  the precompiled Slackware kernel.  Eventually, IBM sent me an
  "OnTrack" diskette.  I called OnTrack's technical support.  They told
  me Linux is broken because Linux doesn't use BIOS.  I gave their
  diskette away.


  7.  Booting from a Rescue Floppy

  Next, I installed Windows-95 on my office system.  It blew away my
  nice Lilo MBR, but it left my Linux partitions alone.  Kernels take a
  long time to load from floppy, so I made a floppy with a working Lilo
  setup on it, which could boot my kernel from the IDE.

  I made the lilo floppy like so:

    fdformat /dev/fd0H1440      #  lay tracks on virgin diskette
    mkfs -t minix /dev/fd0 1440 #  make file system of type minix
    mount /dev/fd0 /mnt         #  mount in the standard tmp mount point
    cp -p /boot/chain.b /mnt    #  copy the chain loader over
    lilo -C /etc/lilo.flop      #  install Lilo and the map on the diskette.
    umount /mnt


  Notice that the diskette must be mounted when you run the installer so
  that Lilo can write its map file properly.

  This file is /etc/lilo.flop.  It's almost the same as the last one:


  #  Makes a floppy that can boot kernels from HD.
  boot = /dev/fd0
  map = /mnt/lilo-map
  delay = 100
  ramdisk = 0
  timeout = 100
  prompt
  disk = /dev/hda     # 1 GB IDE, BIOS only sees first 500 MB.
     bios=0x80
     sectors = 63
     heads = 16
     cylinders = 2100
  image = /vmlinuz
    append = "hd=2100,16,63"
    root = /dev/hda2
    label = linux
    read-only
    vga = extended
  other = /dev/hda1
    label = msdos
    table = /dev/hda
    loader = /mnt/chain.b

  Finally, I needed MS-DOS 6.2 on my office system, but I didn't want to
  touch the first drive.  I added a SCSI controller and drive, made an
  msdos file system on it with Linux' mkdosfs, and Windows-95 sees it as
  "D:".   But of course MSDOS will not boot off of D:.  This is not a
  problem when you have Lilo.  I added the following to the lilo.conf in
  Example 2.


  other = /dev/sda1
    label = d6.2
    table = /dev/sda
    loader = /boot/any_d.b


  With this modification MSDOS-6.2 runs, and it thinks it is on C: and
  Windows-95 is on D:.

  Leased line Mini HOWTO
  Rob van der Putten, rob@sput.signature.nl
  v2.0, 20 April 2000

  Configuring your modem and pppd to use a 2 wire twisted pair leased
  line.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 What is a leased line
     1.2 Assumptions

  2. Modem

     2.1 Modem Configuration
     2.2 Test
     2.3 Examples
        2.3.1 Hi-Tech
        2.3.2 Tornado FM 228 E
        2.3.3 Tron DF
        2.3.4 US Robotics Courier V-Everything

  3. PPPD

     3.1 Configuration
     3.2 Scripts
        3.2.1 Starting the pppd and keeping it alive
        3.2.2 Setting the routes
     3.3 Test


  ______________________________________________________________________

  The most recent (beta) version of this HOWTO can be found at:
  http://www.sput.signature.nl/software/leased-line/


  1.  Introduction

  1.1.  What is a leased line

  Any fixed, that is permanent, point to point data communications link,
  which is leased from a telco or similar organisation.  The leased line
  involves cables, such as twisted pair, coax or fiber optic, and may
  involve all sorts of other hardware such as (pupin) coils,
  transformers, amplifiers and regenerators.



     This document deals with:
        Configuring your modem and pppd to use a 2 wire twisted pair
        leased line.


     This document does NOT deal with:
        SLIP, getting or installing pppd, synchronous data
        communication, baseband modems, xDSL.



  1.2.  Assumptions

  You should already have a working pppd on your system.  You also need
  Minicom or a similar program to configure your modems.

  2.  Modem

  A leased line is not connected to a telephone exchange and does not
  provide DC power, dial tone, busy tone or ring signal. This means that
  your modems are on their own and have to be able to deal with this
  situation.


  You should have 2 identical (including firmware version) external
  modems supporting both leased line and dumb mode. Make sure your
  modems can actually do this! Also make sure your modem is properly
  documented.  You also need:


    2 fully wired shielded RS232 cables. The shield should be connected
     to the connector shell (not pin 1) at both ends (not at one end).

    A RS232 test plug may be handy for test purposes.

    2 RJ11 cords, one for each end of the leased line.

    A basic understanding of `AT' commands.


  2.1.  Modem Configuration

  A note on modem configuration and init strings in general: Configure
  your modem software such as minicom or (m)getty to use the highest
  possible speed; 57600 bps for 14k4 and 115200 bps for 28k8 or faster
  modems.  Lots of people use very long and complicated init strings,
  often starting with AT&F and containing lots of modem brand and -type
  specific commands. This however is needlessly complicated.  Most
  programs feel happy with the same modem settings, so why not write
  these settings in the non volatile memory of all your modems, and only
  use `ATZ' as an init string in all your programs. This way you can
  swap or upgrade your modems without ever having to reconfigure any of
  your software.


  Most programs require you to use the following settings;


    Fixed baud rate (no auto baud)

    Hardware bidirectional RTS-CTS flow control (no x-on/x-off)

    8 Bits, no parity, 1 stopbit

    The modem should produce the TRUE DCD status (&C1)

    The modem should NOT ignore the DTR status (&D2 or &D3)


     Check this with AT&V or AT&Ix (consult your modem documentation)


  These settings are not necessarily the same as the default factory
  profile (&F), so starting an init string with AT&F is probably not a
  good idea in the first place. The smart thing to do is probably to use
  AT&F only when you have reason to believe that the modem setup stored
  in the non volatile memory is really screwed up.  If you think you
  have found the right setup for your modems, write it to non volatile
  memory with AT&W and test it thoroughly with Z-modem file transfers of
  both ASCII text and binary files.  Only if all of this works perfectly
  should you configure your modems for leased line.


  Find out how to put your modem into dumb mode and, more importantly,
  how to get it out of dumb mode; The modem can only be reconfigured
  when it is not in dumb mode.  Make sure you actually configure your
  modems at the highest possible speed.  Once in dumb mode it will
  ignore all `AT' commands and consequently will not adjust its speed to
  that of the COM port, but will use the speed at which it was
  configured instead (this speed is stored in a S-register by the AT&W
  command).


  Now configure your modem as follows;


    Reset on DTR toggle (&D3, this is sometimes a S register). This
     setting is required by some ISP's!

    Leased line mode (&L1 or &L2, consult your modem documentation)

    The remote modem auto answer (S0=1), the local originate (S0=0)

    Disable result codes (Q1, sometimes the dumb mode does this for
     you)

    Dumb mode (\D1 or %D1, this is sometimes a jumper) In dumb mode the
     modem will ignore all AT commands (sometimes you need to disable
     the ESC char as well).


     Write the configuration to non-volatile memory (&W).

  2.2.  Test

  Now connect the modems to 2 computers using the RS232 cables and
  connect the modems to each other using a RJ11 lead. Use a modem
  program such as Minicom (Linux), procom or telix (DOS) on both
  computers to test the modems.  You should be able to type text from
  one computer to the other and vice versa. If the screen produces
  garbage check your COM port speed and other settings.  Now disconnect
  and reconnect the RJ11 cord. Wait for the connection to reestablish
  itself. Disconnect and reconnect the RS232 cables, switch the modems
  on and off, stop and restart Minicom.  The modems should always
  reconnect at the highest possible speed (some modems have speed
  indicator leds).  Check whether the modems actually ignores the ESC
  (+++) character. If necessary disable the ESC character.


  If all of this works you may want to reconfigure your modems; Switch
  off the sound at the remote modem (M0) and put the local modem at low
  volume (L1).

  2.3.  Examples

  2.3.1.  Hi-Tech

  This is a rather vague `no name clone modem'. Its config string is
  however typical and should work on most modems.



     Originate (local):
        ATL1&C1&D3&L2%D1&W&W1


     Answer (remote):
        ATM0L1&C1&D3&L2%D1S0=1&W&W1


  2.3.2.  Tornado FM 228 E

  This is what should work;



     Originate (local):
        ATB15L1Q1&C1&D3&L2&W&W1


     Answer (remote):
        ATM0B15M0Q1&C1&D3&L2S0=1&W&W1


  Move the dumb jumper from position 2-3 to 1-2.


  Due to a firmware bug, the modems will only connect after being hard
  reset (power off and on) while DTR is high. I designed a circuit which
  hard resets the modem on the low to high transition of DTR.  The
  FreeBSD pppd however, isn't very happy about this. By combining the
  setting &D0 with a circuit which resets on the high to low transition
  instead, this problem can be avoided.

  2.3.3.  Tron DF

  The ESC char should be disabled by setting S2 > 127;



     Originate:
        ATL1&L1Q1&C1&D3S2=171\D1&W


     Answer:
        ATM0&L2Q1&C1&D3S0=1S2=171\D1&W


  2.3.4.  US Robotics Courier V-Everything

  The USR Sportster and USR Courier-I do not support leased line. You
  need the Courier V-everything version for this job.  There is a
  webpage on the USR site `explaining' how to set-up your Courier for
  leased line. However, if you follow these instructions you will end up
  with a completely brain dead modem, which can not be controlled or
  monitored by your pppd.


  The USR Courier can be configured with dip switches, however you need
  to feed it the config string first.  First make sure it uses the right
  factory profile. Unlike most other modems it has three; &F0, &F1 and
  &F2. The default, which is also the one you should use, is &F1. If you
  send it an AT&F, however it will load the factory profile &F0!  For
  the reset on DTR toggle you set bit 0 of S register 13. This means you
  have to set S13 to 1. Furthermore you need set it to leased line mode
  with &L1; ATS13=1&L1&W The dip switches are all default except for the
  following:

     3  OFF Disable result codes


     4  ON  Disable offline commands


     5  ON  For originate, OFF For answer


     8  OFF Dumb mode


  3.  PPPD

  You need a pppd (Point to Point Protocol Daemon) and a reasonable
  knowledge of how it works. Consult the relevant RFC's or the Linux PPP
  HOWTO if necessary.  Since you are not going to use a login procedure,
  you don't use (m)getty and you do not need a (fake) user associated
  with the pppd controlling your link. You are not going to dial so you
  don't need any chat scripts either.  In fact, the modem circuit and
  configuration you have just build, are rather like a fully wired null
  modem cable. This means you have to configure your pppd the same way
  as you would with a null modem cable.


  For a reliable link, your setup should meet the following criteria;


    Shortly after booting your system, pppd should raise the DTR signal
     in your RS232 port, wait for DCD to go up, and negotiate the link.

    If the remote system is down, pppd should wait until it is up
     again.

    If the link is up and then goes down, pppd should reset the modem
     (it does this by dropping and then raising DTR), and then try to
     reconnect.

    If the quality of the link deteriorates too much, pppd should reset
     the modem and then reestablish the link.

    If the process controlling the link, that is the pppd, dies, a
     watchdog should restart the pppd.


  3.1.  Configuration

  Suppose the modem is connected to COM2, the local IP address is
  `Loc_Ip' and the remote IP address is `Rem_Ip'. We want to use 576 as
  our MTU.  The /etc/ppp/options.ttyS1 would now be:



       crtscts
       mru 576
       mtu 576
       passive
       Loc_Ip:Rem_Ip
       -chap
       modem
       #noauth
       -pap
       persist



  Stuff like `asyncmap 0', `lock', `modem' and `-detach' are probably
  already in /etc/ppp/options. If not, add them to your
  /etc/ppp/options.ttyS1.  So, if the local system is 192.168.1.1 and
  the remote system is 10.1.1.1, then /etc/ppp/options.ttyS1 on the
  local system would be:



       crtscts
       mru 576
       mtu 576
       passive
       192.168.1.1:10.1.1.1
       -chap
       modem
       #noauth
       -pap
       persist



  The options.ttyS1 on the remote system would be:



       crtscts
       mru 576
       mtu 576
       passive
       10.1.1.1:192.168.1.1
       -chap
       modem
       #noauth
       -pap
       persist



  The passive option limits the number of (re)connection attempts.  The
  persist option will keep pppd alive in case of a disconnect or when it
  can't connect in the first place.  If you telnet a lot while doing
  filetransfers (FTP or webbrowsing) at the same time, you might want to
  use a smaller MTU and MRU such as 296. This will make the remote sys
  tem more responsive.  If you don't care much about telnetting during
  FTP, you could set the MTU and MRU to 1500.  Keep in mind though, that
  UDP cannot be fragmented. Speakfreely for instance uses 512 byte UDP
  packets. So the minimum MTU for speakfreely is 542 bytes.  The noauth
  option may be necessary with some newer distributions.

  3.2.  Scripts

  3.2.1.  Starting the pppd and keeping it alive

  You could start the pppd form a boot (rc) script. However, if you do
  this, and the pppd dies, you are without a link.  A more stable
  solution, is to start the pppd from /etc/inittab;



       s1:23:respawn:/usr/sbin/pppd /dev/ttyS1 115200


  This way, the pppd will be restarted if it dies.  Make sure you have a
  `-detach' option (nodetach on newer systems) though, otherwise inittab
  will start numerous instances of pppd, will complaining about
  `respawning too fast'.

  Note: Some older systems will not accept the speed `115200'. In this
  case you will have to set the speed to 38400 en set the `spd_vhi' flag
  with setserial.  Some systems expect you to use a `cua' instead of
  `ttyS' device.

  3.2.2.  Setting the routes

  The default route can be set with the defaultroute option or with the
  /etc/ppp/ip-up script;



       #!/bin/bash
       case $2 in
            /dev/ttyS1)
                 /sbin/route add -net 0.0.0.0 gw Rem_Ip netmask 0.0.0.0
                 ;;
       esac



  Ip-up can also be used to sync your clock using netdate.


  Of course the route set in ip-up is not necessarily the default route.
  Your ip-up sets the route to the remote network while the ip-up script
  on the remote system sets the route to your network. If your network
  is 192.168.1.0 and your ppp interface 192.168.1.1, the ip-up script on
  the remote machine looks like this;



       #!/bin/bash
       case $2 in
          /dev/ttyS1)
             /sbin/route add -net 192.168.1.0 gw 192.168.1.1 netmask 255.255.255.0
             ;;
       esac



  The `case $2' and `/dev/ttyS1)' bits are there in case you use more
  than one ppp link. Ip-up will run each time a link comes up, but only
  the part between `/dev/ttySx)' and `;;' will be executed, setting the
  right route for the right ttyS.  You can find more about routing in
  the NET3-4-HOWTO section on routing.

  3.3.  Test

  Test the whole thing just like the modem test.  If it works, get on
  your bike and bring the remote modem to the remote side of your link.
  If it doesn't work, one of the things you should check is the COM port
  speed; Apparently, a common mistake is to configure the modems with
  Minicom using one speed and then configure the pppd to use an other.
  This will NOT work! You have to use the same speed all of the time!



  The Linux ``Linux-DOS-Win95-OS2'' mini-HOWTO
  Mike Harlan, r3mdh@raex.com
  v1.3.1, 11 November 1997

  This document presents a procedure to make 4 operating systems co-
  exist on a single hard disk.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. The Procedure

  ______________________________________________________________________


     Disclaimer:
        Any damages inflicted on any machine by you as a result of your
        reading of this HOWTO is still YOUR FAULT. When you read about
        deleting partitions and formatting disks, be smart.  Realize
        that doing any of the above will result in loss of data.  So,
        BACKUP SOON, BACKUP OFTEN.  This is your second-to-the-last
        warning.


     Stuff to make the lawyers happy:
        Unless otherwise stated, Linux HOWTO documents are copyrighted
        by their respective authors. Linux HOWTO documents may be
        reproduced and distributed in whole or in part, in any medium
        physical or electronic, as long as this copyright notice is
        retained on all copies.  Commercial redistribution is allowed
        and encouraged; however, the author would like to be notified of
        any such distributions.

        All translations, derivative works, or aggregate works
        incorporating Linux HOWTO documents must be covered under this
        copyright notice.  That is, you may not produce a derivative
        work from a HOWTO and impose additional restrictions on its
        distribution.  Exceptions to these rules may be granted under
        certain conditions; please contact the Linux HOWTO coordinator
        at the address given below.

        In short, we wish to promote dissemination of this information
        through as many channels as possible. However, we do wish to
        retain copyright on the HOWTO documents, and would like to be
        notified of any plans to redistribute the HOWTOs.

        If you have any questions, please contact Tim Bynum, the Linux
        HOWTO coordinator, at linux-howto@sunsite.unc.edu via email.


     Updates from v1.3:

     o  Updated my e-mail address.  My address has changed from
        r3mdh@imperium.net to r3mdh@raex.com.

     Updates from v1.0:

     o  Updated my e-mail address.  My address has changed from
        r3mdh@dax.cc.uakron.edu to r3mdh@imperium.net.


  Now...........on with the show!

  1.  Introduction

  After many days of struggle and frustration, I finally figured out how
  to accomplish what I wanted.  I have a 1.2GB HD and 16MB RAM PC.  I
  wanted to have 4 operating systems on my system:  MSDOS v6.22, Windows
  95, OS/2, and Linux.  Until now, I have found no Linux HOWTO to
  perform the task of getting each and every one of these operating
  systems on one machine and still have the ability to boot each (it is
  possible to write the OSs to different partitions, but getting them to
  boot and not hang at the ``Starting MSDOS'' message, for example, is
  something that I had to figure out.  Well, after much trial and error,
  I have come up with the following recipe to perform this feat:

  Before I begin going through the procedure step-by-step, let me first
  clue you in on what I eventually wish to accomplish:


       <NAME>                      <SIZE>   <LABEL>  <PARTITION NUMBER>
       ---------------------------------------------------------------------
       MSDOS v6.22                   11MB   P1       Primary Partition 1
       ---------------------------------------------------------------------
       Windows '95                  350MB   P2       Primary Partition 2
       ---------------------------------------------------------------------
       OS/2 Boot Manager              2MB   P3       Primary Partition 3
       ---------------------------------------------------------------------
       DOS/Win Data                 511MB   E1       Primary Partition 4
       OS/2 Warp 3.0                127MB   E2       Extended into 4 logical
       Linux Slakware 3.2 Swap        XMB   E3       drives (sub-partitions)
       Linux Slakware 3.2 Native  219-XMB   E4       labeled E1-E4
       ---------------------------------------------------------------------

  What does all of this mean? Well, let me talk you through it.  First,
  we need to use up all 4 partitions on our 1 harddrive.  Partitions 1
  through 3 are PRIMARY partitions.  We will store MSDOS, Win95 and the
  OS/2 Boot Manager (which inefficiently requires its OWN partition) on
  these partitions, respectively. We then have 1 partition left.  But,
  we want to have a drive just for DOS/Win95 data (this gives us a large
  place to dump all of those ZIP files we so often download from the
  Internet as well as a place to store Win95 programs and data that we
  don't have enough room for on the Win95 partition), OS/2, and Linux
  (both a Linux native as well as Linux swap partition).

  Now, I've been getting a lot of grief through e-mail lately about why
  I have a separate partition for Win95 and one for DOS and one for
  Win95/DOS data.  Here's my answer: having separate Win95 and DOS
  partitions isn't for everyone.  Perhaps you don't even use DOS
  anymore.  Perhaps Windows '95 is your answer for any software written
  for a Microsoft platform. Well, there are some people out there who
  still use DOS and can't live without it. Whether it's because DOS can
  run 16-bit applications faster and more efficient, or because the
  certain DOS program that you may use won't run under a Windows
  environment (the Gravis Ultrasound soundcard setup program comes to
  mind), you simply MUST be able to boot into DOS from time to time.
  This HOWTO was written with those people in mind.  If you still have
  difficulty swallowing the fact that the word ``MSDOS'' is included in
  this HOWTO, then feel free to sit down and write a Linux-
  Win95-OS/2-only HOWTO.  :)

  Now, back to the diagram above.  Like I said, we have 1 partition to
  cram 4 things onto: DOS/Win data, OS/2, and Linux native & swap.  This
  can be done by creating what are called logical drives (or logical
  partitions, depending on which book you read) within the 1 primary
  partition.  When we create these logical drives within a primary
  partition, we refer to this primary partition as an EXTENDED PARTITION
  (because it is extended beyond the scope of a single, primary
  partition and instead contains up to 3 subpartitions (logical
  drives)). Confused?  If so, you might want to read the OS/2 manual
  about this topic. It will explain it better than I have here.

  Now, you might be scratching your head saying ``he wants to cram 4
  things onto that extended partition, but he just got done saying we
  can only have 3 subpartitions to put them on!''  This is true, at
  least in MS-DOS's and OS/2's reasoning.  But, here one of the many
  powerful advantages to Linux comes to save the day.  Linux can create
  more than 3 subpartitions on an extended drive.  Just how many, I
  don't know.  But, I know it can create at LEAST 4 (what we need).  So,
  when we go through the steps of the installation procedure below, keep
  in mind that when we create partitions using an MSDOS or OS/2 program,
  we will only create 3 logical drives.  Then, when we go to Linux, we
  will split one of them into two.  Essentially, you can think of it as
  ``tricking'' MSDOS and OS/2 into seeing only 3 logical drives, but in
  reality (and to Linux), there will be 4.

  2.  The Procedure


     NOTE:
        Numbers in parentheses were the number of megabytes that I used
        on my 1.2GB harddrive.

  Now, let's move on to the step-by-step procedure:

  1. Run view.exe on the Linux Slakware CD and create the Linux Boot and
     Linux Root floppies.  For some reason, the Linux bootstrap program
     calls the Root disk the Ramdisk floppy. I'll refer to this disk
     from now on as the Ramdisk (Root) floppy.

  2. Backup any information that you wish to keep to tape (or whatever
     media you have available to you).

  3. Boot your original MSDOS installation floppy, disk 1.

  4. When ``Starting MSDOS'' appears, press F5 to bypass config.sys and
     autoexec.bat.

  5. Run a:\fdisk.exe.

  6. Delete all partitions (you have been warned: DELETING / MODIFYING
     OF ANY PARTITION WILL RESULT IN THE LOSS OF ALL DATA ON THE DISK!).

  7. Add an MSDOS primary partition. (11MB)

  8. Format this partition.

  9. Run a:\setup.exe to install MSDOS on this partition.

  10.
     Boot OS/2.

  11.
     Select Advanced installation.

  12.
     Run FDISK.  (this will eventually popup for you if you run through
     the OS/2 installation)


  13.
     Add 1 primary partition after the MSDOS one.  This will become our
     Windows 95 partition. (349MB)

  14.
     Add the Boot Manager to the next primary partition. (2MB)

  15.
     Add an extended partition.

  16.
     Add a logical drive to the extended partition.  This will become
     the data portion of our MSDOS system. (511MB)

  17.
     Add another logical drive to the extended partition.  This will
     become our OS/2 HPFS (``High Performance File System'') partition.
     (127MB)

  18.
     Add 1 last logical drive to the extended partition using the
     remaining space on the drive.  This will later become 2 partitions
     under Linux -- our swap partition and our native Linux partition.
     But, since OS/2 (and DOS as well) can only write up to 6 partitions
     per drive (3 primary and 3 logical drives housed within 1 extended
     partition), we have to create only one at this time. And we DO have
     to create this partition.  Don't leave this as free space and
     expect Linux to be able to create the two partitions. Due to the
     way that OS/2's FDISK works, where you add your last logical drive
     to the extended partition marks the END of the extended partition.
     You cannot add partitions beyond this point.  So, in other words,
     creating this one last logical drive serves as a space-filler for
     Linux. Later we will delete this partition and add 2 new ones in
     the space that it once took up.

  19.
     Add partitions 1, 2, and 5 to the Boot Manager.

  20.
     Make partition 5 installable.

     Your FDISK screen should now look like this (or something like
     this):


       ______________________________________________________________________

                                      FDISK

       Disk 1
       ___________________________________________________________________________

       Partition Information
       Name            Status          Access          FS Type         MBytes
       ___________________________________________________________________________

       MSDOS           Bootable        C: Primary      FAT              11
       WIN 95          Bootable         : Primary      FAT             350
                       Startable        : Primary      BOOT MANAGER      2
                       None            D: Logical      Unformatted     511
       OS/2            Installable     E: Logical      FAT             127
                       None            F: Logical      Unformatted     219

       ______________________________________________________________________


  21.
     Continue on with the OS/2 installation process.

  22.
     Reboot and select partition 2 (Windows 95) from the Boot Manager.

  23.
     When the missing operating system error pops up, boot your MSDOS
     installation disk.  We selected this partition in order to ``hide''
     the MSDOS partition.  OS/2's Boot Manager is a bit strange. For
     every bootable partition you have (in our case, MSDOS and OS/2),
     you can have only one of them visible at a time. What this means is
     that if you boot into one partition, MSDOS for example, the other
     partition (Win95) is invisible. The MSDOS partition and Win95
     essentially SHARE a drive letter. That's why under ``Access''
     above, MSDOS has drive letter C and Win95 has no drive letter.
     Under the current circumstances, MSDOS is visible with drive letter
     C and Win95 is invisible with no drive letter. If we were to boot
     Win95, the opposite would be true: MSDOS would be invisible with no
     drive letter and Win95 would be visible with drive letter C.  An
     invisible drive cannot be accessed AT ALL.  If you wish to copy
     files between two drives in which only one can be visible at one
     time, you must use a common (non-bootable) drive to swap files.  In
     our case, the DOS/Win95 Data drive (drive D 511MB above) will serve
     as this common drive. You might be asking ``Won't we eventually be
     booting Linux also?''.  The answer is yes, we will. But let's not
     get into that just yet.

  24.
     Install MSDOS to Partition 2 (we'll need this in order to install
     Windows 95).

  25.
     Boot Partition 2.

  26.
     Install Windows 95 to this partition (if you are running the
     upgrade version of Win95, you may need to have your Win3.1
     installation disk 1 ready to insert).

  27.
     Boot Partition 1.

  28.
     Format Partition 4.

  29.
     Restore DOS data from tape (if any) to partitions 1 and 4.

  30.
     Boot the Linux Boot Floppy.

  31.
     Follow up with the Linux Ramdisk (Root) floppy.

  32.
     When you log in as root and get to the # prompt, type ``fdisk'' and
     press enter.

  33.
     Delete the last partition (the one we created in step 18).

  34.
     Add 1 16MB partition and tag it as filesystem type Linux Swap.
     (17MB)

  35.
     Add 1 last partition with the remaining cylinders on the disk and
     tag this as filesystem type Linux native. (198MB)

  36.
     Write the changes to the boot sector and reboot.

  37.
     When you get to the # prompt again, run setup.

  38.
     Install Linux to the last partition.

  39.
     When you install LILO, be sure to install it to the root of the
     last partition (NOT to the MBR, as you will destroy all of your
     previous work in this HOWTO if you do so). Add only the last
     partition to LILO and set the timer to zero. By doing this, when
     you select Linux from the OS/2 Boot Manager, LILO will activate and
     will then boot  Linux from the logical drive on the extended
     partition. Since Linux is the only partition that we wish to
     activate from LILO, we don't need a timer on it (unless you have
     more than one Kernel that you wish to load.  In this case, you may
     want to set the timer to something more than 0 seconds).

  40.
     Activate the Linux swap partition (refer to the Linux Installation
     and Getting Started Manual by Matt Welsh for this).

  41.
     Boot OS/2.

  42.
     Run FDISK.

  43.
     Add Linux to the Boot Manager using the Linux NATIVE partition
     (type 83 not 82!).

     Your FDISK screen should now look like this (or something like
     this):


       ______________________________________________________________________

                                      FDISK

       Disk 1
       ___________________________________________________________________________

       Partition Information
       Name            Status          Access          FS Type         MBytes
       ___________________________________________________________________________

       MSDOS           Bootable        C: Primary      FAT              11
       WIN 95          Bootable         : Primary      FAT             350
                       Startable        : Primary      BOOT MANAGER      2
                       None            D: Logical      FAT             511
       OS/2            Bootable        E: Logical      HPFS            127
                       None             : Logical      Type 82          17
       Linux           Bootable         : Logical      Type 83         198
       ______________________________________________________________________

  ...And you're done!

  Send any comments/suggestions/problems (as a last resort, please!)  to
  me at r3mdh@raex.com.

  Mike Harlan, 11 NOV 1997

  The Linux+FreeBSD mini-HOWTO
  Niels Kristian Bech Jensen nkbj@image.dk
  v1.11, 30 March 2000

  This document describes how to use Linux and FreeBSD on the same sys-
  tem. It introduces FreeBSD and discusses how the two operating systems
  can cooperate, e.g. by sharing swap space. You should probably have
  some experience with Linux or FreeBSD and hard drive partitioning
  (fdisk) before you read this document. The tips herein are tested
  using FreeBSD 2.2.2, but they should be valid for newer versions as
  well. Do not hesitate to mail me if you have comments, questions or
  suggestions about this document. I would also like to hear from people
  who have experience using Linux together with NetBSD or OpenBSD.
  ______________________________________________________________________

  Table of Contents


  1. What is FreeBSD?

  2. The FreeBSD way of labelling hard drives

     2.1 FreeBSD ``slices'' and ``partitions''
     2.2 Drive and partition labelling in Linux and FreeBSD

  3. Sharing swap space between Linux and FreeBSD

     3.1 Installing and preparing Linux
     3.2 Installing FreeBSD
     3.3 Setting up the FreeBSD swap partition in Linux

  4. Booting FreeBSD using LILO

  5. Mounting filesystems

     5.1 Mounting UFS filesystems under Linux
     5.2 Mounting ext2fs filesystems under FreeBSD

  6. Running foreign binaries

     6.1 Running FreeBSD binaries under Linux
     6.2 Running Linux binaries under FreeBSD

  7. Information resources

  8. Credits and legal stuff

     8.1 Legal stuff


  ______________________________________________________________________

  1.  What is FreeBSD?

  FreeBSD <http://www.freebsd.org/> is a free Unix-like operating system
  much like Linux. The main difference is that, while the Linux kernel
  has been written from scratch, FreeBSD is based on the freely
  redistributable parts of 4.4BSD (Berkeley Software Distribution) known
  as 4.4BSD-lite. This fact might lead some people to suggest that
  FreeBSD is closer to being ``real'' UNIX(R) than Linux. FreeBSD runs
  only on the Intel PC platform (i386 and higher); ports to the DEC
  Alpha and Sun Sparc platforms are being worked on at the moment.
  NetBSD <http://www.netbsd.org/> and OpenBSD <http://www.openbsd.org/>
  are similar to FreeBSD, and both run on several platforms. Hardware
  requirements for all these *BSD systems are similar to those for
  Linux.
  The development of FreeBSD is managed in a different way than the
  Linux development. A core team of developers serve as arbitrators and
  provide leadership for the project. Big changes are discussed in
  advance on the mailing lists. The FreeBSD project has two development
  trees (just like Linux): ``-CURRENT'' and ``-STABLE''. The
  ``-CURRENT'' development tree is where the development of new features
  happens. Development to the ``-STABLE'' tree are restricted to bug
  fixes and some thoroughly tested new features.

  FreeBSD can be used and (re-)distributed freely just as Linux. Most
  parts of the system are released under the BSD copyright; the rest is
  under the GNU GPL or other open-source <http://www.opensource.org/>
  licences.


  2.  The FreeBSD way of labelling hard drives

  Linux and FreeBSD label hard drives and partitions after two
  differents schemes. This section explains the main differences between
  the two schemes.  In fact the FreeBSD labelling scheme is an adaption
  of the traditional BSD labelling style ported to live within the PC's
  fdisk partitions. Thus it is very similar to other BSD-based Unix
  systems such as NetBSD, OpenBSD, Ultrix, Digital Unix, SunOS, and
  Solaris.


  2.1.  FreeBSD ``slices'' and ``partitions''

  FreeBSD needs one of the four entries in the partition table on your
  PC's hard drive. This primary partition is called a ``slice'' in
  FreeBSD terminology. It then uses the disklabel program to make up to
  eight partitions in this primary partition. These logical partitions
  are called ``partitions'' in FreeBSD terminology. This concept is
  similar to the way Linux (and DOS) handles logical partitions in an
  extended partition. You cannot install FreeBSD in an extended
  partition made by Linux (or DOS). Note that the Linux fdisk program
  doesn't display the BSD partitions in a FreeBSD slice from the main
  menu, but it can display BSD disklabel information if you give the
  command `b'. The output is something like this (/dev/hda4 is the
  FreeBSD slice):



  bash# fdisk /dev/hda

  Command (m for help): p

  Disk /dev/hda: 64 heads, 63 sectors, 621 cylinders
  Units = cylinders of 4032 * 512 bytes

     Device Boot   Begin    Start      End   Blocks   Id  System
  /dev/hda1   *        1        1       27    54400+  83  Linux native
  /dev/hda2           28       28       55    56448   83  Linux native
  /dev/hda3           56       56      403   701568   83  Linux native
  /dev/hda4          404      404      621   439488   a5  BSD/386

  Command (m for help): b
  Reading disklabel of /dev/hda4 at sector 1624897.

  BSD disklabel command (m for help): p

  8 partitions:
  #        size   offset    fstype   [fsize bsize   cpg]
    a:    64512  1624896    4.2BSD        0     0     0   # (Cyl.  404 - 419)
    b:   104832  1689408      swap                        # (Cyl.  420 - 445)
    c:   878976  1624896    unused        0     0         # (Cyl.  404 - 621)
    e:    64512  1794240    4.2BSD        0     0     0   # (Cyl.  446 - 461)
    f:   645120  1858752    4.2BSD        0     0     0   # (Cyl.  462 - 621)

  BSD disklabel command (m for help): q
  bash#



  The letters `a'...`f' in the first column are the same labels as shown
  below in the example for a FreeBSD slice. There are three special
  partitions in BSD parlace. The letter `a' designates the root
  partition, `b' designates the swap partition, while `c' designates the
  whole slice. See the FreeBSD documentation for more information on the
  ``standard'' way of assigning these letters to different partition
  types.


  2.2.  Drive and partition labelling in Linux and FreeBSD

  The hard drives are labelled in the following way in Linux and
  FreeBSD:

                          Linux           FreeBSD
  First IDE drive         /dev/hda        /dev/wd0
  Second IDE drive        /dev/hdb        /dev/wd1
  First SCSI drive        /dev/sda        /dev/sd0
  Second SCSI drive       /dev/sdb        /dev/sd1



  The partitions (FreeBSD slices) on an IDE drive are labelled in the
  following way (/dev/hda is used as an example):

                                  Linux           FreeBSD
  First primary partition         /dev/hda1       /dev/wd0s1
  Second primary partition        /dev/hda2       /dev/wd0s2
  Third primary partition         /dev/hda3       /dev/wd0s3
  Fourth primary partition        /dev/hda4       /dev/wd0s4



  The partitions in my FreeBSD slice is labelled in the following way.
  It is the labelling you get by default. It is possible to change the
  labelling if you do a custom installation of FreeBSD (/dev/hda4 is the
  FreeBSD slice in the example):

  Linux label     FreeBSD label   FreeBSD mount point
  /dev/hda5       /dev/wd0s4a     /
  /dev/hda6       /dev/wd0s4b     swap
  /dev/hda7       /dev/wd0s4e     /var
  /dev/hda8       /dev/wd0s4f     /usr



  If you run dmesg in Linux you will see this as (The linux kernel must
  be build with UFS filesystem support for this to work. See section
  ``Installing and preparing Linux''):

  Partition check:
   hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >



  If you have installed FreeBSD in the /dev/sd1s3 slice (/dev/sdb3 in
  Linux parlace), and /dev/sdb2 is a Linux extended partition containing
  two logical partitions (/dev/sdb5 and /dev/sdb6), the previous example
  would look like this:

  Linux label     FreeBSD label   FreeBSD mount point
  /dev/sdb7       /dev/sd1s3a     /
  /dev/sdb8       /dev/sd1s3b     swap
  /dev/sdb9       /dev/sd1s3e     /var
  /dev/sdb10      /dev/sd1s3f     /usr



  This will be shown as

  Partition check:
   sdb: sdb1 sdb2 < sdb5 sdb6 > sdb3 < sdb7 sdb8 sdb9 sdb10 >


  in the output from dmesg.

  If you have a Linux extended partition after your FreeBSD slice you're
  in for trouble, because most Linux kernels installation floppies are
  build without UFS support, they will not recognise the FreeBSD
  partitions inside the slice. What should have have been seen as
  (/dev/hda3 is the FreeBSD slice and /dev/hda4 is the Linux extended
  partition)

  Partition check:
   hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 > hda4 < hda9 hda10 >


  is seen as:

  Partition check:
   hda: hda1 hda2 hda3 hda4 < hda5 hda6 >



  This can give you the wrong device assignment and cause the loss of
  data. My advice is to always put your FreeBSD slice after any Linux
  extended partitions, and do not change any logical partitions in your
  Linux extended partitions after installing FreeBSD!



  3.  Sharing swap space between Linux and FreeBSD

  This section describes how I got Linux and FreeBSD to share a swap
  partition.  There may be other ways to get the same result. You can
  install FreeBSD before Linux if you want to, just pay attention to the
  order of the partitions in the FreeBSD slice.


  3.1.  Installing and preparing Linux

  The first step is to install Linux as normal. You have to leave space
  for the FreeBSD slice at your hard drive. You don't have to make a
  Linux swap partition, but if you want one, put it in the space you
  want to allocate for FreeBSD. That way you can delete the Linux swap
  partition later and use the space for FreeBSD.

  When you have installed Linux you have to build a new kernel. Read The
  Linux Kernel HOWTO if this is new to you. You have to include both UFS
  filesystem support (read only) and BSD disklabel (FreeBSD partition
  tables) support:

  UFS filesystem support (read only) (CONFIG_UFS_FS) [N/y/m/?] y
  BSD disklabel (FreeBSD partition tables) support (CONFIG_BSD_DISKLABEL) [N/y/?]
  (NEW) y



  Install the new kernel and reboot. Remove any line including the word
  swap from your /etc/fstab file if you have made a Linux swap
  partition.  Make sure you have a working Linux boot floppy with the
  new kernel. Now you are ready to install FreeBSD.


  3.2.  Installing FreeBSD

  Install FreeBSD as described in the FreeBSD documentation. Remove the
  Linux swap partition if you have made one (you can use the FreeBSD
  fdisk program.) Pay attention to the order of the partitions in the
  FreeBSD slice. If you use the default labelling the second partition
  will be the swap partition. Complete the installation of FreeBSD and
  reboot into Linux using the new Linux boot floppy.


  3.3.  Setting up the FreeBSD swap partition in Linux

  Run dmesg when you have booted into Linux. In the output you should
  see something like this:

  Partition check:
   hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >



  This means that /dev/hda4 is your FreeBSD slice, while /dev/hda5,
  /dev/hda6, /dev/hda7 and /dev/hda8 are the FreeBSD partitions. If your
  swap partition is the second partition in the slice, it will be
  /dev/hda6.

  You have to put the following line into your Linux /etc/fstab file to
  enable the swap partition:

  /dev/hda6       none            swap            sw              0       0



  While FreeBSD can use any type of partition as swap space, Linux needs
  a special signature in the swap partition. This signature is made by
  mkswap.  FreeBSD ruins this signature when it uses the shared swap
  partition, so you will have to run mkswap each time you boot into
  Linux. To do this automagically you have to find the script that runs
  swapon at boot time.  In Red Hat Linux it is /etc/rc.d/rc.sysinit. Put
  the following line into that file just before swapon -a:

  awk -- '/swap/ && ($1 !~ /#/) { system("mkswap "$1"") }' /etc/fstab



  This will run mkswap on any swap partitions in /etc/fstab every time
  you boot except if they are commented out (having ``#'' as the first
  character in the line.)

  Run free to check out the size of the swap space when you have
  rebooted into Linux. You should also reboot into FreeBSD to make sure
  everything works as expected. If it does not, you have probably used
  the wrong partition as swap partition. The only solution to that
  problem is to reinstall FreeBSD and try again. Experience is a great
  teacher. :-)


  4.  Booting FreeBSD using LILO

  You can easily boot FreeBSD with LILO. Do not install the FreeBSD boot
  selector (Booteasy) if you want to use LILO. Append the following
  lines to your /etc/lilo.conf file and run lilo (assuming the FreeBSD
  slice is /dev/hda4):

  other=/dev/hda4
          table=/dev/hda
          label=FreeBSD



  If you have installed FreeBSD on the second SCSI drive, use something
  like this (the FreeBSD slice being /dev/sdb2):

  other=/dev/sdb2
          table=/dev/sdb
          loader=/boot/chain.b
          label=FreeBSD



  5.  Mounting filesystems

  5.1.  Mounting UFS filesystems under Linux

  Unfortunately the UFS driver in the Linux 2.0.xx kernels do not
  include support for FreeBSD. When you try to mount a FreeBSD
  filesystem, you just get some error messages (the filesystem actually
  gets mounted, but you cannot do anything with it.) This problem has
  been solved in the newer Linux kernels (version 2.1.87 and higher.)

  There is another version of the UFS driver for Linux 2.0.xx kernels
  (xx <= 30) on metalab.unc.edu (the former sunsite.unc.edu)
  <ftp://metalab.unc.edu/pub/Linux/ALPHA/ufs/>. It is called U2FS and
  the current version is u2fs-0.4.3.tar.gz. A version of U2FS
  (ufs-0.4.4.tar.gz) for Linux 2.0.31 and higher (2.0.xx; not 2.1.xx)
  can be found at this site <http://www.mathi.uni-
  heidelberg.de/~flight/projects/u2fs/> along with further information
  about U2FS (and UFS.)
  Now you have to build a new kernel with support for the U2FS
  filesystem and BSD disklabels. See section ``Installing and preparing
  Linux'' for more information on this. You can leave out UFS filesystem
  support from the kernel when you use U2FS.

  When you have installed the new kernel, you can mount your UFS
  filesystems (all the partitions in the FreeBSD slice except the swap
  partition) with a command like this:

  mount -t u2fs /dev/hda8 /mnt



  You should use a command like

  mount -t ufs /dev/hda8 /mnt


  if you use a Linux kernel version 2.1.87 or higher. From Linux kernel
  version 2.1.112 you must add -o ufstype=44bsd to the command like
  this:

  mount -t ufs -o ufstype=44bsd /dev/hda8 /mnt



  The UFS (and U2FS) driver is read-only. That is; you can read from the
  UFS filesystems but you cannot write to them. An experimental read-
  write UFS driver has replaced the read-only driver in Linux kernels
  version 2.1.112 and higher; writing to FreeBSD partitions is supported
  from version 2.1.127.


  5.2.  Mounting ext2fs filesystems under FreeBSD

  To mount ext2fs filesystems under FreeBSD, you first have to build a
  new kernel with ext2fs support. Read the FreeBSD handbook
  <http://www.freebsd.org/handbook/> to learn how to do that. Put the
  line

  options         "EXT2FS"


  in your kernel configuration file for the new kernel.

  When you have booted with the new kernel, you can mount an ext2fs
  filesystem by giving a command like:

  mount -t ext2fs /dev/wd0s3 /mnt



  Due to a bug in FreeBSD 2.2.8 and earlier you will have to unmount all
  ext2fs filesystems before you shut down FreeBSD if you are using these
  any of these versions. If you shut down FreeBSD with an ext2fs
  filesystem mounted, FreeBSD cannot sync the UFS filesystems. This
  results in fsck being run the next time FreeBSD is booted. You can
  work around this bug by putting the line:

  umount -a -t ext2fs


  in the /etc/rc.shutdown file. The bug has been fixed in FreeBSD 3.x.



  6.  Running foreign binaries

  6.1.  Running FreeBSD binaries under Linux

  The iBCS package has support for running FreeBSD binaries under Linux;
  but it's old and unmaintained. I cannot get it to work. Please let me
  know if you have had better luck with this.


  6.2.  Running Linux binaries under FreeBSD

  FreeBSD has the ability to run Linux binaries, both in a.out and ELF
  formats.  To do this you have to take the following three steps:


  1. You have to enable Linux compatibility. To do this (in FreeBSD
     2.2.2 --- details may vary in other versions) you have to edit your
     /etc/rc.conf file and change

     linux_enable="NO"


  to

  linux_enable="YES"


  and reboot. Another way to load the Linux binary support is to execute
  the command /usr/bin/linux. This way you don't have to reboot, and you
  don't always have the Linux binary support loaded (i.e. you save mem-
  ory.)  Remember to add the line

  options         COMPAT_LINUX


  to the FreeBSD kernel config file if you build a new FreeBSD kernel.

  2. You have to install the Linux shared libraries if your Linux
     binaries are dynamically linked. The libraries are included in
     FreeBSD 2.2.{2,5,6} as the package linux_lib-2.4.tgz (newer
     versions might be available.)  Run the following command to install
     the package:

     pkg_add <path_to_package>/linux_lib-2.4.tgz


  <path_to_package> is the directory where the package is stored. You
  may also load it off the net by:

  pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/packages-stable/All/linux_lib-2.4.tgz


  or by re-running /stand/sysinstall. Enter ``Configure'', ``Packages''
  and use the menus. You should execute the following command if you are
  running statically linked Linux binaries:

  brandelf -t Linux <name_of_statically_linked_linux_binary>



  3. Install the Linux program(s) you want to run. The program(s) can be
     installed on either UFS or ext2fs filesystems. See section
     ``Mounting ext2fs filesystems under FreeBSD'' for more information
     about using ext2fs filesystems under FreeBSD.


  I have successfully run the Linux versions of Applixware 4.3 and
  Netscape 3.01 (both ELF format) under FreeBSD 2.2.2 using this method
  (yes, I know there is a native FreeBSD version of Netscape 4.) The
  Linux versions of acroread and StarOffice 3 and 4 also work well under
  FreeBSD. StarOffice 5 depends on native Linux threads and currently do
  not work under FreeBSD.  Read the FreeBSD documentation for more
  information on this topic.


  7.  Information resources

  The latest version of this mini-HOWTO can be downloaded from this site
  <http://www.image.dk/~nkbj/> in several formats (including SGML and
  PostScript.) The document has been translated into Japanese by Mr.
  Teruyoshi Fujiwara as part of the JF project
  <ftp://jf.linux.or.jp/pub/JF/other-formats/>.

  You can find some articles about the difference between Linux and
  FreeBSD here
  <http://www.futuresouth.com/~fullermd/freebsd/bsdvlin.html>.

  You can find more informations about FreeBSD (and download the whole
  system) at this site <http://www.freebsd.org/>. You can also buy the
  system on CDROMs from Walnut Creek CDROM <http://www.cdrom.com> (their
  servers are running FreeBSD.)

  The Linux Kernel HOWTO (and this mini-HOWTO) is released as part of
  The Linux Documentation Project <http://www.linuxdoc.org/>.


  8.  Credits and legal stuff

  Thanks to the members of the *BSD user group in Denmark
  <http://www.bsd-dk.dk/> for answering the questions of a FreeBSD
  newbie, to Mr. Takeshi Okazaki for bringing the existence of U2FS to
  my attention, and to Mr. David O'Brien for valuable suggestions.


  8.1.  Legal stuff

  Trademarks are owned by their owners.

  Although the information given in this document is believed to be
  correct, the author will accept no liability for the content of this
  document. Use the tips and examples given herein at your own risk.

  Copyright (C) 1997-2000 by Niels Kristian Bech Jensen. This document
  may be distributed only subject to the terms and conditions set forth
  in the LDP License at http://www.linuxdoc.org/COPYRIGHT.html
  <http://www.linuxdoc.org/COPYRIGHT.html>.



  NT OS Loader + Linux mini-HOWTO
  Bernd Reichert, <reichert@dial.eunet.ch>
  v1.11, 2 September 1997

  1.  Abstract

  This document describes the use of the Windows NT boot loader to start
  Linux.  This procedures have been tested with Windows NT 4.0 WS and
  Linux 2.0.


  2.  How does the NT OS Loader work

  The NT OS loader likes to have the boot sector from the other
  operating systems available as a file. It reads this file and starts
  the operating system selected, i.e. either Windows NT in different
  Modes or any other OS.


  3.  Tips on how to install Windows NT and Linux on the same System

  3.1.  Windows NT installation

  Try to install Windows NT first. If you want to use NTFS for your
  Windows NT-partition, keep in mind, that the todays production version
  of Linux cannot access NTFS partitions.  An alpha driver that can read
  NTFS-Partitions is available at http://www.informatik.hu-
  berlin.de/~loewis/ntfs.  You may create a separate FAT-Partition for
  data exchange or you have to use DOS-formatted floppies.


  3.2.  Partitioning

  Another Mini-howto recommends not to use NTs "Disk Administartor" to
  create the Linux swap- and root-partitions. It is sufficient to see
  the free space there. I also recommend to use linux's fdisk later.


  3.3.  Linux installation

  Now boot linux from diskettes, create the swap and root-partition.
  Fdisk assumes the ntfs-partition to be a HPFS-partition.  This is
  normal.  Boot again from diskettes and install Linux as you like.


  Just in case the installation procedure suggests that you could mount
  the HPFS partition which it has found: Ignore it.


  3.4.  Lilo

  When you come to the Lilo-Section, specify your Linux-root-partition
  as your boot device because the Master Boot Record (MBR) of your
  harddisk is owned by Windows NT. This means that the root-entry and
  the boot-entry in your /etc/lilo.conf have the same value.  If you
  have a IDE-harddisk and your Linux-partition is the second partition,
  your boot-entry in /etc/lilo.conf looks like:



       boot=/dev/hda2



  If you have two disks and your Linux resides on the first partition of
  your second disk, your boot-entry in /etc/lilo.conf looks like:



       boot=/dev/hdb1



  Run lilo with a kernel that matches your system.  Check the kernel by
  booting from diskette first if you are not sure.


  If you cannot boot Windows NT now, you have a problem.  I hope you
  have created a repair-disk recently.



  4.  Bootpart

  There is a NT-programm called bootpart written by G. Vollant that can
  do the jobs from the next two points for you. Bootpart is available at
  http://ourworld.compuserve.com/homepages/gvollant/bootpart.htm.


  If you want to know how things are working together, use the
  procedures described in point 5 and 6.



  5.  The Linux part of the work

  You have to boot from diskettes until the NT-part is fixed.


  Now you have to peel the bootsector from your Linux-root-Partition.
  With /dev/hda2 as your linux-partition, the dd-command is:



       # dd if=/dev/hda2 of=/bootsect.lnx bs=512 count=1



  There is something wrong if your bootsect.lnx has more than 512 bytes.

  Now copy the file bootsect.lnx to a DOS-formated floppy if this is
  your way to transfer files to the NTFS-Windows-partition.

  You can copy it with



       # mcopy /bootsect.lnx a:



  or with



  # mount -t msdos /dev/fd0 /mnt
  # copy /bootsect.lnx /mnt
  # umount /mnt



  6.  The Windows NT part of the work

  Copy the file from the diskette to C:\\bootsect.lnx. I don't tell you
  how to do that.

  What lilo.conf is for linux is c:\\boot.ini for Windows NT.  Remove
  the, system- and the read-only-attribute before you can modify it
  with:



       C:\attrib -s -r c:\boot.ini



  Now change the file boot.ini with an editor, notepad for example, as
  follows:



       [boot loader]
       timeout=30
       default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
       [operating systems]
       multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
       multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
       C:\BOOTSECT.LNX="Linux"



  Only the last line has been added in this example.  Restore the
  attributes after you have saved boot.ini with:



       C:\attrib +s +r c:\boot.ini



  After a shutdown of your Windows NT and a restart your should see the
  following:



    OS Loader V4.00

    Please select the operating system to start:

    Windows NT Workstation Version 4.0
    Windows NT Workstation Version 4.0 [VGA mode]
    Linux

  Select Linux and see

    LILO loading zImage ....



  7.  Play it again Sam

  A new copy of bootsect.lnx must be transfererd to C:\BOOTSECT.LNX evry
  time the bootsector of your linux-partition has been modified.  This
  happens for example when you install a new kernel with lilo.  As you
  can see such a system in not ideal for testing experimental kernels.



  8.  Troubleshooting

  If things do not work as expected, check bootability with a floppy
  disk.  With /dev/hdb1 as your Linux-partition, your /etc/lilo.conf has
  the following entries:



       root=/dev/hdb1
       boot=/dev/fd0



  Run lilo with a diskette inserted. Now try to boot from the diskette.
  If your Linux on /dev/hdb1 can't be started, the NT OS loader will
  also fail to start it.  If you see a lot of 01 01 01 01, your root-
  disk is not accessible.  Check whether all your disks are known by the
  bios.


  If the floppy boots your Linux partition, you can peel of your boot-
  sector for the NT OS loader with:



       # dd if=/dev/fd0 of=/bootsect.lnx bs=512 count=1



  You can keep this diskette as your rescue-diskette just in case your
  Windows NT installation breaks.



  9.  References


    The Linux+WindowsNT mini-HOWTO

    The FAQ for FreeBSD 2.X


  10.  Acknowledgements


    Thanks to Xiaoming Yi <z3c20@ttacs.ttu.edu> for the tip that the
     procedures work also with other disks than the first one.

    Thanks to Frank Dennler <Frank.Dennler@zkb.ch> for the diskette-
     trick.


  11.  Feedback

  Any comments are welcome.



  Linux+Solaris HOWTO
  Max Berger <mailto:max.berger@xslt.de>

  v0.8-$Revision: 1.1 $, $Date: 2000/04/17 23:48:03 $

  Describes how to use Linux (x86) and Solaris (x86) together on one
  machine

  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Why Solaris?
     1.2 Things covered in this HOWTO
     1.3 Referenced versions
     1.4 Warning

  2. Preparing your Hard Drive

     2.1 Traditional PC partitions
     2.2 Solaris partition labels
     2.3 Hard disk space
     2.4 Quick check list

  3. Preparing Linux

     3.1 Building a new kernel
     3.2 Preparing your boot loader

  4. Installing Solaris

     4.1 Solaris interactive
     4.2 Web-Start
     4.3 Getting GNU-tools

  5. Boot managing

     5.1 Using the Solaris boot manager
     5.2 Using lilo
     5.3 Using grub

  6. Sharing data

     6.1 Using a shared partition
     6.2 Alternative ways

  7. Running foreign binaries

     7.1 Linux binaries on Solaris
     7.2 Solaris binaries on Linux

  8. Finding additional info

  9. Credits and legal stuff

     9.1 Credits
     9.2 Questions, comments, suggestions
     9.3 License


  ______________________________________________________________________


  1.  Introduction

  1.1.  Why Solaris?

  This is actually a good question. Why use Solaris, when you can have
  Linux?  Solaris is a commercial system, the hardware support is
  scarce. But if you are reading this you have probably already decided
  on using Solaris. If not, here are some reasons:

    I have a part-time job administrating Solaris machines. It is of no
     use that I learning all the neat command parameters and nifty Linux
     tricks at home, when I can't use them on my Solaris-Box.

    Sun was giving away Solaris for what they call ``Shipping and
     handling cost only'' for some time. They might do that again. And
     almost-free-of-charge is always a good deal.

    Another reason might be that you like CDE.

  1.2.  Things covered in this HOWTO

  This HOWTO tries to help you install Solaris 7 or 8 on an x86 computer
  already running Linux. The main targets are

    not to destroy any data, see section ``Preparing your Harddrive''

    To make Linux and Solaris coexist (boot manager), see section
     ``Boot-Managing''

    To share data between Linux and Solaris, as described in section
     ``Sharing Data''

  1.3.  Referenced versions

  The reference versions used while creating this document where:

    Solaris 7 x86 (= Solaris 2.7 / SunOS 5.7)

    Solaris 8 x86 (= Solaris 2.8 / SunOS 5.8)

    Linux 2.2.14, 2.3.99-pre3

    fdisk v2.10f

     The information might apply to other versions of the software, or
     it might all be different.

  1.4.  Warning

  Please back up any data before messing with your system!  A lot of the
  things described in this document may result in excessive data loss!
  I am not responsible for any data loss! See also section ``Legal
  stuff''

  2.  Preparing your Hard Drive

  To Prepare your hard-drive for Solaris, you need to know about
  standard PC partition tables and about Solaris disk slices. In this
  HOWTO I talk about single-disk systems only, but all the information
  should also apply to a multi-disk environment.

  2.1.  Traditional PC partitions

  The standard partition-table has only 4 entries. The entries important
  for us are the following:

     A Primary Partition
        Takes up one entry, and contains exactly one partition. A waste
        of resources, but the only partition you can boot from!

     An extended Partition
        Takes up one entry, but can contain multiple DOS, Linux, and
        other partitions

     A Solaris Partition
        Takes up one entry, but can contain multiple Solaris Partitions

  To find out what partitions are present on your system, use the fdisk
  program. Partitions numbers 1 to 4 (hda1..4, sda1..4, ...) are the
  ones in your partition table.

  2.2.  Solaris partition labels

  Solaris has its own partitioning scheme. It uses one entry in the
  partition table, and this entry is and acts as this partition would be
  the entire disk.

  This virtual disk is then divided in up to 8 slices. The third slice,
  s2, covers the whole virtual disk, so you actually have up to 7 slices
  for Solaris.

  Unfortunately, the Solaris partition entry has the same type as a
  Linux Swap partition (82). Therefore, you should not have any Linux
  swap partitions as primary partitions. Linux doesn't care about this,
  but who knows what Solaris does?

  Although the Linux fdisk program has some ``Sun disklabel'' support,
  this doesn't seem to help any.

  2.3.  Hard disk space

  Of course, Solaris needs disk space. The minimum installation of
  Solaris 8 is about 300 MB. For the normal tools its about 700 MB, and
  for a ``developer-system'' about 1 GB.

  But this is only the space required for the base installation. You
  might want to add a lot of GNU-Tools, and other stuff. And if you want
  to share data between Solaris and Linux, this has to happen on the
  Solaris partitions.

  You might even think of sharing your home directories between Solaris
  and Linux. As the time of this writing: Forget it! I messed up my home
  directory doing so and I was very happy about my backup. See also
  section ``sharing data''

  2.4.  Quick check list

  Here's the quick check list. Make sure you:

    have used no more than 3 entries in your partition table

    have no Linux swap partitions as primary partitions

    Have at least 1 Linux ext2 partition as primary

    Have at least 1 GB unpartitioned space

  3.  Preparing Linux



  3.1.  Building a new kernel

  Some people dont like building a custom kernel. For those of you: you
  must build your own kernel if you want to share data between Solaris
  and Linux on one hard disk. If, however, you do not want to share
  data, you are safe with your old kernel.

  Here are your kernel options for ``Solaris compatibility'':

    Under code maturity:

     Prompt for development drivers
        Unfortunately UFS writing is still experimental.

    In file systems:

     UFS file system support
        UFS is the Solaris file system

     UFS file system
        write support" The only way to pass data to Solaris

     partition types / Solaris
        (x86) partition table support" Is needed for the slices within
        your Solaris partition to be found.

     Additional info about kernel building can be found in the Kernel-
     HOWTO

  3.2.  Preparing your boot loader

  Before messing with your boot loader, please make sure that you have
  an emergency disk ready which enables you to boot your old system.

  Unfortunately the Solaris install overwrites the master boot record
  (MBR) and overwrites your old boot manager.

  Fortunately, the Solaris boot manager is able to chain-boot. For this
  to work you have to put your old boot loader (e.g. lilo) into the boot
  sector of one primary Linux partition.

  For lilo this means: look at your /etc/lilo.conf. Look for the boot=
  line. If it is something like boot=/dev/hda1 everything is fine. But
  if its something like boot=/dev/hda it points to the MBR. Please
  change it to point to a primary Linux partition (e.g. boot=/dev/hda1)

  A way to check if your boot-loader is chain-loadable is installing
  lilo in to the MBR and trying to chain load your other boot-manager. I
  used the following file called lilo.conf.mbr for this:

  ______________________________________________________________________
  #lilo.conf.mbr
  #Lilo in Master Boot Record doing nothing but chain-loading another lilo
  boot=/dev/hda
  root=/dev/hda5
  install=/boot/boot.b
  map=/boot/map
  vga=ask
  delay=50
  other=/dev/hda1
  label=lilochain
  ______________________________________________________________________


  You can then run lilo -C lilo.conf.mbr to install lilo into your MBR.
  And dont forget to run lilo to have lilo in the boot sector of your
  hard-drive.

  If you reboot now, you should have a lilo-prompt. When you select
  other this chain loads the old lilo, which in turn loads Linux.

  4.  Installing Solaris

  4.1.  Solaris interactive


     Solaris 7
        Solaris Interactive is on the first CD. Boot it, select Solaris
        interactive

     Solaris 8
        On the Solaris 8 CDs the interactive installer is on the first
        software CD. You don't need the install CD at all.

  The Solaris installation itself is quite straight forward. One thing
  that might be confusing is the partitioning. Solaris will automati
  cally use all the free space on your hard disk, and create it's own
  virtual disk in it. And when it comes to slicing up your virtual disk,
  dont forget to add space for Solaris/Linux exchange. A good place for
  this is an extra /export/share partition.

  Please Note: If you abort during the Solaris installation, the MBR of
  your hard disk may already be overwritten and you may not be able to
  boot from the hard disk at all.

  4.2.  Web-Start

  I couldn't get Web-Start to work at all. Please mail me if you have
  any experience using it.

  However, once Solaris was installed, I had no problems adding web-
  start-packages

  4.3.  Getting GNU-tools

  Solaris standard installation doesn't even have a less command. Some
  people recommend getting the Redhat Package Manager (RPM) for Solaris,
  but the standard packaging tool will usually do it. You can find many
  nice packages at http://www.sunfreeware.com The standard packages can
  be used with pkgadd <package>, and the web-start packages with
  java <packagewithoutclassextension>

  5.  Boot managing

  5.1.  Using the Solaris boot manager

  When booting, the Solaris boot manager gives you all 4 primary
  partitions for choosing which to boot from. If you had your boot
  loader installed on the boot sector of a primary partition, everything
  should be fine. Just boot from this partition, and Linux should come
  up.

  5.2.  Using lilo

  Now you have lilo as a secondary boot loader, but you want it to be
  your primary boot loader again? No Problem. Lilo can easily chain boot
  Solaris. Just add the appropriate other= lines to your lilo.conf

  For testing, you should add the Solaris chain loading to the lilo in
  your boot sector first. Then try chain loading lilo, Solaris, lilo,
  Solaris, ... until you have enough of it. If this works, you should be
  able to put lilo back into the MBR again.
  However, Solaris might have messed up your partition table. This has
  happened on my system after installation of Solaris 8. Lilo doesn't
  like the new partition, nor does fdisk. I had no problems with
  Solaris 7

  5.3.  Using grub

  Unfortunately, I have no experience with grub booting Solaris. If you
  do, please mail me!

  6.  Sharing data

  6.1.  Using a shared partition

  If you have build your kernel with Sun disk label support and UFS
  support as mentioned in section ``building your new kernel'', you are
  now able to mount your Solaris partitions. During boot up, you should
  get something similar to:

    hda: [PTBL] [523/255/63] hda1 hda2 < hda5 hda6 hda7 hda8 > hda3 <Polaris: [s0]
    hda9 [s1] hda10 [s2] hda11 [s3] hda12 [s6] hda13 [s7] hda14 >


  Meaning (in this case): partition 3 (hda3) is a Solaris partition with
  6 slices (s0,s1,s2,s3,s6,s7). They are mapped to Linux devices hda9 to
  hda14.

  Try mounting your Solaris partitions. When mounting UFS partitions,
  you always have to add an -oufstype= argument, in this case
  -oufstype=sunx86. So the command to mount a partition is something
  like:

    mount -oufstype=sunx86 /dev/hda14 /mnt


  Now, test your partition. Please note: The write support on UFS parti
  tions is very experimental. Please don't trust any data you write on
  your UFS partitions!

  If you want your Solaris partitions automatically mounted at boot
  time, you can add a line like

    /dev/hda14 /solaris ufs ufstype=sunx86 0 0


  to your /etc/fstab

  6.2.  Alternative ways

  And, of course there are always other ways of sharing data:

     Floppy disk
        I don't know which floppy disk file systems are supported by
        Solaris. Do you? Mail me.

     Network
        Solaris knows NFS. Linux knows NFS. This might actually be the
        best way of sharing data

  7.  Running foreign binaries

  7.1.  Linux binaries on Solaris

  Is supposed to work using a program called ``lxrun''. I haven't got
  around to testing it yet. See the Solaris web site for more
  information.
  7.2.  Solaris binaries on Linux

  Are as far as I know unsupported

  H.  Finding additional info

  Here are some URI that might help you:

    Sun Freeware <http://www.sunfreeware.com>
     My first stop for Solaris resources. Has many GNU-tools in binary
     format ready to install.

    Sun Microsystems <http://www.sun.com>

     Suns official web page

    Solaris Homepage <http://www.sun.com/Solaris>

    Solaris Hardware Compatibility List (HCL)
     <http://soldc.sun.com/support/drivers/hcl/index.html>

    Solaris Online Documentation <http://docs.sun.com>

    My Website <http://www.xslt.de>
     You will always find the newest version of this document somewhere
     on this page

  I.  Credits and legal stuff

  I.1.  Credits

  Thanks to Marcel Meyer for beta testing this HOWTO while installing
  Solaris on his machine

  I.2.  Questions, comments, suggestions

  Are always welcome. You can reach me via e-mail at max.berger@xslt.de

  I.3.  License

  This document is copyrighted  by Max Berger. You may use and/or
  modify it according to the Linux Documentation Project License (LDPL)
  found at http://www.linuxdoc.org/COPYRIGHT.html.

  According to the license you don't have to tell me, but I'd very much
  like to know when you modify and/or republish this document.

  Although the information given in this document is believed to be
  correct, the author will accept no liability for the content of this
  document. Use the tips and examples given herein at your own risk.






   Authored 11/95 by Jonathan Katz. Fixed/revised April 10, 1996, not to
   mention slightly updated June 25, 1996 and "completed" October 26,
   1996, all by Jonathan Katz, jkatz@in.net

   _1 Introduction_

   Many people have recently bought new machines, which (unfortunatly)
   come pre-loaded with Windows 95. After exploring the Internet, many
   users find the likes of Linux, and want to run a better OS at a much
   better price. There are many different issues to address, because new
   computers usually come with large EIDE hard drives, and Windows 95 has
   extentions on the old FAT filesystem. Linux understands these issues
   and can handle these challenges in hardware and software.

   _2 Let's get Ready to Rumble!_

   Linux and Windows 95 can get along quite well on the same hard disk.
   You can also install Linux onto a separate hard disk on the same
   machine. If you have the money to spare to get a second hard disk, go
   ahead and do that. Although it is safe and reliable to run Windows 95
   and Linux on the same hard disk, it is safer to have a second disk.
   But, since I am a poor student, (and so are most of the people I know)
   we are stuck with one large disk.

   I assume your hard disk looks like this:

        +---------------------------------
C:      |  800M or so, maybe bigger?
        |
        +---------------------------------



   and Windows 95 and MS-Office and Qmodem Pro, and whatever DOS/Windows
   software you have only takes up around 400M + Swap (this is a big,
   sarcastic assumption)! I take it you don't want to lose all this
   software you've spent a lot of time configuring and installing, so you
   don't want to delete this partition and restart all over again.

   _3 Ok, I have this partition I want to spare!_

   Don't lose hope. There is a program called FIPS, which can
   re-partition your Hard Disk without destroying data. HOWEVER, make
   sure before you use it, you defrag your hard disk (with the optimum
   defrag method). Use the defrag that came with Win95 and use it in the
   GUI-- otherwise you will loose your long file names. After you are all
   defraged, run FIPS and make your disk look something like the
   following:


        +-------------------------------------
C:      | This is your FAT/VFAT/Win95 partition
 450M   |
        +------------------------------------
???     | This is empty space that starts BELOW the 1024th
        |       cylander
        +------------------------------------



   FIPS can be found at your favorite Linux FTP sites (sunsite.unc.edu,
   tsx-11.mit.edu, ftp.redhat.com) usually in the /pub/utils/msdos
   directory. If you have a CD for Linux, there is usually a \utils\msdos
   or \utils directory that has FIPS in it as well.

   It is _VERY IMPORTANT_ that your Linux partition start before (below)
   the 1024th cylander, otherwise you will be unable to boot it (and
   that's not a good thing).

   What exactly is the 1024th cylander? That's where IDE ends and EIDE
   begins-- that's the 528M "mark" on your hard disk. Start your Linux
   partition at around 520M, so the entire kernel and other boot/loader
   files will completely reside below that cylander.

   _4 What Next?_

   Go ahead and install Linux to that new free space. If you are
   paranoid, when the Linux install proceedure goes to boot, you can boot
   into Windows 95 and mak sure it still runs OK. PLEASE, PLEASE, PLEASE
   listen to the advice given in the tail of section number three. You
   will be unable to use Linux otherwise.

   When it comes to piecing out the disk, if you are like most people,
   you'll make a 400M Linux partition (which is pretty comfortable) as
   well as 30M of SWAP (which is more than enough).

   At this point, you should be able to install whatever distribution of
   Linux you have without any troubles.

   _5 Using your new system!_

   Linux can mount, read, and write to Win95's VFAT partitions serveral
   ways. You can use the stock msdos filesystem support that has been
   included in all kernels greater than 1.0. However, using commands
   like:

litterbox~#: mount -t msdos /dev/hda1 /mnt

   will only get you as far as filenames with the 8.3 standard. Yick! You
   have Windows 95 so you can use those nifty long file names.

   Some Linux users still run kernels that are anchient (by Linux
   standards). In other words, 1.2.xx kernels. Someone coded a module for
   this series of kernels so a user can read files that do not conform to
   the old 8.3 standard. FTP to
   ftp://mm-ftp.cs.berkeley.edu/pub/multimedia/linux/xmsdos/ and pick up
   a copy of README before doing anything.

   Finally, newer kernels (1.3.4x) as well as the long awaited 2.0
   RELEASE have internal vfat support that you can compile in. These
   kernels allow safe read/writes to your VFAT partitions.

   _NOTE:_ A word of caution!

   IF you are running a "newer" version of Windows 95-- i.e., possibly
   one that ships on computers made after June 1996 as well as the P5-MMX
   series please listen to the following.

   Check to see what version of Win95 you are really running. To do this,
   open up a DOS box and type: "ver /r". Here's some sample output:


C:\> ver /r

Mircosoft Windows 95 [4.00.1034]
        (C) 1981-1996 Microsoft Corporation.



   Note the minor revision number. If the number is GREATER than 950 you
   may be running a version of the FAT partition type known as FAT32. If
   that is the case, you can still use Linux and Win95, HOWEVER, there is
   NO support to read/write a FAT32 partition. You are SOL if that is the
   case.

   Just because you are running a newer version of Win95 doesn't mean
   that you are running FAT32. Load up "fdisk" and use the "display
   partition information" option to show indeed if you are using FAT32.

   _5.1 HELP!, I'm stuck with FAT32!_

   _5.1.2.1 I have this brand new box that I got from (unamed
   chain/retail store)_

   If you are installing Linux onto a drive with FAT32 follow the steps
   from above about installing Linux onto a Win95 system, but do NOT
   install LILO. Instead, skip to section 5.1.3 entitled "linload, what's
   that?" and read the step-by-step workaround for this unfortunate
   situation.

   _5.1.2.2 I messed up-- big time!_

   This happened to me-- I was running a Win95 beta with FAT32 installed,
   I upgrade Win95, and my system died. I didn't have a Win95 boot disk
   for the version of Win95 I just upgraded to. Here's a little work
   around.

   Find ANY MS boot disk made using DOS version 5.0 or greater. Under
   Linux mount the Win95 Beta CD. Mount the floppy as well.


litterbox~# mount -t iso9660 /dev/cdrom /cdrom
litterbox~# mount -t msdos /dev/fd0 /mnt



   On the CD find the "beta stuff" directory. The MS people move this
   location around... try /cdrom/admin/beta/floppy,
   /cdrom/betaonly/floppy. cp the files io.sys, msdos.sys, and
   command.com to the floppy. "sync" and unmount the disks you mounted.
   Do a reboot and that boot disk *should* work.

   _5.1.3 Linload, What's That?_

   Linload is a DOS execuatble which loads a kernel image from a DOS HD
   (or floppy) and then boots the rest of the Linux Operating System from
   an appropriate root partition. If you're really a good hacker, you can
   do a floppyless Linux install this way, but today we are going to do
   more traditional uses. When booting into Windows 95 hit the F8 key
   (when:

Starting Windows 95...

   is displayed) and select "Safe mode, command prompt only." Go to your
   directory where you put your kernel and run

C:\LINUX> linload.exe zimage root=/dev/hda2 ro"

   from there. If you are any good with MS-DOS setups, you can code
   multiple AUTOEXEC.BAT and CONFIG.SYS files, so that you have a menu
   setup and can choose which OS to boot.

   _6 Problems?_

   In the reverse of the begining scenario (you have a working Linux box
   and are forced by some power to install Windows 95) Windows 95 WILL
   overwrite your MBR, and thus crush LILO. You have two options: use
   loadlin.exe to load your kernel, and use that to run Linux, or boot
   Linux using a floppy and/or loadlin, then re-install LILO.

   Best of luck with your new system!

-Jon
jkatz@mac.edu
+1 217 479-7309
Box 4454 MacMurray College
Jacksonville, Illinois 62650
Personal: http://www.in.net/~jkatz
Corinne:  http://corinne.mac.edu
Resume:   http://www.in.net/~jkatz/resume.html
Room-101: http://room-101.1984.org
HOWTO:    http://www.in.net/~jkatz/win95/Linux-HOWTO.html

                        Linux Modem sharing mini-HOWTO

   Author:  Friedemann Baitinger,  [1]baiti@toplink.net
   last update:

   v1.01, 11 February 1997 source now in HTML format, added a reference
   on where
                   to get 'cu', also added a reference on where to get
                   mserver. '-s' parameter added to 'cu' example.

   V1.00, 06/12/97 Initial release
   ______________________________________________________________________

1. Introduction

   This mini-HOWTO describes how to setup a Linux system in order to
   share a modem attached to this system  with other systems over a
   TCP/IP network.

2. The Server Side

   It is assumed that the server is a Linux system with either:

     a)  a modem attached to a /dev/ttySx device

     b)  an 'isdn4linux'-emulated modem mapped to a /dev/ttyIx device

   The easiest setup I can think of uses a five lines perl script to
   implement a 'modem demon':

       $ cat /usr/sbin/modemd

       #!/usr/bin/perl
       select((select(STDOUT), $| = 1)[$[]);
       select((select(STDIN), $| = 1)[$[]);
       exec 'cu -s 115200 -l /dev/ttyS1';
       die '$0: Cant exec cu: $!\n';

   The modem demon is started by the INETD process if a client connects
   to the appropriate port as described below. The 'modemd simply
   connects the socket handle with STDIN and STDOUT of the 'cu' command
   and lets 'cu' handle the actual modem device. In case you don't have
   'cu' on your system, please install the 'UUCP' package, 'cu' is
   usually part of 'UUCP'.

   The existence of the modem demon must be made known to the INETD
   process by updating its configuration file, usually /etc/inetd.conf
   like:

       #
       # modem daemon
       #
       modem stream tcp nowait root /usr/sbin/tcpd /usr/sbin/modemd
   /dev/ttyS1

   In order to make this work, an entry to '/etc/services' needs to be
   added like:

       modem           2006/tcp        modemd

   This associates a symbolic name with an explicit port, 2006 in the
   example. The portnumber could be any number not already assigned to an
   existing service. After these changes have been made, a signal must be
   sent to the inetd process in order to let inetd re-read and process
   its configuration file:

       $ ps |grep inetd
       194  ?  S     0:00 /usr/sbin/inetd

       kill -HUP 194

   Now the server side is ready to accept requests from clients. The
   correct function can be verified by:

       $ telnet localhost modem

       Trying 127.0.0.1...
       Connected to localhost.
       Escape character is '^]'.

   You are now connected to the modem. You can now issue 'AT' command in
   order to verify the setup:

       atz
       atz
       OK

       ati1
       ati1
       Linux ISDN
       OK

       ^]
       telnet>quit
       $

   Instead of using the Perl script as a modem server, there is also a
   program named 'mserver' available on
   [2]ftp://ftp.innet.be/pub/staff/carl/ . In case it is not there
   anymore, you may want to use 'archie' or any other search engine in
   order to locate the mserver archive. I haven't had the opportunity yet
   to install and use mserver.

3. The Client Side

   At this time, only Windows client setups are described here.  On the
   client PC, a COM-port redirector for TCP/IP is required. The best
   program for this purpose I have found is 'DialOut/IP' from 'Tactical
   Software' for Windows 3.1 and Windows 95.  (The Windows 3.1 version
   can be used under Windows NT for 16-bit applications only.  A 32-bit
   version for Windows NT is due late summer 1997.)

   DialOut/IP presents the shared modem on a new virtual COM port that it
   adds to Windows.  This virtual COM port can be used by Windows
   programs as if the shared modem is directly connected.  Most client
   applications (including Windows 95 dial-up networking) accept this and
   work as if there were a real COM port and modem, with the general
   exception being fax applications or any others that need access to
   UART control lines. DialOut/IP can be configured to provide Telnet
   protocol processing, but that feature applies to certain modem pool
   products and not to the Linux setup described in this file.  Note
   that, despite its name, DialOut/IP can be used also by applications
   that wait for incoming calls.

   On [3]www.tactical-sw.com there is a page for downloading a fully
   functional evaluation version that times out in 1-2 weeks.
   Installation and configuration is handled by a setup program, with
   installation details in the README.TXT file.  When you run DialOut/IP,
   you enter the IP address and port number of the shared modem.

   DialOut/IP is a commercial product that is licensed on a per-modem
   basis, that is, the price depends on the number of modems that you are
   sharing. The license states that you can install the software on any
   number of PC's that access the shared modems.

4. Security Considerations

   If you have only one modem for all your hosts in your local area
   network, there is probably no reason to worry about security here.
   However, if any one or more of the hosts in your LAN are connected to
   the internet by other means than using the modem we have just setup as
   a modem server, then security considerations are required, otherwise
   anybody can do a 'telnet your_host modem' and dial out long distance
   or even international calls at his will.

   I suggest to install and configure tcp-wrappers in order to protect
   the modem sevrer against unauthorized access.

5. Examples

   I am using the setup as described in (2) and (3) to run Quicken on my
   Windows 95 ThinkPad and do homebanking with the modem attached to my
   Linux machine. The 'modem' in my case is not even a real modem, it is
   an emulated modem on an ISDN-So card. Quicken just sees a COM port, it
   doesn't know that the device attached to the COM port is actually at
   the other end of my Ethernet LAN, nor does it know that it is not a
   standard analog modem but an ISDN device which happens to understand
   'AT' commands.

References

   1. mailto:baiti@toplink.net
   2. ftp://ftp.innet.be/pub/staff/carl/
   3. http://www.tactical-sw.com/
  The Loadlin+Win95 mini-HOWTO
  Authored by: Chris Fischer, protek@brigadoon.com
  v1.4.6, 13 March 1999

  This document describes how to use Loadlin with Windows 95 to boot to
  Linux.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright
     1.2 New Versions Of This Document and Windows 98
     1.3 Feedback
     1.4 Disclaimer

  2. IMPORTANT: Preliminary Information and Setup

     2.1 WARNING! for Windows95 OSR2 (version 4.00.950b) users:
     2.2 Things that are assumed:
     2.3 Items you need before you start:

  3. Getting started:

     3.1 Determine what version of Windows 95 you have.
     3.2 Determine if you are using the FAT32 file system.
     3.3 Make sure filename extensions are visible in Windows Explorer.
     3.4 Rename your system files.
     3.5 Important Warning.
     3.6 Edit your system files.

  4. *** Use this section ONLY if you are using a DOS 6.x boot disk.***

     4.1 Edit and Rename your DOS 6.x system files.

  5. Final Steps

     5.1 Almost Finished
     5.2 You are finished!
     5.3 How it works.

  6. Alternate Methods for Auto-Booting Linux, Especially for Users With a FAT32 File System.

     6.1 Method 1.
     6.2 Method 2.

  7. Frequently Asked Questions:

     7.1 Where can I find more information on using Loadlin?
     7.2 I am not sure what partition Linux is installed on. How do I find out?
     7.3 Where do I find the kernel image file and how do I copy it to my MS-DOS partition?
     7.4 Does it matter if I install Linux or Windows 95 first?
     7.5 I currently have LILO installed, but I want to use Loadlin instead. How do I remove LILO?
     7.6 What if I already dual boot between Windows 95 and Windows 3.x, and I want to boot to Linux using this method?
     7.7 Is it possible to initiate Linux from the Windows 95 desktop?
     7.8 Where can I get a plain text version of this document?

  8. Credits

  ______________________________________________________________________


  1.  Introduction

  This document describes how to easily use a combination of Windows
  95's Boot Menu and Loadlin.exe to autoboot Linux using the F4 Function
  Key. This procedure should work with Windows 95 versions 4.00.950,
  4.00.950a, and 4.00.95b with FAT16, and all versions of Linux that
  support Loadlin. If you prefer to use the LILO boot manager, please
  consult the Linux+Win95 Mini-HOWTO.

  There are also two alternate methods for dual booting between Linux
  and Windows 95 using Loadlin for users using FAT32 with Windows 95
  version 4.00.950b.


  1.1.  Copyright

  The Loadlin+Win95 mini-HOWTO is copyright (C) 1997- 1998 by Protek
  Computer Solutions. This document may be reproduced and distributed in
  whole or in part, in any medium physical or electronic, as long as
  this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.


  1.2.  New Versions Of This Document and Windows 98

  This mini-HOWTO is posted first at The Linux+Windows 95  Reference
  Page <http://www.eskimo.com/~praxis>, so check there to make sure you
  have the most recent revision of this mini-HOWTO. You will also find a
  link there for dual booting with Windows 98. The next revision of this
  mini-HOWTO will be a major revision and will include information on
  dual booting with Windows 98.


  1.3.  Feedback

  Questions, comments, and suggestions are welcome. I am always looking
  for ways to improve and expand this mini-HOWTO. I rely heavily on
  feedback to make improvements, and will do my best to be prompt with a
  helpful response. I can be reached at protek@brigadoon.com.


  1.4.  Disclaimer

  Every attempt has been made to ensure that the information presented
  in this mini-HOWTO is safe and accurate. However, this information is
  given without any warranty, either expressed or implied, as to its
  suitability for a particular use. It is generally considered a
  GoodThing(TM) to make backups of your system files before changing
  system configurations and/or files. I suggest you take this precaution
  "just in case".


  2.  IMPORTANT: Preliminary Information and Setup


  2.1.  WARNING! for Windows95 OSR2 (version 4.00.950b) users:

  Do NOT attempt dual booting with Windows 95 without first consulting
  the Windows 95 OSR2 FAQ. The FAQ also contains a great deal of
  information regarding FAT32. In a nutshell, if you have OSR2 and are
  using a FAT16 file system, you can still dual boot using the F4
  Function Key.

  NOTE: If you have Windows 95 OSR2, and are using a FAT32 file system,
  then the dual booting methods in this  mini-HOWTO using the F4
  Function Key will not work and should not be attempted.

  However, there are a couple of alternate methods you can use  to
  automate booting Linux at startup, which are discussed in ``Section
  6''.


  2.2.  Things that are assumed:


    You have successfully installed Windows 95.

    Windows 95 is installed on Drive C.

    You have successfully installed Linux.

    You know what partition Linux is installed on.

    LILO is NOT installed on your hard drive.

    If you are using Windows 95 OSR2 (version 4.00.950b), you have
     carefully read the Windows95 OSR2 FAQ.


  2.3.  Items you need before you start:


    A bootable floppy disk with DOS 5.0 or DOS 6.x system files
     (io.sys, msdos.sys, command.com) and a config.sys file. If you are
     using a DOS 5.0 boot disk, you will also need an autoexec.bat file.
     If you are using Windows 95 OSR2 (version 4.00.950b), you will also
     need to create a file called Winboot.sys with a text editor and
     place it in the root directory of Drive C.  Winboot.sys can be an
     empty file, just  so long as you have the file.

  NOTE: If your hard drive already contains the autoexec.dos,
  config.dos, io.dos, msdos.dos, and command.dos files, then you will
  not need the floppy. You can check by typing: dir and dir /ah at the
  root of Drive C.  Also, if you installed the upgrade version of
  Windows 95, then it is likely that you have them.


    The Loadlin.exe program file

    Your kernel image file,usually zImage or vmlinuz. (See the ``FAQ''
     for info).

    A simple text editor, such as Notepad.


  3.  Getting started:


  3.1.  Determine what version of Windows 95 you have.

  Boot your computer to Windows 95 and right click on the My computer
  icon. Now left click on Properties. On the General Tab, look under the
  "System:" line. There you will see the version number.


  3.2.  Determine if you are using the FAT32 file system.

  NOTE: If you have Windows 95 version 4.00.950b, make certain you are
  not using the FAT32 file system. Double click the My Computer  icon,
  then right click the Drive C icon. Left click on Properties. On the
  General tab, the "Type:" line will indicate whether or not you have a
  FAT32 file system. If you are using the FAT32 file system, then go
  directly to ``Section 6'' . Otherwise, continue with Section 3.3.


  3.3.  Make sure filename extensions are visible in Windows Explorer.


    Run the Windows Explorer file manager program.

    On the Menu Bar, click on View, then click on Options.  On the View
     Tab, make sure that the "Show all files" radio button is marked.
     Also, make sure that the line with "Hide MS-DOS file extensions for
     file types that are registered" is unchecked.  Click on the OK
     button.

  NOTE: If your hard drive already contains the *.dos files mentioned in
  the ``NOTE: of Section 2.3'', then skip to the next ``NOTE:''.
  Otherwise, continue with Section 3.4.


  3.4.  Rename your system files.


    Insert the DOS 5.0 or DOS 6.x bootable floppy into Drive A. Click
     on the Drive A icon so you can see the contents on the floppy disk.

    Rename each file to a .dos file extension. You can do this by
     single clicking on a file, pressing the F2 function key, and typing
     in the new name. Do not worry if you need the bootable floppy to
     work properly, just rename the files back after you are finished
     with this procedure.


  3.5.  Important Warning.


    EXTREMELY IMPORTANT: Make sure you rename the files on the floppy
     BEFORE you copy them to Drive C. Otherwise you will overwrite your
     Windows 95 system files. You have been warned.  Now, copy all files
     to the root directory of Drive C. One method is to click on the
     Drive A icon, press CTRL+A, press CTRL+C, click on the Drive C
     icon, and press CTRL+V.

  NOTE: If you do not have Windows 95 OSR2 (version 4.00.950b), please
  skip to ``Section 3.6''.


    If (and only if) you have Windows95 version 4.00.950b, make sure
     you have a file named Winboot.sys in the root directory of Drive C,
     as stated in ``Section 2.3'' above. Failure to have Winboot.sys in
     the root directory of Drive C will result in a system lockup should
     you attempt to boot to an earlier version of DOS.

  NOTE: If you are using a  DOS 6.x boot disk skip to ``Section 4'',
  otherwise continue with the next step.


  3.6.  Edit your system files.


    Open Notepad. On the Menu Bar, click on Open. Change "Files of
     type" to "All files (*.*)". Change "Look in:" from Desktop to Drive
     C. Now open Config.dos by double clicking on the filename. Delete
     all the contents. This will create a 0K file...I will explain
     later. Save the file.

    Use Notepad to open and edit Autoexec.dos and type in the Loadlin
     command. The Loadlin command must be in the following syntax:

       ______________________________________________________________________

        Loadlin DriveLetter:\LinuxKernelFile root=/dev/LinuxBootPartition ro
       ______________________________________________________________________

  Here is my Autoexec.dos file as an example:

       ______________________________________________________________________

        Loadlin f:\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________

  NOTE: The kernel, as well as the Loadlin.exe, file may be anywhere on
  your hard drive as long as you reference the correct path. For
  example, if your kernel file was located in  the directory
  e:\linux\kernels and Loadlin.exe was located in the directory
  c:\utils, you would use:

       ______________________________________________________________________

        c:\utils\loadlin e:\linux\kernels\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________

    Save the file.


  4.  *** Use this section ONLY if you are using a DOS 6.x boot disk.***


  4.1.  Edit and Rename your DOS 6.x system files.


    Open Notepad. On the Menu Bar, click on Open. Change "Files of
     type" to "All files (*.*)". Change "Look in:" from Desktop to Drive
     C. Now open Config.dos by double clicking on the filename. Delete
     all the contents. Now, you will need to enter the shell command
     with the following syntax:

       ______________________________________________________________________

        shell=loadlin.exe LinuxKernelFile root=/dev/LinuxBootPartition ro
       ______________________________________________________________________

  Here is my Config.dos file as an example:

       ______________________________________________________________________

        shell=f:\loadlin.exe f:\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________

  NOTE: The Loadlin and kernel file may be  anywhere on your hard drive
  as long as you reference the correct path. For example, if your
  Loadlin file was in the directory f:\utils and the kernel file was
  located in the directory e:\linux\kernels you would use:

       ______________________________________________________________________

        shell=f:\utils\loadlin.exe e:\linux\kernels\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________

    Save the file.


  5.  Final Steps


  5.1.  Almost Finished


    One last file to edit and then you are finished. Use Notepad to
     open and edit Msdos.sys. Goto the "Options" section. Look for a
     line that has BootMulti=. If you do not find one then add it and
     set the value to 1. It should look something like:

       ______________________________________________________________________

        [Options]
        BootMulti=1
       ______________________________________________________________________

    There may be other items listed. Just leave them. Now save the
     file.


  5.2.  You are finished!

  Now all you have to do is reboot (Don't forget to remove the floppy
  disk). When you see "Starting Windows 95...", press the F4 Function
  Key and Linux should boot right up.

  5.3.  How it works.

  Windows 95 has a built in Boot Menu. By default you do not see it at
  startup (although you can change that if you wish), but you can get to
  it by pressing the F8 Function Key when you see "Starting Windows
  95...". On the menu you will see several options. The last option is
  "Previous version of  MS-DOS". Instead of pressing F8 and then
  selecting "Previous version of MS-DOS", you can use the F4 shortcut by
  pressing F4 when "Starting Windows 95..."  appears on the screen. When
  Windows 95 boots to the previous  version of MS-DOS, it uses the files
  that end in the .dos file extension. This is why it is important to
  have a 0K Config.dos file if you are initiating Linux from the
  Autoexec.dos file. If Windows 95 does not find the files with a .dos
  extension while trying to boot the previous operating system, it will
  load the Windows 95 startup files.  Therefore, if you do not have a
  Config.dos file, Windows 95 will load all the drivers in your
  Config.sys file. While this will not prevent Linux from loading, it
  will take longer. Having a 0K Config.dos file prevents Windows 95 from
  reading your Config.sys file while booting to the previous version of
  MS-DOS.


  6.  Alternate Methods for Auto-Booting Linux, Especially for Users
  With a FAT32 File System.

  This section will work for all versions of Windows 95 to date,
  regardless of whether you have a FAT32 file system. There are two
  methods I will discuss in this section. First, I'll start with  the
  simplest.


  6.1.  Method 1.

  This method uses the Autoexec.bat file to call (or execute) another
  batch file named Linux.bat, during boot up.


    Creat a Linux.bat file using a simple text editor such as EDIT or
     Notepad. The contents should be similar to the following:

       ______________________________________________________________________

        @echo off
        cls
        echo.
        echo.
        echo.
        echo.
        choice /t:y,5 "Do you wish to boot Linux? "
        if errorlevel 2 goto End
        c:\loadlin c:\vmlinuz root=/dev/hdc2 ro
        :End
       ______________________________________________________________________

  This batch file script clears the screen, adds four blank lines,
  displays the text in quotes + [Y,N], then waits 5 seconds for you to
  press a key. If you do not press a key within 5 seconds, it defaults
  to Y and runs Linux. If you select Y or N, the batch file determines
  what option you selected, then executes the selected option.  For
  example, if you select 'N' then the batch file terminates and
  continues to process your Autoexec.bat file, which loads Windows 95.
  If you select Y, then of course Linux will load.

  If you do not want four blank lines before the text, modify the number
  of lines with echo. If you do not want the screen to clear, then
  remove the line with cls. The /t switch tells the choice command to
  wait 5 seconds and, if no key is pressed, to default to Y. Change the
  y to an n if you want Windows 95 to boot after the 5 second timeout:
  choice /t:n,5.  Also, you can change the amount of time to wait from 0
  to 99 seconds.  For more information on the choice command, change to
  the c:\windows\command directory and type: choice /? at the command
  prompt.

  NOTE: You will have to modify the line that boots Linux to match your
  configuration. Please see ``Section 3.6'' for examples of how to
  configure Loadlin to boot to Linux.


    Next, create an Autoexec.bat file (if you don't already have one)
     with a simple text editor. Then, on the first line, add the
     following:

       ______________________________________________________________________

               call c:\linux
       ______________________________________________________________________

  If Linux.bat is in another directory you will have to reference the
  correct path. For example if Linux.bat is in a directory called
  C:\batch, you would add:

       ______________________________________________________________________

               call c:\batch\linux
       ______________________________________________________________________

  to the first line of your Autoexec.bat file. Save and exit the file.
  Now all you need to do is reboot. You should be prompted on whether
  you want to boot Linux.


  6.2.  Method 2.

  This method is a bit more involved, but offers the greatest
  flexibility. What this method does it create your own custom boot
  menu, though it does not replace the Windows 95 boot menu. You will
  need a Config.sys and an Autoexec.bat file.


    First you will need to define a Startup Menu in Config.sys
     (mycomments to you are in parenthesis):

  ______________________________________________________________________

   [menu]
   menuitem=Linux, Boot to Linux  (This defines a Menu Block and gives it a description).
   menuitem=Win95, Boot to Windows 95
   menucolor=15,1  (This gives a blue background with bright white text)
   menudefault=Linux, 15  (This sets the default menuitem and waits up to 15 seconds for input).

   [linux]
   shell=f:\loadlin.exe f:\vmlinuz root=/dev/hdc2 ro (Please see Section 4 for examples and syntax).

   [win95]
   (Include the normal contents of your config.sys file here. If you did
   not have a config.sys file before now, then leave this section blank).
  ______________________________________________________________________

    Save and exit your Config.sys file. If you want, you can use this
     Config.sys template to get started.


    Next, edit your Autoexec.bat file (my comments to you are in
     parenthesis):

       ______________________________________________________________________

        goto %config%

        :win95
        (Include the normal contents of your autoexec.bat file here. If you did
        not have an autoexec.bat file before now, then leave this section blank).
       ______________________________________________________________________

    Save and exit your Autoexec.bat file. If you want, you can use this
     Autoexec.bat template to get started. That should do it. The next
     time you reboot, you should get a Start Up menu with the option to
     boot to Linux or Windows 95.


  7.  Frequently Asked Questions:


  7.1.  Where can I find more information on using Loadlin?


    Slackware versions 3.2 and 3.5 contain a file named "loadlin.tgz"
     in the \slakware\A5 directory, Slackware versions 3.3 and 3.4 have
     loadlin.tgz in the \slakware\A4 directory. Slackware version 3.6
     has loadlin.tgz in the \slackware\A8 directory. Unarchive the file
     and look in the \docs directory for a file named manual.txt. I do
     not know about earlier versions of Slackware.


    RedHat versions 4.2 through 5.2 contain a file named
     "loadlin16.tgz" in  the \dosutils directory. Unarchive the file and
     look in the \docs directory for a file named manual.txt. RedHat 4.1
     does not seem to have this archive. The manual.txt is also
     available for download at:


       ftp://ftp.eskimo.com/u/p/praxis/manual.txt

    Additional information is available at:


       http://metalab.unc.edu/LDP/HOWTO/BootPrompt-HOWTO-2.html#ss2.2

  7.2.  I am not sure what partition Linux is installed on. How do I
  find out?


    At a Linux shell prompt, run the fdisk utility and press "p". From
     there you should be able to tell. If you need additional help using
     fdisk, please consult the man pages.


  7.3.  Where do I find the kernel image file and how do I copy it to my
  MS-DOS partition?


    To find your linux kernel file type:

       ______________________________________________________________________

               find / -name vmlinuz
       ______________________________________________________________________

  at a Linux shell prompt. This will search all Linux partitions for the
  vmlinuz file. If you have multiple vmlinuz files, then make sure you
  use the correct one. If you are not sure, then the safest bet would be
  to use the most recent one.

  To copy your linux kernel file to your DOS partition, you need to make
  your DOS partition visible to Linux, then mount the partition if it is
  not already. Generally, this should have been set up when you
  installed Linux. All you need to do next is change to the directory
  the vmlinuz file is in and copy it over to DOS using the cp command.

  However, if Linux was not set up to recognize your DOS partition, then
  copy vmlinuz to a floppy. Take any DOS formatted floppy (with enough
  disk space to hold your kernel image file) and insert it into your
  floppy drive. Type:

       ______________________________________________________________________

               mount /dev/fd0 /tmp
       ______________________________________________________________________

  at a Linux shell prompt. Then change to the directory your kernel
  image file is in and type:

       ______________________________________________________________________

               cp vmlinuz /tmp
       ______________________________________________________________________

  This will copy vmlinuz to your floppy disk and it will be readable by
  DOS. Shutdown Linux, boot to DOS, then copy vmlinuz to whichever
  directory you choose. If you recompile your kernel, do not forget to
  copy the new kernel image file to your DOS partition. This will
  overwrite your old file, so it might be a good idea to rename the old
  file first just in case the new one does not work properly.


  7.4.  Does it matter if I install Linux or Windows 95 first?


    Technically no. However, it would be much simpler to install Win95
     first. That way it is easier to setup Linux to recognize your DOS
     partition(s) as you can usually do this during the Linux
     installation.


  7.5.  I currently have LILO installed, but I want to use Loadlin
  instead. How do I remove LILO?


    You will need to restore the Win95 MBR (Master Boot Record) that
     LILO overwrote when you installed LILO. At a DOS prompt type:

       ______________________________________________________________________

               fdisk /mbr
       ______________________________________________________________________

  7.6.  What if I already dual boot between Windows 95 and Windows 3.x,
  and I want to boot to Linux using this method?


    Frankly, if you want to do this I would recommend using LILO.
     However, if you really do not want to use LILO, you will have to
     boot to Win 3.x first, then issue the Loadlin command. (Make sure
     Windows 3.x is NOT running, but that you are in DOS 5.0 or 6.x).


  7.7.  Is it possible to initiate Linux from the Windows 95 desktop?


    Yes. First, create a batch file called "linux.bat", for example.
     Edit the file to contain a Loadlin command such as:

  ______________________________________________________________________

          loadlin f:\vmlinuz root=/dev/hdc2 ro
  ______________________________________________________________________

  Now save the file in the \windows\desktop directory. Next, right click
  on the Linux.bat icon, then left click on Properties. Now click on the
  Program tab, then click on the Advanced button. Click on the box next
  to "MS-DOS mode" and make sure the box next to "Warn before entering
  MS-DOS mode is checked". Click OK, then click on OK again. Now when
  you double click on the Linux icon, a warning box will appear before
  going into MS-DOS mode. If you click on "Yes" then Windows enters MS-
  DOS mode and executes the Linux.bat file.

  NOTE: You must be in MS-DOS mode in order to use Loadlin. Please see
  the manual.txt file mentioned in ``Section 7.1'' of this ``FAQ'' for
  more information.

  7.8.  Where can I get a plain text version of this document?


    You can get a plain text version of this document at:

       ftp://ftp.eskimo.com/u/p/praxis/loadlin.txt

  8.  Credits

  A special thanks toNorm Jacobowitz and Fred Harris for helping me sort
  out the Windows 95 OSR2 issues and for helping me improve this mini-
  HOWTO.

  The Loopback Root Filesystem HOWTO
  by Andrew M. Bishop, amb@gedanken.demon.co.uk
  v1.1, 24 September 1999

  This HOWTO explains how to use the Linux loopback device to create a
  Linux native filesystem format installation that can be run from a DOS
  partition without re-partitioning.  Other uses of this same technique
  are also discussed.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright
     1.2 Revision History

  2. Principles of Loopback Devices and Ramdisks

     2.1 Loopback Devices
     2.2 Ramdisk Devices
     2.3 The Initial Ramdisk Device
     2.4 The Root Filesystem
     2.5 The Linux Boot Sequence

  3. How To Create a Loopback Root Device

     3.1 Requirements
     3.2 Creating the Linux Kernel
     3.3 Creating the Initial Ramdisk Device
     3.4 Creating The Root Device
     3.5 Creating the Swap Device
     3.6 Creating the MSDOS Directory
     3.7 Creating the Boot Floppy

  4. Booting the System

     4.1 Possible Problems With Solutions
     4.2 Reference Documents

  5. Other Loopback Root Device Possibilities

     5.1 DOS Hard-disk Only Installation
     5.2 LILO Booted Installation
     5.3 VFAT / NTFS Installation
     5.4 Installing Linux without Re-partitioning
     5.5 Booting From a Non-bootable device


  ______________________________________________________________________

  1.  Introduction

  1.1.  Copyright

  The Loopback Root Filesystem HOWTO Copyright (C) 1998,99  Andrew M.
  Bishop (amb@gedanken.demon.co.uk).

  This documentation is free documentation; you can redistribute it
  and/or modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  The GNU General Public License is available from http://www.fsf.org/
  or, write to the Free Software Foundation, Inc., 59 Temple Place,
  Suite 330, Boston, MA 02111 USA


  1.2.  Revision History


     Version 1.0.0
        Initial Version (June 1998)

     Version 1.0.1-1.0.3
        Slight Modifications, kernel version changes, typos etc. (1998 -
        July 1999)

     Version 1.1
        Added Copyright Information and Re-Submitted (September 1999)


  2.  Principles of Loopback Devices and Ramdisks

  First I will describe some of the general principles that are used in
  the setting up of a loopback filesystem as the root device.

  2.1.  Loopback Devices

  A loopback device in Linux is a virtual device that can be used like
  any other media device.


  Examples of normal media devices are hard disk partitions like
  /dev/hda1, /dev/hda2, /dev/sda1, or entire disks like the floppy disk
  /dev/fd0 etc.  They are all devices that can be used to hold a files
  and directory structures.  They can be formatted with the filesystem
  that is required (ext2fs, msdos, ntfs etc.) and then mounted.


  The loopback filesystem associates a file on another filesystem as a
  complete device.  This can then be formatted and mounted just like any
  of the other devices listed above.  To do this the device called
  /dev/loop0 or /dev/loop1 etc is associated with the file and then this
  new virtual device is mounted.

  2.2.  Ramdisk Devices

  In Linux it is also possible to have another type of virtual device
  mounted as a filesystem, this is the ramdisk device.


  In this case the device does not refer to any physical hardware, but
  to a portion of memory that is set aside for the purpose.  The memory
  that is allocated is never swapped out to disk, but remains in the
  disk cache.


  A ramdisk can be created at any time by writing to the ramdisk device
  /dev/ram0 or /dev/ram1 etc.  This can then be formatted and mounted in
  the same way that the loopback device is.


  When a ramdisk is used to boot from (as is often done on Linux
  installation disks or rescue disks) then the disk image (the entire
  contents of the disk as a single file) can be stored on the boot
  floppy in a compressed form.  This is automatically recognised by the
  kernel when it boots and is uncompressed into the ramdisk before it is
  mounted.

  2.3.  The Initial Ramdisk Device

  The initial ramdisk device in Linux is another important mechanism
  that we need to be able to use a loopback device as a the root
  filesystem.


  When the initial ramdisk is used the filesystem image is copied into
  memory and mounted so that the files on it can be accessed.  A program
  on this ramdisk (called /linuxrc) is run and when it is finished a
  different device is mounted as the root filesystem.  The old ramdisk
  is still present though and is mounted on the directory /initrd if
  present or available through the device /dev/initrd.


  This is unusual behaviour since the normal boot sequence boots from
  the designated root partition and keeps on running.  With the initial
  ramdisk option the root partition is allowed to change before the main
  boot sequence is started.

  2.4.  The Root Filesystem

  The root filesystem is the device that is mounted first so that it
  appears as the directory called / after booting.


  There are a number of complications about the root filesystem that are
  due to the fact that it contains all files.  When booting the rc
  scripts are run, these are either the files in /etc/rc.d or /etc/rc?.d
  depending on the version of the /etc/init program.


  When the system has booted it is not possible to unmount the root
  partition or change it since all programs will be using it to some
  extent.  This is why the initial ramdisk is so useful because it can
  be used so that the final root partition is not the same as the one
  that is loaded at boot time.

  2.5.  The Linux Boot Sequence

  To show how the initial ramdisk operates in the boot sequence, the
  order of events is listed below.

  1. The kernel is loaded into memory, this is performed by LILO or
     LOADLIN.  You can see the Loading... message as this happens.

  2. The ramdisk image is loaded into memory, again this is performed by
     LILO or LOADLIN. You can see the Loading... message again as this
     happens.

  3. The kernel is initialised, including parsing the command line
     options and setting of the ramdisk as the root device.

  4. The program /linuxrc is run on the initial ramdisk.

  5. The root device is changed to that specified in the kernel
     parameter.

  6. The init program /etc/init is run which will perform the user
     configurable boot sequence.

  This is just a simplified version of what happens, but is sufficient
  to explain how the kernel starts up and where the initial ramdisk is
  used.

  3.  How To Create a Loopback Root Device

  Now that the general principles are explained the method of creating
  the loopback device can be explained.

  3.1.  Requirements

  To create the loopback root device will require a number of things.

    A working Linux system.

    A way to copy large files onto the target DOS partition.

  Most important is access to an installed Linux system.  This is
  because the loop device can only be created under Linux.  This will
  mean that it is not possible to bootstrap a working system from
  nothing.  The requirements of the Linux system that you use is that
  you can compile a kernel on it.


  Once the loopback device is created it will be a large file.  I have
  used an 80 MB files, but while this was sufficient for an X terminal
  it may not be enough if you want to use it for much else.  This file
  must be copied onto the DOS partition, so either a network or a lot of
  floppy disks must be used.


  The software that you will require includes


    LOADLIN version 1.6 or above

    A version of mount that supports loopback devices

    A version of the kernel that supports the required options.

  All of these should be standard for recent Linux installations.

  3.2.  Creating the Linux Kernel

  I created the loopback device using Linux kernel version 2.0.31, other
  versions should also work, but they must have at least the options
  listed below.


  The kernel options that you will need to enable are the following:

    RAM disk support (CONFIG_BLK_DEV_RAM).

    Initial RAM disk (initrd) support (CONFIG_BLK_DEV_INITRD).

    Loop device support (CONFIG_BLK_DEV_LOOP).

    fat fs support (CONFIG_FAT_FS).

    msdos fs support (CONFIG_MSDOS_FS).

  The first two are for the RAM disk device itself and the initial ram
  disk device.  The next one is the loop back filesystem option.  The
  last two are the msdos filesystem support which is required to mount
  the DOS partitition.


  Compiling a kernel without modules is the easiest option, although if
  you do want modules then it should be possible although I have not
  tried it.  If modules are used then you should make sure that you have
  the options above compiled in and not as modules themselves.


  Depending on the kernel version that you have you may need to apply a
  kernel patch.  It is a very simple one that allows the loopback device
  to be used as the root filesystem.

    Kernel versions before 2.0.0; I have no information about these.

    Kernel version 2.0.0 to 2.0.34; you need to apply the kernel patch
     for 2.0.x kernels as shown below.

    Kernel version 2.0.35 to 2.0.x; no kernel patch is required.

    Kernel version 2.1.x; you need to apply the kernel patch for 2.0.x
     or 2.2.x kernels as shown below, depending on the exact 2.1.x
     version.

    Kernel version 2.2.0 to 2.2.10; you need to apply the kernel patch
     for 2.2.x kernels as shown below.

    Kernel version 2.3.x; you need to apply the kernel patch for 2.2.x
     kernels as shown below.


  For 2.0.x kernels the file /init/main.c needs to have a single line
  added to it as shown by the modified version below.  The line that
  says "loop", 0x0700 is the one that was added.

  static void parse_root_dev(char * line)
  {
          int base = 0;
          static struct dev_name_struct {
                  const char *name;
                  const int num;
          } devices[] = {
                  { "nfs",     0x00ff },
                  { "loop",    0x0700 },
                  { "hda",     0x0300 },

  ...

                  { "sonycd",  0x1800 },
                  { NULL, 0 }
          };

  ...

  }

  For 2.2.x kernels the file /init/main.c needs to have three lines
  added to it as shown by the modified version below.  The line that
  says "loop", 0x0700 and the ones either side of it are the ones that
  were added.

       static struct dev_name_struct {
               const char *name;
               const int num;
       } root_dev_names[] __initdata = {
       #ifdef CONFIG_ROOT_NFS
               { "nfs",     0x00ff },
       #endif
       #ifdef CONFIG_BLK_DEV_LOOP
               { "loop",    0x0700 },
       #endif
       #ifdef CONFIG_BLK_DEV_IDE
               { "hda",     0x0300 },

       ...

               { "ddv", DDV_MAJOR << 8},
       #endif
               { NULL, 0 }
       };

  Once the kernel is configured it should be compiled to produce a
  zImage file (make zImage).  This file will be arch/i386/boot/zImage
  when compiled.

  3.3.  Creating the Initial Ramdisk Device

  The initial ramdisk is most easily created as a loopback device from
  the start.  You will need to do this as root, the commands that you
  need to execute are listed below, they are assumed to be run from
  root's home directory (/root).

       mkdir /root/initrd
       dd if=/dev/zero of=initrd.img bs=1k count=1024
       mke2fs -i 1024 -b 1024 -m 5 -F -v initrd.img
       mount initrd.img /root/initrd -t ext2 -o loop
       cd initrd
       [create the files]
       cd ..
       umount /root/initrd
       gzip -c -9 initrd.img > initrdgz.img

  There are a number of steps to this, but they can be described as
  follows.

  1. Create a mount point for the initial ramdisk (an empty directory).

  2. Create an empty file of the size required.  Here I have used
     1024kB, you may need less or more depending on the contents, (the
     size is the last parameter).

  3. Make an ext2 filesystem on the empty file.

  4. Mount the file onto the mount point, this uses the loopback device.

  5. Change to the mounted loopback device.

  6. Create the files that are required (see below for details).

  7. Move out of the mounted loopback device.

  8. Unmount the device.

  9. Create a compressed version for use later.

  Contents Of The Initial Ramdisk

  The files that you will need on the ramdisk are the minimum
  requirements to be able to execute any commands.


    /linuxrc The script that is run to mount the msdos file system (see
     below).

    /lib/* The dynamic linker and the libraries that the programs need.

    /etc/* The cache used by the dynamic linker (not strictly needed,
     but does stop it complaining).

    /bin/* A shell interpreter (ash because it is smaller than bash.
     The mount and losetup programs for handling the DOS disk and
     setting up the loopback devices.

    /dev/* The devices that will be used.  You need /dev/zero for ld-
     linux.so, /dev/hda* to mount the msdos disk and /dev/loop* for the
     lopback device.

    /mnt An empty directory to mount the msdos disk on.

  The initial ramdisk that I used is listed below, the contents come to
  about 800kB when the overhead of the filesystem are taken into
  account.

       total 18
       drwxr-xr-x   2 root     root         1024 Jun  2 13:57 bin
       drwxr-xr-x   2 root     root         1024 Jun  2 13:47 dev
       drwxr-xr-x   2 root     root         1024 May 20 07:43 etc
       drwxr-xr-x   2 root     root         1024 May 27 07:57 lib
       -rwxr-xr-x   1 root     root          964 Jun  3 08:47 linuxrc
       drwxr-xr-x   2 root     root        12288 May 27 08:08 lost+found
       drwxr-xr-x   2 root     root         1024 Jun  2 14:16 mnt

       ./bin:
       total 168
       -rwxr-xr-x   1 root     root        60880 May 27 07:56 ash
       -rwxr-xr-x   1 root     root         5484 May 27 07:56 losetup
       -rwsr-xr-x   1 root     root        28216 May 27 07:56 mount
       lrwxrwxrwx   1 root     root            3 May 27 08:08 sh -> ash

       ./dev:
       total 0
       brw-r--r--   1 root     root       3,   0 May 20 07:43 hda
       brw-r--r--   1 root     root       3,   1 May 20 07:43 hda1
       brw-r--r--   1 root     root       3,   2 Jun  2 13:46 hda2
       brw-r--r--   1 root     root       3,   3 Jun  2 13:46 hda3
       brw-r--r--   1 root     root       7,   0 May 20 07:43 loop0
       brw-r--r--   1 root     root       7,   1 Jun  2 13:47 loop1
       crw-r--r--   1 root     root       1,   3 May 20 07:42 null
       crw-r--r--   1 root     root       5,   0 May 20 07:43 tty
       crw-r--r--   1 root     root       4,   1 May 20 07:43 tty1
       crw-r--r--   1 root     root       1,   5 May 20 07:42 zero

       ./etc:
       total 3
       -rw-r--r--   1 root     root         2539 May 20 07:43 ld.so.cache

       ./lib:
       total 649
       lrwxrwxrwx   1 root     root           18 May 27 08:08 ld-linux.so.1 -> ld-linux.so.1.7.14
       -rwxr-xr-x   1 root     root        21367 May 20 07:44 ld-linux.so.1.7.14
       lrwxrwxrwx   1 root     root           14 May 27 08:08 libc.so.5 -> libc.so.5.3.12
       -rwxr-xr-x   1 root     root       583795 May 20 07:44 libc.so.5.3.12

       ./lost+found:
       total 0

       ./mnt:
       total 0

  The only complex steps about this are the devices in dev.  Use the
  mknod program to create them, use the existing devices in /dev as a
  template to get the required parameters.


  The /linuxrc file

  The /linuxrc file on the initial ramdisk is required to do all of the
  preparations so that the loopback device can be used for the root
  partition when it exits.
  The example below tries to mount /dev/hda1 as an msdos partition and
  if it succeeds then sets up the files /linux/linuxdsk.img as
  /dev/loop0 and /linux/linuxswp.img as /dev/loop1.

       #!/bin/sh

       echo INITRD: Trying to mount /dev/hda1 as msdos

       if /bin/mount -n -t msdos /dev/hda1 /mnt; then

          echo INITRD: Mounted OK
          /bin/losetup /dev/loop0 /mnt/linux/linuxdsk.img
          /bin/losetup /dev/loop1 /mnt/linux/linuxswp.img
          exit 0

       else

          echo INITRD: Mount failed
          exit 1

       fi

  The first device /dev/loop0 will become the root device and the second
  one /dev/loop1 will become the swap space.


  If you want to be able to write to the DOS partition as a non-root
  user when you have finished then you should use mount -n -t msdos
  /dev/hda1 /mnt -o uid=0,gid=0,umask=000,quiet instead.  This will map
  all accesses to the DOS partition to root and set the permissions
  appropriately.

  3.4.  Creating The Root Device

  The root device that you will be using is the file linuxdsk.img.  You
  will need to create this in the same way that the initial ramdisk was
  created, but bigger.  You can install any Linux installation that you
  like onto this disk.


  The easiest way might be to copy an existing Linux installation into
  it.  An alternative is to install a new Linux installation onto it.


  Assuming that you have done this, there are some minor changes that
  you must make.


  The /etc/fstab file must reference the root partition and the swap
  using the two loopback devices that are setup on the initial ramdisk.

       /dev/loop0     /      ext2   defaults 1 1
       /dev/loop1     swap   swap   defaults 1 1


  This will ensure that when the real root device is used the kernel
  will not be confused about where the root device is.  It will also
  allow the swap space to be added in the same way a swap partition is
  normally used.  You should remove any other reference to a root disk
  device or swap partition.


  If you want to be able to read the DOS partition after Linux has
  started then you will need to make a number of extra small changes.


  Create a directory called /initrd, this is where the initial ramdisk
  will be mounted once the loopback root filesystem is mounted.

  Create a symbolic link called /DOS that points to /initrd/mnt where
  the real DOS parition will be mounted.

  Add a line into the rc file that mounts the disks.  This should run
  the command mount -f -t msdos /dev/hda1 /initrd/mnt, this will create
  a 'fake' mount of the DOS partition so that all programs (like df)
  will know that the DOS partition is mounted and where to find it.  If
  you used different options in the /linuxrc file that obviously you
  should use them here also.


  There is no need to have a Linux kernel on this root device since that
  is already loaded earlier.  If you are using modules however then you
  should include them on this device as normal.

  3.5.  Creating the Swap Device

  The root device that you will be using is the file linuxswap.img.  The
  swap device is very simple to create.  Create an empty file as was
  done for the initial ramdisk and then run mkswap linuxswap.img to
  intialise it.


  The size of the swap space will depend on what you plan to do with the
  installed system, but I would recommend between 8MB and the amount of
  RAM that you have.

  3.6.  Creating the MSDOS Directory

  The files that are going to be used need to be moved onto the DOS
  partition.


  The files that are required in the DOS directory called C:\LINUX are
  the following:


    LINUXDSK.IMG The disk image that will become the root device.

    LINUXSWP.IMG The swap space.


  3.7.  Creating the Boot Floppy

  The boot floppy that is used is just a normal DOS format bootable
  floppy.


  This is created using format a: /s from DOS.


  Onto this disk you will need to create an AUTOEXEC.BAT file (as below)
  and copy the kernel, compressed initial ramdisk and LOADLIN
  executable.


    AUTOEXEC.BAT The DOS automatically executed batch file.

    LOADLIN.EXE The LOADLIN program executable.

    ZIMAGE The Linux kernel.

    INITRDGZ.IMG The compressed initial ramdisk image.

  The AUTOEXEC.BAT file should contain just one line as below.

       \loadlin \zImage initrd=\initrdgz.img root=/dev/loop0 ro

  This specifies the kernel image to use, the initial ramdisk image, the
  root device after the initial ramdisk has finished and that the root
  partition is to be mounted read-only.


  4.  Booting the System

  To boot from this new root device all that is required is that the
  floppy disk prepared as described above is inserted for the PC to boot
  from.


  You will see the following sequence of events.

  1. DOS boots

  2. AUTOEXEC.BAT starts

  3. LOADLIN is run

  4. The Linux kernel is copied into memory

  5. The initial ramdisk is copied into memory

  6. The Linux kernel is started running

  7. The /linuxrc file on the initial ramdisk is run

  8. The DOS partition is mounted and the root and swap devices set up

  9. The boot sequence continues from the loopback device

  When this is complete you can remove the boot floppy and use the Linux
  system.


  4.1.  Possible Problems With Solutions

  There are a number of stages where this process could fail, I will try
  to explain what they are and what to check.

  DOS booting is easy to recognise by the message that it prints MS-DOS
  Starting ... on the screen.  If this is not seen then the floopy disk
  is either not-bootable or the PC is not bootable from the floppy disk
  drive.


  When the AUTOEXEC.BAT file is run the commands in it should be echoed
  to the screen by default.  In this case there is just the single line
  in the file that starts LOADLIN.


  When LOADLIN executes it will do two very visible things, firstly it
  will load the kernel into memory, secondly it will copy the ramdisk
  into memory.  Both of these are indicated by a Loading... message.


  The kernel starts by uncompressing itself, this can give crc errors if
  the kernel image is corrupted.  Then it will start running the
  initialisation sequence which is very verbose with diagnostic
  messages.  Loading of the initial ramdisk device is also visible
  during this phase.


  When the /linuxrc file is run there is no diagnostic messages, but you
  can add these yourself as an aid to debugging.  If this stage fails to
  set up the loopback device as the root device then you may see a
  message that there is no root device and the kernel aborts.


  The normal boot sequence of the new root device will now continue and
  this is quite verbose.  There may be problems about the root device
  being mounted read-write, but the LOADLIN command line option 'ro'
  should stop that.  Other problems that can occur are that the boot
  sequence is confused about where the root device is, this is probably
  due to a problem with /etc/fstab.


  When the boot sequence has completed, the remaining problem is that
  programs are confused about whether the DOS partition is mounted or
  not.  This is why it is a good idea to use the fake mount command
  described earlier.  This makes life a lot easier if you want to access
  the files on the DOS device.

  4.2.  Reference Documents

  The documents that I used to create my first loopback root filesystem
  were:

    The Linux kernel source, in particular init/main.c

    The Linux kernel documentation, in particular
     Documentation/initrd.txt and Documentation/ramdisk.txt.

    The LILO documentation.

    The LOADLIN documentation

  5.  Other Loopback Root Device Possibilities

  Once the principle of booting a filesystem in a file on a DOS
  partition has been established there are many other things that you
  can now do.

  5.1.  DOS Hard-disk Only Installation

  If it is possible to boot Linux from a file on a DOS harddisk by using
  a boot floppy then it is obviously also possible to do it using the
  harddisk itself.

  A configuration boot menu can be used to give the option of running
  LOADLIN from within the AUTOEXEC.BAT.  This will give a much faster
  boot sequence, but is otherwise identical.

  5.2.  LILO Booted Installation

  Using LOADLIN is only one option for booting a Linux kernel.  There is
  also LILO that does much the same but without needing DOS.

  In this case the DOS format floppy disk can be replaced by an ext2fs
  format one.  Otherwise the details are very similar, with the kernel
  and the initial ramdisk being files on that disk.

  The reason that I chose the LOADLIN method is that the arguments that
  need to be given to LILO are slightly more complex.  Also it is more
  obvious to a casual observer what the floppy disk is since it can be
  read under DOS.

  5.3.  VFAT / NTFS Installation

  I have tried the NTFS method, and have had no problems with it.  The
  NTFS filesystem driver is not a standard kernel option in version
  2.0.x, but is available as a patch from http://www.informatik.hu-
  berlin.de/~loewis/ntfs/.  In version 2.2.x the NTFS driver is included
  as standard in the kernel.

  The only changes for the VFAT or NTFS options are in the initial
  ramdisk, the file /linuxrc needs to mount a file system of type vfat
  or ntfs rather that msdos.

  I know of no reason why this should not also work on a VFAT partition.

  5.4.  Installing Linux without Re-partitioning

  The process of installing Linux on a PC from a standard distribution
  requires booting from a floppy disk and re-partitioning the disk.
  This stage could instead be accomplished by a boot floppy that creates
  an empty loopback device and swap file.  This would allow the
  installation to proceed as normal, but it would install into the
  loopback device rather than a partition.

  This could be used as an alternative to a UMSDOS installation, it
  would be more efficient in disk usage since the minimum allocation
  unit in the ext2 filesystem is 1kB instead of up to 32kB on a DOS
  partition.  It can also be used on VFAT and NTFS formatted disks which
  are otherwise a problem.
  5.5.  Booting From a Non-bootable device

  This method can also be used to boot a Linux system from a device that
  is not normally bootable.

    CD-Rom

    Zip Disks

    Parallel port disk drives

  Obviously there are many other devices that could be used, NFS root
  filesystems are already included in the kernel as an option, but the
  method described here might also be used instead.

  The MacTerminal MINI-HOWTO
  Robert Kiesling
  v1.4, 9 November 1997

  This mini HOWTO describes the 1,002nd use for a dead Macintosh (grin):
  how to configure the Mac for use as a Linux terminal.  Configurations
  using getty and the terminal program kermit are described, as well as
  using kermit peer-to-peer networking between between Linux and a Mac
  intosh.  This document may be reproduced freely, in whole or in part,
  provided that any usage conforms to the general copyright notice of
  the HOWTO series of the Linux Documentation Project.  See the file
  COPYRIGHT for details.  Send all complaints, suggestions, errata, and
  any miscellany to kiesling@terracom.net, so I can keep this document
  as complete and up to date as possible.

  1.  Introduction.

  This mini-HOWTO should give you some Insanely Great ideas for how to
  make your Macintosh work with Linux.  Unfortunately, I have been very
  busy, and so I haven't been able to include even half of what I wanted
  to include, like using MacTCP and Open Transport to connect to your
  Linux box via a PPP line.  That will need to wait for future versions.

  This mini-HOWTO doesn't cover networking with LocalTalk and AppleTalk,
  either.  I might explore these avenues if there's enough interest in,
  say, printing to a LaserWriter printer from Linux.  Otherwise, it
  seems to me that such applications, being more trouble than they're
  worth (not to mention pricey), are beyond the scope of this document.

  I don't plan to cover MkLinux in this document, either.  It's more
  than adequately documented elsewhere.

  So if you have ideas for this document, drop me a line at the e-mail
  above.  Both systems embody a lot of the beginner's mindset as well as
  technical prowess, and in my opinion they don't talk to each other
  nearly enough.

  2.  Setting up a serial link.

  To set up a serial link between a Mac and a Linux machine, you will
  need, on the Linux side, either a DB9 Female-to-DB25 Male serial cable
  or a DB25 Female-to-DB25 Male serial cable, depending on your serial
  port.  On the Macintosh side, you will need a DIN9-to-DB25 Male high-
  speed modem cable.

  Make sure that the cable is labeled a "high speed" cable, because some
  older Macintosh cables are configured with their handshaking lines
  tied high, which makes them useless for high-speed serial connections.

  You will also need a null modem adapter, available at Comp USA, Radio
  Shack, and similar outlets, and a DB25 Female-to-DB25 Female serial
  gender changer to connect the two serial cables.

  I have heard that Mac printer cables are really null modem cables in
  disguise, but I can't confirm this.  Some of them are DIN9-to-DIN9
  anyway, and wiring one into a serial link would be more trouble than
  it's worth.

  If this sounds like Greek to you, read the Serial-HOWTO for details of
  RS-232 cable configurations and data transmission protocols.

  Before connecting the Mac and the Linux machines, you should determine
  that you have a working serial port on both machines, either by
  connecting a modem and dialing out to another computer with minicom
  (Linux), ZTerm (Mac), kermit (either), or the communications program
  of your choice.

  The latest version of minicom is available from
  sunsite.unc.edu/pub/Linux/apps/serialcomm/dialout and mirror sites.

  ZTerm is a complete, easy to use comm program.  Unfortunately, it's
  shareware.  A current version is available from mac.archive.umich.edu
  and outlets like it.

  The kermit program has been ported to every computer and operating
  system in existence.  The archives are located at
  ftp.columbia.edu/kermit.

  You should strongly consider using kermit on both machines at this
  stage at least, because 1) it's free (although it's not covered by the
  Free Software Foundation's General Public License); and 2) it's a lot
  less confusing to have kermit on both machines than two completely
  different communications programs.

  If you have another way to determine that the serial ports of the two
  machines are operational, feel free to use that.  The point is to
  ensure that both machines have working serial ports.

  Making the actual serial connection should be easy, given the
  directions above.  In case it isn't, the connection looks like this:

   Linux PC    DB9- or DB25-  Null     Gender   DIN9-to-       MacBox
   ---------   to-DB25 male   Modem    Changer  DB25 Mac      --------
   |       |   serial cable. |     |  |     |   Serial Cable  |      |
   |       |-----------------|     |--|     |-----------------|      |
   |       |                 |     |  |     |                 |      |
   ---------                  Adapter                         --------

  3.  Client-server connection with kermit.

  This is the most transient of all the configurations described here.
  It requires the least amount of system configuration, although in
  operation, it is the more difficult to use of the systems described
  here.

  In brief, you start kermit on both the Linux machine and the Mac, and
  place one of them in server mode.  It doesn't matter which machine is
  the client ant which is the server, because this is a peer-to-peer
  connection.  However, the Linux kermit can take advantage of Linux's
  superior scripting abilities, so it seems logical (to me at least) to
  designate the Linux-side kermit as the server, because this is the
  more readily automated task.

  You should ensure that kermit is installed correctly on both the Mac
  and the Linux PC.  Follow the instructions in the respective kermit
  distributions.  On the Linux machine type kermit at the shell prompt
  to start it.  You may need root permissions in order to set the port
  and baud rate.

  kermit, the recent POSIX versions for Unices, supports baud rates up
  to 115 Kbps.  The more recent Macintosh versions support serial port
  speeds up to 57.6 Kbps.  This should be more than sufficient for any
  dumb tty-type application, but if you need a higher-speed connection,
  you're s.o.l, as far as kermit and serial lines are concerned.
  However, kermit provides facilities for communication over a TCP/IP
  link, but I haven't been able to test it.  See the alternative in the
  following sections.  Just remember, especially on the Mac side, to use
  a different port for kermit serial connections than your TCP/IP
  connections, because Mac kermit will rudely hose a serial port that is
  already in use.

  With that in mind, your .kermrc file would contain something like
  this:

  echo Executing site initialization file /usr/local/bin/ckermit.local.ini....
  set prompt Chanel3 >
  set line /dev/ttyS0
  set baud 38400
  set send packet-length 2000
  set receive packet-length 2000
  set block 3
  set file type binary

  Then, in your ~/.kermrc file, you would have a line like

  take /usr/local/bin/ckermit.local.ini

  On the Macintosh side, set the same communication parameters for bps,
  stop bits, parity, and word length.  Some older versions of Mac Kermit
  do not support 2k packets, so you might need to set a smaller packet
  size.  Howerver, kermit sets the communication packet length based on
  the receive packet-length setting, so you need to set a shorter packet
  size on the Linux end, too.

  To actually communicate over the link, you need to enter server mode
  on either the Mac or Linux side.  It doesn't matter which.  See the
  kermit docs for details of server mode.

  3.1.  Macintosh resources.

  This is one of the very few kermit applications where setting a text
  file type for transfers is useful.  This is because Macintosh files
  have two parts: the data fork and the resource fork.  The data fork
  corresponds to what we in the Linux world think of as a file: it's the
  actual data.  The resource fork contains bitmaps for the icons,
  keymaps, font specifications, and the like.  If you transfer a file
  from Linux to the Mac, the file won't be recognized as a text file by
  the Mac, if you use binary mode.

  When transferring binary files between the two systems, you should use
  the Macintosh .hqx BinHex format, which is a 7-bit encoding of an
  8-bit data file.  Mac utilities like BinHexer or StuffIt will covert
  the file to its binary form.

  If you have a text file which inadvertently ends up as a data-only
  file on the Mac, it's likely that it won't even appear in an Open
  dialog list box.  What you need to do is open the file with ResEdit,
  which is available from mac.archive.umich.edu.  ResEdit will tell you
  that the file you're opening has no resource fork and then asks if you
  would like to add one.  You should answer "Yes" to this question.  You
  can then edit the file's Type and Creator by selecting the Open
  Special option of the File menu.  All Macintosh text files are type
  TEXT, so replace the question marks in the Text box with that.  The
  Creator code depends on your text editor or word processor.  Each one
  is unique, incidentally, and is how the Mac identifies different apps.
  The Creator code for GNU Emacs on the Mac is EMAC, for example.  If in
  doubt what the creator code of your text editor or word processor is,
  use ttxt, which is the creator code for TeachText (which is the Mac
  equivalent of EDLIN.EXE.)  Then your real word processor or text
  editor can translate the file from TeachText to its native type.
  There are many other neato things which TeachText can do, so it's
  worthwhile to keep it permanently on your Mac.  The book Voodoo Mac,
  by Kay Yarborough Nelson, is a good source of tried-and-true Macintosh
  tricks that use ResEdit, TeachText, the Finder, and other overlooked
  programs.

  4.  Logging in via kermit.

  Configuring Linux to use the Mac as a login: terminal is even easier.
  kermit is ideal for this purpose, because it is one of the few free
  communication programs which provides credible VT100/120/220
  emulation.

  Essentially, what you want to do is start kermit on the Macintosh side
  as in the previous section, but rather than issue server commands, you
  enter connect mode.  This is the normal terminal emulation mode that
  most people use, anyway.

  On the Linux side, the serial line must be configured with a getty on
  it to start a login: shell.  To do this, you need to tell init that
  the serial line has a terminal on it.  In your /etc/inittab file you
  will need a line something like this:

  T1:23:respawn:/sbin/getty -L ttyS0 9600 vt100

  Be sure to substitute the appropriate serial device for /dev/ttyS0 and
  the correct baud rate for 9600 in the command line above.

  This command tells getty to start login (the -L switch) on the
  terminal display, and, when the login times out, to re-start (respawn)
  the login program until someone logs in.  If no device is connected to
  the serial line, or if the connection is defective, you may see a
  message on the system console like: /dev/ttyS0 respawning too fast:
  disabling for 5 minutes.  If this happens, you can return things to
  normal by (as root) killing the getty process, or using the init q
  command.  Both of them have the effect of re-spawning the getty
  processe(s).  If everything is in order, you should see the Linux
  banner and login prompt on the Mac's kermit window.  That's all there
  is to it.

  Also, if you use something besides vanilla getty, like getty_ps, the
  command above will look somewhat different.  The important thing to
  remember is that everything to the right of /sbin/getty is an argument
  for getty itself; not init.  You should look at the manual pages for
  getty, init,and inittab if you have questions concerning the setup of
  init and getty.

  The Serial HOWTO provides helpful details on how to configure
  /etc/inittab for getty_ps, if that's what your system uses.

  To transfer files back and forth between the Macintosh and the Linux
  machine, you can (via the Mac's Kermit) issue the kermit -x command to
  start the Linux kermit in server mode.  You can then use the normal
  file transfer commands to send files across the serial line.  It's
  useful to set a prompt in your ~/.kermrc with a line like

  set prompt Linux-kermit >

  Otherwise, remembering which machine you're on can quickly become con
  fusing.

  4.1.  Other Mac terminal programs.

  This method should work equally well for any other Mac terminal
  program.  If you have ZTerm, you can use rz and sz on the Linux
  machine to transfer files via the ZModem protocol.  If Microphone Lite
  came bundled with your fax modem, that works equally well, albeit
  without kermit's superior scripting and configuration facilities.

  5.  Conclusion.

  If you have questions about any of this material, or suggestions for
  future directions of Mac-Linux serial-line connectivity, don't
  hesitate to drop me a line at kiesling@terracom.net.

  Linux Mail-Queue mini-HOWTO
  Leif Erlingsson, leif@lege.com, Jan P Tietze, jpti
  etze@mail.hh.provi.de
  v2.02, 3 September 1997, sendmail 8.8.7

  Queue Remote Mail + Deliver Local Mail The Configuration Changes Nec
  cessary to Make Sendmail Deliver Local Mail ***Now*** While Stashing
  Remote Mail in The Queue Until "I Say So".
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. NON dial-on-demand solutions PART

     2.1 Starting sendmail
     2.2 Configuring sendmail
        2.2.1 Configuring sendmail.cf directly, for trivial configurations
        2.2.2 Configuring sendmail.cf using m4 source
     2.3 Menu support suggestions

  3. Dial-on-demand solutions PART

     3.1 Configuring sendmail.cf
        3.1.1 Configuring sendmail.cf directly, for trivial configurations
        3.1.2 Configuring sendmail.cf using the m4 source.
     3.2 Adding dial delay
        3.2.1 Configuring sendmail.cf directly
        3.2.2 Configuring sendmail.cf using m4 source

  4. Delivering e-mail

     4.1 How to have e-mail delivered at special times.


  ______________________________________________________________________

  1.  Introduction

  The document is written by two authors. The NON dial-on-demand
  solutions part (oldest part) is written by Leif Erlingsson
  <leif@lege.com>, and the newer dial-on-demand solutions part is
  written by Jan P Tietze <jptietze@mail.hh.provi.de>.



  2.  NON dial-on-demand solutions PART

  Written by Leif Erlingsson <leif@lege.com>.

  The original version of this part contained a lot of unnecessary
  stuff.  This is all it takes, really...


  2.1.  Starting sendmail

  Slackware et al:        /etc/rc.d/rc.M:



       echo "Starting sendmail daemon (/usr/sbin/sendmail -bd -os) [queue only mode]..."
       /usr/sbin/sendmail -bd -os      # NOT "-bd -q 15m", the "standard" flags!


  RedHat et al:           /etc/rc.d/init.d/sendmail.init:



       echo -n "Starting sendmail: [queue only mode]"
       daemon sendmail -bd -os         # NOT daemon sendmail -bd -q1h



  The -os is not really essential, all it does is this:



       SuperSafe [s] Be super-safe when running things, i.e.,
               always instantiate the queue file,  even  if
               you are going to attempt immediate delivery.
               Sendmail always instantiates the queue  file
               before  returning  control  the client under
               any  circumstances.   This   should   really
               always be set.



  This should already be configured in the default sendmail.cf anyway.


  2.2.  Configuring sendmail

  Serious sendmail users use the m4 source for this. I recommend this
  solution if you ever plan on upgrading sendmail and also make anything
  but trivial changes to sendmail.cf.

  If you never intend to fix sendmail so envelope return headers et al
  works even though you might be on dynamic dial in IP or something,
  then you may not need to get the m4 source.


  2.2.1.  Configuring sendmail.cf directly, for trivial configurations

  This way of doing things is extremeley version dependent vs.
  sendmail.cf versions. The following solution is *only* valid for
  sendmail-8.8.x.

  Edit /etc/sendmail.cf:



       # avoid connecting to "expensive" mailers on initial submission?
       O HoldExpensive=True



  ... later ...



  #####  @(#)smtp.m4      8.33 (Berkeley) 7/9/96  #####

  Msmtp,          P=[IPC], F=mDFMuXe, S=11/31, R=21, E=\r\n, L=990,
                  T=DNS/RFC822/SMTP,
                  A=IPC $h
  Mesmtp,         P=[IPC], F=mDFMuXae, S=11/31, R=21, E=\r\n, L=990,
                  T=DNS/RFC822/SMTP,
                  A=IPC $h
  Msmtp8,         P=[IPC], F=mDFMuX8e, S=11/31, R=21, E=\r\n, L=990,
                  T=DNS/RFC822/SMTP,
                  A=IPC $h
  Mrelay,         P=[IPC], F=mDFMuXa8e, S=11/31, R=61, E=\r\n, L=2040,
                  T=DNS/RFC822/SMTP,
                  A=IPC $h



  The important flag above is ``e''. Don't fuss if the other flags look
  different in your file. Keep your flags as-is, only add ``e'' to your
  flags according to the above examples, unless it's there already.
  ``e'' marks the mailers as ``expensive''.


  2.2.2.  Configuring sendmail.cf using m4 source

  In the following I will, for simplicity, assume that the sendmail
  version is 8.8.7. If you have a different version, replace 8.8.7 with
  that version number below! Also, the instructions will not work for
  older versions of sendmail. Get the latest sendmail!


  Download the sendmail source.  Try ``http://WWW.Sendmail.ORG'' or
  possibly ``ftp.sendmail.org''.


  I also recommend that you obtain my patch for allowing envelope sender
  reverse aliasing and other nice stuff to really make you take control
  over your mail environment.

  Write to ``Sendmail Patch <sendmail@lege.com>'', Subject:
  ``sendmail-8.8.7'', if 8.8.7 is your sendmail version.

  They are also available from ``http://www.lege.com'', as is the sgml
  source of this mini-HOWTO!

  You don't have to get my patches in order to get ``Queue Remote Mail +
  Deliver Local Mail'' to work. My patches solve other things. But I
  just thought this would be a nice place to mention them, as many Linux
  users will find them extremely useful.  (They will even give you
  properly working virtual domains, if you like. The virtual domains
  don't have to be ``local''. They will give you ``xaliases'', or in
  other words ``reverse aliasing''.)

  Unpack the sendmail source. You may get /usr/src/sendmail-8.8.7/.  cd
  /usr/src/sendmail-8.8.7/cf

  Now overlay my patch, if you want it, otherwise skip this step: If you
  don't want to use procmail as Local Delivery Agent, save away your
  /usr/src/sendmail-8.8.7/cf/ostype/linux.m4 before doing this...  Save
  my patch to ``/tmp/sendmail-8.8.7-cf-cpio-idcmu.gz'', then...



  cd /usr/src/sendmail-8.8.7/cf
  gzip -dc < /tmp/sendmail-8.8.7-cf-cpio-idcmu.gz | cpio -idcmu



  If you didn't want to use procmail, write back the saved copy of
  /usr/src/sendmail-8.8.7/cf/ostype/linux.m4 again.

  And regardless of if you applied my patch or not, you must make sure
  these lines or very similar ones are added to
  /usr/src/sendmail-8.8.7/cf/cf/yourhostname.smtp.mc (but if you applied
  my patch you may want to investigate filenames containing the word
  ``elijah'', under /usr/src/sendmail-8.8.7/cf):



       dnl # Defer Delivery to "expensive" mailers until next time the
       dnl # queue is processed using "O HoldExpensive=True" and make
       dnl # sure smtp mailers are "expensive".
       dnl # (See original "sendmail" book Chapter 30: Options,
       dnl # "Oc - Don't connect to expensive mailers", or
       dnl # 2nd Edition "sendmail" book Chapter 34.8.29,
       dnl # "HoldExpensive (c), Queue for expensive mailers".)
       dnl #                           / Leif Erlingsson <leif@lege.com>
       define(`confCON_EXPENSIVE', `True')
       define(SMTP_MAILER_FLAGS, e)
       MAILER(local)dnl
       MAILER(smtp)dnl



  2.3.  Menu support suggestions

  The 1.x versions of this document contained Menu support suggestions
  for /var/X11R6/lib/fvwm/system.fvwmrc. I have dropped those in the
  current version, but they are available on request:


  Write to ``Menu support suggestions <fvwmrc@lege.com>'', Subject:
  ``Menu support suggestions''



  3.  Dial-on-demand solutions PART

  Written by Jan P Tietze <jptietze@mail.hh.provi.de>.

  Many Linux users access the Internet through a dialup line, and many
  have decided to implement dial-on-demand facilities on their system.
  That is, whenever an IP packet of some sort has to leave the local
  network or the local host, the link to an Internet Service Provider
  (ISP) will automatically be established. The link will be dropped
  after some period of time that no packet has travelled across.

  Although this is very comfortable and cost effective, there is one
  special case in which this is neither comfortable (as the time to
  bring up a "traditional" modem dialup is very noticeable) nor cost
  effective, and this is sending e-mail. E-Mail is commonly sent by
  SMTP, either delivered by your own system or through a SMTP host on
  the Internet that usually resides in your ISP's network.

  With dialup lines, every time you send a message the link will have to
  be brought up. This is quite okay if you send only one message, but if
  you happen to create and send multiple messages, bringing up the line
  more than once can be tedious and cost ineffective. Also, if your ISP
  imposes limits as to what times you are allowed to login, this would
  also restrict you to postpone messages at certain times of the day,
  and you would have to manually send them later.

  Section 1 of this document will solve the situation, however in
  situations where an external DNS lookup would cause the link up, the
  link will still be established even if e-mail is just being queued.
  The reason is that sendmail wishes to "canonify" host names.

  The solution to this problem is twofold: First, we'll have to
  moderately change sendmail.cf. And then we have to define the process
  of actual mail delivery. Personally, I prefer to have cron do the job
  for me and describe the necessary changes below.


  3.1.  Configuring sendmail.cf

  For the reasons stated in [1.2], I recommend modifying the m4 sources
  instead of editing sendmail.cf directly. It will actually save you a
  lot of hassle and make configuration changes more verbose.

  First, perform all the changes described in the first part of this
  document. Then go through the dial-on-demand specific stuff.


  3.1.1.  Configuring sendmail.cf directly, for trivial configurations

  Configuring directly is highly impractical and anything but verbose,
  but obviously, this is your decision.

  Close to very bottom of your sendmail.cf should be a line that reads:



       R$* < @ $* $~P > $*             $: $1 < @ $[ $2 $3 $] > $4



  Precede that line with a "#" so that it reads



       #R$* < @ $* $~P > $*            $: $1 < @ $[ $2 $3 $] > $4



  3.1.2.  Configuring sendmail.cf using the m4 source.

  Add the following line to
  /usr/src/sendmail-8.8.7/cf/cf/yourhostname.smtp.mc:



       FEATURE(nocanonify)dnl



  Your final sendmail.cf can then be built by issuing the following
  commands. Remember to always back up your old /etc/sendmail.cf before
  installing the new one:
       cp /etc/sendmail.cf /etc/sendmail.cf.bak
       cd /usr/src/sendmail-8.8.7/cf/cf
       m4 yourhostname.smtp.mc > /etc/sendmail.cf



  3.2.  Adding dial delay

  It is oftentimes useful, especially when using modem lines, to have a
  dial delay installed. This means that if sendmail tries to initiate a
  connection in an attempt to send an e-mail (and this causes the line
  to go up) but the link actually takes more time to get established
  than what sendmail thinks should be a reasonable timeout, sendmail
  will simply wait some seconds and then retry.


  3.2.1.  Configuring sendmail.cf directly

  Somewhere in your sendmail.cf could be a line that would read:



       #O DialDelay=10s



  (or very similar). Delete the ``#''. If there's no ``#'' at the
  beginning of the line, things should be considered okay (it just means
  this had already been enabled before).

  If there is no such line in your sendmail.cf, add one (it is a wise
  thing to do to add this in the "options" part of the file):



       O DialDelay=10s



  Now change the ``10s'' part to the number of seconds you deem
  suitable.


  3.2.2.  Configuring sendmail.cf using m4 source

  Add the following line to
  /usr/src/sendmail-8.8.7/cf/cf/yourhostname.smtp.mc:



       define(`confDIAL_DELAY',`10s')



  Now change the ``10s'' part to the number of seconds you deem
  suitable.

  Your final sendmail.cf can then be built by issuing the following
  commands. Remember to always back up your old /etc/sendmail.cf before
  installing the new one:

       cp /etc/sendmail.cf /etc/sendmail.cf.bak
       cd /usr/src/sendmail-8.8.7/cf/cf
       m4 yourhostname.smtp.mc > /etc/sendmail.cf



  4.  Delivering e-mail

  E-Mail delivery can be invoked by issuing the command "sendmail -q".
  For those who are interested in what sendmail actually does, "sendmail
  -q -v" will give a more verbose version of the delivery process.

  It is very convenient to automate the process of e-mail delivery. A
  tool commonly used for this process is cron.


  4.1.  How to have e-mail delivered at special times.

  Edit your crontab:



       crontab -e



  Add lines of the form:



       05 18-23,0-7    * * Mon,Tue,Wed,Thu,Fri /usr/sbin/sendmail -q
       05 *            * * Sat,Sun             /usr/sbin/sendmail -q



  Please refer to the crontab man page (available through "man 5 \
  crontab") for further information. I think the format is pretty
  obvious. The example crontab entries shown above send e-mail (if, and
  only if, e-mail is available from the queue) 5 minutes after an hour
  on weekdays, starting at 6:05 pm, and stopping at 7:05 am.  On
  weekends, e-mail is delivered 5 minutes after an hour, starting at
  12:05 pm on Saturday, and stopping 11:05 pm on Sunday.

  As a dial-on-demand user, it is sometimes desirable to have your
  system collect your e-mail via the POP3 protocol at certain times of
  the day. You could therefore add an entry similar to the following to
  your crontab:



       0 21            * * * popclient -3 -u <your pop3 user name
       goes here> -p <put your password here> -o /var/spool/mail/<the user
       on your system that should receive the collected e-mail>
       <mailhost.somedomain.com>



  Of course, this should all go on a single line.

  Then, save the file and leave the editor. The crontab should now be
  installed.
  Mail2News Mini-Howto
  Rick Dean <howto@fdd.com>
  v2.0, 1 July 1999

  This document describes how to feed a mailing list to a news server.

  1.  Copyright, Distribution, etc.

  1.1.  What is this?

  This document describes how to feed a mailing list to a news server
  using a Linux box.  It is called a mini-HOWTO, specifically the
  Mail2news mini-HOWTO.


  1.2.  Copyright and such

  Copyright (c) 1999, Rick Dean.
  Copyright (c) 1996, Robert Hart.


  The authors retain their copyright of this document.  You are hereby
  granted permission to redistribute this document in whole or in part
  as long as it includes this copyright notice.  Commercial
  redistribution is allowed and encouraged.  All translations or
  derivative works of this document must be covered under this copyright
  notice, and without additional restrictions on distribution.  This
  arrangement is also known as a copyleft.


  This copyright notice, itself, is hereby placed in the public domain.
  You may copy it without atribution.


  1.3.  Where can I get this HOW-TO?

  The latest version of this document is available at
  http://fdd.com/howto/ <http://fdd.com/howto/>.


  Many Linux distributions include mini-HOWTOs in the /usr/doc/HOWTO
  directory.


  This mini-HOWTO like most Linux mini-HOWTO's was written initially is
  SGML.  This allows the text to be automatically translated to many
  formats including text, HTML, PostScript, etc.  Those other formats
  are available somewhere.


  More information about Linux documentation can be found at the Linux
  Documentation Project <http://www.redhat.com/mirrors/LDP/>, and so
  many other places.


  1.4.  Document history


    Version 1.0 was written by Robert Hart <hartr@redhat.com> in 1996

    Version 2.0 was written by Rick Dean <howto@fdd.com> in 1999

  2.  Overview

  2.1.  What? Why? and some definitions

  This document describes how to feed a mailing list to a news server
  using a Linux box.  It is called a mini-HOWTO, specifically the
  Mail2news mini-HOWTO.


  A mailing list (also known as a remailer), is an address where e-mail
  will be resent to a list of other addresses.  This is useful for
  colaboration of geographically disperse groups.  Many standards bodies
  like the working groups of the IETF use mailing lists.


  Unfortunately, if one is subscribed to several mailing lists, one's
  inbox may be routinely flooded.  Furthermore, some companies (such as
  3Com) specify which e-mail client (such as Lotus Notes) their
  employees must suffer with.  Redirecting these e-mails to a news
  server frees people to choose a news reader and utilize refined
  features specifically designed for the task (of deriving signal from
  noise).


  News servers started on the Internet long ago, many years before the
  WWW.  They (and the news reader clients) have features such as...

    threading - responses are grouped with the e-mails they refer to

    read indication - the computer keeps track of what you have seen
     (even across newsgroups!) so you don't have to.

    subject kill - mark threads as read by thread.

    archiving

    segregation by newsgroup (i.e. mailing list)

    a quick standardized method subscribing/unsubscribing

    and more..


  A big focus of news servers is sharing news between servers.  The
  largest of these groups became known as USENET.  This mini-HOWTO does
  not address that.  You could share the newsgroups created with this
  mini-HOWTO on your own, but you will live just fine without it.  Like
  a web server, ubiquitous Internet connectivity has made centralized
  news servers acceptable.  Furthermore, recent benchmarks have shown
  single-processor Linux boxes can handle 1300+ HTTP hits per second, so
  scalability is a minor issue.


  Athough you do not need to own the mailing list to use mail2news, it
  is a good idea to own the news server.


  2.2.  Assumed environment

  This document assumes you are using Linux, but other Unices are nice.
  Currently only sendmail (for a mail delivery agent) is described, but
  as qmail grows in popularity (in part because it is easier to
  configure).  Hopefully someone with submit configuration notes for it
  too.  For a news server, this document describes innd.  It is pretty
  dominant as news servers go, but any NNTP compliant one should work.
  A bit of glue called mail2news.pl is a perl script, thus you need the
  Perl interpreter, but it is very common and probably already
  installed.  Finally, I assume you are running all this (except the
  mailing list remailer) on one machine.  Dividing it up is left as an
  exercise for the reader. :-)


  At the time of this writing this mini-HOWTO was only tested against a
  RedHat-6.0 distribution.  As a good computer scientist, you should not
  believe anything works until it has been specifically tested.  Any
  feedback or notes relating to other distributions would be welcomed by
  the author.


  For most of this mini-HOWTO you will need root access unless otherwise
  specified.


  2.3.  Methodology

  This mini-HOWTO is presented backwards, as this is the easiest way to
  build and debug it.  Backwards means we start with the newsreader and
  work upstream to the mailing list remailer, the opposite direction of
  normal data flow.  This systems uses several hairy pieces (like
  sendmail and innd) which are sizeable mini-HOWTO's in thier own right.


  2.4.  Not covered

  This mini-HOWTO does not cover...

    setting up a mailing list remailer.

    exchanging news between news servers.

    a complete list of things not covered.


  Please do not e-mail me about these subjects (or SPAM).


  3.  The news reader

  3.1.  Netscape

  Netscape comes with an integrated news reader.  The easy way to
  subscribe to a group is type in (or click on) a link like


       news://fuji.sfour.com/ietf.confctrl

  Once you have subscribed, you only need to go to the message center.
  This can be done by clicking on the small talk balloons icon in the
  bottom right of a browser window.


  3.2.  Free Agent

  Free Agent is a wonderful news reader by Forte for Windoze.  See
  http://www.forteinc.com/agent/freagent.htm

  3.3.  trn and friends

  The old command line newsgreaders like trn and tin are a good standby.
  Be sure to set the environment variable NNTPSERVER first.  For
  example...


       export NNTPSERVER=fuji.sfour.com
       trn

  4.  The news server

  4.1.  Installing the news server

  You need to install a news server.  I used inn but others are
  available (somewhere).


  Preferably just check the "News Server" box during your initial
  install, but alternatively if your distribution uses RPM (RedHat
  package manager), then use something like...


       rpm -i inn-2.2.9.i386.rpm

  4.2.  Running the newsserver

  To manually start or stop the news server, use a command like


       /etc/rc.d/init.d/innd start

  or


       /etc/rc.d/init.d/innd stop

  or


       /etc/rc.d/init.d/innd restart

  To have the news server start at boot you could add a command like
  this to end of /etc/rc.d/rc.local, but that is not the best.  Many
  distributions have a graphical tool for choosing which daemons run.
  You can also try the command line program


  setup

  or


       chkconfig --add innd

  4.3.  Creating the newsgroup

  innd is pretty picky about permissions and ownership.  For much of the
  news config you will need to be the user news.  To become this user
  from root...


               su - news

  Using ctlinnd, create the newsgroup on your news server. Remember,
  the newsgroup will be local, so start it with a distinctive name so
  you can filter it out from your news distributions if you do that
  stuff.  I shamelessly named my newsgroup ietf.confctrl.  The words
  from left to right go from less to more specific.


  You also need to tell innd that the group is moderated (by using
  ctlinnd).  Indicating a moderated group is done by specifying m to the
  newgroup command.  For example...


               ctlinnd newgroup ietf.confctrl m confctrl@isi.edu

  The newsgroup is set up as a moderated group, as this allows us to
  take advantage of the email capabilities of innd. Any messages posted
  to a moderated group are not immediately submitted to the group.
  Instead, messages are emailed to the moderator of the group.  In our
  example confctrl@isi.edu is the address which is resent by the
  remailer.


  If you are sharing news with other servers, remember to edit your
  newsfeeds so that this group is not not distributed (unless you
  specificaly wish this to occur).


  4.4.  Unrestricting access

  By default the news server, doesn't let any clients read news, so I
  needed to disable the user authentication of innd.  This was done in
  the /etc/news/nnrp.access.  Check out the nnrp.access man page to
  learn the syntax of this file.  I changed the first non-comment line
  to ...

  *:Read Post:::*

  If you want a username/password, fill in the 3rd and 4th (colin
  separated) fields.  For more information on the syntax, check the man
  page...


       man nnrp.access

  4.5.  Changing permissions of /usr/bin/rnews

  I had to change the permissions of /usr/bin/rnews.  It was not world
  read/executable, but sendmail runs scripts as nobody.


       chmod a+rx /usr/bin/rnews

  4.6.  Testing article posting

  If you copy the following article to a file named rick.article...

  ______________________________________________________________________
  Path: rick
  From: rick@fdd.com
  Message-ID: <199907120548.AAA05475@fdd.com>
  Subject: test
  Date: Mon, 12 Jul 1999 00:48:49 -0500 (CDT)
  Newsgroups: ietf.confctrl
  Approved: ietf-confctrl@kepler.hedland.edu.au
  NNTP-Posting-Host: localhost
  Organisation: (mail2news gateway)


  test
  ______________________________________________________________________

  Then you should be able to post a file with...


       /usr/bin/rnews -r localhost <rick.article

  4.7.  Did it work?

  You don't need to wait for the article to show up as unread, just look
  at the /var/spool/news/articles/ subdirectories for files being
  created.
  4.8.  Increasing expiration times

  You may want to increase the expiration time for articles of your new
  newsgroup.  In my case I wanted them never to expire, so I added the
  following line....


       ietf*:A:never:never:never

  ....to the /etc/news/expire.ctl file.


  To learn more about the syntax of this file type...


       man expire.ctl

  5.  The posting script & perl

  5.1.  What is Perl?

  Perl stands for Practical Extension and Report Language.  It is very
  popular for small scripts which manipulate text which is exactly what
  we need.


  Perl is installed by default on almost every Unix system.


  5.2.  Location of perl

  If you perl intepreter is in an unusual place (not /usr/bin/) then you
  will have to modify the first line of the script.  If this line is
  wrong, on my 2.2 kernel system I get "bash:
  /usr/local/bin/mail2news.pl: No such file or directory" Can we please
  change this to "bash: /usr/local/bin/mail2news.pl: Interpreter not
  found.  Check first line of script." ?


  5.3.  The mail2news.pl script

  ______________________________________________________________________
  #!/usr/bin/perl

  ($program = $0) =~ s%.*/%%;

  #( $version  ) = $] =~ /(\d+\.\d+).*\nPatch level/;
  #die "$program: requires at least version 3 of perl\n"
  #        if $version < 3;

  # $news_poster_program = "/usr/bin/inews";
  # $news_poster_options = "-h -o \"mail2news gateway\"";
  $news_poster_program = "/usr/bin/rnews";
  $news_poster_options = "-r localhost";
  $postinghost = "localhost";

  if ($#ARGV < 0) {
      # $newsgroup = "test";
      # we'll expect the newsgroup line in the body
  } elsif ($#ARGV == 0) {
      $newsgroup = $ARGV[0];
  } else {
      die "usage: $program [newsgroup]\n";
  }

  # in case inews dumps core or something crazy
  $SIG{'PIPE'} = "plumber";
  sub plumber { die "$program: \"$news_poster_program\" died prematurely!\n"; }

  open (INEWS, "| $news_poster_program $news_poster_options") ||
      die "$program: can't run $news_poster_program\n";

  # header munging loop
  while (<STDIN>) {
     last if /^$/;

     # transform real from: line back to icky style
     s/^From:\s+(.*) <(.*)>/From: $2 ($1)/;

     s/Message-Id/Message-ID/;

     # transform from_ line to path header; also works locally
     s/^From\s+(\S+)@(\S+).*/Path: $2!$1/
       || s/^From\s+(\S+)[^@]*$/Path: $1\n/;

     print INEWS
  #       if /^(Date|From|Subject|Path|Newsgroups|Organization|Message-ID):/i;
     if /^(Date|From|Subject|Path|Newsgroups|Message-ID):/i;
     $saw_subject |= ( $+ eq 'Subject' );

     $saw_msgid |= ( $+ eq 'Message-ID' );

  #   $saw_newsgroup |= ( $+ eq 'Newsgroups' );
  }

  warn "$program: didn't expect newsgroup in both headers and ARGV\n"
      if $newsgroup && $saw_newsgroup;

  die "$program: didn't get newsgroup from either headers or ARGV\n"
      unless $newsgroup || $saw_newsgroup;

  $approved = $newsgroup;
  $approved =~ s/\./'-'/eg;

  ($sec,$min,$hour,$mday,$mon,$year)=localtime(time);
  $madeupid = "\<$year$mon$mday.$hour$min$sec.$$\@kepler.hedland.edu.au\>";

  printf INEWS "Newsgroups: %s\n", $newsgroup if $newsgroup;
  printf INEWS "Approved: %s\@kepler.hedland.edu.au\n", $approved;
  print  INEWS "Subject: Untitled\n" unless $saw_subject;
  printf INEWS "Message-ID: %s\n", $madeupid unless $saw_msgid;
  printf INEWS "NNTP-Posting-Host: %s\n", $postinghost;
  print  INEWS "Organisation: (mail2news gateway)\n";
  print  INEWS "\n";

  print INEWS while <STDIN>;   # gobble rest of message

  close INEWS;
  exit $?;
  ______________________________________________________________________

  I saved the script in /usr/local/bin (and will use this path
  throughout the HOWTO).


  Be sure to make the script executable by all, but not writable by
  group or other.  Sendmail is picky.


       chmod a+x /usr/local/bin/mail2news.pl
       chmod go-w /usr/local/bin/mail2news.pl

  or


       chmod 555 /usr/local/bin/mail2news.pl

  for short.


  5.4.  How do I know if the script is running?

  I tested this script by changed my news poster from /usr/bin/rnews to
  /bin/cat.  I then saved an e-mail send to myself in a file.  Finally I
  ran the mail2news.pl on the saved mail and captured the output to a
  file.

       /usr/local/bin/mail2news.pl ietf.confctrl </tmp/savedMailFile >/tmp/article

  5.5.  What is with the Aussie?

  Yes, the output of your posting script should contain the e-mail
  address of an austrailian.  My guess is that the Austrailian's address
  is trusted address in your news configuration (althogh I could not
  find it in mine) for approving moderated postings.

  5.6.  What do you mean $PATH?

  If the mail2news.pl script is not in my path, I get the error bash:
  mail2news.pl: command not found.  You will need to either add this
  directory to your path


       PATH=$PATH:/usr/local/bin

  (which only works for the current login) or give an absolute path when
  you run the script


       /usr/local/bin/mail2news.pl

  To view your current path type


       echo $PATH

  6.  The local mailer daemon

  6.1.  Enabling alias files

  This document only describes modifying sendmail.  Many people prefer
  qmail.


  Out of the box, sendmail does not come with the "pipe to program"
  feature enabled.  Rightly so, this feature is a security risk.  It
  enambles users to have their mail fed to a program instead of appended
  to a file.  (Users can configure this in thier .forward file.)


  Please don't believe me.  Test your own system first.  Much of this
  chapter might not be needed by you.


  6.2.  Documentation

  IMHO, sendmail installs with woefully insufficient documentation.


  http://www.sendmail.org/ ca/email/doc/op-sh-5.html describes the
  syntax of sendmail.cf. I hope you don't have to use it.


  This is a description of the features you are trashing in sendmail.mc
  http://www.sendmail.org/m4/features.html


  Sendmail has a man page...


       man sendmail

  6.3.  Recompiling your sendmail.cf file

  To get the "pipe to program" stuff in the aliases file to work you
  need to modify the default sendmail.cf (by modifying the sendmail.mc)
  so that the restricted shell is not used.  I suppose the proper
  solution would be to add the one program to the restricted shell list,
  but their was no man page on smrsh.  Strangely, uncommenting the smrsh
  feature didn't work, I needed to change the shell from /usr/sbin/smrsh
  to /bin/bash.  Yeah, this is slightly risky, but it was not an issue
  on my machine.  Without this change I kept getting a "Service
  unavailable" error message in the /var/log/maillog file.


  The header of /etc/senmail.mc of RedHat-6 has a bug.  The proper
  command line is...


       m4 /etc/sendmail.mc >/etc/sendmail.cf

  You need to do this when you change sendmail.mc.  Hopefully, RedHat
  will extend the super cool Makefile idea in /etc/mail You will need to
  install sendmail-cf.something.rpm first.  e.g. ...


       rpm -i sendmail-cf-8.9.3-10.i386.rpm

  Whenever you modify the sendmail.cf file, you should restart
  sendmail...


       /etc/rc.d/init.d/sendmail restart

  6.4.  Creating a mail alias

  Instead of creating a new user account, we will only create an alias.


  When modifying the /etc/aliases file, the double quotes are required.
  There cannot be a space between the first double quotes and the |
  (pipe) character, or sendmail will complain  "User unknown"


  Add a line like ...


       confctrl:   "| /usr/local/bin/mail2news.pl ietf.confctrl "

  Whenever you modify the /etc/aliases file you need to notify sendmail.

  sendmail -bi

  6.5.  Did it work?

  Check the /var/log/maillog to see if it worked, or for error messages.
  I found it useful to open up another terminal (ssh) window to watch
  the log with


       tail -f /var/log/maillog

  6.6.  Unprivledged

  If you are having trouble, and create an e-mail alias with a different
  (simpler) target program to test it, remember that sendmail runs the
  program as an unprivledged user, who probably doesn't have privledges
  to write anywhere except globally writable directories such as /tmp.


  7.  The mailing list remailer

  7.1.  Subscribing

  The method of subscribing to each e-mail list is different, although
  most involve sending some kind of e-mail message.  Please be very
  careful not to send to the replicating address of the mailgroup.  This
  is a sure way to annoy the members of the list.  Most remailers (but
  not all) have a separate address for subscribing.  In confctrl, the
  administration address is confctrl-request@isi.edu


  Some mailing lists do not let you subscribe an address you are not
  mailing from.  In this case you will need to forge the return address
  of an e-mail.


  When you successfully subscribe you should (hopefully) see a welcome
  message in the newsgroup.


  7.2.  Forging mail

  Forgeing mail is easiest to do with an old Netscape client.  It would
  accept anything for a return address.  Fortunately, modern browsers
  require you to retreive mail successfully for an address before they
  will let you send.  Thus you are required to fall back the tried and
  true method....telnet.


  7.2.1.  Looking up MX hosts

  When you speficy a web page, your browser does a DNS lookup to convert
  the domain name into an IP address.  This is a lookup of an "A"
  record.  (Also "CNAME" records are considered.)  When sending mail a
  "MX" record is looked up.  If this is missing a "CNAME" or "A" one is
  used.  Thus, to forge mail you need to do an MX lookup.


  dig mx isi.edu

  will give...


       ; <<>> DiG 8.2 <<>> mx isi.edu
       ;; res options: init recurs defnam dnsrch
       ;; got answer:
       ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6
       ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 4
       ;; QUERY SECTION:
       ;;      isi.edu, type = MX, class = IN

       ;; ANSWER SECTION:
       isi.edu.                1D IN MX        0 tnt.isi.edu.
       isi.edu.                1D IN MX        10 venera.isi.edu.

       ;; AUTHORITY SECTION:
       isi.edu.                1D IN NS        venera.isi.edu.
       isi.edu.                1D IN NS        ns.isi.edu.
       isi.edu.                1D IN NS        east.isi.edu.

       ;; ADDITIONAL SECTION:
       tnt.isi.edu.            1D IN A         128.9.128.128
       venera.isi.edu.         1D IN A         128.9.176.32
       ns.isi.edu.             1D IN A         128.9.128.127
       east.isi.edu.           1D IN A         38.245.76.2

       ;; Total query time: 448 msec
       ;; FROM: fdd.com to SERVER: default -- 127.0.0.1
       ;; WHEN: Sun Jul 25 15:49:32 1999
       ;; MSG SIZE  sent: 25  rcvd: 182

  thus you would use tnt.isi.edu.


  7.2.2.  SMTP

  Mail is delivered using the Simple Mail Transport Protocol (SMTP).
  Like most good Internet protocols, it is ASCII based to make
  troubleshooting and development easier.  I will not explain
  everything, but simply give an example.  Hopefully, this is enough.


  The protocol is line oriented.  Each email as specified in RFC822, is
  composed of headers and body which are separated by the first blank
  line (no characters, not even spaces).  SMTP specifies the end of an
  e-mail with a line containing only a period.

  halyard$ telnet tnt.isi.edu 25
  Trying 128.9.128.128...
  Connected to tnt.isi.edu.
  Escape character is '^]'.
  220 tnt.isi.edu ESMTP Sendmail 8.8.7/8.8.6; Sun, 25 Jul 1999 14:01:25 -0700 (PDT)
  helo isi.edu
  250 tnt.isi.edu Hello rick@node-d8e9822 [216.233.8.34] (may be forged), pleased to meet you
  mail from:<confctrl@fuji.sfour.com>
  250 <confctrl@fuji.sfour.com>... Sender ok
  rcpt to:<confctrl-request@isi.edu>
  250 <confctrl-request@isi.edu>... Recipient ok
  data
  354 Enter mail, end with "." on a line by itself
  From:<confctrl@fuji.sfour.com>
  Subject: help

  help


                          THE LINUX MAN-PAGE-HOWTO
                                      
              Copyright 1995-2000 by Jens Schweikhardt, email:
                          [1]<schweikh@noc.dfn.de>
                                      
                      [2]http://www.schweikhardt.net/
                                      
          See further information on [3]copying conditions below.
                                      
   Last update: January 2000. Click here to browse the [4]author's latest
   version of this document. Corrections and suggestions welcome!
   
   This HOWTO explains what you should bear in mind when you are going to
   write on-line documentation -- a so called man page -- that you want
   to make accessible via the man(1) command. Throughout this HOWTO, a
   manual entry is simply referred to as a man page, regardless of actual
   length and without sexist intention.
   
   Table of contents
     * 0) [5]A few thoughts on documentation
     * 1) [6]How are man pages accessed? 
     * 2) [7]How should a formatted man page look like?
     * 3) [8]How do I document several programs/functions in a single man
       page?
     * 4) [9]Which macro package should I use?
     * 5) [10]What preprocessors may I use?
     * 6) [11]Should I distribute source and/or already formatted
       documentation?
     * 7) [12]What are the font conventions?
     * 8) [13]How do I polish my man page?
     * 9) [14]How do I get a plain text man page without all that ^H^_
       stuff?
     * 10) [15]How do I get a high quality PostScript man page? 
     * 11) [16]How do I get apropos and whatis to work?
     * A) [17]Copying conditions
       
   0) A few thoughts on documentation
   
   Why do we write documentation? Silly question. Because we want others
   to be able to use our program, library function or whatever we have
   written and made available. But writing documentation is not all there
   is to it:
     * Documentation must be accessible. If it's hidden in some
       non-standard place where the documentation related tools won't
       find it -- how can it serve its purpose?
     * documentation must be reliable and accurate. There's nothing more
       annoying than having program behaviour and documentation disagree.
       Users will curse you, send you hate mail and throw your work into
       the bit bucket, with the firm intent to never install anything
       written by that jerk again.
       
   The historical and well known way documentation is accessed on UNIX is
   via the man(1) command. This HOWTO describes what you have to do to
   write a man page that will be correctly processed by the documentation
   related tools. The most important of these tools are man(1), xman(1x),
   apropos(1), makewhatis(8) and catman(8). Reliability and accuracy of
   the information are, of course, up to you. But even in this respect
   you will find [18]some ideas below that help you avoid some common
   glitches.
   
   1) How are man pages accessed? 
   
   You need to know the precise mechanism how man pages are accessed in
   order to give your man page the right name and install it in the right
   place. Any man page belongs to a specific section, which is denoted by
   a single character. The most common sections under Linux and their
   human readable names are
Section The human readable name
   1    User commands that may be started by everyone.
   2    System calls, that is, functions provided by the kernel.
   3    Subroutines, that is, library functions.
   4    Devices, that is, special files in the /dev directory.
   5    File format descriptions, e.g. /etc/passwd.
   6    Games, self-explanatory.
   7    Miscellaneous, e.g. macro packages, conventions.
   8    System administration tools that only root can execute.
   9    Another (Linux specific) place for kernel routine documentation.
   n    New documentation, that may be moved to a more appropriate section.
   o    Old documentation, that may be kept for a grace period.
   l    Local documentation referring to this particular system.

   The name of the source file for a man page (the input to the
   formatting system) is the name of the command, function or file name,
   followed by a dot, followed by the section. If you write the
   documentation on the format of the `passwd' file you have to name the
   source file `passwd.5'. Here we also have an example of a file name
   that is the same as a command name. There might be even a library
   subroutine named passwd. Sectioning is the usual way to resolve these
   ambiguities: The command description is found in the file `passwd.1'
   and the hypothetical library subroutine in `passwd.3'.
   Sometimes additional characters are appended and the file name looks
       for example like `xterm.1x' or `wish.1tk'. The intent is to
       indicate that this is documentation for an X Window program or a
       Tk application, respectively. Some manual browsers can make use of
       this additional information. For example xman will use `xterm(x)'
       and `wish(tk)' in the list of available documentation.
       
   Please don't use the n, o and l sections; according to the File System
   Standard these sections are deprecated. Stick to the numeric sections.
   Beware of name clashes with existing programs, functions or file
   names. It is certainly a bad idea to write yet another editor and call
   it ed, sed (for smart ed) or red (for Rocky's ed). By making sure your
   program's name is unique you avoid that someone executes your program
   and reads someone else's man page or vice versa. Checking out the lsm
   database on a program name is a place to start doing so.
   
   Now we know the name to give our file. The next decision is which
   directory it will finally get installed (say, when the user runs `make
   install' for your package.) On Linux, all man pages are below
   directories mentioned in the environment variable MANPATH. The doc
   related tools use it quite similar like the shell uses PATH to locate
   executables. In fact, MANPATH has the same format as PATH. Both hold a
   colon separated list of directories (with the exception that MANPATH
   does not allow empty fields and relative pathnames but has absolute
   names only.) If MANPATH is not set or not exported, a default will be
   used that contains at least the /usr/man directory. To speed up the
   search and to keep directories small, the directories specified by
   MANPATH (the so called base directories) contain a bunch of
   subdirectories named `man<s>' where <s> stands for the one character
   section introduced in the table above. Not all of the sections may be
   represented by a subdirectory because there simply is no reason to
   keep an empty `mano' subdirectory. However, there may be directories
   named `cat<s>', `dvi<s>' and `ps<s>' which hold documentation that is
   ready to display or print. More on this later. The only other file in
   any base directory should be a file named `whatis'. The purpose and
   creation of this file will also be described under paragraph 11). The
   safest way to have a man page for section <s> installed in the right
   place is to put it in the directory /usr/man/man<s>. A good Makefile,
   however, will allow the user to chose a base directory, by means of a
   make variable, MANDIR, say. Most of the GNU packages can be configured
   with the --prefix=/what/ever option. The manuals will then be
   installed under the base directory /what/ever/man. I suggest you also
   provide a way to do something similar.
   
   With the advent of the [19]Linux File System Standard (FS-Stnd),
   things became more complicated. The FS-Stnd 1.2 states that
   "Provisions must be made in the structure of /usr/man to support
       manual pages which are written in different (or multiple)
       languages."
       
   This is achieved by introducing another directory level that
   distinguishes between different languages. Quoting again from FS-Stnd
   1.2:
   "This naming of language subdirectories of /usr/man is based on
       Appendix E of the POSIX 1003.1 standard which describes the locale
       identification string -- the most well accepted method to describe
       a cultural environment. The <locale> string is:
       <language>[_<territory>][.<character-set>][,<version>]"
       
   (See the FS-Stnd for a few common <locale> strings.) According to
   these guidelines, we have our man pages in
   /usr/man/<locale>/man[1-9lno]. The formatted versions should then be
   in /usr/man/<locale>/cat[1-9lno] of course, otherwise we could only
   provide them for a single locale. HOWEVER, I can not recommend
   switching to that structure at this time. The FS-Stnd 1.2 also allows
   that
   "Systems which use a unique language and code set for all manual pages
       may omit the <locale> substring and store all manual pages in
       <mandir>. For example, systems which only have English manual
       pages coded with ASCII, may store manual pages (the man[1-9]
       directories) directly in /usr/man. (That is the traditional
       circumstance and arrangement in fact.)"
       
   I would not switch until all tools (like xman, tkman, info and many
   others that read man pages) can cope with the new structure.
   
   2) How should a formatted man page look like?
   
   Let me present you an example. Below I will explain it in detail. If
   you read this as plain text it won't show the different typefaces
   (bold and italics). Please refer to the paragraph "[20]What are the
   font conventions?" for further explanations. Here comes the man page
   for the (hypothetical) foo program.
FOO(1)                     User Manuals                    FOO(1)



NAME
     foo - frobnicate the bar library

SYNOPSIS
     foo [-bar] [-c config-file ] file ...

DESCRIPTION
     foo  frobnicates the bar library by tweaking internal symbol
     tables. By default it parses all baz segments and rearranges
     them  in  reverse  order  by time for the xyzzy(1) linker to
     find them. The symdef entry is then compressed using the WBG
     (Whiz-Bang-Gizmo) algorithm.  All files are processed in the
     order specified.

OPTIONS
     -b   Do not write `busy' to stdout while processing.

     -c config-file
          Use the alternate system wide  config-file  instead  of
          /etc/foo.conf.   This overrides any FOOCONF environment
          variable.

     -a   In addition to the baz segments, also parse the  blurfl
          headers.

     -r   Recursive  mode.  Operates  as fast as lightning at the
          expense of a megabyte of virtual memory.

FILES
     /etc/foo.conf
          The system wide configuration file. See foo(5) for fur-
          ther details.
     ~/.foorc
          Per  user  configuration  file.  See foo(5) for further
          details.

ENVIRONMENT
     FOOCONF
          If non-null the full pathname for an  alternate  system
          wide foo.conf.  Overridden by the -c option.

DIAGNOSTICS
     The following diagnostics may be issued on stderr:

     Bad magic number.
          The input file does not look like an archive file.
     Old style baz segments.
          foo  can  only  handle  new  style  baz segments. COBOL
          object libraries are not supported in this version.

BUGS
     The command name should have been chosen more  carefully  to
     reflect its purpose.

AUTHOR
     Jens Schweikhardt [21]<schweikh@noc.dfn.de>

SEE ALSO
     bar(1), foo(5), xyzzy(1)

Linux                Last change: MARCH 1995                    2



   Here's the explanation as I promised.
   
   The NAME section
   
   ...is the only required section. Man pages without a name section are
   as useful as refrigerators at the north pole. This section also has a
   standardized format consisting of a comma separated list of program or
   function names followed by a dash followed by a short (usually one
   line) description what functionality the program (function, file) is
   supposed to provide. By means of makewhatis(8) the name sections make
   it into the whatis database files. Makewhatis is the reason why the
   name section must exist and why it must adhere to the format I
   described. In the groff source it must look like
   
   .SH NAME foo \- frobnicate the bar library
   
   The \- is of importance here. The backslash is needed to make the dash
   distinct from a hyphenation dash that may appear in either the command
   name or the one line description.
   
   The SYNOPSIS section
   
   ...is intended to give a short overview on available program options.
   For functions this sections lists corresponding include files and the
   prototype so the programmer knows the type and number of arguments as
   well as the return type.
   
   The DESCRIPTION section 
   
   ...gives an eloquent explanation why your sequence of 0s and 1s is
   worth anything at all. Here's where you write down all your knowledge.
   This is the Hall Of Fame. Win other programmer's and user's admiration
   by making this section the source of reliable and detailed
   information. Explain what the arguments are for, the file format, what
   algorithms do the dirty jobs.
   
   The OPTIONS section
   
   ...gives a description for any option how it affects program
   behaviour. You knew that, didn't you?
   
   The FILES section
   
   ...lists files the program or function uses. For example,
   configuration files, startup files, files the program directly
   operates on. It is a good idea to give the full pathname of these
   files and to make the install process modify the directory part to
   match user preferences: the groff manuals have a default prefix of
   /usr/local, so they reference /usr/local/lib/groff/* by default.
   However, if you install using 'make prefix=/opt/gnu' the references in
   the man page change to /opt/gnu/lib/groff/*
   
   The ENVIRONMENT section 
   
   ...lists all environment variables that affect your program or
   function and tells how, of course. Most commonly the variables will
   hold pathnames, filenames or default options.
   
   The DIAGNOSTICS section
   
   ...should give an overview of the most common error messages from your
   program and how to cope with them. There's no need to explain system
   error error messages (from perror(3)) or fatal signals (from
   psignal(3)) as they can appear during execution of any program.
   
   The BUGS section 
   
   ...should ideally be non-existent. If you're brave, you can describe
   here limitations, known inconveniences, features that others may
   regard as misfeatures. If you're not so brave, rename it the TO DO
   section ;-)
   
   The AUTHOR section
   
   ...is nice to have in case there are gross errors in the documentation
   or program behaviour (Bzzt!) and you want to mail a bug report.
   
   The SEE ALSO section
   
   ...is a list of related man pages in alphabetical order.
   Conventionally, it is the last section. You are free to invent other
   sections if they really don't fit in one of those described so far. So
   how exactly did you generate that man page? I expected that question,
   here's the source, Luke:
.\" Process this file with
.\" groff -man -Tascii foo.1
.\"
.TH FOO 1 "MARCH 1995" Linux "User Manuals"
.SH NAME
foo \- frobnicate the bar library
.SH SYNOPSIS
.B foo [-bar] [-c
.I config-file
.B ]
.I file
.B ...
.SH DESCRIPTION
.B foo
frobnicates the bar library by tweaking internal
symbol tables. By default it parses all baz segments
and rearranges them in reverse order by time for the
.BR xyzzy (1)
linker to find them. The symdef entry is then compressed
using the WBG (Whiz-Bang-Gizmo) algorithm.
All files are processed in the order specified.
.SH OPTIONS
.IP -b
Do not write `busy' to stdout while processing.
.IP "-c config-file"
Use the alternate system wide
.I config-file
instead of
.IR /etc/foo.conf .
This overrides any
.B FOOCONF
environment variable.
.IP -a
In addition to the baz segments, also parse the
blurfl headers.
.IP -r
Recursive mode. Operates as fast as lightning
at the expense of a megabyte of virtual memory.
.SH FILES
.I /etc/foo.conf
.RS
The system wide configuration file. See
.BR foo (5)
for further details.
.RE
.I ~/.foorc
.RS
Per user configuration file. See
.BR foo (5)
for further details.
.SH ENVIRONMENT
.IP FOOCONF
If non-null the full pathname for an alternate system wide
.IR foo.conf .
Overridden by the
.B -c
option.
.SH DIAGNOSTICS
The following diagnostics may be issued on stderr:

Bad magic number.
.RS
The input file does not look like an archive file.
.RE
Old style baz segments.
.RS
.B foo
can only handle new style baz segments. COBOL
object libraries are not supported in this version.
.SH BUGS
The command name should have been chosen more carefully
to reflect its purpose.
.SH AUTHOR
Jens Schweikhardt <schweikh@noc.dfn.de>
.SH "SEE ALSO"
.BR bar (1),
.BR foo (5),
.BR xyzzy (1)

   3) How do I document several programs/functions in a single man page?
   
   Many programs (grep, egrep) and functions (printf, fprintf, ...) are
   documented in a single man page. However, these man pages would be
   quite useless if they were only accessible under one name. We can not
   expect a user to remember that the egrep man page is actually the grep
   man page. It is therefore necessary to have the man page available
   under different names. You have several possibilities to achieve this:
    1. have identical copies for each name.
    2. connect all man pages using hard links.
    3. symbolic links pointing to the actual man page.
    4. use groff's `source' mechanism provided by the `.so' macro.
       
   The first way is obviously a waste of disk space. The second is not
   recommended because intelligent versions of the catman program can
   save a lot of work by looking at the the file type or contents. Hard
   links will prevent catman from being clever. (catman's purpose is to
   format all man pages so that they can be displayed more quickly.) The
   third alternative has a slight drawback: if flexibility is a concern,
   you have to be aware that there are file systems that do not support
   symbolic links. The upshot of this is that the Best Thing (TM) is
   using groff's source mechanism. Here's how to do it: If you want to
   have your man page available under the names `foo' and `bar' in
   section 1, then put the man page in foo.1 and have bar.1 look like
   this:
   
   .so man1/foo.1
   
   It is important to specify the `man1/' directory part as well as the
   file name `foo.1' because when groff is run by the browser it will
   have the manual base directory as its current working directory (cwd)
   and groff interprets .so arguments relative to the cwd.
   
   4) Which macro package should I use? 
   
   There are a number of macro packages especially designed for use in
   writing man pages. Usually they are in the groff macro directory
   /usr/lib/groff/tmac. The file names are tmac.<something>, where
   <something> is the argument to groff's -m option. Groff will use
   tmac.<something> when it is given the `-m <something>' option. Often
   the blank between `-m' and `<something>' is omitted so we may say
   `groff -man' when we are formatting man pages using the tmac.an macro
   package. That's the reason for the strange name `tmac.an'. Besides
   tmac.an there is another popular macro package, tmac.doc, which
   originated at the University of California at Berkeley. Many BSD man
   pages use it and it seems that UCB has made it its standard for
   documentation. The tmac.doc macros are much more flexible but alas,
   there are manual browsers that will not use them but always call groff
   -man. For example, all xman programs I have seen will screw up on man
   pages requiring tmac.doc. So do yourself a favor: use tmac.an -- use
   of any other macro package is considered harmful. tmac.andoc is a
   pseudo macro package that takes a look at the source and then loads
   either tmac.an or tmac.doc. Actually any man page browser should use
   it but until now not all of them do, so it is best we cling to ye olde
   tmac.an. Anything I tell you from now on and concerning macros only
   holds true for tmac.an. If you want to use the tmac.doc macros anyway,
   here is a pointer to detailed information on how to use them:
   [22]http://www.bsdi.com/bsdi-man There is a searchable index form on
   the page. Enter mdoc.samples and it will find you mdoc.samples(7), a
   tutorial sampler for writing BSD man pages.
   The definitive dope for troff, with all macros explained, is the
   [23]Troff User's Manual by Jospeh F. Ossanna and Brian W. Kernighan,
   revised November 1992. AT&T Bell Labs have made it publicly available.
   It's a 92k gzipped PostScript file. Don't forget to check out [24]W.
   Richard Steven's homepage (famous for Unix Network Programming as well
   as the TCP/IP Illustrated trilogy), who also has a list of [25]Troff
   Resources including tbl, eqn, pic and other filters.
   
   5) What preprocessors may I use? 
   
   Groff comes with at least three preprocessors, tbl, eqn, and pic (on
   some systems they are named gtbl, geqn and gpic.) Their purpose is to
   translate preprocessor macros and their data to regular troff input.
   Tbl is a table preprocessor, eqn is an equations/maths preprocessor
   and pic is a picture preprocessor. Please refer to the man pages for
   more information on what functionality they provide. To put it in a
   nutshell: don't write man pages requiring ANY preprocessor. Eqn will
   generally produce terrible output for typewriter-like devices,
   unfortunately the type of device 99% of all man pages are viewed on.
   For example, XAllocColor.3x uses a few formulas with exponentiation.
   Due to the nature of typewriter-like devices the exponent will be on
   the same line as the base. N to the power of two appears as `N2'. Tbl
   should be avoided because all xman programs I have seen fail on them.
   Xman 3.1.6 uses the following command to format man pages, e.g.
   signal(7):
   
   gtbl /usr/man/man7/signal.7 | geqn | gtbl | groff -Tascii -man
   /tmp/xmana01760 2> /dev/null
   
   which screws up for sources using gtbl, because gtbl output is fed
   again into gtbl. The effect is a man page without your table. I don't
   know if it's a bug or a feature that gtbl chokes on its own output or
   if xman could be a little smarter not using gtbl twice... Anyway, if
   you want a table, format it yourself and put it between .nf .fi lines
   so that it will be left unformatted. You won't have bold and italics
   this way but this beats having your table swallowed any day. I have
   yet to see a man page requiring pic preprocessing. But I would not
   like it. As you can see above, xman will not use it and groff will
   certainly do the funky wadakiki on the input.
   
   6) Should I distribute source and/or already formatted documentation? 
   
   Let me give the pros (+) and cons (-) of a few selected possibilities:
    1. Source only:
       + smaller distribution package.
       - inaccessible on systems without groff.
    2. Uncompressed formatted only:
       + accessible even on systems without groff.
       - the user can't generate a dvi or postscript file.
       - waste of disk space on systems that also handle compressed
       pages.
    3. Compressed formatted only:
       + accessible even on systems without groff.
       - the user can't generate a dvi or postscript file.
       - which compression format would you use? .Z? .z? .gz? All of
       them?
    4. Source and uncompressed formatted:
       + accessible even on systems without groff.
       - larger distribution package
       - some systems may expect compressed formatted man pages.
       - redundant information on systems equipped with groff.
       
   IMHO it is best to distribute source only. The argument that it's
   inaccessible on systems without groff does not matter. The 500+ man
   pages of the Linux Documentation Project are source only. The man
   pages of XFree86 are source only. The man pages from the FSF are
   source only. In fact, I have rarely seen software distributed with
   formatted man pages. If any sysadmin is really concerned about having
   man pages accessible then he also has groff installed.
   
   7) What are the font conventions? 
   
   First of all: don't use direct font operators like \fB \fP etc. Use
   macros which take arguments. This way you avoid a common glitch:
   forgetting the font change at the end of the word and having the bold
   or italic extend up to the next font change. Believe me, it happens
   more often than you think. The tmac.an macros provide the following
   type faces:
   .B Bold
       .BI Bold alternating with italics
       .BR Bold alternating with Roman
       .I Italics
       .IB Italics alternating with bold
       .IR Italics alternating with Roman
       .RB Roman alternating with bold
       .RI Roman alternating with italics
       .SM Small (scaled 9/10 of the regular size)
       .SB Small bold (NOT small alternating with bold)
       
   X alternating with Y means that the odd arguments are typeset in X
   while the even arguments are typeset in Y. For example
   .BI "Arg 1 is Bold, " "Arg 2 is Italics, " "and Bold, " "and Italics."
       
   The double quotes are needed to include white space into an argument;
   without them, no white space appears between the alternating
   typefaces. In fact, you'll only need the macros for alternating
   typefaces in cases where you want to avoid white space between
   typeface changes. So much for what's available. Here's how you should
   make use of the different typefaces: (portions shamelessly stolen from
   man(7))
   
   Although there are many arbitrary conventions for man pages in the
   UNIX world, the existence of several hundred Linux-specific man pages
   defines our standards: For functions, the arguments are always
   specified using italics, even in the SYNOPSIS section, where the rest
   of the function is specified in bold:
   .BI "myfunction(int " argc ", char **" argv );
       
   Filenames are always in italics, except in the SYNOPSIS section, where
   included files are in bold. So you should use
   .I /usr/include/stdio.h
       
   and
   .B #include <stdio.h>
       
   Special macros, which are usually in upper case, are in bold:
   .B MAXINT
       
   When enumerating a list of error codes, the codes are in bold. This
   list usually uses the .TP (paragraph with hanging tag) macro as
   follows:
   .TP
       .B EBADF
       .I fd is not a valid file descriptor.
       .TP
       .B EINVAL
       .I fd is unsuitable for reading
       
   Any reference to another man page (or to the subject of the current
   man page) is in bold. If the manual section number is given, it is
   given in roman, without any spaces:
   .BR man (7)
       
   Acronyms look best when typeset in small type face. So I recommend
   .SM UNIX
       .SM ASCII
       .SM TAB
       .SM NFS
       .SM LALR(1)
       
   8) Polishing your man page
   
   Following are some guidelines that increase reliability, readability
   and 'formatability' of your documentation.
     * Test examples if they work (use cut and paste to give your shell
       the exact wording from the man page) read output of your command
       into your man page, don't type what you THINK your program will
       print.
     * Proof read, ispell, have someone else read it, especially if you
       are not a native English speaker. The HOWTO you are reading by now
       has not yet passed the latter test. Do you want to volunteer?
     * Test your man page: Does groff complain when you format your man
       page? It's nice to have the groff command line in a comment. Does
       the man(1) command complain when you call `man yourprog'? Does the
       way how man(1) uses the formatting system produce the expected
       result? Will xman(1x) and tkman(1tk) cope with your manual?
       XFree86 3.1 has xman 3.1.6 - X11R6, it will try to uncompress
       using
       gzip -c -d < %s > %s
       zcat < %s > %s
     * Will makewhatis(8) be able to extract the one-line description
       from the NAME section?
       
   9) How do I get a plain text man page without all that ^H^_ stuff? 
   
   Have a look at col(1), col can filter out backspace sequences. Just in
   case you can't wait that long:
   
   funnyprompt$ groff -t -e -mandoc -Tascii manpage.1 | col -bx >
   manpage.txt
   
   The -t and -e switches tell groff to preprocess using tbl and eqn.
   This is overkill for man pages that don't require preprocessing but it
   doesn't harm apart from a few CPU cycles wasted. On the other hand,
   not using -t when it is actually required does harm: the table is
   terribly formatted. You can even find out (well, "guess" is a better
   word) what command is needed to format a certain groff document (not
   just man pages) by issuing
   
   funnyprompt$ grog /usr/man/man7/signal.7 groff -t -man
   /usr/man/man7/signal.7
   
   "Grog" stands for "GROff Guess", and it does what it says--guess, if
   it were perfect we wouldn't need options any more. I've seen it guess
   wrong on macro packages, but never on preprocessors. Here is a little
   perl script I wrote that can delete the page headers and footers,
   therefore saving you a few pages when printing long and elaborate man
   pages. Save it in a file named strip-headers & chmod 755.
    #!/usr/bin/perl -wn
    #  make it slurp the whole file at once:
    undef $/;
    #  delete first header:
    s/^\n*.*\n+//;
    #  delete last footer:
    s/\n+.*\n+$/\n/g;
    #  delete page breaks:
    s/\n\n+[^ \t].*\n\n+(\S+).*\1\n\n+/\n/g;
    #  collapse two or more blank lines into a single one:
    s/\n{3,}/\n\n/g;
    #  see what's left...
    print;

   You have to use it as the first filter after the 'man' command as it
   relies on the number of newlines being output by groff. For example:
   
   funnyprompt$ man bash | strip-headers | col -bx > bash.txt
   
   10) How do I get a high quality PostScript man page? 
   
   funnyprompt$ groff -t -e -mandoc -Tps manpage.1 > manpage.ps
   
   Print that using your favorite PostScript printer/interpreter. See
   [26]question 9) for explanation of options.
   
   11) How do I get `apropos' and `whatis' to work? 
   
   Suppose you wonder what compilers are installed on your system and how
   these can be invoked. To answer this (frequently asked) question you
   say
   
   funnyprompt$ apropos compiler
   f77 (1) - Fortran 77 compiler
   gcc (1) - GNU C and C++ compiler
   pc (1) - Pascal compiler
   
   Apropos and whatis are used to give a quick response which man page
   has information on a certain topic. Both programs search a number of
   files named `whatis' that may be found in each of the manual base
   directories. Like I said before, the whatis data base files contain a
   one line entry for any man page in the respective directory tree. In
   fact, that line is exactly the NAME section (to be precise: joined on
   one line and with hyphenation removed, also note that the section is
   mentioned within parentheses). The whatis data base files are created
   with the makewhatis(8) program. There are several versions around, so
   please refer to the man page what options are available. In order for
   makewhatis to be able to extract the NAME sections correctly it is
   important that you, the manual writer, adhere to the NAME section
   format described under [27]question 2). The difference between apropos
   and whatis is where in the line and what they are looking for. Apropos
   (which is equivalent to man -k) searches the argument string anywhere
   on the line whereas whatis (equivalent to man -f) tries to match a
   complete command name only on the part before the dash. Consequently,
   `whatis cc' will report if there is a cc manual and remain quiet for
   gcc.
   
                    Corrections and suggestions welcome!
                                      
   A) Copying conditions 
   
   Copyright 1995-2000 by Jens Schweikhardt [28]<schweikh@noc.dfn.de>
   
   Voice: ++49 7151 909516
   
   Unless otherwise stated, Linux HOWTO documents are copyrighted by
   their respective authors. Linux HOWTO documents may be reproduced and
   distributed in whole or in part, in any medium physical or electronic,
   as long as this copyright notice is retained on all copies. Commercial
   redistribution is allowed and encouraged; however, the author would
   like to be notified of any such distributions. All translations,
   derivative works, or aggregate works incorporating any Linux HOWTO
   documents must be covered under this copyright notice. That is, you
   may not produce a derivative work from a HOWTO and impose additional
   restrictions on its distribution. Exceptions to these rules may be
   granted under certain conditions; please contact the Linux HOWTO
   coordinator at the address given below. In short, we wish to promote
   dissemination of this information through as many channels as
   possible. However, we do wish to retain copyright on the HOWTO
   documents, and would like to be notified of any plans to redistribute
   the HOWTOs. If you have questions, please contact the Linux HOWTO
   coordinator, Tim Bynum, at [29]linux-howto@sunsite.unc.edu via email.

References

   1. mailto:schweikh@noc.dfn.de
   2. http://www.schweikhardt.net/
   3. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#copying
   4. http://www.schweikhardt.net/man_page_howto.html
   5. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q0
   6. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q1
   7. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q2
   8. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q3
   9. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q4
  10. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q5
  11. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q6
  12. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q7
  13. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q8
  14. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q9
  15. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q10
  16. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q11
  17. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#copying
  18. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q8
  19. ftp://tsx-11.mit.edu/pub/linux/docs/linux-standards/fsstnd/
  20. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q7
  21. mailto:schweikh@noc.dfn.de
  22. http://www.bsdi.com/bsdi-man
  23. ftp://ftp.uni-trier.de/pub/books/obi/Bell.Labs/cstr/54.gz
  24. http://www.kohala.com/start/
  25. http://www.kohala.com/start/troff/troff.html
  26. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q9
  27. file://localhost/export/sunsite/users/gferg/howto/Man-Page.html#q2
  28. mailto:schweikh@noc.dfn.de
  29. mailto:linux-howto@sunsite.unc.edu

                     LINUX MODULES INSTALLATION MINI-HOWTO

Contents



     * Purpose of this document
     * WARNING
     * Pre-requisites
     * Recompiling the kernel for modules
     * Configuring Debian or RedHat for modules
     * Configuring Slackware for modules
     * Configuring other distributions for modules
     * Copyright and other Legalities


     _________________________________________________________________



Purpose of this document



   My experience with Linux and modules has been that the existing
   documents fail to provide a satisfactory explanation as to how to
   successfully set up Linux with modules configured and working. The
   procedure explained in this document has been successfully used
   several times, both on my own system and over the Internet to give
   directions to somebody trying to get some feature to work which
   requires a driver supplied only in module form.

   My own system runs from a RedHat 4.1 distribution of Linux, and it was
   on this setup that I developed the procedure. I have since
   successfully installed it on systems running from various Slackware
   distributions, and on one system running from a Debian distribution,
   and the necessary procedure to correctly configure modules under Linux
   in all three is documented herein.


     _________________________________________________________________



WARNING



   I have recently used the same procedure with RedHat 4.2, but with
   inconsistant results on apparently identical systems. I have NOT yet
   determined what the problem is, so can make NO guarantees at this
   stage as to whether or not it will work on your system.


     _________________________________________________________________



Pre-requisites



     * Before the steps in this document can be applied, the reader MUST
       have a working Linux installation in which one can get to the
       Linux prompt as user root since the majority of the steps involved
       can only be undertaken by the said user.


     * The existing kernel may be compiled either to use modules or not
       to use modules, and can even display error messages during the
       boot-up procedure as a result of modules being configured which
       aren't available at the moment, providing the above condition is
       met.


     * The source tree for the current kernel is assumed to be found
       rooted at /usr/src/linux and that is also assumed to be the
       current directory throughout this document at the start of any
       sequence of commands to be issued.



     _________________________________________________________________



Compiler Speed-up



   If your machine has 16 or more Megabytes of RAM, there is a useful
   speed-up that can be done, which is to permit the kernel to compile
   two or modules in parallel. This will increase the load on the machine
   whilst the kernel is being recompiled, but will reduce the time during
   which the compilation will be taking place.

   Before you can use this method, you need to check the amount of RAM
   present in your machine, as if you set this too high, the compilation
   will actually slow down. Experience has shown that the optimum value
   depends on the amount of RAM in your system according to the following
   formula, at least for systems with up to 32 Megabytes of RAM, although
   it may be a little conservative for systems with larger amounts of
   RAM:

   N = [RAM in Megabytes] / 8 + 1

   For the benefit of those with a dislike of maths, the values for the
   common amounts of RAM are as follows:

   RAM size Value to use 16 Megs 3 24 Megs 4 32 Megs 5 40 Megs 6 48 Megs
   7 56 Megs 8 64 Megs 9 80 Megs 11 96 Megs 13 112 Megs 15 128 Megs 17

   When you have decided on the correct number, edit the file
   /usr/src/linux/Makefile and find the line that currently reads:



   MAKE=make



   Replace it with one reading:



   MAKE=make -j N


   where N is the number determined above.


     _________________________________________________________________



Recompiling the kernel for modules



   The kernel can be reconfigured to use modules for everything other
   than the file system mounted as root (in most cases, this is the ext2
   file system).

   However, there are certain items that appear to be difficult to set up
   properly as modules, so I would recommend the following be compiled
   into the kernel:



     * Ethernet hardware drivers.


     * SCSI CD-ROM drivers.



   On the other hand, there are certain driver combinations that ONLY
   work as modules, especially combinations of two or more of the
   following group:



     * A Parallel Printer,


     * A Parallel Port drive, such as the IOMEGA ZipDrive or JazzDrive,
       or the BackPack CD-ROM drive, and


     * The PLIP Daemon.



   You will need to decide what you are compiling into the kernel, and
   what as modules, but should take the above points into consideration.
   The actual choices are made during the compilation, by the second of
   the following sequence of instructions:



   cd /usr/src/linux
   make menuconfig
   make dep clean modules modules_install zImage



   Having done that, the module dependencies need to be mapped out. This
   is done with the following command:



   depmod -a



   The new kernel now needs to be inserted in the boot chain. I am
   assuming the reader is using LILO for this purpose, since this is the
   only loader I have any experience with.

   I recommend that one does NOT automatically insert the newly compiled
   kernel as the default Linux kernel since if it should fail, it is then
   extremely difficult to recover one's Linux setup without doing a
   complete reinstallation, which is not to be recommended. For this
   reason, I have the following entry in my /etc/lilo.conf file:



   image=/usr/src/linux/arch/i386/boot/zImage
      label=new
      alias=n
      read-only
      vga=ask
      optional



   This entry says that there is an OPTIONAL boot option (which will be
   ignored if the image in question does not exist) which boots the file
   /boot/newlinux if selected, and allows one to select the video mode it
   is to be booted in.

   Assuming the existence of the above entry in /etc/lilo.conf the
   revised kernel is already correctly located at the end of compilation,
   and it can be installed via the following command:



   lilo



   Having done that, the reader needs to follow the further steps
   relevant to their selected distribution, as follows:

     * Configuring Debian or RedHat for modules
     * Configuring Slackware for modules
     * Configuring other distributions for modules



     _________________________________________________________________



Configuring Debian or RedHat for Modules



   Prior to carrying out the steps listed here, the steps listed in
   Recompiling the kernel for modules are assumed to have been carried
   out.

   The Debian and RedHat distributions have identical boot procedures, so
   also have identical procedures for configuring modules into them.


    1. Having logged in as root, use your favourite text editor to create
       a new file called _/etc/rc.d/init.d/modules.init_ with the
       following contents therein:


   # Modules initialisation.
   #
   # Start up the module auto-loading daemon.
   /sbin/kerneld

   # Mount all currently unmounted auto-mounted partitions.
   /sbin/mount -a


    2. Having created the above file, perform the following steps whilst
       logged on as root:


   cd /etc/rc.d
   chmod 755 init.d/*
   cd rc3.d
   ln -s ../init.d/modules.init 05modules.init



   The system can now be rebooted, and on doing so, it will be found that
   modules are fully implemented


     _________________________________________________________________



Configuring Slackware for Modules



   Prior to carrying out the steps listed here, the steps listed in
   Recompiling the kernel for modules are assumed to have been carried
   out.


    1. The file _/etc/rc.d/rc.M_ needs to be edited as follows:


         1. Around line 18, there is a section reading as follows:


   # Screen blanks after 15 minutes idle time.
   /bin/setterm -blank 15


            Immediately after this, insert the following paragraph, with
            the usual blank lines either side of it:


   # Load the kernel module auto-loader.
   /sbin/kerneld


         2. About 12 lines further down is the following:


   # if there is no /etc/HOSTNAME, fall back on this default:
        Immediately prior to this, insert the following paragraph, again
            with the usual blank lines either side of it:


   # Mount remaining unmounted auto-mount drives.
   /sbin/mount -a


       When those changes have been made, save the file.



   No further modifications are required for Slackware.


     _________________________________________________________________



Configuring other distributions for Modules



   Prior to carrying out the steps listed here, the steps listed in
   Recompiling the kernel for modules are assumed to have been carried
   out.

   The precice procedure for other distributions has not been
   ascertained, but is probably one of the above. To determine which one,
   display a directory of the contents of the _/etc/rc.d_ directory, as
   follows:


   cd /etc/rc.d
   ls -l *.d rc.*



   From this resulting display, you can select one of the following three
   options:


    1. If this list includes a directory named _init.d_ and some
       directories with names matching _rc?.d_ where the question mark is
       replaced by single digits, and does _NOT_ include a file with the
       name _rc.M_, that distribution can be configured for modules by
       following the procedure listed above for the Debian and RedHat
       Distributions.

    2. If this list does not include a directory named _init.d_ but
       includes a file named _rc.M_ then that distribution can be
       configured for modules by following the procedure listed above for
       the Slackware distribution.

    3. If this list matches neither of the above criteria, then the
       distribution has a boot script not covered by this HowTo. In that
       case, you are invited to contact the author of this document for
       advice.



     _________________________________________________________________



Copyright and other Legalities



   This document is covered by the terms of the GNU General Public
   Licence (GPL), and all terms and limitations therein apply.

   The author may be contacted by email at rhw@bigfoot.com.
  Win95 + WinNT + Linux multiboot using LILO mini-HOWTO
  Renzo Zanelli, rzanelli@southeast.net
  v1.0, 26 March 1998

  This document describes how to use the to multiboot between Windows
  95, Windows NT, and Linux.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Installing the Operating Systems

     2.1 Installing Windows 95
        2.1.1 Installing Windows NT 4.0
           2.1.1.1 Installing Linux

  3. The Linux part

  4. The Windows NT part

  5. The Windows 95 part

  6. References

  ______________________________________________________________________

  1.  Introduction

  There are a number of documents available that describe in detail how
  to multiboot just about any number of OS's using NT's OS loader.  When
  I finally bought Windows NT, I already had Windows 95 and Linux
  installed on my system and I was using LILO to multiboot between them.
  I decided to add Windows NT to LILO instead of using NT's OS loader.

  Originally I had Windows 95 on my first IDE disk drive and Linux on my
  second IDE disk drive.  The Linux drive became my third IDE drive and
  I installed a new IDE disk for Windows NT as my second drive.  Even
  though I haven't tried this in different configurations, I believe the
  order with which each OS is installed or which drive it is installed
  on is unimportant.

  Just remember to create those emergemcy bootup floppies when each OS
  prompts you to!

  Because I used Gilles Vollant's BootPart utility and BootPart only
  supports drives up to 4GB in size, this may not work if you have
  drives of larger capacity.  If you need to work with drives greater
  than 4GB, contact Gilles directly (see BootPart documentation for
  Gilles' e-mail address).

  2.  Installing the Operating Systems

  When you install the OSes, make sure that all are installed on
  bootable partitions.  I installed both Windows 95 and Windows NT on
  Fat 16 partitions, so this procedure works on Fat 16 drives.  If you
  decide to use Fat32 for Windows 95 and NTFS for Windows NT, check to
  see if your version of Linux supports them and, if so, to what extent.


  2.1.  Installing Windows 95

  Install Windows 95 on your first drive.  This will be your C: drive.
  Remember to create the Windows 95 boot floppies when prompted to do
  so.

  I have found that it is better if the Linux drive is removed from the
  system when installing Windows 95, so that it is never detected and it
  doesn't exist as far as Windows 95 is concerned.

  At this point, if you did everything correctly, you should be able to
  boot Windows 95.

  2.1.1.  Installing Windows NT 4.0

  Install Windows NT 4.0 on your second drive.  When you create the
  partition on this drive, make the partition bootable.  Not all
  versions of Linux support NTFS, so I created a FAT16 partition, just
  to be on the safe side and because I wanted to exchange data between
  the Windows drives.

  When Windows NT installs, it will detect the presence of Windows 95
  and will create an entry for it in the NT OS loader and you should see
  three entries in the OS loader menu as follows:


       Windows NT Workstation Version 4.00
       Windows NT Workstation Version 4.00 [VGA mode]
       Microsoft Windows

  At this point, if you did everything correctly, you should be able to
  multiboot to Windows NT and Windows 95.

  2.1.1.1.  Installing Linux

  Install Linux on your third drive.  When I installed Linux, I only had
  Windows 95 installed so I only added the Windows 95 partition to Lilo.
  You can go ahead and install all OSes while installing LILO, or edit
  the Lilo configuration file later.  However you decide to do it, I
  will show you how the /etc/lilo.conf file is supposed to look in the
  next section.  Once Linux is installed, you should be able to boot to
  Linux.

  3.  The Linux part

  This will involve editing the /etc/lilo.conf file and reinstalling
  LILO.  The following should already be present in /etc/lilo.conf:


       boot=/dev/hda

  The Linux stanza should also be already present:


  # Linux stanza
  image=/vmlinuz
  root=/dev/hdc1
  label=Linux
  # End Linux stanza

  Now add the Windows 95 stanza:


       # Windows 95 stanza
       other=/dev/hda1
       table=/dev/hda
       label=Windows95
       # End Windows 95 stanza

  Now add the Windows NT stanza:


       # Windows 95 stanza
       other=/dev/hdb1
       table=/dev/hda
       loader=/boot/any_d.b
       label=WindowsNT
       # End Windows 95 stanza

  Now run LILO again.  At this point, if all is well, you should have
  Windows 95, Windows NT, and Linux as selections from LILO.  You should
  be able to boot to Linux and Windows 95 (which should give you the
  Windows NT OS loader).  To make the Windows NT entry operational, you
  still need to do some work on the Windows NT side.

  4.  The Windows NT part

  Before you can continue, you need two do two things.

  The first is to download and unzip Gilles Vollant's BootPart utility
  which can be found at  <http://www.winimage.com/bootpart.htm> with
  some information on how to use it.

  The second thing to do is copy (do not delete them yet!) the following
  files to the root of the Windows NT drive:


       Boot.ini
       Bootsect.dos
       Ntdetect.com
       Ntldr

  These files are the Windows NT loader.  They are located in the root
  of the Windows 95 drive and were placed there by Windows NT when you
  installed it.

  Once this is done, boot to the Windows 95 DOS prompt (press Shift+F5
  when Windows 95 loads) and issue the following command:


       BOOTPART WINNT BOOT:D:

  Now you must edit Boot.ini in your Windows NT root directory.  You
  must edit three lines, one in the [boot loader] section and two in the
  [operating systems] section.

  This is the original Boot.ini:


       [boot loader]
       timeout=30
       default=multi(0)disk(0)rdisk(1)partition(1)\WINNT
       [operating systems]
       multi(0)disk(0)rdisk(1)partition(1)\WINNT="Windows NT Workstation Version 4.00"
       multi(0)disk(0)rdisk(1)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos
       C:\ = "Microsoft Windows"

  This is the new Boot.ini:


       [boot loader]
       timeout=30
       default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
       [operating systems]
       multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00"
       multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos

  Notice that all instances of rdisk(1) have been changed to rdisk(0)
  and the line referencing Windows 95 has been removed.

  After saving Boot.ini, if you did everything correctly, you should now
  be able to boot to Windows NT from LILO.

  5.  The Windows 95 part

  Create a bootable DOS floppy from the Windows 95 DOS prompt (press
  Shift+F5 when Windows 95 loads).  It is important that this floppy be
  created at the DOS prompt, not from a DOS window inside Windows95!  Do
  not boot to Windows95 until this step is complete!  Copy the file
  C:\WINDOWS95\COMMAND\SYS.COM to the floppy (substitute your Windows95
  path if different).  Now boot from the floppy and enter the command:


       SYS C:

  This should have removed the Windows NT OS loader and you should be
  able to boot directly into Windows 95 from LILO.

  You can now remove the NT loader files:


       Boot.ini
       Bootsect.dos
       Ntdetect.com
       Ntldr

  6.  References

  Thanks to the following people (in no particular order):

  James C. Bevier & D. Michael McFarland.  In a message exchange on the
  reddhat-list they provided some information on how to boot NT from
  Linux.

  Gilles Vollant.  BootPart is a very useful utility and Gilles makes it
  available for free with some nice documentation.  Thanks Gilles.

  Mike Harlan.  By reading his 'Linux-DOS-Win95-OS2' mini-HOWTO, it
  helped me make some assumptions about LILO's behavior.

  NCD X terminal mini HOWTO
  Ian Hodge, ian at permedia.ca
  v1.09, March 27, 2000

  This document describes how to connect an NCD X terminal to a UNIX
  host
  ______________________________________________________________________

  Table of Contents


  1. Copyright

  2. Introduction

     2.1 Summary of steps

  3. Requirements

     3.1 The X terminal
     3.2 Physical Connection
     3.3 NCD X server software

  4. Configuring the UNIX Host

     4.1 TFTP and BootP

  5. Configuring the NCD X terminal Boot Process

     5.1 Boot Monitor command syntax
     5.2 Boot Monitor Setup Menu
     5.3 X Terminal Configuration Files
     5.4 Logging on to the host

  6. Fonts and the X terminal

     6.1 The font server

  7. Miscellaneous

     7.1 Supported Terminals
     7.2 Reference
     7.3 Equipment used in the preparation of this document
     7.4 Acknowledgments
     7.5 Outstanding Issues
     7.6 Feedback


  ______________________________________________________________________

  1.  Copyright

  The NCD X terminal mini HOWTO is copyright(c) 1998 by Ian Hodge. Linux
  HOWTO documents may be reproduced and distributed in whole or in part,
  in any medium physical or electronic, as long as this copyright notice
  is retained on all copies.


  2.  Introduction

  This document describes how an X terminal manufactured by NCD (Network
  Computing Devices) can be connected to and booted from a UNIX host
  using BootP (boot protocol). Many terminals are also capable of
  booting with RARP, NFS or locally from a PCMCIA card or over a serial
  link (either directly or with a modem).

  Although the material in this document was prepared based on
  experience with a single model of X terminal, much of the information
  applies to other models and other X terminals generally. There is also
  an Linux X terminal mini HOWTO document (declared obsolete by HOWTO
  maintainers at the time of writing and therefore possibly not
  available in all Linux distributions) which overlaps material from
  this document. That document covers X terminal information more
  generally.


  2.1.  Summary of steps

  The process of connecting an X terminal to a UNIX network can be
  summarized in the following steps:


  o  Physically connect the X terminal to the network.

  o  Configure the UNIX host you are going to boot from.

  o  Configure the X terminal boot procedure.

  o  Boot the X terminal.

  o  Log in to the network.



  3.  Requirements

  3.1.  The X terminal

  An X terminal is a device which communicates and displays over a
  network using a distributed network window system known as X.
  Typically, the terminal's X software, known as the X server, is
  retrieved from the network at boot time. Programs other then the X
  server software (X client programs) are not run locally on the X
  terminal (with some exceptions); instead, the X terminal displays
  programs running on other hosts on the network. The X terminal,
  therefore, is a type of network computer which uses the X protocol to
  access network resources.


  3.2.  Physical Connection

  The NCD X terminal (model Xncd19r was used in preparation of this
  document) has an RJ-45 (twisted pair) connector for use with 10baseT
  Ethernet. A hub is required to link more than two Ethernet devices
  using twisted pair. If the X terminal and its host are the only
  devices in the network, they may be connected with a 'null' cable
  which is described in the Linux Ethernet HOWTO document.


  3.3.  NCD X server software

  The terminal's X server software file is available from the
  manufacturer and presumably is provided with the terminal upon initial
  purchase. This file will reside on the boot host where it can be
  accessed by the X terminal when it boots. This file is specific to the
  terminal type but independent of boot host. The terminal can boot from
  any host which supports the boot communication protocol (explained
  later). In addition to X server, the X software may also include
  applications, like a window manager, which can run locally on the X
  terminal itself.


  4.  Configuring the UNIX Host

  At boot time, the X terminal retrieves files (including its X server
  software) from a remote host on the network. After the terminal boots,
  the X server software will control input, display, local clients and X
  protocol communication. The X server software is executed on the X
  terminal and therefore does not have to be software compatible with
  the host on which it resides.


  4.1.  TFTP and BootP

  Together, tftp (trivial file transfer protocol) and BootP (boot
  protocol server) are used on the remote host to allow the X terminal
  to retrieve its X server software and configuration files over the
  network. Both services are typically started by inetd (Internet
  Daemon).


  After the X terminal is powered up, if it is configured to boot from
  the network, it will send out a broadcast message using BootP (TCP/IP
  bootstrap protocol). This boot message will contain the X terminal's
  hardware (Ethernet) address which is used by the boot host to respond
  to the boot request.


  When a boot request is received by the remote host, inetd (listening
  on a port designated in /etc/services) starts the BootP daemon
  specified in /etc/inetd.conf.


  In file inetd.conf, create or uncomment lines that refer to TFTP and
  BootP. The final argument of the tftpd entry in the example below is
  the path of the directory containing the files required by the X
  terminal. Although directory names are not mandatory, for security
  reasons they should always be present as tftp access will then be
  restricted to files in specified directories.


  From a sample file /etc/inetd.conf:

  # tftp service is provided primarily for booting.  Most sites
  # run this only on machines acting as "boot servers".
  tftp   dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd /usr/X11/lib/X11/ncd/
  bootps dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.bootpd



  Upon activation, the BootP server daemon on the host will then read
  its database file /etc/bootptab. An entry for the X terminal must be
  placed in this file. Each entry contains a set of tags separated with
  ':' characters. The host name must be the very first tag in an entry.

  Useful bootptab tags:

     hd Bootfile home directory (eg /usr/X11/lib/X11/ncd/).

     ip Address of the X terminal (eg 10.0.0.1).


     sm Subnet mask (eg 255.0.0.0). To understand the use of the subnet
        mask and other IP networking principles, consult the Linux NET-3
        (networking) HOWTO document.


     gw IP Address of gateway (eg 10.0.0.1).

     ht Hardware type - Ethernet in this example.

     ha Hardware address of X terminal (6 byte Ethernet address)

        According to the bootptab UNIX man page, the 'ha' tag must be
        preceded by the 'ht' tag. The X terminal's Ethernet address is
        displayed when the terminal is first powered on. The address
        appears as a series of 6 double digit hex numbers separated by
        colons (e.g. 00:00:A7:12:26:19).


     tc Table continuation or label of another entry in the BootP
        database. See the example below.


     ds IP address of domain name server (eg 10.0.0.3). Not required if
        DNS is not used for hostname resolution.


     bf Name of X terminal boot file (Usually the terminal model is used
        as the X server file name eg Xncd19r).


  The following is an example of the Boot protocol server database file,
  /etc/bootptab. The character '\' is used to escape the end-of-line
  character.


  # This is an entry (here given the name default)
  # with information common to all BootP clients
  default:hd=/usr/X11/lib/X11/ncd/:\
          ds=10.0.0.3:\
          sm=255.0.0.0:\
          gw=10.0.0.1:

  # X terminal entry with hostname myxterm
  # Notice the tc tag reference to the entry default
  myxterm:ht=ethernet:\
          ha=0x0000a7122619:\
          ip=10.0.0.2:\
          tc=default:\
          bf=Xncd19r:



  When a matching entry for the hardware address in the boot request is
  found in the bootptab file, a response is sent by bootpd with the
  corresponding IP address from the matching entry. File transfer can
  then take place over IP using TFTP.

  A hostname can be assigned to the X terminal by creating an entry on
  the boot host in the file /etc/hosts. This file is used to map
  hostnames to IP addresses. In the this example, the X terminal
  (address 10.0.0.2) has been assigned the hostname 'myxterm'.


  10.0.0.1        linuxhost       # The boot host
  10.0.0.2        myxterm         # X terminal



  5.  Configuring the NCD X terminal Boot Process

  After being powered up, the X terminal attempts to boot. This is the
  process where the X software is loaded into memory and executed. If
  the X terminal cannot boot, the Boot Monitor prompt '>' will appear.
  The Boot Monitor is firmware found in terminal PROMs (programmable
  read-only memory). With the basic Boot Monitor interface, it is
  possible to configure the terminal to boot and retrieve its X server
  software from the host. Use


  Configuration parameters set with the boot monitor are stored in NVRAM
  (Non-volatile Random-Access Memory) and are retained when the terminal
  is powered down.


  From the boot monitor, the 'bt' command or a menu system can be used
  to boot the terminal. Functionality of the two methods largely
  overlaps but the menu provides control over more boot parameters.


  5.1.  Boot Monitor command syntax

  >bt file terminal_IP host_IP gateway_IP subnet_mask



     file
        The name of the file retrieved from the remote host containing
        the X server software used by the X terminal to boot (eg
        "Xncd19r"). Check that this file name is the same as the file
        name is found in the X terminal entry in the bootptab file on
        the host (explained in the previous section).


     terminal_IP
        The IP address assigned to the X terminal (eg 10.0.0.2). Again,
        this IP address should be the same as the address assigned in
        the X terminal entry of the bootptab file on the host.


     host_IP
        The IP address of the boot host (eg 10.0.0.1).


     gateway
        The IP address of the subnet gateway (eg 10.0.0.1)


     subnet_mask
        The subnet mask, specified as a decimal IP address or as a
        hexadecimal number (eg 255.0.0.0 or ff000000).


  5.2.  Boot Monitor Setup Menu

  The setup menus are accessed by pressing the 'Setup' key or typing
  'se' from the boot monitor '>' prompt.


     Get IP Addresses From
        The IP address of the X terminal should be obtained from boot
        monitor configuration stored in NVRAM. Only select IP address
        from the remote host.


     Terminal IP Address
        The IP address assigned to the X terminal (eg 10.0.0.2). This is
        the same as 'terminal_IP' parameter above.


     First Boot Host IP Address
        The IP address of the boot host (eg 10.0.0.1). This is the same
        as 'host_IP' parameter above.


     Gateway IP Address
        The IP address of the subnet gateway. This is the same as
        'gateway' parameter above.


     Subnet Mask
        The subnet mask, specified as a decimal IP address. This is the
        same as the 'subnet_mask' parameter above.


     Broadcast IP Address
        The IP address used to broadcast to the subnet. (eg
        10.255.255.255)


     Boot File
        The name of the file retrieved from the remote host containing
        the X server software used by the X terminal to boot (eg
        "Xncd19r"). This is the same as 'file' parameter described
        above.


     TFTP Boot Directory
        The name of the directory on the host which contains the boot
        file (eg "/usr/X11/lib/X11/ncd/" or "/tftpboot/").


     Config file
        The name of the X terminal configuration file on the remote host
        (See below).


     UNIX Config Directory
        Name of the directory containing X terminal configuration files
        (eg "/usr/X11/lib/X11/ncd/").


     TFTP Order, NFS Order, Local Order
        Assign '1' to the preferred method for booting. Assign '1' to
        TFTP when booting from a host using BootP.


  5.3.  X Terminal Configuration Files

  During the boot process, the X terminal will attempt to transfer and
  load files from the boot host. These files are not required for the X
  terminal to boot successfully. If a file is not found, the terminal
  will use default settings.

  Configuration Files transferred to the X terminal at boot time:

  o  X terminal configuration file (eg ncd.conf) used to retain terminal
     settings.

  o  Color file (eg rgb.txt).

  o  X key symbol database (eg XKeysymDB).

  o  Font directory files (eg font.dir, font.alias).


  After a successful boot, the X terminal console window with a menu bar
  should appear. The terminal setup key toggles display of this console
  window. From the console window 'setup' pull-down menu, terminal
  characteristics can be viewed, altered and saved on the boot host in
  the configuration file which can be used in future sessions.

  If TFTP is being used to transfer files from the boot host, then file
  permission must be world readable. Similarly, to save a configuration
  file to the boot host, the file must already exist and with world
  write permission enabled. If secure TFTP is used (this is recommended
  for security reasons), then file access is possible only through
  specified directories.

  Note: The terminal may fail to boot if it was previously configured to
  work with other hosts or with different configuration parameters.
  Resetting the NVRAM to remove stored settings may solve the problem.


  To reset NVRAM, from the boot monitor, type the 'nv' command. From
  this sub-menu, select 'l' to load defaults, 's' to save and finally
  'q' to quit. Resume the boot procedure described above.


  5.4.  Logging on to the host

  From the X terminal console window menu bar, select the 'terminals'
  pull-down menu and choose 'New Telnet...'. When the telnet window
  appears, insert the address of a network host in the service entry and
  click including a window manager, can be started from the telnet
  window.


  6.  Fonts and the X terminal

  The X terminal comes with a small set of fonts. In the X terminal
  setup menus and configuration files, these fonts are referred to as
  fonts are desirable. Fonts can be added by specifying font paths in X
  terminal console setup menus, configuration files or by using the xset
  command.


  Once the X server software is running on the X terminal, the font path
  can modified or queried with the command xset.

  To query the X server:

  xset -q


  To add a font entry:

  xset +fp <path>


  To remove a font entry:

  xset -fp <path>



  6.1.  The font server

  The font server (xfs) runs on a network host and retrieves fonts for
  the X terminal and other network clients. Use of the font server
  allows the use of a wide variety of fonts as the X server software is
  otherwise restricted to bitmap fonts. During retrieval, the font
  server can uncompress, scale and convert fonts for the X server and
  can help simplify the management of fonts for groups of terminals and
  network clients. Font server software is part of many Linux
  distributions and has been incorporated into X consortium software
  available from ftp.x.org <ftp://ftp.x.org>.

  To indicate the use of a font server, a tcp service entry is used
  instead of a font path in the X terminal's host resident configuration
  file or console setup menu.

  Format of tcp service entry:

  tcp/<IP address of font server>:<port used by font server>



  Example:

  tcp/10.0.0.1:7100



  An example of an entry in the X terminal configuration file found on
  the boot host:


  xserver-default-font-path = {
          { "tcp/10.0.0.1:7100" }
          { "built-ins" }
  }



  The xset command with the tcp service entry can used to add the font
  server to the path:


  xset +fp tcp/10.0.0.1:7100



  WARNING: Certain versions of NCDware require the font server entry to
  be listed first before X terminal 'built-in' fonts. This is contrary
  to the NCD documentation "System Administrator's Guide for UNIX
  Systems".  Experiment with the order of the font path and verify it
  with the


  On the font server host, the server is started at boot time from the
  rc.local startup script. The font server (xfs) is started with the
  following command:


  xfs -config <config file path> -port <font server port number>



  The standard font server port is 7100.

  Example:


  xfs -config /usr/X11/lib/X11/fs/config -port 7100



  Example font server configuration file:


     # font server configuration file

     # allow a max of 10 clients to connect to this font server
     client-limit = 10

     # when a font server reaches its client limit, start up a new one
     clone-self = on

     # use the UNIX syslog utility to log errors.
     use-syslog = on

     # list of font directories
     catalogue = /usr/X11R6/lib/X11/fonts/misc/,
        /usr/X11R6/lib/X11/fonts/Speedo/,
        /usr/X11R6/lib/X11/fonts/Type1/,
        /usr/X11R6/lib/X11/fonts/75dpi/,
        /usr/X11R6/lib/X11/fonts/100dpi/

     # file used to log errors if syslog is not used.
     error-file = /usr/X11R6/lib/X11/fs/fs-errors

     # 12 point in decipoints
     default-point-size = 120

     # 100 x 100 and 75 x 75
     default-resolutions = 75,75,100,100



  7.  Miscellaneous

  7.1.  Supported Terminals

  I have been told that this procedures in this document work (more or
  less) with the following terminals: NCD 19r, NCD 19c, NCD19m?, NCD
  15b, NCD MCX


  7.2.  Reference

  Unix man pages: bootpd(8), tftpd(8), bootptab(5), xdm(1x), xfs(1),
  fsinfo(1), xset(1), inetd(8)

  Linux Ethernet HOWTO document, Linux Net-3 (Networking) HOWTO document


  NCDware System Administrator's Guide for UNIX Systems (print version)

  NCD Techtips Archive <ftp://ftp.ncd.com/pub/ncd/Archive/NCD-
  Articles/index.html>


  Now available for download in the NCD Techtips Archive is the NCDware
  Reference Manual
  <ftp://ftp.ncd.com/pub/ncd/Archive/Documentation/NCDware/index.html>
  which covers almost every X terminal configuration issue in detail.

  The searchable NCD knowledge base
  <http://www.ncd.com/support/kbsearch/kbase.html> addresses some
  frequently asked questions as well as bug reports.


  Note that the above links are subject to change. Since the first
  version of this mini-HOWTO was published, the NCD web site has been
  extensively reorganized.


  7.3.  Equipment used in the preparation of this document

  X terminal: NCD model NCD19r with 19 monochrome monitor 1280x1024 8M
  RAM

  X server software: NCDware V3.2.CV 19r_s

  Remote Host: IBM Cyrix 686 P150+ running Slackware (Linux kernel
  version 2.0.31)

  Remote Host: IBM Cyrix M2 200 MMX running Red Hat 5.0 (Linux kernel
  version 2.0.32)

  Network Card: 10 base T Ethernet card (ne 2000 clone) and 8 port hub

  Font server version 2 release number 6300


  7.4.  Acknowledgments

  I would like to thank Michael de Lind van Wijngaarden, Jamal Hadi-
  Salim and Dwight Hodge for assistance in the preparation of this
  document.

  7.5.  Outstanding Issues


  o  Is it possible or wise to start the font server using inetd?

  o  If the remote host running the font server is powered down but
     later comes up again, with the font server active, the X terminal
     may fail to retrieve its fonts. The font path entry has to be re-
     entered with the console menu or xset. Why?

  o  Are the procedures for other models of X terminals roughly similar?

  o  What is the procedure to boot the X terminal using NFS (Network
     File System) or RARP (Reverse Address Resolution Protocol)?

  o  The following messages appear in the X terminal Console. I am
     suspicious that they come from xfree86 extensions to X which are
     not part of the X terminal server. Can someone confirm or deny
     this?

     %XSERVER-I-NEWCLIENT, host "localhost" connected with blank authorization
     %XSERVER-W-NOEXTENSION, client attempted to use non-existent extension "BIG-REQUESTS"
     %XSERVER-W-NOEXTENSION, client attempted to use non-existent extension "XKEYBOARD"
     %XSERVER-W-NOEXTENSION, client attempted to use non-existent extension "XFree86-Misc"



  o  Could Linux be ported to an X terminal? This is almost a joke
     question but Linux is already on some unlikely platforms.


  7.6.  Feedback

  Please write to ian at permedia.ca with any comments, questions,
  corrections, suggestions or contributions.  Many thanks to all who
  have written with feedback and additional information.



  NFS-Root Mini-Howto
  Andreas Kostyrka, andreas@ag.or.at
  V8, 8 August 1997

  This Mini-HOWTO tries explains how to setup a ``disc-less'' Linux
  workstation, which mounts it's root filesystems via NFS.  The newest
  version of this Mini-Howto can always be found in ftp://sun-
  site.unc.edu/pub/Linux/docs/HOWTO/mini/NFS-Root or on any sunsite mir-
  ror NEAR YOU.
  ______________________________________________________________________

  Table of Contents


  1. Copyright

     1.1 Contributors

  2. General Overview

  3. Setup on the server

     3.1 Compiling the kernels
     3.2 Creation of the root filesystem
        3.2.1 Copying the filesystem
        3.2.2 Changes to the root filesystem
        3.2.3 Exporting the filesystem
        3.2.4 RARP setup
        3.2.5 BOOTP setup
        3.2.6 Finding out hardware addresses

  4. Booting the workstation

     4.1 Using a boot rom
     4.2 Using a raw kernel disc
     4.3 Using a bootloader &
     4.4 Using a bootloader without

  5. Known problems

     5.1 /sbin/init doesn't start.
     5.2 /dev troubles.

  6. Other topics

  ______________________________________________________________________

  1.  Copyright

  (c) 1996 Andreas Kostyrka (e9207884@student.tuwien.ac.at or
  andreas@ag.or.at)

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Andreas Kostyrka
  <mailto:andreas@ag.or.at>, the author of this mini-HOWTO, or Tim
  Bynum, the Linux HOWTO coordinator, at <mailto:linux-
  howto@sunsite.unc.edu> via email.


  1.1.  Contributors


  o  Avery Pennarun <apenwarr@foxnet.net> (how to boot without LILO)

  o   Ofer Maor <ofer@hadar.co.il> (providing a better mini howto about
     setting up discless workstations.)

  o  Christian Leutloff <leutloff@sundancer.tng.oche.de> (providing
     infos about netboot.)


  2.  General Overview

  Generally speaking there are the following problems for the
  workstation:

  o  It must find out it's own IP-address, and if needed also the rest
     of the Ethernet configuration.

  o  It must know the NFS-server and the mount path to it's root
     filesystem.

  The current implementation of NFSROOT in the Linux kernel (as of
  1.3.7x) allows for the following ``solutions'':

  o  The IP-address may be discovered by RARP, or the full ethernet
     configuration may be passed to the kernel via kernel parameters by
     LILO or LOADLIN.

  o  The NFS-path to mount can be passed via kernel parameters. If this
     is not done, the kernel assumes the RARP-server also as NFS-server,
     and uses compiled in default for the path part. (current default
     value in the kernel: /tftpboot/<IP-address of the machine>.)

  o  The client configuration may be discovered by BOOTP.

  Before starting to setup a discless enviroment, you should decide if
  you will be booting via LILO or LOADLIN. The advantage of doing so is
  flexibility, the disadvantage is speed. Booting a Linux kernel without
  LILO is faster. This may or may not be a consideration.


  3.  Setup on the server

  3.1.  Compiling the kernels

  RARP support in the kernel of the server will probably be a good idea.
  You must have it if you will boot without kernel parameters. On the
  other hand it doesn't help you, if the client isn't on the same subnet
  than the server.


  The kernel for the workstation needs the following as a minimum set
  compiled in:

  o  NFS-filesystem compiled in. (It doesn't need to have ext2-support
     compiled in, a module suffices.)

  o  ``Root on NFS'' must be enabled.

  o  The Ethernet driver for the network card of the workstation must be
     compiled in.

  o  Depending upon your needs you may have to include RARP or BOOTBP
     support for NFS-Root. (By this I mean the questions that are asked
     after the NFS question in make config.)

  If the workstation will be booted without kernel parameters, you need
  also to set the root device to 0:255. Do this by creating a dummy
  device file with mknod /dev/nfsroot b 0 255. After having created such
  a device file, you can set root device of the kernel image with rdev
  <kernel-image> /dev/nfsroot.

  3.2.  Creation of the root filesystem

  3.2.1.  Copying the filesystem

   Warning: while these instruction might work for you, they are by no
  means sensefull in a production enviroment. For a better way to setup
  a root filesystem for the clients, see the NFS-Root-Client mini howto
  by Ofer Maor <ofer@hadar.co.il>.

  After having decided where to place the root tree, create it with
  (e.g.) mkdir -p <directory> and tar cClf / - | tar xpCf <directory> -.

  If you boot your kernel without LILO, then the rootdir has to be
  /tftpboot/<IP-address>. If you don't like it, you can change it in the
  top Makefile in the kernel sources, look for a line like: NFS_ROOT =
  -DNFS_ROOT="\"/tftpboot/%s\"" If you change this, you have to
  recompile the kernel.


  3.2.2.  Changes to the root filesystem

  Now trim the unneeded files, and check the /etc/rc.d scripts. Some
  important points:

  o  One important thing is eth0 setup. The workstation comes up with a,
     at least partially, setup eth0. Setting up the IP-address of the
     workstation to the the IP-Address of the server is not considered a
     clever thing to do. (As it happened to the author on one of his
     early attempts.)

  o  Another point is the /etc/fstab of the workstation. It should be
     setup for nfs filesystems.

  o  WARNING: Don't confuse the server root filesystem and the
     workstation root filesystem. (I've already patched up a rc.inet1 on
     the server, and wondered why the workstation still didn't work.)


  3.2.3.  Exporting the filesystem

  Export the root dir to the work station. See exports(5). You most
  likely will have to restart the nfsd/mountd after this change.  Under
  RedHat this can easily be done by typing /etc/rc.d/init.d/nfs stop ;
  /etc/rc.d/init.d/nfs start .

  3.2.4.  RARP setup

  Setup the RARP somewhere on the net. If you boot without a nfsroot
  parameter, the RARP server has to be the NFS server. Usually this will
  be the NFS server. To do this, you will need to run a kernel with RARP
  support.

  To do this, execute (and install it somewhere in /etc/rc.d of the
  server!):

  /sbin/rarp -s <ip-addr> <hardware-addr>

  where

     ip-addr
        is the IP address of the workstation, and

     hardware-addr
        is the Ethernet address of the network card of the workstation.

  example: /sbin/rarp -s 131.131.90.200 00:00:c0:47:10:12

  You can also use a symbolic name instead of the IP-address, as long
  the server is able to find out the IP-address. (/etc/hosts or DNS
  lookups)


  3.2.5.  BOOTP setup

  For BOOTP setup you need to edit /etc/bootptab. Please consult the
  bootpd(8) and bootptab(5) man pages.


  3.2.6.  Finding out hardware addresses

  I don't know the hardware address! How can I find it out?

  o  Boot the kernel disk you made, and watch for the line where the
     network card is recognized. It usually contains 6 hex bytes, that
     should be the address of the card.

  o  Boot the workstation with some OS with TCP/IP networking enabled.
     Then ping the workstation from the server. Look in the ARP-cache by
     executing: /sbin/arp -a


  4.  Booting the workstation


  4.1.  Using a boot rom

  As I have not used such a beast myself yet, I can give you only the
  following tips (courtesy of Christian Leutloff
  <leutloff@sundancer.tng.oche.de>):

  o  You can't use ``normal'' bootroms.

  o  There is a netboot packet by Gero Kuhlmann, that provides for
     bootroms for Linux, and further information. netboot is available
     from the local Linux mirror, or as a Debian package (netboot-0.4).

  o  Read the documentation coming with your boot rom carefully.

  o  You probably will have to enable the tftpd on the server, but this
     depends upon your boot rom's way of loading the kernel.

  o  Any informations on bootrom vendors of these Linux variety,
     mentioned above, as not everybody has access to prom burner :(
     (especially in europe, as I'm located there.) welcome, I'll include
     them then here.

  4.2.  Using a raw kernel disc

  If you have exported the root filesystem with the correct name for the
  default naming and your NFS server is also the RARP server (which
  implies that the boxes are on the same subnet.), than you can just
  boot the kernel by cating it to a disc. (You have to set the root
  device in the kernel to 0:255.) This assumes, that the root directory
  on the server is /tftpboot/IP-Address (this value can be changed when
  compiling the kernel.)

  4.3.  Using a bootloader & RARP

  Give the kernel all needed parameters when booting, and add
  nfsroot=<server-ip-addr>:</path/to/mount> where server-ip-addr is the
  IP-address of your NFS-server, and /path/to/mount is the path to the
  root directory.

  Tips:

  o  When using LILO consider using the ``lock'' feature: Simply type in
     once all the correct parameters and add ``lock''. Next time when
     booting let LILO timeout.

  o  When generating a workstation specific boot disk, you can also use
     the append= feature in lilo.conf.

  4.4.  Using a bootloader without RARP

  In addition to nfsroot give a nfsaddrs=<wst-IP>:<srv-IP>:<gw-
  IP>:<netm-IP>:<hostname> commandline argument for the kernel. The
  kernel will setup eth0 with the given parameters:

     wst-IP
        machine's IP-Address

     srv-IP
        NFS-server IP-Address

     gw-IP
        gateway

     netm-IP
        netmask

     hostname
        machine name

  5.  Known problems


  5.1.  /sbin/init doesn't start.

  A popular problem with /sbin/init is, that some (at least) current
  distributions come with /sbin/init dynamically linked. So you have to
  provide a correct /lib setup to the client. One easy thing one could
  try is replacing /sbin/init (for the client) with a statically linked
  ``Hello World'' program.  This way you know if it is something more
  basic, or ``just'' a problem with dynamic linking.

  5.2.  /dev troubles.


  If you get some garbled messages about ttys when booting, then you
  should run a MAKEDEV from the client in the /dev directory. There are
  rumors that this doesn't work with certain server oses which use
  64-bit dev numbers, should you run into this, please mail me with
  which os you have the troubles. A potential solution would be to
  create a small /dev ram disc early in the boot process, and reinstall
  the device nodes each time.


  6.  Other topics


  o  There is BOOTP client:
     ftp://sunsite.unc.edu/system/Network/admin/bootpc.v045.tgz

     With initrd (which is included in Linux 2.0), it could be made to
     work for diskless stations quite nicely. initrd is actually always
     an advanced option for more customized setups.


  o  For plain bootpd based boots this is actually probably not needed
     as Linux 2.0 contains also the option to use BOOTP instead of RARP.
     (To be more precise, you can compile both in the kernel, and the
     faster response wins.)

  o  In the Documentation directory of kernel source there is a file
     documenting NFS-Root systems.

  o  There is a patch floating around, that allows for swapping over
     NFS. It was send to me (during a private high workload phase), but
     I somehow managed to loose the mail. :(

     You can get it probably from http://www.linuxhq.com/ in the
     unofficial patches section.


  o  My PGP public key can be fetched by fingering andreas@ag.or.at.
     The fingerprint is: F1 F7 43 D5 07 C4 6C 87  BF 6B 33 A2 2C EE 5A
     F9.


NFS-Root-Client Mini-HOWTO

Ofer Maor

   v4.1, 02 Feb, 1999
   Revision History
   Revision 4.1 Feb 02, 1999 Revised by: mo
   
   The purpose of this Mini-Howto is to explain how to create client root
   directories on a server that is using NFS Root mounted clients.
     _________________________________________________________________
   
   Table of Contents
   1. [1]Copyright
          
        1.1. [2]Thanks
                
   2. [3]Preface
          
        2.1. [4]General Overview
                
   3. [5]Creating the client's root directory
          
        3.1. [6]Creating the directory tree
        3.2. [7]Creating the minimal file system needed for boot
        3.3. [8]Building the etc directory and configuring the clients
        3.4. [9]Booting Up
                
   4. [10]Creating more clients
          
1. Copyright

   (c) 1996 Ofer Maor (<[11]oferm@hcs.co.il>)
   
   Unless otherwise stated, Linux HOWTO documents are copyrighted by
   their respective authors. Linux HOWTO documents may be reproduced and
   distributed in whole or in part, in any medium physical or electronic,
   as long as this copyright notice is retained on all copies. Commercial
   redistribution is allowed and encouraged; however, the author would
   like to be notified of any such distributions.
   
   All translations, derivative works, or aggregate works incorporating
   any Linux HOWTO documents must be covered under this copyright notice.
   That is, you may not produce a derivative work from a HOWTO and impose
   additional restrictions on its distribution. Exceptions to these rules
   may be granted under certain conditions; please contact the Linux
   HOWTO coordinator at the address given below.
   
   In short, we wish to promote dissemination of this information through
   as many channels as possible. However, we do wish to retain copyright
   on the HOWTO documents, and would like to be notified of any plans to
   redistribute the HOWTOs.
   
   If you have questions, please contact Ofer Maor
   (<[12]oferm@hcs.co.il>), the author of this mini-HOWTO, or Greg
   Hankins, the Linux HOWTO coordinator, at <[13]gregh@sunsite.unc.edu>
   via email, or at +1 404 853 9989.
   
   If you have anything to add to this Mini-Howto, please mail the author
   (Ofer Maor, <[14]oferm@hcs.co.il>), with the information. Any new
   relevant information would be appreciated.
     _________________________________________________________________
   
1.1. Thanks

   I would like to express my thanks to the author of the NFS-Root Howto,
   Andreas Kostyrca (<[15]andreas@medman.ag.or.at>). His Mini-Howto
   helped me with the first steps in creating a NFS Root Mounted client.
   My Mini-Howto does not, in any way, try to replace his work, but to
   enhance it using my experiences in this process.
   
   I would also like to thank Mark Kushinsky (<[16]mark026@ibm.net>) for
   polishing the english and spelling of this Howto, thus making it much
   more readable.
     _________________________________________________________________
   
2. Preface

   This Mini-Howto was written in order to help people who want to use
   NFS Root mounting to create their client's directories. Please note
   that there are many ways to accomplish this, depending on your needs
   and intent. If the clients are individual, and each client has its own
   users and administrator, it will be necessary to make significant
   parts of the client dirs not shared with other clients. On the other
   hand, if the client is intended for multiple users, and are all
   administrated by the same person (for instance, a computerclass), make
   as many files as possible shareable in order to make administration
   more manageable. This Howto will focus on the second issue.
     _________________________________________________________________
   
2.1. General Overview

   When building a client's root directory, and trying to limit ourselves
   to the minimum client size, we mainly focus on which files we can
   share, or mount from the server. In this Howto I will recommend the
   configuration of a client based on my experience. But beforewe begin
   please note:
   
     * This Mini-Howto does not explain how to do the actual NFS Root
       mounting. Refer to the NFS-Root Mini-Howto if you need more
       information about that issue.
     * I based most of my client's configuration on mounts and symbolic
       links. A lot of those symbolic links can be replaced by hardlinks.
       One should choose according to his personal preference. Putting a
       hardlink over a mount and a symbolic link has its advantages, but
       might cause confusion. A file will not be erased until all its
       hardlinks are removed. Thus, In order to prevent a case in which
       you upgrade a certain file, and the hardlinks still refer to the
       older version, you will have to be very careful and keep track of
       every link you put.
     * While mounting the information from the server, two concepts can
       be used. The first (most common) concept, is to mount the whole
       server root directory under a local directory, and then just
       change the path or link the relevant directories there. I
       personally dislike mounting root partitions of a server on
       clients. Thus, this Howto suggests a way to mount the relevant
       directories of the server to the relevant places on the system.
     * This Howto is based on my experience building client directories
       on a Slackware 3.1 based distribution. Things may be different
       (especially on the rc.* files), for other users, however the
       concepts should still remain the same.
     _________________________________________________________________
   
3. Creating the client's root directory

3.1. Creating the directory tree

   First of all, you need to create the directory structure itself. I
   created all the clients under /clients/hostname and I will use it for
   my examples listed below. This, however, can be changed to anything
   else. The first stage, then, is to create the relevant directories in
   the root directory. You should create the following directories:
   
   bin , dev , etc , home , lib , mnt , proc , sbin , server , tmp , usr
   , var
   
   and any other directories you might want to have on your system.
   
   The local, proc, and dev directories will be used separately on each
   machine while the rest of the directories will be either partly or
   completely shared with the rest of the clients.
     _________________________________________________________________
   
3.2. Creating the minimal file system needed for boot

3.2.1. Creating the dev dir.

   Although the dev dir can be shared, it is better to create a separate
   one for each client. You can create your client's dev directory with
   the appropriate MAKEDEV scripts, however in most cases it is simpler
   just to copy it from the server:
bash# cp -a /dev /clients/hostname

   You should keep in mind that /dev/mouse, /dev/cdrom and /dev/modem are
   symbolic links to actually devices, and therefore you should be sure
   that they are linked correctly to fit the client's hardware.
     _________________________________________________________________
   
3.2.2. Copying the necessary binaries.

   Although we mount everything from the server, there is a minimum that
   we need to copy to each client. First of all, we need "init", our
   system will not be able to run anything before init'ing (as the author
   found out in the hard way ;-). So first, you should copy /sbin/init to
   your client's sbin dir and then so that rc.S will run, you should copy
   /bin/sh to the client's bin directory. Also, in order to mount
   everything you need to copy /sbin/mount to the client's sbin
   directory. This is the minimum, assuming the first line in your rc.S
   is mount -av. However, I recommend copying a few more files: update,
   ls, rm, cp and umount, so that you will have the basic tools in case
   the client has problems mounting. If you choose to leave your swap on
   line before mount, you should also copy the swapon binary.
   
   Since most of these binaries are by default dynamically linked, you
   will also need to copy a fair part of /lib:
bash# cp -a /lib/ld* /lib/libc.* /lib/libcursses.* /client/hostname/lib

   Hardlinking the binaries themselves, instead of copying them, should
   be considered. Please read my comments on this in [17]Section 2.1 of
   this Howto.
   
   Please notice, all of the information above assumes that the kernel
   has been given the network parameters while booting up. If you plan to
   use rarp or bootp, you will probably need the relevant binaries for
   these as well.
   
   Generally, you will need the minimum of files that will enable you to
   configure the network and run rc.S up to the point where it mounts the
   rest of the file system. Make sure you looked into your /etc/init and
   rc.S files, making sure there are no "surprises" in any of them, which
   will require other files to be accessed, before the first mount will
   take place. If you do, however, find such files, you can either copy
   them as well, or remove the relevant parts from your init and your
   rc.S files.
     _________________________________________________________________
   
3.2.3. The var directory

   The var directory, in most cases, should be separate for each client.
   However, a lot of the data can be shared. Create under the server
   directory a directory called var. We will mount the server's var
   directory there. To create the local var directory, simply type:
bash# cp -a /var /clients/hostname/

   Now, you have a choice as to what you want to separate, and what you
   want to share. Any directory/file that you want to share, simply
   remove it from the client's var dir, and symlink it to the
   /server/var/ directory. However please note that you should either
   symlink it to /server/var or to ../server/var but NOT to
   /clients/hostname/server/var as this will not work when the root
   changes.
   
   Generally, I would recommend separating /var/run, /var/lock,
   /var/spool, and /var/log.
     _________________________________________________________________
   
3.2.4. The rest of the directories

     * etc is explained thoroughly in the next section.
     * mnt and proc are for local purposes.
     * usr and home are merely mount points.
     * tmp is up to you. You can create a different tmp directory for
       each client, or create some /clients/tmp directories, and mount it
       for each client under /tmp. I would recommend that you provide
       each client with a separate tmp directory.
     _________________________________________________________________
   
3.3. Building the etc directory and configuring the clients

   Please Note -
   
     Note: this section refers to building the etc directory which is
     mostly shared among the clients. If your diskless clients have
     separate system administrators, it's best to set up for each client
     a separate etc directory.
     _________________________________________________________________
   
3.3.1. Building a clients wide etc directory
     _________________________________________________________________
   
3.3.2. Creating a client's etc directory

   Although we separate the etc directories of the clients, we still want
   to share a large portion of the files there. Generally, I think
   sharing the etc files with the server's /etc is a bad idea, and
   therefore I recommend creating a /clients/etc directory, which will
   hold the information needed for the clients. To start with, simply
   copy the contents of the server's etc to the /clients/etc directory.
   
   You should add to this directory all of the non-machine-specific
   configuration files, for instance motd, issue, etc. and not the
   clientspecific ones.(i.e. inittab or fstab)
   
   The most important changes will be in your rc.d directory. First, you
   should change rc.inet1 to be suitable for your local setup. I pass all
   my network parameters to the kernel through the LILO/Loadlin,
   therefore I remove almost everything from rc.inet1 file. The only
   thing I leave there is the ifconfig and route of the localhost. If you
   use rarp or bootp, you will have to build it accordingly.
   
   Secondly, you should edit your rc.S. First, remove all the parts that
   are responsible for the fsck check as fsck will occur when the server
   boots up. Then, you should find the line that mounts your fstab. This
   should look something like:
   
   mount -avt nonfs
   
   The -t nonfs is there since normal clients first run rc.S and only
   later on use rc.inet1 to configure the Ethernet. As this will cause no
   NFS partitions to be mounted this line should be deleted. Therefore,
   change it to mount -av. If you need to run rarp/bootp to configure
   your network, do it in rc.S (or call the appropriate script from
   rc.S), before the mount, and make sure your physical bin and sbin
   directories have the necessary files available.
   
   After the mount -av is performed, you will have a working file system.
   Build a general fstab, so that you can later copy it to each client.
   Your fstab should look something like this:
   
   Table 1. fstab
   server:/clients/hostname / nfs default 1 1
   server:/bin /bin nfs default 1 1
   server:/usr /usr nfs default 1 1
   server:/sbin /sbin nfs default 1 1
   erver:/home /home nfs default 1 1
   server:/lib /lib nfs default 1 1
   server:/clients/etc /server/etc nfs default 1 1
   server:/clients/var /server/var nfs default 1 1
   none /proc proc default 1 1
   
   Please notice, that the keyword default might not work on all versions
   of mount. You might change it to rw or ro or remove all of the default
   1 1 part.
   
   Also, make sure your server's /etc/exports looks like this:
   
   Table 2. /etc/exports
   /clients/hostname hostname.domainname(rw,no_root_squash)
   /clients/etc hostname.domainname(ro,no_root_squash)
   /clients/var hostname.domainname(ro,no_root_squash)
   /usr hostname.domainname(ro,no_root_squash)
   /sbin hostname.domainname(ro,no_root_squash)
   /bin hostname.domainname(ro,no_root_squash)
   /lib hostname.domainname(ro,no_root_squash)
   /home hostname.domainname(rw,no_root_squash)
   
   Other than the first line, which should be separate for each host, the
   rest of the lines can be replaced with a hostmask to fit all your
   hosts (like pc*.domain - keep in mind though, that * will substitue
   only strings without a dot in them). I suggest that you make most of
   the directories read only, but this is up to you. The no_root_squash
   will make sure root users on the clients have actual root permissions
   on the nfsd as well. Check out man exports(5). If you want users to be
   able to run passwd from the clients also, make sure the /etc has rw
   and not ro permissions. However, this is not advisable.
   
   Please note another thing concerning the rc.S file. In Slackware, by
   default, it creates a new /etc/issue and /etc/motd every time it runs.
   This function MUST be disabled if these files are mounted ro from the
   server, and I would recommend that they should be disabled in any
   case.
   
   Lastly, if you want to have the same userbase on the server as on the
   clients, you should choose between 1), using NIS (Yellow Pages - check
   the yp-howto), and then each client will have a separate /etc/passwd
   and /etc/group as it receives it from the NIS server. 2) In most
   cases, a simple symbolic link will suffice. Therefore, you will need
   to either hardlink /clients/etc/passwd to /etc/passwd, or if you
   prefer a symlink, link /etc/passwd to /clients/etc/passwd (and not the
   other way around, since the clients do not mount the server's etc
   directory). Do the same for /etc/group.
     _________________________________________________________________
   
3.3.3. Creating a client's etc directory

   Generally, most of the files in the client's etc should be symlinked
   to the /server/etc directory. However, some files are different for
   each machine, and some just have to be there when the kernel loads.
   The minimum you need from the etc dir is as follows:
   
   resolv.conf
   hosts
   inittab
   rc.d/rc.S
   fstab
   
   Since these 5 files can be identical on all clients, you can simply
   hardlink them or copy them again. However, with the rc.S and fstab
   file it is advised to keep a separate copy for each client. You will
   also need a separate etc/HOSTNAME for each client. I personally
   recommend having all of the rc.d files separate for each client, as
   configuration and hardware might vary from one to another.
   
   For each client, add to the fstab the proper swap line:
   
   Table 3. fstab
   /dev/swap_partition swap swap default 1 1
   
   The rest of the /etc files of the client, you can either hardlink to
   the /clients/etc/* files, or symlink them to the /server/etc (which is
   the mount point of /clients/etc/).
   
   Make sure your machine can resolve properly, either through a named or
   through etc/hosts. It is not a bad idea to keep the server's IP in the
   etc/hosts, instead of counting on resolving. If you will count only on
   named resolving, a problem in the named will prevent your clients from
   booting up.
     _________________________________________________________________
   
3.4. Booting Up

   Now, all you have to do is to boot up your machine, cross your fingers
   and hope everything works as it should :-).
     _________________________________________________________________
   
4. Creating more clients

   If you have followed my instructions so far this should be simple - cd
   to /clients/ and type:
bash# cp -a hostname1 hostname2

   and then make sure you check these points:
   
     * rc.d/* files matches the hardware and wanted software
       configuration
     * etc/HOSTNAME is correct
     * fstab's swap line is correct
     * the symbolic links of dev/mouse, dev/modem and dev/cdromare right.
       
   Good Luck....

References

   1. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#COPYRIGHT
   2. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#AEN28
   3. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#PREFACE
   4. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#OVERVIEW
   5. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#CLIENTROOT
   6. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#AEN52
   7. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#AEN74
   8. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#AEN158
   9. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#AEN371
  10. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#MORECLIENTS
  11. mailto:oferm@hcs.co.il
  12. mailto:oferm@hcs.co.il
  13. mailto:gregh@sunsite.unc.edu
  14. mailto:oferm@hcs.co.il
  15. mailto:andreas@medman.ag.or.at
  16. mailto:mark026@ibm.net
  17. file://localhost/export/sunsite/users/gferg/howto/00_NFS-Root-Client-mini-HOWTO.html#OVERVIEW
  Netrom-Node mini-Howto
  Karl Larsen,  k5di@yahoo.com
  v1.10, 19 October 1998

  This document describes how to setup the ax25-utilities package for
  Amateur Radio such that it makes Netrom Nodes for the Node program and
  the BBS software from John-Paul Roubelat, F6FBB. The DOS G8BPQ Switch
  makes a bbs node and many features, it was expected that the Linux
  ax25-utils would have a similar capability. This was not the case.
  Help came from John Ackerman, N8UR who put a message on the Linux-Ham
  SIG that he had done the BBS node and the info was on his web site!
  When the information was tried it didn't work properly but much was
  learned about the technique. Help from Tomi Manninen, OH2BNS did the
  trick. Nodes for the BBS and the Node and the DX Cluster were made and
  work fine.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. How to Begin

  3. Some Details of the AX.25 Utilities

  4. Setting Up Netrom

  5. Setting Up FBB and DXNet:



  ______________________________________________________________________

  1.  Introduction

  It is possible, using just the ax25-util's to generate node listings
  for the Node application and the FBB BBS and the DXNet DX Cluster.
  This is done by changing the configuration files for Netrom and making
  a Netrom entry for each application. At present there is a kernel
  imposed limit of 4 Netrom entries. The new kernels are expected to
  drop this limit.

  Now users look for CRUCES:K5DI-4 and LCBBS:K5DI-3 and LCDX:K5DI-5 on
  the many nodes here in New Mexico, Texas and Arizona and are connected
  like magic. They no longer need to remember anything.



  2.  How to Begin

  Obtain and read the AX25-HOWTO:

  ftp:/sunsite.unc.edu/pub/Linux/docs/HOWTO/AX25-HOWTO/

  Using the AX25-HOWTO set up the normal Amateur Radio ax.25 and Netrom
  system and make certain it is operating properly.  When the software
  "CALL" can be used to make either a ax25 or Netrom connection to a
  distant node, the system is ready to change to one using node listings
  like the BPQ Switch.

  3.  Some Details of the AX.25 Utilities

  Below is a list of all the applications and files that are needed to
  set up a working ax.25 system. The Applications are all in the
  /usr/sbin/ directory and the Configuration files are in the /etc/ax25/
  directory. Note: Kissattach is used only if you have TNC's in the Kiss
  Mode.


    kissattach             Application

    call                   Application

    ax25d                          Application

    ax25d.conf             Configuration file

    axspawn                        Application

    axspawn.conf           Configuration file

    axports                        Configuration file

  There are several names that a ax25-util user must invent.  Since this
  paper uses the files of k5di, a listing of those names can be made.



       Name            Call-sign       Alias           Other

       ax0             k5di-9                          ax25 9600 baud
       ax1             k5di-10                         ax25 1200 baud
       Netrom          k5di-1          #CRUCE          Real Netrom
       netnod          k5di-4          CRUCES          Node node-list
       netbbs          k5di-3          LCBBS           BBS  node-list
       netdx           k5di-5          LCDX            DX-Cluster



  It's a good idea to make a list like this on paper before you start to
  change things. It is easy to put the wrong name in a control file.

  Kissattach is an application that connects the kernel to the TNC, sets
  the tcp/ip address up, sets the speed of the connection, and is given
  the serial port to use.

  Axports is a file that defines the name of the ax.25 ports and tells
  kissattach what call-sign, baud-rate and window size to use.  Below is
  an example of a 2 TNC system.



       # /etc/ax25/axports
       # Be very careful with the speed setting. This is the speed in
       # bits/second that data passes from the computer to the TNC, and has
       # nothing to do with the radio baud rate!
       #
       # The format of this file is:
       #
       # name call-sign speed paclen window description
       #
       ax0     K5DI-9          9600    255     3       445.1 (9600 bps)
       ax1     K5DI-10         9600    255     1       145.07 (1200 bps)



  AX25D is the application that reads the ax25d.conf Configuration file
  and answers calls made to the system. Below is a sample ax25d.conf
  that has no Netrom defined. In fact all it will do is answer calls to
  k5di-9 and k5di-10. When it answers it starts the node application and
  logs the caller in.



       # /etc/ax25/ax25d.conf
       #
       #  AX25D Configuration File.
       #
       # AX.25 ports begin with a '['.
       #
       [k5di-4 VIA ax0]
       default  * *    *   *   *    0 - root   /usr/sbin/node  node
       [k5di-4 VIA ax1]
       default  * *    *   *   *     0 - root  /usr/sbin/node  node
       #



  The next step is to get ax25d to answer a call to the alias CRUCES as
  well as the call-sign. This is easy to do and is shown below:



       # /etc/ax25/ax25d.conf
       #
       #  AX25D Configuration File.
       #
       # AX.25 ports begin with a '['.
       #
       [CRUCES VIA ax0]
       default  * *    *   *   *    0 - root   /usr/sbin/node  node
       [k5di-4 VIA ax0]
       default  * *    *   *   *    0 - root   /usr/sbin/node  node
       [CRUCES VIA ax1]
       default  * *    *   *   *    0 - root   /usr/sbin/node  node
       [k5di-4 VIA ax1]
       default  * *    *   *   *     0 - root  /usr/sbin/node  node
       #



  If you have trouble, as root kill ax25d if it is running and then at
  the prompt type ax25d &. As ax25d loads the ax25d.conf file it will
  print out any errors it finds. This print out is very accurate and
  tells you which row in the file is wrong.

  A connect from any adjacent node to k5di-4 or CRUCES will connect to
  the k5di node. But Netrom is not transmitting a node listing for
  CRUCES or k5di-4. This is done by changing some Netrom Configuration
  files.



  4.  Setting Up Netrom

  Netrom has applications and files that control it's function and to
  achieve the G8BPQ look and function we must use these in ways never
  intended. Below is a list of these components of Netrom:


    nrattach        Application

    netromd         Application

    nrports         Configuration File

    nrbroadcast     Configuration File

     Nrattach is the application that works with the kernel and
     establishes the ports and tcp-ip used by Netrom. To use nrattach
     you place it in your startup file and the example looks like this:



       /usr/sbin/nrattach -i 44.30.2.5 netrom
       /usr/sbin/nrattach -i 44.30.2.5 netnod



  Nrattach gets some of it's information from a configuration file
  called nrports. This file is shown below:



       # /etc/ax25/nrports
       #
       # The format of this file is:
       #
       # name call-sign alias paclen description
       #
       netrom          K5DI-1  #CRUCE   235    Switch
       netnod          K5DI-4  CRUCES   235    Real Node



  There is no change to the nrbroadcast file so the remaining changes
  will be made to the ax25d.conf file. In this file you normally put the
  real netrom application called k5di-1, but since a call to k5di-1 or
  #CRUCE gets undesirable results, leave that entry out of ax25d.conf
  and a user will get just a "busy" when calling.

  Instead put in the netnod and that will allow ax25d to answer a call
  to CRUCES. This is shown in the example below:



  # /etc/ax25/ax25d.conf
  #
  #  AX25D Configuration File.
  #
  # AX.25 ports begin with a '['.
  #
  [CRUCES VIA ax0]
  default  * *    *   *   *    0 - root   /usr/sbin/node  node
  [k5di-4 VIA ax0]
  default  * *    *   *   *    0 - root   /usr/sbin/node  node
  [CRUCES VIA ax1]
  default  * *    *   *   *    0 - root   /usr/sbin/node  node
  [k5di-4 VIA ax1]
  default  * *    *   *   *     0 - root  /usr/sbin/node  node
  #
  # NET/ROM ports begin with a '<'.
  #
  <netnod>
  default         * *     *   *   *   * -  root   /usr/sbin/node node
  #



  With these changes netrom node broadcasts will include the node
  K5DI-4:CRUCES and K5DI-1:#CRUCE. By testing it was determined that a
  call from any node to k5di-1 or #CRUCE got a busy, and a call to
  k5di-4 or CRUCES connected to the node on this system.


  5.  Setting Up FBB and DXNet:


  The FBB packet BBS and DXNet Linux software are written to answer
  calls to a call-sign defined in the configuration files. In these
  examples the FBB call-sign is k5di-3 and the DXNet is k5di-5.

  Since calls to k5di-3 and k5di-5 are answered by other software, ax25d
  is not used and these calls should NEVER be found in a ax25d.conf
  file. But the nrports file needs to have the information added and 2
  more nrattach lines are added to the start file. The nrattach lines (4
  each) and the file "nrports" are shown below:



       /usr/sbin/nrattach -i 44.30.2.5 netrom
       /usr/sbin/nrattach -i 44.30.2.5 netbbs
       /usr/sbin/nrattach -i 44.30.2.5 netnod
       /usr/sbin/nrattach -i 44.30.2.5 netdx

       # /etc/ax25/nrports
       #
       # The format of this file is:
       #
       # name call-sign alias paclen description
       #
       netrom          K5DI-1  #CRUCE   235    Switch
       netnod          K5DI-4  CRUCES   235    Real Node
       netbbs          K5DI-3  LCBBS    235    FBB BBS
       netdx           K5DI-5  LCDX     235    DXNet DX Cluster



  These changes will make the node listings wanted but a call to LCBBS
  will not work yet. Recall that FBB answers a call to k5di-3 but not
  the alias. To achieve this a change to the
  /usr/local/fbb/system/port.sys file is required. Before these changes
  port.sys had a listing for the name "netrom". With these changes
  replace "netrom" with "netbbs". That section of port.sys is shown
  below:


       #TNC NbCh Com MultCh Pacln Maxfr NbFwd MxBloc M/P-Fwd Mode  Freq
        0   0    0   0      0     0     0     0      00/01   ----  File-fwd.
        1   8    1   ax0    250   4     1     10     30/60   XUWY  UHF port
        2   2    1   ax1    250   4     1     10     00/60   XUWY  VHF port
        3   6    1 netbbs   250   4     4     10     30/60   XUWY  BPQ look
        4   8    2   0      250   5     4     1000    5/15   TUWY  Telnet
       #



  A similar change is made to the "dxnet.cfg" file where netrom is
  replaced with netdx. When these changes are made and a few hours have
  passed to let Netrom send node lists, any nearby node will have nodes
  listed to your Netrom for CRUCES and LCBBS and LCDX, and they will all
  work just as they do when using the G8BPQ Switch under DOS.


   -->

                          HOW-TO FOR INHOUSE INTRANET

Author: Sarma Seetamraju
EMail: (sarma@usa.net)
Date: August 1997

  Place: on the Amtrack and Path Trains on the way to Downtown Manhattan.
  Notepad Used: a 16-Mhz 386 SX circa 1991 Magnavox notebook running linux.
  (Just to show that if you ever complain about linux not running AS IS
  on your computer, I am going to shove that computer up your .... )

    Reformatted as HTML for: All abnormal people who cannot stand illegible
    plain text.

 Important: SOCKS is a FREE package for UNIX systems. I doubt its available for
OTHER platforms. If you wish to influence NETSCAPE to keep supporting SOCKS,
email me with your supporting statement (saying how you are using SOCKS).


     _________________________________________________________________

   This document describes the procedure to set up a NETWORK (INTRANET)
   at your home. Then we shall setup up the network such that NETSCAPE
   Clients can be used on ANY machine to access the internet...

   The network we are talking about,
     * has TWO or more computers...
     * wherein, there is ONE (ONLY ONE) linux machine
     * and the rest are Win95 or WinNT machines. (I doubt things will be
       any different for a MACintosh).
     * Only the LINUX machine has PPP access to the internet. The other
       machines MAY have modems. I shall ignore those modems.
     * if ANY of your clients are UNIX machines, you are perhaps better
       off reading the "sockd" package's documentation, since you may be
       needing the use of "rlogin", "ftp" etc... from within the UNIX
       CLIENTS. This document will not help you in that aspect.
     * The computer network is assumed to be TCP/IP over ethernet. No
       netbeui, etc...

   _The "single linux" machine will be referred to as the "LINUX SYSTEM".
   while all others are referred to as "OTHER MACHINES" or also as
   "CLIENT MACHINES". The linux machine is also referrred to as the
   "SERVER" sometimes._
     _________________________________________________________________

   If you do not understand the next para, then jump to the FOR NETWORK
   NOVICES ONLY section. Then come back here...

   All of the following assumes that there is an IP address assigned
   (using "ifconfig") to the eth0 port of your LINUX server.

   Also, matter, this document does not restrict you to PPP only (it
   could be SLIP, PPTP, etc...) The IP address of the "ppp0" port is
   absolutely irrelevant. This document assumes you have one such port,
   and that its UP.


     _________________________________________________________________

   _WHY WE NEED SUCH AN ARRANGEMENT:_
     * The linux machine is to be used to connect to the world. Only the
       linux machine has a REAL-WORLD IP address. (see below). (see
       "ON-LINE services" section below). The linux machine has a
       non-persistent PPP link to the world.
     * The other machines in the network have IP addresses that are
       either invalid or are unknown to the world.
     * You need to use the "Other Machines", and NOT the linux machine to
       access the internet, VIA NETSCAPE ONLY.
     * I have no need to "telnet" or FTP directly from the "other m/c" to
       the world. If I ever need to, I telnet manually into the linux
       machine, and then into the world.

   I did NOT want to spend much on a linux m/c that didn't run an X
   server (much less any X applications). I bought a 486Dx/4 100 Mhz PCI
   board (since I didn't want to be stuck with plain ISA slots), with a
   $20 SVGA card and a $20 NE2000 compatible card, and an extra 20$ for
   terminators+co-ax ('cos I didn't know how to convert a regular
   Ethernet Hub connecter into a pt-2-pt connector).

   And $90 worth of memory (it went all the way to $60 for 16megs) and I
   had a fully functional linux system for $270. Don't intend to burden
   that system with NT or any other memory-disk-cpu hogging OSes.
   Ofcourse, my client machine is a 32-meg P100 machine with two hard
   disks (one of which was transplanted as a linux machine's HD) and runs
   95.

   The linux system is sitting on top of a clean PizzaHut pizza box. I
   couldn't affort another $50 for a tower, since I was getting a power
   supply module from one of my friends.


     _________________________________________________________________

   _The reason I chose NETSCAPE_ is that I no longer use FTP manually.
   Its simply, out of fashion. Every ftp site, worth its name and every
   company, has a web site that lets me use the Netscape browser to
   access their ftp site. I do need to telnet frequently, but go thru the
   trouble of going from my win95/winNT4.0 machine to the linux machine,
   and from there... Secondly, I am hooked to QuickTime and all those net
   audio sites. And LINUX versions of those tools, do not exist. So, I
   have to run stuff from Netscape ON windows platforms. And my LINUX
   machine recvs EMail using sendmail... (remember, I have a fixed IP
   address. Such fixed IP addresses are better ONLY for things like
   recving email. Its no benefit for Surfing, Telnetting, etc...)

   Lastly, we will never have a "Microsoft Explorer Browser" for linux,
   and hence I never even considered using Explorer. Also something tells
   me that its NOT going to be this easy to configure the Explorer as it
   was to configure the NETSCAPE on the CLIENT machines (i.e., the other
   machines).
     _________________________________________________________________



  PROXY SERVER



   I am not giving directions to installing a PROXY server. This is about
   installing a "socks" facility on the LINUX machine, which NETSCAPE on
   the client machines can use to access the internet. NETSCAPE (as far
   as I know) is the ONLY application that runs on NON-UNIX machines and
   is aware of the SOCKS facility.
     _________________________________________________________________



  INTERNET Addresses



   If you have a TCP/IP network, then you MUST have ATLEAST two IP
   addresses for the machines (one for the LINUX machine and another for
   the one of the Client Machines, and more IP addresses if you have more
   than one client machine).

   Read the other HOW-TOs on how to assign IP addresses to ALL your
   machines on the TCP/IP network. (ESPECIALLY IF YOU DO NOT have a
   REGISTERED internet domain).

   I created a network 10.0.1.x out of the single LINUX machine and the
   single Win95 machine. They were assigned 10.0.1.1 and 10.0.1.2
   respectively. The 10.0.1.1 is the IP address of the ETHERNET port
   (eth0) of the LINUX machine. The ppp0 port has another IP (which
   [lucky me] has a fixed IP address). That IP address is irrelevant to
   us, and also, being withheld for security reasons.

   I also have a fixed domain name server on the other end of the PPP
   link. (University machine).

   The linux machine has a modem and CRONTAB entries, that automatically
   dial up to the internet at fixed times daily. I also manually connect
   to the internet, when I want to go surfing.

   If you connect to the internet via ON-LINE services, see below...
     _________________________________________________________________



  ON-LINE services



   If you connect to the world using ON-LINE services like AOL,
   Compuserve, Sprynet, Netcom etc... then you may NOT have a fixed IP
   address. That is of little relevance in getting your intrAnet hooked
   up to the world. If you do not believe that, I request you to read
   on... and become a believer...
     _________________________________________________________________



  Some Background Information



   (For those who are like me and want to know what the hell is
   happening...). Others may skip this section....
    1. ... since you have ONLY one ethernet network, you do NOT need
       routing within that network. And you perhaps have manually
       hardcoded the IP addresses ( 10.0.1.1, 10.0.1.2 ) of ALL your
       machines in /etc/hosts. If you did that, you are smart person.
       Using "named" for a two or three computer network at home, is like
       using the bulldozer instead of a spoon to eat.
    2. What we would ideally like, is for ALL IP packets from the client
       machines to go to the LINUX machine, which will then route
       accordingly. Problem with this, you are exposing your computer to
       hackers because if the LINUX machine routes, you DO NOT have
       firewalling or proxy or whatever. Here in this document, we will
       do firewalling unintentionally! while trying to get NETSCAPE to
       access internet from the client machines.

       One problem with this "re-routing" desired from the linux machine,
       is that the clients MUST actually SEND ALL packets to the linux
       machine, no matter what the destination address. To that end,
       Win95 and WinNT will ONLY allow "proxy servers" (Which I intend to
       figure out, and write another document on).
    3. IF you are well versed with various free utils, you may have heard
       of "term" package. It was designed simply because its easier to
       configure networks being a "simple" user and NOT AS A ROOT/ADMIN
       (on both client and server sides). The same logic goes with
       NETSCAPE on the clients. It is easier to JUST GET the netscape to
       access the internet and leave the rest of the features (FTP,
       TELNET) unsupported.
    4. If you think, having ONLY netscape access and NOT telnet / ftp
       access to internet from the client machines, is a bummer, then you
       are a dinosaur. Wake Up, Mr./Ms. Rip Van Winkle.
    5. (TECHNICAL) The "named" which remained unused (as mentioned above)
       will be put to use to support NETSCAPE (so that http:/www.sex.org
       will be resolved right from the client machine).
    6. (TECHNICAL) You will have to REBUILD your LINUX kernel to disable
       IP forwarding. I intend to rebuild my kernel with forwarding
       ENABLED and see if the socks package still works (I am betting it
       will). If it does, then you will find a newer version of this
       document. (What this means, is that, you can use the kernel
       installed by your favorite LINUX installation package).
    7. You will need ROOT access on the linux machine :-) You will need
       to download the socks package and COMPILE it. It will NOT compile
       'cos the MAKE file is bad.
    8. (TECHNICAL) be prepared to edit the socks.c file, to comment out
       ONLY two lines which place an entry in your syslog file (/var/adm)
       for every data transfer via socks. For eg: a single page on
       WWW.CNN.COM will have 10 pictures atleast and 5 separate text
       objects. For each of them you will find an entry in syslog (that
       it was transferred!). My syslog keeps filling up. I do NOT like
       that. Maybe you might not mind.
    9. This sockd package supports CLIENT machines ONLY. All applications
       on the LINUX machine DO NOT need the sockd or any other package to
       access the internet, since this LINUX machine connects to internet
       directly using PPP.


     _________________________________________________________________



  PREPARING YOUR LINUX MACHINE



   Read the NET-HOW-TO in /usr/doc/faq/howto on your linux machine (if
   its slakware), or go to the www.linux.org and read the same NET-HOW-TO
   there...

   In that you will find how to down load the socks package and compile
   it. You NEED TO READ the instructions there to setup the in-house
   network. But you are welcome to read this :-) .

   That document spends a lot of time, explaining how to configure UNIX
   clients. Especially for "rlogin" "telnet" "ftp" etc... If you do not
   have UNIX clients, then after compiling the SOCKS package, start
   reading this document again, for using the socks package rather than
   the readme file in that package.

   I placed the tar file in /usr/local/ProxyServer and untarred it,
   creating a "sockd4.2b" subdirectory within which there is a
   "Makefile". As mentioned in the howto document, I had to struggle to
   successfully do a make on the MAKEFILE.


     _________________________________________________________________

   For your convenience, the MAKEFILE is included at end...

   Hopefully, you will have change line # 9 of my copy of the Makefile,
   only.
     _________________________________________________________________

   Then I moved the sockd directory contents into its parent and changed
   the line # 9 and did a make again -- successfully. So I guess I
   "fixed" the MAKEFILE.
     _________________________________________________________________



  Setting UP the sockd daemon



   You will find an executable called "sockd" in the sockd subdirectory.


Once you are done compiling, _COPY the following files to_ /usr/local/etc
(They SHOULD be in the same dir as the sockd directory)
        sockd                   (The executable a.k.a daemon)
        sockd.conf              (configuration file)
        sockd.route             (configuration file)
        socks.conf              (configuration file)

# ### make a link called "socks" which points to "sockd" within the same dir.
# cd /usr/local/etc
# ln -s sockd socks

   Then edit those three configuration files so that they are similar to
   the ones given below (these are my settings for a two computer
   network, made up of a LINUX "server" and a Win95/WinNT client
   machine).
     _________________________________________________________________



  My sockd.conf file



permit  10.0.1.2    0.0.0.0
deny    0.0.0.0 0.0.0.0 : /usr/ucb/finger @%A | /usr/ucb/mail -s 'SOCKD: reject
ed -- from %u@%A to host %Z (service %S)' root
#BAD_ID: /usr/ucb/finger @%A | /usr/ucb/mail -s '%U pretends to be %u on host %
A' root@%A root
#NO_IDENTD: /usr/ucb/mail -s 'Please run identd on %A' %u@%A root@%A
#[EOF]

   _NOTE_: 10.0.1.2 is my Win95/WinNT client machine's IP address. This
   sockd.conf file MUST be on your LINUX server (in my case that the
   ethernet port of the LINUX server has an IP address = 10.0.1.1)

   _NOTE_: This sockd program is for CLIENT machines ONLY. All
   applications on the LINUX machine DO NOT need the sockd or any other
   package to access the internet, since this LINUX machine connects to
   internet directly using PPP.


     _________________________________________________________________



  My sockd.route file



#! NoShell
10.0.1.1        10.0.1.0        255.255.255.0
#[EOF]

   _NOTE_: The first IP address is the address of the LINUX machine's
   eth0 PORT. The second IP number is NOT an IP address -- Its the
   NETWORK address (basically, convert the last of the FOUR numbers of
   the IP address into a ZERO).
     _________________________________________________________________



  My socks.conf file



direct  127.0.0.1       255.255.255.255
direct  10.0.1.1        255.255.255.255
direct  10.0.1.2        255.255.255.255
sockd   @=199.99.99.99  10.0.1.1 0.0.0.0


     _________________________________________________________________


     _________________________________________________________________


     _________________________________________________________________



  Now to configure the LINUX machine


     * _Step # 1:_ Check to see if "named" is already running in your
       system. If it is -- then, you are on your own. Unless you know the
       concepts of DNS very well, you may not be able to adapt the
       contents of this document to suit your needs.
     * _Step # 2:_ Copy the "named.boot" file given below into your
       machine.
     * _Step # 3_: copy the "root.cache" file given below into your
       machine (follow instructions that come with it).


     _________________________________________________________________



  /etc/host.conf file

   All programs that run on the LINUX machine WILL (you cannot prevent
   that) use the resolver libraries -- which depend on the file
   /etc/host.conf

   You must make sure that NONE of these programs ever access the "named"
   daemon on THAT VERY linux machine. To do that we shall specify to the
   resolver routines (i.e., routines which convert www.cnn.com into the
   numerical ip address) that those resolver routines MUST either check
   the /etc/hosts file and then check the DNS servers mentioned in
   /etc/resolv.conf

   How do we do that? Simply, make sure the /etc/host.conf file is :-


                order hosts, bind
                multi on

   If there is anything else, remove it, unless you know a lot about DNS
   and "named".

   The reason I insist on preventing the LINUX machine's applications
   from accessing its own "named" server, is because it makes no sense.
   And from my experience, such a "unnecessaries" may look technically
   safe and harmless but will cause enough grief sooner or later...

   The linux machine is obviously doing just great accessing the internet
   via the PPP (or whatever link) link. We are installing "sockd" package
   and the "named" daemon for the client machines. Let's not disturb the
   LINUX system.
     _________________________________________________________________

   You DO NOT NEED to change the "/etc/gateways" or "/etc/hosts" file or
   the "hosts.allow" or the "hosts.deny" file in order to get your socks
   working.

   Do not change any file unless someone suggests a change to that
   file...

   I will also assume that you have setup "resolv.conf" properly, to
   enable your LINUX server to access the internet and the DNS (on the
   "other end" of the PPP connection). My sample resolv.conf file is
   available as a sample at the very end.

_
                ***********************************************
                                WARNING
                ***********************************************
                For your own good, I suggest that you setup your
                machine through the linux installation programs
                (i.e., while installing linux on your computer.)
                ************************************************
_


     _________________________________________________________________



  My named.boot file



        ;    boot file for name server
        forwarders 128.112.129.111
        directory /etc
        cache      .       root.cache
        primary    1.0.10.in-addr.arpa   named_DNS_for_inTi_xwk
                                         ^^^^^^^^^^^^^^^^^^^^^^

   NOTE: line # 2, contains the IP address of the DNS server in the
   network to which your LINUX machine connects to using PPP(or
   whatever).

  *** How to determine this IP Address ****

   SIMPLE ! on a command prompt type in the command "nslookup". The
   response you see will CONTAIN such an IP address. (After noting the
   DNS' IP address, exist "nslookup" using &LT;CTL-D&GT;.

   _NOTE_: The LAST line contains the _name of a file_ called
   "named_DNS_for_inTi_xwk' which MUST be in the "/etc" directory. The
   contents of this file, is given below (you are free to give it a
   better name :-) )
     _________________________________________________________________



  My "named_DNS_for_inTi_xwk" file



@               IN      SOA     10.0.1.0 hostmaster.10.0.1.0 (
                                1       ; Serial
                                28800   ; Refresh
                                7200    ; Retry
                                604800  ; Expire
                                86400)  ; Minimum TTL
                        NS      10.0.1.1
1                       PTR     MyLinuxMachine

   _NOTE_: The last line (starts with a 1) contains the name
   "MyLinuxMachine". replace it with the name in /etc/HOSTNAME. _NOTE_:
   Again , as you have been doing so far, replace "10.0.1.1" with that of
   your LINUX machine eth0 port's address, and replace "10.0.1.0" with
   that of the network address of that port. _NOTE_: I really do not
   understand every character of the above file. You will be better off
   statisfying your curiousity by studying the documentation for the
   NAMED daemon.
     _________________________________________________________________



  My root.cache file



   _To get this file read the NET-HOW-TO documentation and the
   documentation that comes with the socks package.

   Those instructions are VERY simple...

   All I did was to run a command mentioned there, and redirected it into
   a file and called it "/etc/root.cache"

   _

; > DiG 2.1 > ns
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER


  __________________________________________________________________________



  Add this to /etc/services



(add the single line starting with "socks"...)

# services      This file describes the various services that are
#               available from the TCP/IP subsystem.  It should be
#               consulted instead of using the numbers in the ARPA
#               include files, or, worse, just guessing them.
# Version:      @(#)/etc/services       3.02    02/21/93
# Author:       Fred N. van Kempen,

... &LT;lines delete&GT;

socks           1080/tcp                        # sarma: Sep.15.96: Got this fr
om the ~sockd/include/socks.h file.

... &LT;lines delete&GT;

# End of services.



_NOTE_: This line is read ONLY by inetd daemon I think.  This tells the inetd t
o invoke the "socks" program for all tcp connections to the port # 1080.


  __________________________________________________________________________



  Add this to your /etc/inetd.conf file



        # I am just following instructions from ~sockd/doc/sockd.1 man pages...
        socks   stream  tcp     nowait  root    /usr/local/etc/socks


     * NOTE: Make sure /usr/local/etc is in the SYSTEMS's default PATH.
     * NOTE: For more instructions, read the SOCKD package's instruction
       file. In that this very same line is mentioned, and also you will
       get to know what it means...
     * NOTE: As the filename indicates, this file tells the "inetd"
       daemon where it can find the "socks" program, and what arguments
       to pass it (always) etc...


  __________________________________________________________________________



  __________________________________________________________________________



  __________________________________________________________________________



  LET'S GET STARTED !


Now reboot your system (if you know how, you may instead send HUP to the approp
riate daemons).  Your LINUX server is now set.



do a "tail -f /var/adm/messages"  and a "tail -f /var/adm/syslog" simultaneousl
y and attempt to connect using NETSCAPE from your CLIENT machines.



        Now let's configure the client machine's Netscape...


  __________________________________________________________________________



  Configuring NETSCAPE 3.0 Client


This is to be DONE on the client machines ONLY

DO NOT bother doing this on the LINUX server.



     * Pull down the menu called "options" in Netscape.
     * Choose "Network Preferences".
     * You MUST see a dialog box (new window) with "TABS" (layers)...
     * One of the "tabs" will be labelled "PROXIES"
     * Click on that layer/tab.
     * You will see a radio button labelled "manual proxy configuration"
       with a button beside.
     * CLick on that button to open up another dialog box.
     * The second last set of entry slots in that new window will show
       you...


        --------- --------------------------              --------
        | socks | |                        |              | 1080 |
        --------- --------------------------              --------


This shows that netscape is already aware of socks.  All you have to do is to t
ell NETSCAPE where the socks daemon is running.



Type in the _eth0 port IP address_ of the linux server in the _middle box_ show
n above...



Save this setting and get going... !!



  __________________________________________________________________________



  __________________________________________________________________________



  __________________________________________________________________________



  For Networking NOVICES


        If you have already used your Win95 or WinNT machines to connect to the
 internet via PPP, this documents is of absolutely NO help to you.  Anyways, wh
y bother using linux to connect to the internet when you can do so via the clie
nt machine's built-in PPP?



        If you haven't been able to connect to the internet via the LINUX serve
r, then stop reading this document and read the other HOW-TO documents to setup
 your LINUX machine to access the internet via the PPP link.



I hope you know the concept of IP addresses.  In short IP addresses have "mnemo
nics" formats (like www.cnn.com) as well as numeric versions like "198.20.186.4
".  If you type the former "www.cnn.com" someone must HELP your computer conver
t that name into the numerical format.



        Why the numerical format?  'cos, that numerical format encodes a very e
fficient system of telling each computer HOW to send out communication capsules
 to OTHER computers THAT IT WANTS TO communicate to.



        So, if you type in "www.cnn.com" on your NETSCAPE browser, then a UNIX
computer called a "DNS server" will convert that name into a number for your co
mputer.  Then your computer will use that numerical format of the IP address to
 actually CONNECT to www.cnn.com and show you their latest news.



So, the gist being that : to use the internet you need a DNS server.  This docu
ment includes instructions on setting up your computer to HOOK up to your NEIGH
BORHOOD DNS server.



Your LINUX machine MUST have ALL of the following :-
    1. A modem, through which you can connect to INTERNET *** DIRECTLY
       ***
    2. An ethernet card, to which you have the ethernet cable hooked up
       (the other ends of which you have your client machines hooked up
       to...)
    3. A Working PPP connection.
    4. A Valid DNS server information (use nslookup --- if that program
       retuns invalid values, stop reading this document. You WILL NOT be
       able to proceed...)
    5. Netscape 2.0 or later on your client machines.)

   The "modem" is technically referred to as the "ppp0 port" as far as
       this document is concerned.  By "port" I mean something similar to
       a "Sea-Port".  This modem or PPP port enables you to "explore the
       world" (go on a "vacation" from daily chores) :-)



The "ethernet card" is your "eth0" port.  That ethernet "port" lets you explore
 the ethernet network to which its connected.



Since your client machines are connected via the ethernet cable to the LINUX ma
chine, anything that your client machine communicates to the LINUX machine will
 ONLY REACH the linux machine VIA the "eth0" port.   ANything that the outside
world sends to your LINUX machine will ONLY REACH via the "ppp0 port".  So, its
 very important that these two ports be given "DIFFERENT ADDRESSES".



To make things easier for you, if you ALREADY successfully connected to the wor
ld using PPP, then, you have UNKNOWINGLY (or knowingly) assigned an IP numerica
l address to your linux machine's PPP port.



  __________________________________________________________________________



  The MAKEFILE for sockd compilation



        SHELL=/bin/bash
        #SOCKS=-DSOCKS
        # or
        SOCKS=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten -D
accept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect
        CFLAGS="$(SOCKS)"

        # If your system doesn't have PWD defined, define it here:
        PWD="/usr/local/ProxyServer/socks42b"
        # It should be this current directory.

        # If your system has getcwd() but no getwd(), uncomment the next line:
        #GETCWD=-DGETCWD

        # Define FASCIST if you want ftp (rftp) to log names of all files trans
ferred
        #FASCIST=-DFASCIST

        # Define RCMD and SUPPORT_RCMD if you want to support Rrcmd, which is r
equired
        # for SOCKSified rlogin, rsh, and rcp.
        RCMD=Rrcmd.o
        SUPPORT_RCMD=-DSUPPORT_RCMD

        # Define FOR_PS if your system is not SYSV and you want to have the
        # command 'ps' show some details of sockd's activity.
        FOR_PS=-DFOR_PS

        # Define SHORTENED_RBIND to make Rbind() take exactly the same
        # argument list as the regular bind(), i.e., without the additional
        # 'remhost' argument.
        SHORTENED_RBIND=-DSHORTENED_RBIND

        # optimization flag for cc
        #OPTIMIZE=-g
        OPTIMIZE=-O6 -fomit-frame-pointer -pipe -m486
        # Be careful with the OPTIMIZE flag. SunPro's SC2.0.1, for example, is
        # knwon to produce incorrect code when -O is used.

        # Directory into which to install the man pages
        MAN_DEST_DIR = /usr/local/man

        # Directory into which the SOCKS server should be installed
        SERVER_BIN_DIR = /usr/local/ProxyServer
        ## This was defalted to /usr/local/etc

        # Directory into the client programs should be installed
        CLIENTS_BIN_DIR = /usr/local/ProxyServer
        ## This was defaulted to /usr/local/bin

        # LINUX should use
        CC=gcc
        RANLIB=ranlib
        RESOLV_LIB=
        #OTHER_CFLAGS=-traditional -DLINUX  $(GETCWD) $(FASCIST) $(SHORTENED_RB
IND) -DCOMPAT
        OTHER_CFLAGS=-DLINUX  $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT
        OS=linux
        INSTALL=install
        GETPASS=getpass.o

        # Remember to include -Dindex=strchr -Drindex=strrchr in OTHER_CFLAGS i
f
        # you don't have index() and rindex() (Sys-V camp)

        #



  __________________________________________________________________________



  The ppp-on script


NOTE: This script is being provided as a sample.  Having this sample is not a g
uarantee that you will have an internet connection.


        #!/bin/csh
        #
        #       ppp-on
        #
        #       Set up a PPP link

        set LOCKDIR=/var/spool/uucp
        set DEVICE=cua3

        set OUR_IP_ADDR=128.000.111.222

        if ( -f $LOCKDIR/LCK..$DEVICE ) then
            echo 'PPP device is locked'
            exit 1
        endif

        route del default
        # Just in case the Ethernetwork (In-House ethernet network) is up....
        #       if its NOT, then the above command is harmless...
        route ## To show that the above was successful...

        /usr/lib/ppp/fix-cua $DEVICE

            unalias pushd
            unalias popd
            pushd /usr/lib/ppp
            # stty 19200 -tostop

            # The original code has been commented out below...
            # if chat -l LCK..$DEVICE ABORT "NO CARRIER" ABORT BUSY "" ATZ OK A
Ts50=255s111=0DT$PHONE CONNECT "" ogin: $USER ssword: \\q$PASSWORD
            echo $cwd
            ls -l ./comserv.dip
            dip ./comserv.dip       ## I removed the -v (DEBUG&VERBOSE) option
to 'dip'.
            set dip_status=$status
            # echo the return value of dip is $dip_status

            if $dip_status == '0' then
                # Now please wait for 10 seconds, while the link is being auto-
verified by dip.
                echo 'About to fork-off pppd (after a delay of 10 secs)...'
                date
                echo 'If you see any error msgs below, then we are having SERIO
US problems...'
                sleep 10
                pppd -detach crtscts defaultroute domain remote.princeton.edu m
ru 1005 mtu 1005 $OUR_IP_ADDR{}: /dev/$DEVICE 38400 &
                ###### we dont need this for the previous line...     /dev/$DEV
ICE ) &
                #    The pppd deamon is FORKED OFF.  See the "&" at the END of
above line...
                # By using "locl" option, I am requesting that /var/spool/uucp
be the dir
                #    in which the LOCKS are created...
                echo 'Now wait another 10 seconds, before I auto-verify interne
t connection.'
                sleep 10
                cat ~root/@utils/.line
                ping -v -c 5 genius.eng.wayne.edu
                cat ~root/@utils/.line
                traceroute physics.iisc.ernet.in >&! /tmp/$$
                                                cat  /tmp/$$
                                                \rm -f /tmp/$$
                cat ~root/@utils/.line
                exit 0
            else
                echo 'PPP setup failed'
                exit 1
            endif
            popd
        # [EoF]



  __________________________________________________________________________



  The comserv.dip script to dial up PPP.



NOTE: This script is being provided as a sample.  Having this sample is not a g
uarantee that you will have an internet connection.  This script is called from
 the PPP-ON script given above...


        #******************************** comserv.dip *************************
*******
        #
        # Connection script for SLIP to ........
        # STATUS code for "dip" when it executes this script are:
        #  0 - all ok.
        #  1 - basic failures, in initializing the modem.
        #  2 - Failed in the crucial "dial" command.
        #  3 - Though DIAL command was successful, this script couldnt recogniz
e
        #      the VERY FIRST responses from the other modem. (i.e., Training o
ccured
        #      but, after that nothing happened that was intelligible to this s
cript.
        #  4 - Modems could nicely link up.  But remote server HAS CHANGED synt
ax.
        #      i.e., the strings output by the server, are assumed to arrive in
 a
        #      PARTICULAR sequence.  If server s/w has changed, then we have th
is
        #      problem.  SOLUTION!!!! Manually connect and note all the strings
 &
        #      all the sequence of interactions...  Then reprogram the script b
elow.
        # 10 - though dialing and connecting (modem-wise) is successful, ppp fa
iled.
        #######################################################################
#####
        main:
        redial:
          # Set the desired serial port and speed.
          port cua3
          speed 38400
          # term
          get $mtu 1005
          # Reset the modem and terminal line.
          reset
          # Without doing the above reset, nothing below will work!
          # Initialize the modem and dial comserv.
          # send ATQ0V1E1X4L1S0 0 \r
          # wait OK 5
          send ATZ\r
          wait OK 5
          if $errlvl != 0 goto error
          # send ATTQ0V1E1X4S0=0&C1\r
          # wait OK 5
          # if $errlvl != 0 goto error
          ## For Dial Tone use :- send AT&D2\r
          send AT&DP\r
          wait OK 5
          if $errlvl != 0 goto error
          # send ATS10=1\r
          # wait OK 5
          # if $errlvl != 0 goto error
          print if the line is busy, the dial command will realize that after 3
0 secs ONLY.
          dial 258-0000   30
          print Return value of DIAL is $errlvl
          if $errlvl == 1 goto Continue1
          if $errlvl == 3 goto busy
          print unknown error with DIAL command in "dip" script.
          quit 2 # unknown error with crucial DIAL command...
        busy:
          print telephone number is busy... Continue (1) or terminate (2)?
          get $input ask
          if $input == 1 goto redial
          print You have requested to cancel PPP.  Quitting...
          quit 10 # terminated...
        Continue1:
          # wait V32 30
          # wait CONNECT 10
          # if $errlvl != 0 print Couldn't detect a CONNECT
          # if $errlvl != 0 goto connect_fail
          # print CONNECT was detected...
          # We are connected.  Login to the system.
        login:
          sleep 3
          # send \r\r
          wait Username: 20
          if $errlvl != 0 goto error2
          send USERID\r
          wait Password: 5
          if $errlvl != 0 goto error2
          send __Password+_::\r\r
          wait comserv> 15
          # print Reached Comserv prompt...
          if $errlvl != 0 goto error2
        slipon:
          send ppp\r
          wait PPP_STARTED 25
          if $errlvl != 0 goto error2
          print CONNECTION completed...
          mode ppp
          exit 0
        error:
          print Total failure to interact with MODEM!!!
          quit 1 # basic failure in working with modem, etc...
        connect_fail:
          print Couldnt detect a "CONNECT 14400" kind of string after dial in..
.
          quit 3
        error2:
          print Modems could nicely link up.  But remote server HAS CHANGED syn
tax/ interaction sequence...
          quit 4 # basic failure in working with modem, etc...
        #=================================== EOF ==============================
=====



  News Leafsite mini-HOWTO
  Florian Kuehnert, sutok@gmx.de
  v0.3, 4 January 1998

  This HOWTO will help you to configure a small leafsite for Usenet News
  using the free software package Leafnode. For any questions, sugges
  tions and comments, please write to Florian Kuehnert (sutok@gmx.de).
  Please send any bugs you found in this document to me as well. (C)
  1998 by Florian Kuehnert.

  1.  Why to use Leafnode?

  In normal cases if you want to read news offline on your local
  computer you have to install a news server software like INN or CNews.
  Also you are in the need for an nntp or uucp connection to your
  newsfeed.  In fact that such packages contain much more features than
  you need, you run better by installing Leafnode.

  Leafnode is much simpler to use and very small but there are some
  disadvantages: Leafnode is slow and loses news in about any error
  situation. That's why you shouldn't use it for a big news server,
  nevertheless, its appropriate for private users who dont want spend
  much time configuring INN.

  2.  Where to get Leafnode?

  Leafnode is available at ftp://ftp.troll.no/pub/freebies/
  <ftp://ftp.troll.no/pub/freebies/> and has been developed by Arnt
  Gulbrandsen, an employee of Troll Tech AS. The recent version is 1.4
  and in some distributions (for example Debian), Leafnode is included.
  However, be sure to use at least version 1.4 as several critical bugs
  were fixed.

  3.  How do I install it?

  A small installation help comes with the package, but let's do it
  together :-) -- If Leafnode >=1.4 is shipped with your distribution,
  it would be the wisest to use the pre-compiled version and leave out
  the steps 1 to 4.

  1.) Be sure that there is no other news server running on your
  computer. When you type
  $ telnet localhost nntp
  you should get an error message. If you get a connection get back to
  the prompt of your shell, you should uninstall INN, CNews or whatever
  you're running now and comment out the nntp-line in your
  /etc/inetd.conf.

  2.) Make sure that there is a user called "news", check in
  /etc/password for the name. If there isn't, create one (either typing
  $ adduser news
  or using a tool shipped with your distribution).

  3.) Unpack the sources:
  $ tar xfz leafnode-1.4.tar.gz
  and change into the source directory
  $ cd leafnode-1.4

  4.) Compile the program and install it
  $ make; make install
  5.) Edit /usr/lib/leafnode/config (it may be on any other place like
  /etc/leafnode when you use a pre-compiled version of your Linux
  distribution). The line "server =" should point to the news server of
  your ISP.

  6.) Edit /etc/nntpserver. It should include your local hostname
  (localhost or whatever your computer name is, the command hostname
  should help you). If in some startup file like /etc/profile or
  /.bash_profile the environment variable is defined, you should adjust
  to your computers name as well.

  7.) Edit the /etc/inetd.conf: Make sure that there is no line
  beginning with "nntp". If there is such a line, comment it out putting
  a "#" before it. Then add the following line:
  nntp    stream  tcp     nowait  news    /usr/sbin/tcpd
  /usr/local/sbin/leafnode
  When someone (for example you :-) connects to your computer on the
  NNTP port, leafnode is started as server process.

  8.) Go online and run the program "fetch" as root or news. The first
  time fetch is started, it will download a list of your ISP's
  newsgroups. This may take some time depending on the speed on your
  connection and the number of groups your ISP has in its active-File.

  9.) Start your favorite newsreader (slrn, (r)tin and knews are not a
  bad start) and subscribe to all your groups you read. Be careful not
  just to subscribe these groups, but also to enter them, even when
  they're empty.

  10.) Start fetch again to download all the news of the groups want to
  get.

  4.  How do I maintain leafnode?

  Now you have got a working news system up and running, but there are
  still some things to do. You may edit the file
  /usr/lib/leafnode/config to set the expire dates of your groups. This
  number means, when old messages should be deleted. The standard time
  of 20 days is much often too long if you read some groups with much
  traffic, 4 days or a week are in most cases a good time for your
  system. You may change the value for all groups ("expire = n" to hold
  all groups n days), but you tell leafnode to change this time for some
  separate groups writing
  groupexpire foo.bar n
  to set the expire time for the group foo.bar to n days.

  This setting alone won't make leafnode deleting old messages, a
  separate program is responsible for this: texpire. It may be started
  as a cron job or by command line. If your computer is up all the time,
  you may want to add the following line to news' crontab file (to edit
  it, log in as news and type "crontab -e" or as type root "crontab -u
  news -e"):
  0 19 * * * /usr/local/sbin/texpire
  This line causes the cron daemon to star texpire every day at 19:00.
  Check the crontab manual page for further adjustment. If your computer
  is not regularly switched on, you may start texpire just from time to
  time, when you notice that fetch gets slower. It works fine as with
  the "cron-method".

  5.  How does it work?

  Leafnode is a "real" NNTP server, which means that you can also login
  from a different computer (via Internet, the local network etc.).
  Every time you enter a group in your newsreader, your reader sends the
  information to leafnode and requests it. If the group does not exist,
  leafnode will create an empty file /var/spool/news/interesting.groups,
  named like the group. When you run fetch the next time, it will fetch
  the messages of the group. If a newsgroup has not been visited for a
  certain time, leafnode will stop to fetch its articles and delete its
  name in /var/spool/news/interesting.groups. So if you just subscribed
  to a high traffic newsgroup by accident, you may delete its file there
  by hand for that you won't have to download all the postings there for
  the next week.

  A week is not enough for you? You want to go on holiday for three
  weeks and still get news? Unfortunately, there is no option in
  leafnode to change it. But you can edit the file leafnode.h and
  recompile it. The #defined constants are TIMEOUT_LONG and
  TIMEOUT_SHORT, just set the time in seconds up. Another, simpler
  solution is to define a cron-job that does "touch
  /var/spool/news/interesting.groups/*" every night.

  If you want to get a list of all avaible groups, look into the file
  /usr/lib/leafnode/groupinfo, where you will find a short description
  on the group.

  If you want to re-read the list of newsgroups from your newsfeed (for
  example when you want to read a new group), just delete the file
  /var/spool/news/active.read. Fetch will create it the next time and
  get the new list. Fetch will also re-read the grouplist from time to
  time, so you don't have to do it by hand.

  6.  What newsreader should I use?

  There is not *the* newsreader for Linux, like there is not *the*
  editor. My favourite newsreader is emacs in gnus mode which is the
  most configurable reader for Linux. Many people are using slrn and tin
  on a terminal, many people use knews under X. There are also trn, nn
  and a lot more reader, so just try what you like. The only reader you
  shouldn't use is Netscape, it is big, feature-less, unstable, and it
  creates sometimes broken postings. However, it is your personal
  decision.

  Anyway, knews is no bad idea for your first experiences as it is very
  user-friendly and easy to understand.

  7.  Where do I get more information?

  Some documentation is provided with the Leafnode package (read the
  files INSTALL and README, the sources are also quite interesting). If
  you want to know more about "professional" and "big" news servers,
  check the INN FAQ (they are provided with the INN package). To get
  information about your newsreader, type man "name of your newsreader"
  or check for other files in /usr/doc.

  If you have any questions concerning the news system, just ask in an
  appropriate newsgroup (look in the news.software.ALL hierarchy).

  If you have any question, comments or corrections concerning this
  HOWTO, just write to me (sutok@gmx.de).

  8.  Thanks

  I would like to thank Michael Schulz (michaels@home.on-luebeck.de) for
  his help concerning some language problems and Cornelius Krasel
  (krasel@wpxx02.toxi.uni-wuerzburg.de) for his "touch *"-trick.

  Linux off-line mailing method (offline mailaddr with 1
  account)
  Gunther Voet, freaker@tuc.ml.org - Belgium (CompuMed/TuCSRV)
  v1.3.3, 4 June 1998

  Use your linux mailing system offline, receive mail for multiple users
  with only one email address, and without being 24-24 online on the
  net.  If you are unable to pay a direct line to stay online for 24-24
  and still want your users to receive mail on your linux box; as well
  not pay for a multi-drop box at your isp, you can use this system
  using only one email address to divide to your users email addresses.
  It is as well 24-24 reachable since the server where your account
  resists will receive the mail.  ``This howto is Copyright (c)1997-98
  by Gunther Voet.''
  ______________________________________________________________________

  Table of Contents

  1. Notes by the author (preface).

     1.1 Legal stuff
     1.2 Copyrights
     1.3 Feedback
     1.4 Distribution
     1.5 Changes
     1.6 What am i using ?
     1.7 Thanks go out to ...

  2. Preliminaries

     2.1 Preface & Description
     2.2 Points of interest ...
     2.3 Things you should know
     2.4 there are 2 different ways ...

  3. Requirements

     3.1 A linux machine
     3.2 A extra account at your linux machine
     3.3 Fetchmail
     3.4 Procmail
     3.5 A mail account
        3.5.1 A DNS record (MX)
        3.5.2 A "forward" to your account-account :)

  4. I got it all, what now ?

     4.1 Creating a .fetchmailrc file
     4.2 Creating a .procmailrc file
        4.2.1 For "header (to:)" transportation
        4.2.2 For "subject: touser" transportation
     4.3 "nosuchuserfile"
     4.4 "crontab files".
        4.4.1 checkformail
        4.4.2 crontab
     4.5 "At the admins site".
        4.5.1 (old sendmail) add some lines to sendmail.cf
        4.5.2 (new sendmail) Adding some lines to sendmail.cf
        4.5.3 (new sendmail)editing the /etc/sendmail.cw (or /yourdir/sendmail.cw) file
        4.5.4 creating a /etc/maildomains file
        4.5.5 let it work !

  5. Automation

     5.1 The "skeleton".
        5.1.1 the ".procmailrc-header" file
        5.1.2 the .procmailrc-footer file ..
     5.2 addmail script

  6. Help! (sigh)

     6.1 The automation script just doesn't work:
     6.2 What do you mean by "anonymous mailserver"?
     6.3 My cat died
     6.4 My dog died
     6.5 Linux?
     6.6 Can you help me with finding a mail account?
     6.7 Why is the "maybe later i'll make some addition ..." removed ?
     6.8 How do i get a "domain" ?
     6.9 Why are you so f*cking lame using this?
     6.10 Nosuchuserfile?
     6.11 Can my users write/send mail too?
     6.12 Does every user need a shell account at my server?
     6.13 skeletion?
     6.14 Addmail?
     6.15 Why are you so cruel?
     6.16 Didn't you get a complaint of excessive language ?
     6.17 Why is this howto different than most others?
     6.18 locally my domain works, but remote it seems not to receive
     6.19 My dog died

  7. The End

  ______________________________________________________________________

  1.  Notes by the author (preface).

  In this chapter i'm just going to put myself safe for any damages and
  flames - since even *I* could be wrong ... If you got any questions or
  suggestions to add to this faq, even if you find any faults - there is
  a feedback section in it ...

  Some "need to know" point is, all filenames & files/types are
  indicated with the line:


       (*** < file > *** text ***)     .procmailrc


  This means, this is a file, called ".procmailrc" containing text. The
  text variable can also be code. It shows you what name of file to use.
  Without a path means it can be variable/choosen by you (in the most
  cases this files resists in the homedirectory of the mail"user" like
  /home/mailer).


  1.1.  Legal stuff

  Neither the author nor the distributors of this HOWTO are in any way
  responsible for physical, financial, moral damage incurred by
  following the suggestions and examples of this text. The information
  in this document contains the best of my knowledge and experience, but
  i could still make any mistakes as well in the information as in the
  examples. Any trademarks are property of their respective holders (i
  ain't using any commercial thingy's here - but well - IF i'm going to
  add some text, i don't need to change this disclaimer). If your cat
  dies 'coz this document was too heavy - i am not responsible as well
  ...


  1.2.  Copyrights

  This document and contents are Copyright (c)1997-98 by Gunther Voet.
  Unauthorized (re)production in any form is explicitly allowed and even
  strongly encouraged as long you don't change the contents of it
  without contacting the author (Gunther Voet). If you quote the
  document as whole or a part of it, there needs to be a Copyright
  "hint" or link to the derived work. "The HOWTO documents are
  copyrighted by their respective authors". The "HOWTO copyright" will
  discuss what can be done and what cannot be done with this document.
  If it is used in a commercial way, the author should been noticed for
  such distributions. Exceptions on this copyright may be granted under
  certain conditions with a written letter or e-mail to the author. For
  more info about the standard HOWTO disclaimer, please contact linux-
  howto@sunsite.unc.edu.

  *PLEASE* *IF* you are going to make a system based on this HOWTO, then
  PLEASE give me the copyright :) heh ... - i am not that cruel :)). I
  mean by a system "a package" - NOT the mailsystem itself - altough it
  is some appreciative thingy i would be included :)) i can always use
  one email address more for more flaming :)) (just kiddin').

  1.3.  Feedback

  Well, i expect from you and the users who read this HOWTO, they will
  make this HOWTO useful. If you got any suggestions, corrections,
  comments (except flame-mail :)) - please send them to me at
  freaker@freestamp.com or freaker@tuc.ml.org and i will make the
  corrections, comments or suggestions happen in the next revision. If
  you publish this document on a commercial way, a complimentary copy
  would be appreciated - you can mail me for my postal address. For
  flames - you could send them to me, but they will end at /dev/null ...
  so - don't even mind to waste bandwidth for it !.  Since i can exclude
  some users to receive mail from (explained in this document) (evil
  grin). My alias (name) is freaker btw :)). You can always try
  "freaker@freestamp.com". (note the changed address !!)


  1.4.  Distribution

  The latest revision of this document can been get from:

  http://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Offline-Mailing

  -and-

  http://tuc.ml.org/om/

  (also checkout http://tuc.ml.org)

  tuc.ml.org could be down at the time of current writing!


  1.5.  Changes


   v1.0.0       - Preliminary release, internal testing, we tried it before
                  we gave it out to you :) .. since - it GOT to be usefull
                  and needs to work? rite ? :)
   v1.1.0       - Fixed a lot of errors in the texts, put chapters in it,
                - fixed some small errors and typo's ...
   v1.2.0       - fixed grammatical errors.
                - added a "what-are-we-using" chapter.
                - added Sunsite address.
   v1.3.0       - Added "virtual mail support" for admins
                - New site and email addresses
                - Thanks go to ...
   v1.3.1       - Converted to SGML and fixed some minor details.
   v1.3.2       - Major errors corrected (filenames .fetchmailrc to
                  .procmailrc) etc... (thx to Tetsu Isaji)
                - Added support for the "new" sendmail, v8.8.0+
                - Fixed some minor errors
                - Upgraded my system YAY!
                - Japanese version will come out soon, location
                  will be mentioned when known ... (thx to Tetsu Isaji)
   v1.3.3       - Added CC support, changed email addr to freaker@freestamp.com

  1.6.  What am i using ?

  I'm using Linux 2.0.30, Pentium-166, ATI pci-mach64 card, Accelerated-
  X (Metro) and a connection to my isp (currently ibmnet) via ppp using
  a ZyXEL 28k8 modem, and occasionally a Bausch 28k8.

  Now i upgraded to Linux 2.0.33, installed a USRobotics modem, it still
  works as it should work :) (everybody should upgrade their linux
  versions as soon there comes out a patch :) believe me :) you could
  spare a lot of time & seeking for errors when doing this one :)


  1.7.  Thanks go out to ...


    Fred, durban.hebel.net (for allowing the pages & bot)

    Lifesaver, parkside.net (for allowing the new pages, helping with
     this faq for mailing, since, it is all working overthere and here
     ... make some visit to his cyber-cafe ... heard they got great
     coffee :))

    The server admins at lodus.net to continue this project.

    Now i'll need a new server since lodus.net has been sold :(


  2.  Preliminaries

  Well, how does this system works ? what can you do with it ? what is
  it anyway ? and ... am i used to read it ? ... to all those questions
  - there is an answer ...

  2.1.  Preface & Description

  This HOWTO is dedicated to all the off-line linux users/servers ...
  You got a group, or organization, and you want all your members to
  have a contact (email) address, without paying for the 24/24 direct
  line or for the email accounts ... Or you got a internal network -
  with a masq'd server and you want to give all the users using it a
  email address, you could use this way to do it. I personally am using
  it to give my users & members of a demogroup all a e-mail account
  without being 24/24 online; since it is a non-commercial demogroup -
  and we don't got THAT much money to pay a direct line with instant
  email access - and different ip's. Everybody got a email address, even
  when they don't got internet access. The ones with internet access can
  receive their mail on their personal email address - viavia the system
  described below. Your users can still send mail as they used to do,
  since - your system will hold the mail queue from the users. The only
  thing what should be changed for the users - is that they add their
  "email address" wether (described below) it is the method with the
  subject line, or with the header "to" ...

  2.2.  Points of interest ...


    A organization with members, for all a email address, so they can
     be contacted when neccesary.

    A anonymous mailservice - they can't read your "mail setup file" -
     so they don't know where the mail is forwarded/rerouted to.

    A group who doesn't got enuf money (don't laugh), or is free, and
     don't WANT to spend money for it (eheh) - and still wants to
     provide the members a email address.

    A masq'd network - with a server connected to the internet, where
     the users using the masq'd network need to have a email account

    You want to put some documents "autoreplied" - like i do with my
     HOWTO, statistics, or documents ... like "info@yourmail.dom" or
     "document1@yourmail.dom".


    You only need one account at the "main" server to fetch from, for
     the +200 email accounts you can create at your server ...

    I used the "B" method with +- 300 email accounts - with a public
     server; 80486DX4-100 - and was processed in 1 minute.


  2.3.  Things you should know


    Not every (free) mailservice is happy when you are going to
     distribute mail to other users, or putting up an anonymous mail
     server, so, please try to contact your mailserver administrator
     before "just doing it".

    It is slower than a direct 24/24 connection, since your server will
     need to get online before it will process the mail.

    It needs a administrative force to administrate the "mailrouting"
     and to add the user ... you will need work with it ! - it is not
     that automatic.  (well - i made it "semi-automatic" with my server
     :) you could try it as well).

    Bandwidth and space is needed when you got many users - on the
     mailserver you are working on ... and sure - when they send files -
     you need to have enough space on it !.

    All mail will be transferred into "one step" - so - the last mail
     received on your server will be last sent to the recipient. "first
     in - first out".

    In the first method (to:) there is no prob with the usernames - but
     in the second "cheaper" method - users can't put in a subject line,
     since that one will be used to send the mail to the recipient. Many
     users forget to use the "subject" ... - or they will need to know
     it clearly.

    If you poll enough for your mail, (for example 4 times a day) - the
     mail will be sure be delivered to as from a recipient the least
     every 6hrs. So the processing will go a little smoother.

    you CAN use it as a "online" mail server as well :) since it will
     poll for it's mail for every XX minutes. but - when you are online
     - why using another server ? and not asking your own domain for
     your own server ?  (dough).


  2.4.  there are 2 different ways ...


  1. method 'A' - now called "(m(A))".

     The "mailsystem" will look to the header, and will see to the "to:"
     line.  This is the best way, since it are "real email addresses".
     You will need another account on some server *AND* you need a DNS
     (MX) entry (your own domain for instance). If the system
     administrator wants to help you with that, then there will be no
     problem !. The system administrator will need to reroute ALL mail
     sent to your (MX) maildomain -> to your account !.  This will take
     some time for him to do it :) so be really nice to him :)) Thanks
     to my system administrator (Fred) i got my maildomain and the user-
     services of my "free" demogroup. It can be a DNS entry costs
     something, what you will need to consider to take it or not.

  2. method 'B' - now called "(m(B))".

     The "mailsystem" looks to the subject line, and will forward to the
     user indicated into the subject line. If the user is not found, it
     will bounce a mail back. This will need a pop server with only one
     useraccount, and don't need your own DNS or you don't need to be
     nice to your system- administrator who arranges you the mail
     address :). You can use a public mailserver, as well your own
     mailserver or a private one. You can even sacrifice your own email
     address for it :). I used this approach as first what worked for me
     for over a year now ... I know this is sloppy, but, i ain't telling
     you need to use this way, so don't shoot ME - since i'm only
     offering you some solutions to your mail problems :) - you could
     use method A what isn't that sloppy !


  3.  Requirements

  Well, you need (of'course) a Linux machine, what can be connected to
  the internet - So! (i am smart - i am smart :)) - you probably got a
  modem, right?  a phoneline - or any way to connect yourself with the
  server you are running.  You will also need some software like
  Fetchmail, Procmail, an extra account, and your email account or DNS
  with email account.

  3.1.  A linux machine

  This can be ANYthing ... even a 8086 ... - but preferable - since
  there will be some load on it - minimally a 80386 :). as faster the
  machine - as faster the software will run (rite eh)? :).


  3.2.  A extra account at your linux machine

  You need to create a extra account on your Linux machine. I am using
  as example (in this HOWTO) "mailservice". This can be as well
  "mailserver" or "mailtousers" - as long it is some name what can be
  recognized by you!.

  ! It doesn't need to have ANY root privileges !

  This mailaccount will forward all mail to the users on your system, or
  to external users (not on your system :)). Just create it as an
  ordinary user.  You will need to test things under this account, and,
  the mail "administrator" can use this account to administrate the mail
  account without being root even .. so - pretty safe !.


  3.3.  Fetchmail

  I am using v1.9 patch level 9 ... i found it at sunsite.unc.edu, and,
  i am using only this mail-fetcher in my example - if you want to use
  another one, you are on your own ! since i am happy with it :). For
  extended features you should read the man of Fetchmail :). This can be
  installed as root - as well for the user itself ... - best is to
  install it as root :) since i know it will work for sure then :)))


  3.4.  Procmail

  I am using v3.10 - found it again at sunsite.unc.edu, and - i like
  this as the best mda (mail delivery agent) around ... It delivers
  nicely - and it is better than using it by the "original" system mda -
  since it will deliver user-per-user ! ... The same as above - it can
  be installed as root, or as user - and :) best is to install it as
  root - since i know it will work for sure then (again!) :)... how
  repetetive ...


  3.5.  A mail account

  You always need to have a mail account - where you can "poll" your
  mail from.  The server needs to be a POP server - where you can poll
  from when you want, and where users can send their mail 24/24 to. It
  can be a free-mail service, as well commercial - even your mailaccount
  is sufficient enough. In the "subject" method (m(B)) - you don't need
  something more - in method A - with the "to" fields - you NEED more -
  as written below !


  3.5.1.  A DNS record (MX)

  Needed to run your own "domain" - email domain ... it is needed since
  the administrator of the server can't use it's own domain for your
  users - since there are users who need to be contacted on his server
  as well - what could interfere with your users. And your mailheader
  must be filtered on that domain. So - an apart domain - pointing to
  HIS server. This can be an additional cost - or you can ask your
  system administrator to add a "non- authorative address" - pointing to
  his server ... - however - it needs to be another domain than he is
  using !


  3.5.2.  A "forward" to your account-account :)

  Well, the system administrator needs to forward *ALL* mail to your
  domain to YOUR account ... - it is easy for him when he knows how to
  do it :) ..  else he will need to read the sendmail manual :)) (or
  qmail - whatever).  You will poll for your mail at your account and
  voila ! filtering on YOUR own email domain.


  4.  I got it all, what now ?

  Now you created the extra account, you got the mail address - and/or
  the DNS entry & forwarding to your account ... As well installed
  Procmail & Fetchmail so we can rock the place ! :) .. here we go !

  1. You need to create a .procmailrc file, what will contain the
     "delivery" info to your users.

  2. You need to create a "nosuchuserfile" - so the writer knows his
     mail isn't delivered well.

  3. For best work :) you could use crontab to check for mail. This is a
     easy way to check your mail every XX minutes when on the internet.

  4.1.  Creating a .fetchmailrc file

  You will need to create a .fetchmailrc file, what will contain the
  information (username & password, as well the Mail Delivery Agent
  (mda) to proces the mail to). Here is some example file ...


       (*** < file > *** text ***)     .fetchmailrc

       ______________________________________________________________________
       server my.mail.server.com
       proto pop3
       user myaccountthere
       pass deepestsecrets
       flush
       mda /usr/bin/procmail
       ______________________________________________________________________

  This file will be used to fetch your mail. Please test it by using the
  fetchmail program "fetchmail -vv" - and see your mail is being
  transferred right ... There will be some errors - since the procmail
  control file hasn't been created yet. You can wait by testing AFTER
  making the procmailrc file, but - i'll warn ya - IF there is something
  fault :) it CAN be this file :) It needs to be owned by the user
  account itself - in my case "mailservice" and needs to be "user
  readable" but NOT group/world readable - since it contains the "main
  password" :)). (chmod 600 .fetchmailrc will do).


  4.2.  Creating a .procmailrc file

  This control file will forward all mail to the users in it. There are
  2 ways as described before - the "to:" (header) way - and the
  "subject" (sloppy) way.  The file will contain the usernames to
  transport to. All the "#" are comments and are absolutely not needed
  when not wanted - it's only so you know what i am doing ... - you can
  as well best chmod it 600 - so the rest of the world or group doesn't
  need those private addresses eh :) ... It needs also to be owned by
  the user (like "mailservice") :)). The "nosuchuserfile" is a "bounce"
  to the writer - if the user isn't found (so mail not delivered) in the
  procmailrc file ... - so the writer knows the mail isn't delivered
  well.


  4.2.1.  For "header (to:)" transportation


       (*** < file > *** text ***)     .procmailrc

  ______________________________________________________________________
  # this line is for debugging purposes only ! it should be removed for
  # ethical purposes - since you can read all mail passed trough your mail-
  # server ... - all mail will be copied to the file "passtrough" before
  # going to the users ... herein you can look what went wrong ...
  :0 c
          passtrough

  # the mail with header "to: freaker@mydom.com" will be forwarded directly
  # to me, the other mail will pass this option ...
  :0
  * ^To:.*freaker@mydom.com
  ! freaker

  # the mail to root@mydom.com will be forwarded to root ... as well postmaster!
  :0
  * ^To:.*root@mydom.com
  ! root

  :0
  * ^To:.*postmaster@mydom.com
  ! postmaster


  # the mail to barbara@mydom.com will be forwarded to barbara AND will be
  # forwarded to her private email address !

  :0 c
  * ^To:.*barbara@mydom.com
  ! barbara@her.private.one

  :0
  * ^To:.*barbara@mydom.com
  ! barbara

  # the mail to johnny@mydom.com and johnny@hisdom.com will be forwarded to johnny

  :0
  * (^To:.*johnny@mydom.com)|(^To:.*johnny@hisdom.com)
  ! freaker

  # the mail to hans@mydom.com and all carbon copys will be forwarded to hans

  :0
  * (^To:.*hans@mydom.com)|(^CC:.*hans@mydom.com)
  ! hans

  # this lines will BOUNCE the mail to the sender - when it is not delivered to
  # one of above users ... it will send the file "nosuchuser" into the mail
  # body as reply ... be aware ! you need to make such file ! - mine contains
  # "well, the user you wanted to reach does not exist on this server, please
  # try again, it could be the user is not present anymore".
  #
  :0
    |(/usr/bin/formail -r -k \
       -A"X-loop: mailservice@mydomain.dom "| \
         /usr/bin/gawk '{print }\
         /^/ && !HEADER \
           { system("/bin/cat nosuchuser"); \
           print"--" ;\
           HEADER=1 }' ) |\
           /usr/bin/sendmail -t


  exit
  ______________________________________________________________________
  4.2.2.  For "subject: touser" transportation


       (*** < file > *** text ***)     .procmailrc

  ______________________________________________________________________
  # this line is for debugging purposes only ! it should be removed for
  # ethical purposes - since you can read all mail passed trough your mail-
  # server ... - all mail will be copied to the file "passtrough" before
  # going to the users ... herein you can look what went wrong ...
  :0 c
          passtrough

  # the mail with header "to: freaker@ibm.net" will be forwarded directly
  # to me, the other mail will pass this option ... When you got a "dedicated"
  # email address to receive your "mailservice thingy's" on - you don't need
  # to use this line :)
  :0
  * ^To:.*freaker@ibm.net
  ! freaker

  # all mail with as subject "root" will be forwarded to root !
  :0
  * ^Subject:.root
  ! root

  # all mail to "subject: barbara" will be forwarded to barbara ...
  :0
  * ^Subject:.barbara
  ! barbara

  # all mail to "subject: paul" will be forwarded to his external email addr.
  :0
  * ^Subject:.paul
  ! paul@his.personal.emailaddress

  # all mail to "subject: john" will be forwarded to his account at your server
  # and a copy will go to his private email address ...
  :0 c
  * ^Subject:.john
  ! john@his.personal.emailaddress

  :0
  * ^Subject:.john
  ! john

  # All the mail from ibm, with their updates and information, will go to
  # freaker, as he is the one who will administrate the mailservice, and
  # as ibm doesn't want to get the bounce putten below !! ... this is
  # neccesary if your mail provider sends "newsletters" etc...
  :0
  * ^From:.*newsletter@ibm.net
  ! freaker

  # All messages from the daemon should been thrown away, or in my case, will
  # be saved to a file ... (use /dev/null to throw to endless pits of The Abyss)
  :0
  * ^FROM_DAEMON
  throwaway

  # this lines will BOUNCE the mail to the sender - when it is not delivered to
  # one of above users ... it will send the file "nosuchuser" into the mail
  # body as reply ... be aware ! you need to make such file ! - mine contains
  # some text like "user not found in subject line, please use "Subject: user"
  # to write a mail to the user, like example "subject: freaker" would send a
  # mail to freaker." The file can be long, but also small :) ... the
  # "mailservice@mydomain.dom" will prevent to loop between your server and
  # the other server - it needs to have the EXACT email address used !.
  # Else you could create an endless loop with a server what sends mail
  # to "your email address" with as subject something like "don't spend 500$
  # at your ..." etc...
  :0
    |(/usr/bin/formail -r -k \
       -A"X-loop: mailservice@mydomain.dom "| \
         /usr/bin/gawk '{print }\
         /^/ && !HEADER \
           { system("/bin/cat nosuchuser"); \
           print"--" ;\
           HEADER=1 }' ) |\
           /usr/bin/sendmail -t

  exit
  ______________________________________________________________________

  4.3.  "nosuchuserfile"


       (*** < file > *** text ***)     nosuchuser

       ______________________________________________________________________

       The user you wanted to contact is not present at this system.

       Please use the subject line as recipient - example "subject: freaker" would
       send mail to freaker on this system.
       ______________________________________________________________________

  4.4.  "crontab files".

  If you don't know how crontab works :) better read the manual :) ...
  You need to create a "checkmail" file - what will see if the link is
  up, as well the cronfile itself ... - i am using a ppp link :) so -
  this is an example how to look when the ppp link is up - and to poll
  every 10 minutes using cron. Looks sloppy - but isn't !.

  4.4.1.  checkformail

  the .checkformail file will be called (needs to be executable as well)
  - and will look if the ppp link is up. If it is up - then it will
  fetch for mail.  Crontab will use this file when you are using the
  below cronentry ...


       (*** < file > *** code ***)     .checkformail

  ______________________________________________________________________
  #!/bin/sh
  #

          cd /home/mailservice

          if [ -f /var/run/ppp0.pid ]; then
          /usr/local/bin/fetchmail -s > /dev/null 2>&1
  fi
  ______________________________________________________________________

  4.4.2.  crontab

  This cronentry file needs to been loaded into crontab, and will call
  the .checkformail - every 10 minutes. It won't write any mail or give
  any info to the console - since i'm redirecting everything to null.


       (*** < file > *** text ***)     cronentry

       ______________________________________________________________________
       0,10,20,30,40,50 * * * *  /home/mailservice/.checkformail 1> /dev/null 2> /dev/null
       ______________________________________________________________________

  4.5.  "At the admins site".

  Well, this should be done when using the "A method" ... at the admin's
  site, so the email goes all from a complete domain, to one username.
  It is pretty simple, and once you've done it - it works like hell.
  this is NOT neccesary if your system administrator (the uplink) got
  another method, and is NOT neccesary at YOUR side !!!!

  When using a newer version of sendmail, the "old sendmail" trick
  probably won't work, so please refer to the "new sendmail" topics to
  let your mailrouting work.


  4.5.1.  (old sendmail) add some lines to sendmail.cf

  add the following lines to your /etc/sendmail.cf file, so the domains
  file will be read.  please be noted that the "ruleset 98" is added as
  underhere, since - once you got errors :) it's a hell to find 'm out !
  (and i can know it :) DuH).


       (*** < file > *** add ***)    /etc/sendmail.cf

  ______________________________________________________________________
  # Database of handled domains

  Kmaildomains btree /etc/maildomains.db

  # Add these lines *IN* Ruleset 98 ! (under Ruleset 98).

  R$+ < @ $+  . >         $: $1 < @ $2 > .
  R$+ < @ $+ > $*         $: $(maildomains $1@$2 $: $1 < @ $2 > $3 $)
  R$+ < @ $+ > $*         $: $(maildomains $2 $: $1 < # $2 > $3 $)
  R$+ < @ $* > .          $: $1 < @ $2 . >
  ______________________________________________________________________

  4.5.2.  (new sendmail) Adding some lines to sendmail.cf

  With the newer sendmail releases (tested with sendmail v8.8.7, 8.8.8).
  Ignore method A, and add the next lines ...


       (*** < file > *** add ***)    /etc/sendmail.cf

       ______________________________________________________________________
       # Database of handled domains

       Fw/etc/sendmail.cw
       Kvirtuser btree /etc/maildomains.db

       *OR*

       Fw/yourhomedir/sendmail.cw
       Kvirtuser btree /yourhomedir/maildomains.db
       ______________________________________________________________________

  4.5.3.  (new sendmail)editing the /etc/sendmail.cw (or /yourdir/send
  mail.cw) file

  If you are using another "location" for the sendmail.cw file, then
  please replace the "/etc/sendmail.cw" to
  "/yourhomedirectory/sendmail.cw". The pro points of putting this
  sendmail.cw file into your homedirectory is that you don't need root
  to change the domains to receive on. tough - this can give security
  risks if not used properly !

  This file can already exist, or needs to be created, if it already
  exists be sure you don't overwrite the older data - or i need to refer
  you to my fine disclaimer :)

  First create a /etc/sendmail.cw file, what will be used to "send" a
  domain to a specific user ... here is an example ... (as you already
  knew, the name "mailservice" can be anything you want - it can even be
  your loginname (like mine is freaker).


       (*** < file > *** text ***) /etc/sendmail.cw

       ______________________________________________________________________
       mydomain.dom            mailservice
       ______________________________________________________________________

  4.5.4.  creating a /etc/maildomains file

  First create a /etc/maildomains file, what will be used to "send" a
  domain to a specific user ... here is an example ... (as you already
  knew, the name "mailservice" can be anything you want - it can even be
  your loginname (like mine is freaker). (you could have this
  /etc/maildomains in /yourhomedir/maildomains as mentioned before, just
  change the paths :)

  With the OLDER sendmail versions:


       (*** < file > *** text ***)     /etc/maildomains

       ______________________________________________________________________
       mydomain.dom            mailservice
       ______________________________________________________________________

  With the NEWER sendmail versions:


       (*** < file > *** text ***)     /etc/maildomains

       ______________________________________________________________________
       @mydomain.dom           mailservice
       ______________________________________________________________________

  4.5.5.  let it work !

  With the old & new sendmail versionsyou need to generate the btree
  (database) files, you'll need to do the following:


  cd /etc    (or /yourhomedir)
  makemap btree maildomains < maildomains

  after that, kill the sendmail daemon, and restart it. it should now
  WORK!  good luck :)


  5.  Automation

  Well, now, everything above works ... (if it doesn't work - don't even
  think about automation before it WILL work ... - now - we need some
  script so it isn't a pain in the ass for the "mailadministrator" or
  the root user to add users to the procmailrc file ... The below
  example will be for "more experienced users" - since some things NEED
  to be changed as well ... - it is an example with the "B method -
  Subject lines". It can be easily adapted to the "A method". Since the
  "B method" will be more used (cheaper) than the "A" method - i decided
  to use the "B method" ... Am i sounding repetitive or not ? .. well -
  i meant to write it in this way :)) to bug you :)))..


  5.1.  The "skeleton".

  Since the footer needs to be as footer (everything below won't be
  processed since we are bouncing there); there needs to be a header and
  a footer file.

  5.1.1.  the ".procmailrc-header" file

  This file will now be the "header & user" file .. since here will
  users been added and removed - it will be a important file ... - best
  take a backup from it each time you add a user ... - there COULD be
  something wrong sometime ..  A system can fail ...


       (*** < file > *** text ***) .procmailrc-header

  ______________________________________________________________________
  :0 c
          passtrough

  :0
  * ^To:.*freaker@ibm.net
  ! freaker

  :0
  * ^Subject:.root
  ! root

  :0
  * ^Subject:.barbara
  ! barbara

  :0
  * ^Subject:.paul
  ! paul@his.personal.emailaddress

  :0 c
  * ^Subject:.john
  ! john@his.personal.emailaddress

  :0
  * ^Subject:.john
  ! john

  :0
  * ^From:.*newsletter@ibm.net
  ! freaker

  :0
  * ^FROM_DAEMON
  throwaway
  ______________________________________________________________________

  5.1.2.  the .procmailrc-footer file ..

  As mentioned above, this file needs to be as footer - since all data
  BELOW it won't be used to deliver - this footer contains the "bounce"
  code to bounce the users not found *ABOVE* this footer !. it is the
  ABSOLUTE end of the file !


       (*** < file > *** text ***) .procmailrc-footer

  ______________________________________________________________________

  :0
    |(/usr/bin/formail -r -k \
       -A"X-loop: mailservice@mydomain.dom "| \
         /usr/bin/gawk '{print }\
         /^/ && !HEADER \
           { system("/bin/cat nosuchuser"); \
           print"--" ;\
           HEADER=1 }' ) |\
           /usr/bin/sendmail -t


  exit
  ______________________________________________________________________

  5.2.  addmail script

  This script will add a user to the header file, attach the header &
  footer to eachother - so it will be a complete .procmailrc file. the
  "#" (comments) are not really needed - and are for your info :).


       (*** < file > *** code ***)     addmail   (* chmod 500 *)

  ______________________________________________________________________
  #/bin/sh
  #
  # Copyright (c)1997 by Gunther Voet. rev 1.0.1
  # please leave the Copyright in it when it is distributed with any
  # system using this thingy ...

  echo ""
  echo "Addmail v1.0.1 by Gunther Voet, Freaker / TuC'97-98 (21/04/97)"
  echo ""

  if [ $1 ]; then

          if [ $2 ]; then

  # make a backup file !

          cp /home/mailserv/.procmailrc-header /home/mailserv/.procmailrc-backup

  # APPEND (>>) the information to the header file ...

          echo ":0" >> /home/mailserv/.procmailrc-header
          echo "* ^Subject:.$1" >> /home/mailserv/.procmailrc-header
          echo "! $2" >> /home/mailserv/.procmailrc-header
          echo "" >> /home/mailserv/.procmailrc-header

  # copy the header file to .procmailrc - and append the footer file to it !

          cat /home/mailserv/.procmailrc-header > /home/mailserv/.procmailrc
          cat /home/mailserv/.procmailrc-footer >> /home/mailserv/.procmailrc

  # make sure it is owned by "mailserv" and the read/write priveleges are ONLY
  # for the user "mailserv" itself ...

          chown mailserv /home/mailserv/.procmailrc
          chgrp users /home/mailserv/.procmailrc
          chmod 600 /home/mailserv/.procmailrc
  else
          echo "No DESTINATION mail address has been given ..."
  fi

  else
          echo "usage:"
          echo ""
          echo "syntax:  addmail from_user to_user(domain)"
          echo ""
          echo "example: addmail freaker freaker@myemail.dom"
          echo ""
  fi
  ______________________________________________________________________

  Now, this script will append the information of the user, as well the
  email address to the header file, it will copy it to the .procmailrc
  file, and will add the footer to it, so you got a complete .procmailrc
  to process the mail.  If you want to delete a user- just edit the
  .procmailrc-header file, and at the next user added it will be deleted
  at the .procmailrc. To do a instant delete, just delete the user from
  both the files .procmailrc & .procmailrc- header.

  I guess you are smart enough to write a script that'll automatically
  add your users when using both methods - when doing a "adduser" at
  your box.

  6.  Help! (sigh)

  Well, you need help - isn't :) ... hmm .. i could be sarcastic and
  just say "you could better do it again, 'coz it looks a messy enuf" -
  or .. i could help ... - I wrote down some common problems - IF you
  got any problem NOT listed in this HOWTO (section) - then mail me -
  and i'll put it in this howto even with your name/email addr in it :).
  **BEFORE** mailing to me - please look if you didn't forgot anything -
  and IF you want some help from me - send me the MOST DETAILED
  information - included the scripts & things you needed.  i DON'T need
  any binaries - since i won't run them.


  6.1.  The automation script just doesn't work:


    is it executable ?

    is your (default shell) located at /bin/sh ?

  6.2.  What do you mean by "anonymous mailserver"?


    Well, you could make accounts like "anon0001@yourdom.dom" - and
     forward it to another email address ... nobody needs to read the
     .procmailrc file, so YOU ONLY know the address !.

  6.3.  My cat died


    Well, next time don't print this HOWTO out on 200 gram papers,
     since it are 10 pages it would be 2KG for the cat - it is JUST TOO
     HEAVY !

  6.4.  My dog died


    hmm - can't do anything about that one - why askin' me ? ...  Just
     bury it ....

  6.5.  Linux?


    A free-unix - posix compatible - made by Linus Torvalds ... Why are
     you reading this if you even don't know what Linux is ?

  6.6.  Can you help me with finding a mail account?


    No! - this is a howto for YOUR side, i don't care about the side of
     your isp, nor how to get your email address.

  6.7.  Why is the "maybe later i'll make some addition ..." removed ?


    Read point 5.5 very carefully :) and you'll see why .. it's 'coz i
     needed to add it on general request :)


  6.8.  How do i get a "domain" ?


    Ask your local ISP/provider - he will help you with it. It could
     take days/ even weeks when asking to the Internic - your provider
     can help.

  6.9.  Why are you so f*cking lame using this?


    coz i don't want to spend money - and - 'coz i feel like being
     f*cking lame USING it - i *AM* using it - so why bother?

  6.10.  Nosuchuserfile?


    You can put in it what you want - as long you put some "needed"
     info so the original writer knows what happened with his "never
     delivered" mail.

  6.11.  Can my users write/send mail too?


    This has nothing to do with the system i explained to you, read the
     sendmail manual ... - this is to RECEIVE mail - to be "always
     available at an email address".

  6.12.  Does every user need a shell account at my server?


    Nope .. - but - it will be really hard for users not having
     internet access :) ... You could have a masq'd network - and use a
     computer connected to it - so the users can get their mail that
     way, or you can generate a link between a bulletin board and his
     mail, you could even forward it to a fidonet gate :) ... reasons
     enough not to give a shell!.

  6.13.  skeletion?


    i know it is a typo - but - i like this word better.

  6.14.  Addmail?


    No questions - for automation - you better be sure about what you
     are going to do ... since - it COULD be a trojan ya know :))) (it
     isn't but what means you need to know what scripting is before
     asking questions) It IS easy enough to interprete - that's even why
     i put the comments with it. *IF* you are going to distribute this
     script - leave my Copyright in it please ! thanks :).

  6.15.  Why are you so cruel?


    I am not cruel :) i am nice :) i am the nicest guy of the world, of
     the universe ! NOW SCRAM! (i just want to be complete in my HOWTO,
     and not TOO much "drifting away" from my original point in the doc
     - so :) that's all).

  6.16.  Didn't you get a complaint of excessive language ?


    Not yet, but, could be i'm filtering everything containing
     'excessive' and language :) i don't know :))

  6.17.  Why is this howto different than most others?


    coz sometimes reading plain howto's CAN be boring ... i wanted to
     add something next to it ...


  6.18.  locally my domain works, but remote it seems not to receive


    Check out your "sendmail.cw" file, since the domains NEED to be
     added in it !

  6.19.  My dog died


    the rulesets don't work, i can't receive any mail, or sendmail dies
     Refer to the new section "new sendmail" - and disregard the old
     sendmail tricks. The newer sendmail should be easier to use with
     virtual domains.


  7.  The End

  This sounds like the end ... If you find any unwanted bugs (or
  features :)), then leave some feedback ... any comments & suggestions
  -> mail them :).  if you are still bored after reading this, please go
  to: http://tuc.ml.org/  hehehe.

  My thanks go out to:

  Hannes van de Vel: for supporting me (hum) Tetsu Isaji: the japanese
  offline-mailing & notifying me about errors :) Greg Hankins: for
  notifying me about some errors in the sgml version.  Linus torvalds:
  of'course ... without his help this howto wouldn't be here!

  LINUX PLIP MINI-HOWTO
  Andrea Controzzi, controzz@cli.di.unipi.it
  v2.1, 12 March 1998

  This HOWTO will hopefully let you build and use a Parallel Line Inter
  face Protocol.
  ______________________________________________________________________

  Table of Contents


  1. Introduction: what is PLIP and why should I use it?

  2. Hardware required to use PLIP.

  3. Reconfigure the kernel.

  4. Kernel messages about the PLIP interface.

  5. Setting up the configuration files.

  6. Activate the PLIP link.

  7. FAQ.

  8. Patches to make PLIP and LP live together.

     8.1 PLIP and LP together on the same port.
     8.2 PLIP and LP on different ports.

  9. A PLIP link between DOS and Linux

     9.1 DOS-Linux link.
     9.2 A DOS-Linux PLIP link experience.

  10. PLIP between Linux and Windows 95.

  11. Questions? Comments? Send me feedback.

  12. Where to find new releases of this mini-howto.

  13. Credits.

  14. Copyright message.

  ______________________________________________________________________


     NOTE
        This is a new release. There are many changes and lots of
        enhancements, but there will be still grammar and spelling
        errors (english is not my native language) and, unlikely but
        possible, some wrong or outdated info. PLEASE let me know about
        any errors to help me provide the correct information for
        everybody.

        The biggest changes in the release are:


       SGML format

       a general answer to the "PLIP with win95" most asked question
        (the answer is negative, sorry)

       bigger and better FAQ section (thanks to the reports of
        countless users: many of them will find their comments there, as
        I promised!)

       removal of the Quick PLIP Installation files, that was useless
        and outdated.

       updated Dos-Linux PLIP link addendum

        For any question, error correction, comment and/or suggestion,
        my E-Mail address is: controzz@cli.di.unipi.it. Feel free to
        mail me any time you need help. Sometimes I won't answer
        immediately, but I'll answer. If it happens that you don't
        receive anything from me after 2 weeks, this means that our mail
        system has trouble: do not hesitate to mail me again, it's my
        duty to help you. I can guarantee I'll solve your problems, but
        I'll try.  If after many mails you don't receive answer, check
        your return address.  Several times my answers did not arrive
        due to delivery problems, usually because the return address was
        root@myhost.

        Before sending mail read the FAQ, my answer to a question
        already present in the FAQ will not be better (but likely worse
        or less complete) than the answer you can already read.

        For questions about PLIP with DOS and Win95 please send mail to
        the authors of these chapters, I can't help you.

        First of all, a lot of technical information come from the
        net-2-HOWTO, by Terry Dawson. This mini-HOWTO is not supposed to
        cover other aspects and/or replace the net-2-HOWTO: my goal is
        to give you a way to install a PLIP permanent connection
        quickly, *ONLY* this. All the other info come from my personal
        experience and the help of many users that sent me comments and
        information.

        Read the net-2-HOWTO and the other docs for the general
        information about the network and the config files I suggest to
        change.


  1.  Introduction: what is PLIP and why should I use it?

  There are many ways to create a connection between multiple hosts.
  PLIP, like SLIP, allow a local connection between two machines, but
  uses the parallel ports.

  Parallel ports transfer more than one bit at a time, this means it is
  possible to achieve higher speeds than with a serial interface.

  The speed achieved depends completely on your hardware (CPU and
  parallel port) and system load, in general it may be from 5 Kb/sec up
  to even 40 Kb/sec.

  The PLIP interface is fast enough to allow some decent tcp/ip
  functions, like NFS. So, you may have a computer with all your Linux
  stuff and another with only the minimal system, where you can mount
  all the rest from the main machine.

  The disadvantage is that most users have only one parallel port, this
  means that you won't be able to print and use PLIP together. Even with
  two parallel ports it is impossible to print and use PLIP without
  using kernel modules.

  This disvantage can be also eliminated, if you have two or more
  parallel ports, applying a patch that you can find in this Mini-HOWTO.
  Finally I am now able to give a hopefully good way to set up a PLIP
  link between DOS and Linux.

  I won't stress it enough: so far nobody reported a successful link
  between Linux and Windows95.


  2.  Hardware required to use PLIP.

  The hardware required to set up a PLIP interface is (obviously) a free
  parallel port in both the machines and the cable. If you can configure
  it with your BIOS, set it at least as "bi-directional", but if
  possible in ECP or EPP mode.

  About the cable, this is what is written in the plip.c file, in the
  kernel 2.0.33 source:


         The cable used is a de facto standard parallel null cable -- sold as
         a "LapLink" cable by various places.  You'll need a 12-conductor cable to
         make one yourself.  The wiring is:
           SLCTIN      17 - 17
           GROUND      25 - 25
           D0->ERROR   2 - 15          15 - 2
           D1->SLCT    3 - 13          13 - 3
           D2->PAPOUT  4 - 12          12 - 4
           D3->ACK     5 - 10          10 - 5
           D4->BUSY    6 - 11          11 - 6
         Do not connect the other pins.  They are
           D5,D6,D7 are 7,8,9
           STROBE is 1, FEED is 14, INIT is 16
           extra grounds are 18,19,20,21,22,23,24

  But I strongly advice you to read the
  /usr/src/linux/drivers/net/README1.PLIP and README2.PLIP files for
  more info about the cable.

  In my opinion you should avoid building your own parallel null cable.
  A self-made cable may save very little money, but can add lots of
  headaches.  If you wish to build your parallel cable, remember that
  you're doing it at your own risk, I reported exactly what is written
  in plip.c but I don't give warranties.

  A final word about cable length: long cables (i.e. more than 10 feet
  or 3 meters) may bring problems due to radio interference. If you need
  long cables you should use good and well shielded cables, but very
  long cables are not recommended: I think the maximal cable lenght
  should be 15 meters (50 feet).

  Anyway, someone mailed me that his/her 100 feet (30 meters) cable
  works fine; if someone really wants to try a PLIP connection between
  the office and his/her home (200 meters away), and has the money to
  spend, can try it, but is at his/her risk.


  3.  Reconfigure the kernel.

  You're supposed to already know how to configure and compile the
  kernel, otherwise you must get some doc (kernel-howto or other
  guides). Thanks to the cool work made by the kernel guys, recompiling
  the last kernels is a really easy jobs also for "common" people, so
  just do it. Anyway, for the sake of completeness, here is a quick
  summary of what you must do:
  NOTE: I suppose you are using the 2.0.xx kernel series. Now there is
  no need to keep the 1.2.xx kernels. There are no istructions about the
  2.1.xx kernel series, since they are for development.

  I will suppose that you use menuconfig to set up the kernel options,
  but the other tools are equivalent. I'll show how to do it with
  menuconfig:

       #make menuconfig

  I strongly advice to select

       Loadable module support  --->

  and enable the

       [*] Enable loadable module support

  and, if possible (i.e. you have modules.2.0.0) the

       [*] Kernel daemon support (e.g. autoload of modules)

  Then go back and choose

       Networking options  --->

  where you should choose at least

       [*] Network firewalls
       [*] TCP/IP networking
       [*] IP: forwarding/gatewaying

  The go back and choose at least

  [*] Network device support
  <M> PLIP (parallel port) support

  If you use modules I definitely advice you to set up PLIP as a module.
  If you do so you can also, if you need to use a printer, go to

       Character devices  --->

  and set up as a module the

       <M> Parallel printer support

  Now you have enabled the kernel support for PLIP. If it's the first
  time that you compile the kernel look at all the other options then
  save and exit.

  Finally compile with

       #make dep ; make clean
       #make zlilo

  And, if you use modules

       # make modules
       # make modules_install

  Now reboot your system.


  4.  Kernel messages about the PLIP interface.

  After you've reconfigured and compiled the kernel with PLIP support
  enabled, when you boot the system, if the kernel supports PLIP
  directly, or when you load (later, see below) the PLIP module if you
  compiled PLIP as modules, you should get something like this (numbers
  may differ):

       NET3 PLIP version 2.2 gniibe@mri.co.jp
       plip1: Parallel port at 0x378, using assigned IRQ 7.


  Depending upon your klogd and syslogd configuration the plip message
  could have been stored in your system log files: don't panic if you
  don't see the above message.  If you compiled PLIP as a module and
  lsmod shows that the plip module is loaded, then it's enough.

  Please take notice of the interface name. Usually is plip1, but may be
  plip0 or even plip2, plip3, and so on. It depends on the IO Address.


  5.  Setting up the configuration files.

  NOTE: Some distributions, like Debian, use different config files.  If
  you have a standard installation and you don't find the rc.inet*
  files, look for (different) config files in the /etc/init.d directory.

  First of all remember to backup all the files you will change,

       #cp rc.inet1 rc.inet1.BACKUP

  may be a good idea.

  Now, if you don't have it done already, you must choose the IP
  addresses of the two machines. In my examples I'll use a couple of
  example IPs for the IPs that you'll write, in the standard
  xxx.xxx.xxx.xxx format.

  In the /etc/rc.d/inet1.rc file of both the machines add this (better
  if in the last part of the file):


  ______________________________________________________________________
  /sbin/route add -net ${NETWORK} netmask ${NETMASK}
  ______________________________________________________________________

  Where NETWORK and NETMASK should be set up previously. If you don't
  know how to do it, please read the NET-2-HOWTO.

  If after this route command you get a message like this:

       SIOCADDRT: network unreachable

  then use this instead:


  ______________________________________________________________________
  /sbin/route add -net ${NETWORK} netmask ${NETMASK} dev plip1
  ______________________________________________________________________

  where, as usually, you'll have to use the interface name reported by
  the kernel messages (see above).


  You may safely ignore these variables only in the following case:

  If you only want to connect two machines on a standalone network, you
  may pick-up any IP address, say 200.0.0.1 and 200.0.0.2 respectively.
  In this case you can safely put NETWORK="200.0.0.0" and
  NETMASK="255.255.255 .0". These are the example IPs that I use in my
  Quick PLIP Installation (see below).


  NOTE: 200.0.0.1 and 200.0.0.2 are only example IPs, I advice not to
  use these numbers definitively because they could be the addresses of
  real hosts on Internet!

  I strongly advice to choose your address between the "private address"
  intervals:

                 10.0.0.0        -   10.255.255.255
                 172.16.0.0      -   172.31.255.255
                 192.168.0.0     -   192.168.255.255

  In the file /etc/hosts of both the machines you should add the entries
  with the IP of the machines that you connect via PLIP. In my example,
  the entries are:


  ______________________________________________________________________
  200.0.0.1       one             # this is the "one" IP address
  200.0.0.2       two             # this is the "two" IP address
  ______________________________________________________________________

  Where one and two are the names you have chosen for the two hosts.

  If you want to activate the NFS, beside answering yes during the
  kernel configuration, you must add in /etc/exports the entries that
  describe the directories that you wish to export. In my example, to be
  able to mount the directory /usr, you should add this entry:


  ______________________________________________________________________
   /usr                          two (ro)
  ______________________________________________________________________

  For more informations about NFS, please read the specific
  documentation; don't report me problems with the NFS, I won't be able
  to help.

  Now reboot your system.


  6.  Activate the PLIP link.

  Finally, these are the commands, that must be executed with root
  rights, that activate the PLIP interface (of course the cable must be
  already plugged correctly).

  NOTE: If something unexpected happens, please doublecheck the cable
  and the spelling of the commands. If you followed the istructions
  correctly but the are still errors, read the FAQ paragraph, a lot of
  answers are already available.

  First of all confirm that there is no lp device present:

       # cat /proc/devices

  You mustn't see any reference to lp like this:

        6 lp

  If you see it, please remove (temporanely) the lp device before going
  on, if PLIP works then you can try it with lp later.  To remove the lp
  device you'll have to use the rmmod if it's a module; if instead it's
  built in the kernel, you'll need to recompile the kernel with lp as a
  module (a much wiser idea).

  Again I use the name one and two, as example. On one you'll have to do
  the following steps.

  If you don't have the module automounter daemon and you compiled PLIP
  as a module, you must mount it:

       # insmod plip

  NOTE: if your parallel port is on an IRQ different from 7 and/or is on
  a IO Address different from 0x378, then you'll have to tell it to
  insmod.  Find your real IRQ and IO Address (the DOS command MSD is
  likely to be ok, but don't trust it too much) and write something like
  this:

       # insmod plip io=0x278 irq=5

  Usually IRQ is 7 or 5, while IO Address is 0x378, 0x278 or 0x3bc. It
  is important that you check that the address and IRQ match the
  hardware settings (jumpers on old boards, BIOS on modern
  motherboards).

  If you are paranoic check that the module has been loaded with:

    # lsmod

  Module:        #pages:  Used by:
  plip               3            0

  Take notice of the interface name (plip0, plip1, and so on; for more
  details read the kernel messages chapter above), then set up the PLIP
  interface:

       # ifconfig plip1 one pointopoint two up

  NOTE: if your parallel port is on an IRQ different from 7 and/or is on
  a IO Address different from 0x378, then you'll have to tell it to
  ifconfig.  Use the same IRQ and IO Address reported by the kernel
  messages and write something like this:

       # ifconfig plip1 irq 7
       # ifconfig plip1 io_addr 0x3bc

  Usually IRQ is 7 or 5, while IO Address is 0x378, 0x278 or 0x3bc.

  Now check that it worked...

       # ifconfig

        .....
        .....
        plip1     Link encap:10Mbps Ethernet  HWaddr FC:FC:C8:00:00:01
                  inet addr:200.0.0.1  P-t-P:200.0.0.2  Mask:255.255.255.0
                  UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
                  RX packets:0 errors:0 dropped:0 overruns:0
                  TX packets:0 errors:0 dropped:0 overruns:0
                  Interrupt:7 Base address:0x378

  Add the route to two...

       # route add two plip1

  And, if you want also the NFS for two:


       # rpc.portmap
       # rpc.mountd
       # rpc.nfsd

  On "two" the commands are the same, but you must write one instead of
  two and vice versa.

  One of your machines is likely to have only the PLIP connection, if
  this is true and that machine is two, you may also type:

       # route add default gw one

  on that machine. In my example above, two is a laptop with only a PLIP
  connection with one, so I type the above line on two.

  Finally check with a

       # ping two

  from one and a

       # ping one

  from two to see that all is working.

  Of course you may want to have all these commands automatically done
  by a script or at boot time. You must only create a script that
  execute these commands: now you may invoke it as root when you need,
  or you may add a command (in /etc/rc.d/rc.inet2) that calls it at boot
  time.

  To tune your PLIP, you can use the plipconfig command, see the man
  page for more informations.

  To shutdown PLIP, you need only to do:

       # ifconfig plip1 down

  which removes also the route entries. If you don't have the
  automounter daemon, then remove also the module:

  # rmmod plip

  7.  FAQ.

  This section will (hopefully) solve your problems. If you have any
  other question, feel free to mail me anytime.


    I get these messages at boot time (or when I load the plip module):


       SIOCSIFADDR: No such device
       SIOCADDRT: Network is unreachable

  and when I try to set up the link as written above, I get again error
  messages like:


       SIOCSIFADDR: No such device
       SIOCSIFDSTADDR: No such device
       SIOCADDRT: Network is unreachable
       mount clntudp_create: RPC: Port Mapper failure - RPC: Unable to send

    The kernel, for some reason, hasn't PLIP support enabled. This
     could be due to:

    You didn't answer yes to "PLIP support? " during kernel
     configuration.

    You answered yes to "Printer support? " during kernel
     configuration.

    You compiled PLIP as a module, so you must load it.

    You are addressing the wrong port, i.e. you wrote for instance
     plip1 instead of plip0.


    Is there a way to support both PLIP and LP, beside modules, perhaps
     with two parallel ports?

    Yes, so far there are two ways, described in the "Patches to make
     PLIP and LP live together":

    You can apply a patch to make the kernel support both.

    You can apply another patch to make the kernel use a parallel port
     for PLIP and another for LP.


    I have created the script that connects my 2 computers. I set up
     the link automatically in my rc.inet2, where I call a script that
     creates the link and enables NFS.  My "two" hosts mounts some
     "one"'s directories; I have added the correct entries in "two"'s
     /etc/fstab.  If I boot "two" when "one" is down, "two" halts for
     some minutes on the "mounting remote file systems...".

    This happens because "two" waits to mount the "one" filesystems,
     but if "one" is down you must wait until "two" is bored of waiting.
     To avoid this, you may:

    Comment out in rc.inet2 the command that mounts the remote
     filesystems

    Remove the entry in "two"'s /etc/fstab and mount the remote
     filesystems manually when and if you need.

    A better solution would be for "two" to detect upon booting whether
     "one" is up, and mount the filesystem if it is. This can be
     accomplished by replacing the mount command in rc.d or whereever
     with something like the following:


     ___________________________________________________________________
          if ping -c 5 one ; then
            mount one:/.....
          fi
     ___________________________________________________________________

    My link is up, but ping fails. I receive the following message from
     the kernel:

       plip1: timed out (1, 89)

  or similar messages.


    This means that the "your side of the link" is working, your
     machine sends the signal, but the "other side" isn't answering or
     your side is not waiting at the proper IRQ/IO Address.  This is the
     most common problem and, alas, has a lot of possible reasons,
     usually bad cable or wrong IRQ and/or IO Address. The wrong IRQ is
     the source of over 60% of the problems, so it's very likely that
     changing it will remove the problem.  Here is a detailed list of
     possible reasons:

    The cable isn't plugged properly or is broken or is wrong. Check
     it, if possible, between two Linux hosts which already work with
     PLIP. If it is not possible, then at least test the cable with a
     tester. The fact that the cable worked/not worked  with DOS/win95
     is a good/bad omen but is not a proof.

    The "other side" machine has not PLIP up.

    You are linked with a notebook with a not proper parallel port, see
     below.

    You have a really cheap parallel port that is a simple "printer"
     port, so can send and not receive.

    Your parallel port is not set as (at least) bi-directional. Do it
     in the BIOS configuration. Advanced parallel port settings like EPP
     or ECP are ok.

    The parallel ports have different irq, so you have to load the plip
     module (or the lp module) with a different irq. Go back to the
     chapter "Activate the PLIP link" and choose a different irq.

    Some other device may have shared your irq (which usually is irq
     7), it may be a sound card. Do not trust DOS programs like MSD,
     instead try to load the plip module with a different irq.


    I put the right IRQ and IO Address, but it still doesn't work. I
     got the addresses from the MSD command.

    I got a report from MSD giving wrong port addresses. Try to use
     this program: http://www.cs.caltech.edu/ huny/para13.zip.


    My link is up, and ping works. I sometimes receive the following
     message from the kernel:


       plip1: timed out (1, 89)

  or similar messages.

    This means that the other side has not answered before the timeout.
     If all is working, you can ignore these messages: usually means
     that the other side is much slower than yours, either due to older
     hardware or more load. You can try to tune PLIP with the plipconfig
     command.


    I have installed the PLIP connection but if I ping I get 100% data
     loss.  I connected my desktop with a notebook.

    Some notebook's parallel ports aren't good for PLIP, because they
     are only "printer ports", i.e. they can only transmit but not
     receive the data. So far I don't know if there is a way to make
     them work.  The only hope is:

    Look at your notebook setup, perhaps there is a way to configure
     the parallel port as a parallel port instead of a printer port.
     Usually is called "parallel enhanced mode".

    Try plip mode 0. Alas I don't know how to do it and/or if it works
     or is still available in the last kernels.


    What speeds can I achieve with PLIP?

    This is an hard question to answer to, because there are MANY
     factors that can change deeply your performance:

    The CPU speed on both the sides of the link.

    The parallel port type and settings.

    The system load.

    What do you use PLIP for.

     Just to give a rough idea, you should achieve about 40Kbytes/sec,
     much faster than any serial rate and near to a low-level ethernet
     card.


    What happens if I need to ifconfig up and ifconfig down many times
     plip1?

    Seems that you need to add a -arp to the ifconfig command, except
     for the first time after each boot. I don't need, but perhaps
     someone does.


    I have read the IP numbers reserved for private networks and your
     200.0.0.1 and 200.0.0.2 are not in these ranges. Shouldn't they be
     changed?

    Yes, they should. But as I underline since the beginning I choose
     these IP addresses only because of their simplicity, you are free
     to change them as you wish. Here is a cut from the net-2-howto:

           RFC1597 has specifically reserved some IP addresses for private
           networks.  You should use these as they prevent anything nasty
           happening if you accidentally get connected to the Internet. The
           addresses reserved are:

             10.0.0.0        -   10.255.255.255
             172.16.0.0      -   172.31.255.255
             192.168.0.0     -   192.168.255.255

    Is there a way to fine tune PLIP parameters without editing the
     source code?

    Yes, there is. Try the /sbin/plipconfig command. See the man page
     for more info.


    I'm running Debian GNU/Linux, and under Debian, the files
     /etc/rc.d/rc.inet1 and 2 do not exist. Where must I write the plip
     configuration commands?

    In Debian GNU/Linux you must edit /etc/init.d/network, where you
     have to put all the commands that should stay in rc.inet1 and 2.


    I have some problems linking two hosts with PLIP. The first has the
     latest kernel, the second still uses the 1.0.x PLIP version: is
     this a problem?

    Yes, it's much better, where is possible, to have the same PLIP
     version on both ends. In the plip.c is written that the actual PLIP
     cannot work with the 1.0.xx PLIP.


    Right now PLIP works with 4 bits, what about the 8 bit PLIP I've
     read in the kernel docs? I think is called Mode 1.

    This Mini-HowTo is for configuration, for technical informations
     please read the /usr/src/linux/drivers/net/README*.PLIP files or
     contact the author. What I know is only this: the standard PLIP
     uses "null printer" cables and is the Mode 0 (don't confuse it with
     plip0, which is the interface name), which uses 4 bits; Mode 1 uses
     8 bits and should be available already, but will need an handmade
     cable and will work only between 2 Linux hosts. I don't know, once
     you got the cable, how to set up the Mode 1 PLIP link; if somebody
     does, please let me know.


  8.  Patches to make PLIP and LP live together.

  The best way to make PLIP and LP live together is to use kernel
  modules: you can load plip.o and unload it when you need to print or
  vice versa.  If you do really need to use both PLIP and LP, try the
  following patches.


  8.1.  PLIP and LP together on the same port.

  If for some reason you wish PLIP and LP supported directly by the
  kernel, you can try these patches.

  You must modify the following pieces of code, but backup the files
  before:


  ______________________________________________________________________
  ******** modifications to linux/drivers/char/lp.c ***********************
  struct lp_struct lp_table[] = {
          { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL,
  NULL, },
  /*      { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL,
  NULL, },
          { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL,
  NULL, },
  */
  };
  #define LP_NO 1

  ******** modifications to linux/drivers/net/Space.c ********************
  #if defined(PLIP) || defined(CONFIG_PLIP)
      extern int plip_init(struct device *);
      static struct device plip2_dev = {
          "plip2", 0, 0, 0, 0, 0x278, 2, 0, 0, 0, NEXT_DEV, plip_init, };
      static struct device plip1_dev = {
          "plip1", 0, 0, 0, 0, 0x378, 7, 0, 0, 0, &plip2_dev, plip_init, };
  /*    static struct device plip0_dev = {
          "plip0", 0, 0, 0, 0, 0x3BC, 5, 0, 0, 0, &plip1_dev, plip_init, };
  */
  #   undef NEXT_DEV
  #   define NEXT_DEV     (&plip1_dev)
  #endif  /* PLIP */
  ______________________________________________________________________

  Of course there is the standard disclaimer: I received these patches
  and I put them "as I got them". This means that you try them at your
  own risk.  Anyway, your biggest trouble should be only restore the
  original files and recompile.


  8.2.  PLIP and LP on different ports.

  If you have at least 2 parallel ports you can try these patches, that
  should allow you to use PLIP on a port and LP on the other.

  1. Comment out one line in kernel source file, drivers/char/lp.c.


     ___________________________________________________________________
     struct lp_struct lp_table[] = {
     { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
     { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
     /* { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, */
     };
         3 -> 2
     ___________________________________________________________________

  2. Kernel configuration

       PLIP (parallel port) support (CONFIG_PLIP) [n] y

       Parallel Printer support [y] y

  3. Kernel message at startup

       lp1 at 0x0378, using polling driver
       .....
       NET3 PLIP version 2.0 gniibe@mri.co.jp
       plip2: Parallel port at 0x278, using assigned IRQ 5.

  Again the standard disclaimer, like section 8.1.

  9.  A PLIP link between DOS and Linux

  After the first release of this Mini-HowTo many people wrote for info
  about a link between Linux and DOS (or Windows) computer. The general
  interest lead me to add this chapter, I hope will be of help to
  everybody.

  This section comes from an article I've found on Linux Gazzette by
  James McDuffie <mcduffie@scsn.net> . It covers the basic installation
  of a PLIP link between Linux and a DOS computer using Windows and
  Trumpet WinSock and gives the address of a cool program that let's you
  run X-Windows programs on Windows.

  The last section is an addendum sent by James Vahn
  jvahn@short.circuit.com <mailto:jvahn@short.circuit.com> where he
  describes deeply how to set up this link and how to solve many
  problems.

  For any questions about this chapter please contact him, not me.

  9.1.  DOS-Linux link.

  I suppose you have already set up properly the PLIP support on the
  Linux side and you have got the right cable, else go back to the
  previous chapters.

  Now, for the DOS side, you need first of all a packet driver. It can
  be found here:

  ftp://ftp.crynwr.com/drivers/plip.zip
  <ftp://ftp.crynwr.com/drivers/plip.zip>

  The program runs under DOS and acts like a Ethernet Packet driver.  If
  you want to use PLIP with Windows you need also Trumpet Winsock. This
  serves as the TCP/IP interface. Otherwise, you can probably find
  TCP/IP software for DOS.

  Now go back to the Linux computer and add the DOS computer address to
  /etc/hosts. If your DOS computer does not have a registered IP address
  you may choose any address (remember the warning of chapter 3 about IP
  addresses).

  Now let's suppose you chose the name linux for the Linux computer and
  dos for the DOS one. You have to type:

       ifconfig plip1 linux pointopoint dos arp up
       route add dos

  Of course if you want to have this done every time you boot the linux
  computer you may add these lines to the file /etc/rc.d/rc.inet1:


  ______________________________________________________________________
  /sbin/ifconfig plip1 linux pointopoint dos arp up
  /sbin/route add dos
  ______________________________________________________________________

  This sets up the interface and then adds a route to it. Of course if
  you are using the second parallel port you have to write plip2
  instead.

  Go back to the DOS/Windows computer and edit autoexec.bat, you have to
  add the following lines.


  ______________________________________________________________________
  c:\plip\plip.com 0x60
  c:\tcpip\winsock\winpkt.com 0x60
  ______________________________________________________________________

  Of course I suppose you put plip.com (the packet driver) in the
  directory c:/plip and the winpkt.com in c:/tcpip, else you need to put
  the right path.

  This sets the plip.com program on packet vector 0x60 and then loads
  the winpkt.com program that comes with trumpet winsock on the same
  vector.  If the cable is something other than lpt1 you will have to
  tell plip.com the irq number and io address. Also, winpkt.com needs to
  run to make the packet vector avaliable to Windows. From here we go to
  the actual setup under Trumpet Winsock. All you have to do is unselect
  SLIP or PPP and enter 60 into the box labeled Packet vector. Then tell
  it the IP address you gave it, the IP address of the Linux computer as
  the default gateway and the Name Server as either you computer's ip or
  your ISP's address for its nameservers if your going to connect it to
  the Internet (more on this later). Close the setup and re-run Winsock
  and you should have it!  Put winsock in your startup group and you
  have everything setup automatically!

  If you want to access the Internet through the Linux computer on the
  Windows computer you will need to set up IP Masquerading, for info on
  this see the NET-2-HOWTO. This simply masquerades the Windows computer
  with your Linux computer's IP address.

  Also I have found a program that lets you run X-Windows programs under
  Windows! It is located at:

  http://www.tucows.com/ <http://www.tucows.com/>

  Set it up according to directions and then all you have to do is
  telnet in from the Windows computer then set the display to the
  Windows computer (`DISPLAY=duncan:0.0` for instance) and run the
  program desired.  There is nothing cooler than running xv under
  Windows! Hope all this helped.


  9.2.  A DOS-Linux PLIP link experience.

  NOTE: I received this document from James Vahn jvahn@short.circuit.com
  <mailto:jvahn@short.circuit.com>.  I put it here unchanged. This means
  that for any question about this section he's much better qualified
  than me so please mail to him than to me.  His experience with a PLIP
  connection of a floppy-only DOS computer to a Linux one is the perfect
  example of how to work-around common problems.

  Last Update 11 July 1996

  My floppy-only DOS box is networked via PLIP to the second printer
  port on the Linux machine. The first Linux printer port has a printer
  on it, both are permanently connected and the DOS box is telnet'd into
  Linux. These are my notes on what I did to accomplish this.

  When the kernel probes for printer ports, it will grab all of them
  unless you remove one from the probe. Otherwise PLIP will get nothing.
  One method is to load the drivers as modules when needed...

  <gniibe@mri.co.jp> writes:

  I keep recommending using PLIP/LP as kernel module, since

    modules are flexible for change of configuration

    (re)compiling the kernel is not easy for novice users

    co-existing PLIP and LP is only feasible by the modules

  With PLIP/LP as kernel module, you can specify which port is PLIP and
  which port is LP.  Here is example:

       # insmod lp.o io=0x378
       # insmod plip.o io=0x278 irq=2

  Even you can use two parallel ports:

       # insmod plip.o io=0x278,0x3bc irq=2,5

  In the example above,

  plip0 is assigned on 0x278 and it's irq is 2,

  plip1 is assigned on 0x3bc and it's irq is 5, respectively.

  Using modules certainly sounds like the way to go. The following
  method shows how to patch the kernel to allow both a printer and PLIP
  on different ports, without modules. If you are unfamiliar with the
  module concept, you might find this quicker to set up.

  You will need to modify two files in the kernel source tree. I'm using
  kernel 1.2.13 and found some changes were needed in
  ../linux/drivers/net/Space.c to accommodate my system. Look at around
  line 205 for the PLIP definitions to make sure your port and IRQ
  match, and make a note of which driver it will be (plip0, plip1,
  plip2). In my case port 0x278 uses IRQ 5 (the card is jumpered that
  way) but Space.c defined it with IRQ 2. I made the changes here,
  rather than opening up the box and changing jumpers. The alternative
  is to specify the IRQ through ifconfig later on, but the kernel will
  boot up with the wrong IRQ for PLIP and it may annoy you. It is a
  simple (single character) change.

  The next, and more difficult step:

  In .../drivers/char/lp.c you will find the following at around line
  38:


  ______________________________________________________________________
  struct lp_struct lp_table[] = {
      { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
      { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
  /*  { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
   * 0x278 reserved for plip1
   *
   * };
   * #define LP_NO 3
   */
  };
  #define LP_NO 2
  ______________________________________________________________________

  Notice the changes to make- one port is commented out, so now only 2
  ports are defined. Port 0x3BC will probably not work for PLIP- the IRQ
  line is usually broken on these ports, as found on old monochrome
  adapters (MDA).

  You made backups of these file before you changed them, right?  Now
  make a new kernel with printer, net, dummy, and plip support.

  Configure the system. This is my /etc/rc.d/rc.inet1 file:

  ______________________________________________________________________
  #!/bin/bash
  #
  /sbin/ifconfig lo 127.0.0.1
  /sbin/route add -net 127.0.0.0

  /sbin/ifconfig dummy 200.0.0.1
  /sbin/route add -net 200.0.0.0 netmask 255.255.255.0
  /sbin/ifconfig plip1 arp 200.0.0.1 pointopoint 200.0.0.2 up
  /sbin/route add 200.0.0.2
  /sbin/ifconfig dummy down
  ______________________________________________________________________

  Notice that arp is used for the DOS-to-Linux connection, apparently
  not used on Linux-to-Linux connections.

  And in /etc/hosts you can add these, just to give the two machines
  names:


  ______________________________________________________________________
  200.0.0.1       console1
  200.0.0.2       console2
  ______________________________________________________________________

  The DOS box is console2. Note Andrea's warning about these, better to
  use official numbering schemes.

  Reboot so all of these changes and the new kernel will take effect.
  During the boot sequence (or by running dmesg) if you made the
  patches, otherwise when the modules are loaded:


       lp0 at 0x03bc, using polling driver
       lp1 at 0x0378, using polling driver
       [....]
       NET3 PLIP version 2.0 gniibe@mri.co.jp
       plip1: Parallel port at 0x278, using assigned IRQ 5.

  The "route" command shows this:

       Kernel routing table
       Destination     Gateway         Genmask         Flags MSS    Window Use Iface
       console2        *               255.255.255.255 UH    1436   0      136 plip1
       loopback        *               255.0.0.0       U     1936   0      109 lo

  And "ifconfig plip1" shows:

  plip1     Link encap:10Mbps Ethernet  HWaddr FC:FC:C8:00:00:01
            inet addr:200.0.0.1  P-t-P:200.0.0.2  Mask:255.255.255.0
            UP POINTOPOINT RUNNING  MTU:1500  Metric:1
            RX packets:132 errors:0 dropped:0 overruns:0
            TX packets:136 errors:0 dropped:0 overruns:0
            Interrupt:5 Base address:0x278

  Look at /etc/inetd.conf and see if telnet is enabled. You might want
  to read the man page for tcpd, and the use of /etc/hosts.allow (ALL:
  LOCAL) and /etc/hosts.deny (ALL: ALL). You should be able to "telnet
  localhost".

  Linux is done, now the DOS side. Again, be suspicious of port 0x3BC if
  one is present.

  I'm using NCSA's telnet and Crynwr's PLIP driver found at these sites:

  ftp://ftp.ncsa.uiuc.edu/Telnet/DOS/ncsa/tel2308b.zip
  <ftp://ftp.ncsa.uiuc.edu/Telnet/DOS/ncsa/tel2308b.zip>

  ftp://ftp.crynwr.com/drivers/plip.zip
  <ftp://ftp.crynwr.com/drivers/plip.zip>

  Be sure to use NCSA's version 2.3.08 telnet and version 11.1 of
  Crynwr's PLIP driver. Please find and read Crynwr's SUPPORT.DOC
  located elswhere.

  The CONFIG.TEL file.  Most of it is the default and to save some space
  I've tried to cut it back here to just the info you need (hopefully).
  The second port on this machine is setup as 0x278 on IRQ 5.


  ______________________________________________________________________
  myip=200.0.0.2
  netmask=255.255.255.0       # subnetting mask
  hardware=packet             # network adapter board (packet driver interface)
  interrupt=5                 # IRQ which adapter is set to
  ioaddr=60                   # software interrupt vector driver is using
  #
  #[...lots unchanged...]
  #
  # at the end of the file, put this line:
  name=console1 ; hostip=200.0.0.1 ; nameserver=1 ; gateway=1
  ______________________________________________________________________

  (console1 is the name of the Linux machine, you can use whatever you
  like)

  I made a 12 foot null cable between both machines, and (after
  initially finding it miswired) there have been no problems. A standard
  11-wire null printer cable should work too. The Linux plip.c source
  shows the wiring.  Although my cable has the 17-17 connection, I don't
  think it is used for anything and was not present on a ready-made
  cable.

  ______________________________________________________________________
  @echo off
  plip.com 0x60 5 0x278
  telbin -s console1
  ______________________________________________________________________

  That should connect you to the Linux box on /dev/ttyp. NCSA's telnet
  provides for 8 virtual screens and also acts as an ftp server. The
  PLIP interface provides a fair throughput, I'm getting 6.5K/s file
  transfers with my antiques. Let's hope you can do better.  :-)


  10.  PLIP between Linux and Windows 95.

  This section is empty. I use windows 95 for nothing serious but games,
  so I don't try and don't care about a PLIP link with Linux.  The
  questions about such a link have won the most asked question contest,
  so I give here a (so far) definitive answer.

  No, so far nobody reported me a successful link between Linux and
  Windows 95.  if somebody succeds in setting up this link, please let
  me know immediately: thousand of PLIP users await these news!


  11.  Questions? Comments? Send me feedback.

  For any questions and comments you can find me via e-mail at the
  address controzz@cli.di.unipi.it <mailto:controzz@cli.di.unipi.it>

  Feedback is welcome, any error report is precious.  The next release
  will have an even larger FAQ section, if you send questions and, of
  course, the answers if you find them by yourself.

  Please do not send questions already present in the FAQ.

  If you have to ask me for help, please be sure to let me know any
  information that can help me, at least: kernel version, commands used,
  error messages, the cable you used and any other system message
  related to PLIP.

  Please remember not to send me any question about PLIP with
  DOS/Windows 3.1/Windows 95, I can't help you. These questions should
  be sent to James Vahn jvahn@short.circuit.com
  <mailto:jvahn@short.circuit.com>, who sent me the DOS addendum. Again:
  it's useless to ask him or me about PLIP with Windows 95.


  12.  Where to find new releases of this mini-howto.

  This mini-HOWTO is maintained by the HOWTO coordinators and is posted
  monthly on comp.os.linux.answers <news:comp.os.linux.answers> and can
  be found in the HOWTO directory at sunsite and at sunsite's mirrors.

  Another way to find the mini-HOWTO (and to contact me) is on my Home
  Page,

  http://www.cli.di.unipi.it/~controzz/intro.html
  <http://www.cli.di.unipi.it/~controzz/intro.html> (italian language)

  http://www.cli.di.unipi.it/~controzz/intro_e.html
  <http://www.cli.di.unipi.it/~controzz/intro_e.html> (english language)

  13.  Credits.

  Many thanks to:

    Rick Lim <ricklim@freenet.vancouver.bc.ca> for the patches to make
     PLIP and LP live together.

    Takeshi Okazaki <GBA03552@niftyserve.or.jp> for the patches to use
     PLIP and LP on two different parallel ports.

    Jim Van Zandt <jrv@vanzandt.mv.com> for some advice on the
     "tutorial" part of this HOWTO.

    Fernando Molina <fmolina@nexo.es> for useful comments about IRQs
     and IO Addresses.

    James Vahn <jvahn@short.circuit.com> for the cool addendum on the
     PLIP between DOS and Linux chapter.

    To all the users that posted PLIP-related articles on the linux
     newsgroups and/or mailed me. The list of all the people that helped
     me with info and comments could be longer than the Mini-HOWTO
     itself: thank you all!


  14.  Copyright message.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Greg Hankins, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu via email.

  Partition Rescue mini HOWTO
  Jean-Daniel Dodin

  Jan 2000

  Whow ! my disk is empty ! My Linux is gone ! If you have or fear to
  have one day or an other such a problem, read this...

  ______________________________________________________________________

  Table of Contents


  1. What's in

  2. What to do right now ?

  3. Legal stuff

  4. What do I must know right now ?

  5. Disks

  6. Partitions

  7. Why is there a problem ?

  8. Solving the problem

     8.1 The simpler case
     8.2 A not so simple case
        8.2.1 By hand
        8.2.2 gpart
     8.3 The rich man case

  9. Authors

  10. Most recent version



  ______________________________________________________________________

  1.  What's in

  This mini-HOWTO addresses only the "lost partition table" problem.
  This can be when :


  o  you have no more access to your computer, with the "no operating
     system" message,

  o  you have installed a new system (ie windows) and you see no more
     Linux, and windows take up all the capacity of the disk.

  Here you will learn that if you know the right thing and do it, Linux
  comes usually safe from such things. Windows can, but it's luckier.

  We will first see what you can do before the problem to easy the
  future recovery and what you must do after to recover. There is little
  to do to prevent from erasing a disk, usually this is done by
  automatic windows or Linux-install ill behaved programs or users
  mistakes - nothing can be done to prevent this except care, but you
  are already careful, isn't it ?


  It can also be done by the use of MSDOS/Windows fdisk. avoid it as
  most as you can, but you probably can't.

  I have done this many times, on my computer and on others' guy
  computers and restored Linux most of the time and windows sometimes. I
  wish you luck !

  2.  What to do right now ?

  If you read this by curiosity or just seeking information and you are
  on a running Linux system, do immediately the following :


  o  open a root terminal or xterm,

  o  key in "/sbin/fdisk -l" (that last character being l for Lima).

  you will be gratified from a list of all current partitions on all
  disks presents on your computer.


  o  Write back this on paper (or do "/sbin/fdisk -l | lpr" to print it)
     and save it in a safe place for future use.

  If you are not the system administrator, you should not be concerned
  by the problem and can stop reading this.

  3.  Legal stuff

  This mini-HOWTO is Copyright (c) 2000 by Jean-Daniel Dodin. All rights
  reserved. You may do (almost) whatever you want with it. I don't care.
  Just be sure to keep my name intact. I just hope it becomes useful for
  any person in the Linux community.

  I am not responsible of any damage on any computer as a result of
  anyone reading this HOWTO. If you do any damage, _it is YOUR fault,
  NOT MINE !_ Be careful when partitioning disks, and don't make any
  mistakes, because it can be fatal ! Backup all your important data and
  check that everything you do is correct ! What is described here
  worked on my computer, but it may or may not work on your computer.
  Although it should work for everyone, I can't guarantee anything. This
  is the last warning you get : _BACKUP IMPORTANT DATA !_ Or, to put it
  short: Use at your own risk !

  4.  What do I must know right now ?

  You must know that in case of any major problem with your hard disk,
  you must stop using it at all in write mode, at least the time
  necessary to understand what happens. Information there is very
  volatile...

  If ever, one morning, awaking, you computer say "can't load, no system
  installed", you must not begin reinstalling all the stuff.

  If you have windows installed, I can't promise you can recover your
  data, but it's likely you will recover all your Linux stuff, provided
  it's not located too low in the disk structure. This is because some
  windows viruses erases the very first disk cylinder, whatever is on.
  However I didn't ever experiment such virus and can't say for sure.
  Try recovering anyway.

  You must also know that I give you all this information only for this
  -information purpose. Neither I nor any other people but you can be
  held responsible for any problem your data can have using this info.
  There are too many different systems on the world for anybody being
  able to promise anything. I can only wish you luck and hope you, like
  me, will be happy recovering data.

  5.  Disks

  A hard disk is made of sectors numbered from 0 to the max.

  dmesg gives, for example :

  hdb: ST34321A, 4103MB w/128kB Cache, CHS=523/255/63

  CHS means Cylinders, Heads, Sectors.

  523*255*63=8401995 sectors of 512 bytes, thus the 4103Mbytes. This is
  only a logical map, it's not necessary what is written on the disk
  cover (except for the total size).

  The true size of the sectors is of no interest for us given we don't
  want to modify anything but restore a previous state. For us, the
  default size given by fdisk is alright.

  The size seen by the system is directly dependent of the work of the
  BIOS (Basic Input/Output System - the PC's ROM). The mode of the hard
  disk indicated in the BIOS is essential. On a new disk, it's better to
  use BIOS automatic hard disk recognition and say "yes". Anyway, any
  modification at this level may destroy all the data of the disk, so
  don't play with this without essential reason.

  This is probably what your disk use, so don't be afraid.

  6.  Partitions

  Disk are now huge, 13 Gb are not rare, so that it's not really handy
  to have all this stuff packed in only one part. Only windows do so,
  and if you use Linux, may be it's because you are aware of how
  inefficient the other is.

  So a hard disk is usually cut in some pieces called "partitions" (see
  the "partition mini HOWTO" for details, also read
  /usr/doc/package/util/README.fdisk)

  Let's get a look at (part of) my own print of fdisk -l :

  Disk /dev/hdb: 255 heads, 63 sectors, 523 cylinders Units = cylinders
  of 16065 * 512 bytes

  Device Boot Start End Blocks Id System

  /dev/hdb1 1 153 1228941 83 Linux

  /dev/hdb2 154 166 104422+ 82 Linux swap

  /dev/hdb3 * 167 291 1004062+ 83 Linux

  /dev/hdb4 295 523 1839442+ 5 Extended

  /dev/hdb5 295 422 1028128+ 83 Linux

  /dev/hdb6 423 523 811251 6 FAT16

  This is my second hard disk, tied to guesses and tries (the first is
  too simple to be interesting).

  /dev/hdb is my second ide disk (slave on the primary interface),

  /dev/hdb1 is the first primary partition, running from the first (1)
  block to the block 153.
  There can be four of such primary partitions. If one wants more than
  4, one of them must be an "extended" one (not necessarily the fourth)
  and all other partitions are named "logical" and are located inside
  the extended one. Notice that partition number 5 and partition number
  three have the same beginning.  Number five is logical, number 4
  extended. Logicals begin always at 5, even if there are not 4 primary
  ones.

  7.  Why is there a problem ?

  Problem is all the installed Operating Systems must share the disks
  and as at start the bios only scan the first one, there must be a so
  called "partition table" in the very beginning of this disk. This
  partition table is located in the Master Boot Record (MBR) side by
  side with the boot loader.

  Any misuse of the MBR by any of the OS's leads to problems. When
  trying to install any system, yes answer at a question like "automatic
  partitioning ?" is likely to give problems... This is specially true
  with windows, especially with custom windows installation made by
  special makes PC's (when no true "windows" cd is included). But it's
  also true with new "smart" (not so smart !) Linux installation
  programs given with most recent distributions.

  8.  Solving the problem

  Please, beware ! following the explanations given here will lead you
  to turn back to a previous system, loosing all your recent installed
  one, if any !  You must choose...

  8.1.  The simpler case

  All is simple if you have at hand :


  o  a disk (floppy or cd) able to start Linux by itself with fdisk
     available - most rescue disks of any distribution can do that,

  o  a paper with the fdisk -l content written down.

  It's enough to


  1. start Linux,

  2. start fdisk /dev/hda (or whatever is the disk to rescue),

  3. use fdisk to delete (d option) all the existing partitions on the
     damaged disk,

  4. use fdisk to create all the primary (1-4) partition mentioned on
     the paper,

  5. give them the appropriate tag (t option) : 82 is for Linux swap, 83
     for Linux main (L gives you the list), 5 is extended and must be
     done before creating logical partitions.

  6. create any logical partition.

  fdisk is a small and very smart programs. There are many other makes
  of fdisk, but I always prefer the bare bone one (I speak of Linux
  ones, of course, not the others...).

  Be aware that fdisk doesn't write anything to disk before you hit w
  and return. In case you fear a mistake, hit q (quit) or Ctrl C (\^{
  }C) to quit safe.
  When your new partition table is written, start your Linux. Chance is
  you can't do that as usual : lilo can have been damaged also and you
  will need a boot floppy or booting from a cd (choose the option
  "booting the installed partition").

  If you use to boot with lilo, as soon as you are logged in as root,
  key in "lilo" and hit return to reinstall you favourite boot loader.

  Your Linux should be all here, test it. Try also to start windows if
  applicable.  If you can't, there is a (very little) chance you can
  read your data from Linux, may be with a raw sector by sector read. If
  you can identify the disk sectors you data is on, using dd can copy
  them on a file. This is wise for text only.  This recovery is NOT in
  the scope of this mini-HOWTO.

  8.2.  A not so simple case

  8.2.1.  By hand

  This is when the previous case can't be used, for lack of fdisk paper
  or if it won't run for use of an out of date one.

  First, be aware that as soon as you don't write to the disk (except
  with fdisk), you can't erase your data, so that you can use a block by
  block try.  That is you need to know the beginning of the partition to
  start it. If, say a 153 don't fit, try a 154, and so on.

  This can be tiresome, but if you remember approximately the size of
  the Linux partition, there is a chance to win.

  8.2.2.  gpart

  But there is a better way if you can still access the net or have
  "gpart" at hand.

  "gpart - guess PC-type hard disk partitions" is the first line of the
  man page of gpart (man gpart).

  "gpart tries to guess which partitions are on a hard disk. If the
  primary partition table has been lost, overwritten or destroyed the
  partitions still exist on the disk but the operating system cannot
  access them.". This is exactly what we need.

  gpart is still beta, but is already a very good tool.

  The problem is the following : the first block of any partition is
  marked.  But it's never "unmarked" if not overwritten. So many "first
  partition block" are existing on an old disk and gpart tries to do
  it's best guessing what is the good one. In fact it's not too
  difficult to try, nothing is written on the disk by gpart.

  Here is the result of gpart on the previously seen disk hdb :

  root@charles:/home/jdd > gpart /dev/hdb

  Begin scan...

  Possible partition(Linux ext2), size(1200Mb), offset(0Mb)

  Possible partition(Windows NTFS), size(1200Mb), offset(1200Mb)

  Possible partition(Linux ext2), size(1004Mb), offset(2402Mb)

  Possible partition(Windows NTFS), size(1600Mb), offset(4102Mb)


  End scan.

  Checking partitions...

  * Warning: partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX) ends
  beyond disk end .

  Partition(Linux ext2 filesystem): primary

  Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary

  Partition(Linux ext2 filesystem): primary

  Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): invalid primary

  Ok.

  Guessed primary partition table:

  Primary partition(1)

  type: 131(0x83)(Linux ext2 filesystem)

  size: 1200mb #s(2457880) s(63-2457942)

  chs: (0/1/1)-(152/254/61)d (0/1/1)-(152/254/61)r

  Primary partition(2)

  type: 007(0x07)(OS/2 HPFS, NTFS, QNX or Advanced UNIX)

  size: 1200mb #s(2457880) s(2457944-4915823)

  chs: (152/254/63)-(305/253/60)d (152/254/63)-(305/253/60)r

  Primary partition(3)

  type: 131(0x83)(Linux ext2 filesystem)

  size: 1004mb #s(2056256) s(4919781-6976036)

  chs: (306/61/49)-(434/60/47)d (306/61/49)-(434/60/47)r

  Primary partition(4)

  type: 000(0x00)(unused) size: 0mb #s(0) s(0-0) chs: (0/0/0)-(0/0/0)d
  (0/0/0)-(0/0/0)r

  As you see, primary partition can be recovered, but for extende ones
  it's still to be done.

  Dos partitions are labelled "windows NTFS" because they were created
  while trying to install Windows 2000 (a very awful experience !). The
  "invalid" one is, in fact the extended partition.

  With this, one can use fdisk and try re-creating the partition table
  (remember, this is risk-free given the original one is already lost).

  8.3.  The rich man case

  Partition Magic is a commercial product, not so cheap given the little
  use one can have (approx a hundred bucks in France) but with a very
  high reputation all around there. However I never use it and will not
  rate it. It's said to be able to do anything with partitions,
  including restoring them. It's a windows tools, however, and I don't
  know if there is a dos part. If one needs to install windows to use
  Partition magic, the interest is low.

  Original Ralf partition-rescue mini HOWTO was essentially based around
  the use of Partition Magic, so I presume it's a very good solution if
  you have valuable data on your Linux partition and little Linux
  capability. However there are now very recent makes of Partition Magic
  and I think it's better for you to read the manual.

  9.  Authors

  The author of this HOWTO is Jean-Daniel Dodin. I can be joined at
  jdanield@free.fr or at jdanield@linux-france.org or jdanield@club-
  internet.fr.

  My web site is now (January 20, 2000) at http://perso.club-
  internet.fr/jdanield, but may be soon at jdanield.free.fr or any
  personal address given by the www.free.fr IAP. Linux pages, who are of
  most interest for you are found at www.linux-
  france.fr/article/jdanield.

  I want to thank Rolf Klausen (E-mail: rolfk@romsdal.vgs.no
  http://www2.romsdal.vgs.no/~rolfk/) who write the previous partition-
  rescue mini HOWTO even if I rewrite it almost entirely, he had first
  the good idea.

  Every other member of the Linux community and everybody who supports
  Linux and writes documentation and programs for Linux and all the
  authors of the LDP and virtually any person involved in anything which
  has to do with Linux.  Particularly Linus B. Thorvalds - he is _The
  King_ !!!

  I want also to thank Michail Brzitwa <mb@ichabod.han.de> for writing
  gpart !

  10.  Most recent version

  The most recent version of this mini-HOWTO shall be found on my Linux
  web site, at www.linux-france/article/jdanield/



  PATH HOWTO
  Esa Turtiainen etu@dna.fi
  v0.4, 15 November 1997

  1.  Introduction

  This document describes common tricks and problems with Unix / Linux
  environment variables, especially with PATH variable. PATH is a list
  of directories where commands are looked for. The details apply for
  Debian Linux 1.3 distribution.

  Note! This document is in beta release status.  Please send comments
  and corrections.

  2.  Copyright

  This documentation is free documentation; you can redistribute it
  and/or modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This documentation is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this documentation; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  3.  General

  All the Unix processes contain an "environment".  This is a list of
  variables that contain name and value, both just strings that can
  contain most characters.  All Unix processes have a parent process -
  the process that created this process as child.  Child processes
  inherit environment from parent process.  They can make some
  modifications to the environment before passing it in turn to their
  child processes.

  One important environment variable is PATH, a list of directories
  separated by colons (':').  These directories are searched through to
  find commands.  If you try to invoke command 'foo', all the
  directories in PATH (in that order) are searched for an executable
  file 'foo' (one with x-bit on).  If a file is found, it is executed.

  In this howto, I use term 'command' to refer executable program that
  is meant to be called with short names, using the path mechanism.

  In Linux, even the low level operating system calls to start processes
  (the exec family of calls) searches through directories in the PATH
  variable: you can use the path mechanism anywhere where you try to
  execute a command.  If exec operating system call gets a file name
  that does not contain '/', it evaluates the PATH environment variable.
  Even if there is no variable PATH in the environment, at least
  directories /bin and /usr/bin are looked for suitable commands.

  In sh you use export command to set environment, in csh you use setenv
  command.  For example:

  sh:

       PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:.

  csh:

       setenv PATH /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:.

  C-programs can use setenv() library call to change environment.  Perl
  has environment in an associative array %ENV, you can set PATH as
  $ENV{PATH}="/bin".

  env command is the basic way of asking the current environment
  variables.  It can be used to modify it as well.

  More information of the basic environment mechanism can be found from
  manual pages 'environ', 'execl', 'setenv', info file 'env' and
  documentation of shells.

  When Linux boots up, the first normal process that starts is the init
  process.  It is a special process because it does not have parent.
  However, it is the ancestor of all the other processes.  Init
  environment will remain as environment of all the processes if they do
  not touch it explicitly.  Most processes do touch.

  Init starts a group of processes.  File /etc/inittab tells what
  processes the system starts.  These processes work in the environment
  that is directly inherited from init - typically they are processes
  like 'getty', the program that writes 'login:' to console.  If you
  start PPP connections here, you must remember that you are working in
  the init environment.  The system initialization is often a script
  that is started here.  In Debian 1.3 initialization script
  /etc/init.d/rc and it calls other initialization scripts in turn.

  The system contains many running servers (daemons) that may or may not
  use the default environment.  Most servers are started from the
  initialization scripts and thus they have the init environment.

  When user logs in to the system, the environment is affected by the
  settings that are compiled into the programs, system wide
  initialization scripts and user initialization scripts.  This is
  pretty complicated and the current situation is not completely
  satisfactory.  It is totally different if user logs in from text
  console, XDM or from network.

  4.  Init

  Init is a parent process for all the other processes of the system.
  Other processes inherit environment of the init process and the path
  is the init path in the rare case that no other path is set.

  The 'init path' is fixed in the source of the init program and it is:

       /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin

  Note that init path does not contain /usr/local/bin.

  All the programs that are started from /etc/inittab work in init
  environment, especially system initialization scripts in /etc/init.d
  (Debian 1.3).

  Everything that is started from system initialization scripts has init
  environment as default environment.  For example, syslogd, kerneld,
  pppd (when started from startup), gpm and most importantly lpd and
  inetd have init environment and they do not change it.

  A group of programs are started from startup scripts but the PATH
  environment variable is explicitly set in the startup script.
  Examples are: atd, sendmail, apache and squid.

  There are other programs that are started from boot scripts but they
  change the path completely.  One such example is cron.

  5.  Login

  In text console there is a getty program waiting for user login.  It
  writes 'login:' and other messages.  It is working in init
  environment.  When getty gets user to log in to the system, it invokes
  the 'login' program.  This program sets the user environment and
  invokes the shell.

  Login program sets path as defined in /usr/include/paths.h. This

  for common users (_PATH_DEFPATH):

       /usr/local/bin:/usr/bin:/bin:.

  for root (_PATH_DEFPATH_ROOT):

       /sbin:/bin:/usr/sbin:/usr/bin

  Common user's path does not contain any sbin directories. However, it
  contains the current directory, '.', which is considered dangerous for
  the root user. Not even /usr/local/bin is available for the root user.

  Login path is often overwritten by shell initialization.  However, it
  is possible to use other programs in /etc/passwd as user shells.  For
  example, I have used the following line to start PPP when I log in
  using special user name.  In this case, the pppd has exactly login
  path.

       etu-ppp:viYabVlxPwzDl:1000:1000:Esa Turtiainen, PPP:/:/usr/sbin/pppd

  6.  Shells

  Often user processes are children processes of the shell mentioned in
  /etc/passwd for this user. Initialization files of shells often modify
  path.

  In login, the name of the shell is preceded with '-', for example bash
  is called as '-bash'. This signals to the shell that it is a 'login'
  shell. In this case, the shell executes the 'login' initialization
  files. Otherwise some lighter initialization is performed.
  Additionally, the shell checks if it is interactive - are the commands
  coming from file or interactive tty. This modifies the shell
  initialization so that a non-interactive non-login shell is
  initialized very lightly - bash do not execute any initialization file
  in this case!

  6.1.  bash

  As a normal login shell, bash 'sources' system-wide file /etc/profile,
  where the system environment and path can be set for bash users.
  However, it is not run when the system interprets the shell as non-
  interactive. The most important case is in rsh, where remote command
  is executed in the neighboring machine. The /etc/profile is not run
  and the path is inherited from rsh daemon.

  bash receives command line arguments -login and -i that can be used to
  set the shell as a login shell or interactive shell respectively.

  The user can overwrite values set in /etc/profile by creating a file
  ~/.bash_profile, ~/.bash_login or ~/.profile. Note that just the first
  one of these is executed thus differing of the logic of csh
  initialization. ~/.bash_login is not executed specially for login
  shells and if .bash_profile exists, it is not executed at all!

  If bash is used with name sh instead of the name bash, it emulates
  original Bourne shell initialization: it sources just files
  /etc/profile and ~/.profile and just for login shells.

  6.2.  tcsh

  As a login shell tcsh executes the following files in this order:

    /etc/csh.cshrc

    /etc/csh.login

    ~/.tcshrc

    ~/.cshrc (if .tcshrc is not found)

    ~/.history

    ~/.login

    ~/.cshdirs

  tcsh can be compiled to execute login scripts before cshrc scripts.
  Beware!

  Non-interactive shells execute just the *cshrc scripts. *login scripts
  can be used to set the path just once in the login.

  7.  Changing user ID

  7.1.  su

  Command su sets a new user id to use. If no user id is given, root is
  used.

  Normally su invokes a subshell with a different user id.  With
  argument '-' (more recent synonyms -l or --login) su invokes shell
  like login shell.  However, it does not use login program to do this
  but uses a yet another built-in path for login 'simulation' (term used
  in the source code). It is:

  for normal users

       /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:.

  for root user

       /sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin

  su makes many quite subtle environment changes as well.

  7.2.  sudo

  There is a group of commands that make use of super user commands
  safer.  They allow better logging, user-based restrictions and usage
  of individual passwords.  Most widely used is sudo.

       $ sudo env

  executes command env as super user (if it is configured to allow it).

  sudo command has again a different approach to path handling.  It
  modifies the search path so that the current directory is always the
  last one.  However, it does not modify PATH environment variable.
  just couple of environment variables like SUDO_USER.

  8.  Network servers

  Most network servers should not invoke subprocesses of any kind.  For
  security reasons, their path should be minimal.

  An important exception is all the services that allow logging in to
  the system from network.  This section describes what is the
  environment in these cases.  If the command is executed in the remote
  machine with rsh it gets different path than if it is executed with
  ssh.  Similarly, logging in with rlogin, Telnet or ssh is different.

  8.1.  inetd

  Most network servers do not have process of their own waiting for
  requests all the time.  This work is delegated to an Internet super
  server called inetd.  Inetd listens for all the defined network ports
  and starts the appropriate server when there is an incoming request.
  This behaviour is defined in /etc/inetd.conf.

  inetd is started from system startup scripts.  It inherits just path
  of init process.  It does not modify it and all the servers started
  from inetd has init path.  An example of such a server is imapd, the
  server of IMAP post office protocol.

  Other examples of inetd processes are telnetd, rlogind, talkd, ftp,
  popd, many http servers and so on.

  Often usage of inetd is still complicated by using a separate tcpd
  program to start the real server.  It is a program that makes
  additional security checks before starting the real application.  It
  does not affect the path (not verified).

  8.2.  rsh

  rsh daemon sets the path from _PATH_DEFPATH (/usr/include/paths.h)
  that is the same path that login program uses for normal users. Root
  will get the same path than the normal user.

  Actually, rshd executes the command it gets with the command line:

       shell -c command-line

  and shell is not a login shell. It is desirable that all the shells
  mentioned in /etc/passwd support -c option to give on the command
  line.

  8.3.  rlogin

  Rlogin is invokes login to make the real login procedure. If you login
  with rlogin, you get the same path than in login. Most other ways to
  log in to a Linux computer do not use login. Note the difference with
  rsh.

  The login command actually used is

       login -p -h host-name user-name

  -p preserves the environment except the variables HOME, PATH, SHELL,
  TERM, MAIL and LOGNAME. -h tells the remote host name for logging.

  8.4.  telnet

  Telnet is similar than rlogin. It uses the login program and the
  command line to invoke it in a similar way.

  8.5.  ssh

  ssh has a path setting of it's own. It has a fixed path where it adds
  the directory where ssh is. Often this means that /usr/bin is in the
  path twice:

       /usr/local/bin:/usr/bin:/bin:.:/usr/bin

  The path does not contain /usr/X11/bin and shell invoked by ssh
  command is not a login shell. Thus

       ssh remotehost xterm

  never works and anything in /etc/profile or /etc/csh.cshrc can change
  this.  You must always use explicit path /usr/bin/X11/xterm.

  ssh searches environment variables of form VAR=VALUE from file
  /etc/environment. Unfortunately this causes some problems with
  XFree86.

  9.  XFree86

  9.1.  XDM

  XDM is the most common way to log in to a graphical terminal. It a bit
  looks like login but it is internally totally different.

  In directory /etc/X11/xdm there are configuration files that are
  executed on different login phases. Xstartup (and Xstartup_0 specially
  for screen 0) contains commands to be run after the user has logged in
  (commands are run as user root).

  The path that is set for users is in /etc/X11/xdm/xdm-config. There
  are lines:

       DisplayManager*userPath: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
       DisplayManager*systemPath: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11

  That will be a default path for normal and root users respectively. It
  is very important that /usr/bin/X11 is available for X users. If X
  user logs in to another machine to start and X client application, he
  should get /usr/bin/X11 to his path even he don't seem to come
  directly from X terminal.

  After running Xstartup the XDM runs /etc/X11/Xsession that is run as
  the final user. Local configuration is meant to be done in
  /etc/environment that is sourced (included) from Xsession if available
  (Xsession is run with /bin/sh and thus /etc/environment must be a sh
  file). This clashes with ssh that supposes that /etc/environment is a
  file that contains just lines of form VAR=VALUE.

  9.2.  xterm -ls

  By default the path for all the commands invoked from X window manager
  menus is the path inherited from XDM. To use something different it
  must be set explicitly. To start a terminal emulator with a path that
  is "normal" some special option must be used. In xterm the option -ls
  (login shell) must be used to get a login shell with path specified in
  shell login initialization files.

  9.3.  Window manager menus and buttons

  Window manager inherits environment of XDM.  All the programs started
  by the window manager inherit the environment of the window manager.

  User shell environment does not affect the programs that are started
  from window manager buttons and menus.  For example, if program is
  started from 'xterm -ls', it has the default environment of login
  shell but if it is started from menu, it has just environment of the
  window manager.

  10.  Delayed commands cron and at

  10.1.  cron

  Cron is a command that executes commands periodically as specified in
  /etc/crontab and user-defined crontabs.  In Debian 1.3 there is a
  standard mechanism to execute commands in /etc/cron.daily,
  /etc/cron.weekly and /etc/cron.monthly.

  Cron is started from boot scripts but it seems to change it's PATH to
  a pretty strange one:

       /usr/bin:/binn:/sbin:/bin:/usr/sbin:/usr/bin

  THIS IS LIKELY A BUG IN CRON.  This is the init path where there is
  /usr/bin:/bin written over the beginning without terminating 0!  This
  bug does not exist in all the systems.

  In crontab there can be PATH definition.  In Debian 1.3 there is the
  following default line in the beginning of /etc/crontab:

       PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

  Because of this, the PATH of crond program is never used in user
  programs.  All the scripts in /etc/cron.* directories get this path by
  default.  This path is used even if a program is executed as non-root.

  10.2.  at

  at is a command that can be used to run a one-time program at specific
  time.

  atd is run using init path.  However, the user programs are always run
  in the user environment using sh command.  Therefore the usual shell
  overwrites apply.  Look the chapter on bash.

  11.  Some examples

  11.1.  magicfilter

  magicfilter is a common tool to manipulate files for printer.  It
  analyzes the type of the file to be printed and invokes a filter
  script to make appropriate pretty-printing.  These scripts are invoked
  from lpd that is started from /etc/init.d/lpd that is started from
  init. Thus, the path is that of init. That does not contain
  /usr/bin/X11!

  You might want to insert printing of PDF files to magicfilter.  It is
  possible to do this by using /usr/bin/X11/xpdf.  Now you must remember
  to insert full directory path to the file name because magicfilter
  would not find it otherwise.  Most programs used in magicfilter do not
  need full path, because they are on /bin or /usr/bin.

  11.2.  Printing from X applications

  You may use PRINTER environment variable to show what is the printer
  that you are using.  However, you may notice that in some cases in X
  applications it is sometimes lost.

  You must remember that if the X session is started from XDM, the
  window manager has never evaluated your shell login scripts.  All the
  X applications that you have started from xterm have your PRINTER
  variable.  However, if the same application is started from menu or
  window manager button, it does not contain your PRINTER variable.

  In some cases this can be inherited to an even lower layer: for
  example a Netscape helper application can have or have not your
  PRINTER definition.

  12.  Security concerns

  The path is sometimes a big security problem.  It is a very common way
  to hack into a system using some mistakes in path settings.  It is
  easy to make Trojan horse attacks if hacker gets root or other users
  to execute his versions of commands.

  A common mistake in the past (?) was to keep '.' in the root's path.
  Malicious hacker makes program 'ls' in his home directory.  If root
  makes

       # cd ~hacker
       # ls

  he executes ls command of hacker's.

  Indirectly, this same applies to all the programs that are executed as
  root.  Any of the important daemon processes should never execute
  anything that some other user can write into.  In some systems,
  /usr/local/bin is allowed to contain programs with less strict
  security screening - it is just removed from the path of the root
  user.  However, if it is known that some daemon executes 'foo' using
  path '/usr/local/bin/:...', it may be possible to cheat daemon to
  execute '/usr/local/bin/foo' instead of '/bin/foo'.  Likely anybody
  who can write to '/usr/local/bin' is able to break into the system.

  It is very important to consider in what order the directories are in
  the path.  If /usr/local/bin is before /bin, it is a security risk -
  if it is after, it is not possible to overwrite command /bin/foo with
  some localized modification in /usr/local/bin/foo.

  In Linux it should be remembered that the path evaluation is done in
  the operating system call level.  Everywhere where an executable file
  path is given you can give a short name that is searched at least from
  /bin and /usr/bin - likely from many other places as well.

  13.  How to debug problems?

  The basic command to read environment is /usr/bin/env.

  It is possible to use /proc directory to find out path of any program.
  First you must know the process number - use ps command to get that.
  For example, if xterm is process number 1088, you can find it's
  environment with command

       # more /proc/1088/environ

  This does not work with daemon processes like xdm. To access
  environment of system processes or other user processes, root access
  is required.

  To debug Netscape, you can create a script /tmp/test:

       $ cat > /tmp/test
       #!/bin/sh
       /usr/bin/env > /tmp/env
       ^d
       $ chmod +x /tmp/test

  Then set some helper application, for example RealAudio, audio/x-pn-
  realaudio to call program "/tmp/test".  When you try to browse some
  RealAudio link (something from http://www.realaudio.com/showcase),
  Netscape calls the dummy program that stores environment to /tmp/env.

  14.  Some strategies to get the same path for all the users

  The most important settings is possible to set in the global shell
  initialization files for login shells: /etc/csh.login for tcsh and
  /etc/profile for bash.

  Exceptions that do not get the right path from these files are rsh
  commands, ssh commands, menu items from X window manager that do not
  explicitly start login shell, commands invoked from inittab, cron
  jobs, daemons jobs like magic filters started from lprd, WWW CGI
  scripts, and so on.

  If the path is set in /etc/csh.cshrc, the path is right even when rsh
  or ssh execute command in remote machine with account using tcsh/csh.
  However, it is not possible to set path if account uses bash/sh.
  It is possible to combine path setting to one file, for example to a
  file /etc/environment-common. There we write:

       ${EXPORT}PATH${EQ}/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/X11:/usr/local/bin:/usr/games:.

  This can be used from /etc/csh.login (for tcsh and csh)

       set EQ=" " set EXPORT="setenv " source /etc/environment-common

  And from /etc/profile (for bash, doesn't work for ordinary sh)

       EQ='=' EXPORT="export " . /etc/environment-common

  And from /etc/environment (for XDM)

       EQ="=" EXPORT="export " . /etc/environment-common

  This strategy works mostly but ssh will complain of the lines in
  /etc/environment (and defined environment variables EQ and EXPORT).
  And still, rsh commands executed with bash won't get this path.

  15.  Acknowledgements

  One reason to start writing this document was the big frustration of
  Ari Mujunen.  Juha Takala gave some valuable comments.


                      Linux pre-installation checklist
                                      
                                    from
                     [1]Algologic Research & Solutions
                                      
   Are you a Linux newbie ? Are you a Linux guru ? In both cases, you
       will find this checklist of great help to you.
       How many times have you found yourself fumbling in the middle of a
       Linux installation process, because some vital information about
       the target hardware is not known ?
       Have you ever crossed your fingers when you were asked by the
       installation procedure, a simple question, like: "to which COM
       port is the mouse connected ?
       Let's face it, all of us have, at one time or another, felt we
       should have been better prepared before starting to install Linux.
       Here is a simple solution, brought to you by 
       
    [2]Algologic Research & Solutions.
       
   Preamble(Recommended strongly)
       
     * [3]What does this checklist achieve ?
     * [4]Who must use this list ?
     * [5]Where do I find more about Linux ?
     * [6]Japanese version of the checklist
     * [7]Dutch version of the checklist
     * [8]French version of the checklist
       
   The checklist 
     * If you want to skip all the preamble stuff, click here >>[9] Linux
       pre-installation check list
       
   Post-script
     * [10]After this checklist...what next ?
     * [11]Give us your feedback
     _________________________________________________________________
   
  What does this checklist (aim to) achieve ?
  
   This is an aide-memoire which may make installation of Linux a
   pleasant experience for you. It fills an important role in the
   promotion of Linux.
   It will help you to be prepared with all the answers which may be
   needed during the course of installation of Linux on your machine or
   on anybody else's machine. Sometimes, it is very inconvenient and even
   impossible to find out some details in the middle of an installation
   procedure. This becomes all the more difficult when you are installing
   Linux on somebody else's machine, and in somebody else's office.
   This checklist, when filled up, will help you go through your Linux
   documentation and verify in advance whether certain hardware is
   supported by the distribution you are planning to install. It will
   also help you to be prepared with the packages you would need to
   install, and the configuration choices which need to be done.
   The idea is to reduce the chances of frustrating surprises.
   This checklist is only for installing Linux on PCs. You may use this
   checklist as a model for other classes of machines (e.g.SUN, Alpha,
   ...) also.
   
  Where do I find more about Linux ?
  
   If you want professional (PAID) help with Linux -- [12]ask Algologic.
   Algologic Research & Solutions is listed in the official
   CONSULTANTS-HOWTO of the Linux Documentation Project.
   This checklist does not give any details about hardware compatible
   with Linux, or other details about actually procuring or installing
   Linux. If you want details, [13]just click here.
   If you are the impatient type, and want help on installation directly,
   [14]click here and jump the pre-installation checklist.
   ATTENTION: We are actually overwhelmed by the number of general
   queries about procuring, installing and using Linux. We DO NOT answer
   such general mail. We strongly advise you to [15]click here for
   finding other sources of help. Please DO NOT send us any general Linux
   queries.
   
   [16]Goto top
   
  Who must use this checklist ?
  
     * If you are planning to install Linux on somebody else's machine,
       or in a location which is not your own work place, you must
       absolutely get this checklist completed in advance. It is
       important to get this questionnaire answered by your host, so that
       you go adequately prepared for the installation.
     * If you are planning to organise an "Install fest" (we Indians call
       it "Linux mela"), ask your participants to come with this
       checklist answered.
     * Conversely, if you are going to an Install fest (aka Linux mela),
       to get Linux installed on your machine, do your home-work. Go with
       answers to this checklist.
     * If you are going to ask someone to come over and install Linux for
       you, send him/her this questionnaire with as many responses as you
       know.
     * If you are the D-I-Y type, you must start by answering all these
       questions, so that you can save time for enjoying your Linux !
       
   [17]Goto top
   
  Japanese Version
  
   This checklist is also available in Japanese. The Japanese translation
   is available as: a plain text file, or as a html file, at the URL
   given below:
     * Japanese Version: [18]Click here for a text-only version.
     * Japanese html Version: [19]Click here for a html version.
       
   Click here to send a mail to [20]Mrs. Chie Nakatani who did the
   translation into Japanese. You can also [21]visit her home page, by
   clicking here.
   
   [22]Goto top
   
  Dutch Version
  
   This checklist is also available in Dutch.
   The Dutch translation is available at the URL:
   [23]www.nl.linux.org/~hccnoord/checklist.html 
   
   [24]Goto top
   
  French Version
  
   The French translation of this checklist is at:
   [25]http://www.freenix.org/unix/linux/HOWTO/mini/Pre-Installation-Chec
   klist.html
   
   [26]Goto top
     _________________________________________________________________
   
                      Linux Pre-installation checklist
                                      
                                   Linux
                                IMPORTANT: 
        The most recent version of this checklist will be posted at:
            [27]http://members.tripod.com/~algolog/lnxchk.htm .
       Make sure you are seeing the latest version of the checklist.
                                      

    -------------------------------------------------------------
                                LINUX
                      PRE-INSTALLATION CHECK LIST
                       (Ver. 2.6 of 1999-12-19)
    -------------------------------------------------------------
                             prepared by
         Algologic  Research  &  Solutions,   Secunderabad,
                                India

                           S. Parthasarathy
                       algolog@hd1.vsnl.net.in

    Updated versions of this checklist will be posted at:
             http://members.tripod.com/~algolog/lnxchk.htm

    Please  make  sure that you have the latest version  of  this
    checklist.

    -------------------------------------------------------------

                               Welcome

    Welcome to the world of Linux. Your first step in  installing
    Linux on your PC will begin by answering a few (?), simple(?)
    questions about your hardware.

    This  is a FREE service from Algologic. Algologic offers   no
    warranties, and accepts no liabilities in  this exercise. You
    are using this checklist at your own risk and responsibility.

    This checklist will make it easy for you and us to go through
    the  installation, painlessly and without  surprises.  Please
    take  your  own  time and fill up  the  following  checklist.
    Wherever   possible,  and  necessary,  we  have  given   some
    suggestions and hints, for your convenience.

    If you don't know all the details, you should be able to find
    them  in  your  computer's manuals.  Or,  ask  your  hardware
    vendor, or your local hardware "guru".

    If  you still have problems finding answers, don't  worry  --
    you   can  just  ignore any areas you don't know.  Bring   in
    your   machine  and  ALL manuals you have.  The  installation
    may succeed with some trials and  a lot of luck.

    Remember,  Linux,  like many other software  products,  is  a
    growing  product.  Some  of your hardware may  still  not  be
    supported  in  the version of Linux which is being installed.

    Each question below can be identified by a letter followed by
    a number  (e.g. G3 is a question on processor speed). If  you
    need any assistance/clarifications about the questions  asked
    in this form, please specify the chapter identifier (an alpha)
    and the question number (a numeral), and send an e mail to:

                       algolog@hd1.vsnl.net.in

    ------------------------------------------------------------

    Assumptions:

    1. You  are  interested  in installing Linux  on  a  PC  (386
       upwards).

    2. You have a CDROM drive on your PC. You have made sure that
       your proposed  version of Linux supports this CDROM drive.
       Check  latest  version of Hardware HOWTO of the Linux
       Documentation Project (LDP).

    3. You  have at least one 3.5" floppy diskette drive  on
       your system.

    4. The 3.5" diskette drive is a BOOTABLE drive.

    5. You will keep readily available, three,   bad-sector-free,
       formatted  (3.5"), blank   diskettes,  for use in the
       installation procedure.

    6. If you wish to install   Linux   over  a   LAN,  you  have
       confirmed  that your network interface card  is  supported
       by your version of Linux. Check latest version of Hardware
       HOWTO of LDP.

    -------------------------------------------------------------

                            CHECKLIST


    A. ABOUT YOU

        1* Your Name ____________________

        2* Your contact phone numbers:


        3* Your email adress ____________________

        4* Have you used Linux before ? What distribution?

        5* Have you used any version of Unix before ? Which one ?
           On what hardware platform ?

        6* Is this an upgrade to an existing Linux distribution ?

        7* What will be the end-use of this Linux installation  ?

        8* Do you wish to retain DOS/Win/any other OS  along with
           Linux, on your system ?

        9* Any other detail you want to add:

           _____________________________________________________

           _____________________________________________________

    -------------------------------------------------------------

    G.  GENERAL

        1* CPU type [i386, i486 DX2...]:

        2* Bus type [ISA, EISA, VESA, PCI, MCA ... ]:

        3* Processor speed (MHz) ?

        4* What size is your RAM (minimum 4 MB needed) ?

        5* Do   you  want  X Window System  (i.e.  Graphic  User
           Interface for  Linux) to  be installed on your system ?

        6* How many serial ports (COM ports) do you have on your PC ?

        7* Are you planning to add dumb terminals to your PC ?
           How many ?

        8* Please mention below, any additional details you wish  to
           add:


           __________________________________________________

           __________________________________________________

           __________________________________________________

    -------------------------------------------------------------
    M. MOUSE

        1* To which port  is your mouse connected ? What IRQ ?

        2* What type of mouse are you using
           [Microsoft, Busmouse, PS/2 ..] ?

        3* How many buttons does the mouse have ?


    -------------------------------------------------------------

    C. CDROM

    Useful tips: If you are not sure if your CDROM is bootable or
    not, power on the machine and go to BIOS settings (do not let
    the PC bootup). Look  for  bootable drive options in the BIOS
    settings.

        1* What is the make and type of CDROM drive
           [e.g. IDE ATAPI, Sony, S-B Pro/Panasonic,  SCSI,  true
           IDE ..]  ?

        2* On  which drive interface [1st IDE, 2nd IDE, 3rd  IDE,
           4th  IDE, SCSI, proprietary interface] and which drive
           [drive 1 , drive 2, SCSI-ID 5]  is  the CDROM connected
           (e.g. drive 2 of 1st IDE, SCSI-ID 5 of built-in SCSI
           interface) ?


        3* Is your CDROM a bootable drive ?


    -------------------------------------------------------------

    F. FLOPPY DRIVES

        1* Do you have a 3 1/2" floppy drive?

        2* Is the 3 1/2 " floppy drive a bootable drive ?

        3* Do you have a 5 1/4" floppy drive?

        4* Is the 5 1/4 " drive a bootable drive ?

    -------------------------------------------------------------

    T. TAPE DRIVES

        1* What  type  of tape drive do you have (can  be   NONE)
           [floppy interface type, SCSI, parallel port ..] ?

        2* Do  you  have a secondary floppy controller  for  your
           tape drive?

    _____________________________________________________________

    D. DISK

    Useful tips: At this point, you must be clear  about  how your
    Linux will be  installed and  on which disk etc. You must also
    be   clear   how  your  Linux   will  be   booted  (there are
    different possibilities).

    Read the  installation  HOWTO before you answer the following
    questions.


        1* What type of drive do you have [IDE, SCSI, RLL, MFM ....] ?

        2* How many partitions are there on your first disk drive ?
           Name, type, size ? Collect these details also for other
           disk drives you may have on this machine.

        3* On which drive are you planning to install Linux (e.g. drive
           2 of first IDE, or SCSI-ID 5 of built-in SCSI interface)

        4* Can  we  re-partition your disk ? (All  existing  data
           will be lost)

        5* Which  partitions can be reformatted to  become  Linux
           partitions ? Note: All  information  recorded  in this
           partition will be erased.

        6* How  much of disk space can you give for  Linux
           [50 MB minimum] ?

        7* What is your second hard disk (if any)?

        8* What is your third hard disk (if any)?

        9* What is your fourth hard disk (if any)?

        10* Do you have any SCSI device ? Which SCSI controller do
            you have (if any)?

        11* Do you plan to boot from your hard disk or floppy?

        12* On which hard  disk  partition  do you want LILO boot
            loader to reside?

        13* Do you wish to retain the original boot sector/master
            boot record that is currently on your hard disk?

        14* On which disk partitions will your Linux root reside?


        15* Do you access the IDE drive in LBA mode (check your BIOS
            settings) ?


    -------------------------------------------------------------

    V. Video Display Unit (Monitor and controller)

    Useful tips: If you do not  have good documentation  on  your
    VDU, try to look at the sticker (nameplate) on  the  back  of
    your VDU, you may find the answers  to  some of the questions
    given below.

        1* What kind of monitor do  you have [Monochrome, Colour]
           [EGA, VGA, CGA ..] ? What make ?

        2* Size of screen [14", 15", 19"] ? Is it an
           interlaced monitor ?

        3* What  are  the  resolutions, and  number  of   colours
           possible on this monitor [600x480, 800x600, 1024x768]?

        4* What is your monitor's vertical refresh rate / vertical
           sync. frequency (could be a range)?

        5* What is your monitor's horizontal refresh rate / horizontal
           sync. frquency (could be a range) ?

        6* Monitor's bandwidth ?

        7* Video RAM size ?


        8* VDU Control card : make and model ?


        9* Chip set used in VDU control card ?


        10* What RAMDAC do you have ?


    -------------------------------------------------------------

    N. NETWORKING

        1* Are you using an internal modem | external modem ?

        2* What make ?

        3* On which COM port is the modem connected ? What IRQ ?

        4* What is the speed of the modem [bps] ?

        5* What serial interface chip does your computer use (e.g.
           8450, 16550C) ?

        6* Is it a "Windows only" modem [WIN-MODEM...] ?

        7* Which  ethernet card do you have [10base2 or  10baseT;
           NONE for none] ? What type ?

        8* Will  this  machine  be  a part  of  Internet  or  any
           Intranet ?

        9* Will this machine use a dialup connection / PPP connection
           to an Internet/Intranet server ?


        10* Will this machine be used as an Internet or Intranet server ?

        11* What will be the hostname of your computer (e.g. penguin) ?

        12* What will be the domain name, if any, of your computer
            (e.g. family_name.city.country)

        12* What will be the IP address, if any, of your computer
            (e.g. 123.1.2.3) ?

        13* What is the IP address of the DNS server (can be none) ?


        14* What is the IP address of the default router (can be none) ?


    ------------------------------------------------------------

    P. PRINTER

        1* Have you connected any printer on the parallel port of
           your PC ?

        2* What is the type, make of the printer ?


    -------------------------------------------------------------

    L. LAPTOP

        1* Number and type of PCMCIA slots on your Laptop ?

        2* PC cards you plan to use ?

        3* Built-in devices on your laptop (e.g. trackball,
           pointer, touchpad) ?

        4* COM ports used for the above built-in devices ?

    ------------------------------------------------------------

    X. MISCELLANEOUS

    Useful tip:  Try to make a  consolidated hardcopy list of I/O
    addresses, IRQs, DMA-addresses  used by the different devices
    in your machine. Take  care  to find out  the   configuration
    details of your VDU-driver card, Ethernet card, SCSI card etc.


        1* Does  your keyboard use a round connector  (DIN-5)  or
           PS/2 connector?

        2* Do  you  plan to use keyboard mapping to  any  non-US
            keyboards [French, Greek, Cyrillic, ..] ?

        3* Are you using any Plug & play devices ?

        4* Are  you using any sound card ? What card ? What  I/O,
           IRQ, DMA does it use ?

        5* How many ISA spare  slots do you have ?

        6* How many EISA spare slots do you have ?

        7* How many VESA spare slots do you have ?

        8* How many PCI spare slots do you have ?

        9* How many other (describe) spare slots?

        10* What  kind of other removable media do you have  (can
            be NONE)?

        11* Do you have any other interesting hardware?


        12* Please add any details you wish to highlight:

           __________________________________________________

           __________________________________________________

           __________________________________________________


    Did   you  find  this  form  clear  ?  Any  suggestions   for
    improvement ?


           __________________________________________________

           __________________________________________________

           __________________________________________________



    -------------------------------------------------------------
    That  is all. Thanks for filling out the form.

    Please crosscheck the above  responses, and keep the checklist
    handy at the time of installation.

                              ACKNOWLEDGEMENTS

    Algologic acknowledges with gratitude the useful  suggestions
    and  inputs  from many members of the  Linux  community,  for
    preparation of this checklist. This checklist is proof of the
    cooperation  and goodwill which exists between  Linux  users.
    Algologic submits this checklist to the Linux community, as a
    humble tribute to the "spirit of Linux".


    ********Endchecklist
     _________________________________________________________________
   
   [28]Goto top
   
  What next...?
  
       Even the longest journey has to start with a small first-step.
                                 -- Confucious
                                      
   Now that you have taken the first step of filling up the checklist,
   you would like to prepare for the real installation. Here are a few
   tips, for starters:
     * [29]A very good installation guide is here. You must visit this
       excellent site. It also gives tips to find answers for some of the
       questions asked in the pre-installation checklist (e.g. video
       cards, monitor, chipset, modem, ...etc.).
     * [30]The official Installation HOWTO is here.
       
   [31]Goto top
   
  Your feedback is IMPORTANT
  
   [32]Send us an email and give us your feedback:
   Tell us if you found this webpage clear.
       Tell us how we can improve this questionnaire and make it more
       useful.
       Tell us how you located this page.
       
   Note: We do NOT answer general queries on Linux. Please [33]click here
   if you want to know how to get information on Linux.
   Visit our home page at: [34]Algologic Research & Solutions.
   
   [35]Goto top
   
                         Thank you for your visit.
                                      
                     Algologic is a proud member of the
                             The Linux Webring
       [ [36]Previous | [37]Next | [38]Home | [39]Random | [40]List ]
        _________________________________________________________________
                                                                         
                                                            ADMINISTRIVIA
                                   This page last modified on: 1999-12-19
          URL of this page: http://members.tripod.com/~algolog/lnxchk.htm
      Send your comments about this page, to: [41]algolog@hd1.vsnl.net.in
         This page, developed and maintained by: [42]Algologic Research &
                                                                Solutions
                                               [43]Warning and Disclaimer
        _________________________________________________________________
     _________________________________________________________________
   
   [44][b.cgi?u=algolog&z=1] 

References

   1. file://localhost/export/sunsite/users/gferg/howto/index.htm
   2. file://localhost/export/sunsite/users/gferg/howto/index.htm
   3. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#what
   4. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#who
   5. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#more
   6. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#japanese
   7. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#dutch
   8. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#french
   9. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#checklist
  10. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#step
  11. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#feedback
  12. http://members.tripod.com/~algolog/tools.htm#linux
  13. file://localhost/export/sunsite/users/gferg/howto/weblinks.htm#linux
  14. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#step
  15. file://localhost/export/sunsite/users/gferg/howto/weblinks.htm#linux
  16. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#debut
  17. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#debut
  18. http://www.linux.or.jp/JF/JFdocs/Pre-Installation-Checklist.txt
  19. http://web.kyoto-inet.or.jp/people/jeanne/linux/chk.html
  20. mailto:jeanne@mbox.kyoto-inet.or.jp
  21. http://web.kyoto-inet.or.jp/people/jeanne/
  22. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#debut
  23. http://www.nl.linux.org/~hccnoord/checklist.html
  24. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#debut
  25. http://www.freenix.org/unix/linux/HOWTO/mini/Pre-Installation-Checklist.html
  26. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#debut
  27. http://members.tripod.com/~algolog/lnxchk.htm
  28. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#debut
  29. http://www.xmission.com/~howardm/install.html
  30. http://sunsite.unc.edu/LDP/HOWTO/Installation-HOWTO-4.html
  31. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#debut
  32. mailto:algolog@hd1.vsnl.net.in?subject=Linuxchecklist
  33. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#more
  34. file://localhost/export/sunsite/users/gferg/howto/index.htm
  35. file://localhost/export/sunsite/users/gferg/howto/Pre-Installation-Checklist.html#debut
  36. http://www.webring.com/cgi-bin/webring?ring=linux;id=276;prev
  37. http://www.webring.com/cgi-bin/webring?ring=linux;id=276;next
  38. http://www.webring.com/cgi-bin/webring?ring=linux;home
  39. http://www.webring.com/cgi-bin/webring?ring=linux;random
  40. http://www.webring.com/cgi-bin/webring?ring=linux;list
  41. mailto:algolog@hd1.vsnl.net.in?subject=linuxchecklist
  42. http://members.tripod.com/~algolog
  43. file://localhost/export/sunsite/users/gferg/howto/warning.htm
  44. http://stats.superstats.com/c.cgi?u=algolog

                   HOW TO ENABLE PROCESS ACCOUNTING ON LINUX



   _Last updated: Fri Aug 8 09:25:58 HKT 1997_


        Preamble: This document is copylefted by Albert M.C. Tam
        (bertie@scn.org). Permission to use, copy, distribute this document for
        non-commerical purposes is hereby granted, provided that the author's /
        editor's name and this notice appear in all copies and/or supporting
        documents; that this document is not modified. This document is
        distributed in hope that it will be useful, but WITHOUT ANY WARRANTY,
        either expressed or implied. While every effort has been taken to
        ensure the accuracy of the information documented herein, the author /
        editor / maintainer assumes NO RESPONSIBILITY for errors, or for
        damages results for the use of the information documented herein.



   This document describes how to enable system process accounting on a
   Linux host, and the usage of various process accounting commands. It
   is intended for users running kernel version greater than or equal to
   1.3.73 (recently tested on RedHat 4.1 kernel 2.0.27). Kernels older
   than 1.3.73 may need a patch in order to use the process accounting
   feature.

   Feel free to send any feedback or comments to bertie@scn.org if you
   find an error, or if any information is missing. I appreciate it.


     _________________________________________________________________



What is Process Accounting?



   Process accounting is the method of recording and summarizing commands
   executed on Linux. The modern Linux kernel is capable of keeping
   process accounting records for the commands being run, the user who
   executed the command, the CPU time, and much more.

   Process accounting enables you to keep detailed accounting information
   for the system resources used, their allocation among users, and
   system monitoring.

Current Status of Process Accounting under Linux



   Process accounting support has been integrated into the newer kernels
   (version >= 1.3.73). If you are running an older kernel, you may need
   some patch files. The patches are available from

   ftp://iguana.hut.fi/pub/linux/Kernel/process_accounting



Requirements for Process Accounting on Linux



   _Kernel_

   Linux Kernel version greater than or equal to version 1.3.73, I
   recommended 2.x. The kernel source is available from

   http://sunsite.unc.edu/pub/Linux/kernel/v2.0



   _Process accounting software_

   Depending on the Linux distribution you have, you may, or may not have
   the process accounting software package installed on your system. If
   you don't have it, try downloading the package from

   http://sunsite.unc.edu/pub/Linux/system/admin/quota-acct-modified.tgz



     _________________________________________________________________



Process Accounting Setup on Linux



   _1. Compile and install process accounting softwares_

   The process accounting software package is available from

   http://sunsite.unc.edu/pub/Linux/system/admin/quota-acct-modified.tgz



   _2. Modify your system init script and turn on process accounting at
   boot time _

   Here's an example:


        # Turn process accounting on.
        if [ -x /sbin/accton ]
        then
                /sbin/accton /var/log/pacct
                echo "Process accounting turned on."
        fi



   _3. Create accounting record file "pacct"_

   Your process accounting softwares will print out all commands executed
   to the file /var/log/pacct by default.

   To create the accounting record file:


        touch /var/log/pacct



   This record file should be owned by root, has read-write permission
   for root, and read permission for anybody else:

        chown root /var/log/pacct
        chmod 0644 /var/log/pacct



   _4. Reboot_

   Now reboot your system for changes you made to take effect.


     _________________________________________________________________



Miscellaneous Process Accounting Commands



   _ac_

   ac prints out statistics about users' connection time in hours, based
   on the logins and logouts in the current /var/log/wtmp file. ac is
   also capable of printing out time totals for each day (-d option), and
   for each user (-p option).

   _accton_

   accton is used to turn on or turn off process accounting. The file is
   normally executed at system bootup or shutdown via system init
   scripts.

   _last_

   last goes through the /var/log/wtmp file and prints out information
   about connection times of users.

   _sa_

   sa summarizes accounting information from previously executed
   commands, software I/O operation times, CPU times, as recorded in the
   accounting record file /var/account/pacct.

   _lastcomm_

   lastcomm prints out the information about all previously executed
   commands, recorded in /var/account/pacct.
  Programming Languages mini-HOWTO
  Risto S. Varanka, <risto.varanka@helsinki.fi>
  v, 6 January 2000

  A brief comparison of major programming languages for Linux and major
  libraries for creating graphical user interfaces (GUIs) under Linux
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright
     1.2 License
        1.2.1 Requirements of Modified Works
     1.3 Disclaimer
     1.4 Author
     1.5 Credits
     1.6 Links

  2. Programming Languages

     2.1 Concepts in the Table
     2.2 Major Languages
     2.3 Shell Programming
     2.4 Other Languages
     2.5 Links

  3. GUI Toolkits

     3.1 Concepts in the Table
     3.2 Major GUI Toolkits
     3.3 Links


  ______________________________________________________________________

  1.  Introduction

  Linux is a fascinating operating system because it lets any user
  participate in its development. The variety of available languages,
  however, can be confusing to beginning Linux developers. This document
  lists the most common options for everyday development and states some
  key facts about them. (Well, ``most common'' and ``key'' as I perceive
  them.) My aim is neither to review the languages nor to determine
  which one is the best.  Each language is a tool that fits some jobs
  and some tastes. You can get further (often conflicting) information
  easily, if you ask around or keep your ears open. The Links sections
  in this document will give you some pointers for your own research.

  There is a plethora of languages and libraries for Linux, so this
  document only covers the most common languages and GUI toolkits at the
  moment. Also note that the languages and GUI toolkits are seen from
  the Linux point of view, their features on other platforms are not
  discussed or implied.

  This document is a recent addition to the LDP, so there has not been
  opportunity for much community feedback. However, it is released in
  hopes that it will prove useful for people interested in programming
  under Linux. A question mark in the tables indicates lack of
  information. If you can fill it in, please contact the author.



  1.1.  Copyright

  Copyright (c) 2000 Risto Varanka.

  1.2.  License

  The following license terms apply to all LDP documents, unless
  otherwise stated in the document.  The LDP documents may be reproduced
  and distributed in whole or in part, in any medium physical or
  electronic, provided that this license notice is displayed in the
  reproduction.  Commercial redistribution is permitted and encouraged.
  Thirty days advance notice via email to the author(s) of
  redistribution is appreciated, to give the authors time to provide
  updated documents.

  1.2.1.  Requirements of Modified Works

  All modified documents, including translations, anthologies, and
  partial documents, must meet the following requirements:


  1. The modified version must be labeled as such.

  2. The person making the modifications must be identified.

  3. Acknowledgement of the original author must be retained.

  4. The location of the original unmodified document be identified.

  5. The original author's (or authors') name(s) may not be used to
     assert or imply endorsement of the resulting document without the
     original author's (or authors') permission.

  In addition it is requested that:


  1. The modifications (including deletions) be noted.

  2. The author be notified by email of the modification in advance of
     redistribution, if an email address is provided in the document.

  As a special exception, anthologies of LDP documents may include a
  single copy of these license terms in a conspicuous location within
  the anthology and replace other copies of this license with a
  reference to the single copy of the license without the document being
  considered ``modified'' for the purposes of this section.

  Mere aggregation of LDP documents with other documents or programs on
  the same media shall not cause this license to apply to those other
  works.

  All translations, derivative documents, or modified documents that
  incorporate any LDP document may not have more restrictive license
  terms than these, except that you may require distributors to make the
  resulting document available in source format.

  1.3.  Disclaimer

  THIS DOCUMENT COVERS A LARGE AND CONSTANTLY CHANGING DOMAIN.
  THEREFORE, THE INFORMATION CONTAINED IN THIS DOCUMENT MAY BE INCORRECT
  OR OUTDATED. ALL USE OF THIS DOCUMENT AND ALL INFORMATION CONTAINED IN
  IT IS AT YOUR OWN RISK. THE AUTHOR DOES NOT GIVE ANY WARRANTY OR
  GUARANTEE, EITHER EXPLICIT OR IMPLIED.



  1.4.  Author

  You are welcome to send feedback to the author at:
  risto.varanka@helsinki.fi <mailto:risto.varanka@helsinki.fi>.

  Author's web site can be found at http://www.helsinki.fi/~rvaranka/
  <http://www.helsinki.fi/~rvaranka/>.

  1.5.  Credits

  I am thankful to several people who commented on language issues.
  These conversations have given me a better view of the different
  languages, and I hope future conversations will allow this mini-HOWTO
  to mature over time. Especially I would like to thank the people at
  the IRCNet channel #linux: Morphy, Bluesmurf, Vadim, Zonk^, Rikkus and
  others whose names I have forgotten. Thanks go also to Stig Erik
  Sandoe for helpful comments.

  1.6.  Links

  Exhaustive lists of Linux development libraries and tools:


    Freshmeat <http://www.freshmeat.net/appindex/development/>

    Linux Development Tools <http://www.hotfeet.ch/~gemi/LDT/>

    linuxprogramming.com <http://www.linuxprogramming.com/>

  The Hacker FAQ <http://www.tuxedo.org/~esr/faqs/hacker-howto.html> by
  Eric S.  Raymond is another interesting text for novice Linux
  developers. It concentrates on some cultural and psychological aspects
  of open source development.

  Other LDP documents <http://www.linuxdoc.org/> covering general
  programming subjects include the Reading List HOWTO and the Linux
  Programmer's Guide - several more have been written on specific
  subjects.

  2.  Programming Languages

  2.1.  Concepts in the Table



     Language
        A common name of the language.


     Beginner
        Indicates how well suited the language is for people with little
        programming experience. A language marked with ``yes'' should be
        viable for a beginner's first programming language.


     Performance
        How fast your applications are likely to run when you put them
        into production use.  Performance depends more on your
        algorithmic programming skills than the actual language.  As a
        rule of thumb, C, C++ and Fortran are sometimes necessary
        because they can offer better performance than other languages -
        at other times they might be unwieldy for the desired purpose.
        (One idea for ``benchmarking'' the languages would be to
        implement a simple sorting algorithm in all of them and compare
        running times.  Anybody want to help me with this?)

     OOP, Object-Oriented Programming vs. other paradigms
        Object-oriented programming is an important programming paradigm
        that is gaining popularity.  In object oriented programming,
        data structures and algorithms are integrated into units, often
        called classes. OOP is often contrasted with procedural
        programming (which uses separate algorithms and data
        structures).  It is not strictly dependent on language: you can
        do OOP in languages not listed as such (C for example), and
        program in the procedural style in languages that are listed as
        OOP.  I've listed as OOP languages that have special features or
        add-ons to facilitate OOP.  Functional languages (Lisp for
        example) are a bit different breed - among other things,
        functional programming is a superset of OOP. Logic programming
        (Prolog), also called declarative programming, on the other
        hand, is not related to the other types of programming in a
        similar sense.


     RAD, Rapid Application Development
        More dependent on the tools you are using than the actual
        language.  There is a HOWTO on GUI development tools for Linux,
        although it's out of date.  With a good graphical tool you can
        do RAD. Sometimes RAD is based on code reuse as well, so free
        software could provide a good starting point.


     Examples
        Mentions fields of programming the language is most often used
        in. Other good (and bad) uses exist, but they are less typical.



     Comments
        Additional information on the language, like capacities and
        dialects.


  2.2.  Major Languages



  PERL
  Beginner: Yes - OOP: Yes
  Examples: Scripting, sysadmin, www
  Comments: Powerful for handling text and strings, very popular

  Python
  Beginner: Yes - OOP: Yes
  Examples: Scripting, application scripting, www
  Comments:

  TCL
  Beginner: Yes - OOP: No
  Examples: Scripting, sysadmin, applications
  Comments:

  PHP
  Beginner: Yes - OOP: Yes
  Examples: Www
  Comments: Popular for web databases

  Java
  Beginner: Yes - OOP: Yes
  Examples: Cross-platform applications, www
  Comments:

  Lisp
  Beginner: Yes - OOP: Functional
  Examples: Emacs modes (for elisp), AI
  Comments: Variants Elisp, Clisp and Scheme

  Fortran
  Beginner: No  - OOP: No
  Examples: Mathematical applications
  Comments: Variants f77 and f90/95

  C
  Beginner: No  - OOP: No
  Examples: System programming, applications
  Comments: Very popular

  C++
  Beginner: No  - OOP: Yes
  Examples: Applications
  Comments:



  2.3.  Shell Programming

  Shells are an important programming environment, too. I haven't
  covered them because I don't understand the field very thoroughly yet.
  Knowledge of shells is important for anyone who works on Linux
  regularly, more so for system administrators. There are similarities
  between shell programming and scripting - often they can achieve the
  same goals, and you have the option of choosing between native shell
  and a scripting language. Among the most popular shells are bash,
  tcsh, csh, ksh and zsh. You can get basic information on your shell
  with the man command, man bash for example.

  2.4.  Other Languages

  Other languages of note: AWK, SED, Smalltalk, Eiffel, ADA, Prolog,
  assembler, Objective C, Logo, Pascal (p2c converter)



  2.5.  Links


    A general info site <http://www.tunes.org/Review/Languages.html> on
     programming languages, lots of info and opinions

    TCL <http://www.scriptics.com/>

    PERL <http://www.perl.org/>

    Python <http://www.python.org/>

    PHP <http://www.php.net>

    Java <http://www.javasoft.com/>

    clisp <http://clisp.cons.org/~haible/packages-clisp.html>

  3.  GUI Toolkits

  3.1.  Concepts in the Table



     Library
        Common name or abbreviation of the toolkit.


     Beginner
        Whether the toolkit is suitable for a newbie programmer.


     License
        Different licenses for different GUI toolkits have practical
        significance. GTK+ and TK licenses allow you to develop both
        open source and closed source applications without paying for a
        license. Motif license requires payment, while the QT license
        requires payment only if you write closed source programs.



     Language
        The language that is most often used with the toolkit.


     Bindings
        Other languages which can use the toolkit.


     Examples
        Applications that use the toolkit.


     Comments
        Additional information on the toolkit.


  3.2.  Major GUI Toolkits


  3.3.  Links


    TK <http://www.scriptics.com/>



  Library   Beginner   License                Language   Bindings                         Examples
  TK        Yes        Free                   TCL        PERL, Python, others             make xconfig, TKDesk
  GTK+      No         Free (LGPL)            C          PERL, C++, Python, many others   GNOME, Gimp
  QT        No         Free for open source   C++        Python, PERL, C, others?         KDE
  Motif     No         Non-free               C/C++      Python, others?                  Netscape, Wordperfect

    GTK+ <http://www.gtk.org/>

    QT <http://www.troll.no/>

    Motif <http://www.metrolink.com/>






   _ProxyARP Subnetting HOWTO_

   Copyright 1997 by Bob Edwards, email: <Robert.Edwards@anu.edu.au>

   http://spigot.anu.edu.au/people/bob/home.html

   See further information on copying conditions below.

   Last update: August 1997. Click here to browse the author's latest
   version of this document. Corrections and suggestions welcome!

   This HOWTO discusses using Proxy Address Resolution Protocol (ARP)
   with subnetting in order to make a small network of machines visible
   on another Internet Protocol (IP) subnet (I call it sub-subnetting).
   This makes all the machines on the local network (network 0 from now
   on) appear as if they are connected to the main network (network 1).

   This is only relevent if all machines are connected by Ethernet or
   _ether_ devices (ie. it won't work for SLIP/PPP/CSLIP etc.)

   _Table of contents_
     * Why use Proxy ARP with subnetting?
     * How Proxy ARP with subnetting works
     * Setting up Proxy ARP with subnetting
     * Other alternatives to Proxy ARP with subnetting
     * Other applications of Proxy ARP with subnetting
     * Copying conditions



   _Acknowledgements_ This document, and my Proxy ARP implementation
   could not have been made possible without the help of:
     * Andrew Tridgell, who implemented the subnetting options for arp in
       Linux, and who personally assisted me in getting it working
     * the Proxy-ARP mini-HOWTO, by Al Longyear
     * the Multiple-Ethernet mini-HOWTO, by Don Becker
     * the arp(8) source code and man page by Fred N. van Kempen and
       Bernd Eckenfels



   _Why use Proxy ARP with subnetting?_

   The applications for using Proxy ARP with subnetting are fairly
   specific.

   In my case, I had a wireless Ethernet card that plugs into an 8-bit
   ISA slot. I wanted to use this card to provide connectivity for a
   number of machines at once. Being an ISA card, I could use it on a
   Linux machine, after I had written an appropriate device driver for it
   - this is the subject of another document. From here, it was only
   necessary to add a second Ethernet interface to the Linux machine and
   then use some mechanism to join the two networks together.

   For the purposes of discussion, let network 0 be the local Ethernet
   connected to the Linux box via an NE-2000 clone Ethernet interface on
   eth0. Network 1 is the main network connected via the wireless
   Ethernet card on eth1. Machine A is the Linux box with both
   interfaces. Machine B is any TCP/IP machine on network 0 and machine C
   is likewise on network 1.

   Normally, to provide the connectivity, I would have done one of the
   following:
     * Used the IP-Bridge software (see the Bridge mini-HOWTO) to bridge
       the traffic between the two network interfaces. Unfortunately, the
       wireless Ethernet interface cannot be put into "Promiscuous" mode
       (ie. it can't see all packets on network 1). This is mainly due to
       the lower bandwidth of the wireless Ethernet (2MBit/sec) meaning
       that we don't want to carry any traffic not specifically destined
       to another wireless Ethernet machine - in our case machine A - or
       broadcasts. Also, bridging is rather CPU intensive!
     * Alternatively, use subnets and an IP-router to pass packets
       between the two networks (see the IP-Subnetworking mini-HOWTO).
       This is a protocol specific solution, where the Linux kernel can
       handle the Internet Protocol (IP) packets, but other protocols
       (such as AppleTalk) need extra software to route. This also
       requires the allocation of a new IP subnet (network) number, which
       is not always an option.



   In my case, getting a new subnet (network) number was not an option,
   so I wanted a solution that allowed all the machines on network 0 to
   appear as if they were on network 1. This is where Proxy ARP comes in.
   Other solutions are used to connect other (non-IP) protocols, such as
   netatalk to provide AppleTalk routing.

   _How Proxy ARP with subnetting works_

   The Proxy ARP is actually only used to get packets from network 1 to
   network 0. To get packets back the other way, the normal IP routing
   functionality is employed.

   In my case, network 1 has an 8-bit subnet mask (255.255.255.0). I have
   chosen the subnet mask for network 0 to be 4-bit (255.255.255.240),
   allowing 14 IP nodes on network 0 (2 ^ 4 = 16, less two for the all
   zeros and all ones cases). Note that any size of subnet mask up to,
   but not including, the size of the mask of the other network is
   allowable here (eg. 2, 3, 4, 5, 6 or 7 bits in this case - for one
   bit, just use normal Proxy ARP!)

   All the IP numbers for network 0 (16 in total) appear in network 1 as
   a subset. Note that it is very important, in this case, not to allow
   any machine connected directly to network 1 to have an IP number in
   this range! In my case, I have "reserved" the IP numbers of network 1
   ending in 64 .. 79 for network 0. In this case, the IP numbers ending
   in 64 and 79 can't actually be used by nodes - 79 is the broadcast
   address for network 0.

   Machine A is allocated two IP numbers, one within the network 0 range
   for it's real Ethernet interface (eth0) and the other within the
   network 1 range, but outside of the network 0 range, for the wireless
   Ethernet interface (eth1).

   Say machine C (on network 1) wants to send a packet to machine B (on
   network 0). Because the IP number of machine B makes it look to
   machine C as though it is on the same physical network, machine C will
   use the Address Resolution Protocol (ARP) to send a broadcast message
   on network 1 requesting the machine with the IP number of machine B to
   respond with it's hardware (Ethernet or MAC layer) address. Machine B
   won't see this request, as it isn't actually on network 1, but machine
   A, on both networks, will see it.

   The first bit of magic now happens as the Linux kernel arp code on
   machine A, with a properly configured Proxy ARP with subnetting entry,
   determines that the ARP request has come in on the network 1 interface
   (eth1) and that the IP number being ARP'd for is in the subnet range
   for network 0. Machine A then sends it's own hardware (Ethernet)
   address back to machine C as an ARP response packet.

   Machine C then updates it's ARP cache with an entry for machine B, but
   with the hardware (Ethernet) address of machine A (in this case, the
   wireless Ethernet interface). Machine C can now send the packet for
   machine B to this hardware (Ethernet) address, and machine A receives
   it.

   Machine A notices that the destination IP number in the packet is that
   of machine B, not itself. Machine A's Linux kernel IP routing code
   attempts to forward the packet to machine B by looking at it's routing
   tables to determine which interface contains the network number for
   machine B. However, the IP number for machine B is valid for both the
   network 0 interface (eth0), and for the network 1 interface (eth1).

   At this point, something else clever happens. Because the subnet mask
   for the network 0 interface has more 1 bits (it is more specific) than
   the subnet mask for the network 1 interface, the Linux kernel routing
   code will match the IP number for machine B to the network 0
   interface, and not keep looking for the potential match with the
   network 1 interface (the one the packet came in on).

   Now machine A needs to find out the "real" hardware (Ethernet) address
   for machine B (assuming that it doesn't already have it in the ARP
   cache). Machine A uses an ARP request, but this time the Linux kernel
   arp code notes that the request isn't coming from the network 1
   interface (eth1), and so doesn't respond with the Proxy address of
   eth1. Instead, it sends the ARP request on the network 0 interface
   (eth0), where machine B will see it and respond with it's own (real)
   hardware (Ethernet) address. Now machine A can send the packet (from
   machine C) onto machine B.

   Machine B gets the packet from machine C (via machine A) and then
   wants to send back a response. This time, machine B notices that
   machine C in on a different subnet (machine B's subnet mask of
   255.255.255.240 excludes all machines not in the network 0 IP address
   range). Machine B is setup with a "default" route to machine A's
   network 0 IP number and sends the packet to machine A. This time,
   machine A's Linux kernel routing code determines the destination IP
   number (of machine C) as being on network 1 and sends the packet onto
   machine C via Ethernet interface eth1.

   Similar (less complicated) things occur for packets originating from
   and destined to machine A from other machines on either of the two
   networks.

   Similarly, it should be obvious that if another machine (D) on network
   0 ARP's for machine B, machine A will receive the ARP request on it's
   network 0 interface (eth0) and won't respond to the request as it is
   set up to only Proxy on it's network 1 interface (eth1).

   Note also that all of machines B and C (and D) are not required to do
   anything unusual, IP-wise. In my case, there is a mixture of Suns,
   Macs and PC/Windoze 95 machines on network 0 all connecting through
   Linux machine A to the rest of the world.

   Finally, note that once the hardware (Ethernet) addresses are
   discovered by each of machines A, B, C (and D), they are placed in the
   ARP cache and subsequent packet transfers occur without the ARP
   overhead. The ARP caches normally expire entries after 5 minutes of
   non-activity.

   _Setting up Proxy ARP with subnetting_

   I set up Proxy ARP with subnetting on a Linux kernel version 2.0.30
   machine, but I am told that the code works right back to some kernel
   version in the 1.2.x era.

   The first thing to note is that the ARP code is in two parts: the part
   inside the kernel that sends and receives ARP requests and responses
   and updates the ARP cache etc.; and other part is the arp(8) command
   that allows the super user to modify the ARP cache manually and anyone
   to examine it.

   The first problem I had was that the arp(8) command that came with my
   Slackware 3.1 distribution was ancient (1994 era!!!) and didn't
   communicate with the kernel arp code correctly at all (mainly
   evidenced by the strange output that it gave for "arp -a").

   The arp(8) command in "net-tools-1.33a" available from a variety of
   places, including (from the README file that came with it)
   ftp.linux.org.uk:/pub/linux/Networking/PROGRAMS/NetTools/ works
   properly and includes new man pages that explain stuff a lot better
   than the older arp(8) man page.

   Armed with a decent arp(8) command, all the changes I made were in the
   /etc/rc.d/rc.inet1 script (for Slackware - probably different for
   other flavours). First of all, we need to change the broadcast
   address, network number and netmask of eth0:

NETMASK=255.255.255.240 # for a 4-bit host part
NETWORK=x.y.z.64        # our new network number (replace x.y.z with your net)
BROADCAST=x.y.z.79      # in my case



   Then a line needs to be added to configure the second Ethernet port
   (after any module loading that might be required to load the driver
   code):

/sbin/ifconfig eth1 <name on net 1> broadcast <x.y.z.255> netmask 255.255.255.0



   Then we add a route for the new interface: /sbin/route add -net
   <x.y.z.0> netmask 255.255.255.0

   And you will probably need to change the default gateway to the one
   for network 1.

   At this point, it is appropriate to add the Proxy ARP entry:

/sbin/arp -i eth1 -Ds ${NETWORK} eth1 netmask ${NETMASK} pub



   This tells ARP to add a static entry (the _s_) to the cache for
   network _${NETWORK}_. The _-D_ tells ARP to use the same hardware
   address as interface _eth1_ (the second _eth1_), thus saving us from
   having to look up the hardware address for eth1 and hardcoding it in.
   The _netmask_ option tells ARP that we want to use subnetting (ie.
   Proxy for all (IP number) & ${NETMASK} == ${NETWORK} & ${NETMASK}).
   The _pub_ option tells ARP to publish this ARP entry, ie. it is a
   Proxy entry, so respond on behalf of these IP numbers. The _-i eth1_
   option tells ARP to only respond to requests that come in on interface
   eth1.

   Hopefully, at this point, when the machine is rebooted, all the
   machines on network 0 will appear to be on network 1. You can check
   that the Proxy ARP with subnetting entry has been correctly installed
   on machine A. On my machine (names changed to protect the innocent) it
   is:

#/sbin/arp -an
Address                 HWtype  HWaddress           Flags Mask            Iface
x.y.z.1                 ether   00:00:0C:13:6F:17   C     *               eth1
x.y.z.65                ether   00:40:05:49:77:01   C     *               eth0
x.y.z.67                ether   08:00:20:0B:79:47   C     *               eth0
x.y.z.5                 ether   00:00:3B:80:18:E5   C     *               eth1
x.y.z.64                ether   00:40:96:20:CD:D2   CMP   255.255.255.240 eth1



   Alternatively, you can examine the /proc/net/arp file with eg. cat(1).


   The last line is the proxy entry for the subnet. The CMP flags
   indicate that it is a static (Manually entered) entry and that it is
   to be Published. The entry is only going to reply to ARP requests on
   eth1 where the requested IP number, once masked, matches the network
   number, also masked. Note that arp(8) has automatically determined the
   hardware address of eth1 and inserted this for the address to use (the
   -Ds option).

   Likewise, it is probably prudent to check that the routing table has
   been set up correctly. Here is mine (again, the names are changed to
   protect the innocent):

#/bin/netstat -rn
Kernel routing table
Destination     Gateway         Genmask         Flags Metric Ref Use    Iface
x.y.z.64        0.0.0.0         255.255.255.240 U     0      0       71 eth0
x.y.z.0         0.0.0.0         255.255.255.0   U     0      0      389 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        7 lo
0.0.0.0         x.y.z.1         0.0.0.0         UG    1      0      573 eth1



   Alternatively, you can examine the /proc/net/route file with eg.
   cat(1).

   Note that the first entry is a proper subset of the second, but the
   routing table has ranked them in netmask order, so the eth0 entry will
   be checked before the eth1 entry.

   _Other alternatives to Proxy ARP with subnetting_

   There are several other alternatives to using Proxy ARP with
   subnetting in this situation, apart from the ones mentioned about
   (bridging and straight routing):
     * IP-Masquerading (see the IP-Masquerade mini-HOWTO), in which
       network 0 is "hidden" behind machine A from the rest of the
       Internet. As machines on network 0 attempt to connect outside
       through machine A, it re-addresses the source address and port
       number of the packets and makes them look like they are coming
       from itself, rather than from the machine on the hidden network 0.
       This is an elegant solution, although it prevents any machine on
       network 1 from initiating a connection to any machine on network
       0, as the machines on network 0 effectively don't exist outside of
       network 0. This effectively increases security of the machines on
       network 0, but is also means that servers on network 1 cannot
       check the identity of clients on network 0 using IP numbers (eg.
       NFS servers use IP hostnames for access to mountable file
       systems).
     * Another option is IP in IP tunneling, which isn't supported on all
       platforms (such as Macs and Windoze machines) so I opted not to go
       this way.
     * Use Proxy ARP without subnetting. This is certainly possible, it
       just means that a separate entry needs to be created for each
       machine on network 0, instead of a single entry for all machines
       (current and future) on network 0.
     * Possibly IP Aliasing might also be useful here, but I haven't
       looked into this at all.



   _Other Applications of Proxy ARP with subnetting_

   There is only one other application that I know about that uses Proxy
   ARP with subnetting, also here at the Australian National University.
   It is the one that Andrew Tridgell originally wrote the subnetting
   extensions to Proxy ARP for. However, Andrew reliably informs me that
   there are, in fact, several other sites around the world using it as
   well (I don't have any details).

   The other A.N.U. application involves a teaching lab set up to teach
   students how to configure machines to use TCP/IP, including setting up
   the gateway. The network used is a Class C network, and Andrew needed
   to "subnet" it for security, traffic control and the educational
   reason mentioned above. He did this using Proxy ARP, and then decided
   that a single entry in the ARP cache for the whole subnet would be
   faster and cleaner than one for each host on the subnet. Voila...Proxy
   ARP with subnetting!

   Corrections and suggestions welcome!

   _Copying conditions_

   Copyright 1997 by Bob Edwards <Robert.Edwards@anu.edu.au>

   Voice: (+61) 2 6249 4090

   Unless otherwise stated, Linux HOWTO documents are copyrighted by
   their respective authors. Linux HOWTO documents may be reproduced and
   distributed in whole or in part, in any medium physical or electronic,
   as long as this copyright notice is retained on all copies. Commercial
   redistribution is allowed and encouraged; however, the author would
   like to be notified of any such distributions. All translations,
   derivative works, or aggregate works incorporating any Linux HOWTO
   documents must be covered under this copyright notice. That is, you
   may not produce a derivative work from a HOWTO and impose additional
   restrictions on its distribution. Exceptions to these rules may be
   granted under certain conditions; please contact the Linux HOWTO
   coordinator at the address given below. In short, we wish to promote
   dissemination of this information through as many channels as
   possible. However, we do wish to retain copyright on the HOWTO
   documents, and would like to be notified of any plans to redistribute
   the HOWTOs. If you have questions, please contact Greg Hankins, the
   Linux HOWTO coordinator, at gregh@sunsite.unc.edu via email.
  The Linux Public Web Browser mini-HOWTO
  Donald B. Marti Jr., dmarti@best.com
  v0.3, 5 January 1998

  The basic idea here is to give web access to people who wander by,
  while limiting their ability to mess anything up.

  1.  Copyright and Disclaimer

  Copyright 1997 Donald B. Marti Jr.  This document may be redistributed
  under the terms of the Linux Documentation Project license.

  This document currently contains information for Netscape Navigator
  only, but I plan to add notes for other browsers too as I get the
  necessary information.  If you try this with a different browser,
  please let me know.

  2.  Introduction

  The basic idea here is to give web access to people who wander by,
  while limiting their ability to mess anything up.

  This setup was originally intended for trade shows, but it might be
  applicable other places you want to have a web browser going without
  having to babysit a computer.

  Following these instructions does not make your system bulletproof or
  idiot-proof.

  3.  Before you begin

  3.1.  You need a graphical browser

  This document assumes that you already have a running graphical web
  browser, such as Netscape Navigator, on your system.  You should have
  permission to use your graphical web browser.  If you want to use
  Netscape Navigator in a commercial setting, you can buy a copy with
  appropriate license through Caldera.

  3.2.  You need to be able to add an account

  If you don't have the right to be root, get the system administrator
  to add the ``guest'' account and give you ownership of guest's home
  directory.  Skip to the ``Create or edit the following files'' step
  (``Create or edit the following files in /home/guest'') when he or she
  is done.

  3.3.  You need httpd for a stand-alone web browsing station

  If you are setting up a web browsing station to run stand-alone,
  without a network connection, you should have httpd working and the
  web documents installed.  To tell if this is the case, enter:

       lynx -dump http://localhost/

  You should get the text of the home page on your system.

  4.  Add the guest account

  As root, run adduser to add a user named guest.  Then enter

  passwd guest

  to set the password for the guest account.  This should be something
  easy to remember, like ``guest''.  You will be telling people this
  password.  Don't make it the same as your own password.

  Then make guest's home directory owned by you.  Enter

       chown me.mygroup /home/guest

  Replace ``me'' with your regular username and ``mygroup'' with your
  group name.  (On Red Hat Linux, these will be the same, since every
  user has his or her own group.)

  You should now exit and do the rest of the steps as yourself, not
  root.

  5.  Create or edit the following files in /home/guest

  5.1.  File name: .bash_login

       ______________________________________________________________________
       exec startx
       ______________________________________________________________________

  This means that when guest logs in, the login shell will start up the
  X Window System right away.

  5.2.  File name: .Xclients

       ______________________________________________________________________
       netscape
       ______________________________________________________________________

  This means that when X starts, guest just gets the web browser, no
  window manager. If you prefer another web browser, do something else.

  The file .Xclients should be executable by guest.  Enter

       chmod 755 /home/guest/.Xclients

  to make it so.

  5.3.  File name: .xsession

       ______________________________________________________________________
       #!/bin/sh
       netscape
       ______________________________________________________________________

  If you use xdm(1) to log people in, this file should make guest get
  the web browser as if he or she had logged in normally.  The file
  .xsession should be executable by guest.  Enter

       chmod 755 /home/guest/.xsession

  to make it so.

  5.4.  File name: .Xdefaults

       ______________________________________________________________________
       ! Disable drag-to-select.
       *hysteresis:                            3000

       ! Make visited and unvisited links the same color by default
       *linkForeground:                        #0000EE
       *vlinkForeground:                       #0000EE

       Netscape.Navigator.geometry: =NETSCAPE_GEOMETRY

       ! Disable some of the keyboard commands.
       *globalTranslations:

       ! Mouse bindings: make all mouse buttons do the same thing.
       *drawingArea.translations:              #replace                        \
       <Btn1Down>:                     ArmLink()                       \n\
       <Btn2Down>:                     ArmLink()                       \n\
       <Btn3Down>:                     ArmLink()                       \n\
       ~Shift<Btn1Up>:                 ActivateLink()                  \
                                       DisarmLink()                    \n\
       ~Shift<Btn2Up>:                 ActivateLink()                  \
                                       DisarmLink()                    \n\
       ~Shift<Btn3Up>:                 ActivateLink()                  \
                                       DisarmLink()                    \n\
       Shift<Btn1Up>:                  ActivateLink()                  \
                                       DisarmLink()                    \n\
       Shift<Btn2Up>:                  ActivateLink()                  \
                                       DisarmLink()                    \n\
       Shift<Btn3Up>:                  ActivateLink()                  \
                                       DisarmLink()                    \n\
       <Btn1Motion>:                   DisarmLinkIfMoved()             \n\
       <Btn2Motion>:                   DisarmLinkIfMoved()             \n\
       <Btn3Motion>:                   DisarmLinkIfMoved()             \n\
       <Motion>:                       DescribeLink()                  \n\
       ______________________________________________________________________

  This file disables blink tags, drag-to-select, and some of the key
  board commands.  It also makes all mouse buttons do the same thing,
  hides the menu bar, and makes visited and unvisited links the same
  colour, so each visitor gets nice clean blue links, not ones that
  other people have been thumbing through and staining purple.

  You should replace the NETSCAPE_GEOMETRY in this file with an X
  geometry that looks like this: XxY+0-0, where X is the width of your
  screen and Y is the height of your screen + 32.  This will position
  the Netscape menu bar off the top of the screen, so the user won't be
  distracted.  For example, if your screen is 800x600, the geometry
  should be 800x632+0-0.

  6.  Make a .netscape directory for guest

  Enter

       mkdir /home/guest/.netscape
       chmod 777 /home/guest/.netscape

  to create guest's .netscape directory and make it world-writable.

  7.  Try it

  Log out, then log in as guest.

  8.  Changing preferences

  Since you won't be able to use the menu bar as guest, you should edit
  guest's preferences manually if you need to change them, or change
  your own preferences to what you want guest's to be and copy the
  preferences file.

  mini-HOWTO install qmail with MH
  Christopher Richardson (rdn@tara.n.eunet.de)
  v1.4, 5 March 1998

  I am just documenting my installation experiences to offer some help
  to other users who wish to use the above combination for their email.
  v1.4 - I have finally got a new Linux box running so I decided to
  update this mini-howto

  1.  Introduction

  My thanks to all netizens who have helped me, especially Tony Nugent
  (tony@trishul.sci.gu.edu.au), David Summers
  (david@summersoft.fay.ar.us) and S.u.S.E ( Linux distribution) who has
  made installing Linux so much easier, and the authors of the above
  excellent programs.

  What is qmail and why should I use it?  Here is the authors (Dan
  Bernstein) blurb:

  qmail is a secure, reliable, efficient, simple message transfer agent.
  It is meant as a replacement for the entire sendmail-binmail system on
  typical Internet-connected UNIX hosts.

  Secure: Security isn't just a goal, but an absolute requirement. Mail
  delivery is critical for users; it cannot be turned off, so it must be
  completely secure. (This is why I started writing qmail: I was sick of
  the security holes in sendmail and other MTAs.)

  Reliable: qmail's straight-paper-path philosophy guarantees that a
  message, once accepted into the system, will never be lost. qmail also
  supports maildir, a new, super-reliable user mailbox format. Maildirs,
  unlike mbox files and mh folders, won't be corrupted if the system
  crashes during delivery. Even better, not only can a user safely read
  his mail over NFS, but any number of NFS clients can deliver mail to
  him at the same time.

  Efficient: On a Pentium under BSD/OS, qmail can easily sustain 200000
  local messages per day---that's separate messages injected and
  delivered to mailboxes in a real test! Although remote deliveries are
  inherently limited by the slowness of DNS and SMTP, qmail overlaps 20
  simultaneous deliveries by default, so it zooms quickly through
  mailing lists. (This is why I finished qmail: I had to get a big
  mailing list set up.)

  Simple: qmail is vastly smaller than any other Internet MTA. Some
  reasons why: (1) Other MTAs have separate forwarding, aliasing, and
  mailing list mechanisms. qmail has one simple forwarding mechanism
  that lets users handle their own mailing lists. (2) Other MTAs offer a
  spectrum of delivery modes, from fast+unsafe to slow+queued. qmail-
  send is instantly triggered by new items in the queue, so the qmail
  system has just one delivery mode: fast+queued. (3) Other MTAs
  include, in effect, a specialized version of inetd that watches the
  load average.  qmail's design inherently limits the machine load, so
  qmail-smtpd can safely run from your system's inetd.

  Replacement for sendmail: qmail supports host and user masquerading,
  full host hiding, virtual domains, null clients, list-owner rewriting,
  relay control, double-bounce recording, arbitrary RFC 822 address
  lists, cross-host mailing list loop detection, per-recipient
  checkpointing, downed host backoffs, independent message retry
  schedules, etc. In short, it's up to speed on modern MTA features.
  qmail also includes a drop-in ``sendmail'' wrapper so that it will be
  used transparently by your current UAs.
  2.  My System Details

  SuSE Linux Distribution 5.1 with 2.0.33 kernal.

  PPP link to ISP

  3.  Qmail Installation

  Follow the INSTALL instructions exactly.

  Notes:

  Please take the time to read the Fine documentation  completely.  The
  numerals refer to the installation steps in the above INSTALL doc.

    2  - I had to set up the groups and users manually as per
     INSTALL.ids

    7  - ./qmail-makectl did not work on my system. I added my domain
     name (mickey.n.eunet.de) manually in /var/qmail/control/me

    23 - Make sure qmail-smtpd is spelt correctly in the inetd-conf
     file.  (I spelt it incorrectly i.e. qmail-smptd, which took me two
     days to find:( ) smtp  stream  tcp     nowait  qmaild
     /var/qmail/bin/tcp-env tcp-env /var/qmail/bin/qmail-smtpd

  3.1.  Maildir2smtp

  Dan Bernstein has provided a package for sending queued email to an
  ISP via dial-in. This package is available as serialmailxxx from his
  site.

  Install this package as described in the man page (Thanks Rupert
  Mazzucco (maz@pap.univie.ac.at), it works out of the box!

         maildir2smtp - blast a maildir across SMTP

         maildir2smtp is designed to pass messages along a SLIP  or
         PPP  link.  To set this up on the disconnected end, create
         a new maildir in alias:

            # maildirmake ~alias/pppdir
            # chown -R alias ~alias/pppdir

         Put

            :alias-ppp

         into control/virtualdomains and

            ./pppdir/

         into ~alias/.qmail-ppp-default.  Don't  forget  the  extra
         slash in pppdir/.  Then, in the PPP startup script, do

            maildir2smtp ~alias/pppdir alias-ppp- $IP `hostname`

         replacing  $IP with the remote IP address.

  Notes:

    Please read the Fine manual page completely.

    Maildir2smtp requires the dotted IP address of your mail server. If
     you do not have this then ping YourMail.host.country which will
     return the IP.

    This command can be included in your login script to flush all
     queued mail after logging in to your ISP.

  4.  MH Installation

  In addition to this, I also replaced /mh-6.8.4/mts/sendmail/smail.c
  with Dan Bernsteins mh-qmail-smail.c

  This is what my mh-6.8.4/conf/MH looks like:

  ______________________________________________________________________

  bin     /usr/bin/mh
  etc     /usr/lib/mh
  #mail
  #mandir /usr/man
  #manuals        standard
  chown   /bin/chown
  #cp     cp
  #ln     ln
  #remove mv -f
  cc      gcc
  ccoptions -traditional -O2 -m486 -D_NFILE='getdtablesize()'
            -DSIGEMT=SIGUSR1
  curses  -lncurses
  #ldoptions      -s
  #ldoptlibs
  lex     flex
  #oldload        off
  #ranlib on
  mts     sendmail
  #mf     off
  #bboards        off
  #bbdelivery     off
  #bbhome /usr/spool/bboards
  pop     on
  popdir  /usr/lib/mh
  sharedlib       sys5
  slflags -fPIC
  slibdir /usr/lib
  mailgroup       mail
  signal  void
  sprintf int
  #editor prompter
  #debug  off
  #regtest        off
  options ATHENA
  options BIND
  options DPOP
  options DUMB
  options FCNTL
  options MHE
  options MHRC
  options MIME
  options MORE='"/usr/bin/less"'
  options OVERHEAD
  options POP2
  options POPSERVICE='"pop3"'
  options RENAME
  options RPATHS
  options RPOP
  options SOCKETS
  options SVR4
  options SYS5
  options SYS5DIR
  options TERMINFO
  options UNISTD
  options VSPRINTF

  ______________________________________________________________________

  Notes:

    I have only compiled ``mts sendmail'' - read in comp.mail.mh
     somewhere that /smtp can cause problems. Dominic Mitchell
     (hdm@demon.net) wrote in comp.mail.mh (13 June 1997):

     ``Not quite. With this option MH still talks SMTP, just over a pipe
     and not over a network. You *really* need a line in your
     /.mh_profile which says:

     postproc: /usr/local/nmh/lib/spost

     Or whever it's kept on your system. This will pass the message
     directly to sendmail in the traditional manner. You're using qmail
     of course, so sendmail will be qmail's wrapper script, but that's
     just fine.'' Thanks Dominic.

    I have remmed out ``mail'' because I want to control it via
     mtstailor

  4.1.  mtstailor

  As qmail delivers mail to the home directory (~/Mailbox). I added the
  following to my mtstailor

       localname:      mickey
       localdomain:    n.eunet.de
       mmdfldir:
       mmdflfil:       Mailbox
       uucpldir:
       uucplfil:
       mmdelim1:       \001\001\001\001\n
       mmdelim2:       \001\001\001\001\n
       mmailid:        0
       umincproc:
       lockldir:
       sendmail:       /usr/lib/sendmail

  Notes:

    sendmail: /usr/lib/sendmail is a link to the qmail sendmail wrapper
     in /var/qmail/bin

    MH does not like the tilde notation (~/) use /home instead or leave
     blank which according to the docs defaults to $HOME.

    I recently installed MH and qmail on my office machine which is
     connect via ethernet. I added the following line to mtstailor:

     servers: mailserver.company.country

  4.2.  mh_profile

  Here is my .mh_profile

       Path: Mail
       draft-folder: drafts
       unseen-sequence: unseen
       AliasFile: /home/rdn/.mh_aliases
       send: -msgid
       comp: -form /home/rdn/.mymh-components
       MailDrop: /home/rdn/Mailbox

  Notes:

    I put in the MailDrop line to be ``sure to be sure''.

  5.  Fetchmail

  I decided to use fetchmail because I have a multiuser (my family :).
  Linux and fetchmail delivers mail to the smtp port where qmail takes
  over.

  Installation was no problem, multidrop works with the following
  .fetchmailrc :

       poll PersonalMail.Germany.EU.net
       protocol pop3
       username myname
       password mypassword
       # the next two lines do the trick for multidrop
       localdomains mydomain.de
       is * here
       # T2 of the fetchmail FAQ states that qmail needs this
       forcecr

  6.  Exmh

  This is my mailer by choice. I love it.

  There is one problem - most pre-compiled TCL/TK packages have the
  security option compiled in.  The following script .xserverrc.secure
  which came with SuSE solves this.

  ______________________________________________________________________

  #!/bin/sh

  #
  # move this file to ~/.xserverrc, if you don't want to allow everybody to
  # get access to your X-Server
  #
  if [ -x /usr/bin/keygen ]; then
      if [ ! -x /usr/bin/hostname -a ! -x /bin/hostname \
           -a ! -x /usr/bsd/hostname ];
      then
          echo "startx: can't get my hostname - exiting"
          exit 1
      else
          host=`hostname`
      fi

      xauth add $host:0 . `/usr/bin/keygen`
      sleep 2
      xauth add $host/"unix":0 . `/usr/bin/keygen`
      exec X :0 -auth .Xauthority $*
  else
      exec X :0 $*
  fi
  ______________________________________________________________________

  7.  Procmail

  The qmail FAQ gives this command:

  In  /.qmail add the line

       | preline procmail

  Version 3.11pre7 has changed the default mail box variable. It used to
  be in config.h. It is now in src/authenticate.c:

       #define MAILSPOOLHOME "/Mailbox"        /* watch the leading / */
                                               /* delivers to $HOME/Mailbox */

  I have culled from comp.mail.mh ans comp.mail.misc some hints on a
  .procmailrc file. Thanks to everyone!

  # A SAMPLE .PROCMAILRC FILE FOR NOVICES
  # Written by Catherine Hampton <ariel@best.com>
  # Version 1.1
  # Updated 1/25/98
  #
  # Released to the Public Domain.
  #
  #
  # SET VARIABLES

  # Internal Variables
  # the following have be modified by rdn 19980303

  # Everyone says that the SHELL environment is essential
  SHELL=/bin/sh               #Shell used to run procmail.  Be sure this points to
                              #your system's copy of sh.  DO NOT substitute a
                              #different shell unless you really know UNIX

  LINEBUF=4096                #Needed to keep Procmail from choking on long
                              #"recipes", or instructions on what to do with
                              #particular kinds of email.

  PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/mh:/usr/lib/mh:
                              #Path for your programs -- this is probably best
                              #left alone.

  VERBOSE=off                 #Change this to "on" when you try a new recipe
                              #so that Procmail will log literally every step
                              #it takes.  DO NOT LEAVE IT ON, though, because
                              #it creates huge logfiles.

  # Default Program & file locations

  MAILDIR=$HOME/Mail          #you'd better make sure this directory exists

  DEFAULT=$HOME/Mailbox         #default incoming mailbox for shell2-5 users
                              #on Best Internet.  Substitute the correct
                              #setting for your system.

  LOGFILE=$MAILDIR/procmail.log #Logs message disposition.  Recommended -- otherwise
                              #errors are emailed to you. :/

  FORMAIL=/usr/bin/formail        #useful for autoreply recipes.  If you
                                  #are not on Best Internet, modify this to
                                  #your system's copy of formail.

  SENDMAIL=/usr/sbin/sendmail    #useful for autoreply recipes.  If you are
                                 #not on Best Internet, modify this to point
                                 #to your system's copy of sendmail.

  Procmail is an excellently documented program. Read the man pages for
  examples on how to set up your .procmailrc file.

  8.  ISDN

  I am including this although this has nothing to do with qmail or mh.
  But without a PPP line to your ISP there is no email at all. I had
  quite a bit of bother to get my ISDN working. The SusE distribution
  includes a configuration for ISDN, but I wanted something simpler. The
  stuff here was adapted from Bernhard Hailer's scripts. (Vielen, vielen
  dank!)

  The following rc.config loads the necessary modules during
  initialisation:

       #!/bin/bash
       # This is adapted Bernhard Hailer's old script

       LOCAL_NUMBER="91311234"        # tel no. 091311234
       REMOTE_NUMBER="0911123456"     # ISP tel no.
       LOCAL_IP="192.168.0.99"        # I have dynamic IP so this will do
       REMOTE_IP="195.112.123.11"     # your ISP's gateway
       DEVICE="ippp0"

       SYSPATH="/sbin"
       ISDNCTRL="$SYSPATH/isdnctrl"

       case "$1" in
       start)
               # turn on isdn
               insmod /lib/modules/2.0.33/net/slhc.o
               insmod /lib/modules/2.0.33/misc/isdn.o
               sleep 1
               # load the hisax module
               insmod /lib/modules/2.0.33/misc/hisax.o
                                          id=Tel0 type=5 protocol=2 irq=10 io=0x300
               echo "starting isdn4linux"
               # global
               $ISDNCTRL verbose 0

               $ISDNCTRL addif $DEVICE         # create new interface
               $ISDNCTRL addphone $DEVICE in $REMOTE_NUMBER
               $ISDNCTRL addphone $DEVICE out $REMOTE_NUMBER
               $ISDNCTRL eaz $DEVICE $LOCAL_NUMBER
               $ISDNCTRL l2_prot $DEVICE hdlc
               $ISDNCTRL l3_prot $DEVICE trans
               $ISDNCTRL encap $DEVICE syncppp
               $ISDNCTRL huptimeout $DEVICE 300
               $ISDNCTRL chargehup  $DEVICE off
               $ISDNCTRL secure $DEVICE on

               $SYSPATH/ifconfig $DEVICE $LOCAL_IP pointopoint $REMOTE_IP metric 1
               $SYSPATH/route add default $DEVICE
               $SYSPATH/ipppd /dev/ippp0 file /etc/ppp/options.ipppd &
               $SYSPATH/route del default

               ;;
       stop)
               #turn off isdn
               rmmod hisax.o
               sleep 1
               rmmod isdn.o
               rmmod slhc.o
               echo "Shutting down isdn4linux"
               $ISDNCTRL delif ippp0
               ;;
       *)
               echo "Usage: $0 (start|stop)"
               exit 1
               ;;
       esac

  I use the following script to dial out, it is called simply isdn
  on|off

       #!/bin/bash
       # This is based on an old script from Bernhard Hailer

       IP_ADDRESS="195.112.123.11"

       case "$1" in
       on)

               echo "Calling ippp0"
               /sbin/isdnctrl dial ippp0
       # the sleep is important as it gives the PPP time to settle down
               echo "Sleep for 8s for PPP handshake"
               sleep 8s
               /sbin/route add default ippp0
               echo "line open - checking...."

       # check whether PPP negotiation was successful:
               set `ping -qc3 -i1 $IP_ADDRESS 2>/dev/null | grep transmitted`
               if [ $4 -gt 0 ];
               then
                       echo "succeeded."
                       echo "Starting fetchmail daemon"
                       /usr/bin/fetchmail -d 600 -k -v -a -L /var/log/fetchmail
                       echo "Flushing mail queue...."
                       /usr/local/bin/serialmail/maildir2smtp
                                   ~alias/pppdir alias-ppp- mail.server.ip.no `hostname`
               else
                       echo "failed!"
                       /sbin/isdnctrl hangup ippp0
               fi

       ;;

       off)
                       echo -n "Shutting down fetchmail daemon"
                       /usr/bin/fetchmail --quit

                       /sbin/isdnctrl hangup ippp0
                       /sbin/route del default         # and delete route
                       echo "You're off line"
       ;;

       *)
               echo -e "\aUsage:"
               echo "isdn on"
               echo "isdn off"
       ;;

       esac

  The next lot is the ipppd options file /etc/ppp/options.ipppd

  # Based on:
  # Klaus Franken, kfr@suse.de
  # Version: 27.08.97 (5.1)
  #
  # This file is copy by YaST from /etc/ppp/ioptions.YaST
  #   to options.<device>

  user "myuserid"

  # my system name (only for CHAP!)
  # name my_system_name

  # accept IP addresses from peer
  # use with dynamic IP
  ipcp-accept-local
  ipcp-accept-remote
  noipdefault

  # try to get IP address from interface
  # option specific to ipppd (as opposed to pppd)
  # use only with static IP
  #useifip

  # disable all header-compression
  -vj
  -vjccomp
  -ac
  -pc
  -bsdcomp

  # sometimes you need this:
  #noccp

  # max receive unit
  mru 1524
  # max transmit unit
  mtu 1500

  # If this machine is a server, force authentication by uncommenting one
  # of the following. However, if this machine is a client, doing this will
  # prevent a succesful connection! (message "peer refused to authenticate").
  # So, only uncomment on a server.
  # "+pap" / "+chap" NUR AKTIVIEREN, WENN DIES EIN SERVER IST!!!
  #+pap
  #+chap

  # if you have problems with handshaking (no response for first
  # lcp-package) try to decrease the retry-cycle. Default is 3 sec,
  # try for example 2 sec:
  # lcp-restart 2

  9.  Sources

  Required Packages:

  The net is so dynamic that it is pretty pointless to give sources.
  but for what it's worth:

    Find Qmail, setserial on http://www.qmail.org/

    Find MH on http://www.ics.uci.edu/~mh/

    Find glimpse on http://glimpse.cs.arizona.edu/

    Find Fetchmail on http://sagan.earthspace.net/~esr/fetchmail

    Find Exmh http://www.beedub.com/exmh

    Find Procmail ftp.informatik.rwth-aachen.de/pub/packages/promail

  10.  Disclaimers

  The usual no guarantees, no money back, use at your own risk.

  11.  Postscript

  Has anyone got mh working with Maildir? I have not tried - the
  principle of not fixing a running system. If you have got it working
  please mail me your instruction for inclusion in the next revision

  Quota mini-HOWTO
  Albert M.C. Tam bertie@scn.org
  v0.0, 8 August 1997

  Preamble: This document is copylefted by Albert M.C. Tam
  (bertie@scn.org).  Permission to use, copy, distribute this document
  for non-commerical purposes is hereby granted, provided that the
  author's / editor's name and this notice appear in all copies and/or
  supporting documents; that this document is not modified. This docu
  ment is distributed in hope that it will be useful, but WITHOUT ANY
  WARRANTY, either expressed or implied. While every effort has been
  taken to ensure the accuracy of the information documented herein, the
  author / editor / maintainer assumes NO RESPONSIBILITY for errors, or
  for damages results for the use of the information documented herein.
  This document describes how to enable file system quota on a Linux
  host, assigning quota for users and groups, as well as the usage of
  miscellaneous quota commands. It is intended for users running kernel
  2.x (recently tested on RedHat 4.1 running kernel 2.0.27). Users run
  ning older kernels may need to upgrade to a newer kernel version in
  order to take advantage of quota.  Feel free to send feedbacks or com
  ments to bertie@scn.org if you find an error, or if any information is
  missing. I appreciate it.

  1.  What is Quota?


  Quota allows you to specify limits on two aspects of disk storage: the
  number of inodes a user or a group of users may possess; and the
  number of disk blocks that may be allocated to a user or a group of
  users.

  The idea behind quota is that users are forced to stay under their
  disk comsumption limit, taking away their ability to comsume unlimited
  disk space on a system. Quota is handled on a per user, per file
  system basis. If there is more than one file system which a user is
  expected to create files, then quota must be set for each file system
  seperately.

  2.  Current Status of Quota on Linux


  Quota support has been integrated into kernel since version 1.3.8x I
  heard.  Now it is part of the 2.0 release of the Linux kernel. If your
  system doesn't support quota, I really recommend an upgrade.

  Currently, quota works for ext2 type file system only.

  3.  Requirements for Using Quota on Linux


  3.1.  Kernel


  The 2.x kernel source is available from

  ______________________________________________________________________
  http://sunsite.unc.edu/pub/Linux/kernel/v2.0
  ______________________________________________________________________



  3.2.  Quota software


  Depending on the Linux distribution you have, you may, or may not have
  the quota softwares installed on your system. If you don't, then
  download the quota software source from

  ______________________________________________________________________
  ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/subsystems/quota/all.tar.gz.
  ______________________________________________________________________



  4.  Quota Setup on Linux - Part I: The Configuration


  4.1.  Reconfigure your kernel


  Reconfigure your kernel and add quota support by typing y to:

  ______________________________________________________________________
  Quota support (CONFIG_QUOTA) [n] y
  ______________________________________________________________________



  4.2.  Compile and install the quota softwares


  The quota software source is available from

  ______________________________________________________________________
  ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/subsystems/quota/all.tar.gz
  ______________________________________________________________________



  4.3.  time Modify your system init script to check quota and turn
  quota on at boot


  Here's an example:

  ______________________________________________________________________
  # Check quota and then turn quota on.
  if [ -x /usr/sbin/quotacheck ]
          then
                 echo "Checking quotas. This may take some time."
                 /usr/sbin/quotacheck -avug
                 echo " Done."
          fi
           if [ -x /usr/sbin/quotaon ]
          then
                  echo "Turning on quota."
                  /usr/sbin/quotaon -avug
          fi
  ______________________________________________________________________



  The golden rule is that always turn quota on after your file systems
  in /etc/fstab have been mounted, otherwise quota will fail to work. I
  recommend turning quota on at the end of your system init script, or,
  if you like, right after the part where file systems are mounted in
  your system init script.

  4.4.  Modify /etc/fstab



  Partitions that you have not yet enabled quota normally look something
  like:

  ______________________________________________________________________
  /dev/hda1       /       ext2    defaults        1       1
  /dev/hda2       /usr    ext2    defaults        1       1
  ______________________________________________________________________



  To enable user quota support on a file system, add "usrquota" to the
  fourth field containing the word "defaults" (man fstab for details).

  ______________________________________________________________________
  /dev/hda1       /       ext2    defaults        1       1
  /dev/hda2       /usr    ext2    defaults,usrquota       1       1
  ______________________________________________________________________



  Replace "usrquota" with "grpquota", should you need group quota
  support on a file system.

  ______________________________________________________________________
  /dev/hda1       /       ext2    defaults        1       1
  /dev/hda2       /usr    ext2    defaults,grpquota       1       1
  ______________________________________________________________________



  Need both user quota and group quota support on a file system?

  ______________________________________________________________________
  /dev/hda1       /       ext2    defaults        1       1
  /dev/hda2       /usr    ext2    defaults,usrquota,grpquota       1   1
  ______________________________________________________________________



  4.5.  Create quota record "quota.user" and "quota.group"


  Both quota record files, quota.user and quota.group, should be owned
  by root, and read-write permission for root and none for anybody else.

  Login as root. Go to the root of the partition you wish to enable
  quota, then create quota.user and quota.group by doing:

  ______________________________________________________________________
  touch /partition/quota.user
  touch /partition/quota.group
  chmod 600 /partition/quota.user
  chmod 600 /partition/quota.group
  ______________________________________________________________________



  4.6.  Reboot


  Now reboot system for the changes you have made to take effect.

  Also note that subsequent partitions you wish to enable quota in the
  future only require step 4, 5, and 6.


  5.  Quota Setup on Linux - Part II: Assigning Quota for Users and
  Groups


  This operation is performed with the edquota command (man edquota for
  details).

  I would normally run quotacheck with the flags -avug to obtain the
  most updated filesystems usage prior to editing quota. This is just a
  personal habit, and not a required step however.

  5.1.  Assigning quota for a particular user


  Here's an example. I have a user with the login id bob on my system.
  The command "edquota -u bob" takes me into vi (or editor specified in
  my $EDITOR environment variable) to edit quota for user bob on each
  partition that has quota enabled:

  ______________________________________________________________________
  Quotas for user bob:
  /dev/hda2: blocks in use: 2594, limits (soft = 5000, hard = 6500)
           inodes in use: 356, limits (soft = 1000, hard = 1500)
  ______________________________________________________________________



  "blocks in use" is the total number of blocks (in kilobytes) a user
  has comsumed on a partition.

  "inodes in use" is the total number of files a user has on a
  partition.

  5.2.  Assigning quota for a particular group


  Now I have a group games on my system. "edquota -g games" takes me
  into the vi editor again to edit quota for the group games:

  ______________________________________________________________________
          Quotas for group games:
          /dev/hda4: blocks in use: 5799, limits (soft = 8000, hard = 10000)
                  inodes in use: 1454, limits (soft = 3000, hard = 4000)
  ______________________________________________________________________



  5.3.  Assigning quota for a bunch of users with the same value


  To rapidly set quotas for, say 100 users, on my system to the same
  value as my user bob, I would first edit bob's quota information by
  hand, then execute:

  ______________________________________________________________________
  edquota -p bob `awk -F: '$3 > 499 {print $1}' /etc/passwd`
  ______________________________________________________________________



  assuming that you are using csh, and that you assign your user UID's
  starting with 500.

  In addition to edquota, there are 3 terms which you should familiarize
  yourself with: Soft Limit, Hard Limit, and Grace Period.

  5.4.  Soft Limit


  _Soft limit_ indicates the maximum amount of disk usage a quota user
  has on a partition. When combined with grace period, it acts as the
  border line, which a quota user is issued warnings about his impending
  quota violation when passed.

  5.5.  Hard Limit


  Hard limit works only when grace period is set. It specifies the
  absolute limit on the disk usage, which a quota user can't go beyond
  his hard limit.

  5.6.  Grace Period


  Executed with the command "edquota -t", grace period is a time limit
  before the soft limit is enforced for a file system with quota
  enabled. Time units of sec(onds), min(utes), hour(s), day(s), week(s),
  and month(s) can be used.  This is what you'll see with the command
  "edquota -t":

  ______________________________________________________________________
  Time units may be: days, hours, minutes, or seconds
  Grace period before enforcing soft limits for users:
  /dev/hda2: block grace period: 0 days, file grace period: 0 days
  ______________________________________________________________________



  Change the 0 days part to any length of time you feel reasonable. I
  personally would choose 7 days (or 1 week).

  6.  Miscellaneous Quota Commands


  6.1.  Quotacheck


  Quotacheck is used to scan a file system for disk usages, and updates
  the quota record file "quota.user" to the most recent state. I
  recommend running quotacheck at system bootup, or via cronjob
  periodically (say, every week?).

  6.2.  Repquota


  Repquota produces a summarized quota information for a file system.
  Here is a sample output repquota gives:

  ______________________________________________________________________
  # repquota -a
                                  Block limits               File limits
          User            used    soft    hard  grace    used  soft  hard  grace
          root      --  175419       0       0          14679     0     0
          bin       --   18000       0       0            735     0     0
          uucp      --     729       0       0             23     0     0
          man       --      57       0       0             10     0     0
          user1     --   13046   15360   19200            806  1500  2250
          user2     --    2838    5120    6400            377  1000  1500
  ______________________________________________________________________



  6.3.  Quotaon and Quotaoff


  Quotaon is used to turn on quota accouting; quotaoff to turn it off.
  Actually both files are similar. They are executed at system startup
  and shutdown.

  The RCS MINI-HOWTO
  Robert Kiesling
  v1.4, 14 August 1997

  This document covers basic installation and usage of RCS, the GNU
  Revision Control System, under Linux.  It also covers the installation
  of the diff(1) and diff3(1) utilities, which are necessary for RCS to
  operate.  This document may be reproduced freely, in whole or in part,
  provided that any usage of this document conforms to the general copy
  right notice of the HOWTO series of the Linux Documentation Project.
  See the file COPYRIGHT for details.  Send all complaints, suggestions,
  errata, and any miscellany to kiesling@terracom.net, so I can keep
  this document as complete and up to date as possible.
  ______________________________________________________________________

  Table of Contents


  1. Overview of RCS.

  2. System requirements.

  3. Compiling RCS from Source.

  4. Creating and maintaining archives.

  5. (TT

  6. Revision histories.

  7. Including RCS data in working files.

  8. RCS and

  ______________________________________________________________________

  1.  Overview of RCS.

  RCS, the revision control system, is a suite of programs that tracks
  changes in text files and controls shared access to files in work
  group situations.  It is generally used to maintain source code
  modules.  It lends itself to tracking revisions of document files as
  well.

  RCS was written by Walter F. Tichy and Paul Eggert.  The latest
  version which has been ported to Linux is RCS Version 5.7.  There is
  also a semi-official, threaded version available.  Much of the
  information in this HOWTO is taken from the RCS man pages.

  RCS includes the rcs(1) program, which controls RCS archive file
  attributes, ci(1) and co(1), which check files in and out of RCS
  archives, ident(1), which searches RCS archives by keyword
  identifiers, rcsclean(1), a program to clean up files that are not
  being worked on or haven't changed, rcsdiff(1), which runs diff(1) to
  compare the revisions, rcsmerge(1), which merges two RCS branches into
  a single working file, and rlog(1), which prints RCS log messages.

  Files archived by RCS may be text of any format, or binary if the diff
  program used to generate change files handles 8-bit data.  Files may
  optionally include identification strings to aid in tracking by
  ident(1).  RCS uses the utilities diff(1) and diff3(3) to generate the
  change files between revisions.  A RCS archive consists of the initial
  revision of a file, which is version 1.1, and a series of change
  files, one for each revision.  Each time a file is checked out of an
  archive with co(1), edited, and checked back into the archive with
  ci(1), the version number is increased, for example, to 1.2, 1.3, 1.4,
  and so on for successive revisions.

  The archives themselves commonly reside in a ./RCS subdirectory,
  although RCS has other options for archive storage.

  For an overview of RCS, see the rcsintro(1) manual page.

  2.  System requirements.

  RCS needs diff(1) and diff3(3) to generate the context diff files
  between revisions.  The diff utilities suite needs to be installed on
  your system, and when you install RCS, the software will check for its
  presence.

  Precompiled diffutils binaries are available at:

  ftp://sunsite.unc.edu/pub/Linux/utils/text/diffutils-2.6.bin.ELF.tar.gz


  and its mirror sites.  If you need to compile diff(1), et al., from
  source, it is located at:

  ftp://prep.ai.mit.edu/pub/gnu/diffutils-2.7.tar.gz


  and its mirror sites.

  You will also need to have the ELF libraries installed on your system
  if you want to install pre-built binaries.  See the ELF-HOWTO for
  further details.

  3.  Compiling RCS from Source.

  Get the source distribution of RCS Version 5.7.  It is available at

  ftp://sunsite.unc.edu/pub/Linux/devel/vc/rcs-5.7.src.tar.gz


  and its mirrors. After you have unpacked the archive into your source
  tree, you need to configure RCS for your system.  This is done via the
  configure script in the source directory, which you need to execute
  first.  This will generate a Makefile and the appropriate conf.sh for
  your system.  You can then type

  make install


  which will build the binaries.  At some point you may need to su to
  root so the binaries can be installed in the correct directories.

  4.  Creating and maintaining archives.

  The program rcs(1) does the work or creating archives and modifying
  their attributes.  A summary of rcs(1) options may be found in the
  rcs(1) manual page.

  The easiest way to create an archive is first to mkdir RCS in the
  current directory, then initialize the archive with the
  rcs -i name_of_work_file


  command.  This creates and archive with the name
  ./RCS/name_of_work_file,v and requests a text message describing the
  archive, but it does not deposit any revisions in the archive.  You
  can turn on or off strict archive locking with the commands

  rcs -L name_of_work_file


  and

  rcs -U name_of_work_file


  respectively.  There are other options for controlling access to the
  archive, setting its format, and setting revision numbers, which are
  covered in the rcs(1) manual page.

  5.  ci(1)  and co(1) .

  ci(1) and co(1) are the commands used to check files in and out of
  their RCS archives.  The ci(1) command may also be used to a check a
  file both in and out of an archive.  In their simplest forms, ci(1)
  and co(1) take only the name of the working file.

  ci name_of_work_file


  and

  co name_of_work_file


  The command form

  ci -l name_of_work_file


  checks in the file with locking enabled, and

  co -l name_of_work_file


  is performed automatically. That is, ci -l checks the file out again
  with locking enabled.

  ci -u name_of_work_file


  checks the file into the archive, and checks it out again with locking
  disabled.  In all cases, the user is prompted for a log message.

  ci(1) will also create a RCS archive if one does not exist already.

  If you don't specify a revision, ci(1) increments the version number
  of the last revision locked in the archive, and appends the revised
  working file to it.  If you specify a revision on an existing branch,
  it must be higher than the existing revision numbers.  ci(1) will also
  create a new branch if you specify the revision of a branch which does
  not exist.  See the ci(1) and co(1) man pages for details.


  ci(1) and co(1) have various options for interactive and non-
  interactive use.  Again, see the ci(1) and co(1) man pages for
  details.


  6.  Revision histories.

  The rlog(1) program provides information about the archive file and
  the logs of each revision stored in it.  A command like

  rlog work_file_name


  will print the version history of the file, each revision's creation
  date and userids of author and the person who locked the file.  You
  can specify archive attributes and revision parameters to view.

  7.  Including RCS data in working files.

  co(1) maintains a list of keywords of the RCS database which are
  expanded when the working file is checked out.  The keyword $Id$ in a
  document will expand to a string which contains the file name,
  revision number, the date checked out, the author, the revision
  status, and the locker, if any.  Including the keyword $Log$ will
  expand to the document's revision history log.

  These and other keywords may be used as search criteria of the RCS
  archive.  See the ident(1) man page for further details.


  8.  RCS and emacs(1)  Version Control.

  The Version Control facility of emacs(1) works as a front end to RCS.
  This information applies specifically to Version 19.34 of GNU Emacs,
  which is provided with the major Linux distributions.  When editing a
  file with emacs(1) which is registered with RCS, the command vc-
  toggle-read-only (bound to C-x C-q by default) will check a file in to
  the emacs's Version Control, and then into RCS.  Emacs will open a
  buffer where you can type a log message to be included in the RCS log.
  When you are finished typing a log entry, type C-c C-c to terminate
  your input and proceed with the check-in process.

  If you have selected strict locking for the file with RCS, you must
  re-lock the file for editing by emacs(1).  You can check the file out
  for emacs's Version Control with the command % in buffer-menu mode.

  For more information, see the GNU Emacs Manual and the Emacs info
  pages.

$Author: tbynum $
$Date: 1999/12/06 00:57:59 $

The mini directory contains mini-HOWTOs - shorter free-form HOWTOs on
specific subjects in plain text.

Linux-mini-HOWTOs.tar.gz is a tar file of all the mini-HOWTOs.

The HOWTO-INDEX provides an overview and index of the HOWTOs.
See COPYRIGHT for a description of the HOWTO copyright license.

You can also browse the HOWTOs at the URL:
                http://metalab.unc.edu/LDP/HOWTO/

Please contact Tim Bynum (the HOWTO coordinator) via email at
<linux-howto@metalab.unc.edu>, with any questions or comments.
  RPM+Slackware Mini-Howto
  Dave Whitinger, dave@whitinger.net
  v1.3, 13 April 1998

  This document describes how to get RPM installed and working properly
  under Slackware.  The information contained herein, however, is proba-
  bly applicable to any Linux distribution.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Obtaining the software

  3. Installing the software

  4. Bugs (Important!)

  5. Acknowledgements

  6. Copyright

  ______________________________________________________________________

  1.  Introduction


  RPM is the "Red Hat Package Manager" and is the heart of the Red Hat
  Linux distribution.  It's most basic functionality is to install and
  de-install packages.

  This document is geared toward installing RPM on a slackware system
  using an Intel processor, but the information contained herein should
  be applicable to any distribution.

  The latest version of this HOWTO is always available at
  <http://www.threepoint.com/HOWTO/RPM+Slackware.html>

  For further reading, consult the RPM-HOWTO (available at your
  neighborhood LDP mirror).  Also, consider buying a copy of the
  excellent book, Maximum RPM, by Ed Bailey of Red Hat Software, Inc.


  2.  Obtaining the software


  The newest release of RPM is always available from:

       ftp.rpm.org/pub/rpm/dist/latest

  As of this writing, the latest version was

       rpm-2.4.12-1.i386.tar.gz


  Notice the .i386 section.  This means that it is a binary package for
  the Intel architecture, ready to untar and run.  Make sure that the
  file you download has the i386 in the filename, otherwise the
  following instructions will not work.


  3.  Installing the software


  The easiest way to install RPM is to use Slackware's native package
  manager.

  You must be root to install RPM.

               installpkg /home/dave/rpm-2.4.12-1.i386.tar.gz

  Of course, replace the /home/dave with the correct path for the
  filename.

  (NOTE!) If that fails, simply untar the file with these commands:

               cd / ; tar zxvpf /home/dave/rpm-2.4.12-1.i386.tar.gz

  Next, you have to create a directory called "rpm" under the /var/lib
  tree.

  mkdir /var/lib/rpm

  Now type 'rpm --initdb' to initialize the rpm database.

  If everything has gone correctly up to this point, you will have a
  rpm-capable system!  Test it out by grabbing any rpm file and
  installing it with 'rpm -Uvh filename.rpm'


  4.  Bugs (Important!)

  Be aware that on several versions of RPM, the tar file has been
  created using incorrect permissions.  As soon as you install RPM,
  check your permissions of various directories (/bin, /usr, etc).  If
  the permissions are of 700 (drwx------), then you have been infected
  by the bug.

  To fix these permissions problems, run this shell script:

  ______________________________________________________________________
  #!/bin/sh

  chmod 755 /bin
  chmod 755 /usr
  chmod 755 /usr/bin
  chmod 755 /usr/doc
  chmod 755 /usr/lib
  chmod 755 /usr/man
  chmod 755 /usr/man/man8
  chmod 755 /usr/share
  chmod 755 /usr/share/locale
  chmod 755 /usr/share/locale/de
  chmod 755 /usr/share/locale/de/LC_MESSAGES
  chmod 755 /usr/share/locale/pt-br
  chmod 755 /usr/share/locale/pt-br/LC_MESSAGES
  chmod 755 /usr/share/locale/sv
  chmod 755 /usr/share/locale/sv/LC_MESSAGES
  chmod 755 /usr/src
  ______________________________________________________________________

  Feel free to E-Mail me if you have any questions about this.


  5.  Acknowledgements

  I recognize Red Hat Software, Inc. and Patrick Volkerding for their
  fine Linux distributions.

  Thanks to Milan Kopacka (mkop5230@ss1000.ms.mff.cuni.cz) for bringing
  to my attention a better way to install RPM (installpkg).


  6.  Copyright


  This HOWTO is copyright 1998 by Dave Whitinger, and is a free
  document.  You can redistribute it and/or modify it under the terms of
  the GNU General Public License as published by the Free Software
  Foundation; either version 2 of the License, or any later version.

  Linux Remote-Boot mini-HOWTO:      Configuring Remote-Boot
  Workstations         with Linux, DOS, Windows 95/98 and Win
  dows NT
  Marc Vuilleumier Stckelberg, David Clerc
  v3.19, February 1999

  This document describes how to set up a very robust and secure server-
  based configuration for a cluster of PCs, allowing each client to
  choose at boot-time which operating system to run. The key of this
  configuration is a bootprom based program, which let the user choose
  at boot time one of several boot images. This configuration is appli
  cable using InCom TCP/IP Bootprom (add-on for most network cards) or
  any PXE-compliant Boot ROM (ready-to-use in most recent PC with built-
  in network cards).  The most up-to-date version of this document, with
  hypertext links to downloadable software and other related materials,
  can be found at the address http://cuiwww.unige.ch/info/pc/remote-
  boot/howto.html.  Linuxdoc-SGML, DVI and PostScript versions are
  available in the same directory.  If you are interested in getting
  info on further developpments, send an E-mail to
  David.Clerc@cui.unige.ch.
  ______________________________________________________________________

  Table of Contents

  1. Disclaimer and Copyrights

  2. What has changed...

     2.1 ...since version 2.x ?
     2.2 ...since version 3.0 ?

  3. Introduction

     3.1 Boot ROM and Hard-disk
     3.2 The Network
     3.3 How it Works
     3.4 Related non-commercial documentations

  4. The Configuration How-To

     4.1 Server-side configuration
        4.1.1 Setting up DHCP
        4.1.2 Setting up a Proxy DHCP
        4.1.3 Setting up TFTP
     4.2 Client-side configuration
     4.3 Setting Up the Boot Process
        4.3.1 Discovering BpBatch
     4.4 Setting Up Linux
        4.4.1 Configuring the Client
        4.4.2 Testing the Configuration
        4.4.3 Building the Disk Image
        4.4.4 System Maintenance and Upgrades
     4.5 Setting up DOS 6 and Windows 3.1
        4.5.1 Building the Disk Image
        4.5.2 Adapting the configuration for other machines
        4.5.3 System Maintenance and Upgrades
     4.6 Setting up Windows 95
        4.6.1 Setting up a Stand-Alone Client
        4.6.2 Building the Disk Image
        4.6.3 Adapting the configuration for other Machines
        4.6.4 System Maintenance and Upgrades
     4.7 Setting up Windows NT
        4.7.1 Building the Disk Image
        4.7.2 System Maintenance and Upgrades
     4.8 Troubleshooting (FAQ)

  5. Remote-Boot Tools Reference Manual

     5.1 BpBatch, MrBatch and MrZip
        5.1.1 Command Line Arguments
        5.1.2 Syntax rules
        5.1.3 The Cache Filesystem
        5.1.4 Special variables
        5.1.5 Monitoring commands
        5.1.6 Control commands
        5.1.7 Keyboard-related commands
        5.1.8 Text output commands
        5.1.9 Graphics output commands
        5.1.10 Security-related commands
        5.1.11 Disk-related commands
        5.1.12 Boot commands
        5.1.13 National language support
        5.1.14 Commands specific to MrZip
     5.2 NoBreak.sys

  6. Special TFTP Servers

     6.1 Incom Enhanced TFTP Server
     6.2 Linux Enhanced TFTP Server
     6.3 The Security Gateway
     6.4 The Broadcast TFTP Server


  ______________________________________________________________________

  1.  Disclaimer and Copyrights

  This document and the related software are provided as is to the Linux
  and Internet community, with no form of warranty. Please note that
  some operations related in this document may destroy the content of
  your hard-disk. We assume no liability for any use, correct or not, of
  this document and of the related software.

  You are free to do anything you want with the remote-boot tools as
  long as you do not make money by selling them or by distributing them
  with a commercial product. If you want to commercialize a product
  derived from these tools, please contact the authors first to make a
  commercial agreement. These remote-boot tools will remain available
  for free forever, but we may authorize derived commercial tools.

  These provisions shall be interpreted under and in accordance with the
  laws of Switzerland, canton of Geneva. All disputes, defenses,
  controversies or claims arrising in conncetion with this document and
  the related software, shall be subject to the exclusive juridiction of
  the courts of the canton of Geneva, Switzerland.

  If you like this program, you can send us a Postcard and/or make a
  gift to the International Committee of the Red Cross (ICRC) or to the
  UNICEF.


  2.  What has changed...


  2.1.  ...since version 2.x ?

  To say it frankly, almost everything. The underlying concepts are the
  same, but the software part has been completly redesigned to overcome
  the limitations of previous versions and to make it easier to use. An
  highlight of the new features :

    All functions (bpmenu, bpclean, bpunzip) are encompassed in a
     single program.

    The program can run not only from the boot rom, but also under DOS,
     Windows 95 and Linux.

    The program can now restore images of FAT16, FAT32 and EXT2FS
     partitions. If someone want to write NTFS support, let me know...
     For now, NT users still have to stick to FAT16.

    The program can not only restore disk images but also add and patch
     individual files in order to customize the client behaviour.

    Disk images are not any more bound to 87 MB. They are now file-
     system independant archives.

    We provide a mean for automatically downloading a disk image to an
     arbitrary big number of clients at the same time (broadcast).

    You can now write your own secure boot script, that will determine
     the behaviour of the machine before the real boot.

    You can now boot any Linux kernel, without applying any patch. Its
     is also possible to provide a command line and a ramdisk image.

    You can authenticate users at boot time using a Unix, NT or Radius
     server and deny them any access to the machine.

    Full national language support is included.

    And many, many other new features...


     Is there a program for converting old archives to the new format ?
        No, because the internal format is radically different. But you
        can easily do the conversion by yourself:

        1. Boot an old image (unzip it to your disk)

        2. Remove calls to the old unzipreg utility and replace them by
           the adequate patch commands (it is very easy, see the
           detailed instructions below)

        3. Run the new mrzip program to create a new-style disk image

  2.2.  ...since version 3.0 ?

  Version 3.0 was the beta-release. A dozen of sites around the world
  have tested it during a month and given much of their time to help us
  finding bugs and to suggest enhancements. Thanks to all of them for
  their patience, and in particular to Maciek Uhlig, Dick Velders and
  Jeff Teeters.

  A few minor features have been added since 3.01, such as support for
  diskless Linux boot (by disabling the cache).

  Version 3.10 introduced compatibility with Intel's Wired for
  Management 1.1a NetPC standard. The tools now work with any PXE-
  compliant boot ROM (as are most on-board boot ROMs) available today.
  Thanks to InCom GmbH for giving us the PXE bootprom that permitted
  this developpment. We also succesfully tested the tools with the PXE
  Boot ROM that I found incidentally in my Dell computer with onboard
  network card (called LanDesk Service Agent).

  Version 3.11 to 3.12 added UNIX server-side tools (a PXE Proxy DHCP
  server for Solaris and Linux, and an enhanced TFTP server for Linux),
  as well as detailled informations on server-side setup and the PXE
  booting process.

  Version 3.13 added Advanced Power Management support (PowerOff
  command).

  Version 3.14 added minor enhancements and some corrections. We fixed a
  problem with the terminal under RedHat 5.1, and another problem in the
  syntax of the "if" command. We added some features suggested by the
  Laboratori de Clcul de la Facultat d'Informtica de Barcelona (LCFIB)
  :

    A new APM variable let you know if your system support the Advanced
     Power Management (i.e it supports the poweroff command).

    A "beep" command.

    A new parameter to DrawWindow, to include a title at the window
     creation. You can now do DrawWindow 200 200 400 200 "Title".

  Version 3.15 added full VESA support. BpBatch now support several
  video modes, to accomodate old computers not being able to display
  800x600 graphics. A new parameter has been added to InitGraph to
  specify the video mode, and a list of detected video mode can be
  retrieved from the new VESA-Modes variable.
  Version 3.16 fixes the following bugs:

    "Malloc failed" during the Fullunzip process of a multiple
     fragments image.  Many thanks to Christian Meyer for his
     collaboration.

    A bug which prevented the linux version of MrBatch to properly
     fullunzip images. This bug was located in the low-level functions
     of MrBatch, so it may fix other problems encountered in the linux
     version of MrBatch.  Many thanks to Jeff Teeters for his
     collaboration.

    An error in the codepage translation tables. This bug was found by
     the Laboratori de Clcul de la Facultat d'Informtica de Barcelona
     (LCFIB).  You can find the bug report in the BpBatch forum.

  Version 3.17 adds some minor features and fixes bugs:

    Fullunzip was turning Extended Memory off

    Booting on the RedHat boot disk now works

    When extracting images with a large number of directories, the
     resulting FAT file system was corrupted.

    We added retries to text TFTP transfers. BpBatch will now retry
     three times before saying "Could not transfer the file".

    Timestamps are now correctly updated in FAT. (thank to Francis
     Chan)

  Version 3.18 fixes a bug with the IncrUnzip function. Thanks to Gary
  Pike for its collaboration.

  Version 3.19 fixed a bug in the error handling of the delete command
  on ext2fs, as well as the inappropriate handling of names starting
  with A: under Linux. The following new features were also added:

    A new if valid disk:partition syntax can be used to check if a
     partition has been formatted

    FAT32 disk images are now fully functional (they now boot properly)

    Linux EXT2 partitions bigger than 2 GB are now supported

    Linux Swap partitions bigger than 128 MB are now supported (this
     feature needs a recent kernel, at least 2.1.x)

    FullUnzip is now also possible without a cache partition, by
     setting CacheNever to "ON". This might be usefull for a unique
     installation, but is not recommended in general is it results in a
     high network load.

     Thanks to Ruben Schattevoy for its help and contributions to this
     release.


  3.  Introduction

  The configuration described here was developped since Summer 1996 at
  the CUI, University of Geneva. The Computer Science Department uses
  several servers and a number of PCs, which fall into two classes:

    computers devoted to students


    computers devoted to research and teaching assistants

     We developped the current configuration with the following aims:

    Every computer should be able to run under Linux, DOS, Windows 3.1,
     Windows 95 or Windows NT. One should be able to choose the desired
     operating system for each session.

    All softwares, including operating systems, should be take from the
     server, in order to facilitate the installations and upgrades.

    Clients computers should be able to run without any write-access on
     the server (for security reasons), except for their home directory.

    Client-side configuration should be reduced to its very minimum.
     Clients should automatically get their IP configuration parameters
     from the server, and this information should be located in a single
     file, used for all operating systems.

    Since almost every computer now has a hard-disk, clients should be
     able to take profit of it for reducing network load and as
     temporary storage space for the user.

    Users must have a login to be able to use any of the computers.

    The login should be the same for all operating system and should
     let the user access its unique home directory, common to all
     operating systems.

    Student (and secretary :-) computers should be fully cleaned up at
     each start. That is, the PC should always look like if it were just
     installed.

    Every computer has to be protected from virus attacks.

     These constraints lead us to base our configuration on bootprom
     tools. We first developped new tools for the excellent TCP/IP
     Bootprom from InCom GmbH.  Now that a standard for preboot
     execution environments as finally emerged, we ported the tools so
     that it now also works for any PXE-compliant bootprom. PXE boot
     roms, also called LanDesk Service Agent, are now distributed with
     almost all on-board network adapter.  For more info on PXE and
     Intel Wired for Management standard in general, read from
     http://www.intel.com/managedpc.


  3.1.  Boot ROM and Hard-disk

  Bootproms exist for quite a long time, but until recently, they were
  solely used with diskless computers. Since 1996, this How-to has been
  claiming that bootproms are even more interesting for computers which
  have a local harddisk, since they allow to take profit of both sides:

    A boot rom make the configurations more robust, since it ensure
     that the computer will always boot the same way, no matter any
     virus or partition table crash. It can be used, as we did, to
     cleanup the harddisk even before the operating system is loaded.

    A local harddisk make the configuration more efficient, since it
     can reduce the network trafic through caching, and allows for
     efficient swap.

     Today, we have the pleasure to see that all computer manufacturers
     have come to the same point and provide boot roms as part of new
     computer standards.

  Note that you can still use the tools described below in an old
  fashioned way, that is as a simple kernel/ramdisk loader, even for
  diskless computers. However, we do not encourage this use.


  3.2.  The Network

  The University of Geneva owns a class B domain, subdivided into
  several subnets. The CUI uses four subnets, among them one is
  dedicated to students.

  Originally, our PCs were concerned about two network protocols: IPX
  and IP.  On the IPX side, we used a single Novell Netware 3 server for
  sharing software and users files for DOS and Windows. On the IP side,
  we used a SUN server for sharing software and users partitions for
  Linux, with NFS.

  In our latest configuration, we do not any more use IPX. There is a
  single Unix server (which could be Linux as well as a SUN), sharing
  software and user files using NFS for Linux clients and using SMB
  (NetBIOS) over TCP/IP for Dos and Windows clients. In this way, we
  have a single home directory used by all operating systems.


  3.3.  How it Works


  1. When a client PC is turned on, it first performs the traditional
     system checks before the TCP/IP Bootprom or PXE Boot ROM takes the
     control.

  2. The bootprom issues a BOOTP/DHCP request in order to get its IP
     configuration parameters.

  3. If the server knows the PC issuing the request, it will send back a
     BOOTP/DHCP reply with informations such as the client's IP address,
     the default gateway, and which bootdisk image to use.

  4. In case of a PXE boot ROM, there might be some more exchanges
     between the client and the server to determine installation
     parameters.

  5. The bootprom then downloads the boot image from the server using
     the TFTP protocol. The boot image happens to be a small program
     called bpbatch, our boot-time batch file interpreter.

  6. The batch interpreter is started. At this time, it is almost alone
     in the computer memory. There is no operating system loaded, except
     the preboot execution environment (offered by the Boot ROM).

  7. The batch interpreter look in the BOOTP/DHCP reply for command-line
     options, and in particular for the name of the batch to execute.

  8. According to the instructions in the batch file, it will for
     instance:

     a. Load a national keyboard mapping

     b. Authenticate the user according to a remote server (Unix, Radius
        or Windows NT)

     c. Let the user choose between the available operating systems

     d. According to the operating system choosen, repartition the hard-
        disk and quick-format some partitions

     e. Check if an up-to-date compressed image of the selected OS is
        present at the end of the disk. If not, it download it using
        TFTP

     f. Uncompress the selected OS to the main partition

     g. If the selected OS is Linux, load a kernel and start it

     h. If the selected OS is DOS or Windows, simply let the computer
        boot on its fresh new hard-disk

     For DOS and Windows 3.1, we use the freely available Microsoft Lan
     Manager for DOS (search the network for the mirror nearest to you;
     the distribution consists of three files named disk1 to disk4) as
     SMB client. Microsoft LanManager supports dynamic configuration
     using DHCP. After logging in, the user is faced to DOS, and can
     start Windows 3.1 by typing the traditional win command. Note that
     at this point, DOS and Windows 3.1 appear to be installed locally.

     For Windows 95 and Windows NT, we also use Microsoft SMB client
     (called Client for the Microsoft Network), that supports dynamic
     configuration using DHCP. We reduce network load using Shared LAN
     Cache, a nice and powerful network-to-disk cache program.

     Students computers can be turned off the hard way at any time with
     out risks, since the hard disk is reinitialized at each start.

  For "safe" computers (ie. for assistants computers), once the computer
  has been booted once using the above described system, the boot script
  simply redirect the boot to the local hard-disk, without cleaning it
  again. This allow users to leave data on their local hard disk. But
  whenever the configuration gets corrupted, the user can simply choose
  from the boot menu in order to have a fresh installation.


  3.4.  Related non-commercial documentations

  This configuration has been successfully reproduced at several places
  around the world. A few people have written some hints and tricks that
  complement this How-To. If you did so and that your page is not
  already referenced in this documentation, please send an e-mail to
  Marc.VuilleumierStuckelberg@cui.unige.ch.  And if you experience
  problems while reproducing this configuration, have a look at these
  pages !

    http://www.br.fgov.be/RESEARCH/INFORMATICS/info/bootp.html, by
     Alain Empain of the Belgium National Botanic Garden.  Many useful
     sample scripts, and a nice PERL program to automatically generate
     graphic menus and corresponding HTML documentation from a higher
     level description.

    http://www.katedral.se/system/elevsyst, by Johan Carlstedt of The
     Cathedral School of Uppsala, Sweden.  At this day, the
     configuration described at this place is still based on the
     previous version of the remote-boot tools. However, almost
     everything remains applicable, given a few changes.

    http://vitoria.upf.tche.br/~fred/, in portuguese, by Frederico
     Goldschmidt of the Passo Fundo University, Brasil.

    http://www.etse.urv.es/~larinyo, in spanish, by  Lluis Arino, of
     the Escola Tecnica Superio d'Enginyeria, Spain.

  You can also send me your BpBatch script if you want me to include it
  in the sample scripts collection.

  4.  The Configuration How-To

  First, arrange to have the following two machines within arm's reach:

    the server, usually a Unix or Windows NT machine

    the client, a PC with a bootprom enabled, and nothing valuable on
     the hard disk.

     If you want to test the configuration but you do not yet have a
     bootprom, you can download the TCP/IP BootProm demo diskette from
     InCom GmbH at http://www.incom.de.  This diskette will make your
     computer behave like if it had a TCP/IP Bootprom plugged in.

  If you already have a Boot ROM, you need to enable it. If you are
  using Incom TCP/IP Bootprom, you can do that using a special program
  from your network card manufacturer. If you have a PXE Bootprom, you
  can do it simply from BIOS setup, by changing the default boot device.

  For student computers, we configured the boot on network first, and
  disabled hard-disk and floppy-disk boot. For assistant computers, we
  also configured network-boot first, but we allow hard-disk and floppy-
  disk boot.


  4.1.  Server-side configuration

  On the server, you will need the following services:

  1. A BOOTP/DHCP server

  2. May be a Proxy DHCP server

  3. A TFTP server

     Note for PXE Boot ROM users: We found after severals hours of
     tedious search that PXE Boot ROMs with version before 0.99 do not
     follow the IP protocol and discard all packets that have the Don't
     Fragment (DF) flag set.  That means, you will have to disable Path
     MTU Discovery on the server, or the Boot ROM will not see any of
     its packets. On Solaris, use ndd /dev/ip ip_path_mtu_discovery to
     see if you have it enabled and ndd -set /dev/ip
     ip_path_mtu_discovery 0 to disable it.  However, this fix only
     works for non-broadcast packets (ask SUN why...).  That means, it
     will work for TFTP but not for DHCP :-(. Intel has recently fixed
     this bug, and if you bought your computer after June 1998, you
     surely have a corrected PXE implementation.


  4.1.1.  Setting up DHCP

  The role of the DHCP server is to give to the client an IP address and
  to make it load the file named bpbatch.P from the TFTP server.  DHCP
  is a superprotocol over BOOTP. If you are using InCom TCP/IP Bootprom,
  you may live without DHCP (using an old BOOTP server).

  On Windows NT, you will probably use the native DHCP server.  If you
  are using InCom TCP/IP Bootprom, you will have to use a special trick
  to specify the boot file name (get more info from InCom WWW site). If
  you are using a PXE Bootrom, you will need a Proxy DHCP server, but no
  other trick is needed as the boot file name will be provided by the
  Proxy DHCP server.

  On Linux, the best choice is the standard DHCP server from the
  Internet Software Consortium. If you are using a PXE Bootrom, in
  addition to the usual options, you will need to add the following
  ones:

    option dhcp-class-identifier "PXEClient"

    option vendor-encapsulated-options ff;

  On Solaris, you can either use the Internet Software Consortium DHCP
  server (available on the Web), or use Solaris DHCP server (available
  since Solaris 2.5). However, as Solaris DHCP server does not seems to
  be able to insert a client class identifier in its DHCP offer, you
  must install a Proxy DHCP server. Morever, this Proxy DHCP server must
  reside on another computer since Solaris DHCP server locks the DHCP
  port.

  We suggest giving infinite lease time for remote-boot clients.  Don't
  forget that BOOTP/DHCP requests are bounded by subnets. If the client
  and the server do not reside on the same subnet, you should install a
  BOOTP/DHCP Relay agent on any computer between the two.  For now, just
  assume that both machines are on the same subnet.


  4.1.2.  Setting up a Proxy DHCP

  The role of the Proxy DHCP server is to overcome limitions of some
  DHCP servers and to provide PXE specific extensions. A proxy DHCP
  server only makes sense for a PXE Boot rom.

  As BpBatch itself is quite powerfull, you wont need to use any PXE
  specific DHCP extension (menus, etc.).  However, if your DHCP server
  is not able to show minimal PXE compliance, you will need a Proxy DHCP
  server or your PXE Boot ROM will not accept to go further.

  On Windows NT, you can try to use Intel WfM PDK (available from their
  web site), but it is not very easy to use. We rather suggest having a
  Linux machine on the subnet and using our small Proxy DHCP.  The major
  advantage of our Proxy DHCP Server for BpBatch is that our server will
  let you specify an option 155 vendor tag that will be interpreted by
  BpBatch as a command line.

  On Linux and Solaris, you can run our Proxy DHCP program, that simply
  takes as argument the TFTP server IP address, boot file name and
  optional arguments, and does everything for you.  If the DHCP port on
  the server is already requested by another daemon, the proxy DHCP
  server will run on port 4011. In this case, it is necessary that the
  other daemon on DHCP port answer a DHCP offer with client class
  PXEClient so that the PXE client knows that it must try on port 4011.

  If you want to understand better PXE extensions to DHCP, there is an
  extensive description available on Intel WWW site. However, be warned
  that the documents are quite confusing, as the protocol has been
  extended to a number of optional stages, in order to allow for a
  maximal flexibility. The key to understand it is that all what a PXE
  client needs is a complete enhanced DHCP answer. If it receives only a
  standard DHCP offer, it will look further until it gets

  1. a client class (T60) set to PXEClient

  2. vendor encapsulated options (T43) (possibly empty, ie. hex ff)

  3. a non-empty boot filename

     The PXE specific negociation ends as soon as all these infos are
     received, but can lead to a very complex process (install server
     discovery, etc.)  if some are missing.


  4.1.3.  Setting up TFTP

  The TFTP server is a very simple file server. In its basic version,
  TFTP use 512 bytes data blocks, which are quite inefficients.  InCom
  TCP/IP Bootprom and PXE Boot ROMs allow to use larger blocks (1408
  bytes), which speeds up transfers a lot. However, this can only work
  with an enhanced TFTP server.

  On Windows NT, we suggest using InCom enhanced TFTP server, available
  on their web site.

  On Linux, you can use our enhanced TFTP server, available at
  http://cuiwww.unige.ch/info/pc/remote-boot/soft/etftpd.tar.gz.

  On Solaris, you should use InCom enhanced TFTP serer, available on the
  utility disk provided with the TCP/IP Bootprom.

  If you prefer using a standard TFTP daemon, remove the P in all boot
  image name extensions, in order to tell the Bootprom to use only the
  standard TFTP port (This trick was introduced by InCom GmbH for the
  TCP/IP Bootprom. We still use it as an easy way to select the default
  TFTP port with PXE bootproms).


  4.2.  Client-side configuration

  First, we will do set up the part common to all operating systems, ie.
  the batch-file interpreter.  Then, for each operating system, we will
  go through the following steps:

  1. Setup a stand-alone client

  2. Save its configuration on the server

  3. Test it as a remote-boot client

  4. Adapt it so that it works for any similar client machine

     Once this is done, you will be able to setup any supplemental
     client just by plugging a Boot ROM in it (or buying a Wired for
     Management ready computer...) and adding one line in the DHCP
     configuration file.

  Our examples assume that you have a hard disk of 1.4 Gb or more.  If
  you have less, reduce the sizes of the partitions, but remember the
  you need to leave a few hundreds megabytes unallocated (that is, the
  last partition must not take up to the last cylinder) to leave free
  room for the special cache partition. Moreover, as the cache always
  starts at the cylinder following the last allocated cylinder, if you
  do not use the same total size for all your tests, you will have to
  download several times the same files (the cache will be automatically
  cleared).

  Never despair. If you can't get it to work, first look in the
  Troubleshooting section if your problem is not already solved (get the
  latest version from the Web).  Then, take a look in the BpBatch forum.
  Perhaps someone else had the same troubles as you have, and the answer
  can be found in the forum.  Forum's URL :
  http://cuiwww.unige.ch/info/pc/remote-boot/forum/.  If it still does
  not work, think about monitoring network traffic for network related
  problems (use tcpdump on Linux or snoop on Solaris). If you really
  cannot get it to work, you can send an E-mail to
  David.Clerc@cui.unige.ch or Marc.VuilleumierStuckelberg@cui.unige.ch.
  If your problem is strictly related with the remote-boot configuration
  and if we are not overflowed, we will try to solve your problem.

  4.3.  Setting Up the Boot Process

  Get the BpBatch software, either as .zip or as .tar.gz.  The
  executables are available at

    http://cuiwww.unige.ch/info/pc/remote-boot/soft/bpb-exe.zip

    http://cuiwww.unige.ch/info/pc/remote-boot/soft/bpb-exe.tar.gz

     The source code (Assembler and C) is also available on request.

  In the server /tftpboot directory, put the following three special
  boot images, which together make our pre-boot batch file interpreter:

    bpbatch.P, the dynamic loader (respect the uppercase !)

    bpbatch.ovl, the relocated interpreter

    bpbatch.hlp, the on-line help file

     Then add an entry in the DHCP configuration file for your client,
     with the boot file set to "bpbatch.P". Define a vendor option tag
     155 (decimal) with the value "-i" (on the standard DHCP server,
     this is done by the following command: option option-155 "-i";). It
     is interpreted by bpbatch as the command line, and -i stands for
     "interactive".

  Boot the client computer. You might shortly see

    The Boot ROM copyright

    The string DHCP while the client waits for a DHCP reply

    The string TFTP while the client waits for the first TFTP packet

    The string Loading BpBatch while the loader download the
     interpreter

    And finaly our banner, followed by a nice greather-than prompt

     Congratulations ! You have started the batch interpreter...  If you
     are curious about what you can do with it, continue reading the
     next section. If you are on a hurry, skip it and go directly
     install the operating system of your choice. If you have any doubt
     about a command within the interpreter, type help.

  Note that you can run the same interpreter within DOS and Linux by
  running the MrBatch program. There are a only very few differences
  (the Linux version do not have graphics support and the DOS version
  can only send BOOTP and TFTP requests if the BootProm is not hidden by
  the operating system).

  It may be a good idea to read now the section about the Syntax Rules
  of BpBatch, and in particular the paragraphs on File References and on
  The Cache Filesystem.  This will help you understand the examples.

  Once all operating systems will be set up, you will have to make a
  menu to let the user choose the one he wants. You should be able to
  discover by yourself how to make such a menu. All necessary commands
  are documented at the end of this document.


  4.3.1.  Discovering BpBatch

  Try to type LogVars. You should get about thirty variables listed.
  Roughly, the first are BpBatch settings, then come all parameters
  extracted from the BOOTP/DHCP reply, and the last variable is a list
  of disks sizes, in Megabytes.

  Type GetPartitions part, then LogVars again. There should be one more
  variable containing the list of defined partitions on your first hard-
  drive. Assuming that the first partition is either BIGDOS, FAT32 or
  LINUX-EXT2, try LogDir "{:1}" to get the content of the root
  directory, then LogDir "{:1}/usr" if there is an usr directory. You
  can even try LogTree "{:1}/etc" to get a directory tree.

  Put a GIF file (format GIF-87a, interlaced or not, but NOT GIF-89a) on
  your TFTP server. We will suppose that the file is named image.gif.
  You can copy it wherever you want with the following command: Copy
  "image.gif" "{:1}/temp/image.gif". Or you can use it directly from the
  server. Now type Logvars "V*" and look at the value of the VESA
  variable. If it is On, which is most probable, that means you have a
  VESA-compliant video adapter. You can list the available video modes
  using Echo "$VESA-Modes". To display your image try the following
  command: DrawGif "image.gif".  The image should be on the upper left
  corner of the screen. You can draw it on another place by specifying X
  and Y coordinates after the image name. You can also draw text with
  DrawText 200 200 "Hello world" yellow. Or draw an empty window with
  DrawWindow 200 200 300 150. To insert a title when you create a new
  window, try DrawWindow 200 200 300 150 "My Window".  When you are
  tired of graphic mode, simply type CloseGraph.

  Note on graphics : by default, all graphical routines work in the
  800x600 VESA mode (with 256 colors), which is the first field of the
  VESA-Modes variable. If you want to use a different video mode, change
  the variable in order to have the requested video mode as the first
  field of the list.

  Now take a text editor, and create a file named test.bpb in the
  tftpboot directory with the following content:


       ______________________________________________________________________
       :again
       DrawWindow 150 200 400 160 "Identity check"
       TextAttr Black LightGray
       At 15,20 Print "Username : "
       Input username 8
       At 17,20 Print "Password : "
       Getpasswd userpass 8
       if "$username" != "smith" goto again
       if not "$userpass" match-passwd "BpR8oiIlRR9bo" goto again
       #
       clear
       DrawWindow 200 200 150 100 green blue "Congratulations"
       DrawText 220 250 "You got it !" yellow
       WaitForKey 3
       CloseGraph
       interact
       ______________________________________________________________________

  In your BOOTP/DHCP configuration, change the option-155 from "-i" to
  "test", and reboot the client computer. The small script should run
  automatically, and ask you for a username and password.  If you do not
  type smith and justdoit, you wont be able to boot the computer. Later
  you will learn how to use a Unix, NT or Radius server to check valid
  user names.


  4.4.  Setting Up Linux

  In order to set up Linux, you will need to boot the floppy disk
  provided with the RedHat Linux distribution. BpBatch includes a
  command that can redirect the boot to the floppy: FloppyBoot.

  Set up RedHat Linux on your client, with network support, and any
  packages you may want. You may want to recompile the kernel to better
  fit your hardware, but it is not necessary.


  4.4.1.  Configuring the Client

  It is probably a good idea to include BOOTP support to the kernel, so
  that you do not have to customize the client IP address manually.

  In order to reduce network load, you might also want to setup the
  filecache for caching on the hard disk files that are loaded by NFS.
  Roughly, the principle of the filecache is that whenever a symbolic
  link from the cache subdirectory is followed, it is replaced by its
  target. If the target is itself a subdirectory, each entry of the
  subdirectory becomes a symbolic link to the original entry of the
  foreign filesystem.  The filecache has been written by Unifix GmbH,
  and is part of Unifix Linux 2.0. It is freely distributable, and you
  can get the necessary files from
  http://cuiwww.unige.ch/info/pc/remote-boot/soft/filecache.tar.gz.  In
  order to use the filecache, you have to

    apply a patch to the kernel (file patch-filecache), enable
     filecache support through make config or whatever you prefer, and
     recompile the kernel

    copy the filecache binary file to /sbin

    create a mount point called /mnt/nfs (using mkdir)

    copy filecache.conf to /etc. This file contains the following
     lines:

     Max 100 MB 50 % #
     Cache /mnt/nfs/usr /usr
     Cache /mnt/nfs/opt /opt

    copy the content of /usr and /opt to the server, export them read-
     only with anon=0 (for allowing root access) and mount them under
     /mnt/nfs (add a line for that in /etc/fstab)

    rename /usr as /usr.orig

    link /usr to /mnt/nfs/usr

    rename /opt as /opt.orig

    link /opt to /mnt/nfs/opt

    ensure that /usr and /opt are not empty and contains the correct
     directories

    recursively remove /usr.orig and /opt.orig

    copy filecache.init to /etc/rc.d/init.d

    And finally link /etc/rc.d/rc3.d/S35filecache to
     /etc/rc.d/init.d/filecache.init
     If you successfully followed each of these steps, you should have
     the filecache working next time you boot, as long as you do not
     forget to use your patched kernel.


  4.4.2.  Testing the Configuration

  Copy your compressed kernel image (zImage, bzImage, vmlinuz or
  whatever you call it) to the server /tftpboot directory as linux.krn.
  If you had to unplug the bootprom from the PC, you can now plug it
  again. When BpBatch starts, type LinuxBoot "linux.krn" "root=/dev/hda1
  BOOT_IMAGE=linux" (assuming that the root ext2 filesystem is on the
  first partition). Alternatively, if you did setup your configuration
  on a computer without bootprom, just boot let it boot using the loader
  you installed (lilo, ...). But in the later case, if you want the
  filecache to work, you should have explicitely installed your kernel
  with filecache support at the right place.

  Wait until the system comes up.  If you installed the filecache, you
  can check that /usr has exploded into a directory with some symlinks
  and some already-exploded directories. Now start the programs that the
  end-users will use most of the time, in order to load them once for
  all to the hard disk.

  You can still make adjustements to your configuration, like on any
  stand-alone linux station.


  4.4.3.  Building the Disk Image

  When you are happy with your configuration, login as root, go to the
  /tmp directory and run our mrzip program.  MrZip is a command
  interpreter like BpBatch, but it can understand more commands than
  BpBatch does. In particular, it can understand the following commands:


       ______________________________________________________________________
       showlog
       filter -"tmp/*"
       filter -"var/log/*"
       fullzip "/" "/tmp/linux.imz"
       ______________________________________________________________________

  This will create a disk image in /tmp/linux.imz. Move it to the server
  /tftpboot directory. Then copy the following batch file to /tftp
  boot/linux.bpb:


       ______________________________________________________________________
       hidelog
       setpartitions "linux-ext2:992 linux-swap:32"
       fullunzip "linux.imz" 1
       clean 2
       linuxboot "linux.krn" "root=/dev/hda1 BOOT_IMAGE=linux"
       ______________________________________________________________________

  The BOOT_IMAGE argument is to stay compatible with lilo for RedHat 5.1
  and later rc.sysinit.


  Your remote-boot linux configuration is ready ! You can now either set
  the BOOTP-option-155 to "linux", or type include "linux.bpb" from
  within BpBatch to test it.


  4.4.4.  System Maintenance and Upgrades

  If you want later to upgrade software, install bug fixes and security
  fixes, proceed as follow:

    Remote-boot a client computer to get a fresh linux install

    Make your changes

    Redo the disk image

    Copy the new image in place of the old one on the server

     That means, you can upgrade software on your server-based
     configuration as if it were a purely local install.


  4.5.  Setting up DOS 6 and Windows 3.1

  On the client computer, boot on your favorite dos floppy disk (either
  remove the bootprom or type FloppyBoot within BpBatch).  Format the
  dos partition of your hard-drive with the /S option, in order to put
  the operating system on it.  The size of the partition is not
  important, as disk archives created with MrZip Create a DOS
  subdirectory, copy DOS in it. Install your favorite network client
  (for instance Microsoft LanManager), Windows 3.1, and so on. If you
  use Microsoft LanManager, do not use DHCP for the IP configuration as
  it is a very poor implementation that will almost surely fail with
  reasonable network load. To do that, add the following lines in your
  protocol.ref file, in the section that loads tcptsr (of course,
  replaces the xxx by your true IP parameters):

          IPADDRESS0 = xxx xxx xxx xxx
          SUBNETMASK0 = 255 255 xxx xxx
          DEFAULTGATEWAY0 = xxx xxx xxx xxx
          DISABLEDHCP = 1

  Do not be afraid to use EMM386 to optimize the memory usage, and even
  to include the area where you put your network adapter ROM, since it
  is not used anymore at this time. But carefully exclude the network
  adapter RAM, or you will not be able to connect to your server. Use
  the NOEMS parameter.

  If you want to ensure that the client machine cannot be used without a
  valid login name, download our nobreak pseudo-device driver (available
  at http://cuiwww.unige.ch/info/pc/remote-boot/soft/nobreak.zip) and
  run it at the beginning of your config.sys. Then add something like
  this to your autoexec.bat:

  ______________________________________________________________________
  rem -- we use the dummy file c:\logged as a flag
  del c:\logged >nul
  :loginneeded
  cls
  echo Please type in your login name and password
  echo.
  net logon *
  rem -- the login script should have created c:\logged
  if not exist c:\logged goto loginneeded
  del c:\logged
  rem -- now enable break again
  echo Yes >NOBRK
  ______________________________________________________________________

  Ensure that your client boot well by rebooting the client and
  evaluating the following commands within BpBatch interactive mode:

          HideBootprom
          HdBoot

  4.5.1.  Building the Disk Image

  On the server, make a share called admin for instance, on which you
  will put some stuff for the system administrator.  If the server is a
  Unix machine, it is a good opportunity to put in admin a softlink to
  the /tftpboot subdirectory, so that you can put images in it directly
  from the client.  Within admin, create a /utils subdirectory and put
  the following files in it:

    mrbatch.exe, the DOS version of BpBatch

    mrzip.exe, the DOS version of the program for building disk images

    bpbatch.hlp, the on-line help file

     You might also like to put in the same directory a simple MrZip
     script named zipdos.mrz file that contains the commands needed for
     building a DOS image, like this one:


       ______________________________________________________________________
       showlog
       filter -"lanman.dos/lmuser.ini"
       filter -"temp/*"
       filter -"*.swp"
       fullzip "c:/" "L:/tftpboot/dos.imz"
       ______________________________________________________________________

  Now go back to your client, mount the admin volume on drive L:, go to
  your utils directory and type the following command:

          mrzip -b zipdos

  One minute later, you will have a new file in the server /tftpboot
  subdirectory called dos.imz, which is a compressed image of your hard
  disk. Copy the following batch file to /tftpboot/dos.bpb:


       ______________________________________________________________________
       hidelog
       setpartitions "bigdos:1024"
       setbootpart 1
       fullunzip "dos.imz" 1
       hidebootprom
       hdboot :1
       ______________________________________________________________________

  Your remote-boot DOS configuration is ready ! You can now either set
  the BOOTP-option-155 to "dos", or type include "dos.bpb" from within
  BpBatch to test it.


  4.5.2.  Adapting the configuration for other machines

  If you want to customize some settings according to the machine,
  typically the IP settings since Micro$oft DHCP is buggy, you can setup
  BpBatch to change some files before booting.  Firsti go to the
  lanman.dos directory and do

          copy *.ini *.ref


  Then edit the .ref files and replace all fixed parameters with BOOTP
  variable names as in the following examples:

          computername = ${BOOTP-Host-Name}
          ipaddress0 = ${MS-IPAddress}
          subnetmask0 = ${MS-IPSubnet}
          defaultgateway = ${MS-IPRouter}


  Then rebuild the disk image as previously.  Note that for IP parame
  ters, we do not use the BOOTP variables directly because LanManager
  needs then as space-separated numbers instead of dot-separated num
  bers. Change dos.bpb to the following:


       ______________________________________________________________________
       hidelog
       setpartitions "bigdos:1024"
       setbootpart 1
       fullunzip "dos.imz" 1
       set MS-IPAddress="$BOOTP-Your-IP"/.= /
       set MS-IPSubnet="$BOOTP-Subnet-Mask"/.= /
       set MS-IPRouter="$BOOTP-Routers"/.= /
       patch "{:1}lanman.dos/protocol.ref" "{:1}lanman.dos/protocol.ini"
       patch "{:1}lanman.dos/tcpputils.ref" "{:1}lanman.dos/tcputils.ini"
       patch "{:1}lanman.dos/lanman.ref" "{:1}lanman.dos/lanman.ini"
       hidebootprom
       hdboot :1
       ______________________________________________________________________

  If you prefer, you can also put the .ref files in the server /tftpboot
  directory instead of in the disk image.

  We like to be able to easily change the computers configuration
  without rebuilding the image. To do that, copy your autoexec.bat and
  config.sys as autoexec.ref and config.ref to the server /tftpboot and
  add the following two lines to the batch file above:

          patch "autoexec.ref" "{:1}autoexec.bat"
          patch "config.ref" "{:1}config.sys"


  You can then freely change the files and even customize them with
  machine-dependant values obtained from BOOTP.

  After making any change to the client machine configuration, do not
  forget to rebuild the disk image using mrzip if you want to preserve
  your changes.


  4.5.3.  System Maintenance and Upgrades

  If you want later to add new software or change anything else, proceed
  as follow:

    Remote-boot a client computer to get a fresh install

    Make your changes

    Redo the disk image

    Copy the new image in place of the old one on the server

     That means, you can upgrade software on your server-based
     configuration as if it were a purely local install.


  4.6.  Setting up Windows 95

  In previous versions of this document, we used the Microsoft server-
  based installation of Windows 95, but it was really too much pain and
  not much worth:

    It is very, very bogus

    Many software package do not support it and their install will
     fail.  Among them, Microsoft Internet Explorer, OnNet 32, Novell's
     Protected-mode client (which is MUCH more secure than Microsoft
     Client for Netware).

    It cannot be used with the Microsoft Network client over TCP/IP,
     since Microsoft provides no real-mode driver for TCP/IP compatibe
     with Windows 95. That means, it cannot be used with Samba

    It makes software upgrades almost impossible since every client
     turned on will lock many DLLs on the server, and thus produce
     sharing violations if you try to upgrade them.

     Consequently, we throwed away of this document all the informations
     and bug-workaround collected during months (you can still find them
     as a HTML document at http://cuiwww.unige.ch/info/pc/remote-
     boot/win95old/win95old.html) and turned to our new disk-based
     remote-boot concept.  Basically, the configuration for Windows 95
     is now almost as easy the configuration for DOS.

  4.6.1.  Setting up a Stand-Alone Client

  Setup a regular Windows 95 client, either starting from scratch as
  explained in the configuration of a DOS client, starting from the DOS
  client and installing over the network (that is what we did).  You can
  also start with a preconfigured Windows machine, but you will probably
  have less knowledge of what stuff is on the hard disk.

  Proceed as described above for a DOS client. It is usually NOT
  necessary to use EMM386 with Windows 95.  If you are using Windows 95
  OSR2 (alias MSWIN 4.1, alias Windows 95 service pack 1, alias Windows
  95 with Internet Explorer), you should add the following line in the
  [Options] section of MSDOS.SYS (yes, it is a text file):


       ______________________________________________________________________
       AUTOSCAN=0
       ______________________________________________________________________

  This will let Windows know that you do not want ScanDisk to be runned
  automatically at boot time.

  If you want to reduce network and server load (which will improve your
  system performances) while keeping all softwares on the server, you
  should consider installing the excellent Shared LAN Cache, from
  Measurement Techniques, Inc (see http://www.lancache.com).  This
  software runs on each client computer, and caches to the local hard
  disk every data obtained from the network. Even MS-Office starts much
  faster the second time you run it... You need one license per client
  computer, but it is not very expensive, and the firm make special
  prices for universities and colleges. The best thing to do is to go to
  their Web site and download the free evaluation copy.


  4.6.2.  Building the Disk Image

  Your MrZip script will be named zipwin95.mrz and contain:


       ______________________________________________________________________
       showlog
       filter -"temp/*"
       filter -"*.swp"
       fullzip "c:/" "L:/tftpboot/win95.imz"
       ______________________________________________________________________

  To build the image, mount the admin volume on drive L:, go to your
  utils directory and type the following command:

          mrzip -b zipwin95

  A few minutes later, you will have a new file if the server /tftpboot
  subdirectory called win95.imz, which is a compressed image of your
  hard disk. If your compressed image was bigger than 87 MB, it has
  probably been splitted in two or more fragments.  These fragments will
  automatically loaded one after the other when needed. Note that an
  image bigger than 87 MB will usually take More than one minute to
  uncompress and may irritate your users.  Our Windows 95 image is only
  70 MB big, because most software (except Office and Explorer)
  completely reside on the server. Only 45 seconds are needed to
  uncompress the image and restore the full disk.

  Copy the following batch file to /tftpboot/win95.bpb:


       ______________________________________________________________________
       hidelog
       setpartitions "bigdos:1024"
       setbootpart 1
       fullunzip "win95.imz" 1
       hidebootprom
       hdboot :1
       ______________________________________________________________________

  Your remote-boot Windows 95 configuration is ready ! You can now
  either set the BOOTP-option-155 to "win95", or type include
  "win95.bpb" from within BpBatch to test it.


  4.6.3.  Adapting the configuration for other Machines

  The big difference between Windows 3.1 and Windows 95 is that the
  later includes code for Plug-and-play , ie. automatic detection of
  your hardware. This not a bad thing in itself, but the trouble is that
  it is often too sensible, and that it sometimes fails.

  If you try to start another client with exactly the same boot image,
  you will probably get several messages during startup telling that
  Windows has detected new hardware: a new sound card, a new hard-disk,
  a new network card, and even a new mouse... There can be two reasons
  for that:

    the devices may not use the same ressources (for instance the mouse
     is not connected on the same port, or the sound card is not
     connected in the same slot - yes, that is detected)

    the devices may tell to Windows 95 their personal serial number
     (for instance, every Windows 95 differenciate every network card on
     the basis of its world-wide unique ethernet address)

     The fact that Windows 95 discover that the hardware has changed may
     not be a problem if the plug-and-play works as-is, but it become a
     problem when the plug-and-play does not work. For instance, Windows
     95 plug-and-play for our Logitech PS2/aux mouse does not work, and
     result in no mouse at all. To solve such kind of problems, arrange
     to have all computers as similar as possible, or make different
     images for different hardware. Later, you will discover that you
     can simply use the same image and just have several copies of the
     registery, that you can copy after having restoring the disk image
     but before booting.

  The thing you cannot avoid to differ between computers is the network
  card. PCI cards usually do not mind, but ISA Plug and Play do.  Bad
  luck for us, the plug-and-play code for our SMC EtherEZ card hangs the
  computer. The only solution is to let Windows 95 believe that it
  already know the network card, and that it is not necessary to trigger
  plug-and-play. The trick for doing that is to automatically insert an
  entry for the network card in Windows 95 registery, before starting
  it.  Note that this trick is not any more needed with most PCI cards.


  Move the autoexec.bat to the server as described above for DOS.  Edit
  it (on the server) and add the following lines:

  rem --- Patch Windows registery in order to avoid plug-and-play detection
  regedit /L:c:\windows\system.dat /R:c:\windows\user.dat c:\temp\patch.reg


  regedit is a standard Windows 95 program that let you browse the reg
  istery if you start it from within Windows 95, or do simple operations
  on the registery if you call it from DOS.  Run regedit under Windows
  95, search for your network card, usually under

          HKEY_LOCAL_MACHINE\Enum\ISAPNP


  and export the branch using the File menu. This will create a text
  file, that you should same as patch.ref in the server /tftpboot dire
  tory. Edit this file and find out where the card ethernet address is
  stored (do that on two different machines and compare the files if you
  can't find it by yourself). Replace it by a pettern in the form
  ${MACID}.  Then add lines to the win95.bpb script like this:

          set macid = "$BOOTP-Client-ID"
          patch "patch.ref" "{:1}temp/patch.reg"


  (do any necessary string manipulation for setting MACID if it is not
  exactly the client Ethernet address).  That's all, your clients should
  not any more try to autodect the network card.

  Once again, this whole trick is not necessary when using PCI network
  adapters.  Incidentally, we can use the same mechanism for
  automatically configuring the hostname, which Windows 95 does not seem
  to take into account when configuring through DHCP. We just add the
  following line to our patch.ref file:


       ______________________________________________________________________
       [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP]
       "ComputerName"="${BOOTP-Host-Name}"

       [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP]
       "HostName"="${BOOTP-Host-Name}"

       [HKEY_LOCAL_MACHINE\System\CurrentControlSet\control\ComputerName\ComputerName]
       "ComputerName"="${BOOTP-Host-Name}"
       ______________________________________________________________________

  Using this small registery trick, your configuration should normally
  be portable for all machines with similar configurations. If you
  cannot avoid that Windows detect some hardware as new on one machine,
  try to rebuild the disk image from this machine. This will include the
  registery configuration specific to this machine into the image, and
  hopefully supress the problem.


  4.6.4.  System Maintenance and Upgrades

  If you want later to upgrade software, install bug fixes and security
  fixes, proceed as follow:

    Remote-boot a client computer to get a fresh install

    Make your changes

    Redo the disk image

    Copy the new image in place of the old one on the server

     That means, you can upgrade software on your server-based
     configuration as if it were a purely local install.


  4.7.  Setting up Windows NT

  We do not use Windows NT for remote-boot client computers but we have
  tested our system to ensure that it work as well. And it works.

  As our utilities currently have no support for NTFS (we neither have
  the documentation nor the time to do that, but I would be happy to
  help anyone who is interested in doing it), you will have to install
  NT on FAT16 (simply do not convert your partitions to NTFS during the
  setup).

  Copy your win95.bpb boot script to winnt.bpb.  Change the
  setpartitions line in winnt.bpb to the following:

          setpartitions "BIGDOS:512 BIGDOS:512"


  Then boot Windows 95 using this script, and install your NT client on
  drive C. Do not worry about the second partition for now.  Do not
  install too much stuff, or you will get a really large and slow-to-
  uncompress image.  Remove Windows 95 from the disk disk C, you do not
  need it in a Windows NT image (the boot menu is handled by the boot
  prom, not by NT boot loader).

  Reboot your computer in without overwriting the hard disk, ie. do not
  execute the winnt script but just

          hidebootprom
          hdboot


  Your NT station should start-up correctly. Make any necessary cus
  tomization.


  4.7.1.  Building the Disk Image

  The trouble with Windows NT is that direct disk access is prohibed by
  the kernel. That means, MrZip will not even be able to read the boot
  sectors. The best way to do an image is then to boot Windows 95 and to
  run MrZip from a DOS window. To do that, change the winnt.bpb script
  so that the Windows 95 image is not restored on the first but on the
  second partition:


       ______________________________________________________________________
       hidelog
       setpartitions "BIGDOS:512 BIGDOS:512"
       setbootpart 2
       fullunzip "win95.imz" 2
       hidebootprom
       hdboot :2
       ______________________________________________________________________

  (if you have any supplementary patch, change the "{:1}" to "{:2}").
  Boot with this script; you should have Windows 95 running, but a new
  drive D: should be available, with Windows NT inside.

  Make your disk image as usual (but on D:, of course), and save it as
  winnt.imz on the server /tftpboot directory.  Edit one last time the
  winnt.bpb script like this:


       ______________________________________________________________________
       hidelog
       setpartitions "BIGDOS:512 BIGDOS:512"
       setbootpart 1
       fullunzip "winnt.imz" 1
       clean 2
       #fullunzip "win95.imz" 2
       hidebootprom
       hdboot :1
       ______________________________________________________________________

  Your Windows NT remote-boot configuration is ready. Of course, if you
  do not like to have two partitions, you can setup a single partition
  instead. But when you have to rebuild the image, you will have to
  setup the second partition again for booting Windows 95.


  4.7.2.  System Maintenance and Upgrades

  If you want later to upgrade software, install bug fixes and security
  fixes, proceed as follow:

    Remote-boot a client computer to get a fresh install

    Make your changes

    Edit winnt.bpb: comment the clean and winnt fullunzip, uncomment
     win95 fullunzip

    Redo the disk image

    Copy the new image in place of the old one on the server

     That's all, folks !


  4.8.  Troubleshooting (FAQ)

  This section lists most frequently encountered problems.

     The image download never ends
        You are probably using a standard TFTP server, and it cannot
        handle more than 65535 packets of 512 bytes (or even 32767
        packets for the Solaris server). That is, your image must be
        fragmented in pieces of no more than 30 MB (or 15 MB for
        Solaris). See under CopyArchive for instructions on fragmenting
        an existing image. But you should seriously thing about using
        InCom's extended TFTP server, as it is much more efficient (it
        uses packets of 1408 bytes instead of 512 bytes).

     The archive decompression fails immediately
        There are three possibilities. Either the image is really
        corrupted on the server (try use MrZip to see if it is the
        case), or the file transfer has failed because of TFTP timeout,
        or because of incompatible protocol.

        TFTP timeout occurs when the network is too heavily loaded (for
        instance if you try to download a huge image with more than four
        clients at a time). In this case, BpBatch does not retry
        indefinitely because it would not help. Shut down a few
        computers and retry with no more than four computers (or maybe
        even three).  If you often need to download images for a lot of
        computers, you can try our special Broadcast TFTP server (see
        the section dedicated to it).

        Incompatible protocol is caused by using a standard TFTP server
        (typically the one built-in in your UNIX server) while asking
        BpBatch to work with enhanced TFTP. If you use a standard TFTP
        server, you should remove the .P extension (see the explanation
        in the next question).


     The computer hangs instead of downloading/unzipping (1)
        If you are using Incom's TFTP server, try to add -s 1408 59 to
        the command line. If you are not using an enhanced TFTP server,
        remove the .P extension from BpBatch filename on the server and
        in bootptab.

        Detailed explanation : this problem occurs if you did not setup
        an extended TFTP server but you used bpbatch.P as the
        bootfilename DHCP/BOOTP tag. BpBatch will indeed try to connect
        to an extended TFTP server when the bootfilename ends with a .P
        extension. To solve this problem, you can either remove the .P
        extension at the end of the bootfilename (it will tell BpBatch
        to use standard TFTP) or install an extended TFTP server.  The
        only supported extended TFTP server today is the one provided by
        Incom. You can find compiled binaries on their web site, or on
        our distribution directory. For Incom's TFTP server to properly
        work with the extended TFTP feature, you must add -s 1408 59 to
        the command line.

     The computer hangs instead of downloading/unzipping (2)
        May be your computer has a bad VESA support. Try giving the -v
        command-line argument or setting the VESA variable to "OFF".

     VESA scrolling is broken
        We use a VESA 1.1 function for scrolling. If your video adapter
        does not support VESA 1.1, forget it. If the scrolling works for
        one page, but then produces a strange strippled pattern, do not
        worry. This is a known bug, I will fix it as soon as I have time
        for it (VESA scrolling is not really essential...)

     There is a corrupted file in the cache
        When a file in the cache is corrupted by an external program, it
        is automatically removed from the cache. When a file in the
        cache is not fully written (because the computer is turned off
        during the file transfer), it is also automatically removed. But
        if the server transmits a corrupted file or if the transfer
        aborts from the server side, it is possible that this file stays
        in the cache. You can clean-up the cache simply by holding both
        shift down while BpBatch access it for the first time.
        Alternatively, you can evaluate clean -1 in interactive mode.

     The EXIT command does not work in a batch file
        This is not a bug. Exit is not a command.  There is no exit or
        quit command because it does not make any sense to exit from a
        boot script without booting. And MrBatch is really the same
        program as BpBatch.  What you can do instead is calling HdBoot.
        This makes sense, and the DOS version will cleanly exit instead
        of rebooting.  Note that you can exit from the DOS version at
        any time by pressing Ctrl-Break. This will restore all hooked
        interrupts before leaving.

     The Print command does not print
        If you try to print something and immediately enter interactive
        mode, you may not see your text. This is because your text was
        written on the runtime screen and the Interact command has
        switched the display to the Log screen. Just put a GetKey after
        the print commands and you will see the text output.

     MrZip says Malloc failed
        MrZip needs a lot of conventional memory to run.  If you
        encounter this problem, first ensure that you have unloaded the
        bootprom either using HideBootprom or using InCom's bputil.  If
        you run MrZip from bare MS-DOS (not within Windows 95 DOS box),
        you should use EMM386 to load the network drivers high in order
        to get as much conventional memory as possible. From a Windows
        95 DOS box, there is usually no problem (as long as you have not
        left your old 16-bit stuff in your autoexec.bat when you
        installed Windows 95).

     MrZip aborts while reading directories
        This bug has already been fixed once. Get the latest release of
        MrZip. If the problem persists, try to build your image with
        Trace set to "ON" (and usually PauseLog set to "OFF"); this will
        let you discover which file causes the problem. Send a detailled
        bug report.

     MrZip cannot access some file
        MrZip is probably trying to read a locked, open or special file,
        such as Windows swap file. Such files should usually not be
        included in the image and should be filtered out (using the
        filter command).  It is also possible that the operating system
        is playing you a trick.  If MrZip does not tell you what file
        causes the problem, try to build your image with Trace set to
        "ON" (and usually PauseLog set to "OFF").  You can also try to
        use direct disk access (that is, do not refer the source
        partition as "C:" or "/" but as "{:1}" or whatever partition it
        is). Using direct disk access is usually slower because we have
        less buffers than the operating system, but it may be sometimes
        more reliable.

     Disk images are always reloaded from the server
        Disk images are stored in the special cache area and should not
        be reloaded if they have not changed on the server. However, as
        the cache area always starts after the last used partition,
        changing the total size of partitions will move the location of
        the cache and thus destroy its content. Another possible reason
        for a file disappearing from the cache is that the previous file
        has grown more than one-and-an-half times its initial size. The
        file would then have been overwritten and need to be downloaded
        once again. This should almost never occurs.  A third possible
        reason is a too small cache area. If the free space left outside
        the partitions is less than one-and-an-half times the sum of all
        compressed image sizes, only the most recently used images will
        be present in the cache and the other will have to be reloaded
        on demand.

     Red Hat Linux 5.1 does not boot properly
        This distribution assumes Linux was booted using lilo and checks
        for the BOOT_IMAGE command line argument (in
        /etc/rc.d/rc.sysinit). Simply add it in the linuxboot call, or
        change your rc.sysinit.

     The broadcast TFTP ramdisk hangs (Got in bound state)
        Linux dhcp client is a program that dynamically changes the IP
        address of the client according to DHCP offers. If the address
        is offered forever (infinite lease time), the DHCP client just
        set the address and returns (this is what we expect).  However,
        if the lease time is limited, the DHCP client must remain loaded
        and ask for new addresses every few minutes. And if the DHCP
        client does not return, MrBatch will never be loaded...  The
        solution is to give an infinite lease time (sometimes encoded as
        -1).

     File access hangs under BpBatch, but not under MrBatch
        This problem occured on an AMI BIOS dated 94/07/25. We
        investigated a little bit, and found no solution. It seems that
        this problem is due to a bug in this BIOS (some register or
        memory location must be destroyed).

     Unzip of a fragmented archive fails (Malloc failed)
        This problem was introduced with PXE compatibility, but has now
        been fixed. Please get the latest version.

     MrBatch and MrZip complain about the terminal under RedHat 5.x
        This problem has been fixed in the 9th of August version of
        MrBatch/MrZip.  There was a problem with a new version of
        ncurses which has been released with RedHat 5.1.

        MrZip has been linked to the version 3.0 of libncurses. You can
        use other versions of libncurses only if they are newer than
        version 3.0. To use a newer libncurses, all you have to do is to
        create a soft link from libncurses.so.3.0 to your
        libncurses.so.xx file.  With RedHat 5.1, you can use the
        following command : cd /usr/lib ; ln -s libncurses.4.2
        libncurses.3.0 You can also download a version recent version of
        mrzip/mrbatch. Starting from the 10/25/98, mrbatch is now
        compiled under RedHat 5.1.

     MrBatch and MrZip do not start under Linux (file not found)
        This problem is the reverse of the previous one. Now that the
        distribution is libc6 ready, it cannot be used any more with
        libc5. If you encounter this problem, simply upgrade your Linux
        box (Well, if we hear too much complaints, we might try to keep
        two distributions...).

     I can not access other mode than the default 800x600 VESA mode
        You should first display the contents of the VESA-Modes
        variable, to see if your hardware support the mode you would
        like to use.  Then, try one of the two ways to select a special
        VESA mode :

       InitGraph "mode": Try InitGraph "1024x768", and then run the
        graphical primitive you are interested in (e.g DrawGif).

       VESA-Modes: The first field of the VESA-Modes variable is the
        name of the default mode. If you change the VESA-Modes variable,
        all graphical primitive will use the mode you specified.

     BpBatch prints a
        We corrected a bug in the memory allocation functions of
        BpBatch. You should make sure that you have a version of BpBatch
        which has been released after september the 22nd 1998.

     Fullunzip using the Linux version of MrBatch always fails
        We corrected this problem in the 09/22/1998 release.

     Scandisk says my disk is corrupted
        The 10/25/98 release did correct a problem with large images.
        Try to download a recent version of BpBatch.

     My RedHat boot floppydisk does not work with FloppyBoot
        This bug has been corrected in the 10/25/98 release.

     My FAT32 disk image does not boot properly
        This bug has been corrected in the 02/09/99 release.


  5.  Remote-Boot Tools Reference Manual

  This section provides detailled informations on the use of the tools
  we developped at the CUI, University of Geneva for this remote-boot
  configuration.


  5.1.  BpBatch, MrBatch and MrZip

  These three names stand for three variants of the same program, with
  the following characteristics:

    BpBatch is a special program that can be started from the BootProm
     before the operating system is loaded. It is made of two parts:
     bpbatch.P, the dynamic loader, and bpbatch.ovl, the program itself.
     BpBatch has full disk I/O capabilities through our own
     implementation of FAT16, FAT32 and Ext2fs, as well as remote
     network I/O capabilities through the BootProm TFTP API.  BpBatch
     was compiled under DOS using Borland C 5.0 and Turbo Assembler 3.2.

    MrBatch is the DOS/Linux version of BpBatch.  All commands
     recognized by BpBatch are recognized by MrBatch and vice versa.
     This is very usefull if you want to test your batch scripts from a
     DOS/Linux session.  Under DOS, MrBatch emulates remote I/O by OS-
     based file access if the bootprom is not available. Under Linux,
     the bootprom cannot be seen anymore but MrBatch can emulate it
     using Linux IP support, or use OS-based file access.  MrBatch was
     compiled under Linux using GCC 2.7.2.1 and under DOS using Borland
     C 5.0 and Turbo Assembler 3.2.

    MrZip is an interpreter that recognizes a superset of MrBatch
     language, and that serves to build disk images.  In MrZip, the
     limited remote file I/O is replaced by a full-featured OS-based
     file access. MrZip does not include VESA support.  MrZip was
     compiled under Linux using GCC 2.7.2.1 and under DOS using Borland
     C 5.0 and Turbo Assembler 3.2.


  5.1.1.  Command Line Arguments

  All programs accept the same syntax of arguments. MrBatch and MrZip
  take them from the command line, while BpBatch look for them in the
  BOOTP option 155 (decimal). Here is the syntax of the arguments:

          [-x] [-l] [-b] [-v] [-w] [-i] [script-basename]


  where:

    -x disable the use of extended memory

    -l disable the use of ISO-latin-8859-1 as default character set

    -b cancel the bootprom detection (which cause a floppy seek under
     DOS)

    -v cancel the VESA detection (which cause a switch to full screen
     under Windows 95)

    -w enable direct disk write access (disabled by default under DOS
     and Linux)

    -i enable interactive mode even if a script name is provided

     The script-basename is optional. If provided, MrBatch and BpBatch
     load the file with the .bpb extension, and MrZip loads the file
     with the .mrz extension. If not provided, MrBatch and MrZip run in
     interactive mode while BpBatch loads the file with the same
     basename as the BOOTP Boot file and a .bpb extension.


  5.1.2.  Syntax rules

  The following rules apply when BpBatch parses an input line.

    Commands are parsed line by line. Lines are separated by CR and/or
     LF.

    The maximal line length is currently 255 characters.

    Keywords and variable names are case-insensitive.

    " is interpreted as the special string delimiter

    When ${variable} or $variable is encountred, it is substituted by
     the value of the variable, or by an empty string if the variable is
     undefined.  The substitution also occurs within a string. Moreover,
     the resulting substituted value must be explicitely enclosed
     between double quotes if used as a string value (ie. one should
     merely speak of macro expansion than of a variables).



    \a is substituted by the audible-bell character (ASCII 7)

    \b is substituted by the backspace character (ASCII 8)

    \n is substituted by the newline character (ASCII 10)

    \r is substituted by the return character (ASCII 13)

    \t is substituted by the tabulation character (ASCII 9)

    \v is substituted by the vertical-tab character (ASCII ...)

    \nnn where n is a 3-digit octal number between 000 and 377 is
     substituted by the character with ascii code specified

    \X where X is any other character not listed above is substituted
     by X itself. In particular,

    \" is substituted by a regular double-quote (not a string-
     delimiter)

    \$ is substituted by a regular dollar sign (not variable
     substitution)

    \\ is substituted by a regular backslash (not a special character)

    The character "end of string" (ASCII code 0) CANNOT be used
     anywhere as it is used internally as end-of-string delimiter

    The character "floating diaeresis" (ASCII code dec 249, hex F9,
     octal 371) CANNOT be used in any string as it is used internally as
     string delimiter in the input parsing routine.
    The character "block space" (ASCII code dec 255, hex FF, octal 377)
     CANNOT be used in any variable value as it is used internally as
     variable delimiter.

  Empty lines are ignored.  Lines starting with a sharp (#) are treated
  as comments and are not interpreted.  Lines starting with a column (:)
  are treated as labels and are not interpreted.


     String expressions
        Strings are delimited by opening and closing double-quotes:

                "Hello world"


     To include double-quotes within a string, quote them using a back
     slash:

             "I said: \"Hello world\""


     Strings can be postfixed with a few operators.

       The character substitution operator:

                "Hello world"/o=u/      ==      "Hellu wurld"
                "198.76.54.32"/.= /     ==      "198 76 54 32"

       The word selection operator (zero-based):

                "Hello world"{0}        ==      "Hello"
                "198 76 54 32"{1-3}     ==      "76 54 32"

       The substring selection operator (zero-based):

                "Hello world"[4]        ==      "o"
                "Hello world"[4-7]      ==      "o wo"

     Operators can be chained by postfixing one after the other.  For
     informations about the string length and word count operators, see
     under "Numerical expressions".


     Numerical expressions
        Numerical expressions work on 32-bits integer numbers (from
        -2,147,483,646 to 2,147,483,647). Hexadecimal octal and binary
        numbers are not understood.  Whenever a numerical expression is
        expected, the following are recognized:

       A positive or negative integer number

       An expression in the form (expr1 op expr2) where op can be
        either +, -, * (multiply), / (divide) or % (modulo) and expr is
        a numerical expression.  Note that EACH operation MUST be
        enclosed between parenthesis :

                ((3 * 5)+2)             == 17

       The string-length operator (@), followed by a string :

                @"Hello world"          == 11

       The word-count operator (#) followed by a string :

                #"Hello world"          == 2

     Durations
        A few commands expect durations as arguments. Durations are
        measured in seconds, with a precision of up to a tenth of
        second:

                Delay 3                 waits for 3 seconds
                Delay 0.3               waits for 3/10 seconds

     Colors
        Whenever a color is expected, you can either use the numeric
        value of the color or its symbolic name (case-insensitive).  The
        following colors are recognized

                Black           0
                Blue            1
                Green           2
                Cyan            3
                Red             4
                Magenta         5
                Brown           6
                LightGray       7
                DarkGray        8
                LightBlue       9
                LightGreen     10
                LightCyan      11
                LightRed       12
                LightMagenta   13
                Yellow         14
                White          15

     File References
        File names are strings. They must therefore always be enclosed
        between double-quotes. File names are case-sensitive on case-
        sensitive filesystems, case-insensitive on case-insensitive
        filesystems.  Slash and backslash can be freely used one in
        place of the other.  Do not forget to double backslash since a
        single backslash is an escape character.

        There are two kinds of file references:

       Direct disk files

       Foreign files

        Direct disk files are referenced using the following notation:


                "{disk:partition}/absolute/filename"


     The disk number can be omitted and defaults to zero.  For instance,
     "{:1}/usr/bin" points to /usr/bin assuming there is such a direc
     tory on the first partition. Direct file I/O is solely based on our
     own file access routines (we do not use the operating system).

     There are two special partitions. Partition zero corresponds to the
     hard disk master boot record (MBR) and has a pseudo file-system
     which let you access the boot code. Partition minus-one (-1)
     corresponds to the cache filesystem (see below).

     Under BpBatch/MrBatch, foreign files correspond to remote files on
     the TFTP server when the BootProm is available:

             "help.bpb"           is the file help.bpb in the /tftpboot directory
             "gifs/MyImage.gif"   is a file in /tftpboot/gifs


     Other TFTP servers can be referenced :

             "198.76.54.32:help.bpb"


     If the other server is behind a gateway :

             "198.70.0.1/198.76.54.31:help.bpb"


     One can also specify a specific port for the TFTP connection :

             "198.76.54.32@89:getpasswd/smith"


     There can be only one open remote file at a time.  If the BootProm
     is not available, remote files are emulated using the operating
     system file I/O, but the same restriction apply.

     Under MrZip, foreign files correspond to files as seen by the
     operating system. There is no limitation, and foreign files can be
     used wherever direct disk files can be. Foreign files are usually
     faster than direct disk files, because the operating system has
     more buffers. Foreign files can refer to network files if supported
     by the operating system.

             "C:\\autoexec.bat"
             "C:/config.sys"
             "/mnt/net/usr"

  5.1.3.  The Cache Filesystem

  In order to reduce network load and to fasten the boot process, disk
  archives, linux kernels and possibly other files are cached on the
  hard disk. This disk cache is located at the end of the hard disk,
  between the last cylinder allocated in the partition table and the
  last physical cylinder of the disk (out of any allocated partition).
  There MUST be room between the last partition and the end of the disk
  if you want the cache filesystem to work.  The cache filesystem MUST
  work if you want to restore a disk image.

  The disk cache is organised in a volatile, CRC-validated filesystem :
  Each directory entry and each 32 KB data block is validated by a
  32-bits CRC. Whenever a directory entry or a data block unexpectedly
  changes, the file is automatically removed from the cache and
  downloaded again upon the next request.

  You can freely access the cache filesystem from within BpBatch,
  MrBatch and MrZip using direct disk access on the special partition
  "{:-1}".  To see the content of the cache, just type :

          logdir "{:-1}"


  If the cache ever gets corrupted and is not automatically cleaned
  (which should never occurs), you can either type :

          clean -1


  (in interactive mode) or hold both shifts down when BpBatch access the
  cache for the first time.


  5.1.4.  Special variables

  Some variable are initially set and/or have special meanings.  Some of
  them exist within all programs, other are only available under MrZip
  and other are only available when a BOOTP/DHCP reply has been
  received.


     General variables

       $Program is set to "BpBatch" within BpBatch, "MrBatch" within
        MrBatch and "MrZip" within MrZip

       $Basename is set to the basename of the script on which the
        batch interpreter was started

       $HelpFile is the name of the file loaded when Help is invoked.
        Default: "${Basename}.hlp"

       $BOOTP-... are variables set from the BOOTP/DHCP reply (see the
        paragraph on BOOTP/DHCP variables for more details)

       $DHCP-... are variables set from the DHCP reply (see the
        paragraph on BOOTP/DHCP variables for more details)

       $Disks is set to the space-separated list of sizes for each
        disk.  That means, #"$Disks" represent the number of disks and
        "$Disks"{0} is the size of the first disk

       $Keypressed is set to the next ready-to-read key available in
        the keyboard buffer (if available)

       $LBA    controls the use of LBA to access disks > 2Gb.  Default:
        "ON"

       $FDA    controls the use of fast disk access (write accross
        cylinders).  Default: "ON"

       $VESA   controls the use of VESA graphics.  Default: "ON" if
        available

       $VESA-Modes gives the list of all available VESA modes.  The
        first entry of the list is the default mode, which is used when
        no parameter is given to InitGraph.  Note: if VESA="OFF", this
        variable is blank
       $APM    is set to "ON" if your computer supports Avanced Power
        Management. If $APM is "ON", you can use the command PowerOff to
        turn your computer off.  Default: depends on your hardware

       $Trace controls the display of each command before execution. It
        also controls the display of file names when creating new
        archives.  Default: "OFF"

       $AutoShowLog controls the automatic switch to the text log
        whenever the ESC key is pressed.  Default: "ON"

       $PauseLog controls the pause between each page of log when the
        log is visible.  Default: "ON"

       $CacheDisk is set to the disk used for caching remote files.
        Default: empty == 0, the first hard disk

       $CacheAlways controls the automatic caching of remote files
        copied, patched or drawn as GIF.  Default: "OFF"

       $CacheNever prevents any file from being cached.  Turn this
        variable on for diskless Linux boot.  Default: "OFF"

       $CacheReserve controls the preventive allocation of 25 percent
        more space than necessary in the cache partition, to let the
        files grow. Turn this variable off if you are short of disk
        space.  Default: "ON"

       $ExtMemory controls the use of Extended Memory (or XMS).  Once
        deactivated, extended memory cannot be reactivated.  Default:
        "ON" if available

       $IsoLatin controls the interpretation of upper ASCII codes in
        included and patched files. The IsoLatin settings are processed
        at the time the file is loaded, not at the time the file is
        processed.  Default: "ON"

       $ProgressX and $ProgressY controls the position of the progress
        window displayed in VESA graphics during archive download and
        decompression.  Default: 200 200

       $EXT2-Backup controls the update of superblock backups in Linux
        ext2 filesystem. Superblock backups take a few seconds to do and
        are never used by current kernels (only by e2fsck).

       $Security-Gateway controls the gateway-server used for user
        authentication. Our special authentication gateway must be
        running on the target computer.  Default: "${BOOTP-Server-
        IP}@89" (ie. the TFTP server, on port 89)

       $Security-Check contains the answer of the security server for
        the last check performed, either PASSED or FAILED.  Default:
        "FAILED"

       $Security-Passwd, $HelpTopic, $OnExit, $OnKey-...  are used
        internally.

        See also BOOTP variables and MrZip-specific variables.


     MrZip-specific variables
        The following variables are only used within MrZip.

       $TempPath controls the directory where temporary files will be
        stored.  Default: <empty> == current directory

       $DumpFormat controls the way archives are dumped to the log when
        requested.  It is a string containing

       "h"/"H" to display the archive header

       "b"/"B" to summarize/dump boot sectors

       "s"/"S" to display a short/long allocation summary

       "d"/"D" to display a short/long directory listing

       "f"/"F" to summarize/dump files

        Default: "hbD"

       $FragmentSize controls the size of archive pieces.  If you do
        not use InCom's extended TFTP server, you should set this to "30
        MB".  Default: "87 MB"

       $SourceArchive, $DestArchive, $Filter... are used internally.


     BOOTP variables
        The following BOOTP-... and DHCP-... variables are recognized,
        as long as a BOOTP/DHCP reply has been received (TCP/IP Bootprom
        must be reported as detected):

                $BOOTP-Client-ID
                $BOOTP-Your-IP
                $BOOTP-Server-IP
                $BOOTP-Gateway-IP
                $BOOTP-Bootfile
                $BOOTP-Server-Name
                $BOOTP-Subnet-Mask
                $BOOTP-Time-Offset
                $BOOTP-Routers
                $BOOTP-Time-Servers
                $BOOTP-Name-Servers
                $BOOTP-Domain-name-Servers
                $BOOTP-BOOTP-Log-Servers
                $BOOTP-Cookie-Servers
                $BOOTP-Lpr-Servers
                $BOOTP-Impress-Servers
                $BOOTP-Resource-Location-Servers
                $BOOTP-Host-Name
                $BOOTP-Boot-Size
                $BOOTP-Merit-Dump
                $BOOTP-Domain-Name
                $BOOTP-Swap-Servers
                $BOOTP-Root-Path
                $BOOTP-Extensions-Path
                $BOOTP-IP-Forwarding
                $BOOTP-Interface-MTU
                $BOOTP-All-Subnets-Are-Local
                $BOOTP-Broadcast-Address
                $BOOTP-NIS-Domain
                $BOOTP-NIS-Servers
                $BOOTP-NTP-Servers
                $BOOTP-Font-Servers
                $BOOTP-X-Display-Manager
                $DHCP-IP-Address-Lease-Time
                $DHCP-Message-Type
                $DHCP-Server-Identifier
                $DHCP-Message
                $DHCP-Renewal-Time
                $DHCP-Rebinding-Time
                $BOOTP-NIS+-Domain
                $BOOTP-NIS+-Servers
                $BOOTP-Server-Name
                $BOOTP-Bootfile
                $BOOTP-Mobile-IP-Agent
                $BOOTP-SMTP-Servers
                $BOOTP-POP3-Servers
                $BOOTP-NNTP-Servers
                $BOOTP-WWW-Servers
                $BOOTP-Finger-Servers
                $BOOTP-IRC-Servers
                $BOOTP-StreetTalk-Servers
                $BOOTP-STDA-Servers

     Other BOOTP/DHCP parameters can be used under the name

             $BOOTP-Option-n


     where n is the decimal representation of the BOOTP option number.

     Do not mix-up BOOTP-Gateway-IP, which is the gateway to use for
     TFTP and should be 0.0.0.0 if the TFTP server is in the same
     subnet, and BOOTP-Routers, which contains the default IP
     gateway(s). The TCP/IP Bootprom sometimes seems to set the value of
     BOOTP-Gateway-IP from the value in BOOTP-Routers, causing each TFTP
     ack packet to be sent to the router first. To avoid such behaviour,
     if your TFTP server is in the same subnet as the client, force
     BOOTP-Gateway-IP to 0.0.0.0 (thanks to Maciek Uhlig for having
     pointed out this problem).


  5.1.5.  Monitoring commands

  This section lists commands for monitoring the system state.  Optional
  arguments are listed between parenthesis (I would have prefered square
  brackets, but LaTeX do not like them at this place...)

     Interact
        Show the log and turn to interactive mode until QUIT or EXIT is
        entered.  Type HideLog before quitting if you want to avoid
        disturbing log messages during batch execution.


     Help (topic)
        Load the on-line help file (bpbatch.hlp) and display the
        description of the given topic. If no topic is provided, or if
        the topic is unknown, display the help index.


     Log
        Display the string on the log. No return/linefeed is implicitely
        added.


     Echo
        Display the string on the log and go to the next line.
        Equivalent to

                Log "text\r\n".

     LogVars (
        Log (ie. display on the log) all variables matching the given
        pattern.  The pattern can contain wildcards (? and *).

        Example: LogVars "BOOTP-*"              list all BootP variables

     LogDir
        Log (ie. display on the log) all files from the given path that
        match the pattern. The pattern can contain wildcards (? and *).

        Example: LogDir "/usr/g*p"              list files names like g...p

     LogTree
        Log the directory tree starting with the given path as root.


     LogFile
        Log the content of the file. The file must be no more than 64 KB
        big.


     ShowLog
        Make the log visible if it was hidden.  Automatically performed
        when ESC is pressed with "$AutoShowLog" == "ON" and when
        entering interactive mode.


     HideLog
        Prevent log messages to appear on the screen. Default state when
        BpBatch, MrBatch and MrZip are started on a script file.


     CaptureLog
        Record all log output to a 64 KB buffer until EndCapture is
        issued.  Wrap around buffer if the log output is more than 64 KB
        big.  This command can be used to create a text file with an
        arbitrary content.  The EndCapture MUST occurs within the same
        batch file.


     EndCapture (
        End up the capture of the log. If a filename is given, store the
        captured text to a file. Otherwise, discard it.


     Beep
        Make a sound. This command is equivalent to Echo "\007".


  5.1.6.  Control commands

  This section lists commands that control the batch execution.
  Optional arguments are listed between parenthesis.

     Include
        Load the given file and start up the parser on it. Go back to
        the current point when the include file processing is done.  The
        interpretation of characters above ASCII 127 within the include
        file depends on the value of $IsoLatin at the time the file is
        included.


     OnExit command
        Setup an exit-handler that will automatically be evaluated at
        the end of current batch file.


     Goto label
        Move the execution cursor to the given label (ie. the line
        starting with :label)


     Eval
        Perform all substitutions on the "command" and run the parser on
        it.


     If ...

          If (not) <expr1> (==|!=|<|>|>=|<=|=>|=<|<>) <expr2> <command>
          If (not) (ci) "str1" (==|!=|<|>|>=|<=|=>|=<|<>) "str2" <command>
          If (not) (ci) "str1" Match-Expr "pattern" <command>
          If (not) (ci) "str1" Match-Passwd "unix-passwd" <command>
          If (not) (ci) "str1" in "wordlist" <command>
          If (not) (ci) "str1" in-file "filename" <command>
          If (not) exist "filename" <command>
          If (not) valid <disk>:<partition> <command>


     These commands execute command; if the test succeeds.  The 1st form
     compares two numerical expressions.  The 2nd form compares two
     strings, optionally case-insensitive.  The 3rd form tests if "str1"
     matches the given pattern (wildcards allowed).  The 4th form tests
     if the clear password "str1" matches the Unix-crypted password.
     The 5th form tests if "str1" is included in the word list.  The 6th
     form tests if "str1" is included in the word file.  The 7th form
     tests if the given file exists.  The 8th form tests if the given
     partition is valid (i.e. formatted). This form is only supported by
     BpBatch versions after February 1999.


     Set ...

          Set variable = "string-value"
          Set variable = <expr>

     Setup a value for the given variable. If the given value is a
     numerical expresison, it will be implicitely converted to a string.
     A variable can be used anywhere by refering it as $variable or
     ${variable}.  If the resulting reference is to be interpreted as a
     string, it should be enclosed between double quotes: "$variable" or
     "${variable}".


     Delay duration
        Waits until the specified duration (expressed in seconds)
        expired.  See also the paragraph on the format of durations.


     GetTime variable, GetDate variable
        Get the CMOS time and store it into variablein the form
        HH:MM:SS.  Get the CMOS date and store it into variablein the
        form YY/MM/DD.  This can be used to customize the behavior of
        your boot scripts depending on the time of day or on the date.


     SetTime
        Set the computer CMOS time or date to the given value.  If you
        have a security gateway (our special TFTP server) running, you
        can automatically adjust the CMOS time and date of the client
        computers at each boot by evaluating the following command:

                include "$Security-Gateway:gettime"


     If you want to understand what this command does, just type:

             logfile "$Security-Gateway:gettime"

     Poweroff
        Turn off the computer.  This command only works if the computer
        is Advanced Power Management (APM) compatible.


  5.1.7.  Keyboard-related commands

  This section lists commands that let you monitor the keyboard input.
  Optional arguments are listed between parenthesis.  See also under
  National Language Support.

     GetKey (variable)
        Indefinitely wait until a key is pressed and store it in the
        variable.


     WaitForKey duration (command)
        Wait until a key is pressed for no more than duration seconds.
        If no key has been pressed after the given time, evaluate the
        command.  Otherwise, leave the key in the keyboard buffer.  See
        also the paragraph on the format of durations.


     Input (variable (max-length))
        Read a return-terminated string from the keyboard and store the
        result string in variable (without the terminating return). If
        max-length is given, do not allow the user to enter more than
        this number of characters.

        See also GetPasswd under Security-related commands.


     OnKey
        Setup a key handler that will automatically evaluate the given
        command when the key "c" is pressed (except is explicitely
        waited by a GetChar or an Input command). If the string
        "default" is used instead of a single character, the command is
        executed if any other key is pressed.


  5.1.8.  Text output commands

  This section lists commands used to perform regular text output.  All
  these commands can be used in graphic mode also, with the same
  behaviour (except that text mode provides 80x25 characters while
  graphic mode provides 100x37, because graphic mode characters are of
  size 8x16).  Optional arguments are listed between parenthesis.  See
  also under National Language Support.

     Print
        Print the specified string/expression at current cursor position
        and using current text attributes, then move the cursor.  Add
        "\r\n" to the end of the string to go to the next line.


     TextAttr fg-color bg-color
        Setup the text attributes. One can also put a single numeric
        value representing both colors and defined as 16*bg-color+fg-
        color.

        If you need more fantasy, you can use LoadFont. See under
        National Language Support.


     At line,col (command)
        Move the cursor position to the specified position and evaluate
        the command if provided.

        Example: At 10,20 Print "Gnats and rats !"

     Clear (color (pattern-char (top,left,bottom,right)))
        Fill the given text area with the given pattern-char (either a
        string or the decimal ascii code). The area defaults to the full
        screen, the pattern char defaults to the full block (ASCII dec
        219) and the color defaults to black (clear screen). Move the
        cursor to the upper left corner of the cleared area.

     BpMenu backward compatibility commands

          .ATT (<attribute>)
          .CLS (<attribute>)
          .DEF <key> (<timeout_val>)
          .KEY <key> <filename>
          .POS ((<x>) <y>)
          .PWD <key> <cpasswd>
          .WLN (<text>)
          .WRT <text>

     See InCom's manual for more infos. We wrote some time ago a program
     program for editing menu files using this syntax, but it is
     preferable to make your menus using the new explicit syntax.  Note
     that the .PWD command is not implemented because we do not now the
     password crypting algorithm used by InCom GmbH.


  5.1.9.  Graphics output commands

  This section lists commands used to perform graphic-mode output.  For
  the functions listed in this section, coordinates are given in pixels.
  You can also use all text output commands (see above) in graphic mode.
  Optional arguments are listed between parenthesis.

  Note that the graphic mode is automatically turned on whenever a
  graphic command is used, unless the variable VESA is set to "OFF".

     InitGraph (
        Turn on VESA graphics.  The origin is on the upper-left corner
        of the screen (0 0).  VESA graphics may hang some computers
        under Windows 95. Run MrBatch with the -v option to avoid such
        problems.

        You can request a specific video mode if you use the parameter
        "mode" This parameter is optional: if you do not specify any
        value, the video mode will be taken from the first field of the
        VESA-Modes variable.

        Valid modes are :

       640x480    =>  640 by 480 pixels, 256 colors

       800x600    =>  800 by 600 pixels, 256 colors (default mode)

       1024x768   =>  1024 by 768 pixels, 256 colors

       1280x1024  =>  1280 by 1024 pixels, 256 colors

        The VESA-Modes variable lists the video modes supported by your
        hardware.

        Example: InitGraph "640x480"


     CloseGraph
        Close VESA graphic mode and go back to text mode.


     DrawBar x-pos y-pos width height color
        VESA graphics. Draw a filled bar of the given size and colors.

     DrawWindow x-pos y-pos width height (bg-color (bar-color)) (
        VESA graphics. Draw a window of the given size and colors. The
        background color defaults to LightGray and the title-bar color
        defaults to Blue.  If you include a title string and a color,
        this text will be displayed in the title bar.


     Drawtext x-pos y-pos
        VESA graphics. Draw the text string at the given position with a
        transparent background. The color defaults to text foreground
        color.


     DrawGif
        VESA graphics. Load the given GIF-87a file and draw it on the
        screen.  The file can be interlaced, but must be in GIF-87a (not
        GIF-89a).  The image size should fit in the selected video mode.
        You cannot load a 1024x768 GIF file when you selected a 640x480
        mode.  The GIF position defaults to the top left corner of the
        screen (0 0).

        The color-strategy defines the allocation of colors in the
        palette when more than 256 colors are needed (for instance when
        two 256 colors GIF files are displayed simultaneously):

       Best-Colors  use best possible colors for the most recent GIF

       Spare-Colors try to avoid allocating colors, change existing
        colors

       Share-Colors try to avoid allocating colors, use existing colors

       Reuse-Colors allocate no new color, only use existing colors

        The default strategy is Best-Colors.


  5.1.10.  Security-related commands

  This section lists commands that help you authenticate a user.
  Optional arguments are listed between parenthesis.

  Some of these functions cooperate with a Security gateway, that you
  should first install. See the section on Special TFTP servers for more
  infos.

     GetPasswd (variable (max-length))
        Same as Input, but echo stars instead of the typed characters.


     Crypt
        Apply the Unix crypt function to the given 8-chars text and
        store the resulting crypted string into variable. The "salt" is
        usually a two-character string that will be found as the first
        two characters of the crypted string.

        Note that Unix crypt is a one-way function. It is not possible
        to decode the crypted string. One can only try to crypt another
        string with the same salt and compre the resulting crypted
        string.


     DESCrypt
        Crypt the given text using the given 8-chars key and store the
        result as an hexadecimal string in variable.

     DESDecrypt
        Decrypt the given hexadecimal string using the given 8-chars key
        and store the result in variable.


     MD5
        Compute the MD5 checksum of the given text and store it as an
        hexadecimal string in variable. Can be used as an alternative to
        the Unix crypt function to check for passwords bigger than 8
        characters.


     CheckUser
        Connect to the $Security-Gateway and check if the given user
        exist in the given radius domain and uses the specified
        password.  If the domain is "Unix", use the Unix user/password
        definition on the security gateway. For any other domain, use
        the security gateway domain definition file to determine the
        real Radius or NT domain to check.

        Set the value of $Security-Check to "PASSED" or "FAILED".  The
        password do not transit in clear on the network.


  5.1.11.  Disk-related commands

  This section lists commands for preparing the hard-disk.  Optional
  arguments are listed between parenthesis.

     GetPartitions variable (disk)
        Read the partition table(s) for the given disk and store it as a
        string into the given variable. The result string is a space-
        separated list of Type:Size, where

       Type is FAT16, EXT, BIGDOS, NTFS, FAT32, FAT32-LBA, BIGDOS-LBA,
        EXT-LBA, LINUX-SWAP, LINUX-EXT2 or the decimal filesystem id for
        unknown types.

       Size is the size of the partition in megabytes.

        See SetPartitions for more informations about partitions.


     SetPartitions
        Setup the partition table(s) to the content of the string. The
        format used is the same that for GetPartitions. This command
        also reset all boot flags (hint: use SetBootPart).

        The main partition table in the master boot record (MBR) has
        only four entries. Moreover, DOS and Windows accept only ONE FAT
        partition (called the Primary partition, C:) in the main
        partition table. Any supplemental FAT partition should be nested
        in an extended partition (and is thus called a Logical
        partition). If we give numbers 1-4 to the partitions described
        in the MBR partition table and numbers 5-8 to the partitions
        described in the first extended partition, the definition of two
        FAT partitions would work by defining partition 1 as FAT,
        partition 2 as EXT and partition 5 as FAT. Partitions 3,4,6,7
        and 8 should be marked as UNUSED. The same scheme can be used
        recursively to define more than two FAT partitions: nesting
        another extended partition in partition 6 and adding a logical
        FAT partition in partition 9.

        In the most strict interpretation of DOS specifications, that
        means that entries 3 and 4 of the partition tables are never
        used. In practice, some versions of DOS and some other OS are
        able to use more than two partitions per partition table, but
        there is no clear rule.  On this side, BpBatch is rather
        flexible in its interpretation of partition tables, it can often
        understands things that OSes cannot.

        One universal rule is that there should never be more than one
        extended partition per partition table, otherwise the partition
        numbering scheme breaks down.

        If you want to try funny configurations, make your own
        experiments, but don't complain if the OS does not recognize
        your partitions. The only way it is guarantee to work is to use
        the primary partition to store the OS boot partition, and to
        nest all other partitions, one at a time, in extended
        partitions.

        Example of extended partitions :

                SetPartitions "BIGDOS:100 EXT:400 EMPTY EMPTY BIGDOS:400"

     GetBootPart variable (disk)
        Get the partition number with the boot flag turned on (DOS says:
        the activated primary partition) and store it to the variable.
        The first partition is numbered 1.  If no partitions has the
        boot flag turned on, answers zero.


     SetBootPart partition (disk)
        Set the boot flag to the given partition. The boot flag let the
        master boot record (MBR) choose which partition to boot on.  The
        first partition is numbered 1.


     Blank partition (disk)
        Fill the given partitions with zeroes. Can take quite a lot of
        time for big partitions. Do not format the partition for any
        operating system. See also Clean.


     Clean partitions (disk) (
        Fast-format the given partition(s) according to the type
        declared in the partition table. If a label is given and the
        filesystem supports it, setup the partition label. For a
        paranoiac full format, call Blank on the partition first.

        Clean is supported for (FAT16) BIGDOS, FAT32, EXT, LINUX-EXT2
        and LINUX-SWAP partitions. To clean the master boot record
        (MBR), use Clean 0.

        Clean should be used on data partitions and on MBR/EXT
        partitions.  It is totally useless to clean a partition before
        unzipping a filesystem on it using FullUnzip.


     FullUnzip
        Decompress a full disk archive to the given partition,
        overwriting any existing file (clean-up on the fly).

        FullUnzip is supported for (FAT16) BIGDOS, FAT32 and LINUX-EXT2.

        This commands turn on VESA graphics to display a progress
        banner, unless VESA has been turned OFF.

     IncrUnzip
        Decompress an incremental disk archive to the given path. Files
        in the archive replace those with the same name on the target
        path, but other files are not deleted.

        IncrUnzip is supported for (FAT16) BIGDOS, FAT32 and LINUX-EXT2.
        This command is far less efficient than FullUnzip since the
        existing filesystem structure must be preserved. However, it
        avoids multiplying the number of different disk images by
        storing the differences only.


     FileUnzip
        Uncompress a file previously compressed with MrZip FileZip
        command.  The file is validated by a 32-bits CRC.


     Copy
        Copy the source file to the destinaton file, byte-to-byte.  Can
        be used after a FullUnzip for instance to update configuration
        files from the server without rebuilding the image.  Better to
        use FileUnzip for big and easy-to-compress files.


     Append
        Copy the first, then the second file to the destination file,
        byte-to-byte.  Can be used on arbitrary large files.  The
        destination file cannot be one of the two source files.


     Patch
        Read the source file and perform variable substitution before
        writing it to the destination file. The interpretation of
        characters above ASCII 127 depends on the value of $IsoLatin.

        By default, variables are recognized when prefixed by "${" and
        postfixed by "}". This can be changed to any other non-empty
        string.  remember that if you want to use a dollar sign within
        the prefix or suffix, you must escape it or it will get macro-
        evaluated. For instance, if you want to explicitely use the
        default prefix and postfix, use:

                Patch "source-file" "dest-file" "\${" "}"

     MkDir
        Recursively create directories from the root to the given full
        path.  If the path already exists, this command has no effect.


     Delete
        Remove the given file. The file must exist.


     DelTree
        Recursively remove all files and directories under the given
        path, and remove the directory itself.


  5.1.12.  Boot commands

  This section lists commands for continuing the boot process.  Optional
  arguments are listed between parenthesis.

     HideBootProm
        Restore the memory and the interrupt vectors allocated by the
        bootprom.  All attempts to make TFTP transfers will fail after
        calling this command.  It is usually a good idea to call this
        command before HdBoot, or you might run short of memory under
        DOS/Windows. This command is implicitely called by FloppyBoot.

        Note that although this function restore all vectors
        "officially" rerouted by the BootProm, it does not seems to
        restore everything.  But it works well enough for DOS and
        Windows.


     LoadRamDisk
        Load a floppy disk image into the extended memory and redirect
        the BIOS Disk Services to make floppy disk calls use this image
        instead. This command implicitely calls HideBootProm. Call
        FloppyBoot to boot on the ramdisk you just loaded.

        This kind of ramdisk may not be as robust as what you get when
        you use the TFTPBoot command. The only advantage is that it only
        steals a few hundred bytes of conventional memory instead of the
        >64 KB reserved by the TCP/IP BootPROM. Warning, nothing secures
        the extended memory in which the ramdisk resides.  There is no
        way to uninstall such a ramdisk.


     LoadZRamDisk
        Do the same as LoadRamDisk, but for an image that has been
        compressed using MrZip FileZip command. Compressed ramdisks are
        protected against data corruption (and uncomplete download) by a
        byte count and a 32-bits CRC.


     TFTPBoot
        Chain to another boot file (for instance a floppy image made
        with InCom's BpShell program). See the file referencing
        conventions for accessing a file on another TFTP server.


     FloppyBoot
        Hide the Boot ROM, load the floppy disk boot sector and boot on
        it.


     HdBoot (disk)(:partition)
        Load the given boot sector and boot from it. The disk default to
        zero, the first hard disk, and the partition defaults to zero,
        ie. the master boot record. You can boot from any partition, but
        be warned that Windows 95 may not let you boot a partition that
        has not been set as the boot partition (hint: use SetBootPart).

        This command does not implicitely call HideBootProm, so you
        might want to call it before.


     LinuxBoot
        Load the given kernel and ramdisk into the high memory, setup
        the command line and boot the kernel. It is a good idea to put
        at least a minimal command line with the location of the root
        filesystem (like "root=dev/hda1"/). If you are using a linux
        system that heavily relies on lilo (like RedHat Linux 5.1), it
        may be necessary to add to the command line something like
        BOOT_IMAGE=linux. Note that the kernel can be loaded by TFTP
        (automatically cached on the hard disk) or directly from the
        target root partition.
        This command works for small and big kernels (zImage and
        bzImage).


  5.1.13.  National language support

  This section lists commands related not national language support.
  Optional arguments are listed between parenthesis.

     RemapKeys
        National keyboard support. Remap given keys to other characters.
        For instance, to swap the Y and Z keys, use

                Remapkeys "yzYZ" "zyZY"


     It is a good idea to use the quoted octal notation when using char
     acters not included in the minimal ASCII character set, in order to
     avoid a dependency to the iso-latin modal settings.

     For international keyboards, there are two keys that produce a
     backslash in non-remapped (US) mode. Each of them can be
     independantly remapped, thanks to the fact that BpBatch sees one of
     them as a key answering ASCII code 252 (octal) or ASCII code 335
     (octal) when shifted.

     If you send me a sample script that does keyboard mapping for your
     national keyboard, I will make it available under
     http://cuiwww.unige.ch/info/pc/remote-boot/soft/sample-scripts To
     help you make your own keyboard mapping, I suggest pressing all
     special keys without remapping the keyboard and writing down the
     character they produce.  These will be the original-keys. The
     remapped-keys simply are the key you would have liked to see, in
     the same order. If some keys (either original or remapped) produce
     characters above ASCII dec 127, use the quoted octal notation. You
     can easily get the octal code for any given character by looking in
     the ASCII table of HelpPC for instance (HelpPC is a shareware
     hypertext on-line help program by David Jurgens).


     RemapAltkeys
        National keyboard support. Remap the given keys when ALT is
        depressed For instance, to map Alt-2 to the ampersand sign, use

                RemapAltKeys "2" "@"


     Note that dead keys are not supported.


     LoadCodePage
        Load and activate the given binary Codepage file.  Codepages are
        used for the translation of Unicode characters (present on VFAT
        valumes for instance) into 8-bits characters.  If you do not
        have the right Codepage loaded, you will get FAT warnings while
        accessing the filesystem when special characters are encountred.

        All binary codepage files are available at
        http://cuiwww.unige.ch/info/pc/remote-boot/soft/codepage.zip

        The default codepage is 850, a reordered superset of ISO-
        Latin-1.  If you load a more exotic codepage, you should usually
        turn the variable $IsoLatin to "off" or you might get
        meaningless implicit conversions. Moreover, if you want to
        display exotic characters, you should also load the proper
        screen font (use "LoadFont").
     LoadFont
        Load and activate a VGA/VESA font, both in text and graphic
        mode.  The font file must be a binary file of 16
        bztes/characters (8x16 bitmap). This command can be used for
        National Language Support as well as for Fantasy support.

        An archive with several fantasy fonts is available at
        http://cuiwww.unige.ch/info/pc/remote-boot/soft/fonts.zip.  This
        archive also contains a program to extract fonts for your
        codepage from the DOS .CPI file.


  5.1.14.  Commands specific to MrZip


     Source...

          Source (i)archive "filename"
          Source path "path"

     Set the source for the archive manipulation to the given
     (incremental) archive file or disk path.


     Dest...

          Dest (i)archive "filename"
          Dest (i)dump
          Dest path "path"

     Set the destination for the archive manipulation to the given
     (incremental) archive file, dump or disk path. To control the
     quantity of data displayed during dump, use the $DumpFormat special
     variable.


     FileZip
        Compress a file for further decompression with FileUnzip or for
        using as ZRamDisk. The file is validated by a 32-bits CRC.


     Filter...

          Filter -"pattern"
          Filter +"pattern"

     Avoid/allow files and directories matching the given pattern
     (wildcards allowed) to be included in the archive. The pattern is
     matched agains the full pathname. By default, all files are
     included in the image.  You only need to explicitely allow files
     that where cancelled by a filter.  Each negative filter has its own
     positive filter (allowed) sublist.

     For DOS/Windows images, you will typically use

             Filter -"*.swp"
             Filter -"temp/*"

     and for Unix images, you will typically use

             Filter -"var/log/*"
             Filter -"tmp/*"

     CopyArchive
        Start the archive manipulation operation, according to source,
        destination and filter settings. Except in a few circumstances,
        you will probably use the shortcut below instead of explicitely
        calling CopyArchive.  One circumstance in which you will use
        CopyArchive explicitely is when you want to change the
        fragmentation of an image, as follow:

                set FragmentSize="30 MB"
                Source archive "original.imz"
                Dest archive "refragmented.imz"
                CopyArchive

     FullZip
        Shortcut for

                        Source path "path"
                        Dest archive "full-archive"
                        CopyArchive


     You should usually first setup filters.


     IncrZip
        Shortcut for

                        Source path "path"
                        Dest iarchive "incr-archive"
                        CopyArchive

     FullDump
        Shortcut for

                        Source archive "full-archive"
                        Dest dump
                        CopyArchive

     IncrDump
        Shortcut for

                        Source iarchive "incr-archive"
                        Dest dump
                        CopyArchive

     XCopy
        Shortcut for

                        Source path "srcpath"
                        Dest path "dstpath"
                        CopyArchive

  5.2.  NoBreak.sys

  Nobreak.sys is a very small (about 350 bytes only) driver that you
  include at the beginning of your config.sys. Its goal is to secure the
  boot process, until the user is logged in.  DOS provides a setting for
  this (namely BREAK=OFF), but it is not drastic enough, and has almost
  no effect in the autoexec.bat.  Our driver works by modifying the
  scan-code of the key pressed when a break is requested, directly at
  the BIOS level.  This way, no program at all can receive a break until
  break is enabled again.

  The driver must be loaded from the config.sys (or using the devlod
  program from Undocumented DOS). Afterwards, break can be enabled by
  sending Yes to the NOBRK pseudo-device, and disabled again by sending
  No (in fact, only the first character, Y or N is significant).

  As this driver relies on the BIOS, it does only work for DOS and
  Windows 3.1.  Windows 95 has its own low-level keyboard handling
  routines.

  Assembler source code is available.


  6.  Special TFTP Servers

  As the only network support available in the TCP/IP BootPROM is TFTP,
  there is a special interest in enhancing TFTP servers for providing
  new capabilities.


  6.1.  Incom Enhanced TFTP Server

  InCom GmbH distributes with the TCP/IP BootPROM an enhanced TFTP
  server that can send packets of up to 1408 bytes instead of the
  standard 512 bytes.  This is a great enhancement that you should use.
  This server is available on the TCP/IP Bootprom Utility disk for
  Solaris, Windows and as Netware NLM.


  6.2.  Linux Enhanced TFTP Server

  We built a modified version of Linux TFTP server that acts as InCom
  enhanced TFTP server. Basically, we simply changed the packet size
  from 512 to 1408 bytes and the port from 69 to 59.  It is available
  from http://cuiwww.unige.ch/info/pc/remote-boot/soft/etdtpd.tar.gz.


  6.3.  The Security Gateway

  We wrote a special TFTP server that serves as security gateway for
  authenticating users. This server runs under Linux or Solaris, and can
  authenticate users according to a Unix password database (NIS and
  shadow passwords are supported), a Windows NT (or Samba) server or a
  Radius server.  It is available from
  http://cuiwww.unige.ch/info/pc/remote-boot/soft/stdtpd.tar.gz, with
  source and precompiled binaries.  The precompiled binaries do not
  include NT password encryption as we cannot distribute libdes but
  compilation is straightforward.

  In order to use the security gateway, you just have to setup a trivial
  security domains configuration file that describes to which
  authentication server each logical security domains maps (the Unix
  domain implicitely maps to the server Unix password database). This is
  a sample configuration file:


       ______________________________________________________________________
       #
       # STFTPD configuration file
       #
       # This file specify the server of the "security domains". Two types of
       # authentication servers are supported : radius or winnt (winnt includes
       # NT Server and Samba)
       #
       # Format of radius servers
       # radius        <domain>        <serveraddress>         <secret>
       #
       # secret is the secret word as specified in your /etc/raddb/clients file
       #
       # Format of SMB servers
       # winnt         <domain>        <serveraddress>         <netbiosname>
       #
       # netbiosname is the NETBIOS name of your server
       #
       # Examples
       radius         sec-dom-rad     radiusserver    testing123
       winnt          sec-dom-nt1     192.168.1.1     NTSERVER1
       winnt          sec-dom-smb     samba           SAMBA1
       ______________________________________________________________________

  Note that if you are using Samba, you must set security = user.

  You can also provide to the security server a file containing a list
  of users which are not allowed to log on (for which the check will
  fail anyways).


  6.4.  The Broadcast TFTP Server

  We wrote a special TFTP server that implements a home-made Broadcast
  variant of TFTP. Using this server, we were able to download images to
  25 clients on a heavily loaded 10 Mb ethernet network at 6 Mb/s (it is
  more efficient than the regular TFTP because it does not need to
  acknowledge each packets).  This server runs under Linux or Solaris.
  It is available from http://cuiwww.unige.ch/info/pc/remote-
  boot/soft/btdtpd.tar.gz, with source and precompiled binaries.

  As the TCP/IP bootprom does not support this protocol, our solution
  consist in booting a tiny ramdisk-based linux system using the tools
  described in this document, and running the Linux version of MrBatch
  which has built-in support for Broadcast TFTP. A simple batch file can
  the download all files to the cache in a few minutes, simultaneously
  on all client computers.  You do not need to install Linux yourself to
  use this package, except if you have exotic hardware and cannot
  directly use the kernel provided in the package.

  The process works as follow. First, you startup the broadcast server
  manually, giving the number of expected client computers as argument
  (remember, this procedure is not to be used every day but only when
  you changed an image and want to ensure it is immediately uploaded to
  all your client computers). Then, you turn on all client computers,
  which will run the following BpBatch script:


       ______________________________________________________________________
       #
       # This batch is run by bpbatch to launch a mini-linux using an initial
       # ramdisk, which will then run mrbatch under linux.
       #
       # The broadcast TFTP protocol only works with the Linux implementation of
       # mrbatch, because of the lack of broadcast support in the bootprom itself.
       #
       # 1. Setup a tiny partition, to let a lot of space for the cache
       setpartitions "BIGDOS:50"
       # 2. Clean the MBR
       clean 0
       # 3. Run a Linux Kernel with initrd (Initial Ramdisk) supprt, and use
       #    bcastrd.gz as the initial ramdisk (will be mounted root and then
       #    executed via /linuxrc). See initrd.txt for more details about
       #    initial ramdisks. You don't have to specify a root device (second
       #    parameter is null) to the kernel, it will use the initial ramdisk.
       linuxboot "linux.krn" "" "bcastrd.gz"
       # 4. The initial ramdisk will run dhcpcd to setup networking using DHCP.
       #    It will then run mrbatch -w bcastlx
       ______________________________________________________________________

  The initial ramdisk contains:

    dhcpcd, a DHCP client used to setup networking

    mrbatch

    linuxrc, a little wrapper automatically started by initrd and that
     starts dhcpcd then mrbatch.

    usr/lib/terminfo/l/linux, used by MrBatch

    dev/*, devices needed to run Linux and mrbatch

     All programs are statically linked and stripped, to avoid libc.so
     which is really huge. The resulting ramdisk is Gzipped and takes
     less than 300 KB. The kernel itself takes 450 KB (with many network
     cards and initrd support).  When Linux is up and running, MrBatch
     is called with the following script (that you should edit for your
     needs):

  ______________________________________________________________________
  # This file is executed when mrbatch is launched by the initial ramdisk
  # bcastrd.gz
  # It's main purpose is to "broacast copy" files to the cache
  #
  # 1. Be verbose
  showlog
  # 2. Don't want a "press a key"
  set pauselog="OFF"
  # 3. Set partitions at their final values.
  #    Important: Since you will copy files into the cache to be used in future
  #    boot, you need to specify the same partitions as in the future boots.
  setpartitions "BIGDOS:1024"
  # 4. Clean the CACHE partition
  clean -1
  # 5. And the copy files into the cache, using the Broadcast TFTP protocol
  #    (port 99)
  #
  # You can use the script "as is", but you surely need to modify the following
  # line ! In our example, we download the file mblinux.imz, which is the image
  # file for our installation of Linux.
  copy "$BOOTP-Server-IP@99:mblinux.imz" "{:-1}mblinux.imz"
  ______________________________________________________________________

  When the transfer is done, you can simply turn off all client comput
  ers and change their initial boot script to your favorite menu.

  Remote X Apps mini-HOWTO
  Vincent Zweije, zweije@xs4all.nl
  v, 19 November 1999

  This mini-HOWTO describes how to run remote X applications.  That is,
  how to have an X program display on a different computer than the one
  it's running on.  Or conversely: how to make an X program run on a
  different computer than the one you're sitting at.  The focus of this
  mini-HOWTO is on security.  This mini-HOWTO also contains information
  on running X applications locally, but with a different user-id.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Related Reading

  3. The Scene

  4. A Little Theory

  5. Telling the Client

  6. Telling the Server

     6.1 Xhost
     6.2 Xauth
        6.2.1 Making the Cookie
        6.2.2 Transporting the Cookie
        6.2.3 Using the Cookie
     6.3 Ssh

  7. X Applications from Another User-id

     7.1 Different Users on the Same Host
     7.2 Client User Is Root

  8. Running a Remote Window Manager

  9. Troubleshooting



  ______________________________________________________________________

  1.  Introduction

  This mini-HOWTO is a guide how to do remote X applications.  It was
  written for several reasons.

  1. Many questions have appeared on usenet on how to run a remote X
     application.

  2. I see many, many hints of ``use xhost +hostname'' or even ``xhost
     +'' to allow X connections. This is ridiculously insecure, and
     there are better methods.

  3. I do not know of a simple document that describes the options you
     do have. Please inform me zweije@xs4all.nl if you know more.

  This document has been written with unix-like systems in mind. If
  either your local or remote operating system are of another flavour,
  you may find here how things work. However, you will have to translate
  examples yourself to apply to your own system(s).
  The most recent version of this document is always available on WWW at
  http://www.xs4all.nl/~zweije/xauth.html. It is also available as the
  Linux Remote X Apps mini-HOWTO at
  http://sunsite.unc.edu/LDP/HOWTO/mini/Remote-X-Apps. Linux
  (mini-)HOWTOs are available by http or ftp from sunsite.unc.edu.

  This is version 0.6.1. No guarantees, only good intentions. I'm open
  to suggestions, ideas, additions, useful pointers, (typo) corrections,
  etc... I want this to remain a simple readable document, though, in
  the best-meant HOWTO style. Flames to /dev/null.

  Contents last updated on 19 November 1999 by Vincent Zweije


  2.  Related Reading

  A related document on WWW is ``What to do when Tk says that your
  display is insecure'', http://ce-toolkit.crd.ge.com/tkxauth/. It was
  written by Kevin Kenny. It suggests a similar solution to X
  authentication to that in this document (xauth). However, Kevin aims
  more at using xdm to steer xauth for you.

  The X System Window System Vol. 8 X ``Window System Administrator's
  Guide'' from O'Reilly and Associates has also been brought to my
  attention as a good source of information. Unfortunately, I've not
  been able to check it out.

  Yet another document much like the one you're reading now, titled
  ``Securing X Windows'', is available at
  http://ciac.llnl.gov/ciac/documents/ciac2316.html.

  Also check out usenet newsgroups, such as comp.windows.x,
  comp.os.linux.x, and comp.os.linux.networking.


  3.  The Scene

  You're using two computers. You're using the X window system of the
  first to type to and look at. You're using the second to do some
  important graphical work. You want the second to show its output on
  the display of the first. The X window system makes this possible.

  Of course, you need a network connection for this. Preferably a fast
  one; the X protocol is a network hog. But with a little patience and
  suitable protocol compression, you can even run applications over a
  modem. For X protocol compression, you might want to check out dxpc
  http://ccwf.cc.utexas.edu/~zvonler/dxpc/ or LBX
  http://www.ultranet.com/~pauld/faqs/LBX-HOWTO.html
  <http://www.ultranet.com/~pauld/faqs/LBX-HOWTO.html> (also known as
  the LBX mini-HOWTO).

  You must do two things to achieve all this:


  1. Tell the local display (the server) to accept connections from the
     remote computer.

  2. Tell the remote application (the client) to direct its output to
     your local display.


  4.  A Little Theory

  The magic word is DISPLAY. In the X window system, a display consists
  (simplified) of a keyboard, a mouse and a screen. A display is managed
  by a server program, known as an X server. The server serves
  displaying capabilities to other programs that connect to it.

  A display is indicated with a name, for instance:


    DISPLAY=light.uni.verse:0

    DISPLAY=localhost:4

    DISPLAY=:0

  The display consists of a hostname (such as light.uni.verse and
  localhost), a colon (:), and a sequence number (such as 0 and 4). The
  hostname of the display is the name of the computer where the X server
  runs. An omitted hostname means the local host. The sequence number is
  usually 0 -- it can be varied if there are multiple displays connected
  to one computer.

  If you ever come across a display indication with an extra .n attached
  to it, that's the screen number. A display can actually have multiple
  screens. Usually there's only one screen though, with number n=0, so
  that's the default.

  Other forms of DISPLAY exist, but the above will do for our purposes.

  For the technically curious:

    hostname:D.S means screen S on display D of host hostname; the X
     server for this display is listening at TCP port 6000+D.

    host/unix:D.S means screen S on display D of host host; the X
     server for this display is listening at UNIX domain socket
     /tmp/.X11-unix/XD (so it's only reachable from host).

    :D.S is equivalent to host/unix:D.S, where host is the local
     hostname.


  5.  Telling the Client

  The client program (for instance, your graphics application) knows
  which display to connect to by inspecting the DISPLAY environment
  variable. This setting can be overridden, though, by giving the client
  the command line argument -display hostname:0 when it's started. Some
  examples may clarify things.

  Our computer is known to the outside as light, and we're in domain
  uni.verse. If we're running a normal X server, the display is known as
  light.uni.verse:0. We want to run the drawing program xfig on a remote
  computer, called dark.matt.er, and display its output here on light.

  Suppose you have already telnetted into the remote computer,
  dark.matt.er.

  If you have csh running on the remote computer:



       dark% setenv DISPLAY light.uni.verse:0
       dark% xfig &



  or alternatively:

       dark% xfig -display light.uni.verse:0 &



  If you have sh running on the remote computer:



       dark$ DISPLAY=light.uni.verse:0
       dark$ export DISPLAY
       dark$ xfig &



  or, alternatively:



       dark$ DISPLAY=light.uni.verse:0 xfig &



  or, of course, also:



       dark$ xfig -display light.uni.verse:0 &



  It seems that some versions of telnet automatically transport the
  DISPLAY variable to the remote host. If you have one of those, you're
  lucky, and you don't have to set it by hand. If not, most versions of
  telnet do transport the TERM environment variable; with some judicious
  hacking it is possible to piggyback the DISPLAY variable on to the
  TERM variable.

  The idea with piggybacking is that you do some scripting to achieve
  the following: before telnetting, attach the value of DISPLAY to TERM.
  Then telnet out.  At the remote end, in the applicable .*shrc file,
  read the value of DISPLAY from TERM.


  6.  Telling the Server

  The server will not accept connections from just anywhere. You don't
  want everyone to be able to display windows on your screen. Or read
  what you type -- remember that your keyboard is part of your display!

  Too few people seem to realise that allowing access to your display
  poses a security risk. Someone with access to your display can read
  and write your screens, read your keystrokes, and read your mouse
  actions.

  Most servers know two ways of authenticating connections to it: the
  host list mechanism (xhost) and the magic cookie mechanism (xauth).
  Then there is ssh, the secure shell, that can forward X connections.



  6.1.  Xhost

  Xhost allows access based on hostnames. The server maintains a list of
  hosts which are allowed to connect to it. It can also disable host
  checking entirely. Beware: this means no checks are done, so every
  host may connect!

  You can control the server's host list with the xhost program. To use
  this mechanism in the previous example, do:



       light$ xhost +dark.matt.er



  This allows all connections from host dark.matt.er. As soon as your X
  client has made its connection and displays a window, for safety,
  revoke permissions for more connections with:



       light$ xhost -dark.matt.er



  You can disable host checking with:



       light$ xhost +



  This disables host access checking and thus allows everyone to
  connect. You should never do this on a network on which you don't
  trust all users (such as Internet). You can re-enable host checking
  with:



       light$ xhost -



  xhost - by itself does not remove all hosts from the access list (that
  would be quite useless - you wouldn't be able to connect from
  anywhere, not even your local host).

  Xhost is a very insecure mechanism. It does not distinguish between
  different users on the remote host. Also, hostnames (addresses
  actually) can be spoofed. This is bad if you're on an untrusted
  network (for instance already with dialup PPP access to Internet).


  6.2.  Xauth

  Xauth allows access to anyone who knows the right secret. Such a
  secret is called an authorization record, or a magic cookie. This
  authorization scheme is formally called MIT-MAGIC-COOKIE-1.


  The cookies for different displays are stored together in
  ~/.Xauthority.  Your ~/.Xauthority must be inaccessible for
  group/other users.  The xauth program manages these cookies, hence the
  nickname xauth for the scheme.

  On starting a session, the server reads a cookie from the file that is
  indicated by the -auth argument. After that, the server only allows
  connections from clients that know the same cookie. When the cookie in
  ~/.Xauthority changes, the server will not pick up the change.

  Newer servers can generate cookies on the fly for clients that ask for
  it. Cookies are still kept inside the server though; they don't end up
  in ~/.Xauthority unless a client puts them there. According to David
  Wiggins:


       A further wrinkle was added in X11R6.3 that you may be
       interested in. Via the new SECURITY extension, the X server
       itself can generate and return new cookies on the fly. Fur
       thermore, the cookies can be designated ``untrusted'' so
       that applications making connections with such cookies will
       be restricted in their operation. For example, they won't be
       able to steal keyboard/mouse input, or window contents, from
       other trusted clients. There is a new ``generate'' subcom
       mand to xauth to make this facility at least possible to
       use, if not easy.


  Xauth has a clear security advantage over xhost. You can limit access
  to specific users on specific computers. It does not suffer from
  spoofed addresses as xhost does. And if you want to, you can still use
  xhost next to it to allow connections.


  6.2.1.  Making the Cookie

  If you want to use xauth, you must start the X server with the -auth
  authfile argument. If you use the startx script, that's the right
  place to do it. Create the authorization record as below in your
  startx script.

  Excerpt from /usr/X11R6/bin/startx:



       mcookie|sed -e 's/^/add :0 . /'|xauth -q
       xinit -- -auth "$HOME/.Xauthority"



  Mcookie is a tiny program in the util-linux package, primary site
  ftp://ftp.math.uio.no/pub/linux/.  Alternatively, you can use md5sum
  to massage some random data (from, for instance, /dev/urandom or ps
  -axl) into cookie format:



       dd if=/dev/urandom count=1|md5sum|sed -e 's/^/add :0 . /'|xauth -q
       xinit -- -auth "$HOME/.Xauthority"



  If you can't edit the startx script (because you aren't root), get
  your system administrator to set up startx properly, or let him set up
  xdm instead. If he can't or won't, you can make a ~/.xserverrc script.
  If you have this script, it is run by xinit instead of the real X
  server. Then you can start the real X server from this script with the
  proper arguments. To do so, have your ~/.xserverrc use the magic
  cookie line above to create a cookie and then exec the real X server:



       #!/bin/sh
       mcookie|sed -e 's/^/add :0 . /'|xauth -q
       exec /usr/X11R6/bin/X "$@" -auth "$HOME/.Xauthority"



  If you use xdm to manage your X sessions, you can use xauth easily.
  Define the DisplayManager.authDir resource in /etc/X11/xdm/xdm-config.
  Xdm will pass the -auth argument to the X server when it starts.  When
  you then log in under xdm, xdm puts the cookie in your ~/.Xauthority
  for you.  See xdm(1) for more information. For instance, my
  /etc/X11/xdm/xdm-config has the following line in it:



       DisplayManager.authDir: /var/lib/xdm



  6.2.2.  Transporting the Cookie

  Now that you have started your X session on the server host
  light.uni.verse and have your cookie in ~/.Xauthority, you will have
  to transfer the cookie to the client host, dark.matt.er.

  The easiest is when your home directories on light and dark are
  shared. The ~/.Xauthority files are the same, so the cookie is
  transported instantaneously.  However, there's a catch: when you put a
  cookie for :0 in ~/.Xauthority, dark will think it's a cookie for
  itself instead of for light.  You must use an explicit host name when
  you create the cookie; you can't leave it out.  You can install the
  same cookie for both :0 and light:0 with:



       #!/bin/sh
       cookie=`mcookie`
       xauth add :0 . $cookie
       xauth add "$HOST:0" . $cookie
       exec /usr/X11R6/bin/X "$@" -auth "$HOME/.Xauthority"



  If the home directories aren't shared, you can transport the cookie by
  means of rsh, the remote shell:



       light$ xauth nlist "${HOST}:0" | rsh dark.matt.er xauth nmerge -



  1. Extract the cookie from your local ~/.Xauthority (xauth nlist :0).

  2. Transfer it to dark.matt.er (| rsh dark.matt.er).

  3. Put it in the ~/.Xauthority there (xauth nmerge -).


  Notice the use of ${HOST}.  You need to transport the cookie that is
  explicitly associated with the local host.  A remote X application
  would interpret a display value of :0 as referring to the remote
  machine, which is not what you want!

  It's possible that rsh doesn't work for you. Besides that, rsh also
  has a security drawback (spoofed host names again, if I remember
  correctly). If you can't or don't want to use rsh, you can also
  transfer the cookie manually, like:



       light$ echo $DISPLAY
       :0
       light$ xauth list $DISPLAY
       light/unix:0 MIT-MAGIC-COOKIE-1 076aaecfd370fd2af6bb9f5550b26926
       light$ rlogin dark.matt.er
       Password:
       dark% setenv DISPLAY light.uni.verse:0
       dark% xauth add $DISPLAY . 076aaecfd370fd2af6bb9f5550b26926
       dark% xfig &
       [15332]
       dark% logout
       light$



  See also rsh(1) and xauth(1x) for more information.

  It may be possible to piggyback the cookie on the TERM or DISPLAY
  variable when you do a telnet to the remote host.  This would go the
  same way as piggybacking the DISPLAY variable on the TERM variable.
  See section 5: Telling the Client.  You're on own here from my point
  of view, but I'm interested if anyone can confirm or deny this.


  6.2.3.  Using the Cookie

  An X application on dark.matt.er, such as xfig above, will
  automatically look in ~/.Xauthority there for the cookie to
  authenticate itself with.


  There's a little wrinkle when using localhost:D.  X client
  applications may translate localhost:D into host/unix:D for the
  purpose of cookie retrieval.  Effectively, this means that a cookie
  for localhost:D in your ~/.Xauthority has no effect.


  6.3.  Ssh

  Authority records are transmitted with no encryption. If you're even
  worried someone might snoop on your connections, use ssh, the secure
  shell. It will do X forwarding over encrypted connections. And
  besides, it's great in other ways too. It's a good structural
  improvement to your system. Just visit http://www.cs.hut.fi/ssh/, the
  ssh home page.

  Who knows anything else on authentication schemes or encrypting X
  connections? Maybe kerberos?


  7.  X Applications from Another User-id

  Suppose you want to run a graphical configuration tool that requires
  root privileges.  However, your X session is running under your usual
  account.  It may seem strange at first, but the X server will not
  allow the tool to access your display.  How is this possible when root
  can normally do anything?  And how do you work around this problem?


  Let's generalise to the situation where you want to an X appliation
  under a user-id clientuser, but the X session was started by
  serveruser.  If you have read the section on cookies, it is clear why
  clientuser cannot access your display: ~clientuser/.Xauthority does
  not contain the right magic cookie for accessing the display.  The
  right cookie is found in ~serveruser/.Xauthority.


  7.1.  Different Users on the Same Host

  Of course, anything that works for remote X also works for X from a
  different user-id as well (particularly slogin localhost -l
  clientuser).  It's just that the client host and the server host
  happen to be the same.  However, when both hosts are the same, there
  are some shortcuts for transferring the magic cookie.


  We'll assume that you use su to switch user-ids.  Basically, what you
  have to do is write a script that will call su, but wraps the command
  that su executes with some code that does the necessary things for
  remote X.  These necessary things are setting the DISPLAY variable and
  transferring the magic cookie.


  Setting DISPLAY is relatively easy; it just means defining
  DISPLAY="$DISPLAY" before running the su command argument.  So you
  could just do:



       su - clientuser -c "env DISPLAY=$DISPLAY clientprogram &"



  This doesn't work yet, because we still have to transfer the cookie.
  We can retrieve the cookie using xauth list "$DISPLAY".  This command
  happens to list the cookie in a format that's suitable for feeding
  back to xauth; just what we need!  So we feed the obtained cookie back
  to xauth in the su command, set DISPLAY there, and run the command we
  want.



       su - clientuser -c "xauth add `xauth list $DISPLAY`; \
                           exec env DISPLAY=$DISPLAY clientprogram"



  You can write a script around this, parameterizing by clientuser and
  clientprogram.  Let's improve the script a little while we're at it,
  making it less readable but more robust.  It looks like this:



       #!/bin/sh
       if [ $# -lt 2 ]
       then echo "usage: `basename $0` clientuser command" >&2
            exit 2
       fi
       CLIENTUSER="$1"; shift
       exec su - "$CLIENTUSER" -c "xauth add `xauth list \"$DISPLAY\"`; \
                                   exec env DISPLAY='$DISPLAY' "'"$SHELL"'" -c '$*'"



  I think this is portable and works well enough in most circumstances.
  The only shortcoming I can think of right now is that, due to using su
  command argument ('$*').  If there's anything seriously wrong with it,
  please drop me an email.


  Call the script /usr/local/bin/xsu, and you can do:



       xsu clientuser 'command &'



  Easy, no?


  7.2.  Client User Is Root

  Obviously, anything that works for non-root client users is going to
  work for root as well.  However, with root you can make it even
  easier, because root can read anyone's ~/.Xauthority file.  There's no
  need to transfer the cookie.  All you have to do is set DISPLAY, and
  point XAUTHORITY to ~serveruser/.Xauthority.  So you can do:



       su - -c "exec env DISPLAY='$DISPLAY' \
                         XAUTHORITY='${XAUTHORITY-$HOME/.Xauthority}' \
                         command"



  Putting it into a script would give something like:



  #!/bin/sh
  if [ $# -lt 1 ]
  then echo "usage: `basename $0` command" >&2
       exit 2
  fi
  su - -c "exec env DISPLAY='$DISPLAY' \
                    XAUTHORITY='${XAUTHORITY-$HOME/.Xauthority}' \
                    "'"$SHELL"'" -c '$*'"



  Call the script /usr/local/bin/xroot, and you can do:



       xroot 'control-panel &'



  Even easier, no?


  8.  Running a Remote Window Manager

  A window manager (like twm, wmaker, or fvwm95) is an application like
  any other.  The normal procedure should work.


  Well, almost.  At most one window manager can be running on a display
  at any time.  If you are already running a local window manager, you
  cannot start the remote one (it will complain and exit).  You have to
  kill (or simply quit) the local one first.


  Unfortunately, many X session scripts end with an



       exec window-manager-of-choice



  and this means that when the (local) window manager exits, your
  session exits, and the X system (xdm or xinit) considers your session
  over and effectively logs you out.


  You have to jump through a few extra hoops, but it can be done and
  it's not too difficult.  Just play with your session script (normally
  ~/.xsession or ~/.xinitrc) to get it as you want it.


  Beware that a window manager often provides ways to run new programs,
  and that these will run on the local machine.  That is, local to where
  the window manager runs.  If you run a remote window manager, it will
  spawn remote applications, and this may not be what you want.  Of
  course, they still display on the display that is local to you.



  9.  Troubleshooting

  The first time you try to run a remote X application, it usually does
  not work. Here are a few common error messages, their probable causes,
  and solutions to help you on your way.



       xterm Xt error: Can't open display:



  There is no DISPLAY variable in the environment, and you didn't tell
  the application with the -display flag either. The application assumes
  the empty string, but that is syntactically invalid. To solve this, be
  sure that you set the DISPLAY variable correctly in the environment
  (with setenv or export depending on your shell).



       _X11TransSocketINETConnect: Can't connect: errno = 101
       xterm Xt error: Can't open display: love.dial.xs4all.nl:0



  Errno 101 is ``Network is unreachable''.  The application could not
  make a network connection to the server.  Check that you have the
  correct DISPLAY set, and that the server machine is reachable from
  your client (it should be, after all you're probably logged in to the
  server and telnetting to the client).



       _X11TransSocketINETConnect: Can't connect: errno = 111
       xterm Xt error: Can't open display: love.dial.xs4all.nl:0



  Errno 111 is ``Connection refused''.  The server machine you're trying
  to connect to is reachable, but the indicated server does not exist
  there. Check that you are using the right host name and the right
  display number.



       Xlib: connection to ":0.0" refused by server
       Xlib: Client is not authorized to connect to Server
       xterm Xt error: Can't open display: love.dial.xs4all.nl:0.0



  The client could make a connection to the server, but the server does
  not allow the client to use it (not authorized). Make sure that you
  have transported the correct magic cookie to the client, and that it
  has not expired (the server uses a new cookie when a new session
  starts).




                            SLIP/PPP EMULATOR HOWTO

version 3.0 (updated 8/7/97) by Irish

    This document will describe how to get your Linux box to connect to a
   generic site via a SLIP/PPP emulator, such as SLiRP or TIA. I take no
   responsibility for your use of this information, but corrections are
   welcome.

   I will not attempt to describe all that can be done over this
   connection once established, but I will refer you to other documents
   or sites that will contain the relevant information.

   That done, let's do it!


     _________________________________________________________________

     * 1.0 How does an emulator work?

       It is important to understand how a SLIP/PPP emulator works in
       general, to be aware of its limitations. First, you do not need to
       install the emulator on your machine. It runs on your remote host
       only. What you need on your machine is the TCP/IP and SLIP or PPP
       protocols installed in your kernel (more on that in a bit), and
       some clients.

       Here's what happens: you send network requests from your machine
       to your remote host over the SLIP/PPP link. The emulator grabs
       them and sends them out to the Net at large. Then, incoming data
       is sent back from the Net to your account on the remote host,
       where the emulator grabs it and sends it back over the SLIP/PPP
       link to your machine. So, to the Net it appears as if you are
       working out of your account on the remote host, but to you it
       looks like you are really connected right to the Net.

       As you can see, this can confuse stuff that is incoming from the
       Net. For example, talk doesn't work via an emulator, because the
       incoming talk request tries to start the remote hosts talk daemon,
       not yours.

       The other big difference between an emulator and real SLIP/PPP is
       you are NOT assigned your own IP address; remember, you are only
       converting a dialup account to a SLIP/PPP connection.

     * 1.1 What is TIA?

       The Intenet Adaptor was written by the fine folks at
       marketplace.com. They have quit working on it now, and consider it
       a 'mature' product. The last version is 2.05; if you are going to
       use TIA, please get this version. !NOTE! At last report, only site
       licenses are available now.

     * 1.2 What is SLiRP? This is a freeware application, covered under
       the GNU Public License. It is out of beta, and is real stable. It
       sports a few more features than TIA, and is (reportedly) easier on
       host resources. Available at fine Linux FTP sites everywhere.

     * 1.3 What about Term?

       If you don't have root access to your machine for one reason or
       another, and you can't persuade someone who does to install SLIP
       and dip, then you won't have much choice except to use Term. If
       you want to know more about Term, please read the HOWTO on
       Sunsite.

     * 1.4 What about real SLIP/PPP?

       Hey, a lot of places are offering real SLIP/PPP at reasonable
       prices for non-dedicated dialup nowadays. If you can afford it, or
       feel the need, go for it. The Real Thing is always better than
       emulation. However, one of the things an emulator provides is
       security; it acts as an impregnable firewall, and with it you are
       pretty much as bulletproof as your provider is. You'll pay for it
       though, emulation is slower, and does not fully support every
       protocol. Still and all, emulation is good enough for most people,
       and is a fine way to connect to the Net.


     _________________________________________________________________

   Enough already! How do I set it up?

   Alright hotrod, we're getting there, but first there's some info you
   need to get, and a couple of explanations.

   First, you need to get the IP address of your provider, if you don't
   have it already. You can do this by typing 'who' at a shell prompt
   there, or reading their /etc/hosts, or even just asking them. While
   your getting that, get the IP address of the POP/SMTP host and the
   NNTP server (if you don't know what those are, trust me and ask for
   them anyway, you'll need 'em).

   Next, let me explain quickly about hostnames and domain names. The
   hostname is the first part of a machines name, the domain is the rest
   of it. Like this: hostname.domain.name (a four parter would be
   hostname.do.main.name). Together, they make a Fully Qualified Domain
   Name (FQDN).

   The name of your Linux machine is stored in /etc/HOSTNAME, and yes,
   you can change it. In fact, please do (if you're using Slackware,
   it'll be "darkstar.frop.org" by default). Just edit the /etc/HOSTNAME
   file to be whatever you want - remember, if you are using an emulator,
   you are essentially invisible to the Net at large, so you can be
   creative. However, if you plan to get a real SLIP/PPP connection down
   the road sometime, you'll probably want to conform to being a sub-host
   of your provider. For example, if your provider is
   "info.superhiway.com", the domain is "superhiway.com" and the hostname
   is "info". So you could either be "offramp.info.superhiway.com" or
   just "offramp.superhiway.com". Either would work, and in either case
   your hostname is "offramp".

     * 2.0 Preparing your Linux machine

       In a nutshell, here's what's required. I'll explain the first
       three in detail.


          + -> Compile your kernel to include SLIP and TCP/IP
          + -> Edit some files in /etc
          + -> Install and configure dip
          + -> Install pppd (optional, for PPP only)
   You will also need to get an emulator binary appropriate for your
       remote host and install it. SLiRP is available at Sunsite and
       other fine Linux FTP sites. All of the relevant info for TIA is
       available at TIAs home site.

   That's it! Let's get started.

     * 2.1 Compiling your kernel

       If you have never done this, you should. And you should read the
       FAQ first, but don't worry, it's easy. If you want, you can e-mail
       me and I'll help.

       I'll assume that you have here, for the sake of brevity. When you
       'make config', look for "Network Devices". Say 'y', of course,
       then say 'y' to SLIP, CSLIP, (or PPP) and TCP/IP and 'n' to
       everything else, unless you have ethercards or need some other
       protocol for something else. _If you don't do this, it won't work!
       _Finish compiling and installing the new kernel, then,

     * 2.2 Edit some files in /etc

       These files will set up your routes to your remote host. /etc is
       the directory for system configurations. Replace everything in
       double quotes with the appropriate values, naturally (but don't
       include the quotes - they are there for reference). There are
       three files you need to edit, they are:

          + /etc/hosts:

#The next line is required to be EXACTLY as below.
127.0.0.1       localhost

#Note at the end of the next two entries the hostname is repeated.
#This abbreviation is an alias, and is required for the first entry.
#If you're on a LAN, you'll need to substitute your IP address for
#the first one below.
192.0.2.1       "yourhostname.domain.name  yourhostname"
"XXX.XXX.XX.XX" "remotehostname.domain.name  remotehostname"
                  + /etc/host.conf:

order hosts, bind
multi on
                  + /etc/resolv.conf:

domain "yourdomain.name"
#The next line usually uses the same remote IP address that's in /etc/hosts
nameserver "XXX.XXX.XX.XX"
                  + To use an NNTPserver, put this line in your
            /etc/profile:

            export NNTPSERVER="remote.hosts.nntpservername"

     * 2.3.1 DIP

       DIP (Dialup Internet Protocol) is what you will use to dial up the
       remote host, start the emulator, and convert the line to SLIP/PPP.
       It comes in the "N" set of Slackware, along with a bunch of
       clients and utilities, some of which you may want to install also
       =). It is also available at Sunsite in an individual tar file

       Once you have it installed, you will need to have a dip script,
       Here's a sample, just plug in the appropriate stuff where the
       double quotes are (but don't include the quotes, they are there
       for reference).

       ----------CUT HERE--------------------------------


main:
  get $local "yourhostname.domain.name"
  get $remote "remotehostname.domain.name"

#Your port here
  port cua"?"

#Use 115200 for 28.8 modems
  speed 57400
  reset

#don't use spaces in your AT command string!
  init AT "string of commands"
  wait OK 5

# This will redial. If it doesn't work, play with the wait time (listen
# to your modem). If it still doesn't work, mail me.
# _See also; the note at the bottom of the script re: error codes._

dial:
  dial "phonenumber"
  print Dialing...
  if $errlvl != 0 goto error

#You may need to change this wait time to suit your modem
  wait BUSY 20
  if $errlvl == 0 goto dial

login:
  print Connected and Logging in...

#This wait and send gets me past my hosts Annex. _Change for your site!_
  wait ==> 60
  send 4\n
  wait ogin: 60
  if $errlvl != 0 goto login_error1
  send "LOGIN"\n
  wait assword: 60
  if $errlvl != 0 goto login_error2
  send "PASSWORD"\n

loggedin:
  wait "SYSTEM PROMPT" 60
  if $errlvl != 0 goto shell_error
  print Logged in!
  send "emulator startup command"\n
  wait "emulator startup response" 60
  if $errlvl != 0 goto emu_error

#The recommended mtu setting is 1500, but this is faster interactively.
#Ftp may be slower, so adjust to taste.
  get $mtu 296
  default

done:
  print CONNECTED to $remote with address $rmtip
  mode CSLIP
  goto exit

error:
  print Dialing Error

login_error1:
  print No Login

login_error2:
  print No Password prompt

shell_error:
  print No shell prompt

emu_error:
  There was a problem starting the emulator

exit:

#This will error out when the -v flag is used, but work when run normally
#(ends dip at a local prompt).
  \r
   -------------CUT HERE-----------------------------



     * 2.3.2 Dip notes Newer versions of dip don't return modem status
       codes (BUSY, NO CONNECT, etc.), they use numbers instead. Here's a
       table:

          + 0 = OK
          + 1 = CONNECT
          + 2 = ERROR
          + 3 = BUSY
          + 4 = NO CARRIER

   This would make your dial section look like this:

dial:
  dial "phonenumber"
  print Dialing...
  if $errlvl != 0 goto error
  wait 1 20
  if $errlvl != 1 goto dial


       Thanks to Lee Olds (lee@eskimo.com) for that bit.

       \n = newline, \r = carriage return. You may require one or the
       other (or both) in the appropriate places. If the ones provided
       don't work, experiment.

       A word about the form of the wait and sends. If it isn't clear by
       the example, here's what's happening:

  wait ogin: 60
        (the script will wait for the remote to send 'ogin:' for 60
         seconds. When it gets it, the script advances. If it doesn't get
         it, it will advance after the timeout of 60 seconds.)
  if $errlvl != 0 goto login_error1 (this whole line is optional)
        (if the script is advancing because it got what it was waiting for,
         this gets skipped. if the script is advancing because it timed out,
o        it will go to where you tell it to ('login_error1' in this case)
  send "LOGIN"\n
        (DIP will send 'LOGIN' and a newline)


       You can put in sleep statements if you need to, like this: "sleep
       10" This will make the script pause for 10 seconds.

       After editing this file, rename it, say, remote.dip and put it in
       /root. Then, as root, run 'dip remote'. Use the -v flag the first
       time to debug it ('dip -v remote'), this will show you all the
       steps dip takes.

       Dip will only run as root, but there is a way to make it run from
       a user account. For now, if you need this info, ask. I may include
       it in this file later if enough people want it.

       If dip errors out right away, try removing the comments from the
       script.

     * 2.4 PPP

       The above gets you rolling with CSLIP, which is really fine most
       of the time. It truly is easy to get working, since the protocol
       is supported at the kernel level - just make sure it's in there
       and it works.

       However, some of you will want PPP, for what reasons, only you can
       say. I'm not going to tell you how to set it up here, there's a
       whole other HOWTO written just for that. What I will do is tell
       you what the gotchas are when using PPP with an emulator.

       First, the latest version of DIP says you can use it to start PPP,
       and you can, BUT it only starts the PPP daemon - no flags,
       nothing. So if you want to use DIP to start PPP, be sure to put
       all of your startup info in the /etc/ppp/options file, or it won't
       work.

       Speaking of the options file, one of the things that MUST be in
       there no matter how you start pppd is this:
       '192.0.2.1:XXX.XXX.XX.XX'. What this is is
       'localIPaddress:remoteIPaddress'. You need it there because
       normally pppd can fill in the blank itself, but fails when
       connecting to an emulator.

       Be sure to get the latest and greatest pppd package. It seems
       there were a few versions recently that had a bit of trouble.

       Lastly, unless you have a good reason to use PPP, or just want to
       learn how it works, you really don't need it. I have tried them
       both, and didn't notice any performance difference with the
       standard set of clients. Of course, Your Mileage May Vary. :)


     _________________________________________________________________

     * 3.0 Now what?

       Hey, if all went well, you are now connected to the Net! Try a
       'telnet remotehostname' (remember that abbreviation in your hosts
       file?). You should get the remotes telnet login prompt. Go on, try
       it! You can now telnet/FTP/etc. anywhere on the Net from your
       local machine. How? Your machine is using the remote as a
       nameserver to resolve addresses (resolv.conf). Experiment, find
       out what works and what doesn't.

       You will not be able to use services that are not provided already
       on your remote host! For example, if your server doesn't allow
       telnets, chances are you can't do it either. Why? Because the
       emulator is only re-directing what is already available.

     * 3.1 Mail

       The obvious text based solution is Pine, you can get it from The
       University of Washington.

       My pick for 'Best Mail Reader, X Based' has to go to XFmail. This
       has now gotten out of beta, and rocks. Easy to install; requires
       no local mail system be installed (but will work with local
       spools) because it has POP built in - no more popclient/fetchpop!
       Easy to use; totally customizable from the GUI. Also supports
       MIME. Get it from The XFmail Homesite.

     * 3.2 News

       The text based News Reader SLRN is fairly simple to install and
       use. It is a true NNTP newsreader, which means _no local news
       transport is required_ to make it work (you don't have install
       Cnews or INN). It does require that you have access to an
       NNTPserver, naturally, but most ISPs have this. It is text based,
       but has color and mouse support, and runs fine in an rxvt window.

       The X based News Reader KNews is almost perfect. As with SLRN
       above, no local transport is required, but an NNTP server is. It's
       at least worth a look.

     * 3.3 Mosaic/Netscape

       Obviously, you will need to have X running for this to work, but
       it's a simple matter of FTPing the binary, unpacking it, and
       installing it.


     _________________________________________________________________

     * 4.0 Misc.

       If I've left anything out, or you still have questions, I read my
       mail daily. This information gets updated fairly regularly, so
       keep checking back every so often (I'll change the version
       numbers). Naturally, the more you contribute, the more info will
       be included here, so don't hesitate to tell me about whatever you
       have to offer.

       If you would like some help, or are having trouble with your
       setup, I'll help _but you must send me the following info:_ 1. A
       copy of your three /etc files. 2. A copy of your script output,
       run with the -v flag (_please_ remove your password from this!)
       Even if you don't have anything to contribute, but used this info
       sucsessfully, PLEASE MAIL ME. I want to know how useful this
       really is.
     * 4.1 References

       Sunsite is the FTP site sunsite.unc.edu, a veritable plethora of
       everything Linux, including almost every FAQ, HOWTO, and README
       written.

       Marketplace.com is the home of TIA, the only place it is
       available. I am Irish, irish@eskimo.com, available for comment on
       Linux almost everyday, when I'm not petting my cat or hugging my
       kid.



       This HOWTO is available in the following places:
          + http://www.eskimo.com/~irish
          + ftp://ftp.eskimo.com/u/i/irish
          + ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/TIA
  Saving Space mini-HOWTO
  By Guido Gonzato,  <mailto:guido@ibogeo.df.unibo.it>
  v1.0.1, 7 April 1999

  This mini-HOWTO gives you directions for squeezing your Linux instal
  lation into the least possible space. It's particularly aimed at note
  book users.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Software requirements

  3. The procedure

     3.1 Removing the Kernel Sources
     3.2 Pruning Out Applications
     3.3 Stripping Binaries
     3.4 Compressing with
     3.5 Gzipping around

  4. A Real Life Example

  5. The End

     5.1 Copyright
     5.2 Disclaimer


  ______________________________________________________________________

  1.  Introduction


  I've got a notebook I installed Linux on, beside Windows 95 that was
  pre--installed. I squeezed the Windows partition to 500 Mb, making
  space for a 240 Mb Linux one. Small though the latter may seem, I've
  managed to install a fairly complete Linux system on it, based on Red
  Hat 4.1 and some magic to save as much space as possible.

  If you're in need for space, the indications you'll find in the
  following sections will free up a considerable chunk of hard disk. The
  only caveat I'm giving you is: don't blame me if something goes wrong!
  We'll be using a couple of programs that worked fine for me, but are
  inherently dangerous.  You've been warned.

  2.  Software requirements


  You need:


    a fully working Linux system (any version should be OK);

    the common gzip compression utility, or alternatively bzip2 that
     you find on <ftp://sunsite.unc.edu:/pub/Linux/utils/compress>; this
     tool compresses better than gzip, but it's also a wee bit slower
     and consumes a lot of memory;

    the upx executable compressor, whose home page is at
     <http://cdata.tvnet.hu/~ml/upx.html> and <http://wildsau.idv.uni-
     linz.ac.at/mfx/upx.html>;

    the zlibc package, available on
     <ftp://sunsite.unc.edu:/pub/Linux/libs/compression>. It's called
     zlibc-X.X.tar.gz, where X.X is the latest version.

  There are other executable compressors. One is gzexe (forget it),
  while tcx was probably the best before upx became available; yet
  another is tzx, in theory better than tcx. The thing is, it screwed
  everything up when I tried it on a spare PC, though I'm not sure if I
  did something wrong. You had better stick with upx: it's reliable,
  efficient, and very handy.

  There are kernel patches that provide transparent file system
  compression a la Stacker, but as of this writing none of them has yet
  a reputation for stability and reliability. For safety's sake, steer
  clear.

  3.  The procedure

  3.1.  Removing the Kernel Sources


  The kernel sources take up more than 20 Mb, and you may want to remove
  them.  If so, I suggest that you compile a new kernel that is tailored
  to your machine once and for all, then get rid of the sources. Take
  care, though.

  I don't recommend that you remove the kernel sources unless you are
  sure that your machine is properly configured. Besides, you need the
  kernel #includes to compile C programs. Think twice!

  If you do decide so, do not remove the include/linux tree unless you
  know you'll never compile applications on your machine.

  3.2.  Pruning Out Applications


  Now, decide which applications you really need. Some may prove
  redundant: for instance, are you sure you can't live without emacs?
  You could use jed instead.

  It's up to you to decide what you want to keep. Some general points:


    gcc is a fairly large package. It's needed to recompile the kernel
     and all the applications for which there are no pre--built Linux
     binaries. It's also needed, of course, if you write your own C or
     Fortran (with f2c or g77) programs; consider your needs before
     removing it.  Other compilers like lcc are fine, but not up to gcc
     level. I suggest that you keep it;

    X11 is awfully large, but it's a nice thing to have. If you decide
     you can't give it up, at least try to make do with as little as
     necessary: only the right X server, one simple window manager, only
     one xterm, no 100 dpi fonts, and so on;

    TeX and accompanying packages are very large indeed. Giving up
     LaTeX and sticking to plain TeX saves a lot of space; giving up X11
     previewers like xdvi and ghostview is possible if you use dvitty,
     dvivga and some such. Eliminating the need for X11 dviware could
     even make X11 redundant;

    games are never ``necessary''.

  3.3.  Stripping Binaries


  Let's start reducing the size of binaries. Move to /usr/bin and issue
  the command

       machine:/usr/bin# strip *

  which will do away with symbols embedded in binaries. Repeat this step
  in /usr/X11R6/bin/ and other directories containing executables you
  may have (don't forget to locate TeX's and gcc's binaries), but do not
  run it under /sbin, /bin, or /usr/sbin/ if you value your
  installation!

  3.4.  Compressing with upx


  First, install upx and read its documentation. Then go to /usr/bin and
  run it with the command upx *; it will compress all executables,
  including suid ones (tcx wouldn't). Repeat this step in other
  directories as seen above.

  Remember to compress the executables whenever you install a new
  package!

  3.5.  Gzipping around


  There are lots of other files that can be compressed once and for all.
  Let's start with /usr/doc/; move to this directory and issue the
  command

       machine:/usr/doc# find . -type f -exec gzip -9 {} \; 2> /dev/null

  Remember to compress the docs whenever you install a new package!

  Repeat this step in the directory containing the documentation for TeX
  (on my system, /usr/lib/texmf/texmf/doc/. If you're really sure,
  remove these directories altogether.

  Now, install zlibc and compile it. If your system is like mine, the
  compilation process will abort complaining about a missing (static)
  libc.  Never mind; you'll find a file called uncompress.o that is
  what's needed. Move it to /usr/local/lib/ and add this line to your
  /etc/profile:

       export LD_ELF_PRELOAD=/usr/local/lib/uncompress.o

  Now, you can compress with gzip not only documentation, but also data
  files: the applications that use them will be able to use them
  nonetheless.  In theory, the trick should work with most applications,
  but in practice your degree of success may vary. Mine was rather
  unimpressive.

  4.  A Real Life Example


  This is what I got applying the above procedure to one of my machines.
  Before the treatment, df reported I used 398,798 1024--blocks:


    I didn't remove the kernel sources and the kernel headers;

    I uninstalled several applications and all of the games, but I left
     X11, X11 development, C and Fortran development, Tcl/Tk, networking
     tools, and a few other standard applications. df reported 244,668
     used blocks;

    I ran upx on /usr/bin, /usr/X11R6/bin,
     /usr/lib/texmf/bin/i586-linux, and /usr/lib/gcc-
     lib/i386-linux/2.7.2.1. 226,270 used blocks;

    I compressed the documentation under /usr/doc and
     /usr/lib/texmf/texmf/doc: 198,745 used blocks.

  To sum up, I started with 398,798 blocks and finished with 198,745.
  Think of the stuff you can shove in those 200,000 spared blocks! I
  would have saved even more if I had used bzip2 instead of gzip.

  On average, if you are careful from the beginning and install only the
  necessary applications, compressing executables and documents will
  save you some 20 Mb. On a notebook, this can be a lifesaver.

  5.  The End

  5.1.  Copyright


  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at tjbinum@sunsite.unc.edu via email.


  5.2.  Disclaimer


  ``Saving Space mini-HOWTO''was written by Guido Gonzato,
  <REMOVE_MEguido@ibogeo.df.unibo.it>.

  This document is provided ``as is''. I put great effort into writing
  it as accurately as I could, but you use the information contained in
  it at your own risk. In no event shall I be liable for any damages
  resulting from the use of this work.

  Feedback is welcome. For any requests, suggestions, flames, etc., feel
  free to contact me.

  Enjoy Linux and life,

  Guido   =8-)

  Secure POP via SSH mini-HOWTO
  Manish Singh, <yosh@gimp.org>
  v1.0, 30 September 1998

  This document explains how to set up secure POP connections using ssh.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. The Basic Technique

     2.1 Setting up Port Forwarding
     2.2 Testing it out

  3. Using it With Your Mail Software

     3.1 Setting up fetchmail
     3.2 Automating it all
     3.3 Not using fetchmail

  4. Miscellany

     4.1 Disclaimer
     4.2 Copyright
     4.3 Acknowledgements


  ______________________________________________________________________

  1.  Introduction


  Normal POP mail sessions, by their very nature, are insecure. The
  password goes across the network in cleartext for everyone to see.
  Now, this may be perfectly acceptable in a trusted or firewalled
  environment. But on a public network, such as a university or your
  run-of-the-mill ISP, anyone armed with a simple network sniffer can
  grab your password right off the wire. This is compounded by the fact
  that many people set their computers to check for mail at regular
  intervals, so the password is sent out quite frequently, which makes
  it easy to sniff.

  With this password, an attacker can now access your email account,
  which may have sensitive or private information. It is also quite
  common that this password is the same as the user's shell account, so
  there is the possibility for more damage.

  By doing all POP traffic using an encrypted channel, nothing goes in
  cleartext over the network. We can use ssh's diverse methods of
  authentication, instead of a simple plaintext password. That is the
  real point of using this method: not because we get encrypted content
  (which is futile at this point, since it's probably gone unencrypted
  over several networks already before reaching your mailbox; securing
  those communications is the job of GNU Privacy Guard or PGP, not ssh),
  but the secure authentication.

  There are other methods of achieving secure authentication already,
  such as APOP, KPOP, and IMAP. However, using ssh has the advantage
  that it works with normal POP configurations, without requiring
  special client (not all mail clients support advanced protocols) or
  server support (except for sshd running on the server). You mail
  provider may be unable or unwilling to use a more secure protocol.
  Besides, by using ssh you can compress the traffic too, which is a
  nice little extra for people with slow connections.


  2.  The Basic Technique


  This technique relies on a fundamental feature of ssh: port forwarding

  There are many variations on this theme, which depend on your desired
  mail setup. They all require ssh, which is available from
  http://www.ssh.fi/ and mirrors.  RPMs are available at
  ftp://ftp.replay.com/pub/crypto/ and Debian packages are available at
  ftp://non-us.debian.org/debian-non-US/ (and their respective mirrors).


  2.1.  Setting up Port Forwarding


  To start port forwarding, run the following command:

       ssh -C -f popserver -L 11110:popserver:110 sleep 5

  Let's take a closer look at that command:

     ssh
        The ssh binary itself, the magic program that does it all.


     -C This enables compression of the datastream. It's optional, but
        usually useful, especially for dialup users.


     -f Once ssh has done authentication and established port
        forwarding, fork to background so other programs can be run.
        Since we're just using the port forwarding features of ssh, we
        don't need a tty attached to it.


     popserver
        The POP server we're connecting to.


     -L 11110:popserver:110
        Forward local port 11110 to port 110 on the remote server
        popserver. We use a high local port (11110) so any user can
        create forwardings.


     sleep 5
        After ssh has forked itself into the background, it runs a
        command. We use sleep so that the connection is maintained for
        enough time for our mail client to setup a connection to the
        server. 5 seconds is usually sufficient time for this to happen.


  You can use most other options to ssh when appropriate. A common
  setting may be a username, since it might be different on the POP
  server.

  This requires sshd running on the remote server popserver. However,
  you do not need to have an active shell account there. The time it
  takes to print a message ``You cannot telnet here'' is enough to setup
  a connection.


  2.2.  Testing it out


  Once you've figured out the details command to run to establish port
  forwarding, you can try it. For example:

       $ ssh -C -f msingh@popserver -L 11110:popserver:110 sleep 1000

  popserver is the ol' POP server. My username on my local machine is
  manish so I need to explicitly specify the username msingh. (If your
  local and remote usernames are the same the msingh@ part is
  unnecessary.

  Then it prints:

       msingh@popserver's password:

  And I type in my POP password (you may have different shell and POP
  passwords though, so use your shell one). Now we're done! So we can
  try:

       $ telnet localhost 11110

  which should print something like:

       QUALCOMM POP v3.33 ready.

  Woohoo! It works! The data is sent out over the network encrypted, so
  the only cleartext is over the loopback interfaces of my local box and
  the POP server.


  3.  Using it With Your Mail Software


  This section describes setting up your POP client software to use the
  ssh forwarded connection. It's primary focus is fetchmail (ESR's
  excellent mail-retrieval and forwarding utility), since that is the
  most flexible software I have found for dealing with POP. fetchmail
  can be found at http://www.tuxedo.org/~esr/fetchmail/.  It will do you
  a great service to read the excellent documentation that comes with
  fetchmail.


  3.1.  Setting up fetchmail


  The following is my .fetchmailrc

       ______________________________________________________________________
       defaults
               user msingh is manish
               no rewrite

       poll localhost with protocol pop3 and port 11110:
               preconnect "ssh -C -f msingh@popserver -L 11110:popserver:110 sleep 5"
               password foobar;
       ______________________________________________________________________

  Pretty simple, huh? fetchmail has a wealth of commands, but the key
  ones are the preconnect line and the poll option.

  We're not connecting directly to the POP server, but instead localhost
  and port 11110. The preconnect does the forwarding each time fetchmail
  is run, leaving open the connection for 5 seconds, so fetchmail can
  make it's own connect. The rest fetchmail does itself.

  So each time you run fetchmail, you're prompted for your ssh password
  for authentication. If you run fetchmail in the background (like I
  do), it's inconvenient to have to do that. Which brings us to the next
  section.


  3.2.  Automating it all


  ssh can authenticate using many methods. One of these is an RSA
  public/private key pair. You can generate an authentication key for
  your account using ssh-keygen. An authetication key can have a
  passphrase associated with it, or the passphase can be blank. Whether
  you want a passphrase depends on how secure you think the account you
  are using locally is.

  If you think your machine is secure, go ahead and have a blank
  passpharase.  Then the above .fetchmailrc works just by running
  fetchmail. You can then run fetchmail in daemon mode when you dial up
  and mail is fetched automatically. You're done.

  However, if you think you need a passphrase, things get more complex.
  ssh can run under control of an agent, which can register keys and
  authenticate whatever ssh connections are made under it. So I have
  this script getmail.sh:

       ______________________________________________________________________
       #!/bin/sh
       ssh-add
       while true; do fetchmail --syslog --invisible; sleep 5m; done
       ______________________________________________________________________

  When I dialup, I run:

       $ ssh-agent getmail.sh

  This prompts me for my passphrase once, then checks mail every 5
  minutes. When the dialup connection is closed, I terminate ssh-agent.
  (This is automated in my ip-up and ip-down scripts)


  3.3.  Not using fetchmail


  What if I can't/don't want to use fetchmail? Pine, Netscape, and some
  other clients have their own POP mechanisms. First, consider using
  fetchmail! It's far more flexible, and mail clients shouldn't be doing
  that kind of stuff anyway. Both Pine and Netscape can be configured to
  use local mail systems.

  But if you must, unless your client has a preconnect feature like
  fetchmail, you're going to have to keep the ssh port forward active
  for the entire time you're connected. Which means using sleep
  100000000 to keep the connection alive. This might not go over well
  with your network admins.

  Secondly, some clients (like Netscape) have the port number hardcoded
  to 110.  So you need to be root to do port forwarding from privledged
  ports. This is also annoying. But it should work.


  4.  Miscellany

  4.1.  Disclaimer


  There is no guarantee that this document lives up to its intended
  purpose. This is simply provided as a free resource. As such, the
  author of the information provided within cannot make any guarentee
  that the information is even accurate. Use at your own risk.

  Cryptographic software such as ssh may be subject to certain
  restrictions, depending on where you live. In some countries, you must
  have a license to use such software. If you are unsure of your local
  laws, please consult someone who is familiar with your situation for
  more information.

  The use of the information provided in this document is most likely
  not anticipated by your mail service provider. The author does not
  encourage the abuse and misuse of network services, and provides this
  document for informational purposes only. If you are in doubt about
  whether the use of these techniques falls within the service agreement
  of your mail provider, please clear that up beforehand.


  4.2.  Copyright


  This document is copyright  1998 Manish Singh <yosh@gimp.org>

  Permission is granted to make and distribute verbatim copies of this
  manual provided the copyright notice and this permission notice are
  preserved on all copies.
  Permission is granted to copy and distribute modified versions of this
  document under the conditions for verbatim copying, provided that this
  copyright notice is included exactly as in the original, and that the
  entire resulting derived work is distributed under the terms of a
  permission notice identical to this one.

  Permission is granted to copy and distribute translations of this
  document into another language, under the above conditions for
  modified versions.

  Commercial redistribution is allowed and encouraged; however, the
  author would like to be notified of any such distributions.

  All trademarks used in this document are acknowledged as being owned
  by their respective owners.


  4.3.  Acknowledgements


  Special thanks goes to Seth David Schoen
  <schoen@uclink4.berkeley.edu>, who enlightened me in the ways of ssh
  port forwarding.


                             Sendmail + UUCP HOWTO


    Author: Jamal Hadi Salim (jamal@glcom.com or hadi@cyberus.ca)



  History:

     Initial edition July/96: works only with non-bind edition of
   sendmail

     Oct 01 /96: works with the redhat supplied binary

     Oct 07 /96: added/modified a tip on how to compile non-bind sendmail

     Oct 25 /96: added/modified a tip on how to keep sendmail
   getHostbyAddr() happy via a dummy /etc/hosts entry

     Mar 15 /97: I am amazed at the response/feedback i am receiving so i
   decided to refine this further. Fixed some small errors; added diagram
   + references.

     Oct 25/97: Htmlise+ add blurb on DNS capable machines
   ______________________________________________________________________

   After finally settling down and properly reading TFM (the Bat Book, to
   be precise) i have solved the Caramilk secret! The steps below have
   been tested with the binary supplied by RedHat. Perhaps i should send
   this tip to the maintainer of the Sendmail FAQ too since there is
   absolutely no mention of UUCP interworking with sendmail there.

What this Document tries to show you

   How to setup a single machine, reffered to as me.com in the example,
   with no direct access to the internet to route mail for you via
   sendmail and UUCP to a 'smarter host' eg your ISP.
   Optionally you can configure this machine to feed other machines i.e
   you are their 'smart' host or gateway.

What this Document does not tell you

   I have been receiving incredible number of questions regarding topics
   which are beyond the focus of this HOWTO. The purpose of this document
   is not to describe them so please try not send me any questions on the
   following:


  a) How to setup UUCP.

   Refer to many fine references on this, including:

     UUCP HOWTO (Vince Skahan, )

     Using and managing UUCP (Ed Ravin et al -- publisher O'reilly) which
   i think is the best authority on UUCP

     Linux Network Administrator Guide (Olaf Kirch)


  b) how to setup DNS.

   Refer to the many fine references on this, including:

     Caching named mini howto (Nicolai Langfeldt)

     The bat book (Sendmail;Costalles, Allman, Rickert;publisher
   O'reilly)

     DNS and BIND (Publisher O'reilly)

     TCP/IP Network Administration (Hunt, Craig;Publisher O'reilly)

     Linux Network Administrator Guide (Olaf Kirch)

     sendmail Theory and Practice (Avolio and Vixie; publisher Digital
   press)


  c) how to setup databases (other than the mailertable) to work with sendmail.

   Refer to the many fine references on this, including:

     The bat book (Sendmail;Costalles, Allman, Rickert -- publisher
   O'reilly)

     TCP/IP administration (Publisher O'reilly)

     Sendmail Theory and Practice (Avolio and Vixie; publisher Digital
   press)

     Docs bundled with sendmail d) how to write or modify rulesets or
   mailers.

     All the above references  in c)

   You can also find help on the following newsgroups:
   [1]comp.mail.sendmail
   [2]comp.mail.uucp
   [3]comp.os.linux.networking
   IRC channels
   #linux, #unix
   ______________________________________________________________________

THE SETUP

   This is for a system, hypothecally named me.com, whose mail is sent
   out only via UUCP. mysmarthost is the ISPs hostname as set up in the
   uucp sys file and me.com is the hostname we use or are known by in the
   MX records on the internet.
   mysmarthost hooks to the internet. We really dont care how it does it,
   we just know it knows how to get us there.
   me.com, whose setup we describe in the example, feeds sites down.com
   and system1.org and their subnodes. me.com connects to down.com via
   TCP/IP and connects to system1.org via raw UUCP using a phone line.
   The setup description is shown below:

        ------------------------
        |                       |
        |     Internet          |
        |                       |
        -----------------------
                    |
                    | PPP/dedicated line running TCP-IP
                    |
                -------------
                |            |
                |mysmarthost | Authoritative name server for
                |            | *.me.com, *.down.com, *.system1.org
                |            |
                --------------
                    |
                    | UUCP via a phone line receive for
                    | system1.org, *.system1.org,*.down.com, down.com
                    | as well as me.com and *.me.com
                 ------------
                | * *****  *  |
   ------------ | * me.com *  | ------
                | *        *  |      |
   |            | * *****  *  |      |
   |             ------------        |
   |UUCP via phone line              | uucp via TCP/IP
   |                                 |
 -----------                  -----------
|           |                |           |
|system1.org|                | down.com  |-------
|           |                |           |      |
 ----------                  ------------       |
     |                                          |
     |                                          |
     |                                          | LAN: smtp to nodes
     | UUCP phone line
     |                                          |
-----------                             -------------
|         |                             |           |
|system1's|                             | down's    |
|subnodes |                             | LAN       |
|         |                             ------------
----------

 pre-requisites

   1) If you are already running DNS or have a pointer to a DNS server
   (in your /etc/resolv.conf) and are on a live connection to the net
   then skip this part. You are safe. You dont have to do any 'smart'
   thing skip to  2)
   If you are on a machine using uucp for mail then you dont really need
   to compile bind/resolv into sendmail;

  How to survive name canonicalization on a stand-alone machine with no DNS

   PART I
    If you get a pre-compiled sendmail with BIND in it you can still live
   with it (As is the case with Redhat supplied sendmail).

   a) Refer to my solution for this based on the m4 file described (my
   favorite). Try to use this option unless you really insist on b) or c)
   below OR

   b)If you talk to me i could supply you with a non-BIND compiled
   version (8.8.5). Perhaps RedHat should consider supplying two sendmail
   binaries (like slakware) One with BIND and the other with no BIND. OR

   c) The quickest solution to get sendmail with no bind is to edit
   src/conf.h lines below to read as i have shown:

   # ifndef NAMED_BIND conf.h:# define NAMED_BIND 0 /* use Berkeley
   Internet Domain Server */

   PART II:
   Sendmail would however normally insist on doing name look ups to
   resolve the host part using gethostbyaddr() for each email it sends
   (even if you tell it not to canonify names).

   a) use an RFC1597 IP address (10.0.0.0-10.255.255.255,
   172.16.0.0-172.31.255.255, 192.168.0.0-192.168.255.255)
   Edit /etc/hosts and add the following as a sample for the host myhost
   10.0.0.1 myhost.me.com myhost or
   b) If you use NIS (and NIS is compiled into sendmail as seems to be
   the case in Redhat. ) make sure the /etc/nsswitch.conf file contains:
   hosts: files dns and in /etc/hosts and add the following as a sample
   for the host myhost [again using RFC1597 IP addressing scheme]
   10.0.0.1 myhost.me.com myhost

   NOTE: ---- In both a) and b) above it is critical that you list the
   long (fully qualified) in the /etc/hosts file used. i.e the line
   should read 10.0.0.1 myhost.me.com myhost and NOT 10.0.0.1 myhost you
   will also need to define the sendmail $w macro to hold myhost.me.com
   add the Following line to your /etc/sendmail.cf after it is generated
   Djmyhost.me.com (or you can use MASQUAREADE_AS(myhost.me.com) in the
   .mc below)

   NOTE!!!!! myhost as a domain name is given as an example; you dont
   have to use it as is. Pick your own hostname if you dont have one
   already.
   ______________________________________________________________________

   2) Ensure that you have makemap and it is capable of supporting hash
   and or the more common dbm format  or even btree format (The Redhat
   version does not support dbm). Makemap is normaly distributed with
   sendmail.


  SETUP (the mc file)

   I) create your .mc file using your favorite editor; i'll call this
   file my.mc

   a) No DNS -- standalone
   ______________________________________________________________________

   include(`../m4/cf.m4')
   VERSIONID(`me.com's setup with uucp created by xxxx --no dns ')
   dnl OSTYPE(linux)
   FEATURE(nodns)dnl
   FEATURE(nocanonify)dnl
   FEATURE(always_add_domain)dnl
   FEATURE(mailertable, hash /etc/mailertable)dnl
   MAILER(local)dnl
   MAILER(smtp)dnl
   MAILER(uucp)
   define(`SMART_HOST', uucp-dom:mysmarthost)
   ______________________________________________________________________

   Let's dissect this:

     include(`../m4/cf.m4') requests for the m4 macro found in
   ../m4/cf.m4 to be include to resolve some things

     VERSIONID(`me.com's setup with uucp created by xxxx')dnl  This is
   used to distinguish the different versions of .cf file you might end
   up creating.

     OSTYPE(linux) This is used to define/redefine linux specific stuff.
   It is safe to have it here.

     FEATURE(nodns)dnl This says we dont have a DNS server (so in effect
   we are using uucp only for mail. Sendmail must be compiled not to use
   bind) This is now obsolete. I will let it stay here just in case you
   use an older version of sendmail.

     FEATURE(nocanonify)dnl This says Don't pass addresses to $[ ... $]
   for canonification. Normally if you have BIND compiled in sendmail
   would try and expand the alias/IP address to a canonical name using
   DNS. You dont wanna do this if all you have are feeds which connect to
   you via UUCP i.e you are a stand alone.

     FEATURE(always_add_domain)dnl This adds the local domain host name
   even on locally delivered mail Not necessary i just like it; This
   might not be a safe feature since spammers, with proper setup
   conditions, can abuse you.
   me.com is not connected to the net via tcp/ip so it is safe

     FEATURE(mailertable, hash /etc/mailertable)dnl the file
   /etc/mailertable is going to be a hash database where we will store
   routing information of certain sites. If you dont have anyone who you
   feed uucp to then you dont need this. More on this later. If you
   wanted to use the dbm format you would have FEATURE(mailertable, dbm
   /etc/mailertable)dnl  If you wanted to use the btree format you would
   have FEATURE(mailertable, btree /etc/mailertable)dnl

     MAILER(local)dnl MAILER(smtp)dnl MAILER(uucp) These are the mailers
   we use.

     define(`SMART_HOST', uucp-dom:mysmarthost) Our smart host is our ISP
   who is defined in the uucp sys file as system mysmarthost. Any
   messages that we cant handle (i.e ones for domains or mailers we dont
   understand) will be passed on to our smarthost/ISP to figure out. note
   we use  uucp-dom as the uucp mailer. This particular mailer uses smtp
   rewriting rules.


   b) DNS on
   ______________________________________________________________________

   include(`../m4/cf.m4')
   VERSIONID(`me.com's setup with uucp created by xxxx --dns enabled')dnl
   OSTYPE(linux)
   FEATURE(always_add_domain)dnl
   FEATURE(mailertable, hash /etc/mailertable)dnl
   MAILER(local)dnl
   MAILER(smtp)dnl
   MAILER(uucp)
   define(`SMART_HOST', uucp-dom:mysmarthost)
   ______________________________________________________________________



  II) create your sendmail.cf file

   a) backup your old /etc/sendmail.cf file
   b) overwrite the sendmail.cf with the new one: m4 my.mc >
   /etc/sendmail.cf
   c) verify that the sendmail.cf file was correctly created based on
   your specifications.
   Some of the gotchas that i came across were: - missing uucp-dom mailer
   This was because i didnt have the smtp mailer entry. Actually, i
   understand it is important to have it defined before the uucp


  III) create your /etc/mailertable

   if you dont have uucp sites feeding off you skip this step

   a) create/edit the file /etc/mailertable

   sample /etc/mailertable
   ______________________________________________________________________

   system1.org uucp-dom:system1
   .system1.org uucp-dom:system1
   down.com uucp-dom:down
   up.down.com  error: Host is unknown at me.com
   .down.com uucp-dom:down
   .me.com error: Host unknown at me.com
   ______________________________________________________________________

   This says anything that is addressed to system1.org or to
   *.system1.org that we receive will be sent using the uucp-dom mailer
   and be delivered to system1 (defined in the the uucp sys file) in
   other words we are doing the mail routing for *.system1.org ; similar
   for down.com and its subnodes except for the additional filtering; we
   bounce back any mail for down's subnode up.down.com using sendmail's
   built-in error mailer with the message "Host is unknown at me.com";
   This is because we have been asked to do this by the admin at
   down.com. To bounce unknown subdomains to us we use the last line in
   the mailertable (which is what all unknown nodes default to).
   b) create the database with makemap

   if you use hash:
   makemap hash /etc/mailertable < /etc/mailertable
   if you use dbm:
   makemap dbm /etc/mailertable </etc/mailertable
   if you use btree:
   makemap btree /etc/mailertable </etc/mailertable

   do this every time you change the file.

  IV) restart sendmail

  V) test sendmail

   i) sendmail -bv user@destination
   ii) using sendmail -bt and enter various addresses using 3,0
   ruleset to see where they end up and the various rulesets and cf walks
   taken.

   You are set!
   ______________________________________________________________________

  TODO

   1) Add info on setting up system down.com (so as to show how to
   take care of those smtp nodes)
   2) Add info on how to setup news to be delivered via UUCP
   (preferably INN). This might require changing the title of the doc.

References

   1. news:comp.mail.sendmail
   2. news:comp.mail.uucp
   3. news:comp.os.linux.networking
  sendmail address rewriting mini-HOWTO
  Thomas Roessler, roessler@guug.de
  v0.0, 6 May 1998

  This document is a brief description of how to set up sendmail's con
  figuration file for the home user's dial-up access.

  1.  Introduction

  We assume that you have the kind of Internet access which seems to be
  most common at universities and online services nowadays: You dial
  into your provider's network using PPP over a serial connection. Your
  incoming mail is spooled at the provider's POP or IMAP server, while
  outgoing messages are to be sent via SMTP.  You don't have a domain
  name of your own, so everything has to use one address.


  We assume that you have already installed a fairly recent version of
  Eric Allman's sendmail (version 8.8.8 is current at the time of this
  writing and should work fine).


  This document is partially referring to specific properties of Debian
  GNU/Linux systems; users of different distributions will have to take
  some care.


  Make sure you have the following information at hand:


    Your ISP's mail server

    Your Internet mail address

  The configuration we are planning has two main goals:


  1. Sending mail between various local users must be possible.

  2. The outside world must see the local users' ISP mail addresses, not
     the local ones.


  To achieve this, we will make use of sendmail's genericstable feature.


  2.  File Roadmap

  We will put all of sendmail's configuration files in a separate
  directory under /etc: /etc/mail.  Usually, sendmail will expect these
  files to reside directly under /etc.  To avoid problems,
  /etc/sendmail.cf should be a symbolic link to /etc/mail/sendmail.cf.


  The following files will populate /etc/mail:

    =20

    aliases - contains additional local addresses

    genericsdomain - contains some information on your local host's
     configuration


    genericstable - contains the actual rewriting rules.

    sendmail.cf - sendmail's configuration file

    sendmail.mc - the source of sendmail.cf.

  Some of these files will be accompanied by .db files.  They contain
  hashed databases for sendmail's direct use.


  We assume that the cf part of sendmail's source tree resides under a
  directory named /usr/lib/sendmail.cf.  This is the case on Debian
  GNU/Linux systems.  Other distributions will put this stuff at
  different places.  Please refer to your distribution's documentation
  for details.


  3.  Configuring sendmail

  3.1.  The main configuration file

  Sendmail uses a highly complex rule system for it's configuration.
  While you can do lots of neat tricks with this stuff, writing a
  sendmail.cf file from scratch is rather unusual and time-consuming.
  If you are interested in doing so, you should stop reading this
  document right now and instead read the "Bat Book" from O'Reilly.


  Instead of hand-crafting these rules, we will rely on the m4 macro
  processor to put together our configuration file from ready-made
  pieces which are distributed together with sendmail.


  Let's look at the first lines of the sendmail.mc file:


  ______________________________________________________________________
  include(/usr/lib/sendmail.cf/m4/cf.m4)
  VERSIONID(`sendmail.mc - roessler@guug.de')
  OSTYPE(debian)
  define(`ALIAS_FILE',`/etc/mail/aliases')
  ______________________________________________________________________

  In the beginning, cf.m4 is included.  This m4 macro file contains lots
  of macro definitions for the rest of the file.  Be sure that the path
  you give here is correct - the one we are representing in our example
  is typical for Debian GNU/Linux.  The OSTYPE macro is used to give
  some useful defaults for certain configuration values.  If you aren't
  using a Debian system, you should replace the word "debian" by "linux"
  here.  ALIAS_FILE tells sendmail where to look for the list of
  aliases.


  The following lines tell sendmail to use the genericstable feature,
  and where to find the configuration files needed to use it:

  ______________________________________________________________________
  FEATURE(masquerade_envelope) FEATURE(genericstable, `hash
  -o /etc/mail/genericstable')
  GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')
  ______________________________________________________________________

  The masquerade_envelope feature tells sendmail to apply header rewrit
  ing to the envelope sender of a message.  This is the mail address to
  which external mail delivery subsystems will direct their delivery
  failure reports and warning messages.  The generics* files will be
  explained below.


  Now, we have to define a so-called smart host, that is, a machine
  which will handle outgoing mail for your system.  Note that this
  machine may be different from your ISP's POP and IMAP servers.  If in
  doubt, contact the hotline.  The code in the master configuration
  file:

  ______________________________________________________________________
  define(`SMART_HOST',`mail-out.your.provider')
  ______________________________________________________________________


  Please replace mail-out.your.provider by the fully qualified hostname
  of your internet service provider.


  The final two lines include the "mailer" definitions which are needed
  by sendmail to find out how to handle various types of mail:

  ______________________________________________________________________
  MAILER(local)
  MAILER(smtp)
  ______________________________________________________________________

  To generate the sendmail.cf file from this sendmail.mc, type the
  following commands (as root):

  ______________________________________________________________________
  # m4 sendmail.mc > _sendmail.cf
  # mv -f _sendmail.cf sendmail.cf
  ______________________________________________________________________


  Note the technique of writing m4's output to a temporary file which is
  thereafter moved to the proper place.  This helps us to prevent send
  mail from reading partially written configuration files.


  3.2.  Address rewriting

  First, we have to tell sendmail what addresses are to be considered
  local (and thus should be subjected to the rewriting).  This is quite
  simple: Just put the fully qualified host name of your machine into
  the file /etc/mail/genericsdomain.  To get your host's fully qualified
  name, type the following command:

  ______________________________________________________________________
   $ hostname -f
  ______________________________________________________________________

  Now, let's come to the rewriting table proper:
  /etc/mail/genericstable.  This file consists of two white-space
  separated columns.  The first column contains the local address, the
  second column contains the e-mail address which should be used
  instead.  The file may look like this:


  ______________________________________________________________________
  harry   harryx@your.isp
  maude   maudey@her.isp
  root    fredx@your.isp
  news    fredx@your.isp
  ______________________________________________________________________

  Note that there should be one entry for each account on the local
  machine, so that automatically generated mail which leaks out of the
  local system carries correct header information.


  For performance reasons, sendmail won't use this text file directly,
  but rely on a "hashed" version instead.  To generate it, type the
  following command:


  ______________________________________________________________________
  # makemap -r hash genericstable.db < genericstable
  ______________________________________________________________________

  Note that the rewriting rules from the genericstable will not apply to
  local mail or to messages you receive from outside - the mapping is
  only used if a message leaves your local system for your ISP's smart
  host.


  3.3.  Aliases

  The aliases file contains additional local names which are only valid
  for local messages.  This is useful for administrative accounts like
  root which receive automatically generated messages from your system.


  A reasonable start for /etc/mail/aliases could look like the following
  file:


  ______________________________________________________________________
  root: fred
  news: root
  postmaster: root
  mail: root
  www: root

  nobody: /dev/null
  MAILER-DAEMON: nobody
  ______________________________________________________________________

  This example will forward local mail for the root, news, postmaster,
  mail, and www users to fred, while messages for nobody and MAILER-
  DAEMON will be redirected to /dev/null.


  Just like the genericstable, aliases may contain lots of entries.
  Thus, it would once again be inefficient for sendmail to use the text
  file we just described.  The same mechanism as with genericstable is
  used for aliases: A hashed database is generated.  Instead of using
  makemap directly, you can type in the command newaliases this time.
  It will automatically take care of all what's needed.


  4.  Further reading

  The sendmail source distribution includes quite a bit of
  documentation.  Read it, especially the file cf/README.


  If you are interested to dive deeper into sendmail's configuration
  options, you want to get the "Bat Book" from O'Reilly: Bryan Costales,
  Eric Allman, and Neil Rickert: "sendmail".  O'Reilly, 1993.


                         SMALL MEMORY MINI-HOWTO V0.1

                               BY: TODD BURGESS

                             TBURGESS@UOGUELPH.CA

Introduction

   The purpose of this mini HOWTO is to describe how to run Linux on a
   system with a small amount of memory. Assuming buying more memory is
   out of the question there are many things you can do to tighten up
   memory usage in Linux.

   Many Linux distributions out of the box are quite bloated from a
   memory perspective. They run more services and offer more features
   then most of us will ever need. By removing many of these services you
   can free up several megabytes of real memory.

   My own system is a 486DX2-66 with 12MB of physical memory and 12MB of
   swap space. It has run Linux for the last 3 years quite happily and
   hopefully it will run Linux for several more years. :)

Linux Kernel

   All the Linux kernels which come with distributions are quite bloated
   and contain more features then any of us will ever need or use. If you
   have not re-compiled your own kernel it is highly recommended that you
   do so. How to re-compile a kernel is beyond the scope of this document
   but many excellent Linux books and guides cover this subject in
   intimate detail.

   If you do re-compile your kernel remember to put in no more features
   then you need. For instance: how many of you include PLIP support in
   your kernel? How many of you who include it actually use it? Smaller
   kernels require less time to load, use less memory and use less CPU
   cycles.

   Another thing is modules. I personally do not use them because I found
   them to be a cumbersome. If you use them and like them then they can
   help to relieve "kernel bloat."

Virtual Consoles

   VCs are a great way to free up memory. Most Linux distributions run
   about 6 of them out of the box. On average running 6 VCs requires
   about 4MB of memory. Removing a couple of them can free up a couple
   MBs of memory.

   Most of users can get away running only 3 or 4 VCs. How many you
   choose to remove is a matter personal preference. Just remember that
   the fewer you run the more memory your applications will have to run.

   The file which outlines how many VCs get loaded is in the file
   /etc/inittab . In order to remove VCs:

    1. Load /etc/inittab in a text editor
    2. Look for a line which looks like (the key feature being a line
       which starts with c1):
       c1:12345:respawn:/sbin/getty tty1 38400 linux
       Start at the highest number (ie c6) and comment it out by
       inserting a '#' in the first row. Repeat this step as many times
       as needed. Remember every line you comment out is one less VC
       running.
    3. Re-boot the system for your changes to take effect.

Daemons

   Many Linux distributions run many daemons most of us will never use.
   Most of these daemons are loaded by scripts. Where these scripts are
   and what they are called depends on your Linux distribution. Slackware
   set-up scripts are buried in /etc/rc.d/rc.* .

   Before you proceed a knowledge of Unix shell script programming would
   be a definite asset. If however you have no experience writing Unix
   shell scripts what follows is probably the quickest introduction to
   shell script programming ever written.

   Take the following shell script


#!/bin/sh
echo "hello world"
#echo "good bye cruel world"



   The following will echo the string "hello world". Shell scripts must
   contain the the line "#!/bin/sh" at the very top line. After that
   every line is executed as if you had typed it at the keyboard (think
   of shell scripts as nothing more then glorified keyboard macros).

   Lines which begin with a '#' are said to be commented out because they
   do not get executed by the shell. Most start up scripts when they load
   daemons look like:


if somecondition
  do something
fi

   What you want to do is comment out every line starting with the if
   statement and ending with the fi statement.

   If you want to find where a daemon is loaded what you want to do is
   search the start up scripts for the name of the daemon. If I wanted to
   find where inetd is loaded in Slackware I would do the following:


     1  cd /etc/rc.d
     2  grep -n inetd rc.*

  inetd

   inetd allows people to do things like telnet, ftp and send talk
   requests to your machine. If you never use your system as a server or
   need to access any of its services remotely you can remove inetd.

  lpd

   lpd is used to print files on your printer using the lpr command. If
   you never print on your Linux box you can remove lpd. If however you
   own a HP Deskjet printer and would like to print I highly recommend
   the package I put together called dj-printcap which is available at:
   ftp://sunsite.unc.edu/pub/Linux/system/Printing/dj-printcap.tar.gz

  nfsd and mountd

   These two daemons are used to run a NFS server. If you never use your
   Linux system as a NFS server you can safely remove these two daemons.

  portmap

   The portmap daemon is used to handle RPC services. If you do not run a
   NFS server or any other RPC programs you can remove portmap.

  sendmail

   sendmail is another daemon which requires a fair bit of memory. If you
   never use your Linux box as a relay for sending e-mail or you never
   receive mail on your Linux box you can probably remove sendmail. If
   you do send e-mail from your Linux box most e-mail clients can be
   set-up to send e-mail from another mail server.

  others

   There may be other daemons your system starts up which you do not
   need. Remove what you feel you have to. Two daemons which you must run
   are syslogd and klogd.

Conclusions

   The following illustrates the steps I took to tighten up my memory
   usage on my Linux box. Hopefully I have provided you with some insight
   into what you can do with your Linux box to conserve memory.

   Good luck and happy hacking!
   Todd Burgess
   tburgess@uoguelph.ca
   http://eddie.cis.uoguelph.ca/~tburgess
  Sound Blaster AWE 32/64 HOWTO
  by Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
  v1.2, 11 January 1998

  This document describes how to install and configure a Sound Blaster
  32 (SB AWE 32, SB AWE 64) card from Creative Labs in a Linux System
  using the AWE Sound Driver Extension written by Takashi Iwai. It also
  covers some special tools and players for the SB AWE series. Reference
  system is a Debian GNU/Linux System, but every other Linux Distribu-
  tion should also work.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Acknowledgments
     1.2 Revision History
     1.3 New versions of this document
     1.4 Feedback
     1.5 Distribution Policy

  2. Before you start

     2.1 Introduction
     2.2 Some general notes about the SB AWE cards
     2.3 Some general notes about the Plug and Play cards
     2.4 Some general notes about loadable kernel modules
     2.5 Some general notes about the kernel sound driver

  3. How to install SB AWE sound support

     3.1 Things you will need
     3.2 Getting started
     3.3 Compiling the kernel
     3.4 Reboot

  4. Testing the Sound Driver

     4.1 (TT
     4.2 Output - The Raw Audio Device
     4.3 Output - The OPL-2/OPL-3 Synthesis
     4.4 Output - The Wave Table Synthesis
     4.5 Mixing
     4.6 Input - Sampling with the Raw Audio Device
     4.7 The MIDI Port

  5. AWE Driver Software

     5.1 (TT
     5.2 (TT

  6. Appendix

     6.1 Additional Information
     6.2 Sources
     6.3 Sample


  ______________________________________________________________________

  1.  Introduction

  This is the Sound Blaster AWE HOWTO. It gives you detailed information
  about getting the most out of your Sound Blaster 32 or better,
  including Wave Table synthesis. This document covers all SB cards up
  from the SB 32.

  The Sound Blaster series is well-known in the DOS and Windows
  community, and a lot of Linux users want to use this sound card under
  Linux as well.  Unfortunately, Creative Labs only provides a sound
  driver for Windows and DOS, so it is not trivial to install and use a
  SB card under Linux. This document tries to describe how one can use
  the features of the SB AWE series under a Linux environment.


  1.1.  Acknowledgments


  This documents contains information I got from the AWE Driver FAQ and
  the ISA PnP FAQ.  See section ``Sources'' for author and location of
  this documents. Thanks to the authors, the SB AWE support is possible.

  A lot of essential work was done by Hannu Savolainen
  <http://www.4front-tech.com/usslite>, who developed the sound driver
  that comes with the Linux kernel. Thank you!

  I want to thank Nicola Bernardelli <mailto:n.bern@mail.protos.it> for
  testing the AWE64 stuff. Without him, many errors would have remained
  undetected.

  Thanks to the SGML Tools
  <ftp://sunsite.unc.edu/pub/Linux/utils/text/sgml-tools-0.99.0.tar.gz>
  package, this HOWTO is available in several formats, all generated
  from a common source file.


  1.2.  Revision History

     Version 1.0
        first version

     Version 1.1
        corrected spelling (thanks Curt!), added version requirement for
        isapnp, now available via sunsite and lots of mirrors

     Version 1.2
        French version now available!, minor corrections, lots of
        spelling fixed (thanks to ispell)

  1.3.  New versions of this document


  The latest version can be found on my Home Page, namely at Sound
  Blaster AWE HOWTO <http://homepage.ruhr-uni-
  bochum.de/Marcus.Brinkmann/soundblaster.html>.

  New versions of this document will be uploaded to various anonymous
  ftp sites that archive such information including
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini>.

  Hypertext versions of this and other Linux HOWTOs are available on
  many World-Wide-Web sites, including  <http://sunsite.unc.edu/LDP/>.
  Most Linux CD-ROM distributions include the HOWTOs, often under the
  /usr/doc directory.

  Thanks to Arnaud Launay zoro@lsol.tm.fr, a French version of this
  document is now available!  The latest version can be found via http
  <http://www.freenix.fr/linux/HOWTO> or anonymous ftp
  <ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO>.

  If you make a translation of this document into another language, let
  me know and I'll include a reference to it here.


  1.4.  Feedback


  I rely on you, the reader, to make this HOWTO useful. If you have any
  suggestions, corrections, or comments, please send them to me,
  Marcus.Brinkmann@ruhr-uni-bochum.de, and I will try to incorporate
  them in the next revision.

  i would especially welcome information about the startup procedure
  (boot scripts etc.) of other famous Linux distributions, e. g. Red Hat
  or SuSE Linux.

  If you publish this document on a CD-ROM or in hardcopy form, a
  complimentary copy would be appreciated. Mail me for my postal
  address. Also consider making a donation to the Linux Documentation
  Project to help support free documentation for Linux. Contact the
  Linux HOWTO coordinator, Tim Bynum linux-howto@sunsite.unc.edu, for
  more information.


  1.5.  Distribution Policy


  Copyright 1997 Marcus Brinkmann.

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This document is distributed in the hope that it will be useful, but
  without any warranty; without even the implied warranty of
  merchantability or fitness for a particular purpose.  See the GNU
  General Public License for more details.

  You can obtain a copy of the GNU General Public License by writing to
  the Free Software Foundation <http://www.fsf.org>, Inc., 675 Mass Ave,
  Cambridge, MA 02139, USA.

  2.  Before you start

  2.1.  Introduction


  This document tries to help you install and use a Sound Blaster AWE 32
  or Sound Blaster AWE 64 from Creative Labs in your Linux system. The
  reference system is a Debian GNU/Linux <http://www.debian.org> system
  on an Intel i586 platform, but it should work with any other Linux
  distribution as well as on every platform that is supported by the
  Linux sound driver (differences are mentioned where they appear, if
  any).

  Be sure to read the Linux Sound HOWTO (see section ``Additional
  Information'') carefully. I consider my document a supplement to the
  Sound HOWTO, and often you can find more information about things I
  have left out there.

  2.2.  Some general notes about the SB AWE cards


  The SB AWE 32 sound card provides a raw audio device, standard
  OPL-2/OPL-3 synthesis, a MPU-401 MIDI port and 32 voices EMU 8000 Wave
  Table synthesis (for an explanation on these and other terms see the
  Linux Sound HOWTO).  One goal of this document is to help you get all
  these features to work properly.

  The SB AWE 64 has the capabilities of the SB AWE 32 and an additional
  Wave Guide synthesis Creative Labs is especially proud of. The problem
  for Linux users is, that the additional 32 voices are software
  generated and output via the raw wave devices. Because Creative Labs
  sees no market in Linux drivers, a Wave Guide synthesis sound driver
  is only available for Windows 3.1 and Windows 95.

  This means that, from a Linux user's point of view, the SB AWE 32 and
  SB AWE 64 are almost identical. From now on I will only refer to the
  SB AWE in general and will only mention differences where they appear
  (if any).

  2.3.  Some general notes about the Plug and Play cards


  Most modern cards for the Intel platform are ISA PnP cards, which is
  an abbreviation for ``Plug and Play''. This means, that the card has
  to be configured by the operation system, and this has to be done
  through an initialization routine at boot time. In general, there are
  at least three possible ways to do this:


  1. You have a PnP Bios, which means that your Bios is aware of PnP
     cards and can configure them. If you think you can use all the
     features of your SB AWE PnP just because you have a PnP Bios, you
     are out of luck. Even if the Bios claims to support PnP cards it
     only initializes a subset of the ports and addresses used by your
     sound card. You will probably be able to play raw wave data, but
     you won't be able to play MIDI music, for example. For this reason,
     a PnP Bios is not an option.

  2. You have an operating system that supports PnP cards. The current
     stable Linux kernel (2.0.x) is not such an operating system, so we
     have to wait for future kernel releases, that will support PnP
     devices.

  3. You have a special program, started at boot time, that initializes
     your PnP cards. This is the way we do it.

  The most commonly used software to initialize PnP cards under Linux
  are the ``isapnptools'' (see section ``Sources'' and section ``Getting
  Started''). They provide a predictable way to configure all ISA PnP
  cards in your machine, not only your sound card.

  2.4.  Some general notes about loadable kernel modules


  Some device drivers can be built as modules instead of compiling them
  into the kernel. You can find more information about modules in the
  Kernel HOWTO and the Module HOWTO (see section ``Additional
  Information'').

  If you have a PnP card, you must install sound support as a loadable
  kernel module. This means, that you can't build the sound driver into
  the kernel, but you will have to build it as a module that can be
  loaded into the kernel at runtime. This is because the kernel will be
  installed before your ISA PnP card can be configured, and your sound
  driver has to be loaded after your ISA PnP card is configured.

  The sound kernel module can be loaded manually via insmod sound or
  modprobe -a sound or in the appropriate boot script of your Linux
  system (in Debian, it is sufficient to append a single line containing
  sound to /etc/modules). Another approach is to launch kerneld, a
  daemon that installs and removes kernel modules as needed.

  Note that kerneld may not be the best solution for the AWE sound
  driver module, because it takes time to load the module in the kernel,
  especially if you want to use Wave Table synthesis and load big Sound
  Font banks, which you have to do each time after inserting the module.
  Because kerneld removes unused modules after one minute by default, it
  is perhaps better to insert the sound module manually or at boot time.
  Note that inserting the sound module manually or at boot time does
  prevent kerneld from removing it when it is idle. By the way: You can
  manually insert the sound module and use kerneld at the same time. The
  two methods don't conflict, but kerneld does not care about the sound
  module anymore.

  This is especially useful if your mixer settings get disturbed after
  removing and reinstalling the module. A solution for this problem will
  be given in section ``Mixing'' (there is described how you can start
  your mixer automatically when the sound module gets inserted).
  However, it takes time for kerneld to load the module, to load the
  sound font bank and to start your mixer, and for this and other
  reasons it is better to install the sound module at boot time and not
  let kerneld remove it.

  2.5.  Some general notes about the kernel sound driver


  You can install sound support in the kernel as a built-in or as a
  loadable module. If you have a PnP card, you have to install sound
  support as a module, because the PnP card needs to be initialized via
  the isapnptools before the module gets installed.

  As you can imagine, you will have to recompile the kernel. I will give
  you a few hints about it below. For now, let's talk about the sound
  support in the kernel source. The kernel ships with the Free (Lite)
  Version of the OSS (USS) sound driver. The current version of this
  driver (3.5.4) does not support the SB AWE in full, but the SB 16 part
  of it. So you can have a raw audio device and OPL-2/OPL-3 synthesis if
  you use it, but you will not be able to play midi music with Wave
  Table synthesis.

  If you want to use the Wave Table device, you can either buy the
  commercial sound driver from 4Front Technologies <http://www.4front-
  tech.com> (someone please confirm me that it can do it, please), or
  patch your kernel with the AWE 32 Sound Driver Extension by Takashi
  Iwai. The former is beyond the scope of this document, I assume you
  want to use the latter.

  The AWE32 Sound Driver Extension (see section ``Sources'') is
  published under the GNU copyright license and ships with a number of
  tools to make use of the EMU 8000 wave synthesis of the SB AWE cards.

  The awedrv software is already included in newer kernel source trees
  (starting from some 2.1.x kernels, but perhaps you want to upgrade the
  sources in your kernel tree, they may be old.

  3.  How to install SB AWE sound support

  3.1.  Things you will need


  These are the requirements for SB AWE support under Linux:


  o  a functional Linux system (e.g. the Debian GNU/Linux distribution),

  o  a SB AWE 32 or compatible card (e.g. SB32, SB32 PnP, SB AWE64,
     ...),

  o  the sources of the Linux kernel, including the sound driver
     OSS/Free (normally included, check in
     /usr/src/Linux/drivers/sound/Readme),

  o  the AWE 32 sound driver extensions.

  If you have a PnP card, you will also need:


  o  the isapnptools software package.

  Look in section ``Sources'' for information where you can obtain these
  programs.

  If you have a Debian GNU/Linux system, this means that you will need
  the packages kernel-source-<version>, awe-drv and perhaps the package
  isapnptools.  You will want some of the other awe-* packages although
  they are not essential. I strongly recommend the kernel-package for
  easy kernel compiling and installing.

  3.2.  Getting started


  Let's assume you have properly installed your card in a socket on your
  motherboard and perhaps already tested it under a DOS or Windows
  environment.

  The next step is to initialize the card at boot time if and only if it
  is a PnP card. Follow the documentation in the source package to
  compile and install isapnptools (or just use the Debian binary
  package), and make a

       # pnpdump > /etc/isapnp.conf


  as root. This will generate a hopefully proper configuration file for
  your PnP cards, but with all devices commented out. Please edit this
  file carefully, and compare the values for DMA channels, IO bases and
  interrupts with the configuration of the cards under an DOS or Window
  environment if possible (with Win95, look at the resources used by the
  card under resources in the device manager). If you have problems,
  read the documentation that ships with the isapnptools carefully.

  CAUTION: isapnptools often fails to detect all three I/O ports of the
  SB AWE Wave Table device. Please check carefully the WaveTable entry
  in your isapnp.conf against the example at the end of this HOWTO.
  Adjust the I/O base addresses if necessary.


  CAUTION: According to the isapnp-faq, sometimes isapnp fails to
  program the number of the logical device. If you encounter error
  messages like the following:

       Error occurred executing request 'LD 2' on or around line...

  then try adding (VERIFYLD N) at the top of isapnp.conf. You have to
  use at least version 1.10 for this to work. If you can't use version
  1.10 or newer, you can also POKE the logical device numbers directly.
  Please refer to the isapnp-faq for more information on this approach.
  If it doesn't work for you, please contact me (and the isapnp people
  will be interested, too, I would think).

  CAUTION: Make sure that the last line is (WAITFORKEY), that will
  sometimes be omitted by older versions of pnpdump.

  A sample isapnp.conf for only one PnP card (the sound card) can be
  found at the end of the document (see section ``Sample
  <tt>isapnp.conf</tt>'').

  If you have a Debian system, no further adjustments are necessary.
  isapnp will be started at boot time in /etc/init.d/boot with this
  snippet of script code, that you may want to include in your boot
  scripts:

  ______________________________________________________________________
  # Configure the isa plug and play boards before loading
  # modules. Need to do this before loading modules to get
  # a chance of configuring and starting PnP boards before
  # the drivers mess all this up.
  #
  if [ -x /etc/init.d/isapnp ]
  then
    /etc/init.d/isapnp start
  fi
  ______________________________________________________________________


  where /etc/init.d/isapnp is

  ______________________________________________________________________
  #! /bin/sh
  # /etc/init.d/isapnp: configure Plug and Play boards
  test -x /sbin/isapnp || exit 0
  /sbin/isapnp /etc/isapnp.conf
  exit 0
  ______________________________________________________________________

  If you have another Linux distribution, you are on your own. I don't
  know what to do (anybody willing to submit more specific
  information?). Just make sure that isapnp gets started before the
  modules will be loaded (see below).

  3.3.  Compiling the kernel


  Before recompiling the kernel, you have to apply the AWE Driver
  Extension to the sound driver. Even if your kernel source tree already
  includes the awedrv extension (check /drivers/sound/lowlevel/ for
  that), you may want to upgrade the awedrv software. Follow the
  installation instructions in the awedrv source directory. In brief,
  you have to run an installation script that applies the patches to the
  kernel sources.

  Be careful if you have upgraded the kernel source tree after running
  the install script. The script just checks if a certain file exists -
  if it exists, it does not apply the necessary patch. You are well
  advised to remove the file drivers/sound/lowlevel/awe_wav.c before
  running the script after upgrading the kernel source.

  Next you have to configure the kernel for sound support. I hope you
  know a bit about kernel compiling; see the Sound HOWTO and the Kernel
  HOWTO for details. Go in the source directory of your kernel sources
  (/usr/src/linux for example), and do

       # make config

  or make menuconfig or make xconfig. Then you have to configure your
  kernel in the standard way. Use this opportunity to make a small and
  powerful kernel, especially designed for your system. Be sure to
  answer Enable loadable module support with Y, if you want to install
  the sound driver as a loadable module (a must if you have a PnP card),
  but I'm sure you want to do it anyway.

  At one point, you will be asked if you want sound card support. You
  are free to answer with Y or with M if you have not a PnP card.  You
  must answer with M, for module, if you have a PnP card.  You have to
  compile sound card support as a module if you have a PnP card because
  the PnP card has to be initialized before the module gets loaded.

  The following questions you should answer with Y, all other with N:

  ______________________________________________________________________
  Sound Blaster (SB, SBPro, SB16, clones) support (CONFIG_SB) [Y/n/?]
  Generic OPL2/OPL3 FM synthesizer support (CONFIG_ADLIB) [Y/n/?]
  /dev/dsp and /dev/audio support (CONFIG_AUDIO) [Y/n/?]
  MIDI interface support (CONFIG_MIDI) [Y/n/?]
  FM synthesizer (YM3812/OPL-3) support (CONFIG_YM3812) [Y/n/?]
  lowlevel sound driver support [Y/n/?]
  AWE32 support (CONFIG_AWE32_SYNTH) [Y/n/?]
  ______________________________________________________________________

  Only the latter is actually for the Wave Table synthesis. The others
  are SB 16 options from the OSS/Free sound driver.

  In addition, you have to configure the sound card I/O port. Look at
  the isapnp.conf file for hints, if you have one. For me, the following
  default values are sufficient. Note that the default value from the
  kernel configuration script may be wrong (especially the values
  SBC_IRQ and SB_MPU_BASE seem to be incorrect for most cards).


  ______________________________________________________________________
  I/O base for SB Check from manual of the card (SBC_BASE) [220]
  Sound Blaster IRQ Check from manual of the card (SBC_IRQ) [5]
  Sound Blaster DMA 0, 1 or 3 (SBC_DMA) [1]
  Sound Blaster 16 bit DMA (_REQUIRED_for SB16, Jazz16, SMW) 5, 6 or 7
  (use 1 for 8 bit cards) (SB_DMA2) [5]
  MPU401 I/O base of SB16, Jazz16 and ES1688 Check from manual of the card
  (SB_MPU_BASE) [330]
  SB MPU401 IRQ (Jazz16, SM Wave and ES1688) Use -1 with SB16 (SB_MPU_IRQ) [-1]
  ______________________________________________________________________

  Now recompile the kernel. Debian users should use the kernel-package.
  This package makes the kernel compile as easy as installing a debian
  package. Look at the documentation in /usr/doc/kernel-package/. Here
  is a hint:

       # make-kpkg clean
       # make-kpkg -revision custom.1.0 kernel_image

  and then dpkg -i /usr/src/kernel-image-2.0.29_custom.1.0_i386.deb.

  If you have another Linux distribution, follow the standard way for
  compiling a new kernel. Don't forget make modules and make
  modules_install. Look at the Sound HOWTO and perhaps the Kernel HOWTO
  for more information.

  3.4.  Reboot


  After installing the new kernel, you should do a reboot (be sure to
  have a functional boot disk at hand). Cross you fingers.

  If you have a PnP card be sure to launch isapnp either in a boot
  script (as described above) or manually:

       # /sbin/isapnp /etc/isapnp.conf
       Board 1 has Identity 74 00 00 e3 10 48 00 8c 0e:  CTL0048 Serial No 58128
       [checksum 74]

  Now you can install the sound driver, if you have compiled it as a
  module:

       # modprobe -a sound
       AWE32 Sound Driver v0.3.3e (DRAM 2048k)

  If you think the memory detection was not correct (I have a report of
  one who has a AWE64 with 4096k, and ``detected'' have been 28672k),
  try either to upgrade the awedrv software or to specify the amount of
  memory in the file /usr/src/linux/drivers/sound/lowlevel/awe_config.h,
  for example:

       #define AWE_DEFAULT_MEM_SIZE  4096   /* kbytes */

  Sorry, you have to recompile the kernel then (perhaps compiling the
  modules will be sufficient, but I don't know for sure).

  If it works, you may want to have the sound module loaded
  automatically.  You can use kerneld (why this is a bad idea is
  explained in section 1.4) or append a single line containing sound to
  your /etc/modules (in Debian) or add /sbin/modprobe -a sound to your
  start-up script.


  4.  Testing the Sound Driver

  4.1.  /proc/devices, /dev/sndstat


  If you have built-in sound support, you will get some useful
  information at boot time. If you have sound support installed as a
  loadable module, you can get the same information (perhaps after
  removing the sound module with modprobe -r sound first) with

       # modprobe -a sound trace_init=1
       Sound initialization started

       <Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
       <Sound Blaster 16> at 0x330 irq 5 dma 0
       <Yamaha OPL3 FM> at 0x388
       Sound initialization complete
       AWE32 Sound Driver v0.3.3e (DRAM 2048k)

  If you have a /proc virtual file system, you can look for the sound
  device with

       # cat /proc/devices
       Character devices:
       [...]
       14 sound
       [...]

  Next make sure you have the correct devices installed under /dev/.
  Please look at the Sound HOWTO for details. Then ask /dev/sndstat
  about the status of the sound module:

       # cat /dev/sndstat
       Sound Driver:3.5.4-960630 (Sat Oct 11 19:35:14 CEST 1997 root,
       Linux flora 2.0.29 #1 Sat Oct 11 19:12:56 CEST 1997 i586 unknown)
       Kernel: Linux flora 2.0.29 #1 Sat Oct 11 19:36:23 CEST 1997 i586
       Config options: 0

       Installed drivers:
       Type 1: OPL-2/OPL-3 FM
       Type 2: Sound Blaster
       Type 7: SB MPU-401

       Card config:
       Sound Blaster at 0x220 irq 5 drq 1,5
       SB MPU-401 at 0x330 irq 5 drq 0
       OPL-2/OPL-3 FM at 0x388 drq 0

       Audio devices:
       0: Sound Blaster 16 (4.13)

       Synth devices:
       0: Yamaha OPL-3
       1: AWE32 Driver v0.3.3e (DRAM 2048k)

       Midi devices:
       0: Sound Blaster 16

       Timers:
       0: System clock

       Mixers:
       0: Sound Blaster
       1: AWE32 Equalizer

  If you don't have an output like this, perhaps there is an error in
  your configuration. Go on and see what doesn't work, then go back to
  step ``Getting Started'', checking everything.

  4.2.  Output - The Raw Audio Device

  Try to get an .au file (Sun workstation) or a raw sample file, and do

       # cat bell.au > /dev/audio

  resp.

       # cat sample > /dev/dsp

  You should hear the content of the file via the Audio Device 0: Sound
  Blaster 16 (4.3).

  4.3.  Output - The OPL-2/OPL-3 Synthesis


  If you want to use the OPL-2/OPL-3 FM synthesis to play MIDI-Files
  with your sound card, try the program playmidi (see Appendix B). Start
  it with

       # playmidi -f dance.mid

  or

       # playmidi -4 dance.mid

  The former will give you OPL-2, the latter OPL-3 MIDI music. If you
  are embarrassed about the sound, don't blame playmidi: It is the FM
  synthesis that sounds bad.

  Imagine you would only have the OSS/Free Sound Driver: Than this is
  the quality of MIDI Music you can achieve (apart from software
  synthesis).  Fortunately, you have a SB AWE, and you can use the Wave
  Table capabilities with the AWE Sound Driver Extension.

  4.4.  Output - The Wave Table Synthesis


  The AWE Driver Extension comes with special tools (awesfx) to make use
  of the EMU 8000 Wave Table synthesis. First, you have to load a Sound
  Font Bank on your card - even if you want to use the ROM samples! You
  can get the files from your Windows installation - look for files
  ending in *.sfb or *.sf2.

  The ROM samples can be loaded with SYNTHGM.SBK, real samples are in
  SYNTHGS.SBK and SYNTHMT.SBK, as well as in SAMPLE.SBK. You can get
  other Sound Font Banks via ftp or www, try the EMU Homepage, the web
  site from Creative Labs, and look out for the Chaos samples, they are
  really good (be sure to check out the AWE Driver Web Site).

  Try to load the standard GM (ROM) set with

       # sfxload -i synthgm.sbk

  and then play a midi file that comes with your SB AWE:

       # drvmidi dance.mid

  4.5.  Mixing


  Get your favorite mixer program and start it. Start a raw audio sample
  and two MIDI files at the same time, and try out the mixer settings.
  Play a bit, it should be very easy. Here a list of the devices and how
  they are called:


     Yamaha OPL-3
        Synth or FM

     AWE32 Driver
        Synth or FM (does anyone know a mixer were the last two are
        separated from each other?)

     Sound Blaster 16 (4.13)
        PCM or DSP

     PC Speaker (still alive)
        Spkr

  Other mixer settings refer to the CD ROM, possibly connected to the
  sound card, to Master Volume, Bass, Treble and Recording Level of the
  different input lines. You can specify which lines should be recorded.


  4.6.  Input - Sampling with the Raw Audio Device


  You can record different sources: a connected CD ROM, a microphone
  connected to mic, and any that you can connect to line in. Set the
  mixer in the appropriate position. Play a sound and record into a
  file, reading from the Raw Audio Device, for example:

  # cdplay
  # dd bs=8k count=5 </dev/dsp >music.au
  5+0 records in
  5+0 records out
  # cat music.au >/dev/dsp

  records and plays five seconds of audio from the input device.


  4.7.  The MIDI Port


  Sorry, no information about MIDI port yet!


  5.  AWE Driver Software

  5.1.  sfxload


  You can load samples in your DRAM on the sound card with the sfxload
  tool. Note that you can only load one sample file per bank, with bank
  0 as default. So, after sfxload synthgs.sbk, the only samples on your
  sound card are the GS samples. If you want to load additional Sound
  Font Banks, you have to use the -b option, for example:

       # sfxload synthgs.sbk
       # sfxload -b1 sample.sbk
       # drvmidi sfx.mid

  You can load a default Sound Font Bank automatically with installing
  the module. Just append a line like

       post-install sound /usr/bin/sfxload synthgm.sbk

  to your /etc/conf.modules file.

  See the documentation for more details about sfxload.


  5.2.  drvmidi


  With the drvmidi program, you can use your AWE Driver to play MIDI
  files. Just specify the name of your midi file after the command:

       # drvmidi waltz.mid


  See the documentation for more details about drvmidi


  6.  Appendix

  6.1.  Additional Information

     The Linux Sound HOWTO
        Author: Jeff Tranter, <jeff_tranter@pobox.com>

        Last Version: v1.17, 4 August 1997

        Please take a good look at the Sound HOWTO (available from
        sunsite.unc.edu and other sites). It contains a bulk of data
        about compiling the kernel with sound support, and explains a
        lot about the sound devices, applications etc.

        I understand this HOWTO as an addition to the Sound HOWTO.


     The Linux Sound Playing HOWTO
        Author: Yoo C. Chung, <wacko@laplace.snu.ac.kr>

        Last Version: v1.4, 13 May 1997

        You should also look at the Sound Playing HOWTO. It tells you
        about the various sound formats and applications to play them.


     The AWE Driver FAQ
        Author: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>

        Source:  <http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/awedrv-
        faq.html>

        If you have problems installing the AWE Driver or using the Wave
        Table synthesis of your Sound Blaster card, then look here.


     The ISA PnP FAQ
        Author: Peter Fox <fox@roestock.demon.co.uk>

        Source:
        <http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html>

        If you have problems configuring your ISA PnP card, then this is
        your book of wisdom.

  6.2.  Sources

     isapnptools
        Author: Peter Fox <fox@roestock.demon.co.uk>

        Last Version: 1.11

        Source:
        <http://www.roestock.demon.co.uk/isapnptools/index.html>
        If mailing patches, bug reports or comments, please put 'isapnp'
        somewhere in the subject line, and mail to
        isapnp@roestock.demon.co.uk.


     awedrv
        Author: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>

        Last Version: 0.4.2c

        Source:  <http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/>


     Linux kernel
        Author: Linus Torvald and many other

        Last Version: At the moment, you should use 2.0.29

        Source: everywhere, where you can obtain Linux :)


     OSS/Free
        Author: Hannu Savolainen (Please check  <http://www.4front-
        tech.com/usslite before mailing me>).

        Last Version: I have 3.5.5-beta1

        Source: with the Linux kernel source package

        Information:   <http://www.4front-tech.com/usslite> or European
        mirror <http://personal.eunet.fi/pp/voxware>.

  6.3.  Sample isapnp.conf


  In the ISA PnP configuration file created by pnpdump, the single
  devices of your PnP cards appear as sections. In the output below, one
  card was detected (the sound card), with four logical devices:


  o  LD 0: Audio Device

  o  LD 1: IDE Device

  o  LD 2: WaveTable Device

  o  LD 3: Gameport Device

  I left LD 1 unconfigured, because I have no CD ROM attached to my
  sound card IDE port. If you have no IDE port on your SB, then LD 1
  will be the Gameport Device and LD 3 will not appear.

  Please refer to section ``Getting started'' for further (important!)
  information about this file.

  ______________________________________________________________________
  # $Id: pnpdump.c,v 1.9 1997/06/10 21:37:32 fox Exp $
  # This is free software, see the sources for details.
  # This software has NO WARRANTY, use at your OWN RISK
  #
  # For details of this file format, see isapnp.conf(5)
  #
  # For latest information on isapnp and pnpdump see:
  # http://www.roestock.demon.co.uk/isapnptools/
  #
  # Compiler flags: -DREALTIME -DNEEDSETSCHEDULER

  (READPORT 0x0203)
  (ISOLATE)
  (IDENTIFY *)

  # Try the following if you get error messages like
  # Error occurred executing request 'LD 2' on or around line...

  #(VERIFYLD N)

  # ANSI string -->Creative SB32 PnP<--

  (CONFIGURE CTL0048/58128 (LD 0
  #     ANSI string -->Audio<--

    (INT 0 (IRQ 5 (MODE +E)))
    (DMA 0 (CHANNEL 1))
    (DMA 1 (CHANNEL 5))
    (IO 0 (BASE 0x0220))
    (IO 1 (BASE 0x0330))
    (IO 2 (BASE 0x0388))

    (ACT Y)
  ))

  (CONFIGURE CTL0048/58128 (LD 1
  #     ANSI string -->IDE<--

  # (INT 0 (IRQ 10 (MODE +E)))
  # (IO 0 (BASE 0x0168))
  # (IO 1 (BASE 0x036e))

  # (ACT Y)
  ))

  (CONFIGURE CTL0048/58128 (LD 2
  #     ANSI string -->WaveTable<--

    (IO 0 (BASE 0x0620))
    (IO 1 (BASE 0x0A20))
    (IO 2 (BASE 0x0E20))

    (ACT Y)
  ))

  (CONFIGURE CTL0048/58128 (LD 3
  #     ANSI string -->Game<--

    (IO 0 (BASE 0x0200))
    (ACT Y)
  ))

  # Returns all cards to the "Wait for Key" state
  (WAITFORKEY)
  ______________________________________________________________________

  StarOffice 3.1 Mini-HOWTO
  Matthew Borowski (mkb@poboxes.com )
  v1.1, 28 November 1999

  Information on installing the StarOffice 3.1 Office Suite by StarDivi
  sion.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Motif info
     1.2 History of this document

  2. Obtaining the StarOffice Office Suite

  3. Installation of

     3.1 Libc Issues and Fixes
     3.2 Installing the tar Files
     3.3 Setup und Configuration
     3.4 COL (Caldera OpenLinux) setup bug
     3.5 Fixing the LANG variable problem

  4. Running StarOffice

  5. StarOffice Tips

  6. More Information

  7. Contributions

  8. Disclaimer and Copyright



  ______________________________________________________________________

  1.  Introduction

  This document deals with installing StarOffice 3.1. The current
  version of StarOffice is 5.1. Version 5.1 is considerably easier to
  install and less buggy than version 3.1. In fact, in my opinion there
  is no need for a HOWTO for version 5.1, since StarDivision has written
  a fairly complete installation guide. The StarOffice mini-HOWTO was
  useful while it lasted, but it is now being archived only for the few
  who still wish to install StarOffice 3.1. For information about
  StarOffice 5.1, check StarDivision's site at
  http://www.stardivision.com.



  The StarOffice Office Suite is a collection of office tools for Linux,
  written in C using the Motif toolkit.

  StarOffice includes:

    StarWriter, a word processor

    StarCalc, a spreadsheet

    StarImage, an image editor


    StarDraw, a draw program similar to Corel DRAW

    StarChart, a chart-making program

    StarMath, a math editor

  The StarOffice Office Suite for Linux is free for non-commercial use.
  Commercial use requires a license. The cost for a commercial license
  seperate from Caldera's OpenLinux system is currently undecided.


  1.1.  Motif info

  StarOffice is written using the commercial Motif 2.0 GUI toolkit. The
  dynamically linked version will *not* work with Motif 1.2/LessTif.

  The static version (with Motif 2.0 linked in) will work regardless of
  whether or not you have Motif. However, performance drops.

  I run StarOffice on a Pentium 100 with 48 megs RAM, running Redhat 4.1
  and Motif 2.0. Dynamically linked StarOffice takes about a minute to
  load. However, it is noticable that, once it loads up, StarOffice
  dynamically linked takes up much less resources than the static
  version.


  1.2.  History of this document


    Version 1.1 991128 - updated URLs and changed references to
     StarOffice 4.0 to the new 5.1

    Version 1.0 980602 - added information on StarOffice 4.0 and about
     how this document is now outdated

    Version 0.8 971109 - added tips, installation w/o libc upgrade,
     etc.

    Version 0.7 970707 - changed section 3.1.1, changed license

    Version 0.6 970609 - added fix for the LANG variable problem

    Version 0.5 970608 - updated info to StarOffice 3.1 final

    Version 0.1 970505 - the initial release.


  2.  Obtaining the StarOffice Office Suite

  The release of StarOffice 3.1 for Linux is available for FTP at

       ftp://ftp.gwdg.de/pub/linux/staroffice


  The file README.StarOffice contains information on downloading
  StarOffice 3.1 final. You will need to get three files:


    StarOffice31-english.tar.gz (english) templates/demo docs or

    StarOffice31-german.tar.gz (german) templates/demo docs

    StarOffice31-dynbin.tar.tgz (dynamically linked) or

    StarOffice31-statbin.tar.gz (statically linked) binaries

    StarOffice31-common.tar.gz

  There is also version of StarOffice, available from Caldera. Check
  their website at

       http://www.caldera.com

  for details on this. Caldera also makes a StarOffice CD-ROM available
  for $ 7.99 US.


  3.  Installation of StarOffice

  Installation of StarOffice consists of:

    Untarring the distribution files as root in /usr/local

    running the setup program as a user

    sourcing the .sd.sh or .sd.csh

    reading section 3.5!!! (do this)


  3.1.  Libc Issues and Fixes

  StarOffice is linked with libc 5.4.4.

  StarOffice 3.1 *will* work on Libc 5.3.x. Unfortunately, the setup
  program requires 5.4.4 or higher. If you have libc 5.3.x, you might be
  able to get around this by acquiring a copy of libc 5.4.4+ and adding
  it to your LD_LIBRARY_PATH environment variable before executing the
  setup script. I haven't tried this, however, so you're on your own.

  If you attempt to run the setup script on a libc older than 5.4.4, you
  will get the following error message:


       line 1: Syntax error at token 'I' expected declarator; i.e. File ...



  To upgrade your libc, FTP to sunsite.unc.edu and look in the directory
  /pub/Linux/GCC for the file libc-5.4.33.bin.tar.gz (or whatever the
  latest libc is). Extract the contents of this file in a temporary
  directory. A new lib/ directory will be created. Su to root and copy
  the file libc.so.5.4.33 from this directory to your /lib directory.
  Now, make the symlink from libc.so.5 to libc.5.4.33 with the command:


       ln -sf /lib/libc.so.5.4.33 /lib/libc.so.5

  then run the ldconfig command.


  Dr. Romano Giannetti (romano@iet.unipi.it ) says:



       ...I want only to add that I could install (like you
       suggested) StarWriter in a redhat 4.2 system which has a
       libc5.3, without doing the upgrade.


       The exact steps are:

  1. get a libc.so.5.4.x. If you have a redhat rpm package (as
  the one you find in the contrib directory), you can extract
  the library by going in a scratch directory and doing:
  rpm2cpio libc.so.5.4.x-y.rpm | cpio --extract --make-
  directories The library will appear in ./lib subdirectory


  2. move libc.so.5.4.x in your home directory. Then (assuming
  a sh-like shell): ln -s libc.so.5.4.x libc.so.5 export
  LD_LIBRARY_PATH=$HOME:/lib:/usr/lib


  3. Now you can run setup.



  3.2.  Installing the tar Files

  After downloading StarOffice, su or login as root and place the
  archives in /usr/local/. Change directory to /usr/local/ and extract
  the files. An example command to decompress a gzipped tar file would
  be:


       tar -xzvf filename.tar


  Older systems may require you first use the gzip -d command to unzip
  the file, then use the tar -xvf command to untar it.

  The files will extract to their locations within the newly created
  usr/local/StarOffice-3.1 tree.


  3.3.  Setup und Configuration

  After you have extracted the StarOffice files as root, you will need
  to login with your userid. Change directory to
  /usr/local/StarOffice-3.1 and execute the setup program. This program
  will install non-shared files and symlinks needed for each individual
  user. The standard installation is recommended. There *could* be
  problems if you do not accept the default installation path.

  StarOffice makes use of environment variables. The files .sd.sh
  (formatted for the Bourne Shell) and .sd.csh (formatted for the C
  Shell) provide the environment variable settings for StarOffice. These
  files are located in your home directory.

  If you use bash, edit your .bashrc and add the line:

       source  /.sd.sh


  After doing this, restart bash to bring the environment variables into
  effect.

  If you use a different shell, consult that shell's man page for
  information on sourcing a file.


  3.4.  COL (Caldera OpenLinux) setup bug

  Phil Reardon (pcr@busprod.com ) says:

       " I found a bug in the setup script for StarOffice that came
       with my Caldera COL standard release. It produces // in a
  path where there should only be one /. To fix it, remove the
  first slash from this line:

       exec ${pfad:='.'}/linux-x86/bin/$name;;


  There should be no / before linux-x86."


  3.5.  Fixing the LANG variable problem

  The .sd.sh and .sd.csh files set the LANG variable. This causes
  problems with perl and man. Man will give the error message


       " Failed to open the message catalog man on the path
       NLSPATH="

  Perl will give the error message

       " warning: setlocale(LC_CTYPE, "")..."


  The .sd.sh file contains a line that sets LANG=us and another that
  exports a bunch of variables, including LANG. Remove the LANG=us line
  and remove LANG from the list of variables, and this will be fixed.

  In the .sd.csh file (which is formatted for the c shell), you need to
  remove the line that says "setenv LANG us".

  Thanks to Adam L. Klein (alklein@adelphia.net) for informing me of
  this fix.


  4.  Running StarOffice

  The StarOffice binaries are located in the directory:
  /usr/local/StarOffice-3.1/linux-x86/bin/

  The applications are: sdraw3, swriter3, scalc3, smath3, schart3,
  simage3

  The program svdaemon must be executed in order to use online help.
  The program svportmap must be executed to enable application
  communication features between StarWriter, StarCalc and StarDraw.


  5.  StarOffice Tips

  Contributed by Patrick D'Cruze (pdcruze@netpal.com.au)


  1.  Instead of sourcing the .sd.sh (or .sd.csh) file in my
  .bash_profile script, I instead copied the .sd.sh script,  renamed it
  to swriter and copied it to /usr/local/bin.  I then modified it by
  adding a:

       #! /bin/bash


  at the start of the script and a:

       exec swriter3 $*



  at the end of the script.  Now all I have to do is run swriter and it
  automatically sets up the appropriate environment variables and then
  runs StarWriter. Saves having those environment variables pollute
  other applications/environments.


  2.  I noticed that for a lot of people, StarOffice takes quite a while
  to load (upwards of 60 seconds).  The consensus on usenet was that a
  large chunk of this time was due to the symbol relocations that the
  dynamic linker has to do. ie, for each new symbol the dynamic linker
  has to locate the appropriate library.  StarOffice dynamically links
  against quite a few libraries so the dynamic linker spends quite a bit
  of time searching through lots of libraries.


  There is a solution to this. I run StarOffice in a chroot'd jail.  In
  the jail, I just put the binaries and libraries that StarOffice uses
  (all the libs out of /usr/X11R6/lib, libc/libm and libg++/libstdc++).
  StarWriter takes approximately 15 seconds to come up on my P133/32MB.
  This is due to the fact that the only libraries present are the ones
  needed by StarOffice and hence the dynamic linker spends
  proportionately less time searching through all the libraries on the
  system (ie, it doesn't search through all the useless libs in /usr/lib
  etc looking to resolve symbols).


  6.  More Information

  More information on StarOffice for Linux is available directly from
  StarDivision. StarDivision maintains a website at
  http://www.stardivision.com

  StarDivision runs a news server with support and user groups related
  to StarOffice for linux. These newsgroups are the best place to find
  up-to-date information on StarOffice and to ask for help. Using a
  newsreader, connect to news://starnews.stardivision.com or follow the
  support link on the StarDivision homepage.


  7.  Contributions

  Thank you to Werner Klaus (wklaus@metronet.de ) for translating this
  document to sgml.

  If you can contribute any additional information for this mini-HOWTO,
  please contact me via internet e-mail. My address is located at the
  top of this document. You may also wish to take a look at my web page,
  located at http://tarp.worldserve.net/ or http://tarp.linuxos.org/


  8.  Disclaimer and Copyright

  This document is (C) 1999 by Matthew Borowski.

  Redistribution of this document in electronic form is permitted under
  the condition that the document remains unchanged. If you wish to
  include this document in a CD-ROM or book, please obtain permission
  from me beforehand (I prefer requests to be sent via e-mail).


  The author claims no responsibility in anything that may occur
  directly or indirectly as a result of using this document. The author
  is not an employee of StarDivision, GmbH or Caldera, Inc.

  Comments and questions may be directed to the author at
  mkb@poboxes.com.
  Linux Swap Space Mini-HOWTO
  Rahul U. Joshi, jurahul@hotmail.com <mailto:jurahul@hot
  mail.com>
  v1.41, 9 December 1999

  This Linux Mini-HOWTO describes how to share your Linux swap partition
  with Windows.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. What you need

  3. Recent Changes and versions

  4. Administrative

     4.1 Copyright
     4.2 Disclaimer

  5. Before you begin

  6. The Procedure

     6.1 Turn off swapping and create a DOS partition
     6.2 Tell Windows the location of the new swap file
        6.2.1 (BF
        6.2.2 (BF
     6.3 Back up the Total Special Sectors
     6.4 Modify the initialization and shutdown scripts to handle our new           configuration
     6.5 Reenable swapping

  7. A couple of notes

  8. What are we exactly doing ?

  9. The swapinit.sh script

  10. The swaphalt.sh script

  11. The msinfo.sh script

  12. The original msinfo file

  13. For users of v1.4 of the Swap-Space HOWTO

  14. Acknowledgements, feedback and dedication



  ______________________________________________________________________

  1.  Introduction


  Many people use both Linux and MS-Windows.  The ability to do so is an
  important part of "the Linux revolution"; i.e. letting people
  experiment with (and get hooked on) Linux while still being able to
  run their off-the-shelf software.  Since both Linux and MS-Windows use
  virtual memory with swap to disk, a frequently occurring question in
  comp.os.linux.setup is how to share swap spaces, in order to reduce
  the amount of disk space needed.

  There are several methods for sharing swap spaces, the one described
  in this document is probably the most complicated one but is the only
  one I have encountered that allows maximum performance for both
  environments without the risk of trashing a disk partition. If you are
  using DOS, then many DOS applications manage their own swap files. You
  can also share the Linux swap partition with these applications.

  NOTE: In case you used an older version of this document (v1.4) and
  found that SCANDISK gives errors on drive X:, please go to the
  ``section'' written especially for you to get things restored.



  2.  What you need


  This procedure have a few requirements that need to be filled.  I
  strongly recommend that you fill these requirements *anyway*, as there
  are several problems with older versions.



  1.  MS-DOS 5.0 or newer and MS-Windows 3.1/3.11 OR MS-Windows 95/98

  2.  A shutdown/init that knows to run a file on shutdown.  (The
     SysVinit-2.50 package can do this, for example.  SysVinit-2.50 is
     available from sunsite.unc.edu in /pub/Linux/system/Daemons.
     Almost all current distributions use this init package.)

  3.  Recent Changes and versions


    Version 1.3 -- Written by H. Peter Anvin, and was not maintained
     from 15 Jan 1998.

    Version 1.4 -- Based on v1.3, but added more details.  Currently
     maintained by Rahul U. Joshi

    Version 1.41 -- Modified some steps to prevent errors on swap drive
     if it is checked with SCANDISK.

  Modifications by Rahul U. Joshi

  Date: 26 Nov 1999


    Added Windows 95/98 specific details.

    Added Red Hat Linux specific details.

    Modified the msinfo program.

    Added sections 5 to 12.

    Completely revamped the "Procedure" section to make it more
     understandable.

    Split up the swap initialization and halt into two shell scripts.

    Modified the scripts to handle signature verification more than
     once.

    Added details about new type swap areas.

    Added more reliable schemes.

  4.  Administrative

  4.1.  Copyright

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu <mailto:linux-
  howto@sunsite.unc.edu> via email.



  4.2.  Disclaimer

  Although I have tried my best to bring out various facts, the author
  is not responsible for any damage due to the actions taken based upon
  the information contained in this document. It is impossible to test
  the things under all the configurations, so probably some of the hints
  given in this document may be buggy and may not work on your system.
  In case you trace the bug, let me know it first !

  This document is provided ``as is''. I put great effort into writing
  it as accurately as I could, but you use the information contained in
  it at your own risk. In no event shall I be liable for any damages
  resulting from the use of this work.

  In case you are planning to include this HOWTO on some distribution
  medium or in print, I will like to have an acknowledgement e-mail
  (just for my record). In that case, I may also be able to send you the
  latest version of the document.



  5.  Before you begin

  This is not a step by step HOWTO. The reader is expected to first read
  the entire document so that he (or she) becomes aware of the possible
  pitfalls and performance bottlenecks. After having a fair idea as to
  what steps are to be taken, he (or she) can then follow the next
  section in a step by step manner. Since you will be playing as a root
  and that too with the system initialization files, be alert as to what
  you are doing. Write in those files comments for those sections that
  you added, and when you want to remove a section, do not delete it.
  Instead just comment it out. (In shell scripts comments begin with a
  pound(#) sign). In case things go wrong, you may restore your original
  configuration by removing the changes you did.  Although you are not
  required to know shell scripting since I have given all those that
  would be needed, some knowledge may be advantageous both for
  understanding as well for debugging.
  6.  The Procedure


  NOTE: This procedure has been written keeping in mind RedHat Linux 6.0
  Although this procedure in general is applicable for all Linux
  distributions, the details may vary. You are welcome to add the
  details for your distribution. Many users will already have a swap
  partition devoted to Linux. I assume you have one.

  6.1.  Turn off swapping and create a DOS partition



     Boot Linux. Turn off swapping by editing the /etc/fstab file and
     commenting the line that describes your swap partition.



     Using fdisk under Linux, delete the swap partition in order to
     create free space on the disk.



     Boot DOS.  Create a DOS partition (using FDISK) the size = the size
     swap space you want. If you cannot create the partition (probably
     because DOS FDISK says that all the space in extended partition is
     allocated to the logical drive), you can use fdisk or cfdisk under
     Linux to create the partition. You can even just change the type of
     your swap partition from 82h (Linux Swap) to 06h (FAT16).  In that
     case you don't need to delete the swap partition, just change the
     type.



     Once you have created the partition, Boot DOS if you are not
     already in DOS.  DOS will be assigned a drive letter to your new
     partition. Use that drive letter instead of X whenever these
     instructions lists a command like "LABEL X:" or "COPY FOO
     X:DUMMY.DAT"



     Format this partition using the DOS FORMAT command.



       C:\>FORMAT X:



     Set the volume label on this partition to "SWAP SPACE" using the
     DOS LABEL command.  Verify it by the DIR command.  Please do this
     as a separate step.  Some versions of FORMAT do not seem to put the
     volume label in the boot sector as it should.  [Note: some people
     has written me saying the volume label is stored in the root
     directory.  Yes, but at least since DOS 5.0 it has also been in the
     boot sector.]


       C:\>LABEL X:
       C:\>DIR X:



     At this stage, you have a DOS partition ready for use for swapping.



  6.2.  Tell Windows the location of the new swap file

  6.2.1.  For Windows 3.1 users



     Start Windows.  Go to the Control Panel, select "386 Enhanced".
     Select "Virtual Memory" and create a Windows Permanent swap file on
     drive X: of maximum size (Windows will tell you the maximum size).
     Windows may complain saying it will not use a swap file that big.
     Ignore the message and create the file anyway.



     Exit Windows.



  6.2.2.  For Windows 95/98 users



     Start Windows. Go to the Control Panel (Start | Settings | Control
     panel).  Double click the System icon. In the resulting System
     Properties dialog box, select the Performance tab. Now click the
     Virtual Memory button. This will bring up the Virtual Memory dialog
     box. Select "Let me specify my own virtual memory settings". Select
     the drive you intend to share as swap space with Linux (X:). Keep
     the Maximum and Minimum values as selected by Windows. Click OK.
     Windows will prompt you to restart your computer. Do it.



     When you restart Windows, you will see that the win386.swp file has
     been created on the X: drive. In addition, there is also the
     Recycled folder.  Since you don't intend to store any other files
     on this drive and also a single file on this partition will be
     convienent, tell Windows not to maintain Recycle Bin for this (X:)
     drive. On the Desktop, left click the Recycle Bin icon, and in the
     resulting pop-up menu, click Properties. This will bring up the
     Recycle Bin Properties dialog box. Click the Global tab and select
     "Configure drives independently". Now click the tab for X: drive
     (which will have the label SWAP SPACE). In this dialog box, move
     the slider for "Maximum size of Recycle Bin" to 0 percent. The
     "Space Reserved" entry should now read as 0 bytes. Click OK.
     Restart your computer.



     Now that you are not maintaining the Recycle Bin for drive X:,
     ideally the RECYCLED folder from X: must be deleted by Windows. Not
     only Windows doesn't does that, but also does not allow you to
     delete the folder. But as I said earlier, this folder is now
     unnecessary and we want drive X: to contain only the win386.swp
     file. For that purpose, first start your computer in MS-DOS mode.
     Select Start | Shut Down | Restart your computer in MS-DOS mode, or
     if you are booting Windows, press F8 at the start, and then from
     the startup menu, select Command Prompt only.  Once you are in MS-
     DOS mode, type the following commands:


       C:\>X:
       X:\>ATTRIB -R -H -S RECYCLED
       X:\>DELTREE RECYCLED



  Now you have drive X: containing only win386.swp. You can verify this
  using the various options for the dircommand. This does not mean that
  the RECYCLED folder will not be there on drive X:. When Windows boots
  up and finds that there is no RECYCLED folder on X:, it will create it
  automatically. However, when we will be restoring X: from Linux, it
  will simply contain win386.swp file. If anyone is aware of a method to
  prevent Windows from creating the RECYCLED folder, please e-mail me.



      Disk Cleanup troubles you ?


     If you have Disk Cleanup installed, then ocassionally Windows comes
     out with a "Low disk space on drive X:". Since we are using the
     entire X: drive for swapping, there is no need to have any free
     space on X:. To prevent this dialog box from appearing, start Disk
     Cleanup (point to Start | Programs | Accessories | System Tools |
     Disk Cleanup). In the resulting dialog box, select the X: drive and
     click OK. The "Disk Cleanup for drive X:" dialog box appears. Click
     the "Settings" tab and uncheck the "If this drive runs low on disk
     ... blah blah blah" check box.



  >From this stage onwards, Windows will assume that it's swap file is
  on drive X:. So the drive X: must be intact each time you boot
  Windows. If you are using some additional system utilities like Norton
  Utilities for Windows 95, then you should probably consult the online
  help or the manuals to keep them informed of the changes in the
  settings, otherwise they may come out with an error message.

  6.3.  Back up the Total Special Sectors



     Boot Linux, then log in as root.



     Use the fdisk command to find the name of the partition and its
     size in blocks.  Create a symbolic link from /dev/winswap to this
     partition.  If the partition is hda7, then type:


       # ln -s /dev/hda7 /dev/winswap



  [NOTE TO PURISTS: Please use a symlink.  The name of this partition is
  going to go into several configuration files and inconsistencies could
  be fatal.]



     Find the "Total Special Sectors" for the swap drive. These are
     nothing but the total number of sectors required for the boot
     sector, FAT and root directory.  There are a number of ways to find
     this number. Simplest copy the ``msinfo.sh'' file using your
     favourite editor. Give the following commands at the  shell prompt



       # cp Swap-Space-HOWTO msinfo.sh
       # chmod +x msinfo.sh



  (Much easier if you use one of the editors with KDE or GNOME)

  Now, open the msinfo.sh file in the editor and delete everything
  except the msinfo.sh file in section 8. Now run this file as



       # ./msinfo.sh /dev/winswap



  The program will print the some information about the swap partition.
  Take note at the number saying "Total special sectors", and verify
  that the volume label says "SWAP SPACE".  If it does not, reboot DOS
  and re-do the LABEL command.



     Note: You can also find the "Total Special Sectors" using tools
     that can display the Boot sector like the Norton Disk Editor or
     minfo from mtools under Linux. For Norton Disk Editor, select
     "Boot Sector" from the Object menu. Note down the following entries
     :


       Reserved Sectors at beginning : r
       FAT Copies                    : f
       Sectors per FAT               : s
       Root directory entries        : r



  Now the "Total Special Sectors" is given by

  T = r + (s * f) + (d / 16)

  However, using the above program is more convienent.

  Let us denote these Total Special Sectors by XXX.



     [Optional step] Windows may occasionally leave some space on the
     partition, even if it is told not to.  Don't attempt to use this
     space, since it will be erased any time you run Linux.  If you want
     to avoid accidentally using it (and lose data), you can create a
     dummy file that fills that space by using the following commands:


       mkdir /mnt
       mount -t msdos /dev/winswap /mnt
       dd if=/dev/zero of=/mnt/dummy.fil
       umount /mnt



  The dd command will report "No space left on device".  This is exactly
  what you want.



     Type on the shell prompt:



       # dd if=/dev/winswap bs=512 count=XXX | gzip -9 > /etc/winswap.gz
                                         ^^^



  ... where XXX is replaced with the "Total special sectors" number.

  Here we are saving the Total Special Sectors in a compressed form in
  the file /etc/winswap.gz



  6.4.  Modify the initialization and shutdown scripts to handle our new
  configuration



     Now, we will modify our initalization scripts so that swap space
     will be create on the partition each time Linux starts and the
     DOS/Windows special sectors will be restored each time Linux shut
     downs.



     Instead of placing the command for handling the details directly in
     the initialization scripts, we will prepare two separate files
     called swapinit.sh and swaphalt.sh. One sample of these files that
     should work under Red Hat Linux is given in section at the end. You
     can choose to place these files under any directory, preferably
     /etc/rc.d/init.d. Create the two files in this directory and copy
     into then the scripts given in sections at the end. One simple way
     is to copy this HOWTO in these files as,



       # cp Swap-Space-HOWTO  /etc/rc.d/init.d/swapinit.sh
       # cp Swap-Space-HOWTO  /etc/rc.d/init.d/swaphalt.sh



  and then using your favourite editor, delete all execpt the required
  part. Now make these file "executable" by giving the following
  commands


       # chmod +x swapinit.sh
       # chmod +x swaphalt.sh



     Run fdisk and find the size of the swap partition in blocks. In
     both the above files (swap????.sh) replace the YYYYY by this
     number.



     Check the name of the shutdown file.  For SysVinit this is the file
     listed in the following line of /etc/inittab; add it if you don't
     have it.


       # Runlevel 0 means shut down the system
       l0:0:wait:/etc/brc



  (Under Red Hat Linux, this file probably will be
  /etc/rc.d/init.d/halt) If you are not in a position to find it out,
  browse through the /etc directory and find the initialization file
  that contains the "swapon -a" command. Only this much for now !

  For the remainder of this file, I will assume the filename was
  /etc/rc.d/init.d/halt (halt for short).



     Check the name of your system initialization file. For SysVinit,
     this is the file listed in the following line of /etc/inittab.



       # System initialization
       si::sysinit:/etc/rc.d/rc.sysinit



  In case of your distribution, your file may be different. I assume
  that the file is /etc/rc.d/rc.sysinit (rc.sysinit for short)



     Add the following piece of code to your initialization file
     (rc.sysinit), in place of the "swapon -a" command. You may consider
     not deleting but just commenting the original commands so that if
     something goes wrong, we can restore the script to it's initial
     state.

     If your swapon is in /etc, replace /sbin/swapon with /etc/swapon.
     If it is in /bin, replace with /bin/swapon.  Do the same for
     mkswap.



  # -----------------------------------------------------------------------
  # removed by yourname
  # Start up swapping.
  # action "Activating swap partitions" swapon -a
  # -----------------------------------------------------------------------

  # ----------------------------------------------------------------------
  # added by yourname
  # Verify and initialize swap space
  #
  /etc/rc.d/init.d/swapinit.sh
  # ----------------------------------------------------------------------



     A simple way to paste the text is to start two Virtual Consoles.
     Log as  a root in both cases. Use your favourite editor to open
     this HOWTO on one console and the script to be modified on other
     console. Now select the above code with your mouse and switch to
     the other console. Place the cursor at the desired position to
     paste and press the right mouse button. The selected text will be
     copied.



     Add the following piece of code to your shutdown file (halt).Put
     this after any command that might need swap to be in place.
     Normally, your halt file will have the "swapoff -a" command. First
     replace the -a by /dev/winswap. Then immediately after that
     section, add the following commands.


     Note for RedHat Linux 6.1 :  It seems that Red Hat Linux 6.1 halt
     script automatically finds all the swap partitions and turns of
     swapping.  So, RedHat Linux 6.1 users need not replace the swapoff
     $SWAPS comamnd by the swapoff -a command. In that case, just add
     the /etc/rc.d/init.d/swaphalt.sh command to the halt file



       # ------------------------------------------------------------------------
       # Modified by yourname
       # replaced "swapoff -a" by "swapoff /dev/winswap"
       #
       # Turn off swap, then unmount file systems.
       runcmd "Turning off swap and accounting" swapoff /dev/winswap
       [ -x /sbin/accton ] && /sbin/accton
       # ------------------------------------------------------------------------

       # ------------------------------------------------------------------------
       # Added by yourname
       # check swap signature and restore Windows swap info
       /etc/rc.d/init.d/swaphalt.sh
       # ------------------------------------------------------------------------

  6.5.  Reenable swapping


  Uncomment the line in /etc/fstab that you commented earlier. (Not
  really necessary, since we now do not refer to fstab for swap
  partitions). Reboot Linux.  You should now have swapping on the new
  swap device.


  7.  A couple of notes



     There is no need to add /dev/winswap to your /etc/fstab file.  In
     fact, it is probably wise not to do so (except possibly as a
     comment).



     If your Linux session crashes or otherwise exits without running
     /etc/rc.d/init.d/halt, you will need to reboot and exit Linux
     before swapping in Windows will work.  It is also possible to
     FORMAT X: and re-create the Windows swap file.  The only way around
     this would be to put the equivalent of the /.../halt commands in
     the DOS AUTOEXEC.BAT file. I have tried to write some programs to
     do this, but that turned out to be a hell lot of trouble !  First
     and foremost, simply restoring the total special sectors doesn't
     please DOS. Along with that, it seems you need to modify some
     internal data structures so that DOS starts recognizing your drive,
     otherwise DOS comes out with the error message:


       Invalid media type reading drive X:
       Abort, Retry or Fail ?



  Since I am not aware of many details of DOS's or Windows's handling of
  disk drives, I think at this point, you may consult some DOS expert.
  Of course, if you are not concerned about the booting time, then you
  can simply add the command to perform an unconditional FORMAT of X:
  and then restore the TSS's. May be there are some other solutions. If
  you are aware of one, please e-mail me today !



     One way to restore your Windows swap partition is to start Linux,
     disable swapping as described above, and then use the following
     command :



       # swapoff -a
       # zcat /etc/winswap.gz > /dev/winswap
       # reboot



     Why to delete the RECYCLED folder ?  According to the procedure
     mentioned above, you must delete the RECYCLED folder. This is
     necessary because we will be saving and restoring only the sectors
     unto the root directory, but no further sectors. Also, we want the
     drive X: to be restored to a "clean" state with no errors. If we
     don't delete the RECYCLED folder, then the root directory entry is
     restored, but the "." and ".." entries for this folder are not
     restored and ScanDisk finds errors on the disk. To prevent this
     from happening, we will delete the RECYCLED folder and hence only
     the entry for win386.swp file will be restored.



     If DOS' FDISK reports the partition as a "logical DOS drive", it
     has a number of 5 (as in /dev/hda5) or higher.  It is *NOT* the
     partition labelled "extended" which has a number of 4 or less!!  If
     your Linux fdisk does not display logical partitions, you have a
     broken Linux fdisk (Slackware 2.2 included a broken fdisk, for
     example.)  You can try "cfdisk" if your distribution has it, or you
     will have to get a working fdisk.



     When you turn off swapping, Linux has to manage everything in the
     main memory itself. If your system memory is low, say something
     like 16MB, then some large applications that run during
     initialization may not be able to run properly. As an example, you
     may get the following message during initialization:



       Finding module dependencies Out of memory



  I don't think this will cause any problems later until you reenable
  swapping. But it's always better to take some precautions. As you will
  be seeing in the next section, Linux can also be configured to use a
  swap file instead of a swap partition. So if you feel that Linux will
  not run properly with your normal system memory, create a swap file
  that Linux will use temporarily until swapping is restored. This swap
  file should preferably in the root directory. Figure out the minimum
  size of swap space required. It will probably equal to your system
  memory. Create a swap file of that size by giving the following
  commands (assuming 16MB swap space):



       # dd if=/dev/zero of=/swap bs=1024 count=16384
       # mkswap /swap 16384
       # sync



  Now place the command swapon /swap just after the original swapon -a
  command in the rc.sysinit file. Thus, now your system has been
  configured to use swap file and hopefully there will be no Out of
  memory errors. After having a workable swap partition (i.e after
  following through this HOWTO completely), you can remove the swapon
  /swap line that you added to your rc.sysinit file.



     Please do not mail me unless you have checked and re-checked that
     you copied your scripts correctly.  More than half of the problems
     reported with this Mini-HOWTO have been due to typos when copying
     the scripts.  (Use cut-and- paste if you can!). Even a spacing
     error can cause an error. For example, if at the startup you get
     the messages



       Verifying swap space...Linux signature found
       swapon: /dev/winswap invalid argument



  Then, surely there has been a typing mistake in your scripts. Please
  check your scripts.



     Sometimes, the swap partition is detected to have neither Linux nor
     Windows info and the "No signature found" error appears. I exactly
     don't know why this happens, but for that case, I have written the
     code in swap????.sh files to try six times before reporting an
     error. Normally, the DOS signature should be found on the first
     try, but many a times on my system it is found on iteration 2, 5 or
     not at all after 12 iterations. You may consider increasing the
     number of tries to some value like 12 or 24, there is no harm in
     doing so. Once on my system, the script could not detect the
     signatures even after 50 iterations !  If such a situation arises,
     you may consider making a symbolic link to the swapinit.sh file in
     your root home directory, and execute it at startup.



       # ln -s /etc/rc.d/init.d/swapinit.sh swapinit.sh
       # ./swapinit.sh



  However, what I have observed is that once the setup runs on your
  system for some time, the appropriate signatures are always found on
  the first iteration.



     For added reliability

     Your Linux Box runs something very important, or your system memory
     is less so that without swapping, your applications just start
     collapsing ? You have set up the swap partition to be shared by
     Windows. But many a times, your system is unable to detect the
     proper signatures after exhaustive probing and so disables any
     swapping partitions. At your own risk, you may consider removing
     the signature checking logic, but here is a more approachable
     solution.

     First refer to the ``previous point'' and create a swap file in the
     Linux root directory, with the name /swap. Keep it's size according
     to your requirement. Now open the swapinit.sh file and modify the
     last if statement as follows:



       if [ $activated -ne 1 ] ; then
         echo "Swap signature not found after $loopcount tries"
         echo "Activating swap file"
         swapon /swap
         exit 1
       fi



  Thus if we find that swap partition lacks appropriate swap signatures,
  then we enable the swap file. Since the swap file is on the root
  partition and the Linux Kernel refuses to proceed until it mounts the
  root file system, you are safely assured that the swap file will
  always be successfully activated. Instead of creating and keeping the
  swap file and wasting disk space, you may also modify the code to
  create the swap file on the fly.



     Saving more disk space As we saw, Linux and Windows can share their
     swap spaces. But Window doesn't really require as large a swap file
     as your Linux swap partition ? Then you can have some free space on
     the swap partition (keep the Windows swap file size smaller than
     the swap partition size). Swapping for Windows based applications
     is managed by Windows itself. But many DOS programs like Turbo C++
     Compiler, Norton DOS etc. also manage their own swap files. In that
     case it is possible to configure these programs so that they create
     their swap files in the swap partition instead of their default
     location.  This will increase your usable disk space. Also, most of
     these program forget to delete the swap files they created, leading
     to a large used disk space. But with this setup, every time you
     shut down Linux, you get a clean swap partition, saving your time
     in finding and deleting these swap files.  For example, you can
     tell Turbo C++ to swap on drive say E: by invoking it as


       C:\CLAN>TC /RE



  For Norton DOS, set the variable in the NDOS.INI file as,


       Swapping = E:\



  Many other programs may rely on the TEMP or TMP environment variables
  to decide where they will swap. In that case you may set these vari
  ables appropriately in your AUTOEXEC.BAT file.



      What if the swap partition is a FAT32 ?  No, you can't have a swap
     partition with a FAT32 file system. First of all, Linux can use a
     maximum of 128MB of swap space on a single swap partition.  Thus,
     if your swap partition is larger than 128MB, you are wasting your
     disk space. And Windows will refuse to convert a partition of 128MB
     into a FAT32 file system.



     The new style swap space Linux knows about two styles of swap
     areas, the old style and the new style.  By default, you will be
     using the old style swap space with a signature "SWAP-SPACE". If
     you want to use the new style swap space, then first of all change
     "SWAP-SPACE" in all the above scripts to "SWAPSPACE2". Also add an
     option -v1 in the mkswap command in the swapinit.sh script, as
     follows



       /sbin/mkswap -v1 /dev/winswap YYYYY



  Also, run the following commands from the shell prompt :



       # swapoff /dev/winswap
       # mkswap -v1 /dev/winswap YYYYY
       # swapon /dev/winswap



  It seems that under new style swap space, your usable swap partition
  can be as large as 2GB on i386 platforms. This means that you can now
  have a swap partition larger than 512MB which Windows can format as a
  FAT32 partition .  Someone help on how do we save the "Total Special
  Sectors" under a FAT32 partition.



  8.  What are we exactly doing ?



     Both Windows and Linux use swap space. When an OS is shut down, the
     contents of the swap space are just garbage, the OS doesn't bother
     about what is in it.  Now what is the point in devoting a 60MB
     partition for swap space to Linux and about 32MB of disk space
     separately to Windows when only one of them is going to run at a
     time (It is possible to run both Linux and Windows at the same
     time, thanks to VMWare. For more information, see VMWare website
     <http://www.vmware.com>). So we want Linux and Windows to share the
     same hard disk space as swap space.



     The problem is that Linux uses a partition as a swap space and
     Windows uses a file as a swap space. ( Although it is possible to
     create a swap file for Linux, it is not recommended. See "Linux
     Installation and Getting Started" by Matt Welsh). Now if Linux uses
     the same partition on which Windows stores it's swap file, it will
     overwrite the boot sector, FAT and other data tables that Windows
     assumes to exist on every drive. Thus, Windows will not be in a
     position to find the swap file on startup and will create the
     win386.swp file in the windows directory. Thus, even if by chance,
     your Linux crashes, Windows will be in a position to start. In such
     a case ( with Windows swap file in the  Windows directory), just
     restore the DOS/Windows swap info by restarting Linux and the start
     Windows. Now Windows will be using the swap file on drive X: so you
     can safely delete the win386.swp file in the windows directory.



     The remedy is to store those critical data tables once on the Linux
     partition in some file. Then every time Linux starts, check whether
     the swap space was last used by Linux or Windows (using the label
     you gave to your partition).  If it was Linux, just enable swapping
     else first make a swap partition on the X: drive using "mkswap
     /dev/winswap" and then enable swapping.



     When you shut down Linux, it is important to restore the swap
     partition to the DOS format, so that Windows can start properly.
     For that purpose we add the



       /bin/zcat /etc/winswap.gz > /dev/winswap



  command to the halt file.



  9.  The swapinit.sh script


  This shell script initializes the swap space on the partition. The
  code for signature detection has been repeated 6 times because many a
  times the signature is properly detected only on the second or the
  third try.

  (Adapted from the original Swap-Space-HOWTO by H. Peter Anvin)



       #!/bin/sh
       #
       # swapinit.sh - activate the swap partition
       #
       # written by Rahul U. Joshi
       # Verify and initialize swap space
       #

       echo -n 'Verifying swap space... '

       loopcount=0

       # flag to indicate whether the partition has been activated or not
       activated=0

       # check for signatures 6 times before giving up
       while [ $loopcount -lt 6 ]
         do

         if [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=10  skip=4086`" = 'SWAP-SPACE' ]; then
           echo "Linux signature found, iteration $loopcount"
           echo "Activating swap partitions"
           swapon /dev/winswap
           activated=1
           break

         elif [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=11 skip=43`" = 'SWAP SPACE ' ]; then
           echo "DOS signature found, iteration $loopcount"
           echo "Making swap partition"
           mkswap /dev/winswap YYYYY
           echo "Activating swap partitions"
           swapon /dev/winswap
           activated=1
           break

         else
          let loopcount=loopcount+1
         fi

         done


       if [ $activated -ne 1 ] ; then
         echo "Swap signature not found after $loopcount tries"
         echo "No swapping partitions activated"
         exit 1
       fi



  10.  The swaphalt.sh script

  This script first checks the Linux swap signature and then restores
  the Windows file system on it.

  (Adapted from the original Swap-Space-HOWTO by H. Peter Anvin)



  #!/bin/sh
  #
  # swaphalt.sh   This file is executed through the /etc/rc.d/init.d/halt
  #               script after swapping and accounting has been turned off.
  #
  # Author:       Rahul U. Joshi
  #

  # check swap partition signature and restore Windows swap info

  loopcount=0

  # flag to indicate whether the swap info has been restored or not
  restored=0

  # check for swap signature 3 times before giving up
  while [ $loopcount -lt 3 ]
    do

    if [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=10 skip=4086`" = 'SWAP-SPACE' ]; then
      echo "Restoring DOS/Windows swap info , iteration $loopcount"
      /bin/zcat /etc/winswap.gz  >  /dev/winswap
      restored=1
      break
    else
      loopcount=loopcount+1
    fi

    done

  if [ $restored -ne 1 ] ; then
     echo "Swap signature not found after $loopcount tries"
     echo "Skipping restoring"
  fi



  11.  The msinfo.sh script


  This shell script analyses the boot sector of the given partition and
  displays some information along with the "Total Special Sectors" in a
  message box. It assumes that the filesystem on the given partition is
  a FAT16. If not, it will print an error message and exit. Invoke it as



       # msinfo <partition name>



  To run this script, you will need the "dialog" program that displays
  dialog boxes. You can get it from here
  <http://sunsite.unc.edu/pub/Linux/utils/shell>.



  #!/bin/sh
  #
  # msinfo.sh           This shell script displays the boot sector of the
  #                     given partition.
  #
  # Author:             Rahul U. Joshi
  #
  # Modifications       Removed the use of expr and replaced it by the let
  #                     command.


  # check for command line arguments
  if [ $# -ne 1 ]; then
     echo "Usage: msinfo <partition name>"
     exit 1
  fi

  # check whether the input name is a block device
  if [ ! -b $1 ]; then
     echo "msinfo: $1 is not a block device"
     exit 1
  fi

  # create two temporary files for use
  TMPFILE=`mktemp -q /tmp/$0.XXXXXX`
  if [ $? -ne 0 ]; then
      echo "msinfo: Can't create temp file, exiting..."
      exit 1
  fi

  TXTFILE=`mktemp -q /tmp/$0.XXXXXX`
  if [ $? -ne 0 ]; then
     echo "msinfo: Can't create temp file, exiting..."
     rm -f $TMPFILE
     exit 1
  fi

  backtitle="`printf "%78s" "msinfo, Information about FAT16 filesystem -- Rahul Joshi"`"

  dialog --title "Boot sector of $1" --backtitle "$back_title" --infobox "\nAnalysing boot sector for $1\nPlease wait ..."  14 60

  # truncate TXTFILE to zero length
  echo > $TXTFILE

  # get Formatting DOS version
  dd 2>/dev/null if=$1  bs=1 count=8 skip=3 | dd 2>/dev/null of=$TMPFILE
  printf >>$TXTFILE "%30s : %s\n" "Formatting DOS version" "`cat $TMPFILE`"


  # get file system
  dd 2>/dev/null if=$1  bs=1 count=8 skip=54 | dd 2>/dev/null of=$TMPFILE
  printf >>$TXTFILE "%30s : %s\n" "Filesystem" "`cat $TMPFILE`"

  # check if filesystem in a FAT16
  if [ "`cat $TMPFILE`" != "FAT16   " ]; then
    dialog --title "Boot sector of $1" --backtitle "$back_title" --infobox  "\nCan't find a FAT16 filesystem on $1"  14 60
    exit 2
  fi

  # get volume label in boot sector
  dd 2>/dev/null if=$1  bs=1 count=11 skip=43 | dd 2>/dev/null of=$TMPFILE
  printf >>$TXTFILE "%30s : %s\n" "Volume label in boot sector" "`cat $TMPFILE`"


  # get Sector size
  dd 2>/dev/null if=$1  bs=1 count=2 skip=11| od -An -tdS | dd 2>/dev/null of=$TMPFILE
  printf >>$TXTFILE "%30s : %d\n" "Sector size" `cat $TMPFILE`
  sector_size=`cat $TMPFILE`


  # get Reserved sectors
  dd 2>/dev/null if=$1  bs=1 count=2 skip=14| od -An -tdS | dd 2>/dev/null of=$TMPFILE
  printf >>$TXTFILE "%30s : %d\n" " Reserved sectors" `cat $TMPFILE`
  reserved_sectors=`cat $TMPFILE`


  # get FAT sectors
  dd 2>/dev/null if=$1  bs=1 count=1 skip=16| od -An -tdS | dd 2>/dev/null of=$TMPFILE
  fat_count=`cat $TMPFILE`

  dd 2>/dev/null if=$1  bs=1 count=2 skip=22| od -An -tdS | dd 2>/dev/null of=$TMPFILE
  sectors_per_fat=`cat $TMPFILE`

  # calculate the no of sectors allocated for FAT's
  let fat_sectors=fat_count*sectors_per_fat

  printf >>$TXTFILE "%30s : %u (%u x %u) \n" "FAT sectors" "$fat_sectors" "$fat_count" "$sectors_per_fat"


  # get root directory sectors
  dd 2>/dev/null if=$1  bs=1 count=2 skip=17| od -An -tdS | dd 2>/dev/null of=$TMPFILE
  root_sectors=`cat $TMPFILE`

  # calculate the no of sectors allocated for root directory
  let root_sectors=root_sectors*32/sector_size

  printf >>$TXTFILE "%30s : %u\n" "Root directory sectors" "$root_sectors"


  # get Total special sectors
  let total=reserved_sectors+fat_sectors+root_sectors
  printf >>$TXTFILE "%30s : %u\n" "Total special sectors" "$total"


  # display the information
  dialog --title "Boot sector of $1"  --backtitle "$back_title"  --msgbox "`cat $TXTFILE`" 14 60

  # delete temporary files
  rm -f $TMPFILE
  rm -f $TXTFILE

  # end of msinfo.sh



  12.  The original msinfo file


  Here is the msinfo file required to find the "Total Special Sectors".
  It was included by the original author of this HOWTO in an encoded
  form. First copy the text from the line "begin 755 msinfo.gz" to the
  line "end" into a temporary file say temp.uu. Then uudecode this file,
  and finally gunzip to get msinfo file.



       # uudecode temp.uu
       # gunzip  msinfo.gz



  Now run the program using the command



       # ./msinfo /dev/winswap



  The program displays the boot sector information for given partition
  as well as the "Total Special Sectors" for the drive.



       begin 755 msinfo.gz
       M'XL(`$$YNRT"`Y557TQ;51@_MW]HZ0AM'"$U-.28W([..>84%1%D2QH>',9*
       M2S&VC);V=FV]T*;WWBD+1I)K'YH;DOJF#YH80GPR^J""D"R8-K('MS2;#Q*S
       M%Y,E-P&592A$V:[?.;?M"FP/?DG/G^_[?7_Z_3G7PL313TT(?8P0<J"CI':8
       M$5H^#:=5<KT^MQ`^UAQ1O*QUH0<.]B7S/FC[U!98Y;))]<*N^AG"^LB((J%E
       MAFIM[A9U0O`;%:*7N#[L%G!_-IH34V(J,WUZ.CK%O6I#N4DTE,E-144Q-7T)
       M>]_PX\M<3@!`'ZZ26[`-I7A.F!%$;JK.;21`!#.\-,5A/CK)\=B3FL:3F8PH
       M<#$QDSO91Q%^>L%"Z@KW*"-NR3;""5SN,A?'NI[0=P0Q=#[P&&$5@3UNZ3VW
       M=-(V`NYQ/)6CX)DC2F`KD!&C/!:R7"Q%]L-6`8'D+=]8T*^$V8@RR\;5\P9(
       M^;\&T:F]E`Q`EI,_6YHCZBT#BJ09M0VV9!:XVKLF]0NX%'Z4R];\W](3A-%J
       MI:`_&12!>@33QC0S'V8]?O5+0`;3UC23K)!"?@97N8R#:29MF/>R)PI>UJF)
       MK%/-4QR39OSJE8,8MHZ)UC#`?1ZX'N!ZU`L'X;@.?X["C<1DUT%,9QW32C''
       M"<98PQR#8#=(L'>96NQWR/4W1@>H3\'!OC3,MMN_"[,=A1OVK^XEH($[$S^H
       MY@28=MB78-$/`=8)(L=\P*$5*I_LS@)_G7!=\Z9V@F"``Y$XQM[T!T>(WHNU
       M/T9CH)YIZI("&9ZK32AR=DTN/QNZ."&7?27H_<(=_^=Q"U1N3Y.>!-E`$BY(
       M;(4ZG)/[\_0F_54HY7\5[<!33)\2M%:Y(.THX_N%K?%2L9&(O=4>8F^@IV9(
       M,<HEDU:17T'23M)GA#ANW-<F'J5-]>6!G2;BU+YN)@<RL.JBIFD4[:<###UG
       MO3Z77WO?L?O+@@G\+(-<"X&QT"&#_N7@_\2;JGAEF&U1`JR#ZCD/Z]7HJ'ZH
       M09_JNAZGJ^N?X5.39_AXMY!!?3@6G>X2,9^)QG%\!IZ@5`SSJ>EWN!SN>HCK
       MLJ%F08R*J5B4YV=T0-R&J#UYJW>4#"7/#D,0/GG`0ZI@__`;6->]K!>C[<GD
       M31/IQP>:!B]D?DT,*<;Y6=9Y]3:P][^W`?+>8F(1!*ZY7B1:BN=@D_XY9?0I
       M'?ZT0=V@BBWIIV$47#Y@7-,9Q>0<*=7;NMW-NS2>9#_X3V)8()?A$;!`ALRW
       M#&\%RO_^@9F6TP<]'M8J@'AFA"[JM]0(WCQ!`[.826!F&A@HG4JWU5R_KKL&
       M9GNQF$;J[?NZ\YUZ?B].C,OEWI*\94J`:6LB?U,RK^2.([0QRQK(W!D2[K5M
       M,G>&0B7A'K03F"'17*&L#9XU@+U2L9K4-GCIG(K(NE:SM,>SM,?;X,T:&U6,
       MT./E%NAUTNE_$,^E(A0M!B7K[D'>X6'\FC25Q3W=+V3YLR^CXJW.S0>#54*#
       M#ZE^AI+N-35^_>![U4!?@VQ%ET<L!BC>MC5"\GH->"T6'4/2NS>((N0,DT>_
       9K6^!S%65KRS`,`,UVB43\!]-BKG]B`<``#5"
       `
       end



  13.  For users of v1.4 of the Swap-Space HOWTO

  I found out that the procedure mentioned in v1.4 of this document was
  a bit buggy. If you have used v1.4 procedure to set up a shared swap
  space between Linux and Windows and found out that if you happen to
  check drive X: for errors with ScanDisk, it gives errors, follow the
  following procedure to get things correct.



     First of all, start Linux, and just comment out the line in
     rc.sysinit file which calls the swapinit.sh script and the line in
     halt file that calls the swaphalt.sh script. In effect, no swap
     partitions will be activated when you start Linux the next time. If
     your system RAM is low consider creating a swap file for temporary
     use. For details, refer to the section "A couple of notes".



     Next, shut down Linux, start Windows, press F8 at start and then
     select Command prompt only from the startup menu. Now type at the
     command prompt:


       C:\>SCANDISK X:



  ScanDisk will tell that the folder RECYCLED or some other folders are
  damaged. Tell it to correct the errors. It may also find some lost
  cluster chains. Tell it not to save them. In short, repair your drive
  X: and make sure that ScanDisk does not touch the win386.swp file. You
  may consider keeping a note of the size of win386.swp before and aftre
  ScanDisk. If ScanDisk does modify the size of win386.swp, add anything
  rubbish or delete data from the file to restore it's size.



     Clean the X: drive so that it contains only win386.swp file. Delete
     all other files and the RECYCLED folder. Type the following command
     to delete RECYCLED folder:


       C:\>X:
       X:\>ATTRIB -R -H -S RECYCLED
       X:\>DELTREE RECYCLED



     Start Linux. Log in as a root and give the following command:


       # dd if=/dev/winswap bs=512 count=XXX | gzip -9 > /etc/winswap.gz



  where XXX are the now familier total special sectors.



     Now uncomment the commands for swapinit.sh and swaphalt.sh in the
     respective files and also remove any command that you added for
     using the swap file. You system is now ready for use.



  14.  Acknowledgements, feedback and dedication

  This Mini-HOWTO has been largely derived from the Swap-Space Mini
  HOWTO by H. Peter Anvin. I have added the Windows 95/98 specific
  details as well as a few Red Hat Linux specific details. The msinfo
  program given in the original HOWTO didn't work on my Red Hat Linux 6
  system, so I created a similar program. However, I have also included
  the original msinfo program. Thanks to  all those great people
  involved with the development of Linux,to the people  at Red Hat for
  giving a great Linux distribution and to Sanjiv Guha, one of the  co-
  authors of "Red Hat Linux 6 Unleashed" from Techmedia for guidance
  about  shell programming. Thanks also to Matt Welsh, Greg Hankins and
  Eric S. Raymond, the authors of SGML-Tool's Users Guide, which helped
  me in converting the document in SGML format. Thanks are also to Peter
  Norton and John Goodman for there venerable "Peter Norton's Inside the
  PC", which helped me about DOS file system structure. Finally, thanks
  to PC Quest Linux Project for bringing out Linux  CDROMS frequently.

  I rely on you, the readers, to make this HOWTO useful. If you have any
  suggestions, comments, corrections, requests, flames, etc., feel free
  to contact me. Right now, I have no internet access, but still you
  contact me in case of questions at my Hotmail
  <mailto:jurahul@hotmail.com> account (Hey! Don't blame me for using a
  Microsoft service. Hotmail was created by our Indian guy Sabeer
  Bhatia). May be someone from you local  place may also come to your
  rescue.If you find my account unoperational and your problem is indeed
  important, you may mail me at amitanatu@sprynet.com
  <mailto:amitanatu@sprynet.com>.

  Finally, I would like to dedicate this work to Robert Lafore, the
  author of excellent books "C programming using Turbo C++" and "Object
  Oriented Programming using Turbo C++".

  Enjoy Linux,

  Rahul :-)



F 3-BUTTON.;1                       	3-Button-Mouse
F ADSL.;1                           	ADSL
F ADSM-BAC.;1                       	ADSM-Backup
F ADVOCACY.;1                       	Advocacy
F ALSA-SOU.;1                       	Alsa-sound
F APACHE-M.;1                       	Apache-mods
F APACHE_S.;1                       	Apache+SSL+PHP+fp
F AUTOMOUN.;1                       	Automount
F BACKUP-W.;1                       	Backup-With-MSDOS
F BATTERY-.;1                       	Battery-Powered
F BOCA.;1                           	Boca
F BOGOMIPS.;1                       	BogoMips
F BOOT_ROO.;1                       	Boot+Root+Raid+LILO
F BRIDGE.;1                         	Bridge
F BRIDGE_F.;1                       	Bridge+Firewall+DSL
F BRIDGE_F.000;1                    	Bridge+Firewall
F BTTV-MIN.3;1                      	BTTV-Mini-HOWTO-0.3
F BZIP2.;1                          	Bzip2
F CALL-BAC.;1                       	call-back-mini-HOWTO
F CIPE_MAS.;1                       	Cipe+Masq
F CLOCK.;1                          	Clock
F COFFEE.;1                         	Coffee
F COMMERCI.;1                       	Commercial-Port-Advocacy
F COMPRESS.;1                       	Compressed-TCP
F DHCP.;1                           	DHCP
F DIVERT-S.;1                       	Divert-Sockets-mini-HOWTO
F DOMAIN.;1                         	Domain
F DPT-HARD.;1                       	DPT-Hardware-RAID
F EXT2FS-U.;1                       	Ext2fs-Undeletion
F FAX-SERV.;1                       	Fax-Server
F FDU.;1                            	FDU
F FIREWALL.;1                       	Firewall-Piercing
F FTP.;1                            	FTP
F GIS-GRAS.;1                       	GIS-GRASS
F GTEK-BBS.;1                       	GTEK-BBS-550
F HANDSPRI.;1                       	Handspring-Visor
F HARD-DIS.;1                       	Hard-Disk-Upgrade
F HOME-NET.;1                       	Home-Network-mini-HOWTO
F INDEX.;1                          	INDEX
F INDEX.HTM;1                       	INDEX.html
F INSTALL-.;1                       	Install-From-ZIP
F INTKEYB.;1                        	Intkeyb
F IO-PORT-.;1                       	IO-Port-Programming
F IP-ALIAS.;1                       	IP-Alias
F IP-SUBNE.;1                       	IP-Subnetworking
F IPMASQUE.;1                       	IPMasquerading+Napster
F ISP-CONN.;1                       	ISP-Connectivity
F KERNELD.;1                        	Kerneld
F LBX.;1                            	LBX
F LEASED-L.;1                       	Leased-Line
F LILO.;1                           	LILO
F LINUX-MO.;1                       	Linux-Modem-Sharing
F LINUX_DO.;1                       	Linux+DOS+Win95+OS2
F LINUX_FR.;1                       	Linux+FreeBSD
F LINUX_NT.;1                       	Linux+NT-Loader
F LINUX_SO.;1                       	Linux+Solaris
F LINUX_WI.;1                       	Linux+Win95
F LOADLIN_.;1                       	Loadlin+Win95
F LOOPBACK.;1                       	Loopback-Root-FS
F MAC-TERM.;1                       	Mac-Terminal
F MAIL-QUE.;1                       	Mail-Queue
F MAIL2NEW.;1                       	Mail2News
F MAN-PAGE.;1                       	Man-Page
F MODULES.;1                        	Modules
F MULTIBOO.;1                       	Multiboot-with-LILO
F NCD-X-TE.;1                       	NCD-X-Terminal
F NETROM-N.;1                       	Netrom-Node
F NETSCAPE.;1                       	Netscape+Proxy
F NEWS-LEA.;1                       	News-Leafsite
F NFS-ROOT.;1                       	NFS-Root
F NFS-ROOT.000;1                    	NFS-Root-Client-mini-HOWTO
F OFFLINE-.;1                       	Offline-Mailing
F PARTITIO.;1                       	Partition-Rescue-mini-HOWTO
F PATH.;1                           	Path
F PLIP.;1                           	PLIP
F PRE-INST.;1                       	Pre-Installation-Checklist
F PROCESS-.;1                       	Process-Accounting
F PROGRAMM.;1                       	Programming-Languages
F PROXY-AR.;1                       	Proxy-ARP-Subnet
F PUBLIC-W.;1                       	Public-Web-Browser
F QMAIL_MH.;1                       	Qmail+MH
F QUOTA.;1                          	Quota
F RCS.;1                            	RCS
F README.;1                         	README
F REMOTE-B.;1                       	Remote-Boot
F REMOTE-X.;1                       	Remote-X-Apps
F RPM_SLAC.;1                       	RPM+Slackware
F SAVING-S.;1                       	Saving-Space
F SECURE-P.;1                       	Secure-POP+SSH
F SENDMAIL.;1                       	Sendmail-Address-Rewrite
F SENDMAIL.000;1                    	Sendmail+UUCP
F SLIP-PPP.;1                       	SLIP-PPP-Emulator
F SMALL-ME.;1                       	Small-Memory
F SOUNDBLA.;1                       	Soundblaster-AWE
F STAROFFI.;1                       	StarOffice
F SWAP-SPA.;1                       	Swap-Space
F TERM-FIR.;1                       	Term-Firewall
F TKRAT.;1                          	TkRat
F TOKEN-RI.;1                       	Token-Ring
F TRANSPAR.;1                       	TransparentProxy
F TT-DEBIA.;1                       	TT-Debian
F ULTRA-DM.;1                       	Ultra-DMA
F UPDATE.;1                         	Update
F UPGRADE.;1                        	Upgrade
F VAIO_LIN.;1                       	VAIO+Linux
F VISUAL-B.;1                       	Visual-Bell
F VPN.;1                            	VPN
F WACOM-US.;1                       	Wacom-USB-mini-HOWTO
F WORDPERF.;1                       	WordPerfect
F X-BIG-CU.;1                       	X-Big-Cursor
F XFREE86-.;1                       	XFree86-XInside
F XTERM-TI.;1                       	Xterm-Title
F ZIP-DRIV.;1                       	ZIP-Drive
F ZIP-INST.;1                       	ZIP-Install
  TrueType Fonts in Debian mini-HOWTO
  Bear Giles, bgiles@coyotesong.com <mailto:bgiles@coy
  otesong.com>
  v0.3, 10 January 2000

  This document describes how to configure a Debian system to use True
  Type fonts for display and printing.  The most recent version of this
  document can be obtained in HTML format at http://www.dimen
  sional.com/~bgiles/debian-tt.html <http://www.dimen
  sional.com/~bgiles/debian-tt.html>
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Disclaimer
     1.2 Credits
     1.3 Additional links
     1.4 Change log
     1.5 Feedback
     1.6 Related projects
     1.7 Distribution

  2. Display (what they never told you)

     2.1 A look ahead to XFree86 4.0
     2.2 Review: Preparation before changing

  3. Display (

     3.1 Setting up the
     3.2 Setting up the
     3.3 Using TrueType fonts
     3.4 Installing additional TrueType fonts
     3.5 Internationalization
     3.6 Security Issues

  4. Printing (

     4.1 Configuring
     4.2 Printing TrueType font specimens

  5. Content Generation

     5.1 Generating
     5.2 Generating
     5.3 Image manipulation:
     5.4 ASCII to PostScript conversion:
     5.5 Text Formatting and Typesetting:
     5.6 Text Formatting and Typesetting:

  6. Unanswered questions

  7. Obtaining TrueType Fonts

     7.1 A comment about using Microsoft's free TrueType fonts

  8. Legalities



  ______________________________________________________________________


  1.  Introduction

  A Linux installation typically contains several independent sets of
  fonts or font metrics.  A quick glance at my system shows fonts or
  font metrics spread across the following directories:


    XFree86 stores its fonts in /usr/X11R6/lib/X11/fonts/

    Ghostscript stores its fonts in /usr/lib/ghostscript/fonts/

    TeX stores its fonts in /usr/lib/texmf/fonts/

    The Debian kbd package stores its fonts in /usr/share/consolefonts/

    Groff stores its metrics in /usr/share/font/devps/

    Enscript (ASCII to PostScript converter) stores its metrics in
     /usr/share/enscript/*.afm

  Needless to say, these fonts are not coordinated.

  TrueType fonts are designed to eliminate this problem by allowing the
  same font files to be used for both display and printing.  This HOW-TO
  attempts to show how to use TrueType fonts for display, printing, and
  document preparation on Debian GNU/Linux systems.


  1.1.  Disclaimer

  The information in this document is, to the best of my knowledge,
  correct.  However this HOWTO is still in preliminary versions and what
  works for me may not work for you.  Even if it does work for you, I am
  not a professional technical writer and I have been known to gloss
  over critical details.

  So have fun, but play it safe and keep backups.


  1.2.  Credits

  Created by Bear Giles, <bgiles@coyotesong.com>
  <mailto:bgiles@coyotesong.com>

  Thanks go to:

    Brion Vibber, <brion@pobox.com> <mailto:brion@pobox.com>, who wrote
     the (preliminary) TrueType HOW-TO
     (http://pobox.com/~brion/linux/TrueType-HOWTO.html)
     <http://pobox.com/~brion/linux/TrueType-HOWTO.html>

    Doug Holland, <meldroc@frii.com> <mailto:meldroc@frii.com>, who
     wrote the XFree86 Font Deuglification HOW-TO
     (http://www.frii.com/~meldroc/Font-Deuglification.html)
     <http://www.frii.com/~meldroc/Font-Deuglification.html>


  1.3.  Additional links

  These links don't directly discuss Debian systems or packages, but
  they may still be interesting to readers of this mini-HOWTO.


    Using TrueType Fonts with RedHat Linux
     (http://www.kegel.com/linux/tt.html)
     <http://www.kegel.com/linux/tt.html>
    X Font Tools (http://www.hex.net/~cbbrowne/xfonts.html)
     <http://www.hex.net/~cbbrowne/xfonts.html>

    Getting fonts to look pretty under GNU/Linux for applications like
     StarOffice (http://king.ccrc.wustl.edu/~zubin/fonts.html)
     <http://king.ccrc.wustl.edu/~zubin/fonts.html>

    How to use True Type  fonts for StarOffice Under Linux
     (http://www.mindspring.net/~john_mcl/adding_fonts.html)
     <http://www.mindspring.net/~john_mcl/adding_fonts.html>


  1.4.  Change log


    0.1. Sept. 16, 1999: First release.

    0.2. Sept. 16, 1999: added "additional links" section.

    0.3. Jan. 10, 2000: reader feedback!  Added clarification of
     several details.


  1.5.  Feedback

  Comments, corrections, additions and critiques are always welcome.
  You can reach me at bgiles@coyotesong.com
  <mailto:bgiles@coyotesong.com>.


  1.6.  Related projects


    FreeType http://www.freetype.org/ <http://www.freetype.org/>

     The FreeType engine is a free and portable TrueType font rendering
     engine.  The code is a clean-room implementation that is totally
     independent of the Apple and Microsoft implementations.  (A
     question has recently been raised about a possible Apple patent,
     however.)  FreeType is a library, not a font server or a complete
     text rendering library.


  1.7.  Distribution

  This is the first draft and I expect it to change significantly after
  publication, I ask that you refer to the latest version at
  http://www.dimensional.com/~bgiles/debian-tt.html
  <http://www.dimensional.com/~bgiles/debian-tt.html>.  The permanent
  home for this document will eventually be at
  http://www.coyotesong.com/ <http://www.coyotesong.com/>


  2.  Display (what they never told you)

  Before we dive into setting up TrueType fonts under X, we should
  review the difference between points and pixels... and why we care.

  All displayed fonts are measured in points.  One inch is exactly 72
  points.  Why 72?  Partly because of the limitations of mechanical
  typesetting machines and partly because it's evenly divisible by 2, 3,
  4, 6, 8, 9, 12, 18 and 24.  It's also worth noting that the default
  unit in PostScript is one point.

  (Historical note: I lied.  Until the introduction of PostScript an
  inch was exactly 72.27 points, but that point size was set in the era
  of mechanical printers with metal stamps in a handful of standard
  sizes.  With computer displays and laser printers, it's easy to get
  fonts in any size and 72 makes much more sense for the reason
  mentioned above.)

  As a general rule, most text should be between 7 and 12 points.
  Anything smaller than 6 points is literally "the fine print." Line
  printers used 9 or 12 point type (for 8 or 6 lines/inch,
  respectively).

  In contrast, all video drivers must ultimately measure fonts in
  pixels.   To your video driver, your screen is 1024x800 pixels, not 10
  by 8 inches (or 720 by 576 points).

  To map from points (which we use to specify a font size) to pixels
  (which we use to blit the video memory) we must know our screen's
  resolution.  This is usually measured in "dots per inch (dpi),"
  although it's really pixels per inch.  These are the units used in the
  two sets of bitmap fonts included with XFree86: fonts-75 is intended
  for use on low-end displays with a resolution of approximately 75 dpi,
  fonts-100 is intended for use on mid-range displays with a resolution
  of approximately 100 dpi.  There are no bitmap fonts intended for use
  on high-end displays with a resolution of over 120 dpi.

  As a concrete example, a 13" diagonal screen (11.1" usable) displaying
  a 640x480 pixel image has a resolution of 72.0 dpi.  This Is Not A
  Coincidence.  In fact, most web pages (and Microsoft applications) are
  designed around a canonical display with a resolution of exactly 72
  dpi.  XFree86's default configuration assumes a display with a
  resolution of 75 dpi.

  Back in the real world, nobody runs 640x480 video anymore.  Nobody
  uses 13" diagonal screens anymore.  Since video cards have improved
  faster than video monitors it's not uncommon to have a configuration
  like mine:  19" diagonal screen, (17+" usable), 1600x1200 pixels, 117
  dpi resolution.

  If I run a stock X configuration, all of my fonts are approximately
  2/3 of the intended size.  It's not an exaggeration to say that all
  fonts are cut down by a full size: large fonts (12 pts) appear medium
  (9).  Medium fonts (9 pts) appear small (6).

  There are three things we can do to fix this.  First, We should tell
  the X server our actual screen resolution:


       /etc/X11/xdm/Xservers

       ______________________________________________________________________
       #:0 local /usr/X11R6/bin/X -bpp 16
       :0 local /usr/X11R6/bin/X -bpp 16 -dpi 120
       ______________________________________________________________________



  Second, we should ensure that we use the 100 dpi bitmapped fonts in
  preference to the 75 dpi fonts.


       /etc/X11/XF86Config



  ______________________________________________________________________
  Section "Files"
      RgbPath    "/usr/X11R6/lib/X11/rgb"
      FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
      FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
      FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
      FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
      FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
  EndSection
  ______________________________________________________________________



  Finally, if one of our bitmapped fonts isn't an exact match the X
  server will attempt to "scale" a similar font via pixel replication.
  The results are rarely pleasant to use.  Assuming we have a reasonably
  powerful system, we can tell the server to use scaled fonts by
  default, then bitmaps which are exact matches, and scaled bitmaps as a
  last resort.


       /etc/X11/XF86Config

       ______________________________________________________________________
       Section "Files"
           RgbPath    "/usr/X11R6/lib/X11/rgb"
           FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
           FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
           FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
           FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
           FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
           FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
           FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
       EndSection
       ______________________________________________________________________



  2.1.  A look ahead to XFree86 4.0

  I've just been informed that XFree86 will support DDC communications,
  if the video card and monitor both support it.  This will allow the X
  server to query the monitor for its physical dimensions and the server
  will automatically compute the correct DPI setting.

  You will still need to make the appropriate changes to your font path,
  since the server should not second guess your explicit configuration.


  2.2.  Review: Preparation before changing X  configuration files.

  Any time we make changes to the X11 configuration files, it's an
  excellent idea to disable XDM by putting exit 0 somewhere near the top
  of the file.  If you don't do this and X is unable to start for some
  reason, XDM will put your system into a nasty busy loop that is an
  unspeakable pain to correct.  You Have Been Warned.


  3.  Display ( X  and the font servers)

  Strictly speaking, it is not absolutely necessary to set up font
  servers to use TrueType fonts with X servers.  If you wish to use
  static files instead of a font server, please see the instructions for
  setting up TrueType fonts for ghostscript.


  3.1.  Setting up the xfs  Font Server

  At this point I assume you have a working /etc/X11/XF86Config file
  that loads explicitly specifies each directory in the FontPath.  We
  will convert it to use the xfs Font Server.


    Install XFS

     If you have not already done so, install
     main/binary-*/x11/xfs_*.deb.


    Configure XFS

     Edit /etc/X11/xfs/config and change the catalogue to contain the
     contents of your FontList.  You may also wish to change the
     default-resolutions value.


       /etc/X11/xfs/config

       ______________________________________________________________________
       # paths to search for fonts
       catalogue =
           /usr/X11R6/lib/X11/fonts/100dpi/:unscaled,
           /usr/X11R6/lib/X11/fonts/75dpi/:unscaled,
           /usr/X11R6/lib/X11/fonts/misc/,
           /usr/X11R6/lib/X11/fonts/Speedo/,
           /usr/X11R6/lib/X11/fonts/Type1/,
           /usr/X11R6/lib/X11/fonts/100dpi/,
           /usr/X11R6/lib/X11/fonts/75dpi/
       # x1,y1,x2,y2,...
       default-resolutions = 100,100,75,75
       ______________________________________________________________________



    Restart XFS

     Restart XFS in the usual Debian manner:


       root shell

       ______________________________________________________________________
       # /etc/init.d/xfs restart
       ______________________________________________________________________



    Verify that XFS is working

     Before we change our XF86Config file, we should verify that the xfs
     server is working by listing them through the font server:


       user shell

  ______________________________________________________________________
  $ fslsfonts -server unix/:7100
  -adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1
  -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-1
  -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-1
  ....
  ______________________________________________________________________



    Change /etc/X11/XF86Config to use xfs

     We're now ready to tell the X server to use the xfs font server.
     We keep one static font path as a fallback position in case of a
     problem with xfs.  (We keep "misc" since it contains fixed, the
     default font.)


       /etc/X11/XF86Config

       ______________________________________________________________________
       Section "Files"
           FontPath   "unix/:7100"
           FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
       EndSection
       ______________________________________________________________________



    Restart X

     Restart X with startx, unless you like living life dangerously.  If
     that's the case, name me the beneficiary of your unusually large
     life insurance policy and restart xdm.


    Verify that the XFS fonts are visible

     Once we have an X session established, we can verify that our
     server sees all of the xfs fonts by listing them through the X
     server.


       user shell

       ______________________________________________________________________
       $ xlsfonts
       -adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1
       -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-1
       -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-1
       ....
       ______________________________________________________________________



  3.2.  Setting up the xfstt  Font Server and installing TrueType fonts

  At this point I assume you have a working xfs font server and wish to
  add TrueType support via xfstt.


    Install XFSTT

     If you have not already done so, install
     main/binary-*/x11/xfstt_*.deb.


    Installing the TrueType Fonts

     Copy your TrueType fonts into the /usr/share/fonts/truetype
     directory.  These files usually have a .ttf extension, and they
     should have 0444 permissions.


    Restart the XFSTT Font Server

     Restart the xfstt server with the force-reload flag


       root shell

       ______________________________________________________________________
       # /etc/init.d/xfstt force-reload
       ______________________________________________________________________



    Verify that XFSTT is working

     Before we change our XF86Config file, we should verify that the
     xfstt server is working.

     Important: the Debian xfstt server listens to port 7101, not 7100.
     Also, the default permissions will require you to run this query as
     root.


       user and root shells

       ______________________________________________________________________
       $ fslsfonts -server unix/:7101
       _FSTransSocketUNIXConnect: Can't connect: errno = 111
       fslsfonts:  unable to open server "unix/:7101"

       # fslsfonts -server unix/:7101
       -ttf-arial black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
       -ttf-arial mt black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
       -ttf-arial narrow-bold-i-normal-bold italic-0-0-0-0-p-0-iso8859-1
       ______________________________________________________________________



    Change /etc/X11/XF86Config to use xfstt

     We're now ready to tell the X server to use the xfstt font server.
     We want it to use TrueType fonts in preference to all others.

       /etc/X11/XF86Config

       ______________________________________________________________________
       Section "Files"
           FontPath   "unix/:7101"
           FontPath   "unix/:7100"
           FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
       EndSection
       ______________________________________________________________________



    Verify that XFSTT fonts are visible

     Once we have an X session established, we can verify that our
     server sees all of the TrueType fonts by listing them.



       ______________________________________________________________________
       $ xlsfonts | grep ttf
       -ttf-arial black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
       -ttf-arial mt black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
       -ttf-arial narrow-bold-i-normal-bold italic-0-0-0-0-p-0-iso8859-1
       ....
       ______________________________________________________________________



  3.3.  Using TrueType fonts

  At this point it should be possible to use a TrueType font in
  applications like GIMP, Netscape or StarOffice.  Since most TrueType
  fonts aren't monospaced you probably don't want to use one of them
  with xterm - these programs use monospacing the size of the largest
  character cell.


  3.4.  Installing additional TrueType fonts

  If you are using the xfstt font server, it's trivial to install
  additional TrueType fonts.


    Copy the new font(s) into /usr/share/fonts/truetype/

    Restart xfs with /etc/init.d/xfs restart


  3.5.  Internationalization

  xfstt has the ability to generate multiple font encodings, provided
  that the TrueType font contains the necessary glyphs.  To enable fonts
  other than iso8859-1/unicode-1, you must manually edit the
  /etc/init.d/xfstt script:


       /etc/init.d/xfstt



  ______________________________________________________________________
  - start-stop-daemon --start --quiet --exec $XFSTT -- \
        --port $portno --daemon
  + start-stop-daemon --start --quiet --exec $XFSTT -- \
        --port $portno --encoding iso8859-1,koi8-r,windows-1252,symbol-0 \
        --daemon
  ______________________________________________________________________



  The recognized encodings in Debian 2.1 are:


    iso8859-1           (Latin 1 - Western Europe)

    iso8859-2     (Latin 2 - Central and Eastern Europe)

    iso8859-3     (Latin 3 - Esperanto and Maltese)

    iso8859-4     (Latin 4 - superceded by Latin 6)

    iso8859-5     (Cyrillic)

    iso8859-6     (Arabic)

    iso8859-7     (Greek)

    iso8859-8     (Hebrew)

    iso8859-9     (Latin 5 - Latin 1 with Turkish, not Icelandic)

    iso8859-10    (Latin 6 - Nordic languages, replaces Latin 4)

    koi8-r        (Cyrillic)

    windows-1250  (Central Europe)

    windows-1251  (Cyrillic)

    windows-1252

    windows-1253  (Greek)

    windows-1254

    windows-1255

    windows-1256

    windows-1257

    symbol-0

    wingding-0

    wingreek-0

    cp-437        (various IBM code pages)

    cp-737

    cp-850

    cp-851

    cp-852

    cp-853

    cp-855

    cp-857

    cp-860

    cp-861

    cp-862

    cp-863

    cp-864

    cp-865

    cp-866

    cp-869

    cp-895

    atari-st

    unicode-2

  The first 128 characters in the iso8859-x encodings is always ASCII.
  The windows- fonts embrace and extend iso8859-1 with additional
  characters such as "smart quotes."  (Since these extensions, such as
  "smart quotes" are undefined in iso8859-1, they are usually rendered
  as question marks.)

  Excellent source for additional information on character set encodings
  are at

    http://ppewww.ph.gla.ac.uk/%7Eflavell/iso8859/iso8859-pointers.html
     <http://ppewww.ph.gla.ac.uk/%7Eflavell/iso8859/iso8859-pointers.html>,

    http://anubis.dkuug.dk/i18n/ <http://anubis.dkuug.dk/i18n/> and

    http://czyborra.com/charsets/iso8859.html
     <http://czyborra.com/charsets/iso8859.html>.



  3.6.  Security Issues

  I used Unix sockets above, but the standard Debian packages also
  configure xfs and xfstt to listen to TCP/IP ports 7100 and 7101,
  respectively.  Access to these ports should be controlled by the
  trusted-clients field in /etc/X11/xfs/config, but this option is not
  implemented in XFree86 3.3.2.3a.

  This means that anyone, anywhere, can connect to your font server.
  Since xfs (and presumably xfsts) "clone" to support more users there's
  a trivial denial-of-service attack against these systems.  It's
  probably safe to use the font servers on dialup lines (since you're
  present to handle problems), but DSL and cable modem users should use
  a firewall.



  4.  Printing ( ghostscript )

  Starting with version 4, ghostscript has supported TrueType fonts as a
  compile-time option.  Two Debian packages provide ghostscript:

    main/binary-*/text/gs_*.deb is DFSG-compliant version 5.10,

    non-free/binary-*/gs-aladdin_*.deb is non-DFSG-compliant version
     5.50.

     Both versions support TrueType fonts.


  4.1.  Configuring Ghostscript  to use TrueType fonts

  If you have a working xfstt server, it is easy to configure
  ghostscript to use TrueType fonts.  We simply execute the following
  command:



       ______________________________________________________________________
       # xfstt --gslist --sync >> /etc/gs.Fontmap
       ______________________________________________________________________



  In practice, I've found it beneficial to make several small changes to
  the font definitions generated by xfstt.  First, if a font name does
  not contain any spaces, I change the name to the usual notation.  If a
  font name does contain spaces, I replace all spaces with dashes and
  the original name is added as an alias to the new name.

  Finally, I prepend TTF- (or MS-) to all font names to minimize
  problems caused by a TrueType font having an identical name to an
  preexisting font.

  Thus



       ______________________________________________________________________
       (Arial)               (/usr/share/fonts/truetype/arial.ttf)   ;
       (Arial Bold Italic)   (/usr/share/fonts/truetype/arialbi.ttf) ;
       ______________________________________________________________________



  becomes



       ______________________________________________________________________
       /MS-Arial             (/usr/share/fonts/truetype/arial.ttf)   ;
       /MS-Arial-Bold-Italic (/usr/share/fonts/truetype/arialbi.ttf) ;
       (Arial Bold Italic)   /MS-Arial-Bold-Italic                   ;
       /Arial                /MS-Arial                               ;
       ______________________________________________________________________



  The aliases ensure that ghostscript and xfstt can still specify the
  same font by a common name.
  Much more significantly, with the change in the font names it's
  possible to instruct ghostscript to use TrueType fonts instead of the
  standard fonts.  The documentation claims that this is also possible
  with parenthetical notation, but I could not get it to work.

  For instance, we can instruct ghostscript to replace Helvetica fonts
  with Microsoft's free Arial fonts by appending the following lines to
  the /etc/gs.Fontmap file:



       ______________________________________________________________________
       /Helvetica               /MS-Arial              ;
       /Helvetica-Oblique       /MS-Arial-Italic       ;
       /Helvetica-Bold          /MS-Arial-Bold         ;
       /Helvetica-BoldOblique   /MS-Arial-Bold-Italic  ;
       ______________________________________________________________________



  Similar aliases can be defined for the other standard fonts.  These
  aliases would be most useful on samba printers serving Windows
  clients.


  4.2.  Printing TrueType font specimens

  The best way to verify that ghostscript is properly configured to use
  TrueType fonts is to print font specimen pages.  Assuming that you're
  running ghostscript 5.50 and that it is your default print queue, you
  can print all TrueType fonts with the following command:



       ______________________________________________________________________
       # xfstt --gslist --sync | printfont
       ______________________________________________________________________



  where printfont is the following shell script



       ______________________________________________________________________
       #!/bin/sh

       set -e
       IFS= ')'

       while read fontname rest
       do
           cat << EOM | lpr
       %!PS
       (/usr/lib/ghostscript/5.50/prfont.ps) run
       $fontname) DoFont
       EOM
       done
       ______________________________________________________________________



  If you wish to print only a few fonts, the following script will be
  easier to use:



       ______________________________________________________________________
       #!/bin/sh

       set -e
       while read -p "Font name, or ^D to exit: " fontname
       do
           cat << EOM | lpr
       %!PS
       (/usr/lib/ghostscript/5.50/prfont.ps) run
       $fontname DoFont
       EOM
       done
       ______________________________________________________________________



  5.  Content Generation

  5.1.  Generating AFM  font metrics

  AFM font metrics files are not required for display existing files
  with TrueType fonts, but they are necessary to create new files.  The
  ghostscript program /usr/lib/ghostscript/5.50/printafm.ps could be
  used to generate these metric files, but I have found the ttf2afm
  program from the tetex-bin package to be easier to use.

  The following script will generate an afm file for all TrueType fonts
  in a directory:



       ______________________________________________________________________
       #!/bin/sh

       set -e

       for i in *.TTF
       do
           /usr/bin/ttf2afm $i > ${i%TTF}afm
       done

       for i in *.ttf
       do
           /usr/bin/ttf2afm $i > ${i%ttf}afm
       done
       ______________________________________________________________________



  One minor problem with ttf2afm is that some applications expect afm
  files to start with the StartFontMetrics tag, but files created by
  ttf2afm start with a comment.  This "problem" is easily fixed by
  hitting each file with a text editor.



  5.2.  Generating font.map  files

  Once we have our afm files, we need to tell the system how to find
  them.  This is often done via the font.map file.

  I have been unable to find documentation on this file format, unlike
  fonts.dir, fonts.scale, and fonts.alias, all created by the mkfontdir
  program.  However the minimum format appears to be quite simple:


    Font name, without whitespace

    AFM filename, without extension

  Aliases appear to be implemented via multiple entries, and the
  filename extension must be in lowercase.


  5.3.  Image manipulation: GIMP

  GIMP is the Gnu image manipulation and paint program.  I did not have
  to make any additional changes to use TrueType fonts in gimp.


  5.4.  ASCII to PostScript conversion: enscript

  Enscript is a program that converts ASCII to PostScript.  Other
  programs which serve a similiar purpose are a2ps and mpage.  Enscript
  allows two-up rotation, watermarks, headers, and keyword-based syntax
  coloring.  It does not reformat text and is commonly used to print
  source listing.

  To use TrueType fonts with enscript, you must do two things:


    Add /usr/share/fonts/truetype to your AFMPath.

    Specify a TrueType font, either explicitly or by aliasing a default
     font.

  For details, see the enscript documentation.

  Once I had made these changes, I had no problem using TrueType fonts.


  5.5.  Text Formatting and Typesetting: groff

  Groff is the Gnu front end of the groff/troff document formatting
  system.  The power of Groff is best seen with man pages.


       user shell

       ______________________________________________________________________
       $ zcat /usr/man/man1/groff.1.gz | groff -man | lpr
       ______________________________________________________________________



  Besides man pages, an incredible amount of Unix documentation uses
  troff formatting with ms (and occasionally me) macros.  The Debian
  xbooks package, for example, has 43 files using troff with ms macros.
  With groff, this material can be attractively printed.


  Groff is a very powerful system, but it's the grandchild (or great-
  grandchild) of a program used to typeset 1960's era printing presses.
  Font support in groff reflects that heritage.  Groff, in contrast to
  its predecessors, uses PostScript as the default output format so our
  earlier work with ghostscript takes care of half of the problem --
  groff does not have to deal with reading TrueType font files.  It does
  need to have accurate font metrics, and this section describes how to
  regenerate the necessary groff files:


       Groff PostScript description files

       ______________________________________________________________________
       /usr/share/groff/font/devps/DESC
           Device description file
       /usr/share/groff/font/devps/text.enc
           Encoding used for text fonts
       /usr/share/groff/font/devps/generate/textmap
           Standard mapping.
       /usr/share/groff/font/devps/generate/Makefile
           Standard makefile
       ______________________________________________________________________



  We must edit the Makefile,


       /usr/share/groff/font/devps/generate/Makefile

       ______________________________________________________________________
       - afmdir=/usr/local/afm
       + afmdir=/usr/share/fonts/truetype
       ______________________________________________________________________



  change the name of the fonts to their TrueType equivalent (e.g., if
  we're using Microsoft's free TrueType fonts we would replace Helvetica
  with Arial), and change TEXTFONTS and the like to only include those
  fonts we are redefining.

  We must also edit /usr/share/groff/font/devps/generate/afmname to use
  the TrueType font names and afm files, and to remove an "-e" flag from
  awk.

  After all of this, we can rebuild the groff tables with


       user shell

       ______________________________________________________________________
       $ cd /usr/share/groff/font/devps
       $ make -f generate/Makefile
       ______________________________________________________________________



  As usual, the best way to verify the changes is to use a visually
  distinctive font.  E.g., if you are using the Microsoft free TrueType
  fonts you can use Mistral for TR.


  (I expect royalties from everyone who reconfigures their system to
  print manual pages in Old English fonts next April First!)


  5.6.  Text Formatting and Typesetting: TeX

  TeX is the other common set of text formatting and typesetting
  programs on most GNU/Linux systems.

  TeX fonts can created with mktexmf, but I have little information on
  the exact process.  More details will be provided shortly.


  6.  Unanswered questions


    Applications

     The biggest unanswered question is why netscape communicator can
     use TrueType fonts, ghostscript can use the same TrueType fonts,
     yet pages printed by netscape look nothing like the screen.

     The short answer is that netscape generates PostScript output with
     standard fonts (Helvetica and Times-Roman) instead of the user-
     specified or HTML-specified fonts.  The long answer is that I have
     absolutely no idea why it forces this behavior, or if there is a
     way to override it.


  7.  Obtaining TrueType Fonts

  If you're looking for TrueType fonts, here are several places where
  you can start looking:


    c:\windows\fonts on the boat anchor in the corner

    Microsoft's Free TrueType Fonts
     http://www.microsoft.com/typography/fontpack/
     <http://www.microsoft.com/typography/fontpack/>

    Acid Fonts http://www.acidcool.com/ <http://www.acidcool.com/>

    The Font Ring http://www.webring.org/cgi-
     bin/webring?ring=fontring&list <http://www.webring.org/cgi-
     bin/webring?ring=fontring&list>


  7.1.  A comment about using Microsoft's free TrueType fonts

  No article on TrueType support under Linux would be complete without a
  comment about Microsoft's free TrueType fonts.  First the legality of
  using Microsoft's free core fonts:


       http://www.microsoft.com/typography/faq/faq8.htm
       <http://www.microsoft.com/typography/faq/faq8.htm>



  ____________________________________________________________
  Q. What can I do with these fonts?
      Anyone can download and install these fonts for
       their own use.
      [Web page] designers can specify the fonts within
       their own Web pages.
     ...
  ____________________________________________________________



  Clearly, it is legal and reasonable for Linux users to download and
  install these fonts, and I would like to thank Microsoft for making
  them available.

  Since another clause restricts their redistribution "in any form that
  adds value to commercial products" I don't expect to see these fonts
  packaged in main anytime soon.  (Could they be packaged in non-free,
  perhaps as an installer package...?)

  Now that that's out of the way, I redirect your attention to the
  second statement.  Microsoft actively encourages web page developers
  to specify their fonts on web pages, and many HTML editors explicitly
  name fonts.

  Many web sites, when viewed by standard Netscape/Linux, can best be
  described as... legible.  Some aren't even that.  Not coincidentally
  the sites which are, um, legible are also usually the sites that
  explicitly state all font information in their web pages.

  After I installed these fonts I noticed that most of these problematic
  sites became significantly more attractive.  Many were still highly
  Windows-centric, but at least I didn't flinch every time I loaded
  their pages.

  My recommendation is to install Microsoft's free TrueType fonts for
  your browser.  You are not required to create web pages that use these
  fonts, nor do you have to configure ghostscript to use them.



  8.  Legalities

  Copyright  1999 by Bear Giles.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors.  Linux HOWTO documents may be reproduced and
  distributed whole or in part, in any medium physical or electronic, as
  long as this copyright notice is retained in all copies.  Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may produce a derivative work from a HOWTO and impose
  additional restrictions on distribution.  Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO cordinator for more information.

  In short, we wish to promote dissemination of this information through
  as many channels as possible.  However, we do wish to retain copyright
  on the HOWTO documents, and would very much like to be notified of any
  plans to redistribute the HOWTOs, this one in particular!  Web page
  authors are free to link to this HOWTO without restriction, though the
  author would appreciate an email informing him of this, just so he can
  boost his ego by knowing who else reads and links to this document.

  Many of the terms mentioned in this document are trade names.  Unless
  otherwise stated, all trademarks are property of their respectve
  owners.



  Using Term to Pierce an Internet Firewall
  Barak Pearlmutter, bap@cs.unm.edu
  v, 15 July 1996

  Directions for using ``term'' to do network stuff through a TCP fire
  wall that you're not supposed to be able to.
  ______________________________________________________________________

  Table of Contents


  1. Disclaimer

  2. Copyright

  3. Introduction

  4. The basic procedure

  5. Detailed directions

  6. Multiple term sockets

  7. The

  8. Direction

  9. Security

  10. Telnet mode

  11. Bugs and term wish list

  12. Tricks that don't seem to work

  13. Related resources

  14. Acknowledgments

  ______________________________________________________________________

  1.  Disclaimer

  !!! READ THIS IMPORTANT SECTION !!!

  I hereby disclaim all responsibility for this hack.  If it backfires
  on you in any way whatsoever, that's the breaks.  Not my fault.  If
  you don't understand the risks inherent in doing this, don't do it.
  If you use this hack and it allows vicious hackers to break into your
  company's computers and costs you your job and your company millions
  of dollars, well that's just tough nuggies.  Don't come crying to me.

  2.  Copyright

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu via email.

  3.  Introduction

  The "term" program is normally used over a modem or serial line, to
  allow various host-to-host services to flow along this simple serial
  connection.  However, sometimes it is useful to establish a term
  connection between two machines that communicate via telnet.  The most
  interesting instance of this is for connecting two hosts which are
  separated by ethernet firewalls or SOCKS servers.  Such firewalls
  provides facilities for establishing a telnet connection through the
  firewall, typically by using the SOCKS protocol to allow inside
  machines to get connections out, and requiring outside users to telnet
  first to a gateway machine which requires a one-time password.  These
  firewalls make it impossible to, for instance, have X clients on an
  inside machine communicate with an X server on an outside machine.
  But, by setting up a term connection, these restrictions can all be
  bypassed quite conveniently, at the user level.

  4.  The basic procedure

  Setting up a term connection over a telnet substrate is a two-phase
  process.  First your usual telnet client is used to set up a telnet
  connection and log in.  Next, the telnet client is paused and control
  of the established telnet connection is given to term.

  5.  Detailed directions

  In detail, the process goes like this.

  First, from a machine inside the firewall, telnet to a target machine
  outside the firewall and log in.

  Unless you are under linux and will be using the proc filesystem (see
  below) make sure your shell is an sh style shell.  Ie if your default
  shell is a csh variant, invoke telnet by


       (setenv SHELL /bin/sh; telnet machine.outside)

  After logging in, on the remote (outside) machine invoke the command


       term -r -n off telnet

  Now break back to the telnet prompt on the local (inside) machine,
  using ^] or whatever, and use the telnet shell escape command ! to
  invoke term,


  telnet> ! term -n on telnet >&3 <&3

  Et voila!!!

  (If you have a variant telnet, you might have to use some other file
  descriptor than 3; easy to check using strace.  But three seems to
  work on all bsd descendent telnet clients I've tried, under both SunOS
  4.x and the usual linux distributions.)

  Some telnet clients do not have the ! shell escape command.  Eg the
  telnet client distributed with Slackware 3.0 is one such client.  The
  sources that the Slackware telnet client is supposedly built from,


       ftp://ftp.cdrom.com:/pub/linux/slackware-3.0/source/n/tcpip/NetKit-B-0.05.tar.gz

  have the shell escape command.  A simple solution is therefore to
  obtain these sources and recompile them.  This unfortunately is a task
  I have had no luck with.  Plus, if you are running from inside a SOCKS
  firewall, you will need a SOCKSified telnet client anyway.  To that
  end, I was able to compile a SOCKSified telnet client from


       ftp://ftp.nec.com/pub/security/socks.cstc/socks.cstc.4.2.tar.gz

  or if you're outside the USA,


       ftp://ftp.nec.com/pub/security/socks.cstc/export.socks.cstc.4.2.tar.gz

  Alternatively, under linux kernels up to 1.2.13, you can pause the
  telnet with ^]^z, figure out its pid, and invoke


       term -n on -v /proc/<telnetpid>/fd/3 telnet

  This doesn't work with newer 1.3.x kernels, which closed some mysteri
  ous security hole by preventing access to these fd's by processes
  other than the owner process and its children.

  6.  Multiple term sockets

  It is a good idea to give the term socket an explicit name.  This is
  the "telnet" argument in the invocations of term above.  Unless you
  have the TERMSERVER environment variable set to telnet as appropriate,
  you invoke term clients with the -t switch, e.g. "trsh -t telnet".

  7.  The ~/.term/termrc.telnet  init file

  I have checked line clarity using linecheck over this medium.  I
  expected it to be completely transparent, but it is not.  However, the
  only bad character seems to be 255.  The ~/.term/termrc.telnet I use
  (the .telnet is the name of the term connection, see above) contains:


       baudrate off
       escape 255
       ignore 255
       timeout 600

  Perhaps it could be improved by diddling, I am getting a throughput of
  only about 30k cps over a long-haul connection through a slow
  firewall.  Ftp can move about 100k cps over the same route.  A
  realistic baudrate might avoid some timeouts.

  8.  Direction

  Obviously, if you are starting from outside the firewall and zitching
  in using a SecureID card or something, you will want to reverse the
  roles of the remote vs local servers given above.  (If you don't
  understand what this means, perhaps you are not familiar enough with
  term to use the trick described in this file responsibly.)

  9.  Security

  This is not much more of a vulnerability than the current possibility
  of having a telnet connection hijacked on an unsecured outside
  machine.  The primary additional risk comes from people being able to
  use the term socket you set up without you even being aware of it.  So
  be careful out there.  (Personally, I do this with an outside machine
  I know to be pretty secure, namely a linux laptop I maintain myself
  that does not accept any incoming connections.)

  Another possibility is to add "socket off" to the remote
  ~/.term/termrc.telnet, or add "-u off" to invocation of term.  This
  prevents the socket from being hijacked from the remote end, with only
  a minor loss of functionality.

  10.  Telnet mode

  Be sure the remote telnetd is not in some nasty seven-bit mode.  Or if
  it is, you have to tell term about it when you invoke term, by adding
  the -a switch at both ends.  (I sometimes use "^] telnet> set outbin"
  or "set bin" or invoke telnet with a -8 switch to put the connection
  into eight-bit mode.)

  11.  Bugs and term wish list

  The linecheck program has some problems checking telnet connections
  sometimes.  This is sometimes because it doesn't check the return code
  of the read() call it makes.  For network connections, this call to
  read() can return -1 with an EINTR (interrupted) or EAGAIN (try again)
  error code.  Obviously this should be checked for.

  There are a number of features that could ease the use of term over
  telnet.  These primarily relate to an assumption that influenced the
  design of term, namely that the connection is low bandwidth, low
  latency, and somewhat noisy.

  A telnet connection is in general high bandwidth, high latency, and
  error free.  This means that the connection could be better utilized
  if (a) the maximum window size was raised, well above the limit
  imposed by term's N_PACKETS/2=16, (b) there was an option to turn off
  sending and checking packet checksums, and (c) larger packets were
  permitted when appropriate.

  Also, to enhance security, it would be nice to have a term option to
  log all connections through the socket it monitors to a log file, or
  to stderr, or both.  This would allow one to see if one's term
  connection is being subverted by nasty hackers on the outside insecure
  machine.

  12.  Tricks that don't seem to work

  Some telnet clients and servers agree to encrypt their communications,
  to prevent evesdropping on the connection.  Unfortunately, the hack
  used above (using the network connection that the telnet client has
  set up while the telnet client is idle) won't work in that case.
  Instead, one really must go through the telnet client itself, so it
  can do its encryption.  It seems like that requires a simple hack to
  the telnet client itself, to add a command that runs a process with
  its stdin and stdout are connected to the live telnet connection.
  This would also be useful for various 'bots, so perhaps someone has
  already hacked it up.

  13.  Related resources

  A vaguely related trick is to SOCKSify one's Term library.  Details,
  including patches to SOCKS, are available from Steven Danz
  <danz@wv.mentorg.com>.

  14.  Acknowledgments

  Thanks for valuable suggestions from:

    Gary Flake   <flake@scr.siemens.com>

    Bill Riemers <bcr@physics.purdue.edu>

    Greg Louis   <glouis@dynamicro.on.ca>


       Extra copy of IMPORTANT DISCLAIMER --- BELIEVE IT!!!

       I hereby disclaim all responsibility for this hack.  If it
       backfires on you in any way whatsoever, that's the breaks.
       Not my fault.  If you don't understand the risks inherent in
       doing this, don't do it.  If you use this hack and it allows
       vicious hackers to break into your company's computers and
       costs you your job and your company millions of dollars,
       well that's just tough nuggies.  Don't come crying to me.

  TkRat mini-HOWTO
  Dave Whitinger, dave@linuxtoday.com
  v1.2, 15 September 1999

  This is the TkRat mini-HOWTO. This document is geared toward anyone
  interested in using their Linux computer to send and receive Internet
  E-Mail.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Installing TkRat

  3. Downloading your E-Mail

  4. Configuring TkRat

  5. Using TkRat

  6. Automatically sorting mail into folders

  7. Copyright

  8. Acknowledgements

  ______________________________________________________________________

  1.  Introduction


  This document is maintained by Dave Whitinger (dave@linuxtoday.com).
  Please mail me with any questions or ideas you have regarding this
  HOWTO.

  This document will attempt to describe the following four things:


  1. Installing the TkRat E-Mail program.

  2. Downloading mail from an Internet Service Provider.

  3. Reading, storing, and sending mail

  4. Sorting the mail into folders

  The document assumes that you are running Linux with the X Window
  System, have already established a connection to an Internet Service
  Provider, and have a POP account with that provider.

  Disclaimer: All usual disclaimers apply.  The author cannot be held
  responsible for any (mis)use of the information given here.  This
  document does not attempt to be authoritative in any way.  The author
  voluntarily creates this document seperately from any entity with
  which he may be involved with.  By reading this document, you agree to
  cause the author no grief or trouble.  :)


  2.  Installing TkRat

  I would like to stress that there are many excellent E-Mail programs
  available for Linux.  It is always a matter of personal preference
  when selecting which one you will use.  That said, I will tell you
  that I have been using a program called "TkRat" for over 2 years now -
  and I love it.  It's a graphical program that has all the features you
  would expect from a quality mail program, it's easy to learn how to
  use, it's powerful, and it's free.  For these reasons, I'll only be
  covering TkRat in this HOWTO.

  The first thing you need to do is download TkRat.  You can either
  obtain the sources and compile them, or you can get the binaries.

  Here are some URLs for the software:


    ftp://ftp.md.chalmers.se/pub/tkrat/tkrat-2.0b3.tar.gz
     <ftp://ftp.md.chalmers.se/pub/tkrat/tkrat-2.0b3.tar.gz> (Download
     via ftp)

    http://www.dtek.chalmers.se/~maf/ratatosk/tkrat-2.0b3.tar.gz
     <http://www.dtek.chalmers.se/~maf/ratatosk/tkrat-2.0b3.tar.gz>
     (Download via http)

    http://www.dtek.chalmers.se/~maf/ratatosk/download.html
     <http://www.dtek.chalmers.se/~maf/ratatosk/download.html> (Download
     page - check for the latest version!)

  When you have downloaded the tarfile, you are ready to install it on
  your system.

  To install the tar.gz source, use the commands:

  ______________________________________________________________________
  tar -zcvpf tkrat-2.0b3.tar.gz
  cd tkrat-2.0b3
  ./configure
  make
  make install
  ______________________________________________________________________


  If anything fails, consult the INSTALL and README files located in the
  tkrat-2.0b3 directory.  Note that you will need a version of tcl that
  is greater than 8.1 for this to compile.  You can obtain the latest
  tcl from scriptics.com <http://www.scriptics.com/>.


  Congratulations - TkRat should now be installed on your system.


  3.  Downloading your E-Mail

  In order to read E-Mail, it is usually best to download it using a
  program called "fetchmail".  The following instructions are known to
  work perfectly for version 2.2 of fetchmail - although they should be
  applicable to any version.

  (Note: Fetchmail is almost certainly already installed on your system,
  as it is included in all Linux distributions that I know of - if
  anyone knows this to be untrue, please let me know!).

  Perform the following steps:

  ______________________________________________________________________
  echo "server pop.com protocol pop3 username dave password foo" > ~/.fetchmailrc

  (Make sure to replace "pop.com" with the hostname to your ISP's pop server.  Replace
  "dave" with your username, and replace "foo" with your username's password.)
  ______________________________________________________________________

  Now, whenever you want to check your E-Mail, just type "fetchmail" at
  the prompt.  Fetchmail will go off and download all your mail and
  store it in your local mail folder.

  4.  Configuring TkRat


  >From the prompt, type "tkrat" and press enter.  Click on "Create".
  Read the message it gives you, then click on "Continue".  At this
  point, you are brought to the main TkRat program.  The first thing you
  should do is customize it to your local system.


  1. Go the Admin menu, and select Preferences.

  2. Click on "Sending"

  3. Enter in your E-Mail address in the "Default Reply-To" field.

  4. Enter in your E-Mail address, followed by paranthesis in the "Use
     from address" field.  e.g. dave@linuxtoday.com (Dave Whitinger)

  5. Enter your domain name in the "Domain" field.  If your E-Mail
     address is "user@xyz.com" you'll enter "xyz.com".

  6. Click on "Apply".

  7. Click on "Method".

  8. For "Send Via" select "SMPT".

  9. In the SMTP host: field, enter the SMPT server address of your ISP
     (they should be able to provide you with this information).

  10.
     Click "Apply", then "Dismiss".


  5.  Using TkRat


  Upon starting TkRat, You'll notice that you are in a folder called
  "INBOX".  Use fetchmail to download any new mail.  If you have any, it
  will appear in this INBOX folder.

  TkRat has an intuitive interface.  The top half of the screen is the
  list of messages you have (Each line is a seperate E-Mail).  The
  bottom half of the screen will be the actual content of the E-Mail.

  You can read E-Mails by simply clicking on any message in the list.

  When you are finished reading a message, you can move on the next
  message, reply to that message, compose a new message, or move the
  message to a different "Folder".

  Folders are a way of storing E-Mails into seperate "Folders".  This
  way, you can keep several folders for different topics you may receive
  E-Mail about.

  Perform the following steps to create folders:

  1. Click on Admin, then New/Edit Folders

  2. You will see a box with a "INBOX" folder.  Left-Click in that box.

  3. You are then presented with a menu, so select "New File Folder".

  4. You'll be given a dialogue box asking for information.

  5. In the first textbox - enter a name for the folder.

  6. In the second textbox - enter the filename you will use to store
     the messages in (Hint: Use something like
     /home/username/mail/name_of_folder.  So, if the first field says
     "Personal", the second field would say something like
     "/home/dave/mail/personal" (assuming your username is dave).

  7. Click OK.  You'll notice your new folder is now in the list of
     folders.  So, go to "Window" and then "Close".

  You can now Move messages to the new folder - and switch to that
  folder by selecting the folder's name under the "Folders" menu.

  Sending mail is also easy.  Click "Compose", type in the recipient's
  E-Mail address, type in a subject, and then write the message in the
  body.

  When you are finished, click on Send.


  6.  Automatically sorting mail into folders


  If you're like me, you get about 3,500 messages a day.  Each time you
  fetch your mail, you have to wade through all the messages looking for
  particular ones that interest you.

  This is not a problem anymore, thanks to Procmail.

  Procmail works like this: Procmail examines each message as it is
  downloaded, and will perform a series of tasks based upon certain
  rules that you've specified.

  Let's say, for example, that I get about 200 messages every day from a
  certain mailing list (in this example, I'm using the linux-foo list).
  Rather than have all those messages go directly into my main inbox, I
  would rather that they were automatically filtered into a box called
  "foo-list".

  The first step is to take an example mail message that came from that
  mailing list and examine the mail headers.

  I begin to notice a pattern.  Every message that comes from that
  mailing list has a line that says:

  Sender: owner-linux-foo@bar.foogers.com

  I can now tell procmail to place every message that contains this line
  into a certain folder.


  The way I tell this to procmail is by way of a ".procmailrc" file.

  I will use my favorite text editor to create a text file in my home
  directory called ".procmailrc".

  The file will look something like this:


  ______________________________________________________________________
  LOGFILE=$HOME/.pmlog
  MAILDIR=$HOME/mail
  VERBOSE

  # linux-foo list
  :0 Hw
  * ^.*[Ss]ender: owner-linux-foo@bar.foogers.edu
  foo-list

  # if it got to this point, put it in my new mail folder
  :0 Hw
  newmail
  ______________________________________________________________________

  Examine the "[Ss]ender" line.  You'll notice that that line is the one
  thing that all messages from that mailing list have in common.

  That section is telling procmail that when it sees a message come
  through with a header that looks like the above, to put it into the
  "foo-list" folder.

  The next section is saying that if the message matched nothing above,
  to just place it into newmail.

  Now, let's say that anytime I get a message from my good friend, EJ, I
  want it to go into a folder called "EJ".

  I'll just create a new section of my procmailrc file.  See below:


  ______________________________________________________________________
  LOGFILE=$HOME/.pmlog
  MAILDIR=$HOME/mail
  VERBOSE

  # linux-foo list
  :0 Hw
  * ^.*[Ss]ender: owner-linux-foo@bar.foogers.edu
  foo-list

  # Message from E.J.!
  :0 Hw
  * ^.*[Ff]rom: ej@mypal.com
  ej

  # if it got to this point, put it in my new mail folder
  :0 Hw
  newmail
  ______________________________________________________________________

  Notice the new section for EJ.  When a message comes in with his E-
  Mail address in the "From" field, it will automatically place it into
  my "ej" folder.
  Now, let's say that there's some lamer out there who keeps on E-
  Mailing me.  I don't want to hear from him, but he's persistent.  Once
  again - procmail to the rescue.

  So, let's say I don't ever want to see any mail from Bill Gates.  I
  can setup a recipe to delete any mail that comes from him.  Look at my
  new procmailrc:


  ______________________________________________________________________

  LOGFILE=$HOME/.pmlog
  MAILDIR=$HOME/mail
  VERBOSE

  # Is it coming from Bill Gates?  If yes, DELETE IT!!!
  :0 Hw
  * ^.*[Ff]rom: bgates@microsoft.com
  /dev/null

  # linux-foo list
  :0 Hw
  * ^.*[Ss]ender: owner-linux-foo@bar.foogers.edu
  foo-list

  # Message from EJ!
  :0 Hw
  * ^.*[Ff]rom: ej@mypal.com
  ej

  # if it got to this point, put it in my new mail folder
  :0 Hw
  newmail
  ______________________________________________________________________

  Now I have a rather nice procmailrc file.  Let's examine what procmail
  will do to each message as it comes in.

  At first, it checks the message to see if it is from
  "bgates@microsoft.com". If it is, delete it, and it's done.

  If the message made it through the first check, it will see if it has
  the "owner-linux-foo@bar.foogers.edu" in the headers.  If it does, it
  will put it into the "foo-list" folder, and it's done.

  If the message still makes it past that, then it checks to see if it's
  from EJ.   If it is, it places it into the "ej" folder.

  Now, if the message passes all those tests, then it should just place
  it into my newmail folder.


  Once you have these folders in place and procmail is properly
  filtering the mail, you can just go into TkRat, "Admin - New/Edit
  Folder" and create the folders for each filename.  They will be
  located under /home/username/mail/foldername.

  7.  Copyright


  This HOWTO is copyright 1998, 1999 by Dave Whitinger, and is a free
  document.  You can redistribute it and/or modify it under the terms of
  the GNU General Public License as published by the Free Software
  Foundation; either version 2 of the License, or any later version.


  8.  Acknowledgements

  Very special thanks go out to Martin Forsse'n (maf@dtek.chalmers.se)
  for authoring the TkRat mail user agent.

  Greetings go out to the North Texas Linux User's Group in Dallas, TX,
  for whom I originally wrote this document back in early 1998.  Today
  no greetings go out to any user groups, as I live in the moutains of
  East Tennessee, where I believe I am the only Linux user (or computer
  user, for that matter) within 50 miles.

  Also of note: Nic Bernstein <mailto:nic@postilion.org> has forked the
  TkRat code to create a mailer called Postilion
  <http://www.postilion.org/>.  It looks like a great mailer with a lot
  of new features that aren't in TkRat, but, nevertheless, I continue to
  use TkRat.

  Token-Ring mini-HOWTO
  Mike Eckhoff, mike.e@emissary.aus-etc.com
  v4.1, 7 January 1998

  This howto is designed to help you install the kernel patch and also
  try to point out some things to look for. I suggest that you at least
  browse through all of this document before attempting to install any
  part of the Token Ring driver for Linux.
  ______________________________________________________________________

  Table of Contents


  1. Copyright and other Jazz

  2. Hardware requirements

  3. Software needed

  4. Installation and setup

  5. NetTools installation

  6. Known problems

  7. Questions and comments

  8. Distribution Specific Installations

     8.1 Slackware 96
     8.2 RedHat 4.0+


  ______________________________________________________________________


     Special Thanks
        to Mark Swanson, Peter De Schrijver, David Morris, Paul Norton
        and everyone else I may have missed who put in their time to
        write and maintain this driver.  Also to packrat for his support
        of the linux-tr listserv.


  1.  Copyright and other Jazz

  We do not guarantee that this howto will be accurate for your system.
  Most people who have used it have had very good results in installing
  Linux on a Token Ring network.

  USE THIS HOWTO AT YOUR OWN RISK!!!  ...  We are not responsible for
  any problems caused by using this howto.

  If you have any problems with the driver that are not talked about in
  this howto, feel free to email me at...

       mike.e@emissary.aus-etc.com


  You may also wish to join the Linux on Token Ring Listserv by mailing
  majordomo@emissary.aus-etc.com with the body containing:


       subscribe linux-tr



  This document is copyright (c) 1995-1998 by Michael Eckhoff.  You may
  make copies of this document in whole or in part, in any medium
  physical or electronic, as long as the copyright notice is retained on
  all copies.  Commercial redistribution is allowed and encouraged;
  however, please notify me so that I can make sure that you have the
  most current information available.

  2.  Hardware requirements

  Make sure that you have a Token Ring card that is supported by this
  driver.  Currently the only cards that are supported are those that
  use the Tropic chipset.

  Cards that I personally know to work are:

    3Com 3C619B Token Link

    3Com 3C619C Token Link

    HyperRing Classic 16/4

    IBM Turbo 16/4 ISA adapter**

    IBM Token Ring Auto 16/4 ISA adapter

    IBM Token Ring Auto 16/4 adapter /A

    IBM Token Ring 16/4 adapter /A

    IBM Token Ring adapter /A

    IBM Token Ring adapter II (4 Megabit only)

    IBM 16/4 ISA Token Ring card (16bit)

    IBM 16/4 ISA Token Ring card (8bit)

    Madge Blue (100% IBM compatable)

     All other 100% IBM compatable shared-ram adapters should also work
     fine.  Please let us know if you find differently.

  It is recommended that you use 16KB Shared RAM for the time being.

  Cards that may cause problems:

     IBM Turbo 16/4 ISA adapter
        This adapter will, in fact, work fine with the Linux token ring
        driver.  However, you MUST run the card in Auto 16/4
        compatability mode.  The simplest way to set this is to use the
        LANAID disks sent with the card and run the command:


          LANAIDC /FAST=AUTO16



     You should then use LANAIDC or LANAID to configure the card accord
     ing to documentation.


     Token-Ring Network 16/4 Adapter II
        This adapter will NOT work.  Do not confuse this card with the
        IBM Token Ring adapter II (4mbit) which does. It is a
        DMA/Busmaster adapter for ISA.


     3Com TokenLink Velocity ISA
        You may or may not get this one to work.  I have had reports of
        people running it without problems, and others who get errors
        left and right.


     PCI adapters
        Currently, none of the IBM PCI adapters are supported.


     IBM Auto LanStreamer 16/4 Token-Ring PCI Adapter
        Currently not supported, but being worked on.  This driver
        should be Full Duplex as well when completed.

  3.  Software needed


     NOTE:
        If you are running a 2.0 distribution of Linux, please jump to
        the distriubtion specific section of this document.  The
        following is mostly for 1.2 kernels.

  This assumes you already have Linux up and running.

  Obtain the Token Ring patch from:

       <ftp://ftp.wayne.esu1.k12.ne.us/pub/Linux/Token-Ring/Token
       Ring.patch-1.2.0.gz>


  Obtain the NetTools patched source from:

       <ftp://ftp.wayne.esu1.k12.ne.us/pub/Linux/Token-Ring/net-
       tools-1.2.0.patched.tar.gz>


  Create a directory for the patches (such as /usr/src/patches) and
  place the patches there.


       mkdir /usr/src/patches             central directory for patch storage
       mkdir /usr/src/patches/token       place TokenRing patch here



  4.  Installation and setup


     NOTE:
        These instructions are for patching a 1.2 kernel for token ring
        support.  If you have a 2.0 kernel, you only need to recompile
        the current source and say ``yes'' or ``module'' when asked for
        token ring support.


  1. Install the Token Ring card into the system and configure it for
     the settings that you want to use.  It is a good idea to see if you
     can use the card through DOS before trying to use it through Linux.
     If it works in DOS, chances are, it will work in Linux with the
     same settings. If you have a Plug and Play adapter, if possible,
     lock the settings once you get them where they work.

  2. Make a backup of your linux directory.  This is very important in
     case you need to totally remove the source of the patch from your
     kernel and go back to your original code.


       cd /usr/src
       tar cvzhf linuxbak.tar.gz linux



  3. Uncompress the TokenRing patch.


       cd /usr/src/patches/token
       gzip -d TokenRing.patch-1.2.0.gz



  4. Modify your kernel with the TokenRing patch.


       cd /usr/src/linux
       patch -p1 < /usr/src/patches/token/TokenRing.patch-1.2.0



  -or-


       patch -p1 < <directory-of-patchfile>/TokenRing.patch-1.2.0



  5. Search your kernel for any rejects from the patch and make changes
     as necessary.


       find . -name \*.rej -print



  6. Search your kernel for the orig files and remove them.


       find . -name \*.orig -print | xargs rm



  7. Configure your kernel and remake.

     NOTE:
        Make sure your swap space is active if you have one.



       cd /usr/src/linux
       make config



  (The patch should have added two lines to your config.in file for the
  following options)


       Token Ring support (CONFIG_TR) [y]



  (and further down the list...)


       IBM Tropic chipset based adaptor support (CONFIG_IBMTR) [y]



       make dep
       make clean
       make zImage



  8. Setup LILO.

     First rename your /vmlinuz kernel to vmlinuz.old then copy the
     kernel to /vmlinuz.  On my system this would consist of copying

       /usr/src/linux/arch/i386/boot/zImage to /vmlinuz and editing
       /etc/lilo.conf to boot that kernel.


  Now from the prompt run ``lilo''.

  9. You should now be able to reboot your system and use the Token Ring
     card in your computer.  Please check the distribution specifc
     section for any extra configuration information.

  5.  NetTools installation

  The NetTools package contains a lot of the basic utils that you will
  use to communicate with network devices.  This includes programs like
  arp, rarp, route, ifconfig and netstat.  Since these programs do not
  know about Token Ring by default, you will need to add the NetTools
  patch so these utilities can work more efficiently with the Token Ring
  driver.

     NOTICE:
        The current version of NetTools for 1.2.x kernels is 1.2.0.  If
        you are running a 2.0 kernel, your nettools is most likely
        already up to date.  However, you can get the latest source
        from:

          <ftp://tapac.inka.de/pub/comp/Linux/networking/NetTools/>



  1. (1) Copy and Untar the NetTools source into your source directory.


       cp net-tools-1.2.0.patched.tar.gz  /usr/src
       tar -zxvof /usr/src/net-tools-1.2.0.tar.gz



  2. (5) Make the net-tools files.


       cd /usr/src/net
       make install



  6.  Known problems

  I personally have had very few problems with this driver.  It has been
  working perfectly for me for quite some time.

  If you have any problems with the driver on a 1.2.x kernel, please
  update to Linux 2.0.  The current version, as of this writing, is
  2.0.33.  There have been many improvements to the token ring driver
  since the 1.2 patches and most of them have not been ported back.

  Also, you will not have to patch a Linux 2.0 kernel for token ring.
  The source is already included.  However, there are some test patches
  of the code going into 2.1 available if you would like to use it.

  7.  Questions and comments


     Q: Can the token ring driver be compiled as a module?

     A: Yes, it can be -- and it works rather well.  There is an extra
        parameter that you can use when it is compiled as a module.  If
        you ever need to ``spoof'' software install programs, such as
        the redhat boot disks, into configuring your token ring card as
        an ethernet device (for NFS/FTP installs, etc), you can use the
        ``device'' parameter to force a device name other then tr0.  You
        will probably have problems if you try this with multiple
        adapters.  It is mostly there to get around a few
        incompatabiliites. Ex.:


          /sbin/insmod ibmtr device=eth0


     Q: I keep getting an error code ``0011''.  Whats up?

     A: Make sure that your connection to the network is good or that
        you have a loopback connector on your token ring card.  This
        message just means that it could not open the ring.  99.99% of
        the times, it is just not plugged into one.


     C: If you have a sound card in your machine, and it sits at IO
        0x220, you may end up with a conflict with your token ring
        adapter at 0xa20.  If you notice that a supported adapter does
        not seem to be working and you have a sound card, please try to
        either set your token ring card to 0xa24 or move/remove your
        sound card.

        Also...

        Here are some email messages that I have received about Token
        Ring and Linux.  In some of the messages, I have removed parts
        that were not important to save space.

        Q:


             From: "Mr. Chuck Rickard" <chuck@gl.umbc.edu>
             Subject: Re: Token Ring Kernel patch

             I d/l'd the patch, applied it, and re-compiled. When booting it said,
             "tr0: Can't assign device to adapter" and again for tr1.  Any ideas?

             Thanks!

             Chuck Rickard
             (chuck@umbc8.umbc.edu)



        A:


             From: David Morris <dwm@shell.portal.com>



        When this is the only message issued, it means that the PIO
        request for adapter information (see segment = inb(PIOaddr) in
        ibmtr.c) was so out of range that there is no TR card at that IO
        address.


        Q:



        From: Mike Glover <glover@credit.erin.utoronto.ca>
        Subject: Token ring problems.

        Thanks for responding. I was starting to thing that I posted incorrectly,
        and I was about to post again. Anyway, the following  clip is part of my
        /var/adm/messages file from when I boot up.

        May  2 10:03:14 linux kernel: tr0: Unable to assign adapter to device.
        May  2 10:03:14 linux kernel: tr1: Unable to assign adapter to device.

        The section, tr0: Unable to assign adapter device. is what kinda confuses
        me. The documentation is slim at best so I didn't know what to do with
        the message. I know I didn't assign any token ring information,
        and I didn't know where to do it.

        The hardware:
                    Its a PC clone (Dell OMNIPLEX 560 to be exact)
                    The token ring card is a Olicom 16/4 Adapter.

        I have DOS token ring drivers and it snaps into the network, so there is
        nothing wrong with the card. I think, I am just missing something really
        small in the config on the Linux side.



        A: The Olicom 16/4 Adapter does not use the Tropic Chipset.  Try
           using one of the cards that are listed at the top of the
           HOWTO.


        Q:


             From: Mike Glover <glover@credit.erin.utoronto.ca>
             Subject: Found an IBM card...

             I found myself an IBM token ring card and I got a little further,
             but still not luck. (I did change /etc/rc.d/rc.inet1 ifconfig entry
             from eth0 to tr0)

             Anyway, here is part of the /var/adm/messages file:
             May  2 16:23:07 linux kernel: IPX Portions Copyright (c) 1995 Caldera, Inc.
             May  2 16:23:07 linux kernel: tr0: PIOaddr:  a20 seg/intr: b8 mmio base:
                000dc000 intr: 0
             May  2 16:23:07 linux kernel: tr0: Channel ID string not found for PIOaddr: a20
             May  2 16:23:07 linux kernel: tr0: Expected for ISA: 5049434f3631313039393020
             May  2 16:23:07 linux kernel: tr0:            found: 000902003021111000182000
             May  2 16:23:07 linux kernel: tr0: Expected for MCA: 4d4152533633583435313820
             May  2 16:23:07 linux kernel: tr0: Unable to assign adapter to device.
             May  2 16:23:07 linux kernel: tr1: Unable to assign adapter to device.
             May  2 16:23:07 linux kernel: PPP: version 0.2.7 (4 channels) NEW_TTY_DRIVERS
                OPTIMIZE_FLAGS


             Does this tell you anything. It tells me little.



        A:

        From: David Morris <dwm@shell.portal.com>



        This message means either a memory conflict with the MMIO area
        or a TR card which is not compatible with the driver (at least
        the signature isn't known).


        Q:


             From: Mike Glover <glover@credit.erin.utoronto.ca>
             Subject: Almost there...

             The following sample is what I'm getting on my messages file:

             May  3 14:50:24 linux kernel: tr0: now opening the board...
             May  3 14:50:24 linux kernel: tr0: board opened...
             May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec.
                Donald resets adapter, but resetting
             May  3 15:11:47 linux kernel:  the IBM tokenring adapter takes a long time.
                It might not even help when the
             May  3 15:11:47 linux kernel:  ring is very busy, so we just wait a little longer
                and hope for the best.
             May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec.
                Donald resets adapter, but resetting
             May  3 15:11:47 linux kernel:  the IBM tokenring adapter takes a long time.
                It might not even help when the
             May  3 15:11:47 linux kernel:  ring is very busy, so we just wait a little longer
                and hope for the best.
             May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec.
                Donald resets adapter, but resetting

             The Arrg entry only comes when I telnet, rlogin or ftp to a remote
             machine. Once that happens, the connection hangs big time. I took out all
             the other hardware (which was 1 SCSI card) and tried running the card all
             by itself. Same thing, so it eliminates hardware IRQ's from getting into
             a yelling match. The following are the DIP switches on the card:

             1       Up      |
             2       Down    |
             3       Down    |       According to the manual this sets the
             4       Up      |       base address to CC000 Which is fine for
             5       Up      |       my machine.
             6       Down    |
             7       Down    +       This sets the IRQ to 2. Which is also fine
             8       Down    +
             9       Up      X       Primary Lan adapter. Which it is.
             10      Up      =       16 KB shared RAM size. This OK?
             11      Down    =
             12      Up      #       16 Mbps Data rate.

             I was wondering if it is in fact the dip switches, or the way I have
             configured my route table and other network info.

             ttfn,
             Mike



        A: The Arrg problem is pretty much taken care of in the 2.0
           kernels.  All of the patches have not been ported back to
           1.2, and I doubt that they will be.  If you get excessive
           Arrg messages, do yourself a favour and move to Linux 2.0.

  8.  Distribution Specific Installations

  8.1.  Slackware 96

  If you have not already ran ``netconfig'' on your system, do so now.
  Setup your machine just as if it were on Ethernet.

  Edit your /etc/rc.d/rc.inet1 scripts to point to the tr0 device rather
  than the eth0 device.

  You should have a line that looks like


       /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}



  Change this line to read


       /sbin/ifconfig tr0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}



  8.2.  RedHat 4.0+

  The RedHat distribution of Linux has a wonderful Xwindows control
  panel for configuring modules and devices. If you have added a token
  ring adapter to a standard RedHat installation, there should already
  be token ring support compiled in as a module.  Try to:


       modprobe ibmtr



  and see what you come up with.  Chances are, if you have a supported
  adapter, you will be ready to go.

  The easiest way to configure your interface would be to use the
  control-panel.  You will first want to go to the kernel module control
  and instruct it to load a new network device for token ring.  It
  should then start to autoload the ibmtr driver on boot.  You will then
  want to jump over to network configuration and add a new device, tr,
  and give it an ip address, etc.

  You should then be able to restart and go with Linux and Token Ring on
  RedHat 4.0+.

  Please note that these RedHat instructions came from the top of my
  head.  I havn't had to modify any of my RedHat systems for quite some
  time and am writing this from memory.  Either way, they should be able
  to get you where you need to go.



  Transparent Proxy with Squid mini-HOWTO
  Daniel Kiracofe
  v1.0, 01 April 2000

  This document provides information on how to setup a transparent
  caching HTTP proxy server using only Linux and squid.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Comments
     1.2 Copyrights and Trademarks
     1.3 #include <disclaimer.h>

  2. Overview of Transparent Proxying

     2.1 Motivation
     2.2 Scope of this document

  3. Configuring the Kernel

  4. Setting up squid

  5. Setting up ipchains

  6. Put it all together

  7. Further Resources



  ______________________________________________________________________

  1.  Introduction

  1.1.  Comments

  Comments and general feedback on this mini HOWTO are welcome and can
  be directed to its author, Daniel Kiracofe, at drk@unxsoft.com.

  1.2.  Copyrights and Trademarks

  Copyright 2000 by UnxSoft Ltd (www.unxsoft.com)

  This manual may be reproduced in whole or in part, without fee,
  subject to the following restrictions:


  o  The copyright notice above and this permission notice must be
     preserved complete on all complete or partial copies

  o  Any translation or derived work must be approved by the author in
     writing before distribution.

  o  If you distribute this work in part, instructions for obtaining the
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

  o  Small portions may be reproduced as illustrations for reviews or
     quotes in other works without this permission notice if proper
     citation is given.


  Exceptions to these rules may be granted for academic purposes: Write
  to the author and ask. These restrictions are here to protect us as
  authors, not to restrict you as learners and educators. Any source
  code (aside from the SGML this document was written in) in this
  document is placed under the GNU General Public License, available via
  anonymous FTP from the GNU archive.

  1.3.  #include <disclaimer.h>

  No warranty, expressed or implied, etc, etc, etc...

  2.  Overview of Transparent Proxying

  2.1.  Motivation

  In ``ordinary'' proxying, the client specifies the hostname and port
  number of a proxy in his web browsing software. The browser then makes
  requests to the proxy, and the proxy forwards them to the origin
  servers. This is all fine and good, but sometimes one of several
  situations arise. Either


  o  You want to force clients on your network to use the proxy, whether
     they want to or not.

  o  You want clients to use a proxy, but don't want them to know
     they're being proxied.

  o  You want clients to be proxied, but don't want to go to all the
     work of updating the settings in hundreds or thousands of web
     browsers.

  This is where transparent proxying comes in. A web request can be
  intercepted by the proxy, transparently. That is, as far as the client
  software knows, it is talking to the origin server itself, when it is
  really the proxy server.

  Cisco routers support transparent proxying. But, (surprisingly enough)
  Linux can act as a router, and can perform transparent proxying by
  redirecting TCP connections to local ports. However, we also need to
  make our web proxy aware of the affect of the redirection, so that it
  can make connections to the proper origin servers. There are two
  general ways this works:

  The first is when your web proxy is not transparent proxy aware. You
  can use a nifty little daemon called transproxy that sits in front of
  your web proxy and takes care of all the messy details for you.
  transproxy was written by John Saunders, and is available from
  ftp://ftp.nlc.net .au/pub/linux/www/ or your local metalab mirror.
  transproxy will not be discussed further in this document.

  A cleaner solution is to get a web proxy that is aware of transparent
  proxying itself. The one we are going to focus on here is squid. Squid
  is an Open Source caching proxy server for Unix systems. It is
  available from www.squid-cache.org

  2.2.  Scope of this document

  This document will focus on squid version 2.3 and linux kernel version
  2.2, the most current stable releases as of this writing (March 2000).
  It should also work with squids as early as 2.0 and the later 2.1
  linux kernels. Should you need information about earlier releases, you
  may find some earlier documents at www.unxsoft.com.

  If you want to use linux 2.3, you will have to use a thing called
  netfilter instead of ipchains. However, it is assumed that if you are
  running a development kernel, you can figure out netfilter on your own
  from the provided documentation.  If not, you really shouldn't be
  running a development kernel (trust me on this).  Once linux 2.4 is
  released, this document will be updated to cover netfilter.

  3.  Configuring the Kernel

  First, we need to make sure all the proper options are set in your
  kernel.  If you are using a stock kernel from your distribution,
  transparent proxying may or may not be enabled (IIRC, it is in RH 6.1,
  but don't quote me on that).  If you are unsure, the best way to tell
  is to simply skip this section, and if the commands in the next
  section give you weird errors, it's probably because the kernel wasn't
  configured properly.

  If your kernel is not configured for transparent proxying, you will
  need to recompile. Recompiling a kernel is a complex process (at least
  at first), and it is beyond the scope of this document. If you need
  help compiling a kernel, please see <a
  href="http://metalab.unc.edu/pub/Linux/do cs/HOWTO/Kernel-HOWTO">The
  Kernel HOWTO.</a>

  The options you need to set in your configuration are as follows
  (Note: none of these can be built as modules)


  o  Sysctl support

  o  TCP/IP networking

  o  IP: firewalling

  o  IP: always defragment

  o  IP: transparent proxy support

  o  /proc filesystem support

  Once you have your new kernel up and running, you may need to enable
  IP forwarding. IP forwarding allows your computer to act as a router.
  Since this is not what the average user wants to do, it is off by
  default and must be explicitly enabled at run-time. However, your
  distribution might do this for you already. To check, do ``cat
  /proc/sys/net/ipv4/ip_forward''. If you see ``1'' you're good.
  Otherwise, do ``cat '1' > /proc/sys/net/ipv4/ip_forward''.  You will
  then want to add that command to your appropriate bootup script in
  /etc/rc.d/.

  4.  Setting up squid

  ow, we need to get squid up and running. Download the latest source
  tarball from www.squid-cache.org. Make sure you get a STABLE version,
  not a DEVEL version.  The latest as of this writing was
  squid-2.3.STABLE1.tar.gz.

  Now, untar and gunzip the archive (use ``tar -xzf <filename>'').  Run
  the autoconfiguration script (``./configure''), compile (``make'') and
  then install (``make install'').

  Now, we need to edit the default squid.conf file (installed to
  /usr/local/squid/ etc/squid.conf, unless you changed the defaults).
  The squid.conf file is heavily commented. In fact, some of the best
  documentation available for squid is in the squid.conf file. After you
  get it all up and running, you should go back and reread the whole
  thing. But for now, let's just get the minimum required.  Find the
  following directives, uncomment them, and change them to the
  appropriate values:


  o  httpd_accel_host virtual

  o  httpd_accel_port 80

  o  httpd_accel_with_proxy on httpd_accel_uses_host_header on

  Finally, look at the http_access directive. The default is usually
  ``http_access deny all''. This will prevent anyone from accessing
  squid. For now, you can change this to ``http_access allow all'', but
  once it is working, you will probably want to read the directions on
  ACLs (Access Control Lists), and setup the cache such that only people
  on your local network (or whatever) can access the cache. This may
  seem silly, but you should put some kind of restrictions on access to
  your cache. People behind filtering firewalls (such as porn filters,
  or filters in nations where speech is not very free) often ``hijack''
  onto wide open proxies and eat up your bandwidth.

  Initialize the cache directories with ``squid -z'' (if this is a not a
  new installation of squid, you should skip this step).

  Now, run squid using the RunCache script in the /usr/local/squid/bin/
  directory.  If it works, you should be able to set your web browser's
  proxy settings to the IP of the box and port 3128 (unless you changed
  the default port number) and access squid as a normal proxy.

  For additional help configuring, see the squid FAQ at www.squid-
  cache.org.

  5.  Setting up ipchains

  ipchains should be installed with almost every recent distribution
  (anything based on kernel 2.2). However, should you not have ipchains,
  you can get it from ftp://ftp.rustcorp.com/ipchains/. ipchains is a
  very powerful tool, and we'll only scratch the surface here. For more
  information, please see
  http://www.rustcorp.com/linux/ipchains/HOWTO.html for the ipchains
  HOWTO.

  To set up the rules, you will need to know two things, the IP address
  of the box (I'll use 192.168.1.1 as an example) and the port squid is
  running on (I'll use the default of 3128 as an example).

  First, we need to allow packets destined for any actual webserver on
  this box through. We should setup both the loopback interface and the
  ethernet interface.  You should not skip this step even if you no
  actual webserver on your box, as the absence of these rules can create
  infinite forwarding loops where the proxy tries to connect to itself.
  Use the following commands:


  o  ipchains -A input -p TCP -d 127.0.0.1/32 www -j ACCEPT

  o  ipchains -A input -p TCP -d 192.168.1.1/32 www -j ACCEPT

  Now, the magic words for transparent proxying:


  o  ipchains -A input -p TCP -d any/0 www -j REDIRECT 3128

  You will want to add the above commands to your appropriate bootup
  script under /etc/rc.d/.


  6.  Put it all together

  If everything has gone well so far, go to another machine, change it's
  gateway to the IP of your new squid box, and surf away. To make sure
  that requests are really being forwarded through your proxy instead of
  straight to the origin server, check the log file
  /usr/local/squid/logs/acces s.log

  7.  Further Resources

  Should you still need assistance, you may wish to check the squid FAQ
  or the squid mailing list at www.squid-cache.org. You may also e-mail
  me at drk@unxsoft.com, and I'll try to answer your questions if time
  permits (sometimes it does, but sometimes it doesn't)



  The Linux Ultra-DMA Mini-Howto
  Brion Vibber, brion@pobox.com
  v3.0, 9 November 1999

  This document is intended to explain how to use Ultra-DMA aka Ultra-
  ATA aka Ultra33 and Ultra66 hard drives and interfaces with Linux. The
  most recent version of this mini-Howto can be obtained in HTML format
  at http://pobox.com/~brion/linux/Ultra-DMA.html.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Disclaimer
     1.2 Credits
     1.3 Document History
     1.4 Copying

  2. What is Ultra-DMA and why do I want it?

     2.1 IDE, EIDE, & ATAPI
     2.2 Bus Master DMA
     2.3 Ultra-DMA aka Ultra-ATA aka Ultra33 aka...
     2.4 Just how ``Ultra'' is it anyway?
     2.5 How does UDMA compare to SCSI?

  3. Using your UDMA hard drive with an EIDE interface

  4. Using your hard drives with a UDMA interface

  5. Offboard PCI UDMA interfaces

     5.1 Promise Ultra33
     5.2 Promise Ultra66
     5.3 Artop ATP850UF
     5.4 Adding device files

  6. Onboard UDMA interfaces

     6.1 Intel FX, HX, VX, TX, LX, and BX
     6.2 The VIA VP2 and Related Chipsets
     6.3 TX Pro and other ``Pro'' boards
     6.4 HPT 366

  7. Unified IDE Patches

  8. Activating and Deactivating UDMA

     8.1 Using kernel boot parameters
     8.2 Using hdparm

  9. Problems

     9.1 The UDMA Blacklist
     9.2 Are you overclocking?
     9.3 Is your BIOS current?
     9.4 If you still can't get it to work!

  10. If you have some information about UDMA stuff that's not in this mini-howto...

  ______________________________________________________________________

  1.  Introduction


  This document is intended to explain how to use Ultra-DMA aka Ultra-
  ATA aka Ultra33 and Ultra66 hard drives and interfaces with Linux. In
  many cases there is no difficulty in using them, but some tweaking can
  increase performance. In other cases, you need to go to extraordinary
  lengths simply to access your hard drives.


  1.1.  Disclaimer


  The information in this is document is, to the best of my knowledge,
  correct, and should work. However, there may be typos, there may be
  mysterious transmission errors, and there may be strange
  incompatibilities within your own system that prevent the techniques
  described herein from working properly. So... before you go fiddling
  around with you hard drive, BACK UP ANY DATA YOU WANT TO KEEP! If you
  are not already performing regular backups, please start doing so for
  your own good.


  1.2.  Credits


  Michel Aubry <mailto:giovanni@sudfr.com> - UDMA-enabled VIA-related
  patch for <=2.0.33 & more info, grand unified UDMA patch for 2.0.34+

  Andrew Balsa <mailto:andrebalsa@altern.org> - Provided some general
  UDMA info and the udma-generic patch for Intel TX, SiS, and VP1 on
  <=2.0.33; also the grand unified UDMA patch for 2.0.34+

  Maxime Baudin - French translation

  Bokonon - ``Controller'' vs. ``interface''

  John G. <mailto:prefect@ipass.net> - VIA VP2 patch for <=2.0.33 & info

  Martin Gaitan - Promise Ultra33 ide0/ide1 installation workaround

  Andre M. Hedrick <mailto:andre@suse.com> - current Linux IDE subsystem
  maintainer

  Hvard Tautra Knutsen - Norwegian translation

  Norman Jacobowitz - Bugged me to add info on the VP3

  John Levon - Info on TX Pro mobos

  Peter Monta - Info on using two Ultra33 cards

  Masayoshi Nakano - Japanese translation

  Gadi Oxman <mailto:gadio@netvision.net.il> - The Promise Ultra33 patch
  for <=2.0.34 & finding the secret numbers for the workaround

  Andy Pearce - Suggested adding info on the additional device files for
  hde-h

  Andrei Pitis <mailto:pink@roedu.net> - LILO patch

  Brion Vibber <mailto:brion@pobox.com> - The document itself

  1.3.  Document History


  v3.0, 9 November 1999: Finally found time to update some key changes
  such as the relocation of the IDE patch archive to the Kernel.org
  archives <http://www.kernel.org/pub/linux/kernel/people/hedrick>...
  pesky school!  Updated all sunsite links to new metalab.unc.edu or
  www.linuxdoc.org

  v2.1, 27 May 1999: Corrects some minor omissions and errors from 2.0
  and adds information on the Promise Ultra66 and 2.2/2.3 kernels.

  v2.0, 7 August 1998: Major updates and almost total restructuring of
  the document into onboard (motherboard) and offboard (add-in cards)
  interfaces; the Grand Unified UDMA patch(a part of the Jumbo patch)
  for 2.0.35. Put credits in alphabetical order by last name. Changed
  ``controller'' to ``interface'' in many cases to be more technically
  correct. Added info on enabling/disabling UDMA, the blacklist, and
  more!

  v1.45, 6 July 1998: Minor updates - Red Hat 5.1 and 2.0.34 patch for
  Promise Ultra33, LILO patch for booting off of PCI interfaces such as
  the Promise Ultra33

  v1.41, 3 May 1998: Fixed a couple of typos, added translators to
  credits.

  v1.4, 28 April 1998: UDMA-Generic patch, some more general info.
  Copying section added.

  v1.3, 5 March 1998: VIA VP3 info, better patching instructions,
  pointer to more recent Promise patch.

  v1.2, 27 January 1998: Additional Promise workaround info.

  v1.1, 21 January 1998: New info about VIA chipset, installing around
  the Promise Ultra33, and enabling Bus Master & UDMA transfer modes.

  v1.0, 19 January 1998: More or less complete, first version done in
  SGML.


  1.4.  Copying


  This document may be freely copied and distributed for informational
  purposes. It may not be modified, except for reformatting, without the
  permission of the author. If you wish to translate this document into
  another language you may do so, however you should contact the author
  first so that updated versions of this document can be sent out to
  translators as well as directly to the Linux Documentation Project.


  2.  What is Ultra-DMA and why do I want it?


  Here's a brief overview of IDE-based drive technologies:


  2.1.  IDE, EIDE, & ATAPI


  These are older drive technologies. Most non-SCSI hard drives and
  drive interfaces that you can buy today or are likely to be using are
  EIDE, although many of the larger drives now available are UDMA.

  2.2.  Bus Master DMA


  Bus Master DMA is a technology for increasing the speed of hard disk
  data transfers which requires support from the motherboard and the
  BIOS, and at least some support from the drive.

  You can learn more at
  http://developer.intel.com/design/pcisets/busmastr/FAQs.htm.


  2.3.  Ultra-DMA aka Ultra-ATA aka Ultra33 aka...

  Ultra-DMA has many names, but we'll just call it UDMA in here.

  UDMA is a more advanced technology which provides for even faster
  throughput, up to 33.3 MB/s in UDMA mode 2 and 66.7 MB/s in UDMA mode
  4, twice to four times that of EIDE, for much lower prices than SCSI.
  Many new computers come with large UDMA drives and UDMA interfaces,
  and it's possible to add a UDMA interface card (such as the Promise
  Ultra33 or Ultra66) to an existing system to boost speed, even on
  older non-UDMA drives.

  You can learn great details about UDMA at
  http://www.quantum.com/src/whitepapers/ultraata/

  Note that cable length should be kept shorter for UDMA, compared to
  plain DMA, preferably less than 30 cm (12") maximum length though 18
  inches will usually be fine. 66 MB/s requires a special 80-conductor
  cable and should definately not be longer. If you get a lot of CRC
  errors, try using a shorter cable.

  2.4.  Just how ``Ultra'' is it anyway?


  Before we get any farther, let's clear up a misconception. That 33 or
  66 MB/sec figure is the burst transfer rate, and it's not something
  you're going to see very often. To explain, here is a clip from
  udmageneric's UDMA.txt:

       Burst (instantaneous) transfer rates are supposed to go from 16.6MB/s (PIO
       mode 4) to 16.6MB/s (DMA mode 2) up to 33MB/s (UDMA). In his patch against
       kernel 2.1.55, Kim-Hoe Pang actually checked the UDMA burst transfer rate
       with a logic analiser: 60ns/word, which translates into 33MB/s.

       Note that burst transfer rates only affect data transfers to/from the EIDE
       drive cache (476kB for the IBM 6.4GB drive), and IMHO are not particularly
       relevant for most Linux users.

       The Linux kernel uses as much RAM as possible to cache hard disk data
       accesses, and so if data is not in the kernel cache there is little chance
       that it will be in the (much smaller) hard disk cache.

  Much more relevant is the sustained transfer rate, the speed at which
  data can be transferred from the drive to main memory where it can be
  used. An easy way to measure the sustained transfer rate is to use
  hdparm, for instance ``hdparm Tt /dev/hda'' to measure the rate of
  the first IDE device.

       Here is some data gathered after extensive testing, using the hdparm utility
       (also written by Mark Lord):

       PIO mode 4 transfer rates under Linux:   +/- 5.2MB/s

       DMA mode 2 transfer rates under Linux:   +/- 7.2MB/s

       UDMA mode 2 transfer rates under Linux:  +/- 9.8MB/s

  As you can see, UDMA is still almost twice as fast as plain EIDE and
  significantly faster than plain bus mastering DMA. Most current UDMA
  drives will give you between 10 and 15 MB/s using UDMA mode 2 (33
  MB/s) or 4 (66 MB/s) enabled.

  Also, using DMA vastly reduces CPU usage during disk I/O vs PIO.


  2.5.  How does UDMA compare to SCSI?


  I don't have any hard numbers to give you, but the general consensus
  is that high-end SCSI can give better performance than UDMA. However
  if you've looked at the price tags on any hard drives lately you'll
  notice that UDMA drives tend to be much less expensive. The
  performance/price ratio favors UDMA in most cases.


  3.  Using your UDMA hard drive with an EIDE interface


  This is easy to do. Since all UDMA drives are fully EIDE backward-
  compatible, just plunk your drive on your EIDE interface like it was
  any old hard drive and Linux should have no problems detecting or
  using it.  However, you will of course be limited to the slower speed
  of EIDE.


  4.  Using your hard drives with a UDMA interface


  Well, there is good news and there is bad news. The good news is that
  a UDMA interface can be used with both UDMA hard drives and legacy
  EIDE hard drives, and will be a lot faster than an EIDE interface.

  The bad news is that the old stock kernels (2.0.x) do not currently
  support UDMA very well. The new 2.2.x kernels do support UDMA33,
  however, and kernel patches are available to add UDMA support for
  kernels that lack it.

  In addition, certain UDMA interfaces that are add-in cards rather than
  built into the motherboard require either a patch or some trickery to
  use on older kernels. That is why this document exists - to explain
  how to get the patches and work the trickery.


  5.  Offboard PCI UDMA interfaces


  These are UDMA interfaces on PCI cards that can be used to add UDMA
  support to an existing computer without replacing the motherboard, or
  for adding support for an additional four drives to a machine which
  has had its onboard interfaces filled. They can also be found
  preinstalled in some computers, especially Gateway 2000 and Dell
  machines.

  Most of them are not supported by the old stable kernels (2.0.x), but
  many should work with a 2.2.x kernel - the Red Hat 6.0 and SuSE 6.1
  distributions are based on 2.2.x kernels, as are the most recent
  versions of most other distros.  However some of the latest cards (the
  Promise Ultra66 for instance) won't work even with the current 2.2.x
  kernels, if you have this or can't get a newer distribution then you
  must apply a kernel patch or upgrade to a newer kernel version.  If
  you need to install Linux onto a hard drive on one of these interfaces
  in this case, you will need to use a few odd tricks.


  5.1.  Promise Ultra33


  This is a PCI card that has two UDMA channels on it, supporting up to
  four drives total. You can look up specifications & pricing at
  http://www.promise.com.  This card shipped in early model Gateway 2000
  Pentium II systems.

  Kernels 2.0.35 and later and all 2.2.x kernels support the Ultra33 and
  you should have no trouble installing a distribution that uses these
  kernels.  However, the older stable kernels (2.0.34 and below) do not,
  and since most older Linux distributions include these older kernels
  it can be a little difficult to get Linux installed if you can't or
  don't want to use a newer version (for instance if you are
  standardized on a particular version of a distribution throughout your
  organization).

  Installing Linux with the Ultra33

  Although there is a patch for the Ultra33 interface, it is not very
  easy to apply a patch and recompile your kernel if you have not
  installed Linux yet! So, here is a workaround which allows you to
  install. Thanks to Gadi Oxman for the following information on getting
  the interface settings:

       If we can access the console with the installation disk, we can also
       use "cat /proc/pci" to display the Promise interface settings:

           RAID bus interface: Promise Technology Unknown device (rev 1).
             Vendor id=105a. Device id=4d33.
             Medium devsel.  IRQ 12.  Master Capable.  Latency=32.
             I/O at 0xe000.   (a)
             I/O at 0xd804.   (b)
             I/O at 0xd400.   (c)
             I/O at 0xd004.   (d)
             I/O at 0xc800.   (e)

       and pass "ide2=a,b+2 ide3=c,d+2" as a command line parameter to the kernel.

  Note that the numbers probably are not the same as what you will have.
  Just as an example, the parameters to use for the above set of numbers
  would be ``ide2=0xe000,0xd806 ide3=0xd400,0xd006''.  If you are only
  using the first channel on the Ultra33 (for instance, if you only have
  one drive, or two if they are master and slave on the same channel),
  then you won't need to specify ide3.

  Red Hat 5.1: Boot with the boot diskette and press enter when
  prompted.  The kernel will load, and then you will be asked for a
  language, keyboard type, and installation method. You may be prompted
  for additional information about the source media; it doesn't matter
  right now what you tell it as long as you can get to the next step.
  Next you should see a screen titled ``Select Installation Path'';
  press Alt-F2 now to get to a command prompt.  Run ``cat /proc/pci'',
  write down the numbers as above, and reboot from the boot disk. This
  time, type ``linux ide2= (this is where you put the numbers like shown
  above) ide3=(more numbers)''. It should now be able to install onto
  your hard disk without difficulty, however LILO will probably not be
  able to install; instead make a boot floppy and boot it with the same
  parameters until you can patch LILO and and the kernel.

  Red Hat 5.0 and Slackware 3.4: These are similar, but with the wrinkle
  that the setup programs ignore /dev/hde-h (the drives on ide2 and
  ide3).  In order to install to or from these drives it is necessary to
  override one or both of the onboard interface's channels. However be
  sure not to override a device that you need to install; for instance
  if you are installing from a CD-ROM drive on /dev/hdd (ide1 - onboard
  interface) to a hard drive on /dev/hde (ide2 - the Ultra33), you
  should override the non-essential ide0 with ide2 and leave ide1
  intact. Assuming the numbers above you would boot with
  ``ide0=0xe000,0xd806''. Red Hat 5.0 will give you a shell prompt if
  you use the rescue disk capability, and Slackware includes a shell in
  the regular installation process. However Red Hat 5.0 is difficult to
  boot after installation; if you have problems you could try
  downloading a Slackware boot disk from
  ftp://ftp.cdrom.com/pub/linux/slackware-3.5/bootdsks.144/ and using
  that to boot.

  With another Linux distribution you will have to improvise a bit, but
  the process should be about the same as the above.

  IMPORTANT: Without the patch (discussed in the section ``Unified
  IDE''), the kernel needs these boot parameters in order to access your
  hard disk! Therefore it is very important that when you configure
  LILO, either on the hard disk or on a boot floppy, that you give it
  the exact same parameters that you gave when installing. Otherwise
  your system won't boot! It should be possible to give them to LILO
  when you boot (ie, press Shift, type in ``linux ide2=.....'' each time
  you boot), but only if you kept the numbers! It is recommended that
  you patch your kernel as soon as possible so you will not have to
  worry about that anymore; once you are booting with a patched kernel,
  you can get rid of the boot parameters. Also, as far as I know there
  is no way to pass boot parameters to a plain kernel boot floppy (as
  made with ``make zdisk''), you must use LILO or another loader (such
  as LOADLIN) that lets you pass boot parameters.

  However, unpatched kernels and installation programs often have a
  difficult time actually using ide2 and ide3, even if the drives are
  detected properly.  So if you can't get Linux to install using the
  above technique, try specifying ide0 or ide1 instead of ide2 or ide3
  (thanks to Martin Gaitan for this technique). This essentially
  replaces the on-board interface with the Promise Ultra33 as far as the
  kernel is concerned, and you can follow the directions in the next
  section as if you had physically moved it.  Note that if you're using
  an IDE CD-ROM drive connected to your on-board interface to install
  from, you will want to make sure that you do not take over the
  interface that the CD is on or you will not be able to install! If the
  CD is hda or hdb, use ide1 for your hard drive, and if it is hdc or
  hdd, then use ide0.

  Installing Linux Around the Ultra33

  If you cannot get the software workaround to work, you will have to
  try a more brute force approach. Here's an alternative method that is
  virtually guaranteed to work, but  will require you to open up your
  computer and mess about in it. NOTE: If you are not familiar with the
  process of connecting and disconnecting IDE drives, read the manuals
  that came with your computer, your hard drive, and/or the Promise
  Ultra33 before attempting this! If you screw something up and don't
  know how to put it back, you could end up being sorry!

  That being said, it's all really quite simple. Most motherboards these
  days have built-in EIDE interfaces. Disconnect your hard drive from
  the Ultra33 and connect it to the onboard interface. If you have other
  IDE devices, such as a CD-ROM, tape, or ZIP drive, on your oboard
  interface, it is easiest if you either add the hard drive on an unused
  channel (the secondary instead of the primary) or temporarily displace
  a device that you don not need immediately (such as ZIP or tape).
  Install Linux. Download and apply the Promise UDMA patch (see next
  section).

  Now you are ready to move the drive back onto the Promise... almost.
  To be safe, make a kernel-image boot floppy (cd /usr/src/linux ; make
  zdisk), which you  will be able to use to boot your system in case
  LILO doesn't work. Actually, to be very safe, make two and put one
  away for now.

  Okay, now it is time to think a little... if you have just one hard
  drive and it is going to be on the Promise, then it will most likely
  be /dev/hde (a and b are for the primary onboard interface, c and d
  for the secondary onboard interface).  If you are going to put any
  other drives on it, then the slave of the Promise's first channel will
  be /dev/hdf, the master of the second will be /dev/hdg, and the slave
  of the second will be /dev/hdh.

  Edit /etc/fstab, and change all the partitions of the hard drives you
  are moving from the onboard drives (/dev/hda, hdb, etc) to their new
  locations  on the Promise (/dev/hde, hdf, etc). If you had to displace
  any devices (such as a CD-ROM or ZIP drive) that you want to leave on
  the onboard interface, then change them to their new locations as
  well. For instance, if your CD-ROM was originally the master on the
  primary channel (/dev/hda), but you put your hard disk there and had
  to bump the CD to the slave  (/dev/hdb) or to the secondary channel
  (/dev/hdc), and now you want to put  it back, then change it to
  /dev/hda.

  If you are using LILO, reconfigure LILO to use the new location of the
  drive (LILO configuration is beyond the scope of this document, if you
  do not know how, read the LILO mini-HOWTO
  <http://www.linuxdoc.org/HOWTO/mini/LILO.html>), or else it probably
  will not be able to boot unless you use that boot floppy I had you
  make, which you will also want to configure to boot off the new
  partition. This is done using the rdev command. Put the floppy in the
  drive and type ``rdev /dev/fd0 /dev/hde1''. Of course that's assuming
  your root partition is the first on your first UDMA drive. If not
  (mine is /dev/hde7, for instance), then obviously use the appropriate
  partition number!

  Reboot. Your system should now work fine.

  Patching for the Ultra33

  Kernels 2.0.35 and later support the Promise Ultra33 natively;
  download an upgrade from your Linux distribution or from
  http://www.kernel.org.

  For instructions on how to compile the kernel, read the Kernel HOWTO.

  Using two Ultra33 cards in one machine


  This is currently not working correctly... don't do it right now
  unless you're willing to fiddle with the kernel to try to get things
  to work.


  5.2.  Promise Ultra66

  This is essentially the same as the Ultra33 with support for the new
  UDMA mode 4 66 MB/sec transfer speed. Unfortunately it is not yet
  supported by 2.2.x kernels.

  There is a patch for 2.0.x and 2.2.x kernels availabe at
  http://www.kernel.org/pub/linux/kernel/people/hedrick, and support is
  included in the 2.3.x development kernel series at least as of 2.3.3.

  However to get far enough to patch or upgrade the kernel you'll have
  to pull the same dirty tricks as for the Ultra33 as in the section
  above, or else use a boot disk image provided by Promise
  <http://www.promise.com/latest/latedrivers.htm#linuxu66>


  5.3.  Artop ATP850UF


  This card is supported by the unified IDE code. Installation of Linux
  onto a system with one of these as the interface for the target disk
  may be similar to the workarounds for the Promise Ultra33.


  5.4.  Adding device files


  The tertiary and quaternary IDE interfaces (ide2 and ide3) use device
  files of the form /dev/hde* through /dev/hdh*. On older kernels these
  devices were not automatically created, so you may need to add them
  manually for things to work properly.

  This can be done easily if you have a current copy of the Linux kernel
  source installed; simply run /usr/src/linux/scripts/MAKEDEV.ide and it
  will create all relevant device files.


  6.  Onboard UDMA interfaces


  These are UDMAcapable drive interfaces built into motherboards. They
  use the standard IDE I/O ports and so are fully usable at the slower
  nonUDMA speeds on an unpatched 2.0.x kernel such as are used when
  installing Linux.  Thus they should not cause any difficulties during
  installation, and patching for UDMA speed is a welcome luxury instead
  of a necessary step. Some UDMA support is in the latest 2.0.x kernels
  I believe, and is built into current 2.2.x kernels for the Intel
  chipsets.


  6.1.  Intel FX, HX, VX, TX, LX, and BX


  Thanks again to Gadi for this info:

       Bus mastering DMA support for the Intel TX chipset is available in 2.0.31
       and above.


  In older kernels (such as Slackware 3.4's 2.0.30), the interface will
  be used in the slower EIDE mode.  In either case the interface will be
  automatically detected by the kernel and you should have no trouble
  using it.

  Full UDMA mode 2 support for these chipsets is included in 2.2.x
  kernels and the unified IDE patch; see ``Unified IDE''.


  6.2.  The VIA VP2 and Related Chipsets


  This interface also can be autodetected and used in EIDE mode by an
  unpatched kernel, but if you have one of these, you will want to grab
  a patch so you can get faster throughput and do away with annoying
  "unkown PCI device" messages.

  One is available at http://www.ipass.net/~prefect/; it is designed for
  the VIA VP2/97 chipset, found on FIC's PA-2007 and PA-2011
  motherboards, but may work on related chipsets.  It has been reported
  that it functions on the newer VIA VP3 chipset, your mileage may vary.

  Note that this patch only supports Bus Mastering mode, not full UDMA
  mode, but it's still better than plain-vanilla EIDE mode.  Follow the
  directions at the patch's site for enabling BMDMA mode.

  There is another patch that supports full UDMA mode at
  http://www.pyreneesweb.com/Udma/udma.html, designed for the VIA
  VT82C586B, and it ought to work on the VP2, VP3, VPX, P6 and AGP
  Apollo chipsets. Follow the directions for installation and UDMA
  enabling there, but it is recommended that you back up any data you
  want to keep, as there are potential problems with incompatible
  motherboards. But, if it does work, it should work without problems.

  Note that the VP1 chipset is not known to work with these patches, but
  is supported by the ``Unified IDE'' patch.


  6.3.  TX Pro and other ``Pro'' boards


  UDMA is not currently supported for the TX Pro motherboards. They are
  not the same as a TX mobo, and apparently misreport their DMA
  capabilities hence the problem. Someone is working on this I hear, so
  a patch may appear some time in the future but not yet.


  6.4.  HPT 366


  This chipset is on the popular Abit BP-6 motherboard and others, and
  provides UDMA mode 4 66MB/s support on two generals, generally in
  addition to two other mode 2 33MB/s channels. It is supported by the
  current ``unified IDE code'' but not in any current release kernels.
  Installation thus may require workarounds similar to the ``Promise
  Ultra33'' did on older 2.0.x kernels.

  7.  Unified IDE Patches


  The unified IDE patches provide support for many chipsets and offboard
  cards, and are available for 2.0.x, 2.2.x, and the 2.3.x development
  kernels. If your chipset isn't supported by a current stock kernel,
  you'll want to patch it with these.

  The unified IDE code is maintained by Andre Hedrick
  <mailto:andre@suse.com>, and patches are available at your local
  kernel archive mirror
  <http://www.kernel.org/pub/linux/kernel/people/hedrick>.

  UDMA support is provided for at least the following chipsets, and
  probably many more I don't know about:


    All Intel chipsets: FX, HX, VX, TX, LX

    All SiS chipsets (only SiS5598 tested, but this entire family of
     chipsets has the same bult-in 5513 interface device).

    VIA chipsets (only 82C586B tested, but again this family of
     chipsets has the same interface structure). Special diagnostics
     support is available for the VIA interfaces.

    Promise and Artop PCI UDMA interface cards support.

    Aladdin V (ALi15x3) chipset

    HPT343 board and HPT366 onboard chipset (caveat, see ``Abit BP-6'')

  It is also designed to be easy to extend to support other chipsets.

  Here are a few notes from Andre Balsa, the author of an earlier patch:

       Performance with IBM UDMA drives on a good motherboard approches the
       maximum head transfer rates: about 10 Mb/s (measured with hdparm -t -T).

       The Intel TX chipset has a single FIFO for hard disk data shared by
       its two IDE interfaces, so using 2 UDMA drives will not yield such a
       great improvement over a single UDMA drive.
       However, the SiS5598 has two completely separate interfaces, each with
       its own FIFO. Theoretically, one could approach 66Mb/s burt transfer
       rates on motherboards with the SiS5598 chip, using the md driver and
       data striping over two drives. The SiS5571 has the same interface
       architecture, I think. I don't have the VIA chipsets datasheets, so I
       can't say anything about those.

       The Linux IDE (U)DMA kernel driver by Mark Lord has a particularly
       low setup time (i.e. latency for data transfers). It is ideal for
       frequent, small data transfers (such as those in Linux news servers),
       and might be in some cases superior to its SCSI counterparts.

  8.  Activating and Deactivating UDMA


  Normally, a UDMA-aware kernel will automatically enable UDMA support
  for drives and interfaces that support it. In most cases that it
  doesn't, the kernel either doesn't know how to drive your IDE chipset
  (get yourself a patch, see ``above'') or doesn't believe it is safe to
  enable it (meaning you shouldn't!).

  However in some cases the drive is capable of UDMA but the BIOS drops
  the ball and doesn't report it properly, and forcing the issue can be
  useful.


  8.1.  Using kernel boot parameters


  On kernels 2.1.113 and up, you can enable DMA for both drives on a
  given IDE interface using the ideX=dma kernel parameter, where X is
  the number of the interface (the first is 0). This may not actually
  force UDMA though.

  Kernel boot parameters can be set using LILO, LOADLIN, or most Linux
  boot loaders. For more information see the Bootdisk HOWTO.

  8.2.  Using hdparm


  hdparm is a program used to tweak the parameters of hard drives under
  Linux. Among other things you can use it to enable or disable UDMA for
  a drive and test its sustained transfer rate.

  The current version of hdparm, is 3.6 as of this writing. Unpatched
  older versions will not properly report or set information on UDMA, so
  be sure to upgrade! You can obtain the source code for hdparm 3.6 at
  http://metalab.unc.edu/pub/Linux/system/hardware/hdparm-3.6.tar.gz.

  Compile and install it something like this:

       tar zxvf /tmp/download/hdparm-3.6.tar.gz
       cd hdparm-3.5
       make
       su root
       (type password when prompted)
       make install
       cp /usr/local/sbin/hdparm /sbin/hdparm
       exit

  To enable DMA for a hard drive: hdparm -d1 /dev/hda

  To disable DMA for a hard drive: hdparm -d0 /dev/hda

  To measure transfer rate of a hard drive: hdparm -Tt /dev/hda

  To see what options are enabled for a hard drive: hdparm /dev/hda

  To see more info on your drive than you wanted to know: (this will
  show which UDMA modes are supported/enabled) hdparm -i /dev/hda

  For more detailed info (such as how to choose which UDMA mode to use)
  read the man page (``man 8 hdparm'').


  9.  Problems

  9.1.  The UDMA Blacklist


  The following drives are ``blacklisted''. You should not use UDMA with
  these drives as it may cause corruption of data. To avoid this, the
  driver should automatically disable DMA for these drives.


    Western Digital WDC AC11000H, AC22100H, AC32500H, AC33100H,
     AC31600H - all versions

    Western Digital WDC AC32100H revision 24.09P07

    Western Digital WDC AC23200L revision 21.10N21


  9.2.  Are you overclocking?


  If you are, beware! Here is a quote from the old udma-generic
  documentation:

       DON'T OVERCLOCK the PCI bus. 37.5MHz is the maximum supported speed for
       the PCI bus. Some (supposedly compatible) UDMA drives will not even take
       37.5MHz, but should be OK at 33.3MHz.

       In any case, NEVER, NEVER set the PCI bus to 41.5MHz.

       The RECOMMENDED safe setting is 33MHz.

  9.3.  Is your BIOS current?


  Here is another clip from the udma-generic docs:

  The real work involved in setting up the chips for DMA transfers is done
  mostly by the BIOS of each motherboard. Now of course one hopes that the
  BIOS has been correctly programmed...

  For example, the ASUS SP-97V motherboard with its original BIOS (Rev. 1.03)
  would malfunction with the modified Linux driver in both DMA mode 2 and UDMA
  modes; it would work well using PIO mode 4, or under Windows 95 in all
  modes. I downloaded the latest BIOS image (Rev. 1.06) from the ASUS Web site
  and flashed the BIOS EPROM with the latest BIOS revision. It has been
  working perfectly ever since (at 66 MHz bus speeds).

  What this tells us is that the BIOS sets up the DMA controller with specific
  timing parameters (active pulse and recovery clock cycles). My initial BIOS
  revision probably had bad timings. Since the Windows 95 driver sets up those
  timings by itself (i.e. it does not depend on the BIOS to setup the hard
  disk controller timing parameters), I initially had problems only with the
  Linux driver, while Windows 95 worked well.

  So, let me state this again: this Linux (U)DMA driver depends on the BIOS for
  correct (U)DMA controller setup. If you have problems, first check that you
  have the latest BIOS revision for your specific motherboard.

  ...

  New BIOS revisions can be downloaded from your motherboard manufacturer's
  Web site. Flashing a new BIOS image is a simple operation but one must
  strictly follow the steps explained on the motherboard manual.

  Late Award BIOS revisions seem stable with respect to UDMA. Anything with a
  date of 1998 should be fine.

  9.4.  If you still can't get it to work!


  If nothing in this document proved helpful, or at least not helpful
  enough to get your machine working, your best bet is to write up a
  message that fully describes your difficulty, what type of UDMA
  interface you have, whether it is onboard or on a card, if your drive
  is actually UDMA or plain EIDE, exactly what configuration of drives
  you have, what version (distribution & kernel versions if possible) of
  Linux you are using, and anything else that sounds useful, and post it
  to the newsgroup comp.os.linux.hardware.  You will probably get some
  helpful suggestions soon.


  10.  If you have some information about UDMA stuff that's not in this
  mini-howto...


  Great! If you know something I don't, by all means send it to me
  (brion@pobox.com) and I will put it in this document and update it
  fairly soon.

  The Staying Updated mini-HOWTO
  Kjetil Bakkeskaug, Kjell Sundby and Stein Gjoen,
  sgjoen@nyx.net
  v0.22, 19 September 1999

  This document describes how to stay updated and abreast of the devel
  opment that takes place in the Linux world of development.  Although
  most of this text is Linux specific there is also a lot of general
  information on searching efficiently for specific information that can
  be useful for a wider audience.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Copyright
     1.2 Disclaimer
     1.3 News
     1.4 Credits

  2. Documentation Installed on Your Hard Disk

  3. Subscription

     3.1 Usenet News
     3.2 Mailing Lists
     3.3 Magazines

  4. Meetings

  5. Searching

  6. Conclusion

  ______________________________________________________________________

  1.  Introduction

  Development in the world of Linux takes place at an incredible speed
  and it can be difficult to keep abreast with the latest development.
  This HOWTO gives you a few guidelines on how to get the information
  you need, fast and efficiently. Most are quite familiar with using the
  World Wide Web (WWW) and Usenet News but as will be shown here there
  are many other methods that can be as good or even better.

  A Polish translation
  <http://www.ict.pwr.wroc.pl/jtz/Html/mini/Update.pl.html> is
  available.

  1.1.  Copyright

  This HOWTO is copyrighted 1998 Kjell Sundby, Kjetil Bakkeskaug and
  Stein Gjoen.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.
  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact the Linux HOWTO coordinator, at
  linux-howto@metalab.unc.edu via email.


  1.2.  Disclaimer

  Use the information in this document at your own risk. We disavow any
  potential liability for the contents of this document. Use of the
  concepts, examples, and/or other content of this document is entirely
  at your own risk.

  All copyrights are owned by their owners, unless specifically noted
  otherwise.  Use of a term in this document should not be regarded as
  affecting the validity of any trademark or service mark.

  Naming of particular products or brands should not be seen as
  endorsements.

  You are strongly recommended to take a backup of your system before
  major installation and backups at regular intervals.


  1.3.  News

  Added more information on the workings of mailing lists. Also proper
  indexing is now added.

  Renamed Dejanews to Deja and one chapter title. Also added note on
  translation now underway. Minor typos fixed.

  Added link to Polish translation


  1.4.  Credits

       Tomasz Sienicki | tsca <tsca@cryogen.com>

  2.  Documentation Installed on Your Hard Disk


  When you start out with a Linux installation you will normally get
  quite a bit of information along, not just the installation pamphlet
  but also substantial online help and information files as well as
  HOWTO files. This gives you a good starting point but after a while
  you will find yourself interested in knowing more, updating your
  system and basically staying informed. For simplicity this kind of
  information is here divided into several types, the type you subscribe
  to, information you search for as well as a bit on getting more
  specific help efficiently.

  Even if you don't get printed information of some kind with your Linux
  packages you will along with any self respecting distribution get a
  number of directories with documentation of some kind, ranging from
  the tersest README files for most software packages to the more in
  depth HOWTOs, of which this is one.

  Have a look in the document archive <file:///usr/doc> where most
  packages store their main documentation and README files etc.  Also
  you will here find the HOWTO archive <file:///usr/doc/HOWTO> of ready
  formatted HOWTOs and also the mini-HOWTO archive
  <file:///usr/doc/HOWTO/mini> of plain text documents.

  The kernel source <file:///usr/src/linux> is, of course, the ultimate
  documentation. In other words, use the source, Luke.  It should also
  be pointed out that the kernel comes not only with source code which
  is even commented (well, partially at least) but also an informative
  documentation directory <file:///usr/src/linux/Documentation>.  If you
  are about to ask any questions about the kernel you should read this
  first, it will save you and many others a lot of time and possibly
  embarrassment.

  The online documentation is excellent for browsing and searching but
  don't dismiss the printed version altogether; if you cannot even get
  the machine to boot, how are you going to be able to read that piece
  of information you need to get the system going again?

  3.  Subscription

  This basically means you set up a subscription of some sort and then
  follow the news as they come in. Be careful not to bite over more than
  you can chew, information overload is more than a buzzword. There is
  also rather more junk out there than is just annoying, it is a real
  problem these days. Read critically and be prepared to unsubscribe.

  There are two distinct medias for getting continuous updates: news and
  mailing lists, though sometimes news is gatewayed to mail and vice
  versa. In general news is a larger volume, larger noise source
  compared to mailing lists. Trying to follow too many newsgroups is
  like drinking from a fire hose.


  3.1.  Usenet News

  Getting access to Usenet News is outside the scope of this HOWTO,
  there are others that will help you with getting and reading News
  directly from a Linux system. If you have never used News before you
  should be careful to read the introductory information thoroughly. In
  spite of looking like an anarchy it does have its own distinct
  culture, follow a newsgroup for some time before posting yourself.
  Most importantly, look out for postings called Frequently Asked
  Questions or FAQ as they will show you the ropes for the group it is
  posted to, and most likely give you the answer to what you are looking
  for. Asking an FAQ will earn you severe negative credibility points as
  well as a place in many killfiles.

  FAQs should be posted regularly but if you cannot find it you can
  always find it at the main FAQ archive <ftp://rtfm.mit.edu> at MIT.


  These are also available as web pages <http://www.cis.ohio-
  state.edu/hypertext/faq/>.


  Still, there is a lot of noise, spam and junk in News and this is
  where killfiles come in. You will need a news reader with killfile
  capability and when properly set up it will scan through a newsgroup
  according to a search key of your own design and mark all flagged
  postings as already read so you don't have to be bothered by the
  noise. This improves the signal-to-noise ratio and lets you
  concentrate on the important parts. Similarly, if you make noise in
  News others will killfile you so if you later were to ask for help
  they will never see your post.

  Now to business: the following is a list of useful newsgroups:

    announcements <news:comp.os.linux.announce>

    answers <news:comp.os.linux.answers>

    development of applications <news:comp.os.linux.development.apps>

    development of the system <news:comp.os.linux.development.sys>

    hardware <news:comp.os.linux.hardware>

    misc <news:comp.os.linux.misc>

    networking <news:comp.os.linux.networking>

    setting up linux <news:comp.os.linux.setup>

    X11 on linux <news:comp.os.linux.x>

  Many national hierarchies also have Linux groups, such as the
  Norwegian <news:no.linux> Linux groups. If you cannot find your
  national or local group you might be able to use Deja
  <http://www.deja.com> to find the names for you.

  3.2.  Mailing Lists

  Unlike Usenet News a mailing list is centralised, someone sends a mail
  to the server and the server in return mails everyone that is
  subscribed to that particular list. These lists are generally low
  volume but also very low noise. Any breaches of the charter will be
  looked harshly upon. Equally seriously it will delay the development
  or the project that the list is dedicated to. When you subscribe you
  will normally get an introductory mail describing the charter, again
  you are strongly recommended to read this very carefully.

  There are many types of mail servers that can handle a list and you
  will need some information on how and where you can subscribe.

  One of the most common list servers is Majordomo which is what the
  list server at vger.rutgers.edu <mailto:majordomo@vger.rutgers.edu> is
  running. To learn how it works you send a mail message with the word
  help in the body. If you send it something it cannot parse you will
  get this help message anyway.  If you instead mail it the word lists
  you will be returned a list of all mailing lists it serves, and that
  can be a considerable number.

  Other mailing lists use several addresses, one where you send your
  requests such as subscribe and unsubscribe, and one where you send
  your contributions to the list which is usually also the address from
  which the list is also redistributed to you.  Again, sending it the
  message help or something it cannot parse will give you the help
  information.  An example: you send the word subscribe to the address
  corned-beef-requests@somelistserver.org and then you get mail from and
  contribute to the list address  corned-beef-list@somelistserver.org
  until you unsubscribe.

  A few tips before you start sending in to mailing lists:

    Do not send subscribe etc. to the list itself, only to the server
     address, otherwise you will look silly and you will annoy people.
     There can be several thousand subscribers to a list and if such
     errors were to pour in the noise would be too much.

    When you subscribe you will often get an introductory message sent
     to you automatically. Read it carefully as this should answer most
     of the initial questions.

    Do not gateway mailing lists to news without asking first as this
     can cause mailing loops as well as spam.

  As mentioned above, vger.rutgers.edu
  <mailto:majordomo@vger.rutgers.edu>.  is one of the main mailing list
  servers and here is an abbreviated index of what is available for the
  Linux community:


    linux-8086

    linux-admin

    linux-alpha

    linux-apps

    linux-arm

    linux-bbs

    linux-c-programming

    linux-config

    linux-console

    linux-diald

    linux-doc

    linux-fido

    linux-fsf

    linux-ftp

    linux-gcc

    linux-gcc-digest

    linux-hams           Amateur Radio and Linux discussions

    linux-hppa

    linux-ibcs2


    linux-ipx

    linux-isdn

    linux-japanese

    linux-kernel

    linux-kernel-announce

    linux-kernel-digest

    linux-kernel-patch

    linux-laptop

    linux-linuxss

    linux-lugnuts

    linux-mca

    linux-mips

    linux-msdos

    linux-msdos-devel

    linux-msdos-digest

    linux-net

    linux-new-lists

    linux-newbie

    linux-newbiew

    linux-nys

    linux-oasg

    linux-oi

    linux-opengl

    linux-pkg

    linux-ppp

    linux-pro

    linux-qag

    linux-raid

    linux-scsi

    linux-serial

    linux-seyon

    linux-smp

    linux-sound

    linux-standards

    linux-svgalib

    linux-tape

    linux-term

    linux-userfs

    linux-word

    linux-x11

    linux-x25

    sparclinux

    ultralinux

  There are of course a number of other lists on other server. As this
  is in a constant state of flux there is little point in naming all but
  the most important here. Instead you could check out a web page that
  maintains such a list of lists
  <http://summer.snu.ac.kr/~djshin/linux/mail-list/index.shtml> on
  various servers of interest to Linux users. It also offers an user
  friendly interface to subscribe or unsubscribe to the various lists
  directly.

  There is also a web page listing a huge number of lists concerning
  much more than Linux at list index
  <http://www.NeoSoft.com/internet/paml/>.

  3.3.  Magazines

  Many have been disappointed at the lack of information on Linux in the
  trade press. This is probably because certain commercial products
  would not stand up for any comparison and the advertisers would not
  stand it at all. Fortunately there is one Linux specific journal,
  called the Linux Journal. More information on subscription etc. can be
  found at the SSC <http://www.ssc.com> home page. A table of contents
  is usually also available online.

  Some popular e-zines are Linux Gazette <http://www.linuxgazette.com>.
  and Linux focus <http://www.linuxfocus.com> and probably a few others
  as new ones seem to pop quite frequently.  Check out LinuxHQ
  <http://www.linuxhq.com> for up to date information on current news
  services.

  New web pages with literally daily news on linux are popping up
  everywhere, many are quite professional in layout as well as in scope.
  One of the bigger ones is Freshmeat <http://freshmeat.net> which
  serves out news daily.

  For those who cannot afford the time to follow the net on an hourly
  basis yet need the important news quickly there is the Linux Weekly
  News <http://lwn.net>, which gives you a weekly update of important
  news, including securities alerts and also announcements of new and
  updated software.

  One the other extreme there are the those who practically live on the
  net and who might like to watch all sorts of news as they are reported
  on Slashdot <http://slashdot.org>, on a minute by minute basis using
  the ticker service or web interface.
  There are also a number of more hardware oriented web sites worth
  visiting, such as Toms Hardware <http://www.tomshardware.com>,
  Anandtech <http://www.Anandtech.com> and Storage review
  <http://www.storagereview.com>.

  4.  Meetings

  Linux has been created through a massive networked effort, mostly by
  heavy use of the Internet. Still, there is the chance of meeting real
  people, face to face, in Linux user groups (LUG) that are all over the
  world. Search the lists that are published regularly, there could be
  one near you.

  Conferences, install fests, creating new user groups and more is
  regularly announced on Usenet News announcements
  <news:comp.os.linux.announce>.  Such events are excellent venues for
  staying on top of events and also for getting help.

  5.  Searching

  There are many avenues open when searching for something particular.
  Remember you can also use the web search engines and that some, like

    Altavista <http://www.altavista.digital.com>

    Excite <http://www.excite.com>

    Hotbot <http://www.hotbot.com>

     can also search Usenet news.

  Also remember that Deja <http://www.deja.com> is a dedicated news
  searcher that keeps a news spool from early 1995 and onwards.

  Even though more and more things take place of the web these days, do
  not forget that there is a lot of information available on the various
  ftp servers around the world. Some web search engines also index ftp
  servers but the tool of choice is still the Archie servers, systems
  that regularly scan major ftp servers around the world and keep lists
  of files. These can be accessed in many ways, either by Archie clients
  like archie or the X11 version xarchie which should be available on
  any well maintained linux system. Failing that you can access archie
  servers using telnet to any of the servers listed


    Australia <telnet://archie.au>

    Austria <telnet://archie.univie.ac.at>

    Belgium <telnet://archie.belnet.be>

    Finland <telnet://archie.funet.fi>

    Germany <telnet://archie.th-darmstadt.de>

    Korea <telnet://archie.kornet.nm.kr>

    Italy <telnet://archie.unipi.it>

    Japan <telnet://archie.kuis.kyoto-u.ac.jp>


    Poland <telnet://archie.icm.edu.pl>

    Sweden <telnet://archie.luth.se>

    Spain <telnet://archie.rediris.es>

    United Kingdom <telnet://archie.doc.ic.ac.uk>

    United States <telnet://archie.bunyip.com>

    United States <telnet://archie.internic.net>


  Of course you should try to use the server closest to you, and to see
  the list of current server you can either start the Archie client with
  no arguments or, if telnetting, by querying the server. Online help is
  available. Unfortunately not all servers are synchronised, so you
  might have to search a few before finding what you are looking for.

  Recently a more user friendly ftp index server entered the net, the
  ftpsearch <http://ftpsearch.ntnu.no> engine, featuring many options
  and with a rather stark interface, in the best Unix tradition.

  Most of these offer help on efficient searching techniques, reading
  this can speed up your searches enormously. Investing a little time
  here will pay off in the long run.

  If you have trouble getting onto the Internet but have mail then you
  should have a look at the access via mail FAQ. Naturally you can get
  it over e-mail using the US, Canada and South America server
  <mailto:mail-server@rtfm.mit.edu> entering only this line in the BODY
  of the note:

  send usenet/news.answers/internet-services/access-via-email

  or Europe, Asia etc server <mailto:mailbase@mailbase.ac.uk> entering
  only this line in the BODY of the note:

  send lis-iis e-access-inet.txt

  or look through your news spool if you have one locally in
  news.answers newsgroup <news:news.answers>.

  Finally, you might wish to get more information from a person, say an
  author of a software package. usually you can find the e-mail address
  in the accompanying documentation which normally would be in the
  documentation subdirectory <file:///usr/doc/> but failing that and
  also if the given address is no longer valid you could find help in
  the FAQ for finding e-mail addresses
  <http://www.qucis.queensu.ca/FAQs/email/finding.html>.

  6.  Conclusion

  Finding information fast and efficiently is more of an art than a
  science and we still have not touched on the really difficult part:
  how do you determine the actual quality of the information? It is
  outside the scope of this HOWTO to tell you that but it is still
  something you should keep in mind. You should at least check the
  information is recent enough to be current to your problem.

  As a bare minimum you should ensure a minimum of validity of the
  documentation to avoid misleading or malicious advice. A surprising
  number of people suggests things like rm -rf /  as a solution for a
  given problem. Some see it as an obvious prank, the unaware can end up
  destroying his or her setup. Just to avoid such things you should
  check out a few things before rushing ahead:


    Is there a name attached to the document? If people are serious
     about what they write it should not be anonymous.

    Is it dated? Documents tend to evolve as the technology advances.
     Be sure you are reading the latest version. Internet search engines
     can help you here.

    Are there any followups? Be sure to check any followups or comments
     to what you read, otherwise you might miss a warning or a
     correction.

  If you keep this in mind you should not fall for too many of the scams
  that circulate on the net, from get well-cards for Craig Shergold,
  chain letters to the more recent problems of Trojans for Linux that
  tries to trick you into mailing off your password.

  There is a number of FAQs available that deals with more serious
  research method topics and you can also see a comprehensive on-line
  version <http://cn.net.au>.

  Quoted from someone's signature:

  Be alert! The world needs more lerts.

  Upgrading Your linux Distribution mini-HOWTO
  Greg Louis, glouis@dynamicro.on.ca
  v1.11, 6 June 1996

  Hints and tips on upgrading from one linux distribution to another.

  1.  IMPORTANT!!! Disclaimer and Copyright

  The procedure to which this document attempts to be a guide is
  inherently dangerous to the programs and data stored in your computer.
  You carry out any such procedure entirely at your own risk.  The steps
  described in this document worked for the author; there is no
  guarantee that they will work for you, nor that you can attempt to
  follow them without serious damage to your computer's programs and/or
  data.  You are entirely on your own in any use you may make of the
  information presented herein, and the author shall not be liable in
  any way whatsoever for any damage or inconvenience of any kind that
  you may suffer in so doing.

  This document is copyright 1996, Dynamicro Consulting Limited, and is
  released under the terms of the GNU General Public License.  This
  basically means that you may copy and modify it at will, but may not
  prevent others from doing likewise.

  Comments and questions may be directed to the author.  Especially
  welcome, for use in future revisions, are accounts of successful
  upgrades of complex systems.

  2.  Changes since version 1.1

    Added this history section

    Added Zoltn Hidvgi's suggestion re mtime and ctime.  Thanks,
     Zoltn!

    Added an Acknowledgements section

  3.  Introduction

  3.1.  How to slay and reincarnate your linux box!

  The purpose of this document is to offer tips to help you through the
  destruction and reinstallation of a linux system.  It's not a
  foolproof cookbook by any means; but I hope it will serve as some
  indication of what you need to think about, and of the order in which
  to do things.  It would have been a help to me, if someone else had
  written something like this before I did my first upgrade; so I hope
  it will be a help to you, if you have a linux machine to rebuild.

  Don't take it as gospel, though: your mileage will almost certainly
  vary.  Even the directory names in this document may be different from
  the ones you need to use; some people have /usr/home instead of /home,
  for example; others call it /u, and some (delicate shudder :) even put
  all their users directly under /usr itself!  I can't be specific about
  your system, so I've just used the names the way they are in mine.

  You'll also notice that I use Slackware distributions, and that I
  assume you've enough RAM and hard disk space to install linux kernel
  source and build your own kernel.  If your system is different, some
  of my recommendations won't apply; but I hope you'll still find the
  general outline to be of assistance in your rebuild project.

  3.2.  Why would anyone want to do that?

  Good question!  If it can possibly be avoided, don't do it!  (That's
  the single most important recommendation in this whole guide!!!)  But
  there are times when you may have to.

  For example, I installed a 4Gb hard disk and then found out that
  Slackware 2.0 vintage linux didn't know a hard disk could have more
  than 2Gb, and it got horribly confused.  So I had to upgrade to the
  then-current Slackware 2.3.  That upgrade was a gruelling experience,
  and it's part of the reason I'm writing these notes.  I did just about
  everything wrong, and only good luck and the fact that I had another
  running linux box beside me saved me from disaster.

  As another example, I found that I just couldn't succeed in building a
  working a.out linux kernel in the 1.3 series, using an out-of-the-box
  Slackware 2.3 installation (another machine, not the one I botched
  before).  I took the plunge, bought Slackware 3.0 on CDROM and
  converted to ELF.  This time the reinstallation went better, thanks in
  part to the previous bitter experience, and it served as the source of
  most of the ideas I'm offering you here.

  3.3.  Do you have to ``destroy and reinstall?''

  It's safer, oddly enough.  If you install over top of an existing
  linux system, chances are you'll have a mixture of old and new
  binaries, old and new configuration files, and generally a mess to try
  to administer.  Wiping the system clean, and then putting back only
  what you know you need, is a drastic but effective way to get a clean
  result.  (Of course we're talking about installing a whole new linux
  distribution here, not about upgrading one or two packages!  The best
  way to avoid having to do a full reinstallation is, precisely, to keep
  the individual bits -- especially gcc and its libraries, and binutils
  -- current.  If the stuff you use is reasonably up-to-date, and you
  can keep it so by bringing in, and if need be compiling, new code from
  time to time, then there's no need for a mass upgrade.)

  As Patrick Volkerding points out (he too recommends the wipe-it-clean
  procedure for upgrades), installing ELF on top of a running a.out
  system is a recipe for disaster; at least, if you know enough to try
  it, you needn't read this guide!

  Even without that complication, though, you're better to build from
  scratch.

  3.4.  How long will it take?

  Depends, of course, on how complex your system is.  But I figure that,
  for the successful upgrade (the other one? -- don't ask! :) I spent
  about ten hours making backups, six hours rebuilding the system to the
  point where I could enable logins, and another half day or thereabouts
  restoring the less-crucial stuff.  As time passes I keep discovering
  little things that still aren't exactly as I want them -- I fix these
  as they're encountered -- but in the main, twenty hours' work should
  suffice for a reasonably complex rebuilding job.  Maybe less if you're
  reinstalling from hard disk (I used CDROM) or more if you need to
  install from floppies.  Maybe less if you've got a fast Pentium, more
  if it's a 386.  You get the idea.

  So much for the introduction.  Here's how to set about it, once you've
  decided it must be done.  Arm yourself with fortitude and Jolt or
  whatever, and:

  4.  Write down everything you do.

  It's extremely valuable to have a record of what you've done in the
  process of preparing for, and carrying out, the changeover.
  Especially important is a list of the backups you'll be making in
  preparation for the destruction of your existing system.

  5.  Make a full backup of the existing system.

  Generally speaking, backups tend to be written on media that are
  sequentially accessed.  That being so, you won't want to use this
  complete backup for restoring significant numbers of files; it's got
  too many files on it that you don't want.  It's better to create small
  backups of individual segments that you know you're going to restore
  in their entirety.  I'll list a bunch of examples later.

  Why then should you start with a full backup?  Two basic reasons:
  first, in the event of a catastrophic failure installing the new
  system, you'll have a way to get back to the starting point with
  minimum pain.  Second, no matter how carefully you prepare for the new
  installation, there is a very large chance that one or two important
  files will be overlooked.  In that case the clumsiness of restoring
  those one or two files from the full backup set will be preferable to
  the inconvenience of doing without them.

  To save time and space, if you've still got the distribution medium
  for your old linux version, you might want to back up only those files
  the mtime or ctime of which is more recent than the date of the
  original installation.

  6.  Back up /etc and its subdirectories on one or more floppies.

  This is the other extreme: you won't be restoring these files (for the
  most part, anyway); you'll be comparing them with the new ones that
  get created during installation.  Why?  Because the new ones may have
  data that the old ones didn't, or may express the old data in new
  ways.  Changes in protocols, addition of new tools, or implementation
  of new features in existing tools may all dictate changes in the
  formats of the configuration files and startup scripts that the /etc
  tree contains, and you'll very likely have to edit your old data into
  these files so as to preserve the new formats and take advantage of
  the improvements.

  7.  Make separate backups of each group of files you want to preserve.

  This is the most variable part of the job, and all I can really do to
  help is to describe what I did in my system, in the hope that it will
  serve as a rough guide.  Basically, you want to look at every
  directory that contains any

    files that aren't part of your standard linux installation, or

    files that are actually newer than the ones you'll install when you
     do your new linux installation

  and separate out only those files that you want to carry over.

  (Another possible strategy is to back up all files with mtime or ctime
  more recent than the day of the previous linux installation, as
  mentioned above, and then restore from that.  If you do that, you have
  to take into account that the new linux distribution may contain
  versions of some files that are newer still than the ones you saved.)
  In my case, I ended up making a .tgz file on the backup medium for
  each of

    /usr/lib/rn

    /usr/lib/smail

    /usr/lib/trn (the rest of /usr/lib would be reinstalled)

    /usr/local/src

    /usr/local/bin

    /usr/local/lib

    /usr/local/lpfont

    /usr/local/man

    /usr/local/sbin

    /usr/local/thot (there were other /usr/local files I didn't need)

    /usr/openwin

    /usr/src/lilo-17 (because my new Slackware still had version 16)

    /usr/src/linux-1.2.13 (because I'd done some customizing)

    /usr/X11R6/lib/X11/app-defaults

    /usr/X11R6/lib/X11/initrc (the rest of Xfree86 was to be
     reinstalled)

    /var/named

    /var/openwin

    /var/texfonts

  My machine was relatively easy in that there were no spool files to
  worry about.  I don't run a news spool on this box, and since there
  are only two users, it was easiest just to get all the mail read
  before shutting down.  Otherwise, /var/spool directories would have
  had to be backed up at the last minute.  (And, of course, the news
  library and site directories!)

  8.  Prepare root and boot floppies for the new installation.

  Details of how to do this will be found in the installation guide for
  your new distribution.

  9.  Format floppies for the temporary kernel and the final build.

  You'll need two, one floppy for each.

  After all that's done, you're ready for the Big Moment.  The next step
  removes the system from production.

  10.  Inhibit logins and back up the /root and /home trees.

  This is the last thing to be done on the old system before you destroy
  it, so as to carry forward the most current user and root information.

  11.  Boot from the new installation's boot and root floppies.

  12.  Delete the linux partitions with fdisk and recreate them.

  The installation guide will explain how to set about doing this, which
  will destroy the old system.  From now on you're dependent on the
  quality of the backups you made in the earlier steps!  You have been
  warned!

  13.  Run the new linux installation.

  There are already several good documents describing how to do this, so
  I'm not going into any detail.  Continue from here when the new system
  can boot from its hard disk.

  Along the way, be sure to make a floppy that you can boot as well,
  since the kernel that the linux setup installs has to be replaced and
  accidents can happen during that process.  Be sure to install the
  development packages and the kernel source.

  14.  With the new linux system booted from the hard disk, edit
  /etc/fstab

  and add your swap partition.  Then run the command "swapon -a".  I
  don't know why, but Slackware setup doesn't offer to do this for you
  if your swap partition exists already.  Then, when you boot your new
  system and the rc.S script tries to turn swapping on, it can't find
  the partition in the fstab file and swapping doesn't get enabled.
  This step fixes it.

  15.  Restore configuration data to the /etc directory and subdirecto
  ries.

  As described above, you can't just copy all of the old files back into
  /etc and expect things to work properly afterward.  Some files you can
  do that with; for example, /etc/XF86Config (as long as you're using
  the same version of Xfree86 -- and the same video hardware -- in the
  new installation as you did in the old).  For the most part, though,
  it's best to use diff to compare the old and new files before doing
  any copying.  Watch out especially for significant changes in the
  files in /etc/rc.d, which may require you to reestablish your old
  configuration by hand editing, instead of by copying the old rc
  scripts from your backup.  Once it's all done, reboot.

  16.  Configure and rebuild the linux kernel.

  Even if you don't absolutely have to do this in order to get a kernel
  that supports your hardware, it's worth doing it in order to get a
  kernel that doesn't contain masses of drivers for stuff your machine
  doesn't have.  For details, see the Kernel HOWTO.  Install the rebuilt
  kernel on a floppy at first; once that boots ok, install on the hard
  disk, run lilo if you're using it, and reboot.

  17.  Restore the stuff from the backups you made earlier.

  Some of the binaries may need to be reinstalled from the source
  directories; I had to do that with lilo, for example, since my version
  was newer than the one on the Slackware installation and I hadn't
  bothered to save the binary from /sbin.  You'll want to check through
  your restored programs and confirm the existence and correctness of
  configuration files, libraries and so on.  In some cases, you may have
  to restore things in a specific order; you did make notes during
  backup, didn't you? ;-)

  18.  Review security.

  Check file permissions and directory permissions to be sure that
  access is neither too restricted nor too easy.  I find that Slackware
  tends to lean toward a more open environment than I like, so I go
  around changing 755's to 711's for binaries in the .../bin directories
  and stuff like that.  Or even 700's in the .../sbin ones.  Especial
  care is needed if you've carried over an ftp server; but then, if you
  were running an ftp server, you probably thought of that already. :)

  19.  Enable logins.

  You're up and running.  Over the next little while, there'll probably
  be details to clean up; but the bulk of the work is done.  Enjoy!

  20.  Sorry, but once again:

  USE THIS INFORMATION AT YOUR OWN RISK!

  (See the disclaimer at the start of this document.)

  21.  Acknowledgements

  Thanks for contributing to the content of this mini-HOWTO are
  gratefully tendered to Zoltn Hidvgi.

  Linux on Sony VAIO mini-HOWTO
  Hideki Saito hideki@chatlink.com
  v1.1, 16 September 1998

  This document explains installation of Linux on Sony VAIO computers.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Notes
     1.2 Notes about different systems
     1.3 Update History
     1.4 Disclaimer
     1.5 What this document all about?

  2. Hardware compatibilities issue

     2.1 Hardware that not compatible with Linux
     2.2 Partially compatible hardwares
        2.2.1 Soundcard
        2.2.2 Video Card

  3. How to install Linux?

  4. After all...

  5. Little Legal notes

  6. Special thanks

  ______________________________________________________________________

  1.  Introduction

  1.1.  Notes

  This document first appeared in "Hideki Saito's Homepage" at


       http://ryoohki.anime.net/~hideki/

  .  This version of HOWTO is rewritten for updated information. HTML
  version is found in http://ryoohki.anime.net/ hideki/VAIO+Linux.html.
  You may distribute this document freely. When you publish it, please
  drop me a note; I just want know how this documents are used :)


  1.2.  Notes about different systems

  I've recently received some mail stating that some of contents in this
  document is incorrect. It is because some reason, hardware installed
  on more recent systems are slightly different than older systems. I
  will start covering those information. But since of course, I don't
  have every system in here, I would like to ask Sony VAIO owners to
  tell me more information about it. This would help me a lot if you can
  put [VAIO Information] in the beginning of the subject, so I can take
  extra attention to it. Also, please include model number of the
  system. If it is notebook, please include that information in a
  content, or in a subject. I would like to apologize to ones that got
  confused by this document.  (Addition: 12/29/98)


  1.3.  Update History

  12/29/98 Added several updates


  1.4.  Disclaimer

  Also most of procedures in this document is tested, I will take no
  responsibilities for any problem caused by using any information in
  this document. As like in GPL, please try anything in your own risk. I
  am not native English writer, and you will find many mistakes in this
  document. Please excuse me on those. Any corrections and
  clarifications are welcome; please send those to hideki@chatlink.com.


  1.5.  What this document all about?

  In this HOWTO, I will go over how to use Linux under Sony VAIO
  computers. The VAIO computers are great, but was not very friendly to
  Linux.  But this isn't mean that you cannot use it, actually you can!
  Throughout this document, I will assume that you own either PCV 70 or
  90.  Since almost all VAIO models are similar in their architecture
  (although newer ones have larger disks, updated video card, more RAM,
  etc), many of contents in this document should apply to all VAIO
  models.

  2.  Hardware compatibilities issue


  2.1.  Hardware that not compatible with Linux

  Most of hardwares installed in the system are compatible under Linux.
  However there are exceptions of modem, USB Port and MPEG decoder.
  Please be aware that you cannot use modem, which should be problem for
  some of you. Modems installed in the VAIO is called DSVD modem, which
  is the variant of the "Winmodem."

  (Addition: 12/28/98) Newer model seems to have normal modem instead of
  Winmodem.


  2.2.  Partially compatible hardwares

  The soundcard and the Video card installed are partially compatible.


  2.2.1.  Soundcard

  Soundcard is compatible under Linux with supports of Microsoft Sound
  System + Sound Blaster, if you want to use MIDI under Linux, you need
  to compromise your sound input capabilities.  For this case, cancel
  out the Sound Blaster.  If you need MIDI, and sound input, you may
  want consider buying OSS/Linux, which you can use all of its
  capabilities under Linux.  The soundcard equipped with the VAIO is
  Yamaha OPL3SA, and OSS/Linux has full support to it.  It seems like
  that the wavetable synthesis mentioned in the specification is really
  the soft synthesizer, so you are not missing hardware capabilities on
  it. As the time I am writing this, there is the OSS/Free 3.8, which
  supports this soundcard under Yamaha OPL3-SA1 audio controller. Please
  note that this is not initially installed on 2.0.x. You will need to
  download from OSS site. 2.1.x comes with updated version of OSS/Free,
  but I haven't tested compatibility with it. If you see that it is
  working with this soundcard, please let me know.


  2.2.2.  Video Card

  Videocard is partially supported under Linux.  You will have no
  problem using it under Linux console mode.  If you wish to use it
  under X Window, get 3.3.1 or later XFree86, which has support to ATI
  Rage.  Other commercial X Window system should support this, too.
  However, 3D acceleration of this video card will not work under Linux,
  as there is no driver for this. (Update 12/29/98) For model number
  505, ALSA drivers on XFree86 V3.3.3 or later is compatible.


  3.  How to install Linux?

  Installing Linux on the system will not be big problem.  However, you
  need to aware that initially, there are one non-DOS partition on the
  system.  I have no idea what that partition is.  It is 400MB
  partition, and it is visible by running fdisk.  I simply deleted this
  partition to allocate it for Linux.  And I don't have any problem, so
  probably it must be something to do with software installation.
  (Update 12/29/98) This 400MB partition is only on older models, it
  really supporsed to be another 400MB DOS partition, but Sony made
  mistake on it.  Please refer to other instruction for general
  installation of Linux.  The VAIO has nice support that you can boot
  directly from CD-ROM, if CD-ROM is bootable.  Since the BIOS supports
  it, it is what you can use in some distribution.  This is nice,
  because you can perform floppyless installation.  Particularly, Redhat
  could boot from CD-ROM.  Other distribution like SUSE also claims that
  it can boot from CD-ROM.  But as I have not checked those yet, I
  cannot be sure on that. If that this way of booting does not work with
  yours, try checking boot option in the BIOS.  Kernel configuration
  shouldn't be big problem except for the part to setup soundcard.  But
  as I covered that issue earlier, I will not talk about it in this
  section.  The VAIO computer is equipped with APM BIOS, or Advanced
  Power Management BIOS, I personally don't recommend that you enable
  support to it under Linux.  I had problem when I enabled it. (Update
  12/29/98) I have received report that with 505, CD-ROM install is
  difficult and network install is much easier.


  4.  After all...

  Everything went well?  I hope it did.  Now your Sony VAIO computer is
  one of the best Linux workstation.  If you have any problem, I may
  have answer to your questions.  Please just send those to
  hideki@chatlink.com anytime.  I will try to answer those as soon as
  possible.


  5.  Little Legal notes

  VAIO is the trademark of Sony.  All other trademark appeared in this
  documents are belonged to their respective holders.  The copyright of
  this document is reserved by Hideki Saito.


  6.  Special thanks

  I would like to thank to following people, not in any particular
  order: Daniel Nunes. If you feel that your name should be on this
  section, please let me know by mail. (recentlly I lost big portion of
  my mail spool by accident, so it maybe the case)

  The VPN HOWTO
  Arpad Magosanyi <mag@bunuel.tii.matav.hu> v0.2,7 Aug1997
  v0.2, 7 August 1997

  1.  Changes


  The 'no controlling tty problem' -> -o 'BatchMode yes' by Zot O'Connor
  <zot@crl.com>

  warning about kernel 2.0.30 by mag

  2.  Blurb


  This is the Linux VPN howto, a collection of information on how to set
  up a Virtual Protected Network in Linux (and other unices in general).

  2.1.  Copyright


  This document is part of the Linux HOWTO project. The copyright notice
  is the following: Unless otherwise stated, Linux HOWTO documents are
  copyrighted by their respective authors. Linux HOWTO documents may be
  reproduced and distributed in whole or in part, in any medium physical
  or electronic, as long as this copyright notice is retained on all
  copies. Commercial redistribution is allowed and encouraged; however,
  the author would like to be notified of any such distributions. All
  translations, derivative works, or aggregate works incorporating any
  Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below. In short, we wish to
  promote dissemination of this information through as many channels as
  possible. However, we do wish to retain copyright on the HOWTO
  documents, and would like to be notified of any plans to redistribute
  the HOWTOs. If you have questions, please contact Tim Bynum, the Linux
  HOWTO coordinator, at linux-howto@sunsite.unc.edu via email.

  2.2.  Disclaimer


  As usual: the author not responsible for any damage. For the correct
  wording, see the relevant part of the GNU GPL 0.1.1

  2.3.  Disclaimer


  We are dealing with security: you are not safe if you haven't got good
  security policy, and other rather boring things.

  2.4.  Credits


  Thanks to all of who has written the tools used.

  Thanks to Zot O'Connor <zot@crl.com> for pointing out the "no
  controlling tty" problem, and it's solution.

  2.5.  State of this document


  This is very preliminary. You should have thorough knowledge of
  administrating IP, at least some knowledge of firewalls, ppp and ssh.
  You should know them anyway if you want to set up a VPN. I just
  decided to write down my experiences not to forget them. There are
  possibly some security holes indeed. To be fair I've tried it on hosts
  configured as routers not firewalls, saying: It's simple from that
  point.

  2.6.  Related documentations


    The Linux Firewall-HOWTO /usr/doc/HOWTO/Firewall-HOWTO

    The Linux PPP-HOWTO /usr/doc/HOWTO/PPP-HOWTO.gz

    The ssh documentations /usr/doc/ssh/*

    The Linux Network Admins' Guide

    NIST Computer Security Special Publications
     http://csrc.ncsl.nist.gov/nistpubs/

    Firewall list (majordomo@greatcircle.com)

  3.  Introduction


  As firewalls are in more and more widely use in internet and intranet
  security, the ability to do nice VPNs is important. Here are my
  experiences. Comments are welcome.

  3.1.  Naming conventions


  I will use the terms "master firewall" and "slave firewall", though
  making a VPN has nothing to do with client-server architecture. I
  simply refer to them as the active and passive participants of the
  connection's setup. The host which is starts the setup will be
  referred as the master, and the passive participant will be the slave.

  4.  Doing it


  4.1.  Planning


  Before you start to set up your system, you should know the networking
  details. I assume you have two firewalls protecting one intranet per
  firewall, and they are both connected to the internet. So now you
  should have two network interfaces (at least) per firewall. Take a
  sheet of paper, write down their IP addresses and network mask. You
  will need one more IP adresses per firewall for the VPN you want to do
  now. Those addresses should be outside of your existing subnets. I
  suggest using addresses from the "private" address ranges. They are
  the followings:

    10.0.0.0 - 10.255.255.255

    172.16.0.0 - 172.31.255.255

    192.168.0.0 - 192.168.255.255

  For the sake of example, here's a sample configuration: The two
  bastions are called fellini and polanski. They have one interface for
  the internet (-out), one for the intranet (-in), and one for the vpn
  (-vpn). The addresses and netmasks:

    fellini-out: 193.6.34.12 255.255.255.0

    fellini-in: 193.6.35.12 255.255.255.0

    fellini-vpn: 192.168.0.1 point-to-point

    polanski-out: 193.6.36.12 255.255.255.0

    polanski-in: 193.6.37.12 255.255.255.0

    polanski-vpn: 192.168.0.2 point-to-point

  So we have the plan.

  4.2.  Gathering the tools


  You will need a

    Linux firewall

    kernel

    very minimal configuration

    ipfwadm

    fwtk

    Tools for the VPN

    ssh

    pppd

    sudo

    pty-redir

  Current versions:

    kernel: 2.0.29 Use a stable kernel, and it must be newer than
     2.0.20, because the ping'o'death bug. At the time of writing 2.0.30
     is the last "stable" kernel, but it has some bugs. If you want to
     have the fast and cool networking code introduced in it, try a
     prepatch. the 3rd is working for me nicely.

    base system: I prefer Debian. YMMV. You absolutely don't want to
     use any big packages, and you never even tought of using sendmail,
     of course. You also definitely don't want to enable telnet, ftp,
     and the 'r' commands (as usual in case of any other unix hosts).

    ipfwadm: I've used 2.3.0

    fwtk: I've used 1.3

    ssh: >= 1.2.20. There are problems with the underlying protocol in
     the older versions.

    pppd: I've used 2.2.0f for the tests, but I'm not sure if is it
     secure, this is why I turned the setuid bit off, and used sudo to
     launch it.

    sudo: 1.5.2 the newest I am aware of

    pty-redir: It is written by me. Try
     ftp://ftp.vein.hu/ssa/contrib/mag/pty-redir-0.1.tar.gz. Its version
     number is 0.1 now. Tell me it there is any problem with it.
  4.3.  Compile and install


  Compile or otherwise install the gathered tools. Look at every one's
  documentation (and the firewall-howto) for details. Now we have the
  tools.

  4.4.  Configure the other subsystems


  Configure your firewall rules, etc. You need to enable ssh traffic
  between the two firewll hosts. It means a connection to port 22 on the
  slave from the master. Start sshd on the slave and verify if you can
  login. This step is untested, please tell me your results.

  4.5.  Set up the accounts for the VPN


  Create an account on the slave firewall use your favourite tool (e.g.
  vi, mkdir, chown, chmod) you might create an account on the master
  also, but I think you want to set up the connection at boot time, so
  your ordinary root account will do. Can anyone point out risks on
  using the root account on the master?

  4.6.  Generate an ssh key for your master account


  Use the ssh-keygen program. Set empty password for the private key if
  you want to do automatic setup of the VPN.

  4.7.  Set up automatic ssh login for the slave account


  Copy the newly generated public key in the slave account under
  .ssh/authorized_keys, and set up file permissions like the following:

  drwx------ 2 slave slave 1024 Apr 7 23:49 ./
  drwx------ 4 slave slave 1024 Apr 24 14:05 ../
  -rwx------ 1 slave slave 328 Apr 7 03:04 authorized_keys
  -rw------- 1 slave slave 660 Apr 14 15:23 known_hosts
  -rw------- 1 slave slave 512 Apr 21 10:03 random_seed

  The first row being ~slave/.ssh, and the second is ~slave.

  4.8.  Tighten ssh security on the bastions.


  It means the followings on my setup in sshd_conf:

  PermitRootLogin no
  IgnoreRhosts yes
  StrictModes yes
  QuietMode no
  FascistLogging yes
  KeepAlive yes
  RhostsAuthentication no
  RhostsRSAAuthentication no
  RSAAuthentication yes
  PasswordAuthentication no
  PermitEmptyPasswords no

  Password authentication is turned off, so login is only possible with
  authorized keys. (You've turned off telnet and the 'r' commands of
  course).

  4.9.  Enable execution of ppp and route for both accounts.


  As the master account is the root in my case, it has nothing to do.
  For the slave account, the following lines appear in /etc/sudoers:

  Cmnd_Alias VPN=/usr/sbin/pppd,/usr/local/vpn/route
  slave ALL=NOPASSWD: VPN

  As you can see, I am using some scripts to set up ppp and the routing
  tables on the slave host.

  4.10.  Do the scripting


  On the master host there is a full-blown init script I am using:

  #! /bin/sh
  # skeleton      example file to build /etc/init.d/ scripts.
  #               This file should be used to construct scripts for /etc/init.d.
  #
  #               Written by Miquel van Smoorenburg <miquels@cistron.nl>.
  #               Modified for Debian GNU/Linux
  #               by Ian Murdock <imurdock@gnu.ai.mit.edu>.
  #
  # Version:      @(#)skeleton  1.6  11-Nov-1996  miquels@cistron.nl
  #

  PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11/:
  PPPAPP=/home/slave/ppp
  ROUTEAPP=/home/slave/route
  PPPD=/usr/sbin/pppd
  NAME=VPN
  REDIR=/usr/local/bin/pty-redir
  SSH=/usr/bin/ssh
  MYPPPIP=192.168.0.1
  TARGETIP=192.168.0.2
  TARGETNET=193.6.37.0
  MYNET=193.6.35.0
  SLAVEWALL=polanski-out
  SLAVEACC=slave

  test -f $PPPD || exit 0

  set -e

  case "$1" in
    start)
          echo setting up vpn
          $REDIR $SSH -o 'Batchmode yes' -t -l $SLAVEACC $SLAVEWALL sudo $PPPAPP >/tmp/device
          TTYNAME=`cat /tmp/device`
  echo tty is $TTYNAME
          sleep 10s
          if [ ! -z $TTYNAME ]
          then
          $PPPD $TTYNAME ${MYPPPIP}:${TARGETIP}
          else
                  echo FAILED!
                  logger "vpn setup failed"
          fi
          sleep 5s
          route add -net $TARGETNET gw $TARGETIP
          $SSH -o 'Batchmode yes' -l $SLAVEACC $SLAVEWALL sudo $ROUTEAPP
      ;;
    stop)
          ps -ax | grep "ssh -t -l $SLAVEACC " | grep -v grep | awk '{print $1}' | xargs kill
      ;;
    *)
      # echo "Usage: /etc/init.d/$NAME {start|stop|reload}"
      echo "Usage: /etc/init.d/$NAME {start|stop}"
      exit 1
      ;;
  esac

  exit 0

  The slave uses one script for routing setup (/usr/local/vpn/route):

  #!/bin/bash
  /sbin/route add -net 193.6.35.0 gw 192.168.0.1

  and its .ppprc consists of the following:

  passive

  5.  Look at what's happening:


  The master logs in into the slave, starts pppd, and redirects this all
  thing into a local pty. It consists of the following steps:

    allocating a new pty

    sshing into the slave

    running pppd on the slave

    the master runs pppd in this local pty

    and sets up the routing table on the client.

  There are (not very tight) timing considerations involved, this is why
  that 'sleep 10s'.

  6.  Doing it by hand.


  6.1.  Logging in


  You've already tried if ssh works well, aren't you? If the slave
  refuses to log you in, read the logs. Perhaps there are problems with
  file permissions or the sshd setup.

  6.2.  Firing up ppp


  Log in into slave, and issue:

  sudo /usr/sbin/pppd passive

  You should see garbage coming at this point. If it works good, if not,
  there is some problem either with sudo, either with pppd. Look what
  the commands had said, and at the logs and at the /etc/ppp/options,
  and the .ppprc file.  If it works, write this 'passive' word into
  .ppprc, and try again. To get rid off the garbage and continue
  working, press enter,'~' and '^Z'.  You should have the master's
  prompt now, and kill %1. See the section about tuning if you want to
  know more of the escape character.

  6.3.  Together the two


  Well, then

  ssh -l slave polanski sudo /usr/sbin/pppd

  should work also, and deliver the garbage right into your face.

  6.4.  Pty redirecting


  Try to redirect this whole thing this time:

  /usr/local/bin/pty-redir /usr/bin/ssh -l slave polanski sudo /usr/sbin/pppd

  Nice long sentence isn't it?  You should use the full path into the
  ssh executable, as the pty-redir program allows only this form for
  security reasons.  Now you've got a device name from the program.
  Let's say, you've got /dev/ttyp0  You can use the ps command to look
  what has happened. Look for 'p0'

  6.5.  Is anything on the device?


  Try

  /usr/sbin/pppd /dev/ttyp0 local 192.168.0.1:192.168.0.2

  to establish the connection. Look at the output of the ifconfig
  command to see if the device has established, and use ping to check
  your virtual net.

  6.6.  Setting up the routes


  Set up the routes on the master host, and on the slave also. Now you
  should be able to ping one host in one intranet from other host in the
  other intranet.  Set up the additional firewalling rules. Now as you
  have the VPN, you can set up the rules concerning the connectivity of
  the two intranets.

  7.  Tuning


  7.1.  Configuration tuning


  As I said this HOWTO is mainly a quick memo on how I had set up a VPN.
  There are things in the configuration I didn't experiment yet. These
  things will go into their place when I try them, or anyone tells me
  "it works in the following way" The most important thing is that the
  connection ppp uses is not 8-bit yet. I believe it has something to do
  either with ssh configuration or the pty setup. In this configuration
  ssh uses the tilde (~) character as an escape character. It might stop
  or slow down the communication, as any newline-tilde sequence causes
  ssh to give a prompt. Ssh documentation said:  <On most systems,
  setting the escape character to ``none'' will also make the session
  transparent even if a tty is used.> The corresponding flag to ssh is
  '-e', and you can also set it in the configuration file.


  7.2.  Bandwith vs. cicles


  Creating anything virtual comes with utilization of real-world
  resources. A VPN eats up bandwidth and computing resources. The goal
  would be to get balance between the two. You can tune it with the '-C'
  switch or the 'CompressionLevel' option. You might try using another
  cipher, but I don't recommend it. Also note that the round-trip-time
  can be longer if you use better compression. Any experiments on it are
  welcome.

  8.  Vulnerability analisis


  I try to cover here the vulnerability issues arising from this
  particular setup and VPNs in general. Any comments are warmly welcome.

    sudo: Well, I'm excessively using sudo. I believe it's still safer
     than using setuid bits. It's still a backdraw of Linux that it
     hasn't got more fine-grained access control. Waiting for POSIX.6
     compatibility <http://www.xarius.demon.co.uk/software/posix6/>.
     What is worse, there are shell scripts which are getting called
     through sudo. Bad enough. Any idea out there?

    pppd: It runs suid root also. It can be configured by user's
     .ppprc. There might be some nice buffer overruns in it. The bottom
     line: secure your slave account as tightly as you can.

    ssh: Beware that ssh older than 1.2.20 has security holes. What is
     worse, we made a configuration such when the master account had
     been compromised, the slave account is also compromised, and wide
     open to attacks using the two sudoed programs. It is because I've
     choosen not to have password on the master's secret key to enable
     automatic setup of the VPN.

    firewall: With inproperly set firewall rules on one bastion, you
     open both of the intranets. I recommend using IP masquerading (as
     setting up incorrect routes is a bit less trivial), and doing hard
     control on the VPN interfaces.

  Visible bell mini-Howto
  Alessandro Rubini, rubini@linux.it
  v2.2, 11 November 1997

  This document explains how to use termcap to configure a visual bell
  on one's system and describes how to disable audible bells on demand.

  1.  Introduction

  The Linux console driver beeps the audible bell whenever a BEL char is
  output (ASCII code 7).  Though this is a right choice for the default
  behaviour, many users don't like their computer to beep. This mini-
  Howto is meant to explain how to tell applications not to output the
  BEL code. It also explain how to instruct the kernel and the X Window
  System to avoid beeping when a BEL is output. Note that most of this
  document refers to the text console, as configuring the X server is an
  easy catch-all for any user who works in a graphic environment.

  In my opinion the best way to face a fussy computer is fixing the
  hardware, and my own computer doesn't even carry a loudspeaker.

  2.  Spekearectomy

  Speakerectomy is by far the most brilliant solution to the audible
  bell problem. As its name implies, it consists in removing the beeps
  by removing the beeper. The operation is straightforward and you don't
  even need any anesthetic, but if you want there's room for refinement.

  PC's are usually equipped with a silly switch to lower CPU clock.  The
  switch is never used when you work in a multitasking environment, as
  you don't even need to slow the computer down to run games based on
  software loops. Unfortunately we can't use the switch to increase
  processor speed, but we can use it to enable/disable the loudspeaker.
  Sometimes the speaker is useful even if you enjoy a silent number
  cruncher, for example to signal the end of a lenghty compilation.  To
  modify the switch functionality, just detatch it from the main board
  and connect its wires in series with the loudspeaker.

  Owners of laptop boxes, unfortunately, don't have easy access to the
  loudspeaker, and neither they have a spare switch to turn to a
  different task.  The preferred solution for such users is configuring
  their software to avoid beeping, as described below.

  3.  Per-console Beep Configuration

  As of Linux 1.3.43, Martin Mares added the ability to configure the
  pitch and duration of the beep, by modifying console.c. Each console
  can be configured to feature a different duration and/or pitch of the
  bell sound; the task is accomplished by using escape sequences to the
  console device.  You can configure your own ~/.profile or ~/.login
  file to select a different beep sound associated to each console (or
  no beep at all, if needed).

  The escape sequences work as follow:

    ESC-[10;xx] selects the bell frequency in Hertz. The value should
     be in the range 21-32766, otherwise the result is undefined.  If
     the `xx' argument is missing, the default value (750Hz) will apply,
     as in `ESC-[10].

    ESC-[11;xx] selects the bell duration, in milli-seconds.  If you
     specify more than 2 seconds, the default applies (125ms). Once
     again, if the `xx' argument is missing (ESC-[11]) the default value
     will be used.
  To select, for example, a 50Hz pitch for one-second duration, you can
  "echo -e "\33[10;50]\33[11;1000]"" with bash (where "-e" means
  `understand Escape sequences'. If you use tcsh the same command spells
  "echo "\033[10;50]\033[11;1000]"".

  Although I don't know of any version of the setterm command that
  supports such configuration, a future version of the command might
  well support a command-line option to configure the bell sound.

  If you run Linux-1.3.43 or newer, you may be satisfied with the escape
  sequences and avoid reading further. If you run an older kernel, or if
  you want the visual bell, you'll enjoy the rest of this document.

  4.  Basic Concepts About Termcap and Terminfo

  The file /etc/termcap is a text file that lists the terminal
  capabilities. Several applications use the termcap information to move
  the cursor around the screen and do other screen-oriented tasks.
  tcsh, bash, vi and all the curses-based applications use the termcap
  database.

  The database describes several terminal types. The TERM environment
  variable selects the right behaviour at run-time, by naming a termcap
  entry to be used by applications.

  Within the database, each capability of the terminal appears as a two-
  letter code and a representation of the actual escape sequence used to
  get the desired effect.  The separator character between different
  capabilities is the colon (":").  As an example, the audible bell,
  with code "bl", usually appears as "bl=^G". This sequence tells that
  the bell sound is obtained by printing the control-G character, the
  ASCII BEL.

  In addition to the bl capability, the vb capability is recognized. It
  is used to represent the "visible bell". vb is usually missing in the
  linux entry of the termcap file.

  Most modern applications and libraries use the terminfo database
  instead of termcap. This database uses one file per terminal-type and
  lives in /usr/lib/terminfo; to avoid using huge directories, the
  description of each terminal type is stored in a directory named after
  its first letter; the linux entry, therefore, is
  /usr/lib/terminfo/l/linux. To build a terminfo entry you'll
  ``compile'' the termcap description; refer to the tic program and its
  manual page.

  5.  Defining a Visible Bell

  You can add the entry for the vb capability in your own termcap file,
  if it doesn't already define one.  Dennis Henriksen (duke@diku.dk)
  suggested to insert the following line in the termcap entry for linux
  (note that the entry is called console in old distributions):

       :vb=\E7\E[?5h\E[?5l\E[?5h\E[?5l\E[?5h\E[?5l\E[?5h\E[?5l\E8:\

  The trailing backslash is used to escape the newline in the database.
  Dennis' code does the following (his own words):

    Save the cursor position (uust a safety precaution).

    Change the background color several times between normal and
     reverse.

    Restore the cursor position.

  6.  Disabling the Audible Bell on the Text Console

  If you want to force the visible bell on your console you can use the
  "bl" entry in termcap and define it with the same string suggested for
  "vb" above.  This approach is handy if you don't want to customize
  each application (which is described below, anyway).  I use this
  option on all the machines where I can run Linux and I can't detach
  the speaker.

  7.  Telling Applications to Avoid Beeping

  This is an incomplete list of applications that can be instrued to use
  the vb entry for the current terminal type (using either the termcap
  information or the terminfo one):

    The X server: use the "xset b" command to select the bell's
     behaviour. The command takes three numeric arguments: volume, pitch
     and duration. "xset -b" disables the bell altogether. Configuring
     the X server affects all the applications running on the display.

    xterm: xterm can convert each bell to either a visible or audible
     signal. If you use the audible bell, the settings of "xset" will
     apply. The bell in xterm defualts to be audible, but you can use
     the "-vb" command line option and the "xterm*visualBell: true"
     resource to turn it to a visible flash. You can toggle
     visible/audible signaling at run-time by using the menu invoked by
     control--left-mouse-button.  If you run X you most likely won't
     need the following information.

    tcsh (6.04 and later): "set visiblebell".  The instruction can be
     placed in .cshrc or can be issued interactively. To reset the
     audible bell just "unset visiblebell". To disable any notification
     issue use "set nobeep" instead.

    bash (any bash, as fas as I know): put "set bell-style visible" in
     your ~/.bashrc. Possible bell-style's are also "none" or "audible".

    bash (with readline, as well as other readline based applications):
     put "set prefer-visible-bell" in ~/.inputrc.

    nvi and elvis: put "set flash" in ~/.exrc or tell ":set flash"
     interactively (note the colon).  To disable the visible bell use
     noflash in place of flash.

    emacs: put "(setq visible-bell t)" in your ~/.emacs.  It is
     disabled by "(setq visible-bell nil)".

    less: use "-q" on command line to use the visual bell, use "-Q" to
     disable any reporting. Default options can be put in your
     environment variable "LESS".

    screen: issue the CtrlA-CtrlG command. It changes the behaviour of
     all the virtual screens. Refer to the man page under
     "CUSTOMIZATION" for setting the default.

  8.  The Dark Side of the Problem

  The bad news is that not every application uses termcap or terminfo.
  Most small programs feature 'backslash-a' (alarm) characters in the C
  source code.  The "alarm" code becomes a literal ASCII BEL in the
  strings as stored in the executable binary.  Real application don't
  usually fall in this category, but be careful of C newcomers who give
  you their own programs. Students of computer science are the worst of
  all, granted.

  The only way to make these programs silent applications is
  spekearectomy, or using the escape sequences by Martin Mares.

  Wacom Graphire USB Mini-HOWTO
  Arnaud Claden

  01 June 2000

  This is the Wacom Graphire USB Mini-HOWTO. This document describes how
  to setup a Wacom Graphire USB tablet for use with Linux (console and
  X), starting with the kernel configuration to the application level.
  But information should be accurate for the Intuos USB tablet.

  ______________________________________________________________________

  Table of Contents


  1. Copyright

  2. Introduction

     2.1 New versions of this document
     2.2 Feedback and Corrections
     2.3 Acknowledgements
     2.4 Disclaimer

  3. Requirements

     3.1 Hardware
     3.2 Kernel
     3.3 Console Software
     3.4 XWindow
     3.5 Others

  4. Kernel and hard stuff

     4.1 Kernel configuration
     4.2 Kernel compilation
     4.3 Before rebooting
        4.3.1 FStab
        4.3.2 USB related devices
        4.3.3 Modules configuration
        4.3.4 What I did next
        4.3.5 Last but not least

  5. The Linux console

  6. XWindow

     6.1 Having 2 mouses on the same system
     6.2 Now on to the real stuff
     6.3 The new module

  7. Further documentation



  ______________________________________________________________________

  1.  Copyright

  Copyright (c) 2000 by Arnaud Claden <tiamat@club-internet.fr>

  This document describes the installation of Wacom tablets under linux.
  You may use, disseminate, and reproduce this document freely, provided
  you:


  1. Do not omit or alter this copyright notice.

  2. Do not omit or alter the version number and date.

  3. Do not omit or alter the document's pointer to the current WWW
     version.

  4. Clearly mark any condensed, altered or modified versions as such.

  2.  Introduction

  This document is a guide to getting your Wacom Graphire USB tablet to
  working with Linux. Beware, this is a quite difficult task, but this
  guide will guide you, step-by-step, through the process.

  This work is mainly derived from the Wacom Tablet HOWTO by Stephan
  Runkel, but brings some precisions about all the USB configuration
  that is absent from the original document. If you want more precision
  about general Wacom Tablets, please read Stephan Runkel's HOWTO.

  I have written this document because I've had many difficulties in
  setting up my brand new Graphire tablet with Linux, but now it works
  quite well on my Toshiba 4030CDT Laptop.

  2.1.  New versions of this document

  New version of this document will be made available at the following
  location :

  http://perso.club-internet.fr/tiamat/computer/howto/Wacom_USB-
  Mini_HOWTO.html

  2.2.  Feedback and Corrections

  Comments, corrections, and additions will greatly be appreciated. I
  can be contacted at:

  <tiamat@club-internet.fr>

  2.3.  Acknowledgements

  I wish to thank everyone that work on the USB part of the kernel, and
  special thanks go to Vojtech Pavlik for his work on the wacom module.

  Of course, I thank Stephan Runkel for his great Wacom Tablet HOWTO
  that helped me much in the configuration process.

  Special thanks also go to Frederic Lepied for his work on the
  xf86Wacom module.

  2.4.  Disclaimer

  The information in this document is correct to the best of my
  knowledge, but there's a always a chance I've made some mistakes, so
  don't follow everything too blindly, especially if it seems wrong.
  Nothing here should have a detrimental effect on your computer, but
  just in case I take no responsibility for any damages incurred from
  the use of the information contained herein.This document is not a
  kernel howto, so I'll take the assumption that you know how to
  download/install a new kernel, and how to configure/compile it.

  3.  Requirements



  3.1.  Hardware

  The main part is, of course, a computer with at least one USB port and
  a Wacom Graphire USB tablet.

  3.2.  Kernel

  I've used the latest development kernel for my installation :
  linux-2.3.99-pre6.  It's quite stable and has all the necessary
  features. You can also find some downports, which are patches for old
  2.2.x kernels. You can find all the infos on the backport at
  http://www.suse.cz/development/usb-backport

  3.3.  Console Software

  For the Linux console, the only program you need is gpm, available at
  ftp://ftp.prosa.it/pub/gpm

  3.4.  XWindow

  For having all the abilities of your tablet, you'll need to use
  XInput.  More specifically you'll need the xf86Wacom.so module (that
  is shipped with the most recent versions of XFRee86 starting from
  3.3.5). Alternately, you may need the xf86WacomUSB.so, which is a
  work-in-progress of adapting the original xf86Wacom.so to use the USB.
  I'll speak of it later in this document.

  3.5.  Others

  The applications supporting XInput are :


  1. The Gimp - a powerful image manipulation program in the style of
     Photoshop.  The 1.1.x instable development version includes XInput
     support as a standard feature. You can obtain Gimp from
     http://www.gimp.org

  2. gsumi - a simple B/W drawing program that supports drawing /
     erasing with pressure and tilt sensitivity. Get it from the gsumi
     web page: http://www.gtk.org/~otaylor/gsumi/

  3. xink (By Ralph Levien) - another rudimentary drawing program for X.
     xink is available from:
     ftp://kiwi.cs.berkeley.edu/pub/raph/xink.tar.gz

  4. RasMol - a molecular visualization program that supports a hardware
     dial box using XInput. look at
     http://www.umass.edu/microbio/rasmol/distrib/rasman.htm .

  5. xinput (by Frederic Lepied) - a very useful utility for configuring
     and testing XInput devices. xinput is available from:
     ftp://ftp.x.org/contrib/utilities/xinput-1.2.tar.gz

  4.  Kernel and hard stuff

  4.1.  Kernel configuration

  Like I said earlier, the options I'll give come from the 2.3.99pre6
  kernel.  If everything is not exactly the same, I think that taking a
  good guess should help ;)

  ** Reminder : [] stands for Yes/No options, and <> stands for
  Yes/No/Module **

  First of all, you have to enable the experimental code :

  Code Maturity level options --->

  [*] Prompt for development and/or incomplete code/drivers

  If you don't, you won't have access to some of the drivers.

  Then, move on to the USB section.

  USB support --->

  <*> Support for USB

  [*] USB verbose debug messages

  --- Miscellaneous USB options

  [*] Preliminary USB device filesystem

  With this option, you'll activate the new features of the /dev/usb/*
  (which, of course, you'll have to create : to be seen later)

  --- USB controllers

  <*> UHCI (Intel PIIX4, VIA, ...) support

  < > OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support

  You must choose one of these, and only one. So, if one doesn't work,
  then choose the other. Chances are that, if you use an x86 system,
  you'll take the UHCI driver.

  --- USB Devices

  < > USB Printer support

  < > USB Scanner support

  < > USB Audio support

  < > USB Modem (CDC ACM) support

  If you have one of these, feel free to activate the options

  <M> USB Serial Converter support

  This options must be activated for the Wacom tablet to work.

  [*] USB Generic Serial Driver

  [ ] USB Handspring Visor Driver

  [ ] USB ConnectTech WhiteHEAT Serial Driver (EXPERIMENTAL)

  [ ] USB FTDI Single Port Serial Driver (EXPERIMENTAL)

  [ ] USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)

  [ ] USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)

  [*] USB Serial Converter verbose debug

  If you want to have all the messages (which can be very helpful in the
  beginning). When satisfied with the functionning, you can deactivate
  it.


  < > USB Kodak DC-2xx Camera support

  < > USB Mustek MDC800 Digital Camera support (EXPERIMENTAL)

  < > USB Mass Storage support (EXPERIMENTAL)

  < > USS720 parport driver

  < > DABUSB driver

  < > PLUSB Prolific USB-Network driver (EXPERIMENTAL)

  < > USB ADMtek Pegasus-based device support (EXPERIMENTAL)

  < > USB Diamond Rio500 support (EXPERIMENTAL)

  --- USB HID

  The HID is kinda the interface between you and your devices, so you
  MUST activate it.

  <M> USB Human Interface Device (HID) support

  < > USB HIDBP Keyboard support

  < > USB HIDBP Mouse support

  <M> Wacom Intuos/Graphire tablet support

  There we go, the Wacom support should be activated (unless you read
  this just for fun ;) )

  < > Logitech WingMan Force joystick support

  < > Keyboard support

  <M> Mouse support

  To be activated to use the Wacom Intuos/Graphire mouse

  (1024) Horizontal screen resolution

  (768) Vertical screen resolution

  <M > Joystick support

  <M> Event interface support

  4.2.  Kernel compilation

  Now the easy stuff :

  When you exit the configuration do as they say

  make dep bzImage modules modules_install

  Type it just like this and the computer will run all the steps one
  after the other.

  Then copy the file bzImage to /boot, copy the System.map to /boot,
  edit your lilo.conf to point to your new kernel and type /sbin/lilo at
  the prompt.

  ** Of course all of this (kernel config, kernel compilation and lilo
  tweaking must be done as root) **

  4.3.  Before rebooting

  4.3.1.  FStab

  If you want to avoid error messages at the next reboot, you'll have to
  do the following :

  Edit the file /etc/fstab and add the following lines

  none          /proc/bus/usb          usbdevfs          defaults
  0          0

  This one is to activate the usb device filesystem

  none          /var/shm                    shm
  defaults          0          0

  This one is because of a change in the shared memory stuff in the
  kernel.

  4.3.2.  USB related devices

  Next, if you want to be able to use the USB :

  mkdir /dev/input

  mknod /dev/input/mouse0 c 13 32

  This will activate the mouse support

  mknod /dev/input/event0 c 13 64

  mknod /dev/input/event1 c 13 65

  mknod /dev/input/event2 c 13 66

  mknod /dev/input/event3 c 13 67

  These will activate the stylus : moves, pressure, button and eraser.

  4.3.3.  Modules configuration

  Edit the file /etc/modules.conf and add the following line :

  alias char-major-13 usbcore

  4.3.4.  What I did next

  Next I added in the /etc/rc.d/boot.local file (remember, I use a SuSE
  distribution, but you should fine an equivalent for RedHat in
  /etc/rc.d/init.d/boot.local or /etc/rc.d/init.d/rc.local)

  /sbin/modprobe wacom

  /sbin/modprobe mousedev

  /sbin/modprobe evdev

  Just to be sure the modules will load at boot time.

  4.3.5.  Last but not least

  Reboot ;)

  Check your boot messages (dmesg | less), and see if there are no
  errors related to USB. It may be because you've chosen UHCI and your
  system is an OHCI one.

  On my system, the following messages are shown :

  .....

  .....

  usb.c: registered new driver usbdevfs

  usb.c: registered new driver hub

  usb-uhci.c: $Revision: 1.9 $ time 17:54:28 May 8 2000

  usb-uhci.c: High bandwidth mode enabled

  usb-uhci.c: Intel USB controller: setting latency timer to 0

  usb-uhci.c: USB UHCI at I/O 0xffe0, IRQ 11

  usb-uhci.c: Detected 2 ports

  usb.c: new USB bus registered, assigned bus number 1

  usb.c: USB new device connect, assigned device number 1

  usb.c: kmalloc IF c3fcd2e0, numif 1

  usb.c: new device strings: Mfr=0, Product=2, SerialNumber=1

  usb.c: USB device number 1 default language ID 0x0

  Product: USB UHCI Root Hub

  SerialNumber: ffe0

  hub.c: USB hub found

  hub.c: 2 ports detected

  hub.c: ganged power switching

  hub.c: standalone hub

  hub.c: global over-current protection

  hub.c: power on to power good time: 2ms

  hub.c: hub controller current requirement: 0mA

  hub.c: port 1 is removable

  hub.c: port 2 is removable

  hub.c: local power source is good

  hub.c: no over-current condition exists

  hub.c: enabling power on all ports

  usb.c: hub driver claimed interface c3fcd2e0

  .....

  .....

  hub.c: port 1 connection change

  usb.c: USB new device connect, assigned device number 2

  usb.c: kmalloc IF c3fcd620, numif 1

  usb.c: skipped 1 class/vendor specific interface descriptors

  usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0

  usb.c: USB device number 2 default language ID 0x409

  Manufacturer: WACOM

  Product: ET-0405-UV1.1-1

  usb.c: unhandled interfaces on device

  usb.c: This device is not recognized by any installed USB driver.

  Length                             = 18

  DescriptorType          = 01

  USB version                 = 1.00

  Vendor:Product          = 056a:0010

  MaxPacketSize0       = 0

  NumConfigurations  =1

  Device Version           = 1.11

  Device Class:SubClass:Protocol = 00:00:00

  Per-interface classes

  Configuration:

  .....

  .....

  When the kernel says "This device is not recognized by any installed
  USB driver", it's because, at boot time, the wacom module is not yet
  loaded. But as you can see, the whole USB bus and interfaces are
  recognized. So if your system doesn't work and doesn't have such
  messages, try to check if you haven't forgotten an USB option
  (something I indicated to be put in the kernel and that you put as a
  module : if it's the case, in the /etc/rc.d/init.d/boot.local, put the
  necessary modprobe BEFORE the 3 lines I indicated, for example
  /sbin/modprobe usb-uhci).

  When the wacom module loads, here are the messages :

  .....

  .....

  usb.c: registered new driver wacom

  input0: Wacom Graphire on usb2

  usb.c: wacom driver claimed interface c3fcd620

  mouse0: PS/2 mouse device for input0

  mice: PS/2 mouse device common for all mice

  event0: Event device for input0

  .....

  .....

  Retry and check everything until you get all these messages (or
  corresponding ones).

  5.  The Linux console

  Now that you have your USB activated, it's just about time to try it
  all with gpm :

  If gpm is activated at boot time, you'll have to kill it : gpm -k

  Then try your Wacom tablet : gpm -tIMPS/2 -m /dev/input/mouse0

  Move your stylus, or your mouse, and TADA ... the cursor moves on the
  screen.

  6.  XWindow

  6.1.  Having 2 mouses on the same system

  Have you ever dreamed of having 2 mouses on your system ? If the
  answer is yes, do the following.

  Edit the file /etc/XF86Config

  The modules section should look like this

  Section "Module"

  Load "xf86Wacom.so"

  EndSection

  Then check the XInput section :

  Section "XInput"

  SubSection "Mouse"

  DeviceName "WacomTablet" --> or whatever you like

  Protocol "IMPS/2" --> I didn't manage to have imwheel recognize the
  wheel, but if you do, drop me an email

  Port "/dev/input/mouse0"

  Buttons 5

  ZAxisMapping 4 5

  AlwaysCore --> means that the Wacom mouse is always considered as the
  core pointer, ie if you move your normal mouse or the Wacom mouse (or
  stylus), it'll be just the same.

  EndSubSection


  EndSection

  And there you are, the Wacom mouse (or stylus) is now considered as a
  second mouse, but your normal one still works.

  6.2.  Now on to the real stuff

  Back to the XInput section, after the parameters for the mouse, here
  is the real Wacom stuff :

  SubSection "WacomStylus"

  Port "/dev/input/event0" --> the USB event device

  DeviceName "WacomStylus" --> or whatever you want to call it

  Mode Absolute --> ie the tablet surface is equivalent to the screen
  surface

  #Suppress 6

  DebugLevel 10 --> once everything works, set it to 0

  #TiltMode

  #HistorySize 200

  #AlwaysCore

  #KeepShape

  #TopX 20412 --> the 4 lines are used to fine-tune the coordinate to
  fit with the screen

  #TopY 14730

  #BottomX 0

  #BottomY 0

  EndSubSection

  SubSection "WacomEraser"

  DeviceName "/dev/input/event0"

  DeviceName "WacomEraser"

  Mode Absolute

  EndSubSection

  SubSection "WacomCursor"

  Port "/dev/input/event0"

  DeviceName "GraphireMouse"

  Mode Absolute

  EndSubSection

  6.3.  The new module

  The xf86Wacom.so is not specifically written for the USB tablets, and
  it's even not working correctly with these tablets. A new driver has
  been written by Matsumura Namihiko <po-jp@geocities.co.jp> has written
  one named xf86WacomUSB (available as source code at the same location
  than this Mini-HOWTO). However, to be able to compile it, you'll need
  the kernel source code and the source tree for XFree86 (I compiled it
  with success against XFree86 3.3.5, but it should compile with 3.3.6).

  This driver doesn't handle all the possibilities of the tablet, and
  crashes if you pass it the AlwaysCore parameter.

  To correct this, I'll keep in touch with Frederic Lepied for a
  modification of the original module to have it handle all of the
  possibilities of the tablet.

  **NEWS** At Frederic Lepied's site, you'll find a link to a new USB
  driver that works perfectly well, but exclusively with the possibility
  to have your tablet working as a mouse : ie either you use your tablet
  in The Gimp to draw, or you use it as an XFree mouse, but not both
  together. I'll investigate further, and update this document
  accordingly.

  7.  Further documentation

  For more information about Wacom tablets in general, try the great
  Wacom tablet HOWTO from Stephan Runkel <runkel@runkeledv.de> :
  http://www.linuxdoc.org/HOWTO/Wacom-Tablet-HOWTO.html

  About the xf86Wacom.so, check Frederic Lepied's <lepied@xfree86.org> :
  http://www.lepied.com/xfree86

  xf86WacomUSB.so, available at ftp://ftp.aros.org/pub



  WordPerfect Mini-howto
  Wade Hampton, whampton@staffnet.com
  v2.0, 13 August 1997

  This document discusses running WordPerfect on Linux, including a
  brief discussion on the WordPerfect 7.0 beta.  This is an update to
  the previous mini-howto that described notes on setting up WordPerfect
  6.0 for SCO UNIX (ODT) on Linux.  This document is not endorsed nor
  sponsored by Corel Corporation or SDC.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Overview
     1.2 History
     1.3 Future Revisions
     1.4 Feedback
     1.5 Copyright
     1.6 Standard Disclaimer

  2. What is WordPerfect

  3. WordPerfect 7.0 Beta

     3.1 Impressions of 7.0
     3.2 Getting WordPerfect 7.0
     3.3 Installation of 7.0
     3.4 Features
     3.5 Bugs in 7.0
     3.6 Pricing and Availability

  4. WordPerfect 6.0 (Caldera)

     4.1 Impressions of 6.0
     4.2 Getting WordPerfect 6.0
     4.3 Installation of 6.0
     4.4 Bugs in 6.0

  5. WordPerfect 5.1 and 6.0 (SCO release)

     5.1 Impressions of WP/SCO
     5.2 Getting WordPerfect WP/SCO
     5.3 Installation of WP/SCO
        5.3.1 Requirements
        5.3.2 Kernel Requirements
        5.3.3 Modules
        5.3.4 iBCS2 Emulator
        5.3.5 SCO Shared Libraries
        5.3.6 Loading WP60
        5.3.7 License Manager
        5.3.8 Starting WP60
        5.3.9 RC Scripts
        5.3.10 Changes to install
     5.4 Bugs in WP/SCO

  6. The Future

  7. For More Information

  ______________________________________________________________________

  1.  Introduction


  1.1.  Overview

  The purpose of this document is to discuss WordPerfect on Linux.
  Discussed are running WP for SCO, WP 6.0 from Caldera, and a
  discussion on the WordPerfect 7.0 beta.


  This document is an update to the previous mini-howto that described
  notes on setting up WordPerfect 6.0 for SCO UNIX (ODT) on Linux.


  This document is not endorsed nor sponsored by Corel Corporation or
  Software Development Corporation.


  1.2.  History

    Version 1.0 -- Description on how to use WordPerfect 5.1 and 6.0
     for SCO ODT 3.0 on Linux

    Version 2.0 -- Update and inclusion of information on Caldera's
     WordPerfect 6.0 distribution and the WordPerfect 7.0 beta.


  1.3.  Future Revisions

  New versions of this document will be periodically posted to
  comp.os.linux.announce, comp.answers, and news.answers. They will also
  be added to the various anonymous ftp sites who archive such
  information including sunsite.unc.edu:/pub/Linux/docs/HOWTO.

  In addition, you should be generally able to find this document on the
  Linux WorldWideWeb home page at http://sunsite.unc.edu/mdw/linux.html.


  1.4.  Feedback

  I welcome any feedback, positive or negative, regarding the content of
  this document via e-mail. Definitely contact me if you find errors or
  obvious omissions.

  I read, but do not necessarily respond to, all e-mail I receive.
  Requests for enhancements will be considered and acted upon based on
  my availability.

  Flames will quietly go to /dev/null so don't bother.


  1.5.  Copyright


  The WordPerfect mini-HOWTO is copyrighted (c)1995-1997 Wade Hampton.

  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author. Translations
  are similarly permitted without express permission if it includes a
  notice on who translated it.

  Short quotes may be used without prior consent by the author.
  Derivative work and partial distributions of the WordPerfect mini-
  HOWTO must be accompanied with either a verbatim copy of this file or
  a pointer to the verbatim copy.

  Commercial redistribution is allowed and encouraged; however, the
  author would appreciate being notified of any such distributions (as a
  courtesy).

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents.

  We further want that ALL information provided in the HOWTOS is
  disseminated.  If you have questions, please contact Tim Bynum, the
  Linux HOWTO coordinator, at linux-howto@sunsite.unc.edu.


  1.6.  Standard Disclaimer

  Of course, I disavow any potential liability for the contents of this
  document.  Use of the concepts, examples, and/or other content of this
  document is entirely at your own risk.

  This document is not endorsed nor sponsored by Corel Corporation or
  Software Development Corporation.


  2.  What is WordPerfect

  WordPerfect is a popular, fully-featured commercial word processor
  program that is available for multiple platforms including Linux.  It
  was originally written and sold by WordPerfect Corporation,
  subsequently purchased by Novell, then purchased about a year or so
  ago by Corel Corporation (Ottawa, Ontario, CA).  Corel has outsourced
  the development of WordPerfect for UNIX (including Linux) to SDC
  Corporation, a corporation including former WordPerfect developers,
  and specializing in development for UNIX and X windows.


  Until the release of Microsoft Word, WordPerfect was the most popular
  word processor for personal computers (it still claims to be by volume
  of product shipped, some reports indicate that more copies were sold
  than Microsoft Word during recent months). WordPerfect was originally
  written for DOS and later ported to the UNIX and Windows environments.
  Initial versions of WordPerfect for Windows were very late to market
  and tended to crash a lot, hence opening the floodGATES for Microsoft
  Word.  WordPerfect is still a better word processor than Word for
  large documents or documents that must be moved between Mac, UNIX, and
  Microsoft platforms.


  WordPerfect provides a WYSWYG environment for editing text documents.
  One of the best features is the ability to check your spelling as you
  type.  Included are grammar checker, spelling checker, graphics import
  and export, and the ability to edit HTML documents.  Documents created
  by WordPerfect on one platform may be read, edited, and printed on
  other platforms (I have generated a lot of documents using WP 6.0
  (Caldera's release) and distributed them to Windows 95 users using WP
  7.0 or 8.0).


  WordPerfect runs on the following platforms (release or beta
  versions):

    Linux 1.2.13 (WordPerfect 6.0 for Linux, sold by Caldera)

    Linux 2.0.X (WordPerfect 6.0 and WordPerfect 7.0)

    Microsoft DOS, Windows 3.1, Windows 95, Windows NT

    Macintosh

    HP-UX 10.01

    IBM AIX 4.1.4

    SCO OpenServer 5.0.0

    Sun SPARC Solaris 2.5

    SUN SPARC SunOS 4.1.x

    SUN X86 Solaris 2.5.1

    Digital UNIX 3.2 G Alpha

    SCO 3.2.4.2

  3.  WordPerfect 7.0 Beta


  3.1.  Impressions of 7.0

  I have been very impressed with the operation of WordPerfect 7.0 for
  Linux.  I only recently downloaded it and tried it.  It looks like WP
  7.0 for Windows.  The features appear to work properly.  I especially
  like the spell-as-you-go feature!

  The HTML publisher works a little better than that on WP 6.0, but
  still has some bugs.  Someone reported that WP 7.0 requires a lot of
  swap space (I have not tested it at this time).


  3.2.  Getting WordPerfect 7.0

  WP 7.0 is available as several LARGE tarballs from sdcorp's FTP site
  (or via the WWW).  I tried for two days to download the 26MB archive
  using ISDN but only was able to get part of the file.  I eventually
  had to use a commercial account with a T1 to the Internet to get the
  files.  It would be much easier to download if each tarball was split
  into several smaller files (1-2 MB in size).  Note, when you
  uncompress the tarballs, the result is a small number of medium sized
  files -- just what is needed.

  The current version that you can download is time limited to 15 days.
  During this time, you can pay them and they will give you a license
  for it.

     For WP 7.0 Beta:

          ftp://ftp.sdcorp.com/pub/linux_betab/wp7linuxbetab.tar.gz

                4887525 graphics_tar.gz
               17652138 manual_tar.gz
                 450535 wp60ms01_us.all
                 290443 wp60ps01_us.all
               26962514 wp7linuxbetab_tar.gz

  3.3.  Installation of 7.0

  To install, you must extract the tarballs, run the Runme program,
  answer some questions and then run xwp to start WP 7.0.  Note, you
  need 58 MB just for WP 7.0, prior to the manuals, graphics, etc.


  1. Extract the tarball into a temporary directory, need 31M

                   tar xvzf wp7linuxbetab_tar.gz
                     creates LINUX* files and Runme, the install program

  2. As root and with X windows running, run the Runme program and you
     get a series of screens to select the installation type.  Answer
     the questions:

                     ./Runme

                     License Screen:
                             Hit OK

                     Demo Screen:
                             Hit OK
                               Corel Corporation:  800-772-6735
                                 UNIX Support:     801-765-4019

                     Installation Directory:
                             Enter directory, e.g., /opt/wp7.0
                             Hit OK

                     Installation Size:
                             Full:      71-80M
                             Medium:    45-51M
                             Minimal:   37-41M

                     Existing Application:
                             If you have WP 6.0 (Caldera installs in
                             /opt/wp6.0 by default), you can keep your
                             settings for terminal drivers, printer drivers
                             and printer ports.  Recommended.

                             Enter directory (if present)
                             Hit OK

                     Edit /etc/magic?
                             Will add WP files to /etc/magic.  Will backup
                               /etc/magic as /etc/magic.bak
                             Select YES or NO
                             Hit OK

                     Selection of languages to Install
                             Only have English, it is selected
                             Hit OK

                     Select print divers:
                             Select your printers, may select more than one.
                             Hit OK

                     Assign Printer Drivers to Destinations:
                             Click on a printer
                             Click on the destination (name from /etc/printcap)
                             Hit OK
                             Repeat for each printer you selected in previous step.

                             Hit OK

                     Installation Review List:
                             Allows you to go back to any screen and make changes.
                             Select screen to make changes, or Hit OK to continue
                             Hit OK

                     Graphicsl Corel WordPerfect(UNIX) installation screen
                             includes progress bar

                     Readme Review screen:
                             Allows you to read any review notes....

                             Select item and View to view it, e.g., license

                             Note if you entered a license, you need to add the
                             license manager startup stuff to /etc/rc.d/rc.local!

                             Select Done when finished

  3. Run xwp:

                     /opt/wp7.0/wpbin/xwp& (or wherever you installed it)

  Note, I have WP 6.0 from Caldera, the first time I started, I got a
  prompt to load defaults from 6.0.  I selected YES and WP loaded the
  defaults and exited.  I then restarted xwp and my defaults, including
  the last files I edited with WP 6.0 were used!

  3.4.  Features


    WordPerfect word processor

    Internet publisher

    QuickCorrect - fix your typos while typing

    Spell-As-You-Go - spell checking while typing

    File compatibility with DOS, UNIX, and other WordPerfect versions
     on other platforms


  3.5.  Bugs in 7.0


    HTML export of a WP document with headers and footers sometimes
     leaves the bottom of the document either centered or bold.

    HTML export of a WP document with a table of contents does not
     generate cross references.

    HTML export messes up the table of contents and if sections were
     outlined, they become HTML list items and no longer match the TOC.

    Installation of the manual failed.  I have not had time to try to
     fix this problem.

    Someone reported a problem converting WPG graphics to JPG.

    WP 7.0 can not read files from Office97 (this has been a major pain
     for me as I have received several such files from others and I do
     not have Office97).

    Someone reported a possible problem with getting printing to work
     (I had no problems at all).

    Upon starting xwp, I received a message that some backup files
     existed.  Upon clicking on the first backup file, XWP dumped core.


  3.6.  Pricing and Availability

  Upgrade pricing expected to be $149.99 (US) and retail pricing
  $199.99.


  4.  WordPerfect 6.0 (Caldera)

  Caldera sells both a WordPerfect and Motif Bundle ($130 US) and the
  Caldera Internet Office Suite ($219 US).  Both include WordPerfect 6.0
  for Linux.

  Overall, WP 6.0 has been good to me.  I have generated 20-30 large
  documents and numerous small ones, probably 1000+ pages if I printed
  them all out.  The only problem that I have is that I use WP Times
  font under Linux and it is not compatible with the WP True Type Times
  font under Windows.


  4.1.  Impressions of 6.0

  The author has been using WordPerfect for Linux on Caldera Network
  Desktop (CND) for the past year.  The system is a P6/200, 64M RAM,
  SCSI, CND 1.0 with RiskyHack patches to the Linux 2.0.30 kernel,
  updated RPM, and many, many RPMS from Redhat and Caldera's WWW sites.

  4.2.  Getting WordPerfect 6.0

  Visit Caldera's WWW site at http://www.caldera.com
  <http://www.caldera.com>

  4.3.  Installation of 6.0

  Installation was easy. I just followed the directions provided....

  I did have to add wp to my fvwm menu (I am using FVWM95 on CND 1.0
  with lots of patches) and to looking glass's menus.

  My platform is a P6/200, 64M RAM, Caldera CND 1.0, RiskyHacks to libc
  5.4.4, kernel 2.0.30 (Joliet and FAT32 patches), dual SCSI, CD-R, etc.
  WP uses 74 MB of disk space.


  4.4.  Bugs in 6.0


    Export to HTML has several bugs with complex documents requiring
     some reformatting.

    Occasional crashes (very rare).

    Occasionally WP loops where it uses all memory and runs out of swap
     space, then crashes.

    Some fonts are different between Windows and UNIX versions.

    It has been reported to me that some WP macros for UNIX versions
     are different than those for Windows versions.

  5.  WordPerfect 5.1 and 6.0 (SCO release)

  I started using WP 5.1 for SCO (which was statically linked) since
  January, 1995. In the Spring, 1995, I obtained a copy of WP 6.0 for
  SCO (dynamic linked) and was able to install it with some pain. I
  subsequently have had some problems with the license manager. I have
  it running under 1.2.8.
  This section is mainly from the original WordPerfect mini-howto.  It
  has not been used in a long time.  Note, the more recent versions of
  WP for SCO included both the dynamic and static linked versions, and
  hence did NOT require SCO's shared libraries.

  This is mainly for background information!  If you really want WP for
  Linux, get the new WP 7.0!


  5.1.  Impressions of WP/SCO

  WP for SCO seemed to work fine (once the installation problems were
  overcome).  I used this distribution for about 6-12 months until I
  received a copy of WP 6.0 for Linux (Caldera) and CND 1.0.

  5.2.  Getting WordPerfect WP/SCO

  Contact SCO or visit their WWW page at http://www.sco.com
  <http://www.sco.com>

  5.3.  Installation of WP/SCO

  5.3.1.  Requirements

    Linux 1.1.x to 1.2.x

    modules (dynamic module loading software)

    iBCS2 (Intel BCS2 and ELF loader module)

    SCO dynamic libs (if required)

    Domainname should be setup

    Hostname should be setup and be less than 8 characters (localhost
     is 9)


  5.3.2.  Kernel Requirements

  The kernel should be setup for module support and ELF support. If you
  have already done this, skip this step, else, do the following as
  root:


    Load kernel in /usr/src/linux.xxx] and make sure that the symbolic
     link to the /usr/include/linux and /usr/include/asm directories are
     setup (see /usr/src/linux/README).

    Build module support and install it (see below)

    Build iBCS2 module and install it (see below)

    Build kernel with module and ELF support (answer Y to BINFMTELF and
     MODVERSIONS)

    Reboot on new kernel

    Note: you have to build the module support file "genksyms" PRIOR to
     making your new kernel (telling the kernel to export symbols:
     CONFIGMODVERSIONS=y).


  5.3.3.  Modules


  Loadable module support is required for iBCS2 and hence to run WP 6.0.
  Get the latest from the ftp sites, build it, and install it. If you
  have already setup your system for loadable modules, skip this step.
  Loadable module support (/sbin/insmod, /sbin/rmmod, /sbin/lsmod) is
  required. With recent kernels, genksyms is also required.


    File: modules-1.1.87.tar.gz (or latest)

    Put tar file in /usr/src/modules and build module support

    Read the README in /usr/src/modules (or wherever you put it)

    Cd to /usr/src/modules/genksyms and make genksysms, install it in
     /usr/local/bin (or /sbin)


  5.3.4.  iBCS2 Emulator

  The iBCS2 emulator allows you to run SCO binaries such as WordPerfect
  6.0. Get the latest from the ftp sites, build it, and install it.


    Build and install in /usr/lib/modules

    Read the HINTS file (/usr/src/ibcs/Doc/HINTS)

    Make sure that iBCS2 sets up /dev/XOR, if not, create a symbolic
     link from /dev/null to /dev/XOR (cd /dev; ln -s /dev/null /dev/XOR)

  The interfaces to some subsystems occur at the device layer and thus
  you need to create some device files in order to use them:

          * /dev/socksys and /dev/nfsd - interface for SVr3 STREAMS based
            TCP/IP applications

            # mknod /dev/socksys c 30 0
            # ln -s /dev/socksys /dev/nfsd

          [WARNING:  the below may already be setup as /dev/inet,
           /dev/arp, etc., they may have other major/minor numbers,
           if so, skip this step]

          * /dev/inet/{arp,icmp,ip,rip,tcp,udp} - more network hooks

            # mknod /dev/inet/arp c 30 2
            # mknod /dev/inet/icmp c 30 2
            # mknod /dev/inet/ip c 30 2
            # mknod /dev/inet/rip c 30 2
            # mknod /dev/inet/tcp c 30 2
            # mknod /dev/inet/udp c 30 2

          [THIS IS REQUIRED AND WILL USUALLY HAVE TO BE DONE MANUALLY!]
          * /dev/X0R - server side of SVR3 local X interface
            (see comments in Doc/Local-X)

            # ln -s /dev/null /dev/X0R

          * /dev/spx - client side of SVR3 local X interface
            (see comments in Doc/Local-X)

            # mknod /dev/spx c 30 1

  5.3.5.  SCO Shared Libraries


  DO NOT VIOLATE SCO's COPYRIGHTS! You should get a copy of SCO's shared
  libraries and install them in /shlib. As root:


    cd /; mkdev /shlib; chmod 755 /shlib

    if required, make a temporary directory and set TMPDIR to it
     (export TMPDIR=/mytmpdir)

    Copy the following SCO shared libraries from the SCO machine to
     Linux and put in /shlib:

              /shlib/libX11R5_s
              /shlib/libXtXm*

  5.3.6.  Loading WP60


  Make sure that you have LOTS of space in your /tmp directory. If you
  do not have lots of space, make a tmp directory and set the
  environment variable TMPDIR to it.  As root first try the following:


    Mount the CD (e.g., to /cdrom)

    cd to the CDROM and run the ./install script

  If you get the following error you may not have enough space in your
  /tmp directory, make a new tmp directory and set the environment
  variable TMPDIR (see above):


    ERROR:  not enough space in /tmp, or this is an unsupported machine.

  If all else fails, you may have to do it manually per these notes:


    get iBCS2 running

    copy the $WPDIR/cdrom/install.wp to $WPDIR and edit it I changed it
     so I could create /tmp/WpTmP on an NFS server (did not have the
     space locally). I then ran the program and made changes until I got
     it to startup.]

    change to TMPDIR and run: ifiles/cdlink.sco -r
     /usr/local/wp60/cdrom This builds links with the proper names but
     the permissions are not set properly.

    make a temp directory on the server and copy all files to it:

             cp -r  WpTmP/wp60/SCO/* wp60

    change to the temp wp60 directory and changed permissions. cd wp60;
     chmod 555 wpinstall install/*

    run the wpinstall program and answered the questions.

    Because I still have the flexlm license manager for WP51 on the
     system, I had to manually run wplicense -e and create a new
     license.dat.

    Start WP60.


  5.3.7.  License Manager

  WordPerfect uses a license manager (see the manuals). This is a tricky
  beast that sometimes does not work properly under Linux (I have had it
  fail, done something else then I was able to start it). If you have
  problems call WordPerfect and they can assist you. Please RTFM the
  documentation section on the license manager.


  To start the license manager, as root:


          # cd $WPDIR/shbin10
          # ./wplicense -s

  5.3.8.  Starting WP60


    start iBCS2

    start the license manager

    setup your DISPLAY environment variable (e.g., export
     DISPLAY=gator:0)

    run xwp ($WPDIR/wpbin/xwp filename.wpf &)

  If you get the errors:


    /dev/XOR: No such file or directory
    Error: Can't open display: :0.0

  You need to set up your DISPLAY environment variable (per above) and
  possibly setup the link to the device /dev/XOR (cd /dev; ln -s
  /dev/null /dev/XOR).

  Note if WP "steals" the colors from your X server (a problem if the
  depth is only 256 colors), disable the display of the graphics banner
  page by doing the following:

    Start XWP

    From the control window, click on Preferences

    from the Preferences window, select ENVIRONMENT

    From the ENVIRONMENT window, turn off the checkbox for "Graphical
     Banner and Startup Screen"


  5.3.9.  RC Scripts

  You will need to add a line to your /etc/rc.d/rc.local script (or
  similar) to start iBCS2 and the WP license manager (if desired).


          # /sbin/insmod /usr/lib/modules/iBCS &
          # $WPDIR/shbin10/wplicense -s &

  5.3.10.  Changes to install

  This was extracted from my original notes and includes changes to
  install.wp that are reported to work:

  The install.wp on the CDROM did not work out of the box. I had to
  modify it to get it to work by moving all files to a temporary
  directory and changing this install script.  The changes are:

  48c48,49
  <       mkdir $LNK_DIR 2> /dev/null
  ---
  > echo making LNK_DIR=$LNK_DIR
  >       mkdir $LNK_DIR
  51c52
  <
  ---
  > echo removing /tmp/TMPTMP
  53a55,57
  > echo /tmp/TMPTMP=
  > cat /tmp/TMPTMP
  > echo /tmp/TMPTMP -- to here
  62,63c66,83
  <       for i in $myfiles
  <       do
  ---
  > echo MYFILES=$myfiles  THISDIR=$thisdir
  > ls $myfiles
  > echo making LNK_DIR=$LNK_DIR/ifiles
  > mkdir $LNK_DIR/ifiles
  > chmod 777 $LNK_DIR/ifiles
  > cp $thisdir/ifiles/* $LNK_DIR/ifiles
  > chmod 777 $LNK_DIR/ifiles/*
  > ls -l $LNK_DIR/ifiles
  >
  > # echo making links....
  > # $LNK_DIR/ifiles/cdlink.sco -r $thisdir
  > # echo links should be done...
  > # exit
  >
  >
  > #     for i in $myfiles
  >         i=$thisdir/ifiles/cdlink.sco
  > #     do
  65a86,87
  > echo /tmp/TMP=
  > cat /tmp/TMP
  73c95
  <                       rm -f /tmp/TMPTMP
  ---
  >               rm -f /tmp/TMPTMP
  77c99
  <       done
  ---
  > #     done
  368a391,394
  > echo THISDIR=$thisdir
  > thisdir=/usr/local/wp60/cdrom
  > echo THISDIR=$thisdir
  >
  469a496,498
  > echo INIT DONE, THISDIR=$thisdir
  > ls $thisdir/ifiles/cdinst.*
  >
  493a523,526
  >
  > echo RUN_ME=$RUN_ME
  > RUN_ME=$thisdir/ifiles/cdinst.sco
  > echo RUN_ME=$RUN_ME

  5.4.  Bugs in WP/SCO

  I did not keep a detailed list of bugs for WP/SCO, however:

    The initial version had install problems.

    The initial version used SCO shared libraries, hence required a
     copy of them on Linux.


  6.  The Future

  Sometime in August, WordPerfect 7.0 for Linux should ship.  It should
  be available from SDC <http://www.sdcorp.com/wpunix.html> for about
  $149.99 for a competitive upgrade or $199.99 retail.


  Corel is working on porting their entire office suite to Java and
  releasing it as Corel Office for Java(TM).  This currently is in Beta
  and works on Linux (I tried the first beta -- very slow).  Check out
  http://officeforjava.corel.com/about.htm
  <http://officeforjava.corel.com/about.htm> for more information.  This
  promises to be something to watch.


  SDC is currently working on WPLinux 8 with an expected beta mid 1998
  and a release following by about 5 months.  SDC has indicated that if
  there is not sufficient demand for WP for Linux, they will probably
  not ship it (they already stopped shipping for SGI and UNIXWare) -- so
  if you like it, buy it!


  7.  For More Information

  Software Development Corporation is the developer of WordPerfect for
  UNIX.  Corel has outsourced the development of WordPerfect for UNIX to
  SDC.  I have been in touch with the SDC product manager for WP for
  LINUX and he has been very helpful (I have provided him with a review
  copy of this document).


          Software Development Corporation
          512 East 1860 South
          Provo, Utah 84606 USA

          Phone: (801) 370-9600
          Fax: (801) 370-9696
          Email: info@sdcorp.com

  WWW:    http://www.sdcorp.com/wpunix.html
  <http://www.sdcorp.com/wpunix.html>

  Corel Corporation is the new owner of WordPerfect, having purchased it
  from Novell.  They develop and market excellent products such as Corel
  Draw and WordPerfect.


          Corel Corporation
          Ottawa, Ontario, CA

          Technical Support (WP UNIX): (801) 765-4019

  WWW:    http://www.corel.com <http://www.corel.com>


  < Caldera Corporation sells WordPerfect 6.0 for Caldera Network
  Desktop (CND) for $129.99 (WordPerfect and Motif Bundle).  Note, at
  this time, I have no information on if Caldera is planning to sell WP
  7.0.

          Caldera, Inc.
        633 South 550 East
        Provo, Utah 84606 USA

          (888) GO LINUX
          (801) 377=7687


  WWW:    http://www.caldera.com <http://www.caldera.com>


  As a last resort, email me at whampton@staffnet.com.

  X11-big-cursor MINIHOWTO
  How to use enlarged mouse cursors with the X window system
  Jrg Schneider <mailto:joerg.schneider@ira.uka.de>
  v2, 11 August 1997

  This document describes how to use enlarged mouse cursors with the X
  window system.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. About this document

  3. How to do it

  4. Notes and limitations

  5. Technical discussion

  6. Other ideas how to make the mouse cursor more visible

  7. Related info

     7.1 How to use a font server
        7.1.1 Setting up a font server
     7.2 How to get the bdf source for some font


  ______________________________________________________________________

  1.  Introduction

  There are several reasons why the standard X mouse cursors are hard to
  track for some people:

    when running X on a notebook with low contrast LCD

    on normal screens when using high resolution, 1600x1280 e. g.

    for visually impaired persons even on normal hardware

  In all cases it might help to use enlarged mouse cursors. Ideally this
  job should be done by a single X program that automatically enlarges
  every mouse cursor.

  To my knowledge there is no simple way to write a utility like this,
  because the X protocol has no provision to query mouse cursors. For
  more details see section ``Technical discussion'' below.

  If we aim for a less general goal, though, something can be done:

  There is a set of standard mouse cursors that can be found in the
  cursor font (try xfd -fn cursor to look at it). Most programs use
  these mouse cursors and the key idea is to replace the standard cursor
  font with an enlarged version.


  2.  About this document

  The motivation for this MINIHOWTO was a visually impaired co-student
  who asked me how to enlarge the mouse cursor under X. After I found
  out how this can be done, I wrote an initial version of this document.
  The knowledge about the method described here does not seem to be
  common, so I decided to share it and submitted this document as a
  Linux MINIHOWTO, despite the fact that it is not specific to Linux at
  all. As all other MINIHOWTOs it can be found in the home of of the
  Linux Documentation Project (LDP) <http://sunsite.unc.edu/LDP/HOWTO/>.

  The master <http://i11www.ira.uka.de/~schneid/X11-big-cursor/master/>
  of this document is maintained in the SGML/linuxdoc format. This makes
  it possible to automatically provide versions in the following formats
  (which can be found in the same place as the master): html, text,
  LaTeX, DVI, PostScript, GNU info.

  Shinobu Miyata <mailto:shinobu@emichan.rim.or.jp> has done a Japanese
  translation of this MINIHOWTO. It can be found in
  <http://i11www.ira.uka.de/~schneid/jp/X11-big-cursor/>.


  3.  How to do it

  Follow the steps detailed below. If you don't want to get and compile
  the bdfresize package yourself, you can skip to step 3 and download a
  magnified font instead of creating it.

  1. get cursor.bdf, the source of the cursor font, from some X
     distribution, e. g. from
     <ftp://ftp.x.org/pub/R6.3/xc/fonts/bdf/misc/cursor.bdf> (if you
     don't find it there try an archie search or get it from my copy
     <http://i11www.ira.uka.de/~schneid/X11-big-cursor/cursor.bdf>).

  2. get, compile and install the bdfresize package from
     <ftp://ftp.cs.titech.ac.jp/X11/contrib/Local/bdfresize-1.4.tar.Z>
     (or from my copy <http://i11www.ira.uka.de/~schneid/X11-big-
     cursor/bdfresize-1.4.tar.gz>):

          zcat bdfresize-1.4.tar.Z  | tar xf -
          cd bdfresize-1.4
          xmkmf
          make

  On Linux you probably have to use:

       make CCOPTIONS='-include /usr/include/bsd/bsd.h' clean all

  3. create a directory and install a magnified cursor font in it
     (magnification factor 2 in this example):


          mkdir $HOME/fonts
          bdfresize -f 2 cursor.bdf | bdftopcf >$HOME/fonts/cursor2.pcf
          mkfontdir $HOME/fonts

  I have prepared some cursor fonts
  <http://i11www.ira.uka.de/~schneid/X11-big-cursor/fonts/> with the
  following magnification factors: 1.5, 2, 2.5, 3, 4, 5, 6, 7, 8 and 16.
  You can download one of them an copy it to $HOME/fonts if you don't
  want to use bdfresize.

  4. modify your .xinitrc or .xsession file: before any X client (that
     uses cursors) is started the following commands must  be executed:
          xset +fp $HOME/fonts
          xsetroot -cursor_name X_cursor

  5. leave your X session and restart.

  That's it--now all mouse cursors should have doubled in size.

  4.  Notes and limitations


    X servers may have a limit for the maximum cursor size, especially
     if they use a hardware implementation for the mouse cursor. Others
     do not have such a limit. E. g. XF86_S3 3.3 works even with a
     512x512 mouse cursor (rather slowly).

    The magnified cursor font must have the same name as the original
     font (the font name must be cursor, file name does not
     matter)--that is no problem as bdfresize does not change the font
     name.

    The directory with the new cursor font must be placed before the
     directory with the standard cursor font in the the font path--this
     is accomplished with xset +fp (as opposed to xset fp+).

    Changes in $HOME/fonts/ will be visible only after the command
     mkfontdir $HOME/fonts; xset fp rehash and only in newly started X
     clients (more exactly: for newly created cursors).

    xset +fp path may not work on a X-Terminal. In this case a font
     server (see the section ``How to use a fontserver'') can be used if
     supported by the X-Terminal or some other method to install the
     font on the X-Terminal (this can generally only be done by your
     system administrator).

    The same approach can be used for olcursor and decw$cursor fonts
     and any other cursor font you may encounter.

    Cursor fonts produced by bdfresize don't look smooth, especially at
     larger magnification factors. It would be nice if someone could
     create better looking handcrafted version at some common sizes.


  5.  Technical discussion

  Is it possible to write a X program that enlarges cursors
  automatically?


     (Partial) solution 1
        Use the XTestCompareCursor from the XTEST extension. For all
        windows that the mouse pointer enters compare the cursor of this
        window with a set of `known' cursors (e. g. from the cursor
        font). If the cursor is found, replace it with an enlarged
        version, otherwise either leave it alone or substitute a
        standard cursor. This will only work where the XTest extension
        is available.


     Solution 2
        Write a proxy X server that relays all client requests unchanged
        to the real X server, except that it intercepts all requests
        corresponing to the XCreate*Cursor Xlib functions.
        XCreate*Cursor requests should be modified to use an enlarged
        cursor.

        This proxy server simulates a new display, e. g. :1. All clients
        that connect to this display (e. g. xterm -display :1) are
        displayed on the real server (normally :0) and their mouse
        cursors are enlarged automatically. The mouse cursors of clients
        that connect to :0 will remain unchanged.


  6.  Other ideas how to make the mouse cursor more visible

  Here are some ideas for rather simple X programs that might make mouse
  cursors easier to track.


    When a hot key is pressed display something (big cursor, small
     window, shaped window) at pointer position for 0.5s.

    use XRecolorCursor to change the mouse cursor color every 0.1s

  A more demanding project would be mouse trails  la windoze, i. e.
  when the mouse is moved and the mouse cursor needs to be drawn in a
  different position, then the old mouse cursor does not disappear at
  once, but after a short delay. Mouse trails would be probably best
  implemented in a X server, but it might be feasible to do it as a X
  client, or better as a proxy server (see section ``Technical
  discussion'' for details).


  7.  Related info

  7.1.  How to use a font server

  A font server is a net service that provides a set of X11 fonts with a
  simple protocol. It can be queried which fonts it provides and will
  supply the font bitmap data on request.

  You might want to use a font server to provide the X server with a
  modified cursor font, instead of telling it where to find the font on
  the file system.

  This method is especially handy if you use several machines that don't
  share a common file system or if you use X terminals that support the
  font server protocol.

  A font server program and associated tools comes with the X11R5+
  distribution (AFAIK).


  7.1.1.  Setting up a font server

  Read the manual pages fs(1), fslsfonts(1) (or xfs(1), xfslsfonts(1)
  under X11R6) and try it--it isn't hard. Say, you are running the
  server on host some.host.edu on port 7100. You can test the setup with
  the command

  fslsfonts -server some.host.edu:7100

  To actually use the server issue the command

  xset +fp tcp/some.host.edu:7100

  which should return without an error message.

  7.2.  How to get the bdf source for some font

  If you have set up a font server simply use fstobdf which comes with
  the font server.

  Alternatively you may try getbdf which can dump any installed X11 font
  to a bdf file.

  Linux XFree-to-Xinside mini-HOWTO
  by Marco Melgazzi, marco@techie.com
  v1.3, September 1997

  How to convert an XFree86 modeline into an XInside/XiGraphics one
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Why should I need it ?

  3. Let's go

  4. Fixing up things

  5. The end...

  6. Automating the process

  7. Thanks to

  8. Copyright/legalese

  ______________________________________________________________________

  1.  Introduction

  During the spring of 1996 I've seen a lot of posts in comp.os.linux.x
  asking how to convert video modes between XFree86 and one of its
  commercial alternatives: XInside ( now named XiGraphics, note anyway
  that in this document I'll use the old product name, since I will
  mainly refer to that version )

  I had evaluated before the product and had this evaluation version
  still floating on my hard disk: since I like problem solving, I've
  decided to give it a try and, after a couple of hours of fiddling and
  calculating, I came up with a supposedly informative article that was
  promptly posted.

  The discussions about how to convert suddendly vanished and I received
  1 (one) mail thanking me for the article so, since maybe somebody else
  could need this information in the future, I decided to transform that
  post in the mini-HOWTO you are reading.

  Let me state something first: I do NOT work for XInside and I only had
  access to the evaluation 1.2 version for Linux. I know that nowadays (
  May 97 ) AccelX has reached revision 3.1, but I do think that the
  information included in this document, if not verbatim, is still
  applicable.

  Due to the fact that this HOWTO has been written with the help of a
  pretty old Xinside version, it may well happen that some of the
  information contained here is not completely accurate: as you will
  read later, thanks to the birth of XFree 3.2, I haven't bought this
  commercial server, so if you have, and if you notice any incorrect
  information here please take the time to email me.

  Notice anyway that fiddling with monitor timings can be hazardous and,
  for this reason, I absolutely make no guarantees. If it works for you
  , fine, if you blow up your computer I shall not be held responsible
  for it.
  As you may have noticed from may name, I'm not a native speaker of
  English so you will probably find some errors here and there, I
  apologize for them and I ask you to please avoid flooding my mailbox
  with language-related flames. Thanks !

  2.  Why should I need it ?


  I think that the Xinside policy of not giving you an utility to tweak
  your video modes ( like xvidtune ) and/or to import your existing
  XFree ones in the evaluation ( and AFAIK commercial ) version is
  incomprehensible.  I've spent about three hours putting this together
  ( hint: I've compared the VESA 1024x768@70Hz entry in the two formats
  ( and I'm nearly an electronic engineer ;-)) while an Xinside
  programmer could have written a comparable article in a fraction of
  this time...

  I haven't downloaded any evaluation version from 1.3 onwards and I
  really hope they have fixed this. Well, if they have, this mini-HOWTO
  could be considered useless but, alas, if you read it you will learn
  something more about how everything works...


  3.  Let's go

  Let's suppose that you have your oh-so-tweaked XFree86 mode and you
  want to evaluate Xinside in the same conditions: follow the steps
  described below and you should be able to do it; we will use my
  default video mode as a real-life example and I will explain what you
  will have to do to convert it.

  An Xfree86 entry looks like this:

       Modeline "blahblah" DOTCLK  A B C D  a b c d

  Every one of the A-D and a-d numbers has a meaning: if you want you
  can search for it in the 'The Hitchhiker's Guide to X386/XFree86 Video
  Timing' ( /usr/lib/X11/doc/VideoModes.doc ) but you don't need to know
  the theory behind all this to perform a succesful conversion...

  My modeline in /usr/lib/X11/XF86Config is:

       Modeline "1168x876" 105  1168 1256 1544 1640  876 877 891 900
                            |     |    |    |    |    |   |   |   |
                         DOT_CLK  A    B    C    D    a   b   c   d

  In Xinside, you have to add an entry in the Xtimings file, which
  should be located in etc/ ( from now on we suppose you are in the top
  Xaccel directory that should be something like
  /usr/X11/lib/X11/AcceleratedX )

  !    Somewhere in the file, put here the name you want

  [PREADJUSTED_TIMING]
      PreadjustedTimingName = "1168x876 @ 72Hz";

  !
  !    These four are obvious
  !
      HorPixel          = 1168;         // pixels
      VerPixel          = 876;          // lines
      PixelWidthRatio   = 4;
      PixelHeightRatio  = 3;

  !
  !   hsync: DOT_CLK / D * 1000 [KHz]
  !
  !   hsync = 105 / 1640 * 1000 = 64.024 KHz
  !
  !   vsync: ( 1 / (( D / DOT_CLK ) * d) ) * 1,000,000 [Hz]
  !
  !   vsync: ( 1 / (( 1640 / 105 ) * 900) ) * 1,000,000
  !           ( 1 / 14057.1428571 ) * 1,000,000 = 71.138 Hz
  !

      HorFrequency      = 64.180;        // kHz
      VerFrequency      = 71.138;        // Hz

  !   Obvious

      ScanType          = NONINTERLACED;

  !
  !   Put here the +/-hsync +/-vsync XFree86 options
  !
      HorSyncPolarity   = POSITIVE;
      VerSyncPolarity   = POSITIVE;

  !   Shouldn't change

      CharacterWidth    = 8;             // pixels

  !   DOT_CLK here

      PixelClock        = 105.000;       // MHz
  !
  !
  !   horizontal timings section: [usec]
  !
      HorTotalTime  = D / DOT_CLK                  = 15.619;
      HorAddrTime   = A / DOT_CLK                  = 11.124;
      HorBlankStart = A / DOT_CLK                  = 11.124;
      HorBlankTime  = HorTotalTime - HorBlankStart =  4.495;
      HorSyncStart  = B / DOT_CLK                  = 11.962;
      HorSyncTime   = C / DOT_CLK - HorSyncStart   =  2.743;

   !
   !  vertical timings section:    [msec]
   !

      VerTotalTime  = ( HorTotalTime * d ) / 1000  = 14.057;
      VerAddrTime   = ( HorTotalTime * a ) / 1000  = 13.682;
      VerBlankStart = ( HorTotalTime * a ) / 1000  = 13.682;
      VerBlankTime  = VerTotalTime - VerBlankStart =  0.375;
      VerSyncStart  = ( HorTotalTime * b ) / 1000  = 13.698;
      VerSyncTime   = ( HorTotalTime * ( c - b ) ) / 1000
                                                   = 0.219
   ! Finished !

  Now you have to put this newly created mode in the files shown below
  in the appropriate place.


  4.  Fixing up things

  In the excerpts shown below the -> sign tells you what was modified:
  do NOT include it in your files!

  Monitor entry ( mine is monitors/mfreq/mfreq64.vda)

           [ESTABLISHED_TIMINGS]
               "640x480 @ 60Hz",
               "640x480 @ 72Hz",
               "640x480 @ 75Hz",
               "800x600 @ 56Hz",
               "800x600 @ 60Hz",
               "800x600 @ 72Hz",
               "800x600 @ 75Hz",
               "1024x768 Interlaced",
               "1024x768 @ 60Hz",
               "1024x768 @ 70Hz",
               "1024x768 @ 75Hz",
           "1152x900 Interlaced",
               "1152x900 @ 60Hz",
               "1152x900 @ 67Hz",
       ->      "1168x876 @ 72Hz",
               "1280x1024 Interlaced",
               "1280x1024 @ 60Hz",
           "1600x1200 Interlaced";

  Board info file ( mine is boards/s3/764-2.xqa , I wonder why they have
  nearly all the Hercules boards but not MINE: Terminator 64/Dram )

  [VISUAL]
      BitsPerPixel   = 8;
      MemoryModel    = Packed;
      ColorModel     = Indexed;
      BitsRGB        = 6;
      NumberOfColors = 256;

      [RESOLUTIONS]
      640x480,
      800x600,
      1024x768,
  ->  1168x876,
      1152x900,
      1280x1024

      [DESKTOPS]
      640x480,
      800x600,
      1024x768,
      1152x900,
  ->  1168x876,
      1280x1024,
      1600x1200

  If the dot clock is low enough ( NOT in this case for my board ) you
  can put the entry even in the 16bpp and 32bpp sec- tions.

  The /etc/Xaccel.ini will look something like this

       --------------------------------------------------------------
           Board   = "s3/764-2.xqa";
           Monitor = "mfreq/mfreq64.vda";
           Depth   = 8;
       ->  Desktop = 1168x876;

           [RESOLUTIONS]
       ->      1168x876,
               1024x768;

  The actual Xinside mode entry in etc/Xtimings

  --------------------------------------------------------------
  [PREADJUSTED_TIMING]
      PreadjustedTimingName = "1168x876 @ 72Hz";

      HorPixel          = 1168;          // pixels
      VerPixel          = 876;           // lines
      PixelWidthRatio   = 4;
      PixelHeightRatio  = 3;
      HorFrequency      = 64.024;        // kHz
      VerFrequency      = 71.138;        // Hz
      ScanType          = NONINTERLACED;
      HorSyncPolarity   = POSITIVE;
      VerSyncPolarity   = POSITIVE;
      CharacterWidth    = 8;             // pixels
      PixelClock        = 105.000;       // MHz
      HorTotalTime      = 15.619;        // (usec) =  205 chars
      HorAddrTime       = 11.124;        // (usec) =  146 chars
      HorBlankStart     = 11.124;        // (usec) =  146 chars
      HorBlankTime      =  4.495;        // (usec) =   59 chars
      HorSyncStart      = 11.962;        // (usec) =  157 chars
      HorSyncTime       =  2.743;        // (usec) =   36 chars
      VerTotalTime      = 14.057;        // (msec) =  900 lines
      VerAddrTime       = 13.682;        // (msec) =  876 lines
      VerBlankStart     = 13.682;        // (msec) =  876 lines
      VerBlankTime      =  0.375;        // (msec) =   24 lines
      VerSyncStart      = 13.698;        // (msec) =  877 lines
      VerSyncTime       =  0.219;        // (msec) =   14 lines

  You can check your conversion by running the vgaset program with no
  parameters while running the Xinside server: it will output an XFree-
  like line and, if everything went OK, this line will be equal to the
  line you started from ( except if b and c are equal, I haven't been
  able to reproduce this situation in Xinside: the best case was c=b+1
  ).


  5.  The end...

  That's all folks ! I hope this will be useful to you. I don't think
  I'll buy the XiGraphics server in the near future for one simple
  reason: the release of XFree86 3.2 solved all of the text speed
  problems I was having on my humble Trio 64 video board ;)

  It seems anyway that the XiGraphics server supports a much wider array
  of chipsets and video boards than XFree, so it may well happen that
  the commercial 'alternative' is the only viable one for you. If this
  is the case, and you bought the XiGraphics server, I would really like
  to hear from you to know if the information presented here has been
  useful to you, or if you found it too complex or whatever.


  6.  Automating the process

  This small script automates most of the work. Be very careful with the
  ScanType and with the two Polarity lines: the script do not set them
  and, if you are too lazy to correct them, the risks of blowing up your
  monitor increase quite a lot.

  Notice that I don't know if the 'Doublescan' flag has meaning in
  XInside: if you try to convert a low-res doublescan mode BE CAREFUL,
  you can easily kill your monitor since the refresh rate that you get
  is doubled ( in fact my 400x300@72Hz became a 400x300@144Hz !).

       #!/bin/sh
       ##########################################################################
       # XF2XInside
       #
       # This script converts modelines from XF86Config format to XInside
       # format as needed for the etc/Xtiming file.
       #
       # This is a quick hack, so don't expect much error checking (not to
       # speak of anything like user friendlyness).
       #
       # If you call it without arguments it should tell you what to do.
       #
       #                               ( July 1996, hcz@tazlwurm.bb.bawue.de)
       #
       # Btw: New modes created as described in the HOWTO work, but don't
       # show up in Xsetup's menu. Anybody who knows why?
       #
       ##########################################################################
       #----------------------------------------------- Here we go:
       # Change this if your modeline file lives somewhere else:
       XF=/usr/X11/lib/X11/XF86Config
       if [ $# -ne 1 ] ; then
         echo "usage: ${0##*/} <mode>"
         echo " example: ${0##*/} 1024x764"
         echo -e " function: converts $XF modeline entry into\n Xinside Format (stdout)"
         exit 1
       fi
       egrep -i "^[\t ]*modeline.+\"$1\""  /usr/X11/lib/X11/XF86Config |
       gawk '
       NF < 11  { print "! invalid Modeline:\n! " $0 "\n!"; next }
       {
         print "//", $0  ":"
         name = $2
         DOT_CLK = $3;
         A = $4;
         B = $5;
         C = $6;
         D = $7;
         a = $8;
         b = $9;
         c = $10;
         d = $11;
         VerFrequency =  1000000 / ((D / DOT_CLK) * d)
         print "[PREADJUSTED_TIMING]"
         printf "  PreadjustedTimingName = \"%dx%d @ %.0dHz\";\n", A, a, VerFrequency
         print "  HorPixel\t\t= " A ";"
         print "  VerPixel\t\t= " a ";"
         print "  PixelWidthRatio\t= 4;\n  PixelHeightRatio\t= 3;"
         print "  HorFrequency\t\t= " DOT_CLK / D * 1000 ";\t// kHz"
         print "  VerFrequency\t\t= " VerFrequency  ";\t// Hz"
         print "  ScanType\t\t= NONINTERLACED;\t\t// *CHECK*"
         print "  HorSyncPolarity\t= NEGATIVE;\t\t\t// *CHECK*"
         print "  VerSyncPolarity\t= NEGATIVE;\t\t\t// *CHECK*"
         print "  CharacterWidth\t= 8;"
         print "  PixelClock\t\t= " DOT_CLK ";"
         HorTotalTime = D / DOT_CLK
         print "  HorTotalTime\t\t= " HorTotalTime ";"
         print "  HorAddrTime \t\t= " A / DOT_CLK ";"
         print "  HorBlankStart\t\t= " A / DOT_CLK ";"
         print "  HorBlankTime\t\t= " D / DOT_CLK - A / DOT_CLK ";"
         print "  HorSyncStart\t\t= " B / DOT_CLK ";"
         print "  HorSyncTime\t\t= " C / DOT_CLK - B / DOT_CLK ";"
         VerTotalTime  = ( HorTotalTime * d ) / 1000
         print "  VerTotalTime\t\t= " VerTotalTime ";"
         print "  VerAddrTime\t\t= " ( HorTotalTime * a ) / 1000 ";"
         VerBlankStart = ( HorTotalTime * a ) / 1000
    print "  VerBlankStart\t\t= " VerBlankStart ";"
    print "  VerBlankTime\t\t= " VerTotalTime - VerBlankStart ";"
    print "  VerSyncStart\t\t= " ( HorTotalTime * b ) / 1000 ";"
    print "  VerSyncTime\t\t= " ( HorTotalTime * ( c - b ) ) / 1000
    print ""
  }'

  7.  Thanks to


    Heike Claudia Zimmerer hcz@tazlwurm.bb.bawue.de for pointing out a
     small inconsistency and for sending me a script that automates most
     of the work.

    Bartosz Maruszewski B.Maruszewski@zsmeie.torun.pl for translating
     this mini HOWTO in Polish and for pointing out a small typo.


  8.  Copyright/legalese

  (c)opyright 1996-7 by Marco Melgazzi (marco@techie.com) - the GPL (Gnu
  Public License) applies. To obtain a copy of the GPL write to the Free
  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  Trademarks are owned by their owners. There is no warranty on the
  accuracy and/or the usefulness of the information given in this
  document.

  How to change the title of an xterm
  Ric Lister, ric@giccs.georgetown.edu
  v2.0, 27 October 1999

  This document explains how to use escape sequences to dynamically
  change window and icon titles of an xterm. Examples are given for sev
  eral shells, and the appendix gives escape sequences for some other
  terminal types.
  ______________________________________________________________________

  Table of Contents


  1. Where to find this document

  2. Static titles

  3. Dynamic titles

     3.1 xterm escape sequences
     3.2 Printing the escape sequences

  4. Examples for different shells

     4.1 zsh
     4.2 tcsh
     4.3 bash
     4.4 ksh
     4.5 csh

  5. Printing the current job name

     5.1 zsh
     5.2 Other shells

  6. Appendix: escapes for other terminal types

     6.1 IBM
     6.2 SGI
     6.3 Sun
     6.4 CDE
     6.5 HPterm

  7. Appendix: examples in other languages

     7.1 C
     7.2 Perl

  8. Credits



  ______________________________________________________________________

  1.  Where to find this document

  This document is now part of the Linux HOWTO Index
  <http://sunsite.unc.edu/LDP/HOWTO/> and can be found at
  <http://sunsite.unc.edu/LDP/HOWTO/mini/Xterm-Title.html>.


  The latest version can always be found in several formats at
  <http://www.giccs.georgetown.edu/~ric/howto/Xterm-Title/>.



  This document supercedes the original howto written by Winfried
  Trmper.



  2.  Static titles

  A static title may be set for any of the terminals xterm, color-xterm
  or rxvt, by using the -T and -n switches:

       xterm -T "My XTerm's Title" -n "My XTerm's Icon Title"



  3.  Dynamic titles

  Many people find it useful to set the title of a terminal to reflect
  dynamic information, such as the name of the host the user is logged
  into, the current working directory, etc.



  3.1.  xterm escape sequences

  Window and icon titles may be changed in a running xterm by using
  XTerm escape sequences. The following sequences are useful in this
  respect:

    ESC]0;stringBEL -- Set icon name and window title to string

    ESC]1;stringBEL -- Set icon name to string

    ESC]2;stringBEL -- Set window title to string

     where ESC is the escape character (\033), and BEL is the bell
     character (\007).


  Printing one of these sequences within the xterm will cause the window
  or icon title to be changed.


  Note: these sequences apply to most xterm derivatives, such as nxterm,
  color-xterm and rxvt. Other terminal types often use different
  escapes; see the appendix for examples. For the full list of xterm
  escape sequences see the file ctlseq2.txt
  <http://www.giccs.georgetown.edu/~ric/howto/Xterm-Title/ctlseq2.txt>,
  which comes with the xterm distribution, or xterm.seq
  <http://www.giccs.georgetown.edu/~ric/howto/Xterm-Title/xterm.seq>,
  which comes with the rxvt <http://www.rxvt.org/> distribution.



  3.2.  Printing the escape sequences

  For information that is constant throughout the lifetime of this
  shell, such as host and username, it will suffice to simply echo the
  escape string in the shell rc file:


       echo -n "\033]0;${USER}@${HOST}\007"



  should produce a title like username@hostname, assuming the shell
  variables $USER and $HOST are set correctly.  The required options for
  echo may vary by shell (see examples below).


  For information that may change during the shell's lifetime, such as
  current working directory, these escapes really need to be applied
  every time the prompt changes.  This way the string is updated with
  every command you issue and can keep track of information such as
  current working directory, username, hostname, etc. Some shells
  provide special functions for this purpose, some don't and we have to
  insert the title sequences directly into the prompt string. This is
  illustrated in the next section.



  4.  Examples for different shells

  Below we provide an set of examples for some of the more common
  shells.  We start with zsh as it provides several facilities that make
  our job much easier. We will then progress through increasingly
  difficult examples.


  In all the examples we test the environment variable $TERM to make
  sure we only apply the escapes to xterms. We test for $TERM=xterm*;
  the wildcard is because some variants (such as rxvt) can set
  $TERM=xterm-color.


  We should make an extra comment about C shell derivatives, such as
  tcsh and csh. In C shells, undefined variables are fatal errors.
  Therefore, before testing the variable $TERM, it is necessary to test
  for its existence so as not to break non-interactive shells. To
  achieve this you must wrap the examples below in something like:


         if ($?TERM) then
             ...
         endif



  (In our opinion this is just one of many reasons not to use C shells.
  See Csh Programming Considered Harmful <http://language.perl.com/ver
  sus/csh.whynot> for a useful discussion).


  The examples below should be used by inserting them into the
  appropriate shell initialisation file; i.e. one that is sourced by
  interactive shells on startup. In most cases this is called something
  like .shellrc (e.g. .zshrc, .tcshrc, etc).



  4.1.  zsh

  zsh provides some functions and expansions, which we will use:



  precmd ()   a function which is executed just before each prompt
  chpwd ()    a function which is executed whenever the directory is changed
  \e          escape sequence for escape (ESC)
  \a          escape sequence for bell (BEL)
  %n          expands to $USERNAME
  %m          expands to hostname up to first '.'
  %~          expands to directory, replacing $HOME with '~'



  There are many more expansions available: see the zshmisc man page.


  Thus, the following will set the xterm title to "username@hostname:
  directory":


       case $TERM in
           xterm*)
               precmd () {print -Pn "\e]0;%n@%m: %~\a"}
               ;;
       esac



  This could also be achieved by using chpwd() instead of precmd(). The
  print builtin works like echo, but gives us access to the % prompt
  escapes.



  4.2.  tcsh

  tcsh has some functions and expansions similar to those of zsh:


       precmd ()   a function which is executed just before each prompt
       cwdcmd ()   a function which is executed whenever the directory is changed
       %n          expands to username
       %m          expands to hostname
       %~          expands to directory, replacing $HOME with '~'
       %#          expands to '>' for normal users, '#' for root users
       %{...%}     includes a string as a literal escape sequence



  Unfortunately, there is no equivalent to zsh's print command allowing
  us to use prompt escapes in the title string, so the best we can do is
  to use shell variables (in ~/.tcshrc):


       switch ($TERM)
           case "xterm*":
               alias precmd 'echo -n "\033]0;${HOST}:$cwd\007"'
               breaksw
       endsw



  However, this gives the directory's full path instead of using ~.
  Instead you can insert the string in the prompt:
       switch ($TERM)
           case "xterm*":
               set prompt="%{\033]0;%n@%m:%~\007%}tcsh%# "
               breaksw
           default:
               set prompt="tcsh%# "
               breaksw
       endsw



  which sets a prompt of "tcsh% ", and an xterm title and icon of "user
  name@hostname: directory". Note that the "%{...%}" must be placed
  around escape sequences (and cannot be the last item in the prompt:
  see the tcsh man page for details).



  4.3.  bash

  bash supplies a variable $PROMPT_COMMAND which contains a command to
  execute before the prompt. This example sets the title to
  username@hostname: directory:


       PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'



  where \033 is the character code for ESC, and \007 for BEL.


  Note that the quoting is important here: variables are expanded in
  "...", and not expanded in '...'. So $PROMPT_COMMAND is set to an
  unexpanded value, but the variables inside "..." are expanded when
  $PROMPT_COMMAND is used.


  However, $PWD produces the full directory path. If we want to use the
  ~ shorthand we need to embed the escape string in the prompt, which
  allows us to take advantage of the following prompt expansions
  provided by the shell:


       \u          expands to $USERNAME
       \h          expands to hostname up to first '.'
       \w          expands to directory, replacing $HOME with '~'
       \$         expands to '$' for normal users, '#' for root
       \[...\]     embeds a sequence of non-printing characters



  Thus, the following produces a prompt of bash$ , and an xterm title of
  username@hostname: directory:



  case $TERM in
      xterm*)
          PS1="\[\033]0;\u@\h: \w\007\]bash\\$ "
          ;;
      *)
          PS1="bash\\$ "
          ;;
  esac



  Note the use of \[...\], which tells bash to ignore the non-printing
  control characters when calculating the width of the prompt. Otherwise
  line editing commands get confused while placing the cursor.



  4.4.  ksh

  ksh provides little in the way of functions and expansions, so we have
  to insert the escape string in the prompt to have it updated
  dynamically. This example produces a title of username@hostname:
  directory and a prompt of ksh$ .


       case $TERM in
           xterm*)
               HOST=`hostname`
               PS1='^[]0;${USER}@${HOST}: ${PWD}^Gksh$ '
               ;;
           *)
               PS1='ksh$ '
               ;;
       esac



  However, $PWD produces the full directory path. We can remove the pre
  fix of $HOME/ from the directory using the ${...##...} construct. We
  can also use ${...%%...} to truncate the hostname:


       HOST=`hostname`
       HOST=${HOST%%.*}
       PS1='^[]0;${USER}@${HOST}: ${PWD##${HOME}/}^Gksh$ '



  Note that the ^[ and ^G in the prompt string are single characters for
  ESC and BEL (can be entered in emacs using C-q ESC and C-q C-g).



  4.5.  csh

  This is very difficult indeed in csh, and we end up doing something
  like the following:



  switch ($TERM)
      case "xterm*":
          set host=`hostname`
          alias cd 'cd \!*; echo -n "^[]0;${user}@${host}: ${cwd}^Gcsh% "'
          breaksw
      default:
          set prompt='csh% '
          breaksw
  endsw



  where we have had to alias the cd command to do the work of sending
  the escape sequence. Note that the ^[ and ^G in the string are single
  characters for ESC and BEL (can be entered in emacs using C-q ESC and
  C-q C-g).


  Notes: on some systems hostname -s may be used to get a short, rather
  than fully-qualified, hostname. Some users with symlinked directories
  may find `pwd` (backquotes to run the pwd command) gives a more
  accurate path than $cwd.



  5.  Printing the current job name

  Often a user will start a long-lived foreground job such as top, an
  editor, an email client, etc, and wishes the name of the job to be
  shown in the title. This is a more thorny problem and is only achieved
  easily in zsh.


  5.1.  zsh

  zsh provides an ideal builtin function for this purpose:


       preexec()   a function which is just before a command is executed
       $*,$1,...   arguments passed to preexec()



  Thus, we can insert the job name in the title as follows:


       case $TERM in
           xterm*)
             preexec () {
               print -Pn "\e]0;$*\a"
             }
           ;;
       esac



  Note: the preexec() function appeared around version 3.1.2 of zsh, so
  you may have to upgrade from an earlier version.



  5.2.  Other shells

  This is not easy in other shells which lack an equivalent of the
  preexec() function. If anyone has examples please email them to the
  author.



  6.  Appendix: escapes for other terminal types

  Many modern terminals are descended from xterm or rxvt and support the
  escape sequences we have used so far. Some proprietary terminals
  shipped with various flavours of unix use their own escape sequences.



  6.1.  IBM aixterm

  aixterm recognises the xterm escape sequences.



  6.2.  SGI wsh , xwsh  and winterm

  These terminals set $TERM=iris-ansi and use the following escapes:

    ESCP1.ystringESC\        Set window title to string

    ESCP3.ystringESC\        Set icon title to string

     For the full list of xwsh escapes see the xwsh(1G) man page.


  The Irix terminals also support the xterm escapes to individually set
  window title and icon title, but not the escape to set both.



  6.3.  Sun cmdtool  and shelltool

  cmdtool and shelltool both set $TERM=sun-cmd and use the following
  escapes:

    ESC]lstringESC\    Set window title to string

    ESC]LstringESC\    Set icon title to string

     These are truly awful programs: use something else.



  6.4.  CDE dtterm

  dtterm sets $TERM=dtterm, and appears to recognise both the standard
  xterm escape sequences and the Sun cmdtool sequences (tested on
  Solaris 2.5.1, Digital Unix 4.0, HP-UX 10.20).



  6.5.  HPterm

  hpterm sets $TERM=hpterm and uses the following escapes:

    ESC&f0klengthDstring   Set window title to string of length length


    ESC&f-1klengthDstring  Set icon title to string of length length


  A basic C program to calculate the length and echo the string looks
  like this:


       #include <string.h>
       int main(int argc, char *argv[])
       {
           printf("\033&f0k%dD%s", strlen(argv[1]), argv[1]);
           printf("\033&f-1k%dD%s", strlen(argv[1]), argv[1]);
           return(0);
       }



  We may write a similar shell-script, using the ${#string} (zsh, bash,
  ksh) or ${%string} (tcsh) expansion to find the string length. The
  following is for zsh:


       case $TERM in
           hpterm)
               str="\e]0;%n@%m: %~\a"
               precmd () {print -Pn "\e&f0k${#str}D${str}"}
               precmd () {print -Pn "\e&f-1k${#str}D${str}"}
               ;;
       esac



  7.  Appendix: examples in other languages

  It may be useful to write a small program to print an argument to the
  title using the xterm escapes. Some examples are provided below.



  7.1.  C



       #include <stdio.h>

       int main (int argc, char *argv[]) {
         printf("%c]0;%s%c", '\033', argv[1], '\007');
         return(0);
       }



  7.2.  Perl



  #!/usr/bin/perl
  print "\033]0;@ARGV\007";



  8.  Credits

  Thanks to the following people who have provided advice, errata, and
  examples for this document.


  Paul D. Smith <psmith@BayNetworks.COM> and Christophe Martin
  <cmartin@ipnl.in2p3.fr> both pointed out that I had the quotes the
  wrong way round in the bash $PROMPT_COMMAND. Getting them right means
  variables are expanded dynamically.


  Paul D. Smith <psmith@BayNetworks.COM> suggested the use of \[...\] in
  the bash prompt for embedding non-printing characters.


  Christophe Martin <cmartin@ipnl.in2p3.fr> provided the solution for
  ksh.


  Keith Turner <keith@silvaco.com> supplied the escape sequences for Sun
  cmdtool and shelltool.


  Jean-Albert Ferrez <ferrez@dma.epfl.ch> pointed out some
  inconsistencies in the use of "PWD" and "$PWD", and in the use of "\"
  vs "\\".


  Bob Ellison <papillo@hpellis.fc.hp.com> and Jim Searle
  <jims@broadcom.com> tested dtterm on HP-UX.


  Teng-Fong Seak <seak@drfc.cad.cea.fr> suggested the -s option for
  hostname, use of `pwd`, and use of echo under csh.


  Trilia <trilia@nmia.com> suggested examples in other languages.


  Brian Miller <bmiller@telstra.com.au> supplied the escape sequences
  and examples for hpterm.


  Lenny Mastrototaro <lenny@click3x.com> explained the Irix terminals'
  use of xterm escape sequences.


  Paolo Supino <paolo@init.co.il> suggested the use of \\$ in the bash
  prompt.



  Zip Drive Mini-HOWTO
  Kyle Dansie,   dansie@ibm.net
  v2.4, 10 January 1999

  This Document provides a quick reference quide on setting up and using
  the Iomega ZIP drive with Linux.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Home of this document

  2. Quick Start

  3. Configuring a kernel for the ZIP drive

     3.1 SCSI version

  4. The ZIP drive

     4.1 Parallel port version Zip100
     4.2 SCSI external version
        4.2.1 The ZIP ZOOM host adapter
     4.3 The SCSI Internal version
     4.4 The ZIP Plus - IMM driver
     4.5 ATAPI version
     4.6 IDE version
     4.7 USB version
     4.8 ZIP250 version

  5. Using the ZIP drive

     5.1 Fdisk, mke2fs, mount, etc.
     5.2 An existing DOS formatted disk
     5.3 Re-format as a native Linux disk
     5.4 fstab entries
     5.5 The ZIP Tools disk

  6. Performance

  7. Frequently asked questions

     7.1 Can I plug a printer into the parallel ZIP drive ?
     7.2 Do you plan to support EPP/ECP ports in PPA ?
     7.3 Can I run Linux from a ZIP drive ?
     7.4 Can I boot from the ZIP drive ?
     7.5 Why does Iomega use partition number 4 ?
     7.6 How can I have the disk mounted at boot time ?
     7.7 What happens if there is no disk inserted when I boot ?
     7.8 Can I use the parallel drive as a real SCSI disk ?
     7.9 Can PPA be used with Iomega's parallel port tape drives ?
     7.10 Will PPA work with the parallel port SyQuest EZ135 ?

  8. Getting more current information



  ______________________________________________________________________

  1.  Introduction

  The Iomega ZIP drive is a popular, removable media disk drive.  It is
  avaliable in several versions.
  o  Parallel Port

  o  SCSI

  o  IDE - ATAPI

  o  Plus

     The most popular seems to be the Parallel port version. It has been
     around a long time and it is low cost. The SCSI version has also
     been around for a while but it needs a scsi card that many people
     do not have already, so it it not quite as popular. The ATAPI
     version now seems to be more available. The Plus is the newer
     version of the ZIP drive.  It has the capability to detect what
     port its plugged into, scsi or parallel. This document will focus
     on the Parallel port version, but also offer some tips for other
     versions.


  This document incorporates information collected and published by
  others, in particular:

  o  Grant Guenther, grant@torque.net

  o  Scot Wilcoxon, sewilco@fielday.mn.org

  o  Joe Mack, mack@ncifcrf.gov

  o  Byron Jeff, byron@cc.gatech.edu


  I thank them for their important contributions, and accept
  responsibility for any errors that I have introduced.

  A special thanks to Grant Guenther who wrote the 0.26 version of the
  ppa program and also wrote the original version of this HOWTO.  If you
  find any mistakes or oversights in this document, please let me know.
  dansie@ibm.net


  1.1.  Home of this document

  The most current version of this document will reside at
  <http://www.njtcom.com/dansie/zip-drive.html>



  2.  Quick Start

  OK so you have purchased a new zip drive and now you want to use it.
  Some distributions have the modules already built. You can try insmod
  ppa for starters. (Make sure you have it hooked up and a disk
  inserted).  If the ppa program is not there, then configure the
  kernel.  My machine has 2 parallel ports, one for the zip and one for
  the printer.  This makes things easy, no cable switching.

  Configure the kernel:

  o  cd /usr/src/linux

  o  make xconfig

  o  scsi support = Y

  o  scsi disk support = Y

  o  Iomega zip support as a module

  o  printer support also as a module

  o  save it and exit

  o  make dep

  o  make clean

  o  make zImage or zlilo or zdisk

  o  make modules

  o  make modules_install

  Now to use the drive:

  o  load the module insmod ppa

  o  build a mounting point. mkdir /zip

  o  insert a preformatted windoze type disk into the drive.

  o  mount the disk.  mount -t vfat /dev/sda4 /zip

  o  use any standard file commands as in  l /zip, ls /zip, df, cp,

  o  when you are finished  umount /zip

  If you had trouble with any of the previous steps, see the following
  sections for more detailed instructions.



  3.  Configuring a kernel for the ZIP drive

  To use the ZIP drive with Linux, you must have a kernel configured
  with support for the SCSI system, support for SCSI disks, and support
  for the host adapter you are using.  If you are not familiar with
  building a kernel, you should read up on the Linux Kernel HOWTO
  <http://metalab.unc.edu/mdw/HOWTO/Kernel-HOWTO.html> for information.

  You must begin the process of building a kernel with the configuration
  step.  Here, you identify the specific kernel components that you
  need. First step  cd /usr/src/linux. There are several ways to
  actually do the configuration. Under X windows I use make xconfig.
  There is also make menuconfig or make config for command line prompts.
  The easiest way is with xconfig.

  In the section SCSI Support set SCSI support = Y.  Also set SCSI disk
  support = Y.

  In the section SCSI low-level drivers you want to set IOMEGA Parallel
  Port ZIP drive SCSI support = M. The M stands for modules.

  In the section Character Devices find and set Parallell Printer
  support = M

  If you are a bit unsure about any of this, use zdisk for the make
  step. This will build and install the kernel to floppy. If you screw
  it up somehow, you still have a good bootable system on the hard
  drive.


  Now build the kernel with these steps:

  o  make dep

  o  make clean

  o  make zImage or zlilo or zdisk

  o  make modules

  o  make mdoules_install

  hint if you want to create an output log of the make zImage step you
  can use


          make zImage 2>&1 | tee zImage.out



  This is really a good thing to do, if you have compile errors or other
  conflicts in the configuration, now you have a file with the error
  messages or compile errors. This makes asking for help much easier.

  You also need to load the modules somewhere. On my system I just added
  a couple of lines to the boot.local file.

  o  insmod ppa

  o  insmod lp

     My system is Suse 5.3 and this file is in /etc/rc.d. The location
     of this file will vary by distribution, but there will be a file
     somewhere, for local changes to be made at start up time. You
     should use the file that is applicable for your distribution.

  Now shutdown and reboot.

  You can also build all or part of the SCSI system as modules.  If you
  do this, be sure to load scsi.o, then sd.o and finally the driver for
  your host adapter, before you try to access the ZIP drive.


  3.1.  SCSI version


  If you already have a SCSI disk in your system, and you are connecting
  the ZIP drive to the same controller, there is no additional kernel
  configuration required.  Otherwise, you will most likely have to build
  a new kernel.

  If you are building a kernel to support the SCSI version of the ZIP
  drive, you should select SCSI support and SCSI disk support.  You must
  also select a driver for the interface card you will use. If you have
  a ZIP Zoom, select the aha152x driver.

  Be sure to read the documentation for your adapter in the SCSI HOWTO
  and any README files in the drivers/scsi subdirectory of the Linux
  source tree.  Pay attention to command line parameters that you might
  have to use to help the kernel initialise your adapter.

  For instance, if you are using the ZIP Zoom card, you will have to add
  something like

                 aha152x=0x340,11,7,1



  to the boot command (or include it in your /etc/lilo.conf file in an
  append clause).  This tells the driver the port address and IRQ of
  your ZIP Zoom card - be sure to use the numbers that correspond to the
  way your jumpers are set.

  You should also read Paul Gortmaker's BOOTPROMPT HOWTO
  <http://metalab.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html> for
  information about configuring your kernel with LILO or LOADLIN.



  4.  The ZIP drive

  There are at least five or six versions of the Iomega ZIP 100 drive.
  The Iomega page for these drives is at
  <http://www.iomega.com/product/zip/> They all accept special
  cartridges resembling a 3.5" floppy disk that hold 100 megabytes of
  data.  The disks actually hold 96 cylinders of 2048 sectors each
  holding 512 bytes.  This would normally be called 96 Megabytes.

  The external drive comes in these types:

  o  Parallel port

  o  SCSI

  o  Plus

  The internal drive comes in these types:

  o  SCSI

  o  IDE

  o  ATAPI

  The internal versions can be mounted in 3.5 or 5.25 drive slots.  The
  external versions are in a small blue plastic case enclosure, powered
  by an external wall brick.

  All the drives have a large pushbutton on the front of the drive.
  This is used to eject the disk.  Linux locks the door while using the
  drive, but if the button is pressed while the door is locked, the ZIP
  drive will remember and eject the disk as soon as the software unlocks
  it.


  4.1.  Parallel port version Zip100

  This drive is described at
  <http://www.iomega.com/product/zip/zippp.html>

  The Linux driver comes in a couple of different versions. The 0.26
  version of the ppa.c program ships standard with the 2.0.x kernels.
  If your kernel is older than 2.0.35 then you have the OLD program.
  Check out

  David Campbell's page <http://www.torque.net/~campbell/> for the more
  current version of this program. At the time of this writing the
  current version is 1.42.
  The auto configuration features of the 1.4x program are very nice.
  You do NOT have to tell the progam what the base address of the
  parallel port is. The program will prob the standard address's for the
  parallel ports and attach the drive when it finds it.

  The most common problem is to load the lp printer module before the
  ppa program.  The ppa program must be loaded before the lp module. The
  lp module will tie up the port that the zip drive needs, this is why
  the ppa progam must be loaded first.

  Also be sure that all cables are firmly attached.

  If you did everything right :) you will see messages like this at boot
  time.


    VFS: Mounted root (ext2 filesystem) readonly.
    Adding Swap: 102528k swap-space (priority -1)
    ppa: Version 1.42
    ppa: Probing port 03bc
    ppa: Probing port 0378
    ppa:     SPP port present
    ppa:     EPP 1.9 with hardware direction protocol
    ppa: Found device at ID 6, Attempting to use EPP 32 bit
    ppa: Communication established with ID 6 using EPP 32 bit
    ppa: Probing port 0278
    ppa:     SPP port present
    scsi0 : Iomega parport ZIP drive
    scsi : 1 host.
      Vendor: IOMEGA    Model: ZIP 100           Rev: D.09
      Type:   Direct-Access                      ANSI SCSI revision: 02
    Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
    SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
    sda: Write Protect is off
      sda: sda4
    lp2 at 0x0278, (polling)



  You can view these messages with dmesg | more.  You can save the
  messages to a file with dmesg > dmesg.txt.  This is often usefull if
  you are trying to debug the installation.


  Also see section ``Getting more information''


  4.2.  SCSI external version

  This drive is described at
  <http://www.iomega.com/product/zip/zipscsi.html>

  The external SCSI version of the ZIP drive has two DB25F connectors,
  and two configuration switches.  One switch selects the drive's target
  address. The choice is limited to target 5 or 6.  The other enables an
  internal terminator, in case the drive is the last one on a chain.
  The 25 pin SCSI connectors use the familiar Macintosh style wiring.
  The drive is shipped with a Macintosh type cable, but standard cables
  and converters are easily obtained if you are using a host adapter
  with a Centronics or high-density connector.

  I have not seen an internal SCSI drive, but I would expect it to have
  a standard 50 pin DIP header SCSI connector and the same two switches.


  Make sure that the target address you choose does not conflict with
  any other SCSI devices you may have on the same bus.  Also be sure
  that the physically last drive in a chain has termination enabled, or
  an external terminator installed.

  If you have an internal SCSI disk or CD-rom, and you connect your ZIP
  drive to the existing adapter, you should check to see if there are
  any terminators on the card that must be removed.  Only the two
  extreme ends of the SCSI bus should be terminated.  If your bus is
  partly internal and partly external, there should be one terminator on
  the last external device and one on the last internal device, but no
  terminators on the adapter card itself.

  Be sure that all cables are firmly attached.

  The kernel configuration is much the same as the internel version. See
  the next section SCSI Internal version for an example configuration.


  4.2.1.  The ZIP ZOOM host adapter

  Iomega markets a SCSI host adapter under the name ZIP Zoom.  This is
  actually based on the design of the Adaptec AHA1520 family of
  adapters.  It has an external Macintosh type DB25F connector,
  compatible with the cable that comes with the ZIP drive.

  Linux supports this adapter with the aha152x driver.


  4.3.  The SCSI Internal version



  Install hardware as described in the "Installation and Reference
  Guide" noting which SCSI ID, IRQ and I/O Port Address are being used.
  (You'll need this info later.) Things will go smother if the drive and
  adapter card use different SCSI ID's.

  Beware The zip zoom card is hardwired for scsi ID number 7. The scsi
  id in the command line below is for the card, not the drive. The card
  and the drive must use different scsi id numbers. For example if the
  card uses 7 then use 5 or some other number for the drive.

  Recompile the kernel after configuring it to include 'SCSI', 'SCSI
  disk' and 'AHA152X/2825' support. INSTALL NEW KERNEL :-(

  Determine what your kernel command line is:

   aha152x=[I/O Port][,IRQ][,SCSI ID][,RECONNECT][,PARITY]

  For example :

    aha152x=0x140,10,7,1

  If your using LILO add your kernel command line to your lilo.conf file
  using the append command.

  (ie. append = "aha152x=0x140,10,7,1")

  If your using LOADLIN add your kernel command line to the command you
  use to initiate loadlin.


    (ie. loadlin c:\vmlinuz root=/dev/hda3 aha152x=0x140,10,5,1 ro)


  4.4.  The ZIP Plus - IMM driver

  This drive is described at
  <http://www.iomega.com/product/zip/zipplus.html>

  This is a newer version of the external Zip drive. The
   Zip Plus  does not use the ppa driver, instead it uses the
   imm  driver.  Philippe Andersson sent in this excellent section on
  the imm driver for the Zip Plus.  Thanks Philippe.

  First, rebuild your kernel to include the following items:


  o  modules support

  o  SCSI support

  o  SCSI Disk support

  o  lp as a module (if you need it)

  You'll notice we didn't select any SCSI low-level driver. That's ok --
  we'll build it separately later.

  Then, you need to get the driver source code from Dave Campbell's home
  page (http://www.torque.net/~campbell/imm.tar.gz
  <http://www.torque.net/~campbell/imm.tar.gz>). Version 0.18 is the
  current one at the time of writing (Aug. 98). Unzip it and untar it
  somewhere (under /usr/src, for instance). Then just run make. You'll
  get the module you need (imm.o). Copy it to

  /lib/modules/$(uname -r)/scsi



  If your lp module was loaded (check with lsmod(1)), unload it (rmmod
  lp), then load imm.o (insmod imm) and you're all set basically.

  If the ZIP drive was not connected and powered on at the time, you'll
  get the message "init_module: Device or resource busy", and the module
  won't load. (By the way, it looks like you don't need to switch your
  PC off to connect the ZIP -- just make sure the module is not loaded
  and the drive is turned off, then plug it in, turn the drive on, and
  load the module.)

  If the ZIP was connected and powered on, but there was no disk in, the
  module will load all right, but you'll get the message that it can't
  read the disk partition table. This is ok, as the partition table will
  be automatically read when you insert a ZIP disk.

  If there was a ZIP disk in, you'll get the full information displayed,
  including a list of partitions defined on the disk and its Write
  Protect status. Here is a sample load-time message:



  vger:~# insmod imm
  imm: Version 0.18
  imm: Probing port 03bc
  imm: Probing port 0378
  imm:     SPP port present
  imm:     ECP with a 16 byte FIFO present
  imm:     PS/2 bidirectional port present
  imm:     Passed Intel bug check.
  imm: Probing port 0278
  scsi0 : Iomega ZIP Plus drive
  scsi : 1 host.
    Vendor: IOMEGA    Model: ZIP 100 PLUS      Rev: J.66
    Type:   Direct-Access                      ANSI SCSI revision: 02
  Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
  SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
  sda: Write Protect is off
   sda: sda1
  vger:~#



  One last remark to mention that this version of the driver also locks
  the drive door while the disk is mounted. If the eject button is
  pressed in this situation, nothing happens, but the drive "remembers"
  and ejects the disk as soon as it is dismounted.



  4.5.  ATAPI version

  This drive is described at
  <http://www.iomega.com/product/zip/zipatapi.html>

  There was an IDE version of the drive produced for a while.  I think
  that for the most part this has been replaced by the ATAPI version.

  Donald Stidwell sent in these comments on the ATAPI version. Thanks
  Don.

  I use an ATAPI Zip drive and it works with both 2.0.32 and 2.0.33
  kernels.  I've used it under both RH 5.0 and OpenLinux 1.2 (my current
  used distribution).  To get it to work under OpenLinux, I just enabled
  ATAPI floppy support in the kernel.  OpenLinux does not have this
  support compiled in by default.

  No other drivers are needed.  It will mount as an extended partition
  on partition 4.  I.E, mine mounts on HDB4.  I mount it under /mnt/zip
  as noauto, although I don't suppose there would be any real problem
  with automounting.  I just wonder about ejecting disks.  I always
  dismount the drive before ejecting a cartridge.

  There are more detailed instructions for the ATAPI install in the
  Linux Gazette May 1998 issue. See the 2 cent tip section.


       <url url="http://www.linuxgazette.com/issue28/lg_tips28.html#atapi">



  4.6.  IDE version


  I have not used the IDE version. Eric Backus sent in these comments.
  Thanks Eric.

  I have one of these.  It came with my Gateway 2000 computer a year
  ago.  I think most of these were shipped by large OEM companies like
  this, before the ATAPI version of the ZIP drive was available.

  The good news about this drive: no kernel modules or modifications are
  needed to support it.  It looks to the kernel like an IDE hard drive.
  It worked for me with no effort with kernel 2.0.31 and 2.0.32.

  The bad news about this drive: because it doesn't use ATAPI, you can't
  use the SCSI-to-ATAPI translation, which means you can't use mtools to
  write-protect disks (or to eject them, for that matter).



  4.7.  USB version

  This drive is described at
  <http://www.iomega.com/product/zip/imac.html>

  These drives look very cool and the USB interface also looks good. The
  only problem is that the USB interface for Linux is still under
  development at this time. So for now, this drive is not usable under
  Linux. Check this address for updates.

  <http://peloncho.fis.ucm.es/~inaky/USB/news.html>


  4.8.  ZIP250 version

  This drive is desribed at
  <http://www.iomega.com/product/zip/zip250.html>

  This drive is new as of January 1999. I just bought one of these and
  it works very well in Linux. Just use the IMM driver from
  <http://www.torque.net/~campbell/imm.tar.gz> Set up the driver the
  same way as the zip plus. Mainly just download the driver, unpack it,
  and run make. Then copy the imm.o executable to the modules directory.
  For example /lib/modules/2.0.35/scsi (The 2.0.35 is your kernel
  version). If you are not sure of the version do uname -r.



  5.  Using the ZIP drive

  If you have built in all the required components, the kernel should
  recognize your adapter and drive at boot time.  If you are using a
  loadable module for your driver, the following discussion applies once
  that module is loaded.

  For the most part, the SCSI and parallel versions of the drive behave
  identically, except that the parallel version is somewhat slower.



  5.1.  Fdisk, mke2fs, mount, etc.

  Once you know the drive name for your ZIP drive, you are set.  You can
  manipulate the drive with the normal Linux disk management commands.
  fdisk (or perhaps cfdisk) is used to manipulate the partition tables
  on the disk.  mke2fs can be used to format a partition with the ext2
  filesystem - the one most commonly used in Linux.  mount is used to
  connect a formatted partition into your directory hierarchy.
  You should study the manual pages for these tools if you are not
  familiar with them.  Be warned that there are now several quite
  different versions of the fdisk program - be careful.

  I'll describe two common scenarios.


  5.2.  An existing DOS formatted disk

  If you have a ZIP disk with a DOS file structure that was originally
  created by Iomega's tools, the partition scan should say that the disk
  has one partition, /dev/sda4.

  You should make a place to mount the disk, lets say /zip, and then
  mount it as an MS-DOS filesystem:



              mkdir /zip
              mount -t vfat /dev/sda4 /zip



  You could also use msdos instead of vfat. vfat supports long filenames
  where msdos does not.  Now, the files on the disk should appear in
  /zip.  While the disk is mounted, you will not be able to remove it.
  When you are finished with the disk you can umount it to release it
  and detach it from your directory hierarchy.



              umount /zip



  Once you've made the /zip mount point - you don't need to do it again,
  so you could come back later and mount something else there.


  5.3.  Re-format as a native Linux disk


  If you want to erase a ZIP disk and make a Linux native file system on
  it.  You should use fdisk on the entire disk:



              fdisk /dev/sda



  and delete any existing partitions (with the d command).  Then create
  a new partition with the n command, make it primary partition number
  1, use w to write the partition table to disk, and quit with q.

  Format the partition



              mke2fs /dev/sda1



  (The 1 is the number that you gave this partition in fdisk).  Now you
  can mount the disk:



              mount -t ext2 /dev/sda1 /zip



  (re-using that mount point we created before).


  5.4.  fstab entries

  The /etc/fstab allows you to configure the mount command. I like to be
  able to mount and write to the zip disk from any login id on the
  system. I added 2 lines to the end of the fstab file that look like
  this.


     /dev/sda1    /zip            ext2            noauto,rw,user,nosuid,sync
     /dev/sda4    /zipdos         vfat            noauto,rw,user,nosuid,sync,mode=0777



  These entries assume that you have a /zip and a /zipdos directory. If
  you want all users ids to read and write, make sure you set the
  permissions.  For exmaple  chmod 666 /zip . You must do the chmod as
  root.  The fstab entries also assume that your dos disks are
  partitioned as 4 (sda4 in my case), and the ext2(linux) disks are
  partitoned as 1 (sda1).  You can read more about the fstab options
  with man mount

  With the fstab entries as above you can mount a dos disk with
   mount /zipdos If you are using a linux ext2 disk then use the command
   mount /zip



  5.5.  The ZIP Tools disk


  There is some extra work to be done if you want to use the disk that
  comes with the ZIP drive.  As shipped, the software controlled write
  protection is enabled.  Most people have unlocked the disk under DOS
  before ever trying to use it with Linux.  Linux cannot access a locked
  disk, and it must be unlocked with Iomega's tools.

  A native Linux program to manage the write protection feature, among
  other things, is expected to be available soon.



  6.  Performance

  With the standard version of the 2.0.x kernels you get the 0.26
  version of the ppa.c program. This is a very reliable simple program.
  It has gotten a lot of use and abuse and held up rather well. The only
  bad thing about this program is that it's not very fast. On my machine
  I have version 2.0.30 kernel, and 2 parallel ports. This is also a
  low-buck machine pentium 133 - 16 meg memory, 5 gig maxtor eide hard
  drive. The machine cost me 500. U.S. Dollars and the drive was 250. I
  am cheap but so what.

  I had the ZIP drive on the second port and the printer on the first
  port. The second port was an old add in card, no epp mode. This made
  the driver run in 4 bit mode.

  To base line the performance I copied the netscape tar file from the
  hard drive to the zip drive. This file is about 10.6 meg.  Time 7
  minutes 15 seconds. Going from the zip drive to the hard drive was
  about 7 minutes even. Not exactly setting the world on fire.

  I then made 2 changes. First I switched the ZIP drive to the first
  port and went into the bios and set EPP mode on for the first port.
  At the same time I hooked up the printer to the 2nd port.

  Second change I went out and downloaded the new version of the program
  from  David Campbells page <http://www.torque.net/~campbell/> Then I
  installed this program. Check out the readme file that is included.

  Then I ran the same test again of copying the Netscape tar file to and
  from the ZiP drive. The copy to the C drive was 1:55 seconds. From the
  hard drive to the Zip drive was 1 minute flat. This compares to 7:15
  and 7:00 with the old program. This was a big improvement over the
  0.26 program.  This was also using the zip drive as a vfat file type.

  Next I formated a zip drive in ext2 format. Ran the same test again.
  The copy going to the hard drive was only 50 seconds. The copy from
  the hard drive to the Zip drive was only 40 seconds.

   Performance Summary

  For this test case of moving a 10.6 meg file, the 4 bit standard port
  mode and program version 0.26 is the slowest 7:00 and 7:15

  The new program (1.41) and EPP mode with ext2 file types is the
  fastest at 50 seconds and 40 seconds.



  7.  Frequently asked questions

  These are some of the questions that we get asked a lot.  Please read
  the answers here before asking them again !


  7.1.  Can I plug a printer into the parallel ZIP drive ?

  Yes, but.  Currently, you cannot have both the lp and ppa drivers
  active on the same parallel port.  A resource sharing protocol has
  been designed and is in the early stages of implementation, but will
  not be available before Linux 2.0 is released.

  If you like living on the bleeding edge of things, get the 2.1.x
  kernel and you can have port sharing. See
  <http://www.cyberelk.demon.co.uk/parport.html>

  The easy way to do this with 2.0.x kernel is to have 2 parallel ports.
  I bought my second one for about 15 dollars and it works great.  You
  can use one for printing and one for your ZIP drive.  Just build a
  kernel with both the lp and ppa drivers as modules. I use the newer
  (1.41) version of ppa, so I just load ppa first (insmod ppa). It then
  finds the zip drive on the first port.  Then I load lp (insmod lp) and
  it assigns the printer to the second port.

  If you use the 0.26 version of the program then upgrade to 1.41 or
  newer.  The only answer you will get on qustions about this driver is
  to upgrade the program.

  7.2.  Do you plan to support EPP/ECP ports in PPA ?


  Version 0.26 of the program does not support EPP. Version 1.41 does
  support the EPP. This program is also much faster. See the performance
  section for more details.


  7.3.  Can I run Linux from a ZIP drive ?

  People have done this. It would seem this might make a great rescue
  disk or a way to test an install.

  <http://metalab.unc.edu/LDP/HOWTO/mini/ZIP-Install.html>



  7.4.  Can I boot from the ZIP drive ?

  This depends on what you are using for a host adapter.  If your host
  adapter has a BIOS ROM with code that can boot from target 5 or 6,
  then yes, you can boot from the SCSI ZIP drive.  You cannot boot from
  a parallel port drive.

  If you have DOS on your main disk and want to boot Linux from a ZIP
  disk, you can do this using the LOADLIN boot loader.  Your kernel
  image must be somewhere on the DOS disk, but the rest of your Linux
  system could be on the ZIP.  Make sure that the kernel you use has the
  correct drivers built in.

  As far as I am aware, there are no installation boot floppies for any
  of the popular distributions that contain the parallel ZIP driver.


  7.5.  Why does Iomega use partition number 4 ?

  This is one of the most popular questions, but I don't think anyone
  has a definite answer to this one.  Could be they had their head where
  the sun don't shine. Maybe there is no reason.


  7.6.  How can I have the disk mounted at boot time ?

  All you need to do is to add a line to your /etc/fstab file.  For
  instance, if you will always have a DOS disk in the drive when you
  boot, you could put



              /dev/sda4   /zip  vfat  defaults  0 0



  in the fstab.  Depending on your distribution, the initialization
  scripts might try to run fsck on partitions listed in your fstab.  Be
  aware that this could cause problems if you forget to put the disk in
  the drive when you boot, or have the wrong disk there.


  7.7.  What happens if there is no disk inserted when I boot ?

  The kernel will try to read the partition table, but the operation
  will time out.  There is nothing to worry about.  Once you have
  inserted a disk, and try to do something with it the kernel will
  notice that there is a disk there now and rescan the partition table.
  HINT: when you change disks, it is a good idea always to use fdisk to
  check the partition structure on the new disk.

  The BIOS on some SCSI host adapters will attempt to read the partition
  table on your disk during the system boot.  If you cannot disable this
  check, you may be forced always to boot with a disk in the drive.


  7.8.  Can I use the parallel drive as a real SCSI disk ?

  The PPA-3 parallel-to-SCSI adapter is implemented as a single ASIC
  chip that Iomega calls a VPI0.  It is embedded on the ZIP drive's
  controller card.  There is an actual SCSI bus present, but not in a
  useful form.

  Although I haven't tried to compare the two cards, it seems logical
  that the VPI0 replaces the conventional electrical buffering circuits
  that would be required if the SCSI bus were extended outside the
  package.



  7.9.  Can PPA be used with Iomega's parallel port tape drives ?

  No.  Those drives are floppy-tape drives. There is no SCSI involved.

  Several people have indicated an interest in applying my methods to
  try to determine the protocol and develop a driver for these tapes.
  The first step in that process is to get the DOS driver working under
  DOSemu.  I have not yet heard that anyone has been successful in doing
  it.


  7.10.  Will PPA work with the parallel port SyQuest EZ135 ?

  No. The EZ135 is an IDE drive with a ShuttlePort parallel to IDE
  converter embedded in it.

  However there has been some work done on this driver. Check out

  <http://www.torque.net/linux-pp.html>



  8.  Getting more current information

  More current versions of the parallel port zip drive (ppa.c) program
  and current technical information of the driver can be found at

  <http://www.torque.net/~campbell/>

  Information of many parallel port external device drivers can be found
  at

  <http://www.torque.net/linux-pp.html>

  Parallel Port sharing or through-port information is found at

  <http://www.cyberelk.demon.co.uk/parport.html>

  Installing Linux from a zip drive (for machines without a CD)

  <http://metalab.unc.edu/mdw/HOWTO/mini/Install-From-ZIP.html>

  An X frontend to the ziptool program can be found at

  <http://www.scripps.edu/~jsmith/jazip/>

  Information on configuration of Lilo can be found at

  <http://metalab.unc.edu/mdw/HOWTO/mini/LILO.html>

  Information on using bootprompts can be found at

  <http://metalab.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html>

  If you want to install the Linux OS onto a Zip Drive and run the OS
  from the Zip drive

  <http://metalab.unc.edu/LDP/HOWTO/mini/ZIP-Install.html>

  Iomega's web pages are at

  <http://www.iomega.com/>.

  And if you are looking for general information about parallel port
  programming for the PC, you might want to visit

  <http://www.lvr.com/parport.htm>



  Installing Linux on ZIP disk using ppa ZIP Drive Mini-Howto
  John Wiggins, jwiggins@comp.uark.edu
  v0.7, 26 January 1998

  This document is only useful for those with the printer port version
  of a ZIP drive who wish to have either a portable or backup Linux sys
  tem on a ZIP disk.

  1.  Disclaimer

  NOTE: I have no idea if the IDE drive works the same way as the
  printer port version does since I don't have one, so please don't ask
  me.

  The Debian install portion was basically just copied with little or no
  editing by this author.  As such, there may be some duplication of
  instructions.

  This document assumes the following:

    You have a printer port ZIP drive (since the ZIP Plus has both, I
     assume that it will work as well.)

    You already have Linux installed and running; this document is not
     for a first time install of Linux.

    You have ppa support in your current kernel or if module, the ppa
     module has been loaded.

    The mount point for the ZIP disk is the /iomega directory.

  2.  Introduction

  This document is divided into four basic sections each describing how
  to install a bare-bones Linux system on a 100MB ZIP disk using a
  printer port ZIP drive.  The first section describes how to set up the
  ZIP disk and is common to both Red Hat and Slackware distribution
  installations.  The second, third, and fourth sections describe how to
  install Red Hat 4.2, Slackware 2.2, and Debian 1.2 distributions,
  respectively, onto the ZIP disk.

  NOTE: I realize that Red Hat 5.0 has been released now, but between
  classes and work, well let's just say that it may be late May before I
  can get around to work on it.  I also, hopefully, will be testing out
  the other distributions.

  2.1.  What's new

  I've finally found enough time (although I really should be studying
  for a sociology test...) to update this document.  Thanks for all who
  emailed me with comments.

  New to this document:

    The Debian distribution

    LILO on the floppy

    New version of Red Hat (4.2 Biltmore)

    Network configuration (For Red Hat; Untested)

  2.2.  Conventions

  Indicates the following text are commands:

  ==> Indicates something noteworthy:

       ______________________________________________________________________
         NOTE:
       ______________________________________________________________________

  Indicates a screen shot/capture:

       ______________________________________________________________________
             Text here.
       ______________________________________________________________________

  2.3.  Updates

  For any updates, however rare they may be, please check:
  http://comp.uark.edu/~jwiggins/linuxZIP/

  2.4.  References

    Installation-HOWTO

    SCSI-HOWTO

    NET-3-HOWTO (for section 4.3.3)

    ZIP-Drive (mini-HOWTO)

    ParPort kernel patch (gives access to pass-through printer port)
     http://www.cyberelk.demon.co.uk/parport/

  2.4.1.  Acknowledgments/Contributors

  Slackware 2.2 section courtesy of Michael Littlejohn
  mike@mesa7.mesa.colorado.edu

  Debian 1.2 section courtesy of John D. Blair jdblair@uab.edu

  LILO information and many other helpful insight courtesy of Darcy
  Boese possum@niagara.com and Javier Rodriguez
  jrodrigu@nextgeninter.net.mx

  3.  Setting up the ZIP disk

  (Common for both Red Hat and Slackware distributions.)  Before
  starting, make sure that you have access to the ZIP  drive; either by
  having ppa in the kernel or by having the ppa module loaded.  One easy
  way to find this out is by checking dmesg:
   ==> dmesg

  You may have to pipe this to more as dmesg tends to be rather long.
  Here's a snip from mine:

       ______________________________________________________________________
       scsi0 : PPA driver version 0.26 using 4-bit mode on port 0x3bc.
       scsi : 1 host.
         Vendor: IOMEGA    Model: ZIP 100           Rev: D.08
         Type:   Direct-Access                      ANSI SCSI revision: 02
       Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
       SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
        sda: Write Protect is off
        sda: sda1 sda2
       ______________________________________________________________________

  If you only see something like:

       ______________________________________________________________________
          scsi : 0 hosts.
          scsi : detected total.
       ______________________________________________________________________

  then you have SCSI support but the ZIP wasn't found.

  3.1.  Partitioning ZIP disk

  To partition the ZIP disk, run fdisk:

   ==> fdisk /dev/sda/

  Here is a snap of the partition table I have setup:

       ______________________________________________________________________
        Disk /dev/sda: 64 heads, 32 sectors, 96 cylinders
        Units = cylinders of 2048 * 512 bytes

           Device Boot   Begin    Start      End   Blocks   Id  System
        /dev/sda1            1        1       81    82928   83  Linux native
        /dev/sda2           82       82       96    15360   82  Linux swap
       ______________________________________________________________________

  I decided to use a swap partition since I wanted to be able to use
  this with any machine.

  3.2.  Formatting and mounting the ZIP disk

  After running fdisk, format the new partition:

   ==> mke2fs -c /dev/sda1

  Then, create the swap partition: (15360 blocks as taken from fdisk)

   ==> mkswap -c /dev/sda2 15360

  Last, you'll need to mount the ZIP disk:

   ==> mount /dev/sda1 /iomega -t ext2

  3.3.  Creating the boot disk

  Since the ppa version of the ZIP drive isn't a true SCSI device, it
  isn't a bootable device and, therefore, requires a boot disk which has
  ppa included in the kernel and not as a module.

  3.3.1.  Configuring and making the kernel

  First, you'll need to configure and make a kernel that has ppa support
  enabled and not as a loadable module.  In order to get to the ppa
  option, select SCSI support:

   SCSI support (CONFIG_SCSI) Y/m/n/?

  Plus, SCSI disk support:

   SCSI disk support (CONFIG_BLK_DEV_SD) Y/m/n/?

  And finally, under the SCSI low-level drivers, is the ppa support:

   IOMEGA Parallel Port ZIP drive SCSI support (CONFIG_SCSI_PPA) Y/m/n/?

  Again, be sure not to include ppa as a module, but rather in the
  kernel.  Thus far, without the use of the parport kernel patch (see
  1.4), the ppa driver will not allow the passive port of the ZIP drive
  to be used for a printer, so you may want to say no to parallel
  printer support:

   Parallel printer support (CONFIG_PRINTER) N/y/m/?

       ______________________________________________________________________
         NOTE: For more information concerning the ppa driver, please
               refer to the ZIP-Drive mini-HOWTO.
       ______________________________________________________________________

  Once the kernel is configured, make the kernel:

   ==> make dep; make clean; make zImage

  The new kernel should be found in arch/i386/boot/zImage.

  3.3.2.  Getting the kernel to a floppy

  After having to have 4 separate floppies due to different kernels and
  needing different parameters, (plus the great email I got telling me
  how to do this) I have included a section on LILO as one of the means
  of creating a bootable floppy.

  3.3.2.1.  LILO installation

  For those who have to, or for that matter just want to, have several
  kernels on one floppy (now adays, mine are too large) or just want to
  be able to pass arguments (such as single user mode) I received email
  on how to install LILO on a floppy.

  3.3.2.1.1.  Creating the ext2 filesystem

  To create an ext2 filesystem on a floppy, just do the same command for
  the ZIP disk:

   ==> mke2fs -t /dev/fd0

  3.3.2.1.2.  Copying the essential files

  Next, make sure there's a directory for a mount point, and mount the
  floppy (I used /mnt/floppy):

   ==> mount /dev/fd0 /mnt/floppy -t ext2

  is to boot properly, you'll need the same files that LILO uses on your
  current Linux installation.

       ______________________________________________________________________
           NOTE: The file locations here are from my machine
                 and may not be the same for everyone.
       ______________________________________________________________________

   ==> cp /boot/boot.b /mnt/floppy

   ==> cp /boot/map /mnt/floppy

   ==> cp /usr/src/linux/arch/i386/boot/zImage /mnt/floppy/vmlinuzDESK

  Now to create the config file for LILO, now I miss the liloconfig
  program... (Thanks to Javier Rodriguez for this info) First, create
  the LILO config file, /mnt/floppy/lilo.conf, for the kernel(s) for the
  ZIP disk.  Here's what I used so that I could have different kernels
  to test with:

  ______________________________________________________________________
  boot=/dev/fd0
  map=/mnt/floppy/map
  install=/mnt/floppy/boot.b
  prompt
  compact
  timeout=50
  image=/mnt/floppy/vmlinuzLAP
     label=Laptop
     root=/dev/sda1
     read-only
  image=/mnt/floppy/vmlinuzDESK
     label=Desktop
     root=/dev/sda1
     read-only
  image=/mnt/floppy/vmlinuzDESK
     label=rescue
     root=/dev/hdc1
     read-only
  ______________________________________________________________________

  I have two kernels, one for my 486 laptop which required the math-co
  emulation in the kernel and the other for my desktop.  The rescue
  allows me to make an emergency boot to the hard drive.

  Last but not least, with the floppy still mounted, run LILO to install
  it on the floppy with the command:

   ==> lilo -C /mnt/floppy/lilo.conf

  Once LILO has been installed on the floppy, skip the next two steps,
  unless you enjoy doing this over again :)

  3.3.2.2.  Kernel only installation

       ______________________________________________________________________
          NOTE: This does not pertain for the LILO install.
       ______________________________________________________________________

  Copy the newly made kernel to a floppy disk:

   ==> cp arch/i386/boot/zImage /dev/fd0

  or

   ==> cat arch/i386/boot/zImage > /dev/fd0

  Yes, there are many ways to copy the kernel to a floppy, but the last
  way, my favorite, is a little more encrypted.  Try not to forget the >
  unless you like viewing binary files :)

  3.3.2.2.1.  Setting the root and swap on the floppy

  ______________________________________________________________________
     NOTE: This does not pertain for the LILO install.
  ______________________________________________________________________

  Once the kernel is on the floppy, you need to set the root device to
  the ZIP disk:
   ==> rdev /dev/fd0 /dev/sda1 I'm not sure if the next option is
  needed, but I did it none the less.  To set the swap:

   ==> rdev -s /dev/fd0 /dev/sda2

  4.  Red Hat 4.2 installation

  With anything computer related, something 3 months old is considered
  obsolete and is in need of upgrading.  Since I'm not always going to
  have the time to update this document with every update, I'll try my
  best to at least update it every other version.  As for the other
  distributions, unless the authors wish to send updates, they well
  remain as they are.

  4.1.  Personal setup

  For my installation, I have and used:

    Kernel 2.0.30

    Iomega ppa disk drive

    Red Hat 4.2

  4.2.  Package installation

  When I first decided to attempt to install Red Hat on a ZIP disk, I
  figured it would be much easier to just use a Red Hat boot disk.  Then
  I woke up.  I came very close to actually getting a boot disk created,
  even got help from various folks at Red Hat via e-mail but ultimately
  I began to give up on the whole project when I discovered the --root
  option with rpm.

  4.2.1.  What packages to get

  I found what packages to install by browsing a file I had found on one
  of Red Hat's mirrors.  This file can be found on any mirror at:

         redhat/redhat-4.2/i386/RedHat/base/comps

  For this installation, I wanted to include network support but due to
  Red Hat's X network configuration, I'm going to have to manually
  configure, or rather manually attempt to configure, the network setup
  scripts found in /etc/sysconfig/ (see section 4.3.3.)

  I decided against installing any development packages as the ZIP
  drive, at least an unpatched kernel version, is rather slow to get
  anything to compile.  I also choose not to install X mainly for disk
  space issues.  Later on, I may attempt to mount my hard drive and
  create a symlink with /usr to see if I can get X to work.

  Following is a list of what packages I installed, listed in order of
  installation.  Those marked with a * have updates from Red Hat's
  errata.  In parentheses is the updated package number;

       e.g. NetKit-B-0.09-6 was updated to NetKit-B-0.09-8 so the entry
           would be: *91) NetKit-B-0.09-6 (-8)

  ______________________________________________________________________

        (List created by the command rpm --root /iomega -qa)

         1) setup-1.7-2                   2) pamconfig-0.51-2
         3) filesystem-1.3-1              4) MAKEDEV-2.2-9
         5) adduser-1.7-1                 6) libc-5.3.12-18
         7) SysVinit-2.64-8               8) ash-0.2-8
         9) at-2.9b-2                    10) libtermcap-2.0.8-4
        11) bash-1.14.7-1                12) bc-1.03-6
        13) bdflush-1.5-5                14) cpio-2.4.2-4
        15) cracklib-dicts-2.5-1         16) tmpwatch-1.2-1
        17) crontabs-1.5-1              *18) db-1.85-10 (-11)
        19) dev-2.5.1-1                  20) diffutils-2.7-5
        21) etcskel-1.3-1                22) file-3.22-5
        23) fileutils-3.16-1             24) findutils-4.1-11
        25) grep-2.0-5                   26) groff-1.10-8
       *27) ld.so-1.7.14-4 (-5)          28) getty_ps-2.0.7h-4
        29) gzip-1.2.4-7                 30) mingetty-0.9.4-3
       *31) initscripts-2.92-1 (93-1)    32) ed-0.2-5
        33) info-3.9-1                   34) ncurses-1.9.9e-4
        35) libg++-2.7.1.4-5            *36) pwdb-0.54-3 (-4)
        37) rootfiles-1.5-1             *38) pam-0.57-2 (-4)
        39) redhat-release-4.2-1         40) less-321-3
        41) mount-2.5l-2                 42) zlib-1.0.4-1
        43) rpm-2.3.11-1                 44) e2fsprogs-1.10-0
        45) sysklogd-1.3-15              46) tar-1.11.8-11
        47) passwd-0.50-7                48) gawk-3.0.2-1
        49) gdbm-1.7.3-8                 50) gpm-1.10-8
        51) hdparm-3.1-2                 52) kbd-0.91-9
        53) slang-0.99.37-2              54) newt-0.8-1
        55) kbdconfig-1.4-1              56) ncompress-4.2.4-7
       *57) sh-utils-1.16-4 (-5)         58) procinfo-0.9-1
       *59) logrotate-2.3-3 (4-1)        60) lilo-0.19-1
        61) losetup-2.5l-2               62) linuxthreads-0.5-1
       *63) mkinitrd-1.6-1 (7-1)         64) mailcap-1.0-3
       *65) man-1.4h-5 (j-1)             66) mt-st-0.4-2
        67) modules-2.0.0-5              68) mailx-5.5.kw-6
        69) net-tools-1.32.alpha-2       70) procmail-3.10-10
        71) procps-1.01-11               72) psmisc-11-4
        73) quota-1.55-4                 74) readline-2.0-10
        75) sed-2.05-6                   76) setconsole-1.0-1
        77) sendmail-8.8.5-4             78) shadow-utils-960530-6
        79) stat-1.5-5                   80) tcsh-6.06-10
        81) termcap-9.12.6-5             82) textutils-1.22-1
        83) time-1.7-1                   84) timeconfig-1.8-1
        85) util-linux-2.5-38            86) vim-4.5-2
        87) vixie-cron-3.0.1-14          88) which-1.0-5
        89) zoneinfo-96i-4               90) tcp_wrappers-7.5-1
       *91) NetKit-B-0.09-6 (-8)        *92) lpr-0.18-1 (19-1)
       *93) bind-4.9.5p1-2 (9.6-1)      *94) bind-utils-4.9.5p1-2 (9.6-1)
       *95) wu-ftpd-2.4.2b12-6 (b15-1)   96) anonftp-2.3-3
        97) zip-2.1-1                    98) unzip-5.12-5
        99) statserial-1.1-7            100) minicom-1.75-2
       101) lrzsz-0.12.14-1             102) dip-3.3.7o-9
       103) ppp-2.2.0f-3                104) portmap-4.0-3
       105) perl-5.003-8               *106) traceroute-1.0.4.4bsd-2 (1.4a5-1)
      *107) elm-2.4.25-7 (-8)           108) lynx-2.6-2
       109) ncftp-2.3.0-5               110) pine-3.95-2
       111) rdate-0.960923-1            112) apache-1.1.3-3
      *113) nfs-server-2.2beta16-7     *114) nfs-server-clients-2.2beta16-7
            (2.2beta16-8)                    (2.2beta16-8)
  ______________________________________________________________________

  And with all the above installed, I still have 32MB left!

  4.2.1.1.  Updates; errata

  As many, I hope, Red Hat users know, some packages may be found to
  have some security flaws or anything else which may cause issues to
  arise.  For this reason, Red Hat releases updates for such packages.
  I have updated what packages I had which had updates and are marked in
  the above list.  Please refer to Red Hat's web page concerning the
  updated packages at:

  http://www.redhat.com/support/docs/rhl/rh42-errata-general.html

       ______________________________________________________________________
          NOTE: Before you can update the packages, you'll have to
                run the ldconfig as described in section 3.3.1.1.
       ______________________________________________________________________

  4.2.2.  How to install packages with rpm; without glint

  With rpm, use the --root option to specify the mounted directory as
  the root for installation.  I had discovered that many packages were
  failing to install becuase of preinstall or postinstall scripts that
  weren't executing correctly due to the different root directory, thus,
  use the --noscripts option:

   ==> rpm --root /iomega -i --noscripts PACKAGE.i386.rpm

  As I'm sure many will notice, you should get an error message like:

       ______________________________________________________________________
         failed to open /iomega/var/lib/rpm/packages.rpm

         error: cannot open /iomega/var/lib/rpm/packages.rpm
       ______________________________________________________________________

  So, just create the var/lib/rpm directory :)

   ==> mkdir /iomega/var; mkdir /iomega/var/lib; mkdir
  /iomega/var/lib/rpm

  4.2.3.  Which came first, pamconfig or pam?

  If anyone's tried to install pamconfig, it'll complain about a failed
  dependency of pam; and when you go try to install pam, pam complains
  about a failed dependency of pamconfig!  This, being the chicken or
  the egg issue, puzzled me for a while, but thanks to the --nodeps
  flag, we can force pamconfig to install; besides pam has more failed
  dependencies than just pamconfig.

   ==> rpm --root /iomega -i --nodeps --noscripts pamconfig-0.51-2

  4.3.  Problems after installation of packages

  Once everything is all nicely installed, unfortunately, the disk is
  not fully functionable, if that's a word.  What I mean to say is, if
  you try to boot now with the floppy, you won't get very far.  As soon
  as init tries to start up, you'll get two lovely errors; both of which
  complain about some files not being found that would have been made
  had the scripts been run.

  4.3.1.  The case of the missing /etc/ld.so.cache and libc.so.5

  If you tried booting, you'd get two error messages, the first will be
  the abscence of /etc/ld.so.cache file.  The second complains about a
  missing libc.so.5.

  4.3.1.1.  /etc/ld.so.cache

  As mentioned by many readers, my previous instructions didn't quite
  work as stated.  In order to get this file created, you'll have to run
  ldconfig while the ZIP disk is still mounted:

   ==> chroot /iomega /sbin/ldconfig

  Thanks to Javier Rodriguez for this solution.

  4.3.1.2.  libc.so.5

  To solve the missing lib case, you'll have to create a symlink which
  would have been created by the installation scripts.

   ==> cd /iomega/lib; ln -s libc.so.5.3.12 libc.so.5

  Thanks to Darcy Boese for this solution.

  4.3.2.  Setting root password

  Just as ldconfig was ran in 4.3.1.1, you might as well change/create a
  root password for this new system:

   ==> chroot /iomega passwd root

  4.3.3.  What the install program created

       ______________________________________________________________________
              NOTE: This is just a very brief setup, one which I haven't
                    been able to test to see if it works.  In theory it
                    should, but please do not send me complaints saying
                    that this didn't work.
       ______________________________________________________________________

  While exploring my Red Had 4.2 CD-ROM, I came across something rather
  interesting; the source code for the install program.  I found it
  under /misc/src/install and one thing which I found of some use was
  the net.c file.  In this, I found what other files that would be
  created had the install program been run.  Most of these just give
  network support (hince the name net.c) but even if you don't have a
  network card, you can still use localhost for networking (plus apache
  will complain about not being able to determine a hostname.)  These
  files include:

             /etc/hosts
             /etc/HOSTNAME
             /etc/resolv.conf
             /etc/sysconfig/network
             /etc/sysconfig/network-scripts/ifcfg-eth0
             (or any other network device you may have.)

  4.3.4.  Networking setup

  For this document, I wanted network support for my 3Com 3c595 fast-
  ethernet card (which for the last several months has been used in
  another machine.)

  First I needed a name, and since I'm running my own name server (which
  is another long story) I gave myself the name: dash-dot.wig.org (I
  just liked the sound of it.)  Having a name without an IP is kind of
  pointless, so I used a reserved non-internet usable network of
  192.168.10.0 which my name server also uses.  Even though the hostname
  is typically stored in /etc/HOSTNAME, Red Hat checks for
  /etc/sysconfig/network for this name; so let's start there.  Sample of
  my /etc/sysconfig/network:

       ______________________________________________________________________
         NETWORKING=yes
         HOSTNAME=dash-dot
         DOMAINNAME=wig.org
         GATEWAY=
         GATEWAYDEV=eth0
         NS1=192.168.10.7
       ______________________________________________________________________

  Next, bascially duplicate the same info here for /etc/HOSTNAME,
  /etc/resolv.conf, and /etc/hosts:

  /etc/HOSTNAME:

       ______________________________________________________________________
       dash-dot.wig.org
       ______________________________________________________________________

  /etc/resolv.conf:

  ______________________________________________________________________
  search wig.org
  nameserver ns.wig.org
  ______________________________________________________________________

  /etc/hosts:

       ______________________________________________________________________
       127.0.0.1 localhost
       192.168.10.99 dash-dot.wig.org dash-dot
       192.168.10.7  ns.wig.org ns
       ______________________________________________________________________

  Red Hat configures all network devices from scripts found in
  /etc/sysconfig/network-scripts.  The configuration of any network
  device is usually first created via the install program so I had to
  create these config files manually.  They all begin with ifcfg-XXX
  where XXX is the network interface which ifconfig brings up; e.g.
  ppp0, eth0, etc.  For this example, I had to create a file called
  ifcfg-eth0 which contains the following:

       ______________________________________________________________________
         DEVICE=eth0
         ONBOOT=yes
         BOOTPROTO=none
         BROADCAST=192.168.10.255
         NETWORK=192.168.10.0
         NETMASK=255.255.255.0
         IPADDR=192.168.10.99
       ______________________________________________________________________

  And last but not least, in order to get this going right now, while in
  the /etc/sysconfig/network-scripts directory, just run:

   ==> ./ifup ifcfg-eth0 boot

  This will start the script which configures the network interface if
  that interface was set to start at 'boot' time.

  For further information, please refer to the NET-3-HOWTO document.

  5.  Slackware 2.2 installation

       ______________________________________________________________________
           NOTE: This portion has not been updated.
       ______________________________________________________________________

  5.1.  Requirements

    ZIP Disk and Drive (obviously)

    Kernel with ZIP support

    ZIP Howto (recommended)

    1.44" HD formated floppy

    1 to 2 hours of time

  5.2.  Installation

  Okay, now comes the fun part: Figuring out what files need to be on
  the system disk, and what packages that you want (and can fit) on your
  ZIP drive.

  I decided that the easiest way to get started was install Slackware
  directly to the ZIP drive.  I decided on this approach mostly because
  Slackware is a smaller distribution then Red Hat, and it would be
  easier to trim out what I didn't want.  That and the fact that I am
  using the Slackware distribution anyway made it an obvious choice.

  Installing Slackware onto the ZIP disk is easy, as root run the setup
  program, and choose /iomega as the install to partition, set the
  install from partition to where the Slackware sources are (cdrom,
  hardrive, etc), select install and follow the prompts.

  5.3.  What to install

  The hardest part is deciding what to add, and what not to add.
  Obviously, you'll need the 'A' series (Which is about 8 megs), the
  rest is up to you.

  I managed to trim down the Slackware release to a respectable
  installation of 70 megs, which included gcc/g++, perl, X11R6 (NOT ALL
  OF IT!), sendmail, online docs (Minus all the development man pages,
  but including all the howto's), and an assortment of other goodies,
  while leaving about 10 megs free for user files.  YMMV

  6.  Creating /etc/fstab

  (Common to both Red Hat and Slackware distributions)

  The last thing that needs to be done before rebooting is to create the
  fstab file on the soon to be root partion.  The following is what you
  should have as a minimum for /iomega/etc/fstab:

       ______________________________________________________________________
         /dev/sda1      /         ext2        defaults   1   1
         /dev/sda2      none      swap        sw
         none           /proc     proc        defaults   1   1
       ______________________________________________________________________

  Save the file, and reboot with the freshly made boot floppy and enjoy!

  (Special thanks to Mike for reminding me about this very important and
  crucial step. - John)

  7.  Debian 1.2 Installation

       ______________________________________________________________________
           NOTE: The author of this section sent this to me June, 11th 1997.
       ______________________________________________________________________

  7.1.  Requirements

    Ppa ZIP drive and disk.

    2 blank 1.44 floppy disks

    A complete set of Debian install disks (review the Debian install
     docs if you don't remember how to make these)

    A couple hours of time

  7.2.  Overview

  After spending a few hours wrestling with dpkg I decided it would be
  simpler to modify the Debian "Rescue" disk so that it would recognize
  the ppa ZIP drive.  This proved to be very easy.  You can then use
  this modified disk to procede through the normal Debian base system
  install.  Once you've completed installing the base system you can use
  a boot disk to start the new base system and complete the installation
  using dselect.  To use this technique you need to build two kernels -
  one with ppa and initial RAM disk support, and another without the RAM
  disk support.

  If you want, you can skip all the steps in section 2 and let the
  Debian install procedure handle formatting the ZIP disk for you.

  7.3.  Creating the modified Rescue disk

  The Debian rescue disk is a SYSLINUX style boot disk, which uses a DOS
  formatted floppy disk and a special boot loader to avoid loading MS-
  DOS.  These disks are very easy to modify to start your own custom
  boot configuration.  The Debian 'boot-floppies' package contains a set
  of scripts to automate the process of building boot disks.  However,
  its so simple I found it easier to do the process by hand.  This
  deviates a bit from the Debian philosophy, but I'm over it :).  There
  are brief instructions in the 'readme.txt' file of the Rescue floppy.

  7.3.1.  Use dd (or RAWRITE under DOS) to create a new Rescue disk.

  Review the Debian install docs if you don't remember how to do this.

  7.3.2.  Build a new kernel with ZIP ppa support

  Build a new kernel with ZIP ppa support (as in step 3.3.1), but also
  configure RAM disk and initial RAM disk support.  You also need to
  configure the msdos, fat, minix, ext2fs, and procfs filesystems.

  Also configure any modules that you would like in your final
  installation on the ZIP disk.

  Once the kernel is configured, build with:

   ==> make dep; make clean

   ==> make bzImage

  Build the modules with:

   ==> make modules

  You will install these later.

       ______________________________________________________________________
                 NOTE: Make sure that you are using 'make bzImage', and
                       not 'make zImage'.
       ______________________________________________________________________

  7.3.3.  Mount the new Rescue disk.

   ==> fdmount fd0

  or

   ==> mount /dev/fd0 /mnt

  or

   ==> whatever :)

  7.3.4.  Copy the kernel image

  Copy the kernel image (on the i386 platform it will be located at
  arch/i386/boot/bzImage) to 'linux' on the floppy disk.

  7.3.5.  Editing the 'rdev.sh' script

  Open the 'rdev.sh' script located on the Rescue floppy with your
  favorite editor. Change the last line: from--:

              'rdev /mnt/linux /dev/ram0'

  to--:

              'rdev /mnt/linux /dev/sda1'

  You will also have to change all occurences of /mnt/linux to the
  appropriate path.  Since I mount my floppies under /fd0, I had to
  change /mnt/linux to /fd0/linux.

  7.3.6.  Run this modified 'rdev.sh' script.

   ==> ./rdev.sh

  7.4.  Install the base system on the ZIP drive.

  Boot your modified Rescue disk.  If all goes correctly you will be
  presented with the familiar Debian menu based install process, except
  that now it is aware of your ppa ZIP drive.  Procede through this
  process as if you were installing the system on a normal hard drive,
  but mount /dev/sda1 as root and initialize /dev/sda2 as swap.

  There is one deviation from the standard install process-- don't
  install and/or configure any loadable modules. You will install the
  modules you built in step 7.3.2 later.

  7.5.  Creating the boot disk

  You can create the boot disk just as described in steps 3.3.1 to
  3.3.2, or, if you want, just use the "Create Boot Disk" option during
  the Debian install. I like this second option because I get another
  SYSLINUX boot disk, allowing me to edit the greeting message to
  describe the nature of my custom boot floppy and allow me to enter
  additional kernel arguments. You can even include help files,
  accessible via the functions keys. You may still wish to rebuild the
  kernel and modify this boot disk by hand later to remove the RAM disk
  support. Your call.

  7.6.  Reboot the system.

  Insert your boot disk and choose the 'Reboot' option from the install
  menu.

  7.7.  Configure the base system and complete the install process.

  When the system reboots you will have a slow but completely workable
  Debian base installation running off of your ppa ZIP drive.  Proceed
  normally with the installation at this point. I installed all the
  normal UNIX utilities, along with documentation sets, make, gcc,
  libraries, and various useful file manipulation utilities. The result
  is a very powerful emergency boot system that I can use to rescue any
  of the systems in our department in an emergency.

       ______________________________________________________________________
               NOTE: You'll at least need to install 'make' to
                     complete the next step.
       ______________________________________________________________________

  7.8.  Installing the modules you built in step 7.3.2.

  If you installed make in the last step, you should be able to mount
  the hard drive partition containing your kernel build, cd to the
  proper directory and run 'make modules_install'.  Here's how I did it:

   ==> mount /dev/hda2 /mnt

   ==> cd /mnt/usr/src/linux

   ==> make modules_install

       ______________________________________________________________________
               NOTE: You won't need to modify the /etc/fstab file, as explained
                     in step 5.  The Debian installation process has already
                     taken care of that.
       ______________________________________________________________________

  8.  Afterthoughts

  Whew, and sigh. After amassing 31 ZIP disks and a ZIP unleashed
  battery pack, my next experiment is to try to get pcmcia working for
  my laptop.

  call-back mini HOWTO
  by Pawel Skonecki, stona@fizyka.umcs.lublin.pl
  v1.1a, June 2000

  This document describes how to set up call-back by using the Linux
  system and modem. I would like to thank Anna for her patience.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 OPINION
     1.2 PUBLISHING

  2. Procedure

     2.1 PART I: Net at home ?
     2.2 PART II: The first steps with modem.
     2.3 PART III Call Linux
     2.4 PART IV Linux calls us
     2.5 PART V Summary


  ______________________________________________________________________

  1.  Introduction

  1.1.  OPINION

  I'll will be waiting for all opinions about this document. I have
  tried to gather information as complete as possible. Tell me when your
  find any mistakes. I'll be grateful to people who will send me any
  suggestions or corrections. Their contributions will make this
  document better.  I don't mind answering your questions but I'd rather
  you read the whole article first.


  1.2.  PUBLISHING

  This document can by published under the conditions of Linux
  Documentation Project. Get in touch with the author if you can't get
  this license.  This document is free.


  2.  Procedure

  2.1.  PART I: Net at home ?

  Most of us use the Internet in a place of work. However we offen need
  the net at home or outside the place of work. It may be possible that
  the work from home is cheaper then from a company building. I think
  that the best solution is to install call-back software on the Linux
  server. Call-back makes it possible to re-call index number at the
  cost of the company. I'll try to present how it works. An entitled
  person calls modem is varied for the first time in Linux server. Then
  on the user's side the "hang up modem" is switched on. At the same
  time Linux calls the user. User is verified again. We have connection
  and the server is charged. The user pays only for the initiation of
  connection. The double verification and extra options in the call-back
  program unable the unsuitable persons to charge our bill. We can
  restrict the access to the connection only to corporation network or
  Internet.  Call-back is very flexible. Below, I'll try to present the
  configuration of a call-back server on Linux system and I'll show you
  how to set up your computer for re-calling the connection.
  2.2.  PART II: The first steps with modem.

  The administrators prefer different modem but while buying a modem we
  should remember about certain rules:


    Don't buy the Win-Modem because it doesn't work with Linux

    The external modem works faster than the modem which is inside your
     computer

    The internal modem with ISA slot is better then the are with PCI
     slot (you can use your PCI slot for something different)

    Don't use Plug&Play modem. If you have it set off, Plug&Play
     options and set up modem on free com (read Plug&Play-HOWTO).


  When we have the suitable modem we have to set it up in our system.
  We have to check on which com our modem is. Then we have to make a
  symbolic link to this hardware and /dev/modem. For example, if we have
  the modem for the 2nd com we write:


  ln -s /dev/cua1 /dev/modem



  We check it


  lrwxrwxrwx 1 root uucp 9 Sep 19 19:10 /dev/modem -> /dev/cua1



  If we have the modem on different com we have to remember that


  /dev/cua0 is com1

  /dev/cua1 is com2

  /dev/cua2 is com3

  /dev/cua3 is com4



  For new kernels:


  /dev/ttyS0 is com1

  /dev/ttyS1 is com2

  /dev/ttyS2 is com3

  /dev/ttyS3 is com4



  Now, we check our configuration using the program minicom.



  2.3.  PART III Call Linux

  The first step to make the call-back on Linux accessible is to set up
  a suitable parameter in kernel. Then we check whether our kernel
  serves the protocol ppp. If you don't have ppp in your kernel or in
  module you will have to compile your kernel and add ppp. You will find
  more information in Kernel-HOWTO. OK. We have a good kernel.  Now, we
  have to set up software to our system. The call-back program is a part
  of mgetty-sendfax and ppp. You will find it all in your distribution.
  Because call-back system we have double verification and we create a
  user who will be running ppp on the side of server.


  pppuser:klkIOM89mn65H:230:PPP Dialin:/home/pppuser:/etc/ppp/ppplogin



  Then change the password. We have to add information abut password in
  the file /etc/ppp/pap-secrets (more in man pppd)


  pppuser * password_for_pppuser *



  This user doesn't have a usual shell but a file /etc/ppp/ppplogin.  We
  have to make it ourselves. for example vi /etc/ppp/ppplogin and we
  type:


  #!/bin/sh

  exec /usr/sbin/pppd -detach 192.168.1.1:192.168.1.2



  where the address 192.168.1.1 is the address of server with modem and
  the address 192.168.1.2 is the address which we assigned to our modem.
  We set up executable options for this file. Because we will use the
  ppp demon we have to set up the options for this demon. We edit file
  /etc/ppp/options:


  netmask 255.255.255.0

  proxyarp

  lock

  crtscts

  modem



  Proxyarp is the most important from the above options, because you can
  go to Internet by the modem in the server. The remaining options are
  used control your modem. Your user can work only in local network if
  you remove proxyarp option. You have to see PPP-HOWTO and man pppd for
  more information. We will set up our modem now. Our server must be
  ready to receive a connection after start. We edit file /etc/inittab
  and we add it's to modem on the 2en com.


  s1:2345:respawn:/sbin/mgetty ttyS1 -D /dev/ttyS1 vt100

  For the 1st com line looks as follows:


  s0:2345:respawn:/sbin/mgetty ttyS1 -D /dev/ttyS1 vt100



  We make init q. If we don't have information about any mistakes in
  logs we go to the next step. We come back to directory /etc/ppp and
  create options.ttyS1 (for modem com1 options.ttyS0)


  IP_local: IP_remote



  for our net it will be


  192.168.1.1:192.168.1.2



  We have done a lot work so far. Now, we check the file
  /etc/mgetty+sendfax/login.config. The most important line is:


  /AutoPPP/ - a_ppp /usr/sbin/pppd auth -chap +pap login detach kdebug 7 debug



  The remaining lines can be marked #.


  We have to set up suid for ppp demon, because pppuser has to run pppd
  and make interface work.


  chmod u+s /usr/sbin/pppd



  and its effect is:


  -rwsr-xr-x 1 root root 106892 Jan 11 1999 /usr/sbin/pppd



  I think that it is a good idea is to add it to cron becouse I had a
  problem after restart of my server pppd changed preference.  Our
  server will work as router. We have to enable IP forwarding and we add
  this line for the file /etc/rc.d/rc.local :


  echo "1" > /proc/sys/net/ipv4/ip_forward



  If you are RedHat user you can change in /etc/sysconfig/network from
  FORWARD_IPV4=false to FORWARD_IPV4=true.


  For verification we call to Linux. We use scripts for it. If we do
  this in MS Windows we mark options "call out a terminal after
  connection".  We login as pppuser with its password. I hope that all
  is OK.


  2.4.  PART IV Linux calls us

  We can already call our Linux. Now it's time Linux called us. It's not
  very diffucalt. We have to edit only two files. We create a file
  /etc/mgetty+sendfax/callback.conf and we leave it empty.


  Then we have to ask our users for their phone number. It's time to
  write the numbers we have connected earlier. In order to do it we edit
  /etc/mgetty+sendfax/login.conf and add line:


  call - - /usr/sbin/callback - S 123456



  where call is a pseudo-user needed to initiate the connection. The
  line in the /etc/mgetty+sendfax/login.conf puts in motion the program
  calling the given number (in this case it's 123456). The same
  procedures can be applied to other users. I'll try to explain how it
  works. When we call a server. It asks us to give verification. We
  login as pseudo-user, in this case it calls. The script in our
  computer hangs up the modem.  We wait and the connection is cut off.
  The program call-back starts working and recalls us. We verify
  ourselves again as pppuser with password. We combine the connection
  and interface ppp. That's all. The configuration of work-stations is
  very simple. When you have MS Windows, you have to install dial-up for
  your number. In the modem propriety we find "
  propriety--->extended---> extra options" where we write.


  &c0s0=1



  We close the window and call. We log in according to the description
  given above. If we want to use Linux, we must refer to the script.
  It's difficult to give only one good script for our Linux. A good
  configuration of ppp in the system is of primary importance. (You can
  call it as pppuser through the scripts first).The scripts below were
  whiten by A. Gozdz. I suggest putting everything to catalogue.  It is
  only my suggestion & you don't have to start the scripts here.
  Detailed information cocernig writing scripts on Linux can found in
  PPP-HOWTO.


  THESE SCRIPTS WORK WELL WITH SLACKWARE


  The configuration file of daemon ppp (an example for modem on com2)
  /etc/options



  lock

  defaultroute

  noipdefault

  modem

  /dev/cua1

  33600

  crtscts

  debug

  passive

  asyncmap 0



  and the specific scripts


    the first named /etc/ppp/ppp-call


     #!/bin/bash

     teksta="Connection failed"

     tekstb="Probably, You will be connect"

     # /sbin/setserial /dev/cua1 spd_vhi

     killall -INT pppd 2>/dev/null

     rm -f /var/lock/LCK* /var/run/ppp*.pid

     (/usr/sbin/pppd -detach /dev/ttyS1 115200 \

     connect "/usr/sbin/chat -v -f /etc/ppp/pppcallback" &) || \

     (echo $teksta; ls marsss >/dev/null; exit 1)

     echo $tekstb

     exit 0



    the second file called /etc/ppp/pppcallback



     TIMEOUT 60

     ABORT 'ERROR'

     ABORT 'BUSY'

     ABORT 'NO ANSWER'

     ABORT 'NO DIALTONE'

     ABORT '\nVOICE\r'

     ABORT '\nRINGING\r\n\r\nRINGING\r'

     
     TIMEOUT 75

     OK ATDT123456

     CONNECT ''

     ogin:-ogin: ppp_pseudouser


     TIMEOUT 180


     CONNECT ''

     TIMEOUT 20

     ogin:-ogin: pppuser

     sword:-sword password_for_pppuser



    You can ppp-call, now. :)


  THESE SCRIPTS WORK GOOD WITH LINUX RED HAT 6.x


    /etc/ppp/options


     lock

     defaultroute

     noipdefault

     modem

     33600

     crtscts

     debug

     passive

     asyncmap 0



    /etc/ppp/pppcallback


     TIMEOUT 5

     ABORT 'ERROR'

     ABORT 'BUSY'

     ABORT 'NO ANSWER'

     ABORT 'NO DIALTONE'

     ABORT '\nVOICE\r'

     ABORT '\nRINGING\r\n\r\nRINGING\r'

     
     TIMEOUT 40

     OK ATDT5376443 CONNECT ''

     ogin:-ogin: ppp-pseudo-user


     TIMEOUT 180


     CONNECT ''

     TIMEOUT 20

     ogin:-ogin: pppuser

     sword:-sword password_for_ppuser



    /usr/bin/ppp-call


     #!/bin/bash

     teksta="Connection failed"

     tekstb="Probably, You will be connect"

     # /sbin/setserial /dev/cua1 spd_vhi

     killall -INT pppd 2>/dev/null

     rm -f /var/lock/LCK* /var/run/ppp*.pid

     (/usr/sbin/pppd -detach call ppp_call &) || \

     (echo $teksta; ls marsss >/dev/null; exit 1)

     echo $tekstb

     exit 0



    You can run ppp-call, now. :)


  If you have M$ Windows you can use this script for conection. I don't
  test it (I use terminal) you can ask some more Adrian Debkowski
  (adrian@cr-media.pl).


  proc main

  delay 1

  waitfor "ogin:"

  transmit "call^M"

  waitfor "RING"

  transmit "ATA^M"

  waitfor "CONNECT"

  waitfor "ogin:"

  transmit "pppuser^M"

  waitfor "word:"

  transmit "ppp^M"

  endproc



  2.5.  PART V Summary

  The Configuration of call-back is not complicated. The most important
  thing is a proper arrangement of ppp server on Linux. I don't know a
  better way of setting up an access - server. The configuration
  presented above is a result of numerous attempts and it can be done in
  a different way. That's way I suggest reading all documents concerning
  this issue man pppd, NET4-HOWTO, PPP-HOWTO.



D DE                                	de
D ES                                	es
D FR                                	fr
D IT                                	it
[ 30 July 1997
  The Linux Module HOWTO is not being maintained by the author any
  more.  If you are interested in maintaining the Module HOWTO, please
  get in touch with me at <tjbynum@metalab.unc.edu>. ]

  Linux Module-HOWTO
  Lauri Tischler, Editor.
  v1.1, 20 October 1996

  This is the Module-HOWTO, which is a compilation of all the possible
  module parameters that can be passed to the Linux modules at load
  time. Information within is based on Linux Kernel version 2.0.23.

  1.  Introduction

  Inspiration for this paper came from Paul Gortmaker's excellent
  BootPrompt-HOWTO.  With Paul's permission I have used his paper as a
  framework, upon which I have grafted my ramblings.  Different parts of
  this paper have been shamelessly, without any permissions what so
  ever, ripped off from various README and *.txt files within The Source
  Tree. My sincere thanks for all the authors of those texts which have
  made this document possible.

  This paper generally follows the same structure/module order as the
  kernel configuration utility menuconfig when run in
  single_menu_mode=TRUE mode.

  All sections which are marked Modular in the configuration utility are
  included here, regardless whether they have option parameters or not.

  Each section follows the example outline below:

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ne.o io=0x300 irq=5

          io = 0          (Explicitly *requires* an "io=0xNNN" value)
          irq = 0         (Tries to determine configured IRQ via autoIRQ)
          (Probes ports: 0x300, 0x280, 0x320, 0x340, 0x360)

          Depends on 8390.o
  ______________________________________________________________________

  The Module-HOWTO is edited and maintained by:

       Lauri Tischler, ltischler@efore.fi

  1.1.  Disclaimer and Copyright

  This document is not gospel. However, it is probably the most up to
  date info that you will be able to find. Nobody is responsible for
  what happens to your hardware but yourself. If your hardware goes up
  in smoke (...nearly impossible!)  I take no responsibility. ie. THE
  AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGES INCURRED DUE TO ACTIONS
  TAKEN BASED ON THE INFORMATION INCLUDED IN THIS DOCUMENT.

  This document is Copyright (c) 1996 by Lauri Tischler.  Permisson is
  granted to make and distribute verbatim copies of this manual provided
  the copyright notice and this permission notice are preserved on all
  copies.

  Permission is granted to copy and distribute modified versions of this
  document under the conditions for verbatim copying, provided that this
  copyright notice is included exactly as in the original, and that the
  entire resulting derived work is distributed under the terms of a
  permission notice identical to this one.

  Permission is granted to copy and distribute translations of this
  document into another language, under the above conditions for
  modified versions.

  If you are intending to incorporate this document into a published
  work, please contact me, and I will make an effort to ensure that you
  have the most up to date information available. In the past, out of
  date versions of the Linux howto documents have been published, which
  caused the developers undue grief from being plagued with questions
  that were already answered in the up to date versions.

  1.2.  Related Documentation

  Following HOWTO's are highly recommended :

    BootPrompt-HOWTO by Paul Gortmaker (Paul.Gortmaker@anu.edu.au).
     New versions of this document can be retrieved via anonymous FTP
     from sunsite.unc.edu, in /pub/Linux/docs/HOWTO/* and various Linux
     ftp mirror sites.

    kerneld mini-HOWTO by Henrik Storner (storner@osiris.ping.dk).  The
     latest released version of this document can be found at
     http://eolicom.olicom.dk/~storner/kerneld-mini-HOWTO.html.  Between
     releases of the mini-HOWTO you can find updates on Henrik's
     unstructured list of changes at
     http://eolicom.olicom.dk/~storner/kern.html.

  The file Documentation/Configure.help gives good general information
  about what parts of the kernel to modularize or not.

  Also plethora of various README files, sprinkled (unfortunately) all
  over The Source Tree are good and informative reading.

  The most up-to-date documentation will always be The Kernel Source
  itself. For example, if you were looking for what parameters could be
  passed to the smc-ultra ethernetcard, then you would go to the
  linux/drivers/net directory, and look at the file smc-ultra.c --
  usually somewhere in the end of the file you would find a procedure
  called init_module.  Within this procedure or around it you will
  parameter and structure definitions related to module parameters.

  1.3.  The Linux Newsgroups

  If you have questions about passing parameters to modules at load
  time, please READ this document first. If this and the related
  documentation mentioned above does not answer your question(s) then
  you can try the Linux newsgroups.

  General questions on how to configure your system should be directed
  to comp.os.linux.setup.  We ask that you please respect this general
  guideline for content, and don't cross-post your request to other
  groups.

  1.4.  New Versions of Document

  New versions of this document can be retrieved via anonymous FTP from
  sunsite.unc.edu, in /pub/Linux/docs/HOWTO/* and various Linux ftp
  mirror sites. Updates will be made  as new information or drivers
  becomes available. If this copy that you are reading is more than 3
  months old, it is either out of date, or it means that I have been
  lazy and haven't updated it.
  This document was produced by using the SGML system that was
  specifically set up for the Linux Howto project, and there are various
  output formats available, including, postscript, dvi, ascii, html, and
  soon TeXinfo.

  I would recommend viewing it in the html (via a WWW browser) or the
  Postscript/dvi format. Both of these contain cross-references that are
  lost in the ascii translation.

  If you want to get the official copy off sunsite, here is URL.

  Module-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Module-HOWTO.html>

  1.5.  Experimental (alpha-code) modules or incomplete information.

  Here is a list of modules which are declared experimental in
  configuration scripts or otherwise have incomplete info or I'm just
  too dumb to understand The Source. Pick your choice.

    Support for JAVA binaries.

    Frame Relay DLCI driver.

    Sangoma S502A FRAD driver.

    BAYCOM driver for AX.25.

    WIC Radio IP Bridge.

    3Com 3c505 Ethernet driver.

    3Com 3c507 Ethernet driver.

    Allied Telesis AT1700 Ethernet driver.

    Intel Ether Express Pro driver.

    Fujitsu FMV-18x Ethernet driver.

    ICL EtherTeam 16i/32 Ethernet driver.

    NI 5210 Ethernet driver.

    Ansel Communications EISA 3200 Ethernet driver.

    Amiga FSS Filesystem.

  1.6.  History.

    Initial release 1.0, 20th June 1996.

    Release 1.1, 20th October 1996.

  2.  Module utilities

  Module utilities are a set of programs necessary for handling the
  modules. At the time of this writing, version of latest module
  utilities was modules-2.0.0.tar.gz.  Info about latest current version
  can be found at http://www.pi.se/blox

  This information was originally provided by following gentlemen,
  Jacques Gelinas jacques@solucorp.qc.ca and Bjrn Ekwall bj0rn@blox.se
  in /usr/src/linux/Documentation/modules.txt.

  2.1.  Making the modules

  Your first step is to compile the kernel, as explained in the file
  linux/README.  It generally goes like:

    make config

    make dep

    make clean

    make zImage or make zlilo

  In make config, you select what you want to include in the resident
  kernel and what features you want to have available as loadable
  modules.  You will generally select the minimal resident set that is
  needed to boot:

    The filesystem of your root partition

    A scsi driver

    Normal hard drive support

    Net support (CONFIG_NET)

    TCP/IP support (CONFIG_INET), but no drivers!

    plus those things that you just can't live without...

  The set of modules is constantly increasing, and you will be able to
  select the option m in make config for those features that the current
  kernel can offer as loadable modules.

  You also have a possibility to create modules that are less dependent
  on the kernel version.  This option can be selected during make
  config, by enabling CONFIG_MODVERSIONS, and is most useful on stable
  kernel versions, such as the kernels from the 1.2 and 2.0 series.  If
  you have modules that are based on sources that are not included in
  the official kernel sources, you will certainly like this option...

  When you have made the kernel, you create the modules by doing:

       make modules

  This will compile all modules and update the linux/modules directory.
  In this directory you will then find a bunch of symbolic links,
  pointing to the various object files in the kernel tree.

  Now, after you have created all your modules, you should also do:

       make modules_install

  This will copy all newly made modules into subdirectories under
  /lib/modules/kernel_release/, where kernel_release is something like
  2.0.1, or whatever the current kernel version is...

  As soon as you have rebooted the newly made kernel, you can install
  and remove modules at will with the utilities: insmod and rmmod.
  After reading the man-page for insmod, you will also know how easy it
  is to configure a module when you do insmod (hint: symbol=value).

  2.2.  Extended utilities, modprobe and depmod.

  You also have access to two utilities: modprobe and depmod, where
  modprobe is a wrapper for (or extension to) insmod.  These utilities
  use (and maintain) a set of files that describe all the modules that
  are available for the current kernel in the /lib/modules hierarchy as
  well as their interdependencies.

  Using the modprobe utility, you can load any module like this:

       /sbin/modprobe module

  without paying much attention to which kernel you are running, or what
  other modules this module depends on.

  With the help of the modprobe configuration file: /etc/conf.modules
  you can tune the behaviour of modprobe in many ways, including an
  automatic setting of insmod options for each module. And, yes, there
  are man-pages for all this...

  To use modprobe successfully, you generally place the following
  command in your /etc/rc.d/rc.S script.  (Read more about this in the
  rc.hints file in the module utilities package, modules-x.y.z.tar.gz.)

       /sbin/depmod -a

  This computes the dependencies between the different modules.  Then if
  you do, for example

       /sbin/modprobe umsdos

  you will automatically load both the msdos and umsdos modules, since
  umsdos runs piggyback on msdos.

  2.3.  The ultimate utility, kerneld.

  OK, you have read all of the above, and feel amply impressed...  Now,
  we tell you to forget all about how to install and remove loadable
  modules...

  With the kerneld daemon, all of these chores will be taken care of
  automatically.  Just answer "Y" to CONFIG_KERNELD in make config, and
  make sure that /sbin/kerneld is started as soon as possible after boot
  and that /sbin/depmod -a has been executed for the current kernel.
  (Read more about this in the module utilities package.)

  Whenever a program wants the kernel to use a feature that is only
  available as a loadable module, and if the kernel hasn't got the
  module installed yet, the kernel will ask the kerneld deamon to take
  care of the situation and make the best of it.

  This is what happens:

    The kernel notices that a feature is requested that is not resident
     in the kernel.

    The kernel sends a message to kerneld, with a symbolic description
     of the requested feature.

    The kerneld daemon asks e.g. modprobe to load a module that fits
     this symbolic description.

    Modprobe looks into its internal alias translation table to see if
     there is a match.  This table can be reconfigured and expanded by
     having alias lines in /etc/conf.modules.

    Insmod is then asked to insert the module(s) that modprobe has
     decided that the kernel needs.  Every module will be configured
     according to the options lines in /etc/conf.modules.

    Modprobe exits and kerneld tells the kernel that the request
     succeded (or failed...)

    The kernel uses the freshly installed feature just as if it had
     been configured into the kernel as a resident part.

  The icing of the cake is that when an automatically installed module
  has been unused for a period of time (usually 1 minute), the module
  will be automatically removed from the kernel as well.

  This makes the kernel use the minimal amount of memory at any given
  time, making it available for more productive use than as just a
  placeholder for unused code.

  Actually, this is only a side-effect from the real benefit of kerneld:
  You only have to create a minimal kernel, that is more or less
  independent of the actual hardware setup.  The setup of the virtual
  kernel is instead controlled by a configuration file as well as the
  actual usage pattern of the current machine and its kernel.

  This should be good news for maintainers of multiple machines as well
  as for maintainers of distributions.

  To use kerneld with the least amount of hassle, you need modprobe from
  a release that can be considered recent w.r.t. your kernel, and also a
  configuration file for modprobe (/etc/conf.modules).

  Since modprobe already knows about most modules, the minimal
  configuration file could look something like this:

          alias scsi_hostadapter aha1542  # or whatever SCSI adapter you have
          alias eth0 3c509                # or whatever net adapter you have

          # you might need an "options" line for some net adapters:
          options 3c509 io=0x300 irq=10

          # you might also need an "options" line for some other module:
          options cdu31a cdu31a_port=0x1f88 sony_pas_init=1

  You could add these lines as well, but they are only cosmetic:

               alias net-pf-3 off      # no ax25 module available (yet)
               alias net-pf-4 off      # if you don't use the ipx module
               alias net-pf-5 off      # if you don't use the appletalk module

  Finally, for the purists: You can name the modprobe configuration
  either /etc/conf.modules or /etc/modules.conf, since modprobe knows
  what to do in each case...

  3.  General Kernel setup

  Note: you can't have both a.out and ELF support compiled as modules.
  Otherwise, you get a nice Catch-22 when you try to run insmod to
  install a.out/ELF support so you can run insmod ;-).  If you have an
  all-ELF system, but need a.out for the occasional Netscape session,
  then you can do a.out support as a module.  Otherwise, you should
  probably leave it in the kernel, and if you haven't gone ELF yet, you
  can probably leave out ELF compleately.

  3.1.  Kernel support for a.out binaries (binfmt_aout.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe binfmt_aout.o

          No module parameters.
  ______________________________________________________________________

  3.2.  Kernel support for ELF binaries (binfmt_elf.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe binfmt_elf.o

          No module parameters.
  ______________________________________________________________________

  3.3.  Kernel support for JAVA binaries (binfmt_java.o).

  JAVA is an object oriented programming language developed by SUN; JAVA
  programs are compiled into "JAVA bytecode" which can then be
  interpreted by run time systems on many different operating systems.
  These JAVA binaries are becoming a universal executable format. This
  option allows you to run a Java binary just like any other Linux
  program: by typing in its name.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe binfmt_java.o

          No module parameters.
  ______________________________________________________________________

  4.  Floppy and other block devices.

  4.1.  The Floppy Disk Driver (floppy.o).

  There are many floppy driver options, and they are all listed in
  README.fd in linux/drivers/block. For detailed, up to date,
  information refer directly to this file.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe floppy.o 'floppy="<options>"'

          Option explanations below..
  ______________________________________________________________________

  mask,allowed_drive_mask -         Sets the bitmask of allowed drives
  to mask. By default, only units 0 and 1 of each floppy controller are
  allowed. This is done because certain non-standard hardware (ASUS PCI
  motherboards) mess up the keyboard when accessing units 2 or 3. This
  option is somewhat obsoleted by the cmos option.

  all_drives - Sets the bitmask of allowed drives to all drives.  Use
  this if you have more than two drives connected to a floppy
  controller.

  asus_pci - Sets the bitmask to allow only units 0 and 1.  (The
  default)

  daring - Tells the floppy driver that you have a well behaved floppy
  controller.  This allows more efficient and smoother operation, but
  may fail on certain controllers.  This may speed up certain
  operations.

  0,daring - Tells the floppy driver that your floppy controller should
  be used with caution.
  one_fdc - Tells the floppy driver that you have only floppy controller
  (default)

  two_fdc or address,two_fdc - Tells the floppy driver that you have two
  floppy controllers. The second floppy controller is assumed to be at
  address. This option is not needed if the second controller is at
  address 0x370, and if you use the 'cmos' option

  thinkpad - Tells the floppy driver that you have a Thinkpad. Thinkpads
  use an inverted convention for the disk change line.

  0,thinkpad - Tells the floppy driver that you don't have a Thinkpad.

  omnibook or nodma - Tells the floppy driver not to use Dma for data
  transfers.  This is needed on HP Omnibooks, which don't have a
  workable DMA channel for the floppy driver. This option is also useful
  if you frequently get "Unable to allocate DMA memory" messages.
  Indeed, dma memory needs to be continuous in physical, and is thus
  harder to find, whereas non-dma buffers may be allocated in virtual
  memory. However, I advise against this if you have an FDC without a
  FIFO (8272A or 82072). 82072A and later are OK. You also need at least
  a 486 to use nodma.  If you use nodma mode, I suggest you also set the
  FIFO threshold to 10 or lower, in order to limit the number of data
  transfer interrupts.

  dma - Tells the floppy driver that a workable DMA channel is available
  (the default).

  nofifo - Disables the FIFO entirely. This is needed if you get "Bus
  master arbitration error" messages from your ethernet card (or from
  other devices) while accessing the floppy.

  fifo - Enables the FIFO (default)

  [threshold],fifo_depth - Sets the FIFO threshold. This is mostly
  relevant in DMA mode. If this is higher, the floppy driver tolerates
  more interrupt latency, but it triggers more interrupts (i.e. it
  imposes more load on the rest of the system). If this is lower, the
  interrupt latency should be lower too (faster processor). The benefit
  of a lower threshold is less interrupts.

  To tune the fifo threshold, switch on over/underrun messages using
  'floppycontrol --messages'. Then access a floppy disk. If you get a
  huge amount of "Over/Underrun - retrying" messages, then the fifo
  threshold is too low. Try with a higher value, until you only get an
  occasional Over/Underrun.  It is a good idea to compile the floppy
  driver as a module when doing this tuning. Indeed, it allows to try
  different fifo values without rebooting the machine for each test.
  Note that you need to do 'floppycontrol --messages' every time you re-
  insert the module.  Usually, tuning the fifo threshold should not be
  needed, as the default (0xa) is reasonable.

  [drive],[type],cmos - Sets the CMOS type of drive to type. This is
  mandatory if you have more than two floppy drives (only two can be
  described in the physical CMOS), or if your BIOS uses non-standard
  CMOS types. The CMOS types are:

  ______________________________________________________________________
            0 - Use the value of the physical CMOS
                  1 - 5 1/4 DD
                  2 - 5 1/4 HD
                  3 - 3 1/2 DD
                  4 - 3 1/2 HD
                  5 - 3 1/2 ED
                  6 - 3 1/2 ED
                 16 - unknown or not installed
  ______________________________________________________________________

  (Note: there are two valid types for ED drives. This is because 5 was
  initially chosen to represent floppy *tapes*, and 6 for ED drives.
  AMI ignored this, and used 5 for ED drives. That's why the floppy
  driver handles both)

  unexpected_interrupts - Print a warning message when an unexpected
  interrupt is received (default behavior)

  no_unexpected_interrupts or L40SX - Don't print a message when an
  unexpected interrupt is received. This is needed on IBM L40SX laptops
  in certain video modes. (There seems to be an interaction between
  video and floppy. The unexpected interrupt only affect performance,
  and can safely be ignored.)

  4.2.  Loopback block device support (loop.o).

  Enabling this option will allow you to mount a file as a file system.
  This is useful if you want to check an ISO9660 file system before
  burning the CD, or want to use floppy images without first writing
  them to floppy.

  This option also allows one to mount a filesystem with encryption.  To
  use these features, you need a recent version of mount and other
  patches for DES and IDEA. They can be found at
  http://www.binary9.net/nicholas/linuxkernel/patches.  Note that this
  loop device has nothing to do with the loopback device used for
  network connections from the machine to itself.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe loop.o

          No module parameters.
  ______________________________________________________________________

  4.3.  Multiple devices driver support (RAID).

  This driver lets you combine several harddisk partitions into one
  logical block device.

  Tools that can be used to manage md devices can be found at sweet-
  smoke.ufr-info-p7.ibp.fr/public/Linux/md035.tar.gz.  Same location
  contains also a document md-FAQ.

  There are various levels of Redundant Array of Inexpensive (or
  Independent) Disks defined.

    RAID-0, Data striped across all disks. No error checking.

     Pros.
        Best RAID data transfer rate. Transparent to system software.

     Cons.
        No error checking or redundancy. The failure of one drive in the
        array results in the loss of all data stored in the array.  Any
        MTBF calculation must really be recalculated.

    RAID-1, Disk Mirroring.

     Pros.
        No write penalty. 100% data redundancy.  No performace penalty
        after failure.

     Cons.
        100% cost overhead. Requires 2x disk space and power compared to
        non-arrayed system.

    RAID-5, Sector-oriented striping of data and parity.

     Pros.
        Good performance for transaction processing systems.  No write
        overhead as in RAID-4.  Storage overhead is maximum of one disk.
        Can read in parallel across the array.

     Cons.
        Performance degradation during data reconstruction.

    RAID-6, Mirrored RAID-0 array.

     Pros.
        RAID data transfer rate comparable to RAID-0.  100% data
        redundancy.  No performace penalty after failure.

     Cons.
        100% cost overhead. Requires 2x disk space and power compared to
        non-arrayed system.

  Only RAID-0 is available for Linux at the moment. Linear mode is not
  considered as part of RAID definition. The Raid Advisory Board does
  not consider RAID-0 to be part of RAID definition either, due to
  missing data redundancy.

  Usefull modes for implementation are RAID-0, RAID-1, RAID-5 and
  RAID-6.

  4.3.1.  Multiple device in Linear (append) mode (linear.o).

  If you use this, then your multiple devices driver will be able to use
  the so-called linear mode, i.e. it will combine the harddisk
  partitions by simply appending one to the other.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe linear.o

          No module parameters.
  ______________________________________________________________________

  4.3.2.  Multiple device in RAID-0 (striped) mode (raid0.o).

  If you use this, then your multiple devices driver will be able to use
  the so-called raid0 mode, i.e. it will combine the harddisk partitions
  into one logical device in such a fashion as to fill them up evenly,
  one chunk here and one chunk there. This will increase the throughput
  rate if the partitions reside on distinct disks.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe raid0.o

          No module parameters.
  ______________________________________________________________________

  4.4.  RAM disk support (rd.o).

  Enabling this option will allow you to use a portion of your RAM
  memory as a block device, so that you can make filesystems on it, read
  and write to it and do all the other things that normal block devices
  (such as harddrives) can do.  It is usually used to load and store a
  copy of a minimal root file system off of a floppy into RAM during the
  initial install of Linux.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe rd.o

          No module parameters.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  4.5.  XT harddisk support (xd.o).

  Very old 8 bit hard disk controllers used in the IBM XT computer.  No,
  the existence of XT disk support does NOT mean that you can run Linux
  on an IBM XT :).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe xd.o

          No module parameters.
  ______________________________________________________________________

  5.  General TCP/IP and Networking options.

  5.1.  IP Tunneling (ipip.o and new_tunnel.o).

  Tunneling means encapsulating data of one protocol type within another
  protocol and sending it over a channel that understands the
  encapsulating protocol. Two modules are necessary ipip.o, IP/IP
  protocol decoder, and new_tunnel.o driver, (this was previously called
  tunnel.o and the documentation still refers to this name).
  Documentation is found at /usr/src/linux/drivers/net/README.tunnel.

  ______________________________________________________________________
  Load commands:
          /sbin/modprobe ipip.o
          /sbin/modprobe new_tunnel.o

          No module parameters.
  ______________________________________________________________________

  5.2.  IP Aliasing support (ip_alias.o).

  Sometimes it is useful to give several addresses to a single network
  interface (= serial port or ethernet card). The most common case is
  that you want to serve different WWW documents to the outside
  according to which of your host names they used to connect to you.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ip_alias.o

          No module parameters.
  ______________________________________________________________________

  5.3.  IP Reverse ARP (rarp.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe rarp.o

          No module parameters.
  ______________________________________________________________________

  5.4.  IPX Protocol (ipx.o).

  This is support for the Novell networking protocol, IPX, commonly used
  for local networks of DOS and Windows machines.

  IPX protocol is required if :

    You wish to connect to Netware servers using Linux DOS emulator
     DOSEMU.

    You wish to mount Netware volumes as Linux filesystems using Linux
     Novell client ncpfs.

    You wish to connect to Linux server from Netware client, or mount
     Linux directories as Netware volumes.  There are two daemons for
     this purpose, linwared and nwserv.

  Homesite for ncpfs is ftp.gwdg.de/pub/linux/misc/ncpfs, but sunsite
  and its many mirrors will have it as well.

  Linware's home site is klokan.sh.cvut.cz/pub/linux/linware,

  nwserv package Mars_nwe is also on ftp.gwdg.de/pub/linux/misc/ncpfs.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ipx.o

          No module parameters.
  ______________________________________________________________________

  5.5.  Appletalk DDP (appletalk.o).

  Appletalk is the way Apple computers speak to each other on a network.
  EtherTalk is the name used for appletalk over ethernet and Localtalk
  is appletalk over the apple serial links.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe appletalk.o

          No module parameters.
  ______________________________________________________________________

  6.  SCSI Support.

  The scsi support in the linux kernel can be modularized in a number of
  different ways depending upon the needs of the end user.  To
  understand  your options, we should first define a few terms.

  The scsi-core contains the core of scsi support.  Without it you can
  do nothing with any of the other scsi drivers.  The scsi core support
  can be a module (scsi_mod.o), or it can be build into the kernel.  If
  the core is a module, it must be the first scsi module loaded, and if
  you unload the modules, it will have to be the last one unloaded.

  The individual upper and lower level drivers can be loaded in any
  order once the scsi core is present in the kernel (either compiled in
  or loaded as a module).  The disk driver (sd_mod.o), cdrom driver
  (sr_mod.o), tape driver (st.o) and scsi generics driver (sg.o)
  represent the upper level drivers to support the various assorted
  devices which can be controlled.  You can for example load the tape
  driver to use the tape drive, and then unload it once you have no
  further need for the driver (and release the associated memory).

  The lower level drivers are the ones that support the individual cards
  that are supported for the hardware platform that you are running
  under.  Examples are aha1542.o to drive Adaptec 1542 cards.

  6.1.  SCSI Required Core Support.

  6.1.1.  SCSI Core support (scsi_mod.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe scsi_mod.o

          No module parameters.
  ______________________________________________________________________

  6.2.  SCSI High level support.

  6.2.1.  SCSI Disk support (sd_mod.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe sd_mod.o

          No module parameters.
  ______________________________________________________________________

  6.2.2.  SCSI Tape support (st.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe st.o

          No module parameters.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.2.3.  SCSI CDrom support (sr_mod.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe sr_mod.o

          No module parameters.
  ______________________________________________________________________

  6.2.4.  SCSI generic support (sg.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe sg.o

          No module parameters.
  ______________________________________________________________________

  6.3.  SCSI Low Level Device Driver Support.

  Most SCSI-card drivers don't support module parameters, they do
  generally autoprobe for card settings.  Do read the SCSI-HOWTO
  document and README files in /usr/src/linux/drivers/scsi to to find
  out about your hardware.  If your card is located in some
  unconventional i/o-address you must load the driver permanently into
  the kernel and use Boottime options, see BootPrompt-HOWTO.  Optionally
  you can twiddle The Source and recompile.

  6.3.1.  7000FASST SCSI support (wd7000.o),

  ______________________________________________________________________
  Load command:
          /sbin/modprobe wd7000.o

          No module parameters.
          Autoprobes the card, requires installed BIOS.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.2.  Adaptec AHA152X/2825 support (aha154x.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe aha154x.o

          No module parameters.
          Autoprobes the card, requires installed BIOS.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.3.  Adaptec AHA1542 support (aha1542.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe aha1542.o

          No module parameters.
          Autoprobes card at 0x330 and 0x334 only.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.4.  Adaptec AHA1740 EISA support (aha1740.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe aha1740.o

          No module parameters.
          Autoprobes the card.
  ______________________________________________________________________

  6.3.5.  Adaptec AHA274X/284X/294X support (aic7xxx.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe aic7xxx.o

          No module parameters.
          Autoprobes the card, BIOS must be enabled.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.6.  AdvanSys SCSI support (advansys.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe advansys.o [parameters]

          asc_iopflag=1                   enable=1, disable=0 port scanning
          asc_ioport=0x110,0x330          ports to scan
          asc_dbglvl=1                    debugging level
                                             0: Errors Only
                                             1: High-Level Tracing
                                             2-N: Verbose Tracing

          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.7.  Always IN2000 SCSI support (in2000.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe in2000.o

          No module parameters.
          Autoprobes the card, BIOS not required.
  ______________________________________________________________________

  6.3.8.  BusLogic SCSI support (BusLogic.o).

  The list of supported BusLogic cards is long.  Read
  usr/src/linux/drivers/scsi/README.BusLogic to get the total picture.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe BusLogic.o

          No module parameters.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.9.  DTC3180/3280 SCSI support (dtc.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe dtc.o

          No module parameters.
          Autoprobes the card.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.10.  EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support
  (eata.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe eata.o

          No module parameters.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.11.  EATA-DMA (DPT, NEC, AT&T, SNI, AST, Olivetti, Alphatronix)
  (eata_dma.o).

  Includes DPT Smartcache, Smartcache III and SmartRAID.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe eata_dma.o

          No module parameters.
          Autoprobe works in all configurations.
  ______________________________________________________________________

  6.3.12.  EATA-PIO (old DPT PM2001, PM2012A) support (eata_pio.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe eata_pio.o

          No module parameters.
  ______________________________________________________________________

  6.3.13.  Future Domain 16xx SCSI support (fdomain.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe fdomain.o

          No module parameters.
          Autoprobes the card, requires installed BIOS.
  ______________________________________________________________________

  6.3.14.  Generic NCR5380/53c400 SCSI support (NCR5380.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe NCR5380.o

                  ncr_irq=xx      the interrupt
                  ncr_addr=xx     the port or base address (for port or
                                  memory mapped, resp.)
                  ncr_dma=xx      the DMA
                  ncr_5380=1      to set up for a NCR5380 board
                  ncr_53c400=1    to set up for a NCR53C400 board

          modprobe g_NCR5380 ncr_irq=5 ncr_addr=0x350 ncr_5380=1
           - for a port mapped NCR5380 board or

          modprobe g_NCR5380 ncr_irq=255 ncr_addr=0xc8000 ncr_53c400=1
           - for a memory mapped NCR53C400 board with interrupts disabled.

          (255 should be specified for no or DMA interrupt,
           254 to autoprobe for an IRQ line if overridden on the command line.)

          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.15.  NCR53c406a SCSI support (NCR53c406a.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe NCR53c406a.o

          No module parameters.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.16.  NCR53c7,8xx SCSI support (53c7,8xx.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe 53c7,8xx.o

          No module parameters.
          Autoprobes the card, requires installed BIOS.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.17.  PCI-SCSI NCR538xx family support (ncr53c8xx.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ncr53c8xx.o

          No module parameters.
  ______________________________________________________________________

  6.3.18.  IOMEGA Parallel Port ZIP drive SCSI support (ppa.o).

  Check file /usr/src/linux/drivers/scsi/README.ppa for detailed
  information.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ppa.o ppa_base=0x378 ppa_nybble=1

          Here are the parameters and their functions:

          Variable        Default    Description

          ppa_base        0x378   The base address of PPA's parallel port.
          ppa_speed_high  1       Microsecond i/o delay used in data transfers
          ppa_speed_low   6       Microsecond delay used in other operations
          ppa_nybble      0       1 to force the driver to use 4-bit mode.
  ______________________________________________________________________

  6.3.19.  PAS16 SCSI support(pas16.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe pas16.o

          No module parameters.
          Autoprobes the card, BIOS not required.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.20.  Qlogic FAS SCSI support (qlogicfas.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe qlogicfas.o

          No module parameters.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.21.  Qlogic ISP SCSI support (qlogicisp.o).

  Requires firmware.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe qlogicisp.o

          No module parameters.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.22.  (seagate.o).  Seagate ST-02 and Future Domain TMC-8xx SCSI
  support

  ______________________________________________________________________
  Load command:
          /sbin/modprobe seagate.o

          No module parameters.
          Autoprobes for address only, irq fixed at 5.
          Requires installed BIOS.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.23.  Trantor T128/T128F/T228 SCSI support (t128.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe t128.o

          No module parameters.
          Autoprobes the card, requires installed BIOS.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.24.  UltraStor 14F/34F support (u14-34f.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe u14-34f.o

          No module parameters.
          Autoprobes the card, NOT 0x310 port, BIOS not required.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  6.3.25.  UltraStor SCSI support (ultrastor.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ultrastor.o

          No module parameters.
          Boottime parameters available, see BootPrompt-HOWTO.
  ______________________________________________________________________

  7.  Network device support

  7.1.  Required and/or optional lowlevel modules.

  7.1.1.  Optional BSD compressor for PPP (bsd_comp.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe bsd_comp.o

          No module parameters.

          Depends on ppp.o
  ______________________________________________________________________

  7.1.2.  SLHC compressor for PPP (slhc.o).

  Routines to compress and uncompress tcp packets (for transmission over
  low speed serial lines).

  Required by SLIP and PPP (also ISDN-PPP) protocols.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe slhc.o

          No module parameters.
  ______________________________________________________________________

  7.1.3.  A general NS8390 ethernet driver core for linux.(8390.o).

  This is the chip-specific code for many 8390-based ethernet adaptors.
  This is not a complete driver, it must be combined with board-specific
  code such as ne.o, wd.o, 3c503.o, etc.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe 8390.o

          No module parameters.
  ______________________________________________________________________

  7.2.  Dummy net driver support (dummy.o).

  This is essentially a bit-bucket device (i.e. traffic you send to this
  device is consigned into oblivion) with a configurable IP address. It
  is most commonly used in order to make your currently inactive SLIP
  address seem like a real address for local programs.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe dummy.o

          No module parameters.
  ______________________________________________________________________

  7.3.  EQL (serial line load balancing) support (eql.o).

  If you have two serial connections to some other computer (this
  usually requires two modems and two telephone lines) and you use SLIP
  (= the protocol for sending internet traffic over telephone lines) or
  PPP (= a better SLIP) on them, you can make them behave like one
  double speed connection using this driver.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe eql.o

          No module parameters.
  ______________________________________________________________________

  7.4.  Frame relay DLCI support (dlci.o).

  This is support for the frame relay protocol; frame relay is a fast
  low-cost way to connect to a remote internet access provider or to
  form a private wide area network. The one physical line from your box
  to the local "switch" (i.e. the entry point to the frame relay
  network) can carry several logical point-to-point connections to other
  computers connected to the frame relay network. For a general
  explanation of the protocol, check out http://frame-
  relay.indiana.edu/4000/4000index.html on the WWW.  To use frame relay,
  you need supporting hardware (FRAD) and certain programs from the net-
  tools package as explained in Documentation/networking/framerelay.txt.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe dlci.o

          No module parameters.
  ______________________________________________________________________

  7.5.  Sangoma S502A FRAD support (sdla.o).

  This is a driver for the Sangoma S502A, S502E and S508 Frame Relay
  Access Devices. These are multi-protocol cards, but only frame relay
  is supported by the driver at this time. Please read
  Documentation/networking/framerelay.txt.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe sdla.o

          No module parameters.

          Depends on dlci.o
  ______________________________________________________________________

  7.6.  PLIP (parallel port) support (plip.o).

  PLIP (Parallel Line Internet Protocol) is used to create a mini
  network consisting of two (or, rarely, more) local machines. The
  parallel ports (the connectors at the computers with 25 holes) are
  connected using "null printer" or "Turbo Laplink" cables which can
  transmit 4 bits at a time or using special PLIP cables, to be used on
  bidirectional parallel ports only, which can transmit 8 bits at a time
  (you can find the wiring of these cables in drivers/net/README?.plip).
  The cables can be up to 15m long. This works also if one of the
  machines runs DOS/Windows and has some PLIP software installed, e.g.
  the Crynwr PLIP packet driver
  http://sunsite.cnam.fr/packages/Telnet/PC/msdos/misc/pktdrvr.txt and
  winsock or NCSA's telnet.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe plip.o io=0x378 irq=7

          io = 0
          irq = 0         (by default, uses IRQ 5 for port at 0x3bc,
                                            IRQ 7 for port at 0x378,
                                        and IRQ 2 for port at 0x278)
          (Probes ports: 0x278, 0x378, 0x3bc)
  ______________________________________________________________________

  7.7.  PPP (point-to-point) support (ppp.o).

  To use PPP you need an additional program called pppd as described in
  Documentation/networking/ppp.txt and in the PPP-HOWTO, available from
  sunsite.unc.edu:/pub/Linux/docs/HOWTO.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ppp.o

          No module parameters.

          Depends on slhc.o
          Also depends on serial.o, this is not detected automatically,
          so serial.o must be loaded manually.
  ______________________________________________________________________

  7.8.  SLIP (serial line) support (slip.o).

  SLIP (Serial Line Internet Protocol) is the protocol used to send
  Internet traffic over telephone lines or serial cables (also known as
  nullmodems).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe slip.o

          slip_maxdev = 256 (default value from SL_NRUNIT on slip.h)

          Depends on slhc.o
          Also depends on serial.o, this is not detected automatically,
          so serial.o must be loaded manually.
  ______________________________________________________________________

  7.9.  Amateur Radio and wireless network interfaces.

  7.9.1.  (baycom.o).  BAYCOM ser12 and par96 kiss emulation driver for
  AX.25

  This is a driver for Baycom style simple amateur radio modems that
  connect to either a serial interface or a parallel interface. The
  driver supports the ser12 and par96 designs. To configure the driver,
  use the setbaycom utility available from
  http://www.ife.ee.ethz.ch/~sailer/ham/ham.html#lnxbay. For
  informations on the modems, see http://www.baycom.de and
  drivers/char/README.baycom.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe baycom.o modem=1 iobase=0x3f8 irq=4 options=1

          major   major number the driver should use; default 60
          modem   modem type of the first channel (minor 0); 1=ser12,
                  2=par96/par97, any other value invalid
          iobase  base address of the port; common values are for ser12 0x3f8,
                  0x2f8, 0x3e8, 0x2e8 and for par96/par97 0x378, 0x278, 0x3bc
          irq     interrupt line of the port; common values are for ser12 3,4
                  and for par96/par97 7
          options 0=use hardware DCD, 1=use software DCD
  ______________________________________________________________________

  7.9.2.  STRIP (Metricom starmode radio IP) strip.o).

  STRIP is a radio protocol developed for the MosquitoNet project
  (http://mosquitonet.stanford.edu/) to send Internet traffic using
  Metricom radios.  Metricom radios are small, battery powered,
  100kbit/sec packet radio transceivers, about the size and weight of a
  cellular telephone.  (You may also have heard them called "Metricom
  modems" but we avoid the term "modem" because it misleads many people
  into thinking that you can plug a Metricom modem into a phone line and
  use it as a modem.)  You can use STRIP on any Linux machine with a
  serial port, although it is obviously most useful for people with
  laptop computers.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe strip.o

          No module parameters.
  ______________________________________________________________________

  7.9.3.  WaveLAN support (wavelan.o).

  These are cards for wireless ethernet-like networking. Supported are
  AT&T GIS and NCR WaveLAN cards.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe wavelan.o

          io = 0x390      (Settable, but change not recommended)
          irq = 0         (Not honoured, if changed..)
  ______________________________________________________________________

  7.9.4.  WIC Radio IP bridge (wic.o).

  Support for the WIC parallel port radio bridge.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe wic.o

          It appears that devices 'wic0', 'wic1' and 'wic2' have direct
          relations to corresponding 'lpx' ports.
  ______________________________________________________________________

  7.9.5.  Z8530 SCC kiss emulation driver for AX.25 (scc.o).

  These cards are used to connect your Linux box to an amateur radio in
  order to communicate with other computers.  If you want to use this,
  read Documentation/networking/z8530drv.txt and the HAM-HOWTO.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe scc.o

          No module parameters.
  ______________________________________________________________________

  7.10.  3COM Ethernet cards.

  7.10.1.  3c501 support (3c501.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe 3c501.o

          io  = 0x280     IO base address
          irq = 5         IRQ
          (Probes ports:  0x280, 0x300)
  ______________________________________________________________________

  7.10.2.  3c503 support (3c503.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe 3c503.o

          io = 0          (It will complain if you don't supply an "io=0xNNN")
          irq = 0         (IRQ software selected by driver using autoIRQ)
          xcvr = 0        (Use xcvr=1 to select external transceiver.)
          (Probes ports: 0x300, 0x310, 0x330, 0x350, 0x250, 0x280, 0x2A0,0x2E0)

          Depends on 8390.o
  ______________________________________________________________________

  7.10.3.  3c505 support (3c505.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe 3c505.o

          io = 0x300
          irq = 0
          (Probes ports: 0x300, 0x280, 0x310)
  ______________________________________________________________________

  7.10.4.  3c507 support (3c507.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe 3c507.o

          io = 0x300
          irq = 0
          (Probes ports: 0x300, 0x320, 0x340, 0x280)
  ______________________________________________________________________

  7.10.5.  3c509/3c579 support (3c509.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe 3c509.o

          io = 0
          irq = 0
          ( Module load-time probing Works reliably only on EISA, ISA ID-PROBE
            IS NOT RELIABLE!  Compile this driver statically into kernel for
            now, if you need it auto-probing on an ISA-bus machine. )
  ______________________________________________________________________

  7.10.6.  3c590 series "Vortex" support (3c59x.o).

  Provides support for folloving cards :

    3c590 Vortex 10Mbps.

    3c595 Vortex 100baseTX.

    3c595 Vortex 100baseT4.

    3c595 Vortex 100base-MII.

    EISA Vortex 3c597.

     ___________________________________________________________________
     Load command:
             /sbin/modprobe 3c59x.o debug=1 options=0,,12

             This sets the debug message level to minimal messages,
             sets the first card to the 10baseT transceiver, the second
             to the EEPROM-set transceiver, and the third card to operate
             in full-duplex mode using its 100baseTx transceiver.
             (Note: card ordering is set by the PCI BIOS.)

             Possible media type settings
                     0       10baseT
                     1       10Mbs AUI
                     2       undefined
                     3       10base2 (BNC)
                     4       100base-TX
                     5       100base-FX
                     6       MII (not yet available)
                     7       <Use default setting>

                     8       Full-duplex bit
                     8       10baseT full-duplex
                     12      100baseTx full-duplex
                     16      Bus-master enable bit (experimental use only!)

             Details of the device driver implementation are at the top of
             the source file.
     ___________________________________________________________________

  7.11.  Western Digital/SMC Ethernet cards.

  7.11.1.  WD80*3 support (wd.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe wd.o

          io = 0          (It will complain if you don't supply an "io=0xNNN")
          irq = 0         (IRQ val. read from EEPROM, ancient cards use autoIRQ)
          mem = 0         (Force shared-memory on address 0xC8000, or whatever..)
          mem_end = 0     (Force non-std. mem. size via supplying mem_end val.)
                          (eg. for 32k WD8003EBT, use mem=0xd0000 mem_end=0xd8000
          (Probes ports:  0x300, 0x280, 0x380, 0x240)

          Depends on 8390.o
  ______________________________________________________________________

  7.11.2.  SMC Ultra/EtherEZ support (smc-ultra.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe smc-ultra.o

          io = 0          (It will complain if you don't supply an "io=0xNNN")
          irq = 0         (IRQ val. read from EEPROM)
          (Probes ports:  0x200, 0x220, 0x240, 0x280, 0x300, 0x340, 0x380)

          Depends on 8390.o
  ______________________________________________________________________

  7.11.3.  SMC 9194 support (smc9194.o).

  This is a driver for SMC's 9000 series of Ethernet cards.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe smc9194.o

          io = 0          for the base address
          irq = 0         for the IRQ
          ifport = 0      for autodetect, 1 for TP, 2 for AUI ( or 10base2 )

          Probes ports:   0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
                          0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0

          Debug level setable in smc9194.c driver code.
  ______________________________________________________________________

  7.12.  Other Ethernet cards.

  7.12.1.  AT1700 support (at1700.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe at1700.o

          io = 0x260
          irq = 0

          (Probes ports: 0x260, 0x280, 0x2A0, 0x240, 0x340, 0x320, 0x380, 0x300)
  ______________________________________________________________________

  7.12.2.  Cabletron E21xx support (e2100.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe e2100.o

          io = 0          (It will complain if you don't supply an "io=0xNNN")
          irq = 0         (IRQ software selected by driver)
          mem = 0         (Override default shared memory start of 0xd0000)
          xcvr = 0        (Use xcvr=1 to select external transceiver.)
          (Probes ports: 0x300, 0x280, 0x380, 0x220)

          Depends on 8390.o
  ______________________________________________________________________

  7.12.3.  DEPCA, DE10x, DE200, DE201, DE202, DE422 support (depca.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe depca.o

          io = 0x200
          irq = 7
          (Probes ports:  ISA:  0x300, 0x200;
                          EISA: 0x0c00            )
  ______________________________________________________________________

  7.12.4.  EtherWORKS 3 (DE203, DE204, DE205) support (ewrk3.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ewrk3.o

          io = 0x300
          irq = 5
          (With module no autoprobing!
           On EISA-bus does EISA probing.
           Static linkage probes ports on ISA bus:
                  0x100, 0x120, 0x140, 0x160, 0x180, 0x1A0, 0x1C0,
                  0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
                  0x300,        0x340, 0x360, 0x380, 0x3A0, 0x3C0)
  ______________________________________________________________________

  7.12.5.  EtherExpress 16 support (eexpress.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe eexpress.o

          io = 0x300
          irq = 0         (IRQ value read from EEPROM)
          (Probes ports: 0x300, 0x270, 0x320, 0x340)
  ______________________________________________________________________

  7.12.6.  EtherExpressPro support (eepro.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe eepro.o

          io = 0x200
          irq = 0
          (Probes ports: 0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340, 0x360)
  ______________________________________________________________________

  7.12.7.  Fujitsu FMV-181/182/183/184 support (fmv18x.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe fmv18x.o

          io = 0x220      for the base address
          irq = 0         for the IRQ

          Probes ports: 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x300, 0x340
  ______________________________________________________________________

  7.12.8.  HP PCLAN+ (27247B and 27252A) support (hp-plus.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe hp-plus.o

          io = 0          (It will complain if you don't supply an "io=0xNNN")
          irq = 0         (IRQ read from configuration register)
          (Probes ports: 0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340)

          Depends on 8390.o
  ______________________________________________________________________

  7.12.9.  HP PCLAN (27245 and other 27xxx series) support (hp.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe hp.o

          io = 0          (It will complain if you don't supply an "io=0xNNN")
          irq = 0         (IRQ software selected by driver using autoIRQ)
          (Probes ports: 0x300, 0x320, 0x340, 0x280, 0x2C0, 0x200, 0x240)

          Depends on 8390.o
  ______________________________________________________________________

  7.12.10.  HP 10/100VG PCLAN (ISA, EISA, PCI) support (hp100.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe hp100.o

          hp100_port = 0 (IO-base address)

          (Does EISA-probing, if on EISA-slot;
          On ISA-bus probes all ports from 0x100 thru to 0x3E0
          in increments of 0x020)
  ______________________________________________________________________

  7.12.11.  ICL EtherTeam 16i/32 support (eth16i.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe eth16i.o

          io = 0x2a0      (It will complain if you don't supply an "io=0xNNN")
          irq = 0         (IRQ software selected by driver using autoIRQ)

          Probed ports on eth16i card :
          0x260, 0x280, 0x2A0, 0x240, 0x340, 0x320, 0x380, 0x300

          Probed ports in eth32i card :
          0x1000, 0x2000, 0x3000, 0x4000, 0x5000, 0x6000, 0x7000, 0x8000,
          0x9000, 0xA000, 0xB000, 0xC000, 0xD000, 0xE000, 0xF000
  ______________________________________________________________________

  7.12.12.  NE2000/NE1000 support (ne.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ne.o

          io = 0          (Explicitly *requires* an "io=0xNNN" value)
          irq = 0         (Tries to determine configured IRQ via autoIRQ)
          (Probes ports: 0x300, 0x280, 0x320, 0x340, 0x360)

          Depends on 8390.o
  ______________________________________________________________________

  7.12.13.  NI5210 support (ni52.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ni52.o

          io=0x360
          irq=9
          memstart=0xd0000
          memend=0xd4000

          Don't use autoprobing, io=0
  ______________________________________________________________________

  7.13.  EISA, VLB, PCI and on board controllers

  7.13.1.  Ansel Communications EISA 3200 support (ac3200.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ac3200.o

          As this is an EISA board, Autoprobe should work.

          Depends on 8390.o
  ______________________________________________________________________

  7.13.2.  Apricot Xen-II on board ethernet (apricot.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe apricot.o

          io = 0x300  (Can't be altered!)
          irq = 10
  ______________________________________________________________________

  7.13.3.  DE425, DE434, DE435, DE450, DE500 support (de4x5.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe de4x5.o

          io = 0x000b
          irq = 10
          is_not_dec = 0
          For non-DEC card using DEC 21040/21041/21140 chip, set this to 1
          (EISA, and PCI probing)
  ______________________________________________________________________

  7.13.4.  DECchip Tulip (dc21x4x) PCI support (tulip.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe tulip.o

          Read Documentation/networking/tulip.txt
  ______________________________________________________________________

  7.13.5.  Digi Intl. RightSwitch SE-X support (dgrs.o).

  This is a Linux driver for the Digi International RightSwitch SE-X
  EISA and PCI boards.  These are 4 (EISA) or 6 (PCI) port ethernet
  switches and a NIC combined into a single board.

  There is a tool for setting up input and output packet filters on each
  port, called "dgrsfilt".

  The management tool lets you watch the performance graphically, as
  well as set the SNMP agent IP and IPX addresses, IEEE Spanning Tree,
  and Aging time.  These can also be set from the command line when the
  driver is loaded.

  There is also a companion management tool, called "xrightswitch".

  ______________________________________________________________________
  Load command:
          /sbin/modprobe dgrs.o

          debug=NNN               Debug printing level
          dma=0/1                 Disable/Enable DMA on PCI card
          spantree=0/1            Disable/Enable IEEE spanning tree
          hashexpire=NNN          Change address aging time (default 300 seconds)
          ipaddr=A,B,C,D          Set SNMP agent IP address i.e. 199,86,8,221
          ipxnet=NNN              Set SNMP agent IPX network number
  ______________________________________________________________________

  7.14.  Pocket and portable adaptors

  7.14.1.  D-Link DE600 pocket adaptor support (de600.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe de600.o

          de600_debug = 0
          (On port 0x378, irq 7 -- lpt1;  compile time configurable)
  ______________________________________________________________________

  7.14.2.  D-Link DE620 pocket adaptor support (de620.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe de620.o

          bnc = 0, utp = 0        <-- Force media by setting either.
          io = 0x378              (also compile-time configurable)
          irq = 7
  ______________________________________________________________________

  7.15.  Token Ring driver support

  7.15.1.  Tropic chipset based adaptor support (ibmtr.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ibmtr.o io=0xa20 irq=0

          io = 0xa20      You should not use auto-probing with insmod
          irq = 0
  ______________________________________________________________________

  7.16.  ARCnet support (arcnet.o).

  Read The Fine Information at
  /usr/src/linux/Documentation/networking/arcnet.txt.  Also Arcnet
  hardware information arcnet-hardware.txt is found in same place.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe arcnet.o io=0x300 irq=2 shmem=0xd0000

          You can name the device using something like "device=arc1"
          (for a second card) or "device=eth0" (for weird reasons) if you like.

          (When probing, looks at the following possible addresses:
           Suggested ones:
                  0x300, 0x2E0, 0x2F0, 0x2D0
           Other ones:
                  0x200, 0x210, 0x220, 0x230, 0x240, 0x250, 0x260, 0x270,
                  0x280, 0x290, 0x2A0, 0x2B0, 0x2C0,
                         0x310, 0x320, 0x330, 0x340, 0x350, 0x360, 0x370,
                  0x380, 0x390, 0x3A0,                      0x3E0, 0x3F0  )
  ______________________________________________________________________

  8.  ISDN subsystem

  Setting up ISDN-networking is a complicated task.  Read documentation
  found in /usr/src/linux/Documentation/isdn.

  8.1.  ISDN support (isdn.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe isdn.o

          No module parameters.

          Depends on slhc.o
  ______________________________________________________________________

  8.2.  ICN 2B and 4B support (icn.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe icn.o [parameters]

          portbase=p membase=m icn_id=idstring [icn_id2=idstring2]

          p = portbase            (default: 0x320)
          m = shared memory       (default: 0xd0000)

          When using the ICN double card, you MUST define TWO idstrings.
          idstring must start with a character!

          Depends on isdn.o
  ______________________________________________________________________

  8.3.  PCBIT-D support (pcbit.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe pcbit.o

          mem = 0         default = 0xd0000
          irq = 0         default = 5

          Depends on isdn.o
  ______________________________________________________________________

  8.4.  Teles/NICCY1016PC/Creatix support (teles.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe teles.o io=.....

          io=m0,i0,p0,d0[,m1,i1,p1,d1 ... ,mn,in,pn,dn] teles_id=idstring

          m0 = shared memory of 1st card.         (default: 0xd0000
          i0 = irq of 1st card.                   (default: 15)
          p0 = portbase of 1st card.              (default: 0xd80)
          d0 = D-channel protocol of 1st card.    1=1TR6, 2=EDSS1 (default: 2)

          p1,i1,m1,d1 = Parameters of second card (defaults: none)
          pn,in,mn,d1 = Parameters of n'th card (up to 16 cards are supported)

          idstring = Driver-Id for accessing with utilities and identification
          when using a Line-monitor. (default: none) idstring must start with a character!

          The type of the card is determined by the port, irq and shared memory:

          port == 0, shared memory != 0   -> Teles S0-8
          port != 0, shared memory != 0   -> Teles S0-16.0
          port != 0, shared memory == 0   -> Teles S0-16.3

          Depends on isdn.o
  ______________________________________________________________________

  9.  CD-ROM drivers (not for SCSI or IDE/ATAPI drives)

  9.1.  Aztech/Orchid/Okano/Wearnes/TXC/CyDROM support (aztcd.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe aztcd.o aztcd=[baseaddress]

          Read Documentation/cdrom/aztcd for full information.
  ______________________________________________________________________

  9.2.  Goldstar R420 CDROM support (gscd.o).

  For all kind of other information about the GoldStar R420 CDROM and
  this Linux device driver there is a WWW-URL Page installed:
  http://linux.rz.fh-hannover.de/~raupach.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe gscd.o gscd=[address]

          The default base address is 0x340.
          This will work for most applications.
          Address selection is accomplished by jumpers PN801-1 to PN801-4
          on the GoldStar Interface Card.
          Appropriate settings are: 0x300, 0x310, 0x320, 0x330, 0x340, 0x350,
          0x360, 0x370, 0x380, 0x390, 0x3A0, 0x3B0, 0x3C0, 0x3D0, 0x3E0, 0x3F0
  ______________________________________________________________________

  9.3.  Matsushita/Panasonic/Creative, Longshine, TEAC support
  (sbpcd.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe sbpcd.o sbpcd=[address], x

          address = ioaddress
          x       = SBPRO setting, read Documentation/cdrom/sbpcd
  ______________________________________________________________________

  9.4.  Mitsumi (standard) no XA/Multisession support (mcd.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe mcd.o mcd=0x300,11,0x304,5

          Where parameters are io and irq in pairs.
  ______________________________________________________________________

  9.5.  Mitsumi XA/MultiSession support (mcdx.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe mcdx.o mcdx=0x300,11,0x304,5

          Where parameters are io and irq in pairs.
  ______________________________________________________________________

  9.6.  Optics Storage DOLPHIN 8000AT CDROM support (optcd.o).

  This is the driver for the so-called 'DOLPHIN' drive, with the 34-pin
  Sony-compatible interface. For the IDE-compatible Optics Storage 8001
  drive, you will want the ATAPI CDROM driver. The driver also seems to
  work with the Lasermate CR328A.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe optcd.o optcd=0x340

          Where parameter is the baseaddress of your card.
  ______________________________________________________________________

  9.7.  Philips/LMS CM206 CDROM support (cm206.o).

  This is the driver for the Philips/LMS cdrom drive cm206 in
  combination with the cm260 host adapter card.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe cm206.o cm206=0x300,11

          Where parameters are the baseport and irq of your card.
          The order of baseport and irq line doesn't matter.
          You may specify only one,
          the other will have the value of the compiled-in default.
  ______________________________________________________________________

  9.8.  Sanyo CDR-H94A CDROM support (sjcd.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe sjcd.o sjcd_base=0x340

          Where parameter is the baseaddress of your card.
          Default address = 0x340,  no irq,  no dma.
  ______________________________________________________________________

  9.9.  ISP16/MAD16/Mozart soft configurable cdrom interface support
  (isp16.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe isp16.o [parameters]

          isp16_cdrom_base=<port>
          isp16_cdrom_irq=<irq>
          isp16_cdrom_dma=<dma>
          isp16_cdrom_type=<drive_type>

          Valid values are:
            port=0x340,0x320,0x330,0x360
            irq=0,3,5,7,9,10,11
            dma=0,3,5,6,7
            drive_type=noisp16,Sanyo,Panasonic,Sony,Mitsumi.

            Note that these options are case sensitive.
  ______________________________________________________________________

  9.10.  Sony CDU31A/CDU33A CDROM support (cdu31a.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe cdu31a.o [parameters]

          cdu31a_port=<I/O address> - sets the base I/O.
          This must be specified.

          cdu31a_irq=<interrupt> - Sets the interrupt number.
          Leaving this off will turn interrupts off.
  ______________________________________________________________________

  9.11.  Sony CDU535 CDROM support (sonycd535.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe sonycd535.o sonycd535=[address]

          Where parameter is the baseaddress of your card.
  ______________________________________________________________________

  10.  Filesystems

  10.1.  Minix fs support(minix.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe minix.o

          No module parameters.
  ______________________________________________________________________

  10.2.  Extended fs support (ext.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ext.o

          No module parameters.
  ______________________________________________________________________

  10.3.  Second extended fs support (ext2.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ext2.o

          No module parameters.
  ______________________________________________________________________

  10.4.  xiafs filesystem support (xiafs.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe xiafs.o

          No module parameters.
  ______________________________________________________________________

  10.5.  DOS FAT fs support (fat.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe fat.o

          No module parameters.
  ______________________________________________________________________

  10.6.  MSDOS fs support (msdos.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe msdos.o

          No module parameters.
          Depends on fat.o.
  ______________________________________________________________________

  10.7.  VFAT (Windows-95) fs support (vfat.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe vfat.o

          No module parameters.
          Depends on fat.o.
  ______________________________________________________________________

  10.8.  UMSDOS: Unix like fs on top of std MSDOS FAT fs (umsdos.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe vfat.o

          No module parameters.
          Depends on fat.o and msdos.o.
  ______________________________________________________________________

  10.9.  NFS filesystem support (nfs.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe nfs.o

          No module parameters.
  ______________________________________________________________________

  10.10.  SMB filesystem support (to mount WfW shares etc..) (smbfs.o).

  smbfs is a filesystem which understands the SMB protocol. This is the
  protocol Windows for Workgroups, Windows NT or Lan Manager use to talk
  to each other. smbfs was inspired by samba, the program written by
  Andrew Tridgell that turns any unix host into a file server for DOS or
  Windows clients.  See ftp://nimbus.anu.edu.au/pub/tridge/samba/ for
  this interesting program suite and lots of more information on SMB and
  NetBIOS over TCP/IP. There you also find explanation for concepts like
  netbios name or share.

  To use smbfs, you need a special mount program, which can be found in
  the ksmbfs package, found on
  sunsite.unc.edu:/pub/Linux/system/Filesystems/smbfs.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe smbfs.o

          No module parameters.
  ______________________________________________________________________

  10.11.  NCP filesystem support (to mount NetWare volumes) (ncpfs.o).

  ncpfs is a filesystem which understands the NCP protocol, designed by
  the Novell Corporation for their NetWare(tm) product. NCP is
  functionally similar to the NFS used in the tcp/ip community.  To
  mount a Netware-Filesystem, you need a special mount program, which
  can be found in ncpfs package. Homesite for ncpfs is
  ftp.gwdg.de/pub/linux/misc/ncpfs, but sunsite and its many mirrors
  will have it as well.

  Related products are linware and mars_nwe, which will give Linux
  partial NetWare Server functionality.

  Linware's home site is: klokan.sh.cvut.cz/pub/linux/linware,

  Mars_nwe can be found on ftp.gwdg.de/pub/linux/misc/ncpfs.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ncpfs.o

          No module parameters.

          Depends on ipx.o
  ______________________________________________________________________

  10.12.  ISO9660 cdrom filesystem support (isofs.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe isofs.o

          No module parameters.
  ______________________________________________________________________

  10.13.  OS/2 HPFS filesystem support (read only) (hpfs.o)

  ______________________________________________________________________
  Load command:
          /sbin/modprobe hpfs.o

          No module parameters.
  ______________________________________________________________________

  10.14.  System V and Coherent filesystem support (sysv.o).

  This is the implementation of the SystemV/Coherent filesystem for
  Linux.

  It implements all of

    Xenix FS,

    SystemV/386 FS,

    Coherent FS.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe sysv.o

          No module parameters.
  ______________________________________________________________________

  10.15.  Amiga FFS filesystem support  (affs.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe affs.o

          No module parameters.
  ______________________________________________________________________

  10.16.  UFS filesystem support (read only) (ufs.o).

  Apparently for mounting disks with FreeBSD and/or Sun partitions.  No
  documentation exists, apart from The Source.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ufs.o

          No module parameters.
  ______________________________________________________________________

  11.  Character devices

  11.1.  Support for user misc device modules (misc.o).

  This module is used by atixlmouse, busmouse, msbusmouse, psaux, wdt
  and softdog modules and it is automatically generated if required.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe misc.o

          No module parameters.
  ______________________________________________________________________

  11.2.  Standard/generic serial support (serial.o).

  NOTE: serial.o is required by other modules, like ppp.o and slip.o.
  Also it is required by serial mouse and accordingly by gpm.  However
  this dependency is not detected by present tools and module serial.o
  must be loaded manually.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe serial.o

          No module parameters.
  ______________________________________________________________________

  11.3.  Cyclades async mux support (cyclades.o)

  ______________________________________________________________________
  Load command:
          /sbin/modprobe cyclades.o

          No module parameters.
  ______________________________________________________________________

  11.4.  Stallion multiport serial support

  The intelligent boards also need to have their "firmware" code
  downloaded to them. This is done via a user level application supplied
  in the driver package called "stlload". Compile this program where
  ever you dropped the package files, by typing "make". In its simplest
  form you can then type

  in this directory and that will download board 0 (assuming board 0 is
  an EasyConnection 8/64 board). To download to an ONboard, Brumby or
  Stallion do:

  Read the information at /usr/src/linux/drivers/char/README.stallion.

  11.4.1.  Stallion EasyIO or EC8/32 support (stallion.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe stallion.o

          No module parameters.
  ______________________________________________________________________

  11.4.2.  Stallion EC8/64, ONboard, Brumby support (istallion.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe istallion.o

          No module parameters.
  ______________________________________________________________________

  11.5.  SDL RISCom/8 card support (riscom8.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe riscom8.o [options]

          This driver can support up to 4 boards at time.
          Options : iobase=0xXXX iobase1=0xXXX iobase2=...

  ______________________________________________________________________

  11.6.  Parallel printer support (lp.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe lp.o io=0x378 irq=0

          io = 0
          irq = 0         irq=0 will run in polled mode

          (Probes ports: 0x278, 0x378, 0x3bc)
          Note: loading lp.o without any parameters will
          grab all parallelports.
  ______________________________________________________________________

  11.7.  Bus Mouse Support

  11.7.1.  ATIXL busmouse support (atixlmouse.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe atixlmouse.o

          No module parameters.
          Depends on misc.o
  ______________________________________________________________________

  11.7.2.  Logitech busmouse support (busmouse.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe busmouse.o

          No module parameters.
          Depends on misc.o
  ______________________________________________________________________

  11.7.3.  Microsoft busmouse support (msbusmouse.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe msbusmouse.o

          No module parameters.
          Depends on misc.o
  ______________________________________________________________________

  11.7.4.  PS/2 mouse (aka "auxiliary device") support (psaux.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe psaux.o

          No module parameters.
          Depends on misc.o
  ______________________________________________________________________

  11.8.  Tape support

  For support of SCSI tapedrives, see section SCSI Support.  Support for
  QIC-02 tapes is not modularized.

  11.8.1.  Ftape (QIC-80/Travan) support (ftape.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe ftape.o tracing=3

          Option parameter 'tracing' can take following values

          set it to:     to get:
            0             bugs
            1             + errors
            2             + warnings
            3             + information           ** Default **
            4             + more information
            5             + program flow
            6             + fdc/dma info
            7             + data flow
            8             + everything else
  ______________________________________________________________________

  11.9.  Watchdog Timer Support

  11.9.1.  WDT Watchdog timer (wdt.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe wdt.o

          No module parameters.
          Defaults to io=0x240 irq=14,
          make any required changes to wdt.c directly.
          Depends on misc.o
  ______________________________________________________________________

  11.9.2.  Software Watchdog (softdog.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe softdog.o

          No module parameters.
          Depends on misc.o
  ______________________________________________________________________

  11.9.3.  Berkshire Products PC Watchdog (pcwd.o).

  ______________________________________________________________________
  Load command:
          /sbin/modprobe pcwd.o

          No module parameters.
          Depends on misc.o
  ______________________________________________________________________

  12.  Sound support (sound.o).

  Configuring sound is a complex task, there is a number of Readme-files
  in directory /usr/src/linux/drivers/sound, read them.

  ______________________________________________________________________
  Load command:
          /sbin/modprobe sound.o [option]

          Option: dma_buffsize=32768
  ______________________________________________________________________

  13.  Closing

  If you have found any glaring typos, or outdated info in this
  document, please let me know. It is easy to overlook stuff.

  Thanks,

  Lauri Tischler, ltischler@efore.fi

[ 28 October 1997
  The Linux News HOWTO is not being maintained by the author any
  more.  If you are interested in maintaining the News HOWTO, please
  get in touch with me at <tjbynum@metalab.unc.edu>. ]

  The Linux News HOWTO
  Vince Skahan, <vince@halcyon.com>
  v1.4, 29 November 1995

  This document describes the setup and care+feeding of USENET News
  under Linux.  You need to read this if you plan to post or read USENET
  news either locally on your site or between your site and other sites.
  You probably do *not* need to read this document if don't plan to pro
  vide USENET news as a feature of your system.

  1.  Introduction

  The intent of this document is to answer some of the questions and
  comments that appear to meet the definition of "frequently asked
  questions" about USENET News software under Linux in general, and the
  version in the Linux Slackware distribution in particular.

  This document and the corresponding Mail and UUCP "HOWTO" documents
  collectively supersede the UUCP-NEWS-MAIL-FAQ that has previously been
  posted to comp.os.linux.announce.

  1.1.  New versions of this document

  New versions of this document will be periodically posted to
  comp.os.linux.announce, comp.answers, and news.answers.  They will
  also be added to the various anonymous ftp sites who archive such
  information including sunsite.unc.edu:/pub/Linux/docs/HOWTO.

  In addition, you should be generally able to find this document on the
  Linux WorldWideWeb home page at http://sunsite.unc.edu/mdw/linux.html.

  1.2.  Feedback

  I am interested in any feedback, positive or negative, regarding the
  content of this document via e-mail.  Definitely contact me if you
  find errors or obvious omissions.

  I read, but do not necessarily respond to, all e-mail I receive.
  Requests for enhancements will be considered and acted upon based on
  that day's combination of available time, merit of the request, and
  daily blood pressure :-)

  Flames will quietly go to /dev/null so don't bother.

  In particular, the Linux filesystem standard for pathnames is an
  evolving thing.  What's in this document is there for illustration
  only based on the current standard at the time that part of the
  document was written and in the paths used in the distributions or
  'kits' I've personally seen.  Please consult your particular Linux
  distribution(s) for the paths they use.

  Feedback concerning the actual format of the document should go to the
  HOWTO coordinator - Greg Hankins (tjbynum@metalab.unc.edu).

  1.3.  Copyright Information

  The News-HOWTO is copyrighted (c)1994 Vince Skahan.

  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author.  Translations
  are similarly permitted without express permission if it includes a
  notice on who translated it.
  Short quotes may be used without prior consent by the author.
  Derivative work and partial distributions of the News-HOWTO must be
  accompanied with either a verbatim copy of this file or a pointer to
  the verbatim copy.

  Commercial redistribution is allowed and encouraged; however, the
  author would appreciate being notified of any such distributions (as a
  courtesy).

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents.

  We further want that ALL information provided in the HOWTOS is
  disseminated.  If you have questions, please contact Greg Hankins, the
  Linux HOWTO coordinator, at tjbynum@metalab.unc.edu.

  1.4.  Standard Disclaimer

  Of course, I disavow any potential liability for the contents of this
  document.  Use of the concepts, examples, and/or other content of this
  document is entirely at your own risk.

  1.5.  Other sources of information

  1.5.1.  USENET

     news.admin.misc         General topics of network news administration.
     news.admin.policy       Policy issues of USENET.
     news.admin.technical    Maintaining network news. (Moderated)
     news.software.b         Discussion about B-news-compatible software.
     news.software.nn        Discussion about the "nn" news reader package.
     news.software.nntp      The Network News Transfer Protocol.
     news.software.readers   Software used to read network news.
     news.sysadmin           Comments directed to system administrators.
     news.announce.newusers  Explanatory postings for new users. (Moderated)
     news.newusers.questions Q & A for users new to the Usenet.

  1.5.2.  Books

  The following is a non-inclusive set of books that will help

    "Managing UUCP and USENET" published by O'Reilly+Associates is in
     my opinion the best book out there for figuring out the programs
     and protocols involved in being a USENET site.

    "Unix Communications" published by The Waite Group contains a nice
     description of all the pieces (and more) and how they fit together.

    "Practical Unix Security" published by O'Reilly+Associates has a
     nice discussion of how to secure UUCP in general.

    "The Internet Complete Reference" from Osborne is a fine reference
     book that explains the various services available on Internet and
     is a great source for information on news, mail, and various other
     Internet resources.

    "The Linux Networking Administrators' Guide" from Olaf Kirch of the
     Linux DOC Project is available on the net and is also published by
     (at least) O'Reilly and SSC.  It makes a fine one-stop shopping to
     learn about everything you ever imagined you'd need to know about
     Unix networking.

  1.6.  Where NOT to look for help

  There is nothing "special" about configuring and running USENET news
  under Linux (any more).  Accordingly, you almost certainly do *NOT*
  want to be posting generic news-related questions to the
  comp.os.linux.* newsgroups.

  Unless your posting is truly Linux-specific (ie, "please tell me what
  patches are needed to run INN with the bash1.12 in SLS v1.03") you
  should be asking your questions in the newsgroups mentioned above.

  Let me repeat that.

  There is virtually no reason to post anything news-related in the
  comp.os.linux hierarchy any more.  There are existing newsgroups in
  the news.*  hierarchy to handle *ALL* your questions.

  IF YOU POST TO COMP.OS.LINUX.* FOR NON-LINUX-SPECIFIC QUESTIONS, YOU
  ARE LOOKING IN THE WRONG PLACE FOR HELP.  THE USENET NEWS EXPERTS HANG
  OUT IN THE PLACES INDICATED ABOVE AND GENERALLY DO NOT RUN LINUX.

  POSTING TO THE LINUX HIERARCHY FOR NON-LINUX-SPECIFIC QUESTIONS WASTES
  YOUR TIME AND EVERYONE ELSE'S AND IT FREQUENTLY DELAYS YOU FROM
  GETTING THE ANSWER TO YOUR QUESTION.

  2.  Hardware Requirements

  There are no specific hardware requirements for USENET News under
  Linux.  The only requirement of any type is sufficient disk space to
  hold the software itself, the threads database(s), and the amount of
  news you wish to keep on the system.  Figure on a minimum of 10 MB of
  disk space for starters.

  3.  Getting USENET News software

  All the software referenced in this "HOWTO" is available on the usual
  Internet anonymous ftp sites.

  Looking in /networking/news on ftp.uu.net is usually a good way to
  start.

  The newspak-2.4.tar.z distribution contains config files and readme
  files related to building uucp, news, and mail software under Linux
  from the various freely-available sources.  It can usually be found in
  sunsite.unc.edu:/pub/Linux/system/Mail/news.  If you can't find it on
  sunsite, please send me mail and I'll make sure you get a copy of it.

  4.  News Transport Software

  There are two main sets of news "transport" software for *nix these
  days, Cnews and INN.  The old "Bnews" has been declared officially
  dead and unsupported by its authors.

  News "transport" is defined here to be the software that works behind
  the scenes to post and propagate the news articles as well as making
  the articles available for the newsreaders to access.

  You can set your paths to anything you like, as long as UUCP has the
  absolute path to rnews in the Permissions file and as long as you have
  your newsreaders configured so that they can find "inews" and "mail".

  Important - you're asking for trouble if you try to intermix Cnews and
  INN.  Pick one or the other.  It's ok to add the NNTP "Reference
  Release" into Cnews since they're intended to play well together.

  4.1.  Cnews Cleanup Release

  The current de-facto standard news software is Cnews.  It has been
  around for a number of years, I first saw it sometime around 1988.
  The current version at this writing is called "Cnews Cleanup Release,
  with patch CR.G".

  Cnews's main benefit is its maturity.  It runs on about every *nix you
  can find and there are literally thousands of systems running it
  worldwide.

  Its main disadvantage is that it seems to have been intended for uucp-
  over-modem connections between sites and as such requires the addition
  of NNTP software to handle realtime Internet feeds and reading.

  Regardless, the beginning USENET admin should probably run Cnews first
  since it's so stable, well documented, and has many thousands of
  experienced administrators who can answer questions.

  The 'Cleanup Release' claims that "Overview support has been fully
  integrated and is faster than it used to be."  The result is that you
  can do things like use Cnews NOV support rather than running external
  threading packages for newsreaders such as nn, tin, and trn.

  I haven't quite figured how to implement this part yet, since I
  switched to INN at home long ago.  If anybody wants to clue me in to
  update this document, please drop me a line via e-mail.

  The newspak distribution on sunsite contains working config files for
  the Cnews Cleanup Release under Linux as well as a couple line patch
  you'll need to make to "doexplode" to get around some problems with
  bash1.12.

  Basically you run the new 'quiz' script and take the defaults.  You'll
  have to refer to your /usr/include tree to answer a number of the
  questions, but that's rather straightforward.

  4.1.1.  Installing Cnews

  Installing the Cleanup Release of Cnews is absolutely a "rtfm"
  project.  Just grab the sources, extract them, and follow the
  instructions.

  The quiz.def in newspak was generated by running "quiz" the first time
  and simply looking up the answers by checking out the /usr/include
  files to get the right answers.

  You'll need a recent 'bash' to have C-news pass its self-tests.   Try
  'bash -version' to find which version you have.  Version 1.14.2 is
  definitely no good.  The current (at this writing) version of 1.14.5
  seems better.

  Steve Robbins also has determined that the recent 'cleanup release' of
  Cnews has found a bug in GNU 'join' from shellutils-1.9.  There are a
  few patches needed to the sources for join to deal with the problem.
  Steve's put them on sunsite as I recall.
  4.1.2.  Configuring Cnews

  At the very least, you need to edit or at least take a look at the
  following files that all should be in /usr/local/lib/news:

  active             - the active file
  batchparms         - batch parameters
  explist            - article expiration setup
  mailname           - name in headers for mailed replies
  mailpaths          - path to mail moderated postings to
  organization       - your "org"
  sys                - control what you take and feed
  whoami             - your hostname for the Path: line

  4.1.3.  Maintaining a Cnews Site

  First, a significant rule of thumb is to not mess with files by hand
  that have utilities that configure them. In particular don't set up
  newsfeeds manually (run "addfeed" instead) and don't mess with your
  active file (run "addgroup").  When in doubt, read and re-read the
  docs in the source distribution.

  Everything else can be done via cron.  My crontab for "news" looks
  like the following:

          # take the compressed batches that came in from other systems
          # also, post (locally) articles that originated here
          20 *       * * * /usenet/sw/news/bin/input/newsrun

          # batch 'em up to go out
          0 *        * * * /usenet/sw/news/bin/batch/sendbatches myfeedsite

          # expire C-news
          59 0       * * * /usenet/sw/news/bin/expire/doexpire

          # monitor stuff and report if needed
          10 5       * * * /usenet/sw/news/bin/newsdaily
          00 5       * * * /usenet/sw/new/bin/newswatch

          # turn processing of incoming news batches off 6:30AM - 4:00 PM
          30 6       * * * /usenet/sw/news/bin/input/newsrunning off
          00 16      * * * /usenet/sw/news/bin/input/newsrunning on

  4.2.  InterNetNews (INN)

  INN is the newcomer on the scene, but it's gaining popularity as it
  matures.  Its main benefit is speed and the fact that it contains an
  integrated nntp package.  Its main drawback is that it's new and that
  it doesn't necessarily install and run flawlessly on the many
  "standard *nixes" yet.  In addition, it operates by having a daemon
  (the innd) always running plus potentially a overchan daemon to do
  threading.  The tradeoff seems to be memory vs. speed.

  I've run up to a 5 MB/night newsfeed incoming over UUCP with INN on a
  8 MB 386-33 (no Xwindows running normally) over a 14.4 KB modem with
  no problems at all.

  New USENET admins should probably not try INN until they have
  experience with either B-news or Cnews.  While it's fast and reliable
  under Linux, it's virtually undocumented for the beginning news
  administrator (though in practice it's rather simple to run once you
  figure it out).

  INN is very particular about its permissions.  Don't mess with them.

  INN is also very particular about having a "quality" TCP/IP to work
  with.  Linux is not necessarily all the way there at this time, so it
  is recommended that you grab a Linux-specific INN distribution from
  one of the usual Linux archive sites.

  4.2.1.  Installing INN

  ( from Arjan de Vet - devet@info.win.tue.nl )

  I've made a patch + config kit for INN 1.4 to get it to run on Linux.
  It can be found at:

  ftp.win.tue.nl:/pub/linux/ports/inn-1.4-linux.tar.gz

  INN depends heavily on a good /bin/sh substitute. I use a beta version
  of bash 1.13 that is now available for Linux on the normal archive
  sites.  bash 1.12 gives some small problems with newgroups not being
  handled correctly (maybe some other problems too, I don't remember).

  4.2.2.  Configuring INN

  Basically follow Arjan's instructions and you'll be all set.  Here's
  the summary of what to do:

    In config.data, make sure you have "HAVE_UNIX_DOMAIN DONT"

    Add the hostname of the system running innd to hosts.nntp For a
     uucp-only site, that's your sitename.

    Make sure you do not have a line for nntp in /etc/inetd.conf

    Make sure that you have innshellvars say "HAVE_UUSTAT DO" rather
     than the "DONT" in his example config.data if you have uustat from
     the Taylor UUCP package installed.  If you have this defined wrong,
     it'll result in no outgoing news getting batched.

    If you run INN, definitely define the recommended syslogd stuff
     because it is very, very helpful.

     There is a spectacular (!!!!) FAQ for INN that comes out monthly.
     Look on rtfm.mit.edu:/pub/usenet-by-hierarchy/news for it.  You'll
     be glad you did.

  4.2.3.  Maintaining a INN Site

  I've found that there's essentially zero care-and-feeding of a Linux
  INN site other than having a working cron.  Basically you want a
  crontab that looks something like the following:

          # daily maint, also expire the .overview database and articles
          1 0 * * * /usenet/sw/inn/bin/news.daily expireover delayrm < /dev/null

          # send 'em out
          5 * * * * /usenet/sw/inn/lib/send-uucp

  ( if you switch to bash1.13, the "< /dev/null" above is not needed )

  4.3.  Other News Transport Agents

  The following is a non-inclusive list of other news transport software
  known to work under Linux:

    dynafeed

    nntp1.5.11

    slurp1.05

  5.  News Readers

  There is no "one true newsreader".  As a result, there are many well-
  known newsreaders that port easily to Linux in particular.  At this
  writing, "tin", "trn", and "nn" are in most of the commonly available
  distributions of Linux and in newspak.

  When picking a newsreader, you basically want to find something that
  is easy to use, very configurable by the user, with threading and kill
  files (to select interesting articles or make the non-interesting ones
  not appear at all).

  You can set your paths to anything you like as long as all the
  newsreaders can find "inews" from your Cnews or INN installation and a
  "mail" program to send mail replies to posts.

  This section will talk briefly about several of the most popular ones.
  Before you ask, I use "nn" for lots of reasons :-)

  5.1.  Tin

  Tin is a threaded newsreader generally intended to be easy for new
  users.  It supports kill files and NOV threading.  If you're running
  INN, it will read NOV .overview files by default and not write index
  files.

  To compile Tin under linux, basically just edit the makefile to set
  the locations of the software (especially the location of inews) and
  type "make linux".  There are no patches required for tin under Linux.

  For threading, you can basically just say "tin -u" to update the index
  files.

  To enable the ability to read via NNTP, compile with "NNTP_ABLE"
  defined.  This will result in a file called "tin" for local and one
  called "rtin" for NNTP reading.  "tin -r" will also get the same
  behavior as "rtin".

  Iain Lea recommends the following crontab entry and says that you need
  to do a "make daemon" to make tind.

          # thread the database
          35 * * * * /usenet/bin/tind -u

  I've run tin over a SLIP link as a NNTP-based newsreader.  If you're
  connecting to a system that has a full newsfeed, you will grow
  extremely old waiting for it to load up the "active" file.

  5.2.  Trn/Mthreads

  trn is a threaded derivative of the "rn" newsreader.  trn3.2 and newer
  has the nice ability to select either the "mthreads" (trn's threading
  package) or NOV (threader from INN) threading.

  To compile it, just run Configure and take the calculated defaults.
  You might need to have lib4.4.1 and bash-1.13 (there is a beta now
  available on the various Linux archive sites) to successfully run
  Configure.  You'll probably need both bash1.13 and libs4.4.1 to get
  the new Configure to run properly.

  The newspak distribution on sunsite contains working config files for
  trn under Linux.

  It's probably unwise to try to edit a trn config.sh by hand unless
  you're doing something *VERY* simple like changing the paths to fit
  your tastes.  If you do so, you'll need to run "Configure -S" before
  you "make depend", "make", and "make install".

  Although "Configure" fails generally under Linux with bash1.12,
  "Configure -S" work fine so if you take the newspak config.sh as a
  starting point, you'll be very close.

  Compiling for NNTP reading is as simple as answering "yes" when
  Configure asks you if you want to do so (assuming Configure runs ok on
  your system).  A future release of newspak will include a config.sh
  for NNTP reading as well as the existing one for local reading for
  those of us who are still "bash-impaired" :-)

  I've run trn over a SLIP link as a NNTP-based newsreader.  If you're
  connecting to a system that has a full newsfeed, you will grow
  extremely old waiting for it to load up the "active" file and to
  thread the articles.

  There are dozens of command line switches for trn to get all kinds of
  behavior.  Read the "trn" man page for details.  I use a nice feature
  to set all the switches easily:

    make a file with all the settings in a file called  /.trnrc

    export TRNINIT=" /.trnrc"

  The current newspak has a copy of my .trnrc file as an example.

  trn3.2 and above has support for NOV or mthreads threading that's
  user-selectable.  Accordingly, I recommend building the software to
  allow both threading mechanisms (it's a question in Configure).  To
  pick one at runtime, try "trn -Zo" for NOV and "trn -Zt" for mthreads.
  I do it my aliasing trn to the right thing.

  To build the mthreads database, do something like the following in the
  "news" crontab:

          # thread the trn database
          35 * * * * /usenet/bin/mthreads all

  5.3.  NN

  The newspak distribution on sunsite contains working config files for
  nn6.4.18 that you can drop into place and type "make" under Linux.
  They also work with the 6.5b3 beta of the coming nn6.5 update.

  When you're done compiling, you need to do the following:

    - run the "inst" program to install things.  (install everything)

    - initialize the database

    - fire up nnmaster

  See the nn docs for details.  Compiling, configuring, and running nn
  under Linux is no different than running nn on any other *nix with the
  exception that you may want to run nnmaster as a cron entry rather
  than as a daemon.  If you run it as a daemon under linux, it may not
  tend to wake up properly (the net effect of running it from cron is
  the same anyway).

  Support of "nn" is as simple as the following crontab entries:

          # run nnmaster to collect "nn" stuff
          # (not needed if you use NOV from INN in nn-6.5beta3)
          25 * * * * /usenet/sw/nn/lib/nnmaster

          # expire the nn database
          # (not needed if you use NOV from INN in nn-6.5beta3)
          0  4       * * * /usenet/sw/nn/bin/nnadmin =EYW

          # stash a copy of the active file for "nngoback" and keep last 7
          0 3 * * * /usenet/sw/nn/lib/back_act 7

  I've experimented a little with running nn as a NNTP-based newsreader
  over a SLIP connection.  In this case, you'll want to edit the
  config.h file slightly.  See the comments in the file for details.
  When running as a NNTP-based reader, nn runs a local copy of nnmaster
  to keep the threads database on the local system so that article
  selection is very fast (although you of course wait for the arcticle
  text a little if you're running SLIP over a modem).

  The new version (6.5.x) of nn has support for INN's NOV database which
  makes it unnecessary for you to run nnmaster at all.  This
  configuration is highly recommended, since as a result you won't have
  to spend the cpu time to run nnmaster at all and you won't get its
  database and the actual news articles available out of synch.

  5.4.  Other newsreaders

  The following is a non-inclusive list of newsreaders said to install
  and run under Linux:

    tass

    xrn

    gnus

  6.  Acknowledgements

  The following people have helped in the assembly of the information
  (and experience) that helped make this document possible:

  Ed Carp, Steve Robbins, Ian Taylor, Greg Naber, Matt Welsh, Iain Lea,
  Arjan de Vet

  If I forgot anybody, my apologies.

  7.  Frequently Asked Questions about USENET (in c.o.l.* anyway)

  7.1.  Why can't I post to moderated groups ?

  Probably because the newsreader is trying to call /bin/mail to send
  the mail and it doesn't like it.  Replace the /bin/mail in old
  versions of SLS with the port of mailx-5.5.tar.z from a modern
  Slackware and use Slackware's pkgtool to install the kit and you'll be
  all set.

  Another possibility is that you have a moderated newsgroup set up on
  your local system as not-moderated and somebody upstream is quietly
  deleting the article (some system's software, not a person).  Make
  sure you run a "checkgroups" every now and then when the checkgroups
  article rolls by in news.admin every few weeks.

  7.2.  Why do I have problems that appear to be permission-related ?

  Because they are :-)

  Check to see that your permissions are right and that you have a
  "news" username and group in /etc/passwd and /etc/group that matches
  the binary distribution you grabbed.  It seems that there is not yet a
  Linux-standard for commonly available accounts.

  All the stuff in /usr/local/lib/news should be news.news except
  /usr/local/lib/news/setnewsids which should be setuid root.

  You can use whatever UID and GID you want for "news".

  7.3.  Why can I post articles locally, but they don't show up or get
  fed downstream ?

  Probably because you didn't call newsrun from cron.  Maybe because you
  edited your sys file and messed it up.  Maybe because you don't have a
  /usr/spool/news/out.going tree or something.   Maybe because you
  grabbed a distribution that has the 'Performance' or 'Cleanup'
  releases of Cnews, which batch things up and need 'newsrun' running
  from cron to process them to feed the other sites and to have them
  visible locally.

  Do not create newsgroups or feeds by editing the active or sys files.
  Use the utilities in /usr/local/lib/news/bin/maint to do it.

  7.4.  Why doesn't my binary distribution have nntp ?

  Because it's supposed to be plug-n-play under Linux and because I
  didn't want to make SLS's news stuff doubly big by having to maintain
  both nntp and non-nntp versions of the newsreaders and news transport
  programs.  Also because it compiles in localized information that is
  not overridable at runtime via a config file.

  7.5.  Why does doexpire (or relaynews or) say "severe space shortage"
  when there's lots of room ?

  Because it can't read /etc/mtab.  Make it mode 644.  This happens when
  you unmount a mounted filesystem by root with a umask that doesn't
  permit world-read of files owned by root.

  7.6.  Why does everything look normal, but posting doesn't happen ?

  Older versions of Linux had a "broken" sed that Cnews was prone to
  blow up.  In particular, if you've installed over an old SLS, be sure
  to check /bin and /usr/bin to be certain you have only one copy of sed
  and that it's a modern one.

  Because as of the 'Performance Release' in about February 1993, you
  have to have 'newsrun' run from cron periodically to process things.
  That's a feature that apparently suprises some people.

  7.7.  the various independent thread databases ?  Can I hook the new
  news overview (NOV) stuff into trn/tin/nn to replace

  Yes. trn, tin, and the beta of nn support it now.

  You can hook it into the Performance and Cleanup Releases of Cnews and
  various other readers as well.

  The beta copy of nn6.5 I have here has NOV support and it works just
  dandy under Linux.  I run it here and have nn running without having
  to run nnmaster (!).  Look on uniwa.uwa.edu.au for a copy of it.

  7.8.  Why can't we have a binary distribution of NNTP ?

  Because significant local-only information is compiled-in and cannot
  be determined auto-magically at runtime.  If you're that into things,
  please grab INN rather than rolling your own with Cnews plus NNTP.

  7.9.  storing any news articles or databases locally.  How do I set up
  NNTP to allow read/post across the network while *not*

  ( mdw@sunsite.unc.edu (Matt Welsh) )

    1) Grab the "reference implementation" of nntp and a copy or rn
     from your local archive site.  If you connect to ftp.uu.net you'd
     grab:

     nntp.1.5.11.tar.Z from ftp.uu.net:/networking/news/nntp

    2) compile nntp as follows:

     copy common/conf.h.dist to common/conf.h.

     Edit common/conf.h to set certain options: The only ones I set
     were:

     DOMAIN: undefine it (i.e. change the line to #undef DOMAIN).

     REALDOMAIN: Define this. It looks up the domain using the
     libraries.
     SERVER_FILE: Set this to the name of the file which will contain
     the hostname of the news server (i.e. the machine you'll read and
     post news through). I use "/usr/local/lib/news/server".

     PASSFILE: If your news server requires authorization (i.e.  some
     kind of username/password) to post, set this to the name of the
     file which contains the username and password (described below).  I
     use "/usr/local/lib/news/nntppass".

     I decided to keep all of the other news stuff in
     /usr/local/lib/news.  So I set all of the rest of the pathnames in
     the file (i.e.  ACTIVE_FILE, NEWSGROUPS_FILE, etc.) to use
     /usr/local/lib/news.  Many of these files are only used by the NNTP
     server, not the client, but to be safe I changed them all to point
     to the right directory. You can of course use the default
     pathnames; just make sure you create the directory accordingly.

     3) Create the user "usenet" if you haven't already. The inews
     program runs as this user. All you need is a userid; you don't need
     a home directory or shell or anything for the user. Just plop the
     following line into your /etc/passwd:

                                     usenet:*:13:1::/:

  Make sure you set the userid ("13", above) to something unique. The
  group can be anything; I use "daemon" (gid 1).

    4) Create the SERVER_FILE, above. For example, my news server is
     "wonton.tc.cornell.edu", so I created the file
     /usr/local/lib/news/server which contained one line:

                      wonton.tc.cornell.edu

    5) Create the PASSFILE. This file contains lines of the form

                     <server name> <username> <password>

  Let's say that your news server (the one in SERVER_FILE, above) is
  "shoop.vpizza.com", and to post on that machine you need to be autho
  rized as the user "news" with a password of "floof". Thus, in the
  PASSFILE (I use /usr/local/lib/news/nntppass), you need the line

                  shoop.vpizza.com news floof

    6) Make this file secure! The inews program runs as the user
     "usenet", so make this news directory owned by that user and the
     nntppass file as well.

             chown usenet /usr/local/lib/news
             chmod 755 /usr/local/lib/news
             chown usenet /usr/local/lib/news/nntppass
             chmod 600 /usr/local/lib/news/nntppass

  So nobody else can read this file. No, the passwords in it are not
  encrypted.

    7) Go back to the nntp.1.5.11 source directory; issue "make
     client".  At this point you'll build the NNTP version of inews,
     which is the only software used by the NNTP client.
     When I built inews, there was a bug in the library which caused the
     function uname() in uname.c to call itself eternally. This should
     be gone now; however, if inews seems to hang and your system starts
     slowing down *a lot* you should rename the function "uname()" in
     uname.c to something like "my_uname()", and change the calls to it
     (in inews.c) to call my_uname() instead. Mail me if you run into
     this problem.

                     (VDS note - this means mail to Matt-not me :-) )

    8) Issue "make install_client". This will install the inews stuff.
     Also link /usr/local/lib/news/inews to /usr/local/bin/inews

     Now you should be able to happily post (by hand). Try something
     like the following:

                     $ inews -h << EOF
                     Newsgroups: misc.test
                     From: me@foo.bar.com
                     Subject: Testing
                     Reply-To: my-real-address@wherever.edu

                     This is a test.
                     EOF

  If this works, inews should post the article. You'll know because
  test-responders on misc.test will reply to the address on the Reply-To
  line, above. Please don't do test postings on real groups, like c.o.l.
  :)

$Author: tbynum $
$Date: 1999/12/06 00:39:41 $

This directory contains obsolete and unmaintained Linux HOWTO
documents.  They are only distributed in plain text.  If you would 
like to maintain and update an obsolete documents, please contact 
me at <linux-howto@metalab.unc.edu>.

You should be aware that you are reading old documentation here!
However, sometimes old documentation is better than none at all...

Please contact Tim Bynum (the HOWTO coordinator) via email at 
<linux-howto@metalab.unc.edu>, with any questions or comments. 
  The Linux SCSI HOWTO
  Drew Eckhardt,<drew@PoohSticks.ORG> (transformed to linuxdoc-sgml for
  mat by Dieter Faulbaum), <faulbaum@bii.bessy.de>
  v2.30, 30 August 1996

  1.  Introduction

  This documentation is free documentation; you can redistribute it
  and/or modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This documentation is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this documentation; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  That said, I'd appreciate it if people would ask me
  <drew@PoohSticks.ORG> if there's a newer version available before they
  publish it.  When people publish outdated versions, I get questions
  from users that are answered in newer versions, and it reflects poorly
  on the publisher.  I'd also prefer that all references to free
  distribution sites, and possibly competing distributions/products be
  left intact.

  IMPORTANT :

  BUG REPORTS OR OTHER REQUESTS FOR HELP WHICH FAIL TO FOLLOW THE
  PROCEDURES OUTLINED IN THE ``REPORTING BUGS'' SECTION WILL BE IGNORED.

  This HOWTO covers the Linux SCSI subsystem, as implemented in Linux
  kernel revision 1.2.10 and newer alpha code.  Earlier revisions of the
  SCSI code are _unsupported_, and may differ significantly in terms of
  the drivers implemented, performance, and options available.

  For additional information, you may wish to join the linux-scsi
  mailing list by mailing majordomo@vger.rutgers.edu with the line

       subscribe linux-scsi

  in the text.  You can unsubscribe by sending mail to the same address
  and including

       unsubscribe linux-scsi

  in the text.

  Once you're subscribed, you can send mail to the list at

  linux-scsi@vger.rutgers.edu

  I'm aware that this document isn't the most user-friendly, and that
  there may be inaccuracies and oversights.  If you have constructive
  comments on how to rectify the situation you're free to mail me about
  it.

  2.  Common Problems

  This section lists some of the common problems that people have.  If
  there is not anything here that answers your questions, you should
  also consult the sections for your host adapter and the devices in
  that are giving you problems.

  2.1.  General Flakiness

  If you experience random errors, the most likely causes are cabling
  and termination problems.

  Some products, such as those built around the newer NCR chips, feature
  digital filtering and active signal negation, and aren't very
  sensitive to cabling problems.

  Others, such as the Adaptec 154xC, 154xCF, and 274x, are _extremely_
  sensitive and may fail with cables that work with other systems.

  I reiterate : some host adapters are _extremely_ sensitive to cabling
  and termination problems and therefore, cabling and termination should
  be the first things checked when there are problems.

  To minimize your problems, you should use cables which

  1. Claim SCSI-II compliance

  2. Have a characteristic impedance of 132 ohms

  3. All come from the same source to avoid impedance mismatches

  4. Come from a reputable vendor such as Amphenol

  Termination power should be provided by _all_ devices on the SCSI bus,
  through a diode to prevent current backflow, so that sufficient power
  is available at the ends of the cable where it is needed.  To prevent
  damage if the bus is shorted, TERMPWR should be driven through a fuse
  or other current limiting device.

  If multiple devices, external cables, or FAST SCSI 2 are used, active
  or forced perfect termination should be used on both ends of the SCSI
  bus.

  See the Comp.Periphs.Scsi FAQ (available on tsx-11 in
  pub/linux/ALPHA/scsi) for more information about active termination.

  2.2.  The kernel command line

  Other parts of the documentation refer to a "kernel command line".

  The kernel command line is a set of options you may specify from
  either the LILO : prompt after an image name, or in the append field
  in your LILO configuration file (LILO .14 and newer use
  /etc/lilo.conf, older versions use /etc/lilo/config).

  Boot your system with LILO, and hit one of the alt, control, or shift
  keys when it first comes up to get a prompt.  LILO should respond with

       :

  At this prompt, you can select a kernel image to boot, or list them
  with ?.  Ie

       :?

       ramdisk floppy harddisk

  To boot that kernel with the command line options you have selected,
  simply enter the name followed by a white space delimited list of
  options, terminating with a return.

  Options take the form of

       variable=valuelist

  Where valuelist may be a single value or comma delimited list of
  values with no whitespace.  With the exception of root device,
  individual values are numbers, and may be specified in either decimal
  or hexadecimal.

  Ie, to boot linux with an Adaptec 1520 clone not recognized at bootup,
  you might type

       :floppy aha152x=0x340,11,7,1

  If you don't care to type all of this at boot time, it is also
  possible to use the LILO configuration file "append" option with LILO
  .13 and newer.

  Ie,

       append="aha152x=0x340,11,7,1"

  2.3.  A SCSI device shows up at all possible IDs

  If this is the case, you have strapped the device at the same address
  as the controller (typically 7, although some boards use other
  addresses, with 6 being used by some Future Domain boards).

  Please change the jumper settings.

  2.4.  A SCSI device shows up at all possible LUNs

  The device has buggy firmware.

  As an interim solution, you should try using the kernel command line
  option

       max_scsi_luns=1

  If that works, there is a list of buggy devices in the kernel sources
  in drivers/scsi/scsi.c in the variable blacklist.  Add your device to
  this list and mail the patch to Linus Torvalds
  <Linus.Torvalds@cs.Helsinki.FI>.

  2.5.  You get sense errors when you know the devices are error free

  Sometimes this is caused by bad cables or improper termination.

  See section ``General Flakiness''

  2.6.  A kernel configured with networking does not work

  The auto-probe routines for many of the network drivers are not
  passive, and will interfere with operation with some of the SCSI
  drivers.

  2.7.  Device detected, but unable to access

  A SCSI device is detected by the kernel, but you are unable to access
  it - ie mkfs /dev/sdc, tar xvf /dev/rst2, etc fails.

  You don't have a special file in /dev for the device.

  Unix devices are identified as either block or character (block
  devices go through the buffer cache, character devices do not)
  devices, a major number (ie which driver is used - block major 8
  corresponds to SCSI disks) and a minor number (ie which unit is being
  accessed through a given driver - ie character major 4, minor 0 is the
  first virtual console, minor 1 the next, etc).  However, accessing
  devices through this separate namespace would break the unix/Linux
  metaphor of "everything is a file," so character and block device
  special files are created under /dev.  This lets you access the raw
  third SCSI disk device as /dev/sdc, the first serial port as
  /dev/ttyS0, etc.

  The preferred method for creating a file is using the MAKEDEV script -
  cd /dev

  and run MAKEDEV (as root) for the devices you want to create - ie

        ./MAKEDEV sdc

  wildcards "should" work - ie

        ./MAKEDEV sd\*

  "should" create entries for all SCSI disk devices (doing this should
  create /dev/sda through /dev/sdp, with fifteen partition entries for
  each)

        ./MAKEDEV sdc\*

  "should" create entries for /dev/sdc and all fifteen permissible
  partitions on /dev/sdc, etc.

  I say "should" because this is the standard unix behavior - the
  MAKEDEV script in your installation may not conform to this behavior,
  or may have restricted the number of devices it will create.

  If MAKEDEV won't do the right magic for you, you'll have to create the
  device entries by hand with the mknod command.

  The block/character type, major, and minor numbers are specified for
  the various SCSI devices in section ``Device Files'' in the
  appropriate section.

  Take those numbers, and use (as root)

       mknod /dev/device b|c major minor

  ie -

       mknod /dev/sdc b 8 32
       mknod /dev/rst0 c 9 0

  2.8.  SCSI System Lockups

  This could be one of a number of things.  Also see the section for
  your specific host adapter for possible further solutions.

  There are cases where the lockups seem to occur when multiple devices
  are in use at the same time.  In this case, you can try contacting the
  manufacturer of the devices and see if firmware upgrades are available
  which would correct the problem.  If possible, try a different scsi
  cable, or try on another system.  This can also be caused by bad
  blocks on disks, or by bad handling of DMA by the motherboard (for
  host adapters that do DMA).  There are probably many other possible
  conditions that could lead to this type of event.

  Sometimes these problems occur when there are multiple devices in use
  on the bus at the same time.  In this case, if your host adapter
  driver supports more than one outstanding command on the bus at one
  time, try reducing this to 1 and see if this helps. If you have tape
  drives or slow cdrom drives on the bus, this might not be a practical
  solution.

  2.9.  Configuring and building the kernel

  Unused SCSI drivers eat up valuable memory, aggravating memory
  shortage problems on small systems because kernel memory is unpagable.

  So, you will want to build a kernel tuned for your system, with only
  the drivers you need installed.

       cd to /usr/src/linux

  If you are using a root device other than the current one, or
  something other than 80x25 VGA, and you are writing a boot floppy, you
  should edit the makefile, and make sure the

       ROOT_DEV =

  and

       SVGA_MODE =

  lines are the way you want them.

  If you've installed any patches, you may wish to guarantee that all
  files are rebuilt.  If this is the case, you should type

       make mrproper

  Irregardless of weather you ran make mrproper, type

       make config

  and answer the configuration questions.  Then run

       make depend

  and finally

       make

  Once the build completes, you may wish to update the lilo
  configuration, or write a boot floppy.  A boot floppy may be made by
  running

       make zdisk

  2.10.  LUNS other than 0 don't work

  Many SCSI devices are horrendously broken, lock the SCSI bus up solid,
  and do other bad things when you attempt to talk to them at a logical
  unit someplace other than zero.

  So, by default recent versions of the Linux kernel will not probe luns
  other than 0.  To work around this, you need to the max_scsi_luns
  command line option, or recompile the kernel with the
  CONFIG_SCSI_MULTI_LUN option.

  Usually, you'll put

       max_scsi_luns=8

  on your LILO command line.

  If your multi-LUN devices still aren't detected correctly after trying
  one of these fixes (as the case will be with many old SCSI->MFM, RLL,
  ESDI, SMD, and similar bridge boards),  you'll be thwarted by this
  piece of code

       /* Some scsi-1 peripherals do not handle lun != 0.
          I am assuming that scsi-2 peripherals do better */
       if((scsi_result[2] & 0x07) == 1 &&
          (scsi_result[3] & 0x0f) == 0) break;

  in scan_scsis() in drivers/scsi/scsi.c.  Delete this code, and you
  should be fine.

  3.  Reporting Bugs

  The Linux SCSI developers don't necessarily maintain old revisions of
  the code due to space constraints.  So, if you are not running the
  latest publically released Linux kernel (note that many of the Linux
  distributions, such as MCC, SLS, Yggdrasil, etc. often lag one or even
  twenty patches behind this) chances are we will be unable to solve
  your problem.  So, before reporting a bug, please check to see if it
  exists with the latest publically available kernel.

  If after upgrading, and reading this document thoroughly, you still
  believe that you have a bug, please mail a bug report to the SCSI
  channel of the mailing list where it will be seen by many of the
  people who've contributed to the Linux SCSI drivers.

  In your bug report, please provide as much information as possible
  regarding your hardware configuration, the exact text of

  all of the messages that Linux prints when it boots, when the error
  condition occurs, and where in the source code the error is.  Use the
  procedures outlined in ``Capturing messages'' and ``Locating the
  source of a panic()''.

  Failure to provide the maximum possible amount of information may
  result in misdiagnosis of your problem, or developers deciding that
  there are other more interesting problems to fix.

  The bottom line is that if we can't reproduce your bug, and you can't
  point at us what's broken, it won't get fixed.

  3.1.  Capturing messages

  If you are not running a kernel message logging system :

  Insure that the /proc filesystem is mounted.

       grep proc /etc/mtab

  If the /proc filesystem is not mounted, mount it

       mkdir /proc
       chmod 755 /proc
       mount -t proc /proc /proc

  Copy the kernel revision and messages into a log file

       cat /proc/version > /tmp/log
       cat /proc/kmsg >> /tmp/log

  Type CNTRL-C after a second or two.

  If you are running some logger, you'll have to poke through the
  appropriate log files (/etc/syslog.conf should be of some use in
  locating them), or use dmesg.

  If Linux is not yet bootstrapped, format a floppy diskette under DOS.
  Note that if you have a distribution which mounts the root diskette
  off of floppy rather than RAM drive, you'll have to format a diskette
  readable in the drive not being used to mount root or use their
  ramdisk boot option.

  Boot Linux off your distribution boot floppy, preferably in single
  user mode using a RAM disk as root.

       mkdir /tmp/dos

  Insert the diskette in a drive not being used to mount root, and mount
  it.  Ie

       mount -t msdos /dev/fd0 /tmp/dos

  or

       mount -t msdos /dev/fd1 /tmp/dos

  Copy your log to it

       cp /tmp/log /tmp/dos/log

  Unmount the DOS floppy

       umount /tmp/dos

  And shutdown Linux

       shutdown

  Reboot into DOS, and using your favorite communications software
  include the log file in your trouble mail.

  3.2.  Locating the source of a panic()

  Like other unices, when a fatal error is encountered, Linux calls the
  kernel panic() function.  Unlike other unices, Linux doesn't dump core
  to the swap or dump device and reboot automatically.  Instead, a
  useful summary of state information is printed for the user to
  manually copy down.  Ie :

       Unable to handle kernel NULL pointer dereference at virtual address c0000004
       current->tss,cr3 = 00101000, %cr3 = 00101000
       *pde = 00102027
       *pte = 00000027
       Oops: 0000
       EIP:    0010:0019c905
       EFLAGS: 00010002
       eax: 0000000a   ebx: 001cd0e8   ecx: 00000006   edx: 000003d5
       esi: 001cd0a8   edi: 00000000   ebp: 00000000   esp: 001a18c0
       ds: 0018   es: 0018   fs: 002b   gs: 002b   ss: 0018
       Process swapper (pid: 0, process nr: 0, stackpage=001a09c8)
       Stack: 0019c5c6 00000000 0019c5b2 00000000 0019c5a5 001cd0a8 00000002 00000000
              001cd0e8 001cd0a8 00000000 001cdb38 001cdb00 00000000 001ce284 0019d001
              001cd004 0000e800 fbfff000 0019d051 001cd0a8 00000000 001a29f4 00800000
       Call Trace: 0019c5c6 0019c5b2 0018c5a5 0019d001 0019d051 00111508 00111502
                   0011e800 0011154d 00110f63 0010e2b3 0010ef55 0010ddb7
       Code: 8b 57 04 52 68 d2 c5 19 00 e8 cd a0 f7 ff 83 c4 20 8b 4f 04
       Aiee, killing interrupt handler
       kfree of non-kmalloced memory: 001a29c0, next= 00000000, order=0
       task[0] (swapper) killed: unable to recover
       Kernel panic: Trying to free up swapper memory space
       In swapper task - not syncing

  Take the hexadecimal number on the EIP: line, in this case 19c905, and
  search through /usr/src/linux/zSystem.map for the highest number not
  larger than that address.  Ie,

       0019a000 T _fix_pointers
       0019c700 t _intr_scsi
       0019d000 t _NCR53c7x0_intr

  That tells you what function its in.  Recompile the source file which
  defines that function file with debugging enabled, or the whole kernel
  if you prefer by editing /usr/src/linux/Makefile and adding a "-g" to
  the CFLAGS definition.
       #
       # standard CFLAGS
       #

  Ie,

       CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe

  becomes

       CFLAGS = -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe

  Rebuild the kernel, incrementally or by doing a

       make clean
       make

  Make the kernel bootable by creating an entry in your /etc/lilo.conf
  for it

       image = /usr/src/linux/zImage
       label = experimental

  and re-running LILO as root, or by creating a boot floppy

       make zImage

  Reboot and record the new EIP for the error.

  If you have script installed, you may want to start it, as it will log
  your debugging session to the typescript file.

  Now, run

       gdb /usr/src/linux/tools/zSystem

  and enter

       info line *<your EIP>

  Ie,

       info line *0x19c905

  To which GDB will respond something like

       (gdb) info line *0x19c905
       Line 2855 of "53c7,8xx.c" starts at address 0x19c905 <intr_scsi+641&>
          and ends at 0x19c913 <intr_scsi+655>.

  Record this information.  Then, enter

       list <line number>

  Ie,

       (gdb) list 2855
       2850    /*      printk("scsi%d : target %d lun %d unexpected disconnect\n",
       2851                host->host_no, cmd->cmd->target, cmd->cmd->lun); */
       2852            printk("host : 0x%x\n", (unsigned) host);
       2853            printk("host->host_no : %d\n", host->host_no);
       2854            printk("cmd : 0x%x\n", (unsigned) cmd);
       2855            printk("cmd->cmd : 0x%x\n", (unsigned) cmd->cmd);
       2856            printk("cmd->cmd->target : %d\n", cmd->cmd->target);
       2857            if (cmd) {;
       2858                abnormal_finished(cmd, DID_ERROR << 16);
       2859            }
       2860            hostdata->dsp = hostdata->script + hostdata->E_schedule /
       2861                sizeof(long);
       2862            hostdata->dsp_changed = 1;
       2863        /* SCSI PARITY error */
       2864        }
       2865
       2866        if (sstat0_sist0 & SSTAT0_PAR) {
       2867            fatal = 1;
       2868            if (cmd && cmd->cmd) {
       2869                printk("scsi%d : target %d lun %d parity error.\n",

  Obviously, quit will take you out of GDB.

  Record this information too, as it will provide a context in case the
  developers' kernels differ from yours.

  4.  Modules

  This section gives specific details regarding the support for loadable
  kernel modules and how it relates to SCSI.

  4.1.  General Information

  Loadable modules are a means by which the user or system administrator
  can load files into the kernel's memory in such a way that the
  kernel's capabilities are expanded.  The most common usages of modules
  are for drivers to support hardware, or to load filesytems.

  There are several advantages of modules for SCSI.  One is that a
  system administrator trying to maintain a large number of machines can
  use a single kernel image for all of the machines, and then load
  kernel modules to support hardware that is only present on some
  machines.

  It is also possible for someone trying to create a distribution to use
  a script on the bootable floppy to query for which modules to be
  loaded.  This saves memory that would otherwise be wasted on unused
  drivers, and it would also reduce the possibility that a probe for a
  non-existent card would screw up some other card on the system.

  Modules also work out nicely on laptops, which tend to have less
  memory than desktop machines, and people tend to want to keep the
  kernel image as small as possible and load modules as required.  Also,
  modules makes supporting PCMCIA SCSI cards on laptops somewhat easier,
  since you can load and unload the driver as the card is
  inserted/removed. [Note: currently the qlogic and 152x drivers support
  PCMCIA].

  Finally, there is the advantage that kernel developers can more easily
  debug and test their drivers, since testing a new driver does not
  require rebooting the machine (provided of course that the machine has
  not completely crashed as a result of some bug in the driver).

  Although modules are very nice, there is one limitation.  If your root
  disk partition is on a scsi device, you will not be able to use
  modularized versions of scsi code required to access the disk.  This
  is because the system must be able to mount the root partition before
  it can load any modules from disk.  There are people thinking about
  ways of fixing the loader and the kernel so that the kernel can self-
  load modules prior to attempting to mount the root filesystem, so at
  some point in the future this limitation may be lifted.

  4.2.  Module support in the 1.2.N kernel

  In the 1.2.N series of kernels, there is partial support for SCSI
  kernel modules.  While none of the high level drivers (such as disk,
  tape, etc) can be used as modules, most of the low level drivers (i.e.
  1542, 1522) can be loaded and unloaded as required.  Each time you
  load a low-level driver, the driver first searches for cards that can
  be driven.  Next, the bus is scanned for each card that is found, and
  then the internal data structures are set up so as to make it possible
  to actually use the devices attached to the cards that the driver is
  managing.

  When you are through with a low-level driver, you can unload it.  You
  should keep in mind that usage counts are maintained based upon
  mounted filesystems, open files, etc, so that if you are still using a
  device that the driver is managing, the rmmod utility will tell you
  that the device is still busy and refuse to unload the driver.  When
  the driver is unloaded, all of the associated data structures are also
  freed so that the system state should be back to where it was before
  the module was loaded.  This means that the driver could be reloaded
  at a later time if required.

  4.3.  Module support in the 1.3.N kernel

  In the 1.3 series of kernels, the scsi code is completely modularized.
  This means that you can start with a kernel that has no scsi support
  whatsoever, and start loading modules and you will eventually end up
  with complete support.

  If you wish, you can compile some parts of the SCSI code into the
  kernel and then load other parts later - it is all up to you how much
  gets loaded at runtime and how much is linked directly into the
  kernel.

  If you are starting with a kernel that has no support whatsoever for
  SCSI, then the first thing you will need to do is to load the scsi
  core into the kernel - this is in a module called "scsi_mod".  You
  will not be able to load any other scsi modules until you have this
  loaded into kernel memory.  Since this does not contain any low-level
  drivers, the act of loading this module will not scan any busses, nor
  will it activate any drivers for scsi disks, tapes, etc.  If you
  answered 'Y' to the CONFIG_SCSI question when you built your kernel,
  you will not need to load this module.

  At this point you can add modules in more or less any order to achieve
  the desired functionality.  Usage counts are interlocks are used to
  prevent unloading of any component which might still be in use, and
  you will get a message from rmmod if a module is still busy.

  The high level drivers are in modules named "sd_mod", "sr_mod", "st",
  and "sg", for disk, cdrom, tape, and scsi generics support
  respectively.  When you load a high level driver, the device list for
  all attached hosts is examined for devices which the high level driver
  can drive, and these are automatically activated.

  The use of modules with low level drivers were described in the
  section of the ``modules under 1.2 kernels''.  When a low-level driver
  is loaded, the bus is scanned, and each device is examined by each of
  the high level drivers to see if they recognize it as something that
  they can drive - anything recognized is automatically attached and
  activated.

  5.  Hosts

  This section gives specific information about the various host
  adapters that are supported in some way or another under linux.

  5.1.  Supported and Unsupported Hardware

  Drivers in the distribution kernel :

  Adaptec 152x, Adaptec 154x (DTC 329x boards usually work, but are
  unsupported), Adaptec 174x, Adaptec 274x/284x (294x support requires a
  newer version of the driver), BusLogic MultiMaster Host Adapters,
  EATA-DMA and EATA-PIO protocol compilant boards (DPT PM2001, PM2011,
  PM2012A, PM2012B, PM2021, PM2022, PM2024, PM2122, PM2124, PM2322,
  PM2041, PM2042, PM2044, PM2142, PM2144, PM2322, PM3021, PM3122,
  PM3222, PM3224, PM3334 some boards from NEC, AT&T, SNI, AST, Olivetti,
  and Alphatronix), Future Domain 850, 885, 950, and other boards in
  that series (but not the 840, 841, 880, and 881 boards unless you make
  the appropriate patch), Future Domain 16x0 with TMC-1800, TMC-18C30,
  or TMC-18C50 chips, NCR53c8xx,PAS16 SCSI ports, Seagate ST0x, Trantor
  T128/T130/T228 boards, Ultrastor 14F, 24F, and 34F, and Western
  Digital 7000.

  MCA :

  MCA boards which are compatible with a supported board (ie, Adaptec
  1640 and BusLogic 640) will work.

  Alpha drivers :

  Many ALPHA drivers are available at

       ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi

  Drivers which will work with modifications

  NCR53c8x0/7x0:

       A NCR53c8xx driver has been developed, but currently will not work
       with NCR53c700, NCR53c700-66, NCR53c710, and NCR53c720 chips.  A list
       of changes needed to make each of these chips work follows, as well
       as a summary of the complexity.

       NCR53c720 (trivial) - detection changes, initialization changes, change
           fixup code to translate '810 register addresses to
           '7xx mapping.

       NCR53c710 (trivial) - detection changes, initialization changes,
           of assembler, change fixup code to translate '810 register
           addresses to '7xx mapping, change interrupt handlers to treat
           IID interrupt from INTFLY instruction to emulate it.

       NCR53c700, NCR53c700-66 (very messy) - detection changes,
           initialization changes, modification of NCR code to not use DSA,
           modification of Linux code to handle context switches.

  SCSI hosts that will not work :

  All parallel->SCSI adapters, Rancho SCSI boards, and Grass Roots SCSI
  boards.  BusLogic FlashPoint boards, such as the BT-930/932/950, are
  currently unsupported.

  SCSI hosts that will NEVER work :

  Non Adaptec compatible, non NCR53c8xx DTC boards (including the 3270
  and 3280).

  CMD SCSI boards.

  Acquiring programming information requires a non-disclosure agreement
  with DTC/CMD.  This means that it would be impossible to distribute a
  Linux driver if one were written, since complying with the NDA would
  mean distributing no source, in violation of the GPL, and complying
  with the GPL would mean distributing source, in violation of the NDA.

  If you want to run Linux on some other unsupported piece of hardware,
  your options are to either write a driver yourself (Eric Youngdale and
  I are usually willing to answer technical questions concerning the
  Linux SCSI drivers) or to commission a driver (Normal consulting rates
  mean that this will not be a viable option for personal use).

  5.1.1.  Multiple host adapters

  With some host adapters (see ``Buyers' Guide : Feature Comparison''),
  you can use multiple host adapters of the same type in the same
  system.  With multiple adapters of the same type in the same system,
  generally the one at the lowest address will be scsi0, the one at the
  next address scsi1, etc.

  In all cases, it is possible to use multiple host adapters of
  different types, provided that none of their addresses conflict.  SCSI
  controllers are scanned in the order specified in the
  builtin_scsi_hosts[] array in drivers/scsi/hosts.c, with the order
  currently being

       BusLogic, Ultrastor 14/34F, Ultrastor 14F,, Adaptec
       151x/152x, Adaptec 154x, Adaptec 174x, AIC7XXX, AM53C974,
       Future Domain 16x0, Always IN2000, Generic NCR5380, QLOGIC,
       PAS16, Seagate, Trantor T128/T130, NCR53c8xx, EATA-DMA,
       WD7000, debugging driver.

  In most cases (ie, you aren't trying to use both BusLogic and Adaptec
  drivers), this can be changed to suit your needs (ie, keeping the same
  devices when new SCSI devices are added to the system on a new
  controller) by moving the individual entries.

  5.2.  Common Problems

  5.2.1.  SCSI timeouts

  Make sure interrupts are enabled correctly, and there are no IRQ, DMA,
  or address conflicts with other boards.

  5.2.2.  Failure of autoprobe routines on boards that rely on BIOS for
  autoprobe.

  If your SCSI adapter is one of the following :

       Adaptec 152x, Adaptec 151x, Adaptec AIC-6260, Adaptec
       AIC-6360, Future Domain 1680, Future Domain TMC-950, Future
       Domain TMC-8xx, Trantor T128, Trantor T128F, Trantor T228F,
       Seagate ST01, Seagate ST02, or a Western Digital 7000

  and it is not detected on bootup, ie you get a

       scsi : 0 hosts

  message or a

       scsi%d : type

  message is not printed for each supported SCSI adapter installed in
  the system, you may have a problem with the autoprobe routine not
  knowing about your board.

  Autodetection will fail for drivers using the BIOS for autodetection
  if the BIOS is disabled.  Double check that your BIOS is enabled, and
  not conflicting with any other peripherial BIOSes.

  Autodetection will also fail if the board's "signature" and/or BIOS
  address don't match known ones.

  If the BIOS is installed, please use DOS and DEBUG to find a signature
  that will detect your board -

  Ie, if your board lives at 0xc8000, under DOS do

       debug
       d c800:0
       q

  and send a message to the SCSI channel of the mailing list with the
  ASCII message, with the length and offset from the base address (ie,
  0xc8000).  Note that the EXACT text is required, and you should
  provide both the hex and ASCII portions of the text.

  If no BIOS is installed, and you are using an Adaptec 152x, Trantor
  T128, or Seagate driver, you can use command line or compile time
  overrides to force detection.

  Please consult the appropriate subsection for your SCSI board as well
  as section ``General Flakiness''.

  5.2.3.  Failure of boards using memory mapped I/O

  (This include the Trantor T128 and Seagate boards, but not the
  Adaptec, Generic NCR5380, PAS16, and Ultrastor drivers)

  This is often caused when the memory mapped I/O ports are incorrectly
  cached.  You should have the board's address space marked as
  uncachable in the XCMOS settings.

  If this is not possible, you will have to disable cache entirely.

  If you have manually specified the address of the board, remember that
  Linux needs the actual address of the board, and not the 16 byte
  segment the documentation may refer to.
  Ie, 0xc8000 would be correct, 0xc800 would not work and could cause
  memory corruption.

  5.2.4.  kernel panic : cannot mount root device" when booting an ALPHA
  driver boot floppy

  You'll need to edit the binary image of the kernel (before or after
  writing it out to disk), and modify a few two byte fields (little
  endian) to guarantee that it will work on your system.

  1. default swap device at offset 502, this should be set to 0x00 0x00

  2. ram disk size at offset 504, this should be set to the size of the
     boot floppy in K - ie, 5.25" = 1200, 3.5" = 1440.

       This means the bytes are

       3.5" : 0xA0 0x05
       5.25" : 0xB0 0x04

  3. root device offset at 508, this should be 0x00 0x00, ie the boot
     device.

  dd or rawrite the file to a disk.  Insert the disk in the first floppy
  drive, wait until it prompts you to insert the root disk, and insert
  the root floppy from your distribution.

  5.2.5.  Installing a device driver not included with the distribution
  kernel

  You need to start with the version of the kernel used by the driver
  author.  This revision may be alluded to in the documentation included
  with the driver.

  Various recent kernel revisions can be found at

       nic.funet.fi:/pub/OS/Linux/PEOPLE/Linus

  as linux-version.tar.gz

  They are also mirrored at tsx-11.mit.edu and various other sites.

       cd to /usr/src.

  Remove your old Linux sources, if you want to keep a backup copy of
  them

       mv linux linux-old

  Untar the archive

       gunzip < linux-0.99.12.tar.gz | tar xvfp -

  Apply the patches.  The patches will be relative to some directory in
  the filesystem.  By examining the output file lines in the patch file
  (grep for ^---), you can tell where this is - ie patches with these
  lines

       --- ./kernel/blk_drv/scsi/Makefile

       --- ./config.in Wed Sep  1 16:19:33 1993

  would have the files relative to /usr/src/linux.

  Untar the driver sources at an appropriate place - you can type

       tar tfv patches.tar

  to get a listing, and move files as necessary (The SCSI driver files
  should live in /usr/src/linux/kernel/drivers/scsi)

  Either cd to the directory they are relative to and type

       patch -p0 < patch_file

  or tell patch to strip off leading path components.  Ie, if the files
  started with

       --- linux-new/kernel/blk_drv/scsi/Makefile

  and you wanted to apply them while in /usr/src/linux, you could cd to
  /usr/src/linux and type

  patch -p1 < patches

  to strip off the "linux-new" component.

  After you have applied the patches, look for any patch rejects, which
  will be the name of the rejected file with a # suffix appended.

       find /usr/src/linux/ -name "*#" -print

  If any of these exist, look at them.  In some cases, the differences
  will be in RCS identifiers and will be harmless, in other cases,
  you'll have to manually apply important parts.  Documentation on diff
  files and patch is beyond the scope of this document.

  See also ``Configuring and building the kernel''.

  5.2.6.  Installing a driver that has no patches

  In some cases, a driver author may not offer patches with the .c and
  .h files which comprise his driver, or the patches may be against an
  older revision of the kernel and not go in cleanly.

  1. Copy the .c and .h files into /usr/src/linux/drivers/scsi

  2. Add the configuration option

     Edit /usr/src/linux/config.in, and add a line in the

       *
       * SCSI low-level drivers
       *

  section, add a boolean configuration variable for your driver.  Ie,

       bool 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 y

  3. Add the makefile entries

     Edit /usr/src/linux/drivers/scsi/Makefile, and add an entry like

  ifdef CONFIG_SCSI_IN2000
  SCSI_OBS := $(SCSI_OBJS) in2000.o
  SCSI_SRCS := $(SCSI_SRCS) in2000.c
  endif

  before the

       scsi.a: $(SCSI_OBJS)

  line in the makefile, where the .c file is the .c file you copied in,
  and the .o file is the basename of the .c file with a .o suffixed.

  4. Add the entry points

     Edit /usr/src/linux/drivers/scsi/hosts.c, and add a #include for
     the header file, conditional on the CONFIG_SCSI preprocessor define
     you added to the configuration file.  Ie, after

       #ifdef CONFIG_SCSI_GENERIC_NCR5380
       #include "g_NCR5380.h"
       #endif

  you might add

       #ifdef CONFIG_SCSI_IN2000
       #include "in2000.h"
       #endif

  You will also need to add the Scsi_Host_Template entry into the
  scsi_hosts[] array.  Take a look into the .h file, and you should find
  a #define that looks something like this :

       #define IN2000 {"Always IN2000", in2000_detect, \
           in2000_info, in2000_command,    \
           in2000_queuecommand,            \
           in2000_abort,                   \
           in2000_reset,                   \
           NULL,                           \
           in2000_biosparam,               \
           1, 7, IN2000_SG, 1, 0, 0}

  the name of the preprocessor define, and add it into the scsi_hosts[]
  array, conditional on definition of the preprocessor symbol you used
  in the configuration file.

  Ie, after

       #ifdef CONFIG_SCSI_GENERIC_NCR5380
               GENERIC_NCR5380,
       #endif

  you might add

       #ifdef CONFIG_SCSI_IN2000
               IN2000,
       #endif

  See also ``Configuring and building the kernel''.

  5.2.7.  Failure of a PCI board in a Compaq System

  A number of Compaq systems map the 32-bit BIOS extensions used to
  probe for PCI devices into memory which is inaccessible to the Linux
  kernel due to the memory layout.  If Linux is unable to detect a
  supported PCI SCSI board, and the kernel tells you something like

       pcibios_init: entry in high memory, unable to access

  Grab

       ftp://ftp.compaq.com/pub/softpaq/Software-Solutions/sp0921.zip

  which is a self-extracting archive of a program which will relocate
  the BIOS32 code.

  5.2.8.  A SCSI system with PCI boards hangs after the %d Hosts message

  Some PCI systems have broken BIOSes which disable interrupts and fail
  to reenable them before returning control to the caller.  The
  following patch fixes this

       --- bios32.c.orig       Mon Nov 13 22:35:31 1995
       +++ bios32.c    Thu Jan 18 00:15:09 1996
       @@ -56,6 +56,7 @@
        #include <linux/pci.h>

        #include <asm/segment.h>
       +#include <asm/system.h>

        #define PCIBIOS_PCI_FUNCTION_ID        0xb1XX
        #define PCIBIOS_PCI_BIOS_PRESENT       0xb101
       @@ -125,7 +126,9 @@
               unsigned long address;          /* %ebx */
               unsigned long length;           /* %ecx */
               unsigned long entry;            /* %edx */
       +       unsigned long flags;

       +       save_flags(flags);
               __asm__("lcall (%%edi)"
                       : "=a" (return_code),
                         "=b" (address),
       @@ -134,6 +137,7 @@
                       : "0" (service),
                         "1" (0),
                         "D" (&bios32_indirect));
       +       restore_flags(flags);

               switch (return_code) {
                       case 0:
       @@ -161,11 +165,13 @@
               unsigned char present_status;
               unsigned char major_revision;
               unsigned char minor_revision;
       +       unsigned long flags;
               int pack;

               if ((pcibios_entry = bios32_service(PCI_SERVICE))) {
                       pci_indirect.address = pcibios_entry;

       +               save_flags(flags);
                       __asm__("lcall (%%edi)\n\t"
                               "jc 1f\n\t"
                               "xor %%ah, %%ah\n"
       @@ -176,6 +182,7 @@
                               : "1" (PCIBIOS_PCI_BIOS_PRESENT),
                                 "D" (&pci_indirect)
                               : "bx", "cx");
       +               restore_flags(flags);

                       present_status = (pack >> 16) & 0xff;
                       major_revision = (pack >> 8) & 0xff;
       @@ -210,7 +217,9 @@
        {
               unsigned long bx;
               unsigned long ret;
       +       unsigned long flags;

       +       save_flags(flags);
               __asm__ ("lcall (%%edi)\n\t"
                       "jc 1f\n\t"
                       "xor %%ah, %%ah\n"
       @@ -221,6 +230,7 @@
                         "c" (class_code),
                         "S" ((int) index),
                         "D" (&pci_indirect));
       +       restore_flags(flags);
               *bus = (bx >> 8) & 0xff;
          *device_fn = bx & 0xff;
          return (int) (ret & 0xff00) >> 8;
  @@ -232,7 +242,9 @@
   {
          unsigned short bx;
          unsigned short ret;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%edi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -244,6 +256,7 @@
                    "d" (vendor),
                    "S" ((int) index),
                    "D" (&pci_indirect));
  +       restore_flags(flags);
          *bus = (bx >> 8) & 0xff;
          *device_fn = bx & 0xff;
          return (int) (ret & 0xff00) >> 8;
  @@ -254,7 +267,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags (flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -273,7 +288,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -292,7 +309,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -303,6 +322,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  @@ -311,7 +331,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -322,6 +344,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  @@ -330,7 +353,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -341,6 +366,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  @@ -349,7 +375,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -360,6 +388,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  5.3.  Adaptec 152x, 151x, 1505, 282x, Sound Blaster 16 SCSI, SCSI Pro,
  Gigabyte, and other AIC 6260/6360 based products (Standard)

  Supported Configurations :

       BIOS addresses : 0xd8000, 0xdc000, 0xd0000, 0xd4000, 0xc8000, 0xcc000, 0xe0000,
                        0xe4000.
       Ports          : 0x140, 0x340
       IRQs           : 9, 10, 11, 12
       DMA            : not used
       IO             : port mapped

  Autoprobe :

       Works with many boards with an installed BIOS.  All
       other boards, including the Adaptec 1510, and Sound Blaster16 SCSI
       must use a kernel command line or compile time override.

  Autoprobe Override :

  Compile time :

       Define PORTBASE, IRQ, SCSI_ID, RECONNECT, PARITY as appropriate, see Defines

  kernel command line :

       aha152x=<PORTBASE>[,<IRQ>[,<SCSI-ID>[,<RECONNECT>[,<PARITY>]]]]

  SCSI-ID is the SCSI ID of the HOST adapter, not of any devices you
  have installed on it.  Usually, this should be 7.

  To force detection at 0x340, IRQ 11, at SCSI-ID 7, allowing
  disconnect/reconnect, you would use the following command line option
  :

       aha152x=0x340,11,7,1

  Antiquity Problems, fix by upgrading :

  1. The driver fails with VLB boards.  There was a timing problem in
     kernels older than revision 1.0.5.

  Defines :

       AUTOCONF       : use configuration the controller reports (only 152x)
       IRQ            : override interrupt channel (9,10,11 or 12) (default 11)
       SCSI_ID        : override SCSI ID of AIC-6260 (0-7) (default 7)
       RECONNECT      : override target disconnect/reselect (set to non-zero to
                        allow, zero to disable)
       DONT_SNARF     : Don't register ports (pl12 and below)
       SKIP_BIOSTEST  : Don't test for BIOS signature (AHA-1510 or disabled BIOS)
       PORTBASE       : Force port base. Don't try to probe

  5.4.  Adaptec 154x, AMI FastDisk VLB, DTC 329x (Standard)

  Supported Configurations :

       Ports          : 0x330 and 0x334
       IRQs           : 9, 10, 11, 12, 14, 15
       DMA channels   : 5, 6, 7
       IO             : port mapped, bus master

  Autoprobe :

       will detect boards at 0x330 and 0x334 only.

  Autoprobe override :

       aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]

  Notes:

  1. BusLogic makes a series of boards that are software compatible with
     the Adaptec 1542, and these come in ISA, VLB, EISA, and PCI
     flavors.

  2. No-suffix boards, and early 'A' suffix boards do not support
     scatter/gather, and thus don't work.  However, they can be made to
     work for some definition of the word works if AHA1542_SCATTER is
     changed to 0 in drivers/scsi/aha1542.h.

  Antiquity Problems, fix by upgrading :

  1. Linux kernel revisions prior to .99.10 don't support the 'C'
     revision.

  2. Linux kernel revisions prior to .99.14k don't support the 'C'
     revision options for

    BIOS support for the extended mapping for disks > 1G

    BIOS support for > 2 drives

    BIOS support for autoscanning the SCSI bus

  3. Linux kernel revisions prior to .99.15e don't support the 'C' with
     the BIOS support for > 2 drives turned on and the BIOS support for
     the extended mapping for disks > 1G turned off.

  4. Linux kernel revisions prior to .99.14u don't support the 'CF'
     revisions of the board.

  5. Linux kernel revisions prior to 1.0.5 have a race condition when
     multiple devices are accessed at the same time.

  Common problems :

  1. There are unexpected errors with a 154xC or 154xCF board,

     Early examples of the 154xC boards have a high slew rate on one of
     the SCSI signals, which results in signal reflections when cables
     with the wrong impedance are used.

     Newer boards aren't much better, and also suffer from extreme
     cabling and termination sensitivity.

     See also Common Problems ``#2'' and ``#3'' and ``Common Problems'',
     ``General Flakiness''.

  2. There are unexpected errors with a 154xC or 154x with both internal
     and external devices connected.

     This is probably a termination problem.  In order to use the
     software option to disable host adapter termination, you must turn
     switch 1 off.

     See also Common Problems ``#1'' and ``#3'' and ``Common Problems'',
     ``General Flakiness''.

  3. The SCSI subsystem locks up completely.

     There are cases where the lockups seem to occur when multiple
     devices are in use at the same time.  In this case, you can try
     contacting the manufacturer of the devices and see if firmware
     upgrades are available which would correct the problem.  As a last
     resort, you can go into aha1542.h and change AHA1542_MAILBOX to 1.
     This will effectively limit you to one outstanding command on the
     scsi bus at one time, and may help the situation.  If you have tape
     drives or slow cdrom drives on the bus, this might not be a
     practical solution.

     See also Common Problems ``#1'' and ``#2'' and ``Common Problems'',
     ``Common Problems : SCSI System Lockups''.

  4. An "Interrupt received, but no mail" message is printed on bootup
     and your SCSI devices are not detected.

     Disable the BIOS options to support the extended mapping for disks
     > 1G, support for > 2 drives, and for autoscanning the bus.  Or,
     upgrade to Linux .99.14k or newer.

  5. If infinite timeout errors occur on 'C' revision boards, you may
     need to go into the Adaptec setup program and enable synchronous
     negotiation.

  6. Linux 1.2.x gives the message

     Unable to determine Adaptec DMA priority.  Disabling board.

     This is due to a conflict on some systems with the obsolete
     BusLogic driver.  Either rebuild your kernel without it, or give
     the BusLogic driver a command line option telling it to look
     somewhere other than where your controller is configured.  Ie, if
     you have an Adaptec board at port 0x334, and nothing at 0x330, use
     a command line option like

       buslogic=0x330

  7. The system locks up with simultaneous access to multiple devices on
     a 1542C or 1540C and disconnection enabled

     Some Adaptec firmware revisions have bugs.  Upgrading to BIOS v2.11
     purportedly fixes these problems.

  5.5.  Adaptec 174x

  Supported Configurations :

       Slots          : 1-8
       Ports          : EISA board, not applicable
       IRQs           : 9, 10, 11, 12, 14, 15
       DMA Channels   : EISA board, not applicable
       IO             : port mapped, bus master

  Autoprobe :

       works with all supported configurations

  Autoprobe override :

       none

  Note:

  1. This board has been discontinued by Adaptec.

  Common Problems :

  1. If the Adaptec 1740 driver prints the message "aha1740: Board
     detected, but EBCNTRL = %x, so disabled it."

     your board was disabled because it was not running in enhanced
     mode.  Boards running in standard 1542 mode are not supported.
  5.6.  Adaptec 274x, 284x (Standard) 294x (ALPHA)

  A newer version which also supports the Adaptec 294x boards is
  available at

       ftp://ftp.ims.com/pub/Linux/aic7xxx

  Supported Configurations :

                        274x           284x            294x
       EISA Slots     : 1-12           N/A             N/A
       Ports          : N/A            ALL             ALL
       IRQs           : ALL            ALL             ALL
       DMA Channels   : N/A            ALL             N/A

       IO             : port mapped, bus master

  Autoprobe Override :

  kernel command line :

       aha274x=extended
       (to force extended mapping)

  Notes:

  1. BIOS MUST be enabled

  2. The B channel on 2742AT boards is ignored.

  3. CONFIG_PCI must be set if you are using a PCI board.

  5.7.  Always IN2000 (Standard)

  Supported Configurations :

       Ports          : 0x100, 0x110, 0x200, 0x220
       IRQs           : 10, 11, 14, 15
       DMA            : not used
       IO             : port mapped

  Autoprobe :

       BIOS not required

  Autoprobe override :

       none

  Common Problems :

  1. There are known problems in systems with IDE drives and with
     swapping.

  5.8.  BusLogic MultiMaster Host Adapters

  (this section Copyright 1995 by Leonard N. Zubkoff
  <lnz@dandelion.com>) (see README.BusLogic for more complete BusLogic
  driver documentation)

                    BusLogic MultiMaster SCSI Driver for Linux

                         Version 1.2.2 for Linux 1.2.13
                         Version 1.3.2 for Linux 1.3.88

                   ftp://ftp.dandelion.com/BusLogic-1.2.2.tar.gz
                   ftp://ftp.dandelion.com/BusLogic-1.3.2.tar.gz

                                   16 April 1996

                                 Leonard N. Zubkoff
                                 Dandelion Digital
                                 lnz@dandelion.com

  BusLogic, Inc. designs and manufactures a variety of high performance SCSI host
  adapters which share a common programming interface across a diverse collection
  of bus architectures by virtue of their MultiMaster ASIC technology.  This
  driver supports all present BusLogic MultiMaster Host Adapters, and should
  support any future MultiMaster designs with little or no modification.  Host
  adapters based on the new FlashPoint architecture are not supported by this
  driver; consult the README.FlashPoint file for information about a program to
  upgrade Linux users from the unsupported FlashPoint LT to the supported BT-948.

  My primary goals in writing this completely new BusLogic driver for Linux are
  to achieve the full performance that BusLogic SCSI Host Adapters and modern
  SCSI peripherals are capable of, and to provide a highly robust driver that can
  be depended upon for high performance mission critical applications.  All of
  the major performance and error recovery features can be configured from the
  Linux kernel command line, allowing individual installations to tune driver
  performance and error recovery to their particular needs.

  BusLogic has been an excellent company to work with and I highly recommend
  their products to the Linux community.  In November 1995, I was offered the
  opportunity to become a beta test site for their latest MultiMaster product,
  the BT-948 PCI Ultra SCSI Host Adapter, and then again for the BT-958 PCI Wide
  Ultra SCSI Host Adapter in January 1996.  This was mutually beneficial since
  BusLogic received a degree and kind of testing that their own testing group
  cannot readily achieve, and the Linux community has available high performance
  host adapters that have been well tested with Linux even before being brought
  to market.  This relationship has also given me the opportunity to interact
  directly with their technical staff, to understand more about the internal
  workings of their products, and in turn to educate them about the needs and
  potential of the Linux community.  Their interest and support is greatly
  appreciated.

  Unlike some other vendors, if you contact BusLogic Technical Support with a
  problem and are running Linux, they will not tell you that your use of their
  products is unsupported.  Their latest product marketing literature even states
  "BusLogic SCSI host adapters are compatible with all major operating systems
  including: ... Linux ...".

  BusLogic, Inc. is located at 4151 Burton Drive, Santa Clara, California, 95054,
  USA and can be reached by Voice at 408/492-9090 or by FAX at 408/492-1542.
  BusLogic maintains a World Wide Web site at http://www.buslogic.com, an
  anonymous FTP site at ftp.buslogic.com, and a BBS at 408/492-1984.  BusLogic
  Technical Support can be reached by electronic mail at techsup@buslogic.com, by
  Voice at 408/654-0760, or by FAX at 408/492-1542.  Contact information for
  offices in Europe and Japan is available on the Web site.

                              SUPPORTED HOST ADAPTERS

  The following list comprises the supported BusLogic SCSI Host Adapters as of
  the date of this document.  It is recommended that anyone purchasing a BusLogic
  Host Adapter not in the following table contact the author beforehand to verify
  that it is or will be supported.

  "W" Series Host Adapters:

  BT-948      PCI     Ultra Fast Single-ended SCSI-2
  BT-958      PCI     Ultra Wide Single-ended SCSI-2
  BT-958D     PCI     Ultra Wide Differential SCSI-2

  "C" Series Host Adapters:

  BT-946C     PCI     Fast Single-ended SCSI-2
  BT-956C     PCI     Fast Wide Single-ended SCSI-2
  BT-956CD    PCI     Fast Wide Differential SCSI-2
  BT-445C     VLB     Fast Single-ended SCSI-2
  BT-747C     EISA    Fast Single-ended SCSI-2
  BT-757C     EISA    Fast Wide Single-ended SCSI-2
  BT-757CD    EISA    Fast Wide Differential SCSI-2
  BT-545C     ISA     Fast Single-ended SCSI-2
  BT-540CF    ISA     Fast Single-ended SCSI-2

  "S" Series Host Adapters:

  BT-445S     VLB     Fast Single-ended SCSI-2
  BT-747S     EISA    Fast Single-ended SCSI-2
  BT-747D     EISA    Fast Differential SCSI-2
  BT-757S     EISA    Fast Wide Single-ended SCSI-2
  BT-757D     EISA    Fast Wide Differential SCSI-2
  BT-545S     ISA     Fast Single-ended SCSI-2
  BT-542D     ISA     Fast Differential SCSI-2
  BT-742A     EISA    Single-ended SCSI-2 (742A revision H)
  BT-542B     ISA     Single-ended SCSI-2 (542B revision H)

  "A" Series Host Adapters:

  BT-742A     EISA    Single-ended SCSI-2 (742A revisions A - G)
  BT-542B     ISA     Single-ended SCSI-2 (542B revisions A - G)

  AMI FastDisk Host Adapters that are true BusLogic clones are supported by this
  driver.

                        BT-948/958/958D INSTALLATION NOTES

  The BT-948/958/958D PCI Ultra SCSI Host Adapters have some features which may
  require attention in some circumstances when installing Linux.

  o PCI I/O Port Assignments

    When configured to factory default settings, the BT-948/958/958D will only
    recognize the PCI I/O port assignments made by the motherboard's PCI BIOS.
    The BT-948/958/958D will not respond to any of the ISA compatible I/O ports
    that previous BusLogic SCSI Host Adapters respond to.  This driver supports
    the PCI I/O port assignments, so this is the preferred configuration.
    However, if the obsolete BusLogic driver must be used for any reason, such as
    a Linux distribution that does not yet use this driver in its boot kernel,
    BusLogic has provided an AutoSCSI configuration option to enable a legacy ISA
    compatible I/O port.

    To enable this backward compatibility option, invoke the AutoSCSI utility via
    Ctrl-B at system startup and select "Adapter Configuration", "View/Modify
    Configuration", and then change the "ISA Compatible Port" setting from
    "Disable" to "Primary" or "Alternate".  Once this driver has been installed,
    the "ISA Compatible Port" option should be set back to "Disable" to avoid
    possible future I/O port conflicts.  The older BT-946C/956C/956CD also have
    this configuration option, but the factory default setting is "Primary".

  o PCI Slot Scanning Order

    In systems with multiple BusLogic PCI Host Adapters, the order in which the
    PCI slots are scanned may appear reversed with the BT-948/958/958D as
    compared to the BT-946C/956C/956CD.  For booting from a SCSI disk to work
    correctly, it is necessary that the host adapter's BIOS and the kernel agree
    on which disk is the boot device, which requires that they recognize the PCI
    host adapters in the same order.  The motherboard's PCI BIOS provides a
    standard way of enumerating the PCI host adapters, which is used by the Linux
    kernel.  Some PCI BIOS implementations enumerate the PCI slots in order of
    increasing bus number and device number, while others do so in the opposite
    direction.

    Unfortunately, Microsoft decided that Windows 95 would always enumerate the
    PCI slots in order of increasing bus number and device number regardless of
    the PCI BIOS enumeration, and requires that their scheme be supported by the
    host adapter's BIOS to receive Windows 95 certification.  Therefore, the
    factory default settings of the BT-948/958/958D enumerate the host adapters
    by increasing bus number and device number.  To disable this feature, invoke
    the AutoSCSI utility via Ctrl-B at system startup and select "Adapter
    Configuration", "View/Modify Configuration", press Ctrl-F10, and then change
    the "Use Bus And Device # For PCI Scanning Seq." option to OFF.

    This driver will interrogate the setting of the PCI Scanning Sequence option
    so as to recognize the host adapters in the same order as they are enumerated
    by the host adapter's BIOS.

                        BUSLOGIC ANNOUNCEMENTS MAILING LIST

  The BusLogic Announcements Mailing List provides a forum for informing Linux
  users of new driver releases and other announcements regarding Linux support
  for BusLogic SCSI Host Adapters.  To join the mailing list, send a message to
  "BusLogic-announce-request@dandelion.com" with the line "subscribe" in the
  message body.

  5.9.  BusLogic FlashPoint Host Adapters

  (this section Copyright 1995 by Leonard N. Zubkoff
  <lnz@dandelion.com>)

  There are no Linux drivers for the FlashPoint LT/DL/LW (BT-930/932/950)
  available and it is not clear when or if there will be any.  The FlashPoint
  boards have a different architecture from the MultiMaster boards and have no
  onboard CPU, only a SCSI sequencer engine.  They are positioned as a desktop
  workstation product, and are not particularly well suited for a high
  performance multitasking operating system like Linux.

  The MultiMaster BT-948/958 have an onboard CPU and the mailbox programming
  interface allows for parallelism and pipelining between the host operating
  system and the host adapter, whereas the FlashPoint boards require frequent
  host CPU intervention.  As interrupt latencies rise in a loaded multitasking
  system, the BT-948/958 should maintain excellent performance whereas the
  FlashPoint's performance will likely drop quite rapidly.  Furthermore, the
  firmware on the BT-948/958 contains the low level knowledge for proper
  interaction with the SCSI bus, whereas with a sequencer engine the Linux driver
  must contain some or all of this information, and it often takes quite a long
  time to get all the kinks worked out.  Given the relatively small difference in
  the street price of these products, the BT-948 or BT-958 is clearly the better
  choice for Linux.

  <begin quotation>

                                   ANNOUNCEMENT
                    BusLogic FlashPoint/BT-948 Upgrade Program
                                  1 February 1996

  Ever since its introduction last October, the BusLogic FlashPoint LT has
  been problematic for members of the Linux community, in that no Linux
  drivers have been available for this new Ultra SCSI product.  Despite it's
  officially being positioned as a desktop workstation product, and not being
  particularly well suited for a high performance multitasking operating
  system like Linux, the FlashPoint LT has been touted by computer system
  vendors as the latest thing, and has been sold even on many of their high
  end systems, to the exclusion of the older MultiMaster products.  This has
  caused grief for many people who inadvertently purchased a system expecting
  that all BusLogic SCSI Host Adapters were supported by Linux, only to
  discover that the FlashPoint was not supported and would not be for quite
  some time, if ever.

  After this problem was identified, BusLogic contacted its major OEM
  customers to make sure the BT-946C/956C MultiMaster cards would still be
  made available, and that Linux users who mistakenly ordered systems with
  the FlashPoint would be able to upgrade to the BT-946C.  While this helped
  many purchasers of new systems, it was only a partial solution to the
  overall problem of FlashPoint support for Linux users.  It did nothing to
  assist the people who initially purchased a FlashPoint for a supported
  operating system and then later decided to run Linux, or those who had
  ended up with a FlashPoint LT, believing it was supported, and were unable
  to return it.

  In the middle of December, I asked to meet with BusLogic's senior
  management to discuss the issues related to Linux and free software support
  for the FlashPoint.  Rumors of varying accuracy had been circulating
  publicly about BusLogic's attitude toward the Linux community, and I felt
  it was best that these issues be addressed directly.  I sent an email
  message after 11pm one evening, and the meeting took place the next
  afternoon.  Unfortunately, corporate wheels sometimes grind slowly,
  especially when a company is being acquired, and so it's taken until now
  before the details were completely determined and a public statement could
  be made.

  BusLogic is not prepared at this time to release the information necessary
  for third parties to write drivers for the FlashPoint.  The only existing
  FlashPoint drivers have been written directly by BusLogic Engineering, and
  there is no FlashPoint documentation sufficiently detailed to allow outside
  developers to write a driver without substantial assistance.  While there
  are people at BusLogic who would rather not release the details of the
  FlashPoint architecture at all, that debate has not yet been settled either
  way.  In any event, even if documentation were available today it would
  take quite a while for a usable driver to be written, especially since I'm
  not convinced that the effort required would be worthwhile.

  However, BusLogic does remain committed to providing a high performance
  SCSI solution for the Linux community, and does not want to see anyone left
  unable to run Linux because they have a Flashpoint LT.  Therefore, BusLogic
  has put in place a direct upgrade program to allow any Linux user worldwide
  to trade in their FlashPoint LT for the new BT-948 MultiMaster PCI Ultra
  SCSI Host Adapter.  The BT-948 is the Ultra SCSI successor to the BT-946C
  and has all the best features of both the BT-946C and FlashPoint LT,
  including smart termination and a flash PROM for easy firmware updates, and
  is of course compatible with the present Linux driver.  The price for this
  upgrade has been set at US $45, and the upgrade program will be
  administered through BusLogic Technical Support, which can be reached by
  electronic mail at techsup@BusLogic.com, by Voice at +1 408 654-0760, or by
  FAX at +1 408 492-1542.

  I was a beta test site for the BT-948 and versions 1.2.1 and 1.3.1 of my
  BusLogic driver already include latent support for the BT-948.  Additional
  cosmetic support for the Ultra SCSI MultiMaster cards will be added in a
  subsequent release.  As a result of this cooperative testing process,
  several firmware bugs were found and corrected (make sure you have firmware
  version 5.05R or later).  My heavily loaded Linux test system provided an
  ideal environment for testing error recovery processes that are much more
  rarely exercised in production systems, but are crucial to overall system
  stability.  It was especially convenient being able to work directly with
  their firmware engineer in demonstrating the problems under control of the
  firmware debugging environment; things sure have come a long way since the
  last time I worked on firmware for an embedded system.  I am presently
  working on some performance testing and expect to have some data to report
  in the not too distant future.

  BusLogic asked me to send this announcement since a large percentage of the
  questions regarding support for the FlashPoint have either been sent to me
  directly via email, or have appeared in the Linux newsgroups in which I
  participate.  To summarize, BusLogic is offering Linux users an upgrade
  from the unsupported FlashPoint LT (BT-930) to the supported BT-948 for US
  $45.  Contact BusLogic Technical Support at techsup@BusLogic.com or +1 408
  654-0760 to take advantage of their offer.

                  Leonard N. Zubkoff
                  lnz@dandelion.com

  <end quotation>

  5.10.  EATA: DPT SmartCache, SmartCache Plus, SmartCache III, Smart
  Cache IV and SmartRAID (Standard)

  Supported boards: all, that support the EATA-DMA protocol.

  Among them are:

  DPT Smartcache (Plus) family:
  PM2011      ISA     Fast Single-ended SCSI-2
  PM2012B     EISA    Fast Single-ended SCSI-2

  DPT Smartcache III family:
  PM2021      ISA     Fast Single-ended SCSI-2
  PM2021W     ISA     Wide Single-ended SCSI-2
  PM2022      EISA    Fast Single-ended SCSI-2
  PM2022W     EISA    Wide Single-ended SCSI-2
  PM2024      PCI     Fast Single-ended SCSI-2
  PM2024W     PCI     Wide Single-ended SCSI-2
  PM2122      EISA    Fast Single-ended SCSI-2
  PM2122W     EISA    Wide Single-ended SCSI-2
  PM2124      PCI     Fast Single-ended SCSI-2
  PM2124W     PCI     Wide Single-ended SCSI-2
  PM2322      EISA    Fast Single-ended SCSI-2
  PM2322W     EISA    Wide Single-ended SCSI-2

  DPT Smartcache VI family:
  PM2041W     ISA     Wide Single-ended SCSI-2
  PM2041UW    ISA     Ultra Wide Single-ended SCSI-2
  PM2042W     EISA    Wide Single-ended SCSI-2
  PM2042UW    EISA    Ultra Wide Single-ended SCSI-2
  PM2044W     PCI     Wide Single-ended SCSI-2
  PM2044UW    PCI     Ultra Wide Single-ended SCSI-2
  PM2142W     EISA    Wide Single-ended SCSI-2
  PM2142UW    EISA    Ultra Wide Single-ended SCSI-2
  PM2144W     PCI     Wide Single-ended SCSI-2
  PM2144UW    PCI     Ultra Wide Single-ended SCSI-2
  PM2322W     EISA    Wide Single-ended SCSI-2
  PM2322UW    EISA    Ultra Wide Single-ended SCSI-2

  DPT SmartRAID family:
  PM3021      ISA     Fast Single-ended SCSI-2
  PM3021W     ISA     Wide Single-ended SCSI-2
  PM3122      EISA    Fast Single-ended SCSI-2
  PM3122W     EISA    Wide Single-ended SCSI-2
  PM3222      EISA    Fast Single-ended SCSI-2
  PM3222W     EISA    Wide Single-ended SCSI-2
  PM3224      PCI     Fast Single-ended SCSI-2
  PM3224W     PCI     Wide Single-ended SCSI-2
  PM3334W     PCI     Wide Single-ended SCSI-2
  PM3334UW    PCI     Ultra Wide Single-ended SCSI-2

  also the differential versions of the above controllers.

  and some controllers from:

  NEC, AT&T, SNI, AST, Olivetti, Alphatronix.

  Supported Configurations :

       Slots          : ALL
       Ports          : ALL
       IRQs           : ALL level & edge triggered
       DMA Channels   : ISA ALL, EISA/PCI not applicable
       IO             : port mapped, bus master
       SCSI Channels  : ALL

  Autoprobe :

       works with all supported configurations

  The latest version of the EATA-DMA driver is available on:

       ftp.i-Connect.Net:/pub/Local/EATA/

  Mailinglist: The EATA Mailing List provides a forum to Linux users of
  the EATA-DMA and EATA-PIO driver for discussions and announcements of
  new releases and other announcements.  To join the mailing list, send
  a message to "linux-eata-request@i-connect.net" with the line
  "subscribe" in the message body.

  /proc/scsi support: To get advanced command statistics, do the
  following: echo "eata_dma latency" >/proc/scsi/eata_dma/<driver_no>
  and to switch it off again: echo "eata_dma nolatency"
  >/proc/scsi/eata_dma/<driver_no>

  Common Problems :

  1. Slackware doesn't find the controller.

     Solution: Use one of the ascsi* bootdisks.

  2. The IDE driver can detect the ST-506 interface of the EATA board in
     old kernels (<v1.3).

     a. This will look like similar to one of the following 2 examples:

          hd.c: ST-506 interface disk with more than 16 heads detected,
            probably due to non-standard sector translation.  Giving up.
            (disk %d: cyl=%d, sect=63, head=64)

          hdc: probing with STATUS instead of ALTSTATUS
          hdc: MP0242 A, 0MB w/128KB Cache, CHS=0/0/0
          hdc: cannot handle disk with 0 physical heads
          hdd: probing with STATUS instead of ALTSTATUS
          hdd: MP0242 A, 0MB w/128KB Cache, CHS=0/0/0
          hdd: cannot handle disk with 0 physical heads

     If the IDE driver gets into trouble because of this, ie. you can't
     access your (real) IDE hardware, change the IO Port and/or the IRQ
     of the EATA board.

     b. If the IDE driver finds hardware it can handle ie. harddisks
        with a capacity <=504MB, it will allocate the IO Port and IRQ,
        so that the eata driver can't utilize them. In this case also
        change IO Port and IRQ (!= 14,15).

  3. Some old SK2011 boards have a broken firmware. Please contact DPT's
     customer support for an update.

  Notes:

  1. CONFIG_PCI must be set if you are using a PCI board.

  5.11.  Future Domain 16x0 with TMC-1800, TMC-18C30, TMC-18C50, or
  TMC-36C70 chip

  Supported Configurations :

       BIOSs          : 2.0, 3.0, 3.2, 3.4, 3.5
       BIOS Addresses : 0xc8000, 0xca000, 0xce000, 0xde000
       Ports          : 0x140, 0x150, 0x160, 0x170
       IRQs           : 3, 5, 10, 11, 12, 14, 15
       DMA            : not used
       IO             : port mapped

  Autoprobe :

       works with all supported configurations, requires installed BIOS

  Autoprobe Override :

       none

  Antiquity Problems, fix by upgrading :

  1. Old versions do not support the TMC-18C50 chip, and will fail with
     newer boards.

  2. Old versions will not have the most current BIOS signatures for
     autodetection.

  3. Versions prior to the one included in Linux 1.0.9 and 1.1.6 don't
     support the new SCSI chip or 3.4 BIOS.

  Notes :

  1. The Future Domain BIOS often scans for SCSI-devices from highest ID
     to 0, in reverse order of other SCSI BIOSes.  sda will be the last
     "drive letter" (ie, D: rather than C:).  You may also need to use a
     a disktab override for LILO.

  5.12.  Generic NCR5380 / T130B (Standard)

  Supported and Unsupported Configurations :

       Ports          : all
       IRQs           : all
       DMA channels   : DMA is not used
       IO             : port mapped

  Autoprobe :

       none

  Autoprobe Override :

       Compile time : Define GENERIC_NCR5380_OVERRIDE to be an array of tuples
       with port, irq, dma, board type - ie
       #define GENERIC_NCR5380_OVERRIDE {{0x330, 5, DMA_NONE, BOARD_NCR5380}}

       for a NCR5380 board at port 330, IRQ 5.

       #define GENERIC_NCR5380_OVERRIDE {{0x350, 5, DMA_NONE, BOARD_NCR53C400}}

       for a T130B at port 0x350.

       Older versions of the code eliminate the BOARD_* entry.

       The symbolic IRQs IRQ_NONE and IRQ_AUTO may be used.

  kernel command line :

       ncr5380=port,irq
       ncr5380=port,irq,dma
       ncr53c400=port,irq

       255 may be used for no irq, 254 for irq autoprobe.

  Common Problems :

  1. Using the T130B board with the old (pre public release 6) generic
     NCR5380 driver which doesn't support the ncr53c400 command line
     option.

     The NCR5380 compatible registers are offset eight from the base
     address.  So, if your address is 0x350, use

       ncr5380=0x358,254

  on the kernel command line.

  Antiquity problems, fix by upgrading :

  1. The kernel locks up during disk access with T130B or other
     NCR53c400 boards.

     Pre-public release 6 versions of the Generic NCR5380 driver didn't
     support interrupts on these boards.  Upgrade.

  Notes :

  1. the generic driver doesn't support DMA yet, and pseudo-DMA isn't
     supported in the generic driver.

  5.13.  NCR53c8xx (Standard)

  Supported and Unsupported Configurations :

       Base addresses : ALL
       IRQs           : ALL
       DMA channels   : PCI, not applicable
       IO             : port mapped, busmastering

  Autoprobe :

       requires PCI BIOS, uses PCI BIOS routines to
       search for devices and read configuration space

  The driver uses the pre-programmed values in some registers for
  initialization, so a BIOS must be installed.

  Antiquity Problems, fix by upgrading :

  1. Older versions of Linux had a problem with swapping See``Disks :
     System Hangs When Swapping''

  2. Older versions of Linux didn't recognize '815 and '825 boards.

  3. Distribution kernels include release 4 or 5 of the driver, which
     does not support useful things like disconnect/reconnect (the most
     noticeable effect of this being attempts to retension/rewind/file
     space a tape lock you out of all SCSI devices), multiple host
     adapters, and BIOSless operation.

     The latest release of the driver is available at

       ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/ncr53c810

  Currently, this is a 1.2.10 and newer patch, although the next release
  will be 1.3.x exclusively.  These patches are NOT entirely clean due
  to some ELF and other patches which were in the baseline revision of
  my source tree, and if you can't manually correct the (four) problems
  you should get, you shouldn't use them.  Note that only the newest
  patch is needed; these are not incremental.

  If you wish to run the newer NCR driver with a 1.3.x kernel before
  then, Harald Evensen <Harald.Evensen@pvv.unit.no> has adapted the
  patches for 1.3.x

       ftp://ftp.pvv.unit.no/pub/Linux/ALPHA/ncr

  These patches should be clean.

  Please see all of the READMEs in these directories.  You should also
  join the NCR mailing list if you are interested in running the ALPHA
  code, since interim bug fixes and announcements of the next release
  are posted to this list.

  To subscribe, send mail to majordomo@colorado.edu with

       subscribe ncr53c810

  in the text.  You can unsubscribe by sending mail to the same address
  and including

       unsubscribe ncr53c810

  in the text.

  Common Problems :

  1. Many people have encountered problems where the chip worked fine
     under DOS, but failed under Linux with a timeout on test 1 due to a
     lost interrupt.

     This is often due to a mismatch between the IRQ hardware jumper for
     a slot or mainboard device and the value set in the CMOS setup.
     DOUBLE CHECK

    The IRQ you are using is used only by your onboard NCR chip, or the
     slot an NCR board is installed in

    Any main board jumpers selecting the IRQ for the onboard chip or
     slot match your CMOS setup.a

    Some PCI mainboards have an "auto" assignment feature, which will
     not work.

     It may also be due to PCI INTB, INTC, or INTD being selected on a
     PCI board in a system which only supports PCI INTA.  If you are
     using an NCR board which has jumpers to select between PCI
     interrupt lines, make sure you are using INTA.

     Finally, PCI should be using level-sensitive rather than edge
     triggered interrupts.  Check that your board is jumpered for level-
     sensitive, and if that fails try edge-triggered because your system
     may be broken.

     This problem is especially common with Viglen some Viglen
     motherboards, where the mainboard IRQ jumper settings are NOT as
     documented in the manual.  I've been told that what claims to be
     IRQ5 is really IRQ9, your mileage will vary.

  2. Lockups / other problems occur when using an S3 928, or Tseng
     ET4000W32 PCI video board.

     There are hardware bugs in at least some revisions of these chips.
     Don't use them.

  3. You get a message on boot up indicating that the I/O mapping was
     disabled because base address 0 bits 0..1 indicated a non I/O
     mapping

     This is due to a BIOS bug in some machines which results in dword
     reads of configuration registers returning the high and low 16 bit
     words swapped.

  4. Some systems have problems if PCI write posting, or CPU-> PCI
     buffering are enabled.  If you have problems, disable these
     options.

  5. Some systems with the NCR SDMS software in an onboard BIOS

     ROM and in the system BIOS are unable to boot DOS.  Disabling the
     image in one place should rectify this problem.

  6. If you encounter the message

       "scsi%d: IRQ0 not free, detaching"

  or

       "scsi%d: IRQ255 not free, detaching"

  The NCR chip had all 0 or 1 bits stored in the PCI configuration reg
  ister.  Either you have configuration problems (see ``Common Problem
  1''), or you have a defective mainboard BIOS.

  As a work around, you could edit drivers/scsi/ncr53c7,8xx.c, and
  change pci_init() so that you have

       irq = my_irq;

  before

       return normal_init (tpnt, board, chip, (int) base,
           (int) io_port, (int) irq, DMA_NONE, 1, bus, device_fn,
           options);

  7. Some systems have hideous, broken, BIOS chips.  Don't make any bug
     reports until you've made sure you have the newest ROM from your
     vendor.

  8. The command line overrides ncr53c810=xxx, etc. don't work.

     In stock kernels, this is because their entry points are not
     included in init/main.c, which is quite intentional :

     The driver makes no attempt to avoid autoprobing for a board where
     a command line override was used, so if an override is used where
     the board actually showed up to the PCI configuration routines,
     you'll have big problems.

     The only reason you would need an  override would be if the PCI
     hardware + BIOS were broken, in which case certain error recovery
     routines wouldn't work, rendering the override less than useful.

     Finally, nearly all of people who _think_ they need a command line
     override do because they get configuration or other error messages
     from the driver.  If the driver says you have a configuration
     problem, you have a broken system or a configuration problem and no
     override is going to fix this.

     If some one has gone and added the appropriate entry points to
     init/main.c for command line overrides, they are totally
     unsupported and may not work.

  9. Certain NCR boards (most notably Nexstor) which don't use an NCR
     BIOS get timeouts.  Some of these ROMs handle synchronous and
     transfers, negotiate for sync. transfers on power up, and leave the
     drives in an unknown state.  When the distribution Linux NCR driver
     attempts to talk with them, it gets timeouts and cannot recover
     because it won't do a bus reset or renegotiate.

     If you run into this problem, you can either disable synchronous
     transfers in the board's setup program, or upgrade to a newer ALPHA
     release of the NCR driver which will do synchronous negotiation.

  10.
     Tyan S1365 '825 boards have problems with timeouts, especially when
     disconnects are enabled.  Some of these boards have the
     documentation regarding the termination enable jumper reversed - so
     that termination is off when you need it, and on when it shouldn't
     be.

     Try reversing the position of the jumper.

  Notes:

  1. CONFIG_PCI must be set

  5.14.  Seagate ST0x/Future Domain TMC-8xx/TMC-9xx (Standard)

  Supported and Unsupported Configurations :

       Base addresses : 0xc8000, 0xca000, 0xcc000, 0xce000, 0xdc000, 0xde000
       IRQs           : 3, 5
       DMA channels   : DMA is not used
       IO             : memory mapped

  Autoprobe :

       probes for address only, IRQ is assumed to be 5, requires installed BIOS.

  Autoprobe Override :

  Compile time :

       Define OVERRIDE to be the base address, CONTROLLER to
       FD or SEAGATE as appropriate, and IRQ to the IRQ.

  kernel command line :

       st0x=address,irq or tmc8xx=address,irq (only works for .99.13b and newer)

  Antiquity Problems, fix by upgrading :

  1. Versions prior to the one in the Linux .99.12 kernel had a problem
     handshaking with some slow devices, where

     This is what happens when you write data out to the bus

     a. Write byte to data register, data register is asserted to bus

     b. time_remaining = 12us

     c. wait while time_remaining > 0 and REQ is not asserted

     d. if time_remaining > 0, assert ACK

     e. wait while time remaining > 0  and REQ is asserted

     f. deassert ACK

     The problem was encountered in slow devices that do the command
     processing as they read the command, where the REQ/ACK handshake
     takes over 12us - REQ didn't go false when the driver expected it
     to, so the driver ended up sending multiple bytes of data for each
     REQ pulse.

  2. With Linux .99.12, a bug was introduced when I fixed the
     arbitration code, resulting in failed selections on some systems.
     This was fixed in .99.13.

  Common Problems :

  1. There are command timeouts when Linux attempts to read the
     partition table or do other disk access.

     The board ships with the defaults set up for MSDOS, ie interrupts
     are disabled.  To jumper the board for interrupts, on the Seagate
     use jumper W3 (ST01) or JP3 (ST02) and short pins F-G to select IRQ
     5.

  2. The driver can't handle some devices, particularly cheap SCSI tapes
     and CDROMs.

     The Seagate ties the SCSI bus REQ/ACK handshaking into the PC bus
     IO CHANNEL READY and (optionally) 0WS signals.  Unfortunately, it
     doesn't tell you when the watchdog timer runs out, and you have no
     way of knowing for certain that REQ went low, and may end up seeing
     one REQ pulse as multiple REQ pulses.

     Dealing with this means using a tight loop to look for REQ to go
     low, with a timeout incase you don't catch the transition due to an
     interrupt, etc.  This results in a performance decrease, so it
     would be undesirable to apply this to all SCSI devices.  Instead,
     it is selected on a per-device basis with the "broken" field for
     the given SCSI device in the scsi_devices array.  If you run into
     problems, you should try adding your device to the list of devices
     for which broken is not reset to zero (currently, only the TENEX
     CDROM drives).

  3. A future domain board (specific examples include the 840, 841, 880,
     and 881) doesn't work.

     A few of the Future domain boards use the Seagate register mapping,
     and have the MSG and CD bits of the status register flipped.

     You should edit seagate.h, swapping the definitions for STAT_MSG
     and STAT_CD, and recompile the kernel with CONTROLLER defined to
     SEAGATE and an appropriate IRQ and OVERRIDE specified.

  4. When attempting to fdisk your drive, you get error messages
     indicating that the HDIO_REQ or HDIO_GETGEO ioctl failed, or

     You must set heads sectors and cylinders.
     You can do this from the extra functions menu.

  See ``Disks Partitioning''

  5. After manually specifying the drive geometry, subsequent attempts
     to read the partition table result in partition boundary not on a
     cylinder boundary, physical and logical boundaries don't match,
     etc. error messages.

     See ``Disks Partitioning''

  6. Some systems which worked prior to .99.13 fail with newer versions
     of Linux.  Older versions of Linux assigned the CONTROL and DATA
     registers in an order different than that outlined in the Seagate
     documentation, which broke on some systems.  Newer versions make
     the assignment in the correct way, but this breaks other systems.

  The code in seagate.c looks like this now :

       cli();
       DATA = (unsigned char) ((1 << target) | (controller_type == SEAGATE ? 0x80 : 0x40));
       CONTROL = BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL |
                   (reselect ? CMD_ATTN : 0);
       sti();

  Changing this to

       cli();
       CONTROL = BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL |
                   (reselect ? CMD_ATTN : 0);
       DATA = (unsigned char) ((1 << target) | (controller_type == SEAGATE ? 0x80 : 0x40));
       sti();

  may fix your problem.

  Defines :

  FAST or FAST32 will use blind transfers where possible

  ARBITRATE will cause the host adapter to arbitrate for the
          bus for better SCSI-II compatibility, rather than just
          waiting for BUS FREE and then doing its thing.  Should
          let us do one command per Lun when I integrate my
          reorganization changes into the distribution sources.

  SLOW_HANDSHAKE will allow compatibility with broken devices that don't
          handshake fast enough (ie, some CD ROM's) for the Seagate
          code.

  SLOW_RATE=x, x some number will let you specify a default
          transfer rate if handshaking isn't working correctly.

  5.15.  PAS16 SCSI (Standard)

  Supported and Unsupported Configurations :

       Ports          : 0x388, 0x384, 0x38x, 0x288
       IRQs           : 10, 12, 14, 15
            IMPORTANT : IRQ MUST be different from the IRQ used for the sound
                        portion of the board.
       DMA            : is not used for the SCSI portion of the board
       IO             : port mapped

  Autoprobe :

       does not require BIOS

  Autoprobe Override :

       Compile time : Define PAS16_OVERRIDE to be an array of port, irq
       tuples.  Ie

       #define PAS16_OVERRIDE {{0x388, 10}}

       for a board at port 0x388, IRQ 10.

  kernel command line :

       pas16=port,irq

  Defines :

       AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
       for commands that return with a CHECK CONDITION status.

       PSEUDO_DMA - enables PSEUDO-DMA hardware, should give a 3-4X performance
       increase compared to polled I/O.

       PARITY - enable parity checking.  Not supported

       SCSI2 - enable support for SCSI-II tagged queuing.  Untested

       UNSAFE - leave interrupts enabled during pseudo-DMA transfers.  You
                only really want to use this if you're having a problem with
                dropped characters during high speed communications, and even
                then, you're going to be better off twiddling with transfersize.

       USLEEP - enable support for devices that don't disconnect.  Untested.

  Common problems :

  1. Command timeouts, aborts, etc.

     You should install the NCR5380 patches that I posted to the net
     some time ago, which should be integrated into some future alpha
     release.  These patches fix a race condition in earlier NCR5380
     driver cores, as well as fixing support for multiple devices on
     NCR5380 based boards.

     If that fails, you should disable the PSEUDO_DMA option by changing
     the #define PSEUDO_DMA line in drivers/scsi/pas16.c to #undef
     PSEUDO_DMA.

     Note that the later should be considered a last resort, because
     there will be a severe performance degradation.

  5.16.  Trantor T128/T128F/T228 (Standard)

  Supported and Unsupported Configurations :

       Base addresses :  0xcc000, 00xc8000, 0xdc000, 0xd8000
       IRQs           : none, 3, 5, 7 (all boards)
                        10, 12, 14, 15 (T128F only)
       DMA            : not used.
       IO             : memory mapped

  Autoprobe :

  works for all supported configurations, requires installed BIOS.

  Autoprobe Override :

       Compile time : Define T128_OVERRIDE to be an array of address, irq
       tuples.  Ie

       #define T128_OVERRIDE {{0xcc000, 5}}

       for a board at address 0xcc000, IRQ 5.

       The symbolic IRQs IRQ_NONE and IRQ_AUTO may be used.

  kernel command line :

       t128=address,irq
       -1 may be used for no irq, -2 for irq autoprobe.

  Defines :

       AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
       for commands that return with a CHECK CONDITION status.

       PSEUDO_DMA - enables PSEUDO-DMA hardware, should give a 3-4X performance
       increase compared to polled I/O.

       PARITY - enable parity checking.  Not supported

       SCSI2 - enable support for SCSI-II tagged queuing.  Untested

       UNSAFE - leave interrupts enabled during pseudo-DMA transfers.  You
                only really want to use this if you're having a problem with
                dropped characters during high speed communications, and even
                then, you're going to be better off twiddling with transfersize.

       USLEEP - enable support for devices that don't disconnect.  Untested.

  Common Problems :

  1. Command timeouts, aborts, etc.

     You should install the NCR5380 patches that I posted to the net
     some time ago, which should be integrated into some future alpha
     release.  These patches fix a race condition in earlier NCR5380
     driver cores, as well as fixing support for multiple devices on
     NCR5380 based boards.

     If that fails, you should disable the PSEUDO_DMA option by changing
     the #define PSEUDO_DMA line in drivers/scsi/pas16.c to #undef
     PSEUDO_DMA.

     Note that the later should be considered a last resort, because
     there will be a severe performance degradation.

  5.17.  Ultrastor 14f (ISA), 24f (EISA), 34f (VLB) (Standard)

  Supported Configurations :

       Ports          : 0x130, 0x140, 0x210, 0x230, 0x240, 0x310, 0x330, 0x340
       IRQs           : 10, 11, 14, 15
       DMA channels   : 5, 6, 7
       IO             : port mapped, bus master

  Autoprobe :

       does not work for boards at port 0x310, BIOS not required.

  Autoprobe override :

       compile time only, define PORT_OVERRIDE

  Common Problems :

  1. The address 0x310 is not supported by the autoprobe code, and may
     cause conflicts if networking is enabled.

     Please use a different address.

  2. Using an Ultrastor at address 0x330 may cause the system to hang
     when the sound drivers are autoprobing.

     Please use a different address.

  3. Various other drivers do unsafe probes at various addresses, if you
     are having problems with detection or the system is hanging at boot
     time, please try a different address.

     0x340 is recommended as an address that is known to work.

  4. Linux detects no SCSI devices, but detects your SCSI hard disk on
     an Ultrastor SCSI board as a normal hard disk, and the hard disk
     driver refuses to support it.  Note that when this occurs, you will
     probably also get a message

     hd.c: ST-506 interface disk with more than 16 heads detected,
     probably due to non-standard sector translation.  Giving up.  (disk
     %d: cyl=%d, sect=63, head=64)

     If this is the case, you are running the Ultrastor board in WD1003
     emulation mode.  You have

     a. Switch the Ultrastor into native mode.  This is the recommended
        action, since the SCSI driver can be significantly faster than
        the IDE driver, especially with the clustered read/write patches
        installed.  Some users have sustained in excess of 2M/sec
        through the file system using these patches.

        Note that this will be necessary if you wish to use any non-
        hard disk, or more than two hard disk devices on the Ultrastor.

     b. Use the kernel command line switch

          hd=cylinders,heads,sectors

     to override the default setting to bootstrap yourself, keeping num
     ber of cylinders <= 2048, number of heads <= 16, and number of sec
     tors <= 255 such that cylinders * heads * sectors is the same for
     both mappings.

     You'll also have to manually specify the disk geometry when running
     fdisk under Linux.  Failure to do so will result in incorrect par
     tition entries being written, which will work correctly with Linux
     but fail under MSDOS which looks at the cylinder/head/sector
     entries in the table.

     Once Linux is up, you can avoid the inconvenience of having to boot
     by hand by recompiling the kernel with an appropriately defined
     HD_TYPE macro in include/linux/config.h.

  5.18.  Western Digital 7000 (Standard)

  Supported Configurations :

       BIOS Addresses : 0xce000
       Ports          : 0x350
       IRQs           : 15
       DMA Channels   : 6
       IO             : port mapped, bus master

  Autoprobe :

       requires installed BIOS

  Common Problems :

  1. There are several revisions of the chip and firmware.  Supposedly,
     revision 3 boards do not work, revision 5 boards do, chips with no
     suffix do not work, chips with an 'A' suffix do.

  2. The board supports a few BIOS addresses which aren't on the list of
     supported addresses.  If you run into this situation, please use
     one of the supported addresses and submit a bug report as outlined
     in ``Bug Reports''.

  5.19.  AM53/79C974 (ALPHA)

       ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/AM53C974-0.3.tar.gz

  Supported Configurations :

       Ports          : all
       IRQs           : all
       DMA Channels   : 6
       IO             : port mapped, bus master (unintelligent)

  5.20.  qlogic (Standard)

  Hey Drew, where is this section (I (D.F.) saw it only in the toc ;-)?

  6.  Disks

  This section gives information that is specific to disk drives.

  6.1.  Supported and Unsupported Hardware

  All direct access SCSI devices with a block size of 256, 512, or 1024
  bytes should work.  Other block sizes will not work (Note that this
  can often be fixed by changing the block and/or sector sizes using the
  MODE SELECT SCSI command)

  Sector size refers to the number of data bytes allocated per sector on
  a device, ie CDROMs use a 2048 byte sector size.

  Block size refers to the size of the logical blocks used to interface
  with the device.  Although this is usually identical to sector size,
  some devices map multiple smaller physical sectors (ie, 256 bytes in
  the case of 55M Syquest drives) to larger logical blocks or vice versa
  (ie, 512 byte blocks on SUN compatible CDROM drives).

  Removable media devices, including Bernoulis, flopticals, MO drives,
  and Syquests.

  In theory, drives up to a terabyte in size should work.  There is
  definitely no problem with tiny 9G drives.

  6.2.  Common Problems

  6.2.1.  Cylinder > 1024 message

  When partitioning, you get a warning message about "cylinder > 1024"
  or you are unable to boot from a partition including a logical
  cylinder past logical cylinder 1024.

  This is a BIOS limitation.

  See Disk ``Geometry'' and ``Partitioning'' for an explanation.

  6.2.2.  You are unable to partition "/dev/hd*"

  /dev/hd* aren't SCSI devices, /dev/sd* are.

  See ``Device Files'' and Disk ``Geometry'' and ``Partitioning'' for
  the correct device names and partitioning procedure.

  6.2.3.  Unable to eject media from a removable media drive

  Linux attempts to lock the drive door when a piece of media is mounted
  to prevent filesystem corruption due to an inadvertent media change.

  Please unmount your disks before ejecting them.

  6.2.4.  Unable to boot using LILO from a SCSI disk

  In some cases, the SCSI driver and BIOS will disagree over the correct
  BIOS mapping to use, and will result in LILO hanging after 'LI' at
  boot time and/or other problems.

  To workaround this, you'll have to determine your BIOS geometry
  mapping used under DOS, and make an entry for your disk in
  /etc/lilo/disktab.

  Alternatively, you may be able to use the "linear" configuration jfile
  option.

  6.2.5.  Fdisk responds with

       You must set heads sectors and cylinders.
       You can do this from the extra functions menu.

  and disk geometry is not 'remembered' when fdisk is rerun.

  See ``Partitioning''

  6.2.6.  Only one drive is detected on a bridge board with multiple
  drives connected.

  Linux won't search LUNs past zero on SCSI devices which predate ANSI
  SCSI revision 1.  If you wish devices on alternate LUNs to be
  recognized, you will have to modify drivers/scsi/scsi.c:scan_scsis().

  6.2.7.  System hangs when swapping

  We think this has been fixed, try upgrading to 1.1.38.

  6.2.8.  Connor CFP1060S disks get corrupted

  This is due to a microcode bug in the read-ahead and caching code.

  >From Soenke Behrens of Conner tech. support :

  During the past few weeks, we got several calls from customers stating
  that they had severe problems with Conner CFP1060x 1GB SCSI drives
  using the Linux operating system. Symptoms were corrupt filesystems
  (damaged inodes) reported by e2fsck on each system boot and similar
  errors.

  There is now a fix available for customers with a CFP1060x (microcode
  revisions 9WA1.62/1.66/1.68) and Linux. To apply the upgrade, you
  will need a DOS boot disk and ASPI drivers that can access the hard
  drive. The upgrade downloads new queuing and lookahead code into the
  non-volatile SCSI RAM of the drive.

  If you are experiencing problems with a disk that has microcode
  revision 9WA1.60, you will have to contact your nearest Conner service
  centre to get the disk upgraded. The microcode revision can be found
  on the label of the drive and on the underside of the drive on a label
  on one of the ICs.

  If you are confident that you can perform the upgrade yourself, please
  contact Conner Technical Support and have your microcode revision
  ready. Conner Technical Support Europe can be reached on +44-1294-315333,
  Conner Technical Support in the USA can be reached on 1-800-4CONNER.

  Regards
  Soenke Behrens
  European Technical Support

  6.3.  Device Files

  SCSI disks use block device major 8, and there are no "raw" devices
  ala BSD.

  16 minor numbers are allocated to each SCSI disk, with minor % 16 == 0
  being the whole disk, minors  1 <= (minor % 16) <= 4 the four primary
  partitions, minors 5 <= (minor % 16) <= 15 any extended partitions.

  Ie, a configuration may work out like this (with one host adapter)

  Device                  Target, Lun     SCSI disk
  84M Seagate             0       0       /dev/sda
  SCSI->SMD bridge disk 0 3       0       /dev/sdb
  SCSI->SMD bridge disk 1 3       1       /dev/sdc
  Wangtek tape            4       0       none
  213M Maxtor             6       0       /dev/sdd

  Etc.

  The standard naming convention is

  /dev/sd{letter} for the entire disk device ((minor % 16) == 0)
  /dev/sd{letter}{partition} for the partitions on that device (1 <=
  (minor % 16) <= 15)

  Ie

  /dev/sda        block device major 8 minor 0
  /dev/sda1       block device major 8 minor 1
  /dev/sda2       block device major 8 minor 2
  /dev/sdb        block device major 8 minor 16

  etc.

  6.4.  Partitioning

  You can partition your SCSI disks using the partitioning program of
  your choice, under DOS, OS/2, Linux or any other operating system
  supporting the standard partitioning scheme.

  The correct way to run the Linux fdisk program is by specifying the
  device on the command line. Ie, to partition the first SCSI disk,

       fdisk /dev/sda

  If you don't explicitly specify the device, the partitioning program
  may default to /dev/hda, which isn't a SCSI disk.

  In some cases, fdisk will respond with

       You must set heads sectors and cylinders.
       You can do this from the extra functions menu.

       Command (m for help):

  and/or give a message to the effect that the HDIO_REQ or HDIO_GETGEO
  ioctl failed.  In these cases, you must manually specify the disk
  geometry as outlined in ``Disk Geometry'' when running fdisk, and also
  in /etc/disktab if you wish to boot kernels off that disk with LILO.

  If you have manually specified the disk geometry, subsequent attempts
  to run fdisk will give the same error message.  This is normal, since
  PCs don't store the disk geometry information in the partition table.
  In and of itself, will cause _NO PROBLEMS_, and you will have no
  problems accessing partitions you created on the drive with Linux.
  Some vendors' poor installation code will choke on this, in which case
  you should contact your vendor and insist that they fix the code.

  In some cases, you will get a warning message about a partition ending
  past cylinder 1024.  If you create one of these partitions, you will
  be unable to boot Linux kernels off of that partition using LILO.
  Note, however, that this restriction does not preclude the creation of
  a root partition partially or entirely above the 1024 cylinder mark,
  since it is possible to create a small /boot partition below the 1024
  cylinder mark or to boot kernels off existing partitions.

  6.5.  Disk Geometry

  Under Linux, each disk is viewed as the SCSI host adapter sees it : N
  blocks, numbered from 0 to N-1, all error free, where as DOS/BIOS
  predate intelligent disks and apply an arbitrary head / cylinder /
  sector mapping to this linear addressing.

  This can pose a problem when you partition the drives under Linux,
  since there is no portable way to get DOS/BIOS's idea of the mapped
  geometry.  In most cases, a HDIO_GETGEO ioctl() can be implemented to
  return this mapping.  Unfortunately, when the vendor (ie Seagate) has
  chosen a perverse, non-standard, and undocumented mapping, this is not
  possible and geometry must be manually specified

  If manual specification of the is required, you have one of several
  options :

  1. If you don't care about using DOS, or booting kernels from the
     drive with LILO, create a translation such that heads * cylinders *
     sectors * 512 < size of your drive in bytes (a megabyte is defined
     as 2^20 bytes).

     1 <= heads <= 256
     1 <= cylinders <= 1024
     1 <= sectors <= 63

  2. Use the BIOS mapping.  In some cases, this will mean reconfiguring
     the disk so that it is at SCSI ID 0, and disabling the second IDE
     drive (if you have one).

  You can either use a program like NU, or you can use the following
  program :

  begin 664 dparam.com
  MBAZ``##_B+^!`+N!`(H'0SP@=/D\,'5:@#]X=`6`/UAU4(!_`3AU2H!_`P!U
  M1(I7`H#J,(#Z`7<Y@,*`M`C-$PCD=3-14HC()#\PY.@R`.@J`%J(\/[`,.3H
  M)0#H'0!8AL2Q!M+L0.@7`+K"`;0)S2'#NIP!ZR"ZQ0'K&[K5`>L6N]T!,=*Y
  M"@#W\8#",$N(%PG`=>^)VK0)S2'#=7-A9V4Z(&1P87)A;2`P>#@P#0H@("!O
  L<B`@9'!A<F%M(#!X.#$-"B1);G9A;&ED(&1R:79E#0HD("`D```````D``!O
  `
  end

  When run it prints the sectors, heads, and cylinders of the drive
  whose BIOS address was specified on the command line (0x80 is the
  first disk, 0x81 the second).

  Ie, dparam 0x80

  60      17      1007

  Would mean that C: had 60 sectors, 17 heads, and 1007 cylinders.

  7.  CD ROMs

  This section gives information that is specific to cdrom drives.

  7.1.  Supported and Unsupported Hardware

  SCSI CDs with a block size of 512 or 2048 bytes should work.  Other
  block sizes will not work.

  7.2.  Common Problems

  7.2.1.  Unable to mount cdrom

  The correct syntax to mount an ISO-9660 CDROM is

       mount -t iso9660 /dev/sr0 /mount_point -o ro

  Note that for this to work, you must have the kernel configured with
  support for SCSI, your host adapter, the SCSI CDROM driver, and the
  iso9660 filesystem.

  Note that as of Linux 1.1.32, read-only devices such as CDROMs CANNOT
  be mounted with the default read/write options.

  7.2.2.  Unable to eject cdrom

  Linux attempts to lock the drive door when a piece of media is mounted
  to prevent filesystem corruption due to an inadvertent media change.
  7.2.3.  Unable to play audio

  The programs Workman or xcdplayer will do this for you.

  7.2.4.  Workman or Xcdplayer do not work

  The functions to control audio functions are part of the SCSI-II
  command set, so any drive that is not SCSI-II will probably not work
  here.  Also, many SCSI-I and some SCSI-II CDROM drives use a
  proprietary command set for accessing audio functions instead of the
  SCSI-II command set.  For NEC drives, there is a version of xcdplayer
  specially adapted to use this command set floating around - try
  looking on tsx-11.mit.edu in pub/linux/BETA/cdrom.

  These programs may work with some of the non-SCSI cdrom drives if the
  driver implements the same ioctls as the scsi drivers.

  7.2.5.  Additional drives on CD ROM changers do not work

  Most CD changers assign each disc to a logical unit.  Insure that you
  have special files made for each platter (see ``Device Files'') and
  see ``LUNS other than 0 don't work''.

  7.3.  Device Files

  SCSI CD ROMs use major 11.

  Minors are allocated dynamically (See ``Disks'', ``Device Files'' for
  an example) with the first CDROM found being minor 0, the second minor
  1, etc.

  The standard naming convention is

  /dev/sr{digit}, although some distributions have used /dev/scd{digit},
  with examples being

  /dev/sr0        /dev/scd0
  /dev/sr1        /dev/scd1

  8.  Tapes

  This section gives information that is specific to scsi tape drives.

  8.1.  Supported and Unsupported Hardware

  Drives using both fixed and variable length blocks smaller than the
  the driver buffer length (set to 32K in the distribution sources) are
  supported.

  Parameters (block size, buffering, density) are set with ioctls
  (usually with the mt program), and remain in effect after the device
  is closed and reopened.
  Virtually all drives should work, including :

    Archive Viper QIC drives, including the 150M and 525M models

    Exabyte 8mm drives

    Wangtek 5150S drives

    Wangdat DAT drives

  8.2.  Common Problems

  8.2.1.  Tape drive not recognized at boot time

  Try booting with a tape in the drive.

  8.2.2.  Tapes with multiple files cannot be read properly

  When reading a tape with multiple files, the first tar is successful,
  a second tar fails silently, and retrying the second tar is
  successful.

  User level programs, such as tar, don't understand file marks.  The
  first tar reads up until the end of the file.  The second tar attempts
  to read at the file mark, gets nothing, but the tape spaces over the
  file mark.  The third tar is successful since the tape is at the start
  of the next file.

  Use mt on the no-rewind device to space forward to the next file.

  8.2.3.  Decompression fails

  Decompressing programs cannot handle the zeros padding the last block
  of the file.

  To prevent warnings and errors, wrap your compressed files in a .tar
  file - ie, rather than doing

       tar cfvz /dev/nrst0 file.1 file.2 ...

  do

       tar cfvz tmp.tar.z file.1 file.2 ...

       tar cf /dev/nrst0 tmp.tar.z

  8.2.4.  Problems taking tapes to/from other systems

  You can't read a tape made with another operating system or another
  operating system can't read a tape written in Linux.

  Different systems often use different block sizes.  On a tape device
  using a fixed blocksize, you will get errors when reading blocks
  written using a different block size.

  To read these tapes, you must set the blocksize of the tape driver to
  match the blocksize used when the tape was written, or to variable.

  NOTE : this is the hardware block size, not the blocking factor used
  with tar, dump, etc.

  You can do this with the mt command -

       mt setblk <size>

  or

       mt setblk 0

  to get variable block length support.

  Note that these mt flags are NOT supported under the GNU version of mt
  which is included with some Linux distributions.  Instead, you must
  use the BSD derived Linux SCSI mt command.  Source should be available
  from

       tsx-11.mit.edu:/pub/linux/ALPHA/scsi

  Also note that by default, ST_BUFFER_BLOCKS (defined in
  /usr/src/linux/drivers/scsi/st_options.h in newer kernels, st.c in
  older kernels) is set to allow for a 32K maximum buffer size; you'll
  need to edit the source to use larger blocks.

  8.2.5.  No such device" error message

  All attempts to access the tape result in a

  "No such device"

  or similar error message.  Check the type of your tape device - it
  MUST be a character device with major and minor numbers matching those
  specified in ``Device Files''.

  8.2.6.  Tape reads at a given density work, writes fail

  Many tape drives support reading at lower densities for compatibility
  with older hardware, but will not write at those same densities.

  This is especially the case with QIC drives, which will read old 60M
  tapes but only write new 120, 150, 250, and 525M formats.

  8.2.7.  Repositioning the tape locks out access to all SCSI devices

  This is most common with SCSI drivers which only support one
  outstanding command at a time (see ``Multiple devices'' for an
  explanation, and ``Driver feature comparison'' to see which drivers
  suffer from this limitation), although there may be a few tape drives
  out there which refuse to disconnect.

  In either case, you can work around the problem by editing
  drivers/scsi/st.c and adding a

       #define ST_NOWAIT

  at the top and rebuilding the kernel.

  Note that this will defer error condition reporting until the next
  SCSI command is executed.  For this reason, you may want to do
  something like a

       mt status

  after a mt file positioning command so you don't overwrite tape files
  if the positioning command failed.

  You may also wish to consider changing to a better-supported SCSI
  board or newer tape drive if you need to use this workaround and are
  writing multiple files to tapes.

  8.3.  Device Files

  SCSI tapes use character device major 9.

  Due to constraints imposed by Linux's use of a sixteen bit dev_t with
  only eight bits allocated to the minor number, the SCSI tape minor
  numbers are assigned dynamically starting with the lowest SCSI
  HOST/ID/LUN.

  Rewinding devices are numbered from 0 - with the first SCSI tape,
  /dev/rst0 being c 9 0, the second /dev/rst1 c 9 1, etc.  Non-rewinding
  devices have the high bit set in the minor number, ie /dev/nrst0 is c
  9 128.

  The standard naming convention is

  /dev/nst{digit}         for non-rewinding devices
  /dev/st{digit}          for rewinding devices

  9.  Generic

  This information gives information that is specific to the generic
  scsi driver.

  9.1.  Supported Hardware

  The Generic SCSI device driver provides an interface for sending SCSI
  commands to all SCSI devices - disks, tapes, CDROMs, media changer
  robots, etc.

  Everything electrically compatible with your SCSI board should work.

  9.2.  Common Problems

  None :-).

  9.3.  Device Files

  SCSI generic devices use character major 21.  Due to constraints
  imposed by Linux's use of a 16 bit dev_t, minor numbers are
  dynamically assigned from 0, one per device, with

  /dev/sg0

  corresponding to the lowest numerical target/lun on the first SCSI
  board.

  10.  Buyers' Guide

  A frequent question is:

  "Linux supports quite a number of different boards, so which scsi host
  adapter should I get."

  The answer depends upon how much performance you expect or need,
  motherboard, and the scsi peripherals that you plan on attaching to
  your machine.

  10.1.  Transfer types

  The biggest factor affecting performance (in terms of throughput and
  interactive response time during SCSI I/O) is the transfer type used.
  The table below lists the various transfer types, the effects they
  have on performance, and some recommendations as to their use.

     Transfer type
        Description / Performance / Recommendations

     Pure Polled
        A pure polled I/O board will use the CPU to handle all of the
        SCSI processing, including the REQ/ACK handshaking.

        Even a fast CPU will be slower handling the REQ/ACK handshake
        sequence than a simple finite state machine, resulting in peak
        transfer rates of about 150K/sec on a fast machine, perhaps
        60K/sec on a slow machine (through the filesystem).

        The driver also must sit in a tight loop as long as the SCSI bus
        is busy, resulting in near 100% CPU utilization and extremely
        poor responsiveness during SCSI I/O.  Slow CDROMs which don't
        disconnect/reconnect will kill interactive performance with
        these boards.

        Not recommended.

     Interlocked Polled
        Boards using interlocked polled I/O are essentially the same as
        pure polled I/O boards, only the SCSI REQ/ACK handshaking
        signals are interlocked with the PC bus handshaking signals.
        All SCSI processing beyond the handshaking is handled by the
        CPU.

        Peak transfer rates of 500-600K/sec through the filesystem are
        possible on these boards.

        As with pure polled I/O boards, the driver must sit in a tight
        loop as long as the SCSI bus is busy, resulting in CPU
        utilization dependent on the transfer rates of the devices, and
        when they disconnect/reconnect.  CPU utilization may vary
        between 25% for single speed CDs which handle
        disconnect/reconnect properly to 100% for faster drives or
        broken CD ROMs which fail to disconnect/reconnect.

        On my 486-66, with a T128, I use 90% of my CPU time to sustain a
        throughput of 547K/sec on a drive with a headrate of 1080K/sec
        with a T128 board.

        Sometimes acceptable for slow tapes and CDROMs when low cost is
        essential.

     FIFO Polled
        Boards using FIFO polled I/O put a small (typically 8K) buffer
        between the CPU and the SCSI bus, and often implement some
        amount of intelligence.  The net effect is that the CPU is only
        tied up when it is transferring data at top speed to the FIFO
        and when it's handling the rest of the interrupt processing for
        FIFO empty conditions, disconnect/reconnect, etc.

        Peak transfer rates should be sufficient to handle most SCSI
        devices, and have been measured at up to 4M/sec using raw SCSI
        commands to read 64K blocks on a fast Seagate Baracuda with an
        Adaptec 1520.

        CPU utilization is dependent on the transfer rates of the
        devices, with faster devices generating more interrupts per unit
        time which require more CPU processing time.   Although CPU
        usage may be high (perhaps 75%) with fast devices, the system
        usually remains usable.  These boards will provide excellent
        interactive performance with broken devices which don't
        disconnect/reconnect (typically cheap CDROM drives)

        Recommended for persons on a budget.

     Slave DMA
        Drivers for boards using slave DMA program the PC's DMA
        controller for a channel when they do a data transfer, and
        return control to the CPU.

        Peak transfer rates are usually handicapped by the poor DMA
        controller used on PCs, with one such 8-bit board having
        problems going faster than 140-150K/sec with one mainboard.

        CPU utilization is very reasonable, slightly less than what is
        seen with FIFO polled I/O boards.  These boards are very
        tolerant of broken devices which don't disconnect/reconnect
        (typically cheap CSG limitDROM drives).

        Acceptable for slow CDROM drives, tapes, etc.

     Busmastering DMA
        These boards are intelligent.  Drivers for these boards throw a
        SCSI command, the destination target and lun, and where the data
        should end up in a structure, and tell the board "Hey, I have a
        command for you."  The driver returns control to various running
        programs, and eventually the SCSI board gets back and says that
        it's done.

        Since the intelligence is in the host adapter firmware and not
        the driver, drivers for these boards typically support more
        features - synchronous transfers, tagged queuing, etc.

        With the clustered read/write patches, peak transfer rates
        through the file system approach 100% of head rate writing, 75%
        reading.

        CPU utilization is minimal, irregardless of I/O load, with a
        measured 5% CPU usage while accessing a double speed CDROM on an
        Adaptec 1540 and 20% while sustaining a 1.2M/sec transfer rate
        on a SCSI disk.

        Recommended in all cases where money is not extremely tight, the
        main board is not broken (some broken main boards do not work
        with bus masters), and applications where time to data is more
        important than throughput are not being run (bus master overhead
        may hit 3-4ms per command).

  10.2.  Scatter/gather

  The second most important driver/hardware feature with respect to
  performance is support for scatter/gather I/O.  The overhead of
  executing a SCSI command is significant - on the order of
  milliseconds. Intelligent bus masters like the Adaptec 1540 may take
  3-4ms to process a SCSI command before the target even sees it.  On
  unbuffered devices, this overhead is always enough to slip a
  revolution, resulting in a transfer rate of about 60K/sec (assuming a
  3600RPM drive) per block transfered at a time.  So, to maximize
  performance, it is necessary to minimize the number of SCSI commands
  needed to transfer a given amount of data by transferring more data
  per command.  Due to the design of the Linux buffer cache, contiguous
  disk blocks are not contiguous in memory. With the clustered
  read/write patches, 4K worth of buffers are contiguous.  So, the
  maximum amount of data which can be transfered per SCSI command is
  going to be 1K * # of scatter/gather regions without the clustered
  read/write patches, 4K * # of regions with.  Experimentally, we've
  determined that 64K is a reasonable amount to transfer with a single
  SCSI command - meaning 64 scatter/gather buffers with clustered
  read/write patches, 16 without.  With the change from 16K to 64K
  transfers, we saw an improvement from 50% of headrate, through the
  filesystem, reading and writing, to 75% and 100% respectively using an
  Adaptec 1540 series board.

  10.3.  Mailbox vs. non-mailbox

  A number of intelligent host adapters, such as the Ultrastor, WD7000,
  Adaptec 1540, 1740, and BusLogic boards have used a mailbox-metaphor
  interface, where SCSI commands are executed by putting a SCSI command
  structure in a fixed memory location (mailbox), signaling the board
  (ie, raising the outgoing mail flag), and waiting for a return
  (incoming mail).  With this high level programming interface, users
  can often upgrade to a newer board revision to take advantage of new
  features, such as FAST + WIDE SCSI, without software changes.  Drivers
  tend to be simpler to implement, may implement a larger feature set,
  and may be more stable.

  Other intelligent host adapters, such as the NCR53c7/8xx family, and
  Adaptec AIC-7770/7870 chips (including the 274x, 284x, and 2940
  boards) use a lower level programming interface.  This may prove
  faster since processing can be shifted between the board's processor
  and faster host CPU, allow better flexibility in implementing certain
  features (ie, target mode for arbitrary devices), and these boards can
  be built for less money (In some cases, this is passed on to the
  consumer (ie, most NCR boards)).  On the down side, drivers tend to be
  more complex (read : there is more potential for bugs), and must be
  modified to take advantage of the features present on newer chips.

  10.4.  Bus types

  Bus type is the next thing to consider, with choices including ISA,
  EISA, VESA, and PCI.  Marketing types often spout of absurd bandwidth
  numbers based on burst transfer rates and fiction, which isn't very
  useful.  Instead, I've chosen to state "real-world" numbers based on
  measured performance with various peripherals.

     Bus
        Bandwidth, description,

     ISA
        Bandwidth is slightly better than 5M/sec for  busmastering
        devices.  With an ISA bus, arbitration for busmasters is
        performed by the venerable 8237 third party DMA controller,
        resulting in relatively high bus acquisition times.  Interrupt
        drivers are tri-state and edge triggered, meaning interrupts
        cannot be shared. Generally, ISA is unbuffered, meaning the
        host/memory bus is tied up whenever a transfer is occuring. No
        mechanism is provided to prevent bus-hogging.

     VESA
        Bandwidth is about 30M/sec.  Some VESA systems run the bus out
        of spec, rendering them incompatible with some boards, so this
        should be taken into consideration before purchasing hardware
        without a return guarantee.  Generally, VESA is unbuffered,
        meaning meaning the host/memory bus is tied up whenever a
        transfer is occuring.

     EISA
        Bandwidth is about 30M/sec, with busmastering operations
        generally being faster than VESA.  Some EISA systems buffer the
        bus, allowing burst transfers to the faster host/memory bus and
        minimizing impact on CPU performance.  EISA interrupt drivers
        may be either tri-state edge-triggered or open collector level-
        active, allowing interrupt sharing with drivers that support it.
        Since EISA allocates a separate address space for each board, it
        is usually less prone to resource conflicts than ISA or VESA.

     PCI
        Bandwidth is about 60M/sec.  Most PCI systems implement write
        posting buffers on the host bridge, allowing speed mismatches on
        either side to have a minimum impact on bus/CPU performance.
        PCI interrupt drivers are open collector level-active, allowing
        interrupt sharing with drivers that support it. Mechanisms are
        provided to prevent bus hogging, and for both master and slave
        to suspend a bus-mastering operation.

        Since PCI provides a plug-n-play mechanism with writeable
        configuration registers on every board, in a separate address
        space, a properly implemented PCI system is plug-and play.

        PCI is extremely strict as to trace length, loading, mechanical
        specifications, etc. and ultimately should be more reliable than
        VESA or ISA.

        In summary, PCI is the best PC bus, although it does have its
        dark side.  PCI is still in its infancy, and although most
        manufacturers have ironed out the problems, there is still stock
        of older, buggy PCI hardware and broken main BIOSes.  For this
        reason, I _strongly_ recommend a return guarantee on the
        hardware.  While the latest PCI mainboards are truly plug-and-
        play, older PCI boards may require the user to set options with
        both jumpers and in software (ie, interrupt assignments).
        Although many users have resolved their PCI problems, it has
        taken time and for this reason I cannot recommend a PCI purchase
        if having the system operational is extremely time critical.

  For many slower SCSI devices, such as disks with head rates around
  2M/sec or less, CDROMs, and tapes, there will be little difference in
  throughputs with the different PC bus interfaces.  For faster
  contemporary SCSI drives (Typical high end multi-gigabyte drives have
  a head rate of 4-5M/sec, and at least one company is currently ALPHA
  testing a parallel head unit with a 14M/sec head rate), throughput
  will often be significantly better with controllers on faster busses,
  with one user noting a 2.5 fold performance improvement when going
  from an Adaptec 1542 ISA board to a NCR53c810 PCI board.

  With the exception of situations where PCI write-posting or a similar
  write-buffering mechanism is being used, when one of the busses in
  your system is busy, all of the busses will be unaccessible.  So,
  although bus saturation may not be interfering with SCSI performance,
  it may have a negative effect on interactive performance.  Ie, if you
  have a 4M/sec SCSI disk under ISA, you'll have lost 80% of your
  bandwidth, and in an ISA/VESA system would only be able to bitblt at
  6M/sec.  In most cases, a similar impact on processing jobs in the
  background would also be felt.

  Note that having over 16M of memory does not preclude using an ISA
  busmastering SCSI board.  Unlike various broken operating systems,
  Linux will double buffer when using a DMA with an ISA controller and a
  transfer is ultimately destined for an area above 16M.  Performance on
  these transfers only suffers by about 1.5%, ie not noticeably.

  Finally, the price difference between bus masters offered with the
  different bus interfaces is often minimal.

  With all that in mind, based on your priorities you will have certain
  bus preferences

       Stability, time critical installations,         EISA ISA VESA PCI
                   and poor return policies
       Performance, and typical hobbiest               PCI EISA VESA ISA
                   installations

  As I pointed out earlier, bus mastering versus other transfer modes is
  going to have a bigger impact on total system performance, and should
  be considered more important than bus type when purchasing a SCSI
  controller.

  10.5.  Multiple devices

  If will you have multiple devices on your SCSI bus, you may want to
  see whether the host adapter/driver that you are considering supports
  more than one outstanding command at one time.  This is almost
  essential if you'll be running a tape drive, and very desirable if you
  are mixing devices of different speeds, like a CD ROM and a disk
  drive.  If the linux driver only supports one outstanding command, you
  may be locked out of your disk drive while a tape in the tape drive is
  rewinding or seeking to end of media (perhaps for half an hour).  With
  two disk drives, the problem will not be as noticeable, although
  throughput would approach the average of the two transfer rates rather
  than the sum of the two transfer rates.

  10.6.  SCSI-I, SCSI-II, SCSI-III FAST and WIDE options, etc.

  Over the years, SCSI has evolved, with new revisions of the standard
  introducing higher transfer rates, methods to increase throughput,
  standardized commands for new devices, and new commands for previously
  supported devices.

  In and of themselves, the revision levels don't really mean anything.
  Excepting minor things like SCSI-II not allowing the single initiator
  option of SCSI-I, SCSI is backwards compatible, with new features
  being introduced as options and not mandatory.  So, the decision to
  call a SCSI adapter SCSI, SCSI-II, or SCSI-III is almost entirely a
  marketing one.

  10.7.  Driver feature comparison

  Driver feature comparison (supported chips are listed in parenthesis)

  Driver                                  Simultaneous    SG              > 1
                  Transfer mode           Commands        limit           Boards
                                          total/LUN
  AM53C974        Busmastering DMA        12s/1s          255s            Y
  aha152x         FIFO(8k) Polled         7s/1s           255s            N
      (AIC6260,
      AIC6360)
  aha1542         Busmastering DMA        8s/1s           16              Y
  aha1740         Busmastering DMA        32s             16              N
  aha274x         Busmastering DMA        4s/1s           255s            Y
  BusLogic        Busmastering DMA        192/31          128s, 8192h     Y
  (values are for BT-948/958/958D, older boards support fewer commands)
  eata_dma        Busmastering DMA        64s-8192h/2-64  512s, 8192h     Y
  fdomain         FIFO(8k) Polled         1s              64s             N
      (TMC1800,   except TMC18c30
      TMC18c30,   with 2k FIFO
      TMC18c50,
      TMC36c70)

  in2000*         FIFO(2k) Polled         1s              255s            N
  g_NCR5380       Pure Polled             16s/2s          255s            Y
      (NCR5380,
      NCR53c80,
      NCR5381,
      NCR53c400)
  gsi8*           Slave DMA               16s/2s          255s
      (NCR5380)
  PAS16           Pure Polled             16s/2s          255s            Y
      (NCR5380)   or Interlocked Polled
                  (fails on some systems!)
  seagate         Interlocked Polled      1s/1s           255s            N
  wd7000          Busmastering DMA        16s/1s          16              Y
  t128            Interlocked Polled      16s             255s            Y
      (NCR5380)
  qlogic          Interlocked Polled      1s/1s           255s            N
  ultrastor       Busmastering DMA        16s/2s          32              Y
  53c7,8xx        Busmastering DMA
      (NCR53c810,
       NCR53c815,
       NCR53c820,
       NCR53c825)
      rel5                                1s/1s           127s            N
      rel10                               8s/1s           127s            Y

  Notes :

  1. drivers flagged with an '*' are not included with the distribution
     kernel, and binary boot images may be unavailable.

  2. numbers suffixed with an 's' are arbitrary limits set in software
     which may be changed with a compile time define.

  3. hardware limits are indicated by an 'h' suffix, and may differ from
     the software limits currently imposed by the Linux drivers.

  4. unsuffixed numbers may indicate either hard or soft limits.

  5. rel5 of the NCR53c810 driver is included in the stock 1.2.x and
     1.3.x kernels; rel10 is available via anonymous FTP.

  6. With the exception of the AM53C974, the busmastering DMA boards are
     intelligent; with the NCR executing microcode from main memory, the
     AIC7770 executing microcode from on-chip RAM, and the rest using a
     mailbox-style interface.

  10.8.  Board comparison

  Board                   Driver          Bus     Price   Notes
  Adaptec AIC-6260        aha152x         ISA             chip, not board
  Adaptec AIC-6360        aha152x         VLB             chip, not board
      (Used in most
      VESA/ISA multi-IO
      boards with SCSI,
      Zenon mainboards)
  Adaptec 1520            aha152x         ISA
  Adaptec 1522            aha152x         ISA     $80     1520 w/FDC
  Adaptec 1510            aha152x         ISA             1520 w/out boot ROM,
                                                          won't autoprobe.
  Adaptec 1540C           aha1542         ISA
  Adaptec 1542C           aha1542         ISA             1540C w/FDC
  Adaptec 1540CF          aha1542         ISA             FAST SCSI-II
  Adaptec 1542CF          aha1542         ISA     $200    1540CF w/FDC
  Adaptec 1640            aha1542         MCA

  Adaptec 1740            aha1740         EISA            discontinued
  Adaptec 1742            aha1740         EISA            discontinued, 1740
                                                          w/FDC
  Adaptec 2740            aha274x         EISA
  Adaptec 2742            aha274x         EISA            w/FDC
  Adaptec 2840            aha274x         VLB
  Adaptec 2842            aha274x         VLB             w/FDC
  Adaptec 2940            aha274x         PCI
  Always IN2000           in2000          ISA
  BusLogic BT-948         BusLogic        PCI     $180    Ultra SCSI
  BusLogic BT-958         BusLogic        PCI     $230    Wide Ultra SCSI

  (see the section ``BusLogic MultiMaster Host Adapters'' for additional
  BusLogic board descriptions)

  DPT     PM2011          eata_dma        ISA             FAST SCSI-II
          PM2012A         eata_dma        EISA            FAST SCSI-II
          PM2012B         eata_dma        EISA            FAST SCSI-II
          PM2021          eata_dma        ISA             FAST SCSI-II
          PM2022          eata_dma        EISA            FAST SCSI-II
          PM2024          eata_dma        PCI             FAST SCSI-II
          PM2122          eata_dma        EISA            FAST SCSI-II
          PM2322          eata_dma        EISA            FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2041W         eata_dma        ISA             Wide Single-ended
                                                          SCSI-II
          PM2041UW        eata_dma        ISA             Ultra Wide Single-ended
          PM2042W         eata_dma        EISA            Wide Single-ended
          PM2042UW        eata_dma        EISA            Ultra Wide Single-ended
          PM2044W         eata_dma        PCI             Wide Single-ended
          PM2044UW        eata_dma        PCI             Ultra Wide Single-ended
          PM2142W         eata_dma        EISA            Wide Single-ended
          PM2142UW        eata_dma        EISA            Ultra Wide Single-ended
          PM2144W         eata_dma        PCI             Wide Single-ended
          PM2144UW        eata_dma        PCI             Ultra Wide Single-ended
          PM3021          eata_dma        ISA             multichannel
                                                          raid/simm sockets
          PM3122          eata_dma        EISA            multichannel/raid
          PM3222          eata_dma        EISA            multichannel
                                                          raid/simm sockets
          PM3224          eata_dma        PCI             multichannel
                                                          raid/simm sockets
          PM3334          eata_dma        PCI             Wide Ultra SCSI
                                                          multichannel
                                                          raid/simm sockets

  DTC 3290                aha1542         EISA            Although it should work,
                                                          due to documentation
                                                          release polcies, DTC
                                                          hardware is unsupported
  DTC 3130                53c7,8xx        PCI             '810
  DTC 3130B               53c7,8xx        PCI             '815
  DTC 3292                aha1542         EISA            3290 w/FDC
  DTC 3292                aha1542         EISA            3290 w/FDC
  Future Domain 1680      fdomain         ISA             FDC
  Future Domain 3260      fdomain         PCI
  NCR53c810 (boards sold 53c7,8xx         PCI     $60     chip, not board. Boards
      by FIC, Chaintech,                          (board) don't include
      Nextor, Gigabyte, etc.                              BIOS, although most
      Mainboards with chip by                             non-NCR equipped main
      AMI, ASUS, J-Bond,                                  boards have the SDMS
      etc. Common in DEC                                  BIOS
      PCI systems)
  NCR53c815 (            53c7,8xx         PCI     $100    NCR53c810 plus
      Intel PCISCSIKIT,                                   bios
      NCR8150S, etc)
  NCR53c825              53c7,8xx         PCI     $120    Wide variant of
                                                          NCR53c815.  Note that
                                                          the current Linux
                                                          driver does not
                                                          negotiate for wide
                                                          transfers.
  Pro Audio Spectrum 16   pas16           ISA             Sound board w/SCSI
  Seagate ST01            seagate         ISA     $20     BIOS only works with
                                                          some drives
  Seagate ST02            seagate         ISA     $40     ST01 w/FDC
  Sound Blaster 16 SCSI   aha152x         ISA             Sound board w/SCSI
  Western Digital 7000    wd7000          ISA             w/FDC
  Trantor T128            t128            ISA
  Trantor T128F           t128            ISA             T128 w/FDC and
                                                          support for high IRQs
  Trantor T130B           g_NCR5380       ISA
  Ultrastor 14F           ultrastor       ISA             w/FDC
  Ultrastor 24F           ultrastor       EISA            w/FDC
  Ultrastor 34F           ultrastor       VLB

  Notes :

  1. Trantor was recently purchased by Adaptec, and some products are
     being sold under the Adaptec name.

  2. Ultrastor recently filed for Chapter 11 Bankruptcy, so technical
     support is non-existent at this time.

  3. The price for the busmastering NCR53c810 boards is not a typo,
     includes the standard ASPI/CAM driver package for DOS, OS/2 and
     Windows (32 bit access), and other drivers are available for free
     download.

     Some people have had luck with the following companies :

       SW (swt@netcom.com) (214) 907-0871 fax (214) 907-9339

  As of 23 Dec 1995, their price was $53 on '810 boards.

  4. Adaptec's recent SCSI chips show an unusual sensitivity to cabling
     and termination problems. For this reason, I cannot recommend the
     Adaptec 154x C and CF revisions or the 2xxx series.

     Note that the reliability problems do not apply to the older 154x B
     revision boards, 174x A revision boards, or to my knowledge
     AIC-6360/AIC-6260 based boards (1505, 1510, 1520, etc).

     Also, the quality of their technical support has slipped markedly,
     with long delays becoming more common, and their employees being
     ignorant (suggesting there were non-disclosure policies affecting
     certain literature when there were none), and hostile (ie, refusing
     to pass questions on to some one else when they couldn't answer
     them).

     If users desire handholding, or wish to make a political statement,
     they should take this point into consideration.  Otherwise, the
     Adaptec 152x/1510/1505 are nicer than the other ISA boards in the
     same price range, and there are some excellent deals on used and
     surplus 154x B revision boards and 1742 boards which IMHO outweigh
     the support problems.

  5. All DPT boards can be upgraded with cache and raid modules, most of
     the boards are also available in Wide and/or Differential versions.

  6. The various NCR boards are not entirely equivalent.  Ie, while the
     ASUS SC200 uses active termination, many other NCR53c810 boards use
     passive termination.  Most '825 boards use active termination, but
     some use a ROM for BIOS and others have a FLASH ROM.  Most '825
     boards have a WIDE external connector, WIDE internal connector, and
     narrow internal connector, although a few (ie, CSC's less expensive
     model) lack the narrow internal connector.

  10.9.  Summary

  Most ISA, EISA, VESA, and PCI users will probably be served best by a
  BusLogic MultiMaster board, due to its performance, features such as
  active termination, and Adaptec 1540 compatibility.  There are a
  number of models available with EISA, ISA, PCI, and VESA local bus
  interfaces, in single ended and differential, and 8/16 bit SCSI bus
  widths.  The most recent Ultra SCSI PCI models, the BT-948/958/958D,
  also include Flash ROM for easy firmware updates, as well as automatic
  "smart" termination.

  People with the need for the highest possible IO performance at their
  fingertips should consider the boards from DPT, which are the only
  ones that support RAID, caching and more than one SCSI channel.

  People with PCI systems should consider NCR53c8xx based boards.  These
  are bus mastering SCSI controllers, '810s are available quantity one
  for $53 (ie, cheaper than the Adaptec 1520).  C't magazine benchmarked
  the boards as faster than both the Adaptec 2940 and BusLogic BT-946C
  (under DOS), and they get reasonable performance under Linux (up to
  6M/sec through the file system ). The disadvantages of these boards
  versus the BusLogics are that they aren't Adaptec 1540 compatible, may
  or may not come with active termination, you'll need the latest driver
  revision (standard in 1.3.5x, also available via anonymous FTP for
  1.2.x) to make full use of the hardware, and are more likely to have
  problems than with a mailbox interface board like a BusLogic or DPT.

  Where everything working right on the first try is imperative, a
  BusLogic MultiMaster or DPT board is probably optimal due to the
  complexity and potential for problems in non-mailbox interface boards
  like the NCR53c8xx and Adaptec AIC7xxx .

  People wanting non-PCI SCSI on a limited budget will probably be
  happiest finding a surplus or used Adaptec 154x B revision or 174x A
  revision, or an Adaptec 1520 clone of some sort (about $80) if they
  want new hardware.  These boards offer reasonable throughput and
  interactive performance at a modest price.

  11.  Assignment of minor numbers

  Due to constraints imposed by Linux's use of a sixteen bit dev_t with
  only eight bits allocated to the minor number, SCSI disk, tape, CDROM,
  and generic minor numbers are assigned dynamically.  according to the
  following procedure :

  For all SCSI host adapters, from scsi0 through scsiN
      For all SCSI IDs on this bus, from 0 through 7, except for
        this host adapter's ID
          For all logical units, from 0 through max_scsi_luns
            - Probe the bus, target, and LUN combination by
              issuing a TEST UNIT READY command.  If we don't
              think a unit was here, don't probe any more LUNs
              on this bus + SCSI ID.
            - Send an INQUIRY command to determine what we've
              found; including the device type, vendor, model,
              firmware revision, etc.
            - Pass the results of this to a special recognition
              function for each high level driver present (i.e. disk,
              tape, etc).  Attach this device to the next available
              unit for any drivers that are willing to drive this.
              The generic device will attach to all devices.
            - If it was SCSI-I, or in a list of devices known
              not to handle multiple LUNs, don't probe any more
              LUNs on this bus + SCSI ID.
            - If it is a device known to have multiple LUNs, then
              a scan of the full LUN spectrum is forced, overriding
              max_scsi_luns.

  There are frequently problems with this approach because if you have a
  system where some devices are only present some of the time, then the
  minor numbers for a given device will depend upon which devices were
  present at boot time.  This can present problem, because rc scripts or
  the file /etc/fstab might contain instructions for mounting specific
  partitions which fails when the disk appears with a different minor
  number.

  This problem has not yet been fully solved.  There is a program which
  can be found on tsx-11 that creates a /dev/scsi hierarchy based upon
  host number, id and lun.  This is a bit clumsy, but it would help to
  alleviate some of the problems.

  A better solution will probably come out of the /proc/scsi pseudo
  directory.  This is currently a work in progress, so at present we
  cannot say exactly the form of the solution, but at the time of this
  writing this appears to be a promising approach for resolving some of
  these issues.

D MINI                              	mini
F MODULE-H.;1                       	Module-HOWTO
F NEWS-HOW.;1                       	News-HOWTO
F README.;1                         	README
F SCSI-HOW.;1                       	SCSI-HOWTO
F TERM-HOW.;1                       	Term-HOWTO
[ 16 April 1997
  The Linux Term HOWTO is not being maintained by the author any
  more.  We both agreed that the term program is nearly obsolete. ]

  TERM HOWTO
  Patrick Reijnen patrickr@bart.nl
  v1.2, 15 July 1995

  1.  Legal Information

  1.1.  Copyright statement

  This document may be distributed freely as a whole in any form and
  free of charge. Parts of this document may be distributed, provided
  that this copyright message is included and the reader is informed
  that this is not the full HOWTO document. Furthermore, there is to be
  a pointer as to where the full document can be obtained. Specifically,
  it may be included in commercial distributions, without prior consent.
  However, I would like to be informed of such usage.

  This HOWTO may be translated into any language, whatsoever, provided
  that you leave this copyright statement and the disclaimer intact, and
  that a notice is appended stating who translated the document.

  1.2.  DISCLAIMER

  While I have tried to include the most correct and up-to-date
  information available, I cannot guarantee that usage of the
  information in this document does not result in loss of data. I
  provide NO WARRANTY about the information in this HOWTO and I cannot
  be made liable for any consequences for any damage resulting from
  using information in this HOWTO.

  2.  Introduction

  2.1.  This Document

  This HOWTO attempts to clear up some of the confusion of using TERM,
  Michael O'Reilly's remarkable program that allows you to multiplex
  your serial line and set up a network connection.  By and large, the
  documents that come with TERM are quite good, and this HOWTO is not
  intended to replace them. The intention of this document is to give
  some background on how TERM works and detail the steps in getting some
  of the more common networking services working under TERM. It should
  be emphasized that this document does not cover everything there is to
  know about TERM. After reading it, the TERM manual pages should be
  read, since they include information not contained here.

  2.2.  What is TERM?

  TERM is a program, written by Michael O'Reilly (michael@iinet.com.au)
  and maintained by Bill Riemers (bcr@physics.purdue.edu), that is run
  over a serial line to allow multiple connections to operate
  concurrently - i.e. you may be down-load a file via your modem while
  working on a (different) remote system via the same modem connection.
  TERM can also be used to open up X client windows over a serial
  connection.  Through the tredir utility and the tudpredir utility TERM
  can provide almost all of the ``traditional'' TCP/IP and UDP network
  services: mail, news, ftp, telnet, xarchie, etc.  In a sense, TERM is
  very much like other serial protocols such as SLIP or PPP. TERM's
  advantage is that it can be run entirely from user space, requiring no
  support from system or network administrators.

  Unlike SLIP or PPP, your machine does not have its own IP address. All
  incoming traffic must be addressed to your remote host, and it will be
  redirected to your local computer by TERM.

  3.  How TERM works

  Before experimenting with TERM it is strongly advised to first read
  this complete chapter and the INSTALLATION file provided with the
  package. Also take a look at the manual pages linecheck, (term)test
  and TERM. This will help you to work easier and faster.

  3.1.  Nomenclature

  I assume you are dialling a system through some sort of terminal
  server. I use the terms local and remote to refer to the home and
  network connected systems respectively (unless I use them to mean
  something else :-).

  TERM provides the local machine, which has no network connection, but
  is connected, via a serial line, to a remote machine which is in turn
  connected to a network with network services. Let us look at how a
  machine with a user invokes a program, like ftp or telnet, that
  requests a network service. What these programs do is make a system
  call requesting network services. The operating system then obtains
  these services via its network interface (e.g. it sends and receives
  packets over the ethernet). SLIP and PPP do exactly this, by
  converting your modem line into a network interface, which is in
  principle no different from an ethernet. The downside of this is that
  these protocols make the modem-connected machine part of the network,
  just like any other machine. This implies all the administrative
  burdens associated with being a network node (more actually, since the
  modem link must also be administered).

  In the absence of a network connection like SLIP or PPP, what does one
  typically do? Well, you dial your network connected machine, read your
  mail, your news etc; if you need a file, you first transfer it to the
  remote machine and then download it to your local machine using kermit
  or some other communication program. This is a bit of a pain,
  especially since you can only really do one thing at a time that uses
  your modem link.  The idea behind TERM is basically to automate and
  multiplex this process. TERM is invoked on both the local and remote
  machines, and the two processes communicate with one another over the
  modem line. When you need a network service, you make a request to the
  local TERM daemon, which forwards the request to the TERM daemon on
  the remote, network-connected, machine. The result is then returned
  over the modem line.

  To be more concrete, say you want to retrieve a file by ftp.  First
  you need a version of ftp that can speak to TERM. You invoke this
  termftp as you do a regular ftp, say termftp nethost.gov, but this
  special version makes its network request to the local TERM daemon
  instead of the kernel. The local TERM forwards this request, over the
  modem line, to the remote TERM, which opens an ftp connection to
  nethost.gov, and transmits the data back over the modem link. TERM is
  smart enough to have many different things going on at once; so you
  can have several different network sessions using the same modem link,
  e.g. you can be logged into another distant host via termtelnet while
  the termftp transfer is going on.

  If this is too abstract (or unclear) do not worry; the important piece
  of information to get out of this section is that there are two copies
  of TERM running, one on each end of the modem link.

  4.  Setting Things Up

  4.1.  What has to be available

  Before you start building and using TERM you have to make sure that
  you have built TCP/IP support into the kernel. Furthermore, make sure
  that the TCP/IP loopback interface is activated. When this is the case
  you can go on with the rest of this section.

  4.2.  Explanation of concepts

  In newer TERM version two new concepts have entered TERM. These two
  concepts will be explained in the next two subsections.

  4.2.1.  Sharing

  Starting with version 1.16 the concept of sharing the TERM connection
  with other users has entered TERM. This means that when you enable
  shared features, other people can use the same TERM connection you are
  using, i.e. when you are working on your remote machine via your TERM
  connection (say, from your local machine you used trsh to get in)
  another person on your local machine can use the same TERM connection
  at the same time to ftp a file to his login on your local machine from
  an ftp site somewhere in the world.

  When you disable shared features (i.e. you execute TERM in private
  mode) you and only you (we do not count root :-) can use the TERM
  connection.

  Of course, you only need to install shared TERM at the end at which
  you want to allow people to use the same TERM connection you are
  using. So, if other people have a login on your local machine and they
  want to use it from somewhere on your remote network you enable shared
  features on the remote end of your TERM connection. In this way all
  these people can login on your machine at the same time sharing the
  same TERM connection with each other and with you. (NOTE: the first
  example needed shared features to be enabled at the local end of the
  TERM connection).

  NOTE for installation as root: When you install TERM as root you have
  to create a 'term' group first (before compilation) with no member by
  adding the following line in '/etc/group':

    term::16:root

  or any other unused GID than 16 when 16 is already in use.

  After compilation and installation make TERM and its clients SGID
  'term':

    chgrp term <term_client>
    chmod g+s <term_client>

  Also any other program that you make TERM-aware must be made SGID
  'term'.

  4.2.2.  Full TERM networking

  Starting with TERM version 2.0.0 the statement full TERM networking is
  used. When your only connection with the outside world is a TERM
  connection, you have a full TERM network and you should build TERM
  with full TERM networking. In this case in the shared directory a file
  called termnet is placed. This tells TERM that your only connection to
  the outside world is via TERM.

  When you also have some other type of network connection beside your
  TERM connection TERM-aware programs first try to fulfil their job
  using this network connection. When this fails TERM is invoked and it
  is tried to fulfil the job via the TERM connection. To make this more
  clear now an example is given in which TERM-aware telnet is used. This
  telnet should work both with and without TERM.

    telnet localhost

  does not use TERM to connect, but

    telnet zeus.cs.kun.nl

  will use TERM only if you do not have some other type of network
  connection.

  Full TERM networking also means to lie about the host name, and say it
  is the remote host instead.  Furthermore, it causes bind(0) to always
  act on the remote host.  In essence it makes many programs unusable
  when they are not going through TERM, while TERM is running.
  Unfortunately, most UDP programs and daemons will not work with TERM
  without these nasty tricks.

  4.3.  Build TERM

  When you are lucky, this should just involve a make. Most probably
  however, you need to do more. Due to new features in newer versions of
  TERM it is now a bit more complicated to create your TERM binary. A
  couple of ways can be followed to obtain your binary.

  To cover all these ways TERM can be built this section will be split
  into three parts:

  1. Build TERM, versions 2.0.0 and higher

  2. Build TERM, versions 1.16 up to 1.19

  3. Build TERM up to version 1.15

  4.3.1.  Build TERM, versions 2.0.0 and higher

  First, make sure you have read the section about 'full TERM
  networking' above.

  For TERM versions 2.0.0 and higher there are many ways to build the
  TERM binary and the clients. All of these can be done both by root and
  by ordinary user:

  1. Build TERM in private mode without full TERM networking

  2. Build TERM in private mode with full TERM networking

  3. Build TERM in shared mode without full TERM networking

  4. Build TERM in shared mode with full TERM networking

  In these versions of TERM a new way for compilation has entered TERM
  using the script configure. When configure is run it checks on what
  operating system you are trying to install TERM, whether the source
  directory is available or not, and if any runtime options are set.
  According to the things found configure then creates a Makefile using
  Makefile.in which is provided in the TERM package.

  Two of the more important options to configure are --root and --user
  which state whether TERM will be installed by root or an ordinary
  user. Other options can be used to install TERM the way you want (non-
  standard paths for example).

  1. Build TERM in private mode without full TERM networking.

     To build TERM in this way you need to execute the following
     commands (both for root and ordinary user):

       ./configure --root  OR --user
       make install installman

  This builds the binaries and installs these binaries and the manual
  pages.

  2. Build TERM in private mode with full TERM networking.

     To build TERM in this way you need to execute the following
     commands (both for root and ordinary user):

       ./configure --root  OR --user
       make installnet installman

  This builds the binaries and installs these binaries and the manual
  pages.

  3. Build TERM in shared mode without full TERM networking.

     To build TERM in this way you need to execute the following
     commands (both for root and ordinary user):

       ./configure --root  OR --user
       make share installman

  This builds the binaries and installs these binaries and the manual
  pages.

  4. Build TERM in shared mode with full TERM networking.

     To build TERM in this way you need to execute the following
     commands (both for root and ordinary user):

       ./configure --root  OR --user
       make share installnet installman

  This builds the binaries and installs these binaries and the manual
  pages.

  4.3.2.  Build TERM, versions 1.16 up to 1.19

  To build these versions of TERM you can now choose one of the
  following ways:

  1. As an ordinary user, build TERM in private mode

  2. As an ordinary user, build TERM in shared mode

  3. As root, build TERM in private mode

  4. As root, build TERM in shared mode

  Below, it will be explained how to enable/disable shared features
  during the compilation of TERM.

  1. You are an ordinary user (no root access) and you do NOT want to
     SHARE the TERM connection with other users.

     As a user who does not want to share the TERM connection with other
     users you should do the following to build TERM:

       make DO=install OS-type
       make installman

  After this TERM, its clients and the manual pages are built and
  installed.

  Furthermore, you need to create a directory '$HOME/.term'. This is the
  directory in which TERM will look for its 'termrc' file.

  2. You are an ordinary user (no root access) and you want to SHARE the
     TERM connection with other users.
     As a user who wants to share the TERM connection you should do the
     following:

       make DO=installshare USERSHARE=$HOME/term OS-type
       make installman

  After this TERM, its clients and the manual pages are built and
  installed.

  Furthermore, you will have a directory '$HOME/term' (default) with
  permissions 'drwxrwxr-x'. In this directory you will find at least the
  socket used by TERM for its connection ('tmp/private/socket=').

  3. You are root and you do NOT want to SHARE the TERM connection with
     other users.

     As root who does not want the TERM connection to be shareable you
     should do the following to build TERM:

       make DO=install OS-type
       make installman

  After this TERM, its clients and the manual pages are built and
  installed.

  Furthermore, you now have a directory called '/usr/local/lib/term'
  (default) with permissions 'drwxr-xr-x'. In this directory you will at
  least find the socket used by TERM for its connection
  ('tmp/private/socket=').

  4. You are root and want to SHARE the TERM connection.

     First, make sure you have read the section about 'sharing' above.

     As root who wants to share the TERM connection you should do the
     following:

       make DO=installshare OS-type
       make installman

  After this TERM, its clients and the manual pages are built and
  installed.

  Furthermore, you now have a directory called '/usr/local/lib/term'
  (default) owned by group TERM and with permissions 'drwxrwxr-x'. In
  this directory you will at least find the socket used by TERM for its
  connection ('tmp/private/socket=').

  4.3.3.  Build TERM up to version 1.15

  For these versions of TERM building should invoke no more than the
  commands

    make DO=install OS-type
    make installman

  You will find TERM, its clients and the manual pages nicely built and
  installed and ready for use after this.

  Furthermore, you need to create a directory '$HOME/term'. This
  directory TERM will use to look for its termrc file.

  The only thing you may want to do is change some of the paths in the
  Makefile or change some of the compiler flags.

  4.4.  client.a, libtermnet.a, libtermnet.sa, libtermnet.so

  With TERM a library with functions for TERM clients is provided.

  Up to version 1.16 this library was called client.a. During
  compilation of TERM this library was built and then used during the
  compilation of the TERM clients. It was not installed in another
  directory.

  Starting with version 1.16 the name of the library is changed to
  libtermnet.a. Up to version 1.19 this library is created in the TERM
  directory and then used during compilation of the TERM clients. It is
  not installed in another directory.

  Starting with version 2.0.0, beside libtermnet.a also libtermnet.so
  and libtermnet.sa (shared library and exported initialized library
  data) are created during compilation of the TERM package. During the
  installation of all the parts of the package also these three library
  files are installed in the directory '/usr/local/lib' (default). Then
  a link is made from libtermnet.so.2 to libtermnet.so.2.x.x. Finally,
  ldconfig is run to create the necessary links and cache (for use by
  the run-time linker, ld.so) to the most recent shared libraries found
  in the directories specified on the command line, in the file
  '/etc/ld.so.conf', and in the trusted directories ('/usr/lib' and
  '/lib'). If the installation is done correctly the three library files
  can now be used by TERM clients which are built with dynamic instead
  of static libraries. Also, these libraries can now be used to port
  your own software to make it TERM aware (see belo!  w).

  4.5.  Setting environment variables

  TERM knows a couple of environment variables which can be set by
  users. The first three of those that I will explain are

    TERMDIR

    TERMSHARE

    TERMMODE

  By setting these variables you can control the way TERM is run.

  For TERM versions up to 1.15 only the variable TERMDIR is important
  (these versions do not know the shared mode). For these versions
  TERMDIR should be set as follows:

    setenv TERMDIR $HOME     (csh or tcsh)
    export TERMDIR=$HOME     (bash)

  Starting with version 1.16 TERM also knows the variables TERMSHARE and
  TERMMODE. With these variables TERM can be told to run in private mode
  or in shared mode. I will explain how to set the variables for private
  mode and shared mode.

  TERMMODE knows the following three values;

    0 = private

    1 = system shared

    2 = user shared

  1. Running TERM in private mode can be done setting the variables
     TERMDIR and TERMMODE in the following way:

     For csh or tcsh

       setenv TERMDIR $HOME
       setenv TERMMODE 0

  For bash

    export TERMDIR=$HOME
    export TERMMODE=0

  2. When you want to use TERM in shared mode there are two ways of
     setting the variables:

     a. When TERM is installed as a SUID program only TERMMODE has to be
        set.

          setenv TERMMODE 2    (csh or tcsh)
          export TERMMODE=2    (bash)

     b. When TERM is installed as a SGID program the variables have to
        be set in the following way:

        For csh or tcsh

          setenv TERMMODE 1
          setenv TERMDIR /usr/local/lib/term
          setenv TERMSHARE $TERMDIR

     For bash

       export TERMMODE=1
       export TERMDIR=/usr/local/lib/term
       export TERMSHARE=$TERMDIR

     Setting the variables in this way makes it possible to start old
     clients (clients linked to an older version of client.a) in shared
     mode.

  Starting with version 2.0.0 TERM also knows the variable TERMSERVER.
  You need to set this variable when you have multiple modems and you
  have more than one connection at a time. To specify which connection
  to use, you must start TERM with a server name:

    nohup term -v /dev/modem1 Connection1 &
    nohup term -v /dev/modem2 Connection2 &

  Users should then set the variable TERMSERVER to the connection name
  they want to use:

    setenv TERMSERVER Connection1   (csh or tcsh)
    export TERMSERVER=Connection2   (bash)

  4.6.  Test TERM

  Do a make test (or make termtest for newer versions of TERM) to build
  TERM's test daemon. (term)test works by running two copies of TERM on
  your system, a should now be able to do a trsh and a tupload (try

    tupload ./term /usr/tmp

  - you should get a copy of the TERM binary in '/usr/tmp'). The local
  TERM's output should show up in 'local.log', the remote's one in
  'remote.log'. You can start TERM up with a -d255 flag to enable
  debugging output to be written to these files, or enable debugging in
  your 'termrc' file.

  NOTE: Run test as ./test  so as to avoid your system's test.

  4.7.  TERM and communication programs

  Before you can use TERM you must have established a connection via the
  modem using a communication program like kermit or seyon. In the
  documentation of your communication program you can find what you need
  to do to establish the conection with the remote machine.

  when you have established the connection with the remote machine and
  you want to run TERM you need to suspend or quit your communication
  program without closing the connection with the remote machine. This
  needs to be done as otherwise the communication program will steal
  characters from linecheck or TERM.

  Below for some communication programs I will explain how you can make
  sure that the connection will stay alive and the communication
  programs will not steal characters from linechech or TERM.

  4.7.1.  Kermit

  Starting TERM when you use kermit is easy. At the local kermit prompt
  you type suspend. Now you see back your Linux prompt. From this prompt
  you can establish your TERM conection.

  4.7.2.  Seyon

  An easy way to start linecheck or TERM when you are using seyon is to
  put linecheck and TERM in the Transfer Menu (controlled by the file
  '$HOME/.seyon/protocols').

  In the file '$HOME/.seyon/protocols' add:

    "Line check" "$cd /tmp; linecheck"
    "Term" "$term -c off -w 10 -t 150 -s 38400 -l $HOME/tlog"

  Then, when you want to execute linecheck or TERM on the local machine,
  you can select the Transfer Menu, either the "Line check" or the
  "Term" item, and Go.

  Of course, you can also use the shell command button, and type
  'linecheck' or 'term' in the pop-up dialog box. This also does
  automatic redirection of input and output.

  4.8.  Make a Transparent Link

  Presumably, you can establish a modem connection between your local
  and remote hosts. Typically, you are dialling into some kind of
  terminal server and connecting to your remote host from there. You are
  also using some kind of terminal software, such as kermit or seyon to
  talk to your modem (the examples in this document will use kermit,
  since that is what its author uses). If you are having trouble with
  your modem, or your terminal software, take a look at the Serial-
  HOWTO; that should help you out.

  Having established your link, you want to make it as transparent as
  possible.  Check the commands on the terminal server (help or ? will
  usually get you started). Go for the 8 bit options whenever possible.
  This may mean changing the way you log in to a system, e.g. if the
  server uses rlogin, you may have to use it and give it the -8 flag to
  make it transparent.  Especially watch out for xon/xoff flow control.
  You do not want that. Try to enable rts/cts (hardware) flow control.
  You may need to check your modem documentation to learn how to
  configure it to do 8-bit rts/cts communications.

  4.9.  Run linecheck

  WARNING: In some of the documents the command line options for
  linecheck are mentioned in an incorrect order. I have checked this and
  found the order of options mentioned below to be the correct ones.

  NOTE: Starting with TERM version 2.3.0 linecheck no longer needs to
  have the name of a log-file on its command line. It will write its
  output to the file 'linecheck.log' in the directory you start
  linecheck in.
  Linecheck is a program that is supplied with TERM.  It checks the
  transparency of a link, providing configuration information that TERM
  needs to run correctly.  linecheck will send each of the 256 possible
  eight bit characters over the link and verify that each was
  transmitted successfully. TERM needs to be configured to deal with
  characters that cannot be transmitted over the link, and linecheck
  determines what characters these are. You use linecheck after you have
  established as transparent a modem link as possible. To run linecheck,
  do the following

  1. On the remote system run

       linecheck linecheck.log

  2. Escape back to your local system and suspend your communication
     program (see above)

  3. On the local system run

       linecheck linecheck.log > /dev/modem < /dev/modem

  When linecheck is done, you will find a set of numbers at the bottom
  of the 'linecheck.log' files. These should be escaped in the termrc at
  the other end of the link. For example, in my system my local
  'linecheck.log' said nothing and my remote 'linecheck.log' said to
  escape 29 and 157.  Therefore, my local I have to also ignore it at
  the other; so, in this example, I shall have to ignore 29 and 157 in
  my remote system.

  If linecheck hangs, try using

    linecheck linecheck.log 17 19

  on the remote system and

    linecheck linecheck.log 17 19 > /dev/modem < /dev/modem

  on the local system. This will escape your xon/xoff (flow control)
  characters, which will hang your line if you have got software flow
  control. If this solves the hanging problems, you will want to escape
  /ignore 17/19 in both 'termrc's'. If your terminal server has other
  characters that will shut it down, try running linecheck with those
  characters escaped, as above. You can spot these characters if
  linecheck hangs. If this is the case, kill it, then look in the log-
  files. The last characters transmitted are likely to be the culprits.
  Try it again with these characters escaped.

  In summary, my local termrc has the lines

    escape 29
    escape 157

  and my remote termrc has the lines

    ignore 29
    ignore 157

  since my remote 'linecheck.log' said to escape 29 and 157.

  4.10.  Try Running TERM

  Log into the remote system, making the link as transparent as possible
  (if you have not already done so).  Fire up TERM at the remote end.  I
  use the following:

    exec term -r -l $HOME/tlog -s 38400 -c off -w 10 -t 150.

  Let us run down each option one by one (note that I could just as
  easily have put these options in my termrc. I did it this way because
  it saves editing a file while getting TERM set up).

  exec means to destroy your current shell, running the given program in
  its place. I exec things because I do not intend to use my login shell
  again; so it is just wasting memory. If you are debugging the link and
  can reliably kill the remote TERM, you might not want to do an exec.

  The -r option is needed at exactly one end. TERM will then see this
  end as the remote end of the connection (Note that TERM's remote end
  can thus be your local machine). If you do not use this option at one
  end TERM clients will spontaneously crash.

  -l $HOME/tlog. This logs errors to the file tlog in my home directory.
  Very useful for debugging. No reason not to do this.

  -s 38400 : I have got a 14400 baud modem, with compression.  For
  optimal compression ratios, I want to be able to push bits down the
  pipe as fast as possible. For a slower modem, you should use something
  lower. Note that if you have a slower machine with 16450 uart on your
  serial port, high baud rates can cause data loss by overloading the
  chip on your serial port. TERM will recover from this, but if you see
  a lot of error messages in your log file, (or get overrun warnings
  from linux kernel versions 0.99pl15 and up) you again might want to
  lower this number.

  -c off : This turns data compression off. I have got a compressing
  modem, and I do not want to compress things twice.

  -w 10 -t 150 : Again, these are options to optimize my fast modem
  link. I have set my window to 10 and my timeout to 150. This is
  according to the recommendation in the term_setup man page.

  Escape back to your local machine and suspend your communication
  program (see above). You do not want it running while TERM is running,
  because it will fight with TERM over the serial port. If you can
  convince your modem to not hang up when you exit your communication
  program (when it toggles DTR), you could just exit the program at this
  point.

  Now run TERM locally. I use:

    term -c off -l $HOME/tlog -s 38400 -w 10 -t 150 < /dev/modem > /dev/modem &

  I need to tell TERM where the modem is; so I point both standard input
  and output at '/dev/modem' (that is what the < and > do). I also run
  it in the background; so I can use this screen for something else if I
  want to.

  TERM should work now :-). Try a trsh, and see what happens. If you
  hang, or your link seems slow, take a look at your 'tlog' at each end.
  Are you getting timeouts or error messages? If so, then you have
  configured something incorrectly. Try again (after you have finished
  reading this :-). Note that the connection will not seem blazingly
  fast, especially if you are using compression - it will be a little
  jumpy. The real speed comes in during file transfer and the like.

  4.11.  Terminate your TERM connection

  Most certainly, after you have done a lot of work using TERM, you want
  to finish your work and bring your TERM connection down. For this to
  be realized there are four ways:

  1. Kill the TERM programs at both sides of the connection. This is the
     least recommended way of terminating your connection.

  2. A better way is to execute the following command locally:

       echo '00000' > /dev/modem

  This will nicely terminate your TERM connection. It will work for all
  version of TERM. Make sure that the sequence of zeros contains at
  least five zeros.

  3. In the termrc of TERM versions 2.0.0 and higher you can now enter a
     statement called terminate '<some string>'. This sets a string that
     will cause TERM to exit ('00000' by default). It must be at least
     five characters long, to avoid accidently terminations.

  4. Starting with version 1.14 there is the program tshutdown (actually
     for version 1.14 it is available as a patch, for newer versions it
     is in the package). Executing tshutdown nicely terminates your TERM
     connection.

  4.12.  Removing TERM from your partition

  Ok, you asked for this. As some of you want to get rid of TERM I here
  present you the steps to be done in removing TERM. In the process of
  removing TERM you have to fulfil the following steps:

    Removing directories with their contents. Depending on how you
     installed TERM, one or more of the following directorieswill exist
     on your machine:

       $HOME/.term/termrc
       $HOME/.term/termrc.<server>
       $HOME/term/termrc
       $HOME/term/termrc.<server>
       /usr/local/lib/term/termrc
       /usr/local/lib/term/termrc.<server>
       /etc/termrc
       /etc/termrc.<server>

  These directories can be removed together with their contents. Use
  '/bin/rm -rf' to get this done.

    The group 'term'. For some of the ways of installation you had to
     create a group 'term'. Check the file '/etc/group' for the 'term'
     entry. When it exists you can remove the entry.

    The TERM-package and TERM-aware executables. This is probably the
     hardest part in removing TERM. For the executables coming with the
     TERM-package you have to look in the directory '/usr/local/bin' or
     the directory '$HOME/bin'.

     With executables you made TERM-aware yourself I cannot help you.
     You need to know what executables you made TERM-aware in order to
     know what executables you have to remove. Do not forget
     configuration, default and other files coming with some of these
     executables.

    Library files. To remove these you best can execute the following
     commands:

       cd /
       find . -name libtermnet* -exec /bin/rm {}

  This will find and remove the library files.

    Include file. Also for this one the easiest way is to execute the
     following two commands:

       cd /
       find . -name termnet.h -exec /bin/rm {}

  This will remove the include file.

    Manual pages. When you have installed the TERM manual pages you can
     now find them back in one of the following directories:

       /usr/local/man/man1
       /usr/local/man/cat1
       $HOME/man/man1
       $HOME/man/cat1

  At least you have to check for the following manual pages: term,
  term_clients, term_setup, tdownload, linecheck, trdate, trdated,
  termrc, termtest, tmon, tredir, trsh, tshutdown, tudpredir, tupload,
  txconnand finally tiptest.
    Temporary user directory. This is de directory '/usr/tmp/private'
     and its contents.

  After this exercise you can be quite sure that you have removed
  everything related to TERM.

  4.13.  Optimizing your connection

  Once you have got TERM running, you might want to try to get things
  optimized. A good way to measure the speed of your link is to run tmon
  in one window while up/downloading a file in another. Try both (big)
  text files and compressed files; the plain text should go a factor of
  two-ish faster than the compressed files.  The parameters you want to
  fiddle with are baud rate (-s), compression (-c), windows (-w),
  timeout (-t) and retrain (-A).

  Watch out with the retrain parameter. With TERM version 1.19 I got a
  performance decrease of 80% to 90% compared to running TERM without
  the retrain parameter. It is not clear if this is a bug in TERM
  version 1.19 and if this problem exists only with TERM version 1.19.

  Baudrate: the maximum number of bits per second TERM will try to send
  over the serial link. TERM will avoid sending characters at a higher
  data rate than this. The default is to use the speed of your
  computer's serial port, but be warned that this may be too high if
  your modem runs at a lower rate over the phone line. The baud rate
  option is intended for systems that buffer output to the modem. During
  setup and tuning it is better to use a small baud rate rather than one
  which is too large. For high speed links (> 38400), making it
  unlimited is probably advantageous. This is achieved by using the
  value 'off'. TERM will then rely solely on your kernel to do flow
  control.

  Compression: you want this on if you do not have a compressing modem.
  If you do have such a modem, turn compression off, otherwise you will
  be compressing things twice, which typically increases the amount of
  data transmitted. Compressing modems are those that use the MNP-5 or
  V42.bis protocols. Check your modem documentation and the message when
  your modem connects.

  Windows: this is the number of chunks of data, or packets, that TERM
  will let go over the line before it gets an acknowledgment (or ack)
  from the remote TERM. For fast modems, increasing this can be a win;
  for slower links this can overwhelm the remote end.

  Timeout: the time TERM will wait for an ack. If you have increased
  windows, and you are getting timeouts in your log-file, try increasing
  this.

  For 14400/V42.bis, I use -c off -w 10 -t 150. I get around 1700 cps on
  compressed files and 3500 cps on ASCII files using tupload.

  4.14.  Troubleshooting

  In this section some thoughts are given about what to check when you
  have problems executing TERM or one of its clients.

    Did you clean up the TERM directory structure? With newer versions
     of TERM the structure of the directory tree under
     '/usr/local/lib/term' has changed a couple of times. If you are not
     aware of this, it can cause all kinds of error messages. The best
     thing to do is to delete the directory tree under
     '/usr/local/lib/term' (save your 'termrc') and then install your
     new TERM version. This way, you avoid the struggle with a messed up
     directory tree.

    Did you remove old sockets? When you update your TERM version
     remove all the sockets (called 'socket=') created by TERM. No doing
     this can cause strange problems. To find out what socket TERM is
     listening to you can use the "netstat" program.

    TERM does not compile correct on sunOS 4.1.3? You have configured
     TERM with './configure --user'. During compilation you are getting
     a assembler error on a unknown '-k' flag. The reason of this error
     is unknown. The solution to this error is to configure TERM with
     static libraries. So, you have to do './configure --user --static'
     and then continue with the compilation process the way you normally
     do. Now TERM should compile correct.

    termtest is presenting you the error: 'Term: failed to connect to
     term socket '/root/.term/sockettest''? When termtest runs it
     expects the executable 'term' to be in the same directory as
     termtest. When you do a 'make install' prior to running termtest,
     the TERM binary is moved to '/usr/local/bin' (or some other bin
     directory).

     The workaround for this is to link the binary to the source
     directory:

       ln -s /usr/local/bin/term /usr/src/term-<version_number>/term

    Are you running the right binary? TERM has been updated quite a
     lot, and many systems have different versions of the programs
     floating around. Make sure you are using the right version. Note
     that this applies to linecheck too. You can use bash's type -a or
     the whereis command to find which program is being run.  TERM
     versions after 1.11 should print out their version number when they
     start up.  (Although version 1.14 claims to be 1.12.  Sigh.)

    Do you have the right 'termrc' in the right place? Depending on the
     version of TERM you are running and the way you installed TERM
     (being root or user) this file has to be in one of the following
     directories:

       $HOME/.term/termrc
       $HOME/.term/termrc.<server>
       $HOME/term/termrc
       $HOME/term/termrc.<server>
       /usr/local/lib/term/termrc
       /usr/local/lib/term/termrc.<server>
       /etc/termrc
       /etc/termrc.<server>

  Some systems have pre-installed 'termrc' files; make sure they are
  gone before you set things up. If you are running things as root,
  lookout for '/.term'. TERM creates files (sockets actually) while it
  is running; so it has its own directory, (note, there is no leading
  dot in 'termrc'!).

    Does TERM find its 'termrc' file? when you start up TERM at both
     sides, you should see messages like the one below:
       Term version: 2.2.9
       Reading file:  /usr/local/lib/term/termrc
       Using shared mode.

  When the second line is missing TERM cannot find its 'termrc' file and
  you know that something is gone wrong during the installation (unless
  you are not using a 'termrc' file and enter all the options to the
  command line :-). Check the place and the permissions of the 'termrc'
  file on the site TERM cannot find its 'termrc' file.

    Do the entries in the 'termrc' file have the correct syntax and
     spelling? A known problem is that people who need to escape and
     ignore several characters enter them like this in the 'termrc'
     file:

       escape 1,4,30,255
       ignore 1,4,30,255

  Although TERM does NOT like this it will not complain. It only escapes
  or ignores the first character presented to the escape or ignore
  statement. The others characters are silently handled as not being
  there.

  When you have to escape or ignore several characters you have to put
  them on separate lines in your 'termrc' file, each line starting with
  the keyword escape or ignore. Only when you have to escape or ignore a
  range of characters you can do it the following way:

    escape 16-19      # escape characters 16, 17, 18, 19
    escape 23         # 23
    escpae 255        # and 255
    ignore 16-19      # ignore characters 16, 17, 18, 19
    ignore 23         # 23
    ignore 255        # and 255

    Is you 'term' or '.term' directory mounted with NFS? If your 'term'
     or '.term' directory is mounted with NFS you need to set the flag
     -DTERM_NFS_DIR in the CFLAGS line of the Makefile. Alas, for the
     author this flag causes a compile error when TERM 1.19 is compiled
     on a machine running sunOS 4.*.

    Are all files and directories owned by the correct user and group
     and do they have the correct permissions? This should be no
     problems as these permissions are set during the installation
     phase. However, when you port your own programs to TERM you must be
     aware of this. Also when you change the mode TERM is working in
     (i.e. from private mode to shared mode) file and directory
     ownerships and permissions have to be adapted.

    You are getting the error gethostbyname: <hostname>: Non-
     authoritative `host not found', or, server failed

     To solve this you have to check the following things:

     1. Is the file '/etc/hosts' configured correctly? <hostname> is not
        the name of your host (old SLS releases and some old and new
        Slackware releases are shipped with hostname 'darkstar' for
        example). Change this in this file. It must at least contain a
        line like below (the format is described above it):

          # Local Hosts Format:
          #  IP_NUMBER            HOSTNAME        ALIASES
          #
          # Here is the name of your host, first, followed by any aliases
          127.0.0.1       localhost       linuxpc.domain  linuxpc

     When your only connection to the outside world is by TERM the line
     above is the only one that may appear in the file '/etc/hosts'. Do
     not put actual addresses of frequently visited destinations in
     '/etc/hosts'. TERM does not like these to be in '/etc/hosts' and it
     will hang on them.

     2. Are your '/etc/rc*' and '/etc/resolv.conf' files world readable
        (chmod ugo+r)?

     3. Last, make sure that you have installed the TCP/IP loopback-
        interface on your machine. You can check for loopback by running
        the command 'ifconfig'. When you have installed the loopback-
        interface you will at least get something like:

          lo        Link encap:Local Loopback
                    inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.255.255.0
                    UP BROADCAST LOOPBACK RUNNING  MTU:2000  Metric:1
                    RX packets:0 errors:0 dropped:0 overruns:0
                    TX packets:4984 errors:0 dropped:0 overruns:0

     on your screen. During boot time you can furthemore check which
     protocols are in use. On my machine a line like the one below then
     appears:

       IP Protocols: ICMP, UDP, TCP

     For the installation of TCP/IP and the loopback-interface, please
     read to the NET-HOWTO.

    You are getting all kinds of 'timed out' messages in your TERM log
     files?  This means that your TERM connection is not optimized. A
     small number of these messages every now and then is not a problem.
     These are most certainly due to temporal factors influencing the
     physical connection between your local and remote hosts.

     When you get a lot of these messages all the time your connection
     will slow down considerably. You have to fiddle with the parameters
     mentioned in the section 'Optimizing your connection' above. Alas,
     this part of the installation is a process of trial and error. No
     hard rules can be given about the numbers to be presented to the
     various parameters as many factors have an influence on the
     connection. These factors differ between the connections and even
     in time.

    Normal FTP with redirected ports does not work for you? Alas, it is
     a known problem that redirection of the ports needed by FTP (20 and
     21) does not give you a working FTP. The only solution is to get a
     TERM-aware ftp or ncftp version. Alas, also some TERM-aware ftp
     versions seem not to work.

  5.  TERM clients

  TERM provides several default clients. They include trsh, tmon,
  tupload, tredir, txconn and in newer versions trdate, trdated.
  Furthermore, starting with version 2.0.0 tudpredir is available and
  from version 2.1.0 tdownload is available. This section will deal with
  trsh, tmon, tupload, tdownload, trdate and trdated.  The others each
  have their own section.  No TERM client will work until you have
  established a TERM link.

  tmon is a simple utility to monitor the statistics of your link.  It
  prints a time histogram of characters transmitted and received. It is
  invoked simply as tmon. Since around version 1.11, tmon has had a bug
  that causes some information to be garbled (??).

  trsh is similar to rsh. Without arguments, it spawns an interactive
  shell on the remote system (i.e. it logs you in). trsh is one of the
  primary means of accessing the remote end of the link via TERM. If
  given an argument, trsh executes that argument as a command on the
  remote system. For example

    trsh ls

  would give you a listing of the files in your home directory on the
  remote system.

  tupload will transfer a file, given as its first argument, from local
  to remote. By default, the files will be put in the same directory
  that you invoked TERM from at the other side. To put files in another
  directory, give their names as a second argument to tupload. For
  example, if I want to put a copy of the file 'term114.tar.gz' in
  '/usr/tmp' on the remote system, I would type

    tupload term114.tar.gz /usr/tmp

  When you use tupload you can use wild cards like in 'tupload a.*'. The
  shell expands the wild card and tupload is called as 'tupload a.1 a.2
  ......'.

  tdownload will transfer a file, given as its first argument, from
  remote to local. By default, the files will be put in the same
  directory that you invoked TERM from at the local side. To put files
  in another directory, give their names as a second argument to
  tdownload. For example, if I want to put a copy of the file
  'term114.tar.gz' in '/usr/tmp' on the local system, I would type

    tdownload term114.tar.gz /usr/tmp

  When you use tdownload you cannot use wild cards like in 'tdownload
  a.*'. Reason for this is that the remote directory is not available to
  your local shell when you use tdownload; so your local shell cannot
  expand the wild cards.

  trdate is a time setting utility. It reads the time on the remote
  machine and sets the local clock to the remote time. It must be run as
  root.
  trdated is the daemon version of trdate. When it is started in
  'rc.local' it is run as daemon in which case it updates the time every
  5 minutes (default). Even when there is no TERM connection, this
  daemon will start up when set in the rc.local. Once a TERM connection
  is created it starts updating the time.

  6.  X and TERM

  TERM allows users to open up X windows on the local machine from
  clients that are running on a machine on the network. This is done by
  using the txconn client. txconn is executed on the remote, network-
  connected machine; it is invoked simply as txconn. It goes into the
  background and returns a number on the standard output; this number is
  the display number that clients should use to access the X server on
  the local machine. An example should make this clear.  I am logged in,
  via trsh, to my remote TERM host, named foo. On foo, I do the
  following

    foo$ txconn
    Xconn bound to screen 10
    :10
    foo$

  Now, on any host that I wish to run an X client on, that is to display
  on my local machine's X server, I do

    setenv DISPLAY foo:10

  (for bash you should use export DISPLAY=foo:10). In some cases it can
  furthermore be necessary to do a

    xhost + foo

  or even a

    xhost +

  on your local machine. Now when I start the client, it will try to
  connect to screen 10 on machine foo, but txconn is listening to this
  screen, and will forward all X protocol packets via TERM to the X
  server on the local host - i.e. the window will open up on your local
  machine.

  It is possible to go the other way - run a client on your local
  machine and have it open up a window on a remote machine on the
  network; however we will defer explaining this until after we have
  discussed tredir.

  The X protocol is not very efficient; it wastes some bandwidth. This
  is usually not a problem over an ethernet, but can be murder over a
  modem. X11R6 is supposed to introduce a low bandwidth version of the X
  protocol, LBX. If however you are using X11R5 you can use a utility
  named sxpc which compresses the X protocol, improving response over
  serial lines. Sxpc includes a write-up on how to get it working with
  TERM, and is recommended. The sxpc package also explains how to use
  xauth; so it is doubly recommended.

  7.  tredir

  tredir is one of TERM's most powerful utilities, allowing most
  important network services to be performed over a TERM link. Before we
  explain how to use tredir, it is necessary to give some background on
  network services. We have talked about network services before, but we
  have not said exactly what they are. Services are just that - services
  that are provided by the network. Examples of services include telnet,
  which provides logins between machines, the File Transfer Protocol,
  ftp, which transfers files between machines, and smtp, the Simple Mail
  Transfer Protocol, which is used whenever you send electronic mail.
  Each network service has a port number associated with it.  The
  mapping of port numbers to services is given in the file internet-
  connected machines.

  How are these services invoked? Each networked machine runs a daemon
  called inetd, which listens for attempts to connect to the network
  ports. These requests can come from either the network or the local
  machine. A network service is obtained by connecting to a particular
  inetd port.  When a network request is made, inetd knows exactly which
  service is involved by the port number the request is made on. If
  inetd is configured to do so, it provides the relevant service to the
  requesting connection. inetd's configuration is given by the file
  '/etc/inetd.conf', which has a list of the services that inetd
  provides. For more information, see the man pages for inetd and
  inetd.conf.

  You can communicate directly with network services by using telnet
  (n.b. not termtelnet). For example, to talk to the sendmail, (or smtp)
  daemon on machine machine_name, you can do a telnet machine_name smtp,
  or telnet machine_name 25, (since 25 is the number assigned to smtp in
  '/etc/services'). You should get a polite greeting from the daemon on
  the remote machine. This is a very useful trick for debugging network
  problems and checking ports redirected with tredir (see below).

  Tredir works very much like inetd. It runs in the background as a
  daemon, listening to the network ports, waiting for a request. When a
  request for a service is made, instead of providing that service, as
  inetd does, tredir forwards the request over the TERM link to the
  remote TERM, which makes the request over the network, returning the
  result back over the link to the local client. Tredir can forward the
  request to any machine on the network, but by default sends it to the
  machine at the other end of the TERM link. Tredir redirects TCP
  (Transmission Control Protocol) network services over the TERM link.

  The common command format of tredir is:

    tredir [this_computer:]port [that_computer:]port

  An example should make this clear. Let us redirect a local port to the
  telnet port on the remote machine. To do this we would do

    tredir 2023 23

  Now, anyone who connects to port 2023 on the local machine will be
  redirected to port 23 (telnet) on the remote machine.  Here is an
  example session; the local machine is mymachine.modem.home and the
  remote machine is netsun.

    $ tredir 2023 23
    Redirecting 2023 to 23
    $ telnet localhost 2023
    Trying 127.0.0.1...
    Connected to mymachine.modem.home
    Escape character is '^]'.

    SunOS UNIX (netsun)
    login:

  This example is actually quite useful. If I were instead to do the
  tredir on netsun. I could then telnet in to mymachine from the network
  simply by connecting to the redirected port on the networked machine
  (using telnet) - i.e. telnet netsun 2023.

  The general principle in using tredir is to redirect the desired
  service to a machine on the network. Our next example will allow us to
  read news on the local machine over our TERM link from a news server
  on the network. News is provided by the nntp service, port number 119.
  All decent news readers allow you to specify what port number they
  will use, either via a configuration file or an environment variable.
  Let us specify this local port to be 2119. Now, let us say that our
  news server is news.domain.org. We will redirect port 2119 to port 119
  on news.domain.org; we will then tell our news reading software that
  the nntp server is located at port 2119 on the local host. Since this
  will depend on the news reader that you use, I will just test the link
  with telnet instead of firing up a news reader:

    $ tredir 2119 news.domain.org:119
    Redirecting 2119 to news.domain.org:119
    $ telnet localhost 2119
    Trying 127.0.0.1...
    Connected to mymachine.modem.home.
    Escape character is '^]'.
    200 news.domain.org InterNetNews NNRP server INN 1.4 07-Dec-41 ready
    (posting ok).

  If you can get this far, all you have to do is configure your news
  reader to be able to read news via TERM. (n.b., if you read news like
  this, be sure that in all your posts you set a Reply-To: header to an
  network email address that you can be reached at, otherwise people who
  want to get in touch with you will be sending mail to whatever (wrong)
  data your news reader puts in the From: header).

  7.1.  tredir can bite!

  The astute reader, after reading the last example will be wondering
  why port 2119 was redirected to port 119 - since news readers default
  to port 119, why could I not do a tredir 119 news.domain.org:119 and
  skip the news reader configuration? The answer is that all ports
  numbered less than 1024 are ``reserved ports'', and only the superuser
  can listen to them. If one is willing to take a security risk and make
  tredir an SUID program, or run tredir as root, then one can redirect
  reserved ports and avoid the hassle of renaming services.

  Another problem with using reserved ports is that inetd is often
  already listening to these ports, and only one program at a time can
  listen to a port. In order to use such a port, you must change port
  you want to redirect. This is most easily done by commenting out the
  line with the offending service by putting a # character at the
  beginning of the line. The superuser must then send inetd a HUP signal
  (kill -1 inetd-pid) to get it to reread its configuration.

  7.2.  Stupid tredir tricks

  In this section we will describe some of the more common uses for
  tredir. We have already described how to redirect nntp and telnet
  services; here we will give some more complicated examples.

  7.2.1.  X windows

  In a previous section, we described how to get an X client running on
  the network to open a window on your home machine using txconn. The
  same technique could be used on your home machine to display a client
  on the machine at the remote end of your TERM link.  But how does one
  display an X client on a network machine that is not the remote end?
  The answer lies in knowing that X uses a particular network service
  just like the other programs we have been discussing. An X server
  listens for a network request on a port whose number is given by the
  formula  port = 6000 + display number, e.g. an X server managing
  screen 0 on a machine would listen to port 6000, if it were managing
  screen 2, it would listen to port 6002.  When you set your DISPLAY
  environment variable to xmachine:n, your X clients will try to connect
  to port 6000 +n on xmachine.

  We can use this to trick X clients on your local machine to open up
  windows on remote displays. Let us say I want to open up an xterm,
  running on my local machine, on display 0 of machine xmachine, which
  is running some place on the network. I first pick a local display
  number, say 2 (do not use 0, since that is what your local X server
  will be using). I will map this display to display 0 on xmachine. In
  terms of ports, this means I want to redirect the local port 6002 to
  the remote port 6000.  I do the following

    $ tredir 6002 xmachine:6000
    $ setenv DISPLAY localhost:2
    $ xterm

  This should open up an xterm on machine xmachine.  Note that I set the
  DISPLAY to localhost:2. This is because X clients will sometimes use
  unix domain sockets instead of internet domain sockets, at their own
  option, when connecting to a local display, if DISPLAY is set to :2.
  localhost:2 says to use a TCP connection.

  Note that as far as xmachine is concerned, the X request is coming
  from the machine on the remote end of your TERM link (remotemachine) -
  so if you need to authorize the connection, you should either do an
  xhost + remotemachine on xmachine or use xauth to update the
  '.Xauthority' file on your local machine for display number 2, using
  the key from xmachine.

  Again, to speed up X connections, you can use the program sxpc, which
  includes an explanation of how to use tredir to establish the link and
  authorize it using xauth.

  7.2.2.  Mail with TERM

  Well, you asked for it. Electronic mail has the justifiable reputation
  of being one of the most difficult things to get working right on a
  UNIX system. To really get TERM working correctly with mail means that
  you have to understand how mail works, which is beyond the scope of
  this document. To learn more about mail, you should consult a book on
  UNIX system administration and/or the comp.mail.misc FAQ, available
  for anonymous ftp on rtfm.mit.edu:pub/usenet/comp.mail.misc. There are
  also currently two packages available for anonymous ftp on
  sunsite.unc.edu that will help you get mail running under TERM - they
  are term.mailerd+smail by Byron A. Jeff and the BCRMailHandlerXXX by
  Bill C. Riemers.

  That being said, we will give a thumbnail description of how mail
  works.  There are two parts to getting mail running, sending messages
  and receiving messages. We will begin with sending messages from your
  local box to the network.

  There are two classes of mail programs. The first is the mail user
  agent (MUA). MUA's help you read, compose and send messages. Examples
  of MUA's are elm, pine, Mail and vm.  MUA's do not really do any
  networking; they just put the messages together - the real work of
  sending mail is done by the second class of mail programs, the mail
  transfer agents (MTA's). These are invoked by the MUA's. They take the
  message, decide where to send it by looking at the address, and then
  actually deliver it over the network.

  The two most common MTA's on Linux systems are sendmail and smail. The
  basic idea is to get your MTA to connect to another MTA running on a
  machine on the net that will know what to do with your message. This
  is done by redirecting a local port to the smtp port on the net
  machine. You then have to tell you MTA to take any message it does not
  know what to do with, and send it out over the redirected port on your
  local machine to the MTA on the remote machine, which will then route
  your message to its correct destination.

  How do we do this using smail?  We first redirect a port to the smtp
  port on the network mail machine (mailhost):

  tredir XXXX mailhost:25

  here XXXX is the port number that the smail on the localhost will
  connect to (note that I have to give this port a name in my
  '/etc/services' to get smail to recognize it). Smail has several
  configuration files that usually live in '/usr/local/lib/smail'. The
  ones we care about are that I am assuming you have already got smail
  configured correctly for local mail - delivery to files and pipes and
  such things.  Again, consult the documentation if you have not.

  In the file 'config', we put the following definition:

    smart_path=localhost

  localhost is the machine that smail connects to when it does not know
  what to do with a message.

  In 'routers' we put

    smart_host:
    driver=smarthost,
    transport=termsmtp;
    path = localhost

  In 'transports' we put

    termsmtp:        driver=tcpsmtp,
          inet,
          return_path,
          remove_header="From",
          append_header="From: YOUR_NET_ADDRESS",
          -received,
          -max_addrs, -max_chars;
          service=YOUR_SMTP_SERVICE,

  In the above, the header lines change the From header in all your
  outgoing mail to the address, YOUR_NET_ADDRESS, which is the network
  address you want mail sent to. If more than one user is going to be
  using your TERM link, you will have to do something more fancy, like
  keep a database of local user's network addresses and insert these in
  the From: headers.

  The service line is the name of the local port number that you have
  redirected to the smtp port on the network connected machine. In my
  version of smail, I cannot just set this to a number, I have to set it
  to a name, like ``foo'', and then define ``foo'' in my '/etc/services'
  to be the number of my redirected port. If you use a SUID tredir and
  just redirect the smtp port (25), you do not need to define this.

  This should be enough to get you going. If you decide to use sendmail,
  the principles are the same but the details differ.  Ronald Florence
  (ron@mlfarm.com) told me that the stock Sun sendmail will not send
  multiple queued messages over a redirected port; BSD sendmail 8.6.9
  works fine.  He made the following changes to '/etc/sendmail.cf' to
  get it working with TERM. In his case, the default sendmail port (25)
  is used for SMTP traffic over a local ethernet so Internet mail is
  forwarded to a redirected TCP port.

    #
    #Create the termsmtp mailer, which sends mail via a re-directed TCP port
    #
    Mtermsmtp,P=[TCP], F=mDFMuCXe, S=22, R=22, A=TCP $h PORTNUMBER

  Here, PORTNUMBER is the number of the redirected port on the local
  machine. This should be an unused port over 2000. We next tell
  sendmail which machine to connect to, and set termsmtp as the default
  mailer.

    #
    # major relay mailer
    #
    DMtermsmtp
    #
    # major relay host: use the $M mailer to send mail to other domains
    #
    DR HOSTNAME
    CR HOSTNAME

  Here HOSTNAME is the name of your local host (does localhost work?).
  The last entry goes under Rule 0 to forward Internet mail.

    # Pass other valid names up the ladder to our forwarder
    R$*<@$*.$+>$*         $#$M    $@$R $:$1<@$2.$3>$4     user@any.domain

  When the TERM connection is established to the Internet host, run the
  following commands on the local machine.

    tredir PORTNUMBER internet.host:25
    /usr/lib/sendmail -q

  We now turn to receiving electronic mail using TERM. We will assume
  that mail is sent to your account on the network machine mailhost. The
  simplest solution is to just use trsh or termtelnet to log on to
  mailhost and read your mail on there. However, it is also possible to
  have your mail automatically downloaded to your local machine. One way
  to do this is to use the Post Office Protocol, (POP). POP was designed
  for exactly this purpose: to deliver mail to machines that have
  intermittent network connections. To use POP, you must have a POP
  server installed on mailhost. Assuming that you do, you can then use a
  POP client to download your mail every few minutes. This is done, as
  you might expect, using tredir. The POP service is 110 (note that
  there is an older protocol, POP-2, which uses port 109; in this
  document we describe POP-3, which is the latest version of POP). There
  are several POP clients available. One, written in the script language
  perl is pop-perl-1.X, written by William Perry and maintained by
  myself - it can be found on sunsite.unc.edu:pub/Linux/system/Mail.

  To use POP, you redirect a local port to port 110 on mailhost and
  configure your client to retrieve your mail from localhost using the
  local port. As an example, we will assume that there is a POP server
  running on mailhost. We will redirect the local port 2110, and fire up
  the pop-perl client:

    $ tredir 2110 mailhost:110
    Redirecting 2110 to mailhost:110
    $ pop
    Username: bill
    Password: <enter your password for mailhost>
    Pop Host: name of local
    Pop Port: 2110
    Starting popmail daemon for bill

  If you do not have a POP server available, the BCRMailHandler package
  has a program to download your mail over a TERM link to your local
  machine. I have not used it, but anyone who has is welcome to comment.
  You can also use the term.mailerd+smail package for this purpose.
  Alas, both BCRMailHandler and the term.mailerd.smail package do not
  work anymore with TERM versions 2.0.0 and higher.

  8.  tudpredir

  tudpredir is similar to tredir when you look at what these programs do
  and how they are executed. The big difference between the two programs
  is that tredir is used to redirect TCP network services while
  tudpredir redirects UDP (User Datagram Protocol) network services over
  the TERM link. One more important difference between the two programs
  is that tredir becomes a background daemon once it has successfully
  established the local port, while tudpredir commands must be placed in
  the background manually.

  The common command format of tudpredir is:

    tudpredir [this_computer:]port [that_computer:]port

  9.  Automating Things

  Now that you know how to get all your network services over TERM, it
  would be nice to set things up in such a way that your link is set up
  and configured automatically. There are basically an infinite number
  of ways of doing so, depending on what communication program you use
  and how you log in to your remote system.

  One program that I have not used, but I have heard is quite nice, is
  fet: a front end for TERM. It is designed to log you into a remote
  system and fire up TERM and all your tredir's.  Any comments on fet
  would be most welcome.

  I shall now give an example of a set of commands that use kermit to
  log into the remote system and then performs all of the TERM
  initializations. Obviously, if you use these examples, you will have
  to modify them for your own login procedures.

  The command which is actually invoked is the shell script 'knet',
  given by:

    #!/bin/sh
    /usr/bin/kermit -y $HOME/.kerm_term > $HOME/klog < /dev/null 2>& 1
    exec $HOME/bin/tstart >> $HOME/klog 2>& 1

  The script '.kerm_term' is given by:

    pause 2
    # The number you want to dial
    output atdtXXXXXXX \13
    # Login to the terminal server
    input 145 {name: }
    output MYNAME \13
    input 3 {word: }
    output MYPASSWORD \13
    input 5 {xyplex>}
    # Make the line transparent
    output term telnet-t \13
    output term stopb 1 \13
    # Connect to the remote host
    output telnet remotehost.somedomain.org \13
    input 10 {ogin: }
    output MYOTHERNAME \13
    input 3 word:
    output MYOTHERPASSWORD \13
    pause 5
    # Fire up term on the remote host
    output exec term -s 38400 -l $HOME/tlog -w 10 -t 150  \13
    ! /usr/bin/term -r -l $HOME/tlog -s 38400 -c off -w 10 -t 150 < /dev/modem  > /dev/modem &
    # Open other clients here
    suspend
    !killall -KILL term

  and finally, the script 'tstart' which fires up the TERM clients is
  given by

    #!/bin/sh
    #
    # This lets mail get out, can read news here, can pick up my mail here
    #
    /usr/local/bin/tredir 2025 25 2119 newshost:119 2110 pophost:110
    #
    # So I can open up Xwindows here
    #
    /usr/local/bin/trsh -s txconn
    #
    # So I will receive mail....
    #
    /usr/local/bin/pop
    #
    # Clean out the queue, in case of boo-boos
    #
    /usr/bin/runq
    #
    # Done now
    #
    echo ^G^G > /dev/console

  When finally you want to close the connection, you resume and
  terminate kermit. The last line of the script kills the local TERM and
  returns the system in its initial state.

  ( Note of the author: instead of doing '!killall -KILL term', I think
  it should be possible just to do '!tshutdown'. This should also work?)

  As I said, there are zillions of ways to do so; these are just meant
  as examples to get you started. Other examples can be found in the
  packages autoterm and JoelTermStuff.

  10.  Porting software for use with TERM

  In principle, all programs that can be used over a network can also be
  used in combination with TERM. Some of them you can get as binaries
  with TERM support already built in. These include telnet, (nc)ftp,
  Mosaic and many others. Most of these programs are compiled for TERM
  1.17 or earlier. They should, however, still work with the newer
  versions of TERM.

  Another way to make programs TERM aware is to port them yourself. This
  process will be described in the next subsection.

  The last way to make your programs TERM-aware is to termify them.

  10.1.  Port and compile the sources

  Porting software to TERM can be done using a fairly simple porting
  procedure:

  If installed in '/usr/local' by root:

  1. Add to the compile flags -include /usr/local/include/termnet.h

  2. and add to the library list -ltermnet

  If installed in your home directory:

  1. Add to the compile flags -include $HOME/term/termnet.h

  2. and add to the library list -L$HOME/term -ltermnet

  Now compile the software as described in the INSTALL or README
  document that came with the software. That should do!

  At this point the commands should work both with and without TERM.

    telnet localhost

  does not use TERM to connect, but

    telnet bohr.physics.purdue.edu

  will use TERM only if you do not have some other type of network
  connection.

  Some commands like rlogin can only be executed by root and the owner
  of the TERM connection (privileged persons).

  Some TERM commands will be TERM transparent and only use TERM when
  there is not another option. Some common examples are telnet and ftp.

  Others require an external flag to tell them it is all right to use
  TERM. These programs include xarchie, fsp and ytalk.

  You can either flag these programs to use TERM by setting the
  environmental variable TERMMODE as specified in README.security, or
  running make installnet. Eventually, the 'termnet' file created will
  contain special networking instructions, but for now only its
  existence is checked.

  If you add an ethernet connection, you can then simply remove the
  'termnet' file and continue to use the same binaries!

  NOTE: Programs that were ported back in the days of client.a, can
  still be recompiled for use with newer versions of TERM simply by
  changing the client.a reference to libtermnet.a.

  10.2.  Termify

  This package will convert dynamically linked binaries for TERM use.

  Before you can use termify you have to make sure that you have TERM
  version 2.2i (is this version 2.2.8?) or later and libc.so.4.5.26 or
  later. Then you have to create the file 'libt.so.4' in the directory
  '/lib' (see the README file in the package).

  Problem at this moment is that you have to remake the file 'libt.so.4'
  every time you upgrade TERM versions.

  After you have created the library you can let termify 'crunch' the
  program you want to make TERM-aware, by using the command:

    termify <command name>

  When you do not like the result you can 'un'termify the program you
  have just termified using the command:

    termify -u <command name>

  Last, the package also contains a script for completely termifying
  'smail'; so no special transport definitions are necessary. The only
  thing you possibly want to change is the 'From: ' address.

  11.  Term clients

  11.1.  Term clients available on ftp sites.

  Below a list of application running with TERM is given. I am not
  stating that this list is complete; so any completion is welcome. As
  far as possible I will present the site and directory where the
  application can be found (all to my knowledge). When I state
  sunsite.unc.edu as the place to find the application I mean that you
  can find it in one of the following two directories:

  1. /pub/Linux/apps/comm/term/apps

  2. /pub/Linux/apps/comm/term/extra

  Here we go :-)

  TERM package:

       tupload
       tdownload           (versions 2.1.0 and higher)
       trsh
       tmon
       tredir
       tudpredir           (versions 2.0.0 and higher)
       txconn
       trdate(d)
       tshutdown
       libtermnet

  File transfer:

       ftpd                sunsite.unc.edu
       termncftp           sunsite.unc.edu
       ncftp185            sunsite.unc.edu:/pub/Linux/system/Network/file-transfer
       fsp                 sunsite.unc.edu:/pub/Linux/system/Network/file-transfer

  Information systems:

       lynx
       Mosaic              sunsite.unc.edu:/pub/Linux/system/Network/info-systems/Mosaic
       chimera
       netscape            sunsite.unc.edu:/pub/Linux/system/Network/info-systems
       httpd
       xgopher
       gopher              sunsite.unc.edu

  Remote login:

       termtelnet          sunsite.unc.edu
       rlogin              physics.purdue.edu:/pub/bcr/term/extra
       rsh                 physics.purdue.edu:/pub/bcr/term/extra

  Netnews:

  tin 1.3             sunsite.unc.edu:/pub/Linux/system/Mail/news
  news2               sunsite.unc.edu

  Mail:

       slurp               sunsite.unc.edu
       smail               sunsite.unc.edu
       term.mailerd+smail  sunsite.unc.edu
       BCRMailHandlerXXX   physics.purdue.edu:/pub/bcr/term

  Automating scripts:

       JoelTermStuff       sunsite.unc.edu
       autoterm            sunsite.unc.edu
       fet                 sunsite.unc.edu

  Other programs:

       inetd               sunsite.unc.edu
       rdate               sunsite.unc.edu
       xgospel             sunsite.unc.edu:/pub/Linux/games/x11/networked
       termify             physics.purdue.edu:/pub/bcr/term/extra
       xboard              sunsite.unc.edu
       ircII               sunsite.unc.edu:/pub/Linux/system/Network/chat
       whois
       xwebster            sunsite.unc.edu
       sxpc                ftp.x.org:/R5contrib
       xztalk              sunsite.unc.edu:/pub/Linux/apps/sound/talk

  11.2.  The termnet package

  The package termnet-2.0.4-Linux-bin.tar.gz
  (sunsite.unc.edu:/pub/Linux/apps/comm/term) contains a couple of pre-
  compiled TERM clients and a couple of scripts, manual pages and
  libtermnet.so.2.00.04. The clients are compiled using this version of
  libtermnet.so. The package contains the following clients:

       fet         perl        sperl4.036  tmon        tshutdown   xgopher
       finger      perl4.036   suidperl    trdate      tudpredir   ytalk
       ftp         rcp         taintperl   trdated     tupload
       fwhois      rlogin      telnet      tredir      txconn
       ncftp       rsh         term        trsh        xarchie

  WARNING: The package also contains the complete set of compiled
  clients of TERM 2.0.4 including TERM itself. Do not install this
  package before you are sure about what you want. You will destroy
  other versions of TERM and its clients when you start moving
  executables around.

  11.3.  Asked for but not yet supported

  1. DOOM: The problem with this game seems to be the fact that it uses
     port 5029 both as client and as server.

  2. NFS: The NFS server is only supposed to accept requests if the
     socket requesting the connection is bound to a port below 1024.
     This seems to be troublesome. However, some NFS servers have an
     'insecure' option.  In this case NFS might work eventually, if RPC
     support is added to Term.

  12.  Term and Security

  In this section I will point to some security aspects of TERM. The
  problems will be explained and a way to improve security will be
  given.

  12.1.  trsh

  Trsh is insecure when it is used to access the local Linux box from
  the remote system. The problem with TERM and its clients is that
  beside the owner of the TERM connection also 'root' can execute TERM-
  aware programs over the connection.

  This also means that 'root' on the remote system can execute trsh and
  thus can enter the login which owns the TERM connection quite easy. If
  this owner on the local box is 'root' then you will be in hell.

  The solution to this problem is easy: you just have to put the
  following line in the termrc file on the local box:

    denyrsh on

  With this set in the 'termrc' file, nobody can use trsh on the remote
  site anymore to access your machine. When you and others want to
  access your local Linux box over the TERM connection this can still be
  done using telnet and redirected ports.

  12.2.  txconn and xauth

  Txconn is not terribly secure; anyone can connect to your local server
  via TERM and perform all sorts of mischief. I you are worried about
  this sort of thing, it might be a good idea to consider using xauth to
  authorize your connections. See the next section for an example of
  using xauth for securing your connections.

  12.3.  sxpc, xhost and xauth

  Sxpc in combination with 'xhost +' is very dangerous when you are not
  using xauth.

  Using xauth is very important to maintaining security when using sxpc.
  If you do not use xauth when using sxpc all the dangers of running
  with 'xhost +' apply. These dangers include but are not limited to:

    Someone watching what is displayed on your screen

    Someone watching what you type

    Someone typing in one of your windows (for example: a command to
     delete all your files :-(

  Xauth is available in X releases R4 and later. Here I will describe
  how to set up basic usage of xauth.  This configuration is vulnerable
  to network snooping, but if you can live with that it should be fine.

  NOTE: when using xauth your $DISPLAY variable must NOT be set to
  localhost (or localhost:whatever). If your $DISPLAY variable does use
  localhost the clients will be unable to find the appropriate
  authorization information. The workaround is to use the real hostname
  of the machine. If you follow the compilation instructions in the
  README, and compile without -DNOGETHOSTNAME then everything should
  work.

  The machine where you will be running clients will be called C, the
  machine where you wish to display them will be called D.

  First choose a 'key', up to 16 pairs of hexadecimal digits (so an even
  number of characters from the ranges 0-9 and a-f).  You will need to
  supply this key in place of <key> in the example below.

  On C:

    % xauth
    xauth:  creating new authority file $HOME/.Xauthority
    Using authority file $HOME/.Xauthority
    xauth> add Chostname:8 MIT-MAGIC-COOKIE-1 <key>
    xauth> exit

  On D:

    % xauth
    xauth:  creating new authority file $HOME/.Xauthority
    Using authority file $HOME/.Xauthority
    xauth> add Dhostname/unix:0 MIT-MAGIC-COOKIE-1 <key>
    xauth> add Dhostname:0 MIT-MAGIC-COOKIE-1 <key>
    xauth> exit

  When starting the X server on D you should give the flag -auth
  $HOME/.Xauthority.  You may need to edit or create a
  '$HOME/.xserverrc' to control how the X server is started.  For
  example:

    #!/bin/sh
    exec X  -auth $HOME/.Xauthority $*

  Make sure that your '.Xauthority' file is readable only by you on both
  C and D.

  13.  Things to remember

  In this section I try to present you with a list of useful ftp
  addresses, URL's etc. where you can find software and information
  about TERM.

  Ftp:

  sunsite.unc.edu:/pub/Linux/apps/comm/term/<whole-directory-tree>
  sunsite.unc.edu:/pub/Linux/docs/HOWTO/<whole-directory-tree>
  physics.purdue.edu:/pub/bcr/term/<whole-directory-tree>

  URL:

  http://sunsite.unc.edu/mdw/HOWTO/Term-HOWTO.html
  http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html  (always the newest version)
  http://physics.purdue.edu/~bcr/homepage.html

  Netnews:

  comp.os.linux.announce           announce of new TERM versions and Term-HOWTO
  comp.os.linux.help               ask your questions about TERM here
  comp.os.linux.misc               or here
  comp.protocols.misc              answers to TERM questions are also posted here.

  Related documents:

  Using Term to Pierce an Internet Firewall HOWTO    by Barak Pearlmutter,
                                                        bap@learning.scr.siemens.com
  Firewall HOWTO                                     by David Rudder,
                                                        drig@execpc.com
  Serial HOWTO                                       by Greg Hankins,
                                                        gregh@cc.gatech.edu
  Net-2/Net-3 HOWTO                                  by Terry Dawson,
                                                        terryd@extro.ucc.su.oz.au

  When you start asking questions on netnews please make sure that you
  give people in the groups as much information as they need to solve
  your problem (TERM version number, way you set up your connection
  etc.). At this moment many TERM versions are in use and all have their
  specific and common problems. Therefore, when you want a useful
  answer, at least state the version of TERM you are using. Otherwise,
  in some cases only wild guesses are possible to help you solve your
  problems.
  14.  Reliability of TERM versions

  Many versions of TERM are around now. The maintainer of TERM, Bill
  Riemers, has made a list of TERM versions stating what versions are
  reliable and what versions you had better avoid. This list is the
  following:

               term110          --> cannot really say
               term111          --> cannot really say
               term112          --> cannot really say
               term113          --> cannot really say
               term114          --> fairly stable BETA version
               term115          --> unstable BETA version
               term116          --> unstable BETA version
               term117          --> unstable BETA version
               term118          --> semi-stable BETA version
               term119          --> stable GAMMA version
               term-2.0.X       --> semi-stable BETA versions
               term-2.1.X       --> more stable BETA versions
               term-2.2.X       --> new BETA versions
               term-2.3.X       -->

  15.  Term speed table

  Thanks to Bill McCarthy we now have a table with TERM speed
  information for different modems, TERM versions and connection
  conditions. Its purpose is to give new and experienced users some idea
  what other people are using and the results they are getting.

                             LINUX TERM CHART 8/14/94

  |___modem speed/make___|___line speed__|__avg cps__|__high__|__term ver_|
  | 1)  USR SP 14.4      |   9600        |  950      |  963   | 1.17      |
  | 2)  USR SP 14.4      |  14400        | 1376      |  n/a   | 1.18p06   |
  | 3)  Zoom 2400        |   2400        |  220      |  230   | 1.19      |
  | 4)  Boca V.32bis 14  |  57600        | 1400      |  n/a   | 1.01/09?  |
  | 5)  Viva 14.4        |  14400        | 1300      |  n/a   | 1.16      |
  | 6)  USR SP 14.4      |  14400+       | 1550      | 1680   | 1.19      |
  | 7)  Intel 14.4 Fax   |  14400        | 1400      | 1650   | 2.0.4     |
  | 8)  cable tv hookup  |  57600        | 1500      | 1800   | 1.18p06   |
  | 9)  Twincom 144/DFi  |  57600        | 1500      | 4000?  | 2.0.4     |
  | 10) USR SP 14.4      |  14400        | 1200      | 1500   | 1.08      |
  | 11) cable tv hookup  |  19200        | 1300      | 1800   | 1.19      |
  |-----------------------------------------------------------------------|

  +Command flags/termrc settings:

  1) default escapes   2) window 5       3) baudrate 2400    4) n/a
     baudrate 9600        timeout 200       window 3
     window 10                              noise on
     timeout 150

  5) compress off      6) baudrate 19200  7) ignore 19+17    8) compress off
     window 10            compress on        window 4           escape 0, 13,
     timeout 150                             timeout 90         16-19, 255
     baudrate 38400                                             baudrate 0
                                                                shift 224
                                                                flowcrtl 500
                                                                window 10
                                                                timeout 70
                                                                retrain on
                                                                breakout 24
  9) compress off     10) compress off      11) baudrate 19200
     baudrate 57600       baudrate 38400        compress on
     window 10            escape 17, 19         shift 224
     timeout 200          remote                escape 0, 13 16-17
     noise on                                   19, 255
     share on                                   window 10
     remote                                     timeout 40

  Escaping characters at one end also implies ignoring them on the other end.

  16.  Hints and Tricks found on the net

  In the Linux related newsgroups many questions about TERM are coming
  back every couple of weeks, together with the answers to these
  questions. To reduce traffic to the newsgroup, in this section I shall
  try to make a composition of these questions and the answers to them.
  Some of the answers have been checked by me as I also had related
  problems. Others, I have just taken from the newsgroups without
  testing them.

    Many people, especially those who are using Ultrix, seem to have
     trouble with vi presenting less than 24 lines on a window with 24
     lines. There are three ways to get rid of this problem:

     1. Log in into the remote system using:

          trsh -s telnet <hostname>

     2. Put 'resize; clear' in your '.login' file

     3. The best solutions seems to be to enter the following remote:

          stty 38400

    Many people seem to have problems with crashing TERM connections,
     whatever may be the reason of the crashes. So before starting
     applications people want to know whether their TERM connection is
     still alive or not. This can be checked using the following small
     shell script examples:

     When you are using tcsh:

       if ( { trsh -s true } ) then
         ...
       endif

  When you are using bash:

    if trsh -s true; then
      ...
    fi

    The WWW browser Netscape is causing people problems to get it to
     work with TERM. The good news is that it will work under TERM. Here
     is how:

             1. Termify netscape
             2. Fire up termnetscape
                   under Options | Preferences | Mail/Proxys
                   leave _all_ of the proxy boxes blank
                   set the SOCKS box to 'remotehost' & 80
             3. Ignore the error you get when you exit the Options menu.
             4. If termnetscape fails to work right:
                   under Options | Preferences | Mail/Proxys
                   leave _all_ of the proxy boxes blank
                   set the SOCKS box to 'none' & 80
             5. Ignore the error you get when you exit the Options menu.

  Scott Blachowicz mailed me stating that it is even easier to get
  Netscape or any other browser to work with TERM if you have a proxy
  server (e.g. CERN's httpd) installed for use on the remote side of
  your TERM link. On the local side, you can then do this:

          1. tredir localhost:8080 remotehost:80

                where 'remotehost' is the hostname of your proxy server system.

          2. Run your particular browser, then in the preferences or options or
                whatever it is called, point your proxies at 'localhost' port
                8080.
                Some browsers might like environment variables like

                    export http_proxy=http://localhost:8080/
                    export ftp_proxy=http://localhost:8080/

  17.  Other Things

  Some things that might be included:

    Extension of troubleshooting

    Extension of security issues

    Termwrap

    Suggestions

  Anyway, if you have suggestions, criticism, suggestions, or anything
  else to say about this document, please fire away. At the moment I,
  Patrick Reijnen, have taken over the authorship of the TERM-HOWTO. I
  can (currently) be reached at patrickr@bart.nl.

  18.  Acknowledgements

  A lot of people have to be thanked. First and foremost Michael
  O'Reilly and all the developers of TERM, who have provided us with
  such a great tool. I would also like to thank everyone who gave
  feedback and contributed to this HOWTO. They include Bill Reynolds,
  the former author of this HOWTO, Ronald Florence, Tom Payerle, Bill C.
  Riemers, Hugh Secker-Walker, Matt Welsh, Bill McCarthy, Sergio, Weyman
  Martin and everybody I forgot to mention.

  The Belgian HOWTO
  by Dag Wieers, dag@mind.be
  v1.0.24, 29 February 2000

  This document describes how to tweak Linux for Belgian users and lists
  Linux   user groups, businesses and other resources in Belgium.

  ______________________________________________________________________

  Table of Contents



  1. Introduction

     1.1 Why this document?
     1.2 New versions of this document
     1.3 Translated versions
     1.4 Contributions
     1.5 Feedback
     1.6 Legal stuff
     1.7 Todo

  2. Configuration

     2.1 Keyboard setup
        2.1.1 Console
        2.1.2 XFree86
     2.2 Display and applications
        2.2.1 Using the ISO-8859-1 font in console
        2.2.2 Support for the Euro symbol
     2.3 Time zone
     2.4 Locale support
        2.4.1 Dutch
        2.4.2 French
        2.4.3 German
        2.4.4 Walloon
     2.5 Native language support and codepages

  3. Setting up Internet (Belgian ISP information)

     3.1 Dialing in with your modem (PPP)
        3.1.1 Configuring the modem
        3.1.2 Installing pppd
        3.1.3 pap-secrets / chap-secrets
        3.1.4 Network
        3.1.5 File permissions
        3.1.6 Dial + Hangup
        3.1.7 ISP-dependant information
     3.2 Dialing in with your ISDN-modem
        3.2.1 Updating the kernel
        3.2.2 ISDN4Linux toolkit
        3.2.3 Configuring the interface
        3.2.4 pap-secrets / chap-secrets
        3.2.5 Network
        3.2.6 File permissions
        3.2.7 Dial + Hangup
     3.3 Cablemodem (DHCP)
     3.4 ADSL

  4. Belgian Linux user groups

     4.1 ALLIN Linux User Group
     4.2 Antwerp Linux User Group (ALUG)
     4.3 Brussels Linux User Group (BeLUGa)
     4.4 Charleroi Linux User Group (CAROLINUX)
     4.5 HCC Limburgse Linux Gebruikers Groep (HLLGG)
     4.6 HCC Linux Gebruikers Groep Leuven
     4.7 Independent Group of Unix-Alikes and Network Activists (IGUANA)
     4.8 Infogroep (IGWE)
     4.9 Leuvense Linux Users (L2U)
     4.10 Limburgse Linux User Group (LILUG)
     4.11 Linux.be vzw/asbl
     4.12 Linux Belgian Team
     4.13 Linux Gebruikers Oost-Vlaanderen (LGOVL)
     4.14 Linux User Group De Bruxelles (BxLUG)
     4.15 Linux User Group De Namur
     4.16 Linux User Group Mons
     4.17 Linux User Movement Underground Mad Belgian Aliens (LUMUMBA)
     4.18 linuxbe.org
     4.19 Local Linux Support Group Gent (LLSGG)
     4.20 Open Technology Assembly Linux Special Interest Group
     4.21 Student Information Networking (SIN)
     4.22 TINA
     4.23 Unix Lovers Yield Student Services & Internet Support (ULYSSIS)
     4.24 Zeus WPI - Werkgroep Informatica RUG

  5. Belgian Linux businesses

     5.1 aDOC Services
     5.2 Arafox
     5.3 Better Access N.V.
     5.4 D. Connect
     5.5 Double Barrel Consultancy and Productions
     5.6 grmbl productions
     5.7 LIFE bvba
     5.8 MIND NV
     5.9 Phidani Software SPRL
     5.10 Spier BVBA
     5.11 VirgoPlus sprl

  6. Belgian Linux resources

     6.1 Websites
        6.1.1 Linux in Belgium
        6.1.2 Dutch Linux-sites
        6.1.3 French Linux-sites
        6.1.4 Mirrors in Belgium
     6.2 HOWTO
        6.2.1 Web
        6.2.2 FTP
     6.3 HOWTO translations
        6.3.1 Dutch
        6.3.2 French
        6.3.3 German
     6.4 FTP
        6.4.1 Kernel-sources
        6.4.2 Distributions
        6.4.3 Software
     6.5 Usenet
     6.6 Mailinglists
        6.6.1 Linux in Belgium
        6.6.2 Linux user groups
     6.7 IRC


  ______________________________________________________________________

  1.  Introduction

  1.1.  Why this document?

  Since there was no information anywhere on the net for Belgian Linux
  users, we started to collect stuff that we thought could be important.
  This HOWTO aims to be the definitive list of all Belgian-related Linux
  information. If you think not, you have no excuse to complain and
  certainly not to not contribute. ;)

  1.2.  New versions of this document

  If you need to know more about the Linux Documentation Project or
  about Linux HOWTO's, feel free to contact the supervisor Tim Bynum
  linux-howto@sunsite.unc.edu.


  Tim Bynum will post the listing to several national and international
  newsgroups on a monthly basis. In addition, the Belgian HOWTO can be
  found on the World Wide Web at  <http://dag.mind.be/howto/> New
  versions of the Belgian HOWTO are always placed at this site first, so
  please be sure to check if the copy you are reading is still up to
  date!

  1.3.  Translated versions

  This document is currently translated in 3 languages (English, Dutch
  and French), we're trying to keep all three of them in sync, but the
  English version is the source-document!

  The English and Dutch version are maintained by Dag Wieers dag@mind.be
  and is found at:  <http://dag.mind.be/howto/>.

  The French version is maintained by Dany Vanderroost danyv@euronet.be
  and is found at:
  <http://club.euronet.be/dany.vanderroost/howto.html>.

  1.4.  Contributions

  A few people mailed us their suggestions and improvements, thanks go
  to:

  o  Wim Vandeputte wvdeputte@reptile.rug.ac.be

  o  Pablo Saratxaga srtxg@ping.be

  o  Christophe Lambin clambin@skynet.be

  o  Geert Uytterhoeven geert@linux-m68k.org

  Many thanks go to Ivo Clarysse soggie@iguana.be who started something
  similar earlier () and his project helped us a lot to get this
  document online.

  1.5.  Feedback

  If some information seems to be wrong, deceptive or missing, we'd
  appreciate if you mailed us the improvements. Since we're just human
  this document isn't bug-free, but your contribution can and will make
  a difference.

  To add yourself to the Linux user groups or businesses, collect all
  necessary information and mail it to us.

  1.6.  Legal stuff

  Trademarks are owned by their owners.

  Although the information given in this document is believed to be
  correct, the author will accept no liability for the content of this
  document.  Use the tips and examples given herein at your own risk.

  Copyright  1998, 1999, 2000 by Dag Wieers. This document may be
  distributed only subject to the terms and conditions set forth in the
  LDP license.

  1.7.  Todo

  There are some things I'm planning to add to this document, if you're
  interested be sure you're reading the most current version of this
  document. (This todo-list is only a reminder to myself, it is not in
  the translated documents!)

  o  Make a distinction between Linux-distributors and Linux-companies

  o  Add details about how to get Ispell-software for your own language

  o  Describe possible ways to get a cheap recent Linux-distribution in
     your neighbourhood

  o  Add a section about Linux training in Belgium

  o  Link it from inside the Linux.be website at http://linux.iguana.be/
     (database-driven)

  2.  Configuration

  2.1.  Keyboard setup

  Linux provides 2 ways to set up your keyboard. At the console you can
  use loadkeys and under XFree86 you can use xmodmap.

  2.1.1.  Console

  To use the keytable for a Belgian keyboard you can use

          loadkeys be2-latin1



  or

          loadkeys be-latin1



  The only difference between the two is that be2-latin1 add support for
  twosuperior and threesuperior (keycode 41) and grave (keycode 43).

  Usually loadkeys is started at boottime from the scripts located
  somewhere in /etc/rc.d Different distributions handle it differentely.
  But most distributions have a simple program (like kbdconfig in RedHat
  or yast in SuSE) to change the scripts.

  2.1.2.  XFree86

  To set your keyboard properly under XFree86 you've got more choices.
  By running Xconfigurator (or a similar program) a config-file for
  XFree86 is created (with some standard content). This file is called
  XF86Config and is usually located in /etc or /etc/X11

  Make sure (and change otherwise) that something similar to this is
  given under the Keyboard Section.

          Section "Keyboard"
                  Protocol        "Standard"
                  XkbRules        "xfree86"
                  XkbModel        "pc101"
                  XkbLayout       "be"
          EndSection



  If you own a 'microsoft' keyboard (or the less-known penguin keyboards
  ;p) you can enable those extra 3 keys by changing the "pc101" into
  "pc104". (I use the extra keys as meta-keys in my windowmanager so
  some shortcuts doesn't conflict with the internal ones of my wm).

  To get the AltGr key to work under XFree86 simply add in the Keyboard
  Section:


                  RightAlt        ModeShift



  To get some key-combinations working under X11, you might want to
  change in file /usr/X11R6/lib/X11/xkb/symbols/be:

          key <AD11> {    [ dead_circumflex,       diaeresis      ],
                          [     bracketleft                       ]       };
          key <AC11> {    [          ugrave,         percent      ],
                          [      quoteright                       ]       };
          key <BKSL> {    [              mu,        sterling      ],
                          [       quoteleft                       ]       };
          key <AB10> {    [           equal,            plus      ],
                          [      asciitilde                       ]       };



  by

          key <AD11> {    [ dead_circumflex,  dead_diaeresis      ],
                          [     bracketleft                       ]       };
          key <AC11> {    [          ugrave,         percent      ],
                          [      dead_acute                       ]       };
          key <BKSL> {    [              mu,        sterling      ],
                          [      dead_grave                       ]       };
          key <AB10> {    [           equal,            plus      ],
                          [      dead_tilde                       ]       };



  Some people prefer to use a 'compose'-key to enter their special
  characters, like:

          <compose>'e => e
          <compose>/o => oe
          <compose>c, => c
          <compose>co => (C)
          <compose>ss => ss



  Solution:

          xmodmap -e "keycode xx = Multi_key"



  or

          xmodmap -e "keysym yy = Multi_key"



  and 'xx' is the keycode and 'yy' the kesym of the key you choose to be
  the 'compose'-key.  (use xev to get these values)

  Alternatively you can add

          keycode xx = Multi_key



  to your  /.xmodmaprc. This way it happens automagically.

  2.2.  Display and applications

  Some applications have to be compiled as 8-bit clean to work well with
  the European characterset. Others like to be told in advance.

  2.2.1.  Using the ISO-8859-1 font in console

  You can load the ISO-8859-1 font by typing the following in console:

          setfont lat1u-16.psf
          mapscrn trivial
          echo -ne '\033(K'



  To be able to use e, e, e or c in console, you might want to add these
  to your  /.inputrc:

          set meta-flag on
          set convert-meta off
          set output-meta on



  (this must be done for every user, if you want this to be default for
  all users you can either add this file to /etc/skel/ or you could add
  these lines to /etc/inputrc and add the following line to /etc/bashrc,


          export INPUTRC=/etc/inputrc



  )

  Note: this is only useful to programs that use readline (like bash)
  Also set the following environment variables:

          LC_CTYPE=iso-8859-1
          SYSFONT=lat1u-16.psf
          SYSTERM=linux



  2.2.2.  Support for the Euro symbol

  Since Europe had to invent a new character, the Euro, there's a new
  standard. It's called ISO-8859-15 (aka Latin-9 or Latin-0). To add
  support you need both a new font and new keymaps.  This is part of
  every major distribution nowadays, if you have an older distributions
  you probably need a newer console-tools package.

  The changes in the keymap-file consist of the following lines:



          keycode  18 = +e        +E      currency
          keycode  46 = +c        +C      cent



  And the following environment-variable should be set:

          SYSFONT=lat0-16.psf



  to make sure you're using the right font.

  2.3.  Time zone

  Since Belgium is located in the Central European Time zone (aka MET)
  which (in the winter) is equivalent to the Greenwhich Mean Time plus 1
  (GMT+1), you can simply link /usr/lib/zoneinfo/localtime/MET to
  /etc/localtime symbolicly like:

          ln -sf /usr/lib/zoneinfo/MET /etc/localtime



  or

          ln -sf /usr/lib/zoneinfo/Europe/Brussels /etc/localtime



  This automagically sets Daylight Savings (which is GMT+2 in the sum-
  mer).

  Note: that different distributions have different paths, zoneinfo can
  be located in /usr/share or such...

  Note2: RedHat uses a tool called timeconfig, SuSE uses yast

  To change the CMOS clock and then synchronize the system time with the
  CMOS clock, do something like this:

          hwclock --set --date="Feb 25 03:38"
          clock -u -s



  If your clock is set to local time (which is discouraged but if you
  have other OS's installed a must), you can do:

          hwclock --set --date="Feb 25 04:38"
          clock -s



  [Noticed the 1 hour difference ? ;p]

  2.4.  Locale support

  Not much programs support locale yet, if you want to know more about
  locale or how to write your own programs to support it, check: [put
  the damn url here ;p]

  Be aware that locale makes it harder to resolve problems as less
  people can help you !! You might understand a problem when it's in
  technical English, but what if it's translated in some obscure French
  ?!? Some obviously won't understand both. ;p

  2.4.1.  Dutch

  To enable support for the Dutch locale in Belgium on a system with
  locale support you just have to set the following environment
  variables:

          LANG=nl
          LANGUAGE=nl_BE



  Try nl_BE.ISO_8859-1 if nl_BE does not work.

  2.4.2.  French

  If you want French locale support in Belgium, set the following
  environment variabels:

          LANG=fr
          LANGUAGE=fr_BE



  Try fr_BE.ISO_8859-1 if fr_BE does not work.

  2.4.3.  German

  If you want instead German locale support in Belgium, set the
  following environment variabels:

          LANG=de
          LANGUAGE=de_BE



  Try de_BE.ISO_8859-1 if de_BE does not work.

  2.4.4.  Walloon

  For Walloon locale support you can find files and information at:
  <http://www.linuxi18n.org/locales/walon/>. To use it set:

          LANG=wa
          LANGUAGE=wa_BE:fr_BE



  Try wa_BE.ISO_8859-1 if wa_BE does not work.

  2.5.  Native language support and codepages

  These options add support for the Belgian characterset and codepages.
  If you'd like to have these, compile a kernel with these options put
  on. They only apply to some filesystems (FAT-based, ISO9660, ...).

          < > Codepage 850 (Europe)
          < > NLS ISO 8859-1  (Latin 1; Western European Languages)
          < > NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)



  Located in Filesystems > Native Language Support

  If your kernel is a modular kernel that came with your distribution
  (=you never compiled a kernel before), then you might want to type:

          insmod nls_cp850
          insmod nls_iso8859_1
          insmod nls_iso8859_15



  3.  Setting up Internet (Belgian ISP information)

  3.1.  Dialing in with your modem (PPP)

  To configure PPP correctly, you should check the PPP-HOWTO
  <http://www.interweft.com.au/other/ppp-howto/ppp-howto.html>.  I try
  to explain it briefly, but if you have any questions or problems, read
  the HOWTO very carefully.

  3.1.1.  Configuring the modem

  To configure your modem, you can alter the initstring of your modem.
  To learn more about your modem, check Ask Mr. Modem
  <http://www.spy.net/~dustin/modem/>.

  Beware: if you have a winmodem you will probably not get it to work.
  More information about winmodems is at: <http://linmodems.org/>. Work
  is underway, but winmodems are not as good as real modems.

  3.1.2.  Installing pppd

  Now, you need to have the ppp-package installed (check this by typing
  pppd --version), make sure you have a recent one. Then you have to
  make sure you've got these files:

  /usr/local/bin/ppp



          #!/bin/sh
          case $1 in
                  on|start)
                  TELEPHONE='555-1212'    # The telephone number for the connection
                  ACCOUNT='your_login'    # The account name for logon (as in 'George Burns')
                  PASSWORD='your_pass'    # The password for this account (and 'Gracie Allen')
                  INITSTRING='AT&F&C1&D2Z'# Modem initstring
                  IPLOCAL=0.0.0.0         # Local IP address if known. Dynamic = 0.0.0.0
                  IPREMOTE=0.0.0.0        # Remote IP address if desired. Normally 0.0.0.0
                  DEVICE=/dev/ttyS1       # Serial Device com1=ttyS0, com2=ttyS1,...
                  SPEED=57600             # 19200, 38400 or 57600 (don't try something different)
                  export TELEPHONE ACCOUNT PASSWORD INITSTRING
                  exec /usr/sbin/pppd $DEVICE $SPEED $IPLOCAL:$IPREMOTE \
                          user $ACCOUNT connect /etc/ppp/ppp-on-dialer
                  ;;
                  off|stop)
                  if [ -r /var/run/ppp0.pid ]; then
                          kill -INT `cat /var/run/ppp0.pid`
                          if [ ! "$?" = "0" ]; then
                                  rm -f /var/run/ppp0.pid
                                  echo "ERROR: Removed stale pid file"
                                  exit 1
                          fi
                          exit 0
                  fi
                  echo "ERROR: PPP link is not active on ppp0"
                  exit 1
                  ;;
                  info|status)
                  /usr/sbin/pppstats
                  ;;
                  *)
                  echo "Usage: ppp on|off|info|start|stop|status";
                  ;;
          esac



  /etc/ppp/ppp-on-dialer

          #!/bin/sh
          exec /usr/sbin/chat -v                                  \
                  REPORT CONNECTION                               \
                  REPORT CARRIER                                  \
                  TIMEOUT         10                              \
                  ABORT           '\nBUSY\r'                    \
                  ABORT           '\nNO ANSWER\r'                       \
                  ABORT           '\nNO CARRIER\r'              \
                  ABORT           '\nNO DIALTONE\r'             \
                  ABORT           '\nRINGING\r\n\r\nRINGING\r'      \
                  ABORT           'Invalid Login'                 \
                  ABORT           'Login incorrect'               \
                  ''              "\r$INITSTRING\r"         \
                  'OK-+++\c-OK'  'ATH0'                          \
                  TIMEOUT         45                              \
                  OK              "ATDT$TELEPHONE"            \
                  CONNECT         '\d\c'                                \
                  ogin:--ogin:    "$ACCOUNT"                  \
                  ord:            "$PASSWORD"



  You can remove the -v once everything looks normal.


  The pppd command uses /etc/ppp/options to list its options, change
  these options to whatever fits. These defaults normally work in most
  cases.

          asyncmap 20a0000
          crtscts
          debug
          default-mru
          defaultroute
          detach
          escape 11,13,ff
          hide-password
          ipcp-accept-local
          ipcp-accept-remote
          lcp-echo-failure 4
          lcp-echo-interval 400
          lock
          modem
          mtu 1500
          netmask 255.255.255.0
          noipdefault
          passive

          #idle 300
          #kdebug 0
          #-vj



  Once dialing in works like a charm, you can leave debug out.

  Beware: it is important to emphasize that every special character,
  thus every character that is not [a-ZA-Z0-9] and '_', should be
  escaped by preceding it with a '\'-character. Thus "e!b$l+" would
  become "e\!b\$l\+".  Try it if you are having troubles !

  3.1.3.  pap-secrets / chap-secrets

  If your ISP requires CHAP or PAP, you need one of these files with
  their proper username and password:

  /etc/ppp/pap-secrets or /etc/ppp/chap-secrets

          #client         server  secret          IP
          your_login      *       your_pass       *



  3.1.4.  Network

  To configure your nameservers, change /etc/resolv.conf. If dialing in
  is succesfull, but you can't get it to connect to URL's: this is
  probably the cause.

          domain domain_of_your_isp
          nameserver your_primary_nameserver
          nameserver your_secondary_nameserver



  3.1.5.  File permissions

  Before you can run a (shell)script, it must be set executable. Be sure
  that you set the permissions so that other users cannot see the
  passwords stored in the files. If you want other users to be able to
  dial in, you might want to consider using sudo. You might want to do
  the following:

       chmod u+rw og-rwx -R /etc/ppp
       chmod u+x /etc/ppp/ppp-on-dialer /usr/local/bin/ppp



  3.1.6.  Dial + Hangup

  Then if /usr/local/bin is in your PATH, you can easily dial in with:

          ppp on



  and hangup with:

          ppp off



  and to get some statistics, you do:

          ppp status



  3.1.7.  ISP-dependant information


     Digibel:

        Authentication:
           PAP

        Nameservers:
           194.119.240.62

        Web:
           <http://www.digibel.org/>

        Support:
           <http://support.digibel.be/linuxsup.htm>

     DMA:

        Authentication:
           text-based

        Nameservers:
           195.13.24.1

        Web:
           <http://www.dma.be/>

        Support:
           <http://bewoner.dma.be/robvdw/ned/dma-nl.txt>

     FreeBel:

        Authentication:
           PAP
        Nameservers:
           194.149.160.9, 194.149.160.1

        Web:
           <http://www.freebel.net/>

        Support:
           no official support yet

     KPN Belgium (Eunet):

        Authentication:
           text-based

        Extra options:
           proxyarp

        Nameservers:
           193.74.208.135

        Web:
           <http://www.kpnbelgium.be/internet/index.asp?ID=3&REF=EUnet>

        Support:
           <http://www.kpnbelgium.be/support/Support.asp?ID=3&SupportID=11>

     Online:

        Authentication:
           text-based

        Extra options:
           noccp

        Nameservers:
           62.112.0.7, 194.88.127.7

        Web:
           <http://www.online.be/>

        Support:
           no official support yet

     Ping:

        Authentication:
           text-based

        Web:
           <http://www.ping.be/>

        Support:
           <http://www.ping.be/Support/redhat.shtml>

     Planet Internet:

        Authentication:
           CHAP

        Nameservers:
           194.119.232.3, 194.119.232.2

        Web:
           <http://www.planetinternet.be/>


        Support:
           no official support yet

     Skynet (Belgacom):

        Authentication:
           PAP

        Extra options:
           defaultroute

        Nameservers:
           195.238.2.21, 195.238.2.22

        Web:
           <http://www.skynet.be/>

        Support:
           no official support yet

     UUNet:

        Authentication:
           PAP

        Nameservers:
           194.7.1.4, 194.7.15.70

        Web:
           <http://www.uunet.be/>

        Support:
           no official support yet

     VT4:

        Authentication:
           PAP

        Web:
           <http://www.vt4.net/>

        Support:
           no official support yet

     Wanadoo (Euronet):

        Authentication:
           text-based

        Nameservers:
           195.74.193.12, 194.134.0.12

        Web:
           <http://www.euronet.be/>  <http://www.wanadoo.be/>

        Support:
           <http://www.euronet.be/support/uk/linux/>

     World Online:

        Authentication:
           CHAP

        Nameservers:
           212.233.1.34, 212.233.2.34
        Web:
           <http://www.worldonline.be/>

        Support:
           no official support yet

     XS4ALL:

        Authentication:
           PAP

        Nameservers:
           194.109.6.66, 194.109.9.99

        Web:
           <http://www.xs4all.be/>

        Support:
           <http://pws1.xs4all.be/~helpdesk/new/linux/linuxconnect.html>

     Yucom:

        Authentication:
           CHAP

        Web:
           <http://www.yucom.be/>

        Support:
           no official support yet

  3.2.  Dialing in with your ISDN-modem

  Contributed by Christophe Lambin clambin@skynet.be

  This section does not aim to be a definitive guide on ISDN for Linux.
  For a more detailed discussion on the topic, see Paul Slootman's
  ISDN4Linux HOWTO and ISDN4Linux-FAQ.

  3.2.1.  Updating the kernel

  If you're using a 2.2 kernel, it's recommended to get an updated
  version of the ISDN code. You can retrieve the CVS at
  <ftp://ftp.suse.com/pub/isdn4linux/>.  For more information, check:
  <http://www.brisse.dk/site/linux/docs/isdn.htm>

  Warning: if you've recently purchased an Eicon Diva 2.0 PCI (eg, via
  Belgacom), there's a good chance you've actually got a Diva 2.01.In
  this case, you must get a version dated 1 July 1999 or later !

  Once the ISDN is in place, you can start up the driver. Eg:

          modprobe hisax type=11 protocol=2



  Refer to the Readme's for the right parameters and values for your
  card.

  3.2.2.  ISDN4Linux toolkit

  Next, you'll need the ISDN4Linux toolkit.  You can retrieve the latest
  version of the toolkit at:  <ftp://ftp.suse.com/pub/isdn4linux/>



  3.2.3.  Configuring the interface

  With the tools installed and configured, write a script to configure
  the interface, to be used for the ISDN connection. As always in Linux,
  there's no one correct way of doing this. I've put these in a script

  /etc/rc.d/rc.isdn:

          #!/bin/sh
          MSNREMOTE='555-1212'    # Phone number of ISP
          MSNLOCAL='555-1313'     # my number, without 0, with areacode
          ACCOUNT='george'        # The account for logon (as 'George Burns')
          IPLOCAL=10.0.0.2        # my fixed IP (use 10.0.0.2 if no fixed)
          IPREMOTE=0.0.0.0        # IP number of ISP
          INTERFACE=ippp0
          /sbin/modprobe hisax type=11 protocol=2
          /sbin/isdnctrl verbose 3 system on
          /sbin/isdnctrl addif $IF
          /sbin/isdnctrl secure $IF on
          /sbin/isdnctrl addphone $IF out $MSNREMOTE
          /sbin/isdnctrl eaz $IF $MSNLOCAL
          /sbin/isdnctrl huptimeout $IF 300
          /sbin/isdnctrl l2_prot $IF hdlc
          /sbin/isdnctrl l3_prot $IF trans
          /sbin/isdnctrl encap $IF syncppp
  #       /sbin/isdnctrl dialmode $IF auto
          /sbin/ifconfig $IF $IPLOCAL pointopoint $IPREMOTE -arp -broadcast
          /sbin/ipppd /dev/ippp0 user $ACCOUNT $IPLOCAL:$IPREMOTE



  To start this at boot time, make it executable and append the
  following to /etc/rc.d/rc.local:

          if [ -x /etc/rc.d/rc.isdn ]; then
                  . /etc/rc.d/rc.isdn
          fi



  The ipppd command gets its parameters passed through a file,
  /etc/ppp/ioptions:

          -ac
          -bsdcomp
          debug
          defaultroute
          ipcp-accept-local
          ipcp-accept-remote
          mru 1524
          mtu 1500
          noipdefault
          -pc
          useifip
          -vj
          -vjccomp

          #idle 360
          #persistent



  Warning: do NOT specify +pap or +chap in this file. This specifies the
  authentication that ipppd should use for an INCOMING client. If you
  were to use this to connect to your ISP, ipppd would wait for the ISP
  to authenticate itself using the specified protocol.

  Beware: it is important to emphasize that every special character,
  thus every character that is not [a-ZA-Z0-9] and '_' should be escaped
  by preceding it with a '\'-character. Thus 'e!b$l+' would become
  'e\!b\$l\+'.  Try it if you are having troubles !

  Finally, create /etc/ppp/ip-down.local to handle the shutdown of the
  interface:

          #!/bin/sh
          /sbin/ifconfig $1 down
          sleep 1
          /sbin/ifconfig $1 10.0.0.2 pointopoint



  Note: this is to handle some problems with routes on shutdowns.
  Anyone know of a clean(er) solution ?

  3.2.4.  pap-secrets / chap-secrets

  If your ISP uses PAP or CHAP, create a file /etc/ppp/pap-secrets or
  /etc/ppp/chap-secrets. Its format is:

          #client         server  secret          IP
          your_login      *       your_pass       *



  3.2.5.  Network

  Not really related to ISDN, but a lot of people forget this step (too
  eager to try out all the stuff they typed in above ? :-)).

  Anyway, you need to configure the DNS, by creating a file
  /etc/resolv.conf:

          domain your_domain_of_your_isp
          nameserver your_primary_nameserver
          nameserver your_secondary_nameserver



  3.2.6.  File permissions

  Before you can run a (shell)script, it must be set executable. Be sure
  that you set the permissions so that other users cannot see the
  passwords stored in the files. If you want other users to be able to
  dial in, you might want to consider using sudo. You might want to do
  the following:

       chmod u+rw og-rwx -r /etc/ppp
       chmod u+x /etc/rc.d/rc.isdn /etc/ppp/ip.down-local /usr/local/bin/isdn



  3.2.7.  Dial + Hangup

  Finally, you can write a little wrapper to start and stop the ISDN
  connection. I've put this as /usr/local/bin/isdn:

          #!/bin/bash
          case $1 in
                  on|start)
                  /sbin/isdnctrl dial ippp0
                  ;;
                  off|stop)
                  /sbin/isdnctrl hangup ippp0
                  ;;
                  info|status)
                  /sbin/isdnctrl list ippp0
                  ;;
                  *)
                  echo "Usage: isdn on|off|info|start|stop|status"
                  ;;
          esac



  Then if /usr/local/bin is in your PATH, you can easily dial in with:

          isdn on



  and hangup with:

          isdn off



  3.3.  Cablemodem (DHCP)

  DHCP was designed to make life easier, and most of the times it does
  ;) More information to set up your DHCP client can be found at:
  <http://www.oswg.org/oswg-nightly/DHCP.html> and a list of Frequently
  Asked Questions at:
  <http://web.syr.edu/~jmwobus/comfaqs/dhcp.faq.html> which describes
  everything you need to know. Along with the information in the Cable-
  Modem HOWTO ( <http://www.oswg.org/oswg-nightly/Cable-Modem.html>).

  Lots of people want to connect a whole network to their cablemodem,
  that's not a problem. You'll need IP-Masquerading (
  <http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO.html>) and make
  sure the interface (that speaks to the cablemodem) has the right MAC-
  address !! Another solution (in case of problems) is to reset your
  cablemodem.


     Chello (TVD):

        Web:
           <http://www.chello.be/>

        Support:
           no official support yet

        More information:
           <http://foobar.starlab.net/~soggie/tvd_linux/>

     Pandora (Telenet):

        Automatic proxy:
           http://pac.pandora.be:8080

        HTTP proxy:
           export http_proxy="http://proxy.pandora.be:8080/"

        Web:
           <http://www.pandora.be/>

        Support:
           no official support yet

        More information:
           <http://users.pandora.be/de.boeve/pandora.html>

  3.4.  ADSL


     Easynet:

        Web:
           <http://www.easynet.be/>

        Support:
           <http://support.easynet.be/>


     Turboline (Belgacom):

        Some things:
           using DANA

        Web:
           <http://www.turboline.be/>

        Support:
           no official support yet

        More information:
           <http://foobar.starlab.net/~soggie/turboline/>

  4.  Belgian Linux user groups

  More information can be found in the User Group HOWTO located at:
  <http://www.linuxdoc.org/HOWTO/User-Group-HOWTO.html> A complete list
  of Linux User Groups is at: <http://www.ssc.com/linux/glue/> and at:
  <http://limestone.uoregon.edu/woven/lugww/>

  4.1.  ALLIN Linux User Group


          Mechelbaan 260
          B-3130 Begijnendijk



     Email:
        allin@linuxfreak.com

     Web:
        <http://come.to/allin/>


     Contact:
        Paul Terweduwe paul@faes.be

     Last modified:
        13 April 1999.

  4.2.  Antwerp Linux User Group (ALUG)


          Van Luppenstraat 70
          B-2018 Antwerp



     Phone:
        +32 3 218 63 54

     Email:
        fv.alug@advalvas.be

     Web:
        <http://sunsite.belnet.be/alug/>

     Contact:
        Patrick Op de Beeck alug@pandora.be

     Last modified:
        26 December 1999.

  4.3.  Brussels Linux User Group (BeLUGa)


          Brussels Linux User Group (BeLUGa)
          Infogroep, Building F, room 218
          Vrije Universiteit Brussel
          Pleinlaan 2
          B-1050 Brussel



     Email:
        johanb@linux.rave.org

     Web:
        <http://linux.rave.org/>


     Last modified:
        25 February 2000.

  4.4.  Charleroi Linux User Group (CAROLINUX)


      Charleroi Linux User Group (CAROLINUX)



     Email:
        spirou@carolo.net

     Web:
        <http://carolo.net/carolinux/>

     Last modified:
        23 September 1999.

  4.5.  HCC Limburgse Linux Gebruikers Groep (HLLGG)


          HCC Limburgse Linux Gebruikers Groep



     Email:
        Linuxgg@hotmail.com

     Web:
        <http://www.uunet.be/hcc/Limburg/Linuxgg>

     Contact:
        Andy Peeters & Bruno Tony


     Last modified:
        31 May 1999.

  4.6.  HCC Linux Gebruikers Groep Leuven


          Diegemstraat 61
          B-1930 Zaventem



     Email:
        Yvo.Dries@village.uunet.be

     Web:
        <http://www.uunet.be/hcc/>

     Contact:
        Yvo Dries Yvo.Dries@village.uunet.be


     Last modified:
        2 August 1999.

  4.7.  Independent Group of Unix-Alikes and Network Activists (IGUANA)


          Milcampslaan 101
          B-1040 Schaarbeek



     Phone:
        +32 2 657 77 36

     Fax:
        +32 2 657 77 38

     Email:
        info@iguana.be

     Web:
        <http://www.iguana.be/>
     Last modified:
        5 March 1999.

  4.8.  Infogroep (IGWE)


          Pleinlaan 2, 5F218 (building F)
          B-1050 Brussels



     Phone:
        +32 2 629 33 56

     Fax:
        +32 2 629 33 89

     Email:
        ig@igwe.vub.ac.be

     Web:
        <http://igwe.vub.ac.be/>


     Last modified:
        6 July 1999.

  4.9.  Leuvense Linux Users (L2U)


          Leuvense Linux Users (L2U)



     Email:
        darkcompanion@village.uunet.be

     Web:
        <http://l2u.iguana.be/>


     Last modified:
        28 November 1999.

  4.10.  Limburgse Linux User Group (LILUG)


          Limburgse Linux User Group (LILUG)



     Email:
        frank.eersels@ping.be

     Web:
        <http://lilug.linuxatwork.at/>

     Contact:
        Frank Eersels frank.eersels@ping.be


     Last modified:
        6 May 1999.
  4.11.  Linux.be vzw/asbl


          Linux.be vzw/asbl
          Non-proft organization to promote Linux in Belgium



     Email:
        info@linux.iguana.be

     Web:
        <http://linux.iguana.be/>


     Last modified:
        23 September 1999.

  4.12.  Linux Belgian Team


          Rue d'Aineffe 4
          B-4317 Borlez Faimes



     Email:
        manu@rtfm.be

     Web:
        <http://linux.rtfm.be/>

     Contact:
        Alexandre J.D. Dulaunoy adulau@rtfm.be


     Last modified:
        25 February 1999.

  4.13.  Linux Gebruikers Oost-Vlaanderen (LGOVL)


          Linux Gebruikers Oost-Vlaanderen



     Email:
        dennis@lgovl.freeservers.com

     Web:
        <http://lgovl.freeservers.com/>


     Last modified:
        25 February 1999.

  4.14.  Linux User Group De Bruxelles (BxLUG)


          Linux User Group De Bruxelles (BxLUG)



     Email:
        bxl_information@linuxbe.org

     Web:
        <http://bxlug.linuxbe.org/>

     Contact:
        Raphael Bauduin bxl_information@linuxbe.org


     Last modified:
        17 July 1999.

  4.15.  Linux User Group De Namur


          Linux User Group De Namur



     Email:
        namur@linuxbe.org

     Web:
        <http://namur.linuxbe.org/>


     Last modified:
        17 July 1999.

  4.16.  Linux User Group Mons


          Linux User Group Mons



     Email:
        webmaster@linuxwallonie.org

     Web:
        <http://www.linuxwallonie.org/>


     Last modified:
        26 May 1999.

  4.17.  Linux User Movement Underground Mad Belgian Aliens (LUMUMBA)


          Universiteitslaan 1, Filii Lamberti
          3590 Diepenbeek



     Email:
        helpdesk@lumumba.luc.ac.be

     Web:
        <http://lumumba.luc.ac.be/>



     Last modified:
        25 February 1999.

  4.18.  linuxbe.org


          linuxbe.org



     Email:
        team@linuxbe.org

     Web:
        <http://linuxbe.org/>

     Contact:
        Cedric Gavage niddle@linuxbe.org


     Last modified:
        7 February 2000.

  4.19.  Local Linux Support Group Gent (LLSGG)


          Wim Vandeputte
          PB 144
          B-9000 Gent 12



     Phone:
        +32 9 240 29 17

     Fax:
        +32 9 240 34 39

     Email:
        wvdputte@reptile.rug.ac.be

     Web:
        <http://llsgg.rug.ac.be/>

     Contact:
        Wim Vandeputte wvdputte@reptile.rug.ac.be


     Last modified:
        4 March 1999.

  4.20.  Open Technology Assembly Linux Special Interest Group


          Kruipstraat 14
          B-1850 Grimbergen



     Phone:
        +32 11 27 58 98


     Fax:
        +32 11 27 03 89

     Email:
        info@ota.be

     Web:
        <http://www.ota.be/sigs/linux/>

     Contact:
        Jan Vanhercke jan.vanhercke@c-cure.be


     Last modified:
        4 March 1999.

  4.21.  Student Information Networking (SIN)


          Kleinhoefstraat 4
          B-2440 Geel



     Email:
        sin@sin.khk.be

     Web:
        <http://www.sin.khk.be/>


     Last modified:
        12 June 1999.

  4.22.  TINA



     Contact:
        Tina gebruikers vraagtina@digibel.org

     Web:
        <http://tina.digibel.org/>


     Last modified:
        25 February 2000.

  4.23.  Unix Lovers Yield Student Services & Internet Support (ULYSSIS)


          Blijde Inkomsstraat 21, lokaal 01.17
          B-3000 Leuven



     Phone:
        +32 16 32 48 61

     Email:
        ulyssis@ulyssis.student.kuleuven.ac.be
     Web:
        <http://www.ulyssis.student.kuleuven.ac.be/org/ulyssis/>


     Last modified:
        25 February 1999.

  4.24.  Zeus WPI - Werkgroep Informatica RUG


          Krijgslaan 281 S9
          B-9000 Gent



     Phone:
        +32 09 264 47 51

     Email:
        info@zeus.rug.ac.be

     Web:
        <http://www.zeus.rug.ac.be/>

     Comment:
        Restricted to RUG students


     Last modified:
        22 June 1999.

  5.  Belgian Linux businesses

  The Linux Documentation Project contains worldwide lists of Linux
  businesses, Linux Consultants HOWTO and V.A.R. HOWTO, and can be found
  at: <http://www.linuxports.com/>.

  5.1.  aDOC Services


          Avenue du Pesage, 31-33
          B-1050 Brussels



     Phone:
        +32 2 646 00 76

     Email:
        sales@adoc-services.com

     Web:
        <http://www.adoc-services.com/>


     Last modified:
        25 February 1999.

  5.2.  Arafox



      Avenue Joseph Wybranlaan 40
      B-1070 Brussels



     Phone:
        +32 2 529 59 91

     Fax:
        +32 2 529 59 92

     Email:
        info@arafox.com

     Web:
        <http://www.arafox.com/>


     Last modified:
        11 February 2000.

  5.3.  Better Access N.V.


          Geldenaakse Vest 6
          3000 Leuven



     Phone:
        +32 16 29 80 45

     Fax:
        +32 16 29 80 46

     Email:
        info@ba.be

     Web:
        <http://www.ba.be/>

     Type of support:
        After an onsite installation, we mainly support our customers
        with SSH remote administration. Most problems are reported by E-
        mail or by the inhouse-developped webbased supportsystem. This
        doesn't mean that once in a while a supportcall comes in.

     Special expertise:
        Security, systemadministration and setups, security
        (firewalling, tigerteaming, VPN, etc.) Networkdesign, wireless
        networking, Troubleshooting, product development, etc. Please
        visit http://www.ba.be for more info.


     Last modified:
        7 March 1999.

  5.4.  D. Connect


          Av. Van Goidtsnoven 33
          B-1180 Uccle


     Email:
        webmaster@dconnect.be

     Web:
        <http://www.dconnect.be/>


     Last modified:
        25 February 1999.

  5.5.  Double Barrel Consultancy and Productions


          Sportstraat 28
          B-9000 Gent



     Phone:
        +32 9 222 77 64

     Fax:
        +32 9 222 49 76

     Email:
        mvergall@double-barrel.be

     Web:
        <http://www.double-barrel.be/>

     Contact:
        Michael C. Vergallen mvergall@double-barrel.be

     Type of support:
        phone, email remote network admin, inhouse, onsite.

     Special expertise:
        installation, system admin. internet and intranet connectivity,
        sendmail, firewalls, proxys, nameservers, troubleshooting
        software & hardware.


     Last modified:
        5 March 1999.

  5.6.  grmbl productions


          Korte Vuldersstraat
          B-8000 Brugge



     Phone:
        +32 50 344366

     Email:
        info@grmbl.com

     Web:
        <http://www.grmbl.com/>



     Last modified:
        2 March 1999.

  5.7.  LIFE bvba


          Mgr. Vanwaeyenberglaan 6/10
          B-3000 Leuven



     Phone:
        +32 477 57 50 71

     Email:
        info@life.be

     Web:
        <http://www.life.be/>

     Contact:
        Jasper Nuyens jasper@life.be

     Type of support:
        LIFE is the first company in Europe to provide 24/7 professional
        support for Linux in Europe. LIFE also provides server and
        desktop installation services, educational services and fixed
        price development. Exclusive on the Linux operating system.

     Special expertise:
        Kernel driver development, database interconnectivity (VPN,
        wireless networking), security auditing (firewall, VPN, ethical
        hacking), e-commerce. See our website for more.


     Last modified:
        20 April 1999.

  5.8.  MIND NV


          Vaartstraat 12
          B-3000 Leuven



     Phone:
        +32 478 274 069 or +32 476 468 405

     Email:
        info@mind.be

     Web:
        <http://mind.be/>

     Contact:
        Peter Vandenabeele peter@mind.be or Dag Wieers dag@mind.be

     Type of support:
        Installation & configuration, auditing & consultancy, support &
        maintenance, training & education, research & development.

     Special expertise:
        Large Linux deployements, company security and network audits,
        remote server maintenance, application and kernel development,
        cluster computing, data recovery, ... See our website.


     Last modified:
        11 February 2000.

  5.9.  Phidani Software SPRL


          Rue de l'autonomie 1
          B-1070 Brussels



     Email:
        info@phidani.be

     Web:
        <http://www.phidani.be/>


     Last modified:
        25 February 1999.

  5.10.  Spier BVBA


          Knaptandstraat 96-98
          B-9100  Sint-Niklaas



     Email:
        info@spier,be

     Web:
        <http://www.spier.be/>


     Last modified:
        02 March 1999.

  5.11.  VirgoPlus sprl


          Rue Dartois 1
          B-4000 Liege



     Phone:
        +32 4 253 00 59

     Fax:
        +32 4 253 00 49

     Email:
        contact@virgoplus.com

     Web:
        <http://www.virgoplus.com/>

     Contact:
        Bruno Mairlot bruno@virgoplus.com

     Type of support:
        By phone, email, or remote networked administration, inhouse,
        onsite

     Special expertise:
        Installation, configuration, administration of Linux, internet
        connection, intranet developpment, firewalls, samba, netatalk,
        firewalls, proxys, DNS, web server (Apache), mod_perl, MySQL,
        Gui interface developpment (GTK+).  We have acquired a special
        expertise with the Red Hat distributions.


     Last modified:
        28 June 1999.

  6.  Belgian Linux resources

  6.1.  Websites

  6.1.1.  Linux in Belgium


  o  Linux in Belgium <http://linbel.iguana.be/>

  o  Belgian HOWTO <http://dag.mind.be/howto/Belgian-HOWTO.html>

  6.1.2.  Dutch Linux-sites


  o  <http://nl.linux.org/doc/>

  o  Nederlandstalige Linux Documentatie Project
     <http://doc.nllgg.nl/products/>

  o  Linux Support Website <http://www.linux-nl.cx/>

  o  EToS: Educatieve Toepassingen van Open Software
     <http://www.mech.kuleuven.ac.be/%7Ebruyninc/etos/>

  o  Beginnen met Linux
     <http://user.online.be/~koendb/linux_beginners.html>

  o  Installatie Handleiding RedHat 5.2
     <http://user.online.be/~koendb/redhat.html>

  6.1.3.  French Linux-sites


  o  linuxbe.org <http://linuxbe.org/>

  o  linux-france.org <http://www.linux-france.org/>

  6.1.4.  Mirrors in Belgium


  o  Freshmeat at Chello (TVD) <http://be.eu.mirrors.freshmeat.net/>

  o  Linuxberg at Wallonie Internet <http://winbe.linuxberg.com/>

  o  Linuxberg at Online <http://online.linuxberg.com/>

  o  Linuxberg at Pandora (Telenet) <http://pandora.linuxberg.com/>

  o  Linux Gazette at Belnet
     <http://sunsite.belnet.be/alug/ftp_mirrors/linux_gazette/>

  o  Linux Gazette at Linuxbe <http://linuxgazette.linuxbe.org>

  o  LinuxFocus <http://linuxfocus.linuxbe.org>

  o  Linux France <http://linux-france.linuxbe.org>

  6.2.  HOWTO

  The most important collection of Linux information on the net. Please
  if you encounter erroneous information in one of them, do contact the
  author. Only that way it will be corrected and we all stand together
  ;)

  6.2.1.  Web


  o  HOWTO's at KULeuven <http://www.kulnet.kuleuven.ac.be/LDP/HOWTO/>

  o  HOWTO's at SIN <http://www.sin.khk.be/mirror/LDP/>

  6.2.2.  FTP


  o  HOWTO's at Belnet
     <ftp://ftp.belnet.be/mirror/sunsite.unc.edu/pub/Linux/docs/HOWTO/INDEX.html>

  6.3.  HOWTO translations

  As Dutch is less wide-spread, it is the least supported. But work is
  being done to resolve this ;) (and maybe *you* can help ?!?) French
  and German translations obviously are already taken care of.

  6.3.1.  Dutch

  A succesfull initiative is making progress, but there's still a lot to
  do.  If you want to help, start translating and send it there. Check:
  <http://nl.linux.org/doc/HOWTO/>.

  6.3.2.  French

  French translations of HOWTO's can be found at:
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/french/>

  6.3.3.  German

  German translations of HOWTO's can be found at:
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/german/>

  6.4.  FTP

  Most of the times, it doesn't matter where you got it from, as long as
  it works. But to save you some time and save us some bandwidth, it's
  much better to get it near you ;) Naturally I forgot some, please send
  your additions or corrections.

  6.4.1.  Kernel-sources


  o  Official Mirror kernel-sources at Chello (TVD)
     <ftp://ftp.be.kernel.org/>

  o  Mirror kernel-sources at linux.be.eu.org
     <ftp://ftp.linux.be.eu.org/mirrors/ftp.kernel.org/>
  o  Mirror kernel-sources at Digibel
     <ftp://ftp.digibel.be/pub/mirrors/ftp.kernel.org/>

  6.4.2.  Distributions


  o  Red Hat

  o  Official Mirror at Belnet
     <ftp://ftp.belnet.be/mirror/ftp.redhat.com/>
     ftp://ftp.belnet.be/mirror/ftp.redhat.com/pub/redhat/redhat-
     version/arch

  o  Mirror at Chello (TVD) <ftp://ftp.chello.be/mirror/ftp.redhat.com/>
     ftp://ftp.chello.be/mirror/ftp.redhat.com/redhat/redhat-
     version/arch

  o  Mirror at linux.be.eu.org
     <ftp://ftp.linux.be.eu.org/mirrors/ftp.redhat.com/>

  o  Mirror at Pandora (Telenet)
     <ftp://mirrors.pandora.be/mirrors/ftp.redhat.com/>
     ftp://mirrors.pandora.be/mirrors/ftp.redhat.com/redhat/redhat-
     version/arch

  o  Mirror at Digibel
     <ftp://ftp.digibel.be/pub/mirrors/ftp.redhat.com/>

  o  Debian

  o  Official Mirror at KULeuven
     <ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/ftp.debian.org/>

  o  Official Mirror  at spnet <ftp://debian.spnet.net/>

  o  Mirror at EUnet <ftp://ftp.eunet.be/pub/linux/debian/>

  o  Mirror at Skynet
     <ftp://ftp.skynet.be/mirror/linux/distributions/debian/>

  o  Mirror at Pandora (Telenet)
     <ftp://mirrors.pandora.be/mirrors/ftp.debian.org/>

  o  Mirror at Interpac
     <ftp://ftp.interpac.be/mirror/linux/distributions/debian/>

  o  Slackware

  o  Official Mirror at Interpac
     <ftp://ftp.interpac.be/mirror/linux/distributions/slackware/>

  o  Mirror at Skynet
     <ftp://ftp.skynet.be/mirror/linux/distributions/slackware/>

  o  Mirror at Globe <ftp://ftp.glo.be/pub/mirror/Slackware-3.6/>

  o  SuSE

  o  Mirror at Belnet <ftp://ftp.belnet.be/mirror3/ftp.suse.com/>

  o  Mirror at Pandora (Telenet)
     <ftp://mirrors.pandora.be/mirrors/ftp.suse.com/>

  o  Mandrake


  o  Mirror at Belnet <ftp://ftp.belnet.be/packages/mandrake/>

  o  Mirror at Chello (TVD)
     <ftp://ftp.tvd.be/pub/mirror/ftp0.sunet.se/pub/Linux/distributions/mandrake/>

  6.4.3.  Software


  o  Mirrors at Belnet <ftp://ftp.belnet.be/mirror/>

  o  Mirrors at Chello (TVD) <ftp://ftp.chello.be/mirror/>

  o  Mirrors at linux.be.eu.org <ftp://ftp.linux.be.eu.org/mirrors/>

  o  Mirrors at Pandora (Telenet) <ftp://mirrors.pandora.be/mirrors/>

  o  Mirrors at Digibel <ftp://ftp.digibel.be/pub/mirrors/>

  6.5.  Usenet


  o  <news:be.comp.os.linux> at Linux.iguana.be
     <http://linux.iguana.be/archive/>

  o  <news:be.comp.os.linux> at WebWatch
     <http://www.webwatch.be/forums/be.comp.os.linux/MainTable.html>

  6.6.  Mailinglists

  6.6.1.  Linux in Belgium


  o  info@linux.iguana.be

  o  lugs@linux.iguana.be

  6.6.2.  Linux user groups


  o  BLUG Mailinglist

  o  L2U Mailinglist

  o  LILUG Mailinglist

  o  LGOVL Mailinglist

  6.7.  IRC

  The fastest medium to get support is IRC, but beware. Because IRC is
  rather anonymous it's also easy to fool people.

  On IRCnet there's a channel called #linux.be that is closely related
  to bcol and the Belgian Linux-scene. The channel is still small, but
  it surely will grow in time. To get help in English, there's only one
  place #linux.



F BELGIAN-.;1                       	Belgian-HOWTO
  Linux Chinese HOWTO English Version
  Chih-Wei Huang cwhuang@phys.ntu.edu.tw
  Cd Chen cdchen@linux.ntcic.edu.tw
  v1.04, 2 June 1998

  This document demonstrates how to implement Chinese available on Linux
  system, including those common problems encountered on Linux/UNIX sys-
  tem while using Chinese, the ways to obtain, and shows how to install
  and setup a variety of different Chinese softwares. Finally, we would
  like to take a bit little glance at the work for making a complete
  Chinese environment with Linux system.
  ______________________________________________________________________

  Table of Contents



  1. Foreword

     1.1 Introduction
     1.2 Awareness
     1.3 Newest Version
     1.4 Copyright and Announcement
     1.5 Goal
     1.6 Acknowledgement
     1.7 Words from The Translator--Frank J.S. Chen

  2. Difficulties of Using Chinese on Linux System

  3. Where to Get Chinese Softwares?

     3.1 Websites for Chinese softwares
     3.2 Using Archie

  4. Display and Input Chinese

     4.1 xcin+crxvt
        4.1.1 Getting the software
        4.1.2 Installation of xcin
     4.2 yact
     4.3 bcs16
     4.4 chdrv
        4.4.1 Getting chdrv
        4.4.2 Installation of chdrv
     4.5 cxterm
        4.5.1 Getting cxterm
        4.5.2 Installation of cxterm
        4.5.3 Color patch of CXterm
     4.6 XA (Xcin Anywhere)
     4.7 New Added Inputs
        4.7.1 xcin
        4.7.2 yact & bcs16
        4.7.3 chdrv
        4.7.4 cxterm
     4.8 Problems coming with input

  5. Chinese X Window System

     5.1 CXWin
        5.1.1 How to get it?
        5.1.2 Patches
        5.1.3 Installation
     5.2 Installation of Chinese fonts
        5.2.1 Where to get these fonts?
        5.2.2 Installation of X fonts
        5.2.3 Transformations from other fonts to X fonts
     5.3 TaBE & B5LE

  6. Printing for Chinese

     6.1 cnprint
        6.1.1 Where to get it?
        6.1.2 Setting up cnprint
        6.1.3 Installing HBF fonts
        6.1.4 Code Transformation
     6.2 ps2cps
     6.3 bg2ps
        6.3.1 Installing bg2ps
        6.3.2 Installing nps2cps
     6.4 gb2ps
        6.4.1 How to get gb2ps?
        6.4.2 Installing gb2ps

  7. Chinese Printing Softwares

     7.1 LaTeX + CJK
        7.1.1 Getting this software
        7.1.2 Installation
        7.1.3 Tests
        7.1.4 Adding New Fonts
        7.1.5 Creating CJK Documents
     7.2 ChiTeX
        7.2.1 Obatining it
        7.2.2 Installing
        7.2.3 Installing fonts
        7.2.4 Tests
     7.3 Dtop
        7.3.1 How to Get it?
        7.3.2 Installing
     7.4 ChinesePower
     7.5 EasyFlow

  8. Useful Chinese Softwares

     8.1 cjoe - Joe's Own Chinese Editor
     8.2 celvis
     8.3 cvim
     8.4 he
     8.5 hztty
     8.6 ktty
     8.7 Cemacs and CChelp For Emacs
     8.8 Mule
        8.8.1 Obtaining Mule-2.3 and patch for Linux
        8.8.2 Compiling and Installation
        8.8.3 Using Chinese in Mule-2.3
     8.9 hc
     8.10 ctin
     8.11 Some Other Toys

  9. Related Chinese Problems with Others

     9.1 Netscape Navigator
     9.2 sendmail
     9.3 procmail
     9.4 telnet
     9.5 less
     9.6 pine
     9.7 samba
     9.8 lynx
     9.9 minicom
     9.10 fingerd
     9.11 tintin++

  10. Chinese Linux

     10.1 Chinese Linux Documentation's Projects
     10.2 Chinese Linux Project
     10.3 Chinese websites of Linux
     10.4 Discussed groups of Linux

  11. FAQs

     11.1 Why Can't I Enter Chinese?
     11.2 I have got the NTU TTF fonts, but how can I decompress it?
     11.3 Netscape's title and tag cannot see Chinese?
     11.4 My Netscape cannot see Chinese?
     11.5 How to enter Chinese in Netscape?
     11.6 What's the difference between ChiTeX and CJK? Can I install them at the same time?

  12. Appendix - Chinese Softwares of FTP.IFCSS.ORG



  ______________________________________________________________________

  1.  Foreword

  1.1.  Introduction

  NOTE: I write the document to help novices. However, if it didn't,
  that's your problem, not mime! Don't complain that I WASTE your time,
  because nobody has to answer your questions, and nobody has to write
  documents to help you! You have been warned.

  This is a document, as a part of ``Chinese Linux Documentation
  Projects'', introduces the progress in fulfilling Chinese on Linux.
  The special point different from the other CLDP documents is that this
  HOWTO document, in turn, will be the first one and also the only one
  written in Chinese first and then translated into English later.^_^

  I have been made my best effort to ensure the exactness of this
  document, though; however, I couldn't give a guarantee for myself that
  all the operations and configurations can execute exactly and smoothly
  on your system. If any problems or losses have happened to your own
  system because of the executable examples issued in this document,
  which you have been followed, the authors, us, won't be in charge of
  any responsibility.

  The basic purpose carried with this document is to enormously reduce
  the questions repeated again and again, just like "Why can't I
  input/see Chinese?", "Why can't I set xxx up?" and so forth, occurred
  on Internet.  In fact, it is impossible as I knew it...


  1.2.  Awareness

  The shell program used in this document will be sh/bash. If other
  system(such as csh/tcsh) is your choice, you need to pay attention to
  the differences amongst them. On the configuration of environment
  variables, for instance, usage for sh/bash will be,


       # export TERM=vt100



  whereas for csh/tcsh ,


       # setenv TERM vt100



  1.3.  Newest Version

  Simultaneously, I provide the following various formats of different
  versions due to the mechanism of SGML document formats.

  o  Plain Text

  o  HTML

  o  PostScript

  o  SGML

     You can download these formats from the ftp
     siteftp://ftp.phys.ntu.edu.tw/pub/CLDP/howto-translations/.

  Also, you may read directly the newest version of this document on
  line.

  o  <http://www.phys.ntu.edu.tw/~cwhuang/pub/os/linux/CLDP/Chinese-
     HOWTO.html>

  o  HomePage for Chinese Linux Documentation Projects
     <http://www.linux.org.tw/CLDP/Chinese-HOWTO.html>

  English version could be obtained from:

  o  <http://sunsite.unc.edu/LDP/HOWTO/Chinese-HOWTO.html>

  o  <http://www.phys.ntu.edu.tw/~cwhuang/documents/linux-howto/Chinese-
     HOWTO.html>

  Japanese translation is also available at(thanks to
  isaji@mxu.meshnet.or.jp):

  o  <http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/other-
     formats/Chinese/Chinese-HOWTO.html>

  o  <ftp://ftp.kuis.kyoto-u.ac.jp/Linux/JF/other-formats/Chinese/>


  1.4.  Copyright and Announcement

  The copyright of this Chinese HOWTO document belongs to Chih-Wei Huang
  <cwhuang@phys.ntu.edu.tw>.  You can make any copies, distributions and
  spread all or parts of this document. Acyually, you are encouraged
  very much to fulfill that statement real so that more and more netters
  could get some helps from it under the use with non-business. (DO NOT
  remove my name out of it, please.)  For business, contact the authors
  first.  The trademarks or packages mentioned in this document belong
  to the companies or the personal, respectively.


  1.5.  Goal

  I wish this document can offer a complete and self-sufficient
  explanation in the aspect of using Chinese on Linux system. What
  matters concerned with implementations of Chinese on Linux will put it
  all together here!  However, limited to the intelligence and private
  ability, the ultimate goal of my willingness is almost a "mission
  impossible"; therefore, if there are losses or drawbacks in it, please
  let me know it.


  1.6.  Acknowledgement

  I want to thank to Hong Zhang <zhangh@earthlink.net> for being the
  original founder of this Chinese HOWTO document and for his papers of
  being the foundation of this new version.  Also, I need to thank to Cd
  Chen <cdchen@linux.ntcic.edu.tw> for completing the section``Display
  and Input Chinese''.

  The translator, Frank_J.S._Chen <frank63@ms5.hinet.net>, also deserved
  the acknowledgments for translating this document into English.

  Here, there are many people ought to be acknowledged much better for
  the reasons of devoting their efforts to make Linux more reliable in
  Chinese. Because of their hard works, we can nowadays enjoy ourselves
  on a comfortable Chinese environment of Linux.


  1.7.  Words from The Translator--Frank J.S. Chen

  This work begins on 1/8/98 and ends on 1/11/98, which I call the
  version of 0.1, as I always did for the initial states of anything. I
  appreciate the hard work of Chinese version  for its delicate
  statements and not leaving out any detail in the field of Chinese
  practices. The more I translated, the more I learned.  After examining
  all the sentences I've made, there are definitely many of them won't
  like real American-English, or the so called Chinese-styled English.
  Well, if you are skilled in this field of translation or are
  interested in the circle of computers science, anything about this
  English article, just like grammar, writing, internationalization of
  locale with Linux, translation, programming with C/C++, and so forth,
  will be sincerely grateful and excessively welcome, too.(1/11/98,
  modified on 6/2/98) This is the secondary modification of it, focusing
  on the falses of typing, incorrect grammar, and correcting the
  meanings of ambiguous words(maybe a little research on sematics, just
  for this document:-)). I have no ideal about the translating quality
  of this paper, if you feel something strange or ill while reading,
  please let me know about it in my real heart. Pointing out the bad
  parts will be marvelous in spreading out this howto.  As far as I
  know, English version of it had been translated into several foreign
  languages including Japanese, Swedish, etc. If you want to do another
  one, just go ahead, but we suggest you to inform anyone of us about
  that.(6/2/98)



  2.  Difficulties of Using Chinese on Linux System

  This section makes an attempt to do a general description for the
  possible obstacles in using Chinese on Linux; then you could find the
  key points out much easier as you meet with these problems. As a
  matter of fact, the shortcomings described here not only appear on
  Linux but also the other system. Even more, we can say that the whole
  computers environments are concerned. If this section is not suited
  for your tastes or you are eager to act directly, then you can jump
  onto the section``Display and Input Chinese''!

  A Chinese word is composite of two bytes in computers, as we all know.
  The most popular encoding methods includes BIG5 codes available in the
  area of Taiwan and GB codes available in the mainland China. The first
  byte of each word is almost bigger than numeric values 128, which is
  what we called the non-ASCII codes.(The ASCII codes means codes
  smaller than 128.)

  Yes! Then so what? Here are the points! Because of different kinds of
  reasons, in the early days, many programs didn't consider the
  possibility of non-ASCII codes as a part of entering data.

  These kinds of programs always assume that the data prepared to
  manipulation are all limited in the range of ASCII codes, and the most
  worst is that when they meet with non-ASCII codes, an assumption of
  their non-existence and a truncation of the 8th bit is the most
  frequent method they took.  This is the so called 8-bit clean problem.

  Your program, for example, always take it for granted that your inputs
  are all the 7-bit-width ASCII codes. When you enter Chinese words, it
  will erase the 8th bit so that the inputs under circumstances of
  Chinese will become disturbed codes all the way.
  Communication programs on Internet are usually could only transmit
  7-bit data. A notorious substance is the earlier sendmail program.
  sendmail could only send and receive 7-bit mails, causing that the
  strategies of many odd encoding methods, ``Encoding'' which made the
  receivers an excessive disturbance, are recognized as sending out
  Chinese mails(like uuencode, base64, QP and so on).  (Frequently, I
  thought by myself that if the founders of emails could have put much
  foresight on it, then we could have little problems nowadays perhaps.)

  This problem seems to be more complicated on Internet. Even you and
  your receivers all have the machines installed with sendmail program
  which might manipulate with Chinese mails, the receiver might get
  disturbed mails in any way.  This is because this mail before its
  arrival at the target may travel over several hosts settled on
  Internet, if one of the hosts' sendmail cuts the 8th bit off, then
  things go down.  For the programs with the architecture of
  client/server, the problem may be on the end of client, or on the end
  of server; otherwise both of them are.

  Applications which are incapable of identifying the Chinese encoding
  are also a major problem, apart from being unable to deal with non-
  ASCII codes' data. That is, most programs(even if they can deal with
  8-bit data accurately) all take a Chinese word as two individual
  bytes. This won't cause problems under some conditions, but it will
  show an unfortunate disaster under some spots.

  The most obvious matter is that, for instance, even if you can input
  Chinese words properly, but when you hit the backspace key a time
  trying to delete a complete word, the whole word will be split into
  wto parts meaning that only one byte(column) can backspace on monitor
  and the redundant half one then become a disturbed code.  More over
  than that, you might change new line at the second byte of a Chinese
  word in some text editors and then disturbed codes occurred. Besides,
  these text editors might think that a long Chinese sentence as a long
  English sentence without changing to a new line, making the picture of
  screen ugly and chaotic.

  There are more worse matters, too ! Some Chinese words contain special
  codes which correspond to some particular meaning for some
  applications and might make these programs producing severe faults
  while meeting with that codes or just collapse.

  Here below will try to propose some resolved methods but segmental,
  incomplete and also unsatisfactory.  Only when all softwares can fit
  with Chinese, then the problems could really resolve  perhaps.

  However, more and more programs have noticed the significance of
  internationalization, for example, most hosts' ``sendmail'' programs
  now can cope with 8-bit mails exactly --- Not only transmitting
  Chinese mails need 8-bit, but also many multi-media mails need 8-bit.
  ``Lots of softwares'' already don't need to modify at all or just open
  some special options for the purpose of using Chinese.
  Simultaneously, there are more and more persons devoting to the birth
  of Chinese softwares. Let's us wait and expect for it.


  3.  Where to Get Chinese Softwares?


  3.1.  Websites for Chinese softwares

  Most of the Chinese softwares issued in this document can get from
  these sites below:

  o  <ftp://linux.cis.nctu.edu.tw/>

  o  <ftp://linux.csie.nctu.edu.tw/pub/chinese/>

  o  <ftp://chinese.linux.org.tw/pub/Chinese/>

  o  <ftp://NCTUCCCA.edu.tw/Chinese/ifcss/software/>

  o  <http://cnapps.ifcss.org/>

  o  <http://irpslibrary.ucsd.edu/software/chinese_software/index.html>


  3.2.  Using Archie

  There are usually some ordinary questions such as "Where can I find
  xxx...?" appeared on Internet. Actually, there was an excellent
  utility named archie could help you to search softwares you needed.
  Make a link tohttp://archie.edu.tw/archie.html, and then enter the
  name of softwares that you want.  If you have a desire to use xcin,
  for instance, just input xcin can you get all these softwares
  concerned with xcin displayed on screen. Then, choose the nearest site
  to download those softwares. More illustrations in detail can be found
  on the archie's homepage for self-reference.

  You can use text mode, too.  telnet archie.edu.tw and login as archie,
  then type prog FILENAME and press ENTER key, for instance,


       Archie > prog xcin-2.1d.tar.gz
       # Search type: sub.
       # Your queue position: 1
       # Estimated time for completion: 5 seconds.
       working... =

       Host linux.cis.nctu.edu.tw    (140.113.166.117)
       Last updated 08:47 27 Nov 1997

           Location: /packages/chinese/xcin
             FILE    -rw-r--r-- 1106789 bytes  08:58 25 Jul 1997  xcin-2.1d.tar.gz



  4.  Display and Input Chinese

  For environments of Chinese system under DOS or of Windows 95 for
  Chinese that you have been always using to get through Linux hosts,
  there is no doubt that you don't need to take a good look at this
  section. However, when your local host is Linux-based system,
  configurations for Chinese system are definitely necessary.

  4.1.  xcin+crxvt

  It is truly suggested that you can take the combinations of xcin and
  crxvt as a pathway to solve the problems of Chinese I/O if the X
  Window System is acquainted with you.

  Xcin, with a contraction of X Window Chinese INput, is a Chinese Input
  System executed under the X mode. Because xcin is utilizing the
  architecture of client/server, all you have to do is just to start one
  xcin window so that you can manipulate with many crxvt virtual
  terminals under the same window, which can exhaust much little
  resources.  Also, it offers some wise programs of input, like Wang-
  Hsing Input or Natural Input, which can select the matching phases by
  themselves. In the early age, in order to convert fonts and inputs
  table to fit with xcin, you need the ETen Chinese System mounted first
  before the installation of xcin. After the man, Tung-Han Hsieh,
  <thhsieh@twclx.phys.ntu.edu.tw> became responsible for the voluntary
  maintenance of xcin, this terrible problem had been resolved!

  The newest version is 2.3.02 now. But this one is just a version of
  beta. For the more stable one, I advise you to fetch the xcin-2.1d for
  a suggestion in my mind.


  4.1.1.  Getting the software

  Download the sources of xcin from this ftp site below:

       ftp://linux.cis.nctu.edu.tw/packages/chi-
       nese/xcin/xcin-2.1d.tar.gz
       ftp://linux.cis.nctu.edu.tw/packages/chi-
       nese/xcin/xcin-2.3.02.tar.gz



  4.1.2.  Installation of xcin

  You need the xcin-2.3.02.tar.gz file at hand first to setup xcin of
  version 2.3.02 and untar and unzip it under any certain directory.


       # tar xzvf xcin-2.3.02.tar.gz
       ....
       # cd xcin-2.3.02
       # ./configure (Follow the instructions on screen to modify the options you picked up in turn.)
       # make
       # make install



  So, you have finished the setup of xcin of version 2.3.02 from now on.

  You can also get the same sort of xcin, named xcin-2.3.02.i386.rpm,
  maintained by Cd Chen for RedHat Linux System.

       ftp://linux.ntcic.edu.tw/personal/cdchen/Chinese-RedHat-
       Packages/XCIN/RPMS/xcin-2.3.02-1.i386.rpm


  Install it by


       # rpm -Uvv xcin-2.3.02-3.i386.rpm



  4.2.  yact

  yact is the system of displaying and inputing Chinese running under
  the terminal mode. The most different point from chdrv is that yact
  uses your computers' displaying card through svgalib library. Without
  the information of your video card contained in the svgalib, you may
  not probably make yact work on your Linux.

  The most admirable point for yact is that the fonts are scanned with
  24x24 on the monitor and are more beautiful than other terminal
  Chinese input system. And it is more smooth than the others in dealing
  with scrolling pages. The newest version of yact is yact-p4 now.

  You can get yact here below,

       ftp://linux.cis.nctu.edu.tw/packages/chi-
       nese/yact/yactp4.tar.gz


  The ways to setup yact are simple, too. After getting the sources of
  yact, decompress it and examine whether the Makefile file is correct
  or not, then type make all install directly on shell prompt to com-
  plete the installation of bits files.  Read the README file for more
  detailed information.

  Next is the step of fonts' setup. yact uses the HBF fonts, but you
  can't find the fonts in the packages of yact, which means you need to
  take extra actions to make it available. Having ETen Chinese System
  mounted is an original recommendation from the founder for its fonts.
  Copy the HBF fonts' description file et24.hbf under the fonts
  directory of sources of yact to the directory /usr/local/lib/yact and
  rename it as hzfont.hbf. Then copy STDFONT.24, SPCFSUPP.24, SPCFONT.24
  and ASCFONT.24 fonts files to the directory /usr/local/lib/yact and
  rename ASCFONT.24 as 12x24.

  The free HBF fonts are available, too. Change names of these 256 ASCII
  fonts as 12x24 and names of the HBF fonts' description file as
  hzfont.hbf. Put both of description files and fonts files into
  /usr/local/lib/yact, then everything will be ok.


  4.3.  bcs16

  Because yact needs the svgalib 1024x768 mode to work, many netters
  without ET4000 series cards cannot get well supports from it, causing
  their sickness of this excellent Chinese system.  The bcs16 is
  modified from yact according to this drawbacks. It needs only 640x480
  and can work very well on most video cards.

  Get bcs16 from this site:

       ftp://linux.cis.nctu.edu.tw/packages/chinese/bcs/bcs007a.tgz


  Installation

  o  Decompress and compile it to setup

     # tar zxvf bcs007a.tgz
     # cd bcs16
     # make
     # cp bcs16 /usr/local/bin



  o  bcs16 take yact's input table as default and this is the reason
     that you must setup yact first before bcs16 can work. However,
     version of v0.05 or laters have been emerged with the support of
     individual Boshiamy input, so if you don't need other inputs
     provided from yact, you don't need to install yact first.  Just
     fetch Boshiamy input table, liubig5.tab, of DOS version and put it
     into the directory /usr/local/lib/yact .

  o  Put files under directory data into /usr/local/lib/yact and all the
     legal fonts files, namely spcfont.15, spcfsupp.15, andstdfont.15 ,
     are need to put together in the same place, too.

  o  If you want to see GB codes or Japanese or Korean, get fonts
     cclib.16.gz cclib.16a.gz, jis.16.gz, ksc.16.gz from the site below
     and decompress them into /usr/local/lib/yact.

       ftp://nctuccca.edu.tw/Chinese/ifcss/software/fonts/


  o  If you have the files of creating fonts or sets of Sea-Fonts, you
     can copy them to the directory /usr/local/lib/yact/usrfont.15m too.

  o  Execute bcs16. Pressing Alt-H can get more advanced explanations of
     instructions.


  The founder of bcs16 iscnoize.bbs@bbs.cis.nctu.edu.tw.



  4.4.  chdrv

  chdrv is a Chinese emulator program displaying and entering Chinese
  through console. Because chdrv access the tty device directly, it must
  be activated by the root. Now, chdrv is maintained by Yu-Chung Wang
  <wycc@iis.sinica.edu.tw> and the newest one is chdrv-1.0.10.


  4.4.1.  Getting chdrv

  You can get it from

       ftp://linux.cis.nctu.edu.tw/packages/chinese/chdrv/


  Get the source package, chdrv-1.0.10.tar.gz, binary package,
  chdrvbin-1.0.10.tar.gz, and fonts package, chdrvfont.tar.gz, respec-
  tively.


  4.4.2.  Installation of chdrv

  Unzip and untar the compressed binary file,


       # tar xvzf chdrvbin-1.0.10.tar.gz
       # mv chdrvfont.tar.gz chdrv-1.0.10/
       # cd chdrv-1.0.10



  Read the illustrations for installation in file INSTALL.1.0 to modify
  file install. If you want your shadow password to works, you need to
  change the settings in chinese.conf. Erase the following comments off,

  LOGINPROGRAM /bin/telnet


  Freeze this line into remarks,

  LOGINPROGRAM /bin/login


  Now, you can execute the installation script.



  # ./installbin



  4.5.  cxterm

  cxterm is a Chinese virtual terminal running under X Window System,
  and is the oldest Chinese displaying and inputing virtual terminal,
  which is provided various codes for Chinese, including BIG5 codes, GB
  codes, HZ codes and so on.  Because each cxterm opened needs to load
  Chinese data into the main memory, system resources are exhausted
  quite largely for it.


  4.5.1.  Getting cxterm

  The newest one is version of 5.0.p3 named cxterm5.0.p3.tar.gz, which
  contains both of cxterm codes and Chinese fonts. You can get it from
  here below,

       ftp://ftp.ifcss.org/pub/software/x-win/cxterm/


  Or the rpm at ftp.redhat.com: cxterm-color-5.0p3-1.i386.rpm, cxterm-
  color-big5-5.0p3-1.i386.rpm, cxterm-color-gb-5.0p3-1.i386.rpm.

       ftp://ftp.redhat.com/pub/contrib/hurricane/i386/



  4.5.2.  Installation of cxterm

  Decompress the packed,


       # tar -xvzf cxterm5.0.p3.tar.gz



  The upper instruction will produce a new directory cxterm-5.0, and
  then invoke instructions as follows:


       # cd cxterm-5.0
       # ./config.sh



  You need login as root to execute ``./config.sh'' if you wish all
  users on your computer can use cxterm well, then you can finish the
  steps of setup following the descriptions below:



    0. Read COPYRIGHT Notice
    1. Compile, Install, and Configure "CXTERM 5.0" in One Step

    2. Compile cxterm (not to install)
    3. Install cxterm (after successful compilation in 2)
    4. Install additional Chinese font(s) for your X window
    5. Configure your account for using cxterm (after installation in 3)

    x. Exit
  Please choose (0/1/2/3/4/5/x) :



  If you wish all things going through automatically, please choose 1,
  and then enter the name of directory where to store the cxterm. If
  asking me, I will suggest this place, /usr/local/chineseD There are
  two kinds of Chinese fonts coming with the packed package, choosing 1
  and 3 will make the procedure of installation all automatic.  In
  addition, you can select 4 to install some extra fonts, too. After
  achieving this setup, you need to put cxterm and CXterm into the path
  of searching directory.


       # export PATH=$PATH:/usr/local/chinese/bin



  CXterm is just a shell script to load the resources of X and cxterm
  in.  For using GB codes, invoke this following command,


       # CXterm -gb



  For BIG5 codes, invoke this following command,


       # CXterm -big5



  4.5.3.  Color patch of CXterm

  On the websiteftp://ftp.ifcss.org/pub/software/x-win/cxterm, there is
  a color patch for cxterm as well. Using this patch can make cxterm
  showing colors of ANSI.  Assuming that you put the original files of
  cxterm under the /tmp/cxterm-5.0, then


       # cp cxterm-5.0.p3-color.patch.gz /tmp
       # gzip -d cxterm-5.0.p3-color.patch.gz
       # patch < cxterm-5.0.p3-color.patch
       # cd cxterm-5.0
       # ./config.sh



  4.6.  XA (Xcin Anywhere)

  XA is a small tool of an abbreviation for Xcin Anywhere, which can let
  you enter Chinese words with xcin under any common X-based softwares.
  If making XA coordinating with CXWin(or XA+CV), you can get an
  environment of accessing Chinese for softwares not supported with
  Chinese. Thus, the xterm will become cxterm-like naturally. Cool,
  doesn't it?  XA is now extremely unstable as though, and you have to
  take charge of all risks if you want to explore it. As most things do,
  before working with XA, you must make xcin installed first. You can
  pick XA up into your pocket from here below:

       ftp://linux.cis.nctu.edu.tw/packages/chinese/xcin/XA/


  Decompress the packed. Run ./configure to produce mk and config.h on
  account for the compilation by using ./mk.  If it works, key in ./mk
  test xterm next to see if the xcin can be called out and enter Chinese
  under xterm to test.  If there is no problem, copy wrap.so to
  /usr/local/lib/ following the syntax below:


       # LD_PRELOAD=/usr/local/lib/wrap.so netscape &



  Then, just follow the general method of using xcin.

  Founder of XA isweijr.bbs@bbs.ntu.edu.tw.



  4.7.  New Added Inputs

  At present, there are two common formats of input table, namely tit
  and cin, which both are plain text of formats. (That's means you can
  edit them directly from text editors.)  However, most Chinese Systems
  almost provide utilities for the purpose of exchanging pure text of
  formats into special binary of formats in order to speed up searching
  method.  Before you setup some certain input, you must own it's tit ,
  cin, or formats after transformation first .

  I will take the Bo-Shia-My input as an example to show how to add it
  under each kind of Chinese system.  The input tables mentioned here
  can be found atftp://ftp.cis.nctu.edu.tw/UNIX/Chinese/Boshiamy/.

  Other tit files are also available at
  ftp://ftp.ifcss.org/pub/software/x-win/cxterm/dict/.


  4.7.1.  xcin

  Make use of utility cin2tab provided from xcin to transform the cin
  table into tab one.


       # cin2tab boshiamy.cin



  It will produce the two files: boshiamy.tab and boshiamy.tab.rev. Put
  them into the directory of xcin and activate xcin next:


  # xcin -in9 boshiamy.tab



  To use Bo-Shia-My input, press the combination keys CTRL-ALT-9.


  4.7.2.  yact & bcs16

  yact takes the use of cit of version 2, and the same as cxterm. You
  can use the tool tit2cit accompanied with yact to make transformation
  available between boshiamy.tit and cit.

  Move boshiamy.cit into /usr/local/lib/yact and establish a symbol link
  for it:


       # ln -s boshiamy.cit 9



  Like xcin does, Hit CTRL-ALT-9 for calling Bo-Shia-My input.


  4.7.3.  chdrv

  At first, put boshiamy.tbl into /usr/local/lib/chinese.  Secondly,
  modify /etc/chinese.conf, adding the follow section INPUT into it.

  ______________________________________________________________________
  BEGIN INPUT
  PHONETIC /usr/local/lib/chinese/phone.def
  MULTI /usr/local/lib/chinese/boshiamy.tbl
  END INPUT
  ______________________________________________________________________


  Finally, use utility chconfig of chdrv to make the contents of
  /etc/chinese.conf effective.


  4.7.4.  cxterm

  Change boshiamy.tit into cit or citnf with the utility tit2cit of
  cxterm, then modify .Xdefaults to set a combination key for acting Bo-
  Shia-My input. Please refer to the technical document coming with
  cxterm for more information about installation and implementation in
  detail.



  4.8.  Problems coming with input

  After you accomplished the establishments of Chinese System, you have
  already been able to display Chinese on your Linux through monitors.
  However, as using a Chinese editor, you will find that the Linux
  system can only display Chinese but cannot accept the input of
  Chinese.  You have to modify two spots, by yourself, to make Linux
  system becoming acceptable with output and input of Chinese if you
  want to improve these problems At beginning, you need to add the
  locale setting to the shell profile file (Referring to the locale
  mini-HOWTO when concerning with locale).  Additionally, adding sets
  about inputs for the .inputrc file under your home directory is
  necessary too. (Please create it yourself if .inputrc didn't ever
  exist.)  Here are the configurations concerning with shell profile
  file and .inputrc file which are distributing on public domain(just as
  a reference, though):

  Bash Shell: Appending the following contents into /etc/profile,
  please.

  ______________________________________________________________________
  stty cs8 -istrip
  stty pass8
  export LANG=C
  export LC_CTYPE=iso-8859-1
  ______________________________________________________________________



  Tcsh Shell: Appending the following contents into /etc/csh.login or in
  /etc/csh.cshrc, please.

  ______________________________________________________________________
  stty cs8 -istrip
  stty pass8
  setenv LANG C
  setenv LC_CTYPE iso-8859-1
  ______________________________________________________________________



  $HOME/.inputrc file for setup lists as follows:

  ______________________________________________________________________
  set convert-meta off
  set output-meta on
  ______________________________________________________________________



  Eventually, prepare a text file contained with Chinese words by
  yourself, and use tool grep to search it. If it can find something
  exact, this means that your Linux system can work with Chinese words
  already.



  5.  Chinese X Window System

  X Window System is a software with powerful environment of graphical
  user interface under UNIX System. XFree86 is a modified version from
  MIT X Window System and also freely distributed.

  5.1.  CXWin

  The Chinese X, abbreviated with CXWin, is really a patch of XFree86,
  making it can show Chinese words under X Window System.  Founder of it
  is srlee <mailto:srlee@csie.nctu.edu.tw>.  CXWin only support BIG5
  code at present, and can let you be possessed of Chinese pop-up menus,
  of Chinese titles of windows, and of showing Chinese under a variety
  of window managers and applications.


  5.1.1.  How to get it?

  You can get CXWin 3.3 from this ftp site below:


  ftp://linux.cis.nctu.edu.tw/packages/X/Xserver/CXwin/3.3/


  If you use XFree86 3.2, you can get the Linux ELF format of version
  3.2.

       ftp://linux.cis.nctu.edu.tw/packages/chinese/CXwin/binaries/



  All you need is to get the corresponding X server. For example, if
  your video card is matched with XF86_SVGA, just take XF86_SVGA.gz
  home.  XF86_SVGA.gz should work properly on most video cards.

  If you system is compatible with rpm, you can get the newest CXWin
  3.3.1 of rpm.

       ftp://linux.cis.nctu.edu.tw/packages/X/Xserver/CXwin/3.3.1/



  5.1.2.  Patches

  You can get the patches at the same place to compile to binary files
  by yourself if you've got the sources of XFree86.


  5.1.3.  Installation

  Make sure that you have these shared libraries if your choice is CXWin
  3.3 (You can use ldconfig -p for an observation):


       libm.so.5 => /lib/libm.so.5.0.6
       libdl.so.1 => /lib/libdl.so.1.7.14
       libc.so.5 => /lib/libc.so.5.3.12



  If your choice is CXWin 3.2, then you need the libc of version 5.2.18
  or newer.

  First, unzip the compressed files of gzip.


       # gzip -d XF86_SVGA.gz



  Duplicate the original X server as a copy as the root identification.


       # cd /usr/X11R6/bin
       # mv XF86_SVGA XF86_SVGA_BACKUP



  Put the decompressed CXWin into the exact place and create the decent
  symbolic link:



  # mv /tmp/XF86_SVGA /usr/X11R6/bin
  # chown root.bin XF86_SVGA
  # chmod 4755 XF86_SVGA
  # ln -sf XF86_SVGA X



  If your choice is rpm, then everything is more simple and more
  compact.


       # rpm -Uvv XFree86-SVGA-3.3.1-1c.i386.rpm



  CXWin needs the following four BIG5 fonts to work normally: taipei15,
  taipei16, taipeik20 and taipeik24.  Install these Chinese fonts in
  accordance with the method of next section.


  5.2.  Installation of Chinese fonts

  5.2.1.  Where to get these fonts?

  Maybe you have already installed some Chinese fonts; for GB fonts, you
  can find them out through the next way:


       # xlsfonts | grep gb
       -cclib-song-medium-r-normal--0-0-72-72-c-0-gb2312.1980-1
       -cclib-song-medium-r-normal--16-160-72-72-c-160-gb2312.1980-1
       -isas-fangsong ti-medium-r-normal--0-0-72-72-c-0-gb2312.1980-0
       -isas-fangsong ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
       -isas-song ti-medium-r-normal--0-0-72-72-c-0-gb2312.1980-0
       -isas-song ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
       -isas-song ti-medium-r-normal--24-240-72-72-c-240-gb2312.1980-0
       hanzigb13fs
       hanzigb13st
       hanzigb16fs
       hanzigb16st
       hanzigb24st



  The last five fonts are the previous five ones' aliases. To check the
  installed BIG5 fonts, using


       # xlsfonts | grep big5
       -kc-kai-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
       -kc-kai-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
       -kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
       -kc-ming-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
       -kc-ming-medium-r-normal-fantizi-15-150-75-75-c-160-big5.eten.3.10-1
       -kc-ming-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
       -uw-ming-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
       -uw-ming-medium-r-normal-fantizi-16-160-75-75-c-160-big5.eten.3.10-1
       -uw-ming-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
       -uw-songti-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
       -uw-songti-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
       -uw-songti-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1


  You can take all of it from this ftp siteftp://ftp.ifcss.org/pub/soft-
  ware/fonts/ if you haven't installed any of them or if you want more
  of them. The gb/bdf/ amongst them is a GB font while the big5/bdf is a
  BIG5 font.

  5.2.2.  Installation of X fonts

  Assuming that you have already got a BIG5 font, eb5-24k2.bdf.gz, and a
  GB font, gb24st.bdf.gz. What you have to do first is that changing
  them into the format of .pcf.


       # gzip -cd eb5-24k2.bdf.gz | bdftopcf -t > eb5-24k2.pcf
       # gzip -cd gb24st.bdf.gz | bdftopcf -t > gb24st.pcf
       # compress *.pcf



  Then install them under /usr/X11R6/lib/X11/fonts/misc


       # mv *.pcf.Z /usr/X11R6/lib/X11/fonts/misc/
       # cd /usr/X11R6/lib/X11/fonts/misc
       # mkfontdir .



  Now it should contain the following two lines in fonts.dir:


       eb5-24k2.pcf.Z -kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
       gb24st.pcf.Z -isas-song ti-medium-r-normal--24-240-72-72-c-240-gb2312.1980-0



  You can create other aliases for these fonts for the advantages of
  saving typing time when using Chinese softwares.  Add the two lines in
  fonts.alias,


       gb24st    "-isas-song ti-medium-r-normal--24-240-72-72-c-240-gb2312.1980-0"
       taipeik24 "-kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1"



  Next, tell X Server to reload these fonts,


       # xset fp rehash



  If everything is fine, you can use the new fonts now:


       # cxterm -GB -fn 12x24 -fh gb24st &



  You can put these fonts into another directory, too, for instance,
  /usr/X11R6/lib/X11/fonts/chinese.  If this works, you have to add this
  line /etc/XF86Config to the Section "Files",


           FontPath    "/usr/X11R6/lib/X11/fonts/chinese/"



  So, when you start X next time, you can use these fonts without any
  problems.


  5.2.3.  Transformations from other fonts to X fonts

  There is a TTF2BDF program, written by lwj, can let you transform the
  TTF fonts of Windows into BDF fonts. You can get it from here below:

       ftp://linux.cis.nctu.edu.tw/packages/chinese/TTF2BDF.EXE


  This is a Win32 program, thus you must execute it on Windows 95 or NT.

  Next step is that change BDF into PCF, then you can use it under X.
  (You can use BDF directly under X; but that BDF carried with bigger
  sizes means PCF will be a better choice though.)


       # bdftopcf -t < ming.bdf > ming.pcf



  You may change HBF into BDF and PCF fonts, too. Here is the ftp site
  for the utility of transformation.

       ftp://ftp.ifcss.org/pub/software/fonts/utils/hbf.tar.gz



       # hbftobdf ccfs24.hbf > ccfs24.bdf
       # bdftopcf -t < ccfs24.bdf > ccfs24.pcf



  Other nice font conversion programs are available at:

       ftp://crl.nmsu.edu/CLR/multiling/Gen-
       eral/ttf2bdf-1.8-ELF.tar.gz
       ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed-3.0.tar.gz



  5.3.  TaBE & B5LE

  TaBE and B5LE(Big5 Locale Environment) are projects both based on
  locale for solving the Chinese ability under X.  If we can finish
  them, then the problems coming with Chinese I/O under X can be
  resolved thoroughly.

  The TaBE author, shawn, has been taken for the military service in
  Taiwan, and the homepage of TaBE had been removed either(so awfully?),
  so this project has been dead from that time.
  Author of B5LE is Thinker <Thinker.bbs@bbs.yzu.edu.tw>. However, the
  major platform is FreeBSD , though. If someone install B5LE
  successfully on Linux platform, please let me know about it. The
  concerned homepage is listed as follows:

       <http://ftp-cnpa.yzit.edu.tw/~thinker/B5LE/>



  6.  Printing for Chinese

  This section will teach you how to print Chinese documents, but
  without the demonstrations of how to set up your printer; that you
  have to make it all ready by yourself.  Tools introduced in this
  section are all for transformations to PostScript format; hence, you
  need to set your printer up in order to print PostScript files. If
  your printer doesn't support PostScript directly, you can install
  ghostscript instead.  Please refer to Printing HOWTO.


  6.1.  cnprint

  cnprint is a printing tool for the purpose of changing Chinese text
  files into PostScript format, of which commands are the same as the
  standard ones. It supports GB, HZ, and BIG5 codes simultaneously.


  6.1.1.  Where to get it?

  Download it from ftp://ftp.ifcss.org/pub/software/unix/print, of which
  name is cnprint280.tar.gz.


  6.1.2.  Setting up cnprint

  cnprint280.tar.gz contains only five files.


       # ls
       cnprint.1          cnprint.cmd        cnprint280.README
       cnprint.c          cnprint.help



  Compile it through this way below:


       # gcc cnprint.c -o cnprint
       # mv cnprint /usr/local/bin
       # mv cnprint.1 /usr/local/man/man1



  6.1.3.  Installing HBF fonts

  HBF fonts includes both description files and fonts files. A .hbf is
  the header file describing fonts, with a texture of plain text,
  recording the file names of its fonts files.  Both of two files must
  be installed yourself. You can find them at
  ftp://ftp.ifcss.org/pub/software/fonts/.


  If you want to use ccfs24.hbf, for example, which is a sort of
  simplified Sung-imitated style font, you must obtain these three
  following files: ccfs24.hbf, cclib.n24 and ccsym.24.  In the ifcss
  fonts directory, 00index.txt lists all HBF fonts' filenames.
  Establish a specific directory to store HBF fonts, just like
  /usr/local/lib/chinese/HBF/, for instance. Put all HBF description
  files and fonts files you've got together under this directory, then
  export the complete directory pathname for HBF out of environmental
  variables.


       # export HBFPATH="/usr/local/lib/chinese/HBF/"



  This file cnprint.cmd contains some default values for cnprint, that
  you have to fix them up to point to the HBF fonts you have installed,
  and then export it to $HBFPATH.


       # cp cnprint.cmd $HBFPATH



  Now, you can use ``cnprint -w FILENAME'' to change Chinese text files
  into PostScript files well. For more information in detail, take a
  look at man cnprint yourself.


  6.1.4.  Code Transformation

  The cnprint 2.80 has been added a great deal of splendid abilities
  such as transformations amongst various code formats, for example,
  BIG5 <=> GB <=> HZ.  For BIG5 <=> GB, you need another tabulation for
  installing, though, which can be found from this following site:

       ftp://ftp.ifcss.org/pub/software/unix/convert/hc.tab


  Put it under the fonts directory of HBF, and modify cnprint.cmd,
  adding this


       DEFAULT_GBB5_TABLEFILE: /usr/local/lib/chinese/HBF/hc.tab



  Not only, for BIG5 into GB codes, can the transformation of cnprint
  2.80 against words to words be done, but also the work against phases
  to phases. However, cnprint itself didn't offer the dictionary for
  transformations, that means that you have to create a dictionary
  yourself if you need one. Please refer to man cnprint for more
  details.


  6.2.  ps2cps

  The purpose of this small program is to make PostScript files, which
  could not pork Chinese out to output devices, available for Chinese
  output.  For example, when Netscape is printing files, it will
  transport files into PostScript formats first; however, the outputs of
  PostScript won't load Chinese fonts so that the original parts of
  Chinese words will become disturbed codes to output.  This program can
  read PostScript in, and replace the disturbed codes with corresponding
  words; afterwards pork the results out to the standard output devices,
  which the output data can send to the printer that can print
  PostScript documents.

  Pick ps2cps up from this site:

       ftp://linux.cis.nctu.edu.tw/packages/chi-
       nese/misc/ps2cps-0.1.tgz


  Untar and unzip this file, and modify Makefile according to your
  demands:


           BINPATH    : Installing pathname for binary ps2cps
           PS2CPSPATH : Resources files' pathname for PS2CPS
           PS2CPSRC   : Filename of resources files for PS2CPS



  Next step is make all install.

  You have to install HBF Chinese fonts first according to the previous
  section, and then modify your ps2cpsrc file:


           HBF_PATH:      Define the directory pathname of HBF fonts
           HBF_NAME:      Define filenames of HBF fonts(NOT including pathname)
           CH_WORD_SHIFT: Define shift of Chinese fonts



  The last item is used for adjustment of Chinese fonts' locations. Some
  Chinese fonts and the original English fonts may probably not locate
  on the same horizontal level line, so you can set this variable, of
  which numeric values ranging from -1.0 to +1.0, activated to adjust it
  up or down.

  So, you can use that examples made from the founder to do some tests:


       # ps2cps thhsieh.ps > c-thhsieh.ps



  Use ghostview to see whether you can see Chinese words or not.

  However, this program is still under beta, there are so many problems
  waitting for resolving. If you have any questions or recommendations,
  you can send messages to the author directly: Tung-Han Hsieh
  <thhsieh@twclx.phys.ntu.edu.tw>.


  6.3.  bg2ps

  This is another program which can transform BIG5-based Chinese files
  into PostScript available for printing(the same as cnprint).  But
  because it uses the TrueType fonts, the output is more beautiful than
  others. In addition, it has a script which can transform PostScript
  out of Netscape into Chinese.  The author is Chen-Shan Chin
  <cschin@u.washington.edu>.

  Get this software from this web site:

       <http://weber.u.washington.edu/~cschin/bg2ps/>



  6.3.1.  Installing bg2ps

  Decompress and compile it:


       # mkdir bg2ps
       # cd bg2ps
       # tar xzvf bg5ps.tgz
       # gcc -O2 ttf2psm.c -o ttf2psm



  Install TrueType fonts next. You can install it under the same
  directory of bg2ps or can assign another directory for use. Refer to
  ``Installing TTF fonts'' for more explanations.  Then create a
  .bg5ps.conf under the directory, and you can pick directly up the
  sample file coming with this program to modify.  The most important is
  to assign the directory where you installed the TrueType fonts to
  chineseFontPath, and rename the content of fontName to the fonts name
  you used.

  Test the sample coming with it, and view the output as ghostview or
  gv.


       # ./bg5ps -if test.big5 -of test.ps
       # ghostview test.ps



  6.3.2.  Installing nps2cps

  The nps2cps has no extra configuration files. You need to modify
  yourself  chineseFontPath and fontName in nps2cps script.

  Test nps2cps:


       # nps2cps < netscape.ps > test.ps
       # ghostview test.ps



  6.4.  gb2ps

  The gb2ps program is another tool for printing GB and HZ codes.


  6.4.1.  How to get gb2ps?



          Package:

        gb2ps.2.02.tar.gz


     ftp://ftp.ifcss.org/pub/software/unix/print



          Fonts:

             csong24.ccf     ckai24.ccf
             cfang24.ccf     chei24.ccf


          ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/


  Put the fonts under certain self-established directory, just like
  /usr/local/lib/chinese/CFONT.


  6.4.2.  Installing gb2ps

  Change the settings in Makefile before compiling gb2ps.


       CFONT=/usr/local/lib/chinese/CFONT/
       COVERPAGE=/usr/local/lib/chinese/lib/cover.ps



  Then type these commands and hit return key,


       # make
       # cp gb2ps /usr/local/bin



  7.  Chinese Printing Softwares

  7.1.  LaTeX + CJK

  TeX/LaTeX is a set of printing softwares, of which excellent and
  elegant output quality have been admiring and adopting out of the
  academic circles for several years. The CJK is a LaTeX2e macro
  package, which can let you use CJK (Chinese/Japanese /Korean) literal
  codes in TeX documents.

  You need install TeX/LaTeX first on your Linux system; many Linux
  distributions have been included teTeX/LaTeX already. If haven't, you
  could install it by yourself. Please link to teTeX HOWTO for more
  information.


  7.1.1.  Getting this software

  Obtain CJK 4.1.3 from this site:

       ftp://nctuccca.edu.tw/Chinese/ifcss/soft-
       ware/tex/CJK-4.1.3.src.tar.gz

  Bring the demanded TTF fonts home:

       ftp://nctuccca.edu.tw/Chinese/ifcss/software/fonts/big5/ms-
       win/



  7.1.2.  Installation

  You must have an clear ideal about the teTeX/LaTeX installing
  directory, $TEXMF, for example, /usr/lib/texmf.  And I assume that you
  will use the ntu_kai.ttf font; if doesn't, make a change to match it.


  o  Put the downloaded fonts, after ``decompression'', into the
     $TEXMF/fonts/truetype/chinese.

  o  Unzip and untar CJK-4.1.3.src.tar.gz, and mv the sub-directory
     texinput to $TEXMF/tex/latex, and rename it to CJK, and create the
     fonts directory.


       # cd 4_1.3/; mv ./texinput $TEXMF/tex/latex/CJK
       # mkdir -p $TEXMF/fonts/tfm/chinese/ntukai
       # mkdir $TEXMF/ttf2pk
       # mkdir $TEXMF/hbf2gf



  o  To come immediately, it will probably be the most difficult step.
     You need to invoke patch command to append *.diff under
     4_1.3/doc/teTeX upon these following files:


         /usr/bin/MakeTeX*
         $TEXMF/web2c/texmf.cnf
         $TEXMF/fontname/special.map



  For instance:


       # cd /usr/bin
       # patch -s < 4_1.3/doc/teTeX/MakeTeXPK.diff



  According to the enormous TeX versions, your action with patch may
  fail perhaps. If so, you need to do it manually by yourself to patch
  these parts of failure( the portions of failure will record in .rej).
  If you don't understand the theory of patch well, you had better get
  someone experienced to help you.

  o  Compiling and installing bg5conv


       # cd 4_1.3/utils/Bg5conv; gcc -o bg5conv bg5conv.c
       # chmod 755 bg5latex
       # cp bg5conv bg5latex /usr/local/bin/
       # gzip bg5conv.1; cp bg5conv.1.gz /usr/local/man/man1/

  Because there are some codes in BIG5 TeX documents may contain {, }, &
  and so forth, which are the specific tokens to TeX , the bg5conv can
  change this codes into certain format that can let TeX manipulate.

  o  Compile and install ttf2pk, which can change TrueType fonts into
     TeX's pk fonts.


       # cd 4_1.3/utils/ttf2pk/src
       # make all OS=unix
       # cp ttf2pk /usr/local/bin/
       # cd ..
       # cp config/ttf2pk.cfg  $TEXMF/ttf2pk/
       # gzip ttf2pk.1; cp ttf2pk.1.gz /usr/local/man/man1/
       # cp c00kai.fd $TEXMF/tex/latex/CJK/Bg5/
       # cp MakeTTFPK /usr/local/bin



  o  If you want to print documents vertically, you have to edit a
     c00kair.fd file under $TEXMF/tex/latex/CJK/Bg5/:


     ___________________________________________________________________
     \def\fileversion{4.1.0}
     \def\filedate{1996/11/20}
     \ProvidesFile{c00kair.fd}[\filedate\space\fileversion]

     % traditional Chinese characters in Big 5 encoding scheme.

     % font shape: kai
     % ntu_kai.ttf is Kai3 Shu1 (&quotmodel book")

     \DeclareFontFamily{C00}{kair}{}

     \DeclareFontShape{C00}{kair}{m}{n}{<-> CJK * ntukar}{}
     \DeclareFontShape{C00}{kair}{bx}{n}{<-> CJKb * ntukar}{\CJKbold}

     \endinput
     ___________________________________________________________________



  o  Execute texconfig:


       # texconfig rehash
       # texconfig hyphen



  7.1.3.  Tests


  o  Horizontal printing tests:



  # cd 4_1.3/examples
  # bg5latex Big5.tex          (See if there is a Big5.dvi appeared ?)
  # xdvi Big5.dvi              (Can you see Chinese? Of course, in X mode)
  # dvips Big5.dvi -o Big5.ps  (Change to PostScript format)
  # ghostview Big5.ps          (View it as ghostview)
  # lpr Big5.ps                (Send it to printers, see if there are Chinese printed.)



  o  Vertical printing tests: You can use the Big5vert.tex file under
     examples to repeat those previous procedures.


  7.1.4.  Adding New Fonts

  For example, if you want to change to the Ming style font ntu_mm.ttf,
  then


  o  put your TrueType fonts under $TEXMF/fonts/truetype/chinese.

  o  And then add the two lines in $TEXMF/ttf2pk/ttf2pk.cfg:


       ntumm:  -e Big5 $TEXMF/fonts/truetype/chinese/ntu_mm.ttf
       ntummr: -r 1 -e Big5 $TEXMF/fonts/truetype/chinese/ntu_mm.ttf



  o  Create the c00ming.fd file:


       # cd 4_1.3/utils/ttf2pk
       # cp c00ming.fd $TEXMF/tex/latex/CJK/Bg5/



  o  Execute the texconfig again.

  o  Change kai to ming in file 4_1.3/examples/Big5.tex, and then repeat
     this steps, bg5latex, xdvi, dvips and so on, to see if the results
     correct or not.

  o  If you want to print files vertically, redo this section's
     installation and create the c00mingr.fd file listed as follows, and
     then change kair to mingr in Big5vert.tex file, and repeat tests
     processes.

     ___________________________________________________________________
     \def\fileversion{4.1.0}
     \def\filedate{1996/11/20}
     \ProvidesFile{c00kair.fd}[\filedate\space\fileversion]

     \DeclareFontFamily{C00}{mingr}{}

     \DeclareFontShape{C00}{mingr}{m}{n}{<-> CJK * ntummr}{}
     \DeclareFontShape{C00}{mingr}{bx}{n}{<-> CJKb * ntummr}{\CJKbold}

     \endinput
     ___________________________________________________________________

  7.1.5.  Creating CJK Documents

  The dominant difference between Chinese CJK TeX documents and general
  LaTeX ones is that:

  o  There should exist the \usepackage{CJK} command in the preamble
     (\documentclass to \begin{document}^section, that means you must
     have CJK.sty loaded.

  o  Chinese words must be under the circumstances of CJK or CJK*.

  o  If you want to change fonts, you can use \CJKfamily command, for
     example, the command \CJKfamily{fs} will change the following fonts
     as Song-imitated fonts( Certainly, the fs fonts' name must be
     defined in c00fs.fd).

     This is a demonstration for CJK document:

     ___________________________________________________________________
       \documentclass[12pt]{article}
       \usepackage{CJK}
       \begin{document}
         \begin{CJK*}{Bg5}{kai}

           \section{first section}
           \section{second section}
           Paragraphs, sections, pictures, tables, references and so forth...
           ...

         \end{CJK*}
       \end{document}
     ___________________________________________________________________



  7.2.  ChiTeX

  Developed by professor Chen Hung-Yih <yih@math.ncu.edu.tw>.
  Operations with the ChiTeX are easy enough just like the English TeX,
  apart from some special instructions.


  7.2.1.  Obatining it

  From here, you can find its vestige:

       ftp://dongpo.math.ncu.edu.tw/tex-archive/local/chitex/chi-
       tex/Linux/



  7.2.2.  Installing

  You should know what's the version of TeX installed on your Linux.. On
  older system, the installed one usually is NTeX while on newer one, it
  will be always teTeX .  How to tell which TeX you've installed, teTeX
  or NTeX, on your Linux System. Just run the TeX. If the monitor
  appears


       This is TeX, Version 3.14159



  , then it is teTeX. Otherwise,


       This is TeX, Version 3.1415N



  It is NTeX.  Download the exact ChiTeX corresponding to your version
  of TeX.

  It is simple to install ChiTeX. Just put chitex60.tgz(teTeX) or
  chitexN.tgz(NTeX) and fonts1.tgz, fonts2.tgz under /usr/local.  And
  decompress chitex60.tgz to execute setup program csetup.


       # tar zxvf chitex60.tgz
       # cd chitex60
       # ./csetup



  If you are using Red Hat 5.0, you may install the rpm package I made:

       ftp://ftp.phys.ntu.edu.tw/pub/os/linux/rpm/chi-
       tex-6.0.7-1.i386.rpm



  7.2.3.  Installing fonts

  You can install Chinese TrueType fonts for ChiTeX.

  o  Put TrueType fonts under $TEXMF/fonts/chinese/ttf.

  o  Modify $TEXMF/tex/chinese/chitex.fdf, and add a new line:


       \choosechfont{fontname}{filename}



  In it, the filename is the fonts' names erased the .ttf part, and
  \fontname is the macro that you can use for this font in your docu-
  ment.  For example, if you want to use a font named avntmv.ttf, put a
  line \choosechfont{ming}{avntmv}, and use the macro \ming to use the
  font avntmv.ttf.

  o  In chitex.fdf, there were several fonts defined; thus, if you want
     to install these fonts, you don't have to change chitex.fdf any
     more.


        \kai    ---->  ntukai.ttf
        \li     ---->  ntuli.ttf
        \mr     ---->  ntumr.ttf
        \fs     ---->  ntufs.ttf



  7.2.4.  Tests

  Now, you can take the samples enclosed with ChiTeX to test:


       # chilatex math2.tex        (Compiling)
       # xdvi math2                (pre-viewing)
       # dvips math2               (Changing to PostScript file)
       # ghostview math2.ps        (Using ghostview to view the output)



  You can also write a small document to test the new installed fonts:

  ______________________________________________________________________
  \documentclass[12pt]{article}
  \begin{document}
  \ming
     This is a test(You should type these words in Chinese).
  \end{document}
  ______________________________________________________________________



  For more information, please refer to the homepage of professor Chen.

       http://www.math.ncu.edu.tw/yih/intro.htm



  7.3.  Dtop

  The Dtop is a Chinese printing software for the UNIX platform,
  developed by the Behavior Design Corporation <http://www.bdc.com.tw/>.
  In early November, 1995, it released the version of v1.4, which was
  composite of five various platforms, simultaneously. The Linux beta
  version provided the users with a trial of free and endless
  expiration, which has created another nice Chinese environment for
  Linux fans. However, the formal version is late for publishing until
  now due to the tiny scope of business market. It seems that this had
  been ceased to develop.


  7.3.1.  How to Get it?

  The beta version of Dtop for Linux can download from each school's ftp
  site:

  o  <ftp://nctuccca.edu.tw/Chinese/ifcss/software/linux/X11R6/dtop1.4/pub/>

  o  <ftp://ftp.ntu.edu.tw/Chinese/ifcss/software/linux/X11R6/dtop1.4/pub/>

  o  <ftp://ftp.ccu.edu.tw/pub3/chinese/linux/X11R6/dtop1.4/pub/>

  o  <ftp://ftp.ncu.edu.tw/OS/linux/X/ifcss/X11R6/dtop1.4/pub/>

  o  <ftp://ftp.ifcss.org/pub/software/linux/X11R6/dtop1.4/pub/>

  There are three sub-directories saying respectively,

     dtop.linux
        Storage for binary files and data files of Dtop, which can
        divide into three major files. After decompressing all files,
        the disk space demanded is about 40MB.

     dtop.readme
        Storage for related documents of Dtop, which are stored as the
        file format defined by Dtop. Users can read this papers through
        this beta version directly.

     dtop.manual
        Storage of references for X version of Dtop, which are stored as
        the file format defined by Dtop. The X version can access
        through Linux, IBM AIX, HP-UX, Sun 4.1.x, and Solaris directly.


  7.3.2.  Installing

  The hardware required is something like this: CPU 486 DX-33 or later,
  RAM 16MB or larger, 50MB disk space or so. If there is no enough
  memory on your system, you will get nuts someday.

  Decompress all the files under dtop.linux to a self-selected
  directory, for example, /usr/local/dtop.

  Before implementing it, you must first set environment variable
  $DTOPHOME, which is the directory that preparing to install Dtop. The
  $DTOPTMP is a temporary directory for Dtop, which is usually /tmp. The
  XAPPLRESDIR is the directory for resources files of Dtop, which is set
  at $DTOPHOME/user .


       # export DTOPHOME=/usr/local/dtop
       # export DTOPTMP=/tmp
       # export XAPPLRESDIR=DTOPHOME/user



  You need to set the Chinese fonts directory used by Dtop.


       # xset fp+ $DTOPHOME/pcf.chn



  Finally, you have to configure the Keysym matching table caused by the
  matching between Keysym and Keycode under X different from
  workstations. The Keysyms of BackSpace and Delete, for example, are
  all matching to the same Keycode under X, regarding the behavior of
  BackSpace as the Delete's in reality . To solve this problem, the Dtop
  creates a Keysym file, locating under $DTOPHOME/user of which filename
  is dtop_keysym.linux. After starting X, invoke the command,


       # xmodmap dtop_keysym.linux



  Another solution is that invoke commands directly on shell:


       # xmodmap -e "keycode 22 = BackSpace"
       # xmodmap -e "keycode 107 = Delete"



  When everything is ready, you can execute Dtop.


       # $DTOPHOME/bin/dtop14



  You may read all the on-line references enclosed in Dtop for more
  detailed introductions.


  7.4.  ChinesePower

  The ChinesePower is a Far-East Editor running under X, which is easy
  and classified as WYSIWYG.  It supports BIG5, GB, Japanese and Korean
  mixed inputs, and the printing and displaying PostScript format. It
  can generate GIF graphics of seven colors for documents, which is
  adequate for Chinese homepages. ChinesePower uses HBF or TTF fonts.

  You can get it from,

       ftp://ftp.ifcss.org/pub/software/x-win/edi-
       tor/chpower-2.0.tar.gz


  To compile Chinese Power, you will need HBF fonts and Motif libraries.
  At first, modify Makefile to fit your system, then


       # make



  After making step, it will generate binary executable files.  Then
  export environment variables:


       # export HBFPATH=/usr/local/lib/chinese/HBF/
       # export TTFPATH=/usr/local/lib/chinese/TTF/
       # export HZINPUTDIR=/usr/local/lib/chinese/dict/
       # export CHPOWERPATH=path_of_chinesepower



  7.5.  EasyFlow

  This is developed by wycc <wycc@iis.sinica.edu.tw> , which can make
  simple printing for Chinese documents. Relative information is
  locating at

       <http://formosa.iis.sinica.edu.tw/~wycc/>



  8.  Useful Chinese Softwares

  8.1.  cjoe - Joe's Own Chinese Editor

  JOE is a free and professional ASCII codes' editor operated on UNIX
  platform, which is just like other text editors on IBM PC.  To use
  Chinese in JOE, you have to modify .joerc under your home directory.
  Refer to the homepage for details:

       <http://www.neto.net/~bv1al/linux/cjoe.html>


  CJOE is a Chinese version of JOE. Get it from here below:

       ftp://ftp.ifcss.org/pub/software/unix/editor/cjoe-2.8.tgz


  It is very simple to compile and install. Unless you want to change
  locations of binary or man page files, or just follows the steps
  below:


       # make
       # make install



  8.2.  celvis

  Celvis is a vi/ex-like editor on UNIX, which is almost supporting all
  instructions that vi/ex has.  You can edit articles including Chinese
  and English by using Celvis. Simultaneously, it also supports
  GB2312-80 and BIG5 codes.

  You can get it from here below,

       ftp://ftp.ifcss.org/pub/software/unix/edi-
       tor/celvis-1.3.tar.gz


  Decompress it,


       # tar zxvf celvis-1.3.tar.gz
       # cd celvis



  You need to change tmp.c, erasing 93-95 lines.

  ______________________________________________________________________
  #if OS9
                    if we don't have write permission...
  #endif
  ______________________________________________________________________


  Then you can continue to compile it.


       # cp Makefile.s5 Makefile
       # make install



  Because its Makefile is not for Linux particularly, you may see many
  warning message while compiling and linking; however, don't mention
  it, just keep it away.  After it is done, the celvis will be installed
  under /usr/local/bin.
  8.3.  cvim

  cvim is a Chinese patch program out of vim-4.2, including some
  features like vi but has no track in celvis-1.3, such as line number,
  circling lines and large files' editions.  You can take
  vim-4.2-Chinese-patch and vim-4.2.tar.gz: from here,

       ftp://ftp.csie.nctu.edu.tw/pub/Unix/Chinese/cvim


  Untar and unzip following the steps below:


       # tar -xvzf vim-4.2.tar.gz
       # cd vim-4.2/src
       # patch < ../../vim-4.2-Chinese-patch



  Change vim-4.2/src/feature.h to fit your requires. It is simple to
  compile and install, that is,


       # make
       # make install



  8.4.  he

  he was a famous editor on DOS, and is a diversion of Linux version.
  But this is a shareware program, limited with a hundred lines'
  edition.

  Obtain it from here,

       <ftp://linux.cis.nctu.edu.tw/pack-
       ages/he_linux/he_linux.tar.Z>


  Login as root,


       # cd /
       # decompress he_linux.tar.Z
       # tar xvf he_linux.tar



  Refer to /usr/lib/he/notes2.2, /usr/lib/he/chap15 and
  /usr/lib/he/appendix for more simple illustrations.


  8.5.  hztty

  Hztty can make transformations among various Chinese codes. Decompress
  hztty-2.0.tar.gz first.



  # tar -xvzf hztty-2.0.tar.gz
  # cd hztty-2.0
  # make linux



  After compilation, move the binary file hztty to the directory bin,
  and move man pages to the directory man.


       # mv hztty /usr/local/bin
       # chmod 555 /usr/local/bin/hztty
       # cp hztty.1 /usr/local/man/man1
       # chmod 444 /usr/local/man/man1/hztty.1



  Please refer to the on-line manual of hztty to use it.


  8.6.  ktty

  This is another tool, like hztty, using for reading Chinese on kterm
  or pxvt.  Get it at this site:

       ftp://ftp.ifcss.org/pub/software/unix/convert/ktty1.3.tar.gz


  However, it cannot be compiled on Linux, that you need use the
  ``tty.c'' in hztty-2.0.tar.gz  and add the two lines to it.


       linux:
             ${MAKE} ${MFLAGS} DEFINES='-DPOSIX -DSYSV -DUSE_SYSV_UTMP' ${PROG}



  Then, you can make it work.


       # make linux



  8.7.  Cemacs and CChelp For Emacs

  Cemacs, using the GNU Emacs to show and edit Chinese files, has to run
  Emacs under Chinese virtual terminals while CCHELP is a system of
  providing Chinese assistant messages. After installed CCHELP, you can
  slip mouse to any Chinese word and click it without loosing, then
  there coming out with the messages about that word , including its
  pronunciation, English explanation and so forth. It supports both GB
  and BIG5 codes.

  You can get them from this site:

       ftp://ftp.math.psu.edu/pub/simpson/chinese/


  Install cemacs and cchelp in accordance with the README file.

  8.8.  Mule

  The MULE is an abbreviation of MULtilingual Enhancement to GNU Emacs.
  In simplicity, it adds some materials to GNU Emacs to make it dealing
  with multi-languages(encoding systems). It encodes the encoding system
  of multi bytes again in its inner mechanism; hence, a piece of paper
  can simultaneously use Chinese(BIG5 and GB), Japanese, Korean,
  English, Thai, and so on.


  8.8.1.  Obtaining Mule-2.3 and patch for Linux

  You can get mule-2.3.tar.gz and patch mule-2.3+lx.diff.gz for Linux:

       ftp://sunsite.unc.edu/pub/Linux/distribu-
       tions/je/sources/mule/


  If your system is Red Hat Linux, you can take mule-2.3-1.i386.rpm,
  mule-common-2.3-1.i386.rpm and mule-elispsrc-2.3-1.i386.rpm:

       ftp://sunsite.unc.edu/pub/Linux/distributions/redhat/con-
       trib/contrib-2.0.x/RPMS/



  8.8.2.  Compiling and Installation

  Decompress packed files and add the patch in.


       # tar -xvzf mule-2.3.tar.gz
       # patch < mule-2.3+lx.diff
       # cd mule-2.3/
       # ./configure "i386-*-linux" --with-x11 --with-x-toolkit --with-gcc



  If you want to rectify the out-looking of mule to fit your taste, read
  INSTALL file, please.  And run ``./configure --help''.  Then, correct
  ``src/Makefile'', changing ``-lcurses'' to ``-lncurses''.  Then,


       # make
       # make install



  Default installing directory is /usr/local.


  8.8.3.  Using Chinese in Mule-2.3

  If you have already installed fonts, you can use mule to enter and
  show Chinese. Most fonts are 16 or 24 points, so you can:


       # mule -fn 8x16 &



  or

  # mule -fn 12x24 &



  According to M-x load-library RETURN chinese RETURN .  ``Ctrl-]'' to
  shift inputs.


  8.9.  hc

  This is a program of conversion for BIG5 and GB codes. Get it at this
  site:

       ftp://ftp.ifcss.org/pub/software/unix/convert/hc-30.tar.gz


  Decompress and install it:


       # tar zxvf hc-30.tar.gz
       # cd hc3
       # make
       # mv hc /usr/local/bin
       # mv hc.tab /usr/local/lib/chinese
       # mv hc.1 /usr/local/man/man1



  For converting GB into BIG5 , using


       hc -m g2b -t /usr/local/lib/chinese/hc.tab < INPUT_FILE > OUTPUT_FILE



  For exchanging BIG5 into GB, using


       hc -m b2g -t /usr/local/lib/chinese/hc.tab < INPUT_FILE > OUTPUT_FILE



  You can write a shell script to simplify that instructions.


  8.10.  ctin

  The ctin a news reader of all complete Chinese messages. Get it from
  here,

       ftp://linux.cis.nctu.edu.tw/packages/chi-
       nese/ctin/ctin-970625.src.bin.tgz


  Set environment variables $NNTPSERVER first to export to the news
  server that you want to link before executing ctin.


       # export NNTPSERVER=netnews.ntu.edu.tw



  Then run tin.


  8.11.  Some Other Toys

  You can find several small tools capable of showing Chinese, such as
  cuptime, cw, cless, cwrite, cytalk, and so forth.

       ftp://ftp.vit.edu.tw/unix/linux/chinese/



  9.  Related Chinese Problems with Others

  9.1.  Netscape Navigator

  Netscape 2.0 or later support both BIG5 and GB codes, which have
  already discussed on several homepages. To display Chinese in
  Netscape, there are three steps:

  1. Install Chinese fonts of X. Refer to the section ``Installing
     Chinese Fonts'' .

  2. Run netscape, and configure Document Encoding as Traditional
     Chinese (Big5) or Simplified Chinese.

  o  In Netscape 2.x or 3.x, this will configure at Options/Document
     Encoding/....

  o  In Netscape Communicator 4.x, configure it at View/Encoding/....

  3. Select the Chinese fonts you want.

  o  In Netscape 2.x, 3.x, configure it at Options/General
     Preferences/Fonts.

  o  In Netscape Communicator 4.x, configure it at
     Edit/Preferences.../Appearance/Fonts.

     Maybe you will feel so strange that why you can only use Fixed(HKU)
     Size 16.0, which is causing from the settings in
     /usr/X11R6/lib/X11/app-defaults/Netscape.  Assuming that you have
     the following BIG5 fonts:


       # xlsfonts | grep big5
       -hku-fixed-medium-r-normal--0-0-72-72-c-0-big5.hku-0
       -hku-fixed-medium-r-normal--16-160-72-72-c-160-big5.hku-0
       -kc-kai-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
       -kc-kai-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
       -kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
       -kc-ming-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
       -kc-ming-medium-r-normal-fantizi-15-150-75-75-c-160-big5.eten.3.10-1
       -kc-ming-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1



  Add one line to /usr/X11R6/lib/X11/app-defaults/Netscape


       *documentFonts.charset*big5.eten.3.10-1:              x-x-big5



  Then, Netscape can use these fonts well.

  Another solution is to name aliases for your fonts's names: Adding
  aliases in the fonts.alias file(create it yourself if there is no such
  a file) under your fonts directory.


       -big5-taipeik-medium-r-normal--16-160-72-72-c-160-big5.hku-1 taipei16
       -big5-taipeik-medium-r-normal--20-200-72-72-c-200-big5.hku-1 taipeik20
       -big5-taipeik-medium-r-normal--24-240-72-72-c-240-big5.hku-1 taipeik24



  The fonts filenames, like taipeik20, are that you need to give aliases
  to them. After modification, do


       # xset fp rehash



  to reload fonts's names to make them available.

  You may find that the sizes of Chinese and English are out of
  proportion in homepages of Chinese-English languages(such as too small
  English words), which is the reason that what you've selected for
  English fonts and Chinese fonts is unbalanced at the magnitude. Go
  back to the configuration for fonts, and select Western(iso-8859-1).
  Then, in your opinion, change the size of English fonts to make it
  perfect in proportions.


  9.2.  sendmail

  Because defaults of sendmail 8.8.x will encode all 8-bit mails first
  before sending them out, which may or may not reduce influences to
  those receiver. (Refer to``Next Sub-Section'' for solutions).  Most
  hosts can directly send 8-bit mails now, so you had better re-compile
  sendmail and close the encoding ability.


  o  Get the newest version from this site(or mirror site):

       ftp://ftp.sendmail.org/ucb/src/sendmail/



  o  Decompress it and modify Makefile:


       # tar zxvf sendmail-8.8.8.tar.gz
       # cd src/Makefiles
       # chmod u+w Makefile.Linux
       # vi Makefile.Linux



  Add -DMIME8TO7=0 after CFLAGS+=.

  o  Compile and install sendmail:



  # cd ..
  # ./makesendmail all install



  o  Install man pages to the exact directory manually(It's ok if not
     installing).

  o  Erase the old sendmail process:


       # kill -9 `head -1 /var/run/sendmail.pid`



  o  Restart sendmail:


       # /usr/sbin/sendmail -bd -q1h



  9.3.  procmail

  procmail is an electronic mail filter, which can manipulate mails
  first before storing them into your mailbox, for example,
  classification for mails and so on.  Though, I want to teach you how
  to make use of procmail to uncode the encoded ones into pure text
  files and how to convert the various encoded mails into common
  encoding you used here.

  Create .procmailrc file under your home directory, listed as follows:



  ______________________________________________________________________
  # To avoid accidents, store mails before using procmail.
  # You can filter mails to ensure which mail doesn't need to duplicate
  # by, for example, MAILER-DAEMON.
  :0 c
  * !^From.*MAILER-DAEMON
  mail/procmail-backup

  # Uncode mails encoded by quoted-printable or base64.
  :0
  * ^Content-Type: *text/plain
  {
      :0 fbw
      * ^Content-Transfer-Encoding: *quoted-printable
      | mimencode -u -q

          :0 Afhw
          | formail -I "Content-Transfer-Encoding: 8bit" \
                    -I "X-Mimed-Autoconverted: quoted-printable to 8bit by procmail"

      :0 fbw
      * ^Content-Transfer-Encoding: *base64
      | mimencode -u -b

          :0 Afhw
          | formail -I "Content-Transfer-Encoding: 8bit" \
                    -I "X-Mimed-Autoconverted: base64 to 8bit by procmail"
  }

  # Here will judge whether a mail is GB codes or not; if it is, convert it
  # into BIG5 codes. If you want to convert BIG5 codes into GB codes, you
  # need to exchange big5 with gb2312 and replace 'hc -m b2g' with 'hc -m g2b'.

  :0
  * ^Content-Type:.*text/plain;.*charset=gb2312
  {
      :0 fw
      | hc -m b2g -t /usr/local/lib/chinese/hc.tab

          :0 Afhw
          | formail -I "Content-Type: text/plain; charset=big5" \
                    -I "X-Charset-Autoconverted: gb2312 to big5 by procmail"
  }

  # Store mails into mailbox.
  :0:
  ${ORGMAIL}
  ______________________________________________________________________



  In this case, integrating with mimencode, formail to decode mails, and
  use ``hc'' to convert GB codes mails into BIG5 codes mails. Thus, you
  have to install these tools in order to use procmail.

  Eventually, rectify your .forward file.


       "|IFS=' ' && exec /usr/bin/procmail -f- ~/.procmailrc ||exit 75 #login"



  Notes: change the login as your login name.


  9.4.  telnet

  If you can access Chinese on your own machine, but cannot access
  Chinese while telnet to other machines, then the problems may cause
  from telnet itself.  When telnet is being under connection, you can
  press Ctrl-] to jump out temporarily, and enter set binary at the
  prompt of telnet> to assure the fully transmission of bits.  You can
  also use telnet -8 to make connections (but it seems won't work for
  some sites...?).  Another more simple method is to use directly a
  8-bit telnet program. Download the binary file from here:

       ftp://linux.cis.nctu.edu.tw/packages/chinese/misc/



  9.5.  less

  less itself can display Chinese directly; just set the following
  environment variable can Chinese display:


       # export LESSCHARSET=latin1



  9.6.  pine

  Pine of version 3.95 later can support reading and entering Chinese
  mails. As you execute pine, select SETUP/Config in feature list,
  choose this(hit X):


          [X]  enable-8bit-esmtp-negotiation
          [X]  enable-8bit-nntp-posting



  Then, hit C on character-set, and change its value to big5 or gb2312.
  Finally, hit E to escape and store this change.

  You can also install the cpine capable of showing Chinese messages:

       ftp://ftp.vit.edu.tw/unix/linux/chinese/cpine-3.91.bin.tgz



  9.7.  samba


  o  At first, take the newest version of samba-1.9.17p5 and big5 patch
     home.

       ftp://linux.cis.nctu.edu.tw/packages/net-
       work/samba/samba-1.9.17p5.tar.gz
       ftp://linux.cis.nctu.edu.tw/packages/chinese/samba-
       big5-patch/samba-1.9.17p2-BIG5-patch-0.gz


  o  Decompress samba-1.9.17p5.tar.gz, and add the patch upon:



  # tar zxvf samba-1.9.17p5.tar.gz
  # cd samba-1.9.17p5/source
  # zcat samba-1.9.17p2-BIG5-patch-0.gz | patch -s



  o  According to the normal procedures, you can compile and install it.
     Refer to the Samba HomePage <http://samba.anu.edu.au/samba/>.


  9.8.  lynx

  Lynx <http://lynx.browser.org/> v2.7 can view Chinese homepages
  directly. Execute lynx, and press O)ption / C)haracter set, and then
  choose Taipei(Big5) by arrow keys, and finally press '>' to store this
  set.


  9.9.  minicom

  Use the switch -l to start minicom, then you can see Chinese in
  minicom.


  9.10.  fingerd

  If you type Chinese in your .plan but can't be saw by others, this is
  probably caused by the inability of fingerd to send out 8-bit Chinese
  words.  Get cfingerd from this site:

       ftp://nctuccca.edu.tw/OS/Linux/packages/network/finger/cfin-
       gerd-1.3.2.tar.gz


  Decompress it and execute ./Configure, then implement make all .

  Then, modify /etc/inetd.conf, changing the original finger to:


       finger  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.cfingerd



  Let inetd read the configuration file again:


       # kill -HUP `cat /var/run/inetd.pid`



  9.11.  tintin++

  The TinTin++ is not a Chinese software but just a useful tool when
  playing Chinese mud.You can download it from this place:

       ftp://ftp.princeton.edu/pub/tintin++


  Here are some Chinese mud sites:



  FengYun                  fengyun.com       5555
  Xi You Ji                129.105.79.24     6905
  Xia ke Xing              207.76.64.2       5555



  10.  Chinese Linux

  If you have known some projects else about Chinese Linux, please tell
  me about itD


  10.1.  Chinese Linux Documentation's Projects

  CLDP is now abandoned itself to translating Linux HOWTO documents,
  locating at http://www.linux.org.tw/CLDP/.  CLDP has a mailing list
  ldp-trans@linux.org.tw.  Its purposes are:

  o  Combine everyone's power to implement Linux HOWTO translations
     available.

  o  Discuss SGML Tools of dealing with Chinese.

  o  Share and maintain experience of translation for Linux HOWTO.

  o  To propagate the translation projects of Linux HOWTO.

  o  Others concerned with Chinese Linux.

  If you want to join us, please send a mail contented(not titled) with
  subscribe to ldp-trans-request@linux.org.tw For more advanced
  explanations of this mailing list, please send a mail contented with
  info to the upper address.  If you want to know the usage of mailing
  list, send a mail contented with help to the same address.  If there
  is any suggestion or suspicion to the mailing list, please write to
  ldp-trans-approval@linux.org.twD

  If you are willing to contribute your own power, please join with this
  mailing list.


  10.2.  Chinese Linux Project

  This is established for a Chinese environment of Linux, originated by
  cdchen.  This is still under the period of setting, waiting for
  everyone's all efforts.

  Homepage of this project is at http://chinese.linux.org.tw/ which is
  responsible for formal announcements; and it provides discussions of
  problems, suggestions and criticisms, delivering ourselves of
  achievements and so forth.


  10.3.  Chinese websites of Linux

  Here are some websites for Chinese Linux information. If you have
  others not listed here, tell me about that, please.

  BIG5

  o  <http://www.linux.org.tw/>


  o  <http://chinese.linux.org.tw/>

  o  <http://linux.cis.nctu.edu.tw/>

  o  <http://linux.ntcic.edu.tw/>

  o  <http://freebsd.ee.ntu.edu.tw/bbs/6/index.html>

  o  <http://cc.shu.edu.tw/~rick/wwwguide/c_linux_hopenet.html>

  o  <http://henry.cis.nctu.edu.tw/~linuxwww/>

  o  <http://marr.dorm9.nccu.edu.tw/~marr/Comp/PC-Unix/index.html>

  o  <http://www.phys.ntu.edu.tw/~cwhuang/pub/os/linux/>

     GB

  o  <http://csun01.ihep.ac.cn/>

  o  <http://www.clinux.ml.org/>


  10.4.  Discussed groups of Linux

  If you have any problem, you can post you question here, using Chinese
  is ok, too. However, make sure that this question is still unknown or
  hasn't answered in related documents or HOWTO, or repeat some FAQs are
  absolutely not popular with these places.


  o  <news://tw.bbs.comp.linux>

  o  <telnet://henry.cis.nctu.edu.tw>



  11.  FAQs

  11.1.  Why Can't I Enter Chinese?

  Answer: This question is quite ambiguous, though. I cannot tell which
  condition that you have met?  If you can not enter Chinese on
  console's shell, refer to the section ``Chinese Input Problems'' for
  detailed.

  Or that you cannot enter Chinese in an editor, it is possible that
  your editor doesn't support Chinese. Please refer to the section
  ``Useful Chinese Softwares'' to install Chinese-supported editors.

  If this is matched at the period of telnet, then refer to the section
  ``telnet'' for more explanations.


  11.2.  I have got the NTU TTF fonts, but how can I decompress it?

  Answer: The NTU TFF fonts is compressed with arj format and divided it
  into several files for the convenience of putting it into floppy
  disks, causing that decompression is a little trifling.  If you want
  ntu_kai.ttf font, for example, you must take ntu_kai.arj, ntu_kai.a01,
  ntu_kai.a02, and ntu_kai.a03 home.  Assuming that you have an arj tool
  of DOS version, put these four files altogether under the same
  directory and invoke this commands to decompress:



  C:\> arj x -va -y ntu_kai



  If you want to decompress them on Linux, you must use unarj to unarj
  them one by one, and then use cat to concatenate them together:


       # unarj e ntu_kai.arj ; mv ntu_kai.ttf ntu_kai.ttf0
       # unarj e ntu_kai.a01 ; mv ntu_kai.ttf ntu_kai.ttf1
       # unarj e ntu_kai.a02 ; mv ntu_kai.ttf ntu_kai.ttf2
       # unarj e ntu_kai.a03 ; mv ntu_kai.ttf ntu_kai.ttf3
       # cat ntu_kai.ttf* > ntu_kai.ttf



  11.3.  Netscape's title and tag cannot see Chinese?

  Answer: To install CXWin will solve this problem. Refer to ``CXWin''
  for detailed.


  11.4.  My Netscape cannot see Chinese?


  Answer: If you could not see any Chinese on all homepages, then you
  might probably not install Chinese fonts, or haven't make Netscape
  settled. Refer to the section ``Netscape''.

  But if you can see Chinese on most parts of Chinese homepages, only on
  some websites could see disturbed codes, then this may not be your
  private problems.  A little websites take Frontpage to generate
  homepages, and their language encoding is x-x-big5 not general big5.

  This wil make all browsers except IE cannot identify this encoding,
  which just a bad trick adopted by Microsoft to fulfill its ambitions
  to occupy the market of browsers.  To solve this problem, send a mail
  to the administrator of that site, telling them there are other
  browsers except IE all over the world. If they want to manage it
  perpetually, they should correct that unusual encoding to normal one.

  Of course, if you have better solutions, please let me know of it.


  11.5.  How to enter Chinese in Netscape?


  Answer: Install xcin+XA. Refer to this section ``XA''.


  11.6.  What's the difference between ChiTeX and CJK? Can I install
  them at the same time?

  Answer:

  o  The system of Chinese reading and searching of CJK which is
     independent and efficnet is based on the NFSS of LaTeX.

  o  CJK can use Chinese, Japanese, and Korean; and ChiTeX is just for
     BIG5.

  o  CJK can only use on LaTeX while ChiTeX can use on plain TeX and
     LaTeX .
  o  Instructions of ChiTeX are simple and useful.

  o  ChiTeX is approaching to real Chinese LaTeX.

  o  Difference in functionality...

     ChiTeX and CJK should be compatible while installing them at the
     same system, but if the ttf2pk has the same name for both ChiTeX
     and CJK, then it could cause certain problems.  A solution to this
     is that define the $PATH variable in each shell script,
     respectively, to point to the correct locations of ttf2pk.  (Thanks
     to professor Chen Hung-Yih..)



  12.  Appendix - Chinese Softwares of FTP.IFCSS.ORG

  WarnningGMost pre-compiled Linux executable files are out-of-date and
  cannot use normally.



  ****
  UNIX
  ****

  ========
  UNIX:BBS
  ========

  software: Phoenix BBS
  version : 4.0, 1995.08.31
  function: o UNIX platform multi-user BBS system,
            o discussion boards, private email
            o multichannel chat, one-to-one chat
            o Internet Email, News gateway,
            o 0Announce : Gopher-like information query interface.
            o fine tuned to allow more than 256 users on-line
            o configurable menu, screen display
            o Chinese message
  URL     : ftp://ftp.ifcss.org/pub/software/unix/bbs/PhoenixBBS-4.0.tar.gz
  author  : Ji-Tzay Yang, Ming-Feng Chen, Tzung-Yu Wen

  ============
  UNIX:C-UTILS
  ============

  software: addpy
  version : 1.0
  function: To annotate Pinyin to rare Hanzi and a portion of
            randomly selected common Hanzi.  Both GB (simplified) and
            Big5 (traditional) versions.  Based on statistics derived
            from huge Chinese corpus and well prepared hazni-freq-pinyin
            tables.  Source code and raw data provided.
  URL     : ftp://ifcss.org/pub/software/unix/c-utils/addpy.tar.gz
  filename: README.addpy, b5addpy.l, gbaddpy.l, b5addpy.dat,
            gbaddpy.dat, makefile
  author  : Guo Jin

  software: rm4mat
  version : n/a
  function: remove formating codes for printing in some GB files
  URL     : ftp://ftp.ifcss.org/pub/software/unix/c-utils/rm4mat.c
  author  : Chenghong Wang

  software: mail_hxwz
  version : 1.1
  function: It extracts HXWZ from your mail (Suppose you are subscribing
            it).  It is a Bourne shell program which works on most Unix
            systems.  It can rerun itself every Friday automatically.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/c-utils/mail_hxwz
  author  : Yaoen Zhang

  software: auto_get_hxwz
  Version : 1.2
  Function: It gets the current issue of HXWZ in GB or postscipt format.
            It also process and print these files, and do the clean up.
            It save your time and server machine time.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/c-utils/auto_get_hxwz
  author  : Yaoen Zhang

  software: Chinese less
  version : 290, 1995.5.25
  function: Browse BIG5 and GB text files
  URL     : ftp://ftp.ifcss.org/pub/software/unix/c-utils/cless-290.tar.gz
  author  : Paul W. Shew
  comment : requires a chinese terminal, like cxterm.

  software: cscreen
  version : 3.2b
  function: This is a modified screen to minic ETen in cxterm.
            After you run cscreen in cxterm, it will intercept
            every key movement and examine if the current
            screen postion has a Chinese char. If it has,
            auto-key movements will be made accordingly.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/c-utils/cscreen-3.2b.tar.gz
  author  : Shih-Kun Huang

  software: ytalk
  version : 3.0.2c6
  function: ytalk-3.02c provides better compatibility for DEC's
            workstations, two-byte refresh for terminal like cxterm, and
            capable of passing character code 254, internally used as erase
            function in ytalk-3.0; Compatible with ytalk-3.0, cytalk-3.0,
            cytalk-3.0.2, ytalk-3.02c0/1/2/3/4/5, that is, you can still use
            Delete, or Backspace key.  If both ends use ytalk-3.02c4, the code
            254 is transparent, you can use more Chinese words to talk to
            others.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/c-utils/ytalk-3.0.2c6.tar.gz
  author  : Sze-Yao Ni

  software: lunar
  version : 2.1
  function: conversion program between Solar and Chinese lunar calendars;
            calculation of birthday in "4-column" astrology as well
  URL     : ftp://ftp.ifcss.org/pub/software/unix/c-utils/lunar-2.1.tar.gz
  author  : Ricky Yeung and Fung Fung Lee
  comment : can output GB code, bitmap, or just ASCII

  software: DateStar - Chinese Calendar Producer
  version : 1.1
  function: Displays Chinese and western calendar in
            ASCII code, BIG-5 code (Hongkong, Taiwan),
                GuoBiao code (PRC Standard), and HZ code (Network)
            Prints on two most popular laser printers
                PostScript laser printers, and
                HP LaserJet (PCL) printers
            Generates four different format
                Yearly calendar, Monthly calendar,
                One-page Weekly calendar, and Two-page Weekly calendar
            Shows calendar with 24 Solar Terms (JieQi),
                the Heavenly Stems and Earthly Branches
                (TianGan DiZhi Eight Characters)
            Supports user defined annotations
            Applicable from year 1841 through to 2060
  URL     : ftp://ftp.ifcss.org/pub/software/unix/c-utils/datestar-1.1.tar.gz
  author  : Youzhen Cheng
  comment : UNIX version works on SUN Workstation with SUN OS 4.1.x
            see /software/dos/c-utils for DOS version

  software: pull
  version : 2.9, 1996.4.7
  function: 1. Extracts the original file(s) from uuencoded/compressed/split
               file(s).
               a) uudecode a file and display the name of its decoded file
               b) decompress .zz (= .gz/.Z/.zip) file
               c) uudecode + decompress
               d) uudecode + cat (concatenate) + gunzip
            2. Packs file. Reverse the above `extracting' process.
               compresses, (splits), then encodes file(s)
  URL     : ftp://ftp.ifcss.org/pub/software/unix/utils/pull.c.gz
  author  : Yao Li

  software: utf-utils
  version : 15 Oct 1993.
  function: some utility programs for manipulating Unicode/ISO-10646 text
            in the FSS-UTF encoding.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/c-utils/utf-utils.tar.gz
  author  : Ross Paterson

  software: gbfmt
  version : 1.0
  function: GB formatting with variable line width, GB<->HZ
  URL     : ftp://ftp.ifcss.org/pub/software/unix/c-utils/gbformat.tar.gz
  author  : Dongxiao Yue (http://www.cs.umn.edu/~dyue/wiihist/gbfmt.html)

  ===========
  UNIX:EDITOR
  ===========

  software: celvis
  version : 1.3
  function: vi editor with Chinese handling capabilities.
            Most run on some Chinese terminal, e.g. cxterm, or IBM-PC with
            some kind of Chinese DOS.  Work exactly like Unix vi editor,
            except that it side-scrolls long lines instead of wrapping.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/editor/celvis.tar.gz
            ftp://ftp.cs.purdue.edu/pub/ygz
  author  : Man-Chi Pong, Yongguang Zhang
  comment : comments, bug-reports, modifications to: c-elvis@cs.purdue.edu

  software: Chinese JOE (Joe's Own Editor)
  version : 2.8c
  function: Chinese BIG5 localized text screen editor.  The key sequences are
            remeniscent of WordStar and TURBO-PASCAL. Makes full use of
            termcap/terminfo, is designed to work well over slow networks and
            low baud rate modems, and has the best features of vi. Most
            useful for editing unformatted text, such as USENET news articles
            and for editing block-structured languages such as C and PASCAL.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/editor/joe2.8_c.tar.gz
  author  : <u8222034@cc.nctu.edu.tw>

  ============
  UNIX:CONVERT
  ============


  software: cn2jp
  version : 1.3.2, 1996.4.11
  function: code conversion routines for Chinese and Japanese
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/cn2jp1.3.2.tar.gz
  author  : Seke Wei

  software: ktty
  version : 1.3, 1996.4.11
  function: This is a kanji terminal translator among Chinese and Japanese.
            It allows online translation of codes so that you can view a
            specific code real time using your Chinese or Japanese terminal.
            It runs on Unix and is derived from the 'hztty' package
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/ktty1.3.tar.gz
  author  : Seke Wei

  software: code1
  version : 1.3, 1996.4.11
  function: This is a multilingual file browser for Chinese and Japanese.
            It runs on Unix and allows browsing of files in various codes
            using a Chinese or Japanese terminal.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/code1.3.tar.gz
  author  : Seke Wei

  software: HUG program
  version : 1.0, 1995.5.20
  function: Converting between HZ, Uudecode/uuencode, GB codes
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/shug.osf.zip
            ftp://ftp.ifcss.org/pub/software/unix/convert/shug.sun4.zip
  author  : Yinrong Huang

  software: hztty
  version : 2.0 Jan 29, 1994
  Function: This program turns a tty session from one encoding to another.
            For example, running hztty on cxterm can allow you to read/write
            Chinese in HZ format, which was not supported by cxterm.
            If you have many applications in different encodings but your
            favor terminal program only supports one, hztty can make life easy.
            For example, hztty can your GB cxterm into a HZ terminal, a
            Unicode (16bit, or UTF8, or UTF7) terminal, or a Big5 terminal.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/hztty-2.0.tar.gz
  author  : Yongguang Zhang

  software: EHZ
  version : 2.0
  function: Conversion among GB/BIG5/CNS and EHZ-BIG5/GB/CNS.
            Patch to hztty to support EHZ-BIG5/GB/CNS.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/EHZ-2.0.tar.gz
  author  : Ricky Yeung
  comment : Also contains the EHZ spec and Fung Fung Lee's EHZ-BIG5-CNS spec.

  software: b5cns
  version : prototype
  function: functions to convert Big5 <-> CNS
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/b5cns.tar.gz
  author  : Ross Paterson

  software: c2t
  version : n/a
  function: converts GB or BIG5 coded chinese to _pinyin_
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/c2t.tar.gz
  authors : Tommi Kaikkonen and Katya Ta

  software: BeTTY/CCF/B5Encode package
  version : 1.534, 1995.03.22
  function: a chinese code conversion package for codes widely used
            in Taiwan and the GB code widely used in Mainland, plus
            a 7-bit Big5 encoding method (B5Encode3/B5E3, an extension
            to HZ encoding for GB),
            including off-line converters (CCF/Chinese Code Filters and
            B5E/B5Encode) and an on-line converter (BeTTY) which simulates
            your native chinese terminal to become aware of the coding
            systems widely used in Taiwan and GB, HZ encoding.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/BeTTY-1.534.tar.gz
            ftp://hermes.ee.nthu.edu.tw/shin/betty/BeTTY-1.534.tar.gz
  author  : Jing-Shin Chang

  software: BeTTY-ws_2fl.p1
  version : 1.0 (patch to BeTTY-1.534) Oct. 1995.
  function: 1. makes BeTTY respect the window(tty) size.
            2. a second Chinese code converting filter can be added on.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/BeTTY-ws2fl.p1.tar.gz
  author  : Wei Dong

  software: c2gif
  version : 0.01, 1995.10.21
  function: convert a BIG5 text file to a GIF file
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/c2gif001.tar.gz
            http://www.math.ncu.edu.tw/~luors/c2gif/
  author  : Luoh Ren-Shan
  software: gb2jis
  version : 1.5, 1995.11.19
  function: convert GB (or HZ) to JIS with two-letter pinyin
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/gb2jis.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/gb/bdf/guobiao16.bdf.gz
  author  : Koichi Yasuoka

  software: jis2gb
  version : 1.5, 1996.1.10
  function: convert JIS to GB (or HZ)
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/jis2gb.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/gb/bdf/guobiao16.bdf.gz
  author  : Koichi Yasuoka

  software: HZ
  version : 2.0
  function: convert among GB, HZ and zW
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/HZ-2.0.tar.gz
  author  : Fung F. Lee

  software: HZ+ specification and conversion utilities
  version : 0.77
  function: HZ+ is a convenient 7-bit representation of mixed Big5, GB,
            and ASCII text for use in Internet e-mail, news, etc.
            Source code for Big5 <-> HZ+ and GB <-> HZ+ conversion
            utilities is here.  DOS executables can be found in
            another archive, /software/dos/convert/hzp.zip.  New in
            this Unix version is a simple HZ+ terminal program for cxterm
            which allows the user to transparently read HZ+ mail and news.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/hzp.tar.gz
  author  : Stephen G. Simpson

  software: hc
  version : 3.0
  function: convert between GB and BIG5
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/hc-30.tar.gz
  author  : Fung F. Lee and Ricky Yeung

  software: Support Table for Hanzi Convert (hc)
  version : 1994/05/01
  function: Convert table supports the program Hanzi Convert
            (Author  : Fung F. Lee and Ricky Yeung) GB<->Big5.
            Include Russian, number, Japanese, graphing symbols and
            "incorrect" codes. Text file, comments in it.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/sym-supp.tab
            ftp://ftp.ifcss.org/pub/software/unix/convert/in-corr.tab
  author  : Chi-Ming Tsai

  software: pbmbig5
  version : 0.01, 1995.11.2
  function: convert big5 coded Chinese text file to pbm graphic file
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/pbmbig5-0.01.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/big/hbf/kck24.hbf
            ftp://ftp.ifcss.org/pub/software/fonts/big/hbf/kcchin24.f02
  author  : Wei-Jou Chen

  software: UTF utilities
  version : 31 May 1994.
  function: various utilities for the UTF encoding of Unicode/ISO-10646,
            including conversion from ISO-2022 and (partially) back again.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/utf.tar.gz
  author  : Ross Paterson

  software: utf7
  version : prototype, use at your own risk
  function: functions to convert between UTF-7 and other codes
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/utf7.tar.gz
  author  : Ross Paterson

  software: ISO-2022-CN encoder and decoder
  version : beta 960408
  function: Convert between CN-GB and CN-CNS codes
  URL     : ftp://ftp.ifcss.org/pub/software/unix/convert/iso-cn.tgz
  author  : handa@etl.go.jp
  comment : BIG5 code is not yet supported.

  ===============
  UNIX:NETWORKING
  ===============

  software: gopher2.014c
  version : 2.0.14
  function: A Chinese localized gopher client capable of 8-bit BIG5 Chinese
            string search on IBM AIX, SUN OS, and any other machines.
            Compatable with any BIG5 Chinese system such as ET and
            cxterm. executable binary for ibm and sun included.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/networking/gopher2.014c.tar.gz
            ftp://ftp.ifcss.org/pub/software/unix/networking/gopher.ibm.tar.gz
            ftp://ftp.ifcss.org/pub/software/unix/networking/gopher.sun.tar.gz
  author  : Hoo-Tung Cheuk (NCTU CIS, Taiwan)

  software: Chinese Tin
  version : 1.2PL2a
  function: tin 1.2PL2 newsreader with English/Big5 message toggle.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/networking/ctin122a.tar.gz
  author  : Shih-Kun Huang

  software: NcFTP with chinese message compatible
  version : 2.3.0c, 1996.1.17
  function: Chinese (BIG5) patch to NcFTP.
            Now it can display any chinese message from ftp server instead
            of "\xxx".  ANSI color compatible in Line Mode.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/networking/ncftp-2.3.0.chinese.tgz
  author  : NCEMRSoft (orig), Aiken Sam (chinese patch)

  ==========
  UNIX:PRINT
  ==========

  software: C2PS
  version : 1.30 Aug 1 1995
  function: Translate Big5 coded Chinese document into Level 2 PostScript.
            This is the version for Sparcstation. Using Chinese TrueType fonts,
            you can create the most beautiful document with C2PS.
            This is a DEMO version. You can freely copied and use it.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/print/c2ps130sos.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/big5/ms-win/
  author  : Hsueh-I Lu

  software: cnprint
  version : 2.60  JAN-25-95
  function: print GB/Hz/BIG5/JIS/KSC/UTF8 etc or convert to PostScript
            (conforms to EPSF-3.0). Fast.  Multicolumn. Vertical printing.
            Small disk space requirement. "Intelligent" treatment of
            punctuations.  Flexible change of fonts, char size,
            width/height, char and line spaces, paper orientation and
            margins, etc.  Support of European chars.  Special modes for
            printing HXWZ.  See readme for more
  URL     : ftp://ftp.ifcss.org/pub/software/unix/print/cnprint260.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/{gb,big5,misc,unicode}/hbf/
  author  : Yidao Cai
  comment : v2.60 is also for VMS, use v2.61 for DOS
  software: GBscript
  version : 1.11
  function: Convert GB/ASCII mixed text to PostScript output.
            High print speed (4ppm on LaserWriter NTX).
            Support Adobe-2.1.
            Small PS file size (400K for one HXWZ issue).
  URL     : ftp://ftp.ifcss.org/pub/software/unix/print/gbscript-1.11.tar.gz
  author  : Yan Zhou

  software: gb2ps
  version : 2.02
  function: convert GB/HZ to postscript, supports simple page formatting
            (change chinese fonts and font size, cover page, page
            number, etc). Five chinese fonts are provided in this
            release, they are Song, Kai, Fang Song, Hei and FanTi
            The HZ ENCODING is also supported.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/print/gb2ps.2.02.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/fan24.ccf.gz
            ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/fang24.ccf.gz
            ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/hei24.ccf.gz
            ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/kai24.ccf.gz
            ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/song24.ccf.gz
  author  : Wei SUN

  software: news2ps
  version : n/a
  function: news2ps converts BIG5 to Postscript
  URL     : ftp://ftp.ifcss.org/pub/software/unix/print/news2ps.c
            ftp://ftp.ifcss.org/pub/software/fonts/big5/misc/chinese.16.new
  author  : The Society of HKU Postgraduate on Chinese Affairs
  comment : rename chinese.16.new to chinese.16

  software: hz2ps
  version : 3.1
  function: Convert hanzi (GB/BIG5) text to PostScript.
            Use HBF font files.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/print/hz2ps-3.1.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/{gb,big5}/hbf/
  author  : Fung F. Lee

  ===========
  UNIX:VIEWER
  ===========

  software: ChiRK
  version : 1.2a
  function: GB/HZ/BIG5 text viewer on terminals (or emulations) capable
            of displaying Tektronics 401x graphics, such as GraphOn,DEC
            VT240/330, Xterm, Tektool on Sun, EM4105 on PC,
            VersaTerm-Pro on Mac, etc.
            displays up to 17x40 Chinese characters per screen. works directly
            under UNIX mail and news programs. Comes with four fonts.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/viewer/ChiRK-1.2a.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/gb/hbf/cclib.v
            ftp://ftp.ifcss.org/pub/software/fonts/gb/hbf/cclib.16
            ftp://ftp.ifcss.org/pub/software/fonts/gb/hbf/cclibf.16.gz
            ftp://ftp.ifcss.org/pub/software/fonts/big5/misc/chinese.16.new.gz
  author  : Bo Yang
  comment : rename chinese.16.new to chinese.16

  software: Cbanner
  version : 1.10, 950821
  function: To show Chinese word's banner
  URL     : ftp://ftp.ifcss.org/pub/software/unix/banner/cbanner1.10.tar.gz
  author  : Sheen Cherng-Dar, rewritten by Jonen Liu
  comment : requires ETen Big5 Chinese System's fonts.
  software: gb2text
  version : n/a
  function: convert GB to text
  URL     : ftp://ftp.ifcss.org/pub/software/unix/viewer/gb2text.c
  author  : Ding Yijun

  software: hzbanner
  version : 1.1, Feb 15, 1995
  function: Display Song style GuoBiao in large ASCII characters,
            supports GB2312-80 (^[$A), GB2312-80 + GB8565-88 (^[$(E),
            Chinese-EUC (8-bit Guobiao) CNS Plane 1 & 2, BIG5 and HZ-encoding
            ( ???)
  URL     : ftp://ftp.ifcss.org/pub/software/unix/viewer/hzbanner11.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/gb/bdf/guobiao16.bdf.gz
            ftp://ftp.ifcss.org/pub/software/fonts/cns/bdf/cns1hku16.bdf.gz
            ftp://ftp.ifcss.org/pub/software/fonts/cns/bdf/cns2hku16.bdf.gz
  author  : Koichi Yasuoka

  software: hzview
  version : 3.1
  function: Display hanzi (GB/BIG5) text on dumb terminal.
            Use HBF font files.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/viewer/hzview-3.1.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/{gb,big5}/hbf/
  author  : Fung F. Lee

  Software: cnview
  Version : 3.1 (UNIX version. DOS version available under /software/dos/viewer)
  Function: View GB/Hz/Big5 encoded Chinese text file on * HP-UNIX (X-window) *
  URL     : ftp://ftp.ifcss.org/pub/software/unix/viewer/cnview.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/{big5,gb}/hbf/
  Author  : Jifang Lin

  software: readgb
  version : n/a
  function: convert GB to text
  URL     : ftp://ftp.ifcss.org/pub/software/unix/viewer/readgb.c
  author  : Yuzhao Lu
  comment : modified from readnews.c

  software: readnews
  version : n/a
  function: readnews converts BIG5 to ascii dot-matrix picture
  URL     : ftp://ftp.ifcss.org/pub/software/unix/viewer/readnews.c
            ftp://ftp.ifcss.org/pub/software/fonts/big5/misc/chinese.16.new.gz
  author  : The Society of HKU Postgraduate on Chinese Affairs
  comment : rename chinese.16.new to chinese.16

  ==========
  UNIX:INPUT
  ==========

  software: CCTeach
  version : 1.0
  function: Chinese Character input method Teacher.
            Help new user to learn CC input and some utility programs
                of "cxterm NewFace" for associate dictionary tool,
                hotkey tool, WuBi phrase encoder, and converter with
                ".tit" <==> ".titnf".
            Based on GB and Big5 (ETen and HongKong).
            Support all input method by external dictionary file.
            Need cxterm in unix, CC DOS or ZW DOS in PC.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/input/CCTeach1.0.tar.gz
  author  : Xiaokun Zhu

  =========
  UNIX:MISC
  =========

  software: ICCS 1.3
  version : 1.3, June 26, 1994
  function: Internet Chinese Chess Server
  URL     : ifcss.org:/software/unix/misc/iccs-1.3.tar.gz
  author  : Xi Chen
  comment : file off-lined due to legal status July 3, 1996. Please contact
            the author Xi Chen at xichen@abel.math.harvard.edu for further info.

  ========
  UNIX:WWW
  ========

  software: cdelegate
  version : 1.4a, 1996.5.1
  function: This is a Chinese patch on DeleGate, a gateway for the WWW services.
            provides code translation between Chinese/Japanese for WWW browsers
  URL     : ftp://ftp.ifcss.org/pub/software/unix/www/cdelegate1.4.tar.gz
  author  : Seke Wei

  software: Chinese Lynx
  version : 2.5FMc, 1996.7.19
  function: Chinese BIG5/GB patch to lynx, a WWW client for vt100 terminals.
            Volunteers needed to continue on the patch.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/www/clynx25.zip
  author  : Nelson Chin

  software: Internet MahJong Server (server + client applet)
  version : 0.2beta
  function: provides a server and a graphic client for playing MahJong on
            the Internet.
  URL     : ftp://ftp.ifcss.org/pub/software/unix/www/MJ_dist.tar.gz
  author  : Zuwei Thomas Feng
  *****
  LINUX
  *****

  software: D Series (Chinese Tools, ELF binary)
  version : 1.00,  March 25, 1995
  function: Binary distribution of various useful Chinese tools:
            Viewers -- cxterm, crxvt; Input server -- xcin; GB,Big5,HZ,B5E3
            code converters -- ccf, hc, hz2gb, gb2hz, zw2hz, b5decode,
            b5encode; Print tool -- lunar, ttf2ps; Pseudo tty -- hztty,
            betty; Various handy scripts, man pages, dictionaries, HBF fonts,
            xfonts included; chdrv, celvis, elm, sendmail
  URL     : ftp://ftp.ifcss.org/pub/software/linux/CLinux/CTool/d1
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/CTool/d2
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/CTool/d3
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/CTool/d4
  author  : Eric Lin
  comment : requires XFree86 3.1+, ELF libraries

  software: C Series (Chinese packages for Slackware)
  version : N/A
  function: The Chinese packages collected by Wei-Jou Chen can be installed by
            Slackware's setup tools. Basic idea are that we have right to install
            and remove Chinese softwares easily and beginners can play them
            without much trouble.
  URL     : ftp://ftp.ifcss.org/pub/software/linux/CLinux/c1/
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/c2/
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/c3/
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/c4/
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/c5/
  compiler: CHEN, Wei-Jou
  software: MU Series (Mule packages for Slackware)
  version : N/A
  function: The Multilingual Emacs 2.0 packages for XFree86 2.X and 3.1
            collected by Shawn Hsiao can be installed by Slackware's setup
            tools
  URL     : ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu1/
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu2/
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu3/
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu4/
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu5/
            ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu6/
  compiler: Shawn Hsiao

  =============
  LINUX:C-UTILS
  =============

  software: GNU fileutils-3.9
  version : 3.9, 1 August 1994
  function: Chinese version of the GNU file utility programs for Linux.
  URL     : ftp://ftp.ifcss.org/pub/software/linux/c-utils/fileutils-3.9-bin-chinese.tar.gz
  author  : Patrick D'Cruze

  software: C2PS
  version : 1.30 Aug 1 1995
  function: Translate Big5 coded Chinese document into Level 2 PostScript.
            This is the version for Linux. Using Chinese TrueType fonts, you
            can create the most beautiful Chinese documents with C2PS.
            This is a DEMO version. You can freely copied and use it.
  URL     : ftp://ftp.ifcss.org/pub/software/linux/chinese_utils/c2ps130lnx.tar.gz
            ftp://ftp.ifcss.org/pub/software/fonts/big5/ms-win/
  author  : Hsueh-I Lu

  ============
  LINUX:EDITOR
  ============

  software: ?????? for Linux (promotion version)
  version : v2.163
  function: PE2-like text editor, special designed for Chinese
  URL     : ftp://ftp.ifcss.org/pub/software/
  agent   : LU, Heman

  =========
  LINUX:TTY
  =========

  software: chdrv
  version : 1.0.7, 1995.12.20
  function: Chinese Terminal Simulator. Does not require X-Windows.
  URL     : ftp://ftp.ifcss.org/pub/software/linux/tty/chdrv-1.0.7.tar.gz
            ftp://ftp.ifcss.org/pub/software/linux/tty/chdrvbin-1.0.7.tar.gz
            ftp://ftp.ifcss.org/pub/software/linux/tty/chdrvfont.tar.gz
  author  : WANG, Yu-Chung

  ===========
  LINUX:X11R6
  ===========

  software: Behavior DTop (for Linux)
  version : 1.4, Beta
  function: A full-featured Chinese DeskTop Publishing Software Package
            characterized by object-oriented design for manipulating
            various document objects, including text, tables, graphics,
            equations, images, in an integrated way. Two outline fonts
            are provided in the Beta Version. PostScript output.
            Good as an English DeskTop Publishing Software Package too.
            (See the README's & formated DTop manual files for a long and
            complete list of functions and characteristics).
  URL     : ftp://ftp.ifcss.org/pub/software/linux/X11R6/dtop1.4/
  author  : DTop Development Group



F CHINESE-.;1                       	Chinese-HOWTO
  The Linux Cyrillic HOWTO
  Alexander L. Belikoff, (abel@bfr.co.il), Berger Financial
  Research Ltd.
  v4.0, 23 January 1998

  This document describes how to set up your Linux box to typeset, view
  and print the documents in the Russian language.
  ______________________________________________________________________

  Table of Contents



  1. Administrativia

     1.1 Introduction
     1.2 Availability and feedback
     1.3 Acknowledgments and copyrights

  2. Theoretical background

     2.1 Characters and codesets

  3. Preparing your environment

     3.1 Text mode setup
        3.1.1 Linux Console
        3.1.2 FreeBSD Console
     3.2 The X Window System
        3.2.1 The X fonts.
        3.2.2 The input translation
     3.3 First steps - Cyrillic in shells
     3.4 bash
     3.5 csh/tcsh
     3.6 ksh
     3.7 less
     3.8 mc (The Midnight Commander)
     3.9 rlogin
     3.10 zsh

  4. Editing text

     4.1 Emacs and XEmacs
     4.2 Using vi
     4.3 Editing text with joe
     4.4 Spell-checking Russian

  5. Using Cyrillic with mail and news

     5.1 Setting up Mail User Agents
        5.1.1 Emacs-based mail readers
        5.1.2 pine
     5.2 Configuring your MTA
        5.2.1 sendmail
        5.2.2 Other MTAs

  6. Browsing the Cyrillic Web

     6.1 lynx
     6.2 Netscape navigator
        6.2.1 Basic setup
        6.2.2 Cyrillic text in frames and input areas
        6.2.3 Advanced setup

  7. Cyrillic wordprocessing

     7.1 TeX-based environments
        7.1.1 Using the Washington Cyrillic
        7.1.2 KOI-8 package for teTeX
        7.1.3 Using the cmcyralt package for LaTeX
        7.1.4 Using the CyrTUG package
     7.2 The StarOffice suite

  8. Printing and PostScript

     8.1 Text to PostScript conversion
        8.1.1 An a2ps converter
        8.1.2 The GNU enscript
     8.2 Text to TeX conversion
  9. Cyrillic in PostScript

     9.1 Adding Cyrillic fonts to Ghostscript

  10. Print setup

     10.1 Pre-loading Cyrillic fonts into a non-PostScript printer
     10.2 Printing with different fonts

  11. Localization and Internationalization

     11.1 Locale
        11.1.1 How to use locale
        11.1.2 Locale-aware programming
     11.2 Internationalization

  12. Staying compatible

     12.1 MIME-based data compatibility
     12.2 Explicit character set conversion
     12.3 Cyrillic in the DOS emulator

  13. Bibliography

  14. Summary of the various useful resources



  ______________________________________________________________________

  1.  Administrativia



  1.1.  Introduction


  This document covers the things you need to successfully work with
  information containing cyrillic text (mostly Russian) under Linux.
  Although this document assumes your using Linux as an operating
  system, most of information presented is equally applicable to many
  other Unix flavors. I shall try to keep the distinction as visible as
  possible.

  There are a number of popular Linux distributions. As an example
  system I describe the RedHat 4.1 Linux (Vanderbildt) - the one I am
  personally using. Nevertheless, I shall try to highlight the
  differences, if they exist, in other popular distributions, such as
  Debian GNU/Linux and Slackware Linux.

  Since such setup directly modifies and extends the Operating System,
  you should understand, what you are doing. Even though I tried to keep
  things as easy as possible, having some experience with a given piece
  of software is an advantage. I am not going to describe what the X
  Window System is or how to typeset the documents with TeX and LaTeX,
  or how to install printer in Linux. Those issues are covered in other
  documents.

  For the same reason, in most cases I describe a system-wide setup, by
  default requiring root privileges. Still, if there is a possibility
  for user-level setup, I'll try to mention it.

  NOTE: The X Window System, TeX and other Linux components are complex
  systems with a sofisticated configuration. If you do something wrong,
  you can not only fail with Russian setup, but to break the component
  as well, if not the entire system. This is not to scare you off, but
  merely to make you understand the seriousness of the process and be
  careful. Preliminary backup of the config files is highly recommended.
  Having a guru around is also advantageous.



  1.2.  Availability and feedback


  This document is available at sunsite.unc.edu or tsx-11.mit.edu as a
  part of the Linux Document Project. Also, it may be available at
  various FTP sites containing Linux. Moreover, it may be included as a
  part of Linux distribution.

  If you have any suggestions or corrections regarding this document,
  please, don't hesitate to contact me as abel@bfr.co.il. Any new and
  useful information about Cyrillic support in various Unices is highly
  appreciated. Remember, it will help the others.



  1.3.  Acknowledgments and copyrights


  Many people helped me (and not only me) with valuable information and
  suggestions. Even more people contributed software to the public
  community. I am sorry if I forgot to mention somebody.

  So, here they go:


  o  Bas V. de Bakker

  o  David Daves

  o  Serge Vakulenko

  o  Sergei O. Naoumov

  o  Winfried Truemper

  o  Ilya K. Orehov

  o  Michael Van Canneyt

  o  Alex Bogdanov

  o  ...and the countless helpful people from the relcom.fido.ru.unix
     and relcom.fido.ru.linux Usenet newsgroups.

  This document is Copyright (C) 1995,1997 by Alexander L. Belikoff. It
  may be used and distributed under the usual Linux HOWTO terms
  described below.

  The following is a Linux HOWTO copyright notice:


       Unless otherwise stated, Linux HOWTO documents are copy-
       righted by their respective authors. Linux HOWTO documents
       may be reproduced and distributed in whole or in part, in
       any medium physical or electronic, as long as this copyright
       notice is retained on all copies. Commercial redistribution
       is allowed and encouraged; however, the author would like to
       be notified of any such distributions.

       All translations, derivative works, or aggregate works
       incorporating any Linux HOWTO documents must be covered
       under this copyright notice.  That is, you may not produce a
       derivative work from a HOWTO and impose additional restric-
       tions on its distribution. Exceptions to these rules may be
       granted under certain conditions; please contact the Linux
       HOWTO coordinator at the address given below.



       In short, we wish to promote dissemination of this informa-
       tion through as many channels as possible. However, we do
       wish to retain copyright on the HOWTO documents, and would
       like to be notified of any plans to redistribute the HOWTOs.


  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu. You may finger this
  address for phone number and additional contact information.

  Unix is a technology trademark of the X/Open Ltd.; MS-DOS, Windows,
  Windows 95, and Windows NT are trademarks of the Microsoft Corp.; The
  X Window System is a trademark of The X Consortium Inc. Other
  trademarks belong to the appropriate holders.



  2.  Theoretical background



  2.1.  Characters and codesets


  In order to understand and print characters of various languages, the
  system and software should be able to distinguish them from other
  characters. That is, each unique character must have a unique
  representation inside the operating system, or the particular software
  package. Such collection of all unique characters, that the system is
  able to represent at once, is called a codeset.

  At the time of the most operating system's creation, nobody cared
  about software being multilingual. Therefore, the most popular codeset
  was (and actually is) an ASCII (American Standard Code for Information
  Interchange).

  The standard ASCII (aka 7-bit ASCII) comprises 128 unique codes. Some
  of them ASCII defines as real printable characters, and some are so-
  called control characters, which had special meanings in the old
  communication protocols. Each element of the set is identified by an
  integer character code (0-127). The subset of printable characters
  represents those found on the typewriter's keyboard with some minor
  additions. Each character occupies 7 least significant bits of a byte,
  whereas the most significant one was used for control purposes (say,
  transmission control in old communication packages).

  The 7-bit ASCII concept was extended by 8-bit ASCII (aka extended
  ASCII). In this codeset, the characters' codes' range is 0-255. The
  lower half (0-127) is pure ASCII, whereas the upper one contains 127
  more characters. Since this codeset is backward compatible with the
  ASCII (character still occupies 8 bit, the codes correspond the old
  ASCII), this codeset gained wide popularity.

  The 8-bit ASCII doesn't define the contents of the upper half of the
  codeset. Therefore the ISO organization took the responsibility of
  defining a family of standards known as ISO 8859-X family. It is a
  collection of 8-bit codesets, where the lower half of each codeset
  (characters with codes 0-127) matches the ASCII and the upper parts
  define characters for various languages. For example, the following
  codesets are defined:


  o  8859-1 - Europe, Latin America (also known as Latin 1)

  o  8859-2 - Eastern Europe

  o  8859-5 - Cyrillic

  o  8859-8 - Hebrew

  In Latin 1, the upper half of the table defines various characters
  which are not part of the English alphabet, but are present in various
  european languages (german umlauts, french accentes etc).

  Another popular extended ASCII implementation is so-called IBM
  codepage (named after some computer company, that developed this
  codeset for it's infamous personal computers). This one contains
  pseudo-graphic characters in the upper half.

  Software, that doesn't make any assumptions about the 8-th bit of the
  ASCII data is called 8-bit clean. Some older programs, designed with
  7-bit ASCII in mind are not 8-bit clean and may work incorrectly with
  your extended ASCII data. Most of packages, however, are able to deal
  with the extended ASCII by default, or require some very basic setup.
  NOTE: before posting the question "I did all setup right, but I cannot
  enter/view Cyrillic characters!", please consult the section ``'' for
  the notes on the program, you are using.

  For information about making your software 8-bit clean, see section
  ``''.

  Since on most systems character occupies 8 bits, there is no way to
  extend ASCII more and more. The way to implement new symbols in ASCII-
  based codesets is creation of other extended ASCII implementations.
  This is the way, the Cyrillic ASCII set is implemented.

  We already mentioned ISO 8859-5 standard as the one defining the
  Cyrillic codeset. But as it often happens to the standards, this one
  was developed without taking into account the real practices in the
  former USSR. Therefore, one thing that standard really achieved was
  another degree of confusion. I wouldn't say that ISO 8859-5 is widely
  used anywhere.

  Other standards for Cyrillic include the so-called Alt codeset and
  Microsoft CP1251 codepage. The former one was developed by (who?) for
  MS-DOS quite a while ago. Back then, there was not very buzz yet about
  internetworking, so the intention was to make it as compatible as
  possible with the IBM standard. Therefore the Alt codeset is
  effectively the same IBM codepage, where all specific European
  characters in the upper half were replaced with the Cyrillic ones,
  leaving the pseudographic ones. Therefore, it didn't screw the text
  windowing facilities and provided Cyrillic characters as well.  The
  Alt standard is still alive and extremely popular in MS-DOS.

  Microsoft CP1251 codepage is just an attempt of Microsoft to come up
  with the new standard for Cyrillic codeset in Windows. As far as I
  know, it is not compatible with anything else (not very surprizing,
  huh?)

  And finally there is KOI8-R. This one is also quite old, but it was
  designed wisely and nowadays the design points of it look really
  useful.
  Again, it is compatible with ASCII, and the Cyrillic characters are
  located in the upper half. But the main design point of KOI8-R is that
  the Cyrillic characters' positions must correspond to the English
  characters with the same phonetics. Namely, if we set the eighth bit
  of the English character 'a', we'll get the Cyrillic 'a'.  This means
  that, given the Cyrillic text written in KOI8-R, we can strip the
  eighth bit of each character and we still get a readable text,
  although written with English characters! This is very important now,
  since there are many mailers on the Internet, that just strip the
  eighth bit silently, being sure that every single soul on the face of
  the Earth speaks English.

  Not surprisingly, KOI8-R quickly became a de-facto standard for
  Cyrillic on the Internet. Andrew A. Chernov did a tremendous amount of
  work to make a standard in this area. He is an author of RFC 1489
  ("Registration of a Cyrillic Character Set").

  These two standards differ only in positions of the cyrillic
  characters in the table (that is in cyrillic character codes).

  The principal difference is that the Alt codeset is used by MS-DOS
  users only, whereas KOI8-R is used in Unix, as well as in MS-DOS
  (though in the latter KOI8-R is much less popular). Since we are doing
  the right thing (namely working in the Unix operating system), we
  shall focuse mostly on KOI8-R.

  As for the ISO standard, it is more popular in Europe and the US as a
  standard for Cyrillic. The leader in Russia is definitely KOI8-R.

  There are other standards, which are different from ASCII and much
  more flexible. Unicode is most known. However, they are not
  implemented as good as the basic ones in Unix in general and  Linux in
  particular. Therefore, I am not describing them here.



  3.  Preparing your environment


  Before we start customizing various parts of the system functionality,
  we have to set up a couple basic things. Most of tools described below
  assume that there are Cyrillic fonts available and a user is able to
  input Cyrillic characters. To make it true we have to configure the
  environment to provide both fonts and input facility for Cyrillic.

  There are effectively two interface models supported by Linux. One is
  the text mode, and the other one is the graphic mode, provided by the
  X Window System. Both require different setup, which will be described
  below.



  3.1.  Text mode setup


  Generally, the text mode setup is the easiest way to show and input
  Cyrillic characters. There is one significant complication, however:
  the text mode fonts and keyboard layout manipulations depend on
  terminal driver implementation. Therefore, there is no portable way to
  achieve the goal across different systems.

  Right now, I describe the way to deal with the Linux console driver.
  Thus, if you have another system, don't expect it to work for you.
  Instead, consult your terminal driver manual. Nevertheless, send me
  any information you find, so I'll be able to include it in further
  versions of this document.
  3.1.1.  Linux Console


  The Linux console driver is quite a flexible piece of software. It is
  capable of changing fonts as well as keyboard layouts. To achieve it,
  you'll need the kbd package. Both RedHat and Slackware install kbd as
  part of a system.

  The kbd package contains keyboard control utilities as well as a big
  collection of fonts and keyboard layouts.

  Cyrillic setup with kbd usually involves two things:


  1. Screen font setup. This is performed by the setfont program. The
     fonts files are located in /usr/lib/kbd/consolefonts.

     NOTE: Never run the setfont program under X because it will hang
     your system. This is because it works with low-level video card
     calls which X doesn't like.

  2. Load the appropriate keyboard layout with the loadkeys program.

  NOTE: In RedHat 3.0.3, /usr/bin/loadkeys has too restrictive access
  permissions, namely 700 (rwx------). There are no reasons for that,
  since everyone may compile his own copy and execute it (the
  appropriate system calls are not root-only). Thus, just ask your
  sysadmin to set more reasonable permissions for it (for example, 755).

  The following is an excerpt from my cyrload script, which sets up the
  Cyrillic mode for Linux console:


  if [ notset.$DISPLAY != notset. ]; then
      echo "`basename $0`:  cannot run under X"
      exit
  fi

  loadkeys /usr/lib/kbd/keytables/ru.map
  setfont /usr/lib/kbd/consolefonts/Cyr_a8x16
  mapscrn /usr/lib/kbd/consoletrans/koi2alt
  echo -ne "\033(K"              # the magic sequence
  echo "Use the right Ctrl key to switch the mode..."



  Let me explain it a bit. You load the appropriate keyboard mapping.
  Then you load a font corresponding to the Alt codeset. Then, in order
  to be able to display text in KOI8-R correctly, you load a screen
  translation table. What it does is a translation of some characters
  from the upper half of the codeset to the Alt encoding. The word
  'some' is crucial here - not all characters get translated, therefore
  some of them, like IBM pseudographic characters get unmodified to the
  screen and display correctly, since they are compatible with the Alt
  codeset, as opposed to KOI8-R. To ensure this, run mc and pretend you
  are back to MS-DOS 3.3...

  Finally, the magic sequence is important but I have no idea what on
  the Earth it does. I stole/borrowed/learned it from German HOWTO back
  in 1994, when it was like the only national language oriented HOWTO.
  If you have any idea about this magic sequence, please tell me.

  Finally, for those purists, who don't wont to give the Alt codeset a
  chance, I'm attaching yet another version of the script above, using
  native KOI8-R fonts.

  if [ notset.$DISPLAY != notset. ]; then
      echo "`basename $0`:  cannot run under X"
      exit
  fi

  loadkeys /usr/lib/kbd/keytables/ru.map
  setfont /usr/lib/kbd/consolefonts/koi-8x16
  echo "Use the right Ctrl key to switch the mode..."



  However, don't expect nice borders in your text mode-based windowing
  applications.

  Now you probably want to test it. Do the appropriate bash or tcsh
  setup, rerun it, then press the right Control key and make sure you
  are getting the cyrillic characters right. The 'q' key must produce
  russian "short i" character, 'w' generates "ts", etc.

  If you've screwed something up, the very best thing to do is to reset
  to the original (that is, US) settings. Execute the following
  commands:


  loadkeys /usr/lib/kbd/keytables/defkeymap.map
  setfont /usr/lib/kbd/consolefonts/default8x16



  NOTE: unfortunately enough, the console driver is not able to preserve
  it's state (at least easily enough), while running the X Window
  System. Therefore, after you leave the X (or switch from it to a
  console), you have to reload the console russian font.



  3.1.2.  FreeBSD Console


  I am not using FreeBSD so I couldn't test the following information.
  All data in this section should be treated as just pointers to begin
  with. The FreeBSD project homepage may have some information on the
  subject. Another good source is the relcom.fido.ru.unix newsgroup.
  Also, check the resources listed in section ``''.

  Anyway, this is what Ilya K. Orehov suggests to do in order to make
  FreeBSD console speak Russian:


  1. In /etc/sysconfig add:



     keymap=ru.koi8-r
     keyrate=fast
     # NOTE: '^[' below is a single control character
     keychange="61 ^[[K"
     cursor=destructive
     scrnmap=koi8-r2cp866
     font8x16=cp866b-8x16
     font8x14=cp866-8x14
     font8x8=cp866-8x8



  2. In /etc/csh.login:


     setenv ENABLE_STARTUP_LOCALE
     setenv LANG ru_SU.KOI8-R
     setenv LESSCHARSET latin1



  3. Make analogous changes in /etc/profile



  3.2.  The X Window System


  Like the console mode, the X environment also requires some setup.
  This involves setting up the input mode and the X fonts. Both are
  being discussed below.



  3.2.1.  The X fonts.


  First of all, you have to obtain the fonts having the Cyrillic glyphs
  at the appropriate positions.

  If you are using the most recent X (or XFree86) distribution, chances
  are, that you already have such fonts. In the late 1995, the X Window
  System incorporated a set of Cyrillic fonts, created by Cronyx. Ask
  your system administrator, or, if you are the one, check your system,
  namely:


  1. Run 'xlsfonts | grep koi8'. If there are fonts listed, your X
     server is already aware about the fonts.

  2. Otherwise, run


     find -name crox\*.pcf\*



  to find the location of the Cyrillic fonts in the system. You'll have
  to enable those fonts to the X server, as I explain below.

  If you haven't found such fonts installed, you'll have to do it
  yourself.

  There is some ambiguity with the fonts. XFree86 docs claim that the
  russian fonts collection included in the distribution is developed by
  Cronyx. Nevertheless, you may find another set of Cronyx Cyrillic
  fonts on the net (eg. on ftp.kiae.su), known as the xrus package
  (don't confuse it with the xrus program, which is used to setup a
  Cyrillic keyboard layout. Hopefully, tha letter one was renamed to
  xruskb recently). Xrus has fewer fonts than the collection in Xfree86
  (38 vs 68), but the latter one didn't go along with my ``Netscape''
  setup - it gave me some really huge font in the menubar. The xrus
  package doesn't have this problem.

  I would suggest you to download and try both of them. Pick up the one
  which you'll like more. Also, I'm going to creat RPM packages soon for
  both collections and download them to ftp.redhat.com.

  There are also older stuff, for example the vakufonts package, created
  by Serge Vakulenko, which was the base for the one in the X
  distribution. There are also a number of others. The important point
  is that the fonts' names in the old collection were not strictly
  conforming to the standard. The latter is fine in general, but
  sometimes it may cause various weird errors. For example, I had a bad
  experience with Maple V for Linux, which crashed mysteriously with the
  vakufonts package, but ran smoothly with the "standard" ones.

  So, let's start with the fonts:


  1. Download the appropriate fonts collection. The package for XFree86
     may be found at any FTP site, containing the X distribution, for
     example, directly from the XFree86 FTP site. The xrus package may
     be found on ftp.kiae.su

  2. Now when you have the fonts, you create some directory for them. It
     is generally a bad idea to put new fonts to the already existing
     font directory. So, place them, to, say,
     /usr/lib/X11/fonts/cyrillic for a system-wide setup, or just create
     a private directory for personal use.

  3. If the new fonts are in BDF format (*.bdf files), you have to
     compile them. For each font do:


     bdftopcf -o <font>.pcf <font>.bdf



  If your server supports compressed fonts, do it, using the compress
  program:


  compress *.pcf



  Also, if you do want to put the new fonts to an already existing font
  directory. you have to concatenate the old and the new files named
  fonts.alias in the case both of them exist.

  4. Each font directory in the X must contain a list of fonts in it.
     This list is stored in the file fonts.dir. You don't have to create
     this list manually. Instead, do:


     cd <new font directory>
     mkfontdir .



  5. Now you have to make this font directory known to the X server.
     Here, you have a number of options:


  o  System-wide setup for XFree86. If you are running this version of
     X, then append the new directory to the list of directories in the
     file XF86Config. To find the location of this file, see output of
     startx. Also, see XF86Config(4/5) for details.

  o  System-wide setup through xinit. Add the new directory to the xinit
     startup file. See xinit(1x) and the next option for details.


  o  Personal setup. You have a special start-up file for the X -
     ~/.xinitrc (or ~/.Xclients, or ~/.xsession for the RedHat users).
     Add the following commands to it:



     xset +fp <new font directory>
     xset fp rehash



  It is important to note that '+fp' means that the new fonts will be
  added to the head of the font path list. That is, if an application
  requests say a fixed font, it'll be given the one with Cyrillic char-
  acters, which is definitely what we are trying to achieve.

  There are problems, though. The fixed font in the cyrillic fonts dis-
  tribution doesn't have it's bold and italic counterparts. My font of
  choice is 6x13, so, since it also lacks bold and italic typefaces, I
  cannot use Emacs/XEmacs faces in their full glory. Hopefully somebody
  will ultimately create those fonts and the situation will change.

  6. Now restart your X. If you have done everything right, the tests in
     the beginning of the section will be successful. Also, play with
     xfontsel(1x) to make sure you are able to select the cyrillic
     fonts.

  In order to make the X clients use the Cyrillic fonts, you have to set
  up the appropriate X resources. For example, I make the russian font
  the default one in my ~/.Xdefaults:


  *font:         6x13



  Since my cyrillic fonts are first in the font path (see output of

  This just a simple case. If you want to set the appropriate part of
  the X client to a cyrillic font, you have to figure out the name of
  the resource (eg. using editres(1x)) and to specify it either in the
  resource database, or in the command line. Here go some examples:


  $ xterm -font '-cronyx-*-bold-*-*-*-19-*-*-*-*-*-*-*'



  ...will run xterm with some ugly font; and


  $ xfontsel -xrm '*quitButton.font: -*-times-*-*-*-*-13-*-*-*-*-*-koi8-*'



  ...will set a Cyrillic Times font for the Quit button in xfontsel.



  3.2.2.  The input translation


  In the newest X releases (X11R61 and higher) there are two "standard"
  input methods: the original one, working through the xmodmap utility,
  and the new one called Xkb (X KeyBoard). The very first thing you have
  to do is to disable the Xkb method! Don't get charmed by it's ability
  to set up a "russian keyboard". It looks like this method is using the
  Cyrillic keysyms defined in keysymdef.h. This file defines keysyms for
  many languages. The only problem is that those definitions have
  nothing to do with the extended ASCII codeset - the one most programs
  are only able to operate with! I hardly know any programs being able
  to grok the keysymdef.h keysyms, different from 8-bit ASCII. However
  our goal is to get the KOI8-R support to work.

  To disable the Xkb support, browse through the Keyboard section of
  your XF86Config file and comment all lines starting with Xkb (case
  doesn't matter). Instead, put the following line:


  XkbDisable



  The xmodmap program.allows customization of codes emitted by various
  characters and their combinations. It sets the things up based on the
  file containing the translation table.

  In the previous versions of this document I used to describe the
  xmodmap-based setup in a great detail. This proved to be almost
  useless. The Xmodmap-based input translation method is well known as
  being it is non-portable, inflexible, and incomplete.  Your
  configuration may work with one XFree version and fail with a
  different one. Even worse, sometimes things differ accross different
  servers in the same distribution.

  I strongly suggest you not to play with this xmodmap, at least for
  now. Apart from headache and disappointment you'll gain nothing.
  Instead, I recommend installing the xruskb package, which allows you
  to configure most of the input translation parameters without having
  to know about xmodmap. Again, the RedHat Linux users are free to
  download and install an RPM package.



  3.3.  First steps - Cyrillic in shells



  3.4.  bash


  Three variables should be set on order to make bash understand the
  8-bit characters. The best place is ~/.inputrc file. The following
  should be set:


  set meta-flag on
  set convert-meta off
  set output-meta on



  3.5.  csh/tcsh


  The following should be set in .cshrc:



  setenv LC_CTYPE iso_8859_5
  stty pass8



  If you don't have the POSIX stty (impossible for Linux), then replace
  the last call to the following:


  stty -istrip cs8



  3.6.  ksh


  As for the public domain ksh implementation - pdksh 5.1.3, you can
  input 8 bit characters only in vi input mode. Use:


  set -o vi



  3.7.  less


  So far, less doesn't support the KOI8-R character set, but the
  following environment variable will do the job:


  LESSCHARSET=latin1



  3.8.  mc (The Midnight Commander)


  To display Cyrillic text correctly, select the full 8 bits item in the
  Options/Display menu.

  If your problem is the ugly windows' borders, consult the ``''
  section.

  As an off-topic, if you want to make mc use color in an Xterm window,
  set the variable COLORTERM:


  COLORTERM= ; export COLORTERM



  3.9.  rlogin


  Make sure that the shell on the destination site is properly set up.
  Then, if your rlogin doesn't work by default, use 'rlogin -8'.

  3.10.  zsh


  Use the same way as with csh (see section ``csh''). The startup files
  in this case are .zshrc or /etc/zshrc.



  4.  Editing text


  In this section I'll describe how to customize various text editors to
  work with Cyrillic text. This doesn't cover the word processors, which
  will be described later (see section ``'').



  4.1.  Emacs and XEmacs


  There are two version of the Emacs editor - GNU Emacs and XEmacs.
  While they provide more or less same functionality, some
  implementation details are significantly different. Cyrillic setup
  requires some low-level (in Emacs Lisp sense) tweaking, and it differs
  a bit for those two versions.

  NOTE: Apart from the setup described here, there is an alternative way
  to configure both versions of emacs - use MULE (MULtilanguage Emacs
  support). The latter way is fairly complicated and (to the best of my
  knowledge) rarely used, so I don't discuss it here.

  The minimal cyrillic support in GNU emacs (you don't have to do it for
  the XEmacs) is done by adding the following calls to one's .emacs
  (provided that the Cyrillic character set support is installed for
  console or X respectively):


  (standard-display-european t)

  (set-input-mode (car (current-input-mode))
     (nth 1 (current-input-mode))
     0)



  This allows the user to view and input documents in Russian.

  However, it isn't enough. Emacs doesn't know yet, that Cyrililic
  characters may constitute a word, let alon the upper/lower case
  conversion rules. In order to teach Emacs doing that, you have to
  modify the syntax and case tables of emacs:


  (require 'case-table)

  (let* ((ruc "\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361")
         (rlc "\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321")
         (i 0)
         (len (length ruc)))
    (while (< i len)
      (modify-syntax-entry (elt ruc i) "w  ")
      (modify-syntax-entry (elt rlc i) "w  ")
      (set-case-syntax-pair (elt ruc i) (elt rlc i) (standard-case-table))
      (setq i (+ i 1))))


  For this purpose I created a rusup.el file which does this, as well as
  a couple handy functions. You have to load it in your ~/.emacs.

  Finally, the russian.el <http://www.math.uga.edu/~valery/russian.el>
  package by Valery Alexeev (valery@math.uga.edu) allows the user to
  switch between cyrillic and regular input mode and to translate the
  contents of a buffer from one Cyrillic coding standard to another
  (which is especially useful while reading the texts imported from MS-
  DOS or Windows).



  4.2.  Using vi


  The vi editor (at least it's clone vim, available in most Linux
  distributions) is aware of 8-bit characters. It will allow you to
  enter cyrillic characters and will be able to recognize the word
  boundaries correctly. I don't know about the upper-/lower-case
  conversion rules, since I don't use vi much. If you know something
  about it, please inform me.



  4.3.  Editing text with joe


  Joe requires a special -asis option to recognize 8-bit characters. You
  may either specify this option at the command line, or to put it in
  ~/.joerc file (for personal use, or in /usr/lib/joerc for system-wide
  setup.

  If your program doesn't understand -asis option, you have to upgrade
  to the newer version.

  However, joe doesn't seem to understand the cyrillic words' boundaries
  correctly. I assume, that it applies both to the case conversion
  rules.



  4.4.  Spell-checking Russian


  The program I use to spell-check text is the GNU ispell. It is very
  flexible and extensible, so it is possible to use it to spell-check
  text in languages, other than English, by adding new spell
  dictionaries.

  Constantine Knizhnik has created a very good Russian dictionary for
  ispell. You may find it at his homepage. The distribution includes a
  handy incremental spelling script for emacs.

  Ideally, if you already have an ispell properly installed, you have to
  just step into the newly-created directory and generate the
  dictionary, using the commands provided in the Makefile. However,
  chances are quite high, that you'll see a lot of complaints about the
  ispell's unawareness of the 8-bit data. This is because in most
  distributions, ispell is compiled without 8-bit data support. In this
  case, you cannot avoid recompiling the ispell package.

  Again, RedHat users will be delighted to know that I've rebuilt the
  ispell package with both Russian and German dictionaries. As usual,
  you may grab it from the RedHat FTP site.


  Once you have everything installed, you may invoke Russian spell-
  check, by supplying '-d russian' option to ispell.

  Now, if you use Emacs, you may want to add a menu item for a russian
  dictionary. I sent a proposed menu entry to the ispell.el maintainer
  and he kindly agreed to include it in the the next public release of
  the file. Meanwhile, you may do it by adding the following code in
  your ~/.emacs (or in /usr/share/emacs/site-lisp/site-start.el for a
  system-wide setup):


  (setq ispell-dictionary-alist
    (append ispell-dictionary-alist
            '(("russian"
               "[\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]"
               "[^\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]"
               "[']" t ("-C" "-d" "russian") "~latin1"))))

  (define-key-after ispell-menu-map [ispell-select-russian]
    '("Select Russian (KOI-8)" . (lambda ()
                                   (interactive)
                                   (ispell-change-dictionary "russian")))
    'british)



  Unfortunately, it won't work for the XEmacs. I'll try to solve this
  problem later.



  5.  Using Cyrillic with mail and news


  Setting up your mail and news software to recognize Cyrillic text is
  not very difficult, although you have to possess some knowledge of
  principles, mail and news work by.

  Internet electronic mail software generally consists of two parts: MUA
  (Mail User Agent) and MTA (Mail Transfer Agent). MUA is the program
  you use to read, compose, and send mail. However, MUA doesn't transfer
  mail messages by itself. Instead, it calls the MTA, which is
  reponsible to send message using an appropriate protocol to the
  appropriate direction. For example, your MUA may be Pine and MTA -
  qmail.

  Until quite recently, both MTA and MUA weren't 8-bit clean by default.
  Therefore, whenever you sent your message from say America to Russia,
  you were never sure, that some intermediate MTA won't strip the 8th
  bit from each character of your message. Therefore, a set of protocols
  was developed, which allowed encoding various kinds of data using only
  printable characters from 7-bit ASCII. This family of protocols is
  called MIME (MultimedIa Mail Encoding).

  Since MIME is usually pre-configured to reasonable defaults, we won't
  describe it here. We will talk more about MIME when we provide a
  backward compatibility with other Cyrillic encodings (section ``'').

  Meanwhile, we start MUA setup, because it is usually up to an end-
  user. Then, we will describe the basic priciples of the MTA
  configuration for Cyrillic.



  5.1.  Setting up Mail User Agents



  5.1.1.  Emacs-based mail readers


  Basically, you don't need any special setup for Emacs-based readers,
  geivedn, that you've already configured the emacs itself (see section
  ``'').



  5.1.2.  pine


  Set the following directive in ~/.pinerc for personal configuration,
  or in /usr/lib/pine.conf for a global one:


  character-set=ISO-8859-5



  5.2.  Configuring your MTA


  There are a number of MTAs available now. These include sendmail,
  qmail, smail, exim, and others.



  5.2.1.  sendmail


  So far, sendmail is much more popular than other MTAs, because it's
  long history and widespread use. Personally, I hate this program - it
  is a perfect example of a completely moronic design and even it's
  "improvements" with the passion of time show, that this approach is
  not going to cease. Any system administrator shudders, when he hears
  the ominous "sendmail.cf" name...

  As of now, sendmail doesn't strip the 8th bit anymore. However, it may
  encode the 8-bit data using a special base64 encoding. Although most
  MUAs are supposed to recognize it and decode it back to a regular
  data, you may want to start with sending raw 8-bit text to make sure
  everything works.

  As of version 8, sendmail handles 8-bit data correctly by default. If
  it doesn't do it for you, check the EightBitMode option and option 7
  given to mailers in your /etc/sendmail.cf. See "Sendmail. Operation
  and Installation Guide" for details.



  5.2.2.  Other MTAs


  I don't know much about other MTAs. If you know something, which may
  be important for Cyrillic setup, please inform me.



  6.  Browsing the Cyrillic Web


  Unlike e-mail and news, there is no definitive standard for Cyrillic
  encoding for the Web. This is primarily because Microsoft offers Web
  authoring tools, which only allow cp1251 codeset for Cyrillic,
  completely ignoring the fact that any other standards may already
  exist.

  The setup described here is very basic. It will allow you to view
  pages in the KOI8-R codeset. If the situation improves, I'll add more
  information.



  6.1.  lynx


  As of version 2.6, you may select the appropriate encoding for the
  display Character set option.



  6.2.  Netscape navigator


  Make sure you are using Netscape version higher than 3. If your
  Netscape is older, download a new one from www.netscape.com.



  6.2.1.  Basic setup


  To be able to see Cyrillic text in most parts of the HTML document, do
  the following:


  o  In menu Options/Document Encoding select Cyrillic(KOI-8).

  o  In menu Options/General Preferences/Fonts select Cyrillic (KOI-8)
     encoding, Times(Cronyx) as a proportional font and Courier(Cronyx)
     as a fixed one.

  o  save options.

  NOTE: This setup will work with most parts of the document. However,
  you won't be able to display Cyrillic text in the window header, menus
  and some controls. Attempts to fix it follows.



  6.2.2.  Cyrillic text in frames and input areas


  To fix this, it is usually enough to:


  1. Copy the Netscape properties database (usually Netscape.ad) to
     ~/Netscape.

  2. In the latter file, set the following property:


     *documentFonts.charset*iso8859-1:           koi8-r

  This will force all frame and input elements to use the fonts with
  koi8-r encoding instead of the default ones, therefore you have to
  make sure you have installed such fonts (see section ``'').

  The bad news about the trick above is that if you load a document
  which is supposed to be displayed in iso-8859-1 fonts, it will be
  displayed using the koi8 fonts instead. Sometimes such documents will
  look worse.



  6.2.3.  Advanced setup


  Andrew A. Chernov is the one, who knows more than others about KOI-8
  in general and netscape in particular. Visit his excellent KOI-8 page
  and download a patch for Netscape resource file, making Netscape speak
  Russian as much as it is able to.



  7.  Cyrillic wordprocessing



  7.1.  TeX-based environments


  In this section I'll describe several ways to make TeX and LaTeX
  typeset Cyrillic texts. There are several ways, which differ in setup
  sophistication and usage convenience. For example, one possibility is
  to start without any preliminary setup and use the Washington AMSTeX
  Cyrillic fonts. On the other hand, you may install a LaTeX package,
  providing a very high degree of Cyrillic setup. I have an experience
  with two such packages. One is the cmcyralt package by Vadim V.
  Zhytnikov (vvzhy@phy.ncu.edu.tw) and Alexander Harin
  (harin@lourie.und.ac.za), and the other one is the LH package by the
  CyrTUG group with styles and hyphenation for LaTeX2e by Sergei O.
  Naoumov (serge@astro.unc.edu). I'll describe both.

  Note, that there are two versions of LaTeX available - 2.09 is the old
  one, while 2e is a new pre-3.0 release. If you are using LaTeX 2.09,
  then switch quickly to the 2e. The latter retains compatibility with
  the old one, but has much more features. Hopefully, version 3 will be
  released soon. I describe a LaTeX 2e setup.

  Also, both of these packages require the Cyrillic text to be typeset
  using the Alt codeset, not KOI8-R! This is caused by historical
  reasons, since the creators of these packages used to work with EmTeX
  - the MS-DOG version of TeX (they didn't know about Linux yet :-).
  Switching to the KOI8-R requires some effort and is being expected to
  be done soon. So far, use some utility to convert your russian text
  from KOI8-R to Alt. See section ``''.



  7.1.1.  Using the Washington Cyrillic


  This package was created for the American Mathematic Society to
  provide documents with Russian references. Therefore, the authors were
  not very careful and the fonts look quite clumsy. This package is
  usually referred to as a "really bad cyrillic package for TeX".


  Nevertheless, we'll discuss it, because it is very easy to use and
  doesn't require any setup - this collection is supplied with most of
  TeX distributions.

  Of course, you won't be able to use such luxury as automatic
  hyphenation, but anyway...

  1. Prepend your document with the following directives:


  \input cyracc.def
  \font\tencyr=wncyr10
  \def\cyr{\tencyr\cyracc}



  2. Now to type a cyrillic letter, you enter


  \cyr



  and use a corresponding latin letter or a TeX command. Thus, the lower
  case of the Russian alphabet is expressed by the following codes:


  a b v g d e \"e zh z i {\u i} k l m n o p r s t u f kh c ch sh shch
  {\cprime} y {\cdprime} \`e yu ya



  It is extremely inconvenient to convert your Russian texts to such
  encoding, but you can automate the process. The translit program
  (section ``'') supports a TeX output option.



  7.1.2.  KOI-8 package for teTeX


  There is some new teTeX-rus package. It is reported to support KOI-8
  character set and have all basic stuff required for TeX and LaTeX. I
  personally haven't tried it yes, although I heard about it's
  successfull usage.

  NOTE: This package requires you to reconfigure and rebuild some parts
  of your teTeX package (for example the precompiled LaTeX macros).
  Unless you know what you are doing, you shouldn't try it without
  necessary care. Otherwise, you may be better off by borrowing the
  precompiled parts fron somebody on the net



  7.1.3.  Using the cmcyralt package for LaTeX


  The cmcyralt package can be found on any CTAN (Comprehensive TeX
  Archive Network) site like ftp.dante.de. You should obtain two pieces:
  the fonts collection from fonts/cmcyralt and the styles and
  hyphenation rules from macros/latex/contrib/others/cmcyralt.

  Note: Make sure you have the Sauter package installed, since cmcyralt
  requires some fonts from it. You can get this package from CTAN site
  as well.

  Now you should do the following:


  1. Put the new fonts to the TeX fonts tree. On my system (Slackware
     2.2) I created a cmcyralt directory in the
     /usr/lib/texmf/fonts/cm/. Create the src, tfm, and vf
     subdirectories in it. Put there .mf, .tfm, and vf files
     respectively.

  2. Put the font driver files (*.fd) from the styles archive to the
     appropriate place (in my case it was /usr/lib/texmf/tex/latex/fd).

  3. Put the style files (*.sty) to the appropriate LaTeX styles
     directory (in my case /usr/lib/texmf/tex/latex/sty).

  Now the hyphenation setup. This requires to remake the LaTeX base
  file.


  1. The file hyphen.cfg contains the directives for both English and
     Russian hyphenation. Extract the one for Russian and place it to
     the LaTeX hyphenation config file lthyphen.ltx. In my case, that
     file was in /usr/lib/texmf/tex/latex/latex-base.

  2. Put the rhyphen.tex to the same directory. It is needed for making
     the new base file. Later, you can remove it.

  3. Do 'make' in that directory. Don't for get to make a link from
     Makefile to Makefile.unx. During the make process check the output.
     There should be a message:


     Loading hyphenation patterns for Russian.



  If everything goes OK, you will get the new latex.fmt in that direc-
  tory. Put it to the appropriate place, where the previous one was
  (like /usr/lib/texmf/ini/). Don't forget to save the previous one!.

  This is it. The installation is complete. Try processing the examples
  found in the styles archive. If you are to create the PostScript files
  without any problems, then everything is OK. Now, to use Cyrillic in
  LaTeX, prepend your document with the following directive:


  \usepackage{cmcyralt}



  For more details, see the README file in the cmcyralt styles archive.

  Note: if you do have problems with the examples, provided you have
  installed the things right, then probably your TeX system hasn't been
  installed correctly. For example, during my first try, every attempt
  to create the .pk files for the russian fonts failed (MakeTeXPK
  stage). A substantial investigation discovered some implicit conflict
  between the localfont and ljfour METAFONT configurations. It used to
  work before, but kept crashing after the cmcyralt installation.
  Contact your local TeX guru - TeX is very (sometimes too much)
  complicated to reconfigure it without any prior knowledge.



  7.1.4.  Using the CyrTUG package


  You can obtain the CyrTUG package from the SunSite archive. Get the
  files CyrTUGfonts.tar.gz, CyrTUGmacro.tar.gz, and hyphen.tar.Z.

  The process of installation doesn't differ from too much the previous
  one.



  7.2.  The StarOffice suite


  Youri Kovalenko () has compiled a concise summary on StarOffice
  russification. It is located at .  I never had a chance to try it, so
  I cannot say anything about it's correctness.

  Another source of information on the subject is compiled by Eugene
  Demidov () and is located at .



  8.  Printing and PostScript



  8.1.  Text to PostScript conversion


  Sometimes you have just a plain ASCII KOI8-R text and you want to
  print it just to get it on the paper. One of the easiest ways to
  achieve that is to use special programs converting text to PostScript.

  There are a number of programs doing such conversion. I personally
  prefer a2ps. Originally developed as a simple text-to-PostScript
  converter it became a big and highly configurable program with many
  options and allows you to manage various page layouts, syntax
  highlighting etc. Another tool (now available as a part of the GNU
  project) is enscript.



  8.1.1.  An a2ps converter


  A text to PostScript converter has been around for a while and is one
  of the most versatile printing tools. The author proved to be very
  open to suggestions, so since the release 4.9.8 a2ps supports Cyrillic
  right off-the-shelf. All you need is a PostScript printer.

  The command I use is:


  a2ps -X koi8r --print-anyway  <file>



  8.1.2.  The GNU enscript


  The GNU enscript program is also designed for converting text to
  PostScript and it also has a non-ASCII codeset support. It doesn't
  have Cyrillic PostScript fonts, but it is very easy to get them, as
  will be explained below (thanks to Michael Van Canneyt):


  1. Install the newest enscript. As of now, the most recent release is
     1.5. You may either get the one from the GNU FTP archive, or take
     an RPM package from the Redhat site.

  2. Now, if you are a lucky RedHat Linux user, download and install
     Cyrillic Textbook font
     <ftp://ftp.redhat.com/pub/contrib/i386/enscript-fonts-
     koi8-1.0-1.i386.rpm>.

  3. If you don't use RPM, download a file textbook.tar.gz from the
     Cyrillic Software collection on sunsite.unc.edu
     <ftp://sunsite.unc.edu/pub/academic/russian-studies/Software/>.
     Extract it to a directory, where enscript fonts are located
     (usually /usr/share/enscript). Now change to that directory and run
     the following command:


         mkafmmap *.afm



  4. The setup is finished. Try to print some text in KOI8-R Cyrillic
     with the following command:


         enscript --font=Textbook8 --encoding=koi8 some.file



  If you want a really quick and dirty solution and you don't care about
  the output quality and all you need is just Cyrillic on the paper, try
  the rtxt2ps package. It is a very simple no-frills text-to-PostScript
  conversion program. The output quality is not very good (or, to be
  honest, just bad) but it does it's job.



  8.2.  Text to TeX conversion


  If all you need is just to print an ASCII text without any additional
  word processing, you may try to use some programs, which would convert
  your Cyrillic text to a ready-to-process TeX file. One of the best
  programs for such purposes is translit (see section ``''). In this
  case, you don't even have to bother about installing the Cyrillic
  fonts for TeX, since translit uses a Washington Cyrillic package,
  which is included in most TeX distributions (or am I wrong?)



  9.  Cyrillic in PostScript


  Experts say PostScript is easy. I cannot judge - I've got too many
  things to learn to spare some time to learn PostScript. So I'll try to
  use my sad experience with it. I'll appreciate any feedback from you
  guys who know more on the subject than I do (approx. 99% of the Earth
  population).

  Basically, in order to print a Cyrillic text using PostScript, you
  have to make sure about the following things:


  o  Cyrillic font is loaded or included in the document.

  o  Cyrillic text is included in the document.

  o  Cyrillic text uses the appropriate character codes which correspond
     to the font's requirements.

  o  An appropriate font is selected in order to print Cyrillic text.

  There is no solution general enough to be recommended as an ultimate
  treatment. I'll try to outline various ways to cope with different
  problems related to the subject.

  One way to address Cyrillic setup problems generally enough is to use
  Ghostscript. Ghostscript (or just gs in the newspeak) is a free (well
  quasi-free) PostScript interpreter. It has many advantages; among
  them:


  o  Ability to run on many platforms (various Unices, Windows etc)

  o  Support for a wide number of non-PostScript printers

  o  Good degree of configurability

  What is important in our particular case, is that once Ghostscript is
  set up, we can do all printing through it, thus eliminating extra
  setup for other PostScript devices (for example HP LaserJet IV)



  9.1.  Adding Cyrillic fonts to Ghostscript


  This is important, since you probably don't want to put a
  responsibility to other programs to insert Cyrillic fonts in the
  PostScript output. Instead, you add them to gs and just make the
  programs generate Cyrillic output compatible with the fonts.

  To add a new font (in pfa or pfb form) in gs, you have to:


  1. Put it in the gs fonts directory (ie.  /usr/lib/ghostscript/fonts).

  2. Add the appropriate names and aliases for the font in the Fontmap
     file in the gs directory.

  Recently a decent set of Cyrillic fonts for GhostScript appeared.  It
  is located in ftp.kapella.gpi.ru. This one even has a necessary part
  to add to the Fontmap file. You have to download the contents of the
  /pub/cyrillic/psfonts directory. The README file describes the
  necessary details.



  10.  Print setup


  Printing is always tricky. There are different printers from different
  vendors with different facilities. Even for a native printing there is
  no uniform solution (this applies not only to UNIX, but to other
  operating systems as well.

  Printers have different control languages and often they have very
  different views on foreign language support.  The good news is that on
  control language seems to be recognized as a de-facto standard for
  print job description - it is a PostScript language developed by Adobe
  Corporation.

  Another problem is a variety of requirements to the print services.
  For example, sometimes you want just to print a piece if C program,
  containing comments in Russian, so you don't need any pretty-printing
  - just a raw ASCII output in a single font. Another time, when you
  design a postcard for your girlfriend, you'll probably need to typeset
  some document with different fonts etc. This will definitely require
  more effort to setup Cyrillic support.

  To accomplish the former task you just have to make your printer
  understand one Cyrillic font and (maybe) install some filter program
  to generate data in appropriate format. To accomplish the latter one,
  you have to teach your printer different fonts and have a special
  software.

  There is also something in the middle, when you get a program which
  knows how to generate both the fonts and the appropriate printer
  input, so you can say do some aource code pretty-printing without
  sophisticated word processing systems.

  All these options will be more or less covered below.



  10.1.  Pre-loading Cyrillic fonts into a non-PostScript printer


  If you have a good old dot matrix printer and all you need is to print
  a raw KOI8-R text, try the following:


  1. Find a proper KOI8-R font for your printer. Check out the MS-DOSish
     stuff on the Internet (for example the SimTel archive
     <ftp://ftp.simtel.net>).

  2. Learn from the manual, how to load such font into your printer and,
     probably, write a simple program doing that.

  3. Run this program from the appropriate rc file at a boot time.

  Thus, having Cyrillic characters in the upper part of the printer's
  character set will allow you to print you texts in Russian without any
  hussle.

  Alternatively to the KOI8-R fonts you may try to use the Alt font.
  There are two reasons for that:


  o  It may be probably much easier to find an Alt font, since those
     were very widespread in the MS-DOS culture.

  o  Having a proper Alt font will allow you to print pseudo-graphic
     characters as well.

  However in this case, you'll have to convert your texts from KOI8-R to
  Alt before sending them to a printer. This is quite easy, since there
  are a lot of programs doing that (see ``translit'' for example), so
  you just have to call such program properly in the if field in
  /etc/printcap file. For example, with the translit program you may
  specify:



  if=/usr/bin/translit -t koi8-alt.rus



  See printcap(5) for details.



  10.2.  Printing with different fonts


  One great way to cope with different printers and fonts is to use TeX
  (see section ``''). TeX drivers handle all details, so once you make
  TeX understand Cyrillic fonts, you are done.

  Another possibility is to use PostScript. I decided to devote an
  entire chapter ``'' to the subject, since it is not simple.

  Finally, there are other word processors, which have printer drivers.
  I never tried anything apart from TeX, so I cannot suggest anything.



  11.  Localization and Internationalization


  So far, I described how to make various programs understand Cyrillic
  text. Basically, each program required it's own method, very different
  from the others. Moreover, some programs had incomplete support of
  languages other than English. Not to mention their inability to
  interact using user's mother tongue instead of English.

  The problems outlined above are very pressing, since software is
  rarely developed for home market only. Therefore, rewriting
  substantial parts of software each time the new international market
  is approached is very ineffective; and making each program implement
  it's own proprietary solution for handling different languages is not
  a great idea in a long term either.

  Therefore, a need for standardization arises. And the standard shows
  up.

  Everything related to the problems above is divided by two basic
  concepts: localization and internationalization. By localization we
  mean making programs able to handle different language conventions for
  different countries. Let me give an example. The way date is printed
  in the United States is MM/DD/YY. In Russia however, the most popular
  format is DD.MM.YY. Another issues include time representation,
  printing numbers and currency representation format. Apart from it,
  one of the most important aspect of localization is defining the
  appropriate character classes, that is, defining which characters in
  the character set are language units (letters) and how they are
  ordered. On the other hand, localization doesn't deal with fonts.

  Internationalization (or i18n for brevity) is supposed to solve the
  problems related to the ability of the program interact with the user
  in his native language.

  Both of the concepts above had to be implemented in a standard, giving
  programmers a consistent way of making the programs aware of national
  environments.
  Althogh the standard hasn't been finished yet, many parts actually
  have; so they can be used without much of a problem.

  I am going to outline the general scheme of making the programs use
  the features above in a standard way. Since this deserves a separate
  document, I'll just try to give a very basic description and pointers
  to more thorough sources.



  11.1.  Locale


  One of the main concept of the localization is a locale. By locale is
  meant a set of conventions specific to a certain language in a certain
  country. It is usually wrong to say that locale is just country-
  specific. For example, in Canada two locales can be defined -
  Canada/English language and Canada/French language. Moreover,
  Canada/English is not equivalent to UK/English or US/English, just as
  Canada/French is not equivalent to France/French or
  Switzerland/French.



  11.1.1.  How to use locale


  Each locale is a special database, defining at least the following
  rules:


  1. character classification and conversion

  2. monetary values representation

  3. number representation (ie. the decimal character)

  4. date/time formatting


  In RedHat 4.1, which I am using there are actually two locale
  databases: one for the C library (libc) and one for the X libraries.
  In the ideal case there should be only one locale database for
  everything.

  To change your default locale, it is usually enough to set the LANG
  environment variable. For example, in sh:


  LANG=ru_RU
  export LANG



  Sometimes, you may want to change only one aspect of the locale
  without affecting the others. For example, you may decide (God knows
  why) to stick with ru_RU locale, but print numbers according to the
  standard POSIX one. For such cases, there is a set of environment
  variables, which you can you to configure specific parts for the
  current locale. In the last exaple it would be:


  LANG=ru_RU
  LC_NUMERIC=POSIX
  export LANG LC_NUMERIC

  For the full description of those variables, see locale(7).

  Now let's be more Linux-specific. Unfortunately, Linux libc version
  5.3.12, supplied with RedHat 4.1, doesn't have a russian locale. In
  this case one must be downloaded from the Internet (I don't know the
  exact address, however).

  To check, locale for which languages you have, run 'locale -a'. It
  will list all locale databases, available to libc.

  Fortunately, Linux community is rapidly moving to the new GNU libc
  (glibc version 2, which is much more POSIX-compliant and has a proper
  russian locale. Next "stable" RedHat system will already use glibc.

  As for the X libraries, they have their own locale database. In the
  version I am using (XFree86 3.3), there already is a russian locale
  database. I am not sure about the previous versions. In any case, you
  may check it by looking into usr/lib/X11/locale/ (on most systems). In
  my case, there already are subdirectories named koi8-r and even
  iso8859-5.



  11.1.2.  Locale-aware programming


  With locale, program don't have to implement explicitly various
  character conversion and comparison rules, described above. Instead,
  they use special API which make use of the rules defined by locale.
  Also, it is not necessary for program to use the same locale for all
  rules - it is possible to handle different rules using different
  locales (although such technique should be strongly discouraged).

  From the setlocale(3) manual page:


       A  program  may be made portable to all locales by calling
       setlocale(LC_ALL, "" ) after program   initialization,  by
       using  the  values  returned  from a localeconv() call for
       locale - dependent information and by using  strcoll()  or
       strxfrm() to compare strings.


  SunSoft, for example, defines 5 levels of program localization:


  1. 8-bit clean software. That is, the program calls setlocale(), it
     doesn't make any assumptions about the 8th bit of each character,
     it users functions from ctype.h and limits from limits.h, and it
     takes care about signed/unsigned issues.

     It is very important not to do any assumption about the character
     set nature and ordering. The following programming practices must
     be avoided:


         if (c >= 'A' && c <= 'Z') {
             ...



  Instead, macros from the ctype.h header file are locale-aware and
  should be used in all such occasions.

  2. Formats, sorting methods, paper sizes. The program uses strcoll()
     and strxfrm() instead of strcmp() for strings, it uses time(),
     localtime(), and strftime()/ for time services, and finally, it
     uses localeconv() for a proper numbers and currency representation.

  3. Visible text in message catalogs. The program must isolate all
     visible text in special message catalogs. Those map strings in
     English to their translation to other languages. Selection of
     messages in an appropriate for a particular environment language is
     done in a way which is completely transparent for both the program
     and it's user. To make use of those facilities, the program must
     call gettext() (Sun/POSIX standard), or catgets() (X/Open
     standard). For more information on that see section ``''.


  4. EUC/Unicode support. At this level, the program doesn't use the
     char type. Instead it uses wchar_t, which defines entities big
     enough to contain Unicode characters. ANSI C defines this data type
     and an appropriate API.


  For a more detaled explanation of locale, see, for example (``'') or
  (``'').



  11.2.  Internationalization


  While localization describes, how to adapt a program to a foreign
  environment, internationalization (or i18n for brevity) details the
  ways to make program communicate with a non-English speaking user.

  Before, that was done by developing some abstraction of the messages
  to output from the program's code. Now, such mechanism is (more or
  less) standardized. And, of course, there are free implementations of
  it!

  The GNU project has finally adopted the way of making the
  internationalized applications. Ulrich Drepper (drepper@ipd.info.uni-
  karlsruhe.de) developed a package gettext. This package is available
  at all GNU sites like prep.ai.mit.edu. It allows you to develop
  programs in the way that you can easily make them support more
  languages. I don't intend to describe the programming techniques,
  especially because the gettext package is delivered with excellent
  manual.

  Request for collaboration: If you want to learn the gettext package
  and to contribute to the GNU project simultaneously; or even if you
  just want to contribute, then you can do it! GNU goes international,
  so all the utilities are being made locale-aware. The problem is to
  translate the messages from English to Russian (and other languages if
  you'd like). Basically, what one has to do is to get the special .po
  file consisting of the English messages for a certain utility and to
  append each message with it's equivalent in Russian. Ultimately, this
  will make the system speak Russian if the user wants it to! For more
  details and further directions contact Ulrich Drepper
  (drepper@ipd.info.uni-karlsruhe.de).



  12.  Staying compatible


  Being standard is not the only issue. To be really nice, one has to
  provide the backward compatibility. In our case, this means that the
  configuration should be tolerant to the data created using non-
  standard character sets - that is the Alt (cp866) and cp1251 ones.
  Also, we should be able to run Cyrillic programs for MS-DOS.

  In most cases (except for HTTP), it is enough to provide a timely
  conversion of data to KOI8-R. When we talk about raw unstructured
  data, it is quite trivial - see section ``Conversion Utilities''.

  Another issue is the structured data. This case is more tricky. I'll
  try to outline the basic roadmap of fixing it.



  12.1.  MIME-based data compatibility


  MIME is a standard for architecture-independent data representation.
  Originally developed for mail messages, it has now many more
  applications. MIME defines format, which is open to extensions and
  allows architecture-specific handling of data. For example, if I
  receive a mail message, containing a MIME object of the video/mpeg
  type (an encoded MPEG file), my mail reader will automatically decode
  it and start an MPEG player.

  Most UNIX programs, offering MIME capabilities, are based on the
  metamail package, which contains a set of utilities and data files to
  work with MIME objects. Several configuration files (/etc/mailcap for
  global usage and ~/.mailcap for personal setup) define rules for
  handling MIME object of various types.

  Thus, if you receive a proper MIME data stream, containing text in one
  of the obsolete character sets, you may define a MIME rule to convert
  such text to KOI8.

  Below a number of MIME rules are shown, which are supposed to handle
  plain text and richtext objects, using both of the obsolete codesets,
  discussed above. You may incorporate these rules into one of the MIME
  configuration files.

  Note, that these rules use the translit package to perform the actual
  conversion. For more information on that program and the conversion in
  general see section ``Conversion Utilities''.


  text/plain; translit -t cp1251-koi8.rus < %s; test=test \
      "`echo %{charset} | tr '[A-Z]' '[a-z]'`"  = cp1251; copiousoutput

  text/richtext; translit -t cp1251-koi8.rus < %s; test=test \
      "`echo %{charset} | tr '[A-Z]' '[a-z]'`"  = cp1251; copiousoutput

  text/plain; translit -t alt-koi8.rus < %s; test=test \
      "`echo %{charset} | tr '[A-Z]' '[a-z]'`"  = cp866; copiousoutput

  text/richtext; translit -t alt-koi8.rus < %s; test=test \
      "`echo %{charset} | tr '[A-Z]' '[a-z]'`"  = cp866; copiousoutput

  text/plain; translit -t alt-koi8.rus < %s; test=test \
      "`echo %{charset} | tr '[A-Z]' '[a-z]'`"  = alt; copiousoutput

  text/richtext; translit -t alt-koi8.rus < %s; test=test \
      "`echo %{charset} | tr '[A-Z]' '[a-z]'`"  = alt; copiousoutput



  Obviously enough, this will work for plain text data only. Binary
  files are supposed to handle the codeset issues themselves (at least
  their "parent" applications are). Therefore, if you receive a
  Microsoft Word document in the cp1251 character set, the duty of
  providing appropriate conversion capabilities lays upon an application
  you use to read that document (for example Microsoft Word, or Applix
  Words).

  Unfortunately, the real situation is not that ideal. Many application
  have their own idea on how to use MIME. Until recently Microsoft Mail
  software had a broken MIME engine. Also, the Netscape
  Navigator/Communicator mail client is notorious because of it's
  sending of mail messages, encoded in cp1251 with the charset=koi8-r
  field in the message header and vice versa.



  12.2.  Explicit character set conversion


  There are a lot of conversion routines for Cyrillic on the Internet.
  Each of them has it's own quirks and it's own degree of Cyrillic
  support.

  In my opinion tools must be standard. In this particular case the
  "standard" conversion tool is GNU recode. Unfortunately, the version,
  found on the official GNU site (3.4) doesn't support Cyrillic yet
  (only ISO-8859-5). I developed a set of conversion tables for KOI8-R,
  Alt, and cp1251 for recode and submitted them to the recode
  maintainer. He promised to provide Cyrillic support in the upcoming
  release. Once it happens, I'll rewrite this section to recommend GNU
  recode as the standard conversion engine for Cyrillic.

  Meanwhile, I would recommend a translit package. It supports many
  popular codesets and is even able to produce a *TeX files (see section
  ``'') from text in Russian. Also, RedHat users will enjoy an RPM
  package for translit.

  For other conversion routines, Look at SovInformBureau or
  ftp.funet.fi. You can even use the special mode for emacs (see section
  ``Emacs'').



  12.3.  Cyrillic in the DOS emulator


  This seems to be the only application, which may require Alt Cyrillic
  character set. The reason is that Alt is native to DOS and most of DOS
  programs dealing with Cyrillic are Alt-oriented.

  For the console version (dos) you just have to load a keyboard and
  screen driver. Most of DOS drivers will work fine. I personally use
  the rk driver by A. Strakhov, which works for both console and X
  versions of dosemu. Another choice is the r driver by V. Kurland
  (sorry for possible misspelling). It is perfectly customizable and
  supports many codesets, Alt and KOI8 among them. However it won't work
  for the X window (at least version 1.14 I'm using).

  Both drivers can be found on most Russian Internet sites, for example
  Kurchatov Institute FTP server <ftp://ftp.kiae.su/pub/cyrillic/msdos>.

  For the X version of dosemu you have to provide an appropriate X font
  as well. Alex Bogdanov sent me such font by e-mail. It is an original
  vga font from the dosemu distribution, modified for the Alt codeset.
  Unfortunately I don't know who is the creator of this font and where
  the official site is.


  To setup the font for dosemu you should


  o  Introduce this font to the X. This is described in ``X fonts
     setup''.

  o  Introduce this font to dosemu. If the font just replaces the
     original vga font, then it will be recognized by default.
     Otherwise, you have to describe it in /etc/dosemu.conf:


     # Font to use (without filename extensions). For example:
     X { updatefreq 8 title "MS DOS" icon_name "xdos" font "vga-alt"}



  Finally, you have to load a keyboard driver. Note, the you don't need
  a screen driver for the X window. Therefore, not all drivers will
  work. At least two will: rk by A. Strakhov, and cyrkeyb by Pete
  Kvitek.



  13.  Bibliography



  1. Andrey Chernov. KOI-8 <http://www.nagual.ru/~ache/koi8.html>. KOI-8
     information and setup.

  2. Ulrich Drepper. Internationalization in the GNU project
     <http://i44www.info.uni-karlsruhe.de/~drepper/conf96/paper.html>.
     Very thorough description of a GNU approach to i18n.

  3. Michael Karl Gschwind. Internationalization
     <http://www.vlsivie.tuwien.ac.at/mike/i18n.html>. Various resources
     on i18n.

  4. Sergei Naumov. Information on Cyrillic Software
     <http://sunsite.oit.unc.edu/sergei/Software/Software.html>.
     Cyrillic setup information.

  5. The Open Group Single UNIX specification <http://www.UNIX-
     systems.org/online.html>.

  6. RFC 1489 RFC 1489 <file://ds.internic.net/rfc/rfc1489.txt>

  7. Alec Voropay. Localization as it is
     <http://www.sensi.org/~alec/locale>. General locale usage in
     Russian.



  14.  Summary of the various useful resources


  a2ps homepage <http://www-inf.enst.fr/~demaille/a2ps.html>

  General Linux Information <http://www.linux.org>

  Collection of Cyrillic resources
  <ftp://ftp.ccl.net/pub/central\_eastern\_europe/russian>

  Cyrillic resources at KIAE <ftp://ftp.kiae.su/cyrillic/>

  Cyrillic resources at RELCOM <ftp://ftp.relcom.ru/cyrillic/>

  Cyrillic resources at FUNET
  <ftp://ftp.funet.fi/pub/culture/russian/comp/>

  Cronyx <http://www.cronyx.ru> - the creators of Cyrillic fonts for the
  X Window System.

  Cyrillic fonts for Ghostscript and StarOffice
  <ftp://ftp.kapella.gpi.ru/pub/cyrillic/psfonts>

  Cyrillic fonts for X
  <ftp://ftp.kiae.su/cyrillic/x11/fonts/xrus-2.1.1-src.tgz>

  Ghostscript <http://www.cs.wisc.edu/~ghost/index.html>

  GNU enscript <ftp://prep.ai.mit.edu/pub/gnu>

  relcom.fido.ru.linux newsgoup.

  relcom.fido.ru.unix newsgoup.

  Russian dictionary for GNU ispell <http://www.ispras.ru/~knizhnik>

  SovInformBureau <http://www.siber.com/sib/russify/>

  teTeX russification package <ftp://xray.sai.msu.su/pub/outgoing/teTeX-
  rus/>

  The kbd package for Linux
  <ftp://sunsite.unc.edu/pub/Linux/system/Keyboards/>

  The remap package for Emacs <ftp://ftp.iesd.auc.dk/>

  The rtxt2ps package <http://www.siber.com/sib/russify/converters/>

  The russian.el package for emacs
  <http://www.math.uga.edu/~valery/russian.el>

  The translit package
  <ftp://ftp.osc.edu/pub/russian/translit/translit.tar.Z>

  The xruskb package <ftp://ftp.relcom.ru/pub/x11/cyrillic/>

  Useful Cyrillic packages <ftp://sunsite.unc.edu/pub/academic/russian-
  studies/Software>

  X fonts collections <ftp://ftp.switch.ch/mirror/linux/X11/fonts/>

  XFree86 FTP site <http://www.xfree86.org>



F CYRILLIC.;1                       	Cyrillic-HOWTO
  The Linux Danish/International HOWTO
  Niels Kristian Bech Jensen nkbj@sslug.dk
  v2.6, 9 March 2000

  This document describes how to configure Linux and various Linux
  applications for Danish locale standards such as keyboard, font,
  paper-size etc. It is hoped that Linux users from other places in
  Western Europe will find this document useful too.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Keyboard setup

     2.1 Loading a keytable
     2.2 Getting the AltGr key to work under X11
        2.2.1 Making {, [, ] and } work under Metro-X
     2.3 Dead keys and accented characters
        2.3.1 Removing dead key functionality
        2.3.2 Invoking dead key functionality
     2.4 Making $ (the dollar sign), oe (oslash) and OE (Oslash) work
        2.4.1 $ (the dollar sign)
        2.4.2 oe (oslash) and OE (Oslash)

  3. Display and application setup

     3.1 Loading the ISO-8859-1 font on the console
     3.2 The Euro symbol
     3.3 Characters you can display under Linux
     3.4 International character sets in specific applications

  4. Miscellaneous problems

     4.1 Time zone
     4.2 A4 papersize
     4.3 Text file formats for other platforms

  5. Locale support in libc 5.4.x and higher

  6. Programming tips for X11

  7. Getting X11 applications to speak Danish

  8. Information resources

     8.1 Other documents of relevance
     8.2 FTP and Web sites

  9. Credits and legal stuff

     9.1 Legal stuff


  ______________________________________________________________________

  1.  Introduction

  All European users of almost any operating system have two problems:
  The first is to tell the computer that you have a non-American
  keyboard, and the second is to get the computer to display the special
  characters. To make matters worse some applications will also consider
  you an exception if you are not an American and require special
  options or the setting of environment variables.
  Under Linux you change the way your computer interprets the keyboard
  with the commands loadkeys and xmodmap. loadkeys will modify the
  keyboard for plain Linux while xmodmap makes the modifications
  necessary when the handshaking between X11 and Linux is imperfect.

  To display the characters you need to tell your applications that you
  use the ISO-8859-1 (a.k.a. Latin-1) international set of glyphs. This
  is not always necessary, but a number of key applications need special
  attention.

  This HOWTO is intended to tell Danish users how to do this. If you
  continue to have problems after reading this you can try the German
  HOWTO, the Linux Keyboard and Console HOWTO or the ISO 8859-1 National
  Character Set FAQ. Many of the hints contained herein are cribbed from
  there. See section ``Other documents of relevance'' for pointers to
  these documents. You should also send me a mail describing your
  problems.

  A final problem is that error-messages, menus and documentation of the
  applications are mostly in English. There is a GNU project under way
  to address this problem. You can see what it is all about by
  downloading the file ABOUT-NLS or the package gettext-0.10.tar.gz (or
  any later version) from your favourite mirror of the GNU archive. This
  project needs volunteers for the translations. Send a mail to da-
  request@li.org with the body ``subscribe'' if you want to contribute
  to the Danish part of the project. The documentation in the gettext
  package describes how to use such translations in your own programs.


  2.  Keyboard setup

  2.1.  Loading a keytable

  You have two tools for configuring your keyboard. Under plain Linux
  you have loadkeys and under X11 you have xmodmap.

  To try out loadkeys type one of these two commands:

  loadkeys /usr/lib/kbd/keytables/dk.map


  or

  loadkeys /usr/lib/kbd/keytables/dk-latin1.map



  The difference between the two keymaps is that dk-latin1.map enables
  `dead' keys while dk.map does not. Dead keys are explained in section
  ``Dead keys and accented characters''. The program loadkeys and the
  keymaps are part of the package kbd-0.??.tar.gz which (with differing
  version numbers ??) is available with all Linux distributions.

  Usually loadkeys is executed at boot-time from one of the scripts
  under the directory /etc/rc.d/. Details vary between distributions.

  (Note for non-Danish readers: Support for other languages is enabled
  in a similar manner. Use es.map for Spanish keyboards etc.)

  Versions of XFree86 up to and including v3.1.2 will normally follow
  the keymap used by plain Linux, but you can modify keyboard behavior
  under X11 with xmodmap. Usually the X11 initialization process will
  run this command automatically if you have a file called .Xmodmap in
  your home directory.


  In XFree86 v3.2 and higher you should have the following Keyboard
  section in your /etc/XF86Config (or /etc/X11/XF86Config) file (it
  should be made automatically by the program XF86Setup if you choose a
  Danish keytable):

  Section "Keyboard"
     Protocol        "Standard"
     XkbRules        "xfree86"
     XkbModel        "pc101"
     XkbLayout       "dk"
     XkbVariant      "nodeadkeys"
  EndSection



  The only keyboard variant available at the moment is "nodeadkeys", but
  dead keys can still be made to work. See section ``Dead keys and
  accented characters'' for more information on this.


  2.2.  Getting the AltGr key to work under X11

  For versions of XFree86 up to and including v3.1.2 you should edit the
  file /etc/XF86Config (or /etc/X11/XF86Config) and make sure the line

  RightAlt    ModeShift


  appears in the Keyboard section. Usually you can do this by uncomment-
  ing the appropriate line. In XFree86 v3.1.2 you can use AltGr as an
  alias for RightAlt.

  The AltGr key should work as expected in XFree86 v3.2 and higher if
  you choose Danish keyboard support.


  2.2.1.  Making {, [, ] and } work under Metro-X

  You can't input the characters ``{'' (<AltGr><7>), ``['' (<AltGr><8>),
  ``]'' (<AltGr><9>) and ``}'' (<AltGr><0>) under the Metro-X server.
  This bug has been observed under versions 3.1.5 and 3.1.8 of the
  server.

  To correct this bug you have to edit the file
  /usr/X11R6/lib/X11/xkb/symbols/dk and change the lines

  key <AE07> {    [               7,           slash      ]       };
  key <AE08> {    [               8,       parenleft      ]       };
  key <AE09> {    [               9,      parenright      ]       };
  key <AE10> {    [               0,           equal      ]       };


  to

  key <AE07> {    [               7,           slash      ],
                  [       braceleft,        NoSymbol      ]       };
  key <AE08> {    [               8,       parenleft      ],
                  [     bracketleft,        NoSymbol      ]       };
  key <AE09> {    [               9,      parenright      ],
                  [    bracketright,        NoSymbol      ]       };
  key <AE10> {    [               0,           equal      ],
                  [      braceright,        NoSymbol      ]       };



  2.3.  Dead keys and accented characters

  Dead keys are those that do not type anything until you hit another
  key. Tildes and umlauts are like this by default under plain Linux if
  you use the dk-latin1.map keymap. This is the default behaviour for
  these keys under Microsoft Windows as well.


  2.3.1.  Removing dead key functionality


  o  Removing dead key functionality under plain Linux and XFree86
     v3.1.2

     Under plain Linux type

     loadkeys dk.map



  o  Removing dead key functionality under XFree86 v3.2 and higher

     Put the following line in the Keyboard section of your
     /etc/XF86Config (or /etc/X11/XF86Config) file:

     XkbVariant      "nodeadkeys"



  2.3.2.  Invoking dead key functionality


  o  Invoking dead key functionality under plain Linux

     Under plain Linux type

     loadkeys dk-latin1.map



  o  Invoking dead key functionality under X11R6 sessions

     First you must make sure you are running XFree86 v3.1.2 or higher.
     Download and install everything related to the newest release if
     you have a lower version number. Neither compose nor dead keys will
     work in X11R6 applications unless these are compiled with support
     for accented (8-bit) character input. An example of such an
     application is GNU emacs version 19.30 (or higher.)

     Some X11 applications still do not support this input method.
     Eventually this situation might improve, but until that happens you
     can either hack your applications or submit polite bug reports to
     the  program authors. The latter approach is often the most
     efficient. See section ``Programming tips for X11'' for some advice
     on what needs to be done.

     Next you will have to map a key to Multi_key (Compose.) The Scroll
     Lock key is most likely already mapped as such if you use XFree86
     v3.1.2 (you can verify this with the program xev,) and it is easy
     to map the right Control key by uncommenting the appropriate line
     in the Keyboard section of the XFree86 configuration file (often
     /etc/XF86Config or /etc/X11/XF86Config.) If you wish to use some
     other key, or if you are using XFree86 v3.2 or higher and want to
     change the default, you should put something like

     keycode 78 = Multi_key


  in your ~/.Xmodmap file. The statement in the example defines Scroll
  Lock as the Compose key. The default Compose key in XFree86 v3.2 and
  higher is <Shift><AltGr>.

  XFree86 v3.2 and higher comes without support for the dead keys on the
  standard Danish keyboard. To get this support you have to change a few
  lines in the xkb_symbols "basic" section of the file
  /usr/X11R6/lib/X11/xkb/symbols/dk. The lines

  key <AE12> {    [           acute,           grave      ],
                  [             bar,     dead_ogonek      ]       };
  key <AD12> {    [       diaeresis,     asciicircum      ],
                  [      asciitilde,     dead_macron      ]       };


  should be changed to

  key <AE12> {    [      dead_acute,      dead_grave      ],
                  [             bar,     dead_ogonek      ]       };
  key <AD12> {    [  dead_diaeresis, dead_circumflex      ],
                  [      dead_tilde,     dead_macron      ]       };



  After these changes you can get support for dead keys by removing the
  line

  XkbVariant      "nodeadkeys"


  from the Keyboard section of your /etc/XF86Config (or
  /etc/X11/XF86Config) file.

  (Note for non-Danish readers: There are files for many local keyboard
  maps in /usr/X11R6/lib/X11/xkb/symbols.)

  The available keystroke combinations are listed in
  /usr/X11R6/lib/X11/locale/iso8859-1/Compose. There are some bugs in
  that file you will want to fix:

  o  The line reading

     <dead_tilde> <space>                    : "~"   tilde


  should be changed to

  <dead_tilde> <space>                    : "~"   asciitilde



  o  In several places asciicircum is misspelled as asciicirum


     Finally make sure your shells and/or applications are set up for
     ISO-8859-1 compatibility as described in section ``International
     character sets in specific applications'' and you should be all
     set.



  2.4.  Making $ (the dollar sign), oe (oslash) and OE (Oslash) work

  2.4.1.  $ (the dollar sign)

  There is a bug in the Danish keymaps causing the dollar sign to be
  accessed with <Shift><4> instead of <AltGr><4> by default. If this is
  a problem for you, determine what keymap you load at boot-time. You
  can find it by looking around in the directory /etc/rc.d/ or simply by
  paying attention to what happens at boot-time.  On my computer the
  relevant keymap is called /usr/lib/kbd/keytables/dk-latin1.map. You
  can fix the problem by changing the line

  keycode   5 = four             dollar           dollar


  in the keymap file to

  keycode   5 = four             currency         dollar


  and then (re-)loading the keytable as described in section ``Loading a
  keytable''. Currency (dansk: ``soltegn'') is the default <Shift><4>
  character on a Danish keyboard.

  This should fix the problem for both X11 and plain Linux.


  2.4.2.  oe (oslash) and OE (Oslash)

  In some older distributions ``oe'' and ``OE'' appear as cent and yen.
  Find the line for keycode 40 in the keymap file and change it from

  keycode  40 = cent              yen


  to

  keycode  40 = +oslash           +Ooblique



  This bug appears to have been fixed in kbd-0.88.tar.gz and newer
  versions.

  The plus signs are necessary to get Caps Lock working properly.
  ``Oslash'' can be used as an alias for ``Ooblique'' in kbd-0.90.tar.gz
  and newer versions.

  You can read more about keyboard configuration at this site
  <http://www.ibbnet.nl/~anne/keyboard.html>.


  3.  Display and application setup

  Most applications need to be compiled as ``8-bit-clean'' to work well
  with European characters. Some need a few extra hints to get it right.


  3.1.  Loading the ISO-8859-1 font on the console

  Execute the following commands from your shell prompt:

  setfont lat1u-16.psf



  In Red Hat Linux 5.2 and higher you can do this by adding these lines
  to /etc/sysconfig/i18n:

  SYSFONT=lat1u-16.psf
  SYSTERM=linux


  Due to a bug in the ncurses package on Red Hat Linux 5.2, you also
  have to change ``linux-lat'' to ``linux'' in /etc/profile.d/lang.sh.
  This is not necessary in Red Hat Linux 6.0.


  3.2.  The Euro symbol

  A new symbol has been added to the Danish character set: The symbol
  for the Euro (the new currency of the European Monetary Union.) A new
  character set called ISO-8859-15 a.k.a. latin0 (or latin9) has been
  created to replace ISO-8859-1 (latin1.) You must use the EURO
  <ftp://ftp.freshmeat.net/pub/euro-patch/> package to get support for
  latin0. The package includes both fonts and keymaps.


  3.3.  Characters you can display under Linux

  Type dumpkeys -l | less at the prompt to find out which characters
  that are readily available. You can map them to your keyboard via the
  keymap files mentioned in section ``Loading a keytable''.


  3.4.  International character sets in specific applications

  A number of applications demand special attention. This section
  describes how to set up configuration files for them.


     bash:
        Put the following in your ~/.inputrc file:

        set meta-flag on
        set convert-meta off
        set output-meta on



     elm:
        Put the following definitions in your ~/.elm/elmrc file:

        charset = iso-8859-1
        displaycharset = iso-8859-1
        textencoding = 8bit



     This may not work on some versions of elm. You can get partial MIME
     support in elm if you use metamail.


     emacs:
        Put the following in your ~/.emacs or the the system-wide
        initialization file (probably /usr/lib/emacs/site-
        lisp/default.el or /usr/share/emacs/site-lisp/default.el):



        (standard-display-european t)
        (set-input-mode (car (current-input-mode))
                (nth 1 (current-input-mode))
                0)



     Dead keys should work under GNU emacs provided you use GNU emacs
     v19.30 or higher and XFree86 v3.1.2 or higher (it works for me
     anyway,) so do not start researching available elisp packages
     implementing ``electric keys'' or anything like that. If you want
     to implement European keyboard conventions in emacs without
     upgrading, the best choice is probably the remap package available
     from SunSite DK
     <ftp://sunsite.auc.dk/pub/emacs/auctex/ftp/auctex/>.  There are
     also two packages called iso-acc.elc and iso-trans.elc included
     with emacs that have similar functionality, but they are not nearly
     as powerful.


     groff:
        Issue the command as

        groff -Tlatin1 <your_groff_input_file>


     if you want ISO-8859-1 text output.

     Remember to change this in /etc/man.config to get latin1 characters
     working in man (don't remove the -mandoc switch.)


     ispell --- Spell checking in Danish:
        First make sure that you install version 3.1.20 instead of
        version 4.0 of ispell. The latter is obsolete and multiple
        brain-damaged. You can download the sources for ispell at the
        GNU archive <ftp://sunsite.auc.dk/pub/gnu/> and you can get a
        Danish dictionary from SSLUG
        <http://www.sslug.dk/ispell/idanish/dansk.html>. Follow the
        compilation instructions and you should have no trouble (One
        caveat: When defining the variables necessary for compilation
        you must tell ispell that Linux is a SysV type OS by defining
        the variable USG.)

        When you have installed the Danish dictionary for ispell you can
        check the spelling of a Danish language file by executing the
        command:

        ispell -d danish -T latin1 -w "" <your_danish_text_file>



     (Note for non-Danish readers: You can find dictionaries for most
     Western languages by reading the file Where included with the
     sources for ispell.)


     joe:
        Issue the command as

        joe -asis


     or put the following in your ~/.joerc file:


     -asis



     The hyphen character must be in the first column.


     kermit:
        This is as close as I can get, but not completely satisfying
        yet. Put the following in your ~/.kermrc file:

        set terminal bytesize 8
        set command bytesize 8
        set file bytesize 8
        set language danish
        set file character-set latin1-iso
        set transfer character-set latin1-iso
        set terminal character-set latin1-iso



     I think there are more variables to set, but they are hiding. You
     would have to modify these settings if the remote system is DOS or
     OS/2 based.


     less:
        Set the following environment variable:

        LESSCHARSET=latin1


     This is not necessary if your system support locales. Then you
     should just set LANG, LC_CTYPE or LC_ALL (see section ``Locale sup-
     port in libc 5.4.x and higher''.)


     ls:
        Issue the command as

        ls -N


     or possibly

     ls --8bit



     lynx:
        Put the following definition in your ~/.lynxrc file:

        character_set=ISO Latin 1



     This can also be set via the Options menu in lynx. Type `o' and set
     the relevant option.


     man:
        See entry for groff in this section.



     metamail:
        Set the following environment variable:

        MM_CHARSET=ISO-8859-1



     nn:
        Put the following in your ~/.nn/init file:

        set data-bits 8



     pine:
        Put the following definition in your ~/.pinerc file:

        character-set=ISO-8859-1



     This can also be set via the Setup, Config menu option in pine.  It
     won't hurt to enable enable-8bit-esmtp-negotiation and enable-8bit-
     nntp-posting (for news) in that menu too.


     rlogin:
        Issue the command as

        rlogin -8 foo.bar.dk



     sendmail:
        Put (or uncomment) the following in your /etc/sendmail.cf file:

        O SevenBitInput=False
        O EightBitMode=pass8
        O DefaultCharSet=iso-8859-1



     tcsh:
        Put the following in your /etc/csh.login or ~/.tcshrc file:

        setenv LANG C



     Actually you just have to define one of the environment variables
     LANG or LC_CTYPE. The value does not matter. Read the tcsh man page
     for more information.


     telnet:
        Put one line of the following type in your ~/.telnetrc file for
        each host you want to log on to using telnet:

        <hostname> set outbinary true



     Example:

     localhost set outbinary true
     foo.bar.dk set outbinary true



     TeX/LaTeX:
        There are several problems with TeX/LaTeX: You want LaTeX to
        understand the special characters and you do not want LaTeX to
        put in English words like ``Chapter'' at the beginning of every
        chapter or use English typesetting conventions.

        Under LaTeX2e the header of your input file should look
        something like this:

        \documentclass[a4paper]{article}

        \usepackage[latin1]{inputenc}
        \usepackage{t1enc}
        \usepackage[danish]{babel}



     The first usepackage statement ensures that LaTeX will interpret
     European characters correctly, so you do not have to use escape
     codes for European characters. The second one is not strictly
     necessary, but it is recommended including it to use the new EC
     fonts (previously called DC fonts.) The third usepackage statement
     defines a range of standards for typesetting texts in Danish.

     All the major Linux distributions now includes the teTeX package.
     To set up teTeX you must run the script texconfig. Here you can
     choose Danish hyphenation (dansk: ``orddeling''), A4 papersize for
     dvips and xdvi etc.

     All new Linux distributions include LaTeX2e, but on older systems
     you might come across LaTeX 2.09. If that happens you can use

     \documentstyle[a4,isolatin]{article}


     to include support for ISO-8859-1 characters and European paper
     sizes. A better thing to do would be to ask your system administra-
     tor to upgrade to LaTeX2e.

     isolatin.sty is available from all CTAN servers
     <ftp://sunsite.auc.dk/pub/tex/ctan/>.

     Some people prefer to use emacs in a special mode which translates
     ``special'' letters into TeX escape codes, but this method is
     obsolete.


     tin:
        Put the following definitions in your ~/.tin/headers file:

        Mime-Version: 1.0
        Content-Type: text/plain; charset=iso-8859-1
        Content-Transfer-Encoding: 8bit



     Now you can post messages with the proper Danish characters in the
     message body.
  4.  Miscellaneous problems

  4.1.  Time zone

  Denmark is placed in the Central European Time zone (CET or MET,)
  which (in the winter) is equivalent to Greenwich Mean Time plus 1
  (GMT+1.) You set the time zone on a Linux system by making a symbolic
  link between /usr/lib/zoneinfo/localtime and the file in
  /usr/lib/zoneinfo/ with a name corresponding to your zone or country.
  Danes will want to execute one of the commands

  ln -sf /usr/lib/zoneinfo/MET /etc/localtime


  or

  ln -sf /usr/lib/zoneinfo/Europe/Copenhagen /etc/localtime



  This automatically sets Daylight Saving Time (GMT+2) in the summer.

  You synchronize the system time with the CMOS clock by issuing the
  command clock as root. If your CMOS clock is set to GMT (a.k.a. UTC
  --- the standard on proper Unix systems) use

  clock -u -s


  or if your CMOS clock is set to local time use

  clock -s



  4.2.  A4 papersize


  o  ghostscript: Add the command line option -sPAPERSIZE=a4.

  o  ghostview: Define the following Xresource:

     Ghostview.pageMedia:  A4



  o  TeX/LaTeX, dvips, xdvi: See the entry for TeX/LaTeX in section
     ``International character sets in specific applications''.


  4.3.  Text file formats for other platforms

  You can translate files between an ISO-8859-1 formatted text file and
  e.g. a DOS text file using codepage 850 with the recode package. A DOS
  file called foo.txt would be translated into a proper Unix file with
  the command

  recode cp850:latin1 foo.txt



  recode is available as recode-3.4.tar.gz from all mirrors of the GNU
  archive <ftp://sunsite.auc.dk/pub/gnu/>.


  5.  Locale support in libc 5.4.x and higher

  The locale support has been updated in libc 5.4.x. You can avoid many
  of the individual program setups described in section ``International
  character sets in specific applications'' if the programs on your
  system is prepared for locale support. The Debian distribution comes
  with this support if you install the wg15-locale package. Systems with
  GNU libc 2 (libc 6.x) support locales by default (see remarks about
  Red Hat Linux release 5.0 later in this section.)

  If you use a system without locale support, you can add such support
  using the following method:

  1. Make sure you have the latest libc 5.4.x library. You can get this
     from Yggdrasil Computing <ftp://ftp.yggdrasil.com/private/hjl/>.

  2. Make sure you have the localedef program installed. It should come
     with the library.

  3. Get the locale sources. You can get them from DKUUG. You need to
     get both locale <ftp://dkuug.dk/i18n/WG15-collection/locales/> and
     charmap <ftp://dkuug.dk/i18n/WG15-collection/charmaps/> sources.

  4. Put the locale sources in /usr/share/i18n/locales/ and the charmap
     sources in /usr/share/i18n/charmaps/.

  5. Execute the localedef program to build the locale data files:

     localedef -ci da_DK -f ISO_8859-1:1987 da_DK


  (Note for non-Danish readers: You can build locale data files for
  other locales in the same way. All locale and charmap sources are at
  the DKUUG site.)

  To enable support for the Danish locale on a system with locale
  support you just have to set one of the following environment
  variables:

  LANG=da_DK


  or

  LC_ALL=da_DK



  Try da_DK.ISO_8859-1 if da_DK does not work.

  Both environment variables set all the individual locale catgories.
  You can also set a single locale category by using the name of the
  category as an environment variable. The locale catogories are:

  Locale category         Application
  ---------------         -----------
  LC_COLLATE              Collation of strings (sort order.)
  LC_CTYPE                Classification and conversion of characters.
  LC_MESSAGES             Translations of yes and no.
  LC_MONETARY             Format of monetary values.
  LC_NUMERIC              Format of non-monetary numeric values.
  LC_TIME                 Date and time formats.
  LC_ALL                  Sets all of the above (overrides all of them.)
  LANG                    Sets all the categories, but can be overridden
                          by the individual locale categories.

  In Red Hat Linux 5.2 you can set the environment variables LANG and/or
  LC_ALL in the file /etc/sysconfig/i18n by adding lines such as this:

  LC_ALL=da_DK



  A few programs such as bash and GNU emacs still need specific setup as
  described in section ``International character sets in specific
  applications'', but most should work without further attention.
  Programs such as nvi which did not work with 8 bit characters before
  should work now.

  Locale support should be more common as distributions based on the new
  GNU libc 2 become available. Beware that although Red Hat Linux
  release 5.0 comes with GNU libc 2, the locale support is not working.
  You have to build the locale data files by executing localedef
  yourself. You can build the Danish locale data files with the
  following command:

  localedef -c -i da_DK -f ISO-8859-1 da_DK



  As of glibc-2.0.7-4.i386.rpm the locale data files are included with
  the libraries and this is no longer necessary.


  6.  Programming tips for X11

  Displaying 8-bit charaters is easy. You can use them just as you would
  use 7-bit ASCII. Getting applications to accept input of special
  characters is an entirely different matter.

  If you are using e.g. the Xt toolkit and a widget set like Motif you
  need only add one line to your program. As your first call to Xt use
  XtSetLanguageProc. Like this:

      int main (int argc, char** argv)
      {
          ...
          XtSetLanguageProc (NULL, NULL, NULL);
          top = XtAppInitialize ( ... );
          ...
      }



  Now your program will automagically look up the LC_CTYPE variable and
  interpret dead keys etc. according to the Compose tables in
  /usr/X11R6/lib/X11/locale/. This should work for all Western European
  keyboard layouts and is entirely portable. As XFree86 multilanguage
  support gets better your program will also be useful in Eastern Europe
  and the Middle East.

  This method of input is supported by Xt, Xlib and Motif v1.2 (and
  higher.) According to the information I have available it is only
  partially supported by Xaw. If you have further information on this
  subject I would like to hear from you.

  This section was adapted from a more extensive discussion in Michael
  Gschwind's Programming for Internationalization. See section ``Other
  documents of relevance'' for a pointer to that document.



  7.  Getting X11 applications to speak Danish

  To get Danish texts on menus, buttons, etc. in a well behaved X11
  application, you just have to translate the resource strings defining
  the texts. Jacob Nordfalk has done such translations for a lot of
  applications including Netscape and Ghostview. The translations and a
  description of how to install them can be found at this site
  <http://alf.nbi.dk/~nordfalk/ovs/>.


  8.  Information resources

  8.1.  Other documents of relevance

  The HOWTOs are available from all mirrors of www.linuxdoc.org. There
  is a Danish mirror at SunSite DK <http://sunsite.auc.dk/ldp/HOWTO/>.

  The German HOWTO (in German) by Winfried Truemper. A lot of other
  national HOWTOs such as Finnish, Spanish and Polish are also available
  in the native languages.

  The Linux Keyboard and Console HOWTO by Andries Brouwer.

  The ISO 8859-1 National Character Set FAQ and Programming for
  Internationalization (plus much more) by Michael Gschwind is available
  from this site <http://www.vlsivie.tuwien.ac.at/mike/i18n.html>.


  8.2.  FTP and Web sites

  SSLUG (Skaane Sjaelland Linux User Group) <http://www.sslug.dk/> is a
  Swedish/Danish Linux user group. Their mailing list is a good place to
  get help with Linux in Danish (or Swedish.) They are also hosts for
  this document <http://www.sslug.dk/DanishHowto/>.

  AUC in AAlborg is the home of SunSite DK
  <ftp://sunsite.auc.dk/pub/os/linux/> which has the Debian and Red Hat
  distributions, the latest kernels, a mirror of the Linux Documentation
  Project <http://sunsite.auc.dk/ldp/> and mirrors of metalab.unc.edu
  <ftp://sunsite.auc.dk/pub/os/linux/sunsite/> and the GNU archive
  <ftp://sunsite.auc.dk/pub/gnu/>. There is also a mirror of the CTAN
  archive <ftp://sunsite.auc.dk/pub/tex/ctan/> with everything you need
  to get TeX and LaTeX running.


  9.  Credits and legal stuff

  Thanks to Peter Dalgaard, Anders Majland, Jon Haugsand, Jacob
  Nordfalk, the authors of the German HOWTO, Michael Gschwind and
  numerous others for suggestions and help with several questions. And a
  big thanks to the people at Aalborg University Center for writing and
  making available several of the packages described in this document. A
  special Thank You to Thomas Petersen; the original author of this
  document.


  9.1.  Legal stuff

  Trademarks are owned by their owners.

  Although the information given in this document is believed to be
  correct, the author will accept no liability for the content of this
  document. Use the tips and examples given herein at your own risk.

  Copyright (C) 1996 by Thomas Petersen. Copyright (C) 1997-2000 by
  Niels Kristian Bech Jensen. This document may be distributed only
  subject to the terms and conditions set forth in the LDP license at
  http://www.linuxdoc.org/COPYRIGHT.html
  <http://www.linuxdoc.org/COPYRIGHT.html>.



F DANISH-H.;1                       	Danish-HOWTO
  Linux-Esperanto-HOWTO
  Kelkaj helpindikoj por uzi Esperanton sub Linukso
  Kompilita de Wolfram Diestel (wolfram@steloj.de) helpita de
  aliaj.
  v1.30, August 1999
  ____________________________________________________________

  Table of Contents


  1. Antauxvortoj kaj dankoj

  2. Kodoj

     2.1 koderoj deksesume
     2.2 koderoj dekume
     2.3 koderoj okume

  3. Konzolo (teksta moduso)

  4. Metamail

  5. X-fenestra sistemo

     5.1 Tiparoj
        5.1.1 xfstt
        5.1.2 xfsft
     5.2 Tajpi E-signojn

  6. KDE

  7. Netscape Communicator

  8. Xterm

  9. Redaktiloj

     9.1 Redaktiloj kun Latin-3/Unikod-subteno
     9.2 Vi (Elvis, Vim)

  10. Redakti per Emakso (Emacs)

     10.1 Emakso 19.34
        10.1.1 Vidi E-signojn
        10.1.2 Tajpi
     10.2 Emakso 20.* kaj MULE

  11. Retposxto per Xfmail 1.3

  12. Diskutgrupoj per Knews

  13. TeX / LaTeX

  14. Esperanto-subteno en internaciigitaj programoj

  15. Esperanto-signoj en HTML-tekstoj



  ______________________________________________________________________

  1.  Antauxvortoj kaj dankoj

  Cxar tiu cxi teksto estas verkita per linuxdoc-sgml, gxi ne povas uzi
  esperantajn signojn.

  La avantagxo estas, ke la teksto aperas en la HOWTO-kolekto (anstataux
  en la mini-HOWTO-kolekto) kaj estas havebla en pluraj formoj (teksto,
  TTT-teksto, Postskript-teksto, k.a.)

  La malavantagxo estas, ke mi devas kodi la esperantajn signojn per la
  x-maniero kaj el tio povus estigxi miskomprenoj cxe la agordekzemploj.
  Nu, mi provas rimarkigi tion cxe la koncernaj lokoj.

  Solvojn kaj gravajn informojn donis: Eduard Werner (Emakso 19.34,
  TeX), Marko Rauhamaa (xmodmap, TeX, mailcap), Edmund Grimley Evans
  (TeX, konzolo), Lee Sau Dan (setfont, Emakso 20, MULE, TeX), Richard
  Hable (Vi, Xfmail, Knews, Netscape), Albert Reiner (TeX) kaj Axel
  Belinfante (Wily, Sam).  Dankon al ili kaj cxiuj aliaj, kiuj helpis
  kompili tiun cxi dosieron.

  Aktuala versio de tiu cxi dokumento trovigxas cxiam sub kielfari.sgml
  <http://www.uni-
  leipzig.de/esperanto/texte/bibl/kielfari/kielfari.sgml>, kielfari.html
  <http://www.uni-
  leipzig.de/esperanto/texte/bibl/kielfari/kielfari.html>.


  2.  Kodoj

  Ekzistas tri internaciaj normoj por signokodoj, kiuj enhavas la
  esperantajn signojn, la du kutime uzataj estas ISO-8859-3 (Latin-3)
  kaj Unikodo (Unicode).  La unua normo estas por okbitaj signoj kaj la
  dua por deksesbitaj. Por povi transporti unikodajxojn tra okbitaj kaj
  sepbitaj medioj ekzistas la kodoj UTF-8 kaj UTF-7.


  Cxar Unikodo samtempe difinas koderojn por la signoj de cxiuj lingvoj
  de la mondo, gxi ricevas pli kaj pli da subteno de
  programarproduktantoj.

  Alie ol ekz. Vindozo NT, Linukso interne uzas okbitajn kodojn. Subteno
  de Unikodo precipe estas en sistemkomponentoj, kiuj zorgas pri eligado
  de tekstoj sur la ekrano aux kiuj rilatas al intersxangxo de informoj
  kun la ekstera mondo.  Do estas iom da Unikodo en la konzolo, iom da
  en X-fenestroj, iom da en la traktado de informoj venantaj per
  retposxto aux el TTT kaj iom da rilate al dosiersistemoj de KKDoj
  (Joliet-dosiersistemo). Ofte tiuj komponentoj uzas la okbitan
  unikodformon UTF-8.

  Cxar la subteno de Unikodo en Linukso estas iom malkohera, gxenerale
  oni preferas ISO-8859-3. Sed supozeble la premisoj sxangxigxos gxis la
  fino de 1999.

  Ampleksajn informojn pri la unuopaj kodoj kun E-signoj en internaciaj
  normoj kaj en specialaj programoj, vi trovas cxe Edmundo
  <http://www.rano.demon.co.uk/esperanto-kodoj.html>.

  Foje vi bezonas la eblecon konverti esperantajn tekstojn de UTF-8 al
  Latin-3. Por tio vi povas uzi la sekvan Perl-programeton.



    #!/usr/bin/perl
    while (<>) {
      s/\304\210/\306/g;
      s/\304\211/\346/g;
      s/\304\234/\330/g;
      s/\304\235/\370/g;
      s/\304\244/\246/g;
      s/\304\245/\266/g;
      s/\304\264/\254/g;
      s/\304\265/\274/g;
      s/\305\234/\336/g;
      s/\305\235/\376/g;
      s/\305\254/\335/g;
      s/\305\255/\375/g;
      print;
    };



  Por konverti en la alia direkto, intersxangxu la du kolumnojn inter
  /../../.

  Por presi Latin-3ajn tekstojn vi povas uzi solvon de Albert Reiner
  <http://www.geocities.com/ResearchTriangle/Node/7900/texprL3.html>.
  Temas pri simpla programeto en Perl uzanta TeX-on por la presado.

  Pro kompleteco tie cxi ni donas ankoraux la koderojn de la E-signoj
  laux la plej vastigxintaj normoj. UTF-8, kiu kodas unikodajn signojn
  per okbitaj koderoj, estas ekzemple uzata en HTML-pagxoj.


  2.1.  koderoj deksesume



         litero  Latin-3 Unikodo UTF-8
         -----------------------------
         Cx      C6      0108    C4 88
         cx      E6      0109    C4 89
         Gx      D8      011C    C4 9C
         gx      F8      011D    C4 9D
         Hx      A6      0124    C4 A4
         hx      B6      0125    C4 A5
         Jx      AC      0134    C4 B4
         jx      BC      0135    C4 B5
         Sx      DE      015C    C5 9C
         sx      FE      015D    C5 9D
         Ux      DD      016C    C5 AC
         ux      FD      016D    C5 AD



  2.2.  koderoj dekume



    litero  Latin-3 Unikodo UTF-8
    -------------------------------
    Cx      198     0264    196 136
    cx      230     0265    196 137
    Gx      216     0284    196 156
    gx      248     0285    196 157
    Hx      166     0292    196 164
    hx      182     0293    196 165
    Jx      172     0308    196 180
    jx      188     0309    196 181
    Sx      222     0348    197 156
    sx      254     0349    197 157
    Ux      221     0364    197 172
    ux      253     0365    197 173



  2.3.  koderoj okume



         litero  Latin-3 Unikodo UTF-8
         -------------------------------
         Cx      306     0410    304 210
         cx      346     0411    304 211
         Gx      330     0434    304 234
         gx      370     0435    304 235
         Hx      246     0444    304 244
         hx      266     0445    304 245
         Jx      254     0464    304 264
         jx      274     0465    304 265
         Sx      336     0534    305 234
         sx      376     0535    305 235
         Ux      335     0554    305 254
         ux      375     0555    305 255



  3.  Konzolo (teksta moduso)

  Latin-3-tiparojn por la teksta moduso vi trovas sub la nomoj
  /usr/lib/kbd/consolefonts/iso03.f??  Por funkciigi unu el ili tajpu
  ekzemple:


         setfont iso03.f16



  Konzolaj tiparoj havas aux 256 aux 512 tipojn, tamen tiparo povas
  havi, kaj prefere havu, unikodan indekson. La oficiala loko por
  konzolaj tiparoj estas /usr/share/consolefonts, sed multaj distribuoj
  ankoraux uzas /usr/lib/kbd/consolefonts. Utila tiparo estas ekzemple
  LatArCyrHeb-16.psf, kiu enhavas multajn literojn el pluraj alfabetoj,
  inkluzive de la esperantaj literoj. Por funkciigi tiun tiparon tajpu:


         setfont LatArCyrHeb-16.psf


  Konzolo povas funkcii per UTF-8 aux per okbita signaro, kaj eblas
  sxalti inter la du modusoj per eskapokodoj. Por sxalti al la
  UTF-8-moduso tajpu:


         echo -e '\033%G'



  Poste la konzolo komprenos UTF-8, do eblos ekzemple legi
  diverslingvajn TTT-pagxojn en UTF-8 per lynx.

  Por sxalti al la okbita moduso tajpu:


         echo -e '\033%@'



  En tiu okazo vi devas ankaux difini la uzatan 8-bitan signaron.
  Bedauxrinde, en la nuna momento, la komandoj por tion fari estas
  diversaj, depende de la linuks-distribuo. Sercxu, cxu vi havas
  komandon consolechars, kaj cxu vi havas dosieron sub la nomo
  /usr/share/consoletrans/iso03*. Eventuale vi devas aktualigi vian
  pakon kbd aux anstatauxigi gxin per console-tools.

  Vian preferatan solvon vi kompreneble aldonu en via startskripto por
  ne cxiam devi tajpi gxin.



  4.  Metamail

  La programeto Metamail estas uzata de aliaj programoj, aparte
  retposxtaj kaj diskutgrupaj legiloj, se ili ne scias trakti iun MIME-
  tipon. En la dosiero /etc/mailcap trovigxas informoj, kiel montri
  tiajn MIME-tipojn. Por povi legi tekstojn koditajn laux UTF-8, ni
  aldonos la sekvajn du liniojn al la dosiero /etc/mailcap:


         text/plain; /plena/pado/al/utf8-l3 %s; \
         test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = utf-8;\
         copiousoutput
         text/utf8; /plena/pado/al/utf8-l3 %s; copiousoutput



  La duan linion ni aldonis, cxar kelkaj programoj provas mem trakti
  mesagxojn en la formo text/plain, ecx se ili ne havas tauxgan tiparon
  por gxi, ekzemple cxe Content-Type: text/plain; charset="utf-8".

  La programeto utf8-l3 trovigxas en la 2a cxapitro "Kodoj".


  5.  X-fenestra sistemo

  5.1.  Tiparoj

  Por trovi Latin-3-tiparojn kaj rilatajn informojn por la X-fenestra
  sistemo vi rigardu en la Virtuala Esperanto-Biblioteko
  <http://www.esperanto.net/veb> - sub la rubriko "Komputadaj fakoj".

  Cxe la tiparoj vi trovas indikojn kiel instali ilin.  Per:


         xlsfonts -fn *iso8859-3



  vi povas kontroli cxu la tiparoj (sukcese) estas instalitaj en via
  sistemo. La proporciaj Adobe-tiparoj bone tauxgas por vidado en
  Communicator, Knews, Xfmail...).  Por Xterm kaj la Vi-variantoj vi uzu
  la tiparojn de Alain Fagot.

  La plej multajn X-ajn programojn vi povas voki tiel:


         <programo> -fn <tiparnomo>



  por ke ili uzu la tiparon tiparnomo.

  Alternativo al la supre menciitaj tiparoj estas la uzado de TrueType-
  tiparoj. Por tiuj tiparoj, originale uzataj de Vindozo kaj Makintosho
  ekzistas biblioteko FreeType, kiu permesas uzi ilin ankaux kun
  Linukso.  Surbaze de tiu biblioteko ekzistas du tiparserviloj xfstt
  kaj xfsft, kiuj servas TrueType-tiparojn al X-fenestroj.  La necesajn
  TrueType-tiparojn vi povas aux preni el ekzistanta Vindozo 9x/NT-
  instalo aux ekzemple de la mikrosofta servilo
  <http://www.microsoft.com/>. Atentu, ke vi bezonas unikodajn TrueType-
  tiparojn. La okbitaj normale ne enhavas la esperantajn signojn aux en
  maltauxgaj lokoj. Unikodaj estas ekz. la kutimaj Courier New, Arial,
  Times New Roman kaj Lucida Sans Unicode.


  5.1.1.  xfstt

  Xfstt <ftp://sunsite.unc.edu/pub/Linux/X11/fonts/> estas relative
  simple instalebla solvo, kiu tamen havas la malavantagxon, ke gxi ne
  realigas la tutan norman tiparservan protokolon.

  Normale xfstt uzas Unikodon, kies unuaj 256 signoj estas la samaj kiel
  cxe ISO-8859-1. Ekde la versio 0.9.8 oni povas rebildigi la unikodajn
  signojn al aliaj kodoj. Ekzemple per la komandlinio:


         xfstt --encoding iso8859-3,koi8-r,windows-1251



  5.1.2.  xfsft

  Xfsft <ftp://ftp.dcs.ed.ac.uk/pub/jec/programs/xfsft/> estas pli
  norma, sed pli malfacile instalebla solvo. Gxi estas fliko por X-
  fenestroj. Do oni devas elpaki la fontaron de X, poste fliki gxin per
  xfsft kaj rekompili. Por Linux ankaux ekzistas jam kompilita versio.
  La programon Xfs (X-Font-Server) vi plej konvene lancxas en propra
  "init"-skripto.  La tiparojn oni poste instalas same kiel aliajn X-
  tiparojn.

  Same kiel cxe xfstt oni povas servi unikodan tiparon laux diversaj
  kodoj.  Ekzemple la linioj

    arial.ttf -microsoft-arial-medium-r-normal--0-0-0-0-p-0-iso8859-1
    arial.ttf -microsoft-arial-medium-r-normal--0-0-0-0-p-0-iso8859-2
    arial.ttf -microsoft-arial-medium-r-normal--0-0-0-0-p-0-iso8859-3



  en fonts.dir servas la tiparon Arial en la kodoj Latin-1, Latin-2 kaj
  Latin-3.  Atentu, ke en la versio 1.0.1 estis eraro pri Latin-3, kiu
  en la sekvaj versioj estas korektita.


  5.2.  Tajpi E-signojn

  La X-fenestro-sistemo permesas difini reagojn al klavpremoj de la
  "kompona klavo" (plej ofte tiu estas difinita kiel AltGr) plus alia
  klavo.

  Ekzemple sur germana klavaro AltGr+q donas la signon '@'

  Per la programo xmodmap oni povas difini, ke


         AltGr+c -> cx
         AltGr+Shift+c -> Cx
         ...



  Por tio metu en vian uzanto-dosierujon dosieron ~/.Xmodmap. (Ofte gxi
  jam estas tie kaj vi nur bezonas modifi gxin.)  Kaj aldonu la sekvajn
  liniojn:


         keycode  54 = C NoSymbol AE
         keycode  42 = G NoSymbol Ooblique
         keycode  43 = H NoSymbol paragraph brokenbar
         keycode  44 = J NoSymbol onequarter notsign
         keycode  39 = S NoSymbol Thorn
         keycode  30 = U NoSymbol Yacute



  Ne cxiuj programoj gxuste traktas tion. Alia ebleco (vi povas uzi
  ambaux variantojn samtempe) do estas, meti la 12 esperantoliterojn sur
  la 12 funkcio-klavojn:


         keysym F1 = F1 ae
         keysym F2 = F2 AE
         keysym F3 = F3 oslash
         keysym F4 = F4 Ooblique
         keysym F5 = F5 paragraph
         keysym F6 = F6 brokenbar
         keysym F7 = F7 onequarter
         keysym F8 = F8 notsign
         keysym F9 = F9 thorn
         keysym F10 = F10 Thorn
         keysym F11 = F11 yacute
         keysym F12 = F12 Yacute



  Certigu, ke dum la starto de la X-fenestro-sistemo lancxigxas la
  ordono xmodmap ~/.Xmodmap. Normale en /usr/X11R6/lib/X11/xinit/xinitrc
  jam trovigxas linioj kiel


         usermodmap=$HOME/.Xmodmap
         if [ -f $usermodmap ]; then
           xmodmap $usermodmap
         fi



  6.  KDE

  La X-fenestra labormedio KDE dekomence estas evoluigita por uzado kun
  multaj lingvoj. La versioj 1.x bazigxas sur okbitaj signokodoj. Laux
  la respondeculoj, de la versio 2.0 gxi interne uzos Unikodon (fine de
  1999).

  La jxus aperinta versio 1.1 enhavas esperantan adapton por multaj
  programoj. Vi devas elekti en la lingvoagordilo Esperanton por vidi la
  menuojn, dialogojn ktp. en Esperanto. Por tio aktuale estas uzata
  Latin-3.

  Ekzistas ankaux iom da subteno por UTF-8. Tamen nur tiel, ke gxi
  provas rebildigi la unikodajn signojn al signoj de la aktuale uzata
  tiparo. Do rigardante UTF-8-koditan esperantan TTT-pagxon uzante
  Latin-3-tiparon, vi vidas la Esperanto-signojn, sed ekzemple neniujn
  cirilajn signojn sampagxe. Krome pro la rebildigo la distancoj al la
  najbaraj signoj ne estas gxustaj.


  7.  Netscape Communicator

  Ofta bezono de Esperanto-tiparoj estigxas dum la legado de interretaj
  pagxoj kaj diskutgrupaj artikoloj.  Netscape Communicator ja permesas
  difini kaj uzi multajn diversajn kodojn por rigardi diverslingvajn
  dokumentojn, sed bedauxrinde gxi ne rekte subtenas Latin-3-kodon.
  Anstatauxe vi povas uzi la kodon "User-defined". Por tio elektu en la
  menuo "Edit Preferences", iru al la dialogo "Appearance Fonts", elektu
  tie la kodon "User-defined" kaj alordigu konvenajn Latin-3-tiparojn.

  Nun vi povas elekti en la menuo "View Encoding User-Defined" por legi
  dokumenton koditan laux normo Latin-3.

  Tamen ekzistas pagxoj, kiujn Netscape Communicator cxiam montras per
  la Latin-1-tiparo.  Por rigardi cxiujn pagxojn kun Latin-3-tiparo, vi
  povus en la dialogo "Appearance Fonts" elekti Latin-3-tiparon por la
  kodo "Western (iso-8859-1)".  Tio ne estas simpla, cxar Netscape por
  tiu kodo nur akceptas tiparojn, kies nomoj finigxas per "-1".  Tial vi
  devas aldoni kelkajn liniojn en la dosiero "fonts.alias" de la
  dosierujo kun Latin-3-tiparoj.  Por cxiu Latin-3-tiparo, kiun Netscape
  uzu, aldonu liniojn kiel la sekvajn:


           "-adobe-helvetica-medium-r-normal--8-80-75-75-p-46-iso8859-3" 3adobe-helvetica-8
           "-adobe-helvetica3-medium-r-normal--8-80-75-75-p-46-iso8859-1" 3adobe-helvetica-8



  Poste, vi povas alordigi la tiparon kiel "Helvetica3 (Adobe)" al la
  kodo "Western (iso-8859-1)".

  Bedauxrinde oni ne povas legi la esperantajn literojn en unikodaj
  tekstoj. Unikodaj tekstoj estas aperigitaj tiel, ke la signoj estas
  prenitaj el konvenaj okbitaj tiparoj.  Tiel vi bone povas legi
  cirilajn, grekajn ecx cxinajn literojn, sed pro la nesuficxa subteno
  de Latin-3 anstataux supersignaj literoj vi vidas nur demandosignon
  :-(

  Cetere mi rimarkis eraron en Netscape Communicator 4.0x Se oni legas
  diskutgrupon, oni komence ne vidas Esperanto-signojn, kvankam kiel
  kutima kodo estas elektita "User-Defined". Sed post elekto de iu alia
  kodo kaj posta reelekto de la kodo "User-Defined" vi vidas la e-ajn
  signojn.


  8.  Xterm

  Por vidi esperantajn signojn en Xterm, vi povas meti la sekvan linion
  en la dosieron ~/.Xresources:


         xterm*font: <tiparnomo>



  Kiel <tiparnomo>n donu iun konvenan Latin-3-tiparon.  (t.e. unu el la
  nomoj ricevitaj per xlsfonts -fn *iso8859-3).

  Aux voku Xterm rekte tiel:


         xterm -fn <tiparnomo>



  Tio funkcias ankaux en kelkaj aliaj programoj, ekz. en Emakso.  Se vi
  ofte bezonas jen vian nacian jen Latin-3an kodon, estas rekomendinde
  difini alinomon en .bashrc:


         alias eterm='xterm -fn fixed-l3' # simile por aliaj programoj



  9.  Redaktiloj

  9.1.  Redaktiloj kun Latin-3/Unikod-subteno

  Redaktiloj, kiuj kapablas trakti Latin-3 kaj/aux Unikodon estas la Vi-
  variantoj Vim kaj Elvis kaj redaktiloj Yudit, Wily
  <http://www.cs.su.oz.au/~gary/wily/>, Sam <http://plan9.bell-
  labs.com/plan9/unixsrc/>, SSam
  <http://www.westley.demon.co.uk/src/ssam-1.9.tar.gz>.  UTF-respekta
  pakajxo de regulaj esprimoj estas cxe
  http://www.westley.demon.co.uk/src/libutf-2.10.tar.gz
  <http://www.westley.demon.co.uk/src/libutf-2.10.tar.gz>, kiun ekzemple
  bezonas SSam.

  Pli da informoj pri Wily kaj Sam vi trovas ankaux en la arhxivo de
  posxtlisto pri Wily
  <http://wwwtios.cs.utwente.nl/archive/wilyfans/threads.html>.


  Al Emakso ni dedicxas apartan cxapitron.


  9.2.  Vi (Elvis, Vim)

  Kun la Vi-variantoj Vim kaj Elvis en la aktualaj versioj vi povas
  senprobleme uzi la samajn latin-3-tiparojn kiel kun Xterm.

  Se vi lancxas ilin en propra fenestro, uzu la elekton -fn <tiparnomo>:



         elvis -fn fixed-l3
         vim -g -fn fixed-l3



  Por tajpi esperantajn signojn, vi povas aux uzi la metodon laux la 3a
  cxapitro aux uzi la sekvajn difinojn:



         digraph G^ X
         digraph g^ x
         digraph H^ &
         digraph h^ 6
         digraph J^ ,
         digraph j^ <
         digraph C^ F
         digraph c^ f
         digraph S^ ^
         digraph s^ ~
         digraph U^ ]
         digraph u^ }
         set digraph



  Metu tiujn difinojn en dosieron, ekz. ~/.elvis.lat3 kaj lancxu:



         elvis -fn fixed-l3 +source~/.elvis.lat3



  Nun vi povas tajpi ekz. la literon gx per la klavoj ^Kg^ (Ctrl-k g
  cirkumflekso) aux cirkumflekso, retropasxo, g.

  Vim <http://www.math.fu-berlin.de/~guckes/vim/> kaj Elvis
  <ftp://ftp.cs.pdx.edu/pub/elvis/README.html> vi trovas jen ankaux en
  Interreto.


  10.  Redakti per Emakso (Emacs)



  10.1.  Emakso 19.34



  10.1.1.  Vidi E-signojn

  Por vidi E-signojn en Emakso, vi devas certigi, ke Emakso uzas
  Latin-3-tiparon. Tion vi povas atingi per aldono de la sekva linio en
  la dosiero ~/.Xdefaults:


         Emacs.font: <tiparnomo>



  Kiel <tiparnomo>n indiku iun konvenan Latin-3-tiparon.

  Same kiel cxe Xterm kaj kelkaj aliaj programoj funkcias:


         emacs -fn <tiparnomo>



  10.1.2.  Tajpi

  Se vi uzas Emakson sub X-fenestroj vi per la solvo realigita sub
  cxapitro 3 bone povas tajpi.  Sed ekzistas alia alternativo, la moduso
  "iso-accents-mode".  Por instrui al tiu moduso la lingvon Esperanto,
  aldonu tauxgajn difinojn en la dosiero iso-acc.el.


         ("esperanto"
          (?^ (?C . ?\306) (?G . ?\330) (?H . ?\246) (?J . ?\254)
               (?S . ?\336) (?U . ?\335) (?c . ?\346) (?g . ?\370)
               (?h . ?\266) (?j . ?\274) (?s . ?\376) (?u . ?\375))
          (?' (?C . ?\306) (?G . ?\330) (?H . ?\246) (?J . ?\254)
               (?S . ?\336) (?U . ?\335) (?c . ?\346) (?g . ?\370)
               (?h . ?\266) (?j . ?\274) (?s . ?\376) (?u . ?\375))
         )



  La sintakson divenu de la jam enhavitaj lingvoj, gxi iom varias en la
  diversaj Emaks-versioj. La supra ekzemplo difinas la esperantosignojn
  por la kombinoj ^+<litero> kaj '+<litero>.  Poste kompilu la dosieron
  al iso-acc.elc. Ekde nun vi povas funkciigi viajn tajperojn per la
  komandoj:


         M-x iso-accents-mode
         M-x iso-accents-customize
           language: Esperanto



  Atentu, ke se la cirkumflekso cxe vi estas senpasxa klavo (t.e. gxi
  aperas nur post premo de ^(cirkumflekso) kaj alia klavo), vi ne povas
  uzi gxin en tiu Emaks-moduso, anstatauxe uzu alian signon, ekz. '+c
  por tajpi cx. Kelkaj ecx tajpas c+x por cx.

  Por pli facile atingi tiun tajpmoduson, metu la sekvajn liniojn en la
  dosieron ~/.emacs:


    (defun esperanto-mode ()
      (interactive)
      (iso-accents-mode)
      (iso-accents-customize "esperanto")
    )
    (global-set-key "\C-ce" 'esperanto-mode)



  Poste per premo de C-c e (t.e. Ctrl+c e) vi trovigxas en Esperanto-
  moduso. Estus avantagxe, difini ankaux tian klavmallongigon por
  reatingi normalan moduson.


  10.2.  Emakso 20.* kaj MULE

  notoj: Pri tiuj Emakso-variantoj Lee Sau Dan donis la sekvajn
  indikojn:

  Emakso 20.* kaj MULE normale povas trovi la tauxgajn tiparojn, se ili
  jam estas instalitaj en la X-servilo aux tiparserviloj.

  Emakso 20.* povas montri latin-3-literojn se vi uzas gxin sur teksta
  ekrano kun funkciigita latin-3-a tiparo.  Informu Emakson pri tio per
  la  klavpremoj:



         C-x C-m t iso-8859-3 RET



  Por tajpado de Esperantosignoj, klavu unu el:



         C-u C-\ esperanto-postfix
         C-u C-\ esperanto-prefix
         C-u C-\ esperanto-alt-postfix



  Utilas ankaux


         M-x set-language-environment latin-3 RET



  aux se vi ofte bezonas tion, metu en .gnu-emacs ekzemple:



         (set-language-environment "latin-3")
         (setq default-input-method "esperanto-postfix")



  11.  Retposxto per Xfmail 1.3

  Xfmail estas retposxtprogramo kun plena MIME-subteno.  Oni agordas
  gxin ene de la grafika surfaco. Sub la menuo "Misc" vi povas elekti
  diversajn menupunktojn por la konfigurado.

  La menupunkto "Appearance" kondukas al listo, kie oni povas rilatigi
  kodojn kaj tiparojn. Unue premu "Add" kaj indiku la plenan nomon de
  latin-3-tiparo. Ekz.


         -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-3



  La tiparnomo nun aperas en la maldekstra listo. Por rilatigi gxin al
  la kodo "iso-8859-3" vi devas unue elekti tiun kodon en la dekstra
  listo kaj poste elekti la tiparon en la maldekstra listo. Nun premu
  "OK".

  Xfmail enhavas internan redkatilon per kies menuo "Language" vi povas
  elekti la gxustan kodon.

  Se vi volas uzi eksteran redaktilon vi povas iri per la menupunkto
  "Config Misc" kaj la butono "View/Edit" al pagxo, kie vi povas indiki
  gxin, ekzemple per:


         elvis -fn <tiparnomo> +source~/.elvis.lat3



  Jen vi trovas Xfmail
  <http://Burka.NetVision.net.il/xfmail/xfmail.html> en la reto.

  Atentu ankoraux alian aferon. Estas ne cxiam facile sendi okbitan
  mesagxon. Cxar kelkaj serviloj ankoraux funkcias sepbite kaj simple
  ignoras la okan biton tiel, ke viaj E-literoj farigxas iuj aliaj
  signoj. Se vi tamen volas sendi okbite kaj uzas lokan Sendmail, vi
  startu gxin kun la elekto -B8BITMIME.

  Por trasendi okbitajn mesagxojn tra sepbitaj medioj ekzistas la normo
  "quoted printable". Tiu rekodas okbitajn signoj per signaro =NN, cxe
  kio NN estas la kodero de la signo.  Mi rekomendas ensxalti tiun
  rekodon.  Per la menupunkto "Config Display" kaj la butono "Charsets"
  vi povas aperigi pagxon, kiu ebligas ensxalti "Quoted-printable" kaj
  ankaux elekti la kodon, kiun XFMail automate ensxaltu, kiam vi skribas
  novan mesagxon aux respondas al retmesagxo.


  12.  Diskutgrupoj per Knews


  Knews (Karl's threaded newsreader for X) estas legilo por
  diskutgrupoj, kiu kapablas rekoni kaj skribi gxustajn MIME-kapliniojn
  pri la signokodo. Por uzi Latin-3 oni devas aldoni kelkajn liniojn al
  la agordaj dosieroj.

  Dum la instalo de Knews, la dosiero Knews.ad estas kopiata el la
  fontdosierujo al /usr/X11R6/lib/X11/app-defaults/Knews.

  Aldonu en tiu dosiero la sekvajn liniojn:


    Knews.iso-8859-3.bodyFont:      \
              -*-helvetica-medium-r-normal-*-*-120-*-*-*-*-iso8859-3
    Knews.iso-8859-3.quoteFont:     \
              -*-helvetica-medium-r-normal-*-*-120-*-*-*-*-iso8859-3
    Knews.iso-8859-3.headerFont:    \
              -*-helvetica-medium-r-normal-*-*-120-*-*-*-*-iso8859-3

    Knews.editCommand: elvis +%i %s -fn fixed-l3 +source~/.elvis.lat3



  Anstataux Elvis vi povas ankaux uzi ekzemple Emakson kiel redaktilo.

  Por povi legi ankaux esperantajn afisxojn kun malgxusta kaplinio pri
  kodo aux koditajn laux UTF-8, estas avantagxe aldoni sub


         Knews.baseTranslations: #override \n\



  la linion:


         c    <Key> e:          mime-hack(text/plain, 8bit) \n\
         c s  <Key> u:          mime-hack(text/utf8, 8bit)  \n\



  Atentu, la \n\, kiu finu cxiun linion en la alineo krom la lastan.

  Nun per Ctrl-e oni povas sxalti en cxiu afisxo al la implicita kodo.
  Per Ctrl-Shift-u vi povas sxalti al la MIME-tipo text/utf8.  Cxar
  Knews ne scias trakti gxin, gxi demandas Metamail kaj montras la
  tekston kiel difinita en /etc/mailcap. En la sekcio pri Metmail ni
  difinis, ke text/utf8 estu konvertata al Latin-3.  Tial sxangxu ankaux
  la linion pri Knews.copiousoutput al:


         Knews.copiousOutput:  exec xterm \
               -fn 'fixed-l3' -e /bin/sh -c '(%C) | less'



  Anstataux fixed-l3 enmetu la de vi preferatan Latin-3-tiparon.

  La implicitan kodon (uzatan cxe Ctrl-e) oni difinas en la dosiero
  ~/.knews/config-* (* estas la uzata diskutgrupa servilo. Tiu dosiero
  estas auxtomate kreata cxe la unua lancxo de Knews. Aldonu la sekvan
  linion:


         *esperanto*defaultCharset:  iso-8859-3



  Nun en cxiu diskutgrupo, kiu enhavas la nomon "esperanto", estas uzata
  la kodo Latin-3 kiel implicita.

  Jen vi trovas Knews <http://www.matematik.su.se/~kjj/> en Interreto.

  13.  TeX / LaTeX

  Por produkti la supersignajn literojn en TeX, vi normale tajpas:


         \^C \^c \^G \^g \^H \^h \^J \^{\j} \^S \^s \u{U} \u{u}



  La \j cetere estas 'j' sen la punkto. Tamen, se vi skribas longajn
  tekstojn, estas iom tede skribi tiujn ordonojn. Do estas avantagxe
  krei dosieron esperanto.sty kun la sekva enhavo:


         \let\mathcaret=^

         \def\esperantocaret#1{
           \ifx#1u\u{#1}\else
           \ifx#1U\u{#1}\else
           \ifx#1j\^{\j}\else
           \^{#1}\fi\fi\fi
         }

         \catcode`\^=\active

         \def^{\ifmmode\let\next\mathcaret
             \else\let\next\esperantocaret
             \fi\next}



  Tio permesas skribi ^C ^c ... ^U ^u por la esperantaj literoj. Iom
  komplikas la aferon, ke la signo ^ estas ankaux uzata por supraj
  indicoj en la matematika moduso, t. e. por matematikaj formuloj. Do vi
  ne povas uzi tiujn mallongigojn en formuloj ekzemple. (Pro tio ankaux
  la konfuzigaj linioj kun "mathcaret" en la supraj difinoj)

  Tamen la supra solvo povas kauxzi diversajn problemojn kun makrooj aux
  en matematikaj formuloj. Pro tio Albert Reiner sendis al mi pli bonan
  solvon, kiu uzas la grado-signon anstataux la tegmenteto:



    \gdef\espon{\catcode`\*\active\relax}%
    \gdef\espoff{\catcode`\*12\relax}%
    %
    {%
    \catcode`\@11   % por kasxi kelkajn makrojn
    \espon          % ensxalti Esperanton por la difinoj
    \gdef*{\relax\esper@nto}%
    \gdef\esper@nto#1{%
    \ifx #1C\^C%
    \else\ifx #1c\^c%
    \else\ifx #1G\^G%
    \else\ifx #1g\^g%
    \else\ifx #1H\^H%
    \else\ifx #1h\^h%
    \else\ifx #1J\^J%
    \else\ifx #1j\^\j%
    \else\ifx #1S\^S%
    \else\ifx #1s\^s%
    \else\ifx #1U\u U%
    \else\ifx #1u\u u%
    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
    }%
    \espon          % ensxalti Esperanton



  (rim.: En la supra ekzemplo anstatauxigu la steleton * per la
  gradosigno . La sintakso de la SGML-dokumenttipo ne traktas
  gradosignon en tiu loko gxuste.)

  Se vi ebligis la uzadon de Latin-3 en via sxatata redaktilo, vi povas
  ankaux rekte traduki la Latin-3-kodojn al la esperantaj signoj:


         \catcode`\cx=\active \defcx{\^c}
         \catcode`\gx=\active \defgx{\^g}
         \catcode`\hx=\active \defhx{\^h}
         \catcode`\jx=\active \defjx{\^\j}
         \catcode`\sx=\active \defsx{\^s}
         \catcode`\ux=\active \defux{\u u}
         \catcode`\Cx=\active \defCx{\^C}
         \catcode`\Gx=\active \defGx{\^G}
         \catcode`\Hx=\active \defHx{\^H}
         \catcode`\Jx=\active \defJx{\^J}
         \catcode`\Sx=\active \defSx{\^S}
         \catcode`\Ux=\active \defUx{\u U}



  Noto: En la supra ekzemplo vi devas anstatauxigi la esperantajn
  literojn cx ... Ux en cxiu linio kaj maldekstre kaj dekstre per la
  gxustaj literoj laux Latin-3-kodo.

  Cetere pli ampleksa dosiero esperant.sty estas enhavata en la Babel-
  pakajxo por LaTeX2e. Simple kontrolu per locate esperant, cxu gxi eble
  jam estas instalita cxe vi.  Gxi ekzemple ankaux kreas esperantajn
  titolojn en la enhavtabelo kaj indeksoj.

  Por uzi la pakajxon, tajpu

  sub TeX:



    \input{esperant.sty}



  sub LaTeX:


         \usepackage[esperanto]{babel}



  Ioma problemo estas, ke en tiparoj aliaj ol la normala "Computer
  Modern" ne trovigxas la senpunkta j. Por kasxi la punkton super j
  ekzistas dosiero dotlessj.sty <ftp://ftp.tex.ac.uk/tex-
  archive/macros/latex/contrib/supported/carlisle/dotlessj.sty>.
  Detalaj informoj pri gxi trovigxas cxe Edmundo
  <http://www.rano.demon.co.uk/dotlessj.html>.


  14.  Esperanto-subteno en internaciigitaj programoj

  Kelkaj Gnu-programoj kaj aliaj estas internaciigitaj. T.e.  iliaj
  mesagxoj povas aperi en diversaj lingvoj. Tamen la Esperanto-tradukoj
  de tiuj programoj nur nun estas komencataj. Sed ja vi povas kontroli,
  cxu en via sistemo ekzistas dosierujo /usr/share/locale/eo aux cxu cxe
  la fontdistribuoj de viaj programoj estas iuj dosieroj po/eo.po. Se
  jes, la programoj kapablas montri esperantajn mesagxojn. Por vidi
  tiujn mesagxojn, vi devas difini la variablon LANG aux LANGUAGE en la
  cxirkauxajxo de la programo.

  Por unuopa ordono vi povas ekzemple tajpi tiel:


         LANG=eo <programo>



  Aux vi povas dauxre difini la preferatajn lingvojn, se vi metas en
  vian startskripton ion kiel


         export LANG=eo:de:en  # en bash

         setenv LANG eo:de:en  # en tcsh



  Tio signifas: lauxeble uzu Esperanton, alikaze la germanan lingvon,
  aux se ankaux tiu ne estas subtenata de la programo, uzu la anglan.

  Forumo por la adaptado de linuksaj programoj al Esperanto cetere estas
  la retposxtlisto eo@li.org, al kiu vi povas aligxi per sendo de la
  vorto subscribe en la korpo de mesagxo al eo-request@li.org.


  15.  Esperanto-signoj en HTML-tekstoj

  Vi povas uzi la Latin-3-koderojn por montri E-signojn en HTML-teksto.
  La normo volas, ke tiukaze vi metu la sekvan linion en la kapon
  (<head>...</head>) de via dosiero:

    <meta http-equiv="Content-type" content="text/html; charset=ISO-8859-3">



  Bedauxrinde Netscape Communicator kaj eble ankaux aliaj TTT-legiloj
  misinterpretas tiun linion kaj malhelpas, ke ecx per via "User-
  defined"-kodo vidigxos E-signoj.  Alikaze en TTT-legiloj kiuj bone
  atentas la normon (ekz. Kfm), vi vidas la esperantaj signojn nur, se
  tiu linio trovigxas en la dosiero.

  Pri kodado per Unikodo, legu la informpagxon cxe Aaron Irvine
  <http://www.cs.qub.ac.uk/~AD.Irvine/lat3.html>. Pro la problemoj de
  Netscape Communicator rilate al E-signoj en Unikodo ni malrekomendas
  la uzon de Unikodo en pure esperantaj HTML-tekstoj. Por multlingvaj
  tekstoj eble ne ekzistas pli tauxga alternativo. Sed por Esperanto uzu
  prefere Latin-3 ankoraux iom da tempo.



F ESPERANT.;1                       	Esperanto-HOWTO
  Finnish-HOWTO
  Pekka Taipale, pjt@iki.fi
  v1.1f, 14 February 1996

  This document describes how to finlandize Linux - Finnish keyboard
  mapping, time zone, 8-bit clean settings for applications, etc.
  Except for this abstract, the text is in Finnish because that is the
  benefit of the intended audience. This document may be reproduced at
  the usual Linux HOWTO terms. If you use it commercially, you're wel
  come to do so but I'd like to be notified. If you have questions, con
  tact me at my e-mail address.
  ______________________________________________________________________

  Table of Contents


  1. Johdanto

     1.1 Mik HOWTO?
     1.2 Tekijnoikeuksista ja kopioinnista
     1.3 Tekstin esitystavasta
     1.4 Kiitokset

  2. Nppimistasetukset

     2.1 Perusnppimist
     2.2 ISO Latin-1 -merkist
     2.3 Nppimistkartan parantelua

  3. Pteasetukset

  4. Ympristn lokaaliasetukset

  5. Aikavyhykeasetukset

  6. X11R6

  7. Eriden sovellusten asetukset

     7.1 bash
     7.2 tcsh
     7.3 emacs
     7.4 telnet
     7.5 rlogin
     7.6 joe
     7.7 less
     7.8 irc
     7.9 elm
     7.10 pine
     7.11 TeX
        7.11.1 NTeX
        7.11.2 teTeX
        7.11.3 LaTeX-otsikot

  8. Posti, nyyssit ja 8-bittiset merkit

     8.1 Perusratkaisu: 8-bittiset merkit viesteihin
     8.2 MIME Quoted Printable-koodaus

  9. Aiheeseen liittyv materiaalia



  ______________________________________________________________________


  1.  Johdanto

  1.1.  Mik HOWTO?

  Tm dokumentti kertoo, mit pitisi tehd Linuxin suomettamiseksi sen
  jlkeen kun kyttjrjestelm perussovelluksineen on asennettu
  koneeseen jostain Linux-jakelusta. Nin saadaan suomalaiset kirjaimet,
  nppimist ja muut paikalliset asetukset toimimaan oikein.
  Lhtkohtana on Slackware- tai RedHat-jakelusta asennettu Linux-
  jrjestelm, mutta ohjeista on todennkisesti apua mys muiden Linux-
  jakeluversioiden kyttjille.

  Varsin suuri osa ohjeista ptee Linuxin lisksi muissakin Unix-
  tyyppisiss jrjestelmiss. Sama toimii mys toisinpin: jos et lyd
  etsimsi tietoa tst dokumentista, tutki muita FAQ- jne. tiedostoja
  (ks.  esim. Linuxin HOWTO-dokumentit sek viitteet [``UNIXHelp''] ja
  [``faqs'']). Tmn dokumentin viitteiss on, mikli mahdollista,
  kytetty kotimaisia peilauksia ulkomailla sijaitsevien alkuperisten
  tiedostovarastojen asemesta.

  Tss ohjeessa ei ole yleens eritelty root-kyttjn ja tavallisen
  kyttjn tekemi asetuksia. Jotkut ohjeista ovat siis ainoastaan
  yllpitjn heini ja vaikuttavat koneen kaikkiin kyttjiin, jotkut
  taas ovat tavallisen kyttjn itselleen tekemi asetuksia.  Linux-
  koneissa yllpitj ja kyttj ovat usein - mutta eivt aina - sama
  henkil. Hyvin monet asetukset voi tehd molemmilla tavoilla; esim.
  kaikkien kyttjien oletukset hakemistossa  /etc oleviin tiedostoihin
  ja kyttjn omat asetukset kotihakemistossa  $HOME oleviin pisteell
  alkaviin tiedostoihin.


  1.2.  Tekijnoikeuksista ja kopioinnista

  Copyright  1996 by Pekka Taipale. Tt dokumenttia saa kopioida ja
  levitt muuttamattomana vapaasti. Jos levitt muutettua tai
  lyhennetty versiota dokumentista, tt tekijnoikeusmerkint ei saa
  poistaa.  En ota vastuuta mahdollisista virheist enk varsinkaan
  muiden muuttamista versioista. Jos teet dokumenttiin lisyksi tai
  korjauksia, merkitse selvsti oma tysi. Parasta olisi, jos
  lhettisit korjausehdotuksesi minulle osoitteeseen  pjt@iki.fi
  jolloin ne voidaan ottaa mukaan alkuperiseen tekstiin.


  1.3.  Tekstin esitystavasta

  Tm HOWTO on kirjoitettu SGML-muodossa. HTML-, TeX- ja tekstiversiot
  generoidaan SGML:st Linuxdoc-SGML -ohjelmalla [``Linuxdoc'']. Tmn
  tekstin ulkopuolelle osoittavat viittaukset (HTML-versiossa linkit) on
  koottu yhteen paikkaan, ks. luku ``Aiheeseen liittyv materiaalia''.
  Muualla dokumentissa olevat linkit ovat ristiinviittauksia dokumentin
  sisll. Nin on menetelty siksi, ett olisi helpompi hahmottaa,
  milloin HTML-version linkin seuraaminen on viemss lukemaan jotakin
  muuta dokumenttia ja milloin se on ristiinviittaus tmn HOWTO:n
  sisll.



  1.4.  Kiitokset

  Kiitos kaikille kommentteja ja korjauksia esittneille.  Erityisesti
  mainittakoon Tuomas Aura, Tuomas Eerola, Timo Korvola, Jaakko Ruohio,
  Jani Tammi ja Lars Wirzenius.



  2.  Nppimistasetukset

  2.1.  Perusnppimist

  Tss kerrotaan tekstikonsolin nppimistasetuksista. X-ympristst
  on tietoa luvussa ``X11R6''.

  Jos nppimistsi on Linuxin asennuksen jljilt amerikkalaista
  mallia, olet ohittanut nppimistkartan valinnan asennusohjelmassa.
  Nppimistkartaksi kannattaa valita ISO Latin-1-merkkej (ks. kohta
  ``alla'') tuottava kartta  fi-latin1. Seitsemnbittinen fi-kartta on
  poistumassa kytst eik sit kannata kytt jos siihen ei ole
  erityist tarvetta.

  Slackware-jrjestelmiss nppimistkartan voi asettaa lismll
  tiedostoon /etc/rc.d/rc.keymap tai  /etc/rc.d/rc.local seuraava rivi:



       ______________________________________________________________________
       /usr/bin/loadkeys fi-latin1       # Finnish latin1 keymap
       ______________________________________________________________________



  RedHatissa asetus taas on tiedostossa /etc/sysconfig/keyboard, jossa
  pit olla seuraava rivi:



       ______________________________________________________________________
       KEYTABLE=/usr/lib/kbd/keytables/fi-latin1.map
       ______________________________________________________________________



  Debian-jrjestelmiss asetus tehdn tiedostoon
   /etc/rc.boot/console.

  Nppimistkarttatiedostot ovat yleens hakemistossa
  /usr/lib/kbd/keytables. Mikli fi-latin1 -karttaa ei lydy tst
  hakemistosta, etsi esim. Slackware-jakelun keytbls-paketti.
  Ruotsalaiset kyttvt samaa nppimistkarttaa kuin suomalaiset.


  2.2.  ISO Latin-1 -merkist

  Suomenkielinen teksti kirjoitetaan Linux-ympristss ISO Latin-1
  -merkistll, joka kytt 7-bittisi ASCII-merkkej englannin
  perusaakkosten nyttmiseen ja 8-bittisi ns.  ISO-skandeja
  suomalaisiin kirjaimiin , ,  jne.  Mys mm. MS Windows kytt
  samaa merkist. Listietoja lytyy Timo Kiravuon merkistohjeesta
  [``skandit''] ja Jukka Korpelan ISO-Latin-1-merkkej ksittelevst
  tekstist [``ISO-latin1''].

  Jos fi-latin1 -nppimistll :n ja :n painalluksista tulee d- ja v-
  kirjaimia, hukkuu kahdeksas bitti jonnekin. Ks. Pteasetukset-kohta
  (``'') sek rlogin (``'') ja telnet (``''). Jos skandien painaminen
  aiheuttaa piippauksia tai mitn ei tapahdu, sovellus (esim.
  komentotulkki) ei huoli 8-bittisi merkkej. Katso sovelluksien
  kohdalta komentotulkkisi asetukset (kohdat ``bash'' ja ``tcsh'').



  2.3.  Nppimistkartan parantelua


  Timo Korvola ehdottaa:

  Gravea, tilde ja sirkumfleksia tarvitaan sen verran usein, ett
  elmn helpottamiseksi voi tehd fi-latin1.map:in lataamisen jlkeen
  vaikkapa nin:



       ______________________________________________________________________
       loadkeys << '@loadkeys'
         keycode 5 = four currency dollar
         keycode 13 = dead_acute grave
         keycode 27 = dead_diaeresis asciicircum asciitilde
         keycode 97 = Compose
       @loadkeys
       ______________________________________________________________________



  Tm korjaa mys shift 4:n tuottamaan valuuttamerkin siten kuin
  nppimistss lukee. Oikeasta controlista tehdn compose, jolla voi
  tuottaa vaikkapa :n nppilemll compose ` e.

  Konsolin nppinkoodit saa helposti selville ohjelmalla showkey.


  3.  Pteasetukset

  8-bittisten suomalaisten merkkien toimiminen vaatii, ett pteyhteys
  on 8-bittinen. Yleens Linux-koneen nppimistll ja ptelinjoilla
  nin onkin, mutta mikli ei ole, asetus saadaan plle laittamalle
  seuraava komento komentotulkin alustustiedostoon (.profile,  .login
  jne):



       ______________________________________________________________________
       stty pass8
       ______________________________________________________________________



  8-bittisten merkkien toimiminen rlogin- ja telnet-yhteyksien yli on
  selitetty alempana sovelluksien kohdalla (ks. kohdat ``rlogin'' ja
  ``telnet'').



  4.  Ympristn lokaaliasetukset

  Lokaaliasetusten tarkoitus on saada ohjelmat noudattamaan esimerkiksi
  eri kielten erilaisia aakkosjrjestyssntj ja muita kytntj.
  Lokaalit vaikuttavat mm. kellonaikojen ja pivmrien tulostusmuotoon
  ja tietueiden lajittelujrjestykseen eri ohjelmia kytettess -
  mikli ohjelmat on tehty asianmukaisella tavalla ja kirjastot tukevat
  kyseist lokaalia.

  Uudehkojen Linux-jakelujen (Slackware 3.0 ja RedHat 2.1) kirjastot
  tukevat dokumenttien mukaan yleist eurooppalaista
  Latin1-merkistlokaalia ISO-8859-1. Oikea lokaaliasetus Suomessa on
  finnish.iso88591. Lokaali asetetaan ympristmuuttujien LC_CTYPE,
  LC_TIME jne. avulla (ks.
   man 7 locale).

  Voi olla viisasta asettaa suomalainen lokaali jo nyt, niin ett
  spesifisen suomalaisen lokaalituen mahdollisesti joskus ilmestyess
  kirjastoihin se otetaan kyttn.  Lokaalin asetus voi olla mys
  epviisasta, koska esim.  pivmrtulostuksen muodon muuttuminen voi
  muuttaa komentotiedostojen toimintaa ja rikkoa siten ohjelmia.
  LC_TIME-lokaalin POSIX-asetuksella date-komennon tulostus on muotoa
  Wed Aug 9 13:33:39 EETDST 1995 kun taas suomalaisella lokaalilla se
  olisi muotoa  9.8.1995 13:33:39.

  LC_ALL- tai LC_TIME-asetuksen tekeminen ei siis ole vlttmtt
  jrkev, mutta LC_CTYPE ja LC_COLLATE kannattaa asettaa
  suomalaiseksi. Esim. tcsh vaatii LC_CTYPE-asetuksen, jotta 8-bittiset
  merkit toimisivat.

  Jos kytt komentotulkkina csh-varianttia (kuten tcsh), haluat
  todennkisesti tehd asetuksen tiedostossa /etc/csh.cshrc tai
  $HOME/.cshrc:



       ______________________________________________________________________
               setenv LC_CTYPE finnish.iso88591
       ______________________________________________________________________



  Jos taas kytt sh-varianttia (kuten bash tai pdksh), kirjoita
  tiedostoon  /etc/profile tai  $HOME/.profile:



       ______________________________________________________________________
               export LC_CTYPE=finnish.iso88591
       ______________________________________________________________________



  5.  Aikavyhykeasetukset

  Linux-koneen CMOS-kello voi osoittaa joko UTC-aikaa - kuten UNIX-
  koneissa on yleens tapana - tai paikallista aikaa. (UTC on
  kansainvlinen normaaliaika, suunnilleen sama kuin Greenwich Mean Time
  eli GMT.) Linux-jakelut olettavat yleens kellon kyvn paikallista
  aikaa, koska MS-DOS ja muut tavalliset PC-kyttjrjestelmt eivt
  tunne aikavyhykkeit. Tllin Linuxin kynnistystiedostoissa - esim.
  /etc/rc.d/rc.S (Slackware) tai /etc/rc.d/rc.sysinit (RedHat) - on
  komento
   clock -s. Jos kello on UTC-ajassa, komennon pit olla
   clock -u -s.

  Kun CMOS-kello on UTC-ajassa, kyttjrjestelm huolehtii ajan
  nyttmisest oikein mm. kesaikaan siirryttess, kunhan aikavyhyke
  on asetetty oikein.  Jos CMOS-kello on paikallisessa ajassa, kes- ja
  talviaikoihin siirtymiset on tehtv ksin. CMOS-kellon aikaa voi
  muuttaa joko CMOS-setupista ksin tai sitten Linuxissa clock-
  komennolla (ks.  man 8 clock).

  Suomen aikavyhyke on EET (Eastern European Time).  Aikavyhykkeen voi
  asentaa kyttjrjestelmn asennuksen yhteydess; mikli et tehnyt
  sit tai teit sen vrin, voit tehd asetuksen root-tunnuksella
  komennolla



       ______________________________________________________________________
       ln -s /usr/lib/zoneinfo/Europe/Helsinki /usr/lib/zoneinfo/localtime
       ______________________________________________________________________



  (Vanhemmissa Linux-jakeluissa ei ole Helsinki-vyhykett; kyt
  EET:t).

  Yleens systeemin oletusaikavyhykkeen asettaminen riitt. Jos
  yksittinen kyttj tarvitsee erilaisen aikavyhykkeen, sen voi
  asettaa kyttjkohtaisesti TZ-muuttujalla.  POSIX-kytnt on, ett
  TZ-asetus on muotoa EET-2EETDST, mik tarkoittaa, ett aikavyhyke on
  EET, se on kaksi tuntia edell GMT:t, ja kesaikaan siirrytn
  EETDST-snnn mukaan. Asetus saadaan aikaan komentotulkin
  alustustiedostossa, esim.  bash-kyttjille lismll kotihakemiston
   .profile-tiedostoon rivi



       ______________________________________________________________________
       export TZ=EET-2EETDST
       ______________________________________________________________________



  6.  X11R6

  XFree86 saa nppimistkarttansa Linuxin konsolilta. Useimpien
  nppinten (ml.  ja ) pitisi toimia suoraan oikein, kun konsolin
  nppimistkartta on asetettu. "Kuolleiden" nppinten mrityksi
  (dead_acute, dead_diaeresis ym.) ei kuitenkaan saada konsolilta, joten
  lopputulosta tytyy hieman paikkailla.

  Jos kone on konfiguroitu kynnistmn xdm eli kyttj ei
  kirjoittaudu sisn virtuaalikonsolille vaan suoraan X11:aan, voi olla
  tarpeen asettaa koko suomalainen nppimistkartta .Xmodmap-
  tiedostossa.

  Mikli AltGr-nppin ei toimi (merkit {, [, ], }, \ jne.), tarkista,
  ett X:n konfigurointitiedostossa (/etc/XF86Config tai
  /usr/lib/X11/XF86Config) on rivi



       ______________________________________________________________________
       RightAlt    ModeShift
       ______________________________________________________________________



  ja ett sit ei ole kommentoitu pois #-merkill.

  X:n kynnistysskriptit ajavat yleens xmodmap-ohjelman, joka muuttaa
  X:n nppimistkarttaa kyttjn
   .Xmodmap-tiedoston perusteella.  .Xmodmap-tiedosto voi nytt esim.
  tlt:



       ______________________________________________________________________
       keycode  13 = 4 currency dollar
       keycode  21 = acute grave
       keycode  35 = dead_diaeresis asciicircum asciitilde
       ______________________________________________________________________



  Tss nppimeen, jonka nppinkoodi on 13 (nppimistn plohkon
  numeronppin 4) sidotaan merkit 4, valuuttamerkki ja $, jotka
  tulevat, kun ko. nppint painetaan yksinn, shiftin kanssa ja
  AltGr-nppimen kanssa.

  Nppimeen 21 (Backspace-nppimen vieress) sidotaan hipsumerkit ja
  nppimeen 35 (:n ja Enterin vliss) sidotaan "kuolleet pisteet" ()
  sek sirkumfleksi ("hattumerkki") ja tilde (~). Voit kirjoittaa esim.
  saksalaisen -kirjaimen painamalla ensin kuolleita pisteit ja sitten
  u:ta. .Xmodmap-tiedoston muutokset saa heti kyttn komennolla



       ______________________________________________________________________
       xmodmap .Xmodmap
       ______________________________________________________________________



  Ks.  man xmodmap. Huomaa, ett emacs saattaa kohdella nppimi
  poikkeavasti. X:n alla nppinkoodit saa selville ohjelmalla  xev.

   Esimerkki X11-nppimistkartasta

  Tmn voi sijoittaa  .Xmodmap-tiedostoon.



  ______________________________________________________________________
  keycode   8 =
  keycode   9 = Escape
  keycode  10 = 1 exclam
  keycode  11 = 2 quotedbl at
  keycode  12 = 3 numbersign sterling
  keycode  13 = 4 dollar dollar
  keycode  14 = 5 percent
  keycode  15 = 6 ampersand
  keycode  16 = 7 slash braceleft
  keycode  17 = 8 parenleft bracketleft
  keycode  18 = 9 parenright bracketright
  keycode  19 = 0 equal braceright
  keycode  20 = plus question backslash
  keycode  21 = apostrophe grave
  keycode  22 = Delete
  keycode  23 = Tab
  keycode  24 = Q
  keycode  25 = W
  keycode  26 = E
  keycode  27 = R
  keycode  28 = T
  keycode  29 = Y
  keycode  30 = U
  keycode  31 = I
  keycode  32 = O
  keycode  33 = P
  keycode  34 = aring Aring
  keycode  35 = dead_diaeresis asciicircum asciitilde
  keycode  36 = Return
  keycode  37 = Control_L
  keycode  38 = A
  keycode  39 = S
  keycode  40 = D
  keycode  41 = F
  keycode  42 = G
  keycode  43 = H
  keycode  44 = J
  keycode  45 = K
  keycode  46 = L
  keycode  47 = odiaeresis Odiaeresis
  keycode  48 = adiaeresis Adiaeresis
  keycode  49 = section onehalf
  keycode  50 = Shift_L
  keycode  51 = apostrophe asterisk
  keycode  52 = Z
  keycode  53 = X
  keycode  54 = C
  keycode  55 = V
  keycode  56 = B
  keycode  57 = N
  keycode  58 = M
  keycode  59 = comma semicolon
  keycode  60 = period colon
  keycode  61 = minus underscore
  keycode  62 = Shift_R
  keycode  63 = KP_Multiply
  keycode  64 = Alt_L
  keycode  65 = space
  keycode  66 = Caps_Lock
  keycode  67 = F1
  keycode  68 = F2
  keycode  69 = F3
  keycode  70 = F4
  keycode  71 = F5
  keycode  72 = F6
  keycode  73 = F7
  keycode  74 = F8
  keycode  75 = F9
  keycode  76 = F10
  keycode  77 = Num_Lock
  keycode  78 = Scroll_Lock
  keycode  79 = Home KP_7 KP_7 Home
  keycode  80 = Up KP_8 KP_8 Up
  keycode  81 = Prior KP_9 KP_9 Prior
  keycode  82 = KP_Subtract
  keycode  83 = Left KP_4 KP_4 Left
  keycode  84 = Begin KP_5 KP_5 Begin
  keycode  85 = Right KP_6 KP_6 Right
  keycode  86 = KP_Add
  keycode  87 = End KP_1 KP_1 End
  keycode  88 = Down KP_2 KP_2 Down
  keycode  89 = Next KP_3 KP_3 Next
  keycode  90 = Insert KP_0 KP_0 Insert
  keycode  91 = Delete KP_Decimal KP_Decimal Delete
  keycode  92 = 0x1007ff00
  keycode  93 =
  keycode  94 = less greater bar
  keycode  95 = F11
  keycode  96 = F12
  keycode  97 = Home
  keycode  98 = Up
  keycode  99 = Prior
  keycode 100 = Left
  keycode 101 = Begin
  keycode 102 = Right
  keycode 103 = End
  keycode 104 = Down
  keycode 105 = Next
  keycode 106 = Insert
  keycode 107 = Delete
  keycode 108 = KP_Enter
  keycode 109 = Control_R
  keycode 110 = Pause
  keycode 111 = Print
  keycode 112 = KP_Divide
  keycode 113 = Alt_R Mode_switch
  keycode 114 = Break
  keycode 115 =
  ______________________________________________________________________



  7.  Eriden sovellusten asetukset

  Thn ei ole kertty kaikkia mahdollisia sovelluksia; lisapua voi
  lyty esim. German-HOWTO:sta [``german''].


  7.1.  bash

  Tee kotihakemistoosi tiedosto  .inputrc, ja laita sinne nm rivit:



  ______________________________________________________________________
  set meta-flag on
  set convert-meta off
  set output-meta on
  ______________________________________________________________________



  Tmn jlkeen komentotulkki huolii 8-bittiset merkit ja nytt ne
  oikein.

  bash lukee kynnistyessn useita eri tiedostoja. .profile,
  .bash_login ja  .bash_profile luetaan ainoastaan
  sisnkirjoittautumisen (login) yhteydess; .bashrc taas suoritetaan
  aina kun bash kynnistyy (mys esim. xterm-ikkunassa).


  7.2.  tcsh

  tcsh kytt lokaaliasetusta LC_CTYPE. Tee kotihakemistoosi tiedosto
  .tcshrc, ja laita sinne rivi



       ______________________________________________________________________
       setenv LC_CTYPE finnish.iso88591
       ______________________________________________________________________



  Huomaa, ett RedHat 2.1:n mukana tuleva tcsh ei jostain syyst toimi
  8-bittisten merkkien kanssa oikein. Voit joko knt tcsh:n itse, tai
  kopioida tcsh-binrin esim. Slackware 3.0:sta.


  7.3.  emacs

  Tee tai editoi kotihakemistossasi tiedostoa  .emacs. Laita sinne
  rivit:



       ______________________________________________________________________
       (standard-display-european 1)
       (set-input-mode (car (current-input-mode))
                       (nth 1 (current-input-mode))
                       'accept-8bit-input)
       (require 'iso-syntax)
       ______________________________________________________________________



  Huomaa, ett GNU Emacs 19.25, joka on mm. Slackware-jakelun versiossa
  2.0.0, on rikki eik eurooppalaisten merkkien tuki toimi. Jos kytt
  tt versiota, poista se ja asenna uudempi versio. Mys emacs 19.30
  toimii vrin jos se on knnetty vanhalla gcc:ll (esim. 2.6.3).



  7.4.  telnet

  Luo kotihakemistoosi tiedosto  .telnetrc ja tee sinne oma rivi
  kullekin koneelle johon otat yhteytt telnetill.  Rivill on koneen
  nimi sek komento  set outbinary. Jos esim. otat yhteytt koneeseen
  masina paikallisessa verkossa sek koneeseen hissi.kone.fi Internetin
  yli,  .telnetrc-tiedostosi pitisi nytt tlt:



       ______________________________________________________________________
       masina set outbinary
       hissi.kone.fi set outbinary
       ______________________________________________________________________



  Voit mys antaa kynnistettess option  -8 tai asettaa binrimoodin
  telnet-istunnon aikana painamalla telnetin escape-merkki (ei ESC-
  nppin vaan telnetin escape character, oletuksena  C-] joka lytyy
  yleens nppilemll Ctrl-5) ja antamalla komennon.  Ks.  man telnet.



  7.5.  rlogin

  rlogin-komennossa pit antaa optio  -8 jotta 8-bittiset merkit
  kulkisivat yhteyden lpi. Ks.  man rlogin.



  7.6.  joe

  joe tarvitsee option  -asis jotta se kohtelisi merkkej 8-bittisin.

  Poista vlilynti joerc-tiedostosta sen rivin alusta, jolla lukee
  -asis. Kaikkien kyttjien yhteinen joerc-tiedosto on yleens
  /usr/lib/joe/joerc ja kyttjkohtainen tiedosto $HOME/.joerc.



  7.7.  less

  Aseta ympristmuuttuja LESSCHARSET arvoon latin1:



       ______________________________________________________________________
       export LESSCHARSET=latin1
       ______________________________________________________________________



  tai vastaava C-shellin komento.


  7.8.  irc


   Tmn kirjoitti Jani Tammi (jantam@utu.fi).

  Laita  .ircrc-tiedostoon rivi:



  ______________________________________________________________________
          set eight_bit_characters on
  ______________________________________________________________________



  Tmn lisksi saatat tarvita mys komennon



       ______________________________________________________________________
               /set translation latin_1
       ______________________________________________________________________



  Huomaa, ett tm komento annetaan irc:iss, eik sit kirjoiteta
  .ircrc-tiedostoon.


  7.9.  elm

  Laita tiedostoon $HOME/.elm/elmrc seuraavat rivit:



       ______________________________________________________________________
       charset = iso-8859-1
       displaycharset = iso-8859-1
       textencoding = 8bit
       ______________________________________________________________________



  7.10.  pine

  Laita tiedostoon  /usr/local/lib/pine.conf tai $HOME/.pinerc seuraava
  rivi:



       ______________________________________________________________________
       character-set=ISO-8859-1
       ______________________________________________________________________



  7.11.  TeX


  Suomalaiset aakkoset ja tavutuksen saa TeXiss toimimaan parhaiten
  kyttmll babel-pakettia, joka on siis syyt valita asennettavaksi
  TeXi asennettaessa.

  TeXist on kaksi Linux-jrjestelmiss yleisesti kytetty jakelua:
  NTeX ja teTeX. NTeX tulee Slackwaren ja teTeX RedHatin mukana. teTeX
  on nist helpompi konfiguroida.

  TeXin hakemistopolut ja konfigurointi vaihtelevat jakelusta toiseen.
  Voit joutua tekemn asiat jakelusta riippuen hyvinkin paljon tst
  ohjeesta poikkeavalla tavalla.


  7.11.1.  NTeX

  Tss opasti Tuomas Aura (Tuomas.Aura@hut.fi):

  LaTeXissa (2e) ei ole valmiina suomenkielist tavutusta, vaan se on
  knnettv itse. Tm tapahtuu seuraavasti (root-kyttjn):


    Etsi tiedosto  language.dat (Slackwaren NTeXiss
     /usr/lib/texmf/tex/latex/cfg/language.dat) ja editoi sit. Valitse
     enintn 4 kielt ja poista niiden edest kommenttimerkki %.
     Slackware 3.0:n NTeX:iss on kielen nimi "finnish" kirjoitettu
     vrin: "finish". Tm on syyt korjata (tiedoston  hyphen.finish
     nimess se ei haittaa).

    Samassa hakemistossa on   lthyphen.cfg joka on korvattava babel-
     versiolla:


       ______________________________________________________________________
               rm lthyphen.cfg
               ln -s lthyphen.babel lthyphen.cfg

       ______________________________________________________________________



    Poista tavutuksen amerikkalainen oletustiedosto:


       ______________________________________________________________________
               rm /usr/lib/texmf/tex/tex/macros/hyphen.tex

       ______________________________________________________________________



    Etsi tiedosto  latex.ltx ja mene samaan hakemistoon (NTeXiss
     /usr/lib/texmf/tex/latex/latex-base). Aja  initex:


       ______________________________________________________________________
               initex latex.ltx

       ______________________________________________________________________



    Nin syntyy tiedosto  latex.fmt. Kopioi se LaTeXin ini-hakemistoon,
     esim. NTeXiss:


       ______________________________________________________________________
               mv latex.fmt /usr/lib/texmf/ini/

       ______________________________________________________________________

  Nyt pitisi suomen tavutuksen toimia, kunhan dokumentin otsikot ovat
  kunnossa.


  7.11.2.  teTeX

  teTeX:in konfigurointi on helppoa:


    Ajetaan  texconfig

    Valitaan valikosta HYPHEN

    Editori aukeaa editoimaan  language.dat-tiedostoa, poistetaan
     kommentti sen rivin alusta, jossa lukee  finnish

    Uusi LaTeX-formaatti luodaan automaattisesti


  7.11.3.  LaTeX-otsikot

  Suomalaisen LaTex-dokumentin alkuriveill pitisi lukea jotain tmn
  tapaista:



       ______________________________________________________________________
       \documentclass[a4paper,finnish]{article}
       \usepackage{t1enc,isolatin1,babel}
       ______________________________________________________________________



  LaTeX2e <1994/12/01> -formaatilla ja uudemmilla toimii mys hienompi
  ratkaisu:



       ______________________________________________________________________
       \documentclass[a4paper, finnish]{article}
       \usepackage{babel}
       \usepackage[latin1]{inputenc}
       \usepackage[T1]{fontenc}
       ______________________________________________________________________



  Nill otsikoilla pitisi suomalaisen tavutuksen ja kirjainten toimia
  oikein, mikli TeX-jakelu on asennettu ja konfiguroitu oikein. Tss
  ei neuvota LaTeX-dokumenttien tekemist tarkemmin. Jukka Korpelan
  TKK:lle tekemst Tex-ohjeesta [``texref''] voi olla apua.


  8.  Posti, nyyssit ja 8-bittiset merkit

  8.1.  Perusratkaisu: 8-bittiset merkit viesteihin

  Posti- ja nyyssiviesteiss (USENET news ja vastaavat paikalliset
  jrjestelmt) on jrkevint lhett 8-bittisi ISO Latin1-skandeja
  silloin kun kirjoitetaan suomeksi tai ruotsiksi.

  Postiohjelmat kuten elm ja pine nyttvt Latin1-merkit oikein, kun ne
  on konfiguroitu sovellusten kohdalla kuvatulla tavalla (ks. kohdat
  ``elm'' ja ``pine'').  Jljell on kuitenkin viel yksi ongelma: miten
  saada postissa mit kummallisimmissa muodoissa tulevat viestit
  ISO-8859-1:n mukaisiksi?

  8-bittiset ISO Latin1-merkit kirjoitetaan viestiin sellaisenaan ja
  viestin otsikossa ilmoitetaan, ett sislt on 8-bittist teksti.
  Tm tapahtuu liittmll lhteviin viesteihin seuraavat MIME-
  standardin [``RFC1521''] mukaiset otsikot. Tm edellytt, ett
  kaikki viesti vlittvt koneet kykenevt ksittelemn 8-bittist
  tietoa viestin rungossa.  Suomi on jo jokseenkin lpeens 8-bittinen,
  mutta erityisesti USA:sta lytyy viel runsaasti 7-bittisi
  postijrjestelmi, jotka ovat postistandardin RFC822 mukaisia
  [``RFC822'']. Niden kanssa on yleens tyydyttv kyttmn QP-
  koodausta (ks. ``MIME Quoted Printable-koodaus'').  Tavallisesti
  seuraavat otsikot ja 8-bittiset merkit kuitenkin riittvt:



       ______________________________________________________________________
       Mime-Version: 1.0
       Content-Type: text/plain; charset=ISO-8859-1
       Content-Transfer-Encoding: 8bit
       ______________________________________________________________________



  Esim. elm-ohjelmassa nm otsikot laitetaan tiedostoon
  $HOME/.elm/elmheaders. emacs-pohjaisilla posti- ja nyyssisovelluksilla
  asetus tapahtuu helpoiten laittamalla seuraavat rivit  .emacs-
  tiedostoon:



       ______________________________________________________________________
       (setq mail-default-headers "Mime-Version: 1.0\n\
         Content-Type: text/plain; charset=ISO-8859-1\n\
         Content-Transfer-Encoding: 8bit\n")
       ______________________________________________________________________



  8.2.  MIME Quoted Printable-koodaus

  Yleisin ongelma viestien vastaanotossa ovat MIME Quoted Printable
  -koodatut merkit [``RFC1521''].  Nit kutsutaan usein sattuvasti mys
  nimell Quoted Unreadable.

  QP-koodattuja viestej ei kannata lhett, jos 8-bittisten merkkien
  lhettminen sellaisenaan vain on mahdollista, koska varsin monet
  lukijat n=E4kev=E4t QP-viestit t=E4m=E4n n=E4k=F6isin=E4. QP-koodatut
  - samoin kuin kokonaan binridataa sisltvt Base64-koodatut viestit
  - saa purettua lukukelpoisiksi metamail-ohjelmalla [``metamail''].
  metamail tulee valmiina ainakin RedHat 2.1-jakelun mukana.

  elm (ainakin versio 2.4 PL24) osaa kytt metamailia suoraan, mikli
  metamail on polun varrella eli ajettavissa.  emacs-pohjaiset posti- ja
  nyyssisovellukset saattavat tarvita tiedon metamailin sijainnista
  .emacs-tiedostossa esim. nin:



  ______________________________________________________________________
  (setq metamail-program-name "/usr/local/bin/metamail")
  ______________________________________________________________________



  9.  Aiheeseen liittyv materiaalia

  Seuraavat dokumentit voivat olla hydyllist luettavaa niden
  ongelmien kanssa painiessasi:


  1.  [skandit]

     Suomalaiset merkit tietokoneissa, Timo Kiravuo:

     <http://www.nixu.fi/~kiravuo/skandit.html>

  2.  [ISO-latin1]

     ISO-Latin-1-merkistst, Jukka Korpela:

     <http://www.hut.fi/~jkorpela/ISO.html>

  3.  [texref]

     TeX-ladontaohjelma, Jukka Korpela:

     <http://www.hut.fi/~jkorpela/softa/tex.html>

  4.  [danish]

     Danish-HOWTO, Thomas Petersen:

     <http://www.funet.fi/pub/Linux/doc/HOWTO/Danish-HOWTO>

  5.  [german]

     German-HOWTO, Thomas Ploss:

     <http://www.funet.fi/pub/Linux/doc/HOWTO/German-HOWTO>

  6.  [RFC822]

     Format of Internet Text Messages, David Crocker:

     <http://www.funet.fi/pub/doc/rfc/rfc822.txt>

  7.  [RFC1521]

     MIME, Part One: Format of Internet Message Bodies, N. Borenstein &
     N. Freed:

     <http://www.funet.fi/pub/doc/rfc/rfc1521.txt>

  8.  [RFC1522]

     MIME, Part Two: Message Header Extensions, K. Moore:

     <http://www.funet.fi/pub/doc/rfc/rfc1522.txt>



  9.  [metamail]

     Metamail-ohjelma:

     <ftp://ftp.funet.fi/pub/unix/mail/metamail/mm2.7.tar.Z>

  10.

     [linuxdoc]

     Linuxdoc-SGML, Matthew D. Welsh:

     <ftp://ftp.funet.fi:pub/mirrors/sunsite.unc.edu/pub/Linux/utils/text/linuxdoc-
     sgml-1.4.tar.gz>

  11.

     [unixhelp]

     UNIXHelp for Users, University of Edinburgh:

     <http://unixhelp.ed.ac.uk/>

  12.

     [faqs]

     FAQ Collection, Thomas Fine:

     <http://www.cis.ohio-state.edu/hypertext/faq/usenet/FAQ-List.html>



F FINNISH-.;1                       	Finnish-HOWTO
  Le Francophones-HOWTO : Linux & la langue franaise
  crit par Guylhem Aznar, <guylhem()oeil.qc.ca>
  v3.2 ; Dcembre 1999

  Copyright  1997, 1998, 1999, Guylhem Aznar ; librement distribuable
  selon les termes du LDP.  Toutes les marques cites appartiennent 
  leurs propritaires respectifs.
  ______________________________________________________________________

  Table of Contents



  1. Prsentation

     1.1 Introduction
     1.2 Fichiers utiliss dans ce HOWTO
     1.3 Les Franais ne sont pas les seuls francophones !
        1.3.1 a) Diffrentes versions
        1.3.2 b) Les tats-uniens : raccourcis claviers
        1.3.3 c) Le Luxembourg : comme la France
        1.3.4 d) Le Canada : 3 claviers
     1.4 Attention
        1.4.1 a) ROOT
        1.4.2 b) CHERCHER

  2. Les problmes

     2.1 Prsentation
     2.2 Solutions
     2.3 Aider

  3. Le vocabulaire : petit lexique

     3.1 8 bits
     3.2 La police de caractres
     3.3 Les polices de caractres
     3.4 Table de clavier
     3.5  Home ,  End ,  Page_Up  et  Page_Down 
     3.6 Touches mortes
     3.7  BackSpace  et  Delete 
     3.8  UTC  et  GMT 

  4. Rglage du clavier sous Linux

     4.1 Introduction
     4.2 Attention au stty !
     4.3 Faire de ces modifications les dfauts au dmarrage
     4.4 Polices de caractre
     4.5 Vieilles versions
     4.6 Amliorations spcifiques au clavier franais latin9
        4.6.1 a) carr/cube
        4.6.2 b) dollar / livre / symbole montaire international
     4.7 Pour les autres claviers latin9
     4.8 Dans tous les cas

  5. XFree

     5.1 Introduction
     5.2 Mal programmer
     5.3 Le clavier en pratique
        5.3.1 a) Solution utilisant xmodmap
        5.3.2 b) Solution utilisant xkb (recommande)
        5.3.3 c) Solution du compose
        5.3.4 d) Solution modifiant la libX11
        5.3.5 e) Est-ce ncessaire ?
     5.4  latin9  ou  latin1  ?
     5.5 Table de correspondances
     5.6 Les polices ISO 8859-15 latin 9 sous X

  6. Rglage du clavier pour les applications en mode texte

     6.1 Tout d'abord
     6.2 Une police, des polices...
        6.2.1 a) Historique des polices
        6.2.2 b) ISO 8859-15 latin 9
        6.2.3 c) Utiliser les polices ISO 8859-15 latin 9
        6.2.4 d) Unicode
        6.2.5 e) Utiliser les possibilits Unicode
     6.3 Les locales, messages en Franais
     6.4 Son linux en franais
     6.5 Les variables
     6.6 Les caractres 8 bits dans les programmes utilisant readline tels bash ou ncftp...
     6.7 zsh
     6.8 tcsh
     6.9 Pour tous les shells
     6.10 L'heure
     6.11 vi
     6.12 Emacs
     6.13 less
     6.14 ls
     6.15 flex
     6.16 elm
     6.17 col
     6.18 rlogin
     6.19 joe
     6.20 TeX et LaTeX
     6.21 Manuel
     6.22 Correcteur orthographique ispell
     6.23 Les claviers 105 touches
     6.24 PGP
     6.25 Impression en mode ascii
     6.26 Unicode/latin/cp... je n'ai pas compris ce dernier paragraphe !
     6.27 ncurses
        6.27.1 Introduction
        6.27.2 Les accents
     6.28 Perl
     6.29 Installer les locales
        6.29.1 Midnight Commander (mc)
     6.30 Kernel
     6.31 Lilo
     6.32 Groff (man)
     6.33 Divers

  7. Rglage du clavier pour les applications X

     7.1 Les xterminaux (xterm, nxterm, rxvt...)
     7.2 Les applications Motif
     7.3 Le manuel
     7.4 NumLock
     7.5 XDM

  8. Remerciements



  ______________________________________________________________________

  1.  Prsentation



  1.1.  Introduction


  Ce document a t rdig pour aider  configurer un ordinateur dot du
  systme d'exploitation Linux pour des utilisateurs francophones.

  Il y est expliqu par exemple comment configurer priphriques et
  applications afin de prendre en compte les particularits et les
  spcificits de notre langue...

  Toutefois, ce document ne traite pas de l'installation du systme
  d'exploitation Linux ; il est implicitement suppos que vous ayez
  correctement install une distribution de Linux, RedHat, Debian ou
  Suse, cette liste n'tant pas exhaustive, et que vous vous apprtiez
  maintenant  mieux la configurer ; veuillez donc vous rfrer 
  d'autres HOWTOs pour l'installation.

  Les adresses lectroniques ont t volontairement supprimes ou
  modifies en remplaant les  a enrouls  par des  ()  afin
  d'viter les publipostages trs gnants.

  Si quelque terme employ vous semble un peu obscur, je vous invite 
  vous reporter au lexique ( Vocabulaire : un petit lexique ),
  expliquant certains mots tels 8 bits, AZERTY ou QWERTY, qui sont
  employs tout au long de ce document.


  1.2.  Fichiers utiliss dans ce HOWTO


  Tous les fichiers cits dans ce HOWTO, sont disponibles sous licence
  GPL sur ma page

  Je vous recommande de tlcharger tous ces fichiers pour les utiliser
  selon les exemples proposs.


  1.3.  Les Franais ne sont pas les seuls francophones !



  1.3.1.  a) Diffrentes versions


  Pour chaque manipulation dpendant du pays concern, un certain nombre
  de versions peuvent tre proposes :


    une canadienne normalise (cn)

    une belge wallonne (be)

    une franaise (fr)

    une qubcoise (qc)

    une suisse romande (sf)

    une tats-unienne internationale (usx)


  1.3.2.  b) Les tats-uniens : raccourcis claviers


  La version tats-unienne internationale permet  tous les francophones
  utilisant un clavier  7 bits  aussi nomm  QWERTY  de bnficier
  de l'tendue des caractres 8 bits.

  Est disponible aussi une version pour ceux qui utilisent un clavier 
  Happy Hacking .


  1.3.3.  c) Le Luxembourg : comme la France


  Le Grand Duch du Luxembourg utilisant les conventions franaises,
  j'invite les lecteurs luxembourgeois  se reporter aux exemples
  franais.

  1.3.4.  d) Le Canada : 3 claviers


  Il est classique de parler des claviers  canadien international ,
  surtout destins aux anglophones (qui leur prfrent toutefois les
  claviers QWERTY standard) et les claviers  canadien franais , aux
  lettres accentues.

  Mais, de nouveaux claviers dits  canadiens normaliss  ont fait leur
  apparition rcemment pour fusionner les modles  canadien
  international , non concern par le cadre du Francophones HOWTO, et 
  canadien franais .

  Ces nouveaux claviers rpondent aux normes CAN/CSA Z243.200-92 et ISO
  9995-7 ; ils sont prvus pour tre utiliss dans n'importe quelle
  langue, en remplaant par exemple les intituls des touches par des
  pictogrammes :  Del , en anglais, qui se traduisait par  Suppr  en
  franais devient ainsi trois barres obliques fines orientes sud-
  ouest/nord-est.

  Plus d'explications sont disponibles sur le site de l'Office de la
  Langue Franaise.

  Toutefois je n'ai pas pu russir  me procurer un tel clavier ; mes
  fichiers de configuration sont donc uniquement bass sur les
  (illustrations) et les normes thoriques, et non les normes pratiques.

  Par exemple, si j'ai compris que la touche  Control  de droite est
  utilise comme une  AltGr  mais sert  obtenir encore d'autres
  caractres, je n'ai aucune ide du comportement de ces touches lorsque
  seule l'autre a une srigraphie prvue...

  Si on peut m'envoyer un tel clavier, et surtout son pilote, je promets
  de mettre les fichiers de configuration  jour :-)


  1.4.  Attention



  1.4.1.  a) ROOT


  Certaines manipulations recommandes par ce document ne peuvent tre
  effectues que sous le compte privilgi  root  ; la plus grande
  prudence est alors de rigueur car toute action inadquate peut mettre
  en pril le contenu des disques.

  Sauvegarder les fichiers existants, par exemple en les copiant sous le
  mme nom suivi du prfixe .old, avant de les modifier ou remplacer.


  1.4.2.  b) CHERCHER


  Le paquetage GNU nomm "find" offre un programme appel locate, grce
  auquel l'utilisateur peut retrouver le nom complet, chemin de
  rpertoires, d'un fichier dont il ne connat que le nom.

  Certaines distributions Linux fournissent cela en /usr/bin/locate.

  En tant que root, lancer updatedb invoque un find / sur les disques
  monts et place les noms de tous les fichiers sous forme hash dans
  /usr/lib/locate/find.codes (ou /var/lib/slocate/slocate.db pour
  slocate, utilis dans les distributions modernes.)

  locate permet ensuite de localiser l'un d'eux :



               (guylhem@victis:guylhem)$ locate noms_des_fichiers__retrouver



  2.  Les problmes



  2.1.  Prsentation


  Le problme de tout utilisateur francophone aprs l'installation de
  Linux est de lui faire comprendre qu'il utilise des normes diffrentes
  des standards par dfaut tats-uniens..

  Cela a des consquences sur :


    la police de caractres donc les caractres spciaux que l'on
     utilise, accentus comme     ou bien ligaturs comme  , voire
      e dans l'o  qui vient d'apparatre sous Linux grce  la norme
     ISO-8859-15 aussi nomme latin-9

    la correspondance entre la srigraphie des cabochons ou  touches 
     du clavier sur lesquelles vous appuyez, et les codes que Linux
     renvoie, celui-ci supposant un clavier QWERTY tats-unien par
     dfaut

    le format de page pris en charge par les programmes que vous
     utilisez pour imprimer, diffrent entre les tats-Unis; (148,5
     pouces pour du papier dit lgal) et l'Europe (29,721 cm pour des
     feuilles a4)

    le format des dates et de l'heure, la position des jours et des
     mois tant variable selon les rgions de la francophonie

    le format de la monnaie, aussi variable selon les francophones

    la langue utilise pour les messages d'erreur


  2.2.  Solutions


  Tout est prconfigur pour un tats-unien : bien que ceux-ci ne
  reprsentent pas la majorit de la population mondiale, ils ont t
  prcurseurs en informatique.

  Il faut donc se faire reconnatre comme une  exception  par les
  diffrents programmes, par des options ou des variables  exporter
  voire dans les pires des cas une modification du code source suivie
  d'une recompilation.

  Heureusement, la philosophie GNU de Linux rend le systme trs ouvert
   des modifications de toutes sortes et comme vous allez le dcouvrir
  au fil de ce document, et il est assez simple d'obtenir un rsultat
  trs correct.



  2.3.  Aider


  Pour le moment, le futur de l'internationalisation de Linux porte sur
  la traduction des messages d'erreur, des programmes comme KDE ou
  GNOME, des pages de manuel et de la documentation, alors si vous vous
  sentez l'me d'un traducteur, n'hsitez pas  contacter l'quipe de
  traduction des HOWTOs ; pour cela, adressez-vous  ric Dumas
  <dumas()freenix.fr> ou <dumas()linux.eu.org>.


  3.  Le vocabulaire : petit lexique


  Tout d'abord, un mot sur le vocabulaire employ :


  3.1.  8 bits


  Des caractres sont dits  8 bits  s'ils correspondent  des accents
  ou  des signes spciaux comme   , non inclus dans le standard
  ASCII  7 bits .

  Ce standard, sans accents ni caractres spciaux, correspond aux 128
  (2^7) premiers caractres des 256 (2^8), de 0  255.

  Pour des raisons historiques (place disponible, inutilit pour les
  tats uniens) seuls les 128 (2^7) premiers caractres ont t
  normaliss par l'ASCII : par exemple le A qui est le 65e caractre de
  la table ASCII s'crit 0100 0001 en notation binaire.

  Pour les caractres situs hors de la norme ASCII, diffrentes 
  normes  ou  standards  incompatibles, comme l'Unicode, l'iso-8859,
  le latin, le cp (...) fixent ces correspondances.

  Par exemple, dans le standard ASCII tendu par l'iso-8859-1, le 224me
  caractre quivalent not  eb  en hexadcimal correspond    .


  3.2.  La police de caractres


  Une police de caractres est une correspondance entre des codes
  informatiques et des caractres (alphanumriques...) affichables par
  l'ordinateur.

  La police de caractres est l'ensemble des reprsentations graphiques
  des caractres d'un standard.


  3.3.  Les polices de caractres


  Il existe plusieurs polices de caractres 8 bits pouvant rpondre au
  besoins des francophones.

  Je vous recommande de lire  ce sujet l'excellent site de Roman
  Czyborra qui a fait une thse sur ce sujet et qui vous donnera une
  explication fort dtaille

  Pour rsumer, il est ncessaire de choisir une police de caractres
  pour que tous les caractres franais soient disponibles.

  Voici la liste des polices dites  ISO 8859 , mais attention, il
  existe leurs quivalents en  code page  pour windows (comme cp1252).
    ISO 8859-1 : latin 1 : langues d'Europe de l'ouest, Afrikaans,
     Swahili.

     Le Swahili, n'utilise aucun caractre accentu (comme l'Anglais, le
     Malais et l'Indonsien), donc n'importe quel version fait
     l'affaire.

     Pour l'Afrikaans, je ne sais plus exactement quel tait le choix
     initial (c'est--dire o avait t rang le 'n au dpart), mais il
     ne me semble pas que ce soit dans Latin 1.

     Dans la pratique, bien sr, les Afrikaaner utilisent Latin 1 ; la
     mme chose se passe pour un certain nombre des cas qui suivent.

    ISO 8859-2 : latin 2 : langues d'Europe centrale et orientale.

     Dans les faits : Polonais, Tchque, Slovaque, Slovne, Croate,
     Hongrois, Roumain, probablement aussi le Sorbe ou Sorabe (Wende en
     allemand).

     Officiellement, je crois que l'Albanais s'crit aussi en Latin-2,
     mais comme dans les faits c'est identique au Latin 1...  Il y a un
     problme pour le Roumain, car le Latin 2 contient formellement les
     caractres avec une cdille, quand en roumain on utilise une
     virgule souscrite.

    ISO 8859-3 : latin 3 : Espranto et Maltais.

     Initialement, c'tait prvu pour les langues d'Europe du Sud, y
     compris le Turc, les langues d'Espagne (donc Catalan, Basque), le
     Franais.

     Mais dans la pratique, c'est limit  ces deux langues.

    ISO 8859-4 : latin 4 : langues baltes (incomplet).

     Pas utilis dans la pratique, remplac par Latin 7 (iso-8859-13),
     ou plutt en pratique la codepage 1257 Windows.

     Pour l'Este ou Estonien, on peut aussi utiliser Latin 9.

    ISO 8859-9 : latin 5 (comme latin 1, moins l'Islandais, plus le
     Turc).

     Usage : le Turc et peut-tre l'Azri, mais il manque le schwa, un 
     e  renvers.

     Codage officiel aux Pays-Bas du fait des Turcs qui y habitent.

    ISO 8859-10 : latin 6 : langues nordiques, sauf le Lapon Skolt.

     Pas utilis dans la pratique : ne servirait que pour les langues
     sames (ou lapones), mais il manque des caractres, et le public
     concern est de toute manire assez limit.

    ISO 8859-11 : Thai.

     Pas encore officiellement adopt.

    ISO 8859-12 : Indien (n'existe pas encore).

     Prvu pour le devanagari, pour crire l'Hindi, la langue principale
     de l'Inde, et aussi un grand nombre d'autres langues indiennes,
     dont le Sanskrit.


    ISO 8859-13 : latin 7 : langues baltes.

     Plus exactement : couvre les langues du pourtour de la mer
     Baltique, donc aussi le Polonais, l'Allemand et les langues de
     scandinavie.

     Mais dans la pratique il est rduit en utilisation aux langues
     baltes et  l'Este ou Estonien.

    ISO 8859-14 : latin 8 : langues celtes.

     Pour le Breton, le Galique et les dialectes parles au Pays de
     Galles et en Irlande.

    ISO 8859-15 : latin 9 : comme latin 1, en y comblant quelques
     manques.

     Pour le Franais, le Finnois (en concurrence avec Latin 1) et
     l'Este ou Estonien (en concurrence avec Latin 7).

  De cette longue liste, il convient de ne retenir que :


    ISO 8859-1 latin 1 : police ouest-europenne utilise par la
     majorit des systmes UNIX, elle permet de disposer de tous les
     caractres Franais sauf les  o e lis , l'euro et l'y trma
     majuscule

    cp850 : quivalent sous DOS de cette police, mais incompatible : il
     faut utiliser un outil de traduction de fichiers tel GNU recode.

    ISO 8859-15 latin 9 : police de l'union europenne, il s'agit d'une
     version rvise de l'ISO 8859-1 latin 1 pour inclure tous les
     caractres des pays europens ; ainsi on y retrouve les caractres
     Franais manquant, l'euro, et des caractres finlandais manquants.

    latin 0 : l'ISO 8859-15 latin 9 est souvent incorrectement abrge
     en latin0, qui correspondait au nom du projet, de par son ambition
      remplacer le latin 1 un jour. Je vous renvoie au site de l'ISO et
      la documentation complte de ce standard

    cp1252 : quivalent sous Windows de cette police, aussi
     incompatible, qui apporte les mmes caractres manquants, du fait
     d'une rvision rcente de cette norme.

    ISO 8859-9 latin 5 : police officielle en Turquie et en Hollande,
     o les caractres Islandais peu utiliss ont t remplacs par les
     caractres turcs.

    cp1254 : quivalent sous Windows de cette police, aussi
     incompatible, qui apporte les caractres manquant au Franais
     prcdemment cits et remplace les caractres Islandais peu
     utiliss par les caractres turcs.

  Les choix de polices de caractres sont souvent des questions ou la
  raison se heurte aux habitudes.

  Pour ma part, si vous hsitez, je vous recommande l'ISO 8859-15 latin
  9, pour diverses raisons :


    Il supporte l'intgralit des caractres utiliss en Franais de
     manire standard sur les UNIX, pour les changes de fichiers entre
     Solaris et Linux par exemple


    Il s'agit de la police 8 bits choisie par l'union europenne si
     l'Unicode, volution du 8 bits, n'est pas disponible

    Il permet d'crire des textes avec l'intgralit des caractres
     utiliss dans l'union

    Il est en train de devenir le nouveau standard dans la messagerie
     lectronique au sens large, supplantant progressivement l'ISO
     8859-1 latin 1

  Le Francophones HOWTO utilise donc le latin 9 dans tous les exemples,
  car il y a de grandes chances que votre systme ne soit pas encore
  compatible latin 9... autant donc vous proposer des manipulations et
  des travaux pratiques utiles :-)

  Toutefois, si vous ne pouvez utiliser l'ISO 8859-15 latin 9 et dcidez
  d'en choisir une autre, je vous recommande d'viter les cp propres au
  monde DOS/Windows et de vous rabattre sur l'ISO 8859-1 latin 1 qui est
  encore un standard fort rpandu : dans chaque exemple je vous invite
  alors  remplacer les  latin9  par des  latin1 


  3.4.  Table de clavier


  Une table de clavier est un fichier permettant de faire correspondre
  l'empreinte physique des cabochons,  touches  du clavier, au
  rsultat obtenu sur l'cran de l'ordinateur.

  Pour linux, ces fichiers sont dans /usr/lib/kbd/keytables/ ou
  /usr/share/kbd/keytables/

  Par exemple, les claviers franais AZERTY ont une table de clavier
  diffrente des claviers suisse romands QWERTZ, ou des claviers du
  reste du monde, QWERTY.

  Cela ne concerne que l'apparence du clavier, l'empreinte des
  cabochons, donc disposition relative des caractres sur le clavier, et
  non son lectronique interne ; si votre clavier ne vous convient pas,
  il vous suffit donc d'utiliser des autocollants pour le transformer en
  un autre clavier francophone.


  3.5.   Home ,  End ,  Page_Up  et  Page_Down 


  Les touches  Home ,  End ,  Page_Up  et  Page_Down  dont les
  noms varient selon les claviers sont les touches permettant
  respectivement d'aller en dbut/fin de ligne et de monter/descendre
  d'une page.

  Les codes affectes  ces touches sont respectivement 102 et 107 pour 
  Home  et  End  en mode terminal.

  Dans les pictogrammes des claviers ISO 9995-7, ces touches sont
  reprsents par des flches aux traits appuys.

  Lorsqu'on presse une touche, le clavier met un code, qui est
  intercept par la table de clavier.

  La table de clavier, si elle reconnait le code, renvoie la chaine
  associe  la touche, en l'occurence "\e[4   pour  End .

  Lorsque bash ou un autre programme reoit cette chaine, il ne la
  connait pas !

  Donc il faut lui dire, dans le .inputrc que "\e[4 " signifie "aller 
  la fin de la ligne"

  Donc pour que ces touches fonctionnent dans le shell bash, on ajoutera
  donc dans le fichier .inputrc (dans votre  / ou dans /etc/inputrc) les
  lignes:



       set meta-flag on
       set convert-meta off
       set input-meta on
       set output-meta on
       set bell-style visible

       "\e[1~":beginning-of-line
       "\e[3~":delete-char
       "\e[4~":end-of-line
       "\e\C-h": backward-kill-word
       "\e\e[3~": kill-word



  Les premires lignes permettent d'afficher les caractres 8 bits, et
  de remplacer le  bip  en cas d'erreur par un clair blanc  l'cran.


  3.6.  Touches mortes


  Les touches mortes sont des touches qui ne produisent pas de
  caractres en elles-mmes, mais qui modifient la faon dont la frappe
  suivante va tre interprte, par exemple, le trma ou l'accent
  circonflexe sont en gnral des touches mortes.

  Une touche morte est une touche qui doit donc tre suivie d'un espace
  pour obtenir l'accent seul, ou dans le cas o elle est suivie d'une
  voyelle y positionne un accent, par exemple :



                ^  puis  e  donne   
                ^  puis  espace  donne  ^ 



  Les touches mortes sont :

    be et fr: l'accent aigu en AltGr de 1 pour les Franais et en AltGr
     de  pour les Belges, l'accent grave en AltGr de 7 pour les
     franais & en AltGr de carr/cube pour les Belges, le trma et
     l'accent circonflexe tous deux  ct du P

    sf et usx: les accent aigus, graves, circonflexes, les trmas et la
     tilde

    qc: les accent graves, circonflexes, les trmas et la cdille


  3.7.   BackSpace  et  Delete 


  En raison d'une erreur volontaire et historique sous Linux, pour 
  muler  le fonctionnement d'un clavier de console VT, ces 2 touches
  sont frquemments mlanges, au mieux fonctionnant  l'identique, au
  pire ne fonctionnant pas du tout.

  Commenons donc par bien les dfinir :


    BackSpace : touche place en haut  droite du pav principal, au
     dessus d'  Entre , au cabochon marqu d'une flche vers la
     gauche.

    Delete : touche du pav curseur au cabochon marqu  Suppr  ou 
     Del ,  gauche de  Fin  ; en ISO 9995-7 elle correspond  trois
     barres obliques fines orientes sud-ouest/nord-est.

  Le pav numrique offre une touche au marquage identique et  effet
  identique lorsque  Verr Num  ou  Num Lock  est dsactiv.

  Ces deux touches correspondent chacune  un de ces codes :


    BS : caractre ASCII 0x08, ou control-h.

    DEL : caractre ASCII 0x7F, ou control-?

    ^D : caractre ASCII 0x04, ou control-d.

  Ceci dans le but d'effacer  gauche du curseur avec BackSpace, 
  droite du curseur avec Delete.


  3.8.   UTC  et  GMT 


  Chaque partie du monde a sa propre norme horaire, base sur des
  fuseaux.

  La France se trouve en zone MET,  heure moyenne europenne  soit
  GMT+1 ; la zone  MET DST  correspond  l'heure d't active soit
  GMT+2.


    GMT est l'heure solaire moyenne de Greenwich. L'heure est compte 
     partir de midi et est donc dcale de 12 h  par rapport au temps
     universel. GMT est base sur la rotation de la terre, ce n'est donc
     pas un temps rgulier. En effet, la vitesse de rotation de la Terre
     subit des variations faibles mais assez chaotiques, en plus elle
     diminue sur le long terme.

    UTC,  temps universel coordonn , est compt  partir de minuit
     toujours par rapport au mridien zro. Il est bas sur des talons
     atomiques, mais des secondes intercalaires sont ajoutes
     occasionnellement pour faire en sorte qu'il ne s'carte jamais de
     plus de une seconde de l'heure solaire moyenne.  Le site de l'opdaf
     et le lexique donnent plus de renseignements.

  C'est le temps UTC, dfini  Paris, qui sert de rfrence aux
  diffrentes heures lgales.

  L'acronyme  GMT  est employ 99% du temps pour dsigner UTC, mais
  c'est une erreur ou un abus de langage.

  Enfin,  titre purement indicatif, il existe l'heure astronomique,
  aussi compte sur des talons atomiques mais dcale de 4 minutes par
  jour de l'heure terrestre car se basant sur la position de la terre
  dans l'espace par rapport aux toiles.

  4.  Rglage du clavier sous Linux



  4.1.  Introduction


  Il existe deux programmes pour configurer votre clavier : un pour la
  console : loadkeys et un pour XFree : xkbd.

  Pour installer un clavier franais sous Linux, tapez selon votre
  clavier une des lignes suivantes :



               loadkeys tables-clavier/fr/fr-latin9.map
               loadkeys tables-clavier/qc/qc-latin1.map
               loadkeys tables-clavier/cn/cn-latin1.map
               loadkeys tables-clavier/be/be-latin9.map
               loadkeys tables-clavier/sf/sf-latin1.map
               loadkeys tables-clavier/usx/usx-latin1.map
               loadkeys tables-clavier/usx/usx-happy-hacking-latin9.map



  4.2.  Attention au stty !


  Avec les tables latin 9 recommandes dans ce HOWTO, pour linux-console
  aussi bien que pour X window, N'UTILISEZ PLUS :



               stty erase ^H



  ou :



               stty erase ^?



   stty erase  ne sert en effet qu' tablir une correspondance entre
  le code que renvoie une touche et la fonction erase pour effacer le
  caractre.

  Les tables ici fournies fonctionnent correctement et ne ncessitent
  donc pas de stty erase qui risquerait surtout de perturber leur bon
  fonctionnement !

  Supprimez-donc ces lignes de vos fichiers d'initialisation de
  l'interprteur de commandes  shell , comme .bashrc, .bash_profile ou
  .tcshrc .


  4.3.  Faire de ces modifications les dfauts au dmarrage



  D'habitude, loadkeys est excut par des scripts au dmarrage ; par
  exemple dans /etc/rc.d/init.d/keytable ou /etc/rc.d/rc.local,
  init.d/keytable ou rc.keymap.

  La commande :



               find /etc/rc.d -type f | xargs grep loadkeys



  vous fournira le nom exact du fichier lanant loadkeys ; il vous
  suffit alors de l'diter pour que vos modifications soient dsormais
  prise en en compte  chaque dmarrage.

  Les distributions RedHat et Debian constituent des exceptions : la
  table de clavier par dfaut tant dfinie dans /etc/sysconfig/keyboard
  pour la RedHat et /etc/kbd/config pour les Debian.

  Remplacer donc dans le fichier propre  votre distribution la table de
  clavier en question par la bonne table comme fr-latin9.map (selon
  votre modle de clavier)

  Vous devrez mettre une copie de la table que vous utilisez dans le
  rpertoire o votre distribution va chercher les tables de clavier ;
  en gnral /usr/lib/kbd/keymaps/i386/azerty/ pour une RedHat et
  /usr/share/kbd/keymaps/i386/azerty/ pour une Debian.

  Allez donc sur tlechargez l'archive, enregistrez-la dans votre
  rpertoire  /, puis dtarrez-la avec la commande:



               tar -xzvf francophones-howto.tgz



  Cela cre un rpertoire  /french : placez-vous dans ce rpertoire puis
  tapez :



               cp tables-clavier/linux-console/fr-latin9.map /usr/lib/kbd/keytables/i386/azerty/



  Pour afficher les caractres latin9, vous devrez excuter les
  instructions de la section  polices de caractre .


  4.4.  Polices de caractre


  Si vous utilisez console-tools-1998.08.11.tar.gz, vous pourrez
  remplacer  setfont  par  consolechars  : ces programmes servent 
  charger une police sous linux console.



               setfont /usr/lib/kbd/consolefonts/xxxE-NN.psf.gz


  Je vous conseille pour des raisons dveloppes plus bas :



               setfont /usr/lib/kbd/consolefonts/lat9-16u.psf.gz



  Je ne vous conseille pas les fichiers  lat1 , qui ne supportent pas
  l'euro ni les autres caractres franais.

  Vous trouverez aussi des fichiers  .uni  qui ne sont utiles que pour
  crer des polices ou pour ceux qui utilisent l'unicode : ils fixent
  des correspondances entre les  dessins  des caractres dans la
  police et les codes des dits caractres, un mme dessin pouvant
  correspondre  plusieurs codes dans l'example de d'unicode.

  Pour les polices toutes faites, vous pouvez forcer cette correspondace
  avec l'option  -u fichier.uni .

  Si vous tenez  les installer, copiez de la mme manire tous les
  fichiers commenant par  lat9  et se terminant par  .uni  dans le
  rpertoire /usr/lib/kbd/consoletrans avec la commande:



           cp lat9*.uni /usr/lib/kbd/consoletrans



  D'habitude, setfont est excut par des scripts au dmarrage ; par
  exemple dans /etc/rc.d/init.d/keytable ou /etc/rc.d/rc.local,
  init.d/keytable ou rc.keymap.

  La commande :



               find /etc/rc.d -type f | xargs grep setfont



  vous fournira sur le nom exact du fichier lanant setfont ; il vous
  suffit alors de l'diter pour que vos modifications soient dsormais
  prise en en compte  chaque dmarrage...

  Les distributions RedHat et Debian constituent des exceptions : la
  police par dfaut tant dfinie dans /etc/sysconfig/i18n pour la
  RedHat et /etc/kbd/config pour les Debian.

  Dans /etc/sysconfig/i18n rajouter une ligne de la forme :



               SYSFONT=xxxE-NN.psf



    xxx reprsente le type de police ; il doit s'agir d'une lat pour
     les francophones ce qui signifie ISO 8859 ou latin.  Sans cela il
     n'y a plus de caractres  tendus  comme les voyelles accentus,
     symboles de ponctuation comme paragraphe...

    E reprsente l'encodage latin, par exemple 1 pour latin1, 0 ou 9
     pour latin9

    NNN reprsente la taille individuelle de chaque caractre ; 08 est
     presque illisible mais 16 est un peu gros...  rgler selon les
     gots de chacun.

  Je vous conseille la police lat9-16u.psf ou son quivalent lat0-16.psf
  installe par dfaut sur la plupart des distributions, trs souvent
  compresse donc avec le suffixe  .gz  .

  [ rajouter une explication sur comment installer la police ]

  La section  une police, des polices  vous donnera plus de dtails
  sur les polices disponibles.


  4.5.  Vieilles versions


  Si lors du chargement de la table de clavier vous rencontrez un
  message d'erreur similaire au suivant :



               (guylhem@victis:guylhem)$ loadkeys fr-latin9.map
               Loading /usr/lib/kbd/keytables/fr-latin9.map
               unknown keysym 'dead_cedilla'
               /usr/lib/kbd/keytables/fr-latin9.map:67: parse error
               syntax error in map file
               key bindings not changed



  Cela signifie que votre version de kbd dont le programme loadkeys
  dpend est trop vieille : il faut vous procurer une version plus
  rcente du programme.

  Il existait et existe encore des versions des tables de clavier pour
  ceux ne voulant ni touches mortes ni accents, mais celles-ci tombent
  actuellement en dsutude puisque la grande majorit des programmes
  prennent dsormais en charge ces fameuses touches mortes et les
  caractres accentus.

  De plus, les tables fournies avec ce HOWTO permettent de se servir des
  touches mortes ou de s'en passer si un programme les refuse, les deux
  cas ayant t prvus :


  4.6.  Amliorations spcifiques au clavier franais latin9


  a y est, vous pouvez taper du texte latin 9 sous Linux en mode
  console !

  Seules 2 touches ont t modifies :


  4.6.1.  a) carr/cube

  Elle sert maintenant  oe/OE lis ; en AltGr on y trouve les
  guillemets franais.

  Le carr & le cube restent respectivement accessibles en AltGr () et
  Alt Gr(*), les guillemets tant aussi directement accessibles avec
  AltGr (w) et AltGr (x), selon la norme ISO 9995 part 3 applique  la
  norme AZERTY franaise.

  En rsum :

    AltGr (oe) : 

    AltGr + Shift (oe) : 

    AltGr (w) : 

    AltGr (x) : 

    AltGr (m) : 

    AltGr () : 

    AltGr (*) : 


  4.6.2.  b) dollar / livre / symbole montaire international


  tant donn que le symbole montaire international n'est plus
  disponible dans la norme d'encodage ISO 8859-15, il a t remplac par
  la division centsimale de l'euro : le cent, disponible donc en AltGr
  ($).

  Dans les prcdentes versions, le dollar & la livre, des monnaies
  trangres, avaient t dplacs pour laisser la place  l'euro et au
  cent, notre monnaie.

  De telles modifications taient permises par les recommandations
  officielles de l'EURO WORKSHOP mais allaient  l'encontre de la norme
  AZERTY : si la position AltGr (e) est dj occupe sur un clavier, la
  position de l'euro est laisse au libre choix des programmeurs.

  AltGr (e) sert  faire    depuis 1992 sous Linux, mais devant les
  protestations lgitimes d'utilisateurs disposant d'un clavier o
  l'euro est srigraphi en AltGr (e), j'ai du dplacer le  en AltGr +
  Shift ($).

  Dsol d'avoir rompu la  tradition  linuxienne pour conserver la
  compatibilit  la norme AZERTY & aux recommandations officielles de
  l'EURO WORKSHOP !

  En rsum :


    AltGr (e) : euro

    AltGr ($) : cent

    AltGr + Shift ($) : 


  4.7.  Pour les autres claviers latin9


  L'euro & les cents ont t rajouts respectivement en AltGr (e) & en
  AltGr (c).

  La touche AltGr a donc t rajoute ; pour utiliser ces fonctions avec
  toute table de clavier, il suffit de charger other-latin9.map aprs
  votre table nationale.

  La plupart des amliorations du clavier franais ont t transposes
  aux claviers nationaux par des auteurs externes.

  Toutefois, je ne possde pas chaque modle de clavier et ne peut
  expliquer en dtail toutes ces modifications ; des sections
  spcifiques seront donc rajoutes par la suite par d'autres auteurs.


  4.8.  Dans tous les cas


   Home ,  End ,  Delete  et  BackSpace  ont t corriges & les
  touches  Windows  ont t correctement dfinies, pour passer d'une
  console virtuelle  l'autre.

  Des  Composes , squences  prfixer par la touche compose ( 
  Imprcran  ou  Print Screen  par dfaut) ont t rajoutes, mais
  cela reste transparent pour l'utilisateur.

  Par exemple:

    COMPOSE ^ suivi d'une des lettres (s,S,z,Z) sert  obtenir les
     lettres finlandaises rajoutes

    COMPOSE " suivi d'une des lettres (y,Y) sert  obtenir les y trmas
     franco-nerlandais rajouts

    COMPOSE - suivi d'une des lettres (e,c,l,y) sert  obtenir l'euro,
     le cent, la livre, le yen


  5.  XFree



  5.1.  Introduction


  Il y a quelques annes,  xmodmap  servait  changer les tables de
  clavier sous XFree, un fichier de configuration d'ordinaire nomm
  /usr/X11/lib/X11/xinit/.Xmodmap tant pris en charge grce  votre
  .xinitrc ou /etc/X11/xinit/xinitrc

  Pour convertir une table console correcte, on utilisait  mk_modmap 
  livr avec l'archive kbd et gnralement install en
  /usr/lib/kbd/keytables

  Les utilisateurs dsirant personnaliser leur table xmodmap employaient
  le programme  xkeycaps .

  Puis XFree 2.1 et les version ultrieures ont reconnu la disposition
  des touches du clavier gre par  loadkeys , rendant thoriquement
  xmodmap inutile.

  Mais la gestion de la touche  COMPOSE  assure par XFree 3.1
  laissait un peu  dsirer, la table hrite de  loadkeys  ne servant
  gure.

  Il fallait donc continuer  employer xmodmap, l'utilitaire logiciel
  standard permettant d'obliger le serveur X  associer les vnements
  souris/clavier  des caractres.

  Sous XFree version 3.2 et postrieures,  xkb  rendit xmodmap
  dfinitivement obsolte.
  Mais ne voil-t-il pas les rumeurs qui voulaient que les prochaines
  versions de XFree ne supporte plus les touches mortes se sont
  confirmes !!!

  Dans la distribution X11 du X Consortium, donc XFree86, qui en est
  directement issu, il n'existe plus de mcanisme gnral de gestion des
  touches mortes, ou des solutions approximatives obligeant  supprimer
  aussi xkb ou modifier des bibliothques de programmes !


  5.2.  Mal programmer


   chaque programme de bien grer les touches mortes au lieu de faire
  confiance  X pour cette tche.

  En ralit, il n'est pas compliqu de grer des touches mortes, il
  suffit d'utiliser la bonne fonction, XmbLookupString() dans les
  programmes Motif, au lieu de XLookupString().


  5.3.  Le clavier en pratique


  Quelle histoire complique !

  De ce fait, elles ne fonctionnent que pour les clients X 
  internationaliss , c'est--dire qui grent eux-mmes les problmes
  lis aux mthodes d'entre de donnes des diffrentes langues
  nationales.

  Ceci est trs gnant lorsqu'on veut pouvoir saisir du texte comportant
  des lettres accentues, alors que le client utilis n'est pas
  internationalis !


  5.3.1.  a) Solution utilisant xmodmap


  Taper :



               cp fr-latin9.xmod /usr/X11R6/lib/X11/xinit/Xmodmap
               cp fr-latin9.xmod ~/.Xmodmap



  5.3.2.  b) Solution utilisant xkb (recommande)


  Taper :



               cp fr-latin9 /usr/X11R6/lib/X11/xkb/symbols



  Puis diter votre XF86Config pour y rajouter dans la section 
  Keyboard  les lignes xkb idoines :


       Section "Keyboard"
       Protocol        "Standard"
       AutoRepeat      500 30
       LeftAlt         Meta
       RightAlt        ModeShift               # Important pour Alt-gr, mais dans les
                                               # versions rcentes de XFree, AltGr et
                                               # RightAlt sont synonymes.

       ScrollLock      Compose                 # Pour faire des caractres spciaux.
                                               # Utiliser sinon une des 3 touches des
                                               # nouveaux claviers 105 touches...

       RightCtl        Control                 # Garder la touche normale

       XkbKeycodes     "xfree86"
       XkbRules        "xfree86"
       XkbTypes        "default"
       XkbCompat       "default"
       XkbSymbols      "fr-latin9(pc105)"
       XkbGeometry     "pc(pc105)"
       XkbModel        "pc105"

       EndSection



  Pour cette partie Xkb, certains prfrent :


               XkbKeymap       "xfree86(fr-latin9)"
               XkbKeycodes     "xfree86"
               XkbSymbols      "en_US(pc101)+fr-latin9"
               XkbGeometry     "pc(pc101)"



  Bien sur, remplacer  fr  par  cn ,  be ,  ch  ou  usx  selon
  votre clavier...


  5.3.3.  c) Solution du compose


  Une autre mthode pour obtenir des caractres 8 bits :

  Dans /usr/X11R6/lib/X11/locale/iso8859-1/Compose se trouve une table
  de  correspondance  entre deux caractres et un rsultat ; les deux
  caractres sont mlangs lors de l'appui sur la touche Compose : par
  exemple;


               COMPOSE suivi de  e  puis  ^ 



  a toutes les chances de vous donner , y compris dans l'ordre oppos
  ( ^  puis  e )

  Mais pour utiliser la touche Compose, vous devez l'affecter  une
  touche !

  Le paramtrage prconis, rgl dans XF86Config, la fait correspondre
   la touche  Arrt Dfil  inutile sous X, par la commande :
               ScrollLock       Compose



  dans la section Keyboard.

  Attention, sous Linux en mode console, cette touche est utile (pour
  bloquer temporairement la console virtuelle) et c'est  Impr cran 
  ou  Print Screen  qui, ne servant  rien, est affecte   Compose
  .


  5.3.4.  d) Solution modifiant la libX11


  Thomas Quinot <Thomas.Quinot()cuivre.fdn.fr> vous propose donc sa
  libX11 modifie, qui gre les touches mortes de manire transparente
  pour tous les clients.

  Elle permet galement de traiter les squences composes inconnues
  comme des paires de caractres, par exemple :



               ~ + / = ~/



  Pour l'utiliser :

    Rcuprez libX11-XF3.3.1.tar.gz ;

    Extrayez le fichier libX11.so.6.1 ;

    Placez-le dans /usr/X11R6/lib/ ;

    Excutez ldconfig ;

    Dsactivez l'extension XKB en utilisant l'option XkbDisable dans la
     section Keyboard de votre XF86Config.


  5.3.5.  e) Est-ce ncessaire ?


  Personnellement, je vous recommande de ne pas toucher  la libX11,
  d'oublier xmodmap et de l'alternative xkb + fichiers latin9 en
  attendant un autre changement de la politique du X Consortium envers
  les touches mortes (ou en rajoutant les options d'internationalisation
  au code source de vos programmes.)

  Actuellement, si vous n'avez pas de rpertoire
  /usr/X11R6/lib/X11/xkb/symbols/ cela signifie que vous n'utilisez pas
  xkb : procurez-vous donc une version plus rcente de X window !

  Sans xkb, XFree se rabattra par dfaut sur votre configuration de
  clavier pour Linux avec loadkeys.

  Toutefois, la translation n'est pas parfaite et je vous recommanderais
  plutt d'viter cette option, aussi bien que l'ancien gestionnaire de
  clavier Xmodmap.

  Il se peut aussi que sans aucune commande pour xkb, XFree vous
  considre comme utilisateur d'un clavier 7 bits !
  Il convient donc d'utiliser une table adapte avec xkb.


  5.4.   latin9  ou  latin1  ?


  Je vous conseille de choisir les tables latin9 que je maintiens 
  jour, plus rcentes que les versions latin1, permettant d'utiliser de
  multiples amliorations, dtailles dans la section clavier sous
  linux-console, pour disposer du plus de confort possible et plus
  adaptes car maintenu par des francophones.

  Les nombreuses amliorations dont elles bnficient permettent de
  pallier au dficiences de nombreux programmes.

  Par exemple, certains programmes en Motif comme Netscape (tm) ne
  savent pas encore grer les touches mortes ... donc impossible de
  taper par exemple des  ou des  sur les claviers des Belges et
  Franais, puisque la touche morte  accent circonflexe  est le seul
  moyen d'obtenir ces caractres !

   fr-latin9  rpond  ce problme en proposant une solution de
  remplacement : AltGr (voyelle) permet d'obtenir la voyelle avec un
  accent grave, AltGr+Shift (voyelle) permet d'obtenir la voyelle avec
  un trma !


  5.5.  Table de correspondances



    AltGr (voyelle) : voyelle accent grave

    AltGr + Shift (voyelle) : voyelle trma

    AltGr (touche au dessous de la voyelle) : voyelle majuscule accent
     grave

    AltGr + Shift (touche au dessous de la voyelle) : voyelle majuscule
     trma

    AltGr + Shift (minuscule accentue) : majuscule accentue

  Par exemple :


    AltGr (a) : 

    AltGr (q) : 

    AltGr + Shift () : 

  L'astuce marche aussi pour le c cdille :


    AltGr + Shift () : 

  Donc mme dans les pires conditions, si aucune touche morte ne
  fonctionne, on peut quand mme accder  toutes les voyelles
  accentues, majuscules et minuscules !

  Vous y trouverez en plus les guillemets franais ( ), les symboles
  employs en physique (, , delta, phi ...), des signes de monnaies
  (yen, cent) ou de copyright (tm, ) ainsi que des lettres d'autres
  langues (,  ...).

  Tous ces signes s'obtiennent grce  AltGr (lettre), par exemple AltGr
  (b) donne , AltGr (r) donne tm, AltGr (y) donne yen...

  Pour vous rapeller simplement de tout cel, tapez par exemple :



               more /usr/lib/kbd/keytables/i386/azerty/fr-latin9.map



  Pour ce qui est du choix entre latin1 et latin9...  vous de voir !

  Un conseil : essayez l'un puis l'autre si vous avez le temps.


  5.6.  Les polices ISO 8859-15 latin 9 sous X


  Il est bien d'avoir une table de clavier compatible latin 9, mais sans
  police adapte jamais vous ne verrez les caractres rajouts dans
  cette norme.

  Il faut donc utiliser l'utilitaire de conversion  bdftopcf  qui en
  quelque sorte permet de compiler les polices de caractres fournies.

  Placez-vous dans le rpertoire de l'archive que vous avez rcupr
  puis sous root, taper par exemple pour Xlat9-10x20.bdf ou un autre bdf
  :



               bdftopcf Xlat9-10x20.bdf > Xlat9-10x20-lat9.pcf
               gzip Xlat9-10x20-lat9.pcf
               mv Xlat9-10x20-lat9.pcf.gz /usr/X11R6/lib/X11/fonts/misc
               mkfontdir /usr/X11R6/lib/X11/fonts/misc



  Cel cre un fichier  Xlat9-10x20-lat9.pcf  qu'il faut compresser
  avec gzip, on obtient alors le fichier  Xlat9-10x20-lat9.pcf.gz  qui
  doit tre mis dans le rpertoire adquat, pour lequel l'index des
  polices de caractres sera mis  jour.

  Alors, ajoutez la table de composition latin9 aux compositions par
  dfaut de X, spcifiques  l'iso 8859-1 :



               cat XCompose-lat9 >> /usr/X11R6/lib/X11/locale/iso8859-1/Compose



  Nous faisons un cat vers l'ISO 8859-1, car X ne reconnat pas l'ISO
  8859-15 latin9.

  De l, redmarrer X ou taper sous son compte d'utilisateur normal :



               xset +fp /usr/X11R6/lib/X11/fonts/misc


  Si vous utilisez xmodmap, lancez :



               xmodmap ~/.Xmodmap



  Pour choisir les polices latin9, lancer xfontsel et chercher les
  encodages iso8859-15.

  Ou plus simplement, taper :



               grep Xlat9-10x20.pcf /usr/X11R6/lib/X11/fonts/misc/*



  Puis utiliser le second paramtre comme nom de police, par exemple
  avec rxvt, xiterm, aterm ou wterm:



               aterm -fn -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-15



  Cela lance un terminal X utilisant une des polices latin9.


  6.  Rglage du clavier pour les applications en mode texte



  6.1.  Tout d'abord


  Le huitime bit doit survivre  l'entre du noyau, assurez-vous-en
  donc avec :



               stty cs8 -istrip -parenb



  Ensuite, il convient de s'assurer que l'application est apte 
  supporter les caractres 8 bits : par exemple, ispell n'est pas
  compil pour des caractres 8 bits par dfaut : il faut le recompiler
  sans l'option :



               -NO8BIT



  6.2.  Une police, des polices...


  Avant d'aborder cette section, je vous conseille de lire
  l'introduction sur les polices pour apprhender un peu mieux le
  vocabulaire de base et les diffrentes normes de polices.


  6.2.1.  a) Historique des polices


  De l'ASCII  l'Unicode, en passant par l'ISO 8859, le latin et le cp,
  on peut rsumer l'histoire des polices en grandes tapes :

  Au dbut tait l'ASCII, qui codait ses caractres sur 7 bits.

  Prvu pour des tats-uniens, il tait impossible d'incorporer des
  caractres accentus  la norme dj prsente de 127 caractres.

  Ainsi vint le 8 bits qui tendit le nombre de caractres  255 et les
  normes ISO 8859, latin et cp, pour les plus connues, qui vinrent
  pallier  cette dficience du fait des 128 positions supplmentaires
  disponibles en encodant les caractres sur 8 bits.

  Mais plusieurs de ces normes taient ncessaire du fait de
  l'impossibilit de faire tenir les caractres de toutes les langues du
  monde sur 8 bits.

  La norme ISO 8859-1 latin 1, la plus utilise, se destine par exemple
  au langues d'Europe de l'ouest, du nord, d'Amrique, la norme ISO
  8859-2 latin 2 est prvue pour l'Europe de l'est...

  L'Unicode est l'un de ces standard, destin  terme  remplacer les
  diffrentes volutions de l'ASCII ; comme le passage du 7 bits au 8
  bits il correspond  une extension de la place disponible, tout en
  reprenant l'ancienne partie comme ASCII et ISO 8859-1 latin 1 pour
  rester compatible avec la majorit du parc install.

  L'Unicode offre l'avantage de proposer les caractres ncessaires 
  toutes les langues du monde, mais reste encore peu utilis ou
  implment.

  En effet, il est impossible de l'utiliser en pratique sous linux-
  console, la mmoire exige de la carte vido ne permettant pas de
  stocker tous les caractres de l'Unicode, et sous X la gestion
  actuelle des polices rendrait son utilisation trop inconfortable.

  Attendons un peu que les polices  True Type  se rpandent sous X,
  grce  des outils comme freetype, xfstt (...) et le trs attendu
  XFree 4 qui devrait les supporter en natif.

  Actuellement, la nouvelle norme europenne ISO 8859-15 latin 9 est
  cense permettre la transition vers l'Unicode en apportant  l'ancien
  ISO 8859-1 latin 1 les caractres qu'il manquait actuellement.

  Toutefois elle est partiellement incompatible avec l'Unicode puisque
  l'ISO 8859-1 latin 1 avait t choisi comme base pour l'Unicode, mais
  que cette police veut complter les failles de l'ISO 8859-1 latin 1 en
  y rajoutant des caractres dj prsents dans l'Unicode...

  Quelle complexit pour de simple lettres !



  6.2.2.  b) ISO 8859-15 latin 9


  De nous jours, il vaut mieux installer par dfaut la nouvelle norme
  ISO 8859-15 latin 9, destine  remplacer l'ensemble des polices
  europennes par une seule.

  Son but est voisin de l'Unicode, mais elle a l'avantage d'tre plus
  lgre que celui-ci et d'tre applicable tout de suite.

  Elle apporte notamment des caractres qui manquaient beaucoup pour les
  Franais et les Finlandais :


     e dans l'o  en majuscule et minuscule pour les Franais, par
     exemple pour les mots oeuf, coeur, boeuf, oeil ...

     s chapeau invers  en majuscule et minuscule pour les Finlandais

     z chapeau invers  en majuscule et minuscule pour les Finlandais

     l'EURO  pour tous les pays europens

  Cette nouvelle norme, ISO 8859-15 latin 9 aussi connue sous le nom
  gnrique latin0, reste cependant encore trs peu rpandue par rapport
   la norme actuelle ISO 8859-1 latin 1.


  6.2.3.  c) Utiliser les polices ISO 8859-15 latin 9


  Vous n'avez besoin que d'une seule police !

  Or il en existe plusieurs types rpondant diffremment  la mme norme
  iso-8859-15 latin9  latin0  sous linux :

    par tradition l'opposition latN/latNu selon l'inclusion ou non
     d'une table de correspondance Unicode.

    en ralit les diffrences vont bien plus loin, de l'ordre dans
     lequel sont les caractres de la police, ce qui joue sur l'aspect
     des applications semi graphique, les correspondances avec des
     caractres latin1  latin9  Unicode ce qui a un rle dans la
     compatibilit croise ou exclusive, par exemple purement Unicode...

  J'ai donc complt par 2 types de ma cration pour rpondre au mieux
  aux diffrents besoins.



             | Encodage dans | Inclusion d'une | Compatibilit | Compatibilit
             |  l'ordre iso  |  table Unicode  |   exclusive   |    croise
       --------------------------------------------------------------------------
       lat9  |     oui       |      non        |     non       |   lat1 + lat9
       --------------------------------------------------------------------------
       lat9u |     non       |      oui        |     non       |   lat1 + lat9
       --------------------------------------------------------------------------
       lat9v |     oui       |      oui        |   Unicode     |       non
       --------------------------------------------------------------------------
       lat9w |     oui       |      oui        |     non       |lat1+lat9+Unicode
       --------------------------------------------------------------------------



  Voici plus d'explications :


    les lat9 tout court ne contiennent pas de table de correspondance
     Unicode, ce qui fait que tous les symboles montaires
     internationaux apparatront comme des euro, ce qui peut poser des
     problmes pour les fichiers issus d'un ordinateur sous windows ; le
     cp1252 ou le latin1 sont  incompatibles  avec le latin9, mais ce
     dernier a l'avantage de fonctionner tout de suite sous linux.

     Dans les versions rcentes du noyau, selon le site de Yann Dirson,
     il semble donc que toutes les polices devraient contenir une table
     de correspondance Unicode...

    des lat9u encodes dans un ordre non standard, mais identique 
     celui des polices latXu de kbd, par rapport aux polices
     prcdentes, en amenant les mmes problmes avec le cp1252 et le
     latin1 mais en incluant une table de correspondance Unicode, ce qui
     permet d'avoir de jolis caractres semi graphiques sous Yast, mc,
     ou d'autres programmes bass sur ncurses ou dialog.

    des lat9v encodes dans l'ordre officiel iso comme les lat9 mais
     avec une table Unicode complte : l aucun symbole montaire
     international ne sera remplac par l'euro !  Ces polices sont
     utiles pour viter les problmes d'export, grce  l'Unicode *pur*,
     avec une table de clavier Unicode adapte : tous les caractres
     latin9 sont remplacs par des caractres Unicodes et affichs
     ainsi, ce qui a le mrite d'tre compatible avec le latin9,
     l'Unicode, d'tre lgant techniquement mais inutilisable 
     normalement  sous linux-console. Presque aucun systme n'est
     entirement prt pour l'Unicode !

  Donc n'utilisez les polices lat9, lat9u ou lat9v que si vous savez ce
  que vous faites, je vous recommande pour ma part le meilleur compromis
  : les polices lat9w qui permettent de passer au latin9 immdiatement,
  en posant quelques problmes pour les caractres latin1 qui seront
  remplacs par leurs quivalents latin9, mais sans rendre l'Unicode
  obligatoire comme les lat9U, sans emmler les caractres graphiques
  comme les lat9, et en permettant aussi d'afficher les caractres
  spcifiques au latin9 en Unicode *pur*,  l'exception des caractres
  spcifiques au latin1 donc...

  Je vous rassure, vous n'tes pas obligs de comprendre tout ce qui
  suit pour  passer  l'euro , si effectivement vous ne savez toujours
  pas de quelle police vous avez besoin, un conseil : utiliser les
  lat9w.

  Pour utiliser la police lat9-16.psf ou un autre lat9 .psf, vous devez
  pallier l'absence d'une table Unicode en en chargeant une.



                       loadunimap fonts/linux-console/lat9.uni
                       setfont fonts/linux-console/lat9-16.psf



  Pour utiliser la police lat9w-16.psf ou une autre lat9u, lat9v ou
  lat9w :



                       setfont /fonts/linux-console/lat9w-16.psf


  6.2.4.  d) Unicode


  Une alternative est l'Unicode, mais les programmes l'utilisant sont
  encore trop peu nombreux pour qu'elle soit valable.

  Citons quand mme yuedit et le projet  9  (9term, 9wm... rien  voir
  avec l'oprateur tlcom franais du mme nom) qui utilisent l'Unicode
  sous X, avec plus ou moins de succs.

  En revanche, sous linux-console, tout programme peut utiliser
  l'Unicode.

  Mais, hlas!, aussi grande que soit la mmoire des cartes vidos
  actuelles, elle ne peut charger l'intgralit des caractres d'une
  police Unicode.

  Il existe donc des  jeux de caractres  limits mais bien utiles
  pour les langues baltiques, asiatiques, est-africaines...


  6.2.5.  e) Utiliser les possibilits Unicode


  Essayez par exemple ce fichier unicode-lance pour passer en mode
  Unicode:



       #!/bin/sh
       echo -e '\033%8'
       kbd_mode -u
       loadkeys fr-unicode.map
       setfont lat9u-16.psf



  et ce fichier latin-retourne pour revenir en mode latin normal:



       #!/bin/sh
       echo -e '\033%@'
       kbd_mode -a
       loadkeys fr-latin9.map
       setfont lat9w-16.psf



  Essayez par exemple de lire le fichier unicode.txt, encod en Unicode,
  une fois unicode-lance activ.

  Vous ne verrez sinon qu'un texte mal encod, sans caractres 8 bits,
  comme cet exemple :



  Ceci est un essai de texte en UNICODE !

  On constate que les bétas (~_) et autres lettres 8 bits ne sortent pas bien
  si l'on regarde ce fichier en mode latin !
  Les accents éè| ù non plus d'ailleurs...
  Enfin, heureusement que l'on ne marche pas sur des ~RUFS, enfin, ~Sufs !
  ~Ga marche moyennement disons !



  6.3.  Les locales, messages en Franais


  Linux en 'version franaise' existe... mais ne semble pas facile 
  obtenir.

  La librairie locale(7) [cf aussi perllocale, setlocale, getlocale]
  utilise par la librairie C se sert de variables d'environnement pour
  dfinir les prfrences linguistiques et nationales.

  Pablo Saratxaga rpondait ainsi  Pascal Rigaux en prenant l'exemple
  de sort :



   PR> J'ai dcouvert aujourd'hui la variable d'environnement LANG. C'est assez
   PR> surprenant de se retrouver avec de l'aide en franais (mme si elle n'est pas
   PR> toujours aussi prcise que la version anglaise) quand on fait ls --help.

  C'est agrable n'est-ce pas ?

   PR> Par contre je ne comprend pas pourquoi un programme comme sort(1) n'utilise pas
   PR> cette information pour obtenir un tri acceptable pour les accents (du genre ne
   PR> pas mettre  tre  aprs  zen ). Il devrait au moins proposer une option de
   PR> ce genre.

  Il faudrait regarder les sources de sort...
  La fonction  utiliser est strcoll() :

                                    ****

  STRCOLL(3)         Manuel du programmeur Linux         STRCOLL(3)


  NOM
         strcoll - Comparaison de deux chanes suivant la localisa-
         tion en cours.

  SYNOPSIS
         #include <string.h>

         int strcoll (const char *s1, const char *s2);

  DESCRIPTION
         La fonction strcoll() compare les deux chanes s1  et  s2.
         Elle renvoie un entier infrieur, gal ou suprieur a zro
         si  s1 est respectivement infrieure, gale, ou suprieure
         a  s2.   La  comparaison est effectue en se basant sur la
         localisation en cours pour la catgorie LC_COLLATE.  (Voir
         setlocale(3)).

                                    ****

  qui est donc l'quivalent de strcmp() mais qui tiens compte des locales.
  Il faudra s'crire un strcasecoll() aussi pour bien faire, en utilisant
  toupper()/tolower() qui d'aprs la page de manuel supporte les locales.

  Qui s'y colle ? a devrait tre assez simple  raliser sur un systme GNU
  en tout cas.



  Il existe diffrente variables  exporter, avec chacune une fonction
  spcifique ; le format standardis est:



               langue[_PAYS[.CHARSET]][@variante]



  Les crochets dnotent l'optionalit, par exemple: 'fr', 'fr_BE',

  Les fonctions de la libc, celle de GNU en tout cas, iront chercher
  dans  l'ordre dcroissant  si on peut dire; par exemple si on
  spcifie avec 'fr_CH' puis avec 'fr'.



    LC_COLLATE  dfinit les quivalences de caractres pour les
     comparaisons ( peut tre quivalent  ae), pour les ligatures et
     pour les csures.

    LC_CTYPE    dfinit les caractres affichables

    LC_MONETARY dfinit le format et le symbole de la monnaie utilise

    LC_NUMERIC  dfinit le format numrique : regroupement, marqueur
     dcimal...

    LC_MESSAGES dfinit la langue des messages

    LC_TIME     dfinit le format de la date, les noms des jours et des
     mois

    LC_ALL      valeur par dfaut des variables prcdentes : si une
     LC_ n'est pas dfinie, LC_ALL est prise en compte, sinon la libc se
     rabat sur LANG.

    LANG        diffrent des variables prcdentes, contient le code
     langue au format iso : fr,en,de...

    LANGUAGE    liste des locales par ordre de prfrence spares par
     deux points (fr:es:dk:en), c'est une particularit GNU, fort utile
     si un document n'existe que dans une langue comme certaines pages
     de manuel

  Les valeurs utilisables pour les francophones sont:


    fr franais gnrique

    fr_FR franais de France

    fr_BE franais de Belgique

    fr_CH franais de Suisse

    fr_LU franais du Luxembourg

    fr_CA franais du Canada

  Par exemple, si vous tre un Franais de France, il suffit d'indiquer
  sous bash :



               export LANGUAGE=fr_FR



  Exemple :



          bash# export LANGUAGE=es_ES
          bash# ls fichier_n_existant_pas
          ls: fichier_n_existant_pas: No existe el fichero o el directorio
          bash# export LANGUAGE=de_DE
          bash# ls fichier_n_existant_pas
          ls: fichier_n_existant_pas: Datei oder Verzeichnis nicht gefunden
          bash# export LANGUAGE=en_US
          bash# ls fichier_n_existant_pas
          ls: fichier_n_existant_pas: No such file or directory
          bash# export LANGUAGE=fr_FR
          bash# ls fichier_n_existant_pas
          ls: fichier_n_existant_pas: Aucun fichier ou rpertoire de ce type



  Toutefois, avec le passage  l'euro, ces locales ne sont plus
  adaptes.

  Je vous conseille donc d'utiliser dans les pays de l'union passant 
  l'euro le suffixe  @euro  :



          export LC_ALL="fr_FR@euro"



  Pour cela, installer les nouveaux fichiers sources de locales dans
  /usr/share/i18n/ en lanant :



          cp charmaps/ISO-8859-15 /usr/share/i18n/charmaps/ISO-8859-15
          cp locales/* /usr/share/i18n/locales/



  Alors, rgnrer les locales  binaires  de /usr/share/locales, par
  exemple :



          localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro



  fr_FR@euro inclus les caractres latin 9, c'est utile pour
  l'utilisation de LC_COLLATE et LC_CTYPE en fait, et la nouvelle
  monnaie unique.

  Pour le moment, le Franc Franais (FRF) est toujours la monnaie
  officielle en France par exemple, mais lorsque ce sera l'euro, il
  suffira de remplacer la locale fr_FR par fr_FR@euro.



          cd /usr/lib/locales
          rm -fr fr_FR
          mv fr_FR@euro fr_FR



  La solution  @euro  est supporte par les autres UNIX comme Solaris.

  Pour les shell scripts, il peut tre utile de rajouter  LC_TIME=C 
  pour empcher la date d'tre localis, embtant pour les grep et
  autres qui cherchent  Mon   Tue ... et non  Lun ,  Mar ...

  Les donnes correspondantes aux prfrences se trouvent gnralement
  dans /usr/share/locale. S'ils manquent, vous pouvez rcuprer leur
  source

  Concernant les autres fichiers abords dans cet article, vous les
  trouverez avec les autres fichiers de cet HOWTO sur ma page.


  6.4.  Son linux en franais


  Pour se faire SON linux en franais il faut en pratique disposer des
  sources de la libc et d'un minimum de comptences en langage C ; ces
  manipulations sont inutiles pour l'utilisateur standard de Linux qui
  se contentera d'utiliser les locales de la section prcdente.

  Mais voici donc, pour la bonne bouche, quelques renseignements
  collects...

  Laurent Chemla nous pilote :



       Si j'ai suivi, il y a deux trucs qui font la mme chose, d'o embrouille, les
       locales et un truc appel nls.

       Les locales, sous Linux, a va par dfaut dans /usr/lib/locale,
       et a contient de quoi prciser entre autres le format des
       nombres (LC_NUMERIC), les retours des fonctions ctype (isalpha etc) (LC_CTYPE),
       le format des sommes d'argent (LC_MONETARY), le format des dates (LC_TIME) et
       encore d'autres dtails. Sur certains Unix, il y a aussi LC_MESSAGES,
       qui contient les messages de l'OS dans la langue choisie par la variable
       d'environnement LC_MESSAGES. Pas sous Linux.  Sous Linux, c'est nls qui fait
       a, et de fait, nls gre un fichier qui est dans /etc/locale/.
       (NDG : De nos jours, ils se trouvent plutt dans /usr/lib/locale)
       D'o l'embrouille. Ils auraient mis a dans /usr/lib/nls, comme
       tout le monde, a aurait vite la confusion. Mais bon.

       Donc, si l'on veut se tenir  jour d'nls, il suffit d'aller dans les
       sources de libc/nls, faire  make french  et copier libc.dat dans
       /etc/locale/C/libc.dat et toc, tous les messages sont en franais. Y compris
       ceux des programmes qui n'utilisent pas setlocale(): c'est perror() qui fait le
       boulot (du moins je suppose).

       Si l'on veut en plus que les programmes qui utilisent setlocale() utilisent nos
       rgles franaises, l il faut aller dans les sources de
       libc/locale et dans chacun des sous-rpertoires jeter un oeil sur le
       fichier exemple, le modifier pour le franais (c'est des tout petits
       fichiers), et faire  make , avant de copier le rsultat dans
       /usr/lib/local/fr/ et de faire un  export LC_ALL=fr .



  Autre astuce pour mnager les vieux logiciels :



  cd /usr/lib
  ln -sf /usr/share/locale .



  Ne pas oublier de tlcharger sur le site du lip6 :


    Les pages de manuel en franais, archive man-fr-*, adaptes par C.
     Blaess. Il suffit d'extraire le contenu de l'archive dans le
     rpertoire /usr/man/fr.

    Une intressante documentation technique : locale.fr, par P.
     D'Cruze, adapte par . Dumas

  Pour en apprendre davantage lire la page de manuel de  locale  :
  bibliothque de pages de manuel 5 ou 7 :



               bash# man 5 locale
               bash# man 7 locale



  6.5.  Les variables


  Ces variables doivent tre exportes  chaque login : mettez les donc
  dans .bashrc et .bash_login, .tcshrc ou /etc/profile :



       # pour tcsh, utiliser setenv au lieu de export, par exemple setenv LANG fr

       # Les locales
       LC_CTYPE=ISO-8859-1
       LANGUAGE=fr
       LC_MESSAGES=fr
       LC_ALL=fr
       LANG=fr
       LESSCHARSET=latin1
       export LC_CTYPE LANGUAGE LC_MESSAGES LC_ALL LANG LESSCHARSET

       # Les raccourcis : sans ll ou d, impossible de voir les fichiers comprenant des
       # caractres 8 bits ...
       alias q="cd .."
       alias ll="ls --color=auto -a -N -l"
       alias d="ls --color=auto -a -N"
       alias indent="indent -kr"
       alias netscape="export LC_ALL=en_EN ; netscape $* ; LC_ALL=fr_FR"

       # Au cas o Del/BackSpace ne fonctionne pas, essayez l'un des deux :
       #stty erase ^?
       #stty erase ^H



  N'oubliez pas : tous les fichiers ici cits dont le nom commence par 
  .  doivent se trouver dans votre rpertoire maison  /


  6.6.  Les caractres 8 bits dans les programmes utilisant readline
  tels bash ou ncftp...


  Readline est une librairie de saisie de caractres avec historique et
  compltion ; elle est utilise par de nombreux programmes comme bash,
  ncftp, gnuplot...

  Par dfaut, le 8e bit sert  coder la touche Meta.

  Elle est utilise pour coder certaines commandes mais la touche 
  Escape  ou  chap  peut la remplacer.

  Si vous souhaitez voir et saisir des accents avec les applications
  compiles avec readline, comme bash pour les versions suprieures 
  1.13, ajoutez ceci dans votre fichier $INPUTRC, par dfaut ~/.inputrc)
  :



       # Permettre de rentrer & recevoir des caractres accentus
       set meta-flag on
       set convert-meta off
       set input-meta on
       set output-meta on

       # Pas de bip audible mais visible
       # set bell-style visible

       # Pour faire marcher Home, End, Delete, Esc + Delete & Esc + BackSpace
       "\e[1~":beginning-of-line
       "\e[3~":delete-char
       "\e[4~":end-of-line
       "\e\C-h": backward-kill-word
       "\e\e[3~": kill-word



  Cela vous permettra d'effacer des caractres vers l'avant avec 
  Delete  et vers l'arrire avec  BackSpace , ceci n'tant pas prvu
  sur les tables de clavier par dfaut  mimant  le comportement d'un
  clavier de console VT100 .

  Les deux dernires options vous permettront d'utiliser  Home  et 
  End  pour aller au dbut et  la fin de la ligne en cours d'dition.

  Pour pouvoir employer une touche il suffit d'obtenir son code et
  l'associer  une fonction grce  ce fichier ; pour obtenir le code
  d'une touche invoquer cat puis appuyer sur la touche : son code
  apparat.

  Le code physique :



               ^[



  correspond  la squence d'chappement.

  Par exemple, si le code de  Home  est  ^[[7   il suffit d'ajouter
  une ligne :

               "\e[7~": beginning-of-line



  au .inputrc.

  Plus de documentation est disponible sur la page de manuel de bash,
  section READLINE.

  On peut aussi, grce  la variable d'environnement INPUTRC, utiliser
  un fichier commun  tous les utilisateurs.

  Enfin, je vous recommande d'utiliser ce fichier .bashrc  placer dans
  votre rpertoire maison :



       # ~/.bashrc : excut par bash(1) pour les shells lancs aprs le login.

       # Le path
       PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/local/bin"

       # Le prompt
       PS1="(\u@\h:\W)$ "

       # L'utilisateur
       ENV=$HOME/.bashrc
       USERNAME="votre nom"

       # Les locales
       _CTYPE=ISO-8859-1
       LANGUAGE=fr
       LC_MESSAGES=fr
       LC_ALL=fr
       LANG=fr
       LESSCHARSET=latin1
       export LC_CTYPE LANGUAGE LC_MESSAGES LC_ALL LANG LESSCHARSET

       # Les raccourcis
       alias q="cd .."
       alias ll="ls --color=auto -a -N -l"
       alias d="ls --color=auto -a -N"
       alias indent="indent -kr"
       alias elm-box="elm -f ~/Mail/Inbox"
       alias netscape="export LC_ALL=en_EN ; netscape $* ; LC_ALL=fr_FR"

       # Au cas o Del/BackSpace ne fonctionne pas, essayez l'un des deux :
       #stty erase
       #stty erase ^H

       # Refuser le talk & le write
       #mesg n

       # Permettre les coredumps
       #ulimit -c nombre_max_de_Ko

       #Fixer le masque de cration de fichiers
       #umask 022



  Le fichier .bash_profile ou .bash_login, excut par bash(1) lors des
  logins, y est strictement identique mais peut, si vous le voulez,
  prsenter des diffrences pour afficher par exemple une citation en
  laant le programme  fortune .


  6.7.  zsh

  Celui-ci devrait se contenter d'un stty pass8.

  Si cela ne suffisait pas, rajouter dans le .zshrc ou dans /etc/zshrc:



               bindkey "\e[2~"  yank
               bindkey "\e[3~"  delete-char
               bindkey "\e[1~"  beginning-of-line
               bindkey "\e[4~"  end-of-line
               bindkey "\e[5~"  up-line-or-history
               bindkey "\e[6~"  down-line-or-history



  6.8.  tcsh


  Pour tcsh, placer, dans le fichier /etc/csh.login ou dans les fichiers
  .tcshrc des utilisateurs concerns, les variables indiques plus haut
  en remplaant export par setenv:



               setenv LC_CTYPE=ISO-8859-1
               setenv LANGUAGE=fr
               setenv LC_MESSAGES=fr
               setenv LC_ALL=fr
               setenv LANG=fr
               setenv LESSCHARSET=latin1



  6.9.  Pour tous les shells


  Remplacer 'iso_8859_1' par 'iso-8859-1' si cela ne fonctionne pas,
  voire french.iso88591.fr_FR ou fr_BR, fr_CA, fr_CH, fr_LU...

   propos de LANG, il vaut mieux viter fr_FR et lui prfrer fr car
  certains programmes ne passent pas vraiment par la resolution de
  locales mais lisent LANG directement...

  Si nls est install, les routines correspondantes sont utilises,
  sinon tcsh agit en iso_8859_1, quelle que soit les valeurs donnes 
  LANG et LC_CTYPE : cf. la section NATIVE LANGUAGE SYSTEM de tcsh(1).

  Selon le Danish-HOWTO, utiliser :



               (guylhem@victis:tcsh)# setenv LC_CTYPE ISO-8859-1
               (guylhem@victis:tcsh)# stty pass8



  6.10.  L'heure


  Rien n'est plus facile que de laisser  Linux le soin de passer de
  l'heure d't  l'heure d'hiver et rciproquement...

  a) D'abord, quelle heure est-il :-) ?

  Aprs avoir regard sur la pendule la plus proche de vous, tapez :

  clock

  puis

  date

  La premire heure est celle du bios, la seconde celle calcule par
  Linux  partir de /etc/zoneconfig.

  Pour peu que vous ayez install timezone, votre machine peut jongler
  aisment entre les diffrents fuseaux horaires... ce que les DOS ou
  Windows ne permettent pas !

  b) L'heure du choix !

  De l, deux possibilites : soit vous dcidez de laisser l'heure
  systme  l'heure locale, peu pratique, except si vous hbergez aussi
  sur votre disque dur ces systmes d'exploitation peu volu, ne
  sachant mme pas exploiter les fuseaux horaires, soit vous passez 
  l'heure de Greenwich, Linux se chargeant de l'adapter  votre fuseau
  horaire.

  Dans ce cas, les grands voyages  l'tranger avec un portable tout
  neuf quip de Linux se feront en toute simplicit : le dernier
  paragraphe vous expliquera comment changer de fuseau horaire
  facilement...

  c) Le rglage

  Pour procder, regardez d'abord si l'heure systme retourne par clock
  est l'heure locale ou l'heure de Greenwich.

  Vous avez bien regard une pendule comme je vous le conseille plus
  haut, n'est-ce pas ?

  Si clock vous retourne l'heure locale, il va falloir jongler un peu
  avec les fuseaux horaires, sinon passez directement  l'tape 
  rglage du fuseau .


    Pour les franais, belges wallons et suisses romands :

  Vous tes normalement dans une zone horaire MET (Medium European Time,
  soit GMT+1).

  La zone  MET DST  correspond elle  l'heure d't active (GMT + 2).

  Selon les dcisions futures de la cour europenne, l'heure d't 
  daylight savings  risque d'tre abandonn...  ce qui compliquera
  cette explication !


    Pour les canadiens franais :

  Vous tes dans une zone horaire GMT-4 si vous habitez autour de
  Montral .
  Pour les autres provinces, consulter un dictionnaire !

  Premirement, effacez le fichier /etc/localtime ou
  /usr/lib/zoneinfo/localtime (l'emplacement varie selon les
  distributions ; si vous avez les deux fichiers, effacez /etc/localtime
  : l'autre fichier doit certainement tre un lien vers /etc/localtime).

  Ds lors, clock et date doivent vous retourner la mme heure...


    Pour les canadiens franais : utilisez GMT+4


    Pour les franais, belges wallons et suisses romands :

  Si vous lisez ce document en t, le dcalage de l'heure locale par
  rapport  l'heure de Greenwich est de deux heures, on va donc mettre
  temporairement le fuseau en GMT-2, soit vous lisez ce document en
  hiver et il convient de remplacer tous les  2  par des  1  dans
  les exemples suivants...

  GMT-2 ?!!? Alors que le fuseau est GMT+2 ?

  Ceci va vous retourner l'heure de Greenwich dont on a besoin pour
  rgler le systme : tapez :

  ln -sf /usr/lib/zoneinfo/Etc/GMT-2 /etc/zoneconfig

  clock

  date

  L'heure calcule correspond donc  l'heure de Greenwich, l'heure
  systme  l'heure locale... soit l'inverse de ce que l'on veut.

  Un simple : clock -w

  Va alors mettre l'heure du systme en heure de Greenwich, utilisant
  pour cela l'heure locale inverse volontairement avec l'heure systme.

  d) Rgler le fuseau horaire :

  Tapez alors : ln -sf /usr/lib/zoneinfo/Europe/Votre-ville
  /etc/zoneconfig

  Et voil ! Le systme est  l'heure de Greenwich, la conversion vers
  le fuseau horaire local et l'heure d't se faisant automatiquement.

  Si vous habitez hors Europe, procdez de mme en remplaant les  -2 
  par  X , X reprsentant l'oppos de votre dcalage horaire (par
  exemple -4 au Qubec, donc X=+4...)

  e) Modifier le fuseau horaire :

  Si vous partez  l'tranger, il est alors simple de modifier l'heure
  locale de votre portable : par exemple si vous partez pour Moscou :

  ln -sf /usr/lib/zoneinfo/Europe/Moscow /etc/zoneconfig

  Trs simple et trs utile : plus besoin de se souvenir du dcalage
  horaire (plus ou moins X heures) puisque Linux se charge dsormais de
  tout !



  6.11.  vi


  Normalement, aucune modification n'est ncessaire  part l'utilisation
  de loadkeys (dtaille plus haut).

  Ce fichier .vimrc pourrait toutefois vous tre utile si vous utilisez
  vim au lieu d'elvis :



  " Les guillemets anglais  "  signifient  mis en commentaire 

  " viter un avertissement  version incorrecte  :
  version 4.0

  " Utiliser les dfauts de vim, bien mieux
  set nocompatible

  " Autoriser le  BackSpace  sur tout :
  set bs=2

  " Police  utiliser sous X11 :
  "set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1

  " Fixer la csure automatique de la ligne  N caractres :
  set tw=72

  " Faire apparatre les tabulations et les espaces
  set list

  " Changer les dfauts pour voir les espaces inutiles et les tabulations
  set listchars=tab:,trail:
  hi nontext ctermfg=red
  hi nontext ctermbg=blue

  " Indentation (pour les programmeurs) :
  " set cindent

  " Rglages souris :
  "set mouse=a

  " Ligne
  set nowrapscan

  " Montrer les correspondances :
  set showmatch

  " Montrer le mode
  set showmode

  " Indentation intelligente (pour les programmeurs) :
  " set uc=0

  " Faire fonctionner BackSpace :
  set t_kD=^?

  " Doit se trouver aprs
  map ^H X

  " Faire fonctionner Delete  :
  map \e[3~ x

  " Cacher la souris lorsqu'on tape :
  set mousehide

  " Faire voir les correspondances lors de recherches :
  " set hlsearch

  " Colorer  l'intrieur des commentaires en C :
  let c_comment_strings=1

  " Couleur pour xiterm, rxvt, nxterm, color-xterm :
  if has("terminfo")
      set t_Co=8
      set t_Sf=\e[3%p1%dm
      set t_Sb=\e[4%p1%dm
   else
      set t_Co=8
      set t_Sf=\e[3%dm
      set t_Sb=\e[4%dm
  endif

  " Coloration syntaxique :
  if ett_Co > 1
     syntax on
  endif

  " Autoriser l'dition de fichiers gzipps

  augroup gzip
    " Supprimer toutes les autocommandes
    au!
    autocmd BufReadPre,FileReadPre        *.gz set bin
    autocmd BufReadPost,FileReadPost      *.gz '[,']!gunzip
    autocmd BufReadPost,FileReadPost      *.gz set nobin
    autocmd BufReadPost,FileReadPost      *.gz execute ":doautocmd BufReadPost " .  expand("%:r")

    autocmd BufWritePost,FileWritePost    *.gz !mv <afile> <afile>:r
    autocmd BufWritePost,FileWritePost    *.gz !gzip <afile>:r

    autocmd FileAppendPre                 *.gz !gunzip <afile>
    autocmd FileAppendPre                 *.gz !mv <afile>:r <afile>
    autocmd FileAppendPost                *.gz !mv <afile> <afile>:r
    autocmd FileAppendPost                *.gz !gzip <afile>:r
  augroup END

  augroup bzip
    au!
    autocmd BufReadPre,FileReadPre        *.bz2 set bin
    autocmd BufReadPost,FileReadPost      *.bz2 '[,']!bunzip2
    autocmd BufReadPost,FileReadPost      *.bz2 set nobin
    autocmd BufReadPost,FileReadPost      *.bz2 execute ":doautocmd BufReadPost " .  expand("%:r")
    autocmd BufWritePost,FileWritePost    *.bz2 !mv <afile> <afile>:r
    autocmd BufWritePost,FileWritePost    *.bz2 !bzip2 <afile>:r

    autocmd FileAppendPre                 *.bz2 !bunzip2 <afile>
    autocmd FileAppendPre                 *.bz2 !mv <afile>:r <afile>
    autocmd FileAppendPost                *.bz2 !mv <afile> <afile>:r
    autocmd FileAppendPost                *.bz2 !bzip2 <afile>:r
  augroup END

  augroup cprog
    au!
    autocmd BufRead *       set formatoptions=tcql nocindent comments&
    autocmd BufRead *.c,*.h set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
  augroup END



  6.12.  Emacs


  Voici un fichier de configuration de base pour employer les accents.



    ;;
    ;; Fichier .emacs: initialisation d'emacs
    ;; Tir du Guide du Rootard
    ;;

    (display-time)                     ;; Pour avoir l'heure dans la barre d'tat
    (setq display-time-24hr-format t)  ;; Format 24 heures

    ;; Nouveaux modes
    (autoload 'c++-mode   "cplus-md" "C++ Editing Mode" t)
    (autoload 'perl-mode   "perl-mode" "Perl Editing Mode" t)
    (autoload 'c-mode "c-mode" "C Editing Mode" t)
    ; mieux vaudrait utiliser le "cc-mode"

    (autoload 'jargon-mode "jargon" "Jargon Mode" t)

    ;; Auto-Mode Settings : positionne le mode selon l'extension
    (setq auto-mode-alist
    (append '(("\.c$"  . c-mode)    ;; utilise le mode C++ mme pour C
    ("\.h$"  . c-mode)
    ("\.C$"  . c++-mode)
    ("\.H$"  . c++-mode)
    ("\.cc$" . c++-mode)
    ("\.C$"  . c++-mode)
    ("\.pl$" . perl-mode)           ;; Perl
    ("/tmp/snd\.[0-9]*" . text-mode);; Text (pour le courriel)
    ("[Rr][Ee][0-9]*" . text-mode)
    ("\.ada$"  . ada-mode)          ;; Ada
    ("\.spec$"  . ada-mode)
    ("\.body$"  . ada-mode)
    ("makefile$" . makefile-mode)  ;; Makefile
    ("Makefile$" . makefile-mode)
    ("Imakefile$" . makefile-mode))
    auto-mode-alist))

    ; Remappages varis  mettre ici
    (global-set-key "\eg" 'goto-line)       ;; ESC G = Aller  une ligne

    (put 'eval-expression 'disabled nil)

    ;; Accents...
    (standard-display-european 1)
    (load-library "iso-syntax")
    (set-input-mode (car (current-input-mode))
                  (nth 1 (current-input-mode))
                  0)

    ;; Sous X-Window, texte en couleurs (C/C++/Shell/Makefile,etc)
    (cond (window-system
    (setq hilit-mode-enable-list  '(not text-mode)
    hilit-background-mode   'light
    hilit-inhibit-hooks     nil
    hilit-inhibit-rebinding nil)
    (require 'hilit19)
    ))
    (if (not (equal window-system ""))
    (global-set-key "\C-?" 'delete-char))
    ))



  Le Keyboard-HOWTO conseille quand  lui :



            (standard-display-european t)
            (set-input-mode nil nil 1)
            (require 'iso-syntax)
            (load-library "iso-insert.el")
            (define-key global-map [?\C-.] 8859-1-map)



  Utilisez une version au moins gale  19.27, modifiez le fichier
  global (commun  tous les utilisateurs) /usr/lib/emacs/site-lisp/site-
  start.el ou le ./emacs de chaque utilisateur concern pour y ajouter :



               (standard-display-european t)
               (set-input-mode (car (current-input-mode))
                 (nth 1 (current-input-mode))
                 0)
               (global-set-key [delete]   'delete-char)
               (global-set-key [home]     'beginning-of-line)
               (global-set-key [end]      'end-of-line)
               (global-set-key [prior]    'scroll-down)
               (global-set-key [next]     'scroll-up)
               (global-set-key [C-right]  'forward-word)
               (global-set-key [C-left]   'backward-word)
               (global-set-key [C-prior]  'beginning-of-buffer)
               (global-set-key [C-next]   'end-of-buffer)
               (global-set-key "\033[A"  'previous-line)
               (global-set-key "\033[B"  'next-line)
               (global-set-key "\033[C"  'forward-char)
               (global-set-key "\033[D"  'backward-char)
               (global-set-key "\033[H"  'beginning-of-line)
               (global-set-key "\033[Y"  'end-of-line)
               (global-set-key "\033[1~" 'beginning-of-line)
               (global-set-key "\033[2~" 'overwrite-mode)
               ;; le delete-char peut correspondre  \004 ou  \033[3~
               (global-set-key "\033[3~" 'delete-char)
               (global-set-key "\033[4~" 'end-of-line)
               (global-set-key "\033[5~" 'scroll-down)
               (global-set-key "\033[6~" 'scroll-up)



  Pour les autres versions :


    19.19 :



               (standard-display-european 1)
               (set-input-mode (car (current-input-mode))
                 (nth 1 (current-input-mode))
                 0)



  Lire  ce propos le fichier emacs.info.

    19.22 :


          (load-library "iso-transl")
          (standard-display-european t)



    Autres :



               (standard-display-european 1)
               (load-library "iso-transl")



  XEmacs les accepte lui par dfaut sans broncher mais peut des fois
  rencontrer des problmes avec les BackSpaces dans le mini-buffer en
  console.

  Ajouter dans le .emacs :


       (if (eq window-system 'x)
           (global-set-key (read-kbd-macro "DEL") 'delete-char)
         (or (global-set-key "^[[3~" 'delete-char))
       )



  Le mode ispell d'emacs a un certain nombre de dictionnaires prdfinis
  qui ne sont pas forcement ceux qui sont en place sur le systme.

  Si vous constatez des problmes, vous devez redfinir la liste ispell-
  dictionary-alist des dictionnaires.

  Cette liste contient :

    le nom du dictionnaire

    la liste des caractres composant un mot

    la lise oppose des caractres ne composant pas un mot

    les caractres de liaison  l'intrieur des mots ("-", "'"...)

    vrai ou faux si ces caractres peuvent tre prsents en plusieurs
     exemplaire dans le mot

    une liste d'arguments pour ispell

    le mode d'ispell (tex, nroff..)

  Par exemple, dans le fichier .emacs :



  (setq ispell-dictionary-alist
   '((nil  ; francais.aff
    "[A-Za-z--]" "[^A-Za-z--]"
    "[---']" nil ("-n") "~nroff")
   ("english"  ; rosbif
    "[A-Za-z]" "[^A-Za-z]" "[---']" nil ("-B") nil)
   ("american" ; yankee
    "[A-Za-z]" "[^A-Za-z]" "[---']" nil nil nil)
   ("francais" ; franais
    "[A-Za-z--]" "[^A-Za-z--]"
    "[---']" nil ("-n") "~nroff")
   ("francais-TeX" ; franais
    "[A-Za-z--\\]" "[^A-Za-z--\\]"
    "[---'^`\"]" t nil "~tex")
   ("espanol" ; espa~nol.aff
    "[A-Za-z]" "[^A-Za-z]"
    "[---'^`\"]" t nil "~nroff")
   ("dansk" ; danois et norvgien
    "[A-Za-z]" "[^A-Za-z]"
    "[---'^`\"]" t nil "~nroff")
   ))



  Le dictionnaire "francais-TeX" est un lien symbolique sur "francais"
  qui permet d'ajouter une entre pour les accents  la TeX (ex: \'e).

  Si vous utilisez X11, vous voudrez peut-tre reconstruire les menus et
  il vous faudra recharger une partie de lisp/loaddefs.el dans votre
  .emacs :



  (setq ispell-menu-map nil)

    (if ispell-menu-map-needed
    (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist)))
      name)
      ;; Can put in defvar when external defines are removed.
      (setq ispell-menu-map (make-sparse-keymap "Spell"))
      (while dicts
    (setq name (car (car dicts))
      dicts (cdr dicts))
    (if (stringp name)
    (define-key ispell-menu-map (vector (intern name))
      (cons (concat "Select " (capitalize name))
    (list 'lambda () '(interactive)
      (list 'ispell-change-dictionary name))))))))

    (if ispell-menu-map-needed
    (progn
      ;; Define commands in opposite order you want them to appear in menu.
      (define-key ispell-menu-map [ispell-change-dictionary]
    '("Change Dictionary" . ispell-change-dictionary))
      (define-key ispell-menu-map [ispell-kill-ispell]
    '("Kill Process" . ispell-kill-ispell))
      (define-key ispell-menu-map [ispell-pdict-save]
    '("Save Dictionary" . (lambda () (interactive) (ispell-pdict-save t))))
      (define-key ispell-menu-map [ispell-complete-word]
    '("Complete Word" . ispell-complete-word))
      (define-key ispell-menu-map [ispell-complete-word-interior-frag]
    '("Complete Word Frag" . ispell-complete-word-interior-frag))
      (define-key ispell-menu-map [ispell-continue]
    '("Continue Check" . ispell-continue))
      (define-key ispell-menu-map [ispell-region]
    '("Check Region" . ispell-region))
      (define-key ispell-menu-map [ispell-word]
    '("Check Word" . ispell-word))
      (define-key ispell-menu-map [ispell-buffer]
    '("Check Buffer" . ispell-buffer))
      (define-key ispell-menu-map [ispell-message]
    '("Check Message" . ispell-message))
      (define-key ispell-menu-map [ispell-help]
    '("Help" . (lambda () (interactive) (describe-function 'ispell-help))))
      (put 'ispell-region 'menu-enable 'mark-active)))

    (fset 'ispell-menu-map (symbol-value 'ispell-menu-map))



  6.13.  less


  /etc/profile ou les fichiers de dmarrage du shell (comme .bashrc et
  .bash_profile dans votre rpertoire maison) doivent contenir :



       export LESSCHARSET=latin1



  Comme fichier .lessrc je vous recommande :



  \e[B    forw-line
  \e[A    back-line
  \e[6~   forw-scroll
  \e[5~   back-scroll
  \e[1~   goto-line
  \e[4~   goto-end
  \e[C    next-file
  \e[D    prev-file
  \eOA    back-line
  \eOB    forw-line



  Pour rentrer un Esc (parfois nomm chap) taper  \e  ou, sous vi,
  mettez vous en mode insertion avec i puis tapez  ctrl+v  et enfin 
  Esc .

  Ce fichier permet d'utiliser les touches  Home ,  End ,  Page_Up
   &  Page_Down .

  Pour s'en servir, taper :



       lesskey -o .less .lessrc



  N'oubliez pas de mettre le fichier .less dans votre rpertoire maison
  : il permet d'employer les touches flches,  Page_Up ,  Page_Down
  ,  Home  et  End .

  Ne pas ngliger la page de manuel de less car il peut tre intressant
  de changer la valeur de sa variable d'environnement de configuration
  ("LESS").

  J'utilise : '-C -M -i -x2'


  6.14.  ls


  Utilisez les options :



       -N --color=auto



  ou, plus simplement, dfinissez dans les fichiers de dmarrage de
  votre shell les alias suivants permettant de voir les fichiers dont le
  nom comprend des caractres 8 bits :



       alias ll="ls --color=auto -N -l -a"
       alias d="ls --color=auto -N"



  Un simple d remplacera le classique ls, en y ajoutant la couleur,
  alors que ll vous offrira une liste complte de tous les fichiers
  prsents dans le rpertoire, avec leurs attributs, leurs tailles...

  --color=auto est prfrable car --color=yes fera avoir des codes
  escape lorsqu'on redirige vers un fichier ou un programme o si le
  terminal ne supporte pas la couleur.


  6.15.  flex


  Donnez l'option :



       -8



  si l'analyseur gnr doit accepter les entres 8-bits (bien sr qu'il
  doit le faire !).


  6.16.  elm


  Rajoutez ces trois lignes dans votre .elm/elmrc :



         charset = iso-8859-1
         displaycharset = iso-8859-1
         textencoding = 8bit



  6.17.  col


  Assurez-vous :

  1) qu'il a t corrig et fasse un



       setlocale(LC_CTYPE,"");



  2) de dfinir



       LC_CTYPE=ISO-8859-1



  dans l'environment.


  6.18.  rlogin


  Utilisez l'option :



       -8



  6.19.  joe


  Utiliser joe 2.8 ou plus rcent qui devraient fonctionner aprs
  dition du fichier de configuration : placer l'option -asis dans
  /usr/lib/joerc en premire colonne.


  6.20.  TeX et LaTeX


  Le plus simple consiste  employer GuTemberg, une distribution de
  LaTeX avec tous les dfauts rgls pour des francophones par des
  francophones !

  Mais si vous prfrez une version standard non modifie, il suffit
  d'ajouter au dbut de chaque fichier :


    Pour LaTeX:



       \documentstyle[isolatin]{article}



    Pour LaTeX2e:



       \documentclass[12pt,a4paper]{letter}
       \usepackage{isolatin1}
       \usepackage[french]{babel}
       \usepackage{t1enc}



  ou alors :



       \usepackage[latin1]{inputenc}
       \usepackage[T1]{fontenc}



  Au cas o votre distribution soit trop vieille pour l'inclure,
  isolatin.sty est disponible sparment

  Pour gs et xdvi, il faut utiliser des options spciales (sur ma
  machine, ce sont des alias). En effet, ils sont souvent configurs
  pour un papier tats-unien dit  lgal , de taille proche, mais non
  exactement gale,  celle du standard  A4 .

  Ces options sont les suivantes :

  gs -sPAPERSIZE=a4 xdvi -paper a4 ghostview -a4

  Pour que dvips convertisse les documents dans un format papier a4, il
  faut spcifier dans le fichier config.ps (le chemin varie en  fonction
  des versions de LaTeX) : /usr/lib/texmf/dvips/config.ps ou .dvipsrc

  @ a4 210mm 297mm @+ ! %%DocumentPaperSizes: a4 @+ %%PaperSize: a4 @+
  %%BeginPaperSize: a4 @+ a4

  Sinon ajoutez  votre .Xresources :



       XDvi.paper:             a4
       Ghostview.pageMedia:    A4



  6.21.  Manuel


  Tout d'abord, il faut vous procurer les pages de manuel Linux
  traduites en franais

  Si vous utilisez une distribution RedHat ou Debian, celles-ci sont
  prsentes sur le cdrom : il suffit de les slectionner lors de
  l'installation.

  De l, deux possibilits :


    soit vous ne voulez que des manuels en Franais, auquel cas il faut
     faire un :



       export MANPATH=/usr/man/fr_FR



  NB: fr_FR se remplace par fr_BE, fr_CA, fr_CH ou fr_LU selon le pays
  concern.

    soit vous prfrez par dfaut des manuels en Franais et si la page
     n'existe pas, vous vous rabattez vers l'Anglais, il suffira alors
     de taper :



       export LANG=fr


  man ira chercher dans le  MANPATH  des pages en  LANG  par dfaut
  et se rabattra sinon sur des pages en anglais.

  Si vous dsirez installer la page de manuel expliquant la norme ISO
  8859-15 latin 9, il faut installer le fichier iso_8859_15.7.gz :



       cp standard/iso_8859_15.7.gz /usr/local/man/man7/



  6.22.  Correcteur orthographique ispell


  Vous pouvez vous le procurer sur le site original d'Hydro Qubec ou
  sur le mirroir du lip6

  Un fichier LISEZMOI explique pas  pas et en Franais l'installation.


  6.23.  Les claviers 105 touches


  Aussi appels  claviers Microsoft (tm) , ils ont trois touches de
  plus que les claviers normaux.

  Comment s'en servir ?

  En mode console, diter french.map et dcommenter les lignes en
  parlant !

  De mme pour french (pour Xwindow).


  6.24.  PGP



  Attention, dans certains pays totalitaires, l'utilisation de logiciels
  de cryptographie est considre comme usage d'armes de guerre, ce qui
  est punissable par la loi !

  Sautez donc ce paragraphe si votre lgislation locale ne permet pas
  d'utiliser des logiciels de cryptographie.

  Premirement, il faut se procurer pgp-international ( cause de
  problmes de patentes et de lgislation sur l'export d'armes de
  guerre, il existe pgp-us et pgp-international, ce dernire tant dot
  d'un algorithme encore plus puissant) sur le site norvgien de PGP

  Ensuite, mettre dans votre rpertoire maison, dans un sous rpertoire
  .pgp les fichiers :



  config.txt
  language.idx
  pgpdoc1.txt
  pgpdoc2.txt
  language.txt
  fr.hlp
  en.hlp
  pgp.hlp



  Enfin, diter le fichier .pgp/config.txt pour y rajouter :



       Language = fr
       CharSet = latin1



  Lisez ensuite .pgp/fr.hlp pour apprendre  vous servir de pgp !


  6.25.  Impression en mode ascii


  Pour l'impression de texte simple, beaucoup d'imprimantes attendent
  des lettres en codage IBM (cp850) comme sous MS DOS.

  Si le fichier est cod en latin1, on doit utiliser  recode
  latin1:ibmpc  ( placer dans les filtres lpr de /etc/ par exemple),
  sous peine de voir imprimer des  alpha   la place de   , et
  autres choses du mme genre.

  Il existe d'autres utilisation au programme recode :  ibmpc:lat1  ou
   lat1:ibmpc  (de ou vers MS-DOS) ou  applemac  pour Macintosh
  (tm).


  6.26.  Unicode/latin/cp... je n'ai pas compris ce dernier paragraphe !


  Voici donc plus d'explications grce  Pablo Sartxaga (srtxg 
  chanae.alphanet.ch) dans un message explicant la diffrence
  Unicode/latin/cp :



   DB>   quand on lance  setfont  sans argument
   DB>   il semble qu'on obtienne le mme effet que setfont -u none

  Normal et logique.

   DB>   --> en un mot la table de conversion  Unicode  est dsactive
   DB>       ce qui transforme le  e accent aig (dec 130)  en  thta (dec 233) 

  Non. Il ne transforme rien du tout, il affiche tout simplement sans
  *aucune* transformation au contraire,  toi de t'assurer que la police
  que tu charges possdes les glyphes  la bonne place par rapport au codage
  de caractres que tu utilises (iso-8859-1).

  Autrement dit si ta police n'est pas iso-8859-1 tu dois dire  setfont de
  faire des mappings; en particulier s ic'est une police qui utilise l'encodage
  DOS cp437 tu fais  setfont -u cp437 nomdelapolice . Moi par exemple j'aime
  beaucoup la police  t.fnt  de la Slackware, et j'ai donc quelque part
  dans /etc/rc.d/* une ligne  setfont -u cp437 t.fnt 

  Ou alors tu modifies la police (il y a un logiciel qui fait cela avec
  interface svgalib, et un autre nomm  chedit  qui permet de crer des
  images an ascii-art, un fichier par caractre (256 fichiers donc), il te
  suffit alors de jongler avec les fichiers pour les changer de place et
  rgnerer la police).  Note cependant que le codage cp437 n'inclut pas
  tous les caractres de iso-8859-1, notamment manquent quasi toutes les
  majuscules accentues, et les lettres  ncessaires en portugais. Tu
  peux toujours modifier la police pour crer ces caractres manquants.

   DB>   sur ma Slackware 3.2,  aucun moment setfont n'apparat dans les scripts
   DB>   de dmarrage ni dans les ~/profiles et autres ~/.bashrc

  Donc c'est la police dans la ROM de la carte video qui est utilise.

   DB>   et pourtant cette
   DB>   conversion est effectue correctement puisque j'ai les accents  l'cran.

  Je suppose que le kernel prsuppose ( juste titre) que la police en ROM vido
  est au codage cp437.

   DB>        une fois que je lance  setfont -u none  je perds donc les accents.

  Normal, car ds lors que tu charges une police tu est suppos savoir ce que
  tu veux (au contraire de la police en ROM o tu n'as pas le choix).

  Autrefois (du temps des 1.2.* et avant) le dfaut de setfont tait cp437
  (et il n'utilisait pas encore des tables Unicode, mais on pouvait
  changer par \e(B et \e(K entre codage cp437 et iso (on peut toujours
  d'ailleurs)), mais maintenant le dfaut est  straight to font , pas de
  conversion.

   DB>            j'en conclue que Linux utilise la police rsidente par dfaut de
   DB>            la carte EGA/VGA

   DB>        [Q] --> comment retrouver cette police ?

  Il y a un programme nomm  restoretextmode  qui est assez populaire
  auprs des possesseurs de certaines cartes graphiques chez qui le
  passage X11 -> console bousille les polices; il permet de faire un dump
  sur un fichier; il faudrait donc que tu le lances avant de modifier la
  police avec setfont. Le paquetage s'appelle quelque chose comme
  SVGATextMode ou quelque chose d'approchant.

   DB>     [Q] --> quelle table appeler pour la remapper et ravoir les accents ?

  setfont -u cp437 policedos

  Ou sinon, si tu ne veux pas lancer setfont et tu veux donc garder la
  police de la carte graphique; essaye un  echo -e \033(B  (l'ennuyant
  c'est que tu dois le faire dans chaque console)

   DB>                 (en gnral setfont -u def.uni (par exemple) renvoie une
   DB>                  erreur : PIO_UNIMAPCLR: Invalid argument et je reste
   DB>                  en caracteres  graphiques )

  Ah ? Chez moi a marche; quels kernel et kbd as-tu ?

  Sinon je te conseille  cp437  plutt que  def , ils font _presque_ la mme
  chose, mais  cp437  est visuellement plus agrable car il remplace les
  caractres non prsents dans la police par les lettres non accentues si c'est
  des lettres, C pour  et R pour  et par un carr blanc pour le reste, ce qui
  permet de garder le formatage et la lecture agrables;  def  lui ne mets
  totu simplement rien pour les caractres manquants, si bien que tu te
  trouves avec des trous, ce qui est l'horreur si tu dites un texte par
  exemple avec vi, puisque le curseur est affich plusieurs caractres
   gauche  cause des caractres de largeur nulle :)

  Essaye aussi la police  t.fnt , elle est assez jolie, toute en rondeurs, je la
  trouve rposante, et quand je dois utiliser un PC avec les polices style
  courier par dfaut je trouve a trs agressif je me demande comment ils
  peuvent travailler avec :)



  Lire aussi les articles de news :  FAQ - les accents franais et
  Usenet  de F.  Yergeau dans les groupes fr.usenet.reponses et
  fr.usenet.8bits  ISO 8859-1 National Character Set FAQ de mike ()
  vlsivie.tuwien.ac.at dans comp.answers .


  6.27.  ncurses


  Rappelons que ncurses est un librairie C qui permet de manipuler
  facilement l'affichage en mode console texte : fentrage, lignes de
  saisie, dition de formulaires, couleurs, caractres  ALT  ascii
  semi-graphique ibm, comme sous dos...


  6.27.1.  Introduction


  La version standard de curses utilise le huitime bit pour la vido
  inverse (voir le flag _STANDOUT dfini dans /usr/include/curses.h).
  Cependant, ncurses semble fonctionner en 8-bits et affiche le iso-
  latin-8859-1 correctement.


  6.27.2.  Les accents


  Remarque: les distributions de Linux sont livres en gnral avec la
  version 1.9.9e de ncurses, or il se trouve que la librairie form de
  cette version est BUGGE (problmes de rafrachissement des fentres).

  Ne pas utiliser la 1.9.9e donc si on veut travailler avec  form  :
  ce bug est d'ailleurs clairement nonc sur le site de ncurses, et je
  m'tonne que ce soit justement cette version qui soit encore livre
  sur la plupart des distributions (RedHat 4.2, 5.0, 5.1, Slackware 3.2,
  Debian 1.9) en tout cas.


  Symptme : la fonction  wgetch() de ncurses renvoie les codes suivants
  :


    je tape '' et wgetch retourne   meta-i     code 233 (decimal)

    "  "   '' "    "        "      meta-h     code 234 (decimal)

    etc

  C'est normal avec les polices iso-8859-1 !

  Il faut installer les  locales  ou mettre  jour sa version de
  ncurses.


  6.28.  Perl


  Si tout d'un coup aprs une mise  jour il raconte :



       (guylhem@victis:guylhem)$ perl
       perl: warning: Setting locale failed for the categories:
               LC_CTYPE LC_COLLATE
       perl: warning: Please check that your locale settings:
               LC_ALL = "fr_FR",
               LC_CTYPE = "ISO-8859-1",
               LC_COLLATE = (unset),
               LANG = "fr"
           are supported and installed on your system.
       perl: warning: Falling back to the "C" locale.
       (guylhem@victis:guylhem)$



  En libc6 le format des fichiers binaires de dfinition des locales a
  (encore) chang : il faut les rgnrer  partir des sources sources
  WG15collection.tar.gz par exemple et des programmes  locale  et 
  localedef  qui sont fournis dans les sources de la libc.

  Sinon on peut galement se passer des locales :



            unset LANG
            unset LC_CTYPE
            unset LC_COLLATE
            export LC_ALL=fr_FR.ISO-8859-1



  6.29.  Installer les locales


  Les  locales  sont des fichiers qui vont modifier le comportement de
  certains programmes pour qu'ils s'adaptent aux  spcificits
  culturelles du pays .

  Cela sert  rsoudre les erreurs rapportes par perl ou une mauvaise
  gestion des accents par ncurses.

    rcuprer pour la libc5 la collection de locales POSIX

    ou pour la libc6, elle est dans l'ajout  glibc-localedata 

    copier dans le rpertoire /usr/share/locale les fichiers fr_FR et
     en_DK (qui est inclus dans fr_FR)

    crer le rpertoire /usr/share/i18n/charmap et copier le fichier
     ISO_8859-1:1987

    faire man localedef et lancer la commande :



                 localedef -f ISO_8859-1:1987 -i fr_FR fr



  Ceci crera l'entre fr dans /usr/share/locale soit :



               /usr/share/locale/fr



  Ce rpertoire devrait maintenant contenir les fichiers :



                LC_COLLATE
                LC_CTYPE
                LC_MESSAGES
                LC_MONETARY
                LC_NUMERIC
                LC_TIME



    lire le fichier  locale.fr  que l'on peut trouver sur le serveur
     ftp.lip6.fr (chercher sous doc, linux...) et dont la traduction
     franaise a t faite par ric DUMAS (hlas ce doc ne traite
     principalement que de LC_MESSAGES.  quand la suite ric ? ;-) )

    complter ventuellement l'initialisation des variables du shell
     comme dcrit dans la section sur bash ou tcsh

    dans un programme, utilisez la fonction  setlocale() (man
     setlocale.3) pour fixer les paramtres locaux CAR le noyau linux
     initialise toujours cette fonction avec l'argument une locale  C 
     (POSIX) donc sans accents !



                 setlocale(LC_CTYPE,"fr_FR");



    a y est ! Les accents sont disponibles dans ncurses.


  6.29.1.  Midnight Commander (mc)


  En changeant de police, il peut arriver que les lignes de cadre soient
  remplaces par divers caractres.

  2 possibilites :

    La police charge ne dispose pas de caractres dits  semi
     graphiques , qui permettent de dessiner des cadres

    Il y a discordance entre la police et sa table de mappage

  Pour le premier cas, la seule solution est de changer de police, mais
  dans le second cas, il suffit en gnral de charger la table avec
  loadunimap par exemple :



                 loadunimap lat1u.uni
                 loadunimap lat5u.uni
                 loadunimap lat9u.uni



  6.30.  Kernel


  Pour mettre un support pour le clavier franais directement dans le
  kernel, ce qui est pratique pour les systmes embarqus ou ne
  dmarrant que sur disquettes, afin de gagner le maximum de place :



       /usr/bin/loadkeys loadkeys --mktable votre-table-de-clavier.map > /usr/src/linux/drivers/char/defkeymap.c



  6.31.  Lilo


  Depuis la version 20, on peut spcifier un clavier (franais, par
  exemple) au dmarrage de LILO.

  Bien sur, cela ne fait qu'changer quelques touches (a/q,m/:,... pour
  un clavier fr) mais cela est assez utile lorsque l'on veut taper  win
  .

  Je vous conseille toutefois de ne pas faire de label utilisant des
  touches qui diffrent entre l'AZERTY et le QWERTY, ne serait-ce que si
  vous devez avoir un jour un autre utilisateur sur votre ordinateur...

  Il est plus simple de faire des labels courts et d'utiliser des
  programmes comme GAG ou GRUB, remplaant fort avantageusement les
  lignes de lilo par un magnifique menu graphique dans le cas de GAG.



  6.32.  Groff (man)


  Sur certaines distributions, le programme man n'est pas configur pour
  afficher les accents.

  Si vous rencontrez ce problme, ditez son fichier de configuration
  (/etc/man.config sur les distributions actuelles) et localisez une
  ligne ressemblant  cela :



       NROFF           /usr/bin/groff -Tascii -mandoc



  Remplacez-l par :



       NROFF           /usr/bin/groff -Tlatin1 -mandoc



  Les vieilles versions de man utilisent aussi col, et le point suivant
  s'applique aussi.


  6.33.  Divers


  Une belle discussion sur le thme de l'ISO-8859-1 et sur  comment
  manipuler les caractres 8-bits  est disponible


  7.  Rglage du clavier pour les applications X

  7.1.  Les xterminaux (xterm, nxterm, rxvt...)


  Les faire fonctionner avec toutes les touches standard du clavier 102
  touches relve du miracle, quant aux accents, seule une recompilation
  vous permettra de les utiliser !

  Pour xterm, essayez de mettre dans votre .Xdefaults :



  XTerm*eightBitInput: true
  XTerm*eightBitOutput: true
  *customization: -color
  XTerm*VT100*Translations: #override\n\
  XTerm*pointerColor: red
  None<Key>Begin: string(0x1b) string("[1~")\n\
  None<Key>End: string(0x1b) string("[4~")\n\
  None<Key>Prior: scroll-back(1,halfpage)\n\
  None<Key>Next: scroll-forw(1,halfpage)\n\
  Shift<Key>Prior: scroll-back(1,page)\n\
  Shift<Key>Next: scroll-forw(1,page)
  XTerm*fontMenu*fontdefault*Label: Default
  XTerm*VT100*font: 9x15
  XTerm*fontMenu*font1*Label: Illisible
  XTerm*VT100*font1: nil2
  XTerm*fontMenu*font2*Label: Minuscule
  XTerm*VT100*font2: 5x7
  XTerm*fontMenu*font3*Label: Petit
  XTerm*VT100*font3: 6x10
  XTerm*fontMenu*font4*Label: Normal
  XTerm*VT100*font4: fixed
  XTerm*fontMenu*font5*Label: Moyen
  XTerm*VT100*font5: 7x13
  XTerm*fontMenu*font6*Label: Tres grand
  XTerm*VT100*font6: 10x20



  Dans .inputrc :



       # pour rxvt
       "\e[7~":beginning-of-line
       "\e[8~":end-of-line
       # pour xterm
       "\e[H": beginning-of-line
       "\e[F": end-of-line



  Mais ces deux solutions ne vous garantissent pas de rsoudre tous les
  problmes de rxvt et de xterm ...

  Pour les rsoudre sans crer de fichiers dans /usr/X11R6/lib/X11/app-
  defaults, je tiens sinon  votre disposition un xiterm, un terminal X
  supportant *TOUTES* les touches des claviers standard, avec Home, End,
  Page_Up (...) et mme le pav numrique, fonctionnant comme en mode
  console, i.e.  Shift-Page_Up permettant de faire dfiler une page,
  voire mieux : le pav numrique reconnaissant enfin la diffrence
  entre Verr. Num allum et Verr. Num teint.

  X international terminal (xiterm pour les intimes) est bien sr sous
  GPL et mis  jour pour suivre paralllement l'volution de rxvt.

  Sur par exemple  mon site vous trouverez donc xiterm, qui remplace
  votre xterm classique en y apportant la couleurs, les accents et les
  touches tendues.

  Pour l'installer, compilez-le, devenez root et tapez :



  rm /usr/X11R6/bin/xterm
  rm /usr/X11R6/lib/X11/app-defaults/xterm
  rm /usr/X11R6/lib/X11/app-defaults/rxvt
  rm /usr/X11R6/lib/X11/app-defaults/Xterm
  rm /usr/X11R6/lib/X11/app-defaults/XTerm
  rm /usr/X11R6/lib/X11/app-defaults/Rxvt
  rm /usr/X11R6/lib/X11/app-defaults/RXvt
  cp xiterm /usr/local/bin

  ln -sf /usr/local/bin/xiterm /usr/X11R6/bin/xterm
  ln -sf /usr/local/bin/xiterm /usr/X11R6/bin/rxvt



  7.2.  Les applications Motif


  L, je n'ai malheureusement aucun remde miracle !

  Il faudrait modifier le code source, code indiqu plus haut, pour
  remplacer XLookupString par XmLookupString.

  Utilisez les possibilits du fichier french au lieu des touches mortes
  (AltGr (voyelle) : voyelle accent circonflexe... ) !


  7.3.  Le manuel


  Pablo Saratxaga tient  votre disposition un xman modifi pour qu'il
  supporte la variable  LANG  et puisse afficher les pages en d'autres
  langues qu'anglais.

  Il est disponible sur le lip6 en sources ou en binaires


  7.4.  NumLock


  Pour l'activer sous X, mettre en commentaire ServerNumLock dans la
  section keyboard de XF86Config, puis rajouter au dessous Xleds 2, ce
  qui allumera la led.

  Attention, ce conseil ne s'applique que lorsque l'on n'utilise pas
  xkb, i.e. qu'on met XkbDisable dans XF86Config...


  7.5.  XDM


  /etc/X11/xdm/Xresources sert  ne rencontrer aucun problme avec les
  touches  spciales  (Home, End ...) sous X.



  xlogin*login.translations: #override\
        Ctrl<Key>R: abort-display() \n\
        <Key>BackSpace: delete-previous-character() \n\
        <Key>Home: move-to-begining() \n\
        <Key>Delete: delete-character() \n\
        <Key>End: move-to-end() \n\
        <Key>Left: move-backward-character() \n\
        <Key>Return: set-session-argument() finish-field() \n\
        <Key>Right: move-forward-character()



  8.  Remerciements


  Ce document ne serait pas ce qu'il est sans l'aide de Nat Makarvitch
  (nat  nataa.fr.eu.org) qui l'a relu et m'a aid  le modifier de
  nombreuses fois.

  Un excellent document plus gnrique, traitant de l'installation par
  ex, est le Guide du Rootard, disponible sur freenix ou le lip6

  Remercions enfin par ordre alphabtique ces contributeurs :

  Jean-Michel Antoine
  Michel Billaud
  Chmouel Boudjnah
  Stephane Bortzmeyer
  Denis Braussen
  Rmy Card
  Julien Cassaigne
  Xavier Cazin
  Laurent Chemla
  Ren Cougnenc
  Bruno Cornec
  Yann Dirson
  ric Dubreuil
  ric Dumas
  Arnaud Gomes-do-Vale
  Pierre Ficheux
  Laurent Frigault
  Hugolino
  Antoine Leca
  Frederic Lepied
  Jeannot Langlois
  Stephane Marzloff
  Marc Merlin
  Thomas Parmelan
  Frdric Petit
  Thomas Quinot
  David Robert
  Olivier Robert
  Benjamin Ryzman
  Pablo Saratxaga
  Julien Simon
  Loc Tortay
  J.M. Vansteene



  Surtout, si je vous oublie, signalez-le moi !  De mme si vous ne
  voulez plus figurer dans cette liste...


  Envoyez moi vos suggestions et modifications (guylhem  oeil.qc.ca),
  je me ferai un plaisir de les intgrer dans les prochaines versions !

  Signalez-moi aussi les erreurs : cet HOWTO est en perptuel
  changement, avec des nouveauts incluses  chaque version ; des
  erreurs peuvent facilement s'y glisser !



F FRANCOPH.;1                       	Francophones-HOWTO
  German HOWTO
  Winfried Trmper <winni@xpilot.org>
  v1.6, 19 March 1997

  Dieses Dokument enthlt Tips und Informationen fr deutschsprachige
  Linux-Benutzer. Note to English readers: this document explains the
  German-specific aspects of Linux.]
  ______________________________________________________________________

  Table of Contents



  1. ber das German-HOWTO

     1.1 Benutzung auf eigene Gefahr
     1.2 Zielgruppe
     1.3 Thematischer Umfang
        1.3.1 Was ist neu in dieser Version?
           1.3.1.1 Version 1.4
           1.3.1.2 Version 1.3
           1.3.1.3 Version 1.2
           1.3.1.4 Version 1.1
     1.4 Verfgbarkeit
     1.5 Rckkopplung
     1.6 Urheberrechte
     1.7 Danksagung

  2. Rstzeug und generelle Bemerkungen

     2.1 Warum sind deutsche Anpassungen notwendig?
     2.2 Notation
     2.3 Empfohlene Begleitliteratur
     2.4 Kurzes Glossar

  3. Menschen

     3.1 Benutzergruppen
     3.2 Linux-Supporter
     3.3 Online Chat (IRC)
     3.4 Newsgroups

  4. Dokumentation

     4.1 Deutsches Linux HOWTO Projekt (DLHP)
     4.2 Bcher
     4.3 Deutschsprachige Manual-Pages
     4.4 Diverses
        4.4.1 GNU emacs reference card
        4.4.2 Crash-Kurs Linux

  5. Das System

     5.1 Konsole
        5.1.1 Tastenbelegung der Textkonsolen
           5.1.1.1 Deutschland
           5.1.1.2 Schweiz
           5.1.1.3 stereich
           5.1.1.4 Lnderbergreifende Einstellungen
              5.1.1.4.1 Deadkeys
              5.1.1.4.2 Compose
              5.1.1.4.3 Unicode
     5.2 Zeichensatz fr die Textkonsolen
        5.2.1 Unicode
     5.3 Tastenbelegung von `XFree86'
        5.3.1 Version 2.1:
        5.3.2 Version 3.1
        5.3.3 Version 3.2 und hher:
        5.3.4 Alle Versionen:
           5.3.4.1 Unicode
     5.4 Zeitzonen
        5.4.1 DOS
        5.4.2 Linux

  6. Anwendungssoftware

     6.1 Auer Konkurenz ...
        6.1.1 Zeichenstze ohne Umlaute
        6.1.2 Eigene Sppchen
     6.2 Die Ausreier
        6.2.1 readline und Verwandte (z.B.
        6.2.2 telnet
        6.2.3 ytalk
        6.2.4 selection
        6.2.5 dosemu
        6.2.6 emacs
        6.2.7 less
        6.2.8 pine
        6.2.9 joe
        6.2.10 elm
        6.2.11 nn
        6.2.12 lynx
        6.2.13 gslp
        6.2.14 xfig
     6.3 Weiterfhrende Tips
        6.3.1 emacs
        6.3.2 TeX/LaTeX
           6.3.2.1 Verarbeitung von Umlauten
              6.3.2.1.1 LaTeX 2e und hher
              6.3.2.1.2 plain-TeX, LaTeX2.09
           6.3.2.2 Layout
           6.3.2.3 Deutsche Wortrennung
        6.3.3 Rechtschreibprfung mit deutschem Wrterbuch
           6.3.3.1 Die Wortlisten
           6.3.3.2 Das Rechtschreibprogramm

  7. Textdateien

     7.1 Das Papierformat DIN A4
        7.1.1 xdvi
        7.1.2 ghostview
        7.1.3 gs
        7.1.4 dvips
        7.1.5 ImageMagick
     7.2 Konvertierung von DOS- und Mac-Texten nach Linux
        7.2.1 Die Zeilenenden
        7.2.2 Die Zeichenstze
     7.3 Drucken
     7.4 PostScript

  8. Programmierung

     8.1 National Language Support (NLS)
     8.2 bersetzung von GNU-Programmen
     8.3 ncurses
     8.4 Erzeugung von PostScript

  9. Anhang

     9.1 Erklrende bersetzung einiger technischer Begriffe


  ______________________________________________________________________

  1.  ber das German-HOWTO


  1.1.  Benutzung auf eigene Gefahr

  Text, Abbildungen und Programme in diesem HOWTO wurden mit groer
  Sorgfalt erarbeitet. Dennoch sind Fehler nicht ganz auszuschlieen.
  Aus diesem Grund sind die im vorliegenden HOWTO enthaltenen Angaben
  mit keiner Verpflichtung oder Garantie irgendeiner Art verbunden.
  Kurz: Benutzung auf eigene Gefahr.

  1.2.  Zielgruppe

  Das German-HOWTO wendet sich an Linux-Benutzer, deren Linux-
  Installation nicht oder nur teilweise an "deutsche" Begebenheiten
  angepat ist. Die Forderung der Benutzer sollte natrlich sein, da
  alle Linux-Distributionen lnderspezifische Einstellungen von sich aus
  bercksichtigen. Schlielich ist dies der Zweck der Distributionen:
  anhand einfacher Informationen das System weitmglichst zu
  konfigurieren, ohne da der Benutzer erst Guru werden mu.

  Kurz: wrden alle Distributionen ihre Hausaufgaben machen, wre diese
  HOWTO erheblich krzer.



  1.3.  Thematischer Umfang

  Dieses HOWTO beschrnkt sich ausschlielich auf die Beschreibung der
  fr Deutschland spezifischen Konfiguration von Linux und seinen
  Programmen.

  Es wird weder eine allgemeine deutsche Einfhrung in Linux gegeben,
  noch wird die vorhandene Original-Dokumentation durch dieses HOWTO
  berflssig.


  1.3.1.  Was ist neu in dieser Version?



  1.3.1.1.  Version 1.4

  Korrekturen an 1.3.


  1.3.1.2.  Version 1.3

  Komplette Neufassung des HOWTOs. Jetzt auch ausdrcklich fr den
  gesamten deutschsprachigen Raum.


  1.3.1.3.  Version 1.2

  ?


  1.3.1.4.  Version 1.1

  Konvertierung in das Format linuxdoc-sgml.


  1.4.  Verfgbarkeit

  Dieses HOWTO ist offizieller Teil des `Linux Documentation Projects'
  (LDP) und somit wie alle anderen Dokumente des LPD erhltlich. Nhere
  Informationen findet man unter den URLs


       <http://www.jura.uni-sb.de/LDP/>

       <http://www.uni-paderborn.de/Linux/mdw/>


  oder im Verzeichnis /usr/doc/HOWTO/ auf der eigenen Festplatte.


  1.5.  Rckkopplung

  Korrekturen von Tippfehlern und Verbesserungsvorschlge direkt an mich
  schicken: winni@xpilot.org.

  Einstellungen aus MAKEFILEs nehme ich nicht mehr entgegen: sie sind
  direkt an den Hersteller der Linux-Distribution zu richten.  Wo kmen
  wir hin, wenn das German HOWTO zur allgemeinen Sammelstelle fr Bug-
  Fixes wrde?

  Man verschone mich mit ber das HOWTO hinausgehende Fragen wie z.B.
  `Warum  strzt ispell ab?'. Ich stehe aus gutem Grund nicht auf der
  Liste der deutschen Linux-Untersttzer und beantworte auch keine
  Fragen per e-mail.



  1.6.  Urheberrechte

  Copyright (1994,1995,1996,1997) Winfried Trmper <winni@xpilot.org>

  Das German-HOWTO darf im ganzen oder teilweise vervielfltigt und
  vertrieben werden, sowohl in gedruckter als auch in elektronischer
  Form, solange dieses Copyright beibehalten wird. Kommerzieller
  Vertrieb ist in diesem Sinne ausdrcklich erlaubt, solange hchstens
  (anteilige) Kosten fr die Datentrger berechnet werden.

  Note to English readers:

  The German-HOWTO may be reproduced and distributed in whole or in
  part, in any medium physical or electronic, as long as the above
  copyright notice is retained on all copies. Commercial redistribution
  under the GPL is allowed and encouraged.


  1.7.  Danksagung

  Folgende Personen haben durch Vorschlge am German-HOWTO mitgewirkt:



  Bernhard Aceman <a2607425@athena.rrz.Uni-Koeln.DE>
  Andreas Bagge <Andreas_Bagge@h2.maus.de>
  Andries Brouwer <Andries.Brouwer@cwi.nl>
  Karl Brodowsky <bk1@aixcomp2.urz.uni-heidelberg.de>
  Bernhard Buettner <ben@dl6rai.muc.de>
  Gert Doering <gert@greenie.muc.de>
  Karl Eichwalder <ke@ke.central.de>
  David Frey <David.Frey@eos.lugs.ch>
  Jochen Hein <jochen.hein@delphi.central.de>
  Michael Hinz <michael@fagmed.uit.no>
  Ulli Horlacher <framstag@belwue.de>
  "Markus G. Kuhn" <kuhn@cs.purdue.edu>
  Detlef Lannert <lannert@uni-duesseldorf.de>
  Anselm Lingnau <lingnau@tm.informatik.uni-frankfurt.de>
  Nat Makarevitch <nat@nataa.frmug.fr.net>
  Sebastian Matschke
  Frerk Meyer <frerk@educat.hu-berlin.de>
  Reiner Miericke <reiner@schildi.xnc.com>
  Uwe Mnch <muench@ph-cip.uni-koeln.de>
  Nils Naumann <naumann@unileoben.ac.at>
  Danilo Rene Neuber <daneuber@sbox.tu-graz.ac.at>
  Sven Neuhaus <sven%fuzzy@fuzzy.ping.de>
  Thomas Ploss <plossts@cip01.mathematik.uni-stuttgart.de>
  Roland Rosenfeld <roland@spinnaker.rhein.de>
  Sven Rudolph <sr1@irz301.inf.tu-dresden.de>
  Dietrich Schmidt <diet@sfb256.iam.uni-bonn.de>
  Ingo Schroeck <ioschroe@track.informatik.uni-stuttgart.de>
  Juergen Steiner <js@barbar.augusta.de>
  Guenter Stueck <guenter@gst0hb.north.de>
  Martin Schulze <joey@finlandia.infodrom.north.de>
  Jan Vroonhof <vroonhof@math.ethz.ch>



  2.  Rstzeug und generelle Bemerkungen



  2.1.  Warum sind deutsche Anpassungen notwendig?

  Linux wird von einer weltweiten Gemeinde von Hackern im Internet
  entwickelt. Obwohl Linux ursprnglich aus Finnland kommt, ist Englisch
  gemeinsame Sprache und Ausgangspunkt bei der Programmierung sind meist
  amerikanische Standards (Papierformat "letter", Zeichensatz ohne
  Umlaute, usw.).

  Gerade weil die Linux-Gemeinde weltweit operiert, sind
  landesspezifische Einstellungen an vielen Stellen vorgesehen und
  mssen lediglich aktiviert werden. Das ist schon alles.


  2.2.  Notation

  Tasten werden durch ihre Aufschrift in spitzen Klammern markiert.



  2.3.  Empfohlene Begleitliteratur

  Das Linux Configuration-HOWTO (to appear) erlutert die Handhabung der
  erwhnten Konfigurationsdateien.


  Im Linux Keyboard- und Keystroke-HOWTO findet man alle "Tricks" fr
  die Tastatur.


  2.4.  Kurzes Glossar


     ASCII
        ist ein 7-bit Zeichensatz und enthlt 2^7 = 2*2*2*2*2*2*2 = 128
        Zeichen, was gerade mal fr a-z, A-Z, 0-9 und einige wichtige
        Zeichen ausreicht. Das amerikanische Alphabet halt.


     8-bit-clean
        ein 8-bit Zeichensatz umfat 128*2 = 256 Zeichen und kann einige
        Sonderzeichen aufnehmen. Ist ein Programm in der Lage mit einen
        8-bit Zeichensatz umzugehen, so bezeichnet man es auch als
        `8-bit clean'. Ist ein Programm nicht 8-bit clean, so erscheinen
        oft anstelle der Umlaute `' die Zeichen `dv|'.

        Man beachte den subtilen Unterschied zwischen `8bit clean' und
        `localized': Ein 8bit cleanes Programm braucht nichts von seiner
        Locale (und dem verwendeten Zeichensatz!) zu wissen; es muss
        ``nur'' alle 256 Zeichen bearbeiten knnen.  Handkehrum kann ein
        Programm localized sein, aber trotzdem nicht 8bit clean sein, da
        es gewisse Zeichen verschluckt (z.B. alle Control-Codes).


     `ISO-latin1' oder `ISO-8859-1'
        Internationaler 8-bit Zeichensatz, enthlt Umlaute und viele
        Sonderzeichen fr die `westeuropischen' Sprachen.  (Die
        osteuropischen und weitere haben andere Endziffern.)


     Unicode
        Unicode ist ein Standard, der Zeichen aus den
        unterschiedlichsten Sprachen der Lnder dieser Welt enthlt.
        Dazu werden die Zeichenpositionen in einem 32-bit Zeichensatz
        definiert, was noch lngst nicht abgeschlossen ist. Gngigere
        Zeichenstze (wie die Zeichen der europischen Sprachfamilien)
        sind als 16-bit Untergruppen festgelegt, die in kompatibler
        Weise als einzelne 16-bit Unicode-Zeichenstze verwendet werden
        knnen. Wenn hier von einem Unicode-Zeichensatz die Rede ist,
        ist die 16-bit Untergruppe der europischen Sprachfamilien
        gemeint.



     POSIX
        POSIX steht fr `Portable Operating System Interface for UniX'.
        Normierte Schnittstellenbeschreibung zu Kernel- und libc-
        Funktionen (POSIX.1) resp. zu den Grundutilities (sh, ed, vi,
        awk, cut, ...) (POSIX.2).


     Locale
        Ist die formale Beschreibung eines Teils der kulturellen
        Eigenheiten fr ein Land oder einen Spracheraum und die vom
        jeweiligen Programm bentigten bersetzten Texte.


     Internationalization
        Vernderung eines Programms zur Untersttzung mehrerer Sprachen.



     i18n
        Abkrzung fr internationalization. Da viele Leute zu faul waren
        dieses lange Wort immer wieder auszuschreiben, wurden einfach
        der erste und letzte Buchstabe belassen und der Zwischenraum
        durch die Anzahl fehlender Buchstaben ersetzt.


     Localisation
        Mit localisation wird der Proze bezeichnt, einem bereits
        internationalisierten Programm alle bentigten Informationen zur
        Verfgung zu stellen, um den nationalen Besonderheiten,
        bezglich der Sprache und kulturellen Umfeld zu entsprechen.
        Kurz gesagt, i18n ist der eigentliche bersetzungsproze.

        Der Nutzer kann das lokalisieren eines Programms erreichen,
        indem er besonderen Umgebungsvariablen geeignete Werte zuweist,
        welche die zu benutzende `locale' angeben.


     l10n
        Abkrzung fr localization, die wie i18n entstanden ist.



  3.  Menschen


  3.1.  Benutzergruppen

  In vielen Stdten haben sich Linux-Benutzer zu sogenannten Linux User
  Groups (LUG) zusammengetan. Diese Benutzergruppen sind offen fr jeden
  und halten regelmige Treffen ab. Sie sind der ideale Treffpunkt fr
  all diejenigen, die sich nicht nur im Cyberspace mit anderen Linuxern
  austauschen wollen. Eine bersicht befindet sich unter der URL

       <http://www.schwaben.de/linux/LUG_in_de.html>



  3.2.  Linux-Supporter

  Eine Liste mit Ansprechpartnern, die Anfngern in einem begrenzten
  Rahmen kostenlosen Hilfestellung geben, findet sich unter der URL:

       <http://localhost.ruhr.de/Linux-Support.html>


  Ziel ist die Verbreitung von Linux als Betriebssystem zu frdern.


  3.3.  Online Chat (IRC)

  Im IRC-Kanal #LinuxGER halten sich einige deutsche Linux-Aktivisten
  auf.  Nhere Informationen unter der URL:

       <http://www.infodrom.north.de/Linux/LinuxGER/>



  3.4.  Newsgroups

  Frher von mir als kostenlose Hotlines degradiert, habe ich die
  Newsgroups in dieser Version anders eingeordnet. Hotline hat immer den
  Klang einer Stelle, bei der man auch ohne Lesen des Handbuchs Fragen
  stellen kann. Obwohl einige Handbcher nun wirklich nicht das gelbe
  vom Ei sind, sollte man die newgroups mit bermigen Fragen
  verschonen:

       de.comp.os.linux.hardware <news:de.comp.os.linux.hardware>

       de.comp.os.linux.misc <news:de.comp.os.linux.misc>

       de.comp.os.linux.x <news:de.comp.os.linux.x>

       de.comp.os.linux.networking
       <news:de.comp.os.linux.networking>


  Stattdessen sind die Newsgroup ein prima Forum, in denen man die nicht
  ganz alltglichen Dinge diskutieren kann.



  4.  Dokumentation


  4.1.  Deutsches Linux HOWTO Projekt (DLHP)

  Das Deutsche Linux HOWTO Projekt beschftigt sich mit der bersetzung
  der originalen Linux HOWTOs ins Deutsche. Unter der URL

       <http://www.tu-harburg.de/~semb2204/dlhp/>


  kann man eine Liste aller bersetzten HOWTOs und nhere Informationen
  zum Projekt abrufen.



  4.2.  Bcher

  Mittlerweile gibt es sehr viele deutschsprachige Bcher zu Linux,
  weshalb ich die bersicht aus diesem HOWTO herausgenommen habe.

  Martin Schulze <joey@finlandia.infodrom.north.de> unterhlt eine Liste
  mit deutschen Bchern rund um Linux, die unter der URL:

       <http://www.infodrom.north.de/Linux/Buecher/>


  erhltlich ist und die in der Newsgroup de.comp.os.linux.misc
  regelmig gepostet wird.



  4.3.  Deutschsprachige Manual-Pages

  Eine Gruppe von Freiwilligen hat sich die bersetzung der englischen
  Manual-Pages vorgenommen. Obwohl bereits ein ansehnlicher Teil
  bersetzt ist, werden weiterhin bersetzer gesucht. Details unter der
  URL:

       <http://www.Infodrom.North.DE/Linux/manpages-de/>



  4.4.  Diverses


  4.4.1.  GNU emacs reference card

  Eine deutsche Version der uerst ntzlichen Referenzkarte zum
  Texteditor `emacs' findet man unter der URL:

       <http://www.inf.tu-dresden.de/~sr1/projects/emacs-ref
       card/index.html>



  4.4.2.  Crash-Kurs Linux

  Wer gerne knappe Bescheibungen mag, sollte einen Blick in den von mir
  geschriebenen `Crash-Kurs Linux' werfen.

       <http://www.uni-koeln.de/themen/linux/ckl/>



  5.  Das System


  5.1.  Konsole

  Die Konsole ist die Tastatur und der Bildschirm eines Linux-Systems;
  in der Regel also der VGA-Monitor plus Tastatur.

  Linux tuscht den Programmen mehr als eine Konsole vor und der
  Benutzer kann dann mittels Tastenkombination <Alt-Ctrl-F1> - <Alt-
  Ctrl-F8> zwischen diesen hin- und herblenden. Die vorgetuschten
  Konsolen nennt man virtuelle Konsolen.



         ||                             ||
         |  Escape the     |<--  setfont    loadkeys  -->|^1234567890  123 |
         |  Gates of hell. |                             | qwertzuiop+ 567 |
         |                 |=======+             +=======| asdfghjkl# 789 |
         |  Use Linux.     |       |             |       | <yxcvbnm,.  0,  |
         |                 |       |             |       |__________________|
         |_________________|       |             |
                 MMM               |             |
              MMMMMMMMM            |             |             +---<---< Internet
                                   |             |             |
                           +-------*-------------*------+      |
                           |        \           /       |      |      X11 ------+
                           |         \         /        |      |       |        |
                           |  Betriebssystemkern Linux  |   telnetd  xterm      |
         Alt+Ctrl F1F8 ----------------/ <>           |       \\   ///        |
         als Schalter      |           /                |        \\ ///         |
                           |     /    |          \      +-------+  +-------+ |
                           |    /     |           \     | ptyp1 |     | ptyef | |
                           |++    +++   +| |
                           | tty0 | tty1 | . . . | tty8 | ttyp1 |   | ttyef | |
                           +------+------+ - - - +------+-------+ - - +-------+ |
                             |      |              ^              |             |
                          bash      emacs          |              less          |
                                                   |                            |
                                                    `---------------------------'

  Die nachfolgend beschriebenen Einstellungen betreffen alle virtuellen
  Konsolen gleichzeitig. Welches die "richtige" Datei fr die Kommandos
  ist, darber kann nur das Handbuch der eigenen Distribution Auskunft
  geben. (Tip: das Configuration HOWTO kann in vielen Fllen helfen.)

  Weiterfhrende Literatur: Keystroke-HOWTO (engl.).

  Es ist unter Linux brigens nicht notwendig, die virtuellen
  Bildschirme mit dem Befehl `stty pass8' in den 8-bit Modus zu schalten
  - das sind sie nmlich von Hause aus.



  5.1.1.  Tastenbelegung der Textkonsolen

  Fr die unterschiedlichen Tastaturen der verschiedenen Lnder liegen
  im Verzeichnis `/usr/lib/kbd/keytables' vorgefertigte
  Konfigurationsdateien. Mit dem Kommando `loadkeys' kann man eine
  solche Datei in den Linux-Kernel laden und dadurch den Tasten
  bestimmte Zeichen zuordnen.

  Um Miverstndnissen vorzubeugen: man ordnet den Tasten keine
  Bedeutungen zu, sondern nur bestimmte Zeichen. Dadurch ist
  sichergestellt, da die Tastatur auch beim Arbeiten mit entfernten
  Rechnern funktioniert, denn Zeichen kann man ber jede Art von
  Netzwerkverbindung bertragen. Dagegen wre eine direkte Abfrage der
  Tastatur-Hardware (so wie unter DOS) ber ein Netzwerk nicht mglich -
  es ist ein Widerspruch in sich.

  Die Bedeutung eines Zeichens (und damit einer Taste) kann von Programm
  zu Programm leicht unterschiedlich sein und die Kunst liegt in der
  effektiven, bzw. komfortablen Konfiguration der Bedeutung. Die
  lnderspezifischen Aspekte werden im kommenden Kapitel behandelt.



  5.1.1.1.  Deutschland

  Im einfachsten Falle werden Benutzer einer deutschen Tastatur mit der
  Belegung `de-latin1-nodeadkeys.map' zufrieden sein:

  Beispiel:


       loadkeys   de-latin1-nodeadkeys.map



  5.1.1.2.  Schweiz

  Geeignete Tastenbelegungen fr die Schweiz sind `sf-latin1.map'
  (swiss-french) und `sg-latin1.map' (swiss-german).

  In der Deutschschweiz gibt es 2 verschiedene Tastaturlayouts, bei
  denen wenige Tasten verschieden beschriftet sind (eckige Klammern,
  @-Zeichen an verschiedenen Orten).



  5.1.1.3.  stereich

  ?


  5.1.1.4.  Lnderbergreifende Einstellungen

  Die Tastaturtabellen sind Textdateien, die sich mit dem persnlichen
  Lieblingseditor bearbeiten lassen. Um z.B. die franzsischen
  Anfhrungszeichen auf <AltGr .> und <AltGr -> zu legen, ergnzt man an
  den entsprechenden Stellen:



       keycode 51 = comma semicolon guillemotright
       keycode 52 = period colon guillemotleft

       control keycode 105 = Meta_b
       control keycode 106 = Meta_f



  Die letzten beiden Eintrge ermglichen wortweises Springen auf der
  Kommandozeile mit Strg-Cursortaste. Als Anregung fr eigene
  Ergnzungen hier eine Tabelle mit allen (?) symbolischen Namen:



       "  quotedbl     '  apostrophe   `  grave        ~  asciitilde
       ^  asciicircum  _  underscore   !  exclam       ?  question
       #  numbersign   $  dollar       %  percent      &  ampersand
       |  bar          @  at           +  plus         -  minus
       *  asterisk     /  slash        \  backslash    .  period
       ,  comma        :  colon        ;  semicolon    <  less
       =  equal        >  greater      (  parenleft    )  parenright
       [  bracketleft  ]  bracketright {  braceleft    }  braceright

         exclamdown     cent           sterling       currency
         yen            brokenbar      section      "  diaeresis
         copyright      ordfeminine  <  guillemotleft
         notsign        hyphen         registered
         macron         degree         plusminus      twosuperior
         threesuperior                  acute          mu
         paragraph      periodcentered                 cedilla
         onesuperior    masculine    >  guillemotright
         onequarter     onehalf        threequarters
         questiondown   Agrave         Aacute         Acircumflex
         Atilde         Adiaeresis   A  Aring          AE
         Ccedilla       Egrave         Eacute       ^E  Ecircumflex
         Ediaeresis     Igrave         Iacute         Icircumflex
         Idiaeresis     ETH            Ntilde         Ograve
         Oacute         Ocircumflex    Otilde         Odiaeresis
         multiply       Ooblique       Ugrave         Uacute
       ^U  Ucircumflex    Udiaeresis     Yacute       |O  THORN
         ssharp         agrave         aacute         acircumflex
         atilde         adiaeresis     aring          ae
         ccedilla       egrave         eacute         ecircumflex
         ediaeresis     igrave         iacute         icircumflex
         idiaeresis   xo  eth            ntild          ograve
         oacute         ocircumflex    otilde         odiaeresis
         division       oslash         ugrave         uacute
         ucircumflex    udiaeresis     yacute       |o  thorn
       "y  ydiaeresis

       nul     Tab     Escape  space   BackSpace
       Insert  Remove  Home    End     PageUp
       Down    Left    Right   Up      PageDown
       Macro   Help    Do      Pause   Linefeed


  [Die Tabelle nicht ganz korrekt, da einige Zeichen vom
  Formatierungswerkzeug nicht verarbeitet werden. Wir arbeiten daran.]

  Die keytables(5), die dumpkeys(1) und loadkeys(1) Manpages erlutern
  welche Symbole gltig sind, insbesondere


       dumpkeys --long-info



  erzeugt eine Liste aller bekannten Zeichennamen und Modifier.



  5.1.1.4.1.  Deadkeys


  Mit Deadkey wird eine Taste bezeichnet, bei deren Bettigung das
  Zeichen zunchst zurckgehalten wird. Das nachfolgend eingegebene
  Zeichen wird quasi ber das zuerst eingegeben Zeichen gedruckt, falls
  die Kombination Sinn ergibt. Ansonsten werden beide Zeichen
  nacheinander ausgegeben.

  Beispiel: ist die Tilde als Deadkey konfiguriert, so ergibt <~> <a>
  ein  (a mit Tilde darber).


  5.1.1.4.2.  Compose

  Alternativ zu den Deadkeys kann man auch mit der <Compose>-Taste
  arbeiten: sie druckt zwei nacheinander eingetippte Zeichen
  bereinander. So ergibt die Tastenfolge <Compose> <~> <a> ein ,
  whrend ein <~> <a> weiterhin ~a anzeigt.

  Um <Compose> auf die an vielen neuen Tastaturen vorzufindenden
  zustzlichen Tasten zu legen, kann man z.B. konfigurieren:



       keycode 127 = Compose



  Bei mir trgt diese Taste das Symbol "Quadrat mit Pfeil in der linken
  oberen Ecke". Die Taste mit dem Fenster-Symbol (frher: Diamant-Symbol
  oder Meta) hat die Nr. 125.


  5.1.1.4.3.  Unicode

  Bei Verwendung eines Unicode-Zeichensatz sollte man auch die Tastatur
  in den Unicode-Modus schalten:



       kbd_mode -u



  5.2.  Zeichensatz fr die Textkonsolen

  Damit die lnderspezifischen Zeichen berhaupt auf dem Bildschirm
  dargestellt werden knnen, mu der entsprechende Zeichensatz fr den
  Bildschirm geladen werden. Akzeptable Ergebnisse erzielt man in der
  Regel mit `lat1u-16.psf', einem 16-Punkt hohen UNIcode-Zeichensatz.
  Der zugehrige Befehl zum Laden sieht z.B. so aus:


       setfont /usr/lib/kbd/consolefonts/lat1u-16.psf



  Die Details sind wiederum der Dokumentation der eigenen Distribution
  zu entnehmen.


  5.2.1.  Unicode

  Um den Unicode-Zeichensatz fr die Anwendungsprogramme freizugeben mu
  man die Zeichenfolge ESC ( K an den virtuellen Bildschirm senden. Dies
  kann z.B. durch die Befehlsfolge



       for i in  1 2 3 4 5 6 7 8
       do
           echo -n -e "\033(K" > /dev/tty$i
       done



  geschehen. Diese Lsung ist allerdings aus verschiedenen Grnden sub-
  optimal.



  5.3.  Tastenbelegung von `XFree86'

  `XFree86' ermglicht den Betrieb von Programmen, die das `X Window
  System' bentigen. In Verbindung mit einem sogennanten
  `Windowmanager', der das Look&Feel bestimmt, stellt es die grafische
  Benutzeroberflche unter Linux zur Verfgung.

  Oft wird empfohlen, die Tastenbelegung des XFree86 durch die Datei
  ~/.Xmodmap oder mit dem Befehl xmodmap zu konfigurieren. Dies ist
  nicht erforderlich, sondern unntig kompliziert. Tatschlich ist nur
  ein Eintrag in der Konfigurationsdatei des XFree86 notwendig, um die
  <AltGr> Taste zu aktivieren. Die Vorgehensweise unterscheidet sich fr
  die verschiedenen Versionen:



  5.3.1.  Version 2.1:

  Konfigurationsdatei: /usr/X11/lib/X11/Xconfig

  Mit Ausnahme der in der Tastaturbelegung vereinbarten Deadkeys werden
  die Tasten genau wie auf der Textkonsole belegt.  Die Deadkeys (s.o.)
  sind unter Version 2.1 tatschlich `dead' - aber leider ganz, nicht
  nur `halb'.  Die Freigabe der Alt-Tasten mu manuell vorgenommen
  werden, dazu trgt man im Abschnitt Keyboard ein:


       LeftAlt     Meta
       RightAlt    ModeShift



  5.3.2.  Version 3.1

  Konfigurationsdateien: /etc/X11/XF86Config und /etc/XF86Config

  Die Tastatur ist genau wie auf der Konsole belegt, auch die Deadkeys
  und <Compose> funktionieren (falls als solche konfiguriert).

  Um allerdings in den Genu der <Alt >- und <AltGr >-Tasten zu kommen,
  mu man bei der Erzeugung der Konfigurationsdatei (Programm
  xf86config) folgende Frage mit `y' (yes) beantworten:


       Do you want to enable these bindings for the Alt keys?



  Alternativ kann man die entsprechenden Einstellungen auch per Hand im
  Abschnitt Section "Keyboard" vornehmen:


           LeftAlt     Meta
           RightAlt    ModeShift



  `RightAlt ModeShift' aktiviert die <AltGr>-Taste und `LeftAlt Meta'
  sorgt fr eine Emulation der <Meta>-Taste (bentigen z.B. die
  Programme emacs und bash).


  5.3.3.  Version 3.2 und hher:

  Konfigurationsdateien: /etc/X11/XF86Config und /etc/XF86Config

  Hat man eine Konfigurationsdatei der Version 3.1 oder will man es sich
  besonders einfach machen, dann verfhrt man wie oben beschrieben und
  ergnzt im Abschnitt Section "Keyboard" lediglich



           XkbDisable



  Dadurch wird die unter Linux etwas kompliziert anmutende Xkbd-Technik
  abgeschaltet und das X liest stattdessen die Tastaturbelegung der
  Textkonsolen (auf diese Weise braucht man nur eine Sache zu
  konfigurieren).  quivalent kann man bei der Erzeugung der
  Konfigurationsdatei (Programm xf86config) folgende Frage mit `n' (no)
  beantworten:



           Do you want to use XKB?


  Beantwortet man diese Frage mit `y' (yes), dann sind in der
  Konfigurationsdatei folgende Eintrge zu entkommentieren (d.h. das
  `#'-Zeichen ist zu entfernen):



       #    XkbLayout   "de"
       #    XkbVariant  "nodeadkeys"



  5.3.4.  Alle Versionen:

  Sondermodelle fertigt man mit dem Befehl



       xmodmap -pke > ~/.Xmodmap



  und einem Editor nach Wahl an. Die globale Konfigurationsdatei ist
  /etc/X11/Xmodmap. Leider gibt es keine empfehlenswerte Software zur
  komfortableren Konfiguration der Tastatur (xkeycaps ist katastrophal
  in Sachen Benutzerfhrung).

  Empfehlenswert fr die Xmodmap sind etwa



       ! Freigabe der Compose-Taste
       keycode 117 = Multi_key
       ! Punkt auf das Komma des Ziffern-Blocks
       keycode 91 = period
       ! Was um alles in der Welt ist die Super-Taste?
       keycode 115 = Super_L
       ! Fr diejenigen, die ^? als Backspace auf der Konsole konfiguriert haben.
       keycode 22 = BackSpace



  5.3.4.1.  Unicode

  ?


  5.4.  Zeitzonen

  Die ganze Welt ist in Zeitzonen unterteilt, innerhalb derer eine
  einheitliche Zeit gilt (unabhngig von der Zeit einer Sonnenuhr an dem
  betreffenden Ort). Bezugspunkt fr die Einteilung ist die Universal
  Time, kurz UTC.

  Zu einer Zeitzone gehren bestimmte Regeln, wie z.B. die Umstellung
  von Sommer- auf Winterzeit. Linux kann diese Regeln automatisch
  bercksichtigen.

  Allerdings ist die automatische Zeitumstellung nur angebracht, wenn
  Linux das einzige Betriebssystem auf dem Rechner ist oder auch das
  andere Betriebssystem auf diese Technik beherrscht.
  5.4.1.  DOS

  Der Treiber clock.sys bringt DOS den Umgang mit Zeitzonen bei. Der TZ-
  Wert fr die deutsche Zeitzone in clock.sys ist


       CET-1CEST,M3.5.0/2,M10.5.0/3



  Der Treiber clock.sys ist z.B. erhltlich unter der URL

       <ftp://ftp.tu-chemnitz.de/pub/sim
       tel/msdos/clock/clk360rs.zip>



  5.4.2.  Linux

  Unter Linux gibt es quasi 3 Zeiten:


    Die der auf dem Motherboard installierten CMOS-Uhr,

    die Systemzeit des Linux-Kernels und

    die dem Benutzer von verschiedenen Uhren angezeigte Zeit.



                   clock -u -w               date -u -s
        CMOS-Uhr  <--------------   Linux    <--------------
       (Mainboard)                Systemzeit                 Benutzer-Uhr
                  -------------->   (UTC)    -------------->
                   clock -u -s             date, xclock



  Die Programme clock und date bersetzen zwischen diesen Uhrzeiten.

  Zwar liest der Kernel schon beim Booten die CMOS-Uhr aus und
  interpretiert sie als UTC. Aber um systematische Fehler der CMOS-Uhr
  zu korrigieren, wird die Uhrzeit vom Skript /etc/init.d/boot (oder
  vergleichbar) ein weiteres Mal gelesen. Dort wird dann der clock-
  Befehl ausgefhrt und ist daher fr die weiteren Betrachtungen
  ebenfalls relevant.

  Fr die Umstellung von Sommer- auf Winterzeit gibt es zwei
  Mglichkeiten: manuell oder automatisch.



       Umstellung              manuell          automatisch
       ----------------------------------------------------
       CMOS-Uhr                Ortzeit          UTC
       Option fr clock        -keine-          -u



  Die Zeitzone der CMOS-Uhr setzt man am sichersten whrend des Bootens
  im BIOS Setup. "UTC" ist die  Universal Time: im Winter eine, im
  Sommer zwei Stunden weniger.

  Welches Skript den Befehl clock ausfhrt (und demnach die Option '-u'
  enthalten kann) mu man dem Handbuch der eigenen Distribution
  entnehmen.


  Die eigentliche Zeitzone wird unabhngig von den obigen Einstellungen
  durch den Link /usr/lib/zoneinfo/localtime festgelegt. In der Regel
  zeigt dieser Link auf die Hauptstadt des eigenen Landes:



       Land           Zeitzonen-Datei
                                        |- Zeitzone -|
       -----------------------------------------------
       Deutschland    /usr/lib/zoneinfo/Europe/Berlin
       stereich      /usr/lib/zoneinfo/Europe/Vienna
       Schweiz        /usr/lib/zoneinfo/Europe/Zurich



  Um den Link anzulegen kann man das Kommando ln verwenden, im Falle von
  Deutschland lautet die komplette Befehlszeile dann:


       ln -sf /usr/lib/zoneinfo/Europe/Berlin  /usr/lib/zoneinfo/localtime



  Die eingestellte Zeitzone kann mit der Umgebungsvariable TZ
  berschrieben werden:


       export TZ=Asia/Hong_Kong; xclock & export TZ=Africa/Dakar; xclock &



  Das frher gebruchliche "MET" sollte unter keinen Umstnden
  weiterverwendet werden. Markus Kuhn schrieb mir:


       Die Datei /usr/lib/zoneinfo/MET existiert nur zwecks
       Rckwrtskompatibilitt.  Die Autoren der Zeitzonentabellen
       (Olson/Eggert/et al.) wollen eigentlich, da deutsche
       Benutzer statt MET die Datei Europe/Berlin verwenden.  Dann
       stimmen sogar die historischen Sommerzeiten vor 1945, die
       Linux auch alle kennt. Auerdem wird dann in der neuesten
       Version der Zeitzonentabelle "Mitteleuropische Zeit (MEZ)"
       endlich korrekt ins Englische mit "Central European Time
       (CET)" bersetzt, denn "MET" ist ein bersetzungsfehler
       (siehe z.B. Langenscheid Englisch; ich habe deswegen sogar
       beim Physikalisch-Technischen Bundesamt nachgefragt, die fr
       die deutsche Zeit verantwortlich sind). "CEST" ist dann
       entsprechend "Central European Summer Time" ("MET DST", wie
       es noch in vielen Linux-Installationen benutzt wird, war
       eine falsche Uebersetzung von MESZ).



  6.  Anwendungssoftware

  Mittlerweile sind viele Programme hinsichtlich der Untersttzung von
  landesspezifischen Einstellungen so weit genormt, man einen Groteil
  der Konfiguration durch Setzen der Umgebungsvariable LANG auf den Wert
  de_DE erledigen kann. Dies ist ein Standard, der in einem der vielen
  POSIX-Standards festgelegt wird, der aber nicht alle Bereiche abdeckt.
  So fehlen z.B. Papiergre und Zeitzone; allerdings wren beide bei
  greren Lndern schlecht mit einer Variable zu erfassen, so da man
  sie auen vorgelassen hat.

  Der richtige Ort fr das Setzen von Umgebungsvariablen sind die
  Dateien /etc/profile oder ~/.bash_profile:


       #LANG=de_AT  # in sterreich
       #LANG=de_CH  # in der deutschsprachigen Schweiz
       LANG=de_DE   # in Deutschland
       export LANG



  Soweit die Theorie. In der Tat ist es etwas nervig, wenn sich deutsche
  und engliche Fehlermeldungen, Datumsangaben, usw. aufgrund von
  unvollstndiger Internationalisierung mischen:



       tar: Kann Archiv 'foo.tgz' nicht ffnen: Permission denied



  In einem solchen Fall berschreibt man lieber diesen Aspekt der LANG-
  Variable:



       LC_MESSAGES=C
       export LC_MESSAGES



  Dabei gehe ich davon aus, da die eigene Linux-Distribution den POSIX-
  Standard durch die Locale-Dateien bereitstellt. Leider sind noch nicht
  alle Linux-Distributionen auf diesem Stand, so da die obige
  Einstellung evtl. zu nervigen Fehlermeldungen fhrt. Beispiel:



       Warning: locale not supported by C library, locale unchanged



  In einem solchen Fall sollte man sich beim Hersteller des Distribution
  beschweren. Oder auf eigene Faust die locale-Dateien installieren,
  inkl. Kompilation der libc.

  Details zu den Lokalen findet man im Linux Locale mini-HOWTO oder in
  der man-page zu locale. Der Rest dieses Kapitels behandelt die
  "Ausreier", die die Umgebungsvariable LANG nicht auswerten.


  6.1.  Auer Konkurenz ...


  6.1.1.  Zeichenstze ohne Umlaute

  Sowohl fr die Textkonsole als auch fr X11 existieren Zeichenstze
  (engl. `fonts'), die nicht alle Zeichen aus ISO-latin1 enthalten. D.h.
  die fehlenden Zeichen (z.B. Umlaute) werden als Leerzeichen oder gar
  nicht auf dem Bildschirm dargestellt.  In diesem Fall hilft natrlich
  die Konfiguration der Programme nicht weiter, sondern es mu ein
  anderer (vollstndiger) Zeichensatz gewhlt werden.



  6.1.2.  Eigene Sppchen

  Konfigurationsdateien: ~/.Xresources und /etc/X11/Xresources

  Das  X-Window-System wartet mit einer eigenen
  Konfigurationsmglichkeit fr Locale auf. Diese mu man aber nur
  nutzen, wenn man fr einzelne X-Programme die Locale anders setzen
  will, d.h. wenn man die Einstellungen in den Umgebungsvariablen
  berschreiben will.

  Anders ausgedrckt: durch Setzen der Locale ber die X-Resourcen
  verkompliziert man in den meisten Fllen das Setup der eigenen Linux-
  Machine (und wer will das schon). Andererseits gibt es natrlich
  Flle, in denen das evtl. notwendig ist (aber wer hat die schon).

  Gerchten zufolge bestimmen folgende Resourcen die Locale von X11:



       !*displayLang:   de_DE
       !*timeFormat:    de_DE
       !*inputLang:     de_DE
       !*basicLocale:   de_DE
       !*numeric:       de_DE



  Achtung: das Kommentarzeichen ist `!', nicht `#'.



  6.2.  Die Ausreier

  Solange nicht ausdrcklich erwhnt, betreffen die Einstellungen alle
  Versionen eines Programms. Die vorzunehmenden Einstellungen sind durch
  Einrckung markiert.


  6.2.1.  readline und Verwandte (z.B. bash )

  Konfigurationsdatei: ~/.inputrc Versionen: ab bash 1.14.1



       set meta-flag on
       set convert-meta off
       set output-meta on



  Kopiert man die Datei auerdem noch nach `/etc/skel/', so erhlt sie
  jeder neu angelegte Benutzer automatisch. Eine globale
  Konfigurationsdatei gibt es leider noch nicht.

  Vorsicht: Kommentare und Leerzeilen in dieser Datei knnen zu
  Problemen fren.



  6.2.2.  telnet

  Konfigurationsdatei: ~/.telnetrc

  Erscheinen beim telnet statt `' die Zeichen `dv|', so mu man fr
  jede Maschine einen Eintrag der Form:



       localhost
            set binary true



  anlegen. Denselben Effekt erreicht man mit der Option "-8". Eine
  globale Konfigurationsdatei fr telnet existiert nicht.



  6.2.3.  ytalk

  Konfigurationsdateien: ~/. und /etc/



  6.2.4.  selection


  Das Programm selection mu neu compiliert werden, damit es Umlaute
  korrekt per Cut&Paste transportiert. Die notwendigen Modifikationen
  (Patch) stammen von Andries Brouwer und liegen unter der URL
  ftp://ftp.win.tue.nl/pub/linux/util

  Gegenber gpm verbraucht selection deutlich weniger virtuellen
  Speicher, daher ist es auch heute noch von Interesse.



  6.2.5.  dosemu

  Konfigurationsdateien: ~/.dosrc und /etc/dosemu.conf

  Versionen: ab 0.52pl16



       keyboard {  layout de-latin1  keybint on  rawkeyboard on  }

       X { updatefreq 8 title `DOS in a BOX' icon_name `xdos' keycode }



  Hinweis: die Einstellung `keycode' funktioniert nur einwandfrei mit
  XFree86, nicht dagegen mit Xterminals o..

  6.2.6.  emacs

  Versionen: ab 19.22 (GNU)

  Hinweis: einige Versionen des emacs haben Probleme mit der Aktivierung
  der Umlaute. Ab Version 19.29 sollten damit keinerlei Schwierigkeiten
  mehr auftreten.


  Die Haupt-Konfigurationsdateien fr den `emacs' sind:



       /usr/lib/emacs/site-lisp/site-start.el       (global),
       ~/.emacs                                 (persnlich),
       /usr/lib/emacs/site-lisp/default.el          (global),



  und werden in dieser Reihenfolge abgearbeitet. Insbesondere
  berschreiben also die Einstellungen in der `default.el' die
  Einstellungen aus ` /.emacs' und `site-start.el'. Diese Eintrge
  erlauben das Arbeiten mit Umlauten:



       (set-input-mode (car (current-input-mode))
                     (nth 1 (current-input-mode))
                                               0)

       (standard-display-european t)



  Speziellere Informationen findet man in der FAQ zum Thema `emacs und
  Umlaute' von Karl Brodowsky, erhltlich unter der URL:

       <ftp://ftp.uni-erlangen.de/pub/doc/ISO/deutsch/emacs-
       umlaute-faq.gz>



  6.2.7.  less

  Konfigurationsdateien: ~/.bash_profile und /etc/profile Versionen: nur
  ltere Versionen sind betroffen



       export LESSCHARSET=latin1



  6.2.8.  pine

  Konfigurationsdateien: ~/.pinerc und /etc/pine.conf



  # character-set should reflect the capabilities of the display
  # you have. Normal default is US-ASCII.  Typical alternatives
  # include ISO-8859-x, where x is a number between 1 and 9.
  character-set=ISO-8859-1



  6.2.9.  joe

  Konfigurationsdateien: ~/.joerc und /etc/joe/joerc



       -asis



  Achtung, das Minus mu in der 1. Spalte stehen.



  6.2.10.  elm

  Konfigurationsdatei: ~/.elm/elmrc



       charset = iso-8859-1
       displaycharset = iso-8859-1
       textencoding = 8bit



  6.2.11.  nn

  Konfigurationsdatei: ~/.nn/init



       set data-bits 8



  Eine globale Konfigurationsdatei existiert nicht.



  6.2.12.  lynx

  Konfigurationsdateien: ~/.lynxrc und /etc/lynx.cfg Versionen: ab 2.4



       CHARACTER_SET:ISO Latin 1



  6.2.13.  gslp

  Kann von Hause aus keine Umlaute. Es ist ein patch erforderlich,
  dessen Beschreibung die Zielsetzung dieses HOWTO sprengt.


  6.2.14.  xfig

  Kommandozeilenoption:



       -metric



  6.3.  Weiterfhrende Tips



  6.3.1.  emacs

  Der emacs kann in seinen Fhigkeiten durch Lisp-Module erheblich
  erweitert werden. Er ist dadurch das Schweizer Taschenmesser unter den
  Texteditoren. "Nur Kaffeekochen kann er nicht".

  Die Lisp-Module tragen die Dateiendung .el oder .elc; letztere ist die
  compilierte Form einer .el-Datei. emacs sucht z.B. im Verzeichnis
  /usr/lib/emacs/site-lisp nach solchen Modulen.

  Die Laden der Module kann im emacs per Hand mit dem Kommando



       <Alt x> load-library <return> pc-mode <return>



  vorgenommen werden. Alternativ kann man durch die Anweisung



       (load "pc-mode")



  in einer der Konfigurationsdateien das Modul dauerhaft laden.
  Nachfolgend die Beschreibung einiger ntzlicher Module:


     pc-mode
        Konfiguriert die Tastaturbelegung so, wie PC-Benutzer es gewohnt
        sind.  Keine Landesspezifischen Abhngigkeiten, aber oft
        gefragt. In der Konfigurationsdatei eintragen:



          ;;; pc-mode.el --- emulate certain key bindings used on PCs.
          (load "pc-mode")
          (pc-bindings-mode)

     pc-select
        Stellt Cut&Paste wie unter MacOS oder Win ein.



          ;;; pc-select.el ---  emulate cut&paste like on PC or Mac
          (load "pc-select")
          (pc-selection-mode)



     iso-tex  und  iso-cvt
        Zeigen die Umlaute unverndert an, speichern sie aber in dem
        TeX-Format ab.


     konvers
        Wie `iso-tex', kann aber nicht nur in beide Richtungen
        konvertieren, sondern beherrscht auch noch andere Formate wie
        etwa MIME.


     iso-acc (iso-accent-mode)  und  alt-symbol
        Erlauben die Eingabe von Umlauten und Akzenten durch
        vorangestellte Zeichen, d.h. ~a wird schon whrend der Eingabe
        der Zeichen zu einem a mit der Schlange darber (und auch als
        solches abgespeichert).


     AUCTeX
        AUCTeX ist eine leistungsfhige Umgebung zum Verfassen von TeX-
        und LaTeX-Dokumenten. Die automatische Erkennung von
        landesspezifischen Besonderheiten wird mit dem Eintrag


          (setq TeX-parse-self t)



     in einer der Konfigurationsdateien aktiviert. `\usepackage{german}'
     wird daraufhin von AUCTeX als Indikator verwendet.


  Die erwhnten Pakete sind erhltlich unter der URL:

     AUC TeX
        <ftp://sunsite.auc.dk/packages/auctex/auctex.tar.gz>

     alt-symbol.el
        <ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit>

     iso-tex.el
        <ftp://ftp.dante.de/pub/tex/support/iso-tex>

     konvers.el
        <ftp://ftp.uni-
        erlangen.de/pub/doc/ISO/charsets/konvers-862.tar.gz>


  6.3.2.  TeX/LaTeX

  TeX ist ein professionelles Satzsystem. LaTeX ist eine Sammlung von
  Macros zum effektiven Einsatz von TeX.
  6.3.2.1.  Verarbeitung von Umlauten


  6.3.2.1.1.  LaTeX 2e und hher

  Das Paket zur Verwendung des latin1-Zeichensatzes ist mittlerweile
  fester Bestandteil von LaTeX. Es wird aktiviert mit der Anweisung



       \usepackage[latin1]{inputenc}



  im Kopfteil des Dokuments.


  6.3.2.1.2.  plain-TeX, LaTeX2.09

  Fr diese Formate gibt es entweder keine Pakete oder nur veraltete
  Style-Dateien. Daher kann man Dokumente, die solche veralteten Pakete
  enthalten, i.a. nicht an andere versenden. Eine Verwendung der alten
  Makros wie iso.sty, xlatin1.sty und umlaute.sty (fr den Atari) wird
  daher nicht empfohlen.


  6.3.2.2.  Layout

  Folgendes Beispiel kann als simples Grundgerst fr deutsche Texte
  (hier: Artikel) verwendet werden:



       \documentclass[a4paper]{article}
           %  Die Option "a4paper" stellt als Papiergre
           %  DinA4 ein. Alle anderen LaTeX-Pakete verlassen sich auf
           %  diese Einstellung.

       \usepackage{german}
           %  stellt Abkrzungen fr typische deutsche Besonderheiten
           %  bereit. Die Dokumentation befindet sich auf den
           %  CTAN-Serven unter /pub/tex/language/german/germdoc.tex

       %\usepackage[T1]{fontenc}
       %    % Erlaubt die Trennung von Wrtern mit Umlauten

       \usepackage[latin1]{inputenc}
           % gibt den Zeichensatz des Dokuments an und macht somit die
           % Eingabe von latin1-Zeichen mglich.

       \usepackage{a4}
           % stellt den bedruckten Bereich einer Seite, den sogenannten
           % <em/Satzspiegel/, ein. Er wird so berechnet, da
           % durchschnittlich circa 60 bis 70 Buchstaben in einer Zeile
           % vorkommen, da man sonst beim Lesen die Zeilen verliert.

       %\usepackage[german]{babel}
           % Aktiviert die Unterstutzung mehrerer Sprachen gleichzeitig.

       \begin{document}
       ...
       \end{document}



  Weitere Informationen findet man unter der URL
  <http://www.dante.de/dante/dante-faq.html>

  Eine bessere Alternative zur Satzspiegeleinstellung bietet das Paket
  "typearea.sty". Dieses Paket findet man bei den Koma-Script-Klassen
  von Markus Kohm unter
  ftp://[CTAN]/pub/tex/macros/latex/contrib/supported/koma-script/
  <ftp://ftp.dante.de/pub/tex/macros/latex/contrib/supported/koma-
  script/>, die das "typearea.sty"-Paket intern verwenden. Es ist aber
  auch zusammen mit den Standardklassen (z.B. article) verwendbar.

  Die Koma-Script-Klassen beachten auch andere deutsche
  Typographieregeln und sind daher sehr empfehlenswert. Dokumentation zu
  den Koma-Script-Klassen und dem "typearea.sty"-Paket befinden sich
  unter ftp://[CTAN]/pub/tex/macros/latex/contrib/supported/koma-
  script/scrguide. ps
  <ftp://ftp.dante.de/pub/tex/macros/latex/contrib/supported/koma-
  script/scrg uide.ps>.


     CTAN
        Comprehensive TeX Archive Network, bestehend aus (bald wieder)
        drei Rechnern in Amerika, Grobritannien und Deutschland. Der
        amerikanische und der deutsche Rechner sind von DANTE e.V (
        Deutschsprachige Anwendervereinigung TeX) angeschafft und
        finanziert worden. Der deutsche Rechner hat den Namen
        ftp.dante.de.)


  6.3.2.3.  Deutsche Wortrennung

  Alle modernen TeX-Distributionen bieten die Mglichkeit, in der
  zugehrigen Konfigurationsdatei das Kommentarzeichen % vor der Zeile



       german          ghyph31.tex



  zu entfernen. Es werden dann Formate mit den deutschen Trennregeln
  erzeugt.

  Mit der Rechtschreibreform ab 1. August 1998 werden andere Trennregeln
  gltig. Vermutlich werden dann rechtzeitig neue Trenntabellen zur
  Verfgung stehen.



  6.3.3.  Rechtschreibprfung mit deutschem Wrterbuch

  Zur Prfung von Rechtschreibfehlern steht unter Linux das Programm
  ispell zur Verfgung. Die meisten Distributionen bieten dieses zur
  Installation an, die zugehrige deutsche Wortliste liegt seltener bei.


  6.3.3.1.  Die Wortlisten


  Einen recht brauchbaren Grundstock fr eine eigene Wortliste enthlt
  das Paket "hk-deutsch2" von H. Knutzen. Es umfat 22 Dateien, die
  individuell zu einer eigenen Wortliste zusammengefat werden knnen.
  Die dazu notwendigen Schritte werden in dem beiliegendem README genau
  erklrt.

  Durch die individuelle Zusammenstellung werden die Wortlisten kleiner
  und somit die Rechtschreibprfung beschleunigt.

  Es soll aber nicht verschwiegen werden, da man diesen Listen in der
  Regel noch eine "eigene" Wrter hinzufgen mu (dies ist mit ispell
  automatisch mglich).

  Das Paket ist erhltlich unter der URL:

       <ftp://ftp.informatik.uni-
       kiel.de/pub/kiel/dicts/hk2-deutsch.tar.gz>



  6.3.3.2.  Das Rechtschreibprogramm ispell

  Da ispell nicht jedes Textformat automatisch erkennt, mu man die
  Optionen -T latin1 und -w "" verwenden. Kommen weitere nicht-
  ascii Zeichen im Text vor, so sollte man diese ebenfalls mit der
  '-w'-Option zulassen.

  Ein anderes als das englische Wrterbuch wird mit der Option '-d'
  ausgewhlt, also z.B.



       ispell -d german -T latin1 -w "" German-HOWTO.txt



  fr das Deutsche Wrterbuch in der Datei /usr/dict/german.hash
  (Binrformat).

  Ruft man ispell aus dem Editor emacs heraus auf, so kann man obige
  Parameter automatisch bergeben, indem man folgenden Eintrag in einer
  der Konfigurationsdateien des emacs vornimmt:



       (setq ispell-extra-args '("-Tlatin1"
                                 "-d" "/usr/lib/german"
                                 "-w" ""))



  7.  Textdateien


  7.1.  Das Papierformat DIN A4


  Nhere Informationen zu Papierformaten findet man unter der URL

       <http://www.ft.uni-erlangen.de/~mskuhn/iso-paper.html>


  Folgende Programme knnen auf das Papierformat DIN A4 eingestellt
  werden.

  7.1.1.  xdvi

  Konfigurationsdateien: ~/.Xresources und /etc/X11/Xresources


       XDvi.paper:     a4



  7.1.2.  ghostview

  Konfigurationsdateien: ~/.Xresources und /etc/X11/Xresources


       Ghostview.pageMedia:  A4



  7.1.3.  gs


  Kommandozeilenoption


       -sPAPERSIZE=a4



  7.1.4.  dvips

  Konfigurationsdateien: ~/.dvipsrc und /usr/lib/texmf/dvips/config.ps



       % Paper size information.
       %
       % If your default is a4 uncomment the following definition
       % and comment out the letterSize definition.
       %
       @ a4size 210mm 297mm
       @+ %%PaperSize: a4



  7.1.5.  ImageMagick

  Dieses Grafikpaket enthlt ein Programm zur Konvertierung beliebiger
  Grafikformate. Die Kommandozeilenoption


       -page A4



  erzwingt das Seitenformat A4.


  7.2.  Konvertierung von DOS- und Mac-Texten nach Linux

  Die Textformate von DOS, MACs und UNIX unterscheiden sich in zwei
  Punkten:

    Codierung der Sonderzeichen (z.B. Umlaute)

    Markierung des Zeilenendes


  7.2.1.  Die Zeilenenden

  Das Ende einer Textzeile wird wie folgt markiert:



       Linux:    LF ("linefeed" = Zeilenvorschub, "^J", Ascii 10)
       DOS:   CR LF
       Mac:   CR    ("carriage return" = Wagenvorlauf, "^M", Ascii 13)



  Die Programme fromdos, todos und frommac, tomac wandeln ausschlielich
  die Zeilenenden um, die Zeichen selbst werden nicht angepat.
  Gleiches gilt fr die Optionen `conv=auto', bzw. `conv=text' des
  mount-Kommandos bzgl. des MS-DOS Dateisystems.


  7.2.2.  Die Zeichenstze

  Die Zeichenstze setzen sich wie folgt zusammen:



       Linux: ISO-LATIN1
       DOS:   IBMPC Charactersets CP 437, CP 850, ...
       Mac:   Mac-Eigengebru



  Der erste Teil aller dieser Zeichenstze ist der ASCII-Zeichensatz, so
  da man Texte ohne Umlaute usw. nicht zu konvertieren braucht. Um
  sowohl Zeilenenden, als auch die Sonderzeichen zu konvertieren, kann
  man das Programm recode benutzen:



       recode  -d ibmpc:lat1    hausarb.tex



  wandelt die DOS-Datei `hausarb.tex' in das Format ISO-Latin-1 um.
  Durch die Definition von Aliasen kann man sich das Leben etwas
  einfacher machen:



  alias unix2dos='recode lat1:ibmpc'
  alias dos2unix='recode ibmpc:lat1'
  alias unix2mac='recode lat1:mac'
  alias mac2unix='recode mac:lat1'



  Achtung: diese aliase sind in shell-Skripten nicht verfgbar.

  GNU recode ist von jedem GNU-mirror erhltlich, also z.B. von

       <ftp://ftp.uni-koeln.de/packages/gnu/recode-3.4.tar.gz>



  7.3.  Drucken


  Der
     Treppenstufen
                  -Effekt
                         (engl. staircase)
                                          rhrt
                                                von
                                                   den
                                                      oben
  beschriebenen
               Unterschieden
                            im
                              Textformat
                                        her.



  Die meisten Drucker besitzen ein kleines Muse-Klavier, an dem man den
  Drucker vom DOS-Textformat auf das Unix-Textformat umstellen kann.  In
  der Regel wird damit auch automatisch auf die Betriebsart ISO-latin1
  geschaltet, so da auch Umlaute usw. gedruckt werden.

  Weitere Informationen findet man im Linux Printing-HOWTO.



  7.4.  PostScript

  Fehlen in einem gedruckten PostScript-Dokument die Umlaute ganz oder
  werden diese verstmmelt gedruckt, so liegt das nicht am Drucker oder
  am `ghostscript' (konvertiert PostScript fr den Drucker), sondern an
  der Software: das PostScript wurde nicht korrekt erzeugt.

  Besonders geschickt ist Word: es beginnt eine PostScript-Datei mit
  <Strg d>, dem Zeichen fr das Ende einer Datei (unter Linux). Das
  fllt ebenfalls in die Kategorie "kaputtes PostScript" (wird aber
  mittlerweile von den meisten Druckerfiltern abgefangen).



  8.  Programmierung



  8.1.  National Language Support (NLS)

  Fr Programmierer unbedingt zu empfehlen ist das Paket `GNU gettext'.
  Es stellt eine Bibliothek zur Verfgung, die den Programmen zur
  Laufzeit den Zugriff auf lnderspezifische Informationen erlaubt.

  Welche Schritte im Einzelnen erforderlich sind, um ein Programm zu
  internationalisieren, erlutert das Manual zu `gettext' (derzeit noch
  `draft'-Stadium).

  `GNU sharutils' ab der Version 4.2 ist ein beispielhaft
  internationalisiertes Programm-Paket.


  8.2.  bersetzung von GNU-Programmen

  Wer bei der bersetzung von GNU-Programmen mithelfen will, sollte den
  Email-Verteiler de@li.org abonnieren. Dahinter steht eine majordomo-
  mailingliste (sprich: majordomo@li.org nimmt die subscribe-Befehle
  entgegen)


  8.3.  ncurses

  Diese C-Bibliothek zur Bildschirmsteuerung ist seit Version 1.8.2 in
  der Lage, mit 8-bit Zeichen umzugehen. ltere Versionen sollten nicht
  verwendet werden.


  8.4.  Erzeugung von PostScript

  Die auszugebenden Texte knnen Umlaute enthalten, wenn vorher folgende
  Funktion aufgerufen wurde:



       %
       % change encoding to ISO8859-1  -  reiner@schildi.xnc.com
       %
       % <fontname> ISOfindfont => <font>
       %
       /ISOfindfont {
           dup 100 string cvs (ISO-) exch concatstrings cvn exch
           findfont dup maxlength dict begin
               { 1 index /FID ne {def}{pop pop} ifelse } forall
               /Encoding ISOLatin1Encoding def
               currentdict
           end definefont
       } def



  9.  Anhang


  9.1.  Erklrende bersetzung einiger technischer Begriffe


  Ohne ein gewisses Ma an Englisch-Kenntnissen wird man an Linux nicht
  viel Freude haben, da sowohl die Dokumentation, als auch die Mens und
  Hilfe-Funktionen der Programme vornehmlich in Englisch geschrieben
  sind.
  Dieser Abschnitt soll das Verstndnis englischen Orginal-Dokumentation
  erleichtern, indem der technische Zusammenhang der Vokabeln erlutert
  wird (wenn ntig).

  Im Internet gibt es noch einige interaktive Wrterbcher, z.B.  unter
  der URL:


       <http://www.chemie.fu-berlin.de/glossar/glossar.html>



  ENGLISH            DEUTSCH
  ---------------------------------------------------------------------------
  abort            Programm oder Verbindung abbrechen
  argument         Parameter (Einstellung), der einem Programm bergeben
                     wird
  bracket          eckige Klammer
  character        Zeichen
  comment          Kommentar
  device           Gert; der Zugriff auf Gerte erfolgt unter Linux
                     fast ausschlielich ber Dateien, die sogennanten
                     Gertedateien im Verzeichnis `/dev'; meist bezieht
                     sich <em/device/ auf eine dieser Dateien
  directory        Verzeichnis
  environment      Umgebung; bezieht sich auf die Einstellungen, die
                     einem Programm mit Umgebungsvariablen (enviroment
                     variables) bergeben wird
  file             Datei
  file descriptor  Dateizugriffsnummer; programminterne Nummer fr
                     eine offene Datei
  font             Zeichensatz
  host             Maschine, Computer, Rechner (wrtlich: Gastgeber)
  I/O              Ein-/Ausgabe
  kernel           Betriebssystemkern; der heilige Teil von Linux
  key              Taste
  keyboard         Tastatur
  library          Zusammenfassung von compilierten C-Routinen zu
                     einer Bibliothek, die dann aus jedem anderen
                     Programm heraus benutzt werden kann
  link             Verweis; anstatt eine Datei zu kopieren, kann man
                     auch einen Verweis anlegen; dies spart Platz und
                     erlaubt einige Tricks
  load             laden, Beladung, Ausnutzung; in Zusammenhang mit
                     der Auslastung einer Maschine gebraucht
  lock             Sperre (meist gewollt)
  mount            montieren, zusammensetzen; stets im Zusammenhang
                     mit dem Verzeichnisbaum, der durch das Kommando
                     `mount ...' zusammengesetzt wird
  network          Computernetz(werk)
  news
  OS               Betriebssystem (Operating System)
  overflow         bei einer mathematischen Operation ist ein Ergebnis
                     aufgetreten, da wegen seiner Gre nicht mehr
                     in die dafr vorgesehene Variable pat
  parenthesis      runde Klammer
  path             Pfad, meist als Begriff fr den kompletten
                     Verzeichnisnamen zu einer Datei gebraucht
  pipe             Rhre, Veranschaulichung der Weiterleitung von Daten
                     von einem zum nchsten Programm; das sogennante
                     `pipe-symbol' ist das Zeichen | (senkr. Strich)
  press            Drcken Sie (die Taste)
  quote            Anfhrungszeichen oder Zitat
  <!-- quoten = quotes benutzen = zitieren -->
  remote           im Sinne von "die Gegenseite der Verbindung"
  resolve          Ermittlung (Auflsung) der numerischen IP-Adresse,
                     die zu einem Maschinennamen gehrt
  server           Computer, der anderen Computern Dateien oder
                     Dienstleistungen zur Verfgung stellt
  source           meist Begriff fr die Programmtexte (Quellcode,
                     Sourcecode) benutzt; "may the source be with you"
                     UTSL: Use the source, Luke.
  space            Leerzeichen
  string           Zeichenkette
  template         Vorlage, Muster, Schablone
  trace            Ablaufverfolgung
  type             Tippen Sie ein
  underflow        Unterlauf, z.B. "der Unterlauf des Rheins" ;-)
                     Im Ernst: Wenn bei einer Floating-Point Berechnung, die Zahl
                     kleiner als das Maschinen-Epsilon wird, wird dies mit dem
                     Underflow-Flag angezeigt.
  wildcard         Joker, meist erfllt der Stern * diese Funktion,
                     z.B. zur unvollstndigen Angabe von Dateinamen



F GERMAN-H.;1                       	German-HOWTO
  The Hebrew HOWTO
  Maintained by Yair G. Rajwan, <tt>yair@hobbes.jct.ac.il</tt>
  v0.4, 12 September 1995

  This `Frequently Asked Questions' (FAQ) / HOWTO document describes how
  to configure your Linux machine to use Hebrew characters on X-Windows
  and Virtual Consoles. The most up-to-date version of the Hebrew-HOWTO
  may be obtained from my Web page
  <http://shekel.jct.ac.il/~rajwan/Hebrew.html> or from
  <tt>ftp://hobbes.jct.ac.il</tt> <ftp://hobbes.jct.ac.il>.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

     1.1 Changes.
     1.2 Thanks

  2. Standards for representation of Hebrew characters

     2.1 ASCII
     2.2 DOS Hebrew
     2.3 ISO Hebrew
     2.4 OLD PC Hebrew
     2.5 Conversions

  3. Virtual Consoles (VCs)

  4. X Windows setup - XFree86 3.1

     4.1 Hebrew fonts.
     4.2 Installing fonts
     4.3 Making an X application to use Hebrew fonts.
        4.3.1 Xterm
        4.3.2 Netscape
     4.4 Mapping the keyboard.
     4.5 Integrating all the above, examples.

  5. Shells setup.

     5.1 bash
     5.2 tcsh

  6. Applications

     6.1 Vim
     6.2 Hebrew pine and pico
     6.3 Some emacs Hebrew ports.
     6.4 Dosemu
     6.5 XHTerm
     6.6 TeX--XeT - Hebrew Tex.

  7. Printer setup

  8. Commercial products.

     8.1 El-Mar software.

  9. Hebrew around the Internet.

     9.1 WWW
     9.2 Gopher
     9.3 Ftp

  ______________________________________________________________________

  1.  Introduction

  Any language setup, other than the original American English, has two
  issues:

  1. Displaying the right characters (fonts) - for Hebrew it's
     ISO-8859-8 standard.

  2. Mapping the keyboard.

  There is much more to Hebrew than that (like right to left, geometry
  in X-Windows,etc), but this HOWTO (at least for the first draft) deals
  only with the basic issues.

  More information can be found in the various "national" HOWTOs
  (German, Danish, etc.) and in the ISO 8859-1 HOWTO
  (ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit
  <ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit>  FAQ-ISO-8859-1).


  1.1.  Changes.


  o  FIRST DRAFT to 0.2.

     Most of this file is taken from the first draft by Vlad Moseanu.

  o  0.2 to 0.3Beta.

     Added excerpts from documents from the archive e-brew.zip from
     ftp://ftp.jer1.co.il/pub/software/msdos/communication
     <ftp://ftp.jer1.co.il/pub/software/msdos/communication>, and some
     bug fixes with the help of JCT Linux-il group members.

  o  0.3Beta to 0.4.

     After the first release of the Hebrew-HOWTO to the Linux-il it
     contain all the E-mail send to me regarding spelling/grammer and
     Tex-Xet, Mule and Vim info.


  1.2.  Thanks

  This HOWTO prepared by the help of all the group: Linux-il - 'The
  Israeli Linux users group' and especially by:

  The Linux-il group      (Linux-il@hagiga.jct.ac.il)

  Vlad Moseanu            (vlad@actcom.co.il)

  Gili Granot             (gil@csc.cs.technion.ac.il)

  Harvey J. Stein         (hjstein@math.huji.ac.il)

  Dovie Adler             (dadler@hobbes.jct.ac.il)

  Gavrie Philipson        (gavrie@shekel.jct.ac.il)


  2.  Standards for representation of Hebrew characters



  2.1.  ASCII

  To make one thing clear, for once and forever: There is no such thing
  as 8-bit ASCII. ASCII is only 7 bits. Any 8-bit code is not ASCII, but
  that doesn't mean it's not standard. ISO-8859-8 is standard, but not
  ASCII. Thanks!


  2.2.  DOS Hebrew

  The Hebrew encoding starts at 128d for Aleph. Therefore, encoding
  requires 8 bits. This is what you have on the Video card EPROM
  hardware fonts, all of the Hebrew DOS based editors use this table
  (Qtext, HED, etc.).


  2.3.  ISO Hebrew

  The Hebrew encoding starts at 224 for Aleph. This is the Internet
  standard, international standard and basically the standard for Ms-
  Windows and for Macintoshes (Dagesh, etc...).


  2.4.  OLD PC Hebrew

  This is 7-bit, and obsolete, as it occupies essentially the same ASCII
  range as English lowercase letters. So, it is best avoided. However,
  when ISO Hebrew gets its eighth bit stripped off by some ignorant Unix
  mail program (so you get a jumble of English letters for the Hebrew
  part of your message and the regular English, reversed or not, mixed
  in), you will get this, and will need to transform it to PC or ISO. If
  there was English mixed in with the Hebrew, this will be a sad
  situation, as you will either get Hebrew plus jumble, or English plus
  jumble...


  2.5.  Conversions

  Here are some simple scripts to convert from each standard to the
  other:


       DOS - ISO:      tr '\200-\232' '\340-\372' < {dos_file} > {iso_file}
       ISO - DOS:      tr '\340-\372' '\200-\232' < {iso_file} > {dos_file}
       OLD - DOS:      tr -z '\200-\232' < {old_Hebrew_file} > {dos_file}



  NOTE:   The numbers use by tr are in octal!


  3.  Virtual Consoles (VCs)

  Every distribution of Slackware comes with kbd; the package is called
  keytbls under Slackware (a4 in 2.3.0 - kbd 0.90). Joel Hoffman has
  contributed Hebrew fonts and keymaps from his original codepage.tar.Z
  file. Look under /usr/lib/kbd for iso08.* files. It follows ISO 8859-8
  and the Hebrew keytables and maps.

  Put the following lines in /etc/rc.d/rc.local:



  -----
  #!/bin/sh
  #       Put any local setup commands in here
  #
  INITTY=/dev/tty[1-6]
  PATH=/sbin:/etc:/bin:/usr/sbin:/usr/bin
  #
  #       kbd - Set the the console font and keyboard
  #       set numlock and set metabit mode on tty1 .. tty8
  for tty in $INITTY
  do
  #       setleds -D +num < $tty > /dev/null
          setmetamode metabit < $tty > /dev/null
  done
  #       Latin8(Hebrew) keyboard/console
  setfont iso08.f16
  mapscrn trivial
  loadkeys Hebrew
  #       enable mapping
  for tty in $INITTY
  do
          echo -n -e "\\033(K" >$tty
  done
  -----



  NOTE: If you are using X Windows be careful with "setleds", it may
  hang the X server.

  The above setup works fine with the Hebrew version of pico (pine) and
  displays correctly ISO 8859-8 Hebrew (X Windows, MS Windows).


  4.  X Windows setup - XFree86 3.1

  4.1.  Hebrew fonts.

  XFree86 3.1 comes with two Hebrew fonts: heb6x13, heb8x13. Additional
  Hebrew fonts can be found on the Net:

  o  The web Type1 fonts (Helvetica/David style (proportional) and
     Courier/Shalom Stick style (fixed space) ) from the snunit-project
     archive at ftp://snunit.huji.ac.il/pub/fonts/
     <ftp://snunit.huji.ac.il/pub/fonts/>, it's good for netscape Hebrew
     pages.

  o  Avner Lottem, (lottem@techUnix.technion.ac.il) put some Hebrew-ISO
     8859-8 fonts on archive at
     ftp://sunsite.unc.edu/pub/Linux/X11/fonts/hebxfonts-0.1.tgz
     <ftp://sunsite.unc.edu/pub/Linux/X11/fonts/>, it has a font that's
     good for dosemu under X-Windows (read his README file).


  4.2.  Installing fonts


  o  Fonts exaptable: pcf (Portable Compiled Format), bdf (Bitmap
     Distribution Format), pfb (Type1 fonts).

  o  Move the fonts to some existing directory (/usr/lib/X11/fonts/misc)
     or create a new one (/usr/lib/X11/fonts/Hebrew). compress (to *.Z)
     the fonts to save space (NOT GZIP!!!).


  o  Run the mkfontdir to create/re-create the fonts.dir and edit
     fonts.alias (optional) to define new aliases.

  o  For Type1 fonts, mkfontdir does nothing. You have to add these
     fonts to fonts.dir manually.

  o  Make sure that the directory is in the X server path. Edit the
     XF86Config and add the appropriate path -- FontPath
     "/usr/X11R6/lib/X11/fonts/...".


  4.3.  Making an X application to use Hebrew fonts.

  In short you need to set the appropriate resource.


  4.3.1.  Xterm

  Put the following line in the $HOME/.Xresources:

  xterm*font:  heb8x13

  or simply start xterm with xterm -fn heb8x13 The above font is way too
  small, so search for a better one ...  See the comments/examples on
  starting X11.

  4.3.2.  Netscape

  Usaly you can use the hebrew fonts from ``snunit - webfonts'', Install
  it ``as described'', and then put the next defaults in your local
  .Xdefaults or in the app-defaults/Netscape.


       ----
       *documentFonts.latin1.variable.italic*slant:            r
       *documentFonts.latin1.variable.boldItalic*slant:        r
       *documentFonts.latin1.variable*family:                  web
       *documentFonts.latin1.fixed*family:                     webmono
       *documentFonts.latin1*registry:                         iso8859
       *documentFonts.latin1*encoding:                         8
       ----



  In general you can put any fonts insted of the webfonts files as long
  as its supported by X11 ``as described''.

  4.4.  Mapping the keyboard.

  For some reason the X server doesn't inherit the keymap from the
  previous paragraph, and anyway I would like to define ALT Left and ALT
  Right and Scroll Lock. When pressing ALT together with some key it
  will generate a Hebrew character, Scroll Lock will lock in Hebrew
  mode.

  To do that we need to use xmodmap. Following is a Xmodmap which also
  corrects the bugs with the "Num Lock":



  -----
  ! Hebrew key mapping for XFree86 (for US/Hebrew keyboards).
  ! By Vlad Moseanu
  !
  keysym Alt_L = Mode_switch
  keysym Alt_R = Mode_switch
  !clear Mod1
  clear Mod2
  !add Mod1 = Alt_L
  add Mod2 = Mode_switch
  !
  ! Set the mapping for each key
  !
  keycode   8 =
  keycode   9 = Escape
  keycode  10 = 1 exclam
  keycode  11 = 2 at
  keycode  12 = 3 numbersign
  keycode  13 = 4 dollar
  keycode  14 = 5 percent
  keycode  15 = 6 asciicircum
  keycode  16 = 7 ampersand
  keycode  17 = 8 asterisk
  keycode  18 = 9 parenleft
  keycode  19 = 0 parenright
  keycode  20 = minus underscore
  keycode  21 = equal plus
  keycode  22 = Delete
  keycode  23 = Tab
  keycode  24 = q Q slash Q
  keycode  25 = w W apostrophe W
  keycode  26 = e E 0x00f7 E
  keycode  27 = r R 0x00f8 R
  keycode  28 = t T 0x00e0 T
  keycode  29 = y Y 0x00e8 Y
  keycode  30 = u U 0x00e5 U
  keycode  31 = i I 0x00ef I
  keycode  32 = o O 0x00ed O
  keycode  33 = p P 0x00f4 P
  keycode  34 = bracketleft braceleft
  keycode  35 = bracketright braceright
  keycode  36 = Return
  keycode  37 = Control_L
  keycode  38 = a A 0x00f9 A
  keycode  39 = s S 0x00e3 S
  keycode  40 = d D 0x00e2 D
  keycode  41 = f F 0x00eb F
  keycode  42 = g G 0x00f2 G
  keycode  43 = h H 0x00e9 H
  keycode  44 = j J 0x00e7 J
  keycode  45 = k K 0x00ec K
  keycode  46 = l L 0x00ea L
  keycode  47 = semicolon colon 0x00f3 colon
  keycode  48 = apostrophe quotedbl comma quotedbl
  keycode  49 = grave asciitilde semicolon asciitilde
  keycode  50 = Shift_L
  keycode  51 = backslash bar
  keycode  52 = z Z 0x00e6 Z
  keycode  53 = x X 0x00f1 X
  keycode  54 = c C 0x00e1 C
  keycode  55 = v V 0x00e4 V
  keycode  56 = b B 0x00f0 B
  keycode  57 = n N 0x00ee N
  keycode  58 = m M 0x00f6 M
  keycode  59 = comma less 0x00fa less
  keycode  60 = period greater 0x00f5 greater
  keycode  61 = slash question period question
  keycode  62 = Shift_R
  keycode  63 = KP_Multiply
  !keycode  64 = Alt_L Meta_L
  keycode  65 = space
  keycode  66 = Caps_Lock
  keycode  67 = F1
  keycode  68 = F2
  keycode  69 = F3
  keycode  70 = F4
  keycode  71 = F5
  keycode  72 = F6
  keycode  73 = F7
  keycode  74 = F8
  keycode  75 = Escape
  keycode  76 = F10
  keycode  77 = Num_Lock
  keycode  78 = Scroll_Lock
  keycode  79 = KP_7
  keycode  80 = KP_8
  keycode  81 = KP_9
  keycode  82 = KP_Subtract
  keycode  83 = KP_4
  keycode  84 = KP_5
  keycode  85 = KP_6
  keycode  86 = KP_Add
  keycode  87 = KP_1
  keycode  88 = KP_2
  keycode  89 = KP_3
  keycode  90 = KP_0
  keycode  91 = KP_Decimal
  keycode  92 = Sys_Req
  keycode  93 =
  keycode  94 =
  keycode  95 = F11
  keycode  96 = F12
  keycode  97 = Home
  keycode  98 = Up
  keycode  99 = Prior
  keycode 100 = Left
  keycode 101 = Begin
  keycode 102 = Right
  keycode 103 = End
  keycode 104 = Down
  keycode 105 = Next
  keycode 106 = Insert
  keycode 107 = Delete
  keycode 108 = KP_Enter
  keycode 109 = Control_R
  keycode 110 = Pause
  keycode 111 = Print
  keycode 112 = KP_Divide
  !keycode 113 = Alt_R Meta_R
  keycode 114 = Break
  !
  ! This xmodmap file can be use to set the correct numerical keypad mapping
  ! when "ServerNumLock" is set in the XF86Config file.  In this case the
  ! Xserver takes care of the Num Lock processing.
  !
  !
  keycode  136 = KP_7
  keycode  137 = KP_8
  keycode  138 = KP_9
  keycode  139 = KP_4
  keycode  140 = KP_5
  keycode  141 = KP_6
  keycode  142 = KP_1
  keycode  143 = KP_2
  keycode  144 = KP_3
  keycode  145 = KP_0
  keycode  146 = KP_Decimal
  keycode  147 = Home
  keycode  148 = Up
  keycode  149 = Prior
  keycode  150 = Left
  keycode  151 = Begin
  keycode  152 = Right
  keycode  153 = End
  keycode  154 = Down
  keycode  155 = Next
  keycode  156 = Insert
  keycode  157 = Delete
  -----



  To use the Xmodmap above define "Scroll-Lock  Mode-Lock" in the
  XF86Config.


  4.5.  Integrating all the above, examples.

  If you are using xdm a $HOME/.xsession should look like the following:



  -----
  #!/bin/sh
  # $XConsortium: Xsession,v 1.9 92/08/29 16:24:57 gildea Exp $
  #
  # General defs
  #
  export OPENWINHOME=/usr/openwin
  export MANPATH=/usr/local/man:/usr/man/preformat:/usr/man:/usr/X11R6/man
  #export HOSTNAME="`cat /etc/HOSTNAME`"
  export PATH="/bin: /usr/bin: /usr/X11/bin: /usr/X386/bin: /usr/TeX/bini: /usr/local/bin: /usr/games:."
  LESS=-MM
  if [ -z $XAPPLRESDIR ]; then
          XAPPLRESDIR=/usr/lib/X11/app-defaults:/usr/local/lib/X11/app-defaults
  else
          XAPPLRESDIR=$XAPPLRESDIR:/usr/lib/X11/app-defaults
  fi
  export XAPPLRESDIR
  #
  sysresources=/usr/lib/X11/Xresources
  sysmodmap=/usr/lib/X11/Xmodmap
  resources=$HOME/.Xresources
  xmodmap=$HOME/.Xmodmap
  if [ -f $sysresources ]; then
          xrdb -merge $sysresources
  fi
  if [ -f $sysmodmap ]; then
          xmodmap $sysmodmap
  fi
  if [ -f $resources ]; then
          xrdb -merge $resources
  fi
  if [ -f $xmodmap ]; then
          xmodmap $xmodmap
  fi
  #
  # Start applications
  #
  # xterm -ls -sb &
  xhost +                 # look out !!!
  exec fvwm
  -----



  If you prefer startx use the above as an example for .xinitrc.


  5.  Shells setup.

  For more details read the ``ISO 8859-1'' HOWTO.


  5.1.  bash

  Create a $HOME/.inputrc contain the following:



       -----
       set meta-flag On
       set convert-meta Off
       set output-meta On
       -----


  5.2.  tcsh

  Define the following in the $HOME/.login or /etc/csh.login:
       setenv LANG iw_IL.ISO8859-8 (or iw_IL) Actually because the
  binary version of tcsh is complied without nls the LANG can be set to
  anything and it will still work (no need for /usr/lib/nls...).  The
  lang. name also shows my Digital bias ...


  6.  Applications

  6.1.  Vim


  o  The Vim is a Vi IMproved editor with some enhanced commands and the
     hebrew support was made bu Dov Grobgeld (HED developer).

  o  Another Vim patch announced by Avner Lottem,
     lottem@techunix.technion.ac.il and can be obtained from
     ftp://sunsite.unc.edu/pub/Linux/apps/editors/vi/vim3.0-rlh0.1.tgz
     <ftp://sunsite.unc.edu/pub/Linux/apps/editors/vi/vim3.0-rlh0.1.tgz>.

  o  For more info, you can look at
     http://www.cs.technion.ac.il/~gil/var.html
     <http://www.cs.technion.ac.il/~gil/var.html>

  6.2.  Hebrew pine and pico

  The pine and it's additional editor pico had been changed by Helen
  Zommer from CC-huji and has a bug-report mail: pineh-
  bug@horizon.cc.huji.ac.il. It can be down-loaded from
  ftp://horizon.cc.huji.ac.il/pub <ftp://horizon.cc.huji.ac.il/pub>.


  6.3.  Some emacs Hebrew ports.


  o  Hebrew package by Joseph Friedman. It includes some Hebrew fonts in
     BDF format, patch for emacs 18.58 and an elisp package. It is fine,
     but nobody uses emacs 18.* anymore. It can be obtained from:
     ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-
     archive/misc/Hebrew.tar.Z <ftp://archive.cis.ohio-
     state.edu/pub/gnu/emacs/elisp-archive/misc/Hebrew.tar.Z>.

  o  A very simple Hebrew package. Includes only right-to-left cursor
     movement support and right-to-left sorting. Works without any
     patches with FSF emacs 19. Can be obtained from
     ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-
     archive/misc/Hebrew.el.Z <ftp://archive.cis.ohio-
     state.edu/pub/gnu/emacs/elisp-archive/misc/Hebrew.el.Z>.

  o  One of emacs branches - MULE (Multi Lingual Emacs) Supports a lot
     of languages including Hebrew. It compiles and runs under Linux
     with no problem.  It is full Emacs, with Hebrew support and double-
     direction handling. It can be obtained from:
     ftp://kelim.jct.ac.il/pub/Hebrew <ftp://kelim.jct.ac.il/pub/Hebrew>


  6.4.  Dosemu

  For a VC dosemu you can use your Hebrew from the Video card EPROM, and
  if you don't have it there are plenty of Hebrew dos fonts from EGA
  support to the VGA Hebrew support.

  For X-Windows support you should download the file:
  ftp://sunsite.unc.edu/pub/Linux/X11/fonts/hebxfonts-0.1.tgz
  <ftp://sunsite.unc.edu/pub/Linux/X11/fonts/hebxfonts-0.1.tgz> it's
  contain some fonts include one called vgah.pcf that you should install
  it on your fonts directory as describe ``above'' the fonts are:


  6.5.  XHTerm

  There is a main port of the regular X-Term program for use with a
  Hebrew fonts - XHTerm =  xterm +  Hebrew support. The port for a sun
  machine was made avalible by the help of Danny
  <tt>danny@cs.huji.ac.il</tt>. Evgeny has some patch for use this port
  under Linux. His version should come with a pre-compiled XHTerm for
  both X11R5 and X11R6. You should use xhterm with the option -fn and a
  Hebrew font ``as described''!  Danny's port (for SUN) can be obtained
  from: ftp://ftp.huji.ac.il/pub/local/xhterm
  <ftp://ftp.huji.ac.il/pub/local/xhterm> and the patched version of
  Evgeny Stambulchik is on: ftp://plasma-
  gate.weizmann.ac.il/pub/software/linux <ftp://plasma-
  gate.weizmann.ac.il/pub/software/linux> Get it from there and you'll
  get 5 ``fonts with  it'': [heb10x20.pcf, heb6x13.bdf, heb6x13.pcf,
  heb8x13.bdf, heb8x13.pcf]


  6.6.  TeX--XeT - Hebrew Tex.

  The bigest problem with Tex with Hebrew is that the charecters should
  go backwards relative to Visual look (i.e. pico inserts the charecters
  from right to left), so the best thing is to get XHterm with a regular
  emacs and write the Hebrew left to right, backwards as well.

  The newer NTeX distribution on sunsite (v1.5) includes everything,
  including TeX--XeT, precompiled for Linux. It can be obtained from
  ftp://sunsite.unc.edu.gz/pub/Linux/apps/tex/ntex
  <ftp://sunsite.unc.edu.gz/pub/Linux/apps/tex/ntex>. An older version
  of TeX--XeT can be obtained from ftp://noa.huji.ac.il/tex
  <ftp://noa.huji.ac.il/tex>. This older version, however, has to be
  recompiled (not recommended).

  These TeX distributions are fine if you use LaTeX2.09. If you want to
  use LaTeX2e (the current de facto standard) you have a problem.  Alon
  Ziv (alonz@csa.cs.technion.ac.il) is currently working in support for
  LaTeX2e with Hebrew, using the Babel languages system. I don't know
  the current status of his work -- ask him!


  7.  Printer setup

  Mainly there is not to say, if you have a regular ASCII line printer
  (who does, these days?) there is a good chance that there are Hebrew
  fonts in it on the EPROM chip.

  If you use PostScript, you should download soft fonts to the printer
  (you can always use the ``earlier mentioned'' Web fonts for that.
  These fonts are also useable with Ghostscript).

  If you have a PCL printer (LaserJet etc.), you can either use font
  cartridges or use Ghostscript.


  8.  Commercial products.

  8.1.  El-Mar software.

  The Hebrew Support for X-Windows & Motif, is a product of El-Mar
  Software, which adds Hebrew functionality to many of the parts and
  layers of X-Windows and Motif, including Xlib, all of the widgets of
  Motif, hterm (Hebrew xterm), demos and simple useful applications
  (e.g. bi-lingual Motif-based editor), fonts (including scalable
  Type1), keyboard-manager in order to allow Hebrew and push-mode for
  non-Motif applications, etc.

  Despite allowing many new features and variations for Motif widgets,
  the support doesn't have any modification to internal data-structures
  of Motif, so existing applications which were compiled and linked
  under non-Hebrew environment and libraries, can be relinked (without
  compilation!) and run with Hebrew (you can replace shared-libraries,
  so even the relink is not needed!)

  By using another tool of us, Motif/Xplorer, you can take commercial
  applications (without their source) and translate them to Hebrew. This
  was the way of giving Hebrew support for Oracle Forms 4, Intellicorp's
  Kappa and OMW, CA-Unicenter, and many other leading UNIX tools sold in
  Israel. This product was purchased and adopted by most of the
  workstation vendors (9 of them, including the biggest: Sun, HP, SGI),
  and many other software houses.  There are Makefiles for more than 30
  platforms and operating systems.

  We believe only in open software, so all the customers get the
  compelete source code. We have good relations with the leading forces
  in this industry, including the technical staff of X-Consortium and
  the technical staff of COSE.



       Eli Marmor
       El-Mar Software Ltd.
       Voice: 050-237338
       FAX: 09-984279



  marmor@sunshine.cs.biu.ac.il

  P.S.: The announcement of the Arabic Support for X-Windows & Motif, is
  expected in January. English, Hebrew, and Arabic will be handled by 8
  bits (!), including the full set of Arabic glyphes.


  9.  Hebrew around the Internet.

  9.1.  WWW


  o  Jerusalem 1 - has many program and FAQ files about Hebrew on Unix
     and other platforms http://www.jer1.co.il <http://www.jer1.co.il>.

  o  Gili Granot's Hebrew archive page - sumerize of all Hebrew related
     issues around the Web (include all kind of files)
     http://www.cs.technion.ac.il/~gil
     <http://www.cs.technion.ac.il/~gil>.

  o  Gavrie has some info about Hebrew on his ftp site:
     ftp://kelim.jct.ac.il <ftp://kelim.jct.ac.il>


  9.2.  Gopher


  o  A one word testing for Hebrew-gopher can be found on
     gopher://shekel.jct.ac.il <gopher://shekel.jct.ac.il>

  9.3.  Ftp


  o  Some Tex-Xet programs and the main FTP site for Tex Hebrew support
     for PC and Unix is at ftp://noa.huji.ac.il/tex
     <ftp://noa.huji.ac.il/tex>.

  o  Horizon site as ``said allready'' contains the main site of
     pine/pico Hebrew support - ftp://horizon.huji.ac.il/pub
     <ftp://horizon.huji.ac.il/pub>.

  o  Gili Granot's Hebrew archive page ftp site is at
     ftp://ssl.cs.technion.ac.il/pub <ftp://ssl.cs.technion.ac.il/pub>.



F HEBREW-H.;1                       	Hebrew-HOWTO
  HELLENIC HOWTO
  Fotis Georgatos <gef@hellug.gr>
  Ekdosn 0.991127, 12-27-1999

  Auto to keimevo periexei plnrofories gia tnv ru8misn tou Linux gia
  upostnri3n twv idiaiterotntwv twv Ellnvwv kai tns ellnvikns glwssas.
  This document is part of Hellenic (el) LDP project: http://www.hel
  lug.gr/gr/howto/howto/pub/html/
  ______________________________________________________________________

  Table of Contents



  1. Eisagwgn

     1.1 Suvtnrnsn tou Hellenic-HOWTO
     1.2 Morfopoinseis tou Hellenic-HOWTO
     1.3 Tropopoinseis
     1.4 Spovdes
     1.5 Pveumatika dikaiwmata kai adeia xrnsns.
     1.6 Note to english users & Copyright

  2. Egkatastasn

     2.1 Egkatastasn ellnvikwv
     2.2 Xrnsimes sumboules
     2.3 Suse
     2.4 Redhat
     2.5 Slackware
     2.6 Pros8etes ru8miseis

  3. Ru8miseis Ellnvikwv

     3.1 Ellnvikes grammatoseires
        3.1.1 GRAFIS
        3.1.2 Truetype
        3.1.3 Kaveva ergaleio gia va ftia3w fonts;
     3.2 Kovsola (text mode)
        3.2.1 Greek-console
        3.2.2 Purnves 2.2 kai ellnvika
        3.2.3 Loipa programmata gia kovsola
     3.3 Grafiko periballov (Xwindows)
        3.3.1 GRkbd
        3.3.2 KiKbd
        3.3.3 xgrk
        3.3.4 grISOXKb
     3.4 Zwvn wras (Timezone)
        3.4.1 tzHellas
        3.4.2 EET.zic
     3.5 Ektupwseis
        3.5.1 Plain text se text ektupwtn pou upostnrizei ellnvika.
        3.5.2 Plain text se ektupwtn pou dev upostnrizei ellnvika.
        3.5.3 Tupwvovtas ellnviko PostScript keimevo.
           3.5.3.1 Tropopoiwvtas to Fontmap
           3.5.3.2 Fontmap, pros8etes luseis
           3.5.3.3 grpsfilter
     3.6 Pws kavw mount eva windows partition;
     3.7 Pws va grayw eva CD sto Linux;

  4. Efarmoges

     4.1 bash
     4.2 csh/tcsh
     4.3 ls
     4.4 more
     4.5 less
     4.6 a2ps
     4.7 genscript
     4.8 vi
     4.9 joe
     4.10 emacs
     4.11 xemacs
     4.12 pine
     4.13 elm
     4.14 metamail
     4.15 telnet
     4.16 rlogin
     4.17 xterm
     4.18 rxvt
     4.19 minicom
     4.20 samba
     4.21 ispell
     4.22 Midnight Commander
     4.23 Staroffice
     4.24 Netscape
        4.24.1 Netscape widgets
        4.24.2 Netscape fonts

  5. National Language Support

     5.1 Proetoimasia
     5.2 Egkatastasn Ellnvikwv Locale
        5.2.1 Egkatastasn Ellnvikwv mnvumatwv diaforwv efarmogwv
     5.3 Egkatastasn tou tcsh
     5.4 Ru8miseis diaforwv efarmogwv
     5.5 Problnmata
        5.5.1 Problnmata me tnv C Library (libc)
        5.5.2 Problnmata me ta X
        5.5.3 Problnmata pou dnmiourgouvtai otav ola eivai swsta ;-)
     5.6 Epipleov plnrofories

  6. Tex/LaTex

     6.1 To project BABEL
     6.2 Prospa8eies e3ellnvismou tou Tex/LaTex
     6.3 Suvdesmoi gia Tex/LaTex

  7. Hlektrovikn tekmnriwsn kai biblia

     7.1 Linux Documentation Project
     7.2 Periodika
     7.3 Biblia eidika gia Linux
     7.4 Unix gia Arxarious
     7.5 Unix gia Proxwrnmevous
     7.6 Diaxeirisn Sustnmatos
     7.7 Asfaleia Sustnmatos sto Unix
     7.8 Unix kai Internet
     7.9 Ellnvika biblia gia to UNIX

  8. To Linux stnv Ellada

     8.1 Listes kai omades suzntnsewv (Newsgroups)
     8.2 IRC
     8.3 Fidonet
     8.4 Omades Ellnvwv Xrnstwv tou Linux
        8.4.1 HELLUG
        8.4.2 PLUG
        8.4.3 TheLUG
     8.5 Egw pws mporw va bon8nsw
     8.6 Internet Sites
        8.6.1 WWW
        8.6.2 FTP
        8.6.3 Komboi tns Allodapns :-)
     8.7 Diavomes kai CD
     8.8 Bibliopwleia kai diavomeis twv CD

  9. FAQ

     9.1 Pws 3ekivnse to Linux;
     9.2 Ti logous exw gia va egkatastnsw to Linux;
     9.3 Pws mporw va ma8w ta basika gia to Linux;
     9.4 Sumbatotnta;
     9.5 Ti SOFTWARE upostnrizetai;
     9.6 Ti eivai to compile tou purnva;
     9.7 Ti eivai auto to SIG11;
     9.8 Uparxouv alla eleu8era Unix;
     9.9 Basikn orologia

  10. Pivakes xaraktnrwv, character sets

     10.1 Tupopoinseis twv ellnvikwv
     10.2 737
        10.2.1 Tropopoinsn purnva gia upostnri3n 737
        10.2.2 737 se X-windows
     10.3 928
        10.3.1 Windows-1253
     10.4 Unicode
        10.4.1 Unicode Links
     10.5 Metatropeis ellnvikwv
        10.5.1 gr2gr
        10.5.2 grfilter
        10.5.3 greek2lat
        10.5.4 trans120.tar.gz
        10.5.5 gkconv
        10.5.6 recode
     10.6 Tupoi arxeiwv kai metatropn tous
     10.7 Ti uparxei akoma sto Internet sxetika me ellnvika;

  11. TODO

     11.1 sgmlutils
     11.2 groff
     11.3 KDE
     11.4 vim,viH
     11.5 nn
     11.6 tin
     11.7 mtools
     11.8 jove
     11.9 pcal
     11.10 kermit
     11.11 SHMEIWSEIS


  ______________________________________________________________________

  1.  Eisagwgn

  Auto to keimevo exei sullegmeves plnrofories gia tnv ru8misn tou
  leitourgikou sustnmatos Linux gia tnv upostnri3n tns ellnvikns
  glwssas.  Skopos DEN eivai n apavtnsn gevikwv problnmatwv, alla movov
  autwv pou sxetizovtai me tnv ellnvikn glwssa kai tis idiaiterotntes
  evos Ellnva xrnstn, sumperilambavomevwv:

    tns upostnri3ns ellnvikwv se console mode kai Xwindows,

    tns xrnsns ellnvikwv se efarmoges,

    tns or8ografias,

    tns epikoivwvias me allous Ellnves xrnstes.

  Gia mia grngorn ``'' avatre3ate sto avtistoixo kefalaio.

  Parakalw, va exete up' oyiv sas oti oi odngies gia ta ellnvika mporei
  va mnv xreiazovtai n va eivai mnv isxuouv me akribeia stnv periptwsn
  sas.  Auto px sumbaivei e3' aitias mikrodiaforwv meta3u twv diavomwv
  (Debian, Suse, Redhat, OpenLinux klp), n epeidn me tov kairo oi luseis
  pou parousiazovtai edw evswmatwvovtai stis diavomes.



  1.1.  Suvtnrnsn tou Hellenic-HOWTO

  H suvtnrnsn autou tou keimevou givetai apo tov Gewrgato Fwtn
  <gef@hellug.gr > kai n pio teleutaia ekdosn 8a brisketai sto URL:
  http://students.ceid.upatras.gr/~gef/linux/docs/HOWTO/

  To keimevo auto 8a mporeite va to breite episns edw:

    http://www.hellug.gr/gr/howto/howto/pub/html/Hellenic-HOWTO.html

    http://metalab.unc.edu/LDP/HOWTO/Hellenic-HOWTO.html

    ftp://argeas.hellug.gr/pub/unix/linux/GREEK/HOWTO


  1.2.  Morfopoinseis tou Hellenic-HOWTO


  To HOWTO auto uparxei stis e3ns morfopoinseis:

    Hellenic-HOWTO.html html me Ellnvika 928 (moiazouv me ta
     windows-1253)

    Hellenic-HOWTO.html eivai greeklish (xrnsimo priv stn8ouv ta
     ellnvika)

    Hellenic-HOWTO.sgml Eivai o pngaios kwdikas tou HOWTO, pou se
     suvdiasmo me ta sgml-tools paragei ola ta upoloipa.


  1.3.  Tropopoinseis

  Gia opoiodnpote metatropn/sxoliasmo tou HOWTO, parakalw epikoivwveiste
  mazi mou sto gef@hellug.gr me subject: HELLENIC-HOWTO.  Eav breite
  la8n n avakribeies sto keimevo, dnlwste to.  Episns avalambavw tnv
  or8ografia, tovismo kai suvtaktiko elegxo gia ta keimeva, xwris auto
  va snmaivei oti 8a eivai ola pavta teleia :-)

  Istoriko allagwv:

    0.00 Avakoivwsn evar3ns tou keimevou stnv lista linux-greek-users
     (Ioulios 97)

    0.01 Basikos skeletos tou HOWTO

    0.1 Pros8nkn keimevou ar8rwv, epikollnsn 3evwv tmnmatwv.

    0.2 Pros8nkes/Allages 2.4.3, 3.2.x, 6, 3.3.3

    0.3 Gevikes allages

    0.4 Pros8nkes/Allages/Epaln8eusn 3.x

    0.5 Allagn 2.5

    0.6 Pros8nkes me basn to NLS FAQ

    0.7 Orgavwsn se SGML kai avakoivwsn upar3ns stn lista.

    0.8 To "euxaristies" egive "spovdes" kai alla polla :-)

    0.9 Pros8nkn kefalaiou Netscape, Timezone, dior8wseis

    0.9p1-4 Dokimes efarmogwv me ta ellnvika


    0.9p5,6,7,8 Proetoimasia gia telikn ekdosn

    0.9905*,06* prefinal versions

  { Ta tmnmata pou eivai mesa se agkistra, eivai proswriva, kai dev 8a
  uparxouv stnv ekdosn 1.0 } { akuro, 8a meivouv } { Ta tmnmata pou
  exouv (???) xreiazovtai epaln8eusn n pros8nkes}


  1.4.  Spovdes

  Ta gvwsta credits :-)

  Euxaristw idiaitera tov 'Aggelo Xaritsn <ah@computer.org> ( gvwstos
  gia tis ergasies tou gurw apo ta ellnvika twv UNIX sto HRI ), gia tis
  ektetameves pros8nkes kai upodei3eis tou.

  Polutimn, episns, ntav n bon8eia twv:

    Tasos Kapios <fadom@ccf.auth.gr> ( Kefalaio gia National Language
     Support )

    Keramidas Giwrgos <keramida@hellug.gr> ( Kefalaio gia Tex/LaTex kai
     alla polla)

    Ko3aras Arns <koxaras@ceid.upatras.gr> ( Kefalaio gia Netscape )

    Pavagiwtns Bruwvns <vrypan@hellug.gr,
     http://members.xoom.com/Vrypan > ( Kefalaio gia Grammatoseires,
     Ektupwseis kai alla )

    Swtnrns Tsimpwvns <tsimbonis@forthnet.gr>,

    Avtwvns Kabarvos <akav@hellug.gr>,

    Papadnmntriou Spuros <spapadim@csd.uch.gr>.

    Giavvns Mntsos <gmitsos@duth.gr>.

  Gia tn suggrafn tou keimevou autou xrnsimeusav sav prwtes pnges ta:

    linux-danish-howto (Thomas Petersen),

    linux-italian-howto (Marco Gaio Gaiarin)


  1.5.  Pveumatika dikaiwmata kai adeia xrnsns.

  Oi aparaitntes dieukrivnseis...

  Ta pveumatika dikaiwmata autou tou HOWTO avnkouv stov Gewrgato Fwtn,
  alla epitrepetai n diavomn upo tous akolou8ous orous:

  Ektos kai av orizetai diaforetika, ta keimeva "Linux HOWTO" eivai
  katoxurwmeva apo tous avtistoixous suggrafeis tous. Ta "Linux HOWTO"
  mporouv va avaparagovtai kai diavemovtai e3' oloklnrou n merikws, me
  ka8e meso fusiko n nlektroviko, arkei autn paragrafos gia ta
  pveumatika dikaiwmata, va diatnreitai se ka8e avtigrafo. Emporikn
  epavadiavomn epitrepetai kai malista evdeikvutai.  Par' ola auta o
  suggrafeas 8a n8ele va eivai evnmerwmevos se tetoies periptwseis.

  Oles oi metafraseis, paragomeves ergasies, n suv8eseis pou
  perilambavouv opoiodnpote "Linux HOWTO" prepei va kaluptovtai apo
  autnv tnv adeia. Dnladn, dev epitrepetai n paragwgn ulikou prokuptov
  apo auto kai n epiboln se auto epipros8etwv periorismwv osov afora tnv
  diadosn tou. E3aireseis mporouv va givouv kata periptwsn. Gia
  perissoteres plnrofories epikoivwvnste me tov suvtovistn twv Linux
  HOWTO.

  Ev suvtomia, epi8umeitai n diadosn autwv twv plnroforiwv diamesou osov
  perissoterwv tropwv eivai efikto. Par' ola auta diatnrouvtai ta
  pveumatika dikaiwmata twv keimevwv "Linux HOWTO", kai eivai epi8umntn
  n evnmerwsn gia opoiodnpote sxedio diavomns autwv.

  Gia perissoteres plnrofories, epikoivwvnste me tov Greg Hankins,
  suvtovistn twv Linux HOWTO sto email: gregh@metalab.unc.edu, n sto
  tnlefwvo +1 404 853 9989.

  Eidika, gia tnv ellnvikn ekdosn epikoivwvnste me tov Gewrgato Fwtn,
  sto: gef@hellug.gr


  1.6.  Note to english users & Copyright

  * This document explains how to setup hellenic (greek) support under
  Linux.  This includes the environment for greek users, as well as
  details on the configuration of applications.  The document is written
  in modern hellenic ISO-8859-7, but you may find a "greeklish" version
  as well.  Hellenic HOWTO is maintained by Fotis Georgatos
  <gef@hellug.gr> *

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Greg Hankins, the Linux HOWTO
  coordinator, at gregh@metalab.unc.edu via email, or at +1 404 853
  9989.



  2.  Egkatastasn

  Quickstart gia Ellnves xrnstes:

    Ri3te mia matia oti upostnrizetai to hardware sas sto Hardware-
     HOWTO.

    Stnste mia apo tis diavomes ``'', ``'', ``'', Debian, OpenLinux.
     Agoraste tis n avtigrayte tis (epitrepetai!) apo to Internet:
     http://www.hellug.gr/gr/whatislinux/download.html.

    Ru8miste to sustnma sas va suvergazetai me tov ektupwtn, to
     povtiki, to modem, kai va snkwvei to grafiko periballov me tov
     window manager pou 8elete.

    Stnste ta ellnvika. Bl. epomevo upokefalaio ``''

    Ru8miste tis efarmoges (``'', Staroffice, shells kuriws) gia ta
     ellnvika.


  2.1.  Egkatastasn ellnvikwv

  Ta bnmata diaferouv apo diavomn se diavomn, polu perissotero twra pou
  ta ellnvika evswmatwvovtai siga siga, stis diafores diavomes
  (Noembrios 1999).

  Eav dev exete ndn ellnvika, loipov:

    Greek-console Stnste to ``'', gia va exete ellnvika stnv kovsola me
     aristero alt-shift.  rpm -i  greek-console-1.1.0-3.i386.rpm.
     Snmeiwste oti kavovika dev 8a deite ellnvika sto prompt, alla movo
     mesa se editor, kai afou zntnsete chcp 928 gia to fortwma ellnvikwv
     fonts.

    GRAFIS Stnste tis grammatoseires ``'', gia ta Xwindows: xfntgr.rpm

    GRkbd Stnste to ``'' (odngos plnktrologiou), gia va mporeite va
     grafete ellnvika sta Xwindows.  GRkbd-1.2-1.i386.rpm

    XFGreekKBD Eav to prongoumevo (grkbd) gia kapoio logo dev douleyei,
     katebaste auto.  Eivai snmavtika pio poluplokos o tropos
     leitourgias tou apo to grkbd, eseis apla stnste to me tnv evtoln
     rpm -i XFGreekKBD-1.2-2.noarch.rpm


  2.2.  Xrnsimes sumboules


    To periodiko magaz exei polla ar8ra pou eivai e3eidikeumeva pavw se
     8emata pou apasxolouv polu kosmo px Tex/Latex, Samba, Staroffice,
     XISP, KDE, bash, Ellnvika, NLS klp.  To magaz exei pln8os apo
     erwtnseis pou exouv givei sto parel8ov, kai ligo polu oi erwtnseis
     epavalambavovtai.

    Afierwste arketo xrovo diabazovtas gia va evnmerw8eite gurw apo to
     problnma pou yaxvete, MHN paraleiyete va diabasete ta HOWTO kai FAQ
     (/usr/doc/faq) tou LDP project.

    Prospa8nste opwsdnpote va kavete ya3imo se palies erwtnseis.  Oi
     erwtnseis pavw se 8emata ndn apavtnmeva eivai baretes.  Ya3te
     sxetika 8emata apo tnv selida http://lists.hellug.gr/archives.

    Eav suvavtnsete problnmata, oi Ellnves xrnstes 8a mporouv va
     bon8nsouv mesa apo tnv lista linux-greek-users, ta newsgroups n ta
     sxetika IRC channels.  Episns apo ekei 8a parete sumboules, gia to
     pws 8a ru8misete swsta to sustnma sas.

    Ta die8vn newsgroups comp.os.linux* eivai episns xrnsima, px
     news://comp.os.linux.misc

    Mnv stelvete proswpiko email se kapoiov, giati spavia uparxei o
     xrovos gia apavtnsn. Avti8eta protimnste tnv lista n to newsgroup,
     opou n pi8avotnta va parete apavtnsn eivai polu megalutern.  PX,
     sto diko mou mailbox, suxva ftavouv grammata autou tou tupou:

     me lene Xxxxx spoudazo yyyyyyy kai arxisa na asxoloumai me to linux.
     Tha ithela na mou peis pou mporo na bro to programma.
     oti theleis na mou to steileis sto zzz@zzzzzzzzzz.zz


  Dev apavtw tetoia email, eidika otav to HOWTO kai to FAQ exouv tis
  apavtnseis, avtistoixa prattouv kai alloi. Deite kai auto eav dev
  peistnkate: Tinamhnkanete.html


  2.3.  Suse


    Mia katatmnsn tou diskou me 1Gb eivai logikn epilogn gia to Suse,
     ka8ws erxetai me polla paketa pou 8a 8elete va dokimasete (oxi oti
     dev mporeite va to stnsete se 40Mb).

    Ekkivnste tnv egkatastasn apo tn disketa n to 1o CD.

    Mesa apo to periballov egkatastasns epile3te pou 8a mpei to
     leitourgiko, me ti parametrous, kai poia programmata 8a balete.

    Afou akolou8nsete tis odngies pou exei stnv o8ovn, 8a kataln3ete
     sta telika stadia ru8misewv mesa apo to Yast, auto eivai to
     ergaleio me to opoio givetai administration, eav dev exete empeiria
     me UNIX.

    Ru8miste povtiki, karta diktuou, ektupwtn, scanner, modem mesa apo
     to yast.

    Molis 3emperdeyete kai me auto, tre3te to sax, auto ru8mizei to
     grafiko periballov.

    Mia kaln idea eivai pai3ete me to KDE (stnste to apo to yast eav
     dev to exete ndn kavei), kai va suvde8eite me to Internet me to
     kppp, eav exete dialup suvdesn.

    To suse perilambavei to  applixware office suite, pou mporei va
     avtikatastnsei to office twv windows.  Evallaktika uparxei to
     dwreav staroffice, pou 8a prepei va stnsete me tov kwdiko tou apo
     tov kombo tns stardivision, http://www.stardivision.com.

    Ta Netscape, nedit, x11amp eivai se pollous xrnsima.

    Palaioteres ekdoseis tou Suse exouv stov katalogo gia NLS "gr_GR"
     avti gia "el_GR" pou eivai to or8otero. 3eperaste to problnma me
     tnv evtoln "ln -s el_GR gr_GR".

     Mia prwtn evtupwsn apo to Suse eixe parousiastei sto magaz,
     http://magaz.hellug.gr/05/03_suse.html, me idiaitera euvoikn
     kritikn (eivai n protimnsn tou grafovtos, toulaxistov gia to
     1998-99, giati eivai 8bit clean kai upostnrizei kala to NLS).
     Agoraste to mazi me to egxeiridio kai dev 8a xasete.


  2.4.  Redhat

  Eivai avtistoixn me tou Suse se megalo ba8mo, edw dev tnv perigrafoume
  avalutika.  Deite review evos palaioterou distribution apo to magaz,
  http://magaz.hellug.gr/01/06_redhatinst.html kai mia avalutikn
  perigrafn gia to pws 8a to kavete va suvergazetai me ta ellnvika
  http://magaz.hellug.gr/13/03_grredhat2.html.


  2.5.  Slackware


  As upo8esoume oti egka8istoume tnv diavomn Slackware:

    Epibebaiwse oti to sustnma sou exei xwro ( Proteivetai 1 partition
     512Mb )
    Promn8eusou to apo kapoio FTP site (bl. ``'') n agorase to se CDROM
     (bl. ``''), kalutera to deutero.  Proteivetai to Slackware 3.6, apo
     to Developer's Resource tns Infomagic n alln sullogn.

    Ftia3e tnv Boot kai tnv Root disketa {5 Lepta}

    3ekiva tnv egkatastasn.  Eav eisai arxarios, kalov 8a eivai va
     epile3eis Typical Installation.  Ru8mise to Lilo gia va kaveis
     reboot.  {30 Lepta}

    Epavekkivnse to sustnma kai mpes sto Linux, gia prwtn fora, sav
     root (dev 8elei password) {2 Lepta}

    Alla3e to root password me tnv evtoln passwd

  Pleov 8a exeis eva sustnma pou douleuei, alla prepei va kaveis akoma
  ta e3ns:


    Pngaive stov upokatalogo /usr/src/linux, kai ftia3e purnva gia to
     mnxavnma sou.  {10+20 Lepta}

    Egkatestnse tov veo purnva me to Lilo, kai epavekkivnse to sustnma
     sou {5 Lepta}

    Tre3e to script XF86config, kai ftia3e to arxeio /etc/XF86config.
     Twra exeis Xwindows (dokimase X -probeonly, startx)

    Eav suvdeesai me to Internet me dial-up, katebase kai egkatestnse
     to Netscape Communicator gia browser, mailer, news reader. H
     teleutaia ekdosn eivai suvn8ws edw:
     ftp://ftp.ntua.gr/pub/www/Netscape/ Ru8mise ta ellnvika tou.

    XISP gia va suvdeesai sto Internet eukola. Polu kalo kai eivai kai
     Ellnva (Petros Mpouras).


  2.6.  Pros8etes ru8miseis


    Oi xrnmatistes as avatre3ouv sxetika me to euro (8a periexetai sto
     latin0=iso8859-15) stnv dieu8uvsn ftp://ftp.freshmeat.net/pub/euro-
     patch/EURO-1.4.tgz

    Egkatestnse tov ektupwtn sou. H diadikasia diaferei apo periptwsn
     se periptwsn, alla sxedov pavta xreiazetai to Ghostscript. Xrnsimo
     eivai to a2ps.

    Egkatestnse paketa pou se evdiaferouv opws Word processors,
     sxediastika, klp.  Pi8avotata 8a breis polu boliko gia epe3ergasia
     keimevou to Nedit.

    Mnv 3exaseis va ri3eis mia matia sta alla FAQs kai HOWTOs (eivai
     sta agglika)

    Osoi exouv suvn8isei tov Norton Commander apo to DOS, 8a
     epitaxuvouv polu tnv ergasia tous me tov Midnight Commander.

    Osoi eivai pragmatika polu suvn8ismevoi sto DOS, mporouv va
     xrnsimopoinsouv tov emulator DOSEMU tou Linux, me tov opoio 8a
     eivai duvatov va tre3ouv tis perissoteres efarmoges DOS, katw apo
     Linux. Gevika dev uparxei  problnma me ta ellnvika tou DOS katw apo
     X n kovsola alla isws xreiastei va kavete kapoies ru8miseis.

    Osoi 8elouv efarmoges Windows uparxei gia autous to Wabi apo tnv
     Sun, pou trexei pln8wra efarmogwv sumperilambavomevou kai tou
     Office. To Wabi omws stoixizei 200$, gia auto...  dokimaste to
     Wine, Pou prosfata exei arxisei kai deixvei snmadia snmavtikns
     beltiwsns.

    Gia window manager proteivoume to KDE: http://www.kde.org/



  3.  Ru8miseis Ellnvikwv

  Oloi oi Eurwpaioi xrnstes opoioudnpote leitourgikou sustnmatos, exouv
  duo problnmata: To prwto eivai n emfavisn twv eidikwv xaraktnrwv
  (grammatwv) tns glwssas, kai to deutero eivai va evnmerwsouv tov
  upologistn gia tnv allagn tou plnktrologiou.  Malista ta pragmata
  eivai xeirotera, giati oi efarmoges dev perimevouv eidikous xaraktnres
  kai suxva apaitouv eidikes ru8miseis n metablntes periballovtos.

  Gia tnv emfavisn twv xaraktnrwv xreiazetai va 3erouv oi efarmoges oti
  xrnsimopoieitai to set 737 n to 928  (=ISO-8859-7 n Latin-7).
  Epipros8eta 8a xreiastouv grammatoseires wste va faivovtai kai va
  tupwvovtai swsta ta ellnvika.

  Gia mia grngorn egkatastasn ellnvikwv deite to avtistoixo kefalaio:
  ``''


  3.1.  Ellnvikes grammatoseires

  Gia grammatoseires gia Tex, blepe ``''


  3.1.1.  GRAFIS

  To egxeirnma GRAFIS exei skopo va sulle3ei oles tis ellnvikes
  grammatoseires gia X-Windows pou kukloforouv eleu8eres (PUBLIC DOMAIN)
  sto Diktuo, va tis omadopoinsei kata tupo n/kai xaraktnristika, va
  dior8wsei tuxov la8n pou autes exouv, va dnmiourgnsei vees
  grammatoseires kai telos, va tis paradwsei stnv Ellnvikn koivotnta ws
  public domain.  Hdn to exei petuxei, deite
  http://hq.hellug.gr/~graphis/

  To GRAFIS perilambavei OLA ta prongoumeva paketa me kales ellnvikes
  grammatoseires pou exouv kuklofornsei kata kairous:

    X11-Greek-Fonts (P. Christias, 1994),

    X11greek (P. Christias, 1996)

    greekXfonts-misc,  (A. Haritsis, 1995)

    hrgrXfonts-75dpi, (Th. Prwtopapas & A. Haritsis @ HRI, 1995-6 )

    hrgrXfonts-100dpi, (Th. Prwtopapas & A. Haritsis @ HRI, 1995-6 )

    greekXfonts-BDF-1.1,  ( A. Haritsis, 1995-6)

    greekXfonts-Type-1.1, ( A. Haritsis, 1995-6)

    XgreekFonts (Moraitakis Konstantinos, 1997)

    XFGreekFNTS (Panagiotis Vrionis, 1998?)

    elot7x14 + elot7x14B (A. Kavarnos, 1997)

    helv_R_O_10gr+helv_R_08gr+lutB_12_14gr (P. Bouras, 1998-9)

  =====================================================================
   Shmeiwseis apo Aggelo Xaritsi [ah@computer.org]:
   * ta Type1 (k.a.) 928 fonts moy exoyn to A tonoymeno se 2 theseis wste na
     einai symbata me windows texts. Epishs exoyn kai ta symbola poy leipoyn.
   * to kbd support gia ellhnika sto rxvt (poy exw kanei contribute) exei
     yposthriksh gia anw teleia kai ellhnika omoiwmatika kathws epishs
     kai grammata me tono/dialytika. Ola ayta prepei na perasoyn
     se X11 xkb-style (ala grISOXKb).

  * X11greek:
  Den iksera oti den bgainei h payla! An typwseis to PS bgainei
  kanonika. Ara mallon einai bug toy X Type1 rasteriser.
  BTW, exw kanei ki ena aplo filtro (grpsfilter) poy epitrepei printing
  greek texts mesa apo Netscape. Des parakatw!
  H lysh poy allazei ola ta ksena fonts se ellhnika den einai swsth.

  To greekXfonts-full-1.1.tgz egine me skopo:
  * na mazepsei ta pio kala greek fonts poy yphrxan sto diktyo
    Exei ta grtex/grtt kai polla alla: grfixed, couriergr, helveticagr.
    Akoma fonts kai se 737 encodings.
  * na xrhsimopoihsei "swsta" (XLFD) kai omoiogenh font names
  * na prosferei Type1 scalable fonts ypshlhs poiothtas (ta opoia
    prosferontai kai xwrista) - grinet
  * na doyleyei trasnsparently me Netscape
  =====================================================================



  3.1.2.  Truetype

  Teleutaia uparxei n duvatotnta va xrnsimopoinsei kaveis kai Truetype
  grammatoseires, me eva true-type font engine kai metatropeis, idavika
  gia osous exouv sulloges apo grammatoseires gia Windows/Mac.  Deite
  http://www.freetype.org/ kai gia va stnsete true type grammatoseires
  sto magaz http://magaz.hellug.gr/10/05_TTFlinux.html.


  3.1.3.  Kaveva ergaleio gia va ftia3w fonts;

  Ti fonts, bitmap (px. PCF/BDF) n Scalable (p.x. Type1, TTF) ;

  Gia to prwto uparxouv diafora (xmbdfed polu kalo, xfedor oxi kai toso)
  Gia to deutero tipota ousiastiko (dustuxws).  Dustuxws oti uparxei se
  stul Fontographer kai Icarus eivai se polu alpha stadio.  To movo
  sobaro programma kai kata tn gvwmn mou to kalutero eivai to METAFONT
  alla 8elei diabasma.

  Uparxei mia polu evdiaferousa selida sto diktuo:
  http://members.iworld.net/bumchul/xfont.html Stnv selida autn 8a brei
  kaveis - ektos apo plnrofories gia to pws 8a balei kaivouria fonts sto
  mnxavnma tou- ergaleia metatropns: px to ttftobdf. Episns uparxei to
  bdftopcf.

  Evdiaferousa eivai episns kai n selida:
  http://user.online.be/gd33771/download.html me mia poikilia ttf fonts
  (px. gia va mporei kaveis va grafei got8ika se xterm)


  3.2.  Kovsola (text mode)

  Oi teleutaies diavomes prepei va exouv ta ellnvika evswmatwmeva.
  Tre3te:



  #setfont iso07.f16
  #loadkeys gr


  Eav dev deite muvnmata la8ous, tote exete ellnvika stnv kovsola ndn,
  allazouv me aristero ALT-SHIFT.

  UP' OYIN: STO SHELL (bash, tcsh) DEN EXEI ELLHNIKA, KANONIKA.
  DOKIMASTE SE ENAN EDITOR, PX JOE,VI.


  3.2.1.  Greek-console

  Stnv kovsola mporeite va xrnsimopoinsete to greek-console tou Giwrgou
  Keramida. Upostnrizei kai 737 kai 928, evw exei kai eukoln egkatastasn
  me rpm. Ta ellnvika faivovtai me "chcp 737" kai "chcp 928" kai
  (ap)evergopoiouvtai me (aristera) ALT-SHIFT.  Episns to de3i ALT
  allazei stigmiaia to plnktrologio.



  3.2.2.  Purnves 2.2 kai ellnvika

  H vea gevia purnvwv 2.2.x (kai ara kai oi 2.3.x), exouv veo kwdika gia
  tnv diaxeirisn tns o8ovns se text mode  (eivai pleov me framebuffer)
  kai gia auto uparxouv problnmata stnv upostnri3n twv ellnvikwv stnv
  kovsola (oxi sto grafiko periballov).  O Swtnrns Tsimpovns brnke tnv
  lusn, va proste8ei sto /etc/profile to e3ns:

  [ -t 1 ] && printf "\033(K"


  to opoio evergopoiei ta ellnvika otav kapoios kavei interactive login.


  3.2.3.  Loipa programmata gia kovsola

  O Ale3ios Xouxoulas exei grayei episns to greek-2.0.tar.gz kai o
  Avtwvns Kabarvos (akav@hellug.gr) to grpty, pou douleuei kai se
  solaris.


  3.3.  Grafiko periballov (Xwindows)

  Oi epiloges pou exei kaveis gia va grafei ellnvika katw apo XWindows
  se Linux eivai  (perav tou va ta ftia3ei movos tou, px me xmodmap opws
  leei sto HRI): to GRkbd (n gevikotern lusn) , to grISOXKb (eav
  apotuxei to prongoumevo) kai to kikbd (gia to KDE).


  3.3.1.  GRkbd

  To paketo auto apo to Giavvn Tsakirn eivai ousiastika mia snmaia pou
  allazei apo tnv mia glwssa stnv alln, opws 8umouvtai polloi apo ta
  windows-3.x.  Eivai n pio eukoln lusn gia va exete ellnvika sto Linux
  sas kai 8a to breite sto metalab se source me to ovoma greek12.tgz kai
  stov Argea se binary.  To tgz arxeio pou 8a katebasete, periexei eva
  README, kai eva ektelesimo pou 8a balete stov katalogo /usr/local/bin.
  Mia snmaia pou allazei apo ellnvikn se agglikn kai avapoda se ka8e
  klik, n me patnma tou aristerou ALT-SHIFT, 8a emfavistei stnv o8ovn
  otav to ektelesete.  Diabaste to README.



  3.3.2.  KiKbd

  To KiKbd eivai apo tous Alexander Budnik kai Dnmntrio Mpoura kai eivai
  evas komyos tropos va exei kaveis ellnvika sto KDE
  (sumperilambavetai).  Douleye swsta me KDE=1.1.1 kai Qt=1.42 (alla oxi
  1.44).


  3.3.3.  xgrk

  Episns, eivai ev gvwsn mas n upar3n autou tou paketou gia ellnvika:
  http://www.softlab.ece.ntua.gr/~sivann/xgrk/ tou Spurou Iwavvou, pou
  eivai katallnlo gia polla tupou UNIX leitourgika sustnmata.


  3.3.4.  grISOXKb

  H prwtn ekdosn tou grISOXKb (1997) eivai proiov suvergasias twv
  Dnmntrn Mpoura kai Leftern Tsivtzeln.  To paketo grISOXKb eivai
  upersuvolo twv palaioterwv GRKbd (oxi auto tou Tsakirn - apln
  suvwvumia... ) kai grXiso.  H version autn exei polla "kaloudia". Ta
  duo pio snmavtika eivai:

    oti dev xreiazetai shared object binaries gia to X11R6.1 (XFree86
     v3.2) kai X11R6.3 (XFree86 v3.3 kai v3.3.1), kai

    oti douleuei kai me X11 clients pou upostnrizouv glwsses ektos twv
     Agglikwv mesw tou compose tou input extension.

     Perissotera sto README tou paketou, kai sta arxeia
     docs/INSTALLATION.*:
     ftp://argeas.hellug.gr/pub/unix/linux/GREEK/grISOXKb-1.2.tar.gz


  =====================================================================
  Apo [ah@computer.org]
  Ta tonoymena (; + letter) de moy bgainoyn se shells (ok se xedit).
  Den exw akomh brei giati.
  To package einai ontws poly kalh prospatheia. Einai akoma ateles.
  Leipoyn: tonoymena+dialytika, anw teleia, ellhnika omoiwmatika
  (BTW, ola yposthrizontai sto rxvt compiled me greek support).
  Epishs: ypothetei oti to keyboard einai ellhniko. Yparxoyn polla kbds
  (opws ta UK, IT klp) poy exoyn polla symbols se theseis diaforetikes
  apo to ellhniko (eg. @, ", \ klp). Exw hdh kanei patch sto grISOXKb
  gia to UK keyboard kai kalo einai na mporei kaneis me COUNTRY-X
  keyboard na mporei na kanei type ellhnika xwris na allazoyn oi theseis
  allwn symbols.

  Mazi me fix twn parapanw to XKB X11 greek support tha einai sxedon teleio.
  Ksereis an kai poy exei documentation gia XKB kai compose files.
  Kapoios prepei na to teleiwsei. Doyleyei kaneis twra se ayto ?
  =====================================================================



  3.4.  Zwvn wras (Timezone)

  H Ellada brisketai stnv Wriaia Zwvn Avatolikns Eurwpns (Eastern
  European Timezone,EET), pou eivai isoduvamo me tnv wra Greenwich suv 2
  wres (GMT+2), kata tnv xeimerivn periodo.  To kalokairi otav givetai
  allagn wras, n swstn diafora eivai +0300 (EET DST), opou DST snmaivei
  Daylight Saving Time.  Prokeimevou va givetai automata n metatropn,
  kalutera epile3te Europe/Athens.  To 1996 alla3e n nmeromnvia allagns
  apo kalokairivn se xeimerivn wra (apo Septembrn, twra givetai
  Oktwbrn). Oi vees diavomes tou Linux meta to 1996 to exouv up' oyiv
  tous auto, oi palaioteres 8elouv dior8wsn.  Deite ta epomeva
  upokefalaia sxetika me to 8ema.


  3.4.1.  tzHellas


  Dhmhtrhs Bouras: Me to paron 0a h0ela na anakoinwsw ena mini-paketo
  pou parexei ena dior0wmeno arxeio gia to Ellhniko timezone, meta tis
  allages pou perisy kai fetos (1996) anakoinw0hkan gia tis hmeromhnies
  allaghs ths "kalokairinhs" wras. Mazi me auto yparxei kai ena mikro
  programmataki pou diabazei tetoia arxeia kai typwnei tis plhrofories
  pou periexoun se an0rwpina-anagnwsimh morfh (pws leme "human-readable
  form" - h metafrash twn agglikwn orwn dinei kai pairnei, etsi gia na
  anatrixiazoun merikoi-merikoi :) :)).

  To paketaki (molis 4365 bytes) 0a to breite (entos oligou) sto

  ftp://argeas.hellug.gr/pub/unix/linux/GREEK/tzHellas-271097.tar.gz

  Katebaste to kai diabaste to README gia perissotera. Bottom line: to
  timezone file "Hellas" pou periexei, parexei swstes hmeromhnies
  allaghs wras (symfwna me thn prosfath epishmh anakoinwsh) gia thn
  Ellada, mexri kai ton Oktwbrio tou 2001, h mexri na mas alla3oune pali
  tis hmeromhnies... :)



  3.4.2.  EET.zic



  =====================================================================
  An 8elei na orisei kaneis timezone environment variable, ayth einai h
  svsth:
          setenv TZ 'EET-2EET DST-3,M3.5.0/3:00:00,M10.5.0/3:00:00'
  vraio e? :-)

  Pio kala bebaia einai na xrhsimopoioyme to svsto zoneinfo arxeio.
  Oi teleytaies ekdoseis toy linux exoyn svsta orismeno
  to EET (allakse to 1996).
  Oi palaioteres allazoyn thn vra to Septembrio, anti toy Oktvbrioy.
  Etsi ftiaxnoyme to parakatv arxeio EET.zic:

  ----- CUT: EET.zic -----
  Rule    E-Eur   1986    max     -       Mar     lastSun 3:00s   1:00    " DST"
  Rule    E-Eur   1986    1995    -       Sep     lastSun 3:00s   0       -
  Rule    E-Eur   1996    max     -       Oct     lastSun 3:00s   0       -
  Zone    EET             2:00    E-Eur           EET%s
  ----- CUT: END OF EET.zic -----

  Meta:
          zic EET.zic
  (ayto ftiaxnei to /usr/lib/zoneinfo/EET)
          /bin/rm -f /var/lib/zoneinfo/localtime
          ln -s /usr/lib/zoneinfo/localtime /var/lib/zoneinfo/EET
  =====================================================================



  3.5.  Ektupwseis

  Se auto to kefalaio 8a perigrayoume pws va ru8misete to sustnma sas
  wste va mporeite va ektupwsete ellnvika. Av dev eiste e3oikiwmevoi me
  ta basika sxetika me ta lpd kai lpr kalo 8a ntav va sumbouleuteite to
  Printing-HOWTO pou divei polutimes plnrofories.


  3.5.1.  Plain text se text ektupwtn pou upostnrizei ellnvika.

  Eav o ektupwtns sas mporei va tupwsei plain text kai upostnrizei
  ellnvika, dev xreiazetai va kavete sxedov tipota. Apla steilte to
  keimevo gia ektupwsn me tnv evtoln lpr. Prose3te movo to 8ema tou set
  xaraktnrwv: bl. kefalaio ``''.  Eav o ektupwtns sas upostnrizei
  diaforetikn kwdikoselida apo autn pou eivai grammevo to keimevo, 8a
  prepei va to metatreyete, bl. ``''.


  3.5.2.  Plain text se ektupwtn pou dev upostnrizei ellnvika.

  Av o ektupwtns sas dev upostnrizei ellnvika, 8a prepei va metatreyete
  to plain text keimevo se PostScript mesw tou a2ps (bl. ``'') kai va to
  tupwsete mesw tou Ghostscript. Eav exete problnmata, ya3te gia to
  a2psgr.


  3.5.3.  Tupwvovtas ellnviko PostScript keimevo.

  Akomn kai eav dev dia8etete ektupwtn pou va upostnrizei PostScript, to
  Linux sas epitrepei va tupwvete tetoia keimeva mesw tou Ghostscript.
  To ghostcript eivai eva programma pou metatrepei PostScript arxeia se
  morfn pou mporouv va katalabouv alles suskeues (ektupwtes diaforwv
  eidwv, X Windows, fax k.l.). Apo auto to snmeio kai pera, "ektupwsn
  mesa apo to ghostscript" 8a snmaivei metatropn evos PostScript arxeiou
  sto format tou ektupwtn sas kai meta ektupwsn me kapoia evtoln tns
  morfns lpr file.

  Ti 8a xreiasteite gia va tupwsete ellnvika apo to ghostview:

    Promn8euteite to ghostview (eivai tzampa) kai va to egkatastnsete.

    Na exete egkatestnmeves ellnvikes PostScript (type1)
     grammatoseires, kapou sto sustnma sas.  Me auto evvow oti oi
     grammatoseires autes mporouv va briskovtai se opoiodnpote directory
     (p.x. kapou sto X11R6 tree, gia xrnsn mesa apo ta X Windows).

    Na tropopoinsete to arxeio Fontmap.

     Dokimaste oti douleuei swsta px me tnv evtoln: {???}

  gs -sDEVICE=deskjet -dNOPAUSE -sOutpoutFile=/dev/lp1  tiger.ps


  3.5.3.1.  Tropopoiwvtas to Fontmap

  To Fontmap eivai to arxeio pou divei sto ghostscript pou 8a brei to
  arxeio ka8e grammatoseiras. Sto sustnma mou brisketai sto

  /usr/share/ghostscript/3.33/Fontmap


  Av dev 3erete pou exei egkatasta8ei to diko sas, dwste

  find / -name "Fontmap"



  To Fontmap apoteleitai apo eggrafes tns morfns


  /Charter-Roman                  (bchr.pfa)      ;


  H grammn autn gia paradeigma deixvei oti n grammatoseira Courier-Roman
  brisketai sto arxeio bchr.pfa.


  To movo pou xreiazetai va kavoume eivai va pros8esoume tis ellnvikes
  grammatoseires.  Ta ovomata pou 8a dwsete stis grammatoseires sas
  mporouv va eivai opoiadnpote (p.x. PanosArialBold) alla kalo eivai va
  exouv mia logikn (p.x. to PanosArialBold va mnv avtistoixei se mia
  courier italic grammatoseira !!!).  Av oi grammatoseires suvodeuovtai
  apo kapoio arxeio pou va tis perigrafei (p.x. fonts.scale) kalo 8a
  ntav va xrnsimopoinsete ovomata pou va eivai avtistoixa me auta pou
  divovtai ekei. Mporeite akomn va dwsete

  strings filename.pfb | more



  /FontName /GreekArialBold def


  Prosoxn! Ta ovomata twv arxeiwv otav dev perilambavouv to directory
  8ewrouvtai pws briskovtai sto directory pou to ghostscript fulaei
  paromoia arxeia.  Av oi grammatoseires sas briskovtai kapou allou va
  balete oloklnro to ovoma.  Gia paradeigma,


  /GreekArialPlain (/usr/X11/lib/X11/fonts/Type1GR/grkarip.pfb) ;



  Av stelvete arxeia pros ektupwsn apo diafores efarmoges (p.x.
  Netscape) eivai polu pi8avo autes va xrnsimopoiouv kapoies default
  grammatoseires.  Gia paradeigma, to Netscape 8a steilei opoiodnpote
  arxeio, ave3artnta apo tnv glwssa pou eivai grammevo, va tupw8ei me
  tis grammatoseires Times kai Courier.  Auto 8a exei sav apotelesma va
  tupwvovtai ta ellnvika keimeva se akatavontn morfn (gia va to poume
  eugevika).  H lusn eivai va pros8esete sto telos tou Fontmap eggrafes
  pou 8a avtika8istouv tis grammatoseires autes me tis ellnvikes.  Gia
  paradeigma oi teleutaies grammes tou dikou mou Fontmap eivai:

  /Times-Roman                    /GreekTimesPlain ;
  /Times-Italic                   /GreekTimesItalic ;
  /Times-Bold                     /GreekTimesBold ;
  /Times-BoldItalic               /GreekBoldItalic ;
  /Courier                        /GreekCourierPlain      ;
  /Courier-Italic                 /GreekCourierItalic ;
  /Courier-Bold                   /GreekCourierBold ;
  /Courier-BoldItalic             /GreekCourierBoldItalic ;


  H lusn autn dev eivai to idaviko alla toulaxistov douleuei.


  3.5.3.2.  Fontmap, pros8etes luseis

  O 'Aggelos Xaritsns mou esteile tis dikes tou ru8miseis gia to
  problnma sxetika me to Fontmap, ka8ws kai eva programmataki, to
  grpsfilter (deite parakatw), me to opoio 8a mporesete va 3eperasete to
  problnma me to netscape xwris va peira3ete to fontmap.



  Ta Fontmap aliases poy proteinw (kanei use ta Type1 fonts moy):
  Pros to telos toy Fontmap:
  ===================cut==here=======================================
  % ------------------------------------------------------
  % Elot greek fonts by Angelo Haritsis <ah@computer.org>
  % ------------------------------------------------------
  /GreekArialPlain                (grkarip.pfb)   ;
  /GreekArialBold                 (grkarib.pfb)   ;
  /GreekArialItalic               (grkarii.pfb)   ;
  /GreekArialBoldItalic           (grkaribi.pfb)  ;
  /Greek-Arial-Plain              /GreekArialPlain ;
  /Greek-Arial-Bold               /GreekArialBold ;
  /Greek-Arial-Italic             /GreekArialItalic ;
  /Greek-Arial-Bold-Italic        /GreekArialBoldItalic ;
  /Greek-Arial-BoldItalic         /GreekArialBoldItalic ;

  /GreekTimesPlain                (grktimp.pfb)   ;
  /GreekTimesBold                 (grktimb.pfb)   ;
  /GreekTimesItalic               (grktimi.pfb)   ;
  /GreekTimesBoldItalic           (grktimbi.pfb)  ;
  /Greek-Times-Plain              /GreekTimesPlain ;
  /Greek-Times-Roman              /GreekTimesPlain ;
  /Greek-Times-Bold               /GreekTimesBold ;
  /Greek-Times-Italic             /GreekTimesItalic ;
  /Greek-Times-Bold-Italic        /GreekTimesBoldItalic ;
  /Greek-Times-BoldItalic         /GreekTimesBoldItalic ;

  /GreekCourierPlain              (grkcurp.pfb)   ;
  /GreekCourierBold               (grkcurb.pfb)   ;
  /GreekCourierItalic             (grkcuri.pfb)   ;
  /GreekCourierBoldItalic         (grkcurbi.pfb)  ;
  /GreekCourier                   /GreekCourierPlain ;
  /Greek-Courier                  /GreekCourierPlain ;
  /Greek-Courier-Plain            /GreekCourierPlain ;
  /Greek-Courier-Bold             /GreekCourierBold ;
  /Greek-Courier-Italic           /GreekCourierItalic ;
  /Greek-Courier-Bold-Italic      /GreekCourierBoldItalic ;
  /Greek-Courier-BoldItalic       /GreekCourierBoldItalic ;

  % Polytoniko Greek fonts
  /GreekPolyTimesPlain            (grkpolp.pfb)   ;
  /GreekPolyTimesItalic           (grkpoli.pfb)   ;
  /Greek-Poly-Times-Plain         /GreekPolyTimesPlain ;
  /Greek-Poly-Times-Italic        /GreekPolyTimesItalic ;
  ===================cut==here=======================================



  3.5.3.3.  grpsfilter



  Na kai to aplo filtro grpsfilter:
  -----------------------------grpsfilter-----------------------
  #!/bin/sh
  # Filter to print greek from Netscape (may be used in printcap)
  # (c) 1997 Angelo Haritsis <ah@computer.org>
  # NB: You need my postscript greek fonts and proper Fontmap!
  #
  exec sed -e 's/\/Times\(.* findfont\)/\/Greek-Times\1/g' \
      -e 's/\Courier\(.* findfont\)/\Greek-Courier\1/g' \
      -e 's/\/Times-Oblique\(.* findfont\)/Greek-Times-Italic\1/g' \
      -e 's/\/Times-BoldOblique\(.* findfont\)/Greek-Times-BoldItalic\1/g'
  -----------------------------grpsfilter-----------------------

  An ftiakseis enan printer `grps' sto printcap poy pernaei ola ta
  Postscript mesa apo to grpsfilter, tote exeis ellhnikh ektypwsh
  xwris na "xalaseis" to FontMap.

  Profanws to filter doyleyei kai sto cmd line. Apo Netscape print to
  a file: test.ps kai meta:
    grpsfilter <test.ps | ghostview -



  3.6.  Pws kavw mount eva windows partition;

  Proupo8esn gia auto eivai va exete kavei compile tov purnva me NLS,
  737 kai iso-8859-7. Av 8elete va evergopoiouvtai ta ellnvika ovomata
  twv arxeiwv Windows automata se ka8e ekkivnsn tou sustnmatos, prepei
  va avtikatastnsete sto arxeio fstab stn grammn opou givetai mount tns
  katatmnsns me to vfat tn le3n default me tnv ru8misn
  iocharset=iso8859-7.  Bazei kaveis parametrous sto /etc/fstab gia
  windows partition me ellnvika filenames, px:

  /dev/hda1       /Win95  vfat    rw,user,codepage=737,iocharset=iso8859-7        0       0


  n pervate tis parametrous kateu8eiav stnv evtoln mount, px:

  mount -tvfat -onoexec,iocharset=iso8859-7 /dev/hda1 /Win95



  3.7.  Pws va grayw eva CD sto Linux;

  Xrnsimopoinste to xcdroast, prose3te omws to format pou 8a diale3ete.
  To paradosiako protupo ISO9660 dev mporei va perilabei ola
  xaraktnristika pou exei eva UNIX filesystem opws auto tou Linux, to
  ext2.  Avt' autou ta UNIX exouv to Rockridge, pou upostnrizei
  directories megalou ba8ous, mikra-megala grammata, ovomata me
  periergous xaraktnres (kai oi ellnvikoi eivai tetoioi gia ta CD),
  symbolic links, file permissions klp.  To Romeo/Joliet pou eivai gia
  windows, dev eivai toso kalo oso to Rockridge (px dev grafei swsta
  ovomata pou arxizouv me teleia), gia auto xrnsimopoieiste stnv avagkn
  tnv xakia "Rockridge+Joliet", douleuei ayoga sto diabasma tou CD se
  polla leitourgika sustnmata.

  Eav avarwtieste giati dev douleuei n egkatastasn tou Linux pou brnkate
  se kapoio CD, eivai polu pi8avos logos oti dev eivai Rockridge.



  4.  Efarmoges

  Gevika, oi efarmoges prepei va metaglwttizovtai me NLS -otav uparxei-
  kai ws "8-bin-clean" giati ta ellnvika xrnsimopoiouv kai ta 8 bits.

  Epeidn n glwssa eivai ta ellnvika, 8etoume: export LANG=el (bash/sh) n
  setenv LANG el (csh/tcsh).  Kalov 8a eivai va oristei n metablntn
  periballovtos LC_CTYPE se iso_8859_7.  Autn n ru8misn prepei va mpei
  sto /etc/profile kai sto /etc/csh.cshrc gia ru8misn se epipedo
  sustnmatos n sto  /bashrc kai  /cshrc gia xrnstes me bash/sh kai
  csh/tcsh kelufn avtistoixa.

  Episns to  /.Xdefaults n  /.Xresources 8a prepei va periexei:

         *basicLocale:   C
         *timeFormat:    C
         *numeric:       C
         *displayLang:   iso_8859_7
         *inputLang:     iso_8859_7



  4.1.  bash

  Gia bash v.1.13+, pros8este to parakatw sto /etc/inputrc n sto
   /.inputrc, gia va exete ellnvika sto kelufos (grammn evtolwv):

            set meta-flag on
            set convert-meta off
            set output-meta on


  To idio isxuei kai gia sh.


  4.2.  csh/tcsh


      export LANG=el_GR
      export LC_CTYPE=iso-8859-7
      stty cs8 -istrip -parenb (???)

  =====================================================================
       tcsh :
          Put the following in your /etc/csh.cshrc or .tcshrc file

            setenv LC_CTYPE iso_8859_7
            stty pass8

       Note: If this doesn't work your copy of tcsh was probably not compiled
       with NLS support or possibly it's version 6.03 or lower.

  ftp://tesla.ee.cornell.edu/pub/tcsh.
  DEN DOULEUEI (tcsh 6.06.00 13-5-95, options 8b, nls, dl ,al, sm)(???)
  =====================================================================



  4.3.  ls

  Gia va deite ta arxeia me ellnvika ovomata, ekteleste tnv evtoln ws
  "ls -N".  Gia eukolia kavte tnv alias sto  /.profile n balte tnv
  parametro -N sto $LS_OPTIONS eav dev eivai ndn:

  export LS_OPTIONS="$LS_OPTIONS -N"



  4.4.  more

  O Mavwlns Lourakns, <lourakis@csd.uch.gr> "peira3e" to "more" gia va
  deixvei 928 ellnvika, moreH:
  ftp://argeas.hellug.gr/pub/unix/linux/GREEK/moreH.tar.gz


  4.5.  less

  Uparxouv diaforoi tropoi gia va douleyei to less, o ka8e evas me
  diaforetiko ba8mo duskolias:

    less -r (raw mode, mnv perimevete polu omorfa apotelesmata)

    set LESSCHARSET="koi8-r" (H pio eukoln lusn)

    set LESSCHARDEF="8bcccbcc18b95.b128."

    Me upostnri3n NLS, bl. ``'' (H pio "sobarn" lusn)

    Na peira3ei to charset.c  (Gia duvatous lutes):

     ----- CUT HERE - patch.in -----

     *** charset.c.orig      Thu Aug  7 11:24:42 1997
     --- charset.c   Thu Aug  7 11:25:02 1997
     ***************
     *** 49,54 ****
     --- 49,55 ----
             { "dos",        "8bcccbcc12bc5b95.b."           },
             { "koi8-r",     "8bcccbcc18b95.b128."           },
             { "next",       "8bcccbcc18b95.bb125.bb"        },
     +       { "8859-7",     "8bcccbcc18b95.b128." }, /* By Antonis Kavarnos */
             { NULL }
       };


  kai meta:  setenv LESSCHARSET "8859-7"


  4.6.  a2ps

  Uparxei mia eidikn metaglwttisn tou a2ps v4.0 (ascii to postscript),
  pou upostnrizei ellnvika, grammevn apo tov Mavwln Lourakn
  <lourakis@csd.uch.gr> kai tov Giavvn Mouzakn <mouzakis@csd.uch.gr>.
  Brisketai edw
  ftp://argeas.hellug.gr/pub/unix/linux/GREEK/a2ps_v4.0-greek.tar.gz {
  To standard a2ps tha exei syntoma swsth yposthriksh gia ellhnika. }


  4.7.  genscript

  Evallaktika tou a2ps uparxei to GNU enscript, pou 8ewreitai kalutero
  kai perilambavei episnma upostnri3n gia ellnvika apo tnv ekdosn 1.6.0
  kai meta.  Gia perissoteres pnrofories deite:
  http://www.csd.uch.gr/~lourakis/genscript/



  4.8.  vi

  O vi opws tov trexete apo tis gvwstes diavomes 8a prepei va douleyei
  me ta ellnvika, xwris tropopoinsn, eav oxi, uparxei o viH (ellnvikos
  vi, 8a tov breite stov Argea) kai o vim.


  =====================================================================
  Shmeiwteon oti o vim meta thn ekdosh 4.x exei yposthriksh toy
  langmap flag (prepei na ginei compile me ayto to flag - standard builds
  den to exoyn synithws). To feature ayto, contributed apo ton
  Angelo Haritsis <ah@computer.org>, einai meros toy standard vim
  distribution kai oxi aplws ena palio patch.
  Apo to documentation toy vim (:help langmap):
   langmap(lma):
       This option allows support for keyboards that have a mode for a
       special language.  The idea is that when you are typing text in
  Insert mode your keyboard is switched in the special language mode, you
  get different key codes for the special characters.  When in command
  mode the 'langmap' option takes care of translating these special
  characters to the original meaning of the key.  This means you don't
  have to change the keyboard mode to be able to execute normal mode commands.
  Exei kai to katallhlo setting gia ellhnika sto documentation.
  Nomizw oti einai xrhsimo gia vi users...

  ++ Isws ena linux .rpm (properly built) tha htan xrhsimo.
  =====================================================================



  4.9.  joe

  O joe upostnrizei ellnvika eav evergopoinsoume 8bit support, eite
  trexovtas joe -asis, eite bazovtas tnv parametro -asis sto
  usr/(local/)/lib/joerc.


  4.10.  emacs

  O Emacs 19+ exei diko tou tropo va diaxeirizetai to plnktrologio.  Gi'
  auto kai dev douleuei opoiadnpote ellnvikn upostnri3n ftiaxtei gia tnv
  kovsola kai mesa stov Emacs.

  H lusn eivai to paketo greek-mode.el, pou exei ftia3ei o Saravtos
  Kapidakns <sarantos@csd.uch.edu>.  Gia perissoteres plnrofories, to
  idio to paketo mas parapempei stnv dieu8uvsn:
  http://www.ics.forth.gr/~sarantos/EMACS+GREEK opou uparxouv odngies
  egkatastasns.  To idio to paketo mporei kaveis va to brei eukola kai
  stis selides tou Hellenic Resources Institute (HRI) sto tmnma pou
  avaferetai se Ellnvika gia UNIX.



  =====================================================================
       emacs :
          In version 19.26 or later of GNU emacs you can simply  set the
          environment variable LC_CTYPE to iso_8859_7 like you do for tcsh
          and elm. If you use an older version put the following in your
          /usr/lib/emacs/site-lisp/default.el file:

            (standard-display-european t)

            (set-input-mode (car (current-input-mode))
                    (nth 1 (current-input-mode))
                    0)

       Dead key functionality should work under GNU emacs provided you use
       GNU emacs v19.30 or higher and XFree86 v3.1.2 or higher, so don't
       start researching available elisp packages implementing "electric
       keys" or anything like that. If you want to implement European
       keyboard conventions in emacs without upgrading the best choice is
       probably the remap package available from the AUC FTP server (see
       section ``References and FTP sites''.)
  =====================================================================



  4.11.  xemacs

  Gia va xrnsimopoinsei kaveis xemacs mazi me to kikbd (evdexomevws
  gevika), prepei va orisei duo grammes sto .xemacs-options:

  (global-set-key 'Dacute_accent '"")
  (global-set-key 'Ddiaeresis '"")



  4.12.  pine

  To pine to movo pou xreiazetai eivai va oristouv sav "alternative
  editor" o joe n o viH.  Upostnrizei movo 928, arkei sto setup,
  configure va balei kapoios character-set= ISO-8859-7 kai dev 8elei
  tipota allo (o pico 8a dexetai 8bit input).


  4.13.  elm


  http://www.cs.columbia.edu/ akonstan/en/greek/elm-greek.txt

  elm: Set the following environment variables

            LANG=C
            LC_CTYPE=iso_8859_7


  Some versions of elm require that you put the following definitions in
  your  /.elm/elmrc/ file:

            charset = iso-8859-7
            displaycharset = iso-8859-7
            textencoding = 8bit



  Kai to palio-kalo elm yposthrizei ellhnika, me ton katallhlo editor.
  Epishs yparxei mia nekranasthmenh ekdosh poy yposthrizei kai alla
  kaloydia, to elm-me: ftp://ftp.ozone.fmi.fi/KEH

  { -Me elm 2.4PL5, DEN DOULEYE- OXI PANTA TOYLAXISTON (???) }


  4.14.  metamail

  To configure the metamail package for ISO 8859-7 input/output, set the
  MM_CHARSET environment variable with "setenv MM_CHARSET ISO-8859-7".
  Also, set the MM_AUXCHARSETS variable with "setenv MM_AUXCHARSETS
  iso-8859-7" (???)


  4.15.  telnet

  To telnet 8a prepei va douleuei xwris problnma.  Eav oxi, balte autn
  tnv grammn sto arxeio  /.telnetrc:

            set binary true



  4.16.  rlogin

  Eav exete problnmata me to rlogin, dokimaste: "rlogin -8" n "rlogin
  -L".


  4.17.  xterm

  Tre3te to e3ns: (n opoiadnpote ellnvikn grammatoseira)

  xterm -f sc-elot16


  n akoma kalutera pngaivoume sto arxeio  /.Xresources, kai pros8etoume
  kapou (px sto telos) tnv grammn autn me to font pou 8eloume, px
  xterm*font:     -misc-fixed-medium-r-semicon
  densed--0-0-75-75-c-0-iso8859-7


  4.18.  rxvt

  To rxvt gia va mporesei va grayei kai va dei3ei swsta ta ellnvika
  xreiazetai duo pragmata

  1. Ellnvikes Grammatoseires sta X11, bl. ``''

  2. Kapoies parametrous stn grammn evtolwv, gia va gurisei se 8-bit
     mode kai va mnv agvoei to bit pou 3exwrizei ta ellnvika apo ta
     agglika.  Oi magikes parametroi pou kavouv to rxvt sas ellnvikotato
     eivai:


       % rxvt -8 -meta 8thbit -font GREEKFONT ...



  kai mporeite safws va tis xrnsimopoinsete mazi me o,ti parametrous
  xrnsimopoieite kavovika sto rxvt sas.



  =====================================================================
  To rxvt (xterm clone that uses less memory and runs slightly faster)
  exei standard support gia full ellhniko keyboard (928 kai 437) poy exw balei
  edw kai poly kairo.  Download the latest source kai compile me
  #define GREEK_SUPPORT
  sto feature.h

  To rxvt yposthrizei ellhnika se efarmoges poy doyleyoyn mesa sto
  rxvt terminal. Yposthrizei full set ellhnikwn (including:
  tono-dialytika, anw teleia, ellhnika omoiwmatika).
  Epitrepei kaneis na kanei type taytoxrona se 928 kai 437 se 2 katallhla
  diaforetika rxvt windows.
  Read file README.greek gia leptomereies.

  H swsth lysh gia X11 bebaia einai ena complete XKB package poy tha
  yposthrizei to plhres set ellhnikwn. Mexri tote to rxvt einai akoma
  xrhsimo (epishs gia 737 taytoxrona me 928 keyboard).

  ++ Isws ena linux .rpm (properly built) tha htan xrhsimo.
  =====================================================================



  4.19.  minicom

  To minicom eivai eva programma epikoivwviwv gia modem, pou 8umizei
  evtova Telix.  H ellnvikn ekdosn upostnrizei 737, xrnsimo gia va
  mpaivei kaveis se BBS pou douleuouv katw apo DOS (sxedov oles oi
  ellnvikes eivai tetoies):
  ftp://argeas.hellug.gr/pub/unix/linux/GREEK/minicom-1.75-elf.tar.gz
  Perissoteres plnrofories: <roryt@hellug.gr>


  {
  Fantazomai minicom mesa se rxvt me 737 font kai encoding tha doylepsei
  kanonika xwris tropopoihsh tou idioy toy programmatos (arkei na einai
  8-bit clean).
  }



  4.20.  samba

  To Samba stis teleutaies ekdoseis (>=1.9.17 ?) dev xreiazetai tipota
  gia va blepoume ellnvika ovomata arxeiwv. Stnv 1.9.18p, dokimastnke
  auto me epituxia, tre3te to
  /usr/doc/packages/samba/examples/validchars gia va deite oti
  upostnrizovtai eav exete amfibolies.

  Eav prepei pros8esete ta ellnvika, 8a pate sto [global] tou
  /etc/smb.conf, va pros8esete tnv grammn "valid chars     = 0xa0 0xa1
  0xa2 ... klp"


  4.21.  ispell

  O Giavvns Kabaklns <kavaklis@hellug.gr> exei tropopoinsei to ispell,
  gia va upostnrizei 928 ellnvika.  Episns exei eva le3iko sto paketo
  auto. To FTP site eivai:
  ftp://argeas.hellug.gr/pub/unix/linux/GREEK/ispellH.tar.gz Evallaktika
  tou ispell uparxei to aspell.



  =====================================================================
  ftp://ftp.cs.ucla.edu/pub/ispell/languages/ (???)

       ispell - Spell checking in Danish:
          First make sure you install version 3.1 instead of version 4.0
          of ispell.  The latter is obsolete and multiply brain-damaged.
          You can download the sources for ispell at the GNU archive at
          prep.ai.mit.edu, and you can get a Danish dictionary via FTP
          from ftp.iesd.auc.dk in /pub/packages/dkispell/. Follow the
          compilation instructions and you should have no trouble (One
          caveat: When defining the variables necessary for compilation
          you should slightly confusingly tell ispell that Linux is a Sys
          V type OS by defining the variable USG.)
          When you have installed the Danish dictionary for ispell you
          can check the spelling of a Danish language file by executing
          the command:

          ispell -d danish -T latin1 -w "??????" <your_danish_text_file>

          (Note for non-Danish readers: You can find dictionaries for most
          Western languages by reading the file Where included with the
          sources for ispell.)
  =====================================================================



  4.22.  Midnight Commander

  H emfavisn ellnvikwv ovomatwv kai periexomevwv arxeiwv sto mc
  evergopoieitai apo to mevou Options -> Display bits -> Full 8 bits
  output. Gia va grayei kaveis ellnvika stov epe3ergastn keimevou kai ta
  pedia dialogou tou mc, prepei va evergopoinsei sto idio mevou tnv
  epilogn Full 8 bits input. [ N.Christou@S.andB.gr ]


  4.23.  Staroffice

  Gia office suite proteivoume to StarOffice 5.1.

  Gia tov e3ellnvismo tou diabaste to eidiko keimevo StarOffice-and-
  Greek.


  4.24.  Netscape

  Ta Netscape 3.x & 4.x exouv eggevn (merikn) upostnri3n ellnvikwv.
  Prwta apo ola, prepei va exoume kavei swsto Configuration twv X
  windows wste va "blepouv" ellnvikes grammatoseires. Av auto exei givei
  tote prepei va kavoume ta e3ns 3 bnmata gia va apeikovizovtai ta
  ellnvika PANTOU sto netscape.

    Na dnlwsoume swsto encoding/fonts

    Na peira3oume ta resources tou Netscape

    Na "ftia3oume" aliases gia ellnvikes grammatoseires iso8859-1 (vai,
     iso8859-1) kai Windows-1253 wste va blepoume ta ellnvika stis
     formes (to netscape mperdeuetai kai apekovizei tis formes movo me
     iso8859-1 grammatoseires). Oi grammatoseires windows-1253
     xreiazovtai giati merikoi avegkefaloi web masters bazouv eskemmeva
     n apo agvoia sta .html tous: charset=windows-1253

  Arxizoume :


    Exovtas avoixto to netscape, apo to mevou view->encoding dialegoume
     to "Greek (ISO-8859-7)" kai pali apo to idio mevou to "Set Default
     Encoding".  Meta apo to Edit->Preferences, Appearence->Fonts
     epilegoume sto pedio "For the encoding" to "Greek (ISO-8859-7)" kai
     sta 2 lists pio katw ta agapnmeva mas ellnvika fonts (ta helvetica
     kalutera!). Kavoume click sto OK.

    Sto directory tou netscape uparxei eva arxeio Netscape.ad. Eivai ta
     Resources. Av upo8esoume oti to netscape exei egkatasta8ei swsta px
     sto /usr/local/netscape, tote ekteloume sav "root" ta parakatw pou
     leitourgouv swsta toulaxistov sto netscape 4.03. (Proupo8esn va
     exoume ta fonts -greek-helvetica).


     cd /usr/X11/lib/X11/app-defaults
     \rm -f Netscape
     grep -v 'fontList:' /usr/local/netscape/Netscape.ad >/tmp/Netscape
     echo "*fontList: \
          -greek-helvetica-medium-r-normal-*-*-120-*-*-*-*-iso8859-7" \
          >>/tmp/Netscape
     grep -v '^*defaultCharset:' /tmp/Netscape >Netscape
     echo '*defaultCharset:       iso-8859-7' >>Netscape
     chmod 644 Netscape
     \rm -f /tmp/Netscape



    Sav root, sto directory pou exoume ta agapnmeva mas ellnvika fonts
     dnmiourgoume ta aliases ws e3ns:

     cd /usr/X11/lib/X11/fonts/greek
     mkfontdir
     awk '{printf "%s %s\n", $2, $2}' fonts.dir |sed -e \
      's/iso8859-7/iso8859-1/' >>fonts.alias
     awk '{printf "%s %s\n", $2, $2}' fonts.dir |sed -e \
      's/iso8859-7/windows-1253/' >>fonts.alias



    3ekivoume ta X kai dialegoume sto
     edit->preferences->Appearance->fonts ellnvika fonts gia to charset
     'windows-1253' kai 'iso8859-1'. (vai ellnvika fonts gia to western
     charset iso8859-1!!!!).

  Plnrofories 8a breite episns sto: http://www.ntua.gr/help.html


  4.24.1.  Netscape widgets

  lazaros sotiriadis:

  A epishs gia na vlepete ellinika se ola ta widgets prepei na dosete ti sosti gramatoseira sto
  Netscape.ad i se arxeio pou tha kanete xrdb -merge i sto .Xdefaults tis exhs 4 seires :

  *fontList: -*-couriergr-medium-r-*-*-*-120-*-*-*-*-iso8859-*
  *XmTextField.fontList: -*-couriergr-medium-r-*-*-*-120-*-*-*-*-iso8859-*
  *XmText.fontList: -*-couriergr-medium-r-*-*-*-120-*-*-*-*-iso8859-*
  *XmList*fontList: -*-couriergr-medium-r-*-*-*-120-*-*-*-*-iso8859-*

  Etsi tha blepete ellinika se Ola ta widgets se oles tis selides asxetos
  an exoun sto source tous charset=windows-1253 kai akoma tha vlepete
  ellinika sta bookmarks kai tha grafete fisika se ola ta widgets (p.x http://...)



  4.24.2.  Netscape fonts


  Shmeiwteon  to greekXfonts-full-1.1.tgz prosferei 3 dynatothtes
  gia ellhnika se Netcsape:
   * grinet (Type1),
   * grtex/grtt,
   * helveticagr/couriergr.
  Ta Type1 einai to kalytero option (logw oti einai scalable) alla
  dystyxws se XFree86 de fainontai toso kala logw kakoy Type1 rasteriser twn XFree.
  Se alla unix/X exw anafores oti fainontai poly kalytera.

  Polla sites exoyn dymanic font information gia ta keimena opote to Netscape
  aytomatws tha dialseksei to katallhlo font. Ayth h praktikh synistatai
  se webmasters ellhnikwn keimenwn.



  5.  National Language Support

  To National Language Support (suvtomografia NLS) eivai mia duvatotnta
  pou exouv ta pio polla UNIX, wste va evnmerwvovtai oi efarmoges gia
  tis glwssikes ru8miseis tou xrnstn kai va parousiazouv ta muvnmata
  tous stnv avtistoixn glwssa.

  To NLS xrnsimopoieitai apo polla GNU tools, eidika auta pou trexouv se
  periballov grammns evtolwv (Command Line Interface - CLI, dnladn to
  gvwsto prompt), kai upostnrizetai prosfata kai sto grafiko periballov
  (px KDE).  H evnmerwsn twv efarmogwv givetai mesa apo metablntes
  periballovtos, me evtoles tou tupou LANG="el_GR".  Apo Noembrn 1998 ta
  ellnvika 8a ru8mizovtai ws el_GR (me basn ta avtistoixa ISO protupa),
  kai elpizoume oti n allagn autn 8a perasei suvtoma stis diavomes.

  Ergasia gurw apo to NLS exei kavei kai o Simos 3evitellns, deite to
  Greek-nls-HOWTO kai auto to ar8ro sto periodiko magaz:
  http://magaz.hellug.gr/09/04_nls.html.

  PROSOXH: To parov kefalaio eixe graftei apo tov Taso Kapio, se mia
  epoxn pou to NLS dev upnrxe pavta stnmevo sto linux, kai to protupo
  ntav arketa asta8es (px, mporei va breite va leei gia gr_GR, avti
  el_GR).


  5.1.  Proetoimasia

  PRWTA blepe poses kai poies eivai oi biblio8nkes tns C pou uparxouv
  sto sustnma sou. p.x.

   ttyp3:~#ldconfig -v | grep libc.so
   libc.so.4 => libc.so.4.7.2
   libc.so.6 => libc-2.0.4.so
   libc.so.5 => libc.so.5.4.33


  Uparxouv 5 katngories libc kai dev eivai sumbates meta3u tous, osov
  afora ta locale pavta.  (Autn tnv stigmn oi pio polloi exouv tis ekdo
  seis 4 kai 5)

  1. libc 4 ??? (a.out)

  2. libc 5.0.9-5.3.12

  3. libc 5.4.x


  4. glibc 1.x ??? (sav libc 5 gia merikes arxitektovikes Linux)

  5. glibc 2.x.x (libc 6)


  5.2.  Egkatastasn Ellnvikwv Locale

  Xreiazeste tis topikes ru8miseis (localedata), tov compiler localedef
  kai to diagvwstiko ergaleio locale.

    Uparxouv treis ekdoseis twv topikwv ru8misewv (Diaferouv elaxista)

     1. H pio palia apoteleitai apo ta

                 ftp://dkuug.dk/i18n/WG15-collection/locales/gr_GR              (2679 bytes)
                 ftp://dkuug.dk/i18n/WG15-collection/charmaps/ISO_8859-7:1987   (19768 bytes)
                 ftp://dkuug.dk/i18n/WG15-collection/locales/en_DK              (101080 bytes)



     2. H alln, pio prosfatn ftp://ftp.debian.org/debian/ ...
        /sources/admin/wg15-locale_2.orig.tar.gz (n se diafora CDROM me
        to debian) kai periexei ta

                  locales/gr_GR
                  locales/en_DK
                  charmaps/ISO_8859-7,1987



     (Prepei va douleuei movo gia libc 5.4.x)

     3. H pio kaivourgia ekdosn brisketai eite sto paketo pngaiou kwdika
        tns glibc 2.0.5 eite sav 3exwristo paketo sav glibc-
        localedata-2.0.5 Uparxei sto debian (ftp.debian.org),sto redhat
        (ftp.redhat.com) kai se mirrors tns gnu kai periexei ta
        gr_GR,en_DK,ISO-8859-7


    Ta localedef kai locale uparxouv sta paketa me tov pngaio kwdika
     twv libc 5 kai glibc 2. Episns kukloforouv se binary morfn apo to
     debian kai redhat kai sav tar.gz apo tnv gnu kai n ekdosn tous
     prepei va eivai idia me tnv libc pou exete (locale-5.x.y gia tnv
     libc 5.x.y kai to glibc-localedata-2.x.y gia tnv glibc-2.x.y)

  Prwta pngaivete stov upokatalogo opou briskete gr_GR kai trexete tnv
  evtoln

     >sed -e 's/am_pm "";""/am_pm   "<P*><M*>";"<M*><M*>"/' gr_GR > el_GR


  (Gia duvatotnta ellnvikou PM kai MM kai n allagn  ovomatos gia sumbat
  otnta me ta  X) Kai gia elegxo

            > tail -n 5 el_GR | grep am_pm
            am_pm  "<P*><M*>";"<M*><M*>"
            t_fmt_ampm ""
            END LC_TIME


  Twra sav root dnmiourgnste tous e3ns upokatalogous



     # mkdir -m 755 -p /usr/share/locale/el_GR/LC_MESSAGES
     # mkdir -m 755 -p /usr/share/i18n/charmaps
     # mkdir -m 755 -p /usr/share/i18n/locales
     # ln -sf /usr/share/i18n/charmaps /usr/share/i18n/charmap


  Egkatastnste sta swsta mern ta el_GR, en_DK, ISO-8859-7 (n
  ISO_8859-7:1987 n ISO_8859-7,1987)

  # cd (ekei pou eivai ta localedata)
  # cp e?_??  /usr/share/i18n/locales
  # cd ../charmaps
  # cp ISO[-_]8859-7* /usr/share/i18n/charmaps
  # cd /usr/share/i18n/charmaps
  # ln -s ISO_8859-7,1987 ISO-8859-7


  Metaglwttiste, av dev ta exete ndn se binary morfn, ta locale kai
  localedef.  Auto givetai peripou etsi:

   > cd ~/src
   > gzip -dc libc-x.y.z.tar.gz | tar xvf -
   > cd libc-x.y.z
   > ./configure
   > make clean; make depend
   > cd locale
   > make programs
   > su -f root -c 'install -m 755 locale localedef /usr/bin'


  Kai twra eiste etoimoi gia tnv metaglwttisn twv topikwv ru8misewv. Sav
  root:

  # cd /usr/share


  Se periptwsn pou exete mia libc

  # localedef -ci locale/el_GR -f i18n/charmap/ISO-8859-7 el_GR


  Se periptwsn pou exete duo p.x. libc-5.4.33 kai libc-2.0.4

  # localedef-2.04   -ci el_GR -f ISO-8859-7 el_GR
  # localedef-5.4.33 -ci el_GR -f ISO-8859-7 el
  # chmod -cR a+r locale


  Twra prepei va uparxouv auta katw apo to /usr/share/locale/el_GR (kai
  to el)

  # ls locale/el_GR
  LC_COLLATE    LC_CTYPE      LC_MESSAGES/  LC_MONETARY   LC_NUMERIC     LC_TIME



  Mia dokimn. Gia kelufos tupou csh p.x. tcsh:

  > setenv LANG el_GR


  Gia kelufos tupou sh p.x. bash, ksh:

  > LANG=el_GR ; export LANG


  Dokimaste:

  > locale
  LANG=el_GR
  LC_CTYPE="el_GR"
  LC_NUMERIC="el_GR"
  LC_TIME="el_GR"
  LC_COLLATE="el_GR"
  LC_MONETARY="el_GR"
  LC_MESSAGES="el_GR"
  LC_ALL=
  > locale -c LC_TIME | head
  LC_TIME
  Kur;Deu;Tri;Tet;Pem;Par;Sab
  Kuriakn;Deutera;Tritn;Tetartn;Pemptn;Paraskeun;Sabbato
  Iav;Feb;Mar;Apr;Mai;Iouv;Ioul;Aug;Sep;Okt;Noe;Dek
  Iavouarios;Febrouarios;Martios;Aprilios;Maios;Iouvios;Ioulios;Augoustos;Septembrios;Oktwbrios;Noembrios;Dekembrios
  PM;MM
  %a %d %b %Y %T %Z
  %d/%m/%Y
  %T


  (H diamorfwsn allazei apo libc se libc)

  Twra mporeite va dokimaste merikes efarmoges (arkei va exouv givei
  compile me mia sumbatn libc)

  > unsetenv LESSCHARSET n unset LESSCHARSET
  > less kapoio-keimevo-me-ellnvika
  > cal
     Augoustos 1997
  Ku De Tr Te Pe Pa Sa
                  1  2
   3  4  5  6  7  8  9
  10 11 12 13 14 15 16
  17 18 19 20 21 22 23
  24 25 26 27 28 29 30
  31


  Kai sto Netscape 4 (me libc 5.4.x x > 4 ) avoi3te to Mail & Discus
  sions kai 8a deite sto Date tous mnves stnv mesn px 31/08/1997 kai tis
  nmeres sta ellnvika.  Telos :-)


  5.2.1.  Egkatastasn Ellnvikwv mnvumatwv diaforwv efarmogwv


  Edw uparxouv duo ave3artnta paketa to gencat kai to gettext

  a)To gencat erxetai mazi me tov pngaio kwdika tns ka8e libc (katw apo
  to nls/) n se binary p.x. gencat-x.y.z kai eivai e3artnmevo apo autnv
  opws kai to localedef.  Metaglwttizei arxeia tupou International
  language text (.m) se katalogous.

  b)To gettext, eivai ave3artnto apo tnv libc, kai uparxei suvn8ws se
  mirrors tns gnu p.x.ftp.kernel.org/pub/mirrors/gnu/gettext-0.10.tar.gz
  kai sta debian,redhat.  (Gia va breite mia prosfatn ekdosn pate sto
  http://las.ml.org ya3te gia gettext) To xrnsimopoiouv sxedov ola ta
  paketa tns GNU {file,sh,text,net}-utils kai polla alla paketa p.x.
  (WindowMaker).  Gia plnrofories deite to
  ftp.kernel.org/pub/mirrors/gnu/ABOUT-NLS, steilte mnvuma stnv ellnvikn
  omada sto el@li.org n gia va bon8nste mpeite stnv lista el-
  request@li.org me tnv le3n "subscribe" sto swma tou mnvumatos.

  Autn tnv stigmn, apo o,ti gvwrizw, plnrws ellnvika mnvumata exei movo
  to tcsh 6.07.02 (me patches tou debian) kai xrnsimopoiei, dustuxws, to
  gencat.


  5.3.  Egkatastasn tou tcsh


  Katebaste to tcsh >= 6.07.02.  Breite to gencat (pngaios kwdikas
  libc,se binary apo redhat,debian) Protou metaglwttiste to tcsh.  n

    Epe3ergasteite to config_f.h kai alla3te to #undef NLS_CATALOGS se
     #define NLS_CATALOGS Alla3te apo ola ta ellnvika arxeia nls/greek/*
     ta \",\',\v se ",',\n avtistoixa.  Alla3te sto nls/Makefile to
     GENCAT=gencat se  GENCAT=gencat -new -lang ANSIC n

    Katebaste to patch gia tnv ekdosn 6.07.02 apo to debian
     (ftp.debian.org/debian/hamm/hamm/source/shells/ )

  Metaglwttiste, egkatastnste, dokimaste to tcsh

   >make
   >make catalogs
   >su -f root -c 'make install'
   >su -f root -c 'install -m 644 tcsh.greek.cat /usr/share/locale/el_GR/tcsh'
   >/bin/tcsh
   >setenv LANG el_GR
   >unsetenv NOREBIND (gia va afnvei grafete sta ellnvika)
   >fkjg
   fkjg: H evtoln de bre8nke.


  Av dev sas bgalei ellnviko mnvuma tote

    Eleg3te to /usr/share/locale/el_GR/tcsh kai to /bin/tcsh

       >ls -l /usr/share/locale/el_GR/tcsh
       -rw-r--r--   1 root     root        47443 Iouv 12 21:27 /usr/share/locale/el_GR/tcsh
       >file /usr/share/locale/el_GR/tcsh
       /usr/share/locale/el_GR/tcsh: data
       >ls -l /bin/tcsh
       -rwxr-xr-x   1 root     root       270476 Sab Aug 10:23 /bin/tcsh
       >date
       Sab Aug   9 10:38 EET DST 1997



    Bebaiw8eite oti to gencat erxetai apo mia sumbatn libc

      > gencat -V
      localedef (GNU libc) 2.0.4
      Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      Written by Ulrich Drepper.
      > ldd /bin/tcsh
             libnsl.so.1 => /lib/libnsl.so.1 (0x40003000)
             libncurses.so.4 => /usr/lib/libncurses.so.4 (0x4000a000)
             libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004a000)
             libc.so.6 => /lib/libc.so.6 (0x40078000)
             /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)



  Av to mnvuma eivai kapws etsi

   fkjg: ^H ^e^v^t^o^l^n ^d^e ^b^r^e^8^n^k^e.



  1. Eleg3te ta permissions stnv /usr/share/locale/el_GR

      > ls -l /usr/share/locale/el_GR
      total 96
      drwxr-xr-x   3 root     root         1024 Iouv 25 20:40 ./
      drwxr-xr-x  68 root     root         2048 Aug   6 10:41 ../
      -rw-r--r--   1 root     root        29156 Iouv 25 20:36 LC_COLLATE
      -rw-r--r--   1 root     root        10428 Iouv 25 20:36 LC_CTYPE
      drwxr-xr-x   2 root     root         1024 Iouv 25 20:34 LC_MESSAGES/
      -rw-r--r--   1 root     root           95 Iouv 25 20:36 LC_MONETARY
      -rw-r--r--   1 root     root           27 Iouv 25 20:36 LC_NUMERIC
      -rw-r--r--   1 root     root          536 Iouv 25 20:36 LC_TIME
      -rw-r--r--   1 root     root        47443 Iouv 12 21:27 tcsh



  2. 3avakavete compile tis topikes ru8miseis me to localedef

  3. Eleg3te tnv ekdosn tou localedef kai tns libc wste va eivai idies

      > localedef -V
      localedef (GNU libc) 2.0.4
      Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      Written by Ulrich Drepper.
      > ldd /bin/tcsh
             libnsl.so.1 => /lib/libnsl.so.1 (0x40003000)
             libncurses.so.4 => /usr/lib/libncurses.so.4 (0x4000a000)
             libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004a000)
             libc.so.6 => /lib/libc.so.6 (0x40078000)
             /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)



  4. Katebaste mia pio prosfatn ekdosn twv topikwv ru8misewv

  5. Avaba8miste tnv libc


  5.4.  Ru8miseis diaforwv efarmogwv

  Oi pio polles efarmoges to movo pou xreiazovtai eivai to LANG se
  el_GR.

    X gevika:

     a)Pros8este sto /usr/X11R6/lib/X11/locale/locale.alias to
     el_GR.ISO-8859-7        el_GR.ISO8859-7

     b) Gia ellnvikous titlous kai ovomata eikovidiwv *titleEncoding:
     ISO8859-7 *iconNameEncoding: ISO8859-7

    LESS: MHN DHLWNETE TO LESSCHARSET.  Me swsta locale, tnv swstn
     libc, kai to LANG se el_GR deixvei ta ellnvika kavovika.

     Efarmoges me mnvumata gettext
     (/usr/share/locale/el_GR/LC_MESSAGES/*.mo): To LANGUAGE se el_GR.


    TCL/TK: Gia va sas afnvei va grafete ellnvika alla3te sto
     /usr/X11R6/lib/X11/locale/compose.dir apo iso8859-1/Compose      C
     se #iso8859-1/Compose      C

    XTERM: Parte tnv ekdosn tou xterm apo tnv Xfree86 3.3 (diaferei apo
     tnv ekdosn twv X11R6.3) kai metaglwttiste me -DI18N.

    SH-UTILS,FILE-UTILS,TEXT-UTILS: Merika programmata tous 8elouv
     glibc 2 gia dei3ouv ellnvikes nmeromnvies.

    SYSLOGD:???????

    Dikes sas efarmoges: Gia va mporeite va bazete mexri kai ellnvikes
     parametrous.

                #include <locale.h>
                .....
                setlocale(LC_ALL,"");
                .....
                >dokimn --ola


  Alles efarmoges kaveis;


  5.5.  Problnmata

  Polla ;-).

  5.5.1.  Problnmata me tnv C Library (libc)

  H METAGLWTTISMENH MORFH APO TA LOCALEDEF KAI GENCAT SUNH8WS ALLAZEI
  APO LIBC SE LIBC KAI ENA PROGRAMMA METAGLWTTISMENO ME TOUS HEADERS
  MIAS LIBC MPOREI NA MHN MPOREI NA DIABASEI THS TOPIKES RU8MISEIS
  FTIAGMENES APO ALLH BIBLIO8HKH.


  5.5.2.  Problnmata me ta X


  Locale not supported from X library.(n kati paromoio) Eleg3te ta
  dikaiwmata stous upokatalogous

        # chmod -cR a+r /usr/share/locale /usr/X11R6/lib/locale


  Eleg3te ta Xresources kai ya3te gia tipota upopto

        >xrdb -query


  Blepe problnmata me tnv biblio8nkn tns C.


  5.5.3.  Problnmata pou dnmiourgouvtai otav ola eivai swsta ;-)

  O daimovas syslogd apo8nkeuei ta dedomeva sta 7-bit kai polles
  efarmoges 8a tou stelvouv tis nmeromnvies sta ellnvika p.x.to PAM me
  apotelesma merikes fores va mnv mporeis deis tov mnva.

  Merika programmata 8a perimevouv gia apavtnsn se erwtnsn "yes/no" avti
  gia "y" n "n"ta "v" kai "o" avtistoixa.

  Stnv kovsola kalo eivai va exete mia grammatoseira
  iso-8859-7(ELOT-928).  Eidika me ellnviko tcsh.



  5.6.  Epipleov plnrofories


    Linux Locales Mini HOWTO:
     ftp://metalab.unc.edu/pub/Linux/doc/HOWTO/mini/locales

    NLS repository: http://www.iro.umontreal.ca/contrib/po/

    NLS utilities for Linux: ftp://metalab.unc.edu/pub/Linux/utils/nls

    Public domain locale and charmap sources: ftp://dkuug.dk/i18n

     Uparxouv ta man pages: locale.5 locale.7 setlocale.2



  6.  Tex/LaTex


  To TeX/LateX eivai eva sustnma stoixeio8esias (typesetting), pou
  briskotav se eureia xrnsn stnv dekaetia 75-85.  Eivai kai snmera
  xrnsimo gia tnv suggrafn epistnmovikou keimevou, ka8ws upostnrizei
  polu kala tis ma8nmatikes parastaseis (peta3te to word gia pavta), ta
  (polutovika) ellnvika kai luvei polla idioru8ma tupografika
  problnmata.

  Ta sxetika me to TeX/LateX, uparxouv pleov se eva 3exwristo HOWTO:
  GreekTeXFAQ.  Deite gia ta sxetika kai to kefalaio ``''.

  To TeX eivai eva programma pou eftia3e arxika o ka8ngntns Donald E.
  Knuth tou Stanford University, gia to grayimo keimevwv me polla
  ma8nmatika.  Arxika to TeX dev upostnrize ellnvika, para movo ta liga
  ellnvika sumbola pou xrnsimopoiouv oi ma8nmatikoi polles fores gia va
  dnlwsouv metablntes se e3iswseis opws:



       $ y = \alpha\,x^2 $



  opou to TeX avtika8ista to \alpha me to ellnviko "a".

  Auto omws dev eivai kai toso boliko, giati to TeX xeirizetai kapws
  diaforetika ta ellnvika se math-mode (to eidiko mode tou TeX sto opoio
  grafetai ka8e e3iswsn) kai diaforetika se horizontal-mode pou grafetai
  to aplo keimevo.  Kai safws kaveis dev 8a n8ele va prepei va grafei
  tragika pragmata opws:



       {$\Epsilon$}$\lambda${$\lambda$}$\'\alpha${$\delta$}$\alpha$.



  movo kai movo gia va grayei "Ellada".

  Mia prwtn lusn nr8e me to project BABEL tou TeX-Users-Group, n opoia
  perigrafetai parakatw.



  6.1.  To project BABEL

  To project BABEL mporei va bre8ei se ola ta Comprehensive-TeX-Archive-
  Network (CTAN) mirrors.  Eivai sto directory .../tex-archive/babel/
  kai n ellnvikn upostnri3n tou BABEL uparxei sto
   .../tex-archive/babel/greek/* .


  To project BABEL exei ftiax8ei kuriws apo 3evous, omws, pou dev
  grafouv se "pragmatika ellnvika", alla se greeklish.  Etsi, gia
  paradeigma n le3n "Ellada" grafetai sav:



       \GR{}Ella'da\EN{}



  Pou eivai safws mia beltiwsn apo to apaisio $...$ kolpo.

  Me ta katallnla filtra to BABEL mporei va ftiax8ei etsi wste va
  upostnrizei pragmatika ellnvika, kai telika va grafei kaveis:



       Ellada



  kai to filtro va to metatrepei sto prongoumevo paradeigma, wste to
  BABEL va douleyei swsta!


  6.2.  Prospa8eies e3ellnvismou tou Tex/LaTex

  Sto ITU (Ivstitouto Texvologias Upologistwv), uparxei eva project me
  to ovoma GRTeX.  Blepe "Diplwmatikn ergasia GRTeX, Stefavos
  Maggavarns, Iouvios 1989, Patra, Tmnma Mnx. H/U kai Plnr."

  Episns, o G. Spnliwtns exei kavei diplwmatikn ergasia sto Pav/mio
  A8nvas gia Ellnvika sto TeX/LaTeX.


  6.3.  Suvdesmoi gia Tex/LaTex


    http://magaz.hellug.gr/04/05_babel.html 1o ar8ro sto magaz gia
     ellnviko TeX/LateX

    http://magaz.hellug.gr/08/07_GreekTeXFAQ.html 2o ar8ro sto magaz
     gia TeX      (Odngies egkatastasns - FAQ)

    ftp://ftp.tex.ac.uk:/pub/tex/fonts/greek/ Autos eivai o katalogos
     gia ellnvika sto CTAN

    ftp://obelix.ee.duth.gr/pub/TeX Kaln sullogn gia TeX kai ellnvika

    http://obelix.ee.duth.gr/eft/ Sullogos Ellnvwv filwv tou TeX

    http://obelix.ee.duth.gr/eft/Greekinf/ Diafora ergaleia gia LateX

    http://ctan.unsw.edu.au/tex-archive/help/greek/greek.faq faq gia
     ellnviko LateX, alla palio (4/94)

  Oi e3upnretes tou CTAN (Comprehensive TeX Archive Netowrk) eivai:

    ftp.tex.ac.uk (128.232.1.87)

    ftp.dante.de (129.206.100.192)

    ftp.cdrom.com/pub/tex/ctan

    ftp.ee.up.ac.za


  7.  Hlektrovikn tekmnriwsn kai biblia



  7.1.  Linux Documentation Project

  To Linux Documentation Project (LDP) eivai mia prospa8eia va graftei
  oln n tekmnriwsn tou Linux nlektrovika, kai va orgavw8ei eviaia. Ola
  ta HOWTO, FAQ, manual pages, Guides avnkouv sto LDP, kai briskovtai
  stov kombo tou metalab (http://metalab.unc.edu/LDP/).  Na snmeiw8ei
  oti kai auto to keimevo eivai tmnma tou LDP kai brisketai:
  http://metalab.unc.edu/LDP/HOWTO.

  Epimevete ellnvika omws kai protimate tous ka8reptismous (!) tou LDP:

    http://linux.forthnet.gr/LDP/, Contact: Sotiris
     Tsimbonis,tsimbonis@forthnet.gr, Updated: DAILY, Location:
     Katerini, Greece

    http://www.ichannel.gr/linux/LDP/, Contact: Dimitris Demiris,
     ddemiris@ichannel.gr, Updated: DAILY, Location: Volos, Greece

  Olo to metalab ( prwnv sunsite) uparxei kai stnv Ellada sto:
  http://sunsite.ics.forth.gr/

  To tmnma gia linux eivai: ftp://sunsite.ics.forth.gr/sunsite/linux



  7.2.  Periodika

  To ellnviko on-line periodiko magaz eivai prwtns dialogns:
  http://magaz.hellug.gr.

  To Linux Gazette eivai eva kalo on-line periodiko stnv agglikn glwssa
  kai brisketai stnv dieu8uvsn: http://www.ssc.com/lg/.  Mirror tou
  uparxei kai edw: http://www.eexi.gr/mirrors/lg/lg_frontpage.html.

  To movo evtupo periodiko pou kukloforei stnv Ellada gia to Linux,
  eivai to (amerikaviko) Linux Journal, pou mporei va to promn8eutei
  kaveis apo ta texvika bibliopwleia kai katastnmata H/U, kuriws.


  7.3.  Biblia eidika gia Linux

  Mark G. Sobell, A Practical Guide to Linux, Addison-Wesley Pub Co,
  ISBN: 0201895498 (*) Suvistatai avepifulakta, deite apo to amazon.com
  to e3wfullo tou: http://www.amazon.com/exec/obidos/ASIN/0201895498/.


  M. Welsh, L. Kaufman, Running Linux, O'Reilly & Associates, ISBN:
  1565921518 (*)

  O. Kirch, Linux Network Administrator's Guide, O'Reilly & Associates,
  Inc.  (*)
  LDP, The Linux Bible 3rd Edition, Yggdrasil Computing, Inc.


  7.4.  Unix gia Arxarious

  B.Kernighan, R.Pike, The UNIX programming Environment, 1984, ISBN
  0-13-937681-X E3ngnsn tou Unix gia arxarious. Pukvogrammevo alla
  katavonto. Klassiko biblio pavepistnmiakwv sxolwv. (*) (**GR)

  H. Hahn, A Student's Guide to Unix, McGraw Hill, 1993, ISBN:
  0-07-025511-3 Eva polu kalo eisagwgiko biblio gia to Unix. Se apln
  glwssa o suggrafeas e3ngei stov arxario oti 8elei va 3erei gia to Unix
  kai to Internet.  DEN APAITEITAI PROEMPEIRIA (*)

  M. Waite, D. Martin e S. Prata, The Waite Group's Unix System V
  Primer, Sams, 1992, ISBN: 0-672-30194-6 Eva e3aireto egxeridio gia
  Unix/SVR4. (**GR)

  D. Libes, S. Ressler, Life with Unix - A Guide for Everyone, Prentice
  Hall, 1990, ISBN: 0-13-536657-7 Otidnpote 8a 8elate va ma8ete gia to
  Unix. Periexei duseuretes plnrofories.


  7.5.  Unix gia Proxwrnmevous


  M. J. Bach, The design of the Unix operating system, Prentice-Hall
  International, 461 pp, ISBN: 0-13-201757-1 Sumfwva kai me tov titlo
  tou, perigrafei tnv sxediasn tou Unix se ba8os.

  P. Abrahams, B. Larson, Unix for the Impatient, Addison Wesley, 1995,
  ISBN: 0-201-55703-7 Keimevo avaforas sto Unix, suvoptiko alla kai
  plnres. Eivai katallnlo gia va briskei kaveis grngora kai me akribeia,
  apavtnseis se problnmata. (*)

  W.R. Stevens, Advanced Programming in the UNIX Environment, Addison
  Wesley, 1996, ISBN: 0-201-56317-7 To katallnlo biblio gia opoiov 8elei
  va programmatisei sto Unix. (*)

  W.R. Stevens, UNIX Network Programming, Addison Wesley, 1996, ISBN:
  0-13-90012-X Eav skefteste va asxoln8eite me programmatismo se diktuo
  (px Internet, TCP/IP) nr8e n wra va agorasete auto to biblio. (*)


  7.6.  Diaxeirisn Sustnmatos


  E. Nemeth, G. Snyder, S. Seebass, Unix System Administration Handbook,
  Prentice-Hall, 1995, ISBN: 0-13-933441-6 Klassiko biblio, biblos tou
  diaxeiristn (*)

  D. r, B. Hunter, B. Smith, Unix System V Release 4 Administration,
  Hayden, 1991, ISBN: 0-672-22810-6 Sxoliazetai ws to aparaitnto biblio
  gia tnv orgavwsn evos praktikou, apodotikou kai paragwgikou Unix.

  AEleen Frisch, Essential System Administration 2nd Edition, O'Reilly &
  Associates, 1996, ISBN 15659212755 Eva e3airetiko biblio gia
  Diaxeirisn Sustnmatos me polles plnrofories eidika gia to Linux.  (*)


  7.7.  Asfaleia Sustnmatos sto Unix


  S. Garfinkel, G. Spafford, Practical Unix Security and Internet,
  O'Reilly, 1996, ISBN: 0-937175-72-2 Ola ta aparaitnta metra gia va
  kavete to sustnma sas oso to duvatov asfalestero. (*)
  7.8.  Unix kai Internet


  AA.VV., Building a Unix Internet Server, New Riders, ISBN:
  1-56205-494-5 Periexei CD me ola ta xrnsima ergaleia, gia tnv
  egkatastasn evos Internet Server.

  Que, Running perfect internet site with linux, U. Hoepli ed., 1995,
  ISBN 0789705141


  7.9.  Ellnvika biblia gia to UNIX

  Osa biblia apo ta parapavw eivai me (*), uparxouv stnv Ellada, av kai
  ametafrasta.  Osa biblia apo ta parapavw eivai me (**GR), uparxouv
  stnv Ellada metafrasmeva.  Kalutera bebaia rwtnste sta bibliopwleia
  gia sigouria (bl. ``'')


  8.  To Linux stnv Ellada

  Oi evergoi Ellnves xrnstes prepei va eivai pleov pavw apo xilioi (Okt.
  98) kai exouv sxnmatisei eva diktuo meta3u tous, pou perilambavei
  kombous FTP, news hosts me omades suzntnsewv, IRC channels kai
  proswpikes selides sto Internet.  Ta pio snmavtika snmeia pou prepei
  kaveis va episkeftei eivai tov kevtriko ellnviko kombo www.linux.gr
  kai tis selides tou vomika avagvwrismevou sullogou Hellug, stnv
  dieu8uvsn www.hellug.gr.  To -peripou mnviaio- periodiko magaz eivai
  evdeiktiko twv epituxnmevwv ellnvikwv prospa8eiwv: magaz.hellug.gr.


  8.1.  Listes kai omades suzntnsewv (Newsgroups)

  H taktikn epikoivwvia Ellnvwv gia to Linux givetai apo tnv
  linux.greek.users, arxika ftiagmevn me prwtoboulia tou Giavvn Iwavvou,
  stov Argea (tote argeas.argos.hol.gr, vuv argeas.hellug.gr) kai twra
  trexei sto mnxavnma tou sullogou, Epeidn tnv lista tnv diabazouv
  polloi, pou pi8avov dev exouv ellnvika, eivai kaln taktikn va
  xrnsimopoiouvtai greeklish:

  ayta edv, as poume, einai greeklish.


  Uparxei kai list-news gateway tns linux.greek.users stnv dieu8uvsn:
  news://edessa.topo.auth.gr/local.linux.greek.users To gateway xrn
  simeuei gia va summetexei kaveis kai va blepei ta 8emata xwris va
  xreiazetai va graftei. Ri3te mia matia, kai epavel8ete otav exete
  apories.  Uparxei kai META FAQ stnv dieu8uvsn http://linux.forth
  net.gr/~stsimb/linux/meta-faq.html.

  Ektos apo tnv linux-greek-users, uparxei kai n linux-howto
  (apokleistika gia osous suvtnrouv keimeva tou linux sta ellnvika n
  avalambavouv va ektelesouv kapoies ergasies) kai n hellug (sxetika me
  tov pavellnvio sullogo).

  H selida me tnv lista twv listwv mas eivai sto
  http://lists.hellug.gr/,


  8.2.  IRC

  IRC channel, xrnsimo gia ameses erwtnseis kai suzntnseis, eivai to
  #linux-gr.  H selida tou eivai http://www.co.umist.ac.uk/~vp/irc/
  Aln8eia eivai oti to kavali eivai suxva xwris polukosmia, se tetoia
  periptwsn protimnste tnv linux-greek-users.

  8.3.  Fidonet

  Sto Fidonet, uparxei n sxetikn omada suzntnsns "gr.unix", pou suvn8ws
  exei kai postings sxetika me to Linux. Tnv omada autn, mporei va tnv
  parakolou8nsei kaveis, apo tis BBS ellnvikou Fidonet (bl.
  http://www.fidonet.gr) Prosoxn 8elei to oti merikes fores suvavtame
  737 ellnvika n/kai flames.

  Kai edw uparxei fido-news gateway: news://news.fidonet.gr/fido.gr.unix
  kai news://edessa.topo.auth.gr/fido.gr.unix


  8.4.  Omades Ellnvwv Xrnstwv tou Linux

  O sullogos  HELLUG eivai de facto o pavellnvios sullogos twv xrnstwv
  tou Linux.  3ekivnse stnv A8nva apo tov Kwsta Blassn me autes tis
  selides stnv compulink: http://www.compulink.gr/linux/.

  Mn episnma avagvwrismeves omades uparxouv stnv 8essalovikn (TheLUG)
  kai tnv Patra (PLUG).  Oi omades eivai avoixtes se vea meln kai
  evdiaferomevous gia to Linux.

  Eav evdiafereste gia tnv dnmiourgia evos LUG stnv perioxn sas,
  diabaste prwta auto: http://www.ntlug.org/archive/lug-
  howto/index.html.


  8.4.1.  HELLUG

  O sullogos Ellnvwv Xrnstwv kai Filwv Linux HELLUG eivai evas mn
  kerdoskopikos, vomika avagvwrismevos sullogos apo tov Noembrio tou
  1998.  Osoi asxolouvtai me to Linux stnv Ellada, eivai kalo va eivai
  toulaxistov evnmerwmevoi gia tnv upar3n tou.  O sullogos ev8arruvei
  opoiadnpote prospa8eia prow8nsns tou Linux, kai eivai pro8umos gia
  suvergasia me etaireies n idiwtes gia tnv prow8nsn tou Linux stnv
  Ellada kai tnv evnmerwsn gurw apo auto.

  Gia perissoteres plnrofories deite: http://www.hellug.gr


  8.4.2.  PLUG

  Stnv Patra, sto tmnma Mnxavikwv H/U kai Plnroforikns, edreuei to PLUG
  (Patras Linux Users Group).
  http://students.ceid.upatras.gr/~glavas/linux/


  8.4.3.  TheLUG

  Stnv 8essalovikn, uparxei to TheLUG, pou edreuei se ...taberva.  Deite
  sto http://hal.csd.auth.gr/thelug/


  8.5.  Egw pws mporw va bon8nsw

  Kat' arxn yaxvovtas kai diabazovtas prwta kai meta rwtwvtas, giati
  kaveis dev exei kairo gia xasimo.  Afou breite mia lusn pou dev eivai
  gvwstn, parakaloume evnmerwste kai tous upoloipous.

  Oi pleov snmavtikes ergasies eivai:

    Lexis, Le3iko orologias plnroforikns (Aggloellnviko, gia
     omoiogeveia metafrasewv)

    Ellnvika HOWTOs, FAQs kai avtistoixn tekmnriwsn

    E3ellnvismos tou periballovtos kai twv muvnmatwv tou KDE, GNOME

    Upostnri3n ellnvikwv mesw NLS

    E3ellnvismos diavomwv, swstn upostnri3n ellnvikwv. To Suse
     brisketai ndn se kalo dromo.

     Deite sto http://server.hellug.gr/LUGistics/el/pub/PRJ_main.php3
     gia avalutikoteres plnrofories.  Eav pisteuete oti eiste se 8esn va
     suveisferete se kapoio apo ta parapavw, parakaloume kavte to.

  Eivai polu snmavtiko eav breite tnv lusn se kapoio problnma kai dev
  avaferetai stov kwdika n stnv tekmnriwsn (px se auto to keimevo), va
  avatre3ete stov avtistoixo suggrafea kai va tov evnmerwsete, n va
  grayete eva diko sas ar8ro gia to magaz n akoma kai HOWTO to opoio 8a
  prepei va mas steilete sto Hellug, gia va mpei mazi me ta alla
  ellnvika keimeva.

  Eav prokeitai gia allagn se kapoio programma (px 8bit patch),
  apeu8uv8eite stov sxetiko programmatistn, n etoimaste mia compiled
  ekdosn gia tov ftp server tou Hellug.  Prospa8eiste va kavete osov to
  duvatov pio oloklnrwmevn douleia kai akolou8eiste ta protupa kai
  me8odous pou akolou8ouv oloi oi alloi.


  8.6.  Internet Sites


  8.6.1.  WWW


    http://www.linux.gr

    http://www.hellug.gr

    http://magaz.hellug.gr


  8.6.2.  FTP

  Episnmo pleov FTP site gia oti afora Ellnves kai Ellnvika sto Linux
  ftp://argeas.hellug.gr/pub/unix/linux/GREEK/

  Gia diavomes tou Linux deite:

    FTP.LINUX.GR - /pub/

    NTUA - /pub/linux

    Forthnet - /pub/linux

    Compulink /pub/linux


  8.6.3.  Komboi tns Allodapns :-)


    http://metalab.unc.edu/LDP/ Edw stegazetai to Linux Documentation
     Project, to kevtriko snmeio tekmnriwsns tou Linux

    http://www.linux.org/ Auto eivai to linux.org. 8ewrntika 8a eprepe
     apo edw va pngaivei kaveis grngora opoudnpote, alla auto dev
     sumbaivei pavta stnv pra3n. Eivai bebaia eva polu snmavtiko site.

    http://www.linux.eu.org/ To paveurwpaiko diktuo kombwv.

    http://www.li.org/ Edw brisketai to Linux International, meln tou
     eivai (megales) etaireies plnroforikns

    http://www.linuxnow.com/ O kombos autos eivai kaivourios kai arketa
     orgavwmevos. Periexei SOFTWARE, HOWTOs, FAQs, klp.

    http://www.ssc.com/lj/ H selida tou Linux Journal, mnviaiou
     amerikavikou periodikou gia to Linux

    http://www.ssc.com/lg/ H selida tou Linux Gazette, mnviaiou
     nlektrovikou periodikou gia to Linux

    http://www.linuxmall.com/ Autos o kombos eivai eva emporiko kevtro
     afierwmevo sto Linux.

    Yahoo.com->computers->operating_systems->Linux H selida tou
     8ematikou euretnriou tou Yahoo gia to Linux. Exei arketa pragmata.


  8.7.  Diavomes kai CD

  To Linux epeidn eivai ftiagmevo apo pollous kai xwris kevtrikn
  orgavwsn, dia8etei polles "diavomes" (distributions), ka8e mia me ta
  dika tns xaraktnristika kai oxi aparaitnta kalutern se ola apo tis
  upoloipes:

    Slackware Palaiotera ntav n pio suvn8ismevn. H teleutaia ekdosn
     (5/99) eivai n 3.6, deite http://www.slackware.org

    Redhat Exei grafiko periballov egkatastasns kai eivai pio polu gia
     arxarious.  Episns n egkatastasn ekkiveitai eukola apo DOS,
     grafovtas apla REDHAT.  Megaln eukolia eivai to RPM pou epitrepei
     eukoln (ap)egkatastasn efarmogwv. Blepe http://www.redhat.com

    Debian Legetai kai GNU/Linux kai idiaitero xaraktnristiko eivai oti
     eivai upo tnv epibleyn tns GNU. Deite: http://www.debian.org

    Hellenic Ellnvikn diavomn, apo tnv Synaptic Ltd "Software
     Development & Trade".  H diavomn autn exei e3avtln8ei kai eivai
     sxetika palia.

    OpenLinux Apo tnv Caldera, arketa sovarn diavomn me megaln apnxnsn
     stnv Amerikn.  Deite
     http://www.calderasystems.com/products/openlinux

    Yggdrasil To prwto plug-n-play Linux. Deite:
     http://www.yggdrasil.com

    Suse H pio megaln se pwlnseis stnv Eurwpn. Uparxei se germavikn,
     agglikn, italikn, gallikn distribution. Deite: http://www.suse.de/e
     Apo tnv ekdosn 6.0 kai meta exei upostnri3n ellnvikwv evswmatwmevn,
     akoma kai egkatastasn sta ellnvika.

  Apo tis diavomes autes prokuptouv kai ta avtistoixa CD:

    Walnut Creek (http://www.cdrom.com) Exei to Slackware.

    Redhat (http://www.redhat.com) Exei tnv omwvumn diavomn. Teleutaia
     ekdosn n 6.0

    SuSe (http://www.suse.com) Exei tnv omwvumn diavomn. Teleutaia
     agglikn ekdosn n 6.3 (Noembriou 1999)

    Infomagic http://www.infomagic.com Exei ta parapavw, tnv Debian KAI
     tous katalogous tou metalab.unc.edu kai tsx-11.mit.edu.  Legetai
     "Linux Developer's Resource" eivai ligo apo ola kai exei 6 CD.
  8.8.  Bibliopwleia kai diavomeis twv CD

  To Linux se CD to briskei kaveis sta e3ns katastnmata:

  A8HNA:

    STEP, Aktn Moutsopoulou 36, TK18536, Peiraias, 4181239, Exei to
     Suse Linux (http://www.step.gr)

    Papaswtnriou A.E., Stourvarn 3, TK10682, A8HNA, 3809821, 3848254
     (http://www.papasotiriou.gr)

    Papaswtnriou A.E., Kolokwtrwvn 10, Emp. Kevtro Kerasies Knfisias,
     6231854

    Ekdoseis Kleidari8mos, Stourvarn 37, TK10682, A8HNA, 3829629,
     3841021, 3300104 (http://www.klidarithmos.gr)

    Vertigo EPE, Mpotasn 6, TK10682, A8HNA, 3824536, 3806801 (+FAX)

  8ESSALONIKH:

    Informatics Services Application, Dwdekavnsou 61, TK55131,
     Kalamaria, 031-424512, (http://www.suse.gr)

    Malliarns Paideia, Aristotelous 9 (http://www.malliaris.gr)

    Papaswtnriou A.E., E8v. Amuvns 40, 243660

  PATRA:

    Papaswtnriou A.E., Maizwvos 58, TK 26221, 061-624918, 061-624917

     H parapavw lista evdexomevws dev eivai plnrns.  Eav gvwrizete
     kapoia stoixeia pou mou eivai agvwsta n avakribn, parakalw
     evnmerwste me.


  9.  FAQ


  9.1.  Pws 3ekivnse to Linux;

  To Linux eivai ousiastika movo o purnvas tou Leitourgikou sustnmatos,
  kai 3ekivnse to 1990 apo evav fivlavdo foitntn tov Linus Torvalds, sav
  omadikn peiramatikn idea stov tote kaivourio 386.  Ta upoloipa ta
  gvwrizete...


  9.2.  Ti logous exw gia va egkatastnsw to Linux;

  Eav 8elete eva a3iopisto leitourgiko sustnma, me kaln apodosn, xwris
  kollnmata kai pln8wra efarmogwv kai dev fobaste eva kaivourio
  periballov ergasias, tote to Linux eivai gia esas.  Mporeite px me
  ?.000drx va to agorasete se 6 CD, mazi me tis polles efarmoges tou, n
  va dwsete kati parapavw gia va parete mia eukoln sto stnsimo diavomn
  mazi me egxeiridio xrnsns.

  To Linux eivai eva ka8ara 32bit Leitourgiko Sustnma, me
  poluepe3ergastikes (multitasking) duvatotntes.  Stnv pra3n auto
  snmaivei, oti mporeite va trexete polles efarmoges tautoxrova, xwris
  kivduvo va "kremasei" o upologistns.  To Linux exei:

    kalutern a3iopoinsn tou sustnmatos apo to DOS, Win 3.x


    kalutero multitasking apo ta Windows 95,

    kalutern apodosn apo ta Windows NT,

    polles efarmoges se sugkrisn me to OS/2.

     To Linux ws gvnsio Unix, exei eggevws ulopoinmevo to TCP/IP, to
     prwtokollo tou Internet.  Eivai katallnlo gia diktuakes efarmoges,
     kai mporei va douleyei me a3iopistia ws dromologntns n proxy. Exei
     POSIX compliance kai upostnrizei TCP/IP & SPX/IPX, SNMP & RIP, NCP,
     SMB.  Ws server eivai polu duvato se oles autes tis periptwseis:
     file server, printer server, web server, ftp server, news server,
     mail (pop) server. Mporei va avtikatastnsei eva sustnma me Windows
     NT n Novell Netware DIAFANA gia tous clients.  To Linux eivai
     suvufasmevo me to GNU project tns Free Software Foundation (FSF).
     To GNU ekfrazei mia filosofia suvergasias, opou kapoios pou grafei
     eva programma to dia8etei se olous aveu amoibns.  Apotelesma autou
     eivai n eleu8ern avtigrafn tou, kai oti eivai dwreav.  Stnv
     periptwsn twv CD, plnrwvei kaveis movo to kostos tous.


  9.3.  Pws mporw va ma8w ta basika gia to Linux;

  Polu ektevns avalusn, ka8ws kai kala epilegmevo didaktiko uliko, sta
  agglika, uparxei edw:
  http://basiclinux.hypermart.net/basic/index.html#lessons.


  9.4.  Sumbatotnta;

  Kat' arxnv to Linux diabazei ola ta fileystems twv allwv leitourgikwv
  (FAT, VFAT, FAT32, NTFS, HPFS, HFS, ISO9660, Rock-Ridge, Joliet, UFS
  klp).

    To DOSEMU 8a sas epitreyei va tre3ete efarmoges tou DOS pou trexouv
     se eikovikes mnxaves upo tov elegxo tou purnva (vm86).  Douleuei
     polu a3iopista kai diati8etai dwreav opws to Linux.

    To WABI 8a sas epitreyei va tre3ete 16bit efarmoges twv WIN3.11,
     alla stoixizei 199$

    To WINE kavei tnv idia douleia dwreav, alla oxi toso kala.
     Teleutaia (1999) deixvei sobara snmadia wrimavsns.

    To Executor mporei va tre3ei efarmoges gia Macintosh.

     Oi pio polloi evdiaferovtai gia va mporouv va diabazouv arxeia doc
     pou proerxovtai apo Office kai uparxei gia autous to StarOffice
     5.1, pou diabazei mexri kai Word 97 keimeva.  Eav apo8nkeuate ta
     dedomeva sas xrnsimopoiwvtas avoixta protupa (txt, dbf, html, rtf),
     8a breite toulaxistov eva ergaleio gia va douleyete me auta, eav
     oxi...


  9.5.  Ti SOFTWARE upostnrizetai;

  Praktika ta pavta, arkei va milame gia avoikta kai diadedomeva protupa
  kai prwtokolla: sxedov pote dev eiste o prwtos pou exei eva
  sugkekrimevo problnma kai kapoios allos to exei lusei gia esas.

  To metalab eivai to kat' e3oxnv snmeio gia va brei kaveis programmata
  gurw apo to avtikeimevo pou tov evdiaferei, deite
  http://metalab.unc.edu/pub/Linux/

  To Linux Software Map (LSM) exei olo to uparxov logismiko.  Mporeite
  va kavete kai avazntnsn me le3eis kleidia.
  http://www.boutell.com/lsm/

  Episns polu dnmofileis eivai kai oi selides tou Bill Latura:
  http://www.xnet.com/~blatura/linapps.shtml


  9.6.  Ti eivai to compile tou purnva;

  Sto Linux tov purnva mporei kaveis va tov ftia3ei o idios, me mia
  diadikasia pou legetai compile.  Av kai eivai duvatov va douleyei
  kapoios me evav etoimo, eivai kaln idea va ftia3ei evav purnva
  prosarmosmevo sto sustnma tou, idiaitera eav 8elei e3eidikeumeves
  duvatotntes.  H diadikasia suvistatai idiaitera se autous pou 8elouv
  va mple3ouv me ta evdotera tou leitourgikou sustnmatos.

  Oi evtoles pou xreiazovtai gia eva tupiko compile eivai (ta # eivai
  sxolia):

  cd /usr/src/linux
  make config      # n make menuconfig n make xconfig, exei kai help.
  make dep
  make clean
  make zImage  # meta apo auto, uparxei o purnvas sto /usr/src/linux/arch/i386/boot/zImage
  make modules # Ta modules ftiaxvovtai priv arxisei n diadikasia egkatastasns
  make modules_install # Egkatastasn twv modules sto /lib
  make install # prosoxn va uparxouv oi swstes ru8miseis sto /etc/lilo.conf


  H teleutaia evtoln eivai autn pou 8a stnsei tov purnva (suvn8ws sto
  /vmlinuz), suvdeovtas tov me tov boot loader LILO.  Eva reboot, 8a
  balei tov veo purnva se xrnsn...  (molis brnkate tov movadiko logo pou
  kavei kaveis reboot me linux).


  9.7.  Ti eivai auto to SIG11;

  To SIG11 eivai ousiastika eva sfalma prostasias (Protection Fault).
  Eivai arketa pi8avo va sumbei tnv wra pou ftiaxvoume purnva kai n
  aitia eivai oti to sustnma ekeivn tnv wra zorizetai - DIABASTE: Polla
  SIG11 snmaivouv kako uliko n problnmata sumbatotntas me tnv mvnmn,tov
  epe3ergastn, tnv mntrikn.  Gia perissoteres plnrofories, deite:
  http://www.bitwizard.nl/sig11/


  9.8.  Uparxouv alla eleu8era Unix;

  Sto xwro tou Unix exoume ta e3ns eleu8erns xrnsns leitourgika:

    Linux

    GNU Hurd

    FreeBSD

    NetBSD

    OpenBSD

     Apo ola auta movo to FreeBSD exei praktikn a3ia, eivai idiaitera
     gvwsto gia tnv sta8erotnta tou kai tnv apodosn tou se sustnmata
     e3upnretwv me evtovn xrnsn (px ftp.cdrom.com). Eivai par' ola auta
     pio dusxrnsto apo to Linux, kai dev exei tetoia pln8wra logismikou.
     Teleutaia, trexei ta pio polla programmata tou Linux me e3omoiwsn.
     Eav 8elete va peiramatisteite me tupou BSD UNIX, a3izei va
     asxoln8eite mazi tou.

  9.9.  Basikn orologia


     i18n
        I{-- 18 letters --}n = Internationalization

     e13n
        Europeanization

     l10n
        Localization

     ANSI
        American National Standards Institute, the US member of ISO

     ASCII
        American Standard Code of Information Interchange

     CP Code Page

     CP850
        Code Page 850, the most widely used MS DOS code page

     CR Carriage Return

     CTAN server
        Comprehensive TeX Archive Network, the world's largest
        repository for TeX related material. It consists of three sites
        mirrowing each other: ftp.shsu.edu, ftp.tex.ac.uk, ftp.dante.de.
        The current configuration, including known mirrows, can be
        obtained by fingering ctan_us@ftp.shsu.edu

     DEC
        Digital Equipment Corp.

     DIN
        Deutsche Industrie Norm (German Industry Norm)

     DOS
        Disk Operating System

     EBCDIC
        Extended Binary Coded Decimal Interchange Code ---a proprietary
        IBM character set used on mainframes

     ECMA
        European Computer Manufacturer's Association

     emacs
        Editing Macros, a family of popular text editors

     Esperanto
        A synthetic, universal language developed by Dr. Zamenhof in
        1887.

     FSF
        Free Software Foundation

     FTP
        File Transmission Protocol

     GNU
        GNU's not Unix, an FSF project

     GPL
        General Public License
     IBM
        International Business Machines Corp.

     IP Internet Protocol

     ISO
        International Standards Organization

     KOI8
        ???---a popular encoding for Cyrillic on UNIX workstations

     LaTeX
        A macro package for TeX

     MCS
        DEC's Multilingual Character Set---the ISO 8859--1 draft
        standard

     MIME
        Multi-Purpose Internet Mail Extension

     OS Operating System

     POSIX
        Portable Operating System Interface (an IEEE UNIX standard)

     PS PostScript, Adobe's printer language

     RFC
        Request for Comment, an Internet standard

     sed
        stream editor, a UNIX file manipulation utility

     TCP
        Transmission Control Protocol

     TeX
        Donald Knuth's typesetting program

     URL
        a WWW Uniform Resource Locator

     US-ASCII
        the US national variant of ISO 646, see ASCII

     VMS
        Virtual Memory System---DEC's proprietary OS

     WWW
        World Wide Web

     X11
        X Window System



  10.  Pivakes xaraktnrwv, character sets

  O H/U gia va parastnsei ta glwssika sumbola xrnsimopoiei 1byte=8bit,
  dnladn exoume 2^8=256 diaforetika grammata.  O kwdikas ASCII (American
  Standard Code for Information Interchange) orizei austnra movo ta
  prwta 128 sumbola (7bit).  Ta alla misa sumbola xrnsimopoiouvtai gia
  apeikovisn eidikwv sumbolwv allwv glwsswv alla kai grafikwv sumbolwv.
  Avti8eta, me alles eurwpaikes glwsses ta ellnvika eivai e3' oloklnrou
  sta 8bit.  O profavns logos eivai ta polla diaforetika sumbola pou
  exei n ellnvikn glwssa se sxesn me tis upoloipes.

  Pros8etes plnrofories gia ta ellnvika sto Diadiktuo, mporeite va
  breite sto RFC 1947, "Greek Character Encoding for Electronic Mail
  Messages".  Deite sxetika
  http://andrew2.andrew.cmu.edu/rfc/rfc1947.html


  10.1.  Tupopoinseis twv ellnvikwv

  Ta ellnvika uparxouv se polles diaforetikes tupopoinseis.  Oi pio
  suvn8ismeves apo autes, eivai ta 737 kai ta 928.  Amfotera eivai gia
  movotovika ellnvika.  Ta mev 737 xrnsimopoiouvtai apo to DOS, ta de
  928 apo ola ta UNIX kai Windows (me mikres parallages).  To Linux exei
  sav kuria kwdikoselida ta 928.  To oti exoume gia Ellnvika duo kai
  pleov protupa, fusika, eivai megalo problnma, pou 3epervietai me
  eidikous metatropeis, gia allagn apo to eva set sto allo.

  Apo tnv tekmnriwsn tns Oracle gia to Linux kai ta egxeiridia tou
  server, mporei kaveis va brei ta diadedomeva ellnvika protupa pou
  xrnsimopoiouvtai se baseis dedomevwv (ara kai sta pio snmavtika
  sustnmata H/U) kai tous tupopoinmevous (ma pali;) kwdikous tous:

    EL8ISO8859P7, Dnl. to ISO8859-7 gia to UNIX & Internet. Eivai
     gvwsto kai ws 928 & Latin7.

    EL8MSWIN1253, Ta Windows ellnvika

    EL8PC737, Ta DOS ellnvika

    EL8MACGREEK, O Macintosh xrnsimopoiei ELOT-823 (IBM 851).

    EL8MACGREEKS

    EL8PC437S

    EEC8EUROPA3

    EL8EBCDIC875, IBM mainframes greek character set

    EL8DEC, Auta eivai logika ta DEC, VAX/VMS ellnvika. (kaveis
     palios???)

     Episns, to OS/2 xrnsimopoiei tnv kwdikoselida 869 kai 851 gia ta
     ellnvika.


  10.2.  737

  Ta 737 eivai episns gvwsta kai ws 437G (=437Greek), giati proekuyav
  apo tropopoinsn twv amerikavikwv 437.  Ta 737 prwtoemfavistnkav stis
  ellnvikes EPROM twv MDA kai Hercules kartwv grafikwv twv prwtwv PC,
  opou briskovtav dnladn sto HARDWARE.  Xrnsimopoin8nkav kata korov sto
  DOS, kai gia auto ola ta arxeia pou proerxovtai apo ekei avamevetai va
  eivai 737.  Epeidn ta 737 8ewrouvtai pleov kataloipo tou DOS, eivai
  kalutera va metatreyete ta arxeia pou eivai 737 se 928, bl. ``''.  Sto
  Linux, n kwdikoselida 737 upostnrizetai plnrws movo stnv kovsola
  (text-mode), alla uparxouv kai merikes grammatoseires gia X-Windows.


  10.2.1.  Tropopoinsn purnva gia upostnri3n 737

  Exouv avafer8ei periptwseis, opou to "d" (DELTA mikro) dev
  plnktrologeitai se kapoious purnves kai auto sumbaivei giati sumpiptei
  me to 128+ESC (128+27=155=asc("d")).  Pngaivete sto
  /usr/src/linux/drivers/char/console.c, kapou leei:
                && (c != 127 || disp_ctrl)
                && (c != 128+27);
  alla3te se
                && (c != 127 || disp_ctrl)
                /*      && (c != 128+27)*/;


  kai kavete compile eva veo purnva.


  10.2.2.  737 se X-windows

  Ta 737 upostnrizovtai se merikes apo tis fixed grammatoseires pou
  eivai sto paketo Grafis: ``''.

  [ah@computer.org]'s report for names (from xlsfonts):
  -misc-grfixed-medium-r-normal--0-0-75-75-c-0-grpc-737
  -misc-grfixed-medium-r-normal--0-0-85-85-m-0-grpc-737
  -misc-grfixed-medium-r-normal--14-110-75-75-c-75-grpc-737
  -misc-grfixed-medium-r-normal--16-120-75-75-c-75-grpc-737
  -misc-grfixed-medium-r-normal--23-179-85-85-m-120-grpc-737
  -misc-grfixed-medium-r-semicondensed--0-0-75-75-c-0-grpc-737
  -misc-grfixed-medium-r-semicondensed--10-100-75-75-c-60-grpc-737
  -misc-grfixed-medium-r-semicondensed--13-120-75-75-c-60-grpc-737
  -misc-grvga-medium-r-normal--0-0-75-75-c-0-grpc-737
  -misc-grvga-medium-r-normal--13-120-75-75-c-60-grpc-737
    (nomizw kapoia exoyn bugs kai exw skopo na ta diorthwsw se next release).



  10.3.  928

  Ta ellnvika 928 eivai n pio sugxrovn kai diadedomevn tupopoinsn kai
  ka8ierw8nke arxika apo tov ELOT.  Argotera egivav apodekta kai apo tov
  ISO ws ISO-Latin-8859-7, n apla Latin7, akoma kai n UNICODE upostnri3n
  ellnvikwv basizetai se auta.  Ta 928 xrnsimopoiouvtai se oles tis
  efarmoges twv UNIX, sto Internet kai apotelouv to snmerivo protupo kai
  gia to Linux.  To protupo 928 upostnrizetai, kai stnv kovsola (text-
  mode), kai se grafiko periballov (X-Windows).


  10.3.1.  Windows-1253

  H kuria apoklisn twv Windows ellnvikwv (Windows-1253) apo tnv
  tupopoinsn ELOT 928, eivai o xaraktnras "A", (A tovoumevo) tou 928 o
  opoios sta Windows avtistoixei sto Paragraph mark. Apo ta Windows-1253
  leipouv episns n avw teleia, kai ta ellnvika omoiwmatika << kai >>.
  Epeidn moiraia 8a prepei va apodextoume tov periorismo auto pou mas
  8etouv ta MS-Windows, kai epeidn arketoi xrnstes xrnsimopoiouv wintel
  platforma ergasias, kalo 8a eivai va apofeugetai to < A tovoumevo >
  kata tnv apostoln e-mails, postings, klp.  Evallaktika mporeite va
  xrnsimopoieite to 'A  ( ' = SHIFT+" ) Paromoia problnmata uparxouv kai
  me ta 'E kai 'O.  Gia eukolia sas, auta eivai ola ta tovoumeva kata
  928: AEHIOYO.


  10.4.  Unicode

  Ta UNICODE (ISO 10646) eivai 16bit (dnl. 65536 suvdiasmoi) kai
  perilambavouv polles glwsses, mazi me ta vea ellnvika, pou exouv
  offset #370 kai ta arxaia ellnvika me offset #1F00.  Upostnrizovtai
  apo ta vea mexri ta arxaia (polutovika) ellnvika kai Grammikn B!  To
  Linux upostnrizei eswterika ta UNICODE, alla akoma n xrnsn tous dev
  eivai diadedomevn, giati e3artatai kai apo tnv uio8etnsn tous apo tis
  efarmoges.  Gia perissotera deite: http://linuxdoc.org/HOWTO/Unicode-
  HOWTO.html



  ====================================================================
  Vasilis Vasaitis <vas@hal.csd.auth.gr>:
   Av kai dev exw asxoln8ei ektevws me to avtikeimevo, mporw va suveisferw
  kapoia gvwsn pou exw epi tou 8ematos. Loipov, exoume kai leme:

    Kapoia stigmn, se avupopto xrovo, eixa katebasei eva Unicode fixed font
  gia ta X windows. Epeidn duskola sbnvw auta pou katebazw, to brnka va
  ka8etai akoma sto disko mou. H grammatoseira autn dev periexei to plnres
  Unicode, afou auto apoteleitai apo perissoterous apo 38000 xaraktnres, apo
  tous opoious oi perissoteroi eivai Kivezika/Iapwvika/Koreatika, pou etsi ki
  alliws sto 6x13 tou fixed dev mpaivouv. Omws me peripou 2800 xaraktnres (n
  ekdosn pou exw egw toulaxistov) kaluptei plnrws tnv lativikn, ellnvikn,
  kurillikn, armevikn, gewrgiavn kai ebraikn grafn, suv kapoia texvika kai
  ma8nmatika sumbola. H grammatoseira autn mporei va xrnsimopoin8ei ws protupo
  apo opoiovdnpote evdiaferetai va sxediasei grammatoseires me pollous
  xaraktnres sxetika me pio praktikes efarmoges, deite parakatw. H selida tou
  tupou pou tnv eftia3e, av eivai akoma n idia, eivai:

    http://www.cl.cam.ac.uk/~mgk25/

          Upostnri3n stnv kovsola:

    H kovsola upostnrizei Unicode edw kai kati aiwves, mesw bebaia tou UTF8
  (gia osous dev 3erouv, to UTF8 eivai mia avaparastasn tou UniCode me
  metablnto mege8os, to opoio gia gia tous 128 prwtous xaraktnres exei tnv
  idia morfn me to ASCII). To 8ema eivai oti etsi ki alliws n upostnri3n tns
  VGA gia xaraktnres pou emfavizovtai sugxrovws eivai polu periorismevn (256,
  512 xwris to avabosbnma).

          Upostnri3n sta X:

    H grammatoseira pou avaferw parapavw douleuei mia xara, kai n teleutaia
  fora pou tn dokimasa ntav priv polu kairo. Episns, tuxaivei va exw evav X
  server me evswmatwmevn upostnri3n TrueType fonts (dev fortwvw font server),
  kai blepw oti kai ta TrueType douleuouv mia xara. Gia osous dev 3erouv, ta
  XFree86 4.0 8a erxovtai me evswmatwmevn upostnri3n TrueType. H Microsoft
  (dev exw apo alln etaireia) xrnsimopoiei stis grammatoseires tns to Windows
  Glyph List 4 (WGL4), to opoio eivai uposuvolo tou ISO 10646-1 (ligo polu
  auto pou exei n grammatoseira pou periegraya arxika).

          Efarmoges:

    Edw katarreouv ola. Autn tn stigmn uparxouv kava duo programmata pou
  kavouv metatropn apo/pros UTF8, to yudit kai to Netscape pou mazeuouv apo
  edw ki apo ekei gia va brouv arketa sumbola tou Unicode, kai apo ekei kai
  pera to xaos. Pavtws kalov 8a eivai va arxisei prospa8eia gia ta fonts, kai
  favtazomai oti oi efarmoges 8a koita3ouv va akolou8nsouv.

  ---------------

  Report apo Panagioti Vrioni:

  Gnwrizw oti o Giannis Gyftomitros <yang@hellug.gr> exei hdh arxisei
  na asxoleitai me thn dunatothta dhmiourgias Unicode grammatoseirwn
  pou na periexoun kai ta ellhhnika (Project Grafis, bl. GRArial k.l.),
  isws na exei proxwrhsei kai parapera...

  Apo thn ekdosh 6.0, o XFS pou periexetai sto Red Hat exei patch wste
  na mporei na emfanisei Trye Type Fonts. Bl. sxetiko "White Paper" stho
  "support" ths http://www.redhat.com/ . An balete Unicode TTFonts
  (px. ths M$) auta paizoun, me thn ennoia oti fainontai dia8esima
  ta fonts me xilia-duo diaforetika encodings. Den kserw omws an paizoun
  kai san unicode grammatoseira, px. gia na dei kapoios ena keimeno
  me ellhnika, agglika kai kinezika tautoxrona sto Netscape.

  =====================================================================
  10.4.1.  Unicode Links

  Uparxei mia fixed grammatoseira gia Xwindows,  deite sxetika:
  http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html

  Uparxei kai evas text editor gia Unicode, me to ovoma Yudit,
  ftp://metalab.unc.edu/pub/Linux/apps/editors/X/yudit-1.1.tar.gz

  To protupo UTF-8 eivai pleov standard sto Internet, deite to sxetiko
  RFC: http://andrew2.andrew.cmu.edu/rfc/rfc2279.html

  Perissotera gia ta vea ellnvika sta Unicode edw:
  http://charts.unicode.org/Unicode.charts/normal/U0370.html


  10.5.  Metatropeis ellnvikwv


  10.5.1.  gr2gr

  O Aggelos Xaritsns <ah@computer.org> exei grayei tov metatropea autov:
  ftp://ftp.hri.org/pub/greek/programs/gr2gr.prl Trexei me perl (5 n 4).
  Suvepws douleuei se opoio leitourgiko sustnma exei egkatasta8ei perl
  (unix, dos, win32, os2, mac, vms ...).

  Upostnrizei polla diaforetika ellnvika, opws:

    928:            ELOT 928

    437:            IBM 437 (*default* input)

    lat:            latin greek form, aka greeklish (*default* output)

    437b:           IBM 437b

    win:            Windows

    mac:            Macintosh

    851:            851

    869:            869

    quad:           quadtek

    sym:            standard Symbol font codes (English garbled)

    wgr:            WinGreek (Windows shareware prg) encoding

    troff:    troff symbol font escape sequences, no diacritics
     (dialytika)

    kdtex:          Dryllerakis TeX (only conversions _to_ kdtex work)

    ibytex:         ibygrk TeX (only conversions _to_ ibygrk work)


  10.5.2.  grfilter

  Sto Ivstitouto Texvologias Upologistwv uparxei to grfilter:
  ftp://ftp.cti.gr/pub/src/grfilter.tar



  10.5.3.  greek2lat

  Sto directory ftp://corfu.forthnet.gr/pub/greek2lat uparxei evas
  metatropeas apo 928 se greeklish, katallnlos kai gia WEB sites.


  10.5.4.  trans120.tar.gz

  O Kwstas Kwstns, < kosta@kostis.net > exei grayei episns autov tov
  metatropea, pou upostnrizei kai polla ellnvika, alla kai alles
  glwsses: http://www.kostis.net/freeware/trans120.tar.gz


  10.5.5.  gkconv

  Uparxei kai eva programma tou Giwrgou Spnliwtn, metatrepei 437, Win95,
  X win.  H dieu8uvsn tou agvoeitai.


  10.5.6.  recode

  Auto eivai eva programmataki gevikns xrnsns apo to GNU project, to
  opoio upostnrizei metatropeis gia polles diaforetikes glwsses (kai
  ellnvika).  Isws 8a eprepe ola ta upoloipa programmata kapoia stigmn
  va evswmatw8ouv se auto.  Deite stnv dieu8uvsn
  http://www.delorie.com/gnu/docs/recode/recode_toc.html


  10.6.  Tupoi arxeiwv kai metatropn tous


      .txt, .doc
        Avaloga me tnv periptwsn, blepe ``''

      .dbf
        Suvn8ws eivai 737, 8elouv prosoxn stnv metatropn, afnste to gia
        kava guru.

      .diz,
        Suvn8ws eivai 737, blepe ``''

      .html,
        Prepei va eivai 928, kai faivovtai kavovika.

      .mov, .avi
        Av exei upotitlous sta ellnvika, 8a eivai OK :-)

      .exe, .com
        peta3te ta


  10.7.  Ti uparxei akoma sto Internet sxetika me ellnvika;

  Xrnsimoi suvdesmoi:

    Ellnviko Fortune: http://kronos.eng.auth.gr/~arvan/fortunes/

    Virgo help on greek: http://www.virgo.gr/baza/greek.html

    Hellenic Resources Institute (HRI): http://www.hri.org

    Font pivakes sto HRI: http://www.hri.org/fonts/unix/pinakec.html

    fonts@argeas: ftp://argeas.hellug.gr/pub/unix/linux/GREEK/fonts/


    fonts@HRI: ftp://ftp.hri.org/pub/greek/fonts/x-win/

    Selida tou Pavagiwtn Bruwvn gia grammatoseires:
     http://users.hol.gr/~vrypan/cactus/grfonts-1.html

    Unix Greek Language Software (old):
     http://www.cs.columbia.edu/~akonstan/en/greek/software.html

    Unicode Organization: http://www.unicode.org

    I18N FAQ: http://www.vlsivie.tuwien.ac.at/mike/i18n.html

    ISO fonts: ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/ISO-fonts

    International fonts: ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/i18n-
     fonts

    Using 8 bit characters: ftp://ftp.ulg.ac.be/pub/docs/iso8859/

    ISO-8859 sets: http://wwwwbs.cs.tu-berlin.de/~czyborra/charsets/

    Much charactersets info (kermit?):
     ftp://kermit.columbia.edu/kermit/charsets/

    http://www.ora.com/homepages/comp.fonts/

     Yaxte va breite oti xreiazeste me auto to search engine:
     http://www.google.org


  11.  TODO

  To kefalaio auto periexei diafores ata3ivomntes plnrofories eite giati
  dev eivai epibebaiwmeves eite giati dev eivai akoma safes pws 8a
  topo8etn8ouv stnv domn tou basikou HOWTO.  Eav mporeite, avalabete eva
  sugkekrimevo 8ema, breite tnv lusn tou, katagrayete tnv kai steilte
  tnv.


  11.1.  sgmlutils

  To sgml2html htan ok. A na po oti ekana mia allagh  sthn consola gia
  ta ellhnika (to paketo me to chcp enos apo thn patra) kai ka8e fora
  pou trexo thn perl mou bgazei: perl: warning: Setting locale failed.
  perl: warning: Please check that your locale settings: LC_ALL =
  (unset), LC_CTYPE = "iso_8859_7", LANG = (unset) are supported and
  installed on your system.  perl: warning: Falling back to the standard
  locale ("C").  --------- Prepei na dwseis sgml2txt --charset=latin.
  Panayotis.


  11.2.  groff

  Deite sxetika to ar8ro apo tov Giwrgo Keramida sto magaz:
  http://magaz.hellug.gr/09/03_groff.html



  =====================================================================
  [...]
  H alln lusn (pio hackeradikn) eivai va kaveis to GROFF sou (to basiko
  ergaleio pou xrnsimopoieitai apo to sgml2txt) va katalabaivei OLOUS
  tous 8-bit characters, pairvovtas to SHAR pou stelvw parakatw kai
  kavovtas oti leei to README tou.
  Giorgos.

  --- cut here : shell archive follows ---
  #!/bin/sh
  [...]
  exit 0
  =====================================================================

  The GNU replacement for nroff, groff, has an option to generate ISO
  8859-1 coded output, instead of plain ASCII.  Thus, you can preview
  nroff documents with correctly displayed accented characters.  Invoke
  groff with the "groff -Tlatin1" option to achieve this.

  Groff is free software. It is available from URL
  <htmlurl url="ftp://prep.ai.mit.edu/pub/gnu" name="ftp://prep.ai.mit.edu/pub/gnu">
  and many other GNU archives around the world.



  11.3.  KDE

  O Pavagiwtns Bruwvns <vrypan@hellug.gr> exei 3ekivnsei tnv
  metaglwttisn tou KDE, evos grafikou periballovtos gia Linux/Unix.
  Deite sxetika: http://users.hol.gr/~vrypan/cactus/kde.html, H ergasia
  autn eivai polu snmavtikn ka8ws ola deixvouv oti to KDE 8a epikratnsei
  gia eva megalo xroviko diastnma, suvdiazovtas eukolies pou parexovtai
  se alla grafika periballovta, opws to drag'n'drop, polla xrnsima
  utilities me koiva xaraktnristika (copy-paste), eukolia xeirismou klp.


  11.4.  vim,viH



  Den doyleyoyn oloi oi vi 8-bit, oyte deixnoyn ta ellhnika svsta:
  Yparxei enas (toylaxisto) vi clone poy legetai vim (vi improved)

          http://www.math.fu-berlin.de/~guckes/vim/
          ftp://ftp.oce.nl/pub/misc/vim

  Aytos ektos apo alla kaloydia, einai 8-bit clean kai exei kai ena
  language feature, to opoio energopoieitai dior8vnontas to arxeio
          src/feature.h

  Ekei poy leei:
          #if 0
          # define HAVE_LANGMAP
          #endif
  to kanoyme bebaia
          #if 1
          # define HAVE_LANGMAP
          #endif

  Meta bazoyme sto ~/.vimrc to parakatv:
  ----- .vimrc CUT -----
  version 4.6
  set langmap=AAAAA?CEEEEIIII?NOOOOO?OUaaaaa?ceeeeiiii?nooooo?ou;ABGDEZHUIKLMNJOPRWSTYFXCVabgdezhuiklmnjoprwstyfxcv
  ----- END OF .vimrc CUT-----
  kai meta oi entoles poy dinoyme sto vi mporei na einai kai me ellhnika grammata.
  (kserete ti spasimo einai na exeis to plhktrologio gyrismeno sta ellhnika
  kai na mhn dexetai entoles).



  11.5.  nn

  (???)
  =====================================================================
  Add the line ----------------- set data-bits 8 ----------------- to
  your  /.nn/init (or the global configuration file) in order for nn to
  be able to process 8 bit characters
  =====================================================================


  11.6.  tin

  (???)


  11.7.  mtools


          Deixnoyn, ypoti8etai, ellhnikoys xarakthres an baloyme to
  parakatv sto ~/.mtoolsrc h sto /etc/mtools.conf:

          country="30,737,/dosfs/c/win/command/country.sys"

  Mallon 8a yparxei mperdema me ta ellhnika (737 h 928?)
  Den to exv dokimasei.



  11.8.  jove



  to new JOVE 4.16 if compiled with CTYPE enabled ( -DUSE_CTYPE
  -UNO_SETLOCALE) kanei mia xara ellhnika. Prepei omvs na exeis
  swsto 8859-7 locale ellhnikvn sto systhma
  Mexri kai svsto Upper kai lower casing kanei ! dokimaste to
  [From: Angelos Karageorgiou <angelos@incredible.com>]



  11.9.  pcal


  {
  Ftiaxnei Postscript calendars se 7 diaforetikes glwsses. To
  internationalisation toy pcal egine apo ton A.Haritsis
   <<htmlurl url="mailto:ah@computer.org" name="ah@computer.org">>
  kai erxetai me sxedon plhres ellhniko eortologio (me kinhtes kai
  akintes eortes aytomata topothetoymenes).
  Ta hmerologia poy paragontai einai highly customisable (mporei kaneis
  eykola na balei proswpikes hmeromhnies).
  Yparxei kai ena WWW front-end sto:
  http://www-asds.doc.ic.ac.uk/cgi-bin/grcal
  Ta latest sources toy pcal einai sto:
  http://uptown.turnpike.net/~rogers/
  }



  11.10.  kermit

  (???)
  =====================================================================
  kermit : This is as close as I can get, but not completely satisfying
  yet: Put the following in your  /.kermrc file

            set terminal bytesize 8
            set command bytesize 8
            set file bytesize 8
            set language danish
            set file character-set latin1-iso
            set transfer character-set latin1-iso
            set terminal character-set latin1-iso


  I think there are more variables to set, but they are hiding. You
  would have to modify these settings if the remote system is DOS or
  OS/2 based.
  =====================================================================


  11.11.  SHMEIWSEIS


  {tty -s}
  ------------
         "language"_"country"."character_encoding"
          el_GR.8859-7

  It looks as if "language" is the two-letter code for the language from
  ISO 639, and "country" is the two-letter code for the country from ISO
  3166, but I don't know of any standard specifying "character_encoding".
  ------------



  Opoios eftase ws edw sigoura 8a paei polu mprosta...



F HELLENIC.;1                       	Hellenic-HOWTO
  Linux Italian-HOWTO
  Marco Gaiarin (gaio@pluto.linux.it)
  v1.2.0, 3 November 1998

  Questo HOWTO descrive in alcuni semplici passi come configurare il
  proprio sistema Linux per supportare pienamente la tastiera e la
  localizzazione italiana.  Inoltre si vuole in questo testo dare tutta
  una serie di informazioni sul mondo Linux in Italia.
  ______________________________________________________________________

  Table of Contents



  1. Introduzione

     1.1 Dove potete trovare sempre l'ultima versione...
     1.2 Convenzioni tipografiche
     1.3 Note sui Link
     1.4 Perch Debian?!
     1.5 Ringraziamenti
     1.6 Traccia delle modifiche
     1.7 Copyright

  2. La tastiera

     2.1 Console
        2.1.1 Keymap alternative
     2.2 XFree86
        2.2.1 XF86Setup(1)
        2.2.2 Backspace e Delete
        2.2.3 MetroX e tastiera italiana
        2.2.4 Keymap alternative
     2.3 Per maggiori informazioni

  3. National Language Support (NLS)

     3.1 La localizzazione in una riga...
        3.1.1 Bug delle localizzazioni
        3.1.2 Bug delle applicazioni
           3.1.2.1 Netscape
           3.1.2.2 perl(1)
     3.2 ...o quasi!
        3.2.1 Editor
           3.2.1.1 Emacs 19
           3.2.1.2 joe(1)
        3.2.2 Mail/News
           3.2.2.1 pine(1)
           3.2.2.2 tin(1)
           3.2.2.3 nn(1)
        3.2.3 readline(3)
     3.3 Manpage
     3.4 Catalogue
        3.4.1 Linux International
     3.5 Per maggiori informazioni

  4. Altre localizzazioni

     4.1 Font in console
        4.1.1 Debian
        4.1.2 SVGATextMode
     4.2 Font in X
     4.3 Stampante e DOS
        4.3.1 Un esempio di filtro
     4.4 libpaper
     4.5 Per maggiori informazioni

  5. Ispell

     5.1 Ispell e Emacs
     5.2 Per maggiori informazioni

  6. TeX

     6.1 Un po' di teoria...
        6.1.1 Il formato del file
     6.2 L'installazione TeX di Linux
        6.2.1 Configurazione di teTeX
        6.2.2 Configurazione delle altre distribuzioni di TeX
           6.2.2.1 NTeX
           6.2.2.2 teTeX di Slackware 3.3
        6.2.3 La sindrome di Zio Paperone
     6.3 Produzione di elaborati TeX ben localizzati
        6.3.1 Stampa di testi in inglese
        6.3.2 Composizione di testi in italiano
     6.4 Per maggiori informazioni

  7. Siamo in Europa, bellezza!

     7.1 Per maggiori informazioni

  8. TimeZone

     8.1 Q: ma perch Linux mi ha sbagliato il passaggio di fuso?!
     8.2 Q: ma perch ho l'ora impostata a CEST?

  9. Documentazione

     9.1 Pubblicazioni offline (su carta... ;)
        9.1.1 Libri
        9.1.2 Riviste
     9.2 Pubblicazioni online
        9.2.1 Italian Linux Documentation Project
        9.2.2 AppuntiLinux
        9.2.3 Riviste/fanzine
     9.3 Distribuzioni in Italiano
     9.4 Altro materiale in Italiano
        9.4.1 Fortune in Italiano
        9.4.2 Linux FAQ

  10. Linux in Italia

     10.1 Associazioni, gruppi di utenti
        10.1.1 PLUTO
        10.1.2 ILS
        10.1.3 Altri LUG locali
     10.2 Aree di discussione pubbliche
        10.2.1 Newsgroups
        10.2.2 Mailing List
        10.2.3 FidoNet
        10.2.4 PNet
        10.2.5 EuroNet
        10.2.6 PeaceLink
        10.2.7 ScoutNet
        10.2.8 Rete packet AX25
        10.2.9 IRC
        10.2.10 Meeting
     10.3 Siti Linux
        10.3.1 Siti internet
        10.3.2 BBS


  ______________________________________________________________________

  1.  Introduzione



       ``Perch scegliere UNIX?  A chi utilizza gi un PC o un Mac
       intosh potrebbe sorgere il dubbio che il computer a sua dis
       posizione sia gi sufficiente per tutte le esigenze
       descritte in precedenza e che, in fondo, UNIX non sia altro
       che uno dei tanti dinosauri destinati a morte certa.  Proba
       bilmente questo avverr (in fondo nulla  eterno), ma sola
       mente nel momento in cui tutti i personal computer saranno
  in grado di svolgere i compiti che, almeno per ora, sono ad
  esclusivo appannaggio di UNIX.''

  (da ``UNIX Flash'', ed. Apogeo)



  Questo testo non  una guida all'installazione, n un testo di
  introduzione a Linux. Se questo  il vostro primo approccio a Linux,
  perch lo avete appena installato o vi accingete a farlo, qui potete
  trovare solamente alcuni riferimenti ad altre pubblicazioni che vi
  possono aiutare.  In particolare consiglio gli ``AppuntiLinux'' come
  testo introduttivo a Linux.

  Quindi, in questo testo si presume che:


    abbiate Linux installato e funzionante. Quello che di sicuro non
     troverete qui  una guida alla risoluzione di problemi hardware

    abbiate una versione di Linux ``recente'', ovvero un kernel 2.0.0 o
     successivi, e tutte le nuove versioni delle utilit che occorrono
     per queste versioni di kernel

    abbiate una minima conoscenza della organizzazione del filesystem e
     la padronanza dei principali comandi, nonch un'idea dei concetti
     di utente e utente ``root''

    abbiate una minima conoscenza dell'uso dei programmi fondamentali,
     almeno un editor di testi.



  Se siete alle prime armi con Linux, lo avete appena installato, il
  consiglio che vi do  quello di mettere da parte questo HOWTO e farvi
  una certa cultura su UNIX in generale e su Linux.

  Potete trovare una miriade di informazioni (libri e documenti da
  leggere, forum di discussione, ``persone'' da incontrare) negli ultimi
  due capitoli di questo HOWTO.



  1.1.  Dove potete trovare sempre l'ultima versione...


  Dalla passata versione l'Italian HOWTO  stato ``snellito''; ormai non
  ci sono pi grossi problemi di localizzazione ed ho quindi preferito
  spostare buona parte del materiale (la pi ``volatile'') sotto forma
  di contributi in un URL a parte.

  Trovate quindi l'ultimissima versione di questo testo, assieme a
  contributi e qualche curiosit, all'url
  <http://www.pluto.linux.it/~gaio/Italian-HOWTO>; in ogni caso
  l'Italian HOWTO  un documento ``ufficiale'' e quindi fa parte sia di
  ``ILDP'' che di LDP <http://sunsite.unc.edu/LDP>, con la conseguenza
  pratica che lo trovate ormai dappertutto, in tutti i formati
  disponibili (testo, html per leggere a video e PostScript per
  stamparlo comodamente), solitamente anche preinstallato dalla vostra
  distribuzione preferita.

  Inoltre l'autore  reperibile all'indirizzo gaio@pluto.linux.it.
  Oppure agli indirizzi 2:333/1016 (FidoNet), 61:3917/1 (PeaceLink),
  91:13/1 (PNet), 1907:395/101.20 (ScoutNet).
  Sono contentissimo di ricevere commenti e suggerimenti per questo
  testo, e invito tutti a segnalarmi eventuali errori, dimenticanze o ad
  inviarmi proposte e contributi.



  1.2.  Convenzioni tipografiche



    Questo  un programma(n) o file di configurazione del sistema.

     Il numero tra parentesi non  messo a caso. Vuol dire che quel
     programma  dotato di una man page, consultabile con il comando
     man n programma; per saperne di pi sulle manpage potete consultare
     la sezione ``Manpage''.  Il fatto che scriva esplicitamente quel
     numero tra parentesi vuole essere un invito esplicito a leggere
     quella man page.

    Questo  un comando da impartire o un nome di file o directory.

    Questo  un [Tasto] sulla tastiera. Questa  una combinazione di
     tasti [Tasto1+Tasto2].

     Di solito, per comodit, eviter di scrivere le combinazioni di
     tasti con shift, perci al posto di [Shift+a] scriver il pi
     semplice [A].

    Questo  un termine nuovo, che va quindi ``metabolizzato''. Di
     solito tendo a essere chiaro, nel senso che dal contesto o dalle
     righe immediatamente successive se ne dovrebbe capire il
     significato.  Se non  cos, fatemelo sapere! ;)

    Ormai molto spesso parlo di pacchetti, ovvero di quegli archivi di
     programmi, file di configurazione e documentazione usati dalle
     moderne distribuzioni che permettono una agevole manutenzione
     (installazione, disinstallazione, configurazione) di un sistema
     Linux; il pacchetto ha un nome, che riporto, e delle informazioni
     di versione e tipo (.deb per Debian, .rpm per RedHat ad esempio)
     che invece solitamente non riporto perch implicite o inessenziali.



  1.3.  Note sui Link


  In questo testo ho cercato di porre molta attenzione ai link, di modo
  che la versione html sia piacevolmente fruibile.  Ma buona parte della
  documentazione a cui questo testo fa riferimento molto probabilmente 
  gi presente nel vostro disco o nel CD della vostra distribuzione
  Linux: prendete quindi tutti questi link con un po' di sale in zucca,
  e fate una ricerca locale prima di lanciarvi in estenuanti riferimenti
  a siti d'oltreoceano.

  Ad esempio tutti gli HOWTO sono solitamente gi presenti nella
  directory /usr/doc/HOWTO, compreso questo che state leggendo e le
  traduzioni in Italiano (almeno in Debian); non saranno le ultime
  versioni, chiaro, ma solitamente sono pi che ottime.

  Uomo avvisato, mezzo salvato! ;)



  1.4.  Perch Debian?!


  L'Italian-HOWTO, pur cercando di essere il pi indipendente possibile
  dalla distribuzione, fa riferimento pesantemente a Debian
  <http://www.debian.org/>.

  Questa vuole essere una scelta ``tecnica'', perch ha una init SYSV,
  perch ha un sistema di pacchettizzazione e configurazione serio e
  funzionale, perch rispetta tutti gli standard che si sono via via
  creati all'interno della comunit Linux, perch  gi ora parzialmente
  in italiano e in futuro lo sar (si spera) totalmente, perch 
  l'unica ad avere come obiettivo l'internazionalizzazione.

  Ma vuole essere anche una scelta ``politica'', visto che Debian 
  l'unica distribuzione non commerciale e OpenSource
  <http://www.opensource.org/>, e credo quindi che meriti i miei due
  centesimi...  di Euro! ;)

  Debian e RedHat, in fondo, sono molto simili, quindi gli utenti RH (e
  distribuzioni RH-like come SuSE e Caldera) non dovrebbero trovarsi
  troppo a disagio, se non per la localizzazione quasi assente di queste
  distribuzioni.



  1.5.  Ringraziamenti


  Come sempre ringrazio Anna per l'affetto, mia mamma perch mi
  sopporta, il pap perch non si  ancora pentito di avermi dato il
  numero di carta di credito, Jacopo <http://www.dei.unipd.it/~cico>
  perch sopravvive alla mia arte (?!) culinaria, Luca
  <http://www.dei.unipd.it/~pavy> perch si lascia sfruttare ;), il
  PLUTO <http://www.pluto.linux.it/> e PeaceLink
  <http://www.peacelink.it/> che mi sopportano nonostante non faccia
  quasi niente, Leandes di Ps <http://www.fvg.peacelink.it/> e il
  Coordinamento Telematico di Azione Cattolica
  <http://users.iol.it/marcogaio/AC/CTAC-Map.html> (e in particolare
  Lindo <mailto:ascoli@ascu.unian.it>) che sopportano la mia continua
  rottura di scatole, l'Azione Cattolica di Cimpello/Praturlone
  <http://users.iol.it/marcogaio/AC> che deve tenersi un segretario che
  si dimentica tutto, rete FidoNet <http://www.fidoitalia.net/> che
  probabilmente si  beccata un bell'osso di sysop; e una caterva di
  altra gente che non ringrazio per decenza. ;)


  Ma una dedica particolare va a Maria Luisa, Stefano e il nuovo
  arrivato Alessandro (il mio primo nipotino! ;).  Ora spetta anche a me
  fare in modo che Alessandro possa vivere, da grande, in un mondo
  solidale, giusto, nonviolento, pulito.  In fondo la scelta 
  semplice... pensare solo a noi stessi, oppure lasciare questo mondo un
  po' meglio di come l'abbiamo trovato! ;)

  Dedico inoltre questo HOWTO a quattro pazzi di amici, che hanno scelto
  di fare la cosa pi difficile: cercare di vivere con la propria
  passione... sembra quasi una poesia ma  invero una ProSA
  <http://www.prosa.it/>! ;)



  1.6.  Traccia delle modifiche



     0.1b
        Prima versione, niente di pi che una traduzione/copiatura di
        altro materiale simile reperito in rete


     0.2b
        Aggiunto il capitolo su Linux in Italia, qualche bugfix.


     0.4b
        Risistemazione generale, aggiunta del capitolo su ispell


     0.6b
        Profondo lifting (ho tolto una marea di roba che si trova
        semplicemente in altri HOWTO), riscrittura del capitolo sulla
        localizzazione con aggiunta di informazioni sui vari progetti,
        aggiornamento del capitolo su ispell.  Questa vuole essere
        l'ultima versione beta ( un buon proposito ;).


     0.8b
        Niente di meno che una correzione della precedente versione, con
        qualche aggiunta. Questa  di sicuro l'ultima versione beta.


     1.0.0
        Il testo dovrebbe aver preso la sua struttura definitiva; 
        stato riorganizzato tutto ed in particolare sono state aggiunte
        sezioni per libpaper, fortune in italiano e distribuzioni in
        italiano,  stata tolta la bibliografia in inglese; sono state
        inoltre riviste completamente le parti riguardanti la tastiera
        (aggiunta di xkbd), TeX (da NTeX a teTeX) e la locale;  stato
        aggiunto il crossreferencing all'interno del documento.


     1.2.0
        Versione riveduta e corretta (soprattutto gli URL, che in un
        anno cambiano parecchio! ;) del precedente; inizia il lavoro di
        ``potatura'' di buona parte del materiale, man mano che i
        problemi pi grossi (locale e tastiera) vengono risolti.  
        stato aggiunto il paragrafo (praticamente vuoto) per le future
        euroquestioni.



  1.7.  Copyright


  Per motivi spudoratamente legali, riporto come messaggio di copyright
  la versione ``originale'' in inglese. Trovate subito sotto la
  traduzione.


  This Howto is copyrighted by Marco Gaiarin and distributed as other
  Linux HOWTOs under the terms described below.

  Linux HOWTO documents may be reproduced and distributed in whole or in
  part, in any medium physical or electronic, as long as this copyright
  notice is retained on all copies. Commercial redistribution is allowed
  and encouraged; however, the author would like to be notified of any
  such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu. You may finger this
  address for phone number and additional contact information.


  Questo HOWTO  di Marco Gaiarin ed  distribuito come gli altri HOWTO
  di Linux sotto i termini descritti sotto.

  I documenti degli HOWTO di Linux possono essere riprodotti e
  distribuiti in tutto o in parte, con ogni mezzo fisico o elettronico,
  purch questo avviso di copyright sia mantenuto su tutte le copie. La
  distribuzione commerciale  permessa e incoraggiata; comunque
  all'autore piacerebbe essere avvisato di ogni distribuzione di questo
  tipo.

  Ogni traduzione, lavoro derivato o comprendente ogni documento degli
  HOWTO di Linux deve essere coperto sotto questo avviso di copyright.
  Cio non potete produrre un lavoro derivato da un HOWTO e imporre
  restrizioni aggiuntive sulla sua distribuzione. Eccezioni a queste
  regole possono essere garantite sotto certe condizioni; contattate il
  coordinatore degli HOWTO di Linux all'indirizzo indicato sotto.

  Se avete domande contattate Tim Bynum, il coordinatore degli HOWTO di
  Linux, a linux-howto@sunsite.unc.edu. Potete fare finger a questo
  indirizzo per il numero di telefono e altre informazioni per
  contattarlo.



  2.  La tastiera



  La gestione della tastiera di Linux  organizzata su pi ``strati'' o
  livelli di astrazione il cui numero, tre, non ci  di grande
  interesse.  Quello che interessa a noi  il risultato, ovvero una
  gestione della tastiera indipendente dall'hardware (ricordo che Linux
   un sistema operativo multipiattaforma e non funziona solo sui PC
  compatibili...) e facilmente riconfigurabile.

  Infatti  sufficiente modificare l'interfaccia tra uno strato e
  l'altro per ottenere gli effetti desiderati: nel nostro caso il
  perfetto funzionamento della tastiera italiana.


  2.1.  Console


  Per ottenere la configurazione della tastiera italiana in console 
  sufficiente impartire il comando loadkeys it.map; questo comando non
  fa altro che caricare la tabella di descrizione della tastiera
  (keymap, appunto) it.map al posto di quella di default ``inserita''
  nel kernel.

  Solitamente  la procedura di installazione che si preoccupa di
  chiedere all'utente quale tastiera usare e a inserire un comando come
  quello qui sopra in uno degli script di avvio del sistema.


  In Debian esiste il comando kbdconfig che permette di riconfigurare la
  tastiera senza editare a mano gli script di avvio, le altre
  distribuzioni avranno di sicuro sistemi simili...

  Questa Keymap inoltre supporta alcune aggiunte essenziali per i
  programmatori, come le parentesi graffe, il carattere tilde e il
  carattere apice inverso ottenuti premendo rispettivamente [AltGr+8],
  [AltGr+9], [AltGr+0] e [AltGr+'].

  Se si vuole indagare ulteriormente nella gestione della tastiera nella
  console Linux, si pu far riferimento ai comandi (e alle rispettive
  manpage) showkey(1)  dumpkey(1), oltre ovviamente al gi citato
  loadkey(1).


  2.1.1.  Keymap alternative


  Nonostante questa keymap sia gi molto buona, si sta cercando di fare
  meglio; in particolare Lorenzo Maria Catucci
  (lorenzo@argon.roma2.infn.it) sta lavorando a una serie di keymap per
  console e per X congruenti e possibilmente senza problemi.  Trovate le
  bozze di queste keymap nel sito dell'Italian HOWTO
  <http://www.pluto.linux.it/~gaio/Italian-HOWTO>.

  Nello stesso sito potete trovare inoltre delle keymap alternative che
  permettono di ``emulare'' la tastiera Amiga e cose simili...



  2.2.  XFree86


  Di recente (dalla versione 3.2 in poi...) XFree ha completamente
  cambiato la gestione della tastiera, aggiungendo una estensione che si
  chiama ``XKeyboard'' (o XKBD), e qualche astrusa voce in pi nel file
  di configurazione.  Il nuovo sistema  effettivamente migliore, ma
  talmente configurabile che c' voluto un annetto perch venisse
  metabolizzato e quindi venissero prodotte le keymap secondo queste
  nuove specifiche...

  Il problema vero  che xf86config(1) non riesce pi a gestire in fase
  di configurazione automatica la tastiera italiana (o meglio, per
  trovare uno straccio di riferimento all'Italia occorre muoversi per un
  po' tra complicate opzioni...), ma niente paura.

  Si pu benissimo completare la configurazione scegliendo una tastiera
  predefinita (come quella americana) e poi editare il file
  /etc/X11/XF86Config aggiungendo o modificando le informazioni:



  ______________________________________________________________________
          Section "Keyboard"

          [...]

          LeftAlt      Meta
          RightAlt     ModeShift

          # ovviamente se avete una tastiera W95
          # al posto di pc102 ci va pc104 (o pc105)!
          #
          Protocol     "Standard"
          XkbRules     "xfree86"
          XkbModel     "pc102"
          XkbLayout    "it"

          EndSection
  ______________________________________________________________________



  Le prime due righe, in particolare, servono ad avvisare X che abbiamo
  intenzione di usare [AltGr] come modificatore ModeShift per poter
  utilizzare, come siamo abituati, parentesi quadre, at e diesis.  (Non
  vi ricordate? Era una di quelle imbarazzanti domande che vi ha posto
  xf86config(1)...)

  Questa definizione di tastiera  leggermente diversa (come
  disposizione dei tasti ``nascosti'') di quella in console (ad esempio
  le parentesi graffe sono ora in [AltGr+7], [AltGr+0]).


  2.2.1.  XF86Setup(1)


  In alternativa  possibile usare il nuovo programma di configurazione
  di XFree, presente dalla versione 3.2 e seguenti, XF86Setup(1); la
  configurazione di X11  molto pi intuitiva con XF86Setup che con
  xf86config: per un novellino (ma anche non) pu essere utile anche
  perch permette di controllare al volo se le impostazioni sono
  corrette (da Giovanni Bortolozzo).

  Per poter utilizzare XF86Setup occorre installare il server VGA16 in
  aggiunta a quello appropriato per la propria scheda video.



  2.2.2.  Backspace e Delete


  Un problema noioso, che per non riguarda solo la tastiera italiana, 
  che in X gli effetti della pressione dei tasti BackSpace e Canc
  coincidono (ambedue fanno Del, ovvero cancellano il carattere sul
  cursore; o ambedue fanno BackSpace, ovvero cancellano il carattere
  alla sinistra del cursore, dipende di solito dal tasso di umidit
  dell'aria... ;-).

  Questo  un problema comune a tutti gli utenti Linux, ed inoltre
  esistono ottimi documenti che spiegano come sistemare (o mettere una
  pezza) a questo problema; per puntatori vedi alla fine di questa
  sezione.

  Questo comportamento  dovuto in maggior parte da incompatibilit
  ``storiche'' tra librerie/applicazioni/metodi di programmazione, e
  anche in distribuzioni come Debian che hanno forzato una unica
  politica di accesso ai terminali (con il database terminfo(5)) il
  problema con alcune (vecchie) applicazioni rimane.

  Insomma,  un problema delle applicazioni e non di Linux.

  Per programmi (o sistemi) che usano ancora termcap(5)  molto
  probabile che occorra una correzione della definizione di xterm. Non 
  proprio il caso di inserire una cosa del genere in questo HOWTO, mal
  che vada nel sito dell'Italian-HOWTO
  <http://www.pluto.linux.it/~gaio/Italian-HOWTO>;  comunque pi
  corretto cercare una versione dell'applicazione compilata con terminfo
  oppure... cambiare applicazione! ;)

  Per comprendere meglio queste cose sono letture consigliate le manpage
  di termcap(5) e terminfo(5), oltre a quanto riportato alla fine di
  questa sezione.



  2.2.3.  MetroX e tastiera italiana


  Ho visto che pi persone hanno problemi con la tastiera sotto Metro-X,
  non so se intanto il problema  stato risolto, eventualmente
  segnalatemelo che elimino questa sezione.

  Per risolvere in modo pulito e definitivo il problema modificate
  questa sezione del file /etc/X11/XMetroconfig


  ______________________________________________________________________
          Section "Keyboard"
                  LeftAlt         Meta
                  RightAlt        ModeShift
                  Protocol        "Standard"
                  XkbKeymap       "xfree86(it)"       # al posto di "metro(it)"
                  XkbModel        "pc105"             # solo se avete i tasti W95
                  XkbRules        "xfree86"
                  XkbLayout       "it"
          EndSection
  ______________________________________________________________________



  Se prima di farlo guardate alla fine del file /var/log/Xerrors,
  scoprirete quale  il problema: mancano i file kbd della Metro (da
  Andrea Tuccia).


  2.2.4.  Keymap alternative


  Anche qui sono state raccolte una serie di keymap alternative a quelle
  ufficiali presenti nelle distribuzioni; trovate anche queste al sito
  <http://www.pluto.linux.it/~gaio/Italian-HOWTO>.

  Inoltre Dino Paganello mi segnala il programma xrus(1) che permette di
  fare lo switch al volo tra diverse descrizioni di tastiera (lui lo usa
  per passare la volo dalla tastiera americana a quella italiana).



  2.3.  Per maggiori informazioni


  Ulteriori informazioni, specialmente se si vuole migliorare la
  gestione della tastiera (aggiungere i tasti cursore in determinate
  applicazioni, macro ai tasti funzione, ...), si possono trovare in:


    Keyboard and Console HOWTO
     <http://sunsite.unc.edu/LDP/HOWTO/Keyboard-and-Console-HOWTO.html>.

    XFree86 HOWTO <http://sunsite.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>
     (anche in versione Italiana
     <http://www.pluto.linux.it/ildp/HOWTO/XFree86-HOWTO.html>).

    Esiste inoltre la kbd.FAQ contenuta nel pacchetto del software di
     gestione della tastiera, e che dovrebbe essere gi stata installata
     da qualche parte nel vostro disco (di solito /usr/doc/kbd).


    Anne Baretta (anne@ibbnet.nl) ha creato delle pagine per aiutare la
     configurazione di BS/DEL; non le ho guardate, ma potrebbero essere
     un buon punto di partenza.  Le trovate su
     <http://www.ibbnet.nl/~anne/keyboard.html>

    Esistono anche queste pagine (
     <http://electron.et.tudelft.nl/~jdegoede/fixkeys.txt>) per il
     problema BS/DEL; riporto questo URL solo per ribadire che questi
     non sono modi con cui  possibile affrontare (e tantomeno
     risolvere) il problema; testi del genere, che non hanno alla base
     un serio studio e soprattutto l'uso di terminfo, sono come una
     lobotomia come rimedio per il mal di testa.

     Magari funziona ma...



  3.  National Language Support (NLS)



  Di certo vi stupir sapere che lo standard POSIX, e quindi anche
  Linux, prevede il supporto delle regole nazionali per la gestione di
  set di caratteri, modo di scrivere data, ora, numeri in generale e
  quindi tutto quello che pu (informaticamente parlando) distinguere
  una paese dall'altro.

  Dalla versione 5.2.18 delle GNU libc, tutta la localizzazione 
  supportata anche da Linux.  Ma non basta avere installate delle
  moderne libc, occorre anche che questa sia stata compilata con
  determinate opzioni e occorre installare tutta una serie di file e
  directory che descrivono la ``locale'' Italia.  Insomma, compito non
  facile se la vostra distribuzione non ha gi il supporto per la
  localizzazione...

  Per poter influenzare Linux di modo che reagisca secondo la locale
  scelta, occorre modificare delle variabili d'ambiente. In ordine:



     LANG
         la variabile ``generale'' del gruppo, serve a definire una
        regola generale (il paese) con cui poi assegnare le variabili
        che vengono sotto. Una definizione delle variabili sottostanti
        annulla per quella di default definita da LANG.  Inoltre LANG
        influenza anche il programma ``man(1)'', ci torneremo poi.


     LC_COLLATE
        Influisce sulle regole di ordinamento alfabetico.


     LC_CTYPE
        Definisce il set di caratteri usato dal sistema.


     LC_MONETARY
        Definisce come devono essere scritte le valute, ovvero quale,
        tra virgola e punto,  il separatore di decimali e migliaia e
        viceversa; definisce inoltre il simbolo di valuta.


     LC_NUMERIC
        Separatore di decimali e migliaia, formattazione dei numeri.


     LC_MESSAGES
        Definisce i valori ``si'' e ``no''.


     LC_TIME
        Come stampare data e ora (questo influenza date(1) e programmi
        vari).


     LC_ALL
        Come LANG, solo che questa ignora i valori definiti per ogni
        singola variabile (forza tutto al suo valore).  Come spiegher
        in seguito, questa variabile non va usata a meno di non sapere
        perfettamente quello che si sta facendo.



  3.1.  La localizzazione in una riga...


  Pi semplicemente di quello che si crede, basta mettere nel proprio
  ~/.profile o /etc/profile per sh-type shells:


  ______________________________________________________________________
          export LANG=it_IT
  ______________________________________________________________________



  Oppure se avete c-type shells:


  ______________________________________________________________________
          setenv LANG it_IT
  ______________________________________________________________________



  Perch ``it_IT''?!  solo una convenzione, e il significato 
  ``lingua_PAESE''. Per fare un esempio potrebbe essere it_CH (Svizzera
  italiana).

  Come sempre la man page di locale(7)  lettura molto consigliata, come
  un giro per /usr/share/locale per vedere le locali disponibili.


  3.1.1.  Bug delle localizzazioni


  Solitamente si manifestano con errate definizioni degli alias di
  locale, quindi definizioni che dovrebbero essere equivalenti danno
  risultati completamente diversi; per rimediare a questo occorre
  prelevare le definizioni di locale aggiornate, o installarle (molte
  distribuzioni non le installano proprio).

  Pu anche essere che alcune distribuzioni non abbiano proprio il
  supporto per la locale, al che conviene cambiare distribuzione
  (l'alternativa  ricompilare a mano la libreria di sistema libc).



  3.1.2.  Bug delle applicazioni


  Anche qui, come per il problema BS/DEL, se qualcosa non funziona 
  colpa, quasi certamente, della applicazione.

  C' qui una specie di ``caverna degli orrori''... ;)))



  3.1.2.1.  Netscape


  Netscape, se vengono definite le variabili LC_NUMERIC e LC_MONETARY,
  si mette a stampare e salvare PostScript con punti al posto delle
  virgole e viceversa, con il risultato che gs(1) va in palla...

  Se capita, ricontrollate la vostra definizione di locale, e se avete
  fretta di stampare basta che definiate le variabili seguenti:


  ______________________________________________________________________
          LC_NUMERIC=posix
          LC_MONETARY=posix
  ______________________________________________________________________



  che forzano i valori di default (e permettono di stampare).

  Notare che se si  definita LC_ALL, queste due righe qui sopra vengono
  ignorate: per questo  bene NON definire la variabile LC_ALL.

   probabile che questo problema non sia solo di Netscape: se vi capita
  un problema simile, sapete ora come ``mettere una pezza'', ma avvisate
  l'autore del programma in questione della presenza di questo bug.


  3.1.2.2.  perl(1)


  Spesso perl(1) si lamenta della mancanza della locale; questo  dovuto
  sia a una non completa implementazione da parte della distribuzione,
  sia in parte a perl stesso che non riesce a gestire gli alias delle
  varie locali, e quindi riesce a ``seguire'' la variabile LANG solo se
  punta a una locale con una reale directory sul disco.

  Io sulla mia Debian non sono riuscito a riprodurre il problema (se non
  settando LANG a una locale inesistente ;) e quindi sospetto che tutto
  nasca da una difficile interazione tra localizzazione e perl stesso,
  che verr risolta sicuramente dalle prossime versioni di perl.
  RedHat 5.0 soffre di questo problema, che  stato corretto nella 5.1.



  3.2.  ...o quasi!


  Resta il problema di far capire alle applicazioni ``cattive'' che
  vogliamo avere i caratteri accentati. Questi hanno l'interessante
  propriet di essere lunghi 8 bit, mentre molti programmi ne
  considerano solo 7, perch  da 7 bit il codice ASCII
  internazionalmente riconosciuto.

  Queste note che scrivo dovrebbero presto finire in soffitta, visto che
  ormai le applicazioni che non gestiscono bene gli 8 bit o che non sano
  reagire alla variabile LANG sono in via di estinzione.



  3.2.1.  Editor



  3.2.1.1.  Emacs 19


  Come sempre emacs  molto particolare. Avvisiamolo che vogliamo i
  caratteri accentati con :


  ______________________________________________________________________
          (standard-display-european t)
          (set-input-mode (car(current-input-mode))
          (nth 1 (current-input-mode)) 0)
  ______________________________________________________________________



  Aggiunto al nostro bravo ~/.emacs



  3.2.1.2.  joe(1)


  Basta editare il file di configurazione /etc/joe/joerc o nel proprio
  ~/.joerc di modo che comprenda la riga (con il ``-'' sulla colonna 1):


  ______________________________________________________________________
          -asis           Characters 128 - 255 shown as-is
  ______________________________________________________________________



  3.2.2.  Mail/News



  3.2.2.1.  pine(1)



  Basta scegliere il set di caratteri ISO-8859-1 dal menu di
  configurazione, seguendo le voci ``Setup'', poi ``Configure'' e infine
  ``character-set''; questo fa uscire le mail in codifica ``quoted-
  printable'' se contengono caratteri accentati (il che  bene ;).



  3.2.2.2.  tin(1)


  Tin  perfettamente localizzato, occorre solo scegliere il charset
  ISO-8859-1 per la visualizzazione nel men di configurazione
  (attraverso [M]).



  3.2.2.3.  nn(1)


  Aggiungere la seguente riga nel file ~/.nn/init:


  ______________________________________________________________________
          set data-bits 8
  ______________________________________________________________________



  3.2.3.  readline(3)


  Readline, che  una libreria standard GNU per la gestione dell'input,
  nonostante sia giovane, pimpante e ben mantenuta, non arriva per
  definizione con il supporto per i caratteri accentati. Questa libreria
   usata dalla shell di default di linux bash(1), per citare una
  applicazione di larghissimo uso.  Non  da considerare un bug (questo
  comportamento forse  voluto per garantire il funzionamento anche sui
  vecchi terminali a 7 bit...) ma  chiaro che l'uso dei caratteri
  accentati deve essere forzato, ad esempio, se si vogliono usare nomi
  di file con lettere accentate.

  Per fortuna basta solo aggiungere nel proprio ~/.inputrc


  ______________________________________________________________________
          set meta-flag on
          set convert-meta off
          set output-meta on
  ______________________________________________________________________



  3.3.  Manpage


  Le manpage sono quelle pagine testuali che si richiamano con il
  comando man(1), e che rappresentano la documentazione online di ogni
  buon sistema UNIX, non solo di Linux.

  Il comando man  abbastanza intelligente da reagire se  definita la
  variabile LANG. In pratica man va a cercare le manpages prima in
  $MANPATH/$LANG e poi in $MANPATH se configurato correttamente,
  permettendo di leggere le pagine nella lingua preferita.

  Chiaramente c' gi chi sta traducendo le pagine; se vi sentite dei
  traduttori nati non vi resta che saltare al progetto ``ILDP'' per
  saperne di pi e collaborare.

  Le pagine gi tradotte possono essere tranquillamente installate
  manualmente, prelevando l'ultima versione da
  <ftp://ftp.pluto.linux.it/pub/pluto/ildp/man> e leggendo attentamente
  le istruzioni allegate.  Gli utenti Debian possono trovare nella loro
  distribuzione il pacchetto manpages-it gi pronto.



  3.4.  Catalogue


  Oltre tutto questo, c' una terza e importantissima funzione della
  NLS: i messaggi dei programmi nella lingua locale.

  Per farsi un'idea, agli utenti Linux non tocca editare i sorgenti di
  un programma, modificare a mano tutte le stringhe e poi ricompilare
  perch questo si presenti in corretto italiano. Esiste una ``prassi''
  di programmazione che permette di specificare un linguaggio di default
  ``compilato'' nell'eseguibile (di solito inglese, per compatibilit) e
  invece definire delle catalog, ovvero dei cataloghi di messaggi in un
  formato particolare, detto portable object, o pi brevemente po, che
  messi in una determinata directory vengono usati semplicemente al
  posto dei messaggi presenti nel programma.



  3.4.1.  Linux International


  Non c' da meravigliarsi che ci abbia pensato mamma GNU stessa a
  creare una organizzazione nonprofit, Linux International
  <http://www.li.org/> appunto, dedicata a questo, dobbiamo ammetterlo,
  immane lavoro di traduzione e aggiornamento.

  In particolare in questo sito vengono messe a disposizione della
  comunit UNIX internazionale una serie di liste in cui poter
  coordinarsi per la traduzione, una per ogni paese pi una serie di
  liste generiche di ``intracoordinamento''.

  Visto che tradurre i messaggi (catalogues) e tradurre manpage e HOWTO
  sono compiti molto simili, per non creare fastidiose sovrapposizioni i
  compiti sono stati divisi tra due ambiti.  Linux International in cui
  si definiscono le regole generali di traduzione e si traducono
  catalogues e programmi GNU ``ufficiali'', e ``ILDP'' che invece  pi
  legata al mondo Linux e maggiormente dedicata alla traduzione di
  documentazione (HOWTO e manpage) e anche alla sua produzione
  direttamente in Italiano.

  Pi avanti elenco le ``liste'' a cui ti puoi iscrivere per
  collaborare.

  Ti prego di NON, ripeto NON iniziare nessuna localizzazione senza
  prima aver sentito i ``colleghi'' di queste mailing list, il tuo
  lavoro potrebbe venir vanificato in un secondo per un banale doppione.



  3.5.  Per maggiori informazioni


  Ulteriori informazioni possono essere recuperate nei seguenti testi:


    Linux Danish/International HOWTO
     <http://sunsite.unc.edu/LDP/HOWTO/Danish-HOWTO.html>

      stato il primo HOWTO che ha trattato il tema della
     nazionalizzazione di Linux, ed  tuttora un riferimento. A dispetto
     del nome  pi ``International'' che ``Danish'' visto che  in
     inglese...

    Un giro per  <ftp://sunsite.unc.edu/pub/Linux/utils/nls> 
     consigliato ai programmatori. In particolare consiglio la lettura
     del file locale-tutorial-0.8.txt.gz.

    Come gi detto, il sito ufficiale GNU dove potete trovare
     informazioni sulla localizzazione GNU e le definizioni di locale
     pi aggiornate  <ftp://dkuug.dk/i18n>.

     In particolare se volete tentare l'installazione manuale delle
     definizioni di locale potete prendere il materiale che trovate a
     <ftp://dkuug.dk/i18n/WG15-collection> e, ovviamente, leggere
     attentamente la documentazione allegata o i succitati testi.

    Maggiori informazioni sul formato dei Portable Object e sullo stato
     delle traduzioni possono essere trovate al sito
     <ftp://alpha.gnu.ai.mit.edu/gnu/po/> oppure
     <ftp://svpop.com.dist.unige.it:/pub/Linux/gnu/po> che ne  un
     mirror.

    Un URL mitico al riguardo, ottimo punto di partenza per ricerche
     sulla internazionalizzazione, 
     <http://www.vlsivie.tuwien.ac.at/mike/i18n.html>. Le pagine sono
     curate da Michael Gschwind, e sono una miniera di link per
     approfondire.



  4.  Altre localizzazioni



  Qui si vogliono trattare quelle localizzazioni che sono un po' pi
  hardware-dipendenti, meno standard e in particolar modo che riguardano
  i PC compatibili.  Molto probabilmente molte di queste cose non si
  applicano alle altre piattaforme su cui gira Linux, ne chiedo venia.
  Ma o mi regalate un PPC, una Sparc, un Alpha, un A4000, un MAC, ...
  oppure se avete altre note per queste piattaforme da aggiungere
  fatemelo sapere. ;-)



  4.1.  Font in console


  Linux permette di cambiare il font standard presente nella ROM della
  scheda video, in modo da avere il set di caratteri ISO-8859-1 completo
  a disposizione. La cosa pu essere semplicemente ottenuta con uno
  script del genere, da eseguire al boot (in Debian basta copiarlo nella
  directory /etc/rc.boot e renderlo eseguibile):


  ______________________________________________________________________
          #!/bin/sh

          # qualche variabile...
          #
          # font Latin1 (ISO-8859-1)
          CONSOLE_FONT=lat1u-16.psf
          # mappa nulla
          CONSOLE_MAP=trivial

          if [ -x /usr/bin/setfont ]; then
                  echo -n "Setting up ISO 8859-1 font"
                  setfont /usr/share/consolefonts/$CONSOLE_FONT
                  echo -n "."
                  mapscrn /usr/share/consoletrans/$CONSOLE_MAP
                  echo -n "."
                  for do
                          echo -ne '\033(B' > /dev/tty$N
                  done
                  echo ". done."
          fi
  ______________________________________________________________________



  Il primo comando carica un nuovo set di caratteri, il secondo permette
  di eseguire una traduzione ``al volo'' tra caratteri richiesti e
  voluti e il terzo rende attiva la nuova coppia tabella-tavola di
  traslazione in ogni console.

  Ad esempio di default non viene caricata nessuna tabella e viene
  eseguita la traduzione da Latin1 (quello che Linux vuole) a CP437
  (quello che il PC ha).  Ovviamente le manpages di setfont(1) e
  mapscrn(1) sono utili letture.



  4.1.1.  Debian


  Se si ha un sistema Debian 2.0 semplicemente il file /etc/kbd/config 
  il posto dove mettere la mappa dei caratteri ed il font da utilizzare:
  per l'italiano, la scelta giusta :


  ______________________________________________________________________
          CONSOLE_FONT=lat1u-16.psf
          CONSOLE_MAP=trivial
  ______________________________________________________________________



  (da Lorenzo Maria Catucci).



  4.1.2.  SVGATextMode


  Ma c' una soluzione pi elegante. Esiste un programma che si chiama
  SVGATextMode(8) che fa tutta una serie di operazioni sulla console
  testo molto simpatiche.

  Permette di definire dimensioni ``non standard'' per la console
  (diverse da 80x25, insomma), permette di alzare la frequenza di
  refresh del video di modo da stancare meno gli occhi, gestisce chipset
  avanzati...

  Ha un file di configurazione, /etc/TextConfig che ha una sintassi
  molto simile al file di configurazione di XFree e che permette in un
  sol colpo di definire il font da caricare. Ci penser poi il programma
  stesso ad attivare il font e renderlo disponibile.

  Basta modificare leggermente il file, facendo in modo che si presenti
  all'incirca come:


  ______________________________________________________________________
          [...]

          Option "LoadFont"
          FontProg "/usr/bin/setfont"
          FontPath "/usr/share/consolefonts"
          FontSelect "lat1u-16.psf"   8x16 9x16 8x15 9x15
          FontSelect "lat1u-14.psf"   8x14 9x14 8x13 9x13
          FontSelect "lat1u-12.psf"   8x12 9x12 8x11 9x11
          FontSelect "lat1u-08.psf"   8x8  9x8  8x7  9x7
          FontSelect "lat1u-08.psf"   8x32 9x32 8x31 9x31

          [...]
  ______________________________________________________________________



  e si ottengono magicamente i caratteri Latin1, e molto di pi.



  4.2.  Font in X


  Buona parte dei caratteri installati con X seguono lo standard Latin1,
  e idem i font PostScript normalmente reperibili (come quelli
  dell'ATM).

  Inoltre sta facendo la sua comparsa il primo font server TrueType; I
  font TrueType sono organizzati secondo un set di caratteri che  un
  superset del Latin1 (MicroSoft chiaramente fa sempre di testa sua, e
  mette caratteri dove lo standard lo vieta esplicitamente...), e quindi
  non dovrebbero dare problemi neanche loro.



  4.3.  Stampante e DOS


  Se stampate file DVI, PostScript o comunque in grafica, non ci sono
  problemi.  Ci penser il vostro programma per la stampa a convertire
  il vostro file nel formato matrice-di-punti pi consono alla vostra
  stampante.  Ma se volete stampare in puro testo, senza formattazioni?
  Resta, soprattutto per le stampanti ad aghi, il metodo pi veloce. Ma
  quanto  standard il set ISO-8859-1?

  ISO-8859-1  il set di caratteri di Unix in generale, di Windows,
  Amiga, OS/2. Mancano all'appello il DOS e Macintosh. Ma in DOS la
  CP850  in pratica il set Latin1, con i caratteri rimescolati un po'
  per essere compatibile verso il basso con la CP437.  Sentitevi liberi
  quindi da qualsiasi ``sindrome da 8 bit'', e usate tranquillamente
  questo set di caratteri.  Se dovete importare dei testi Linux in
  Macintosh, semplicemente usate il filtro per ``puro testo Windows'' o
  cose simili.

  Se volete stampare puro testo con le accentate da Linux, a questo
  punto non vi resta che provare una delle soluzioni seguenti:


    Se la vostra stampante supporta il set di caratteri ISO-8859-1,
     mettetela in quella modalit, e fatela finita una volta per tutte
     con le diatribe tra set di caratteri.

    Se la vostra stampante supporta la CP819, siete a cavallo visto che
     ``CP819''  il nome DOS del set di caratteri Latin1.


    Se la stampante supporta la CP850, mettetela in quella modalit e
     cercate il programma recode(1).  Si pu usare come
     recode latin1:cp850 file dove file  il file da convertire, che
     viene sovrascritto.  Per automatizzare la procedura si pu anche
     installare come filtro per la stampa.


    Se la stampante supporta solo CP437, o non volete/potete
     modificarla, non preoccupatevi, tanto comunque riuscite a stampare
     le cose ``normali'', come tutte le lettere accentate che trovate
     sulla tastiera e la lettera ``'' (questo perch, come gi detto
     CP850 e CP437 coincidono in corrispondenza di quei caratteri).


  Chiaramente, per le ultime tre soluzioni,  il caso di utilizzare
  anche da DOS (se avete un sistema dual boot) la CP819 o in mancanza
  d'altro la CP850; per configurare la gestione del set di caratteri
  DOS, leggete le manpage, hem (la forza dell'abitudine! O;) il manuale
  dei comandi COUNTRY e MODE CON.

  Inoltre se la confusione attorno alle sigle dei vari set di caratteri
  sale, potete anche leggere le man page ascii(7) e latin1(7).



  4.3.1.  Un esempio di filtro


  Per avere automaticamente la conversione, si pu utilizzare questo
  filtro:


  ______________________________________________________________________
          #!/bin/sh
          if /usr/local/bin/recode latin1:cp850
          then
                  exit 0
          else
                  exit -1
          fi
  ______________________________________________________________________



  potete salvare questo filtro come /usr/local/bin/iso2850 e poi dargli
  i permessi di esecuzione (chmod ugo+x /usr/local/bin/iso2850). ora non
  vi resta che aggiungere nel file di configurazione delle stampanti
  /etc/printcap:



  ______________________________________________________________________
          # esempio di filtro, sostituire ``lp2'' con il device corretto
          # i file log e acct vanno creati se utilizzati, nei contesti
          # normali non serve sapere chi usa e quante pagine stampa ogni
          # utente! ;)
          #
          cp850|dos:\
          :lp=/dev/lp2:\
          :sd=/var/spool/lp2:\
          :lf=/var/spool/lp2/log:\
          :af=/var/spool/lp2/acct:\
          :if=/var/local/bin/iso2850:\
          :sh:
  ______________________________________________________________________



  Ora, se la stampante  impostata per usare la codepage 850, basta un
  bel lpr -Pcp850 nomefile per stampare un file latin1 con tutte le
  accentate al loro posto.



  4.4.  libpaper


  Libpaper  una piccola libreria e un programmino che dovrebbe
  ``standardizzare'' la gestione dei formati di carta sotto linux.  In
  pratica fornisce delle funzioni da linkare al proprio programma che
  permettono di usare delle informazioni sul formato di carta
  centralizzate (prese da /etc/papersize o dalla variabile d'ambiente
  PAPERSIZE.

  In Debian  installata di default e gs la usa. Potrebbe essere una
  cosa utile, e va incentivata.

  Maggiori informazioni le potete trovare alla manpage di paperconf(1),
  ovviamente se avete libpaper installata nel vostro sistema.



  4.5.  Per maggiori informazioni



    Tocca ripetermi, e citare nuovamente le pagine di Michael Gschwind,
     ovvero  <http://www.vlsivie.tuwien.ac.at/mike/i18n.html>.



  5.  Ispell



  Esiste un vocabolario italiano per ispell(1) che trovate all'URL
  <ftp://ftp.pluto.linux.it/pub/pluto/ildp/ispell/>.  Anche se non 
  ancora perfetto,  gi pi che funzionante e pu essere
  tranquillamente usato.

  Nella distribuzione Debian  gi presente il pacchetto iitalian che
  installa e configura correttamente il vocabolario, pronto all'uso.

  Se vuoi collaborare a migliorare il vocabolario o la tavola degli
  affissi (per sapere cos' man 5 ispell), esiste una mailing list (che
  scherzosamente chiamo IspellIT!), che coordina gli sforzi.  Trovi
  maggiori informazioni nella sezione dedicata alle ``liste''.



  5.1.  Ispell e Emacs


  Per forzare il riconoscimento del nuovo vocabolario in emacs, occorre
  aggiungere questo nel proprio ~/.emacs


  ______________________________________________________________________
          (setq ispell-dictionary-alist
                  (append ispell-dictionary-alist
                  `(,(list
                    "italiano"
                    "[A-Za-z]"
                    "[^A-Za-z]"
                    "[---']" t nil "~list"))))
  ______________________________________________________________________



  dopodich, M-x ispell-change-dictionary Invio Spazio ti mostra un
  completion buffer che contiene la magica parola, ``italiano'' (da
  Giacomo Boffi).

  Questo per non  perfetto nel senso che ho idea che Emacs legga prima
  il ~/.emacs e poi crei i men; infatti la voce aggiunta appare in
  testa al sotto men e non alla fine come vorrei io.  Secondo me pi
  robusta sarebbe la soluzione di far modificare l'ispell-mode.el per
  fargli aggiungere anche l'italiano fra le lingue supportate (da
  Giovanni Bortolozzo).



  5.2.  Per maggiori informazioni



    Responsabile del progetto IspellIT!  Sandro Dentella
     (sandro@crcc.it), puoi contattare lui per ulteriori informazioni.

    Sembra che qualcun altro si stia divertendo con vocabolari e
     tabelle degli affissi, infatti c' un secondo vocabolario sulla cui
     qualit per non mi sbilancio, non conoscendolo.   possibile
     recuperarlo all'URL
     <http://www.mrg.dist.unige.it/~marco/ispell.html>.

    Inoltre anche un giretto per la Ispell Home Page <http://ficus-
     www.cs.ucla.edu/ficus-members/geoff/ispell.html> non  una cattiva
     idea.



  6.  TeX



  TeX non  una applicazione specifica per Linux, anzi, forse  una
  delle applicazioni utilizzabili nel maggior numero di sistemi... ma
  d'altro canto TeX  una delle applicazioni pi usate, e ho quindi
  ritenuto argomento ``critico'' il produrre documenti TeX correttamente
  localizzati.


  6.1.  Un po' di teoria...


  Il TeX  in pratica un linguaggio di programmazione. Scritto un file
  in un determinato formato, si pu compilare e quello che si ottiene 
  un file ``oggetto'', ovvero un file intermedio, in un formato detto
  DVI, ovvero DeVice Indipendent format, da cui si ottiene un file in
  linguaggio per le stampanti, di solito un file PostScript.

  TeX  un ottimo programma per l'impaginazione di libri. La sua nascita
  nel grande mondo del free software lo ha velocemente indirizzato verso
  le pubblicazioni tecniche, scientifiche ma anche quelle multilingue.
  Inoltre permette una potente gestione degli indici e dei riferimenti,
  nonch estensioni per la gestione dei riferimenti bibliografici.


  Un file sorgente di TeX  un file testo (come tutti i linguaggi di
  programmazione) con delle istruzioni aggiuntive (che iniziano per
  ``\'') che spiegano al programma come organizzare l'output.


  Come tutti i buoni compilatori, piano piano  stato dotato di
  librerie, chiamate package che ne estendono le funzionalit.  Le pi
  note sono il LaTeX, che definisce un insieme di stili tipografici per
  fare libri, articoli e lettere, con tutti gli elementi importanti di
  questi stili (titoli per libri e articoli, indirizzi per le lettere)
  gi predefiniti e pronti all'uso.  Esistono poi parecchie estensioni
  al LaTeX, le principali sono l'AMSLaTeX, che permette di ampliare di
  molto la gi completa gestione di equazioni matematiche del TeX (per
  la cronaca, quasi tutti i libri di matematica in commercio sono fatti
  in TeX) e Babel, che definisce la gestione di diverse lingue, anche
  contemporaneamente sullo stesso documento.

  Come per Linux stesso, di TeX ce n' uno solo, ma visto che ha bisogno
  comunque di librerie di font, programmi accessori... di distribuzioni
  ce ne sono tante.  Si prende in considerazione qui la distribuzione
  teTeX.



  6.1.1.  Il formato del file


  Un file TeX  composto da un preambolo che definisce lo ``stile'' con
  cui  impaginato il testo e da un corpo, che comprende sia il testo
  che le formattazioni. Il corpo  quello che va dal comando
  \begin{document} al comando \end{document}, quello che c' sopra  il
  preambolo, mentre quello che c' dopo viene ignorato.

  Nel preambolo vengono definite:



     Classe
        (o Stile, in LaTeX2.09) Definisce lo stile del documento, ovvero
        se deve essere un libro (book), lettera (letter), articolo
        (article), ...


     Opzioni
        definisce sia le opzioni interne, ovvero quelle delle varie
        classi (dimensione dei caratteri in punti, dimensione della
        carta, ...), sia i pacchetti (package) o stili aggiuntivi
        esterni, come il Babel stesso e il supporto per le accentate.


     Altro
        altre cose fanno parte del preambolo, come definizioni
        aggiuntive e strutture particolari, ma che ai fini del nostro
        studio sono inessenziali.


  La definizione  quindi del tipo:


  ______________________________________________________________________
          % Questo  il preambolo

          % Questa  la definizione della classe e le sue opzioni
          \documentclass[opz1, opz2, ...]{classe}

          % Questo  il caricamento dei pacchetti e le loro opzioni
          \usepackage[opz1, opz2, ...]{pacchetto1}
          \usepackage[opz1, opz2, ...]{pacchetto2}
                  .
                  .
                  .

          % Qui inizia il testo
          \begin{document}

          [...]

          \end{document}
  ______________________________________________________________________



  Si vede come nel LaTeX2e ci sia separazione logica tra le opzioni
  dello stile, o classe, e dei pacchetti aggiuntivi, cosa preferibile
  visto il proliferare di nuovi pacchetti e estensioni.



  6.2.  L'installazione TeX di Linux


  Tutta l'installazione del TeX di Linux si trova in /usr/lib/texmf e
  subdirectory.



  6.2.1.  Configurazione di teTeX


  Per la configurazione di teTeX  sufficiente eseguire il programma di
  utilit texconfig(1).  Le voci da (eventualmente) modificare sono:



     HYPEN
        permette di modificare le tabelle di sillabazione attive:
        selezionata questa opzione si entra automaticamente in un editor
        (di solito vi(1)) ed occorre ``scommentare'' (eliminare il
        carattere di commento ``%'') di fronte alla riga italian
        ithyph.tex; dopo aver salvato il file ed essere usciti (con
        [Esc] [:] [w] [q] [Invio] se si tratta di vi) vengono
        automaticamente rigenerati i file di formato.

     MODE
        permette di scegliere la configurazione per la propria
        stampante: ATTENZIONE che questo non configura la stampa vera e
        propria, ma solo il modo di default con il quale vengono
        generati i font da dvips; quindi scegliete come valore la
        risoluzione maggiore che riuscite ad ottenere dalla vostra
        stampante o da tutte le stampanti che usate con il vostro
        computer


     XDVI
        permette di scegliere la dimensione di carta di default e fare
        delle prove di stampa e di resa;  sufficiente scegliere
        l'opzione ``a4''


     DVIPS
        permette di definire anche qui il formato della pagina, gli
        offset sulla pagina stessa (zone di non stampabilit), il modo e
        la stampante di default; permette di fare la stesa operazione
        per un certo numero di stampanti addizionali


  Alla fine di questa semplice operazione avrete la vostra installazione
  di TeX perfettamente funzionante.



  6.2.2.  Configurazione delle altre distribuzioni di TeX


  Per le altre distribuzioni di TeX presenti nelle vecchie distribuzioni
  di Linux occorre al contrario del teTeX, editare e ricompilare a mano
  i file di formato (pi o meno ;).  Non  una operazione semplice,
  troverete maggiori informazioni presso la documentazione allegata alla
  vostra distribuzione di TeX.



  6.2.2.1.  NTeX


  Una nota  da fare sulla distribuzione NTeX, che dalla versione 2.X.X
  e successive (non quindi quella contenuta nelle vecchie slackware...)
  contiene un programma di configurazione basato su una bella
  interfaccia grafica in Tcl-Tk. All'uscita dall'interfaccia grafica si
  ha un sistema TeX perfettamente funzionante e configurato,
  sillabazione compresa.

  C' da dire che le distribuzioni non usano pi NTeX, probabilmente
  perch NTeX  cresciuta oltre modo (pi di 160 MB, senza supporto per
  il giapponese!).  Il riassunto  che, almeno fino all'uscita di teTeX
  1.0 (che non ho idea come sar strutturato), NTeX rappresenta una
  alternativa per esperti, che hanno bisogno di supporto per lingue poco
  diffuse od oscure (da Stefano Miccoli).



  6.2.2.2.  teTeX di Slackware 3.3


  Attenzione che il teTeX fornito con la Slack 3.3 ha un'imprecisione:
  nel file italian.ldf di Babel devi definire a mano la traduzione per
  la parola ``Dimostrazione'' che  lasciata all'inglese ``Proof'' (se
  ti serve l'ambiente proof nei tuoi documenti) (da Enrico Cavalli).

  6.2.3.  La sindrome di Zio Paperone


  La tabella di sillabazione italiana presente nelle distribuzioni
  diverse da teTeX pu essere vecchia o sbagliata. Cercate nelle
  sottodirectory di /usr/lib/texmf il file hyphen.italian o ithyph.tex.
  Se  gi presente, controllate ( un file di testo, usate pure
  less(1)!!!) che NON sia la tabella di sillabazione di G. Patergnani.
  Questa soffre di quella che io scherzosamente chiamo ``sindrome di Zio
  Paperone'', ovvero tende a mandare a capo malamente i suoi nipoti (qu-
  i, qu-o, qu-a).

  Altrimenti, se la tabella non esiste o  quella del Patergnani,
  prendete il file aggiornati dai siti CTAN, uno per tutti
  <ftp://ftp.dante.de/>.



  6.3.  Produzione di elaborati TeX ben localizzati


  Ora, dopo tutte queste disquisizioni, abbiamo capito che c' bisogno
  di:



     A4 Ovvero per stampare decentemente sulla nostra stampante.


     InputEnc
        Ovvero il supporto per le lettere accentate direttamente
        all'interno del file LaTeX, per evitare di ricorrere a pesanti
        sequenze di comandi.


     Babel
        Per il supporto della sillabazione italiana e di altre cose
        simpatiche senza stravolgere completamente la configurazione del
        TeX.



  6.3.1.  Stampa di testi in inglese


  Piacerebbe avere l'opzione della dimensione del foglio A4 definita
  direttamente a livello di TeX, visto che  il nostro standard.  Questa
  operazione, anche se possibile,  sconsigliata. In TeX la
  formattazione di certi documenti dipende fortemente da margini e
  dimensione della carta.  Cambiare uno di questi parametri senza
  rivedere il layout del documento potrebbe portare a delle emerite
  schifezze (figure sovrapposte, ...).  Quindi, se vogliamo stampare dei
  testi in inglese, dobbiamo reperire i sorgenti in TeX, editare il
  file, aggiungendo nel preambolo l'opzione:


  ______________________________________________________________________
          \documentclass[opz1,opz2,...,a4paper]{classe}
  ______________________________________________________________________



  e magari controllare con un previewer come ghostview, prima di
  stampare, che l'output sia accettabile.

  6.3.2.  Composizione di testi in italiano


  Se invece stiamo costruendo un nuovo testo, e vogliamo che tutto
  funzioni alla perfezione,  sufficiente che il preambolo sia del tipo:


  ______________________________________________________________________
          \documentclass[opt1,opt2,...,italian,a4paper]{classe}
          \usepackage{babel}
          \usepackage[latin1]{inputenc}
  ______________________________________________________________________



   bene mettere l'opzione ``italian'' come globale, visto che potrebbe
  essere utilizzata da altri pacchetti.

  Inoltre per un maggiore ordine nella sillabazione, e molti altri buoni
  motivi (tra cui le guiellmots )  bene adoperare anche un:


  ______________________________________________________________________
          \usepackage[T1]{fontenc}
  ______________________________________________________________________



  che permette di utilizzare i nuovi font ``ec'' in luogo dei vecchi
  ``cm'' di Knuth (da Lorenzo Maria Catucci).



  6.4.  Per maggiori informazioni


  Se avete intenzione di stampare semplicemente dei file TeX, queste
  conoscenze sono sufficienti.

  Ulteriori informazioni possono essere reperite nella (nutrita!)
  documentazione che viene allegata alla distribuzione teTeX, e che
  potete trovare nella directory /usr/lib/texmf/doc oppure facendo
  riferimento al teTeX HOWTO <http://sunsite.unc.edu/LDP/HOWTO/TeTeX-
  HOWTO.html>, anche in versione italiana
  <http://www.pluto.linux.it/ildp/HOWTO/TeTeX-HOWTO.html>.

  Se invece avete intenzione di proseguire nella conoscenza del TeX,
  sono consigliabili, in particolare, i libri:


    Donald Knuth, The TeXbook, Addison-Wesley, 1992

    Leslie Lamport, LaTeX User's Guide and Reference Manual, Addison-
     Wesley, 1994


    Helmut Kopka, Patrick Daly, LaTeX Guide, Addison-Wesley, 1994

    AMS-LaTeX Version 1.1 User Guide, American Mathematical Society,
     1991

    Norman Walsh, Making  TeX Work, O'Reilly & Associates

    Tobias Oetiker, The not so short Introduction to LaTeX2e (or
     LaTeX2e in 69 minutes)
     ovvero il file /usr/lib/texmf/doc/latex/general/lshort2e.dvi, da
     cui si impara pi che dal Lamport, risparmiando giorni di studio
     (da Lorenzo Maria Catucci).

  E in particolare in italiano...


    Gianni Gilardi, Il TeX, Introduzione al linguaggio e complementi
     avanzati, Zanichelli/Decibel

    Claudio Beccari, LaTeX, Guida ad un sistema di editoria
     elettronica, Hoepli Milano

    Marc Baudoin, Impara LaTeX!,
     <http://yamaha.cefriel.it:8080/~cannarsi/documents.html>

     Si tratta di una traduzione di ``Apprends LaTeX!'', realizzato da
     Marc Baudoin e in uso in numerose scuole francesi nonch in vari
     laboratori di ricerca. Ha il pregio, oltre all'essere di libero
     dominio e in italiano, di permettere un apprendimento molto rapido
     di Latex e cominciare da subito a scrivere i propri documenti, come
     l'autore ed io abbiamo avuto modo di constatare dal 94 (prima
     versione) ad oggi presso l'Ecole nationale superieure de techniques
     avancees.

      anche possibile scaricare la versione PostScript al sito:
     <ftp://ftp.pluto.linux.it/pub/ildp/misc/impara_latex/>.

    Davide G. M. Salvetti, TEX.ITA FAQ,
     <http://space.tin.it/io/dsalvett/TeX-FAQ/TeX-FAQ.html>

     Sono le FAQ dell'area UNIX.ITA di rete FidoNet, una ottima FAQ e un
     buon punto per iniziare successive ricerche.

    Esiste anche questo link,
     <http://www.fi.infn.it/pub/tex/doc/html/latex.html>, anche se non
     ho avuto modo di vederlo e valutarne la qualit.



  7.  Siamo in Europa, bellezza!


  Il che comporta che a breve dovremmo ``scalciare'' via dalla tastiera
  e dai nostri font alcune simboli per fare spazio ai nuovi arrivati (il
  simbolo dell'euro e dei centesimi di euro, in particolare).

  Gi che c'erano, sembra si stiano mettendo d'accordo (a livello di ISO
  <http://www.iso.org/>, International Standard Organization) per fare
  un unico font che vada bene a tutte le nazioni europee, comprese
  quelle che dovrebbero entrare a breve.  Si vocifera di un nuovo font
  ISO-8859-15 (soprannominato Latin0), e quindi  probabile che tra un
  po' toccher cambiare tutto...

  Ma noi aspettiamo fiduciosi! ;)


  7.1.  Per maggiori informazioni


  Questa sezione dovrebbe espandersi sempre pi, nei prossimi anni; per
  ora non mi sbilancio e lascio solo dei riferimenti ad altri documenti.



    Si possono trovare informazioni sul nuovo font ``europeo'' all'URL
     <http://www.iso.ch/cate/d29505.html>.

    Altre informazioni sui set di caratteri e affini possono essere
     recuperate all'URL  <http://czyborra.com/charsets>.

    Per il TeX appaiono i primi font con il simbolo, basta dare una
     occhiata a  <ftp://ftp.dante.de/tex-archive/fonts/euro>.



  8.  TimeZone


  La TimeZone, ovvero il fuso orario corretto per l'Italia  GMT-1
  d'inverno e GMT-2 d'estate, ovvero GMT-1 per l'ora solare e GMT-2 per
  l'ora legale.  Oppure MET o CET (Middle o Central Europe Time), che in
  aggiunta fanno anche il passaggio automatico ora legale/ora solare.
  Notare che MET  il vecchio nome caduto in disuso, e non dovrebbe
  essere usato.

  Ogni distribuzione ha il suo programmino per definire la timezone in
  maniera automatica. In Debian solitamente viene chiesto in fase di
  installazione, e non si pu sbagliare (l'unica opzione utilizzabile 
  Europe/Rome, evidentemente, e per fortuna, in Debian sono impermeabili
  alle ultime mode secessioniste ;).

  Di solito negli ambienti UNIX si preferisce impostare l'ora del CMOS a
  GMT e quindi avvisare clock(1) di questo con l'opzione ``-u ''; questo
  per di solito entra in conflitto con la gestione dell'ora di Windows,
  che invece insiste a modificare brutalmente l'ora CMOS.

  Vedete voi cosa  meglio fare, Debian in fase di installazione chiede
  quale delle due modalit usare di default e configura di conseguenza.
  Come sempre man clock per saperne di pi.



  8.1.  Q: ma perch Linux mi ha sbagliato il passaggio di fuso?!


  Faccio notare che nel '96 sono cambiate le regole per la
  determinazione del passaggio ora legale/ora solare. Le nuove regole
  dovrebbero essere presenti nelle nuove distribuzioni, o comunque
  reperibili in rete.


  8.2.  Q: ma perch ho l'ora impostata a CEST?


  Perch  estate, CEST sta per ``Central Europe Summer Time''. O
  meglio,  in vigore l'ora legale, ma  pi bello pensare all'estate!



  9.  Documentazione



  9.1.  Pubblicazioni offline (su carta... ;)


  Questa vuole essere una piccola bibliografia per chi inizia a
  conoscere Linux.

  Per l'utente medio sono pi che sufficienti i testi liberamente
  reperibili in rete, come i libri del LDP e gli HOWTO.  Per un utente
  pi attento pu essere utile un approfondimento, anche perch buona
  parte degli argomenti su Linux riguardano UNIX in generale, come
  l'amministrazione di sistema, la gestione di una rete e via dicendo.

  Ho rimosso la bibliografia in inglese, questo perch la sentivo poco
  consona a questo HOWTO; e poi oramai non  cos difficile trovare un
  buon testo su UNIX/Linux in Italiano. Se siete alla caccia di una
  buona bibliografia su UNIX potete dare una occhiatina alla FAQ
  dell'area di discussione di FidoNet UNIX.ITA nel sito
  <http://www.fidoitalia.net/echo/faq/unix/indice.htm>, oppure se
  cercate riferimenti a tutti i libri su Linux potete dare una occhiata
  anche a  <http://www.psci.net/~dbklem/books.html> o anche a
  <http://shell.nanospace.com/~markst/linux/>.

  Difficile fare invece un ``censimento'' di tutto il materiale
  reperibile in rete. Ho cercato, soprattutto, di mettere le fonti di
  informazioni pi importanti, o quelle pi vicine a noi.

  Questo elenco non aspira a essere completo, tutt'altro. Come sempre
  sono felicissimo di ricevere suggerimenti, correzioni e aggiunte.



  9.1.1.  Libri



    D. A. Tauber, Guida a Linux, McGraw-Hill Italia, ISBN:
     88-386-3406-8.

     Contiene un CD-ROM.

    Giuseppe Zanetti, LINUX - il sistema operativo free software per
     personal computer 386/486, edizioni Libreria Progetto, Padova,
     1996.

     Poco pi di 300 pagine, simpatica copertina a colori col logo di
     Linux creato da Rohde-Hass. Se volete contattare l'autore, scrivete
     a beppe@freddy.iperv.it.

     Ne  uscita una nuova versione che ho solo visto di sfuggita, ma
     che  visibilmente pi grossa della precedente; infatti  stato
     aggiunto un corposo capitolo sul TCP/IP.


    Luca Righi, LINUX, Jackson, 1996.

     Contiene un CD-ROM.

    Naba Barkakati, I segreti di Linux, Apogeo, 1996, 800 pp., ISBN:
     88-7303-191-9.

     Contiene un CD-ROM con Linux Slackware 3.0 e altre utility.


    Richard Petersen, Guida completa a Linux, McGraw Hill, 1996, 721
     pp.

      una guida completa completa! In allegato CD-ROM con distribuzione
     RedHat e Caldera Network Desktop. ;-) (da Daniele Sanna)

    Baffa, Calculli, Internet: manuale avanzato.

     Un buon libro che, a dispetto del titolo, parla quasi solo di
     Linux, e include un CD-ROM con la distribuzione Slakware.  (da
     Gianni Comoretto)

    Olaf Kirch, Linux guida per l'amministratore di rete, Jackson
     Libri.

      la traduzione del libro O. Kirch, Linux Network Administrator's
     Guide, O'Reilly & Associates.  Eccezionale. (da Ermenegildo Colpo)

    M.Welsh, L.Kaufman, Il Manuale di Linux, Jackson Libri.

     Traduzione del ``Running Linux'' di Welsh-Kaufman (da S. Crespi
     Reghizzi)

    Progetto ILDP, Linux HowTo, Apogeo, 1996, pp 960, ISBN
     88-7303-317-2.

     I piu' importanti Howto di Linux interamente in italiano, tradotti
     (buona parte) e revisionati (tutti) dal gruppo Pluto.

    David Pitts, RedHat Tutto e Oltre, Apogeo e SAMS Publishing.

     Il libro fornisce informazioni su tutto ci che  il pacchetto
     Linux e suoi svariati utilizzi, trattando dettagliatamente tutto
     ci che riguarda la reti ed internet in particolare. Consigliato a
     chi si avvicina a Linux per la prima volta, ed anche ai pi
     esperti, per la precisione e la completezza con cui vengono
     trattati i vari argomenti, a mio giudizio un ottimo manuale di
     riferimento. Il linguaggio  di facile comprensione, aiutato da
     esempi e parti di codice ben spiegate (da Osvaldo Tulini).

    Witherspoon, Hall, Linux For Dummies, Apogeo.

     Linux For Dummies  al contrario un ottimo testo che spiega, in
     termini semplici e con un ``piglio'' tipicamente da bigino (chi non
     ne ha mai usato uno a scuola?), tutto quello che c' da sapere per
     far funzionare il sistema operativo in maniera decente.  L'utente
     inesperto, che grazie a quel libro riuscir a muoversi da solo nel
     sistema operativo, potr poi approfondire gli argomenti pi
     delicati (da Paolo Besser).

    Linux For Dummies - Espresso, Apogeo.

     Veloce prontuario per le operazioni pi semplice e frequenti (da
     Fabio).


  9.1.2.  Riviste


  Sono ormai molte le riviste di informatica che hanno una rubrica fissa
  su Linux o che distribuiscono dei CD con materiale Linux; molto spesso
   il metodo pi semplice per venire in possesso di un CD con Linux.

  Non sono abbonato a nessuna di queste riviste, quindi le informazioni
  che sono qui presenti sono, per forza, approssimative; ricevo
  volentieri, quindi, integrazioni.


    Dev, Infomedia <http://www.infomedia.it>.

     Ha una rubrica fissa o comunque pubblica in ogni numero articoli su
     Linux, oltre a CD (da Marco d'Itri).

    Login, Infomedia <http://www.infomedia.it>.

     La rivista esiste da circa due anni e mezzo, e ogni anno pubblicano
     3 cd, di cui uno  sempre dedicato ad una distribuzione Linux (da
     Marco Marongiu).

    Computer Programming, Infomedia <http://www.infomedia.it>.

     Spesso sono presenti articoli che trattano problemi di
     programmazione sotto Linux/UNIX.


    MC MicroComputer, Technimedia.

     Da sempre ha avuto ``l'AngoLinux'', ora la rubrica  stata ampliata
     (da Dario Burnelli).

    Computer Shopper.

      in edicola una nuova rivista (COMPUTER SHOPPER, in italiano)
     nella quale scrivo ogni mese una rubrica tutta per Linux (dovrebbe
     partire da zero con l'installazione per trattare via via argomenti
     pi tecnici).

     Se qualcuno l'ha avuta tra le mani, sappia che sono sempre
     interessato a ricevere commenti e soprattutto critiche sui pezzi
     (da Ubi, ubi@srd.it).

    Inter.Net.

     Pubblica spesso CD con distribuzioni Linux e altre cose che  un
     po' difficile reperire altrimenti.

    IoProgrammo <http://gol.diemme.it/ioprogrammo>.

     Idem a sopra, ogni tanto pubblica CD con materiale Linux.

    PC Inter@ctive, Mondadori Informatica.

     Abbiamo iniziato a dedicare uno spazio fisso a Linux sul nostro
     giornale: un esperimento, vediamo un po' le reazioni dei lettori
     (da Marco Mazzei).

    PC Action, Xenia On Line.

     Scrivo sulle riviste del gruppo Xenia Edizioni da molti anni ormai
     e, dopo mesi di trattative e rimandi, sono finalmente riuscito ad
     ``accaparrarmi'' un po' di spazio su PC ACTION e sul relativo CD da
     dedicare a Linux.

     Ogni suggerimento  ovviamente ben accetto, mandatemelo per favore
     alla casella di posta personale paolone@besser.it (da Paolo
     Besser).



  9.2.  Pubblicazioni online


  All'inizio c'era il nulla. Poi pian piano, i volenterosi, hanno
  cominciato a pubblicare delle FAQ (ovvero a raccogliere le domande
  fatte pi spesso in modo che non siano pi poste...).  Da questo
  stadio poi  partito un vero e proprio ``progetto editoriale'' su
  Linux.

  Ora, dopo parecchi anni, il ``panorama'' editoriale online su Linux 
  ricco e ben organizzato; punto di riferimento  LDP, ovvero Linux
  Documentation Project, il progetto internazionale di documentazione su
  Linux che ha realizzato un grande numero di documenti, dai veloci
  mini-HOWTO, ai seri HOWTO, fino a veri e propri libri come le guide.
  Tutto il materiale LDP  liberamente reperibile in rete. Il sito
  madre, come per molto altro materiale Linux,  sunsite
  <http://sunsite.unc.edu/>. Pi precisamente il materiale  disponibile
  in versione HTML online all'indirizzo  <http://sunsite.unc.edu/LDP/>,
  e negli altri formati all'url
  <ftp://sunsite.unc.edu/pub/Linux/docs/>. Molti siti, anche italiani,
  fanno il mirror di sunsite; ne trovate alcuni in fondo a questo HOWTO.



  9.2.1.  Italian Linux Documentation Project


  Con molta fantasia si chiama ILDP, ovvero Italian Linux Documentation
  Project il progetto, lanciato dal gruppo Pluto, di tradurre gli HOWTO.
  Partiti da questa idea iniziale, si  poi fatto molto di pi arrivando
  a tradurre le guide e perfino a creare dal nulla ottima
  documentazione.


    Sono stati tradotti un buon numero di HOWTO e ormai si  nella fase
     di ``mantenimento'' del materiale tradotto.  Il progetto ILDP
     comunque cerca volontari per tradurre e mantenere aggiornati gli
     HOWTO.

     Se vuoi collaborare, contatta il coordinatore Giovanni Bortolozzo
     (borto@pluto.linux.it).

    Sono state tradotte una quantit consistente di manpage, e anche
     qui si  ormai nella fase di mantenimento, almeno per quanto
     riguarda le sezioni ``critiche'' (1, user commands).

     Anche qui se vuoi collaborare contatta Alessandro Rubini
     (rubini@pop.systemy.it).

    Sono state tradotte la Guida dell'Utente
     <http://www.pluto.linux.it/ildp/guide/GuidaUtente> e si sta
     lavorando sulle altre guide, che trovate su
     <http://www.pluto.linux.it/ildp/guide>.

     stata creato ex-novo ``AppuntiLinux''.

  Per collaborare puoi inoltre iscriverti alle ``liste di discussione'',
  in particolare ``it'' e ``pluto-ildp''.

  Tutto il materiale tradotto  reperibile online all'indirizzo
  <http://www.pluto.linux.it/ildp/> e negli altri formati all'indirizzo
  <ftp://ftp.pluto.linux.it/pub/ildp/>, o comunque in uno dei numerosi
  mirror di questo sito che stanno nascendo come funghi.



  9.2.2.  AppuntiLinux


  AppuntiLinux <http://www.pluto.linux.it/ildp/AppuntiLinux/index.html>
   un ottimo esempio di documentazione autoprodotta, e rappresenta un
  testo da consigliare vivamente a chi si avvicina per la prima volta a
  Linux, visto che si configura come un ``corso'' che aiuta a muovere i
  primi passi in Linux.

  Potete trovare AppuntiLinux negli altri formati
  <ftp://ftp.pluto.linux.it/pub/ildp/AppuntiLinux> a questo URL.
  9.2.3.  Riviste/fanzine


  Sono riviste elettroniche (fanzine, da fan+magazine, giornaletti
  autoprodotti ``in casa'') di ottima qualit (mediamente), ed alcune
  con una consolidata tradizione alle spalle.


    PLUTO Open Journal, Pluto User Group.

     Il PLUTO Open Journal  una rivista interamente in italiano e
     completamente gratuita. La rivista tratta argomenti inerenti Linux
     ed  completamente fatta da volontari di tutta Italia.

      consultabile on-line all'indirizzo URL:
     <http://www.pluto.linux.it/journal> e tutti i mirror PLUTO.  
     reperibile anche in versione .tar.gz per una comoda lettura off-
     line all'url  <ftp://ftp.pluto.linux.it/pub/pluto/journal> oppure
     (con una settimana di ritardo ;) in f'req al nodo FidoNet
     2:333/1016 (con estensione .tgz invece che .tar.gz per
     compatibilit con i sistemi DOS.

    Linux Gazette Edizione Italiana, LUGBari.

     LGEI, come tradisce il nome,  una fanzine su Linux in italiano che
     contiene per la maggior parte (ma non solo) articoli che sono una
     traduzione di quelli della Linux Gazzette statunitense.

      reperibile all'URL  <http://www.officine.it/lgei/>.

    LinuxFocus.

     All' URL  <http://mercury.chem.pitt.edu/~angel/LinuxFocus> potete
     trovare l'edizione italiana del magazine on-line ``LinuxFocus'' (da
     Seipse).

    AscoLinux Journal, LUG Ascoli.

     Il LUG Ascoli ha pubblicato sul Web il proprio giornale all URL
     <http://www.rinascita.it/ascolinux>.  Trattasi di AscoLinux
     Journal, una raccolta di articoli scritti in maniera molto
     ``leggera'' (con contenuti elementari, direi) da noi per far
     avvicinare i concittadini alle iniziative del LUG.  L'idea che
     vogliamo realizzare  quella di fare in modo che la gente, anche se
     non esperta di informatica, possa capire che cosa  possibile fare
     con linux, e in che modo si pu fare!

    LinuxValley Journal, LinuxValley.

     Altra fanzine, nata dallo scisma all'interno di LGEI;  reperibile
     all'URL  <http://www.linuxvalley.com/lvj>.



  9.3.  Distribuzioni in Italiano


  Ebbene s, si pu cominciare a parlare di distribuzioni in Italiano!!!

  Ma sfogo la mia amarezza dicendo che solo Debian ha un approccio
  ``serio'' alla localizzazione di una distribuzione...  Mentre Debian
  ha creato un gruppo per l'internazionalizzazione e da questo dei
  gruppi locali uno per ogni lingua, e sta cercando di fornire una
  localizzazione completa (programma di installazione, documentazione,
  cataloghi dei programmi, vocabolario per ispell, ...) le distribuzioni
  commerciali spesso considerano ``distribuzione in Italiano'' una
  distribuzione in inglese, con localizzazione mancante o non
  funzionante, il programa di installazione con le descrizioni dei
  pacchetti in italiano e un manuale (sempre di installazione) in
  italiano.

  Contando che tutto il materiale italiano inserito in Debian  PLUTO o
  GNU, non c' scusante a questa, per me barbara, politica...


    Slackware, Infomagic <http://www.infomagic.com/>.

     pubblica in Italia un cofanetto con dei CD che ha la copertina in
     Italiano, e mi sembra il (breve) manualetto di installazione
     all'interno pure.  Non so che cosa ci sia in italiano oltre a
     queste cose, e chiedo conferme.

    Debian, Debian <http://www.debian.org/>.

     Oltre alla Debian ``pulita'', che gi contiene molte cose in
     Italiano (manpage, gli HOWTO, i PlutoJournal e il vocabolario per
     ispell), da una collaborazione tra ProSA S.r.L
     <http://www.prosa.it> e Athena S.r.L <http://www.mondolinux.com> 
     nata ``Athena Debian 2.0 Linux - powered by ProSA'', una Debian 2
     con installazione parzialmente semplificata e in italiano, che
     verr commercializzata con una copia su carta degli
     ``AppuntiLinux''.

     Per maggiori informazioni fate riferimento ai due URL qui sopra.

    Caldera, Caldera Inc. <http://www.caldera.com/>.

     tra poco dovrebbe uscire una versione di Caldera Open Linux Base
     con installazione e manuale in italiano, e tra un po' dovrebbe
     essere prodotto un corso interattivo (tutorial) in italiano.

    SuSE, SuSE <http://www.suse.com/>.

     Dopo la mitica Debian Pluto in Italiano  uscita la prima
     distribuzione commerciale in Italiano si tratta della ormai famosa
     SuSE 5.2 (falso, la prima  la Caldera, ndr).  Mi  arrivata ieri e
     ho prontamente installato, naturalmente il supporto italiano 
     limitato all'installazione e al sistema di gestione denominato
     Yast. Ci sono dei curiosi errori di traduzione, ma mai quanti
     quelli di sistemi pi blasonati quali AIX (hard disk = disco duro
     :-) (da Gabriele Paciucci).

     Ha un manuale in Italiano un po' ridotto (spiega l' installazione e
     poco altro), e poi c' la guida completa in Inglese che ti spiega
     tutti i perch e i per come. (da un anonimo S.u.S.E. Linux 5.1
     User).



  9.4.  Altro materiale in Italiano



  9.4.1.  Fortune in Italiano


  Esiste una collezione di ``fortune'' in italiano; le fortune sono
  frasi che vengono stampate automaticamente nella fase di login dal
  programma fortune(1).


  Maggiori informazioni si possono avere al sito
  <http://www.pluto.linux.it/~zuse/fortune.it> o scrivendo all'autore
  Andrea `Zuse' Balestrero <mailto:zuse@pluto.linux.it>.



  9.4.2.  Linux FAQ


  Con questa guida mi propongo di riunire all'interno di un unico
  documento in Italiano, informazioni che possano essere utili a coloro
  che vogliono avvicinarsi a questo ottimo sistema operativo e nello
  stesso tempo fornire delle notizie che possano essere utilizzate dai
  system integrator per giustificare la scelta di Linux all'interno di
  un'azienda.

  Una versione pi o meno aggiornata di questa guida  disponibile nei
  newsgroup it.faq e it.comp.linux e su
  <http://www.pluto.linux.it/ildp/FAQ> (da Marco Iannacone).



  10.  Linux in Italia



  Questo spazio vuole essere un tentativo di censimento della realt
  Linux in Italia, un tentativo perch questa  una realt in
  velocissimo movimento...


  10.1.  Associazioni, gruppi di utenti


  Il mondo Linux in Italia sta subendo una crescita impressionante, cosa
  che stupisce anche noi che... in queste cose ci crediamo!

  Oltre a ILS (che  una associazione vera e propria, con statuto,
  assemblea e quota associativa) e il PLUTO (che  il gruppo pi noto e
  attivo, gruppo che coordina le ``traduzioni'' e pubblica il
  ``PlutoJournal'' tra le altre cose...)  esistono una miriade di LUG
  locali sparsi per tutta Italia...


  10.1.1.  PLUTO


  Il Pluto, definito recursivamente come ``Pluto Linux/Lumen Utentibus
  Terrarum Orbis'',  nato nel 1992 per iniziativa di alcuni studenti e
  professori di Informatica dell'Universit di Padova.

  Da allora il Pluto  cresciuto in maniera esponenziale estendendosi su
  tutto il territorio nazionale ed oltre, e costituisce il pi grande ed
  attivo LUG (Linux User Group) di lingua Italiana.

  Lo scopo del Pluto  di diffondere l'uso del Sistema Operativo Linux
  attraverso l'opera volontaria e non retribuita dei suoi membri/soci.
  Per conseguire il suo scopo, il Pluto:


    Sostiene e diffonde lo sviluppo del Software Free e della sua
     filosofia.

    Produce, traduce e diffonde la documentazione di Linux in lingua
     Italiana.
    Promuove corsi, dimostrazioni e manifestazioni per favorire la
     conoscenza di Linux.

  Ogni utente di Linux, senza restrizioni alcune, che si impegni a
  partecipare attivamente allo scopo del Pluto, diviene per questo
  membro del Pluto.

  Il Pluto  una organizzazione ``virtuale'' che vive in uno o pi siti
  connessi ad Internet.  La comunicazione tra i membri avviene
  primariamente attraverso i mezzi elettronici messi a disposizione
  dalla sede, il newsgroup Usenet it.comp.linux.pluto, le mailing list
  pluto-*, canali IRC, pagine del World Wide Web, ecc.

  Maggiori informazioni possono essere reperite alle pagine ufficiali
  del PLUTO all'indirizzo  <http://www.pluto.linux.it/>.



  10.1.2.  ILS


  ILS  un'associazione culturale senza fini di lucro, che ha fra i suoi
  scopi primari la diffusione della cultura informatica in tutte le sue
  forme, con una particolare attenzione per il mondo del free software
  in generale e del software che viene rilasciato sotto la GNU General
  Public License.  ILS  composta da tutti coloro che volontariamente e
  senza percepire alcun profitto mettono a disposizione il proprio
  tempo, le proprie capacita e le proprie risorse al fine di realizzare
  una comunit virtuale basata sulla cultura informatica/telematica. ILS
  offre ai Soci i servizi di Internet e-mail e Usenet News, che sono
  compresi nella quota associativa annua di Lire 50.000.  Per maggiori
  informazioni chiamare la BBS della ILS al numero 019-862349, oppure
  mandare una mail a info@linux.it.

  Si pu anche fare riferimento per maggiori informazioni a
  <http://www.linux.it/>.



  10.1.3.  Altri LUG locali


  Esiste la mappa italiana dei LUG <http://www.linux.it/LUG>, ovvero
  delle pagine che contengono riferimenti a tutti i LUG nati qua e la in
  Italia.

  Consiglio a tutti quelli che hanno creato un LUG, o che ne hanno
  l'intenzione, di chiedere al manutentore (Lindo Nepi,
  ascoli@ascu.unian.it) di essere aggiunti a questa mappa.  Consiglio
  inoltre di iscriversi alla lista ``nuovi-lug'' per il coordinamento
  tra LUG e per lo scambio di esperienze, trovate le informazioni nella
  sezione dedicata alle ``liste di discussione''.



  10.2.  Aree di discussione pubbliche



  10.2.1.  Newsgroups



     comp.os.linux*
        Ovvero I newsgroup su Linux. Ultimamente sono diventati
        supertrafficati, e la qualit non  esaltante (per la maggior
        parte si cercano rimedi per qualche pezzo di hardware che non
        funziona). Da seguire assolutamente comp.os.linux.announce, che
        ``lancia'' tutti i nuovi software per linux.


     it.comp.linux
        Newsgroup italiano ufficiale su Linux. Valgono i discorsi fatti
        per la precedente gerarchia, con l'aggiunta della disponibilit
        tutta italiana (e in italiano) ad aiutare chi si affaccia per la
        prima volta nel grande mondo Linux.


     it.comp.linux.pluto
        Gli argomenti trattati dovrebbero essere attinenti a tutto ci
        che riguarda il gruppo PLUTO.


     it.comp.linux.setup
        Discussioni sulla configurazione e installazione di un sistema
        Linux.


     it.comp.linux.annunci
        Annunci importanti per la comunit Linux italiana.



  10.2.2.  Mailing List


  Le mailing list sono dei luoghi virtuali in cui  possibile
  confrontarsi e discutere, un po' come i newsgroup. Quello che
  veramente li distingue da questi  il fatto che  possibile avere un
  controllo pi stringente sull'accesso, e quindi evitare maggiormente
  il rumore di fondo.


  Per iscriversi a queste liste  sufficiente mandare un messaggio
  all'utente ``majordomo'' dell'indirizzo a cui appartengono le liste e
  inserire nel corpo del messaggio una riga con:


  ______________________________________________________________________
          subscribe nomelista email
  ______________________________________________________________________



  dove ``nomelista''  il nome della lista (quello che c' a sinistra
  del simbolo ``@''), e ``email'' il vostro indirizzo email.



     pluto-amiga@pluto.linux.it
        Linux e m68k, ovvero Linux su Mac, Atari, Amiga...


     pluto-arch@pluto.linux.it
        coordinamento progetti amiga, i386 e Sparc

     pluto-devel@pluto.linux.it
        i Pluto Developers, ovvero lista in cui si discute sul free
        software e si sviluppa free software


     pluto-fido@pluto.linux.it
        Linux e il mondo della FidoTech, ovvero come mettere su una BBS
        sotto Linux e conquistare il mondo (della FTN)


     pluto-humor@pluto.linux.it
        per discussioni poco serie


     pluto-i386@pluto.linux.it
        Linux su macchine PC, per ora discussioni su cosa far fare al
        proprio PC con linux...


     pluto-ildp@pluto.linux.it
        maliling list ufficiale del progetto ``ILDP''; occorre
        iscriversi a questa lista se si ha l'intenzione di tradurre
        qualche HOWTO o documento simile.


     pluto-journal@pluto.linux.it
        lista di coordinamento/redazione virtuale del ``Pluto Open
        Journal''


     pluto-meeting@pluto.linux.it
        per organizzare il meeting pluto


     pluto-ong@pluto.linux.it
        Linux on the world, ovvero linux come strumento di networking a
        basso costo per i PVS


     pluto-sparc@pluto.linux.it
        Linux su Sparc


     pluto-soci@pluto.linux.it
        per tutti i soci pluto; questa lista  volutamente diffusa sotto
        altre forme in diversi net amatoriali e anche altro per
        permetterne la massima accessibilit.


     pluto-scical@pluto.linux.it
        Linux e calcolo scientifico


     it@li.org
        lista per l'Italia del progetto ``Linux  International'';
        occorre iscriversi qui se si ha l'intenzione di tradurre qualche
        catalogo di messaggi, oppure qualche programma GNU


     ispell-it@arci01.bo.cnr.it
        lista per la produzione di un vocabolario in italiano per
        ``ispell''


  Per queste altre, che utilizzano il software SmartList, occorre invece
  mandare un messaggio all'indirizzo della lista con un ``-request''
  aggiunto prima del segno ``@'', e inserire nel corpo del messaggio una
  riga con un semplice:


  ______________________________________________________________________
          subscribe
  ______________________________________________________________________



     scuola@linux.it
        Linux e il mondo della scuola


     com@linux.it
        Linux e il mondo commerciale. Questa mailing list  per tutte le
        ditte che vendono prodotti per Linux, consulenza su Linux,
        sistemi Linux e cose simili.


     linux-isp@linux.it
        Uso di Linux da parte di provider e simili.


     debian-it@linux.it
        doppione locale della precedente


     nuovi-lug@linux.it
        Lista di coordinamento tra i LUG Italiani, e non solo per quelli
        nuovi (come sembra dire il nome).


     debian-italian@lists.debian.org
        lista ufficiale degli utenti Debian italiani


     linux-italia@lists.cosmos.it
        Lo spirito della Mailing List  molto differente dal solito
        accademico ``RTFM'' (Read The Fucked Manual): a ogni domanda una
        risposta. Chi non sa chiede, chi sa mette a disposizione degli
        altri le proprie conoscenze.


  Infine per queste occorre mandare un messaggio all'utente ``listserv''
  del dominio a cui appartengono le liste e inserire nel corpo del
  messaggio una riga con:


  ______________________________________________________________________
          subscribe nomelista Nome Cognome
  ______________________________________________________________________



  dove ``nomelista''  il nome della lista (quello che c' a sinistra
  del simbolo ``@''), e ``Nome Cognome'' il vostro nome e cognome.



     linux-it@nis.garr.it
        Mailing list generale su linux.


  10.2.3.  FidoNet


  FidoNet  la mamma di tutte le reti in tecnologia (appunto) FidoNet,
  ed  la pi grossa rete amatoriale oggi esistente; veicola delle aree
  di discussione che sono, ai fini pratici, equivalenti ai newsgroup
  come tecnologia, ma molto pi simili alle mailing list come qualit
  dei contenuti.

  Per maggiori informazioni vi rimando a  <http://www.fidoitalia.net/>
  oppure alle aree locali di ogni buona BBS.



     UNIX.ITA
        L'area UNIX.ITA tratta di tutto quello che riguarda i sistemi
        operativi *IX, sia come filosofia generale che come applicazione
        a sistemi particolari, compresi - ma non limitati a - AIX, A/UX,
        Coherent, ESIX, Interactive, Linux, Minix, NetBSD, SCO-UNIX,
        SunOS, Ultrix, Xenix.  tollerato anche parlare dei vari
        pacchetti software che storicamente sono associati all'idea di
        ``ambiente aperto'', e che sono disponibili in sorgente, come ad
        esempio i programmi GNU. In via sperimentale,  permesso parlare
        di programmazione di rete Unix (leggasi socket, RPC e simili).
        L'area UNIX.ITA non tratta di TeX (esiste l'area TEX.ITA al
        proposito) e soprattutto non tratta di ``Internet at large'' e
        affini.  Per queste tematiche esiste l'area COMMS_RETI.ITA. Si
        invitano gli abituali frequentatori di UNIX.ITA a non rispondere
        in quest'area ai messaggi di questo genere: molto meglio una
        risposta in matrix comprendente anche l'invito a linkare l'altra
        area in questione. La parte di Internet che riguarda l'area
        comprende essenzialmente i server http (non i lettori) e i
        protocolli http, ftp e simili (non HTML).

        Moderatore:     Marco d'Itri, Fidonet: 2:332/206.10, md@linux.it



     TEX.ITA
        I temi della conferenza sono il linguaggio per la creazione di
        documenti TeX (con l'estensione LaTeX) ed il linguaggio per la
        creazione di font METAFONT, che a TeX  direttamente correlato.
        SGML, che , a titolo sperimentale, ammesso come tema di
        discussione in area (HTML escluso a meno di autorizzazione) e
        sulla possibilit di discutere di applicazioni correlate a
        (La)TeX, ad esempio AUC TeX e cosi` via.

        Moderatore:     Paolo Cascini, FidoNet: 2:332/101.12,
        laurgeo@udini.math.unifi.it



     COMMS_RETI.ITA
        Qui si tratta di reti geografiche e metropolitane, dei loro
        contenuti, strumenti protocolli e modalit di accesso.
        L'argomento pu portare facilmente, data la natura della
        principali di queste reti, internet, a parlare di sistemi UNIX.
        Si ricorda che per questo argomento esiste un'area nazionale
        apposita.  Anche per la discussione sulle reti locali esiste
        un'altra area dedicata. Si invitano gli utenti a scrivere qui
        solo di reti geografiche e metropolitane e a spostare in matrix
        ogni comunicazione non attinente il soggetto della conferenza
        (ringraziamenti, saluti, insulti e divagazioni). Qualora un
        nuovo utente ponga una domanda a cui si  gi pi volte risposto
        in area o/e di cui si ritiene nota ai frequentatori la risposta,
        si prega di soddisfarne la richiesta in matrix e di inviare,
        sempre per questa via, copia della risposta al moderatore che
        provveder a inserirla nelle FAQ dell'area ( un buon
        proposito).

        Moderatore:     Federico Baraldi, Fidonet: 2:332/414.6,
        Federico.Baraldi@p6.f414.n332.z2.fidonet.org


     PLUTO.ITA
        I Plutini in FidoNet

        Questa lista vuole essere punto di incontro dei soci PLUTO in
        FidoNet, ed infatti  posta in gateway con la lista pluto-
        soci@pluto.linux.it.


     UNIX_BBS.ITA
        Linux alla conquista delle BBS

        In quest'area si dovrebbe discutere dell'uso di UNIX (e quindi
        Linux) come software di BBS/gate.


     LINUX_BBS
        Linux alla conquista delle BBS (internazionale)

        Idem a sopra, solo che quest'area  internazionale, e sta gi
        producendo FAQ a manetta.


     LINUX
        International LINUX Conference

        Area internazionale ufficiale su Linux. Niente di speciale, a
        parte il fatto che si leggono i messaggi provenienti da Sud
        America e Giappone qualche settimana dopo che sono stati
        spediti...


     UNIX
        International UNIX Conference

        Idem a sopra.


     SPUTNIK.500
        Area del LUG Siciliano

        Area locale all'HUB 500 (Sicilia) su Linux creata appositamente
        come area di supporto per il gruppo SPUTNIK.



  10.2.4.  PNet


  Rete ``alternativa'' a FidoNet, pi piccola ( solo nazionale) ma non
  meno tecnicamente preparata.

  Per maggiori informazioni vi rimando a  <http://www.retepnet.it/>.



     P_UNIX
        Linux, Unix e affini

        Discussioni sul sistema operativo Linux (software, hardware,
        compatibilit, sorgenti, etc) e confronto con altri sistemi
        operativi Unix-like


     P_PLUTO
        PLUTO in PNet

        gate con la mailing lists pluto-soci@pluto.linux.it


     P_PLFTN
        PNet, PLUTO e le BBS UNIX

        gate con la mailing lists pluto-fido@pluto.linux.it



  10.2.5.  EuroNet



     COMEON_LINUX.ITA
        Area di supporto ComeOn Linux!

        Per i suoi attivisti e per quanti vogliano collaborare.



  10.2.6.  PeaceLink


  Rete amatoriale ecopacifista, membro APC.  Per maggiori informazioni
  si pu vedere  <http://www.peacelink.it/>.



     PCK.PUB.PEACELINK_ARC
        Supporto tecnico PeaceLink

        non  proprio un'area dedicata a Linux, ma  l'area di supporto
        tecnico tra gli utenti di PeaceLink e Linux  il sistema
        operativo ufficiale di rete e associazione PeaceLink.



  10.2.7.  ScoutNet


  Rete del movimento scout mondiale, maggiori informazioni si possono
  trovare al sito  <http://www.scoutnet.org/>.



     LINUX.GSI
        Il Gruppo Sperimentazione Informatica e Linux
        area del GSI per le discussioni sull'applicazione di Linux nelle
        attivit scout.



  10.2.8.  Rete packet AX25


  Il sistema operativo Linux  molto apprezzato nell'ambiente
  radioamatoriale in quanto utilizzato per far funzionare molti gateway
  tcp/ip che collegato la rete ax25 ham con la rete internet.  Sulla
  rete radioamatoriale esistono delle aree ``Linux'' nelle quali
  confluiscono tutti i messaggi con indirizzo linux@ita linux@eu e
  linux@ww (da Valter Bruno, ik1qew).



  10.2.9.  IRC


  Se siete interessati a Linux, se lo conoscete abbastanza bene, molto
  bene o volete trovare un aiuto, se usate IRC, siete invitati a
  intervenire nel canale #linux-it di IRCNet.  Sono bene accetti utenti
  di qualsiasi livello, sia per dare che per ricevere informazioni in
  tempo reale (ottimo quando avete un problema urgente).  Pi persone ci
  sono, pi probabilit c' di trovare chi d risposte (da Enrico
  Cherubini).

  Ora il canale #linux-it ha anche un URL, ovvero
  <http://members.tripod.com/~DarkServer>.


  10.2.10.  Meeting



     Pluto Meeting
        Pi o meno due volte l'anno i Plutiani si ritrovano a parlare
        dei loro progetti e delle loro ambizioni. Almeno una di queste
        due riunioni  aperta a tutti, viene organizzata con tanto di
        conferenze e dimostrazioni e viene pubblicamente annunciata nei
        soliti canali.

        Ottimo punto di riferimento   <http://meeting.pluto.linux.it/>



  10.3.  Siti Linux



  10.3.1.  Siti internet



    <ftp://tsx-11.mit.edu/pub/linux>

     Casa madre di buona parte del software Linux, amichevolmente
     chiamato semplicemente ``tsx''.



    <ftp://sunsite.unc.edu/pub/Linux>

     Idem come sopra, in pi sunsite rappresenta il sito dove guardare
     per primo se si va a caccia di informazioni e documentazione, anche
     questo chiamato ``sunsite'' e basta (basta la parola ;).


    <ftp://ftp.funet.fi/pub/linux>

     Uno dei pi grandi siti ftp al mondo, mirror di tante cose tra cui
     sunsite, tsx e casa madre dei kernel di Linux.

    <ftp://ftp.pluto.linux.it/>

     Casa madre di tutto quello prodotto dal gruppo Pluto, in
     particolare aggiornamenti della documentazione tradotta in italiano
     e Pluto Journal.

    <ftp://ftp.linux.it/>,  <ftp://svpop.com.dist.unige.it/>

     Casa madre di ILS, correntemente mirror completo di Debian e di
     molte altre cose relative a Linux, soprattutto relative all'uso di
     Linux in ambiente FTN (Ifmail-HOWTO e compagnia).


    <http://gnu.linux.it>

     Mirror italiano ufficiale di  <http://www.gnu.org>.


    <ftp://cnuce_arch.cnr.it/pub/Linux>

     Mirror ufficiale italiano di sunsite.


    <ftp://ftp.lnf.infn.it/packages/Linux/>

     Il sito dell'INFN che tra l'altro  mirror italiano di SuSE.



  10.3.2.  BBS



    OneWay BBS, +39 2 4491062, v.32bis,v.42bis, Milano, Fidonet
     2:331/333, Virnet

    DOC!, +39 41 5905472, ZyXEL19.2k,V.32b,V.42b, Mogliano Veneto (TV),
     Fidonet 2:333/704

    Sierra BBS, +39 6 39721568, ZyXEL19.2k,V.32b,V.42b, Roma, Fidonet
     2:335/336

    Aloha BBS, +39 923 546164/7, V.32bis, V.42bis, Trapani, Fidonet
     2:335/519, MultiMediaNet

    Pappaconda on-line, +39 51 6233671, Zyxel 19.200, Bologna, Fidonet
     2:332/424

    ILS BBS, +39 19 862349, V32bis,V42bis, Savona, Internet (E-Mail,
     News)

     Praticamente la versione BBS di svpop.

    XCalBr8 BBS, +39 535 780191 Fidonet 2:332/521 Sysop Andrea Baldoni.

     File per sysadm, sorgenti di dosemu60, doom, driver per Gravis.
     patch del kernel, sorgente completo del kernel.

    Eko BBS, +39 6 5215306, V.32bis, V.42bis, Roma, Fidonet  2:335/374

     Files: Slackware (Agosto95), Howto, LDP...

    cmb2000 BBS, +39 332 820009, v.32bis, v.42bis, Varese
     Fidonet 2:331/134

     Files: Linux Slackware 3.0, IfMail-HowTo, MIT Sources, VuBbs.



    Universal Mind BBS, +39 434 561305 , V.34+, Pordenone, Fidonet
     2:333/1016, Pnet 91:13/1, PeaceLink 61:3917/1, Sysop Marco Gaiarin.

     Mirror (?!) di tutto quello prodotto per il PLUTO (soprattutto
     Pluto Journal), vario altro. Magic f'req ``PLUTO'' per la lista
     files Linux.


    Car Systems Service '93 BBS, +39 85 4492408, Creatix SG 2834,
     Montesilvano PE, Fidonet 2:335/626, Euronet 230:1027/0, VirNet
     9:395/0, Intelec Network 239:102/0, RIME 900:310/0, Eagle's Nest
     Network 145:1/0, IFDNet 14:5004/103, OS2Net 81:439/68, SysOp
     Stefano Brandimarte,

     Sorgenti del kernel costantemente aggiornati, patch, dosemu,
     XFree86, librerie e applicazioni varie.



F ITALIAN-.;1                       	Italian-HOWTO
  Polish HOWTO
  Sergiusz Pawlowicz, ser@arch.pwr.wroc.pl
  v2.1, 8 February 1999

  Jak to zrobic w Linuxie? Pomoc zlozona z niektorych Linux-HOWTO oraz
  empirii, dostosowana do polskich warunkow i potrzeb. Wersja ta jest
  pozbawiona polskich liter ze wzgledu na standard LDP.  Oryginal mozna
  znalezc w  <http://serek.arch.pwr.wroc.pl/linux/Polish-HOWTO/>.
  ______________________________________________________________________

  Table of Contents


  1. Wstep.

     1.1 Informacje ogolne o Polish-HOWTO.
     1.2 Jak pomoc w rozwinieciu podrecznika?
     1.3 Jak czytac aktualna wersje Polish-HOWTO?

  2. Zrodla Linuxa w Polsce.

     2.1 Pliki binarne i zrodlowe Linuxa.
        2.1.1 Dystubucje Linuxa czyli cos, co latwo zainstalowac nawet laikowi.
        2.1.2 Nowe wersje jadra systemu Linux.
        2.1.3 X-Free
        2.1.4 Archiwa programow na Linuxa.
        2.1.5 Pewne miejsce do szukania zbiorow linuxowych.
     2.2 Dokumentacje po angielsku i polsku.

  3. Jezyk polski i Linux.

     3.1 Programy pocztowe, ktorym polskie litery nie przeszkadzaja.
     3.2 Programy do czytania newsow, ktorym polskie litery nie przeszkadzaja.
     3.3 Komunikaty programow po polsku.

  4. Gdzie zapytac, gdy czegos nie wiemy.

     4.1 Grupa pocztowa i UseNet news.

  5. Zycie Linuxa w Polsce

     5.1 PLUG - Polish Linux Users Group.
     5.2 Licznik polskich uzytkownikow Linuxa.


  ______________________________________________________________________

  1.  Wstep.



  1.1.  Informacje ogolne o Polish-HOWTO.


  Krotki podrecznik Linuxa po polsku? Mozliwe, ze dzieki pomocy wielu
  ludzi sie to uda.  Chwilowo jednak mam zamiar opisac typowo polskie
  problemy: gdzie znalezc w Polsce zrodla i dystrybucje Linuxa, jak
  uzyskac polskie litery pod konsola Linuxa oraz w X11, jak prawidlowo
  przesylac i odczytywac poczte z polskimi literami, gdzie w Polsce
  uzyskac pomoc (grupy dyskusyjne usenet, pocztowe), gdzie znalezc dobra
  dokumentacje angielska...  Uwaga: Autor nie bierze odpowiedzialnosci
  za ewentualne uszkodzenia mienia poprzez zastosowanie sie do rad
  zawartych w podreczniku :)).


  1.2.  Jak pomoc w rozwinieciu podrecznika?


  Nie jestem w stanie opisac po polsku wszystkiego, co dotyczy Linuxa.
  Wszelkie materialy, ktore wydaja sie wam ciekawe, prosze przesylac na
  adres ser@arch.pwr.wroc.pl.  Najlepiej w formacie SGML, ale czyste
  ascii lub tekst w kodzie ISO-8859-2 rowniez z checia przyjme.


  Oto lista (kolejnosc chronologiczna) osob, ktore pomogly w rozny
  sposob przy powstawaniu Polish-HOWTO:

    Linus Torvalds :), tworca Linuxa, linus@linux.helsinki.fi

    Wojciech Myszka, prekursor internetu wroclawskiego,
     myszka@immt.pwr.wroc.pl

    Adam Tlal/ka, Politechnika Gdanska, atlka@pg.gda.pl

    Jaroslaw Strzalkowski, js@arrow.uci.agh.edu.pl, Piotr Piatkowski,
     kompas@uci.agh.edu.pl, za Polska Strone Ogonkowa.

    Rafal Maszkowski, PDI, rzm@torun.pdi.net.


  A oto lista najbardziej potrzebnych dokumentacji do opracowania po
  polsku:

    Jak zainstalowac Linuxa? Odpowiednik Install-HOWTO, obejmujacy
     RedHat, Debian, Slackware, PLD.

    Jak zadbac o bezpieczenstwo systemu?



  1.3.  Jak czytac aktualna wersje Polish-HOWTO?



  Wersja HTML (do przegladania na www) tego tekstu znajduje sie pod:
  <http://serek.arch.pwr.wroc.pl/linux/Polish-HOWTO/>.  Tutaj zawsze
  jest najnowsza postac podrecznika, jest to wersja eksportowa :-),
  pisana do SunSite w USA na potrzeby Linux Documentation Project.


  Poza tym, wersja ascii dokumentu jest umieszczana czasmi na newsach, w
  grupach  <news:pl.answers>,  <news:pl.comp.os.linux>.



  2.  Zrodla Linuxa w Polsce.



  2.1.  Pliki binarne i zrodlowe Linuxa.

  2.1.1.  Dystubucje Linuxa czyli cos, co latwo zainstalowac nawet
  laikowi.



  Podstawowe dytrybucje Linuxa mozna znalezc w wiekszosci polskich sieci
  metropolitalnych, prosze wybierac zawsze miejsce najblizsze:


    Wroclaw: Politechnika Wroclawska

    RedHat:  <ftp://ftp.pwr.wroc.pl/pub/linux/redhat/>

    SlackWare:  <ftp://ftp.pwr.wroc.pl/pub/linux/INSTALL/>

    PLD:  <ftp://ftp.arch.pwr.wroc.pl/pub/linux/PLD/>


    Szczecin: Politechnika Szczecinska

    PLD:  <ftp://ftp.ps.pl/pub/Linux/PLD/>


    Poznan: Poznan Metropolitan Area Network

    Slackware: <ftp://ftp.man.poznan.pl/pub/linux/Slackware/>

    RedHat: <ftp://ftp.man.poznan.pl/pub/linux/redhat/>


    Gdansk: Politechnika Gdanska

    RedHat: <ftp://ftp.pg.gda.pl/pub/OS/Linux/redhat/>

    SlackWare: <ftp://ftp.pg.gda.pl/pub/OS/Linux/slackware/>

    Debian: <ftp://ftp.pg.gda.pl/pub/OS/Linux/debian/>


    Warszawa: Interdyscyplinarne Centrum Modelowania

    RedHat: <ftp://sunsite.icm.edu.pl/pub/Linux/redhat/>

    SlackWare: <ftp://sunsite.icm.edu.pl/pub/Linux/slackware/>

    Debian: <ftp://sunsite.icm.edu.pl/pub/Linux/debian/>


    Krakow: Cyfronet

    RedHat:  <ftp://ftp.cyf-kr.edu.pl/pub/linux/redhat/>



  Piszac: podstawowe, mam na mysli:

    RedHat Linux.

    Slackware.

    Debian.

    PLD - Polish(ed) Linux Distribution.



  2.1.2.  Nowe wersje jadra systemu Linux.

  Najnowsza wersje jadra, aktualizowane co godzine, znajdziecie w:
  <ftp://serek.arch.pwr.wroc.pl/pub/CVSROOT/linux/>.

  Natomiast jadra oficjalne, spakowane, mirror ftp.cs.helsinki.fi, na:
  <ftp://sunsite.icm.edu.pl/pub/Linux/kernel/>.


  2.1.3.  X-Free

  Wersje X-11 dla Linuxa mozna sciagnac z SunSite,
  <ftp://sunsite.icm.edu.pl/pub/Linux/XFree86/>



  2.1.4.  Archiwa programow na Linuxa.

  Prosze wybierac zawsze miejsce najblizsze:

    Wroclaw: Politechnika Wroclawska

    <ftp://ftp.pwr.wroc.pl/pub/linux/>


    Szczecin: Academic Centre of Informatics

    <ftp://ftp.man.szczecin.pl/pub/Linux/>


    Gdansk: Politechnika Gdanska

    <ftp://ftp.pg.gda.pl/pub/OS/Linux/>



  2.1.5.  Pewne miejsce do szukania zbiorow linuxowych.

  Jezeli tych zrodel nie jestescie w stanie znalezc u siebie,
  znajdziecie je na pewno na SunSite Polska (Warszawa,
  Interdyscyplinarne Centrum Modelowania):

    <ftp://sunsite.icm.edu.pl/pub/Linux/>

     Jest to najwieksze polskie archiwum anomimowego ftp.



  2.2.  Dokumentacje po angielsku i polsku.

  Dokumentacje Linuxa sa prawie w calosci po angielsku. Dobry zbior
  dokumentacji zgromadzil Greg Hankins, gregh@sunsite.unc.edu: Linux
  Documentation Project.  Pomoc, ktora czytasz, jest czescia tego
  projektu.  Oficjalne (i aktualne) kopie dokumentacji mozna znalezc w:


    SunSite Polska, ICM Warszawa,
     <http://sunsite.icm.edu.pl/pub/Linux/Documentation/>


  Polska dokumentacja stricte do Linuxa w sieci to przede wszystkim

    Jak To Zrobic,  <http://www.jtz.org.pl/>,

     opiekunem projektu jest Bartek Maruszewski,
     <mailto:bart@jtz.org.pl>.



  Dokumentacja po polsku, dotyczaca nie tylko Linuxa, ale sieci w ogole,
  jest takze w:

    <http://www.immt.pwr.wroc.pl/export_hp/tool/tool.html>.

     Autor: Wojciech Myszka, myszka@immt.pwr.wroc.pl.


  3.  Jezyk polski i Linux.

  Uzyskanie polskich liter pod Linuxem jest proste.  Kiedys trudno bylo
  znalezc standard, ktory odpowiadalby wszystkim, teraz pewne jest, ze
  przyjal sie oficjalny standard ISO, ISO-8859-2.  Dokladniejszych
  informacji o problemach z polskimi literami mozna szukac na Polskiej
  Stronie Ogonkowej:  <http://www.agh.edu.pl/ogonki/>.



  3.1.  Programy pocztowe, ktorym polskie litery nie przeszkadzaja.



  Calkowicie spolszczonym programem pocztowym, ktorego uzywam, jest
  Mutt.  Oprocz tego, ze dobrze wyswietla polskie litery, ma mozliwosc
  podania strony kodowej, w naszej sytuacji jest to iso-8859-2. Jesli
  list napisany w moim Mutcie`ie dojdzie do uzytkownika uzywajacego
  innej strony kodowej, wyswietli mu sie informacja, ze moze nie
  zobaczyc poprawnie czesci liter.  Jesli natomiast posluguje sie nasza
  strona kodowa, list bedzie wyswietlany bez uwag i z polskimi literami.


  3.2.  Programy do czytania newsow, ktorym polskie litery nie
  przeszkadzaja.

  Do czytania i pisania news po polsku nadaje sie tin-beta-unoff, do
  sciagniecia z:

    <ftp://ftp.akk.uni-karlsruhe.de/pub/tin/>

    <ftp://ftp.onet.pl/pub/unix/tin/>


  3.3.  Komunikaty programow po polsku.

  Od ponad dwoch lat dziala grupa tlumaczaca komunikaty programow GNU.
  Wiecej informacji o tym projekcie znajdziesz pod adresem
  <http://www.ceti.com.pl/~kravietz/gnu/gnu_tp.html>.  Archiwum
  przetlumaczonego oprogramowania:

    <ftp://ftp.arch.pwr.wroc.pl/pub/nls/>

     Opiekunem grupy tlumaczy jest Rafal Maszkowski,
     <mailto:rzm@icm.edu.pl>. Zapraszamy do tlumaczenia, na potrzeby
     tlumaczy dziala serwer CVS.



  Aby uzywac programow z polskimi komunikatami nalezy nadac srodowisku
  powloki zmienna LANG=pl_PL. Jesli dystrybucja z pudelka nie ma
  przygotowanej wersji miedzynarodowej, trzeba samemu skompilowac wersje
  miedzynarodowa pakietu, umieszczajac w podkatalogu 'po' plik pl.po dla
  danego pakietu (chyba ze juz tam jest, ale w pakiecie moze byc starsza
  wersja).  Pakiet mozna zainstalowac dla wybranych jezykow - p.
  instrukcje instalacji pakietow miedzynarodowych GNU. Jezeli w danym
  pakiecie nie bylo jeszcze pl.po moze byc potrzebne dopisanie w
  zmiennej LINGUAS w skrypcie configure 'pl', pamietajac potem o
  odpowiednim ustawieniu zmiennych.


  Chetni do wziecia udzialu w pracy nad tlumaczeniami musza wypelnic
  zobowiazanie przekazujace prawa autorskie do tlumaczen na Free
  Software Foundation. Oryginalne archiwum 'GNU translation project':

    <ftp://alpha.gnu.ai.mit.edu/gnu/po/>

     Adres grupy tlumaczacej: pl@li.org (via majordomo).



  4.  Gdzie zapytac, gdy czegos nie wiemy.



  4.1.  Grupa pocztowa i UseNet news.

  Wlasciwie lista pocztowa i UseNet`owa to jedno i to samo, gdyz listy
  wyslane na liste pocztowa, trafiaja na newsy i odwrotnie.


  Aby zajrzec na UseNet news, nalezy dostac sie do grupy:
  <news:pl.comp.os.linux>


  Aby zapisac sie na liste pocztowa, prosze wyslac list bez subjectu o
  tresci:


        sub linux Imie Nazwisko



  na adres listserv@sprocket.ict.pwr.wroc.pl. Lista utrzymywana jest na
  komputerze linuxowym znajdujacym sie w Instytucie Cybernetyki Tech
  nicznej Politechniki Wroclawskiej.  Archiwum listy od kwietnia 1995
  roku mozna obejrzec na  <http://www.ict.pwr.wroc.pl/listserv/linux/>


  5.  Zycie Linuxa w Polsce



  5.1.  PLUG - Polish Linux Users Group.

  Polska Grupa Uzytkownikow Linuxa, wiecej informacji mozna znalezc na:
  <http://www.linux.org.pl/>,

    oddzial krakowski:  <http://www.krakow.linux.org.pl/>,

    odzial wroclawski:  <http://www.wroclaw.linux.org.pl/>,

    oddzial slaski:  <http://www.silesia.linux.org.pl/>,

    oddzial torunski:  <http://eris.phys.uni.torun.pl/Linux/>,

    oddzial poznanski:  <http://www.poznan.linux.org.pl/>.


  Polish(ed) Linux Distribution - polska grupa majaca na celu
  przygotowanie bezpiecznej dystrybucji Linuxa, wyposazonej w nowinki,
  czyli IPv6 oraz kerberosa, glibc-2.1, ssh, nowe jadra Linuxa; wiecej
  informacji na  <http://www.pld.org.pl/>.



  5.2.  Licznik polskich uzytkownikow Linuxa.

  Uruchomiono licznik uzytkownikow Linuxa w Polsce.

  Tak wiec, kazdy, kto uzywa na swoim PC (Digitalu, IBMie, SUNie,
  Amidze, Macintoshu etc.)  systemu operacyjnego Linux, jest proszony o
  wyslanie listu na adres:

  licznik@arch.pwr.wroc.pl

  Wystarczy wiec napisac w swoim systemie nastepujaca komende:


       mail licznik@arch.pwr.wroc.pl < /dev/null



  Jezeli komus chcialoby sie wiecej napisac, nie ma sprawy, wszystkie
  zgloszenia beda starannie analizowane. Powstanie z tego mapa Linuxow w
  Polsce, mozna wiec w listach do "licznika" przesylac URLe serwerow www
  posadzonych na zglaszanych przez siebie Linuxach.  Listy przyslane na
  powyzszy adres sa archiwizowane i jak tylko nabierze to sensu,
  udostepniane pod adresem: <http://licznik.arch.pwr.wroc.pl/>.

  Dziekuje z gory za listy inicjator polish-howto - Sergiusz Pawlowicz,
  ser@arch.pwr.wroc.pl



F POLISH-H.;1                       	Polish-HOWTO
  Linux Portuguese-HOWTO
  Configuraes do Linux para a Lngua Portuguesa
  Carlos A. M. dos Santos <casantos@cpmet.ufpel.tche.br>
  CPMet/UFPEL -- Pelotas, RS, Brasil
  v3.2, 24 May 1999

  Este documento pretende ser um guia de referncia de configurao do
  Linux e seus programas, teclados e fontes de caracteres, permitindo
  sua utilizao mais confortvel por pessoas que falem a Lngua Por
  tuguesa.
  ______________________________________________________________________

  Table of Contents



  1. Introduo

     1.1 Finalidades deste HOWTO
     1.2 Onde encontrar a verso mais atual
     1.3 Pgina oficial na WWW
     1.4 Como enviar colaboraes

  2. Informaes gerais

     2.1 Conjuntos de caracteres
     2.2 Modo texto versus Sistema de Janelas X

  3. Configurao do console (modo texto)

     3.1 Mapas de teclado
     3.2 Mapas de traduo de tela
     3.3 Comandos do pacote KBD
     3.4 Carregamento de uma fonte de caracteres
        3.4.1 Slackware
        3.4.2 Debian
        3.4.3 Red Hat
        3.4.4 Conectiva Red Hat Linux
        3.4.5 S.u.S.E.
        3.4.6 Testando a fonte
     3.5 Carregando um mapa de teclado
        3.5.1 Slackware.
        3.5.2 Debian.
        3.5.3 Red Hat.
        3.5.4 Conectiva Red Hat Linux.
        3.5.5 S.u.S.E..
        3.5.6 Testando o teclado
     3.6 Verificando erros

  4. Biblioteca de funes libc e aplicativos GNU

     4.1 Configurando o suporte internacional
     4.2 Problemas com a libc 5

  5. Configurao do X

     5.1 Configurao do xinit
     5.2 Configurao do XDM
     5.3 Compose
     5.4 Locale
     5.5 Gerao de mapas com o XKeyCaps
     5.6 Contornando os limites do X
        5.6.1 Alterao da biblioteca Xlib
        5.6.2 Alterao no kernel do Linux
        5.6.3 Comparao entre as duas solues

  6. Configurao dos vrios programas

     6.1 Aplicativos
        6.1.1 Bash (biblioteca GNU readline)
        6.1.2 Emacs
        6.1.3 flex
        6.1.4 Fortune
        6.1.5 Ispell
        6.1.6 JDK (inclui ICQJava)
        6.1.7 Joe
        6.1.8 Less
        6.1.9 ls
        6.1.10 LyX
        6.1.11 Man, groff, troff
        6.1.12 Midnight Comander (mc)
        6.1.13 Minicom
        6.1.14 Netscape Communicator
        6.1.15 nn
        6.1.16 Pine e Pico
        6.1.17 tcsh
        6.1.18 TeX e LaTeX
           6.1.18.1 O pacote Babel
           6.1.18.2 Separao silbica
           6.1.18.3 Uso de Font Encoding T1
           6.1.18.4 Edio de documentos
           6.1.18.5 Teste da configurao do LaTeX
           6.1.18.6 Problemas com alguns pacotes do teTeX
           6.1.18.7 Lista TeX-BR
           6.1.18.8 LaTeX-demo
        6.1.19 WordPerfect
        6.1.20 Xemacs (antigo lucid emacs)
     6.2 Rede local e Internet
        6.2.1 FTP (File Transfer Protocol)
        6.2.2 Correio eletrnico

  7. Ficheiros necessrios

  8. Informaes Adicionais

     8.1 Fontes de informao sobre Linux em Portugus
     8.2 Free Translation Project
     8.3 LIE-BR
     8.4 Verses de software testadas

  9. Observaes finais

     9.1 Futuras adies a este documento
     9.2 Nota de Direitos de Autor
     9.3 Garantia (inexistncia de) e nota de responsabilidade
     9.4 Agradecimentos

  10. Bibliografia comentada



  ______________________________________________________________________

  1.  Introduo

   semelhana de outras lnguas faladas na Europa, a Lngua Portuguesa
  tem caractersticas especiais, como a utilizao de caracteres
  acentuados, que tornam o seu suporte difcil, pouco intuitivo ou at
  mesmo impossvel, por parte do software utilizado nos nossos
  computadores.

  Nossa lngua assume particularidades em cada um dos pases em que 
  falada e mesmo dentro de um nico pas como o Brasil, de dimenses
  continentais e com influncias culturais de muitos outros povos. Este
  documento foi originalmente escrito por um portugus, mas agora 
  mantido por um brasileiro. H uma mistura de sotaques que deve se
  manter por um bom tempo, pois no h razo para alterar o texto
  original seno para fazer de adies e correes, at por respeito ao
  primeiro autor. Termos ``estrangeiros'' desnecessrios foram
  substitudos por correspondentes da Lngua Portuguesa, preservando-se
  apenas os que j fazem parte do jargo da informtica.


  1.1.  Finalidades deste HOWTO

  Este HOWTO  um guia de referncia de configurao do sistema
  operativo Linux e seus programas, teclados e fontes de caracteres,
  permitindo sua utilizao mais confortvel por pessoas que falem a
  Lngua Portuguesa. Como os programas mais antigos no foram desenhados
  com suporte a caracteres acentuados ou internacionalizao, s vezes 
  preciso usar algum artifcio que permita contornar o problema, mas o
  resultado nem sempre  totalmente satisfatrio e em alguns casos chega
  ser frustrante. As dificuldades encontradas centram-se essencialmente
  em torno de quatro pontos:


    a introduo de caracteres acentuados atravs do teclado, como seja
     a escrita de jo~ao em vez da sua forma correcta: joo;

    a exibio dos mesmos na tela do computador. O suporte resume-se
     normalmente  correcta localizao das teclas, nada mais;

    o correto tratamento de convenes nacionais de formato de datas,
     horas e valores monetrios;

    a exibio de mensagens, ttulos e demais informaes dos programas
     em outra lngua que no o Ingls, que  a lngua original da
     maioria desses programas.

  Verses anteriores do Portuguese HOWTO concentravam-se em contornar as
  duas primeiras dificuldades mencionadas, de forma a fazer que, dentro
  do possvel, tanto o sistema operativo como os programas nele
  utilizados aceitassem os caracteres acentuados e usassem os teclados
  com suporte para o Portugus.  Embora esse objetivo ainda seja
  perseguido, os problemas de teclado e caracteres j tm solues
  satisfatrias, pelo menos para as aplicaes mais usadas. As prximas
  verses devero se dedicar mais aos dois ltimos problemas.

  O texto contm uma j no to breve discusso sobre o tratamento do
  teclado e das fontes de caracteres do console pelo Linux, bem como do
  suporte a vrias lnguas nacionais. O Sistema de Janelas X tambm 
  discutido, fazendo-se uma comparao entre ele e o modo de texto. Por
  fim, so fornecidas instrues para a configurao do sistema
  operativo e de diversos aplicativos importantes.

  O documento tem se tornado menos slackwariano, incluindo cada vez mais
  informaes relativas a outras distribuies. Slackware e Caldera
  ainda se baseiam na verso 5 da biblioteca de funes do sistema para
  Linux (libc), enquanto Debian, Red Hat, TurboLinux, S.u.S.E e Stampede
  j suportam a verso 6 (que na verdade  a glibc verso 2). Esta nova
  verso da biblioteca est um passo adiante no suporte a
  internacionalizao e localizao.  A partir da verso 3.2 do
  Portuguese-HOWTO as particularidades de cada distribuio sero
  destacadas quando houver necessidade. A tentativa de tornar Debian uma
  distribuio ``de referncia'' a partir da verso 3.0 do HOWTO
  fracassou miseravelmente porque o nmero de diferenas entre as
  distribuies  muito grande.

  A inteno original de no tentar concentrar toda a informao em um
  nico texto, tratando apenas de alguns temas essenciais e fornecendo
  referncias para outras fontes, tambm fracassou. O HOWTO em sua
  verso 3.1 j alcanava 38 pginas impressas em formato A4, o que est
  longe de poder ser chamado de sucinto. As principais razes para tal
  gigantismo so a necessidade de discutir diferenas entre as
  distribuies e a necessidade de fornecer informaes mais detalhadas
  sobre aplicativos.

  Excetuando-se aspectos muito especficos do Linux, como a configurao
  do modo texto e do kernel, a maioria das informaes contidas neste
  documento pode ser aplicada a outros sistemas Unix. Exemplos so as
  configuraes do Sistema de Janelas X e de vrios aplicativos, que
  foram aplicadas em Solaris 2.{5,6,7} e Digital UNIX 3.2. Os mapas de
  teclado para terminais X e estaes de trabalho Sun foram criados e
  so usados em mquinas que rodam Solaris. O documento poder um dia se
  tornar o ``Unix Portuguese HOWTO'', embora no momento no se tenha
  inteno ou meios de faz-lo.


  1.2.  Onde encontrar a verso mais atual

  Os Linux HOWTO fazem parte do Projeto de Documentao Linux (Linux
  Documentation Project -- LDP). Os documentos do LDP so mantidos em
  servidores da Universidade da Carolina do Norte (UNC) e do Instituto
  de Tecnologia de Massachusetts (MIT), nos Estados Unidos da Amrica, e
  podem ser obtidos via FTP annimo nos seguintes endereos:

    <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO> (conhecida
     anteriormente como sunsite.unc.edu).

    <ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO>

  Pode-se tambm folhear os documentos HOWTO em formato HTML no endereo

    <http://metalab.unc.edu/LDP/HOWTO>

  Muitas localidades mantm cpias desses documentos. Deve-se dar
  preferncia ao acesso  cpia mais prxima, para economizar o precioso
  trfego internacional na Internet e tambm evitar a sobrecarga da
  mquina metalab.unc.edu. Uma lista completa dessas localidades pode
  ser obtida em

    <http://metalab.unc.edu/LDP/mirrors.html>

  Eis uma lista dos endereos recomendados:

  Brasil

    <http://linusp.usp.br/LDP/>

    <http://www.conectiva.com.br/LDP/>

    <http://www.opensite.com.br/linux/>

    <http://taubate.valley-bbs.com.br/LDP/>

    <http://linux.unicamp.br/docs/>

  Portugal

    <http://gil.di.uminho.pt/mirrors/LDP/>

    <http://deneb.cec.pt/LDP/>

    <http://ftp.dei.uc.pt/LDP/>

    <http://www.sc.uevora.pt/LDP/>

    <http://lwp.ualg.pt/docs/LDP/>

    <http://linux.global-one.pt/LDP/>

    <http://linux.ispgaya.pt/LDP/>

    <http://ae.fe.up.pt/LDP/>

  Os Linux HOWTO esto disponveis em diversos formatos: texto simples,
  PostScript, DVI, HTML, RTF e Lyx. O formato original  SGML e os
  demais so gerados usando o SGMLtools (maiores informaes em
  <http://www.sgmltools.org/>).

  1.3.  Pgina oficial na WWW

  A pgina oficial do Linux Portuguese-HOWTO, assim como os diversos
  arquivos de configurao do sistema e programas aplicativos
  mencionados no texto, podem ser encontrados nos seguintes endereos:


    Brasil:  <http://linusp.usp.br/~casantos/>

    Portugal:  <http://linux.fe.up.pt/howto/>


  1.4.  Como enviar colaboraes

  Toda a formatao deste HOWTO, incluindo a numerao das sees 
  feita pelo SGMLtools. Por isso, ao enviar sugestes ou correes,
  mencione os ttulos das sees onde as alteraes sugeridas devem
  ocorrer e no os nmeros. Nunca refira-se a um pargrafo como sendo
  ``o terceiro da seo 3.1''; cite as palavras inicias do trecho a ser
  modificado.

  Envie sugestes e correes via correio eletrnico em texto simples,
  opcionalmente com acentuao no cdigo ISO-8859-1.  Se o texto no for
  composto em um sistema *NIX, certifique-se de usar a codificao
  correta.  Todas as mensagens recebidas sero lidas, mas nem todas
  recebero resposta direta, devido  falta de tempo para tanto.

  No envie documentos no formato proprietrio de processadores de texto
  nem em formato HTML (o que infelizmente parece ser o comportamento
  normal do Netscape Communicator e do Microsoft Outlook).

  Mensagens perguntando como configurar seu modem, placa de vdeo ou
  rede no sero respondidas. Para esse tipo de consulta  aconselhvel
  procurar uma lista de discusso sobre Linux em Portugus ou acompanhar
  os grupos de discusso de Linux na USENET comp.os.linux.*.

  ``Flames'' tero o destino costumeiro: /dev/null.


  2.  Informaes gerais

  2.1.  Conjuntos de caracteres

  Um conjunto de caracteres  definido de acordo com os smbolos
  constantes no alfabeto utilizado para escrita em uma ou mais lnguas.
  A Organizao Internacional de Normas (International Standards
  Organization - ISO) padronizou atravs da norma ISO-8859 vrios desses
  conjuntos, identificados por ISO-8859-x onde o x corresponde a um
  determinado alfabeto. O conjunto ISO-8859 utiliza 8 bits para
  representar cada caracter, o que permite uma gama de 256 sinais
  (valores de zero a 255). Em cada um dos conjuntos, os cdigos zero a
  127 correspondem ao conjunto ASCII (American Standard Code for
  Information Interchange) e os cdigos 160 a 255 so usados para
  caracteres nacionais.

  Para a lngua portuguesa, recomenda-se o uso do conjunto ISO-8859-1,
  que compreende o alfabeto latino e letras acentuadas usadas pelas
  lnguas do oeste da Europa e Amrica. Este conjunto de caracteres
  tambm  frequentemente chamado de Latin-1 ou ISO Latin-1.

  Um padro mais recente  o Unicode, definido pela norma ISO-10646, que
  permite definir caracteres cuja representao interna no computador
  utiliza mais de um byte (ou octeto na nomenclatura ISO). Todas as
  verses mais recentes de sistemas Unix suportam Unicode (ou pelo menos
  seus fabricantes alegam suportar).

  Alm dos caracteres alfanumricos e sinais de acentuao,  possvel
  tambm gerar sinais semigrficos para desenho de linhas e bordas.
  Esses sinais podem aproveitar cdigos no utilizados pelo conjunto
  oficial, tornando-os no portveis.

  O Linux foi desenhado internamente de modo a facilitar a sua fcil
  configurao e extenso em tempo de execuo, no constituindo o
  tratamento do teclado e fontes de caracteres excepo. Ele possui uma
  implementao ``nvel 1'' do padro Unicode. Maiores detalhes podem
  ser encontrados nos manuais do Linux, que podem ser lido com os
  comandos

      man unicode
      man utf-8
      man iso_8859_1
      man ascii


  mas antes disso certifique-se de que o man est configurado correta
  mente, conforme mostrado na seo ``Man, groff, troff''.


  2.2.  Modo texto versus Sistema de Janelas X

  Alguns sistemas operativos, tais como MacOS, Microsoft Windows e NeXT,
  possuem interfaces grficas prprias. No Linux, assim como na maioria
  dos sistemas compatveis com Unix,  de uso corrente um ambiente
  grfico criado para ser ``multiplataforma'': o X Window System, que
  tambm foi projetado para suportar diversos conjuntos de caracteres,
  idiomas e formatos de teclado, mas ainda no suporta totalmente o
  padro Unicode e sim uma extenso do ISO-8859.


       A rigor o X Window System no  uma interface grfica com o
       usurio, mas a combinao de um protocolo de comunicao com
       uma interface com programas aplicativos (API) sobre a qual
       se construram vrias interfaces grficas.  Tanto o proto
       colo quanto o Sistema de Janelas definem um conjunto de
       mecanismos e no polticas (elementos caractersticos da
       poltica de uma Interface Grfica com o Usurio so menus,
       botes e caixas de dilogo).  O uso do termo ``XWindows'' 
       incorreto e deve ser evitado, dando-se preferncia ao nome
       genrico ``X''.


  Existem muitas semelhanas entre os dois ambientes.  Ambos se baseiam
  em padres internacionais para definio de conjuntos de caracteres.
  Tanto no X quanto no console do Linux pode-se definir uma tecla
  chamada Compose cujo pressionamento seguido de duas outras gerar o
  caracter correspondente.  Assim sendo, o pressionamento da seqncia
  compose-,-c gerar um c cedilhado.

  O tratamento do console  feito diretamente pelo sistema operativo e
  aplicaes comuns no se envolvem com o processamento dos cdigos de
  varredura do teclado, recebendo um caracter ou uma seqncia deles ao
  ser pressionada cada tecla, de tal sorte que tendo sido corretamente
  configurados o teclado e a fonte de caracteres pouco mais se tem a
  fazer.

  O X possui uma arquitetura muito diferente: tanto o teclado quanto
  a(s) tela(s) -- pode haver mais de uma tela -- so controlados por uma
  aplicao especial chamada servidor X. O pressionamento de uma tecla
  gera uma mensagem (chamada de evento) que  passada pelo servidor X 
  aplicao cliente. H um programa muito til chamado xev que permite
  observar cada evento a ele transmitido. Cliente e servidor se
  comunicam via rede usando um conjunto de regras chamado protocolo X e
  podem rodar em mquinas diferentes. A mquina onde roda o servidor 
  chamada estao de trabalho ou terminal X e a mquina onde roda a
  aplicao (programa cliente) tambm  chamada de cliente.

  Foge ao escopo deste texto a discusso mais profunda do tratamento de
  eventos no X. Para maiores informaes, sugere-se a consulta aos
  documentos mencionados na seo ``Leituras recomendadas'', mas 
  importante esclarecer que o evento enviado pelo servidor ao cliente
  no contm o cdigo numrico da tecla, chamado keycode na terminologia
  do X.  Ao invs disso,  enviado um smbolo, chamado keysymbol ou
  keysym, obtido pela consulta a uma tabela de converso mantida na
  memria do servidor.  Esta tabela pode ser modificada total ou
  parcialmente a qualquer momento por meio de requisies definidas no
  protocolo X.

  Existe um programa chamado xmodmap capaz de ler um arquivo contendo
  uma tabela de converso keycode-->keysym e envi-la, tambm na forma
  de mensagens no protocolo X, ao servidor.  responsabilidade do
  cliente e no do servidor interpretar o keysym, o que significa que a
  aplicao deve saber esperar mais um caracter ao receber uma ``tecla
  morta'' para compor uma letra acentuada.

  Desde a reviso 5 do X existe na bibliotaca de funes (Xlib) um
  mecanismo sofisticado de suporte  gerao de caracteres em diversos
  cdigos.  A funo de tratamento de entrada de texto que j existia
  nas verses anteriores, chamada XLookupString, entretanto,  no
  processa as seqncias de acentos e letras de modo transparente s
  aplicaes. Ao invs disso foi includo um mtodo de composio usando
  contextos de entrada (input contexts) por meio das funes
  XmbLookupString e XwcLookupString, cujo uso  responsabilidade da
  aplicao -- ou do seu programador, melhor dizendo -- mesmo no caso da
  tecla Compose.  Isto deve-se so fato de o X Consortium ter chegado 
  concluso de que o sistema de mapeamento de teclas no tratava de
  forma satisfatria toda a imensa variedade de lnguas escritas nas
  vrias partes do mundo. Deste modo, decidiu-se que o ``peso'' relativo
   gesto do teclado fosse transferido para as aplicaes X, o que cria
  uma dificuldade quando usamos aquelas mais antigas, que no usam o
  novo mtodo de tratar a entrada.

  Por essas razes  normalmente mais difcil conseguir acrescentar
  suporte  gerao de caracteres acentuados em aplicativos que rodam
  sob o X, principalmente quando no se possui o cdigo fonte.
  Aplicativos feitos para rodar apenas em modo texto, tais como vi e
  minicom dependero totalmente dos recursos do emulador de terminal em
  uso quando rodando em uma janela do X. Se for usada uma verso atual
  do xterm ou rxvt o emulador far o tratamento correto dos acentos.

  O francs Thomas Quinot, cansado de esperar uma soluo melhor para o
  problema da acentuao no X, resolveu implementar uma modificao para
  a Xlib proposta por Andr D. Balsa, que adiciona suporte  acentuao
  direta conforme mostrado na seo ``Contornando os limites do X''.
  Isso permite usar aplicaes como xfig ou xedit sem que seja
  necessrio alter-las. O truque parece funcionar apenas para
  caracteres do cdigo ISO-8859-1 mas  suficiente para o Portugus e
  outras lnguas. Como bem observa Balsa, a longo prazo todos os
  programas devero ser modificados para usar os novos recursos do X,
  mas como a longo prazo estaremos todos mortos a soluo de curto prazo
  de Quinot torna-se bastante atraente...


  3.  Configurao do console (modo texto)

  O documento de referncia sobre a configurao do console do Linux  o
  Keyboard and Console HOWTO, de Andries Brouwer, que pode ser
  encontrado nos repositrios do LDP. Conforme l descrito, a
  configurao da fonte de caracteres e mapa de teclado  feita usando o
  pacote KBD, encontrado em todas as distribuies de Linux.


  3.1.  Mapas de teclado

  Cada tecla do PC possui um cdigo numrico. Ao pressionarmos uma delas
  o processador controlador do teclado envia ao computador esse cdigo
  de varredura, tambm conhecido como scancode, junto com um sinal de
  que a tecla foi pressionada ou solta. As seqncias de eventos so
  ento processadas pelo driver de teclado e armazenadas em uma fila de
  caracteres que  lida pelas aplicaes por meio da chamada de funes
  do sistema operativo.

  Um mapa de teclado  um arquivo de texto que estabelace as
  correspondncias entre o scancode de tecla e o caracter (ou seqncia
  de caracteres) a gerar quando ela for pressionada, chamado keycode.
  Por exemplo:

      # atribuio da tecla '-' do teclado numrico  tecla com cdigo 74
      keycode  74 = KP_Subtract

      # atribuio da tecla '4' do teclado numrico  tecla com cdigo 75
      keycode  75 = KP_4

      # etc...

      keycode  76 = KP_5            # tecla 5
      keycode  77 = KP_6            # tecla 6
      keycode  78 = KP_Add          # soma
      keycode  79 = KP_1            # tecla 1
      keycode  80 = KP_2            # tecla 2



  Alm das teclas alfabticas, numricas e de smbolos, existem outras
  chamadas modificadoras que permitem gerar cdigos que no correspondem
  a nenhum sinal grfico: Shift Control Alt e Meta. Esta ltima
  normalmente no  encontrada em teclados de PCs, apenas em estaes de
  trabalho de fabricantes como Sun, SGI, HP e Digital (eles no gostam
  de ser chamados de ``DEC''). O editor de texto Emacs usa muito a tecla
  Meta.

  O arquivo de mapa permite tambm especificar teclas especiais chamadas
  ``teclas mortas'' (deadkeys). Quando pressionadas elas no resultam no
  aparecimento de um caracter na tela, limitando-se a alterar o
  comportamento da tecla pressionada a seguir para que, por exemplo, ao
  se digitar um ~ seguida de um a, seja gerado um `'.


  3.2.  Mapas de traduo de tela

  Um mapa de traduo de tela permite especificar qual o caracter X a
  ser exibido na tela, quando um programa deseja exibir um caracter Y.
  Desta forma, poderamos fazer com que ao escrever o caracter com o
  cdigo do c-cedilhado na tela, fosse na realidade exibido um outro
  caracter de cdigo diferente mas cuja imagem na nossa fonte de
  caracteres correspondesse  imagem de um c-cedilhado.

  Este mapeamento  necessrio apenas quando queremos usar uma fonte
  cujos caracteres no possuem cdigos diretamente correspondentes aos
  do conjunto usado no mapa de teclado.



  3.3.  Comandos do pacote KBD


     Loadkeys
        Permite carregar um mapa de teclado. Por exemplo, o comando a
        seguir carrega o mapa armazenado no arquivo portugal.map.

            loadkeys /usr/lib/kbd/keytables/portugal.map



     Setfont
        Permite o carregamento de uma fonte de caracteres de tela,
        possibilitando a alterao das fontes utilizadas em modo de
        texto. O comando a seguir, por exemplo, ir carregar uma fonte
        com o conjunto Latin-1:

            setfont lat1u-16.psf



     Showfont
        mostra todos os caracteres existentes na fonte que est
        atualmente em uso no console. O X tambm tem um comanto chamado
        showfont, que serve para mostrar as caractersticas de uma
        determinada fonte, mas no os caracteres em si. Para esta ltima
        finalidade se usa o comando xfd. Se o programa showfont do
        pacote KBD for invocado em um emulador de terminal X, como
        xterm, ele gerar um erro ``GIO_SCRNMAP: Invalid argument'', mas
        no provocar nenhum dano.

     Mapscr
        Permite carregar um mapa de traduo de tela. Suponhamos que
        exista o arquivo /etc/portugal.trad. Se executarmos o comando

            mapscrn /etc/portugal.trad


     ento a partir deste momento as tradues l definidas sero
     usadas.

     Loadunimap
        Carrega um mapa de traduo de Unicode para a fonte de tela. O
        mapa padro, chamado ``def.uni'' considera que estamos usando a
        fonte normal do IBM-PC.  Este comando no  necessrio quando
        usamos uma fonte com caracteres definidos no padro Unicode,
        pois o programa setfont carrega automaticamente a tabela de
        mapeamento adequada. O comando a seguir carregar o mapa de
        traduo para as fontes latin-1:

            loadunimap lat1



  3.4.  Carregamento de uma fonte de caracteres

  O pacote KBD contm dois tipos de fontes com codificao latin-1:

    as que j possuem uma tabela de mapeamento unicode, carregada
     automaticamente pelo programa setfont. Estas fontes tm nomes
     lat1u-*.psf;

    as que no possuem tabela de mapeamento. Neste caso  preciso
     carregar uma com o programa loadunimap. Estas tm nomes lat1-*.psf
     (o ``u'' indica Unicode).

  Nas verses mais novas do KBD os arquivos so comprimidos com gzip.  
  preciso carregar uma fonte que tenha os caractres latinos acentuados
  no padro ISO 8859-1 e tambm os smbolos semigrficos. As fontes de
  nome iso01.* no possuem esses smbolos. A fonte mais recomendada  a
  lat1u-16.psf.

  As verses mais antigas do pacote KBD mantinham essas fontes no
  diretrio /usr/lib/kbd/consolefonts, que foi trocado depois da verso
  0.92 por /usr/share/consolefonts. Dependendo da sua distribuio e do
  quanto ela esteja atualizada o diretrio poder ser um ou outro.


  3.4.1.  Slackware

  Foi criado o script /etc/rc.d/rc.font, contendo o seguinte:


      #!/bin/sh
      #
      # /etc/rc.d/rc.font
      #
      # Seleciona uma das fontes de caracteres disponiveis em
      # /usr/lib/kbd/consolefonts.
      #
      setfont lat1u-16.psf

      # O comando a seguir  totalmente desnecessrio
      # com a fonte lat1u-16.psf.
      # loadunimap lat1u

      # Remova o comentrio da linha abaixo se estiver usando uma fonte sem
      # tabela de mapeamento de Unicode para tela:
      # loadunimap lat1



  3.4.2.  Debian

  Edite o arquivo /etc/kbd/config e coloque uma linha contendo

      CONSOLE_FONT=lat1u-16.psf


  esse arquivo  processado pelo script /etc/rc.boot/kbd. Execute-o para
  ativar a nova fonte sem ter que dar ``reboot''. Lembre-se sempre:
  Linux no  Windows!


  3.4.3.  Red Hat

  Edite o arquivo /etc/sysconfig/i18n e veja se contm o seguinte:

      LANG=pt_BR
      LINGUAS=pt_BR
      LC_CTYPE=ISO-8859-1
      LC_ALL=pt_BR
      SYSFONT=lat1u-16
      SYSTERM=linux-lat



  3.4.4.  Conectiva Red Hat Linux

  Se voc selecionar a lngua correta durante a instalao no h nada
  mais a fazer. A configurao  feita extatamente como do Red Hat.


  3.4.5.  S.u.S.E.

  Edite o arquivo /etc/rc.config e procure uma linha que comea com
  ``FONT='' (linha 64, em minha mquina com S.u.S.E. vero 5.6) e
  coloque

      FONT=lat1u-16.psf



  Edite os scripts boot.setup e single contidos no diretrio /etc/rc.d.
  Procure a linha contendo o comando /usr/bin/loadunimap e remova-a ou
  ponha no seu incio um ``#'' para deix-la como comentrio. Veja
  comentrios sobre este comando na seo ``Carregamento de uma fonte de
  caracteres''.


  3.4.6.  Testando a fonte

  Experimente algumas teclas como ``,.|!"#$%&/()=?'', etc. e use o
  comando showfont para mostrar a fonte em uso.


  3.5.  Carregando um mapa de teclado

  A seguir  necessrio carregar o mapa de teclado adequado. At a
  verso 0.92 do pacote KBD esses mapas ficavam no diretrio
  /usr/lib/kbd/keytables passando mais tarde para /usr/share/keytables.
  Dependendo da distribuio voc ter um diretrio ou outro. Os mapas
  para diversos tipos de teclados so apresentados mais adiante.


  3.5.1.  Slackware.

  Foi criado o script /etc/rc.d/rc.keyboard, contendo o seguinte:

      #!/bin/sh
      #
      # /etc/rc.d/rc.keyboard
      #
      # Seleciona um dos mapas de teclado disponveis no diretrio
      # /usr/lib/kbd/keytables
      #
      loadkeys abnt2


  e acrescentei as seguintes linhas ao /etc/rc.d/rc.S, imediatamente
  antes do tratamento do /etc/rc.d/rc.keyboard:

      # Carrega uma fonte de caracteres se existe um script rc.font.
      if [ -x /etc/rc.d/rc.font ]; then
        /etc/rc.d/rc.font start
      fi

      # Carrega um mapa de teclado se existe um script rc.keyboard.
      if [ -x /etc/rc.d/rc.keyboard ]; then
        /etc/rc.d/rc.keyboard start
      fi


  3.5.2.  Debian.

  Certifique-se de ter instalado o pacote kbd e depois faa o seguinte:

    copie os arquivos com os mapas de teclado fornecidos (veja a seo
     ``Ficheiros necessrios'') para o diretrio /usr/share/keytables/.
     No  necessrio descomprimi-los;

    copie o mapa correspondente ao seu teclado para o arquivo
     /etc/kbd/default.map.gz.

    rode o script /etc/init.d/keymaps.sh.


  3.5.3.  Red Hat.

  Certifique-se de ter instalado o pacote kbd. Copie os arquivos com os
  mapas de teclado fornecidos (veja a seo ``Ficheiros necessrios'')
  para o diretrio /usr/lib/kbd/keytables/ (ou
  /usr/lib/kbd/keymaps/i386/qwerty/, a pertir do Red Hat 5.2). No 
  necessrio descomprimi-los.

  Edite o arquivo /etc/sysconfig/keyboard e coloque o nome do mapa a
  usar na varivel KEYTABLE, como por exemplo

      KEYTABLE="abnt2"



  3.5.4.  Conectiva Red Hat Linux.

  O CRHL j vem com os mapas de teclado para Portugus. Se voc
  selecionou o teclado correto durante a instalao, no h mais nada a
  fazer. Caso contrrio, edite o arquivo /etc/sysconfig/keyboard e
  coloque

      KEYTABLE="nome"


  Onde ``nome''  br-abnt2, pt ou us-acentos caso o desenho do seu
  teclado seja ABNT-2, portugus ou americano.



  3.5.5.  S.u.S.E..

  Certifique-se de ter instalado o pacote kbd. Copie os arquivos com os
  mapas de teclado fornecidos (veja a seo ``Ficheiros necessrios'')
  para o diretrio /usr/lib/kbd/keytables/. No  necessrio
  descomprimi-los.

  Descomprima o mapa de teclado adequado, copiando para o arquivo
  /etc/default.keytab, usando por exemplo um comando como

      zcat /usr/lib/kbd/keytables/pt.map.gz > /etc/default.keytab



  3.5.6.  Testando o teclado

  Experimente pressionar a tecla c-cedilhado (se o teclado no tem esta
  tecla, digite 'c). Verifique se todas as letras acentuadas, maisculas
  e minsculas so geradas corretamente e aparecem na tela. Se aparecer
  algum caracter estranho verifique se carregou o mapa de teclado e a
  fonte de caracteres corretos, pois provavelmente uma dessas operaes
  foi mal sucedida.

  Se ao invs de c-cedilha minsculo aparecer um maisculo  provvel
  que uma tabela de mapeamento Unicode incorreta esteja a ser carregada.
  Este problema ocorrer na distribuio S.u.S.E. se no se fizerem as
  alteraes nos scripts do sistema mencionadas anteriormente.

  3.6.  Verificando erros

  Mas, e se alguns dos caracteres continuarem a no aparecer? Bem, antes
  de mais nada verifique se a fonte e o mapa de teclado adequados foram
  carregados. Um caso especial  quando queremos usar uma fonte que no
  segue a codificao ISO Latin-1 ( o caso da fonte padro do console
  do PC). Teramos ento de convencer a tela a mostrar os caracteres
  certos em cada caso.

  Poderamos recorrer ao comando mapscrn.  O arquivo com a tabela de
  traduo teria no entanto de ser criado por ns, seguindo um processo
  moroso de tentativa e erro at encontrar o caracter cuja imagem
  desejvamos. Ou, de uma forma mais fcil, poderamos usar o comando
  showfont.

  Se usarmos a fonte de caracteres correta, o uso deste ltimo comando
  ser desnecessrio.  at recomendvel que no se use tal recurso,
  pois embora ele permita criar uma tabela de caracteres
  ``personalizada'' em um computador, ser difcil que um documento
  acentuado produzido nessa mquina possa ser lido em outra que no
  tenha a mesma configurao.


  4.  Biblioteca de funes libc e aplicativos GNU

  A biblioteca padro de funes do Linux suporta Internacionalizao e
  Localizao segundo o padro POSIX (Portable Operating System
  Interface).  Trata-se de uma norma estabelecida pelo IEEE (Institute
  of Electrical and Electronics Engineers) para intercomunicao entre
  diferentes sistemas operativos. Existe tambm um padro estabelecido
  pelo ANSI (American National Standards Institute) para a linguagem de
  programao C que permite escrever programas com suporte
  internacional.


  4.1.  Configurando o suporte internacional

  Resumidamente, podemos dizer que as funes que tratam informaes
  dependentes da lngua ou do pas podem ter seu comportamento
  modificado, bastando para tanto estabelecer algumas variveis de
  ambiente. E que funes so essas?  Podemos citar as de formatao de
  datas, valores monetrios e mensagens de erro do sistema. Se voc no
  sabe o que  uma varivel de ambiente, sugiro que leia o manual com o
  comando

      man environ



  O padro POSIX permite usar diversas variveis de configurao, cada
  uma delas definindo o tratamento dado a um tipo de informao, a saber

     LC_COLLATE
        Define regras para comparao entre caracteres no alfabeto
        local. Por exemplo, a letra `' deve ser tratada como idntica
        ao `a' no Portugus quando ordenamos alfabeticamente.


     LC_CTYPE
        Define regras para comparao entre caracteres maisculos e
        minsculos. Se estivermos trabalhando com o cdigo ASCII,
        sabemos que o cdigo numrico de uma letra minscula  32 a mais
        do que a maiscula correspondente, mas para uma letra acentuada
        esta regra no  vlida!


     LC_MONETARY
        Muda o comportamento das funes de formatao de valores
        monetrios e permite descobrir, por exemplo, o smbolo da moeda
        local, ou se usa ponto ou vrgula como separador de milhares e
        de casas decimais.


     LC_MESSAGES
        Estabelece a lngua em que as mensagens sero apresentadas e
        como  uma resposta afirmativa ou negativa (S/N).


     LC_NUMERIC
        Estabelece o comportamento das funes de leitura/escrita de
        valores numricos permitindo, por exemplo que usemos a vrgula
        decimal.


     LC_TIME
        Define a formatao de datas e horas.


     LC_ALL
        Define de uma s vez todas as categorias. Se usarmos LC_ALL, no
        precisaremos definir nenhuma das outras, a no ser que queiramos
        um comportamento diferente para aquele tem especfico.


     LANG
        Define de uma s vez todas as categorias, se LC_ALL no estiver
        definida.  Tambm  usada pelo comando man para compor os
        caminhos pelos quais ele procurar as pginas do manual. Veja as
        observaes a respeito desta varivel nas sees ``Locale'',
        ``Locale'' e ``Locale''.

  Maiores informaes podem ser obtidas no manual do sistema com o
  comando

      man 7 locale


  O `7' no comando anterior  necessrio para evitar confuso com uma
  funo homnima da linguagem Perl. Note que as configuraes acima
  afetam, em princpio, apenas as funes disponveis na biblioteca de
  funes da linguagem C. Na prtica, todos os programas que rodam em
  Linux usam aquela biblioteca, mas o sistema operativo no prov,
  catlogos de mensagens em diversas lnguas para todos os programas.

  A identificao da lngua e do local  feita por dois cdigos de duas
  letras, separados por um sinal ``_''. Se omitirmos o cdigo de pas,
  assume-se o pas padro para a lngua informada, mas deve haver um
  catlogo correspondente.  Deste modo, o cdigo ``pt_PT'' significa
  Portugus de Portugal, enquanto ``pt_BR'' significa Portugus do
  Brasil. Escolher uma combinao lngua/local basta ento colocar em
  seu arquivo /etc/profile uma linha contendo



      LC_ALL="pt_PT"
      export LC_ALL


  Usurios brasileiros devem usar ``pt_BR'' ao invs de ``pt_PT''. Teste
  o resultado com os comandos a seguir (/inexistente  o nome de um
  arquivo que no existe):

      echo  | tr '[:upper:]' '[:lower:]'
      tar tf /inexistente
      ls -l /
      date
      cal 1 1999


  O resultado do primeiro dever ser ``''. Os comandos tar e ls
  devem retornar mensagens em Portugus e cal deve mostrar um calendrio
  de janeiro de 1999, com do se te qu qu se s no cabealho dos dias da
  semana.

  Na distribuio Debian, certifique-se de ter instalado o pacote
  ``locales'', que pertence ao grupo ``admin''. O nome do arquivo que
  contm o pacote (na verso 2.0 da distribuio)  locales_2.0.7t-1.deb
  e em meu CD est no diretrio debian/main/binary-i386/admin.

  4.2.  Problemas com a libc 5

  At meados de 1997 todas as distribuies de Linux usavam a mesma
  biblioteca libc, que estava na verso 5, desenvolvida a partir de uma
  verso mais antiga da libc do projeto GNU. Esta biblioteca possuia
  suporte muito limitado  internacionalizao e normalmente nenhum dos
  catlogos de locais era includo na distribuio, ficando o ingls
  como lngua padro.

  A verso 6 da libc do Linux baseia-se na verso 2 da libc do projeto
  GNU. O suporte  internacionalizao foi muito melhorado, alm de
  incluir outros atributos que no interessam para os fins deste HOWTO.
  Se sua distribuio for a Debian verso 2, Red Hat verso 5 ou
  qualquer outra que use a nova libc, ento no h mais nada a fazer
  alm do descrito na seo anterior.

  Mas se voc usa uma distribuio ainda baseada na libc 5 (Slackware,
  Caldera 1.x ou uma verso mais antiga de Debian ou Red Hat)  preciso
  instalar a coleo de locais. No tente copiar a coleo de uma
  distribuio mais recente, pois os formatos dos arquivos so
  incompatveis. Pegue na pgina do Portuguese HOWTO o arquivo locales-
  pt.tgz. Para instal-lo na distribuio Slackware, basta (como usurio
  root) usar o comando

      installpkg locales-pt.tgz


  e para outras distribuies use o comando

      tar xzf locales-pt.tgz -C /



  Verifique se h dois subdiretrios do /usr/share/locale chamados pt_BR
  e pt_PT. Basta ento configurar a varivel de ambiente LC_ALL, como j
  descrito.



  5.  Configurao do X

  Quando o servidor X est ativo, ele coloca o teclado do computador em
  um modo de operao chamado raw (cru), em oposio ao modo normal,
  chamado cooked (isto mesmo: cozido). No modo raw o sistema operativo
  no processa seqncias acento-letra. O servidor X  uma daquelas
  raras aplicaes que, por dever de ofcio, tem que tratar o teclado
  ``em baixo nvel''.

  O X vem equipado com um utilitrio destinado  configurao do
  teclado, chamado xmodmap, que cumpre uma funo correspondente  do
  comando loadkeys, ou seja, l um arquivo de mapa de teclado do X,
  expecificando as equivalncias entre os keycodes e respectivos
  keysymbols.

  Eis um excerto deste arquivo:

      keycode 47 = ccedilla Ccedilla dead_acute dead_doubleacute
      keycode 48 = masculine ordfeminine dead_circumflex dead_caron
      keycode 49 = backslash bar notsign
      keycode 50 = Shift_L
      keycode 51 = dead_tilde dead_circumflex dead_grave dead_breve


  Observem que, ao contrrio do loadkeys, o xmodmap no possui um
  diretrio padro onde o arquivo  procurado.

  A configurao do X no interfere de forma alguma com a configurao
  do modo de texto.  De facto,  possvel ter o seu X bem configurado, e
  no entanto no ter realizado qualquer tipo de configurao ao modo de
  texto, e vice-versa.  Outro ponto importante de se observar  que os
  cdigos numricos das teclas no X no correspondem aos do console. A
  tecla Backspace, por exemplo, tem o nmero 14 no console, e 22 no X
  (em um computador do tipo IBM-PC).

  As verses 3.2 e posteriores do XFree86 permitam definir dead-keys,
  mas o seu tratamento  responsabilidade da aplicao, conforme visto
  na seo ``Modo texto versus Sistema de Janelas X''. H modos de
  contornar esta limitao e tornar o tratamento de dead-keys
  transparente s aplicaes, conforme mostrado na seo ``Contornando
  os limites do X''.

  Dividimos a configurao em duas partes: Uma que deve ser feita antes
  do login do usurio e outra depois.


  5.1.  Configurao do xinit

  Junto com este documento so fornecidos vrios mapas de teclado para
  uso no X. Para automatizar o processo de configurao do teclado basta
  copiar o arquivo adequado para o diretrio /usr/X11R6/lib/X11/xinit,
  onde normalmente ficam os arquivos de incio da seo de trabalho no
  X. Na distribuio Slackware esse diretrio  um link simblico para
  /var/X11R6/lib/xinit e na Debian e na Red Hat para /etc/X11/xinit.

  Nas distribuies Slackware e Red Hat, verifique se no referido
  diretrio existe um arquivo chamado .Xmodmap. Se existir, copie o
  Xmodmap.<alguma-coisa>  para ele, ou faa um link.  Normalmente o
  arquivo de configurao xinitrc possui os comandos para carreg-lo
  automaticamente. Veja o seguinte trecho:



      #!/bin/sh
      # $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

      userresources=$HOME/.Xresources
      usermodmap=$HOME/.Xmodmap
      sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
      sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap

      # merge in defaults and keymaps

      if [ -f $sysresources ]; then
          xrdb -merge $sysresources
      fi

      if [ -f $sysmodmap ]; then
          xmodmap $sysmodmap
      fi



  Na distribuio Debian o mapa de teclado padro do X 
  /etc/X11/Xmodmap, basta copiar o mapa desejado para aquele arquivo.
  Ele ser carregado pelo xinitrc, que por sua vez  um link simblico
  para /etc/X11/Xsession, sempre que iniciar a seo de trabalho do
  usurio.


  5.2.  Configurao do XDM

  Existe ainda um pequeno problema: no meu computador, por exemplo, o
  sistema carrega diretamente o X ao dar boot e o login  feito pelo X
  Display Manager (xdm). Como o xdm faz o login antes de iniciar a seo
  de trabalho, o mapa de teclado no ser carregado, o que pode criar
  problemas se o usurio usa caracteres como ``['' ou ``]'' em sua
  senha, pois nos teclados ABNT-2 e portugus esses smbolos so gerados
  por teclas cujos cdigos numricos no so os mesmos do teclado
  americano.

   preciso fazer uma pequena alterao no arquivo de configurao
  Xsetup_0.  Esse arquivo deve estar no diretrio
  /usr/X11R6/lib/X11/xdm, que na Slackware  um link simblico para
  /var/X11R6/lib/xdm e /etc/X11/xdm na Debian e -- sujeito a confirmao
  -- RedHat. Eis o contedo completo desse arquivo:

      #!/bin/sh
      #
      # /usr/X11R6/lib/X11/xdm/Xsetup_0
      #

      sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
      sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap

      # merge in defaults and keymaps

      if [ -r $sysresources ]; then
          xrdb -merge $sysresources
      fi

      if [ -r $sysmodmap ]; then
          xmodmap $sysmodmap
      fi

      xconsole -geometry 480x130-0-0 -daemon -notify -verbose -exitOnFail



  A distribuio Debian tem um Xsetup_0 um pouco diferente, em
  /etc/X11/xdm/Xsetup_0, mas basta acrescentar-lhe o seguinte:


      sysmodmap=/etc/X11/Xmodmap
      sysresources=/etc/X11/Xresources

      if [ -f $sysresources ]; then
        xrdb -merge $sysresources
      fi

      if [ -f $sysmodmap ]; then
        xmodmap $sysmodmap
      fi



  Se no seu computador o login do usurio tambm for feito sempre via
  xdm, no  necessrio mexer no xinitrc, como mostrado na seo
  anterior, j que o mapa de teclado ser carregado antes do incio na
  seo do usurio.


  5.3.  Compose

  Uma das coisas mais importantes a definir quando vamos utilizar
  acentuao por meio de dead-keys  o conjunto de regras de composio.
  Essas regras determinam, por exemplo que a composio do caracter
  ' com a letra e gerar um .

  Ao contrrio do console, no qual podemos definir as regras de
  composio no prprio mapa de teclado, no X essas regras so colocadas
  no arquivo /usr/X11R6/lib/X11/locale/???/Compose, onde ???  a
  codificao em uso (no nosso caso, iso8859-1).

  Para facilitar o uso dos mapas para teclados que no tm o c-
  cedilhado, como o US+ (veja adiante)  conveniente definirmos uma nova
  regra de composio, permitindo que o  seja gerado pela seqncia 'C.
  Se no fizermos isso, seremos obrigados a digitar <dead_cedilla-C>,
  sedo o dead_cedilla produzido pela combinao AltGR-=, o que no 
  nada confortvel. Alm disso, no teclado americano somos obrigados a
  usar as aspas duplas para gerar o trema.

  O arquivo Compose fornecido foi feito procurando imitar ao mximo o
  comportamento do console e possui as seguintes facilidades para
  gerao de caracteres:

    C-cedilha: tecla  ou seqncia <acento-agudo>-C

    Apstrofo: tecla ' ou seqncias <acento-agudo>-<acento-agudo> e
     <acento-agudo>-<espao>

    Acento grave: seqncias <acento-grave>-<acento-grave> e <acento-
     grave>-<espao>

    Aspas: tecla " ou seqncia <trema>-<trema>

    Trema: seqncia <trema>-<espao>

    Til: seqncias <til>-<espao> e <til>-<til>

    Circumflexo: seqncias <circumflexo>-<espao> e
     <circumflexo>-<circumflexo>

  Para incluirmos as novas regras, basta aplicar uma alterao 
  definio original. O arquivo Compose.patch pode ser obtido via WWW na
  pgina do Portuguese HOWTO. Para aplicar a atualizao, copie-o para o
  diretrio /usr/X11R6/lib/X11/locale/iso8859-1/, faa uma cpia de
  reserva do Compose original e invoque o utilitrio patch:

      cp -p Compose Compose.backup
      patch < Compose.patch



  Caso voc prefira no aplicar o ``patch'', um arquivo Compose pronto
  tambm  fornecido. Lembre-se de fazer cpia do original antes de
  substitu-lo!

  5.4.  Locale

  Para os usurios brasileiros, pode haver mais uma alterao a fazer no
  X.  Conforme vimos na seo ``Biblioteca libc'', uma varivel de
  ambiente (LANG ou LC_ALL) configura o suporte internacional existente
  na biblioteca de funes padro do sistema (libc). A biblioteca de
  funes do X (Xlib) usa a varivel LANG para identificar a lngua em
  uso mas at a reviso 6.3, na qual  baseado o XFree86, no era
  includa a combinao ``pt_BR'', correspondente a Portugus/Brasil.
  Como resultado, cada vez que executarmos um aplicativo X com LC_ALL
  definido como ``pt_BR'' ele emitir a mensagem ``Warning: locale not
  supported by Xlib, locale set to C''.

  Para incluir o local pt_BR no X11R6.3 basta alterar trs arquivos
  existentes no diretrio /usr/X11R6/lib/X11/locale. Pegue o arquivo
  Xlocale.patch via WWW na pgina do Portuguese HOWTO. Para aplicar a
  atualizao, copie-o para o diretrio /usr/X11R6/lib/X11/locale, faa
  uma cpia de reserva dos arquivos a serem alterados e invoque o
  utilitrio patch:

      cp -p compose.dir compose.dir.backup
      cp -p locale.alias locale.alias.backup
      cp -p locale.dir locale.dir.backup
      patch < Xlocale.patch



  Caso voc prefira no aplicar o ``patch'', arquivos prontos tambm so
  fornecidos. Lembre-se de fazer cpias dos originais antes de
  substitu-los!

  Em setembro de 1998 o fix-2 da reviso 6.4 do X Window System incluiu
  oficialmente o suporte ao local pt_BR. Infelizmente neste mesmo fix-2
  foi introduzida uma falha em uma das funes de tratamento de input
  contexts da Xlib que provoca violaes de acesso  memria. Uma das
  aplicaes afetadas  o processador de textos LyX. Uma correo
  provavelmente ser includa no fix-4. O X11R6.4 dever ser a base para
  a verso 4 do XFree86.


  5.5.  Gerao de mapas com o XKeyCaps

  O programa XKeyCaps, criado por Jamie Zawinski  uma interface grfica
  para o xmodmap, que mostra na tela o desenho de um teclado e permite
  modificar interativamente os smbolos gerados por cada tecla e gerar
  automaticamente o arquivo .Xmodmap correspondente.

  Ele pode ser obtido via WWW em  <http://www.jwz.org/xkeycaps/> e, a
  partir da verso 2.43, j incoropra tambm suporte para o desenho
  brasileiro (ABNT2), uma contribuio de Andre Gerhard.



  5.6.  Contornando os limites do X

  Conforme foi explicado na seo ``Modo texto versus Sistema de Janelas
  X'', o tratamento de acentos deve ser feito pela aplicao, mas ainda
  h muitos programas que no levam isto em considerao, tais como
  Netscape Navigator/Communicator e Nedit. Como no  possvel modificar
  muitos deles,  preciso encontrar outro tipo de soluo.


  5.6.1.  Alterao da biblioteca Xlib

  Linux, assim como a maioria dos sistemas operacionais modernos, usa um
  sistema de vnculo de programas a bibliotecas de funes chamado
  ``ligao dinmica'' (dynamic binding). Deste modo, podemos modificar
  o comportamento de um programa alterando uma dessas bibliotecas.
  Maiores informaes sobre este tema pode ser obtida nos manuais do
  Linux com os comandos

      man ld.so
      man ldconfig
      man ldd
      man dlopen


  Thomas Quinot criou uma alterao para a biblioteca de funes do X
  (Xlib) introduzindo o tratamento de acentos na funo XLookupString,
  Tudo que se tem a fazer  substituir o arquivo contendo esta bib
  lioteca por outro, que pode ser obtido via internet no endereo


       <http://web.fdn.fr/~tquinot/dead-keys.en.html>


  Existem duas verses do arquivo, uma para sistemas onde as bibliotecas
  do X suportam o uso seguro de threads (Debian 2.x, Red Hat 5.x, etc.)
  e outra para os sistemas que no possuem tal atributo (Slackware,
  Caldera 1.x). Se voc no sabe o que so threads no se preocupe com
  isso, mas saiba que eles permitem criar um programa capaz de se
  dividir em sub-processos que rodam concorrentemente em um computador.
  Para analisar sua Xlib rode o seguinte comando:


       nm --dynamic /usr/X11R6/lib/libXext.so.6|grep _Xglobal_lock


  Se aparecer ``U _Xglobal_lock'' seu sistema suporta threads e o
  arquivo a obter  libX11-XF3.3.1-TS.tar.gz. Se no aparecer, seu
  sistema no suporta threads e o arquivo a obter 
  libX11-XF3.3.1.tar.gz. Tendo obtido o arquivo, copie-o para um
  diretrio temporrio e extraia seu contedo.  Mova o arquivo
  /usr/X11R6/libX11.so.6.1 para outro diretrio, para preserv-lo. No 
  suficiente renome-lo! Remova-o para um diretrio cujo nome no esteja
  contido no arquivo /etc/ld.so.conf. Depois, mova o novo arquivo para o
  lugar do antigo e rode o programa ldconfig (isto deve ser feito pelo
  usurio root):

      cp libX11-XF3.3.1-TS.tar.gz /tmp
      cd /tmp
      tar xzf libX11-XF3.3.1-TS.tar.gz
      mkdir /usr/X11R6/oldlib
      mv /usr/X11R6/lib/libX11.so.6.1 /usr/X11R6/oldlib
      mv libX11.so.6.1 /usr/X11R6/lib
      chown root:root /usr/X11R6/lib/libX11.so.6.1
      chmod 755 /usr/X11R6/lib/libX11.so.6.1
      /sbin/ldconfig

   aconselhvel que a operao seja realizada quando nenhuma aplicao
  X estiver rodando. A seguir, edite o arquivo de configurao do
  servidor X, chamado XF86Config. Este arquivo fica no diretrio /etc
  (Slackware) ou /etc/X11 (Debian, Red Hat). Procure a seo
  ``Keyboard'' e inclua a opo ``XkbDisable'', conforme mostrado a
  seguir:

      Section "Keyboard"
         Protocol        "Standard"
         XkbDisable
      EndSection



  A opo XkbDisable inabilita a extenso XKEYBOARD do servidor X, o que
  neste caso serve para sinalizar  funo XLookupString que ela deve
  tratar os acentos. Se quisermos voltar ao comportamento normal, basta
  retirar a opo do XF86Config.

  Configure o mapa de teclado do X conforme explicado nas sees
  anteriores deste documento. Para testar o resultado, rode o programa
  xedit e digite alguns caracteres acentuados.


  5.6.2.  Alterao no kernel do Linux


       Esta seo  baseada em contribuio enviada por Bruno Bar
       beri Gnecco e na documentao do diacrd. Podem haver ainda
       alguns erros e se algum os detectar, por favor avise-me.


  Seguindo a regra geral do mundo *nix, existe sempre mais de um modo se
  resolver o mesmo problema. Conforme vimos anteriormente, existem dois
  modos de operao do teclado, chamados raw e cooked. Estes modos de
  operao podem ser mudados com o programa kbd_mode, integrante do
  pacote kbd, o que no  recomendvel fazer a no ser para restaurar o
  estado do console aps um desastre com o servidor X, por exemplo. No
  modo raw o kernel no processa os diacrticos (acentos).

  Cedric Adjih criou uma alterao para o kernel que permitia tratar os
  acentos mesmo em modo raw, inicialmente voltada para o teclado de
  desenho francs.  Enas Queiroz, Andr D. Balsa e Claudemir Todo Bom
  fizeram melhorias e o adaptaram para os teclados internacional,
  portugus e ABNT. O tratemanto de acentos  feito parte pelo kernel,
  parte por um processo que roda em retaguarda (daemon) chamado diacrd,
  conforme descrito a seguir:

    Uma modificao no kernel faz que todos os dados lidos do teclado
     sejam redirecionados para um dispositivo especial do sistema
     chamado /dev/rawkbd quando o teclado estiver em modo raw.

    Os dados que o kernel grava no /dev/rawkbd so lidos pelo programa
     diacrd, que processa as seqncias acento-letra e reescreve no
     /dev/rawkbd os caracteres acentuados na forma de cdigos de
     varredura (scancodes) que normalmente no existem no teclado.

    O kernel l no /dev/rawkbd os cdigos gravados pelo diacrd e os
     passa  aplicao, que no caso  o servidor X.

    O servidor X mapeia os cdigos de varredura para caracteres. Um
     mapa de teclado especial permite ento gerar as letras acentuadas.

  O diacrd pode ser obtido via FTP annimo no endereo


  <ftp://metalab.unc.edu/pub/Linux/system/keyboards>


  H verses diferentes, de acordo com o tipo de teclado e, pelo menos
  por enquanto, no se pode reconfigur-lo sem recompilar. Para fazer a
  instalao, de acordo com o arquivo ``README'', deve-se fazer o
  seguinte (pelo usurio root):

    Obtenha o arquivo -.tar.gz correspondente a seu teclado. Extraia
     seu contedo, o que dever criar um diretrio chamado
     diacrd-<verso>.

    Edite o arquivo diacrd.c e remova os comentrios desejados, de
     acordo com suas preferncias. Pode-se incluir capacidade de rodar o
     programa xmodmap e ejetar o CD-ROM sob controle do pressionamento
     de uma combinao de teclas.

    Aplique a modificao no kernel. Para isto, execute o comando
     ``make patch-usr-src''.

    Crie o dispositivo /dev/rawkbd executando o comando
     ``make rawkbd''.

    Compile o diacrd e instale-o executando os comandos ``make'' e
     ``make install''.

    Compile e instale o kernel, com os comandos

         cd /usr/src/linux
         make config
         make zlilo


  Para maiores informaes sobre compilao/instalao do kernel, leia o
  Kernel-HOWTO, disponvel via Internet nos repositrios do LDP men
  cionados na seo ``Onde encontrar a verso mais atual''.

    D um ``reboot'' no computador. Verifique se o suporte ao
     dispositivo rawkbd foi instalado com sucesso com o comando

         dmesg | grep RAWKBD


  Deve aparecer

      RAWKBD interface for diacriticals translation enabled...


  e teste o dispositivo /dev/rawkbd com o comando

      printf "### TESTANDO ###" >> /dev/rawkbd


  Veja na seo ``Configurao do console'' como carregar um mapa com
  suporte  acentuao. O pacote diacrd vem com um arquivo chamada
  usintl.map, que corresponde ao nosso us+.map. Se seu teclado no for
  do tipo americano, use o pt.map ou abnt-2.map.

    Substitua o arquivo /usr/X11R6/lib/X11/xkb/keycodes/xfree86 pelo
     arquivo fornecido junto com o diacrd.

    Se tudo correr bem, rode o programa diacrd. Depois ative o X e use
     o xmodmap para carregar o mapa xmodmap.diacrd.

  Se a gerao de acentos funcionar,  preciso tornar permanentes as
  alteraes necessrias. Pode-se faz-lo incluindo a carga do diacrd no
  arquivo /etc/rc.d/rc.local (Slackware).

       Se algum dos leitores tiver criado um script de ativao do
       diacrd para a distribuio Debian ou Red Hat, por favor
       envie-o para que seja includo aqui.


  Mais informaes sobre o diacrd podem ser encontradas no ``Dead keys
  Mini-HOWTO'' de Claudemir Todo Bom, disponvel em  <http://linux.uni
  camp.br/docs/diversos/deadkeys.html>.


  5.6.3.  Comparao entre as duas solues

  Em termos de resultados prticos, a Xlib modificada e o diacrd so
  equivalentes. H porm algumas diferenas entre as duas solues que
  merecem ateno.

  Diacrd exige uma alterao no kernel do Linux para resolver um
  problema que o kernel j resolve, o que no deixa de parecer um tanto
  redundante. A dependncia de um processo de usurio (o daemon kerneld)
   uma desvantagem, pois se esse programa deixar de funcionar perde-se
  o suporte  acentuao no X. Trata-se de uma soluo ainda em
  desenvolvimento e, segundo o contedo da documentao que o acompanha,
  o ideal seria que todo o tratamento fosse feito pelo kernel, sem
  depender de outro programa.

  At o momento da publicao deste HOWTO, o diacrd ainda no era
  compatvel com a verso 2.2 do kernel do Linux.

  A soluo via Xlib , pelo menos em teoria, totalmente transparente s
  aplicaes e permite reconfigurao em tempo de execuo, bastando
  alterar o mapa de teclado do X e as regras de composio. J o diacrd
  precisa ser recompilado se quisermos trocar o tipo de teclado, mas 
  possvel que novas verses incorporem algum recurso de reconfigurao.

  O diacrd s funciona no teclado do prprio computador. Se quisermos
  usar um display remoto, seja um terminal X, seja um outro computador,
  no teremos suporte  acentuao. A troca da Xlib, por outro lado,
  enquadra-se plenamente na filosofia do X de que o servidor prov
  mecanismo, deixando a cargo da aplicao a definio de polticas.
  Exemplo da vantagem deste paradigma  poder usar as tcnicas descritas
  na seo ``Configurao do X'' em outros sistemas operativos e com
  terminais X.

  A soluo via Xlib parece-me mais ``limpa'' e  minha predileta, mas,
  como sempre, fica a critrio do usurio ou do administrador do sistema
  qual alternativa escolher. De qualquer modo, sempre  bom lembrar qua
  ambas as solues so remendos. Considerando-se a rpida evoluo que
  est a ocorrer no campo do software livre, com o desenvolvimendo de
  ambientes de trabalho como KDE, GNOME e GNUStep, podemos supor que em
  breve nenhum desses remendos ser mais necessrio.


  6.  Configurao dos vrios programas


  6.1.  Aplicativos

  A maioria das aplicaes que rodam no Unix usa algum tipo de arquivo
  de configurao que o usurio coloca em seu diretrio de trabalho
  (home) e cujo nome normalmente  .alguma-coisarc. Tanto quanto
  possvel, tentei evitar que isso fosse necessrio, pois alm de dar
  mais trabalho ao usurio (e ao administrador da rede ;-) pode
  dificultar um pouco as coisas. Por exemplo, aqui no CPMet temos o
  diretrio home compartilhado entre um servidor Alpha rodando DEC UNIX
  com os PCs rodando Linux via NFS (at a maior parte do Linux est
  instalada no Alpha, os PCs s tm a partio raiz e uma rea de swap).
  Os arquivos podem necessitar algum ajuste dependendo da plataforma e
  nem todos os programas possuem flexibilidade bastante para isso.

  Uma opo que muitos programas tambm oferecem  especificar em uma
  varivel de ambiente o nome do arquivo de configurao ou o uso de
  arquivos padro que normalmente ficam em um diretrio /usr/lib/alguma-
  coisa ou /etc/alguma-coisa.


  6.1.1.  Bash (biblioteca GNU readline)

  Os programas que utilizam a biblioteca GNU readline para ler a linha
  de comando procuram por um arquivo chamado .inputrc no diretrio
  ``HOME'' do usurio caso no exista uma varivel de ambiente INPUTRC
  contendo o caminho para um arquivo de configurao.

  Coloque uma linha no seu arquivo /etc/profile contendo

      INPUTRC="/etc/inputrc"
      export INPUTRC


  e crie um arquivo /etc/inputrc contendo

      set meta-flag on
      set convert-meta off
      set output-meta on


  Outra alternativa  criar um arquivo .inputrc no diretrio home do
  usurio com o contedo acima, mas  muito difcil manter atualizados
  os arquivos de todos os usurios, principalmente quando eles so
  muitos.  Um inputrc mais completo pode ser obtido via WWW na pgina do
  Portuguese HOWTO. Ele contm opes para vrios tipos de terminal e
  permite usar as teclas de movimento de cursor para percorrer o
  histrico de comandos (setas para cima e para baixo); ir para o
  primeiro e para o ltimo comandos do histrico (teclas PageUp e Page
  Down); posicionar o cursor na linha (setas para a esquerda e direita)
  e posicionar o cursor no incio e no fim da linha (teclas Home e End).

  Para maiores informaes leia os manuais do bash e da biblioteca
  readline com os comandos

      man bash
      man readline



  6.1.2.  Emacs

  O pai de todos os editores pode ser configurado criando-se um arquivo
  chamado .emacs no diretrio do usurio, contendo as seguintes linhas:

      (set-input-mode nil nil 1)
      (standard-display-european t)
      (require 'iso-syntax)



  Para tornar esta configurao global, na distribuio Slackware
  coloque os comandos no arquivo /usr/lib/emacs/site-lisp/site-start.el.
  Na distribuio Debian o emacs executa todos os scripts contidos no
  diretrio /etc/emacs/site-start.d ao ser carregado. Tudo que se tem a
  fazer  colocar esses comandos em um arquivo chamado, por exemplo,
  01portugues-emacs.el.

  Se o estimado leitor, assim como eu, no se agrada do tratamento dado
  pelo Emacs s teclas de Delete, Home e End, aproveite a oportunidade e
  acrescente ao mesmo arquivo o seguinte:

      (global-unset-key [backspace] )
      (global-set-key [backspace] 'delete-backward-char)
      (global-unset-key [delete] )
      (global-set-key [delete] 'delete-char)
      (define-key global-map [home] 'beginning-of-line)
      (define-key global-map [C-home] 'beginning-of-buffer)
      (define-key global-map [end] 'end-of-line)
      (define-key global-map [C-end] 'end-of-buffer)



  Arquivos de configurao prontos podem ser obtidos via WWW na pgina
  do Portuguese HOWTO. Para Slackware, h um site-start-emacs.el, que
  deve ser copiado para o diretrio /usr/lib/emacs/site-lisp com o nome
  de site-start.el. Para Debian, h um 01portugues-emacs.el que deve ser
  copiado para o diretrio /etc/emacs/site-start.d.

  Certifique-se de estar usando a verso 24-out-1998 ou mais recente do
  arquivo de mapa de teclado para o X, pois ela possui uma correo no
  tratamento das teclas modificadoras Alt e Meta, que so muito usadas
  pelo Emacs.


  6.1.3.  flex

  Especifique a opo -8 se o parser a gerar necessitar de ler dados de
  8 bit.


  6.1.4.  Fortune

  Fortune  aquele programa que toda vez que  invocado apresenta uma
  pequena mensagem, geralmente bem humorada. Ele  inspirado nos
  biscoitos da fortuna chineses (em ingls fortune cookies, da o nome).
  Eis algumas mensagens tpicas:

      dROGA!!oNDE ESTA O cAPSLOCK??

      Mouse no encontrado, bater no gato? (S/N)

      Que fio  ess<=V++088.../NO CARRIER

      Quem ri por ltimo est conectado a 2400Bit/s.


  Tudo que o programa faz  escolher aleatoriamente uma mensagem em um
  repositrio mantido no diretrio /usr/games/fortunes (Slackware) ou
  /usr/share/games/fortunes (Debian). Neste diretrio existem diversos
  arquivos com as ``fortunas'' e um arquivo ndice para cada um deles,
  que possui a extenso .dat. O formato dos arquivos  muito simples:
  cada fortuna  composta de uma srie de linhas de texto. As fortunas
  so separadas umas das outras por linhas contendo apenas um caracter
  %. Veja o trecho a seguir:



      O que so quatro pontos na parede? Four migas. Ugh!
      %
      Errar  humano, botar a culpa no computador  mais humano ainda.
      %
      A ela me disse: Ou eu ou o modem! Sinto muitas saudades dela...


  Tudo que temos a fazer  criar um arquivo com as fortunas chamado,
  digamos fortunes com o formato descrito acima. Depois basta usar o
  programa strfile para gerar o ndice:

      strfile fortunes


  e um arquivo chamado fortunes.dat ser criado. Claro que se quisermos
  que o fortune mostre apenas mensagens em Portugus, teremos que
  remover os arquivos existentes no diretrio original. Sugiro simples
  mente renome-lo para fortunes-en (de English) e criar outro vazio.
  Eu coletei algumas fortunas e as coloquei no arquivo fortunes-
  pt.tar.gz que pode ser obtido via WWW na pgina do Portuguese HOWTO.
  No esquea de colocar no seu /etc/profile algumas linhas contendo uma
  chamada ao fortune, por exemplo

      if [ -x /usr/games/fortune -a ! -e $HOME/.hushlogin ]; then
         echo
         /usr/games/fortune
         echo
      fi


  Uma ltima informao: se o nome de um arquivo termina com o sufixo -o
  o fortune s o consulta se for chamado com a opo -o. Esses arquivos
  so os que contm mensagens cujo contedo pode ser considerado ofen
  sivo por algumas pessoas, tais como

      S no mando a sogra pro inferno, com pena do Diabo.


  Claro que existem coisas muito mais ofensivas por a, mas este  um
  Linux HOWTO e no queremos realmente ofender ningum, certo?


  6.1.5.  Ispell

  Dicionrios para o Portugus de Portugal podem ser obtidos via WWW na
  pgina do Projecto Natura em
  <http://www.di.uminho.pt/~jj/pln/pln.html>. Para o Brasil, h uma
  verso compilada pelo Ueda: <http://www.ime.usp.br/~ueda/>.


       Eu gostaria de poder colocar maiores informaes, mas ainda
       no tenho conhecimento suficiente sobre o Ispell e no posso
       ensinar o que no sei. Preciso de ajuda aqui.



  6.1.6.  JDK (inclui ICQJava)


       Esta informao  baseada em uma mensagem da qual guardei o
       contedo mas no o remetente. Peo desculpas e espero que
       perdoe a falha. No testei pessoalmente a informao e peo
       que me escrevam confirmando tanto a correo quanto, se
       possvel, a identidade do autor.


  O JDK utiliza fontes padro que no suportam acentos. Isto quer dizer
  que letras com acentos so ignoradas e, geralmente, confundem o resto
  do texto.  Resolver isto  extremamente fcil:

    entre no diretrio jdk1.1.5/lib (no meu caso, /jdk1.1.5/lib);

    copie o arquivo font.properties.hu sobrescrevendo o font.properties
     atual (lembre-se de fazer backups!);

    entre no jdk e divirta-se! Fazendo isto, seu ICQ e todos os
     aplicativos que usem o jdk estaro aptos a lerem acentos! (fcil,
     no?)


  6.1.7.  Joe

  Invoque o joe com a opo -asis na linha de comando ou altere os
  arquivos de configurao para ativar tal opo. Na Slackware eles
  esto no diretrio /usr/lib/joe. Tudo que se tem a fazer  remover o
  espao em branco existente no incio de cada linha. Outra alternativa
   acrescentar a seguinte linha ao arquivo /etc/profile:

      alias joe='joe -asis'



  Joe pode emular os editores Pico, emacs e WordStar. Um arquivo joerc
  est disponvel via WWW na pgina do Portuguese HOWTO, contendo
  configuraes que permitem usar as teclas Home e End para movimentar o
  cursor para o incio e fim da linha.


  6.1.8.  Less

  Coloque as seguintes linhas no seu arquivo /etc/profile:

      LESS="-MM -i"
      LESSCHARSET="latin1"
      LESSKEY="/etc/lesskey"
      LESSOPEN='|lesspipe.sh "%s"'
      export LESS LESSCHARSET LESSKEY LESSOPEN


  LESSKEY informa o nome de um arquivo contendo uma tabela de seqncias
  de caracteres geradas por cada tecla e as aes a serem tomadas pelo
  less.  Para criar o arquivo /etc/lesskey, crie primeiro o arquivo
  /etc/lesskey.in contendo as seguintes linhas:



      # Termianl ANSI (console do Linux, XTerm, etc)
      \e[1~      goto-line
      \e[4~      goto-end
      \e[5~      back-screen
      \e[6~      forw-screen
      \e[7~      goto-line
      \e[8~      goto-end
      \e[A       back-line
      \e[B       forw-line
      # XTerm
      \eOH       goto-line
      \eOF       goto-end
      \e[H       goto-line
      \e[F       goto-end
      # Console Sun (testado com teclados Type 4/5)
      \e[214z    goto-line
      \e[220z    goto-end
      \e[216z    back-screen
      \e[222z    forw-screen
      # Arquivo seguinte/anterior
      :n  next-file
      :N  next-file
      :p  prev-file


  Depois ``compile-o'' usando o comando

      # lesskey -o /etc/lesskey /etc/lesskey.in


  Crie o arquivo /usr/bin/lesspipe.sh contendo

      #!/bin/sh
      # This is a preprocessor for 'less'.  It is used when this environment
      # variable is set:   LESSOPEN="|lesspipe.sh %s"

      case "$1" in
        *.rpm) rpm -qilp "$1" 2>/dev/null ;;
        *.tar) tar tvvf "$1" 2>/dev/null ;;
        *.tgz | *.tar.gz | *.taz | *.tar.Z | *.tar.z)
          tar tzvvf "$1" 2>/dev/null ;;
        *.tbz2 | *.tar.bz2)
          bzip2 -dc "$1" | tar tvvf - 2>/dev/null ;;
        *.Z) gzip -dc "$1"  2>/dev/null ;;
        *.z) gzip -dc "$1"  2>/dev/null ;;
        *.[1-9].gz | *.n.gz | *.man.gz)
          FILE=`file -Lz "$1" | cut -d ' ' -f 2`
          if [ "$FILE" = "troff" ]; then
            gzip -dc "$1" | groff -s -p -t -e -Tlatin1 -mandoc
          fi ;;
        *.gz) gzip -dc "$1"  2>/dev/null ;;
        *.zip) unzip -l "$1" 2>/dev/null ;;
        *.[1-9] | *.n | *.man)
          FILE=`file -L "$1" | cut -d ' ' -f 2`
          if [ "$FILE" = "troff" ]; then
            groff -s -p -t -e -Tlatin1 -mandoc "$1"
          fi ;;
      esac


  No esquea de torn-lo executvel:

      chmod 755 /usr/bin/lesspipe.sh



  Na distribuio Debian j existe um script /usr/bin/lesspipe (note a
  ausncia da extenso .sh). Para os curiosos a respeito da referncia a
  ``*.rpm'', embora na mquina em questo se use Slackware,  possvel
  ter o utilitrio RPM instalado tambm, o que facilita tomar
  ``emprestados'' pacotes do Red Hat, Caldera e S.u.S.E.. Existe um
  RPM+Slackware Mini-HOWTO que explica como fazer isso.


  6.1.9.  ls

  Acrescente a seguinte linha ao arquivo /etc/profile :

      alias ls="ls -N"


  ou

      alias ls="ls -b"


  Se a sua distribuio de Linux usa o GNU ls (todas as que eu conheo
  usam) basta acrescentar ao arquivo /etc/profile ou .profile as
  seguintes linhas:

      # -----------------------------------------
      # Set up the color-ls environment variables
      # -----------------------------------------
      if [   "$SHELL" = "/bin/bash" -o \
             "$SHELL" = "/bin/sh" ]; then
         eval `dircolors -b`
      elif [ "$SHELL" = "/bin/zsh" ]; then
         eval `dircolors -z`
      elif [ "$SHELL" = "/bin/ash" ]; then
         eval `dircolors -s`
      elif [ "$SHELL" = "/bin/ksh" -o \
             "$SHELL" = "/bin/pdksh" ]; then
         eval `dircolors -k`
      elif [ "$SHELL" = "/bin/csh" -o \
             "$SHELL" = "/bin/tcsh" ]; then
         eval `dircolors -c`
      else
         eval `dircolors -b`
      fi


  Se o seu shell  o csh ou tcsh, acrescente a seguinte linha ao arquivo
  /etc/csh.login ou ~/.login:

      alias ls 'ls --color'



  6.1.10.  LyX

  Para aqueles que acham trabalhoso escrever documentos para o LaTeX
  usando um simples editor de texto (e realmente ) LyX  uma excelente
  opo.  Este programa cria uma interface grfica atravs da qual
  editamos os documentos que sero depois formatados pelo LaTeX. O
  ambiente  quase-WYSIWYG (What You See Is What You Get - O que tu vs
   o que tu obtns). LyX no roda apenas em Linux, mas em qualquer
  Unix. Maiores informaes podem ser obtidas em


       <http://www.lyx.org>

  A partir da verso 1.0.1 do LyX j tem a interface com o usurio em
  Portugus, traduzida por Pedro Krger, que tambm est traduzindo os
  manuais, junto com Roberto Mello. Estas tradues j fazem parte da
  distribuio oficial do LyX.

  Tendo o LyX instalado,  muito fcil criar documentos com acentuao
  em Portugus. Seguindo as seguintes regras:


    Se o teclado foi configurado para ter dead keys usando um dos mapas
     aqui fornecidos, no  necessrio fazer mais nada. Basta digitar o
     texto normalmente usando as seqncias de acentuao. A nica
     exceo  o c-cedilha que no pode ser gerado usando a seqncia
     'c, pois o LyX gera um c com acento. Temos que usar a seqncia
     Compose-vrgula-c.

    Se o teclado no foi configurado para ter dead keys ainda assim 
     possvel acentuar no LyX. Selecione o menu Options/Keyboard. Na
     caixa de dilogo ``Key Mappings'', selecione no tem
     Language/Primary a opo ``American''.  Com isto o LyX far a
     composio dos caracteres acentuados usando regras semelhantes s
     das dead keys.

    A vrgula ser tratada como cedilha. Para obter um `'digite ,C e
     para obter uma vrgula digite ,,. Cuidado! A seqncia ,<espao>
     gerar uma cedilha isolada e no uma vrgula!

    ~ ^ ' e ` sero tratados como acentos. Vale a mesma regra anterior:
     para obter apenas o acento, pressione a tecla duas vezes
     consecutivas.

    : ; . / ? e - tambm sero tratados como acentos. ?a gerar um `'
     e assim por diante.

  Para o LyX imprimir corretamente,  necessrio que, ao criar um novo
  documento, sejam selecionados a lngua e a codificao de caracteres
  adequadas. Crie um documento selecionando o menu File/New.  Depois
  selecione o menu Layout/Document. Na caixa de dilogo ``Document
  Layout'' selecione no tem Language a opo ``brazil'' ou ``portuges''
  (sem o u mesmo); no tem Encoding selecione ``latin1''.

  Veja a observao sobre o pacote algorithm na seo ``TeX e LaTeX''

  Uma observao final sobre o LyX: a verso atual (1.0.x) utiliza a
  biblioteca XForms para construir a interface com o usurio. Como essa
  biblioteca no tem suporte para acentuao, no  possvel digitar
  letras acentuadas nas caixas de dilogo, somente no corpo do documento
  editado. Segundo os desenvolvedores, nas novas verses do LyX ser
  possvel escolher o tipo de interface ao compilar o programa, o que
  permitir o uso de toolkits mais flexveis. J existe uma verso de
  LyX portada para o toolkit Qt, usado no KDE, chamada KLyX. Os autores
  so Matthias Ettrich -- autor original do LyX -- e Kalle Dalheimer.
  Para maiores informaes, consulte via WWW:  <http://www-
  pu.informatik.uni-tuebingen.de/users/ettrich/>.


  6.1.11.  Man, groff, troff

  Pode-se usar a opo de linha de comando -Tlatin1 para o groff, mas 
  mais simples colocar uma linha no seu arquivo /etc/profile contendo

      GROFF_TYPESETTER="latin1"
      export GROFF_TYPESETTER



  Para maiores informaes leia o manual do groff com o comando

      man groff



  No Linux, o comando man usa o groff para formatar os manuais e deve
  ser configurado para usar o conjunto Latin 1, ou no ser possvel
  formatar satisfatoriamente manuais que contenham caracteres no
  pertencentes ao conjunto ASCII, como  o caso do ``man iso_8859_1''.
  Na distribuio Slackware,  preciso editar o arquivo
  /usr/lib/man.config e alterar as definies NROFF e NEQN, trocando a
  opo ``-Tascii'' para ``-Tlatin1'':

      NROFF           /usr/bin/groff -Tlatin1 -mandoc
      NEQN            /usr/bin/geqn -Tlatin1


  ou, se usarmos a varivel de ambiente GROFF_TYPESETTER, podemos sim
  plesmente eliminar a opo -Tascii. Na distribuio Debian no 
  necessrio fazer nenhuma configurao para o man, bastando configurar
  GROFF_TYPESETTER e na Red Hat (incluindo Conectiva) o arquivo 
  /etc/man.config

  Groff tambm pode ser configurado para fazer a separao silbica em
  portugus, o que  muito til se tivermos pginas de manual em
  Portugus. Isto  bastante simples, porque quando James Clarck ps
  suporte a hifenizao no groff ele usou o mesmo algoritmo de
  hifenizao do TeX. Para ter hifenizao em portugus, basta copiar o
  arquivo de regras do TeX e fazer o groff us-lo. O arquivo hyphen.pt
  pode ser obtido junto com os demais na pgina do HOWTO. Trata-se do
  arquivo pt8hyph.tex (ver seo ``TeX e LaTeX'') ao qual foi adicionado
  apenas um comentrio.

  Ele deve ser copiado para o diretrio /usr/share/groff/tmac/ ou
  /usr/lib/groff/tmac/, dependendo da distribuio.  conveniente criar
  um ``link'' simblico para hyphen.br. Para usar esse arquivo, basta
  colocar no incio do seu documento troff/groff as linhas a seguir:

      .if \n(.g \{\
      .hla pt
      .hpf hyphen.pt
      .\}


  O .if no  necessrio para a acentuao, mas ele testa se o proces
  sador usado  o groff. Deste modo pode-se usar o mesmo documento em
  outros UNIX nos quais se use o troff normal sem que ele gere mensagens
  de erro sobre comandos desconhecidos.


  6.1.12.  Midnight Comander (mc)

  No menu Options sub-menu Display bits... ligue a opo ``Full 8 bits''
  ou ``ISO 8859-1''. Na verso 3.2.11 isso permite que sejam mostrados
  nomes de arquivos contendo caracteres acentuados, mas no foi possvel
  digitar tais caracteres na linha de comando ou nas caixas de dilogo.


  6.1.13.  Minicom

  Coloque uma linha no seu arquivo /etc/profile contendo

      MINICOM="-m -c on"
      export MINICOM

  Isso permitir usar a tecla Alt para ativar os comandos (exatamente
  como o Telix) e tambm usar cores. Para maiores informaes, leia o
  manual do Minicom usando o comando

      man minicom


  Mais uma dica sobre o Minicom: para faz-lo usar usar corretamante a
  tecla Meta para ativao dos comandos rodando dentro de um xterm,
  deve-se invoc-lo com a opo ``-m'' e passar a opo ``-xrm "*eight
  BitInput: false"'' para o xterm. Se usarmos o rxvt ento o minicom
  deve ser chamado com a opo ``-m'' e a tecla de ativao dos comandos
  ser Alt. Fiz uma adaptao no script xminicom que pode ser obtido via
  WWW na pgina do Portuguese HOWTO.

  Segundo Arnaldo Carvalho de Melo, as verses mais recentes do Minicom
  suportam internacionalizao. Suporte para o Portugus foi
  acrescentado pelo pessoal da Conectiva. O cdigo fonte pode ser obtido
  na pgina do Jukka (atual mantenedor do Minicom) em

       <http://www.clinet.fi/~walker/minicom.html>



  6.1.14.  Netscape Communicator

  O Communicator, assim como muitas aplicaes que utilizam toolkits
  baseados no X Toolkit (Xt), permite que se modifiquem muitas de suas
  caractersticas por meio de arquivos de configurao (X Resources). No
  caso especfico do Communicator, pode-se criar um arquivo chamado
  Netscape no diretrio /usr/X11R6/lib/X11/app-defaults contendo estas
  opes.

  Na distribuio brasileira Conectiva, o pacote do Communicator vem com
  um arquivo /usr/lib/netscape/i18n/Netscape.ad.pt_BR e um script
  /usr/bin/netscape que executa o Communicator fazendo-o ler este
  arquivo. Uma cpia do Netscape.ad.pt_BR pode ser obtida na pgina
  oficial do Portuguese-HOWTO. Para us-lo, simplesmente copie-o para
  /usr/X11R6/lib/X11/app-defaults/Netscape, se sua distribuio no o
  possuir, mas fique atento que seu uso pode criar problemas com novas
  verses do programa.

  Maiores informaes sobre ``X Resources'' podem ser obtidas em
  [GET94], [McC94] e no manual do programa xrdb, com o comando


      man xrdb



  6.1.15.  nn


       Al, al, algum usa nn? Informao mais atualizada ser bem
       recebida.


  Acrescente a seguinte linha ao arquivo ~/.nn/init:

      set data-bits 8



  6.1.16.  Pine e Pico

  Para o Pine utilizar o conjunto de caracteres Latin 1, coloque uma
  linha no arquivo .pinerc, no diretrio do usurio, contendo

      character-set=ISO-8859-1


  ou crie um arquivo geral de configurao contendo tal linha. Esse
  arquivo normalmente  /usr/local/lib/pine.conf ou /usr/lib/pine.conf

  A configurao tambm pode ser feita usando o prprio programa. No
  menu de entrada selecione as opes Setup/Configuration. V at o tem
  ``character-set'' e preencha-o com ``ISO-8859-1''. Para maiores
  informaes leia o manual do pine com o comando

      man pine



  6.1.17.  tcsh

  Nenhuma medida especial  necessria se for feita a correta
  configurao das variveis de ambiente ``LANG'' e ``LC_ALL'', conforme
  mostrado mostrado na seo ``Biblioteca libc''.

  Tcsh tem suporte a internacionalizao e na distribuio Debian h um
  pacote chamado tcsh-i18n com suporte para French, German, Greek and
  Spanish.


  6.1.18.  TeX e LaTeX


       Esta seo foi escrita com ajuda de Klaus Steding-Jessen.



  6.1.18.1.  O pacote Babel

  O pacote Babel, criado por Johannes Braams prov suporte a um grande
  nmero de idiomas para o LaTeX. De acordo com o idioma selecionado ele
  define muitas coisa como, por exemplo, os ttulos dos captulos
  (Chapter, Captulo, Kapitel) e o ttulo das tabelas (Tabela, Table,
  Tabelle). Para usar o pacote, basta incluir no prembulo de seu
  documento LaTeX o comando


      \usepackage[portuges]{babel}

      ou

      \usepackage[brazil]{babel}



  H diferenas sutis entre o Portugues do Brasil e o de Portugal, tais
  como as normas para escrita de datas e nomes de meses com a primeira
  letra maiscula ou minscula.

  Pode-se misturar mais de um idioma no mesmo documento. Para Alemo e
  Portugus ficaria:



      \usepackage[german,brazil]{babel}



  Nesse caso a ltima opo (brazil) fica sendo o idioma corrente. Para
  mudar ao longo do texto, entre um e outro, use:


      \selectlanguage{german}

      [...]

      \selectlanguage{brazil}



  Isto  muito til tambm quando queremos que uma palavra no seja
  separada.  Basta definir um novo idioma e us-lo nas palavras que no
  podem ser separadas. Coloque no prembulo:


      \newlanguage\nohyphen
      \newcommand\nh[1]{{\language\nohyphen #1}}



  E use com \nh{FOO BAR}.  melhor do que usar \mbox, que impede quebra
  no espaco em \mbox{FOO BAR}.


  6.1.18.2.  Separao silbica

  Normalmente apenas os suportes a separao silbica para Ingls e
  Alemo so carregados.  Para configurar hifenizao no teTeX, execute
  o utilitrio texconfig, que na distribuio Slackware deve ser o
  programa /usr/lib/teTeX/bin/texconfig e na Debian 
  /usr/bin/texconfig.  Digite o comando


      texconfig hyphen



  O editor usado normalmente  o vi. Se o seu editor predileto for
  outro, crie uma varivel de ambiente chamada EDITOR contendo o nome
  desse programa, como no exemplo a seguir:


      EDITOR=pico
      export EDITOR



  O editor de texto ser carregado, para editar o arquivo language.dat.
  Procure uma linha que comea por %portuges e remova o %. Grave o
  arquivo e saia do editor. O texconfig atualizar diversos arquivos de
  configurao (no se assuste com a quantidade de mensagens que
  aparecem na tela).

  Se o nome da tabela de hifenizao que consta no seu language.dat 
  pthyph.tex ento provavelmente trata-se da verso 1.0, de 1987. A
  verso 1.2, de 1996, pode ser obtida via FTP annimo em

       <ftp://ftp.tex.ac.uk/tex-archive/language/por
       tuguese/pt8hyph.tex>

  Copie-o para o mesmo diretrio onde se encontra o pthyph.tex, que
  dependendo de sua distribuio pode ser
  /usr/lib/texmf/tex/generic/hyphen /usr/share/texmf/tex/generic/hyphen
  ou /usr/lib/teTeX/texmf/tex/generic/hyphen. Execute o comando texcon
  fig~hash e na mesma linha mencionada anteriormente insira um `8' no
  nome do arquivo, de modo que fique pt8hyph.tex.


  6.1.18.3.  Uso de Font Encoding T1

  Se o conjunto de caracteres (encoding) de uma fonte no prov acesso
  direto a caracteres acentuados, (como  o caso do OT1, padro do
  LaTeX) ento o TeX gera estes caracteres sobrepondo o caracter base
  mais o acento. O algoritmo de hifenizao, contudo, no hifeniza
  palavras formadas dessa forma.

  Se uma fonte j prov acesso direto a caracteres acentuados, como as
  de codificao T1, estes caracteres so usados diretamente sem
  prejuzo do algoritmo de hifenizao.  O uso de encoding T1 
  fundamental para a correta hifenizao em Portugus.

  Note que trata-se da mesma fonte, por falta a Computer Modern, apenas
  o que muda  o seu encoding, isto , a ordem/disponibilidade dos
  caracteres dentro da mesma. Para selecionar estas fontes, inclua no
  prembulo do seu documento o comando


      \usepackage[T1]{fontenc}



  O antigo pacote t1enc no deve mais ser usado e existe hoje apenas por
  questes de compatibilidade com documentos antigos. O fontenc  mais
  atual, continua a ser mantido e  de uso mais geral, portanto
  prefervel.


  6.1.18.4.  Edio de documentos

  Normalmente a introduo de caracteres acentuados no texto exige o uso
  de seqncias de escape bastante trabalhosas. Para gerar um ``''
  deve-se digitar \"o. Com babel pode-se digitar apenas "o, o que no
  deixa de ser inconveniente para ler o fonte do documento. H um pacote
  chamado inputenc que permite especificar a codificao em que esto os
  caracteres de um documento. Lembre-se porm que se o seu documento for
  enviado para outro usurio que no possua o inputenc ele poder no
  conseguir process-lo, mas esse recurso j est disponvel desde a
  liberao do LaTeX2e em dezembro 1994. Todas as distribuies de Linux
  atuais o incluem.

  Sugesto: uma configurao do GNU Emacs para gerar caracteres
  acentuados, prpria para o uso com o pacote inputenc:


      (add-hook 'LaTeX-mode-hook
                (lambda ()
                  (standard-display-european 1)
                  (load-library "iso-acc")
                  (iso-accents-mode 1)
                  (iso-accents-customize "portuguese")
                  (auto-fill-mode 1)
                  ))



  E outra que no requer o inputenc.  O uso da biblioteca `iso-cvt' faz
  a transformao de ISO-8859-1 (no buffer do Emacs) para o padro do
  LaTeX (no arquivo).


      (add-hook 'LaTeX-mode-hook
                (lambda ()
                  (standard-display-european 1)
                  (load-library "iso-cvt")
                  (load-library "iso-acc")
                  (iso-accents-mode 1)
                  (iso-accents-customize "portuguese")
                  (auto-fill-mode 1)
                  ))



  Muitas vezes o usuario j possui muitos arquivos num formato de acento
  do LaTeX e gostaria de passar tudo para o formato ISO, prprio para
  uso do pacote inputenc. Uma boa opo para isto  usar o programa
  recode. Se voc possui arquivos .tex e deseja converte-lo para formato
  ISO-8859-1 pode usar:


      recode -d LaTeX:l1 file.tex



  O cdigo-fonte do GNU recode pode ser obtido via FTP annimo em
  <ftp://prep.ai.mit.edu/pub/gnu/recode/recode-3.4.tar.gz> e em muitos
  espelhos do GNU mundo afora. A distribuio Debian tem um pacote
  pronto e outras tambm devem ter.


  6.1.18.5.  Teste da configurao do LaTeX

  Para testar a nova configurao copie o seguinte trecho para um
  arquivo chamado, digamos, exemplo.tex:


      \documentclass[a4paper]{article}
      \usepackage[latin1]{inputenc}
      \usepackage[T1]{fontenc}
      \usepackage[portuges]{babel}
      %%
      %% ou \usepackage[brazil]{babel}
      %%

      \begin{document}
      \title{Linux Portuguese-HOWTO}
      \author{Carlos Augusto Moreira dos Santos}
      \date{\today}

      \maketitle

      \section{Introduo}

      Este documento pretende ser um guia de referncia de configurao
      do \textbf{Linux} e seus programas, teclados e fontes de
      caracteres, permitindo sua internacionalizao/utilizao confortvel
      por pessoas que falem a Lngua Portuguesa.

      \end{document}



  Esse texto contm de propsito uma ``palavra'' bastante longa para
  forar a separao silbica. Ele est disponvel via WWW no arquivo
  exemplo.tex na pgina do Portuguese HOWTO. Para process-lo, use o
  comando latex, conforme mostrado a seguir:

      bash$ latex exemplo.tex
      This is TeX, Version 3.14159 (C version 6.1)
      (exemplo.tex
      LaTeX2e <1996/06/01>
      Hyphenation patterns for english, german, portuges, loaded.
      (/usr/lib/teTeX/texmf/tex/latex/base/article.cls
      Document Class: article 1996/05/26 v1.3r Standard LaTeX document class
      (/usr/lib/teTeX/texmf/tex/latex/base/size10.clo))
      (/usr/lib/teTeX/texmf/tex/latex/base/inputenc.sty beta test version
      (/usr/lib/teTeX/texmf/tex/latex/base/latin1.def))
      (/usr/lib/teTeX/texmf/tex/latex/base/fontenc.sty
      (/usr/lib/teTeX/texmf/tex/latex/base/T1enc.def))
      (/usr/lib/teTeX/texmf/tex/generic/babel/babel.sty (portuges.ldf
      (/usr/lib/teTeX/texmf/tex/generic/babel/babel.def))) (exemplo.aux) [1]
      (exemplo.aux) )
      (see the transcript file for additional information)
      Output written on exemplo.dvi (1 page, 812 bytes).
      Transcript written on exemplo.log.


  A mensagem ``Hyphenation patterns for english, german, portuges,
  loaded.'' indica que a configurao foi bem sucedida. Se o seu com
  putador est rodando o X o documento formatado poder ser visto com o
  comando

      xdvi exemplo.dvi



  Observe que o ``\today'' gera a data corrente. No ``portugues'' seria
  ``17 de Julho de 1998'' mas no ``brazil'' seria ``17 de julho de
  1998''.


  6.1.18.6.  Problemas com alguns pacotes do teTeX

  H um problema com o pacote algorithm do LaTeX, que no  suportado
  pelo babel, fazendo com que a lista de algoritmos saia com o ttulo
  ``List of Algorithms'' e o ttulo de cada um deles seja impresso como
  ``Algorithm #''.  Para evitar esse problema, coloque no prembulo de
  seu documento LaTeX, aps o comando ``\usepackage{algorithm}'' o
  seguinte:


      \makeatletter
      \renewcommand{\ALG@name}}{Algoritmo}}
      \makeatother
      \renewcommand{\listalgorithmname}}{Lista de Algoritmos}}



  No teTeX 0.4 (verso 1.2h do portuges.ldf) o ttulo do ambiente proof,
  encontrado nas classes amsbook, amsart, etc., sai como ``Proof.''.
  Para corrigir isso, coloque no prembulo de seu documento o comando


      \renewcommand{\proofname}}{Demonstra\c{c}\~ao}



  mas o mais recomendvel  que se atualize a verso do teTeX.

  Usurios do LyX podem incluir esses comandos no prembulo do documento
  usando o menu Layout/LaTeX Preamble. Pode-se resolver o problema
  alterando o arquivo portuges.ldf que contm as definies necessrias
  ao Portugus, mas esta soluo no  portvel, pois exigir que tal
  arquivo seja alterado em todas os computadores em que o documento deva
  ser processado.

  A licena do Babel no me permite distribuir o portuges.ldf separado
  do resto do pacote, mas para os interessados, coloquei  disposio na
  pgina do HOWTO um arquivo chamado portuges.ldf.patch que criei para o
  meu teTeX antigo (Slackware 3.4).  Para aplicar a atualizao, copie-o
  para o diretrio /usr/lib/teTeX/texmf/tex/generic/babel (Slackware),
  faa uma cpia de reserva do portuges.ldf original e invoque o
  utilitrio patch:


      cp -p portuges.ldf portuges.ldf.backup
      patch < portuges.ldf.patch



  Use o patch por sua conta e risco! Se voc deixar o backup no
  diretrio original ele ser includo no arquivo ls-R da prxima vez
  que o programa texhash for executado.  Isso no far mal algum, mas
  pode-se mover o backup para algum lugar seguro (eu uso /usr/backup).


  6.1.18.7.  Lista TeX-BR

  H uma lista de discusso brasileira de usurios de TeX/LaTeX, chamada
  TeX-BR, que roda no servidor de listas da FURG. Para entrar da lista
  mande um mail contendo apenas a palavra ``subscribe'' no corpo para
  <tex-br-request@listas.furg.br>. Esta lista  administrada por Rafael
  Rodrigues Obelheiro.

  H uma pgina na WWW em  <http://biquinho.furg.br/tex-br/> por meio da
  qual se pode ler o histrico de mensagens. Tambm h referncias para
  muitos documentos sobre LaTeX, alguns em Portugus e outros em Ingls.


  6.1.18.8.  LaTeX-demo

  Pode ser til tambm um documento de exemplo para ter onde comear.
  Pensando nisso, Klaus Steding-Jessen preparou um pequeno documento em
  Portugus com o objetivo de ser um guia ``by example'' para o usurio
  de LaTeX iniciante e intermedirio, que pode ser obtido via WWW em
  <http://biquinho.furg.br/doc/LaTeX-demo/>.

  Klaus ecreveu tambm uma srie trs artigos destinados a ``descrever o
  sistema LaTeX como uma alternativa mais eficiente aos processadores de
  texto WYSIWYG'' que podem ser lidos via WWW em
  <http://biquinho.furg.br/tex-br/doc/artigo-1-jessen/>.



  6.1.19.  WordPerfect

  O Corel Wordperfect para Linux verso 8 suporta a acentuao por
  teclas mortas. No  necessrio nenhum procedimento especial. Como um
  entusiasta de software livre, entretanto, recomendo enfaticamente que
  se use o LyX, que j foi inclusive traduzido para nossa lngua,
  conforme mencionado na seo ``LyX''.


  6.1.20.  Xemacs (antigo lucid emacs)


       Agradeo a colaborao de Judson Santos Santiago e Goedson
       Teixeira Paixo que ajudaram a identificar os problemas com
       o Xemacs.


  O Xemacs j tem suporte  acentuao direta no teclado usando ``dead
  keys'', mas h um erro na configurao original que o impede de
  reconhecer o acento circunflexo.  Este problema no ocorre se for
  usada a biblioteca Xlib aterada por Thomas Quinot, mencionada na
  seo ``Contornando os limites do X'', mas mesmo que no a usemos,
  basta colocar os seguintes comandos no seu arquivo de configurao
  .emacs:

      ;; Ajuste para fazer o acento circunflexo funcionar
      ;; Contribuio de Goedson Teixeira Paixao <gopaixao@dcc.ufmg.br>
      (require 'x-compose)
      (define-key global-map 'dead-circumflex compose-circumflex-map)



  Na distribuio Debian 2.0 o Xemacs 20.4 executa todos os scripts
  contidos no diretrio /etc/xemacs20/site-start.d ao ser carregado.
  Tudo que se tem a fazer  colocar esses comandos em um arquivo
  chamado, por exemplo, 01portugues-xemacs.el. No  necessrio instalar
  o xemacs20-mule, que possui extenses para lnguas que no usam o
  alfabeto romano. Os pacotes a instalar so os seguintes:


    xemacs20-bin

    xemacs20-nomule

    xemacs20-support

    xemacs20-supportel

  Se voc instalou o Xemacs no Slackware ou outro Unix,  moda antiga
  (dowload, compilao, instao), ento o arquivo a alterar  o site-
  start.el, que deve estar no diretrio /usr/lib/xemacs/site-lisp ou
  /usr/local/lib/xemacs/site-lisp, dependendo de sua instalao.

  Observe que a partir da verso 20.3 o Xemacs usa uma varivel especial
  para controlar o comportamento da tecla ``Delete'', no existente nos
  outros emacs chamada delete-key-deletes-forward. Para ativar este
  comportamento coloque no seu arquivo .emacs uma linha contendo


      (setq delete-key-deletes-forward t)



  Arquivos de configurao prontos podem ser obtidos via WWW na pgina
  do Portuguese HOWTO. Para Slackware, h um site-start-xemacs.el, que
  deve ser copiado para o diretrio correto com o nome de site-start.el.
  Para Debian, h um 01portugues-xemacs.el que deve ser copiado para o
  diretrio /etc/xemacs20/site-start.d.

  Certifique-se de estar usando a verso 24-out-1998 ou mais recente do
  arquivo de ``mapa de teclado'' para o X, pois ela possui uma correo
  no tratamento das teclas modificadoras Alt e Meta, que so muito
  usadas pelo Xemacs.


  6.2.  Rede local e Internet


  6.2.1.  FTP (File Transfer Protocol)

  Existem dois modos de transferncia de arquivos: binary e ASCII, sendo
  este  utilizado para textos.  Deve-se tomar cuidado ao transferir um
  arquivo, pois o modo de transfrencia ASCII remove o oitavo bit de
  cada caracter transmitido, o que ter como conseqncia a perda de
  todos os caracteres acentuados. Desta forma  aconselhado o envio de
  documentao em modo binary de forma a manter a integridade da mesma.

  Cuidado! Algumas verses mais antigas do pacote net-tools do Linux tm
  um cliente FTP que no reconhece corretamente quando o servidor remoto
  roda Unix. Deste modo ele no comutar o modo de transferncia para
  binrio automaticamente. Alm disso, alguns servidores FTP tambm no
  fornecem a informao corretamente.  Certifique-se de digitar o
  comando bin antes de um get quando quiser que a transferncia seja
  binria!


  6.2.2.  Correio eletrnico

  O mesmo tipo de restries do FTP se aplica ao envio de documentos
  contendo caracteres acentuados atravs de correio eletrnico. Embora
  isto no acontea em todos os sistemas em uso na internet, bastar que
  o correio enviado passe no seu trajecto por um sistema que no suporte
  8 bits de informao para que o nosso documento seja deturpado.

  Para que no hajam problemas, deve-se utilizar um programa de emeil,
  que suporte o formato MIME (Multipurpose Internet Mail Extensions),
  formato este que permite o envio de documentao em modo 8 bits.
  Exemplos de programas de correio eletrnico com suporte para MIME, so
  o Eudora e o Pine.

  Se o destinatrio da mensagem no usa um agente com suporte para MIME,
  existe a opo de codificar os documentos com o utilitrio UUENCODE.
  Para maiores informaes a esse respeito, leia a documentao usando
  os comandos


      man uuencode
      man uudecode



  7.  Ficheiros necessrios

  Ateno! Os mapas de teclado para o X fornecidos mapeiam a funo das
  teclas segundo a lista a seguir:

    Alt esquerdo: Alt

    Alt direito: AltGr

    Control esquerdo: Control

    Control direito: Control

    ScrollLock: ScrollLock

    Janela esquerda: Meta

    Janela direita: Compose

    Menu: Menu

  Se o seu teclado no possuir as teclas para Windows 95 ento pode ser
  melhor restabelecer a distribuio padro: edite o mapa e coloque um
  ponto de exclamao no incio das linhas que definem os keycodes 64,
  113, 115, 116 e 117.

  Foram elaborados mapas com suporte  acentuao para seis modelos de
  teclado, tanto para uso no console quanto para o X. Eles podem ser
  obtidos via WWW em um dos repositrios da pgina do Portuguese HOWTO:


    <http://linusp.usp.br/~casantos/>

  Ao instalar um dos mapas fornecidos, lembre-se de ler os comentrios
  contidos neles, pois h informaes importantes sobre opes de
  configurao e aproveitamento das teclas adicionais dos teclados
  padro Windows 95.  As instrues para instalao esto nas sees
  ``Configurao do console'' e ``Configurao do X''.



     O mapa US+ (us+.map e Xmodmap.us+)
        Mapas para os teclados que seguem o padro americano. Como no
        existem teclas especiais para gerar o c-cedilhado nem o trema,
        foi usado um pequeno truque: o c-cedilhado  gerado pela
        seqncia 'C.  No console pode-se faz-lo com a seqncia AltGR-
        C.  O trema  gerado pela tecla ". Para gerar as aspas duplas 
        necessrio digitar a seqncia "<espao> e no console pode-se
        usar ""; opcionalmente pode-se usar AltGR-", o que no  uma
        soluo muito confortvel, mas funciona...

        Testados com teclados de vrias marcas (e alguns sem marca :-).


     O mapa Portugal (pt.map e Xmodmap.pt)
        Mapas para teclados com desenho portugus. Esses teclados so os
        que possuem uma tecla com os caracteres  e . No so muito
        confortveis, porque para gerar o smbolos @ [ ] { } e o trema 
        necessrio usar a tecla Alt-GR.

        Testado com um teclado da marca Key Tronic.


     O mapa ABNT-2 (abnt-2.map e Xmodmap.abnt2)
        Os computadores vendidos no Brasil fabricados pela IBM, Compaq e
        Itautec, entre outros, vm com esses teclados. Eles tambm pode
        ser adquiridos avulsos e so fabricados pela UIS e Keytec (no
        confundir com Key Tronic).  Este desenho  o mais confortvel de
        todos, pois tem a mesma distribuio dos acentos encontrada nas
        mquinas de escrever.

        Testado com teclados das marcas UIS e IBM.


     Sun Type 4 e Type 5 (Xmodmap.Sun4+ e Xmodmap.Sun5c+)
        Encontrados nas mquinas fabricadas pela Sun.  Estes mapas foram
        testados em SPARCstations modelos 1, 4, IPC e Classic rodando
        SunOS 4.1, Solaris 2.5.1 e Linux 2.0.33 (Red Hat 4.2). Como
        esses teclados no possuem o c-cedilhado, foi usado o mesmo
        truque do mapa US+. Apenas o mapa para o X  fornecido.


     NCD+ (Xmodmap.NCD+)
        Este mapa  para o teclado modelo N107 e foi testado em
        terminais X modelo 16r fabricados pela Network Computing Devices
        Inc. (NCD).  Embora a distribuio de teclas seja idntica  do
        Sun Type 4, os keycodes das teclas so diferentes. Esses
        teclados tambm no possuem o c-cedilhado, por isso foi usado o
        mesmo truque do mapa US+.  Apenas o mapa para o X  fornecido.

  A gerao dos caracteres acentuados  feita de acordo com a tabela a
  seguir:


      Para gerar              Digitar
      -------------------------------------------------
                             'c ou compose-,-c
                         'a 'e 'i 'o 'u
                         `a `e `i `o `u
                            ~a ~o
                         ^a ^e ^i ^o ^u
                         "a "e "i "o "u
      " (aspas)               "" ou AltGR-" no mapa US+
       (trema)               "-espao
      ' (apstrofo)           '' ou AltGR-' no mapa US+
      ` (grave)               `` ou AltGR-` no mapa US+
                             compose-O-R
                             compose-O-C
      -------------------------------------------------



  8.  Informaes Adicionais

  8.1.  Fontes de informao sobre Linux em Portugus


     Grupo de Investigao Linux
        Grupo de usurios de linux da Universidade do Minho, em Portugal
        que pode ser visitado em  <http://gil.di.uminho.pt>.

     Grupo de Utilizadores de Linux do ISCTE
        Pode ser visitado em
        <http://www.students.iscte.pt/~a12593/gul.html>.

     Linux Brasil
        Servidor da Universidade Estadual de Campinas, Brasil, contendo
        informaes sobre Linux no Brasil, que absorveu o antigo projeto
        LDP-br.  Pode ser visitado em  <http://linux.unicamp.br>.

     Projeto LinUSP
        Desenvolvido na Universidade de So Paulo, Brasil, coordenado
        por Jorge L.  deLyra. Pode ser visitado em
        <http://linusp.usp.br/>.


  8.2.  Free Translation Project

  Programadores que quiserem desenvolver aplicaes com suporte a mais
  de uma lngua devem usar algum mtodo de definir mensagens em tempo de
  execuo, possivelmente usando uma biblioteca de funes para este
  fim. O projeto GNU criou o ``Free Translation Project'', com esta
  finalidade. Muitos aplicativos GNU j permitem que se troquem as
  mensagens bastando criar um catlogo que  lido pelo programa ao
  iniciar. H equipes de traduo responsveis por cada lngua.

  H uma lista de discusso via emeil para cada equipe de traduo,
  rodando em um servidor provido pela <Linux International>. Para fazer
  contato com a equipe de traduo para Portugus, envie um emeil para
  <pt@li.org> e para assinar a lista envie emeil para <pt-
  request@li.org> contendo apenas a palavra ``subscribe''. Assine a
  lista somente se voc quiser fazer parte da equipe de tradutores, pois
  ela no se destina ao esclarecimento de dvidas de usurios!

  Mais informaes podem ser encontradas na documentao do pacote
  gettext disponvel via FTP annimo em qualquer repositrio de software
  do GNU.  Provavelmente sua distribuio j tem um pacote pronto para
  ser instalado, mas se voc desejar, os fontes da verso mais recentes
  podem ser encontrados em

       <ftp://ftp.gnu.org/pub/gnu/>


  e o nome do arquivo a copiar  ``gettext-<verso>.tar.gz''.


  8.3.  LIE-BR


       A informao a seguir  baseada no contedo da pgina de
       apresentao da lie-br, escrita por Jorge Godoy.


  A lie-br foi criada com o intuito de auxiliar a comunidade Linux
  brasileira a obter softwares e documentao em sua lngua nativa: o
  portugus.  Essa lista  uma ramificao de outra maior, a LIE que
  visa a internacionalizao do Linux e sua posterior traduo para
  todos os idiomas (portugus incluso).

  Resumo dos objetivos da lie-br:

    contribuir para o projeto de internacionalizao do Linux fazendo a
     parte relativa ao portugus para o Brasil;

    internacionalizar programas, de modo a poderem ser usados nas
     lnguas nativas de cada pas, e no ficar preso ao idioma original
     ou ao ingls;

    disponibilizar (sic) material em portugus para consulta e
     documentao;

    aumentar o acervo de documentao disponvel e, indiretamente,
     auxiliar no desenvolvimento iniciado pelo projeto LDP-BR.

  Mais informaes podem ser encontradas na pgina WWW da lie-br, no
  endereo

       <http://lie-br.conectiva.com.br/>


  Ainda h uma quantidade enorme de documentos por traduzir. Se voc tem
  bom domnio do Ingls e deseja colaborar, ento primeiro leia as
  instrues na pgina mencionada e assine a lista ``lie-br'', enviando
  um emeil para <lie-br-subscribe@bazar.conectiva.com.br>. No  preciso
  especificar o assunto (subject) nem colocar nada no corpo da mensagem.


  8.4.  Verses de software testadas

  Todas as informaes presentes neste documento foram testadas nas
  seguintes verses de software:


    Distribuies Slackware 3.2 (muito modificada), Debian 2.0, Red Hat
     5.2, Conectiva 3.0 (Guarani) e S.u.S.E. 5.6

    XFree86 verses 3.3 a 3.3.3.1

    Fvwm 2.0.46

    Rxvt verso 2.4.5

    Kernel verses 2.0.33 a 2.0.36

    Kbd verses 0.92 a 0.96

    GNU emacs verses 19.34 a 20.3

    Less verses 321 e 332

    GNU Bash verses 1.14.7 a 2.01.1

    tcsh verses 6.07.02 e 6.07.06

    LyX 0.12.0 a 1.0.0pre6

    XForms 0.88

    Joe 2.8

    Pine 3.96 e 4.0

    Pico 2.9

    teTeX verses 0.4 e 0.9-9

    XEmacs verses 20.3 e 20.4



  9.  Observaes finais

  9.1.  Futuras adies a este documento

  As prximas verses do HOWTO devero conter, entre outros assuntos, os
  seguintes:

    suporte  distribuio Caldera;

    informaes sobre compartilhamento de arquivos em rede usando NFS,
     SAMBA e Mars-NWE;

    configurao de toolkits de interface grfica: Qt, GTK, XForms, Tk
     (Tcl) e os baseados em Xt, como Motif, Lesstif, Xaw (*international
     ainda no est funcionando);

    uma seo sobre desenvolvimento de programas;

    referncias ao Ispell (us-lo para corrigir o prprio HOWTO :-);

    informaes sobre X/Open, XPG4 e POSIX, ou pelo menos ponteiros
     para elas.

     Aceitam-se voluntrios para qualquer uma destas tarefas.

  Parece cada vez mais claro que as informaes sobre configurao de
  aplicativos devem ser movidas para outro documento, independente do
  HOWTO. Na forma como ele est hoje j chega a quase quarenta pginas
  impressas e com a adio de outras distribuies e aplicaes em breve
  chegar s 50. Um documento to grande foge ao esprito de um HOWTO,
  que deve ser sucinto e concentrado em um assunto especfico.
  9.2.  Nota de Direitos de Autor

  Este HOWTO teve como autor Joo Carlos Rodrigues Pereira, baseado em
  documentao escrita por Jos Bandeira alm dos restantes HOWTO's do
  Linux.  Atualmente ele  mantido por Carlos Augusto Moreira dos
  Santos, com a colaborao de muitos outros.

  Os documentos HOWTO do Linux podem ser reproduzidos e distribudos em
  todo ou em parte, segundo qualquer meio fsico ou electrnico, desde
  que esta Nota de Direitos de Autor se mantenha intacta em todas as
  cpias dos mesmos.  A distribuio comercial  autorizada e
  encorajada, no entanto, o autor gostaria de ser notificado de tais
  ocorrncias.

  Todas as tradues, trabalhos derivados, ou trabalhos agregando
  qualquer dos documentos HOWTO do Linux devero estar abrangidos por
  esta Nota de Direitos de Autor, ou seja, no poder ser imposta
  qualquer restrio adicional a trabalhos efectuados a partir de um dos
  documentos HOWTO do Linux nomeadamente no que diz respeito  sua
  distribuio.

  Excees a estas regras poderam ser obtidas. Para tal, dever-se-
  contactar o coordenador dos documentos HOWTO do Linux no endereo
  <linux-howto@metalab.unc.edu>.


  9.3.  Garantia (inexistncia de) e nota de responsabilidade

  Apesar de ter sido feito o mximo esforo possvel para que o contedo
  deste documento esteja correto, no h nenhuma garantia de que ele no
  possua erros, nem de que tenha algum tipo de utilidade ou aplicao
  comercial, tcnica, educacional ou medicinal.  O autor no se
  responsabiliza por prejuzos decorrentes do seu uso. Em resumo: se a
  informao aqui contida quebrar seu computador em mil pedacinhos,
  junte tudo e cole, mas no reclame para mim!

  Documentos escritos por terceiros so de responsabilidade exclusiva
  deles e sua referncia neste HOWTO no representa nenhum tipo de
  recomendao, abono ou garantia de suporte.


  9.4.  Agradecimentos

  Deixo aqui os meus agradecimentos a todos os que de alguma forma me
  ajudaram quer atravs das suas sugestes quer atravs de contribuies
  de outro tipo, em especial a


     Joo Carlos Rodrigues Pereira
        Autor original deste documento que agora mantenho. Nunca tive
        contato com ele, nem sei por onde andar.  Sua pgina no
        Departamento de Informtica da Faculdade de Cincias da
        Universidade de Lisboa (http://caravela.di.fc.ul.pt/~jcrp/) no
        existe mais. Lembro-me de t-la visto, anos atrs.

     Greg Hankins
        Ex-coordenador dos Linux HOWTO, por me permitir assumir a
        manuteno deste documento e fornecer as primeiras dicas sobre
        autoria de documentos SGML.

  As pessoas listadas a seguir enviaram mensagens diretamente para mim
  ou para as listas Linux-BR da UNICAMP e TeX-BR com informaes,
  sugestes ou comentrios que foram includas neste texto. Se algum
  foi esquecido, por favor desculpe a falha.


       Andre Gerhard <andre@lme.usp.br>
       Arnaldo Carvalho de Melo <acme@conectiva.com.br>
       Bruno Barberi Gnecco <brunobg@geocities.com>
       Cees de Groot <cg@pobox.com>
       Francisco Semeraro <semeraro@sti.com.br>
       Goedson Teixeira Paixao <gopaixao@dcc.ufmg.br>
       Joao Carvalho <foxfire@fe.up.pt>
       Jorge Carvalho Pinto <jmcpinto@yahoo.com>
       Judson S Santiago <judson@costeira.dimap.ufrn.br>
       Ken MacLeod <ken@bitsko.slc.ut.us>
       Klaus Steding-Jessen <jessen@acm.org>
       Lamarque Vieira Souza <lamarque@dcc.ufmg.br>
       Marcelo Malheiros <malheiro@dca.fee.unicamp.br>
       Marcos Vinicius Lannes dos Santos <lannes@cnpgl.embrapa.br>
       Pedro Krger <kroger@e-net.com.br>
       Rafael Caetano dos Santos <rcaetano@linux.ime.usp.br>
       Rafael Rodrigues Obelheiro <obelix@biquinho.furg.br>
       Ramiro Morales <morales@siscard.com.ar>
       Raul Carvalho <rmpc@ip.pt>
       Ricardo Y. Igarashi <iga@originet.com.br>
       Roberto Mello <mello@internext.com.br>
       Wanderlei Antonio Cavassin <cavassin@conectiva.com.br>


  Os seguintes agradecimentos so do primeiro autor:

     Carlos Ferreira
        Pela luta que trava pela defesa da lingua portuguesa, bem
        patente na sua Pgina Portuguesa disponvel no URL:
        http://lila.dei.uc.pt/~cjrf/po/ [Nota do mantenedor atual: esta
        pgina no existe]

     Joo C. Silva
        Pelo apoio e incentivo e criticas (bem como por me deixar testar
        os meus conhecimentos no SEU computador).

     Jos Bandeira
        Autor dos ficheiros port.map e xmodmap.  Pelo seu apoio e por
        ter escrito alguma da documentao mais elucidativa que eu j li
        sobre o assunto.


  10.  Bibliografia comentada

  Esta seo ainda est incompleta e deve ser melhorada nas prximas
  verses.  Os HOWTOs mencionados aqui geralmente so distribudos nos
  CDs de instalao e todas as distribuies possuem pelo menos alguns
  deles em pacotes prontos para instalar.  Na Slackwre esses pacotes so
  os da srie F e os documentos ficam instalados no diretrio
  /usr/doc/faq/howto e na Debian o diretrio  /usr/doc/HOWTO. Eles
  tambm podem ser obtidos via WWW em
  <http://metalab.unc.edu/LDP/HOWTO/>.


     [BAL97] BALSA, Andr D. Linux and X11 internationalization
        Disponvel via WWW em
        <http://wauug.erols.com/~balsa/linux/deadkeys/>

        Uma discusso sobre o problema da acentuao no X. Tambm contm
        referncias para outros documentos que tratam de
        internacionalizao.

     [BRO98] Brower Andries. The Linux Keyboard and Console HOWTO
        Disponvel via WWW em
        <http://metalab.unc.edu/LDP/HOWTO/Keyboard-and-Console-
        HOWTO.html>.
        Descreve o tratamento teclado e console no Linux (kernel verso
        2.0) e tem vrias referncias ao X. Leitura obrigatria para
        quem quer entender a base do assunto.

     [GET94] Gettys, James et al. Xlib - C Language X Interface
        Cambridge, X Consortium, Inc., 1994. 473p.

        Referncia definitiva sobre programao com Xlib.

     [JON89] Jones, Oliver. Introduction to the X Window System
        Englewood Cliffs, Prentice Hall, 1990.

        Um livro bastante antigo, mas contendo uma excelente e didtica
        introduo ao X e  programao com Xlib.

     [McC94] McCormack, Joel et al.X Toolkit Intrinsics - C Language
        Interface
        Digital Equipment Corporation/X Consortium, 1994.

        A referncia bsica para programadores interessados em usar Xt.

     [OSS92] Ossana, Joseph & Kernighan, Brian. Troff user's manual
        Computer Science Technical Report No. 54. Murray Hill, AT&T Bell
        Laboratories, 1992.

        Descrio detalhada de como usar o Troff para formatao de
        documentos.

     [KER82] Kernighan, Brian. A Typesetter-independent TROFF
        Murray Hill, AT&T Bell Laboratories, 1982.

        O artigo de um dos pais do UNIX sobre o Troff.

     [QUI98] Quinot, Thomas. Dead keys under X11
        Disponvel via WWW em
        <http://www.fdn.fr/~tquinot/index.en.html>

        A verso em ingls do artigo sobre a modificao da Xlib para
        dar suporte  acentuao independente da aplicao.

     [RAY98] Raymond, Eric S. The Linux XFree86 HOWTO
        Disponvel via WWW em
        <http://metalab.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>.

        Descreve como obter, instalar e configurar o XFree86. Todas as
        distribuies de Linux j vm com pacotes do XFree86 prontos
        para instalar, mas as informaes sobre configurao podem ser
        muito teis.

     [SCH86] Scheifler, Robert; Gettys, James. The X Window System
        ACM Transactions on Graphics, New York, ACM, 5 (2): 79-109,
        april, 1986.

        O artigo seminal de Scheifler e Gettys descrevendo o X Window
        System.

     [SUN90a] Sun Microsystems. Using NROFF & TROFF.
        Sun Microsystems, 1990.

        Parte da documentao que acompanhava as estaes de trabalho
        Sun e o sistema SunOS, no tempo em que os fabricantes de
        computadores distribuiam documentao de verdade.

     [SUN90b] Sun Microsystems. Formatting documents
        Sun Microsystems, 1990.

        Veja o tem anterior.

  Arquivos cuja leitura pode ser til:


     /usr/src/linux/Documentation/unicode.txt
        Explica como ativar os diversos tipos de fontes no console.
        Tambm explica onde obter fontes para o alfabeto Klingon, o que
        pode ser muito til se o leitor for um habitante daquele Imprio
        ou admirador de Jornada nas Estrelas.  Depois das recentes
        aventuras espaciais do Linux, no duvido de mais nada...

        A respeito deste assunto  de fundamental importncia saber que,
        segundo nosso consultor interestrelar Klaus Steding-Jessen,
        ``Klingon  o nome da raa e do seu idioma.  Kling  o nome do
        planeta.  Mas note que o Imprio Klingon  formado no apenas
        por esse planeta, mas por vrias colnias, teoricamente todas
        falando Klingon''. Tenho certeza de que sua vida nunca mais ser
        a mesma depois de saber disto.

     /usr/src/linux/include/linux/keyboard.h
        Contm as definies de constantes, funes e macros utilizadas
        por programas que fazem tratamento de teclado sob Linux.
        Normalmente esse arquivo  instalado com o pacote que contm o
        cdigo fonte do kernel. As distribuies geralmente possuem um
        pacote apenas com os arquivos include e outros com o resto dos
        programas-fonte do kernel.

     /usr/X11R6/include/X11/keysymdef.h
        Contm as definies de constantes, funes e macros utilizadas
        por programas que fazem tratamento de teclado sob o X Window
        System.  Normalmente esse arquivo  instalado com o pacote que
        contm as bibliotecas de desenvolvimento de aplicaes para X.



F PORTUGUE.;1                       	Portuguese-HOWTO
  Serbian HOWTO
  Zoltan Csala,   zolika@sezampro.PRVO-SKLONI-OVO.yu
  v1.0, November 1998

  Cilj ovog dokumenta je da opise kako da podesite Linux i razne
  aplikacije za Linux prema standardima srpskog jezika. Tu spadaju: ras
  pored slova na tastaturi, fontovi, velicina papira i drugo. Nadamo se
  da ce ovaj dokument koristiti i drugi korisnici Linuksa kojima je
  blizak srpski jezik.
  ______________________________________________________________________

  Table of Contents


  1. Uvod

  2. Prikazivanje nasih slova na ekranu

     2.1 Skup znakova "ISO-8859-2"
     2.2 Konzolni rezim rada
     2.3 X-Windows graficko okruzenje

  3. Podesavanje tastature

     3.1 Konzolni rezim rada
     3.2 X-Windows graficko okruzenje

  4. Prilagodjavanje nekih aplikacija nasim slovima

     4.1 Shell-ovi
     4.2 Ostali programi

  5. Razna podesavanja

     5.1 Vremenska zona
     5.2 Format papira A4
     5.3 Format tekstualnih datoteka za druge operativne sisteme

  6. Podesavanje stampanja

     6.1 Stampaci koji podrzavaju ISO-8859-2 kodnu stranicu
     6.2 Stampaci koji podrzavaju neki drugi 8-bitni kodni raspored
     6.3 PostScript stampaci

  7. Podrska za lokalna podesavanja u libc 5.4.x i navise

  8. Korisni saveti za programiranje sa X11

  9. Vazne reference i FTP sajtovi

     9.1 Ostale reference od znacaja
     9.2 Linux u Jugoslaviji
     9.3 FTP sajtovi
     9.4 USENET diskusione liste

  10. Epilog

     10.1 Posveta
     10.2 Logicno pitanje... i logican odgovor
     10.3 Zahvalnice
     10.4 Izjava o odricanju od odgovornosti
     10.5 Autorska prava
     10.6 A note to English readers



  ______________________________________________________________________

  1.  Uvod

  Gotovo svi korisnici bilo kog operativnog sistema van granica
  Sjedinjenih Americkih Drzava imaju dva problema. Prvi je u nacinu
  saopstavanja kompjuteru da imate tastaturu koja sadrzi i druge znake
  osim americkih. Drugi problem je - kako podesiti kompjuter da prikaze
  specijalne znake iz abecede (ili azbuke) jezika kojim govorite. Da
  stvari budu jos gore, neke aplikacije ce vas smatrati izuzetkom ako
  niste Amerikanac i zahtevace specijalne opcije ili podesavanja
  "environment" promenljivih.

  Pod Linuxom mozete da promenite nacin na koji vas kompjuter
  interpretira ono sto otkucate na tastaturi. To radite komandom
  loadkeys i xmodmap. Komanda loadkeys ce modifikovati tastaturu u
  konzolnom nacinu rada, dok ce xmodmap uraditi sve sto je potrebno kada
  se nalazite u X11 grafickom okruzenju.

  Da biste prikazali nasa slova treba da saopstite aplikacijama da
  koristite ISO-8859-2 (takodje poznat i kao Latin-2) skup znakova. Ovo
  nije uvek potrebno, ali nekoliko kljucnih aplikacija zahteva posebnu
  paznju.

  Ovaj HOWTO je pisan sa ciljem da korisnicima koji razumeju srpski
  jezik objasni kako da izvedu potrebna podesavanja. Ako budete imali
  problema i posle citanja ovog dokumenta, mozete da procitate German
  HOWTO, Linux Keyboard and Console HOWTO ili ISO 8859-1 National
  Character Set HOWTO. Mnogi saveti u ovom tekstu preuzeti su od tamo.
  Takodje pogledajte odeljak ``Vazne reference i FTP sajtovi'' za
  linkove ka tim dokumentima. Mozete poslati i email na moju elektronsku
  adresu, a ja cu pokusati da vam odgovorim kad mi vreme dozvoli.

  Najveci problem je da su poruke o greskama, meniji i dokumentacija
  gotovo svih aplikacija na engleskom jeziku. Postoji GNU projekt kome
  je cilj pokusaj resavanja ovog problema. Da biste videli o cemu se
  radi, preuzmite datoteku ABOUT-NLS ili paket gettext-0.10.tar.gz (ili
  bilo koju noviju verziju) sa vama najblizeg FTP sajta koji ima kopiju
  prep.ai.mit.edu. Dokumentacija u paketu gettext opisuje kako da
  koristite prevode u vasim programima.


  2.  Prikazivanje nasih slova na ekranu

  2.1.  Skup znakova "ISO-8859-2"

  ISO-8859-2 ili "Latin-2" je clan porodice osmobitnih kodnih rasporeda
  ISO 8859.  Taj skup kodnih rasporeda pokriva alfabete kojima se pise u
  Evropi, Severnoj i Juznoj Americi, Africi i nekim zemljama Azije. Skup
  kodnih rasporeda je napravilo evropsko udruzenje proizodjaca racunara
  (European Computer Manufacturer's Association, ECMA), a potvrdio ga je
  kao medjunarodni standard organizacija za standardizaciju ISO sa
  sedistem u Zenevi.

  Kodni raspored "Latin 2" koristi sve potrebne znake koji se koriste za
  pisanje na albanskom, ceskom, engleskom, finskom, hrvatskom, irskom,
  madjarskom, nemackom, poljskom, rumunskom, slovackom, slovenackom,
  srpskom (latinica) i luzickosrpskom jeziku.

  Neki proizvodjaci racunara ili operativnih sistema, kao sto su IBM,
  Apple i Microsoft, upotrebljavaju svoje kodne rasporede za slova u
  gorepomenutim jezicima. Ti kodni rasporedi su po pravilu nepodudarni
  kako medjusobno, tako i sa ISO standardom.



  2.2.  Konzolni rezim rada

  Skup znakova za konzolni rezim rada mozete naci u paketu kbd koji je
  napisao Andrijes Bouver [Andries Bouwer] sa univerziteta u Ajndhovenu
  [Eindhoven], Holandija. U Slackware distribuciji pomenuti paket naci
  cete kao deo veceg paketa keytbls. Mozete ga instalirati (ako vec to
  niste ucinili) kao i ostale pakete, naredbom pkgtool ili installpkg.
  Kada je rec o distribuciji RedHat, na raspolaganju vam je RPM paket
  kbd-x.xx-x. Instalira se na poznati nacin, komandom rpm -Uvv kbd-x.xx-
  x (opciju vv navodite ako zelite da vidite sta se desava, sto bih vam
  toplo preporucio).

  Po instalaciji paketa, potreban skup znakova za prikaz nasih slova
  dobijate komandom setfont na sledeci nacin:



       setfont lat2-16



  Vise o paketu kbd naci cete u poglavlju 3, ``Podesavanje tastature''.

  2.3.  X-Windows graficko okruzenje

  Najkraci postupak za dobijanje nasih slova na ekranu pod X-Windowsima
  bio bi:


  1. Preuzmite fontove sa slovenackog FTP sajta


        <ftp://ftp.arnes.si/software/unix/Latin-2-fonts/>


  2. Prijavite se na sistem kao root.



  3. Kreirajte odgovarajuce poddirektorijume u direktorijumu

     /usr/X11R6/lib/X11/fonts. Na primer:

       /usr/X11R6/lib/X11/fonts/ISO-8859-2/100dpi
       /usr/X11R6/lib/X11/fonts/ISO-8859-2/75dpi



  Raspakujte fontove ( tar -xvf ...) u odgovarajuce poddirektorijume.



  4. X server zahteva fontove u odgovarajucem, prevedenom formatu.
     Pribavljene fontove prevedite komandom bdftopcf, koja je deo paketa
     XFree86-X.X.X-XX (RedHat):



  for FILE in *.bdf
  do
      bdftopcf $FILE -o `basename $FILE .bdf`.pcf
  done



  5. Kompresujte tako dobijene fontove komandom gzip:

       gzip *.pcf


  6. U svakom poddirektorijumu X server ocekuje datoteku fonts.dir koja
     preslikava imena datoteka sa fontovima u kanonicka imena fontova (X
     Logical Font Description, XLFD). Datoteku kreirajte sa

       mkfontdir



  koju morate ponoviti u svakom poddirektorijumu direktorijuma
  ISO-8859-2.



  7. Ostaje vam jos samo da X server "date do znanja" da ste instalirali
     nove fontove. To cinite nizom komandi xset:


       xset +fp /usr/X11R6/lib/X11/fonts/ISO-8859-2/75dpi/
       xset +fp /usr/X11R6/lib/X11/fonts/ISO-8859-2/100dpi/
       xset fp rehash



  Ako je sve islo kao sto treba, naredba

       xlsfonts -fn "*-iso8859-2"



  mora prikazati nazive novih fontova.



  8. Komanda xset vazi samo dok ne izadjete iz X Windows-a. Da biste
     promene u putu za pretrazivanje fontova ucinili trajnim, morate da
     promenite konfiguracionu datoteku XFree86 servera. Ona se nalazi u


       /usr/X11/lib/X11/Xconfig  (Slackware) ili
       /etc/X11/XF86Config  (RedHat)



  Potrazite u njoj redove koji pocinju sa FontPath i dodajte:



  FontPath "/usr/X11R6/lib/X11/fonts/ISO-8859-2/75dpi"
  FontPath "/usr/X11R6/lib/X11/fonts/ISO-8859-2/100dpi"



  Navodnici oko puta do direktorijuma se moraju otkucati.

  To bi bilo sve. Od sada X-Windows ima "infrastrukturu" za prikazivanje
  nasih slova.

  3.  Podesavanje tastature


  3.1.  Konzolni rezim rada

  skup znakova za konzolni rezim rada i tabele za preslikavanje
  tastature mozete naci u paketu kbd Andriesa Brouwera sa univerziteta u
  Ajndhovenu, Holandija. Autor paketa je takodje napisao i Keyboard
  HOWTO (u pripremi na srpskom jeziku), gde mozete dobiti dodatna
  obavestenja o ovoj temi. U Slackware distribuciji mozete naci pomenuti
  paket pod imenom keytbls, dok je kod RedHat distribucije u pitanju
  kbd-X.XX-X.i386.rpm. Paketi se instaliraju komandama pkgtool ili rpm,
  respektivno.

  Paket kbd sadrzi raspored za srpsku tastaturu, po ugledu na postojece
  pisace masine kod nas. Ovaj paket ce raditi ako prethodno pripremite i
  odgovarajuce fontove po ISO-8859-2 kodnom rasporedu. Ukoliko koristite
  neki drugi kodni raspored na dirkama tastature, pogledajte datoteke u
  /usr/lib/kbd/keytables direktorijumu (RedHat) ili /usr/lib/kbd
  direktorijumu (Slackware) i napravite ono sto vam je potrebno.

  Ceo postupak izbora ekranskg fonta i rasporeda na tastaturi sastoji se
  u sledecem:


       # Biramo font za ekran visine 16 piksela
       setfont lat2-16 ( ili iso02.f16, ako nemate prvi fajl)
       # Srpska latinicna tastatura
       loadkeys sr
       # Aktivacija tastature
       echo -e -n "\\033(K" > /dev/console



  Gornje redove mozete dodati u datoteku /etc/rc.d/rc.local, kako bi se
  izvrsili prilikom svakog pokretanja Linuxa.


  3.2.  X-Windows graficko okruzenje

  U X-Windows grafickom okruzenju tastaturu podesavamo za nasa slova
  komandom xmodmap. Datoteku sa rasporedom tastera koji se koristi na
  pisacim masinama za srpski jezik mozete naci na

        <ftp://www.linux.org.yu/sr/utils/Xmodmap.sr.pc102>


  Upotreba je jednostavna:

       xmodmap Xmodmap.sl.pc102


  Ako hocete da promenu ucinite trajnom, prekopirajte datoteku u
  ~/.Xmodmap (samo za vas nalog na Linuxu) ili u /etc/X11/xinit/Xmodmap
  (raspored tastera ce vaziti za sve korisnike). Ova promena ce se
  aktivirati od momenta novog pokretanja X-Windowsa.


  4.  Prilagodjavanje nekih aplikacija nasim slovima

  Prilagodjavanja tastature i ekrana, na zalost, najcesce nisu dovoljna
  da bi pojedini programi korektno postupali sa nasim slovima. Zato su
  potrebna dodatna podesavanja. Da bi neki od vaznih programa umeli da
  prepoznaju nasa slova, potrebno je uraditi sledece:


  4.1.  Shell-ovi


     bash:
        Bourne shell (i Bourne-Again-Shell) ce ispravno razumeti srpska
        podesavanja ako u datoteku ~/.inputrc ubacite sledece redove:


          set meta-flag on
          set convert-meta off
          set output-meta on



     Mozda ne bi bilo lose da ove redove dodate u /etc/skel, jer se tamo
     nalaze datoteke koje se kopiraju u $HOME direktorijum svakog novog
     korisnika.


     (t)csh:
        Unos nasih znakova moguc je ako dodamo sledece redove u ~/.cshrc
        ili (samo za vas) ili /etc/csh.cshrc (za sve korisnike):


          stty pass8
          setenv LC_CTYPE iso_8859_2
          setenv LANG C



  4.2.  Ostali programi


     elm:
        U datoteku ~/.elm/elmrc dodajte sledece:


          charset = iso-8859-2
          displaycharset = iso-8859-2
          textencoding = 8bit



     Medjutim, nije garantovano da ce ovo raditi u svim verzijama elm-a.



     emacs:
        Dodajte sledece redove u vasu ~/.emacs datoteku ili u sistemsku
        inicijaliza- cionu datoteku (verovatno /usr/lib/emacs/site-
        lisp/default.el ili /usr/share/emacs/site-lisp/default.el):


          (standard-display-european t)
          (require 'iso-syntax)
          (set-input-mode (car (current-input-mode))
                  (nth 1 (current-input-mode))
                  0)



     groff:
        Komandu navedite kao

          groff -Tlatin2 <vasa_groff_datoteka>


     Nemojte zaboraviti da ovo izmenite u /etc/man.config da biste
     dobili nasa slova u man stranicama, kada one jednog dana budu na
     raspolaganju na srpskom jeziku. Takodje, nemojte uklanjati -mandoc
     prekidac.



     joe:
        Kucajte komandu kao

          joe -asis


     ili dodajte sledece u vasu ~/.joerc datoteku:

          -asis


     Crtica (-) MORA biti u prvoj koloni datoteke.



     kermit:
        Ovo je najbolje sto mozete dobiti, ali nije bas sasvim
        zadovoljavajuce.  Stavite sledece u vasu ~/.kermrc datoteku:


          set terminal bytesize 8
          set command bytesize 8
          set file bytesize 8
          set file character-set latin2-iso
          set transfer character-set latin2-iso
          set terminal character-set latin2-iso



     less:
        Postavite sledecu promenljivu:

          LESSCHARSET=latin1


     ls:
        Kucajte komandu kao

          ls -N


     ili, ako to ne radi, kao

          ls --8bit



     man:
        Vidite deo o groff komandi.



     metamail:
        Postavite sledecu promenljivu:

          MM_CHARSET-ISO-8859-2



     nn:
        Stavite sledece u ~/.nn/init datoteku:

          set data-bits 8



     pine:
        Stavite sledecu definiciju u ~/.pinerc datoteku:

          character-set=ISO-8859-2


     Ovo mozete uraditi i iz "Setup"-a, opcija "Config".



     rlogin:
        Navedite komandu kao


          rlogin -8 neki.sajt.yu



     telnet:
        Stavite po jednu liniju u vasu ~/.telnetrc datoteku za svaki
        host kome zelite da pristupite koristeci telnet:


          <ime hosta> set outbinary true


     Na primer:



     moje.malo.mesto.yu      set outbinary true
     moj.ISP.yu              set outbinary true



     tin:
        Stavite sledece definicije u vasu ~/.tin/headers datoteku:


          Mime-Version: 1.0
          Content-Type: text/plain; charset=iso-8859-2
          Content-Transfer-Encoding: 8bit



     Sada mozete da saljete poruke u diskusione grupe koristeci nasa
     slova.


  5.  Razna podesavanja

  5.1.  Vremenska zona

  Jugoslavija se nalazi u centralno-evropskoj vremenskoj zoni (CET ili
  MET) koja tokom zime odgovara grinickom vremenu uvecanom za 1 sat
  (GMT+1). Vremensku zonu na Linux sistemu mozete postaviti pravljenjem
  simbolicke veze:

       ln -sf /usr/lib/zoneinfo/MET /etc/localtime


  ili

       ln -sf /usr/lib/zoneinfo/Europe/Belgrade /etc/localtime


  Ovim, takodje, prelazite na letnje racunanje vremena (GMT+2).

  Sistemsko vreme mozete da uskladite sa CMOS casovnikom zadavanjem
  komande clock dok ste prijavljeni kao root korisnik. Ako je vas CMOS
  casovnik podesen na GMT vreme (poznato i kao UTC vreme - standard svih
  pravih UNIX sistema), onda mozete koristiti

       clock -u -s


  U suprotnom, za uskladjivanje lokalnog vremena koristite

       clock -s


  5.2.  Format papira A4


    dvips: Promenite datoteku /usr/lib/texmf/dvips/config.ps ili
     ~/.dvips.


    ghostscript: Dodajte opciju -sPAPERSIZE=a4 u komandnoj liniji kojom
     pozivate program.


    ghostview: Dodajte sledecu liniju u ~/.Xresources:

       Ghostview.pageMedia:  A4



    xdvi: Dodajte sledecu liniju u ~/.Xresources:

       XDvi.paper:     A4


  5.3.  Format tekstualnih datoteka za druge operativne sisteme

  Koristeci paket recode mozete prevesti datoteke koje sadrze tekst u
  ISO-8859-2 rasporedu u neki drugi raspored, na primer Microsoft
  CP-1250, IBM Codepage 852 ili neki treci. Upotreba je jednostavna:

       recode cp852:latin2 <ime_datoteke>


  Paket je dostupan kao recode-3.4.tar.gz (ili noviji) na svim sajtovima
  koji drze kopiju sajta prep.ai.mit.edu.


  6.  Podesavanje stampanja

  Kod stampanja mozete naici na razne situacije:

    Stampac neposredno podrzava ISO Latin 2 raspored (idealno!)

    Stampac podrzava jedan od ostalih 8-bitnih rasporeda sa nasim
     slovima (na pr. kodni raspored 852), ali i 7-bitni raspored JUS
     I.B1.002 (bolje)

    Stampac razume PostScript (dobro)

    Stampac ne razume nista drugo osim ASCII znakova (lose!)


  6.1.  Stampaci koji podrzavaju ISO-8859-2 kodnu stranicu

  Neki od novijih stampaca neposredno podrzavaju ISO-8859-2 kodni
  raspored.  Medju njima su:

    Hewlett-Packard LaserJet 4 Plus i 4M Plus

    Hewlett-Packard LaserJet 5L

    Epson FX-2170

    Epson LQ-870

    Fujitsu DL700

    Fujitsu DL1150/1250

    Fujitsu DL3700/3800

    Fujitsu DL6400/6600

     Sve sto treba da uradite je da stampacu naredite da koristi
     odgovarajucu kodnu stranicu. Komandna sekvenca za stampace Hewlett-
     Packard je:

       \033(@N\033(s0p12h0s0b4099T

  gde je \033 oktalni kod znaka Escape.

  Jedan od nacina da pomocu datoteke /etc/printcap prilagodimo stampac
  da stampa po tom rasporedu opisan je u sledecem odeljku.


  6.2.  Stampaci koji podrzavaju neki drugi 8-bitni kodni raspored

  Ako stampac podrzava neki drugi kodni raspored s nasim slovima, ipak
  mozemo pomocu njega stampati tekstove po ISO-8859-2 rasporedu, ako
  datoteku /etc/printcap prilagodimo na odgovarajuci nacin.

  Postupak cemo objasniti na primeru stampaca marke Epson, koji ima
  znake po YUSCII rasporedu na mesto svedske abecede.


       lp|ascii|epson|Epson LQ-850:\
               :lp=/dev/lp1:\
               :sd=/usr/spool/lpd/epson:\
               :lf=/usr/spool/lpd/ERRORLOG:\
               :mx#0:\
               :sh:
       jus|Epson LQ-850 sa znakovima JUS I.B1.002:\
               :lp=/dev/null:\
               :sd=/usr/spool/lpd/jus:\
               :if=/usr/spool/lpd/jus_filter:\
               :lf=/usr/spool/lpd/ERRORLOG:\
               :mx#0:\
               :sh
       latin2|text|Epson LQ-850 sa znakovima po ISO Latin 2:\
               :lp=/dev/null:\
               :sd=/usr/spool/lpd/latin2:\
               :if=/usr/spool/lpd/latin2_filter:\
               :lf=/usr/spool/lpd/ERRORLOG:\
               :mx#0:\
               :sh:



  U pitanju su tri reda za stampanje. Prva je americki (ASCII) izbor
  znakova.  Drugi koristi /var/spool/lpd/jus_epson:


       #!/bin/sh
       /usr/spool/lpd/jus_epson | lpr -Pascii



  Potrebno je da datoteku filtrirate kroz filter
  /var/spool/lpd/jus_epson i da je postavite u prvi red za stampanje.
  Filter jus_epson ne radi nista drugo osim sto bira svedski kodni ras
  pored, prepise datoteku sa ulaza na izlaz i na kraju opet bira amer
  icki raspored. To je jedini deo programa koji zavisi od vrste stam
  paca:



  #!/bin/sh
  # Stampanje dokumenta kodiranih po JUS I.B1.002 na stampac Epson LQ
  #
  # Biramo srpski (svedski) raspored
  /bin/echo "\033R\005\c"
  # Ispisujemo dokument
  cat
  # Biramo ASCII raspored
  /bin/echo "\033R\000\c"



  Treci red (queue) je modifikacija drugog. Najpre se dokument pretvara
  iz Latin 2 u JUS kodni raspored, zatim se koristi prethodno opisani
  filter da doda na pocetku i na kraju potrebne kodove za stampac, i na
  kraju se datoteka salje u prvi red za stampanje.


       #!/bin/sh
       /usr/local/bin/recode --force latin2:yu | \
       /usr/spool/lpd/jus_epson | lpr -Pascii



  Ovde pretpostavljamo da posedujemo program recode u /usr/local/bin
  direktorijumu.

  U ovu svrhu morate u direktorijumu /usr/spool/lpd (ili /var/spool/lpd)
  kreirati poddirektorijume /usr/spool/lpd/epson, /usr/spool/lpd/jus i
  /usr/spool/lpd/latin2.

  Stampanje bi trebalo da ide lako:

  1. Bez eksplicitne izbora reda, ili sa izborima -Pepson ili -Pascii,
     datoteka se stampa kao ASCII:

       lpr <datoteka>



  2. Izborom reda -Pjus datoteka se stampa kao dokument po JUS I.B1.002
     rasporedu:

       lpr -Pjus <datoteka>



  3. Izborom reda -Platin2 ili -Ptext datoteka se stampa po ISO-8859-2
     rasporedu:

       lpr -Platin2 <datoteka>



  6.3.  PostScript stampaci

  Datoteku mozete lako odstampati ako koristite jedan od filtera za
  PostScript stampace koji podrzavaju ISO-8859-2 raspored. Takvi
  programi su, na primer, a2ps i GNU enscript. Poslednji podrzava
  ISO-8859-2 raspored, dok je podrska za prvi program u izradi.

  Enscript za Red Hat distribucije mozete naci na
  <http://rufus.w3.org/linux/RPM> "skladistu" RPM paketa.

     GNU enscript
        Ako niste instalirali GNU enscript, mozete to da ucinite po
        uputstvima koja prate program. Osim njega, potreban vam je i
        neki font u Type 1 obliku koji sadrzi nasa slova. Dobar izbor bi
        bio IBM Courier, koji se distribuira uz X Windows sisteme ili sa
        programom ghostscript. Ako font postoji, ali ne znate tacno gde
        se nalazi, mozete ga pronaci komandom

          find / -name cour.pf[ab]


     U licnu (~/.enscriptrc) ili sistemsku konfiguracionu datoteku
     (/usr/local/etc/enscript.cfg ili /usr/loca/etc/enscriptsite.cfg)
     dodajte put do datoteke sa fontovima. Osim toga, GNU enscript
     zahteva u svakom direktorijumu sa fontovima datoteku font.map, koja
     sadrzi preslikavanje izmedju fontova i datoteka u kojima se fontovi
     nalaze - slicno kao fonts.dir.  Datoteku font.map mozete da
     kreirate naredbom mkafmmap.

     Primer konfiguracione datoteke enscriptsite.cfg:


          ...
          #  Gde su PostScript fontovi?
          AFMPath: /usr/lib/X11/fonts/Type1:/usr/local/lib/ghostscript/fonts
          ...
          # Podrazumevani nacin kodiranja:
          DefaultEncoding: latin2
          ...
          # Podrazumevani format papira:
          DefaultMedia: A4
          ...
          # lpd bira red za stampanje prekidacem -P...
          QueueParam: -P
          ...
          # Za stampanje koristimo naredbu lpr, a ne lp
          Spooler: lp



     Posto ste sve namestili, jednostavno posaljite datoteku na stam
     panje komandom

          enscript <datoteka>


  7.  Podrska za lokalna podesavanja u libc 5.4.x i navise

  Podrska lokalnim podesavanjima je poboljsana u libc 5.4.x i navise.
  Mozete izbeci mnoga pojedinacna podesavanja programa opisana u
  poglavlju 4, ``Prilagodjavanje nekih aplikacija nasim slovima'' ako je
  vas sistem pripremljen za lokalnu podrsku. Debian distribucija
  podrzava lokalna podesavanja ako instalirate paket wg15-locale.
  Procitajte Locales mini-HOWTO ako zelite da podesite lokalnu podrsku
  na ne-Debian sistemima sa libc 5.4.x. RedHat distribucija takodje
  podrzava lokalna podesavanja od verzije 5.0 navise ako instalirate
  paket glibc-X.X.X-XX-i386.rpm.  Sistemi sa GNU libc 2 (libc 6.x)
  takodje podrzavaju lokalna podesavanja.

  Ako vasa Linux distribucija ne podrzava srpska latinicna lokalna
  podesavanja, posluzite se sledecim trikovima:


  1. Najpre proverite da li vas sistem podrzava slovenacka ili hrvatska
     lokalna podesavanja. Ako je to tacno, predjite na korak 3.
  2. Nadjite na Internetu tekstualnu datoteku sl_SI ili hr_HR u kojoj su
     opisana odgovarajuca podesavanja za hrvatski, odnosno slovenacki
     jezik.



  3. Prijavite se na sistem kao root.



  4. Predjite u direktorijum  /usr/share/i18n/locales ako koristite
     RedHat distribuciju, ili odgovarajuci direktorijum na Slackware,
     Debian ili Caldera distribuciji.



  5. % cp sl_SI (ili hr_HR) /usr/share/i18n/locales/sr_YU



  6. % cd /usr/share/i18n/locales



  7. Koristeci vas omiljeni editor, promenite sledece linije u datoteci
     sr_YU (navedeni brojevi ne moraju nuzno biti tacni, vec su dati
     radi lakse orijentacije u datoteci):


       4:    % Serbian Language Locale for Yugoslavia
       6:    % Address:
       7:    %
       8:    % Contact:
       9:    % Email:
       10:   % Tel:
       12:   % Language: sr
       13:   % Territory: YU
       2117: yesexpr "<<(><d><D><y><Y><)/>><*><.>"
       2118: noexpr  "<<(><n><N><)/>><*><.>"
       2122: int_curr_symbol           "<Y><U><N><SP>"
       2123: currency_symbol           "<d><i><n>"
       2148:        "<u><t><o>";"<s><r><e>";/
       2161:        "<j><u><l>";"<a><v><g>";/
       2171:        "<a><v><g><u><s><t>";/
       2177: d_fmt  "<%><d><-><%><m><-><%><Y><.>"



  8. Izvrsite komandu

       localedef -c -i sr_YU -f ISO-8859-2 sr_YU


  Ako sve protekne u redu, trebalo bi da imate srpsku latinicnu lokalnu
  podrsku. Da biste je aktivirali, trebalo bi da podesite promenljivu iz
  okruzenja:

       LC_ALL=sr_YU

  Takodje, mozete pokusati sa sr_YU.ISO_8859_2 ako sr_YU ne radi.  Da
  biste proverili da li lokalna podrska radi, otkucajte

       date


  Trebalo bi da dobijete datum sa nasim skracenicama imena dana u
  nedelji i meseca.


  Pomenute promenljive postavljaju sve kategorije lokalne podrske.
  Mozete postaviti pojedinacnu kategoriju koristeci ime kategorije kao
  promenljivu.  Lokalne kategorije su:


       Lokalna kategorija      Primena
       ------------------      -------
       LC_COLLATE              Redosled sortiranja slova u stringu.
       LC_CTYPE                Klasifikacija i pretvaranje znakova.
       LC_MESSAGES             Prevod odgovora "da" i "ne".
       LC_MONETARY             Novcani format.
       LC_NUMERIC              Format ne-monetarnih numerickih vrednosti.
       LC_TIME                 Format datuma i vremena.
       LC_ALL                  Postavlja sve gorenavedene kategorije (i ima
                               prvenstvo u odnosu na sve).
       LANG                    Postavlja sve kategorije, ali moze da bude
                               nadjacana bilo kojom pojedinacnom lokalnom
                               kategorijom.



  Neki programi, kao sto su bash ili GNU emacs ipak zahtevaju posebna
  podesavanja, kao sto je opisano u poglavlju 4, ``Prilagodjavanje nekih
  aplikacija nasim slovima'', ali vecina bi trebalo da radi bez dodatnog
  "nadzora". Programi kao sto su nvi koji ranije nisu radili sa 8-bitnim
  znacima sada bi trebalo da rade.

  Lokalna podrska bi trebalo da postane prisutnija sa pojavom distribu
  cija koje su zasnovane na GNU libc 2 biblioteci. Vodite racuna da,
  mada Red Hat Linux 5.0 sadrzi GNU libc 2, lokalna podrska ne radi. Da
  biste je aktivirali, treba da izvrsite sledeci skript (zanemarite upo
  zorenja):



  #!/bin/sh
  localedef -c -i en_DK -f ISO-8859-1 en_DK
  localedef -c -i sv_SE -f ISO-8859-1 sv_SE
  localedef -c -i fi_FI -f ISO-8859-1 fi_FI
  localedef -c -i sv_FI -f ISO-8859-1 sv_FI
  localedef -c -i ro_RO -f ISO-8859-1 ro_RO
  localedef -c -i pt_PT -f ISO-8859-1 pt_PT
  localedef -c -i no_NO -f ISO-8859-1 no_NO
  localedef -c -i nl_NL -f ISO-8859-1 nl_NL
  localedef -c -i fr_BE -f ISO-8859-1 fr_BE
  localedef -c -i nl_BE -f ISO-8859-1 nl_BE
  localedef -c -i da_DK -f ISO-8859-1 da_DK
  localedef -c -i kl_GL -f ISO-8859-1 kl_GL
  localedef -c -i it_IT -f ISO-8859-1 it_IT
  localedef -c -i is_IS -f ISO-8859-1 is_IS
  localedef -c -i fr_LU -f ISO-8859-1 fr_LU
  localedef -c -i fr_FR -f ISO-8859-1 fr_FR
  localedef -c -i de_DE -f ISO-8859-1 de_DE
  localedef -c -i de_CH -f ISO-8859-1 de_CH
  localedef -c -i fr_CH -f ISO-8859-1 fr_CH
  localedef -c -i en_CA -f ISO-8859-1 en_CA
  localedef -c -i fr_CA -f ISO-8859-1 fr_CA
  localedef -c -i fo_FO -f ISO-8859-1 fo_FO
  localedef -c -i et_EE -f ISO-8859-1 et_EE
  localedef -c -i es_ES -f ISO-8859-1 es_ES
  localedef -c -i en_US -f ISO-8859-1 en_US
  localedef -c -i en_GB -f ISO-8859-1 en_GB
  localedef -c -i en_IE -f ISO-8859-1 en_IE
  localedef -c -i de_LU -f ISO-8859-1 de_LU
  localedef -c -i de_BE -f ISO-8859-1 de_BE
  localedef -c -i de_AT -f ISO-8859-1 de_AT
  localedef -c -i sl_SI -f ISO-8859-2 sl_SI
  localedef -c -i ru_RU -f ISO-8859-5 ru_RU
  localedef -c -i pl_PL -f ISO-8859-2 pl_PL
  localedef -c -i lv_LV -f BALTIC lv_LV
  localedef -c -i lt_LT -f BALTIC lt_LT
  localedef -c -i iw_IL -f ISO-8859-8 iw_IL
  localedef -c -i hu_HU -f ISO-8859-2 hu_HU
  localedef -c -i hr_HR -f ISO-8859-2 hr_HR
  localedef -c -i gr_GR -f ISO-8859-7 gr_GR



  8.  Korisni saveti za programiranje sa X11

  Prikazivanje 8-bitnih znakova je vrlo lako. Koristite ih isto kao sto
  biste koristili 7-bitni ASCII skup znakova. Medjutim, da bi aplikacija
  prihvatila unos 8-bitnih znakova predstavlja totalno drugu pricu.

  Ako koristite na pr. Xt okruzenje i Motif, treba da dodate samo jednu
  liniju u vas program. Prvi poziv Xt biblioteci treba da bude procedura
  XtSetLanguageProc. Na primer:


       int main (int argc, char** argv)
       {
               ...
               XtSetLanguageProc (NULL, NULL, NULL);
               top = XtAppInitialize ( ... );
               ...
       }



  Posle ovog vas program ce automatski da uzima u obzir LC_CTYPE
  promenljivu i tumaci tastere prema Compose tabelama u
  /usr/lib/X11/locale/ direktorijumu. Ovo bi trebalo da radi za gotovo
  sve evropske jezike i u celini je prenosivo. Kako XFree86 visejezicna
  podrska postaje bolja, tako ce vas program biti korisniji i na Bliskom
  i Srednjem istoku.

  Ovaj metod unosa podrzavaju Xt, Xlib i Motif v1.2 (i noviji). Prema
  podacima kojima raspolazem, Xaw biblioteka ga samo delimicno podrzava.
  Ako znate nesto vise u vezi sa ovim, voleo bih da mi napisete koji red
  putem elektronske poste :) .

  Ovo poglavlje je sastavljeno na osnovu obimnije diskusije u delu
  Programming for internationalization  Majkla Gsvinda [Michael
  Gschwind]. Pogledajte poglavlje 9, ``Reference i FTP sajtovi'' za
  pokazivac na ovaj dokument.


  9.  Vazne reference i FTP sajtovi


  9.1.  Ostale reference od znacaja

  Ovaj dokument bi trebalo da je na raspolaganju na svim racunarima koji
  drze kopiju sajta sunsite.unc.edu i tsx-11.mit.edu. Srpski sajt mozete
  naci na adresi  <http://www.linux.org.yu/sr/> .

  German HOWTO  (na nemackom) napisao Winfred Truemper. Mnogi nacionalni
  HOWTO dokumenti (finski, poljski, slovenacki) su raspolozivi na
  odgovarajucim jezicima.

  Linux Keyboard and Console HOWTO  napisao Andries Brouwer.

  Locales mini-HOWTO  napisao Peeter Joot.

  Dokumenti ISO 8859-1 National Character Set FAQ  i  Programming for
  Internationalization  (i mnogo vise) koje je napisao Michael Gschwind
  raspolozivi su na njegovoj prezentaciji
  <http://www.visivie.tuwien.ac.at/mike/i18n.html>


  9.2.  Linux u Jugoslaviji

  Harald T. Alvestrand iz Norveske vodi evidenciju o korisnicima Linuxa
  po drzavama. Spisak srpskih (ili jugoslovenskih) korisnika je na

        <http://domen.uninett.no:29659/bycountry/YU.html>


  Ako niste medju njima, prijavite se - odmah!

        <http://domen.uninett.no:29659/>


  Od leta 1997. u Beogradu je organizovano Udruzenje korisnika Linuksa u
  Jugoslaviji (LUGY - Linux Users Group of Yugoslavia). Udruzenje ima
  svoju prezentaciju na

        <http://www.linux.org.yu>


  Jugoslovenska grupa LUGY ima, kao sto i dolikuje, svoju diskusionu
  listu!  Na nju se mozete prijaviti ako na adresu majordomo@beocity.com
  posaljete poruku subscribe linux u telu poruke. U momentu dok ovo
  citate, moguce je da je pretplata na diskusionu listu prebacena na
  "pravo" mesto, tj. na majordomo@linux.org.yu, no, to ostavljam vama da
  proverite.


  9.3.  FTP sajtovi

  U vreme pisanja ovog dokumenta, autoru su bila poznata dva FTP sajta
  posvecena Linuksu i srpskim podesavanjima:

       <ftp://ftp.emi.yu/pub/Linux>



       <http://www.linux.org.yu/sr/utils/>



  9.4.  USENET diskusione liste

  Kada je o USENET-u rec, postoji diskusiona grupa yu.os.unix u kojoj
  se, pored ostalog, raspravlja i o Linuksu. Jedan od news servera,
  preko koga mozete da citate clanke, jeste i:

       news.beotel.net


  10.  Epilog


  10.1.  Posveta

  Ovaj dokument je posvecen uspomeni na Milenu Rogulj ("teta-Milenu"),
  dragu prijateljicu koju mi je smrt prerano otela.


  10.2.  Logicno pitanje... i logican odgovor

  Deo ovog dokumenta govori o namestanju nasih slova na Linuksu, ali
  ovde ih nema. Kako to?

  Pretpostavlja se da je ovaj dokument prvi u nizu dokumenata na srpskom
  jeziku koga ce procitati novopeceni korisnik Linuksa. S obzirom da,
  kao takav, ne raspolaze znanjem koje je potrebno da namesti nasa
  slova, ovaj dokument ih ne koristi jer bi nas novopeceni korisnik
  video samo "kuke i kvake".


  10.3.  Zahvalnice

  Hvala:

    Svim pretplatnicima srpske "linux" diskusione liste na korisnim
     predlozima (linux@beocity.com),

    Matu Velsu, autoru  Linux Installation and Getting Started,

    Ajenu Dzeksonu, autoru  Linux frequently asked questions with
     answers, i posebno

    Linusu Torvaldsu i GNU-u koji su nam dali Linuks.

  10.4.  Izjava o odricanju od odgovornosti

  Ovaj dokument je "takav kakav je". Ulozeno je puno truda da bude sto
  bolji, ali ove informacije koristite na sopstvenu odgovornost. Ni u
  kom slucaju autor ovog teksta ne preuzima odgovornost za bilo kakve
  stete, posredne ili neposredne, nastale koriscenjem saveta iz
  dokumenta.

  Suvisle primedbe su dobrodosle. Slobodno mi posaljite predloge za
  poboljsanja, kao i uocene nepravilnosti. Argumentovana (i jos jednom:
  ARGUMENTOVANA!)  kritika je dobrodosla. Pohvale ce biti sacuvane na
  posebnoj disketi. Sve ostalo ce bez milosti zavrsiti u /dev/null.


  10.5.  Autorska prava

  Ako nije drugacije napomenuto, autorska prava na Linux HOWTO dokumente
  poseduju njihovi autori. HOWTO dokumenti mogu se reprodukovati i
  distribuirati u celini ili delimicno, na fizickom ili elektronskom
  mediju, sve dok je ovo obavestenje prisutno na svim primercima.
  Komercijalna distribucija dozvoljena je i podrzava se; medjutim, autor
  ovog dokumenta bi o takvom distribuiranju zeleo da bude obavesten.

  Svi prevodi, izvedeni ili sazeti radovi koji ukljucuju Linux HOWTO
  dokumente moraju biti pod ovom licencom. Dakle, nije vam dozvoljeno da
  napravite rad izveden iz HOWTO-a i da namecete dodatna ogranicenja na
  njegovu distribuciju. Izuzeci od ovog pravila moguci su pod odredjenim
  uslovima; kontaktirajte Linux HOWTO koordinatora na nize navedenoj
  adresi.

  Ukratko, mi, prevodioci HOWTO dokumenata na srpski zelimo da ohrabrimo
  sirenje ovih informacija kroz sto je moguce vise kanala. Medjutim,
  zelimo da zadrzimo autorska prava na HOWTO dokumente i zeleli bismo da
  budemo obavesteni o bilo kakvim namerama u vezi sa redistribuicijom
  svih srpskih HOWTO dokumenata.

  Ako imate pitanja, kontaktirajte Tima Bajnuma [Tim Bynum], Linux HOWTO
  koordinatora, na linux-howto@sunsite.unc.edu.


  10.6.  A note to English readers

  This document is a copyrighted work. Its use in part or as whole, for
  non-profit or for-profit purposes, and its dissemination in any form,
  either printed or electronic is explicitelly allowed, as long as the
  above copyright notice is retained on all copies. Its suggested
  citation is

       Serbian-HOWTO Copyright (C) 1998 by Zoltan Csala
       http://www.linux.org.yu/sr/howto/Serbian-HOWTO


  Single copies of any document citing this guide would be much appreci
  ated.

  The information in this document is provided in belief of being
  accurate and useful, however without any warranty, expressed or
  implied, including, but not limited to, the implied warranties of
  merchantibility or fitness for a particular purpose. The entire risk
  of using the information goes with the user. The author can not be
  liable for any possible damage, direct or indirect, arising from the
  use of information provided in this document.



F SERBIAN-.;1                       	Serbian-HOWTO
  Slovenian HOWTO
  Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>
  v2.9, 15 February 1999

  Zbirka receptov za poslovenjenje sistema Linux.  (Note to English
  readers: this document addresses Linux localization issues specific to
  Slovenian users.)
  ______________________________________________________________________

  Table of Contents



  1. Uvod

     1.1 Kaj je Linux?
     1.2 Dogovor o zapisu

  2. Za nestrpne

     2.1 Nasi znaki na konzoli
     2.2 Nasi znaki v okolju X Window System

  3. Prikaz nasih znakov na zaslonu

     3.1 Nabor znakov ``ISO Latin 2''
     3.2 Konzola
     3.3 X Window System
     3.4 PostScript pod X11
     3.5 TrueType pod X11
        3.5.1 Freetype in xfsft
        3.5.2 Xfstt

  4. Tipkovnica

     4.1 Konzola
     4.2 X Windows System
        4.2.1 Xks

  5. Slovenski locale

     5.1 Programiranje z GNU gettext
     5.2 Poslovenjenje katalogov sporocil

  6. Poslovenjenje razlicnih programov

     6.1 Ukazne lupine
        6.1.1 bash
        6.1.2 tcsh
     6.2 Terminalski emulatorji
        6.2.1 xterm
        6.2.2 rxvt
     6.3 Pisarniski paketi
        6.3.1 WordPerfect
        6.3.2 Star Office
        6.3.3 Applixware
     6.4 Urejevalniki
        6.4.1 GNU emacs
           6.4.1.1 Starejse izdaje programa GNU emacs
           6.4.1.2 GNU emacs 20
        6.4.2 crisp
        6.4.3 vi
     6.5 Elektronska posta
        6.5.1 Pine
        6.5.2 elm
        6.5.3 Netscape Mail
     6.6 Svetovni splet
        6.6.1 Lynx
        6.6.2 Netscape Navigator
        6.6.3 Spletni strezniki
           6.6.3.1 Nacela
           6.6.3.2 Prakticni oziri
           6.6.3.3 Podrobnosti izvedbe
           6.6.3.4 Dolocitev nove pripone za staticne spise
           6.6.3.5 Dinamicno prekodiranje
           6.6.3.6 Metainformacija za spletni streznik W3C
           6.6.3.7 Datoteke ASIS za streznik Apache
           6.6.3.8 Znacka <META> z oznacbo HTTP-EQUIV
     6.7 Delo na oddaljenem racunalniku
        6.7.1 Telnet
        6.7.2 rlogin
     6.8 TeX in LaTeX
        6.8.1 LaTeX 2.09
        6.8.2 Slovenska pravila za deljenje besed
        6.8.3 LyX
        6.8.4 Pregled besedila na zaslonu
        6.8.5 Stvarna kazala
     6.9 groff
     6.10 Perl
     6.11 Crkovanje: ispell
     6.12 Pretvarjanje med razlicnimi kodiranji
     6.13 Drugi programi
        6.13.1 Pregledovalnik less
        6.13.2 Koledar gcal

  7. Tiskanje

     7.1 Tiskalniki, ki podpirajo ISO Latin 2
     7.2 Tiskalniki, ki podpirajo kak drug nabor z nasimi znaki
     7.3 Tiskalniki, ki podpirajo kak drug nabor z nasimi znaki II
     7.4 Tiskalniki PostScript
        7.4.1 ogonkify
        7.4.2 GNU enscript
        7.4.3 a2ps

  8. Linux v Sloveniji

     8.1 Skupina uporabnikov Linuxa
     8.2 Strezniki FTP
     8.3 Usenet
     8.4 Zastopniki za Linux

  9. O tem spisu

     9.1 Opombe k drugi izdaji
     9.2 Zahvala
     9.3 Vprasanja
        9.3.1 Se pravi Slovenian ali Slovene?
        9.3.2 Nasi znaki v tem spisu
     9.4 Uporaba in razsirjanje
     9.5 Note to English readers


  ______________________________________________________________________

  1.  Uvod

  1.1.  Kaj je Linux?

  Linux je izvedba vecopravilnega, vecuporabniskega operacijskega
  sistema Unix za osebne racunalnike s procesorji Intel (80386, 80486,
  Pentium, Pentium MMX, Pentium Pro in Pentium II), Digital AXP 21x64,
  Sun SPARC in Motorola 680x0, v delu pa so priredbe za Power PC, MIPS
  in ARM. Jedro operacijskega sistema je ob pomoci in sodelovanju
  stevilnih zanesenjakov z Interneta napisal Linus Torvalds z univerze v
  Helsinkih na Finskem. Skupaj s programi iz projektov GNU, X Window
  System in BSD predstavlja sodobno programsko okolje, enakovredno
  komercialnim razlicicam sistema Unix.

  Linux je prost program, dostopen skupaj z izvorno kodo.  Najnovejse
  razlicice programja za Linux je moc najti na:

       <ftp://metalab.unc.edu/pub/Linux/>
       <ftp://tsx-11.mit.edu/pub/linux/>

  Obe mesti sta navadno tezko dostopni in zelo zasedeni, zato uporabimo
  eno od stevilnih mest, kjer se zrcali vsebina zgornjih dveh; pametno
  je, da zacnemo na katerem od domacih zrcal; nasteta so v poglavju
  ``Linux v Sloveniji''.


  1.2.  Dogovor o zapisu

  V tem spisu so zgledi zamaknjeni od roba in izpisani v pisavi fiksne
  sirine, npr.

       echo "Pozdravljeni"


  Psevdoimena v zgledih so izpisana s lezeco razlicico iste pisave, npr.

       ls datoteka


  Tu se od bralca ali bralke pricakuje, da bo psevdoime datoteka nado
  mestil(-a) z dejanskim imenom datoteke.

  Z znakom ~ se po ustaljenem obicaju na sistemih Unix oznacuje osnovno
  podrocje uporabnika (za uporabnika z imenom uporabnik je to navadno
  /home/uporabnik).  Nanj kaze tudi sistemska spremenljivka $HOME.

  Nadalje je za nastavitve spremenljivk okolja v tem spisu vseskozi
  uporabljan zapis, ki se uporablja v Bournovi ukazni lupini in njenih
  izpeljankah (Kornova lupina, lupina bash).  Bralec ali bralka, ki
  uporablja ukazno lupino C (csh ali tcsh), bo znal(a) sam(a) prevesti
  primere

       SPREMENLJIVKA=vrednost; export SPREMENLJIVKA


  (ali celo export SPREMENLJIVKA=vrednost, kar dopusca bash) v analogne

       setenv SPREMENLJIVKA vrednost



  2.  Za nestrpne

  To poglavje ponuja nekaksna ``Izbrana poglavja iz slovenskega HOWTO''
  za tiste, ki se jim zdajle mudi, da bi lahko bodisi v znakovnem,
  bodisi v graficnem nacinu, takoj zaceli tipkati z nasimi znaki, k
  branju celotnega spisa pa bi se vrnili kdaj kasneje in v miru.  Omenim
  naj edino se to, da sta prilagoditev konzole in prilagoditev okolja X
  Window System povsem neodvisna.


  2.1.  Nasi znaki na konzoli

  Trije koraki so potrebni, da znakovni terminal (ki se mu iz razlogov,
  po starosti dalec presegajocih povprecnega uporabnika Linuxa, vcasih
  pravi tudi konzola) prilagodimo za delo z nasimi znaki:

  1. Omogociti moramo prikaz nasih znakov v znakovnem nacinu. Opisano v
     razdelku ``Konzola'' poglavja ``Prikaz nasih znakov na zaslonu''.

  2. Nastaviti moramo ustrezno preslikavo tipkovnice. Opisano v razdelku
     ``Konzola'' poglavja ``Tipkovnica''.

  3. Ukazno lupino moramo nastaviti tako, da bo dovoljevala vnos
     osembitnih znakov. Opisano v razdelku ``bash'' v podpoglavju o
     ukaznih lupinah (ali v razdelku ``tcsh'', ce uporabljate to ukazno
     lupino).


  2.2.  Nasi znaki v okolju X Window System

  Z okoljem X Window System je podobno kot s konzolo, le pot je
  malenkost daljsa.

  1. Namestiti moramo nase znake in pripraviti graficno okolje X Window
     System do tega, da jih bodo uporabljali. Opisano v razdelku ``X
     Window System'' poglavja ``Prikaz nasih znakov na zaslonu''.

  2. Nastaviti moramo preslikavo tipkovnice. Opisano v razdelku ``X
     Window System'' poglavja ``Tipkovnica''.

  3. Nastaviti moramo terminalski emulator, da bo prikazoval nase znake.
     Opisano v razdelku ``xterm'' poglavja o terminalskih emulatorjih.

  4. Ukazno lupino moramo nastaviti tako, da bo dovoljevala vnos
     osembitnih znakov. Opisano v razdelku ``bash'' v podpoglavju o
     ukaznih lupinah (ali v razdelku ``tcsh'', ce uporabljate to ukazno
     lupino).


  3.  Prikaz nasih znakov na zaslonu

  3.1.  Nabor znakov ``ISO Latin 2''

  ISO 8859-2 oz. ISO Latin 2 je clan druzine osembitnih naborov znakov
  ISO 8859, ki pokriva potrebe alfabetskih pisav (latinica in cirilica
  ter arabska, hebrejska in grska pisava; v pripravi sta tudi armenska
  in gruzinska). Druzino je zasnovalo evropsko zdruzenje proizvajalcev
  racunalnikov (European Computer Manufacturer's Association, ECMA), kot
  mednarodni standard pa potrdila organizacija za standardizacijo ISO s
  sedezem v Zenevi.

  Nabor ISO Latin 2 vsebuje vse potrebne znake za pisanje v albanscini,
  anglescini, bosnjascini, cescini, finscini, hrvascini, irscini,
  luziski srbscini, madzarscini, nemscini, poljscini, romunscini,
  slovascini, slovenscini, ter srbscini v latinicnem precrkovanju.

  Nekaj proizvajalcev strojne in programske opreme, med njimi IBM, Apple
  in Microsoft, uporablja svoje kodne strani za kodiranje znakov
  srednje- in vzhodnoevropskih narodov. Te kodne strani so praviloma
  nezdruzljive tako med seboj, kot tudi s standardom ISO.


  3.2.  Konzola

  Nabor znakov za sistemsko konzolo najdemo v paketu kbd Andriesa
  Brouwerja z univerze v Eindhovnu, Nizozemska. Paket je del vseh
  distribucij Linuxa in se avtomaticno nalozi ob namestitvi sistema.
  Pisave in pretvorne tabele so zlozene v imeniku /usr/lib/kbd.
  (Avanturisti se lahko namesto s paketom kbd igrajo s prototipnimi
  Linux Console Tools avtorja Yanna Dirsona.)

  V starejsih distribucijah Slackware se je prevedeni paket imenoval
  keytbls. Namestimo ga enako kot druge pakete, z ukazom pkgtool ali
  installpkg.

  Ko imamo paket enkrat namescen, izberemo drugo pisavo na zaslonu z
  ukazom setfont. Spodnji zgled izbere pisavo z naborom znakov po
  standardu ISO Latin 2 v velikosti sestnajst pik:



  setfont lat2-16



  Za nas zanimive pisave so iso02.f08, iso02.f14 in iso02.f16, ter
  lat2-08.psf, lat2-10.psf, lat2-12.psf, lat2-14.psf in lat2-16.psf
  (pripono .psf lahko pri ukazu setfont izpuscamo).

  Izbrana pisava velja v vseh virtualnih terminalih (glej console(4)) na
  konzoli. Ce nam to ni vsec, ampak bi radi imeli v vsakem virtualnem
  terminalu svojo pisavo, si lahko pomagamo s programom vtfontd Iana
  Zimmermana. Ta vsakic, ko zapustimo virtualni terminal, shrani izbrano
  konzolno pisavo, in jo ponovno restavrira, ko se vrnemo vanj.

       <ftp://sizif.mf.uni-lj.si/pub/linux/vtfontd-1.0.1.tar.gz>


  Z izbiro pisave smo opravili sele nekako tretjino vsega dela,
  potrebnega, da bi lahko v tekstovnem okolju pisali po slovensko.
  Izvesti moramo vsaj se preslikavo tipkovnice ter omogociti vnos
  osembitnih znakov v ukazni lupini. Nestrpna bralka ali bralec si lahko
  potrebno prebere v razdelku ``Konzola'' poglavja ``Tipkovnica'' ter v
  o razdelku ukazni lupini ``bash'' v poglavju o ukaznih lupinah.


  3.3.  X Window System

  Kratka navodila za namestitev pisav z nasimi znaki za uporabo z X
  Window System in streznikom XFree86.


  1. Pisave snamemo z najblizjega streznika FTP:

       <ftp://ftp.arnes.si/software/unix/Latin-2-fonts/>


  Datoteka ISO8859-2-bdf.tar.gz vsebuje najpopolnejsi nabor pisav, kodi
  ranih po ISO 8859-2, vecino uporabnih pisav pa vsebuje tudi xfonts-
  iso2-0.84.tar.gz. Po obicajnem postopku (tar -xzf ...) jih dekomprimi
  ramo in razpakiramo.

  2. Pisavam z nasimi znaki dolocimo mesto v drevesni strukturi
     imenikov. Obicajno je to podimenik v imeniku
     /usr/X11R6/lib/X11/fonts/ (vcasih tudi /usr/lib/X11/fonts/,
     /usr/lib/X11R6/lib/X11/fonts ali celo /usr/X386/lib/X11/fonts/ kar
     pa naj nas ne moti). Mozen primer:


       /usr/X11R6/lib/X11/fonts/iso_8859.2/75dpi/
       /usr/X11R6/lib/X11/fonts/iso_8859.2/100dpi/
       /usr/X11R6/lib/X11/fonts/iso_8859.2/misc/



  Ce imenikov s tem imenom se ni, jih ustvarimo.

  3. Streznik X ne zna uporabiti pisav v enakem formatu, kot se
     distribuirajo, zato jih moramo s programom bdftopcf prevesti iz
     formata BDF (Binary Distribution Format) v format PCF (Portable
     Compiled Format). Starejse izdaje X Window System so namesto
     slednjega uporabljale format SNF (Server Native Format), ki pa se
     danes ne uporablja vec.


     ___________________________________________________________________
     for FILE in *.bdf
     do
       bdftopcf $FILE -o `basename $FILE .bdf`.pcf
     done
     ___________________________________________________________________


  (da, ukazi v bash lahko segajo tudi prek vecih vrstic). Pisav v obliki
  BDF zdaj ne potrebujemo vec in jih lahko pobrisemo.

  4. Streznik X zna uporabiti stisnjene datoteke s pisavami, kar lahko
     izkoristimo in prihranimo se nekaj prostora na disku.


       gzip *.pcf



  Starejse izdaje streznika X podpirajo le stiskanje s compress.

  5. V vsakem imeniku s pisavami pricakuje streznik datoteko fonts.dir,
     ki podaja preslikavo med opisi pisav (X Logical Font Description,
     XLFD) in imeni datotek.  Ustvarimo jo z ukazom


       mkfontdir



  Ukaz moramo pognati v vsakem podimeniku s pisavami.

  6. Koncno lahko streznik obvestimo o tem, da smo namestili nove
     pisave, kar storimo z ukazom xset:


       xset +fp /usr/X11R6/lib/X11/fonts/iso_8859.2/75dpi/
       xset +fp /usr/X11R6/lib/X11/fonts/iso_8859.2/100dpi/
       xset +fp /usr/X11R6/lib/X11/fonts/iso_8859.2/misc/
       xset fp rehash



  Ce je slo vse gladko, mora ukaz xlsfonts -fn "*-iso8859-2" pokazati
  seznam vseh novo namescenih pisav.

  7. Ukaz xset velja samo, dokler ne zapustimo X Window System. Trajno
     spremembo dosezemo s popravkom konfiguracijske datoteke. Streznik
     XFree86 hrani svoje nastavitve v datoteki /etc/XF86Config (pisec
     teh vrstic je v nekaj letih ukvarjanja z XFree86 na razlicnih
     distribucijah nastavitve videl tudi ze v datotekah
     /etc/X11/XF86Config, /usr/X11R6/lib/X11/XF86config in
     /usr/X11/lib/X11/Xconfig). Poiscemo niz FontPath in dodamo vrstice:


       FontPath "/usr/X11R6/lib/X11/fonts/iso_8859.2/75dpi"
       FontPath "/usr/X11R6/lib/X11/fonts/iso_8859.2/100dpi"
       FontPath "/usr/X11R6/lib/X11/fonts/iso_8859.2/misc"



  To je vse. Od zdaj naprej zna X Window System na zahtevo programa
  prikazati tudi nase znake. Vec o tem, kako program, npr. xterm,
  pripravimo do tega, da zahteva nase znake, si preberemo v razdelku
  ``xterm'' poglavja o terminalskih emulatorjih.


  3.4.  PostScript pod X11

  Streznik X zna uporabljati rastrske pisave v oblikah PCF, SNF in BDF
  ter vektorske pisave v obliki Speedo in Type 1. Pri majhnih velikostih
  (do 10 tipografskih pik) so rastrske pisave na zaslonu navadno lepse,
  pri vecjih velikostih, npr. v graficnih programih, pa so vektorske
  pisave znatno lepse.

  Nekaj vektorskih pisav Type 1 v kodnem razporedu ISO Latin 2 je
  pripravil Peter Soos. Pri namescanju v celoti sledimo postopku,
  opisanem v razdelku ``X Window System'' poglavja ``Prikaz nasih znakov
  na zaslonu''. S streznika snamemo datoteko v obliki zip:

       <ftp://ftp.arnes.si/software/unix/Latin-2-fonts/l2pfb005.zip>


  Se vec pisav je zbrala ceska skupina, paket RPM (vsebino namestimo z
  ukazom rpm -Uvh ...) najdemo na

       <ftp://crash.fce.vutbr.cz/pub/linux_fonts/X11fonts-ulT1mo-
       beta-1.0-4.noarch.rpm>


  Ustvarimo nov imenik, npr. /usr/X11R6/lib/X11/fonts/iso_8859.2/Type1,
  in vanj stresemo vsebino arhiva l2pfb004.zip. Avtor je ze pripravil
  datoteki fonts.scale in fonts.dir.  Ponovimo vajo z xset in v
  nastavitveno datoteko dodamo vrstico:


       FontPath "/usr/X11R6/lib/X11/fonts/iso_8859.2/Type1"



  Namesto xlsfonts tokrat iz okenskega okolja X Window System pozenimo
  xfontsel. Novo namescene pisave najdemo najhitreje, ce jih iscemo po
  ``crkolivnici'' (angl. type foundry) sp (po avtorjevih zacetnicah) v
  prvem stolpcu (fndry). Izberite kaksno veliko povecavo (pxlsz) in
  primerjajte z rastrskimi pisavami!


  3.5.  TrueType pod X11

  Rasterizator za pisave TrueType se ni standardni del paketa X Window
  System. Fantje iz The XFree86 Project, Inc. nacrtujejo vkljucitev
  podpore zanje v izdaji XFree86 4.0.


  3.5.1.  Freetype in xfsft

  Mark Leisher in Juliusz Chroboczek sta standardni streznik pisav iz
  okolja X Window System dopolnila s FreeType, prostim rasterizatorjem
  za pisave TrueType, ki so ga napisali David Turner, Robert Wilhelm,
  Werner Lemberg in sodelavci. Streznik je na voljo kot izvorna koda, s
  katero lahko pokrpate izvorno kodo streznika X, ali pa kot ze preveden
  program za Linux.


       <http://www.freetype.org/>
       <http://www.dcs.ed.ac.uk/home/jec/programs/xfsft/>
  Predpostavili bomo, da ste na kakrsenkoli nacin ze uspeli priti do
  izvedljive datoteke xfsft.


  1. Ustvarimo imenik za pisave TrueType, npr.
     /usr/X11R6/lib/X11/fonts/TrueType/ in vanj prepisemo datoteke s
     pisavami TrueType.

  2. V omenjenem imeniku ustvarimo datoteko fonts.scale. Preprost primer
     taksne datoteke je naslednji:

     ___________________________________________________________________
     5
     times.ttf -monotype-times-medium-r-normal--0-0-0-0-p-0-iso8859-1
     times.ttf -monotype-times-medium-r-normal--0-0-0-0-p-0-iso8859-2
     times.ttf -monotype-times-medium-r-normal--0-0-0-0-p-0-iso8859-5
     times.ttf -monotype-times-medium-r-normal--0-0-0-0-p-0-koi8-r
     times.ttf -monotype-times-medium-r-normal--0-0-0-0-p-0-iso10646-1
     ___________________________________________________________________


  Opazimo lahko, da se vseh pet vrstic nanasa na eno in isto datoteko.
  Razlikujejo se le po kodnem naboru. Ker datoteka vsebuje vse potrebne
  znake, jo streznik pisav aplikacijam lahko predstavi kot katerokoli od
  nastetih petih kodnih naborov.

  Joerg Pomnitz je napisal programcek ttmkfdir, ki avtomaticno pregleda
  vse datoteke TrueType in ustvari datoteko fonts.scale.

       <http://www.darmstadt.gmd.de/~pommnitz/xfsft.html>



  3. V istem imeniku zatem pozenemo se mkfontdir. Ta ne bo napravil nic
     drugega, kot obstojeco datoteko fonts.scale nespremenjeno prepisal
     v datoteko z imenom fonts.dir.

  4. S streznikom pisav xfsft bodisi prepisemo obstojeci streznik
     (navadno /usr/X11R6/bin/xfs, ali pa ga premaknemo na kaksno drugo
     primerno mesto.

  5. Streznik pisav potrebuje konfiguracijsko datoteko. Spodnja naj
     sluzi za zgled, ce nimate boljse:

     ___________________________________________________________________
     clone-self = off
     use-syslog = off
     client-limit = 20

     catalogue = /usr/X11R6/lib/X11/fonts/TrueType,/usr/X11R6/lib/X11/fonts/Type1

     error-file = /usr/X11R6/lib/X11/fs/fs-errors

     # in decipoints
     default-point-size = 120

     # x,y
     default-resolutions = 100,100,75,75
     ___________________________________________________________________



  Zdaj lahko pozenemo streznik pisav X. Pri zgledu smo uporabili vrata
  7100. Ce so na vasem sistemu ze zasedena, izberite druga. Za podrob
  nosti si oglejte prirocnik xfs(1).

  xfsft -port 7100 -config /usr/X11R6/lib/X11/fs/config &



  6. Ne da bi spreminjali pot, v kateri iscemo pisave, lahko preverimo,
     ce streznik deluje:


       fslsfonts -server localhost:7100



  7. Ce smo zadovoljni, dodamo streznik pisav med vire, kjer iscemo
     pisave, npr.


       xset fp+ tcp/localhost:7100



  Streznik pisav lahko seveda tece tudi na drugem racunalniku, tako da
  ni potrebe, da imamo na vseh racunalnikih v lokalni mrezi namescene
  vse pisave.

  Dokoncno dodamo streznik pisav v konfiguracijsko datoteko
  /etc/XF86Config:


       FontPath "tcp/localhost:7100"



  3.5.2.  Xfstt

  Drugi streznik pisav za X11, ki podpira pisave TrueType, je Xfstt.
  Pisec teh vrstic z njim nima izkusenj, je pa z veseljem pripravljen na
  to mesto vkljuciti izkusnje drugih. Xfstt najdete na navedenem mestu
  in vseh zrcalih le-tega.


       <ftp://metalab.unc.edu/pub/Linux/X11/fonts/Xfstt-0.9.10.tgz>



  4.  Tipkovnica

  4.1.  Konzola

  Nabor znakov za sistemsko konzolo in tabele za premapiranje tipkovnice
  najdemo v paketu kbd Andriesa Brouwerja z univerze v Eindhovnu,
  Nizozemska. Avtor paketa je napisal tudi Keyboard HOWTO, kjer si lahko
  o tej temi preberemo vec.  Paket je del vseh obicajnih distribucij in
  se nalozi avtomaticno ob namestitvi sistema.

  V starejsih distribucijah Slackware se je prevedeni paket imenoval
  keytbls. Namestimo ga enako kot druge pakete, z ukazom pkgtool ali
  installpkg.


  Paket kbd vsebuje tabelo za slovensko tipkovnico s 102 tipkama in
  zaslonske pisave za kodni nabor ISO Latin 2. Vsi, ki iz kakrsnihkoli
  razlogov uporabljajo drugacno tipkovnico, si lahko na osnovi zgledov v
  /usr/lib/kbd/ pripravijo svojo. Marko Macek je ze pripravil tabelo
  preslikav za amerisko tipkovnico s 101 tipko:

       <http://www.kiss.uni-lj.si/~k4fr0235/kbd/>


  Celoten postopek za izbiro zaslonske pisave, tabele za tipkovnico in
  uporabo le-te je taksen:

  ______________________________________________________________________
  # Izberemo pisavo z naborom ISO Latin 2 v velikosti 16 pik
  setfont lat2-16
  # Nalozimo prireditveno tabelo za slovensko tipkovnico...
  loadkeys slovene
  # ...in jo izberemo
  echo -e -n "\\033(K" > /dev/console
  ______________________________________________________________________



  Distribucija Debian pozna tudi ukaz kbdconfig, ki opravi isto.

  Ce zelimo, da je taksna nastavitev trajna, dodamo zgornjih sest vrstic
  v nastavitveno datoteko /etc/rc.d/rc.local, ki se izvede ob zagonu
  operacijskega sistema. Ce ob tem omogocimo se vnos osembitnih znakov v
  ukazni lupini ``bash'', je to najnujnejse, kar je potrebno za pisanje
  po slovensko v tekstovnem nacinu.


  4.2.  X Windows System

  V X Windows System lahko spreminjamo razpored tipk na tipkovnici z
  ukazom xmodmap.  Tabelo preslikav za obicajno tipkovnico s 102 ali 105
  tipkami, kot je v rabi pri nas, lahko snamemo z

       <ftp://sizif.mf.uni-lj.si/pub/i18n/Xmodmap.sl.pc102>


  Uporaba je enostavna:

       xmodmap Xmodmap.sl.pc102


  Preslikava tipkovnice velja, dokler ne zapustimo okolja X Window Sys
  tem. Zamenjamo jo lahko s ponovnim ukazom xmodmap, ki mu kot argument
  podamo datoteko s tabelo preslikav. Tabela za standardno amerisko tip
  kovnico navadno najdemo kot /usr/X11R6/lib/X11/etc/xmodmap.std. Ce je
  ne, si jo lahko pripravimo sami: preden nalozimo slovensko preslikavo
  tipkovnice, pozenemo:

       xmodmap -pke > Xmodmap.us


  To potem nalozimo enako kot slovensko tabelo.

  Ce zelimo ta razpored trajno namestiti, preimenujemo datoteko bodisi v
  ~/.Xmodmap (osebna nastavitev) ali pa v
  sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap (skupna nastavitev za vse
  uporabnike; ponekod se ta datoteka imenuje tudi
  /etc/X11/xinit/Xmodmap), ki se avtomaticno nalozi ob vsakem zagonu X
  Window System. Ce se ne nalozi, preverite svojo datoteko ~/.xinitrc. V
  njej mora biti nekaj takega kot:

  ______________________________________________________________________
  usermodmap=$HOME/.Xmodmap
  sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap

  if [ -f $sysmodmap ]; then
      xmodmap $sysmodmap
  fi

  if [ -f $usermodmap ]; then
      xmodmap $usermodmap
  fi
  ______________________________________________________________________



  Ob preslikavi tipkovnice ne pozabimo na to, da moramo tudi v ukazni
  lupini omogociti vnos osembitnih znakov (poglavje ``Ukazne lupine'').


  4.2.1.  Xks

  Cesko podjetje Informatica s.r.o. se je problema preslikave tipkovnice
  lotilo drugace. Njihov produkt Xks je streznik, ki se vgnezdi med
  streznik X in namenske programe ter prestreze vse dogodke KeyPress ter
  jih po potrebi modificira. Ta resitev deluje tudi pri slabo napisanih
  programih, pri katerih preslikava z xmodmap ne deluje, obljublja pa
  tudi resitev za aktivacijo nemih tipk (tipke v zgornji vrstici
  slovenske tipkovnice lahko v kombinaciji s tipko AltGr delujejo kot
  neme tipke).

       <http://www.informatica.cz/>


  Xks je program na pokusino (shareware); registracija izvedbe za Linux
  stane 900 ceskih kron (okrog 4500 tolarjev). Pisec teh vrstic se
  zaenkrat se ni utegnil ukvarjati s njim, bi pa z veseljem vkljucil na
  to mesto izkusnje drugih.


  5.  Slovenski locale

  Z izrazom locale oznacujemo skupek lastnosti programskega okolja,
  odvisnih od jezikovnega in kulturnega okolja uporabnika. Mednje sodi
  informacija o tem, kateri znaki so crke in kaksen je njihov vrstni
  red, nacin izpisa datuma in ure, izbiro locila v zapisu decimalnih
  stevil (vejica oz. pika), zapis valute in sporocila programov
  uporabniku.

  Programski vmesnik za internacionalizacijo in lokalizacijo na
  sistemih, zdruzljivih s standardi POSIX, je definiran v standardu
  ISO/IEC 9899 (Programski jezik ISO C) ter IEEE 1003.2 (POSIX.2).
  Informacije, pomembne za lokalizacijo, razvrsca v sest kategorij:

    LC_CTYPE (znaki, ki predstavljajo abecedo)

    LC_COLLATE (vrstni red znakov v abecedi)

    LC_TIME (izpis datuma in ure)

    LC_NUMERIC (izpis stevilcnih vrednosti)

    LC_MONETARY (izpis valute)

    LC_MESSAGES (komunikacije z uporabnikom)


  LC_ALL zajema vseh nastetih sest kategorij. Medtem ko projekt GNU pri
  izvedbi prvih petih kategorijah zvesto sledi standardu, se je v sesti
  odlocil za njegovo razsiritev. Standardizacijski komite se namrec ni
  mogel zediniti okrog izvedbe ravnanja s prevodi sporocil, zato je
  standard v tej tocki prakticno neuporaben: doloca le prevode za ``da''
  in ``ne''. Projekt GNU je zato razvil svojo metodo, to je paket GNU
  gettext. Prevedeni katalogi sporocil, ki jih uporablja mehanizem
  gettext se navadno nahajajo v podimenikih imenika /usr/share/locale/.

  Sledi nekaj primerov odziva poslovenjenega sistema. Primeri so pobrani
  s HP-UX, ker je lokalizacija Linuxa zaenkrat se v teku -- knjiznica
  GNU libc 2.0 in kasnejse izpeljanke sicer ze ponujajo okvir za
  lokalizacijo, izvedba pa zaenkrat se zaostaja, zato koncepta zaenkrat
  se ne moremo ilustrirati s programi iz paketov textutils, fileutils
  ipd.

  Z nastavitvijo spremenljivke LANG na slovenski locale se spremenijo
  vsi prilastki:


       ~> date
       Sat Oct 19 22:32:04 METDST 1996
       ~> LANG=sl_SI.iso88592 date
       Sob, 19 okt 1996 22:32:04



  Lahko pa jih spreminjamo tudi vsakega posebej.  Ce zelimo obdrzati
  angleske izpise, obliko datuma, decimalno piko ipd., zeleli pa bi, da
  gre urejanje crk po slovenski abecedi, spremenimo samo LC_COLLATE:


       ~> sort abc.tex
       abc
       abca
       abd
       abc
       ~> LANG=C LC_COLLATE=sl_SI.iso88592 sort abc.tex
       abc
       abca
       abc
       abd



  Seveda LC_COLLATE ne resi vseh problemov v zvezi z urejanjem.  Pri
  razvrscanju kastiljskih kraljev bi, recimo, zeleli, da pride Alfonz
  IX.  za Alfonzem VIII. in pred Alfonzem X. Kar pa je verjetno ze prob
  lem za umetno inteligenco...

  Spremenljivka LANG ima v splosnem obliko:

       LANG=jezik[_drzava[.nabor]]


  Pri tem je jezik dvocrkovna koda jezika, kot jo doloca standard ISO
  639, drzava pa dvocrkovna koda drzave, dolocena s standardom ISO 3166.
  Zgled za slovenscino, kot se govori v Sloveniji in pise s kodnim
  naborom ISO 8859-2, je torej

       LANG=sl_SI.iso88592


  Dolocitev drzave in nabora znakov je neobvezna (pomembna je seveda pri
  jezikih, ki se govorijo v vec drzavah; kaksen locale uporabljajo
  Slovenci v zamejstvu, je piscu teh vrstic neznano), tako lahko pisemo
  na kratko

       LANG=sl



  5.1.  Programiranje z GNU gettext

  Paket GNU gettext ponuja nekaj orodij za lokalizacijo:

    xgettext, ki iz izvorne kode izlusci sporocila

    msgcmp, ki primerja dva kataloga sporocil

    msgmerge, zdruzi star preveden katalog sporocil z novim,
     neprevedenim

    msgfmt, ki prenosen katalog sporocil prevede v binarno obliko

    msgunfmt, obratno od msgfmt

  S kratkim zgledom ilustrirajmo, kako poteka pisanje lokaliziranega
  programa s paketom GNU gettext.


  1. Najprej napisemo program zgled.c. Pri pisanju programa ze vkljucimo
     mehanizme internacionalizacije:

     ___________________________________________________________________
     #include <locale.h>
     #include <stdio.h>
     #include <libintl.h>

     #define PACKAGE   "zgled"
     #define LOCALEDIR "/usr/local/share/locale"

     char main() {
         setlocale (LC_MESSAGES, "");
         bindtextdomain (PACKAGE, LOCALEDIR);
         textdomain (PACKAGE);

         printf("%s\n", gettext("This is a short example."));
         printf("%s\n", gettext("Author: Primoz Peterlin"));
         return(0);
     }
     ___________________________________________________________________



  2. Z ukazom xgettext iz izvorne kode izluscimo izpise na zaslon:

       xgettext zgled.c


  S tem smo ustvarili datoteko messages.po. To je obicajna besedilna
  datoteka, ki vsebuje skelet prevodov sporocil.

  3. Datoteko messages.po z urejevalnikom dopolnimo s prevodi, recimo
     takole:



     ___________________________________________________________________
     # Slovenski prevod zgleda
     # Primoz Peterlin, <primoz.peterlin@biofiz.mf.uni-lj.si>
     #
     msgid ""
     msgstr ""
     "Project-Id-Version: zgled 1.0\n"
     "POT-Creation-Date: 1998-12-06 14:05:53+0100\n"
     "PO-Revision-Date: 1998-12-06 15:00:00+0100\n"
     "Last-Translator: Primoz Peterlin <peterlin@biofiz.mf.uni-lj.si>\n"
     "MIME-Version: 1.0\n"
     "Content-Type: text/plain; charset=ISO-8859-2\n"
     "Content-Transfer-Encoding: 8bit\n"
     "Xgettext-Options: \n"
     "Files: zgled.c\n"

     #: zgled.c:13
     msgid "This is a short example."
     msgstr "To je kratek zgled."

     #: zgled.c:14
     msgid "Author: Primoz Peterlin"
     msgstr "Avtor: Primoz Peterlin"
     ___________________________________________________________________



  4. Popravljeno prenosljivo datoteko s sporocili (angl. portable
     message file) messages.po prevedemo v binarno obliko:

       msgfmt -v -o zgled.mo messages.po



  5. Binarno datoteko prestavimo v imenik, kjer jo bo gettext nasel:

       mv zgled.mo /usr/local/share/locale/sl/LC_MESSAGES



  6. Program prevedemo in povezemo s knjiznico libintl.a:

       gcc -o zgled zgled.c -lintl



  7. Pa poskusimo, kaksna je razlika!


       LANG=C ./zgled
       LANG=sl ./zgled
       LC_ALL=sl ./zgled
       LC_MESSAGES=sl ./zgled
       LC_CTYPE=sl ./zgled
       LC_ALL=sl_SI.iso88592 ./zgled



  V prvem in zadnjem primeru je izpisano sporocilo anglesko, v predzad
  njem pa verjetno tudi. V prvem zato, ker smo eksplicitno zahtevali
  locale ``C'', v zadnjem pa zato, ker smo zahtevali locale
  ``sl_SI.iso88592'', v katerem ni prevoda sporocil -- to namrec obstaja
  za locale ``sl''. V predzadnjem zgledu smo uporabili pravi locale, a
  irelevantno kategorijo LC_CTYPE namesto uporabljene LC_MESSAGES.

  Se dve opombi: imenik, kamor prestavimo katalog sporocil, se mora
  ujemati z imenikom LOCALEDIR, navedenim v izvorni kodi. Tezavo, da GNU
  gettext razume ``sl'' in ``sl_SI.iso88592'' kot razlicna locala, je
  pisec teh vrstic resil z simbolno povezavo v imeniku
  /usr/local/share/locale:

       ln -s sl sl_SI.iso88592



  5.2.  Poslovenjenje katalogov sporocil

  V teku je internacionalizacija projekta GNU (programi iz projekta GNU
  predstavljajo znaten del celotnega sistema Linux in vecino tistega, s
  cimer se sooca koncni uporabnik). Trenutno so v slovenscino ze
  prevedena sporocila za naslednje pakete GNU: enscript, fileutils,
  gettext, grep, hello, recode in tar.  Z nastavitvijo spremenljivke
  okolja

       LANG=sl


  bodo programi iz teh paketov izpisovali slovenska sporocila namesto
  angleskih.

  Razprava o poslovenjenju projekta GNU poteka med prejemniki
  elektronskega spiska <sl@li.org>, nanj se lahko narocite tako, da na
  naslov sl-request@li.org posljete vrstico

       subscribe


  v telesu sporocila.

  Pomoc prostovoljcev, ki bi prevedli preostale pakete, ali pa se samo
  zavezali za vzdrzevanje ze prevedenih, je nadvse zazelena.  Vabljeni!


  6.  Poslovenjenje razlicnih programov

  Na tem mestu bi se v idealnem svetu opis poslovenjenja Linuxa lahko
  koncal. Povedali smo vse potrebno o vnosu in izpisu nasih znakov, ter
  kako z definiranjem spremenljivk okolja programom dopovemo, da delamo
  s slovenskimi besedili. To poglavje je takorekoc v celoti posveceno
  izjemam -- programom, ki iz taksnih ali drugacnih razlogov ne
  uporabljajo lokalizacijskih spremenljivk, alternativnim metodam za
  vnos ali izpis znakov, ki v izjemnih primerih (npr. ce nimamo
  tipkovnice s slovenskimi znaki) lahko vseeno pridejo prav, in
  podobnemu.


  6.1.  Ukazne lupine

  6.1.1.  bash

  Nastavitve ukazne lupine bash so v datoteki ~/.inputrc (ki jo po
  potrebi ustvarimo):


       set meta-flag on
       set convert-meta off
       set output-meta on



  Te tri vrstice je morda pametno dodati tudi v /etc/skel, tako da jih
  podedujejo tudi vsi na novo ustvarjeni uporabniki.

  Tole se sicer ne navezuje na slovenscino, ko ste ze pri poslu, si
  lahko zivljenje olajsate se s tem, da tipkam Home, Delete in End
  vrnete njihov obicajni pomen: v isto datoteko (~/.inputrc) dodate se
  vrstice


       "\e[1~": beginning-of-line
       "\e[3~": delete-char
       "\e[4~": end-of-line



  6.1.2.  tcsh

  Vnos osembitnih znakov omogocimo, ce v nastavitveno datoteko
  (/etc/csh.login za skupne nastavitve oz.  ~/.tcshrc ali ~/.cshrc za
  osebne nastavitve) dopisemo vrstico:


       setenv LC_CTYPE sl_SI.iso88592



  Med nami: kaze, da je ukazni lupini tcsh povsem vseeno, na kaj
  nastavite spremenljivko LC_CTYPE, samo da ni nedefinirana.

  Pazite: ukazna lupina mora biti prevedena z vklopljeno izbiro
  ``8-bit''! To lahko preverite z ukazom ``set'':


       rufko:~% set
       ...
       version tcsh 6.06.00 (Cornell) 1995-05-13 (i386-intel-linux) options 8b,dl,al
       rufko:~%



  Pomemben je tisti ``8b''. Ce se pri vas ne izpise, vam verjetno ne
  preostane drugega, kot da snamete izvorno kodo in jo prevedete.


  6.2.  Terminalski emulatorji

  6.2.1.  xterm

  V datoteki ~/.Xresources (osebna nastavitev) ali pa v datoteki
  /usr/lib/X11/app-defaults/XTerm (skupna nastavitev) dolocimo pisave,
  ki jih uporablja XTerm.  Izberemo pisavo, ki ima vse znake enako
  siroke, npr. ,,fixed`` ali ,,Courier``, in je kodirana po razporedu
  ISO Latin 2.  Zgled:


       XTerm*font:     -*-fixed-medium-r-normal--16-*-iso8859-2
       XTerm*boldFont: -*-fixed-bold-r-normal-sans-16-*-iso8859-2



  Primerne pisave lahko izpisemo z ukazom xlsfonts (glej se razdelek ``X
  Window System'' poglavja ``Prikaz nasih znakov na zaslonu''):


       xlsfonts -fn '*-fixed-*-iso8859-2'



  6.2.2.  rxvt

  Po podatkih v ceskem HOWTO rxvt zaenkrat (razvojna izdaja 2.4.6) ne
  deluje z nasimi znaki brez posegov v izvorno kodo. Potrebne posege
  najdete v ``Czech HOWTO'' (ki ni del arhiva LDP; glejte razdelek
  ``Zahvala'', kje ga najdete).


  6.3.  Pisarniski paketi

  6.3.1.  WordPerfect

  (Jaka Mele, Vse naredim pod Linuxom!, Win.Ini, l.6, st.9, str.60)

  WordPerfect ima vse potrebne znake ze v svoji tabeli. Vse, kar moramo
  napraviti, je da za nase crke definiramo makroukaze. Recimo, da bi
  radi definirali crko S (velika crka S s stresico).  Pricnemo s
  snemanjem makroukaza (recimo mu Scaron), skocimo v tabelo znakov, v
  njej izberemo crko S, zakljucimo makro in nazadnje pri nastavitvah
  povezemo makro z izbrano tipko.

  (Jaka Mele, Message-id:
  <Pine.LNX.4.05.9812241251460.15368-101000@ro.zrsss.si>



       ---------- Forwarded message ----------
       Date: Thu, 24 Dec 1998 11:04:33 +0000
       From: "[ALAMUN ALEN" <alen.salamun@uni-mb.si>
       To: jaka.mele@lugos.si
       Subject: WordPerfect SLO tipkovnica

       Hi!

       Daj prosim spravi to v mojem imenu na lugos listo, ker je verjetno
       trazena roba. Uspelo mi je definirati SLO tipkovnico brez makrojev. Sem na
       fax-u pa ne morem poslati jaz na Lugos listo.

       LP, Alen



  Datoteko SLO.WGK s prireditveno tabelo za slovensko tipkovnico najdete
  na


       <ftp://sizif.mf.uni-lj.si/pub/i18n/SLO.WGK>


  (Andrej Komelj, Message-id: <19981224182341.A3794@perun.mist.si>)



  Odgovor na vprasanje: "Kako je s podporo sumnikom v WP-ju 8.0 pod
  Linuxom?" se glasi: SLABO.

  1. Resitev v obliki "insert symbol -> multinational" je v teoriji
  uporabna, vendar... Hja, multinational znaki so v WP Multinational
  fontu, le-ta pa je najbolj podoben Roman-WP fontu. Ima "serife", zato
  Helvetica in Zurich odpadeta. Vendar se tudi pri Roman-WP pojavijo
  tezave, ce se le-tega uporablja v bold, italic ali bold-italic obliki.

  2. Resitev v obliki uporabe Type 1 fontov z definiranimi slovenskimi
  znaki (kje se jih dobi? odg: poglejte si v Slovenian-HOWTO, ali jih
  skopirajte iz OS/2-ja, ce ga imate) pa zal tudi odpade, ker "brezplacna"
  verzija WP-ja nima vsebovanega font installerja (xwpfi) in zato kakrsno
  koli dodajanje fontov v wp.drs odpade... Skratka, tako kot je nekdo ze
  napisal; brezplacen-in-neoskubljen WP je ena velika potegavscina... Za
  Americane je mogoce se nekako uporaben, za povprecnega Slovenca, ki pise
  tudi slovenska besedila, pa je popolnoma brez vrednosti. :-(

  Nazaja k LyX-u in ze sestavljenim vzorcem. :-)

  Mimogrede, kaj se je zgodilo z WP-jem?!? Dokler se ni bil v lasti
  Corel-a, je znal postavljati stresice na katere koli znake v katerem
  koli fontu. Z WP-jem 6.0 za DOS sem tako pisal tekste v TrueType, Type 1
  in CG fontih... POVSOD sem lahko uporabljal sumnike. Huh, "napredek" pa
  tak.

  --
  Kome.



  6.3.2.  Star Office

  (Jaka Mele, Vse naredim pod Linuxom!, Win.Ini, l.6, st.9, str.60)

  StarOffice je malce tezavnejsi, zato, ker rabi dodatne Type1 fonte, pa
  vendarle povejmo recept se zanj. Kot prvo si torej moramo dobiti
  slovenske oziroma latin2 pisave (pfb, afm, fonts.dir in fonts.scale)
  iz recimo ftp streznika drustva uporabnikov linuxa slovenije
  ftp://ftp.lugos.si/pub/lugos/arhiv/Type1-Latin2-Fonts/, datoteki
  l2afm004.zip in l2pfb004.zip). Nato arhiva odpremo v
  /usr/lib/X11/fonts/Type1.Latin2/, ter ta imenik dodamo v spisek
  imenikov s pisavami, ki jih uporabi XWindow streznik. To naredimo
  tako, da v datoteko /etc/X11/XF86Config dopisemo:

       FontPath "/usr/X11R6/lib/X11/fonts/Type1.Latin2/"


  Za tem pozenemo

       xset fp+ /usr/X11R6/lib/X11/fonts/Type1.Latin2/


  ter se xset fp rehash. Nato je potrebno v direktoriju
  /usr/local/StarOffice3-1/x3p/fontmetrics/ za .afm datoteke narediti
  povezave iz /usr/lib/X11/fonts/Type1.Latin2/. Podobno naredimo se za
  direktorij /usr/local/StarOffice3-1/x3p/pssoftfonts/, le da sem
  povezemo .pfb datoteke. Skoraj smo ze na koncu, v datoteko
  /usr/local/StarOffice-3.1/xp3/psstd.fonts dodamo po vzoru ze dodanih
  pisav v datoteki fonts.dir iz Latin2 podrocja, vse nove pisave, tako,
  da namesto npr. arial.pfb pride arial, namesto -0-0-0-0 pa
  -%d-%d-%d-%d...  Saj se takoj vidi. Na koncu si premapirajmo se
  tipkovnico in sicer s programom xmodmap, tako da izvrsimo xmodmap
  xmodmap.si. Ce imate starejsi Xwindow sistem, si boste morda morali
  xmodmap.si se popraviti, da vam bosta tipki Backspace in Delete delali
  normalno, sicer pa samo pozenete swriter3 in uzivate v dodatnih
  slovenskih pisavah.


  6.3.3.  Applixware

  (Boris Pozar, Message-Id: <346044BF.FE97E3AF@guest.arnes.si>)

  Z Lugosovega streznika snamemo pisave TrueType v kodnem naboru ISO
  8859-2. Potem jih kot root s FontManagerjem dodamo v katalog pisav in
  zadeva je resena.


       <ftp://ftp.lugos.si/pub/lugos/arhiv/Type1-Latin2-Fonts/l2ttf004.zip>



  6.4.  Urejevalniki

  6.4.1.  GNU emacs

  Emacs je, tako kot njegov avtor, kontroverzni Richard M. Stallman,
  urejevalnik, glede katerega ljudje niso indiferentni: ali ga
  obozujejo, ali pa sovrazijo. Emacs je vec kot urejevalnik; je
  takorekoc nacin zivljenja. V njem lahko pisete programe, iz njega
  poganjate prevajalnik, pisete besedila, poganjate crkovalnik,
  poganjate TeX, berete posto in novice... Ko enkrat v resnici dobro
  obvladate Emacs, imate realne moznosti, da se vam se dobrsen del
  naslednjega stoletja ne bo treba nauciti nobenega novega urejevalnika.
  Dokazano pa ljudje shajajo tudi brez njega.


  6.4.1.1.  Starejse izdaje programa GNU emacs

  Privzeta nastavitev urejevalnika je omejitev na sedembitne znake
  (ASCII). Nastavitev spremenimo tako, da v datoteko z nastavitvami
  dodamo naslednjih nekaj vrstic:

  ______________________________________________________________________
  ;;  Omogocimo izpis znakov s kodo vecjo od 127
  (standard-display-european t)

  ;;  Omogocimo vnos znakov s kodo vecjo od 127
  (set-input-mode (car (current-input-mode))
          (nth 1 (current-input-mode))
          0)
  ______________________________________________________________________



  Prilagoditev Emacsa je mozno izvesti v eni od naslednjih datotek z
  nastavitvami:

    /usr/lib/emacs/site-lisp/site-start.el (skupne nastavitve)

    ~/.emacs (osebne nastavitve)

    /usr/lib/emacs/site-lisp/default.el (skupne nastavitve)

  Z vnosom in izpisom nasih znakov seveda se ni konec zgodbe o
  prilagoditvi Emacsa za slovenscino. Zelimo na primer tudi, da se ukaza
  forward-word in backward-word ne bosta zatikala na nasih znakih, ter
  da tudi za nase znake pravilno tece pretvarjanje med velikimi in
  malimi crkami. S starejsimi izdajami Emacsa to ni vedno povsem
  trivialno. Bralcu bo v veliko pomoc zbirka nasvetov Slovenscina in
  racunalniki avtorja Alesa Kosirja, v kateri je programu GNU emacs so
  posveceno obsirno poglavje. Najdete jo na

       <http://nl.ijs.si/gnusl/tex/tslovene/slolang/slolang.html>



  6.4.1.2.  GNU emacs 20

  Z zadnjo izdajo urejevalnika Emacs in standardno slovensko tipkovnico
  je prilagoditev posebno enostavna. Vse, kar potrebujemo, je

  ______________________________________________________________________
  ;;; Turn on Latin-2 both as input and output method (Emacs 20.*
  ;;; and onwards)
  (set-language-environment "Latin-2")
  ______________________________________________________________________


  Kasneje lahko nacin Latin-2 izberemo za vnos in izpis v menuju Mule /
  Set Language Environment / European / Latin-2.


  6.4.2.  crisp

  Crisp je urejevalnik v duhu urejevalnika Brief z burno zgodovino.
  Napisal ga je Paul Fox iz Anglije in ga distribuiral kot ``program na
  pokusino'' (shareware). Zadnja taksna razlicica je 2.2e iz leta 1991
  in je po nekaterih vesteh avtor ne podpira vec. Novejse (trenutno 5.1)
  pa trzi podjetje Vital, Inc. iz Teksasa, ZDA. Crisp je nekako blizje
  pecejevskemu duhu, kot pa sta Emacs in Vi; ce se nobenega od teh dveh
  ne morete navaditi, je morda Crisp prava izbira.

  Privzeta nastavitev urejevalnika Crisp 2.2e je, da znakov s kodami od
  127 dalje ne prikaze, ampak izpise njihovo sestnajstisko kodo, ki jo
  uvede z znakoma \x.  Pomaga, ce nalozimo paket z izvorno kodo Crisp in
  v datoteki $(SRC)/crisp2.2e/src/crunch/tty/xterm.cr popravimo drugi
  argument funkcije set_term_features() iz NULL na "%c". Popravljeni
  makroukaz prevedemo:


       crunch xterm.cr



  Rezultat, popravljeni xterm.cm, postavimo med ostale, navadno v imenik
  /usr/local/lib/crisp/macros/tty.

  Makro xterm velja, kot bi iz imena sami uganili, za Crisp, pognan v
  oknu XTerm znotraj X Window System. Enaka intervencija piscu teh
  vrstic ni uspela na linux.cr (konzola) in xcrisp.cr (razlicica Crisp
  za X11).  Poleg tega se je na starejsi verziji Linuxa (1.0.8) crunch
  pritozeval nad predprocesorjem za C, /lib/cpp.  Pomagala je logicna
  povezava:


       ln -s  /usr/lib/gcc-lib/i486-linux/2.5.8/cpp /lib/cpp



  Ales Kosir je napisal za Crisp makro slovene:

       <http://nl.ijs.si/gnusl/tex/tslovene/src/slovene.cr>

  Z njim lahko vnasamo nase znake tudi na tipkovnicah, ki nimajo
  primernih tipk na nacin: namesto c vtipkamo "c, makro pa pretvori
  zaporedje v ustrezen znak.  Poleg ISO Latin 1 podpira se nekaj drugih
  kodiranj, ki so v uporabi v nasih krajih.  Navodila za uporabo so na
  voljo tudi prek WWW:

       <http://nl.ijs.si/gnusl/tex/tslovene/slolang/>


  Del distribucije Caldera OpenLinux je tudi ``lahka'' izvedba
  urejevalnika Crisp, CRiSP LiTE. Caldera ponuja tudi moznost kasnejse
  ugodnejse nadgraditve na polno izvedbo. CRiSP LiTE nima zgoraj
  opisanih tezav z vnosom osembitnih znakov.


  6.4.3.  vi

  Urejevalnik vi izvira iz sive davnine Unixa. Zaradi tezav z licencnino
  najdete na sistemih Linux namesto originalnega Vi navadno urejevalnik
  vim (Vi IMproved) avtorja Brama Moolenaarja, vcasih pa tudi ``elvis'',
  delo Steva Kirkendalla, ali nvi iz distribucije BSD 4.4. Ideje, na
  katerih temelji ``vi'' so v temeljih ortogonalne na vse, kar ste se o
  urejevalnikih naucili pod MS-DOS. Kljub temu pa je glede na to, da je
  ``vi'' edini urejevalnik, ki zanesljivo obstaja na cisto vsakem Unixu,
  pametno poznati nekaj osnovnih ukazov za delo z njim.

  Po izkusnjah pisca tako originalni vi kot tudi vim sama po sebi brez
  tezav prepuscata osembitne znake. Tezave lahko vcasih povzrocajo
  zunanji programi, ki jih klicemo iz urejevalnika (npr. fmt za
  poravnavanje besedila). Navadno pomaga, ce v ~/.profile dolocimo
  spremenljivko LC_CTYPE (glej poglavje ``Slovenski locale'').


  6.5.  Elektronska posta

  6.5.1.  Pine

  Pine najprej prebere skupne nastavitve iz /usr/local/lib/pine.conf
  (ali /etc/pine.conf, zatem pa se osebne nastavitve iz ~/.pinerc. V
  enem ali drugem poiscemo niz character-set in postavimo to
  spremenljivko na ISO-8859-2:

  ______________________________________________________________________
  ...
  # character-set should reflect the capabilities of the display
  # you have. Normal default is US-ASCII.  Typical alternatives
  # include ISO-8859-x, where x is a number between 1 and 9.
  character-set=ISO-8859-2
  ...
  ______________________________________________________________________



  6.5.2.  elm

  Opozorilo: pisec ze dolgo ne uporablja vec tega programa in zapisanega
  ni preveril. Danski in nemski HOWTO trdita, da je bodisi dovolj v
  ukazni lupini postaviti spremenljivko LANG na vrednost iso_8859_1,
  bodisi v konfiguracijski datoteki ~/.elm/elmrc nastaviti vrednosti
  naslednjih spremenljivk:



  ______________________________________________________________________
  ...
  charset=iso-8859-1
  displaycharset=iso-8859-1
  textencoding=8bit
  ...
  ______________________________________________________________________


  Vse ISO 8859-1 bi bilo pri nas verjetno potrebno nadomestiti z ISO
  8859-2.

  Se enkrat prosim koga, ki ta program v resnici uporablja, da opise
  svoje izkusnje.


  6.5.3.  Netscape Mail

  V Netscape Mail 4.06 je mozno pisati nase znake v telesu sporocila, ne
  pa tudi v glavi. Ko imamo enkrat namescene nase pisave in urejeno
  preslikavo tipkovnice (razdelka ``Pisave pod X11'' in ``Tipkovnica pod
  X11''), le se v menuju View postnega programa izberemo ``Encoding'',
  tam pa ``Central European (ISO-8859-2)''.

  Vesel bom opisa izkusenj z drugimi izdajami programa Netscape Mail.


  6.6.  Svetovni splet



  6.6.1.  Lynx

  Lynx pozna od izdaje 2.5 dalje tudi kodno stran ISO 8859-2. Nastavimo
  jo lahko na enega od treh nacinov. Prvi je, da izberemo O)ptions,
  zatem pa C)harset, ter z pritiskanjem na kurzorske puscice izberemo
  zeljeni nabor znakov. Drugi je, da v datoteki ~/.lynxrc (osebna
  nastavitev) nastavimo

       character_set=ISO Latin 2


  In zadnji je, da v datoteki /usr/lib/lynx.cfg (skupna nastavitev)

       CHARACTER_SET:ISO Latin 2



  6.6.2.  Netscape Navigator

  (Metod Kozelj, Message-id:
  <Pine.HPP.3.96.981216083349.17728E-100000@hmljhp.rzs-hm.si>)

  Netscape Navigator, pa tudi brkljalnik iz Netscape Communicator,
  uporabljata nabor znakov, ki ga nudi X Windows System. Za prikaz nasih
  znakov je torej najprej namestiti pisave za X11 (poglavje ``Pisave pod
  X11''). Ko Navigator zazenemo, sam ugotovi, da so na voljo tudi pisave
  za 'Central European (ISO-8859-2)'. Ce pregledujemo stran, ki
  brkljalniku pravilno sporoci uporabljeni nabor znakov, potem Navigator
  avtomaticno uporabi pisavo s pravim kodnim naborom. Seveda lahko
  spremenimo osnovno velikost crk ali pa obliko za proporcionalno
  pisavo.

  To storimo tako, da v 'Edit / Preferences / Appearance / Fonts'
  dolocimo, da spreminjamo nastavitve za srednjeevropske pisave ('For
  the Encoding / Central European (iso-8859-2)'), potem pa izberemo, s
  katero pisavo naj Navigator prikazuje tekste. Navigator nam sam ponudi
  le pisave s pravim naborom znakov.

  Ce pregledujemo strani, ki imajo sicer pravilen razpored crk (razpored
  ISO 8859-2 in ne Windows-1250), pa Navigator ne uporabi pisave s
  pravim razporedom crk, lahko razpored preklopimo rocno z izbiro ,,View
  / Encoding / Central European (ISO-8859-2)``.

  Ob izbiri pisave s pravilnim razporedom crk in ob pravilnem razporedu
  tipk na tipkovnici lahko uporabljamo nase crke tudi pri pisanju v
  modulu 'Page Composer'.

  Netscape Communicator 4.06 in novejsi znajo na Unixih, ki imajo
  namescene pisave ISO 8859-2, prikazati tudi strani, napisane v kodni
  strani Microsoft CP1250, oznacene kot windows-1250 v glavi.


  6.6.3.  Spletni strezniki

  Opomba: spodnje besedilo je prevod navodil ,,Configuring WWW Server
  for ISO 8859-2`` http://sizif.mf.uni-lj.si/linux/cee/app/httpd.html,
  ta pa se v veliki meri naslanjajo na besedilo Marka Martinca ,,Resitev
  problema slovenskih sumnikov v HTML dokumentih``
  http://www.ijs.si/doc/www-csz.html.


  6.6.3.1.  Nacela


  1. Dolocilo HTTP zahteva, da prenosni protokol HTTP prenasa tok
     podatkov brez omejitve na nabor ASCII ali izpisljive znake. To
     vkljucuje osembitne znake, sestnajstbitne znake kot npr. ISO10646
     ali daljnovzhodne jezike, slike, animacije, zvok ipd.

  2. Vsebino spisa doloca glava MIME (vrstica Content-Type. To je edina
     informacija o zvrsti informacije, ki jo ima na voljo brskalnik,
     zato mora odrazati pravo vsebino spisa.

  3. Privzeto kodni razpored (terminologija MIME/HTTP uporablja izraz
     ,,nabor znakov``) za spise HTML je ISO 10646 oz. njegova osembitna
     podmnozica ISO 8859-1. Vsak spletni brskalnik mora biti zmozen
     prikazati spis HTML, ki uporablja kodni razpored ISO 8859-1. Glava
     MIME za spise HTML, kodirane po ISO 8859-1, je:


       Content-Type: text/html



  4. Dolocilo HTTP dovoljuje, da z dodatnim dolocilom charset v vrstici
     Content-Type glave MIME izberemo drug kodni razpored. Naceloma je
     dovoljen katerikoli kodni razpored, registriran pri IANA Character
     Set Registry. Iz prakticnih razlogov pa je priporocljivo, da se
     omejimo na naslednje entitete HTTP:


       charset = "US-ASCII"
                    | "ISO-8859-1" | "ISO-8859-2" | "ISO-8859-3"
                    | "ISO-8859-4" | "ISO-8859-5" | "ISO-8859-6"
                    | "ISO-8859-7" | "ISO-8859-8" | "ISO-8859-9"
                    | "ISO-2022-JP" | "ISO-2022-JP-2" | "ISO-2022-KR"
                    | "UNICODE-1-1" | "UNICODE-1-1-UTF-7" | "UNICODE-1-1-UTF-8"
                    | token

  Entiteta, ki je definirana pri IANA Character Set Registry, mora pred
  stavljati nabor znakov, kot je bil prijavljen pri IANA. Prazna
  entiteta implicira nabor ISO 8859-1 (kar vkljucuje US-ASCII, ki je
  njegova podmnozica).

  Spise HTML, kodirane v skladu s kodnim razporedom ISO 8859-2, morajo
  potemtakem vsebovati v glavi MIME vrstico


       Content-Type: text/html; charset=ISO-8859-2



  Pri tem presledek med podpicjem in charset=ISO-8859-2 ni obvezen.

  5. Numericne entitete oblike &#nnn; dolocajo pismenko s kodo nnn v
     referencnem razporedu znakov (ISO 8859-1 oz. ISO 10646), ne pa v
     trenutno izbranem. Na ta nacin torej sploh ne moremo uporabljati
     nasih znakov, kodiranih skladno s kodnim razporedom ISO 8859-2,
     lahko pa uporabimo 16-bitne kode ISO 10646. Crko c (mali C s
     kljukico) lahko torej zapisemo kot &#269;. In samo tako.


  6.6.3.2.  Prakticni oziri

  Kdaj je uporaba kodnega razporeda ISO 8859-2 priporocljiva, kdaj pa
  ne? Znotraj intraneta (notranjega informacijskega sistema) v okolju,
  kjer se uporablja ISO 8859-2, je morda smiselno ta razpored uporabiti
  za vse spise. Ce pa je informacija namenjena sirsemu obcinstvu, pa je
  potrebno vedeti, da je uporabniki zunaj srednje ali vzhodne Evrope,
  kjer se ta kodni razpored uporablja, informacije morda ne bodo mogli
  prikazati. Veljavno dolocilo prenosnega protokola HTTP namrec od
  spletnih brskalnikov ne zahteva, da prikazejo spise HTML, ki
  uporabljajo kodni razpored ISO 8859-2. V primeru, da brskalnik ne
  zmore prikazati strani v zahtevanem kodnem razporedu, lahko ta problem
  ignorira in stran (nepravilno) prikaze v nekem drugem kodnem razporedu
  (navadno ISO 8859-1), ali pa ponudi, da spis shranimo na disk. Zato je
  priporocljivo, da vstopne tocke v vas informacijski sistem ne
  uporabljajo kodnih razporedov, razlicnih od ISO 8859-1.


  6.6.3.3.  Podrobnosti izvedbe

  Obdelali bomo tri metode, s katerimi lahko spletni streznik
  prilagodimo, da pravilno postreze uporabniku s spisom, kodiranim po
  ISO 8859-2:

    dolocitev nove pripone za staticne spise, kodirane po ISO-8859-2,
     in vezava le-te na na primeren tip spisa v glavi MIME

    dinamicno prekodiranje spisov

    uporaba posebnosti streznika ali brskalnika


  6.6.3.4.  Dolocitev nove pripone za staticne spise

  Ob zahtevku za spis vecina spletnih streznikov izve zvrst staticnih
  spisov iz pripone datoteke ter na osnovi tega izdela glavo MIME, s
  katero opremi spis, preden ga izroci prejemniku. Vec razlicnih pripon
  lahko ustreza isti zvrsti spisa (priponi .jpeg in .jpg na primer obe
  dolocata zvrst image/jpeg), obratno pa ne - ena pripona lahko doloca
  kvecjemu eno zvrst spisa.


  Nobene splosne metode ni, ki bi dovoljevala uporabo pripone .html za
  spletne spise, kodirane bodisi v skladu s kodnim razporedom ISO
  8859-1, bodisi ISO 8859-2, in pricakovala od spletnega streznika, da
  se bo nekako odlocil, s kaksno glavi MIME bo opremil ene in druge. Ena
  moznost je vsekakor, da pripono .html trajno vezemo na zvrst spisov
  HTML, kodirani skladno s kodnim razporedom ISO 8859-2. Ta resitev ima
  seveda ocitno pomanjkljivost za obcinstvo, ki ne more prikazati tega
  nabora znakov.

  Tukaj predlagana resitev izkorisca zmoznost spletnih streznikov, da
  dolocijo novo pripono datoteke in jo vezejo na zvrst spisa text/html;
  charset=ISO-8859-2 v glavi MIME. To moznost podpira vecina spletnih
  streznikov. Streznika W3C ter NCSA httpd (ter vse njune izpeljanke,
  npr. Apache) uporabljata ukaz AddType v nastavitveni datoteki za
  vezavo dodatnih zvrsti spisov na nove pripone datotek. Z enostavno in
  domisleno shemo (glej Resitev problema slovenskih sumnikov v HTML
  dokumentih lahko zagotovimo pravilne glave MIME za zvrsti spisov, ki
  uporabljajo kodne razporede, razlicne od ISO 8859-1. Ce na primer
  dolocimo pripono .html-l2 za spise, kodirane skladno s kodnim
  razporedom ISO 8859-2, moramo v nastavitveni datoteki dodati vrstico:


    Streznik W3C httpd (CERN httpd): v datoteki httpd.conf dodamo:


       AddType  .html-l2     text/html;charset=ISO-8859-2  8bit 1.0



    Streznik NCSA httpd: v datoteki srm.conf dodamo:


       AddType  text/html;charset=ISO-8859-2   .html-l2



    Streznik Apache se od NCSA httpd razlikuje samo po manjkajoci piki:
     v datoteki srm.conf dodamo:


       AddType  text/html;charset=ISO-8859-2   html-l2



  6.6.3.5.  Dinamicno prekodiranje

  Na vsakem spletnem strezniku, ki podpira vmesnik Common Gateway
  Interface (CGI) lahko izvedemo dinamicno prekodiranje spletnih spisov.
  Poleg dobrih strani (iz enega samega izvora lahko ponudimo spletni
  spis v mnogo razlicnih kodnih razporedih) ima ta metoda tudi slabe:
  pretvarjanje spisa po eni strani porablja procesorski cas streznika,
  po drugi pa dinamicnih spisov posredniki (angl. proxy) navadno ne
  shranjujejo v medpomnilniku, zato z njimi dodatno obremenjujemo
  komunikacijske vode.

  Primera skriptov, ki izvajata dinamicno prekodiranje:

    slovene - paket za dinamicno pretvarjanje spletnih spisov iz
     kodnega razporeda JUS I.B1.002 v CP852, CP1250, ISO 8859-2 ter US-
     ASCII (s precrkovanjem iz CSZ v CSZ). Avtor Tadej Vodopivec,
     Ljubljana, Slovenija.

    pl-conv - skript v Perl za dinamicno pretvarjanje kodiranja
     spletnih spisov med ISO 8859-2, CP852, CP1250, Mazowia, Apple
     RomanCE in US-ASCII (s precrkovanjem). Avtor Jaroslaw Strzalkowski,
     Krakow, Poljska.

  Sledijo tri resitve, ki uporabljajo posebnosti in nestandardne
  razsiritve programske opreme. Prvi dve se nanasata na spletni
  streznik, zadnja na priljubljeni spletni brskalnik Netscape Navigator.
  Istega problema se je lotil G. Nicol s predlogom ``MIME Header
  Supplemented File Type''.


  6.6.3.6.  Metainformacija za spletni streznik W3C

  Spletni streznik W3C (nekoc poznan kot CERN WWW) omogoca dodajanje
  metainformacije v glave MIME odhodnih spisov.

  Po privzeti nastavitvi isce streznik metainformacije v datotekah s
  pripono .meta podimenik .web imenika s spisi. Ce na primer spletne
  spise hranimo v imeniku /WWW/Hypertext in zelimo opremiti spis
  isolatin2.html v njem s pravilno glavo MIME, napravimo to takole:


    Ce se ne obstaja, najprej ustvarimo podimenik .web:


       $ mkdir /WWW/Hypertext/.web



    Zatem v tem podimeniku ustvarimo datoteko z metainformacijami. Za
     datoteko isolatin2.html se bo ta imenovala isolatin2.html.meta.
     Datoteka mora vsebovati glavo MIME v obliki, kot jo predpisuje
     format RFC822. V nasem primeru je to ena sama vrstica:


       Content-Type: text/html; charset=ISO-8859-2



  6.6.3.7.  Datoteke ASIS za streznik Apache

  Streznik Apache doloca poseben tip datoteke, imenovan ASIS. Streznik
  poslje datoteko ASIS odjemniku natancno taksno, kot je (angl. ``as
  is''), ne da bi jo opremil z glavo, ki jo sicer zahteva protokol HTTP.
  Datoteka sama mora zato vsebovati vsa potrebna polja, ki jih zahteva
  protokol HTTP, tem sledi prazna vrstica in vsebina spisa HTML.

  V nastavitveni datoteki za streznik dolocimo, da pripona .asis pripada
  zvrsti spisa httpd/send-as-is:


       AddType httpd/send-as-is asis



  Primer datoteke ASIS:


  Status: 200 OK
  Content-Type: text/html; charset=ISO-8859-2

  <HTML>
  <HEAD>
  <TITLE>Hello world</TITLE>
  </HEAD>
  <BODY>
  <H1>Zivjo svet!</H1>
  </BODY>
  </HTML>



  Kot vidite, morate v datoteko vkljuciti tudi tromestno odzivno kodo
  streznika. Streznik vedno doda polji Date: in Server:, zato teh ne
  smemo vkljuciti v datoteko.


  6.6.3.8.  Znacka <META> z oznacbo HTTP-EQUIV

  V dolocilu HTTP 2.0 predlagana znacka <META> z oznacbo HTTP-EQUIV je
  bila predlagana kot neobvezna metoda, s katero lahko streznik potegne
  dodatno metainformacijo iz zaglavja (<HEAD>) spletnega spisa in jo
  uporabi pri tvorjenju glave MIME. Piscu teh vrstic ni znano, da bi
  kateri streznik to v resnici tudi pocel. Tovrstno razclenjevanje
  spletnih spisov verjetno predstavlja preveliko obremenitev za procesor
  in bi se mocno poznalo pri odzivnosti spletnega streznika. Pac pa so
  namesto tega zaceli to informacijo uporabljati spletni brskalniki
  (Netscape Navigator, na primer, to pocenja od izdaje 2.0 dalje).

  Primer spisa z metainformacijo o uporabljenem kodnem razporedu v
  zaglavju spisa:


       <HTML>
       <HEAD>
         <TITLE>Naslov<TITLE>
         <META HTTP-EQUIV="Content-Type"
             CONTENT="text/html; charset=ISO-8859-2">
       </HEAD>

       <BODY>
       Besedilo...
       </BODY>
       </HTML>



  6.7.  Delo na oddaljenem racunalniku

  Z ukazoma telnet ali rlogin lahko prek omrezja TCP/IP delamo na drugem
  racunalniku.

  Tezave z osembitnimi znaki pri tem so redko posledica napacne
  nastavitve v maloprej omenjenih programov, saj privzeti nastavitvi pri
  obeh podpirata osembitne znake. V primeru tezav se poleg teh programov
  splaca pogledati se

    nastavitev ukazne lupine (poglavje ``Ukazne lupine'')

    nastavitev terminala (fizicnega ali virtualnega).  Eksplicitno ga
     lahko nastavimo z ukazom
       stty -parenb -istrip cs8


    in na koncu res nastavitev programov telnet ali rlogin


  6.7.1.  Telnet

  Telnet eksplicitno pripravimo do vzpostavitve osembitne zveze z ukazom
  toggle binary:

       ~> telnet
       telnet> toggle binary
       Negotiating binary mode with remote host.
       telnet> open racunalnik


  Telnet omogoca tudi, da si nastavitve za izbrane racunalnike vnesemo v
  nastavitveno datoteko, ~/.telnetrc.  Vnosi imajo obliko:


       ...
       biofiz.mf.uni-lj.si
               set binary true
       ...



  6.7.2.  rlogin

  Privzet nacin zveze pri programu ``rlogin'' je osembiten, eksplicitno
  pa lahko to dolocimo z dolocilom ``-8'':

       rlogin racunalnik -8



  6.8.  TeX in LaTeX

  Poslovenjenje paketa LaTeX obsega

    7- in 8-bitni nacin vnosa nasih znakov

    nacin izpisa nasih znakov

    poslovenjenje izpisov ``Contents'', ``Figure'' ipd.

    slovenska pravila za deljenje besed

    prilagoditev programa LyX: vizualnega okolja za vnos besedil v
     LaTeX in Linuxdoc DTD

     Urejanje stvarnega kazala po slovenski abecedi zaenkrat se ne gre
     avtomaticno. Pokazemo, kako lahko tezavo z nekaj truda obvozimo.

  Podporo za neangleske jezike v LaTeXu je poenotil paket babel
  Johannesa Braamsa z Nizozemske, ki je standardni del vseh sodobnih
  distribucij paketa TeX na Linuxu, kot sta teTeX in NTeX:

       <ftp://sunsite.informatik.rwth-aachen.de/pub/comp/tex/teTeX/>
       <http://web.mathematik.uni-stuttgart.de/ntex/WWW/>



  Z uporabo izbire ``slovene'' v paketu babel se avtomaticno izberejo
  slovenska imena pod- in nadnapisov, naslovov ipd., slovenska pravila
  za zlogovanje besed (ce imamo namescene slovenske zlogovalne vzorce;
  poglavje ``Slovenska pravila za deljenje besed''), in 7-bitni nacin
  vnosa znakov "c"s"z:


       \usepackage[slovene]{babel}



  V novi razlicici LaTeXa (LaTeX2e) lahko s paketoma fontenc in inputenc
  izberemo tudi 8-bitno kodno tabelo T1 (znano tudi kot DC ali Cork) in
  8-bitni vnos znakov.  Primer celotnega spisa v LaTeXu:

  ______________________________________________________________________
  \documentclass[a4paper]{article}
  \usepackage[slovene]{babel}
  \usepackage[T1]{fontenc}
  \usepackage[latin2]{inputenc}
  \begin{document}
  Ceprav se pouk na zeleznicarski soli v Sentvidu obicajno konca
  sele ob stirih, odpesacijo ucenci iz obcin Zelimlje in Zetale domov
  ze cetrt cez tri.
  \end{document}
  ______________________________________________________________________



  6.8.1.  LaTeX 2.09

  V starejsi razlicici paketa LaTeX, LaTeX 2.09, ne moremo uporabiti
  mehanizma inputenc. Pomagamo si s stilom latin2.sty Andreja Brodnika.
  Primer uporabe:

  ______________________________________________________________________
  \documentstyle[latin2]{article}
  \begin{document}
  ...
  \end{document}
  ______________________________________________________________________


  Stil latin2 je na voljo na vseh streznikih CTAN, npr.

       <ftp://ftp.dante.de/tex-archive/macros/latex209/contrib/latin2/>



  6.8.2.  Slovenska pravila za deljenje besed

  Datoteko s slovenskimi pravili za zlogovanje besed je v okviru svoje
  diplomske naloge leta 1990 izdelal Matjaz Vrecko, in jo predal v last
  slovenskemu drustvu uporabnikov sistema TeX (TeXCeH). Na voljo je za
  individualno uporabo brez namena pridobivanja premozenjske koristi. Od
  leta 1995 dalje zanjo skrbi dr. Leon Zlajpah z IJS, ki jo je
  posredoval tudi skrbniku sistema sistema babel za tujejezicno podporo
  v sistemu TeX, Johannesu Braamsu. Sistem babel praviloma dobimo skupaj
  z distribucijo sistema TeX. Trenutno zadnja izdaja je 2.3, datirana
  1997-04-15.

  V distribuciji teTeX, ki je najbolj priljubljena distribucija na
  Unixu, vklopimo podporo za slovenske delilne vzorce tako, da kot
  administrator pozenete program texconfig. V menuju izberemo moznost
  HYPHEN - hyphenation table (tex/latex). Program texconfig pri tej
  izbiri pozene urejevalnik vi in vanj nalozi datoteko language.dat. Za
  tiste, ki ga ne poznate, najnujnejse o uporabi le-tega: levo, desno,
  gor in dol po besedilu se premikate s tipkami h, l (mali L), j in k.
  Znak pobrisete tako, da kurzor pripeljete nanj in pritisnete tipko x.
  Datoteko shranite in zakljucite z delom s pritiskom na tipko Esc in
  vpisom :wq (dvopicje, mali W, mali Q), ki mu sledi Enter. Oborozeni s
  tem znanjem v datoteki language.dat pobrisemo komentar (znak za
  procent) pred zapisom slovene sihyph22.tex, shranimo in zapustimo
  urejevalnik. Program texconfig bo avtomaticno ustvaril nove formatne
  datoteke z vgrajenimi delilnimi vzorci.

  Pisec teh vrstic je imel nepojasnjene tezave z datoteko sihyph22.tex,
  ki so enako cudezno izginile, ko mu je dr. Zlajpah poslal novo izdajo
  slovenskih delilnih vzorcev. Dobimo jo lahko na ftp://sizif.mf.uni-
  lj.si/pub/i18n/tex/sihyph23.tex in jo postavimo ob bok stari datoteki,
  navadno v imenik /usr/TeX/texmf/tex/generic/hyphen/. Pozenemo
  texconfig, tam najprej osvezimo seznam datotek (izbira REHASH -
  rebuild ls-R database), zatem pa ponovimo postopek iz prejsnjega
  odstavka, s tem, da ime sihyph22.tex popravimo v sihyph23.tex.

  Dodatne informacije o slovenski skupini uporabnikov TeX najdete na

       <http://vlado.fmf.uni-lj.si/texceh/texceh.htm>



  6.8.3.  LyX

  (Roman Maurer, <roman.maurer@fmf.uni-lj.si>)

  Ce uporabljamo LyX s standardno slovensko tipkovnico (102/105 tipk),
  ga lahko enostavno prilagodimo za delo s slovenscino:


  1. Tipkovnica v strezniku Xwindow mora biti nastavljena tako, da z njo
     v splosnem lahko vnasamo nase znake (to je opisano v razdelku ``X
     Window System'' poglavja ``Tipkovnica'').

  2. Pozenemo LyX in nastavimo:


       Options / Screen Fonts / Font Norm = iso8859-2



  Zal izgleda, da LyX tega podatka nikamor ne shrani. Zato moramo rocno
  dodati v datoteko lyxrc (sistemska je navadno v imeniku
  /usr/share/lyx/, uporabniska pa v ~/.lyx/) naslednjo vrstico:


       \font_norm iso8859-2



  3. Odpremo (nek) dokument in izberemo:



  Layout / Document / Language = slovene
  Layout / Document / Encoding = latin2
  Layout / Paper / Papersize = A4
  Layout / Quotes = ,,text`` & Double



  4. Ce zelimo te nastavitve uporabljati v vseh nasih dokumentih (in to
     seveda zelimo), uporabimo se izbiro


       Layout / Save layout as default



  5. Kadar uporabimo razred "letter" namesto "article", odgovorimo
     pritrdilno na vprasanje:


       "Should I set some parameters to letter the defaults
       of this document class?"



  Zaradi napake v LyXu do vkljucno 1.0.0pre2 ni mogoc vnos 8-bitnih
  znakov v matematicnem tekstovnem nacinu (math text mode). Pomagamo si
  tako, da postavimo kar celo formulo kot TeXovo kodo ("tex-mode" - s
  tem sicer izgubimo WYSIWYG). Razvijalci LyX-a so o napaki obvesceni in
  jo bodo verjetno popravili v naslednjih izdajah.

  7-bitni vnos sumnikov kot "c"s"z je otezen, ker LyX avtomaticno
  pretvori dvojni narekovaj v dva enojna. Prva misel je, da si lahko
  spet pomagamo z izbiro "tex-mode", udobnejsa moznost pa je, da
  predefiniramo dvojni narekovaj. V datoteko emacs.bind (ali pa
  cua.bind, kar ze uporabljamo) dodamo vrstico:


       \bind "S-quotedbl" "accent-caron"



  Nase znake bomo zdaj dobili s pritiskom na "c"s"z.  S tem zal izgubimo
  avtomaticno pretvarjanje dvojnega narekovaja v dva enojna, a vsega pac
  ne moremo imeti...

  Datoteka emacs.bind je v imeniku ~/.lyx/bind/. Ce je se ni, lahko
  napravimo kopijo sistemske z imenika /usr/share/lyx/bind/ in jo
  popravimo.

  Ce imamo staro slovensko tipkovnico (ameriska s csz namesto ~{`),
  lahko uporabimo premapiranje tipkovnice v Latin 2 Alena Salamuna
  <alen.salamun@medinet.si>:


       Options / Keyboard / Primary = slovene



  Ustrezna datoteka slovene.kmap je tipicno v imeniku
  /usr/share/lyx/kbd/.

  Takole pa lahko uporabimo crkovalnik ``ispell'' za crkovanje
  slovenskih spisov:


       Edit / Spellchecker / Spellchecker Options
         * Use alternate language: slovensko
         * Extra special chars allowed in words: cszCSZ



  V slovenski izdaji urejevalnika LyX pa:


       Uredi / Crkovalnik / Izbire crkovalnika
         * Uporabi drug jezik: slovensko
         * Dodatni posebni znaki, dovoljeni v besedah: cszCSZ



  6.8.4.  Pregled besedila na zaslonu

  V Evropi je standardni format papirja A4, kar moramo dopovedati tudi
  programom za pregled besedila na zaslonu:

     XDvi
        V datoteko ~/.Xresources (osebna nastavitev) dodamo vrstico

        ________________________________________________________________
        XDvi.paper:     a4
        ________________________________________________________________



     Ghostview
        V datoteko ~/.Xresources (osebna nastavitev) ali pa v datoteko
        /usr/lib/X11/app-defaults/Ghostview (skupna nastavitev) dodamo
        vrstice:

        ________________________________________________________________
        !  Ghostview naj uporablja format A4
        *pageMedia:             A4
        !  Tudi Ghostscript naj uporablja format A4
        *Ghostview.interpreter: gs
        *Ghostview.arguments:   -sPAPERSIZE=a4
        ________________________________________________________________


     Ker tiskamo prek Ghostscripta tudi iz drugih programov, ne le iz
     Ghostview, je pametno, ce mu v nastavitveni datoteki (navadno
     /usr/share/ghostscript/izdaja/gs_init.ps ali
     /usr/local/share/ghostscript/izdaja/gs_init.ps) globalno izberemo
     velikost strani A4. Poiscemo spodnjo vrstico in jo odkomentiramo
     (pobrisemo zacetni znak za procent):


          % (a4) /PAPERSIZE where { pop pop } { /PAPERSIZE exch def } ifelse



  6.8.5.  Stvarna kazala

  Najpogostejse orodje za izdelavo stvarnih kazal v sistemu TeX je
  Makeindex. Ta je le omejeno lokaliziran (poleg angleskih pozna se
  nemska pravila za razvrscanje) in nase abecede ne pozna.

  Stvarno kazalo v LaTeX izdelamo z ukazom \makeindex v preambuli; vsako
  besedo, ki jo zelimo vnesti v kazalo, pa moramo posebej oznaciti z
  ukazom \index{vnos}. Ker navadno zelimo stvarno kazalo tudi izpisati,
  dodamo se ukaz \printindex, ta pa je definiran v makropaketu makeidx.
  Zgled, datoteki recimo zelez-sola.tex, naj ilustrira povedano:

  ______________________________________________________________________
  \documentclass[a4paper]{article}
  \usepackage[slovene]{babel}
  \usepackage[T1]{fontenc}
  \usepackage[latin2]{inputenc}
  \usepackage{makeidx}
  \makeindex
  \begin{document}
  Ceprav se pouk na zeleznicarski
  soli\index{s~ola@sola!z~eleznic~arska@zeleznicarska} v
  Sentvidu\index{S~entvid@Sentvid} obicajno konca sele ob stirih,
  odpesacijo ucenci iz obcin Zelimlje\index{Z~elimlje@Zelimlje} in
  Zetale\index{Z~etale@Zetale} domov ze cetrt cez tri.
  \printindex
  \end{document}
  ______________________________________________________________________



  Trik je v tem, da makeindex dopusca skladnjo \index{vnos1@vnos2}, kjer
  je vnos1 tisti, po katerem se kazalo ureja, vnos2 pa besedilo, ki se v
  resnici izpise. Naso crko C zato pisemo kot C~ (znak ~ je v kodnem
  razporedu ASCII za vsemi crkami), in tako bo zanesljivo uvrscena za
  vsemi C. Besedilo prevajamo v treh korakih:


       latex zelez-sola
       makeindex zelez-sola
       latex zelez-sola



  Prvi latex iz datoteke zelez-sola.tex izdela datoteko zelez-sola.idx,
  ukaz makeindex to uredi in iz nje izdela datoteko zelez-sola.ind, to
  pa vsrka drugi ukaz latex.


  6.9.  groff

  Groff nudi precej omejeno podporo za nase znake. Pri izpisu na zaslon
  (nacin nroff) lahko goljufamo tako, da zapisemo datoteko z osembitnimi
  znaki ISO Latin 2, programu pa lazemo (izbira -Tlatin1), da so
  kodirani po razporedu ISO Latin 1.

  Henryk Paluch je napisal paket groff-latin2, s katerim lahko nase
  znake vnasamo kot makroukaze, na primer:


       \('a    a z ostrivcem
       \(vc    c s stresico
       \vou    u s krozcem


  Izpis v obliki PostScript v casu pisanja tega spisa se vedno ne
  deluje, ceprav bi se mehanizme iz paketa ``ogonkify'' Juliusza
  Chroboczka podobno kot v programu ``a2ps'' verjetno dalo uporabiti
  tudi tu. Se najvecji problem je verjetno ta, da je paket ``groff''
  osirotel, saj ga prvotni avtor, James Clark, ne vzdrzuje vec.  Za
  paket groff-latin2 zdaj skrbi Jan Kasprzak <kas@fi.muni.cz>, najdete
  ga na

       <ftp://ftp.fi.muni.cz/pub/localization/groff/>



  6.10.  Perl

  Od izdaje 5.004 dalje tudi Perl podpira lokalizacijo. Nastaviti moramo
  primerne spremenljivke okolja in bodisi v programu uporabiti klic

  ______________________________________________________________________
  use locale;
  ______________________________________________________________________


  bodisi poklicati Perl z izbiro -Mlocale. Nekaj primerov; preizkus smo
  si sposodili pri Janu Pazdziori:

  ______________________________________________________________________
  ~> LC_CTYPE=sl_SI.iso88592 perl -Mlocale -e '$_="tezisce\n"; s/\w/$&:/g; print;'
  t:e:z:i:s:c:e:
  ~> LC_CTYPE=C perl -Mlocale -e '$_="tezisce\n"; s/\w/$&:/g; print;'
  t:e:zi:sce:
  ~> LC_CTYPE=sl_SI.iso88592 perl -e '$_="tezisce\n"; s/\w/$&:/g; print;'
  t:e:zi:sce:
  ______________________________________________________________________



  Kot vidimo, je samo v prvem primeru, ko smo izvedli oboje: nastavili
  spremenljivko LC_CTYPE in Perl poklicali z izbiro -Mlocale, nase znake
  res uposteval kot crke (\).


  6.11.  Crkovanje: ispell

  Vecina sodobnih distribucij Linuxa ze pride s crkovalnikom Ispell;
  manjka pa mu slovenski besedni zaklad. Tega najdete v datoteki

       <ftp://sizif.mf.uni-lj.si/pub/i18n/ispell/slovensko.tar.gz>


  Arhivska datoteka vsebuje dve datoteki, slovensko.hash in sloven
  sko.aff. Postavimo ju tja, kjer Ispell ze hrani leksikone za ostale
  jezike. Pri piscu teh vrstic je to /usr/lib/ispell/; ce pri vas ni, si
  lahko morda pomagate s tem, da s find poskusite poiskati datoteko
  english.aff. Osnovni slovenski leksikon izvira iz baze, ki jo je pod
  jetje Amebis d.o.o. prispevalo za mednarodni projekt MULTEXT-East; s
  posredovanjem dr. Tomaza Erjavca z odseka za inteligentne sisteme na
  Institutu Jozef Stefan pa je na voljo za nepridobitno uporabo.

  Ispell uporabljamo tako, da mu v ukazni vrstici podamo jezik, v
  katerem je napisano besedilo, na primer english, deutsch, francais ali
  slovensko:

       ispell -d slovensko besedilo.txt



  Natancnejsa navodila za ravnanje s programom Ispell boste nasli v
  prirocniku, vec o prilagoditvi paketa ispell za slovenscino si lahko
  preberete na strani Slovenscina in racunalniki Alesa Kosirja. Ispell s
  slovenskim besednim zakladom poganja tudi spletni crkovalnik Trubar
  istega avtorja:

       <http://nl.ijs.si/cgi-bin/truform.pl>



  6.12.  Pretvarjanje med razlicnimi kodiranji

  Razen ISO Latin 2 vsebuje vse nase znake se nekaj drugih naborov:
  Microsoft Codepage 1250, IBM Codepage 852, JUS I.B1.002, Apple MacOS-
  CE, Apple MacOS-Croatian, Kamenicky, ISO Latin 4, ISO Latin 6, ISO
  Latin 7 itd.

  Ceprav ni tezko napisati programcka za pretvorbo iz enega kodnega
  nabora v drugega, je pripravno uporabiti ze izdelan program.  Eden
  takih je GNU recode, dostopen npr. na strezniku ARNES:

       <ftp://ftp.arnes.si/software/gnu/recode/recode-3.4.tar.gz>


  Starejse izdaje GNU recode (pred 3.5) ne poznajo Microsoftovih kodnih
  strani 1250-1259.

  Uporaba je enostavna:

       recode yu:latin2 datoteka


  pretvori datoteko iz kodnega nabora JUS I.B1.002 v kodni nabor ISO
  Latin 2.  Kot obicajno izda tudi tu izbira --help se dodatne moznosti.

  Novejse izdaje programa recode (ki poznajo tudi nekaj vec kodnih
  naborov), uporabljajo malo drugacno skladnjo:

       recode yu..latin2 datoteka


  Po izkusnjah pisca pa je precrkovanje (npr. ,,nabori`` latex ali flat)
  se vedno omejeno na pretvorbo iz in v nabor ISO 8859-1. Novejse
  (preizkusne) izdaje programa recode najdete na:

       <ftp://ftp.iro.umontreal.ca/pub/recode/>



  6.13.  Drugi programi

  6.13.1.  Pregledovalnik less

  Less (avtor Mark Nudelman) je program za pregledovanje besedil na
  zaslonu, in je priljubljena zamenjava standardnega more.

  Less prilagodimo za izpis osembitnih znakov z nastavitvijo v
  ~/.profile:


       LESSCHARSET=latin1; export LESSCHARSET



  latin1 namesto latin2 ni pomota.  Less zaenkrat slednjega se ne pozna,
  ker pa ga pravzaprav zanima samo, kateri znaki so obicajni, kateri pa
  kontrolni (ki zahtevajo posebno obravnavo), ker pa je razpored znakov
  enak v celotni druzini ISO 8859, lahko izberemo kar latin1.  Namesto
  tega lahko tudi eksplicitno navedemo zaporedje tipa znakov v naboru:


       LESSCHARDEF="8bcccbcc18b95.33b."; export LESSCHARDEF



  Vsi nabori iz druzine ISO 8859 imajo osem binarnih znakov (posebnih
  znakov, ki jih praviloma ni v besedilih), tri kontrolne znake, binarni
  znak, dva kontrolna znaka, osemnajst binarnih znakov, 95 navadnih
  znakov, 33 binarnih znakov, in normalne znake do konca tabele.


  6.13.2.  Koledar gcal

  Vsi sistemi Unix imajo vgrajen koledarcek cal, ki pa je precej
  anglocentricen. Thomas Esken iz Nemcije je napisal alternativni
  koledarcek gcal. Od izdaje 2.40 dalje pozna tudi slovenske praznike.
  Najdemo ga na obicajnih mestih distribucije GNU. Najblizje je
  verjetno:

       <ftp://ftp.arnes.si/software/gnu/>


  Spodnja vrednost spremenljivke GCAL ustreza nasim razmeram:


       GCAL="--cc-holidays=SI --gregorian-reform=1582"; export GCAL



  7.  Tiskanje

  Pri tiskanju lahko naletimo na razlicne situacije:

    Tiskalnik neposredno podpira ISO Latin 2

    Tiskalnik podpira enega od ostalih osembitnih naborov z nasimi
     znaki (npr. kodno stran 852), ali pa sedembitni nabor JUS I.B1.002

    Tiskalnik razume PostScript

    Tiskalnik ne podpira nicesar drugega razen ASCII

     Zadnja moznost ni predmet obravnave tega spisa.


  7.1.  Tiskalniki, ki podpirajo ISO Latin 2

  Nekaj novejsih tiskalnikov ze neposredno podpira kodni razpored ISO
  Latin 2. Med njimi so

    Hewlett-Packard LaserJet 4 Plus in 4M Plus

    Hewlett-Packard LaserJet 5L

    Epson FX-2170 (NLSP)

    Epson LQ-870 (NLSP)

    Epson LQ-2070 (NLSP)

    Epson LQ-2170 (NLSP)

    Epson DLQ-3000 (NLSP; letnik 1996 in novejsi)

    Fujitsu DL700

    Fujitsu DL1150/1250

    Fujitsu DL3700/3800

    Fujitsu DL6400/6600

     Vse, kar morate storiti, je izbrati pravilno kodno stran v
     tiskalniku. Ubezna sekvenca za tiskalnike Hewlett-Packard (PCL) in
     Epson (ESC/P2) so naslednje

     PCL
        Tole menda deluje:

        ________________________________________________________________
        \033(2N\033(s0p12h0s0b4099T
        ________________________________________________________________



     ESC/P2
        Z ukazom ESC ( t prepisemo kodno tabelo ISO 8859-2 v drugo
        tabelo tiskalnika; zatem z ukazom ESC t izberemo drugo tabelo
        tiskalnika (strani C-73 in C-77 v ,,Epson ESC/P Reference
        Manual``, december 1997):

        ________________________________________________________________
        \033(t\003\000\002\177\002\033t\002
        ________________________________________________________________



     Oznaka \033 je osmiska koda znaka Escape.

  Eden od nacinov, kako z /etc/printcap prilagodimo okolje za tiskanje
  na tak tiskalnik, je podrobneje opisan v razdelku ``Tiskalniki, ki
  podpirajo kak drug nabor z nasimi znaki''.


  7.2.  Tiskalniki, ki podpirajo kak drug nabor z nasimi znaki

  Ce tiskalnik podpira kak drug nabor z nasimi znaki (ne dolgo nazaj je
  bila ustaljena praksa, da je bil ROM v tiskalnikih zamenjan z EPROM, v
  njem pa svedski znaki zamenjani z znaki po JUS I.B1.002), lahko s
  primerno nastavitvijo v /etc/printcap se vedno tiskamo spise, kodirane
  po ISO Latin 2.

  Primerno moramo dopolniti datoteko /etc/printcap.  Za zgled si oglejmo
  tiskalnik Epson, ki ima znake po JUS I.B1.002 na mestu svedskega
  nabora.



  ______________________________________________________________________
  lp|ascii|epson|Epson LQ-850:\
          :lp=/dev/lp1:\
          :sd=/usr/spool/lpd/epson:\
          :lf=/usr/spool/lpd/ERRORLOG:\
          :mx#0:\
          :sh:
  jus|Epson LQ-850 z znaki JUS I.B1.002:\
          :lp=/dev/null:\
          :sd=/usr/spool/lpd/jus:\
          :if=/usr/spool/lpd/jus_filter:\
          :lf=/usr/spool/lpd/ERRORLOG:\
          :mx#0:\
          :sh:
  latin2|text|Epson LQ-850 z znaki ISO Latin 2:\
          :lp=/dev/null:\
          :sd=/usr/spool/lpd/latin2:\
          :if=/usr/spool/lpd/latin2_filter:\
          :lf=/usr/spool/lpd/ERRORLOG:\
          :mx#0:\
          :sh:
  ______________________________________________________________________



  Zgled ima tri tiskalniske vrste.  Prva je dejanski tiskalnik z
  ameriskim (ASCII) naborom znakov.  Druga uporablja filter
  /usr/spool/lpd/jus_filter:

  ______________________________________________________________________
  #!/bin/sh
  /usr/spool/lpd/jus_epson | lpr -Pascii
  ______________________________________________________________________


  Datoteko torej precedimo skozi filter /usr/spool/lpd/jus_epson in jo
  postavimo v prvo tiskalnisko vrsto.  Filter jus_epson ne napravi
  drugega, kot da na zacetku doda kodo za preklop v svedski nabor,
  prepise datoteko z vhoda na izhod, in na koncu doda kodo za preklop
  nazaj v ameriski nabor.  To je tudi edini del programja, ki je odvisen
  od vrste tiskalnika:

  ______________________________________________________________________
  #!/bin/sh
  # Tiskanje besedil kodiranih po JUS I.B1.002 na tiskalnik Epson LQ
  #
  # Izberemo slovenski (svedski) nabor
  /bin/echo -ne "\033R\005\c"
  # Izpisemo dokument
  cat
  # Izberemo ameriski nabor
  /bin/echo -ne "\033R\000\c"
  ______________________________________________________________________



  Tretja vrsta uporablja podoben filter kot druga, le da ta najprej
  pretvori besedilo iz Latin 2 v JUS, zatem uporabi ze opisani filter za
  to, da doda na zacetku in na koncu potrebno kodo za tiskalnik, in
  koncno tko datoteko postavi v prvo vrsto.



  ______________________________________________________________________
  #!/bin/sh
  /usr/local/bin/recode --force latin2:yu | \
      /usr/spool/lpd/jus_epson | lpr -Pascii
  ______________________________________________________________________


  Zgled predpostavlja, da je pot do programa recode
  /usr/local/bin/recode.  Izbiro --force moramo uporabiti, ker je pres
  likava neobrnljiva -- v Latin 2 imamo tako sumnike kot zavite
  oklepaje, v JUS pa samo se prve.

  Za ta zgled smo morali v imeniku /usr/spool/lpd ustvariti tri
  podimenike: /usr/spool/lpd/epson, /usr/spool/lpd/jus in
  /usr/spool/lpd/latin2.

  Tiskanje gre zdaj tako:

  1. Brez eksplicitne izbire vrste, ali pa z izbiro -Pepson ali -Pascii
     se datoteka odtisne kot ASCII:

       lpr datoteka



  2. Z izbiro -Pjus se datoteka odtisne kot besedilo, kodirano po JUS
     I.B1.002:

       lpr -Pjus datoteka



  3. Z izbiro -Platin2 ali -Ptext se datoteka odtisne kot besedilo,
     kodirano po ISO Latin 2:

       lpr -Platin2 datoteka



  7.3.  Tiskalniki, ki podpirajo kak drug nabor z nasimi znaki II

  (Matjaz Terpin <matjaz.terpin@comcom.si>, Message-id:
  <Pine.LNX.3.96.980709095750.24607B-400000@guru.comcom.si>)

  Matjaz Terpin <matjaz.terpin@comcom.si> je predlagal imenitno
  izboljsavo pravkar opisanega postopka, pri katerem lahko tiskamo nase
  znake in oglate in zavite oklepaje. Srz njegovega predloga je filter,
  ki pred vsakim nasim znakom preklopi v svedski nabor, takoj za njim pa
  spet nazaj v ASCII.

  Datoteka /etc/printcap je v tem primeru taksna:



  ______________________________________________________________________
  # /etc/printcap
  lp|raw|yu:\
         :lp=/dev/lp1:\
         :sd=/var/spool/lpd/lp:\
         :lf=/var/spool/lpd/ERRORLOG:\
         :mx#0:\
         :sh:
  lat2:\
         :lp=/dev/null:\
         :if=/etc/lp/lat2.filter:\
         :sd=/var/spool/lpd/lat2:\
         :lf=/var/spool/lpd/ERRORLOG:\
         :mx#0:\
         :sh:
  ______________________________________________________________________



  Filter /etc/lp/lat2.filter precedi besedilo skozi naslednje sito,
  /etc/lp/lat2.switch, in ga postavi v vrsto lp:

  ______________________________________________________________________
  #!/bin/sh
  # /etc/lp/lat2.filter

  /etc/lp/lat2.switch | lpr -Plp
  ______________________________________________________________________



  ,,Meso`` postopka je v datoteki /etc/lp/lat2.switch:

  ______________________________________________________________________
  #!/bin/sh
  #/etc/lp/lat2.switch

  echo -ne "\033R0"

  sed -e "s/c/`echo -ne "\033R5\~\033R0"`/g" \
   -e "s/C/`echo -ne "\033R5\^\033R0"`/g" \
   -e "s/s/`echo -ne "\033R5\{\033R0"`/g" \
   -e "s/S/`echo -ne "\033R5\[\033R0"`/g" \
   -e "s/z/`echo -ne "\033R5\140\033R0"`/g" \
   -e "s/Z/`echo -ne "\033R5\@\033R0"`/g" \
   -e "s/c/`echo -ne "\033R5\}\033R0"`/g" \
   -e "s/C/`echo -ne "\033R5\]\033R0"`/g" \
   -e "s/d/`echo -ne "\033R5\|\033R0"`/g" \
   -e "s/D/`echo -ne "\033R5\\\\033R0"`/g"

  echo -ne "\033R5"
  ______________________________________________________________________



  Matjaz pravi se: sed slabo prebavi ``echo -ne "\000"'', zato
  uporabljam kar znak 0 (niclo), saj je tiskalnik (NEC pinwriter P7)
  zadovoljen tudi s tem.


  7.4.  Tiskalniki PostScript

  ``Naravni'' kodni nabor v PostScriptu je Adobe Standard Encoding.
  Nasih crk ne pozna. Pa ne le nasih, tudi mnogih drugih crk ne pozna,
  in pravzaprav sploh nima tovrstnih ambicij. Namesto tega je ASCII
  razsirjen z gradniki sestavljenih znakov: stresica, ostrivec, diereza,
  sedij itd. -- vsi so tam. Jezik PostScript pa omogoca definiranje
  sestavljenih znakov. Vse skupaj je cakalo samo se nekoga, ki bo
  definiral sestavljene znake za kodni nabor ISO Latin 2. Ta nekdo je
  bil Juliusz Chroboczek, ki je napisal paket ogonkify.

  Filtra a2ps in GNU enscript sta bila napisana z namenom, da resita za
  nase kraje neobicajno zagato: kako odtisniti cisto obicajno besedilo
  na tiskalnik, ki razume edino PostScript. Eden in drugi postavita
  stran v PostScriptu z danim besedilom in jo posljeta na tiskalnik.
  Fleksibilnost PostScripta omogoca tudi transformacije (npr.
  pomanjsave) ali poudarjanje sintakse pri tiskanju programskih izpisov.
  Oba podpirata nabor ISO Latin 2.


       <http://www.dcs.ed.ac.uk/home/jec/programs/ogonkify/>
       <http://www-inf.enst.fr/~demaille/a2ps/>
       <http://www.iki.fi/~mtr/genscript/>
       <ftp://ftp.arnes.si/gnu/enscript/enscript-1.6.1.tar.gz>



  7.4.1.  ogonkify

  Ogonkify je filter za izpise v PostScriptu, in omogoca pravilen odtis
  crk tudi v jezikih, ki ne uporabljajo nabora ISO Latin 1. Ker je
  filter, je ravno korak prepozen, da bi lahko pocel to elegantno, ampak
  mora prezveciti kakrsnokoli grdobijo pac izpljune program korak pred
  njim in iz dobljenega izdelati lep odtis. Programi pa izdelujejo
  datoteke PostScript vsak malo drugace, kar filtru ``ogonkify'' otezi
  delo. Zaenkrat podprti formati izpisa PostScript so: NCSA Mosaic,
  Netscape Navigator, StarOffice, Applixware in XFig.

  Ogonkify za delovanje potrebuje Perl. Ko je namescen, ogonkify
  uporabimo takole za odtis spletnega sestavka, shranjenega iz
  Navigatorja:

       ogonkify -AT -N netscape.ps | lpr



  7.4.2.  GNU enscript

  Ce GNU enscript se ni namescen, ga namestimo po navodilih, ki so
  prilozena programu.  Poleg njega potrebujemo se vsaj eno pisavo z
  vsemi nasimi znaki, zapisan v obliki Type 1.  Primeren je npr. IBM
  Courier, ki je prosto dostopen in se distribuira z X Window System,
  programom ghostscript ipd.  Ce nismo prepricani, ali ga imamo ze
  namescenega, pozenemo:


       find / -name cour.pf[ab]



  V osebno (~/.enscriptrc) ali skupno konfiguracijsko datoteko (navadno
  /usr/local/etc/enscript.cfg ali /usr/local/etc/enscriptsite.cfg)
  dodamo pravilno pot do datotek s pisavami.  Poleg tega potrebuje GNU
  enscript v vsakem imeniku s pisavami se datoteko z imenom font.map, ki
  vsebuje preslikavo med imeni pisav in datotekami, kjer so shranjene.
  Ustvarimo jo z ukazom mkafmmap.

  Primer konfiguracijske datoteke:



  ______________________________________________________________________
  ...
  #  Kje hranimo pisave PostScript?
  AFMPath: /usr/lib/X11/fonts/Type1:/usr/local/lib/ghostscript/fonts
  ...
  #  Privzeti nacin kodiranja:
  DefaultEncoding: latin2
  ...
  #  Privzeti format papirja:
  DefaultMedia: A4
  ...
  #  lpd izbira tiskalniske vrste z -P...
  QueueParam: -P
  ...
  #  Za tiskanje uporabljamo ukaz lpr, ne lp
  Spooler: lpr
  ______________________________________________________________________



  Ko je vse potrebno nastavljeno, odtisnemo besedilo enostavno z ukazom

       enscript datoteka



  7.4.3.  a2ps

  Z izdajo 4.7.21 je Akim Demaille v a2ps vgradil mehanizem za
  sestavljene znake, ki ga je Juliusz Chroboczek uporabil v filtru
  ``ogonkify''.

  Nasim krajem prilagodimo a2ps z majckeno spremembo nastavitvene
  datoteke. Sistemsko nastavitveno datoteko najdemo navadno kot
  /usr/etc/a2ps.cfg, /usr/local/etc/a2ps.cfg ali kaj podobnega; osebna
  se imenuje ~/.a2psrc.

  ______________________________________________________________________
  ...
  # Default encoding
  Options: --encoding=latin2

  # Default media
  Options: --media=A4
  ...
  ______________________________________________________________________



  8.  Linux v Sloveniji

  Harald T. Alvestrand z Norveske vodi evidenco o uporabnikih Linuxa po
  drzavah. Seznam slovenskih uporabnikov Linuxa je na naslovu

       <http://domen.uninett.no:29659/bycountry/SI.html>


  Ce vas ni med njimi, se prijavite!

       <http://domen.uninett.no:29659/>



  8.1.  Skupina uporabnikov Linuxa

  Od marca 1996 dalje deluje v Ljubljani organizirana skupina
  uporabnikov Linuxa v Sloveniji, drustvo LUGOS (Linux Users Group of
  Slovenia). Drustvo ima svojo stran na WWW:

       <http://www.lugos.si/>


  Drustvo ima tudi svoj elektronski spisek, na katerega se prijavite
  tako, da na naslov majordomo@lugos.si posljete vrstico

       subscribe lugos-list


  v telesu sporocila.


  8.2.  Strezniki FTP

  Vzdrzevan seznam aktivnih arhivov v Sloveniji najdete na straneh
  streznika LUGOS,

       <http://www.lugos.si/arhiv/>


  Od marca 1997 dalje imamo v Sloveniji svoj Sun SITE, ki je usklajen z
  drugimi strezniki Sun SITE po svetu (Sun SITE na Univerzi Severne
  Karoline, ZDA, je eden glavnih centrov za Linux).

       <ftp://sunsite.fri.uni-lj.si/pub/linux/>


  Na strezniku ARNES se avtomaticno zrcalita distribucija Debian in
  programje iz projekta GNU,

       <ftp://ftp.arnes.si/software/unix/linux/debian/>
       <ftp://ftp.arnes.si/software/gnu/>


  Streznik z zelo veliko izbiro programja za Linux je tudi na Gimnaziji
  v Murski Soboti,

       <ftp://mercur.s-gms.ms.edus.si/pub/UNIX/linux/>


  Studentski informacijski center je s pomocjo Zavoda za odprto druzbo
  uredil streznik FTP v Narodnem domu v Mariboru:

       <ftp://ftp.kibla.org/pub/Linux/>


  Distribucija Slackware se zrcali tudi na strezniku Fakultete za
  racunalnistvo in informatiko Univerze v Ljubljani,

       <ftp://ftp.fri.uni-lj.si/pub/linux/>


  Wowen Goods for Linux se zrcalijo na strezniku Laboratorija za
  robotiko na Fakulteti za elektrotehniko, Univerza v Ljubljani:

       <http://robo.fe.uni-lj.si/woven/>


  Linux Documentation Project ter distribucija Debian se zrcalita na
  strezniku Centra za uporabno matematiko in teorijsko fiziko, Univerza
  v Mariboru:

       <http://www.camtp.uni-mb.si/linux/LDP/>
       <ftp://ftp.camtp.uni-mb.si/pub/linux/debian/>



  8.3.  Usenet

  Linux nima svoje diskusijske skupine, ampak je vsa razprava o sistemih
  Unix zbrana v skupini si.comp.os.unix (kjer pa razprava o Linuxu res
  predstavlja znaten del prometa). Svojo skupino pa ima drustvo LUGOS:
  si.org.lugos.


  8.4.  Zastopniki za Linux

  Agenda d.o.o., Lavriceva 3, Maribor (tel. 062/2297740), je uradni
  zastopnik podjetij Caldera, RedHat in SuSE v Sloveniji.

  CD-ROM z distribucijami Linuxa se da navadno dobiti pri vseh bolje
  zalozenih trgovcih s tovrstno robo, npr. Infobia (tel.  061/614548)
  ali Mantis (tel. 061/1685473).


  9.  O tem spisu

  Najnovejsa izdaja tega spisa je razen na uradnem mestu Linux
  Documentation Project dostopen tudi pri avtorju ter na domaci strani
  Slovenskega drustva uporabnikov Linuxa:

       <http://sizif.mf.uni-lj.si/linux/cee/Slovenian-HOWTO.html>
       <http://www.lugos.si/delo/slo/HOWTO-sl/Slovenian-HOWTO.html>


  Vse pripombe na ta spis so dobrodosle na naslov
  <primoz.peterlin@biofiz.mf.uni-lj.si>, splosna vprasanja o Linuxu in
  poslovenjenju programov pa sodijo na dopisno listo lugos-slo@lugos.si
  ali v si.comp.os.unix.


  9.1.  Opombe k drugi izdaji

  Druga izdaja je priblizno dvainpolkrat daljsa od prve, ki je izsla
  konec leta 1996. Izkazalo se je, da bi bil koristen kratek seznam
  stvari, ki jim moramo opraviti, ce zelimo usposobiti nase znake na
  konzoli ali v okolju X Window System, zato sem ga dodal na zacetek.
  Dodan je opis uporabe vektorskih pisav Type 1 in TrueType. Nastavitev
  locale predstavlja standarden nacin prilagoditve programov, zato je
  temu razdelku namenjena vecja pozornost. V celoti so novi opisi
  prilagoditev urejevalnika LyX ter pisarniskih paketov WordPerfect,
  Star Office in Applixware. Dodan je opis prilagoditve nove izdaje
  urejevalnika Emacs. Razdelek o tiskalnikih je razsirjen z domiselno
  alternativno razlicico tiskalniskega filtra; dodatno sta omenjena
  ogonkify in a2ps. Posodobljen je seveda tudi razdelek o Linuxu v
  Sloveniji. In morda se kaj, kar sem pozabil.

  Ce je prva izdaja predstavljala nekaksne zbrane in urejene zapiske o
  problemih, s katerimi sem se sam sreceval, se zdaj nekoliko bolje
  zavedam tudi potreb drugih. Zato sem v to dodal tudi opis prilagoditev
  programov in programskih paketov, ki jih sam ne uporabljam, npr. Star
  Office, Applixware ali Word Perfect. Opisanih resitev nisem
  preizkusal; zaupam pac izkusnjam izvornih piscev. Te sem povsod tudi
  navedel in lahko stopite v stik z njimi.


  9.2.  Zahvala

  Ce bralka ali bralec nista tega ze sama uganila, je cas, da priznam
  sam: noben strokovnjak za Linux nisem. Nekaj o lokalizaciji Linuxa sem
  se naucil iz spisov ``German HOWTO'' Winnfrieda Truemperja ter
  ``Danish/International HOWTO'' Thomasa Petersena, nekaj o
  internacionalizaciji kar tako iz spisov Michaela Gschwinda. Nadvse
  koristni so bila tudi ``Czech HOWTO'' skupine avtorjev, Polska strona
  ogonkowa, ter Slovenscina in racunalniki Alesa Kosirja. Prvi spis je
  spisala skupina avtorjev, obcasno ga objavijo v cz.comp.linux,
  zrcaljen je pa tudi na nekaj mestih na Ceskem in Slovaskem; drugo
  najdete na http://www.agh.edu.pl/ogonki/; stran vzdrzuje Jaroslaw
  Strzalkowski. ``Slovenscino in racunalnike'' najdete na
  http://nl.ijs.si/gnusl/tex/tslovene/slolang/.

  Z namigi in nasveti so mi pomagali se (v abecednem vrstnem redu):
  Gorazd Bozic <gorazd.bozic@arnes.si>, Ales Casar <casar@uni-mb.si>,
  Tomaz Erjavec <tomaz.erjavec@ijs.si>, Matjaz Godec <gody@elgo.si>,
  Ales Kosir <ales.kosir@hermes.si>, Metod Kozelj <metod.kozelj@rzs-
  hm.si>, Renato Lukac <renato@s-gms.ms.edus.si>, Roman Maurer
  <roman.maurer@fmf.uni-lj.si>, Jaka Mele <jack@ro.zrsss.si>, Borut Mrak
  <borutm@bigfoot.com>, Boris Pozar <boris.pozar@guest.arnes.si>, Marko
  Samastur <marko.samastur@fmf.uni-lj.si>, Robert Susic
  <robert.susic@ijs.si>, Alen Salamun <alen.salamun@medinet.si>, Matjaz
  Terpin <matjaz.terpin@comcom.si>, in Leon Zlajpah
  <leon.zlajpah@ijs.si> Vsem hvala. Vsem po nemarnosti izpuscenim se
  opravicujem; poskusil bom popraviti do naslednje izdaje.


  9.3.  Vprasanja

  9.3.1.  Se pravi Slovenian ali Slovene?

  Mnenja so deljena. Pisec teh vrstic se je pozanimal pri strokovnjakih
  s tega podrocja, ki so ga le potrdili v tem, da so mnenja res deljena.
  Slovnicno je pravilno eno ali drugo, odlocitev za eno ali drugo
  varianto je zaenkrat bolj domena jezikovne estetike. Iz zgodovinskih
  razlogov ta spis uporablja Slovenian, in tako bo do nadaljnjega tudi
  ostalo.


  9.3.2.  Nasi znaki v tem spisu

  Cel spis govori o tem, kako pridemo do nasih znakov, sam jih pa nima.
  Kako to?

  Kovaceva kobila... Sistem SGML-Tools (nekdaj Linuxdoc-SGML), ki je
  uradni standard za dokumentacijo HOWTO, zaenkrat podpira samo Latin 1.
  Cees de Groot, vzdrzevalec paketa SGML-Tools, kot tudi Tim Bynum,
  urednik zbirke HOWTO, se tezave zavedata. Pisec teh vrstic v upanju na
  boljse case pise v Latin-2; preden poslje material uredniku, pa poreze
  kljukice nad sumevci. Za domaco rabo pa lahko malo pogoljufamo in
  paketu sgmltools lazemo, da so osembitni znaki kodirani po Latin 1:
  pri pretvorbi v navadno besedilo je tako ali tako vseeno, pri
  pretvorbi v HTML moramo dodati vrstico <META> z definicijo
  uporabljenega nabora znakov, pri pretvorbi v LaTeX pa morebiti se malo
  telovaditi s sed.


  9.4.  Uporaba in razsirjanje

  Copyright (c) 1996,1999 Primoz Peterlin
  <primoz.peterlin@biofiz.mf.uni-lj.si>. Ta spis lahko razsirjate pod
  pogoji, navedenimi v licenci LDP, dosegljivi na naslovu
  http://metalab.unc.edu/LDP/COPYRIGHT.html. Spisa ni dovoljeno
  razsirjati v spremenjeni obliki brez privolitve avtorja.
  Informacije v tem spisu so podane v veri, da so tocne in koristne,
  vendar pa brez kakrsnegakoli jamstva, izrecnega ali impliciranega,
  vkljucno, a brez omejitve na implicirano jamstvo za primernost za
  trzenje ali uporabo. Uporabljate jih lahko izkljucno na lastno
  odgovornost. Avtor ne odgovarja za kakrsnekoli skodo, posredno ali
  neposredno, nastalo kot posledico uporabe informacij v tem spisu.


  9.5.  Note to English readers

  Copyright (c) 1996,1999 by Primoz Peterlin
  <primoz.peterlin@biofiz.mf.uni-lj.si>. This document may be
  distributed under the terms set forth in the LDP license at
  http://metalab.unc.edu/LDP/COPYRIGHT.html. This document may not be
  distributed in modified form without consent of the author.

  The information in this document is provided in belief of being
  accurate and useful, however without any warranty, expressed or
  implied, including, but not limited to, the implied warranties of
  merchantability or fitness for a particular purpose. The entire risk
  of using the information goes with the user. The author can not be
  liable for any possible damage, direct or indirect, arising from the
  use of information provided in this document.



F SLOVENIA.;1                       	Slovenian-HOWTO
  Spanish Linux HOWTO
  Gonzalo.Garcia-Agullo@jrc.es.
  v0.1, 20 August 1996

  This is the very first issue of the Spanish Linux HOWTO. The target
  audience of this document is the growing family of Linux users in
  Spain and Latin America, so this How-To is of course in Spanish. Some
  non-Spanish speakers have asked for information on Linux in the Span
  ish environment, for developing software with Spanish support or just
  to get in touch with the Linux community in Spain. You're welcome in
  any case...
  ______________________________________________________________________

  Table of Contents



  1. Introduccin

     1.1 Empecemos por el principio...
     1.2 Qu es linux?
     1.3 Cmo conseguirlo?
     1.4 Socorro! Dnde estn los manuales?

  2. Distribuciones

  3. Ayuda a la instalacin de la distribucin Slackware

     3.1 Instalacin con UMSDOS
     3.2 Instalacin en particin nativa de Linux.
        3.2.1 Preliminares
        3.2.2 Formateo de la particin.
        3.2.3 Instalacin de los discos.
        3.2.4 Configuracin

  4. (EM

     4.1 Consola
     4.2 Shell bash
     4.3 Shell tcsh
     4.4 Algunas aplicaciones
     4.5 Xwindow
     4.6 Emulador de DOS (DOSEMU)
     4.7 Correo electrnico

  5. Conectividad de Linux

     5.1 Conectividad casera
     5.2 Servidor de terminales
     5.3 Red PPP
     5.4 Servidor de modems
     5.5 Conexion directa a Internet
     5.6 Infova: acceso a Internet desde casa
        5.6.1 Qu es infova?
        5.6.2 Como conectar entonces?

  6. Direcciones tiles

     6.1 Direcciones electrnicas
        6.1.1 WWW
        6.1.2 FTP Anonimo
        6.1.3 Grupos de noticias
        6.1.4 Listas de correo
        6.1.5 En Fidonet
     6.2 Direcciones de Firmas comerciales
     6.3 Bibliografa.

  7. Copyright



  ______________________________________________________________________

  1.  Introduccin

  1.1.  Empecemos por el principio...


  Este documento pretende ser el punto de entrada de los
  hispanohablantes al mundo Linux, intentando abarcar tanto a los
  principiantes de este apasionante sistema como a los ya iniciados que
  buscan informacin puntual. Se tratarn de forma genrica todos los
  temas que puedan interesar al usuario de Linux, desarrollndolos en
  castellano o dando referencias a otras fuentes de informacin en
  nuestro idioma, as como orientacin cuando tenga que acudir a otras
  HOWTO y en general a cualquier documento en ingls.

  Se distribuye integrado con el Linux Documentation Project en todos
  los foros de informacin Linux en Internet. Se actualiza
  peridicamente, pudiendo encontrar la ltima versin en Linux/Espaa
  <http://www.cs.us.es/archive/linux.html>

  Notas del autor: Aunque puede ser interesante de por s, traducir sin
  ms informacin ya editada en ingls no es el objetivo de este
  documento, sino ms bien servir de base al usuario hispanohablante y
  divulgar el Linux en nuestro idioma. Una ambicin de quien escribe es,
  desde estas lneas, poner su grano de arena para coordinar los
  esfuerzos (valiosos pero muy diseminados por la red) de tanto Linuxero
  como ya hay. Otro objetivo menos pretencioso de este documento es
  complementar todas las demas Howto's en aquellos aspectos concretos
  que afecten a los usuarios hispanos (configuracin del sistema y de
  las aplicaciones para trabajar en nuestro idioma, teclados, correo
  electrnico en espaol, etc). Un tercer objetivo ser servir de agenda
  actualizada de direcciones espaolas dedicadas a Linux, tanto para
  difusin de las distribuciones originales de software Linux como de
  desarrollos propios en espaol que se vayan publicando. Vaya desde
  aqu mi agradecimiento en esta primera versin para Antonio L. Delgado
  <mailto:antonio-luis.delgado@cs.us.es>, compaero de la Facultad de
  Informtica de Sevilla, por prestarse a echar una mano redactando esta
  Howto en las calurosas tardes de Sevilla.

  Cualquier comentario, sugerencia para nuevos contenidos, rectificacin
  de errores, crtica, etc. es no slo bienvenido sino tambin esperado.
  Contacta por correo electrnico para todo lo que quieras.


  1.2.  Qu es linux?



  Linux es una implementacin del sistema operativo UNIX (uno ms de
  entre los numerosos clnicos del histrico Unix), pero con la
  originalidad de ser gratuito y a la vez muy potente, que sale muy bien
  parado (no pocas veces victorioso) al compararlo con las versiones
  comerciales para sistemas de mayor envergadura y por tanto
  tericamente superiores. Comenz como proyecto personal del -entonces
  estudiante- Linus Torvalds, quien tom como punto de partida otro
  viejo conocido, el Minix de Andy. S. Tanenbaum (profesor de sistemas
  operativos que cre su propio sistema operativo Unix en PCs XT para
  usarlo en su docencia). Actualmente Linus lo sigue desarrollando, pero
  a estas alturas el principal autor es la red Internet, desde donde una
  gigantesca familia de programadores y usuarios aportan diariamente su
  tiempo aumentando sus prestaciones y dando informacin y soporte
  tcnico mtuo.  La versin original -y aun predominante- comenz para
  PCs compatibles (Intel 386 y superiores), existiendo tambin en
  desarrollo versiones para prcticamente todo tipo de plataformas:
  PowerPC <http://www.cs.us.es/archive/linuxppc/>, Sparc
  <http://www.geog.ubc.ca/sparclinux.html>, Alpha
  <http://www.azstarnet.com/~axplinux>, Mips <http://www.fnet.fr/linux-
  mips/>, etc. De todas ellas la ms reciente en este momento es la
  versin para PowerMac <http://www.mklinux.org> (el PowerPC de Apple)
  basada en el microkernel Mach 3.0 y de la que ya hay una distribucin
  para desarrolladores avalada directamente por Apple y OSF pero
  conservando el espritu (gratuito, de libre distribucin, etc) de la
  version original. Un servidor la acaba de probar hace unos das y se
  ha llevado una grata sorpresa (an tendr muuuchos fallos, pero para
  ser una primersima versin y el poco tiempo que lleva en marcha, ha
  avanzado ms de lo que me esperaba).

  1.3.  Cmo conseguirlo?


  La primera fuente para conseguir el sistema Linux es la propia red
  Internet, y es donde estarn siempre las ltimas versiones y las
  aplicaciones ms actualizadas en muchos servidores de FTP annimo.
  Otra va muy frecuente, de inters para principiantes y para quienes
  no deseen o no puedan permitirse copiar tanta cantidad de informacin
  a traves de la red, es mediante las versiones comercializadas en
  CDROM. Hay empresas que se dedican a elaborar CDROMs de bajo coste con
  recopilaciones de software, manuales, etc. El corazn del sistema es
  el mismo, aunque pueden tener externamente presentaciones y formas
  distintas de instalacin. Hay revistas especializadas que tambin
  suelen incluir CDs con alguna versin de Linux. Hacia el final de este
  documento se relacionan diversas fuentes de Linux, tanto servidores
  pblicos en la red como direcciones de empresas que lo comercializan.

  Una ventaja (para muchos usuarios termina siendo un inconveniente) es
  la gran rapidez con la que se se desarrolla Linux. Constantemente
  llegan a los principales servidores Linux en la red actualizaciones
  del ncleo del sistema, de aplicaciones, utilidades, manuales y
  documentacin, etc. Es bueno estar al da, seguir con atencin su
  evolucin y aprovechar las mejoras que se incorporen, pero en la
  mayora de los casos no vale la pena estar reinstalando software por
  el simple hecho de ser una nueva versin, sino que hay que ser un poco
  selectivos, al menos con el software. En el caso de los manuales, How-
  To's, grupos de noticias y/o listas de correo s que vale la pena
  estar "a la ltima", sobre todo porque es all donde nos sacarn de
  apuros cuando agotemos nuestros propios recursos...


  1.4.  Socorro! Dnde estn los manuales?


  Como ocurre en todas las versiones de Unix, el primer sitio donde
  mirar cuando tenga una duda concreta sobre tal comando, fichero de
  configuracin, etc. es la orden 'man', que incluye la ayuda de
  referencia de Unix. Pero slo es til en ese mbito, cuando ya se sabe
  ms o menos lo se que busca, y slo se necesita aclarar dudas
  concretas. Para todo lo dems la mejor fuente de informacin es, cmo
  no, la propia red. En ella estn disponibles tanto libros completos
  (de los que algunas editoriales especializadas han publicado versiones
  en papel) como la coleccin "Linux HOWTO", de la que este documento
  forma parte. Hay una HOWTO para prcticamente cualquier tema. Su
  objetivo es cubrir, mediante manuales breves, concisos y especficos,
  cualquier duda que pueda surgir. Se actualizan permanentemente, y se
  distribuyen a travs del denominado "Linux Documentation Project"
  (LDP) en Internet. La misma informacin se publica en muy diferentes
  formatos, orientados tanto a la bsqueda y consulta en lnea como a su
  lectura convencional. Todas las versiones de Linux incluyen estos
  manuales (al menos la ltima edicin disponible en el momento de
  recopilar el CDROM correspondiente), y al final de este documento se
  aportan algunas de las muchas direcciones para consultar en la red.


  2.  Distribuciones


  Extracto de la Distributions-HOWTO sobre distintas versiones de Linux.
  Acuda a ella para ampliar informacin


  El nico elemento comn a todas las versiones Linux es su kernel -el
  ncleo del sistema operativo-, que se desarrolla de forma coordinada y
  con actualizaciones sistemticas. Sin embargo todo sistema operativo
  necesita, junto al ncleo del sistema, todo un conjunto de utilidades
  y herramientas de instalacin, configuracin y uso. Ah juegan su
  papel las diferentes distribuciones: algunos particulares, entidades y
  empresas se dedican a hacer determinadas recopilaciones de software
  que ellos mismos preparan para que sean facilmente instalables y
  configurables. Todas ellas facilitan el software junto a su cdigo
  fuente, pero la flexible licencia GNU a la que se acojen permite tanto
  ofrecerlas gratuitamente como distribuirlas por canales comerciales
  (lo que se paga es el trabajo de recopilacin, el software de cosecha
  propia que pueda aportar, una presentacin ms elaborada, gastos de
  distribucin y soporte tcnico al usuario).

  Algunas de las distribuciones ms conocidas son:



     Slackware
        Esta distribucion es quizas de las ms extendidas en todo el
        mundo y la ms conocida en Espaa, ya que es la que han
        divulgado las publicaciones del sector. Incluye con creces todo
        el software que cualquier usuario medio o avanzado pueda
        necesitar, y su mtodo de instalacin es asequible aunque lejos
        de las tpicas y vistosas instalaciones a las que el usuario
        nefito esta acostumbrado en los sistemas comerciales.  Tiene
        diversos derivados comercializados bajo diferentes nombres (por
        ej. "Slackware Pro") que mejoran la instalacin e incluyen
        manuales y bibliografa en un nico lote. Esta en todos los FTPs
        principales, siendo  <http://www.cdrom.com/> su distribuidor de
        origen.


     Red Hat
        Creada por Red Hat Software, en Connecticut, EE.UU. Una de sus
        ventajas es el atractivo sistema de instalacin (en modo
        grfico) y el cmodo mantenimiento de componentes de software,
        lo que facilita enormemente las tan frecuentes actualizaciones.
        Se puede obtener tanto gratuitamente en la red como adquiriendo
        el CDROM correspondiente. Otras empresas comercializan tambin
        sistemas basados en Red Hat, como Caldera Inc. y Pacific Hi-
        Tech. An poco conocida en Espaa pero pujante, sobre todo para
        principiantes. Sus creadores estan en  <http://www.redhat.com>.
        El mencionado sistema de gestin de componentes de software es
        obra suya, pero lo han ofrecido con carcter abierto y gratuito
        a los dems desarrolladores bajo la licencia de GNU, por lo que
        es previsible que en el futuro otros muchos asuman este sistema
        en sus propias distribuciones, lo que facilitar enormemente las
        actualizaciones.


     Debian
        La Free Software Fundation (FSF) es bien conocida entre los
        acrrimos usuarios de software gratuito para Unix. Son los
        creadores del sistema GNU, su futuro Unix gratuito. Ya hay mucho
        material pero no un sistema operativo completo, asi que mientras
        tanto ofrecen un Unix integrado por el nucleo de Linux y el
        software de GNU.  <http://www.debian.org>.



  3.  Ayuda a la instalacin de la distribucin Slackware


  Este es un extracto de la Installation-HOWTO, orientada
  fundamentalmente a la instalacin de Linux Slackware. Mucha de la
  informacin sobre instalacion de Slackware es aplicable a cualquier
  versin de Linux, pero no necesariamente al pie de la letra.

  Aparte de otras muchas variantes que se puedan considerar, a la hora
  de instalar Linux en nuestro disco duro hay bsicamente dos formas:
  UMSDOS y Particin nativa. Cada una tiene sus ventajas e
  inconvenientes, pero como se ver es recomendable que todos los
  usuarios terminen usando el segundo mtodo ya que es el ms eficiente
  y el que mejor aprovecha las ventajas de Linux.


  3.1.  Instalacin con UMSDOS


  Consiste en aprovechar el espacio de disco que queda libre en los PCs
  con MSDOS, sin necesidad de tocar las particiones de disco. Linux es
  un sistema operativo, y como tal totalmente independiente, no
  requiriendo por tanto ningun otro sistema operativo en su ordenador
  (aunque puede convivir perfectamente con ellos). Sin embargo es un
  parque muy amplio el de usuarios que ya tienen instalado MSDOS y/o MS-
  Windows y que, al no considerase expertos, no se atreven en un primer
  momento a reparticionar el disco para sustituir total o parcialmente a
  su sistema actual. Para ellos, o simplemente para quien quiera ver y
  probar Linux sin ser tan drasticos formateando discos duros, la
  solucin es UMSDOS. Permite crear, a partir de un directorio de MSDOS,
  toda la estructura que tendra un disco nativo de Linux. Cuando
  arranque el sistema, Linux emular su disco a partir de la informacin
  en ese directorio. Es totalmente funcional, pero puede ser ligeramente
  ms lento en ordenadores de gama media-baja y no aprovecha la gestin
  de disco nativo. Una gran ventaja es que si se libera disco en Linux,
  implcitamente estamos creando espacio que ser aprovechable cuando
  arranquemos MSDOS, y viceversa. Adems, el da que queramos
  deshacernos de Linux (poco probable!) o que simplemente nos decidamos
  a hacer una instalacin completa, desinstalar ese Linux es tan
  sencillo como simplemente borrar sin contemplaciones el directorio
  C:\LINUX que cre desde MSDOS.


  3.2.  Instalacin en particin nativa de Linux.


  Salvo la fase inicial en la que se preparan las particiones nativas o
  el UMSDOS, el procedimiento restante de instalacin es bsicamente el
  mismo.  Ya que puede ser el que provoque ms dudas, centraremos estos
  consejos de instalacin en la instalacin con particin nativa. Pero
  recuerde que


  ______________________________________________________________________
     ESTO NO ES UNA GUIA DE INSTALACION, SINO UN COMPLEMENTO A LAS
     INTRUCCIONES DE INSTALACION DE SU VERSION DE LINUX.

     LEA LA INSTALLATION-HOWTO Y/O EL MANUAL QUE ACOMPAA A SU DISTRIBUCION
     ANTES DE COMENZAR, O DE LO CONTRARIO PUEDE FALLAR LA INSTALACION E
     INCLUSO INUTILIZAR EL SOFTWARE QUE PUEDA TENER YA INSTALADO EN SU
     ORDENADOR.

     LA DISTRIBUCION TOMADA COMO BASE ES LINUX SLACKWARE 3.0. EL PROCEDIMIENTO
     PUEDE VARIAR DE UNAS VERSIONES A OTRAS. EN CASO DE DUDA ACUDA A LOS
     MANUALES DE SU SISTEMA O CONSULTE A LOS CANALES DE AYUDA Y SOPORTE LINUX
     HABITUALES (EN INTERNET O A SU DISTRIBUIDOR)

     LOS AUTORES DE ESTA DOCUMENTACION NO SE RESPONSABILIZAN DE LOS POSIBLES
     DESASTRES QUE PUEDA OCASIONAR. SI DECIDE CONTINUAR ES BAJO SU EXCLUSIVA
     RESPONSABILIDAD. (Nos gusta dormir tranquilos ;^) )
  ______________________________________________________________________



  3.2.1.  Preliminares


  En esta instalacin es necesario que LINUX disponga de una particin
  distinta a la de MSDOS para trabajar. Si ya tiene algn sistema
  instalado, lo ms frecuente es que sea una nica particin DOS que
  ocupe todo el disco, por lo que reparticionar supone eliminar esa
  particin para volver a crearla asignndole menos disco para hacer
  sitio a Linux (o para drselo totalmente, segn la instalacin
  escogida). Eso supone perder como norma general todos los datos en las
  particiones ya existentes.

  Existe, sin embargo, una utilidad anexa a Linux que corre sobre MSDOS
  y que permite "encoger" una particin de DOS siempre que la unidad
  tenga espacio libre y haya sido totalmente defragmentada (con la
  utilidad "DEFRAG" de MSDOS 6.x o similares). Esto le permitir crear
  nuevas particiones conservando sus datos en la particin MSDOS actual.
  Esta utilidad se llama "fips" y la encontrar en su servidor habitual
  en la red junto a otras utilidades de MSDOS para ayudar a la
  instalacin de Linux.

  LEA LA DOCUMENTACION DE FIPS ANTES DE UTILIZARLO.

  Primero debe liberar en MSDOS el espacio que pretenda reservar para la
  nueva particin de Linux (y para el espacio de swap, como despus se
  comentar). Despus debe defragmentar la particin de DOS con la
  utilidad "defrag" que acompaa a las ltimas versiones de DOS, o bien
  sus equivalentes de PCTools o Norton. Ahora puede correr el programa
  fips y crear una nueva particin con el espacio liberado. Lo habitual
  ser crear dos particiones: una Linux native para el sistema, y una
  Linux swap con por ej. el doble que de RAM, pero en caso de necesidad
  incluso puede ahorrarse una particin especfica para swap, y "robar"
  ese espacio de disco bien a MSDOS o al propio Linux.


  3.2.2.  Formateo de la particin.

  Una vez aadida la nueva particin que destinaremos a Linux, hay que
  preparar la siguiente etapa, el arranque de Linux, ya que salvo el
  apartado anterior en el que salvaguardamos la instalacin previa de
  MSDOS, toda la instalacin se har desde el propio Linux. Para
  arrancar necesitaremos dos disquetes (en algunas distribuciones como
  RedHat pueden ser tres), donde grabaremos tanto el ncleo del sistema
  operativo como los primeros programas con los que poder empezar a
  instalar. El primer disquete es el que etiquetaremos como "boot disk",
  y es donde ir el ncleo del sistema con el que arrancar. Como Linux
  es casi un sistema "a la carta", que puede llevar en el ncleo ms o
  menos funcionalidades segn nuestras necesidades, deberemos escoger
  entre los ncleos precompilados aquel que se adapte mejor a nuestro
  caso. En el futuro ser recomendable que incluso recompilemos nuestro
  propio ncleo para personalizarlo an ms, aadir lo que falte y
  simplificar lo que sobre en nuestro caso. El siguiente disquete es el
  "root disk" o "ramdisk", que incluye el software mnimo que cargaremos
  en memoria para la instalacin.

  En la distribucin de Linux tendremos una serie de ficheros que
  constituyen "imgenes" de esos disquetes. Es decir, una vez elegidas
  qu diquetes necesitaremos, los crearemos a partir de esas imgenes,
  bien desde otro sistema Linux ya funcionando (o incluso de cualquier
  Unix en general), bien desde MSDOS con otra utilidad complementaria de
  "fips": "rawrite".

  Una vez hecho esto ya puedes arrancar con tus discos. Introduce el
  "boot disk", arranca el ordenador y sigue sus instrucciones. Cuando
  finalice la fase de arranque Slackware te ofrecer un smbolo para
  hacer "login" (entrar en el sistema), mientras que RedHat arrancar
  directamente la aplicacin de instalacin. Utiliza el nombre "root"
  como nombre de usuario (es el super-usuario que administra el
  sistema). La primera vez no necesitars clave alguna para entrar.

  Ya estas en el prompt de Linux, desde donde puedes crear tus
  particiones y tu espacio de swap (es una zona especial de disco que
  Linux usa como memoria virtual que complementa a la memoria RAM del
  ordenador). Al igual que en MSDOS, el comando para gestionar
  particiones se llama "fdisk". En algunas versiones hay tambin una
  "cfdisk" con un interfaz ms asequible, aunque iguales en lo bsico.

  Si posees una particin de MSDOS, no te asustes, sigue adelante, no la
  vas a perder simplemente por entrar en fdisk, pero s que debes tener
  precaucin al aadir la particin linux sobre el espacio que le
  habamos quitado a MSDOS, para no afectar a ste.

  Dentro de fdisk usa la opcin 'n' para aadir nuevas particiones.
  Dalas de alta como particiones primarias (si ya tienes una particion
  de arranque con MSDOS, sta ser la particin 1 y a partir de ah
  aadirs particiones Linux).  Es ahora el momento de aadir el espacio
  de swap, conveniente siempre, e incluso imprescindible si se dispone
  de memoria igual o inferior a 8Mb. Como regla orientativa puede servir
  tener el doble de swap que RAM (para 8Mb o menos de RAM), y 1.5 veces
  para memorias superiores, pero depende de la disponibilidad de disco y
  de memoria que tengamos, as como del uso que le vayamos a dar. En
  realidad ser tu experiencia la que te ir diciendo en sucesivas
  instalaciones cunto swap necesitas. En caso de disponer de ms de un
  disco duro es muy recomendable tener separadas las particiones de
  linux y de swap (por ej. DOS+swap en uno y linux en el otro), lo que
  mejorar el rendimiento global.

  Una vez creadas las particiones, hay que definir tambin en fdisk el
  uso que van a tener (tipo de particin), siendo obviamente "linux swap
  partition" (tipo 83) para el swap, y "Linux native partition" para el
  propio linux. Al final, y siguiendo con este ejemplo, tendrs tres
  particiones definidas:


    MSDOS, marcada como "activa", con el arranque.

    Linux swap.

    Linux Native, donde residir el linux.

  NO TENGAS MIEDO POR TOCAR Y PROBAR: HASTA QUE NO USES LA OPCION DE
  ESCRIBIR A DISCO, PUEDES HACER TODO TIPO DE PRUEBAS Y/O CANCELARLO
  TODO HASTA ESTAR SEGURO Y GRABAR LA NUEVA TABLA DE PARTICIONES.

  Es probable que haya que rearrancar si modificamos las particiones, y
  continuar con el software de instalacin de nuestro Linux. En el caso
  de Slackware, ese software de instalacin ya necesita al menos 8Mb de
  memoria, por lo que si estamos justos de memoria tendremos que activar
  ya mismo el swap antes de ejecutarlo. Si ese es el caso, hay que
  hacerlo en dos pasos: formatear la particin de swap y luego activarla
  para que empiece a complementar la RAM. Los comandos seran


  ______________________________________________________________________
    mkswap -c /dev/hdXX
    swapon /dev/hdXX
  ______________________________________________________________________



  donde /dev/hdXX sera el nombre de la particin que hemos definido
  como swap. Una vez hecho esto, Slackware ya aporta una utilidad de
  instalacin que detectar las particiones creadas y proceder con el
  resto de la instalacin con la aplicacin "setup", que nos guiar
  durante toda la instalacin con un sencillo interfaz de mens, que no
  requiere muchas explicaciones. Durante una de las etapas de la
  instalacin Setup intentar preparar el swap. Si lo hemos hecho ya a
  mano habr que indicarle que se lo salte, mientras que en el resto de
  los casos dejaremos que setup haga todo lo que tenga que hacer.


  3.2.3.  Instalacin de los discos.


  Slackware divide la distribucin del sistema operativo en "series"
  temticas, y a su vez cada una de ellas en directorios que se
  corresponden perfectamente con disquetes de 1.44Mb. Los discos
  esenciales seran los de la "Serie A", con los que el sistema ya es
  arrancable autnomamente desde el disco duro, aunque en la prctica
  lgicamente instalaremos tambin la "AP" (aplicaciones bsicas), "N"
  (software de red, si vamos a conectarnos con cualquier modalidad), "D"
  (compiladores y libreras), "X" y "XAP" para el entorno grfico
  XFree86.

  Por su parte RedHat organiza el software tambin en "paquetes"
  instalables de forma independiente y tambin agrupados por temas,
  aunque no sigue ningn esquema traducible en disquetes, por lo que las
  nicas vas de instalacin son CDROM o directamente de la red.


  3.2.4.  Configuracin



  Una vez cargados a disco los paquetes de software, la siguiente fase
  ser la de configuracin, que se realiza desde el mismo programa de
  setup. Como esta parte es muy variable y depende de cada caso. Nos
  centraremos en dos puntos tpicamente problematicos: el arranque del
  sistema (incluida la posibilidad de arrancar mltiples sistemas
  operativos desde distintas particiones o distintos discos) y la
  configuracin de red

  Para instalar un mtodo de arranque de Linux hay dos utilidades:
  "Lilo" y "Loadlin".  La primera es un pequeo programa que se instala
  en el "Master boot record" del disco duro o en la particin que fdisk
  marc como "activa", y que permite arrancar indistintamente Linux, DOS
  6.x, Windows95, etc. La segunda es una utilidad de MSDOS que permite
  dejar en paz los arranques de particiones, haciendo en su lugar un
  "arranque en caliente" directamente desde DOS. Ambos funcionan bien,
  por lo que elegir una u otra es cuestin de preferencias de cada cual.
  En el segundo caso podr darnos algn error si hubiera algn programa
  de DOS residente en memoria que pueda obstaculizar la carga de Linux.
  Eso es relativamente facil de solucionar jugando un poco con las
  configuraciones de DOS (incluso con los menus de arranque que
  incorpora el config.sys de MSDOS 6.x), pero incluso en ese caso
  podemos encontrarnos dos obstaculos mas: si tenemos instalado
  DoubleSpace/Drivespace hay que evitar que se cargue en memoria
  pulsando F8 durante el inicio de DOS para poder ejecutar Loadlin (no
  hay otra forma de pararlo ya que normalmente se carga incluso antes
  que config.sys), y ademas si usamos Windows95 hay que pulsar
  igualmente F8 para arrancar con solo el smbolo del sistema, evitando
  entrar en el modo grfico.

  Linux puede convivir con cualquier sistema operativo, pero unos dan
  mas dolores de cabeza que otros, por lo que en caso de duda acude a la
  documentacin correspondiente (la de instalacin de la propia
  distribucin y la Booting-HOWTO. De todas formas, si una vez instalado
  Linux no conseguimos arrancarlo (sabemos que est ah pero no
  conseguimos entrar en l), siempre queda un recurso asequible:
  introduce el "boot disk" y en vez de darle a INTRO cuando te aparezca
  un simbolo "boot", teclea root=dev/XXXX/ indicando que ya hay un Linux
  en la particin correspondiente, y que debe usarlo en vez de continuar
  con una hipottica instalacin. Lo nico diferente es que se estara
  usando el ncleo (kernel) del disquete en vez del instalado en el
  disco duro, pero a partir de ah montar la particin del disco duro y
  usar todo lo ya instalado all.

  Otro problema frecuente (solventado en la ltima version de RedHat
  pero no an en Slackware) es que graba en el disco duro un ncleo
  genrico en vez del que hayamos usado en el "boot disk", que era
  precisamente el que habamos elegido, por lo que es habitual que, si
  necesitamos algn controlador especfico para algn dispositivo o
  cualquier otra funcionalidad, cuando arranquemos directamente desde el
  disco duro ya no nos lo reconocer. Si estamos usando LILO haz lo
  siguiente para arreglarlo: entra como superusuario, copia la imagen
  que habias usado para generar el "boot disk" sobre el fichero
  "/vmlinuz" del disco duro y ejecuta "lilo" para reinstalar el arranque
  con el ncleo correcto. Si estas usando LOADLIN, simplemente dale como
  parmetro el fichero del ncleo correcto (es facil tener varios
  ncleos y elegir en cada caso el que interese). Seguir arrancando con
  el disquete como en el caso anterior sera tambin otra posibilidad
  para no perder ese CDROM, esa tarjeta, etc.


  4.  Espaolizacin  de Linux


  Uno de los aspectos ms molestos es no poder escribir con naturalidad
  en nuestro idioma por falta de soporte de los caracteres especiales en
  el software. El juego de caracteres bsico de ASCII es de 7 bits, y no
  incluye ni las vocales acentuadas ni nuestra maltratada ''.  Hay una
  norma ISO-8859-1 ( ISO-Latin1) que s que abarca todos los caracteres
  pero que sigue dando la lata en muchas tareas habituales, como el
  correo electrnico (muchos sistemas solo respetan 7 bits, por lo que
  textos que podemos ver correctamente en nuestro ordenador
  probablemente se visualizarn de forma lamentable cuando los enviemos
  a otra persona. A continuacin se mencionan algunas de las situaciones
  ms frecuentes y cmo intentar solucionarlas.


  4.1.  Consola


   ...O cmo demonios poder usar acentos en nuestro propio ordenador


  Mediante el comando loadkeys se cargan las tablas de traduccin del
  teclado.  Estas tablas traducen los cdigos que se generan al pulsar
  las teclas a los que reciben los programas. Los ficheros que contienen
  estas tablas de traduccin se encuentran en el directorio
  /usr/lib/kbd/keytables/ y el fichero que contiene el mapeado del
  teclado espaol se denomina es.map. Su objetivo es que si pulsamos una
  determinada combinacin de teclas, aparezca en pantalla el carcter
  que tenemos pintado en nuestro teclado, y no su equivalente en el
  teclado que se usa en cualquier otro pas.

  La llamada a este comando suele ser de la forma siguiente, que
  aparecer en el arranque por defecto (en Slackware estara
  en/etc/rc.d/rc.keymap):



       loadkeys /usr/lib/kbd/keytables/es.map

  Nota del autor: A igual configuracin de teclado, ms de una vez me
  han fallado los acentos por recompilar el ncleo, pero en el momento
  de escribir estas lneas an no he visto la causa...


  4.2.  Shell bash


  Para que la bash soporte el uso de vocales acentuadas asi como de la
  letra  basta con incluir las siguientes lneas en un fichero .inputrc
  (o al menos en .bash_profile) en tu $HOME:


  ______________________________________________________________________
  set meta-flag on                # conservar bit 8 en entrada de teclado
  set output-meta on      # conservar bit 8 en salida por terminal
  set convert-meta off    # no convertir secuencias de escape

  export LC_CTYPE=ISO_8859_1
  ______________________________________________________________________



  4.3.  Shell tcsh


  Para que la tcsh soporte el uso de vocales acentuadas asi como de la
  letra  basta con incluir las siguientes lneas en un fichero .tcshrc
  (o al menos en .login) en tu $HOME:


  ______________________________________________________________________
  setenv LANG C
  setenv LC_CTYPE "iso_8859_1"
  ______________________________________________________________________



  4.4.  Algunas aplicaciones


  Sera excesivamente largo detallar todas las posibilidades para
  trabajar con caracteres de 8 bits en todas las aplicaciones,
  utilidades, comandos del sistema, etc. Aqu van algunos ejemplos:


     Editor joe
        Joe tiene un parmetro -asis para que conserve los caracteres de
        8 bits.

     less
        Por defecto muestra solamente los caracteres de 7 bits (los de 8
        los representa por su cdigo ASCII). Ello protege de ver en
        pantalla "basura" si por error intentamos leer ficheros
        binarios, de datos, etc., pero impide ver nuestros acentos. Se
        puede modificar momentneamente con el modificador -r desde la
        propia utilidad, pero sera mejor tener definida la variable de
        entorno LESSCHARSET=latin1.

     ls Para que muestre los caracteres especiales en los nombres de los
        ficheros tiene las opciones -8 -N, que se pueden aadir a la
        variable LS_OPTIONS que probablemente ya tengas definida por
        defecto.

     mc Este clnico Norton tiene una opcin Full 8 bits del submen
        Display bits... bajo Options.

     nroff, groff
        Dispone de una opcin -Tlatin1


  4.5.  Xwindow


  El entorno grfico XWindow usa para configurar el teclado un comando
  llamado xmodmap que tiene la misma funcion que loadkeys para la
  consola de texto. Ernest Artiaga (drw@portos.upc.es) prepar un
  fichero de configuracion para Xmodmap que genera los acentos con la
  tecla [AltGr], que entre otros sitios puede encontrar en
  <ftp://ftp.cs.us.es/pub/Linux/contrib/Xmodmap-es>, y que podemos
  colocar como $HOME/.xmodmap para que se cargue como parte de nuestra
  configuracin. Existe tambin una utilidad
  /usr/lib/kbd/keytables/mk_modmap que genera un listado para Xmodmap a
  partir del mapa de teclado usado por loadkeys.

  De todas formas este mtodo no es perfecto, ya que muchas aplicaciones
  bajo Xwindow tienen su propia forma de configuracin o simplemente no
  tienen soporte para caracteres extendidos por lo que a veces es
  posible que podamos usar acentos en una ventana y no en la aplicacin
  de la ventana de al lado.


  4.6.  Emulador de DOS (DOSEMU)


  La linea de configuracin del teclado en /etc/dosemu.conf deber
  incluir 'layout es-latin1' para poder usar la '' y las aperturas de
  interrogacin y admiracin. Una vez hecho esto, es posible cargar la
  configuracin habitual con keyb sp desde el propio emulador de DOS, o
  bien ejecutar 'keybes2.com, una pequea utilidad para el propio
  emulador disponible en varias de las direcciones habituales.


  4.7.  Correo electrnico


  Por ltimo en relacin con el uso del espaol en Linux, pero no menos
  importante, es poder leer y recibir por mensajera electrnica textos
  escritos en espaol sin deformar su contenido ni perder los acentos y
  smbolos propios.

  El problema se reduce a lo de siempre: el uso de caracteres especiales
  no incluidos en la tipografa bsica sajona requiere trabajar con 8
  bits, pero an hay muchos sistemas que siguen trabajando con 7 bits,
  lo que trunca o deforma mensajes escritos sin las debidas
  precauciones.

  En el estndar RFC822 que define el formato usado en los mensajes de
  correo de Internet no se permite el uso de 8 bits en las cabeceras de
  los mensajes, dejando abierta la posibilidad de 8 bits en el cuerpo
  del mensaje. Pero tampoco podemos abusar de esa posibilidad ya que no
  tenemos garantas de que lo respete cualquier sistema que pueda
  recibir nuestros documentos. Una solucin cada vez ms extendida, y
  que permite a los usuarios escribir con libertad y enviar
  prcticamente cualquier informacin dejando todos esos detalles al
  software de gestin del correo (tanto los agentes de usuario como los
  agentes de transporte en los servidores de correo) es mediante el
  estandar MIME, que permite codificar nuestros mensajes de 8 bits y
  reducirlos a caracteres de 7 bits que puedan pasar a travs de
  cualquier sistema sin peligro de perder informacin. El inconveniente
  (cada vez menor a medida que este sistema se extienda ms y ms) es
  que si intentamos leer un mensaje con codificacin MIME sin un
  software que no implemente este sistema y no pueda interpretarlo,
  puede que veamos "basura" intercalada con nuestro mensaje, o que
  incluso no entendamos nada de nada.

  MIME deja toda la responsabilidad al software, por lo que si ambos
  extremos (remitente y destinatario) usan software compatible con MIME,
  el usuario puede enviar junto a textos simples cualquier combinacin
  de tipos de ficheros (documentos generados por procesadores de textos,
  grficos, sonido, video, etc). Ni siquiera es necesario que ambos usen
  el mismo software. Basta con que ambos sean capaces de generar la
  codificacin durante el envo, y de interpretarla en la recepcin.



  5.  Conectividad de Linux


  Uno de los puntos muy fuertes de Linux es su gran conectividad:
  incluso con recursos modestos en hardware puede ser un hbil servidor
  de red y convivir practicamente con cualquier configuracion que ya
  tengamos funcionando en nuestra red. A medida que mejoremos el
  equipamiento, Linux aprovechar todos los recursos convirtindose en
  un potente centro de servicios.  Si no consigo abrirte el apetito de
  curiosidad, echa un vistazo a las varias How-To sobre el tema o lo
  lamentaras... :)



  Como digno miembro de la familia Unix, el entorno nativo de red en el
  que ha nacido Linux es el TCP/IP, asi que nos moveremos en Internet y
  en las redes locales basadas en esta familia de protocolos como pez en
  el agua. Puede actuar tanto de simple cliente hasta como una potente
  estacion de trabajo de bajo coste, pasando por un XTerminal con todo
  su entorno grafico con absolutamente todo el software necesario, ya
  incluido o de ms o menos fcil instalacion.

  En el nivel fsico (cacharreo para entendernos), Linux puede
  conectarse con otros Linux o con cualquier otro sistema usando casi
  cualquier cosa: cableado serie, paralelo, modems convencionales,
  tarjetas RDSI, Frame Relay, redes locales ethernet  token ring,
  radiopaquete (AX.25 para radioaficionados), etc.

  En cuanto a protocolos de red, lo que lleva en la sangre es el
  mencionado TCP/IP, pero puede acceder (como cliente o como servidor,
  segun los casos) a redes basadas en IPX (Novell), AppleTalk
  (Macintosh) y SMB (red LanManager para conectar con Windows para
  trabajo en grupo, Windows 95 y Windows NT).  Por si sirve de pista,
  quien escribe ha hecho ya la prueba de poner un simple PC de gama
  media como nodo principal para dar servicios de disco, impresoras y,
  sobre todo, acceso a Internet a una LAN ethernet de 75 puestos de
  trabajo que usan indistintamente cualquiera de los mencionados
  protocolos compartiendo indistintamente sus recursos. Y lo mejor de
  todo es que nadie fue capaz de distinguir desde sus respectivos
  puestos a Linux del servidor propio que les atenda hasta entonces. De
  hecho lleva varios meses en uso ininterrumpido y slo Linux ha sido
  capaz de hacer simultneamente de servidor para usuarios Unix, Windows
  3.11, Windows 95, NT, DOS, Netware y Mac sin colgarse ni una sola vez
  y con un coste ridculo. Nadie me garantiza que nunca me vaya a
  fallar, pero lo doy por modesta pero absolutamente victorioso en
  comparacin con sistemas comerciales tericamente superiores y con un
  coste mucho mayor.

  Otra situacin en la que actualmente uso Linux es como servidor de
  Web, mail, FTP annimo (de servicio pblico a la red) y servicios de
  salida a Internet para una red local de 2.100 usuarios, tambin con
  muy buenos resultados a pesar de la fuerte carga de trabajo contnuo
  las 24 horas.


  5.1.  Conectividad casera


  Algunas de las situaciones tpicas en las que se puede aprovechar la
  capacidad de trabajo en red de Linux podran ser:


  5.2.  Servidor de terminales


  Quin no tiene en casa un PC (o algo peor) que se ha quedado antiguo
  pero que an funciona? Cualquier ordenador con un puerto serie y algun
  software de emulacin de terminal puede conectarse a un Linux,
  permitiendo varios usuarios trabajando simultaneamente. Para quien no
  lo haya hecho alguna vez, es la forma ms simple de comprobar por s
  mismo que Linux es un sistema 100% multiusuario y multitarea. Todos
  los recursos de memoria, disco, etc.  estarn a la vez disponibles
  para compartirlos entre tantos usuarios como puertos serie tengamos.


  5.3.  Red PPP


  Enlazando ordenadores por puertas serie, paralelo, modems, etc, es
  posible no solamente que un Linux sea el ordenador principal y otros
  usuarios accedan a travs de simples terminales, sino que es posible
  aprovechar la capacidad de todos los equipos sumando recursos.  Desde
  un equipo se puede acceder a impresoras, discos, etc. de cualquier
  otro equipo. El protocolo PPP permite crear una red TCP/IP entre todos
  ellos, usando como enlace tanto modems como simples cables. A medida
  que cambiemos la red fsica por algo mas "decente" como una LAN
  ethernet o anlogo, mejorarn las prestaciones como es lgico, pero la
  idea es la misma y el software de usuario son idnticos (lo que vara,
  claro esta, es la configuracin del propio sistema operativo).


  5.4.  Servidor de modems


  Combinando los dos apartados anteriores, podemos unir la capacidad de
  servidor de puertos serie (a los que conectaremos modems) y el
  protocolo PPP (para dar a esas lneas serie la funcionalidad del
  TCP/IP). As podemos dar servicio de acceso a Internet a los usuarios
  que se nos conecten por telfono.


  5.5.  Conexion directa a Internet


  Ciertamente no es lo normal en casa, pero es relativamente frecuente
  encontrarlo en universidades y de un tiempo para ac tambin es
  habitual en empresas. Si tenemos una red local enganchada a su vez a
  un proveedor (acadmico o comercial), entonces una simple tarjeta de
  red y una simple configuracin del sistema sern suficientes para
  conectar Linux, que actuar como un ordenador Unix cualquiera, con
  todas sus ventajas. De hecho en la red encontraremos ms de un
  servidor que esconde un Linux en sus "entraas", o que precisamente
  quien nos est haciendo de proveedor de acceso sea un Linux. Pero hay
  que tener en cuenta tambien sus inconvenientes de seguridad: igual que
  podemos conectarnos desde Linux, es perfectamente posible que se
  conecten a nosotros inadvertidamente, por lo que, salvo que
  necesitemos mantener abierto algun servicio en particular, es
  recomendable cerrar "todas las ventanas" para evitar problemas.
  Algunos buenos consejos para un Linux de uso personal seran:


    Crea cuentas para los usuarios que realmente vayan a usarlo, y
     asgnales claves dificilmente adivinables (no hace falta
     complicarse la vida con claves imposibles, pero tampoco debes
     ponrselo fcil a los intrusos)

    Hazte cargo de la clave del administrador root y procura mantenerla
     a salvo. Si la facilitas a alguien ms, mentalzale para que la use
     con precaucin (por otra parte tambin es una forma de aprender
     nociones bsicas de administracin de sistemas...)

    Ponte como root, edita /etc/inetd.conf y ponle un signo de
     comentario (#) a todas las lineas excepto aquellas que abran
     servicios que necesites mantener accesibles; luego haz "killall -1
     inetd". No te cortes y cierralo todo, que siempre estaras a tiempo
     de reabrir aisladamente aquello que eches en falta

    Aunque te consideres muy capaz de administrar un sistema de este
     tipo, no tengas la mala costumbre de usar root como usuario
     habitual con el que te conectes al sistema, o en caso de despiste
     podras provocar algun destrozo.  Es mas seguro que entres como un
     usuario "raso" y uses su - root cuando necesites hacer alguna
     operacion concreta como super-usuario (recuerda usar exit para
     volver a tu status normal cuando termines lo que tenas que hacer
     como super-usuario)

    El sistema va dejando muchos mensajes registrando la actividad de
     los usuarios y del propio sistema en mltiples ficheros de
     contabilidad. Muchos de ellos se centralizan a traves del servicio
     syslogd. En cuanto empieces a desenvolverte un poco con el manual y
     los comandos bsicos para moverte por el sistema, aprende a recoger
     la informacin que genere ese servicio, eliminar la intil, revisar
     la til y limpiar la contabilidad de vez en cuando (de lo contrario
     te puedes dar un susto cuando veas ficheros gigantescos que devoran
     espacio de disco con informacin desfasada despues de tanto tiempo)


  5.6.  Infova: acceso a Internet desde casa



  5.6.1.  Qu es infova?


  Infova es una red creada por Telefnica a la que los usuarios acceden
  desde cualquier punto de la red telefnica espaola a precio de
  llamada local. Funciona como una intranet (una red basada en los
  mismos protocolos que Internet, pero independiente y sin integrarse en
  ella). No tiene por tanto acceso directo a Internet, pero es un buen
  intermediario ya que abarata costes tanto para el usuario como para el
  proveedor de acceso a internet, que aprovecha su infraestructura sin
  tener que invertir en una red propia.  En este sentido es una va
  interesante de acceso, pero para evitar confusiones hay que tener
  presente que Infova NO es Internet, sino un producto comercial de
  Telefnica. An despues de habernos conectado a Infova seguimos
  necesitando un proveedor de acceso a Internet para estar
  verdaderamente conectados a la red de redes.

  Al funcionar igual que Internet (el software de Infova no es ms que
  un PPP y un navegador de web, que utiliza como interfaz de usuario) es
  perfectamente posible usar Linux para conectarse, pero surge el
  problema tpico de configuracin: Telefnica facilita su software
  gratuito para entornos comerciales tpicos (Windows 3.11, Windows95 y
  Macintosh) que Linux no necesita (ya lo tiene). Pero Linux lo que
  necesita es conocer la configuracion de su red, para poder integrarse
  en ella.


  5.6.2.  Como conectar entonces?


  El software bsico es el pppd, que a travs del modem crear un enlace
  TCP/IP entre nuestro ordenador e Infovia. Una vez creado, podremos
  contactar con nuestro "verdadero" proveedor, quien nos abrir las
  puertas a Internet, y a partir de ese momento ya podremos usar
  cualquiera de nuestras propias aplicaciones habituales desde Linux.
  Como complemento de pppd usaremos una utilidad chat que se encargara
  de dialogar via modem con el ordenador remoto al comienzo de la
  llamada, mientras se establece la conexin. Tambin intervendrn
  varios ficheros de configuracin (unos genricos de Linux para
  cualquier conexin TCP/IP, otros caractersticos de las conexiones a
  travs de PPP y modem, y por ltimo alguno que usemos en el caso
  concreto de Infova). Un detalle sobre versiones de software: un
  inconveniente en la evolucin de Linux ha sido un cambio en la
  implementacin del PPP que hace incompatible algunos pppd con algunas
  versiones del kernel. Si nuestro ncleo est entre 1.2.13 y 1.3.95
  debemos usar un pppd 2.1.2d o superior, mientras que necesitaremos un
  pppd 2.2.0e o superior para los ncleos ms recientes.

  El listado siguiente es un ejemplo del fichero principal de
  configuracin de pppd, en el que a su vez se hace referencia a varios
  ficheros que deberemos crear: identificacin y clave facilitada por el
  proveedor de acceso, el guin de inicio de conexin, y el de cierre y
  cuelgue del modem. /dev/modem es un enlace (un "symbolic link") que
  usaremos como nombre genrico para el modem, y que debe apuntar al
  nombre del dispositivo real en el que lo tengamos conectado.

  /etc/ppp/options:

  ______________________________________________________________________
    modem passive crtscts noipdefault defaultroute
    lock lcp-echo-interval 15 lcp-echo-failure 5 mtu 1500
    +ua /etc/ppp/infovia.pass
    connect "/usr/sbin/chat -v -f /etc/ppp/infovia.chat"
    disconnect "/usr/sbin/chat -v -f /etc/ppp/infovia-off.chat"
    /dev/modem 38400
  ______________________________________________________________________



  /etc/ppp/infovia.pass es un fichero con simplemente dos lneas, una
  con el login (identificacin de usuario) y otra con la clave. Para
  acceder a Internet deberemos introducir en ambos casos lo que indique
  el proveedor, mientras que si slo vamos a navegar por Infova (sin
  salir a Internet) es suficiente con poner infovia como usuario
  genrico e infovia como clave.

  /etc/ppp/infovia.chat contiene el guin que utilizar chat en su
  dilogo con el modem. Un ejemplo de su contenido podra ser:



  ______________________________________________________________________
    TIMEOUT 6
    ABORT '\nBUSY\r'
    ABORT '\nNO ANSWER\r'
    ABORT '\nNO CARRIER\r'
    ABORT '\nRING\r\n\r\RING\r'
    ABORT '\nNO DIALTONE\r'
    ''    ATDP055
    'CONNECT'
  ______________________________________________________________________



  En el ejemplo anterior se usa marcacin por pulsos. Si fuera por tonos
  sustituir ATDP por ATDT. Adems, si al nmero 055 de llamada a Infova
  hubiera que aadir algn prefijo de centralita o cualquier otra
  marcacin especial, no hay ms que incluirlo en el listado. Por su
  parte el de cierre de conexin y reseteo del modem sera algo as:

  /etc/ppp/infovia-off.chat:

  ______________________________________________________________________
    TIMEOUT 3
    ''    '\r'
    '\r'  '+++\c'
    '\r'  ATH0
    OK    ATH0
    OK
  ______________________________________________________________________



  6.  Direcciones tiles



  6.1.  Direcciones electrnicas

  Esta seccion es la que previsiblemente cambiara con mas frecuencia,
  dado el fuerte auge de Linux y la consiguiente mayor disponibilidad de
  material para Linux en castellano. Esto es solo un ejemplo para
  empezar en esta primera edicion...


  6.1.1.  WWW



     Linux/Espaa <http://www.cs.us.es/archive/linux.html>
        En Sevilla, el servidor ms veterano, con mirrors de LDP/WWW,
        Slackware, Sunsite, Linux/PPC (la sede para Europa de
        linuxppc.org), MkLinux (Linux para Powermac), RedHat (para PC y
        Alpha), etc.

     Grupo de Usuarios de Informtica <http://luna.gui.uva.es>
        En Valladolid, con mirrors de LDP/WWW, Slackware, Sunsite y
        manuales traducidos.

     Pgina de Juan Jos Amor
        <http://lml.ls.fi.upm.es/~jjamor/linux/LDP/>
        En Madrid, traducciones de las How-To.

     Linux Spanish Manpages <http://www.infodrom.north.de/linux/man
        pages-es/>
        Traduccin del manual del sistema.
  6.1.2.  FTP Anonimo



  6.1.3.  Grupos de noticias



  6.1.4.  Listas de correo


  Aparte de las numerossimas listas de correo en ingls (desde las ms
  genricas hasta las ms especializadas en temas muy concretos), en
  Espaa hay actualmente dos listas dedicadas a Linux en general:


    linux@hades.udg.es <mailto:linux@hades.udg.es> en Girona.  Persona
     de contacto para mas informacin: Paco Culebras Amigo
     paco@hades.udg.es <mailto:paco@hades.udg.es>

    l-linux@cic.teleco.ulpgc.es <mailto:l-linux@cic.teleco.ulpgc.es> en
     la escuela de Teleco en Las Palmas.


  6.1.5.  En Fidonet


  Si Internet te queda muy lejos pero lo tuyo es Fidonet, entonces
  probablemente ya sabrs que existe un area R34.LINUX con bastante
  actividad (es una de las areas ms animadas! ;^) Mucha de la
  informacin distribuida en Internet tiene su rplica en Fidonet,
  adems del valioso soporte mtuo entre los propios usuarios.


    Europa III 2:346/207

    Elektra 2:345/422 (+34)(5) 416 4934

    La Voix 2:345/410 (+34)(5) 427 5321


  6.2.  Direcciones de Firmas comerciales


  Poco a poco va creciendo el numero de empresas que prestan atencion al
  pujante Linux y desarrollan aplicaciones, ofrecen soporte tecnico y/o
  venden algunas de las distribuciones en CDROM que se mencionaban
  anteriormente.


     En Madrid

       ABC Analog (91) 634 20 00

       Sertec Informatica (91) 364 23 88

     En Barcelona

       CD-Ware (93) 302 04 35

     En Bilbao

       Kender <http://www.kender.es> (94) 476 19 22

     En Valencia

       Encis-Net <http://www.encis.es> (96) 351 25 88


  6.3.  Bibliografa.


    Linux Edicin Especial, por Jack Tackett, David Gunter y Lance
     Brown.  Editado por Prentice Hall Hispanoamericana, 1996. ISBN
     968-880-580-7.  Incluye un CD con Slackware 2.20.

    The Linux programmer's guide, por Sven Goldt, Sven van der Meer,
     Scott Burkett, Matt Welsh.


  7.  Copyright


  Copyright (c) Gonzalo Garca-Agull <mailto:Gonzalo.Garcia-
  Agullo@jrc.es> 1996.  Elaborado a partir de experiencia propia y de
  informacin recopilada a travs de Internet. Vayan mis agradecimientos
  para Paco Culebras Amigo <mailto:paco@hades.udg.es> y Antonio L.
  Delgado Gonzalez <mailto:Antonio-Luis.Delgado@cs.us.es>, buenos
  linuxeros alla donde los haya.

  Este documento se publica bajo la Licencia General GNU, lo que permite
  su libre distribucin gratuita siempre que se conserve en su
  integridad y se retenga el copyright original.



F SPANISH-.;1                       	Spanish-HOWTO
F THAI-HOW.;1                       	Thai-HOWTO
  The Linux Thai HOWTO
  Poonlap Veeratanabutr, poon-v@fedu.uec.ac.jp
  v0.4, 4 August 1998

  This document describes how to use Thai language with Linux. This will
  cover setting Thai fonts, Thai keyboard and some Thai applications.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. Thai Input and Output

     2.1 Linux console
        2.1.1 Thai fonts
        2.1.2 Keyboard layout
     2.2 X Window system
        2.2.1 Thai fonts
           2.2.1.1 Installing Thai fonts
        2.2.2 Thai keyboard layout There are two ways to map Thai keyboard on X window, using X Keyboard Extension (XKB) and using
           2.2.2.1 XKB and Thai keyboard layout.
           2.2.2.2 Thai keyboard layout with xmodmap

  3. Applications with Thai language

     3.1 Some X applications and Thai language
        3.1.1 txterm
        3.1.2 Emacs, Mule
        3.1.3 vi
        3.1.4 pine
        3.1.5 Netscape
        3.1.6 Ss, Simple thai word Separator
        3.1.7 Xzthai, X keyboard configurator + simple editor
     3.2 Printing Thai document
        3.2.1 Latex and Thai language
        3.2.2 Latex's configuration for Thai language
        3.2.3 Use Thai
        3.2.4 Editing
     3.3 X Application Resources
     3.4 Thai Extension for Linux (TE)

  4. References and FTP sites

     4.1 Other documents of relevance
     4.2 Thai related stuffs
     4.3 FTP and Web sites

  5. Acknowledgments and Copyright



  ______________________________________________________________________

  1.  Introduction

  It's about one year that I didn't update this document. There were a
  lot of movement in Thai computing and using Linux in Thailand. For
  example, Linux boxes are used as server in many schools in Thailand
  <http://www.school.net.th>.

  The purpose of this document is to show how to set your Linux to use
  Thai language. I use Linux RedHat 5.0 as I wrote this document, so
  directories which I mention in this document may be different from
  other distribution.
  First I would like to talk about Thai standard character set. Thai
  standard character set is TIS-620. There are also other Thai standard
  character sets such as ISO-IR-166, CP874, etc. Please see
  http://www.inet.co.th/cyberclub/trin/thairef/
  <http://www.inet.co.th/cyberclub/trin/thairef/> for further
  information about Thai standard character set.  TIS-620 is 8-bit
  character set. It has the same range as ISO-8859-1, so we can use
  apllications that support ISO-8859-1 character set also. Although we
  can use Thai language with apllications that support ISO-8859-1
  character set, but it does not mean those applications support Thai
  language.

  Thai characters are different from English characters.  There is a
  variation of position, normal position, character can be on other
  character, character can be under other character. There is no space
  between words. These are some problems in developing Thai supported
  application.

  You can find the lastest version of Thai-HOWTO document from
  http://www.fedu.uec.ac.jp/ZzzThai/Linux
  <http://www.fedu.uec.ac.jp/ZzzThai/Linux>.  Your comment is welcome.



  2.  Thai Input and Output

  2.1.  Linux console

  Thai characters do not display properly in Linux console. If you
  mainly use X window, you may pass this section.

  2.1.1.  Thai fonts

  You can obtain Linux Thai console fonts which created by Mr. Phaisarn
  Techajaruwong from ZzzThai ftp site
  <ftp://ftp.fedu.uec.ac.jp/pub/thai/UEC/ZzzThai/Sofware/Linux/fonts/console>

  For example, there is a font name "phaisarn.psf". Put it in
  /usr/lib/kbd/consolefonts/ directory. Then, you can load the new font
  from Linux console by command


       %setfont phaisarn.psf



  2.1.2.  Keyboard layout

  You can set keyboard behavior as you like by using loadkeys command.
  Usually, you use loadkeys to load the file located in
  /usr/lib/kbd/keytables. You can create a US/Thai keyboard-map file and
  save it in this directory. Here is a sample.



  keycode   0 =
  keycode   1 = Escape           Escape
          alt     keycode   1 = Meta_Escape
  keycode   2 = +one              exclam          +0x0e5          plus
          alt     keycode   2 = Meta_one
          alt shift keycode 2 = Meta_exclam
  keycode   3 = +two              at              +slash          0x0f1
          control keycode   3 = nul
          control shift keycode 3 = nul
          alt     keycode   3 = Meta_two
          alt shift keycode 3 = Meta_at
  keycode   4 = +three            numbersign      +underscore     0x0f2
          control keycode   4 = Escape
          alt     keycode   4 = Meta_three
          alt shift keycode 4 = Meta_numbersign
  keycode   5 = +four             dollar          +0x0c0          0x0f3
          control keycode   5 = Control_backslash
          alt     keycode   5 = Meta_four
          alt shift keycode 5 = Meta_dollar
  keycode   6 = +five             percent         +0x0b6          0x0f4
          control keycode   6 = Control_bracketright
          alt     keycode   6 = Meta_five
          alt shift keycode 6 = Meta_percent
  keycode   7 = +six              asciicircum     +0x0d8          0x0d9
          control keycode   7 = Control_asciicircum
          alt     keycode   7 = Meta_six
          alt shift keycode 7 = Meta_asciicircum
  keycode   8 = +seven            ampersand       +0x0d6          0x0df
          control keycode   8 = Control_underscore
          alt     keycode   8 = Meta_seven
  keycode   9 = +eight            asterisk        +0x0a4          0x0f5
          control keycode   9 = Delete
          alt     keycode   9 = Meta_eight
  keycode  10 = +nine             parenleft       +0x0b5          0x0d6
          alt     keycode  10 = Meta_nine
  keycode  11 = +zero             parenright      +0x0a8          0x0f7
          alt     keycode  11 = Meta_zero
  keycode  12 = +minus            underscore      +0x0a2          0x0f8
          control keycode  12 = Control_underscore
          control shift keycode 12 = Control_underscore
          alt     keycode  12 = Meta_minus
  keycode  13 = +equal            plus            +0x0aa          0x0f9
          alt     keycode  13 = Meta_equal
  keycode  14 = Delete           Delete           Delete          Delete
          alt     keycode  14 = Meta_Delete
  keycode  15 = Tab              Tab              Tab             Tab
          alt     keycode  15 = Meta_Tab
  keycode  16 = +q        Q       +0x0e6          0x0f0
  keycode  17 = +w        W       +0x0e4          quotedbl
  keycode  18 = +e        E       +0x0d3          0x0ae
  keycode  19 = +r        R       +0x0be          0x0b1
  keycode  20 = +t        T       +0x0d0          0x0b8
  keycode  21 = +y        Y       +0x0d1          0x0ed
  keycode  22 = +u        U       +0x0d5          0x0ea
  keycode  23 = +i        I       +0x0c3          0x0b3
  keycode  24 = +o        O       +0x0b9          0x0cf
  keycode  25 = +p        P       +0x0c2          0x0ad
  keycode  26 = +bracketleft      braceleft       +0x0ba          0x0b0
          control keycode  26 = Escape
          alt     keycode  26 = Meta_bracketleft
          alt shift keycode 26 = Meta_braceleft
  keycode  27 = +bracketright     braceright      +0x0c5          comma
          control keycode  27 = Control_bracketright
          alt     keycode  27 = Meta_bracketright
          alt shift keycode 27 = Meta_braceright
  keycode  28 = Return            Return          Return          Return
          alt     keycode  28 = 0x080d
  keycode  29 = Control           Control         Control         Control
  keycode  30 = +a        A       +0x0bf          0x0c4
  keycode  31 = +s        S       +0x0cb          0x0a6
  keycode  32 = +d        D       +0x0a1          0x0af
  keycode  33 = +f        F       +0x0b4          0x0e2
  keycode  34 = +g        G       +0x0e0          0x0ac
  keycode  35 = +h        H       +0x0e9          0x0e7
  keycode  36 = +j        J       +0x0e8          0x0eb
  keycode  37 = +k        K       +0x0d2          0x0c9
  keycode  38 = +l        L       +0x0ca          0x0c8
  keycode  39 = +semicolon        colon           +0x0c7          0x0ab
          alt     keycode  39 = Meta_semicolon
  keycode  40 = +apostrophe       quotedbl        +0x0a7          period
          control keycode  40 = Control_g
          alt     keycode  40 = Meta_apostrophe
  keycode  41 = +grave            asciitilde      +minus          percent
          control keycode  41 = nul
          alt     keycode  41 = Meta_grave
  keycode  42 = Shift            Shift            Shift           Shift
  keycode  43 = +backslash        bar             +0x0a3          0x0a5
          control keycode  43 = Control_backslash
          alt     keycode  43 = Meta_backslash
          alt shift keycode 43 = Meta_bar
  keycode  44 = +z        Z       +0x0bc          parenleft
  keycode  45 = +x        X       +0x0bb          parenright
  keycode  46 = +c        C       +0x0e1          0x0a9
  keycode  47 = +v        V       +0x0cd          0x0ce
  keycode  48 = +b        B       +0x0d4          0x0da
  keycode  49 = +n        N       +0x0d7          0x0ec
  keycode  50 = +m        M       +0x0b7          question
  keycode  51 = +comma    less    +0x0c1          0x0b2
          alt     keycode  51 = Meta_comma
          alt shift keycode 51 = Meta_less
  keycode  52 = +period           greater         +0x0e3          0x0cc
          alt     keycode  52 = Meta_period
          alt shift keycode 52 = Meta_greater
  keycode  53 = +slash            question        +0x0bd          0x0c6
          control keycode  53 = Delete
          alt     keycode  53 = Meta_slash
  keycode  54 = Shift            Shift            Shift           Shift
  keycode  55 = KP_Multiply
  keycode  56 = Alt              Alt              Alt             Alt
  keycode  57 = space            space            space           space
          control keycode  57 = nul
          alt     keycode  57 = Meta_space
  keycode  58 = Caps_Lock        Caps_Lock        Caps_Lock       Caps_Lock
  keycode  59 = F1               F11              Console_13
          control keycode  59 = F1
          alt     keycode  59 = Console_1
          control alt     keycode  59 = Console_1
  keycode  60 = F2               F12              Console_14
          control keycode  60 = F2
          alt     keycode  60 = Console_2
          control alt     keycode  60 = Console_2
  keycode  61 = F3               F13              Console_15
          control keycode  61 = F3
          alt     keycode  61 = Console_3
          control alt     keycode  61 = Console_3
  keycode  62 = F4               F14              Console_16
          control keycode  62 = F4
          alt     keycode  62 = Console_4
          control alt     keycode  62 = Console_4
  keycode  63 = F5               F15              Console_17
          control keycode  63 = F5
          alt     keycode  63 = Console_5
          control alt     keycode  63 = Console_5
  keycode  64 = F6               F16              Console_18
          control keycode  64 = F6
          alt     keycode  64 = Console_6
          control alt     keycode  64 = Console_6
  keycode  65 = F7               F17              Console_19
          control keycode  65 = F7
          alt     keycode  65 = Console_7
          control alt     keycode  65 = Console_7
  keycode  66 = F8               F18              Console_20
          control keycode  66 = F8
          alt     keycode  66 = Console_8
          control alt     keycode  66 = Console_8
  keycode  67 = F9               F19              Console_21
          control keycode  67 = F9
          alt     keycode  67 = Console_9
          control alt     keycode  67 = Console_9
  keycode  68 = F10              F20              Console_22
          control keycode  68 = F10
          alt     keycode  68 = Console_10
          control alt     keycode  68 = Console_10
  keycode  69 = Num_Lock
  keycode  70 = Scroll_Lock      Show_Memory      Show_Registers
          control keycode  70 = Show_State
          alt     keycode  70 = Scroll_Lock
  keycode  71 = KP_7
          alt     keycode  71 = Ascii_7
  keycode  72 = KP_8
          alt     keycode  72 = Ascii_8
  keycode  73 = KP_9
          alt     keycode  73 = Ascii_9
  keycode  74 = KP_Subtract
  keycode  75 = KP_4
          alt     keycode  75 = Ascii_4
  keycode  76 = KP_5
          alt     keycode  76 = Ascii_5
  keycode  77 = KP_6
          alt     keycode  77 = Ascii_6
  keycode  78 = KP_Add
  keycode  79 = KP_1
          alt     keycode  79 = Ascii_1
  keycode  80 = KP_2
          alt     keycode  80 = Ascii_2
  keycode  81 = KP_3
          alt     keycode  81 = Ascii_3
  keycode  82 = KP_0
          alt     keycode  82 = Ascii_0
  keycode  83 = KP_Period
          altgr   control keycode  83 = Boot
          control alt     keycode  83 = Boot
  keycode  84 = Last_Console
  keycode  85 =
  keycode  86 = less             greater          bar
          alt     keycode  86 = Meta_less
  keycode  87 = F11              F11              Console_23
          control keycode  87 = F11
          alt     keycode  87 = Console_11
          control alt     keycode  87 = Console_11
  keycode  88 = F12              F12              Console_24
          control keycode  88 = F12
          alt     keycode  88 = Console_12
          control alt     keycode  88 = Console_12
  keycode  89 =
  keycode  90 =
  keycode  91 =
  keycode  92 =
  keycode  93 =
  keycode  94 =
  keycode  95 =
  keycode  96 = KP_Enter
  keycode  97 = Control
  keycode  98 = KP_Divide
  keycode  99 = Control_backslash
          control keycode  99 = Control_backslash
          alt     keycode  99 = Control_backslash
  keycode 100 = AltGr_Lock
  keycode 101 = Break
  keycode 102 = Find
  keycode 103 = Up
  keycode 104 = Prior
          shift   keycode 104 = Scroll_Backward
  keycode 105 = Left
          alt     keycode 105 = Decr_Console
  keycode 106 = Right
          alt     keycode 106 = Incr_Console
  keycode 107 = Select
  keycode 108 = Down
  keycode 109 = Next
          shift   keycode 109 = Scroll_Forward
  keycode 110 = Insert
  keycode 111 = Remove
          altgr   control keycode 111 = Boot
          control alt     keycode 111 = Boot
  keycode 112 =
  keycode 113 =
  keycode 114 =
  keycode 115 =
  keycode 116 =
  keycode 117 =
  keycode 118 =
  keycode 119 =
  keycode 120 =
  keycode 121 =
  keycode 122 =
  keycode 123 =
  keycode 124 =
  keycode 125 =
  keycode 126 =
  keycode 127 =
  string F1 = "\033[[A"
  string F2 = "\033[[B"
  string F3 = "\033[[C"
  string F4 = "\033[[D"
  string F5 = "\033[[E"
  string F6 = "\033[17~"
  string F7 = "\033[18~"
  string F8 = "\033[19~"
  string F9 = "\033[20~"
  string F10 = "\033[21~"
  string F11 = "\033[23~"
  string F12 = "\033[24~"
  string F13 = "\033[25~"
  string F14 = "\033[26~"
  string F15 = "\033[28~"
  string F16 = "\033[29~"
  string F17 = "\033[31~"
  string F18 = "\033[32~"
  string F19 = "\033[33~"
  string F20 = "\033[34~"
  string Find = "\033[1~"
  string Insert = "\033[2~"
  string Remove = "\033[3~"
  string Select = "\033[4~"
  string Prior = "\033[5~"
  string Next = "\033[6~"
  string F21 = ""
  string F22 = ""
  string F23 = ""
  string F24 = ""
  string F25 = ""
  string F26 = ""



  Suppose you save this file as thai.map. From Linux console, use
  command loadkeys to load thai.map.


       %loadkeys thai.map



  You can switch to Thai keyboard by pressing the right Alt key. If you
  want to switch the keyboard back, press the right Alt key again.



  2.2.  X Window system

  2.2.1.  Thai fonts

  You can obtain Thai fonts in bdf format or pcf format from internet.
  You can also use scalable fonts such as Type1 or TrueType fonts. But I
  will not describe about these.



  2.2.1.1.  Installing Thai fonts

  You must log in as root. Let's put Thai fonts in
  /usr/X11R6/lib/X11/fonts/misc/, this is a default font path. Change
  directory to /usr/X11R6/lib/X11/fonts/misc/ and run command


       %mkfontdir
       %xset fp rehash



  If you put Thai fonts in different directory, you must use xset to add
  the new font path. Please see man-page for further information.  You
  can check the new fonts by running command xlsfonts and see whether
  there are Thai fonts or not. If you can not see any Thai fonts from
  this command, you may need to restart X window.



  2.2.2.  There are two ways to map Thai keyboard on X window, using X
  Keyboard Extension (XKB) and using xmodmap . Please select how you map
  Thai keyboard. I recommend using XKB.  Thai keyboard layout



  2.2.2.1.  XKB and Thai keyboard layout.

  Beginning with XFree86 3.1.2D, you can use the new X11R6.1 XKEYBOARD
  extension to manage the keyboard layout. This is very helpful.

  During X server configuration with xf86config you will be asked about
  XKB, if you want to to set Thai keyboard layout for your system, say
  yes. There are a list of pre-configured keymaps. Choose Standard
  101-key, Thai encoding.

  XF86Setup is the graphical X server configuration utility for XFree86
  X server.  It is easier than traditional xf86config. You can select a
  keyboard layout easily with this tool.

  Ther are many choices of keyboard switch key to select. The default is
  LeftAlt+RightShift switch to Thai and LeftAlt+LeftShift switch to US.
  You can type Thai characters in any applications which support
  ISO-8859-1 character set, but don't forget to use Thai fonts with
  those applications too.

  I found that pre-configured keymaps that came with XFree86-3.2 is not
  correct. You may not be able to type THO THUNG which located at " 5
  key " . To fix this problem, you should add the line


           key <AE05> {        [], [   paragraph,      ocircumflex     ]       };



  in the file /usr/X11R6/lib/X11/xkb/symbols/th as the example.


       .................
           key <AE03> {        [], [       minus,      ograve          ]       };
           key <AE04> {        [], [      Agrave,      oacute          ]       };
           key <AE05> {        [], [   paragraph,      ocircumflex     ]       };
           key <AE06> {        [], [    Ooblique,      Ugrave          ]       };
           key <AE07> {        [], [  Odiaeresis,      ssharp          ]       };
       .................



  You can not type SORUSI also. Please change the line from


           key <AC08> {        [], [      Ograve,      eacute          ]       };



  to


           key <AC08> {        [], [      Ograve,      Eacute          ]       };



  Note that eacute is equal to MAITHO and Eacute is equal to SORUSI.

  There are also XKB extension utilities such as setxkbmap, xkbcomp,
  etc. Please see man-page for more information. I recommend to use
  xkbvled. The leds will be on when you are using Thai keyboard so you
  can know your keyboard's status.
  The following is part of XF86Config file about keyboard section. If
  you want to configure the keyboard by hand, change the content of
  /usr/X11R6/lib/X11/XF86Config as an example below. This configuration
  uses the default toggle key.


       Section "Keyboard"
          Protocol        "Standard"
          AutoRepeat      500 5
          LeftAlt         Meta
          RightAlt        Meta
          ScrollLock      Compose
          RightCtl        Control
       #  XkbDisable
          XkbKeycodes     "xfree86"
          XkbTypes        "default"
          XkbCompat       "default"
          XkbSymbols      "us(pc101)"
          XkbGeometry     "pc"
          XkbRules        "xfree86"
          XkbModel        "pc101"
          XkbLayout       "th"
       EndSection



  If you use XKB extension, Thai keyboard mapping with xmodmap may not
  work.  See XF86Config man-page for mor information.


  2.2.2.2.  Thai keyboard layout with xmodmap

  You can use the utility xmodmap to map Thai keyboard.  Normally
  xmodmap is used to load a keyboard configured file.  For most Linux
  distributions, when you start X window with startx, X server will find
  .Xmodmap in /usr/X11R6/lib/X11/xinit/ first. If .Xmodmap does not
  exist, X server will find .Xmodmap in your home directory. Please see
  the content of /usr/X11R6/lib/X11/xinit/xinitrc.

  The following is the sample of .Xmodmap for Thai Kedmanee keyboard
  layout.



  !
  ! Linux/XFree86 Thai Kedmanee layout (based on US keyboard)
  ! Use ScrollLock to switch to Thai keyboard.
  ! This file will work with XFree86 only.
  !

  keycode 0x09 =  Escape
  keycode 0x43 =  F1
  keycode 0x44 =  F2
  keycode 0x45 =  F3
  keycode 0x46 =  F4
  keycode 0x47 =  F5
  keycode 0x48 =  F6
  keycode 0x49 =  F7
  keycode 0x4A =  F8
  keycode 0x4B =  F9
  keycode 0x4C =  F10
  keycode 0x5F =  F11
  keycode 0x60 =  F12
  keycode 0x6F =  Print
  keycode 0x4E =  Mode_switch     XF86ModeLock
  keycode 0x6E =  Pause
  keycode 0x31 =  grave           asciitilde      minus           percent
  keycode 0x0A =  1               exclam          0x0e5           plus
  keycode 0x0B =  2               at              slash           0x0f1
  keycode 0x0C =  3               numbersign      underscore      0x0f2
  keycode 0x0D =  4               dollar          0x0c0           0x0f3
  keycode 0x0E =  5               percent         0x0b6           0x0f4
  keycode 0x0F =  6               asciicircum     0x0d8           0x0d9
  keycode 0x10 =  7               ampersand       0x0d6           0x0df
  keycode 0x11 =  8               asterisk        0x0a4           0x0f5
  keycode 0x12 =  9               parenleft       0x0b5           0x0f6
  keycode 0x13 =  0               parenright      0x0a8           0x0f7
  keycode 0x14 =  minus           underscore      0x0a2           0x0f8
  keycode 0x15 =  equal           plus            0x0aa           0x0f9
  keycode 0x33 =  backslash       bar             0x0a3           0x0a5
  keycode 0x16 =  BackSpace
  keycode 0x6A =  Insert
  keycode 0x61 =  Home
  keycode 0x63 =  Prior
  keycode 0x4D =  Num_Lock
  keycode 0x70 =  KP_Divide
  keycode 0x3F =  KP_Multiply
  keycode 0x52 =  KP_Subtract
  keycode 0x17 =  Tab
  keycode 0x18 =  q               Q               0x0e6           0x0f0
  keycode 0x19 =  w               W               0x0e4           quotedbl
  keycode 0x1A =  e               E               0x0d3           0x0ae
  keycode 0x1B =  r               R               0x0be           0x0b1
  keycode 0x1C =  t               T               0x0d0           0x0b8
  keycode 0x1D =  y               Y               0x0d1           0x0ed
  keycode 0x1E =  u               U               0x0d5           0x0ea
  keycode 0x1F =  i               I               0x0c3           0x0b3
  keycode 0x20 =  o               O               0x0b9           0x0cf
  keycode 0x21 =  p               P               0x0c2           0x0ad
  keycode 0x22 =  bracketleft     braceleft       0x0ba           0x0b0
  keycode 0x23 =  bracketright    braceright      0x0c5           comma
  keycode 0x24 =  Return
  keycode 0x6B =  Delete
  keycode 0x67 =  End
  keycode 0x69 =  Next
  keycode 0x4F =  KP_7
  keycode 0x50 =  KP_8
  keycode 0x51 =  KP_9
  keycode 0x56 =  KP_Add
  keycode 0x42 =  Caps_Lock
  keycode 0x26 =  a               A               0x0bf           0x0c4
  keycode 0x27 =  s               S               0x0cb           0c0a6
  keycode 0x28 =  d               D               0x0a1           0x0af
  keycode 0x29 =  f               F               0x0b4           0x0e2
  keycode 0x2A =  g               G               0x0e0           0x0ac
  keycode 0x2B =  h               H               0x0e9           0x0e7
  keycode 0x2C =  j               J               0x0e8           0x0eb
  keycode 0x2D =  k               K               0x0d2           0x0c9
  keycode 0x2E =  l               L               0x0ca           0x0c8
  keycode 0x2F =  semicolon       colon           0x0c7           0x0ab
  keycode 0x30 =  apostrophe      quotedbl        0x0a7           period
  keycode 0x53 =  KP_4
  keycode 0x54 =  KP_5
  keycode 0x55 =  KP_6
  keycode 0x32 =  Shift_L
  keycode 0x34 =  z               Z               0x0bc           parenleft
  keycode 0x35 =  x               X               0x0bb           parenright
  keycode 0x36 =  c               C               0x0e1           0x0a9
  keycode 0x37 =  v               V               0x0cd           0x0ce
  keycode 0x38 =  b               B               0x0d4           0x0da
  keycode 0x39 =  n               N               0x0d7           0x0ec
  keycode 0x3A =  m               M               0x0b7           question
  keycode 0x3B =  comma           less            0x0c1           0x0b2
  keycode 0x3C =  period          greater         0x0e3           0x0cc
  keycode 0x3D =  slash           question        0x0bd           0x0c6
  keycode 0x3E =  Shift_R
  keycode 0x62 =  Up
  keycode 0x57 =  KP_1
  keycode 0x58 =  KP_2
  keycode 0x59 =  KP_3
  keycode 0x6C =  KP_Enter
  keycode 0x25 =  Control_L
  keycode 0x40 =  Alt_L           Meta_L
  keycode 0x41 =  space
  keycode 0x71 =  Alt_R           Meta_R
  keycode 0x6D =  Control_R
  keycode 0x64 =  Left
  keycode 0x68 =  Down
  keycode 0x66 =  Right
  keycode 0x5A =  KP_0
  keycode 0x5B =  KP_Decimal

  clear Shift
  clear Lock
  clear Control
  clear Mod1
  clear Mod2
  clear Mod3
  clear Mod4
  clear Mod5

  add    Shift   = Shift_L Shift_R
  add    Lock    = Caps_Lock
  add    Control = Control_L Control_R
  add    Mod1    = Alt_L Alt_R
  add    Mod2    = Mode_switch



  Just put .Xmodmap in your home directory will be OK. When you start X
  window, X server will load this file.

  You can also load .Xmodmap from command line.


  %xmodmap ~/.Xmodmap



  In above .Xmodmap file, US/Thai switch key is assigned to keycode 0x4E
  (78), Scroll Lock key, with the statement


       ______________________________________________________________________
       keycode 0x4E =  Mode_switch     XF86ModeLock
       ______________________________________________________________________



  XF86ModeLock is the special keysym for XFree86 X server. If you don't
  add this keysym, you have to hold the scroll lock key while you are
  typing Thai characters. Note that if you use commercial X server, some
  keycodes are different. You may have to map keyboard by yourself.  See
  man-pages of X and xev for further information.


  Note: If you are using XFree86 version 3.1.2D or later, you need to
  add the line XkbDisable in keyboard section of XF86Config file. You
  may config the keyboard section like the following sample.


       Section "Keyboard"
          Protocol        "Standard"
          AutoRepeat      500 5
          LeftAlt         Meta
          RightAlt        ModeShift
          ScrollLock      ModeLock
          RightCtl        Compose
          XkbDisable
       EndSection



  3.  Applications with Thai language

  This is the tricky part. Most applications support ISO-8859-1
  character set. For example, emacs can display ISO-8859-1 character. If
  we set emacs to display ISO-8859-1 and use Thai font, you can edit
  Thai document with emacs. But this is not a good policy. You should
  avoid using this trick as possible. What we need is Thai locale or
  Thai supported applications to manage these things.


  To make X window application displays Thai font, you should run the
  application with -fn option. For example,


       %xedit -fn thai8x16



  Note that thai8x16 is just a one of Thai font names. You can see all
  available fonts by command xlfonts.  If you don't want to fill -fn
  option every time you run application. You should set Thai font in
  your ~/.Xdefaults or ~/.Xresources like this


       XTerm*font:     thai8x16



  3.1.  Some X applications and Thai language



  3.1.1.  txterm

  txterm is Thai version of xterm. There are several programs running
  under xterm such as shell, pine, vi, less, etc. We can type Thai
  characters without any problems with txterm. Txterm also provides its
  own Thai input method by pressing " F1 " key. Txterm will use fonts
  thai9x13 as default Thai font. You can change this by add -fn option.

  You can get txterm from Thaigate <http://thaigate.nacsis.ac.jp> or
  ZzzThai
  <ftp://ftp.fedu.uec.ac.jp/pub/thai/UEC/ZzzThai/Software/Linux>.



     bash shell :
        Normally, shell accepts only ASCII character set. To type Thai
        characters in shell command line, you should set environment
        LC_CTYPE to iso_8859_1.

        I don't set LC_CTYPE environment variable to iso_8859_1 because
        this environment variable will effect other applications too.
        With bash shell, you can specify which environment variable to
        be passed to the application. For example, I can make a fake
        Thai X terminal with this syntax.


          LC_CTYPE=iso_8859_1 xterm -fn thai8x16



     This xterm display Thai characters well, but not good for typing
     Thai characters. I strongly recommend you to use txterm.


     ls :
        If you name a filename in Thai. Issue the command as


          ls -N



     You may set alias in ~/.bashrc or ~/.cshrc, so you can type ls
     without option. If you don't use ls with -N option, you may see
     Thai filename as ?????.


  3.1.2.  Emacs, Mule

  Mule stands for " Multilingual Enhancement to GNU Emacs " . It has the
  same functions as emacs and supports many languages. Mule provides its
  own input method, so you don't need any configuration for typing Thai.
  You needs only Thai fonts for mule which you can get from, ZzzThai
  <ftp://ftp.fedu.uec.ac.jp/pub/thai/UEC/ZzzThai/Software/Linux/fonts/>
  or Etl site <ftp://etlport.etl.go.jp/pub/mule/fonts/ETL/>.  These Thai
  fonts are fixed width fonts.

  You need some configuration for mule. Puts the following lines in your
  .emacs.


       ;;
       ;; Thai System, add in .emacs
       ;;
       (set-file-coding-system-for-read '*tis620*)
       (set-default-file-coding-system '*tis620*)
       (set-display-coding-system '*tis620*)
       (set-keyboard-coding-system '*tis620*)
       (setq-deafault quail-current-package (assoc "thai" quail-package-alist))



  Add the following lines in .Xdefaults.


       !
       ! Emacs, Mule - Font menu
       !
       Emacs*FontSetList: thai14, thai16, thai24
       Emacs*FontSet-thai14:\
               -etl-fixed-medium-r-normal--14-140-72-72-m-70-tis620.2529-1
       Emacs*FontSet-thai16:\
               -etl-fixed-medium-r-normal--16-160-72-72-m-80-tis620.2529-1
       Emacs*FontSet-thai24:\
               -etl-fixed-medium-r-normal--24-500-72-72-m-120-tis620.2529-1



  When you hold shift key and press left mouse's button, you can select
  Thai fonts to display in mule window.  To type Thai characters, press
  " Ctrl + ] " . To type English, press " Ctrl + ] " again.

  You can get mule from ElectroTechnical Laboratory(ETL)
  <ftp://etlport.etl.go.jp/pub/mule/>


  3.1.3.  vi

  Vi should be run on txterm.


  3.1.4.  pine

  In the past, we could not send 8-bit characters through E-mail. Now,
  although mail transfer agent can handle 8-bit characters but some old
  mail transfer agent can not.  We can send Thai e-mail by using e-mail
  application that supports MIME (Multipurpose Internet Mail Extensions)
  E-mail applications that support MIME are pine, elm, Netscape mail,
  etc.


  Put the following definition in your ~/.pinerc file:


       character-set=ISO-8859-1



  This can also be set via the Setup option in pine window. You can find
  it under Config. You can read Thai news from pine, too.

  Pine should be run in txterm.


  3.1.5.  Netscape

  If you have Thai fonts in your system. Just set Thai font from
  preference. Thai fonts will appear in User defined area. See
  http://www.fedu.uec.ac.jp/ZzzThai/unix
  <http://www.fedu.uec.ac.jp/ZzzThai/unix> for setting Thai language on
  Netscape.

  Some movement about Thai Mozilla project at
  http://members.xoom.com/inThai/mozthai.html
  <http://members.xoom.com/inThai/mozthai.html>.


  3.1.6.  Ss, Simple thai word Separator

  ss is a dictionary based Thai word separation program similar to
  cttex. It can be used to insert a configurable string between Thai
  words. It can also show words that cannot be found in the dictionary.
  More words can be added to the dictionary. Developed by Mr.Teera
  Kittichareonpot.

  We can use this program to insert < WBR > tag between Thai words in
  html file. Browser will display Thai homepage better than normal html
  document.


  3.1.7.  Xzthai, X keyboard configurator + simple editor

  Xzthai, this is the Tcl/Tk application for mapping Thai keyboard on
  any keyboard with graphical user interface. Also provides simple
  editor and keyboard layout figure. It actually uses xmodmap program in
  background to map Thai keyboard. This may be useful for commercial X
  server and X server on UNIX.


  3.2.  Printing Thai document

  Thai2ps is used to convert plain text file to postscript file.You can
  use ghostscript(gs) to print your Thai document. For better quality
  document, you have to use (La)TeX.


  3.2.1.  Latex and Thai language

  Dr. Manop Wongsaisuwan first tried to use Thai language with latex. He
  wrote some perl script as filter for latex source code that contains
  Thai language. Then pass the result to latex. Mr. Vuthichai
  Ampornaramvech used this concept and wrote a program in C language,
  cttex, to handle this. It runs faster and makes Thai word segmentation
  based on dictionary. Cttex also fixes the position of Thai characters
  in word, so SARA and WANNAYUK will be placed in the beautiful
  position.
  You can find Thai latex filter from
  http://thaigate.nacsis.ac.jp/files/ttex.html
  <http://thaigate.nacsis.ac.jp/files/ttex.html>.


  3.2.2.  Latex's configuration for Thai language

  You must have latex installed in your computer.  First, download Thai
  postscript (Type1) fonts, tfm fonts and Thai style file. These fonts
  are needed by Latex. This is the list of files you should download.


       tfm fonts:
           dbtt.tfm    dbttb.tfm   dbttbi.tfm  dbtti.tfm
       postscript fonts:
           dbtt.pfa    dbttb.pfa   dbttbi.pfa  dbtti.pfa
       style files:
           thai.sty sakka.sty
       Thai Latex filter:
           cttex
       Sample Latex file:
           ttex.ttex test.ttex



  There is latex's directory at /usr/lib/texmf/texmf/ (RedHat 5.0). I
  will call /usr/lib/texmf/texmf/ as " $texroot " . We will concentrate
  at $texroot/texmf/ directory.  In $texroot/texmf/ directory, there are
  many files about tex's configuration. You have to edit files in dvips,
  fonts, tex subdirectories.

  Add the following lines to $texroot/texmf/dvips/misc/psfonts.map


       dbtt  DBThaiText <dbtt.pfa
       dbttb DBThaiTextBold <dbttb.pfa
       dbttbi DBThaiTextBoldItalic <dbttbi.pfa
       dbtti DBThaiTextItalic <dbtti.pfa



  Make a new directories and copy files to the appropriate directories.


       %mkdir /usr/lib/texmf/texmf/fonts/tfm/public/thai
       %mkdir /usr/lib/texmf/texmf/fonts/type1/public/thai
       %mkdir /usr/lib/texmf/texmf/tex/generic/thai
       %cp *.tfm /usr/lib/texmf/texmf/fonts/tfm/public/thai
       %cp *.pfa /usr/lib/texmf/texmf/fonts/type1/public/thai
       %cp *.sty /usr/lib/texmf/texmf/tex/generic/thai



  Run texhash or MakeTeXls-R(in some system) to update Tex database.


       %/usr/bin/texhash
       texhash: updating /usr/lib/texmf/texmf/ls-R ...
       texhash: Done.

  3.2.3.  Use Thai LaTeX  filter

  We can use cttex as filter like this,


       %cttex < ttex.ttex > ttex.tex
       C-TTeX $Revivsion: 1.15 $
       Usage : cttex [cutcode] < infile > outfile
       Usage : cutcode=0 forces operation in HTML mode.
       Build-in dictionary size: 9945 words
        343
       Done
       %latex ttex.tex
       ...
       %xdvi ttex.dvi



  You can convert dvi file to postscript file by,


       %dvips -o ttex.ps ttex.dvi



  Finally, you can print ttex.ps by using gs or lpr. You must configure
  printer before printing. See man-pages of printcap, gs, lpr for more
  information.


  3.2.4.  Editing LaTex  source file

  For new latex user, lyx is helpful. But I recommend to use mule to
  edit Thai latex source file because mule supports Thai language and it
  is a powerful editor. You may take a look a Thai Latex tutorial
  <http://www.fedu.uec.ac.jp/ZzzThai/Linux/ttex>.



  3.3.  X Application Resources

  Because Xt based applications allow user to configure the applications
  by resources. We can make the menu or label to be Thai language.

  For example, if you want xman to display Thai labels. You may add
  these lines in your .Xdefaults


       ......
       !!  Xman section
       Xman*Font:                          thai8x16
       Xman*helpButton.Label:
       Xman*quitButton.Label:
       Xman*manpageButton.Label:
       ......



  You can use the same idea to set window manager to be more Thai
  environment too.



  3.4.  Thai Extension for Linux (TE)

  Thai Extension for Linux is a installation package comes with
  applicaions and Thai fonts. You don't have to configure Linux system
  and applications by yourself.  Let TE do configuration task for you.
  After installation, you can use Thai language suddenly. Get TE from
  ftp://fedu.uec.ac.jp/pub/thai/UEC/ZzzThai/Software/Linux/
  <ftp://fedu.uec.ac.jp/pub/thai/UEC/ZzzThai/Software/Linux/>



  4.  References and FTP sites


  4.1.  Other documents of relevance

  The HOWTOs ought to be available from all mirrors of sunsite.unc.edu.

  The Linux Danish/International HOWTO by Niels Kristian Bech Jensen

  The Linux Cyrillic HOWTO by Alexander L. Belikoff

  The Keystroke mini-HOWTO by Zenon Fortuna.

  The Locales mini-HOWTO by Peeter Joot. (This one is mainly for
  developers.)

  The ISO-8859-1 FAQ and Programming for Internationalization FAQ (plus
  much more) by Michael Gschwind is available from his homepage
  <http://www.vlsivie.tuwien.ac.at/mike/i18n.html>.


  4.2.  Thai related stuffs

  " NACSIS R& D Thai Project Page " ,http://thaigate.nacsis.ac.jp
  <http://thaigate.nacsis.ac.jp>

  o  Information about Thai computing.

  o  Discussion groups in Thai language, such as thai-l (Thai Mailing
     list), Thai news, etc.

  o  Thai references and Thai softwares.

  o  Thai Latex filter.

  " ZzzThai Project " , http://www.fedu.uec.ac.jp
  <http://www.fedu.uec.ac.jp/ZzzThai/>

  o  Most softwares and Thai fonts introduced here can download from
     ZzzThai.

  o  Describe how to use Thai with 3 main computer platforms, UNIX like,
     Windows and Mac.

  o  Linux information at http://www.fedu.uec.ac.jp/ZzzThai/Linux
     <http://www.fedu.uec.ac.jp/ZzzThai/Linux>, TE, Thai LaTeX tutorial,
     etc.

  o  By The group of students at The University of Electro-
     Communications, Tokyo.

  " Vuthichai's Page " , http://www.ctrl.titech.ac.jp:80/~vuthi/
  <http://www.ctrl.titech.ac.jp:80/~vuthi/>


  o  Information about Thai computing by Mr. Vuthichai Ampornaramveth.

  " An annotated reference to the Thai implementations " ,
  http://www.inet.co.th/cyberclub/trin/thairef/
  <http://www.inet.co.th/cyberclub/trin/thairef/>

  o  Information about Thai character standard.

  o  By Mr.Trin Tantsetthi.

  " X window and Thai language " , http://members.xoom.com.cwg.x11th/
  <http://members.xoom.com/cwg/x11th/>

  o  By Mr.Rawat S.Pirom

  " SchoolNet Internet Sever " , http://www.school.net.th/linux-sis/
  <http://www.school.net.th/linux-sis/>

  o  Using Linux in School, Thailand.

  o  By NECTEC <http://www.nectec.or.th> (National Electronics and
     Computer Technology Center).

  " Thai Open Source Development " , http://members.xoom.com/inThai
  <http://members.xoom.com/inThai>

  o  Mozilla Thai enabling.

  o  Open source Thai softwares and Libraries.

  o  By Mr.Samphan Raruenrom

  " Linux Thai Project " , http://www.geocities.com/SiliconValley/8302
  <http://www.geocities.com/SiliconValley/8302>

  o  Information about Linux in Thai language.

  o  By Kaiwal Development Team.

  " ThaiLinux unofficial Webboard " ,
  http://lulu.mptc.eng.cmu.ac.th/HyperNews/get/ThaiLinux.html
  <http://lulu.mptc.eng.cmu.ac.th/HyperNews/get/ThaiLinux.html>

  o  Questions and answers about Linux in Thai language.

  o  By Mr.Pruet Boonma

  " Thai Linux installation project " ,
  http://www.geocities.com/Tokyo/Bay/4521/
  <http://www.geocities.com/Tokyo/Bay/4521/>

  o  Installation guide in Thai language


  4.3.  FTP and Web sites


  Most softwares and Thai fonts which introdued in this howto.

  o  ftp://ftp.fedu.uec.ac.jp/pub/thai/UEC/ZzzThai/Software/Linux
     <ftp://ftp.fedu.uec.ac.jp/pub/thai/UEC/ZzzThai/Software/Linux>

  o  http://thaigate.nacsis.ac.jp/files/index.html
     <http://thaigate.nacsis.ac.jp/files/index.html>


  o  http://www.nectec.or.th/pub/software/i18n/thai
     <http://www.nectec.or.th/pub/software/i18n/thai>

  Mule

  o  ftp://etlport.etl.go.jp/pub/mule <ftp://etlport.etl.go.jp/pub/mule>

  Ss

  o  http://members.xoom.com/theera/ss/
     <http://members.xoom.com/theera/ss/>

  SunSite <ftp://sunsite.unc.edu/pub/linux/> and mirrors.  doc/howto has
  the above mentioned HOWTOs. utils/nls and subdirectories contain files
  related to National Language Support.  Developers should take a look
  at locale-tutorial-0.8.txt.gz, locale-pack-0.8.tar.gz and cat-
  pack.tar.gz.

  The GNU archives <ftp://prep.ai.mit.edu/pub/gnu/> has the recode
  package for character table conversion, the ABOUT-NLS file and the
  gettext package for locale support of some GNU applications and (of
  course) the latest versions of GNU emacs.



  5.  Acknowledgments and Copyright

  Some parts of this HOWTO comes from The Linux Danish/International
  HOWTO by Thomas Petersen, petersen@post1.tele.dk (the original author)
  and Niels Kristian Bech Jensen, nkbj@image.dk.

  Thank you to Phaisarn Techajaruwong for building Thai fonts and
  valuable discussion.

  Thank you to Thai students at The University of Electro-Communications
  and Mr. Vuthichai Ampornaramveth for every help.

  This HOWTO is copyrighted by Poonlap Veeratanabutr, poon-
  v@fedu.uec.ac.jp. It is distributed as other Linux HOWTOs under the
  terms described below.

  Linux HOWTO documents may be reproduced and distributed in whole or in
  part, in any medium physical or electronic, as long as this copyright
  notice is retained on all copies. Commercial redistribution is allowed
  and encouraged; however, the authors would like to be notified of any
  such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu via email.



F TURKISH-.;1                       	Turkish-HOWTO
  Turkish-HOWTO
  Grkem etin, gorkem@gelecek.com.tr
  v1.0, 21 September 1999

  Bu belge, Linux iletim sistemi altndaki Trke sorunlarna zm
  getirmek amacyla, mevcut Trke desteinin nasl kullanlabileceini
  anlatyor.
  ______________________________________________________________________

  Table of Contents


  1. Giri

     1.1 Srm deiiklikleri

  2. HOWTO belgeleri

     2.1 Tm HOWTO belgelerini nerede bulabilirim?
        2.1.1 Trke-NASIL belgeleri
           2.1.1.1 Dier Trke kaynaklar

  3. Klavye ayarlar

     3.1 Klavye tu takm yklenmesi
     3.2 Bu tutakmlarn nerede bulabilirim?

  4. Metin ekran (konsol) yaztiplerinin yklenmesi

     4.1 Son dzeltmeler

  5. eitli uygulamalarda Trke kullanm

     5.1 Pine
     5.2 Netscape
     5.3 KDE altnda Trke
     5.4 kvt
     5.5 GNOME altnda Trke

  6. Zaman dilimi ayarlar

  7. X Window destei

     7.1 X Window Trke yaztiplerinin yklenmesi
     7.2 X Window altnda Trke klavye kullanlmas

  8. Yaplacaklar



  ______________________________________________________________________

  1.  Giri

  Bu belge, Linux ve baz zel durumlarda UNIX iletim sisteminde Trke
  kullanabilmek iin gereken eklemeler hakknda okuyucuyu bilgilendirmek
  iin yazld. Trke'ye ait olan latin5, bir baka adyla ISO8859-9
  standardnn, Amerika ve baz Avrupa lkelerince kullanlan latin1
  standard ile ayn olmamas nedeniyle sadece Linux deil, hemen hemen
  tm iletim sistemlerinde bu sorunu fazlasyla yayor olmalsnz.
  leride ele alnacak konular ile bu skntlarn pek ounu
  atlatacanz mit ediyorum. Eer metin ekranda, X Window altnda
  Trke yazamyor ve okuyamyorsanz, pine ve Netscape gibi
  uygulamalarda Trke karakterleri gremiyorsanz bizi izlemeye devam
  edin.

  Bu belgedeki zm denemelerimi Red Hat Linux ile yaptm.  almayan,
  eksik bilgi ieren ya da eklenmesinde fayda grdnz bir blm
  grdnzde gorkem@gelecek.com.tr adresine bir ileti yollamanz
  yeterlidir. zellikle dier Linux datmlarnda yaplacak ilemler
  farkl olabilir, bu nedenle eitli Linux datmlarnda
  karlatnz zmleri bana gnderebilirsiniz.



  1.1.  Srm deiiklikleri

  Srm 1.0 : Turkish-HOWTO'nun yazlmas. Hala belirli alanlarda Trke
  sorunlar yaadmdan dolay bu belgenin 1.0 srmde kalmayacan
  mit ediyorum. Dosya, birtakm alanlarda eksiklikler ierebilir.
  Burada grmek istediiniz ne varsa bana bir ileti gnderin. Tm
  mektuplarnza cevap vermeye alacam.



  2.  HOWTO belgeleri

  Linux'un HOWTO belgeleri, Linux merakllar tarafndan biraraya
  getirilmi ve hepsi belirli bir konuyu ele alan inceleme yazlarndan
  oluuyor. Hem teorik, hem de pratik zmler ieren bu belgeleri tm
  Linux kullanclarnn okumalarn tavsiye ederim.


  2.1.  Tm HOWTO belgelerini nerede bulabilirim?



    Datmla birlikte : Eer alr durumda bir Linux datmnz
     varsa, baz durumlarda gncelliini ksmen yitirmi, ancak deerli
     bilgiler ieren belgelere /usr/doc dizininden eriebilirsiniz.
     Buradaki HOWTO dizini altnda ise tahmin edebileceiniz gibi HOWTO
     belgelerini bulabilirsiniz.

    Eer HOWTO belgelerini kurmamsanz, ya da elinizde bir Linux
     datm yoksa en yakn sunsite arivinden de bu belgeleri almanz
     mmkn: www.metu.edu.tr/ldp/HOWTO <www.metu.edu.tr/ldp/HOWTO>


  2.1.1.  Trke-NASIL belgeleri


  Baz HOWTO belgelerinin evrilmesi sonucu oluturulan Trke Linux-
  NASIL sayfalarna www.linux.org.tr <http://www.linux.org.tr>
  adresinden ulaabilirsiniz.


  2.1.1.1.  Dier Trke kaynaklar


    Trkiye Linux Kullanclar Grubu, www.linux.org.tr
     <http://www.linux.org.tr>

    Gelecek Biliim ve letiim A., www.gelecek.com.tr
     <http://www.gelecek.com.tr>


  Haber bekleri :



    news.pcmagazine.com.tr (pcmag.linux)

    news.istanbul.edu.tr (tr.bilgisayar.isl-sistemleri.linux)



  Kitaplar :


  Trkiye'de Linux ile ilgili km tm yaynlara www.gelecek.com.tr
  <http://www.gelecek.com.tr> adresinden ulaabilirsiniz.



  3.  Klavye ayarlar

  Bu blmde, metin ekranda Trke yazmak iin gerekli programlar
  inceleyeceiniz. Bunlardan ilki, bilgisayara Trke klavye tu takm
  haritasn gsterecek olan loadkeys komutudur. loadkeys komutu ve
  uygun bir Trke klavye dalm haritas yardmyla istediimiz bir
  Trke klavyeyi (Q Trke, F Trke gibi) ykleyebiliriz.



  3.1.  Klavye tu takm yklenmesi


  loadkeys komutunun kullanm ok basittir. Datmnzda bulunan ve
  /usr/lib/kbd/keymaps/i386 dizini altna yerletirilmi olan klavye
  haritalarndan bir tanesini sein. Aslnda klavye haritalarnn adn
  bilmek zorunda deilsiniz, burada kullanabileceiniz dosyalar ve ne
  tip bir klavyeyi yklediklerini grebilirsiniz:



    trq.map : Trke Q klavye

    trf.map : Trke F klavye

    tralt.map : Bu klavye ile, ALT tuu ile birlikte bastnz bir
     karakterin karl olan Trke karakter ekranda belirecektir.
     rnek olarak ALT ve "c" karakterlerine bastnz zaman "", ALT ve
     "G" karakterlerine bastnzda ise "" harfi grlecektir. Bu
     klavye dalm, Q klavyeye alkn, ancak arada bir Trke yazmak
     isteyenler iin ideal grnnyor. Ancak hzl kullanmak iin biraz
     zaman istiyor.



  imdi loadkeys komutunu birka rnekte kullanalm:



       $ loadkeys trq.map                 (Trke Q klavye haritasn ykle)
       $ loadkeys trf.map                 (Trke F klavye haritasn ykle)
       $ loadkeys tralt.map               (Trke F klavye haritasn ykle)



  Eer normal US klavye haritasna dnmek isterseniz, defkeymap klavye
  elem dosyasn kullann.


       $ loadkeys defkeymap



  Yaplan tm ilemler tm sistemde etkin olacaktr. Bir kullanc
  alma yaptktan sonra sistem kapanncaya, ya da baka bir klavye
  dalm yklenince dein klavye dzeni ayn kalr.



  Not: ou Linux datmlarnda bulunan kbd paketi sistemde
  kullanlabilecek klavye elem (dalm) dosyalarn ve yaztiplerini
  ierir. Son zamanlarda, diskten tasarruf salamak amacyla hem
  yaztipi, hem de klavye elem dosyalar sktrlarak
  kullanlmaktadr. Bu tip sktrlm dosyalarn sonu .gz ile biter
  (rnein trq.map.gz).  loadkeys ve setfont komutlar herhangi bir
  sorunla karlamadan bu dosyalar okuyabilecek ve gerekli ilemleri
  yapacaktr.



  3.2.  Bu tutakmlarn nerede bulabilirim?

  Eer kullandnz datmda trq.map, trf.map ya da tralt.map klavye
  elem dosyalarn bulamyorsanz ve yukardaki komutlar ilerken hata
  mesaj alyorsanz, ftp.gelecek.com.tr
  <ftp://ftp.gelecek.com.tr/pub/turkce> adresinden bu dosyalar
  indirmeniz mmkndr.



  Dilediiniz klavye dzenini, Red Hat datmnda yeralan
  /etc/sysconfig/keyboard dosyasna ekleyebilirsiniz. Kullanabileceiniz
  dosya isimlerinden bazlar trq, trf ve tralt'tr.


  4.  Metin ekran (konsol) yaztiplerinin yklenmesi


  Metin ekranda Trke grebilmek iin birka ileme daha ihtiyacmz
  var. Bunlardan ilki Trke karakterleri ieren yaztiplerinin
  yklenmesi. Bir yaztipini yklemek iin setfont komutunu
  kullanyoruz.



       $ setfont latin5u-16.psf.gz



  Yukardaki komut /usr/lib/kbd/consolefonts dizini altndaki
  latin5u-16.psf.gz yaztipi dosyasn ykledi. Bu dizin altnda
  yeralan, ya da yukarda belirttiim ftp adresinden indirdiiniz ve ad
  latin5 ile balayan tm yaztipleri Trke karakterler ierir. Birka
  deneme de siz yapn. zellikle latin5u-12 ve latin5u-14 dosyalar daha
  kk yaztipi ierir ve ekranda ayn anda daha ok karakter
  grntleyerek alma alannz geniletir.



  Metin ekranda kullanabileceiniz tm Trke yaztiplerini
  ftp.gelecek.com.tr <ftp://ftp.gelecek.com.tr/pub/turkce> dizini
  altnda bulabilirsiniz.
  4.1.  Son dzeltmeler

  Atlmas gereken birka adm daha kald. nce /etc/inputrc dosyas
  iine aadaki satrlar ekleyin. Eer dosya yoksa kendiniz
  oluturun.



       set input-meta on
       set convert-meta off
       set output-meta on



  Ardndan /etc/profile dosyasnn sonuna, aadaki satrlar ekleyin.



       export INPUTRC=/etc/inputrc



  Artk rahatlkla bash komut satr altnda Trke yazabilir ve
  okuyabilirsiniz. Yukarda yaplan ilemleri eer /etc/rc.d/rc.local
  dosyasna eklerseniz, herkes iin tanml bir klavye elem dosyas ve
  yaztipi yaratm olursunuz:



       setfont latin5u-16.psf
       loadkeys trq.map.gz



  5.  eitli uygulamalarda Trke kullanm



  5.1.  Pine


  Pine ile Trke ileti gndermek ve almak istiyorsanz, .pinerc
  dosyasnda, character-set deikeninin karsnda, aadaki
  deiiklii yapmanz gerekiyor:



       # Reflects capabilities of the display you have. Default: US-ASCII.
       # Typical alternatives include ISO-8859-x, (x is a number between 1 and 9).
       character-set=ISO-8859-9



  Yukardaki deiiklikleri yaptktan sonra, pine ile kolayca Trke
  karakterler ieren e-posta yollayabilirsiniz.



  5.2.  Netscape


  Netscape'te yaztipi seimi iin, Edit - Preferences - Appearance -
  Fonts - For the Encoding mensne gidin ve buradan ``Turkish
  (iso-8859-9)'' seeneini iaretleyin. Daha aada yeralan ``Use my
  default fonts, overriding document-specified fonts'' seeneini
  iaretlemeniz halinde ise Netscape, sadece sizin belirttiiniz
  yaztiplerini ekranda gsterecektir.  Yine de Netscape ile Trke
  yaztiplerini grmekte sknt ekerseniz View -> Encoding -> Turkish
  (ISO-8859-9) seeneini iaretlemelisiniz.

  Genel kural olarak yaztipini semenize izin veren tm yazlmlarda
  Trke yaztiplerini kullanabilirsiniz.



  5.3.  KDE altnda Trke


  KDE pencere arayznn byk bir ksm Trkeye evrildi. 1.0
  srmnden itibaren gelen Trke destei ile pek ok uygulama
  yazlmn Trke altrabiliyorsunuz.



  KDE altnda, programlarn Trke almas ve mesajlarn Trke
  kmas iin kcontrol programn altrn. Sol tarafta yeralan
  Desktop - Language mens iinde ilk dil olarak Turkish'i sein.
  Bundan sonra aacanz her KDE program, eer destekleniyorsa Trke
  alacaktr.



  5.4.  kvt


  kvt, KDE ile birlikte gelen bir terminal emlasyon programdr. kvt'de
  kullanacanz yaztipini semek iin, srasyla


    Seenekler - Yaztipi mensne girin.

    Karakterler seeneinin yanndaki dmeden iso-8859-9 seeneine
     tklayn.

    sterseniz boy, tr ve dier seeneklere de gzatabilir ve bunlar
     deitirebilirsiniz. zellikle Courier yaztipi en iyi grnty
     salayacaktr.

    kvt'ye geri dnn.

  Artk kvt altnda Trke yazabilirsiniz. Ancak X Window'da henz
  Trke karakterlerinizi tantmadysanz yukarda yazlanlar yapmak
  mmkn olmaz.  Bunun iin nce ``X Window Trke yaztiplerinin
  yklenmesi'' bal altnda yeralan ynergeleri izleyin.



  kvt'nin yeni bir srmn kullanmanz halinde, nce kvt'yi altrn,
  ardndan farenin sa tuuyla kvt zerinde herhangi bir noktaya basn.
  Yukardaki maddeleri srasyla takip edin.



  5.5.  GNOME altnda Trke

  GNOME masast altnda, zellikle gnome terminal altnda
  yaayabilmeniz muhtemel Trke karakter sorununa zm iin, aadaki
  maddeleri uygulayn:



    Bir gnome terminal an. GNOME panelinin (ekrann en altnda)
     zerinde yeralan ekran grnts zerine tklayabilirsiniz.

    Settings - Preferences iine girin. Font karsndaki kutucukta,
     halen kullanlan yaztipi yeralmaktadr. Karsndaki kutuya
     (Browse) tklayn.

    Filter sekmesine tklayn. Charset blmnden ISO8859-9'u sein.
     Ok'i tklayn.

    Ok diyerek son pencereden de kn. imdi gnome terminalde Trke
     karakterleri grebileceksiniz.



  6.  Zaman dilimi ayarlar


  Trkiye, Greenwich'ten 2 saat ileride yeralan zaman dilimi kua
  iindedir. Bunu, bir e-posta aldnz zaman iletinin en st ksmnda
  yeralan +02:00 iaretinden de anlayabilirsiniz. Eer hatal bir zaman
  diliminde yeralyorsanz, yaplmas gereken ilemler aadadr.
  Alternatif olarak, Red Hat ve Mandrake datmlaryla gelen timeconfig
  paketi zaman dilimini ayarlamanz konusunda yardmc olacaktr.



  nce /etc/localtime saat ayar dosyasn silin:



       # rm /etc/localtime



  Ardndan, bu dosyay bir sembolik ba ile,
  /usr/share/zoneinfo/Europe/Istanbul dosyasna balayn.



       # ln -s /usr/share/zoneinfo/Europe/Istanbul /etc/timeconfig



  timeconfig paketinde ise sadece ``Turkey'' seeneini iaretleyin ve
  kn.

  Eer /etc/localtime dosyas yoksa, bata sendmail olmak zere pek ok
  programda ho olmayan hata mesajlar alrsnz.


  7.  X Window destei



  Metin tabanl bir ekran altnda Trke yazdktan ve uygulamalarmz
  Trke yaztipleriyle kullanmaya baladktan sonra X Window altnda
  nasl Trke yazlr ve okunur, grelim.


  7.1.  X Window Trke yaztiplerinin yklenmesi


  ncelikle yapmamz gereken, Trke yaztiplerinin X Window'a
  tantlmasdr. X Window alrken, hangi yaztiplerini ykleyeceini
  belirlemek amacyla baz ntanml dizinlere bakar. Bu dizinler,
  /usr/X11R6/lib/X11/XF86Config dosyasnda belirtilmitir.



  RPM paketlerini kurabileceiniz bir datm kullanmanz halinde,
  Trke yaztiplerini ve klavye harita ek dosyasn yklemiseniz,
  iiniz ok kolay. Bu dosyalar ykleyip yklemediinizi bilmiyorsanz
  aadaki komutu altrn.



       # rpm -qa | grep ISO8859-9
       XFree86-ISO8859-9-75dpi-fonts-2.1.2-1
       XFree86-ISO8859-9-2.1.2-1
       XFree86-ISO8859-9-100dpi-fonts-2.1.2-1



  Yukardaki satrlara benzer bir kt alm olmanz gerekiyor (srm
  numaralar farkl olabilir). Eer almadysanz Trke yaztiplerini
  kurmamsnz demektir. Eer Red Hat Linux kullanyorsanz, CD'yi
  srcye yerletirip srayla u ilemleri yapn:



       # mount /dev/cdrom
       # cd /mnt/cdrom/RedHat/RPMS/
       # rpm -i XFree86-ISO8859-9-75dpi-fonts-2.1.2-1
       # rpm -i XFree86-ISO8859-9-2.1.2-1
       # rpm -i XFree86-ISO8859-9-100dpi-fonts-2.1.2-1



  Yaztiplerini ve klavye elem dosyasn sisteminize kurduktan sonra
  bir sonraki adma gein.



  imdi, daha nce yarm braktmz noktaya geri dnelim. X Window'un
  ykleyecei yaztiplerinin bulunduu dizinler
  /usr/X11R6/lib/X11/XF86Config  dosyasnda belirtiliyordu.



  Bu dosya iinde, aadakine



  FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
  FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
  FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
  FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
  FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"



  ya da buna



       FontPath    unix/-1



  benzer satrlar greceksiniz.

  Bu satrlarn en bana, kurduumuz Trke yaztipleri neredeyse o
  dizinin adn yazyoruz. Red Hat Linux 6.0'dan itibaren Trke
  yaztipleri /usr/share/fonts/ISO8859-9 dizinine kuruluyor. Bu dizin
  patikasn XF86Config dosyasnn en stne ekleyelim. Tm Trke
  yaztipleri kurulmusa /usr/share/fonts/ISO8859-9 dizini altnda
  aadaki dosyalar grebilirsiniz:



       # ls -al /usr/share/fonts/ISO8859-9/
       total 17
       drwxr-xr-x   5 root     root         1024 Feb 13 19:04 .
       drwxr-xr-x  11 root     root         1024 Feb 15 18:46 ..
       drwxr-xr-x   2 root     root         6144 Feb 13 19:04 100dpi
       drwxr-xr-x   2 root     root         6144 Feb 13 19:04 75dpi
       drwxr-xr-x   2 root     root         1024 Feb 13 19:04 misc



  imdi ISO8859-9 dizininde Trke yaztiplerimizin bulunduunu
  /usr/X11/lib/X11/XF86Config dosyasnda belirtelim.



       FontPath   "/usr/X11R6/lib/X11/fonts/ISO8859-9/misc"
       FontPath   "/usr/X11R6/lib/X11/fonts/ISO8859-9/75dpi"
       FontPath   "/usr/X11R6/lib/X11/fonts/ISO8859-9/100dpi"
       FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
       FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
       FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
       FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
       FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"



  Tabi, bu dosyada "FontPath  unix/:-1" satr varsa, ekleme yapacanz
   satr da "FontPath   unix/:-1" satrnn bana koymanz
  gerekiyor.



  u anda yaztiplerimizi sisteme tantm durumdayz. X Window
  alrken nce en stteki FontPath bilgileri okunacaktr.

  imdi X Window'a girin. Netscape ile herhangi bir Trke dosyay
  grntleyebilirsiniz.



  7.2.  X Window altnda Trke klavye kullanlmas


  Sra geldi klavye ayarlarnn yaplmasna. Red Hat ile birlikte,
  Trke klavye elem dosyalar da geliyor. Bu dosyalar,
  /usr/X11R6/lib/X11/etc dizininde yeralyorlar:



       # cd /usr/X11R6/lib/X11/etc/
       # ls -al xmodmap.*
       -r--r--r--   1 root     root         4988 Oct 10 10:53 xmodmap.std
       -rw-r--r--   1 root     root         2764 Oct  6  1998 xmodmap.tralt
       -rw-r--r--   1 root     root         2316 Oct  6  1998 xmodmap.trf
       -rw-r--r--   1 root     root         2316 Oct  6  1998 xmodmap.trq



  Yukardaki dosyalar srasyla standart Amerikan klavye, alt Trke
  klavye, F klavye ve Q Trke klavyeye karlk geliyor. X Window'a
  girerken bu klavyelerden bir tanesini aktif hale getirmemiz gerekiyor.
  rnek olarak, Q Trke klavyenin, X Window alrken etkin olmas
  iin, /home/kullanc-ad/.xinitrc dosyasna aadaki satr
  eklemelisiniz.



       xmodmap /usr/X11R6/lib/X11/etc/xmodmap.trq



  .xinitrc dosyasna, kullandnz pencere ynetecisini altracak
  ekilde bir eklenti de yapmanz gerekecektir. Bu eklentiyi de
  yaptktan sonra dosyann son hali aadakine benzer bir hal alr:



       xmodmap /usr/X11R6/lib/X11/etc/xmodmap.trq
       startkde



  Tabi siz startkde yerine istediiniz pencere yneticisini altracak
  ekilde bir komut yazabilirsiniz.

  X Window'a girdikten sonra da klavye haritasn deitirmek mmkndr.
  Bunun iin yukarda rnei bulunan xmodmap komutunu dorudan xterm
  altnda altrabilirsiniz.

  X Window altnda kullanlan klavye elem dosyalarndan xmodmap.tralt,
  konsol ekranda kullanlan tr.alt dosyasndan biraz farkllk
  gsteriyor.  Konsol altnda, herhangi bir Trke karakteri bastrmak
  iin ALT tuunu kullanrken, X Window altnda ALT-GR tuunu
  kullanmalsnz.

  XFree86'daki gzel bir zellik de, konsolda kullanlan klavye elem
  dosyasnn aynsnn, X Window alrken de kullanlabilmesi. Bunun
  iin, /usr/X11R6/lib/X11/XF86Config dosyasnda,
       XkbDisable



  eklinde bir satrn bulunmas gerekir.



  8.  Yaplacaklar


  Nefesimin yettii bir noktada, uluslararaslatrma (i18n -
  internationalizaton) ve yerelletirme (l10n - localization) konularna
  da girmek istiyorum. Bu sayede rnein ayn kaynak kodu derleyerek,
  farkl diller iin farkl tarih gsterimleri sunabilirsiniz. Bir dosya
  iinde sralama yaparken "" karakterinin, "c"den hemen sonra
  gelmesini salayabilirsiniz. i18n sayesinde bir yazlmn kullanl
  ok artar. KDE gibi gzel bir masast paketini imdi Trke
  kullanabiliyorsanz bunu i18n desteine borlusunuz.

  Bunlarn yannda, srada Star Office'in Trke ayarlarnn yaplmas
  var. Saolsun Sun Microsystems, Star Office'i serbest brakarak Linux
  kullanclarnn ok gelimi bir ofis paketine sahip olmalarna
  yardm etti. Bize de bu nimetten yararlanmak kald.

  Sevgi, sayg, Linux



D AKTUELL                           	aktuell
D VERALTET                          	veraltet
  11 de Octubre del 99.  mini-COMO: La abogaca por Linux
  Paul L. Rogers, Paul.L.Rogers@li.org
  Pineda, rmrivera@hotmail.com
  v0.5, 7 Mayo de 1998. Traducido el

  Este documento proporciona sugerencias acerca de cmo la comunidad de
  Linux puede abogar efectivamente por el uso de Linux.
  ______________________________________________________________________

  ndice general


  1. Acerca de este documento

  2. Informacin sobre derechos reservados de autor.

  3. Introduccin

  4. Informacin Relacionada

  5. Promocin del uso de Linux

  6. Normas de Conducta

  7. Grupos de Usuarios

  8. Relaciones con Distribuidores Comerciales

  9. Relaciones con los Medios de Comunicacin

  10. Reconocimientos

  11. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Acerca de este documento


  Este es el COMO para la Defensa de Linux y tiene la intencin de
  proporcionar pautas e ideas para apoyar sus esfuerzos de defensa de
  Linux.

  Este COMO fue inspirado por Jon maddog Hall cuando respondi a una
  demanda de guas para defender a Linux durante las actividades del Da
  de la Red del 96 (NetDay96, http://www.netday96.com. Jon respondi
  positivamente a estas guas y observ que ellas eran la base de una
  lista de normas de conducta que podran beneficiar la comunidad de
  Linux.

  Este documento est disponible en formato HTML y en su versin
  original en: http://www.datasync.com/~rogerspl/Advocacy-HOWTO.html.

  Nat Makarevitch nat@nataa.fr.eu.org tradujo este documento al francs:


  http://www.freenix.org/unix/linux/HOWTO/mini/Advocacy.html.

  Chie Nakatani jeanne@mbox.kyoto-inet.or.jp tradujo este documento al
  japons: http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/html/Advocacy.tar.gz.

  Janusz Batko janus@krakow.linux.org.pl tradujo este documento al
  Polaco: http://www.jtz.org.pl/Html/mini/Advocacy.pl.html.

  Bruno H. Collovini buick@microlink.com.br tradujo este documento al
  Portugus:
  http://www.microlink.com.br/~buick/dragons/op1/minihowtos/br-
  advocacy.html.

  Mauricio Rivera Pineda rmrivera@hotmail.com tradujo este documento al
  castellano: http://www.insflug.org/documentos/Abogacia-Por-Linux-Mini-
  Como/.

  El autor y mantenedor del COMO para la Defensa de Linux es Paul L.
  Rogers, Paul.L.Rogers@li.org. los comentarios y adiciones que se
  propongan sern bienvenidos.

  Si necesita saber ms acerca del Proyecto de Documentacin de Linux o
  acerca de los COMOs de Linux, sintase libre de contactar (--  En el
  caso de la comunidad hispanoparlante, dirjase al INSFLUG,
  http://www.insflug.org/--) con el coordinador, Joshua Drake,
  poet@linuxports.com.

  Una nota personal del autor: Debido a varias circunstancias, no he
  podido dedicarle el tiempo suficiente a mantener este mini-COMO ni
  para interactuar con la comunidad de Linux tanto tiempo como hubiera
  deseado.  Pido disculpas por esto y si usted ha intentado contactarme
  y he sido lento en responderle, por favor perdneme el haber sido tan
  desconsiderado. A pesar de que todava tengo muchos otros compromisos,
  anticipo que comenzarn a demandarme menos tiempo y me permitirn
  ponerme al da en mis otras facetas de la vida. Agradezco su paciencia
  y quisiera extender unos agradecimientos especiales a todos los que
  han sacado tiempo para sugerir adiciones y correcciones.


  2.  Informacin sobre derechos reservados de autor.


  Este COMO tiene derechos reservados de autor  1996 por Paul L.
  Rogers.  Todos los derechos reservados.

  Cualquier copia literal puede reproducirse o distribuirse en cualquier
  medio fsico o electrnico sin permiso expreso del autor.

  Las traducciones igualmente son permitidas sin el permiso expreso si
  stas incluyen una nota acerca de quin lo tradujo.

  Pueden agregarse citas cortas sin el consentimiento previo del autor.

  Los Trabajos derivados y distribuciones parciales del COMO de Defensa
  de Linux deben acompaarse ya sea con una copia literal de este
  archivo o con un enlace a una copia literal.

  La redistribucin comercial est permitida y es alentada; sin embargo,
  al autor le gustara ser notificado de tales distribuciones.

  En resumen, deseamos promover la diseminacin de esta informacin a
  travs del mayor nmero posible de canales. Sin embargo, deseamos
  retener los derechos de autor de los documentos de COMO, y nos
  gustara ser notificados de cualquier plan de redistribuir los COMOs.

  Ms an, queremos que toda la informacin provista en los COMOs sea
  diseminada. Si usted tiene preguntas, por favor contacte con el
  coordinador de los COMOs (en ingls), Joshua Drake,
  poet@linuxports.com.

  (-- Para temas relacionados con documentacin en castellano, dirjase
  a http://www.insflug.org/colaboracion--)


  3.  Introduccin


  La comunidad de Linux ha sabido por algn tiempo que para muchas
  aplicaciones, Linux es un producto estable, fiable, robusto (an
  cuando no perfecto). Desafortunadamente, hay todava mucha gente,
  incluyendo tomadores de decisiones claves, que no son conscientes de
  la existencia de Linux ni de sus capacidades.

  Si Linux y los muchos otros componentes que conforman una distribucin
  de Linux han de lograr su mximo potencial, es crtico que lleguemos a
  los usuarios posibles y defendamos (siendo muy cuidadosos de no
  prometer demasiado) el uso de Linux para las aplicaciones apropiadas.

  La razn por la cual muchos productos comerciales han tenido xito en
  el mercado no es tanto por la superioridad tcnica como por las
  habilidades publicitarias de la compaa.

  Si usted goza con el uso de Linux y le gustara contribuir de alguna
  manera con la comunidad de Linux, por favor considere la posibilidad
  de actuar de acuerdo con alguna o algunas de las ideas expresadas en
  este COMO y as ayude a otros a aprender ms acerca de Linux.


  4.  Informacin Relacionada


  Lars Wirzenius, antiguo moderador de comp.os.linux.announce y
  activista durante mucho tiempo de Linux, tiene tambin algunos
  pensamientos
  cmo promover el uso de Linux.

  Eric S. Raymond ha escrito un anlisis, disponible en
  http://www.tuxedo.org/~esr/writings/cathedral-bazaar/index.html acerca
  del porqu el modelo de desarrollo usado por la comunidad de Linux ha
  tenido tanto xito.

  La comunidad de software libre ha reconocido que los trminos
  software libre y software disponible libremente no son apropiados
  en todos los contextos. Para ms informacin acerca del uso del
  trmino software de fuentes abiertas cuando promueva el software
  libre, por favor visite el servidor del movimiento Open Source,
  http://www.opensource.org/.

  Si necesita pulir sus tcnicas de venta de Linux, eche un vistazo al
  ensayo Linuxmanship,
  http://electriclichen.com/people/dmarti/linuxmanship.html escrito por
  Donald B. Marti, Jr.

  En Linux PR, http://www.cse.unsw.edu.au/~conradp/linux/pr/ se discute
  la importancia de los comunicados de prensa hacia la comunidad de
  Linux. Otra forma de obtener valiosa experiencia en esta rea es la de
  organizar un Da de la Red (NetDay) en alguna escuela local usando las
  ideas presentadas en la siguiente gua:  http://www.netday.org/how-
  to/.

  El propsito de Linux International, http://www.li.org es promover el
  desarrollo y el uso de Linux.

  El Linux Documentation Project (Proyecto para la Documentacin de
  Linux)
  incalculable para los promotores de Linux.

  En el Linux Center Project, http://www.portalux.com/ tiene un ndice
  temtico de recursos acerca de Linux y software libre.

  El servidor de Linux Business Applications, http://www.m-
  tech.ab.ca/linux-biz/ ofrece un foro para que organizaciones que
  dependen de Linux para operaciones diarias de negocios, compartan sus
  experiencias.

  En Linux Enterprise Computing, http://linas.org/linux/ y Freely
  Redistributable Software in Business,
  http://www.cyber.com.au/misc/frsbiz/ se cubren recursos y tpicos de
  inters para aquellos que utilicen Linux en un ambiente comercial de
  empresa privada.

  El propsito de Linux Advocacy Project (Proyecto para la Defensa de
  Linux)  http://www.10mb.com/linux/ es el de alentar a los
  desarrolladores de aplicaciones comerciales a ofrecer versiones
  nativas en Linux de su software.

  El programa de Linux CD and Support Giveaway
  http://emile.math.ucsb.edu:8000/giveaway.html est ayudando a que
  Linux est disponible en mayor nmero, por medio de la accin de
  alentar la reutilizacin de los CD-ROMs de Linux.

  El servidor de Specialized Systems Consultants, Inc. (SSC)
  http://www.ssc.com/ aloja al servidor de Linux Resources,
  http://www.linuxresources.com/ y publica la revista Linux Journal,
  http://www.ssc.com/lj/.

  La lista de correo linux-biz, http://www.lege.com/linux-biz.html es un
  foro creado para discutir el uso de Linux en el ambiente empresarial.

  La encuesta sobre Linux en Sistemas de Misin Crtica,
  http://www.pckassa.com/mc-doc/ documenta implantaciones con xito de
  sistemas existentes que tienen una gran carga y estn corriendo 24
  horas al da.

  Existen algunas publicaciones en-lnea que se dedican a cubrir Linux.
  Estas incluyen:


    LinuxFocus: (disponible en multitud de idiomas)
     http://mercury.chem.pitt.edu/~angel/LinuxFocus/


    Linux Gazette, http://www.ssc.com/lg/

    PLUTO Journal, http://www.pluto.linux.it/journal/.


  Enlaces adicionales a publicaciones en-lnea pueden encontrarse en el
  Linux Documentation Project,
  http://sunsite.unc.edu/LDP/links.html#misc y en el Linux Center
  Project, http://www.linux-
  center.org/fr/informations/journals/index.html.


  5.  Promocin del uso de Linux



    Comparta sus experiencias personales (buenas o malas) con Linux.
     Todo el mundo sabe que el software tiene errores y limitaciones y
     si slo tenemos comentarios resplandecientes acerca de Linux, no
     estaramos siendo honestos. A m me encanta comentarle a la gente
     acerca de mis cuatro reinicializadas (de tres programadas) del
     sistema en tres aos.


    Si alguien tiene un problema que Linux puede resolver, ofrzcase
     para proporcionarle referencias a la informacin apropiada (pginas
     web, artculos de revistas, libros, consultores, etc....). Si no ha
     llevado a cabo la solucin propuesta, exprsese en tal sentido.

    Si se encuentra disponible para hacer presentaciones acerca de
     Linux regstrese en http://www.ssc.com/linux/lsb.html.

    Ofrezca su ayuda a quien est comenzando a usar Linux. Hgale un
     seguimiento para asegurarse que pudo usar el sistema de manera
     efectiva.

    Algunas personas todava creen que Linux y sistemas similares
     operan nicamente en modo texto. Hgalos conscientes de la
     disponibilidad de aplicaciones grficas como Gimp,
     http://www.gimp.org/.

    Trate de responder a algn novato de las listas de noticias. Busque
     las preguntas difciles, puede ser el nico que responda,
     aprendiendo mucho en el proceso. Sin embargo, si no se tiene la
     confianza de poder responder con la solucin correcta, busque a
     alguien ms que s pueda.

    Busque pequeas firmas desarrolladoras de software y ofrzcales
     realizar una presentacin acerca de Linux.

    Si la oportunidad se presenta, haga una presentacin al grupo de
     Informtica de su empleador.

    Si necesita una aplicacin que no est soportada por Linux,
     contacte con el vendedor y pdale una versin nativa de Linux.

    Participe en eventos de la comunidad como el NetDay96
     http://www.netday96.com. Manteniendo como prioridad la de
     contribuir con el xito del evento, use la oportunidad para
     permitir que otros conozcan lo que Linux puede hacer por ellos.

    Considere siempre los puntos de vista de la persona a quien le est
     vendiendo Linux. Soporte, fiabilidad, interoperabilidad y costo
     son factores que un tomador de decisiones debe tener en cuenta. De
     los anteriores puntos, el coste es generalmente la parte menos
     importante de la ecuacin.

    La disponibilidad de soporte es, frecuentemente mencionada, una
     preocupacin cuando se considera la adopcin de Linux.  Compaas
     tales como


    Caldera, http://www.caldera.com/

    Cygnus Solutions, http://www.cygnus.com/

    Red Hat, http://www.redhat.com/

    S.u.S.E, http://www.suse.com/


     ofrecen soporte para algunos o todos los componentes de una
     distribucin tpica de Linux. Adicionalmente, el COMO Linux
     Consultants HOWTO, http://sunsite.unc.edu/LDP/HOWTO/Consultants-
     HOWTO.html incluye un listado de compaas proveedoras de soporte
     relacionado con Linux. Por supuesto, algunos de los mejores
     soportes se encuentran en el grupo de noticias news:comp.os.linux y
     en los grupos de noticias que contienen la palabra linux.


    Haga notar que la produccin de software de cdigo abierto tiene
     lugar en un ambiente de colaboracin abierta entre ingenieros de
     sistemas, programadores, escritores, probadores alfa y beta y
     usuarios finales, lo cual frecuentemente da como resultado
     productos robustos y bien documentados tales como Apache,
     http://www.apache.org/, GNU Emacs, http://www.gnu.org/, Perl,
     http://www.perl.com/ o el ncleo de linux, http://www.linuxhq.com/.

    Pngase de pie y djese contar! Regstrese en el Contador de Linux:
     http://counter.li.org/.

    Comunique los esfuerzos exitosos en la promocin de Linux a Linux
     International (li@li.org) y organizaciones similares.

    Busque un nuevo hogar para los CD-ROMs y libros de Linux que ya no
     necesite.  Dnelos a alguien interesado en Linux, una biblioteca
     pblica o un club escolar de computacin. Un libro y su CD-ROM
     sera muy apropiado para una biblioteca. En todo caso, por favor
     asegrese de no violar derechos de autor al hacer pblico el CD-
     ROM. Informe tambin a las directivas de la biblioteca que el
     material en CD-ROM es distribuible de forma gratuita. Haga un
     seguimiento para asegurarse de que quede disponible en los
     armarios.

    Cuando compre libros acerca de programas distribuidos con Linux,
     dele preferencia a los libros escritos por el autor del programa.
     Los beneficios que los autores reciben de las ventas de los libros
     pueden ser la nica retribucin econmica que ellos reciban a
     cambio de sus esfuerzos.

    Aliente a los sitios basados en Linux a que registren su sitio en
     la pgina de Powered by Linux
     http://sunsite.unc.edu/LDP/powered.html y sugirales que avisos
     relativos a Linux (http://www.cse.unsw.edu.au/~conradp/banners/),
     Apache, http://www.apache.org/, GNU http://www.gnu.org/, o perl,
     http://www.perl.com/, etc... sean presentados en estos sitios.

    Participe! Si usted se ha beneficiado del Software de fuentes
     abiertas, http://www.opensource.org/, por favor considere la
     posibilidad de ayudar a la comunidad del software libre por medio
     de algunas de estas acciones:


    Informando detalladamente de fallos en el programa

    escribiendo documentacin

    creando trabajo artstico

    suministrando asesora como administrador

    sugeriendo mejoras

    proporcionando soporte tcnico

    contribuyendo con programas

    donando equipo

    dando apoyo financiero.






  6.  Normas de Conducta



    Como representante de la comunidad de Linux, participe en las
     listas de distribucin de correo y las discusiones de los grupos de
     noticias con actitud profesional. Huya del uso de lenguaje vulgar y
     las ofensas personales. Considrese a s mismo como miembro virtual
     de la corporacin, teniendo al Sr. Torvalds como director de la
     misma. Sus palabras podrn tanto enaltecer como degradar la imagen
     que el lector se forme de la comunidad Linux.

    Evite las exageraciones y las pretensiones sin fundamento a toda
     costa. No es profesional y generar discusiones improductivas.

    Una respuesta meditada y bien razonada no slo proveer
     conocimiento profundo a los lectores; tambin incrementar el
     respeto por su conocimiento y sus habilidades.

    No muerda el anzuelo si lo incitan a la guerra verbal. Muchas veces
     esto degenera en argumentos del tipo Mi sistema operativo es mejor
     que el suyo. Describamos en forma precisa las capacidades de Linux
     y dejmoslo ah.

    Recuerde siempre que si insulta o le falta el respeto a alguien, su
     experiencia negativa puede llegar a ser compartida por muchos
     otros. Si llega a ofender a alguien, por favor trate de reparar su
     accin.

    Cntrese en lo que Linux tiene para ofrecer. No hay necesidad de
     vejar a la competencia. Contamos con un producto bueno y slido que
     se sostiene por s mismo.

    Respete el uso de otros sistemas operativos. Es cierto que Linux es
     una plataforma maravillosa, pero no satisface necesariamente las
     necesidades de todo el mundo.

    Refirase a cualquier otro producto por su propio nombre. No se
     gana nada intentando ridiculizar una compaa o sus productos
     usando ortografas creativas. Si esperamos respeto por Linux,
     entonces debemos respetar los dems productos.

    D crdito a quien es debido. Linux es tan slo el ncleo. Sin los
     esfuerzos del proyecto GNU, MIT, Berkeley y muchos otros muy
     numerosos para ser mencionados, el ncleo de Linux no sera til
     para la mayora.

    No insista en que Linux es la nica respuesta para una aplicacin
     particular. As como la comunidad de Linux venera la libertad que
     Linux les provee, las soluciones nicas basadas en Linux coartara
     a otros su libertad.


    Habr casos en los que Linux no es la respuesta. Sea el primero en
     reconocerlo y ofrezca otra solucin.


  7.  Grupos de Usuarios



    Participe en grupos locales de usuarios. Hay un ndice de Grupos de
     Usuarios de Linux registrados en
     http://sunsite.unc.edu/LDP/linux.html#general que es parte del LDP,
     http://sunsite.unc.edu/LDP/. Si no existe en su regin, inicie uno.

     El COMO User Group HOWTO, http://sunsite.unc.edu/LDP/HOWTO/User-
     Group-HOWTO.html cubre muchos aspectos relativos a la creacin de
     un grupo de usuarios y discute la importancia de la abogaca por
     Linux como uno de los principales objetivos de un grupo de
     usuarios.

    Suministre conferenciantes a las organizaciones interesadas en
     Linux.

    Publique comunicados de prensa,
     http://www.cse.unsw.edu.au/~conradp/linux/pr/ acerca de sus
     actividades para los medios de comunicacin locales.

    Ofrzcase como voluntario para configurar un sistema Linux que
     satisfaga las necesidades de alguna organizacin local comunitaria.
     Por supuesto, el proceso de instalacin debe incluir el
     entrenamiento para que el usuario de la comunidad pueda usar el
     sistema, igualmente provalos de una adecuada documentacin para el
     mantenimiento del sistema.

    Discuta el COMO de la Abogaca por Linux en una reunin. Promueva
     discusiones y aliente la propuesta de nuevas ideas.


  8.  Relaciones con Distribuidores Comerciales



    Cuando contemple la compra de hardware, pregntele al distribuidor
     acerca del soporte Linux y acerca de experiencias de otros usuarios
     con el producto en un ambiente Linux.

    Considere soportar a los distribuidores comerciales que venden
     productos y servicios basados en Linux. Alintelos para que listen
     sus productos en el COMO Linux Commercial HOWTO,
     http://sunsite.unc.edu/LDP/HOWTO/Commercial-HOWTO.html.

    Apoye a distribuidores comerciales que donen una parte de sus
     ingresos a organizaciones tales como la Free Software Foundation,
     http://www.gnu.org/help/help.html, el Linux Development Grant Fund,
     http://www.li.org/About/Fund/Welcome.html, el XFree86 Project,
     http://www.xfree86.org/donations.html o Software in the Public
     Interest, http://www.debian.org/donations.html. De ser posible,
     realice una donacin personal a estas u otras organizaciones que
     apoyen el software de fuentes abiertas, http://www.opensource.org/.

     No olvide que algunos empleadores ofrecen un programa matching
     gift.

    Si necesita una aplicacin que no sea soportada en Linux, contacte
     el distribuidor comercial y pdale una versin nativa en Linux.


  9.  Relaciones con los Medios de Comunicacin



    Linux International esta recolectando unos recortes de prensa
     (http://www.li.org/li/resources/pressclippings.shtml) que mencionan
     a Linux, GNU y otros programas libremente distribuibles. Cuando vea
     un artculo con tales caractersticas, por favor enve la siguiente
     informacin relativa al artculo a clippings@li.org:


    Nombre de la publicacin

    Direccin donde se pueda contactar al editor

    Nombre del autor

    Direccin donde se pueda contactar al autor

    Ttulo del artculo

    Nmero de la pgina donde el artculo comienza

    URL si el artculo se encuentra disponible en Internet

    Un resumen del artculo, incluyendo su opinin.


    Si usted cree que Linux no recibi un trato justo en algn
     artculo, revista o columna de prensa, enve los detalles,
     incluyendo la anterior informacin, a li@li.org para que la
     respuesta apropiada sea enviada al editor. Si usted contacta al
     editor personalmente, sea profesional y asegrese de la validez de
     sus argumentos.

    Si esta involucrado con un proyecto relativo a Linux, expida
     comunicados de prensa
     (http://www.cse.unsw.edu.au/~conradp/linux/pr/) a los servicios de
     noticias apropiados, de manera regular.


  10.  Reconocimientos


  El siguiente reconocimiento y agradecimiento va por todos los que
  contribuyeron, incluyendo:


    Kendall G. Clark    kclark@cmpu.net

    Bruno H. Collovini    buick@microlink.com.br

    Allan "Norm" Crain    allanc@idea-inc.com

    Jon "maddog" Hall   maddog@zk3.digital.com

    Greg Hankins gregh@cc.gatech.edu

    Eric Ladner eladner@goldinc.com

    Chie Nakatani jeanne@mbox.kyoto-inet.or.jp

    Daniel P. Kionka dkionka@worldtalk.com

    Nat Makarevitch nat@nataa.fr.eu.org

    Martin Michlmayr tbm@sypher.com

    Rafael Caetano dos Santos rcaetano@dijkstra.ime.usp.br

    Idan Shoham idan@m-tech.ab.ca

    Adam Spiers  adam.spiers@new.ox.ac.uk

    C. J. Suire suire@datasync.com

    Juhapekka Tolvanen juhtolv@silmu.cc.jyu.fi


    Lars Wirzenius liw@iki.fi

    Sean Woolcock  sbwoolco@eos.ncsu.edu


  11.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En lla encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.




























  Accesibilidad COMO
  Michael De La Rue, access-howto@ed.ac.uk
  webmaster@sidam.es
  v2.11, 28 de Marzo de 1997

  El Linux Accesibilidad-COMO cubre el uso de tecnologa adaptativa con
  Linux, en particular, usar tecnologa adaptativa para hacer Linux
  accesible a aquellos que no pueden usarlo de otra forma. Tambin cubre
  reas en las que Linux puede usarse dentro de soluciones de tecnologa
  adaptativa ms generales.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Poltica de distribucin

  2.      Comparacin de Linux con otros sistemas operativos

  2.1.    Comparacin general

  2.2.    Disponibilidad de tecnologa adaptativa

  2.3.    Usabilidad inherente

  3.      Invidentes

  3.1.    Ver la pantalla con mala visin

  3.1.1.  SVGATextMode

  3.1.2.  Sistema X Window

  3.1.2.1.        Diferentes resoluciones de pantalla

  3.1.2.2.        Aumento del tamao de la pantalla

  3.1.2.3.        Cambiar la fuente de pantalla

  3.1.2.4.        Cursores con hilos, etc...

  3.1.3.  Audio

  3.1.4.  Texto de gran tamao

  3.1.4.1.        LaTeX / TeX

  3.1.5.  Impresin de texto grande

  3.2.    Ayudas para aquellos que no pueden utilizar salida visual

  3.2.1.  Terminales Braille

  3.2.2.  Sntesis de voz

  3.2.3.  Controlar la salida de la consola

  3.2.4.  Reconocimiento ptico de caracteres

  3.3.    Empezando con Linux

  3.4.    Dispositivos Braille

  4.      Problemas de odo

  4.1.    Campanas visuales

  5.      Problemas fsicos

  5.1.    Imposibilidad de usar un ratn/puntero

  5.1.1.  Imposibilidad de usar un teclado

  5.1.1.1.        Otros dispositivos de entrada (slo sistema X Window)

  5.1.2.  Controlar hardware fsico desde Linux

  5.2.    Reconocimiento de voz

  5.3.    Configurar especialmente el teclado

  5.3.1.  Sistema X Window

  5.3.2.  Librarse de la repeticin automtica

  5.3.3.  Macros / Mucha entrada, pocas pulsaciones de teclas

  5.3.4.  Teclas persistentes

  6.      Temas generales de programacin

  6.1.    Intente proporcionar mltiples interfaces

  6.2.    Haga el software configurable.

  6.3.    Pruebe el software con los usuarios

  6.4.    Diferencie la salida

  6.5.    Licencias

  7.      Otras informaciones

  7.1.    Documentacin de Linux

  7.1.1.  La Linux Info-Sheet

  7.1.2.  El Meta PUF (preguntas de  uso frecuente) de Linux

  7.1.3.  El mapa de software para Linux (Linux software map, LSM)

  7.1.4.  Los COMOs (HOWTOs) de Linux

  7.1.5.  El PUF de Linux

  7.2.    Listas de correo electrnico

  7.2.1.  La lista linux-access  (ingls)

  7.2.2.  La lista linux-blind  (ingls)

  7.3.    Referencias en la WWW

  7.4.    Distribuidores

  7.5.    Fabricantes

  7.5.1.  Alphavision

  7.5.1.1.        Productos AT con soporte para Linux de Alphavision

  7.5.2.  Blazie Engineering

  7.5.2.1.        Productos AT de Blazie

  7.5.3.  Digital Equipment Corporation

  7.5.3.1.        Productos AT con soporte para Linux de DEC

  7.5.4.  Kommunikations-Technik Stolper GmbH

  7.5.4.1.        Productos AT con soporte Linux de KGT

  8.      Paquetes de software

  8.1.    Emacspeak

  8.2.    BRLTTY

  8.3.    screen

  8.4.    rsynth

  8.5.    xocr

  8.6.    xzoom

  8.7.    NFBtrans

  8.7.1.  Compilacin de NFBTrans en Linux

  8.8.    UnWindows

  8.8.1.  dynamag

  8.8.2.  coloreyes

  8.8.3.  border

  8.8.4.  un-twm

  9.      Hardware

  9.1.    Terminales Braille dirigidos por hardware

  9.1.1.  Braillex

  9.1.2.  Brailloterm

  9.1.3.  Parchear el ncleo para Braillex  y Brailloterm

  9.2.    Terminales Braille dirigidos por software

  9.2.1.  Tieman B.V.

  9.2.1.1.        CombiBraille

  9.2.2.  Alva B.V.

  9.2.3.  Dispositivos de Telesensory Systems Inc.

  9.2.3.1.        Powerbraille

  9.2.3.2.        Navigator

  9.2.4.  Braille Lite

  9.3.    Herramientas de sntesis de voz

  9.3.1.  DECTalk Express

  9.3.2.  Accent SA

  9.3.3.  Chip SPO256-AL2 Speak and Spell

  10.     Agradecimientos

  11.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  El objetivo de este documento es servir como una introduccin a las
  tecnologas disponibles para hacer Linux utilizable por personas que,
  por diversas discapacidades, habran tenido problemas con ello. En
  otras palabras, los grupos destinatarios de estas tecnologas son:
  invidentes, discapacitados visuales, sordos y discapacitados fsicos.
  En el momento en que se descubran nuevas tecnologas o informaciones
  sern incluidas.

  La informacin aqu mostrada no es slo para estas personas (aunque
  posiblemente sea el objetivo principal) sino tambin para permitir a
  los desarrolladores de Linux percatarse de las dificultades
  relacionadas.  Posiblemente el mayor problema es que, actualmente, muy
  pocos desarrolladores de Linux estn al tanto de los factores y de
  varias sencillas formas de hacer la vida ms fcil a los
  implementadores de estos sistemas. Esto, sin embargo, ha cambiado
  notablemente desde la aparicin de este documento, por un lado se ha
  reducido el trabajo potencial de recopilar informacin gracias a este
  documento, pero por otro se ha aumentado el trabajo de la gente
  dedicada a ello, algunos de ellos mencionados en los agradecimientos
  del documento.

  Por favor, enveme cualquier comentario o informacin adicional, u
  ofertas de ayuda a
  una lista de correo en un futuro, o pasar directamente a manos de un
  hipottico responsable del COMO, as que, por favor, no la use para
  correo personal.

  No tengo tiempo de seguir el desarrollo en todas las reas.
  Posiblemente ni siquiera lea un correo hasta que tenga tiempo de
  actualizar este documento. Aun y todo ser bienvenido. Si se enva un
  correo a la access-list o a la blind-list, posiblemente lo lea y aada
  informacin til al documento. Si no, por favor, enve una copia de
  cualquier cosa interesante a la direccin de correo electrnico
  anterior.

  El correo por el mtodo tradicional se puede enviar a

               Linux Access HOWTO
               23 Kingsborough Gardens
               Glasgow G12 9NH
               Scotland
               U.K.

  Y poco a poco recorrer el mundo hasta m. El correo electrnico ser
  unas semanas ms rpido.
  Puede ponerse en contacto personal conmigo mediante miked@ed.ac.uk.
  Debido a que utilizo filtros en el correo que recibo, por favor use la
  otra direccin si no se trata de correo personal. Es ms probable que
  as se llegue a una respuesta adecuada.

  1.1.  Poltica de distribucin

  El Accesibilidad-COMO tiene copyright  de Michael De La Rue.

  El Accesibilidad-COMO puede ser distribuido, a su eleccin, bajo los
  trminos de la Licencia Pblica GNU (GPL) versin 2 o superior, o los
  del Proyecto de Documentacin Linux (LDP).  Estas licencias deberan
  estar disponibles en el lugar del que sac este documento. Por favor,
  tenga en cuenta que los trminos de LDP no permiten la modificacin
  (salvo la traduccin), por lo que las versiones modificadas debern
  ser distribuidas bajo la licencia GPL.

  2.  Comparacin de Linux con otros sistemas operativos

  2.1.  Comparacin general

  El mejor sitio para saber ms de esto es en documentos tales como la
  Meta FAQ' (preguntas y respuestas acerca de las PUF de Linux)  y

  Las principales razones para que un invidente use Linux incluiran el
  hecho de que este sistema est equipado internamente con un completo
  soporte para trabajo en red, lo que proporciona acceso total a
  Internet.  Ms generalmente, los usuarios son atrados por el completo
  entorno de desarrollo incluido. Tambin, a diferencia de la mayora de
  los Entornos Grficos de Usuario (GUI)  modernos, la parte grfica de
  Linux (XWindow) est claramente separada del entorno subyacente, y hay
  un completo grupo de programas modernos tales como navegadores web y
  software de fax que trabajan directamente en el entorno no-grfico.
  Esto proporciona la forma de proveer caminos alternativos en el acceso
  a la funcionalidad del sistema; un buen ejemplo es Emacspeak.

  Para otros usuarios, la comparacin es posiblemente menos favorable y
  no tan clara. Personas con necesidades muy especficas y complejas
  encontrarn que el completo sistema de desarrollo incluido permite
  soluciones razonablemente personalizadas. Sin embargo, la mayor parte
  del software que existe en otros sistemas est todava empezando a
  estar disponible. Se est llevando a cabo ms desarrollo en casi todas
  las direcciones.

  2.2.  Disponibilidad de tecnologa adaptativa

  Prcticamente no hay nada comercial disponible especficamente para
  Linux.  Hay una notable cantidad de software de libre distribucin que
  puede ser til para la adaptacin, por ejemplo, una aplicacin de
  sntesis de voz, o algn programa de control por voz. Tambin hay una
  serie de paquetes de libre distribucin que proporcionan un buen apoyo
  para ciertas terminales Braille, por ejemplo.

  2.3.  Usabilidad inherente

  Linux tiene la gran ventaja sobre Windows de tener la mayora de su
  software orientado a lnea de comandos. Esto est cambiando y casi
  todo est disponible con una apariencia grfica. Sin embargo, debido a
  que en sus orgenes fue un sistema operativo de programadores, todava
  se escriben programas orientados a lnea de comandos, que cubren casi
  todas las nuevas reas de inters. Para el discapacitado fsico, esto
  significa que es fcil construir programas personalizados que se
  ajusten a sus necesidades. Para los invidentes, esto debera hacer
  fcil el uso con una herramienta de sntesis de voz o un terminal
  Braille en un previsible futuro.

  El sistema de mltiples consolas virtuales de Linux hace prctico el
  que una persona invidente trabajando directamente mediante Braille
  pueda usarlo como un sistema operativo multitarea.

  El sistema de ventanas utilizado por Linux (X11) viene con varias
  herramientas de programacin, y debera ser adaptable. Sin embargo, en
  la prctica, los programas adaptativos disponibles hasta ahora han
  sido ms primitivos que los de Mac o Windows. Son, en cambio,
  completamente gratuitos (frente a los miles de pesetas de los otros),
  y la calidad definitivamente est mejorando.

  En principio debera ser posible montar un sistema Linux completo para
  una persona invidente por unas 60-80.000 pts (PC baratillo + tarjeta
  de audio). Esto contrasta con los cientos de miles de otros sistemas
  (software de lectura de pantalla/hardware de sntesis de voz).
  Todava tengo que verlo. Dudo que funcionase en la prctica porque el
  software de sntesis de voz disponible para Linux no es lo
  suficientemente bueno. Para un discapacitado fsico, la limitacin
  todava est en la caresta del hardware de entrada de datos.

  3.  Invidentes

  Voy a usar dos categoras generales. Las personas que tienen
  deficiencias visuales y necesitan ayuda para ver/descifrar/seguir el
  texto y aquellas que son incapaces de usar ninguna interfaz visual.

  3.1.  Ver la pantalla con mala visin

  Aqu hay varios problemas diferentes. A veces el aumento de tamao
  puede ser til, pero ah no se acaba todo. A veces las personas no
  pueden percibir la accin, otras no pueden ver el cursor hasta que se
  mueve. Esto requiere una gama de tcnicas, la mayora de las cuales
  estn siendo aadidas a las X.

  3.1.1.  SVGATextMode

  Este programa es til para mejorar la visibilidad de la pantalla de
  texto normal que proporciona Linux. La pantalla muestra 80 caracteres
  horizontalmente y 25 verticalmente. Esto se puede cambiar (a la vez
  que mejorar la calidad de estos caracteres) utilizando SVGATextMode.
  El programa permite un acceso completo a los modos posibles de una
  tarjeta SVGA.  Por ejemplo, el texto se puede alargar de forma que
  solo aparezcan en pantalla 50 por 15 caracteres. No hay una forma
  fcil de aumentar una determinada zona de la pantalla, pero se puede
  variar su tamao a voluntad.

  3.1.2.  Sistema X Window

  Para las personas capaces de ver la pantalla hay numerosas formas de
  mejorar las X Window. Estas no forman an un conjunto de
  caractersticas coherente, pero si se configuran bien, pueden
  resolverse diversos problemas.

  3.1.2.1.  Diferentes resoluciones de pantalla

  El servidor X puede configurarse a diferentes resoluciones (modos). La
  simple pulsacin de una tecla puede cambiar entre ellas permitiendo
  ver texto difcil de leer.

  En el fichero /etc/XF86Config, hay una entrada en la seccin de la
  pantalla (screen) con una lnea que comienza con los modos. Si por
  ejemplo, se pone

               Modes   "1280x1024" "1024x768" "800x600" "640x480" "320x240"

  con cada modo correctamente configurado (lo que requiere un monitor
  razonablemente bueno para la mayor resolucin), ser capaz de tener un
  aumento de tamao de hasta el 400% cambiando entre los diferentes
  modos, utilizando CTRL+ALT+'+' (del teclado numrico) y CTRL+ALT+'-'
  (del teclado numrico)

  Moviendo el ratn por la pantalla podremos situarnos en la zona que
  nos interese. Para ms detalles sobre la configuracin vase la
  documentacin que se incluye con el servidor X XFree86.

  3.1.2.2.  Aumento del tamao de la pantalla

  Hay numerosos programas de lupa conocidos, xmag aumentar una zona de
  la pantalla tanto como se necesite, pero es muy primitivo.  Otro es
  xzoom. Previamente he dicho que tena que haber algo mejor que xmag,
  bueno, pues es ste. Vase la seccin ``xzoom''.

  Otro programa disponible es puff. Est especficamente orientado hacia
  los discapacitados visuales. Proporciona caractersticas como una caja
  alrededor del puntero del ratn de forma que sea ms fcil
  localizarlo. Otras cualidades interesantes de puff son las que,
  correctamente configuradas, son capaces de seleccionar y aumentar
  porciones de pantalla en el momento en que cambian. Sin embargo parece
  que hay algn tipo de interaccin entre xpuff y el manejador de
  ventanas que hace difcil su uso. Cuando se utiliza con fvwm, no
  responde a la pulsacin de ninguna tecla, sin embargo esta situacin
  se evita usando twm.

  El ltimo programa que he visto trabajar es el dynamag. De nuevo ste
  tiene caractersticas especficas como la capacidad de seleccionar una
  determinada zona de la pantalla y monitorizarla, refrescando la imagen
  aumentada a intervalos regulares de pocas centsimas de segundo o
  varios segundos. Dynamag es parte de la distribucin UnWindows. Vase
  la seccin ``UnWindows'' para ms detalles.
  3.1.2.3.  Cambiar la fuente de pantalla

  Las fuentes de pantalla deberan poder cambiarse en cualquier software
  para X correctamente escrito. Se puede entonces hacerlas lo
  suficientemente grandes como para leerlas. Esto generalmente se lleva
  a cabo poniendo una lnea en el fichero .Xdefaults del directorio
  propio. Aadiendo las lneas correctas en este fichero se pueden
  cambiar las fuentes de los programas, por ejemplo

               Emacs.font: -sony-fixed-medium-r-normal-16-150-75-75-c-80-iso8859-*

  Para conocer las fuentes disponibles, utilice el programa xfontsel
  bajo X.

  Debera haber forma de cambiar esto de manera ms general, para que
  todo aparezca con la fuente aumentada. Esto se podra hacer
  renombrando las fuentes, y diciendo a los programas generadores de
  fuentes que utilicen un nivel de escalado diferente. Si alguien
  consigue que esto funcione, por favor que me enve los detalles de
  cmo lo hizo.

  3.1.2.4.  Cursores con hilos, etc...

  Para la gente que tiene dificultad siguiendo el cursor, aqu hay
  algunas cosas que pueden ayudar:

    cursores con hilos (lneas horizontal y vertical desde el borde de
     la pantalla).

    cursores parpadeantes (cursores que se iluminan al pulsar una
     tecla).

  No conozco ningn programa que proporcione especficamente un cursor
  de hilos. Puff, mencionado en la seccin anterior, proporciona una
  caja destelleante alrededor del cursor que puede hacer
  considerablemente ms fcil su localizacin.

  Lo mejor que se puede hacer es cambiar el mapa de bits del cursor.
  Cree un fichero de mapa de bits como usted desee, y otro con la misma
  forma, pero completamente negro. Convirtalos a formato XBM y ejecute

               xsetroot -cursor ficherocursor.xbm cursor-negro.xbm

  Realmente, si conoce el uso de mscaras, cursor-negro.xbm no tiene por
  qu ser completamente negro, pero es mejor comenzar con algo as. El
  fichero .Xdefaults controla los cursores que utiliza la aplicacin
  actual.  Para ampliar la informacin, vase el X Big Cursor mini-
  HOWTO, de Joerg Schneider schneid@ira.uke.de.

  3.1.3.  Audio

  Mientras el usuario tenga la capacidad de or, la entrada de audio
  puede ser muy til para crear un entorno ms amigable y comunicativo.
  Para una persona con mala visin, las indicaciones de audio pueden
  ayudar a localizar el cursor (vase ``UnWindows''). Para un modo
  consola utilizando Emacspeak (vase ``Emacspeak''), los iconos de
  audio disponibles proporcionarn caractersticas muy tiles.

  La configuracin del audio en Linux est explicada en el Sonido-Como
  (vase ``Documentacin de Linux''). Una vez que el sonido est
  configurado, se pueden producir salidas de audio con el comando play
  incluido en la mayora de las versiones de Linux.  Esta es la forma de
  utilizar mi versin de UnWindows.

  3.1.4.  Texto de gran tamao

  Imprimir en gran tamao en Linux es bastante fcil. Hay varias
  tcnicas.

  3.1.4.1.  LaTeX / TeX

  LaTeX es un sistema de preparacin de documentos extremadamente
  potente.  Puede ser utilizado para imprimir documentos de casi
  cualquier naturaleza en tamao grande. Aunque algo complicado de
  aprender, muchos documentos se producen usando LaTeX, o el programa de
  formateo de texto subyacente, TeX.

  Esto producir texto razonablemente grande

               \font\magnifiedtenrm=cmr10 at 20pt      % configurar fuente grande
               \magnifiedtenrm
               Esto es un texto grande
               \bye

  Para ms detalles, vase el libro de LaTeX, disponible en cualquier
  librera. Hay tambin un gran nmero de introducciones disponibles en
  Internet.

  3.1.5.  Impresin de texto grande

  Casi todas las impresiones en Linux utilizan postscript, y Linux puede
  dirigir casi cualquier impresora usndolo. Yo imprimo el material de
  enseanza en texto grande en una Epson matricial.

  Para los usuarios de X, hay varias herramientas disponibles que pueden
  producir texto grande. Estas incluyen LyX, y varios procesadores de
  texto comerciales.

  3.2.  Ayudas para aquellos que no pueden utilizar salida visual

  Para alguien que es totalmente incapaz de utilizar una pantalla normal
  hay dos alternativas, Braille o voz. Obviamente para la gente que
  adems tenga dificultades auditivas, la voz no es siempre til, as
  que el Braille siempre va a ser importante.

  Si pudiese elegir, qu elegira? Este es un buen tema de debate. El
  lenguaje (la voz) es rpido de usar, razonablemente barato y
  especialmente bueno para aplicaciones textuales (por ejemplo la
  lectura de un documento largo, como ste). Los problemas incluyen la
  necesidad de un entorno silencioso, y posiblemente sern necesarios
  auriculares para trabajar sin molestar a otros y evitar ser escuchado
  (no disponible para todos los programas de sntesis de voz).

  El Braille es mejor para aplicaciones en las que una disposicin
  precisa es importante (por ejemplo en hojas de clculo).  Tambin
  puede ser algo ms conveniente si se quiere comprobar el principio de
  una frase cuando se llega al final. El Braille es, sin embargo, mucho
  ms caro y lento para leer texto.  Obviamente, cuanto ms use el
  Braille, ms rpido lo har. El grado II de Braille es difcil de
  aprender, pero casi merece la pena debido a su mayor rapidez. Esto
  significa que si no utiliza Braille durante algn tiempo, nunca podr
  descubrir su verdadero potencial y decidir por usted mismo. De todas
  formas, ya he dicho bastante sobre este tema tan lleno de
  controversia.

  Basado en el original de James Bowden jrbowden@bcs.org.uk

  3.2.1.  Terminales Braille

  Los terminales Braille normalmente constan de una o dos lneas de
  Braille. Teniendo en cuenta que un terminal tiene 80 caracteres de
  ancho y normalmente 40 de largo, estn algo limitados. Personalmente
  conozco 2 tipos

    Terminales Braille dirigidos por hardware.

    Terminales Braille dirigidos por software.

  El primer tipo funciona cuando el ordenador est en modo texto y lee
  la memoria de pantalla directamente. Vase la seccin ``Terminales
  Braille dirigidos por hardware''.

  El segundo tipo de terminales Braille es similar, en varios sentidos,
  a la pantalla de un terminal normal del tipo de los que soporta Linux
  automticamente. Desafortunadamente, necesitan software especial para
  hacerlos utilizables.

  Hay dos paquetes que ayudan con esto. El primero, BRLTTY, trabaja con
  bastantes tipos de pantallas Braille y los autores estn dispuestos a
  soportar ms si la informacin necesaria se encuentra disponible.
  Actualmente BRLTTY soporta la serie CombiBraille de Tieman B.V., la
  serie ABT3 de Alva B.V., y las series PowerBraille y Navigator de
  Telesensory Systems Inc. El uso del Braille Lite de Blazie Engineering
  como pantalla Braille est desaconsejado, pero el soporte puede ser
  renovado a peticin.  Vase la seccin ``Terminales Braille dirigidos
  por software''.

  El otro paquete que conozco es el Braille Enhanced Screen.  Est
  diseado para trabajar en sistemas UNIX as como Linux. Esto debera
  permitir al usuario acceder a una terminal Braille con muchas
  caractersticas tiles, como la capacidad de ejecutar diferentes
  programas en distintas 'terminales virtuales' al mismo tiempo.

  3.2.2.  Sntesis de voz

  La sntesis de voz toma, normalmente, un texto ASCII y lo convierte en
  salida hablada real. Es posible tener esto implementado como hardware
  o software. Desafortunadamente, las herramientas de sntesis de voz de
  libre distribucin para Linux no son, como se sabe, lo suficientemente
  buenas como para usarlas como nico medio de salida.

  La alternativa es la sntesis por hardware. La principal herramienta
  que conozco es DECtalk, de Digital, manejado por Emacspeak. Sin
  embargo, ahora (marzo del 97) se acaba de anunciar un manejador para
  el Doubletalk. Usando Emacspeak, el acceso total a las facilidades de
  Linux es bastante sencillo. Esto incluye el uso normal de la interfaz
  de comandos, un navegador web y varias otras caractersticas
  similares, como email. Aunque con programas que no entiende acta
  solamente como un lector de texto plano (similar al de IBM para PC),
  con los que si entiende puede proporcionar un control mucho ms
  sofisticado. Vase la seccin ``Emacspeak''.

  3.2.3.  Controlar la salida de la consola

  Cuando se inicia, Linux imprime todos sus mensajes en la pantalla
  normal (pantalla visual), aunque esto se podra cambiar si alguien con
  conocimientos bsicos para programar el ncleo quisiera.  Esta forma
  de arranque implica que es imposible para la mayora de los
  dispositivos Braille obtener informacin sobre lo que Linux est
  haciendo antes de que el sistema est completamente operativo.

  Unicamente en ese momento podr arrancar el programa necesario para su
  accesibilidad. Si se usa el BRLTTY, y se ejecuta muy pronto en el
  proceso de arranque, a partir de ese momento se podrn leer los
  mensajes en la pantalla. La mayora del software y el hardware todava
  tendrn que esperar a que el sistema est completamente listo. Esto
  hace que el hecho de administrar un sistema Linux sea difcil, pero no
  imposible, para una persona con discapacidades visuales. Sin embargo,
  una vez que el sistema est listo, se puede hacer un desplazamiento
  hacia atrs pulsando (en el dispositivo de teclado por defecto)

               SHIFT+RePag

  Hay un sistema Braille que puede utilizar la consola directamente,
  llamado Braillex. Est diseado para leer directamente de la memoria
  de pantalla. Desafortunadamente el desplazamiento normal del terminal
  se tropieza con esto. Si est usando un ncleo superior al 1.3.75,
  sencillamente teclee

               linux no-scroll

  en el prompt de LILO o configure LILO para que lo haga
  automticamente. Si tiene una versin anterior de Linux, vaya a la
  seccin ``''.

  Otra cosa til que se puede hacer es utilizar sonidos para indicar
  cundo se llega a cada etapa del proceso de arranque. (sugerencia de
  T.V. Raman)

  3.2.4.  Reconocimiento ptico de caracteres

  Existe un programa de Reconocimiento Optico de Caracteres (OCR) de
  libre distribucin para Linux llamado xocr. En principio, si fuese
  suficientemente bueno, este programa permitira a los discapacitados
  visuales leer libros normales hasta cierto punto (la precisin del OCR
  nunca es suficiente...). Sin embargo, de acuerdo con la documentacin,
  este programa necesita una preparacin para reconocer la fuente en
  particular que se va a utilizar y yo no tengo ni idea de cmo va este
  programa ya que no tengo el hardware para probarlo.

  3.3.  Empezando con Linux

  Empezar a aprender Linux puede parecer difcil e intimidatorio para
  alguien que proviene de un entorno DOS o de ninguno. Hacer lo
  siguiente puede ayudar:

    Aprender a usar Linux (o UNIX) en el sistema de otra persona antes
     de montar el nuestro.

    Inicialmente controlar Linux desde la propia terminal Braille o de
     voz. Si planea usar la voz, tendr que aprender Emacs antes. Aunque
     tambin puede ir aprendiendo sobre la marcha. Vea ms abajo.

    Si proviene de un entorno MS-DOS, lea el DOS2Linux Mini-HOWTO
     (vase ``Documentos HOWTO de Linux'').

  El Emacspeak HOWTO de Jim Van Zandt jrv@vanzandt.mv.com cubre esto con
  ms detalle (vase ``Documentos HOWTO de Linux'').

  Si planea usar Emacspeak, debera saber que Emacspeak no le ensea
  Emacs, as que sera muy til un conocimiento previo de Emacs. Dicho
  esto, ciertamente no se necesita saber mucho sobre Emacs para usar
  Emacspeak. De hecho, una vez que Emacspeak est instalado y
  ejecutndose, proporciona una gil interfaz ante el rico conjunto de
  documentacin en lnea incluyendo las 'info pages', y hace ms fcil
  aprender lo que necesita.

  Convertirse en un gur del Emacs y del Emacspeak, sobre todo si
  pretende usarlo como reemplazo de las X Window como hago yo implicar
  conocer muchas extensiones Emacs; pero esto es un proceso incremental,
  y no necesita hacerse en un da' - T.V. Raman

  Otra opinin que puede ser interesante son las cintas de entrenamiento
  RNIB, que incluyen una sobre el tema UNIX. Estas se pueden obtener de

               RNIB
               Customer Sevices
               PO Box 173
               Peterborough
               Cambridgeshire PE2 6WS
               Tel: 01345 023153       (posiblemente solo funcione en el Reino
       Unido)

  3.4.  Dispositivos Braille

  Linux debera ser la plataforma perfecta desde la que manejar un
  dispositivo Braille. Hay varias herramientas de formateo destinadas
  especficamente para un dispositivo de anchura fija. Un dispositivo
  Braille puede ser conectado al puerto serie utilizando los mecanismos
  de impresin estndar de Linux. Para ms informacin, vase el Linux
  Printing HOWTO.

  Hay un paquete de software de libre distribucin de la 'National
  Federation for the Blind' americana disponible para Linux que acta
  como un traductor multilingue de grado II, llamado NFBtrans. Vase la
  seccin ``NFBtrans''.

  4.  Problemas de odo

  La mayor parte del tiempo no hay problemas para que una persona con
  dificultades auditivas utilice un ordenador. Casi toda la salida es
  visual. Sin embargo hay situaciones en las que se usa una salida de
  audio.  Para estas ocasiones, el problema se puede solventar
  utilizando en su lugar una salida visual.

  4.1.  Campanas visuales

  Tradicionalmente, los ordenadores hacen 'bip' cuando algn programa
  les enva un cdigo especial. Normalmente esto se usa para conseguir
  la atencin del usuario y para poco ms.  La mayora del tiempo es
  posible reemplazar esto por un destello de la pantalla (o emulador de
  terminal), aunque la forma de hacer esto es muy variable.

     xterm (bajo X)
        para xterm se puede cambiar la configuracin pulsando el botn
        central del ratn mientras se tiene pulsada la tecla CTRL, o
        poniendo una lnea con

     (sin las comillas, claro!) en el fichero .Xdefaults del directorio
     propio.

     la consola
        la consola es ligeramente ms compleja. Por favor vea el Visual
        Bell Mini HOWTO de Alessandro Rubini, disponible con el resto de
        documentacin Linux (vase ``Documentacin de Linux'').
        Generalmente la configuracin se tiene que hacer para cada
        aplicacin, o si no, cambiando el mismo ncleo de Linux.

  5.  Problemas fsicos

  Muchos de estos problemas tienen que considerarse individualmente. Las
  necesidades del individuo, las formas en que puede generar una entrada
  y otros factores varan tanto que todo lo que este HOWTO puede ofrecer
  es un conjunto general de indicaciones sobre software til y
  experiencias.

  5.1.  Imposibilidad de usar un ratn/puntero

  La movilidad limitada puede hacer difcil usar un ratn.  Para algunas
  personas, un dispositivo trackball puede ser una buena solucin, pero
  para otras la nica posibilidad como dispositivo de entrada es el
  teclado (o incluso algo que simule un teclado). Para un uso normal de
  Linux, esto no debera ser un problema (vase la seccin ``Configurar
  especialmente el teclado''), pero para los usuarios de X, esto puede
  causar graves problemas bajo determinadas circunstancias.

  Afortunadamente, el manejador de ventanas fvwm ha sido diseado para
  el uso sin puntero y la mayora de las cosas pueden hacerse as. Yo
  mismo lo hago as cuando pierdo mi ratn (no pregunte!) o
  sencillamente no quiero usarlo. Fvwm est incluido en todas las
  distribuciones Linux que conozco. El uso de otros programas depender
  de su capacidad para aceptar pulsaciones de teclas. Muchos programas
  de X lo hacen para todas las funciones. Otros muchos no. Los botones
  de ratn persistentes, que se supone que estn presentes en la versin
  actual de X facilitan todo esto.

  5.1.1.  Imposibilidad de usar un teclado

  La gente que no puede usar un teclado normalmente, puede a veces
  usarlo mediante dispositivos especiales de adaptacin como punteros
  bucales. Esto requiere una configuracin especial del teclado.  Vase
  la seccin ``Configurar especialmente el teclado''.

  5.1.1.1.  Otros dispositivos de entrada (slo sistema X Window)

  Para algunos, el teclado no se puede usar en absoluto, y solo estn
  disponibles dipositivos sealadores. En este caso, no hay posible
  solucin para la consola Linux, y debern ser usadas las X.  Si se
  pudiese hacer que la entrada de las X usase el dispositivo y el
  software correcto para convertir la entrada del dispositivo sealador
  en caracteres (todava no lo he visto) entonces cualquier dispositivo
  sealador podra ser usado sin un teclado.

  Hay un cierto nmero de dispositivos que merecen ser considerados para
  tal entrada, como pantallas tctiles, o punteros oculares.  Muchos de
  estos necesitarn que se escriba un manejador de dispositivo para
  ellos. Esto no es terriblemente difcil si la documentacin necesaria
  est disponible, pero requiere a alguien con buen nivel de
  programacin en C. Vase la Linux Kernel Hacker's Guide y otro
  material de referencia sobre el ncleo para ms informacin. Una vez
  listo, debera ser posible utilizar estos dispositivos como un ratn
  normal.

  5.1.2.  Controlar hardware fsico desde Linux

  El principal grupo de inters es el Linux Lab Project.  Generalmente,
  la mayor parte del hardware GPIB (un interfaz estndar para el
  equipamiento cientfico, tambin conocido como el bus IEEE)  puede ser
  controlado. Esto da mucho potencial a proyectos de accesibilidad muy
  ambiciosos. Por lo que yo s, todava no se ha intentado ninguno.
  5.2.  Reconocimiento de voz

  El reconocimiento de voz es una herramienta muy poderosa para
  habilitar el uso del ordenador. Hay dos sistemas de reconocimiento de
  voz para Linux, que yo conozca, ears, descrito como 'el reconocimiento
  no es ptimo, pero est bien para jugar y ser mejorado', y AbbotDemo
  'un sistema de reconocimiento de voz continua e independiente del
  usuario' que es mucho ms interesante, aunque no est disponible para
  uso comercial sin un acuerdo previo.  Vase el Linux Software Map para
  ms detalles (vase ``Documentoacin de Linux'').

  5.3.  Configurar especialmente el teclado

  5.3.1.  Sistema X Window

  El ltimo servidor X que viene con Linux incluye numerosas
  caractersticas que pueden ayudar en la entrada de datos. Estas
  caractersticas incluyen StickKeys, MouseKeys, RepeatKeys, BounceKeys,
  Slowkeys y TimeOut. Estas permiten la adaptacin del teclado a las
  necesidades del usuario.  Se proporcionan como parte de la extensin
  XKB en versiones de X superiores a la 6.1. Para averiguar su versin y
  comprobar si tiene la extensin instalada, puede probar

               xdpyinfo -queryExtensions

  5.3.2.  Librarse de la repeticin automtica

  Para quitar la repeticin de teclas en la consola de Linux ejecute el
  siguiente comando (creo que tiene que ejecutarse una vez por consola;
  un buen sitio donde ponerlo sera en los ficheros de login, .profile o

               setterm -repeat off

  Para librarse de la repeticin automtica en cualquier servidor X, se
  puede usar el comando

               xset -r

  que se puede meter en el fichero que se ejecuta al iniciar las X (a
  veces

  Ambos comandos merecen ser investigados para encontrar ms formas de
  cambiar el comportamiento de la consola.

  5.3.3.  Macros / Mucha entrada, pocas pulsaciones de teclas

  A veces en situaciones como esta, el mayor problema es la velocidad de
  entrada de datos. Aqu el objetivo primordial es conseguir el mayor
  nmero de comandos con el menor nmero de teclas pulsadas.  Para
  usuarios de la interfaz de comandos (bash/tcsh), se debera mirar las
  pginas del manual, en particular la forma que tiene Linux de
  completar comandos y nombres de ficheros (pulse la tecla TAB y el bash
  tratar de adivinar qu viene despus).  Para informacin sobre macros
  que proporcionan secuencias de comandos con solo pulsar una tecla,
  mire el Keystroke HOWTO.

  5.3.4.  Teclas persistentes

  Las teclas persistentes son una caracterstica que permite a alguien
  que solo pueda pulsar un botn a la vez, utilizar un teclado con todas
  las teclas modificadoras como SHIFT y CTRL.  Estas teclas, en lugar de
  tener que mantenerlas presionadas mientras se pulsa la otra tecla, se
  convierten en algo como el BLOQ MAYUS, y se mantienen pulsadas solas,
  mientras la otra tecla es pulsada. Entonces pueden liberarse o seguir
  pulsadas, dependiendo de lo que se necesite.  Para informacin sobre
  cmo preparar esto, vase el Linux Keyboard HOWTO, especialmente la
  seccin 'Solo puedo usar un dedo para escribir' (seccin 15 en la
  versin que tengo yo).  - Informacin por Toby Reed.

  6.  Temas generales de programacin

  La mayora de los puntos que merecen tener en cuenta son los mismos
  cuando se escribe software diseado para ser de utilidad para la
  accesibilidad que cuando se intenta seguir un buen diseo.

  6.1.  Intente proporcionar mltiples interfaces

  Si su software es utilizable slo mediante una interfaz grfica, puede
  llegar a ser muy difcil usarlo por alguien que no ve. Si es
  utilizable slo mediante lnea de comando, alguien que no pueda
  teclear tendr muchos problemas.

  Proporcione atajos de teclado as como el uso del puntero X normal
  (generalmente el ratn). Entonces puede estar casi seguro de que los
  usuarios podrn generar pulsaciones de teclado de un modo u otro.

  6.2.  Haga el software configurable.

  Si es sencillo cambiar las fuentes, entonces las personas podrn
  cambiarlas a una que puedan leer. Si se puede cambiar el esquema de
  colores, ser ms probable que la gente que tenga problemas para
  distinguirlos pueda usarlo. Si se pueden cambiar las fuentes
  fcilmente, entonces los personas con discapacidades visuales
  encontrarn su software ms til.

  6.3.  Pruebe el software con los usuarios

  Si un cierto nmero de personas cada una con diferentes tipos de
  problemas de accesibilidad prueban su software, ser ms fcil sealar
  fallos especficos. Obviamente, esto no ser prctico para todo el
  mundo, pero siempre puede valer como indicacin.

  6.4.  Diferencie la salida

  En la medida de lo posible, haga que cada parte del programa sea
  claramente identificable. D un formato especfico a los mensajes de
  error para poder identificarlos. Bajo X, asegrese de que cada parte
  de su ventana tenga un nombre de forma que cualquier software lector
  de pantalla pueda identificarlo.

  6.5.  Licencias

  Parte del software para Linux (aunque ninguno de los programas clave)
  tiene licencia del tipo 'no para uso comercial'. Esto puede ser
  bastante malo para una persona que comienza a utilizar el software
  para uso personal, y entonces empieza a ser capaz de realizar un
  trabajo que de otro modo no podra. Esto podra posibilitarle una
  liberacin sobre las dependencias econmicas y de otros tipos que
  tiene respecto a otras personas. Incluso si el autor del software es
  favorable a hacer excepciones, esto hace al usuario vulnerable tanto a
  cambios en las condiciones comerciales (que alguna compaa compre los
  derechos) como al rechazo de la gente para la que pudiera trabajar
  (algunas compaas son demasiado paranoicas en lo que se refiere a las
  licencias). Es mucho mejor evitar este tipo de licencias en la medida
  de lo posible. Se puede obtener proteccin frente a un abuso comercial
  mediante licencias ms especficas como la Licencia Pblica de GNU, o
  la Licencia Artstica.

  7.  Otras informaciones

  7.1.  Documentacin de Linux

  La documentacin de Linux es necesaria para su uso, y la mayora de
  los documentos aqu mencionados deberan estar incluidos en las
  versiones recientes de Linux, en cualquier distribucin.

  Si quiere conseguir la documentacin de Internet, hay varios lugares.
  Estos deberan tener un reflejo en la mayora de los lugares de
  descarga FTP ms importantes.

    ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/

    tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/

    sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/

  7.1.1.  La Linux Info-Sheet

  Una explicacin simple y efectiva de lo que es Linux. Es una de las
  cosas que debe ojear cuando quiera explicar por qu quiere Linux y
  para qu sirve.

  La Linux Info Sheet est disponible en
  y en sus servidores rplica.
  7.1.2.  El Meta PUF (preguntas de  uso frecuente) de Linux

  Lista de otras fuentes de informacin, mucho ms completa que esta. El
  Meta PUF est disponible en
  ftp://sunsite.unc.edu/docs/howto/translations/spanish/MetaFaq-Como y
  en sus servidores rplica.

  7.1.3.  El mapa de software para Linux (Linux software map, LSM)

  Es la lista de software disponible para Linux en Internet. La mayora
  de los programas que aqu se citan se encontraron as. El LSM est
  disponible en http://www.boutell.com/lsm, de forma que se pueden
  realizar bsquedas sobre l.  Tambin est disponible en forma de
  fichero de texto en todos los dems lugares FTP mencionados en
  ``Documentacin de Linux''.

  7.1.4.  Los COMOs (HOWTOs) de Linux

  Los COMOs son la principal documentacin de Linux. Este Accesibilidad-
  COMO es un ejemplo.

  El servidor web del Proyecto de Documentacin de Linux (Linux
  Documentation Project, LDP) que genera esta informacin es
  http://sunsite.unc.edu/mdw/linux.html. Hay adems algunas compaas
  que los proporcionan en forma de libro. Contacte con un distribuidor
  local de Linux para ms detalles.

  Los COMOs de Linux estarn en el directorio HOWTO en cualquiera de los
  lugares FTP mencionados en la seccin ``Documentacin de Linux''.

  7.1.5.  El PUF de Linux

  Es una lista de 'preguntas de uso frecuente' con sus respuestas, que
  debera resolver las dudas ms comunes. El PUF est disponible en
  http://www.cl.cam.ac.uk/users/iwj10/linux-faq as como en todos los
  lugares FTP mencionados en ``Documentacin de Linux''.

  7.2.  Listas de correo electrnico

  Hay dos listas especficas de Linux, que yo conozca, cubriendo estos
  temas. Hay algunas ms que merece la pena consultar, que cubren el uso
  del ordenador ms generalmente. Ocasionalmente, si se enva un mensaje
  a estas listas, ocurrir que yo lo lea y pueda incluir ms informacin
  en el Accesibilidad-COMO, as que no es necesario que me enve otra
  copia a m, a menos que sea urgente.

  7.2.1.  La lista linux-access  (ingls)

  Es una lista amplia que cubre temas de accesibilidad en Linux. Se cre
  para 'satisfacer las necesidades de usuarios y desarrolladores del
  sistema Linux y su software, que bien estn de algn modo
  discapacitados o bien quieran ayudar a hacer Linux ms accesible'.
  Para subscribirse, enve un mensaje a majordomo@ssv1.union.utah.edu  y
  en el cuerpo del mensaje (no en el tema), ponga:

               subscribe linux-access <su_direccion_de_correo_electronico>

  7.2.2.  La lista linux-blind  (ingls)

  Es una lista de correo que cubre el uso de Linux por usuarios
  invidentes.  Hay una importante recopilacin de software importante y
  til en los archivos de la lista. Para subscribirse, enve un mensaje
  a blinux-list-request@redhat.com

  con el tema (subject) 'help' (sin las comillas). Esta es una lista
  moderada.

  7.3.  Referencias en la WWW

  La web cambia rpidamente, debido a su propia naturaleza. Si est
  leyendo este documento en una versin antigua, algunos de estos
  lugares estarn desfasados. La versin original que mantengo en la web
  no debera pasarse ms de un mes o dos sin actualizar, as que
  refernciela, por favor.

     Documentacin de Linux
        http://sunsite.unc.edu/mdw/linux.html

     Accesibilidad Linux en la web
        http://www.tardis.ed.ac.uk/~mikedlr/access

     Todas las versiones de los COMOs en
        http://www.tardis.ed.ac.uk/~mikedlr/access/HOWTO
        Preferiblemente, sin embargo, descrguelos de uno de los
        principales lugares FTP de Linux. Si se produce un exceso de
        trfico, tendr que quitar estas pginas y cambiarlas a algn
        otro sitio.

     El proyecto de documentacin y desarrollo BLINUX
        http://leb.net/blinux/ 'El propsito del proyecto de
        documentacin y desarrollo BLINUX es servir de catalizador que
        avive y acelere el desarrollo del software y la documentacin
        que permitir al usuario invidente utilizar su propia estacin
        de trabajo Linux'.

     Pgina web de Emacspeak
        http://cs.cornell.edu/home/raman/emacspeak/emacspeak.html

     Pgina no oficial de BRLTTY
        http://www.sf.co.kr/t.linux/new/brltty.html

     Yahoo (uno de los mayores catlogos de Internet)
        http://www.yahoo.com/Society_and_Culture/Disabilities/Adaptive_Technology/

     El proyecto Linux Lab
        http://www.fu-berlin.de/~clausi/
     Las pginas BLYNX: ficheros de apoyo de Lynx para usuarios invi
        dentes
        y discapacitados visuales" http:/leb.net/blinux/blynx

  7.4.  Distribuidores

  Hay un distribuidor en el Reino Unido del Braillex:  Alphavision
  Limited.

  7.5.  Fabricantes

  7.5.1.  Alphavision

  Creo que son fabricantes. El RNIB los seala como distribuidores, pero
  otros dicen que fabrican el Braillex.

               Alphavision Ltd
               Seymour House
               Copyground Lane
               High Wycombe
               Bucks HP12 3HE
               England
               UK
               tlfno: +44 1494-530 555

  7.5.1.1.  Productos AT con soporte para Linux de Alphavision

  Braillex

  7.5.2.  Blazie Engineering

  El Braille Lite estaba soportado en la versin original del BRLTTY.
  Este soporte se ha interrumpido. Si tiene uno y quiere utilizarlo con
  Linux podra ser posible usando dicha versin del software.

               Blazie Engineering
               105 East Jarrettsville Rd.
               Forest Hill, MD 21050
               U.S.A.
               tlfno:  +1 (410) 893-9333
               fax:            +1 (410) 836-5040
               bbs:            +1 (410) 893-8944

  Correo electrnico: info@blazie.com

  WWW: http://www.blazie.com

  7.5.2.1.  Productos AT de Blazie

  Braille Lite (sin soporte)

  7.5.3.  Digital Equipment Corporation

               Digital Equipment Corporation
               P.O. Box CS2008
               Nashua
               NH 03061-2008
               U.S.A
               tlfno:       +1 800-722-9332
               servicio tcnico: +1 800-722-9332
               fax:        +1 603-884-5597

  WWW: http://www.digital.com

  7.5.3.1.  Productos AT con soporte para Linux de DEC

  DECTalk Express

  7.5.4.  Kommunikations-Technik Stolper GmbH

               KTS Stolper GmbH
               Herzenhaldenweg 10
               73095 Albershausen
               Germany
               tlfno:  +49 7161 37023
               fax:            +49 7161 32632

  7.5.4.1.  Productos AT con soporte Linux de KGT

  Brailloterm

  8.  Paquetes de software

  Las referencias de esta seccin estn sacadas directamente del mapa de
  software para Linux (LSM) que se puede encontrar en cualquier servidor
  del proyecto de documentacin Linux y que lista la prctica totalidad
  del software existente para Linux.

  8.1.  Emacspeak

  Emacspeak es la parte de software de una interfaz de voz para Linux.
  Cualquier programa basado en caracteres, como un paginador web, un
  cliente telnet u otro editor pueden ser utilizados con Emacspeak. La
  principal diferencia entre Emacspeak y un lector de pantalla normal
  para sistemas del estilo del DOS es que adems incluye caractersticas
  extra. Est basado en el editor Emacs.

  Un editor de texto normalmente es nicamente un programa que permite
  cambiar el contenido de un fichero, por ejemplo, aadiendo informacin
  nueva a una carta. Emacs est, de hecho, ms all de cualquier editor
  de texto normal, y por eso es mucho ms til de lo que parece. Se
  puede ejecutar cualquier otro programa desde Emacs, obteniendo la
  salida que se genere en el emulador de terminal de Emacs.

  La razn de que Emacs sea el mejor entorno para Emacspeak es que puede
  entender la organizacin de la pantalla e interpretar inteligentemente
  el significado de, por ejemplo, un calendario, que de otra forma no
  sera ms que una embrollada matriz de nmeros. El creador del paquete
  se las arregla para manejar completamente su propia mquina Linux,
  llevando toda la administracin desde Emacs. Tambin lo usa para
  controlar una amplia variedad de software y dispositivos directamente
  desde su mquina.

  Emacspeak se incluye en la distribucin Debian de Linux, y aparece
  como contribucin en la Slackware. Esto significa que est disponible
  en varias de las distribuciones de Linux con formato CDROM. A la fecha
  de publicacin de este documento la versin debera ser la 5 o
  superior, pero en el momento de escribir estas lneas, solo dispongo
  de la versin 4 para examinar.

    Ttulo: Emacspeak - interfaz de salida de voz para Emacs

    Versin: 4.0

    Fecha: 30 Mayo 96

    Descripcin: Emacspeak es el primer sistema de salida de voz que
     permite a alguien que no puede ver trabajar directamente en un
     sistema UNIX. (Hasta ahora, la nica opcin posible para un
     discapacitado visual era utilizar un PC parlante como terminal).
     Emacspeak est construido sobre Emacs. Una vez iniciado Emacs con
     Emacspeak cargado, se obtiene informacin hablada sobre cualquier
     cosa que se haga.  Su capacidad depender de cmo de bien pueda
     usted usar Emacs. No hay nada que no se pueda hacer desde Emacs :-)

    Palabras clave: discapacidad accesibilidad invidente voz lenguaje
     Emacs

    Autor: T.V. Raman

    Mantenido por: Jim Van Zandt

    Lugar principal:
     ftp://sunsite.unc.edu/apps/sound/speech/emacspeak-4.0.tgz 124 Kb.

    Otros lugares:

    Lugar original:
     http://www.cs.cornell.edu/pub/raman/emacspeak/emacspeak.tar.gz
     123kB
     http://www.cs.cornell.edu/Info/People/raman/emacspeak/emacspeak.tar.gz

    Plataformas: DECTalk Express o DEC Multivoice Speech Synthesizer,
     GNU FSF Emacs 19 (versin 19.23 o superior) y TCLX 7.3B (Extended
     TCL)

    Licencia: GNU Public License

  8.2.  BRLTTY

  Es un programa para utilizar un terminal Braille de puerto serie. Ha
  sido ampliamente probado y usado, y soporta varios tipos diferentes de
  hardware (vase ``Linux Software Map'').

  De su mantenimiento se encarga Nikhil Nair nn201@cus.cam.ac.uk.  Las
  otras personas trabajando en ello son Nicole Pitre nico@cam.org y
  Stephane Doyon doyons@jsp.montreal.ca. Enveles cualquier comentario.

  Los autores estn dispuestos a aadir soporte para ms dispositivos,
  as que si usted posee uno, piense en ponerse en contacto con ellos.
  Seguramente necesitarn informacin sobre la programacin del
  dispositivo, as que si puede contactar con el fabricante de su
  dispositivo y conseguirla, ser ms fcil que le puedan ayudar.

  Una breve lista de caractersticas (de su fichero LEAME) que le
  interesar

  1. Completa implementacin de las facilidades estndar de revisin de
     pantalla.

  2. Una amplia gama de caractersticas aadidas opcionales, que
     incluyen cursor parpadeante y letras de imprenta, congelacin de la
     pantalla para una lectura tranquila, enlaces de hipertexto,
     capacidad de localizacin del texto marcado, etc.

  3. Gua inteligente del cursor. Esto permite un fcil movimiento del
     ratn en editores de texto, etc. sin mover las manos de la pantalla
     Braille.

  4. Funcin 'Cortar y Pegar', particularmente til para copiar nombres
     de fichero largos, comandos complejos, ...

  5. Ayuda en lnea.

  6. Soporte de mltiples cdigos Braille.

  7. Diseo modular, que permite una relativa facilidad para la adicin
     de manejadores de otros dispositivos Braille, o incluso portarlo a
     otras plataformas tipo Unix.

    Ttulo: BRLTTY - Software de acceso a un sistema UNIX para personas
     invidentes mediante un terminal Braille software

    Versin: 1.0.2, 17 Septiembre 96

    Fecha: 17 Septiembre 96

    Descripcin: BRLTTY es un demonio que proporciona acceso a una
     consola UNIX para una persona invidente mediante un terminal
     Braille software (vase el fichero LEAME para una explicacin
     completa). BRLTTY slo funciona con aplicaciones en modo texto.
     Confiamos en que este sistema ser ampliado para soportar otros
     dispositivos Braille, y posiblemente, incluso otras plataformas
     tipo UNIX.
    Palabras clave: Braille consola accesibilidad invidente

    Autor:

    Nikhil Nair nn201@cus.cam.ac.uk

    Nicolas Pitre nico@cam.org

    Stephane Doyon doyons@jsp.montreal.ca

    James Bowden jrbowden@bcs.org.uk

    Plataformas: Linux (ncleo 1.1.92 o superior) sobre un PC o un DEC
     Alpha.

     No soporta X/grficos.

     Dispositivos Braille soportados (slo puerto serie)

    Tieman B.V.: CombiBraille 25/45/85;

    Alva B.V.: serie ABT3xx;

    Telesensory Systems Inc.:PowerBraille 40 (no 65/80), Navigator
     20/40/80 (solo la ltima versin de firmware??).

    Licencia: GNU Public License

  8.3.  screen

  screen es una parte estndar de software que permite a varios
  programas diferentes ejecutarse a la vez en un terminal. Ha sido
  mejorada para soportar algunos terminales Braille (los de Telesensory)
  directamente.

  8.4.  rsynth

  Es una utilidad de sntesis de voz que aparece en el mapa de software
  de Linux. Parece que no funciona lo suficientemente bien como para que
  la use una persona con discapacidades visuales. Utilice hardware en su
  lugar, o intente mejorarlo... una utilidad de sntesis de voz de libre
  distribucin sera realmente til.

  8.5.  xocr

  xocr es un paquete que implementa el reconocimiento ptico de
  caracteres (OCR) para Linux. Como sucede con rsynth, no creo que sea
  un paquete aceptable como nico dispositivo de entrada para una
  persona con discapacidades visuales. Sospecho que el algoritmo
  utilizado necesita que lo supervise alguien que pueda comprobar que
  est leyendo correctamente. Me encantara que me demostrasen que me
  equivoco.

  8.6.  xzoom

  xzoom es una lupa de pantalla, del mismo estilo que xmag, pero lo
  sufucientemente mejor como para ser muy til para una persona con
  problemas visuales. Las mayores desventajas de xzoom son que no puede
  agrandarse a s mismo, que algunos de los controles de teclado son
  incompatibles con fvwm, el manejador de ventanas usual de Linux, y que
  su configuracin por defecto no tiene soporte de red (esto se puede
  arreglar a cambio de perder algo de velocidad). Aparte de esto, es
  excelente. Produce aumentos continuos que permiten, por ejemplo,
  desplazar un documento arriba y abajo, mientras se mantiene aumentada
  la seccin que se est leyendo. Como alternativa, se puede mover una
  pequea caja por la pantalla, aumentando su contenido y permitiendole
  buscar la zona que desea ver. xzoom tambin est disponible en formato
  rpm, en los lugares de descarga de Red Hat, haciendo muy fcil su
  intalacin.

    Ttulo: xzoom

    Versin: 0.1

    Fecha: 30 Marzo 96

    Descripcin: xzoom puede aumentar (un nmero entero de veces),
     rotar (un mltiplo de 90 grados) y reflejar sobre los ejes X o Y
     reas de la pantalla X11, y mostrarlas en su ventana.

    Palabras clave: X11 zoom aumentar xmag

    Autor: Itai Nahshon nahshon@best.com

    Mantenido por: Itai Nahshon nahshon@best.com

    Lugar principal:
     ftp://sunsite.unc.edu/pub/Linux/X11/xutils/xzoom-0.1.tgz

    Plataformas: Linux + X11. Slo soporta modos de 8 bits. Probado
     nicamente en Linux 1.3.* con el manejador XSVGA 3.1.2. Necesita la
     extensin XSHM.

    Licencia: libre distribucin.

  8.7.  NFBtrans

  NFBTrans es un programa de traduccin Braille multigrado distribuido
  por la 'National Federation for the Blind' en los E.E.U.U. Es de libre
  distribucin, con la esperanza de que alguien lo mejore. Los idiomas
  soportados son ingls americano, ingls, espaol, ruso, esperanto,
  alemn, hebreo bblico (!) y griego clsico, pero se pueden aadir
  otros solamente con aadir una tabla de traduccin.  Tambin soporta
  temas de ordenadores y matemticas. Yo he conseguido compilarlo en
  Linux, pero al no tener un traductor Braille, por ahora no he podido
  probarlo.

  NFBTrans est disponible en

  ftp://nfb.org/ftp/nfb/braille/nfbtrans/

  Despus de descargarlo, ser necesario compilarlo.

  8.7.1.  Compilacin de NFBTrans en Linux

  He enviado este parche al responsable del NFBTrans y dice que lo ha
  incluido, as que si consigue una versin posterior a la 740,
  posiblemente no tenga que hacer nada especial. Basta con seguir las
  instrucciones incluidas en el paquete.

               unzip -L NFBTR740.ZIP   # o el nombre del fichero que tenga
               mv makefile Makefile

  Despus escriba lo siguiente en un fichero (por ejemplo, patch-file)

               *** nfbpatch.c.orig     Tue Mar 12 11:37:28 1996
               --- nfbpatch.c  Tue Mar 12 11:37:06 1996
               ***************
               *** 185,190 ****
               --- 185,193 ----
                  return (finfo.st_size);
               }                /* filelength */

               + #ifndef linux
               + /* pretty safe to assume all linux has usleep I think ?? this should be
               + done properly anyway */
               #ifdef SYSVR4
               void usleep(usec)
               int usec;
               ***************
               *** 195,200 ****
               --- 198,204 ----
               UKP  }                /* usleep */

               #endif
               + #endif

               void beep(count)
               int count;

  y ejecute

              patch < patch-file

  despues escriba

              make

  y pulse RETURN, y el programa debera compilarse.

  8.8.  UnWindows

  UnWindows es un paquete de utilidades de accesibilidad para X, que
  proporciona muchas facilidades para los discapacitados visuales (no
  invidentes). Incluye una lupa de pantalla y otras utilidades
  personalizables que ayudan a localizar el puntero.

  UnWindows se puede descargar desde

  ftp://ftp.cs.rpi.edu/pub/unwindows/

  Con la configuracin por defecto, el paquete no funcionar en Linux
  porque utiliza algunas caractersticas de las mquinas Sun. Sin
  embargo, algunas utilidades funcionan y yo me las he arreglado para
  portar la mayora de las dems, as que este paquete podra ser
  interesante para algunos. Mi versin va a ser incorporada al original,
  o si no, estar disponible en los archivos BLINUX (vase ``Referencias
  en la WWW'').  La nica utilidad que todava no funciona es la
  utilidad de configuracin.

  En mi versin los programas, en lugar de generar ellos mismos los
  sonidos, llaman a otros programas. Estos programas pueden ser, por
  ejemplo

               play /usr/lib/games/xboing/sounds/ouch.au

  que provocar que se oiga el sonido 'ouch' de xboing. Por ejemplo, se
  podra hacer esto cuando el puntero llegue al borde superior izquierdo
  de la pantalla.

  8.8.1.  dynamag

  dynamag es una lupa de pantalla. Vase la seccin sobre lupas de
  pantalla (``Aumento del tamao de la pantalla''). Este programa me
  funcion en la distribucin normal.

  8.8.2.  coloreyes

  coloreyes facilita encontrar el puntero del ratn. Consiste en un par
  de ojos que miran siempre en la direccin del puntero (como xeyes).
  Esto no funciona en la distribucin normal, pero parece que la versin
  de prueba s que lo hace.

  8.8.3.  border

  border es un programa que detecta cundo el puntero del ratn ha
  llegado al borde de la pantalla y produce un sonido diferente
  dependiendo del borde del que se trate. La versin disponible utiliza
  un sistema de sonido especfico de Sun. He cambiado esto de forma que
  en lugar de eso, se limita a ejecutar un comando, que puede ser
  cualquier programa de sonido de Linux.
  8.8.4.  un-twm

  El manejador de ventanas es un programa especial que controla la
  posicin de todas las ventanas (programas) mostrados en la pantalla X.
  un-twm es una versin especial que producir un sonido cada vez que el
  puntero entre en una ventana diferente. El sonido depender de a qu
  ventana se ha entrado. La versin distribuida no funciona en Linux
  porque, como border, se basa en las capacidades de audio de Sun. Por
  supuesto, yo tengo una versin especial que estar disponible para
  cuando lea esto.

  9.  Hardware

  9.1.  Terminales Braille dirigidos por hardware

  Son terminales Braille que pueden leer la memoria de pantalla
  directamente en modo texto. Es posible usarlos para trabajar con Linux
  en casi cualquier cosa que un usuario con visin normal pueda hacer en
  la consola, incluida la instalacin. Sin embargo tiene un problema con
  el desplazamiento del ncleo normal de Linux, por lo que hace falta
  parchearlo. Vase ``Parchear el ncleo''.

  9.1.1.  Braillex

  Braillex es un terminal diseado para leer directamente de la memoria
  de pantalla, as como para evitar cualquier problema con programas de
  MSDOS con comportamientos peculiares. Si se puede ver por pantalla,
  entonces este terminal debera ser capaz de mostrarlo en Braille. En
  Linux, desafortunadamente, el manejo de la pantalla se hace de
  diferente forma que en MS-DOS, as que hay que cambiar algunas cosas.

  Para conseguir que funcione este terminal, hay que aplicar el parche
  de la seccin ``Parchear el ncleo''. Una vez hecho, el Braillex se
  convierte en una de las mejores formas de usar Linux, ya que permite
  acceder a toda la informacin que una persona sin problemas de visin
  pudiera leer. Otras terminales no comienzan a funcionar hasta que el
  sistema est completamente arrancado.

  El Braillex est disponible en dos versiones segn la disposicin de
  los caracteres, 80x1  40x2), y hay un modelo, el IB 2-D, que tiene
  adems una barra vertical para mostrar informacin sobre todas las
  lneas de la pantalla (usando 4 puntos programables por lnea).

    Precio: 8.995 libras esterlinas (unos 2 millones de pesetas), o
     11495 libras (unos 2 millones y medio de pesetas)

    Fabricante: Alphavision Limited (Reino Unido)

    Distribuidores: ????

  9.1.2.  Brailloterm

  Es un dispositivo de salida Braille refrescable, fabricado por KTS
  Kommunikations-Technik Stolper GmbH. Tiene 80 caracteres Braille en
  una nica lnea. Cada carcter tiene 8 puntos que se combinan
  (arriba/abajo) para representar una letra. Por defecto, Brailloterm
  muestra la lnea en la que se encuentra el cursor.  Puedo usar
  funciones de Brailloterm para ver cualquier lnea de la pantalla.' -
  Jose Vilmar Estacio deSouza jvilmar@embratel.net.br

  Jose contina diciendo que el terminal tambin puede usar el puerto
  serie bajo DOS, pero que para ello necesita programas especiales. No
  s si funcionar alguno de los de Linux.

  Como en el caso de Braillex, se necesita aplicar un parche al ncleo
  para que funcione. Vase la seccin ``Parchear el ncleo''.

    Precio: unos 23.000 marcos alemanes / 15.000 dlares USA (un par de
     millones de pesetas)

    Fabricante: Kommunikations-Technik Stolper GmbH

    Distribuidores: ????

  9.1.3.  Parchear el ncleo para Braillex  y Brailloterm

  Posiblemente esto se pueda aplicar a otros terminales que lean
  directamente la memoria de pantalla para funcionar bajo MS-DOS.
  Enveme un mensaje para confirmar cualquier terminal que le funcione.
  Esto no es aplicable y provocar la prdida de algunas caractersticas
  para aquellos terminales manejados por software BRLTTY.

  He odo que este parche se aplica a todos los ncleos versin 1.2.x.
  Debera funcionar tambin en ncleos desde versiones 1.1.x hasta la
  1.3.72, nicamente con un aviso del comando patch (he comprobado que
  el parche funciona e la versin 1.3.68 al menos).

  Desde la versin 1.3.75, el parche ya no hace falta porque el ncleo
  puede configurarse para que no haya desplazamiento con 'linux no-
  scroll' como parmetro del LILO. Vase el Boot Prompt HOWTO para ms
  detalles.

               *** drivers/char/console.c~     Fri Mar 17 07:31:40 1995
               --- drivers/char/console.c      Tue Mar  5 04:34:47 1996
               ***************
               *** 601,605 ****
               static void scrup(int currcons, unsigned int t, unsigned int b)
               {
               !       int hardscroll = 1;

                      if (b > video_num_lines || t >= b)
               --- 601,605 ----
                static void scrup(int currcons, unsigned int t, unsigned int b)
                {
                !       int hardscroll = 0;

                      if (b > video_num_lines || t >= b)

  Para aplicarlo:

  1. escriba las lneas de cdigo anteriores en un fichero de texto (por
     ejemplo, patch-file)
  2. cambie al directorio drivers/char de las fuentes de su ncleo

  3. ejecute

               patch < patch-file

  4. compile su ncleo como de costumbre.

  Despus de aplicar estos parches, debera poder utilizar el terminal
  Braille para leer la consola de Linux.

  Dicho en palabras, el parche significa cambia el 1 por 0 en la primera
  lnea de la funcin scrup, que ms o menos estar por la lnea 603 del
  fichero drivers/char/console.c. La parte importante del comando patch
  es que el programa entiende esto, y que sabe adivinar qu hacer cuando
  un desarrollador de Linux cambie algo en ese fichero.

  Si lo que quiere es usar un ncleo ms moderno con el desplazamiento
  completamente deshabilitado (en lugar de la solucin de los
  parmetros), utilice el siguiente parche. Esto no funciona para
  ncleos anteriores al 1.3.75.

              *** console.c~  Fri Mar 15 04:01:45 1996
              --- console.c   Thu Apr  4 13:29:48 1996
              ***************
              *** 516,520 ****
                unsigned char has_wrapped;          /* all of videomem is data of fg_console */
                static unsigned char hardscroll_enabled;
              ! static unsigned char hardscroll_disabled_by_init = 0;

                void no_scroll(char *str, int *ints)
              --- 516,520 ----
                unsigned char has_wrapped;          /* all of videomem is data of fg_console */
                static unsigned char hardscroll_enabled;
              ! static unsigned char hardscroll_disabled_by_init = 1;

                void no_scroll(char *str, int *ints)

  9.2.  Terminales Braille dirigidos por software

  Los principios de operacin de estos terminales estn muy cerca de un
  terminal CRT como el vt100. Se conectan al puerto serie y se debe
  ejecutar en el ordenador un programa que les enve la salida. Por el
  momento hay dos conocidos programas para Linux. BRLTTY (vase la
  seccin ``BRLTTY'') y Braille enhanced screen.

  9.2.1.  Tieman B.V.

  9.2.1.1.  CombiBraille

  Este terminal Braille est soportado por el software BRLTTY.  Existen
  3 versiones con 25, 45 o 48 caracteres. Los 5 caracteres extra sobre
  un dispositivo estndar se utilizan para informar del estado.

    Precio: unas 4600 libras esterlinas (900.000 pts)

    Fabricantes: Tieman B.V.

    Distribuidores: Concept Systems, Nottingham, Inglaterra (tlfno: +44
     115 925 5988)

  9.2.2.  Alva B.V.

  La serie ABT3xx est soportada en BRLTTY. Slo se ha confirmado que
  funcione la ABT340 por el momento. Por favor, enve informacin sobre
  otros modelos a los autores del BRLTTY.

    Precio:

    20 caracteres - 2200 libras (500.000 pts);

    40 caracteres - 4500 libras (900.000 pts);

    80 caracteres - 8000 libras (1.600.000 pts);

    Fabricante: Alva

    Distruibuidor: Professional Vision Services LTD, Hertshire,
     Inglaterra (tlfno: +44 1462 677331)

  9.2.3.  Dispositivos de Telesensory Systems Inc.

  BRLTTY y screen soportan dispositivos Telesensory, ya que esta empresa
  ha proporcionado la informacin necesaria para ello.

  9.2.3.1.  Powerbraille

  Hay 3 modelos, el 40, el 65 y el 80. Slo se sabe que el BRLTTY
  soporta el modelo 40.

    Precio:

    20 caracteres - 2200 libras (500.000 pts);

    40 caracteres - 4500 libras (900.000 pts);

    80 caracteres - 8000 libras (1.600.000 pts);

    Fabricante: Alva

    Distribuidor: Professional Vision Services LTD, Hertshire,
     Inglaterra
     (tlfno: +44 1462 677331)

  9.2.3.2.  Navigator

  Hay 3 modelos, de 20, 60 y 80 caracteres. Se sabe que las nuevas
  versiones funcionan con BRLTTY, pero no se ha confirmado si esto pasa
  tambin con versiones anteriores (firmware anterior).

    Precio: 80 caracteres - 7800 libras esterlinas (1.500.000 pts)

    Fabricante: Alva

    Distribuidor: Professional Vision Services LTD, Hertshire, England
     (+44 1462 677331)

  9.2.4.  Braille Lite

  Ms portable que un terminal. Podra, sin embargo, usarse con el
  BRLTTY versin 0.22 (pero no con versiones ms nuevas) como si se
  tratase de un terminal Braille normal.  Desafortunanadamente, muchas
  de las caractersticas del CombiBraille no se pueden usar con Braille
  Lite. Esto significa que debera evitarse su uso en la medida de lo
  posible.

    Precio: 3.395 dlares (unas  600.000 pesetas)

    Fabricante: Blazie Engineering

  9.3.  Herramientas de sntesis de voz

  Normalmente se conectan al puerto serie de un PC. Entre sus cualidades
  estn:

    Etiquetas Braille en los componentes

    Varias voces para permitir que que cada parte de un documento sea
     fcilmente distinguible

    Uso con auriculares (no disponible en todos los modelos)

  El mayor problema es la calidad del lenguaje. Esto es mucho ms
  importante para alguien que usa la sntesis de voz como su fuente
  principal de informacin que para alguien que nicamente est
  jugueteando. Por esta razn, T.V. Raman nicamente recomienda DECTalk.
  Sera bueno disponer de alternativas aceptables.

  9.3.1.  DECTalk Express

  Es un dispositivo hardware de sntesis de voz. Se recomienda usarlo
  con Emacspeak y de hecho, stos son los nicos dispositivos que
  funcionan con el paquete Emacspeak por el momento. Este dispositivo
  tiene todas las cualidades deseables que a mi se me ocurren.  El nico
  defecto que le encuentro por el momento es el precio.

    Precio: 1.195 dlares (milln y medio largo de pesetas)

    Fabricante: Digital Equipment Corporation

    Distribuidores: Varios. Me gustara conocer detalles nicamente de
     aquellos que tengan soporte especfico para Linux y con
     distribucin internacional, por favor. Si no es el caso, pngase en
     contacto con organizaciones locales, la misma empresa Digital o las
     pginas web de Emacspeak.

  9.3.2.  Accent SA

  Es una herramienta de Aicom Corporation. Se est tratando de escribir
  un driver para ella, pero hace falta ayuda. Visite la direccin
  http://www.cyberspc.mb.ca/~astrope/speak.html si cree que puede ser de
  utilidad.

  9.3.3.  Chip SPO256-AL2 Speak and Spell

  Hay inters en la utilizacin de este chip en circuitos de habla
  integrada. Estoy interesado en conocer si alguien lo ha encontrado
  til.  David Sugar dyfet@tycho.com ha producido un paquete de
  software, speak-0.2pl1.tar.gz. Sospecho que la calidad de la salida no
  es lo suficientemente buena para un uso regular.

  10.  Agradecimientos

  Gran parte de este documento se ha creado a partir de informacin
  encontrada en Internet, en buscadores como Yahoo y Alta Vista de
  Digital.  La mayora de la informacin referente a paquetes de
  software ha sido hallada de la misma forma. Tambin se ha recopilado
  informacin de los folletos del Royal National Institute for the
  Blind. T.V. Raman, autor del Emacspeak ha contribuido con comentarios,
  informacin y textos, adems de ponerme en contacto con personas que
  conoce en Internet.

  Kenneth Albanowski kjahds@kjhads.com ha proporcionado el parche
  necesario para el Brailloterm e informacin sobre l.

  Roland Dyroff de S.u.S.E. GmbH (creadores y sistribuidores de S.u.S.E
  Linux (ings/alemn)) ha examinado KPS Stolper GmbH a peticin ma y
  ha conseguido detalles de hardware e informacin sobre el Brailloterm.

  Las mayores y ms cuidadosas comprobaciones sobre este documento
  fueron realizadas por James Bowden, jrbowden@bcs.org.uk y Nikhil Nair
  nn201@cus.cam.ac.uk, los autores del BRLTTY que han sugerido un gran
  nmero de correcciones as como informacin suplementaria sobre
  algunos temas.

  Los participantes en las listas blinux y linux-access han contribuido
  en este documento proporcionndome informacin.

  Mark E. Novak del centro Trace R&D http://trace.wisc.edu  me gui
  hacia numerosos paquetes de software e informacin que yo no conoca.
  Adems me di ideas sobre la estructura del documento que yo he
  incorporado parcialmente y sobre lo que debera haber hecho ms.

  Tambin han contribuido Nicolas Pitre y Stephane Doyon.

  Numerosas personas han contribuido con comentarios en informacin.
  Las contribuciones especficas estn referenciadas en el documento.

  Esta versin fue especialmente creada para el libro de RedHat Dr.
  Linux, ya que yo y otros autores del LDP fuimos avisados de su
  inminente publicacin. Esto es de agradecer, debido a que informacin
  errnea o desfasada dura mucho ms en un libro que en Internet.

  Sin duda, usted tambin ha contribuido y no le he mencionado. No se
  preocupe, fue un accidente. Lo siento. Avseme y le aadir a la
  siguiente versin.

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Bash Prompt COMO
  Giles Orr, giles@interlog.com
  Traducido por Iosu Santurtn, iosu@bigfoot.com
  v0.60, 7 de Enero de 1999, Traduccin 12 de Junio de 1999

  En este documento se comenta la creacin y el manejo de prompts de
  terminales en modo texto y X, incluyendo secuencias estndar de escape
  que proporcionan el nombre de usuario, el directorio actual de tra
  bajo, la hora, etc. Se hacen sugerencias ms complejas sobre cmo mod
  ificar las barras de ttulo de las terminales X, cmo usar funciones
  externas para proporcionar informacin en el prompt, y cmo usar col
  ores ANSI.
  ______________________________________________________________________

  ndice general



















































  1. Introduccin y administrivia

     1.1 Requerimientos
     1.2 Cmo usar este documento
     1.3 Traducciones
     1.4 Problemas
     1.5 Comentarios y sugerencias
     1.6 Crditos
     1.7 Copyright y dems

  2. (TT

     2.1 Qu es
     2.2 Qu puede aportar la manipulacin del prompt ?
     2.3 Por qu molestarse ?
     2.4 El primer paso
     2.5 Secuencias de escape del prompt
     2.6 Valor permanente de las cadenas 

  3. Comandos Externos

     3.1 (TT
     3.2 Comandos externos en el prompt
     3.3 Qu poner en el prompt
     3.4 Entorno

  4. Manipulaciones de la barra de ttulo de Xterm

  5. Secuencias de escape ANSI: colores y movimientos del cursor

     5.1 Colores
     5.2 Movimiento del cursor
     5.3 Movimiento del cursor con

  6. Caracteres especiales: secuencias de escape octales

  7. El paquete Bash Prompt

     7.1 Disponibilidad
     7.2 Cambio de fuentes en una

  8. Carga de un prompt diferente

     8.1 Carga de un prompt diferente posterior
     8.2 Carga inmediata de un prompt diferente

  9. Prompt dinmico con color segn la carga del sistema

     9.1 Un ejemplo de prueba de concepto

  10. Prompt de ejemplo

     10.1 Un prompt ligero
     10.2 Tema elite de
     10.3 Prompt de usuario avanzado
     10.4 Un prompt con la anchura del terminal
     10.5 Prompt con Reloj elegante e intil

  11. Anexo: El INSFLUG



  ______________________________________________________________________



  1.  Introduccin y administrivia

  1.1.  Requerimientos


  Ser necesario el bash. La versin por defecto de la prctica
  totalidad de distribuciones LiNUX es la 1.14.7, que es una versin
  bien conocida y de confianza. Actualmente se encuentra disponible la
  versin 2.0 (incluso superiores): yo llevo usando la 2.0 algn tiempo,
  pero la mayora del cdigo aqu presentado debera funcionar bajo la
  1.14.7. Si conozco alguna incompatibilidad, lo mencionar. Se puede
  comprobar la versin del bash mediante el comando echo $BASH_VERSION.
  En mi mquina responde 2.02.1(1)-release.

  La experiencia en programacin shell puede venir bien, pero no es
  esencial: cuanto ms se sepa, ms complejos sern los prompts que se
  puedan crear. Presupongo un conocimiento bsico de la programacin
  shell y utilidades unix a lo largo de este tutorial. Sin embargo, mis
  propios niveles de programacin shell son limitados, as que doy gran
  cantidad de ejemplos y explicaciones que pueden parecer innecesarias
  para el programador experimentado.


  1.2.  Cmo usar este documento



  Se incluyen muchos ejemplos y textos aclaratorios. Su utilidad variar
  segn la persona de la que se trate. Esto ha crecido lo suficiente
  como para que una lectura completa pueda resultar difcil; se
  recomienda leer nicamente las secciones que se necesite, volviendo
  hacia atrs las veces que sea necesario.


  1.3.  Traducciones


  A fecha de 6 de Enero de 1999, existen traducciones al japons (Akira
  Endo, akendo@t3.rim.or.jp) y alemn (Thomas Keil, thomas@h-
  preissler.de).  Gracias a ambos! Las URL sern incluidas cuando estn
  disponibles. (--  N. del T.
  en castellano ;) --)


  1.4.  Problemas


  Esta es una lista de problemas que he encontrado programando prompts.
  No comience a leer por aqu, y no deje que esta lista le desanime, la
  mayora son detalles de poca importancia. chele un vistazo nicamente
  si llega a algn punto conflictivo.


     Algunas caractersticas de bash (tales como funciones matemticas
     dentro de $(()), entre otras) son opciones en tiempo de
     compilacin. Si est usando una distribucin binaria, como la que
     viene en las distribuciones estndar de LiNUX, tales
     caractersticas deberan estar incluidas. Pero si est trabajando
     en otro sistema, merece la pena recordar esto si no funciona algo
     que debera hacerlo. Algunas notas acerca de esto en Learning the
     Bash Shell, pgs 260-262

    El manejador de terminal screen no siempre funciona con colores
     ANSI.  Desafortunadamente no soy un experto en screen. Mi versin
     de screen (una muy reciente) parece que funciona bien en estos
     casos, pero he visto ocasiones en que redujo todos los colores del
     prompt al color de primer plano estndar en terminales X. Esto no
     parece ser un problema en la consola.

    Los ficheros Xdefaults pueden redefinir colores. Mire en
     ~/.Xdefaults las lneas referidas a XTerm*background y
     XTerm*foreground (o posiblemente XTerm*Background y
     XTerm*Foreground).

    Uno de los prompts que se comentan en este documento utiliza la
     salida de jobs - como se comenta en su momento, las salida de jobs
     a una tubera no funciona con bash 2.02.

    Las secuencias de escape ANSI de movimiento del cursor no estn
     implementadas en todas las terminales X. Esto se comenta en su
     propia seccin.

  

     Se pueden crear pseudo-grficos bastante agradables utilizando
     una fuente VGA en lugar de las estndar de LiNUX.
     Desafortunadamente, estos efectos son horrorosos si no se utiliza
     un tipo VGA, y no hay manera de detectar dentro de una terminal qu
     clase de fuentes de letra se estn utilizando.

    Ha aparecido bash 2.02+ que incorpora nuevas caractersticas, y
     cambia algunos comportamientos.  Lo que funcionase bajo la versin
     1.14.7 no tiene por qu funcionar bajo la 2.0+, y viceversa.


  1.5.  Comentarios y sugerencias


  Esta es una experiencia de aprendizaje para mi. He llegado a saber
  bastante acerca de lo que se puede hacer para crear prompts
  interesantes y tiles, pero necesito indicaciones para corregir y
  mejorar este documento.  He intentado comprobar las sugerencias que yo
  hago contra diferentes versiones de bash (sobre todo la 2.02 que uso,
  y la 1.14.7 que es la ms popular), no obstante, comunqueme cualquier
  incompatibilidad que encuentre.

  La ltima versin de ste documento debera estar siempre disponible
  en
  http://www.interlog.com/~giles/bashprompt.html. Comprubelo y sintase
  libre de mandarme un mensaje a giles@interlog.com con sus sugerencias.


  Utilizo los HOWTOs del Linux Documentation Project casi exclusivamente
  en formato HTML, as que cuando los convierto desde SGML, el HTML es
  el nico formato que compruebo concienzudamente. Si hay problemas con
  otros formatos puede que yo no sepa nada, por lo que agradecera
  cualquier comentario sobre ello.



  1.6.  Crditos


  En la creacin de este documento he tomado prestado mucho del proyecto
  BashPrompt, disponible en http://bash.current.nu.


  Otras fuentes han sido:


    mini-COMO acerca del Ttulo de las xterm de Ric Lister, disponible
     en
    Prompts ANSI de Keebler, disponible en

    Cmo hacer un prompt para bash de Stephen Webb, disponible en
     http://bash.current.nu/bash/HOWTO.html.

    y X ANSI Fonts de Stumpy, disponible en
     http://home.earthlink.net/~us5zahns/enl/ansifont.html

  Tambin han sido de inmensa ayuda numerosas conversaciones y e-mails
  de Dan, un compaero del Georgia College & State University, cuyo
  conocimiento sobre unix sobrepasa el mo con mucho. Me ha
  proporcionado excelentes sugerencias; ideas suyas han conducido hacia
  prompts interesantes.

  Tres libros que me han has sido de mucha utilidad programando prompts
  son:


    Linux in a Nutshell de Jessica Heckman Perry (O'Reilly, 1997)

    Learning the Bash Shell de Cameron Newham y Bill Rosenblatt
     (O'Reilly, 2a. ed., 1998)

    y Unix Shell Programming de Lowell Jay Arthur (Wiley, 1986; esta es
     la primera edicin, la segunda apareci en 1997).


  1.7.  Copyright y dems


  Este documento es copyright 1998-1999 de Giles Orr. Se anima a su
  distribucin, aunque no debera modificarse este documento (vase la
  seccin ``Comentarios y Sugerencias'' para todo lo referente a ponerse
  en contacto conmigo:  he venido aadiendo los cambios sugeridos por
  los lectores desde hace mucho).  Pngase en contacto conmigo si est
  interesado en realizar una traduccin, esa es una de las
  modificaciones con las que puedo vivir.



  2.  bash  y sus prompts

  2.1.  Qu es bash ?


  Descendiente del Bourne Shell, bash es un producto GNU, el Bourne
  Again Shell. Es el interfaz estndar de lnea de comandos en la
  mayora de las mquinas LiNUX. Potencia la interactividad, soportando
  edicin en lnea de comando, capacidad de completar o recordar
  automticamente un comando, etc. Tambin soporta prompts configurables
  - la mayora de la gente se da cuenta de esto, pero no saben hasta qu
  punto.


  2.2.  Qu puede aportar la manipulacin del prompt ?


  La mayora de los sistemas LiNUX tienen un prompt por defecto en un
  solo color (normalmente gris) que indica el nombre de usuario, el
  nombre de la mquina en la que se est trabajando y alguna indicacin
  acerca del directorio de trabajo actual. Toda esta informacin es
  til, pero se puede ir mucho ms all: se puede mostrar todo tipo de
  informacin (nmero de tty, hora, fecha, carga, nmero de usuarios,
  tiempo sin reiniciar ...) y el prompt puede usar colores ANSI, ya sea
  por razones puramente estticas, o para remarcar cierta informacin.
  Tambin se puede manipular la barra de ttulo de una xterm para
  reflejar parte de esta informacin.


  2.3.  Por qu molestarse ?


  Adems de una apariencia bonita, en ocasiones es til seguir la pista
  de cierta informacin del sistema. Una idea que s que gusta a la
  gente es que es posible poner los prompts de diferentes mquinas en
  diferentes colores. Si se tienen varias terminales X abiertas en
  diferentes mquinas, o si se tiende a olvidar en qu mquina se est
  trabajando y se borran ficheros equivocados, encontrar en esta una
  buena forma de recordar en qu mquina se encuentra.


  2.4.  El primer paso


  La apariencia del prompt viene dada por la variable del shell PS1.
  Las continuaciones de comandos se indican mediante la cadena PS2, que
  puede modificarse de la misma forma que aqu se comentan --ya que el
  manejo es exactamente el mismo, y que no es tan interesante--, casi
  siempre se van a tratar modificaciones de la cadena PS1 (Tambin
  existen las cadenas PS3 y PS4. Estas nunca estn a la vista del
  usuario medio (vea la pgina del manual sobre bash si est interesado
  en su propsito).

  Para cambiar el aspecto del prompt, hay que cambiar la variable PS1.
  Para experimentar, se pueden introducir cadenas PS1 directamente desde
  el prompt, y ver los resultados inmediatamente (esto slo afecta a la
  sesin actual, y los cambios desaparecen cuando termina).  Si se desea
  hacer permanentes estos cambios, modifique su ~/.bashrc, y aada la
  nueva definicin de PS1. Si tiene permisos de root, puede mirar en
  /etc/profile y modificar all la lnea PS1=. Tenga en cuenta que en
  algunas distribuciones (al menos en la RedHat 5.1) /etc/bashrc
  redefine los valores de PS1 y PS2.

  Antes de comenzar, es importante recordar que la cadena PS1 se
  almacena en el entorno como cualquier otra variable de entorno. Si se
  modifica en la lnea de comando, su prompt cambiar. Antes de hacer
  cualquier cambio, puede salvar su prompt actual en otra variable de
  entorno.



              [giles@nikola giles]$ SAVE=$PS1
              [giles@nikola giles]$




  El prompt ms sencillo sera el de un slo carcter, como:



              [giles@nikola giles]$ PS1=$
              $ls
              bin   mail
              $




  Esto demuestra la mejor manera de experimentar con prompts bsicos:
  introducindolos en la lnea de comando. Ntese que el texto
  introducido por el usuario aparece inmeditamente despus del prompt.
  Yo prefiero usar



              $PS1="$ "
              $ ls
              bin   mail
              $




  que fuerza un espacio despus del prompt, hacindolo ms legible. Para
  restaurar el prompt original, basta con llamar a la variable
  almacenada:



              $ PS1=$SAVE
              [giles@nikola giles]$






  2.5.  Secuencias de escape del prompt bash


  Hay numerosas secuencias de escape ofrecidas por el shell bash para
  insertar en el prompt. De la pgina del manual del bash 2.02:


  Cuando se ejecuta interactivamente, bash muestra el prompt primario
  PS1 cuando est listo para leer un comando, y el prompt secundario PS2
  cuando necesita ms datos de entrada para completar un comando.  bash
  permite que estas cadenas de prompt sean modificadas insertando
  ciertos caracteres especiales escapados mediante contrabarra que se
  decodifican de la manera siguiente:


    \a carcter de campana ASCII (07)

    \d la fecha en formato da mes da (p.ej., mar may 26)


    \e caracter de escape ASCII (033)

    \h el nombre del host hasta el primer .

    \H el nombre del la mquina completo (FQDN)


    \n caracter de nueva lnea

    \r retorno de carro

    \s el nombre del shell, el nombre base de $0 (el fragmento que
     sigue a la ltima barra)

    \t la hora actual en formato 24-horas HH:MM:SS

    \T la hora actual en formato 12-horas HH:MM:SS

    \@ la hora actual en formato 12-horas AM/PM

    \u el nombre de usuario del usuario actual

    \v la versin de bash (p.ej., 2.0)

    \V la versin del paquete del bash, versin + patch-level (p.ej.,
     2.00.0)

    \w el directorio actual de trabajo

    \W el nombre base del directorio actual de trabajo

    \! el nmero del comando actual en el histrico

    # el nmero de comando del comando actual

    \$ si el UID efectivo es 0, un #; en otro caso, $

    \nnn el caracter correspondiente al nmero en octal nnn

    \\ una contrabarra

    \[ inicio de una secuencia de caracteres no imprimibles que pueden
     usarse para incrustar una secuencia de control del terminal en el
     prompt.

    \] fin de una secuencia de caracteres no imprimibles

  Continuando donde lo habamos dejado:



              [giles@nikola giles]$ PS1="\u@\h \W> "
              giles@nikola giles> ls
              bin   mail
              giles@nikola giles>




  Este es similar al prompt por defecto de la mayora de las
  distribuciones LiNUX. Pero yo quera una apariencia ligeramente
  diferente, as que lo cambi a:



              giles@nikola giles> PS1="[\t][\u@\h:\w]\$ "
              [21:52:01][giles@nikola:~]$ ls
              bin   mail
              [21:52:15][giles@nikola:~]$





  2.6.  Valor permanente de las cadenas  PS? 



  Las cadenas PS? son establecidas, segn la persona o distribucin en
  distintos lugares. Los ms comunes son /etc/profile, /etc/bashrc,
  ~/.bash_profile, y ~/.bashrc.  Johan Kullstam, johan19@idt.net
  escribe:


  La cadena PS1 debera ponerse en el .bashrc debido a que los bash no
  interactivos no tienen en cuenta este fichero, y por tanto, no
  estableceremos PS1 si se trata de una shell no interactiva. La pgina
  del manual de bash indica que la presencia o ausencia de PS1 es una
  buena manera de saber si uno est en una sesin interactiva o no
  interactiva de bash.

   La forma en que me percat de esto es que startx es un script bash,
  lo que implica que pulverizar el prompt. Cuando se pone PS1 en el
  .profile (o en el .bash_profile, al entrar en consola y lanzar las X
  va startx, la variable PS1 se elimina en el proceso, dejndole con el
  prompt por defecto.

   Una solucin es lanzar las xterm y las rxvt con la opcin -ls para
  forzarles a leer el .profile, pero en el momento en que se llame un
  shell mediante un shell-script no interactivo se perder PS1.
  system(3) usa sh -c que, si sh es bash, eliminar PS1. Una forma mejor
  de hacer esto es situar la definicin de PS1 en .bashrc. Este fichero
  se lee cada vez que se inicia bash y es donde deberan aparecer las
  cosas interactivas (p.ej. PS1)

   Por lo tanto se llega a la conclusin de que PS1= ...(blah)...
  debera ir en .bashrc y no en .profile

  He intentado simular el problema que l comenta, y he encontrado uno
  diferente: mi variable PROMPT_COMMAND (de la que se hablar despus)
  era desintegrada. Mi conocimiento en este rea es un poco limitado,
  as que seguir lo que dice Johan.


  3.  Comandos Externos



  3.1.  PROMPT_COMMAND


  bash proporciona otra variable de entorno llamada PROMPT_COMMAND. El
  contenido de esta variable se ejecuta como un comando bash normal
  justo antes de que bash muestre el prompt.



              [21:55:01][giles@nikola:~] PS1="[\u@\h:\w]\$ "
              [giles@nikola:~] PROMPT_COMMAND="date +%H%M"
              2155
              [giles@nikola:~] d
              bin   mail
              2156
              [giles@nikola:~]




  Lo que ocurre arriba es que he cambiado PS1 para que no incluya la
  secuencia de escape \t, de tal modo que la hora no forme parte del
  prompt.  Despus he usado date +%H%M para mostrar la hora en un
  formato que me gusta ms. Pero aparece en una lnea diferente a la del
  prompt. Esto se soluciona usando echo -n ... como se muestra debajo,
  funciona con bash 2.0+, pero parece que no lo hace con bash 1.14.7:
  aparentemente el prompt se dibuja de manera diferente, y el mtodo
  mostrado a continuacin resulta en superposicin de texto.






         2156
         [giles@nikola:~] PROMPT_COMMAND="echo -n [$(date +%H%M)]"
         [2156][giles@nikola:~]$
         [2156][giles@nikola:~]$ d
         bin   mail
         [2157][giles@nikola:~]$ unset PROMPT_COMMAND
         [giles@nikola:~]




  echo -n ... controla la salida del comando date y suprime el caracter
  de nueva lnea final, permitiendo que el prompt aparezca en una sola
  lnea. Al final, uso el comando unset para eliminar la variable de
  entorno PROMPT_COMMAND.

  Ntese que uso la convencin $(<comando>) para la sustitucin de
  comandos, es decir



              $(date +%H%M)




  significa sustituye la salida de date +%H%M aqu.  Esto funciona en
  bash 2.0+. En alguna versin antigua de bash, anterior a la 1.14.7,
  puede ser necesario el uso de comillas simples graves (`date +%H%M`).
  Estas comillas pueden usarse en bash 2.0+, pero es preferible usar
  $(), que funciona mejor en el caso de anidamientos. Voy a usar esta
  convencin a lo largo de este documento.  Si utiliza una versin
  anterior de bash, normalmente podr sustituir los $() por las
  comillas. Si la sustitucin de comandos est escapada (es decir,
  \$(comando) ), entonces deber usar contrabarras para escapar AMBAS
  comillas (o sea, \`comando\` ).


  3.2.  Comandos externos en el prompt


  Tambin se puede usar la salida de comandos regulares LiNUX
  directamente en el prompt. Obviamente, no es deseable insertar muchas
  cosas, o se crear un prompt enorme. Adems ser preferible usar un
  comando rpido ya que se va a ejecutar cada vez que el prompt aparezca
  en pantalla, y retrasa la aparicin de ste lo que puede resultar muy
  molesto. (A diferencia del ejemplo anterior al que recuerda, esto
  funciona con bash 1.14.7)



              [21:58:33][giles@nikola:~]$ PS1="[\$(date +%H%M)][\u@\h:\w]\$ "
              [2159][giles@nikola:~]$ ls
              bin   mail
              [2200][giles@nikola:~]$




  Es importante hacer notar la contrabarra anterior al signo de dlar de
  la sustitucin del comando. Sin ella, el comando externo se ejecuta
  exactamente una vez: cuando se lee la cadena almacenada en PS1 del
  entorno. Para este prompt, eso significara que mostrara siempre la
  misma hora, sin importar cuanto tiempo se ha usado el prompt. La
  contrabarra protege los contenidos de $() de la interpretacin
  inmediata del shell, por lo que date es llamado cada vez que se genera
  un prompt.

  LiNUX incluye muchas utilidades de pequeo tamao como date, grep o wc
  que permiten la manipulacin de datos. Si se encuentra en la situacin
  de crear una combinacin compleja de estos programas dentro del
  prompt, podra ser ms fcil crear un shell script y llamarlo desde el
  prompt. En ocasiones son necesarias secuencias de escape en los
  scripts de bash para asegurar que las variables se expanden en el
  momento correcto (como se ha mostrado arriba con el comando date):
  esto llega a niveles mayores con la lnea de prompt PS1, y es una
  buena idea evitarlo creando scripts.

  Un ejemplo de un pequeo shell script usado dentro de un prompt es el
  siguiente:




         #!/bin/bash
         #     lsbytesum - suma del nmero total de bytes de un ls
         TotalBytes=0
         for Bytes in $(ls -l | grep "^-" | cut -c30-41)
         do
             let TotalBytes=$TotalBytes+$Bytes
         done
         TotalMeg=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc)
         echo -n "$TotalMeg"




  A veces he mantenido ambos como funciones (mucho ms eficiente, pero
  desafortunadamente, la explicacin de funciones en detalle va ms all
  de este documento), o como scripts en mi directorio /bin, que se
  encuentra en mi variable PATH. Utilizndolo en un prompt:



              [2158][giles@nikola:~]$ PS1="[\u@\h:\w (\$(lsbytesum) Mb)]\$ "
              [giles@nikola:~ (0 Mb)]$ cd /bin
              [giles@nikola:/bin (4.498 Mb)]$





  3.3.  Qu poner en el prompt


  Se habr percatado de que yo pongo el nombre de usuario, el nombre de
  la mquina, la hora y el directorio actual en la mayora de mis
  prompts. Con la excepcin de la hora, son cosas muy normales de
  encontrar en un prompt, y la hora es posiblemente la adicin ms
  comn. Pero lo que incluya cada uno es cosa de gusto personal. Aqu
  hay ejemplos de personas que conozco que le pueden dar ideas.

  El prompt de Dan es mnimo pero muy efectivo, particularmente para su
  forma de trabajar.








         [giles@nikola:~]$ cur_tty=$(tty | sed -e "s/.*tty\(.*\)/\1/")
         [giles@nikola:~]$ echo $cur_tty
         p4
         [giles@nikola:~]$ PS1="\!,$cur_tty,\$?\$ "
         1095,p4,0$




  A Dan no le gusta que el hecho de tener el directorio actual de
  trabajo en el prompt pueda variar el tamao de ste drsticamente
  mientras se pasa de un directorio a otro, as que el mantiene la pista
  de esto en su cabeza (o usa pwd). El aprendi Unix con csh y tcsh, as
  que usa su histrico de comandos de forma intensiva (cosa que los
  adictos al bash no solemos hacer), as que la primera cosa en el
  prompt es el nmero del histrico. El segundo campo es el caracter
  significante de la tty (la salida de tty es recortada mediante sed),
  un dato que puede ser til para los usuarios de screen. El tercer
  campo es el valor de retorno del ltimo comando/tubera (ntese que se
  muestra intil para cualquier comando que se ejecuta dentro del
  prompt; se puede solucionar capturndolo en una variable). Finalmente,
  \$ es un smbolo de dlar para un usuario normal y cambia a # si el
  usuario es el root.

  Torben Fjerdingstad me escribi para decirme que a menudo suspende
  tareas, y despus se le olvidan, as que usa su prompt para servir de
  recordatorio de las tareas suspendidas:



              [giles@nikola:~]$ function jobcount {
              > jobs|wc -l| awk '{print $1}'
              > }
              [giles@nikola:~]$ export PS1='\W[`jobcount`]# '
              giles[0]# man ls &
              [1] 4150

              [1]+  Stopped (tty output)    man ls
              giles[1]#




  Torben usa awk para evitar el espacio de la salida de wc, mientras que
  yo habra usado sed o tr - no porque sean mejor, sino porque me
  resultan ms familiares. Probablemente existan ms formas.  Torben
  adems rodea sus cadenas PS1 con comillas simples. lo que evita que el
  bash interprete inmediatamente las contrabarras, as no tiene que
  escaparlas como yo haba dicho.

  NOTA: existe un bug conocido en bash 2.02 que provoca que el comando
  jobs no retorne nada a una tubera. Si intenta lo de arriba bajo bash
  2.02, siempre obtendr un 0 independientemente de los trabajos que
  haya suspendidos. Chet Ramey, uno de los responsables de bash me ha
  dicho que esto se soluciona en la v2.03.


  3.4.  Entorno bash  y funciones


  Como he mencionado antes, PS1, PS2, PS3, PS4 y PROMPT_COMMAND se
  almacenan todas en el entorno del bash. Para aquellos que provengan
  del DOS, la idea de almacenar gran cantidad de cdigo en el entorno es
  aterradora, ya que el entorno del DOS era pequeo, y no creci bien
  exactamente.  Posiblemente haya lmites prcticos en lo que se puede y
  debe poner en el entorno, pero no los conozco, y probablemente se est
  hablando de un par de rdenes de magnitud mayores de a lo que estn
  acostumbrados los usuarios de DOS. Como dijo Dan:

  En mi shell interactivo tengo 62 alias y 25 funciones. Mi regla es que
  si necesito algo nicamente para uso interactivo y puedo escribirlo
  bien en bash, hago de ello una funcin de shell (teniendo en cuenta
  que no pueda expresarse de manera sencilla como un alias). Si la gente
  se preocupa por la memoria no deberan estar usando bash. bash es uno
  de los programas ms grandes que ejecuto en mi mquina LiNUX (aparte
  de Oracle).  Ejecute top algn tiempo y pulse M para ordenar por
  memoria, y compruebe lo cerca que est bash de la cima de la lista. O
  sea, que es mayor que sendmail!... Recomienda que utilicen mejor  ash
  o algo as.

  Supongo que estaba usando la consola el da que prob eso: ejecutando
  X y aplicaciones X obtendr muchas cosas mayores que bash. Pero la
  idea es la misma: el entorno es algo para ser usado, sin preocupacin
  de desbordarlo.

  Me arriesgo a la censura de los gurs de unix cuando digo esto (por el
  delito de supersimplificacin), pero las funciones son bsicamente
  pequeos shell scripts que se cargan en el entorno con el propsito de
  una mayor eficiencia. Citando a Dan de nuevo: las funciones shell son
  lo ms eficiente. El procedimiento es similar a un source de un shell
  script pero con el ahorro de las operaciones entrada/salida, ya que la
  funcin se encuentra ya en memoria. Las funciones shell se cargan
  tpicamente del .bashrc o .bash_profile dependiendo de si se las
  quiere en el shell inicial o en los sucesivos subshells tambin.

  Comprese esto con la ejecucin de un shell script: el shell realiza
  un  fork, el hijo lleva a cabo un exec, potencialmente se busca el
  path, el kernel abre el fichero y examina la cantidad suficiente de
  bytes para saber cmo ejecutarlo, en el caso de un shell script debe
  arrancarse un shell con el nombre del script como argumento. Comparado
  con una funcin shell, cualquier cosa aparte de la ejecucin de las
  sentencias, puede considerarse una sobrecarga innecesaria.



  4.  Manipulaciones de la barra de ttulo de Xterm


  Pueden usarse secuencias de escape no imprimibles para producir
  efectos interesantes en los prompts. Para usar estas secuencias es
  necesario encerrarlas entre \[ y \], advirtiendo al bash de que ignore
  estas secuencias cuando calcule la longitud del prompt. No incluir
  estos delimitadores resulta en una colocacin errnea del cursor en el
  cdigo de edicin de lnea, ya que no conoce el tamao real del
  prompt.  Las secuencias de escape adems deben ir precedidas de \033[
  en bash anteriores a la versin 2, o por \033[ o \[e en versiones
  posteriores.

  Si se intenta cambiar la barra de ttulo de la Xterm con el prompt
  mientras se est en la consola, se producir basura en el prompt. Para
  evitar esto, hay que comprobar la variable de entorno TERM para
  indicar que el prompt va a estar en una xterm:










    function proml
    {
    case $TERM in
        xterm*)
            local TITLEBAR='\[\033]0;\u@\h:\w\007\]'
            ;;
        *)
            local TITLEBAR=''
            ;;
    esac

    PS1="${TITLEBAR}\
    [\$(date +%H%M)]\
    [\u@\h:\w]\
    \$ "
    PS2='> '
    PS4='+ '
    }




  Esta es una funcin que puede ser aadida al ~/.bashrc. Entonces se
  podr invocar a la funcin mediante su nombre. La funcin, como la
  cadena PS1, se almacena en el entorno. Una vez que la funcin ha dado
  valor a la cadena PS1, se puede eliminar la funcin del entorno con
  unset proml. Debido a que el prompt no puede cambiar de estar en una
  Xterm a estar en la consola, la variable TERM no se comprueba cada vez
  que se genera el prompt. He usado marcadores de comtinuacin
  (contrabarras, \)  en la definicin del prompt, para permitir
  continuarlo a lo largo de varias lneas. Esto mejora la legibilidad,
  haciendo ms fcil modificarlo o depurarlo.

  Lo he definido como una funcin porque es as como funciona el paquete
  Bashprompt: no es la nica manera de hacerlo pero funciona bien. A
  medida que los prompts usados se tornen ms complejos, resulta ms y
  ms tedioso teclearlos en la lnea de comando, y ms prctico
  situarlos en algn tipo de fichero de texto. En este caso, para probar
  esto como prompt, salve lo de arriba como un fichero de texto llamado
  proml. Se puede trabajar con l de la manera que sigue:



       [giles@nikola:/bin (4.498 Mb)]$ cd     -> Ir a donde se almacena el prompt
       [giles@nikola:~ (0 Mb)]$ vi proml      -> Editar el prompt
              ...                             -> Introducir el texto anterior
       [giles@nikola:~ (0 Mb)]$ source proml  -> Leer la funcion de prompt
       [giles@nikola:~ (0 Mb)]$ proml         -> Ejecutar la funcion de
       prompt




  El primer paso en la creacin del prompt es comprobar si el shell en
  el que nos encontramos es o no una xterm; si lo es, estar definida la
  variable de entorno ($(TITLEBAR)). Esta consiste de la secuencia de
  escape apropiada, y \u@;\h:\w, lo que escribe
  <usuario>@<mquina>:<directorio> en la barra de ttulo de la Xterm.
  Esto es particularmente til para xterm minimizadas hacindolas ms
  rpidamente identificables. El resto de material de este prompt
  debera ser familiar de prompts previos que hemos creado.

  El nico percance que puede darse manipulando la barra de ttulo de la
  xterm de esta forma ocurre cuando se ingresa en un sistema en el que
  no se ha preparado la barra de ttulo: la xterm continuar mostrando
  la informacin del sistema anterior que tena la barra de ttulo
  manipulada.


  5.  Secuencias de escape ANSI: colores y movimientos del cursor

  5.1.  Colores


  Como se mencion antes, las secuencias escape de caracteres no
  imprimibles tienen que encerrarse entre \[\033[ y \]. Para las
  secuencias de escape de color, tambin deben aparecer, seguidos adems
  de una m minscula.

  Si se prueba uno de los prompts siguientes en una xterm y resulta que
  no se ven los colores nombrados, compruebe su ~/.Xdefaults (y
  posiblemente sus hermanos) y busque lneas como XTerm*Foreground:
  BlanchedAlmond. Esto puede comentarse colocando un ! delante. Por
  supuesto, depende de qu emulador de terminal est usando. Este es el
  lugar ms probable en el que los colores de su terminal pueden ser
  redefinidos.

  Para incluir texto azul en el prompt



              PS1="\[\033[34m\][\$(date +%H%M)][\u@\h:\w]$ "




  El problema con este prompt es que el color azul que comienza con el
  cdigo 34 no se retorna nunca al color habitual, por lo que cualquier
  texto que se teclee despus del prompt ser del mismo color que el
  prompt.  Este es tambin un azul oscuro, as que combinarlo con el
  cdigo de negrita puede resultar til:



              PS1="\[\033[1;34m\][\$(date +%H%M)][\u@\h:\w]$\[\033[0m\] "





  Ahora el prompt es azul claro, y termina cambiando el color de nuevo a
  nada (el color que se tena previamente de primer plano)

  Aqu est el resto de equivalencias de colores:



              Negro       0;30     Gris oscuro    1;30
              Azul        0;34     Azul claro     1;34
              Verde       0;32     Verde claro    1;32
              Cyan        0;36     Cyan claro     1;36
              Rojo        0;31     Rojo claro     1;31
              Purpura     0;35     Purpura claro  1;35
              Marron      0;33     Amarillo       1;33
              Gris claro  0;37     blanco         1;37




  Tambin se pueden poner colores de fondo, usando 44 para fondo azul,
  41 para fondo rojo, etc. No hay colores de fondo 'negrita'; se pueden
  usar combinaciones, como texto rojo claro sobre fondo azul
  \[\033[44;1;31m\], aunque parece que funciona mejor poner los colores
  separadamente (es decir, \[\033[44m\]\[\033[1;31m\]). Otros cdigos
  disponibles incluyen 4: subrayado, 5: parpadeante, 7: inverso y 8:
  oculto.

  Nota: mucha gente (yo incluido), tienen fuertes objeciones al uso del
  atributo parpadeo. Afortunadamente no funciona en ningn emulador de
  terminal que yo conozca - pero si que funciona en la consola. Y si
  alguien se preguntaba (como yo hice) para qu sirve el atributo
  oculto?, yo he visto usarlo en un ejemplo de shell script (no en un
  prompt) que permita introducir un password sin ser reflejado en la
  pantalla.

  Basado en el prompt elite2 del paquete bashprompt (que he modificado
  para funcionar mejor en una consola estndar, en lugar de con los
  tipos especiales de xterm necesarios para ver correctamente el
  original), este es un prompt que he usado mucho:



         function elite
         {

         local GRAY="\[\033[1;30m\]"
         local LIGHT_GRAY="\[\033[0;37m\]"
         local CYAN="\[\033[0;36m\]"
         local LIGHT_CYAN="\[\033[1;36m\]"

         case $TERM in
             xterm*)
                 local TITLEBAR='\[\033]0;\u@\h:\w\007\]'
                 ;;
             *)
                 local TITLEBAR=""
                 ;;
         esac

         local GRAD1=$(tty|cut -d/ -f3)
         PS1="$TITLEBAR\
         $GRAY-$CYAN-$LIGHT_CYAN(\
         $CYAN\u$GRAY@$CYAN\h\
         $LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
         $CYAN\#$GRAY/$CYAN$GRAD1\
         $LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
         $CYAN\$(date +%H%M)$GRAY/$CYAN\$(date +%d-%b-%y)\
         $LIGHT_CYAN)$CYAN-$GRAY-\
         $LIGHT_GRAY\n\
         $GRAY-$CYAN-$LIGHT_CYAN(\
         $CYAN\$$GRAY:$CYAN\w\
         $LIGHT_CYAN)$CYAN-$GRAY-$LIGHT_GRAY "
         PS2="$LIGHT_CYAN-$CYAN-$GRAY-$LIGHT_GRAY "
         }




  Defino los colores como variables temporales del shell en favor de la
  legibilidad. Es ms fcil trabajar as. La variable GRAD1 es una
  comprobacin para determinar en qu terminal se est. Como la prueba
  para saber si se est en una xterm, solo es necesario llevarla a cabo
  una vez. El prompt es similar a esto, excepto el color





         --(giles@nikola)-(75/ttyp7)-(1908/12-Oct-98)--
         --($:~/tmp)--




  Para recordar qu colores hay disponibles, uso el siguiente script que
  saca todos los colores por pantalla:


























































    #!/bin/bash
    #
    # Este fichero saca por pantalla un monton de codigos de color
    # para demostrar que hay disponible. Cada linea es un color con
    # fondo negro y gris, con el codigo en medio. Funciona sobre
    # fondos blancos, negros y verdes (2 dic. 98)
    #
    echo "  Sobre gris claro:        Sobre negro:"
    echo -e "\033[47m\033[1;37m  Blanco        \033[0m\
     1;37m \
    \033[40m\033[1;37m  Blanco        \033[0m"
    echo -e "\033[47m\033[37m  Gris Claro    \033[0m\
       37m \
    \033[40m\033[37m  Gris Claro    \033[0m"
    echo -e "\033[47m\033[1;30m  Gris          \033[0m\
     1;30m \
    \033[40m\033[1;30m  Gris          \033[0m"
    echo -e "\033[47m\033[30m  Negro         \033[0m\
       30m \
    \033[40m\033[30m  Negro         \033[0m"
    echo -e "\033[47m\033[31m  Rojo          \033[0m\
       31m \
    \033[40m\033[31m  Rojo          \033[0m"
    echo -e "\033[47m\033[1;31m  Rojo Claro    \033[0m\
     1;31m \
    \033[40m\033[1;31m  Rojo Claro    \033[0m"
    echo -e "\033[47m\033[32m  Verde         \033[0m\
       32m \
    \033[40m\033[32m  Verde         \033[0m"
    echo -e "\033[47m\033[1;32m  Verde Claro   \033[0m\
     1;32m \
    \033[40m\033[1;32m  Verde Claro   \033[0m"
    echo -e "\033[47m\033[33m  Marrn        \033[0m\
       33m \
    \033[40m\033[33m  Marron        \033[0m"
    echo -e "\033[47m\033[1;33m  Amarillo      \033[0m\
     1;33m \
    \033[40m\033[1;33m  Amarillo      \033[0m"
    echo -e "\033[47m\033[34m  Azul          \033[0m\
       34m \
    \033[40m\033[34m  Azul          \033[0m"
    echo -e "\033[47m\033[1;34m  Azul Claro    \033[0m\
     1;34m \
    \033[40m\033[1;34m  Azul Claro    \033[0m"
    echo -e "\033[47m\033[35m  Prpura       \033[0m\
       35m \
    \033[40m\033[35m  Purpura       \033[0m"
    echo -e "\033[47m\033[1;35m  Rosa          \033[0m\
     1;35m \
    \033[40m\033[1;35m  Rosa          \033[0m"
    echo -e "\033[47m\033[36m  Cyan          \033[0m\
       36m \
    \033[40m\033[36m  Cyan          \033[0m"
    echo -e "\033[47m\033[1;36m  Cyan Claro    \033[0m\
     1;36m \
    \033[40m\033[1;36m  Cyan Claro    \033[0m"





  5.2.  Movimiento del cursor


  Las secuencias de escape ANSI permiten mover el cursor por la pantalla
  a voluntad. Esto es ms til para interfaces de usuario a pantalla
  completa generados por shell scripts, pero tambin se pueden usar en
  prompts. Las secuencias de escape de movimientos son las siguientes:



              - Posicionar el cursor:
                \033[<L>;<C>H
                pone el cursor en la linea L, columna C.
              - Mover el cursor arriba N lineas:
                \033[<N>A
              - Mover el cursor abajo N lineas:
                \033[<N>B
              - Mover el cursor hacia adelante N columnas:
                \033[<N>C
              - Mover el cursor hacia atras N columnas:
                \033[<N>D
              - Guardar la posicion del cursor:
                \033[s
              - Restaurar la posicion del cursor:
                \033[u




  Los dos ltimos cdigos no estn presentes en muchos emuladores de
  terminal. Los nicos que conozco que los soportan son xterm y nxterm,
  a pesar de que la mayora de los emuladores de terminal estn basados
  en el cdigo de xterm. Por lo que yo s, ni rxvt, kvt ni xiterm ni
  Eterm no soportan esto. La consola s lo soporta.

  Pruebe a poner la siguiente lnea de cdigo en el prompt (est ms
  claro lo que hace si el prompt est bastantes lneas ms abajo que el
  tope superior de la terminal)




       echo -en "\033[7A\033[1;35m BASH \033[7B\033[6D"




  Esto debera mover el cursor 7 lneas hacia arriba de la pantalla,
  escribir la palabra BASH, y volver a su sitio habitual en el prompt.
  Esto no es un prompt, es solo una demostracin de movimiento del
  cursor por la pantalla, usando color para enfatizar lo que se ha
  hecho.

  Salve lo siguiente en un fichero llamado clock:   (-- N.del T.:
  para que funcione bien, he tenido que poner let prompt_x=$COLUMNS-7,
  en lugar de la lnea original--)















    #!/bin/bash

    function prompt_command {
    let prompt_x=$COLUMNS-5
    }

    PROMPT_COMMAND=prompt_command

    function clock {
    local       BLUE="\[\033[0;34m\]"
    local        RED="\[\033[0;31m\]"
    local  LIGHT_RED="\[\033[1;31m\]"
    local      WHITE="\[\033[1;37m\]"
    local  NO_COLOUR="\[\033[0m\]"
    case $TERM in
        xterm*)
            TITLEBAR='\[\033]0;\u@\h:\w\007\]'
            ;;
        *)
            TITLEBAR=""
            ;;
    esac

    PS1="${TITLEBAR}\
    \[\033[s\033[1;\$(echo -n \${prompt_x})H\]\
    $BLUE[$LIGHT_RED\$(date +%H%M)$BLUE]\[\033[u\033[1A\]
    $BLUE[$LIGHT_RED\u@\h:\w$BLUE]\
    $WHITE\$$NO_COLOUR "
    PS2='> '
    PS4='+ '
    }




  Este prompt es bastante sencillo, excepto por el hecho de que mantiene
  un reloj en la esquina superior derecha de la pantalla (incluso aunque
  se vare de tamao el terminal). Esto NO funcionar en los emuladores
  de terminal que he mencionado que no aceptan guardar y recuperar la
  posicin del cursor. Si se intenta ejecutar este prompt en cualquiera
  de esos terminales, el reloj aparecer correctamente, pero el prompt
  quedar encajado en la segunda lnea del terminal.

  Vase la seccin ``Prompt con Reloj Elegante e Intil'' para un uso
  ms extensivo de estos cdigos.


  5.3.  Movimiento del cursor con tput


  Como ocurre con muchas cosas en unix, hay ms de una forma de
  conseguir los mismos objetivos. Una utilidad llamada tput puede
  tambin usarse para mover el cursor por la pantalla, o devolver
  informacin acerca del estado del terminal. tput es menos flexible que
  las secuencias de escape ANSI para el posicionamiento del cursor: slo
  se puede mover el cursor a una posicin absoluta, no se puede mover
  con relacin a la posicin actual. Yo no uso tput, as que no voy a
  explicarlo en detalle. Consulte la pgina del manual y sabr tanto
  como yo de tput.



  6.  Caracteres especiales: secuencias de escape octales



  Aparte de los caracteres que se pueden teclear mediante un teclado,
  hay muchos otros que se pueden mostrar por la pantalla. He creado un
  script que permite comprobar qu tiene disponible el tipo que est
  usando. El comando principal a usar para utilizar estos caracteres es
  echo -e.  La opcin -e le indica a echo que habilite la interpretacin
  de caracteres escapados mediante contrabarra. Lo que aparezca a partir
  de un 200-400 octal ser muy diferente con un tipo VGA de lo que
  aparezca con un tipo estndar linux. Queda avisado de que algunas de
  estas secuencias de escape tienen extraos efectos en el terminal, y
  no he intentado evitarlos. Los caracteres de dibujos de lneas y
  bloques (que nos resultan tan familiares a los usuarios de
  WordPerfect)  utilizados masivamente en el proyecto Bashprompt estn
  entre el 260 y 337 octal.





















































    #!/bin/bash

    #   Script: escgen

    function usage {
       echo -e "\033[1;34mescgen\033[0m <valor_inferior> [<valor_superior>]"
       echo "   Generador de secuencias de escape octales: imprime todas las"
       echo "   secuencias de escape contenidas entre los valores menor y"
       echo "   mayor. Si no se proporciona el segundo valor, se imprimen"
       echo "   8 caracteres."
       echo "   1998 - Giles Orr, sin garanta."
       exit 1
    }

    if [ "$#" -eq "0" ]
    then
       echo -e "\033[1;31mPor favor incluya uno o dos valores.\033[0m"
       usage
    fi
    let lower_val=${1}
    if [ "$#" -eq "1" ]
    then
       # Si no hay dos valores, sacar 8 caracteres
       upper_val=$(echo -e "obase=8 \n ibase=8 \n $lower_val+10 \n quit" | bc)
    else
       let upper_val=${2}
    fi
    if [ "$#" -gt "2" ]
    then
       echo -e "\033[1;31mPor favor, incluya dos valores.\033[0m"
       echo
       usage
    fi
    if [ "${lower_val}" -gt "${upper_val}" ]
    then
       echo -e "\033[1;31m${lower_val} es mayor que ${upper_val}."
       echo
       usage
    fi
    if [ "${upper_val}" -gt "777" ]
       then
       echo -e "\033[1;31mLos valores no pueden superar 777.\033[0m"
       echo
       usage
    fi

    let i=$lower_val
    let line_count=1
    let limit=$upper_val
    while [ "$i" -lt "$limit" ]
    do
       octal_escape="\\$i"
       echo -en "$i:'$octal_escape' "
       if [ "$line_count" -gt "7" ]
       then
          echo
          #   Put a hard return in.
          let line_count=0
       fi
       let i=$(echo -e "obase=8 \n ibase=8 \n $i+1 \n quit" | bc)
       let line_count=$line_count+1
    done
    echo



  Tambin se puede usar xfd para mostrar todos los caracteres de un tipo
  X, mediante el comando xfd -fn <tipo>. Pinchando sobre un caracter
  determinado se puede obtener mucha informacin sobre l, incluyendo su
  valor octal. El script de arriba puede resultar til en la consola, y
  en el caso de que no se est seguro acerca del nombre del tipo de
  letra.


  7.  El paquete Bash Prompt

  7.1.  Disponibilidad


  El paquete Bash Prompt est disponible en http://bash.current.nu, y es
  el resultado del trabajo de varias personas coordinadas por Rob
  Current (aka (-- N del T.:
  tambin como ..., alias ....--)

  BadLandZ). El paquete se encuentra en sus primeras betas, pero
  proporciona una manera simple de usar mltiples prompts (o temas),
  permitiendo poner prompts para los shells de ingreso (login shells), y
  para los subshells (es decir, poner cadenas PS1 en .bash_profile y
  .bashrc).

  La mayora de los temas usan caracteres VGA extendidos, as que se ven
  mal a menos que se usen fuentes VGA (que no viene por defecto en la
  mayora de los sistemas).


  7.2.  Cambio de fuentes en una xterm


  Para usar algunos de los prompts ms bonitos del paquete Bash Prompt,
  es necesario obtener e instalar fuentes que soporten el conjunto de
  caracteres esperado por los prompts. Se conocen como fuentes VGA, pero
  no tengo clara la distincin entre estos y las que Linux suele
  incluir, aunque claramente soportan diferentes conjuntos de
  caracteres.

  Las xterm estndar soportan un alfabeto extendido, incluyendo muchas
  letras con tildes. En las fuentes VGA todo esto se reemplaza con
  caracteres grficos (lneas, puntos, bloques...). Si alguien puede
  explicar esto con ms detalle, que se ponga en contacto conmigo e
  incluir la explicacin aqu.

  (--  N. del T.:
  que tenga caracteres grficos y adems incluya vocales acentuadas y
  ees, para que resulte til a un usuario hispanoamericano. Esto lo he
  hecho yo en mi sistema--)

  Obtener e instalar estas fuentes es de alguna forma un proceso
  relacionado.  Primero hay que conseguir lo(s) tipo(s). Despus
  asegurarse de que son ficheros .pcf o .pcf.gz. Si son ficheros .bdf
  viene bien el comando bdftopcf (mirar la pgina del manual). Hay que
  colocar estos ficheros en el directorio /usr/X11R6/lib/X11/fonts/misc
  (este es el lugar correcto para RedHat 5.1 y Slackware 3.4  (-- N. del
  T.:
  RedHat 6.0.--) , aunque podran variar en otras distribuciones). Desde
  el directorio en cuestin hay que ejecutar el comando mkfontdir,
  seguido de xset fp rehash. En ocasiones es una buena idea editar el
  fichero fonts.alias del mismo directorio y crear alias ms cortos para
  los tipos.

  Para usar los nuevos tipos, hay que lanzar el emulador de terminal
  deseado con el comando apropiado, que se puede encontrar bien en la
  pgina del manual correspondiente o mediante la opcin --help de lnea
  de comando. En los emuladores de terminal ms populares se usan as:



              xterm -font <tipo>




  o



              xterm -fn <tipo> -fb <tipo-negrita>
              Eterm -F <tipo>
              rxvt -fn <tipo>




  Hay tipos VGA disponibles en la pgina de Tipos ANSI de Stumpy en
  http://home.earthlink.net/~us5zahns/enl/ansifont.html (de la que he
  tomado mucho para escribir este documento).


  8.  Carga de un prompt diferente

  8.1.  Carga de un prompt diferente posterior


  Las explicaciones en este COMO han mostrado cmo crear las variables
  de entorno PS1, o cmo incorporar las cadenas PS1 y PS2 a funciones
  que podan ser llamadas por ~/.bashrc o como un tema por el paquete
  Bash Prompt.

  Mediante el paquete Bash Prompt, basta con escribir bashprompt -i para
  ver una lista de temas disponibles. Para poner un prompt a los shells
  de ingreso (login shells) futuros (sobre todo la consola, pero tambin
  telnet y Xterms, dependiendo de cmo estn configuradas las Xterms),
  se hace con bashprompt -l tema. bashprompt entonces modifica el
  ~/.bash_profile para llamar al tema seleccionado al arrancar. Para
  poner un prompt a subshells futuros (normalmente Xterms, rxvt, etc.),
  se hace con bashprompt -s tema, y bashprompt modifica el ~/.bashrc
  para llama al tema apropiado al iniciarse.

  Vea ``Valor permanente de las cadenas PS?'' la nota de Johan Kullstam
  acerca de la importancia de poner las cadenas PS? en ~/.bashrc


  8.2.  Carga inmediata de un prompt diferente


  Se puede cambiar el prompt en el terminal actual (usando la funcin de
  ejemplo elite de arriba) escribiendo source elite seguido de elite
  (suponiendo que el fichero de la funcin elite se encuentre en el
  directorio de trabajo). Esto es engorroso, y deja una funcin extra
  (elite) en el espacio de entorno --si quiere limpiar el entorno, se
  hace con unset elite--. Esto parece un buen candidato para un pequeo
  shell script, pero un script no funciona aqu porque no puede cambiar
  el entorno del shell actual: solo puede cambiar el entorno del
  subshell en el que se ejecuta. En cuanto termina el script, el
  subshell desaparece y con l los cambios hechos al entorno.

  Algo que si puede cambiar el entorno del shell actual son las
  funciones de entorno. El paquete Bash Prompt coloca una funcin
  llamada callbashprompt en el entorno, y, mientras no se documente, no
  puede usarse para cargar ningn tema de bashprompt sobre la marcha.
  Mira en el directorio de temas que instala (el tema que se llama debe
  estar all), hace un source de la funcin solicitada, carga la funcin
  y luego la elimina, de forma que mantiene el entorno limpio.
  callbashprompt no fue pensada para usarse de este modo, y no tiene
  control de errores, pero si se tiene esto en cuenta, funciona bastante
  bien.




  9.  Prompt dinmico con color segn la carga del sistema

  9.1.  Un ejemplo de prueba de concepto


  Esto es una prueba de concepto ms que un prompt bonito: cambio de
  colores en el prompt dinmicamente. En este ejemplo, el color del
  nombre del host cambia dependiendo de la carga (a modo de aviso).



         #!/bin/bash
         #   "hostloadcolour" - 17 Octubre 98, by Giles
         #
         #   La idea aqui es cambiar el color del nombre del host en el prompt
         #   dependiendo de un valor de carga que sirve de umbral.

         # THRESHOLD_LOAD es el valor de la carga en un minuto
         # (multiplicado por 100) al cual se desea que el prompt
         # cambie de COLOUR_LOW a COLOUR_HIGH

         THRESHOLD_LOAD=200
         COLOUR_LOW='1;34'
                   # light blue
         COLOUR_HIGH='1;31'
                    # light red

         function prompt_command {
         ONE=$(uptime | sed -e "s/.*load average: \(.*\...\), \(.*\...\), \(.*\...\)/\1/" -e "s/ //g")
         # Aparentemente "scale" en bc no se aplica a las multiplicaciones
         # pero si a las divisiones
         ONEHUNDRED=$(echo -e "scale=0 \n $ONE/0.01 \nquit \n" | bc)
         if [ $ONEHUNDRED -gt $THRESHOLD_LOAD ]
         then
             HOST_COLOUR=$COLOUR_HIGH
                 # Light Red
         else
             HOST_COLOUR=$COLOUR_LOW
                 # Light Blue
         fi
         }

         function hostloadcolour {

         PROMPT_COMMAND=prompt_command
         PS1="[$(date +%H%M)][\u@\[\033[\$(echo -n \$HOST_COLOUR)m\]\h\[\033[0;37m\]:\w]$ "
         }




  Mediante su editor favorito, salve esto en un fichero llamado
  hostloadcolour. Si tiene instalado el paquete Bash Prompt, funcionar
  como un tema. Si no lo tiene, escriba source hostloadcolour seguido de
  hostloadcolour. De cualquiera de las dos formas, prompt_commad se
  convierte en una funcin del entorno. Si examina el cdigo, notar que
  los colores ($COLOUR_HIGH y $COLOUR_LOW) se ponen mediante un cdigo
  parcial de color, es decir, 1;34 en lugar de \[\033[1;34m\], cosa que
  hubiera preferido, pero no he sido capaz de que funcione con el cdigo
  completo. Le agradecera que me avisara si lo consigue.


  10.  Prompt de ejemplo

  10.1.  Un prompt ligero




         function proml {
         local BLUE="\[\033[0;34m\]"
         local RED="\[\033[0;31m\]"
         local LIGHT_RED="\[\033[1;31m\]"
         local WHITE="\[\033[1;37m\]"
         local NO_COLOUR="\[\033[0m\]"
         case $TERM in
             xterm*)
                 TITLEBAR='\[\033]0;\u@\h:\w\007\]'
                 ;;
             *)
                 TITLEBAR=""
                 ;;
         esac

         PS1="${TITLEBAR}\
         $BLUE[$RED\$(date +%H%M)$BLUE]\
         $BLUE[$LIGHT_RED\u@\h:\w$BLUE]\
         $WHITE\$$NO_COLOUR "
         PS2='> '
         PS4='+ '
         }





  10.2.  Tema elite de Bashprompt


  Es necesaria una fuente VGA



         # Created by KrON from windowmaker on IRC
         # Changed by Spidey 08/06
         function elite {
         PS1="\[\033[31m\]\332\304\[\033[34m\](\[\033[31m\]\u\[\033[34m\]@\[\033[31m\]\h\
         \[\033[34m\])\[\033[31m\]-\[\033[34m\](\[\033[31m\]\$(date +%I:%M%P)\
         \[\033[34m\]-:-\[\033[31m\]\$(date +%m)\[\033[34m\033[31m\]/\$(date +%d)\
         \[\033[34m\])\[\033[31m\]\304-\[\033[34m]\\371\[\033[31m\]-\371\371\
         \[\033[34m\]\372\n\[\033[31m\]\300\304\[\033[34m\](\[\033[31m\]\W\[\033[34m\])\
         \[\033[31m\]\304\371\[\033[34m\]\372\[\033[00m\]"
         PS2="> "
         }







  10.3.  Prompt de usuario avanzado


  Este es el prompt que yo uso, pero se nota un cierto retraso en la
  aparicin del prompt en un PII-400 monousuario, as que no lo
  recomendara para un P-100 multiusuario... Tmelo como una idea, ms
  que como un prompt prctico.



























































    #!/bin/bash
    #----------------------------------------------------------------------
    #       POWER USER PROMPT "pprom2"
    #----------------------------------------------------------------------
    #
    #   Created August 98, Last Modified 9 November 98 by Giles
    #
    #  Problema: cuando la carga baja, dice "1.35down-.08". Hay que deshacerse
    #  del negativo

    function prompt_command
    {
    #   Crea la variable TotalMeg: la suma de los tamagnos de los ficheros
    #   visibles del directorio actual
    local TotalBytes=0
    for Bytes in $(ls -l | grep "^-" | cut -c30-41)
    do
        let TotalBytes=$TotalBytes+$Bytes
    done
    TotalMeg=$(echo -e "scale=3 \nx=$TotalBytes/1048576\n if (x<1)
          {print \"0\"} \n print x \nquit" | bc)

    #      Esto se usa para calcular el diferencial en los valores
    #      de carga proporcionados por el comando "uptime". "uptime"
    #      proporciona medias de carga en 1, 5, y 15 minutos.
    #
    local one=$(uptime | sed -e "s/.*load average: \(.*\...\), \(.*\...\), \(.*\...\)/\1/" -e "s/ //g")
    local five=$(uptime | sed -e "s/.*load average: \(.*\...\), \(.*\...\), \(.*\...\).*/\2/" -e "s/ //g")
    local diff1_5=$(echo -e "scale = scale ($one) \nx=$one - $five\n if (x>0)
          {print \"up\"} else {print \"down\"}\n print x \nquit \n" | bc)
    loaddiff="$(echo -n "${one}${diff1_5}")"

    #   Cuenta los ficheros visibles:
    let files=$(ls -l | grep "^-" | wc -l | tr -d " ")
    let hiddenfiles=$(ls -l -d .* | grep "^-" | wc -l | tr -d " ")
    let executables=$(ls -l | grep ^-..x | wc -l | tr -d " ")
    let directories=$(ls -l | grep "^d" | wc -l | tr -d " ")
    let hiddendirectories=$(ls -l -d .* | grep "^d" | wc -l | tr -d " ")-2
    let linktemp=$(ls -l | grep "^l" | wc -l | tr -d " ")
    if [ "$linktemp" -eq "0" ]
    then
        links=""
    else
        links=" ${linktemp}l"
    fi
    unset linktemp
    let devicetemp=$(ls -l | grep "^[bc]" | wc -l | tr -d " ")
    if [ "$devicetemp" -eq "0" ]
    then
        devices=""
    else
        devices=" ${devicetemp}bc"
    fi
    unset devicetemp

    }

    PROMPT_COMMAND=prompt_command

    function pprom2 {

    local        BLUE="\[\033[0;34m\]"
    local  LIGHT_GRAY="\[\033[0;37m\]"
    local LIGHT_GREEN="\[\033[1;32m\]"
    local  LIGHT_BLUE="\[\033[1;34m\]"
    local  LIGHT_CYAN="\[\033[1;36m\]"
    local      YELLOW="\[\033[1;33m\]"
    local       WHITE="\[\033[1;37m\]"
    local         RED="\[\033[0;31m\]"
    local   NO_COLOUR="\[\033[0m\]"

    case $TERM in
        xterm*)
            TITLEBAR='\[\033]0;\u@\h:\w\007\]'
            ;;
        *)
            TITLEBAR=""
            ;;
    esac

    PS1="$TITLEBAR\
    $BLUE[$RED\$(date +%H%M)$BLUE]\
    $BLUE[$RED\u@\h$BLUE]\
    $BLUE[\
    $LIGHT_GRAY\${files}.\${hiddenfiles}-\
    $LIGHT_GREEN\${executables}x \
    $LIGHT_GRAY(\${TotalMeg}Mb) \
    $LIGHT_BLUE\${directories}.\
    \${hiddendirectories}d\
    $LIGHT_CYAN\${links}\
    $YELLOW\${devices}\
    $BLUE]\
    $BLUE[${WHITE}\${loaddiff}$BLUE]\
    $BLUE[\
    $WHITE\$(ps ax | wc -l | sed -e \"s: ::g\")proc\
    $BLUE]\
    \n\
    $BLUE[$RED\$PWD$BLUE]\
    $WHITE\$\
    \
    $NO_COLOUR "
    PS2='> '
    PS4='+ '
    }





  10.4.  Un prompt con la anchura del terminal


  Un amigo se quej de que no le gustaba tener un prompt que cambiara su
  tamao debido a que tena un $PWD, as que escrib este prompt que
  ajusta su tamao a la anchura exacta del terminal, con el directorio
  de trabajo en la lnea superior.
















    #!/bin/bash

    #   termwide prompt
    #      by Giles - created 2 November 98
    #
    #  La idea aqui es tener la linea superior de un prompt de 2 lineas
    #  siempre de la misma anchura que el terminal. Esto se consigue
    #  calculando la anchura de los elementos de texto, y rellenando
    #  o truncando $PWD
    #

    function prompt_command {

    TERMWIDTH=${COLUMNS}

    #   Calcula la anchura del prompt:

    hostnam=$(echo -n $HOSTNAME | sed -e "s/[\.].*//")
    #   "whoami" y "pwd" incluyen un caracter de nueva lnea al final
    usernam=$(whoami)
    let usersize=$(echo -n $usernam | wc -c | tr -d " ")
    newPWD="${PWD}"
    let pwdsize=$(echo -n ${newPWD} | wc -c | tr -d " ")
    #   Agnadir los accesorios debajo...
    let promptsize=$(echo -n "--(${usernam}@${hostnam})---(${PWD})--" \
                     | wc -c | tr -d " ")
    let fillsize=${TERMWIDTH}-${promptsize}
    fill=""
    while [ "$fillsize" -gt "0" ]
    do
       fill="${fill}-"
       let fillsize=${fillsize}-1
    done

    if [ "$fillsize" -lt "0" ]
    then
       let cut=3-${fillsize}
       sedvar=""
       while [ "$cut" -gt "0" ]
       do
          sedvar="${sedvar}."
          let cut=${cut}-1
       done
       newPWD="...$(echo -n $PWD | sed -e "s/\(^${sedvar}\)\(.*\)/\2/")"
    fi
    }

    PROMPT_COMMAND=prompt_command

    function termwide {

    local GRAY="\[\033[1;30m\]"
    local LIGHT_GRAY="\[\033[0;37m\]"
    local WHITE="\[\033[1;37m\]"
    local NO_COLOUR="\[\033[0m\]"

    local LIGHT_BLUE="\[\033[1;34m\]"
    local YELLOW="\[\033[1;33m\]"

    case $TERM in
        xterm*)
            TITLEBAR='\[\033]0;\u@\h:\w\007\]'
            ;;
        *)
            TITLEBAR=""
            ;;
    esac

    PS1="$TITLEBAR\
    $YELLOW-$LIGHT_BLUE-(\
    $YELLOW\${usernam}$LIGHT_BLUE@$YELLOW\${hostnam}\
    ${LIGHT_BLUE})-${YELLOW}-\${fill}${LIGHT_BLUE}-(\
    $YELLOW\${newPWD}\
    $LIGHT_BLUE)-$YELLOW-\
    \n\
    $YELLOW-$LIGHT_BLUE-(\
    $YELLOW\$(date +%H%M)$LIGHT_BLUE:$YELLOW\$(date \"+%a,%d %b %y\")\
    $LIGHT_BLUE:$WHITE\$$LIGHT_BLUE)-\
    $YELLOW-\
    $NO_COLOUR "

    PS2="$LIGHT_BLUE-$YELLOW-$YELLOW-$NO_COLOUR "

    }





  10.5.  Prompt con Reloj elegante e intil


  Este es posiblemente el prompt ms atractivo (e intil) que he creado.
  Debido a que muchos emuladores de terminal X no implementan las
  funciones de salvar y restaurar la posicin del cursor, la alternativa
  cuando se sita un reloj en la esquina superior derecha es anclar el
  cursor a la parte baja del terminal. Esto se basa en la idea del
  prompt de la anchura del terminal anterior, con el dibujo de una lnea
  desde el prompt hasta el reloj. Es necesaria una fuente VGA.

  Nota: hay una sustitucin en este cdigo, que puede que no se muestre
  bien al pasar de SGML a otros formatos: he tenido que sustituir el
  carcter de pantalla pro el cdigo \304; normalmente habra incluido
  la secuencia \304, pero ha sido necesaria la sustitucin en este caso:




























    #!/bin/bash

    #   Este prompt requiere una fuente VGA. El prompt se ancla a la parte
    #   baja del terminal, rellena la anchura del terminal, y dibuja una linea
    #   hacia arriba en la parte derecha del terminal hasta unirse a un reloj
    #   en la esquina superior derecha del terminal

    function prompt_command {
    #   Calcula la anchura del prompt:
    hostnam=$(echo -n $HOSTNAME | sed -e "s/[\.].*//")
    #   "whoami" y "pwd" incluyen un caracter de nueva lnea al final
    usernam=$(whoami)
    newPWD="${PWD}"
    #   Se agnaden todos los accesorios
    let promptsize=$(echo -n "--(${usernam}@${hostnam})---(${PWD})-----" \
                     | wc -c | tr -d " ")
    #   Adivina cuanto agnadir entre user@host y PWD (o cuanto quitar a PWD)
    let fillsize=${COLUMNS}-${promptsize}
    fill=""
    #   si el prompt no es tan ancho como el terminal, lo relleno
    while [ "$fillsize" -gt "0" ]
    do
       fill="${fill}"
       # La A con umlaut (aparecera como un guin largo si se utiliza
       # una fuente VGA) es \304, pero la cort y pegu aqu porque
       # Bash slo hace una sustitucin, que en este caso es hacer que
       # $fill aparezca en el prompt.
       let fillsize=${fillsize}-1
    done
    #   Trunco $PWD por la derecha si el prompt es mas ancho que el terminal:
    if [ "$fillsize" -lt "0" ]
    then
       let cutt=3-${fillsize}
       sedvar=""
       while [ "$cutt" -gt "0" ]
       do
          sedvar="${sedvar}."
          let cutt=${cutt}-1
       done
       newPWD="...$(echo -n $PWD | sed -e "s/\(^${sedvar}\)\(.*\)/\2/")"
    fi
    #
    #   Creo el reloj y la barra que sube hasta el
    #
    local LIGHT_BLUE="\033[1;34m"
    local     YELLOW="\033[1;33m"
    #   Posicion del cursor para dibujar el reloj:
    echo -en "\033[2;$((${COLUMNS}-9))H"
    echo -en "$LIGHT_BLUE($YELLOW$(date +%H%M)$LIGHT_BLUE)\304$YELLOW\304\304\277"
    local i=${LINES}
    echo -en "\033[2;${COLUMNS}H"
    #   Dibujo barras verticales:
    while [ $i -ge 4 ]
    do
       echo -en "\033[$(($i-1));${COLUMNS}H\263"
       let i=$i-1
    done

    let prompt_line=${LINES}-1
    #   Esto es necesario porque hacer \${LINES} dentro de una funcin
    #   matematica de Bash (es decir $(()) ) no parece funcionar.
    }

    PROMPT_COMMAND=prompt_command

    function clock3 {
    local LIGHT_BLUE="\[\033[1;34m\]"
    local     YELLOW="\[\033[1;33m\]"
    local      WHITE="\[\033[1;37m\]"
    local LIGHT_GRAY="\[\033[0;37m\]"
    local  NO_COLOUR="\[\033[0m\]"

    case $TERM in
        xterm*)
            TITLEBAR='\[\033]0;\u@\h:\w\007\]'
            ;;
        *)
            TITLEBAR=""
            ;;
    esac

    PS1="$TITLEBAR\
    \[\033[\${prompt_line};0H\]
    $YELLOW\332$LIGHT_BLUE\304(\
    $YELLOW\${usernam}$LIGHT_BLUE@$YELLOW\${hostnam}\
    ${LIGHT_BLUE})\304${YELLOW}\304\${fill}${LIGHT_BLUE}\304(\
    $YELLOW\${newPWD}\
    $LIGHT_BLUE)\304$YELLOW\304\304\304\331\
    \n\
    $YELLOW\300$LIGHT_BLUE\304(\
    $YELLOW\$(date \"+%a,%d %b %y\")\
    $LIGHT_BLUE:$WHITE\$$LIGHT_BLUE)\304\
    $YELLOW\304\
    $LIGHT_GRAY "

    PS2="$LIGHT_BLUE\304$YELLOW\304$YELLOW\304$NO_COLOUR "

    }





  11.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones oficiales:  www.insflug.org. Asegrese de comprobar
  cul es la ltima versin disponible en el Insflug antes de bajar un
  documento de un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  que estamos trabajando incesantemente para aadir.

  Se proporcionar tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Francisco Jos Montilla, pacopepe@insflug.org.




























































  BitchX Mini Como
  lvaro Villalba Poncet, alvarovp@mad.servicom.es
  v1.02, 12 de Noviembre de 1998

  BitchX es un cliente para el irc, pero NO ES PARA LAS X, es en modo
  texto puro y duro. Bsicamente el BitchX es el ircII con los scripts
  integrados en el cdigo fuente C, lo que lo hace ms eficiente, adems
  de dotarle de muchas funcionalidades.
  ______________________________________________________________________

  ndice General:

  1.      Instalacin

  2.      Comandos

  3.      Comandos Bsicos

  3.1.    Envo/Recepcin de ficheros.

  3.2.    Gestin de Ventanas

  3.3.    Servidores

  4.      El .bitchrc y los alias.

  5.      Variables del Bitchx

  6.      Servidores del Irc-Hispano

  7.      Otros servidores:

  8.      Netiqueta :)

  9.      Agradecimientos

  10.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Instalacin

  Lo primero, dnde conseguir el BitchX. La mayora de las
  distribuciones suelen llevar el BitchX, si no el sitio principal es
  ftp.bitchx.com.

  Otro sitio donde conseguirlo, o incluso las versiones betas es en el
  canal #bitchx de efnet (irc.total.net) donde puedes hasta hablar con
  el autor (panasync).

  El siguiente paso es descomprimir las fuentes, compilarlas e
  instalarlas (a no ser que se baje el binario). Para descomprimirlo,
  ejecutamos:

       tar zxfv ircii-pana-75.tar.gz

  (otras veces est como bitchx-75.tgz).

  Despus entramos en el directorio y ejecutamos ./configure.

  Si queremos tener soporte para las ``'' y los acentos tenemos que
  editar el fichero include/config.h y cambiar la lnea

       #undef LATIN1

  por

       #define LATIN1

  Adems nuestra consola tiene que soportar caracteres latin1 (ver
  Fuente-ISO-Como). Hay muchas cosas que se pueden modificar en ese
  fichero, as que recomiendo leerlo con calma.

  Luego lo compilamos (make) y lo instalamos (make install). Ya tenemos
  nuestro ejecutable en /usr/local/bin/BitchX.

  2.  Comandos

  La sintaxis del BitchX es

       BitchX [switches] [nickname] [server list]

  Donde

    nickname: el nick que vamos a tener.

    server: la direccin del servidor al que nos vamos a conectar.

    server list: ms direcciones alternativas de servidores.

    switches:

    -H hostname: En el caso de estar en una mquina con varios aliases
     podemos usar otro, y no el que salga por defecto.

    -c channel: el nombre del canal al que nos queremos conectar al
     entrar en el irc.

    -b carga el archivo de configuracin ($HOME/.bitchxrc) despus de
     que nos hayamos conectado al servidor.

    -p port puerto del servidor al que nos vamos a conectar.

  Hay ms comandos, (si los quieres consultar pon BitchX -?), pero estos
  son los principales.

  Despus de todo esto con poner BitchX novato irc.arrakis.es nos
  conectaremos al servidor de irc de arrakis con el nick novato y en el
  puerto 6667 (por defecto). Si quisiramos conectarnos por el puerto
  6668 pondramos irc.arrakis.es:6668  irc.arrakis.es -p 6668

  3.  Comandos Bsicos

  Los comandos se introducen anteponiendo un / y despus el comando.
  Algunos comandos son:

    /join #canal: este se usa para entrar en un canal (por ejemplo,
     /join #linux).

     El ``#''no es un capricho mo, los canales se representan siempre
     con un ``#'' delante del nombre. No obstante, el BitchX tiene un
     equivalente abreviado; si introducimos /j linux har exactamente lo
     mismo.

    /leave #canal: para abandonar un canal.

    /whois nick: nos da informacin sobre un usuario del irc.

    /who #canal: nos dice quin est en el canal.

    /w nick: igual que el comando who.

    /whowas nick: nos dice si un usuario ha estado en el irc.

    /ww nick: igual que el comando whowas.

    /list -yes: nos da la lista de todos los canales.

    /msg nick: este es para mandarle un mensaje privado a ``nick''.
     Tambin podemos darle al Tab y empezarn a salir los nombres de los
     miembros del canal o de las personas que te han mandado un mensaje,
     as que puedes mantener privados sin necesidad de escribir todo el
     rato /msg nick sino que con ponerlo una vez y darle luego al Tab ya
     lo tendrs escrito.

     Si ponemos /msg #canal lo mandamos a todo el canal (esto ltimo no
     hace falta, si es el mismo canal en el que estamos, pero s si es
     otro en el que estemos metidos, pero no hablando actualmente.

    /topic: nos dir el topic que tiene el canal.

    /dns nick: nos dar la direccin IP de nick.

    /ignore nick: ignorar los mensajes de nick. Para terminar un
     ignore se pone /unig -nick, y si queremos ver la lista de ignorados
     simplemente con poner /ignore nos saldr.

    /dcc chat nick: establece un chat con nick. Normalmente los chats
     salen con un = delante. Para cerrar un chat basta con poner /dcc
     chat close nick

    Comandos de operador:  Necesitas ser operador del canal para
     usarlos

    /k nick  /kick nick: echar a nick del canal.

    /b nick  /ban nick: banear a nick del canal.  (Osea, no le deja
     entrar ms en el canal, por lo menos hasta que alguien quite el
     ban)

    /kb nick: echa y banea a nick del canal

    /topic Texto: cambia el topic del canal por Texto

    /op nick: hace a nick operador del canal.

    /deop nick: le quita el estatus de operador a nick

    /notify nick: nos avisa cuando nick entra o sale del irc.

    /notify: nos da lista de notifys.

    /saveirc: graba el .bitchxrc

    /save o savelist: graba los formatos y las configuraciones que se
     pueden ver poniendo /set.

    /p nick: nos dice el ping de nick respecto a nosotros (ctcp ping)

    /p #canal: hace un ping a todas las personas que haya en el canal.

    /part: sale del canal en el que ests.

    /v nick: nos dice el cliente de irc que est usando nick.  (ctcp
     version). Si queremos no contestar a los versions se puede hacer
     poniendo set cloak on o dndole a la tecla Supr.

    /v #canal: hace un version a todas las personas que estn en el
     canal.

    /ver: igual que el /v.

    /email nick: nos dice la direccin de e-mail de nick (para eso nick
     tiene que tener configurado su cliente de irc)

    /quit: termina la conexin.

    /exec: ejecuta un comando en un el shell y muestra la salida.

    /redirect #canal exec comando lanza un comando y redirige su salida
     al canal.

  3.1.  Envo/Recepcin de ficheros.

  Para el envo/recepcin de ficheros se usa el dcc pero si lo queremos
  ofrecer a todo el canal usamos los cdcc y para cogerlos los ctcp.

    /cdcc: nos da la lista de comandos cdcc disponibles (til para
     ofrecer ficheros a todo el canal, por ejemplo).

    /dcc : nos muestra los ficheros que se estn enviando o recibiendo
     por dcc.

    /dcc send nick fichero: le enva a nick el fichero.

    /dcc get nick: recibe el fichero de nick (se puede configurar la
     recepcin automtica mediante el comando /set auto_dcc on (hay
     muchas cosas que se pueden configurar poniendo simplemente /toggle)

    /dcc close #N: corta el envo/recepcin N.

    /dcg nick: mata los chats con nick.

  Ahora viene la lista de los ctcp (muy tiles en efnet ;) )

    /ctcp #canal cdcc list: pide la lista de ficheros ofrecidos en
     #canal.

    /ctcp nick cdcc list: pide la lista de ficheros a nick

    /ctcp nick cdcc send #N: pide a nick que enve el paquete nmero N.

    /ctcp nick resend #N: pide a nick que reenve el paquete pero
     comenzando por donde se cort (muy til si te estn mandando
     ficheros largos, hay que tener el fichero en el mismo directorio
     desde el que lanzamos el BitchX, si no, no lo encuentra y enviar
     el fichero entero). No todos los que ofrecen ficheros tienen
     disponible esta opcin.

  3.2.  Gestin de Ventanas

  Todo lo que podamos hacer con clientes grficos lo podremos hacer con
  el BitchX, el manejo de ventanas es similar al que usan programas como
  screen. Algunos scripts simplifican las cosas y con combinaciones como
  Ctrl W C podemos crear ventanas. Poniendo /window help podemos ver una
  lista de todos los comandos posibles. Se pueden encadenar y con
  /window new hide creamos una ventana y la ocultamos. Los comandos
  bsicos son:

    /window new: crea una nueva ventana.

    /window kill [refnum]: destruye la ventana actual.

    /window list: lista todas las ventanas. Cada ventana tiene asociado
     un nombre (si se lo hemos puesto) y una referencia (refnum)  que se
     usan para hacer operaciones sobre las ventanas.

    /window hide [refnum]: oculta una ventana.

    /window show [refnum]: muestra una ventana.  Si no ponemos nada en
     [refnum] todos estos comandos actan sobre la ventana activa en ese
     momento.

    /window name NOMBRE: fija el nombre para esa ventana.

    /window grow FILAS: aumenta o disminuye en FILAS la ventana activa.

  Mediante estos comandos podemos tener una ventana distinta para cada
  canal, para cada servidor de irc, podemos hacer que cuando alguien nos
  mande un privado se cree una ventana solo para sus mensajes y todo lo
  que se nos pueda ocurrir. Por ejemplo yo tengo puesto lo siguiente en
  mi principal)  /window new name msgs level msgs split on double on
  hide crea una nueva ventana oculta llamada msgs para los msgs (level
  msgs).  /window swap msgs cambia a la ventana msgs.  /window show
  linux grow 5 muestra la ventana linux y la aumenta 5 lineas.

  Con todo esto lo que he conseguido es tener una ventana pequeita en
  la parte de abajo en donde me saldrn todos los mensajes privados :)

  Si por ejemplo quiero crear una nueva ventana para meterme en el canal
  #4quake pondr /window new hide channel #4quake  que me crea una
  ventana, la oculta e intenta entrar en el canal #4quake en esa
  ventana.
  Para verla basta con poner /window last o poner /window list lo que
  nos dir las ventanas activas saliendo ms o menos una cosa como esta:

       -:- Ref Nick Name Channel Query Server Level
       -:- 1 unsCAred <None> #linux <None> unsCAred.d NONE
       -:- 2 unsCAred <None> #4quake <None> unsCAred.d NONE

  ahora si pongo /window show 2 me mostrar la ventana del canal
  #4quake.

  Cuando tenemos ms de una ventana en la pantalla, la ventana activa se
  indica con un ^^^^^^ en la barra de estado, si queremos cambiar a la
  otra usamos  control-W P (para ver una lista completa de las
  combinaciones del teclado se pone /bhelp window.  Si las ventanas
  estn ocultas lo mas cmodo es usar Alt-# siendo # un nmero del 1 al
  9 y con esto vamos cambiando a la ventana que queramos.

  3.3.  Servidores

  Una de las propiedades del BitchX es que permite estar en varios
  servidores a la vez. Para hacer esto simplemente tenemos que crear una
  nueva ventana (ver seccin anterior) y poner /server +SERVIDOR . El +
  es importante porque sino lo que haremos es cambiar el servidor en el
  que estamos actualmente. Para cerrar la conexin con un servidor basta
  con poner /server -SERVIDOR.

  Poniendo /server nos da la lista de servidores (lista que o bien se le
  pasa como parmetro al arrancar o al compilarlo; ver el fichero
  /include/config.h).

  4.  El .bitchrc y los alias.

  Es el fichero de configuracin del BitchX, en l podemos meter
  nuestros alias o las variables que queramos. Es util (por ejemplo)
  para que funcionen las teclas de funcin en las X. Para hacerlo
  tenemos que aadir:

       /bind meta3-1 CHELP
       /bind meta3-2 CHANNEL_CHOPS
       /bind meta3-3 CHANNEL_NONOPS
       /bind meta3-4 CDCC_PLIST
       /bind meta3-5 DCC_PLIST
       /bind meta3-6 DCC_STATS

  Un ejemplo del uso de alias es /ALIAS zz /window new hide_others que
  crea una ventana nueva y oculta el resto. Tambin se puede crear una
  ventana para los mensajes privados y ponerla en la parte de abajo de
  la pantalla. Por ejemplo estos alias renombran la ventana actual como
  linux, crean una nueva ventana llamada msgs y muestran las dos a la
  vez (la ventana de msgs es mas pequea).

       /window name linux
       /window new name msgs level msgs split on double on hide
       /window swap msgs
       /window show linux grow 5

  Para cambiar de ventana activa podemos crearnos dos alias para pasar
  de una a otra, por ejemplo ALIAS lin window show linux , ALIAS men
  window show msgs.

  Tambin es til poner la lista de notify en este fichero, se hara
  aadiendo la linea NOTIFY Cox failure dr_pci Drizzt pukka wait_man nos
  avisar cuando alguno de ellos entre en el irc (o se marche).

  5.  Variables del Bitchx

  El BitchX tiene muchas variables que pueden transformar completamente
  su aspecto y funcionamiento. Los settings actuales los puedes
  consultar poniendo set. Estas variables son:

    ainv NUM si est en ON invita al canal a los miembros de la Friend
     List.

    always_split_biggest ON-OFF si est en ON siempre parte la ventana
     mayor.

    aop ON-OFF si est en ON da el @ a los miembros de la Friend List.

    append_log ON-OFF no destruye el Irclog en caso de que ya exista,
     sino que escribe a continuacin.

    autokick_on_version ON-OFF echa del canal al que nos haga un ctcp
     version.

    auto_away ON-OFF nos pone away al cabo de cierto tiempo sin
     escribir.

    auto_away_time NUM fija el tiempo en segundos.

    auto_nslookup ON-OFF intenta resolver automticamente las
     direcciones numricas.

    auto_reconnect ON-OFF cuando se corta la conexin con el server
     intenta conectarse de nuevo.

    auto_rejoin NUM si est a 1 intenta entrar de nuevo en el canal
     cuando nos echan de l.

    auto_response 0/1 desactiva/activa esta opcin.

    auto_response_str CADENA CADENA es una lista de palabras que
     activan esta feature. Por defecto se le asigna el nick y es la que
     hace que cuando alguien escribe una linea que comienza por nuestro
     nick, el suyo aparezca resaltado.

    auto_unban NUM tiempo en segundos en quitar un ban que hayamos
     puesto.

    auto_unmark_away ON-OFF nos quita el estado de away cuando volvemos
     a escribir.

    auto_whowas ON-OFF hace un whowas automtico cuando hacemos un
     /whois.

    beep ON-OFF activa o desactiva los beeps.

    beep_always ON-OFF pita siempre.

    beep_max NUM nmero mximo de pitidos.

    beep_on_msg  MSGS pita cuando nos mandan un privado.

    beep_when_away NUM pita aunque estemos away.

    bitchx_help RUTA fija la ruta al fichero BitchX.help (normalmente
     en ~/.BitchX/BitchX.help).

    blink_video ON-OFF activa o desactiva el "parpadeo".

    bold_video ON-OFF activa o desactiva la "negrita".

    bot_log ON-OFF graba la actividad del bot.

    bot_logfile FILE fichero donde est el log del bot (normalmente
     tcl.log).

    bot_mode ON-OFF activa o no el modo bot.

    BOT_PASSWD PASSWD fija la contrasea para acceder al bot.

    cdcc_flood_after NUM nmero de mximos mensajes del tipo cdcc.

    cdcc_flood_rate NUM velocidad mxima del flood.

    cdcc_prompt CADENA cadena para mostrar el prompt en los cdcc.

    cdcc_security NUM rechaza o no los cdcc potencialmente peligrosos
     (por ejemplo un .rhost ;) ).

    cd_device DEV dispositivo donde est el cdrom (normalmente
     /dev/cdrom).

    change_nick_on_kill ON-OFF cambia de nick cuando nos echan de un
     canal.

    channel_name_width NUM nmero de caracteres para mostrar el nombre
     del canal (0 para infinito).

    client_information fija la informacin del cliente que se dar a
     los que nos hacen un /version.

    cloak NUM si est a 1 no contestar a los ctcp versions.

    clock ON-OFF muestra el reloj en la barra de estado.

    clock_24hour ON-OFF muestra el reloj con formato 12/24 horas.

    clock_format CADENA fija el formato del reloj.

    clone_check 0 busca clones en el canal.

    clone_count 0 nmero mximo de clones.

    cmdchars establece con qu carcter empiezan los comandos
     (normalmente con un /).

    command_mode ON-OFF hace que todo lo que se escriba sea
     interpretado como un comando.

    connect_timeout TIEMPO tiempo mximo despus del cual nos
     desconecta si no hay respuesta del servidor (en segundos).

    continued_line CADENA cadena con la que nos indica que un lnea se
     sale de la pantalla.

    ctcp_delay NUM tiempo de espera antes de mandar/aceptar un ctcp.

    ctcp_flood_protection ON-OFF activa la proteccin anti-flood.

    ctcp_flood_ban ON-OFF banea al que hace un ctcp-flood.

    ctcp_verbose ON-OFF nos muestra toda la informacin en los ctcp .

    ctoolz_dir DIR directorio donde estn los scripts (normalmente en
     $HOME/.BitchX).

    dcc_autoget ON_OFF activa la recogida automtica de los DCC.

    dcc_autorename ON-OFF si al enviarnos un fichero por dcc este ya
     existe lo renombra automticamente.

    dcc_bar_type NUM tipo de barra de estado para los dcc.

    dcc_block_size NUM tamao de los paquetes del dcc (normalmente 2049
     bits).

    dcc_dldir DIR directorio donde guarda los dccs.

    dcc_fast ON-OFF emula el formato rpido de dcc del mirc.

    dcc_get_limit NUM nmero mximo de dcc simultaneos.

    dcc_max_autoget_size TAMAO tamao mximo de fichero para los dcc.

    dcc_queue_limit NUM nmero mximo de dcc en espera, una vez
     superado este nmero de peticiones se le dice al que pide un dcc
     que lo intente ms tarde.

    dcc_send_limit NUM nmero mximo de dcc que se envan
     simultneamente.

    dcc_uldir DIR directorio por defecto que usa para buscar ficheros
     cuando los enviamos por dcc.

    debug NUM activa la informacin de debug.

    default_reason CADENA cadena por defecto para los reason

    deopflood ON quita el @ al que hace un flood.

    deopflood_time NUM tiempo en segundos que se quita el @ al hacer un
     flood.

    deop_on_deopflood NUM quita el @ al hacer un deopflood.

    deop_on_kickflood NUM quita el @ al hacer alguien un kickflood.

    display ON hace que se muestren o no los comandos al introducirlos.

    display_ansi NUM muestra caracteres ASCII.

    display_pc_characters NUM muestra caracteres normales.

    double_status_line NUM tamao de la barra de estado.

    eight_bit_characters ON-OFF muestra caracteres de 8 bits (hay que
     ponerlo en ON si se quieren ver los acentos y las ees).

    exec_protection ON-OFF activa la proteccin de ejecucin de
     Comandos mediante el comando exec ORDEN.

    flood_after NUM nmero mximo de mensajes despus de los cuales se
     considera un flood.

    flood_kick ON-OFF echa del canal al que hace flood.

    flood_protection ON-OFF activa o desactiva la proteccin contra
     floods.

    flood_warning ON-OFF avisa al que hace flood.

    ftp_grab ON-OFF guarda en un fichero las direcciones de ftp que se
     mencionan en el canal.(se recuperan con el comando /ftp y se
     guardan en el fichero ~/.BitchX/BitchX.ftp .

    full_status_line ON-OFF muestra la linea de estado completa.

    hebrew_toggle ON-OFF activa los caracteres hebreos.

    help_pager ON-OFF muestra la ayuda paginada.

    help_path RUTA ruta al fichero con la ayuda del irc (normalmente en
     /usr/local/lib/irc/help.

    help_prompt ON-OFF muestra el prompt de la ayuda.

    hide_private_channels ON-OFF esconde los canales privados.

    highlight_char INVERSE-NORMAL muestra los colores brillantes como
     inversos.

    history NUM nmero de lineas que guarda el bitchx en el buffer del
     historial.

    http_grab ON-OFF guarda en un fichero las direcciones de http que
     se mencionan en el canal. (se recuperan con el comando /http y se
     guardan en el fichero ~/.BitchX/BitchX.http).

    ident_hack FICHERO fichero que guarda la identidad falsa que se
     muestra al hacernos un /who (normalmente el fichero

    ignore_time NUM tiempo que duran los ignores.

    input_prompt CADENA cadena de entrada.

    insert_mode ON-OFF fija el modo de insercin o sobre escritura.

    inverse_video ON-OFF muestra caracteres de video inverso.

    joinflood ON activa la proteccin contra joinfloods.

    joinflood_time NUM tiempo mnimo en segundos entre cada join para
     que no salte la alarma anti-flood.

    kickflood ON-OFF activa la proteccin contra kickfloods.

    kickflood_time NUM tiempo mnimo en segundos entre cada kick para
     que no salte la alarma anti-flood.

    kick_if_banned ON-OFF echa del canal al que nos banee.

    kick_on_deopflood NUM echa al que hace flood de deops.

    kick_on_joinflood NUM echa al que hace flood de joins.

    kick_on_kickflood NUM echa al que hace flood de kicks.

    kick_on_nickflood NUM echa al que hace flood de nicks.

    kick_on_pubflood  NUM echa al que hace flood de publicos.

    kick_ops ON-OFF permite el echar del canal a los ops.

    lamelist ON-OFF guarda una lista de "enemigos".

    lastlog NUM mximo nmero de comandos que guarda en el buffer.

    lastlog_ansi ON-OFF guarda el log en formato ansi.

    lastlog_level ALL guarda todo lo que ocurre.

    llook ON-OFF busca splits en la red del irc.

    llook_delay NUM tiempo entre cada llook.

    load_path DIRECTORIO directorio en el que busca los scripts
     (normalmente $HOME/.BitchX).

    log ON-OFF guarda el log de la sesin.

    logfile FICHERO fichero donde se guarda el log(normalmente en
     IrcLog).

    max_deops NUM nmero de deops seguidos a partir de los cuales se
     considera que alguien est haciendo flood.

    max_idlekicks NUM nmero de mensajes de idle seguidos a partir de
     los cuales se considera que alguien est haciendo flood.

    max_server_reconnect NUM nmero mximo de intentos de conexin a un
     servidor.

    mircs ON-OFF detecta los mircs.

    msglog ON-OFF guarda un log de los mensajes mientras estamos away.

    msglog_file FICHERO fichero donde se guardan los mensajes mientras
     estamos away (normalmente en ~/.BitchX/BitchX.away).

    msglog_level MSGS-NOTICES-SEND_MSG tipos de mensajes que se
     guardan.

    nickflood ON activa la proteccin contra nickfloods.

    nickflood_time NUM tiempo mnimo en segundos entre un cambio de
     nick y otro para que no salte la alarma anti-flood.

    nick_completion ON activa la finalizacin automtica de nicks.

    nick_completion_char CARACTER carcter usado como separador en el
     nick completion.

    nick_completion_type NUM tipo de nick completion.

    notify_level ALL nivel de notificacin.

    no_ctcp_flood ON-OFF Evita los ctcp floods.

    num_banmodes N fija el tipo de ban.

    num_of_whowas N fija el tipo de whowas.

    oper_modes  fija los modos de operador.

    ping_type N fija el tipo de ping.

    protect_channels * canales en los que se usa la proteccin contra
     floods.

    pubflood ON-OFF activa la proteccin contra floods para los public.

    pubflood_time N fije el tiempo (en minutos) que dura el ignore
     despus de un public flood.

    realname NOMBRE nombre real (el que sale al hacer un whois).

    reason_type N tipo de razn (si est a 1 utiliza las del fichero
     $HOME/.BitchX/BitchX.reasons.

    reverse_status ON-OFF muestra la informacin en video inverso.

    SAVEFILE fichero en el que se guardan las configuraciones.

    script_help RUTA  indica la ruta al fichero de ayuda (normalmente
     en $HOME/.BitchX/BitchX.help.

    scrollback N nmero de lineas que se guardan en el buffer.

    send_away_msg ON-OFF indica si se envan el mensaje que hayamos
     elegido cuando estemos away.

    send_ignore_msg ON-OFF indica si le comunicamos o no a un usuario
     que le estamos ignorando cuando nos manda un mensaje.

    server_prompt CADENA cadena para mostrarnos el server.

    shell /bin/sh shell que usa cuando ejecutamos comandos con exec.

    shell_flags CADENA parmetros que se le pasan al shell al ejecutar
     un exec.

    shell_limit N nmero mximo de shells que se pueden ejecutar
     simultneamente.

    shitlist ON-OFF mantiene una lista de personas non-gratas :) .

    shitlist_reason CADENA razn por la que metemos a una persona en la
     lista de non-gratos.

    show_away_once ON-OFF muestra el away solo una vez.

    show_channel_names ON-OFF muestra el nombre del canal en el que
     estamos.

    show_numerics_str CADENA cadena de caracteres que sale antes de los
     comandos.

    show_status_all ON-OFF muestra el estado.

    suppress_server_motd ON-OFF elimina el mensaje de da del servidor
     al conectarnos.

    swatch sirve para ver que mensajes del server se reciben y cuales
     no.

    tab ON-OFF activa la tecla del tabulado para el nick completion.

    tab_max N nmero mximo de espacios al darle al tab.

    underline_video ON-OFF activa los caracteres subrayados.

    userlist ON-OFF activa la lista de amigos.

    usermode MODE fija los modos de usuario (suele ser +iw).

    user_information  fija la informacin de usuario.

    window_quiet ON-OFF permite hacer scroll.

    word_break CADENA fija la separacin de palabras.

    xterm RUTA fija la ruta para la xterm.

    xterm_options OPCIONES fija las opciones para la xterm.

    xterm_title ON-OFF  activa el ttulo en las xterms.

    _cdcc_close_idle_sends_time N cierra un cdcc al pasar N segundos
     sin responder.

  Los parmetros ms importantes los podemos cambiar mediante el comando
  /toggle < setting >/, si ponemos /toggle nos saldr una pantalla
  parecida a esta:

       -----------[ BitchX Toggles ]----------------------------------------------
       |   auto_nslookup [Off]    ctcp_flood_protection [ On]    beep        [ On]
       |   pubflood      [Off]    flood_protection      [ On]    kickflood   [Off]
       |   dcc_autoget   [ On]    flood_kick            [ On]    msglog      [Off]
       |   llook         [Off]    deopflood             [ On]    joinflood   [ On]
       |   auto_whowas   [Off]    verbose_ctcp          [ On]    nickflood   [ On]
       |   cloak         [Off]    operview              [Off]    shitlist    [ On]
       |   kick_ops      [ On]    annoy_kick            [Off]    userlist    [ On]
       |   hacking       [Off]    nick_completion       [ On]    auto_rejoin [ On]
       |   aop           [ On]    auto_away             [Off]    auto_reconn [ On]
       |   bitch         [Off]    dcc_fast              [ On]    kick_if_ban [ On]
       |   ftp_grab      [Off]    mircs                 [Off]    http_grab   [   ]
       |   display_ansi  [ On]    type /toggle <setting>         log         [ On]

  6.  Servidores del Irc-Hispano

    pegasus.irc-hispano.org Milenium ISP.

    saturno.irc-hispano.org ERGOS Servicios Informticos.

    mercurio.irc-hispano.org Mundiva - irc-server.

    jupiter.irc-hispano.org Servidor IRC de LLeida Networks.

    pulsar.irc-hispano.org [irc.redestb.es] RedesTB IRC Server.

    marte.irc-hispano.org [irc.minorisa.es] Servidor IRC de Minorisa.

    polaris.irc-hispano.org [irc.jet.es] Jet Internet IRC Server.

    europa.irc-hispano.org Servidor IRC de Centre Telematic Valencia.

    viento.irc-hispano.org Servidor IRC de Lleida.Netw (HUB).

    pluton.irc-hispano.org Parser IRC Server.

    aire.irc-hispano.org Catalunya.Net, Hub Zona Norte.

    gaia.irc-hispano.org Argo RST, S.A. Madrid, Spain.

    sirius.irc-hispano.org [irc.servicom.es] SERVICOM,S.A. - Madrid,
     Spain.

    vega.irc-hispano.org [irc.arrakis.es] Arrakis IRC Server.

    pleyades.irc-hispano.org [irc.arrakis.es] Arrakis IRC Server.

    orion.irc-hispano.org [irc.arrakis.es] Arrakis IRC Server.

    ganimedes.irc-hispano.org [158.42.52.100] Servidor de la BBS de la
     EUI-UPV.

    fuego.irc-hispano.org [irc.arrakis.es] Arrakis IRC Server (Hub).

    fenix.irc-hispano.org [irc.arrakis.es] Arrakis IRC Server.

  Nota: arrakis tiene varios puertos (6665-6669) y cada uno se
  corresponde con un server.

  7.  Otros servidores:

    Servidores de Efnet:

    irc.cs.cmu.edu:6667

    irc.primenet.com 6667

    irc.videotron.ab.ca:6667

    irc.total.net:6660

    irc.phoenix.net:6667

    servidores de Undernet

    irc.undernet.org:6667

    eu.undernet.org: este nos redirecciona a un algn server europeo.

    irc.linpeople.org: servidor dedicado nicamente al linux.

  8.  Netiqueta :)

  Hay una serie de normas bsicas para estar en el irc, en algunas redes
  (vase el hispano) son menos estrictos que en otras, lo que no quiere
  decir que se pueda hacer cualquier cosa (poderse se puede, pero no se
  debe muchas son extensibles al resto.

    No repitas las cosas. Con una vez suele bastar para que la gente te
     lea.

    No fras a la gente a privados, si preguntas en el canal se entera
     ms gente con lo que te pueden contestar ms personas.

    No preguntes si se puede preguntar. ;)

    No uses colorines ni "beeps" , hay mucha gente a la que le molesta.

    No pongas mensajes de bienvenida.

    Desactiva los mensajes de tu script, a la gente no le suele
     importar lo bueno que es tu script. :)

    No floodees.

    Elimina los mensajes de auto_away.

    No nukees a la gente, si te lo hicieran a ti no te gustara ;).

    Psatelo lo mejor que puedas . :)

  Si entras en el canal #linux de efnet desactiva el nick_completion que
  no les gusta mucho (de hecho si entras en ese canal sigue estas normas
  al pie de la letra porque sino te echan a la mnima ...).

  9.  Agradecimientos

  A Francisco Jos Montilla por obligarme a aprender sgml y por toda su
  labor con el Insflug.

  A Antonio Verdejo porque s. :)

  A Ramn Casellas por sus consejos sobre el contenido de este Como.

  A mi equipo de correctores (Cox, Dr_Pci, Drizzt y Failure ) por su
  inestimable ayuda.

  A todos los del canal #linux por hacerme pasar noches amenas.

  A todos los que contribuyen a hacer de linux el mejor sistema
  operativo.

  10.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.
  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  CDROM-COMO
  Jeff Tranter, jeff_tranter@pobox.com
  Fernndez Moro, uov00655@correo.uniovi.es
  v1.12, 1 November 1997

  Esta es la traduccin del CD-ROM-HOWTO. En este documento se explica
  la manera de instalar, configurar y utilizar unidades de CD-ROM bajo
  Linux. Incluye una lista de los modelos soportados y las respuestas a
  las PUFs (Preguntas de Uso Frecuente).  La intencin no es otra que la
  de capacitar a los usuarios noveles a un nivel bsico y aligerar la
  correspondencia en los grupos de noticias de Usenet y listas de
  correo.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Fuentes de Informacin

  1.2.    Repaso Histrico

  1.3.    Versiones nuevas de este documento

  1.4.    Contacto con el autor

  1.5.    Poltica de Distribucin

  2.      La Tecnologa CD-ROM

  3.      Hardware Soportado

  3.1.    Unidades ATAPI

  3.2.    Unidades SCSI ( Small Computer Systems Interface )

  3.3.    Unidades Propietarias

  3.4.    Unidades Va Puerto Paralelo

  3.5.    Unidades Alternativas

  4.      Instalacin

  4.1.    Instalacin del Hardware

  4.2.    Configuracin y Construccin del Ncleo

  4.3.    Creacin de los Ficheros de Dispositivo ( device files ) y
  Ajuste de los Parmetros Temporales de Arranque

  4.3.1.  Controlador sbpcd

  4.3.2.  Controlador Sonycdu535

  4.3.3.  Controlador Cdu31a

  4.3.4.  Controlador Aztcd

  4.3.5.  Controlador Gscd

  4.3.6.  Controlador Mcd

  4.3.7.  Controlador Mcdx

  4.3.8.  Controlador Cm206

  4.3.9.  Controlador Optcd

  4.3.10. Controlador Sjcd

  4.3.11. Controlador Bpcd

  4.3.12. Controlador SCSI

  4.3.13. Controlador IDECD

  4.4.    Arrancando el Ncleo

  4.5.    Montando, Desmontando y Extrayendo

  4.6.    Problemillas

  4.6.1.  Primero: Asegrese de haber arrancado con el ncleo recin
  compilado

  4.6.2.  Segundo: Compruebe que los controladores estn incluidos en el
  ncleo.

  4.6.3.  Tercero: Compruebe que el ncleo detecta la unidad durante el
  arranque

  4.6.4.  Cuarto: Compruebe si puede leer informacin desde la unidad

  4.6.5.  Quinto: Pruebe a montar un CD-ROM

  4.6.6.  Problemas con el sonido

  4.6.7.  Nada, Que sigue fallando...

  5.      Aplicaciones

  5.1.    Reproductores de CDs de Audio

  5.2.    PhotoCD

  5.3.    mkisofs

  5.4.    Utilidades ISO-9660

  6.      Respuestas a las Preguntas de Uso ms Frecuente (PUFs)

  6.1.    Cmo hacer que cualquier usuario (no root) pueda montar y
  desmontar los CDs?

  6.2.    Por qu obtengo "device is busy (dispositivo ocupado)" a la
  hora de desmontar el CD-ROM?

  6.3.    Cmo puedo exportar un CD-ROM a otra mquina va NFS?

  6.4.    Es posible arrancar Linux desde un CD-ROM?

  6.5.    Cmo puedo leer la informacin digital de un CD-Audio?

  6.6.    Por que el comando find  no funciona correctamente?

  6.7.    Soporta Linux alguna unidad grabadora de CD-ROM?

  6.8.    Por qu obtengo " mount: Read-only file system  (sistema de
  ficheros de solo-lectura)" al montar un CD-ROM?

  6.9.    Por qu se abre la bandeja de la unidad cuando apago el
  sistema?

  6.10.   Tengo un CD "quiquilloso" que no consigo montar

  6.11.   Funcionan bajo Linux las unidades de CD-ROM multi-disco?

  6.12.   Obtengo " /cdrom: Permission denied "

  6.13.   Cmo he de interpretar los mensajes de error del ncleo
  referentes al CD IDE?

  6.14.   Cmo puedo comprobar la velocidad de mi CD-ROM?

  6.15.   Mi CD-ROM dej de funcionar despus de completar la
  instalacin de Linux

  6.16.   No puedo leer los ficheros ocultos

  6.17.   Dnde se encuentra la documentacin de la API del CDROM?

  6.18.   Por qu no leo los nombres de fichero largos de este CDROM de
  Windows?

  6.19.   Es soportado el sistema de ficheros de Microsoft Joliet?

  7.      Referencias

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Este es el CDROM-COMO. Pretende ser una gua de referencia rpida,
  abarcando todo lo que Vd. necesita saber para poder instalar y
  configurar una unidad de CD-ROM bajo Linux. Tambin se da respuesta a
  las preguntas ms comunes acerca de el CD-ROM, y se incluyen notas de
  referencia a otras fuentes de informacin relacionadas con las
  aplicaciones del CD-ROM y su tecnologa.

  1.1.  Fuentes de Informacin

  La mayor parte de esta informacin proviene de los archivos de cdigo
  y documentacin suministrados con el ncleo de Linux, las FAQ del
  grupo de noticias de Usenet alt.cd-rom y colaboraciones de usuarios
  linuxer*s.

  Gracias al paquete ftp://sunsite.unc.edu/pub/Linux/utils/text/sgml-
  tools-0.99.0.tar.gz, este COMO est disponible en numerosos formatos,
  todos ellos generados a partir de un mismo fichero de texto.

  1.2.  Repaso Histrico

     Versin 1.0
        Primera versin de este documento disponible al pblico.

     Versin 1.1
        A partir de la versin 1.1.20 del ncleo, queda soportada de
        manera explcita la unidad CDU33A; Reveal FX; acerca de la
        lectura de pistas de audio; versiones alfa de algunos
        controladores (drivers); aadida la seccin Problemillas; otros
        aadidos de menor importancia.

     Versin 1.2
        A partir del ncleo 1.1.33, el sistema de ficheros ISO-9660 ha
        de ser montado en modo slo-lectura; queda aclarado que la SB16
        SCSI s est soportada, mientras que las unidades Aztech no lo
        estn; referencias a los programas photocd y xpcd; comentarios
        acerca de la nueva caracterstica de auto-extraccin del
        controlador SBPCD.

     Versin 1.3
        Notas sobre la auto-extraccin del controlador SBPCD a partir
        del ncleo 1.1.49; acerca de los discos XA y su identificacin.

     Versin 1.4
        Traducciones de este documento a otros idiomas; el SBPCD ofrece
        soporte para unidades IBM y Longshine; versin alfa del
        controlador para unidades Aztech; controlador CDU-33 sin auto-
        prueba, y con soporte para PhotoCD y audio; soporte para ms de
        2 unidades SCSI; nuevo controlador para unidades IDE; se
        recomienda comprobar las posiciones de los jumpers de la unidad;
        control de la auto-extraccin del controlador SBPCD a travs de
        las funciones ioctl(); lista de los controladores con soporte
        para multi-sesin; pregunta acerca de el piloto parpadeante de
        la CDU-33.

     Versin 1.5
        Esta nueva versin del documento viene con retraso (he estado
        ocupado); el documento se sita bajo licencia pblica GPL;
        nuevos controladores; ms informacin sobre configuracin y
        problemas; montones de enlaces a documentos HTML; otros cambios
        de menor importancia.

     Versin 1.6
        Enlace al programa eject (extraccin); parche para los permisos
        de ficheros; enlace a la pgina Web de Creative Labs; referencia
        al FTP y FAQs de ATA/EIDE; ntese que muchas de las unidades
        Creative Labs y Mitsumi ms recientes son EIDE; supermount; la
        lista de unidades con soporte para la lectura de CD-Audio est
        obsoleta, con relacin al cdda2wav; escritura de CDs; unidad
        EIDE multi-disco.

     Versin 1.7
        Nueva versin del ncleo; muchos de los archivos README (lame)
        son trasladados al directorio /usr/src/linux/Documentation;
        finaliza la fase experimental de algunos controladores; nuevas
        unidades soportadas; insistencia en que casi todas las unidades
        comercializadas hoy en da son IDE/ATAPI; se aade un apartado
        sobre el soporte Plug and Play (Enchufar y Listo) e
        identificacin de la velocidad de la unidad; cierre de las
        listas de correo vger; otros pequeos aadidos, miscelnea.

     Versin 1.8
        Por qu el CD-ROM deja de funcionar despus de finalizar la
        instalacin de Linux; el controlador aztcd ofrece soporte para
        dos unidades CyCDROM; se ruega no utilizar el controlador SBPCD
        con unidades IDE; soporte para alguna intercambiadora multi-
        disco ATAPI;  ntese la carencia de soporte para unidades va
        puerto paralelo; el ltimo ncleo estable es el 2.0; miscelnea
        y aadidos de menor importancia.

     Versin 1.9
        Han sido eliminadas una serie de cuestiones muy antiguas y
        actualmente obsoletas; nueva direccin de correo electrnico del
        autor; ya est disponible la traduccin al Chino; enlaces a
        puntos donde encontrar los paquetes de software ms recientes;
        ms informacin en el libro multimedia; correcciones de sintaxis
        y ortografa.

     Versin 1.10
        Queda aclarado que las nuevas unidades Aztech son ATAPI; CDU31A
        como controlador modular; opcin de mount para la lectura de
        ficheros ocultos; nueva URL de la pgina web del libro;
        correcciones sintcticas y ortogrficas.

     Versin 1.11
        Unidades va puerto paralelo; controlador bpcd;  nueva URL de la
        traduccin al Chino; controlador alternativo CR-56x; CDs de
        arranque; la API del CDROM; la Gua Linux Multimedia (Linux
        Multimedia Guide) ya est disponible en Francs y Japons.

     Versin 1.12
        Traduccin al Polaco; el documento CD-Writing ya no es un mini-
        HOWTO; dos puntos acerca del sistema de ficheros Joliet.

  1.3.  Versiones nuevas de este documento

  Las versiones nuevas de este documento sern enviadas peridicamente
  al grupo de noticias comp.os.linux.answers . Tambin se subirn a
  varios puntos de ftp annimo, includo
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/.

  Las versiones hipertexto de ste y otros HOWTOs/COMOs de Linux se
  encuentran disponibles en numerosos servidores de la World-Wide-Web,
  incluido http://sunsite.unc.edu/LDP/HOWTO/. Muchas de las
  distribuciones de Linux en CDROM incluyen los HOWTOs, normalmente en
  el directorio /usr/doc, y tambin los puede adquirir en formato
  impreso. A veces los HOWTOs incluidos en CDROMs, ftps y copias
  impresas vienen desfasados. Si la fecha de este COMO tiene ms de 6
  meses, es probable que haya disponible una versin ms reciente a
  travs de Internet.

  La traduccin al Francs de este documento, realizada por Bruno Cornec
  (cornec@stna7.stna.dgac.fr) se encuentra en
  ftp://ftp.ibp.fr/pub2/linux/french/docs/HOWTO/.

  La traduccin al Japons de este documento, realizada por Itsushi
  Minoura (minoura@uni.zool.s.u-tokyo.ac.jp) se encuentra en
  http://jf.linux.or.jp/JF/JF.html/.

  La traduccin al Chino de este documento (en cdigo BIG-5), realizada
  por Yung-kang Wu (yorkwu@ms4.hinet.net) se encuentra en
  http://linux.ntcic.edu.tw/~yorkwu/linux/howto/cdrom/.

  La traduccin al Polaco, realizada por Bartosz Maruszewski
  (b.maruszewski@zsmeie.torun.pl), se encuentra en
  http://www.jtz.org.pl/Html/CDROM-HOWTO.pl.html.
  Las traducciones de ste y otros HOWTOs de Linux tambin se pueden
  encontrar en http://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/
  y ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/ .  Las
  traducciones al castellano, los COMOs, se encuentran, entre otros
  puntos, en http://www.insflug.org y http://www.infor.es/LUCAS.

  1.4.  Contacto con el autor

  Le confo a Vd, lector o lectora, la utilidad y provecho de este COMO.
  Si tiene alguna sugerencia, correccin o comentario, por favor,
  hgamelo saber, jeff_tranter@pobox.com, e intentar incluirlo en una
  futura revisin.

  Responder asimismo a toda pregunta general acerca del manejo del CD-
  ROM bajo Linux, tan bien como me sea posible. Antes de hacerlo, por
  favor, lea atentamente todo el documento y entonces, enveme la
  informacin detallada de su problema. Por favor, no me consulten sobre
  la utilizacin de unidades de CD-ROM bajo otros sistemas operativos
  distintos de Linux.

  Si publica este documento en un CDROM u otro tipo de almacenamiento,
  agradecer una copia del mismo; puede mandarme un e-mail para pedirme
  la direccin postal. Considere tambin la posibilidad de hacer una
  donacin al Linux Documentation Project (Proyecto de Documentacin de
  Linux).  Contacte con el coordinador de los HOWTOs de Linux, Greg
  Hankins (gregh@sunsite.unc..edu), para ms informacin al respecto.

  1.5.  Poltica de Distribucin

  Copyright 1995-1997 Jeff Tranter.

  Este COMO se distribuye gratuitamente; Vd. puede redistribuirlo y/o
  modificarlo bajo los trminos de la GNU General Public License, tal
  como ha sido publicado por la Free Software Foundation; a partir de la
  versin 2 de dicha Licencia, o (a su eleccin) posteriores.

  Este documento se distribuye con la esperanza de que ser de utilidad,
  pero sin garanta alguna; carece de licencia mercantil o de beneficio
  particular. Consulte la GNU General Public License para ms detalles.

  Puede obtener una copia de la GNU General Public License escribiendo a
  la la siguiente direccin: Free Software Foundation, Inc., 675 Mass
  Ave, Cambridge, MA 02139, USA.

  2.  La Tecnologa CD-ROM

       "El CD-ROM es una memoria de solo-lectura, y el sistema de audio de discos
       compactos se halla en forma de paquetes de datos digitales para este
       proposito. Para escuchar CD-Audio, por favor, inserte la clavija del
       auricular."  --- extraido del manual de instrucciones de un CD-ROM

  No se desespere! El mundo de la tecnologa del CD-ROM no es tan
  incomprensible como el manual de instrucciones de su unidad.

  CD-ROM es el acrnimo de Compact Disc Read-Only Memory. Es un medio de
  almacenamiento masivo de datos que se sirve de un lser ptico para la
  lectura de unas oquedades microscpicas que estn estampadas en la
  superficie de un disco de aluminio recubierto de policarbonato.

  Se basa en el mismo sistema que emplean los CDs de audio. Gracias a su
  alta capacidad de almacenamiento, seguridad y bajo coste, el CD-ROM se
  est convirtiendo en un medio de almacenamiento cada vez ms popular.

  La capacidad de almacenamiento de un disco compacto es de unos 650
  megabytes, o el equivalente a algo ms de 500 discos de 3.5" de alta
  densidad... algo as como la friolera de unas 250.000 pginas de texto
  mecanografiado.

  Las unidades de primera generacin (conocidas como de velocidad
  sencilla; (single speed) proporcionaban una velocidad de transferencia
  de aproximadamente 150 kilobytes/segundo. Luego los fabricantes de
  hardware empezaron a desarrollar unidades de doble velocidad (2x, a
  300Kb/seg.), de cudruple velocidad (4x, a 600Kb/seg.) y as... A la
  hora de escribir este documento, ya se estn fabricando unidades de
  24x y su precio es bastante asequible.

  Casi todas las unidades de CD-ROM emplean una de las siguientes
  interfases: SCSI (Small Computer Systems Interface), IDE/ATAPI, o
  alguna interfase propietaria del fabricante. Por lo general, pueden
  reproducir CDs de audio. La salida del audio tiene lugar bien por
  medio de una clavija (jack) que se inserta en un conector externo, a
  travs de la tarjeta de sonido, u otro medio similar. Algunos CDROM
  permiten la extraccin de los datos de audio en formato digital.

  Los CD-ROM suelen venir formateados con el sistema de ficheros
  ISO-9660 (tambin llamado High Sierra). En dicho formato, los nombres
  de ficheros siguen el estndar del DOS (es decir, 8+3 caracteres). Una
  extensin del mismo, denominada Rock Ridge Extensions, se vale de una
  serie de campos indefinidos dentro del estndar ISO-9660 para poder
  dar soporte a los nombres de ficheros ms largos e informaciones
  adicionales que se utilizan en Unix (p.e. permisos de lectura,
  escritura y ejecucin, enlaces simblicos, etc).

  El PhotoCD es un estndar desarrollado por Kodak para almacenar
  imgenes fotogrficas en CDROM. Con las aplicaciones adecuadas, Vd.
  podr ver las imgenes, manipularlas, imprimirlas, etc. La posibilidad
  de aadir datos a un PhotoCD a posteriori se conoce como multi-sesin.

  Las grabadoras de CD-ROM (CD-R) van siendo (poco a poco) cada vez ms
  asequibles para nuestros bolsillos. Utilizan un sistema diferente y
  disponen de un hardware muy complejo para realizar la grabacin, pero
  los discos resultantes son legibles con cualquier unidad de CDROM.

  En el futuro, se desarrollarn nuevas tecnologas que multiplicarn la
  capacidad de almacenamiento de los dispositivos actuales.

  3.  Hardware Soportado

  A continuacin se listan los controladores (drivers) e interfases que
  actualmente son soportados por Linux. Dicha informacin esta basada en
  el ltimo ncleo estable, que a la hora de escribir este documento va
  por la versin 2.0.31. Tambin se encuentran disponibles los ncleos
  de desarrollo 2.1.x, pero su estabilidad no est garantizada.

  Los datos que siguen a continuacin son vlidos nicamente para
  sistemas Linux funcionando sobre plataformas Intel y compatibles.
  Aunque en su mayor parte debera poder extrapolarse a procesadores
  basados en otras arquitecturas, no tengo de ello informacin ni
  experiencia de primera mano.

  3.1.  Unidades ATAPI

  ATAPI (ATA Packet Interface) es un protocolo diseado para controlar y
  gestionar dispositivos de almacenamiento masivo. Est basado en la
  interfase ATA (AT Attachment), que es la denominacin oficial segn el
  estndar ANSI de las interfases IDE desarrolladas para las unidades de
  disco duro. Los CDROM, discos duros y otros sistemas de alta capacidad
  de almacenamiento suelen ser ATAPI. Adems de ser hoy en da la
  interfase de ms amplia difusin, ofrece unas prestaciones similares a
  la SCSI sin tener que desembolsar grandes cantidades de dinero en una
  controladora y cables especiales.

  En el ncleo de Linux viene incluido un controlador que debera
  funcionar con cualquier unidad de CDROM ATAPI. Otros fabricantes de
  unidades compatibles son Aztech, Mitsumi, NEC, Sony, Creative Labs, y
  Vertos. Si Vd. ha adquirido recientemente un CDROM, y especialmente si
  es de 4x o mayor, seguramente ser IDE/ATAPI.

  3.2.  Unidades SCSI ( Small Computer Systems Interface )

  Las principales ventajas radican en su elevada velocidad de
  transferencia, compatibilidad con gran cantidad de plataformas y
  soporte para mltiples unidades. Algunas desventajas del SCSI son la
  necesidad de una controladora y cables que resultan relativamente
  caros...

  Cualquier CDROM SCSI con un tamao de bloque (block size) de 512 o
  2048 bytes debera funcionar correctamente bajo Linux; esto incluye a
  la mayor parte de las unidades del mercado.

  Tenga en cuenta que va a necesitar una controladora SCSI que sea
  soportada; consulte el http://sunsite.unc.edu/LDP/HOWTO/SCSI-
  HOWTO.html para ms informacin.

  Algunos CDROM vienen con una controladora propietaria cuya interfase
  no es 100% SCSI compatible (p.e. sin soporte para ms unidades SCSI en
  el bus).  Es probable que dichas unidades no funcionen bajo Linux.

  3.3.  Unidades Propietarias

  S que estn soportadas muchas unidades de CDROM basadas en interfases
  propietarias; a menudo la interfase suele venir junto con la tarjeta
  de sonido. Las tarjetas de interfase sencilla (o single), como las
  suministradas con la tarjeta de sonido, tambin estn disponibles. El
  precio de dichas unidades suele ser ms bajo que el de las SCSI. Su
  desventaja estriba en la imposibilidad de expansin y falta de
  estandarizacin.

  Cuidado: hay interfases propietarias que vienen catalogadas
  errneamente como IDE porque, al igual que los discos duros IDE,
  emplean una interfase sencilla basada en el bus PC/AT. Por si fuera
  poco, algunos fabricantes, en particular Creative Labs, han lanzado al
  mercado diferentes tipos de unidades, ofreciendo con sus tarjetas de
  sonido interfases ATAPI, SCSI y propietarias.

  A continuacin tenemos una lista de las unidades propietarias que
  sabemos que S son soportadas bajo Linux. Los controladores
  correspondientes estn disponibles en las ltimas versiones de
  desarrollo del ncleo o bien como parches: en
  ftp://sunsite.unc.edu/pub/Linux/kernel/patches/cdrom/. Revise asimismo
  los ficheros README que incluidos en la distribucin del ncleo;
  habitualmente se encuentran instalados en el directorio
  /usr/src/linux/Documentation/cdrom.

                       Unidades de CD-ROM Propietarias

       Fabricante      Modelo          Controlador     Comentarios
       ----------      ------          -----------     -----------
       Panasonic       CR-521          sbpcd           Nota 1
       Panasonic       CR-522          sbpcd           Nota 1
       Panasonic       CR-523          sbpcd           Nota 1
       Panasonic       CR-562          sbpcd           Nota 1
       Panasonic       CR-563          sbpcd           Nota 1
       Creative Labs   CD-200          sbpcd
       IBM             External ISA    sbpcd           Nota 2
       Longshine       LCS-7260        sbpcd
       Teac            CD-55A          sbpcd
       Sony            CDU-31A         cdu31a
       Sony            CDU-33A         cdu31a
       Sony            CDU-535         sonycd535       Nota 3
       Sony            CDU-531         sonycd535
       Aztech          CDA268-01A      aztcd           Nota 4
       Orchid          CDS-3110        aztcd
       Okano/Wearnes   CDD110          aztcd
       Conrad          TXC             aztcd
       CyCDROM         CR520ie         aztcd
       CyCDROM         CR940ie         aztcd
       GoldStar        R420            gscd            Nota 5
       Philips/LMS     CM206           cm206           Nota 6
       Mitsumi         CRMC LU005S     mcd/mcdx        Notas 7, 8
       Mitsumi         FX001           mcd/mcdx        Notas 7, 8
       Optics Storage  Dolphin 8000AT  optcd
       Lasermate       CR328A          optcd
       Sanyo           H94A            sjcd
       various         various         isp16           Nota 9
       MicroSolutions  Backpack        bpcd

  Comentarios:

  1. Estas unidades deben estar comercializadas exclusivamente por
     Creative Labs, Panasonic, Matsushita, o Kotobuki.

  2. Se trata de la misma unidad que la  Panasonic CR-562.

  3. Tambin podemos encontrarla con el nombre de Procomm.

  4. Este controlador slo funciona con la unidad CDA268-01A. Los otros
     modelos, incluyendo el CDA268-03I y el CDA269-031SE no son
     propietarios, por lo que deben usar el controlador del ncleo IDECD
     (ATAPI).

  5. Se puede encontrar formando parte del Kit Reveal Multimedia.

  6. Este controlador no soporta la unidad Philips CM205, pero ya existe
     para la misma un controlador en versin alfa que se puede obtener
     va
     ftp://sunsite.unc.edu/pub/Linux/kernel/patches/cdrom/lmscd0.4.tar.gz

  7. Tambin la podemos encontrar con el nombre de Radio Shack.

  8. Existen dos controladores. "mcd" es el original. "mcdx", el ms
     moderno, soporta ms caractersticas (pero puede que sea menos
     estable).

  9. Este controlador funciona con las unidades conectadas a la
     interfase de una tarjeta de sonido ISP16, MAD16 o Mozart.

  Si su ncleo no soporta alguna de las unidades referidas probablemente
  necesite actualizarse a una versin mas reciente.

  Si su unidad no coincide con ninguno de los modelos sealados, ms aun
  si sta es de reciente adquisicin y de cudruple velocidad o ms, es
  muy probable que emplee la interfase IDE/ATAPI, que ya hemos comentado
  en el apartado anterior. Uno de los errores ms frecuentes entre los
  usuarios de Linux es creer que cualquier unidad conectada a una
  tarjeta de sonido SoundBlaster debe utilizar el controlador SBPCD.
  Creative Labs y otros muchos fabricantes estn dejando de producir
  unidades de interfases propietarias para seguir el estndar ATAPI/IDE.

  3.4.  Unidades Va Puerto Paralelo

  La nica unidad de estas caractersticas que est soportada
  actualmente en el ncleo de Linux es la MicroSolutions Backpack.

  Hay tambin disponibles controladores para muchas ms unidades, en
  forma de parches del ncleo o como mdulos cargables. Mas informacin
  al respecto en http://www.torque.net/linux-pp.html.

  3.5.  Unidades Alternativas

  Existe un controlador alternativo para las unidades
  Panasonic/Matsushita CR-56x, escrito por Zoltan Vorosbaranyi. Puede
  encontrarse en ftp://ftp.tarki.hu/pub/linux/pcd/pcd-0.29.tar.gz.

  4.  Instalacin

  La instalacin de un CD-ROM bajo Linux incluye los siguientes pasos:

  1. Instalar el hardware

  2. Configurar y recompilar el ncleo

  3. Crear los ficheros de dispositivo (device files) y ajustar los
     parmetros temporales de arranque (boot time parameters)

  4. Arrancar con el nuevo ncleo

  5. Montar la unidad

  Vamos a seguir paso a paso este proceso:

  4.1.  Instalacin del Hardware

  Siga detenidamente la gua de instalacin del fabricante o consiga que
  su distribuidor, o algn amigo, le instale la unidad. Los detalles
  variarn dependiendo de si la unidad es interna o externa, y segn el
  tipo de interfase empleada. Linux no requiere ningn tipo de
  instalacin especial.  Asegrese de ajustar correctamente los jumpers
  (puentes) de la unidad y/o de la interfase; algunos controladores del
  ncleo proporcionan informacin al respecto en sus archivos README.

  Tal y como viene explicado en el fichero ide-cd, las unidades ATAPI
  deben de estar configuradas como "single" o "master", y nunca como
  "slave" cuando solamente hay un dispositivo IDE conectado a la
  interfase (aunque esta limitacin desaparece con los ncleos ms
  recientes).

  4.2.  Configuracin y Construccin del Ncleo

  Para instalar Linux desde un CDROM, seguramente emplee un disco
  llamado "boot" y otro llamado "root" (o similares) que vienen
  incluidos en la distribucin. Si es posible, escoja un disco de
  arranque (boot) que posea el controlador adecuado para su unidad. Si
  le resulta imposible encontrar un disco de arranque con el controlador
  preciso, tiene varias opciones:

  1. Instalar Linux a travs de una red.

  2. Arrancar el DOS, y volcar los ficheros de Linux al disco duro.

  3. Arrancar DOS, y crear una serie de discos que utilizar para
     instalar Linux.

  4. Encontrar a alguien que le construya un disco de arranque con el
     controlador que Vd. necesita.

  En http://sunsite.unc.edu/LDP/HOWTO/Installation-HOWTO.html encontrar
  ms informacin sobre la instalacin de Linux.

  Si ha adquirido una distribucin de Linux en CDROM, seguramente
  incluir las instrucciones precisas para su instalacin (impresas en
  el folletn de la caja y/o en algn fichero del disco).

  Una vez que Linux ha sido instalado, probablemente querr recompilar
  el ncleo. Hay varias razones para ello:

    para el habilitar el soporte del CDROM  y dems hardware

    para actualizarse a una nueva versin del ncleo

    para liberar recursos de memoria, minimizando el tamao del ncleo

  Consulte el http://sunsite.unc.edu/LDP/HOWTO/Kernel-HOWTO.html o su
  traduccin al castellano, el
  http://www.insflug.org/howtos/online/kernel/Kernel-Como.html para ms
  informacin al respecto. Aqu nos limitaremos a los aspectos
  relacionados con el CDROM.

  Obviamente, deber compilar el soporte para su unidad de CD-ROM al
  hacer "make config".

  Si tiene una unidad ATAPI, deber contestar afirmativamente, es decir,
  y(es) a las siguientes preguntas:

       Enhanced IDE/MFM/RLL disk/cdrom/tape support (CONFIG_BLK_DEV_IDE) [Y/n/?]
       Include IDE/ATAPI CDROM support (CONFIG_BLK_DEV_IDECD) [Y/n/?]

  Para unidades SCSI CD-ROM, sern las opciones:

       SCSI support (CONFIG_SCSI) [Y/n/m/?]
       SCSI CD-ROM support (CONFIG_BLK_DEV_SR) [Y/n/m/?]

  No olvide configurar el soporte para la controladora SCSI, p.e:

       Adaptec AHA152X support (CONFIG_SCSI_AHA152X) [Y/n/m/?]

  Para las unidades propietarias, seleccione el controlador
  correspondiente.  Puede servirse de la tabla anterior para determinar
  el controlador que ha de emplear.

  Virtualmente, todos los CDROM trabajan con el sistema de ficheros
  ISO-9660, por lo que ser imprescindible habilitar la opcin:

       ISO9660 cdrom filesystem support (CONFIG_ISO9660_FS) [Y/n/m/?]

  Aunque no es imprescindible (en lo que al funcionamiento del CDROM
  respecta), si tiene una tarjeta de sonido soportada por Linux,
  probablemente desear habilitarla y configurar el controlador de
  sonido.  Para ello, le ser de gran inters y utilidad consultar el
  http://sunsite.unc.edu/LDP/HOWTO/Sound-HOWTO.html;  o su traduccin,
  http://www.insflug.org/howtos/online/sonido/Sonido-Como.html.

  Luego, contine con el procedimiento habitual de compilacin e
  instalacin del ncleo. No arranque el nuevo ncleo hasta que haya
  creado los ficheros de dispositivo y ajustado los parmetros
  temporales de arranque, tal y como se describe en la siguiente
  seccin.

  El sistema de ficheros ISO-9660 y la prctica totalidad de los
  controladores se pueden compilar como mdulos cargables. Ello har que
  los controladores se carguen y descarguen de la memoria sin tener que
  reinicializar el sistema, con lo que liberaremos memoria. Al
  principio, recomendara incluir los controladores de CD-ROM compilados
  en el ncleo.  Para ms informacin acerca de cmo utilizar los
  mdulos, le vuelvo a referir al
  http://www.insflug.org/howtos/online/kernel/Kernel-Como.html.

  Si su ncleo no soporta alguna de las unidades detalladas, quizs
  debera actualizarse a una versin ms reciente.

  Si necesita alguno de los controladores que no vienen incluidos con el
  ncleo, seguramente lo podr encontrar como parche: de nuevo le remito
  al http://www.insflug.org/howtos/online/kernel/Kernel-Como.html

  Hay un programa que le ayudar a configurar el ncleo por medio de
  mens: make menuconfig. Y otro basado en las X11: make xconfig. Los
  tres mtodos proporcionan las indicaciones oportunas.

  4.3.  de los Parmetros Temporales de Arranque Creacin de los
  Ficheros de Dispositivo ( device files ) y Ajuste

  El ncleo utiliza los ficheros de dispositivo para identificar el
  controlador con el que va a trabajar. En una distribucin de Linux
  estndar, dichos ficheros de dispositivo se crean durante el proceso
  de instalacin. En la distribucin Slackware hay una utilidad de
  configuracin por medio de mens que incluye la configuracin del CD-
  ROM. Casi todos los sistemas cuentan con el script /dev/MAKEDEV. O
  puede seguir el procedimiento que se detalla a continuacin. Si emplea
  alguno de los mtodos anteriores, tambin le sera de gran utilidad
  confrontar sus ficheros de dispositivo con la informacin de esta
  seccin.

  Para crear los ficheros de dispositivo, tendr que introducir desde el
  la lnea de comandos las rdenes adecuadas para su unidad. Esta tarea
  habr de ser realizada en modo root (superusuario). Tngase en cuenta
  que algunas distribuciones utilizan nombres distintos a los citados
  para los dispositivos de CD-ROM.

  Tambin es recomendable que cree un enlace simblico a la unidad; as,
  le ser ms fcil acordarse. Por ejemplo, para una unidad IDE que sea
  el segundo dispositivo y se halle conectada a la interfase secundaria,
  el enlace se hara de la siguiente manera:

       ln -s /dev/hdd /dev/cdrom

  Si va a reproducir CDs de audio, bueno ser que proteja el fichero de
  dispositivo (no el enlace simblico) antes de permitir su lectura a
  todos los usuarios, as:

       chmod 664 /dev/hdd
       ls -l /dev/hdd
       brw-rw-r--   1 root     disk      22,  64 Feb  4  1995 /dev/hdd

  Cuando arranca Linux, los distintos controladores tratan de determinar
  si los dispositivos correspondientes se encuentran disponibles. Por lo
  general, lo hacen probando diferentes direcciones. La mayora realizan
  la autoprueba (autoprobe) con muchas direcciones, pero a causa de las
  diferentes configuraciones posibles, conflictos entre dispositivos y
  limitaciones del hardware, los controladores necesitan a veces ayuda
  para poder identificar las direcciones y dems parmetros. Casi todos
  los controladores soportan alguna opcin en la lnea de comandos del
  ncleo, desde la cual se transfiere dicha informacin al controlador.
  Esta operacin podemos realizarla de manera interactiva o, ms
  frecuentemente, a travs del gestor de arranque (boot loader). Si
  utiliza LILO, deber aadir el comando append, tal y como sigue, en el
  fichero /etc/lilo.conf:

       append = "sbpcd=0x230,SoundBlaster"

  Consulte la documentacin de LILO para mas informacin.

  A continuacin se detallan los aspectos relativos a los diferentes
  controladores, incluyendo los ficheros de dispositivo, los parmetros
  de arranque y las posibilidades de stos. Es probable que slo
  necesite leer el apartado referido a su unidad. Los archivos README se
  encuentran habitualmente en el directorio
  /usr/src/linux/Documentation/cdrom.

  4.3.1.  Controlador sbpcd

            Autor principal: Eberhard Moenkeberg (emoenke@gwdg.de)
       Soporta Multi-sesion: si (pero no todas las unidades)
    Soporta Varias Unidades: si
    Soporta Carga en Modulo: si
           Lectura de Audio: si (la CR-562, CR-563 y CD-200 unicamente)
                Auto-prueba: si
     Fichero de Dispositivo: /dev/sbpcd, mayor 25
   Fichero de Configuracion: sbpcd.h
          Opcion del Nucleo: Matsushita/Panasonic CDROM support?
             Archivo README: sbpcd

  Lnea de comandos del ncleo:

       sbpcd=<direccion-E/S>,<tipo-de-interfase>

  El primer parmetro es la direccin base del dispositivo (p.e.
  0x230), y el tipo-de-interfase podr ser "SoundBlaster", "LaserMate",
  o "SPEA".  Consulte el archivo sbpcd.h para ms informacin acerca del
  tipo de interfase empleada. Con sbpcd=0 desactivar la auto-prueba,
  as como la unidad.

  Creacin del Fichero de Dispositivo:

       # mknod /dev/sbpcd b 25 0

  El SBPCD es capaz de soportar hasta cuatro unidades por controlador.
  Las otras tres unidades del primer controlador utilizarn por orden
  los nmeros 1, 2 y 3 (en vez de 0). Con ms de un controlador, los
  archivos de dispositivo tendrn como nmero mximo 26, 27, y 28, as
  hasta un mximo de cuatro controladores (osea, 16 CDROM en total;
  afortunadamente, suele ser suficiente para la mayor parte de los
  usuarios :-).

  Ms informacin acerca de este controlador en el archivo sbpcd.

  Si ha comprado su CDROM recientemente, no presuponga que ha de emplear
  este controlador slo porque se conecte a una tarjeta SoundBlaster.
  Casi todas las unidades que se venden actualmente son IDE/ATAPI.

  4.3.2.  Controlador Sonycdu535

            Autor Principal: Ken Pizzini (ken@halcyon.com)
       Soporta Multi-Sesion: no
    Soporta Varias Unidades: no
    Soporta Carga en Modulo: si
           Lectura de Audio: no
                Auto-Prueba: no
     Fichero de Dispositivo: /dev/sonycd535, mayor 24
   Fichero de Configuracion: sonycd535.h
          Opcion del Nucleo: Sony CDU535 CDROM support?
            Archivo  README: sonycd535

  Lnea de comandos del ncleo:

       sonycd535=<direccion-E/S>

  donde direccion-E/S es la direccin base del controlador (p.e..
  0x320).  Tambin puede fijarla dentro del fichero sonycd535.h y
  compilarlo con ella.

  Fichero de Dispositivo:

       mknod /dev/sonycd535 b 24 0

  Algunas distribuciones utilizan /dev/sonycd para dicha unidad.  Las
  versiones ms antiguas del controlador usan como mayor de dispositivo
  21; compruebe si el fichero de dispositivo est correctamente fijado.

  Antiguamente, este controlador se distribua como parche, pero ahora
  se incluye en el ncleo estndar. Para ms informacin, lea el archivo
  sonycd535.

  4.3.3.  Controlador Cdu31a

            Autor Principal: Corey Minyard (minyard@-rch.cirr.com)
       Soporta Multi-Sesion: si
    Soporta Varias Unidades: no
    Soporta Carga en Modulo: si
           Lectura de Audio: si
                Auto-Prueba: no
     Fichero de Dispositivo: /dev/cdu31a, mayor 15
   Fichero de Configuracion: cdu31a.h
          Opcion del Nucleo: Sony CDU31A/CDU33A CDROM support?
            Archivo  README: cdu31a

  Lnea de comandos del ncleo:

       cdu31a=<direccion-E/S>,<interrupcion>,PAS

  El primer nmero es la direccin base E/S de la tarjeta (p.e. 0x340).
  El segundo es el nmero de interrupcin empleada (0 para polled E/S).
  El tercer parmetro, opcional, deber ser "PAS" si la unidad esta
  conectada a una tarjeta Pro-Audio Spectrum 16; si no, djese en
  blanco.

  Si carga el controlador como mdulo, el formato variar ligeramente.
  Para cargarlo, mediante el comando modprobe o insmod, los parmetros
  sern:

       cdu31a_port=<direccion-E/S> cdu31a_irq=<interrupcion>

  La direccin base de E/S es imprescindible. El nmero de interrupcin
  es opcional.

  Fichero de Dispositivo:

       mknod /dev/cdu31a b 15 0

  Para ms informacin, consulte el fichero cdu31a.

  Tambin puede visitar la pgina de Jeffrey Oxenreider
  (zureal@infinet.com), donde se describen los problemas ms frecuentes
  que suelen ocurrir con unidades:
  http://www.infinet.com/~zureal/cdu31a.html.

  4.3.4.  Controlador Aztcd

           Autor Principal: Werner Zimmermann (zimmerma@rz.fht-essliwgen.de)
      Soporta Multi-Sesion: si
   Soporta Varias Unidades: no
   Soporta Carga en Modulo: si
          Lectura de Audio: no
               Auto-Prueba: no
    Fichero de Dispositivo: /dev/aztcd0, mayor 29
  Fichero de Configuracion: aztcd.h
         Opcion del Nucleo: Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support?
            Archivo README: aztcd

  Lnea de comandos del ncleo:

       aztcd=<direccion-E/S>

  tarjeta (p.e. 0x340).

  Fichero de Dispositivo:

       mknod /dev/aztcd0 b 29 0

  Tngase en cuenta que este controlador funciona exclusivamente con la
  unidad CDA268-01A. Otros modelos, como el CDA268-03I y CDA269-031SE no
  son propietarios, y emplean el controlador del ncleo IDECD (ATAPI).

  Para mas informacin, consulte el archivo aztcd

  4.3.5.  Controlador Gscd

            Autor Principal: Oliver Raupach (raupach@nwfs1.rz.fh-hannover.de)
       Soporta Multi-Sesion: no
    Soporta Varias Unidades: no
    Soporta Carga en Modulo: si
           Lectura de Audio: no
                Auto-Prueba: no
     Fichero de Dispositivo: /dev/gscd0, mayor 16
   Fichero de Configuracion: gscd.h
          Opcion del Nucleo: Goldstar R420 CDROM support?
           Archivo   README: gscd

  Lnea de comandos del ncleo:

       gscd=<direccion-E/S>

  Fichero de Dispositivo:

       mknod /dev/gscd0 b 16 0

  Ms informacin en el archivo gscd y en la pgina Web:
  http://linux.rz.fh-hannover.de/~raupach/.

  4.3.6.  Controlador Mcd

           Autor Principal: Martin  (martin@bdsi.com)
       Soporta Multi-Sesion: no
    Soporta Varias Unidades: no
    Soporta Carga en Modulo: si
           Lectura de Audio: no
                Auto-Prueba: no
     Fichero de Dispositivo: /dev/mcd, mayor 23
   Fichero de Configuracion: mcd.h
          Opcion del Nucleo: Standard Mitsumi CDROM support?
           Archivo   README: mcd

  Este es el controlador ms antiguo para unidades Mitsumi. Quizs
  prefiera probar otro ms reciente, mcdx, que ofrece ms prestaciones,
  aunque probablemente sea menos estable.

  Lnea de comandos del ncleo:

       mcd=<direccion-E/S>,<irq>

  y el nmero de la interrucin IRQ.

  Fichero de Dispositivo:

       mknod /dev/mcd b 23 0

  Encontrar ms informacin en el archivo mcd.

  4.3.7.  Controlador Mcdx

            Autor Principal: Heiko Schlittermann
       Soporta Multi-Sesion: si
    Soporta Varias Unidades: si
    Soporta Carga en Modulo: si
           Lectura de Audio: no (el hardware lo soporta)
                Auto-Prueba: no
     Fichero de Dispositivo: /dev/mcdx0, mayor 20
   Fichero de Configuracion: mcdx.h
          Opcion del nucleo: Experimental Mitsumi support?
            Archivo  README: mcdx

  Es el controlador ms reciente para unidades Mitsumi. El antiguo,
  seguramente ms estable, es el mcd.

  Lnea de comandos del ncleo:

       mcdx=<direccion-E/S>,<irq>

  y el nmero IRQ.

  Fichero de dispositivo:

       mknod /dev/mcdx0 b 20 0

  Si ha comprado recientemente un CD-ROM Mitsumi, no presuponga que
  tenga que usar este controlador. Hay muchos modelos Mitsumi que son
  EIDE/ATAPI, por lo que emplean controlador idecd.

  Ms informacin en el archivo mcdx

  4.3.8.  Controlador Cm206

            Autor Principal: David A. van Leeuwen (david@tm.tno.)
       Soporta Multi-Sesion: si
    Soporta Varias Unidades: no
    Soporta Carga en Modulo: si
           Lectura de Audio: no
                Auto-Prueba: si
    Fichero de Dispositivo: /dev/cm206cd, mayor 32
   Fichero de Configuracion: cm206.h
          Opcion del Nucleo: Philips/LMS CM206 CDROM support?
            Archivo  README: cm206

  Lnea de comandos del ncleo:

       cm206=<direccion-E/S>,<interrupcion>

  0x340) y el segundo, el canal de interrupcin.

  Fichero de Dispositivo:

       mknod /dev/cm206cd b 32 0

  Ms informacin en el archivo cm206.

  4.3.9.  Controlador Optcd

            Autor Principal: Leo Spiekman (spiekman@dutette.et.tudelnt.nl)
       Soporta Multi-Sesion: si
    Soporta Varias Unidades: no
    Soporta Carga en Modulo: si
           Lectura de Audio: no
                Auto-Prueba: no
     Fichero de Dispositivo: /dev/optcd0, mayor 17
   Fichero de Configuracion: optcd.h
          Opcion del Nucleo: Experimental Optics Storage ... CDROM support?
            Archivo  README: optcd

  Lnea de comandos del ncleo:

       optcd=<direccion-E/S>

  0x340).

  Fichero de Dispositivo:

       mknod /dev/optcd0 b 17 0

  Ms informacin acerca de este controlador en el archivo optcd.

  4.3.10.  Controlador Sjcd

            Autor Principal: Vadim V. Model (vadim@rbrf.msk.su)
       Soporta Multi-Sesion: no
    Soporta Varias Unidades: no
    Soporta Carga en Modulo: si
           Lectura de Audio: no
                Auto-Prueba: no
     Fichero de Dispositivo: /dev/sjcd, mayor 18
   Fichero de Configuracion: sjcd.h
          Opcion del Nucleo: Experimental Sanyo H94A CDROM support?
            Archivo README : sjcd

  Lnea de comandos del ncleo:

       sjcd=<direccion-E/S>,<interrupcion>,<dma>

  sjcd=0x340,10,5).

  Fichero de Dispositivo:

       mknod /dev/sjcd b 18 0

  Lea el archivo sjcd para ms informacin.

  4.3.11.  Controlador Bpcd

            Autor Principal: Grant R. Guenther (grant@torque.net)
       Soporta Multi-sesion: desconocido
    Soporta Varias Unidades: no
    Soporta Carga en Modulo: si
           Lectura de Audio: no
                Auto-Prueba: si
     Fichero de dispositivo: /dev/bpcd, mayor 41
   Fichero de Configuracion: bpcd.h
          Opcion del Nucleo: MicroSolutions backpack CDROM support?
        Archivo README file: bpcd

  Lnea de comandos del ncleo:

       bpcd=<direccion-E/S>

  Fichero de Dispositivo:

       mknod /dev/bpcd b 41 0

  Este controlador se incluye con la versin 2.1 del ncleo.  Consulte
  asimismo el archivo bpcd.

  4.3.12.  Controlador SCSI

            Autor Principal: David Giller
       Soporta Multi-Sesion: si (dependiendo de la unidad)
    Soporta Varias Unidades: si
    Soporta Carga en Modulo: si
           Lectura de Audio: no
                Auto-Prueba: si
     Fichero de Dispositivo: /dev/scd0, mayor 11
   Fichero de Configuracion: cdrom.h
          Opcion del Nucleo: SCSI CDROM support?
             Archivo README: inexistente

  Hay una lnea de comandos del ncleo especfica para cada tipo de
  controladora SCSI. Ms informacin en el documento
  http://sunsite.unc.edu/LDP/HOWTO/SCSI-HOWTO.html.

  S se soportan mltiples unidades (el nmero mximo de dispositivos
  depender de la capacidad del bus). Determine los ficheros de
  dispositivo con un numero mximo de 11 y los mnimos empezando desde
  cero:

       mknod /dev/scd0 b 11 0
       mknod /dev/scd1 b 11 1

  Aunque el controlador de por s no tiene capacidad de lectura de
  audio, hay unidades SCSI que s poseen dicha caracterstica y
  funcionarn con el programa cdda2wav o readcdda (empleando la
  interfase SCSI genrica del ncleo).

  4.3.13.  Controlador IDECD

             Autor Principal: Scott Snyder (snyder@fnald0.fnal.gov)
       Soporta Multi-Sesion: si
    Soporta Varias Unidades: si
    Soporta Carga en Modulo: no
           Lectura de Audio: si (si la unidad lo soporta)
                Auto-Prueba: si
     Fichero de Dispositivo: /dev/hd{a,b,c,d},  mayor 22
   Fichero de Configuracion: cdrom.h
          Opcion del Nucleo: Include support for IDE/ATAPI CDROMs?
            Archivo  README: ide-cd

  Este es el controlador para unidades ATAPI. Su lnea de comandos del
  ncleo ser de la forma:

       hdx=cilindros,cabezas,sectores,wpcom,irq
         o
       hdx=cdrom

  "hd", para la "siguiente" unidad (en dicha secuencia). Slo son
  imprescindibles los tres primeros parmetros (cilindros,
  cabezas,sectores). Por ejemplo hdc=1050,32,64 hdd=cdrom.

  A veces puede ser complicado el que el controlador reconozca su
  unidad, especialmente si posee ms de 2 dispositivos o ms de una
  controladora IDE. Por lo general, basta con pasar la lnea de comandos
  correcta desde LILO. Cmo hacer esto se explica en el archivo
  /usr/src/linux/Documentation/ide-cd. Lalo atentamente.

  El soporte para mltiples dispositivos IDE ha ido mejorando con las
  ltimas versiones del ncleo. Si tiene problemas con su antiguo
  ncleo, le puede ser de ayuda actualizarlo.

  Algunas controladoras IDE presentan problemas de hardware que el
  controlador del ncleo es capaz de solucionar. Para ello deber
  introducir ms parmetros adicionales. Le remito a la documentacin.

  4.4.  Arrancando el Ncleo

  Ahora ya puede reinicializar el sistema con el nuevo ncleo. Debera
  leer un mensaje indicando que el controlador ha identificado a la
  unidad (el mensaje variar con cada modelo):

       hdd: NEC CD-ROM DRIVE:282, ATAPI CDROM drive

  Si los mensajes del arranque se suceden demasiado rpido para poder
  leerlos, puede revisarlos tecleando dmesg o tail /var/adm/messages.

  Si no ha identificado la unidad, algo falla. Consulte la seccin ``''.

  4.5.  Montando, Desmontando y Extrayendo

  Para montar un CD-ROM, inserte el disco en la unidad y ejecute el
  comando mount siendo root (asumo que ya ha creado el enlace simblico
  a su fichero de dispositivo, como recomendaba anteriormente, y que
  existe el directorio donde montarlo llamado /mnt/cdrom):

       mount -t iso9660 -r /dev/cdrom /mnt/cdrom

  Ahora ya puede acceder al CD, en el directorio /mnt/cdrom.

  El comando mount soporta ms opciones. Consulte la pgina mount(8) del
  manual.

  Puede aadir una lnea en archivo /etc/fstab para que el CD-ROM se
  monte automticamente al arrancar o para especificar los parmetros a
  emplear cuando se monte; consulte la pgina man fstab(5).

  Ojo: para reproducir CDs de audio, no monte la unidad.

  Para desmontar un CD-ROM, utilice el comando umount en modo root:

       umount /mnt/cdrom

  El disco podr ser desmontado nicamente si no hay ningn proceso
  accediendo a la unidad (lo que incluye el hecho de que el directorio
  en que se encuentre sea del CD-ROM). Entonces ya podr extraer el
  disco. Casi todas las unidades tienen un botn de extraccin; tambin
  hay un programa que realiza esta tarea. Se llama eject:
  ftp://sunsite.unc.edu/pub/Linux/utils/disk-
  management/eject-1.4.tar.gz.

  No intente extraer el disco mientras la unidad est montada (lo cual
  ser o no posible, dependiendo del tipo de unidad). Algunos
  controladores pueden extraer automticamente el CD-ROM cuando se
  desmonta, e introducir la bandeja cuando se monta. Esta caracterstica
  puede desactivarse a la hora de compilar el ncleo, o bien mediante
  los comandos adecuados.

  Es posible que no pueda montar ningn CD-ROM despus de haber
  reproducido un disco de audio. Debe antes enviar un comando "stop"
  mediante un programa reproductor de CDs. Esto slo parece ocurrir con
  el controlador SBPCD.

  Stephen Tweedie (sct@dcs.ed.ac.uk) ha escrito el paquete Supermount,
  para gestionar de manera transparente el montado de dispositivos
  extrables, incluyendo CD-ROM. Lo puede encontrar va ftp:
  ftp://sunsite.unc.edu/pub/Linux/patches/diskdrives/.

  4.6.  Problemillas

  Si despus de seguir las instrucciones detalladas, an tiene problemas
  con su unidad, es hora de hacer una serie de comprobaciones. Vienen
  descritas en orden creciente de complejidad. Si detecta fallos a la
  hora de realizar alguna de las comprobaciones, solucione ese problema
  antes de pasar a la siguiente.

  4.6.1.  Primero: Asegrese de haber arrancado con el ncleo recin
  compilado

  Puede verificar la fecha del ncleo para asegurarse de estar corriendo
  el ncleo que ha compilado con soporte para CD-ROM, con el comando
  uname:

  uname -a
  Linux fizzbin 2.0.18 #1 Fri Sep 6 10:10:54 EDT 1996 i586

       cat /proc/version
       Linux version 2.0.18 (root@fizzbin) (gcc version 2.7.2) #1 Fri Sep 6 10:10:54 EDT 1996

  Si ve que la fecha no coincide con la de construccin y compilacin
  del ncleo, es que todava esta corriendo la versin antigua. Seguro
  que ha reinicializado el sistema? Si utiliza LILO, lo ha reinstalado
  (ejecutando /sbin/lilo)? Si arranca desde un disco, ha creado un
  nuevo disco de arranque y lo ha estrenado?

  4.6.2.  ncleo.  Segundo: Compruebe que los controladores estn inclu
  idos en el

  Puede ver una lista de los controladores compilados en el archivo
  /proc/devices:

       cat /proc/devices
       Character devices:
        1 mem
        2 pty
        3 ttyp
        4 ttyS
        5 cua
        7 vcs

       Block devices:
        3 ide0
       22 ide1

  En primer lugar, busque el controlador de dispositivo de su CD-ROM: en
  la columna Block devices. En el ejemplo, vemos el controlador idecd
  cuyo nmero mayor es 22.

  Asegrese de que tambin ha compilado el soporte para el sistema de
  ficheros ISO-9660, leyendo el archivo /proc/filesystems:

       cat /proc/filesystems
               ext2
               msdos
       nodev   proc
               iso9660

  En el archivo /proc/ioports encontrar las direcciones (E/S) de los
  puertos utilizados por los controladores:

       cat /proc/ioports
        ...
       0230-0233 : sbpcd
        ...

  Si alguno de los controladores que Ud. crea haber compilado no
  aparece, es que algo ha ido mal durante el proceso de configuracin
  y/o construccin del ncleo. Tendr que comenzar de nuevo.

  4.6.3.  Tercero: Compruebe que el ncleo detecta la unidad durante el
  arranque

  Cercirese de que el CD-ROM fue detectado durante el proceso de
  arranque del ncleo. Debiera leer algn mensaje al respecto. Si los
  mensajes se suceden y salen de la pantalla, puede revisarlos con el
  comando dmesg:

       dmesg

  o

       tail /var/adm/messages

  Si la unidad no fue detectada, algo ha fallado... Houston :) Compruebe
  que est enchufada y que los cables estn bien conectados. Si dispone
  de jumpers para las direcciones, verifique sus posiciones (p.e.  drive
  0 si slo tiene una unidad). Los CD-ROM ATAPI deben tener los jumpers
  en modo "single" o "master", y nunca en "slave" cuando solamente hay
  un dispositivo IDE conectado a la interfase. Si la unidad funciona
  bajo DOS, es que no hay fallos en el hardware.

  Muchos controladores llevan a cabo auto-prueba, pero los hay que no.
  En cualquier caso, no es infalible. Tendr que utilizar la lnea de
  comandos detallada para su unidad. Puede que tenga que probar con
  muchos valores de direcciones de E/S si no est seguro. Se puede
  configurar LILO (es lo ms frecuente) para poder introducir los
  parmetros manualmente al arrancar.

  Otra posibilidad es que no est utilizando el controlador adecuado.
  Algunos manuales refieren sus interfases propietarias como IDE,
  induciendo al error de suponer que se trata de unidades ATAPI.

  Tambin es posible que su unidad (o la interfase de la tarjeta) sea
  una de esas del tipo "compatible" que precisa inicializarse con el
  controlador del DOS. Intntelo arrancando el DOS y cargando el
  controlador suministrado con la unidad. Luego, arranque Linux
  presionando Control-Alt-Suprimir.

  Si su unidad no es ninguna de las citadas, puede que no haya ningn
  controlador disponible bajo Linux. Para ms informacin al respecto,
  lea las Referencias que encontrar al final de este documento.

  4.6.4.  Cuarto: Compruebe si puede leer informacin desde la unidad

  Vamos a intentarlo. Los siguientes comandos deberan provocar el
  encendido de la lucecita de la unidad (si la hay, claro) y no debera
  haber mensajes de error. Utilice el fichero de dispositivo adecuado
  para su unidad y asegrese de haber insertado un CD;

  salga con Control-C.

       dd if=/dev/cdrom of=/dev/null bs=2048
       ^C
       124+0 records in
       124+0 records out

  Si ha funcionado, es que el ncleo se est comunicando con la unidad y
  puede pasar a la siguiente comprobacin.

  Si no, puede que haya algn error en el fichero de dispositivo.
  Asegrese de que ste se encuentra en el directorio /dev y que sus
  nmeros mayor y menor son correctos. Los permisos del fichero deben de
  estar fijados tanto para lectura como para escritura.

  Existe una posibilidad remota de fallo del hardware. Si es posible,
  evalela desde el DOS.

  4.6.5.  Quinto: Pruebe a montar un CD-ROM

  Si puede leer desde la unidad, pero no puede montarla, compruebe antes
  de nada que ha compilado el sistema de ficheros ISO-9660, leyendo el
  archivo /proc/filesystems, tal y como se ha descrito anteriormente.

  Ha de montar la unidad con los parmetros "-t iso9660" y la opcin
  "-r". El CD debe estar formateado con el sistema de ficheros ISO-9660.
  El montado de CDs ha de hacerse en siendo root.

  Compruebe que el directorio en el cual se monta la unidad existe.  Si
  monta la unidad durante el arranque, asegrese de que las
  instrucciones del archivo /etc/fstab son correctas.  Si ha cargado el
  demonio syslog, es probable que haya mensajes de error del ncleo que
  no ha visto.  Pruebe con "dmesg":

       dmesg
       SBPCD: sbpcd_open: no disk in drive

  Quizs hay algn mensaje de error en los ficheros en /var/adm/,
  dependiendo de cmo est configurado su sistema.
  4.6.6.  Problemas con el sonido

  Si la unidad funciona bien con CD-ROMs, pero no reproduce CDs de
  audio, aqu encontrar algunas de las soluciones posibles.  En primer
  lugar, necesitar un programa para la reproduccin de CDs de audio. Es
  posible que no todos los programas sean compatibles con su unidad.
  Pruebe con otra aplicacin, o intente recompilarla. Un buen sitio para
  buscar software es ftp://sunsite.unc.edu/pub/Linux/apps/sound/cdrom/.

  Unos pocos controladores no tienen soporte para audio. Compruebe el
  archivo README o el cdigo fuente para ver si se da el caso.

  Compruebe si se escucha el audio por medio de unos auriculares
  conectados a la salida externa de la unidad. Si se escucha, el
  problema est en la tarjeta de sonido. Con un programa mezclador
  (mixer) podr ajustar tanto la entrada como el volumen. Asegrese de
  que tiene instalado el cable de audio que conecta el CD-ROM con la
  tarjeta de sonido. Verifique el correcto funcionamiento del
  controlador de la tarjeta de sonido. Ms informacin al respecto en
  http://www.insflug.org/howtos/online/sonido/Sonido-Como.html.

  4.6.7.  Nada, Que sigue fallando...

  Si an tiene problemas, puede:

    releer meticulosamente el documento.

    consultar las referencias que hay al final de este escrito,
     especialmente las que se refieren a los archivos README de los
     fuentes del ncleo.

    enviar una pregunta a alguno de los grupos de noticias
     comp.os.linux, (en castellano es.comp.os.linux)

    enviar una pregunta a la Lista de Correo de Linux

    probar con la ltima versin del ncleo

    contactar con su distribuidor (del equipo)

    contactar con el distribuidor del CD-ROM

    enviar un mensaje al responsable del controlador del ncleo (busque
     en el archivo /usr/src/linux/MAINTAINERS)

    enviarme un mensaje

    cargar el Emacs y teclear Esc-x doctor :-)

  5.  Aplicaciones

  En esta seccin se describen brevemente algunas de las aplicaciones
  relacionadas con el CD-ROM que hay disponibles para Linux. Vea tambin
  el Mapa de Software de Linux (LSM).

  5.1.  Reproductores de CDs de Audio

  Hay muchos programas que sirven para la reproduccin de discos
  compactos, bien a travs de unos auriculares, o por la tarjeta de
  sonido.

     Workman
        reproductor en modo grfico bajo las X11 con soporte para base
        de datos de CDs y otras muchas caractersticas.

     WorkBone
        reproductor interactivo en modo texto

     xcdplayer
        sencillo reproductor basado en las X11

     cdplayer
        sencillo reproductor desde la lnea de comandos

     Xmcd
        reproductor basado en las X11 y Motif

     xmitsumi
        otro reproductor basado en las X11 para unidades Mitsumi

     xplaycd
        otro reproductor basado en las X11, con utilidades de mezcla y
        control de volumen

     cdtool
        reproductor de CDs desde la lnea de comandos

  Alguno de estos programas vienen diseados para utilizar algn fichero
  de dispositivo concreto (p.e. /dev/cdrom). Deber introducir el
  adecuado como parmetro, o bien crear un enlace simblico en el
  directorio /dev. Si la salida se realiza desde el CDROM a una tarjeta
  de sonido, quizs quiera usar un programa mezclador para ajustar el
  volumen y seleccionar la entrada del CDROM cuando desee grabar.

  5.2.  PhotoCD

  Los PhotoCD emplean el sistema ISO-9660. Los archivos de imgenes
  vienen en formato propietario. No todos los lectores de CDROM soportan
  la lectura de PhotoCD.

  hpcdtoppm es un programa escrito por Hadmut Danisch para la conversin
  de archivos de PhotoCD a mapa de pixels (pixmap). Se encuentra
  disponible va ftp en ftp://ftp.gwdg.de/pub/linux/hpcdtoppm o bien
  includo en el paquete de utilidades PBM (Portable Bit Map) ,
  disponible en muchos bancos de archivos (bsquelo por "pbm" o
  "netpbm").

  photocd, un programa de Gerd Knorr, kraxel@cs.tu-berlin.de para la
  conversin de PhotoCDs en archivos de mapa de bits: Targa, Windows y
  OS/2.

  Del mismo autor es el programa xpcd, basado en las X11, diseado para
  la gestin de imgenes de PhotoCD. Vd. puede seleccionar las imgenes
  con el ratn, hacer previsualizaciones en una pequea ventana y cargar
  la imagen en alguna de las cinco resoluciones posibles. Tambin puede
  cargar un determinado rea de la imagen: ftp://ftp.cs.tu-
  berlin.de/pub/linux/Local/misc/.

  ImageMagick permite la manipulacin de archivos de imgenes, tambin
  soporta el formato PhotoCD. Lo puede encontrar va ftp
  ftp://ftp.x.org/contrib/applications/ImageMagick/.

  5.3.  mkisofs

  Con el paquete mkisofs, de Eric Youngdale's, podr crear una particin
  del disco duro con el sistema de ficheros ISO-9660. Ello puede serle
  de gran utilidad a la hora de desarrollar y verificar sistemas de
  archivos de CD-ROM antes de hacer los masters.

  Las utilidades para la escritura de CD-ROM suelen ser suministradas
  por el fabricante. El proceso de escritura tiene que realizarse sin
  que haya interrupciones, caracterstica para la cual un sistema
  multitarea como Linux est particularmente bien dotado.

  5.4.  Utilidades ISO-9660

  Aqu encontrara algunas utilidades para la verificacin del sistema de
  ficheros ISO-9660 en discos formateados. Le ser de gran inters a la
  hora de hacer comprobaciones de CDs que puedan estar defectuosos.
  Puede conseguir el paquete va ftp ftp://ftp.cdrom.com/pub/cdrom/ptf/.
  Est escrito por Bill Siegmund y Rich Morin.

  6.  Respuestas a las Preguntas de Uso ms Frecuente (PUFs)

  6.1.  Cmo hacer que cualquier usuario (no root) pueda montar y
  desmontar los CDs?

  Prcticamente todos los comandos mount soportan la opcin user.
  Introduciendo una lnea como la que sigue en el fichero /etc/fstab:

       /dev/sbpcd  /mnt/cdrom   iso9660     user,noauto,ro

  manera:

       mount /mnt/cdrom
       umount /mnt/cdrom

  El disco, por razones de seguridad, ser montado con algunas
  limitaciones (p.e. los programas no podrn ser ejecutados, los
  archivos de dispositivo se ignorarn...); esto puede resultar
  demasiado restrictivo en algunos casos.

  Otra opcin es conseguir el paquete usermount, que habilita para los
  usuarios normales el montado y desmontado de dispositivos extrables,
  tales como discos y CDROM, pero que restringe el acceso a otros (como
  las particiones del disco duro). Se puede encontrar en casi todos los
  bancos de archivos.

  En ftp://ftp.cdrom.com se halla el cdigo fuente mount.c, que permite
  el montado y desmontado de CD-ROM (nicamente) por usuarios normales.

  6.2.  de desmontar el CD-ROM?  Por qu obtengo "device is busy (dis
  positivo ocupado)" a la hora

  Un disco no puede ser desmontado mientras haya algn proceso
  accediendo a la unidad, lo que incluye el hecho de que nos encontremos
  en alguno de los directorios asignados a la misma. Si no puede
  identificar el proceso que la esta usando, puede emplear el comando
  fuser, tal y como se muestra a continuacin:

       umount /cdrom
       umount: /dev/hdd: device is busy
       fuser -v /cdrom
                            USER       PID ACCESS COMMAND
       /mnt/cdrom           tranter    133 ..c..  bash

  6.3.  Cmo puedo exportar un CD-ROM a otra mquina va NFS?

  Para ello es preciso aadir una lnea al archivo /etc/exports.  Para
  ms detalles, consulte la pgina man exports(5).

  6.4.  Es posible arrancar Linux desde un CD-ROM?

  Para instalar Linux, el mtodo ms comn es utilizar un disco de
  arranque.  Algunas distribuciones vienen preparadas para arrancar el
  ncleo de Linux utilizando un CDROM directamente desde el DOS.

  Michael Fulbright (msf@redhat.com) explica cmo, con un CDROM, la ROM-
  BIOS y una unidad ATAPI es posible arrancar directamente desde el CD.
  La ltima version de mkisofs tambin soporta la creacin de dichos
  CDRoms.  Para ello, se ha tenido que aadir una serie parches para
  soportar el estndar de discos de arranque El Torito.

  6.5.  Cmo puedo leer la informacin digital de un CD-Audio?

  Heiko Eissfeldt (heiko@colossus..escape.de) y Olaf Kindel han escrito
  una utilidad que lee y graba los datos de audio archivos de formato
  encuentra en sunsite.unc.edu.

  A consecuencia del rpido desarrollo que estn experimentando las
  unidades de CD-ROM, es casi imposible hacer una lista completa de los
  modelos que soportan la extraccin digital de audio. Lo mejor ser que
  consiga la ltima versin de paquete cdda2wav y lea la documentacin.

  Para ms informacin al respecto, visite la pgina web
  http://www.tardis.ed.ac.uk/~psyche/cdda/ y las FAQ de alt.cdrom
  (seccin de Referencias).
  6.6.  Por que el comando find  no funciona correctamente?

  Al utilizar discos formateados con el sistema ISO-9660, pero que
  carecen de las Extensiones Rock Ridge, hay que aadir la opcin
  -noleaf al comando find.  Consulte la pgina del manual find(1) para
  ms detalles.

  (Hoy en da todos los CDs de Linux emplean las Extensiones Rock Ridge,
  por lo que este problema se plantear raras veces.)

  6.7.  Soporta Linux alguna unidad grabadora de CD-ROM?

  El paquete X-CD-Roast es una aplicacin grfica diseada para la
  utilizacin de grabadoras de CD-ROM bajo Linux. Se puede encontrar en
  ftp://sunsite.unc.edu/pub/Linux/utils/disk-
  management/xcdroast-0.95.tar.gz

  Consulte tambin el CD-Writing HOWTO, que est disponible en
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/CD-Writing.html 
  http://sunsite.unc.edu/LDP/HOWTO/CD-Writing.html.

  6.8.  ficheros de solo-lectura)" al montar un CD-ROM?  Por qu
  obtengo " mount: Read-only file system  (sistema de

  El CD-ROM es un medio de almacenamiento de slo-lectura. Con alguno de
  los ncleos ms antiguos se poda montar CDROM para lectura/escritura;
  los intentos de escribir datos en el CDROM eran ignorados. Esto ha
  sido corregido a partir del ncleo 1.1.33, con el que los CDROM han de
  montarse como de slo-lectura (con la opcin -r del comando mount).

  6.9.  Por qu se abre la bandeja de la unidad cuando apago el sis
  tema?

  A partir de la versin 1.1.38 del ncleo, el controlador sbpcd realiza
  automticamente la extraccin del CD al ser desmontado. Al apagar el
  sistema, se desmonta el CD, lo que provoca su extraccin. Esta
  caracterstica resulta de utilidad a la hora de cambiar los CDs. Si la
  bandeja est abierta, cuando monte un CD se cerrar automticamente.

  He comprobado que esto ocasiona algunos problemas al utilizar algunos
  programas (p.ej. el cdplay y el workbone). A partir del ncleo 1.1.60
  es posible controlar dicha caracterstica por medio de software. Un
  programa de ejemplo viene includo con el archivo de documentacin del
  sbpcd (o tambin puede usar el programa
  ftp://sunsite.unc.edu/pub/Linux/utils/disk-
  management/eject-1.4.tar.gz.

  6.10.  Tengo un CD "quiquilloso" que no consigo montar

  Ese disco ``quisquilloso'' seguramente sea un disco XA (como todos los
  PhotoCD y los ``one-offs'' generados con unidades CD-R). La mayor
  parte de los controladores del ncleo no soportan discos XA, pero
  seguramente podr encontrar algn parche para aadir dicho soporte en
  alguno de los mltiples bancos de archivos. El sbpcd s que soporta
  discos XA. Si utiliza dicho controlador, podr comprobar si el disco
  es efectivamente XA, de la siguiente manera: Edite el fichero sbpcd y
  active la visualizacin de la "Tabla de Contenidos" (Table of
  Contents) (TOC).  Compile, instale y arranque de nuevo el ncleo.
  Ahora, cada vez que monte un disco, podr leer la informacin de la
  Tabla de Contenidos (bien en la pantalla o en un fichero log). Si el
  primer valor que aparece en la primera linea es un "20", quiere decir
  que se trata de un disco XA. Dicho valor sera "00" cuando monte discos
  normales. Si en la Tabla de Contenidos hay varias pistas, significa
  tambin que se trata de un disco XA.

  (gracias a Eberhard Moenkeberg por esta informacin)

  Otras posibilidades que pueden imposibilitar la lectura de CDs:

  1. El disco no utiliza el sistema de ficheros ISO-9660 (p.e. algunos
     utilizan SunOS o HFS)

  2. Se trata de un CD-Audio

  3. El CD esta daado o es defectuoso

  4. Lo ha insertado del revs :-)

  6.11.  Funcionan bajo Linux las unidades de CD-ROM multi-disco?

  Hay much*s usuarios satisfech*s del funcionamiento de las
  intercambiadoras de CD-ROM multi-disco SCSI. Es probable que deba
  activar la opcin "Probe all LUNs on each SCSI device" durante la
  configuracin del ncleo. Al menos un usuario ha tenido que
  incrementar el valor SCSI timeout en el controlador del ncleo. Las
  intercambiadoras Nakamichi MBR-7 de 7 discos y la Pioneer de 12 discos
  funcionan correctamente.  Tambin estn soportadas las
  intercambiadoras multi-disco EIDE/ATAPI. El soporte implementado para
  algunas unidades (utilizando la funcin CDROM_SELECT_DISC ioctl) con
  el ncleo 2.0 resulta un tanto rudimentario. En el archivo de
  documentacin del controlador del ncleo IDE-CD viene includo el
  cdigo fuente de un programa para seleccionar el plato, o tambin
  puede utilizar una versin reciente del programa eject, descrito
  anteriormente.

  6.12.  Obtengo " /cdrom: Permission denied "

  Algunos CDs poseen archivos que se encuentran en directorios cuyo
  permiso de lectura est restringido al modo root. Algo as ocurra con
  la edicin de InfoMagic de Marzo de 1995.

  El siguiente parche, cortesa de Christoph Lameter
  (clameter@waterf.org) permite solventar el problema.

       From: clameter@waterf.org (Christoph Lameter)
       Newsgroups: comp.os.linux.setup
       Subject: InfoMagic Developers Set: Fix for CD-ROM permissions
       Date: 12 Apr 1995 20:32:03 -0700
       Organization: The Water Fountain - Mining for streams of Living Water
       NNTP-Posting-Host: waterf.org
       X-Newsreader: TIN [version 1.2 PL2]

  En la edicin de InfoMagic Developers CD-ROM Set de Marzo de 1995 se
  plantean una serie de problemas con la informacin almacenada en
  directorios cuyos permisos quedan restringidos al root.

  1. En el Disco1 los valores de propietario/grupo estn fijados con los
     valores 5101/51 y tienen permiso de escritura (?)

  2. El Disco2 y 3 vienen con permisos rwx para root y ningn permiso
     para grupo/usuario. Slo como root es posible acceder a ellos! Yo
     mantengo una BBS y necesito tenerlos disponibles para otr*s.

  Hay varias soluciones. El problema estriba en que, por lo comn, estos
  arreglos cambian los permisos de todos los directorios del CD. El
  parche que viene a continuacin slo cambia los permisos para el
  directorio root del CD-ROM. Si quiere hacer correr partes de Linux
  directamente desde el CD-ROM, probablemente se vea en un aprieto tanto
  si todos los directorios pueden ser accedidos para lectura por todos
  los usuarios como si son propiedad del root.

  Con este parche, los permisos del directorio root quedarn fijados
  como r-xr-xr-x, y los valores de propietario/grupo sern los indicados
  a travs de las opciones uid y gid del comando mount.

  Para aplicarlo:

        cd /usr/src/linux/fs/isofs
        patch < parche

  dependiendo de su versin del ncleo).

  Este es el fichero parche:

       --- inode.c.ORIG        Wed Apr 12 17:24:36 1995
       +++ inode.c     Wed Apr 12 17:59:12 1995
       @@ -552,7 +552,15 @@
           numeros de la estructura de inodos */

               if (!high_sierra)
       -         parse_rock_ridge_inode(raw_inode, inode);
       +       {  parse_rock_ridge_inode(raw_inode, inode);
       +           /*comprobacion de los permisos de acceso de propietario CL al directorio root*/
       +          if((inode->i_sb->u.isofs_sb.s_firstdatazone) == inode->i_ino)
       +           { /*sustitucion de los permisos de propietario por los introducidos mediante el comando mount*/
       +             inode->i_uid = inode->i_sb->u.isofs_sb.s_uid;
       +             inode->i_gid = inode->i_sb->u.isofs_sb.s_gid;
       +            inode->i_mode = S_IRUGO | S_IXUGO | S_IFDIR;
       +           }
       +        }

        #ifdef DEBUG
               printk("Inode: %x extent: %x\n",inode->i_ino, inode->u.isofs_i.i_first_extent);
       @@ -805,4 +813,3 @@
        }

        #endif
       -

  Tenga en cuenta que este parche es algo antiguo y probablemente no
  podr aplicarse tal cual a versiones ms recientes del ncleo (a
  partir de la 2.0). Consulte tambin la seccin referente a los
  ficheros ocultos.

  6.13.  al CD IDE?  Cmo he de interpretar los mensajes de error del
  ncleo referentes

  Qu significa cuando obtengo un mensaje del controlado IDE de la
  manera hdxx: code: xx key: x asc: xx ascq: x?

  Se trata de un mensaje de status/error de la unidad IDE. Por defecto
  el controlador IDECD enva a una salida las informaciones, en vez de
  gastar espacio del ncleo con mensajes de error. Esto puede cambiarse,
  para poder visualizar los mensajes de error directamente, editando el
  archivo /usr/src/linux/drivers/block/ide-cd.c, cambiando el valor de
  VERBOSE_IDE_CD_ERRORS a 1, y recompilando el ncleo.

  6.14.  Cmo puedo comprobar la velocidad de mi CD-ROM?

  He aqu un mtodo. Estas instrucciones miden el tiempo que se tardan
  en leer 1500K desde el CD:

       time -p dd if=/dev/cdrom of=/dev/null bs=1k count=1500
       1500+0 records in
       1500+0 records out
       real 5.24
       user 0.03
       sys 5.07

  El rango de transferencia a velocidad sencilla es de 150kb/segundo,
  osea, que tardar unos 10 segundos. A doble velocidad, tardar 5
  segundos; a cudruple, 2.5 segundos...etc

  El valor ms fiable es el de "real", que en nuestro ejemplo indica una
  unidad de doble velocidad. Vd puede incrementar la cantidad de datos
  transferidos para as obtener un valor ms exacto (los datos no se
  almacenan). Lo mejor sera ejecutar varias veces el comando y, a
  continuacin, hallar la media.

  6.15.  Linux Mi CD-ROM dej de funcionar despus de completar la
  instalacin de

  Lo ms seguro es que el disco de arranque utilizado para instalar
  Linux haya reconocido su unidad de CD-ROM. Pero una vez terminado el
  proceso de instalacin en el disco duro o en floppy y tras
  reinicializar el ordenador, el CD-ROM deja de ser reconocido.

  Esto suele ser debido a que, con algunas distribuciones de Linux, el
  ncleo que se instala en el disco duro o floppy no es necesariamente
  el mismo del disco de arranque. Vd seleccion un disco de arranque
  adecuado al hardware de su CD-ROM, mientras que el ncleo que acaba de
  instalar es un ncleo "genrico" sin soporte para CD-ROM. Puede
  comprobarlo siguiendo los pasos detallados en la seccin ``'' (p.e.
  empiece comprobando el archivo /proc/devices).
  La solucin pasa por recompilar el ncleo, asegurarse de incluir los
  controladores necesarios para su unidad y todo lo dems (p.e.
  controlador SCSI, sistema de ficheros ISO-9660). Consulte
  http://www.insflug.org/howtos/online/kernel/Kernel-Como.html.

  Si ha pasado alguna opcin desde la lnea de comandos al disco de
  arranque (boot disk) (p.e. "hdc=cdrom"), deber aadirla a su fichero
  de configuracin de arranque (/etc/lilo.conf).

  6.16.  No puedo leer los ficheros ocultos

  Algunos CDs tienen archivos que estn determinados como ``ocultos''.
  Normalmente, no son visibles. Si monta el CD-ROM con la opcin
  ``unhide'', deberan de hacerse accesibles (esto parece no estar
  documentado en lugar alguno).

  6.17.  Dnde se encuentra la documentacin de la API del CDROM?

  Si pretende escribir su propia aplicacin, p.e. un reproductor de CDs,
  necesitar entender la API (Interfase para la Programacin de
  Aplicaciones) del Linux.

  En un principio, los controladores de CD-ROM usaban sus propias
  funciones ioctl() para dar soporte a las caractersticas especficas
  de cada unidad.

  Esto se describe en los archivos de cabecera, p.e. en
  /usr/include/linux/sbpcd.h. Puesto que muchos controladores estaban
  basados en otros controladores, las interfases, aunque no idnticas,
  s tenan mucho que ver.

  Recientemente ha surgido una iniciativa encabezada por David van
  Leeuwen (david@tm.tno.nl) dirigida a la estandarizacin de la API de
  las unidades de CDROM. Se trata de asegurar el que todos los
  controladores presenten el mismo comportamiento. Esto se detalla en el
  archivo /usr/src/linux/Documentation/cdrom/cdrom-standard.tex.  Muchos
  controladores del ncleo ya lo soportan. Se espera que para futuras
  versiones del ncleo (3.0?) todos los controladores de CDROM empleen
  la API estndar.

  En mi libro, Linux Multimedia Guide (Guia Linux Multimedia), entro en
  detalle acerca de la programacin de unidades de CDROM, especialmente
  de cara a las funciones de audio. Vea la seccin ``''.

  6.18.  Por qu no leo los nombres de fichero largos de este CDROM de
  Windows?

  Si tiene un CDROM con nombres de fichero largos bajo Windows, pero no
  bajo Linux, es que ha sido formateado empleando el sistema de ficheros
  Joliet, sistema propietario de Microsoft. Siga leyendo.

  6.19.  Es soportado el sistema de ficheros de Microsoft Joliet?

  Microsoft ha creado una extensin del formato ISO-9660 llamada Joliet.
  A la hora de escribir este documento, el soporte para Joliet se
  encuentra bastante avanzado y los parches se pueden obtener en
  http://www-plateau.cs.berkeley.edu/people/chaffee/joliet.html o
  ftp://www-plateau.cs.berkeley.edu/pub/multimedia/linux/joliet/.
  7.  Referencias

  Ya he mencionado los archivos README, que suelen venir instalados en
  el directorio /usr/src/linux/Documentation/cdrom. Son un tesoro de
  informacin!

  Las FAQs de los siguientes grupos de usenet se envan peridicamente a
  news.answers y son archivadas en diversos servidores de ftp, p.e.
  ftp://rtfm.mit.edu/:

    alt.cd-rom FAQ

    comp.periphs.scsi FAQ

    Enhanced IDE/Fast-ATA/ATA-2 FAQ

  En otros HOWTOs tambin encontrara informacin relacionada con el CD-
  ROM:

    http://sunsite.unc.edu/LDP/HOWTO/SCSI-HOWTO.html

    http://sunsite.unc.edu/LDP/HOWTO/Hardware-HOWTO.html

    http://www.insflug.org/howtos/online/Sonido-Como.html

    http://www.influg.org/howtos/online/Kernel-Como.html

    http://sunsite.unc.edu/LDP/HOWTO/Distribution-HOWTO.html

    http://sunsite.unc.edu/LDP/HOWTO/CD-Writing.html

  Hay ms de una docena de compaas que venden distribuciones de Linux
  en CD-ROM; casi todas se encuentran referidas en el Distribution-
  HOWTO.

  Los siguientes grupos de noticias se ocupan de temas relacionados con
  el CD-ROM:

    comp.publish.cdrom.hardware

    comp.publish.cdrom.multimedia

    comp.publish.cdrom.software

    comp.sys.ibm.pc.hardware.cd-rom

    alt.cd-rom

    alt.cd-rom.reviews

  Los grupos de noticias comp.os.linux, (junto con su homnima en
  castellano, es.comp.os.linux) tambin son una valiosa fuente de
  informacin.

  Existe un gran archivo de software e informacin relacionada con el
  CD-ROM en ftp://ftp.cdrom.com/pub/cdrom/.

  Hay un documento con las FAQ para unidades IDE y ATAPI en
  ftp://rtfm.mit.edu/pub/usenet/news.answers/pc-hardware-faq/enhanced-
  IDE/ y en http://www.seagate.com/techsuppt/faq/faqlist.html.

  Western Digital, la compaa precursora del protocolo IDE, ofrece
  informacin sobre dicho protocolo en su FTP:
  ftp://fission.dt.wdc.com/pub/standards/atapi.

  Pgina Web dedicada a multimedia:
  http://viswiz.gmd.de/MultimediaInfo/. Creative Labs tiene su Web en
  http://www.creaf.com/.

  El Proyecto de Documentacin de Linux ha dado como fruto muchos libros
  sobre Linux, como la Linux Installation and Getting Started.  Puede
  conseguirlos va FTP, o tambin comprarlos impresos. La traduccin al
  castellano de los mismos est en http://www.infor.es/LUCAS.

  El Mapa de Software para Linux (Linux Software Map) (LSM) es una
  referencia de mximo inters: p.e.
  ftp://sunsite.unc.edu/pub/Linux/docs/LSM/.

  Las listas de correo de linux tienen muchos canales dedicados a
  diferentes temas. Para averiguar cmo subscribirse, enve un e-mail
  con la palabra "help" en el cuerpo del mensaje a
  majordomo@vger.rutgers.edu (Nota: a la hora de escribir este
  documento, las listas de correo estaban muy sobrecargadas, y
  pendientes de reeestructuracin).

  Consejo final: Si desea aprender mucho ms sobre multimedia bajo Linux
  (en concreto sobre aplicaciones y programacin del CD-ROM y la tarjeta
  de sonido), consulte mi libro Linux Multimedia Guide, ISBN
  1-56592-219-0, publicado por la firma O'Reilly and Associates.

  Se encuentran impresas tanto la versin original en Ingls, como las
  traducciones al Francs y Japons. Para ms detalles, puede telefonear
  al 800-998-9938 de Norte Amrica, consultar la pagina Web
  http://www.ora.com/catalog/multilinux/noframes.html o tambin mi
  pgina personal http://www.pobox.com/~tranter/.

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Impresin Como
  Grant Taylor gtaylor@cs.tufts.edu y Brian McCauley
  (B.A.McCauley@bham.ac.uk
  Traduccin: Francisco Escarpa escarpa@impronta.es

  Una gua de cmo imprimir y ver documentos bajo el sistema operativo
  Linux.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Preprense los impacientes.

  3.      Puertos y dispositivos

  4.      LPR

  4.1.    Qu necesita?

  4.2.    Cmo imprimir con Linux?

  4.3.    Impresin remota e impresin local.

  4.4.    Los programas importantes

  4.4.1.  La orden lpr

  4.4.2.  La orden lpq

  4.4.3.  La orden lprm

  4.4.4.  la orden lpc

  4.5.    Los directorios fundamentales.

  4.5.1.  Y sus correspondientes ficheros.

  4.6.    /etc/printcap

  4.6.1.  Los campos de /etc/printcap .

  4.6.2.  Probemos /etc/printcap  con un ejemplo

  4.6.3.  Valor y al toro: juntmoslo todo

  4.6.4.  Y de la impresin remota, qu?

  4.6.5.  Socorro: no funciona.

  4.6.6.  Dnde puedo encontrar un printcap  para la impresora xxxxx?

  4.6.7.  El "efecto escalera", bajo control.

  4.6.8.  Imprimir por el puerto serie es fcil.

  4.6.9.  cat  funciona, pero lpd  no.

  4.6.10. Impresoras que no son dispositivos simples.

  4.7.    Trucos y problemas

  4.7.1.  lpr -i  o como modificar la impresin a nuestro antojo.

  4.7.2.  ' lpc ' y ' lpq ' advierten : " missing daemons "

  4.7.3.  Impresin sobre red (notas adicionales)

  4.8.    Los filtros de impresin

  4.8.1.  Los filtros de salida

  4.8.2.  Depuracin de filtros

  4.8.3.  Filtros Mgicos

  4.8.4.  Los usuarios de HP estamos de suerte

  5.      CMO SE IMPRIME ... ?

  5.1.    Texto Llano

  5.1.1.  pr

  5.2.    PostScript

  5.2.1.  Ghostscript

  5.3.    Mi impresora slo trabaja con PostScript

  5.3.1.  mpage

  5.3.2.  a2ps, enscript, nenscript

  5.3.3.  gslp

  5.3.4.  Utilidades para PostScript

  5.4.    TeX, LaTeX

  5.4.1.  dvips

  5.4.2.  eps, dvilj, dvi500

  5.5.    texinfo

  5.6.    *roff ; pginas man

  5.7.    Adobe Acrobat. Ficheros PDF

  5.8.    Tipos

  5.9.    Documentos para fax.

  5.9.1.  FLEXFAX

  5.9.2.  mgetty+sendfax

  5.9.3.  EFAX

  6.      Visualizacin

  6.1.    Con X-Window instalado

  6.1.1.  ghostview

  6.1.2.  gspreview

  6.1.3.  xdvi y xtex

  6.2.    Y si no tengo instalado X Window ?

  6.2.1.  Ghostscript, de nuevo

  6.2.2.  dvgt

  7.      Copyright

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Esta es la versin espaola del Printing-HOWTO de Linux. ste
  documento forma parte de la segunda generacin de linux FAQ (-- Nota
  del Revisor El Linux-FAQ original devino en una bestia inmanejable,
  por lo que se cambi el esquema y se fraccion en secciones
  independientes para cada aspecto del sistema operativo.

  Este COMO en particular trata de cmo administrar los distintos
  aspectos de impresin bajo Linux, configurar impresoras, instalar
  aplicaciones para hacerlas funcionar...  Originalmente escrito por
  Grant Taylor gtaylor@cs.tufts.edu), posteriormente incorpor el lpd-
  FAQ de Brian McCauley (B.A.McCauley@bham.ac.uk).

  Otros COMOs detallan aspectos acerca de la conexin en red.... Aunque
  pueden encontrarse estos documentos en los lugares ms insospechados,
  su "domicilio" oficial es:

  ftp://sunsite.unc.edu/pub/linux/docs/Howto (-- Igualmente, la mayora
  de los mirrors de Sunsite contendrn las traducciones de los COMO, en
  su directorio
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/es--)

  (busque mejor en los Mirrors.  Sunsite es una playa muy concurrida)
  Junto con el resto de los FAQ de usenet, podemos encontrarlos en
  ftp://rtfm.mit.edu

  Enven los comentarios, errores detectados y sugerencias a Brian y
  Grant a printing@god.ext.tufts.edu (versin en ingls) o a Francisco
  Escarpa para la traduccin espaola (escarpa@impronta.es ).

  Les rogamos que nos comuniquen cualquier nuevo programa, fichero, ...
  que conozcan y no figure en este documento.

  Grant ha configurado un servidor de correo centrado en la impresin y
  visualizacin bajo Linux, incluyendo la ltima versin de este
  documento (en ingls). Para acceder, enve un mensaje de correo
  electrnico a listserv@god.ext.tufts.edu, con el cuerpo de mensaje
  'INFO'. Recibir como respuesta una lista de los ficheros disponibles.
  Si el cuerpo del mensaje es 'get fich1 [fich2 fich3]', recibir una
  copia de los ficheros pedidos.

  Para esta traduccin se ha reelaborado ligeramente el documento
  original, eliminado repeticiones, reducido los detalles particulares
  de cada programa al mnimo imprescindible, remitiendo al lector a la
  documentacin correspondiente, y aadiendo alguna pequea novedad
  conocida.  Agradeceremos las sugerencias, notificacin de errores y
  dems.

  2.  Preprense los impacientes.

  Usted ya conoce UNIX, y ya tiene configurado el sistema (o se lo han
  configurado) y desea con toda urgencia imprimir: Hgalo con la orden:

       lpr fichero

  y por su impresora saldrn las tan ansiadas pginas. Si no funciona,
  lea de cabo a rabo este documento.

  3.  Puertos y dispositivos

  Como es sabido, Unix mapea los dispositivos sobre el sistema de
  ficheros; as, cada puerto fsico est reflejado en un fichero,
  generalmente bajo /dev, sobre el que se ejecutan las operaciones de
  e/s.

  En un sistema de bus tipo AT, comn a todos los PC actuales, el puerto
  LPT1 equivale en Linux al fichero de dispositivo /dev/lp1 y sucesivos.

  Precisando:

              Nombre        Mayor        Menor         Direccion E/S

              lp0           6            0             0x3bc

              lp1           6            1             0x378

              lp2           6            2             0x278

  Del mismo modo, los puertos COM se controlan a travs de los
  dispositivos ttyS* (Consulte el Serie-Como, en http://www.insflug.org
  para ms informacin)

  Utilice los dispositivos /dev/ttyS? (o /dev/ttys? si lo prefiere) para
  conectar una impresora por lnea serie. No utilice /dev/cua?.

  En algunos sistemas, puede haber enlaces simblicos hacia estos
  dispositivos, como /dev/lpr -> /dev/lp1, o /dev/impserie ->
  /dev/ttyS0. Hay a quien le parece muy elegante, y quien lo considera
  de psima praxis. (lea la pgina man 'ln' para ms informacin ).

  Recuerde que NO puede simultneamente tener soporte para impresora y
  para comunicaciones va puerto paralelo (conectarse con plip, o un
  disco ZIP paralelo, por ejemplo); si necesita ambas funcionalidades es
  una buena idea recompilar el kernel, y preparar el soporte de
  impresin y de comunicaciones como mdulos independientes, que se
  cargarn en el kernel cuando sea necesario.

  4.  LPR

  Todo sistema que se precie es capaz de gestionar una o varias
  impresoras, con uno o varios usuarios, que les envan distintas clases
  de documentos, ms o menos dignamente.
  Unix resuelve estos problemas mediante un conjunto de programas, los
  servidores de impresin, que gestionan los trabajos pendientes, y los
  encauzan a las impresoras adecuadas, todo de manera completamente
  transparente al usuario.

  Hay dos familias de servicios de impresin: "lp" en UNIX System V
  (AT&T), y "lpr", en los U*X BSD, y Linux. En este documento slo se
  hablar del segundo sistema; el sistema lp no es de dominio publico, y
  no conocemos ninguna versin que lo sea; de todos modos, ambos tienen
  hoy da la misma funcionalidad.

  Una variante muy prometedora de lpr, LPRng, obvia toda una serie de
  limitaciones del lpr original. Nos limitaremos a mencionar las
  diferencias en los captulos concretos.

  Dicen los que saben que lp es ms robusto, pero a la hora de trabajar
  en red lpr se destaca por varios cuerpos.

  4.1.  Qu necesita?

  Asumimos que usted sabe cmo editar un archivo de texto bajo Linux, y
  tiene los conocimientos bsicos sobre permisos y propiedad de
  archivos.

  Tambin suponemos que su sistema Linux funciona sin tropiezos. Si
  desea imprimir en mquinas remotas, deber adems tener configurado y
  funcionando el soporte de red (vea en NET-3-HOWTO (-- N. del Revisor:
  ver seccin ``''--) ).

  Revise las pginas de manual de los comandos chmod y chown para ms
  informacin.

  4.2.  Cmo imprimir con Linux?

  El camino ms corto en UNIX (y bajo Linux), es enviar los datos a
  imprimir directamente al dispositivo adecuado. El siguiente comando
  enva un listado del directorio a la primera impresora en paralelo
  (hablando en DOS, LPT1:):

              ls > /dev/lp1

  El problema de este mtodo es que no aprovecha las capacidades de
  multitarea de Linux, debido a que el tiempo que tarda el comando en
  completarse ser el mismo que emplee la impresora en despachar el
  trabajo.

  En una impresora lenta, o en una apagada o sin papel, puede
  prolongarse un poco. Podramos ejecutar el comando simplemente en
  segundo plano, pero no adelantaramos mucho. Adems, deber tener
  privilegios de superusuario.

  Un remedio mejor es crear un rea tampn (spool), es decir, guardar
  los datos a imprimir en un fichero temporal, y arrancar un proceso en
  segundo plano que enve los datos a la impresora, y gestione las
  incidencias que se presenten.

  Esencialmente, as funciona Linux. Para cada impresora, se define un
  rea tampn, donde cada trabajo pendiente se almacena en un fichero.
  Un proceso en segundo plano (llamado el demonio de impresin) analiza
  metdica y constantemente los ficheros tampn, buscando nuevos datos a
  imprimir.  Cuando aparece alguno, son enviados a la impresora
  apropiada; cuando ms de un fichero est a la espera, se colocan en
  una cola (el primero que entra es el primero que se procesa), por lo
  que se habla propiamente de la "cola de impresin".

  En el caso de impresin remota, los trabajos se gestionan localmente,
  como cualquier otro, pero el demonio de impresin lo enva a travs de
  la red hacia el ordenador o impresora destino.

  La informacin que el demonio de impresin necesita para su trabajo
  (el dispositivo fsico, el tampn de datos, la mquina e impresora
  remota ...)  se almacenan en un fichero llamado "printcap", que
  describiremos ms tarde.

  En lo sucesivo, el trmino "impresora" se referir a una mquina
  lgica definida en /etc/printcap. El concepto "impresora fsica" o
  "trasto", define la cosa que mancha papel. Es perfectamente posible
  describir mltiples entradas en /etc/printcap que se refieren a un
  slo trasto, pero por caminos tortuosos. No se preocupe, lo
  aclararemos al describir printcap.

  4.3.  Impresin remota e impresin local.

  La impresin remota nos permite enviar trabajos de impresin desde una
  mquina, hacia otra (ordenador/impresora) conectada a una red; por
  ejemplo, nuestro equipo funciona de servidor en una red, o si una
  impresora asignada a nuestra mquina debe ser accesible por otros
  ordenadores.

  Imprimimos localmente cuando usuarios de nuestra mquina envan
  trabajos a una impresora conectada directamente a la misma.

  4.4.  Los programas importantes

  El sistema de impresin de Linux se sustenta en cinco programas, que
  deberan estar donde aparecen en el siguiente listado, propiedad de
  root, y grupo lp (o daemon, segn el sistema en concreto):

              -rwxr-xr-x          root          lp            /bin/lpr

              -rwxr-xr-x          root          lp            /bin/lpq

              -rwxr-xr-x          root          lp            /bin/lpc

              -rwxr-xr-x          root          lp            /bin/lprm

              -rwxr-x---         root          lp            /sbin/lpd

  Los cuatro primeros tienen por fin enviar, cancelar y examinar los
  trabajos de impresin. /sbin/lpd es el demonio de impresin.

  OJO: Los directorios, permisos y propiedad de los ficheros pueden
  diferir a los de su sistema, aunque no deberan ser MUY distintos.
  Hay pginas de manual que explican con detalle todas estas rdenes y
  que debera consultar para ampliar informacin.

  Es importante saber que, por defecto, lpr, lprm, lpc y lpq trabajan
  con una impresora llamada "lp". Si define la variable de entorno
  PRINTER con el nombre de una impresora, pasar a ocupar el valor por
  defecto. Se puede indicar sobre la marcha una impresora distinta con
  la opcin -P impresora en la lnea de rdenes.

  4.4.1.  La orden lpr

  Con lpr se enva un trabajo a la impresora. Este se copia en el
  tampn, donde el demonio de impresin lo encuentra, y lo enva a la
  impresora fsica. Si no le suministra un fichero, lpr usar la entrada
  estndar.

  4.4.2.  La orden lpq

  lpq muestra los trabajos pendientes para la impresora deseada ("lp"
  por defecto). lpq muestra el nmero de cada trabajo, que lo identifica
  para cualquier proceso posterior.

  Muestra tambin el estado de cada trabajo. "active" indica que el
  demonio est enviando el trabajo a su destino, o al menos lo intenta.
  Si no, un nmero indica su orden en la cola de impresin.

  4.4.3.  La orden lprm

  lprm elimina un trabajo de la cola, es decir, borra los ficheros en
  espera en el directorio tampn. Puede indicar especficamente la
  identidad de un trabajo particular, o "-", con lo que cancelamos todos
  los trabajos destinados a la impresora seleccionada .Si se es
  superusuario, y quiere eliminar todos los trabajos pertenecientes a un
  usuario, especifique su nombre de usuario en la lnea de rdenes.

  4.4.4.  la orden lpc

  Con lpc podemos comprobar el estado de las impresoras, y controlar
  algunos aspectos de su uso. Particularmente, le permite arrancar y
  parar el tampn de datos, permite activar y desactivar impresoras, y
  reorganizar el orden de los trabajos en cola. Con las rdenes
  siguientes desactivamos la impresora "impre", activamos la cola de
  "tuimpre", y mueve el trabajo 37 al principio de la cola.

                     lpc down impre

                     lpc enable tuimpre

                     lpc topq 37

  Si no especificamos argumentos, lpc entrar en modo dilogo. con "?"
  obtenemos ayuda. Advierta que algunas funciones de lpc estn
  reservadas para el superusuario.
  4.5.  Los directorios fundamentales.

  Realmente, slo hay un directorio importante: el rea de tampn donde
  se almacenan los datos a la espera de que lpd decida qu hacer con
  ellos. Sin embargo, un sistema tpico debera configurarse en varios
  directorios, uno para cada impresora, lo que facilita notablemente el
  mantenimiento. En la mayora de las instalaciones, /var/spool/lpd es
  el directorio tampn principal, y cada impresora tiene un
  subdirectorio particular, con el mismo nombre que la impresora. As,
  si tiene una impresora llamada PJL-16 que admite PostScript y HPGL,
  debera crear dos directorios, por ejemplo /var/spool/lpd/PJL-16-ps y
  /var/spool/lpd/PJL-16-hpgl.

  Los directorios temporales deberan pertenecer a root, grupo lp; user
  y group deben poder leer y escribir, y el resto, leer. permisos:

       -rwxrwxr-x

  (775)

  Para cada directorio de impresora, la orden adecuada sera:

       chmod ug=rwx,o=rx PJL-16-ps
       chgrp lp myprinter

  Los destinos, permisos y propietarios aqu indicados deben
  considerarse como indicativos, pues pueden variar entre distintos
  sistemas e instalaciones.

  4.5.1.  Y sus correspondientes ficheros.

  Adems de los programas ya tratados, cada directorio temporal debe
  contener como mnimo estos cuatro ficheros: ".seq" , "errs" , "lock" y
  "status". Debern tener permisos

       -rw-rw-r--

  (664).

  El fichero .seq contiene la secuencia de trabajos enviados.  status
  contiene el mensaje que devuelve "lpc stat". El fichero lock impide al
  lpd imprimir al tiempo dos trabajos en la misma impresora, y errs
  guarda un registro de los fallos de la impresora.

  El fichero "errs" es actualmente potestativo, y ahora puede llamarse
  como le apetezca su nombre se especificar en /etc/printcap.  Debe,
  sin embargo, existir un fichero que permita a lpd registrar los
  mensajes de error.
  4.6.  /etc/printcap

  /etc/printcap es un fichero texto, modificable con su editor favorito.

  Su propietario debe ser root y debe tener permisos

       -rw-r--r--

  (644)

  Aunque a golpe de vista parezca tan comprensible como la piedra
  Rosetta , su estructura es muy sencilla y asequible. Parte de la mala
  fama se debe a que algunas distribuciones no incluyen pgina de manual
  para printcap, y el hecho de que muchos printcap estn generados por
  programas, o por gente cuya manera de despreciar al gnero humano es
  omitir comentarios que ayuden a su compresin. Desde aqu hacemos un
  llamamiento para que su fichero printcap sea tan legible como sea
  posible.

  Cada entrada de printcap describe una impresora. Mejor an, cada
  entrada de printcap provee una denominacin lgica para un dispositivo
  fsico, y describe cmo deben los datos ser enviados y manejados por
  l.

  Por ejemplo, una entrada de printcap definir qu puerto vamos a usar,
  qu directorio tampn, qu proceso deben soportar los datos, qu clase
  de errores debemos notificar, qu volumen de datos se permiten enviar
  como mximo, o limitar el acceso de ciertos dispositivos.

  Adems, podemos definir distintos modos de procesar datos para una
  misma impresora. Por ejemplo, una misma impresora de HP puede manejar
  datos en formatos PostScript, HPGL y PCL, dependiendo de la secuencia
  de rdenes que le enviamos al comienzo de cada trabajo. Tendra
  sentido definir los tres modos de trabajo como sendas impresoras, cada
  una de las cuales procesar los datos dependiendo del modo de trabajo.
  Los programas que generan datos ps se enviarn a la impresora PS, los
  dibujos HPGL a la impresora HPGL, y as sucesivamente.

  Llamaremos "filtros" a los programas que procesan los datos a
  imprimir. Un filtro puede incluso no enviar ningn dato al puerto.

  4.6.1.  Los campos de /etc/printcap .

  Un ejemplo tpico de entrada en /etc/printcap podra ser:

       # Ejemplo de printcap con dos alias
       impresora|HP850C:\
       # lp es el dispositivo de impresion, en este caso, la primera impresora
       :lp=/dev/lp1:\
       # sd indica el directorio tampon
       :sd=/var/spool/lpd/HP850C:

  Como vemos, cada entrada de /etc/printcap se estructura en una serie
  de campos, encabezados por una etiqueta, y limitados por dos puntos, a
  excepcin del primer campo, que describe la impresora. Los campos
  pueden tener tres tipos de valores - Texto, lgico y numrico, en los
  que nos extenderemos ms adelante.

  La primera lnea de la entrada determina el nombre y alias de la
  impresora. La impresora por defecto debera llamarse "lp"; por
  ejemplo, si la impresora del ejemplo anterior es la nica que tenemos,
  la primera lnea sera:

       # Ejemplo para la impresora por defecto
       lp|HP850C:\

  Podemos usar el nombre que nos apetezca como "La Picadora de papel del
  despacho de Gertrudis", aunque no parezca quiz muy prctico. Ojo:
  Slo podemos tener una impresora llamada "lp".

  Los siguientes campos son los ms comunes, y los ms importantes:

       Campo    Tipo         Descripcion

       lp       Texto        Dispositivo de impresion ( ej.: /dev/lp1 )
       sd       Texto        Nombre del directorio tampon de esta impresora
       lf       Texto        Fichero que almacena el registro de errores
       if       Texto        Nombre del filtro de entrada
       rm       Texto        Nombre del host de impresion remota
       rp       Texto        Nombre de la impresora remota
       sh       Logico       Suprime las paginas que separan los trabajos
       sf       Logico       Suprime las paginas en blanco al final del trabajo
       mx       numerico     Tamagnio maximo del trabajo de impresion (en bloques)

    lp apunta al puerto/dispositivo de impresin. Si especificamos
     /dev/null como dispositivo, el resto de los procesos se ejecutan
     normalmente, pero los datos de salida van a parar al inodoro. No se
     utiliza a excepcin de las pruebas de configuracin del
     dispositivo.  Cuando configure una impresora remota con los campos
     rm y rp , debera poner ":lp=:" en /etc/printcap, indicando que no
     est asignada a ningn dispositivo local.. No deje este campo en
     blanco a menos que use una impresora remota, o el demonio de
     impresin se quejar amargamente, si no especifica un dispositivo
     de impresin.

    lf guarda un registro de los errores de impresin.  Cualquier
     fichero que especifique deber existir antes de su uso, o no se
     registrarn las incidencias.

    if indica el nombre del filtro de impresin a ejecutar. Los filtros
     son programas que reciben datos por la entrada estndar, y los
     devuelven procesados por la salida estndar.

     Un empleo tpico es detectar texto llano y convertirlo en
     PostScript para imprimirlo en ese tipo de trastos. Son muy tiles,
     por ejemplo, para eliminar el efecto escalera, o cambiar la pgina
     de cdigos sin necesidad de cambiar la configuracin de la
     impresora cada vez que la usemos entre UNIX y DOS.

     Cuando se especifica un filtro de entrada, el demonio de impresin
     no enva los datos pendientes al dispositivo especificado. En su
     lugar, arranca el filtro y asigna el fichero temporal a la entrada
     estndar, y el dispositivo de impresin como salida estndar.

    rm y rp controlan el destino de la impresin remota. Enviar el
     documento a imprimir a una impresora remota es tan fcil como
     indicar el anfitrin en rm, la impresora correspondiente en rp, y
     asegurarse que lp est vaco. Fjese en que los datos se tamponan
     localmente antes de ser enviados, y que le ejecutar cualquier
     filtro que especifique.

     Una entrada tpica de /etc/printcap en la mquina local
     (pera.huerta.net)  para trabajar sobre la impresora picapapel, en
     la estacin rbano.huerta.net (remota), sera:

     picapapel:lp=:rm=rbano.huerta.net:rp=picapapel:sd=/var/spool/lpd/picapapel:

     En la mquina remota necesitar que /etc/hosts.equiv o
     /etc/hosts.lpd contenga la lnea pera.huerta.net; Tenga cuidado con
     los permisos de acceso. Vea el punto ``Y de la impresin remota,
     qu?''.

    sh y sf: Portadillas y separadores. Salvo que haya mucha gente
     distinta usando su impresora, probablemente no estar interesado en
     las pginas separadoras de trabajos. Las pginas de fin de trabajo
     son particularmente molestas cuando se trabaja con procesadores de
     texto, que componen pginas completas, por lo que si especificamos
     sf, tendremos al final de cada trabajo una pgina en blanco.

     sf es muy til, sin embargo, si usamos la impresora para listar
     directorios, ficheros en crudo ..., asegurndonos que el trabajo
     sale completo de la impresin. Se puede presentar un problema si
     tenemos una impresora PostScript, al quedar residente el ltimo
     tipo de letra utilizado. Con el campo :tr: lo evitaremos. Es
     preferible en estos casos dejar :sh:, y que sean los filtros
     quienes se encarguen de generar las portadillas.

    mx limita el tamao del tampn de datos, sealando una cantidad en
     bloques de 1 K ( 1024 bits ). Si mx=0, el lmite viene dado por el
     espacio disponible en disco. Recuerde que lo que limitamos es el
     tamao del tampn, no la cantidad de datos impresos.

     Si intentamos sobrepasar el lmite, el fichero simplemente se
     trunca, y el usuario recibe el mensaje

       lpr: fichero: copy file is too large".

  mx es til si tiene programas que accidentalmente pueden generar un
  volumen desproporcionado de datos a imprimir (imgenes, por ejemplo);
  para impresoras ps, no suele tener mucho inters, pues un volumen
  pequeo de datos en formato ps pueden generar una notable cantidad de
  papel impreso.

  Podemos sustituir el lmite de mx escribiendo en cada directorio
  tampn un fichero llamado "minfree" que contiene el espacio mnimo
  disponible que permita aceptar trabajos, en forma de fichero texto con
  el nmero de bloques mnimos disponibles. Normalmente, suele ser un
  enlace con el original en /var/spool/lpd, ya que es inusual que cada
  impresora deba tener un mnimo diferente.

  4.6.2.  Probemos /etc/printcap  con un ejemplo

  El siguiente guin de shell es un filtro de entrada muy simple. Slo
  encadena su entrada al final de un fichero en /tmp, tras una pancarta
  adecuada. Usaremos este filtro en el campo if, y enviaremos los datos
  a /dev/null, ahorrndonos las quejas del demonio especificando un
  dispositivo de impresin.

       #!/bin/sh
       # Este filtro debera colocarse en el directorio tampon, con el nombre
       # filtro_entrada, propiedad de root, grupo lp y permisos -rwxr-xr-x
       #
       echo ------------------------------------------------>/tmp/testlp.out
       date >> /tmp/testlp.out
       echo ------------------------------------------------>>/tmp/testlp.out
       cat

  Y aqu tenemos nuestra flamante entrada en /etc/printcap. Vea que el
  formato es razonablemente inteligible, usando caracteres de
  continuacin de lnea "\" al final de cada una, excepto la ltima (de
  hecho, cada entrada en /etc/printcap es una sola lnea):

       impre|PLJ-H1998:\
       :lp=/dev/null:\
       :sd=/var/spool/lpd/PLJ-H1998:\
       :lf=/var/spool/lpd/PLJ-H1998/errores:\
       :if=/var/spool/lpd/PLJ-H1998/filtro_entrada:\
       :mx#0:\
       :sh:\
       :sf:

  Ojo: NO DEJE ESPACIOS EN BLANCO, o no funcionar (le aparecern
  impresoras sin nombre, no lograr volcar los trabajos, y se acumularn
  en cola generosamente)

  4.6.3.  Valor y al toro: juntmoslo todo

    Primero: DEBE SER EL SUPERUSUARIO (root), tanto si le gusta como si
     no.

    Segundo: Compruebe los permisos y situaciones de lpr, lprm, lpc,
     lpq y lpd.

    Tercero: Cree el directorio tampn de su impresora: (recuerde que
     el propietario debe ser root, el grupo lp, y los permisos -rwxrwxr-
     x con las rdenes:

       mkdir /var/spool/lpd /var/spool/lpd/impre
       chown root.lp /var/spool/lpd /var/spool/lpd/impre
       chmod ug=rwx,o=rx /var/spool/lpd /var/spool/lpd/impre

    Cuarto: En el directorio tampn cree los ficheros necesarios, con
     los debidos permisos y propietarios:

       cd /var/spool/lpd/impre
       touch .seq errores status lock
       chown root.lp .seq errs status lock
       chmod ug=rw,o=r .seq errs status lock

    Quinto: Cree el script filtro de entrada en el directorio tampn.
     Use por ahora el filtro de prueba anterior. Asegrese que el
     fichero pertenece a root.lp, y es ejecutable para todos.

    Sexto: Cree el fichero /etc/printcap tal y como lo hemos descrito
     en el punto anterior. Su propietario ser root y sus permisos -rw-
     r--r--.

    Sptimo: Compruebe que rc.local (normalmente en /etc/rc.d/)
     contiene la lnea /sbin/lpd, y adala si no est. Esto hace que
     arranque el demonio de impresin al arrancar. De todos modos puede
     arrancarlo a mano con la orden lpd.

    Octavo: Haga una prueba: cruce los dedos y teclee

       ls -l | lpr -Pimpre

    Noveno: Busque en /tmp un fichero llamado testlp.out.  Debera
     contener un listado del directorio, con un encabezado.

    Dcimo: Si ha funcionado (y no dudamos que habr sido as), edite
     /etc/printcap, y copie la entrada de prueba en el mismo fichero; En
     la primera entrada, cambie el nombre de la impresora a "testlp", o
     el que usted prefiera, pero que no use como nombre real de
     impresora. En la segunda entrada (que ahora ser la de su impresora
     real), cambie el contenido de lp=/dev/null al del puerto de
     impresora (normalmente ser /dev/lp1) de su ordenador, salvo que
     vaya a utilizar una impresora remota, en cuyo caso deber definir
     rm y rp. Cambie el nombre del filtro if si tiene ya uno previsto, o
     suprmalo si no va a utilizar ninguno.

    Once: Reinicie el sistema, o mate el demonio de impresin y
     arrnquelo, ya que lpd slo lee /etc/printcap al comenzar su
     trabajo.
    Doce: Haga una prueba, y aprecie lo bien que funciona su impresora
     (Si tiene problemas con el efecto escalera, siga leyendo).

  Para aadir nuevas impresoras, slo tendr que repetir la entrada de
  printcap, con las modificaciones pertinentes a cada dispositivo.

  4.6.4.  Y de la impresin remota, qu?

  Como primer paso, cualquier mquina que intente imprimir en su
  sistema, debe estar registrada en cualquiera de los ficheros
  /etc/hosts.equiv o /etc/hosts.lpd, que son simples ficheros de texto,
  con un nombre de maquina por lnea. Es preferible el segundo,
  reservando el primero para proporcionar mayores permisos de acceso, lo
  que debera ser evitado en lo posible.

  Puede restringirse el uso tanto por nombre como por grupos.
  Especifique los grupos autorizados con uno o varios campos ":rg:" en
  /etc/printcap - :rg=admin: slo autorizar el acceso a la impresora a
  los usuarios asignados al grupo admin. Puede tambin limitar el acceso
  a aquellos usuarios con cuenta en su sistema utilizando el campo
  lgico :rs:.

  4.6.5.  Socorro: no funciona.

  Algo falla; Lo primero que debemos hacer es revisar la existencia y
  los permisos y propiedad de los ficheros y directorios anteriormente
  descritos. Como comprobar los permisos de UNIX son algo juguetones
  hasta que se les controla. No se azore, y siga la siguiente rutina de
  control.  Recuerde que cualquier modificacin de /etc/printcap acarrea
  matar el demonio de impresin y arrancarlo de nuevo, o (ltimo y
  brutal recurso)  reiniciar el sistema.

  1. ejecute "ls -l > /dev/lp?" (como root)

    La impresora funciona: 2

    La impresora no funciona: Compruebe el puerto de impresin, el
     cable, y que la impresora fsica este encendida y lista.

  2. pruebe con lpr -P<impresora>

    La impresora responde: 7

    La impresora no responde: 3

  3. Aparecen mensajes de error indicando que no se puede escribir
     disco, que el directorio tampn existe y que tiene los permisos
     necesarios.

    no hay mensajes: 4

  4. ejecute

  ps -ax | grep lpd

  y vea si aparece lpd en el listado, o hay un mensaje acerca del demo
  nio de impresin:

    lpd no est arrancado: Vea si rc.local tiene una lnea /sbin/lpd;
     si no, adala y reinicie el sistema. Puede arrancarlo a mano con
     /sbin/lpd como root.

    lpd est funcionando: 5

  5. Compruebe que el filtro de impresin especificado en if funciona.
     (filtro < datos >salida)

    El filtro no funciona: corrjalo, y pruebe de nuevo

    El filtro funciona: 6

  6. Ejecute "lpc status".

    Aparecen ms impresoras que las descritas, algunas con el nombre en
     blanco: Hay espacios en blanco dentro de la entrada de la impresora
     en /etc/printcap. Revise la sintaxis de la entrada.

    slo aparece una impresora que no es lp: Si no ha especificado
     nombre de impresora, lpr usar lp por defecto. Pruebe

       lp -P<impresora>

    La impresora est deseleccionada (down): ejecute

       lpc up <impresora>

  (debe ser superusuario).

  7. La impresora funciona, pero imprime mal:

    Se imprimen las cuatro o cinco primeras lneas, en escalera:
     Necesita un filtro de entrada. Vea ``Efecto Escalera''

    El fichero no se imprime completo: Elimine el lmite en mx con
     :mx#0: en /etc/printcap.

  Si tras este rastreo sus dificultades continan, tenemos un buen
  problema.  Una buena idea para aislar fallos es incluir el demonio
  "syslogd" en el arranque, de modo que obtengamos un registro de las
  incidencias de los procesos arrancados, que puedan ayudar al rastreo.

  Un problema que ha ido apareciendo y desapareciendo de modo recurrente
  en distintas versiones de Linux est asociado a los mensajes "job
  queued, but cannot start daemon" o "lpc: connect: no such file or
  directory", y lpd s est corriendo, parece manifestar un conflicto
  entre los mdulos de red y el resto del sistema, y que se manifiesta
  si la red no est correctamente configurada. Si no est conectado a
  una red, suele corregirse aadiendo en la configuracin de arranque:

       ifconfig lo localhost
       route add localhost

  4.6.6.  Dnde puedo encontrar un printcap  para la impresora xxxxx?

  Si ha ledo todo hasta ahora, comprobar que esta pregunta carece de
  sentido. No se le ocurra preguntar en usenet, si quiere que su
  dignidad se mantenga a salvo, y lase este documento completo.

  4.6.7.  El "efecto escalera", bajo control.

  Mientras que en *DOS el indicador de nueva lnea se compone de los
  caracteres CR y LF (retorno de carro y salto de lnea), UNIX termina
  las lneas con LF. Esto hace que, si en una impresora configurada para
  *DOS imprimimos un documento UNIX, obtendremos una sucesin de lneas,
  que acabarn marchndose inmediatamente por el margen derecho del
  papel.

  Tenemos dos vas para corregirlo: Reconfigurar la impresora para que
  interprete LF como CR+LF, algo molesto si alterna entre *DOS y Linux,
  o aadir un filtro de impresin, que lo haga sobre la marcha.

  Ofrecemos dos: uno general, y el otro especfico para impresoras HP.

       #!/bin/sh
       # filtro general para prevenir el efecto escalera
       if [ "$1" = -c ] ; then
       cat
       else
       sed -e s/$/^M/
       fi
       echo -ne \\f

  #!/bin/sh
  # filtro para corregir el efecto escalera en impresoras HP
  echo -ne \\033\&k2G
  cat
  echo -ne \\f

  El carcter

  ^M

  con vi use C-v C-m, y con emacs, C-q C-m (C es la tecla Control).

  El mejor sitio para guardar estos filtros es el propio directorio
  tampn de la impresora. Recuerde que deben especificarse en
  /etc/printcap en el campo :if=<filtro>:, con permisos -rwxrwxr-x, y
  propiedad root.lp.

  4.6.8.  Imprimir por el puerto serie es fcil.

  Primero hemos de ver si lpd se queja enviando un error acerca de
  ioctl(TIOEXCL). Si es as, deberamos conseguir una versin de lpd que
  lo acepte (lpd-590p2, por ejemplo).

  Necesitaremos configurar dos grupos de campos, adems de la velocidad
  de transferencia br (Observacin: Configurar el campo ":fc:" puede
  puentear el valor del campo ":br#:", as que asegrese de configurar
  los dos correctamente).

  Cada campo puede tener bits activados y desactivados. Se debe empezar
  desactivndolos con los campos ":fc#*:" y ":xc#*:", para activarlos
  posteriormente con ":fs#*:" y ":xs#*:".

  Configurar br#; es obvio: ":br#9600:

  Es muy fcil traducir la configuracin de stty a los campos de
  /etc/printcap. Consulte la pgina de manual de stty para obtener ms
  informacin.

  Utilice stty para configurar el puerto de su impresora de manera que
  con "cat" pueda enviarle un fichero, e imprimirlo sin problemas. Aqu
  tiene un ejemplo de la configuracin del puerto serie de la impresora:

       # darkstar:/var/spool/lpd # stty -a < /dev/ttyS2
       speed 9600 baud; rows 0; columns 0; line = 0;
       intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
       eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
       lnext = ^V; min = 1; time = 0;
       -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
       -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
       -igncr -icrnl ixon -ixoff -iuclc -ixany -imaxbel
       -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
       -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
       -echoprt -echoctl -echoke

  Deber estudiar el control de flujo de su impresora serie, y aplicar
  las correcciones necesarias a la configuracin del puerto al que est
  conectado el equipo.

  Una vez tengamos la configuracin ajustada, de modo que con la orden

       cat fichero > /dev/ttyS?

  la impresora escriba correctamente, consultaremos el fichero
  /usr/src/linux/include/linux/termios.h ( no ser mala idea imprimirlo;
  as sabremos si funciona :-).

  En la seccin que empieza con

       /* c_cflag bit meaning */
       #define CBAUD 0000017

  est detallado el valor de los bits de "fc#" y "fs#".  Apreciar que
  los nombres que aparecen aqu (tras las velocidades de transmisin)
  coinciden con una de las lneas del listado producido por stty. Ve
  qu fcil?

  Estos campos, en stty, van precedidos por un guin (-). Sume los
  valores (en octal) que aparecen en el listado. Este valor representa
  los bits a LIMPIAR; es el valor del campo :fc#*:. Note que, como
  deber activar posteriormente los bit necesarios, podra usar
  directamente ":fc#0177777:".

  Ahora repita el mismo proceso para las opciones sin guin en la salida
  de stty. En el ejemplo, los bits importantes son CS8 (0000060), HUPCL
  (0002000) y CREAD (0000200). Considere tambin los indicadores para la
  velocidad de transmisin (en mi caso 0000015).  Smelos; en este caso,
  tendremos 0002275: el valor del campo :fs#*: (En mi caso, ":fs#02275:"
  funciona).

  Haremos lo mismo con la siguiente seccin de termios.h, que comienza
  con "c_lflag bits". En mi caso, no he necesitado ningn ajuste, y
  utilizo ":xc#0157777: y ":xs#0:".

  Una vez modificado printcap, intente imprimir con lpr. Si no funciona,
  siga leyendo.

  4.6.9.  cat  funciona, pero lpd  no.

  Mantener "lpd" en forma se explica en la pgina adecuada del manual,
  pero si le persiguen los problemas de configuracin, puede evitar que
  lpd establezca la configuracin del puerto, haciendo que su impresora
  no presente un dispositivo normal (vea la seccin ``'').

  El proceso a seguir es el siguiente:

  1. el campo :lp: de /etc/printcap deber apuntar a /dev/null1 (crelo
     con mknod /dev/null1 c 1 3), porque no queremos a /dev/null slo
     para nosotros. Elimine los campos :br: y :fs:, :fc:, :xs: y :xc:.

  2. Cree un script, por ejemplo, testserie, tal que este:

       #!/bin/sh
       echo if: $* >> /var/spool/lpd/resultados
       # /dev/lp debe estar enlazado (con ln -s) a /dev/ttyS?, donde esta la
       # impresora
       exec su-filtro-de-entrada-viejo $* > /dev/lp

  o si no tiene un :if: instalado

       #!/bin/sh
       echo if: $* >> /var/spool/lpd/resultados
       # asumimos que /bin/sh es bash al usar "echo -ne"
       echo -ne \\f > /dev/lp

  3. Asegrese que es ejecutable y legible para todos (rwxrwxr-x).
     Pruebe el filtro con

       # testserie < algo-que-imprimir

  y vea si sale algo por la impresora. Modifique /etc/printcap, para que
  if sea "testserie" (o el nombre que le haya dado).

  4. Con stty, configure el puerto de la impresora. Intente imprimir.
     Ahora podr saber si hay datos en el tampn, y algo debera
     imprimirse si el paso 3 funcion.

  Ahora, si el proceso con if funciona, y cree que la configuracin del
  printcap original es la correcta, vuelva a revisar la configuracin
  del puerto, las etiquetas de termios.h ... Si an no funciona,
  probablemente lpd tiene un defecto, y deba obtener una versin nueva.

  4.6.10.  Impresoras que no son dispositivos simples.

  Piense en una impresora conectada de algn modo tortuoso a nuestra red
  ...  ---agrrese: est enchufada a un ordenador con el que slo
  podemos comunicarnos mediante correo electrnico---

  Para imprimir a travs de lpr, el campo :lp: debera ser redirigido a
  un dispositivo nulo,

  mknod /dev/null1 c 1 3

  (no a /dev/null, pues lpd lo usa en exclusiva). El filtro de entrada (
  :if:, recuerde) debe explcitamente codificar y enviar como correo al
  ordenador remoto su salida.

  Se rumorea que alguien consigui con algo similar con Novell NetWare y
  el agente de correo Charon; tambin hay quien cree en los Reyes Magos.

  4.7.  Trucos y problemas

  4.7.1.  lpr -i  o como modificar la impresin a nuestro antojo.

  La opcin -i enva argumentos al filtro de impresin. Ante todo,
  necesitamos un filtro instalado en printcap para que la opcin filtro.
  Si quisiera un filtro que permitiera configurar su impresora sobre la
  marcha, podramos utilizar un filtro como este:

       #!/bin/sh
       # Mi programa de configuracion se llama confimpre.
       exec /usr/lib/confimpre $*

  que desplace el margen izquierdo, y pasar como argumento el margen
  deseado.

       #!/usr/bin/perl
       # confimpre: Desplaza el margen izquierdo en un texto ascii
       # Usamos perl porque convertir numeros a caracteres
       # es un campo de minas en programacion shell
       for  ( $i=0 ; !($_ = $ARGV[$i]) || !/^-i([0-9])+/;
       $i++) {}
       print pack( "cAc" , 27 , "l" , $1) ;
       while (<STDIN>) { print; }

  4.7.2.  daemons "

  Un proceso lpd corre continuamente, y se desdobla en hijos para
  manipular cada impresora en tanto se necesita. La salud del proceso
  principal no se manifiesta explcitamente con 'lpc'; basta con la
  ausencia de errores. El comando 'lpc stat' mostrar de manera normal
  el mensaje "no daemon present" para cada cola actualmente inactiva.
  Si la impresin se desactiva, o la cola se vaca, 'lpq' es bastante
  ms escandaloso, gritando "Warning: no daemon present", aunque, de
  hecho, no hay condicin de error.  Si el demonio est ausente cuando
  hay entradas en la cola, y no ha sido explcitamente detenido,
  probablemente se debe a un fallo en algn filtro. Fjelo y reinicie
  con "lpc up <cola>.
  De vez en cuando, al desactivar una impresora, 'lpc' alucina, e
  intenta matar demonios inexistentes, emitiendo un surtido de
  irritantes e inofensivos mensajes de error. Esta "caracterstica" es
  muy rara en versiones posteriores a lpd-590p2.

  4.7.3.  Impresin sobre red (notas adicionales)

  Dado que la mquina que alberga la impresora fsica debe saber quien
  se conecta, deberemos dar de alta al resto de los ordenadores en los
  ficheros /etc/hosts.equiv y /etc/hosts.lpd, con sus nombres cannicos,
  o direcciones IP. Si no est seguro del nombre completo de una
  mquina, puede incluir todos sus alias conocidos.

  Por motivos de seguridad, es preferible que las mquinas que slo
  deban tener acceso a la impresora queden restringidas a
  /etc/hosts.lpd.

  Si el servidor de impresin no ejecuta un sistema de impresin tipo
  BSD ( UnixWare, HP-UX versin 10 ,...), debera ser posible trabajar
  con l, teniendo en cuenta que los ficheros de autorizacin pueden
  variar notablemente, cambiando en cada sistema.

  Si an no puede imprimir sobre un sistema distinto, queda un as en la
  manga: simplemente use una orden remota, tal que rsh, rexec ...

       # rsh rabano.huerta.net "lp -dlp" < fichero

  permitir imprimir sobre un SYSV, desde nuestra pera.huerta.net.

  4.8.  Los filtros de impresin

  Los filtros en UNIX, son meramente programas (y como tales deben tener
  permisos de ejecucin) que leen la entrada estndar y escriben sobre
  la salida estndar, independientemente de su complejidad.

  Los filtros de lpd lo son en el sentido que leen STDIN y escriben en
  STDOUT; su peculiaridad estriba en que deben asumir que la entrada
  estndar es un fichero de acceso aleatorio, sobre el que se pueden
  realizar operaciones con lseek().

  Un filtro que interpreta PostScript nos servir de ejemplo:

       #!/bin/sh
       /usr/bin/gs -q -dSAFER -dNOPAUSE -r?? -sDevice=? -sOutputFile=- - < /dev/null

  La primera lnea invoca al intrprete de comandos que lo interpretar.
  Podemos usar csh, bash, perl, tcl, etc...; va por gustos.

  En la segunda lnea usamos gs como filtro, indicando que la entrada es
  STDIN ( el guin del final ), y la salida, STDOUT (-sOutputFile=-).
  Lea la pgina de manual de 'gs' para ms detalles.

  Es buena prctica guardar los filtros de entrada en el directorio
  tampn de la impresora en la que se usan (o en /var/spool/lpd/ ),
  aunque las buenas maneras recomienden camas separadas para datos y
  programas.

  Ms difcil an:

       #!/bin/sh
       /usr/tex/bin/dvips -f | /usr/bin/gs [...] -sOutputFile=- -

  Como se puede ver, este filtro procesar un fichero texto de formato
  TEX o LATEX, obteniendo un fichero .dvi, que es transformado en
  PostScript, y reprocesado con ghostscript para imprimirlo en una
  impresora normal.

  Ojo: Si usa impresin remota con lpr, el filtro deber encontrarse en
  la mquina remota; LPRng obvia este inconveniente.

  4.8.1.  Los filtros de salida

  Son como el goto en 'C', se pueden usar, pero realmente, es difcil
  encontrar aplicaciones para ellos. Dado que cualquier comando de
  iniciacin de la impresora es ignorado, si tenemos un trabajo rodando
  que cambia algo (el tipo de letra, por ejemplo), el nuevo trabajo
  probablemente acabar mal impreso. No los use.

  4.8.2.  Depuracin de filtros

  Es absolutamente trivial:  mifiltro <fichero >/dev/lp1 (como root).
  Comprobaremos de inmediato si de verdad funciona.

  Un truco muy til para los filtros con argumentos en lnea de comandos
  consiste en incluir la lnea

       echo $* >> /tmp/filter-log

  cerca del principio del guin. Recuerde incluir en la primera lnea
  que son ejecutables por todo el mundo.

  4.8.3.  Filtros Mgicos

  Tienen de especial estos programas que son capaces de identificar la
  familia de los datos a imprimir a partir de patrones caractersticos
  de datos en situaciones determinadas. Son generalmente guiones Shell,
  Perl, programas en C ...; el programa identifica la fuente de datos, y
  llama a un filtro ordinario que lo procesa de modo adecuado. Con un
  filtro mgico adecuado y tres filtros no mgicos podemos imprimir
  cosas como esta:

       # lpr -d fich1.dvi fich2.dvi.Z fich3.ps fich4.tex.gz

  Un buen sitio para encontrar filtros mgicos como el del ejemplo
  anterior es:

  ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/magic-filter-??.tar.gz.

  Como podr suponer, nunca se deberan usar como filtros de salida.

  Un ejemplo: el siguiente filtro mgico identifica un fichero fuente ps
  o texto, y lo procesa de acuerdo a su clase:

       #!/bin/sh
       printf "<Filtro magico para imprimir texto y ps.>"
       read first_line
       first_two_chars=`expr $first_line : '\(..\)'`
       if [ "$first_two_chars" = "%!" ] ; then # Documento PostScript.
       /usr/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=??? -sOutputFile=- - < /dev/null
       else
       # Texto llano - Si hace falta, podemos incluir aqui la
       # correccion del efecto escalera
       echo -n $first_line
       cat
       printf "\014"
       fi

  Para desazn de muchos, habr ya notado que un script ejecutado por
  alguien distinto al propietario puede ser una brecha de seguridad.
  Este no es el caso de los filtros de lpd, ya que el entorno de los
  guiones no est al alcance de potenciales piratas.

  4.8.4.  Los usuarios de HP estamos de suerte

  Hasta donde hemos podido averiguar, HP no tiene ningn programa que
  permita configurar sobre la marcha sus impresoras ( ni siquiera para
  sus propios sistemas UNIX!!), salvo que use MS-Windows, o *DOS; por lo
  que slo nos queda, bien usar DOSEMU, o salir a DOS, configurar la
  impresora, y volver a Linux.

  Existe un hermoso programa llamado hpmodeset (-- Nota del Traductor:
  hpset, localizable en cualquier mirror de Sunsite, en , escrito en
  Eiffel, que hace el trabajo por nosotros, muy fcil de usar. Su autor
  es Glenn Maughan (glennm@insect.sd.monash.edu.au); se puede conseguir
  en ftp://hornet.sd.monash.edu.au/pub/hpmodeset/v2.0.

  Permite fijar economode, definicin, tipo de papel, etc... en ficheros
  PCL (el lenguaje de las impresoras HP) y ps. No es tan espectacular
  como el programa de windows, pero funciona muy bien, y es susceptible
  de ser utilizado como filtro de impresin.

  5.  CMO SE IMPRIME ... ?

  Ya sabemos con qu imprimimos bajo Linux. Ahora haremos una visita a
  los programas ms normales para generar el texto a imprimir usualmente
  disponibles. Advierta que la mayor parte de los programas de impresin
  bajo otros UNIX pueden ser muy fcilmente adaptados a Linux.

  5.1.  Texto Llano

  Bajo Linux, (como cualquier otro U*X), lo ms fcil es imprimir texto
  llano. Cualquier editor estndar de UNIX (vi, emacs), o alguno ms
  sofisticado (nedit, jed, .. ) le producirn tantas arrobas de letras
  como desee.

  Adems, la mayor parte de los programas que a continuacin se
  describen son capaces de generar documentos en texto llano, con las
  rdenes adecuadas.

  5.1.1.  pr

  La mayora de los ficheros de texto llano en U*X tienen tendencia a
  ser un mar de caracteres, sin saltos de pgina ni nada que permita un
  documento mnimamente presentable.

  pr surgi para obviar este inconveniente. Procesando el documento a
  travs de pr, se le aaden cabeceras y/o pies, nmeros de pgina,
  mrgenes superior e inferior... Como cualquier otra utilidad UNIX, pr
  tiene dos o tres millones de opciones, debidamente reseadas en la
  pgina del manual.

  5.2.  PostScript

  Si no tiene que imprimir texto llano, es muy probable que tenga que
  imprimir PostScript. Si su impresora lo interpreta, sus problemas
  terminan aqu; si est en el caso contrario, situacin normal para
  casi todos, la cosa se complica un poco, pues necesitar un programa
  que lea PS y lo traduzca al lenguaje de su impresora.

  5.2.1.  Ghostscript

  El modo normal de interpretar ps bajo Linux es usar ghostscript, que ,
  como casi todas la utilidades, procede del proyecto GNU. Herramienta
  verstil donde las haya, gs traduce PostScript a formato X Window,
  impresoras IBM, Epson, HP, Canon ..., fax, y casi para cualquier
  dispositivo que se le ocurra. Los dispositivos soportados en cada
  versin de ghostscript estn debidamente relacionados en la
  documentacin del programa; puede obtenerse una relacin con la orden
  'gs -help'.

  gs se ha convertido en utilidad estndar en la mayora de las
  distribuciones de Linux, que la incluyen completa. Advierta que los
  ejecutables binarios pueden necesitar 'libX.so.???' tal como vienen en
  el controlador de pantalla X Window.

  La distribucin "oficial" en forma de ficheros fuente, que deben ser
  compilados en su sistema puede encontrarse en:

  ftp://prep.ai.mit.edu/pub/gnu/ghostscript-*.tar.gz

  ftp://prep.ai.mit.edu/pub/gnu/ghostscript-fonts-*.tar.gz

  La instalacin mnima de los binarios de gs y algunos otros programas
  necesarios para imprimir la documentacin de Linux est disponible en

  ftp://sunsite.unc.edu/pub/Linux/apps/tex/texmin/texmin-*.tar.z

  Esta distribucin no contiene ningn tipo de letra PostScript (ni las
  necesitar para imprimir ficheros .dvi).

  La documentacin principal de ghostscript se encuentra en el fichero
  use.doc, en el directorio de fuentes, o en /usr/lib/ghostscript/doc/
  si no tiene los fuentes.

  Para imprimir ps determine primero el nombre de su dispositivo con la
  orden 'gs -help', que lista los dispositivos instalados. Si el suyo no
  est en la lista, deber recompilar gs (No se asuste, siga las
  instrucciones que figuran en make.doc. Necesitar libres 5 o 6 Mb de
  espacio en disco). Con la orden:

       # gs -dNOPAUSE - sDEVICE=???? -sOutputFile=/dev/???? fichero.ps

  el documento aparecer (eso esperamos) en su impresora sin problemas.
  Como podr imaginar, a mayor versin, ms dispositivos soportados. En
  la documentacin incorporada se describe el procedimiento para
  desarrollar nuevos dispositivos si fuera necesario.

  gs puede imprimir en la mayora de las resoluciones soportadas por su
  impresora; '-r300' '-r150', '-r360x180' son ejemplos de las opciones
  para su control. Las impresoras matriciales necesitan que se fije esta
  opcin, al no soportar normalmente la resolucin por defecto de
  300x300.

  5.3.  Mi impresora slo trabaja con PostScript

  Si su impresora slo trabaja con PostScript, o quiere ahorrarse andar
  configurando el dispositivo cada vez que tiene que cambiar el tipo de
  documento a imprimir, hay toda una familia de programas que
  transforman el texto llano a PostScript.

  5.3.1.  mpage

  Transforma texto llano a PostScript y/o imprime ms de una pgina en
  cada hoja de papel a partir de PostScript o texto. Puede encontrarlo
  en

  ftp://wuarchive.wustl.edu/pub/mirrors/unix-c/PostScript/mpage-tar-z

  el sufijo -z equivale a .Z (compress). La orden

       man -t <orden> | mpage

  enviar una copia de la pgina en formato PostScript a lpr.

  5.3.2.  a2ps, enscript, nenscript

  A partir de un texto ascii llano, a2ps produce una pgina debidamente
  formateada, con cabeceras, pies, nmeros de pgina ... Se encuentra en
  el mismo lugar que mpage.

  enscript y nenscript hacen lo mismo que a2ps. Puede encontrar
  nenscript en:

  ftp://sunsite.unc.edu/pub/Linux/system/Printing/nenscript* (-- Nota
  del Traductor:
  los caracteres extendidos; por ejemplo: a2ps (la versin que tengo, al
  menos) genera un fichero ps que no tiene acentos, ees .., al no
  definir una tabla tipogrfica para ellos. En cambio, nenscript si lo
  hace. --)

  5.3.3.  gslp

  Incluida en la distribucin de ghostscript, gslp transforma un fichero
  texto a PostScript. selo con la orden:

       # gs -q -sDEVICE=???? -dNOPAUSE -- gslp.ps fich.text

  (el programa es gslp.ps, escrito en PostScript, que, en muchos
  aspectos, es un lenguaje de programacin, ms que un conjunto de
  rdenes de impresin). Hay un ejecutable en la distribucin que evita
  dar estos rodeos.

  5.3.4.  Utilidades para PostScript

  Existen cientos de pequeos programas que permiten modificar ficheros
  ps.  Puede encontrarlos en

    ftp://achilles.doc.ic.ac.uk/tex/inter/psutils/

    ftp://ftp.cs.psu.edu/pub/src/psutil.tar.gz

    ftp://ftp.uu.uunet

    ftp://wuarchive.wustl.edu

  5.4.  TeX, LaTeX

  Si hay algo cierto en el mundo de UNIX, especialmente a nivel
  acadmico, es que antes o despus uno se acaba topando con l. TeX es
  un sistema de formateado de textos (-- Nota del revisor:
  Procesador de Documentos--) . Funciona de modo anlogo a un
  compilador: El cdigo fuente corre a travs del programa tex, y
  obtenemos un fichero .dvi, independiente del dispositivo, que
  normalmente debe ser procesado de nuevo para obtener un documento
  impreso. La altsima calidad del producto obtenido justifica la
  complejidad del proceso.
  El trabajo con TeX, no obstante, se ve gratamente suavizado mediante
  el uso de procesadores de texto, como LyX, con el que ha sido
  reelaborado este documento.

  Remitimos al lector al libro "LaTeX, a document preparation system" de
  Leslie Lamport (ed. Addison Wesley) 2 edicin, que analiza en detalle
  la versin ms popular de este extraordinario sistema de tratamiento
  de textos.

  5.4.1.  dvips

  Convierte el fichero dvi generado a partir de un documento TeX en un
  fichero PostScript, que puede imprimir a travs de gs, o directamente
  en la mquina adecuada. La mayora de las distribuciones de Linux
  incluyen este paquete.

  La orden

       dvips -f1 fich.dvi | lpr

  es tpica. dvips responde tanto a los argumentos de la lnea de
  comandos como al fichero de configuracin "config.ps", donde puede
  organizar las cosas para que la salida vaya directamente a la
  impresora, por ejemplo. As, bastar escribir dvips fichero.dvi para
  obtener el documento final.

  dvips tiene unas cuantas opciones interesantes; por ejemplo dvips -r1
  fich.dvi imprimir el documento en orden inverso. Los propietarios de
  impresoras HP apreciarn esta caracterstica.

  5.4.2.  eps, dvilj, dvi500

  Transforman los ficheros dvi en los lenguajes de impresoras Epson y HP
  LaserJet y DeskJet respectivamente. Suelen estar incluidos en la mayor
  parte de las distribuciones, y, por supuesto, en ftp://sunsite.unc.edu

  5.5.  texinfo

  Es el formato nativo del proyecto GNU. emacs puede ser forzado a
  producir un fichero de informacin desde TeXinfo, y TeX producir un
  excelente resultado a partir de este mismo fichero. Realmente, el
  documento est en formato TeX, y necesita que el fichero de macros
  texinfo.tex est instalado en su sistema. Simplemente ejecute un
  fichero dvi que podr imprimir o visualizar a su placer.

  Con emacs puede teclear adems 'M-x texinfo-format-buffer' para
  convertir el fichero texinfo en un fichero info legible con emacs 'M-x
  info', u otro visor de su eleccin.

  Hay otros programas que leen y formatean info desde un fichero
  texinfo.  Estn disponibles en ftp://prep.ai.mit.edu/pub/gnu/

  5.6.  *roff ; pginas man

  Si hay un generador de documentos virtualmente universal es troff, y
  sus primos cercanos, debido a que las pginas de manual se escriben
  para ellos. Las rdenes de formato de documentos sern
  sorprendentemente?  familiares para los (no se si an queda alguno
  vivo) forofos de las versiones ms populares de Wordstar.

  La orden para imprimir las pginas de manual es

       man -t <comando> | lpr

  groff traduce la pgina a PostScript, que se procesa sin mayores
  problemas, como ya sabemos. Obtendremos as una pgina impresa muy
  aparente. Esto, sin embargo, depende mucho del programa 'man' que
  viene con su sistema. Si el suyo no lo permite, consiga la versin
  escrita en perl, en: ftp://sunsite.unc.edu/pub/Linux/system/Manual-
  pagers/.

  Est ntegramente escrito en perl, y es por tanto muy personalizable.

  Otro camino consiste en encontrar el fichero fuente de nroff de la
  pgina en los directorios de man, e imprimirlo con la orden:

       groff -fichman -Ttipo orden.1 | lpr

  donde tipo puede ser 'ascii', 'dvi' 'ps' 'X100',

  5.7.  Adobe Acrobat. Ficheros PDF

  Estndar emergente donde los haya, los paps de PostScript han
  desarrollado un formato de documentacin que permite (al menos eso
  venden) absoluta independencia del sistema operativo. Un fichero PDF
  se imprimir igual de bien en un ordenador con MS-Windows, un Mac*, un
  CojoSuperOrdenador Cray, o un PC con Linux.

  Los documentos PDF se traducen justo a la hora de imprimirlos al
  formato que cada sistema operativo requiera; en UNIX, a PostScript.

  Puede obtenerse una copia del lector de Adobe en http://www.adobe.com.

  Si prefiere algo menos "comercial", Xpdf ser de su agrado. La ltima
  versin est en

  http://www.contrib.andrew.cmu.edu/usr/dn0o/xpdf/xpdf.html

  5.8.  Tipos

  (Esta seccin contiene informacin no especfica a los dispositivos).
  La informacin pertinente al dispositivo X11 de gs (y ghostview) se
  incluye en el apartado de visualizacin.
  Todas las versiones de gs vienen provistas de un surtido de tipos de
  dominio pblico, muchas de ellas generadas a partir de mapas de bit,
  con baja calidad. Sin embargo, gs puede usar cualquier tipo PostScript
  clase 1 o 3 que tenga a mano. Por ejemplo, Adobe Type Manager (que no
  sea de Mac) incluye tipos utilizables. Sitelos (normalmente *.pc?)
  en lib/ghostscript/fonts/, y aada al fichero
  [...]/ghostscript/Fontmap' lneas del estilo

       /Courier            (com_______.pfb) ;

  En el servidor de correo de impresin puede encontrar el fichero
  fontmap.atm, que contiene un fontmap de los tipos normalmente
  incluidos en Adobe Type Manager.

  Puede encontrar tipos Adobe Type 1 en:

  ftp://ftp.cica.indiana.edu/pub/pc/win3/fonts

  ftp://archive.umich.edu/msdos/mswindows/fonts

  En el fichero comp.fonts FAQ, en ftp://rftm.mit.edu, puede encontrar
  informacin til acerca de tipos de impresin.

  La conversin entre familias de tipos es delicada. gs incluye
  herramientas para generar tipos escalables a partir de mapas de bits
  (cuanto ms grandes, mejor).

  groff tiene tambin herramientas para usar tipos Tfm/mf (TeX) y pfb
  (type 1) en documentos *roff. X11R5 incluye herramientas procedentes
  de IBM para presentar tipos type 1, con sus correspondientes pginas
  de manual. Eche un ojo tambin al logical fontutils en
  ftp://prep.ai.mit.edu/pub/gnu/.

  5.9.  Documentos para fax.

  Aunque no parezca el lugar ms adecuado para su resea, qu hacemos
  al enviar un fax ms que imprimir un fichero en un terminal remoto?.
  Mediante fax, puede transmitir documentos originalmente en PostScript,
  dvi, texto llano....

  Para enviar un fax, el documento original debe ser transformado en una
  imagen TIFF del grupo III que ser transmitida por el fax-mdem. Todos
  los programas mencionados contienen utilidades que permiten
  transformar las distintas clases de documentos al formato necesario.
  Adems, gs (tambin aqu) tiene dispositivos adecuados para ello
  (-sDEVICE=tiffg3).

  Tenga en cuenta que hay dos juegos de rdenes que un fax puede
  soportar: Clase 1 y Clase 2. En el primer caso, hoy ya casi extintos,
  gran parte de la gestin de transmisin de datos debe hacerla el
  ordenador anfitrin va el programa de fax. Esto hace que en
  condiciones de sincronizacin crtica, el control se vuelve casi
  imposible. Los fax de clase 2 son ms caros, pero mucho menos
  propensos a dar guerra. No confunda la 'clase' y el 'grupo'. Deber
  tener, por supuesto, un fax-mdem de grupo III.

  5.9.1.  FLEXFAX

  FlexFax est escrito en C++ (necesita instalar g++ para compilarlo), y
  soporta fax de clase 1 y 2. Utiliza ghostview (o cualquier otro visor
  de ps) . Puede ejecutarse en lugar de getty, y decide, segn el tipo
  de llamada, si activar el fax, o presentar un login. Permite la
  emisin de faxes a travs de una red, y tiene un zurilln de
  utilidades. Se configura va 'configure', y para un ordenador aislado
  es un tanto mastodntico. La versin actual (4.0 beta 018, segn
  escribo ) puede encontrarse en:  http://www.vix.com/hylafax/

  5.9.2.  mgetty+sendfax

  mgetty+sendfax controla slo fax de clase 2, y puede tambin actuar
  como contestador automtico, si el mdem lo soporta. Al igual que
  FlexFax, se instala en lugar de getty, controlando qu entra y sale.
  Muy adecuado si no necesitas trabajar sobre red. Un excelente conjunto
  de programas disponible en

  ftp://sunsite.unc.edu/pub/Linux/system/Serial/mgetty+sendfax*.tar.gz

  ftp://tsx-11.mit.edu/pub/Linux/sources/sbin/mgetty+sendfax*

  ftp://ftp.leo.org/pub/comp/networking/communication/modem/mgetty/

  5.9.3.  EFAX

  Controla fax de clase 1 y 2; no discrimina entre una conexin de datos
  y un fax, tiene su fuerte en su facilidad de uso. Necesita el paquete
  NetPBM (ftp.x.org). Utiliza xv para ver los fax recibidos. Lo
  encontrar en:

  ftp://sunsite.unc.edu/pub/Linux/apps/comm/efax*

  6.  Visualizacin

  Hubo un tiempo en que a alguien se le ocurri el concepto de la
  "oficina sin papeles"; no hara falta manejar papel impreso durante el
  trnsito de documentos. Qu falta de vista. Cmo podramos si no
  fardar de impresora ?. Nos ha quedado de todo aquello una serie de
  programas que nos facilitan ver el resultado final de un trabajo sin
  su materializacin.

  6.1.  Con X-Window instalado

  6.1.1.  ghostview

  El complemento ideal de 'gs', visualiza documentos PostScript en un
  sistema X Window. Permite elegir pginas individuales, o grupos de
  ellas para su posterior impresin. La distribucin oficial est en

  ftp://prep.ai.mit.edu/pub/gnu/ghostview-*.tar.gz

  Fcil de construir, ghostview necesita gs para ser ejecutado.  Las
  ltimas versiones utilizan las fuentes estndar de X Window,
  facilitando la legibilidad en las condiciones de baja resolucin de
  los monitores. La verdad es que funciona muy bien; de hecho, muchos
  piensan que mejor que el paquete pageview de Sun. Si lo desea, puede
  utilizar fuentes distintas a las del sistema ( por ejemplo, Type 1 ),
  simplemente situando la orden

       ghostscript.useExternalFonts:false

  en su fichero .Xdefaults.

  Puede obtenerse ms informacin de la documentacin que acompaa al
  programa, y en la correspondiente pgina de manual.

  6.1.2.  gspreview

  Tenemos aqu otro interfaz para ghostscript. Ms sencillo que
  ghostview, carece del milln de opciones de ste, pero trabaja
  razonablemente bien.  Puede encontrarlo en

  ftp.x.org/contrib/gspreview*

  6.1.3.  xdvi y xtex

  El equivalente para documentos .dvi de ghostview, tiene una curiosa y
  til "lupa" incorporada. Extremadamente legible, viene incluido con la
  mayora de las distribuciones de TeX. Para ver un fichero basta con

  ftp://ftp.x.org/contrib.

  xtex tiene La misma utilidad que xdvi. Disponible en
  ftp://ftp.x.org/contrib/xtex-*.tar.z

  6.2.  Y si no tengo instalado X Window ?

  Instalar X puede ser una mala opcin si su equipo no dispone de
  memoria suficiente ( 8 Mb recomendados para ello ). No se preocupe,
  tambin hay solucin.

  6.2.1.  Ghostscript, de nuevo

  Ghostscript incluye en su distribucin dispositivos para control del
  soporte fsico de los PC; no es una buena solucin para UN*X; Las
  ltimas distribuciones, sin embargo, incluyen soporte para libreras
  VGA de Linux (svgalib). El dispositivo pertinente se llama 'Linux'; la
  orden

       gs -sDEVICE=linux fichero.ps

  mostrar el documento en pantalla. La variable de entorno GSVGAMODE,
  muy importante, fija el modo de vdeo deseado, segn los valores que
  aparecen en el fichero de vgalib vga.h.

  Si no lo tiene en su distribucin, puede obtener el parche en el
  servidor de correo de impresin, o en

  ftp://ws105.zfn.uni-bremen.de/pub/gs261-linuxdriver.sh

  ftp://ws105.zfn.uni-bremen.de/pub/gs261-svgalib.tar.gz

  ftp://ftp.cdrom.com/pub/linux/misc

  y por supuesto, en ftp://sunsite.unc.edu.

  (Pruebe mejor en los diversos duplicados de este lugar. Sunsite est
  normalmente saturado (-- Para los residentes en Espaa,
  ftp://sunsite.rediris.es es un mirror inmejorable.--) ).

  6.2.2.  dvgt

  Permite la visualizacin de ficheros .dvi bajo la librera svgalib, o
  en diferentes clases de terminales grficas, incluyendo vt, tek, o un
  PC corriendo MS-Kermit. Disponible en sunsite.

  7.  Copyright

  Salvo otra disposicin, los documentos COMO de Linux estn registrados
  por sus autores respectivos. Los documentos COMO de Linux pueden ser
  reproducidos y distribuidos en todo o en parte, en cualquier medio
  fsico o electrnico. Las traducciones y similares estn permitidos
  sin necesidad de permiso expreso.

  La redistribucin comercial est permitida y recomendada; sin embargo
  a los autores les gustara tener conocimiento de tales distribuciones.

  Resumiendo: Nos gustara promover la distribucin de esta informacin
  a travs del mayor nmero de canales posible. Sin embargo, nos
  gustara retener los derechos de autor de los documentos COMO, y ser
  informados de cualquier plan para su redistribucin.

  Si tiene dudas, contacte con Greg Hankins (-- En cuanto a coordinacin
  de traducciones al castellano, ver seccin ``''--) el coordinador de
  los COMO de Linux, en greg.hankins@cc.gatech.edu .

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Cortafuegos COMO
  David Rudder, drig@execpc.com
  Traducido por Carlos Garca Arques cgarcia@isabel.dit.upm.es
  Traduccin v0.2, 13 de Agosto de 1996

  El objetivo de este documento es ensear las bases de la instalacin
  de un cortafuegos mediante un PC y Linux. Tambin trata la instalacin
  y el uso de Servidores Proxy, dispositivos estos con los que se con
  sigue un mayor nivel de acceso a la Internet desde detrs de un corta
  fuegos. Titulo original: "Firewalling and Proxy Server HOWTO" Ttulo
  alternativo propuesto por el autor: "The ride of the lonely local area
  network", es decir "La balada de la red local solitaria".
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Realimentacin

  1.2.    Renuncia de Responsabilidad

  1.3.    Propiedad Intelectual

  1.4.    Las Razones para Escribir Esto

  1.5.    Por Hacer

  1.6.    Lecturas de Inters

  2.      Cortafuegos: Conceptos Bsicos

  2.1.    Inconvenientes de los Cortafuegos

  2.2.    Servidores Proxy

  3.      Configuracin

  3.1.    Requerimientos de Hardware

  3.2.    Configurando el Software

  3.3.    Las Direcciones de Red

  3.4.    Pruebas

  3.5.    Seguridad para el Cortafuegos

  4.      Software para Cortafuegos

  4.1.    Paquetes disponibles

  4.2.    El juego de herramientas para cortafuegos de TIS

  4.3.    El Limitador de TCP (TCP Wrapper)

  5.      Instalacin del Servidor Proxy

  5.1.    Configuracin del Servidor Proxy

  5.2.    El Fichero de Control de Acceso

  5.3.    El Fichero de rutado

  5.4.    El Servicio de Nombres tras el Cortafuegos

  5.5.    Trabajar con un Servidor Proxy

  5.5.1.  Unix Para que las aplicaciones funcionen con el servidor
  proxy, hay que "sockificarlas". Ser necesario tener dos telnets
  distintos, uno para la comunicacin directa, y uno para la
  comunicacin a travs del servidor proxy. Socks viene con
  instrucciones de cmo sockificar un programa, as como con un par de
  programas ya sockificados. Si se usa la verson sockificada para
  conectar con algn sitio al que se tiene acceso directo, socks
  cambiar automticamente a la versin para acceso directo (la normal).
  Por esta razn deberemos cambiar el nombre a todos los programas de la
  red protegida y sustituirlos por los sockificados. As "finger" pasar
  a ser "finger.orig", "telnet" a "telnet.orig", etc... . Se debe dar a
  conocer a socks todo esto en el fichero include/socks.h . Algunos
  programas gestionan el rutado y el sockificado ellos mismos. ste es
  el caso de Netscape . Se puede usar un servidor proxy con  Netscape
  simplemente poniendo la direccin del servidor (192.168.2.1 en nuestro
  caso) en el campo SOCKs  del menu Proxys .  Todas las aplicaciones
  necesitarn algn retoque independientemente de cmo manejen la
  existencia de servidores proxy.

  5.5.2.  MS Gindous con el Trumpet Winsock

  5.6.    Cmo conseguir que el Servidor Proxy funcione con UDP

  5.7.    Inconvenientes de los Servidores Proxy

  6.      Configuracin Avanzada

  6.1.    Una gran red con nfasis en la seguridad

  6.1.1.  Configuracin de la Red

  6.1.2.  El Servidor Proxy

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Los cortafuegos han adquirido gran popularidad de un tiempo a esta
  parte como el ltimo grito en seguridad en la Internet. Como la
  mayora de las cosas que la adquieren, con la popularidad han llegado
  los malentendidos.  En este Howto se cubrirn las bases de lo que es
  un cortafuegos, cmo configurar uno, qu servidores proxy hay, cmo
  configurarlos, y las aplicaciones de esta tecnologa fuera del campo
  de la seguridad.

  1.1.  Realimentacin

  Todo apoyo o crtica a este documento ser bienvenido. Estoy buscando
  con especial inters crticas de la gente que usa Macintoshes, ya que
  la informacin que tengo de ellos es escasa. POR FAVOR, COMUNICADME
  CUALQUIER INEXACTITUD EN ESTE DOCUMENTO!!! Soy humano, y puedo cometer
  errores. Si encontris alguno, me interesar mucho conocerlo.
  Intentar contestar a todo el correo, pero estoy ocupado; as que, que
  nadie se ofenda si no lo hago.

  Mi direccin de correo electrnico es drig@execpc.com

  1.2.  Renuncia de Responsabilidad

  Este documento intenta ser una introduccin al funcionamiento de los
  cortafuegos y servidores proxy. No soy, ni pretendo ser, un experto en
  seguridad. Soy simplemente un tipo que ha ledo mucho y al que le
  gustan los ordenadores ms que al resto de la gente. NO SOY
  RESPONSABLE DE NINGN DAO PRODUCIDO POR ACCIONES CON BASE EN ESTE
  DOCUMENTO. Por favor, escribo esto para ayudar a la gente a entender
  el tema, no estoy preparado para hacer depender mi vida de la
  exactitud de lo que hay aqu.

  (-- Nota del Traductor: y yo menos.
  (es decir, suscribo el prrafo anterior, excepto donde dice escribir,
  que debe leerse traducir. Y donde dice experto en seguridad lase
  traductor experto).--)

  1.3.  Propiedad Intelectual

  A no ser que se indique de otra manera, los Howtos de LiNUX son
  propiedad intelectual de sus respectivos autores. Los Howtos de LiNUX
  pueden ser reproducidos y distribuidos en todo o en parte, por
  cualquier medio fsico o electrnico, siempre que este anuncio de
  copyright se mantenga en todas las copias. La redistribucin comercial
  est permitida y se anima a ella.  No obstante, al autor le gustara
  ser informado de cualquiera de tales distribuciones.

  Todas las traducciones, trabajos derivados, o trabajos de recopilacin
  que incorporen cualquier Howto de LiNUX, deben estar cubiertos por
  este copyright. Esto es, no se puede producir ningn trabajo derivado
  de un Howto e imponer restricciones adicionales a su distribucin.
  Pueden ser autorizadas excepciones a estas reglas bajo ciertas
  condiciones. Por favor, contacte con el coordinador de los Howtos de
  LiNUX en la direccin que se da ms abajo.

  Resumiendo, queremos promover la diseminacin de esta informacin a
  travs de todos los cauces posibles. No obstante, deseamos mantener la
  propiedad intelectual de los Howtos, y nos gustara ser advertidos de
  cualquier proyecto de redistribucin de los Howtos.

  Para cualquier pregunta, por favor, contacte con David Rudder
  drig@execpc.com

  1.4.  Las Razones para Escribir Esto

  Hubo muchos artculos en comp.os.linux.* a lo largo de, ms o menos,
  el ao pasado pidiendo ayuda sobre cortafuegos. Pareca como si nadie
  fuera a contestarlos. Supuse que la razn era que nadie saba cmo.
  As que dediqu cierto tiempo a jugar con cortafuegos y a aprender.
  Este documento existe como respuesta a aquellas peticiones.

  1.5.  Por Hacer

    Aprender cmo hacer esto en un Macintosh

    Aprender sobre diferentes paquetes de TCP/IP para Gindous

    Encontrar un buen servidor proxy de UDP que funcione con LiNUX

  1.6.  Lecturas de Inters

    La documentacin del juego de herramientas de TIS

    El Howto del NET-2

    PPP-Como

    El Howto de la Ethernet

    El MINIHowto de las Mltiples Ethernets

    Networking with LiNUX

    La gua del administrador de red TCP/IP de O'Reilly and Associates

  Las herramientas para cortafuegos de TIS traen una coleccin de
  documentos que se encuentran entre los mejores que he ledo sobre
  cortafuegos y asuntos relacionados. En la seccin ``'' se habla ms de
  las herramientas de TIS.

  2.  Cortafuegos: Conceptos Bsicos

  Cortafuegos es el trmino que se emplea para referirse a una franja de
  bosque que se limpia de rboles, vegetacin, y cualquier materia
  inflamable, con el fin de crear una barrera que el fuego de un posible
  incendio no sea capaz de atravesar.

  Un cortafuegos en el mundillo de las redes de ordenadores es un
  dispositivo lgico que protege una red privada del resto de la red
  (pblica). Funcionan as:

  1. Se toma un ordenador con capacidad de rutar (por ejemplo un PC con
     LiNUX)

  2. Se le ponen dos interfaces (por ejemplo interfaces serie, o
     ethernet, o de paso de testigo en anillo (Token Ring), etc...)

  3. Se le deshabilita el reenvo de paquetes IP (IP forwarding)

  4. Se conecta una interfaz a la Internet

  5. Se conecta la otra interfaz a la red que se quiere proteger

  Ahora hay dos redes distintas que comparten un ordenador. El ordenador
  cortafuegos, al que de ahora en adelante llamaremos "cortafuegos",
  puede comunicarse tanto con la red protegida como con la Internet. La
  red protegida no puede comunicarse con la Internet, y la Internet no
  puede comunicarse con la red protegida, dado que hemos deshabilitado
  el reenvo IP en el nico ordenador que las conecta.

  Si se quiere llegar a la Internet desde la red protegida, hay que
  hacer primero un telnet al cortafuegos, y acceder a la Internet desde
  l.  Del mismo modo, para acceder a la red protegida desde la
  Internet, se debe antes pasar por el cortafuegos.

  Este es un mecanismo de seguridad excelente contra ataques desde la
  Internet. Si alguien quiere atacar la red protegida, primero tiene que
  atravesar el cortafuegos. De esta manera el ataque se divide en dos
  pasos, y, por lo tanto, se dificulta. Si alguien quiere atacar la red
  protegida por mtodos ms comunes, como el bombardeo de emails, o el
  nefasto "Gusano de Internet", simplemente no podr alcanzarla. Con
  esto se consigue una proteccin excelente.

  2.1.  Inconvenientes de los Cortafuegos

  El mayor problema de los cortafuegos es que restringen mucho el acceso
  a la Internet desde la red protegida. Bsicamente, reducen el uso de
  la Internet al que se podra hacer desde un terminal. Tener que entrar
  en el cortafuegos y desde all realizar todo el acceso a Internet es
  una restriccin muy seria. Programas como Netscape (pronnciese
  Nescaf), que requieren una conexin directa con la Internet, no
  funcionan desde detrs de un cortafuegos. La solucin a todos estos
  problemas es un Servidor Proxy.

  2.2.  Servidores Proxy

  Los servidores proxy son un invento que permite el acceso directo a la
  Internet desde detrs de un cortafuegos. Funcionan abriendo un socket
  en el servidor y permitiendo la comunicacin con la Internet a travs
  de l.  Por ejemplo: si mi ordenador, drig, estuviera dentro de la red
  protegida y quisiera ver el Web con Netscape, pondra un servidor
  proxy en el cortafuegos. El servidor proxy estara configurado para
  hacer que las peticiones de conexin de mi ordenador al puerto 80 de
  otra mquina, se conectara a su puerto 1080, y l mismo establecera
  una conexin con el puerto 80 de la mquina deseada. A partir de
  entonces reenviara todos los datos de esa conexin a la otra mquina.

  Quien haya usado TIA o TERM se ha encontrado este concepto antes. Con
  estos dos programas se puede redirigir un puerto. Un amigo tena TIA
  configurado para hacer que quien se conectara a la 192.251.139.21
  puerto 4024 lo hiciera a su servidor de Web. El servidor proxy
  funciona as pero al revs. Para conectarnos al puerto 80 de
  cualquiera, debemos usar el puerto 1080 (o cualquier otro que hayamos
  dispuesto) del servidor proxy.

  Lo importante de los servidores proxy es que, bien configurados, son
  completamente seguros. No dejan que nadie entre a travs de ellos.

  3.  Configuracin

  3.1.  Requerimientos de Hardware

  Para nuestro ejemplo, el ordenador es un 486-DX66 con 8 Megas de RAM,
  una particin para Linux de 500 Megas, y una conexin PPP a un
  proveedor de Internet a travs de un mdem de 14.400 bps . Ese es
  nuestro linux bsico.  Para convertirlo en un cortafuegos le aadimos
  una tarjeta Ethernet NE2000. Con ella queda conectado a tres PC'es con
  Gindous 3.1 y Trumpet Winsock, y a dos Sun'es con SunOs. La razn de
  elegir este escenario es que son las dos plataformas con las que estoy
  familiarizado. Imagino que gran parte de lo que cuento aqu es
  factible con Mac'es pero, dado que no uso Mac'es con suficiente
  asiduidad, lo cierto es que no lo s.

  3.2.  Configurando el Software

  As, que ahora tenemos un LiNUX conectado a Internet por una linea PPP
  de 14.400 . Adems tenemos una red Ethernet que conecta el LiNUX y el
  resto de los ordenadores. Lo primero, debemos recompilar el ncleo con
  las opciones apropiadas. En este momento yo echara un vistazo al
  Kernel-Como, al Ethernet-HOWTO, y al NET-3-HOWTO.  Luego tecleara
  "make config":

  Las opciones requeridas son:

  1. Habilitar el Soporte de Red

  2. Habilitar la opcin de red TCP/IP (TCP/IP Networking)

  3. Deshabilitar el reenvio de paquetes IP (CONFIG_IP_FORWARD)

  4. Habilitar la opcin de Cortafuegos IP (IP Firewalling)

  5. Probablemente, habilitar las cuentas IP (IP Accounting). Parece
     razonable, dado que estamos configurando un dispositivo de
     seguridad

  6. Habilitar el Soporte de Dispositivos de Red (Networking Device
     Support)

  7. Habilitar el soporte de PPP y Ethernet, aunque esto depende del
     tipo de interfaces que se tenga en cada caso

  Ahora, recompilamos y reinstalamos el ncleo y rearrancamos la
  mquina.  Las interfaces deberan ser reconocidas en la secuencia de
  arranque para que todo estuviera bien. Si no, habra que repasar los
  Howtos antes mencionados y volverlo a intentar hasta que funcionase.

  3.3.  Las Direcciones de Red

  Esta es la parte interesante. Dado que no queremos que la Internet
  tenga acceso a nuestras mquinas, no necesitamos usar direcciones
  reales. Una buena eleccin es el rango de direcciones de clase C
  192.168.2.xxx, que est designado como rango para pruebas. Es decir,
  nadie lo usa, y no entrar en conflicto con ninguna peticin al
  exterior. De modo que, en esta configuracin, slo se necesita una
  direccin IP real. Las otras se pueden elegir libremente y de ninguna
  manera afectarn a la red.

  Asignamos la direccin IP real al puerto serie del cortafuegos que
  usamos para la conexin PPP. Asignamos 192.168.2.1 a la tarjeta
  Ethernet del cortafuegos. Asignamos a las otras mquinas de la red
  protegida cualquier direccin del rango anterior.

  3.4.  Pruebas

  Lo primero es hacer ping a la internet desde el cortafuegos. Yo antes
  usaba nic.ddn.mil como punto de prueba. No deja de ser una buen sitio,
  pero ha demostrado ser menos fiable de lo que esperaba. Si no funciona
  a la primera, probaremos a hacer pings a otro par de sitios que no
  estn conectados a nuestra red local. Si no funciona es que el PPP
  est mal configurado. Tendramos que volver a leer el Net-3-HOWTO y a
  probar.

  Ahora probaremos a hacer pings entre las mquinas de la red protegida.
  Todas deben ser capaces de hacer ping a las dems. Si no fuera as,
  habra que leer de nuevo el Net-3-HOWTO y trabajar en la red un poco
  ms.

  Ahora, todas las mquinas de la red protegida deben ser capaces de
  hacer pings al cortafuegos. Si no, vuelta atrs. Recuerda: deberan
  ser capaces de hacer ping a la 192.168.2.1, no a la direccin PPP.

  Entonces probaremos a hacer ping a la direccin PPP del cortafuegos
  desde dentro de la red protegida. No debe funcionar. Si funciona es
  que no hemos deshabilitado el Reenvio del Paquetes IP y habr que
  recompilar el ncleo. Al haber asignado a la red protegida la
  direccin 192.168.2.0 ningn paquete ser encaminado a ella por la
  Internet, pero, en cualquier caso, es ms seguro tener el reenvo de
  paquetes IP deshabilitado. Esto deja el control en nuestras manos, no
  en las manos de nuestro proveedor de PPP.

  Finalmente, haremos ping a todas las mquinas de la red protegida
  desde el cortafuegos. Llegados a este punto, no debera haber
  problemas.

  Ya tenemos una disposicin de cortafuegos bsica.

  3.5.  Seguridad para el Cortafuegos

  El cortafuegos no sirve si lo dejamos vulnerable a los ataques.
  Primero echaremos un vistazo al /etc/inetd.conf. Este es el fichero de
  configuracin del as llamado "superservidor" (inetd), que arranca un
  buen nmero de demonios servidores cuando les llega una peticin.

  Entre ellos:

    Telnet

    Talk

    FTP

    Daytime

  Se debe desactivar todo lo que no se necesite. No dudaremos en
  desactivar netstat, systat, tftp, bootp, y finger. Seguramente
  querremos desactivar telnet, y dejar slo rlogin, o viceversa.

  Para desactivar un servicio basta con poner un # al comienzo de la
  linea que se refiera a l.  Despus hay que mandar una seal SIG-HUP
  al proceso inetd tecleando "kill -HUP <pid>", donde <pid> es el nmero
  de proceso de inetd. Esto har que inetd relea su fichero de
  configuracin (inetd.conf) y se reinicie. Lo comprobaremos haciendo un
  telnet al puerto 15 del cortafuegos, el puerto de netstat. Si aparece
  la respuesta de netstatd, no hemos reiniciado inetd correctamente.

  4.  Software para Cortafuegos

  4.1.  Paquetes disponibles

  Un cortafuegos en sentido estricto no necesita ningn software aparte
  del ncleo de LiNUX y los programas bsicos de red (inetd, telnetd y
  telnet, ftpd y ftp). Pero un cortafuegos as es extremadamente
  restrictivo y no muy til.

  As que la gente ha hecho programas para aumentar la utilidad de los
  cortafuegos. El que examinaremos con mayor detalle es un paquete
  llamado "socks", que implementa un servidor proxy. Sin embargo, existe
  otro par de programas que hay que tomar en consideracin. Ahora les
  daremos un rpido repaso.

  4.2.  El juego de herramientas para cortafuegos de TIS

  TIS ha sacado una coleccin de programas para facilitar la realizacin
  de cortafuegos. Bsicamente, los programas hacen lo mismo que el
  paquete Socks, pero tiene una estrategia de diseo diferente.
  Mientras que Socks tiene un nico programa que cubre todas las
  operaciones de la Internet, TIS provee un programa para cada utilidad
  que quiera usar el cortafuegos.

  Para compararlos mejor, veamos el ejemplo del acceso al Web y por
  Telnet.  Con Socks, hay que hacer un fichero de configuracin y poner
  en marcha un demonio. Mediante ese fichero y ese demonio se activan
  tanto el Telnet como el Web, as como cualquier otro servicio que no
  se haya desactivado explcitamente.

  Con las herramientas TIS, se arranca un demonio para el Web y otro
  para el Telnet, y se escribe un fichero de configuracin para cada
  uno. Despus de haber hecho eso, el resto de formas de acceso a
  Internet siguen prohibidas hasta que se configuren explcitamente. Si
  no existe un demonio especial para una determinada utilidad (por
  ejemplo, para talk), hay un demonio "para todo" pero no es ni tan
  flexible, ni tan fcil de configurar como las otras herramientas.

  Esto puede parecer una diferencia menor, pero en realidad es una gran
  diferencia. Socks permite ser desidioso. Con un servidor de Socks mal
  configurado la gente de dentro tiene ms acceso a la Internet del que
  se quera. Con las herramientas TIS, la gente del interior tiene
  solamente el acceso que el administrador del sistema quiera que
  tengan.

  Socks es ms fcil de configurar, ms fcil de compilar, y permite una
  mayor flexibilidad. El juego de herramientas de TIS es mas seguro si
  se quiere controlar a los usuarios de dentro.  Los dos proporcionan
  una proteccin absoluta del exterior.

  4.3.  El Limitador de TCP (TCP Wrapper)

  El limitador de TCP no es una utilidad de cortafuegos, pero sirve para
  algo parecido. Usando el limitador de TCP podemos controlar quin
  tiene acceso a nuestra mquina y a qu servicios, as como registrar
  las conexiones. Tambin ofrece deteccin bsica de impostores.

  El limitador de TCP no se cubre de manera ms extensa aqu por un par
  de razones:

    No es un verdadero cortafuegos.

    Para utilizarlo se tiene que estar directamente conectado a la
     Internet, es decir, se tiene que tener una direccin IP.

    Slo controla la mquina en la que est instalado, y por lo tanto
     no sirve para una red. Los cortafuegos pueden proteger todas las
     mquinas cualquiera que sea su arquitectura. El limitador de TCP no
     funciona en Macintoshes ni en MS Gindouses.

  5.  Instalacin del Servidor Proxy

  El servidor proxy requiere software adicional. ste se puede conseguir
  en:

  ftp://sunsite.unc.edu/pub/LiNUX/system/Network/misc/socks-Linux-
  src.tgz

  Solamente hay un ejemplo de fichero de configuracin en ese
  directorio, se llama "socks-conf". Debemos descomprimir y
  desempaquetar los ficheros en un directorio de nuestro ordenador, y
  seguir las instrucciones de cmo compilarlo. Yo tuve un par de
  problemas compilndolo. Hay que asegurarse de que los Makefiles son
  correctos. Algunos lo son y algunos no.

  Algo importante que hay que advertir es que hay que aadir el servidor
  proxy al /etc/inetd.conf. Se debe aadir la linea:

       socks   stream  tcp     nowait  nobody  /usr/local/etc/sockd    sockd

  para decir a inetd que arranque el servidor cuando se le pida.

  5.1.  Configuracin del Servidor Proxy

  El programa socks necesita dos ficheros de configuracin distintos.
  Uno en el que se le dice qu accesos estn permitidos, y otro para
  dirigir las peticiones al servidor proxy apropiado. El fichero de
  control de acceso debe residir en el servidor. El fichero de rutado
  debe residir en todas las mquinas n*x. Las mquinas DOS y,
  presumiblemente, las Macintosh encaminarn por s mismas.

  5.2.  El Fichero de Control de Acceso

  Con socks4.2 Beta, el fichero de acceso se llama "sockd.conf".
  Debera contener dos tipos de lneas: las de permiso, que contienen
  "permit" y las de prohibicin, que contienen "deny". Cada linea tendr
  tres palabras:

    El identificador (permit/deny)

    La direccin IP

    El modificador de direccin

  El identificador es o permit (permitir) o deny (denegar). Debera
  haber uno de cada.

  La direccin IP se compone de cuatro octetos segn la tpica notacin
  de puntos: p.ej. 192.168.2.0 .

  El modificador de direccin es tambin un nmero de cuatro octetos.
  Funciona como una mscara de red. Hay que verlo como 32 bits (unos o
  ceros). Si el bit es uno, el bit correspondiente de la direccin que
  se comprueba debe coincidir con el bit correspondiente del campo de
  direccin IP.
  Por ejemplo, si la lnea es:

       permit 192.168.2.23 255.255.255.255

  entonces, admitir slo direcciones IP en las que coincidan todos los
  bits de 193.168.2.23, esto es, slo ella misma. La lnea:

       permit 192.168.2.0 255.255.255.0

  admitir todas las direcciones desde la 192.168.2.0 hasta la
  192.168.2.255, la subred de clase C completa. No se debera tener la
  lnea:

       permit 192.168.2.0 0.0.0.0

  dado que permitira cualquier direccin.

  As que, primero, permitimos todas las direcciones que queramos
  permitir, y despus prohibimos el resto. Para permitir a cualquiera
  del rango 192.168.2.xxx, las lneas:

       permit 192.168.2.0 255.255.255.0
       deny 0.0.0.0 0.0.0.0

  funcionarn perfectamente. Observa los primeros "0.0.0.0" en la linea
  de prohibicin. Con un modificador de 0.0.0.0, el campo de la
  direccin IP no importa. Se suele poner todo ceros porque es fcil de
  teclear.

  Se puede poner ms de una lnea de cada clase.

  Tambin se puede autorizar o denegar el acceso a determinados
  usuarios.  Se consigue gracias a la autentificacin del protocolo
  ident. No todos los sistemas soportan ident (incluyendo al Trumpet
  Winsock) de modo que no profundizar en ello. La documentacin que
  viene con socks trata este tema adecuadamente.

  5.3.  El Fichero de rutado

  El fichero de rutado de socks tiene el desafortunado nombre de
  "socks.conf". Y digo que es desafortunado porque se parece tanto al
  del fichero de control de acceso que es fcil confundirlos.

  El fichero de rutado tiene la funcin de decir a los clientes de socks
  cundo usar socks y cundo no. Por ejemplo, en nuestra red la mquina
  192.168.2.3 no necesita usar socks para comunicarse con la 192.168.2.1
  (el cortafuegos), ya que tiene una conexin directa va Ethernet. La
  127.0.0.1, direccin de "vuelta atrs" (que representa a una mquina
  ante ella misma), est definida automticamente. Est claro que no se
  necesita usar socks para hablar con uno mismo.

  Hay tres tipos de entradas:

    deny

    direct

    sockd

  Deny (denegar) le dice a socks que peticiones debe rechazar. Esta
  entrada tiene los mismos tres campos que en sockd.conf, identificador,
  direccin, y modificador. Generalmente, dado que esto tambin es
  manejado por el fichero de control de acceso sockd.conf, el
  modificador se pone a 0.0.0.0 . Si uno quiere impedirse a si mismo
  conectar con un determinado sitio, se puede hacer ponindolo aqu.

  La entrada direct dice para qu direcciones no se debe usar socks.
  stas son todas las direcciones a las que se puede llegar sin usar el
  servidor proxy. De nuevo hay tres campos: identificador, direccin, y
  modificador. Nuestro ejemplo tendra:

  direct 192.168.2.0 255.255.255.0

  Con lo que ira directamente a cualquier mquina de la red protegida.

  La entrada sockd dice cul es la mquina en la que corre el servidor
  de socks. La sintaxis es:

       sockd @=<lista de servidores> <direccion IP> <modificador>

  Observemos la entrada @=. sta permite poner las direcciones IP de una
  lista de servidores proxy. En nuestro ejemplo slo usamos un servidor
  proxy, pero se puede tener muchos para admitir una carga mayor y
  conseguir redundancia frente a fallos.

  La direccin IP y el modificador funcionan como en los otros ejemplos.
  Especifican a qu direcciones se va a travs de los servidores.

  5.4.  El Servicio de Nombres tras el Cortafuegos

  Instalar un Servicio de Nombres detrs de un cortafuegos es
  relativamente simple. No hay ms que instalar el servidor de DNS en la
  mquina que hace de cortafuegos. Luego se hace que todas las mquinas
  tras el cortafuegos usen este servidor de DNS.

  5.5.  Trabajar con un Servidor Proxy

  5.5.1.  Para que las aplicaciones funcionen con el servidor proxy, hay
  que "sockificarlas". Ser necesario tener dos telnets distintos, uno
  para la comunicacin directa, y uno para la comunicacin a travs del
  servidor proxy. Socks viene con instrucciones de cmo sockificar un
  programa, as como con un par de programas ya sockificados. Si se usa
  la verson sockificada para conectar con algn sitio al que se tiene
  acceso directo, socks cambiar automticamente a la versin para
  acceso directo (la normal). Por esta razn deberemos cambiar el nombre
  a todos los programas de la red protegida y sustituirlos por los sock
  ificados. As "finger" pasar a ser "finger.orig", "telnet" a "tel
  net.orig", etc... . Se debe dar a conocer a socks todo esto en el
  fichero include/socks.h . Algunos programas gestionan el rutado y el
  sockificado ellos mismos. ste es el caso de Netscape . Se puede usar
  un servidor proxy con Netscape  simplemente poniendo la direccin del
  servidor (192.168.2.1 en nuestro caso) en el campo SOCKs  del menu
  Proxys .  Todas las aplicaciones necesitarn algn retoque independi
  entemente de cmo manejen la existencia de servidores proxy.  Unix

  5.5.2.  MS Gindous con el Trumpet Winsock

  El Trumpet Winsock lleva incorporada la gestin de servidores proxy.
  En el men "setup" se debe poner la direccin IP del servidor y las
  direcciones de todos los ordenadores a los que se llega directamente.
  l se encargar a partir de entonces de todos los paquetes de salida.

  5.6.  Cmo conseguir que el Servidor Proxy funcione con UDP

  El paquete socks slo funciona con TCP, no con UDP. Esto le quita un
  poco de utilidad. Muchos programas interesantes, (como talk o archie)
  usan UDP. Existe un paquete diseado para funcionar como un servidor
  proxy para paquetes de UDP que se llama UDPrelay. El autor es Tom
  Fitzgerald fitz@wang.com.  Desgraciadamente, en el momento de escribir
  estas lneas, no es compatible con LiNUX.

  5.7.  Inconvenientes de los Servidores Proxy

  Un servidor proxy es ante todo un dispositivo de seguridad.  Usarlo
  para aumentar el nmero de mquinas con acceso a la Internet cuando se
  tienen pocas direcciones IP tiene muchos inconvenientes. Un servidor
  proxy permite un mayor acceso desde dentro de la red protegida al
  exterior, pero mantiene el interior completamente inaccesible desde el
  exterior. Esto significa que no habr conexiones archie, ni talk, ni
  envo directo de correo a los ordenadores de dentro. Estos
  inconvenientes pueden parecer pequeos, pero consideremos los
  siguientes casos:

    Te has dejado un informe que ests haciendo en tu ordenador que
     est dentro de la red protegida por el cortafuegos. Ests en casa y
     decides cambiar algo. No puedes. No puedes llegar a tu ordenador
     dado que est tras el cortafuegos. Intentas entrar en el
     cortafuegos primero, pero como todo el mundo tiene acceso al
     exterior gracias al servidor proxy, no te han abierto cuenta en l.

    Tu hija va a la universidad. Quieres enviarle correo. Tienes
     algunas cosas privadas que comentar con ella, por lo que
     preferiras que el correo llegara directamente a tu mquina.
     Confas plenamente en el administrador de tu sistema, pero, an
     as, es correo privado.

    La incapacidad de manejar paquetes UDP es un gran inconveniente de
     los servidores proxy. Imagino que no por mucho tiempo.

  El FTP crea otro problema con los servidores proxy. Cuando se hace un
  ls, o un get, el servidor de FTP establece una conexin con la mquina
  cliente y manda la informacin por ella. Un servidor proxy no lo
  permitir, as que el FTP no funciona especialmente bien.

  Adems, un servidor proxy es lento. Debido a la gran sobrecarga, casi
  cualquier otro medio de lograr acceso ser ms rpido.

  Resumiendo, si tienes suficientes direcciones IP y no te preocupa la
  seguridad, no uses cortafuegos ni servidores proxy. Si no tienes
  suficientes direcciones IP, pero tampoco te preocupa la seguridad,
  seguramente deberas considerar los "emuladores de IP" como Term,
  Slirp, o TIA.

  Term se puede conseguir en ftp://sunsite.unc.edu, Slirp en
  ftp://blitzen.canberra.edu.au/pub/slirp, y TIA en
  ftp://marketplace.com.

  Van ms rpido, permiten mejores conexiones, y proveen un mayor nivel
  de acceso a la red interior desde la Internet. Los servidores proxy
  estn bien para las redes que tienen muchos ordenadores que quieren
  conectar con la Internet al vuelo, y en las que se quiere poco trabajo
  de mantenimiento tras la instalacin.

  6.  Configuracin Avanzada

  Hay una configuracin que me gustara mostrar antes de dar por
  terminado este documento. La que acabo de comentar bastar seguramente
  para la mayora de la gente. Sin embargo, pienso que el prximo
  ejemplo mostrar una ms avanzada que puede resolver algunas dudas.
  Si tienes preguntas que trascienden lo cubierto hasta aqu, o
  simplemente ests interesado/a en la versatilidad de los servidores
  proxy y los cortafuegos, sigue leyendo.

  6.1.  Una gran red con nfasis en la seguridad

  Digamos, por ejemplo, que eres el lder de la Vigsimo Tercera
  Hermandad de la Discordia de Milwaukee. Te gustara poner una red.
  Tienes 50 ordenadores y una subred de 32 (5 bites) direcciones IP
  (reales). Hay varios niveles de acceso. Se dicen cosas distintas a los
  discpulos segn el nivel en que estn. Obviamente, querrs proteger
  ciertas partes de la red de los discpulos que no estn en ese nivel.

  Renuncia de Responsabilidad: No soy miembro de la Hermandad de la
  Discordia. No conozco su terminologa, ni me importa. Solo los estoy
  usando como ejemplo.  Por favor, mandad todos los frutos de vuestros
  arrebatos de ira a

  Los niveles son:

  1. El nivel externo. ste es el nivel que se ensea a cualquiera.
     Bsicamente es un rollo patatero sobre Eris, Diosa de la Discordia,
     y un montn de chorradas ms.

  2. Iniciado. Este es el nivel para la gente que ha pasado del nivel
     externo. Aqu es donde se les dice que la discordia y la estructura
     son realmente una, y que Eris es tambin Jehov.

  3. Adepto. Aqu es donde se encuentra el verdadero plan. En este nivel
     se guarda toda la informacin de cmo la Sociedad de la Discordia
     va a dominar el mundo gracias a un diablico, aunque jocoso, plan
     que implica a Newt Gingrich, los Cereales Wheaties, O.J. Simpson, y
     quinientos cristales de cuarzo errneamente etiquetados como de 6,5
     MHz.

  6.1.1.  Configuracin de la Red

  Las direcciones IP se disponen as:

    Una direccin es 192.168.2.255, que es la de difusin y por lo
     tanto no utilizable.

    23 de las 32 direcciones IP se asignan a las 23 mquinas accesibles
     desde la Internet.

    Una direccin IP extra es para una mquina LiNUX en esa red.

    Una direccin IP extra es para otra mquina LiNUX en esa red.

    Dos direcciones IP son para el router que los conecta con la
     Internet.

    Cuatro se dejan sin usar, pero se les asignan los nombres paul,
     ringo, john, y george, slo para confundir las cosas un poco.

    Las dos redes protegidas tienen direcciones del tipo 192.168.2.xxx
     .

  Entonces se instalan dos redes, cada una en una habitacin separada.
  Se utilizan Ethernets de infrarrojos, de tal manera que son
  completamente invisibles desde la habitacin exterior. Por suerte, la
  Ethernet de infrarrojos funciona como la normal (o eso creo), de modo
  que podemos pensar en ellas como si fueran Ethernets normales.

  Cada una de esas redes se conecta a una de las mquinas LiNUX a las
  que se asignaron las direcciones IP extras.

  Hay un servidor de ficheros que conecta las dos redes protegidas. Esto
  se debe a que los planes para dominar el mundo implican a algunos de
  los iniciados de mayor nivel. El servidor de ficheros tiene la
  direccin 192.168.2.17 para la red de iniciados, y la 192.168.2.23
  para la de adeptos. Tiene que tener dos direcciones dado que tiene dos
  tarjetas Ethernet. Tiene deshabilitado el reenvio de paquetes IP.

  El reenvio de paquetes IP tambin est deshabilitado en los dos
  LiNUXes.  El router no encaminar paquetes con destino 192.168.2.xxx a
  menos que se le diga explcitamente, as que la Internet en ningn
  caso podra acceder al interior. La razn para deshabilitar el reenvio
  de paquetes IP aqu es para que los paquetes de la red de adeptos no
  lleguen a la de iniciados y viceversa.

  El servidor de NFS puede ser configurado para ofrecer diferentes
  ficheros a las diferentes redes. Esto puede venir al pelo, y unos
  pocos trucos con enlaces simblicos pueden hacer que se compartan los
  ficheros comunes entre todos. Con esta configuracin y otra tarjeta
  Ethernet, el mismo servidor de ficheros puede dar servicio a las tres
  redes.

  6.1.2.  El Servidor Proxy

  Dado que los tres niveles quieren rastrear la Internet para sus
  propios y diablicos propsitos, los tres necesitan tener acceso a
  ella. La red externa est conectada directamente a la Internet, luego
  no tenemos que hacer nada. Las redes de adeptos e iniciados estn
  detrs de sendos cortafuegos, luego es necesario instalar servidores
  proxy para ellas.

  Las dos redes se configurarn de forma muy parecida. Ambas tienen las
  mismas direcciones IP asignadas. Aadir un par de requisitos para
  hacerlo ms interesante:

  1. No se debe poder usar el servidor de ficheros para acceder a la
     Internet Esto le expone a virus y otras cosas desagradables, y es
     bastante importante.

  2. No permitiremos a los Iniciados acceso al World Wide Web. Estn
     formndose, y la adquisicin de ese tipo de informacin podra
     resultar daina.

  As, el fichero sockd.conf en el LiNUX de los iniciados tendr esta
  lnea:

       deny 192.168.2.17 255.255.255.255

  y en la mquina de los adeptos:

       deny 192.168.2.23 255.255.255.255

  Y, el LiNUX de los iniciados tendr esta lnea

       deny 0.0.0.0 0.0.0.0 eq 80

  Que dice que se deniegue a todas las mquinas el acceso al puerto
  igual (eq) a 80, el puerto del http. Esto an permitir el acceso a
  otros servicios, slo impedir el acceso al Web.

  Adems, ambos ficheros contendrn:

       permit 192.168.2.0 255.255.255.0

  para permitir a todos los ordenadores de la red 192.168.2.xxx usar
  este servidor proxy, excepto aquello que ya ha sido prohibido (esto
  es: cualquier acceso desde el servidor de ficheros y el acceso al Web
  desde la red de iniciados)

  El fichero sockd.conf de los iniciados ser ms o menos:

       deny 192.168.2.17 255.255.255.255
       deny 0.0.0.0 0.0.0.0 eq 80
       permit 192.168.2.0 255.255.255.0

  y el de los adeptos ser ms o menos:

       deny 192.168.2.23 255.255.255.255
       permit 192.168.2.0 255.255.255.0

  Con esto todo debera estar configurado correctamente. Cada red est
  aislada como corresponde, con el grado apropiado de interaccin. Todo
  el mundo debera estar contento. Ahora, cuidado con los cristales de
  6,5 MHz...

  7.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  DNS COMO
  Nicolai Langfeldt janl@math.uio.no Traduccin: Pedro Pablo
  Fbrega Martnez pfabrega@arrakis.es Julio 1997
  v1.3.2, 3 Junio 1997

  COMO ser un administrador DNS en poco tiempo.
  ______________________________________________________________________

  ndice General:

  1.      Prembulo

  1.1.    Rollo Legal

  1.2.    Crditos y solicitud de ayuda.

  1.3.    Dedicatoria

  2.      Introduccin.

  3.      Servidor de nombres de ``slo cacheo''.

  3.1.    /var/named/root.cache

  3.2.    /etc/nsswitch.conf

  3.3.    /etc/host.conf

  3.4.    Arranque de named

  4.      Un dominio simple.

  4.1.    Pero primero algo de teora a secas.

  4.2.    Nuestro propio dominio

  4.3.    Relajmonos

  5.      Un ejemplo de dominio real

  5.1.    /etc/named.boot  (o /var/named/named.boot )

  5.2.    /var/named/root.cache

  5.3.    /var/named/zone/127.0.0

  5.4.    /var/named/zone/land-5.com

  5.5.    /var/named/zone/206.6.177

  6.      Mantenimiento

  7.      Configuracin de Conexiones Automticas va telefnica

  8.      PUFs Preguntas de Uso Frecuente (FAQ)

  8.1.    Cmo uso DNS desde dentro de un cortafuegos ( firewall )?

  8.2.    Cmo hago que DNS rote entre las direcciones disponibles para
  un servicio, por ejemplo para www.siempre.ocupado  para obtener
  balanceo de carga o similar?

  8.3.    Quiero configurar DNS en una intranet (cerrada) qu hago?

  8.4.    Mi sistema no tiene el programa ndc . Qu hago?

  8.5.    Cmo configuro un servidor de nombres secundario?

  8.6.    Quiero que bind  se ejecute cuando me desconecto de la red.

  8.7.    Dnde almacena su cach el servidor de nombres? Hay alguna
  forma de controlar el tamao del cach?

  8.8.    Salva named  el cach entre reinicios? Puedo guardarlo?

  9.      Cmo hacerse un gran admin  DNS.

  10.     Traduccin

  11.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Prembulo

     Claves:
        DNS, bind, named, dialup, ppp, slip, Internet, domain, name,
        hosts, resolving

  1.1.  Rollo Legal

  opyright 1995 Nicolai Langfeldt. No modificar sin incluir el
  copyright, distribyalo libremente, pero mantenga el mensaje de
  copyright.

  1.2.  Crditos y solicitud de ayuda.

  Quiero dar las gracias a Arnt Gulbrandsen, quien ley los borradores
  para este trabajo dedicndole mucho de su tiempo y proporcionando
  muchas y muy tiles sugerencias. Tambin quiero dar las gracias a
  aquellas personas que me enviaron sugerencias por email y gracias por
  sus notas. Gracias, me ayudasteis a seguir con esto.

  Esto nunca ser un documento acabado, por favor mandadme correo con
  vuestros problemas y xitos, esto har mejorar este COMO. As que por
  favor mandad dinero, comentarios y/o preguntas a janl@math.uio.no.  Si
  enva un E-mail, por favor asegrese de que su direccin de remitente
  es correcta, recibo un montn de E-mail. Asimismo, por favor lea la
  seccin de las PUF (``PUFs'') antes de enviarme un mail.

  Si quiere traducir este COMO, por favor notifquemelo para que yo
  pueda mantener la pista de las lenguas en las que he sido publicado
  :-).

  1.3.  Dedicatoria

  Este COMO est dedicado a Anne Line Norheim. Aunque ella probablemente
  nunca lo leer porque no es de esa clase de chicas.

  2.  Introduccin.

  Lo que es esto y lo que no es.

  Para los que comienzan, DNS es el Domain Name System (Sistema de
  Nombres de Dominio), las reglas de nomenclatura de las mquinas y el
  software que mapea los nombres a nmeros IP. Este documento COMO trata
  de cmo definir tales conversiones usando un sistema Linux. Una
  conversin es simplemente una asociacin entre dos cosas, en este caso
  un nombre de mquina, como ftp.linux.org y el nmero IP de la mquina,
  199.249.150.4.

  El DNS es, para los no iniciados (Vd. ;-), una de las reas mas opacas
  de la administracin de una red. Este COMO tratar de aclarar algunas
  cosas.

  Este documento describe cmo configurar un servidor de nombres DNS
  simple.  Comenzaremos con un servidor caching only server (-- Servidor
  que se limita a guardar en una cach las IPs de los nombres de mquina
  ms solicitados, obtenindolas de servidores externos.--) , y
  continuaremos con la configuracin de un servidor DNS primario para un
  dominio. Para configuraciones ms complejas puede consultar la seccin
  de PUF (``'') de este documento. Si lo que busca no est descrito
  all, necesitar Documentacin Real.  Volveremos a lo que es la
  Documentacin Real en el ltimo captulo.

  Antes de empezar, debe configurar su sistema convenientemente, de
  forma que pueda hacer telnet desde y hacia su mquina, efectuando
  satisfactoriamente toda clase de conexiones de red, especialmente
  telnet 127.0.0.1 entrando en su propia mquina (comprubelo ahora).
  Tambin necesita que los archivos /etc/host.conf (o
  /etc/nsswitch.conf), /etc/resolv.conf y /etc/hosts sean correctos como
  punto de partida, ya que no explicar sus funciones aqu.  Si NO tiene
  aun esta configuracin y no funciona en red, el NET-2 HOWTO explica
  como hacerlo. Lalo.

  Si est usando SLIP o PPP necesitar que funcionen correctamente. Lea
  el PPP-COMO si no es as.

  Cuando digo ``su mquina'' quiero decir la mquina en la que est
  intentando configurar DNS. No cualquier otra mquina que pueda tener
  en su red.

  Supongo que no est detrs de cualquier clase de cortafuegos
  (firewall) que bloquee peticiones de nombres. Si necesita una
  configuracin especial, vea la seccin PUF (``'').

  El servicio de nombres en Unix es llevado a cabo por un programa,
  llamado named.

  ste forma parte del paquete bind, que es coordinado por Paul Vixie
  para The Internet Software Consortium. named est incluido en la
  mayora de las distribuciones de Linux y generalmente se instala como
  /usr/sbin/named. Si tiene el fichero named probablemente pueda usarlo;
  si no lo tiene, puede obtener el binario en un ftp de Linux, o
  conseguir los ltimos y ms voluminosos fuentes en
  ftp://ftp.vix.com/pub/bind, bien de los subdirectorios de versin
  actual, o de prueba, lo que mejor se adapte a su estilo de vida.

  DNS es una base de datos cuyo mbito es la Red. Tenga cuidado con lo
  que pone en ella. Si pone incongruencias, Vd. y los dems obtendrn
  incongruencias de ella. Mantenga su DNS limpia y consistente y
  conseguir un buen servicio de ella. Aprenda a usarla, administrarla,
  depurarla y ser otro buen administrador, salvando a la red de caer
  sobre sus rodillas sobrecargada por falta de mantenimiento.

  En este documento expongo de forma llana varias cosas que no son
  completamente verdad (son al menos medias verdades). Todo esto lo hago
  en aras de la simplicidad. Todas funcionarn (probablemente ;-) si
  cree en lo que digo.
     Aviso:
        Haga una copia de seguridad de todos los archivos que le indico
        que cambie si ya los tiene, y as si despus si no funciona
        podr volver al principio.

  3.  Servidor de nombres de ``slo cacheo''.

  Un primer ataque a la configuracin DNS, muy til para los usuarios de
  conexiones telefnicas.

  Un servidor de nombres de ``slo cacheo'' (caching only nameserver)
  obtendr la respuesta a las solicitudes de nombre provenientes de su
  red preguntando a servidores externos, recordando la respuesta para la
  prxima vez que lo necesite.

  Lo primero que necesita es el archivo llamado /etc/named.boot.  Este
  archivo es ledo cuando se inicia named. Por ahora contendr
  simplemente:

       ;  Archivo boot de servidor de nombres de solo cacheo:
       ;
       directory /var/named
       ;
       ; tipo          dominio                         fichero o maquina fuente
       cache           .                               root.cache
       primary         0.0.127.in-addr.arpa            pz/127.0.0

     MUY IMPORTANTE:
        En algunas versiones de este documento, en el contenido de los
        archivos que aqu aparecen hay un par de espacios o tabuladores
        antes del primer carcter no blanco. Se supone que estos
        caracteres NO estn en el archivo.  Borre cualquier espacio
        inicial de los archivos que corte y pegue de este COMO.

  La lnea directory indica a named dnde buscar los archivos. Todos los
  archivos indicados a continuacin sern relativos a este directorio.
  /var/named es el directorio correcto de acuerdo con el  LFS, Linux
  File system Standard. As, pz es un directorio bajo /var/named, esto
  es, /var/named/pz.

  3.1.  /var/named/root.cache

  Vamos a describir el archivo llamado /var/named/root.cache nombrado en
  el archivo boot.named.

  /var/named/root.cache debera contener esto:

   .       518400  NS      D.ROOT-SERVERS.NET.
   .       518400  NS      E.ROOT-SERVERS.NET.
   .       518400  NS      I.ROOT-SERVERS.NET.
   .       518400  NS      F.ROOT-SERVERS.NET.
   .       518400  NS      G.ROOT-SERVERS.NET.
   .       518400  NS      A.ROOT-SERVERS.NET.
   .       518400  NS      H.ROOT-SERVERS.NET.
   .       518400  NS      B.ROOT-SERVERS.NET.
   .       518400  NS      C.ROOT-SERVERS.NET.
  ;
  D.ROOT-SERVERS.NET.     3600000 A       128.8.10.90
  E.ROOT-SERVERS.NET.     3600000 A       192.203.230.10
  I.ROOT-SERVERS.NET.     3600000 A       192.36.148.17
  F.ROOT-SERVERS.NET.     3600000 A       192.5.5.241
  G.ROOT-SERVERS.NET.     3600000 A       192.112.36.4
  A.ROOT-SERVERS.NET.     3600000 A       198.41.0.4
  H.ROOT-SERVERS.NET.     3600000 A       128.63.2.53
  B.ROOT-SERVERS.NET.     3600000 A       128.9.0.107
  C.ROOT-SERVERS.NET.     3600000 A       192.33.4.12

  Recuerde lo que dije sobre los espacios iniciales!

  Este archivo describe los servidores de nombres raz en el mundo. Este
  archivo cambiar a lo largo del tiempo y tiene que ser mantenido y
  actualizado con una cierta regularidad.  Vea la seccin de
  mantenimiento (``'') para saber cmo mantenerlo actualizado. Este
  archivo est descrito en la pgina man de named, pero esto es, IMHO
  (-- In My Honest Opinion, EMMO o En Mi Modesta Opinin en
  castellano.--) , ms apropiado para gente que ya comprende named.

  La siguiente lnea de named.boot es la lnea primary.  Explicar su
  uso en un captulo posterior: Por ahora, cree un archivo llamado
  127.0.0 en el subdirectorio pz:

       @               IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                                       1       ; Numero de Serie
                                       28800   ; Tasa de Refresco
                                       7200    ; Tasa de Reintento
                                       604800  ; Caducidad para secundario
                                       86400)  ; Validez para Clientes
                               NS      ns.linux.bogus.
       1                       PTR     localhost.

  A continuacin necesita el archivo /etc/resolv.conf, que ser algo
  similar a este:

       search subdominio.su-dominio.edu su-dominio.edu
       nameserver 127.0.0.1

  La lnea `search' especifica en qu dominios se buscara para
  cualquier nombre de mquina a la que quiera conectar. La lnea
  `nameserver' especifica la direccin de su servidor de nombres, en
  este caso su propia mquina, ya que es ah donde named se estar
  ejecutando. Si quiere una lista de varios servidores ponga una lnea
  nameserver para cada uno. (Nota: named nunca lee este archivo, lo hace
  el resolutor que usa named).

  Para ilustrar lo que hace este archivo:
  a fulano, fulano.subdominio.su-dominio.edu se probar primero, a
  continuacin fulano.su-dominio.edu, y finalmente fulano. Si un cliente
  intenta buscar sunsite.unc.edu, sunsite.unc.edu.subdominio.su-
  dominio.edu se prueba primero (s, es tonto, pero es as como tiene
  que ser), despus sunsite.unc.edu.su-dominio.edu, y finalmente
  sunsite.unc.edu. Puede que no quiera poner demasiados dominios en la
  lnea search, lleva su tiempo el efectuar las bsquedas.

  El ejemplo supone que pertenece al dominio subdominio.su-dominio.edu,
  su mquina probablemente se llame su-maquina.subdominio.su-
  dominio.edu. La lnea search no debera contener su TLD (Top Level
  Domain o Dominio de Nivel Superior, `edu' en este caso).  Si necesita
  conectar frecuentemente con mquinas de otro dominio, puede aadir ese
  dominio a la lnea search como sigue:

       search subdominio.su-dominio.edu su-dominio.edu otro-dominio.com

  y as sucesivamente. Obviamente necesita poner un dominio real en su
  lugar. Por favor, dse cuenta de la falta de puntos al final de estos
  nombres de dominio.

  Lo siguiente, dependiendo de su versin de la librera libc puede
  necesitar arreglar /etc/nsswitch.conf o /etc/host.conf.  Si ya tiene
  nsswitch.conf corregiremos ste, en otro caso arreglaremos host.conf.

  3.2.  /etc/nsswitch.conf

  Se trata de un extenso archivo donde se especifica de dnde obtener
  las diferentes clases de tipos de datos, y de cul archivo o base de
  datos.  Generalmente contiene comentarios tiles al comienzo, que por
  cierto debera considerar leer ahora. Despus busque la lnea que
  comienza por hosts:, debe leerse:

       hosts:      files dns

  Si no hay una lnea que comience por `hosts:' pngala. Eso indica que
  los programas deben mirar primero en el fichero /etc/hosts , y despus
  comprobar DNS de acuerdo con resolv.conf.

  3.3.  /etc/host.conf

  Probablemente contiene varias lneas, una de ellas debera comenzar
  con order y tendra que parecerse a lo siguiente:

  order hosts,bind

  Si no hay una lnea order tiene que incluirla.  Esto le indica a las
  rutinas de resolucin de nombres que busquen primero en /etc/hosts, y
  pregunte luego al servidor de nombres (que dijo en resolv.conf que
  est en 127.0.0.1). Estos dos ltimos archivos estn documentados en
  la pgina de manual resolv (8) (haciendo man 8 resolv)  en la mayora
  de las distribuciones Linux. Esta pgina de manual es de obligada
  lectura IMHO, y todos, especialmente los administradores DNS, deberan
  leerla. Hgalo ahora, si se dice a s mismo ``lo har ms tarde''
  entonces nunca lo har.

  3.4.  Arranque de named

  Despus de todo esto, ya es hora de iniciar named.  Si est utilizando
  una conexin telefnica, conctese primero. Teclee ndc start y
  presione return, sin opciones. Si tiene problemas intente
  /usr/sbin/ndc start en su lugar.  Si el problema persiste vea la
  seccin PUF (``''). Ahora ya puede comprobar su configuracin. Si mira
  en el archivo de mensajes de syslog (generalmente llamado
  /var/adm/messages, o en el directorio /var/log) mientras inicia named,
  (haga tail -f /var/adm/messages) debera ver algo como esto:

        Jun 30 21:50:55 roke named[2258]: starting.  named 4.9.4-REL Sun Jun 30 21:29:03 MET DST 1996
                                   janl@roke.slip.ifi.uio.no:/var/tmp/bind/named
        Jun 30 21:50:55 roke named[2258]: cache zone "" loaded (serial 0)
        Jun 30 21:50:55 roke named[2258]: primary zone "0.0.127.in-addr.arpa" loaded (serial 1)

  Si hay cualquier mensaje de error se deber a alguna equivocacin.
  named determinar el archivo que ocasiona el error (de named.boot o
  root.cache espero :-). Mate a named y vuelva a comprobar el archivo.

  Ahora es el momento de iniciar nslookup para examinar su trabajo:

            $ nslookup
            Default Server:  localhost
            Address:  127.0.0.1

            >

  Si es eso lo que obtiene entonces est funcionando.  Eso espero. En
  cualquier otro caso, vuelva atrs y comprubelo todo. Cada vez que
  cambie el archivo named.boot tiene que reinicializar named usando el
  comando ndc restart.

  Ahora puede introducir una consulta. Intente buscar alguna mquina
  cercana a la suya. pat.uio.no est cerca de m, en la Universidad de
  Oslo:

       > pat.uio.no
       Server:  localhost
       Address:  127.0.0.1

       Name:    pat.uio.no
       Address:  129.240.2.50

  nslookup ahora solicita a named que busque la mquina pat.uio.no.
  Contactar con alguna de las mquinas servidoras de nombres nombradas
  en el archivo root.cache, y preguntar all.  Puede tardar un poco
  antes de conseguir el resultado ya que busca todos los dominios
  indicados en /etc/resolv.conf.

  Si intenta de nuevo obtendr esto:

            > pat.uio.no
            Server:  localhost
            Address:  127.0.0.1

            Non-authoritative answer:
            Name:    pat.uio.no
            Address:  129.240.2.50

  Nota a la lnea ``Non-authoritative answer:'' : le dedicaremos un poco
  de tiempo. Esto significa que named no sale de la red para preguntar
  esta vez, en su lugar mira en su cach y lo encuentra all. Pero la
  informacin de la cach puede no estar actualizada. Entonces informa
  de este peligro (de modo un tanto eufemstico) con Non-authorative
  answer:. Cuando nslookup dice esto la segunda vez que pregunta por una
  mquina, es un signo seguro de que named almacena la informacin en la
  cach y que est funcionando. Ahora puede salir de nslookup usando el
  comando exit.

  Si es un usuario de conexiones telefnicas, (ppp, slip) por favor lea
  la seccin sobre conexiones telefnicas (``''), hay algunas
  advertencias para Vd.

  Ahora ya sabe cmo configurar un servidor de nombres de ``slo
  cacheo''.  Tmese una cerveza, un vaso de leche o cuaquier otra cosa
  que prefiera para celebrarlo.

  4.  Un dominio simple.

  Como configurar su propio dominio.

  4.1.  Pero primero algo de teora a secas.

  Antes de comenzar realmente con esta seccin, voy a dar un poco de
  teora sobre cmo funciona DNS.  Y lo va a leer porque ser mejor para
  Vd.  Si no quiere, al menos debera echar un vistazo rpido. Deje el
  repaso cuando sepa lo que debe incluir en su archivo named.boot.

  El DNS es un sistema jerrquico. La raz se escribe como `.' y se
  denomina `root'. Debajo hay cierto nmero de Dominios de Nivel
  Superior (Top Level Domains, TLDs), los ms conocidos son ORG, COM,
  EDU y NET, pero hay muchos ms.

  Cuando se busca una mquina, la pregunta procede recursivamente en la
  jerarqua comenzando desde arriba. Si quiere localizar la direccin de
  prep.ai.mit.edu, su servidor de nombres ha de encontrar primero un
  servidor de nombres que sirva a edu. Pregunta al servidor archivo
  root.cache), y el servidor . proporcionar una lista de servidores
  edu:

            $ nslookup
            Default Server:  localhost
            Address:  127.0.0.1

  Comienza preguntando a un servidor raz.

            > server c.root-servers.net.
            Default Server:  c.root-servers.net
            Address:  192.33.4.12

  Pone el tipo de peticin (Query) a NS (Name Server records).

       > set q=ns

  Pregunta por edu.

       > edu.

  El punto (".") final aqu es significativo, indica al servidor que le
  pedimos un edu que est justo debajo de ".", y esto reduce la bsqueda
  un poco.

       edu     nameserver = A.ROOT-SERVERS.NET
       edu     nameserver = H.ROOT-SERVERS.NET
       edu     nameserver = B.ROOT-SERVERS.NET
       edu     nameserver = C.ROOT-SERVERS.NET
       edu     nameserver = D.ROOT-SERVERS.NET
       edu     nameserver = E.ROOT-SERVERS.NET
       edu     nameserver = I.ROOT-SERVERS.NET
       edu     nameserver = F.ROOT-SERVERS.NET
       edu     nameserver = G.ROOT-SERVERS.NET
       A.ROOT-SERVERS.NET      internet address = 198.41.0.4
       H.ROOT-SERVERS.NET      internet address = 128.63.2.53
       B.ROOT-SERVERS.NET      internet address = 128.9.0.107
       C.ROOT-SERVERS.NET      internet address = 192.33.4.12
       D.ROOT-SERVERS.NET      internet address = 128.8.10.90
       E.ROOT-SERVERS.NET      internet address = 192.203.230.10
       I.ROOT-SERVERS.NET      internet address = 192.36.148.17
       F.ROOT-SERVERS.NET      internet address = 192.5.5.241
       G.ROOT-SERVERS.NET      internet address = 192.112.36.4

  Esto nos dice que *.root-servers.net sirve a edu., y as podemos
  seguir preguntando a C. Ahora queremos saber quin sirve el siguiente
  nivel del nombre de dominio: mit.edu.

            > mit.edu.
            Server:  c.root-servers.net
            Address:  192.33.4.12

            Non-authoritative answer:
            mit.edu nameserver = STRAWB.mit.edu
            mit.edu nameserver = W20NS.mit.edu
            mit.edu nameserver = BITSY.mit.edu

            Authoritative answers can be found from:
            STRAWB.mit.edu  internet address = 18.71.0.151
            W20NS.mit.edu   internet address = 18.70.0.160
            BITSY.mit.edu   internet address = 18.72.0.3

  steawb, w20ns y bitsy sirven a mit, selecciona uno y pregunta por
  ai.mit.edu:

            > server W20NS.mit.edu.

  Los nombres de mquina no son sensibles a maysculas/minsculas, pero
  como yo uso el ratn para cortar y pegar, obtengo una copia tal y como
  aparece en la pantalla.

       Server:  W20NS.mit.edu
       Address:  18.70.0.160

       > ai.mit.edu.
       Server:  W20NS.mit.edu
       Address:  18.70.0.160

       Non-authoritative answer:
       ai.mit.edu      nameserver = WHEATIES.AI.MIT.EDU
       ai.mit.edu      nameserver = ALPHA-BITS.AI.MIT.EDU
       ai.mit.edu      nameserver = GRAPE-NUTS.AI.MIT.EDU
       ai.mit.edu      nameserver = TRIX.AI.MIT.EDU
       ai.mit.edu      nameserver = MUESLI.AI.MIT.EDU

       Authoritative answers can be found from:
       AI.MIT.EDU      nameserver = WHEATIES.AI.MIT.EDU
       AI.MIT.EDU      nameserver = ALPHA-BITS.AI.MIT.EDU
       AI.MIT.EDU      nameserver = GRAPE-NUTS.AI.MIT.EDU
       AI.MIT.EDU      nameserver = TRIX.AI.MIT.EDU
       AI.MIT.EDU      nameserver = MUESLI.AI.MIT.EDU
       WHEATIES.AI.MIT.EDU     internet address = 128.52.32.13
       WHEATIES.AI.MIT.EDU     internet address = 128.52.35.13
       ALPHA-BITS.AI.MIT.EDU   internet address = 128.52.32.5
       ALPHA-BITS.AI.MIT.EDU   internet address = 128.52.37.5
       GRAPE-NUTS.AI.MIT.EDU   internet address = 128.52.32.4
       GRAPE-NUTS.AI.MIT.EDU   internet address = 128.52.36.4
       TRIX.AI.MIT.EDU internet address = 128.52.32.6
       TRIX.AI.MIT.EDU internet address = 128.52.38.6
       MUESLI.AI.MIT.EDU       internet address = 128.52.32.7
       MUESLI.AI.MIT.EDU       internet address = 128.52.39.7

  Entonces weaties.ai.mit.edu es un servidor de nombres para ai.mit.edu:

            > server WHEATIES.AI.MIT.EDU.
            Default Server:  WHEATIES.AI.MIT.EDU
            Addresses:  128.52.32.13, 128.52.35.13

  Ahora cambia el tipo de solicitud; ha encontrado el servidor de
  nombres y va a preguntar todo lo que queremos saber sobre
  prep.ai.mit.edu.

       > set q=any
       > prep.ai.mit.edu.
       Server:  WHEATIES.AI.MIT.EDU
       Addresses:  128.52.32.13, 128.52.35.13

       prep.ai.mit.edu CPU = dec/decstation-5000.25    OS = unix
       prep.ai.mit.edu
               inet address = 18.159.0.42, protocol = tcp
                #21 #23 #25 #79
       prep.ai.mit.edu preference = 1, mail exchanger = life.ai.mit.edu
       prep.ai.mit.edu internet address = 18.159.0.42
       ai.mit.edu      nameserver = alpha-bits.ai.mit.edu
       ai.mit.edu      nameserver = wheaties.ai.mit.edu
       ai.mit.edu      nameserver = grape-nuts.ai.mit.edu
       ai.mit.edu      nameserver = mini-wheats.ai.mit.edu
       ai.mit.edu      nameserver = trix.ai.mit.edu
       ai.mit.edu      nameserver = muesli.ai.mit.edu
       ai.mit.edu      nameserver = count-chocula.ai.mit.edu
       ai.mit.edu      nameserver = life.ai.mit.edu
       ai.mit.edu      nameserver = mintaka.lcs.mit.edu
       life.ai.mit.edu internet address = 128.52.32.80
       alpha-bits.ai.mit.edu   internet address = 128.52.32.5
       wheaties.ai.mit.edu     internet address = 128.52.35.13
       wheaties.ai.mit.edu     internet address = 128.52.32.13
       grape-nuts.ai.mit.edu   internet address = 128.52.36.4
       grape-nuts.ai.mit.edu   internet address = 128.52.32.4
       mini-wheats.ai.mit.edu  internet address = 128.52.32.11
       mini-wheats.ai.mit.edu  internet address = 128.52.54.11
       mintaka.lcs.mit.edu     internet address = 18.26.0.36

  De esta forma comenzando en . ha encontrado los sucesivos servidores
  de nombre para el siguiente nivel en el nombre de dominio. Si ha usado
  su propio servidor DNS en lugar de usar todos esos otros servidores,
  su named, desde luego, habr almacenado en el cach toda la
  informacin que haya encontrado mientras profundizaba en la bsqueda,
  y en consecuencia no tendr que preguntar de nuevo durante un tiempo.

  Se habla mucho menos sobre l, pero un dominio importante es in-
  addr.arpa. Tambin est anidado como los dominios nombre de la mquina
  cuando conocemos su direccin IP. Una cosa importante aqu es observar
  que que las direcciones IP estn escritas en orden inverso en el
  dominio in-addr.arpa. Si tiene la direccin de mquina 192.128.52.43,
  named procede como para el ejemplo de prep.ai.mit.edu: Busca los
  servidores arpa..  Busca los servidores in-addr.arpa., los servidores
  192.in-addr.arpa., los servidores 128.192.in-addr.arpa. , y los
  servidores 52.128.192.in-addr.arpa. y finalmente, los registros
  necesarios para 43.52.128.192.in-addr.arpa. Inteligente? (Diga `s').
  La inversin de nmeros puede ser confusa los 2 primeros aos.

  He contado una mentira. DNS no funciona como he dicho de forma
  literal.  Pero es bastante parecido.

  4.2.  Nuestro propio dominio

  Ahora vamos a definir nuestro propio dominio.  Vamos a crear el
  dominio linux.bogus y definir mquinas en l. Uso un nombre de dominio
  totalmente falso para estar seguro de que no molestamos a nadie de
  fuera.

  Ya hemos comenzado esta parte con la siguiente lnea en named.boot:

       primary         0.0.127.in-addr.arpa            pz/127.0.0

  Por favor tome nota de la ausencia de `.' al final de los nombres de
  dominio en este archivo. La primera lnea nombra al archivo pz/127.0.0
  como definicin de 0.0.127.in-addr.arpa. Ya hemos configurado este
  archivo, en l podremos leer:

       @               IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                                       1       ; Numero de Serie
                                       28800   ; Tasa de Refresco
                                       7200    ; Tasa de Reintento
                                       604800  ; Caducidad para secundario
                                       86400)  ; Tiempo de Validez para Clientes
                               NS      ns.linux.bogus.
       1                       PTR     localhost.

  Por favor observe los `.' al final de los nombres de dominio completo
  en contraste con el archivo named.boot anterior. A algunas personas
  les gusta iniciar cada zona del archivo con una directiva $ORIGIN,
  pero esto es superfluo. El origen (lugar de la jerarqua DNS a donde
  pertenece) de un fichero de zona se especifica en la columna dominio
  del archivo named.boot; en este caso es 0.0.127.in-addr.arpa.

  Este ``fichero de zona'' contiene tres registros de recursos (RRs): Un
  RR SOA, Un RR NS y un RR PTR.  SOA es una abreviatura de Start Of
  Authority. La `@' es una notacin especial que simboliza el origen, y
  como la columna dominio para este archivo indica 0.0.127.in-addr.arpa.
  La primera lnea realmente significa:

              0.0.127.IN-ADDR.ARPA. IN      SOA ...

  NS es el RR Name Server (Servidor de Nombres), e indica a DNS qu
  mquina es el servidor de nombres del dominio. Y finalmente el
  registro PTR tiene valor 1 (igual a 1.0.0.127.IN-ADDR.ARPA, esto es,
  127.0.0.1) que es el localhost de named.

  El registro SOA es el prembulo de todos los archivos de zona y debe
  haber uno exactamente en cada archivo de zona, como primer registro de
  todos. El registro SOA describe la zona, de dnde proviene (una
  mquina llamada linux.bogus), quin es el responsable de su contenido
  (hostmaster@linux.bogus), qu versin del archivo de zona es (Numero
  de Serie, 1), y otras cosas que tienen que ver con el cach y los
  servidores secundarios DNS. Para el resto de los campos (Tasa de
  Refresco, Tasa de Reintento, Caducidad para secundario y Tiempo de
  Validez para Clientes) use los valores que aparecen aqu para mayor
  seguridad.

  El registro NS nos indica quin efecta el servicio DNS para
  0.0.127.in-addr.arpa, que es ns.linux.bogus. El registro PTR nos dice
  que 1.0.0.127.in-addr.arpa (aka 127.0.0.1) es conocido como localhost.

  Ahora reiniciamos named (el comando es ndc restart) y usamos nslookup
  para examinar lo que ha hecho:
            $ nslookup

            Default Server:  localhost
            Address:  127.0.0.1

            > 127.0.0.1
            Server:  localhost
            Address:  127.0.0.1

            Name:    localhost
            Address:  127.0.0.1

  as obtiene localhost de 127.0.0.1, bien. Ahora para nuestra tarea
  principal, el dominio linux.bogus, inserte una nueva lnea, primary,
  en named.boot:

       primary               linux.bogus                     pz/linux.bogus

  Observe que contina la ausencia de "." final en el nombre de dominio
  del archivo named.boot.

  En el archivo de zona de linux.bogus pondremos algunos datos
  totalmente falsos (-- N del T
  bogus en ingls significa precisamente falso.--) :

       ;
       ; Fichero de zona para linux.bogus
       ;
       ; Minimo indspensable para tener funcionando un dominio
       ;
       @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                               199511301       ; Numero de serie, fecha de hoy + n. de serie de hoy
                               28800           ; Tasa de Refresco, en segundos
                               7200            ; Tasa de Reintento, en segundos
                               3600000         ; Caducidad para secundario, en segundos
                               86400 )         ; Tiempo de Validez para Clientes, en segundos
                       NS      ns.linux.bogus.
                       NS      ns.friend.bogus.
                       MX      10 mail.linux.bogus   ; Intercambiador de Correo Primario
                       MX      20 mail.friend.bogus. ; Intercambiador de Correo Secundario

       localhost       A       127.0.0.1
       ns              A       127.0.0.2
       mail            A       127.0.0.4

  Deben de observarse dos cosas sobre los registros SOA.  ns.linux.bogus
  debe ser una mquina actual con un registro A. No es legal tener un
  registro CNAME para la mquina mencionada en el registro SOA. Su
  nombre no necesita ser ns, podra ser cualquier nombre legal de
  mquina. A continuacin, en hostmaster.linux.bogus deber aparecer
  algo como hostmaster@linux.bogus; esto sera un alias de email, o una
  cuenta de correo, donde la(s) persona(s) que realizan el mantenimiento
  de DNS deberan leer con frecuencia el correo. Cualquier email
  respecto del dominio ser mandado a la direccin aqu indicada. El
  nombre no tiene por que ser hostmaster, puede ser cualquier direccin
  email legal, pero la direccin email hostmaster funcionar bien.

  Hay un nuevo tipo de RR en este archivo, el MX, o Mail eXchanger. Este
  indica el sistema de correo a donde mandar el correo dirigido a
  alguien@linux.bogus, pudiendo ser tambin mail.linux.bogus o
  mail.friend.bogus.  El nmero que precede a cada nombre de mquina es
  la prioridad del RR MX.  El RR con el nmero ms bajo (10) es aquel al
  que el correo ser enviado primero.  Si este falla, puede ser mandado
  a otro con un nmero ms alto, que ser gestor secundario de correo,
  como mail.friend.bogus que tiene una prioridad 20 aqu.

  Reinicie named ejecutando ndc restart.  Examine los resultados con
  nslookup:

            $ nslookup
            > set q=any
            > linux.bogus
            Server:  localhost
            Address:  127.0.0.1

            linux.bogus
                    origin = linux.bogus
                    mail addr = hostmaster.linux.bogus
                    serial = 199511301
                    refresh = 28800 (8 hours)
                    retry   = 7200 (2 hours)
                    expire  = 604800 (7 days)
                    minimum ttl = 86400 (1 day)
            linux.bogus     nameserver = ns.linux.bogus
            linux.bogus     nameserver = ns.friend.bogus
            linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus
            linux.bogus     preference = 20, mail exchanger = mail.friend.bogus
            linux.bogus     nameserver = ns.linux.bogus
            linux.bogus     nameserver = ns.friend.bogus
            ns.linux.bogus  internet address = 127.0.0.2
            mail.linux.bogus        internet address = 127.0.0.4

  Con un examen cuidadoso podr descubrir un error. La lnea

              linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus

  est equivocada. Debera ser

              linux.bogus     preference = 10, mail exchanger = mail.linux.bogus

  Comet el error de forma deliberada para que aprenda de l :-) Mirando
  en el archivo de zona podemos ver que la lnea

            @               MX      10 mail.linux.bogus     ; Intercambiador de Correo Primario

  no tiene punto. O tiene demasiados linux.bogus.  Si un nombre de
  mquina no termina en punto en un archivo de zona, el origen es
  aadido a su final. As,

       @               MX      10 mail.linux.bogus.    ; Intercambiador de Correo Primario

  o

       @               MX      10 mail                 ; Primary Mail Exchanger

  sern correctos. Yo prefiero la ltima forma, hay que escribir menos.
  En un archivo de zona el dominio debera ser escrito y terminado con
  un punto, o no debe ser incluido, en cuyo caso se referir al origen
  por defecto.  Debo hacer hincapi que en el archivo named.boot no
  debera haber puntos despus de los nombres de dominio. No tiene ni
  idea de cuantas veces un '.' por estar o por no estar ha hecho fallar
  toda una configuracin y ha confundido horrorosamente a la gente...

  Una vez hecha esta puntualizacin, he aqu el nuevo archivo de zona,
  con algo de informacin extra tambin:

  ;
  ; Archivo de zona para  linux.bogus
  ;
  ; minimo indispensable para hacer funcionar un dominio
  ;
  @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                          199511301       ; Numero de Serie, fecha de hoy + n. de serie de hoy
                          28800           ; Tasa de Refresco, en segundos
                          7200            ; Tasa de Reintento, en segundos
                          604800          ; Caducidad para secundario, en segundos
                          86400 )         ; Validez para Clientes, en segundos

                  NS      ns              ; Direccion de Internet del servidor de nombres
                  NS      ns.friend.bogus.
                  MX      10 mail         ; Intercambiador de Correo Primario
                  MX      20 mail.friend.bogus. ; Intercambiador de Correo Secundario

  localhost       A       127.0.0.1
  ns              A       127.0.0.2
  mail            A       127.0.0.4
  ;
  ; Extras
  ;
  @               TXT     "Linux.Bogus, your DNS consultants"

  ns              MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "Pentium" "Linux 1.2"
                  TXT     "RMS"
  richard         CNAME   ns
  www             CNAME   ns

  donald          A       127.0.0.3
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "i486"  "Linux 1.2"
                  TXT     "DEK"

  mail            MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "386sx" "Linux 1.0.9"

  ftp             A       127.0.0.5
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "P6" "Linux 1.3.59"

  Puede que quiera desplazar los tres primeros registros tipo A
  (localhost, ns y mail) junto con los otros registros de su mismo tipo
  (donald, mail, y ftp), en vez de colocarlos separados al principio
  como aqu.

  Hay varios registros nuevos aqu: HINFO (Host INFOrmation), tiene dos
  partes, es una buena costumbre poner comillas a cada uno. La primera
  parte es el hardware o CPU de la mquina, y la segunda parte
  corresponde al software o Sistema Operativo de la misma.  ns tiene una
  CPU Pentium con Linux 1.2. El registro TXT es un texto en formato
  libre que puede usar para cualquier cosa que le interese.  CNAME
  (Canonical NAME) es una forma de dar a cada mquina varios nombres.
  Por tanto richard y www son alias para ns.  Es importante observar que
  los registros A, MX, CNAME y SOA nunca deben hacer referencia al
  registro CNAME, slo pueden referirse a registros A.

       fulanito  CNAME   richard                 ; NO!!!

  siendo correcto tener

       fulanito  CNAME   ns                      ; SI!!!

  Tambin es importante observar que CNAME no es un nombre de mquina
  legal para direcciones de correo: webmaster@www.linux.bogus es una
  direccin email ilegal dada en la configuracin anterior. Encontrar
  muy pocos administradores de correo de Ah Afuera que recomienden esta
  regla, incluso si a Vd. le funciona.  La forma de evitar esto es usar
  un registro A (y quizs algunos otros tambin, como un registro MX) en
  su lugar:

       www     A       127.0.0.2

  Paul Vixie, el principal gur de named recomienda no usar CNAME.  Por
  tanto considere el no utilizarlo seriamente.

  Cargue la nueva base de datos ejecutando ndc reload, esto provoca la
  lectura de sus archivos de nuevo.

            $ nslookup
            Default Server:  localhost
            Address:  127.0.0.1

            > ls -d linux.bogus

  Esto hara que todos los registros fuesen listados.

       [localhost]
        linux.bogus.       SOA   ns.linux.bogus hostmaster.linux.bogus. (199511301 28800 7200 604800 86400)
        linux.bogus.       NS    ns.linux.bogus
        linux.bogus.       NS    ns.friend.bogus
        linux.bogus.       MX    10   mail.linux.bogus
        linux.bogus.       MX    20   mail.friend.bogus
        linux.bogus.       TXT   "Linux.Bogus, your DNS consultants"
        localhost          A     127.0.0.1
        mail               A     127.0.0.4
        mail               MX    10   mail.linux.bogus
        mail               MX    20   mail.friend.bogus
        mail               HINFO 386sx       Linux 1.0.9
        donald             A     127.0.0.3
        donald             MX    10   mail.linux.bogus
        donald             MX    20   mail.friend.bogus
        donald             HINFO i486        Linux 1.2
        donald             TXT   "DEK"
        www                CNAME ns.linux.bogus
        richard            CNAME ns.linux.bogus
        ftp                A     127.0.0.5
        ftp                MX    10   mail.linux.bogus
        ftp                MX    20   mail.friend.bogus
        ftp                HINFO P6          Linux 1.3.59
        ns                 A     127.0.0.2
        ns                 MX    10   mail.linux.bogus
        ns                 MX    20   mail.friend.bogus
        ns                 HINFO Pentium     Linux 1.2
        ns                 TXT   "RMS"
        linux.bogus.       SOA   ns.linux.bogus hostmaster.linux.bogus. (199511301 28800 7200 604800 86400)

  Esto est bien. Comprobemos qu dice para www slo:

            > set q=any
            > www.linux.bogus.
            Server:  localhost
            Address:  127.0.0.1

            www.linux.bogus canonical name = ns.linux.bogus

  www.linux.bogus es ns.linux.bogus

            linux.bogus     nameserver = ns.linux.bogus
            linux.bogus     nameserver = ns.friend.bogus
            ns.linux.bogus  internet address = 127.0.0.2

  y ns.linux.bogus tiene la direccin 127.0.0.2. Parece correcto
  tambin.

  4.3.  Relajmonos

  Desde luego, este dominio es falso, y como tal son todas sus
  direcciones, y quizs, desafortunadamente sea un poco confuso. Para un
  ejemplo real de dominio vea la siguiente seccin.

  5.  Un ejemplo de dominio real

  Donde describiremos algunos archivos de zona reales.

  Los usuarios han sugerido que incluya un ejemplo real de dominio que
  est en funcionamiento como explicacin de las diferencias entre un
  dominio en funcionamiento y el ejemplo falso que no era del todo muy
  claro.

  Una cosa sobre este ejemplo: NO lo introduzca en su servidor de
  nombres!.  selo slo como lectura de referencia. Si quiere
  experimentar, hgalo con el ejemplo falso. Yo uso este ejemplo con
  permiso de David Bullock y LAND-5. Estos archivos eran los usados el
  24 de Septiembre de 1996, y podran diferir de los que encuentre si
  pregunta ahora al servidor de nombres LAND-5. Tambin tenga en mente
  eliminar los espacios iniciales ;-).

  5.1.  /etc/named.boot  (o /var/named/named.boot )

  Aqu encontramos la lneas primary para las dos zonas que necesitamos:
  la red 127.0.0.0 y tambin la subred 206.6.177 de LAND-5. Una lnea
  primary para la zona de redireccin (forward) land-5.com de land-5.
  Observe tambin que en lugar de situar los archivos en un directorio
  llamado pz, como hago en este COMO, l los sita en un directorio
  llamado zone.

       ;  Fichero de arranque para el servidor de nombres LAND-5
       ;
       directory /var/named
       ;
       ; tipo          dominio                         fichero o maquina origen
       cache           .                               root.cache
       primary         0.0.127.in-addr.arpa            zone/127.0.0
       primary         177.6.206.in-addr.arpa          zone/206.6.177
       primary         land-5.com                      zone/land-5.com

  5.2.  /var/named/root.cache

  Tenga en cuenta que este archivo vara con mucha frecuencia, y que el
  listado de aqu es viejo. Mejor utilice uno producido ahora.

  ; <<>> DiG 2.1 <<>>
  ;; res options: init recurs defnam dnsrch
  ;; got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6
  ;; flags: qr rd ra; Ques: 1, Ans: 9, Auth: 0, Addit: 9
  ;; QUESTIONS:
  ;;      ., type = NS, class = IN

  ;; ANSWERS:
   .       518357  NS      H.ROOT-SERVERS.NET.
   .       518357  NS      B.ROOT-SERVERS.NET.
   .       518357  NS      C.ROOT-SERVERS.NET.
   .       518357  NS      D.ROOT-SERVERS.NET.
   .       518357  NS      E.ROOT-SERVERS.NET.
   .       518357  NS      I.ROOT-SERVERS.NET.
   .       518357  NS      F.ROOT-SERVERS.NET.
   .       518357  NS      G.ROOT-SERVERS.NET.
   .       518357  NS      A.ROOT-SERVERS.NET.

  ;; ADDITIONAL RECORDS:
  H.ROOT-SERVERS.NET.     165593  A       128.63.2.53
  B.ROOT-SERVERS.NET.     165593  A       128.9.0.107
  C.ROOT-SERVERS.NET.     222766  A       192.33.4.12
  D.ROOT-SERVERS.NET.     165593  A       128.8.10.90
  E.ROOT-SERVERS.NET.     165593  A       192.203.230.10
  I.ROOT-SERVERS.NET.     165593  A       192.36.148.17
  F.ROOT-SERVERS.NET.     299616  A       192.5.5.241
  G.ROOT-SERVERS.NET.     165593  A       192.112.36.4
  A.ROOT-SERVERS.NET.     165593  A       198.41.0.4

  ;; Total query time: 250 msec
  ;; FROM: land-5 to SERVER: default -- 127.0.0.1
  ;; WHEN: Fri Sep 20 10:11:22 1996
  ;; MSG SIZE  sent: 17  rcvd: 312

  5.3.  /var/named/zone/127.0.0

  Lo bsico, el registro obligatorio SOA, y el registro que mapea
  127.0.0.1 a localhost. Se requieren ambos. No debera haber ninguno
  ms en este fichero. Probablemente nunca se necesitar actualizarlo,
  salvo que cambien su servidor de nombres o la direccin del
  hostmaster.

       @               IN      SOA     land-5.com. root.land-5.com. (
                                       199609203   ; Numero de Serie
                                       28800   ; Tasa de Refresco
                                       7200    ; Tasa de Reintento
                                       604800  ; Caducidad para secundario
                                       86400)  ; Validez para clientes
                               NS      land-5.com.

       1                       PTR     localhost.

  5.4.  /var/named/zone/land-5.com

  Aqu vemos el registro SOA y los registros NS necesarios. Podemos
  observar que dispone de un servidor de nombres secundario ns2.psi.net.
  Esto es como debe ser, tenga siempre un servidor secundario de
  seguridad. Tambin podemos ver que tiene una mquina principal llamada
  land-5 que se encarga de todos los diferentes servicios, y que se ha
  hecho usando CNAME (una alternativa al uso de los registros A).

  Como puede ver en el registro SOA, el origen del archivo de zona es
  land-5.com, la persona de contacto es root@land-5.com. hostmaster es
  otro uso frecuente para la persona de contacto. El nmero de serie en
  el formato habitual yyyymmdd con el nmero de serie de hoy aadido;
  esta es probablemente la sexta versin del archivo de zona del 20 de
  Septiembre de 1996.  Recuerde que el nmero de serie debe
  incrementerse montonamente, aqu hay slo un dgito para las series
  de hoy, as que despus de 9 ediciones tendr que esperar hasta maana
  antes de poder editar el el archivo de nuevo. Considere el uso de dos
  dgitos.

  @       IN      SOA     land-5.com. root.land-5.com. (
                          199609206       ; Numero de Serie, fecha de hoy + numero de serie de hoy
                          10800           ; Tasa de Refresco, en segundos
                          7200            ; Tasa de Reintento, en segundos
                          10800           ; Caducidad para secundario, en segundos
                          86400 )         ; Validez para Clientes, en segundos
                  NS      land-5.com.
                  NS      ns2.psi.net.
                  MX      10 land-5.com.  ; Intercambiador Primario de Correo

  localhost       A       127.0.0.1

  router          A       206.6.177.1

  land-5.com.     A       206.6.177.2
  ns              CNAME   land-5.com.
  ftp             CNAME   land-5.com.
  www             CNAME   land-5.com.
  mail            CNAME   land-5.com.
  news            CNAME   land-5.com.

  funn            A       206.6.177.3
  illusions       CNAME   funn.land-5.com.
  @               TXT     "LAND-5 Corporation"

  ;
  ;       Estaciones de Trabajo
  ;
  ws_177200       A       206.6.177.200
                  MX      10 land-5.com.   ; Primary Mail Host
  ws_177201       A       206.6.177.201
                  MX      10 land-5.com.   ; Primary Mail Host
  ws_177202       A       206.6.177.202
                  MX      10 land-5.com.   ; Primary Mail Host
  ws_177203       A       206.6.177.203
                  MX      10 land-5.com.   ; Primary Mail Host
  ws_177204       A       206.6.177.204
                  MX      10 land-5.com.   ; Primary Mail Host
  ws_177205       A       206.6.177.205
                  MX      10 land-5.com.   ; Primary Mail Host
  ; {Muchas definiciones repetitivas borradas}
  ws_177250       A       206.6.177.250
                  MX      10 land-5.com.   ; Primary Mail Host
  ws_177251       A       206.6.177.251
                  MX      10 land-5.com.   ; Primary Mail Host
  ws_177252       A       206.6.177.252
                  MX      10 land-5.com.   ; Primary Mail Host
  ws_177253       A       206.6.177.253
                  MX      10 land-5.com.   ; Primary Mail Host
  ws_177254       A       206.6.177.254
                  MX      10 land-5.com.   ; Primary Mail Host

  Otra cosa a tener en cuenta es que las estaciones de trabajo no tienen
  nombres propios, sino un prefijo seguido por las dos ltimas porciones
  de los nmeros IP. Usar tal convencin puede simplificar el
  mantenimiento significativamente, pero puede resultar un poquito
  impersonal.

  5.5.  /var/named/zone/206.6.177

  Comentar este archivo despus.

       @               IN      SOA     land-5.com. root.land-5.com. (
                                       199609206  ; Numero de Serie
                                       28800   ; Tasa de Refresco
                                       7200    ; Tasa de Reintento
                                       604800  ; Caducidad para secundario
                                       86400)  ; Validez para Clientes
                               NS      land-5.com.
                               NS      ns2.psi.net.
       ;
       ;       Servidores
       ;
       1       PTR     router.land-5.com.
       2       PTR     land-5.com.
       3       PTR     funn.land-5.com.
       ;
       ;       Estaciones de Trabajo
       ;
       200     PTR     ws_177200.land-5.com.
       201     PTR     ws_177201.land-5.com.
       202     PTR     ws_177202.land-5.com.
       203     PTR     ws_177203.land-5.com.
       204     PTR     ws_177204.land-5.com.
       205     PTR     ws_177205.land-5.com.
       ; {Eliminadas muchas definiciones repetitivas}
       250     PTR     ws_177250.land-5.com.
       251     PTR     ws_177251.land-5.com.
       252     PTR     ws_177252.land-5.com.
       253     PTR     ws_177253.land-5.com.
       254     PTR     ws_177254.land-5.com.

  La zona de resolucin inversa es la parte de la configuracin que
  parece crear ms dolores de cabeza. Se usa para encontrar el nombre de
  la mquina a partir de su direccin IP. Ejemplo: suponga que est en
  un servidor irc y acepta conexiones de clientes irc.  El servidor irc
  es noruego y slo quiere aceptar conexiones de clientes de Noruega y
  otros pases escandinavos. Cuando se produce una conexin de un
  cliente, la librera C es capaz de indicar el nmero IP de la mquina
  conectada porque el nmero IP del cliente est contenido en todos los
  paquetes que se pasan a travs de la red. Ahora puede llamar a una
  funcin llamada gethostbyaddr que busca el nombre de la mquina dada
  su direccin IP.

  gethostbyaddr interrogar a un servidor DNS el cual efectuar una
  bsqueda DNS para la mquina. Suponiendo que la conexin cliente viene
  de ws_177200.land-5.com, la direccin IP que la librera C proporciona
  al servidor irc ser 206.6.177.200. Para encontrar el nombre de la
  mquina necesitamos encontrar 200.177.6.206.in-addr.arpa. El servidor
  DNS primero encuentra los servidores arpa., despus los servidores in-
  addr.arpa., a continuacin sigue por 206, 6 y al final busca el
  servidor para la zona 177.6.206.in-addr.arpa en land-5. Aqu obtendr
  finalmente que para 200.177.6.206.in-addr.arpa tenemos un registro
  `PTR ws_177200.land-5.com', que significa que el nombre que va con
  206.6.177.200 es ws_177200.land-5.com. Como con la explicacin de cmo
  buscar prep.ai.mit.edu, esto es ligeramente ficticio.

  Volviendo al ejemplo del servidor irc.  El servidor irc slo acepta
  conexiones de los pases escandinavos, osea, *.no, *.se, y *.dk; el
  nombre ws_177200.land-5.com claramente no se ajusta a ninguno de
  ellos, y el servidor denegar la conexin. Si no hubiese habido
  resolucin inversa de 206.2.177.200 mediante la zona in-addr.arpa el
  servidor habra sido incapaz de de encontrar el nombre y habra tenido
  que comparar 206.2.177.200 con *.no, *.se y *.dk, es decir, cifras con
  nombres, ninguna de las cuales concordara.

  Algunas personas le dirn que la resolucin inversa slo es importante
  para los servidores, o que no tienen importancia. No es as;  muchos
  servidores de ftp, news, irc e incluso algunos servidores http (WWW)
  NO aceptarn conexiones de mquinas de las cuales no son capaces de
  resolver el nombre. Por tanto el mapeo inverso de mquinas es de hecho
  obligatorio.

  6.  Mantenimiento

  Mantenindolo en funcionamiento.

  Hay una tarea de mantenimiento que tiene que realizar con named,
  adems de mantenerlo en funcionamiento. Esta tarea es mantener el
  archivo root.cache actualizado. La forma ms fcil es usar dig,
  primero ejecute dig sin argumentos, conseguir root.cache de acuerdo
  con su propio servidor.  Entonces pregunte a alguno de los servidores
  raz listados con

       dig @rootserver

  Podr observar que la salida se parece terriblemente al archivo
  root.cache excepto por un par de nmeros extras. Esos nmeros no
  ocasionan problemas. Gurdelo en un archivo

       dig @rootserver . ns > root.cache.new

  y sustituya el antiguo root.cache con l.

  Recuerde reiniciar named despus de sustituir el archivo cach.

  Al Longyear me envi este script que puede ser ejecutado
  automticamente para actualizar root.cache, instale una entrada en el
  crontab para ejecutarlo una vez al mes y olvdese.  El script supone
  que trabaja con correo y que el alias de mail hostmaster est
  definido. Debe editarlo para ajustarlo a su configuracin.

  #!/bin/sh
  #
  # Actualizacion del cache del servidor de nombres una vez al mes.
  # Esto es ejecutado automaticamente mediante una entrada de cron
  #
  (
   echo "To: hostmaster <hostmaster>"
   echo "From: system <root>"
   echo "Subject: Actualizacion automatica del fichero named.boot"
   echo

   export PATH=/sbin:/usr/sbin:/bin:/usr/bin:
   cd /var/named

   dig @rs.internic.net . ns >root.cache.new

   echo "El fichero named.boot ha sido actualizado para contener la
  siguiente informacion:"
   echo
   cat root.cache.new

   chown root.root root.cache.new
   chmod 444 root.cache.new
   rm -f root.cache.old
   mv root.cache root.cache.old
   mv root.cache.new root.cache
   ndc restart
   echo
   echo "El servidor de nombres ha sido rearrancado a fin de asegurar que la
  actualizacion es completa."
   echo "El anterior fichero root.cache se ha renombrado a /var/named/root.cache.old."
  ) 2>&1 | /usr/lib/sendmail -t
  exit 0

  Alguno de ustedes puede haber observado que el archivo root.cache est
  tambin disponible mediante ftp en Internic. Por favor NO utilice ftp
  para actualizar root.cache, el mtodo anterior es mucho ms amistoso
  con la red.

  7.  Configuracin de Conexiones Automticas va telefnica.

  Esta seccin explica cmo he dispuesto las cosas para automatizarlo
  todo.  Mi mtodo puede que no se adapte completamente al suyo, pero
  puede obtener ideas de algunas de las cosas que he hecho. Tambin, uso
  ppp para marcar, mientras que mucha gente usa slip o cslip y por tanto
  casi toda su configuracin puede ser distinta a la ma.  Pero el
  programa de slip dip debera poder hacer muchas de las cosas que yo
  hago.

  Normalmente, cuando no estoy conectado a la red tengo un archivo
  resolv.conf que simplemente contiene la lnea

            domain uio.no

  Eso me asegura que no tengo que esperar a que la librera de
  resolucin de nombres del sistema intente conectar con un servidor de
  nombres que no puede ayudarme.  Pero cuando me conecto quiero arrancar
  mi named y tener un resolv.conf parecido a los descritos
  anteriormente. He resuelto esto teniendo dos archivos resolv.conf
  llamados resolv.conf.local y resolv.conf.connected. El ltimo se
  parece al resolv.conf descrito anteriormente en este documento.

  Para conectarme automticamente a la red ejecuto un script llamado
  ppp-on:

       #!/bin/sh
       echo llamando...
       pppd

  pppd tiene un archivo llamado options que indica las caractersticas
  de la conexin. Una vez que mi conexin ppp est activa pppd llama a
  un script llamado ip-up (este est descrito en la pgina pppd (8) de
  man). He aqu una parte del script:

       #!/bin/sh
       interface="$1"
       device="$2"
       speed="$3"
       myip="$4"
       upip="$5"
        ...
       cp -v /etc/resolv.conf.connected /etc/resolv.conf
        ...
       /usr/sbin/named

  Es decir, arranco el named desde aqu. Cuando se corta la conexin
  ppp, pppd ejecuta un script llamado ip-down:

       #!/bin/sh
       cp /etc/resolv.conf.local /etc/resolv.conf
       read namedpid < /var/run/named.pid
       kill $namedpid

  As configuramos las cosas de una forma cuando estamos conectados y
  las desconfiguramos cuando nos desconectamos.

  Algunos programas, irc y talk me vienen a la mente, hacen algunas
  suposiciones, y para que en irc el comportamiento de las capacidades
  dcc, y talk funcionen bien tiene que modificar su archivo hosts.  Yo
  he insertado en mi script ip-up lo siguiente:

       cp /etc/hosts.ppp /etc/hosts
       echo $myip      roke >>/etc/hosts

  hosts.ppp simplemente contiene

       127.0.0.1       localhost

  y echo inserta la direccin IP que he recibido para mi nombre de host
  (roke). Vd. deber usar en su lugar el nombre de su mquina. Este
  nombre se puede saber con el comando hostname.

  Probablemente no sea inteligente ejecutar named cuando no est
  conectado a la red, esto es porque named intentar enviar solicitudes
  a la red y eso consume tiempo, y Vd. tendr que esperar este tiempo
  cada vez que algn programa intente resolver un nombre. Si est usando
  conexiones telefnicas debera iniciar named cuando se conecte y
  matarlo cuando se desconecte. Pero por favor lea la seccin de PUF
  (``'') para los trucos.

  A algunas personas le gusta usar la directiva forwarders para
  conexiones de escasa velocidad. Si su proveedor de Internet tiene
  servidores DNS en 1.2.3.4 y 1.2.3.5 puede insertar la lnea

       forwarders 1.2.3.4 1.2.3.5

  en el archivo named.boot.  Deje tambin vaco el archivo root.cache.
  Esto disminuir el trfico IP que origina su mquina.  Esto es
  especialmente importante si paga por cada byte que circule por el
  cable. Tiene el valor aadido de evitarle el deber del mantenimiento;
  no tiene porqu actualizar un archivo root.cache vaco.

  8.  PUFs Preguntas de Uso Frecuente (FAQ)

  En esta seccin incluyo algunas de las preguntas ms frecuentes
  realizadas relativas a DNS y este COMO. Y las respuestas :-) Por
  favor, lea esta seccin antes de enviarme correo electrnico.

  8.1.  Cmo uso DNS desde dentro de un cortafuegos ( firewall )?

  Unas cuantas pistas:  `forwarders', `slave', y echar un vistazo a la
  literatura que hay al final de este COMO.

  8.2.  servicio, por ejemplo para www.siempre.ocupado  para obtener
  balanceo de carga o similar?  Cmo hago que DNS rote entre las direc
  ciones disponibles para un

  Haga varios registros A para www.siempre.ocupado y use bind 4.9.3 o
  posterior. bind har una rotacin tipo round-robin de las respuestas.
  Esto no funcionar con versiones anteriores de bind.

  8.3.  Quiero configurar DNS en una intranet (cerrada) qu hago?

  Elimine el archivo de cach y haga los archivos de zona. Eso tambin
  significa que nunca tendr que actualizar el archivo de cach.

  8.4.  Mi sistema no tiene el programa ndc . Qu hago?

  El bind instalado en su sistema es viejo y de alguna forma obsoleto.
  Si la seguridad es importante para Vd.: actualice bind inmediatamente.
  Si no, de todas formas podr vivir con ello. En lugar de ejecutar ndc
  start ejecute named; ndc reload ser named.reload y ndc restart ser
  named.restart. Esos programas probablemente estarn en /usr/sbin.

  8.5.  Cmo configuro un servidor de nombres secundario?

  Si el servidor primario tiene la direccin 127.0.0.1, ponga la
  siguiente lnea en el archivo named.boot de su secundario:

             secondary     linux.bogus             127.0.0.1       sz/linux.bogus

  8.6.  Quiero que bind  se ejecute cuando me desconecto de la red.

  He recibido este mail de Ian Clark, ic@deakin.edu.au donde explica la
  forma de hacer esto:

  ``Ejecuto named en la mquina que hace masquerading aqu. Tengo dos
  archivos root.cache, uno llamado root.cache.real que contiene el
  servidor de nombres raz real y el otro llamado root.cache.falso que
  contiene...

                 ; root.cache.falso
                 ; este archivo no contiene informacion

  Cuando dejo de estar conectado copio el archivo root.cache.falso en
  root.cache y reinicio named.

  Cuando me conecto copio root.cache.real en root.cache y reinicio
  named.

  Esto se hace desde ip-down & ip-up respectivamente.

  La primera vez que efecto una consulta off line sobre un nombre de
  dominio del cual named no tiene detalles, ste pone una entrada como
  esta en messages...

                 Jan 28 20:10:11 hazchem named[10147]: No root nameserver for class IN

  con la cual puedo convivir sin problemas.

  Esto ciertamente parece funcionarme. Puedo usar el servidor de nombres
  para mquinas locales mientras no estoy conectado sin el retraso con
  nombres de dominio externos, y cuando s estoy conectado, funciona de
  forma normal con dominios externos.''

  8.7.  forma de controlar el tamao del cach?  Dnde almacena su
  cach el servidor de nombres? Hay alguna

  El cach se almacena en memoria completamente.  No se escribe en disco
  en ningn momento. Cada vez que mata a named se pierde el cach. El
  cach no es controlable de ninguna forma, named lo maneja de acuerdo
  con unas reglas simples. No puede controlar ni el cach ni su tamao
  de ninguna forma ni por ningn motivo. Si quiere, puede cambiar esto
  tocando los fuentes de named, lo cual no es recomendable.

  8.8.  Salva named  el cach entre reinicios? Puedo guardarlo?

  No, named no salva el cach cuando muere. Esto significa que el cach
  se debe reconstruir de nuevo cada vez que mate y reinicie named. No
  hay forma de hacer que named salve el cach en un archivo. Si quiere,
  puede cambiar esto tocando los fuentes de named, lo cual no es
  recomendable.

  9.  Cmo hacerse un gran admin  DNS.

  Documentacin y herramientas.

  Existe Documentacin Real. En lnea e impresa. Se requiere la lectura
  de esta documentacin para seguir los pasos de pequeo a gran admin
  DNS. En formato impreso el libro estndar es DNS and BIND de C. Liu y
  P.  Albitz de O'Reilly & Associates, Sebastopol, CA, ISBN
  0-937175-82-X. Lo le, es excelente. Hay tambin una seccin sobre DNS
  en TCP/IP Network Administration, de Craig Hunt de O'Reilly..., ISBN
  0-937175-82-X. Otros libros necesarios para un Buenos Administradores
  DNS (o bueno para cualquier cosa de la materia) es Zen and the Art of
  Motorcycle Maintenance de Robert M.  Prisig :-) Disponible con ISBN
  0688052304 y otros.

  Puede encontrar material en lnea en http://www.dns.net/dnsrd/,
  http://www.vix.com/isc/bind/; una PUF, un manual de referencia (BOG;
  Bind Operations Guide) as como papers y definicin de protocolos y
  diversos retoques o hacks de DNS (stos y la mayora, si no todas las
  referencias mencionadas arriba, estn tambin contenidas en la
  distribucin de bind).  No he ledo la mayora, pero tampoco soy un
  gran admin DNS.  Arnt Gulbrandsen, por otra parte ha ledo el BOG y
  est extasiado con l :-). El grupo de noticias comp.protocols.tcp-
  ip.domains es sobre DNS. En suma, hay un gran nmero de RFCs sobre
  DNS, las ms importantes son probablemente las siguientes:

     RFC 2052
        A. Gulbrandsen, P. Vixie, A DNS RR for specifying the location
        of services (DNS SRV), Octubre de 1996

     RFC 1918
        Y. Rekhter, R. Moskowitz, D. Karrenberg, G. de Groot, E. Lear,
        Address Allocation for Private Internets, 02/29/1996.
     RFC 1912
        D. Barr, Common DNS Operational and Configuration Errors,
        02/28/1996.

     RFC 1713
        A. Romao, Tools for DNS debugging, 11/03/1994.

     RFC 1712
        C. Farrell, M. Schulze, S. Pleitner, D. Baldoni, DNS Encoding of
        Geographical Location, 11/01/1994.

     RFC 1183
        R. Ullmann, P. Mockapetris, L. Mamakos, C. Everhart, New DNS RR
        Definitions, 10/08/1990.

     RFC 1035
        P. Mockapetris, Domain names - implementation and specification,
        11/01/1987.

     RFC 1034
        P. Mockapetris, Domain names - concepts and facilities,
        11/01/1987.

     RFC 1033
        M. Lottor, Domain administrators operations guide, 11/01/1987.

     RFC 1032
        M. Stahl, Domain administrators guide, 11/01/1987.

     RFC 974
        C. Partridge, Mail routing and the domain system, 01/01/1986.

  10.  Traduccin

  Este documento ha sido traducido por

  Pedro Pablo Fbrega Martnez, pfabrega@arrakis.es

  Si encontris mejoras, aadidos o fallos, de cualquier tipo,
  indicdmelo para mejorar el documento.

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Diald Como
  Andrs Seco AndresSH@ctv.es
  v1.0, 15 de Febrero de 2000

  Este documento trata de mostrar varios escenarios tpicos de uti
  lizacin de Diald para facilitar su puesta en marcha.  Los escenarios
  presentados varan desde una conexin para uso personal en un equipo
  conectado mediante mdem y PPP a un proveedor de servicios de internet
  (ISP), de manera que no haya que utilizar scripts del tipo pon/poff o
  ppp-on/ppp-off, hasta un servidor proxy/firewall con diferentes ISPs
  para acceder a internet.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Objetivos

  1.2.    Nuevas versiones

  1.3.    Agradecimientos

  2.      Copyright y renuncia de responsabilidad

  3.      Descripcin rpida del funcionamiento de Diald

  4.      Notas sobre la identificacin en el momento de la conexin

  4.1.    Usuario y contrasea - Login y password

  4.2.    PAP - Password Authentication Protocol

  4.3.    CHAP - Challenge Authentication Protocol

  5.      Notas sobre la resolucin de nombres DNS

  6.      Conexin mediante mdem y PPP de un puesto aislado a un ISP

  6.1.    Fichero /etc/diald/diald.options  o diald.conf

  6.2.    Fichero de filtros personal

  6.3.    Realizacin de la llamada

  6.4.    Archivo de comandos de inicio de la conexin

  7.      Conexin mediante modem y PPP de un puesto aislado a varios
  ISPs no simultneamente

  7.1.    Nota sobre la entrega de correo mediante un servidor de
  reenvo (relay host)

  7.2.    Archivos de comandos para automatizar la creacin de las
  multiples conexiones y su intercambio

  7.2.1.  Puesta en marcha

  7.2.2.  Nuevo proveedor

  7.2.3.  Cambio de uno a otro

  8.      Conexin mediante modem y PPP de un proxy/firewall a un ISP

  8.1.    Ejemplo para Debian 2.1

  8.2.    Ejemplo para Suse 6.1

  8.3.    Ejemplo para Slackware 3.6

  9.      Programas y versiones utilizados

  10.     Ms informacin

  11.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  1.1.  Objetivos

  Este documento trata de mostrar varios escenarios tpicos de
  utilizacin de Diald para facilitar su puesta en marcha.

  Los escenarios presentados varan desde una conexin para uso personal
  en un equipo conectado mediante mdem y PPP a un proveedor de
  servicios de internet (ISP), de manera que no haya que utilizar
  scripts del tipo pon/poff o ppp-on/ppp-off, hasta un servidor
  proxy/firewall con diferentes ISPs para acceder a internet.

  En el presente documento se tratan los siguientes escenarios:

    Conexin mediante mdem y PPP de un equipo aislado a un proveedor
     de servicios de internet (ISP).

    Conexin mediante mdem y PPP de un equipo aislado a varios
     proveedores de servicios de internet (ISPs) no simultneamente.

    Conexin mediante mdem y PPP de un proxy/firewall a un proveedor
     de servicios de internet (ISP).

  En sucesivas versiones de este documento se cubrirn otros escenarios,
  como mltiples instancias de Diald en ejecucin, uso de lineas RDSI y
  lineas usadas tanto para generar llamadas como para recibirlas.

  Anteriormente, exista un Diald-mini-Como realizado por Harish Pillay
  h.pillay@ieee.org, que presentaba una conexin a un ISP usando
  autentificacin basada en chat (login y password previos al arranque
  de pppd, sin usar PAP ni CHAP).

  En el documento se incluirn ficheros de configuracin de ejemplo que
  servirn para la puesta en marcha. Para obtener el mximo rendimiento
  y usar todas las caractersticas de los programas que se utilizarn
  ser necesario leer la documentacin adjunta a cada programa y
  reconfigurar dichos ficheros de configuracin que se incluyen como
  ejemplos.

  As mismo, los directorios en los que se sitan los ficheros de
  configuracin pueden variar dependiendo de la distribucin Linux que
  se use. Si en la distribucin de Linux que usted usa algn fichero se
  encuentra en directorio diferente al indicado, por favor, hgamelo
  saber para incluir una nota al respecto.

  1.2.  Nuevas versiones

  La ultima versin de este documento puede ser encontrada en mi pagina
  web http://www.ctv.es/USERS/andressh/linux, en formato SGML y HTML.
  Otras versiones y formatos pueden ser encontrados en castellano en el
  Insflug, http://www.insflug.org/documentos/Diald-Como/, y en otros
  idiomas en el LDP - Proyecto de Documentacin de Linux,
  http://www.linuxdoc.org.

  1.3.  Agradecimientos

  Quiero dar las gracias a las personas que me ayudaron a poner en
  marcha mi primer Diald con sus ficheros de ejemplo (alguien de quien
  no me acuerdo como se llamaba, Mr Cornish Rex y Hoo Kok Mun), a los
  que me han aportado sugerencias y correcciones a este documento, a los
  futuros traductores de este documento a otros idiomas y sobre todo a
  la gente que ha desarrollado y desarrolla Diald para los que lo
  usamos.

  2.  Copyright y renuncia de responsabilidad

  Este documento es copyright  2000 Andres Seco, y es un documento
  libre. Puede distribuirlo bajo los trminos de la GNU General Public
  License, que puede encontrar en http://www.gnu.org/copyleft/gpl.html.
  Una copia de sta traducida al castellano la puede encontrar en
  http://visar.csustan.edu/~carlos/gpl-es.html.

  La informacin y otros contenidos en este documento son lo mejor de
  mis conocimientos. Sin embargo, he podido cometer errores. As que
  debera determinar si desea seguir las instrucciones que se encuentran
  en este documento.

  Nadie es responsable de cualquier dao en sus ordenadores y cualquier
  otra prdida por el uso de la informacin contenida aqu.

  EL AUTOR Y MANTENEDORES NO SON RESPONSABLES DE CUALQUIER DAO
  INCURRIDO A CAUSA DE ACCIONES TOMADAS EN BASE A LA INFORMACIN
  CONTENIDA EN ESTE DOCUMENTO.

  Por supuesto, estoy abierto a todo tipo de sugerencias y correcciones
  sobre el contenido de este documento.

  3.  Descripcin rpida del funcionamiento de Diald

  En pocas palabras, Diald lo que hace es generar un interfaz de red
  nuevo y establecerlo como ruta por defecto. Este interfaz no es real
  (en la documentacin original lo llaman proxy interface). Diald
  monitoriza este interfaz y cuando llegan paquetes hacia l, lanza la
  conexin ppp, espera a que se establezca y cambia la direccin de la
  ruta por defecto sobre la nueva interface ppp (normalmente ppp0).

  Diald controla qu paquetes han llegado al interface y de qu tipo
  para decidir si los considera a efectos de lanzar la conexin ppp,
  mantenerla activa, hacerla caer o no hacer nada, y en caso de que
  hayan sido paquetes para tener en cuenta, cunto tiempo debe estar
  levantado el interface despus de que haya llegado el paquete.

  Finalmente, si no hay ms trfico y se acaba el tiempo de espera que
  el ltimo de los paquetes enviados estableci, Diald finaliza la
  conexin.

  Asimismo, es posible controlar los das y horas a los que se puede
  conectar y los que no, de modo que se puedan aprovechar tarifas bajas
  u horarios de bajo trfico.

  Hasta aqu, la descripcin es vlida tanto para la versin 0.16.5 de
  Diald como para las posteriores, pero las versiones posteriores a esta
  tambin incluyen funcionalidades adicionales, tales como lista de
  permisos para decidir a qu usuarios se aplican las normas que deciden
  si el enlace se levanta, se mantiene o se tira, contabilizacin
  avanzada de paquetes transmitidos, mejor integracin con lineas RDSI,
  mejora de rendimiento en base a usar como interfaz proxy un
  dispositivo ethertap (algo as como un interfaz de red que lee/escribe
  sobre un socket en vez de una tarjeta de red fsica) en vez de slip,
  conexiones de backup y algunas otras funcionalidades.

  4.  Notas sobre la identificacin en el momento de la conexin

  Siempre que nos conectemos a un proveedor de acceso a internet, ser
  necesario enviar un nombre de usuario y una contrasea. Para ello hay
  diversas posibilidades que nos vendrn impuestas por el proveedor.

  Adems de las 3 opciones expuestas, tambin es posible que la conexin
  no necesite autentificacin (normalmente cuando el destino de la
  llamada es otro ordenador tambin nuestro y no deseamos autentificar).

  4.1.  Usuario y contrasea - Login y password

  Actualmente no es un mtodo muy utilizado en entornos de acceso a
  internet.

  La identificacin se realiza antes de lanzar el demonio pppd, y es el
  propio programa marcador, normalmente chat, el que enva los
  identificadores de usuario y clave. Este envo de usuario y clave se
  realiza en claro, por lo que no puede ser considerado seguro.

  Un ejemplo de script para el programa chat en el que sea necesario
  indicar usuario y contrasea antes de lanzar pppd podra ser el
  siguiente:

       ABORT BUSY
       ABORT "NO CARRIER"
       ABORT VOICE
       ABORT "NO DIALTONE"
       ABORT "NO ANSWER"
       "" ATZ
       OK ATDT_NumeroDeTelefono_
       CONNECT \d\c
       ogin _NombreUsuario_
       assword _Contrasea_

  Las 2 ultimas lineas son las que definen el nombre del usuario y la
  contrasea y cuando deben ser enviadas (despus de recibir ogin y
  assword respectivamente. No se suelen poner las primeras letras de
  dichas palabras para no preocuparse de que unos servidores las enven
  en maysculas y otros en minsculas).

  Este script suele estar en un fichero en el directorio
  /etc/chatscripts, y, suponiendo que el fichero de script se llama
  provider, puede ser llamado con la linea siguiente:

       /usr/sbin/chat -v -f /etc/chatscripts/provider

  4.2.  PAP - Password Authentication Protocol

  En caso de que el servidor de acceso al que nos conectamos requiera
  PAP como protocolo para realizar la autentificacin de nuestra
  conexin, durante el establecimiento de la sesin LCP de PPP se
  negociar dicho protocolo, es decir, una vez establecida la conexin
  de chat y lanzado pppd, ser este quien realice el envio del nombre de
  usuario y clave, buscando en el fichero /etc/ppp/pap-secrets los
  valores que debe usar. Este fichero tiene acceso de lectura y
  escritura solo para root, de modo que nadie que no sea el
  administrador vea su contenido con las claves.

  PAP es un protocolo poco seguro, ya que enva la clave sin cifrar,
  como texto libre, por lo que puede ser leda por alguien que analice
  la linea de transmisin.

  Ejemplo de contenido de /etc/ppp/pap-secrets:

       _NombreUsuario_ * _Contrasea_

  4.3.  CHAP - Challenge Authentication Protocol

  En caso de que el servidor de acceso al que nos conectamos requiera
  CHAP como protocolo para realizar la autentificacin de nuestra
  conexin, durante el establecimiento de la sesin LCP de PPP se
  negociar dicho protocolo, es decir, una vez establecida la conexin
  de chat y lanzado pppd, ser este quien realice el envio del nombre de
  usuario y clave, buscando en el fichero /etc/ppp/chap-secrets los
  valores que debe usar. Este fichero tiene acceso de lectura y
  escritura solo para root, de modo que nadie que no sea el
  administrador vea su contenido con las claves.

  CHAP es un protocolo ms seguro que PAP, ya que nunca se enva la
  clave por la linea de transmisin sin cifrar. En su lugar, el equipo
  que realiza la autentificacin enva un identificador aleatorio con el
  que codificar la clave en el lado del cliente para despus enviar esta
  clave codificada.

  Ejemplo de contenido de /etc/ppp/chap-secrets:

       _NombreUsuario_ * _Contrasea_

  Es posible que un proveedor de acceso en ocasiones utilice PAP y en
  otras ocasiones utilice CHAP, por lo que es comn definir en ambos
  sitios el usuario y la clave a utilizar.

  5.  Notas sobre la resolucin de nombres DNS

  En todas las conexiones a un ISP es necesario configurar la resolucin
  de nombres DNS, de modo que nuestro ordenador pueda encontrar las
  direcciones IP asociadas a un nombre de ordenador en internet.

  Las direcciones IP de los servidores encargados de realizar esta
  traduccin de direcciones se encuentran en el fichero
  /etc/resolv.conf.

  Lo habitual en un equipo aislado que accede a internet es que este
  fichero contenga las direcciones IP de los servidores DNS que el
  proveedor indique:

       #Fichero /etc/resolv.conf para acceso a internet mediante nombreISP
       nameserver 111.222.333.444
       nameserver 222.333.444.555

  En los equipos que realizan tareas de firewall/proxy, es habitual que
  el fichero contenga la direccin del propio servidor (o la direccin
  del interfaz loopback, 127.0.0.1) y este adems incluya un servidor de
  nombres DNS que a su vez realizar las traducciones de nombres a
  direcciones IP ponindose en contacto con otros servidores DNS.

       #Fichero /etc/resolv.conf para resolucin local de nombres DNS
       nameserver 127.0.0.1

  La puesta en marcha de un servidor DNS est fuera del alcance de este
  documento. Existe mucha documentacin al respecto, pero una
  aproximacin rpida puede obtenerse en el DNS-Howto
  (http://www.linuxdoc.org/HOWTO/DNS-HOWTO.html) cuenta con una
  traduccin en http://www.insflug.org/documentos/DNS-Como/.

  6.  Conexin mediante mdem y PPP de un puesto aislado a un ISP

  De forma esquemtica, sern necesarios los siguientes pasos previos:

    Tener montado el paquete Diald. Lo ms rpido ser montar el que la
     distribucin de Linux que usemos incluya.

    Configurar la resolucin de nombres DNS (fichero /etc/resolv.conf).

    Comprobar que es posible establecer una conexin con el ISP. Si la
     distribucin incluye utilidades para configurar una conexin, ser
     ms rpido usarlas (pppconfig en Debian, kppp si usas KDE, etc). Si
     tiene problemas para establecer la conexin, los documentos PPP-
     Howto (http://www.linuxdoc.org/HOWTO/PPP-HOWTO.html), Modem-Howto
     (http://www.linuxdoc.org/HOWTO/Modem-HOWTO.html) y Serial-Howto
     (http://www.linuxdoc.org/HOWTO/Serial-HOWTO.html) pueden resultar
     de ayuda. Ver seccin ``Ms informacin'' si busca traducciones de
     dichos documentos.

    Establecer los nombres de usuario y contrasea en los ficheros
     /etc/ppp/pap-secrets y /etc/ppp/chap-secrets, como se coment
     anteriormente.

  Y ya entrando definitivamente en Diald:

    Preparar el fichero de configuracin de Diald
     (/etc/diald/diald.options para la versin 0.16.5 de Diald y
     /etc/diald/diald.conf para las dems).

    Preparar el fichero de filtros /etc/diald/standard.filter, o mejor,
     dejar ese como est y modificar una copia suya que podemos llamar
     /etc/diald/personal.filter.

    Preparar archivo de comandos para realizar la llamada
     (/etc/diald/diald.connect con permiso de ejecucin) y fichero de
     instrucciones para chat (/etc/chatscripts/provider), que ser
     utilizado por el anterior.

    Preparar los archivos de comandos /etc/diald/ip-up y /etc/diald/ip-
     down si se quieren utilizar (deben tener permiso de ejecucin).

    Preparar los archivos de establecimiento de rutas
     /etc/diald/addroute y /etc/diald/delroute si se quieren utilizar
     (deben tener permiso de ejecucin). Este paso no suele ser
     necesario cuando solo se usa una instancia de Diald.

    Finalmente, lanzar el demonio diald (/etc/init.d/diald start para
     Debian, /etc/rc.d/init.d/diald start en RedHat).  Normalmente, la
     instalacin del paquete Diald habr generado los scripts necesarios
     para que arranque cuando se enciende el equipo en los directorios
     /etc/rcX.d que corresponda.

  Si se realiza algn cambio en el fichero de configuracin de Diald
  posteriormente a su lanzamiento, deber ser relanzado
  (/etc/init.d/diald restart en Debian, /etc/rc.d/init.d/diald
  restart en RedHat).

  6.1.  Fichero /etc/diald/diald.options  o diald.conf

  En este fichero de ejemplo que se muestra hay que revisar:

    Puerto en donde se encuentra conectado el mdem. Opcin device.

    Velocidad del mdem. Opcin speed.

    Nombre del usuario para la conexin ppp. Opcin pppd-options.

    Temporizadores de reintentos.

    Horario de conexin habilitada. Opciones restrict.

    Decidir si se usan los archivos de comandos ip-up e ip-down.
     Opciones ip-up e ip-down.

    Decidir si se usan los archivos de comandos addroute y delroute.
     Opciones addroute y delroute. Normalmente solo se usan para
     configuraciones de enrutamiento complejas o varias instancias de
     Diald en ejecucin simultanea.

    Decidir si se usan los filtros estndar o personales. Opciones
     include.

       ##########################
       # /etc/diald/diald.options

       # Dispositivo donde esta conectado el mdem
       device /dev/ttyS0

       # Archivo de log de diald
       accounting-log /var/log/diald.log

       # Cola de monitorizacin de diald
       #fifo /var/run/diald/diald.fifo

       # Depuracin activada al mximo
       # Activar la depuracin disminuye el rendimiento
       #debug 31

       # Usamos PPP sobre la linea de transmisin
       mode ppp

       # Direcciona IP de mi equipo (al conectar se modifica automticamente con
       # la IP asignada por el ISP)
       local 127.0.0.5

       # Direccion IP del equipo remoto (al conectar se modifica automticamente
       # con la IP del equipo que recibe nuestra llamada)
       remote 127.0.0.4

       # Mascara de subred
       netmask 255.255.255.0

       # Indica que las direcciones IP sern asignadas en el momento del
       # establecimiento de la conexin
       dynamic

       # Si la conexin se cae, restablecerla solo si hay trafico de salida
       two-way

       # Cuando la conexin esta establecida, cambiar las rutas para que apunten
       # al interface real, en vez de al interface proxy. No hacer esto implica
       # una perdida de rendimiento de un 20 por ciento. Hay kernels antiguos que
       # no soportan reroute. Ver el manual de diald para mas informacin
       reroute

       # Diald deber establecer la ruta por defecto al interface SLIP usado como
       # proxy
       defaultroute

       # Script para establecer rutas personalizadas
       #addroute "/etc/diald/addroute"
       #delroute "/etc/diald/delroute"

       # Scripts para ejecutar cuando el enlace se activa o se desactiva.
       # En las versiones 0.9x de Diald hay una opcin llamada ip-goingdown para
       # ser lanzado al finalizar pero cuando todava est activo el enlace.
       ip-up /etc/diald/ip-up
       #ip-down /etc/diald/ip-down

       # Scripts usados para establecer la comunicacin y pararla
       connect "/etc/diald/diald.connect"
       #disconnect "/etc/diald/diald.disconnect"

       # Usar bloqueo UUCP
       #lock

       # Conectamos a travs de mdem. ATENCIN: No especificar estas opciones
       # en las opciones para PPP, ya que entraran en conflicto. Para ver las
  # opciones de PPP que no se pueden usar en pppd-options ver la pagina
  # de manual de diald y buscar pppd-options
  modem
  crtscts
  speed 115200

  # Algunos temporizadores
  # para informacin detallada, ver manual de Diald
  connect-timeout 120
  redial-timeout 60
  start-pppd-timeout 120
  died-retry-count 0
  redial-backoff-start 4
  redial-backoff-limit 300
  dial-fail-limit 10

  # Opciones para pasar a pppd
  # Estas opciones tambin se pueden poner en /etc/ppp/options, que son las
  # opciones por defecto de pppd, pero si es necesario tener diferentes
  # configuraciones de diald es necesario ponerlas aqu
  # noauth - no autentificar al destino de la llamada.
  #          "Infova Plus" (Espaa) no se identifica frente a nuestro
  #          equipo.
  # user - poner aqu el usuario y el isp separados por la arroba (@).
  pppd-options noauth user usuario@isp

  # Restricciones de horario de uso.
  # Esta seccin debe estar antes de los filtros.
  # El comando restrict es experimental y puede cambiar en futuras versiones
  # de diald (esta sintaxis es para la versin 0.16)
  # Solo usar en horario nocturno para plan
  # Bononet Noche (Espaa-Telefnica)
  # Lunes a Viernes de 0 a 8 y de 18 a 24
  # Domingos de 0 a 24
  restrict 8:00:00 18:00:00 1-5 * *
  down
  restrict * * * * *

  # Sin condiciones especiales de tarificacin
  # (primeros segundos cobrados de una vez, unidad de tarificacin en
  # segundos, tiempo en segundos para comprobar desconexin)
  #impulse 0,0,0
  # Bononet Noche (Espaa-Telefnica) tarifica por segundos a partir del 160
  impulse 160,0,0
  # si se tarificase por minutos y cobrasen los 10 primeros de una vez:
  #impulse 600,60,10

  # Filtros estndar
  #include /etc/diald/standard.filter
  # o Filtros personales
  include /etc/diald/personal.filter

  6.2.  Fichero de filtros personal

  La manipulacin de este fichero debe ser realizada de forma muy
  cuidadosa.  Es en este fichero en el que se decide cundo y porqu se
  trata de levantar el enlace, mantenerlo, tirarlo o ignorarlo,
  dependiendo del tipo de trfico.

  En general, el fichero de filtros standard de Diald es suficiente para
  la mayora de los casos, aunque quiz sea poco restrictivo en
  determinados entornos. El personal.filter que se muestra a
  continuacin tiene algunas correcciones sobre el original de la
  versin 0.16.

  En sucesivas versiones de este documento se presentarn otros ejemplos
  ms restrictivos comentados.

  # /etc/diald/personal.filter
  # Las reglas de filtrado a continuacin son las mismas que las de
  # standard.filter con las siguientes correcciones:
  #
  # Cambio de 10 minutos por 4 en "cualquier otra conexin TCP".
  # Aadido para ignorar los FIN ACK con "ignore tcp tcp.fin".
  # Ignorar paquetes icmp (con ping y traceroute no se realizar llamada).
  #

  # This is a pretty complicated set of filter rules.
  # (These are the rules I use myself.)
  #
  # I've divided the rules up into four sections.
  # TCP packets, UDP packets, ICMP packets and a general catch all rule
  # at the end.

  ignore icmp any

  #------------------------------------------------------------------------------
  # Rules for TCP packets.
  #------------------------------------------------------------------------------
  # General comments on the rule set:
  #
  # In general we would like to treat only data on a TCP link as significant
  # for timeouts. Therefore, we try to ignore packets with no data.
  # Since the shortest possible set of headers in a TCP/IP packet is 40 bytes,
  # any packet with length 40 must have no data riding in it.
  # We may miss some empty packets this way (optional routing information
  # and other extras may be present in the IP header), but we should get
  # most of them. Note that we don't want to filter out packets with
  # tcp.live clear, since we use them later to speedup disconnects
  # on some TCP links.
  #
  # We also want to make sure WWW packets live even if the TCP socket
  # is shut down. We do this because WWW doesn't keep connections open
  # once the data has been transfered, and it would be annoying to have the link
  # keep bouncing up and down every time you get a document.
  #
  # Outside of WWW the most common use of TCP is for long lived connections,
  # that once they are gone mean we no longer need the network connection.
  # We don't neccessarily want to wait 10 minutes for the connection
  # to go down when we don't have any telnet's or rlogin's running,
  # so we want to speed up the timeout on TCP connections that have
  # shutdown. We do this by catching packets that do not have the live flag set.

  # --- start of rule set proper ---

  # When initiating a connection we only give the link 15 seconds initially.
  # The idea here is to deal with possibility that the network on the opposite
  # end of the connection is unreachable. In this case you don't really
  # want to give the link 10 minutes up time. With the rule below
  # we only give the link 15 seconds initially. If the network is reachable
  # then we will normally get a response that actually contains some
  # data within 15 seconds. If this causes problems because you have a slow
  # response time at some site you want to regularly access, you can either
  # increase the timeout or remove this rule.
  accept tcp 15 tcp.syn

  # Keep named xfers from holding the link up
  ignore tcp tcp.dest=tcp.domain
  ignore tcp tcp.source=tcp.domain

  # (Ack! SCO telnet starts by sending empty SYNs and only opens the
  # connection if it gets a response. Sheesh..)
  accept tcp 5 ip.tot_len=40,tcp.syn

  # keep empty packets from holding the link up (other than empty SYN packets)
  ignore tcp ip.tot_len=40,tcp.live

  # Modificacion de Andres Seco. Ignorar los FIN ACK.
  ignore tcp tcp.fin

  # make sure http transfers hold the link for 2 minutes, even after they end.
  # NOTE: Your /etc/services may not define the tcp service www, in which
  # case you should comment out the following two lines or get a more
  # up to date /etc/services file. See the FAQ for information on obtaining
  # a new /etc/services file.
  accept tcp 120 tcp.dest=tcp.www
  accept tcp 120 tcp.source=tcp.www
  # Same for https
  accept tcp 120 tcp.dest=tcp.443
  accept tcp 120 tcp.source=tcp.443

  # Once the link is no longer live, we try to shut down the connection
  # quickly. Note that if the link is already down, a state change
  # will not bring it back up.
  keepup tcp 5 !tcp.live
  ignore tcp !tcp.live

  # an ftp-data or ftp connection can be expected to show reasonably frequent
  # traffic.
  accept tcp 120 tcp.dest=tcp.ftp
  accept tcp 120 tcp.source=tcp.ftp

  #NOTE: ftp-data is not defined in the /etc/services file provided with
  # the latest versions of NETKIT, so I've got this commented out here.
  # If you want to define it add the following line to your /etc/services:
  # ftp-data        20/tcp
  # and uncomment the following two rules.
  #accept tcp 120 tcp.dest=tcp.ftp-data
  #accept tcp 120 tcp.source=tcp.ftp-data

  # If we don't catch it above, give the link 10 minutes up time.
  #accept tcp 600 any
  # Modificacion de Andres Seco. Solo dejar 4 minutos mas.
  accept tcp 240 any

  # Rules for UDP packets
  #
  # We time out domain requests right away, we just want them to bring
  # the link up, not keep it around for very long.
  # This is because the network will usually come up on a call
  # from the resolver library (unless you have all your commonly
  # used addresses in /etc/hosts, in which case you will discover
  # other problems.)
  # Note that you should not make the timeout shorter than the time you
  # might expect your DNS server to take to respond. Otherwise
  # when the initial link gets established there might be a delay
  # greater than this between the initial series of packets before
  # any packets that keep the link up longer pass over the link.

  # Don't bring the link up for rwho.
  ignore udp udp.dest=udp.who
  ignore udp udp.source=udp.who
  # Don't bring the link up for RIP.
  ignore udp udp.dest=udp.route
  ignore udp udp.source=udp.route
  # Don't bring the link up for NTP or timed.
  ignore udp udp.dest=udp.ntp
  ignore udp udp.source=udp.ntp
  ignore udp udp.dest=udp.timed
  ignore udp udp.source=udp.timed
  # Don't bring up on domain name requests between two running nameds.
  ignore udp udp.dest=udp.domain,udp.source=udp.domain
  # Bring up the network whenever we make a domain request from someplace
  # other than named.
  accept udp 30 udp.dest=udp.domain
  accept udp 30 udp.source=udp.domain
  # Do the same for netbios-ns broadcasts
  # NOTE: your /etc/services file may not define the netbios-ns service
  # in which case you should comment out the next three lines.
  ignore udp udp.source=udp.netbios-ns,udp.dest=udp.netbios-ns
  accept udp 30 udp.dest=udp.netbios-ns
  accept udp 30 udp.source=udp.netbios-ns
  # keep routed and gated transfers from holding the link up
  ignore udp tcp.dest=udp.route
  ignore udp tcp.source=udp.route
  # Anything else gest 2 minutes.
  accept udp 120 any

  # Catch any packets that we didn't catch above and give the connection
  # 30 seconds of live time.
  accept any 30 any

  6.3.  Realizacin de la llamada

  Fichero /etc/diald/diald.connect (debe tener permiso de ejecucin):

       /usr/sbin/chat -f /etc/chatscripts/provider

  Fichero /etc/chatscripts/provider. En este fichero de ejemplo que se
  muestra hay que revisar el numero de telfono:

       ABORT BUSY
       ABORT "NO CARRIER"
       ABORT VOICE
       ABORT "NO DIALTONE"
       ABORT "NO ANSWER"
       "" ATZ
       OK ATDT123456789
       CONNECT \d\c

  6.4.  Archivo de comandos de inicio de la conexin

  Debe tener permiso de ejecucin.

  Este archivo puede ser usado para multiples tareas (sincronizar la
  hora del equipo, lanzar la entrega de la cola de impresin, la
  recuperacin de los mensajes desde la oficina de correos externa,
  etc.).

  En el ejemplo, se envia un mensaje a root con los parametros que se le
  pasan al archivo de comandos (interface, mascara de subred, direccin
  IP local, direccin IP remota y prioridad en la tabla de rutas):

       #!/bin/sh

       iface=$1
       netmask=$2
       localip=$3
       remoteip=$4
       metric=$5

       # Set the time and date
       # netdate ntp.server.somecountry

       # Run the mail queue
       # runq

       echo `date` $1 $2 $3 $4 $5 | mail -s "diald - conectado" root@localhost

  7.  Conexin mediante modem y PPP de un puesto aislado a varios ISPs
  no simultneamente

  En muchas ocasiones, un ordenador aislado no se conecta solo a una
  red, si no que es comn acceder a diferentes redes o a Internet
  mediante diferentes proveedores de acceso. En estos casos, modificar
  los ficheros de configuracin cada vez que se desea acceder a un sitio
  diferente puede resultar incmodo.

  La solucin propuesta aqu consiste en mantener diferentes juegos de
  ficheros de configuracin para cada conexin a un proveedor diferente
  y se incluyen algunos archivos de comandos para automatizar el cambio
  de uno a otro.

  7.1.  Nota sobre la entrega de correo mediante un servidor de reenvo
  (relay host)

  Tanto si su correo electrnico usa un Agente de Transferencia de
  Mensajes local con un servidor SMTP de reenvo (relay host) para la
  entrega de todos los mensajes, como si usa un cliente de correo que
  directamente entregue los mensajes al servidor SMTP de su proveedor de
  acceso, el cambio de acceso de un proveedor a otro precisar la
  reconfiguracin de este servidor de relay, ya que los proveedores de
  acceso normalmente comprueban el origen de las conexiones que reciben
  y slo aceptan mensajes si el buzn del destinatario est en uno de
  los dominios que gestiona directamente este servidor de relay o si la
  direccin IP del cliente que inicia la conexin pertenece a una de las
  direcciones que este proveedor asigna a sus clientes, para evitar que
  cualquiera pueda usar este servidor smtp para objetivos no muy limpios
  (spam, annimos, enmascaramiento del origen, etc.).

  En los ejemplos que se ponen a continuacin se mostrara cmo hacer
  este cambio en los ficheros de configuracin de Smail suponiendo una
  sencilla configuracin en la que todos los mensajes con destino fuera
  del equipo local se entregan a un servidor smtp de reenvo (relay
  host). Si usted usa otro agente de transferencia de mensajes (MTA) en
  su sistema puede enviarme los cambios que tuvo que hacer en dicho MTA
  para incluirlos aqu. Igualmente si usa un cliente de correo que
  entrega directamente los mensajes a un servidor smtp ajeno a su
  sistema (Kmail, Netscape, etc.).

  7.2.  Archivos de comandos para automatizar la creacin de las multi
  ples conexiones y su intercambio

  7.2.1.  Puesta en marcha

  En primer lugar, se crea un subdirectorio de /etc/diald llamado
  providers donde se almacenarn los archivos de comandos para
  automatizar el cambio y los subdirectorios con los juegos de ficheros
  de configuracin para cada uno de los proveedores.

  Con el archivo de comandos siguiente se crea este directorio y se
  introducen en el los ficheros de configuracin de Diald, chat, pppd y
  Smail con los que se est trabajando actualmente, y que sern tomados
  como base para las siguientes configuraciones.

       #!/bin/sh
       #Fichero /etc/diald/providers/setupdialdmultiprovider
       mkdir /etc/diald/providers
       mkdir /etc/diald/providers/setup
       cp /etc/ppp/pap-secrets /etc/diald/providers/setup
       cp /etc/ppp/chap-secrets /etc/diald/providers/setup
       cp /etc/resolv.conf /etc/diald/providers/setup
       cp /etc/diald/diald.options /etc/diald/providers/setup
       cp /etc/diald/standard.filter /etc/diald/providers/setup
       cp /etc/diald/personal.filter /etc/diald/providers/setup
       cp /etc/diald/diald.connect /etc/diald/providers/setup
       cp /etc/chatscripts/provider /etc/diald/providers/setup
       cp /etc/diald/ip-up /etc/diald/providers/setup
       cp /etc/diald/ip-down /etc/diald/providers/setup
       cp /etc/smail/routers /etc/diald/providers/setup

  7.2.2.  Nuevo proveedor

  Con el archivo de comandos siguiente se copia la configuracin
  original que se estaba utilizando cuando se ejecut
  setupdialdmultiprovider para prepararla para un nuevo proveedor o una
  nueva red. Este archivo de comandos
  (/etc/diald/providers/newdialdprovider) se lanza con un parmetro, el
  nombre del proveedor o el nombre de la red a la que accedemos.

       #!/bin/sh
       #Fichero /etc/diald/providers/newdialdprovider
       mkdir /etc/diald/providers/$1
       cp /etc/diald/providers/setup/* /etc/diald/providers/$1

  Ahora ser necesario modificar como corresponda los ficheros que se
  encuentran en el nuevo directorio
  /etc/diald/providers/nombreproveedor, siendo nombreproveedor el
  parmetro que se le ha pasado a newdialdprovider.

  7.2.3.  Cambio de uno a otro

  Para finalizar, con este archivo de comandos se realizan los cambios
  oportunos para acceder a un proveedor o red u otro. Se utilizan
  enlaces simblicos para evitar tener archivos duplicados. As mismo,
  mediante enlaces simblicos, en caso de necesitar hacer algn cambio,
  por ejemplo, en el fichero /etc/resolv.conf, modificando directamente
  este fichero quedar modificado el fichero al que apunta el enlace,
  /etc/diald/providers/nombreproveedor/resolv.conf.

       #!/bin/sh
       #Fichero /etc/diald/providers/setdialdprovider
       /etc/init.d/diald stop
       #espera para dejar tiempo a que Diald finalice.
       sleep 4
       ln -sf /etc/diald/providers/$1/pap-secrets /etc/ppp
       ln -sf /etc/diald/providers/$1/chap-secrets /etc/ppp
       ln -sf /etc/diald/providers/$1/resolv.conf /etc
       ln -sf /etc/diald/providers/$1/diald.options /etc/diald
       ln -sf /etc/diald/providers/$1/standard.filter /etc/diald
       ln -sf /etc/diald/providers/$1/personal.filter /etc/diald
       ln -sf /etc/diald/providers/$1/diald.connect /etc/diald
       ln -sf /etc/diald/providers/$1/provider /etc/chatscripts
       ln -sf /etc/diald/providers/$1/ip-up /etc/diald
       ln -sf /etc/diald/providers/$1/ip-down /etc/diald
       ln -sf /etc/diald/providers/$1/routers /etc/smail
       /etc/init.d/diald start

  8.  Conexin mediante modem y PPP de un proxy/firewall a un ISP

  El asunto de conectar una red a internet de modo que uno de los
  equipos trabaje como un servidor de conexin compartida con tareas de
  proxy/cache de pginas web y cortafuegos (firewall) de seguridad entre
  la red interna y externa es un asunto complejo que escapa al objetivo
  de este documento y que ya han tratado de forma fantstica otros
  documentos Como similares a este. Al final de este documento se
  pueden encontrar referencias y enlaces.

  Aqu tan solo se va a tratar de configurar Diald suponiendo que el
  equipo ya hace IP-Masquerading, tiene un proxy como Squid o similar
  trabajando, una conexin con un ISP configurada correctamente y que la
  seguridad de acceso a puertos TCP/UDP ha sido revisada (fichero
  /etc/inetd.conf y algunos otros como securetty, host.allow, etc).

  Bsicamente, se trata de reconfigurar las reglas de
  enmascaramiento/filtrado/acceso cada vez que cambia el conjunto de
  interfaces del equipo, es decir, cuando se establece el interface ppp0
  y cuando deja de existir. Un buen sitio para hacer esto son los
  scripts de ip-up e ip-down de pppd.

  8.1.  Ejemplo para Debian 2.1

  En Debian, basta con montar el paquete ipmasq y durante su
  configuracin indicar que se desea que se cambien las reglas de forma
  sincronizada con pppd. De esta manera, se crean scripts en los
  directorios /etc/ppp/ip-up.d y /etc/ppp/ip-down.d que llaman a
  /sbin/ipmasq, un script que analiza las interfaces actuales y hace una
  configuracin sencilla valida en muchos casos, aunque se puede
  personalizar con facilidad revisando los ficheros de reglas de
  /etc/ipmasq/rules.

  Tan solo es necesario realizar una correccin tras la instalacin de
  este paquete. Se trata de cambiar el orden de ejecucin del script de
  lanzamiento de ipmasq durante el arranque del equipo, eliminandolo del
  directorio /etc/rcS.d y poniendolo para que se ejecute despues de
  S20diald en /etc/rc2.d de modo que ya exista la interface sl0.
  S90ipmasq es un lugar valido para el enlace simblico a
  /etc/init.d/ipmasq.

  En Debian no es necesario preocuparse de la version del kernel, ya que
  el script /sbin/ipmasq usa ipfwadm o ipchains segn corresponda.

  8.2.  Ejemplo para Suse 6.1

  Este ejemplo se debe a Mr Cornish Rex, troll@tnet.com.au.

  Los comandos de control de ip-masp y routing que se presentan a
  continuacin son para kernels de la versin 2.2, mediante ipchains,
  pero no son vlidos para kernels de las versiones 2.0. Para estos
  ultimos habra que traducir dichos comandos a su equivalente en el
  antiguo comando ipmasq.

  Adems, vamos a suponer que la interface ethernet del equipo tiene la
  direccin 192.168.1.1 con mscara de 16 bits, es decir, 255.255.0.0.

  El fichero /etc/ppp/ip-up sera valido de la siguiente forma:

  #!/bin/sh
  # $1 = Interface
  # $2 = Tty device
  # $3 = speed
  # $4 = local ip
  # $5 = remote ip
  # $6 = ipparam
  /sbin/ipchains -F input
  /sbin/ipchains -P input DENY
  /sbin/ipchains -A input -j ACCEPT -i eth0 -s 192.168.0.0/16 -d 0.0.0.0/0
  /sbin/ipchains -A input -j DENY -p udp -i $1 -s 0.0.0.0/0 -d $4/32 0:52 -l
  /sbin/ipchains -A input -j DENY -p udp -i $1 -s 0.0.0.0/0 -d $4/32 54:1023 -l
  /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 0:112 -l
  /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 114:1023 -l
  /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 6000:6010 -l
  /sbin/ipchains -A input -j DENY -p icmp --icmp-type echo-request \
  -i $1 -s 0.0.0.0/0 -l
  /sbin/ipchains -A input -j DENY -p icmp -f -i $1 -s 0.0.0.0/0 -l
  /sbin/ipchains -A input -j DENY -p udp -i $1 -s 0.0.0.0/0 -d $4/32 5555 -l
  /sbin/ipchains -A input -j DENY -p udp -i $1 -s 0.0.0.0/0 -d $4/32 8000 -l
  /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 8000 -l
  /sbin/ipchains -A input -j DENY -p udp -i $1 -s 0.0.0.0/0 -d $4/32 6667 -l
  /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 6667 -l
  /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 4557 -l
  /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 4559 -l
  /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 4001 -l
  /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 2005 -l
  /sbin/ipchains -A input -j DENY -p tcp -i $1 -s 0.0.0.0/0 -d $4/32 6711 -l
  /sbin/ipchains -A input -j DENY -i $1 -s 192.168.0.0/16 -d 0.0.0.0/0 -l
  /sbin/ipchains -A input -j ACCEPT -i $1 -s 0.0.0.0/0 -d $4/32
  /sbin/ipchains -A input -j ACCEPT -i lo -s 0.0.0.0/0 -d 0.0.0.0/0
  /sbin/ipchains -A input -j DENY -s 0.0.0.0/0 -d 0.0.0.0/0 -l

  /sbin/ipchains -F output
  /sbin/ipchains -P output DENY
  /sbin/ipchains -A output -j ACCEPT -i eth0 -s 0.0.0.0/0 -d 192.168.0.0/16
  /sbin/ipchains -A output -j DENY -i $1 -s 192.168.0.0/16 -d 0.0.0.0/0 -l
  /sbin/ipchains -A output -j ACCEPT -i $1 -s $4/32 -d 0.0.0.0/0
  /sbin/ipchains -A output -j ACCEPT -i lo -s 0.0.0.0/0 -d 0.0.0.0/0
  /sbin/ipchains -A output -j DENY -s 0.0.0.0/0 -d 0.0.0.0/0

  /sbin/ipchains -F forward
  /sbin/ipchains -P forward DENY
  /sbin/ipchains -M -S 120 120 120
  /sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24
  /sbin/ipchains -A forward -j DENY -s 0.0.0.0/0 -d 0.0.0.0/0

  exit 0

  El fichero /etc/ppp/ip-down sera valido de la siguiente forma:

  #!/bin/sh
  # $1 = Interface
  # $2 = Tty device
  # $3 = Speed
  # $4 = Local ip
  # $5 = Remote ip
  /sbin/ipchains -F input
  /sbin/ipchains -F output
  /sbin/ipchains -F forward
  /sbin/ipchains-restore < /etc/ppp/orig.chains

  Y el fichero que aparece al final del script anterior, orig.chains, es
  el siguiente (el estado original de la configuracin de ipchains):

       # orig.chains
       # creado con: ipchains-save > orig.chains
       :input ACCEPT
       :forward ACCEPT
       :output ACCEPT
       -A input -s 0.0.0.0/0.0.0.0 -d 192.168.1.1/255.255.255.255
       -A output -s 192.168.1.1/255.255.255.255 -d 0.0.0.0/0.0.0.0

  8.3.  Ejemplo para Slackware 3.6

  Este ejemplo se debe a Hoo Kok Mun, hkmun@pacific.net.sg.

  Este es el ejemplo ms sencillo que he visto, aunque perfectamente
  funcional. Desde el principio establece la norma de enmascaramiento,
  antes de que exista la interface sl0, y no cambia cuando se establece
  ppp0. Si son necesarias medidas de seguridad, probablemente quede un
  poco limitado.

       #/etc/rc.d/rc.local
       /sbin/ipfwadm -F -p deny
       /sbin/ipfwadm  -F -a m -S 192.168.0.0/24 -D 0.0.0.0/0

  Como se puede ver, es para kernels de la versin 2.0.

  9.  Programas y versiones utilizados

  Para el desarrollo de esta documentacin he utilizado las siguientes
  versiones de diald:

    Diald 0.16.5 - La ultima versin que mantuvo el autor original de
     diald.

    Diald 0.99.3 - La ultima versin aparecida hasta el momento de la
     primera redaccin de este documento.
  Y las siguientes versiones de pppd:

    pppd 2.3.5

  La versin 0.16.5 de Diald es seguramente la ms extendida, y la que
  se incluye directamente con muchas de las distribuciones de linux. Es
  suficiente en la mayora de los casos y resulta muy estable, aunque,
  sin duda, las ms modernas versiones, aunque se encuentran en
  desarrollo, incluyen funcionalidades muy interesantes.

  10.  Ms informacin

  La documentacin original a partir de la cual ha sido obtenido este
  documento puede ser encontrada en las paginas man de diald, diald-
  examples, diald-control, diald-monitor, dctrl, pppd, chat, en los
  directorios correspondientes de /usr/doc y en las paginas de los
  paquetes en la World wide web:

    Nueva Pgina Oficial de Diald: http://diald.sourceforge.net/

    Descarga de nuevas versiones:
     ftp://diald.sourceforge.net/pub/diald/

    Pgina anterior de Diald: http://diald.unix.ch

    Pgina antigua de Diald hasta la versin 0.16.5:
     http://www.loonie.net/~erics/diald.html

    Antiguo sitio FTP para nuevas versiones de pppd:
     ftp://cs.anu.edu.au/pub/software/ppp/

  Existe una lista de correo para hablar y discutir sobre diald en el
  servidor de listas de David S. Miller. Para suscribirse, enviar un
  mensaje con la linea subscribe linux-diald EN EL CUERPO DEL MENSAJE a
  la direccin Majordomo@vger.rutgers.edu.

  Existen tambin mltiples documentos RFC (Request For Comments) que
  detallan cmo debe ser el funcionamiento de las lineas con encapsulado
  PPP y sus protocolos asociados (LCP, IPCP, PAP, CHAP, ...), y pueden
  ser encontradas en /usr/doc/doc-rfc y en diversos lugares de la World
  wide web, como http://metalab.unc.edu y http://nic.mil/RFC. Puedes
  solicitar informacin sobre las RFCs en RFC-INFO@ISI.EDU.

  Y tambin pueden resultar de ayuda los Comos siguientes:

    DNS-HOWTO - http://www.linuxdoc.org/HOWTO/DNS-HOWTO.html
     (traduccin: http://www.insflug.org/documentos/DNS-Como/)

    Firewall-HOWTO - http://www.linuxdoc.org/HOWTO/Firewall-HOWTO.html
     (traduccin: http://www.insflug.org/documentos/Cortafuegos-Como/)

    IP-Masquerade-HOWTO - http://www.linuxdoc.org/HOWTO/IP-Masquerade-
     HOWTO.html (traduccin: http://www.insflug.org/documentos/IP-
     Masquerade-Como/)

    IPCHAINS-HOWTO - http://www.linuxdoc.org/HOWTO/IPCHAINS-HOWTO.html

    Modem-HOWTO - http://www.linuxdoc.org/HOWTO/Modem-HOWTO.html

    NET3-4-HOWTO - http://www.linuxdoc.org/HOWTO/NET3-4-HOWTO.html
     (traduccin: http://www.insflug.org/documentos/Redes-En-Linux-
     Como/)

    PPP-HOWTO - http://www.linuxdoc.org/HOWTO/PPP-HOWTO.html
     (traduccin: http://www.insflug.org/documentos/PPP-Como/)

    Serial-HOWTO - http://www.linuxdoc.org/HOWTO/Serial-HOWTO.html
     (traduccin: http://www.insflug.org/documentos/Serie-Como/)

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En ella encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.

  Cmo pasar de DOS/Windows a Linux
  Por Guido Gonzato BORRAMEguido@ibogeo.df.unibo.it (Elimine
  el BORRAME)
  Traducido por David Marn Carreo, davefx@bigfoot.com
  v1.3.2 22 de Febrero de 1999. Traduccin: 8 de Junio de
  1999.

  Este documento Cmo est dedicado a todos los (pronto ex-)usuarios de
  DOS y Windows que acaban de decidir pasarse a Linux, el clnico gratu
  ito de UNIX. El propsito de este documento es ayudar al lector a
  trasladar su conocimiento de DOS y Windows al entorno Linux, as como
  dar indicaciones acerca de intercambiar archivos y recursos entre
  ambos sistemas operativos.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Es Linux adecuado para usted?

  1.2.    Ya est. Ahora cunteme ms.

  1.2.1.  Conceptos introductorios

  1.2.2.  Obtencin de ayuda

  1.3.    Convenciones

  2.      Para el Impaciente

  3.      Encontrndose con bash

  4.      Ficheros y Programas

  4.1.    Ficheros: Nociones preliminares

  4.2.    Enlaces simblicos

  4.3.    Permisos y Propiedades

  4.4.    Ficheros: rdenes equivalentes

  4.5.    Ejecucin de programas: Multitarea y Sesiones

  4.6.    Ejecucin de programas en sistemas remotos

  5.      Gestin de Directorios

  5.1.    Directorios: Nociones preliminares

  5.2.    Permisos de directorios.

  5.3.    Equivalencia de rdenes

  6.      Disquetes, discos duros y similares.

  6.1.    Administracin de dispositivos en modo DOS

  6.2.    Administracin de dispositivos en modo UNIX

  6.3.    Copias de seguridad

  7.      Qu pasa con Windows?

  8.      Personalizacin del sistema

  8.1.    Ficheros de inicializacin del sistema

  9.      Ficheros de inicializacin de programas

  10.     Trabajo en red: conceptos

  11.     Un poco de programacin

  11.1.   Rutinas del Intrprete de Comandos: Ficheros .BAT con
  esteroides

  11.2.   Sus programas en C

  12.     El restante 1%

  12.1.   Utilizacin de tar  y gzip

  12.2.   Instalacin de aplicaciones

  12.3.   Trucos imprescindibles

  12.4.   Dnde encontrar aplicaciones?

  12.5.   Unas cuantas cosas que Usted no poda hacer

  12.6.   Practicando UNIX bajo DOS/Windows

  12.7.   Extensiones comunes y programas relacionados

  12.8.   Conversin de ficheros

  12.9.   Entornos ofimticos gratuitos

  13.     Fin, por ahora

  13.1.   Copyright

  13.2.   Agradecimientos

  13.3.   Traduccin

  14.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  1.1.  Es Linux adecuado para usted?

  Quiere pasar del mundo DOS (esta definicin incluye Windows) a Linux?
  Buena idea: Linux es tcnicamente superior a DOS, Windows 95 e incluso
  Windows NT. Pero cuidado: puede no ser til para usted. Estas son las
  diferencias principales entre DOS y Linux:

    Windows ejecuta Microsoft Office y muchos juegos; est claro que es
     fcil de instalar y configurar; es notablemente inestable; su
     rendimiento es pobre; los bloqueos del ordenador son frecuentes.

    Linux ejecuta StarOffice, mucho software tcnico y unos pocos
     juegos; puede ser difcil de instalar y configurar; es slido como
     una roca; rinde al mximo; los bloqueos de la mquina son muy
     raros.

  De usted depende el decidir qu necesita. Linux le da potencia, pero
  lleva algn tiempo aprender a aprovecharla. Es decir, si necesita
  software comercial, o si no le apetece aprender rdenes y conceptos
  nuevos, sera mejor que buscara en otra parte. Sepa que muchos novatos
  lo dejan debido a las dificultades iniciales.

  Se est trabajando para hacer Linux ms facil de usar, pero no espere
  ser un experto en Linux a menos que lea mucha documentacin y lo use
  durante al menos unos meses. Linux no le dar resultados instantneos.
  A pesar de estas advertencias, tengo un 100% de seguridad en que si
  usted es el usuario correcto, entonces encontrar en Linux su Nirvana
  informtico. Por cierto, Linux + DOS/Win pueden coexistir sin
  problemas en la misma mquina.

  Requisitos previos para la lectura de este Cmo. Asumir que:

    conoce las rdenes y conceptos bsicos del DOS;

    Linux, posiblemente con el sistema X Window (X11 para abreviar),
     est adecuadamente instalado en su ordenador;

    su intrprete de rdenes (el equivalente de COMMAND.COM) es bash;

  A menos que se especifique lo contrario, toda la informacin de este
  trabajo est dirigida al antiguo DOS. Hay informacin acerca de
  Windows en algunos lugares de este documento, pero tenga en cuenta que
  Windows y Linux son completamente distintos, al contrario que DOS, que
  es una especie de hermano pobre de UNIX.

  Dese cuenta tambin de que este trabajo no es ni una gua de
  configuracin ni un manual completo para los no iniciados.

  La ltima versin de este documento est disponible en muchos formatos
  en ftp://sunsite.unc.edu/pub/Linux/docs/howto.

  1.2.  Ya est. Ahora cunteme ms.

  Ha instalado Linux y los programas que necesita en su ordenador. Se ha
  proporcionado una cuenta (si no, teclee adduser suNombre ahora
  mismo!) y Linux est ejecutndose. Acaba de introducir su nombre y su
  contrasea, y ahora est mirando a la pantalla pensando...  Y ahora
  qu?

  Bien, no se desespere. Puede hacer casi las mismas cosas que sola
  hacer con DOS/Win, y muchas ms. Si estuviera ejecutando DOS/Win en
  lugar de Linux, realizara alguna de las siguientes tareas:

    ejecutar programas y crear, copiar, ver, borrar, imprimir,
     renombrar ficheros;

    cambiar de directorio, crearlos, borrarlos y listar sus contenidos;

    formatear disquetes y copiar ficheros de/hacia ellos;

    configuracin del sistema;

    navegar por Internet;

    escribir ficheros .BAT y programas en su lenguaje favorito;

    el restante 1%.

  Estar contento al saber que todas esas tareas pueden llevarse a cabo
  bajo Linux de una manera similar a como se hacen bajo DOS. Bajo DOS,
  el usuario medio usa muy pocos de las ms de 100 rdenes disponibles:
  lo mismo, hasta cierto punto, sucede con el Linux.

  1.2.1.  Conceptos introductorios

  La mejor manera de aprender algo es mojndose los pies. Desde aqu le
  animo a experimentar y jugar con Linux: a menos que entre como
  usuario root, no puede llegar a daar el sistema de esa manera. Unos
  cuantos conceptos:

    Primero, cmo salir de Linux de manera segura. Si ve una pantalla
     en modo texto, pulse <Ctrl-Alt-Supr>, espere a que el sistema
     realice unas tareas y le diga que todo est bien, y entonces apague
     el ordenador.  Si est trabajando bajo el sistema X Window, pulse
     primero <Ctrl-Alt-Retroceder>, y despus <Ctrl-Alt-Supr>. Nunca
     apague o reinicie el ordenador directamente: podra daar el
     sistema de ficheros;

    Al contrario que en DOS o Windows, Linux tiene mecanismos de
     seguridad intrnsecos, debido a su naturaleza multiusuario. Los
     ficheros y los directorios tienen permisos asociados, y por lo
     tanto el usuario normal puede no tener acceso a alguno de ellos;
     vea la seccin ``Permisos''. DOS y Windows, por el contrario, le
     dejaran machacar todo el contenido de su disco duro;

    Hay un usuario especial denominado root: el administrador del
     sistema, que tiene todo el poder sobre la mquina. Si usted trabaja
     con su propio PC, tambin ser root. Trabajar como root es
     peligroso: cualquier error puede daar seriamente o destruir el
     sistema de la misma manera que con DOS/Win. No trabaje como root a
     menos que sea absolutamente necesario;

    Mucha de la complejidad de Linux viene de su extrema
     configurabilidad: prcticamente cada caracterstica y aplicacin
     puede ser configurada mediante uno o ms archivos de configuracin.
     La complejidad es el precio a pagar por la potencia;

    La redireccin y el entubamiento (piping) son caractersticas
     secundarias de DOS. En Linux pasan a ser muy importantes y mucho
     ms potentes. Se pueden enlazar rdenes para ejecutar tareas
     complejas.  Le recomiendo sobremanera que aprenda a usarlas.

  1.2.2.  Obtencin de ayuda

  Hay muchas maneras de conseguir ayuda con Linux. Las ms importantes
  son:

    Leyendo la documentacin Aunque el documento CMO que est leyendo
     puede servir como introduccin a Linux, hay unos cuantos libros que
     debera leer: Linux: Instalacin y Primeros Pasos de Matt Welsh
     (http://sunsite.unc.edu/mdw/LDP/gs/gs.html), la Gua del Usuario de
     Linux de Larry Greenfield
     (http://sunsite.unc.edu/pub/Linux/docs/linux-doc-project/users-
     guide), y la lista PUF de Linux (respuestas a Preguntas de Uso
     Frecuente) (http://sunsite.unc.edu/mdw/FAQ/Linux-FAQ.html.  Todos
     ellos pueden conseguirse en http://lucas.hispalinux.es en su
     versin traducida. Mantenga un sentimiento de culpabilidad hasta
     haber ledo al menos uno de ellos;

    La documentacion de los paquetes instalados en la mquina puede
     encontrarse usualmente en los directorios bajo /usr/doc/;

    Para conseguir ayuda acerca de las rdenes internas del
     intrprete de rdenes, teclee help o, mejor, man bash o info bash;

    Para conseguir ayuda acerca de una orden, teclee man orden, lo cual
     invoca a la pgina del manual (man) correspondiente a orden.
     Alternativamente, teclee info orden, lo cual mostrar la pgina
     info relativa a orden. info es un sistema de documentacion basado
     en hipertexto. Quiz no es intuitivo en un principio. Finalmente,
     puede intentar con apropos orden o whatis orden. Con todas estas
     rdenes, pulse 'q' para salir.

    Finalmente, en Internet: el lugar ms adecuado para conseguir ayuda
     es Usenet, en el foro news:comp.os.linux.setup. Por favor, no me
     enve mensajes solicitando ayuda, porque tengo bastante trabajo.

  1.3.  Convenciones

  A lo largo de este documento, los ejemplos seguirn el siguiente
  formato: <...> significa algo que debe ser especificado, mientras que
  [...] es algo opcional. Ejemplo:

       $ tar -tf <fichero.tar> [> fichero_redir]

  Debe indicar fichero.tar, pero la redireccin a fichero_redir es
  opcional.

  Desde ahora LPM significa para ms informacin Lea las Pginas del
  Manual.  No puedo dejar de recordar lo importante que es leer la
  documentacin. DosWin significa DOS/Windows.

  Cuando el simbolo de la lnea de rdenes en un ejemplo sea '#', la
  orden solo puede ser ejecutada por el root.

  2.  Para el Impaciente

  Quiere empezar ya? Eche un vistazo a esta tabla:

  DOS                     Linux                          Notas
  ------------------------------------------------------------------------------

  ATTRIB (+-)attr fich    chmod <modo> fich              completamente distinto
  BACKUP                  tar -Mcvf dispositivo dir/     dem
  CD nombredir\           cd nombredir/                  casi la misma sintaxis
  COPY fich1 fich2        cp fich1 fich2                 idem
  DEL fichero             rm fichero                     cuidado no hay undelete
  DELTREE directorio      rm -R directorio/              idem
  DIR                     ls                             no exact. misma sintaxis
  DIR fich /S             find . -name fich              completamente distinto
  EDIT fichero            vi fichero                     creo que no le gustara
                          joe fichero                    mas parecido al EDIT
  EDLIN fichero           ed fichero                     olvdelo
  FORMAT                  fdformat
                          mount, umount                  sintaxis muy distinta
  HELP orden              man orden                      misma filosofia
                          info orden
  MD directorio           mkdir directorio/              casi la misma sintaxis
  MOVE fich1 fich2        mv fich1 fich2                 idem
  NUL                     /dev/null                      idem
  PRINT fichero           lpr fichero                    idem
  PRN                     /dev/lp0,
                          /dev/lp1                       idem
  RD directorio           rmdir directorio/              idem
  REN fich1 fich2         mv fich1 fich2                 no para varios ficheros
  RESTORE                 tar -Mxpvf device              sintaxis distinta
  TYPE fichero            less fichero                   mucho mejor
  WIN                     startx                         polos opuestos!

  Si necesita ms que una tabla de rdenes, contine con las secciones
  siguientes.

  3.  Encontrndose con bash

  Buenas noticias: con Linux usted escribe mucho menos en la lnea de
  rdenes, porque el intrprete bash escribe por usted siempre que sea
  posible, y goza de muy buenas caractersticas de edicin de lnea.
  Para empezar, la tecla flecha-arriba llama a las ltimas lneas
  ejecutadas; pero an hay ms. Pulsar <TAB> completa los nombres de
  ficheros y directorios, por lo que teclear

       $ ls /uTABloTABbTAB

  es como teclear

       $ ls /usr/local/bin

  Si hubiera ambigedades, como al teclear

       $ ls /uTABloTABiTAB

  bash para porque no sabe si usted se refiere a /usr/local/info o a
  /usr/local/include.  Proporcione ms caracteres y pulse <TAB> de
  nuevo.

  Otras combinaciones de teclas tiles son <ESC-BACKSPACE> que borra una
  palabra a la izquierda, mientras que <ESC-D> borra una palabra a la
  derecha; <ESC-F> mueve el cursor una palabra a la derecha, <ESC-B> a
  la izquierda; <CTRL-A> mueve el cursor al principio de la lnea,
  <CTRL-E> al final. La tecla <ALT> es equivalente a <ESC>.

  Suficiente por ahora. Una vez que se acostumbre a estas combinaciones
  de teclas, encontrar bastante molesto el intrprete de rdenes de
  DOS.

  4.  Ficheros y Programas

  4.1.  Ficheros: Nociones preliminares

  Linux tiene una estructura de directorios y ficheros muy similar a la
  de DOSWin. Los ficheros tienen nombres que obedecen unas normas
  especiales, estn guardados en directorios y algunos son ejecutables,
  y entre stos, la mayora tiene opciones en la lnea de rdenes.
  Incluso puede utilizar comodines, redireccin y tuberas. Slo hay
  unas pocas diferencias:

    Bajo DOS, los nombres de ficheros estn en el llamado formato 8.3;
     por ejemplo NOTENOUG.TXT. Bajo Linux podemos hacerlo mejor. Si
     instal Linux usando un sistema de ficheros tal como ext2 o umsdos,
     puede utilizar nombres ms largos (hasta 255 caracteres), y con ms
     de un punto en ellos: por ejemplo,
     Este_es.un.nombre_de.fichero.MUY.largo.  Fjese que he utilizado
     tanto maysculas como minsculas: en efecto...

    Las maysculas y las minsculas en nombres de ficheros u rdenes
     son distintas. Por lo tanto, FICHERO.tar.gz, y fichero.tar.gz son
     dos ficheros distintos. ls es una orden, LS es un error;

    Usuarios de Windows, cuidado al usar nombres de ficheros largos
     bajo Linux. Si un nombre de fichero contiene espacios (no
     recomendado, pero posible), debe encerrar el nombre de fichero
     entre comillas dobles cada vez que se refiera a l. Por ejemplo:

       $ # la siguiente orden crea un directorio llamado "Mis ficheros antiguos"
       $ mkdir "Mis ficheros antiguos"
       $ ls
       Mis ficheros antiguos           bin             tmp

  No deben usarse ciertos caracteres: algunos son !*$&#.

    No hay extensiones obligadas como .COM y .EXE para los programas, o
     .BAT para los ficheros de procesamiento por lotes. Los ficheros
     ejecutables se marcan con un asterisco cuando se ejecuta la orden
     ls -F. Por ejemplo:

       $ ls -F
       cindy.jpg    cjpg*    Soy_un_directorio/  mi_1er_script*  old~

  Los ficheros cjpg* y mi_1er_script* son programas ejecutables. Bajo
  DOS, las copias de seguridad de los ficheros suelen acabar en cuyo
  nombre empieza con un punto es considerado como oculto. Ejemplo: el
  fichero .Soy.un.fichero.oculto no se mostrar a un orden ls;

    Las opciones de los programas bajo DOS se obtienen con /opcin.  En
     Linux se obtienen con -opcin o --opcin.  Ejemplo: dir /s se
     convierte en ls -R. Fjese en que muchos programas DOS (como PKZIP
     o ARJ) utilizan opciones de tipo Unix.

  Ahora puede saltar a la seccin ``de equivalencias'', pero yo de usted
  seguira leyendo.

  4.2.  Enlaces simblicos

  Unix tiene un tipo de fichero que no existe bajo DOS: el enlace
  simblico.  Puede pensar en l como un puntero o enlace a un fichero o
  a un directorio y que puede utilizarse en lugar del fichero o del
  directorio al que apunta; es similar a los Accesos Directos de
  Windows. Ejemplos de enlaces simblicos son /usr/X11, que apunta a
  /usr/X11R6; /dev/modem, que apunta a /dev/ttyS0 o a /dev/ttyS1.

  Para crear un enlace simblico:

       $ ln -s <fichero_o_directorio> <nombre_del_enlace>

  Ejemplo:

       $ ln -s /usr/doc/g77/DOC g77manual.txt

  Ahora puede referirse a g77manual.txt en lugar de /usr/doc/g77/DOC.
  Los enlaces aparecen en los listados de directorio as:

       $ ls -F
       g77manual.txt@
       $ ls -l
       l(muchas cosas...)             g77manual.txt -> /usr/doc/g77/DOC

  4.3.  Permisos y Propiedades

  Los ficheros y directorios de DOS tienen los siguientes atributos: A
  (fichero), H (oculto), R (slo-lectura), y S (sistema).  Slo H y R
  tienen sentido bajo Linux: los ficheros ocultos comienzan con un
  punto, y los de slo lectura, tienen activado el permiso r, pero nada
  ms.

  Bajo Unix un fichero tiene permisos y un propietario, que pertenece
  a un grupo. Mire este ejemplo:

       $ ls -l /bin/ls
       -rwxr-xr-x  1  root  bin  27281 Aug 15 1995 /bin/ls*

  El primer campo contiene los permisos del fichero /bin/ls, que
  pertenece a root, del grupo bin. Dejando la informacin restante a un
  lado (el libro de Matt esta ah para ese propsito), slo recordar lo
  que significa -rwxr-xr-x (de izquierda a derecha):

  - es el tipo de fichero (- = fichero normal, d = directorio, l =
  enlace, etc.); rwx son los permisos del propietario del fichero (leer,
  escribir, ejecutar); r-x son los permisos para el grupo del
  propietario del fichero (leer y ejecutar); (no tocar el concepto de
  grupo, puede pasar sin l mientras sea un novato ;-) r-x son los
  permisos para todos los dems usuarios (leer, ejecutar).

  Esa es la razn de que no pueda borrar el fichero /bin/ls a menos que
  sea root: no tiene el permiso de escritura para hacer eso. Para
  cambiar los permisos de un fichero, la orden es:

       $ chmod <quinXperm> <fichero>

  donde quin podra ser:

    u usuario, que es el propietario,

    g (grupo),

    o (otros).

  X puede ser tanto + como -, y  perm puede ser:

    r (lectura),

    w (escritura)

    x (ejecucin).

  Ejemplos:

  $ chmod u+x fichero

  esto habilita el permiso de ejecucin para el propietario del fichero.
  Atajo: chmod +x fichero.

       $ chmod go-wx fichero

  esto quita el permiso de escritura y de ejecucin para todo el mundo
  menos al usuario.

       $ chmod ugo+rwx fichero

  esto le da a todo el mundo el permiso de lectura, escritura y
  ejecucin.

       $ chmod +s fichero

  esto convierte al fichero en setuid o suid; esto es, un fichero que
  todo el mundo puede ejecutar con los privilegios de su dueo.
  Normalmente, se encontrar con archivos suid del root; estos son, a
  menudo, ficheros importantes del sistema, como el servidor X.

  Una manera ms corta de referirse a los permisos es con nmeros: rwxr-
  xr-x puede ser expresado como 755 (cada letra corresponde a un bit:
  --- es 0, --x es 1, -w- es 2, -wx es 3...).  Parece difcil, pero con
  algo de prctica el concepto se domina.  root, el administrador y
  superusuario, puede cambiar los permisos de los ficheros de todo el
  mundo. Hay mucha ms informacin acerca de esto: LPM.

  4.4.  Ficheros: rdenes equivalentes

  A la izquierda, las rdenes de DOS; a la derecha, sus equivalentes en
  Linux.

       COPY:         cp
       DEL:          rm
       MOVE:         mv
       REN:          mv
       TYPE:         more, less, cat

  Operadores de redireccin y de tuberas:

  < > >>  |

  Comodines: * ?

       nul: /dev/null

       prn, lpt1:  /dev/lp0 o /dev/lp1; lpr

  EJEMPLOS

       DOS                                     Linux
       ---------------------------------------------------------------------

       C:\GUIDO>ATTRIB +R FICH.TXT             $ chmod 400 fich.txt
       C:\GUIDO>COPY JOE.TXT JOE.DOC           $ cp joe.txt joe.doc
       C:\GUIDO>COPY *.* TOTAL                 $ cat * > total
       C:\GUIDO>COPY FRACTALS.DOC PRN          $ lpr fractals.doc
       C:\GUIDO>DEL TEMP                       $ rm temp
       C:\GUIDO>DEL *.BAK                      $ rm *~
       C:\GUIDO>MOVE PAPER.TXT TMP\            $ mv paper.txt tmp/
       C:\GUIDO>REN PAPER.TXT PAPER.ASC        $ mv paper.txt paper.asc
       C:\GUIDO>PRINT LETTER.TXT               $ lpr letter.txt
       C:\GUIDO>TYPE LETTER.TXT                $ more letter.txt
       C:\GUIDO>TYPE LETTER.TXT                $ less letter.txt
       C:\GUIDO>TYPE LETTER.TXT > NUL          $ cat letter.txt > /dev/null
               no disponible                   $ more *.txt *.asc
               no disponible                   $ cat section*.txt | less

  Notas:

    * es ms inteligente bajo Linux: * equivale a todos los ficheros
     excepto los ocultos; .* equivale a todos los ficheros ocultos; *.*
     equivale slo a aquellos ficheros que tienen un punto en medio del
     nombre, seguido de otros caracteres; p*r equivaldra tanto a peor
     como a por;  *c* equivaldra tanto a pecado como a peca.

    Cuando utilice more, pulse espacio para ir leyendo a travs del
     fichero, q o Ctrl-C para salir. less es ms intuitivo y permite
     utilizar las teclas del cursor;

    No hay UNDELETE, as que pinselo dos veces antes de borrar
     cualquier cosa;

    Adems de los < > >> del DOS, Linux tiene el operador 2> para
     redirigir los mensajes de error (stderr); ms an, el operador 2>&1
     redirige stderr a stdout (la salida estndar), mientras que 1>&2
     redirige stdout a stderr;

    Linux tiene otro comodn: los corchetes []. Usar [abc]* equivale a
     los ficheros que empiezan por a, por b o por c; *[I-N,1,2,3]
     equivale a los ficheros que acaban por I, J, K, L, M, N, 1, 2, 3;

    No hay un RENAME como en DOS; esto es, mv *.xxx *.yyy no funciona.
     Un orden similar a REN est disponible en
     ftp://sunsite.unc.edu/pub/Linux/utils/file;

    Use cp -i y mv -i para ser avisado cuando un fichero vaya a ser
     sobreescrito.

  4.5.  Ejecucin de programas: Multitarea y Sesiones

  Para ejecutar un programa, escriba su nombre tal y como lo hara bajo
  DOS.  Si el directorio ---vea la seccin ``Directorios''--- donde el
  programa est guardado est incluido en la variable de entorno PATH
  ---seccin ``Inicializacin''--- el programa comenzar a ejecutarse.
  Excepcin: al contrario que bajo DOS, en Linux un programa localizado
  en el directorio actual no se ejecutar a manos que el directorio
  actual (simbolizado por .) est incluido en el PATH.  Para evitarlo,
  suponiendo que el programa se llame prog, teclee

  Este es el aspecto tpico de una lnea de rdenes:

       $ orden [-o1 [-o2] ... [-on]] [par1 [par2] ... [parn]]  [< input] [> output]

  donde -o1, ..., -on son las opciones del programa, par1, rdenes en la
  lnea de rdenes:

       $ orden1 ; orden2 ; ... ; ordenN

  Esto es todo acerca de ejecutar rdenes, pero es fcil ir un paso ms
  all. Una de las principales razones para usar Linux es que es un
  sistema operativo multitarea ---puede ejecutar varios programas (a
  partir de ahora, procesos) a la vez---. Puede lanzar procesos en
  segundo plano (background)  y seguir trabajando inmediatamente. Ms
  an, Linux permite tener varias sesiones abiertas simultneamente: es
  como tener muchos ordenadores en los que trabajar a la vez.

    Para cambiar a la sesin 1..6 de las consolas virtuales, presione
     <ALT-F1> ... <ALT-F6>

    Para comenzar una nueva sesin en la misma consola virtual sin
     dejar la actual, teclee su - <nombre_de_usuario>. Ejemplo: su -
     root.  Esto es til, por ejemplo, cuando se necesita realizar una
     tarea que slo el root puede hacer.

    Para acabar una sesin, teclee exit. Si hay trabajos parados (ver
     ms abajo), ser avisado.

    Para lanzar un proceso en segundo plano, aada un '&', al final de
     la lnea de rdenes:

  $ nomprog [-opciones] [parametros] [< input] [> output] &
  [1] 123

    el intrprete de rdenes identifica el proceso con un nmero de
     trabajo (p.e. [1]; ver ms abajo), y con un PID (123 en nuestro
     ejemplo).

    Para ver cuntos procesos hay, teclee ps ax. Esto generar una
     lista de procesos actualmente en ejecucin.

    Para matar (finalizar) un proceso, teclee kill <PID>.  Puede que
     necesite matar un proceso cuando no sepa cmo cerrarlo de la manera
     correcta...  ;-). A veces, slo podr matar un proceso con kill
     -SIGKILL <PID>.

     Adems, el intrprete de rdenes permite suspender temporalmente
     (parar) un proceso, mandar un proceso al segundo plano, y traer un
     proceso del segundo plano al primer plano. En este contexto, los
     procesos son denominados trabajos (jobs).

    Para ver cuntos trabajos hay, teclee jobs. Aqu los trabajos son
     identificados por su nmero de trabajo, no por su PID.

    Para parar un proceso ejecutndose en primer plano pulse <CTRL-C>
     (no siempre funciona).

    Para suspender un proceso ejecutndose en primer plano, pulse
     <CTRL-Z> (dem al anterior).

    Para mandar un proceso suspendido al segundo plano (convirtindolo
     en trabajo), teclee bg <trabajo>.

    Para traer un trabajo al primer plano, teclee fg <%trabajo>. Para
     traer al primer plano el ltimo trabajo enviado al segundo plano,
     simplemente teclee fg.

    Para matar un trabajo, teclee kill <%trabajo> donde trabajo puede
     ser 1, 2, 3...

  Usando estas rdenes puede formatear un disco, comprimir un puado de
  ficheros, compilar un programa, y descomprimir un fichero
  simultneamente, y todava tener la lnea de rdenes a su disposicin.
  Intntelo con Windows, slo para ver la diferencia de prestaciones
  (siempre que no se le cuelgue, claro).

  4.6.  Ejecucin de programas en sistemas remotos

  Para ejecutar un programa en una mquina remota cuyo nombre es
  maquina.remota.edu, teclee:

       $ telnet maquina.remota.edu

  Tras introducir su nombre de usuario y contrasea, arranque su
  programa favorito. Obviamente, debe tener una cuenta en la mquina
  remota.

  Si tiene X11, puede incluso ejecutar una aplicacin X en un ordenador
  remoto, mostrndolo en su pantalla de X. Supongamos maquina.remota.edu
  la mquina X remota y sistema.linux.yo su mquina Linux. Para ejecutar
  desde sistema.linux.yo un programa X que reside en maquina.remota.edu,
  haga lo siguiente:

    arranque X, arranque un xterm o un emulador de terminal
     equivalente, y despus teclee:

       $ xhost +maquina.remota.edu
       $ telnet maquina.remota.edu

    tras introducir su nombre y contrasea, teclee:

       remote:$ DISPLAY=sistema.linux.yo:0.0
       remote:$ programa &

  (en vez de DISPLAY..., puede que tenga que escribir setenv DISPLAY
  sistema.linux.yo:0.0. Depende del intrprete de rdenes remoto).

  Y.. voila! Ahora programa se iniciar en maquina.remota.edu y se
  mostrar en su mquina. Aunque mejor no intente esto con un mdem,
  porque sera demasiado lento para poder utilizarse. Adems: es un
  mtodo muy inseguro: por favor, lea el mini-COMO de Aplicaciones X
  Remotas en http://sunsite.unc.edu/LDP/HOWTO/mini/Remote-X-Apps.

  5.  Gestin de Directorios

  5.1.  Directorios: Nociones preliminares

  Hemos visto las diferencias entre los ficheros de DOSWin y Linux.
  Entre directorios, bajo DOSWin el directorio raz es \ y bajo Linux es
  / . De manera similar, los directorios anidados se separan mediante \
  en DOSWin y mediante / en Linux. Ejemplo de rutas de fichero:

       DOS:    C:\PAPERS\GEOLOGY\MID_EOC.TEX
       Linux:  /home/guido/papers/geology/middle_eocene.tex

  Como es normal, .. es el directorio padre y . es el directorio actual.
  Recuerde que el sistema no le dejar hacer cd, rd o md donde usted
  quiera. Cada usuario tiene sus propias cosas en un directorio llamado
  `home', directorio personal o de usuario, cedido por el administrador
  del sistema; por ejemplo, en mi PC mi directorio personal es
  /home/guido.

  5.2.  Permisos de directorios.

  Los directorios tambin tienen permisos. Lo que hemos visto en la
  seccin ``Permisos'' tambin rige para los directorios (usuario,
  grupo, y otros). Para un directorio, rx significa que puede cambiar a
  ese directorio, y w significa que puede crear o borrar ficheros en l
  (segn los permisos de los ficheros, por supuesto), o el directorio
  mismo.

  Por ejemplo, para prevenir que otros usuarios husmeen en
  /home/guido/text:

       $ chmod o-rwx /home/guido/text

  5.3.  Equivalencia de rdenes

       DIR:            ls, find, du
       CD:             cd, pwd
       MD:             mkdir
       RD:             rmdir
       DELTREE:        rm -R
       MOVE:           mv

  EJEMPLOS

       DOS                                     Linux
       ---------------------------------------------------------------------

       C:\GUIDO>dir                            $ ls
       C:\GUIDO>dir file.txt                   $ ls file.txt
       C:\GUIDO>dir *.h *.c                    $ ls *.h *.c
       C:\GUIDO>dir/p                          $ ls | more
       C:\GUIDO>dir/a                          $ ls -l
       C:\GUIDO>dir *.tmp /s                   $ find / -name "*.tmp"
       C:\GUIDO>cd                             $ pwd
               n/a - ver nota                  $ cd
               idem                            $ cd ~
               idem                            $ cd ~/temp
       C:\GUIDO>cd \otros                      $ cd /otros
       C:\GUIDO>cd ..\temp\trash               $ cd ../temp/trash
       C:\GUIDO>md newprogs                    $ mkdir newprogs
       C:\GUIDO>move prog ..                   $ mv prog ..
       C:\GUIDO>md \progs\turbo                $ mkdir /progs/turbo
       C:\GUIDO>deltree temp\trash             $ rm -R temp/trash
       C:\GUIDO>rd newprogs                    $ rmdir newprogs
       C:\GUIDO>rd \progs\turbo                $ rmdir /progs/turbo

  Notas:

    Cuando se use rmdir, el directorio a borrar debe estar vaco.  Para
     borrar un directorio y todos sus contenidos, use rm -rf (bajo su
     propia responsabilidad).

    El carcter ~ es un atajo para el nombre de su directorio personal.
     Las rdenes cd o cd ~ le llevarn a su directorio personal desde
     dondequiera que est; la orden cd ~/tmp le llevar a
     /home/su_directorio_de_usuario/tmp.

    cd - deshace el ltimo cd.

  6.  Disquetes, discos duros y similares.

  Hay dos maneras de adminsitrar dispositivos bajo Linux: a la manera de
  DOS y a la manera de UNIX. Elija.

  6.1.  Administracin de dispositivos en modo DOS

  La mayor parte de las distribuciones de Linux incluyen las Mtools, un
  conjunto de rdenes que son perfectamente equivalentes a sus
  correspondientes rdenes en DOS, pero que empiezan con una 'm': p.e.,
  mformat, mdir, mmd, mdel, y as. Pueden incluso conservar los nombres
  de ficheros largos, pero no los permisos de los ficheros. Si usted
  configura las Mtools editando un fichero llamado /etc/mtools.conf (se
  proporciona un ejemplo en la distribucin), podr tambin acceder a la
  particin DOS/Win, el CD-ROM, y la unidad Zip. Sin embargo, para
  formatear un disco sin formato, la orden mformat no funcionar. Como
  root, tendr que ejecutar esta orden con anterioridad:  fdformat
  /dev/fd0H1440

  Nota: no podr acceder a los ficheros del disquete con una orden como,
  por ejemplo, less a:fich.txt. Esta es la desventaja de la manera DOS
  de montar discos.

  6.2.  Administracin de dispositivos en modo UNIX

  UNIX maneja los dispositivos de una manera distinta. No hay unidades
  separadas como A: o C:; un disco, sea un disquete o lo que sea, pasa a
  ser parte del sistema de ficheros local mediante una operacin
  denominada montaje (mounting). Cuando se acaba de utilizar el disco,
  antes de extraerlo, debe desmontarlo (unmount).

  Fsicamente, dar formato a un disco es una cosa, hacer un sistema de
  ficheros en l es otra. La orden de DOS FORMAT A: hace ambas cosas,
  pero bajo Linux son acciones separadas. Para dar formato a un disco,
  mire ms arriba. Para crear un sistema de ficheros:

       # mkfs -t ext2 -c /dev/fd0H1440

  Puede utilizar dos, vfat (recomendado) u otros formatos en lugar de
  ext2. Una vez que el disco est preparado, mntelo con la orden

       # mount -t ext2 /dev/fd0 /mnt

  especificando el sistema de ficheros correcto si no utiliza ext2.
  Ahora usted puede acceder a los ficheros del disquete. Todo lo que
  sola hacer con A: o B: se hace ahora utilizando en su lugar /mnt.
  Ejemplos:

       DOS                                     Linux
       ---------------------------------------------------------------------

       C:\GUIDO>DIR A:                         $ ls /mnt
       C:\GUIDO>COPY A:*.*                     $ cp /mnt/* .
       C:\GUIDO>COPY *.ZIP A:                  $ cp *.zip /mnt
       C:\GUIDO>EDIT A:FILE.TXT                $ jstar /mnt/file.txt
       C:\GUIDO>A:                             $ cd /mnt
       A:> _                                   /mnt/$ _

  Cuando haya acabado, antes de sacar el disco deber desmontarlo con la
  orden

       # umount /mnt

  Obviamente, debe hacer un fdformat y un mkfs slo a los discos no
  formateados, que no han sido usados nunca. Si quiere utilizar la
  unidad B:, ponga fd1H1440 y fd1 en lugar de fd0H1440 y fd0 en los
  ejemplos anteriores.

  No hace falta decir que la manera de proceder con los disquetes
  tambin funciona con otros dispositivos, como por ejemplo, otro disco
  duro o una unidad CD-ROM. Esto es para montar el CD-ROM:

       # mount -t iso9660 /dev/cdrom /mnt

  Esta era la manera oficial de montar discos, pero hay un truco. Como
  es algo incmodo tener que ser root para montar un disquete o un CD-
  ROM, puede darse permisos a cada usuario de esta manera:

    como root, hacer lo siguiente:

       # mkdir /mnt/a: ; mkdir /mnt/floppy ; mkdir /mnt/cdrom
       # chmod 777 /mnt/floppy* /mnt/cd*
       # # asegrese de que el dispositivo CD-ROM es el adecuado
       # chmod 666 /dev/hdb ; chmod 666 /dev/fd*

    aadir en /etc/fstab las siguientes lneas:

       /dev/cdrom        /mnt/cdrom    iso9660   ro,user,noauto          0       0
       /dev/fd0          /mnt/floppy   vfat      user,noauto             0       0

  Ahora, para montar un disquete DOS y un CD-ROM:

       $ mount /mnt/floppy
       $ mount /mnt/cdrom

  Cualquier usuario puede acceder a /mnt/floppy, /mnt/a:, y /mnt/cdrom.
  Recuerde que si considera importante la seguridad, dejar que todo el
  mundo pueda montar discos de esta manera constituye un gran agujero.

  Dos rdenes tiles son df, que da informacin acerca de los sistemas
  de ficheros montados, y du nombredir que informa del espacio de disco
  consumido por el directorio.

  6.3.  Copias de seguridad

  Hay muchos paquetes que pueden servirle, pero lo ms simple para hacer
  una copia de seguridad multivolumen (como root) es:

       # tar -M -cvf /dev/fd0H1440 /directorio_a_guardar

  Asegrese de tener un disquete formateado en la unidad, y otros ya
  preparados. Para restaurar sus ficheros, inserte el primer disquete en
  la unidad y utilice:

       # tar -M -xpvf /dev/fd0H1440

  7.  Qu pasa con Windows?

  El equivalente a Windows es el sistema grfico X Window, o X11, para
  abreviar. Al contrario que Windows o el Mac, X11 no fue diseado para
  facilitar el uso o para lograr una mejor apariencia, sino para
  proporcionar utilidades grficas a las estaciones de trabajo UNIX.
  Estas son las principales diferencias:

    Mientras que la apariencia y comportamiento de Windows es similar
     en todo el mundo, en X11 esto no es as: es mucho ms configurable.
     La apariencia general de X11 est encomendada a un programa clave
     llamado gestor de ventanas (window manager), del cual hay una
     amplia oferta entre la que escoger: fvwm, basico pero agradable y
     eficiente con el consumo de memoria, fvwm2-95, Afterstep,
     WindowMaker, Enlightenment, y muchos ms. El gestor de ventanas es
     normalmente llamado por un fichero denominado .xinitrc;

    Su gestor de ventanas puede ser configurado de manera que las
     ventanas acten como en Windows: si usted hace click en ella, viene
     al primer plano. Otra posibilidad es que venga al primer plano si
     el puntero del ratn est sobre ella (focus). Tambin, el lugar
     de emplazamiento de las ventanas en la pantalla puede ser
     automtico o interactivo: si un marco extrao aparece en lugar de
     su programa, haga click con el botn izquierdo del ratn donde
     quiera que aparezca;

    La mayor parte de las acciones pueden configurarse editando uno o
     ms ficheros de configuracin. Lea la documentacin de su gestor de
     ventanas; el archivo de configuracin puede ser .fvwmrc, suele
     encontrarse en /etc/X11/nombre-de-gestor-de-ventanas/system.nombre-
     gestor-ventanas;

    Las aplicaciones X11 se escriben empleando unas bibliotecas
     especiales (widget sets); como hay muchas disponibles, las
     aplicaciones tienen aspectos distintos. Las ms bsicas son
     aquellas que usan los controles (widgets) Athena (con aspecto 2D;
     xdvi, xman, xcalc); otras usan Motif (netscape), otras an usan
     Tcl/Tk, Xforms, Qt, Gtk, y otra ms. Casi todas esas bibliotecas
     dan el mismo aspecto y comportamiento que Windows;

    La manera de comportarse, desafortunadamente, puede no ser
     coherente. Por ejemplo, si selecciona una lnea de texto utilizando
     el ratn y pulsa <RETROCEDER>, esperar que la lnea desaparezca,
     verdad? Esto no sucede con aplicaciones basadas en Athena, pero
     sucede con aplicaciones basadas en otros controles;

    El cmo funcionen las barras de desplazamiento y el cambio de
     tamao depender del gestor de ventanas y el juego de widgets.
     Pista: si se encuentra con que las barras de desplazamiento no se
     comportan como usted esperaba, utilice el botn central o los dos
     botones juntos para moverla;

    Las aplicaciones no tienen un icono por defecto, pero pueden tener
     muchos. La mayor parte de los gestores de ventanas proporcionan un
     menu al que se tiene acceso haciendo click en el escritorio
     (ventana raz); no har falta decir que el men puede ser
     configurado. Para cambiar la apariencia de la ventana raz, utilice
     xsetroot o xloadimage;

    El portapapeles slo puede contener texto, y se comporta de manera
     extraa. Cada vez que selecciona texto, se copia automticamente al
     portapapeles: vaya a cualquier sitio y pulse en botn central del
     ratn para pegarlo. Hay una aplicacin, xclipboard, que proporciona
     varios portapapeles;

    Arrastrar y soltar es una opcin, y est disponible solamente si
     usted utiliza aplicaciones X11 que la permitan.

  Para ahorrar memoria, uno debera utilizar aplicaciones que usaran las
  mismas bibliotecas, pero esto es difcil de hacer en la prctica.

  Hay proyectos que pretenden hacer que X11 tenga una apariencia y
  comportamiento tan coherente como Windows. Gnome, http://www.gnome.org
  y KDE, www.kde.org son un ejemplo. Prubelos: no echar de menos su
  escritorio Windows nunca ms.

  8.  Personalizacin del sistema

  8.1.  Ficheros de inicializacin del sistema

  Dos ficheros importantes bajo DOS son el AUTOEXEC.BAT y el CONFIG.SYS,
  los cuales se utilizan al rearrancar el sistema para inicializarlo,
  dar valores a algunas variables de entorno como PATH y FILES, y
  posiblemente lanzar un programa o fichero de procesamiento por lotes.
  Bajo Linux hay varios ficheros de inicializacin, algunos de los
  cuales no deberan ser modificados hasta que usted supiese con
  seguridad lo que est haciendo. De todos modos, estos son los ms
  importantes:

       FICHEROS             NOTAS
       /etc/inittab         no tocar por ahora!
       /etc/rc.d/*          idem

  Si todo lo que necesita es establecer el PATH y otras variables de
  entorno, o desea cambiar los mensajes del login o ejecutar
  automticamente un programa tras iniciar una sesin, eche un vistazo a
  los siguientes ficheros:

       FICHEROS                        NOTAS
       /etc/issue                      establece el mensaje de antes del login
       /etc/motd                       establece el mensaje de despues del login
       /etc/profile                    establece $PATH y otras variables, etc.
       /etc/bashrc                     define alias y funciones, etc. (ver mas abajo)
       /home/su_home/.bashrc           define sus alias y sus funciones
       /home/su_home/.bash_profile   o
       /home/su_home/.profile          establece el entorno y ejecuta sus programas

  Si el ltimo fichero existe (fjese en que es un fichero oculto), se
  leer tras el inicio de sesin y se ejecutarn las rdenes en l
  almacenados.

  Ejemplo; mire este .bash_profile:

  # Soy un comentario
  echo Entorno:
  printenv | less   # equivalente de la orden SET bajo DOS
  alias d='ls -l'   # es facil comprender lo que es un alias
  alias up='cd ..'
  echo "Recuerde que su path es "$PATH
  echo "Hoy es `date`"  # usa la salida de la orden 'date'
  echo "Que tenga un buen dia, "$LOGNAME
  # Lo siguiente es una funcion del shell
  ctgz() # Lista los contenidos de un fichero .tar.gz
  {
    for file in $*
    do
      gzip -dc ${file} | tar tf -
    done
  }
  # fin de .profile

  $PATH y $LOGNAME, lo adivin, son variables de entorno.  Hay muchas
  otras con las que jugar; para buscar ejemplos, LPM de aplicaciones
  como less.

  Poner esta lnea en su /etc/profile le proporcionar el equivalente de
  PROMPT $P$G;

       export PS1="\w\\$ "

  9.  Ficheros de inicializacin de programas

  Bajo Linux, casi todo puede ser configurado de acuerdo con sus
  necesidades. La mayora de los programas tienen uno o ms ficheros de
  inicializacin con los que puede trastear, a menudo llamados que
  querr modificar son:

     .inputrc: usado por bash para definir significados de teclas;

     .xinitrc: usado por startx para inicializar el sistema X Window;

     .fvwmrc: usado por el gestor de ventanas fvwm.

     .joerc: usado por el editor joe;

     .jedrc: usado por el editor jed;

     .pinerc: usado por el lector de correo pine;

     .Xdefault: usado por muchos programas X.

  Para el resto de programas con el que se encontrar tarde o temprano,
  LPM.  Quiz podra ser interesante para usted el documento Cmo
  configurar Linux http://sunsite.unc.edu/mdw/HOWTO/Config-HOWTO.html.

  10.  Trabajo en red: conceptos

  No solo est disponible bajo Linux un Acceso telefnico a redes,
  sino que tambin es ms estable y ms rpido. El nombre clave es
  PPP, el protocolo empleado para conectarse a Internet utilizando
  mdems.  Necesita un ncleo que de soporte a PPP y una herramienta que
  marque y realice la conexin.

  Para recoger el correo de su proovedor de servicios Internet necesita
  una herramienta llamada recolector de correo (email fetcher) que
  utiliza el protocolo POP; cuando recoja el correo, parecer como si
  hubiera sido enviado directamente a su sistema Linux. Entonces deber
  utilizar un gestor de correo de usuario como pine, mutt, elm u otros
  muchos para administrarlo.

  Mientras que bajo Windows, siempre que lanza una aplicacin de
  Internet se ejecuta el programa de conexin, bajo Linux el proceso es
  al revs.  Primero se conecta, y despus se lanza la aplicacin. Un
  programa llamado diald proporciona el acceso usual. Instalar y
  configurar una red sola ser una de las cosas ms difciles de hacer
  bajo Linux, pero ya no lo es: por favor, consulte el documento COMO
  configurar Linux.

  Finalmente, acerca del Entorno de red: puede hacer que su mquina
  Linux aparezca como un Windows NT/9x en una red local de mquinas
  Windows. La palabra mgica es Samba: no el baile brasileo, sino una
  implementacin del protocolo SMB para Linux. Visite
  http://samba.anu.edu.au/samba.

  11.  Un poco de programacin

  11.1.  Rutinas del Intrprete de Comandos: Ficheros .BAT con
  esteroides

  Si ha utilizado ficheros .BAT para crear atajos de largas lneas de
  orden (yo sola hacerlo), el objetivo puede ser obtenido insertando
  las lneas de alias convenientes (ver ejemplo de ms arriba) en el
  profile o en el encantar el lenguaje de Script (guionado) que el
  shell pone a su disposicin: es tan potente como el viejo Qbasic (o
  ms).  Tiene variables, estructuras como while, for, case, if-then-
  else, y montones de nuevas caractersticas: puede ser una buena
  alternativa a un lenguaje de programacin de verdad.

  Para escribir una rutina (script) ---el equivalente a un fichero ASCII
  estndar que contenga las instrucciones, guardarlo, y entonces hacerlo
  ejecutable con la orden chmod +x fichero. Para ejecutarlo, teclee su
  nombre.

  Aviso: el editor del sistema se llama vi, y es un hecho probado que la
  mayor parte de los nuevos usuarios lo encuentran muy difcil de usar.
  No voy a explicar cmo usarlo; por favor, consulte el libro de Matt
  Welsh o busque un cursillo en la red. Suficiente decir por ahora que:

    para insertar texto, pulse `i' y despus el texto;

    para borrar caracteres, teclee ESC y despus `x';

    para salir de vi sin guardar, pulse ESC y despus :q!

    para guardar y salir, pulse ESC y luego :wq

  joe es un buen editor para novatos: llmelo tecleando jstar y tendr
  los mismos atajos de teclas que en el editor de DOSWin.  jed en modo
  WordStar o IDE es incluso mejor. Por favor, consulte la seccin
  ``Dnde encontrar aplicaciones'' para ver dnde conseguir estos
  editores.

  Escribir rutinas bajo bash es una materia tan extensa que requerira
  un libro para abarcarla toda, y no voy a profundizar ms all en este
  tema.  Slo dar un ejemplo de script, del cual se pueden extraer las
  reglas bsicas:

       #!/bin/sh
       # ejemplo.sh
       # Soy un comentario
       # no cambie la primera linea: debe estar ahi
       echo "Este sistema es: `uname -a`" # usa la salida de la orden
       echo "Me llamo $0" # variables intrinsecas
       echo "Usted me dio $# parametros: "$*
       echo "El primer parametro es: "$1
       echo -n "Como se llama? " ; read su_nombre
       echo fijese en la diferencia: "Hola, $su_nombre" # entrecomillando con "
       echo fijese en la diferencia: 'Hola, $su_nombre' # entrecomillando con '
       DIRS=0 ; FILES=0
       for fichero in `ls .` ; do
         if [ -d ${fichero} ] ; then # si el fichero esta en el directorio
           DIRS=`expr $DIRS + 1`  # DIRS = DIRS + 1
         else if [ -f ${fichero} ] ; then
          FILES=`expr $FILES + 1`
         fi
         case ${fichero} in
           gif|*jpg) echo "${fichero}: fichero grafico" ;;
           *.txt|*.tex) echo "${fichero}: fichero de texto" ;;
           *.c|*.f|*.for) echo "${fichero}: fichero de codigo fuente" ;;
           *) echo "${fichero}: fichero generico" ;;
         esac
       done
       echo "Hay ${DIRS} directorios y ${FILES} ficheros"
       ls | grep "ZxY--!!!WKW"
       if [ $? != 0 ] ; then # Sacar el codigo del ultimo orden
         echo "ZxY--!!!WKW no encontrado"
       fi
       echo "ya es suficiente... Para mas informacion teclee 'man bash'."

  11.2.  Sus programas en C

  Bajo Unix, el lenguaje del sistema es C, le guste o no. Pero tambin
  estn a su disposicin otros lenguajes como FORTRAN, Pascal, Lisp,
  Basic, Perl, awk...

  Suponiendo que usted sepa C, hay un par de guas para aquellos que han
  utilizado Turbo C++ o uno de sus hermanos bajo DOS. El compilador de C
  se denomina gcc y carece de todas las florituras que normalmente
  acompaan a sus anlogos bajo DOS: no tiene IDE, ni ayuda en lnea, ni
  debugger integrado, etc... Es slo un rstico compilador de lnea de
  rdenes, muy potente y eficiente. Esto es lo que debe teclear para
  compilar el tpico programa hello.c:

       $ gcc hello.c

  lo que crear un fichero ejecutable llamado a.out. Para cambiar el
  nombre del ejecutable a otro nombre:

       $ gcc -o hola hello.c

  Para enlazar una librera al programa, aada la opcin
  -lnombre_de_librera. Por ejemplo, para enlazar la librera math:

       $ gcc -o mathprog mathprog.c -lm

  (-lnombre_libreria fuerza a gcc a enlazar la librera
  /usr/lib/libnombre_librera.a; por lo tanto -lm enlaza
  /usr/lib/libm.a).

  Bien. Pero cuando su programa est compuesto por varios ficheros de
  cdigo fuente, necesitar usar la utilidad make. Supongamos que ha
  escrito un evaluador de expresiones: su cdigo fuente se denomina
  parser.c e tiene un #include de dos ficheros en su cabecera: parser.h
  y xy.h.  Entonces, desea utilizar las rutinas de parser.c en otro
  programa, calc.c, que hace un #include de parser.h. Vaya lo! Cmo
  se puede compilar calc.c?

  Debe escribir un fichero llamado Makefile, el cual muestra al
  compilador las dependencias entre los ficheros de cdigo fuente y los
  ficheros de cdigo objeto. En nuestro ejemplo:

       # Este es el Makefile utilizado para compilar calc.c
       # Pulse la tecla <TAB> en las posiciones marcadas!

       calc: calc.o parser.o
       <TAB>gcc -o calc calc.o parser.o -lm
       # calc depende de dos ficheros de codigo objeto: calc.o and parser.o

       calc.o: calc.c parser.h
       <TAB>gcc -c calc.c
       # calc.o depende de dos ficheros de codigo fuente

       parser.o:  parser.c parser.h xy.h
       <TAB>gcc -c parser.c
       # parser.o depende de tres ficheros de codigo fuente

       # fin de Makefile.

  Guarde esto como Makefile y teclee

       $ make

  para compilar su programa. Gurdelo como calc.mak de forma alternativa
  y teclee

       $ make -f calc.mak

  Y, por supuesto, LPM.

  Puede pedir ayuda acerca de las funciones de C, que se encuentra en
  las pginas man, seccin 3; por ejemplo:

       $ man 3 printf

  Hay muchas libreras disponibles por ah; entre las primeras que
  desear usar estn las ncurses (efectos en modo texto) y svgalib,
  (grficos para consola). Si se siente suficientemente valiente para
  atacar la programacin bajo X (no es tan difcil), hay muchas
  bibliotecas que harn mucho ms fcil escribir programas para X11.
  Eche un vistazo a http://www.xnet.com/~blatura/linapp6.html, teniendo
  en cuenta el hecho de que Gtk se est volviendo un estndar.

  Muchos editores pueden actuar como IDE. emacs y jed, por ejemplo,
  proporcionan marcado de sintaxis, indentacin automtica, y cosas
  similares. De manera alternativa, consiga el paquete rhide de
  ftp://sunsite.unc.edu:/pub/Linux/devel/debuggers/.  Es un clon del IDE
  de Borland, y cabe la posibilidad de que le guste.

  12.  El restante 1%

  Mucho ms que un 1%, en realidad...

  12.1.  Utilizacin de tar  y gzip

  Bajo Unix hay algunas aplicaciones ampliamente utilizadas para
  archivar y comprimir ficheros. tar se utiliza para archivar varios
  ficheros en uno ---es como PKZIP o Winzip, pero no comprime, slo
  archiva. Para archivar varios ficheros en uno (que llamaremos archivo
  de ahora en adelante):

       $ tar -cvf <nombre_fichero_final.tar> <fichero1> [fichero2...]

  Para extraer ficheros de un archivo:

       $ tar -xpvf <nombre_fichero.tar> [fichero]

  Para listar los ficheros contenidos de un archivo:

       $ tar -tf <nombre_fichero.tar> | less

  Puede comprimir los ficheros usando compress, el cual es obsoleto y no
  debera ser utilizado nunca ms, o usando gzip:

       $ compress <fichero>
       $ gzip <fichero>

  eso crea un fichero comprimido con la extensin .Z (compress) o vez.
  Para descomprimir, use:

       $ compress -d <fichero.Z>
       $ gzip -d <fichero.gz>

  LPM.

  Hay tambin utilidades unarj, zip y unzip (compatibles con ARJ y
  PK??ZIP). Los ficheros con la extensin .tar.gz o tgz (archivados con
  tar, posteriormente comprimidos con gzip) son tan comunes en el mundo
  Unix como los ficheros .ZIP bajo DOS. Para listar los contenidos de un
  fichero .tar.gz utilice:

       $ gzip -dc <fichero.tar.gz> | tar tf - | less

  o tambin:

       $ tar -cvzf <fichero.tar.gz>

  12.2.  Instalacin de aplicaciones

  Antes de nada: instalar paquetes es trabajo del root. La mayora de
  las aplicaciones Linux se distribuyen como ficheros .tar.gz, que
  contienen, tpicamente, un directorio bien denominado conteniendo
  ficheros y/o subdirectorios. Una buena norma es instalar esos paquetes
  en el directorio /usr/local con la orden

       # tar -zxf <archive.tar.gz>

  leyendo despus el fichero README o INSTALL. En la mayora de los
  casos, la aplicacin se distribuye en cdigo fuente, por lo que deber
  compilarla; a menudo, ser suficiente teclear make y despus make
  install.  Si el archivo contiene una rutina configure ejectela
  primero.  Obviamente, necesitar el compilador gcc o g++.

  Algunos archivos deben ser desempaquetados desde el directorio raz;
  ste es el caso de los archivos .tgz de Slackware. Otros archivos
  contienen los ficheros pero no un subdirectorio - cuidado con liar las
  cosas. Antes de instalar un archivo, liste su contenido.

  Debian y Red Hat tienen su propio formato de archivo; respectivamente,
  instalar un paquete rpm, teclee

       # rpm -i package.rpm

  12.3.  Trucos imprescindibles

  Visin de pantallas anteriores: presionar <MAYS + RE PG> (la tecla
  gris) le permite volver atrs unas cuantas pginas, dependiendo de la
  memoria de vdeo que posea.

  Resetear la pantalla: si por un casual hace un cat o un more de un
  fichero binario, su pantalla puede acabar llena de basura.  Para
  arreglar las cosas, teclee reset a ciegas o pulse esta secuencia de
  caracteres: echo CTRL-V ESC c RETURN.

  Pegar texto: en consola, ver ms abajo; en las X, haga click y
  arrastre para seleccionar el texto en una ventana xterm, despus haga
  click en el botn central (o con los dos a la vez si tiene un ratn de
  dos botones) para pegar.  Tambin hay un xclipboard (portapapeles de
  X) (de momento, slo para texto); no se confunda por su muy baja
  velocidad de respuesta.

  Usar el ratn: instale gpm, el controlador de ratn para la consola.
  Haga click y arrastre para seleccionar texto, entonces haga un click
  con el botn derecho para pegar el texto seleccionado. Funciona a
  travs de diferentes consolas virtuales.

  Mensajes del ncleo: chele un vistazo a /var/adm/messages o
  /var/log/messages como root para ver lo que el ncleo le dice,
  incluyendo los mensajes de inicio. La orden dmesg tambin es til.

  12.4.  Dnde encontrar aplicaciones?

  Si se est preguntando si puede reemplazar su vieja y fiable
  aplicacin DOS/Win con una aplicacin de Linux, le sugiero que navegue
  por los mayores directorios de software para Linux:
  ftp://sunsite.unc.edu/pub/Linux, ftp://tsx-11.mit.edu/pub/linux, y
  ftp://ftp.funet.fi/pub/Linux.  Otros buenos lugares para empezar son
  la Pgina de Utilidades y Aplicaciones para Linux
  http://www.xnet.com/~blatura/linapps.shtml, y la pgina oficial de
  Linux http://www.linux.org.

  12.5.  Unas cuantas cosas que Usted no poda hacer

  Linux puede hacer muchas cosas que eran difciles o imposibles de
  hacer con DOS/Windows. Esta es una pequea lista que puede abrir su
  apetito:

    at le permite ejecutar programas a una hora determinada;

    awk es un lenguaje simple pero potente para manipular ficheros de
     datos (y no slo de datos). Por ejemplo, siendo data.dat su fichero
     de datos con varios campos,

       $ awk '$2 ~ "abc" {print $1, "\t", $4}' data.dat

  imprime los campos 1 y 4 de cada lnea de data.dat cuyo segundo campo
  contenga la cadena abc.

    cron es til para realizar tareas peridicamente, en una fecha y
     hora determinadas. Escriba man 5 crontab.

    find (vea tambin seccin ``Directorios: equivalencia de rdenes'')
     es una de las rdenes ms potentes y tiles. Se utiliza para
     encontrar ficheros que tengan unas determinadas caractersticas y
     para realizar acciones en ellos. Un uso general de find es:

       $ find <directorio> <expresin>

  donde <expresin> incluye los criterios de bsqueda y las acciones.
  Ejemplos:

       $ find . -type l -exec ls -l {} \;

  encuentra todos los ficheros que son enlaces simblicos y muestra a
  quin apuntan.

       $ find / -name "*.old" -ok rm {} \;

  encuentra todos los ficheros que ajusten con el patrn y los borra,
  pidiendo su permiso primero.

       $ find . -perm +111

  encuentra todos los ficheros cuyos permisos ajusten con 111 (ejecuta
  bles).

       $ find . -user root

  encuentra todos los ficheros que pertenecen al root. Hay cientos de
  posibilidades. LPM.

    grep busca patrones de texto en ficheros. Por ejemplo,

       $ grep -l "geologa" *.txt

  lista todos los ficheros *.txt que contengan la palabra geologa. La
  variante zgrep trabaja con ficheros comprimidos con gzip. LPM;

    Las expresiones regulares son un mtodo complejo pero muy potente
     de efectuar operaciones de bsqueda en un texto. Por ejemplo,
     ^a[^a-m]X{4,}txt$ se ajusta a una lnea que comienza con `a',
     seguida de cualquier carcter excepto los del intervalo a-m,
     seguido de 4 o ms `X', y terminado en `txt'. Puede utilizar
     expresiones regulares con editores avanzados, less, y muchas otras
     aplicaciones.  man grep para una introduccin.

    script <fichero_script> vuelca los contenidos de la pantalla en
     fichero_script hasta que teclee la orden exit.  Es til para
     depuracin;

    sudo permite a usuarios efectuar algunas tareas propias del root,
     como por ejemplo, formatear y montar discos; LPM);

    uname -a le da informacin acerca de su sistema;

    zcat y zless son tiles para visualizar y trabajar con ficheros
     comprimidos mediante gzip sin necesidad de descomprimirlos.  Por
     ejemplo:

       $ zless textfile.gz
       $ zcat textfile.gz | lpr

    Los siguientes rdenes son tiles a menudo: bc, cal, chsh, cmp,
     cut, fmt, head, hexdump, nl, passwd, printf, sort, split, strings,
     tac, tail, tee, touch, uniq, w, wall, wc, whereis, write, xargs,
     znew.  LPM.

  12.6.  Practicando UNIX bajo DOS/Windows

  Tanto como si me cree como si no, hay buenas utilidades que
  proporcionan un entorno similar a UNIX bajo DOS/Windows. Uno es la
  suite Djgpp (http://www.delorie.com/djgpp) para DOS, mientras que
  Cygnus (http://www.cygnus.com) es un puerto ms completo para Win32.
  Ambos incluyen las mismas herramientas y utilidades de desarrollo GNU
  que Linux; sin embargo, no conseguir la misma estabilidad.

  Si desea tener el sabor de Linux, pruebe Djgpp. Descargue e instale
  los siguientes ficheros (en el momento de escribir, la ltima versin
  era la 2.02): djdev202.zip, bnu281b.zip, bsh1147b.zip, fil316b.zip,
  find41b.zip, grep22b.zip, gwk303b.zip, lss332b.zip, shl112b.zip.. Se
  proporcionan instrucciones de instalacin, y puede encontrar ayuda en
  news:comp.os.msdos.djgpp.

  En particular, utilizar bash bajo DOSWin es una bocanada de aire
  fresco. Para configurarlo adecuadamente, edite el fichero BOOT.BAT que
  viene en la distribucin para que refleje su instalacin, y ponga
  estos ficheros en su directorio de usuario (de la particin Windows)
  en lugar de los que se proporcionan:

       # este es _bashrc

       LS_OPTIONS="-F -s --color=yes"
       alias cp='cp -i'
       alias d='ls -l'
       alias l=less
       alias ls="ls $LS_OPTIONS"
       alias mv='mv -i'
       alias rm='rm -i'
       alias u='cd ..'

  # este es _bprof
  if [ -f ~/_bashrc ]; then
    . ~/_bashrc
  fi
  PS1='\w\$ '
  PS2='> '
  CDPATH="$CDPATH:~"
  # cosas para less(1)
  LESS="-M-Q"
  LESSEDIT="%E ?lt+%lt. %f"
  VISUAL="jed"                    # editor
  LESSCHARSET=latin1              # visualizar letras acentuadas
  export PS1 PS2 CDPATH LS_OPTIONS LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET

  12.7.  Extensiones comunes y programas relacionados

  Se podr encontrar con una gran variedad de extensiones de ficheros.
  Excluyendo las ms exticas (como las de fuentes, etc.), aqu tenemos
  una lista de las extensiones ms usuales:

    1 ... 8: pginas de manual. Lalas con groff -Tlatin1 -man
     <file.1>.

    arj: archivo hecho con arj.

    dvi: fichero de salida producido por TeX (ver ms abajo).  Use xdvi
     para visualizarlo; Use dvips para transformarlo en un fichero
     PostScript (.ps).

    gz: archivo comprimido con gzip.

    info: archivo info (Algo as como una alternativa a las pginas de
     manual). Consiga info.

    lsm: Fichero Linux Software Map. Es un fichero de texto ASCII plano
     que contiene la descripcin de un paquete.

    ps: Fichero PostScript. Para visualizarlo o imprimirlo consiga gs
     y, opcionalmente, ghostview.

    rpm: Paquete de Red Hat. Puede instalarlo en cualquier sistema
     utilizando el gestor de paquetes rpm.

    taz, tar.Z: archivo hecho con tar y posteriormente comprimido con
     compress.

    tgz, tar.gz: archivo hecho con tar y posteriormente comprimido con
     gzip.

    tex: fichero de texto para utilizar con TeX, un poderoso
     formateador de textos. Consiga el paquete tex, disponible en muchas
     distribuciones.

    texi: fichero texinfo, a partir del cual se pueden producir tanto
     archivos TeX como info. Consiga texinfo.

    xbm, xpm, xwd: fichero grfico.

    Z: archivo hecho con compress.

    zip: archivo hecho con zip. Consiga zip y unzip.

  12.8.  Conversin de ficheros

  Si necesita intercambiar ficheros de texto entre DOS/Win y Linux,
  tenga en cuenta del problema de fin de lnea. Bajo DOS, cada lnea
  de texto finaliza con CR/LF (esto es, ASCII 13 + ASCII 10). Bajo
  Linux, con LF. Si edita un fichero de texto DOS bajo Linux, cada lnea
  acabar con un carcter `M' de extraa apariencia. un fichero de texto
  Linux bajo DOS aparecer como una sla lnea kilomtrica sin prrafos.
  Hay un par de utilidades, dos2unix y unix2dos, que convierten estos
  ficheros.

  Nota del revisor: Puede utilizar vim para convertir este tipo de
  ficheros:

    Para convertir un fichero DOS a formato Linux: (Las lneas con #
     delante son comentarios)

       vi fichero_dos.txt
       # pulse ESC
       :set fileformat=unix
       # pulse Enter
       !wq fichero_linux.txt
       # pulse Enter

    Para convertir un fichero Linux para su uso en DOS:

       vi fichero_linux.txt
       # pulse ESC
       :set fileformat=dos
       # pulse Enter
       !wq fichero_dos.txt
       # pulse Enter

  Si sus ficheros de slo-texto contienen caracteres acentuados,
  asegrese de que estn hechos bajo Windows (con NotePad) y no bajo
  DOS; si no, todas las letras acentuadas aparecern como caracteres
  extraos.

  Para convertir ficheros del Word o WordPerfect a texto plano, la
  cuestin es ms dificil, pero an posible. Necesita una de las
  herramientas que pueden encontrarse en los sitios CTAN; uno de ellos
  es ftp://ftp.tex.ac.uk. Consiga el programa word2x del directorio
  /pub/tex/tools/. En concreto, word2x convierte ficheros de Word 6,
  mientras que para ver ficheros realizados con Word 97 necesitar
  mswordview (http://www.csn.ul.ie/~caolan/docs/MSWordView.html) que los
  transforma en HTML.

  12.9.  Entornos ofimticos gratuitos

  Si convertir ficheros no le parece suficiente, tiene la posibilidad de
  probar un paquete (gratuito!) similar a Microsoft Office.

  La suite StarOffice es gratuita para uso privado. Es grande, algo
  lenta, pero muy buena: ofrece muchas funcionalidades no encontradas en
  Microsoft Office. Puede tambin leer y escribir ficheros de Word y
  Excel, aunque la conversin no es siempre perfecta. Visite
  http://www.stardivision.com.

  Otro buen paquete es Corel WordPerfect, del cual est disponible para
  descarga una edicin gratuita. Debera decir ms? Vaya a por l:
  http://www.corel.com.

  13.  Fin, por ahora

  Felicidades! Se ha iniciado un poco en el UNIX y est preparado para
  comenzar a trabajar. Recuerde que su conocimiento del sistema es an
  limitado, y que se espera que practique ms con Linux para usarlo
  cmodamente. Pero si todo lo que quera hacer era conseguir un puado
  de aplicaciones y empezar a trabajar con ellas, apuesto a que lo que
  se incluy aqu fue suficiente.

  Estoy seguro de que habr disfrutado de usar Linux y seguir
  aprendiendo ms acerca de l (todo el mundo lo hace). Apuesto lo que
  sea, tambin, a que nunca volver a DOSWin! Espero haberme hecho
  entender y haber realizado un buen servicio a mis 3 o 4 lectores.

  13.1.  Copyright

  A menos que se establezca lo contrario, los documentos COMO de Linux
  tienen copyright de sus respectivos autores. Los documentos COMO de
  Linux pueden ser reproducidos y distribuidos de manera completa o en
  parte, en cualquier medio fsico o electrnico, siempre y cuando este
  aviso de copyright se mantenga en todas las copias. Se permite y se
  anima a la redistribucin comercial; sin embargo, al autor le gustara
  ser notificado de cualquier distribucin.

  Todas las traducciones, trabajos derivados o agregados que incorporen
  cualquier documento COMO de Linux deben ser mantenidos bajo este aviso
  de Copyright. Esto es, no puede producir un trabajo derivado de un
  documento COMO e imponer restricciones adicionales a su distribucin.
  Se pueden conceder excepciones a estas reglas bajo ciertas
  condiciones;  por favor, contacte con el coordinador de los COMO de
  Linux en la direccin dada ms abajo.

  En resumen, deseamos promocionar la dispersin de esta informacin a
  travs de cuantos canales sea posible. Sin embargo, deseamos retener
  el copyright de los documentos COMO, y nos gustara tener noticias de
  cualquier plan de redistribuir los COMOs.

  Si tiene dudas, contacte con Tim Bynum, el coordinador de Linux HOWTO,
  en linux-howto@sunsite.unc.edu va e-mail.

  13.2.  Agradecimientos

  "CMO pasar de DOS a Linux" fue escrito por Guido Gonzato,
  BORREMEguido@ibogeo.df.unibo.it (Borre el BORREME).  Muchas gracias
  a Matt Welsh, el autor de Linux: Instalacin y Primeros Pasos, a Ian
  Jackson, el autor del Linux frequently asked questions with answers, a
  Giuseppe Zanetti, el autor de Linux, a todos los amigos que me
  enviaron sugerencias, y especialmente a Linus Torvalds y GNU que nos
  trajeron Linux.

  Este documento se distribuye tal cual. He puesto un gran esfuerzo en
  escribirlo tan correctamente como he podido. Pese a ello, la
  informacin contenida en el mismo debe ser utilizada bajo su propia
  responsabilidad.  En ningn caso el autor ser responsable de
  cualquier dao resultante del uso de este documento.

  Los comentarios son bienvenidos. Para cualquier duda, sugerencia,
  crtica, etc., sintase libre de contactar conmigo.

  Disfrute de Linux y de la vida,

  Guido   =8-)

  13.3.  Traduccin

  CMO pasar de DOS/Win a LINUX fue traducido por David Marn Carreo,
  davefx@bigfoot.com, como un pequeo grano de arena ms dentro del
  Proyecto INSFLUG. Para ms informacin, vea la seccin ``''.

  He intentado una traduccin fidedigna del documento original de Guido,
  aunque en algunos lugares haya actualizado informacin o cambiado
  algunas expresiones por otras ms adecuadas a la jerga en nuestro
  idioma.

  Si desea plantear alguna duda, sugerencia o crtica, pues tampoco dude
  en contactar conmigo.

            |   |   |  _|   David Marn Carreo (aka DaveFX)
             \  |  /  /
              |/____\|      Estudiante de Ingeniera en Informtica.
             /_|_/\_|_\     Traductor de documentos Lnux.
             \| (__) |/     Madrid. Espaa.
             / \____/ \
            (____  ____)    ICQ#: 34866516
            _____||_____    E-mail: <davefx@bigfoot.com>
           /  _      _  \   WEb SiTe: http://www.bigfoot.com/~davefx

  14.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Cmo pasar de DOS a Linux.
  Por Guido Gonzato guido@ibogfs.df.unibo.it
  Carreo, davefx@bigfoot.com
  v1.0, 11 de diciembre de 1996. Traduccin: 8 de marzo de
  1998.

  Este documento Como est dedicado a todos los (prximamente anticua
  dos?) usuarios de DOS que acaban de decidir pasarse a Linux, el
  clnico gratuito de UNIX para ordenadores x86. Dadas las similitudes
  entre DOS y Unix, el propsito de este documento es ayudar al lector a
  traducir su conocimiento de DOS al entorno Linux, con todo lo que ello
  lleva de productivo.

  1.  Introduccin

  1.1.  Es Linux adecuado para usted?

  Quiere pasar de DOS a Linux? Buena idea, pero cuidado: puede no serle
  til. Quiero decir: no hay nada que sea el mejor ordenador o el mejor
  sistema operativo: depende de a lo que se dedique, por lo que no creo
  que Linux sea la mejor solucin para todos, incluso aunque sea
  tcnicamente superior a muchos sistemas operativos comerciales. Usted
  se beneficiar inmensamente de Linux si lo que necesita es software
  para programar, Internet, TeX... software tcnico en general. Pero si
  necesita software comercial, o si no le apetece aprender y escribir
  comandos, deje Linux y busque en otra parte.

  Linux no es (por ahora) tan fcil de usar y configurar como Windows o
  el Mac, as que preprese para trastear un poco. Despus de estos
  avisos, djeme decir que confo al 100% en que usted pertenece a la
  clase de usuario que encontrar en Linux el Nirvana informtico. Est
  hecho para usted. Y recuerde que, de todos modos, Linux y DOS/Windows
  pueden coexistir en la misma mquina.

  1.2.  Requisitos previos para la lectura de este Como

  Asumir que:

    conoce los comandos y conceptos bsicos del DOS;

    Linux, posiblemente con el sistema X Window, est adecuadamente
     instalado en su ordenador;

    su shell ---el equivalente de COMMAND.COM--- es bash;

    usted comprende que esta gua es slo un paso incompleto. Para ms
     informacin, busque en el Linux, Instalacin y Primeros Pasos de
     Matt Welsh y en la Gua del Usuario de Linux de Larry Greenfield.
     Ambas, en versin inglesa, disponibles en
     ftp://sunsite.unc.edu/pub/Linux/docs/LDP y, traducidos al
     castellano, en la pgina del proyecto LuCAS:
     http://www.infor.es/LuCAS

  1.3.  Ya est. Ahora cunteme ms.

  Supongo que acaba de instalar Linux y los programas que necesita en su
  ordenador, que ya tiene una cuenta propia (si no la tiene an, teclee
  adduser ahora mismo!) y que Linux est ejecutndose. Acaba de
  introducir su nombre y su clave, y ahora est mirando a la pantalla
  pensando... Y ahora qu?

  Bien, no se desespere. Puede hacer casi las mismas cosas que sola
  hacer con DOS, y muchas ms. Si estuviera ejecutando DOS en lugar de
  Linux, estara realizando alguna de las siguientes tareas:

    ejecutar programas y crear, copiar, ver, borrar, imprimir,
     renombrar ficheros;

    cambiar de directorio, crearlos, borrarlos y listar sus contenidos;

    formatear disquetes y copiar ficheros de/hacia ellos;

    editar el AUTOEXEC.BAT y el CONFIG.SYS;

    escribir sus propios ficheros .BAT y/o programas Qbasic;

    el restante 1%.

  Estar contento al saber que todas esas tareas pueden llevarse a cabo
  bajo Linux de una manera similar a como se hacen bajo DOS. Bajo DOS,
  el usuario medio usa muy pocos de los ms de 100 comandos disponibles:
  lo mismo, hasta cierto punto, sucede con el Linux.

  Unas pocas cosas que sealar antes de continuar:

    primero, cmo salir. Para apagar Linux: si ve una pantalla en modo
     texto, pulse Ctrl-Alt-Supr, espere a que el sistema realice unas
     tareas y le diga que todo est bien, y entonces apague el
     ordenador. Si est trabajando bajo el sistema X Window, pulse
     primero Ctrl-Alt-Del, y despus Ctrl-Alt-Supr. Nunca apague o
     reinicie el ordenador directamente: el sistema de ficheros podra
     daarse.

    al contrario que en DOS, Linux tiene mecanismos de seguridad
     intrnsecos, debido a su naturaleza multiusuario. Los ficheros y
     los directorios tienen permisos asociados a ellos, y por lo tanto
     el usuario normal puede no tener acceso a alguno de ellos; (ver la
     Seccin ``''). Slo el usuario cuyo nombre de acceso sea root tiene
     el poder absoluto. (Esta persona es el administrador del sistema.
     Si trabaja en un ordenador propio, usted tambin ser root). DOS,
     por el contrario le dejara machacar todos los contenidos de su
     disco duro.

    si est realmente animado a experimentar, intntelo usted mismo:
     seguramente no podr hacer ningn dao. Puede conseguir alguna
     ayuda escribiendo en la lnea de comandos ($ es el smbolo de la
     lnea de comandos estndar, # es el de root);

       $ help

  Esto le porporcionar ayuda acerca de bash; puede conseguir infor
  macin acerca de un comando concreto escribiendo:

  $ man comando

  el cual, si tiene instaladas las pginas man, ejecutar la pgina de
  manual man asociada al comando. Tambin puede probar con:

       $ apropos comando
       $ whatis comando

  y presionar q para salir;

    la mayor parte del poder y la flexibilidad de Unix viene de los
     conceptos simples de redireccin y piping, o entubamiento, ms
     potentes que bajo DOS.  Los comandos simples pueden agruparse para
     realizar tareas complejas. Use estas caractersticas!

    Convenciones: <...> significa algo que debe ser especificado,
     mientras que [...] es algo opcional. Ejemplo:

       $ tar -tf <fichero.tar> [> fichero_redir]

  fichero.tar debe ser indicado, pero la redireccin a fichero_redir es
  opcional.

    desde ahora LPM significa para ms informacin Lea las Pginas del
     Manual.

  1.4.  Para el Impaciente

  Quiere empezar ya? Eche un vistazo a esto:

  DOS                     Linux                          Notas

  BACKUP                  tar -Mcvf dispositivo dir/     completamente distinto
  CD nombredir\           cd nombredir/                  casi la misma sintaxis
  COPY fich1 fich2        cp fich1 fich2                 idem
  DEL fichero             rm fichero                     cuidado no hay undelete
  DELTREE directorio      rm -R directorio/              idem
  DIR                     ls                             no exactamente la misma sintaxis
  EDIT fichero            vi fichero                     creo que no le gustara
                          emacs fichero                  este es mejor
                          joe fichero                    mas parecido al edit del DOS
  FORMAT                  fdformat
                          mount, umount                  sintaxis bastante distinta
  HELP comando            man comando                    misma filosofia
  MD directorio           mkdir directorio/              casi la misma sintaxis
  MOVE fich1 fich2        mv fich1 fich2                 idem
  NUL                     /dev/null                      idem
  PRINT fichero           lpr fichero                    idem
  PRN                     /dev/lp0,
                          /dev/lp1                       idem
  RD directorio           rmdir directorio/              idem
  REN fich1 fich2         mv fich1 fich2                 no para varios ficheros
  RESTORE                 tar -Mxpvf device              sintaxis distinta
  TYPE fichero            less fichero                   mucho mejor
  WIN                     startx                         mundos aparte!

  Si necesita ms que una tabla de comandos, contine con las secciones
  siguientes.

  2.  Ficheros y Programas

  2.1.  Ficheros: Nociones preliminares

  Linux tiene un sistema de ficheros ---la estructura de directorios y
  los ficheros que contienen--- muy similar al del DOS. Los ficheros
  tienen nombres que obedecen unas normas especiales, estn guardados en
  directorios y algunos son ejecutables, y entre stos , la mayora
  tiene opciones en la lnea de comandos. Incluso puede utilizar
  comodines, redireccin y tuberas como en DOS. Slo hay unas pocas
  diferencias:

    bajo DOS, los nombres de ficheros estn en el llamado formato 8.3;
     por ejemplo NOTENOUG.TXT. Bajo Linux podemos hacerlo mejor. Si
     instal Linux usando un sistema de ficheros tal como ext2 o umsdos,
     puede utilizar nombres ms largos (hasta 255 caracteres), y con ms
     de un punto en ellos: por ejemplo,
     Este.es.un.nombre.de.fichero.MUY.largo.  Dse cuenta de que he
     utilizado tanto maysculas como minsculas: en efecto...

    Linux es sensible a las maysculas y las minsculas en los nombres
     de ficheros o comandos. De hecho, FICHERO.tar.gz , Fichero.tar.gz y
     fichero.tar.gz son tres ficheros distintos.  ls es un comando, LS
     sera un error;

    no hay extensiones obligadas como .COM y .EXE para los programas, o
     .BAT para los ficheros de procesamiento por lotes. Los ficheros
     ejecutables se marcan con un asterisco. Por ejemplo:

  $ ls -F
  cindy.jpg    cjpg*    Soy_un_directorio/  mi_1er_script*  old~

  Los ficheros cjpg* y mi_1er_script* son "programas" ejecutables. Bajo
  DOS, las copias de seguridad de los ficheros suelen acabar en .BAK,
  mientras que bajo Linux acaban con un gurruo ~. Un fichero cuyo nom
  bre empieza con un punto es considerado como oculto. Ejemplo: el
  fichero .Soy.un.fichero.oculto no se mostrar a un comando ls;

    Las opciones de los programas bajo DOS se obtienen con /opcin. En
     Linux se obtienen con -opcin o --opcin.  Ejemplo: dir /s se
     convierte en ls -R. Fjese en que muchos programas DOS (como PKZIP
     o ARJ) utilizan opciones de tipo Unix.

  Puede ahora saltar a las Seccin ``'', pero yo de usted seguira
  leyendo.

  2.2.  Enlaces simblicos

  Unix tiene un tipo de fichero que no existe bajo DOS: el enlace
  simblico.  Puede pensar que es un puntero o enlace a un fichero o a
  un directorio y que puede utilizarse en lugar del fichero o del
  directorio al que apunta; es similar a los "Accesos Directos" de
  Windows 95. Ejemplos de enlaces simblicos son /usr/X11, que apunta a
  /usr/X11R6; /dev/modem, que apunta a /dev/cua0 o a /dev/cua1, segn
  donde est el mdem.

  Para crear un enlace simblico:

       $ ln -s <fichero_o_directorio> <nombre_del_enlace>

  Ejemplo:

       $ ln -s /usr/doc/g77/DOC g77manual.txt

  Ahora puede referirse a g77manual.txt en lugar de /usr/doc/g77/DOC.

  2.3.  Permisos y Propiedades

  Los ficheros y directorios de DOS tienen los siguientes atributos: A
  (fichero), H (oculto), R (slo-lectura), y S (sistema).  Slo H y R
  tienen sentido bajo Linux: los ficheros ocultos comienzan con un
  punto, y los de slo lectura, tienen activado el permiso "r".

  Bajo Unix un fichero tiene permisos y un propietario, que pertenece a
  un grupo. Mire este ejemplo:

       $ ls -l /bin/ls
       -rwxr-xr-x  1  root  bin  27281 Aug 15 1995 /bin/ls*

  El primer campo contiene los permisos del fichero /bin/ls, que
  pertenece a root, del grupo bin. Dejando la informacin restante a un
  lado (el libro de Matt esta ah para ese propsito), slo recordar lo
  que significa -rwxr-xr-x (de izquierda a derecha):

  - es el tipo de fichero (- = fichero normal, d = directorio, l =
  enlace, etc.); rwx son los permisos del propietario del fichero (leer,
  escribir, ejecutar); r-x son los permisos para el grupo del
  propietario del fichero (leer y ejecutar); (no tocar el concepto de
  grupo, puede pasar sin l mientras sea un novato ;-) r-x son los
  permisos para todos los dems usuarios (leer, ejecutar).

  A eso se debe el porqu no puede borrar el fichero /bin/ls a menos que
  sea root:  no tiene el permiso de escritura para hacer eso. Para
  cambiar los permisos de un fichero, el comando es:

       $ chmod <quienXperm> <fichero>

  donde quien podra ser:

    u usuario, que es el propietario,

    g (grupo),

    o (otros).

  X puede ser tanto + como -, y  perm puede ser:

    r (lectura),

    w (escritura)

    x (ejecucin).

  Ejemplos:

       $ chmod u+x fichero

  esto habilita el permiso de ejecucin para el propietario del fichero.
  Atajo: chmod +x fichero.

       $ chmod go-wx fichero

  esto quita el permiso de escritura y de ejecucin para todo el mundo
  menos al usuario.

       $ chmod ugo+rwx fichero

  esto le da a todo el mundo el permiso de lectura, escritura y
  ejecucin.

       $ chmod +s fichero

  esto convierte al fichero en setuid o suid, esto es, un fichero que al
  ejecutarse lo hace con privilegios de root.

  Una manera ms corta de referirse a los permisos es con nmeros: rwxr-
  xr-x puede ser expresado como 755 (cada letra corresponde a un bit:
  --- es 0, --x es 1, -w- es 2, -wx es 3...). Parece difcil, pero con
  algo de prctica el concepto se domina.

  root, al ser superusuario, puede cambiar los permisos de los ficheros
  de todo el mundo. Hay mucha ms informacin acerca de esto:  LPM.

  2.4.  Traduciendo comandos de DOS a Linux

  A la izquierda, los comandos de DOS; a la derecha, sus
  correspondientes de Linux.

       COPY:         cp
       DEL:          rm
       MOVE:         mv
       REN:          mv
       TYPE:         more, less, cat

  Operadores de redireccin y de tuberas:

  < > >>  |

  Comodines: * ?

       nul: /dev/null

       prn, lpt1:  /dev/lp0 o /dev/lp1; lpr

  EJEMPLOS

       DOS                                     Linux
       ---------------------------------------------------------------------

       C:\GUIDO>copy joe.txt joe.doc           $ cp joe.txt joe.doc
       C:\GUIDO>copy *.* total                 $ cat * > total
       C:\GUIDO>copy fractals.doc prn          $ lpr fractals.doc
       C:\GUIDO>del temp                       $ rm temp
       C:\GUIDO>del *.bak                      $ rm *~
       C:\GUIDO>move paper.txt tmp\            $ mv paper.txt tmp/
       C:\GUIDO>ren paper.txt paper.asc        $ mv paper.txt paper.asc
       C:\GUIDO>print letter.txt               $ lpr letter.txt
       C:\GUIDO>type letter.txt                $ more letter.txt
       C:\GUIDO>type letter.txt                $ less letter.txt
              idem                             $ more *.txt *.asc
              idem                             $ cat section*.txt | less
       C:\GUIDO>type letter.txt > nul          $ cat letter.txt > /dev/null

  Notas:

    * es ms inteligente bajo Linux: * equivale a todos los ficheros
     excepto los ocultos; .* equivale a todos los ficheros ocultos;  *.*
     equivale slo a aquellos ficheros que tienen un punto en medio del
     nombre, seguido de otros caracteres; p*r equivaldra tanto a peor
     como a por;  *c* equivaldra tanto a pecado como a peca.

    cuando se usa more, pulse espacio para ir leyendo a travs del
     fichero, q o Ctrl-C para salir. less es ms intuitivo y permite
     utilizar las teclas del cursor;

    no hay UNDELETE, as que pinselo dos veces antes de borrar
     cualquier cosa;

    adems de los < > >> del DOS, Linux tiene el operador 2> para
     redirigir los mensajes de error (stderr); ms an, el operador 2>&1
     redirige stderr a stdout (la salida estndar), mientras que 1>&2
     redirige stdout a stderr;

    Linux tiene otro comodn: los corchetes []. Usar [abc]* equivale a
     los ficheros que empiezan por a, por b o por c; *[I-N,1,2,3]
     equivale a los ficheros que acaban por I, J, K, L, M, N, 1, 2, 3;

    no hay un RENAME como en DOS; esto es, mv *.xxx *.yyy no funciona;

    use cp -i y mv -i para ser avisado cuando un fichero vaya a ser
     sobreescrito.

  2.5.  Ejecucin de programas: Multitarea y Sesiones

  Para ejecutar un programa, escriba su nombre tal y como lo hara bajo
  DOS.  Si el directorio (Seccin ``'') donde el programa est guardado
  est incluido en la variable de entorno PATH (Seccin ``''), el
  programa comenzar a ejecutarse. Excepcin: al contrario que bajo DOS,
  en Linux un programa localizado en el directorio actual no se
  ejecutar a manos que el directorio actual (simbolizado por ``.'')
  est incluido en el PATH. Para evitarlo, suponiendo que el programa se
  llame prog, teclee ./prog.

  ste es el aspecto tpico de una lnea de comandos:

       $ comando -o1 -o2 ... -on par1 par2 ... parn  < input > output

  donde -o1, ..., -on son las opciones del programa, par1, comandos en
  la lnea de comandos:

       $ comando1 ; comando2 ; ... ; comandoN

  Esto es todo acerca de ejecutar comandos, pero es fcil ir un paso ms
  all. Una de las principales razones para usar Linux es que es un
  sistema operativo multitarea ---puede ejecutar varios programas (a
  partir de ahora, procesos) a la vez---. Puede lanzar procesos en
  segundo plano (background)  y seguir trabajando inmediatamente. Ms
  an, Linux permite tener varias sesiones abiertas simultneamente: es
  como tener muchos ordenadores en los que trabajar a la vez.

    Para cambiar a la sesin 1..6:

       $ Alt-F1 ... Alt-F6

    Para comenzar una nueva sesin sin dejar la actual:

       $ su - <mi_nombre_de_usuario>

  Ejemplo:

       $ su - root

  Esto es til, por ejemplo, cuando se necesita montar un disco (Seccin
  ``''): normalmente, slo root puede hacer eso.

    Para acabar una sesin:

       $ exit

  Si hay trabajos parados (ver ms abajo), ser avisado.

    Para lanzar un proceso en primer plano:

       $ nomprog [-opciones] [parametros] [< input] [> output]

    Para lanzar un proceso en segundo plano, aada un ampersand: &, al
     final de la lnea de comandos:

       $ nomprog [-opciones] [parametros] [< input] [> output] &
       [1] 123

  el shell o intrprete de comandos identifica el proceso con un nmero
  de trabajo (p.e. 1; ver ms abajo), y con un PID (123 en nuestro ejem
  plo).

    Para ver cuntos procesos hay:

       $ ps -a

  Esto generar una lista de procesos actualmente en ejecucin.

    Para matar un proceso:

       $ kill <PID>

  Puede necesitar matar un proceso cuando no sabe cmo cerrarlo de la
  manera correcta... ;-). A veces, un proceso solo podr ser matado con
  alguna de las siguientes instrucciones:

       $ kill -15 <PID>
       $ kill -9 <PID>

  Adems, el intrprete de comandos permite suspender temporalmente
  (parar) un proceso, mandar un proceso al segundo plano, y traer un
  proceso del segundo plano al primer plano. En este contexto, los
  procesos son denominados trabajos.
    Para ver cuntos trabajos hay:

       $ jobs

  aqu los trabajos son identificados por su nmero de trabajo, no por
  su PID.

    Para parar un proceso ejecutndose en primer plano (no siempre
     funciona):

       $ Ctrl-C

    Para suspender un proceso ejecutndose en primer plano:

       $ Ctrl-Z

    Para mandar un proceso suspendido al segundo plano (convirtindolo
     en trabajo):

       $ bg <trabajo>

    Para traer un trabajo al primer plano:

       $ fg <trabajo>

    Para matar un trabajo:

       $ kill <%trabajo>

  donde trabajo puede ser 1, 2, 3; el % indica que nos referimos a un
  nmero de trabajo, y no a un PID. Usando estos comandos puede for
  matear un disco, comprimir un puado de ficheros, compilar un pro
  grama, y descomprimir un fichero simultneamente, y todava tener la
  lnea de comandos a su disposicin. Intntelo con el DOS. Intntelo
  con Windows, slo para ver la diferencia de prestaciones (siempre que
  no se le cuelgue, claro).

  2.6.  Ejecutando Programas en Ordenadores Remotos

  Para ejecutar un programa en una mquina remota cuya direccin IP es
  remote.bigone.edu, teclee:

       $ slogin remote.bigone.edu -l <login_en_maquina_remota>

  Tras meter su password, arranque su programa favorito. Obviamente,
  debe tener una cuenta en la mquina remota.

  Si tiene X11, puede incluso ejecutar una aplicacin X en un ordenador
  remoto, mostrndolo en su pantalla de X. Supongamos remote.bigone.edu
  la mquina X remota y local.linux.box su mquina Linux. Para ejecutar
  desde local.linux.box un programa X que reside en remote.bigone.edu,
  haga lo siguiente:

    arranque las X, arranque un xterm o un emulador de terminal
     equivalente, y entonces teclee:

       $ xhost +remote.bigone.edu
       $ slogin remote.bigone.edu -l <login_en_maquina_remota>

    tras meter su password, teclee:

       remote:$ DISPLAY=local.linux.box:0.0
       remote:$ programa &

  (en vez de DISPLAY..., puede que tenga que escribir setenv DISPLAY
  local.linux.box:0.0. Depende del shell remoto).

  Ahora programa comenzar en remote.bigone.edu y se mostrar en su
  mquina. Aunque mejor no intente esto en una lnea ppp.

  3.  Gestin de Directorios

  3.1.  Directorios: Nociones preliminares

  Hemos visto las diferencias entre los ficheros de DOS y Linux. Entre
  directorios, bajo DOS el directorio raz es \ y bajo Linux es / . De
  manera similar, los directorios anidados se separan mediante \ en DOS
  y mediante / en Linux. Ejemplo de rutas de fichero:

  DOS:    C:\PAPERS\GEOLOGY\MID_EOC.TEX

  Linux:  /home/guido/papers/geology/mid_eocene.tex

  Como bajo DOS, .. es el directorio padre y . es el directorio actual.
  Recuerde que el sistema no le dejar hacer cd, rd o md donde usted
  quiera. Cada usuario comienza desde su propio directorio llamado ~/.
  En el ejemplo anterior, ste es /home/guido.

  3.2.  Permisos en los directorios.

  Los directorios tambin tienen permisos. Lo que hemos visto en la
  Seccin ``'' tambin rige para los directorios (usuario, grupo, y
  otros). Para un directorio, rx significa que puede cambiar a ese
  directorio, y w significa que puede crear o borrar ficheros en el
  directorio (segn los permisos de los ficheros, por supuesto), o el
  directorio mismo.

  Por ejemplo, para prevenir que otros usuarios husmeen en
  /home/guido/text:

       $ chmod o-rwx /home/guido/text

  3.3.  Equivalencia de comandos de DOS a Linux

       DIR:            ls, find, du
       CD:             cd, pwd
       MD:             mkdir
       RD:             rmdir
       DELTREE:        rm -R
       MOVE:           mv

  EJEMPLOS

  DOS                                     Linux
  ---------------------------------------------------------------------

  C:\GUIDO>dir                            $ ls
  C:\GUIDO>dir file.txt                   $ ls file.txt
  C:\GUIDO>dir *.h *.c                    $ ls *.h *.c
  C:\GUIDO>dir/p                          $ ls | more
  C:\GUIDO>dir/a                          $ ls -l
  C:\GUIDO>dir *.tmp /s                   $ find / -name "*.tmp"
  C:\GUIDO>cd                             $ pwd
          n/a - ver nota                  $ cd
          idem                            $ cd ~
          idem                            $ cd ~/temp
  C:\GUIDO>cd \otros                      $ cd /otros
  C:\GUIDO>cd ..\temp\trash               $ cd ../temp/trash
  C:\GUIDO>md newprogs                    $ mkdir newprogs
  C:\GUIDO>move prog ..                   $ mv prog ..
  C:\GUIDO>md \progs\turbo                $ mkdir /progs/turbo
  C:\GUIDO>deltree temp\trash             $ rm -R temp/trash
  C:\GUIDO>rd newprogs                    $ rmdir newprogs
  C:\GUIDO>rd \progs\turbo                $ rmdir /progs/turbo

  Notas:

  1. cuando se use rmdir, el directorio a borrar debe estar vaco.  Para
     borrar un directorio y todos sus contenidos, use rm -R (bajo su
     propia responsabilidad).

  2. el carcter ~ es un atajo para el nombre de su directorio de
     usuario. Los comandos cd o cd ~ le llevarn a su directorio
     personal desde dondequiera que est; el comando cd ~/tmp le llevar
     a /home/su_directorio_de_usuario/tmp.

  3. cd - "deshace" el ltimo cd.

  4.  Disquetes, discos duros y otros mtodos de almacenamiento.

  4.1.  Administracin de dispositivos

  Nunca habr pensado acerca de ello, pero el comando de DOS FORMAT A:
  hace mucho ms de lo que parece. De hecho, cuando ordene el comando
  FORMAT:

  1. Formatear fsicamente el disco

  2. Crear el directorio A: (crear un sistema de ficheros)

  3. Pondr el disco disponible para el usuario (montar el disco).

  Estos tres pasos se ordenan separadamente bajo Linux. Puede usar
  disquetes con formato MS-DOS, aunque haya otros formatos disponibles y
  sean mejores (el formato MS-DOS no le dejar usar nombres de fichero
  largos). A continuacin se explica cmo preparar un disco (necesitar
  iniciar una sesin como root):

    Para formatear un disquete estndar de 1.44 megas (A:):

       # fdformat /dev/fd0H1440

    Para crear un sistema de ficheros:

       # mkfs -t ext2 -c /dev/fd0H1440

  o para crear un sistema de ficheros MS-DOS:

       # mformat a:

  Antes de usar el disco, debe montarlo.

    Para montar el disco:

       # mount -t ext2 /dev/fd0 /mnt

  o

       # mount -t msdos /dev/fd0 /mnt

  Ahora puede dirigirse a los ficheros del disquete. Cuando haya
  acabado, antes de sacar el disco deber desmontarlo.

    Para desmontar el disco:

       # umount /mnt

  Ahora puede extraer el disco. Obviamente, debe hacer un fdformat y un
  mkfs slo a los discos no formateados, que no han sido usados nunca.
  Si quiere utilizar la unidad B:, ponga fd1H1440 y fd1 en lugar de
  fd0H1440 y fd0 en los ejemplos anteriores.

  Todo lo que sola hacer con A: y B: se hace ahora utilizando /mnt en
  su lugar.  Ejemplos:

       DOS                                     Linux
       --------------------------------------------------------------------

       C:\GUIDO>dir a:                         $ ls /mnt
       C:\GUIDO>copy a:*.*                     $ cp /mnt/* /docs/temp
       C:\GUIDO>copy *.zip a:                  $ cp *.zip /mnt/zip
       C:\GUIDO>a:                             $ cd /mnt
       A:>_                                    /mnt/$ _

  No hace falta decir que la manera de proceder con los disquetes
  tambin funciona con otros dispositivos, como por ejemplo, otro disco
  duro o una unidad CD-ROM. Esto es para montar el CD-ROM:

       # mount -t iso9660 /dev/cdrom /mnt

  sta era la manera ``oficial'' de montar discos, pero hay un truco.
  Como es algo incmodo tener que ser root para montar un disquete o un
  CD-ROM, puede darse permisos a cada usuario de esta manera:

    como root, crear los directorios /mnt/floppy, mnt/a:, y /mnt/cdrom

    aadir en /etc/fstab las siguientes lneas:

       /dev/cdrom        /mnt/cdrom    iso9660   ro,user,noauto          0       0
       /dev/fd0          /mnt/a:       msdos     user,noauto             0       0
       /dev/fd0          /mnt/floppy   ext2      user,noauto             0       0

  Ahora, para montar un disquete MS-DOS, un disquete ext2, y un CD-ROM:

       $ mount /mnt/a:
       $ mount /mnt/floppy
       $ mount /mnt/cdrom

  Cualquier usuario puede acceder a /mnt/floppy, /mnt/a:, y /mnt/cdrom.
  Para escribir en /mnt/floppy sin ser root, despus de preparar el
  floppy es necesario hacer:

       # mount /mnt/floppy
       # chmod 777 /mnt/floppy
       # umount /mnt/floppy

  Recuerde que si considera importante la seguridad, dejar que todo el
  mundo pueda montar discos de esta manera constituye un buen agujero en
  la misma.

  4.2.  Copias de Seguridad

  Ahora que sabe cmo se manejan disquetes, etc. un par de lneas bastan
  para ver cmo hacer una copia de seguridad. Hay muchos paquetes que
  pueden servirle, pero lo ms simple para hacer una copia de seguridad
  multivolumen (como root) es:

       # tar -M -cvf /dev/fd0H1440 /directorio_a_guardar

  Asegrese de tener un disquete formateado en la unidad, y otros ya
  preparados. Para restaurar sus ficheros, inserte el primer disquete en
  la unidad y utilice:

       # tar -M -xpvf /dev/fd0H1440

  5.  Personalizacin del Sistema

  5.1.  Ficheros de inicializacin del sistema

  Dos ficheros importantes bajo DOS son el AUTOEXEC.BAT y el CONFIG.SYS,
  los cuales se utilizan al rearrancar el sistema para inicializarlo,
  dar valores a algunas variables de entorno como PATH y FILES, y
  posiblemente lanzar un programa o fichero de procesamiento por lotes.
  Bajo Linux hay varios ficheros de inicializacin, algunos de los
  cuales no deberan ser modificados hasta que usted supiese con
  seguridad lo que est haciendo. De todos modos, estos son los ms
  importantes:

       FICHEROS             NOTAS
       /etc/inittab         no tocar por ahora!
       /etc/rc.d/*          idem

  Si todo lo que necesita es establecer el PATH y otras variables de
  entorno, o desea cambiar los mensajes del login o ejecutar
  automticamente un programa tras iniciar una sesin, eche un vistazo a
  los siguientes ficheros:

       FICHEROS                        NOTAS
       /etc/issue                      establece el mensaje de antes del login
       /etc/motd                       establece el mensaje de despues del login
       /etc/profile                    establece el PATH y otras variables, etc.
       /etc/bashrc                     define alias y funciones, etc. (ver mas abajo)
       /home/su_home/.bashrc           define sus alias y sus funciones
       /home/su_home/.bash_profile     establece el entorno y ejecuta sus programas
       /home/su_home/.profile          idem

  Si el ltimo fichero existe (fjese en que es un fichero oculto), se
  leer tras el inicio de sesin y se ejecutarn los comandos en l
  almacenados.

  Ejemplo; mire este .profile:

       # Soy un comentario
       echo Entorno:
       printenv | less   # equivalente del comando SET bajo DOS
       alias d='ls -l'   # es facil comprender lo que es un alias
       alias up='cd ..'
       echo "Recuerde que su path es "$PATH
       echo "Hoy es `date`"  # usa la salida del comando 'date'
       echo "Que tenga un buen dia, "$LOGNAME
       # Lo siguiente es una funcion del shell
       ctgz() # Lista los contenidos de un fichero .tar.gz
       {
         for file in $*
         do
           gzip -dc ${file} | tar tf -
         done
       }
       # fin de .profile

  PATH y LOGNAME, lo adivin, son variables de entorno. Hay muchas otras
  accesibles; para buscar ejemplos, LPM de aplicaciones como less.

  6.  Ficheros de Inicializacin de Programas

  Bajo Linux, casi todo puede ser configurado de acuerdo con sus
  necesidades. La mayora de los programas tienen uno o ms ficheros de
  inicializacin con los que puede trastear, a menudo llamados que
  querr modificar son los de configuracin del gestor de ventanas para
  X-Window.  Si utiliza el fvwm2 sern:

       /usr/X11/lib/X11/fvwm2/system.fvwmrc2

  Para el resto de programas con el que se encontrar tarde o temprano,
  LPM.

  7.  Un poco de Programacin

  7.1.  Los Scripts del Shell: Ficheros .BAT  con esteroides

  Si ha utilizado ficheros .BAT para crear atajos de largas lneas de
  comando (yo suelo hacerlo), el objetivo puede ser obtenido insertando
  las lneas de alias convenientes (ver ejemplo de ms arriba) en el
  profile o en el .profile. Pero si sus ficheros .BAT son ms
  complicados, le encantar el lenguaje de Script que el shell pone a su
  disposicin: es tan potente como el Qbasic (o ms). Tiene variables,
  estructuras como while, for, case, if-then-else, y montones de nuevas
  caractersticas: puede ser una buena alternativa a un lenguaje de
  programacin "de verdad".

  Para escribir un script ---el equivalente a un fichero .BAT bajo
  DOS--- todo lo que tiene que hacer es escribir un fichero ASCII
  estndar que contenga las instrucciones, guardarlo, y entonces hacerlo
  ejecutable con el comando chmod +x fichero. Para ejecutarlo, teclee su
  nombre.

  Aviso: el editor del sistema se llama vi, y es un hecho probado que la
  mayor parte de los nuevos usuarios lo encuentran muy difcil de usar.
  No voy a explicar cmo usarlo, porque no me gusta y no lo uso. Vea el
  manual "Linux: Instalacin y Primeros Pasos" de Matt Welsh (aunque
  sera mejor utilizar otro editor tal como joe o emacs para X).  Baste
  decir aqu unos comandos muy bsicos:

    para insertar texto, pulse i y despus el texto;

    para salir de vi sin guardar, pulse ESC y despus :q!

    para guardar y salir, pulse ESC y luego :wq

  Escribir scripts bajo bash es una materia tan extensa que requerira
  un libro para abarcarla toda, y no voy a profundizar ms all en este
  tema.  Slo dar un ejemplo de script, del cual se pueden extraer las
  reglas bsicas:

  #!/bin/sh
  # ejemplo.sh
  # Soy un comentario
  # no cambie la primera linea: debe estar ahi
  echo "Este sistema es: `uname -a`" # usa la salida del comando
  echo "Me llamo $0" # variables intrinsecas
  echo "Usted me dio $# parametros: "$*
  echo "El primer parametro es: "$1
  echo -n "Como se llama? " ; read su_nombre
  echo fijese en la diferencia: "Hola, $su_nombre" # entrecomillando con "
  echo fijese en la diferencia: 'Hola, $su_nombre' # entrecomillando con '
  DIRS=0 ; FILES=0
  for fichero in `ls .` ; do
    if [ -d ${fichero} ] ; then # si el fichero esta en el directorio
      DIRS=`expr $DIRS + 1`  # DIRS = DIRS + 1
    else if [ -f ${fichero} ] ; then
     FILES=`expr $FILES + 1`
    fi
    case ${fichero} in
      gif|*jpg) echo "${fichero}: fichero grafico" ;;
      *.txt|*.tex) echo "${fichero}: fichero de texto" ;;
      *.c|*.f|*.for) echo "${fichero}: fichero de codigo fuente" ;;
      *) echo "${fichero}: fichero generico" ;;
    esac
  done
  echo "Hay ${DIRS} directorios y ${FILES} ficheros"
  ls | grep "ZxY--!!!WKW"
  if [ $? != 0 ] ; then # Sacar el codigo del ultimo comando
    echo "ZxY--!!!WKW no encontrado"
  fi
  echo "ya es suficiente... Para mas informacion teclee 'man bash'."

  7.2.  Sus programas en C

  Bajo Unix, el lenguaje del sistema es C, le guste o no. Pero otros
  lenguajes como FORTRAN, Pascal, Lisp, Basic, Perl, awk... tambin
  estn disponibles.

  Suponiendo que usted sepa C, hay un par de guas para aquellos que han
  utilizado Turbo C++ o uno de sus hermanos bajo DOS. El compilador de C
  se denomina gcc y carece de todas las florituras que normalmente
  acompaan a sus anlogos bajo DOS: no tiene IDE, ni ayuda en lnea, ni
  debugger integrado, etc... Es slo un rstico compilador de lnea de
  comandos, muy potente y eficiente. Para compilar el tpico programa
  hello.c esto es lo que debe teclear:

       $ gcc hello.c

  lo que crear un fichero ejecutable llamado a.out. Para cambiar el
  nombre del ejecutable a otro nombre:

       $ gcc -o hola hello.c

  Para enlazar una librera al programa, aada la opcin
  -lnombre_de_librera. Por ejemplo, para enlazar la librera math:

       $ gcc -o mathprog mathprog.c -lm

  (-lnombre_libreria fuerza a gcc a enlazar la librera
  /usr/lib/libnombre_librera.a; por lo tanto -lm enlaza
  /usr/lib/libm.a).

  Bien. Pero cuando su programa est compuesto por varios ficheros de
  cdigo fuente, necesitar usar la utilidad make. Supongamos que ha
  escrito un evaluador de expresiones: su cdigo fuente se denomina
  parser.c e tiene un #include de dos ficheros en su cabecera: parser.h
  y xy.h. Entonces, desea utilizar las rutinas de parser.c en otro
  programa, calc.c, que hace un #include de parser.h. Vaya lo! Cmo
  se puede compilar calc.c?

  Debe escribir un fichero llamado makefile, el cual muestra al
  compilador las dependencias entre los ficheros de cdigo fuente y los
  ficheros de cdigo objeto. En nuestro ejemplo:

       # Este es el makefile, utilizado para compilar calc.c
       # Pulse la tecla <TAB> en las posiciones marcadas!

       calc: calc.o parser.o
       <TAB>gcc -o calc calc.o parser.o -lm
       # calc depende de dos ficheros de codigo objeto: calc.o and parser.o

       calc.o: calc.c parser.h
       <TAB>gcc -c calc.c
       # calc.o depende de dos ficheros de codigo fuente

       parser.o:  parser.c parser.h xy.h
       <TAB>gcc -c parser.c
       # parser.o depende de tres ficheros de codigo fuente

       # fin de makefile.

  Guarde esto como makefile y teclee

       $ make

  para compilar su programa; alternativamente, gurdelo como calc.mak y
  teclee

       $ make -f calc.mak

  Y, por supuesto, LPM.

  Puede pedir ayuda acerca de las funciones de C, que se encuentra en
  las pginas man, seccin 3; por ejemplo:

       $ man 3 printf

  Hay muchas libreras disponibles por ah; entre las primeras que
  desear usar estn las ncurses, para manejar efectos en modo de texto,
  y svgalib, para hacer grficos. Si se siente suficientemente valiente
  para atacar la programacin de las X, consiga XForms
  (bloch.phys.uwm.edu/pub/xforms) y/o MGUI
  (http://www.volftp.vol.it/IT/IT/ITALIANI/MORELLO/index.htm), dos
  fantsticas libreras que hacen de la programacin bajo X algo
  realmente fcil. Ms an, si no puede vivir sin un IDE al estilo
  Borland, consiga el paquete xwpe de
  ftp://sunsite.unc.edu/pub/Linux/apps/editors/. Posiblemente sea de su
  agrado.

  8.  El restante 1%

  8.1.  Gestin de Memoria Virtual

  Aunque Linux puede ejecutarse en teora con slo 2 megas de RAM,
  cuanto ms se tenga, ms se puede hacer. El sistema X Window no se
  ejecutar a menos que tenga 8 megas. Para crear una memoria virtual de
  8 megas adicionales, teclee como root:

       # dd if=/dev/zero of=/swapfile bs=1024 count=8192
       # mkswap /swapfile 8192
       # sync
       # swapon /swapfile

  Aada la ltima lnea en /etc/rc.d/rc.local para hacer que el fichero
  de memoria virtual est disponible la siguiente vez que arranque, o
  aada esta lnea en /etc/fstab:

       /swapfile   swap   swap   defaults

  8.2.  Utilizacin de tar  y gzip

  Bajo Unix hay algunas aplicaciones ampliamente utilizadas para
  archivar y comprimir ficheros. tar se utiliza para archivar varios
  ficheros en uno ---es como PKZIP o ARJ, pero no comprime, slo
  archiva. Para archivar varios ficheros en uno (que llamaremos archivo
  de ahora en adelante):

       $ tar -cvf <nombre_fichero_final.tar> <fichero1> [fichero2...]

  Para extraer ficheros de un archivo:

       $ tar -xpvf <nombre_fichero.tar> [fichero]

  Para listar los ficheros contenidos de un archivo:

       $ tar -tf <nombre_fichero.tar> | less

  Puede comprimir los ficheros usando compress, el cual es obsoleto y no
  debera ser utilizado nunca ms, o usando gzip:

       $ compress <fichero>
       $ gzip <fichero>

  eso crea un fichero comprimido con la extensin .Z (compress) o vez.
  Para descomprimir, use:

       $ compress -d <fichero.Z>
       $ gzip -d <fichero.gz>

  LPM.

  Las utilidades unarj, zip y unzip (compatibles con ARJ y PK??ZIP)
  tambin estn disponibles. Los ficheros con la extensin comprimidos
  con gzip) son tan comunes en el mundo Unix como los ficheros .ZIP bajo
  DOS. Para listar los contenidos de un fichero

       $ gzip -dc <fichero.tar.gz> | tar tf - | less

  o tambin:

       $ tar -cvzf <fichero.tar.gz>

  8.3.  Instalacin de aplicaciones

  Antes de nada: instalar paquetes es trabajo del root. Algunas
  aplicaciones Linux se distribuyen como ficheros .tar.gz o .tgz,
  preparadas especficamente para que sean descomprimidas desde el
  directorio raz / escribiendo el siguiente comando:

       # gzip -dc <fichero.tar.gz> | tar xvf -

  Los ficheros se descomprimirn en el directorio adecuado, el cual ser
  creado ``al vuelo''. Los usuarios de la distribucin Slackware tienen
  un programa gestor de paquetes amigable para el usuario; otro programa
  es rpm, el cual est disponible para todas las distribuciones gracias
  a Red Hat.

  Los dems paquetes no deberan ser instalados desde /; tpicamente, el
  paquete contendr un directorio llamado nombrepaquete/ y un montn de
  ficheros y/o subdirectorios dentro de nombrepaquete/. Una buena regla
  es instalar todos esos paquetes bajo /usr/local.

  Adems, otros paquetes se distribuyen con sus fuentes en C o C++, los
  cuales han de ser compilados para crear los programas binarios. En la
  mayor parte de los casos, todo lo que debe hacer es ejecutar make.
  Obviamente, necesitar el compilador gcc.

  8.4.  Trucos imprescindibles

    Terminacin de comandos: presionando TAB mientras teclea un comando
     completar la lnea por usted. Ejemplo: tiene que teclear gcc
     este_es_un_nombre_de_fichero_largo.c; con teclear gcc este TAB
     bastar. (Si tiene otros ficheros que comienzan con los mismos
     caracteres, proporcione los caracteres suficientes para resolver
     cualquier ambigedad.)

    Visin de pantallas anteriores: presionar MAYS + RE PG (la tecla
     gris) le permite volver atrs unas cuantas pginas, dependiendo de
     la memoria de vdeo que posea.

    Resetear la pantalla: si por un casual hace un cat o un more de un
     fichero binario, su pantalla puede acabar llena de basura.  Para
     arreglar las cosas, teclee reset a ciegas o pulse esta secuencia de
     caracteres: echo CTRL-V ESC c RETURN.

    Pegar texto: en consola, ver ms abajo; en las X, haga click y
     arrastre para seleccionar el texto en una ventana xterm, despus
     haga click en el botn central (o con los dos a la vez si tiene un
     ratn de dos botones) para pegar. Tambin hay un xclipboard
     (portapapeles de X) (de momento, slo para texto); no se confunda
     por su muy baja velocidad de respuesta.

    Usar el ratn: instale gpm, el controlador de ratn para la
     consola. Haga click y arrastre para seleccionar texto, entonces
     haga un click con el botn derecho para pegar el texto
     seleccionado. Funciona a travs de diferentes consolas virtuales.

    Mensajes del kernel: chele un vistazo a /var/adm/messages o
     /var/log/messages como root para ver lo que el kernel le dice,
     incluyendo los mensajes de inicio.

  8.5.  Programas y comandos tiles

  Esta lista refleja mis preferencias y necesidades personales, por
  supuesto. En primer lugar, dnde encontrarlas. Ya que usted sabe cmo
  navegar por la red y cmo utilizar archie y ftp, slo le dar tres de
  las ms importantes direcciones para Linux: ftp://sunsite.unc.edu/,
  ftp://tsx-11.mit.edu/, y ftp://nic.funet.fi/. Por favor, use el mirror
  ms cercano.

    at le permite ejecutar programas a una hora y fecha especificados.

    awk es un lenguaje simple pero potente de manipulacin de ficheros
     de datos (entre otras cosas). Por ejemplo, siendo datos.dat su
     fichero de datos multicampo,

       $ awk '$2 ~ "abc" {print $1, "\t", $4}' datos.dat

  imprime los campos 1 y 4 de cada linea de datos.dat cuyo segundo campo
  contenga ``abc''.

    delete-undelete borran y recuperan ficheros;

    df da informacin acerca de los discos montados;

    dosemu permite ejecutar bastantes (no todos) programas DOS
     ---incluyendo Windows 3.x--- con un poco de trasteo;

    file nombrefichero le dice qu tipo de fichero es nombrefichero
     (texto ASCII, ejecutable, comprimido, etc.);

    find (ver tambin la seccin ``'') es uno de los comandos ms
     potentes y tiles. Se utiliza para buscar ficheros que se ajusten a
     unas determinadas caractersticas, y realizar acciones sobre ellos.
     El uso general de find es:

       $ find <directorio> <expresion>

  donde expresion incluye criterios de bsqueda y acciones. Ejemplos:

  $ find . -type l -exec ls -l {} \;

  busca todos los ficheros que son enlaces simblicos y dice a dnde
  apuntan.

       $ find / -name "*.old" -ok rm {} \;

  busca todos los ficheros que se ajusten a lo especificado y los borra,
  pidindole antes confirmacin.

       $ find . -perm +111

  busca todos los ficheros cuyos permisos sean 111 (ejecutables para
  todos).

       $ find . -user root

  busca todos los ficheros que pertenecen al root. Hay muchas posibili
  dades: LPM.

    gnuplot es un brillante programa para dibujos cientficos;

    grep busca cadenas de texto en ficheros. Por ejemplo:

       $ grep -l "geologia" *.tex

  lista todos los ficheros *.tex que contienen la palabra geologia. La
  variante zgrep trabaja en ficheros comprimidos con gzip. LPM;

    gzexe comprime binarios ejecutables mantenindolos ejecutables
     (similar a PKLITE);

    joe es un excelente editor. Invocndolo tecleando jstar conseguir
     los mismos caracteres de teclado que WordStar y sus descendientes,
     incluyendo DOS y los editores Turbo... de Borland;

    less es, probablemente, el mejor navegador de texto, y si est
     adecuadamente configurado, permite navegar por ficheros zip, tar o
     gzip.

    lpr fichero imprime un fichero en segundo plano. Para comprobar el
     estado de la cola de impresin, use lpq; para quitar un fichero de
     la cola de impresin, use lprm;

    mc es un maravilloso gestor de ficheros, clon del comandante
     norton;

    pine es un simptico programa gestor de correo electrnico;

    script fichero_script copia a fichero_script lo que aparece en
     pantalla antes de ejecutar el comando exit. Util para depuracin;

    sudo permite a los usuarios ejecutar algunas funciones del root
     (p.e. formatear y montar discos; LPM);

    uname -a da informacin acerca del sistema;

    zcat y zless son tiles para ver ficheros de texto comprimidos con
     gzip sin descomprimirlos. Un posible uso es:

       $ zless ficherotexto.gz
       $ zcat ficherotexto.gz | lpr

    Los siguientes comandos son a menudo utilizados: bc, cal, chsh,
     cmp, cut, fmt, head, hexdump, nl, passwd, printf, sort, split,
     strings, tac, tail, tee, touch, uniq, w, wall, wc, whereis, write,
     xargs, znew.  LPM.

  8.6.  Extensiones comunes y programas relacionados

  Se podr encontrar con una gran variedad de extensiones de ficheros.
  Excluyendo los ms exticos (como los de fuentes, etc.), aqu tenemos
  una lista de los ms usuales:

    1 ... 8: pginas de manual. En el extrao caso en que an no lo
     tenga, consiga man.

    arj: archivo hecho con arj. Use unarj para descomprimirlo.

    dvi: fichero de salida producido por TeX (ver ms abajo).  Use xdvi
     para visualizarlo; Use dvips para transformarlo en un fichero
     PostScript (.ps).

    gif: fichero grfico. Consiga seejpeg, xpaint o zgv para
     visualizarlo.

    gz: archivo comprimido con gzip.

    info: archivo info (Algo as como una alternativa a las pginas de
     manual). Consiga info.

    jpg, jpeg: fichero grfico. Consiga seejpeg o zgv.

    lsm: Fichero Linux Software Map. Es un fichero de texto ASCII plano
     que contiene la descripcin de un paquete.
    ps: Fichero PostScript. Para visualizarlo o imprimirlo consiga gs
     y, opcionalmente, ghostview.

    rpm: Paquete de Red Hat. Puede instalarlo en cualquier sistema
     utilizando el gestor de paquetes rpm.

    taz, tar.Z: archivo hecho con tar y posteriormente comprimido con
     compress.

    tgz, tar.gz: archivo hecho con tar y posteriormente comprimido con
     gzip.

    tex: fichero de texto para utilizar con TeX, un poderoso
     formateador de textos. Consiga el paquete tex, disponible en muchas
     distribuciones; pero tenga cuidado con NTeX, el cual tena fuentes
     corruptas y estaba incluido en algunas versiones de la distribucin
     Slackware.

    texi: fichero texinfo, a partir del cual se pueden producir tanto
     archivos TeX como info. Consiga texinfo.

    xbm, xpm, xwd: fichero grfico. Consiga xpaint.

    Z: archivo hecho con compress.

    zip: archivo hecho con zip. Consiga zip y unzip.

  9.  Fin, por ahora

  Felicidades! Se ha iniciado un poco en el Unix y est preparado para
  comenzar a trabajar. Recuerde que su conocimiento del sistema es an
  limitado, y que se espera que practique ms con Linux para usarlo
  cmodamente. Pero si todo lo que quera hacer era conseguir un puado
  de aplicaciones y empezar a trabajar con ellas, apuesto a que lo que
  se incluy aqu fue suficiente.

  Estoy seguro de que habr disfrutado de usar Linux y seguir
  aprendiendo ms acerca de l ---todo el mundo lo hace---. Apuesto,
  tambin, que nunca volver al DOS. Espero haberme hecho entender y
  haber realizado un buen servicio a mis 3 o 4 lectores.

  9.1.  Copyright

  A menos que se establezca lo contrario, los documentos COMO de Linux
  tienen copyright de sus respectivos autores. Los documentos COMO de
  Linux pueden ser reproducidos y distribuidos de manera completa o en
  parte, en cualquier medio fsico o electrnico, siempre y cuando este
  aviso de copyright se mantenga en todas las copias. Se permite y se
  anima a la redistribucin comercial; sin embargo, al autor le gustara
  ser notificado de cualquier distribucin.

  Todas las traducciones, trabajos derivados o agregados que incorporen
  cualquier documento COMO de Linux debe ser mantenido bajo este aviso
  de Copyright. Esto es, no puede producir un trabajo derivado de un
  documento COMO e imponer restricciones adicionales a su distribucin.
  Excepciones a estas reglas pueden ser concedidas bajo ciertas
  condiciones;  por favor, contacte con el coordinador de los COMO de
  Linux en la direccin dada ms abajo.

  En resumen, deseamos promocionar la dispersin de esta informacin a
  travs de cuantos canales sea posible. Sin embargo, deseamos retener
  el copyright de los documentos COMO, y nos gustara tener noticias de
  cualquier plan de redistribuir los COMOs.

  Si tiene dudas, contacte con Greg Hankins, el coordinador de Linux
  HOWTO, en gregh@sunsite.unc.edu va e-mail.

  10.  Agradecimientos

  "DOS-to-Linux-HOWTO" fue escrito por Guido Gonzato,
  guido@ibogfs.df.unibo.it. Muchas gracias a Matt Welsh, el autor de
  "Linux: Instalacin y Primeros Pasos", a Ian Jackson, el autor de
  "Linux frequently asked questions with answers", a Giuseppe Zanetti,
  el autor de "Linux", a todos los amigos que me enviaron sugerencias, y
  especialmente a Linus Torvalds y GNU que nos trajeron Linux.

  Este documento se distribuye "tal cual". He puesto un gran esfuerzo en
  escribirlo tan correctamente como he podido. Pese a ello, la
  informacin contenida en el mismo debe ser utilizada bajo su propia
  responsabilidad.  En ningn caso el autor ser responsable de
  cualquier dao resultante del uso de este documento.

  El correo es bienvenido. Para cualquier duda, sugerencia, crtica,
  etc., sintase libre de contactar conmigo.

  Disfrute de Linux y de la vida,

  Guido   =8-)

  10.1.  Traduccin

  "CMO pasar de DOS a LINUX" fue traducido por David Martn Carreo,
  davefx@bigfoot.com, como un pequeo grano de arena ms dentro del
  Proyecto INSFLUG. Para ms informacin, vea la seccin ``''.

  He intentado una traduccin fidedigna del documento original de Guido,
  aunque en algunos lugares haya actualizado informacin o cambiado
  algunas expresiones por otras ms adecuadas a la jerga en nuestro
  idioma.

  Si desea plantear alguna duda, sugerencia o crtica, pues tampoco dude
  en contactar conmigo.

  David!! 3B-)

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Dosemu COMO
  Editado por Mike Deisher, deisher@dspsun.eas.asu.edu
  azor@freenet.hut.fi
  v0.60pl4, 11 August 1995

  Este Como trata el popular emulador de DOS para Linux, dosemu.
  ______________________________________________________________________

  ndice General:

  1.      Los Preliminares

  1.1.    Qu es dosemu?

  1.2.    Cul es la ltima versin de dosemu y dnde puedo
  conseguirla?

  1.3.    Dnde puedo seguir el desarrollo?

  1.4.    Qu documentacin hay disponible para dosemu?

  1.5.    Cmo puedo incluir cambios o adiciones al HOWTO?

  1.6.    Copyright

  2.      Compilando e instalando dosemu

  2.1.    Dnde estn las instrucciones sobre la instalacin?

  2.2.    Los diez principales problemas durante la compilacin e
  instalacin de dosemu.

  2.3.    Cmo puedo crear un ejecutable simple (sin libreras)?

  2.4.    Cmo puedo crear archivos binarios en formato ELF?

  2.5.    Cmo puedo compilar dosemu en una mquina con poca memoria?

  2.6.    Cmo puedo acelerar la compilacin?

  2.7.    Cmo puedo compilar de forma no interactiva?

  2.8.    Ms trucos de compilacin de Marty...

  2.9.    Es necesario compilar dosemu como root ?

  2.10.   El Makefile  est en un bucle infinito...

  3.      Configuracin del Disco Duro

  3.1.    Cmo utilizo mi disco duro con dosemu?

  3.2.    Puedo utilizar mi disco stacked/double-spaced/super-stored?

  4.      Puertos paralelos, puertos serie y ratones

  4.1.    Dnde est los controladores del ratn compatible con el de
  Microsoft?

  4.2.    Por qu no funciona el controlador del ratn?

  4.3.    Por qu anula dosemu el COM4 ?

  4.4.    Cmo utilizo dosemu sobre los puertos serie?

  4.5.    Cmo puedo cambiar entre dosemu y una shell sobre la lnea
  serie?

  4.6.    Cmo puedo hacer que funcionen los puertos paralelos?

  5.      Mltiples usuarios y sesiones sin-interactividad

  5.1.    Puedo utilizar dosemu en un sistema multiusuario?

  5.2.    Cmo puedo ejecutar comandos del dos de forma no interactiva?

  6.      dosemu y Netware

  6.1.    Cmo puedo conseguir acceso a Netware desde dosemu?

  6.2.    El COMO de Netware

  7.      dosemu y X-windows

  7.1.    Puedo ejecutar dosemu en modo consola mientras se est
  ejecutando X Window?

  7.2.    Se puede ejecutar dosemu en una ventana de X-Window?

  7.3.    Funciona correctamente la emulacin ansi?

  8.      dosemu y MS-Windows 3.1

  8.1.    Es posible ejecutar MS-Windows 3.1 bajo dosemu?

  9.      Vdeo y sonido

  9.1.    Puedo ejecutar videojuegos de 32-bit bajo dosemu?

  9.2.    Al salir de dosemu se me llena la pantalla de basura.

  9.3.    Cmo puedo hacer que funcione correctamente mi tarjeta de
  vdeo Trident/Actix/otra?

  9.4.    Por qu no funciona el software de mi tarjeta de sonido con
  dosemu?

  10.     Otro Hardware

  10.1.   Cmo puedo hacer que trabaje mi dispositivo xxxxx bajo
  dosemu?

  11.     Problemas y soluciones

  11.1.   Dosemu se ha cado y ahora no puedo escribir nada.

  11.2.   He activado la memoria EMS en el dosemu.conf  pero no ayuda.

  11.3.   Cmo me deshago de todos esos molestos mensajes de " disk
  change "?

  11.4.   Por qu no se puede volver a ejecutar dosemu tras salir de
  modo consola?

  11.5.   Por qu se puede ejecutar dosemu en un xterm  pero no en la
  consola?

  11.6.   Cmo puedo hacer que dosemu se ejecute ms rpido?

  11.7.   Mi unidad de CDROM tiene problemas a la hora de leer algunos
  archivos bajo dosemu.
  11.8.   Cmo puedo ver los datos de salida de la depuracin (
  debugger )?

  11.9.   Por qu aparecen duupliicaadoos mis pulsaciones de teclado?

  12.     Contribuyendo al proyecto dosemu

  12.1.   Quin es el responsable de dosemu?

  12.2.   Quiero ayudar. Con quin debo ponerme en contacto?

  13.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Los Preliminares

  1.1.  Qu es dosemu?

  Siguiendo el manual, "dosemu es un programa a nivel de usuario que
  utiliza algunas caractersticas especiales del kernel de Linux y del
  procesador 80386 para correr MS-DOS en lo que podra llamarse una
  ventana del DOS o Dos box".

  Dicha ventana, una  combinacin milagrosa de hardware y software,
  tiene las siguientes capacidades:

    La habilidad de virtualizar todas las entradas/salidas y las
     instrucciones de control del procesador.

    La habilidad de soportar el tamao de palabra y los modos de
     direccionamiento del "modo real" de la familia de procesadores
     iAPX86 mientras que se ejecute entre los lmites del modo
     protegido.

    La habilidad de canalizar todas las llamadas al sistema del DOS y
     la BIOS y emular dichas llamadas de forma que funcionen de la forma
     apropiada y se obtenga un buen rendimiento.

    La habilidad de simular un esquema hardware sobre el que las
     aplicaciones del DOS estn acostumbradas a tener control.

    La habilidad de proporcionar servicios propios del MS-DOS a travs
     de los servicios nativos del Linux; por ejemplo, dosemu puede
     proporcionar un disco duro virtual pertenececiendo ste a la
     jerarqua de directorios de Linux.

  1.2.  Cul es la ltima versin de dosemu y dnde puedo conseguirla?

  La versin ms reciente de dosemu es dosemu0.64 y puede encontrarla
  (por ftp) en:

  ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/

  ftp://dspsun.eas.asu.edu/pub/dosemu/

  Sin embargo, las versiones recin salidas (pre-release) tambin estn
  disponibles para los desarrolladores y ALPHA testers.

  Puede encontrar dichas versiones en:

  ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/Development

  ftp://dspsun.eas.asu.edu/pub/dosemu/Development

  teniendo nombres de la forma pre0.61.*.tgz. Estas versiones tienen la
  ventaja de que son compatibles con las versiones ms recientes del
  kernel de Linux. Adems, incluyen nuevas caractersticas.  Recuerde
  que es cdigo en fase ALPHA, de forma que puede tener bugs serios y
  muy poca informacin sobre las nuevas caractersticas.

  1.3.  Dnde puedo seguir el desarrollo?

  Si quiere seguir el desarrollo de dosemu, debera considerar
  subscribirse a linux-msdos-digest.

  Para ello, enve un mensaje a  majordomo@vger.rutgers.edu con el
  siguiente comando en el cuerpo de su mensaje electrnico:

       subscribe linux-msdos-digest su_nombre@su.direccion.electronica

  Si alguna vez desea darse de baja de esta lista de correo, (mailing
  list), enve un mensaje a majordomo@vger.rutgers.edu con el siguiente
  comando en el cuerpo del mensaje:

       unsubscribe linux-msdos-digest su_nombre@su.direccion.electronica

  1.4.  Qu documentacin hay disponible para dosemu?

  El manual del dosemu (dosemu.texinfo) escrito por Robert Sanders no ha
  sido actualizado durante algn tiempo, pero todava es una buena
  fuente de informacin. Se distribuye con dosemu.

  La "Gua de principiantes de dosemu" ("Dosemu Novice's Altering
  Guide") tambin llamada DANG es el mapa de carreteras de los
  entresijos de dosemu.

  Est diseada para los aventureros, aquellos que desean modificar el
  cdigo fuente por s mismos.

  La DANG es mantenida por Alistair MacDonald (am20@unix.york.ac.uk)  y
  se anuncia de vez en cuando en el canal MSDOS de los activistas de
  Linux Linux Activists).

  La lista de xitos EMU (EMUsuccess.txt) es una lista de todos los
  programas que se ha comprobado que funcionan bajo dosemu.

  Se publica de vez en cuando en la lista de correo. La versin ms
  reciente puede encontrarse en ftp://dspsun.eas.asu.edu/pub/dosemu.

  Y tambin, por supuesto, estn los PUFs y COMOs (-- En cuanto a
  traducciones, ver la seccin ``''--)

  de dosemu. Pero esto ya lo sabe, no?. ;-) Tambin se anuncian de vez
  en cuando en la lista de correo. La versin ms reciente puede
  encontrarla en ftp://dspsun.eas.asu.edu/pub/dosemu.

  1.5.  Cmo puedo incluir cambios o adiciones al HOWTO?

  El mtodo mas usual es editar el fichero (-- Referido al HOWTO
  original en ingls--) , dosemu-HOWTO-xx.x.sgml para incorporar los
  cambios, crear un fichero diff escribiendo algo como

       diff archivo_original archivo_nuevo

  y enviarlo a deisher@dspsun.eas.asu.edu.  Si no conoce SGML, es una
  buena forma de hacerlo. Los cambios o nueva informacin de cualquier
  forma sern aceptada. Creando el fichero diff lo hace ms fcil para
  para el editor del HOWTO. :-)

  1.6.  Copyright

  Unless (-- Nota del traductor: A continuacin expongo el texto sobre
  el copyright en su versin original para respetar las condiciones que
  ste impone, su traduccin se acompaa a continuacin.--) otherwise
  stated, Linux HOWTO documents are copyrighted by their respective
  authors.  Linux HOWTO documents may be reproduced and distributed in
  whole or in part, in any medium physical or electronic, as long as
  this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Greg Hankins, the Linux HOWTO
  coordinator, at gregh@cc.gatech.edu.

  A menos que se diga lo contrario, los COMO de Linux estn bajo el
  copyright de sus respectivos autores. Los COMO de Linux pueden ser
  reproducidos y distribuidos en parte o de forma completa, en cualquier
  medio fsico o electrnico, con tal de que la nota sobre el copyright
  se mantenga en todas las copias. Las distribuciones comerciales estn
  permitidas y alentadas; sin embargo, al autor le agradara ser
  informado sobre cualesquiera de tales distribuciones.

  En todas las traducciones, trabajos derivados, o inclusiones de
  cualquier COMO de Linux en otro trabajo, debe aparecer dicho aviso
  sobre el copyright.
  Eso significa, que no se puede crear un trabajo derivado de un COMO e
  imponer restricciones adicionales sobre su distribucin y uso.  Se
  puede otorgar excepciones a esta regla bajo ciertas condiciones; por
  favor, contacte con el coordinador de los COMOs de Linux en la
  direccin dada ms adelante.

  Resumiendo, nos gustara promover la difusin de esta informacin a
  travs del mayor nmero de canales posibles. Sin embargo, nos gustara
  mantener el copyright en los documentos COMO, y sera de agradecer el
  ser notificado de cualquier plan de distribuir los COMOs.

  Si tiene preguntas, por favor contacte con Greg Hankins, el
  coordinador de los COMOs de Linux, en gregh@cc.gatech.edu.

  2.  Compilando e instalando dosemu

  2.1.  Dnde estn las instrucciones sobre la instalacin?

  Las instrucciones sobre la instalacin se pueden encontrar en el
  archivo "QuickStart", incluido en la distribucin.

  2.2.  instalacin de dosemu.  Los diez principales problemas durante
  la compilacin e

  1. Olvidar leer el fichero QuickStart.

  2. Intentar compilar con un kernel anterior al 1.1.45.

  3. Tener mal la ubicacin del cdigo fuente del kernel de linux, debe
     estar en /usr/src/linux.

  4. Utilizar dosemu con un kernel que no haya sido compilado con IPC.

  5. Compilar con un gcc anterior al 2.5.8 o una libc anterior a la
     4.5.21.

  6. Olvidar editar el fichero /etc/dosemu.conf.

  7. Olvidar ejecutar "FDISK /mbr" en su imagen del disco duro
     (hdimage).

  8. Correr DOSEMU con acceso a las particiones cuando stas ya estn
     montadas.

  9. No instalar dosemu con privilegios suficientes (p.e., root).

  10.
     Intentar correr DOSEMU en un Proveedor multiusuario de Servicios de
     Internet bajo linux (Linux Internet Service Provider).

  2.3.  Cmo puedo crear un ejecutable simple (sin libreras)?

  Marty Leisner (leisner@sdsp.mc.xerox.com) escriba lo siguiente:

  Si quiere crear un ejecutable con QMAGIC, defina STATIC en el
  Makefile. De otra manera habr una combinacin de librera/ejecutable.

  2.4.  Cmo puedo crear archivos binarios en formato ELF?

  Marty Leisner (leisner@sdsp.mc.xerox.com) escriba lo siguiente:

  Si quiere hacer archivos binarios ELF, defina ELF en el "Makefile".
  Necesitar compilar e instalar las libreras slang de forma separada,
  Slang trabaja bien como archivo binario compartido en formato ELF.

  2.5.  Cmo puedo compilar dosemu en una mquina con poca memoria?

  Marty Leisner (leisner@sdsp.mc.xerox.com) escriba lo siguiente:

  Si tiene problemas al compilar porque desbordamiento del swap, debe
  aadir CFLAGS+=-fno-inline despus de donde est definido CFLAGS en
  dpmi/Makefile. Tenga cuidado antes de hacer esto y compruebe que tenga
  espacio de swap. Me he dado cuenta de que Linux suele fallar cuando no
  posee suficiente espacio de swap.

  2.6.  Cmo puedo acelerar la compilacin?

  Marty Leisner (leisner@sdsp.mc.xerox.com) escriba lo siguiente:

  La optimizacin predeterminada es -O2. Puede editar el fichero
  Makefile para usar -O (compilar un poco ms rpido/lento).

  2.7.  Cmo puedo compilar de forma no interactiva?

  Marty Leisner (leisner@sdsp.mc.xerox.com) escriba lo siguiente:

  Si define do_DEBUG en el Makefile, obtendr un make -Wall -g, sin-tex
  y de forma no interactiva.

  2.8.  Ms trucos de compilacin de Marty...

  Marty Leisner (leisner@sdsp.mc.xerox.com) escriba lo siguiente:

  Necesita haber compilado el kernel en su sistema para obtener la
  versin actual. Si no es as, debe modificar a mano la variable
  KERNEL_VERSION en nivel ms alto del Makefile. El nmero es de la
  forma "nmmmppp", donde "n" es la versin, "mmm" es la versin menor, y
  "ppp"  es el nivel del patch (patchlevel).  Por ejemplo, el kernel
  1.1.88 se corresponde con "1001088" y el kernel 1.2.1 con "1002001".

  Realice todos los makes desde el nivel ms alto (directorio inicial)
  para obtener mejores resultados. Desde ste, teclee "make
  subdirectory" para compilar el subdirectorio. Cada directorio (y el
  inicial), tienen entradas "clean" y "realclean".  "clean" borrar los
  objetos (*.o), "realclean" tambin eliminar las dependencias y otros
  ficheros.

  2.9.  Es necesario compilar dosemu como root ?

  No. Aunque deber instalarlo como root.

  Marty Leisner Marty Leisner (leisner@sdsp.mc.xerox.com) aade:

  A la hora de acceder a los puertos de entrada/salida (incluyendo a la
  consola) dosemu necesita ser ejecutado siendo root. Ejecutar dosemu en
  un xterm o en X Window y necesitando ahora acceso directo al hardware
  le permite ejecutarlo como usuario. Se trabajar en las complicaciones
  de seguridad/identidad (security/setuid) en las versiones de
  desarrollo.

  2.10.  El Makefile  est en un bucle infinito...

  James B. MacLean (jmaclean@fox.nstn.ns.ca) escriba (4/12/95) lo
  siguiente:

  Nos hemos encontrado con esto en ciertas ocasiones, normalmente cuando
  la fecha de algn fichero tenga algo que ver. Algunas personas lo
  arreglan con una versin ms nueva del kernel, mientras que otros
  (incluido yo) hacen un "make realclean" y despus un "make most".

  3.  Configuracin del Disco Duro

  3.1.  Cmo utilizo mi disco duro con dosemu?

  Lo primero, monte sus particiones del dos como subdirectorios de
  Linux.  Por ejemplo, debera crear un directorio en Linux tal como
  /dos

       mkdir -m 755 /dos

  y aadir una lnea como la siguiente:

          /dev/hda1       /dos     msdos   umask=022

  en su /etc/fstab. (En este ejemplo, el disco duro est montado slo
  lectura. Puede montarlo como lectura/escritura reemplazando "002" por
  "000" y utilizando la opcin -m 777 con mkdir). Ahora haga un mount
  /dos.  De forma que pueda aadir una lnea como la siguiente:

         lredir d: linux\fs/dos

  en el archivo AUTOEXEC.BAT en su hdimage (lase los comentarios
  respecto a LREDIR ms adelante). En un sistema multiusuario, puede
  utilizar:

         lredir d: linux\fs\${home}

  donde "home" es el nombre de una variable de entorno que contiene la
  localizacin del directorio del dos (/dos en nuestro ejemplo).

  Tim Bird (Tim_R_Bird@Novell.COM) expone que los usuarios de LREDIR
  deberan tener cuidado cuando utilizan LREDIR en el autoexec.bat, dado
  que el command.com est continuamente analizando el autoexec.bat desde
  la unidad redireccionada con el mismo desplazamiento en el archivo que
  cuando fue dejado en el autoexec.bat de la unidad fsica.  Por este
  motivo, es ms seguro que el archivo autoexec.bat de la unidad
  redireccionada y de la unidad fsica (imagen del disco) sean el mismo.

  Robert D. Warren (rw11258@xx.acs.appstate.edu) informaba (4/28/94) de
  lo siguiente:

  Tengo una pequea imagen arrancable del disco duro (hdimage, que ocupa
  menos de 1MB - y es el doble de grande de lo que es necesario a fin de
  cuentas), y la ltima lnea en mi config.sys que est en la imagen
  arrancable es:

               install=c:\lredir.exe c: LINUX\FS\home/dos

  De esta forma se ejecutar lredir justo antes de que el intrprete de
  comandos lo haga. Y he conseguido hacerlo funcionar correctamente
  tanto con el command.com como con el 4DOS. Esto elimina el problema
  del desplazamiento utilizando lredir en el autoexec.bat.

  Uwe Bonnes (bon@elektron.ikp.physik.th-darmstadt.de) aade (8/11/95)
  que:

  Resulta til el hacer:

       install=C:\subst.exe g: c:

  antes de eso, de forma que todava pueda acceder a la imagen del disco
  duro en la unidad g:.  Otro truco interesante que viene al tema es el
  configurar dosemu para utilizar "autoexec.emu" y as mantener el dos y
  dosemu aparte.

  3.2.  Puedo utilizar mi disco stacked/double-spaced/super-stored?

  Por ahora, las unidades comprimidas no pueden ser accedidas a travs
  del redireccionador (lredir o emufs). Sin embargo, mucha gente han
  podido hacerlo simplemente descomentando la lnea:

     disk { wholedisk "/dev/hda" }        # 1st partition on 1st disk

  en el fichero de configuracin del dosemu.

  Otros lo han conseguido utilizando

          disk { partition "/dev/hda1" }

  Si su particin del dos ya est montada con permiso de escritura e
  intenta ejecutar dosemu con acceso a la particin o al todo el disco,
  dosemu imprimir un mensaje de aviso y abortar. De esta forma se
  evitan escrituras independientes al disco por parte del DOS y de
  Linux, que resultaran en datos inconsistentes.

  Si est instalado el LILO, lo anterior no funcionar. Sin embargo...

  Thomas Mockridge (thomas@aztec.co.za) informaba (8/5/94) que

  He estado trabajando un poco para arrancar dosemu con el LILO y
  Stacker 4.0...

  1. dd el MBR a un archivo. (o usando las utilidades norton, etc., los
     512 primeros bytes)

  2. Arranque el dos (no el dosemu), haga un fdisk /mbr, y active su
     particin del dos con el fdisk (del dos).

  3. Copie el MBR nuevo a un archivo.

  4. Reemplace el MBR con el original.

  5. Copie el segundo MBR a /var/lib/dosemu/partition.hda?  (cualquiera
     que sea su particin del dos)

  6. Ponga en el dosemu.conf:

                      disk {partition "/dev/hda? ?"}

  7. Lance dosemu y voila!  Sin LILO.

  Holger Schemel (q99492@pbhrzx.uni-paderborn.de) comentaba (2/10/94) lo
  siguiente:

  Se trabaja igual de bien bajo dosemu con MS-DOS 6.0. Si tiene
  problemas, entonces debe editar el archivo 'dblspace.ini' a mano y
  cambiar la letra de la unidad por la letra de la unidad que utilice
  bajo dosemu.

  Darren J. Moffat (moffatd@dcs.gla.ac.uk) tambin comentaba (3/27/94)
  lo siguiente:

  "...utilice 6.2 si lo tiene!! Tan slo asegrese de tener a mano un
  disco de arranque con el LILO puesto que el dos 6{.2} cambiar el
  MBR."

  4.  Puertos paralelos, puertos serie y ratones

  4.1.  Microsoft?  Dnde est los controladores del ratn compatible
  con el de

  Tom Kimball (tk@pssparc2.oc.com) escriba (11/24/93) lo siguiente:

  Hay bastante gente que asegura haber utilizado un controlador de ratn
  diferente y aconsejaron algunos. He encontrado un par que parecen
  trabajar bien:

    ftp://oak.oakland.edu/pub/msdos/mouse/mouse701.zip (mscmouse)

    ftp://oak.oakland.edu/pub/msdos/mouse/gmous102.zip (gmouse)

  4.2.  Por qu no funciona el controlador del ratn?

  Mark Rejhon (mdrejhon@magi.com) comentaba (4/7/95) lo siguiente:

  Si inicializa el controlador del ratn y se cuelga (debera tomar unos
  30-60s), intente especificar el puerto COM en el que est el ratn, en
  la lnea de comando del controlador del ratn.

  4.3.  Por qu anula dosemu el COM4 ?

  Rob Janssen (rob@pe1chl.ampr.org) comentaba (3/24/94) que:

  De acuerdo con jmorriso@bogomips.ee.ubc.ca, "dosemu todava anula el
  COM4 (0x2e8, IRQ 5). 0x2e8 no estn en ports{} en la configuracin.
  Yo tengo que ejecutar setserial /dev/cua3 irq 5 despus de que dosemu
  termine."

  Esto es causado por la BIOS de su VGA. Me he dado cuenta de eso
  activando la traza del puerto de entrada/salida y observando donde fue
  anulado el puerto serie.

  Desactive la lnea "allowvideoportaccess on" en la configuracin e ir
  bien.  Cuando tenga problemas luego con el vdeo, intente activar
  rangos de direcciones de entrada/salida ms selectivos (ej. 40-43).

  4.4.  Cmo utilizo dosemu sobre los puertos serie?

  4.5.  Cmo puedo cambiar entre dosemu y una shell sobre la lnea
  serie?

  John Taylor (taylor@pollux.cs.uga.edu) comentaba (5/25/94) lo
  siguiente:

  Utilizo el ncleo de Linux 1.1.13 y quisiera sealar una gran
  caracterstica que debera mantenerse (IMHO (-- In My Honest Opinion,
  algo as como EMMO, En Mi Modesta Opinin--) ).  Con la versin 52, se
  puede ejecutar el programa screen. Desde screen, puedo ejecutar dos
  -D-a. Lo realmente importante (EMMO) son los comandos del programa
  screen, (comandos CTRL-A), que siguen funcionando. Esto significa que
  puedo hacer CTRL-A C aadiendo otra shell unix, y conmutar entre ambas
  (DOS / UNIX). Esto permite que dosemu pueda ser usado a travs de una
  lnea serie cmodamente, ya que el cambio entre shells es muy fcil.

  4.6.  Cmo puedo hacer que funcionen los puertos paralelos?

  Dennis Flaherty (dennisf@flaherty.elk.miles.com) comentaba (3/2/95)
  que:

  El dosemu.conf tiene lneas al final para redireccionar impresoras a
  lpr o a un archivo. Si quiere tener acceso directo, descomente las
  lneas de emulacin, y aada la lnea

       ports { 0x3b8 0x3b9 0x3ba 0x3bb 0x3bc 0x3bd 0x3be 0x3bf } # lpt0

  para la "tarjeta del monitor" del puerto de la impresora (corresponde
  con /dev/lp0), o

       ports { 0x378 0x379 0x37a 0x37b 0x37c 0x37d 0x37e 0x37f } # lpt1
       ports { 0x278 0x279 0x27a 0x27b 0x27c 0x27d 0x27e 0x27f } # lpt2

  para LPT1 (/dev/lp1) y LPT2 (/dev/lp2) respectivamente.

  5.  Mltiples usuarios y sesiones sin-interactividad

  5.1.  Puedo utilizar dosemu en un sistema multiusuario?

  Corey Sweeney (corey@amiganet.xnet.com) (12/8/93) comentaba:

  Si est utilizando dosemu en un sistema en el cual ms de una persona
  puede querer ejecutar dosemu, deber en consecuencia cambiar el
  directorio de su imagen de disco duro. En el archivo /etc/dosemu.conf
  existe una lnea de forma predeterminada que indica que la imagen del
  disco duro es "hdimage".  Si lo cambia por /var/lib/dosemu/hdimage
  entonces los usuarios no tendrn que preocuparse por el directorio en
  el que estn cuando ejecuten dosemu, y el archivo hdimage no
  necesitar ser cambiado cada vez que instale una versin nueva de
  dosemu.

  Si hace esto para un dosemu multiusuario, querr entonces crear el
  archivo hdimage de slo lectura en /var/lib/dosemu para cualquiera
  menos para el administrador del dosemu.

  Tenga en cuenta que puede usar el nuevo controlador emufs.sys para
  montar un directorio "pblico" y/o un directorio "privado" (un
  subdirectorio en el directorio home de cada usuario).

  Nota: Los usuarios deben tambin crear un fichero de configuracin
  personal llamado ~/.dosrc (con el mismo formato que el
  /etc/dosemu.conf) para ejecutar su copia personal del dos.

  5.2.  Cmo puedo ejecutar comandos del dos de forma no interactiva?

  He estado tentado de escribir un artculo sobre esto durante bastante
  tiempo, pero no me he puesto todava a ello.  Aqu tiene algunas
  indicaciones de otros:

  Dan Newcombe (newcombe@aa.csc.peachnet.edu) informaba (1/27/94) de lo
  siguiente:

  He aqu una idea (sin comprobar) para ser capaz de ejecutar un comando
  del DOS desde la lnea de comandos (o por eleccin de un men, etc...)
  sin modificar el emulador actual. (Se asume que su particin del dos
  est ya montada bajo Linux).

  Supongamos que quiere ejecutar wp60.exe con los parmetros "wp60
  d:\doc\paper.txt".  Debera hacer algo parecido a "dosrun wp60
  d:\doc\paper.txt".  "dosrun" debera ser un script que tendra que

  1. Editar/modificar/recrear el autoexec.bat de su particin del dos y

  2. Simplemente ejecutar dosemu (ej., "dos -C >/dev/null".

  El paso 1 debera guardar de alguna manera todo lo que normalmente
  tenga puesto en el autoexec.bat (ej., mouse.com) y en la ltima lnea
  deber poner "wp60d:\doc\paper.txt".

  En la parte del dosemu, y con antelacin, deber modificar el archivo
  config.sys (situado en el archivo hdimage) de forma que

  1. Utilice emufs para acceder a la particin del dos como D:,

  2. Escriba "COMPSEC=D:\ (o eso creo. no tengo un manual del DOS a
     mano.), y

  3. Escriba "shell=c:\command.com /p".

  La idea estriba en que cada vez que cargue el emulador del DOS, se
  crear un autoexec.bat especfico para esa sesin. Las modificaciones
  en el archivo hdimage radican en decirle al emulador/DOS que quiera
  utilizar que arranque desde la unidad D:, la cual sera la particin
  DOS actual.

  Si no utiliza el archivo hdimage y accede al sistema de ficheros del
  DOS directamente mediante el arranque de dosemu, entonces esto
  funcionar, no teniendo as que cambiar el archivo hdimage.

  Daniel T. Schwager (danny@dragon.s.bawue.de) informaba (7/2/94) que:

  Puede utilizar diferentes archivos dosemu.conf (y distintas imgenes
  de arranque, hdimage, con autoexec.bat's distintos) y llamar al dosemu
  de la forma

  $ dos -F mi_dosemu.conf

  Dietmar Braun (braun@math20.mathematik.uni-bielefeld.de) informaba:
  (7/4/94)

  No hay problemas a la hora de utilizar el redirector de dosemu. Es
  posible redireccionar una letra de unidad a una ruta de linux dada por
  una variable de entorno.

  De forma que tengo un script llamado "DOS" el cual hace algo parecido
  a

        mkdir /tmp/dos.$$
        DOSTMP=/tmp/dos.$$; export DOSTMP

  y luego un pequeo truco para conseguir que

       echo $* > $DOSTMP/startup.bat

  realmente funcione (un pequeo programa en C que cambie las '/' por
  dos utilizando cr/lf y aadiendo ^Z al final de archivo), cree
  archivos de arranque, enlaces y dems en este directorio, y luego
  inicie dosemu. Dentro del "autoexec.bat" la unidad c: est
  redireccionada del hdimage al directorio temporal, el cual tiene
  enlaces para $HOME y $PWD.

  Luego, si quiero ver mis archivos reducidos a 8.3 caracteres puedo
  escribir "DOS dir" y as tendr el listado de mi directorio actual. De
  forma que tengo un DOS multiusuario (No tengo ninguna particin de DOS
  y redireccionando hacia Linux se preservan los permisos de usuario) y
  multitarea (ya que las sesiones de dosemu son completamente
  independientes).  Hice esto una vez para poder utilizar un controlador
  del dos para mi impresora. Actualmente mi printcap df es un programa
  de DOS. De forma que puede hacer que algunos ejecutables del DOS
  acten como filtros de impresin.

  6.  dosemu y Netware

  6.1.  Cmo puedo conseguir acceso a Netware desde dosemu?

  James B. MacLean (maclean@fox.nstn.ns.ca)  informaba (11/28/94) que:

  Dosemu tiene ahora soporte para pdipx (un IPX sobre pktdrv) y pdether
  (utiliza MLID de Novell) para acceder al LANs de Novell a travs del
  controlador de paquetes (packet driver). El controlador reside en la
  interrupcin 0x60, y cumple con las normativas usuales.

  An hay que tener cuidado a la hora de hacer TCP/IP con DOS. Se puede
  conseguir acceso nico de la siguiente forma:

  1. cd ./net

  2. cp libpacket.c.single libpacket.c

  3. cp pktnew.c.single pktnew.c

  4. Recompile dosemu

  5. Ejecute dosemu

  6. Cargue pdether segn lo descrito en sus documentacin (pdipx es
     otro mtodo)

  7. Cargue netx

  8. Disfrute del acceso netware :-)

  Si necesita algn tipo de acceso especial a su NIC, siga leyendo.  De
  forma predeterminada dosemu no obtiene interrupciones del kernel.  Eso
  quiere decir que si quiere que dosemu controle su NIC, quizs para
  acceder a Netware en la red a travs de un cliente NETX, tengo un
  controlador (Silly Interrupt Generator) para aadir al kernel para que
  cualquier programa, como dosemu, pueda hacer uso de las interrupciones
  para su NIC.  Yo usaba esto hace tiempo en el dosemu para acceder a
  una red Novell Lite hasta que lleg el controlador de paquetes.

  Cualquiera que est interesado puede escribirme a la direccin
  (jmaclean@fox.nstn.ns.ca) y le pasar algunas direcciones.

  Quiere accesos mltiples de dosemu a Novell?

  1. Compile la actual versin (pre-release) de dosemu

  2. Siga las indicaciones de ./v-net/dosnet.README

  3. Contine en el apartado 5 anterior.

  6.2.  El COMO de Netware

  El COMO de Netware escrito por Lauri Tischler
  (ltischler@fipower.pp.fi) es ahora un documento aparte. Se incluye con
  la distribucin de dosemu y debera tambin poderse encontrar en la
  direccin de donde normalmente obtenga los COMOs (ej.,
  http://sunsite.unc.edu/mdw/linux.html).

  7.  dosemu y X-windows

  7.1.  X Window?  Puedo ejecutar dosemu en modo consola mientras se
  est ejecutando

  Ronald Schalk (R.Schalk@uci.kun.nl) informaba (1/17/94) que:

  S, sin problemas. Slo recuerde utilizar ctrl-alt-Fn para ir a una
  Consola Virtual (VC), y as poder utilizar aplicaciones de Linux
  (dosemu es una aplicacin ms). Yo casi siempre tengo cargado el WP5.1
  en una sesin de dos.

  Nota:  Utilice ctrl-alt-F7 para volver a X desde dosemu.

  7.2.  Se puede ejecutar dosemu en una ventana de X-Window?

  Mark Rejhon (mdrejhon@magi.com) informaba (4/8/95) que:

  Si tiene instalado X y ha compilado de forma correcta dosemu y le
  funciona bien fuera de X-windows, debera ya ser capaz de ejecutar
  "xdos" o "dos -X" para abrir una ventana de dosemu. Si no es as,
  compruebe:

  1. Haber compilado dosemu con soporte para X (X_SUPPORT=1 en el
     Makefile).

  2. Tener instalada la fuente VGA. Puede realizar esto ejecutando el
     script xinstallvgafont en directorio fuente de dosemu-0.60,
     escriba:

       sh xinstallvgafont

  3. Tener configurado su mapa de teclado para X.  En un xterm, escriba

            xmodmap -e "keycode 22 = 0xff08"
            xmodmap -e "keycode 107 = 0xffff"

  Estas lneas establecen las teclas de retroceso (backspace) y borrado
  respectivamente.

  4. Haber configurado la lnea que define el comportamiento bajo X en
     su /etc/dosemu.conf.

  Alternativamente, puede ejecutar dosemu en un xterm a color, lo cual
  no es muy recomendable dado que muchos xterms a color presentan
  errores a la hora de visualizar las caractersticas complejas de texto
  que dosemu utiliza.  De esta forma no se necesita que la opcin
  X_SUPPORT sea compilada.  Sin embargo, si esto es lo que quiere
  realmente, siga los siguientes pasos:

  1. Instale ansi_xterm. Se recomienda utilizar el paquete que est en:

     ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/Development/ansi-xterm-
     R6.tar.gz

  2. Instale la fuente VGA. Para ello puede ejecutar el script
     xinstallvgafont que est en el directorio fuente de dosemu-0.60,
     escriba:

       sh xinstallvgafont

  3. Configure su mapa de teclado para X.  En un xterm, teclee:

            xmodmap -e "keycode 22 = 0xff08"
            xmodmap -e "keycode 107 = 0xffff"

  Estas lneas establecen las teclas de retroceso (backspace) y borrado
  respectivamente.

  4. Configure la lnea del /etc/dosemu.conf que define el
     comportamiento cuando dosemu se ejecuta en modo consola.

  Marty Leisner (leisner@sdsp.mc.xerox.com) informaba (3/31/95) que:

  Tengo xrdb configurado de la siguiente forma

       dosxterm*Font: vga
       dosxterm*geometry: 80x25
       dosxterm*saveLines: 25

  o tambin puedo crear un alias "dosxterm" a
  "term -fn vga -title dosxterm -geometry 80x25 -sl 25"

  Si utiliza el mtodo xrdb, todo lo que tiene que hacer es ejecutar
  "xterm -name dosxterm"

  7.3.  Funciona correctamente la emulacin ansi?

  Marty Leisner (leisner@sdsp.mc.xerox.com) informaba (3/31/95) que:

  S. Yo utilizo nnansi.com bajo X windows. Me han funcionado
  correctamente los modos de 25, 43 y 50 lneas, sin embargo resulta
  difcil utilizar el modo de 50 lneas en una resolucin de 1024x768 (a
  menos que utilice fuentes ms pequeas y una pantalla mayor. El modo
  de 43 lneas se ajustar a la ventana del xterm para utilizar 43
  lneas.

  8.  dosemu y MS-Windows 3.1

  8.1.  Es posible ejecutar MS-Windows 3.1 bajo dosemu?

  El archivo README dice:

  ****************************************************************************
  *        AVISO!!!  AVISO!!!  AVISO!!!  AVISO!!!                *
  *                                                                          *
  *      Peligro Will Robinson!!!  Todavia no esta completamente          *
  *     soportado y hay muchos errores conocidos!  Los programas         *
  *           extensos son casi seguro que NO FUNCIONEN!!!                   *
  * ESTE PREPARADO PARA POSIBLES CUELGUES DEL SISTEMA SI LO INTENTA!!!    *
  *                                                                          *
  *       AVISO!!!  AVISO!!!  AVISO!!!  AVISO!!!                 *
  ****************************************************************************

  Cmo, todava sigue leyendo?  Bueno, es posible ejecutar WINOS2 (la
  versin modificada de Windows 3.1 que OS/2 utiliza) bajo dosemu.

  Hay muchos problemas conocidos. Windows es propenso a colgarse y
  podra llevarse los datos consigo. Los programas extensos no
  funcionarn. El ratn ira ms lentamente, etc., etc., etc. En otras
  palabras, todava no est preparado para el uso diario. Se sabe de
  muchas tarjetas de vdeo que dan problemas (vera una bonita pantalla
  blanca).

  Los grupos de programas tendern a desaparecer. Bsicamente, es una
  pena.

  Por otro lado, si se muere de ganas de ver la pequea pantallita del
  Windows ejecutndose bajo Linux y ha ledo esto CUIDADOSAMENTE y
  PROMETE NO BOMBARDEAR A LOS DESARROLLADORES DE DOSEMU CON MENSAJES
  COMO "MS Word 6.0 no funciona!!!"...

  1. Consiga el dosemu y los fuentes de Linux.

  2. Desempaquete el dosemu.

  3. Parchee el kernel de linux con el archivo kernel.diff en el
     directorio ./dpmi del dosemu.

  4. Recompile el kernel.

  5. Compile dosemu.

  6. Arranque con el nuevo kernel.

  7. Consiga el archivo WINOS2.ZIP de ftp://tsx-11.mit.edu

  8. Desempaquete los archivos del WINOS2 en su directorio
     WINDOWS\SYSTEM.

  9. Reinicie linux, y ejecute dosemu (asegrese de que la opcin DPMI
     est puesta como "ON")

  10.
     Copie el archivo winemu.bat a su unidad c:.

  11.
     Cruce los dedos.

  Buena suerte!

  RECUERDE:  AUN ASI NO ES RECOMENDABLE!!!  NO SE RECOMIENDA!!!
             NO LE ACONSEJAMOS QUE LO INTENTE!!!

  9.  Vdeo y sonido

  9.1.  Puedo ejecutar videojuegos de 32-bit bajo dosemu?

  Mark Rejhon (mdrejhon@magi.com) comentaba (4/8/95) lo siguiente

  Con las recientes mejoras sobre el DPMI introducidas en la versin
  0.60, ya se puede ejecutar algunos videojuegos de 32-bit bajo dosemu.
  Si el juego se puede ejecutar en una ventana de DOS en OS/2, hay
  muchas posibilidades de que funcione bajo dosemu. (Algunos ejemplos de
  juegos de 32-bit que se ha comprobado que funcionan en la ltima
  versin de dosemu son Descent, Dark Forces, Mortal Kombat II y Rise of
  The Triad.)

  Antes de que intente ejecutar un videojuego, deber tener configurado
  el teclado en modo raw y haber activado los modos grficos de la VGA,
  en el archivo /etc/dosemu.conf. Si ha podido ejecutar programas
  grficos bajo dosemu y stos han funcionado bien, y quiere arriesgarse
  a que posiblemente se cuelgue el sistema (debido a que est dejando
  que dosemu se ejecute con los permisos de root a la hora de acceder a
  la tarjeta de vdeo, y por ello a dejar a la tarjeta de vdeo en un
  estado en el cual es difcil luego de recuperar) entonces puede seguir
  adelante y tratar de ejecutarlo.

  Dse cuenta, sin embargo, de que tendr que desactivar el sonido del
  juego. (Alguien tendr que trabajar en la emulacin de las tarjetas de
  sonido para que podamos evitar esto). Tambin debe comprender que el
  juego ir un poco ms lento, debido a la multitarea de Linux. De forma
  que el juego debera ejecutarse entre un 5 y 100 por ciento de su
  velocidad.  Normalmente, la velocidad est en un 50 por ciento en la
  versin actual del dosemu y se espera que se vaya mejorando dentro de
  poco.

  Quien sabe, a lo mejor igual funciona. Por favor enve un mensaje (e-
  mail)  al encargado del EMUsuccess.txt si el juego funciona
  correctamente!

  9.2.  Al salir de dosemu se me llena la pantalla de basura.

  (4/8/95)

  El problema est en que la informacin de la fuente para la pantalla
  de texto de la VGA no se ha grabado. Consiga una copia del paquete
  svgalib. Actualmente puede encontrarlo en:

  ftp://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib125.tar.gz

  Tambin debera estar disponible en forma de paquete pre-compilado en
  su distribucin de Linux favorita ( ej., Slackware, etc.). Utilice
  savetextmode para grabar el modo texto y la fuente actual en un
  fichero en /tmp antes de ejecutar dosemu. Luego, al salir de dosemu,
  escriba textmode para restaurar el modo de vdeo grabado.

  9.3.  Trident/Actix/otra?  Cmo puedo hacer que funcione correcta
  mente mi tarjeta de vdeo

  La pantalla flucta violentamente, muestra el mensaje de inicio de la
  BIOS de vdeo y se cuelga.

  Andrew Tridgell (tridge@nimbus.anu.edu.au) comentaba (1/29/94) lo
  siguiente:

  He conseguido que me funcione con versiones antiguas utilizando:

          ports { 0x42 }

  a pesar de ello algunas veces mi mquina se colgaba cuando merodeaba
  la BIOS de vdeo en dosemu. Esto es debido a que est permitiendo a la
  BIOS de la VGA a que reprograme su reloj, lo cual no sienta nada bien
  al Linux.

  Esto me sugiri el escribir los parches de enmascaramiento de slo
  lectura para dosemu, que puede encontrar todava en la ltima versin.
  Ahora utilizo:

          ports { readonly 0x42 }

  de esta forma se ejecutar dosemu ms lentamente, pero con mayor
  seguridad.

  Tim Shnaider (tims@kcbbs.gen.nz) tambin comentaba (1/18/94) que:

  Una forma de arreglar esto es utilizar el programa GETROM para volcar
  su BIOS de VDEO a un archivo y editar luego el archivo de
  configuracin en el directorio /etc/dosemu. Aqu est mi lnea sobre
  el vdeo:

          video { vga console graphics chipset trident memsize 1024 vbios_file /etc/dosemu/vbios }

  donde vbios es el archivo generado al teclear:

          getrom > vbios

  Douglas Gleichman (p86884@tcville.edsg.hac.com)  comentaba (9/1/94)
  (respecto a la ATI Graphics Ultra):

  Para la versin 0.52 de dosemu necesita aadir la siguiente lnea a su
  archivo dosemu.conf
        ports  { 0x1ce 0x1cf 0x238 0x23b 0x23c 0x23f 0x9ae8 0x9ae9 0x9aee 0x9aef }

  La misma placa mostrar un error pero podrn trabajar bien los
  programas que utilicen grficos.

  9.4.  Por qu no funciona el software de mi tarjeta de sonido con
  dosemu?

  Hannu Savolainen (hsavolai@cs.Helsinki.FI) escriba (3/21/94) lo
  siguiente:

  Dosemu y cualquier programa de DOS se ejecutan bajo el control de un
  sistema operativo que funciona en modo protegido. Esto quiere decir
  que la memoria no se mapea como espera el programa. Si de alguna
  manera el programa comienza a utilizar el DMA para grabar sonido con
  la SoundBlaster, el sonido grabado no encontrar forma de llegar a la
  aplicacin. nicamente destruir algunos datos en la memoria.

  James B. MacLean (jmaclean@fox.nstn.ns.ca) comentaba (6/19/94):

  Perdone que discrepe, pero actualmente dosemu no tiene soporte para
  interceptar las interrupciones necesarias ni el DMA, siendo esto
  preciso para acceder a las tarjetas de sonido mediante dosemu :-(.

  Aunque se dar soporte en el futuro :-),

  10.  Otro Hardware

  10.1.  Cmo puedo hacer que trabaje mi dispositivo xxxxx bajo dosemu?

  Corey Sweeney (corey@bbs.xnet.com) comentaba (5/30/94) lo siguiente:

  Aqu tiene un registro de mis aventuras tratando de que los
  dispositivos trabajen bajo dosemu. Sin ir ms lejos he conseguido que
  funcionen mi sistema de correo de voz y mi scanner (a medias). Aqu
  est cmo lo he hecho:

  1. Mire en su manual si la placa utiliza algn puerto.  Si el manual
     le indica algunos, pngalos en el archivo de configuracin, en la
     lnea "ports". Recuerde que algunas veces necesitar tener
     bastantes puertos en una fila, y el primero debe ser el nico
     documentado.

  2. Intntelo. Si no funciona, o bien no tiene un manual (o contiene
     tan poca informacin como mi manual de la AT&T :) entonces ejecute
     dosemu con:

       dos -D+i 2> /tmp/io.debug

  Ejecute el software del dispositivo, y salga de dosemu. chele un
  vistazo a /tmp/io.debug y busque algunos nmeros de puertos que
  debera haber. Pruebe a aadir stos a las lneas de puertos e intente
  cargar dosemu de nuevo.

  3. Si todava produce errores entonces ser que necesita
     interrupciones. Busque la interrupcin que utilice la tarjeta y
     hgase con el archivo SIG.tgz (Silly Interrupt Generator) de algn
     lugar de ftp://tsx-11.mit.edu.  Instlelo como se indica en las
     instrucciones.

  y eso es todo lo que hay...

  Pregunta: Qu ocurre si mi tarjeta usa DMA? Respuesta: La hemos
  fastidiado.

  11.  Problemas y soluciones

  11.1.  Dosemu se ha cado y ahora no puedo escribir nada.

  Daniel Barlow(jo95004@sable.ox.ac.uk) comentaba (4/8/95) lo siguiente:

  Si no tiene acceso a travs de un terminal o de una red por el que
  pueda entrar, no le queda ms remedio que pulsar el botn de reset. Si
  todava puede utilizar alguna shell por alguna parte, ejecute
  "kbd_mode -a" para quitar el modo raw del teclado, y/o "stty sane" en
  la consola para que pueda ver lo que est tecleando.

  Algo que resulta til es el hacer un script para ejecutar dosemu, que
  ejecute automticamente "kbd_mode -a" al terminar ste. Cuando dosemu
  caiga, el script normalmente seguir corriendo, y ejecutar el comando
  "kbd_mode -a".

  11.2.  ayuda.  He activado la memoria EMS en el dosemu.conf  pero no

  Rob Janssen (pe1chl.ampr.org) comentaba (7/11/94):

  No olvide cargar el ems.sys que se proporciona, en el archivo
  config.sys.

  11.3.  change "?  Cmo me deshago de todos esos molestos mensajes de
  " disk

  (8/11/94)

  Consiga e instale klogd.  Pruebe en

  ftp://sunsite.unc.edu/pub/Linux/system/Daemons/sysklogd1.2.tgz

  11.4.  consola?  Por qu no se puede volver a ejecutar dosemu tras
  salir de modo

  Aldy Hernndez (aldy@sauron.cc.andrews.edu)  comentaba (7/8/94) lo
  siguiente:

  Debe deshabilitar la cach de vdeo y/o de la BIOS.

  11.5.  consola?  Por qu se puede ejecutar dosemu en un xterm  pero no
  en la

  JyiJiin Luo (jluo@casbah.acns.nwu.edu) comentaba (4/19/94):

  Yo he pasado por el mismo problema anteriormente. Lo he resuelto
  desactivando la shadow del vdeo en mi BIOS AMI. Ahora dosemu se
  ejecuta bien en mi sistema.

  11.6.  Cmo puedo hacer que dosemu se ejecute ms rpido?

  En algunos casos resulta til el jugar con los valores de la variable
  HogThreshold en el archivo dosemu.conf.

  Daniel Barlow(jo95004@sable.ox.ac.uk) comentaba (4/8/95) lo siguiente:

  La variable HogThreshold debe valer aproximadamente la mitad de los
  BogoMips que el sistema muestre al arrancar.

  11.7.  bajo dosemu.  Mi unidad de CDROM tiene problemas a la hora de
  leer algunos archivos

  Vinod G Kulkarni (vinod@cse.iitb.ernet.in) comentaba (4/7/94):

  Cuando se monta el CDROM desde Linux y se utiliza dentro de dosemu
  (unidad mapeada), puede dar algunos problemas. El controlador del CD-
  ROM (iso9660) que est en el kernel trata de encontrar el tipo del
  fichero (ej., binario o texto). Si no puede encontrarlo, intenta
  adivinar el tipo del archivo a travs de mtodos heursticos. Este
  mtodo falla bajo ciertas circustancias como cuando un archivo de
  texto (que parece binario) se trata como binario. (No s si esto es un
  error o una carcterstica de Linux).

  El resultado de todo esto est en que si copia tal archivo desde el
  CD-ROM (desde el mismo Linux, y no necesariamente desde dosemu), el
  archivo resultante ser mayor que el original. (Se han aadido
  espacios en blanco antes de ^J,^M). De forma que un programa que se
  est ejecutando bajo dosemu da un error o se cuelga, lo que se
  confunde con un error de dosemu.

  Rob Janssen (pe1chl@rabo.nl) comenta (8/10/94):

  La forma de resolverlo es desactivando totalmente la conversin.
  Introduzca la opcin "-o conv=binary" al comando mount cuando monte el
  CD-ROM, o inserte lo siguiente en el /etc/fstab:

       /dev/cdrom      /cdrom          iso9660 conv=binary,ro

  No se necesita parchear el kernel.

  11.8.  ( debugger )?  Cmo puedo ver los datos de salida de la depu
  racin

  Daniel Barlow(jo95004@sable.ox.ac.uk) comentaba (4/8/95) lo siguiente:

  En el caso de la versin 0.60 de dosemu, los datos de salida del
  debugger se redireccionan a un archivo especificado en la lnea de
  comandos.

  Utilice "dos -D+a -o /tmp/debug" para volcar los datos de salida del
  debugger al archivo /tmp/debug. No debera existir ninguna necesidad
  de redireccionar stderr.

  11.9.  Por qu aparecen duupliicaadoos mis pulsaciones de teclado?

  Nick Holloway (alfie@dcs.warwick.ac.uk) comentaba (2/22/94) lo
  siguiente:

  Tras haber ejecutado dosemu despus de haber toqueteado algunos
  valores del stty, se me duplicaban los caracteres al escribir. Ahora
  ya he descubierto cul es la razn!

  Slo sucede cuando dosemu se est ejecutando en la consola con
  generados por las pulsaciones de teclado son mutilados por istrip, de
  modo que los eventos de liberacin de una tecla parecen realmente
  eventos de pulsacin.

  Por tanto, es preciso desactivar el procesamiento de entrada cuando se
  usen cdigos de pulsacin en modo consola (No debe ser muy buena idea
  hacerlo en lneas tty).

  12.  Contribuyendo al proyecto dosemu

  12.1.  Quin es el responsable de dosemu?

  (3/18/94)

  Dosemu se cre con el trabajo de Matthias Lautner y Robert Sanders.
  James B. MacLean (jmaclean@fox.nstn.ns.ca) es el responsable de
  organizar las ltimas versiones de dosemu.

                         Historia de dosemu

            Version    Fecha                Responsable
           -------------------------------------------------
            0.1        Septiembre 3, 1992   Matthias Lautner
            0.2        Septiembre 13, 1992  Matthias Lautner
            0.3        ???                  Matthias Lautner
            0.4        Noviembre 26, 1992   Matthias Lautner
            0.47       Enero 27, 1993       Robert Sanders
            0.47.7     Febrero 5, 1993      Robert Sanders
            0.48       Febrero 16, 1993     Robert Sanders
            0.48pl1    Febrero 18, 1993     Robert Sanders
            0.49       Mayo 20, 1993        Robert Sanders
            0.49pl2    Noviembre 18, 1993   James MacLean
            0.49pl3    Noviembre 30, 1993   James MacLean
            0.49pl3.3  Diciembre 3, 1993    James MacLean
            0.50       Marzo 4, 1994        James MacLean
            0.50pl1    Marzo 18, 1994       James MacLean
            0.52       Junio 16, 1994       James MacLean
            0.60       Abril 9, 1995        James MacLean

  12.2.  Quiero ayudar. Con quin debo ponerme en contacto?

  El proyecto de dosemu es un esfuerzo de equipo. Si quiere contribuir,
  chele un vistazo al DPR (Dosemu Project Registry). Puede encontrarlo
  en ftp://dspsun.eas.asu.edu/pub/dosemu.

  13.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  FEddi-COMO
  Manuel Soriano manu@ctv.es
  29 de Junio de 1996  v0.5

  El siguiente documento deriva del famoso feddi.como que acompaa a los
  paquetes del FEddi+bt, y el que tienes ante t est basado en la
  versin 0.5.
  ______________________________________________________________________

  ndice General:

  1.      Crditos

  2.      Introduccin

  3.      Instalacin del FEddi

  3.1.    Instalacin del usuario fido .

  3.2.    Paquetes necesarios

  3.3.    Configuracin/instalacin del mailer .

  3.4.    Comprobacin y manejo.

  4.      Instalacin del Binkley.

  4.1.    Configuracion/instalacion del caller

  4.2.    Problemas

  4.3.    ``Templates''.

  5.      Mensajes-colaboraciones-trucos

  5.1.    futility

  5.2.    Peticin de ficheros ( FREQ ).

  5.3.    Direcciones usuales.

  5.4.    Scripts y tiles.

  5.5.    Automatizacin: El rea personal.

  5.6.    Unos cuantos `trucos' para los que no gustan de RTFM o no
  saben ingls.

  5.6.1.  Respondiendo correo.

  5.6.2.  ``Navegando'' por la base de mensajes.

  5.6.3.  Operaciones con ficheros

  5.6.4.  Para adecentar el aspectillo del Binkley:

  6.      Despedida y conclusin.

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Crditos

  El autor original del paquete FEddi es Oliver Graf, 2:2454/130.69, el
  porte original del bt a *nix es copyright (c) 1992, 1993 de Ben
  Stuyts, su adaptacin a LiNUX es copyright (c) 1993 de Louis
  Lagendijk, y la persona que ha hecho que ambos sean utilizables ha
  sido Manuel Soriano, manu@ctv.es.  El que ha pasado todo este tocho a
  HTML ha sido Francisco Jos Montilla, pacopepe@insflug.org

  2.  Introduccin

  Hola futuro contertulio con feddi y bt :-)

  Si te has decidido a instalar este paquete, toda mi enhorabuena. No es
  muy complicado, slo puede que tengas problemas de permisos. Los
  fuentes includos en este paquete ya han sido parcheados para que
  funcionen un poco mas fino.

  Tanto fmbedit como bt tienen pequeos problemas, no seas muy criticn
  y piensa que no has pagado nada por ellos. Contribuye, si corriges
  errores, no te los quedes para ti, comprtelos, envame parches o
  comentarios, de esta forma haremos que este soft vaya a ms. Un
  consejo: no lo uses desde X, la base de datos de terminales no est
  muy fina, me he propuesto corregirla, seguro que un da lo pondr como
  parche :-) (Antes deca que sera el prximo :-DDDDDDDDDDD)

  Tengo que agradecer :

    Alfonso Belloso : 2:344/17.2 (si me acuerdo bien)

    Jose Luis Sanchez : 2:346/207.17 (Este seguro)

    Pablo Gmez : 2:341/43.12 (Correcciones en este fichero y los
     scripts para la automatizacin del rea personal)

    Javier Ruberte : 2:346/401.50

    Jose Carlos Gutierrez : 2:341/45.17 (Scrits de compilacin de
     nodelist)

    Carlos Terrn : 2:345/402.23 (Parche para que ftoss reconozca
     maysculas/minsculas)

  Al final de este fichero encontrars unos cuantos mensajes, todos
  enviados con feddi, con algunos trucos.

  3.  Instalacin del FEddi

  3.1.  Instalacin del usuario fido .

  Vamos a instalar fido como usuario de correo, puedes darle otro
  nombre.

  Entremos en materia.

  En este documento cuando veas ~/ se refiere al home del usuario.

    fichero /etc/passwd

     Incluye la siguiente lnea :

       fido::2004:300::/home/fido:/bin/bash

    fichero /etc/group

     Incluye la siguiente lnea :

       fido::300:uucp,fido,root

  3.2.  Paquetes necesarios

  Necesitas :

    perl, haz

       ls /usr/bin/perl

  Si no existe, instlalo, discos D

    ncurses, haz

       ls /usr/lib/libncurses.a

  Si no existe, instlalas, discos D

  3.3.  Configuracin/instalacin del mailer .

  Vete al directorio /FEddi-0.9pl5

  1. Edita el fichero Makefile, en la variable SRCDIR pon el path donde
     estn tus fuentes, ej:

       SRCDIR=/root/trabajo/mailer/FEddi-dev

  2. En la lnea NODEPRG = aade al principio nlfunct.o sino, no
     compila.

  3. make

  4. Si tienes este error :

       ncurses.h: No such file or directory

  Haz :

       ln -s /usr/include/ncurses/curses.h /usr/include/ncurses/ncurses.h

  5.

       su root
       make install
       exit

  6. Parece que la utilidad de instalacin no copia las utilidades a su
     directorio, haz lo siguiente :

       cp utils/* ~/fnet/utility

  7. Hay que modificar unos cuantos ficheros :

    Fichero printmsg

       #!/bin/sh
       cat | $HOME/fnet/utility/formatmsg | lpr

    Fichero exportmsg

  #!/bin/sh
  if test $1 = "new"
    then
          cat | $HOME/fnet/utility/formatmsg > "$2"
    else
          cat | $HOME/fnet/utility/formatmsg >> "$2"
  fi

  8. El directorio fnet se compone de lo siguiente :

  Crate esos directorios y haz lo siguiente:

       chown -R fido.fido fnet

  9. Fichero de configuracin ~/.feddirc:

    Permisos 644

    Usuario/grupo fido.uucp

  ;
  ; This .feddirc was automatically created with config.user
  ;
  ; Profile Section
  ;
  PROFILE Manuel Soriano
  2:346/207.punto Nombre_de_net el_passwd outbound 2:*
  25:946/100.punto Nombre_de_otra_net el_passwd outbound 25:*
  93:346/101.punto Otro_nombre_de_Net el_passwd outbound 93:*
  END
  ; La pimera linea es tu direccion principal, las siguientes son sub-redes, el
  ; routado de la 25: y 93: se hace por la 2:
  ;
  ;
  ;
  ; Paths
  ;
  MsgBasePath  ~/fnet/msgbase/
  InboundPath  ~/fnet/inbound/
  OutboundPath ~/fnet/
  UtilityPath  ~/fnet/utility
  Log          ~/fnet/log/feddi.log 200
  CopyPath     ~/fnet/copy/
  NodelistPath ~/fnet/nodelist/
  ;
  ; Misc
  ;
  Packer       /usr/bin/zip -q -m -k -j %s %s
  ; Editor       /usr/bin/vi %s
  Beep         Yes
  AutoDelEmpty Yes
  KeepPKT      No
  KeepNL       Yes
  KeepBackups  No
  ShowAllAddr  Yes
  MaxMsgLength 64k
  QuoteLength 70
  ReplySubject No
  AskForOrigName Yes
  AutoNextFolder Yes
  ;
  ; End of .feddirc
  ;

  Puedes basarte en este fichero para configurar el tuyo, a m me fun
  ciona sin problemas.

  10.
     Fichero ~/fnet/nodelist/fnlcrc

  dial    34-6-   3
  dial    34-6
  dial    *

  pointlist       ptlstr34
  pointlist       eu_punto

  nodelist        region34
  nodelist        eu_nodos

  dial : Segn tu zona 34-6 (Valencia), 34-1 (Madrid), 34-3 (Barcelona),
  etc...

  Con pointlist las diversas listas de puntos, se pueden usar las listas
  de punto que nos vienen de las bbs sin transformar.

  Con nodelist las diversas listas de nodos, se pueden usar las listas
  de nodos que nos vienen de las bbs sin transformar.

  Nada ms.

  11.
     Compilar las nodelist/pointlist

     Yo uso los siguientes scripts, son sencillos y funcionan.

    fichero ~/fnet/nodelist/compila0 permisos 777

       #!/bin/bash
       unzip lista.zip
       mv EU_NODOS* eu_nodos
       mv EU_PUNTO* eu_punto
       mv PTLSTR34* ptlstr34
       mv REGION34* region34
       mv SNETLIST* snetlist
       mv SUBPTLST* subptlst

    fichero ~/fnet/nodelist/compila1 permisos 777

       #!/bin/bash
       rm fnlc.*
       fnlc

  Esto te compila las listas, si tienes problemas seguro que son de per
  misos, revisa tus ficheros, normalmente los binarios se instalan en
  /usr/bin

  3.4.  Comprobacin y manejo.

  Prueba de correo, Busca un paquete de correo que tengas por MS/DOS lo
  pones en el directorio ~/fnet/inbound y haces

       ftoss ; futility pack ; futility link

  Es de esta forma que tratars siempre tu correo en entrada, ftoss crea
  automticamente los folder correspondientes a tus reas.

       fmbedit

  Si todo va bien tendrs el correo correspondiente a ese paquete en tu
  pantalla :-)

  El editor es muy sencillo y muy bien documentado, se parece un poco al
  editor del fmail.

  Creas un mensaje en un rea o dos y haces :

       fscan

  Es de esta forma como tratars siempre tu correo en salida.

  4.  Instalacin del Binkley.

  4.1.  Configuracion/instalacion del caller

  1. Lo primero que tienes que hacer es :

     vete al directorio /bt

     haces

       make
       su root
       make install

  debers tener en /usr/bin:
       -rwxr-xr-x   1 root     fido       238983 Sep 15 18:04 /usr/bin/bt

  y en /usr/lib/binkley:

       -rwxr-xr-x   1 root     root          742 Sep 16 10:04 binkley.cfg
       -rw-r--r--   1 uucp     root          108 Sep 16 10:10 binkley.day
       -rw-r--r--   1 root     root        12332 Sep 15 16:20 binkley.lng
       -rw-r--r--   1 uucp     root          124 Mar 20  2029 binkley.scd
       -rwxr-xr-x   1 root     root        14423 Sep 15 16:20 btctl
       -rwxr-xr-x   1 root     root        13813 Sep 15 16:20 btlng
       -rwxr-xr-x   1 root     root        15649 Sep 15 16:20 english.txt
       -rwsr-xr-x   1 uucp     fido         1603 Sep 15 16:20 fido-toconv

  2. Fichero /usr/lib/binkley/binkley.cfg

       FEddiNodelist
       (1)Port 2
       (2)baud     38400
       LockBaud 38400
       (3)Init ATZ0|~AT&K6|~
       (4)Prefix ATDP
       PreDial ~
       PreInit |v``^``
       LogLevel 5
       LineUpdate
       Gong
       AutoBaud
       PollTries 10
       PollDelay 600
       Unattended
       BoxType 0
       NiceOutBound
       ReadHoldTime 1
       (5)System seudonimo_fido
       (6)Sysop tu_nombre
       StatusLog    /home/fido/fnet/log/binkley.log  200
       Downloads    /home/fido/fnet/inbound/
       CaptureFile  /home/fido/fnet/log/session.log
       NetFile      /home/fido/fnet/inbound/
       Hold         /home/fido/fnet/outbound/
       Nodelist     /home/fido/fnet/nodelist/
       (7)Address 2:346/207.XX@FidoNet.org 5207 tel_del_boss
       (8)Key !palabra_paso 2:346/207
       (9)Domain FidoNet.org outbound
       Address 25:946/100.XX@EuroNet.org
       Key !palabra_paso 25:946/100
       Domain EuroNet.org outbound
       Address 93:346/101.XX@SubNet.org
       Key !palabra_paso 93:346/101
       Domain SubNet.org outbound

  Te puedes basar en este fichero, slo tienes que adaptarlo a tus
  necesidades y quitar los (numerito).

    (1), lnea que vas a utilizar 1 COM1, 2 COM2, etc... (*)

    (2), velocidad del puerto, 19200 si es una 16450

    (3), cadena de inicializacin de tu modem

    (4), prefijo de llamada para tu bbs, ej : ATDP (pulso) o ATDT
     (tono)

    (5), Tu seudonimo como aparece en la pointlist, sin los _

    (6), Tu nombre tal y como aparece en la pointlist, sin los _

    (7), Tu direccion fido principal fakenet telefono_de_la_bbs

    (8), Tu palabra de paso y el boss, no te olvides de poner un ``!''
     delante de tu palabra de paso.

    (9), Subdominios, de tenerlos, se rigen por las mismas reglas que
     tu dominio principal.

    (*)  Puedes utilizar el 5, con ese abrirs /dev/modem, normalmente,
     /dev/modem es un symlink que apunta a /dev/cua0 o /dev/cua1, (ln -s
     /dev/cua1 /dev/modem) por lo menos es as como lo tengo...

  3. Incluye la siguiente linea en tu ~/.profile

       export BINKLEY=/usr/lib/binkley

  haz

       \&. ~/.profile

  (esto slo lo hars esta vez, la prxima vez que entres como fido ya
  tendrs la variable BINKLEY inicializada)

  4. Ejecuta

       bt

  4.2.  Problemas

  Si tienes problemas, seguro que son de permisos o path mal definidos,
  revsalos.

  1. El error ms comn es :

       cannot re-open logfile

  El propietario normalmente es : usuario.uucp.

  Los permisos : 664

  2. Otro error bastante comn :

     Aqu te puede pasar que el tty que le has habilitado no tenga
     permisos adecuados, sobre todo si ste ha sido usado por el getty,
     normalmente debe tener permiso de lectura/escritura para todo el
     mundo.

     El error es :

       tty port can not be initialised

  Solucin:

       chmod 666 /dev/ttyS0

  o ttyS1; (COM1: o COM2:).

  3. Para los que tengan RedHat :

       ln -s /var/spool /usr

  Si te aparece una pantalla parecida al frodo puedes hacer lo siguiente
  :

  ALT-Y, llamar a tu bbs, dejar tu correo y coger el que tengas en
  ella.  Luego slo tienes que ejecutar los comandos, ya vistos, para
  tratar el correo.

  Si durante la transmisin del PRIMER fichero tienes la impresin de
  que se queda ``dormido'', aprieta la tecla ESC y se ``despertar''.

  4.3.  ``Templates''.

  Este es mi fichero de templates $FNET/msgbase/template:

  #if to (AreaMgr|FileScan)
  #;
  #; ********** Handling von AreaMgr- and FileScan-Mails **********
  #;
  #else
  #if group (--InterNet--)
  #;
  #; ********** Handling von Internet-Mails **********
  #;
  Como vas #1E!

  #if mode (reply)
  In <#a> #f wrote:
  #.
  #quote
  #else
  #.
  #endif

  Greetings,
    Manu

  #|insertfortune
  #else
  #;
  #; ********** Handling von sonstigen Mails **********
  #;
  Hola #1E!

  #if mode (reply|forward)
  #if mode (netreply)
  En el dia de gloria #d, #f dijo a #e
  en #a acerca de "#s":
  #.
  #quote
  #endif
  #if mode (^reply)
  El #d Escribia #f a #e
  acerca de "#s":
  #.
  #quote
  #endif
  #if mode (forward)

  Aunque no lo parezca esto es forward
   * Mensaje de #f a #e
   *         en #d al #t
   *         acerca de "#s"
   *         en #a
                                        ,,,
                                       (o o)
  ---------------------------------oOO--(_)--OOo------------------------------

  #text

  ----------------------------------------------------------------------------
  #endif
  #else
  #.
  #endif

  #if group (--Intern--|^$)
  #if from Manuel Soriano
  Bye,
    Manu

  #|insertfortune
  #else
  Bye,
    #1F
  #endif
  #else
  Bye,
    #1F
  #endif
  #endif
  #endif

                  \|/
                  0-0         dpsys10@dapsys.ch
      *****---oOo-(_)-oOo---**********************************************
      * Manuel Soriano             * El Perello/Valencia/Spain *

  Cuando tengas tus directorios de reas creados, podrs crear un
  fichero originen cada uno de ellos, donde ponerle una o varias lineas
  (no mas 70 char.) para los origin de tus mensajes.

  5.  Mensajes-colaboraciones-trucos

  A partir de aqu pongo cosas que me han mandado los propios usuarios
  de fido.

  5.1.  futility

       ------------------------------------------------------------------------------
       Message Number 1 from area R34.LINUX
       ------------------------------------------------------------------------------
       From: Jesus Gambero (2:345/201.3)
       From: All
       Subj: FEddi
       Send: 25 Nov 95  15:43:57
       ------------------------------------------------------------------------------
       Hola All.

       De momento el FEddi no viene demasiado documentado, asi que, despues de
       algunas pruebas, por fin puedo hacer el mantenimiento de la base de mensajes.

               futility tool delete "age+15&&protect-&&new-" R34.LINUX
               futility pack

       Con esto estamos borrando los mensajes con mas de 15 dias que no esten
       protegidos y que ademas ya hayan sido leidos.
       Si no poneis el nombre del area se tratarian todas. Lo que ocurre es que hay
       algunas areas que dejo mas dias, lo que me obliga a poner una linea por cada
       una, personalizandola a mi gusto.

       Saludos.

       --- FEddi 0.9pl5 via BinkleyTerm
        * Origin: Mensaje escrito y enviado bajo Linux, NATURALMENTE!!
       (2:345/201.3)

  5.2.  Peticin de ficheros ( FREQ ).

       ------------------------------------------------------------------------------
       Message Number 4 from area R34.LINUX
       ------------------------------------------------------------------------------
       From: Javier Hernandez (2:346/207.48)
       From: ALL
       Subj: FILE REQUEST
       Send: 07 Dec 95  06:15:45
       ------------------------------------------------------------------------------
       Hola ALL!

       He estando haciendo pruebas para conseguir lo del RE: con el soft de Linux y
       ya he bajado mi primer fichero. Paso a explicar como lo he hecho por si sirve
       para alguien y ademas por si lo hago mal que alguien me pueda corregir.

       Primero escribo un Net normalmente a mi Sysop. Cuando he terminado de escribir
       el mensaje salgo de el (Alt+x).
       Estando sobre el mensaje, pulso (Alt+g) y se me abre una ventanita que
       presenta unos datos. Una vez ahi pulso "Ins" y escribo el nombre del fichero
       que deseo bajar; cuando termino pulso "Esc".
       Con esto ya debe funcionar, la proxima vez que llames te bajara el fichero.
       Al menos a mi me ha funcionado asi.

       Algun comentario?

       Bye,
         Javier

                           fjherna@ibm.net                    _\|/_
           ***********************************************-----(O)---****
           * Javi(Canary)                              * Valencia/Spain *

       --- FEddi 0.9pl5 via BinkleyTerm
        * Origin: RAMERA: persona que comercia con su RAM. (2:346/207.48)

  5.3.  Direcciones usuales.

  ------------------------------------------------------------------------------
  Message Number 6 from area R34.LINUX
  ------------------------------------------------------------------------------
  From: Javier Hernandez (2:346/207.48)
  From: Manuel Soriano
  Subj: Prueba de envio.
  Send: 11 Dec 95  23:58:55
  ------------------------------------------------------------------------------
  Hola Manuel!

  El 07 Dec 95 Escribia Manuel Soriano a Javier Hernandez
  acerca de "Prueba de envio.":

   MS> Pues me ha llegado correctamente, al area correcta, ya nos diras
   MS> como lo has realizado, a ver si al final nos escribes un
   MS> feddi.como :-)
   Pues mira he puesto un fichero llamado "names" en el /home/fido/fnet/msgbase,
  que en tu caso puede ser parecido. El fichero de amarras contiene lo
  siguiente:
  -------------------------empieza aqui-------------------------------------
  *fj,Javier Hernandez,2:346/207.48
  *fm,Francisco Moreno,2:346/207.1
  *ap,Alfonso Perez-Almazan,2:346/207.2
  *vk,Viktor Martinez,2:346/207.4
  *sz,Salvador Zarzo,2:346/207.6
  *el,Eduardo Lluna Gil,2:346/207.8
  *bs,Bernardino Soldan,2:346/207.10
  *ms,Manuel Soriano,2:346/207.14
  *js,Jose Luis Sanchez,2:346/207.17
  *jv,Jose Villanueva,2:346/207.28
  *am,Alberto Mendoza,2:346/207.44
  *pe,pepsales@portables.com,2:342/3
  *am,areamgr,2:346/207
  *rt,rtorres@gimn.upv.es,2:342/3
  ----------------------------corta aqui-----------------------------------
  con esto lo que ocurre es que al insertar un net, en lugar de escribir el To:
  apretas el "Avpg" o "Repg" y te van saliendo los distintos nombres. Como veras
  yo incluso he anyadido alguna direccion de internet que uso a veces. el primer
  campo creo que son como teclas abreviadas para hacer una llamada directa a esa
  linea. No recuerdo ahora como se hace pero es facil y esta en el man feddi.

  No se si me falta por decir algo. Si te parece buena la informacion pon algo
  en el feddi.como; si crees que falta algo dimelo y te paso lo que haga falta.

  Talavista.

  Bye,
    Javier

               fjherna@ibm.net
               fj.chicha@p48.europa3.encomix.com         _\|/_
      ***********************************************-----(O)---****
      * Javi(Canary)                              * Valencia/Spain *

  --- FEddi 0.9pl5 via BinkleyTerm
   * Origin: RAMERA: persona que comercia con su RAM. (2:346/207.48)

  5.4.  Scripts y tiles.

  ------------------------------------------------------------------------------
  Message Number 11 from area R34.LINUX
  ------------------------------------------------------------------------------
  From: Jose Carlos Gutierrez (2:341/45.17)
  From: all
  Subj: Feddi-como, Scripts
  Send: 26 Dec 95  11:42:31
  ------------------------------------------------------------------------------
  Hola all!

          Estos son los ficheros que uso para la automatizacion del correo.

  fichero /usr/local/bin/fido
  #!/bin/bash
  pushd ~/fnet/inbound
  if [ -f snetlist.a* ] ||
     [ -f subptlst.a* ] || [ -f region34.l* ] || [ -f ptlstr34.l* ]; then
        ~/fnet/nodelist/compilar
  fi
  ftoss
  futility link
  fmbedit
  fscan
  futility pack
  popd

   |------------|
  fichero ~/fnet/inbound/.minusculas
  (lo del punto es para que no se pase asi mismo a minusculas)

  #!/usr/bin/perl
  while ($nombre = <*>) {
     $nuevo_nombre = $nombre;
     $nuevo_nombre=~ tr/A-Z,/a-z,/;
     print "$nombre -> $nuevo_nombre \n";
     rename($nombre,"$nuevo_nombre"); }
   |------------|
  fichero ~/fnet/nodelist/compilar

  #!/bin/bash
  # fichero para compilar la nodelist
  pushd ~/fnet/nodelist
  if [ -f ~/fnet/inbound/ptlstr34.l* ]; then
          rm ptlstr34*
          unpack ~/fnet/inbound/ptlstr34.l*
  fi
  if [ -f ~/fnet/inbound/region34.l* ]; then
          rm region34*
          unpack ~/fnet/inbound/region34.l*
  fi
  if [ -f ~/fnet/inbound/snetlist.a* ]; then
          rm snetlist*
          unpack ~/fnet/inbound/snetlist.a*
  fi
  if [ -f ~/fnet/inbound/subptlst.a* ]; then
          rm subptlst*
          unpack ~/fnet/inbound/subptlst.a*
  fi
  # aqui lo que hago es insertar la linea de mi Boss para que llame el bt con
  # ctrl + y ( seguro que es la forma mas dificil de hacerlo! pero no se otra)
  grep -i -B 4000  'Boss,2:341/45' ptlstr34.* > /tmp/file1
  grep -i -A 4000  'Boss,2:341/45' ptlstr34.* > /tmp/file2
  grep -v 'Boss,2:341/45' /tmp/file2 > /tmp/file3
  rm ptlstr34.*
  cat /tmp/file1 > ptlstr34
  # esta linea la teneis que ajustar a vuestro sistema
  echo ",0,Ma~ana_Remoto,Madrid,Rafa,34-1-6463023,9600,CM,V34,VFC" >> ptlstr34
  cat /tmp/file3 >> ptlstr34
  rm /tmp/file1
  rm /tmp/file2
  rm /tmp/file3
  #
  rm -f ~/fnet/inbound/ptlstr34*
  rm -f ~/fnet/inbound/region34*
  rm -f ~/fnet/inbound/snetlist*
  rm -f ~/fnet/inbound/subptlst*
  rm fnlc.*
  fnlc
  popd

  Saludos,
                  Guti.

  --- FEddi 0.9pl5 via BinkleyTerm
   * Origin: THE GANG TM (2:341/45.17)

  5.5.  Automatizacin: El rea personal.

  ------------------------------------------------------------------------------
  Message Number 1358 from area R34.LINUX
  ------------------------------------------------------------------------------
  From: Pablo Gomez (2:341/43.40)
  From: All
  Subj: Area personal en FEDDI, la refinitiva ;-)
  Send: 24 Jun 96  00:35:31
  ------------------------------------------------------------------------------
  Hola All!

  Bien, desde hace un tiempo estamos venga a darle vueltas a la posibilidad de
  disponer en  FEDDI de un area personal que permita recibir en ella los
  mensajes dirigidos a nosotros, recibidos en cualquier area, y sobre todo (ya
  que lo anterior no es complicado) el poderlos responder comodamente,
  enviandolos 'de regreso' a sus areas originales.

  Con estos script que siguen, al menos Francisco Jose Montilla y el que
  suscribe lo hemos conseguido.

  En primer lugar, se trata de crear el area que luego va a servir como
  PERSONAL. Esto se puede hacer del siguiente modo:

  (Como usuario fido)

  $ cd ~/msgbase
  $ mkdir +PERSONAL
  $ cp +R34.LINUX/* +PERSONAL/

  (PERSONAL es el nombre que quereis dar al area personal) Comprobad que los
  permisos y duenios del nuevo directorio y los archivos que contiene son
  iguales a los que teneis en otras areas. Corregidlo si no es asi.

  Despues, de cara a vaciarla de mensajes, haced:

  $ futility "+delete" "all+" PERSONAL
  $ futility pack PERSONAL

  Si volveis a invocar fmbedit, vereis que teneis un nuevo area, llamado...
  PERSONAL! :-) Magia? :-)

  Ahora ya tenemos la base. Siguiente parte: Copiar los mensajes que llegan al
  sistema, nuevos, y a nuestro nombre. Esto se hace (casi) automaticamente.

  Si creamos un archivo asi:

                                        ,,,
                                       (o o)  File: ~/msgbase/tosspath
  ---*reiss*------*schnippel*------oOO--(_)--OOo-------*knabber*-----*fetz*---

  copy    t"Pablo Gomez" PERSONAL

  ---*reiss*------*schnippel*--------------------------*knabber*-----*fetz*---

  Ya estaria. Evidentemente, habreis de sustituir mi nombre (Pablo Gomez) por el
  vuestro y PERSONAL por el nombre de vuestro area personal. Cada vez que
  corramos ftoss, este se va a encargar de copiar al area personal los mensajes
  dirigidos a nosotros.

  Aqui merece la pena hacer un comentario. Y es que esto va a copiar tambien los
  mensajes a nuestro nombre recibidos en NETMAIL. A mi parecer, esto es un
  absurdo, ya que realmente el area NETMAIL ya es un area personal. Hasta donde
  se, no es posible modificar el comando para que no los copie. Por ello mas
  adelante tendremos que hacer un pequenio ajuste.

  Esto es un trozo (el importante ;-)) del script que corro al recibir correo.
                                        ,,,
                                       (o o)  File: ~/bin/mimport
  ---*reiss*------*schnippel*------oOO--(_)--OOo-------*knabber*-----*fetz*---
  #!/bin/sh

  # Para la gestion del area personal
  PERSAREA=PERSONAL

  # Importar correo
  ftoss

  #
  # Feeding area personal
  # Acabamos de repartir los mensajes, generando los duplicados necesarios
  # en PERSONAL. Sin embargo, deseamos borrar los mensajes recin copiados al
  # area PERSONAL que provienen del area de NETMAIL
  #
  futility tool "+delete" \
    "new+&&text+\*\*\* ftoss: copied from NETMAIL" $PERSAREA

  # reconstruir threads
  futility pack
  futility link

  #[...]
  ---*reiss*------*schnippel*--------------------------*knabber*-----*fetz*---

  Tened cuidado: la linea 'futility tool ...' y la "new..." son una sola. El
  cometido es borrar esos mensajes de NETMAIL innecesarios.

  Seguimos. Ahora el modo de manejo. En el area PERSONAL tengo mensajes que
  contienen una linea tal que:

  *** ftoss: copied from R34.LINUX

  (por ejemplo) :-)

  Contesto (sobre el mismo area PERSONAL) el mensaje sin preocuparme de nada,
  _EXCEPTO_ de no borrar esa linea, que posteriormente servira de 'testigo' para
  que el mensaje se conteste en el area adecuada.

  Luego, cuando exporto correo, corro el siguiente script:
                                        ,,,
                                       (o o)  File: ~/bin/mexport
  ---*reiss*------*schnippel*------oOO--(_)--OOo-------*knabber*-----*fetz*---
  #!/bin/sh

  USER_BIN_DIR=/home/fido/bin
  LOCAL_BIN_DIR=/usr/local/bin
  # Nombre del area personal
  PERSAREA=PERSONAL

  # Nombre del usuario
  USERNOM="Pablo Gomez"

  # Archivo temporal de salida
  OUTFILE=/tmp/persanswr

  # Extraccion de mensajes del area personal que esten pendientes de proceso
  # y posterior marcado como 'sent'
  #
  futility tool "display" "attribute-se&&from+Pablo Gomez" $PERSAREA > $OUTFILE
  futility tool "+se" "attribute-se&&from+Pablo Gomez" $PERSAREA
  # distribucion a las nuevas areas...
  awk -f $USER_BIN_DIR/persreply.awk < $OUTFILE

  # scan de la base de mensajes
  #
  $LOCAL_BIN_DIR/fscan
  ---*reiss*------*schnippel*--------------------------*knabber*-----*fetz*---

  Y la linea del 'awk' incluye un fichero persreply.awk que es este:

                                        ,,,
                                       (o o)  File: ~/bin/persreply.awk
  ---*reiss*------*schnippel*------oOO--(_)--OOo-------*knabber*-----*fetz*---

  BEGIN   {
  #
  # Tocar aqui si es necesario
  # ATENCION: Vigilar tambien las instrucciones de los bloques marcados con
  # "####":
  #  necesitaran configuracion igualmente.
  #
          outputfile="/tmp/tmpreply"
  #
  #
  # de aqui en adelante, se supone que no sera necesario, mas que en el bloque
  # marcado con "###
  #
          borracmd=sprintf("rm -f %s", outputfile)
          replyarea=""
          estado=1
          system(borracmd)
          }

  # Solo es valido la primera vez que se encuentra en cada mensaje
  # Evitamos que se copie, para que no llegue a otro sistema que
  # pudiera estar usando el mismo sistema
  /\*\*\* ftoss: copied from /{
          if (estado==1) {
                  viejoestado=2
                  estado=3
                  replyarea=$NF
  ### Modificar:

          print "*** pers_area: Copiado desde area PERSONAL" >> "/tmp/tmpreply"
          }
          }

  /^#To: / {
          user=""
          for (n=2; n <= NF; n++)  {
                  user=sprintf("%s %s ",user,$n)
          }
          }
  # Evitaremos que se escriban las lineas siguientes:
  /^#Area: / {
          viejoestado=estado
          estado=3
          }

  /^#@To: / {
          viejoestado=estado
          estado=3
          }

  # siempre, excepto en los casos descritos arriba...
  estado != 3{
  #####
  #
  # ATENCION!: Modificar igual que arriba.
  #  Siento la chapucilla, pero no he conseguido resolverlo.
  #
          print $0 >> "/tmp/tmpreply"
          }
  # Reponer el estado anterior
  estado==3 { estado=viejoestado }

  /^###MESSAGE_END###/{
          if (estado==2) {
                  close (outputfile)
                  comando=sprintf("cat %s | futility addmsg %s",outputfile,
  replyarea)
                  system(comando)
                  system(borracmd)
                  estado=1
                  replyarea=""
          }
          }

  END     {
          system(borracmd)
          }
  ---*reiss*------*schnippel*--------------------------*knabber*-----*fetz*---

  Tened cuidado: hay lineas cortadas (se ven) y hay una doble chapucilla que no
  he sabido resolver. En vez de definir arriba todas las variables, hay una,
  outputfile, que he tenido que redefinir a mitad de script, como constante, ya
  que no he sabido hacerlo mejor. He intentado pasar una variable,
  entrecomillada de distintas formas o no... y no lo consigo. Quiza alguno nos
  eche una mano.

  Esta probado con varios mensajes simultaneos, aunque creo que de momento no he
  fallado nunca cargandome la linea del ***ftoss...

  Para la proxima. Espero que os sea util. Estare encantado de recibir
  comentarios, mejoras, etc.

  Saludos,
  Pablo GOMEZ
  pgomez@p12.laereas.encomix.com

  --- FEddi 0.9pl5 via BinkleyTerm
   * Origin: Puntomatico Remoto. Linux en Hoyo de Manzanares (2:341/43.40)

  5.6.  Unos cuantos `trucos' para los que no gustan de RTFM o no saben
  ingls.

  5.6.1.  Respondiendo correo.

    Para responder normalmente, al From: en el mismo rea, Alt+r

    Para responder al To: en el mismo rea del mensaje: Ctrl+r.

    Para responder por net al From del mensaje: Alt+n

    Para responder por net al To del mensaje: Ctrl+n

     Para poder hacer esto ltimo, el destinatario deber estar en la
     pointlist, si no, ya vers que no sucede nada.

  5.6.2.  ``Navegando'' por la base de mensajes.

    Para ver un listado de los mensajes del rea, pulsa Alt+l; si
     entonces le das a la tecla de movimiento de cursor hacia la
     derecha, cambias a la lista de reas.

    Para poder seguir el thread o hilo de una conversacin, en funcin
     de su Re:, debers pulsar la tecla Tab, vers un listado similar al
     que aparece en el punto anterior. Si le sigues dando, irs
     cambiando las referencias a los mensajes enlazados.

     Sabrs que existen mltiples mensajes enlazados (esto es lo que
     hace el futility link) por un mismo Re: por unos cdigos amarillos
     que aparecern en la esquina superior derecha de la pantalla, en la
     zona correspondiente a la cabecera del mensaje.

  5.6.3.  Operaciones con ficheros

    Para hacer un File Attach, o envo de un fichero ``enganchado'' a
     un mensaje netmail, una vez se ha escrito el destinatario y el
     tema, teclea Alt+y, y seguidamente f; luego Alt+j y pulsa Tab;
     podrs ``navegar'' hasta el fichero.

     Esto ltimo del Tab se aplica a todas las operaciones relacionadas
     con ficheros (insertar fichero, exportar mensaje a fichero, etc...)

  5.6.4.  Para adecentar el aspectillo del Binkley:

    Crea el siguiente fichero, y ejectalo en lugar del bt:

     Fichero /usr/bin/bbs

       echo -e "\033(U"
       /usr/bin/bt
       echo -e "\033(B"

    Teclea la orden:

  chmod 755 /usr/bin/bbs

    Edita el /usr/lib/binkley/binkley.cfg y cambia el valor de la lnea
     BoxType a 3:

       [...]
       BoxType 3
       [...]

  6.  Despedida y conclusin.

  Bueno esto es todo, que te lo pases bien y nos leemos por fido.

  No te olvides :

  Mandame comentarios, modificaciones que tengas para este soft, los
  insultos pasalos a /dev/null :-)

  Bye,

  Manu

  7.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Ftp Annimo COMO
  Rodolfo Garca Peas, kix@mad.servicom.es
  v1.0-Sayaka, 1 Septiembre 1998

  Este COMO describe cmo instalar, configurar y mantener un servidor
  ftp de una manera fcil y rpida.
  ______________________________________________________________________

  ndice General:

  1.      Editor.

  1.1.    Copyright y cosas de esas.

  1.2.    Dedicatorias ;-).

  1.3.    Colaboraciones.

  1.4.    Realizacin.

  2.      Requisitos.

  3.      Instalacin.

  4.      Configuracin.

  4.1.    Cuenta de usuario.

  4.2.    /etc/ftpusers

  5.      La shell.

  6.      El directorio del ftp.

  6.1.    /home/ftp

  6.2.    /home/ftp/bin

  6.3.    /home/ftp/etc

  6.4.    /home/ftp/lib

  6.5.    /home/ftp/pub

  6.5.1.  /home/ftp/pub/incoming

  7.      El arranque.

  8.      Los archivos a ofrecer.

  9.      Configuracin avanzada.

  9.1.    El archivo ftpaccess .

  9.1.1.  Mensajes.

  9.1.2.  Informacin del servidor de ftp.

  10.     Accesos.

  10.1.   Modificacin de archivos.

  10.2.   Archivos no bajables.

  10.3.   Subidas al servidor.

  10.4.   El archivo ftpconversions .

  11.     Puntos clave a recordar.

  12.     Archie.

  13.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Editor.

  La idea inicial de escribir este documento ha sido sin duda el irc.
  Hay mucha gente que entra y dice que quiere poner un servidor ftp
  corriendo en su sistema y claro est que eso no se hace en 10 minutos.

  1.1.  Copyright y cosas de esas.

  Este como ha sido escrito por Rodolfo Garca (anda!! si soy yo!!),
  pero simplemente para mantener una misma lnea de trabajo me gustara
  que si hay que hacer modificaciones de algo, se me indique y yo muy
  gustosamente lo hara. Esto permitir que dentro de 2 aos nos
  encontremos con 16 Cacho-A-Ftp-Anonimo-HowTo incompletos y se tenga
  que perder un tiempo para organizarlo. Por otro lado no me hago
  responsable de los posibles problemas, prdidas, ... de datos o de
  seguridad por seguir este Como.

  1.2.  Dedicatorias ;-).

  Pues si, este ftp va dedicado a todo el mundo del canal #linux de irc-
  hispano, a los que trabajan por Linux en Espaa, en especial a Ismael
  Olea, Paco Pepe Pukka :-) (ehh y a su preciosa Viki :-P), a Juan Jos
  Amor Iglesias y a Ramn Gutirrez/, CamuS :-).

  A Sayaka, una gran amiga de la cual no creo pueda nunca olvidarme, por
  ello este como lleva su nombre en el principio (v1.0-Sayaka).

  Por otro lado quiero saludar a mis compaeros y amigos de universidad
  (http://www.upco.es).

  1.3.  Colaboraciones.

  En especial, quiero dar las gracias a Ignacio Arenaza, que me permiti
  hacer unos ajustes a este COMO y a Francisco Jos Montilla, el cual me
  corrigi dos errores muy gordos.

  1.4.  Realizacin.

  Para editar este COMO, no he seguido nada, lo he escrito desde el
  principio con lo que saba, con mi poca experiencia y mirando manuales
  y dems. Una vez escrito, lo he complementado, ajustado,... con la FAQ
  sobre ftp annimo que ha escrito Christophe R. Klaus (cklaus@iss.net).

  2.  Requisitos.

  1. Tener instalado Linux, con un kernel 2.0.x (al menos), pero no he
     probado con menos, se aceptan reclamaciones.

  2. Tener un paquete de ftp apropiado, en mi caso instalar wu-ftp en
     Debian, aunque lo explicar para todas las distribuciones.

  3.  Instalacin.

  La instalacin en las distintas distribuciones es muy variable, pero
  todas se basan en lo mismo. Por ello empezar en Debian que es la que
  yo uso, y pasar a RedHat y SlackWare hasta donde vea que puedo.

  En Debian es muy fcil, buscamos donde tenemos el paquete, y
  ejecutamos lo siguiente:

       dpkg -i "nombre de paquete"

  En mi caso, sera:

       dpkg -i wu-ftpd-academ_2.4.2.16-9.deb

  Una vez realizado esto, se nos preguntarn unas cuestiones.

       Do you want to set up or update an anonymous FTP account now? [n]

  Esta pregunta nos indica si queremos crear una cuenta de ftp annimo
  en este momento. Nosotros indicaremos que s, puesto que queremos una
  configuracin de este tipo, pero si no la deseamos decimos que no y no
  ocurre nada ms.

  Al decir que s, nos pregunta de nuevo:

       Enter the name of the FTP home directory: [/home/ftp]

  Debemos indicar dnde situaremos el directorio por defecto del ftp,
  por defecto /home/ftp , donde nosotros lo dejaremos.

       /home/ftp does already exist, should I use it? [n]

  Diremos que s para crear el directorio raz del ftp. La siguiente
  pregunta, ser si deseamos crear un directorio para permitir que nos
  suban cosas, nosotros diremos que s, aunque luego se explicar cmo
  configurarlo para activar o desactivar esta cuestin.

  Con todo esto, tendramos instalado el ftp, pero queda configurarlo.

  Para comprobar que est correcto, realizaremos lo siguiente:

       <kix@hell>$ ftp 127.0.0.1
       Connected to 127.0.0.1.
       220-Welcome, archive user [unknown]@localhost !
       220-
       220-The local time is: Mon Jul 27 22:04:24 1998
       220-
       220-This is an experimental FTP server.  If have any unusual problems,
       220-please report them via e-mail to <root@hell.darkness.org>.
       220-
       220-If you do have problems, please try using a dash (-) as the first
       220-character of your password -- this will turn off the continuation
       220-messages that may be confusing your ftp client.
       220-
       220 hell.darkness.org FTP server (Version wu-2.4.2-academ[BETA-16](1) Sat
       May 23 19:56:02 CEST 1998) ready.
       Name (127.0.0.1:root):

  Si est usando RedHat, Slackware o cualquier otra distribucin, no se
  preocupe, posteriormente se indicar cmo configurar todo a mano. Aun
  as, indicare como se instala:

       rpm -i "nombre_del_paquete_ftpd.rpm"
       rpm -i "nombre_del_paquete_anon-ftp.rpm"

  Esto es debido a que son dos paquetes, el del ftp annimo, que en
  RedHat 5 se llama anonftp-2.5-1.i386.rpm y el del demonio avanzado de
  ftp, para nosotros el wu-ftpd, wu-ftpd-2.4.2b16-4.i386.rpm.

  SlackWare:

       tar -xvzf "nombre_del_paquete.tgz"

  4.  Configuracin.

  La configuracin de un ftp es cosa fcil, pero debemos estar atentos
  por la seguridad del sistema.

  4.1.  Cuenta de usuario.

  Lo primero ser aadir el usuario ftp, que en Debian se ha creado;
  pero deberamos repasar como est, en RedHat tambin aparece, pero en
  SlackWare no se crea. Para ello editaremos el archivo /etc/passwd y
  miraremos si tenemos una lnea parecida a esta:

       ftp:*:100:101::/home/ftp:/bin/false

  Si no fuera as, la crearamos.

  1. ftp:  sera el nombre de usuario. (Fjese que siempre es ftp, sin
     distincin del nombre del servidor de ftp --- wu-ftpd en nuestro
     caso --- ).

  2. *: Anulamos la capacidad de acceso shell al sistema del usuario
     ftp. Como el demonio ftp necesita una, le pondremos una falsa, de
     este modo el acceso al sistema como usuario ftp queda estrictamente
     limitada a la funcin de ejecutar el demonio.

  3. 100:      UID de usuario, puede variar.

  4. 101: Grupo del usuario, que es variable tambin.

  5. /home/ftp:  Este es el directorio raz del ftp para el usuario
     anonymous. Si en este campo apareciera "/" compartiramos todo
     nuestro linux, muy inseguro. En el caso de usuarios del sistema, el
     directorio home sera el del usuario en cuestin.

  6. /bin/false: Este ser el nombre del shell a ejecutar.  Como
     queremos limitar el acceso shell del usuario ftp, pero el demonio
     ftp necesita una shell que exista ponemos /bin/false, asegurndonos
     de que exista. Si no es as, la creamos:

       #!/bin/sh
       exit 1

  Los permisos recomendables para este fichero son rwxr-xr-x.

  Adems, esta shell ha de aparecer listada en el fichero /etc/shells,
  por lo que la habremos de aadir si no lo est.

  4.2.  /etc/ftpusers

  Lo segundo es restringir los nombres de usuario que nunca deben entrar
  al ftp. Para ello editaremos el archivo /etc/ftpusers e introduciremos
  los que queramos:

    # /etc/ftpusers: list of users disallowed ftp access. See ftpusers(5).

    root
    daemon
    bin
    sys
    .....

  Con esto cuando un usuario incluido en este archivo intente entrar, el
  acceso le ser denegado.

  Si mantenemos un servidor para distintos usuarios, cuando se
  introduzca un nombre y un password vlido, el usuario aparecer en su
  directorio $HOME, y podr acceder a aquellas partes del sistema a las
  que tendra acceso por shell.

  Si no queremos que acceda al servidor por ftp, aadiremos su nombre de
  usuario a este archivo.

  5.  La shell.

  El shell de usuario debe aparecer en /etc/shells pero si no aparece no
  ocurre nada y adems deber tener en cuenta que la restriccin de no
  ponerlo no aumenta la seguridad.

  6.  El directorio del ftp.

  El directorio /home/ftp en nuestro caso debe cumplir lo siguiente,
  para que sea seguro:

  6.1.  /home/ftp

  El directorio raz del ftp (/home/ftp) debe ser propiedad del usuario
  root y con acceso de escritura prohibido al resto de usuarios, pero s
  de ejecucin para todos (chmod 555)

  Como ejemplo:

       dr-xr-xr-x   6 root     root          1024 Jul 19 21:16 ftp

  Es importante saber que algunas revistas, y manuales sobre ftp
  recomiendan que el usuario propietario de /home/ftp sea ftp, pero esto
  es un error enorme si queremos tener un servidor seguro.

  6.2.  /home/ftp/bin

  El directorio /home/ftp/bin debe ser propiedad del root y sin acceso
  de escritura al resto de los usuarios. Como ejemplo:

       d--x--x--x   2 root     root         1024 Jul 27 21:48 bin

  Dentro de este directorio, los archivos que tendremos sern todos los
  ejecutables, en mi caso son:

       ---x--x--x   1 root     root        15204 Oct 24  1997 compress
       ---x--x--x   1 root     root        46324 Nov  6  1997 cpio
       ---x--x--x   1 root     root        45660 Jul 27 21:48 gzip
       ---x--x--x   1 root     root        29404 Jul 27 21:48 ls
       ---x--x--x   1 root     root        62692 Oct 20  1997 sh
       ---x--x--x   1 root     root       103968 Jul 27 21:48 tar

  Como se puede ver todos ellos son pertenecientes a root y con permisos
  de slo ejecucin para todo el mundo (modo 111). Los comandos de este
  directorio son los mismos que usamos en nuestro sistema, por ejemplo
  "ls", los copiamos aqu si no los tenemos y les aplicamos los
  permisos.

  6.3.  /home/ftp/etc

  El directorio /home/ftp/etc tendr permiso de solo ejecucin y ser
  propiedad de root:

       d--x--x--x   2 root     root         1024 Jul 27 23:42 etc

  Los archivos siguientes son los que tendremos en este directorio:

       -r--r--r--   1 root     root           18 Jul 27 21:48 group
       -r--r--r--   1 root     root         8376 Nov  6  1997 ld.so.cache
       -r--r--r--   1 root     root           44 Jul 27 21:48 passwd
       -r--r--r--   1 root     root          172 Jul 19 21:16 pathmsg

  Todos los archivos deben ser de slo lectura (modo 111).

  Tanto el archivo group como el archivo passwd de este directorio deben
  contener la informacin mnima posible. Un ejemplo claro sera:

  passwd:

       root:*:0:0:root::
       ftp:*:10::Anonymous FTP::

  group:

       root::0:
       staff:::

  El archivo pathmsg es un archivo de informacin para el usuario cuando
  introduce algn carcter no valido. Es editable por nosotros para que
  ponga lo que queramos.

  pathmsg Original:

       You used an illegal filename. The filenames for anonymous
       users must be made of only the characters  A-Z,  a-z, 0-9
       and "._-+" and may not begin with a "." or a "-".

  pathmsg mo actual:

       Baby estas usando un nombre d'archivo erroneo. A ver zi te
       enteras ke solo puedes usar los caracteres A-Z, a-z, 0-9
       y "._-+" pero sin empezar por "." o "-".

  Fuera de las coas y dems, es ``algo'' ms inteligible que en ingls.

  El archivo ld.so.cache contiene los nombres de las libreras
  necesarias, recomiendo no tocarlo si no es necesario.

  6.4.  /home/ftp/lib

  El directorio /home/ftp/lib donde las libreras son contenidas, debe
  tener propiedades de solo ejecucin (d--x--x--x). En el interior
  encontraremos libreras y links a las mismas. Debemos tener en cuenta
  que deben tener permisos de slo lectura, pero que los links tienen
  todos los permisos activados.

  Como ejemplo:

       -r--r--r--   1 root     root       164803 Jul 27 21:48 ld-2.0.5.so
       lrwxrwxrwx   1 root     root           11 Jul 14 02:23 ld-linux.so.2 -> ld-2.0.5.so

  6.5.  /home/ftp/pub

  El directorio /home/ftp/pub es donde se alojarn los archivos que
  queremos compartir.  Su propietario debera ser ftp, y los accesos
  sern de ejecucin y lectura:

       dr-xr-xr-x  21 ftp      ftp          1024 Jul 26 20:04 pub

  El permitir la escritura en este directorio no es una buena idea,
  puesto que los archivos deberan estar controlados, para ello usaremos
  un directorio concreto para las subidas. La recomendacin es tener los
  permisos de todo lo que cuelga de este directorio (pub) como 555.

  En otros sistemas como SunOS las propiedades de este directorio son
  2555, de tal forma que se pueden crear nuevos archivos con el mismo
  grupo.

  6.5.1.  /home/ftp/pub/incoming

  El directorio /home/ftp/pub/incoming es el directorio donde
  permitiremos la subida de ficheros a nuestra mquina. Por ello debe
  tener las siguientes propiedades:

       drwxr-x-wx   2 root     root         1024 Jul 19 21:16 incoming

  Como se puede observar tiene permiso de ejecucin (como es un
  directorio, realmente es permiso de acceso al directorio) y de
  escritura, pero no de lectura. Esto se hace para que slo personas
  autorizadas vean el contenido de este directorio. Si quisiramos que
  fuera un directorio para compartir ficheros, solo tendramos que
  aadir la propiedad de lectura.

  Por otro lado, tendremos que editar un archivo de configuracin para
  que todo est perfecto. Este archivo se ver en la parte de
  configuracin avanzada.

  7.  El arranque.

  En este momento el demonio de ftp estara preparado para ser lanzado,
  los directorios con los permisos adecuados y todo a punto para
  arrancar el demonio. Quedan dos partes importantes, la forma de
  arrancarlo y los archivos a ofrecer.

  Para el arranque del demonio, lo mejor es dejar que inetd lo lance
  cuando sea necesario, para ello se lo especificamos en el archivo
  /etc/inetd.conf, en el cual tendremos que poner (si no existe) una
  lnea como esta:

       ftp     stream  tcp     nowait  root    /usr/sbin/tcpd /usr/sbin/ftpd

  En algunos sistemas en lugar de fptd puede ser in.ftpd.

  Ahora podemos lanzar un ftp sin archivos, pero funcional reiniciando
  el inetd con el comando "killall -HUP inetd"

  8.  Los archivos a ofrecer.

  Los archivos a ofrecer los introduciremos en el directorio pub de
  nuestro ftp, pudiendo crear directorios, y teniendo en cuenta los
  permisos para que no sean modificables, borrables y dems. Un ejemplo
  sera:

       -r--r--r--   1 root     root       640005 Jun 23 23:31 WindowMaker.gz
       dr-xr-xr-x   2 root     root         2048 Jul 20 21:06 apps
       dr-xr-xr-x   2 root     root         1024 Jul 20 21:06 themes

  9.  Configuracin avanzada.

  Hasta este punto tendramos un ftp seguro y totalmente funcional, pero
  el ftp nos permite muchas mas cosas, me referir al del wu-ftpd en
  especial, los dems servidores son iguales o muy parecidos.

  Los archivos se alojan en /etc/ o en /etc/directorio en el caso de wu-
  ftp-academ es /etc/wu-ftpd-academ. Para buscar los suyos lo mejor es:

       find /etc -name *ftp*

  9.1.  El archivo ftpaccess .

  Este archivo es el que tiene toda la configuracin del ftp, por lo
  cual si montamos el ftp desde cero tendremos que repasarlo a tope.

  9.1.1.  Mensajes.

  Los mensajes son un punto importante de informacin. Podemos
  encontrarlos de tres tipos, pero todos se configuran en este archivo.

  El primero es el que recibimos nada ms conectar con el servidor de
  ftp, que suele ser de tipo informativo. Es indicado por una lnea como
  esta en el archivo ftpaccess:

       banner /etc/wu-ftpd-academ/welcome.msg

  Teniendo en cuenta que el fichero /etc/wu-ftpd-academ/welcome.msg
  tiene un contenido deseado para nosotros.

  Otro tipo de mensaje es el que aparece nada ms autorizarnos con el
  servidor, y va indicado por esta lnea:

       message /welcome.msg            login

  Teniendo en cuenta que la / indica el directorio raz del ftp, en
  nuestro caso /home/ftp, puesto que hemos accedido ya.

  El otro tipo de mensajes es el que aparece al cambiar de directorio y
  que normalmente nos informa de lo que all tenemos. Viene indicado por
  la lnea siguiente:

       message .message                cwd=*

  Como se puede ver, es un archivo llamado .message que aparece en cada
  cambio de directorio, y se muestra con el cwd. (cwd=*).

  Podemos cambiar lo que queramos y aadir un tipo de mensaje para otras
  acciones deseadas.

  9.1.2.  Informacin del servidor de ftp.

  Es importante que los que accedan a nuestro servidor puedan indicarnos
  cualquier error. Para ello, debemos dejar una direccin de correo
  electrnico bajo una lnea similar a esta:

       # direccion email del administrador ftp,
       # puede utilizarse con la macro %E
       # en los ficheros de mensajes.
               email usuario@servidor_correo

  10.  Accesos.

  Podemos configurar los accesos: en primer lugar, es posible
  especificar un nmero mximo de intentos de conexin (logins) fallidos
  permitidos por el servidor como seguridad, aunque en el caso del ftp
  annimo no sera fundamental. Para ello escribiremos la lnea
  siguiente en el archivo ftpaccess:

       loginfails X

  Donde X es el nmero de intentos.

  Por otro lado podemos restringir el dominio de acceso, que puede ser
  local a la mquina, remoto a la mquina o los dos. Se indica bajo unas
  lneas de este tipo:

       class  local   real,guest,anonymous *.my.domain 192.168.0.0
       class  remote  real,guest,anonymous *
       class   all    real,guest,anonymous *

  1. La primera permite un acceso local para los usuarios reales,
     invitados y annimos para el dominio indicado, en este caso
     *.my.domain 192.168.0.0.

  2. La segunda permite un acceso remoto para toda la red (*) para los
     usuarios reales de la mquina servidora, los invitados y el
     annimo.

  3. La tercera permite un acceso total para los mismos usuarios y para
     toda la red.

  Podemos restringir tambin el nmero mximo de usuarios que pueden
  acceder simultneamente. Esto es necesario para no sobrecargar la
  mquina, la lnea telefnica, la red,...  Tenemos una restriccin para
  cada tipo de acceso, un ejemplo sera:

       limit  local   20      Any   /etc/wu-ftpd-academ/msg.toomany
       limit  remote  100     Any   /etc/wu-ftpd-academ/msg.toomany
       limit   all    10      Any   /etc/wu-ftpd-academ/msg.toomany

  As limitamos el acceso local a 20 usuarios, el remoto a 100 y el
  total a 10, hay que tener en cuenta que las lneas local y remota
  estaban comentadas. Si por algn motivo intenta entrar un usuario ms
  al sistema y sobrepasa este valor, se le mostrar el mensaje escrito
  en nuestro caso en /etc/wu-ftpd-academ/msg.toomany. Como el lector
  supondr, todo esto es modificable.

  10.1.  Modificacin de archivos.

  Un tema importante es permitir o no la modificacin de las propiedades
  de los archivos. Por ello el archivo ftpaccess dispone de unas lneas
  para ello:

       #accion       yes/no     usuario
       #--------------------------------
       rename          no      anonymous    # rename permission?
       delete          no      anonymous    # delete permission?
       overwrite       no      anonymous    # overwrite permission?
       chmod           no      anonymous    # chmod permission?
       umask           no      anonymous    # umask permission?

  En este caso, todos los permisos para el usuario anonymous estn
  desactivadas.

  10.2.  Archivos no bajables.

  Existirn archivos que no deseamos que sean obtenibles, como pudieran
  ser /etc/passwd y /etc/group, del directorio del ftp (en nuestro caso
  (/home/ftp/etc/passwd y /home/ftp/etc/group). Para ello tendramos la
  siguiente lnea en el archivo ftpaccess:

       # estos ficheros no son bajables
       noretrieve /etc/passwd /etc/group
       noretrieve core

  La primera lnea es un comentario, la segunda hace lo explicado
  anteriormente, mientras que la tercera no permite la bajada de
  archivos core del ftp. Esto es debido a que los core son volcados de
  memoria y pueden contener informacin valiosa.

  10.3.  Subidas al servidor.

  Antes se ha indicado como preparar un directorio para las subidas al
  servidor de ftp (directorio incoming). Pero en este archivo vamos a
  poner unas lneas muy especiales:

       upload  /home/ftp   *               no
       upload  /home/ftp   /pub/incoming   yes     ftp     daemon  0666 nodirs

  La primera lnea indica que las subidas a /home/ftp, en cualquiera de
  sus directorios, no estn permitidas.

  La segunda indica especficamente que las subidas a
  /home/ftp/pub/incoming estn permitidas, pero no se pueden crear
  directorios y el permiso de los ficheros ser 0666 (modo 0666).

  El directorio incoming puede ser un problema muy grande, en muchos
  sitios se recomienda un sistema de archivos propio, puesto que si se
  llena el del sistema por exceso de uploads de ftp, tendramos grandes
  problemas.

  Con todo esto, todo el ftp estar perfectamente configurado, pero aun
  as, existen ms opciones, como indicar alias escribiendo :

               alias   incoming:       /pub/incoming

  El usuario al poner cd incoming pasara automticamente a
  /pub/incoming, pero bsicamente este archivo ya estara perfecto.
  10.4.  El archivo ftpconversions .

  Este archivo es muy til para bajar archivos que no estn comprimidos
  o empaquetados. En casos como el wu-ftpd es muy conveniente poner
  comandos como gzip, gnutar, compress,... compilados y enlazados de
  forma esttica, en el directorio /home/ftp/bin con los permisos
  correspondientes (111) para permitir bajadas de archivos a la vez que
  los comprimimos.  Su aspecto es el siguiente:

        :.Z:  :  :/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
        :   : :.Z:/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
        :.gz: :  :/bin/gzip -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:GUNZIP
        :   : :.gz:/bin/gzip -9 -c %s:T_REG:O_COMPRESS:GZIP
        :   : :.tar:/bin/tar -c -h -f - %s:T_REG|T_DIR:O_TAR:TAR
        :   : :.tar.Z:/bin/tar -c -h -Z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRE
        :   : :.tar.gz:/bin/tar -c -h -z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP
        :   : :.tgz:/bin/tar -c -h -z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP
        :   : :.ltar:/bin/tar -c -f - %s:T_REG|T_DIR:O_TAR:TAR
        :   : :.ltar.Z:/bin/tar -c -Z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
        :   : :.ltar.gz:/bin/tar -c -z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP

  Ejemplo:

       -r--r--r--   1 root     root       795509 Jan 20  1998 tel2308a
       -r--r--r--   1 root     root       797901 Jan 20  1998 tel2308b

  Son los ficheros a bajar del servidor. Como se ve, no estn en forma
  comprimida ni empaquetada, pero queremos bajarlo como tar.Z. Esto a
  priori se presenta como un problema, puesto que son dos comandos en
  uno, por ello podemos usar un programa que nos permita pipes (|) en
  nuestro ftpd. Con el siguiente, copiado al directorio bin de nuestro
  ftp, despus de compilarlo, el problema esta casi resuelto:

       /* pipe.c: ejecuta dos comandos en una pipe */
       /* codigo escrito por Gary Mills */

       #define NULL (char *)0
       #define MAXA 16

       main(argc, argv) int argc; char *argv[]; {
       char *av1[MAXA], *av2[MAXA];
       int i, n, p[2], cpid;

       i = 0; n = 0;
       while ( ++i < argc && n < MAXA ) {
       if ( *argv[i] == '|' && *(argv[i]+1) == '\0' ) break;
       av1[n++] = argv[i];
       }
       if ( n == 0 ) uexit();
       av1[n] = NULL;
       n = 0;
       while ( ++i < argc && n < MAXA )
       av2[n++] = argv[i];
       if ( n == 0 ) uexit();
       av2[n] = NULL;
       if ( pipe(p) != 0 ) exit(1);
       if ( ( cpid = fork() ) == (-1) ) exit(1);
       else if ( cpid == 0 ) {
       (void)close(p[0]);
       (void)close(1);
       (void)dup(p[1]);
       (void)close(p[1]);
       (void)execv(av1[0], av1);
       _exit(127);
       }
       else {
       (void)close(p[1]);
       (void)close(0);
       (void)dup(p[0]);
       (void)close(p[0]);
       (void)execv(av2[0], av2);
       _exit(127);
       }
       /*NOTREACHED*/
       }
       uexit() {
       (void)write(2, "Modo de uso: pipe  | \n", 34);
       exit(1);
       }

  El programa lo tenemos, el problema es indicarle al ftpd que lo use.
  Para ello pondremos esta lnea en el archivo ftpconversions:

        :  :  :.tar.Z:/bin/pipe /bin/tar cf - %s | /bin/compress -c:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS

  ATENCION: La lnea puede estar partida !!!  Espero que se entienda, si
  hay dudas, por favor indquemelas.

  De esta forma, el comando para obtener un .tar.Z es llamando a
  bin/pipe que a su vez llama a bin/tar y a bin/compress (con sus
  opciones correspondientes). Este comando se puede ampliar para otros
  comandos como pueden ser gzip o zip junto con el tar.

  La variedad solo tiene lmite con las combinaciones de compresores.

  11.  Puntos clave a recordar.

  Si tiene un agujero de seguridad en su ftpd lo mejor es que lo cierre
  temporalmente, obtenga el ltimo demonio de ftp sin errores o con
  errores parcheables, y sustituya el demonio anterior.  Asegrese de
  que los archivos tienen los permisos correspondientes, que el archivo
  /etc/passwd de su ftp es correcto, y ponga el seguimiento de su ftp de
  forma muy alta y que haga logs de las conexiones.  Si aun as tiene
  problemas, simplemente rece.

  El ftp annimo no es ms que un servicio ofrecido a personas externas
  a nuestro sistema, por ello se crea el directorio /home/ftp, pero se
  puede tener un ftp para los usuarios del sistema pero no para los
  externos, por lo cual no es un servidor annimo de ftp.

  Recuerde que el directorio home ser por tanto el del usuario que
  acceda por ftp.  Siguiendo este COMO le puede ayudar a configurarlo
  sea cual sea su caso.

  Si desea ms seguridad debera compilar todo usted mismo, de forma
  esttica.

  12.  Archie.

  El servicio Archie es un simple buscador de archivos sobre mquinas
  con ftp. Podemos buscar un archivo que necesitamos usando este
  servicio sobre cientos de mquinas de todo el mundo de una forma
  rpida y efectiva al 100%. Por otro lado podemos incluir nuestro
  servidor en un buscador Archie (slo si se esta siempre conectado, es
  un poco absurdo para un acceso temporal de 30 minutos diarios), para
  ello debemos mandar un mail a la lista de buscadores Archie (archie-
  updates@bunyip.com) para los siguientes servidores Archie:

  archie.ac.il               132.65.20.254    (Israel)
  archie.ans.net             147.225.1.10     (ANS, NY (USA))
  archie.au                  139.130.4.6      (Australia)
  archie.doc.ic.ac.uk        146.169.11.3     (United Kingdom)
  archie.edvz.uni-linz.ac.at 140.78.3.8       (Austria)
  archie.funet.fi            128.214.6.102    (Finlandia)
  archie.internic.net        198.49.45.10     (ATT, NY (USA))
  archie.kr                  128.134.1.1      (Korea)
  archie.kuis.kyoto-u.ac.jp  130.54.20.1      (Japon)
  archie.luth.se             130.240.18.4     (Swedish)
  archie.ncu.edu.tw          140.115.19.24    (Taiwan)
  archie.nz                  130.195.9.4      (Nueva Zelanda)
  archie.rediris.es          130.206.1.2      (Spain) (Este es el nuestro)
  archie.rutgers.edu         128.6.18.15      (Rutgers University (USA))
  archie.sogang.ac.kr        163.239.1.11     (Korea)
  archie.sura.net            128.167.254.195  (SURAnet (USA))
  archie.sura.net(1526)      128.167.254.195  (SURAnet alt. MD (USA))
  archie.switch.ch           130.59.1.40      (Swiss Server)
  archie.th-darmstadt.de     130.83.22.60     (Alemania)
  archie.unipi.it            131.114.21.10    (Italia)
  archie.univie.ac.at        131.130.1.23     (Austria)
  archie.unl.edu             129.93.1.14      (U. of Nebraska, Lincoln (USA))
  archie.univ-rennes1.fr                      (Francia)
  archie.uqam.ca             132.208.250.10   (Canada)
  archie.wide.ad.jp          133.4.3.6        (Japon)

  13.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  fuente_ISO-COMO
  Urko Lusa Oiza, ulusa@frodo.com
  v0.2, rev 2. 15 Oct 1996

  Este documento explica cmo usar una fuente iso-8859-1 en el modo
  texto de Linux, en vez de la que ste trae por defecto en todas las
  distribuciones que yo he visto, y que no deja de ser una especie de
  apao que arrastra el lastre de la pgina de cdigos de IBM.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Preparando las VT

  3.      Adaptando terminfo

  3.1.    Probando si funciona

  3.2.    Nota sobre slang

  3.3.    Nota sobre reset

  4.      Ms gaitas

  4.1.    Variables de entorno

  4.1.1.  less

  4.1.2.  LANG, LC_CTYPE , etc...

  4.2.    isprint

  4.3.    Configuracin de algunos programas

  4.3.1.  dosemu

  4.3.2.  pine

  4.3.3.  ELM

  4.3.4.  TIN

  5.      Problemas

  5.1.    La fuente no se carga al arrancar

  5.2.    El teclado funciona mal en VT(no.)

  5.3.    Los caracteres grficos no aparecen correctamente

  5.4.    Cmo se quita esto?

  6.      Sobre este documento

  6.1.    Agradecimientos

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Las distribuciones de Linux que conozco traen por defecto la misma
  fuente que el DOS (pgina de cdigos 437). Para hacer que el sistema
  funcione como si la fuente fuera ISO, se emplea un extrao ``remapeo''
  para hacer que al representarse determinado carcter, no salga por
  pantalla el que en la fuente ocupa dicha posicin.

  Para saber si este es el caso de tu sistema, mira el siguiente
  carcter:

  

  Si ests viendo una A mayscula con acento agudo, este documento no te
  hace falta. Si ves un cuadrado, te puede interesar. Por supuesto lo
  anterior se aplica si ests mirando este documento en su versin texto
  desde la consola, o bien la versin html desde el lynx. Si lo ests
  viendo desde X o leyendo una versin impresa, deberas ver la A en
  cualquier caso.

  Tambin puedes probar man iso_8859_1 desde la consola (segn tu
  distribucin y de si instalaste el manual o no, es posible que no
  tengas esta pgina) y comprobar si los caracteres mostrados se
  corresponden con su descripcin y si ves correctamente todos ellos. Es
  muy posible que gran parte aparezcan como cuadrados en vez de
  corresponderse con la descripcin que traen a la derecha.

  Si quieres disponer de todos los caracteres necesarios para una
  correcta escritura de la lengua castellana (y varias otras), puedes
  seguir los pasos que se describen en este documento. Para los
  recelosos, comentar que esto no implica la prdida de smbolos
  grficos, y que si se hace bien, seguiremos viendo los cuadraditos en
  nuestras aplicaciones favoritas (mc, slrn, etc.).La nica pega es que
  las lneas horizontales no salen unidas, cosa que creo que se debe a
  que la VGA slo hace esto para ciertas posiciones de la tabla de
  caracteres. No obstante puedo asegurar que se puede sobrevivir sin
  ello.

  A lo largo del documento aparecen varios ejemplos de comandos. Cuando
  stos empiezan por # significa que quien debe ejecutarlos es el
  superusuario (root). Cuando aparecen precedidos por $ significa que
  pueden ser ejecutados por cualquier usuario.

  2.  Preparando las VT

  Lo primero que se debe hacer es lograr que cuando pulsemos ALT+n,
  salga por pantalla el carcter que ocupa el lugar n en la fuente y no
  otro.  Esto se consigue con el siguiente comando:

       $ echo -ne '\033(K'

  pero por supuesto no vamos a estar tecleando eso en cada terminal
  virtual cada vez que tengamos que usarla, as que lo ms cmodo es
  aadir lo siguiente en /etc/rc.d/rc.local:

       # el BloqNum y los 8 bits
          for tty in /dev/tty[1-6]*; do
               setleds -D +num > $tty
               echo -n -e '\033(K' > $tty
          done

  La lnea que contiene setleds no es necesaria para el propsito de
  este documento, pero sera una pena no aprovechar el bucle ;-)

  Lo siguiente que debemos hacer es instalar la fuente:

       # setfont /usr/lib/kbd/consolefonts/lat1-16.psf

  Para hacer que sto ocurra automticamente al arrancar, pon la orden
  en /etc/rc.d/rc.font. Puedes probar a cambiar a dicha fuente, teclear
  echo -ne '\033(K' y volver a la seccin ``introduccin''.  Ahora
  deberas ver correctamente el carcter.  Recuerda que el echo slo
  tiene efecto sobre la terminal en la que se teclea, por lo que tendrs
  que teclearlo en la misma en la que ests leyendo esto.

  3.  Adaptando terminfo

  La definicin para la terminal de Linux que trae ncurses est pensada
  para usar los cdigos de la cp437. Esto provocar que al cambiar de
  fuente veamos letras en vez de los smbolos grficos. Afortunadamente
  esto no es difcil de solucionar cambiando la definicin de terminal
  en /usr/lib/terminfo/l/linux.

  NOTA: si tu distribucin de Linux es antigua, es posible que la
  definicin de terminal est en /usr/lib/terminfo/c/console. Teclea

       $ echo $TERM

  para saber cul te corresponde.

  Primeramente deberemos extraer el fichero binario en forma de texto
  editable:

       # infocmp > linux.original.tic
       # cp linux.original.tic linux.tic

  NOTA: si tu distribucin de Linux es antigua, es posible que el
  equivalente a infocmp se llame untic.

  NOTA2: asegrate de estar en la consola normal (modo texto). Si ests
  en un xterm, ser sta la informacin que se vuelque al fichero.

  Guarda el fichero linux.original.tic por si es necesario volver a
  restaurar la definicin original, y edita los cambios sobre linux.tic.
  stos son los siguientes:

    Busca las siguientes entradas y brralas:

    smacs

    rmacs

    acsc

     IMPORTANTE: Las entradas estn delimitadas por comas y puede haber
     varias en una misma lnea. Ten cuidado en borrar slo las entradas
     que se mencionan arriba.

    Aade las siguientes lneas:

               smacs=\E(K,
               acsc=l\206m\203k\214j\211u\215t\207v\213w\216q\212x\205,
               rmacs=\E)K,

    Graba los cambios y sal del editor.

  Ya puedes proceder a compilar:

       # tic linux.tic

  Tras lo cual ya debera estar listo el sistema.

  3.1.  Probando si funciona

  Seguramente tendrs el Midnight Commander. Ejectalo para ver si los
  cambios han tenido efecto.

  Pero si sale hecho un cristo!

  Calma, calma. Pulsa F9 y entra en el men Options. Selecciona Display
  bits y elige la opcin Full 8 bits. Asegrate de pasar por el Ok o
  darle con el ratn. Mejor ahora? Vuelve a entrar en el men y graba
  los cambios con Save setup.

  En caso de que ests leyendo esto con lynx, debes saber que en las
  fuentes de este navegador viene una pgina que te ser muy til para
  ver los cambios que has realizado. Dicha pgina se llama
  iso8859-1.html, y si ests leyendo esto conectado puedes verla en
  http://www.uni-passau.de/~ramsch/iso8859-1.html

  3.2.  Nota sobre slang

  Las versiones de slang anteriores a la 0.99-32 no determinan cules
  son los caracteres grficos leyendo terminfo, sino que usan unos
  predeterminados (si la terminal es linux). Si tu versin de esta
  librera es anterior, puedes actualizarte cogiendo la ltima versin
  de ftp://space.mit.edu/pub/davis/slang.

  Algunos programas que usan slang son slrn, jed y lynx (si se compila
  con esta opcin).

  3.3.  Nota sobre reset

  Algo que no s cmo evitar es que al ejecutar reset los carateres
  vuelvan a ser ``remapeados'' como si la fuente fuese la cp437. El
  nico apao que se me ocurre es incluir esta lnea en /etc/profile o
  en el .profile del usuario:

       alias reset='reset ; echo -ne "\033(K"'

  4.  Ms gaitas

  Mientras esperamos el da en que las distribuciones de Linux traigan
  las diferentes definiciones de locale para su internacionalizacin,
  hay algunas cosillas que podemos afinar.

  4.1.  Variables de entorno

  Puedes ponerlas en /etc/profile o en tu .profile particular. He
  seguido la sintaxis de bash. Si usas otro shell posiblemente tengas
  que cambiar export por la orden equivalente.

  4.1.1.  less

  Para visualizar con less ficheros que contengan caracteres de 8 bits:

       export LESSCHARDEF=8bcccbcc18b.

  Esto har que se consideren como imprimibles todos los caracteres
  desde el 32 hasta el 255, lo que puede acarrear problemas si se usa en
  una terminal vt200, por ejemplo, pero permite ver caracteres grficos
  desde el PC. Si tienes una terminal en ttySn puedes poner esto:

       export LESSCHARDEF=8bcccbcc18b.
       if [ "`tty`" = "/dev/ttySn" ]
       then
          TERM=vt220d
          unset LESSCHARDEF
          export LESSCHARSET=latin1
       else
          TERM=linux
       fi
       export TERM

  lo que har que si se entra por ttySn, less no considere como
  imprimibles los caracteres del 128 al 160 (los caracteres grficos en
  la fuente lat1-16.psf, pero que son interpretados como caracteres de
  control por el vt200).

  4.1.2.  LANG, LC_CTYPE , etc...

  Estas variables son las que se usan para presentar el formato de la
  fecha, orden alfabtico, etc. Desgraciadamente que yo sepa an no
  estn implementadas en las distribuciones habituales de Linux. De
  todas formas puedes aadir esto:

       export LANG=es_ES

  4.2.  isprint

  Esta es la funcin del sistema que decide si un carcter es imprimible
  o no.  Si la distribucin soportase locale, debera funcionar bien,
  pero tal como est ahora la cuestin, slo devuelve como imprimibles
  los caracteres ASCII.

  Esto provoca que muchos programas compilados con #include <ctype.h> no
  muestren correctamente los caracteres no ASCII. Como esto puede
  cambiar en un futuro, es importante que antes de aplicar el cambio que
  se propondr a continuacin compruebes tu sistema con el siguiente
  programa:

       #include <locale.h>
       #include <ctype.h>

       void main(void)
       {
       unsigned char c;

       setlocale(LC_CTYPE,"");

       for (c=191;c<211;c++)
               {
               printf("%d - %c ",c,c);
               if (isprint(c)) puts("es imprimible");
               else puts("no es imprimible");
               }
       }

  Graba el texto anterior con el original nombre de prueba.c y complalo
  con

       $ gcc -s -o prueba prueba.c

  y prubalo as:

       $ export LC_CTYPE=ISO-8859-1
       $ ./prueba

  Seguramente saldrn todos los caracteres como no imprimibles. Por si
  acaso asegrate antes probando con otros valores de LC_CTYPE, tales
  como es_ES, fr_FR, pt_PT, etc. Para saber ms posibles valores de
  LC_CTYPE, consulta el fichero locale.alias, que tendrs (si instalaste
  X) por /var/X11R6/lib/locale o algn otro directorio similar.

  Si, y slo si, el programa prueba clasifica como no imprimibles los
  caracteres que saca, puedes hacer el siguiente cambio en
  /usr/include/ctype.h.

  Primero haz copia de seguridad del fichero:

       # cd /usr/include
       # cp -a ctype.h ctype.h.orig

  En la lnea 150 aprox. cambia

       #define      isprint(c)      __isctype((c), _ISprint)

  por

       #define isprint(c)      (((c & 0xff) == 0x1b) || ((c & 0xff) > 0x1f))

  Este cambio de ctype.h fue publicado por Pablo Saratxaga
  <srtxg@f2219.n293.z2.fidonet.org> en el difunto grupo es.foro.unix.
  Yo he recompilado con l algunos programas como ncftp y tin, y ha
  funcionado muy bien.

  4.3.  Configuracin de algunos programas

  4.3.1.  dosemu

  Si arrancamos dosemu en modo texto, los caracteres que ocupen una
  posicin mayor que el 127 ya no se vern bien. Para remediarlo se
  puede habilitar el acceso a la VGA, con lo que dosemu usar el juego
  de caracteres de nuestra tarjeta grfica, que es del tipo IBM, por lo
  menos si usamos Linux en un ix86. Esto se consigue poniendo lo
  siguiente en el fichero de configuracin (generalmente
  /etc/dosemu.conf):

       video { vga  console  graphics }

  Tambin es conveniente que tengamos las siguiente opcin:

       keyboard {  layout es-latin1  keybint on  rawkeyboard on  }

  Con esto y el programa keybes.com de Pedro Maicas, no debera haber
  ningn problema para ver y teclear los caracteres mayores de 127.

  4.3.2.  pine

  Se puede cambiar la configuracin desde el propio programa, o bien
  editar el siguiente cambio en el fichero ~/.pinerc:

       character-set=ISO-8859-1

  Desde la versin 3.92, Pine ya permite poner artculos con 8 bits en
  los grupos de noticias (en el correo depender de la versin de
  sendmail y de cmo est configurado). Para habilitar esta opcin,
  aadir enable-8bit-nntp-posting a la lista feature-list del fichero
  mencionado.

  Existe tambin un fichero que efecta cambios globales (para todos los
  usuarios del sistema). El fichero se llama pine.conf, y su ubicacin
  depende de la distribucin que usemos.

  4.3.3.  ELM

  Aadir lo siguiente a ~/.elm/elmrc:

       charset=ISO-8859-1
       displaycharset=ISO-8859-1
       textencoding = 8bit

  Tambin se pueden hacer estos cambios para todos los usuarios. Basta
  aadir lo mismo al fichero general de configuracin, que en la
  Slackware est en /var/lib/elm/elm.rc.

  4.3.4.  TIN

  Aadir lo siguiente a ~/.tin/headers:

       Mime-Version: 1.0
       Content-Type: text/plain; charset=iso-8859-1
       Content-Transfer-Encoding: 8bit

  Algunas versiones modernas, como la 1.3 unoff, ya incorporan este tipo
  de cabeceras, por lo que la edicin de este fichero es innecesaria.

  5.  Problemas

  A ver qu has hecho mal ahora... };-)

  5.1.  La fuente no se carga al arrancar

  Asegrate de que el script /etc/rc.d/rc.font es invocado desde
  /etc/rc.d/rc.M. Si rc.font no aparece mencionado en rc.M, aade a este
  ltimo lo siguiente:

       if [ -r /etc/rc.d/rc.font ]; then
         . /etc/rc.d/rc.font
         fi

  rc.font debera tener permiso de ejecucin (chmod +x rc.font).

  5.2.  El teclado funciona mal en VT(no.)

  Asegrate de que el bucle de /etc/rc.d/local incluye todas las
  terminales virtuales que vayas a usar. Es decir, si tienes 8,
  sustituye

       for tty in /dev/tty[1-6]*;

  por

       for tty in /dev/tty[1-8]*;

  5.3.  Los caracteres grficos no aparecen correctamente

  El cambio propuesto para terminfo est pensado para la fuente
  lat1-xx.psf (donde xx representa la resolucin: 8, 10...).  Otras
  fuentes, como iso01.f16, no tienen caracteres grficos (comprubalo
  ejecutando showfont). Y otras pueden tenerlos en diferentes posiciones
  (como las iso01a).Si ests en el segundo caso, puedes cambiar la
  entrada acsc de terminfo incluyendo los valores en octal para los
  diferentes smbolos grficos. Consulta man terminfo para conocer la
  sintaxis.

  5.4.  Cmo se quita esto?

  No puedo creer que me hagas esto. Pero en fin, si has seguido los
  pasos correctamente, no deberas tener problemas en dar marcha atrs.
  Haz lo siguiente desde el directorio donde tengas linux.original.tic.

       # tic linux.original.tic
       # rm /usr/include/ctype.h
       # mv /usr/include/ctype.h.orig /usr/include/ctype.h
       # rm /etc/rc.d/rc.font

  6.  Sobre este documento

  Este documento ha sido elaborado utilizando Linuxdoc-SGML v1.5.

  Si lo has seguido fielmente habrs conseguido una de estas dos cosas:

  1. Adaptar la fuente de tu sistema al estndar ISO (ms o menos) en
     vez de usar un sistema propietario, recuperando unos cuantos
     smbolos muy convenientes o...

  2. Descuajeringar totalmente tu configuracin.

  Si ests en el primer caso y tienes alguna idea ms a este respecto
  que te gustara compartir, no dudes en escribirme a ulusa@frodo.com
  (Fidonet: 2:343/143.30)

  Si ests en el segundo, no te molestes en escribirme. Mi ego no lo
  soportara.

  En caso de que ests leyendo este documento localmente y quieras ver
  la ltima versin, es posible que est en

  http://www.arrakis.es/~ulusa/linux/fuente_ISO-COMO.  extensin

  donde extensin puede ser:

    html: versin html.

    sgml.gz: fuente sgml comprimida.

    dvi.gz: fichero dvi comprimido.

    ps.gz: fichero PostScript comprimido.

  Tambin puedes obtener la fuente que uso en

  http://www.arrakis.es/~ulusa/linux/swiss-3-lat1.fnt.gz

  Es muy posible que lo que se trata aqu ya est explicado en algn
  HOWTO de los que trae el Linux. No lo s con seguridad porque nunca
  los leo ;-)

  6.1.  Agradecimientos

  A Francisco Jos Montilla, pacopepe@insflug.org.

  A Pablo Saratxaga, srtxg@f2219.n293.z2.fidonet.org por su hack de
  isprint.

  A todos aquellos que me han enviado comentarios.

  7.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Grabadoras de CD - Como
  Leandro Terrs, lord_lt@retemail.es
  v1.6.1, 21 de Noviembre de 1999

  Introduccin al uso de Grabadoras de CD-R, CD-RW y DVD bajo Linux, as
  como descripcin del uso de los programas necesarios. Este documento
  se diferencia del Creacin-CDRoms-Como por su enfoque, ms centrado en
  el uso de distintos tipos de grabadoras, y las ltimas novedades soft
  ware. Es conveniente que tambin lea el Creacion-CDRoms-Como, enfocado
  ms en la plataforma SCSI, que profundiza ms en los aspectos tcnicos
  de la tecnologa CD-R y en sus posibilidades.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Aportaciones

  2.      Grabadoras soportadas

  3.      Configuracin del Kernel

  3.1.    Configurar el Kernel para grabadoras SCSI

  3.1.1.  Activacin y desactivacin de dispositivos SCSI al vuelo

  3.2.    Configurar el Kernel para grabadoras IDE

  3.3.    Configurar el Kernel para grabadoras IDE-ATAPI por puerto
  paralelo

  3.4.    Otras opciones del kernel recomendables

  4.      Nomenclatura de dispositivos SCSI

  4.1.    Dispositivos genricos

  4.2.    Dispositivos de bloque

  4.3.    Notacin estndar

  5.      Sistemas de ficheros

  5.1.    Joliet y Romeo

  5.2.    Rock Ridge (High Sierra)

  5.3.    HFS (Hierarchical Filesystem)

  5.4.    UDF (Universal Disk Format)

  5.5.    EXT2 (Extended Filesystem II)

  5.6.    El Torito

  6.      Programas necesarios para grabar

  6.1.    Programas para creacin de las imgenes

  6.1.1.  mkisofs

  6.1.2.  mkhfs

  6.1.3.  mkhybrid

  6.1.4.  mke2fs

  6.2.    Software de extraccin de audio

  6.2.1.  readcdda

  6.2.2.  cdda2wav

  6.3.    Software de grabacin

  6.3.1.  cdrecord

  6.3.1.1.        Parmetros configurables permanentemente de cdrecord

  6.3.1.2.        Grabacion sin imagen

  6.3.2.  cdwrite

  6.3.3.  cdrdao

  6.4.    Entornos Integrados

  6.4.1.  X-CD-Roast

  6.4.2.  Burn-It

  6.4.3.  CDR

  6.5.    Otros programas y utilidades

  7.      Software DAO y generadores de subcdigos.

  7.1.    cdrecord 1.8

  7.2.    CD Builder

  7.3.    cdrdao

  7.3.1.  Copia al vuelo de CD-ROMs.

  7.3.2.  Extraccin y grabacin de imgenes DAO con cdrdao.

  7.3.3.  Scripts que acompaan a cdrdao.

  7.3.4.  Duplicado de CD-ROMs de PlayStation con CDRDAO.

  7.3.5.  A tener en cuenta

  8.      Preguntas de Uso Frecuente

  8.1.    Cuando grabo con cdrdao , muestra una capacidad de casi 750
  megas para un CD 74 minutos. Esto a que se debe?

  8.2.    Me sale un mensaje muy parecido al siguiente despus de que el
  disco duro deje de funcionar durante unos segundos.

  8.3.    Hay alguna forma de hacer una imagen exacta de un CD al disco
  duro que no sea copiar los ficheros del CD al disco y luego sacar la
  imagen?

  8.4.    Se puede copiar de CD a CD (slo de datos) directamente sin
  ningn problema?

  8.5.    Puedo duplicar directamente un CD mixto o de audio?

  8.6.    Puedo duplicar CDs en formato xa2? (Por ejemplo, de
  PlayStation)

  8.7.    Hay alguna FAQ genrica sobre CD-R o CD-RW?

  8.8.    He grabado un CD de Audio, pero al escucharlo slo se oye un
  zumbido horripilante...

  8.9.    Problemas con ms de un dispositivo en controladoras SCSI NCR

  8.10.   Como se crea un CD Mixto?

  8.11.   Como se graba un CD multisesin?

  8.12.   Como se crea un CD Plus?

  8.13.   Se puede usar la grabadora para leer o extraer?

  8.14.   Tengo una grabadora HP-7500, y cdrecord  me hace cosas
  raras...

  8.15.   CDRDAO no detecta bien mi unidad

  8.16.   Sugerencias y peticiones

  9.      Crditos

  10.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Este documento pretende guiar al usuario, de forma que sepan qu
  tienen que hacer y cmo solucionar los posibles problemas que puedan
  plantearse a lo largo del camino de la grabacin de CDRoms.

  Se da una pequea explicacin sobre los sistemas de ficheros para los
  CDs (todo a su tiempo) y de cmo se usan los programas ms utilizados
  para grabar en Linux. Por supuesto, y en ltimo lugar, la omnipresente
  PUF (Preguntas de Uso Frecuente) por si se escapa algo.

  Recomiendo leer todos los apartados, uno detrs de otro, para ampliar
  conocimientos, que resultar beneficioso a la hora de buscar posibles
  irregularidades, fallos o errores en la elaboracin de este documento
  o en lo que se refiere a conceptos en Linux en s.

  Y ya por ltimo indicar que hasta la versin 1 de este documento
  explicaremos cmo se graban CDs normales, pero para la siguiente
  versin, la 2.0 intentaremos ir mas all, a las grabadoras DVD,
  momento que bajo mi punto de vista no tardar en llegar.

  1.1.  Aportaciones

  Recuerde que este documento est en desarrollo y cualquiera que pueda
  aportar su granito de arena con sus problemas y soluciones,
  correcciones (ya que seguro que me he equivocado en algn sitio) o
  adicin de detalles; siendo adems amablemente incluido como
  colaborador. (Ver seccin ``Crditos'')

  Para hacerlo slo tiene que o bien utilizar el sistema en lnea de
  Insflug, http://www.insflug.org/comos/comos.php3 de adicin al sistema
  de fe de erratas, o sugerencias, para que inmediatamente est
  disponible para todos, y enviar un mail a lord_lt@retemail.es
  Animo a leer este documento con paciencia, sin reparos en participar
  con correcciones o aadiduras al mismo, para que toda la comunidad
  Linux se beneficie de l. Las felicitaciones y enhorabuenas tambin
  son bien recibidas ;-).

  2.  Grabadoras soportadas

  Podemos dividir el soporte a una grabadora bajo LiNUX en tres
  aspectos:

  1. Que Linux tenga soporte genrico para el bus del que cuelga la
     grabadora.

  2. Que el software especfico de grabacin soporte la utilizacin de
     dicho bus para grabar.

  3. Que adems de lo anterior, el software especfico de grabacin
     soporte la grabadora en concreto.

  Respecto al punto 1, Linux soporta genricamente grabadoras CD-R, CD-
  RW, DVD-R, DVD-RW y DVD-RAM con interfaces:

    SCSI

    IDE/ATAPI

    IDE/ATAPI por puerto paralelo.

  Podemos decir por tanto que, a excepcin de las grabadoras SCSI, con
  las que adems es preciso que la controladora SCSI est soportada por
  Linux, hoy en da la capacidad de utilizar una grabadora en concreto
  reside enteramente en el programa utilizado para grabar.

  En la actualidad, el nico programa con desarrollo activo es cdrecord;
  por lo que la cuestin depender enteramente de que cdrecord la
  soporte o no; a grosso modo, podemos afirmar que casi todas las
  grabadoras estn soportadas.

  En http://www.guug.de:8080/cgi-bin/winni/lsc.pl Winfried Truemper
  mantiene un listado de las soportadas. Si entre ellas est la suya,
  hay un 99% de posibilidades de que pueda utilizarla bajo Linux sin
  problemas.

  No obstante, la ltima palabra la tiene siempre la documentacin de
  cdrecord:  vea la seccin ``cdrecord''.

  Aun en el caso de que su grabadora no estuviera soportada, le quedara
  la opcin de crear las imgenes bajo Linux, y grabarlas bajo cualquier
  otro sistema operativo.

  3.  Configuracin del Kernel

  El primer paso es configurar el kernel para que Linux vea nuestras
  grabadoras y/o lectores correctamente, tanto si son SCSI como IDE o
  ATAPI por puerto paralelo.

  En los dos ltimos casos hay que hacer ciertos chanchullos, aunque
  el que ms pueda resultar dificultoso sea configurar el kernel para
  grabadoras IDE, ya que no basta conectarla, decirle que es un
  dispositivo IDE/ATAPI CD-ROM y directo a grabar como un poseso; hay
  que recompilar el kernel con una serie de opciones y modificaciones
  que se describen y explican en su apartado correspondiente.

  Hay que saber cmo configurar el kernel, para ello entramos en el
  directorio /usr/src/linux, donde normalmente se encuentran los
  fuentes. Para asegurarnos de que nada raro pueda pasar, ejecutaremos
  make mrproper lo que elimina todos los binarios, incluso las
  configuraciones; es decir, una limpieza exhaustiva que asegure que no
  haya ninguna interferencia de nada de lo anterior que pueda hacer que
  el nuevo kernel no compile o nos d errores.

  Una vez hecho esto, teclearemos make menuconfig si queremos interfaz
  ncurses para el shell o make xconfig desde un terminal de X-Window
  para hacer lo mismo en X con interfaz TCL/TK, lo que quiere decir que
  si no tiene dichas libreras no podr compilar los programas
  respectivos.

  Podr recurrir en ltima instancia al viejo programa de configuracin,
  un script que se invoca desde la consola con make config y en el que
  tendr que poner y (si), n (no) y/o m (mdulo) el los lugares en donde
  corresponda en el prompt, ya que ste no permite volver hacia atrs;
  si quiere hacerlo tiene dos opciones, una pulsar Control+C y cancelar
  la configuracin volviendo a empezar, o terminar de configurar y
  volver a empezar, (lo configurado anteriormente se mantiene), y
  rectificar lo que haya dejado o haya puesto mal.

  Si tiene mas dudas sobre cmo configurar el ncleo del sistema le
  remito al documento Kernel Como que se encuentra en
  http://www.insflug.org.

  3.1.  Configurar el Kernel para grabadoras SCSI

  Voy a suponer que no tiene ni la ms remota idea de qu es el sistema
  SCSI, cosa en la que tampoco voy a profundizar, ya que para eso hay un
  hermoso documento llamado SCSI-HOWTO al cual puede referirse en caso
  de dudas y o problemas de configuracin del dispositivo SCSI.

  El caso es que se ha comprado un equipo cuya placa madre trae SCSI
  integrada, o una controladora SCSI en la que ha puesto el CD, y el
  dichoso windows lo ha configurado a la primera o los amables chicos de
  la tienda de informtica en donde acaba de comprarlo han instalado y
  configurado todo.

  Lo primero es saber qu tipo de controladora SCSI es, me refiero a su
  chip principal; las controladoras ms comunes son Adaptec, Advansys y
  las basadas en los chip Symbios 53c8xx (NCR), pero si no tiene ninguna
  de stas no se preocupe, el kernel lleva soporte para muchas ms.
  Puede saber qu controladora tiene mirando simplemente los manuales,
  mirando el chip principal de la tarjeta o el nombre del controlador de
  windows (slo en ltima instancia).

  Si el controlador no corresponde exactamente al modelo que aparece en
  el kernel, seguramente funcionar con alguno de los que lleva
  genricos para varios tipos de controladoras con las mismas
  caractersticas. Puede compilar como mdulo las que ms se parezcan al
  suyo y luego ir probando los mdulos hasta que d con el que
  corresponda. Si al cargar algn mdulo nota que se le ha quedado el
  ordenador colgado, no lo vuelva a intentar con ese, ya que algunos
  controladores que no corresponden al hardware instalado son cargados
  de todos modos produciendo estas desagradables situaciones.

  Acto seguido nos vamos a la configuracin del kernel y entramos en
  SCSI Support, lo que luego nos dejar sealar las dems opciones que
  son para dar soporte genrico, y a unidades de CD-ROM, Discos Duros y
  cintas, de las cuales nos interesa el soporte genrico, SCSI generic
  support, que proporciona el interfaz ASPI, (para poder grabar) y el
  SCSI CD-ROM support, para leer unidades de CD-ROM, incluidas
  grabadoras y DVDs.  Si dispone de un disco duro, ZIP o JAZ SCSI deber
  responder y tambin si quiere poder usarlo.

  Si por casualidad tiene la grabadora como unidad externa, y la
  controladora SCSI dedicada en exclusiva a ella, recomiendo que ponga
  el driver de la controladora como mdulo, es decir, poniendo m en
  lugar de y, ya que le permitir cargar/descargar a voluntad todos los
  mdulos de soporte SCSI cuando no los necesite, y apagar la unidad
  externa cuando no la est usando (cosa que con windows no es posible
  hasta el W98) ya que al cargar su mdulo, la controladora inicializar
  y escanear los dispositivos de nuevo sin necesidad de reiniciar el
  ordenador para detectarlos; si la tiene interna, aada el soporte
  directamente en el kernel y se ahorra trabajo en cargar los mdulos.

  Tenga en cuenta no obstante, que si carga, descarga, y vuelve a cargar
  el mdulo sin reiniciar el equipo, la controladora recibir un nmero
  de host distinto, y los parmetros que tengamos para cdrecord
  configurados no sern vlidos.

  Si no puede descargar el soporte SCSI por tener otros dispositivos
  dependiendo de l (porque su disco duro raz sea SCSI, por ejemplo, o
  por no poder tenerlo como mdulo por las razones que sean) tambin
  puede activar y desactivar dispositivos a voluntad, incluidas
  grabadoras, cintas, escneres, etc. sin necesidad de descargar el
  mdulo. vea la seccin ``Activacin y desactivacin de dispositivos
  SCSI al vuelo''.

  As que una vez hecho esto pase al apartado siguiente para especificar
  el driver de su controladora. Si le ha dicho antes, en soporte SCSI,
  que lo compile como mdulo solo le dejar seleccionar como mdulo el
  driver del controlador.

  Espero que no se equivoque en escoger el driver para su controladora,
  porque si es as le tocar elegir otro y recompilar solo los mdulos.
  Una vez recompilados los nuevos mdulos, previa configuracin, slo
  tendr que probarlos; si ha incluido soporte SCSI en el kernel junto a
  un controlador, ste detectar el dispositivo y podr accederse a l
  desde los ficheros de dispositivo /dev/scdX o /dev/srX (estos ltimos
  se crean, si no lo estn ya, a travs de un script que se puede
  encontrar junto a los programas de grabacin, as como con el script
  /dev/MAKEDEV, o bien el que trae el X-CD-Roast (seccin ``X-CD-
  Roast'') o bien a mano con el comando mknod con este bucle:

       for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ;
           do mknod /dev/sr$i b 11 $i;
       done

  Del mismo modo, si lo ha hecho como mdulo, slo tendr que cargar los
  mdulos SCSI en el siguiente orden:

  1. Mdulo scsi_mod.o que es el driver principal del que cuelgan todos:

       insmod scsi_mod

  2. Seguido del mdulo de soporte para SCSI genrico (proporciona el
     interfaz ASPI Advanced SCSI Programming Interface, para poder
     grabar CDs, o usar algunos programas con unidades de cinta,
     escneres, etc) sg.o y el de soporte de CD-ROMs SCSI, sr_mod.o:

       insmod sg
       insmod sr_mod

  3. Por ltimo, hacer un insmod al driver que corresponda a su
     controladora, el cual sacar un debug de lo que encuentre, de tal
     forma que las unidades de CD correspondern a /dev/sr0 para el
     primer dispositivo CD-ROM SCSI, /dev/sr1 para el segundo, etc,
     independientemente del bus o ID SCSI en el que estn.

  De todas maneras si hace un cat al archivo /proc/scsi/scsi podr ver
  qu ID SCSI se tienen sus dispositivos, dato indispensable para
  determinar los interfaces genricos /dev/sgX.

  Si instala X-CD-Roast podr usar los dispositivos /dev/sr0 hasta
  /dev/sr15; tambin puede usarlos en lugar de los dispositivos
  /dev/scdX, que usan otros programas, como cdrecord. Estos son los
  nuevos dispositivos que se usarn a partir de ahora para referirse a
  las unidades de discos pticos tipo ROM como los CD-ROM y DVD-ROM.

  Recomiendo que active el soporte kerneld, e introduzca el alias
  apropiado a la controladora en /etc/conf.modules, para que la carga de
  los mdulos sea automtica. Si tiene dudas sobre esto, lea el Kernel-
  Como para mejor referencia. Si ya tiene una distribucin con el kernel
  2.2.XX no se cargar el kerneld, el propio kernel hace las funciones
  del kerneld.

  Lea tambin la seccin ``Configuracin del kernel para grabadoras
  IDE'' porque explico algunas cosas ms que pueden servir para
  solucionar posibles problemas que puedan ocurrir y que son comunes
  tanto para IDE como para SCSI. Y porqu no, para cuando un amigo se
  instale una grabadora IDE...

  3.1.1.  Activacin y desactivacin de dispositivos SCSI al vuelo

  La forma ms limpia de hacer que el kernel active o desactive sin
  necesidad de resetear el sistema, o cargar/descargar mdulos, dando
  igual si est compilado el soporte como mdulo o no, es mediante el
  siguiente mtodo.

  El activar o desactivar dispositivos SCSI a voluntad sin necesidad de
  demasiados aspavientos puede ser ms prctico de lo que parece:
  suponga que su grabadora es externa, y la mantiene apagada mientras no
  la usa, lo mismo sucede con un scanner, unidad ZIP, JAZ, CDROMs o
  unidades de cinta externa, dando por supuesto que son SCSI, claro
  est.

  Advertencia: Cuando hablamos de activar, nos referimos al caso en que
  el dispositivo est conectado externamente a la controladora, pero en
  un principio apagado, y una vez encendido, deseamos activar; no que
  cualquier controladora SCSI mediante este mtodo soporte
  conexin/desconexin en caliente de dispositivos, tenga cuidado o
  puede desde corromper datos a estropear definitivamente dispositivos
  del bus SCSI.
  Supongamos que la grabadora est en la primera o nica controladora
  SCSI del sistema, y que la grabadora tiene asignado el ID SCSI 4.

  si ejecutamos el comando:

       echo "scsi add-single-device 0 0 4 0" > /proc/scsi/scsi

  El kernel activar la grabadora.

  En este caso, el primer 0 especifica la primera controladora, el
  segundo el canal de la controladora (a menos que tenga una Wide o UW
  SCSI.  siempre ser 0, ya que slo tiene uno; no confundir canal con
  conector) el 4 especifica el ID SCSI, y el ltimo 0 el LUN. (Ver
  seccin ``Notacin estndard'')

  y si ejecutamos

       echo "scsi remove-single-device 0 0 4 0" > /proc/scsi/scsi

  La desactivaremos.

  3.2.  Configurar el Kernel para grabadoras IDE

  El problema de las grabadoras IDE es que no hay software especfico
  que detecte y grabe en estos dispositivos, ya que todos los programas
  se basan en la interfaz SCSI (ASPI) del kernel para acceder a stos.

  Por esta razn, no es tan sencillo configurar del Kernel para las
  grabadoras IDE. Lo primero es aplicar una pequea modificacin al
  Kernel, slo necesario si tiene una grabadora Regrabable HP como las
  7100 o 7110 o superiores.

  La modificacin, que consiste en aumentarle el tiempo de espera del
  IRQ, es absolutamente necesaria ya que si no lo hacemos no cerrar los
  CDs, o al intentar cerrarlos, es decir, al escribir la Tabla de
  Contenidos, se detendr con un error y habremos perdido el CD sin
  forma de recuperarlo.

  Para efectuarla, vamos al archivo ide.h que se encuentra en
  /usr/src/linux/drivers/block, y buscamos la siguiente lnea:

       #define WAIT_CMD        (10*HZ) /* 10sec  - maximum wait for an IRQ to happen */

  que tenemos que modificar de modo que quede as:

       #define WAIT_CMD        (1000*HZ)       /* 1000sec  - maximum wait for an IRQ to happen */

  Con lo cual solucionamos el problema. Parece ser que con poner 400 en
  vez de 1000 funciona, pero no lo he probado personalmente. De todas
  formas, con el paquete de los fuentes del cdrecord viene un archivo
  llamado README.ATAPI, en que se dice que haga exactamente esto, as
  como cmo hacer funcionar estas grabadoras con la versin antigua de
  cdrecord, es decir, la 1.5, aplicndole un serie de parches al
  programa y al kernel.

  Una vez realizada la modificacin debe configurar el kernel, ir al
  men Floppy, IDE and other block devices, desactivar el soporte para
  IDE/ATAPI CD-ROM (OJO, NO el Enhanced IDE/MFM/RLL
  disk/cdrom/tape/floppy support!) y activar la emulacin SCSI que slo
  hay en los ltimos kernel, versiones 2.0.31 en adelante y 2.2.XX, para
  que as los programas detecten nuestra grabadora IDE como SCSI y
  funcione como tal.

  Si activamos el soporte IDE/ATAPI para las unidades de CD-ROM el
  kernel no detectar nuestra grabadora como un dispositivo SCSI y
  habremos perdido el tiempo. Hacer que a nuestra grabadora la vean los
  programas como si fuera SCSI es muy sencillo, y se basa en que las
  grabadoras reciben comandos estandarizados (pertenecientes al interfaz
  ASPI, Advanced SCSI Programming Interface) para grabar que por
  casualidad son especficos de los SCSI; de esta forma, con la
  emulacin lo que hacemos es que se puedan enviar este tipo de comandos
  a travs del bus IDE de nuestra grabadora.

  Hasta el momento que he tenido para probarlo, funciona perfectamente,
  tan bien, que se consigue un rendimiento similar al de una SCSI
  autntica.

  De la misma forma, windows lo que hace es emular SCSI con las IDE, lo
  que le trae una pequea serie de inconvenientes como cierto software
  que no funciona bien o el excesivo consumo de recursos del sistema.

  Por lo visto las grabadoras IDE consumen muchos recursos, ms que las
  SCSI, pero en linux con la emulacin la carga parece menor, o al menos
  no se nota de forma excesiva; lo nico recomendable es dejar un puerto
  IDE para ella sola, segn recomiendan los fabricantes; lo mas comn
  suele ser el secundario.

  Con esto nos aseguramos de que no haya cualquier posible interferencia
  del otro dispositivo que haya conectado al puerto de la grabadora
  (solo por seguridad); yo he probado a tener el lector y la grabadora
  en el mismo interfaz, esto se puede hacer pero recomiendo que desmonte
  la unidad lectora de CD para que no haya interferencias; se puede
  usar, por ejemplo, para escuchar CDs de msica mientras se graba el
  CD, si tiene botn de reproduccin, claro esta ;).

  He recibido noticias de que hay gente que tiene la grabadora y la
  unidad lectora colocadas en la misma interfaz haciendo copias directas
  sin muchos problemas. Antes de ponerlo as, recomiendo realizar muchas
  pruebas antes de dejarlo de forma fija.

  El ltimo paso para configurar el kernel es ir a la seccin SCSI
  support e incluir el soporte SCSI en el kernel, junto al SCSI generic
  y el soporte SCSI para los CD-ROM (Ojo, no lo haga como mdulo, hay un
  fallo en la configuracin para la emulacin SCSI a la hora de incluir
  el soporte genrico SCSI en el kernel, por lo que si no lo incluimos
  manualmente en l no podremos compilar el nuevo kernel y es posible
  que se pase un buen rato dndole vueltas a lo mismo).

  Gracias a este procedimiento ahora nuestra grabadora y/o lectora/as
  aparecern como dispositivos SCSI en vez de IDE.

  No es nada recomendable hacer cosas con el disco duro origen
  mientras se est grabando, si lee datos de un disco secundario podr
  trabajar con el principal, pero no recomiendo abusar de su uso ya que
  es posible que pueda haber alguna pequea interferencia con el DMA,
  aunque no suele ser muy comn. Es decir, deje el disco duro slo para
  la grabacin.

  Otra cosa a tener en cuenta es que si no tiene un disco con extraccin
  por DMA como un Fast ATA o Ultra DMA desactive del kernel el soporte
  para el chip Intel Tritn (I/II), ya que si har interferencia el DMA
  con la emulacin y dejar el controlador colgado, obligndole a
  resetear el ordenador con ese botn que se tiene algo olvidado la
  gente de linux.  (Mirar en el apartado ``Preguntas de Uso Frecuente'')
  para ms detalles).

  3.3.  Configurar el Kernel para grabadoras IDE-ATAPI por puerto par
  alelo

  Grabadoras por puerto paralelo? De verdad eso existe? Pues s,
  existe, y cmo Linux es capaz de usarlas, Cmo? Gracias cdrecord y a
  los desarrolladores del kernel que han introducido como novedad de los
  ncleos 2.1.x: (de desarrollo) el soporte para unidades ATAPI por
  puerto paralelo como unidades de CD-ROM y discos duros.

  Para esto deberemos tener el kernel 2.0.35 o superior con la
  configuracin necesaria para que reconozca nuestra unidad externa, que
  se describe a continuacin:

  Lo primero de todo es reiniciar el ordenador y entrar en la
  configuracin de la BIOS, y, normalmente, en el men Integrated
  Peripherals, si tiene la controladora del puerto paralelo integrada en
  la placa base, como en las ltimas placas de 486 y en todas las placas
  de Pentium y Pentium Pro/II. Configuraremos el puerto de impresora en
  modo EPP, si no lo establecemos as, no habr forma de que funcione.

  Seguidamente, una vez arrancado nuestro sistema entrar en la
  configuracin del kernel en Floppy, IDE, and other block devices y
  seleccionar como mdulo el parmetro Parallel port IDE device support.
  Seguidamente seleccionar, al menos, tambin como mdulos los
  siguientes:

    Parallel port ATAPI CD-ROMs

    Parallel port generic ATAPI devices

    Shuttle EPAT/EPEZ protocol

  De esta forma ya tenemos los mdulos para hacer funcionar la grabadora
  como unidad lectora; si lo prefiere puede incluirlo en el kernel, pero
  primero asegrese de que funciona bien como mdulo antes.

  Seguidamente procedemos a la recompilacin e instalacin de los
  mdulos en su lugar, y sin necesidad de reiniciar (a no ser que se
  actualice partes no compiladas como mdulos)  ejecute depmod -a para
  crear las dependencias de los mdulos a fin de poder cargarlos con
  modprobe, kerneld o kmod.

  Comenzamos por cargar el modulo paride, el epat, y por ltimo el
  mdulo del driver que vayamos a usar; como nos interesa poder usar
  nuestra grabadora tenemos que cargar el pg para que nos reconozca la
  grabadora cdrecord (equivalente al mdulo sg en SCSI) y el pcd para
  usar la grabadora como unidad lectora (el equivalente a sr en SCSI).

  Para usar nuestra unidad como lectora debemos montar la unidad con la
  orden:
       mount /dev/pcd0 /cdrom

  No obstante, si piensa utilizar su grabadora como lector, o para
  extraccin de audio asiduamente, le recomiendo que lea la seccin
  ``Es recomendable utilizar la grabadora para extraer o leer?'', su
  bolsillo lo acabar agradeciendo.

  Si no existe el dispositivo /dev/pcd0 puede crearlo con el siguiente
  bucle:

       for i in 0 1 2 3 ; do mknod /dev/pcd$i b 46 $i ; done

  Si dispone del un kernel de la serie 2.1.x o 2.2.x antes de usar los
  controladores de cualquier dispositivo de puerto paralelo ha de cargar
  el mdulo parport.o, el cual hace de interfaz para poder tener
  cargados y operativos varios dispositivos de puerto paralelo al mismo
  tiempo como unidades ZIP, discos y lectores/grabadores de CD e
  impresoras y scanners simultneamente (genial no??? ;-)).

  Como todava no ha cado en mis manos una grabadora de este tipo no he
  podido hacer pruebas ni nada por el estilo, los detalles de la
  configuracin del kernel los he elaborado a partir de lo que he podido
  recopilar leyendo por la Web y la ayuda prestada por colaboradores.

  Apelo a la colaboracin de la comunidad linuxera a fin de completar
  este apartado con lo que ms le vaya haciendo falta, para estar a la
  altura de los anteriores; bien se lo merece el esfuerzo mostrado por
  las personas que hacen posible que dispositivos tan raros y
  minoritarios sean capaces de ser utilizados por Linux.

  3.4.  Otras opciones del kernel recomendables

  En linux (y en unix) existe la posibilidad de poder acceder, leer y
  escribir en sistemas de archivos que no se encuentren en una particin
  o en un disco, sino, en un fichero. Cmo? En un fichero? Si, as es,
  y para eso solo necesitamos dos cosas, un dispositivo loopback y el
  comando mount.

  Para asegurarnos de que incluimos esta opcin en el kernel como mdulo
  entramos en la configuracin del kernel mediante make menuconfig, y
  accedemos al men Floppy, IDE, and other block devices; justo tras
  Additional Block Devices se encuentra la opcin Loopback device
  support la cual recomiendo seleccionar como mdulo, y si en el men
  principal Filesystems tiene seleccionada la opcin Kernel automounter
  support al montar el archivo, este mdulo se cargar automticamente;
  si la opcin anterior est como mdulo deber cargarlo a mano, sino no
  se cargar automticamente ningn modulo y nos dar error.  Para
  cargarla manualmente deberemos teclear: insmod loop.

  Tambin debemos asegurarnos que en dev existan los ficheros especiales
  de dispositivo loopX:

  brw-rw----   1 root     disk       7,   0 Jul  1  1996 /dev/loop0
  brw-rw----   1 root     disk       7,   1 Jul  1  1996 /dev/loop1
  brw-rw----   1 root     disk       7,   2 Jul  1  1996 /dev/loop2

  si no los tiene, crelos con el siguiente bucle:

       for i in 0 1 2 3 4 5 6 7; do mknod /dev/loop$i b 7 $i ; done

  as, para montar una imagen para revisarla, en el directorio
  /mnt/imagenesCD haremos:

       mount -o loop imagenCD.iso /mnt/imagenesCD

  Una vez hecho esto, acceda al directorio /mnt/imagenesCD y podr ver
  los contenidos de la imagen. Las imgenes ISO9660 son de slo lectura,
  por lo que no podr modificarlas de ninguna manera, claro, a menos que
  genere otra imagen nueva.

  Como puede observar no he puesto el comando -t iso9660 para
  especificarle que es una imagen ISO9660, ya que automticamente lo
  debe detectar.

  Si tiene pensado hacer imgenes Joliet, le recomiendo que cargue en el
  kernel el soporte para Joliet, en el men principal Filesystems,
  activar el soporte para ISO9660 en los kernels 2.0.33 en adelante, y
  en los superiores a 2.0.37, o 2.1.x o 2.2.x activar Microsoft Joliet
  CD-ROM extensions; y dentro del submen Native Language Support
  activar Codepage 437, 850 y NLS ISO 8859-1.

  Recomiendo al menos incluir esto como parte del kernel de arranque,
  aunque si no le sobra mucha memoria inclyalos como mdulos, que el
  kernel se ocupar de cargarlos cuando sea necesario. El resto de
  Codepages y NLSs recomiendo que los ponga como mdulos si decide
  activarlos, aunque los ms utilizados son los mencionados
  anteriormente.

  4.  Nomenclatura de dispositivos SCSI

  Este es un tema para el que convendra que leyera el SCSI-Howto, pero
  como no hay disponible traduccin, har una breve introduccin,
  necesaria para poder especificar parmetros necesarios al software que
  usaremos.

  Bsicamente, para lo que necesitamos, hemos de saber de la existencia
  de los dispositivos de bloque, /dev/scdX o /dev/srX, y los
  dispositivos genricos, /dev/sgX:

  4.1.  Dispositivos genricos

  En lo que a nosotros atae, tanto para extraer audio, como para grabar
  bajo Linux, el kernel ha de tener activado Generic SCSI Support, que
  proporciona la interfaz ASPI necesaria.

  Pero, de qu manera determina Linux cmo ha de tratar un mismo
  dispositivo? dependiendo de a qu fichero de dispositivo le hagamos
  referencia; si es un fichero de dispositivo de bloques, lo tratar
  como tal, y si es genrico, utilizar comandos ASPI.

  El dispositivo genrico de cada unidad conectada al bus SCSI se
  determina mediante su ID SCSI, haga cat /proc/scsi/scsi para ver un
  listado de los disponibles en su sistema, por ejemplo:

       Attached devices:
       Host: scsi0 Channel: 00 Id: 00 Lun: 00
         Vendor: QUANTUM  Model: FIREBALL1280S    Rev: 630G
         Type:   Direct-Access                    ANSI SCSI revision: 02
       Host: scsi0 Channel: 00 Id: 01 Lun: 00
         Vendor: QUANTUM  Model: FIREBALL ST4.3S  Rev: 0F0C
         Type:   Direct-Access                    ANSI SCSI revision: 02
       Host: scsi0 Channel: 00 Id: 02 Lun: 00
         Vendor: PIONEER  Model: CD-ROM DR-U06S   Rev: 1.05
         Type:   CD-ROM                           ANSI SCSI revision: 02
       Host: scsi0 Channel: 00 Id: 04 Lun: 00
         Vendor: YAMAHA   Model: CDR102           Rev: 1.01
         Type:   WORM                             ANSI SCSI revision: 02

  Lo que nos interesa es la lnea Host: scsi0 Channel: XX Id: XX Lun: XX
  de cada dispositivo; concretamente Id:.

  El sistema asigna dinmicamente dispositivos sgX por orden de ID a los
  presentes en ese mismo instante; en el ejemplo anterior:

       00 ---> /dev/sga
       01 ---> /dev/sgb
       02 ---> /dev/sgc
       04 ---> /dev/sgd

  cuando decimos dinmicamente, nos referimos a que si por ejemplo,
  tiene una unidad externa magneto ptica, un zip, o similar, en el ID
  03, la enciende, y hace que el kernel reescanee el bus, los
  dispositivos ahora seran:

       00 ---> /dev/sga
       01 ---> /dev/sgb
       02 ---> /dev/sgc
       03 ---> /dev/sgd
       04 ---> /dev/sge

  Ahora, la grabadora sera /dev/sge en lugar de /dev/sgd como antes.

  Con lo que queremos decir que hay que tener mucho cuidado con la
  adicin de dispositivos SCSI al vuelo y el uso de los sgX.

  4.2.  Dispositivos de bloque

  En el caso concreto que nos ocupa, nos interesan los dispositivos ROM:
  /dev/scdX o la nomenclatura nueva, /dev/srX.

  Aqu el primer fichero de dispositivo corresponder al primer CDROM
  SCSI (incluyendo grabadoras) SCSI disponible en el sistema, /dev/sr0,
  /dev/sr1 ser el segundo, etc; da igual el ID SCSI que tenga, o en el
  bus SCSI que est.

  4.3.  Notacin estndar

  En entornos *nix existe cierta notacin para identificar dispositivos
  SCSI:

       Numero_Bus_SCSI,ID_SCSI_dispositivo,LUN_dispositivo

  El LUN es un parmetro que siempre va a ser 0, menos en el caso
  improbable de que Vd disponga de un cargador de CDs, o un robot
  cambiador de magneto-pticos o de cintas.

  Por tanto, un dispositivo que tuviese el ID 4 en la primera
  controladora SCSI del sistema sera el dispositivo SCSI del sistema
  0,4,0.

  5.  Sistemas de ficheros

  Este apartado est dedicado a explicar algunas cosas para
  familiarizarle con la grabacin de CDs, de modo que le sea mas fcil y
  rpido elaborarlos.

  Una breve explicacin sobre los sistemas de ficheros de los CD-ROMs,
  para que pueda elegir cul es el ms conveniente en cada momento o CD:
  como ya sabr, se sigue un estndar para que todos los ordenadores
  puedan leer los CD-ROMs sin ningn problema, para eso se cre el
  ISO9660 que especifica el estndar.

  Pero dentro de ese estndar existen algunas variantes, o ms
  concretamente extensiones, que permiten ampliar las posibilidades
  originales del ISO9660, como son los nombres largos o incluso sistemas
  de arranque y ciertas cosas ms.

  5.1.  Joliet y Romeo

  Estos sistemas fueron diseados por Microsoft para su plataforma
  Windows 95/NT. Permiten sistemas de archivos tipo VFAT pero con la
  limitacin de longitud a 64 caracteres, en Joliet, y de 128 para
  Romeo.
  Para que Linux sea capaz de ver estos sistemas de ficheros ---por
  ahora slo Joliet--- Necesita tener dicho soporte en el kernel: hasta
  el kernel 2.0.34 no lo haba, aunque es posible tenerlo gracias a
  parches para el kernel que se encuentran en Internet. Estos mismos
  parches permiten ver tambin particiones con FAT32, el sistema de
  archivos que usa la OSR2 de Windows 95 que le posibilita tener
  particiones de hasta 4 TeraBytes, limitacin inexistente en el sistema
  de ficheros de Linux, ext2, que desde su aparicin soporta
  precisamente 4 TeraBytes ;)

  Para los que estn usando un kernel de la serie 2.2.x, decirles que
  tanto el soporte Joliet como de FAT32 vienen de serie, y no tienen
  ms que compilar o cargar mdulos cuando se necesite si el kernel no
  los carga automticamente.

  5.2.  Rock Ridge (High Sierra)

  Esta extensin se ide para la plataforma UNIX, por lo que recoge una
  serie de caractersticas y ventajas de las que nos podemos beneficiar
  ms que con los otros.

  La primera ventaja es la de poder tener un sistema de ficheros con
  atributos propios del UNIX en l, es decir, puede haber archivos
  ejecutables, de acceso restringido a un usuario, enlaces simblicos y
  dems aspectos tpicos de un sistema de archivos UNIX, en el CD. Otra
  de las ventajas es que podemos tener nombres de hasta 128 caracteres,
  a diferencia del Joliet.

  Por otra parte hay un sistema de compatibilidad que permite a otros
  sistemas operativos ver nombres de hasta 32 caracteres; no es mucho,
  pero de algo sirve. Para aquellos que no ven este sistema de ficheros
  tenemos la posibilidad de crear unas tablas de transcripcin en forma
  de ficheros llamados TRANS.TBL, que aparecern en cada directorio del
  CD, transcribiendo el nombre visible por el que de verdad se encuentra
  en l.

  En algunos casos puede ayudar, pero unas veces por fallo del sistema
  operativo forneo, otras por sus controladores, la transcripcin no
  funciona muy bien, llegando incluso al reseteo sin previo aviso.

  5.3.  HFS (Hierarchical Filesystem)

  No s mucho sobre este sistema de ficheros, s que es el que utilizan
  los Macintosh y es incompatible con el de los PC, por lo menos windows
  no sabe lo que es. Como es habitual Linux se adapta y por supuesto hay
  un parche para el kernel para ver este tipo de sistema de ficheros y
  tambin hay un programa para crear imgenes con este sistema de
  ficheros para que podamos grabar CDs a nuestros amigos los del mac.

  Sobre las caractersticas de este sistema de ficheros no puedo decir
  nada, puesto que de momento no las s. Si alguien conoce las
  caractersticas de este sistema por favor, envemelas a mi direccin
  de correo y amablemente le incluir como colaborador.

  5.4.  UDF (Universal Disk Format)

  Este es el sistema de archivos que usan los DVD y tambin se puede
  usar en los CD-ROM normales, de hecho el Adaptec DirectCD usa este
  sistema de ficheros. Las caractersticas son muy interesantes, hasta
  256 caracteres en ASCII y 128 en unicodes, posibilidad de grabar los
  discos en modo packet writing, lo cual elimina la posibilidad de un
  buffer underrun (muy comn cuando no llegan los datos de forma
  constante al CD y acabamos por tirarlo a la basura). Es el sistema de
  ficheros que acabar por estandarizarse. En Linux este sistema de
  ficheros aun est algo verde, aunque ya se ha conseguido leer discos
  grabados con DirectCD con ciertas limitaciones.

  Hasta la fecha el parche para el kernel de Linux soporta hasta la
  versin 1.5 del sistema UDF .

  Para ms informacin, consulte estas pginas web:  http://www.osta.org
  para obtener toda la informacin sobre el sistema UDF y
  http://trylinux.com/projects/udf desde donde podemos acceder a los
  parches para que el kernel vea este sistema de ficheros y no solo eso,
  tambin hay utilidades para crear CDs con el sistema UDF.

  Lo que todava no he conseguido es copiar un sistema UDF a mi
  regrabable y poder grabar en l. Si alguien sabe cmo hacerlo, por
  favor, me lo comunique con explicaciones claras, si no es mucha
  molestia.

  5.5.  EXT2 (Extended Filesystem II)

  S, en efecto, no se trata de un formato de ficheros tpico de CDRoms,
  lo cual no significa que no pueda hacerse.

  Consulte la seccin ``mke2fs''.

  5.6.  El Torito

  El nombre en castellano puede llevar a confusiones pero es el nombre
  que se le ha puesto al sistema para incluir un sistema de arranque en
  el CD.  La explicacin de cmo hacer un CD arrancable con este sistema
  se describe en la seccin del ``mkisofs''

  6.  Programas necesarios para grabar

  Casi todos los programas que aqu vamos a mencionar pueden obtenerse
  de ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/; no
  obstante, es posible que no estn las ltimas versiones de desarrollo,
  por ello procuro adems dar en la seccin de cada uno la direccin
  origen.

  Aqu hago una descripcin de los programas que vamos a necesitar para
  elaborar nuestros propios CDs, con ellos haremos las imgenes y las
  grabaremos; podremos comprobar la diversidad que hay y las ventajas
  que nos proporcionan.

  Slo voy a describir las ltimas versiones de estos programas, que
  aunque en algunos casos estn en fase alpha o de desarrollo (slo
  algunos) funcionan perfectamente.

  En el caso concreto de cdrecord, resulta imprescindible para poder
  usar grabadoras IDE, IDE-ATAPI de puerto paralelo y las regrabables,
  al ser el nico que de momento las soporta.

  6.1.  Programas para creacin de las imgenes

  La parte ms importante es hacer una imagen, pero porqu hay que
  hacer una imagen? Muy sencillo, la imagen es el molde con el que se
  crea el futuro CD; y no slo eso, la imagen nos permite comprobar que
  el CD va a salir como nosotros queremos, pudiendo evitar errores y
  ciertas cosas ms, difcilmente detectables en el momento de la
  grabacin si la generamos al tiempo de grabar.

  Adems, podemos montar las imgenes para comprobar cmo han quedado,
  como se explica en el apartado ``Otras opciones del Kernel
  recomendables''

  S, ya lo s, en windows puedo hacer CDs perfectamente sin necesidad
  de hacer imgenes, si contina leyendo, luego explico cmo podr hacer
  CDs sin necesidad de hacer imgenes.

  6.1.1.  mkisofs

  Puede obtener este programa de
  ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs.

  La ltima versin estable disponible es la 1.11 y la de desarrollo es
  la 1.12b5.

  Este es el principal programa que usaremos para crear nuestras
  imgenes, ya que est hecho especialmente para hacer imgenes ISO9660
  a las que aadir extensiones Rock Ridge, o imgenes Joliet (slo
  versiones 1.12).

  Puede tambin combinar las dos, es decir, en un solo CD tener los dos
  sistemas, Rock Ridge y Joliet, de tal forma que el CD sea portable
  entre los sistemas operativos que usen uno u otro, manteniendo los
  nombres largos (slo versin 1.12).

  Esta explicacin est basada en la versin 1.12a5, de la cual slo voy
  a indicar los parmetros que son ms utilizados.

  La sintaxis de este programa y su uso se explica a continuacin:

     -a o -all-file
        Este parmetro indica que queremos incluir todos los archivos
        que se encuentran en el directorio especificado, ya que el
        programa no incluye por defecto los archivos que contengan
        caracteres ~ y # que son generalmente copias de seguridad
        creados por la mayora de editores *nix.

     -A o -appid
        Este parmetro indica un comentario sobre la aplicacin a la que
        va dirigido el CD, puede ser definido en un archivo con el que
        poder definir por defecto varias cosas. En concreto este
        parmetro se identifica como APPI= especificando lo que quiera
        poner mientras tenga una extensin no superior a 128 caracteres.
        En versiones anteriores a la 1.12 se debe especificar en la
        lnea de comandos con el comentario entre comillas.

     -b o -eltorito-boot
        Este parmetro sirve para indicarle el nombre y la ruta del
        archivo que contiene la imagen de arranque que ser usada para
        hacer un CD arrancable segn el estndar El Torito. De esta
        forma creamos un CD arrancable para aquellas BIOS que acepten
        arrancar desde CD-ROM. La imagen debe tener un tamao de 720,
        1.44 o 2.88 Mbs, la de un diskette de arranque, que contenga por
        ejemplo el LILO. Ojo que esto no funciona muy bien con CDs SCSI
        aunque la controladora SCSI lo soporte tericamente, por culpa
        generalmente de la controladora, no del estndar.

     -c o -eltorito-catalog
        Con este parmetro, que est ligado al anterior para hacer CDs
        arrancable, se especifica dnde se crear en el CDROM el archivo
        del catlogo para el arranque del CD-ROM. Por defecto lo crea en
        el directorio raz de la imagen

     -f o -follow-links
        Con este parmetro hacemos que los enlaces que se encuentren
        dentro del directorio maestro especificado no sean tomados como
        tales, sino como ficheros o directorios reales, lo cual nos
        permite incluir en el CD cosas que no estn en el mismo sistema
        de ficheros donde tenemos el master, es decir, le especificamos
        que siga los enlaces que contenga.

     -help
        Nos muestra la ayuda del programa, muy til si no nos acordamos
        de alguno de los parmetros.

     -i Sirve para aadir archivos que no estn en el directorio o
        subdirectorio que hayamos indicado para hacer la imagen, para su
        adicin a la imagen del CD. Esta opcin est temporalmente
        deshabilitada, y parece ser que da problemas, por lo que est en
        espera de ser reescrita.

     -J Gracias a esta opcin podremos crear CDs con sistema de ficheros
        Joliet. No incluida en versiones anteriores a la 1.12.

     -l Gracias a este parmetro podremos establecer el modo de
        compatibilidad de ficheros de 32 caracteres para aquellos
        sistemas que no aceptan la longitud de los ficheros para los que
        est grabado el CD. Usar con cuidado.

     -m o -exclude
        Con este parmetro indicamos un patrn de archivos que no
        queramos incluir en el CD, que puedan encontrarse dentro de
        algn subdirectorio en la ruta desde la que vamos a hacer la
        imagen (ficheros core etc...) Se pueden usar comodines o nombre
        completo.

     -o o -output
        Con esta opcin indicamos el nombre que le queremos dar al
        fichero, incluida su ruta, que contendr la imagen, o el fichero
        de dispositivo correspondiente a la particin donde queremos
        volcarla.

        El volcar las imgenes (slo de datos) a particin es muy
        recomendable para equipos lentos; dicha particin no ha de tener
        formato alguno, por ello la lectura es ms rpida, ocurre como
        con la particin de swap.

        Si utilizamos volcado a particin, conviene resetearla antes
        de generar una imagen nueva con el comando:

          dd if=/dev/zero of=/dev/sda1

     Suponiendo que sda1 sea donde queremos volcar la imagen;  OJO con
     especificar una particin equivocada, o se ir a hacer grgaras...

     -p o -preparer
        Este es complementario al parmetro -A, con l podremos indicar
        el autor del CD, Tiene una extensin mxima de 128 caracteres.
        Corresponde al parmetro PREP= en el archivo

     -print-size
        Muestra por pantalla el tamao estimado que ocupar la imagen,
        sin hacer nada ms.

     -P o -publisher
        Especifica el editor del CD. Su longitud mxima son 128
        caracteres. En el archivo .mkisofsrc se identifica como PUBL=.

     -quiet
        No muestra mensajes por pantalla.

     -R Genera un sistema de ficheros con extensiones Rock Ridge. Esta
        es la opcin principal para generarlo, manteniendo los permisos
        tal y como estn.

     -r Esta opcin es como la anterior pero resetea los permisos de
        modo que todos los usuarios puedan acceder al CD por completo.

     -T o -translation-table
        Con esta opcin generamos los archivos de transcripcin,
        llamados TRANS.TBL en cada directorio del CD-ROM, que contendrn
        todas las transcripciones de los nombres de fichero para que se
        puedan ver por ejemplo en un sistema DOS (de tipo de nombres de
        fichero 8+3) y con su longitud correspondiente en el sistema
        Rock Ridge. Cuando utilizamos la opcin -l los archivos tendrn
        nombres de 32 caracteres y no de 8+3.

     -v Nos muestra la ayuda y la versin del programa. Y mientras se
        genera la imagen nos va mostrando el porcentaje de la imagen
        generada y una estimacin de tiempo para terminar. Muy til.

     -V Esta opcin nos permite darle un nombre de volumen al CD para
        identificarlo. En el archivo .mkisofsrc se especifica con el
        parmetro VOLI= con una extensin mxima de 32 caracteres.

     -x Esta opcin nos permite excluir un directorio especfico que se
        encuentre dentro de la ruta de origen. Puede excluir hasta un
        mximo de 1000 directorios, ojo que hay que especificar el
        parmetro antes de cada directorio, tantas veces como
        directorios a excluir haya:

          mkisofs ... -x estedirectoriono -x yestetampoco -x nieste

  Estos son los parmetros ms utilizados, si quiere ms informacin o
  ms posibilidades siempre puede consultar la pgina del manual. Ahora
  unos pocos ejemplos de cmo funcionan algunos parmetros:

  Para generar un sistema de ficheros Rock Ridge simplemente tenemos
  hacer esto:

       mkisofs -a -r -T -o /cd/imagen.iso /ficheros

  Aqu se indica un sistema de ficheros Rock Ridge al que se le incluyen
  todos los archivos que se encuentren en el directorio /ficheros,
  generando archivos TRANS.TBL, para el archivo de imagen
  /cd/imagen.iso.

  Para que al crear la imagen se establezca el nombre de volumen, la
  identificacin, el editor y la aplicacin del CD, hay dos mtodos, uno
  consiste en crear un archivo llamado .mkisofsrc en nuestro directorio
  personal.  Recuerdo que este archivo slo sirve para la versin 1.12,
  con una sintaxis como sta:

     VOLI=
        El nombre de volumen.

     PUBL=
        Cualquier cosa que quiera poner, normalmente un pequea
        descripcin del CD.

     PREP=
        Aqu puede poner sus datos o cualquier cosa para identificar el
        CD como suyo.

     APPI=
        Aqu puede poner una descripcin del objetivo de este CD o su
        destino.

  O bien puede especificarlo en la lnea de comandos as:

       mkisofs -a -R -l -T -V "Volumen" -P "descripcin CD" -p  "preparador" \
        -A "Aplicacin" -o imagen.iso /ficheros

  Este nico comando se ha introducido en dos lneas, detrs del
  carcter \ hay que teclear Enter, y teclear el resto. Se ha hecho as
  por motivos de formato de este documento.

  En l podemos observar, aparte de cmo poner el nombre de volumen al
  CD y otras cosas, que estamos haciendo un CD con el modo de
  compatibilidad para otros sistemas de 32 caracteres, tomando los
  permisos y la identificacin que tiene cada archivo en el disco.

  Un ejemplo de cmo crear un sistema de ficheros con Joliet es:

       mkisofs -a -J -f -m '*.o' -m core -x /master/excluir -o /cd/imagen.iso /master

  En este sistema de ficheros Joliet hemos excluido todos los archivos
  que correspondan con la descripcin *.o y core con la opcin -m, la
  opcin -f indica que los enlaces que se encuentren sern tomados como
  los archivos o directorios a los que apuntan. Por ltimo, excluimos el
  directorio excluir que se encuentra en la ruta de origen desde donde
  queremos hacer la imagen.

  Y por ltimo un sistema de ficheros con Rock Ridge y Joliet, que
  recuerdo que slo se puede hacer en la versin 1.12:

       mkisofs -a -J -f -R -m '*.o' -m core -x /master/excluir -o /cd/imagen.iso /master

  Para hacer un CD arrancable (para arrancar con l es necesario que la
  BIOS soporte arranque desde unidades CD-ROM) necesitamos la imagen de
  un disquete de arranque de 720KB, 1.44MB o 2.88MB, de MS-DOS o Linux
  segn queramos, que podemos encontrar en varios sitios ya hechos o
  hacernos nosotros mismos. Una vez tenemos la imagen, la ponemos dentro
  del directorio en donde se encuentran los archivos desde los que vamos
  a hacer la imagen y procedemos a lo siguiente:

       mkisofs -a -b /cdboot/eltorito.img -c /cdboot/catalogo -R -T -o imagen.iso /master

  Ntese que a los parmetros -b y -c le especificamos lo que parece un
  path absoluto, pero el directorio /cdboot no se encuentra en el
  directorio raz de su disco duro, sino que en realidad es un
  subdirectorio de /master;  esto es as porque mkisofs para este
  parmetro se sita como si estuviera ya dentro del CD.

  6.1.2.  mkhfs

  Puede obtener este programa de ftp://ftp.ge.ucl.ac.uk/pub/mkhfs.

  Es su homlogo para el sistema de ficheros de los mac, HFS, no lo he
  llegado a probar todava pero seguro que funciona bien. Su uso es muy
  sencillo y no tiene mucha complicacin.

  6.1.3.  mkhybrid

  Puede obtener este programa de ftp://ftp.ge.ucl.ac.uk/pub/mkhfs.

  Es la mezcla de los dos anteriores, la ultima versin usa cdigo del
  mkisofs 1.12 para mejor soporte de Joliet. La ayuda parece exactamente
  la del mkisofs, salvo que incluye las siguientes opciones para aadir
  el sistema de ficheros de los mac:

     -g o -apple
        Aade la extensin ISO9660 de Apple, para la compatibilidad con
        el estndar.

     -h o -hfs
        Crea el sistema HFS hbrido para la extensin ISO9660.

     -probe
        Prueba todos los archivos para el sistema Unix/HFS.

     -mac-name
        Crea todos los nombres segn el estilo de los mac para
        ISO9660/Joliet/Rock Ridge

     -no-mac-name
        Evita lo anterior para los archivos Unix/Mac

  6.1.4.  mke2fs

  Cmo? Pero si este programa sirve para crear sistemas de ficheros en
  el formato nativo de Linux, el ext2!

  Pues s, es posible crear CD-Roms en formato ext2, que por supuesto no
  podrn leerse en sistemas que no dispongan de algn tipo de soporte
  para leer este tipo de sistema de archivos, bsicamente Linux.

  Su utilidad depender de la creatividad de cada uno ;)

  Para ello, hay que seguir el siguiente procedimiento:

  1. Primero hay que calcular el tamao mximo que podemos usar en una
     imagen para aprovechar la mayor cantidad de datos en el CD es fcil
     y es una operacin sencilla en la que intervienen dos programas y
     en la que no hay ni que sacar la calculadora.

     Primero utilizamos el cdrecord en su versin de desarrollo 1.8 de
     la siguiente forma:

  # cdrecord -v dev=3,0 -atip
  Cdrecord release 1.8a29 Copyright (C) 1995-1999 Jrg Schilling
  TOC Type: 1 = CD-ROM
  scsidev: '3,0'
  scsibus: 0 target: 3 lun: 0
  Using libscg version 'schily-0.1'
  atapi: 0
  Device type    : Removable CD-ROM
  Version        : 2
  Response Format: 2
  Capabilities   :
  Vendor_info    : 'YAMAHA  '
  Identifikation : 'CRW4260         '
  Revision       : '1.0q'
  Device seems to be: Generic mmc CD-RW.
  Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
  Driver flags   : SWABAUDIO
  Drive buf size : 1176000 = 1148 KB
  Current Secsize: 512
  ATIP info from disk:
    Indicated writing power: 5
    Is not unrestricted
    Is not erasable
    ATIP start of lead in:  -11324 (97:31/01)
    ATIP start of lead out: 359849 (79:59/74)
  Disk type: Long strategy type (Cyanine, AZO or similar)
  Manuf. index: 22
  Manufacturer: Ritek Co.

  Una vez obtenida esta informacin nos fijamos en la siguiente linea:

         ATIP start of lead out: 359849 (79:59/74)

  de la que nos interesa el numero 359849 el cual al multiplicarse por
  2048 nos dar el tamao mximo de la imagen que puede ser grabada en
  el CD. Si se fijan el tamao concuerda con un CD 80 minutos que corre
  sponde exactamente a 702 MegaBytes absolutos del tamao de la imagen.

  2. Crear un fichero imagen vaco; con los datos anteriores:

       dd if=/dev/zero of=imagen-vacia.ext2 bs=2048 count=359849

  3. Formatearlo:

       mke2fs -m 0 -b 2048 imagen-vacia.ext2

  mke2fs advertir de que imagen-vacia.ext2 no es un fichero de disposi
  tivo de bloque, y le pedir confirmacin:

       imagen-vacia.ext2 is not a block special device.
       Proceed anyway? (y,n) y

  4. Montarlo, mediante loopback, en lo que va a ser nuestro directorio
     maestro:

       mount -o loop imagen-vacia.ext2 /mnt/master

  5. Copiamos a l los ficheros que queramos, si por ejemplo queremos
     hacer una rplica de /etc :

       cd /etc
       find | cpio -pdamvu /mnt/master

  6. Lo desmontamos, y grabamos normalmente.

  Si queremos montar un CD-Rom de este tipo, habr que especificarle a
  mount que el tipo de sistema de ficheros es ext2, y de slo lectura:

       mount -t ext2 -o ro /dev/cdrom /mnt/cdrom

  si queremos incluirlo en /etc/fstab, habr que indicar adems de su
  tipo de sistema de ficheros, y de ser slo lectura, que no sea
  comprobado:

       /dev/cdrom      /mnt/cdrom      ext2    defaults,ro     0 0

  El ltimo 0 es el que hace que fsck no lo compruebe en cada arranque.

  6.2.  Software de extraccin de audio

  Aviso: La mayora de las grabadoras requieren que el orden de palabra
  de los ficheros de audio en formato CDDA o PCM raw sea Big Endian,
  salvo las Yamaha, Sony y recientemente las ltimas grabadoras que
  cumplen el estndar SCSI-3/MMC, que lo necesitan Little Endian.

  Casi todos los programas extractores de CD-Audio extraen por defecto
  en Big Endian.

  Si graba ficheros de audio con el orden de palabra equivocado para su
  grabadora, cuando intente escuchar ese CD no oir ms que un
  horripilante ruido, similar al sonido de una televisin sin
  sintonizar.

  Dependiendo del software que utilice para grabar, esto se puede
  abordar de dos maneras:

    cdrecord: Indistintamente de la grabadora que tenga, y del software
     de extraccin que use, extraiga siempre en Big Endian, el formato
     por defecto.

     cdrecord sabe qu formato necesita cada grabadora, e invertir el
     orden de palabra si es necesario;  notar si lo invierte porque
     aparecer la palabra swab en el listado de pistas de audio a
     grabar.

    cdwrite: Aqu no hay error posible, ha de saber qu orden necesita
     su grabadora, y tener los ficheros CDDA con el orden apropiado.

  Otro concepto, que aunque es mencionado ms veces posteriormente a lo
  largo del documento, quiero recalcar, y que necesitar especialmente
  con los extractores, es el del dispositivo genrico SCSI, que es
  explicado en la seccin ``Dispositivos genricos''.

  6.2.1.  readcdda

  Este programa es un poco difcil de encontrar, ya que las versiones
  disponibles son modificaciones o portings del original a Linux.

  Uno de los paquetes que lo trae modificado es el X-CDRoast, que es de
  donde lo he obtenido, ver seccin ``X-CD-Roast''.

  No hay pgina man disponible, y tampoco certifico que los comandos que
  aqu explico correspondan a la versin que Vd. pueda conseguir; no
  obstante lo expongo aqu por su excepcional calidad y fiabilidad. Eso
  s, slo funciona con dispositivos SCSI.

  Su sintaxis es un poco pesada, pero como deca antes, vale la pena.

  El orden de palabra de los ficheros cdda creados con readcdda es Big
  Endian por defecto.

     -D dispositivo
        Para especificar el dispositivo genrico de la unidad con la que
        vamos a extraer.

     -B dispositivo
        Dispositivo de bloque de la unidad con la que vamos a extraer,
        son vlidos tanto dispositivos /dev/srX como /dev/scdX.

     -t Desde qu pista a extraer

     -z Hasta qu pista extraer (inclusive)

     -o desplazamiento del principio de la pista

     -s desplazamiento del final de la pista

     -d Tiempo total de grabacin

     -S Velocidad de extraccin.

     -v imprimir informacin sobre el CD.

     -x Formato de salida Little Endian

  As que un ejemplo, utilizando el CDROM SCSI que estuviera en el ID
  SCSI 3, que fuese el primer CDROM disponible, extrayendo de la pista 1
  a la 15, a velocidad 6x en un solo fichero .cdr, sera:

       readcdda -D /dev/sgd -B /dev/scd0 -t 1 -z 15 -o 0 -s 0 -S 6 audio.cdr

  Esto es un poco latoso si queremos que cada pista tenga su fichero,
  para ello podemos utilizar un bucle:

       for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
       readcdda -D /dev/sgd -B /dev/scd0 -t $i -z $i -o 0 -s 0 -S 6 audio.$i.cdr ;
       done

  6.2.2.  cdda2wav

  Este programa es ms reciente, y permite extraer de CDROMs IDE si
  stos soportan extraccin. Puede obtenerlo de
  ftp://ftp.gwdg.de/pub/linux/misc/cdda2wav/. Tambin se puede encontrar
  incluido en el mismo paquete de las ltimas versiones de cdrecord.

  Comentar slo las opciones ms habituales:

     -D Dispositivo genrico de la unidad lectora; /dev/sgX o 0,1,0 si
        es SCSI; si es IDE, con el fichero de dispositivo de bloque
        correspondiente: /dev/hdb por ejemplo para un CD esclavo del bus
        primario, o el enlace simblico que apunte al apropiado.

     -A Dispositivo auxiliar: ser un /dev/scdX si el lector es SCSI o
        el mismo que le especificamos en -D si es IDE.

     -I Tipo de interfaz; generic_scsi para dispositivos SCSI o
        cooked_ioctl para IDE.

     -x Extraccin a calidad CD: muestreo a 44100Hz, 16 bits estreo.
        Esta es la opcin por defecto, asi que si quiere estas opciones
        no tendr que volver a ponerlas.

     -t primera+ultima
        Especificamos la pista o rango de pistas a extraer.

     -O Formato del fichero de salida, opciones validas tiles pueden
        ser raw para formato cdr (CDDA)  o wav.

     -E Orden de la palabra binaria: big para Big Endian, little para
        Little Endian.

     -B Extraer cada pista a un fichero separado.

     -S nmero
        Velocidad de extraccin.

     -P Desactivar overlap (utilizar si se obtienen mensajes de error
        tipo increase overlap (X) or decrease SYNC_SIZE (X).

     -H No crear ficheros informativos (.inf) por cada fichero de audio
        creado.

     -e Permite la salida directa al dispositivo de audio del ordenador.
        Por defecto /dev/dsp.

     -K dispositivo
        Cambia el dispositivo de audio por defecto /dev/dsp por que se
        le especifique.

     -q No muesta informacin alguna mientras se realiza el proceso de
        extraccin.

  Supongamos que usamos un lector SCSI, que tiene el ID 2 del bus SCSI,
  que queremos extraer las pistas de la 3 a la 8, en formato CDDA, Big
  Endian (por defecto), en ficheros con el patrn audio_*.cdr separados,
  con sus correspondientes ficheros informativos:

       cdda2wav -D /dev/sgb -A /dev/scd0 -I generic_scsi -x -t 3+8 -B -O cdr -S 10 audio

  tambien se puede escribir de forma ms abreviada de la siguiente
  forma:

       cdda2wav -D 0,2,0 -I generic_scsi -x -t 3+8 -B -O cdr

  Si extraemos las pistas con la opcin -O wav por defecto sern Little
  Endian.

  En la versin 1.0 de cdda2wav y en adelante para extraer las pistas de
  audio directamente, aunque hayan otros tipos de pistas en el disco,
  como por ejemplo una de datos al principio o al final, se ha de poner
  tan slo esto:

       cdda2wav -D 0,2,0 -I generic_scsi -B

  al mismo tiempo, esto nos puede servir de ejemplo de como se pueden
  extraer pistas para la seccin ``DAO con cdrecord''.

  Existe una variante del cdda2wav, llamada cdparanoia, de rendimiento
  muchsimo menor, pero que como su nombre indica, es muy paranoica con
  la calidad de las pistas extradas, puede resultar til con CDs muy
  estropeados.

  6.3.  Software de grabacin

  6.3.1.  cdrecord

  La pgina principal de cdrecord es

  Puede obtenerlo por FTP de ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/.

  Este programa es ms avanzado y actual que cdwrite, al estar en
  desarrollo e incorporar soporte para las novedades del mercado actual,
  a pesar de no soportar algunas unidades antiguas que s lo hace
  cdwrite.

  La mayor ventaja de este programa es que funciona perfectamente con
  las grabadoras IDE (con emulacin SCSI activada, por supuesto) y SCSI,
  incluyendo ms opciones como el soporte para regrabables y sus
  comandos especficos, como borrar un CD-RW, una particin, etc.

  Permite visualizar las tablas de contenido (TOC, Table Of Contents),
  que es donde se almacena la informacin sobre las pistas y el tamao
  de las mismas.

  Esta tabla la genera el programa y se tiene que grabar para que se
  pueda leer el CD, ya sea cuando haga un CD multisesin o al hacer un
  CD normal o de CD-Audio.

  Tambin puede grabar pistas CDI, en modo normal de datos data 1 y data
  2, multisesin xa1 y xa2 de datos, y audio.

  Otra funcin muy til es que puede realizar ciertas pruebas a la
  unidad para comprobar sus capacidades y compatibilidad, etc.

  Los comandos que ms nos pueden interesar se detallan a continuacin:

     -version
        Muestra la versin del programa. Recomendada la versin 1.6.1
        final, las que llevan a despues del nmero son alphas y no es
        recomendable usarlas. Para unidades tanto IDE como SCSI se
        recomienda la 1.8aXX.

     -v Muestra informacin mientras se ejecuta el programa para conocer
        el estado de la grabacin (Muy recomendable ya que indica los Mb
        grabados y el porcentaje de llenado del buffer).

     -V Muestra los comandos SCSI mientras se ejecuta el programa.

     -debug
        Muestra mensajes para encontrar posibles fallos.

     dev=destino
        Especifica la situacin de la grabadora en el sistema SCSI. Hay
        que especificarle el bus scsi, el ID SCSI del dispositivo, y el
        LUN SCSI (Logical Unit Number, valor variable slo si se emplea
        por ejemplo un lector mltiple de CDs, en donde 0 identificara
        a la primera bandeja, 1 a la segunda, etc).

        Un ejemplo frecuente sera 0,4,0 para el primer bus SCSI, el ID
        SCSI 4 y el LUN de todo dispositivo no mltiple, 0.  Si usamos
        la emulacin SCSI o una unidad de puerto paralelo, siempre ser
        0,0,0.

     -dummy
        Con este parmetro indicamos que vamos a hacer un test de la
        unidad y del sistema, simulando una grabacin para comprobar si
        se realiza adecuadamente. Durante este test el lser de la
        grabadora est desactivado por lo que no correremos el riesgo de
        perder un CD.

     -multi
        Esta opcin es para indicar que vamos a hacer un CD multisesin,
        es decir con varias pistas de datos. Este parmetro no puede ser
        usado en unidades Sony ya que no llevan soporte hardware para
        CD-ROM modo XA 2 por lo que se deber de usar el parmetro -data
        para este fin.

     -msinfo
        Esta opcin nos permite ver la informacin que hay grabada en un
        CD multisesin o con al menos una pista, mientras el CD no se
        haya cerrado.

     -toc
        Muestra informacin sobre la tabla de contenidos del CD, este
        parmetro puede ser usado tanto en las grabadoras como en los
        lectores.

     -fix
        Esta opcin es para cerrar un CD que no se haya cerrado antes,
        si despus de haber grabado los datos no se ha escrito la tabla
        de contenidos. De momento esto no funciona con las unidades
        TEAC.

     -nofix
        Esta opcin, usada en la lnea de comandos es para que al grabar
        un CD no se escriba la tabla de contenidos, para que no lo
        cierre. Puede ser til para grabar un CD por pasos o para grabar
        un CD-Audio ya que hay lectores de CD-Audio que pueden leer CDs
        sin cerrar, siempre y cuando no contengan adems datos. Los CDs
        de datos sin cerrar no pueden ser usados por unidades lectoras.

     -load
        Esta opcin es para cerrar la bandeja, luego sale del programa.

     -eject
        Esta opcin permite expulsar el CD una vez grabado, hay unidades
        como las Philips o las Yamaha que deben hacer esto.

     speed=X
        Esta opcin es para indicarle a la unidad la velocidad a la que
        debe grabar. El nmero especifica el multiplicador de 150Kb/s
        para datos y 172Kb/s para audio.

     blank=opcion
        Esta opcin borra un CD-RW y sale, o bien borra antes de
        continuar con una grabacin. Slo puede ser usada por unidades
        regrabables y con discos CD-RW. Las opciones se describen a
        continuacin:

       help Muestra la ayuda.

       all Borra totalmente un disco. Esta opcin tarda bastante
        tiempo.

       disc o disk Borra un disco totalmente.

       fast o minimal Borrado rpido del disco: Solo borra el TOC, los
        pregaps y el PMA.

       track Borra una sola pista.

       unreserve Activa una pista reservada.

       trtail Borra la cola de una pista.

       unclose Abre una pista cerrada.

       session Borra la ultima sesin.

     fs=
        Esta opcin especifica el buffer fifo para almacenamiento
        intermedio de los datos, a fin de hacerlos llegar a la grabadora
        sin retraso.  Para facilitar las cosas puede especificar este
        buffer con un nmero seguido de b para indicarle bytes, k para
        kilobytes, m para megabytes.

        Por defecto tiene un buffer de 4 Mb. La recomendacin para el
        tamao del buffer es de entre 4 y 32 Megas, debiendo ser como
        mnimo igual al tamao de buffer interno de la grabadora y como
        mximo no superior a la mitad de la RAM fsica del ordenador.

        Lo normal es que no necesite poner ms de 8 MB que es lo que yo
        recomiendo. Si an as aparecen mensajes como fifo empty count,
        tiene problemas de configuracin o hardware. Ej: fs=8m.

     driver=
        Esta opcin es para especificarle un driver concreto; para ver
        la lista de todos los drivers simplemente especifique
        driver=help. Si no se indica opcin, cdrecord tratar de
        encontrar el driver ms apropiado para la unidad. Si no lo
        consigue, tendr que indicrselo; sepa que si el driver no es
        absolutamente compatible corre un riesgo muy grande de perder el
        CD.

     -checkdrive
        Esta opcin busca el driver que corresponda a su unidad y
        termina la ejecucin.

     -prcap
        Esta opcin imprime las posibilidades de las unidades que
        cumplan el estndar SCSI-3/mmc y sale.

     -inq
        Esta opcin hace un examen de la unidad, imprime los resultados
        en pantalla y sale.

     -scanbus
        Esta opcin examina el bus SCSI en busca de unidades. Sirve para
        buscar nuestra unidad.

     -reset
        Esta opcin resetea el bus SCSI donde se est nuestra grabadora.

     -audio
        Detrs de esta opcin se indican los nombres de los archivos de
        sonido que sern grabados como pistas de audio, siempre y cuando
        los archivos tengan una calidad de muestreo 44.100 Khz a 16
        Bits, estreo en alguna variante PCM; si no son as, sern
        rechazados por cdrecord.  Acepta formato CDDA (tanto .cdda como
        .cdr son extensiones vlidas), .wav, .au y .raw.

        cdrecord, si no se le especifica lo contrario, asume que el
        orden de palabra es Big Endian, y convertir automticamente a
        Little Endian si detecta que la grabadora lo necesita.

     -data
        Tras de esta opcin se indica el nombre del archivo que
        corresponde a la imagen ISO9660 que anteriormente hemos creado
        con mkisofs u otro de los anteriormente descritos. Esta opcin
        viene por defecto, lo que quiere decir que si no la indicamos
        grabaremos de esta forma.

     -mode2
        Si esta opcin esta presente, todas las pistas de datos que la
        sigan se grabarn en modo 2.

     -xa1
        Si esta opcin esta presente, todas las pistas que la sigan se
        grabarn en modo XA 1.

     -xa2
        Si esta opcin esta presente, todas las pistas que la sigan se
        grabaran en modo XA 2.

     -cdi
        Si esta opcin esta presente, todas las pistas que la sigan se
        grabaran en CDI.

  Estos son los comandos que ms se usan, para ampliar informacin puede
  acudir al manual. Ahora unos ejemplos para que la cosa quede mas
  clara:

       cdrecord -scanbus
       cdrecord dev=0,0,0 -checkdrive
       cdrecord dev=0,0,0 -prcap
       cdrecord dev=0,0,0 -inq
       cdrecord dev=0,0,0 -toc
       cdrecord dev=0,0,0 -msinfo

  As se realizan los test; en el primero se escanea el bus SCSI para
  ver nuestra unidad, en los dems se toma que tenemos la unidad en el
  dispositivo que corresponde al bus 0, id 0 y lun 0 para hacerle los
  test a los que corresponde la explicacin anterior.

       cdrecord dev=0,0,0 fs=8m speed=2 -nofix -eject -xa1 imagen.iso -audio audio1.wav audio2.cdda audio3.au

  Aqu podemos ver que le hemos puesto 8 Mb al buffer fifo, especificado
  que grabe a doble velocidad, que expulse el CD una vez terminado, que
  la primera pista es una imagen de datos en formato multisesin XA 1 y
  las siguientes pistas sern de audio (este programa puede grabar
  varios formatos de audio como el .wav de Microsoft, el .cdda, el PCM
  en bruto o .raw y el .au siempre y cuando tengan una calidad de
  muestreo de 44100 Hz a 16 bits, en estreo). Y al final no ser
  escrita la TOC por lo que para hacerlo tenemos la siguiente lnea:

       cdrecord dev=0,0,0 -fix

  Para grabar una sola pista de datos podemos usar esto:

       cdrecord dev=0,0,0 fs=8m speed=2 -eject imagen.iso

  Ya que como se dijo antes no haca falta especificar el parmetro
  -data, que es el asumido por defecto.

  Las nuevas opciones que incluye el ``cdrecord 1.8'' se describen en su
  seccin.

  6.3.1.1.  Parmetros configurables permanentemente de cdrecord

  Como puede observar, es un poco latoso el tener que especificar datos
  no cambiantes una y otra vez, como por ejemplo dnde se encuentra la
  grabadora, o la velocidad de grabacin ya que generalmente grabar
  casi siempre al mximo de velocidad.

  Para no tener que especificarlo siempre en la lnea de comandos,
  cdrecord provee la posibilidad de establecer dichos parmetros por
  defecto, mediante las variables de entorno CDR_DEVICE, CDR_SPEED y
  CDR_FIFOSIZE.

  Supongamos que su grabadora est en el primer bus SCSI, y tiene el ID
  4.  (El LUN siempre va a ser 0). Y que quiere que la velocidad de
  grabacin por defecto, a menos de que se especifique lo contrario
  mediante parmetros de la lnea de comandos, va a ser a doble
  velocidad (2x) y el buffer de datos FIFO sea de 16 megabytes.

  Estableceramos dichas variables de entorno mediante la insercin,
  generalmente en el fichero /etc/profile, de las siguientes lneas,
  suponiendo que utilice bash como intrprete de comandos:

       CDR_SPEED=2
       CDR_DEVICE=0,4,0
       CDR_FIFOSIZE=16m
       export CDR_SPEED CDR_DEVICE CDR_FIFOSIZE

  Dichas variables no estarn disponibles hasta que el sistema relea el
  fichero /etc/profile, lo mejor es reiniciar el terminal con un logout
  o bien recargando el archivo con source /etc/profile.  Si esto no
  funciona, reinicie el sistema para salir de dudas.

  6.3.1.2.  Grabacion sin imagen

  Ahora viene algo que puede interesar a ms de uno, hacer un CD
  directamente desde el disco sin necesidad de hacer una imagen previa.

  He de advertir sobre este procedimiento y es que no se debe, por
  ninguna circunstancia, acceder al disco que contenga el directorio
  maestro con los ficheros a partir de los que se est generando una
  imagen directa al CD, ya que cualquier mnimo retraso en la
  transferencia de datos puede ocasionar que no se grabe el CD
  correctamente a pesar de que durante la grabacin no aparezcan
  errores.

  El problema de que no se genere correctamente la imagen puede no
  radicar necesariamente en que su disco duro sea lento, hay otros
  factores como la memoria disponible: tenga en cuenta que por ejemplo
  mkisofs necesita al menos 12MB de memoria para generar las extensiones
  Rock Ridge.

  Repito, no acceda al disco duro maestro durante la grabacin, peligro
  de hacer un CD desde el que no se pueda leer ningn dato sano, aunque
  aparentemente se haya grabado bien; esto se puede comprobar editando
  un archivo de texto y viendo como parte del archivo anterior o los
  gaps se han introducido en ellos.

  As mismo recomiendo realizar esta operacin slo con versiones de
  cdrecord superiores o iguales a la 1.6.1, y 1.12b5 de mkisofs , ya que
  he comprobado que funcionan y se entienden mucho mejor, con mucho
  menor peligro de realizar CDs corruptos.

  Antes de grabar el CD debe realizar primero la siguiente operacin:

       mkisofs -r -T -l -print-size -f /files

  la cual nos facilitar un nmero, este nmero se lo deberemos de pasar
  en un parmetro al cdrecord para que nos reconozca el tamao de la
  imagen a grabar, ya que si no, cdrecord no tiene forma de saber cul
  es el tamao de la imagen. De esta forma, si por ejemplo, mkisofs nos
  mostrar la siguiente lnea:

       Total extents scheduled to be written = 290699

  Para que cdrecord reconozca el tamao de la imagen a grabar:

       nice --20 mkisofs -r -T -l -f /files | nice --20 cdrecord fs=16m \
       tsize=290699*2048 -eject -

  O bien para multisesin:

       nice --20 mkisofs -r -T -l -f /files | nice --20 cdrecord fs=16m \
       tsize=290699*2048 -eject -multi - -audio audio1.wav audio2.wav audio3.au

  Ntese que no especificamos ni la localizacin SCSI de la grabadora,
  ni la velocidad de grabacin, ya que la hemos establecido con las
  variables de entorno mencionadas anteriormente.

  Seguramente se preguntar el porqu del nice --20 que hay delante de
  cada uno de los programas. El comando nice sirve para asignar la
  prioridad de ejecucin, y en este caso concreto establecemos la mxima
  posible.

  Se preguntar por qu en la opcin tsize del cdrecord multiplico por
  2048 la cantidad dada por el mkisofs. La razn es muy simple, a partir
  de la version 1.6.1 y 1.8 de cdrecord, hay que pasarle el tamao en
  bytes de la imagen, y debido a que realiza la multiplicacin l mismo,
  slo lo tenemos que multiplicar por el tamao de cada sector de un CD
  y listo.

  Use esto con cuidado.

  Y para terminar voy a indicar cmo usar el programa con las grabadoras
  IDE/ATAPI y de puerto paralelo, que por ejemplo al ejecutar la
  siguiente linea nos muestre algo como lo siguiente:

       # cdrecord -scanbus
       Cdrecord release 1.6 Copyright (C) 1995-1998 Jrg Schilling
       scsibus0:
                         0) 'HP      ' 'CD-Writer+ 7200 ' '3.01' Removable CD-ROM
                         1) *
                         2) *
                         3) *
                         4) *
                         5) *
                         6) *
                         7) *

  As es como ve cdrecord nuestra grabadora, ya sea interna o externa,
  por lo que para indicarle cmo acceder a nuestra grabadora tendremos
  que especificar el parmetro dev=0,0,0.

       cdrecord dev=0,0,0 speed=2 fs=16m -v -dummy image.raw

  Recomiendo usar la grabadora con una version de cdrecord 1.6.1, aunque
  como se aprecia en el escaneado de muestra anterior hecho con la
  versin 1.6, esta ltima es capaz de usarla. Tambin es muy
  recomendable hacer pruebas de grabacin para comprobar que no haya
  falta velocidad en el puerto paralelo antes de proceder a la grabacin
  final de CD-ROMs.

  6.3.2.  cdwrite

  Puede obtener este programa (y casi todos los relativos a creacin de
  CDs) de ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/.

  Este programa era el ms utilizado hasta hace un par de aos mas o
  menos, (y el nico que haba). Est en actual desuso, ya que ha dejado
  de desarrollarse y se ha quedado algo anticuado; de todas formas
  funciona perfectamente en grabadoras SCSI a excepcin de las Sony.

  Si ha comprendido los comandos del cdrecord no tendr problemas en
  entender los de este programa ya que no tiene muchos. Una diferencia
  que s hay entre uno y otro es que para identificar la unidad
  grabadora utiliza los dispositivos /dev/srX y no va directamente al
  bus SCSI, lo cual puede resultar mas fcil de usar.

  Por defecto cdwrite busca /dev/cdwriter como dispositivo por defecto
  de la grabadora, por lo que si hace un enlace simblico del
  dispositivo /dev/sgX a /dev/cdwriter con el dispositivo de acceso
  genrico correspondiente, (vea seccin ``Dispositivos genricos'') se
  ahorrar un parmetro ms que poner.

  cdwrite necesita que se le especifique el tamao en bytes de la imagen
  que va a grabarse; para saberlo, usamos el programa isosize (lo
  podemos encontrar dentro del paquete de distribucin de cdwrite con
  otras utilidades extra que nos pueden venir muy bien); si nuestra
  imagen se llama imagen.iso:

       # isosize imagen.iso
       382060544

  nos informa de que el tamao es 382060544, parmetro que le
  especificaremos posteriormente con -b.

  podemos usarlo tambin con CD-Roms o particiones, si hemos generado la
  imagen directa a una particin en lugar de a fichero:

       isosize /dev/sda1
       634986355

  Si hemos volcado la imagen generada por mkisofs en la primera
  particin del primer disco SCSI (con la opcin -o /dev/sda1).

  Algunos ejemplos de cmo se usa cdwrite son:

       cdwrite -ve -s 2 -b 382060544 -D /dev/sgd -data /dev/scd0

  Copiar directamente el CD que est en el primer CD-Rom SCSI del
  sistema a la grabadora, expulsar el CD una vez listo, e ir
  informando del transcurso de la grabacin; 382060544 es el tamao del
  CD en cuestin, que hemos averiguado previamente mediante isosize.

       cdwrite -s 2 -e -D /dev/sgd -b 382060544 -data image.iso -audio *.cdr

  Grabar un CD mixto de datos y audio, en donde el parmetro -s indica
  la velocidad de grabacin (equivale al speed=2 del cdrecord), el
  parmetro -e expulsa el CD al terminar (equivalente al -eject), el -D
  indica la unidad grabadora, aunque si ha hecho un link de /dev/sgd
  (por ejemplo) a /dev/cdwriter no hace falta que lo especifique; y por
  ltimo igual que en el anterior estn los parmetros -data y -audio,
  estando el formato de los ficheros de sonido en Compact Disc Digital
  Audio (extensiones .cdda o .cdr); podemos pasarlo de otros formatos a
  ste mediante el programa sox.

  cdwrite necesita que el orden de la palabra del fichero de audio sea
  el apropiado para su grabadora, u obtendr un CD en el que slo se
  escuche un desagradable ruido.

  Consulte la seccin ``Software de extraccin de audio''.

  No podr hacer CDs multisesin con este programa. Para hacer CDs
  multisesin tendr que usar las opciones que lleva el mkisofs para
  este fin, generando una imagen multisesin.

  6.3.3.  cdrdao

  Parece ser que se ha conseguido que este programa haga lo que se
  quera, copiar CDs al vuelo, incluso los mixtos, de msica, y
  ohhhhhhh, de Playstation!.  No dejis de ver la seccin dedicada a
  este programa porque merece la pena.

  6.4.  Entornos Integrados

  6.4.1.  X-CD-Roast

  Puede obtener este programa de http://www.fh-muenchen.de/rz/xcdroast/.

  Este programa es el ms sencillo de usar ya que est hecho para las X
  con un interfaz TCL/TK y se basa en modificaciones del cdrecord y
  mkisofs para su funcionamiento. En versiones anteriores utilizaba un
  derivado del cdwrite, pero tuvo que dejarlo ya que cdwrite ha dejado
  de desarrollarse.

  La mayor ventaja que tiene este programa es su facilidad de uso y que
  detecta y configura los dispositivos automticamente, adems de
  funcionar correctamente y sin problemas. Con l puede configurar y
  hacer las imgenes de CD fcilmente sin necesidad de ir a la lnea de
  comandos, as como extraer pistas de audio y volver a grabarlas
  gracias a sus modificaciones del readcdda y playcdda (que slo se
  pueden usar con dispositivos SCSI).

  Si quiere sacar pistas de audio con un lector IDE lector ha de usar el
  cdda2wav, aunque no todas la unidades lectoras soportan la extraccin
  de pistas CDDA o de CD-Audio.

  Puede hacer una copia directa de CD a CD, siempre que sean slo de
  datos, y que las dos unidades, la grabadora y la lectora, sean
  dispositivos SCSI, ya que con las IDE no funciona muy bien, debido no
  al programa en s, sino mas bien por las caractersticas de las
  unidades IDE, ya que no suelen satisfacer las capacidades de carga de
  las grabadoras. Aun as he llegado a comprobar como unidades del tipo
  Philips IDE de 32x en adelante funcionaban perfectamente.

  Lo normal es que no tenga problemas para grabar con este programa
  siempre y cuando su grabadora sea SCSI, cuando sea IDE o usa la ultima
  versin 0.96d final o superior o no conseguir que salga ni un solo CD
  bien.

  6.4.2.  Burn-It

  Este entorno utiliza las ltimas versiones de cdrecord, mkisofs y
  cdda2wav, lo ms peculiar sin duda es que esta escrito ntegramente en
  java; su desarrollo es muy rpido.

  Puede obtenerlo de http://www.imada.ou.dk/~jews/BurnIT/.

  6.4.3.  CDR

  CDR son las siglas de Create/Duplicate/Rip (Crear/Duplicar/Extraer).

  Su utilidad actualmente es ms que nada para la preparacin de audio
  que posteriormente va a ser grabado con cdrecord o cdwrite desde la
  lnea de comandos. Provee una interfaz tipo ncurses. Slo extrae de
  unidades SCSI.

  Puede obtenerlo de http://www.burdell.org/cdr.shtml.

  6.5.  Otros programas y utilidades

  Hay varias utilidades entre las que tengo que destacar sdir, isovfy,
  cdinfo y isodetect, que son pequeas, de consola, pero muy tiles a la
  hora de comprobar y verificar CDs. Estas pequeas utilidades se pueden
  encontrar en el FTP de sunsite
  ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/ y otras que se
  pueden encontrar tanto en el paquete de X-CD-Roast (seccin ``X-CD-
  Roast'') como en el de cdrecord (``cdrecord'').

  Por ejemplo, sdir nos puede ayudar a saber el tamao total de un
  directorio y sus subdirectorios lo cual resulta muy til cuando
  queremos evaluar y calcular el tamao del CD a copiar al vuelo; isovfy
  nos sirve para verificar que no hayan errores en una imagen creada en
  el disco duro; cdinfo nos puede ayudar a comprobar que se han copiado
  bien los CDs y no slo eso, este pequeo programa muestra la
  estructura de un CD en minutos y segundos, nos dice si es arrancable,
  los sistemas de ficheros que contiene, si lleva pistas de audio o es
  un vdeo CD, etc; por ltimo, con isodetect podemos ver la etiqueta
  del volumen de un CD as como los comentarios de los mismos.

  Descripcin de las utilidades:

     sdir
        este programa muestra la capacidad de un directorio con sus
        subdirectorios. Los parmetros a pasarle son directorios.

     isodetect
        programa para ver el volumen, el editor, el publicador y la
        aplicacin de una imagen. Su sintaxis es la siguiente:

       -h Muestra la ayuda.

       -d y un nombre de un archivo de imagen o de un dispositivo le
        indican en dnde realizar la bsqueda; por defecto busca en
        /dev/cdrom. Si no se indican mas parmetros indicar el tipo de
        imagen que es, iso9660 o HFS.

       -V muestra el nombre del volumen de la imagen o CD.

       -P muestra el comentario que hay como publicador.

       -p muestra el comentario que hay como preparador.

       -A muestra el comentario que hay como aplicacin.

        Slo se puede indicar un comando a la vez con -d. Este programa
        se puede encontrar en el paquete X-CD-Roast (seccin ``X-CD-
        Roast'').
     cdinfo
        excelente y pequea utilidad que nos muestra la estructura de un
        CD; en lo que a pistas se refiere, identifica CDs mixtos,
        arrancables, con sistema HFS, CD Plus, etc. (Altamente
        recomendada y muy til). La ltima versin se puede descargar
        desde http://www.in-berlin.de/User/kraxel/dl/cdinfo.c

        Desgraciadamente, parece ser que se ha abandonado su desarrollo.

     isovfy
        Esta pequea utilidad nos servir para encontrar posibles
        errores en las imgenes. Su sintaxis es muy sencilla, solamente
        se le ha de indicar un dispositivo de bloque o el nombre del
        fichero imagen.  Este programa viene en el paquete de X-CD-Roast
        (seccin ``X-CD-Roast'').

  7.  Software DAO y generadores de subcdigos.

  7.1.  cdrecord 1.8

  Puede obtener la ltima alpha del servidor FTP
  ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha/.

  Descripcin de los nuevos comandos para la nueva versin:

     -useinfo
        Utiliza los archivos de extensin .inf sobreescribiendo las
        opciones por defecto.

     -atip
        Muestra la informacin referente al CD y sale. Esta informacin
        tambien la ofrecia la version anterior pero slo cuando se
        disponia a grabar.

     -dao
        Graba el medio en Disc-At-Once.

  Ejemplo de como se usa la opcin -atip se tiene en la seccin
  referente a crear un sistema ext2 con el ``mke2fs'' en un archivo.

  Para usar la opcin -useinfo necesitamos primero haber extraido con el
  cdda2wav un CD-Audio al disco duro sin poner la opcin -H.

       cdrecord -v dev=0,3,0 fs=16m speed=4 -useinfo *.wav

  Pues s, cdrecord tambien graba en DAO, pero slo a partir de la
  versin de desarrollo 1.8a20. La forma de usar cdrecord es
  prcticamente la misma solo que para usar las caractersticas de la
  grabacin en DAO ha de tener una grabadora que soporte MMC y utilizar
  la opcin -dao; salvo esto, puede usarlo como hara normalmente.

  Cuando utilizemos esta opcin notaremos una forma distinta de grabar
  los CDs.  En primer lugar veremos una nueva frase que nos muestra el
  cdrecord, Sending CUE Sheet. que nos indica que lo primero que est
  haciendo es escribir las separaciones de las pistas, los gaps y pregap
  para luego grabar todo, incluida la TOC sin desactivar el laser de
  grabacin. Gracias a esta opcin se puede ahorrar unos segundos o
  minutos si se tiene que grabar un CD con muchas pistas de audio.

  Un ejemplo podria ser:

       cdrecord -v dev=3,0 fs=16m speed=4 -dao /imagen.iso /audio/*.wav

  y tambien si se pretende copiar directemente desde un CD

       cdrecord dev=3,0 speed=4 fs=16m -v -dao -isosize /dev/sr0 -audio /wavs/*.wav

  7.2.  CD Builder

  Prometedora aplicacin, con entorno grfico en X-Window, que permitir
  generar escaletas (cue sheets para la creacin de CDs, as como de
  subcdigos, como CD-G, CD-TEXT, etc.

  En la actualidad est en su primera etapa (alpha de desarrollo, aunque
  dotado de cierta funcionalidad.

  Puede obtenerlo de http://www.ccs.neu.edu/home/bchafy/cdb/cdb.html.

  Al parecer se ha abandonado el desarrollo de este programa.

  7.3.  cdrdao

  Este programa ha evolucionado tanto que la copia en DAO y al vuelo
  est empezando a dar sus frutos. Es posible copiar CDs al vuelo sin
  volcar los datos al disco duro incluso con las pistas de audio; el
  problema en este ltimo aspecto es que no soporta todas las unidades
  lectoras a pesar de incorporar cdigo del CDParanoia para realizar la
  extraccin de audio.

  Echndole un vistazo a la documentacin se puede ver qu unidades
  estn soportadas; tanto unidades grabadoras, incluyendo modelos SCSI e
  IDE, como unidades lectoras que hayan sido probadas sin problema.

  Tambin se pide que si su unidad est soportada para extraer Audio con
  cdparanoia, pero no con cdrdao, le enve la informacin que se obitene
  de ejecutar el comando cdparanoia -v a la direccin de correo del
  autor, que tratar de incorporarar su unidad lo antes posible.

  Todo lo referente a las unidades soportadas se encuentra en el archivo
  README del paquete del cdigo fuente. En el mismo paquete se
  encuentran otras utilidades bastante interesantes que comentar
  seguidamente una vez explicados los comandos de esta utilidad.
  La ltima versin, recomendada y realmente funcional, la 1.1.3, se
  puede obtener de http://www.ping.de/sites/daneb/cdrdao.html.

  Descripcin de los comandos del programa:

     Utilizacin del programa:

          cdrdao comando [opciones] archivo-toc

     comando
        indicamos al programa qu es lo que queremos hacer.  Los
        comandos disponibles son:

       show-toc Muestra la TOC y sale.

       toc-info Muestra una pequea descripcion de la informacin del
        archivo TOC extraido previamente.

       toc-size Muestra el nmero total de bloques para la TOC.

       read-toc Crea un archivo TOC desde un CD.

       read-cd Crea el archivo TOC y extrae el contenido del CD.

       show-data Muestra el contenido de los datos y sale.

       read-test Realiza una prueba de lectura de todas las pistas y
        sale.

       disk-info Mustra informacin sobre el disco que hay en unidad.

       unlock Desbloquea la unidad despues de un fallo de escritura.

       simulate Ya no se utiliza, ahora es write --simulate.

       write Graba un CD.

       copy Copia, esto se utiliza para la copia al vuelo.

     opciones
        Aqui se describen las diferentes opciones que soporta el
        programa.

       --device (x,y,z) Especifica el dipositivo de la grabadora.  Se
        puede suprimir si existe un enlace simblico del dispositivo
        correspondiente a su grabadora a /dev/cdrecorder. Se puede
        indicar tanto la del dispositivo directo como el identificador
        SCSI, ejemplo: 0,3,0 o /dev/sr1

       --source-device (x,y,z) Aqu especificamos la unidad desde la
        cual tomaremos los datos para realizar la copia. Se puede
        especificar tanto un dispositivo como un identificador SCSI. Es
        necesaria si usamos el comando copy.

       --driver (id) Forzamos al programa a usar un controlador
        especfico para la grabadora.
       --source-driver (id) Forzamos al programa a usar un controlador
        especfico para la unidad lectora. Es necesaria si usamos el
        comando copy, aunque no si el programa identifica correctamente
        esta unidad.

       --simulate Para realizar una copia con el lser desactivado, en
        modo de simulacin o prueba.

       --multi No cierra el CD, para poder crear un CD multisesin.

       --eject Expulsa el CD una vez grabado.

       --swap Invierte el orden de palabra de las pistas de audio.

       --on-the-fly Realiza una copia al vuelo, no crea imagen.

       --datafile (archivo) Nombre del archivo de datos en donde se
        encuentran los datos a los que hace referencia el archivo TOC.
        Usado por read-cd, read-toc y copy.

       --buffers (nmero) Expecifica el tamao del buffer (min. 10).

       --session (nmero) Selecciona la sesin para read-toc/read-cd.

       --fast-toc No extrae los pre-gaps ni las marcas ndice.

       --read-raw Lee los sectores raw para read-cd.

       --paranoia-mode (nmero) nivel de paranoia para la extraccin de
        audio (0..3).

       --reload Relee el disco si es necesario para grabar.

       --force Fuerza la ejecucin de la operacin.

       -v (nmero) Expecifica el nivel de muestra de datos.

       -n (nmero) No hace una pausa despus de grabar.

  De aqui hay que comentar que el comando copy slo se usa para copiar
  un CD directamente, si tenemos una imagen y la queremos copiar hay que
  usar el comando write. Un tamao muy recomendado del buffer es 64, y
  de ah en adelante, aunque con 64 creo que es ms que suficiente.

  7.3.1.  Copia al vuelo de CD-ROMs.

  Ahora una breve descripcin de lo que ms nos interesa del programa,
  la copia directa (al vuelo) sin imagen.

       cdrdao copy -v 2 --device 0,3,0 --source-device 0,1,0 --speed 4 --buffers 64 \
       --reload --eject --on-the-fly --fast-toc

  Este es el comando que utilizo para duplicar cualquier tipo de CD al
  vuelo.  Al ponerle la opcin --fast-toc realiza una lectura rpida de
  la tabla de contenidos del CD, de lo contrario primero leer y
  comprobar el CD fuente, lo que tardar lo que necesite su lector, y
  luego lo copiar. Si le indicamos el susodicho parmetro, leer la TOC
  de forma rpida y empezar enseguida a copiar. El resto de parmetros
  no necesitan de una explicacion ms detallada.

  Es recomendable que cuando se copie un CD de msica o mixto se utilice
  de la siguiente manera con la opcin --paranoia-mode:

       cdrdao copy -v 2 --device 0,3,0 --source-device 0,1,0 --speed 4 --buffers 64 \
       --reload --eject --on-the-fly --fast-toc --paranoia-mode 0

  Con la opcin --paranoia-mode le especificamos en que modo ha de ser
  paranoico a la hora de extraer las pistas de audio, si le
  especificamos 0, ser lo menos posible y es el que se recomienda a la
  hora de grabar al vuelo ya que se desactiva la verificacion de
  errores, que como es normal, reduce la transeferencia de datos ya que
  la unidad lectora se dedica ms tiempo a comprobar los posibles
  defectos de las pistas e intentar corregirlos que a pasarle los datos
  a la grabadora, por lo que si no le ponemos este modo es muy posible
  que se produzca un buffer underrun y perder el CD.

  Si lo que queremos es que los verifique le indicamos modo 3 y ser tan
  paranoico que para extraer una pista de audio en un lector 32X SCSI
  (como mi TEAC) tardar ms tiempo que dura la misma cancion al
  reproducirla; con esto el programa se asegura de que no pierda calidad
  y de correguir posibles errores en el CD.  Este modo es recomendable
  cuando tengamos algun CD en mal estado y la nica forma de poder
  grabarlo sea volcando primero a disco duro.

  7.3.2.  Extraccin y grabacin de imgenes DAO con cdrdao.

  Otra de las funciones que nos puede interesar muchisimo es la de
  extraer una imagen al disco duro, como por ejemplo para lo dicho
  anteriormente, para cuando tengamos algun CD que no podamos grabar al
  vuelo por estar defectuoso, o bien, para grabarlo mas tarde. El
  comando a utilizar es el siguiente:

       cdrdao read-cd -v 2 --device 0,1,0 --read-raw --datafile imagen.bin imagen.toc

  De esta forma conseguimos extraer una imagen en el archivo imagen.bin
  del contenido del CD-ROM fuente y el en archivo imagen.toc almacenamos
  la informacin que nos servir posteriormente para poder grabar y
  dejar el nuevo CD tal y como estaba el original. El comando a utilizar
  es el siguiente:

       cdrdao write -v 2 --device 0,3,0 --speed 4 --buffers 64 imagen.toc

  Como habr notado, no hemos indicado el nombre de la imagen ya que la
  toma del archivo que contiene la informacin TOC. El indicarle la
  opcin --datafile con el nombre de la imagen es slo para
  identificarla, por si tenemos ms de una extraida en el disco duro;
  sino, por defecto la imagen se llamar data.bin.  Si diese la
  casualidad de que ya hubiera un archivo con el mismo nombre, el
  programa detendr el proceso mostrando una advertencia, indicando de
  que ya existe el archivo.

  Tambin se puede usar el cdrdao para copiar una imagen de datos que
  hayamos hecho, pero no lo recomiendo; ya que primero tenemos que crear
  un archivo TOC, cosa que resulta ms laborioso que copiarla con el
  cdrecord.

  7.3.3.  Scripts que acompaan a cdrdao.

  Se puede usar cdrdao para copiar archivo .wav, y que gracias a un
  script en PERL que incluye en el directorio /contrib/wav2dao/ del
  paquete del cdigo fuente podamos copiar dichas pistas sin que al
  final de las mismas nos ponga 2 segundos de silencio.

  Para obtener la ayuda del programa ponemos:

       wav2dao.pl -H

  Deberia funcionar simplemente con

       wav2dao.pl -d /dev/sr0 -w -n *.wav

  En el directorio de los fuentes /contrib/mp32dao/ encontramos otro
  script en PERL para realizar de forma automtica la extraccin de los
  archivo Debido a la falta de algunos archivos en la distribucin del
  PERL en mi sistema no he podido probarlo.  Este script hace uso del
  programa mpg123 que se encuentra en la mayoria de distribuciones del
  mercado o bien por internet.

  Puede que necesite completar su distribucin perl con mdulos del CPAN
  (Comprehensive Perl Archive Network) http://www.cpan.org para hacer
  uso de este script.

  7.3.4.  Duplicado de CD-ROMs de PlayStation con CDRDAO.

  Por ltimo tenemos en el directorio /contrib/psxcopy-x.y/ dos
  programas y dos scripts para la extraccin y copia de los dichosos CDs
  de PlayStation. Lo siento por aquellos que quieran copiar dichos CDs
  al vuelo, pero de momento no soportan dicha funcin, tal vez mas
  adelante, pero hay que reconocer que ya es un comienzo que por lo
  menos se puedan grabar, no?.

  Pues bien, lo primero es compilar los dos programas que son necesarios
  y luego instalarlos. Una vez compilados sin errores hacemos que los
  scripts read-psx y write-psx sean ejecutables. Como son dos scripts
  normales, habr que editarlos y modicicar los parmetros para que
  apunten a nuestra unidad lectora y grabadora respectivamente en cada
  archivo. Una vez hecho eso simplemente introducimos el CD fuente en la
  unidad lectora, tecleamos:

       read-psx cd1

  y una vez extrado

       write-psx cd1

  7.3.5.  A tener en cuenta

  Hay ms posibilidades pero las descritas anteriormente son las que son
  ms faciles de usar y que ms nos pueden interesar. En prximas
  versiones ampliaremos el contenido dedicado a este fabuloso programa.

  Tambien indicar que en el mismo paquete de las fuentes se encuentra un
  interfaz para X, el problema es que no soporta la grabacin al vuelo.

  ATENCION: Durante la utilizacin del programa para la duplicacin de
  un CD-ROM al vuelo, no se podr acceder de ninguna de las maneras a la
  unidad.  Si se intenta montar la unidad fuente, por ejemplo, el
  proceso de grabacin terminar con errores y el CD origen no se
  completar, perdiedo un disco. Esto se puede comprobar grabando un
  disco en modo de pruebas o de simulacin y accediendo a la unidad
  desde donde se obtienen los datos.

  8.  Preguntas de Uso Frecuente

  8.1.  megas para un CD 74 minutos. Esto a que se debe?  Cuando grabo
  con cdrdao , muestra una capacidad de casi 750

  Una curiosidad que se observa mientras se est grabando un CD con el
  programa es que en lugar de decirnos el tamao de cada pista que se
  est grabando nos muestra una capacidad abismal del borde de los 750
  megas para un CD 74 minutos completo.

  Esto se debe a que la grabacin que ofrece este programa no es en
  megas reales de ordenador sino en megas de CD, que en lugar de ser de
  8/16/32 bits es de 12'5 bits, de ah el tamao.  No tiene porque
  asustarse, es completamente       normal. Otra de las ventajas que he
  podido apreciar es que ofrece mucha informacin sobre el CD antes de
  realizar el proceso de grabacin.

  8.2.  disco duro deje de funcionar durante unos segundos.  Me sale un
  mensaje muy parecido al siguiente despus de que el

  Me sale este mensaje despus de que el disco duro deje de funcionar
  durante unos segundos:

       hda: irq timeout: status=0x58 { DriveReady SeekComplete DataRequest}
       hda: disabled DMA
       ide0: reset: success

  Tiene que recompilar el kernel y desactivar el soporte para el chip
  Intel Tritn (I/II) DMA, ya que su disco duro no soporta extraccin
  por DMA.

  Esto puede ocasionar problemas a la hora de estar grabando un CD,
  puesto que el disco duro se puede parar durante 6 a 9 segundos, hasta
  que el kernel se da cuenta, resetea el IDE y desactiva la extraccin
  DMA para ese disco, (con las unidades de CD-ROM que no lo soporten
  tambin) tiempo suficiente para que el CD pueda salir daado al no
  llegarle constantemente los datos.

  En el caso de estar emulando dispositivos SCSI es rotundamente
  necesario desactivar dicha opcin en el kernel ya que en el momento en
  que pase, el bus se quedar colgado al hacer interferencia el
  controlador IDE y la emulacin SCSI, haciendo que no pueda leer de las
  unidades al estar literalmente bloqueadas, por lo que el nico remedio
  suele ser apagar el ordenador.

  8.3.  Hay alguna forma de hacer una imagen exacta de un CD al disco
  duro que no sea copiar los ficheros del CD al disco y luego sacar la
  imagen?

  S. Hay una forma de transferir una copia binaria de un CD
  directamente a disco duro, haciendo simplemente un cat o dd del
  dispositivo donde tenga la unidad lectora de CD (normalmente el enlace
  /dev/cdrom) y redireccionando a un archivo o particin libre en el
  disco duro; de esta forma podremos hacer una imagen exacta del CD si
  no tenemos una unidad secundaria desde donde copiarlo, o si queremos
  comprobar la legibilidad del CD.

  Un ejemplo de cmo se hace es

       cat /dev/cdrom > imagenCD.iso

  o

       dd if=/dev/cdrom of=imagenCD.iso

  una vez hecho esto slo tenemos que usar esa imagen para grabar y
  obtendremos una copia exacta del CD original. Si el CD lleva pistas de
  audio tendr que extraer las pistas de audio primero a disco con un
  extractor digital como cdda2wav, o readcdda, suponiendo que su lector
  lo soporte, sino puede hacerlo desde la grabadora (ver seccin ``Se
  puede usar la grabadora para leer o extraer?'').

  8.4.  Se puede copiar de CD a CD (slo de datos) directamente sin
  ningn problema?

  Efectivamente se puede copiar de CD a CD slo de datos sin ningn
  problema, pero eso s, (el tpico pero) no es nada recomendable hacer
  la copia desde un CD IDE y sobre todo si la unidad lectora se para o
  hace cosas raras. Para las grabadoras IDE no recomiendo (como ya dije
  anteriormente) que ponga la unidad lectora en el mismo puerto IDE que
  la grabadora. Si lo hace as, hgale muchas pruebas antes de proceder.

  Para grabar directamente de CD a CD basta con indicarle al programa
  grabador que la imagen la obtenga del dispositivo lector, es decir
  /dev/scdX.

       cdrecord -v dev=0,0,0 speed=2 fs=8M -isosize -eject /dev/sr1

  En este ejemplo podemos ver cmo se hace una copia directa desde la
  unidad lectora a la grabadora (IDE en este caso), y si se da cuenta,
  el parmetro -isosize es para forzar al programa grabador a que
  determine primero el tamao del CD imagen ya que por s solo no lo
  hace, e intenta leer los dos ultimos bloques, pudiendo resultar un CD
  defectuoso.

  8.5.  Puedo duplicar directamente un CD mixto o de audio?

  Actualmente, solo un programas para grabacin de CDs bajo Linux
  permite duplicar directamente un CD mixto (1 o varias pistas de datos
  y una o varias de audio) sin extraer al menos las de audio a disco
  duro gracias a que soporta duplicacin de tipo DAO (Disk At Once) y
  OTH (On The Fly).  Por supuesto, la unidad grabadora ha de soportarlo,
  adems del programa; adems, el lector de CDRom ha de estar soportado
  por el programa para poder extraer las pistas.

  Ver seccin ``cdrdao''.

  8.6.  Puedo duplicar CDs en formato xa2? (Por ejemplo, de PlaySta
  tion)

  La respuesta a si se puede duplicar un CD en mode xa2 es s.

  SI. Cmo? Ahora s? Pues s, gracias al cdrdao ahora es posible
  duplicar CDs de PlayStation.

  El problema de los CD-ROM de PlayStation es que incorporan un sistema
  de grabacin basado en la pista 0. Esta pista est grabada como de
  datos y es errnea desde el punto de vista del estndar ISO9660. No
  obstante, con las extensiones de nuestros sistemas somos capaces de
  leerlas. Al copiar con cdrecord la pista 0 pasa a ser pista 1; la
  PlayStation no coge el CD, ya que el busca la pista 0 sin encontrarla.
  Esa es la razn de usar un programa tipo DAO/OTH para hacer este tipo
  de copias.

  software/grabadora/lector que soportase duplicacin DAO, como ahora lo
  hay.  Ver seccin ``Puedo duplicar un CD mixto o de audio?''.

  8.7.  Hay alguna FAQ genrica sobre CD-R o CD-RW?

  S. En ella puede consultar desde qu tipo de CD-R vrgenes son mejor
  para qu cosa hasta qu grabadora es la ms recomendable, o cules son
  en realidad productos OEM basados en marcas conocidas.

  Su autor es Andy McFadden, puede consultarla en
  http://www.fadden.com/cdrfaq/

  Eso s, est en ingls, aunque puede aprovechar el traductor de
  Altavista: http://babelfish.altavista.digital.com/cgi-bin/translate.

  La traduccin es un poco burda, pero menos da una piedra... :).

  8.8.  zumbido horripilante...  He grabado un CD de Audio, pero al
  escucharlo slo se oye un

  Consulte la seccin ``Software de extraccin de audio'', Ha utilizado
  el orden de palabra binaria endian equivocado para grabar ficheros de
  audio.

  8.9.  Problemas con ms de un dispositivo en controladoras SCSI NCR

  Poseo una controladora Ultra-SCSI NCR 53c810a a la cual tenia
  conectada la grabadora, y en las opciones de configuracin del kernel
  me aparecen una serie de parametros opcionales que no recomiendan
  ellos mismos que se activen, a no ser que los dispositivos den
  problemas o cuelguen el sistema.

  Pues bien, cuando tena slo la grabadora y estos tres parmetros
  activados efectivamente el sistema se colgaba.  Posteriormente adquir
  una unidad lectora SCSI para poder realizar duplicaciones directas,
  pero en las duplicaciones aparecan errores por todos sitios.

  Me di cuenta de que la unidad lectora no funcionaba a todo su
  rendimiento, asi que activ todas las opciones del kernel para mi
  controladora, solucionando el problema y comprobando que mi sistema no
  se caa.

  Pero los problemas no acabaron ah, cuando intentaba extraer audio la
  controladora se me colgaba, teniendo que resetear, as que me puse a
  recompilar el kernel de nuevo y cul fue mi sorpresa al ver que no
  slo haba ese controlador para las tarjetas NCR de la serie 53c8xx.

  El problema no era de la controladora sino del controlador que estaba
  usando. Por lo tanto cambi de controlador al ms novedoso y
  recomendable, el ncr53c8xx, solucionando el problema y dejando de
  tener todos los inconvenientes anteriormente citados, funcionando todo
  a la primera.

  De aqu deduzco que hay que fijarse mucho en todos los controladores
  disponibles, ya que por ejemplo para las controladoras NCR hay ms de
  uno; familiarcese con su controladora.

  Esto es un ejemplo de lo que puede pasar si el controlador de su
  dispositivo SCSI no corresponde lo mas recientemente con su
  controladora SCSI.

  8.10.  Como se crea un CD Mixto?

  Para crear un CD en modo mixto, es decir, con una primera pista de
  datos y las siguientes de audio hemos de crear una imagen de datos con
  el mkisofs y tener las pistas de audio listas en algn directorio,
  procediendo con cdrecord de la siguiente manera:

       cdrecord -v dev=4,0 speed=2 fs=16m -eject image.raw -audio /wavs/*.wav

  y si lo que queremos es copiar una CD de este tipo, lo primero es
  extraer las pistas de audio al disco duro con, por ejemplo, el
  cdda2wav y luego usar el cdrecord de esta forma:

       cdda2wav -D 0,2,0 -B -t 2+9
       cdrecord -v dev=1,0 speed=4 fs=16m -nopad defpregap=0 pregap=0 -isosize \
       /dev/cdrom -audio *.wav

  Las opciones que he incluido -nopad defpregap=0 pregap=0 nos sirven
  para que el CD ocupe un poco menos al ser grabado y no grabar espacios
  entre las imgenes. Recomiendo usarlas en las copias de CD mixtos y CD
  Plus.

  8.11.  Como se graba un CD multisesin?

  ATENCION: No es posible crear CDs Multisesion con formato Joliet.

  El asunto de un CD multisesin es complicadillo. Si comenzamos con que
  hemos grabado una imagen digamos de 200 MB y tambin queremos grabar
  otra de otros 200 MB a continuacin no podremos, es decir, primero
  tendremos que grabar una, y despus crear la segunda imagen con unas
  opciones que tenemos que sacar de cdrecord, pasndoselas a mkisofs
  como muestra el ejemplo:

       cdrecord dev=4,0 -msinfo

  Para obtener el nmero que hace falta, es decir, la informacin
  multisesin del CD. Slo funciona con CDs que hayan sido grabados con
  la opcin -multi. Entonces le pasamos a mkisofs el nmero que puede
  ser: 0,131456 de la siguiente forma:

       mkisofs -v -a -C 0,131456 -r -R -T -V "CDROM" -N /imagen1.iso -o /imagen2.iso /files/.

  Como se puede observar, tambin se ha incluido el parmetro -N con el
  nombre de la imagen anteriormente copiada al CD, aunque si la hemos
  copiado podemos indicarle el nombre del dispositivo en el que se
  encuentra, si bien no he comprobado esto ltimo.

  Luego procedemos a copiar la imagen con el cdrecord de forma normal
  con el parmetro -multi para que sea multisesin.

  8.12.  Como se crea un CD Plus?

  Pero qu es un CD Plus? Un CD Plus contiene primero pistas de audio y
  al final una pista de datos. Qu raro no? Y para qu sirve?  Se usa
  de forma comn para usar este tipo de CDs con lectores de CD-Audio
  normales, Ha probado a escuchar un CD de datos en un lector de CD-
  Audio normal?  Para crear este tipo de CDs lo primero es crear una
  imagen sin archivos en ella, es decir, hacer una imagen bsica desde
  un directorio en el que no hayan archivos. Grabamos las pistas de
  audio y la imagen bsica que hemos creado con la siguiente sentencia:

       cdrecord -v dev=4,0 speed=4 fs=16m -multi -audio *.wav -data imagen.iso

  una vez grabada, obtenemos la informacin de multisesin del CD y
  hacemos la imagen y la grabamos de la misma forma que est explicada
  en la seccin ``Como se crea un CD Multisesin?''.

  8.13.  Se puede usar la grabadora para leer o extraer?

  S, pero es algo altamente desancosejable. Las razones:

    MTBF de una grabadora (su tiempo de vida til) suele ser muy bajo
     (unas 30000 horas)  comparado con el de un lector de CD (unas
     150000).

    El precio de un lector de CD IDE decente es aproximadamente de un
     15% a un 20% respecto al de una grabadora, y entre un 20% y un 25%
     si es SCSI.

    Las velocidades de lectura de los lectores suelen ser de 40x o
     incluso 50x. Las de las grabadoras, no pasan de 10x.

  De lo cual se deduce que no es nada rentable, por no decir efectivo,
  malgastar la vida til de una grabadora en emplearla como lector.

  8.14.  Tengo una grabadora HP-7500, y cdrecord  me hace cosas raras...

  Como por ejemplo, en un -scanbus:

  bus, target: 0, ,0,0      0  'PIONEER ' 'CD-ROM DR-A02S  ' '1.08' Removable CD-ROM

  bus, target: 0, ,1,0      1  'HP      ' 'CD-Writer+ 7500 ' '1.0a' Removable CD-ROM
  0,,1,0    1,0 ('HP      ' 'CD-Writer+ 7500 ' '1.0a' Removable CD-ROM) == 0,,1,0
  1,0 ('HP      ' 'CD-Writer+ 7500 ' '1.0a' Removable CD-ROM)

  O fallos continuos...

  Necesita aplicar un parche a cdrecord, y recompilarlo para que soporte
  adecuadamente su grabadora.

  En http://www.guug.de:8080/cgi-bin/winni/lsc.pl puede obtenerlo.

  8.15.  CDRDAO no detecta bien mi unidad

  La nica solucin es leer bien el archivo README que acompaa al
  programa y comprobar si su unidad est realmente soportada en la lista
  que acompaa.  Si realmente no est tiene la posibilidad de enviar un
  mail al autor para que aada soporte para ella. Pero antes de hacer
  eso, pruebe con todos los controladores de unidades que soporta el
  programa, a lo mejor alguno de ellos funciona.

  8.16.  Sugerencias y peticiones

  NOTA: Dejo este apartado tal y como est para que se siga aportado
  ayuda a otros programas que lo necesiten. Si bien el que mas promete
  en este aspecto es cdrdao pido que el que pueda ayudar en su
  desarrollo no deje de lado tal programa que nos ayudar mucho si lo
  aprendemos a utilizar. Referirse al apartado del programa ``CDRDAO''

  Desde este documento pido la ayuda, dedicacin que cada uno pueda
  aportar a la creacin/desarrollo de algn programa DAO (Disk-At-Once)
  para la duplicacin de CD-ROMs, ya que es muy costoso y trabajoso la
  creacin o duplicacin de CD Mixtos y de Audio, para que linux est a
  la altura de hacer las cosas como lo hacen programas de este tipo para
  otras plataformas, como los conocidos DAO/CDRWIN de MS-DOS/Windows
  respectivamente de la empresa Golden Hawk y Adaptec Easy CD/Pro.

  9.  Crditos

  ste documento ha sido escrito por Leandro Terrs lord_lt@retemail.es
  tras leer varios documentos en ingls, tanto el CDWriters-HOWTO como
  los manuales de varios programas que he comentado y gracias a la
  experiencia obtenida en este campo.

  Otras partes de este documento son de incorporacin propia y pruebas
  que he ido haciendo, a base de perder algn que otro CD con grabadoras
  IDE, que es la parte ms actual por la que se ha hecho ste documento.

  ste documento es propiedad intelectual de Leandro Terrs como parte
  del Insflug, y del LDP (Linux Documentation Proyect). Para cualquier
  modificacin, aadidura, traduccin, etc. pngase en contacto con el
  autor.

  Colaboraciones, aadiduras y correcciones:

    Jorge de Diego Rodrguez, toke@toke.net por su inestimable ayuda en
     la finalizacin del apartado sobre las grabadoras IDE/ATAPI por
     puerto paralelo.

     Revisin, reestructuracin, formateo y ampliacin (SCSI,
     extraccin de audio), Francisco J.  Montilla, pacopepe@insflug.org

  a los que desde aqui doy mis ms sinceras gracias por la ayuda
  prestada.

  10.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones oficiales:  www.insflug.org. Asegrese de comprobar
  cul es la ltima versin disponible en el Insflug antes de bajar un
  documento de un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  que estamos trabajando incesantemente para aadir.

  Se proporcionar tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Francisco Jos Montilla, pacopepe@insflug.org.

  de 1997.  Mini-COMO de Linux IP Masquerade, en ESPAOL.
  Original de Ambrose Au, ambrose@writeme.com
  Original v1.2, 10 de noviembre de 1997; traduccin, 20 de
  noviembre

  Este documento describe cmo activar la funcin IP Masquerade en un
  servidor Linux, permitiendo conectar a Internet, mediante su mquina
  Linux, ordenadores que no tienen registrada una direccin IP de Inter
  net.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin.

  1.1.    Introduccin.

  1.2.    Prlogo, retrospectiva y crditos.

  1.3.    Copyright & Disclaimer.

  2.      Conceptos bsicos.

  2.1.    Qu es IP Masquerade?

  2.2.    Estado actual

  2.3.    Quin puede beneficiarse de IP Masquerade?

  2.4.    Quin NO necesita IP Masquerade?

  2.5.    Cmo funciona IP Masquerade ?

  2.6.    Requerimientos para usar IP Masquerade en Linux 2.x

  3.      Configuracin de IP Masquerade.

  3.1.    Cmo compilar el ncleo para dar soporte IP Masquerade.

  3.2.    Asignacin de direcciones IP en la red privada

  3.3.    Configuracin de las OTRAS mquinas.

  3.3.1.  Configuracin de Windows 95.

  3.3.2.  Configuracin de Windows para Trabajo en Grupo (3.11).

  3.3.3.  Configuracin de Windows NT.

  3.3.4.  Configuracin de sistemas basados en UNIX.

  3.3.5.  Configuracin DOS usando el paquete NCSA Telnet.

  3.3.6.  Configuracin de sistemas basados en MacOS usando MacTCP

  3.3.7.  Configuracin de sistemas basados en MacOS usando Open
  Transport.

  3.3.8.  Configuracin de red Novell usando DNS.

  3.3.9.  Configuracin de OS/2 Warp.

  3.3.10. Configuracin de otros sistemas.

  3.4.    Configuracin de la poltica de IP Forwarding.

  3.5.    Comprobacin de IP Masquerade.

  4.      Otras caractersticas de IP Masquerade y soporte de programas.

  4.1.    Problemas con IP Masquerade.

  4.2.    Servicios de entrada.

  4.3.    Programas cliente soportados y otras notas de configuracin.

  4.3.1.  Clientes que funcionan

  4.3.2.  Clientes que NO funcionan

  4.3.3.  Plataformas/SO testeados como las OTRAS mquinas.

  4.4.    Administracin de cortafuegos IP con ipfwadm .

  4.5.    IP Masquerade y llamada bajo demanda ( Dial On Demand ).

  4.6.    Reenvo de paquetes ipautofw .

  5.      Varios.

  5.1.    Obtencin de ayuda.

  5.2.    Agradecimientos.

  5.3.    Referencias.

  6.      Anexo de la traduccin.

  6.1.    Traduccin.

  6.2.    Anexo: El INSFLUG

  6.3.    Fuentes de informacin en espaol

  6.4.    Recursos de Linux y distribuciones.

  6.5.    Cmo colaborar

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin.

  1.1.  Introduccin.

  Este documento describe cmo activar la funcin IP masquerade en un
  servidor Linux, permitiendo conectar a Internet, mediante su mquina
  Linux, ordenadores que no tengan registrada una direccin IP de
  Internet.  Es posible conectar sus mquinas con el servidor Linux,
  tanto con ethernet como con otro tipo de conexiones, con un enlace
  ppp. Este documento har nfasis en las conexiones ethernet, ya que
  este es el caso ms usual.

  Este documento est pensado para usuarios de ncleos 2.0.x. Los
  ncleos en desarrollo 2.1.x no son tratados.

  1.2.  Prlogo, retrospectiva y crditos.

  Encuentro muy confuso, como nuevo usuario, configurar IP masquerade en
  los ncleos nuevos, esto es, 2.x. Aunque hay PUF (-- Preguntas de Uso
  Frecuente--) s y listas de correo, no hay documentos dedicados a esto;
  y como hay algunas peticiones en las listas de correo solicitando un
  COMO que lo cubra, decid escribirlo como punto de partida para nuevos
  usuarios, y posiblemente como seccin bsica para que usuarios
  experimentados puedan crear ms documentacin. Si piensa que no estoy
  haciendo un buen trabajo, sintase libre de decrmelo para que pueda
  hacerlo mejor.

  Este documento est fuertemente basado en la PUF original de Ken Eves,
  y numerosos mensajes de ayuda de la lista de correo de IP MASQUERADE.
  Gracias especiales a Mr. Matthew Driver, cuyos mensajes a la lista de
  correo me inspiraron para configurar ip_masq y eventualmente para
  escribir esto.

  Por favor sintase libre de enviarme cualquier crtica o comentario a
  ambrose@writeme.com si algo de lo aqu explicado le parece errneo, o
  si echa algo de menos. Su inestimable comentario podr influenciar el
  futuro de este COMO!

  Este COMO est pensado para ser una gua rpida a fin conseguir que el
  IP Masquerade funcione en el plazo de tiempo ms corto posible.

  Podr encontar las ltimas novedades, as como mayor informacin en
  las pginas web de IP Masquerade Resource http://ipmasq.home.ml.org/
  que mantengo. Si tiene alguna pregunta tcnica sobre IP Masquerade,
  por favor entre en la Lista de Correo de IP Masquerade en lugar de
  enviarme correo electrnico, mi tiempo es limitado, y los
  desarrolladores de IP_Masq estn ms capacitados para responder a sus
  preguntas.

  La ltima versin de este documento se puede encontrar en IP
  Masquerade Resource, el cual tambin contiene las versiones HTML y
  PostScript:

    http://ipmasq.home.ml.org/

    Por favor consulte http://ipmasq.home.ml.org/index.html#mirror,
     rplica de estas pginas.

  1.3.  Copyright & Disclaimer.

  ** Nota del traductor ** : Aunque se traducen los trminos de la
  licencia slo se hace con carcter informativo. Se deja intacta la
  licencia original.

  ===========================================================================

   This document is copyright(c) 1996 Ambrose Au, and it's a free
  document.  You can redistribute it under the terms of the GNU General
  Public License.

   The information and other contents in this document are to the best
  of my knowledge.  However, ip_masq is experimental, and there is
  chance that I make mistakes as well; so you should determine if you
  want to follow the information in this document.

   Nobody is responsible for any damage on your computers and any other
  losses by using the information on this document. i.e.
        THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGES INCURRED DUE
       TO ACTIONS TAKEN BASED ON THE INFORMATION IN THIS DOCUMENT.

  ===========================================================================

  -- Propiedad intelectual y renuncia de responsabilidad --

  Este documento es copyright  1996 Ambrose Au, y es un documento
  gratuito. Puede redistribuirlo bajo los trminos de la GNU General
  Public License.

  La informacin y el resto de los contenidos de este documento son lo
  mejor de mis conocimientos. Tenga en cuenta que IP Masquerade es
  experimental, y hay posibilidad de que cometa errores; por eso debera
  determinar si quiere seguir la informacin de este documento.

  Nadie ser responsable de dao alguno sufrido por sus ordenadores y
  cualesquiera otras prdidas ocasionadas por el uso de la informacin
  contenida en este documento. Esto es:

       EL AUTOR (y el TRADUCTOR) NO SE RESPONSABILIZA DE NINGN
       DAO SUFRIDO DEBIDO A LAS ACCIONES REALIZADAS BASADAS EN
       ESTE DOCUMENTO.

  2.  Conceptos bsicos.

  2.1.  Qu es IP Masquerade?

  IP Masquerade es una capacidad de red de Linux en desarrollo. Si un
  servidor Linux est conectado a Internet con IP Masquerade habilitado,
  los ordenadores conectados a l (bien en la misma red local, bien por
  mdem) tambin pueden conectarse a Internet, incluso aunque no tengan
  una direccin IP oficial asignada.

  Esto permite a un conjunto de mquinas acceder transparentemente a
  Internet ocultas tras la mquina pasarela, la cual aparece como el
  nico sistema que est usando Internet. Romper la seguridad de un
  sistema configurado de forma correcta con IP Masquerade es
  considerablemente ms difcil que romper un buen filtro de paquetes
  basado en cortafuegos (suponiendo que no existan fallos en ninguno).

  2.2.  Estado actual

  IP Masquerade est todava en etapa experimental. De todas formas, los
  ncleos a partir del 1.3.x tienen ya soporte interno incorporado.
  Muchos particulares y empresas lo estn usando, con resultados
  satisfactorios.

  Se ha comprobado que los Navegadores de pginas web y telnet funcionan
  bien sobre ip_masq. FTP, IRC y Real Audio funcionan con ciertos
  mdulos cargados. Otras variedades de audio por red como True Speech e
  Internet Wave tambin funcionan. Algunos usuarios de la lista de
  correo incluso lo intentaron con software de vdeo-conferencia.
  Incluso ping funciona ahora, con el nuevo parche ICMP.

  Por favor dirjase a la seccin ``'' para ver la lista completa de
  programas soportados.
  IP Masquerade funciona bien con 'mquinas clientes' con diferentes
  sistemas operativos y plataformas. Ha habido xito con sistemas usando
  Unix, Windows 95, Windows NT, Windows para Trabajo en Grupo (con el
  paquete TCP/IP), OS/2, Sistemas Macintosh OS con Mac TCP, Mac Open
  Transport, DOS con el paquete NCSA Telnet, VAX, Alpha con Linux, e
  incluso Amiga con AmiTCP o AS225-stack.

  2.3.  Quin puede beneficiarse de IP Masquerade?

    Si tiene un servidor Linux conectado a Internet, y

    si tiene algunos ordenadores con TCP/IP conectados con esa mquina
     Linux en una subred local (LAN) , y/o

    si su servidor Linux tiene ms de un mdem y acta como un servidor
     PPP o SLIP conectando a otros,

    los cuales no tienen asignada una direccin IP oficial. (Estas
     mquinas son representadas por OTRAS mquinas presentes).

    Y por supuesto, si quiere que esas OTRAS mquinas estn en Internet
     sin gastar dinero extra :)

  2.4.  Quin NO necesita IP Masquerade?

    Si su mquina es un servidor Linux aislado conectado a Internet,
     entonces es intil usar ip_masq, o

    si ya tiene direcciones asignadas a sus OTRAS mquinas, entonces no
     necesita IP Masquerade,

    y por supuesto, si no le gusta la idea de una salida gratuita a
     Internet.

  2.5.  Cmo funciona IP Masquerade ?

  De la PUF de IP Masquerade por Ken Eves:

  Representacin de la configuracin ms simple :

            SLIP/PPP         +------------+                         +------------+
            al proveedor     |  Linux     |       SLIP/PPP          | OTRA       |
           <---------- modem1|            |modem2 <---------- modem |            |
             111.222.333.444 |            |           192.168.1.100 |            |
                             +------------+                         +------------+

  En el dibujo de arriba un servidor Linux con ip_masquerading instalado
  y funcionando est conectado a Internet va SLIP o PPP usando el
  modem1. Tiene asignada la direccin IP 111.222.333.444. En esta
  configuracin ese modem2 permite a las personas que llaman entrar e
  iniciar una conexin SLIP/PPP.

  El segundo sistema (el cual no tiene porqu usar Linux) llama al
  servidor Linux e inicia una conexin SLIP o PPP. No tiene asignada una
  direccin IP en Internet as que usa 192.168.1.100 (ver abajo).

  Con ip_masquerade y el rutado configurado adecuadamente la mquina
  OTRA puede interactuar con Internet como si estuviera realmente
  conectada (con unas pocas excepciones).

  Citando a Pauline Middelink:

  No olvide mencionar que OTRA debera tener al servidor Linux como su
  pasarela (si es la ruta por defecto o slo una subred no importa). Si
  la OTRA no puede hacer esto, la mquina Linux debera hacer un proxy
  arp para todas las direcciones de rutado, pero la configuracin del
  proxy arp va ms all del alcance del documento.

  Lo siguiente es un extracto de un correo de comp.os.linux.networking
  que se ha editado para corresponder los nombres usados en el ejemplo
  de arriba:

    Le digo a la mquina OTRA que mi servidor Linux es su pasarela.

    Cuando un paquete llega a la mquina Linux desde OTRA, le asignar
     un nuevo nmero de puerto origen, y pega su propia direccin IP en
     la cabecera del paquete, guardando los originales. Entonces mandar
     el paquete modificado a Internet sobre el interfaz PPP/SLIP.

    Cuando un paquete viene desde Internet para la mquina Linux, si el
     nmero de puerto es uno de esos asignados arriba, obtendr el
     puerto original y la direccin ip, repondr la cabecera del paquete
     y lo enviar a OTRA.

    El servidor que enva el paquete nunca notar la diferencia.

  Un ejemplo de IP Masquerading

  el ejemplo tpico se muestra en la siguiente figura:

        +----------+
        |          |  Ethernet
        | ordenador|::::::
        |    A     |2    :192.168.1.x
        +----------+     :
                         :   +----------+   enlace
        +----------+     :  1|  Linux   |   ppp
        |          |     ::::| masq-gate|:::::::::// Internet
        | ordenador|::::::   |          |
        |    B     |3    :   +----------+
        +----------+     :
                         :
        +----------+     :
        |          |     :
        | ordenador|::::::
        |    C     |4
        +----------+

        <- Red  Interna ->

  En este ejemplo hay 4 ordenadores que centran este documento. Tambin
  hay algo al otro lado de su conexin IP que le suministra la
  informacin de Internet y adems otros sistemas con los que est
  interesado en intercambiar informacin.

  El sistema Linux masq-gate es la pasarela enmascarada para la red
  interna de los ordenadores A, B y C que permite el acceso a Internet.
  La red interna usa una de las direcciones de red privadas, en este
  caso la red de clase C 192.168.1.0, donde la mquina Linux (-- N. del
  T.
  Mejor dicho, el interfaz ethernet de la mquina Linux--) tiene la
  direccin 192.168.1.1 y los dems tienen direcciones de esa misma red.

  Las tres mquinas A, B y C (que pueden estar usando cualquier sistema
  operativo, siempre que pueda "hablar IP", como Windows 95, Macintosh
  MacTCP o incluso otro Linux) pueden conectarse a otras mquinas de
  Internet, ya que el sistema masquerade masq-gate enmascara todas sus
  conexiones de tal forma que parezcan originadas en masq-gate, y se
  encarga de que los datos que le devuelven en una conexin enmascarada
  sean retransmitidos al sistema original. As los sistemas de la red
  interna ven una ruta directa a Internet y son incapaces de darse
  cuenta que sus datos estn siendo enmascarados.

  2.6.  Requerimientos para usar IP Masquerade en Linux 2.x

  Por favor dirjase a http://ipmasq.home.ml.org/ para informacin ms
  actualizada, es difcil actualizar este COMO con frecuencia.

    Fuentes del ncleo 2.0.x, disponibles en
     ftp://ftp.kernel.org/pub/linux/kernel/v2.0/

     (S, tendr que compilar su ncleo con ciertos soportes... Se
     recomienda el ltimo ncleo estable)

    Mdulos cargables del ncleo, preferiblemente 2.0.0 o superior
     disponibles en

     (modules-1.3.57 es lo mnimo requerido)

    Montar una red TCP/IP bien configurada, tema tratado en
     http://www.caldera.com/LDP/HOWTO/NET-2-HOWTO.html y en
     http://linuxwww.db.erau.edu/NAG/, disponible en castellano en
     http://www.infor.es/LuCAS como GARL, o Gua del Administrador de
     Redes Linux.

    Conexin a Internet para su servidor Linux.

     Tratado en
     PPP-Como, disponible en http://www.insflug.org y
     http://www.caldera.com/LDP/HOWTO/mini/PPP-over-ISDN, as como para
     los que dispongan de Infova, el Infobia-Como,
     http://www.insflug.org

    Ipfwadm 2.3 o ms reciente, disponible en
     informacin sobre requerimientos de versiones en
     http://www.xos.nl/linux/ipfwadm/

    Puede opcionalmente aplicar parches de IP Masquerade para habilitar
     otras funcionalidades. Dispone de ms informacin acerca de esto en
     http://ipmasq.home.ml.org/ (estos parches aplicados a todos los
     ncleos 2.0.x)

  3.  Configuracin de IP Masquerade.

  Si su red privada contiene informacin vital, pinselo dos veces antes
  de usar IP Masquerade. Esto puede ser una PASARELA para que salga a
  Internet, y viceversa, para que alguien de otra parte del mundo entre
  en su red.

  3.1.  Cmo compilar el ncleo para dar soporte IP Masquerade.

  Por favor, dirjase a http://ipmasq.home.ml.org/ para informacin ms
  actualizada, es difcil actualizar este COMO frecuentemente.

    Lo primero de todo, necesita las fuentes del ncleo
     (preferiblemente la ltima versin estable, 2.0.0 o superior).

    Si es la primera vez que compila el ncleo, no se asuste. De hecho
     es bastante fcil y est perfectamente documentado en el Kernel-
     Como http://www.insflug.org.

    Descomprima las fuentes del ncleo en /usr/src/ con el comando:

       tar xvzf linux-2.0.x.tar.gz -C /usr/src

  donde x es el nivel del parche sobre el ncleo 2.0.x (asegrese de que
  hay un directorio o un enlace simblico llamado linux).

    Aplique los parches apropiados. Desde que estn saliendo parches
     nuevos, los detalles no sern incluidos aqu. Por favor busque en
     IP Masquerade Resources para informacin ms actualizada.

    Consulte el Kernel-Como y el fichero README de los fuentes del
     ncleo para ms instrucciones sobre la compilacin.

    Aqu estn las opciones que necesita para compilar:

     Diga  SI a lo siguiente:

         * Prompt for development and/or incomplete code/drivers
           CONFIG_EXPERIMENTAL

  esto permite seleccionar el cdigo experimental ip_masq compilado en
  el ncleo.

         * Enable loadable module support
           CONFIG_MODULES

  le permitir cargar mdulos.

         * Networking support
           CONFIG_NET

         * Network firewalls
           CONFIG_FIREWALL

         * TCP/IP networking
           CONFIG_INET

         * IP: forwarding/gatewaying
           CONFIG_IP_FORWARD

         * IP: firewalling
           CONFIG_IP_FIREWALL

         * IP: masquerading (EXPERIMENTAL)
           CONFIG_IP_MASQUERADE

  aunque es experimental, es *INDISPENSABLE*

         * IP: ipautofw masquerade support (EXPERIMENTAL) [SOLO nucleos 2.0.30 y superiores]
           CONFIG_IP_MASQUERADE_IPAUTOFW

  recomendado.

         * IP: ICMP masquerading [SOLO nucleos 2.0.30 y superiores]
           CONFIG_IP_MASQUERADE_ICMP

  soporte para enmascarar paquetes ICMP, opcional.

         * IP: always defragment
           CONFIG_IP_ALWAYS_DEFRAG

  altamente recomendado

         * Dummy net driver support
           CONFIG_DUMMY

  recomendado.

     NOTA:
        Estos son los componentes que necesita para ip_masq, seleccione
        cualquier otra opcin que necesite para su configuracin
        especfica.

    Despus de compilar el ncleo, debera de compilar e instalar los
     mdulos:

       make modules; make modules_install

    Luego debe aadir unas pocas lneas al fichero /etc/rc.d/rc.local
     (o en el apropiado) para cargar los mdulos requeridos, que residen
     en /lib/modules/2.0.x/ipv4/, automticamente durante el arranque:

               .
               .
               .
       /sbin/depmod -a
       /sbin/modprobe ip_masq_ftp
       /sbin/modprobe ip_masq_raudio
       /sbin/modprobe ip_masq_irc

  (u otros mdulos como ip_masq_cuseeme, o ip_masq_vdolive si ha apli
  cado parches)

     Nota:
        Tambin puede cargar los mdulos manualmente antes de usar
        ip_masq, pero no use kerneld para esto, NO funcionar.

  3.2.  Asignacin de direcciones IP en la red privada

  Como todas las OTRAS mquinas no tienen direccin oficial asignada,
  debe haber una forma correcta de adjudicar direcciones para esas
  mquinas.

  De la FAQ IP Masquerade:

  Hay un RFC (#1597) en el cual estn las direcciones IP para ser usadas
  en una red no conectada a Internet. Hay 3 bloques de nmeros
  reservados especficamente para este fin. El que yo uso es una subred
  de clase C 255 desde 192.168.1.n hasta 192.168.255.n .

  Del RFC 1597: Seccin 3: Espacio para Direcciones Privadas

  El Internet Assigned Numbers Authority (IANA) tiene reservado los
  siguientes 3 bloques de direcciones IP para redes privadas:

                     10.0.0.0        -   10.255.255.255
                     172.16.0.0      -   172.31.255.255
                     192.168.0.0     -   192.168.255.255

  Nos referiremos al primer bloque como "bloque de 24-bit", al segundo
  como "bloque de 20-bit", y al tercero como "bloque de 16-bit". Observe
  que el primer bloque no es ms que un simple nmero de red de clase A,
  mientras que el segundo bloque es un conjunto de 16 nmeros de red de
  clase B contiguos y el tercer bloque un conjunto de 255 nmeros de red
  de clase C contiguos.

  As, si est usando una red de clase C, debera de nombrar a sus
  mquinas como 192.168.1.1, 1.92.168.1.2, 1.92.168.1.3, ...,
  192.168.1.x

  192.168.1.1 es normalmente la mquina pasarela, la cual es su servidor
  Linux conectado a Internet. Observe que 192.168.1.0 y 192.168.1.255
  son las direcciones de RED (Network) y la direccin de EMISIN
  (Broadcast) respectivamente, las cuales estn reservadas. Evite usar
  estas direcciones en sus mquinas.

  3.3.  Configuracin de las OTRAS mquinas.

  Adems de asignar una direccin IP apropiada a las mquinas, tambin
  debera de poner la apropiada de la pasarela (gateway). En general,
  esto es coser y cantar. Simplemente introduzca la direccin de su
  servidor Linux (usualmente 192.168.1.1) como la direccin de la
  mquina pasarela.

  Como Servidor de Nombres, puede aadir algn DNS disponible. El ms
  obvio debera ser el que est usando su mquina Linux. Tambin puede
  aadir opcionalmente algn sufijo de dominio de bsqueda.

  Despus de que haya reconfigurado esas direcciones, recuerde reiniciar
  los servicios apropiados o reiniciar su sistema.

  Las siguientes instrucciones de configuracin suponen que est usando
  una red de clase C con 192.168.1.1 como direccin de su servidor
  Linux. Por favor, tenga en cuenta que 192.168.1.0 y 192.168.1.255
  estn reservadas.
  3.3.1.  Configuracin de Windows 95.

  1. Si no ha instalado todava la tarjeta de red y el correspondiente
     controlador de dispositivo (driver), hgalo ahora.

  2. Vaya a 'Panel de Control'/'Red'.

  3. Aada 'Protocolo'/'Microsoft'/'TCP/IP'  si no lo tiene.

  4. En 'Propiedades'/'TCP/IP', vaya a 'Direccin IP' y ponga la
     direccin IP 192.168.1.x, (1 < x < 255), y como mscara de subred
     255.255.255.0.

  5. Aada 192.168.1.1 como su pasarela en 'Puerta de enlace (Gateway)'.

  6. En 'Configuracin DNS'/'Orden de bsqueda del servidor DNS' aada
     el DNS que usa su servidor Linux (usualmente est en
     /etc/resolv.conf).  Opcionalmente, puede aadir el apropiado sufijo
     de bsqueda de dominio.

  7. Deje las otras opciones como estn, salvo que sepa lo que est
     haciendo.

  8. Pulse 'Aceptar' en todas las cajas de dilogo y reinicialice el
     sistema.

  9. Haga un Ping a la mquina Linux para comprobar la red:

     (Esto slo comprueba la conexin local, todava no puede hacer ping
     al exterior.)

  10.
     Opcionalmente puede crear un fichero HOSTS en el directorio de
     windows as puede usar los nombres de las mquinas de su red local.
     Hay un ejemplo llamado HOSTS.SAM en el directorio c:\windows.

  3.3.2.  Configuracin de Windows para Trabajo en Grupo (3.11).

  1. Si no ha instalado la tarjeta de red y el controlador, hgalo
     ahora.

  2. Instale el paquete TCP/IP 32b si todava no lo tiene.

  3. En 'Principal'/'Configuracin de Windows'/'Configuracin de la
     Red', pulse en 'Controladores'.

  4. Marque 'Microsoft TCP/IP-32 3.11b' en la seccin

  5. Ponga la direccin IP 192.168.1.x (1 < x < 255), y la mscara de
     subred 255.255.255.0 y como Default Gateway 192.168.1.1

  6. No habilite 'Automatic DHCP Configuration' y no ponga nada en esas
     reas de entrada 'WINS Server' a menos que est bajo un dominio de
     Windows NT y sepa lo que est haciendo.

  7. Pulse 'DNS', aada la informacin mencionada en el PASO 6 de la
     seccin ``'', luego pulse 'Aceptar' cuando est listo.

  8. Pulse 'Advanced', active 'Enable DNS for Windows Name Resolution' y
     'Enable LMHOSTS lookup' si est usando un fichero de bsqueda de
     servidores, similar al mencionado en el PASO 10 de la seccin ``''
  9. Pulse 'OK' en todas las cuadros de dilogo y reinicialice el
     sistema.

  10.
     Haga un Ping a la mquina Linux para comprobar la conexin de red:
     'Archivo/Ejecutar', ponga: ping 192.168.1.1

     (Con esto slo comprueba la conexin de la red local, todava no
     puede hacer un ping al resto del mundo.)

  3.3.3.  Configuracin de Windows NT.

  1. Si no ha instalado su tarjeta de red y el controlador, hgalo
     ahora.

  2. Vaya a 'Inicio'/'Panel de Control'/'Red'

  3. Aada 'Protocolo TCP/IP y Componentes Relacionados' desde el men
     'Protocolos' mediante el botn 'Agregar' si no tiene todava el
     servicio TCP/IP instalado.

  4. En el rea bajo 'Protocolos de red', seleccione

  5. En 'Configuracin TCP/IP', seleccione el adaptador de los
     instalados adecuado, por ejemplo: [1]Novell NE2000 Adapter. Luego
     ponga la Direccin IP 192.168.1.x (1 < x < 255), como Mscara de
     Subred 255.255.255.0 y como Pasarela 192.168.1.1.

  6. No use la 'Configuracin DHCP Automtica' y no ponga nada en 'WINS
     Server' a menos que est bajo un domino de Windows NT y sepa lo que
     est haciendo.

  7. Pinche en 'DNS', y rellene con la informacin apropiada mencionada
     en el PASO 6 de la seccin ``''. Haga click en

  8. Vaya a la seccin 'Direccin WINS', y active las opciones bsqueda
     de LMHOSTS' si est usando un fichero de bsqueda de servidores,
     similar al mencionado en el PASO 10 de la seccin ``''

  9. Pulse 'Aceptar' en todos los cuadros de dilogo y reinicialice el
     sistema.

  10.
     Haga un Ping a la mquina Linux para comprobar la conexin de red:
     ('Inicio/Ejecutar'), ponga: ping 192.168.1.1.

     (Esto slo comprueba la conexin de la red local, todava no puede
     hacer un ping al mundo exterior.)

  3.3.4.  Configuracin de sistemas basados en UNIX.

  1. Si no ha instalado la tarjeta de red y recompilado su ncleo con el
     controlador adecuado, hgalo ahora.

  2. Instale la red TCP/IP, as como el paquete de herramientas de red,
     si no lo ha hecho todava.

  3. Ponga en la DIRECCIN IP(IPADDR) 192.168.1.x (1 < x < 255), y luego
     ponga 255.255.255.0 en NETMASK, GATEWAY 192.168.1.1, y en BROADCAST
     192.168.1.255.
     Por ejemplo, puede editar el fichero /etc/sysconfig/network-
     scripts/ifcfg-eth0 en sistemas Red Hat Linux, o simplemente hacerlo
     mediante el Control Panel.

     (Es diferente en SunOS, BSDi, Linux Slackware, etc...)

  4. Aada su DNS y bsqueda de sufijo de dominio en /etc/resolv.conf

  5. Puede querer actualizar su fichero /etc/networks dependiendo de sus
     configuraciones.

  6. Reinicialice los servicios apropiados, o simplemente reinicialice
     el sistema.

  7. Use un ping (comando: ping 192.168.1.1) para comprobar la conexin
     con la mquina pasarela.

     (Esto slo comprueba la conexin de la red local, todava no puede
     hacer un ping al mundo exterior.)

  3.3.5.  Configuracin DOS usando el paquete NCSA Telnet.

  1. Si no ha instalado la tarjeta de red, hgalo ahora.

  2. Cargue el controlador adecuado. Para una tarjeta NE2000 , use nwpd
     0x60 10 0x300, con su tarjeta de red en el IRQ 10 y la direccin
     hardware en 0x300 (Su configuracin puede ser distinta).

  3. Cree un nuevo directorio, y desempaquete el NCSA Telnet:

       pkunzip tel2308b.zip

  4. Use un editor de texto para abrir el fichero config.tel

  5. Ponga myip=192.168.1.x (1 < x < 255), y netmask=255.255.255.0

  6. En este ejemplo, debera de poner hardware=packet, interrupt=10,
     ioaddr=60

  7. Debera de tener al menos especificada una mquina individual como
     pasarela, por ejemplo, el servidor Linux :

       name=default
       host=Nombre_del_servidor_Linux
       hostip=192.168.1.1
       gateway=1

  8. Tiene otra especificacin para el servicio de nombre de dominio:

  name=dns.dominio.com ; hostip=123.123.123.123; nameserver=1

  Nota: sustituya la informacin sobre el DNS por la que use en su
  servidor Linux.

  9. Salve su fichero config.tel

  10.
     Haga un telnet a la mquina Linux para comprobar la conexin de
     red: telnet 192.168.1.1

  3.3.6.  Configuracin de sistemas basados en MacOS usando MacTCP

  1. Si no ha instalado en controlador de su tarjeta ethernet, ahora
     podra ser un buen momento para hacerlo.

  2. Abra el MacTCP control panel. Seleccione el controlador de red
     adecuado (Ethernet, NO EtherTalk) y pulse el botn 'More...'.

  3. Bajo 'Obtain Address:', pulse 'Manually'.

  4. Bajo 'IP Address:', seleccione class C del men desplegable. Ignore
     el resto de esta seccin de la caja de dilogo.

  5. Rellene con la informacin adecuada, la 'Domain Name Server
     Information:'.

  6. Bajo 'Gateway Address:', introduzca 192.168.1.1

  7. Pulse 'OK' y slvelo. En la ventana principal en MacTCP control
     panel, introduzca la direccin IP de su Mac (192.168.1.x, 1 < x <
     255) en la caja 'IP Address:'.

  8. Cierre el MacTCP control panel.  Si aparece un cuadro de dilogo
     indicando que reinicie el sistema, hgalo.

  9. Puede hacer un ping a la mquina Linux para comprobar la conexin
     de red. Si tiene el programa freeware MacTCP Watcher, pulse en el
     botn Linux(192.168.1.1) en la caja de dilogo que se despliega.
     (Esto solamente comprueba la conexin de la red local, y todava no
     puede hacer un ping al exterior.)

  10.
     Opcionalmente puede crear un archivo Hosts en su System Folder de
     forma que pueda usar los nombres de la mquinas de su red local.
     Este archivo podra existir ya en su System Folder, y podra
     contener algunas entradas de ejemplo (comentadas) que puede
     modificar de acuerdo a sus necesidades.

  3.3.7.  Configuracin de sistemas basados en MacOS usando Open Trans
  port.

  1. Si no ha instalado el controlador adecuado de la tarjeta ethernet,
     ahora sera un buen momento para hacerlo.

  2. Abra el TCP/IP Control Panel y elija 'User Mode

  3. Elija 'Configurations...' del men File.  Seleccione su
     configuracin 'Default' y pulse el botn es una configuracin
     especial) en el dilogo 'Duplicate Configuration', ste
     probablemente contendr algo como 'Default copy'. Luego pulse el
     botn 'OK', y el botn 'Make Active'

  4. Seleccione 'Ethernet' del desplegable 'Connect via:'.

  5. Seleccione el elemento apropiado del desplegable de reselecionar su
     configuracin 'Default' y salir. Yo uso

  6. Introduzca la direccin IP de su Mac (192.168.1.x, 1 < x < 255) en
     la caja 'IP Address:'.

  7. Ponga 255.255.255.0 en la caja de  'Subnet mask:' .

  8. Ponga 192.168.1.1 en la caja de 'Router address:'.

  9. Introduzca la direccin IP de su DNS en la caja 'Name server addr.:

  10.
     Introduzca el nombre de su dominio de Internet (por ejemplo:

  11.
     Los siguientes procesos son opcionales. La introduccin de valores
     incorrectos puede dar lugar a comportamientos errneos. Si no est
     seguro, lo mejor es que los deje en blanco, sin marcar o sin
     seleccionar.  Borre la informacin de esos campos, si es necesario.
     Hasta donde s, no hay forma de decirle al sistema, a travs de los
     dilogos TCP/IP, que no use un archivo de Hosts alternativo
     previamente seleccionado. Si Vd sabe cmo, me interesara.  Marque
     '802.3' si su red requiere tramas del tipo 802.3.

  12.
     Pulse el botn 'Options...' para estar seguro de que el TCP/IP est
     activo. Yo uso la opcin 'Load only when needed'. Si usa y quita
     aplicaciones TCP/IP con frecuencia sin reiniciar su mquina, puede
     que al deshabilitar esta ltima opcin prevenga/reduzca los efectos
     de la administracin de memoria. Con esta opcin deshabilitada las
     pilas del protocolo TCP/IP estn siempre cargadas y disponibles
     para su uso. Si est habilitada, las pilas TCP/IP se cargarn
     automticamente cuando se necesiten y se descargarn cuando no.
     Estos procesos de carga y descarga hacen que la memoria de su
     mquina se fragmente.

  13.
     Puede hacer un ping a su servidor Linux para comprobar la conexin
     de red. Si tiene el programa freeware MacTCP Watcher, pulse el
     botn 'Ping' , e introduzca la direccin de su servidor Linux
     (192.168.1.1) en la caja de dilogo que aparece.  (Esto slo
     comprueba su conexin de la red local, todava no puede hacer un
     ping al mundo exterior.)

  14.
     Puede crear un fichero Hosts en System Folder y as podr usar los
     nombres de las mquinas de su red local. Este fichero puede ya
     existir o no en la System Folder. Si es as, debera de contener
     alguna entrada (como comentario) de ejemplo, la cual puede
     modificar dependiendo de sus necesidades.  Si no, puede obtener una
     copia del fichero de un sistema que use MacTCP, o crearlo Vd. mismo
     (sigue un subconjunto del formato de ficheros de Unix /etc/hosts,
     descrito en la pgina 33 de RFC 1035).  Una vez haya creado el
     fichero, abra el TCP/IP control panel, pulse el botn 'Select Hosts
     File...', y abra el archivo Hosts.
  15.
     Pulse la caja cerrar o elija 'Close' o 'Quit' del men File, y
     luego pulse el botn 'Save' pasa salvar los cambios que ha hecho.

  16.
     Los cambios tendrn efecto inmediatamente, pero reinicializando el
     sistema no pierde nada.

  3.3.8.  Configuracin de red Novell usando DNS.

  1. Si no tiene instalado el controlador apropiado de su tarjeta
     ethernet, ahora sera un buen momento para hacerlo.

  2. Descargue el fichero tcpip16.exe de
     ftp.novell.com/pub/updates/unixconn/lwp5

  3. edite

     c:\nwclient\startnet.bat

     del mo)

       SET NWLANGUAGE=ENGLISH
       LH LSL.COM
       LH KTC2000.COM
       LH IPXODI.COM
       LH tcpip
       LH VLM.EXE
       F:

  4. edite

     c:\nwclient\net.cfg

     controlador por el suyo; por ejemplo : NE2000)

  Link Driver KTC2000
          Protocol IPX 0 ETHERNET_802.3
          Frame ETHERNET_802.3
          Frame Ethernet_II
          FRAME Ethernet_802.2

  NetWare DOS Requester
             FIRST NETWORK DRIVE = F
             USE DEFAULTS = OFF
             VLM = CONN.VLM
             VLM = IPXNCP.VLM
             VLM = TRAN.VLM
             VLM = SECURITY.VLM
             VLM = NDS.VLM
             VLM = BIND.VLM
             VLM = NWP.VLM
             VLM = FIO.VLM
             VLM = GENERAL.VLM
             VLM = REDIR.VLM
             VLM = PRINT.VLM
             VLM = NETX.VLM

  Link Support
          Buffers 8 1500
          MemPool 4096

  Protocol TCPIP
          PATH SCRIPT     C:\NET\SCRIPT
          PATH PROFILE    C:\NET\PROFILE
          PATH LWP_CFG    C:\NET\HSTACC
          PATH TCP_CFG    C:\NET\TCP
          ip_address      xxx.xxx.xxx.xxx
          ip_router       xxx.xxx.xxx.xxx

  5. finalmente, cree el

     c:\bin\resolv.cfg

       SEARCH DNS HOSTS SEQUENTIAL
       NAMESERVER 207.103.0.2
       NAMESERVER 207.103.11.9

  6. Espero que esto ayude a alguien para conseguir poner su red Novell
     en lnea. Esto se puede hacer usando Netware 3.1x o 4.x

  3.3.9.  Configuracin de OS/2 Warp.

  1. Si no tiene instalado el controlador de su tarjeta Ethernet, ahora
     sera un buen momento para hacerlo.

  2. Instale el protocolo TCP/IP, si todava no lo tiene.

  3. Dirjase a Programms/ TCP/IP (LAN) / TCP/IP Settings.

  4. En 'Network' aada su direccin TCP/IP y ponga como mscara de red
     (Netmask) 255.255.255.0

  5. En 'Routing' presione 'Add'. Ponga el Type en 'default' y teclee la
     direccin IP de su servidor Linux en el campo 'Router Address'.
     (192.168.1.1).

  6. Ponga la misma direccin DNS (Servidor de nombres) que usa su
     servidor Linux en 'Hosts'.

  7. Cierre el panel de control de TCP/IP. Y responda SI a la
     siguiente(s) pregunta(s).

  8. Reinicialice la mquina.

  9. Debe de hacer un ping al servidor Linux para comprobar la
     configuracin de red.  Teclee 'ping 192.168.1.1' en una 'Ventana de
     comandos de OS/2'. Si los paquetes ping son recibidos es que todo
     est bien.

  3.3.10.  Configuracin de otros sistemas.

  Se deberan de seguir los mismos pasos para otras configuraciones. Lea
  las secciones anteriores. Si est interesado en escribir sobre alguno
  de estos sistemas, o algunas variantes de sistemas basados en UNIX,
  por favor mande las instrucciones detalladas de configuracin a
  ambrose@writeme.com.

  3.4.  Configuracin de la poltica de IP Forwarding.

  Llegados a este punto ya debera de tener instalados el ncleo y dems
  paquetes requeridos, as como los mdulos cargados. Tambin, la
  direccin IP, la pasarela, y el DNS deberan estar configurados en
  todas las OTRAS mquinas.

  Ahora, la nica cosa que queda por hacer es usar ipfwadm para reenviar
  los paquetes apropiados a la mquina apropiada:

  Esto puede ser de realizado de diferentes formas. Las siguientes
  sugerencias y ejemplos a m me funcionan, pero usted puede tener
  diferentes ideas, por favor mire la seccin ``'' y las pginas man de
  ipfwadm para ms detalles.

       ipfwadm -F -p deny
       ipfwadm -F -a m -S yyy.yyy.yyy.yyy/x -D 0.0.0.0/0

  donde  x es uno de los siguientes nmeros dependiendo del tipo de su
  subred, e yyy.yyy.yyy.yyy es su direccin de red.

  mascara de red  | x  | Subred
  ~~~~~~~~~~~~~~~~|~~~~|~~~~~~~~~~~~~~~
  255.0.0.0       | 8  | Clase A
  255.255.0.0     | 16 | Clase B
  255.255.255.0   | 24 | Clase C
  255.255.255.255 | 32 | Punto-a-punto

  Por ejemplo, si estuviera en una subred de clase C , tendra que haber
  puesto:

       ipfwadm -F -p deny
       ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0

  Al segundo comando podra aadir bien -V 192.168.1.1 o bien -W eth0
  para asegurar que los paquetes enmascarados vienen a travs del
  interfaz del sistema apropiado. Si quiere estar seguro a conciencia
  (tambin conocido como paranoia justificable) entonces querr hacer
  esto.

  Puesto que bootp solicita paquetes que vienen sin una direccin IP
  vlida el cliente no sabe nada sobre ello, para gente con un servidor
  bootp en la mquina masquerade/cortafuegos es necesario usar lo
  siguiente antes del comando deny:

       ipfwadm -I -a accept -S 0/0 68 -D 0/0 67 -W bootp_clients_net_if_name -P udp

  Tambin puede hacerlo mquina por mquina. Por ejemplo, si quiere que
  la 192.168.1.2 y la 192.168.1.8 tengan acceso a Internet, pero no las
  otras mquinas, debera de poner:

       ipfwadm -F -p deny
       ipfwadm -F -a m -S 192.168.1.2/32 -D 0.0.0.0/0
       ipfwadm -F -a m -S 192.168.1.8/32 -D 0.0.0.0/0

  Alternativamente, puede poner la mscara de red en lugar del valor,
  por ejemplo: 192.168.1.0/255.255.255.0

  Lo que parece ser un ERROR comn es poner como  primer comando :

       ipfwadm -F -p masquerade

  NO haga que su poltica por defecto sea masquerading de esta forma
  alguien puede manipular su ruta y ser capaz de entrar a travs su
  pasarela, usndola para enmascarar su identidad!!

  De nuevo, puede aadir estas lneas al fichero /etc/rc.local, o al
  fichero rc que prefiera, o hgalo manualmente cada vez que necesite
  ip_masq.

  Por favor lea la seccin ``'' para una gua detallada de ipfwadm.

  3.5.  Comprobacin de IP Masquerade.

  Despus de todo este duro trabajo, es la hora hacer un intento.
  Asegrese de que la conexin a Internet del servidor Linux est bien.

  Puede intentar navegar por algn sitio web de 'INTERNET!!!' en sus
  OTRAS mquinas, y ver si lo consigue. En su primer intento le
  recomiendo usar una direccin IP en vez de un nombre de mquina,
  porque la configuracin del DNS puede no ser correcta.

  Por ejemplo, puede acceder al servidor Linux Documentation Project
  http://sunsite.unc.edu/mdw/linux.html con el valor de
  http://152.2.254.81/mdw/linux.html.

  Si ve la pgina del LDP, felicidades!, funciona! Luego puede
  intentarlo con el nombre del servidor, y luego un telnet, ftp, Real
  Audio, True Speech, ... o todo aquello soportado por IP
  Masquerade.....

  Hasta ahora no he tenido problemas con las configuraciones anteriores,
  y estn totalmente acreditadas por la gente que invierte su tiempo en
  hacer que esta maravillosa prestacin funcione.

  4.  Otras caractersticas de IP Masquerade y soporte de programas.

  4.1.  Problemas con IP Masquerade.

  Algunos protocolos no funcionarn adecuadamente con masquerading
  porque presuponen cosas sobre nmeros de puerto; --o lo impiden datos
  cifrados en sus cadenas de informacin sobre direcciones y puertos--
  estos ltimos protocolos necesitan un proxy especfico en el cdigo
  masquerading para que funcionen.

  4.2.  Servicios de entrada.

  El Masquerading no puede manejar todos los servicios de entrada.
  Existen formas de permitirlos, pero son completamente independientes
  de masquerading, y son realmente parte de la prctica estndar de
  cortafuegos.

  Si no requiere altos niveles de seguridad simplemente puede
  redireccionar los puertos. Hay varias formas para hacer esto --Yo uso
  un programa modificado llamado redir (espero que este disponible en
  sunsite y rplicas)--. Si desea tener algn nivel de autorizacin en
  conexiones entrantes puede usar TCP wrappers o Xinetd sobre redir (0.7
  o superior) para permitir slo direcciones IP especficas, o usar
  alguna otra herramienta. El TIS Firewall Toolkit es un buen lugar para
  buscar herramientas e informacin.

  Se puede encontrar ms detalles en http://ipmasq.home.ml.org.

  4.3.  Programas cliente soportados y otras notas de configuracin.

  La siguiente lista no ser mantenida durante ms tiempo.
  remtase a http://masqapps.home.ml.org para saber qu aplicaciones
  funcionan a travs de un servidor Linux con IP masquerading y a
  http://ipmasq.home.ml.org/ para ms detalles.

  Generalmente, las aplicaciones que usan TCP y UDP deberan de
  funcionar.  Si tiene alguna sugerencia sobre aplicaciones que no son
  compatibles con IP Masquerade, por favor enveme correo electrnico
  con el nombre del cliente y una breve descripcin.

  4.3.1.  Clientes que funcionan

  Clientes Generales

     HTTP
        todas las plataformas soportadas, navegadores web.

     POP & SMTP
        todas las plataformas soportadas, clientes de correo
        electrnico.

     Telnet
        todas las plataformas soportadas, sesin remota.

     FTP
        todas las plataformas soportadas, con el mdulo ip_masq_ftp.o
        (no todos los servidores funcionan con ciertos clientes; por
        ejemplo algn sitio puede no ser alcanzado usando ws_ftp32, pero
        s con Netscape)

     Archie
        todas las plataformas soportadas, buscador de archivos (no todos
        los clientes archie son soportados).

     NNTP (USENET)
        todas las plataformas soportadas, cliente de noticias USENET.

     VRML
        Windows (posiblemente soportado en todas las plataformas),
        navegacin con realidad virtual.

     traceroute
        principalmente las plataformas basadas en UNIX, algunas
        variantes pueden no funcionar.

     ping
        todas las plataformas, con el parche ICMP.

     todo lo basado en IRC
        todas las plataformas soportadas, con el mdulo ip_masq_irc.o

     Clientes Gopher
        todas las plataformas soportadas.

     clientes WAIS
        todas las plataformas soportadas.

  Clientes Multimedia

     Real Audio Player
        Windows, envo de audio por red, con el mdulo ip_masq_raudio
        cargado.

     True Speech Player 1.1b
        Windows, envo de audio por red.

     Internet Wave Player
        Windows, envo de audio por red.

     Worlds Chat 0.9a
        Windows, programa Cliente-Servidor 3D de conversacin.

     Alpha Worlds
        Windows, programa Cliente-Servidor 3D de conversacin.

     Internet Phone 3.2
        Windows, comunicaciones de audio de Igual-a-igual (Peer-to-
        peer), la gente puede ponerse en contacto con Vd. si inicia Vd.
        la conexin, pero no le pueden llamar.

     Powwow
        Windows, comunicaciones tipo pizarra de audio texto de Igual-a-
        igual, la gente puede ponerse en contacto con Vd. si Vd. inicia
        la llamada, pero ellos no pueden llamarle.

     CU-SeeMe
        todas las plataformas soportadas, con el mdulo cuseeme cargado,
        por favor mire en http://ipmasq.home.ml.org/ para los detalles.

     VDOLive
        Windows, con el parche vdolive.

  Nota: Algunos clientes como IPhone y Powwow pueden funcionar incluso
  si Vd. no es el que inicia la llamada, si usa el paquete ipautofw
  (mire la seccin ``'')

  Otros Clientes

     NCSA Telnet 2.3.08
        DOS, un paquete que contiene telnet, ftp, ping, etc.
     PC-anywhere para windows 2.0
        MS-Windows, control remoto de PCs sobre TCP/IP, slo funciona si
        es cliente pero no servidor.

     Socket Watch
        usa ntp - protocolo de tiempo por red.

     Linux net-acct package
        Linux, paquete de administracin de cuentas de red.

  4.3.2.  Clientes que NO funcionan

     Intel Internet Phone Beta 2
        Conecta pero la voz viaja en una direccin (sale) slo.

     Intel Streaming Media Viewer Beta 1
        No puede conectar con el servidor.

     Netscape CoolTalk
        No puede conectar con el lado opuesto.

     talk, ntalk
        no funcionarn - requieren que sea escrito un proxy en el
        ncleo.

     WebPhone
        No puede funcionar por el momento (asume direcciones no
        vlidas).

     X  Sin probar, pero creo que no podr funcionar a menos que alguien
        construya un X proxy, el cual probablemente es un programa
        externo al cdigo de masquerading. Una forma de hacer que esto
        funcione es usar un ssh como el enlace y usar un X proxy interno
        que haga funcionar las cosas!

  4.3.3.  Plataformas/SO testeados como las OTRAS mquinas.

    Linux

    Solaris

    Windows 95

    Windows NT (ambos, workstation y server)

    Windows para Trabajo En Grupo 3.11 (con el paquete TCP/IP)

    Windows 3.1 (con el paquete Chameleon)

    Novel 4.01 Server

    OS/2 (incluido Warp v3)

    Macintosh OS (con MacTCP u Open Transport)

    DOS (con el paquete NCSA Telnet, el DOS Trumpet trabaja
     parcialmente)

    Amiga (con AmiTCP o AS225-stack)

    VAX Stations 3520 y 3100 con UCX (TCP/IP stack para VMS)

    Alpha/AXP con Linux/Redhat

    SCO Openserver (v3.2.4.2 y 5)

    IBM RS/6000 con AIX

    (Alguien lo ha intentado con otras plataformas?)

  4.4.  Administracin de cortafuegos IP con ipfwadm .

  Esta seccin proporciona una gua ms exhaustiva del uso de ipfwadm.

  Esta es una configuracin para un sistema de cortafuegos/masquerade
  detrs de un enlace PPP con la siguiente direccin PPP esttica. El
  interfaz de confianza es 192.168.255.1, el interfaz PPP ha sido
  cambiado para proteger al culpable :). List cada interfaz de entrada
  y salida individualmente para capturar IP spoofing tambin como ruta
  relleno y/o masquerading.  Todo aquello no explcitamente permitido
  esta prohibido!

  #!/bin/sh
  #
  # /etc/rc.d/rc.firewall, define la configuracion del cortafuegos, invocado
  # desde rc.local.
  #

  PATH=/sbin:/bin:/usr/sbin:/usr/bin

  # comprobacion, espera un bit luego limpia toda norma del cortafuegos.
  # descomente las siguientes lineas si quiere que el cortafuegos se
  # desconecte automaticamente pasados 10 minutos
  #
  # (sleep 600; \
  # ipfwadm -I -f; \
  # ipfwadm -I -p accept; \
  # ipfwadm -O -f; \
  # ipfwadm -O -p accept; \
  # ipfwadm -F -f; \
  # ipfwadm -F -p accept; \
  # ) &

  # Entrante, purga y establece la politica por defecto de denegar. La
  # verdad es que la politica por defecto es irrelevante porque hay un
  # cierre de  toda norma con denegar y anotar

  ipfwadm -I -f
  ipfwadm -I -p deny

  # interfaz local, maquinas locales, van a cualquier sitio valido
  ipfwadm -I -a accept -V 192.168.255.1 -S 192.168.0.0/16 -D 0.0.0.0/0

  # interfaz remota, reclamando ser maquinas locales, IP spoofing, perdido
  ipfwadm -I -a deny -V su.direccion.ppp.estatica -S 192.168.0.0/16 -D 0.0.0.0/0 -o

  # interfaz remota, cualquier origen, es valido ir a direcciones PPP permanentes
  ipfwadm -I -a accept -V su.direccion.PPP.estatica -S 0.0.0.0/0 -D su.direccion.PPP.estatica/32

  # el interfaz loopback es valido.
  ipfwadm -I -a accept -V 127.0.0.1 -S 0.0.0.0/0 -D 0.0.0.0/0

  # cierra toda norma, todas las otras entradas son denegadas y registradas.
  # Lastima que no haya una opcion de registro, aunque esto hace el trabajo
  # en su lugar

  ipfwadm -I -a deny -S 0.0.0.0/0 -D 0.0.0.0/0 -o

  # Saliente, purga y pone la politica por defecto de denegar. La verdad es
  # que la politica por defecto es irrelevante porque hay un cierre de toda
  # norma con  denegar y anotar

  ipfwadm -O -f
  ipfwadm -O -p deny

  # interfaz local, cualquier origen con destino a la red local es valido
  ipfwadm -O -a accept -V 192.168.255.1 -S 0.0.0.0/0 -D 192.168.0.0/16

  # saliente para la red local sobre el interfaz remoto , stuffed routing,
  # denegado

  ipfwadm -O -a deny -V su.direccion.PPP.estatica -S 0.0.0.0/0 -D 192.168.0.0/16 -o

  # saliente desde la red local sobre el interfaz remoto, stuffed masquerading,
  # denegado

  ipfwadm -O -a deny -V su.direccion.PPP.estatica -S 192.168.0.0/16 -D 0.0.0.0/0 -o

  # saliente desde la red local sobre el interfaz remoto, stuffed masquerading,
  # denegado

  ipfwadm -O -a deny -V su.direccion.PPP.estatica -S 0.0.0.0/0 -D 192.168.0.0/16 -o

  # algo mas saliente sobre la interfaz remota es valido.

  ipfwadm -O -a accept -V su.direccion.PPP.estatica -S su.direccion.PPP.estatica/32 -D 0.0.0.0/0

  # el interfaz loopback es valido.

  ipfwadm -O -a accept -V 127.0.0.1 -S 0.0.0.0/0 -D 0.0.0.0/0

  # norma de capturar todo, todo lo otro saliente es denegado y anotado.
  # Lastima que no hay una opcion de registro en la politica pero esto
  # hace  el trabajo en su lugar.

  ipfwadm -O -a deny -S 0.0.0.0/0 -D 0.0.0.0/0 -o

  # Envios, purga y pone la politica por defecto de denegar. La verdad es
  # que la politica por defecto es irrelevante porque hay una cierre de toda
  # norma con  denegar y anotar.

  ipfwadm -F -f
  ipfwadm -F -p deny

  # Enmascaramiento (Masquerade) desde la red local sobre el interfaz local
  # hacia cualquier sitio.

  ipfwadm -F -a masquerade -W ppp0 -S 192.168.0.0/16 -D 0.0.0.0/0

  # norma de capturar todo, el resto de envios son denegados y anotados.
  # Lastima que no hay una opcion de registro en la politica, pero esto hace
  # el trabajo en su lugar.

  ipfwadm -F -a deny -S 0.0.0.0/0 -D 0.0.0.0/0 -o

  Puede bloquear el trfico para un sitio en particular usando -I, -O o
  -F. Recuerde que el conjunto de las normas son examinadas desde arriba
  hacia abajo y -a significa "aadir" a los valores existententes de la
  norma, as cualquier restriccin necesita venir antes de las normas
  generales. Por ejemplo (sin probar):

  Usando normas -I. Probablemente es la ms rpida pero slo detiene las
  mquinas locales, el cortafuegos puede todava acceder a sitios
  "prohibidos". Por supuesto le puede interesar permitir esa
  combinacin.

       # rechaza y anota el interfaz local, las maquinas locales van a 204.50.10.13
       ipfwadm -I -a reject -V 192.168.255.1 -S 192.168.0.0/16 -D 204.50.10.13/32 -o
       # interfaz local, maquinas locales, ir a cualquier sitio es valido
       ipfwadm -I -a accept -V 192.168.255.1 -S 192.168.0.0/16 -D 0.0.0.0/0

  Usando la norma -O. Ms lento porque los paquetes van primero a travs
  de masquerading pero esta norma incluso detiene los accesos del
  cortafuegos a los sitios prohibidos.

       # deniega y anota las salidas a 204.50.10.13
       ipfwadm -O -a reject -V su.direccion.PPP.estatica -S su.direccion.PPP.estatica/32 -D 204.50.10.13/32 -o
       # cualquier otra salida sobre el interfaz remoto es valida
       ipfwadm -O -a accept -V su.direccion.PPP.estatica -S su.direccion.PPP.estatica/32 -D 0.0.0.0/0

  Usando la norma -F. Probablemente ms lento que -I y esto todava solo
  detiene a las mquinas enmascaradas (por ejemplo: las internas), el
  cortafuegos puede todava acceder a sitios prohibidos

       # deniega y anota desde la red local sobre el interfaz PPP hacia 204.50.10.13.
       ipfwadm -F -a reject -W ppp0 -S 192.168.0.0/16 -D 204.50.10.13/32 -o
       # Enmascara (Masquerade) desde la red local sobre interfaces locales hacia
       # cualquier sitio.
       ipfwadm -F -a masquerade -W ppp0 -S 192.168.0.0/16 -D 0.0.0.0/0

  No es necesario una norma especial para permitir a 192.168.0.0/16 para
  ir a 204.50.11.0, est cubierto por la norma global.

  Hay ms de una forma de codificar el interfaz en las normas de arriba.
  Por ejemplo en lugar de -V 192.168.255.1 puede poner -W eth0, en lugar
  de -V su.direccion.PPP.estatica y puede usar -W ppp0. La eleccin es
  ms que otra cosa personal y de documentacin.

  4.5.  IP Masquerade y llamada bajo demanda ( Dial On Demand ).

  1. Si le gustara activar su red automticamente para llamar a
     Internet, el paquete de llamada bajo demanda diald le ser de gran
     utilidad.

  2. Para configurar diald, por favor mire en
     http://home.pacific.net.sg/~harish/diald.config.html

  3. Una vez que diald e ip_masq hayan sido configurados, puede ir a
     alguna de las mquinas clientes e iniciar una sesin web, telnet o
     ftp.

  4. diald detectar peticiones entrantes, luego llamar a su ISP y
     establecer la conexin.

  5. Hay un tiempo de espera que ocurrir con la primera conexin. Esto
     es inevitable si esta usando un mdem analgico. El tiempo dado
     para establecer el enlace entre el mdem y la conexin PPP causar
     que su programa cliente termine. Esto puede ser evitado si esta
     usando un conexin RDSI. Todo lo que necesita hacer es terminar el
     proceso actual en el cliente y reiniciarlo.

  4.6.  Reenvo de paquetes ipautofw .

  ftp://ftp.netis.com/pub/members/rlynch/ipautofw.tar.gz es un
  transportador genrico de TCP y UDP para masquerading de Linux.
  Generalmente para utilizar un paquete que requiera UDP necesitar
  cargar un mdulo especfico de ip_masq; ip_masq_raudio,
  ip_masq_cuseeme, ... ipautofw acta de una forma ms genrica, enviar
  cualquier tipo de trfico includo aquel que los mdulos especficos
  no envan. Esto puede crear un agujero de seguridad si no se
  administra correctamente.

  5.  Varios.

  5.1.  Obtencin de ayuda.

  Por favor NO INTENTE enviarme correo electrnico para consultas o
  problemas de IP Masquerade. Debido a mi intensa carga de trabajo
  personal, no prometo responder a todas las cuestiones que no se
  encuentren en la pgina web. En su lugar, para enviar sus dudas
  dirjase a http://ipmasq.home.ml.org/index.html#mailinglist (creo que
  es la mejor forma si no quiere recibir una respuesta pasadas semanas).

    http://ipmasq.home.ml.org/ debera de tener suficiente informacin
     para montar IP Masquerade.

    Unirse a la lista de correo de IP masquerade (recomendado)

     Para suscribirse, enve un mensaje electrnico con el tema
     "subscribe" (sin comillas) a masq-request@indyramp.com

     Para desubscribirse, enve un correo electrnico con tema
     "unsubscribe" (sin comillas) a masq-request@indyramp.com

     Para obtener ayuda en el uso de la lista de correo, mande un
     mensaje con tema "archive help" o "archive dir" (sin comillas) a
     masq-request@indyramp.com

    http://www.indyramp.com/masq/list/ contiene todos los mensajes
     pasados enviados a la lista.

    Este documento: http://ipmasq.home.ml.org/ipmasq-HOWTO.html para
     ncleos 2.x (si est usando un ncleo 1.3.x  2.x)

    http://ipmasq.home.ml.org/ipmasq-HOWTO-1.2.x.txt si est usando un
     ncleo antiguo.

    http://www.indyramp.com/masq/ip_masquerade.txt contiene algo de
     informacin general.

    http://www.xos.nl/linux/ipfwadm/ contiene las fuentes, binarios,
     documentacin, y otra informacin sobre el paquete ipfwadm.

    Una pagina sobre http://masqapps.home.ml.org por Lee Nevo
     proporciona trucos y consejos para que las aplicaciones funcionen
     con IP Masquerade.

    http://linuxwww.db.erau.edu/NAG/ (Network Administrator Guide) (--
     N del T:
     indispensable para principiantes que intentan instalar una red.

    http://www.caldera.com/LDP/HOWTO/NET-2-HOWTO.html tambin tiene
     mucha informacin til sobre las redes en Linux.

    http://www.caldera.com/LDP/HOWTO/ISP-Hookup-HOWTO.html (-- N del T:
     y
     del T:
     informacin de como conectar su servidor Linux a Internet.

    http://www.caldera.com/LDP/HOWTO/Ethernet-HOWTO.html es una buena
     fuente de informacin sobre montar una LAN con ethernet.

    Tambin debe de estar interesado en
     http://www.caldera.com/LDP/HOWTO/Firewall-HOWTO.html (-- N del T:

    http://www.caldera.com/LDP/HOWTO/Kernel-HOWTO.html (-- N del T:
     le guiar para el proceso de compilar el ncleo.

    Otros http://www.caldera.com/LDP/HOWTO/HOWTO-INDEX-3.html

    Enve correo al grupo de noticias de USENET:
     comp.os.linux.networking

  5.2.  Agradecimientos.

    Gabriel Beitler, gbeitler@aciscorp.com contribuy en la seccin
     ``'' (Configuracin de Novell)

    Ed Doolittle, dolittle@math.toronto.edu sugiri la opcin -V en el
     comando ipfwadm para mejorar la seguridad.

    Matthew Driver, mdriver@cfmeu.asn.au por la extensa ayuda en este
     HOWTO, y mejora de la seccin ``'' (Configuracin de Windows 95).

    Ken Eves, ken@eves.com por la PUF que proporcion informacin
     incalculable para este COMO.

    Ed. Lott, edlott@neosoft.com por un larga lista de sistemas
     comprobados y programas.

    Nigel Metheringham, Nigel.Metheringham@theplanet.net contribuy con
     su versin de IP Packet Filtering e IP Masquerading HOWTO, el cual
     hace de este HOWTO un documento mejor y con ms profundidad tcnica
     en las secciones ``'', ``'', y otras.

    Keith Owens, kaos@ocs.com.au proporcion una excelente gua de
     ipfwadm en la seccin ``'' corrigi la opcin ipfwadm -deny que
     evita un agujero de seguridad, y aclar el estado de ping sobre
     ip_masq.

    Rob Pelkey, rpelkey@abacus.bates.edu proporcion las secciones ``''
     y ``'' (configurcin de MacTCP y Open Transport).

    Harish Pillay, h.pillay@ieee.org proporcion la seccin ``''
     (llamada bajo demanda usando diald).

    Mark Purcell, purcell@rmcs.cranfield.ac.uk proporcion la seccin
     ``'' (ipautofw)

    John B. (Brent) Williams, forerunner@mercury.net proporcion la
     seccin ``'' (configuracin Open Transport)

    Enrique Pessoa Xavier, enrique@labma.ufrj.br en la sugerencia de
     configuracin de bootp.

    A los desarrolladores de Masquerade por esta gran prestacin:

    Delian Delchev, delian@wfpa.acad.bg

    Nigel Metheringham, Nigel.Metheringham@theplanet.net

    Keith Owens, kaos@ocs.com.au

    Jeanette Pauline Middelink, middelin@polyware.iaf.nl

    David A. Ranch, trinity@value.net

    Miquel van Smoorenburg, miquels@q.cistron.nl

    Jos Vos, jos@xos.nl

    Y a quien haya olvidado mencionar aqu (por favor, hgamelo saber)

    A todos los usuarios que enviaron crticas y sugerencias a la lista
     de correo, especialmente a los que informaron de errores en la
     documentacin y los clientes que son soportados y los que no.

    Pido disculpas si no he incluido informacin que algn usuario me
     haya enviado.  Hay muchas sugerencias e ideas que me son enviadas,
     pero no tengo suficiente tiempo para verificarlas o pierdo la pista
     de ellas.  Estoy intentando incorporar toda la informacin que me
     envan en el COMO.  Le agradezco su esfuerzo, y espero que
     comprenda mi situacin.

  5.3.  Referencias.

    PUF de IP masquerade por Ken Eves.

    Archivos de la lista de correo de IP masquerade por Indyramp
     Consulting.

    Pgina de ipfwadm de X/OS.

    Diversos COMOs de Linux sobre redes.

  6.  Anexo de la traduccin.

  6.1.  Traduccin.

  La traduccin ha sido realizada por Xos Vzquez, en el grupo INSFLUG.
  Agradezco a Pablo Fbrega pfabrega@arrakis.es el repaso que le ha dado
  a este documento en busca de errores. Le agradecera que me enviase
  las imperfecciones que contenga este documento.  Crticas no
  constructivas a > dev/null :-)

  6.2.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  6.3.  Fuentes de informacin en espaol

    http://slug.ctv.es/SLUG, grupo de usuarios de Linux.

    http://www.infor.es/LuCAS LuCAS, las guides y otros documentos en
     espaol.

    http://mercury.chem.pitt.edu/~angel/LinuxFocus/Castellano/ Revista
     Linux Focus en castellano.

    Linux en Mxico: http://www.linux.org.mx/

    Linux en Argentina: http://www.linux.org.ar/

    Linux en Uruguay: Linux en Uruguay

    http://wagner.princeton.edu/~juan/manpages/, pginas del manual
     (man) en espaol.

    es.comp.os.linux, grupo de noticias de linux en espaol.

    rea R34.Linux de Fido.

    Multiples http://www.arrakis.es/~barreiro/menu_lista_es.shtml
     listas de correo.

  6.4.  Recursos de Linux y distribuciones.

    Distribucin Debian: http://www.es.debian.org

     ftp://ftp.de.debian.org/debian

    Distribucin RedHat http://www.redhat.com

     ftp://ftp.redhat.com/pub/redhat

    Distribucin Caldera, http://www.caldera.com

     ftp://ftp.caldera.com/pub/

    Distribucin Slackware http://www.slackware.org

     Walnut Creek CDROM http://www.cdrom.com

     ftp://ftp.cdrom.com/pub/linux
    El hogar del ncleo, Kernel Org http://www.kernel.org y LinuxHQ
     http://www.linuxhq.com (informacin de actualizaciones y parches).

     ftp://ftp.kernel.org/pub/linux/kernel

    http://www.linux.org

    Linux Journal & Linux Gazette http://www.ssc.com

    Linux Documentation Project http://sunsite.unc.edu/LDP

    Sunsite http://sunsite.unc.edu/pub/Linux/welcome.html

     ftp://sunsite.unc.edu/pub/Linux/

    GNU, http://www.gnu.org, GNUstep http://www.gnustep.org

     ftp://prep.ai.mit.edu/pub/gnu y ftp://ftp.gnustep.org/pub/gnustep

    ftp://tsx-11.mit.edu/pub/linux/

  6.5.  Cmo colaborar

  Existen diferentes proyectos de hispanohablantes relativos a la
  traduccin de documentacin y programas.

  Si quiere colaborar en algn proyecto es *IMPRESCINDIBLE* que se ponga
  en contacto, con su coordinador :

    INSFLUG, www.insflug.org, traduccin de COMOs coordinado por
     Francisco Jos Montilla, pacopepe@insflug.org.

    LuCAS, traduccin de libros coordinado por Juan Jos Amor
     jjamor@ls.fi.upm.es o en fido 2:341/12.19

    Pginas man, traduccin de pginas del manual coordinado por Miguel
     Angel Seplveda sepulved+@pitt.edu

    GU en espaol, http://slug.ctv.es/~emelero/, espaolizacin de los
     paquetes de GNU coordinado por Enrique Melero.

     b182@mail.fh-wuerzburg.de

    Grupo de hispanizacin de Debian, traduccin de documentacin y
     programas, se organiza en la lista debian-l10n-
     spanish@lists.debian.org

  7.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Linux ifmail-COMO en Castellano
  Juan Jos Amor, jjamor@ls.fi.upm.es (fido 2:341/12.19)
  v1.1, 6 de Diciembre de 1999

  Este documento pretende ser una pequea ayuda para los usuarios de
  Linux pertenecientes a redes tipo Fidonet. No puede ser perfecta, ya
  que viene a ser un resumen de mi propia experiencia, y tampoco tengo
  mucha ...  Seguro que algn veterano de ifmail y compaa tiene sug
  erencias que hacerme. Pues venga, las espero todas en
  jjamor@ls.fi.upm.es o en mi direccin de fido, 2:341/12.19.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      El proceso del correo de Fido en Unix

  2.1.    Qu programas hay que configurar entonces?

  3.      Correo privado (NETs)

  3.1.    Notacin Internet de las direcciones de Fidonet

  3.2.    Configuracin de Sendmail

  3.3.    Configuracion de Sendmail usando macros M4

  3.4.    Configuracin de Ifmail

  3.5.    Enviamos un NET?

  3.6.    Acceso de otros usuarios al NET

  3.7.    Traduccin automtica de cdigos ISO a IBM-PC

  4.      reas pblicas (ECHO)

  4.1.    Retocar ifmail

  4.2.    Activar las reas en el INN

  4.3.    Otros ficheros de configuracin de INN

  4.4.    Intentemos empaquetar y desempaquetar los mensajes

  4.5.    Y probemos a llamar al Boss

  4.6.    Cmo aadir reas nuevas

  4.7.    Algunas ideas sobre Suck

  4.8.    Un lector de noticias para Fido

  4.8.1.  Slrn

  5.      Referencias

  6.      Agradecimientos

  7.      Historial de revisiones

  8.      Notas sobre el Copyright y todo eso
  ______________________________________________________________________

  1.  Introduccin

  Me gusta el riesgo. Eso me anim hace tres aos a hacerme punto de
  Fidonet por la va difcil (FrontDoor + FastEcho + GoldED). Luego me
  dio por los sistemas operativos de lnea de comandos (Unix sin
  ventanas, ya me entendis ;-) ). Me envici con el Linux, y claro,
  lleg la hora de gestionar el correo de Fido desde Linux, y no me iba
  a quedar con el mtodo fcil ...

  Pero configurar el sistema de correo bajo Unix es como mil veces ms
  difcil que hacerlo en DOS. Uno tiene que aprender a configurar, no
  dos, sino hasta cinco programas que no tienen nada que ver el uno del
  otro. Hay que lidiar con la escasa documentacin que cada aplicacin
  trae, juntarlo todo armoniosamente y finalmente lograr que funcione.
  Confieso que eso me hizo echarme atrs en varias ocasiones... hasta
  que vino la ayuda del cielo.

  Ramn Gutirrez, antiguo moderador de la (mejor) rea de Fidonet,
  R34.LINUX, me pas todos sus ficheros de su configuracin, que a l le
  funcionaba a medias.  Con ellos me puse y aqu estamos.

  Tengo que decir que este documento va dirigido a los puntos
  interesados en gestionar todo el tema desde Unix. Por lo tanto, asumo
  que ya se es punto y se conoce de qu va el tema de Fidonet. Hace
  tiempo que escrib un documento sobre cmo hacerse punto bajo MS-DOS,
  que igual le interesa a alguien que aun no lo haya hecho ... lo tenis
  en http://lml.ls.fi.upm.es/~jjamor/intropnt.txt.

  2.  El proceso del correo de Fido en Unix

  Antes de entrar a ver qu programas hay que configurar, intentaremos
  deducirlo siguiendo el camino que recorren los mensajes desde que son
  escritos.

  Empecemos con los NETs, los mensajes privados. En Unix, los NETs se
  van a convertir en correo de Internet, es decir, van a quedar
  almacenados en el buzn del usuario, /var/spool/mail/usuario. Y para
  escribir un NET se usan los programas de correo habituales, eligiendo
  una direccin de Fido en formato Internet (por ejemplo,
  Juan.Jose.Amor@p19.f12.n341.z2.fidonet.org).

  Cuando escribimos un mensaje, ste es enviado al sendmail, quien debe
  estar configurado para enviar a Fido solo los mensajes de Fido (es
  decir, los mensajes para el dominio fidonet.org).  Los dems irn a
  Internet. Lo que sendmail hace es enviar el mensaje al conversor
  Internet <-> FidoNet, ifmail.

  Cuando recibimos un paquete con NETs, ifmail se encarga de
  convertirlos a mensajes de Internet y entregrselos a sendmail.

  Vamos ahora con las reas de ECHO. En Internet, el equivalente es
  USENET (las news). Por lo tanto, necesitamos un lector de News, que
  puede ser, el pine, el tin o incluso el Netscape. Cuando escribamos un
  artculo, ste es enviado a un servidor de news que habr que
  configurar (INN). Luego, a la hora de empaquetar los mensajes, se
  llamar a un script que, ejecutando ifnews, dejar los paquetes listos
  para su envo al nodo de Fido.

  2.1.  Qu programas hay que configurar entonces?

  Vamos a tener que aprender a tocar la configuracin de unos cuantos
  programas.  De la seccin anterior se deducen los siguientes:

    Paquete ifmail. Hay que configurar tanto la parte de empaquetado
     (ifpack, iftoss), como la de traduccin Internet <-> FidoNet, como
     la del programa de llamada (ifcico).

    Sendmail.

    Servidor de News (INN).

    Adems, necesitaris los correspondientes programas cliente: un
     lector de correo (como el pine) y tal vez un lector de noticias (el
     propio pine os vale, aunque igual os gusta ms el tin).

  O sea, adems de entender de qu va esto de hacerse punto (que no es
  poco) habr que entendrselas con el crptico sendmail.cf y con los
  ficheros de INN.  Si adems se quieren tener News de Internet, habr
  que pelearse con otro programa (otro!), el suck.

  Casi nada. En fin, vayamos por partes.

  3.  Correo privado (NETs)

  Ante todo, mucha calma. Mientras no consigis enviar y recibir NETs,
  mejor que no pasis la pgina. Bien, sigamos.

  3.1.  Notacin Internet de las direcciones de Fidonet

  Antes de entrar en los ficheros de configuracin, tengo que haceros
  ver cmo una direccin de Fidonet se expresa en Internet. Es
  importante para las siguientes secciones, as como para saber escribir
  un NET.

  Bien, empecemos. Como sabis, una direccin de Fidonet contiene
  informacin de zona, regin, net, nodo y opcionalmente punto. Esto se
  nota as: ZONA:REGIN_Y_NET/NODO o ZONA:REGIN_Y_NET/NODO.PUNTO.

  Por ejemplo, mi direccin de punto es 2:341/12.19 y la del nodo de mi
  BBS, 2:341/12 (nodo que llamamos Boss).

  En Internet, una direccin de nodo se notar como:

       fNODO.nREGION_Y_NET.zZONA.fidonet.org

  o bien:

       pPUNTO.fNODO.nREGION_Y_NET.zZONA.fidonet.org

  As, mi mquina ser conocida en Fidonet como:

       p19.f12.n341.z2.fidonet.org

  Y yo, como usuario de mi mquina ser conocido como:

       Juan.Jose.Amor@p19.f12.n341.z2.fidonet.org

  Un mensaje dirigido al usuario anterior quedar convertido en un
  mensaje dirigido al usuario Juan Jose Amor del punto 2:341/12.19

  3.2.  Configuracin de Sendmail

  Sobre sendmail poda tirarme varias horas escribiendo, pero para eso
  ya hay un buen tocho escrito (de O'Reilly, creo). As que creo que lo
  mejor es proporcionar aqu mismo un fichero sendmail.cf, que sirve
  para una configuracin tpica, con conexin a Internet y Fidonet, e
  incluso una pequea Intranet local.

  Supongamos que vuestra mquina se llama DRAGON, y vuestro dominio
  ficticio (de Intranet) lo habis llamado, MICASA.ES. Aqu tenis un
  fichero sendmail.cf que os servir para mandar correo de la siguiente
  forma:

    usuario@dragon.micasa.es: Entregar directamente al buzn local.

    usuario@micasa.es: Entregar directamente al buzn local (dragon es
     la mquina maestra del dominio micasa.es :-) ).

    usuario@otramaquina.micasa.es: Entregar directamente a la mquina
     remota (se supone que la otra mquina est en una Ethernet
     local...).

    Usuario@pX.fY.nZ.zT.fidonet.org: Entregar a Ifmail.

    cualquier@otro.sitio: Encolarlo para Internet, para ser entregado
     al relevo de la red de redes cuando estemos conectados (el relevo
     es la mquina de nuestro proveedor de Internet que nos ofrece
     servicio de correo SMTP).

  Algunas observaciones sobre este fichero: en principio, no necesita
  que exista un servidor de nombres (DNS) disponible. No obstante, yo
  tengo uno local as que igual os da algn problema...

  Por otra parte, si recibs este documento en un formato distinto al
  original (SGML) puede que los caracteres de tabulacin que existen en
  sendmail.cf se hayan convertido en espacios. Por desgracia, as no os
  funcionar el fichero, de modo que tendris que convertir a mano, los
  separadores de las reglas a tabuladores.

  En la lnea referente al nodo del proveedor (donde aparece la IP del
  mo, 212.106.192.135) debis poner la IP del vuestro, claro :-). En la
  lnea referente a Fidonet, debis codificar el nombre del nodo al que
  llamis. En mi caso, 2:341/12 se traduce a f12.n341.z2 (observad la
  lnea del fichero sendmail.cf. Como vis, esto hace la funcin del
  fichero route.fe en FastEcho u otro procesador de correo de Fido bajo
  DOS: esta lnea determina entregar todos los NETs va el nodo
  elegido). Adems, si no tenis Internet o red local propia, podis
  comentar las lneas correspondientes de la regla 0.

  Adems, debis modificar la lnea "Punto local" con los datos de
  vuestro punto. As, sendmail entregar localmente cualquier mensaje
  dirigido a vuestro punto.

  Una vez instalado el nuevo /etc/sendmail.cf, debis reiniciar el
  demonio. Lo mejor es que lo matis y lo relancis de nuevo (enviarle
  la seal SIGHUP no funciona en todas las versiones). Hasta que no
  hagis esto, tu nuevo sendmail.cf no ser reconocido. Podis comprobar
  que lo habis logrado lanzando el demonio y a continuacin ejecutar
  telnet al puerto 25. Debis ver una referencia a la versin del
  sendmail.cf, BS-3.3 en la lnea de bienvenida. Luego, escribid quit
  para salir:

       $ telnet dragon.micasa.es 25
       Trying 127.0.0.1...
       Connected to localhost.
       Escape character is '^]'.
       220 dragon.micasa.es ESMTP Sendmail 8.7.6/BS-3.3 ready at Tue, 22 Apr 1997 11:56:31 +0200
       quit
       221 dragon.micasa.es closing connection
       Connection closed by foreign host.

       $

  Si tenis algn problema con el comando telnet (en particular, os
  responde con un Connection refused) es porque el demonio no ha podido
  mantenerse tras el cambio en el sendmail.cf. El motivo es un error en
  dicho fichero, as que ser el momento de repasarlo para luego volver
  a lanzar el sendmail. Los logs que este programa habr dejado os darn
  una pista acerca de la causa del problema.

  ______________________________________________________________________

  ################################################################################
  #####                                                                      #####
  #####                 Fichero de Configuracion de SENDMAIL                 #####
  #####                                                                      #####
  #####             Realizado por:   Juan Jose Amor, 2:341/12.19             #####
  #####       a partir del fichero FI-4.1 del Centro de Calculo de la        #####
  #####              Facultad de Informatica de Madrid, U.P.M.               #####
  #####                                                                      #####
  #####                              04-08-97                                #####
  #####                                                                      #####
  ################################################################################

  # RCS: $Id: sendmail.cf,v 1.5 1999/12/1  13:57:52 root Exp root $

  #   Version de Sendmail
  DVBS-3.3

  ################################################################################
  #   Definicion del Dominio                                                     #
  ################################################################################

  #   Dominio Local
  DOdragon
  DQmicasa
  DRes
  #DSes

  #   Nombre del Dominio Oficial de la Maquina
  Dj$O.$Q.$R

  #   Sinonimos
  Cw $w

  ################################################################################
  #   Macros Especiales                                                          #
  ################################################################################

  #   Mi nombre
  DnMAILER-DAEMON

  #   Cabecera en formato UNIX
  DlFrom $g $d

  #   Caracteres para delimitacion (operadores)
  Do.:%@!^=/[]

  #   Formato del nombre completo
  Dq$g$?x ($x)$.

  #   Mensaje de SMTP
  De$j Sendmail $v/$V ready at $b

  ################################################################################
  #   Opciones                                                                   #
  ################################################################################

  #   Fichero de Alias
  OA/etc/aliases
  #   Fichero de Ayuda
  OH/usr/lib/sendmail.hf
  #   Fichero de estado
  OS/etc/sendmail.st
  #   Nivel de log
  OL9
  #   Copia al Postmaster en caso de error
  OPPostmaster
  #   Directorio de colas de mensajes
  OQ/var/spool/mqueue
  #   Intervalo de "timeout" en la cola
  OT8d
  #   No conectar en caso de mucho trafico
  OX12
  #   Modo de funcionamiento
  Odb
  #   Modo de gestion de errores
  Oep
  #   GID por defecto
  Og1
  #   Enviamelo tambien en caso de utilizacion de alias
  Om
  #   Por defecto, los mensajes en estilo tradicional
  Oo
  #   No admite EXPN ni VRFY
  Opnoexpn,novrfy
  #   "Timeout" de lectura
  Or5m
  #   Arranca la cola antes de enviar un mensaje,
  Os
  #   UID por defecto
  Ou1
  #   Encolar en caso de mucho trafico
  Ox8
  #   Numero maximo de vueltas antes de decidir que estamos en un bucle de correo
  Oh17

  ################################################################################
  #   Precedencia de Mensajes                                                    #
  ################################################################################

  Pfirst-class=0
  Pspecial-delivery=100
  Pjunk=-100

  ################################################################################
  #   Usuarios Validados                                                         #
  ################################################################################

  #Troot
  #Tdaemon
  #Tuucp
  #Tnetwork
  Tjjamor
  Tslist

  ################################################################################
  #   Formato de las Cabeceras                                                   #
  ################################################################################

  H?P?Return-Path: <$g>
  HReceived: $?sfrom $s $.by $j ($v/$V) $b
  H?D?Resent-Date: $a
  H?D?Date: $a
  H?F?Resent-From: $q
  H?F?From: $q
  H?x?Full-Name: $x
  HSubject:
  H?M?Resent-Message-Id: <$t.$i@$j>
  H?M?Message-Id: <$t.$i@$j>

  ################################################################################
  #####                                                                      #####
  #####               REGLAS  DE  REESCRITURA  DE  DIRECCIONES               #####
  #####                                                                      #####
  ################################################################################

  ################################################################################
  #####                                                                      #####
  #####               REGLA  CERO                                            #####
  #####                                                                      #####
  ################################################################################
  S0

  #   Gestiona casos especiales
  R@                              $#local $:$n

  #   Filtra casos miscelaneos
  R$*<$*.>                        $1<$2>
  R$+<@>                          $@$>0$1

  #   Maquina local
  R$+<@$j>                        $#local $:$1

  #!!!Activar esta regla en caso de maquina Cabecera de Dominio
  R$+<@$Q.$R>                     $#local $:$1

  #   Vemos si es para la maquina local
  R$+<@$*$O.$Q.$R>                $#local $:$1

  #   Regla para entregar localmente mensajes para hispalinux.es
  # R$+<@hispalinux.es>           $#local $:$1

  #   Dominio local: entregar directamente (a~nadido por jjamor)
  R$+<@$*$Q.$R>                   $#tcp $@$2$Q.$R $:$1<@$2$Q.$R>

  #   Punto local: entregar directamente (a~nadido por jjamor)
  R$+<@p19.f12.n341.z2.fidonet.org>       $#local $:$1

  #   Vemos si es para Fidonet
  R$*<@$+.fidonet.org>$*          $#fido $@f12.n341.z2 $:$1<@$2.fidonet.org>$3

  ##  Cualquier otra direccion, al nodo del proveedor para su tramitacion
  # Proveedor : Jazzfree     (JAZZFREE.COM)
  R$+                             $#tcp $@[212.106.192.135] $:$1

  ################################################################################
  #####                                                                      #####
  #####               REGLA  1  -  Reescritura del Campo Origen              #####
  #####                                                                      #####
  ################################################################################
  S1

  ################################################################################
  #####                                                                      #####
  #####               REGLA  2  -  Reescritura del Campo Destino             #####
  #####                                                                      #####
  ################################################################################
  S2

  ################################################################################
  #####                                                                      #####
  #####               REGLA  3  -  Paso de la Direccion a Forma Canonica     #####
  #####                                                                      #####
  ################################################################################
  S3

  #   Gestion del caso especial "from:<>"
  R<>                             $@@

  #   Canonizacion basica
  R$*<$+>$*                       $2

  #   Encaminamiento norma RFC 822
  R@$+:$+@$+                      $:$1,@$3!$2
  R$+,@$+                         $1!$2

  #   El delimitador @ indica precedencia
  R$+@$+                          $:$1<@$2>
  R$+<$+@$+>                      $1$2<@$3>
  R$+<@$+>                        $@$>5$1<@$2>

  #   Trata el delimitador !
  R$+^$+                          $1!$2
  R$-!$+                          $@$>5$2<@$1.uucp>
  R$+!$+                          $@$>5$2<@$1>

  #   % es una precedencia inferior a @
  R$+%$+                          $:$1@$2
  R$+@$+%$+                       $1%$2@$3
  R$+@$+                          $@$>5$1<@$2>

  #   Correo local
  R$+                             $@$>5$1<@$j>

  ################################################################################
  #####                                                                      #####
  #####               REGLA  4  -  Reescritura salida final                  #####
  #####                                                                      #####
  ################################################################################
  S4

  #   Extrae informacion relativa al dominio local
  R$*<$+>$*                       $1$2$3

  ################################################################################
  #####                                                                      #####
  #####               REGLA  5  -  Cualifica Completamente la Direccion      #####
  #####                                                                      #####
  ################################################################################
  S5

  #   Maquinas locales
  R$+<@$*$O>                      $@$>6$1<@$2$j>
  R$+                             $@$>6$1

  ################################################################################
  #####                                                                      #####
  #####               REGLA  6  -  Resuelve sinonimos                        #####
  #####                            y elimina encaminamientos locales         #####
  #####                                                                      #####
  ################################################################################
  S6

  #   Elimina redundancias de nombres de maquinas locales
  R$+@$+<@$j>                     $@$>3$1@$2
  R$+!$+<@$j>                     $@$>3$1!$2
  R$+%$+<@$j>                     $@$>3$1%$2

  ################################################################################
  #   Especificacion del programa local de gestion de correo                     #
  ################################################################################

  #Mlocal, P=/usr/local/sbin/deliver, F=lsDFMShP, S=10, R=20/40, A=deliver $u
  Mlocal, P=/usr/bin/procmail, F=lsDFMAw5:/|@ShPfn, S=10/30, R=20/40,
          T=DNS/RFC822/X-Unix,
          A=procmail -a $h -d $u
  Mfido, P=/usr/lib/ifmail/ifmail, F=mSDFMuC, S=11, R=21, A=ifmail -l -1 -r $h $u
  Mprog, P=/bin/sh, F=DFMPelsu, S=10, R=10, A=sh -c $u
  S10
  R$*<@$j>                        $@$1

  ################################################################################
  #   Especificacion del gestor de correo SMTP/IPC                               #
  ################################################################################

  Mtcp, P=[IPC], F=CDFMXmsu, S=11, R=11, A=IPC $h
  S11
  ______________________________________________________________________

  3.3.  Configuracion de Sendmail usando macros M4

  La mayora de los usuarios de Unix prefieren configurar el sendmail
  con las colecciones de macros M4 que incluye. Reconozco que es la
  forma ms flexible y a la vez fcil de entender para configurar este
  programa. Eso s, si el fichero presentado en la seccin anterior os
  vale, mejor es que os saltis esta seccin o posiblemente os volveris
  locos (y no quiero que nadie me acuse de contagiaros nada!).

  Lo que viene a continuacin es una contribucin recibida de Roberto
  Surez Soto, y no me hago responsable de su eficacia (en realidad, no
  me voy a hacer responsable de la eficacia de nada que se haya dicho en
  este documento. Me lavo las manos como cualquier otro colaborador de
  la causa GNU ;-) ).

  La configuracin de sendmail para ifmail puede ser hecha mediante un
  fichero de stos, y de hecho es lo ms fcil. Un fichero sendmail-
  ifmail.mc (el nombre es indiferente) podra ser ste que pongo a
  continuacin. Est casi copiado del que viene en el paquete
  ifmail-2.14-tx8.8.tar.gz, de Pablo Saratxaga. La primera versin que
  hice se la mand al propio Pablo para que la revisara, y en su
  contestacin me mand un fichero .mc completsimo y muy bien explicado
  que es el que pongo aqu. As que todo el mrito es suyo :-) Yo slo
  me limito a transcribir lo que me mand l (si hay algn fallo en los
  comentarios o en las explicaciones, eso s que ser obra ma O:-))

  Los datos son imaginarios, necesitars cambiarlos para tu
  configuracin. Otra cosa: este fichero lo he probado con sendmail
  8.9.1; con la versin 8.8.x hay un par de lneas que no funcionan. De
  todos modos, si tienes una distribucin ms o menos reciente, seguro
  que ya trae un sendmail de la serie 8.9.x (y si no, no crees que ya
  es hora de actualizarse? :-))

  ______________________________________________________________________

  divert(-1)
  include(`../m4/cf.m4')
  OSTYPE(`linux')
  dnl ##########################
  dnl #  Configurable options  #
  dnl ##########################

  dnl ### El servidor SMTP de tu Proveedor de Internet
  dnl ### Los corchetes ( [ ] ) evitan las llamadas al DNS;
  dnl ### til si no ests conectado a Internet las 24 horas del da
  define(`SMART_HOST',            ``[smtp.de.tu.proveedor.com]'')

  dnl ### La direccin Fido de tu uplink; esta ser la ruta por defecto
  dnl ### para el correo de Fido
  define(`FIDO_SMART_HOST',       ``f1.n2.z3.fidonet.org'')

  dnl ### La pasarela Fidonet --> Internet
  define(`FIDO_GATEWAY',          ``f4.n5.z6.fidonet.org'')

  dnl ### Si vas a usar una pasarela, djalo as;
  dnl ### cmbialo a "undefine" si no la vas a usar
  dnl ### (si tienes una cuenta de email real, pon el undefine)
  define(`USE_FGATE')

  dnl ### Esto es necesario si no tienes acceso permanente a un DNS
  dnl ### (es decir, si no tienes conexin 24h a Internet; si tienes
  dnl ###  este tipo de conexin, puedes quitar estas lneas)
  FEATURE(accept_unresolvable_domains)
  FEATURE(nodns)dnl

  dnl
  dnl ####################################
  dnl #    End of configurable section   #
  dnl ####################################
  dnl

  define(`confDEF_USER_ID',``8:12'')
  define(`confMATCH_GECOS',`True')
  define(`confTRY_NULL_MX_LIST',`True')
  define(`confTO_QUEUEWARN', `2d')
  define(`confTO_QUEUERETURN', `8d')
  define(`confUSE_ERRORS_TO',`True')
  define(`confTRUSTED_USERS',`ftn')
  define(`confCT_FILE', ` -o /etc/mail/sendmail.ct')dnl
  define(`confCW_FILE', ` /etc/mail/sendmail.cw')dnl
  define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')dnl
  define(`confSTATUS_FILE',`/var/run/sendmail.st')dnl
  dnl ### Esta lnea que viene a continuacin define dos ficheros
  dnl ### de alias para sendmail; el segundo (/etc/mail/majordomo)
  dnl ### slo hace falta si usis majordomo como gestor de listas
  dnl ### de correo; como no es mi caso (y tampoco el de la mayora
  dnl ### de la gente), he cambiado la lnea para reflejarlo.
  dnl ### (dejo la original como comentario para el que le interese)
  dnl ### define(`ALIAS_FILE',`/etc/mail/aliases,/etc/mail/majordomo')dnl
  define(`ALIAS_FILE',`/etc/mail/aliases')dnl
  define(`HELP_FILE',`/etc/mail/sendmail.hf')dnl
  define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
  define(`STATUS_FILE',`/var/run/sendmail.st')dnl
  undefine(`UUCP_RELAY')dnl
  undefine(`BITNET_RELAY')dnl
  FEATURE(access_db, hash -o /etc/mail/access)dnl
  FEATURE(always_add_domain)dnl
  FEATURE(blacklist_recipients)dnl
  dnl FEATURE(limited_masquerade)dnl
  dnl FEATURE(masquerade_entire_domain)dnl
  FEATURE(masquerade_envelope)dnl
  FEATURE(local_procmail)dnl
  FEATURE(redirect)dnl
  FEATURE(relay_based_on_MX)dnl
  FEATURE(relay_entire_domain)dnl
  FEATURE(relay_local_from)dnl
  FEATURE(use_ct_file)dnl
  FEATURE(use_cw_file)dnl
  FEATURE(`domaintable',`hash -o /etc/mail/domaintable')dnl
  FEATURE(`genericstable',`hash -o /etc/mail/genericstable')dnl
  GENERICS_DOMAIN_FILE(confCW_FILE)dnl
  FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl
  FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
  FEATURE(nocanonify)dnl
  MAILER(procmail)dnl
  MAILER(smtp)dnl
  MAILER(ftn)dnl
  MAILER(usenet)dnl
  MAILER(uucp)dnl

  LOCAL_CONFIG
  # Pseudo-dominios (no se llama al DNS para ellos)
  CPz1.fidonet.org z2.fidonet.org z3.fidonet.org z4.fidonet.org
  CPz5.fidonet.org z6.fidonet.org ftn

  # Para las direcciones de Fido, que no se manden a travs del mailer
  # smtp.z2.fidonet.org, www.z2.fidonet.org, etc
  CFfidonet ns ns2 mail smtp www ftp

  # Esto es un pequeo parche para que ciertas direcciones que nosotros
  # digamos no salgan a Internet, sino que sean entregadas localmente
  Kpirateo hash -o /etc/mail/pirateo

  LOCAL_RULE_0
  # pirateo
  R$+ < @ $+ . > $*               $: < $(pirateo $1 @ $2 $: $) > $1 < @ $2 . > $3
  R$+ < @ $+ $~. > $*             $: < $(pirateo $1 @ $2 $3 $: $) > $1 < @ $2 $3 > $4
  R< $+ > $+ < @ $+ > $*          $@ $>97 $1 $4
  R<> $+ < @ $+ > $*              $: $1 < @ $2 > $3

  LOCAL_NET_CONFIG
  # ************ FIDONET.ORG ***********
  # for nodes allways put leading $* if you want to route his points too
  # routed trough default smart host FIDO_SMART_HOST
  R$* < @ $~F $+ .z1.fidonet.org . > $*   $#ftn $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z1.fidonet.org > $4
  R$* < @ $~F $+ .z2.fidonet.org . > $*   $#ftn $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z2.fidonet.org > $4
  R$* < @ $~F $+ .z3.fidonet.org . > $*   $#ftn $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z3.fidonet.org > $4
  R$* < @ $~F $+ .z4.fidonet.org . > $*   $#ftn $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z4.fidonet.org > $4
  R$* < @ $~F $+ .z5.fidonet.org . > $*   $#ftn $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z5.fidonet.org > $4
  R$* < @ $~F $+ .z6.fidonet.org . > $*   $#ftn $@ FIDO_SMART_HOST $: $1 < @ $2 $3 .z6.fidonet.org > $4

  # El resto de redes FTN se rutarn a travs del FIDO_SMART_HOST
  R$* < @ $+ .ftn . > $*                  $#ftn $@ FIDO_SMART_HOST $: $1 < @ $2 .ftn > $3

  # Si no tienes conexin permanente a Inet, comenta esta lnea
  ifdef(`USE_FGATE',`',`#')R$* < @ $* > $*                        $#ftn $@ FIDO_SMART_HOST $: $1 % $2 < @ FIDO_GATEWAY > $3
  ______________________________________________________________________

  Explico algunas de las opciones de este fichero.

    MAILER(ftn)dnl

  En esta lnea se le dice al sendmail que va a usar un mailer llamado
  ftn.  Tiene que haber un fichero ftn.m4 en el directorio mailer
  para este mailer. En Debian, con el paquete de ifmail viene un fichero
  ifmail.m4, as que tienes que cambiar las ocurrencias de ftn por
  ifmail. Esto lo puedes hacer fcilmente con sed:

       sed s/ftn/ifmail/g ifmail.mc > ifmail.mc.nuevo

  Para los que no tengan un fichero ifmail.m4 o ftn.m4 en su
  distribucin de ifmail, aqu pongo el que uso yo:

  ______________________________________________________________________

  PUSHDIVERT(-1)
  ifdef(`FIDO_MAILER_FLAGS',, `define(`FIDO_MAILER_FLAGS', `8mDFMuSC')')
  ifdef(`FIDO_MAILER_PATH',, `define(`FIDO_MAILER_PATH', /usr/lib/ifmail/ifmail)')
  ifdef(`FIDO_MAILER_USER',, `define(`FIDO_MAILER_USER', `ftn:uucp')')
  ifdef(`FIDO_MAILER_ARGS_H',, `define(`FIDO_MAILER_ARGS_H', `ifmail -r $h -g h $u')')
  ifdef(`FIDO_MAILER_ARGS_C',, `define(`FIDO_MAILER_ARGS_C', `ifmail -r $h -g c $u')')
  ifdef(`FIDO_MAILER_ARGS_B',, `define(`FIDO_MAILER_ARGS_B', `ifmail -b -r $h -g h $u')')
  ifdef(`FIDO_MAILER_ARGS_P',, `define(`FIDO_MAILER_ARGS_P', `ifmail -l-3 -r $h -g h $u')')
  POPDIVERT

  #############################
  # FIDO Mailer specification #
  #############################

  VERSIONID(`@(#)ftn.m4  1.01 (srtxg@f2219.n293.z2.fidonet.org) 7/7/97')

  # normal ftn mailer, pkt as hold
  Mftn,  P=FIDO_MAILER_PATH, F=FIDO_MAILER_FLAGS, S=11, R=21,
          _OPTINS(`FIDO_MAILER_CHARSET', `C=', `, ')U=FIDO_MAILER_USER,
          ifdef(`FIDO_MAILER_MAX', `M=FIDO_MAILER_MAX, ')A=FIDO_MAILER_ARGS_H

  # This is for crash mail just in case you need it * USE WHITH CARE *
  Mftn-crash,  P=FIDO_MAILER_PATH, F=FIDO_MAILER_FLAGS, S=11, R=21,
          _OPTINS(`FIDO_MAILER_CHARSET', `C=', `, ')U=FIDO_MAILER_USER,
          ifdef(`FIDO_MAILER_MAX', `M=FIDO_MAILER_MAX, ')A=FIDO_MAILER_ARGS_C

  # This doesn't split messages when writting in pkt, of course the node
  # receiving the pkt must be able to handle arbitrary size messages.
  # if the other end uses ifmail too use this.
  Mftn-big,  P=FIDO_MAILER_PATH, F=FIDO_MAILER_FLAGS, S=11, R=21,
          _OPTINS(`FIDO_MAILER_CHARSET', `C=', `, ')U=FIDO_MAILER_USER,
          ifdef(`FIDO_MAILER_MAX', `M=FIDO_MAILER_MAX, ')A=FIDO_MAILER_ARGS_B

  # This one uses a "kludge verbosity" of level -3, that is nothing is kept
  # from usenet/email infos.
  Mftn-poor, P=FIDO_MAILER_PATH, F=FIDO_MAILER_FLAGS, S=11, R=21,
          _OPTINS(`FIDO_MAILER_CHARSET', `C=', `, ')U=FIDO_MAILER_USER,
          ifdef(`FIDO_MAILER_MAX', `M=FIDO_MAILER_MAX, ')A=FIDO_MAILER_ARGS_P
  ______________________________________________________________________

  Est sacado, como tantas otras cosas, del paquete
  ifmail-2.14-tx8.8.tar.gz.

    define(`confCW_FILE',`/etc/mail/sendmail.cw')dnl

    FEATURE(use_cw_file)

    GENERICS_DOMAIN_FILE(confCW_FILE)

  Estas tres lneas sirven para utilizar un fichero
  (/etc/mail/sendmail.cw en nuestro caso, aunque puedes poner el que
  quieras) en el que pondremos todos los nombres de nuestra mquina. La
  tercera lnea (GENERICS_DOMAIN_TABLE) en realidad es para indicar un
  fichero en el que aparecen todos los dominios a enmascarar; para
  nuestro caso, vamos a decirle que enmascare todos los dominios locales
  (porque, a menos que tengas una mquina conectada directamente a Inet,
  los nombres locales no sern reales). Por ejemplo, el mo es:

       cheetah.darkland.es
       p83.f105.n348.z2.fidonet.org
       p76.f1.n348.z13.ficnet.org

  As, todo el correo dirigido a uno de estos dominios se entregar
  localmente.

    FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl

  Esto vale para crear un fichero (/etc/mail/mailertable, pero como
  antes, podemos escoger otro sitio) con mailers. Es decir, que el
  correo dirigido a unos dominios que nosotros digamos se rutar a
  travs de los mailers especificados. Mi fichero mailertable es ste:

       ceu.fi.udc.es                   smtp:ceu.fi.udc.es
       lucus.org                       smtp:lucus.org

  Los dominios que empiezan por un punto (.) especifican cualquier
  subred de ese dominio, y en el caso de los dominios de redes FTN
  (fidonet.org), cualquier punto/nodo de esa red. Por ejemplo: con
  .z13 estamos diciendo que cualquier mail (que en este caso ser un
  net) a un punto o nodo de la zona 13 (FiCNet, con la forma
  pXX.fY.n348.z13) ser encaminado a travs del nodo 13:348/1, que en
  formato Inet es f1.n348.z13. Esto slo hace falta para rutas
  alternativas a las normales, ya que todo el correo, por defecto, se
  encaminar a travs del smtp que hayas definido (en el caso de correo
  Inet) o a travs de tu uplink (en el caso del correo para fidonet.org
  y dems redes FTN). Otro ejemplo: suponiendo que adems de ser punto
  de Fido, eres punto de FiCNet y de SubNet:

  En realidad, en mi caso (y en el de la mayora, me imagino) no haran
  falta estas especificaciones. El nodo 13:348/1 y mi uplink 2:348/105
  son el mismo, FiC BBS; y por defecto, todo el correo FTN va a ir all.
  As que las mailertables slo tienen un verdadero sentido cuando
  rutis varias redes a distintos uplinks. En el resto de los casos,
  podis pasar sin ellas. Slo que me pareci una cosa interesante :-)
  Quizs no tanto para puntos, pero s para nodos. (recordemos que en
  principio Ifmail est pensado para nodos, no para puntos)

  Este fichero hay que compilarlo, para que el sendmail pueda leerlo.
  Para esto, slo tenis que hacer:

       makemap hash mailertable < mailertable

  (suponiendo que estis en el directorio en el que est el fichero
  mailertable, claro)

  Se crear un fichero mailertable.db, que es el que usar sendmail.

    FEATURE(`genericstable',`hash -o /etc/mail/genericstable')dnl

  Esta lnea no es para el correo Fido, sino ms bien para el de Inet.
  Sirve para enmascarar el correo saliente con vuestra direccin de
  Inet, en vez de la direccin local. Supongamos que el usuario que usas
  es robe (como es mi caso :-)), y tu direccin de Internet es rss-
  trgn@usa.net (como tambin es mi caso :-)). Crearas un fichero
  /etc/mail/genericstable que tuviera esto:

       robe    rss-trgn@usa.net

  Y as, todo el correo que escribas con este usuario y que salga de tu
  mquina para Inet, ser reescrito de tal forma que parezca que procede
  de rss-trgn@usa.net. S, tambin aparecer as en el From del correo
  Fido que enves, pero no te preocupes: ifmail se encargar de que el
  campo Reply-To vaya con tu direccin de punto, as que no habr
  problema a la hora de responder a tus mensajes :-)

  Este fichero hay que compilarlo, como el anterior:

       makemap hash genericstable < genericstable

    FEATURE(local_procmail)dnl

    MAILER(procmail)dnl

  Estas dos lneas especifican que el mailer local ser procmail. Si
  tienes instalado este programa, el correo ser entregado por l. Esto
  tiene una ventaja: si usas procmail para filtrar el correo, no te har
  falta ms que crear un fichero .procmailrc con las recetas adecuadas
  en tu directorio, sin el .forward que hara falta en otro caso.
  Adems, en las versiones 8.9.x de sendmail, el fichero .forward no
  est muy bien visto, con lo que te ahorraras problemas si lo hicieras
  as. Que lo instales, vamos :-) Es algo extremadamente til que todo
  el mundo ha instalado ya, por qu no lo ibas a hacer t? }:-) ;-)

    FEATURE(access_db, hash -o /etc/mail/access)dnl

  Con esta lnea, y si usis Sendmail 8.9.x (mi caso), podis controlar
  el correo de entrada, para rechazarlo en el caso de que provenga de
  spammers conocidos (o de alguien que no os caiga bien :-)). Esto se
  realiza mediante un fichero /etc/mail/access, que tambin controla
  aspectos de relay. Un fichero de ejemplo (el que me mand P.S. O:-))
  sera ste:

  ______________________________________________________________________

  #
  # allways accept those
  #
  postmaster@                     OK
  abuse@                          OK
  #
  # domains we accept they relay trough us
  #
  z1.fidonet.org                  RELAY
  z2.fidonet.org                  RELAY
  z3.fidonet.org                  RELAY
  z4.fidonet.org                  RELAY
  z5.fidonet.org                  RELAY
  z6.fidonet.org                  RELAY
  ftn                             RELAY
  #
  # special mail to accept, despite their domains are bannished
  #
  auclairdelalune@hotmail.com     OK
  mwibmer@hotmail.com             OK
  #
  # mail to reject
  #
  infobeat.com                    REJECT
  magnumhosting.com               REJECT
  net-vest.net                    REJECT
  # cyberpromo.com [204.137.222.*]
  # se puede dar un mensaje de error:
  cyberpromo.com                  550 We don't accept mail from spammers
  204.137.222                     550 We don't accept mail from spammers
  # discard ni siquiera envia mensaje de error, lo hace desaparecer
  # aunque yo prefiero dar un mensaje de error para hacerles saber que
  # su basura no llega
  Republica.Utocratica.de.Nowheresville   DISCARD
  _                               DISCARD
  ______________________________________________________________________

  Este fichero hay que compilarlo con makemap, como los dems:

  makemap hash access < access

    Kpirateo hash -o /etc/pirateo

  Esta lnea permite usar un fichero en el que definiremos direcciones
  de Inet que corresponden a direcciones locales. Sirve para que el
  correo que dirijamos a nuestra direccin de Inet no salga al mailer y
  luego vuelva, sino que se entregue directamente en la mquina. Yo
  tengo esto:

       rss-trgn@usa.net        robe

  Y todo el correo que made a rss-trgn@usa.net no saldr a Inet, sino
  que se entregar localmente al usuario robe (que soy yo). Otro uso que
  se me ocurre, pero no he probado, es poner ah la direccin
  Mail.Delivery.Subsystem@<direccin de tu uplink>. Durante una semana o
  as, hubo un net que rebotaba constantemente entre mi uplink y mi
  mquina con una direccin parecida, y era rechazado por ambos
  extremos. Aadiendo una lnea:

       Mail.Delivery.Subsystem@f105.n348.z13.fidonet.org       postmaster

  Se conseguira que este tipo de correo fuera al postmaster, es decir,
  al root, y no molestara a mi ya atribulado Sysop :-) Pero bueno, como
  deca antes esto no lo he probado todava ... y no tengo ganas de
  crear un pequeo caos para probarlo, sinceramente ;-)

  En fin ... como antes, recomiendo encarecidamente que creis un
  fichero como ste con vuestra direccin email. En una instalacin de
  ifmail que he estado haciendo recientemente, sendmail buscaba esta
  direccin para entregar el netmail a mi usuario :-? Y claro, es mucho
  mejor que se entregue localmente en vez de tener que salir a Inet y
  luego volver. Pero seguro que es por algn fallo que tuve al
  configurar ifmail o sendmail, no porque en realidad haga falta todo
  esto O:-)

  Despus de todo esto, hay que compilar el fichero sendmail-ifmail.mc
  que habis creado:

       m4 sendmail-ifmail.mc > sendmail-ifmail.cf

  Y luego, hay que copiarlo encima (o haced un enlace) del sendmail.cf
  actual (haced una copia de seguridad antes!), reiniciar el sendmail y
  empezar a hacer pruebas. Si no me he equivocado mucho, funcionar ;-)
  De nuevo, agradezco a Pablo Saratxaga la atencin y la ayuda que me ha
  brindado en la confeccin de este captulo :-)

  Nota: Este captulo ha sido escrito por Roberto Surez Soto, a quien
  podis localizar para lo que sea en rss-trgn@usa.net.

  3.4.  Configuracin de Ifmail

  Vamos a tratar aqu qu partes de ifmail hay que tocar para hacer
  funcionar el NETmail. Luego nos meteremos con las reas de ECHO.
  Paciencia.

  Personalmente, si usis RedHat os aconsejo que empecis por instalaros
  el paquete rpm de ifmail (versiones tx) que podris encontrar en
  cualquier mirror de sunsite.unc.edu. Si no usis RedHat, aun os debo
  recomendar el ifmail versin tx en formato tar, ya que est mucho
  mejor preparado para FidoNet que el ifmail original. Una vez instalado
  podris configurar vuestros ficheros, que estarn en /etc/ifmail.

  Bsicamente son dos los ficheros que hay que tocar:

    Areas : De momento no hay que tocarlos (o mejor, comentad con '#'
     cualquier rea que no est ya comentada...).

    config

  El fichero config es el primero que hay que tocar. Creo que hay
  opciones obvias (logfile, debugfile) y no os las voy a explicar por
  eso.  Tenis otras que son del estilo de las de FrontDoor (o incluso
  ms sencillas).  Aqu os dejo un fichero ejemplo config comentado para
  que hagis el vuestro.

  ______________________________________________________________________

  # Fichero de configuracion de ifmail (ifmail+ifnews+ifcico)
  # En esta version para RedHat, debe estar en /etc/ifmail/config

  # Cualquier linea que empiece con un caracter '#' es un comentario

  # Fichero de log
  logfile         /var/log/ifmail/iflog

  # Fichero para depuracion.
  debugfile       /var/log/ifmail/ifdebug

  # Nivel de informacion de depuracion. 0 Para ninguno. En pruebas, poner 4.
  verbose         0

  # Direccion principal de Fido
  address         2:341/12.19

  # AKAs:
  address         93:341/12.19
  # address               2:341/14.119

  # Passwords de inicio de sesion EMSI y yoohoo.
  password        2:341/12.19     SI_HOMBRE_COMO_QUE_TE_LA_VOY_A_DECIR

  # Passwords para paquetes (no suelen usarse).
  #packetpasswd   2:5929/6        AZERTY

  # Alias del sistema. Para convertir nombres de usuario a nombres de Fido
  # Por ejemplo, saber que un mensaje de 'jpgarcia' procede de
  # Juan Perez Garcia.
  sysalias        /etc/aliases

  # Nombre completo del sistema (FQDN)
  myfqdn          dragon.micasa.es

  # Directorio para los paquetes y ficheros entrantes:
  inbound         /var/spool/ifmail/inb
  # Directorios para sesiones "listed" y "protected"
  listinbound     /var/spool/ifmail/inb
  protinbound     /var/spool/ifmail/inb

  # Directorio para paquetes salientes.
  outbound        /var/spool/ifmail/fidonet

  # Directorio con los ficheros de "file-request" (de interes solo para
  # quien gestione una BBS con este software).
  public          /home/ftp/pub

  # Fichero que establece correspondencia entre nombres de ficheros cortos
  # y nombres con ruta completa. Opcion para sistemas que acepten "filereq"
  # reqmap                /usr/local/lib/fnet/reqmap

  # Directorio para nombres "magicos" de ficheros. Para sistemas con "filereq"
  magic           /usr/lib/ifmail/magic

  # Lista de nodos primaria. Se expande a extension de dia juliano (".NNN")
  # automaticamente si es necesario.
  nodelist        /var/spool/ifmail/nl.d/REGION34

  # Lista de nodos para otros dominios. Aqui podemos meter la lista de puntos.
  # Se incluye el nodo que genera dicha lista (2:341/14 en este momento).
  nodelist        ptlstr34        2:341/14@fidonet

  # Traducciones de dominios.
  domtrans        .fidonet                .fidonet.org

  # Base de datos de alias para las lineas ocultas
  # ^aREPLYADDR y ^aREPLYTO
  database        /var/spool/ifmail/ifdbm

  # Fichero con numero de secuencia (usado para generar IDs unicos)
  sequencer       /var/spool/ifmail/seq

  # Fichero de areas de ECHO
  areas           /etc/ifmail/Areas

  # Nombres de grupos cuyos mensajes no se entregaran a Fido.
  badgroup        relcom.ads.
  badgroup        relcom.commerce.

  # Limitacion en el numero de grupos que pueden aparecer en la cabecera
  # Newsgroups. Si se excede, el articulo no se mandara a Fido. Si se omite
  # la opcion, no supondra limite alguno.
  #maxgroups      10

  # Directorio con las tablas de traduccion de caracteres.
  maptabdir       /etc/ifmail/maptabs

  # Linea de comandos para entregar NETs con sendmail, y mensajes publicos
  # con news (INN).
  sendmail        /usr/lib/sendmail -f $F $T
  rnews           /usr/bin/rnews

  # Programa de desempaquetado
  iftoss          /usr/lib/ifmail/iftoss

  # Descompresores.
  # $F se convierte en el nombre del fichero.
  unzip           /usr/bin/unzip -Lojq $F
  unarj           /usr/bin/unarj e $F
  unlzh           /usr/bin/lha xiq $F
  unarc           /usr/bin/unpack $F
  unzoo           /usr/bin/zoo -extract $F
  # unrar         /usr/bin/unrar e $F
  unrar           /usr/local/bin/rar e $F

  # Compresor. Yo uso RAR, a lo mejor te interesa el ZIP.
  # $F es el nombre del fichero, $P es el nombre de los paquetes.
  #packer         /usr/bin/zip -q9 $F $P
  packer          /usr/local/bin/rar a $F $P

  # Tama~no maximo de un paquete comprimido de correo. ifpack lo partira
  # en varios si este tama~no es superado.
  maxfsize        500000

  # Tama~no maximo de un paquete .pkt. Se partira en varios si se supera.
  maxpsize        30000

  # Tama~no maximo de un mensaje cuando se permite auto-fragmentacion de
  # mensajes grandes.
  maxmsize 12300

  # Casos en los que no se aplican los limites de tama~no de paquete. El caso
  # "m" se refiere a los Nets.
  nonpacked       cm

  # Logs de News, y base de datos temporal para lineas "seen-by"
  newslog         /var/log/news/ifmail/
  msgidbm         /tmp/ifmsgids

  # Base de datos de traduccion MSGID <-> Message-ID para crear cabeceras
  # References: correctas (util con lectores de news que manejen threads)
  refdbm          /tmp/ref_db

  # OPCIONES PARA EL MODEM Y DEFINICION DEL SISTEMA DE PUNTO
  # Ver ejemplos incluidos con ifmail para mas detalle
  #
  # Aqui se incluye una configuracion basica para modems 14.4K
  #

  # Puerto del modem (nombre del dispositivo de /dev) y velocidad del puerto
  ModemPort       modem:L38400

  # Traduccion de telefonos desde las listas de nodos. Muy similar a la
  # que se utiliza en FrontDoor.
  PhoneTrans      34-     /
  PhoneTrans              /       00

  # Secuencias de inicio del modem (adaptar a tus necesidades)
  ModemReset      AT&F\r
  ModemDial               ATDT\T\r
  # Si tienes acceso a otro nodo con alguna peculiaridad... (como yo :-) )
  #ModemDial      (address 2:341/41) ATX2B9M0S7=60S11=60DT\T
  ModemHangup     ATZ\r
  ModemOK         OK
  ModemConnect    CONNECT
  ModemError      BUSY
  ModemError      NO\sCARRIER
  ModemError      NO\sDIAL
  ModemError      RING\r
  ModemError      ERROR

  # Tiempos de expiracion, respectivamente de espera a mensajes OK y CONNECT
  TimeoutReset    3
  TimeoutConnect  70

  # Delay in seconds before every call in "automatic" mode.  Ignored
  # if explicit list of addresses specified in the command string.
  DialDelay       0

  # Datos EMSI para este nodo.
  Name            Nombre del Punto
  Location        Madrid - Spain
  SysOp           Nombre del sysop
  Phone           -Unpublished-
  Speed           14400
  Flags           V32,V42,V42B
  ______________________________________________________________________

  3.5.  Enviamos un NET?

  Seguro que estis deseando de ver que lo que habis configurado sirve
  para algo. Yo tambin: si no os funciona, pasar al siguiente captulo
  sera intil...

  Bien, en principio, enviar un NET es tan simple como coger vuestro
  programa de correo preferido y escribirlo. Ya sabis, utilizando una
  direccin de Fido al estilo Internet.

  Una prueba que podis hacer es mandarte un NET a ti mismo, para que os
  hagis la idea de cmo funciona. As que suponed que sois el punto
  2:341/12.89 (o sea, un punto del mejor Boss que conozco ;-) ). Y
  supongamos que vuestro nombre es Juan Prez.

  Para enviar el NET, dirigid el mensaje a
  Juan.Perez@p89.f12.n341.z2.fidonet.org. Podrn pasar varias cosas:

  1. El mensaje ni se encola ni se devuelve, pero os sale en pantalla un
     mensaje tal que as: /etc/sendmail.cf: line 166: replacement $7 out
     of bounds. Normalmente, esto significa un error grave en el
     sendmail.cf. Revisad su contenido. Puede ocurrir que como separador
     se estn usando espacios en lugar de tabuladores.

  2. El mensaje os resulta devuelto, con un contenido as:

     ___________________________________________________________________

     From: MAILER-DAEMON (Mail Delivery Subsystem)
     Subject: Returned mail: Service unavailable

     [...]

        ----- The following addresses have delivery notifications -----
     Juan.Perez@p89.f12.n341.z2.fidonet.org  (unrecoverable error)

        ----- Transcript of session follows -----
     451 Cannot exec /usr/lib/ifmail/ifmail: No such file or directory
     554 Juan.Perez@p89.f12.n341.z2.fidonet.org... Service unavailable
     ___________________________________________________________________

  Eso quiere decir, bien que os habis olvidado de instalar ifmail, o no
  lo habis hecho correctamente (problemas de permisos, etc).

  3. El mensaje no se os es devuelto, pero se os queda en la cola de
     Internet (lo veris porque aparece en el comando mailq, indicando
     que est encolado por algn fallo de la red, como Network
     unreachable). En este caso, revisad el fichero sendmail.cf, algo
     hay mal escrito, que evita la entrega de los mensajes de Fido a
     ifmail. Ah!, despus de arreglarlo, no os olvidis de borrar la
     cola (ficheros de /var/spool/mqueue/) o de lo contrario, el mensaje
     anterior se acabar encaminando por las pasarelas Internet<->Fido
     que pululan por ah (deberais saber que su uso indiscriminado no
     es recomendable...).

  4. El mensaje no es devuelto, ni aparece en la cola de Internet. En
     este caso, empecemos por repasar el log de correo. Debe aparecer
     algo as:

     ___________________________________________________________________

     Apr 20 13:50:45 dragon sendmail[1723]: NAA01723: from=jperez, size=1912,
     class=0, pri=31912, nrcpts=1, msgid=<199704201150.NAA01723@dragon.micasa.es>,
     relay=f12.n341

     Apr 20 13:50:46 dragon sendmail[1728]: NAA01723: to=Juan.Perez@p89.f12.n341.z2.fidonet.org,
     ctladdr=jperez (9/13), delay=00:00:02, xdelay=00:00:01, mailer=fido, stat=Sent
     ___________________________________________________________________

  Enhorabuena! Este log os indica que tu mensaje ha sido entregado
  (Stat=Sent) al relevo f12.n341 va ifmail, o sea, que ha entrado en un
  paquete de Fido. Eso lo comprobaremos ahora.
  Si habis conseguido que se entregue el correo a ifmail, podis
  comprobar que se ha creado un paquete mirando el directorio
  /var/spool/ifmail/fidonet. All deberais encontrar un fichero con un
  nombre parecido a 0155000c.out. Si no aparece, puede que ifmail no
  haya podido escribir ah por problemas de permisos, o que el fichero
  /etc/ifmail/config est mal escrito. En este punto os ser de ayuda
  echar un vistazo a los logs disponibles en /var/log/ifmail/.

  Ahora podis ver cmo ese paquete se convierte de nuevo en correo de
  Internet. Para ello, movedlo a /var/spool/ifmail/inb y ejecutad desde
  el usuario fnet (propietario de todos estos ficheros) el comando
  /usr/lib/ifmail/ifunpack. El mensaje deber ser entregado de nuevo a
  sendmail, para el usuario de vuestra mquina cuyo nombre completo
  (campo gecos del fichero passwd) coincida con el destinatario del
  mensaje, o se encuentre en la base de datos ifdbm (ver la siguiente
  seccin de este documento). Si ifunpack aparenta no hacer nada, probad
  a ejecutar cambiar la extensin del fichero (de .out a .pkt) en el
  directorio /var/spool/ifmail/inb y reejecutad ifunpack de nuevo. El
  comportamiento depende de la versin que hayis instalado.

  Una vez hechas estas pruebas, vamos a intentar llamar al Boss. Para
  ello, mandadle un mensaje como hemos hecho antes. A continuacin, os
  recomiendo que copiis el script ifpoll que viene en la documentacin,
  en el directorio donde estn los binarios de ifmail. Este script est
  para empaquetar los mensajes y llamar cclicamente a tu Boss hasta
  conseguir una conexin.

  Editad el fichero ifpoll, poniendo los datos de vuestro nodo. En
  particular, necesitaris tocar las lneas siguientes (que he rellenado
  con los datos del sistema ficticio, punto de 2:341/12):

    NODE="f12.n341.z2.fidonet.org" (el nodo del Boss)

    IFCICO_OWNER=fnet (usuario Unix que ejecuta ifmail)

    IFCICO_SYSOP=jperez@dragon.micasa.es (la direccion local)

  Antes de ejecutar, tenis que compilar la lista de nodos. Coloca en
  /var/spool/ifmail/nl.d un par de ficheros de nodos y puntos recientes
  (REGION34.XXX y ptlstr34.YYY). Ejecuta, desde el usuario propietario
  de los ficheros de este directorio, el comando /usr/lib/ifmail/ifindex
  para compilarlos. Te generar un par de ficheros, index.dir e
  index.pag.

  Os recuerdo que REGION34.XXX no es una nodelist verdadera, con lo que
  para que funcione correctamente, muy probablemente tendris que poner
  al principio del fichero anterior, las siguientes lneas, para luego
  compilarlo con ifindex:

  ______________________________________________________________________
  Zone,2,Europe_etc,Finland,Ron_Dwight,358-0-2983308,9600,CM,V32B,HST,V42B,XA
  ,999,I_Gate,Nobody,Nowhere,-Unpublished-,9600,CM
  ;
  ______________________________________________________________________

  No os preocupis por el telfono del Gate de Europa: el encaminamiento
  previsto en esta configuracin impedir cualquier llamada que no sea a
  vuestro boss local.

  A continuacin, ejecutad ifpoll. Vigilad los logs del sistema.
  Empezarn a aparecer mensajes. Os muestro aqu un log de conexin
  correcta:
  ______________________________________________________________________
  Apr  3 23:25:51 dragon ifcico[649]: calling 2:341/12@fidonet (Corben, phone 34-1-5702555)
  Apr  3 23:25:51 dragon ifcico[649]: chat got "OK", continue
  Apr  3 23:26:13 dragon ifcico[649]: chat got "CONNECT", continue
  Apr  3 23:26:15 dragon ifcico[649]: start outbound EMSI session
  Apr  3 23:26:16 dragon ifcico[649]: remote  address: 2:341/12@Fidonet
  Apr  3 23:26:16 dragon ifcico[649]: remote  address: 2:34/777@Fidonet
  Apr  3 23:26:16 dragon ifcico[649]: remote  address: 37:1/5001@TrekNet
  Apr  3 23:26:16 dragon ifcico[649]: remote  address: 93:341/102@Subnet
  Apr  3 23:26:16 dragon ifcico[649]: remote  address: 9:3410/23@Virnet
  Apr  3 23:26:16 dragon ifcico[649]: remote  address: 9:3410/24@Virnet
  Apr  3 23:26:16 dragon ifcico[649]: remote  address: 2:341/41@Fidonet
  Apr  3 23:26:16 dragon ifcico[649]: remote  address: 37:1/5000@TrekNet
  Apr  3 23:26:16 dragon ifcico[649]: remote password: SI_HOMBRE_COMO_QUE_TE_LA_VOY_A_DECIR
  Apr  3 23:26:16 dragon ifcico[649]: remote     uses: FrontDoor [0c] version 2.20c.mL/BR000086
  Apr  3 23:26:16 dragon ifcico[649]: remote   system: TIPTOP Gate R34 - TrekNet Gate (R34)
  Apr  3 23:26:16 dragon ifcico[649]: remote location: Madrid !!!BASTA YA!!!
  Apr  3 23:26:16 dragon ifcico[649]: remote operator: Enrique Lopez
  Apr  3 23:26:16 dragon ifcico[649]: remote    phone: +341 5702555 341 5712437
  Apr  3 23:26:16 dragon ifcico[649]: remote     baud: 28800
  Apr  3 23:26:16 dragon ifcico[649]: remote    flags: V32B,V42B,V34,ARQ,FAX,CM,XA,LO
  Apr  3 23:26:16 dragon ifcico[649]: remote tag: "FDREV" value: "[2MY4J]"
  Apr  3 23:26:16 dragon ifcico[649]: remote     time: Apr 03 22:25:22
  Apr  3 23:26:16 dragon ifcico[649]: start ZedZap send
  Apr  3 23:26:19 dragon ifcico[649]: zmodem send: "0000015c.out" 2259 bytes
  Apr  3 23:26:18 dragon ifcico[649]: zmodem send rc=0
  Apr  3 23:26:18 dragon ifcico[649]: start ZedZap receive
  Apr  3 23:26:19 dragon ifcico[649]: zmodem receive: "01165d15.pkt" 2259 bytes dated Apr 04 00:25:26 mode 100400
  Apr  3 23:26:20 dragon ifcico[649]: received 2259 bytes in 1 seconds (2259 cps)
  Apr  3 23:26:20 dragon ifcico[649]: zmodem receive: "49b0f5c0.mo0" 410408 bytes dated Apr 03 23:47:36 mode 100400
  A

  [...]
  Apr  3 23:30:26 dragon ifcico[649]: zmodem receive rc=0
  Apr  3 23:30:27 dragon ifcico[649]: got SIGHUP
  ______________________________________________________________________

  Como vis, se parece mucho a un log de conexin de FrontDoor. As que
  supongo que lo entenderis.

  Si todo va bien, en el log aparecer, despus de la llamada, la parte
  correspondiente al desempaquetado: vigilad el log, pues igual surge
  algn error. De momento, como no habis configurado las news, todos
  los mensajes de ECHO se perdern, pero s se entregarn los NETs. Todo
  esto lo veris con claridad en los logs.

  Mucho ojo: vuestro sistema es desde ahora mismo una pasarela entre
  Internet y FidoNet. O sea, si alguien enva un mensaje al usuario UUCP
  de vuestro sistema, ifmail entender que la primera lnea del mensaje
  es un destinatario de Internet: como consecuencia, el mensaje lo
  mandar a sendmail para que lo encole para Internet.

  Llegado a este punto, lo tpico es contactar con el Boss para que
  compruebe si le ha llegado el NET, y si sus respuestas te llegan.
  Cuando lo consigas, ser el momento de pasar al siguiente captulo.

  3.6.  Acceso de otros usuarios al NET

  Una de las ventajas de gestionar el correo de Fido desde Unix es la
  posibilidad de que varios usuarios del sisteman usen la direccin
  Fidonet. Por ejemplo, en mi sistema me pueden interesar las
  direcciones de fido, Juan Jose Amor,2:341/12.19 y Jose Gomez Diez,
  2:341/12.19 (un amigo mo con cuenta en mi sistema).

  El problema es establecer la correspondencia entre nombres de usuario
  de Fido (Jose Gomez Diez) y del sistema Unix (jfg).

  Con anteriores versiones de ifmail-tx, funcionaba el siguiente truco:
  ifmail mantiene una base de datos dbm en /var/spool/ifmail/ifdbm.*.
  Dicha base de datos establece la relacin existente entre los nombres
  Fido y las direcciones de Internet. Cada vez que ifmail recibe por
  Internet (desde sendmail) un mensaje para Fido, obtiene del campo
  From: el nombre completo, si existe, y guarda la relacin en la base
  de datos. Cuando se recibe un mensaje desde Fido a este nodo, se busca
  en la base de datos el nombre y si se encuentra, se entrega el mensaje
  al usuario correspondiente a travs de sendmail.

  Por lo tanto, la forma de establecer relaciones entre cuentas de Unix
  y usuarios del nodo de Fido es simple: enviar un mensaje a otro
  usuario de Fido desde esa cuenta. De este modo la base de datos
  recordar para siempre el nombre del remitente del mensaje y la cuenta
  Unix asociada.

  Sin embargo, desde que actualic mi sistema a RedHat 6.x, las nuevas
  versiones del software instalado no soportan correctamente esta
  caracterstica, por lo que he tenido que utilizar el fichero
  /etc/aliases para establecer correspondencia entre los nombres de Fido
  y las cuentas, y modificar el fichero /etc/sendmail.cf para que dirija
  a los buzones locales los mensajes dirigidos al punto local.

  Si modificis el fichero /etc/aliases, no os olvidis de ejecutar a
  continuacin el comando newaliases.

  3.7.  Traduccin automtica de cdigos ISO a IBM-PC

  Como sabis, en sistemas Unix se utiliza la tabla de cdigos
  ISO-8859-1 para extender el ASCII a caracteres especiales del idioma,
  como acentos y ees. En cambio, en sistemas basados en MS-DOS se suele
  utilizar la tabla de la ROM del IBM-PC.

  Posteriormente contar cmo programar automticamente la conversin
  para las reas de ECHO. Ahora os dir cmo conseguir sta en los Nets,
  un asunto que tena pendiente en otras versiones del documento.

  Se trata de algo simple: vuestros Nets deben incluir una nueva
  cabecera, que diga: X-FTN-ORIGCHRS: IBMPC 2 (para aadir a vuestros
  mensajes nuevas cabeceras, usad algn programa de correo avanzado como
  Pine). Esta cabecer har que ifmail (versin tx) los convierta
  automticamente de cdigos ISO a IBM-PC. En caso de recibir mensajes
  de fuera, siempre que se incluya la cabecera de Fido CHRS: IBMPC 2 se
  producir automticamente una conversin a vuestra tabla ISO.

  4.  reas pblicas (ECHO)

  Preparos, porque viene lo peor :-) No obstante, si habis llegado a
  enviar y recibir correctamente los NETs, os considero capaces de
  afrontar la siguiente fase.

  Empezad por instalaros un sistema de noticias. Yo he instalado el ms
  moderno, INN. La gente dice que C-News es ms sencillo. Si eleg INN
  es porque viene como paquete estndar de la distribucin RedHat de
  Linux.

  Uno y otro, utilizan ficheros de configuracin parecidos. INN es ms
  potente pero ms lioso cuando hay problemas. Intentaremos ver cmo
  configurarlo todo para recibir el correo de Fido en las news. Antes,
  os recomiendo que os iniciis en el mundo de los servidores de News.
  Una lectura interesante es la gua de administracin de redes, de Olaf
  Kirch, que tambin ha traducido el proyecto LuCAS.

  Si instalis el paquete de la distribucin de RedHat, os meter
  archivos de configuracin en /etc/news, ficheros de grupos activos en
  /var/lib/news y os crear el directorio /var/spool/news con algn
  contenido.

  4.1.  Retocar ifmail

  En el captulo anterior nos olvidamos de las reas de ECHO, con lo que
  tenamos el fichero de reas vaco. Vamos a rellenarlo ahora.

  Para ello, aadid lneas como esta:

       AVISOS.R34                fido.r34.avisos             fido

  En cada lnea, el primer campo es el nombre del rea en Fido. El
  segundo es el nombre del grupo de news donde vamos a guardar el rea.
  Y el tercero, es el tipo de distribucin que le vamos a dar (en
  general, se le da fido frente a world que se le da a los grupos de
  USENET).

  Si usis la versin tx de ifmail, y escribs con acentos y ees, os
  recomiendo esta lnea para cada rea, en lugar de la anterior:

       AVISOS.R34      fido.r34.avisos         fido    iso-8859-1      CP437

  De esta forma vuestros mensajes de ECHO se exportarn con cdigos del
  IBM PC bajo DOS, lo que facilitar su lectura a los usuarios de
  programas de correo bajo este sistema operativo. Recordad que para los
  mensajes recibidos no tenis que tener en cuenta esto, ya que como os
  dije, la cabecera de FIDO CHRS es interpretada automticamente por
  vuestro ifmail y prcticamente cualquier otro procesador de correo
  Fido bajo Unix.

  Una ultima cosa: aseguros de que el usuario que ejecuta ifmail (fnet,
  fido o el que sea) tambin pertenece al grupo news. Si no es as,
  podra fallar el envo de mensajes de ECHO al no poder acceder a
  ficheros generados por el gestor de news elegido.

  Nota: En versiones ms recientes de ifmail-tx existen dos parmetros
  del fichero /etc/ifmail/config que establecen las traducciones de
  tabla de caracteres por defecto. Comprobad si en vuestra versin
  original del fichero aparecen los parmetros:

  ______________________________________________________________________
  defaultftnchar          cp437
  defaultrfcchar          iso-8859-1
  ______________________________________________________________________

  4.2.  Activar las reas en el INN

  Para que las reas sean aceptadas en el INN (o C-News) hay que
  incluirlas en el fichero /var/lib/news/active. Para la anterior, por
  ejemplo, la lnea a aadir sera:

       fido.r34.avisos 0000000001 0000000001 y

  Adems, si la aadimos al fichero /var/lib/news/newsgroups como sigue:

       fido.r34.avisos            Avisos de R34

  tendremos la descripcin visible en programas lectores como tin o xrn.

  Ojo, no borris de /var/lib/news/active o /var/lib/news/newsgroups las
  reas predefinidas (test, control, junk, to y puede que alguna ms) ya
  que posiblemente la versin que hayis instalado del inn las necesite
  y no funcione si desaparecen.

  4.3.  Otros ficheros de configuracin de INN

  En /etc/news habr que preparar algunos ficheros:

  1. hosts.nntp : Son los nodos que pueden conectarse a nosotros para
     entregarnos news. Lo normal es poner aqu las lneas:

     ___________________________________________________________________
     localhost:
     dragon.micasa.es:
     ___________________________________________________________________

  2. expire.ctl : Fichero para expiracin automtica de artculos.
     Permite borrar los artculos ms antiguos. No me voy a extender
     aqu en cmo se maneja, pues creo que entre el manual expire.ctl(5)
     y el propio ejemplo que viene ya es suficiente :-) (y no es
     imprescindible para que recibis los mensajes).

  3. inn.conf: Aqu se pone el nombre de vuestro sistema (el de vuestro
     punto, por ejemplo) y el de vuestro servidor de news. En principio,
     el nombre que asignis a la entrada Organization: ser el que se
     utilice como lnea Origin en Fidonet.
  4. nnrp.access: Este fichero debe dar autorizacin total de lectura y
     escritura de artculos, al menos a vuestra mquina. Lgico, no?.
     Valdrn unas lneas como:

     ___________________________________________________________________

     localhost:Read Post:::*
     dragon.micasa.es:Read Post:::*
     ___________________________________________________________________

  Si queris podis cambiar la palabra dragon por * y as daris acceso
  a todas las mquinas de vuestro dominio local. Ser muy interesante si
  tenis varios sistemas en red local. :-)

  5. newsfeeds: Este es el fichero ms importante. Es con el que se
     decide qu grupos se exportan, y a qu nodo. Es el que permite, que
     podis tener grupos locales, grupos de news en USENET (que se
     exportarn al servidor de news de vuestro proveedor, mediante SUCK)
     y reas de Fido (que se exportarn a vuestro nodo). Os voy a dejar
     un fichero de ejemplo que aglutina estas tres posibilidades. En l
     se supone que el proveedor tiene un servidor de news llamado
     news.proveedor.es y que vuestro Boss es 2:341/12 de nuevo.

     ___________________________________________________________________

     ##  $Revision: 1.12 $
     ##  newsfeeds - determine where Usenet articles get sent
     ##  Format:
     ##      site[/exclude,exclude...]\
     ##              :pattern,pattern...[/distrib,distrib...]\
     ##              :flag,flag...\
     ##              :param

     # Linea obligatoria

     ME:*:::

     # for NOV overview database, edit to put correct path to overchan
     #OVERVIEW!:*:Tc,WO:/news/bin/overchan
     OVERVIEW!:*:Tc,WO:/usr/lib/news/bin/overchan

     # Grupos de Fidonet: Ninguno, excepto fido.*

     f12.n341/f12.n341\
             :!*,fido.*\
             :Tf,Wfb\
             :

     # Grupos de Internet: Todos excepto locales (de micasa) y fido.

     news.proveedor.es/news.proveedor.es\
             :*,!fido.*,!micasa.*\
             :Tf,Wfm\
             :
     ___________________________________________________________________

  Bien, con esto creo que podemos poner en marcha el servidor de news.
  Seguid las instrucciones (en el INN de RedHat es tan simple como
  ejecutar /etc/rc.d/init.d/inn start. No es necesario rearrancar el
  equipo. Si estaba corriendo ya con la configuracin antigua, podis
  empezar por llamar al script anterior pero con el parmetro stop.)

  Una vez hecho esto, escribid con un lector de News en algn grupo
  existente. Si escribs a un grupo de Fido deber generarse un fichero
  f12.n341 (o con otro nombre, segn sea vuestro Boss) en el directorio
  /var/spool/news/out.going. Dicho fichero contiene referencias al
  mensaje que acabis de escribir. Si lo hacis a un grupo de USENET,
  aparecer un fichero news.proveedor.es, y si lo hacis a un grupo
  local, no aparecer ninguno. Todo esto depende del contenido del
  fichero /etc/newsfeeds.

  Vigilad los logs en estas operaciones, para identificar y corregir
  cualquier problema.

  En los directorios de documentacin de ifmail hay un script muy bueno
  para empaquetar los mensajes para Fido y prepararlos para su envo.
  Dicho script se llama send-ifmail y podis instalarlo en /etc/news.
  Segn qu paquete de ifmail hayis instalado, es posible que el
  fichero anterior ya est presente en /var/lib/news.

  4.4.  Intentemos empaquetar y desempaquetar los mensajes

  Para probar el empaquetado, hay que ejecutar el mencionado programa
  send-ifmail desde el usuario fnet. Os recomiendo que hagis que el
  usuario de ifmail (fnet) pertenezca tambin al grupo news, y as os
  ahorraris algunos problemas con los permisos.

  La ejecucin send-ifmail debe producir un fichero de nombre parecido a
  0155000c.tmp en un directorio similar a
  /var/spool/ifmail/fidonet/0155000c.opk/. Si no aparece, es casi seguro
  que se debe a problemas con los permisos.

  Al ejecutar a continuacin ifpack se producir el fichero definitivo,
  comprimido, de nombre 0155000c.XY0 siendo XY las iniciales del da de
  la semana en Ingls. Este fichero quedar en el directorio
  /var/spool/ifmail/fidonet/.

  Finalmente, cuando se llame a ifcico (va ifpoll) el paquete
  comprimido se enviar al Boss.

  Lo mejor es incluir la llamada a send-ifmail en una tarea de cron o
  bien en el propio script ifpoll justo antes de la llamada a ifpack. El
  parmetro a incluir es el nombre del nodo: en mi caso f12.n341.

  Cuando tengamos un fichero empaquetado de prueba, podemos probar a
  ejecutar ifunpack con el fin de comprobar que los mensajes que hemos
  exportado en pruebas se entregan al sistema de News. En este caso solo
  puede pasar tres cosas (a la vista de los logs):

  1. Que salgan errores ms o menos graves. Puede deberse a una
     configuracin incorrecta.

  2. Que se entreguen al grupo junk de news. Eso significa que INN no
     reconoce los grupos, y se debe a que hay algn problema con la
     definicin de los grupos activos, o los nombres que figuran en el
     fichero de reas. Tambin, con un paquete procedente del Boss,
     puede deberse a algn mensaje que proceda de un rea que no est
     activa en las News, porque sea nueva o nos hayamos suscrito pero no
     hayamos actualizado la configuracin de las News.

  3. Que aparezca en los logs que han sido rechazados por INN. Esto es
     lo normal: INN controla si un mensaje ha pasado por l ya y en este
     caso es normal que lo rechace, puesto que es un mensaje que t
     mismo escribiste en el mismo servidor.

  4.5.  Y probemos a llamar al Boss

  Si habis completado los pasos anteriores, empaquetando y
  desempaquetando correo de prueba, dirigid mensajes a las reas locales
  de tu BBS y algn NET. La llamada a ifpoll deber:

  1. Empaquetar todo el ECHO pendiente y el NETmail.

  2. Llamar al Boss

  3. Enviar los ficheros

  4. Recibir los ficheros del Boss

  5. Desempaquetar, entregando los NETs como E-mail y los ECHO al
     sistema de News

  Si algn paso falla, revisad los logs. En particular, ifmail a veces
  es algo silencioso con problemas de permisos: si no puede acceder a un
  paquete con correo pendiente, simplemente pasa de l y no lo enva,
  pero no genera ningn error.

  Esto me ha producido especiales dolores de cabeza con el envo de
  mensajes ECHO: ifmail los ignoraba sin decir nada. Esto era porque no
  haba dado permiso de escritura al grupo news al directorio
  /var/spool/news/outgoing, donde ifnews lee y modifica lo que ha
  enviado por su cuenta.

  Aqu ya no s qu ms decir. Si funciona, enhorabuena. Si no va, creo
  que los logs deberan daros suficiente informacin como para
  solucionarlo. S que es complicado (a m me lo vis a decir!) y que
  hay muchos archivos de log para vigilar, pero poco ms podemos hacer
  que trabajar cada uno por su cuenta...

  4.6.  Cmo aadir reas nuevas

  Recordaris que con FastEcho (bajo DOS) se poda tener creacin
  automtica de reas cuando llegaba algn mensaje para reas no
  definidas. Aqu aun no lo he conseguido, con lo que el proceso de
  suscripcin al rea conllevar algunas operaciones manuales:

    Aadir el rea al fichero /etc/ifmail/Areas, con la notacin
     indicada antes.

    Aadir el grupo de news al fichero /var/lib/news/active como se ha
     indicado antes.

    Aadir el grupo de news al fichero /var/lib/news/newsgroups como se
     ha indicado antes.

  Si el rea es de USENET, en lugar de aadirla al fichero Areas de
  ifmail, hay que aadirla, por ejemplo, al de configuracin de SUCK.

  4.7.  Algunas ideas sobre Suck

  Suck es posiblemente el programa ms sencillo de configurar de todos
  los que vamos a ver aqu. Aunque su finalidad nada tiene que ver con
  Fido, lo cuento para facilitaros la integracin de Internet (news) con
  Fido (reas de ECHO). As de paso soy coherente con haberos facilitado
  la conexin entre el correo de Internet y el de Fido, con sendmail.

  Por el momento, suck no se distribuye como paquete de mi distribucin
  (RedHat). Ignoro si se distribuye como parte de otras como Debian o
  Slackware, pero voy a suponer que os habis bajado el archivo con las
  fuentes, y concretamente la versin que yo uso (suck-3.4.1.tar.gz).
  Os parece antiguo y no lo encontris? Pues lo siento, este es uno de
  los programas que ya ofrecen toda la funcionalidad de inters en una
  versin de principios de 1997, as que en ningn momento me ha
  parecido necesario migrar a otra ms reciente.

  Lo primero que tenis que hacer es descomprimirlo y en el directorio
  que os va a generar, ejecutar el script de preparacin con la orden
  CFLAGS=-O2. Los binarios resultantes, instaladlos donde os parezca (os
  aconsejo /usr/local/bin).

  Ahora viene ponerlo en marcha. Aunque os voy a dar unas ideas, los
  usuarios ms avispados habrn notado que hay en la distribucin un
  directorio llamado Spanish.docs. S!, en efecto, trae toda la
  documentacin (incluidas las pginas del manual) traducidas a nuestro
  idioma. De modo que no deber liaros mucho este programa ...

  Bsicamente, configurarlo es tan simple como crear un fichero con los
  grupos que quieres bajarte (un grupo por lnea, seguido de un nmero
  0, que suck alterar cada vez que contacte con el servidor de noticias
  de vuestro proveedor). Por ejemplo, este fichero podra ser:

  ______________________________________________________________________
  comp.os.linux.announce 0
  es.comp.os.linux 0
  esp.comp.so.linux 0
  ______________________________________________________________________

  Este fichero deberais guardarlo entre las libreras modificables del
  sistema de noticias local. El mejor sitio es /var/lib/news. Y el mejor
  nombre, sucknewsrc.vuestro.servidor.de.news. Por ejemplo, el mo se
  llama /var/lib/news/sucknewsrc.noticias.ibernet.es.

  Luego, hay que ejecutar los programas que trae con una serie de
  parmetros de forma que, primero se conecte al servidor de noticias de
  vuestro proveedor y recoja las noticias pendientes introducindolas en
  un directorio temporal (tal como /var/spool/news/in.coming/tmp). A
  continuacin otro programa le dir a vuestro inn que recoja las
  noticias de ese directorio y las distribuya en los grupos
  correspondientes. Por ltimo, otro programa debera enviar los
  artculos que habis escrito vosotros al servidor de noticias de
  vuestro proveedor. Esto se har correctamente si se ha configurado
  bien el archivo /etc/news/newsfeed.

  Lo ms indicado es usar o adaptar un script como este:

  ______________________________________________________________________

  #!/bin/bash
  #
  # SUCK: realiza un suck(1) del servidor de news pasado como primer argumento.
  #

  # set -x

  if [ $# -ne 1 ] ; then
          echo "USO: SUCK nombre.server.nntp" ;
          exit 1
  fi

  NNTPHOST=$1
  DIR_ACTIVE=/var/lib/news

  DIR_INCOMING=/var/spool/news/in.coming/tmp
  DIR_BATCH_IN=/var/spool/news/in.coming
  DIR_BATCH_OUT=/var/spool/news/out.going

  mv  $DIR_BATCH_OUT/$NNTPHOST $DIR_BATCH_OUT/${NNTPHOST}.out

  /usr/lib/news/bin/ctlinnd flush $NNTPHOST

  echo "Recibiendo mensajes desde $NNTPHOST"

          suck $NNTPHOST \
                  -c \
                  -dt $DIR_ACTIVE \
                  -dm $DIR_INCOMING \
                  -dd $DIR_ACTIVE \
                  -p  .$NNTPHOST \
                  -bi $DIR_BATCH_IN/${NNTPHOST}

  echo "Enviando mensajes a $NNTPHOST"
          rpost $NNTPHOST \
                  -M -S /tmp/rpost$$  \
                  -b  $DIR_BATCH_OUT/${NNTPHOST}.out \
                  -f /usr/lib/news/bin/filter.NNTP-Posting-Host $\$o=/tmp/FILTER_MSG \
                  $\$i /tmp/FILTER_MSG

  echo "Descargando mensajes"
          /usr/lib/news/bin/innxmit news.bsoft.org $DIR_BATCH_IN/$NNTPHOST
  ______________________________________________________________________

  Lo mejor es que este script se instale en /usr/lib/news/bin.  Adems,
  otro script, filter.NNTP-Posting-Host, deber instalarse en
  /usr/lib/news/bin. Este filtro evita que el servidor de noticias del
  proveedor reciba vuestros mensajes como escritos desde vuestra
  mquina.  Cuando sta no forma parte permanente de Internet, los
  artculos podran ser rechazados. Este script es una simple orden de
  sed que elimina las lneas NNTP-Posting-Host y Xref de la cabecera, y
  es el siguiente:

  ______________________________________________________________________

  #!/bin/sh

  # this is just a simple script to use sed to strip off the
  # NNTP_Posting_Host and Xref headers that my ISP's newsfeed
  # doesn't like.  this could be written as a one liner
  # sed -e SEDCMD1 $1 | sed SEDCMD2 > $2

  # set -x

  if [ $# -ne 2 ]; then
          echo
          echo "Usage `basename $0` infile outfile <RETURN>"
          echo
          exit -1
  fi

  SEDCMD="/^NNTP-Posting-Host/d"
  SEDCMD2="/^Xref/d"
  OUTFILE=$2
  INFILE=$1

  if [ -f ${INFILE} ]; then

          sed -e ${SEDCMD} ${INFILE} | sed -e ${SEDCMD2} > ${OUTFILE}

          if [ $? -ne 0 ]; then
                  echo "Error"
                  exit -1
          fi

  else
          echo "$1 does not exist"
          exit -1
  fi
  ______________________________________________________________________

  Ya solo queda ejecutar el script SUCK desde el usuario news cuando
  estemos conectados a Internet y ... que la fuerza os acompae!

  4.8.  Un lector de noticias para Fido

  Ya os dije antes que para leer las reas de ECHO vala cualquier
  lector de noticias. Entonces, para qu seguir insistiendo? Bien,
  quien lleve tiempo leyendo reas de Fido con un lector tipo GoldED
  sabr que todos estos editores son ms cmodos y adecuados para esta
  red... Es cierto que se anuncia desde hace tiempo un GoldED para
  Linux, pero muy probablemente manejar bases de mensajes clsicas de
  Fido (JAM por ejemplo) y no creo que implante el protocolo del
  servidor de noticias.

  Otro editor especial para Fido en Unix es el fmbedit, que forma parte
  del paquete Feddi, que tan perfectamente bien mantiene Manuel Soriano.
  Sin embargo este programa sigue orientado a manejar bases de mensajes
  propias.

  Lo mejor que he encontrado hasta la fecha es el lector de noticias
  tin-1.3-unoff. En resumen, presenta las ventajas tradicionales del tin
  como sencillo pero funcional lector de noticias; pero adems se han
  aadido mejoras orientadas a Fido: coloracin automtica de las
  acotaciones, respuestas personalizadas, lneas de cabecera X-Comment-
  To que a ifmail le sirven para dirigir un mensaje pblico a una
  persona, etc.

  Instalos esa versin y fijos en los ficheros de configuracin que
  trae de ejemplo para Fido. Acabar siendo vuestro lector preferido, ya
  veris :-)

  4.8.1.  Slrn

  Adems de tin, tambin existe slrn. Es un lector de news bastante
  completo, que se puede adaptar para reconocer (y exportar) las
  cabeceras X-Comment-To mencionadas antes. Para ello, hay que crear un
  fichero de score, de puntuacin, que marque con puntuacin mxima
  los mensajes dirigidos a ti. Estos mensajes aparecern con un smbolo
  de admiracin (!) a la izquierda.

  Para esto, hace falta aadir unas lneas como stas al fichero

  ______________________________________________________________________
  % Para que los nuevos mensajes vayan dirigidos a "All":
  set custom_headers "X-Comment-To: All\n"
  % Para que los mensajes de respuesta vayan con la cabecera X-Comment-To:
  set followup_custom_headers "X-Comment-To: %r\n"
  set reply_custom_headers "X-Comment-To: %r\n"

  % Nombre del fichero de "score":
  scorefile ".slrn-score"
  ______________________________________________________________________

  Y ahora crearamos un fichero .slrn-score tal que as:

  ______________________________________________________________________
  [fido.*]
  score: 9999
  X-Comment-To: Perico\ Delos\ Palotes
  ______________________________________________________________________

  La primera lnea especifica el mbito de la puntuacin (es decir, en
  qu newsgroups se va a aplicar). Las barras invertidas () en el
  campo X-Comment-To son para escapar los espacios.

  Nota: Esta seccin sobre slrn ha sido escrita por Roberto Surez Soto,
  a quien podis localizar para lo que sea en rss-trgn@usa.net.

  5.  Referencias

  Voy a dar aqu algunos enlaces de Internet donde podis encontrar ms
  informacin sobre el tema.

    ftp://sunsite.rediris.es/pub/Linux/system/Mail/transport/fido/, un
     servidor de ftp donde encontraris el software ifmail en versiones
     de todo tipo, incluso como paquete rpm.

    ftp://sunsite.rediris.es/pub/Linux/system/News : Este sitio
     contiene software para gestionar y leer las noticias (INN, C-News,
     tin...).  No obstante os recomiendo usar los paquetes que vienen
     con las distribuciones de Linux.

    ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff/, lugar
     donde podris encontrar el lector de noticias tin-unoff.

    ftp://sunsite.unc.edu/pub/Linux/system/news/transport, lugar donde
     se localiza, entre otros programas, el Suck.

    http://lml.ls.fi.upm.es/~jjamor/intropnt.txt, un documento escrito
     por m hace bastante, sobre cmo hacerse punto de Fidonet con el
     software bajo MS-DOS.

    http://lucas.hispalinux.es/, servidor principal del Proyecto LuCAS,
     donde encontrars todo tipo de documentacin sobre Linux en nuestro
     idioma.

    Si sigues teniendo problemas despus de leer todo esto ;-) aun hay
     ms documentacin sobre ifmail:
     ftp://svpop.com.dist.unige.it/pub/Linux/ILS/Ifmail-HOWTO.tar.gz. Lo
     siento, aun nadie lo ha traducido al castellano... quin se anima?
     ;-)

  Si queris instruiros sobre sendmail, he aqu su biblia:

            Costales, Allman y Rickert
            `Sendmail'
            Ed: O'Reilly & Associates

  6.  Agradecimientos

  Hay mucha gente a la que agradecer desde aqu. Principalmente, a los
  siguientes:

    A ngel Jimnez Jimnez, quien, siendo el punto de Fidonet
     2:345/207.7, me dedic un extenso mensaje acerca de cmo haba
     configurado su sistema. Actualmente esa direccin pertenece a otra
     persona, y no s qu ha sido de ngel :-(

    A Ramn Gutirrez Camus, que fue quien me pas sus ficheros de
     configuracin con los que empec a trabajar.

    A Urko Lusa, quien tambin se ha montado un tinglado parecido y me
     ha dado algunos consejos (y adems es un experto en mezclar
     armoniosamente los juegos de caracteres para que todo el mundo se
     entienda :-) ).

    A Roberto Surez Soto, quien ha escrito un par de captulos de este
     documento.

    A todos aquellos que me han pasado desde la primera versin del
     documento, all por Abril; sus sugerencias que han contribuido a
     ampliarlo.

    Al Centro de Clculo de la Facultad de Informtica de la
     Universidad Politcnica de Madrid, por poner a nuestra disposicin
     un fichero de configuracin del sendmail que ms o menos pareca
     fcil de entender y modificar.

    A Pablo Saratxaga, quien ha hecho las versiones tx de ifmail.

    Y, por supuesto, a Enrique Lpez, el SysOp de CORBEN BBS (2:341/12)
     y mi Boss desde que decid hacerme punto. No creo que conozca Sysop
     mejor, ni que me aguante ms :-)

  7.  Historial de revisiones

  Este documento est vivo. Se mueve! :-) A continuacin os muestro la
  historia de revisiones que ha sufrido este documento, para vuestra
  informacin:

    Rev. 1.1 a 1.7: Versiones iniciales de ifmail-COMO, poco a poco fui
     aadiendo mi experiencia personal con los distintos paquetes de
     software, haciendo el documento cada vez mayor :-) La revisin 1.7
     fue publicada el 18 de abril de 1997.

    Rev. 1.8: Fue presentada el 15 de julio de 1998. El cambio a RedHat
     5.x me present nuevas versiones del software que tenan
     comportamiento ligeramente distinto. En esta versin se reflejaron
     estos cambios.

    Rev. 1.9: Fue presentada el 25 de diciembre de 1998. Se aaden
     nuevas secciones aportadas por Roberto Surez Soto, y se mejoran
     las dems.

    Rev. 1.10: Presentada el 6 de diciembre de 1999. Se realizan
     algunas correcciones estilsticas recomendadas por el grupo
     INSFLUG, al tiempo que se actualiza el documento con nuevas
     peculiaridades detectadas en el software utilizado para la versin
     6.0 de RedHat.  Es el documento para el nuevo milenio :-)

  8.  Notas sobre el Copyright y todo eso

  Este documento es ... Copyleft, faltara ms ;-) Puede ser distribuido
  libremente bajo licencia GNU. En consecuencia, podis modificar lo que
  queris excepto esta seccin que habla de los autores. De todas
  formas, si lo modificis ser positivo decrmelo si queris que
  vuestra aportacin la vea ms gente.

  El documento ha sido escrito por Juan Jos Amor Iglesias, en 1997.
  Incorpora revisiones de 1998 y 1999, dos de ellas escritas por Roberto
  Surez Soto, tal como se indica en las correspondientes secciones.

  El documento forma parte del LDP espaol, tambin conocido como
  Proyecto LuCAS, dentro de los denominados documentos cortos o
  COMOs, mantenidos por el grupo INSFLUG, y coordinados por Francisco
  Jos Montilla. Su sitio principal de distribucin es
  http://www.insflug.org. Su principal rplica se encuentra en
  http://lucas.hispalinux.es/.

  Aunque este COMO ya tiene de todo lo que quera ponerle, aun no lo voy
  a considerar terminado. Principalmente porque tendr fallos que me
  tenis que comentar los lectores. Adems, siempre estar abierto a
  ampliaciones que queris proponer. Eso s, prefiero que las
  ampliaciones me las deis hechas :-)

  Por ltimo, declino toda responsabilidad acerca de los daos que el
  uso de este documento, dentro o fuera de sus fines previstos, pueda
  causar sobre vuestro disco duro, CPU, monitor o cualquier otra parte
  de vuestro equipo informtico; as como sobre vuestra cordura. Tampoco
  me hago responsable de ningn altercado familiar ;-) Hay que
  advertirlo, nunca se sabe...

  Linux Information Sheet
  Michael K. Johnson, johnsonm@nigel.vnet.net
  v4.4, 8 de Febrero de 1996

  Este documento proporciona una informacin bsica sobre el sistema
  operativo Linux, incluyendo una explicacin de Linux, una lista de
  caractersticas, algunos requerimientos y algunos recursos.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin a Linux

  2.      Caractersticas de Linux

  3.      Hardware

  3.1.    Configuracin mnima

  3.2.    Configuracin usable

  3.3.    Hardware soportado

  4.      Una lista incompleta de Programas Portados y Otro Software

  5.      Quin usa Linux?

  6.      Obtener Linux

  6.1.    FTP annimo

  6.2.    Otras formas de obtener Linux

  7.      Empezando

  8.      Status legal de Linux

  9.      Noticias sobre Linux

  10.     El Futuro

  11.     Este documento

  12.     Legalidad

  13.     Nota del traductor

  14.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin a Linux

  Linux es una reimplementacin completamente gratuita de las
  especificaciones POSIX, con extensiones de SYSV y BSD (lo cual
  significa que parece Unix pero no proviene del mismo cdigo fuente
  base), que est disponible tanto en su versin fuente como ya
  compilada. El copyright pertenece a Linus B. Torvalds
  (Linus.Torvalds@.Helsinki.FI) y otros colaboradores, y es libremente
  redistribuible bajo las condiciones de la "GNU Public License".

  Linux no es de dominio pblico, ni es "shareware". Es software
  gratuito, usualmente denominado freeware, y t puedes proporcionar
  copias a otros pero tambin debes dar los fuentes con stas o hacer
  posible su obtencin de la misma forma. Si t redistribuyes una
  modificacin ests legalmente obligado a proporcionar los fuentes de
  sta. Vease la "GNU Public License" para ms detalles. Una copia est
  incluida en los fuentes de Linux o puedes obtenerla va ftp de
  prep.ai.mit.edu en /pub/gnu/COPYING

  Linux es gratuito en la versin actual y seguir sindolo en el
  futuro.  Debido a la naturaleza del copyright de GNU, al que Linux
  est sujeto, sera ilegal no hacerlo as. No obstante es importante
  saber que es perfectamente legal cobrar por distribuir Linux, mientras
  se incluya el cdigo fuente; para ampliar este punto remtase a la
  GPL.

  Linux se ejecuta en mquinas 386/486/Pentium con bus ISA, EISA, PCI o
  VLB. MCA (bus propietario de IBM) no est actualmente soportado por la
  falta de documentacin, aunque hay algunos parches disponibles para
  ciertas mquinas.

  Actualmente se est portando a distintas plataformas Motorola 680x0
  (los Amigas y Ataris), y por ahora funciona bastante bien. Se requiere
  un 68020 con una MMU, un 68030 o un 68040, y tambin una FPU. El
  software de red y X funcionan.

  Linux funciona bien en la CPU Alpha de DEC, actualmente bajo "Jensen",
  "NoName", "Cabriolet", "Universal Desktop Box" (ms conocida como
  Multia), y algunas otras plataformas.

  Linux est siendo rpidamente portado a Sun Sparc.

  Versiones para otras mquinas, incluyendo MIPS, PowerPC y PowerMAC
  estn en camino y se est haciendo algn progreso. No te asustes, pero
  si ests interesado y puedes contribuir, puedes perfectamente
  encontrar otros desarrolladores que querrn trabajar contigo.

  A partir de la versin 1.0 que data de Marzo de 1994, Linux ya no es
  una versin de prueba (una beta). An hay errores en el sistema y
  nuevos errores irn apareciendo y sern solucionados con el tiempo.
  Como Linux es un proyecto de desarrollo abierto, todas las nuevas
  versiones que vayan apareciendo estarn disponibles para el pblico,
  sean o no estables. Sin embargo, para ayudar a la gente a discernir si
  la una versin es o no estable se ha acordado lo siguiente: Las
  versiones 1.x.y en las que x sea par son versiones estables y el
  incremento de y implica la correccin de algn error. Por lo tanto de
  la versin 1.2.2 a la 1.2.3 slo hay correccin de errores, pero
  ninguna caracterstica nueva. Las versiones 1.x.y con x impar son
  betas para los desarrolladores, pudiendo ser inestables y hasta
  colgarse, y estn siendo ampliadas continuamente con nuevas
  posibilidades.  Las actuales versiones de desarrollo son las numeradas
  1.3.x, y la ms reciente versin estable es la 1.2.13.

  De cuando en cuando, mientras el ncleo de desarrollo actual se
  estabiliza, ser "congelado" como el nuevo ncleo y el desarrollo
  continuar en una nueva versin de desarrollo del kernel.

  La mayor parte de las versiones de Linux, betas o no, son bastante
  estables, y podrs continuar usndolas si hacen lo que t quieres y no
  pretendes estar a la ltima. Un site tuvo un ordenador corriendo bajo
  la versin 0.97 con un nivel de parcheado (patchlevel) 1
  (originalmente del verano de 1992) sin un slo error o cuelgue.
  (Habra durado ms si el bruto del operador no hubiese confundido el
  transformador de la fuente con una aguja de descarga de electricidad
  esttica...). Otros han informado de actualizaciones con un ao de
  retraso. Un site sigue teniendo un ordenador corriendo Linux 0.99pl15s
  desde que fue inicialmente arrancado hace ms de 600 das.

  Algo a tener en cuenta es que Linux est desarrollado siguiendo un
  modelo abierto y distribuido, en lugar de uno cerrado y centralizado
  como la mayor parte del software. Esto significa que la versin
  actualmente en desarrollo es siempre pblica (con un retraso de una o
  dos semanas) para que cualquiera pueda usarla. El resultado es que en
  cualquier momento que se aada una nueva funcionalidad y salga a la
  luz la nueva versin, sta casi siempre tendr errores, pero sern
  detectados y corregidos rpidamente, a menudo en cuestin de horas, ya
  que mucha gente trabaja en ello.

  En contraste, el modelo centralizado y cerrado significa que hay slo
  una persona o un equipo trabajando en el proyecto, y slo publican
  software que ellos piensan que est trabajando bien. A menudo esto
  conlleva largos periodos de tiempo entre versiones, largas esperas
  para la correccin de errores y un desarrollo ms lento. Por supuesto
  que la ltima versin de este tipo de software es a menudo de mejor
  calidad para el pblico, pero la velocidad de desarrollo es
  normalmente mucho ms lenta.

  A 8 de Febrero de 1996, la actual versin estable de Linux es 1.2.13,
  y el nuevo rbol de desarrollo, 1.3.x, est actualmente por la versin
  1.3.60. No uses ncleos de la serie 1.3.x a menos que quieras meterte
  en su desarrollo y no te preocupe que tu mquina se venga abajo una
  vez tras otra!.

  2.  Caractersticas de Linux

    multitarea: varios programas (realmente procesos) ejecutndose al
     mismo tiempo.

    multiusuario: varios usuarios en la misma mquina al mismo tiempo
     (y sin licencias para todos!).

    multiplataforma: corre en muchas CPUs distintas, no slo Intel.

    funciona en modo protegido 386.

    tiene proteccin de la memoria entre procesos, de manera que uno de
     ellos no pueda colgar el sistema.

    carga de ejecutables por demanda: Linux slo lee de disco aquellas
     partes de un programa que estn siendo usadas actualmente.

    poltica de copia en escritura para la comparticin de pginas
     entre ejecutables: esto significa que varios procesos pueden usar
     la misma zona de memoria para ejecutarse. Cuando alguno intenta
     escribir en esa memoria, la pgina (4Kb de memoria) se copia a otro
     lugar. Esta poltica de copia en escritura tiene dos beneficios:
     aumenta la velocidad y reduce el uso de memoria.

    memoria virtual usando paginacin (sin intercambio de procesos
     completos) a disco: una particin o un archivo en el sistema de
     archivos, o ambos, con la posibilidad de aadir ms reas de
     intercambio sobre la marcha (se sigue denominando intercambio, es
     en realidad un intercambio de pginas). Un total de 16 zonas de
     intercambio de 128Mb de tamao mximo pueden ser usadas en un
     momento dado con un lmite terico de 2Gb para intercambio.

    la memoria se gestiona como un recurso unificado para los programas
     de usuario y para el cach de disco, de tal forma que toda la
     memoria libre puede ser usada para cach y ste puede a su vez ser
     reducido cuando se ejecuten grandes programas.

    libreras compartidas de carga dinmica (DLL's) y libreras
     estticas tambin, por supuesto.

    se realizan volcados de estado (core dumps) para posibilitar los
     anlisis post-mortem, permitiendo el uso de depuradores sobre los
     programas no slo en ejecucin sino tambin tras abortar stos por
     cualquier motivo.

    casi totalmente compatible con POSIX, System V y BSD a nivel
     fuente.

    mediante un mdulo de emulacin de iBCS2, casi completamente
     compatible con SCO, SVR3 y SVR4 a nivel binario.

    todo el cdigo fuente est disponible, incluyendo el ncleo
     completo y todos los drivers, las herramientas de desarrollo y
     todos los programas de usuario; adems todo ello se puede
     distribuir libremente. Hay algunos programas comerciales que estn
     siendo ofrecidos para Linux actualmente sin cdigo fuente, pero
     todo lo que ha sido gratuito sigue siendo gratuito.

    control de tareas POSIX.

    pseudo-terminales (pty's).

    emulacin de 387 en el ncleo, de tal forma que los programas no
     tengan que hacer su propia emulacin matemtica. Cualquier mquina
     que ejecute Linux parecer dotada de coprocesador matemtico. Por
     supuesto, si tu ordenador ya tiene una FPU (unidad de coma
     flotante), ser usada en lugar de la emulacin, pudiendo incluso
     compilar tu propio kernel sin la emulacin matemtica y conseguir
     un pequeo ahorro de memoria.

    soporte para muchos teclados nacionales o adaptados y es bastante
     fcil aadir nuevos dinmicamente.

    consolas virtuales mltiples: varias sesiones de login a travs de
     la consola entre las que se puede cambiar con las combinaciones
     adecuadas de teclas (totalmente independiente del hardware de
     video).  Se crean dinmicamente y puedes tener hasta 64.

    soporte para varios sistemas de archivo comunes, incluyendo
     minix-1, Xenix y todos los sistemas de archivo tpicos de System V,
     y tiene un avanzado sistema de archivos propio con una capacidad de
     hasta 4 Tb y nombres de archivos de hasta 255 caracteres de
     longitud.

    acceso transparente a particiones MS-DOS (o a particiones OS/2 FAT)
     mediante un sistema de archivos especial: no necesitas ningn
     comando especial para usar la particin MS-DOS, parece un sistema
     de archivos normal de Unix (excepto por algunas graciosas
     restricciones en los nombres de archivo, permisos, y esas cosas).
     Las particiones comprimidas de MS-DOS 6 no son accesibles en este
     momento, y no se espera que lo sean en el futuro. El soporte para
     VFAT (WNT, Windows 95) ha sido aadido al ncleo de desarrollo y
     estar en la prxima versin estable.

    un sistema de archivos especial llamado UMSDOS que permite que
     Linux sea instalado en un sistema de archivos DOS.

    soporte en slo lectura de HPFS-2 del OS/2 2.1

    sistema de archivos de CD-ROM que lee todos los formatos estndar
     de CD-ROM.

    TCP/IP, incluyendo ftp, telnet, NFS, etc.

    Appletalk disponible en el actual ncleo de desarrollo.

    software cliente y servidor Netware disponible en los ncleos de
     desarrollo.

  3.  Hardware

  3.1.  Configuracin mnima

  La siguiente es posiblemente la mnima configuracin sobre la que
  Linux puede trabajar: 386SX/16, 2 Mb RAM, disquetera de 1.44 Mb o de
  1.2 Mb y cualquier tarjeta grfica soportada (ms teclado, monitor y
  dems, por supuesto). Esto debera permitirte arrancar y comprobar si
  trabaja en el ordenador, pero no sers capaz de hacer nada til.

  Para hacer algo, necesitars adems algo de espacio en disco duro
  tambin, 5 o 10 Mb sern suficientes para una configuracin minimsima
  (con slo los comandos ms importantes y quizs una o dos pequeas
  aplicaciones instaladas, como por ejemplo un programa de terminal).
  Esto es an muy, muy limitado, y muy incmodo, ya que no deja sufiente
  espacio para casi nada, a menos que tus aplicaciones sean bastante
  limitadas. No es recomendable para nada salvo para probar si las cosas
  funcionan y por supuesto para poder alardear de los pocos recursos
  requeridos.

  3.2.  Configuracin usable

  Si vas a ejecutar programas de computacin intensiva, como gcc, X y
  TeX, probablemente querrs un procesador ms rpido que el 386SX/16,
  pero incluso eso sera suficiente si fueras paciente.

  En la prctica necesitas al menos 4 Mb de RAM si no usas X, y 8 Mb en
  caso contrario. Adems, si quieres tener muchos usuarios al mismo
  tiempo o ejecutar muchos programas grandes (compiladores por ejemplo)
  al mismo tiempo tambin, querrs ms de 4 Mb de memoria RAM. Puede
  trabajar con menor cantidad de memoria (debera de hacerlo incluso con
  2 Mb), pero usara memoria virtual (usando el disco duro como una
  memoria lenta) y eso sera tan lento como para calificarlo de intil.

  La cantidad de disco duro que necesites depende del software que
  pienses instalar. El conjunto de utilidades tpicas de Unix, shells y
  programas de administrador ocupan menos de 10 Mb, con un poco de
  espacio libre para ficheros de usuario. Para un sistema ms completo
  consigue la Slackware, MCC o Debian, y asume que necesitars entre 60
  y 200 Mb, segn lo que eligas instalar y la distribucin de que se
  trate. Aade el espacio que desees reservar para los archivos de
  usuario a estos totales. Con los precios de los discos duros en la
  actualidad, si vas a comprar un nuevo sistema no tiene sentido comprar
  una unidad demasiado pequea. Adquiere al menos 200 Mb,
  preferiblemente 500 Mb o ms, y no te arrepentirs.

  Aade ms memoria, ms disco duro, un procesador ms rpido y otras
  cosas segn tus necesidades, deseos y cartera para sobrepasar lo
  simplemente usable. En general, una gran diferencia frente a DOS es
  que con Linux, aadir memoria supone una grandsima diferencia,
  mientras que con DOS ms memoria no supone tanta mejora. Esto por
  supuesto tiene algo que ver con los 640 Kb que pone por lmite el DOS,
  hecho que no se da en absoluto bajo Linux.

  3.3.  Hardware soportado

     CPU:
        Cualquiera que pueda ejecutar programas en modo protegido del
        386 (todos los modelos de 386, 486, 586 y 686 deberan valer;
        los 286 no funcionan ni lo harn jams). Adems, una versin
        para las CPU's 680x0 (para x=2 con MMU externa, 3 y 4) que est
        implementada en Amigas y Ataris est siendo desarrollada y puede
        ser encontrada en tsx-11.mit.edu en el directorio 680x0. Muchas
        Alphas son soportadas. Se est portando a PowerPC, ARM y a
        arquitecturas MIPS. Ms detalles disponibles en cualquier otro
        lugar.

     Architecturas:
        Buses ISA o EISA. MCA (el de los PS/2) no funciona. Los buses
        locales (VLB y PCI) funcionan.

     RAM:
        Tericamente hasta 1 Gb, aunque jams ha sido probado hasta este
        extremo. Algunas personas (incluido Linus) han notado que
        aadiendo memoria sin incrementar el cach al mismo tiempo su
        mquina se ha ralentizado extremadamente, por ello si aades
        memoria y encuentras tu mquina ms lenta prueba a ponerle ms
        cach. Por encima de 64Mb de ram se requiere un parmetro de
        arranque, ya que la BIOS no puede detectar ms que 64 Mb por su
        implementacin.

     Almacenamiento de datos:
        Las unidades tipo AT (IDE, controladores de disco duro de 16
        bits con MFM o RLL, o ESDI) son soportadas, como tambin lo son
        los discos duros y CD-ROM SCSI, con un adaptador SCSI soportado.
        Las cotroladoras tipo XT (controladoras de 8 bits con MFM o RLL)
        tambin son soportadas. Adaptadores SCSI soportados: Adaptec
        1542, 1522, 1740 y la serie 27xx, controladoras Buslogic va
        compatibilidad con Adaptec o con su propio driver, controladoras
        basadas en NCR53c810, Seagate ST-01 y ST-02, de Future Domain la
        serie TMC-88x (o cualquier placa basada en el chip TMC950) y
        TMC1660/1680, Ultrastor 14F, 24F y 34F, Western Digital wd7000 y
        otras. Las unidades de cinta SCSI y algunas QIC-02 y QIC-80
        tambin son soportadas.  Bastantes unidades de CD-ROM tienen
        soporte tambin, incluyendo Matsushita/Panasonic, Mitsumi, Sony,
        Soundblaster, Toshiba, ATAPI y otras.  Para modelos exactos
        consulta el HOWTO de compatibilidad de hardware.

     Video:
        VGA, EGA, CGA y Hercules (y compatibles) trabajan en modo texto.
        Para grficos y X hay soporte para (al menos) VGA normal,
        algunas tarjetas super-VGA (la mayora de las basadas en ET3000,
        ET4000, Paradise, y algunas Trident), S3, 8514/A, ATI MACH8, ATI
        MACH32 y Hercules. (Linux usa XFree86 como servidor X y ste es
        quien determina qu tarjetas son soportadas).

     Redes:
        Western Digital 80x3, ne1000, ne2000, 3com503, 3com509, 3com589
        PCMCIA, Allied Telliesis AT1500, la mayoras de las placas
        LANCE, adaptadores de bolsillo d-link, PPP, SLIP, CSLIP, PLIP
        (Parallel Link IP) y ms.

     Serie:
        La mayora de las placas basadas en UART 16450 and 16550,
        incluyendo AST Fourport, la Usenet Serial Card II y otras. Las
        placas inteligentes soportadas incluyen a la serie Cyclades
        Cyclom (soporte del propio fabricante), la serie Comtrol
        Rocketport (soporte del fabricante tambin), Stallion (la
        mayora de placas y con soporte por parte del fabricante) y Digi
        (algunas placas y sin soporte por parte del fabricante).

     Otro hardware:
        SoundBlaster, ProAudio Spectrum 16, Gravis Ultrasound, varios
        tipos de ratn de bus (Microsoft, Logitech, PS/2).

  4.  Una lista incompleta de Programas Portados y Otro Software

  La mayor parte de las herramientas comunes de Unix y programas han
  sido portados a Linux, incluyendo casi todo el material de GNU y
  muchos clientes X de varias fuentes. Portar es una palabra un poco
  fuerte ya que muchas aplicaciones compilan sin ninguna modificacin o
  slo con unas pocas ya que Linux se ajusta a POSIX casi totalmente.
  Desafortunadamente, no hay muchas aplicaciones para usuarios finales
  por el momento, pero esto ha empezado ya a cambiar. Aqu hay una lista
  incompleta de software que se sabe que corre bajo Linux.

     Comandos bsicos Unix :
        ls, tr, sed, awk y ms (cualquiera que se te ocurra, Linux
        probablemente lo tiene).

     Herramientas de desarrollo:
        gcc, gdb, make, bison, flex, perl, rcs, cvs, prof.

     Lenguajes and Entornos:
        C, C++, Objective C, Modula-3, Modula-2, Oberon, Ada95, Pascal,
        Fortran, ML, scheme, Tcl/tk, Perl, Python, Common Lisp y muchos
        ms.

     Entornos grficos:
        X11R5 (XFree86 2.x), X11R6 (XFree863.x), MGR.

     Editores:
        GNU Emacs, XEmacs, MicroEmacs, jove, ez, epoch, elvis (GNU vi),
        vim, vile, joe, pico, jed y ms.

     Shells:
        bash (POSIX sh-compatible), zsh (incluye modo de compatibilidad
        con ksh), pdksh, tcsh, csh, rc, es, ash (casi completamente sh-
        compatible shell usada como /bin/sh por BSD) y muchas ms.

     Telecomunicaciones:
        Taylor (BNU-compatible) UUCP, SLIP, CSLIP, PPP, kermit, szrz,
        minicom, pcomm, xcomm, term (ejecuta multiples shells,
        redirecciona la actividad de la red y permite X remoto, todo
        sobre una lnea de modem), Seyon (popular programa de
        comunicaciones bajo X) y diversos paquetes de fax y correo de
        voz (usando ZyXEL y otros modems) estn disponibles. Por
        supuesto, los logins remotos va lnea serie son soportados.

     News y correo electrnico:
        C-news, innd, trn, nn, tin, smail, elm, mh, pine, etc.

     Procesamiento de textos:
        TeX, groff, doc, ez, Linuxdoc-SGML, and others.

     Juegos:
        Nethack, varios Muds y juegos de X, y muchos ms. Uno de esos
        juegos consiste en buscar por tsx-11 y sunsite para buscar los
        juegos disponibles.

     Suites:
        AUIS, el Andrew User Interface System. ez es parte de este
        suite.

  Todos estos programas (y esto no es ni una centsima parte de los
  disponible) son gratuitos. El software comercial est empezando a
  surgir, pregunta al distribuidor de tu programa favorito si est
  disponible para Linux.

  5.  Quin usa Linux?

  Linux est disponible gratuitamente, y a nadie se le pide que registre
  sus copias ante ninguna autoridad, por lo tanto es difcil conocer
  cunta gente usa Linux. Diversos negocios estn actualmente dedicados
  nicamente a la venta y soporte de Linux, y muy pocos usuarios de
  Linux usan estos servicios, hablando relativamente, y los grupos de
  noticias de Linux son de los ms ledos en Internet, por ello el
  nmero estar situado sobre varios centenares o miles, los grandes
  nmeros son difciles de averiguar. De todas formas, un alma brava,
  Harald T. Alvestrand, ha decidido intentarlo y te pide que si usas
  Linux le enves un mensaje con uno de los siguientes subjects a linux-
  counter@uninett.no: "I use Linux at home" (uso Linux en casa), "I use
  Linux at work" (uso Linux en el trabajo) o "I use Linux at home and at
  work" (uso Linux en casa y en el trabajo). Tambin est contando votos
  del tipo "I don't use Linux" (no uso Linux) por alguna razn. El manda
  sus cuentas a comp.os.linux.misc

  6.  Obtener Linux

  6.1.  FTP annimo

  Matt Welsh ha sacado una nueva versin de su gua Installation and
  Getting Started, la versin 2.1.1. Adems, el Linux Documentation
  Project (LDP) ha "publicado" varios otros libros en diversos estados
  de desarrollo y estos estn disponibles en
  sunsite.unc.edu:/pub/Linux/docs/LDP. Mantente atento a
  comp.os.linux.announce

  Al menos los siguientes sites de ftp annimo proporcionan Linux

  Nombre textual                 Direccion IP     Directorio Linux
  =============================  ===============  ================
  tsx-11.mit.edu                 18.172.1.2       /pub/linux
  sunsite.unc.edu                152.2.22.81      /pub/Linux
  ftp.funet.fi                   128.214.248.6    /pub/OS/Linux
  net.tamu.edu                   128.194.177.1    /pub/linux
  ftp.mcc.ac.uk                  130.88.203.12    /pub/linux
  src.doc.ic.ac.uk               146.169.2.1      /packages/linux
  fgb1.fgb.mw.tu-muenchen.de     129.187.200.1    /pub/linux
  ftp.informatik.tu-muenchen.de  131.159.0.110    /pub/comp/os/linux
  ftp.dfv.rwth-aachen.de         137.226.4.111    /pub/linux
  ftp.informatik.rwth-aachen.de  137.226.225.3    /pub/Linux
  ftp.Germany.EU.net             192.76.144.75    /pub/os/Linux
  ftp.ibp.fr                     132.227.60.2     /pub/linux
  kirk.bond.edu.au               131.244.1.1      /pub/OS/Linux
  ftp.uu.net                     137.39.1.9       /systems/unix/linux
  wuarchive.wustl.edu            128.252.135.4    mirrors/linux
  ftp.win.tue.nl                 131.155.70.100   /pub/linux
  ftp.stack.urc.tue.nl           131.155.2.71     /pub/linux
  srawgw.sra.co.jp               133.137.4.3      /pub/os/linux
  cair.kaist.ac.kr                                /pub/Linux
  ftp.denet.dk                   129.142.6.74     /pub/OS/linux
  NCTUCCCA.edu.tw                140.111.1.10     /Operating-Systems/Linux
  nic.switch.ch                  130.59.1.40      /mirror/linux
  monu1.monash.edu.au            130.194.1.101    /pub/linux
  cnuce_arch.cnr.it              131.114.1.10     /pub/Linux

  tsx-11.mit.edu y fgb1.fgb.mw.tu-muenchen.de son los sites oficiales
  para el GCC de Linux. Algunos sites son un mirror de otros. Por favor
  usa el site ms cercano a ti mientras te sea posible.

  Al menos sunsite.unc.edu y ftp.informatik.tu-muenchen.de ofrecen
  servicios de ftpmail. Escribe a ftpmail@sunsite.unc.edu o
  ftp@informatik.tu-muenchen.de si necesitas ayuda.

  Si ests perdido prueba a buscar en
  sunsite.unc.edu:/pub/Linux/distributions/, donde diversas
  distribuciones son ofrecidas. La Slackware est bien testeada y es una
  de las ms populares distribuciones de Linux. La Red Hat y la Debian
  estn tambin ganando popularidad.

  6.2.  Otras formas de obtener Linux

  Hay muchas BBS que tienen ficheros para Linux. Una lista de ellas es
  ocasionalmente enviada a comp.os.linux.announce. Pregunta a amigos y a
  grupos de usuarios, o pide una de las distribuciones comerciales. Una
  lista de ellas est contenida en el "Linux distribution HOWTO",
  disponible como sunsite.unc.edu:/pub/Linux/docs/HOWTO/distribution-
  HOWTO y enviado regularmente al newsgroup comp.os.linux.announce.

  7.  Empezando

  Como se ha mencionado al principio, Linux no tiene una administracin
  centralizada. Por ello no hay una versin oficial que nadie pueda
  sealar y decir "Eso es Linux". Al contrario, hay varias
  distribuciones, que son ms o menos colecciones completas de software
  configurado y empaquetado de tal forma que pueden ser usadas para
  instalar un sistema Linux.

  La primera cosa que deberas hacer es obtener y leer la lista de
  preguntas frecuentes (FAQ) de uno de los sites de FTP, o usando los
  normales archivos FAQ de Usenet (por ejemplo rtfm.mit.edu). Este
  documento contiene numerosas instrucciones de qu hacer para empezar,
  qu ficheros son necesarios y cmo resolver la mayor parte de los
  problemas comunes (durante la instalacin o en otro momento).

  8.  Status legal de Linux

  Aunque Linux es suministrado con el cdigo fuente completo, es
  software con copyright, no de dominio pblico. Sin embargo est
  disponible gratuitamente bajo la "GNU Public License" (GPL). Ver la
  GPL para ms informacin. Los programas que corren en Linux tienen
  cada uno su propio copyright, aunque muchos de ellos usen la GPL
  tambin. X usa el copyright de MIT X y hay algunas utilidades bajo
  copyright de BSD. En cualquier caso todo el software en el site se
  puede distribuir gratuitamente (y si no, no debera estar all).

  9.  Noticias sobre Linux

  Una revista mensual, llamada Linux Journal, apareci hace ms de un
  ao. Incluye artculos destinados a casi cualquier nivel y pretende
  ser de ayuda a todos los usuarios de Linux. La subscripcin por un ao
  cuesta $22 en U.S., $27 en Canada y Mjico, y $32 en cualquier otro
  pas, pagables en moneda USA. Las solicitudes de subscripcin pueden
  ser enviadas por email a subs@ssc.com, por fax a +1-206-782-7191, por
  telfono a +1-206-782-7733 o por correo a Linux Journal, PO Box 85867,
  Seattle, WA 98145-1867 USA. SSC tiene una clave PGP pblica disponible
  para encriptar tu correo y proteger el nmero de tu tarjeta de
  crdito; haz finger a info@ssc.com para obtener la clave.

  Hay diversos grupos de noticias (newsgroups) de Usenet para discusin
  sobre Linux adems de diversas listas de correo. Ver la Linux FAQ para
  ms informacin sobre las listas de correo (deberas poder encontrar
  la FAQ o en el grupo de noticias o los FTP sites).

  El grupo de noticias comp.os.linux.announce es un grupo de noticias
  moderado para anuncios sobre Linux (nuevos programas, correccin de
  errores, etc).

  El grupo de noticias comp.os.linux.answers es un grupo de noticias
  moderado al que se envan la Linux FAQ, los HOWTO's y otros
  documentos.

  El grupo de noticias comp.os.linux.admin es un grupo de noticias no
  moderado para la discusin sobre la administracin de un sistema
  Linux.

  El grupo de noticias comp.os.linux.development.system es un grupo de
  noticias no moderado dedicado especficamente a la discusin sobre el
  desarrollo del ncleo de Linux. Las nicas cuestiones sobre desarrollo
  de aplicaciones que deben ser discutidas aqu son aquellas que estn
  ntimamente ligadas al ncleo. Todas las dems cuestiones de
  desarrollo son probablemente genricas de Unix y deben ser dirigidas
  un grupo de comp.unix, a menos que sean preguntas muy ligadas a Linux,
  en cuyo caso deben ser enviadas a comp.os.linux.apps.

  El grupo de noticias comp.os.linux.development.apps es un grupo de
  noticias no moderado destinado a la discusin sobre el desarrollo de
  aplicaciones en relacin con Linux. No est para discutir sobre el
  lugar en el que se puede conseguir una aplicacin para Linux, ni para
  discusin entre aquellos que quieren aplicaciones para Linux.
  El grupo de noticias comp.os.linux.hardware es para preguntas de
  hardware especficas de Linux.

  El grupo de noticias comp.os.linux.networking es para preguntas
  especficas de Linux sobre desarrollo de redes y su puesta a punto.

  El grupo de noticias comp.os.linux.x es para cuestiones sobre X-
  Windows relativas a Linux.

  El grupo de noticias comp.os.linux.misc es el sustituto del original
  comp.os.linux y sirve para cualquier discusin que no est cubierta en
  las temticas de los anteriores grupos.

  Por norma, no reenves entre los grupos de noticias de Linux. El nico
  reenvo que es aceptable es un envo ocasional de un grupo no moderado
  a comp.os.linux.announce. La razn para dividir comp.os.linux en
  varios grupos es reducir el trfico en cada uno. Aquellos que no sigan
  esta regla sern fulminados sin piedad...

  Linux est en el Web (World Wide Web, WWW, W3, etc). La direccin URL
  es http://sunsite.unc.edu/mdw/linux.html

  10.  El Futuro

  Tras salir Linux 1.0, se trabaj en varias mejoras. Mayor rapidez en
  los accesos a disco, mejoras de TTY y muchas ms cosas estn ahora
  disponibles en Linux 1.2.

  Linux 1.2 acaba de ver la luz y muchas nuevas mejoras, incluyendo las
  de la memoria virtual, soporte de multiplataforma y cuotas estn
  siendo consideradas para la serie de desarrollo 1.3.x. Tras un ao de
  Linux 1.0 estable, Linux 2.0 ocup ese papel. Ahora, una nueva versin
  estable de Linux (mejor dicho, de Linux 2.0, antes que de Linux 1.4)
  continuar esa tradicin.

  Hay mucho cdigo para escribir e incluso ms documentacin todava.
  Por favor nete a la lista de correo linux-doc@vger.rutgers.edu si
  quieres contribuir a la documentacin. Manda un mensaje a
  majordomo@vger.rutgers.edu con una nica lnea conteniendo la palabra
  ``help'' en el cuerpo (NO el subject) del mensaje.

  11.  Este documento

  Este documento es mantenido por Michael K. Johnson,
  johnsonm@nigel.vnet.net. Por favor, escrbeme con cualquier
  comentario, sin importar que sea corto. No puedo hacer un buen trabajo
  manteniendo este documento sin tu ayuda. Una copia actualizada de este
  documento puede siempre ser encontrada como
  tsx-11.mit.edu:/pub/linux/docs/INFO-SHEET, y una versin PostScript es
  INFO-SHEET.ps, en el mismo directorio.

  12.  Legalidad

  Las marcas registradas pertenecen a sus propietarios. No hay garanta
  sobre la informacin en este documento. Usalo y distribyelo a tu
  libre albedro.  El contenido de este documento es de dominio pblico,
  pero por favor, sea educado y proporciona informacin sobre cualquier
  cita.

  13.  Nota del traductor

  Hola, soy Ivn Casado, del INSFLUG. Me he encargado de traducir este
  documento por amor al arte (al arte del Linux, por supuesto). Espero
  que sea de tu inters y que comprendas que an hay mucho por traducir
  y ms an por escribir.

  He intentado ajustarme totalmente al original de Michael K. Jonhson y
  he revisado la traduccin un par de veces. No obstante an puede
  quedar algo por pulir o se me ha podido colar alguna errata, de cuya
  responsabilidad me hago cargo, pero jams de sus consecuencias.

  Para cualquier comentario, errata o consulta sobre la traduccin,
  acude al rea R34.LINUX de FidoNet o contacta conmigo por NetMail a la
  direccin 2:345/425.25 de la misma red.

  Un saludo, Ivn Casado.

  14.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  ``Infobia''- Como.
  Francisco Jos Montilla, pacopepe@insflug.org
  v0.98, 26 de Junio de 1998.

  Este documento pretende ser una gua rpida de configuracin y puesta
  en funcionamiento de procedimientos para conectarse a Internet a
  travs de Infova mediante enlaces ppp. Tambin puede aplicarse a
  casos de acceso "directo" sin mediar Infova, o a travs de retenet.
  As mismo, describir un mtodo tal vez no muy ortodoxo pero s sen
  cillo y eficiente para recoger y mandar el correo a travs de este
  tipo de conexiones.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Requisitos.

  2.1.    Hardware

  2.1.1.  Mdems

  2.1.2.  Configuracin del mdem

  2.2.    Software

  3.      Conexiones a travs de Infova.

  3.1.    Mtodo ``A''

  3.2.    Mtodo ``B''

  4.      Conexiones sin mediar Infova.

  5.      Gestin de Correo de Internet.

  5.1.    Mtodo ``A'' o fcil y gindosero  ;-).

  5.2.    Mtodo ``B''.

  5.2.1.  Requisitos

  5.2.2.  Configuracin del sistema.

  5.2.2.1.        popclient

  5.2.2.2.        fetchmail

  5.2.2.3.        sendmail

  5.2.3.  Cmo escribir

  5.2.4.  Procedimiento.

  5.3.    Mtodo ``C''.

  6.      Agradecimientos

  7.      Copyright

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  En este documento intentar explicar un par de mtodos para establecer
  conexiones ppp a servidores de acceso a Internet, as como un sistema
  para recoger y enviar el correo a la cuenta del Servidor con el que se
  establece la conexin.

  No soy ni pretendo ser un gur en LiNUX. Lo que aqu se describe lo he
  extrado de correo que generosamente me enviaron en su momento
  usuarios de Fidonet e Internet, y he probado, experimentado, y buscado
  la forma ms sencilla y fcil de hacerlo, ya que me consta que una de
  las cosas que ms ilusin hace a los recin llegados es precisamente
  conectarse a Internet a travs de LiNUX --- cosa que por cierto, se
  realiza mucho ms eficientemente en este sistema operativo que en
  otros, al obtenerse soporte directo del ncleo o kernel del sistema,
  sin tener que recurrir a ``chapuzas'' para ello.---

  La motivacin por tanto, que me ha llevado a hacer este documento ha
  sido el ponerlo a disposicin de los dems (y por que ya estaba
  cansado de forwardear una y otra vez los mismos mensajes que
  previamente haba recibido ;-) y como agradecimiento y granito de
  arena a toda la comunidad LiNUX.

  Si encuentra cualquier error de concepto, u opina que el mtodo se
  puede mejorar, o simplemente quiere hacer alguna aportacin a este
  documento, no dude en ponerse en contacto conmigo. Estar encantado de
  saberlo.

  2.  Requisitos.

  2.1.  Hardware

  2.1.1.  Mdems

  Est claro: :) adems del ordenador, un mdem. En cuanto al tipo de
  mdem, siempre he recomendado lo mismo: Externo. Un mdem interno slo
  tiene razn de ser en la poco probable situacin de no poseer UARTs
  rpidas (16550A). Si este no es su caso, la mejor apuesta ser siempre
  (hablando de mdems por RTC (-- Red Telefnica Conmutada, en oposicin
  a la reciente RDSI--) ) un mdem externo, de cuanta mejor reputacin
  mejor; no me gusta entrar en marcas y modelos, pero s que esta es un
  pregunta frecuente en aquellos que se disponen a actualizar o adquirir
  uno, por lo que har una excepcin.

  Las marcas aconsejables son las de siempre: USR, en sus modelos
  Sportster o Courier, siempre que no sean winmodems , Supra
  (actualmente Diamond) en su modelo Fax, Zyxel, etc.  Siempre y cuando
  no sean winmodems. Recientemente ha pasado uno por mis manos de
  fabricacin nacional, cuyo nombre era Vayris (o algo as), que no
  estaba nada mal. En cuanto a velocidades, comprar menos de 33.6 Kbps
  hoy en da es un desperdicio.

  Una cosa s que est muy clara en todo caso: rehuir como de la peste
  de los denominados winmodems; stos no poseen chip inteligente, y
  realizan sus funciones lgicas a travs de software, que normalmente
  no est disponible (siendo poco probable que alguna vez lo est, dada
  la escasa calidad de dicho "hardware") en LiNUX y otros SOs.

  Modelos y Marcas conocidos de stos son:

    USR Sportster Winmodem

    IBM Aptiva MWAVE

    Sitre Super PC336

    Zoltrix VoiceMail 33600 Win HSP

    Mdems con chip Rockwell RPI

    Tambin he recibido ltimamente frecuentes preguntas de
     propietarios de mdems de chip PCTEL HSP, que desafortunadamente,
     no podrn beneficiarse de las capacidades de conexin de Linux,
     debido a que pertenece a la funesta categora de winmodems.

  Resumiendo: NADA de winmodems, a ser posible NO internos, y nada de
  PnP.

  2.1.2.  Configuracin del mdem

  Un problema frecuente es el hecho de que ``el mdem no marca''. En el
  90% de los casos, y asumiendo que no son winmodems, se debe a estar
  intentando que LiNUX comparta IRQ, bien por estar usando un mdem
  interno, en la tpica configuracin DOS COM4, irq 3, bien por tener la
  IRQ asignada a ese puerto ocupada con otro dispositivo.

  Linux NO puede compartir IRQs, y esto no es un fallo, es una
  necesidad.  As pues, la estrategia es:

  1. Configurar el mdem para que su puerto interno pase a ser el COM2
     (/dev/ttyS1 en Linux); la configuracin en Linux por defecto para
     este puerto es irq 3, direccin base 0x02f8. As pues, si el mdem
     admite ser configurado por jumpers de tal modo, nos habremos
     ahorrado trabajo. No olvidar desactivar el COM2 de la Placa madre.

  2. Si lo anterior no puede hacerse, pero el mdem admite (por jumpers,
     nada de PnP!) al menos cambiar la IRQ que usar el puerto interno
     del mdem, asignarle una IRQ distinta de la 3 o 4. Si se tiene
     tarjeta de sonido, posiblemente sta ocupe la IRQ 5, y la 7 es del
     LPT1 aunque no se emplee si utilizamos el driver de polling del
     ncleo. La 9 est en cascada con la 2, as que una apuesta segura
     son las IRQs de la 10 a la 12.

  3. Si esto tampoco puede hacerse, la estrategia a seguir es desactivar
     el COM2 en la placa base, mediante los jumpers o como suele ser
     posible con las placas Pentium, mediante la BIOS, a fin de dejar la
     IRQ 3 libre, que ser usada por defecto por el puerto interno del
     mdem (COM4); o bien cambiar la IRQ utilizada por el COM2 de la
     placa, a fin de que pueda ser usada por el puerto interno del
     mdem.

  4. Una vez nos hemos asegurado de que el hardware est empleando los
     recursos que debe, hemos de decrselo al software. Si hemos
     conseguido poner el puerto interno del mdem como COM2 (y hemos
     desactivado el de la placa!), no hay ms que hacer, todo lo que
     sigue est pensado para ese caso. Una respuesta tpica del comando
     setserial sera:

        ~]# setserial /dev/ttyS1
       /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3

  5. En caso de haber cambiado la IRQ a utilizar por el puerto interno
     del mdem, (COM4) deberemos decrselo a Linux cada vez que lo
     arranquemos (incluyendo el comando en el script de arranque
     /etc/rc.serial, si nuestra distribucin es una Slackware, o en
     /etc/rc.d/rc.serial si es RedHat). Si le hemos puesto en la IRQ 10,
     y tenemos un mdem superior a 22.8 Kbps, el comando (o la lnea a
     poner en dicho script) sera:

       setserial -v /dev/ttyS3 irq 10 spd_vhi

  Con el cual le indicamos que el COM4 (/dev/ttyS3) usar la IRQ 10, y
  que bloquee el puerto a alta velocidad (SPeeD Very HIgh).

  El parmetro -v har que el comando devuelva la informacin de config
  uracin final del puerto.

  Si se contina com problemas, e incluso si no los tiene, es
  recomendable leer el Serie-Como, disponible en
  http://www.insflug.org o en el directorio de traducciones
  (pub/Linux/docs/HOWTO/translations/es) disponible en cualquier mirror
  de sunsite.

  2.2.  Software

  Bsicamente, lo nico necesario es tener soporte ppp ya por parte del
  ncleo o kernel o por mdulos, en cuyo caso son necesarios tener
  cargados shlc.o y ppp.o, mediante por ejemplo la orden:

       modprobe ppp

  existen mtodos ms modernos como kerneld y otros en los que la carga
  se automatiza al llamar al otro requisito, el ``demonio'' o daemon
  pppd, que suele instalarse en un paquete aparte. Tngase en cuenta que
  si se emplea un kernel posterior al 1.3.95 ha de utilizarse una
  versin de pppd posterior a la 2.2.0e. Para el kernel 1.2.13 vale a
  partir de la 2.1.2d (-- Esto obviamente est "obsoleto".--) .

  Los fuentes de distribucin del kernel contienen un mdulo de
  compresin ppp, bsd_comp.o, que por problemas de copyright no puede
  ser compilado sino es como mdulo, ni cargado automticamente por
  kerneld. El uso de este mdulo mejora el rendimiento de la conexin,
  especialmente en lo referente a transferencia de ficheros. Para
  evitarnos el tener que cargarlo ``a mano'' tras shlc.o y ppp.o,
  podemos crear un alias para pppd:

       alias pppd="pppd; modprobe bsd_comp"

  que incluiremos en el fichero de personalizacin correspondiente, p.
  ej.  /etc/bashrc si queremos que afecte a todos los usuarios
  globalmente, o ~/.bash_profile para cada uno de los usuarios de RedHat
  o ~/.bashrc para Slackware.

  Ciertamente, no es una solucin muy elegante, pero funciona :-).

  Para conectarse a un ISP (Internet Service Provider, o Proveedor de
  Acceso a Internet) a travs de nuestra queridsima Infova, pueden
  utilizarse los mtodos que a continuacin describo:

  3.  Conexiones a travs de Infova.

  3.1.  Mtodo ``A''

  1. Fichero /etc/resolv.conf.
     corriente, en que obtengamos nuestra direccin por asignacin
     dinmica, se ha de conocer la direccin en notacin decimal del
     servidor de nombres o nameserver del ISP que nos proporciona
     acceso.  Esta informacin se la ha de proporcionar su ISP, y
     generalmente ser de la forma 194.xxx.yyy.zzz. (En la posicin zzz
     generalmente suele emplearse el 2)

     El dato restante es el nombre de dominio de su servidor, que ser
     el mismo que aparezca en su direccin de correo email, es decir,
     todo lo que se encuentra tras la arroba. En mi caso,
     pacopepe@insflug.org sera por tanto insflug.org.

     Una vez conocemos estos datos, editamos (con vi, por ejemplo) el
     fichero /etc/resolv.conf, de modo que aadimos:
     /etc/resolv.conf

       domain insflug.org
       nameserver 194.xxx.yyy.zzz

  2. Elaboramos el fichero /etc/ppp/options (Slo con versiones de pppd
     iguales o inferiores a la 2.2.x)

       connect /etc/ppp/infovia
       crtscts
       modem
       passive
       +ua /etc/ppp/infoviappp   # Ojo en pppd version 2.3.x, opcion no valida
       noipdefault
       debug
       defaultroute
       asyncmap a0000
       /dev/modem # (Este fichero es un enlace a /dev/ttySX)
       38400 # (Siempre que su modem soporte esa velocidad)

  Nota: Si nuestro pppd es de version 2.2.3 o superior, deberemos modi
  ficar el fichero /etc/ppp/options, suprimiendo la lnea +ua
  /etc/ppp/infoviappp y aadiendo:

       +pap
       user id@dominio

  As, utilizar en su lugar el fichero /etc/ppp/pap-secrets para la
  autentificacin:

       infovia         *       infovia
       id@dominio      dominio clave

  Para ms informacin sobre pap-secrets ver apartado correspondiente de
  la seccin ``''.

  /dev/ttySX es el fichero de dispositivo correspondiente al puerto
  donde tengamos el mdem, generalmente, el COM2 si lo vemos desde
  msdos, o /dev/ttyS1 en LiNUX. En caso de que en su sistema no exista
  /dev/modem, puede crear un enlace o symlink al puerto donde se encuen
  tra el mdem, con la orden:

       ln -s /dev/ttyS1 /dev/modem

  Siempre que el COM2 sea el que est usando el mdem. Puede por
  supuesto incluir directamente /dev/ttyS1 en lugar de /dev/modem en el
  anterior script si lo prefiere.

  Para los usuarios de Intercom o bankinter, los ficheros options
  seran:

    Intercom

  connect /etc/ppp/infovia
  crtscts
  modem
  passive
  noipdefault
  ipcp-accept-local
  ipcp-accept-remote
  debug
  defaultroute
  lock
  asyncmap a0000
  /dev/modem
  38400

    Bankinter

       connect /etc/ppp/infovia
       crtscts
       modem
       defaultroute
       lock
       /dev/modem
       38400

  Los permisos del anterior script pueden ser 640 en forma octal o

       -rw-r-----   1 root     root

  lo cual podemos conseguir con la orden:

       chmod 640 /etc/ppp/options

  3. Fichero /etc/ppp/infovia

       #!/bin/sh
       /usr/sbin/chat -v  "" atdt055 CONNECT ""

  Este fichero debe de hacerse ejecutable, con la orden por ejemplo:
       chmod 744 /etc/ppp/infovia

  4. Fichero /etc/ppp/infoviappp

       su_login
       su_password

  su_login quiere decir nombre@proveedor, en mi caso pacopepe@insflug.
  Este fichero es especialmente delicado, ya que contiene la contrasea
  o password de acceso al ISP, por lo que conviene tener cuidado con sus
  permisos;  yo no soy un gur en eso, si alguien con ms experiencia me
  recomienda otro tipo de permisos, se lo agradecer, yo por ahora lo
  tengo como 640, por lo que con la orden

       chmod 640 /etc/ppp/infoviappp

  quedaran establecidos los permisos.

  5. Ejecutar, como root, pppd. Al momento se escuchar marcar al mdem,
     y una vez establecida la conexin, se escuchar actividad por parte
     del disco duro; tambin, en el caso de poseer un mdem externo, se
     observar las luces de cd, sd y tr encendidas o parpadeando; en
     caso de ser interno, podemos constatar que la conexin est
     establecida correctamente, y que por tanto, el dispositivo ppp0 ha
     sido creado, con una orden como ``top'' o ``ps'' en la que se
     observar como proceso activo.

     Tambin podemos observar el proceso de conexin conmutando a otra
     VC, y tecleando la orden

       tail -f /var/log/messages

  lo cual nos mostrar, en caso de problemas, los fallos que estn ocur
  riendo. Un proceso de conexin normal aparecera como:

  May 23 01:51:00 beastie pppd[4485]: pppd 2.1.2 started by root, uid 0
  May 23 01:51:00 beastie pppd[4488]: Connecting with /etc/ppp/infovia
  May 23 01:51:02 beastie chat[4490]: send (atdt055^M)
  May 23 01:51:02 beastie chat[4490]: expect (CONNECT)
  May 23 01:51:23 beastie chat[4490]: atdt055^M^M
  May 23 01:51:23 beastie chat[4490]: CONNECT -- got it
  May 23 01:51:23 beastie chat[4490]: send (^M)
  May 23 01:51:23 beastie pppd[4488]: Connected...
  May 23 01:51:24 beastie kernel: ppp: channel ppp0 mtu = 1500, mru = 1500
  May 23 01:51:24 beastie kernel: ppp: channel ppp0 open
  May 23 01:51:24 beastie pppd[4488]: set kernel debugging level to 0
  May 23 01:51:24 beastie pppd[4488]: Using interface ppp0
  May 23 01:51:24 beastie pppd[4488]: Connect: ppp0 <--> /dev/modem
  [...]
  May 23 01:51:25 beastie pppd[4488]: ipcp: received ADDR
  May 23 01:51:25 beastie pppd[4488]: (172.16.1.1)
  May 23 01:51:25 beastie pppd[4488]:  (ACK)
  May 23 01:51:25 beastie pppd[4488]: ipcp: returning Configure-ACK
  May 23 01:51:25 beastie pppd[4488]: fsm_sdata(IPCP): Sent code 2, id 1.
  May 23 01:51:25 beastie pppd[4488]: fsm_rconfnakrej(IPCP): Rcvd id 1.
  May 23 01:51:25 beastie pppd[4488]: local IP address 194.179.123.229
  May 23 01:51:25 beastie pppd[4488]: fsm_sdata(IPCP): Sent code 1, id 2.
  May 23 01:51:25 beastie pppd[4488]: IPCP: sending Configure-Request, id 2
  May 23 01:51:25 beastie pppd[4488]: fsm_rconfack(IPCP): Rcvd id 2.
  May 23 01:51:25 beastie pppd[4488]: ipcp: up
  May 23 01:51:25 beastie pppd[4488]: local  IP address 194.179.123.229
  May 23 01:51:25 beastie pppd[4488]: remote IP address 172.16.1.1

  6. Para finalizar la conexin podemos emplear el script que suele
     acompaar al paquete pppd, ppp-off, o bien ``matar'' directamente
     el proceso una vez identificado su PID con ps; para ello, si una
     vez ejecutado ps observamos la respuesta:

       PID   TTY   STAT  TIME  COMMAND
       58    v01   S     0:01  -bash
       [...]
       353   v03  R      1:12  pppd
       [...]

  la orden

       kill -9 353

  matar el proceso. No obstante, algunas personas han experimentado
  ``cuelgues'' de sus servidores si no finalizan la conexin con mtodos
  ``civilizados'' como el script ppp-off.

  Uno puede hacerse un ppp-off rudimentario mediante el comando:

  killall pppd

  Si se quiere saber ms sobre los comandos de este script, consulte el
  comando chat y la documentacin sobre pppd.

  3.2.  Mtodo ``B''

  El mismo que el empleado para conectar sin mediar Infova, descrito en
  la seccin ``Conexiones sin mediar Infova.'' a excepcin de:

  1. Fichero /etc/ppp/pap-secrets, que quedara as:

       infovia               *                  infovia
       id@dominio            *                  su_password

  donde id@dominio sera, en mi caso, pacopepe@insflug, es decir, su
  direccin email sin el .es del dominio perteneciente a Espaa.

  Este fichero es especialmente sensible por contener el password, por
  lo que se aplica lo dicho anteriormente para el fichero
  /etc/ppp/infoviappp en la seccin ``Mtodo ``B'''', punto nmero 4.

  Como se puede observar, lo nico que vara es que se aade la lnea
  referente a Infova.

  2. Cambiar la variable NUMERO del script /usr/local/bin/infovia por
     055, como corresponde a Infova.

  4.  Conexiones sin mediar Infova.

  En el caso de que tengamos acceso directo a un servidor, los scripts y
  ficheros necesarios seran los siguientes:

  1. Script /usr/local/bin/infovia

  #!/bin/sh

  LOCKDIR=/var/spool/uucp
  DEVICE=modem
  NUMERO=numero_del_Proveedor

  if [ -f $LOCKDIR/LCK..$DEVICE ]
  then
    echo /dev/$DEVICE "El modem esta ocupado."
    exit 1
  fi

  /usr/lib/ppp/fix-cua $DEVICE
  (
      stty 38400 -tostop crtscts

      if /usr/lib/ppp/chat ABORT "NO CARRIER" ABORT BUSY "" ATZ0 OK ATDT$NUMERO CONNECT ""
      then
        pppd /dev/$DEVICE 38400 crtscts modem lock mtu 1500 defaultroute noipdefault user id@dominio
        sleep 10
        route add default ppp0
        exit 0
      else
          echo "La llamada PPP ha fallado." 1>&2
          exit 1
      fi
  ) < /dev/$DEVICE > /dev/$DEVICE

  en donde:

    En la variable NUMERO= deber reflejar el nmero de su Proveedor.

    En id@dominio tendr que poner su direccin email sin el

     Este script ha de ser ejecutable, por lo que tenemos que otorgarle
     permisos de ejecucin, con una orden como por ejemplo:

       chmod 750 /usr/local/bin/infovia

  A decir verdad, este script lo puede colocar donde quiera, si bien
  /usr/local/bin/infovia sera la situacin ms ``estndar''.

  2. Fichero /etc/ppp/pap-secrets

       id@dominio            *                  su_password

  nuevamente, se aplica lo dicho en la seccin ``Mtodo ``B''''.

  3. Fichero /etc/resolv.conf
     aqu se aplica lo mismo que en la seccin ``Mtodo ``A'''' punto
     nmero 1.

  4. A partir de aqu, se aplica lo mismo que en la seccin ``Mtodo
     ``A'''', punto 5, a excepcin de que por supuesto, no ha de
     ejecutarse pppd, ya que lo hacemos ejecutando el script
     /usr/local/bin/infovia.

  5. ATENCIN usuarios de RedHat
     Si el sistema LiNUX que tiene instalado pertenece a una
     distribucin RedHat, deber tener en cuenta lo siguiente:

    En el script /usr/local/bin/infovia deber modificarse las lneas
     13 y 17, por:

       [...]
       /usr/lib/ppp/fix-cua $DEVICE  -->  /usr/sbin/fix-cua $DEVICE
       [...]
       if /usr/lib/ppp/chat...  --> if /usr/sbin/chat...
       [...]

  ya que la localizacin de dichos ficheros en RedHat est en esos
  directorios.

    Para ciertos programas que hacen uso del mdem, como el binkley, y
     otros, resulta inocuo y muy conveniente crear el enlace o symlink
     siguiente:

       ln -s /var/spool /usr

  Para obtener una visin ms completa y detallada en lo que a ppp se
  refiere, recomiendo hacerse con la traduccin del PPP-Como, realizada
  por Rafael Agundo, ragundo@bitmailer.net. En la seccin ``Insflug'' se
  detallan los servidores donde obtenerlo.

  5.  Gestin de Correo de Internet.

  A continuacin describir dos mtodos para gestionar el correo en el
  caso que nos ocupa, una mquina aislada, con conexiones espordicas a
  su Servidor de Acceso a Internet. El mtodo B es desde luego, poco
  ortodoxo y se puede mejorar mucho, por lo que una colaboracin en lo
  que a configuraciones ``ideales'' de red de este tipo de mquinas ser
  harto agradecida.

  5.1.  Mtodo ``A'' o fcil y gindosero  ;-).

  Instalar, usar y configurar Netscape, Mosaic u otro navegador con
  capacidad de gestionar correo, news, etc.

  Como me consta que la inmensa mayora de los que empiezan a usar Linux
  o bien no poseen una cantidad desmesurada de RAM, ni les sobra disco
  duro como para sacrificar ms de 6 megas en el Netscape, y adems
  desean aprender a usar mtodos ms *nixeros y eficaces de gestin de
  correo, propongo el siguiente (ms fcil de configurar incluso que el
  netscape) mtodo:

  5.2.  Mtodo ``B''.

  5.2.1.  Requisitos

  1. Popclient. Se precisa instalar el paquete Popclient. En caso de que
     la versin de ste use perl, se deber instalar este ltimo
     tambin.

  2. popclient se ha quedado desfasado ltimamente, siendo fetchmail el
     que ms se emplea ahora por ser ms seguro.

  3. Sendmail+IDA. No, no os asustis ;-) El sendmail+IDA, que viene en
     la inmensa mayora de las distribuciones, lo tendremos configurado
     con editar dos lneas.

  5.2.2.  Configuracin del sistema.

  1. Crear una cuenta en la mquina con el mismo identificativo que se
     tenga en el Proveedor. Por ejemplo, mi identificativo o login en mi
     ISP es pacopepe, cosa fcilmente deducible debido a mi direccin de
     correo email;  por tanto, creo una cuenta en el sistema con login
     pacopepe, con el comando adduser: (por supuesto, hay que hacerlo
     como root).

     Supongamos el login ``probancio'':

        /home/linuxdoc-sgml-1.5/working]# adduser probancio

       Looking for first available UID... 502
       Looking for first available GID... 502

       Adding login: probancio...done.
       Creating home directory: /home/probancio...done.
       Creating mailbox: /var/spool/mail/probancio...done.

       Don't forget to set the password.

  ahora, le asignamos un password:

   /home/linuxdoc-sgml-1.5/working]# passwd probancio
  Changing password for probancio
  Enter an empty password to quit.
  New password (? for help):
  New password (again):
  Password changed for probancio

  y tenemos creada su cuenta.

  5.2.2.1.  popclient

  1. Ahora creamos el siguiente script, que ser el que ejecutemos para
     recoger el correo, al que llamamos, por ejemplo,

       #!/bin/sh
       #
       # getmail, para bajarnos el correo...
       #
       PATH=/bin:/usr/bin:/usr/local/bin
       echo Bajando el correo.....
       popclient -3 -u <nombre_usuario> -p <password_del_ISP> -o /var/spool/mail/login <servidor_POP>

  Dado que este fichero contiene datos delicados como las passwords del
  ISP, lo protegeremos dndole los permisos adecuados (700 es lo
  recomendable).

  Donde en:

     <nombre_usuario>
        pondremos nuestro identificativo, en mi caso, pacopepe.

     <password_del_ISP>
        Pues exactamente eso, la clave con la que accede a su servidor.

     <...login>
        Como se observar tras crear la cuenta que describimos
        anteriormente, en /var/spool/mail/ se crear un fichero de igual
        nombre que el login de dicho usuario; en el caso supuesto
        anterior, probancio, este fichero sera
        /var/spool/mail/probancio.

     <servidor_POP>
        Aqu ha de ponerse la direccin de vuestro servidor POP; en mi
        caso (y suele ser comn) pop03.insflug.org.

  Nota: Al elaborar el script prescindiremos de los signos ``<'' y
  ``>''; en el ejemplo estn simplemente para resaltar los parmetros a
  completar.

  Juan Manuel Villar Navarro juanma@gaps.ssr.upm.es apunta que en las
  versiones 3.xx del popclient no se puede dar por lnea de comandos la
  contrasea del ISP, (con -p) para ello ha de usarse el fichero
  ~/.poprc, en el que podemos definir otros parmetros de compor
  tamiento, como el que mantenga los mensajes en el servidor (keep) en
  caso de que estemos de pruebas, o por cualquier otra razn.

  Iigo Gonzlez nexus@adv.es recomienda usar versiones del popclient
  superiores a la 3.0b6, adems de sugerir el uso de un programa fil
  trador de correo como procmail, para lo que deberemos aadir al
  comando getmail el parmetro -m procmail.

  5.2.2.2.  fetchmail

  En caso de usar fetchmail, un cliente muy potente y cuya documentacin
  es bastante clara y precisa, la configuracin personal se almacena en
  el fichero del directorio personal del usuario, ~/.fetchmailrc.

  Un ejemplo del mismo:

       poll host-servidor-pop proto pop3 user usuario password pass_usuario is usuario here;

  donde

     host-servidor-pop
        sera el nombre del la mquina servidora de correo va pop del
        proveedor que utilicemos;

     pop3
        sera el protocolo a emplear, ya que fetchmail soporta otros
        tambin, como pop2 (obsoleto) imap2bis imap4 y apop y kpop.

  seguidamente, le otorgaremos permisos de lectura/escritura nicamente
  para el propietario, hecho muy importante, ya que de lo contrario
  podran ser accesibles las contraseas, e incluso el programa  se
  negara a funcionar:

       chmod 600 .fetchmailrc

  fetchmail ofrece una serie de prestaciones adicionales, como
  temporizacin, reenvo, funcionamiento en modo daemon etc... Es un
  cliente muy potente y recomendable en cuanto a seguridad se refiere.

  En caso de emplearlo, no hara falta el script getmail, bastara con
  invocar a fetchmail a secas.

  5.2.2.3.  sendmail

  1. Modificacin de la llamada al demonio sendmail, hecha normalmente
     en el arranque desde el script /etc/rc.d/init.d/sendmail.init,
     (RedHat) o /etc/rc.d/rc.M (Slackware) buscar la lnea que dice algo
     as como daemon sendmail .... en RedHat, o /usr/sbin/sendmail -bd
     -q 15m en Slackware, y modificarla, editndola para que quede:

       [...]
               .... sendmail -bd -q2d
       [...]

  Esto lo que hace es que sendmail no intente continuamente mandar el
  correo que haya en la cola para salir, o en spool, ya que lo haremos
  nosotros manualmente.

  Si no hacemos esto veremos que al enviar un email estando desconecta
  dos, el programa donde estemos (el pine, por ejemplo) se quedar
  ``congelado'' un buen rato, debido a que sendmail intentar enviar
  inmediatamente el email, y no encontrar el destino, hasta que final
  mente se produzca un timeout.

  2. Modificacin de /etc/sendmail.cf. Aqu buscaremos una lnea que
     comienza por DS:

       # "Smart" relay host (may be null)
       # DS

  y la modificaremos para que quede reflejado nuestro servidor SMTP o de
  correo saliente: (en mi caso, smtp.insflug.org):

       # "Smart" relay host (may be null)
       DSsmtp.insflug.org

  ahora buscaremos otra que comienza por DM:

       # who I masquerade as (null for no masquerading)
       # DM

  y la modificamos para que refleje el dominio de nuestra direccin de
  correo, en mi caso insflug.org:

  # who I masquerade as (null for no masquerading)
  DMinsflug.org

  Con esto, lo que hemos hecho es bsicamente, "enmascarar" nuestra
  direccin en la mquina propia; supongamos que nuestra mquina se
  llama beastie.insflug.org y enviamos un mensaje sin la modificacin
  anterior; el mensaje llegar correctamente a su destino, pero no podr
  ser respondido, ya que la direccin de retorno no existir, al figurar
  la de nuestra propia mquina, que en nuestro caso ficticio sera
  probancio@beastie.insflug.org, en lugar de la de la cuenta de nuestro
  ISP, que es probancio@insflug.org.

  Realmente, lo nico que enmascaramos es el dominio, de ah la necesi
  dad de crear una cuenta en nuestra mquina con el mismo login que en
  nuestro ISP (probancio en este caso); la lnea DS... hace que sendmail
  rute todos los mensajes salientes hacia internet a travs de nuestro
  servidor SMTP, que hace de servidor de relevo hacia internet.
  Podramos no decirle nada, y dejar que se encargara de contactar y
  enviar directamente con el servidor de correo entrante de cada
  direccin, pero eso hara ms lento el envo de los correo, adems de
  que es mucho ms rpida la transferencia con nuestro ISP, al no tener
  que salir a internet siquiera.

  DM... cambia los from de nuestros mensajes por nuestra verdadera
  direccin en el ISP.

  5.2.3.  Cmo escribir

  Para responder o escribir nuestro correo podremos usar cualquier
  programa escritor de correo, los simples como mail o mailx, un poco
  ms completos como el facilsimo elm, o pine, el modo de correo del
  verstil emacs, etc... recordando siempre hacer uso de estos programas
  desde la cuenta que creamos para tal fin (la de probancio en nuestro
  caso ficticio).

  5.2.4.  Procedimiento.

  1. Establecer la conexin PPP con nuestro servidor, con cualquiera de
     los mtodos descritos en las secciones ``Conexiones sin mediar
     Infova'' o ``Conexiones a travs de Infova''. Esto se har
     normalmente como root.

  2. Ejecutar el script getmail en caso de que queramos recoger el
     correo;  en caso de querer mandar el correo pendiente por salir,
     teclear la orden:

       sendmail -q

  que ordenar a sendmail a enviar el correo. (el parmetro -q viene de
  queue o la ``cola'' de correo pendiente por salir).
  Por supuesto, los procedimientos para establecer la conexin y
  recoger/mandar correo se pueden automatizar escribiendo scripts
  sencillos, pero eso lo dejo ya al gusto y segn las circunstancias de
  cada uno.  Estar encantado de recibirlos, a fin de incluirlos en la
  prxima versin de este COMO.

  5.3.  Mtodo ``C''.

  Empleando clientes de correo capaces de enmascarar al usuario/dominio,
  podemos prescindir de la fase de configuracin del enmascaramiento de
  dominio del sendmail. El cliente de correo (MUA (-- Mail User
  Application, aplicacin de gestin de correo a nivel usuario)--) mutt,
  puede hacer esto, a nivel tanto de dominio como de usuario, entre
  otras muchas prestaciones que harn las delicias de los amantes del
  modo texto: gestin pgp integrada, threads, color... Un cliente muy
  recomendable. Su servidor de ftp primario es:

  ftp://ftp.cs.hmc.edu/pub/me/mutt

  Es posible tambin prescindir de la ``chapucilla'' de tener que
  emplear el mismo usuario que en el proveedor empleando un MTA (-- Mail
  Tranfer Agent, Agente de Gestin de transferencia de Correo--) de
  configuracin ms flexible y cmoda que sendmail, como el prometedor
  qmail, fcilmente obtenible en Internet, que adems ofrece muchas
  otras prestaciones, sin la fragilidad en cuanto a seguridad de
  sendmail, y menos exigente en cuanto a recursos, lo que le hace ideal
  para listas de correo..

  6.  Agradecimientos

  Mi ms sincero agradecimiento a todos los contertulios de R34.LINUX, y
  a los de la Lista de correo de RedHat, as como a Jos L. Navarro
  Simn, 2:345/102.36 y Miguel Cruz por los scripts a travs de infova,
  a Urko Lusa, 2:344/25.8 por los de acceso directo, y a Eric S.
  Pulley, pulley@dabus.com por las explicaciones con lo relacionado con
  el correo.

  A Carlos Terrn por sus correcciones, a Juan Manuel Villar Navarro
  juanma@gaps.ssr.upm.es por sus apuntes sobre popmail, y a Iigo
  Gonzlez nexus@adv.es por las sugerencias sobre procmail, y a Jess
  Fuentes Saavedra jesus.fuentes@etsi.uva.tel.es por el detalle del
  bsd_comp, y tantsimas otras cosas...

  A Antonio Verdejo Garca aka wait_man, wait_man@hotmail.com por su
  lista de winmodems y tantas otras crticas y sugerencias.

  7.  Copyright

  Este documento es Copyright (c)1996 de Francisco Jos Montilla. Este
  trabajo puede ser reproducido en su totalidad o en parte, tanto de
  forma impresa como electrnica, sujeto a las siguientes condiciones:

  1. La notificacin del copyright y esta licencia debe preservarse
     completa en todas las copias, tanto completas como parciales.

  2. Cualquier traduccin o trabajo derivado debe de ser aprobado por el
     autor por escrito antes de su distribucin.

  3. Si se distribuye el Trabajo parcialmente, deben de incluirse
     instrucciones para poder obtener la versin completa (en forma
     impresa o electrnica), as como los medios para conseguirla.

  4. Pueden ser reproducidas pequeas porciones como ilustraciones para
     revistas o citas para otros trabajos sin esta notificacin de
     permiso si se cita apropiadamente su procedencia.

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Cmo Intentar configurar un servidor de news con INN+SUCK
  Autor: Pedro P. Fbrega Martnez, pfabrega@arrakis.es
  Versin 1.1 Fecha 8-98

  Este documento explica como configurar un servidor de news en su
  mquina Linux. Est enfocado para las personas que usan Linux en casa
  y les gustara tener un pequeo servidor local. Tambin para quien
  quiera dar servicio de noticias a una red local con direcciones pri
  vadas. Este documento no va dirigido a quienes quieren ejecutar un
  servidor de news en una gran red, aunque la mayora de las cosas las
  podra aplicar tambin. Por ltimo, se supone que quien pretende
  instalar inn+suck tiene ya ciertos conocimientos no elementales.
  ______________________________________________________________________

  ndice General:

  1.      Descargo

  2.      Introduccin

  2.1.    Descripcin

  2.1.1.  inn

  2.1.2.  suck

  2.2.    Dnde puedo conseguirlos ?

  3.      Mtodo

  3.1.    configuracin de INN

  3.1.1.  inn.conf

  3.1.2.  newsfeeds

  3.1.3.  nnrp.access

  3.1.4.  hosts.nntp

  3.1.5.  active

  3.2.    Verificaciones

  3.3.    Estaciones cliente

  3.4.    Instalar suck

  3.4.1.  get.news.innxmit

  3.4.2.  Ejecutar suck

  4.      Comentarios

  4.1.    sucknewsrc

  4.2.    Caducidad de los mensajes:

  4.3.    Espacio en disco

  4.4.    Otras cosas

  4.5.    Autor

  4.6.    Derechos de Autor

  5.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Descargo

  Antes de comenzar, indicar que esto me funciona, con RedHat 5.0, puede
  que las configuraciones sean mejorables, pero estas satisfacen mis
  necesidades actuales, de dar servicio de news a una red local de
  varios equipos con unos 10 grupos de news de internet y algunos
  locales.

  Adems no se asume ningn tipo de responsabilidad de ningn dao
  ocasionado por estas instrucciones.

  Por ejemplo, si te cabreas porque no sale, pegas un puetazo, este
  hace saltar por la ventana un bolgrafo, que al darle al operario de
  telfonos se le cae la escalera, esta golpea unos cables de alta
  tensin, se produce un sobrecarga de la lnea, la sobrecarga calienta
  el sistema de refrigeracin de la central nuclear y se produce una
  explosin termonuclear, yo, no quiero saber nada, que quede claro.

  2.  Introduccin

  2.1.  Descripcin

  Para instalar un servidor de news en su equipo Linux, usando este
  mtodo, va a necesitar dos paquetes, INN y suck.

  2.1.1.  inn

  INN (InterNetNews) es un systema completo de Usenet para las Noticias
  de InterNet. Dispone de un demonio innd que gestiona entradas y
  salidas y otro demonio nnrpd que gestiona las lecturas. Dispone
  tambin de una serie de utilidades, a alguna de las cuales haremos
  referencia en este documento. Adems, mantiene por separado los hosts
  que leen noticias de aquellos que nos las proporcionan, un detalle a
  tener en cuenta a la hora de la configuracin.

  2.1.2.  suck

  Para realizar la comunicacin de nuestro servidor local y el servidor
  remoto utilizaremos otro programa llamado suck, en particular yo lo he
  hecho con el suck-3.9.2. En el momento de confeccioonar este documetno
  era la ltima versin y no haba intenciones de sacar ninguna nueva.

  Este paquete dispone de todo lo que es necesario para obtener news de
  un servidor NNTP remoto, y enviar artculos de tu servidor al servidor
  remoto.

  El principal uso de suck es dar noticias a un servidor local INN o
  CNEWS, sin necesidad de que el servidor remoto NNTP te tenga
  configurado como "feed". NO est diseado para alimentarse de 10,000
  grupos y 3GB de artculos al da.

  2.2.  Dnde puedo conseguirlos ?

  INN forma parte de prcticamente todas las distribuciones de Linux.
  Slo tiene que seleccionarlo como uno ms de los componentes de la
  instalacin o instalarlo con la utilidad de paquetes que tenga su
  distribucin si no lo hizo en su mom ento.

  Si de todas formas le interesan las fuentes de INN, para actualizarse
  o cualquier otra cosa, las puede encontrar en

    ftp://ftp.vix.com/pub/inn

  o en rplicas que puede encontrar en http://www.isc.org/inn.html. Por
  ejemplo :

  ftp://ftp.xlink.net/pub/mirror.inn/

  La versin INN1.5.1 tiene algunos problemas de seguridad. Hay un
  parche para solucionar esto en http://miquels.www.cistron.nl/inn/

  Si quiere obtener utilidades adicionales para INN puede mirar en
  tp://ftp.isc.org/isc/inn/unoff-contrib

  Suck se puede encontrar en:

  ftp://tsx-11.mit.edu/pub/linux/sources/sbin/suck-3.9.2.tar.gz

  ftp://sunsite.unc.edu/pub/Linux/system/news/transport o en cualquier
  rplica de Sunsite.

  3.  Mtodo

  3.1.  configuracin de INN

  Una vez que INN est instalado necesitamos los ficheros de
  configuracin de INN. Estos ficheros de configuracin estn
  normalmente en /usr/lib/news, pero esto puede depender de la
  distribucin. En mi caso

  # ls -la /usr/lib/news

  drwxrwxr-x   3 news     news         1024 May 19 21:38 .
  drwxr-xr-x  63 root     root         8192 Jun 17 15:39 ..
  drwxrwxr-x   5 news     news         1024 May 19 21:38 bin
  -r--r-----   1 news     news         5206 Oct 20  1997 innshellvars
  -r--r-----   1 news     news         6816 Oct 20  1997 innshellvars.csh
  -r--r-----   1 news     news         6452 Oct 20  1997 innshellvars.pl
  -r--r-----   1 news     news         7098 Oct 20  1997 innshellvars.tcl
  -r-xr-x---   1 news     news         4728 Oct 20  1997 parsecontrol
  -rwxr-xr-x   1 news     news        18040 Oct 20  1997 rnews

  # ls -la /etc/news

  drwxrwxr-x   2 news     news         1024 Jun 15 01:53 .
  drwxr-xr-x  28 root     root         4096 Jul 26 12:21 ..
  -r--r-----   1 news     news          265 Oct 20  1997 actsync.cfg
  -r--r-----   1 news     news          371 Oct 20  1997 actsync.ign
  -r--r-----   1 news     news        26879 Oct 20  1997 control.ctl
  -r--r--r--   1 news     news          491 Oct 20  1997 distrib.pats
  -r--r-----   1 news     news         1537 Oct 20  1997 expire.ctl
  -r--r-----   1 news     news          260 May 22 18:22 hosts.nntp
  -r--r-----   1 news     news          161 Oct 20  1997 hosts.nntp.nolimit
  -r--r--r--   1 news     news          831 May 24 22:05 inn.conf
  -r--r-----   1 news     news         2978 Oct 20  1997 innwatch.ctl
  -r--r--r--   1 news     news          633 Oct 20  1997 moderators
  -r--r--r--   1 news     news         3843 Jun 15 01:53 newsfeeds
  -r--r-----   1 news     news          114 May 20 15:37 nnrp.access
  -r--r-----   1 news     news          583 Oct 20  1997 nntpsend.ctl
  -r--r--r--   1 news     news          388 Oct 20  1997 overview.fmt
  -r--r-----   1 news     news          596 Oct 20  1997 passwd.nntp

  Observe que los ficheros son propiedad de news. Comprubelo en su
  caso, y tambin que existan el usuario news y el grupo news.

  A continuacin vemos los ficheros que necesitan alguna modificacin:

  3.1.1.  inn.conf

  Voy a poner un listado de mi inn.conf, que adems resulta
  autoexplicativo.

  $ cat /etc/news/inn.conf

  ##  $Revision: 1.6 $
  ##  inn.conf -- inn configuration data
  ##  Formato:
  ##      <parametro>:<espacio><valor>
  ##  Usados por varios programas y libinn. Se definen los siguientes
  ##                                                       parametros:
  ##      domain          Dominio local, sin punto inicial.
  ##      fromhost        Que poner en la linea From ; por defecto es FQDN
  ##                      del host local.
  ##      moderatormailer Donde enviar los post moderados, si no lo encuentra
  ##                      en el fichero de moderadores; vea moderators(5).
  ##      pathhost        Que poner en las cabeceras Path y Xref headers; por
  ##                      defecto es el FQDN del host local.
  ##      organization    Si $ORGANIZATION no existe. Lo que pone en
  ##                      la cabecera Organization si esta en blanco.
  ##      server          Si $NNTPSERVER no existe. Host servidor NNTP local
  ##                      al que conectarse.

  organization:   Servidor en mired.es

  server:         localhost

  domain: mired.es

  ## tengo un alias del localhost CNAME news.mired.es

  pathhost: news.mired.es

  3.1.2.  newsfeeds

  ##  $Revision: 1.17 $

  ##  newsfeeds - determine where Usenet articles get sent
  ##  Formato:
  ##      site[/excluido,excluido...]\
  ##              :modelo,modelo...[/distrib,distrib...]\
  ##              :flag,flag...\
  ##              :param
  ## Lista de flags:
  ##      <size           El articulo debe ser menor de size bytes.
  ##      Aitems          Comprobacion de articulo -- d (necesita la
  ##                      cabecera Distribution)
  ##                      p (no verifica los sitios de la cabecera Path).
  ##      Bhigh/low       Tamanio interno del bufferr antes de escribir a la
  ##                      salida.
  ##      H[count]        El articulo debe tener menos de count saltos; 1 por
  ##                      defecto.
  ##      Isize           Tamanio interno del buffer (si nos suministra un
  ##                      fichero)
  ##      Nm              Solo grupos moderados que verifican el modelo
  ##      Nu              Solo grupos no moderados que verifican el modelo
  ##      Ssize           Inicia spooling si la cola tiene mas de size bytes.
  ##      Ttype           Tipo de suministro -- f (fichero) m (embudo; los
  ##                      nombres de parametro indican la entrada real )
  ##                      p (pipe a programa) c (envio a stdin
  ##                      de los sub-prcesos del parametro); x (como c, pero
  ##                      maneja comandos en stdin).
  ##      Witems          Que escribir -- b (tamanio en bytes del articulo)
  ##                      f (rutas completas )
  ##                      g (primer newsgroup) m (Message-ID) n (path relativo)
  ##                      s (sitio que suministra el articulo) t (hora recibida)
  ##                      * (nombres de embudos o sitios que obtienen el articulo
  ##                      N (Cabecera Newsgroups ) D (Cabecera Distribution
  ##                      H (todas las cabeceras) O (overview data)
  ##                      R (replicado de datos).

  ## Los campos de parametro dependen del flag T. Para Tf, las rutas
  ## relativas son del directorio .Para Tp y Tc, es ejecutar un comando de
  ## shell.

  ## Si un Tm se refiere a esta entrada (que tendra su propio parametro T )
  ## entonces "*" se expande a todos los sitios embudo lanzados por este.

  ## Este fichero es complicado -- vea newsfeeds.5!

  ##  Este es el sitio local.
  ##  El campo modelo da la lista de suscripcion para todos los otros
  ##  sitios.
  ##  Le puede interesar poner !control,!junk,!<local>.* alli. El subcampo
  ##  distrib limita los articulos entrantes.
  ##
  ##  Puede tener tambien ME/mal.site: para rehusar articulos de un sitio
  ##  particular (que verifique la entrada Path: ). Se pueden poner aqui
  ##  pseudo-sitios para REHUSAR ciertos tipos de mensajes cancelados.
  ##  (Vea la "Cancel FAQ" news.admin.net-abuse.misc):

  ##      cyberspam       Cancela Spam, post binarios
  ##      spewcancel      just munged articles from runaway gateways
  ##      bincancel       Cancela post binarios a grupos no binarios
  ##

  ##  Observe que rehusar articulos significa que no los ofrece a los sitios
  ##  a los que el servidor les suministra

  ## Por defecto todo a todos salvo para junk, control, cualquiera con "local"
  ## como el prefijo de grupo de noticias (i.e. verifica "localhost.loquesea") o
  ## grupos bajo foo. Los articulos posteados a cualquier grupo bajo
  ## alt.binaries.warez no se propagaran, incluso si son cross posted.

  ME\

          :*,@alt.binaries.warez.*,!junk,!control*,!local*,!foo.*\
                  /world,usa,na,gnu,bionet,pubnet,u3b,eunet,vmsnet,inet,ddn,k12\
  ::

  ## Crea los enlaces para los artss posted
  crosspost:*:Tc,Ap,WR:/usr/lib/news/bin/crosspost -s -

  ##  News overview
  overview!:*:Tc,WO:/usr/lib/news/bin/overchan

  # Suministra todos los post origen moderados a un archivo.
  #source-archive!:!*,*sources*,!*wanted*,!*.d\

  #       :Tc,Wn:/usr/news/bin/archive -f -i /usr/spool/news.archive/INDEX

  # Suministra todos los post no internos a nearnet; los envia off-line via
  # nntpsend o send-nntp.
  #nic.near.net\
  #       :!junk/!foo\
  #       :Tf,Wnm:nic.near.net

  # Un enlace que suministra en tiempo real
  #uunet\
  #       :/!foo\
  #       :Tc,Wnm:/usr/news/bin/nntplink -i stdin news.uu.net

  # Capture all Foo, Incorporated, postings
  #capture\
  #       :*/foo\
  #       :Tp,H2:/usr/news/local/capture %s

  news.servidor-isp.es\
  :!junk,!control:Tf,Wnm:news.servidor-isp.es

  #foros.euskaltel.es/news.euskaltel.es\
  #:*,!control,!junk,!fido.*,!subnet.*/!local\
  #:Tf,Wnm:foros.euskaltel.es

  Vamos a ver si aclaramos algo esto. Por ejemplo la siguiente entrada:

       noticias.servidor-isp.es/news.servidor-isp.es\
       :*,!mios.*/!mios\
       :Tf,Wnm:

  Para ser sincero parece complejo, pero vamos a aclararlo:

  noticias.servidor-isp.es es el nombre del equipo suministrador.
  /news.servidor-isp.es es un alias del anterior.

  Esto es importante ya que INN usa la cabecera "Path" para asegurarse
  de que los artculos no se envan ms de una vez al mismo sitio. De
  esta forma cualquier artculo que tenga noticias.servidor-isp.es o
  news.servidor-isp.es no se enviarn. Como son dominios registrados,
  estamos seguros de que ningn otro sitio inserta estas cabeceras.

  La segunda lnea indica qu artculos se enviarn a este sitio
  *,!mios.* quiere decir que se enviarn a news.servidor-isp.es todos
  los salvo los de aquellos grupos que empiezan por mios.. El segundo
  /!mios significa que los artculos con una cabecera Distribution de
  ``mios'' tampoco se enviarn a nes.servidor-isp.es.

  El ltimo campo especifica exactamente el tipo de suministro.  Tf
  quiere decir que es un fichero. Salvo casos muy especiales, que uno ya
  debe saber lo que hace, siempre pondremos esto. Wnm significa que el
  path relativo y el Message-ID del artculo se escribirn en este
  fichero. La n significa nombre de path relativo, la m es el Message-ID
  del artculo.

  Ahora en nuestro servidor, cada artculo destinado a news.servidor-
  isp.es tendr su nombre de fichero y su Message-ID en el fichero
  /var/spool/news/out.going/noticias.servidor-isp.es..

  3.1.3.  nnrp.access

  En este fichero necesita especificar a qu equipos se les permite
  enviar y recibir noticias desde su equipo. Para que el sistema
  funcione puede poner permisos globales de lectura y envo a los
  distintos hosts aadiendo unas simples lneas como las siguientes (ojo
  esto no son los permisos de fichero, lea ms abajo).

  ## hosts:permiso:username:password:modelos

  ## hosts: Direccion de red o nombre de hosts

  ## permiso:
  ##              R    El cliente puede leer articulos
  ##              P    El cliente puede enviar articulos

  ## username:clave este campo especifica que clave tiene que utilizar el usuario
  ## para enviar articulos.

  ## modelos: este campo indica a que grupos puede acceder el usuario
  ##

  ## Por defecto no permitiriamos el acceso a nadie.
  ## Puede depender de la instalacion

  ## *:: -no- : -no- :!*

  ##  host:perm:user:pass:groups

  ##  los hosts mired no tiene password, cualquiera puede leer.
  ## *.mired.es:Read Post:::*

  ##  Una determinada estacion no puede accedor a los grupos es.alt.
  ## pardillo.mired.es:RP:usuario:hdys:*,!es.alt.*

  # Permitir el acceso a localhost
  localhost:Read Post:::*

  # Permitimos el acceso a todo el mundo
  *:Read Post:::*

  Para las pretensiones de este documento no necesitamos ms, en
  consecuencia ponemos un comentario al resto de las lneas (usando un #
  al principio de lnea).

  Otro detalle. Si el fichero contiene claves no debera tener permiso
  de lectura a otros.

  3.1.4.  hosts.nntp

  En este fichero especificamos los lugares que nos suministran
  noticias, matizando, los sitios que suministran noticias a INN.

  El proceso que seguiremos ser usar suck para transferir los artculos
  de los grupos selecconados hacia nuestro host. Una vez en nuestro host
  estos artculos se le envan a INN.

  Como somos nosotros mismos los que proporcionamos las noticias,
  tenemos que especificar nuestro propio host como el sitio que nos
  suministra las noticias. Por ejemplo, si su host se llama
  news.mired.es, tendra que poner:

  ##  $Revision: 1.7 $

  ##  hosts.nntp - nombres y direcciones que nos suministran noticias

  ##  Formato
  ##      <host>:
  ##      <host>:<password>

  ##  <host> puede ser una IP o nombre.; no admite plantilla.
  ##  Cualquier host no incluido aqui no es gestionado por nnrpd.

  news.mired.es:

  localhost:

  3.1.5.  active

  Este archivo contiene informacin sobre los grupos de noticias que
  gestiona este host. Por defecto viene con una lista de miles de
  posibles grupos de noticias. Suele estar ubicado en /var/lib/news.

  Se organiza en lneas de cuatro campos.

    El primer campo es el nombre del grupo de noticias. Los grupos que
     comienzan por "to." (vea innd(8)).

    El segundo campo es el nmero de artculo ms alto que se ha usado
     en el grupo.

    El tercero es el nmero de artculo bajo del grupo.

    El cuarto campo puede ser uno de los siguientes indicadores

        y        Se permiten los post locales
        n        Solo se permiten post remotos, no locales
        m        El grupo es moderado
        j        Los art se mantienen. se pasan.
        x        No se pueden postear articulos a este grupo
       =fict.bar Los articulos van localmente al grupo ``fict.bar''

  Notas: si el nmero de artculo ms bajo es mayor que el ms alto,
  entonces no hay artculos en el grupo. Para facilitar el trabajo, los
  campos numricos tienen una longitud fija, aadindosele ceros. Este
  fichero, aunque se puede editar, es mejor gestionarlo con ctlinnd.

  Cuando instalamos el servidor necesitamos estas cuatro lneas. Ms
  tarde veremos como aadir ms grupos.

           general 0000000000 0000000001 y
           control 0000000001 0000000001 y
           junk 0000000000 0000000001 y
           to 0000000000 0000000001 y

  Disponemos de un programa llamado makeactive que nos puede ser til
  (man makeactive).

  3.2.  Verificaciones

  Ahora debemos ejecutar un programa llamado inncheck que comprobar si
  la configuracin es correcta.

  Como puede que las distintas distribuciones usen cada una de ellas su
  propia ubicacin, podemos poner

       type inncheck

  o

       find /usr -name inncheck

  Cuando haya hecho todo esto, puede iniciar su servidor INN (si no lo
  est ya) ejecutando el programa

  que puede encontrar en /usr/lib/news/etc o en /usr/libexec/inn (o bien
  /etc/rc.d/news start, o bien /etc/rc.d/innit.d/inn start, o bien ...)

  En mi caso

       $ ls /usr/lib/news/bin/

       actmerge        ctlinnd         inncheck        newsrequeue     sendxbatches
       actsync         ctlrun          innconfval      nntpget         shlock
       actsyncd        cvtbatch        innstat         nntpsend        shrinkfile
       archive         expire          innwatch        overchan        tally.control
       auth.dir        expireover      innxbatch       pgpverify       tally.unwanted
       batcher         expirerm        innxmit         prunehistory    writelog
       buffchan        fastrm          makeactive      rnews
       control         filechan        makegroup       scanlogs
       convdate        getlist         makehistory     scanspool
       crosspost       grephistory     news.daily      sendbatch

  Si todo va bien, inn esta en ejecucin. Ahora tiene que aadir grupos
  de noticias. Los grupos de noticias se aaden con ctlinnd, que aadir
  una entrada al fichero active. No intente aadir grupos manualmente.

  Para un slo grupo podemos hacer:

       ctlinnd newgroup es.comp.os.linux

  y para crear grupos exclusivos de nuestra red local podemos hacer

       ctlinnd newgroup local.primero.linux

  Tenga en cuenta que nuestro ISP no conoce el grupo
  local.primero.linux, por lo que no debiera de llegarle. Esto ya lo
  hicimos en /etc/news/newsfeeds con

       ME\
               :*,@alt.binaries.warez.*,!junk,!control*,!local*,!foo.*\
                       /world,usa,na,gnu,bionet,pubnet,u3b,eunet,vmsnet,inet,ddn,k12\
       ::

  Si vamos a dar de alta muchos grupos en un sistema en funcionamiento
  conviene detener el servidor ctlinnd pause. Vea man ctlinnd, es de
  suma importancia.

  Tambin podemos eliminar grupos de nuestro servidor:

       ctlinnd rmgroup es.comp.os.mswindows

  3.3.  Estaciones cliente

  Ahora ya est disponible inn como servidor de news. En el equipo
  servidor podemos acceder a l como localhost. En equipos clientes se
  pone nuestro equipo servidor como su servidor de noticias. Si no
  tenemos un servidor DNS ni archivos hosts adecuados en los clientes
  tendremos que poner directamente la direccin del equipo servidor como
  servidor de noticias en cada equipo cliente.

  3.4.  Instalar suck

  Una vez descomprimidas las fuentes tenemos el directorio suck-3.9.2/ y
  nos vamos a l.
  Cmo instalarlo

  1. Ejecutamos el script ./configure

  2. Modifique suck_config.h - hay un montn de cosas configurables

  3. Complelo:  (make , make install)

  4. Defina un sucknewsrc con los grupos que quiera cargar del servidor
     (Si ya est INN en funcionamiento use la opcin -A -hl localhost y
     se generar el sucknewsrc). En comentarios se especifica algo ms.

  5. Edite el fichero sample/get.news.innxmit, ponga su servidor de
     noticias y asegrese de que los path son correctos. La ejecucin de
     suck para bajar artculos del servidor y el envo de los artculos
     locales se hacen mediante este script. Cpielo en en el path de
     ejecucin para mayor comodidad y haga

          chown news.news get.news.innxmit
          chmod o-x get.news.innxmit
          chmod ug+x get.news.innxmit

  6. make install_sman para instalar la documentacin en castellano.

  3.4.1.  get.news.innxmit

  Este es el programa que va a gestionar nuestras transferencias con el
  ISP

  #!/bin/sh
  #
  #ANTES DE USAR - compruebe que todos los paths definidos son correctos

  REMOTE_HOST=news.servidor-isp.es
  LOCAL_HOST=localhost
  SPOOLDIR=/var/spool/news                # directorio base para artteados
  NEWSDIR=/usr/lib/news/                  # directorio base para binarios de news
  BASEDIR=/var/lib/news/                  # directorio base para scripts y ficheros de datos
  CTLINND=${NEWSDIR}/bin/ctlinnd          # ubicacion
  SHLOCK=${NEWSDIR}/bin/shlock            # location of binary
  TMPDIR=${BASEDIR}                       # ubicacion ficheros de suck
  MSGDIR=${BASEDIR}/Msgs                  # donde poner mensajes multifichero
  SITE=news.servidor-isp.es               # nombre del sitio que nos suministra

  OUTGOING=${SPOOLDIR}/out.going/${SITE}  # articulos para enviar
  OUTGOINGNEW=${OUTGOING}.new             # fichero de lista temporal
  OUTGOINGFAIL=${OUTGOINGNEW}.fail        # fichero con indicaciones de fallos
  SCRIPT=${BASEDIR}/put.news              # filtro para rpost
  OUTFILE=/tmp/news/tmp$$                 # usado por rpost como articulo tras el filtrado
  LOCKFILE=${BASEDIR}/getnews.lock        # fichero de bloqueo para prevenir instancias
  NEWSGROUP=news                          # que grupo posee los ficheros de
                                          # out.going
  TESTHOST=/usr/local/bin/testhost
  RPOST=/usr/local/bin/rpost
  SUCK=/usr/local/bin/suck

  # Si ya estamos en ejecucion, abortar

  trap 'rm -f ${LOCKFILE} ; echo "Abortando" ; exit 1' 1 2 3 15
  ${SHLOCK} -p $$ -f ${LOCKFILE}

  if [ $? -ne 0 ]; then
          echo "Ya estoy en ejecucion, no puedo ejecutarme mas de una vez"
          exit
  fi

  # Esta el host local funcionando para que podamos enviar los mensajes que
  # cargamos?

  ${TESTHOST} ${LOCAL_HOST} -s
  LOCAL_RESULT=$?

  # esta el host remoto listo para bajarnos mensajes?

  ${TESTHOST} ${REMOTE_HOST} -s
  REMOTE_RESULT=$?

  if [ ${REMOTE_RESULT} -eq 0 -a ${LOCAL_RESULT} -eq 0 ]; then

  # bajar mensajes

  ${SUCK} ${REMOTE_HOST} -c -A -bp -hl ${LOCAL_HOST} -dt ${TMPDIR} -dm ${MSGDIR} -dd ${BASEDIR}
          SUCK_STATUS=$?

          if [ ${SUCK_STATUS} -eq 0 ]; then
                  echo "Articulos Bajados"

         elif [ ${SUCK_STATUS} -eq 1 ]; then
                  echo "No hay articulos para bajar"

         elif [ ${SUCK_STATUS} -eq 2 ]; then
                  echo "Respuesta inesperada del servidor remoto a un comando"

         elif [ ${SUCK_STATUS} -eq 4 ]; then
                  echo "No puedo hacer una autorizacion NNTP "

         elif [ ${SUCK_STATUS} -eq -1 ]; then
                  echo "General failure"
          fi

  # Ahora nos bajamos los mensajes

          if [ -s ${OUTGOING}  -o -s ${OUTGOINGNEW} ]; then
                  ${TESTHOST} ${REMOTE_HOST} -s
                  if [ $? -ne 0 ]; then
                          echo "El host remoto no respponde al post"
                  else

  # esto es necesario por INND para que el fichero outgoing sea
  # vaciado adecuadamente y tengamos uno en blanco para seguir trabajando
  # cuando terminemos

                          if [ ! -s ${OUTGOINGNEW} ]; then
                                  mv ${OUTGOING} ${OUTGOINGNEW}
                                  ${CTLINND} flush ${SITE}
                          fi

  # mensajes de outgoing para postear

  ${RPOST} ${REMOTE_HOST} -d -b ${OUTGOINGNEW} -p ${SPOOLDIR} -f \$\$o=${OUTFILE} ${SCRIPT} \$\$i ${OUTFILE}

             ERRLEV=$?

                  if [ ${ERRLEV} -eq 0 ]; then
                       echo "Articulos posteados remotamente"
                       rm ${OUTFILE}

                  elif [ ${ERRLEV} -eq 1 ]; then
                       echo "Error posteando un mensaje"

                  elif [ ${ERRLEV} -eq 2 ]; then
                       echo "No puedo obtener autorizacion NNTP con el servidor remoto"

                  elif [ ${ERRLEV} -eq 3 ]; then
                     echo "Respuesta inesperada del servidor a un comando en la autorizacion NNTP"

                  elif [ ${ERRLEV} -eq -1 ]; then
                     echo "Error Fatal "
                          fi

              if [ -f ${OUTGOINGFAIL} ]; then
                    mv ${OUTGOINGFAIL} ${OUTGOINGNEW}       # so we can re do it
                    chown news.${NEWSGROUP} ${OUTGOINGNEW}
                    chmod 664 ${OUTGOINGNEW}
                          fi
                  fi
          fi

          echo "Ya puede colgar el modem"

  fi

  rm -f ${LOCKFILE}

  3.4.2.  Ejecutar suck

  Simplemente ejecute como root

       su -c get.news.innxmit news

  y primero bajar los grupos de noticias indicados en sucknewsrc y
  enviar los artculos posteados localmente.

  4.  Comentarios

  4.1.  sucknewsrc

  Este fichero contiene informacin sobre qu grupos de noticias se
  deben transferir desde el servidor remoto de noticias + el mensaje ms
  alto que se ha bajado, v.g.

       control 236
       junk 970
       test 1
       to 116
       es.comp.os.linux 16149
       es.comp.lenguajes.c 1235
       es.comp.lenguajes.c++ 1631
       es.comp.lenguajes.java 1819
       esp.comp.so.linux 1715

  4.2.  Caducidad de los mensajes:

  Es importante estar seguro de que los artculos caducan, que expiran.
  De esto se encarga script news.daily. El fichero expire.ctl describe
  la duracin de los artculos. Veamos algunos ejemplos de este fichero:

       /remember/:20

  Esta lnea le dice a expire que mantenga las entradas de los artculos
  en history al menos 20 das.

       *:A:1:7:21

  Esta es la lnea por defecto. Indica que por defecto, un articulo se
  tenga un mnimo de un da, la expiracin es 7 das (se aplica si no
  hay cabecera Expires), y el mximo que es mantenido el artculo que
  son 21 das.

       local.*:A:1:14:28

  Esta lnea slo se aplica a los grupos local. Por defecto los
  artculos permanecern 14 das, 28 como mximo.

  Tiene que tener en cuenta que las lnea de expire.ctl deben tener las
  entradas mes primero y las ms especficas al final.

  En mi RedHat 5.0 tengo

       # ls -la /etc/cron.daily/

       total 12

       drwxr-xr-x   2 root     root         1024 Jun 12 17:41 .
       drwxr-xr-x  28 root     root         4096 Jul 26 12:21 ..
       -rwxr-xr-x   1 root     root           54 Oct 20  1997 inn-cron-expire
       -rwxr-xr--   1 root     root          732 Jun 12 17:40 internet
       -rwxr-xr-x   1 root     root           51 Oct 21  1997 logrotate

  y

       cat /etc/cron.daily/inn-cron-expire

       #!/bin/sh
       su - news -c "/usr/lib/news/bin/news.daily"

  Si por alguna circunstancia no queremos ejecutar news.daily mediante
  cron deberemos hacerlo a mano. Si no se ejecuta este programa se le
  notificar al administrador mediante mail.

  4.3.  Espacio en disco

  Normalmente los artculos se guardan en /var/spool/news. Debe prever
  espacio de almacenamiento. Esto habr que estudiarlo para cada caso en
  particular. Si va a bajar slo unos pocos grupos entonces puede que no
  haya problemas. Si quiere dar acceso a una red local con muchos grupos
  de noticias puede que tenga que dedicar una particin a /var/spool

  4.4.  Otras cosas

  Todo se ejecuta como usuario news salvo lanzar y detener el servicio
  con rc.news.

  En caso de que aparezca el mensaje :

       inndstart: inndstart cant bind Address already in use

  puede que o bien innd est ya en uso o que el puerto est ocupado. En
  este ltimo caso habr que comentar la lnea corresppondiente a nntp
  en /etc/inetd.conf y reiniciar inetd con la seal HUP ( kill -HUP
  pid_de_inetd)

  Hay muchas cosas que quedan por configurar, pero para esto habr que
  recurrir a

       man suck
       man innd
       man inn.conf

  etctera.

  4.5.  Autor

  El autor de este mini-como es Pedro Pablo Fbrega Martnez
  (pfabrega@arrakis.es)

  Este mini-como una recopilacin de documentos disponibles en internet
  y de mi propia experiencia.

  Tambin indicar que existen unas FAQ de innd:

  ftp://ftp.blank.org/pub/innfaq/

  y en Europa:

  ftp://ftp.xlink.net/pub/news/docs/

  Se admiten comentarios para mejorar este documento.

  Los insultos y groseras pueden redirigirse directamente a /dev/null

  4.6.  Derechos de Autor

  Este documento est a disposicin de cualquiera bajo los trminos
  indicados en la licencia pblica GNU. En resumen, puede copiar y usar
  este documento sin restricciones siempre que no se apropie
  intelectualmente de l o de parte e imponer restricciones adicionales
  a su distribucin.

  Hay partes que son de otros autores y estos son, en consecuencia,
  propietarios intelectuales de su obra. Yo me reservo la propiedad de
  mis aportaciones.

  5.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Kernel-Como
  Brian Ward, bri@blah.math.tu-graz.ac.at
  Traduccin de Juan Jos Amor, jjamor@ls.fi.upm.es
  Revisin 2.1, 22 de Diciembre de 1996

  Lo que sigue es una gua detallada de la configuracin del ncleo,
  cubriendo detalles de compilacin y de actualizaciones.  El traductor
  ha intentado respetar el documento original, aunque no ha podido evi
  tar aadir cosas de su propia cosecha, sobre todo en lo que respecta a
  opciones an no documentadas.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Lea esto primero!

  1.2.    Sobre el estilo

  2.      Preguntas y respuestas importantes

  2.1.    Pero, qu hace el ncleo?

  2.2.    Por qu puedo necesitar actualizar el ncleo?

  2.3.    Qu hardware nuevo soportan los nuevos ncleos?

  2.3.1.  Anexo de la revisin.

  2.4.    Qu versin de gcc  y libc  necesito?

  2.5.    Qu es un mdulo cargable?

  2.6.    Cunto espacio en disco necesito?

  2.7.    Cunto se tarda en compilar?

  3.      Cmo configurar el ncleo.

  3.1.    Obtencin de los fuentes.

  3.2.    Descompresin de los fuentes

  3.3.    Configuracin del ncleo

  3.3.1.  Anexo de la revisin 2.1.

  3.4.    Continuacin

  3.4.1.  Emulacin de coprocesador ( Kernel math emulation )

  3.4.2.  Soporte de discos IDE y MFM/RLL normales ( Normal (MFM/RLL)
  disk and IDE disk/cdrom support )

  3.4.3.  Soporte de redes ( Networking support )

  3.4.4.  Limitar memoria a 16 Mb ( Limit memory to low 16MB )

  3.4.5.  Comunicacin entre procesos System V  ( System V IPC )

  3.4.6.  Tipo de CPU (386, 486, Pentium, PPro) ( Processor type (386,
  486, Pentium, PPro ) )

  3.4.7.  Soporte SCSI ( SCSI support )

  3.4.8.  Soportes de tarjetas de red ( Network device support )

  3.4.9.  Sistemas de ficheros ( Filesystems )

  3.4.9.1.        Pero no s qu sistemas de ficheros necesito!

  3.4.10. Manejadores de tipo carcter ( Character devices )

  3.4.11. Tarjeta de sonido ( Sound card )

  3.4.12. Otras opciones de configuracin

  3.4.13. Kernel hacking

  3.5.    Y ahora qu? (El fichero Makefile ).

  4.      Compilacin del ncleo

  4.1.    Limpieza y dependencias

  4.2.    El momento de compilar

  4.3.    Otras opciones del ` make '

  4.4.    Instalacin del ncleo

  5.      Parchear el ncleo

  5.1.    Aplicacin de un parche

  5.2.    Si algo va mal

  5.3.    Limpieza de ficheros .orig

  5.4.    Otros parches

  6.      Paquetes adicionales

  6.1.    kbd

  6.2.    util-linux

  6.3.    hdparm

  7.      Problemas tpicos

  7.1.    make clean

  7.2.    Ncleos muy lentos o muy grandes

  7.3.    El ncleo no compila

  7.4.    El nuevo ncleo no parece arrancar

  7.5.    Se olvid ejecutar LILO , y el sistema ya no arranca

  7.6.    Mensaje de aviso: ` warning: bdflush not running '

  7.7.    Salen mensajes sobre smbolos no definidos, y no compila

  7.8.    No consigo que me detecte mi CD-ROM IDE/ATAPI

  7.9.    Salen mensajes sobre cosas de encaminamiento obsoletas

  7.10.   La funcin de cortafuegos no funciona en el ncleo 1.2.0

  7.11.   Mensaje: `` Not a compressed kernel Image file ''

  7.12.   Hay problemas con la consola al pasarse a la 1.3.x

  7.13.   Algunas cosas no compilan despus de la actualizacin

  8.      Notas sobre la actualizacin a la versin 2.0.x

  9.      Mdulos

  9.1.    Instalacin de las utilidades asociadas

  9.2.    Mdulos distribuidos con el ncleo 1.2.2

  10.     Otras opciones de configuracin.

  10.1.   Opciones generales

  10.2.   Opciones de red

  11.     Consejos y trucos

  11.1.   Redireccin de la salida de compilacin o parcheado.

  11.2.   Instalacin condicional del ncleo

  11.3.   Actualizaciones del ncleo

  12.     Otros documentos COMO  que pueden serle tiles

  13.     Miscelnea

  13.1.   El autor

  13.2.   Pendiente de hacer

  13.3.   Colaboraciones

  13.4.   Notas sobre el Copyright, Licencia y Todo Eso

  14.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Esta es la versin 0.75 del documento ``Kernel-HOWTO'' original. La de
  la traduccin es la 2.1 Debe Vd. leer este documento? Bien, veamos si
  tiene alguno de los siguientes sntomas:

    ``Jo! El dosemu-0.99.9 requiere el ncleo 1.8.193 y yo estoy an
     con el 1.2.3''

    Hay un manejador (driver) que slo est en los ncleos ms
     recientes y Vd. lo necesita.

    Vd. realmente no tiene ni idea de cmo se compila el ncleo.

    Vd. lo ha intentado pero no le ha funcionado.

  1.1.  Lea esto primero!

  Algunos de los ejemplos aqu puestos suponen que se tiene el tar de
  GNU, as como find y xargs. Son casi estndares, pero por si acaso...
  Tambin se asume que conoce la organizacin del sistema de ficheros;
  si no lo conoce, copie la salida del comando mount en condiciones
  normales (o el fichero /etc/fstab si puede acceder a l). Esta
  informacin es importante, y no cambiar a menos que reparticione el
  disco, aada uno nuevo, reinstale el sistema o similar.

  La ltima versin de produccin del ncleo que se conoce ahora mismo
  es la 2.0.10 (-- 2.0.27 es la ltima versin estable al da de hoy, 22
  de Diciembre de 1996.--) , de manera que nuestros ejemplos irn para
  esa versin.

  Se intenta que tampoco dependa mucho de esto, pero si Vd. usa una
  versin distinta habr siempre algunas diferencias, ya que el ncleo
  est en continuo desarrollo. Esto no debe crear problemas, si acaso un
  ligero despiste al principio.

  Hay dos versiones de las fuentes del ncleo de Linux: las de
  produccin y las de desarrollo. Las versiones de produccin empezaron
  a numerarse en la 1.0.x y siempre se nombran con nmero par.  As, se
  pas de las 1.0.x a las 1.2.x y de sta a la 2.0.x (por no ir a la
  1.4.x ;) ).

  Estas versiones se consideran estables y libres de errores (hasta el
  momento). Las versiones de desarrollo se numeran en impar (1.1.x,
  1.3.x, 2.1.x...) y son de prueba, con lo que posiblemente tengan
  muchos fallos.

  1.2.  Sobre el estilo

  El texto con el aspecto de esta frase se corresponder con las cosas
  que deban aparecer en la pantalla, un fichero o algo que pueda ser
  tecleado como opciones de comandos (si est utilizando la versin
  ASCII de este documento, no ver diferencia alguna). Los comandos son
  entrecomillados (con ` ') lo que causa un problema con la puntuacin:
  al acabar frases con un comando, el estilo americano pone el punto
  dentro de las comillas, lo que confundir a algn lector creyendo que
  hay que teclear tambin el punto (algo de sentido comn, aunque en
  realidad pretenden que el ``sentido comn'' sea solo el estilo
  americano de puntuacin). Esto se soluciona no poniendo tal punto,
  aunque no sea correcto ortogrficamente. Por ejemplo, pondremos `make
  config' y no `make config.'

  2.  Preguntas y respuestas importantes

  2.1.  Pero, qu hace el ncleo?

  El ncleo de Unix acta como intermediario entre sus programas y el
  ordenador. En primer lugar, gestiona la memoria de todos los programas
  o procesos, y se asegura de que se reparten los ciclos del procesador.
  Adems, proporciona una interfaz portable para que los programas
  hablen fcilmente con su hardware.

  Realmente, el ncleo hace ms cosas, pero las anteriores son las ms
  importantes.

  2.2.  Por qu puedo necesitar actualizar el ncleo?

  Los ncleos nuevos normalmente ofrecen la posibilidad de entenderse
  con ms accesorios hardware (o sea, incluyen ms manejadores), se
  ejecutan ms rpidamente, son ms estables o corrigen errores de otras
  versiones. Mucha gente se actualiza el ncleo para poder usar nuevos
  manejadores que necesitan o librarse de ``bugs'' de la versin que
  usaban.

  2.3.  Qu hardware nuevo soportan los nuevos ncleos?

  Vanse el documento Hardware-HOWTO, el fichero config.in de las
  fuentes o simplemente ver lo que hay cuando haga `make config'.  Esto
  le mostrar lo soportado por la distribucin estndar, pero no todo,
  pues algunos son mdulos cargables en ejecucin (como manejadores de
  PCMCIA) y se mantienen y distribuyen por vas distintas.

  2.3.1.  Anexo de la revisin.

  Actualmente, muy pocos mdulos (los no-oficiales) no estn incluidos
  en los fuentes oficiales del kernel. Prcticamente, todos los
  controladores son modularizables.

  He aqu un extracto de lo que aparece en
  /usr/src/linux/Documentation/modules.txt, algo que se debe leer: (--
  Hoy mismo se liberar una traduccin.  --) :

               La mayoria de los sistemas de ficheros:

               minix, xiafs, msdos, umsdos, sysv, isofs, hpfs, smbfs, nfs.

                Soporte SCSI de medio nivel (requeridos por controladores SCSI de
                alto y bajo nivel)

               La mayoria de los controladores SCSI de bajo nivel: (i.e. aha1542, in2000)
               Todos los controladores SCSI de alto nivel: disk, tape, cdrom, generic.

               La mayoria de los controladores ethernet: (demasiados para enumerarlos todos, ver:
                            /usr/src/linux/Documentation/networking/net-modules.txt)

               La mayoria de los controladores de CDROM (propietarios):
                       aztcd:     Aztech,Orchid,Okano,Wearnes
                       cm206:     Philips/LMS CM206
                       gscd:      Goldstar GCDR-420
                       mcd, mcdx: Mitsumi LU005, FX001
                       optcd:     Optics Storage Dolphin 8000AT
                       sjcd:      Sanyo CDR-H94A
                       sbpcd:     Matsushita/Panasonic CR52x, CR56x, CD200,
                                  Longshine LCS-7260, TEAC CD-55A
                       sonycd535: Sony CDU-531/535, CDU-510/515

               Y un monton de modulos, como:
                       lp: impresora p. paralelo
                       binfmt_elf: cargador elf
                       binfmt_java: cargador java
                       isp16: interfaz cdrom
                       serial: interfaz serial (tty)

  2.4.  Qu versin de gcc  y libc  necesito?

  Linus recomienda una en el fichero README de las fuentes del ncleo.
  Si no la tiene, probablemente tenga que actualizarse las libreras
  libc, algo que tampoco es difcil.

  2.5.  Qu es un mdulo cargable?

  Hay partes del cdigo del ncleo que no se enlazan directamente en el
  ncleo. Se compilan por separado y luego se incorporan al ncleo que
  ya est corriendo. Es la forma preferida de usar algunos manejadores
  como los de dispositivos PCMCIA o de cintas QIC-80/40 (--  Hoy en da
  la tendencia es modulizar todos los controladores posibles, salvo
  aquellos estrictamente necesarios para arrancar (ext2, ide, o SCSI,
  segn el caso), aunque siempre se puede hacer una imagen initrd y se
  sigue pudiendo arrancar con LILO. kerneld se encargar de cargarlos y
  descargarlos por nosotros cuando el sistema los necesite o no.  --) .

  2.6.  Cunto espacio en disco necesito?

  Depende de su configuracin. La versin 2.0.10 del ncleo ocupa,
  comprimida, 6 megabytes, pero al descomprimir ocupar unos 24 MB.
  Pero aqu no acaba la cosa: para compilar se necesita espacio para
  ficheros temporales, dependiendo de la configuracin que se elija. Por
  ejemplo, en un 386, con manejador de red de 3Com y cinco sistemas de
  ficheros supone 30 MB. Si a esto aadimos las fuentes comprimidas,
  sern 36 MB. En otro sistema con menos cosas puede ocupar menos.
  Adems, un ncleo nuevo tendr por lo general muchos ms ficheros que
  el antiguo, con lo que debe asegurarse de que hay espacio de disco
  suficiente (adems, con los precios que tienen ahora los discos, me
  puedo permitir el recomendarle que se compre un disco nuevo para el
  Linux).

  2.7.  Cunto se tarda en compilar?

  Para mucha gente, se tarda ``muchsimo''. La velocidad del sistema y
  la cantidad de memoria son determinantes. En un 486DX4/100 con 16 MB,
  se tarda unos 20 minutos en compilar el ncleo v1.2 con cinco sistemas
  de ficheros, soporte de red y manejadores de tarjetas de sonido. En un
  386DX/40 con 8 MB de RAM se tarda una hora y media. Por lo general se
  recomienda prepararse un caf o ver la televisin (o lo que se le
  ocurra (-- O ponerse a hacer cualquier cosa; para eso estamos en
  multitarea :-) --) )  mientras se compila el ncleo. Otra posibilidad
  es compilarlo en un PC ms rpido que el suyo, de algn amigo.

  3.  Cmo configurar el ncleo.

  3.1.  Obtencin de los fuentes.

  Se pueden obtener las fuentes por FTP annimo de
  ftp://ftp.funet.fi/pub/OS/Linux/PEOPLE/Linus/, en un ``mirror'' (-- En
  Espaa contamos con el veloz y magnfico ftp://sunsite.rediris.es--) o
  en otros servidores.  Tpicamente tienen el nombre linux-x.y.z.tar.gz,
  donde x.y.z es el nmero de versin. Las versiones se encuentran en
  directorios v1.1, v1.2 y v1.3 (-- Y 2.0 y 2.1--) . El nmero mayor es
  el de la ltima versin, en este caso versin de desarrollo. Le
  sugerimos que utilice un servidor ``mirror'' de ftp.funet.fi, por
  ejemplo:

    EE.UU.: ftp://tsx-11.mit.edu/pub/linux/sources/system

    EE.UU.: ftp://sunsite.unc.edu/pub/Linux/kernel

    Inglaterra: ftp://sunsite.doc.ic.ac.uk/pub/unix/Linux/sunsite.unc-
     mirror/kernel/

    Austria: ftp://fvkma.tu-graz.ac.at/pub/linux/linus

    Alemania:
     ftp://ftp.Germany.EU.net/pub/os/Linux/Local.EUnet/Kernel/Linus

    Alemania: ftp://ftp.dfv.rwth-aachen.de/pub/linux/kernel

    Francia: ftp://ftp.ibp.fr/pub/linux/sources/system/patches

    Australia: tp://kirk.bond.edu.au/pub/OS/Linux/kernel

    Espaa: ftp://sunsite.rediris.es/pub/linux/kernel/sources

  Si no tiene acceso FTP, encontrar una lista de BBS con lo mismo en el
  grupo comp.os.linux.announce de USENET News.

  3.2.  Descompresin de los fuentes

  Entre en la cuenta root y vaya al directorio /usr/src.  Si instal las
  fuentes cuando instal Linux, habr aqu un directorio linux, con las
  fuentes antiguas. Si quiere preservar esas fuentes (y tiene espacio de
  sobra), renombre (con mv) ese directorio a linux-x.y.z (la versin
  actual x.y.z la puede obtener con el comando uname -r).  Es importante
  que antes de descomprimir las nuevas fuentes no haya ningn directorio
  /usr/src/linux.

  Ahora, en /usr/src, descomprima las fuentes con

       tar xvfzp linux-x.y.z.tar.gz

  (si slo tiene un fichero .tar, sin .gz, elimine la z del comando
  tar). Los contenidos del fichero se expandirn en /usr/src/linux. Vaya
  ahora a ese directorio y lea el fichero README. Encontrar una seccin
  ``INSTALLING the kernel''. Siga las instrucciones que all se digan
  (aunque en las siguientes lneas le diremos cmo tiene que hacer casi
  todo esto).

  3.3.  Configuracin del ncleo

  Nota: Este texto es parcialmente una repeticin de lo que hay en el
  fichero README de las fuentes.

  El comando

       make config

  invocado en el directorio /usr/src/linux inicia un programa shell-
  script de configuracin que le preguntar bastantes cosas.  Requiere
  que est instalado bash, con lo que debe existir /bin/bash, /bin/sh o
  la variable $BASH.

  3.3.1.  Anexo de la revisin 2.1.

  Si los fuentes que posee son superiores al 2.0.x, existen dos mtodos
  bastante ms agradables e interactivos de llevar a cabo la
  configuracin; invocando desde modo texto, en el mismo directorio
  mencionado anteriormente

       make menuconfig

  Iniciar un colorido programa (escrito con lxdialog) muy agradable y
  bastante ms funcional que el make config a secas, para llevar a cabo
  la configuracin del kernel.

  Observar que su uso es bastante intuitivo; las opciones con un < >
  indican la posibilidad de modularizar; si en ella presionamos M la
  seleccionaremos como mdulo. Si presionamos ESPACIO aparecer un *
  indicando que ser incluido en el kernel. Finalmente, si presionamos N
  lo deseleccionaremos.

  Las opciones marcadas con [ ] no son modularizables.

  Si Vd. es un fan de las X, entonces puede arrancar desde un xterm el
  script equivalente, ejecutando

       make xconfig

  Aparecer ante sus ojos un maravilloso y grfico programa de seleccin
  y configuracin del kernel bajo X Window ;-).

  Aqu seguro que sabr manejarse a golpe de ratn sin problema alguno;
  las opciones modularizables tendrn tres casillas posibles a rellenar:
  y indica que se incluir en la parte monoltica del kernel; m que lo
  har como mdulo, y n que no ser seleccionado.

  3.4.  Continuacin

  Ahora  (-- Lo que sigue est dirigido a los usuarios (masoquistas?
  del make config, si emplea make menuconfig o make xconfig encontrar
  mucho ms intuitiva la configuracin, si bien debe leer a continuacin
  qu significan las opciones.--) se trata de contestar las preguntas,
  normalmente con s (`y')  o no (`n'). Los manejadores de dispositivos
  incorporan, adems, la opcin de mdulo (`m'), opcin interesante
  puesto que no incorpora el manejador al ncleo en tiempo de
  compilacin, sino que se hace durante la ejecucin del mismo, cuando
  sea necesario (por ejemplo, cargar el mdulo PPP solo cuando vayamos a
  usar el mdem).

  Algunas otras opciones obvias o poco importantes no son descritas
  aqu.  Vea la seccin ``'' para descripciones de otras muchas.

  Adems, cuando configure el ncleo 2.0.x, podr poner la opcin `?',
  lo que le dar una breve descripcin de la misma.

  3.4.1.  Emulacin de coprocesador ( Kernel math emulation )

  Si no tiene coprocesador matemtico (o un 486), debe contestar `y' a
  esto.  Si tiene coprocesador y contesta `y' la emulacin ser
  instalada pero no usada; funcionar, pero le ocupar memoria
  innecesariamente. Adems, he odo que la emulacin es lenta, lo que se
  traducir en unas pesadas X-Window.

  3.4.2.  and IDE disk/cdrom support ) Soporte de discos IDE y MFM/RLL
  normales ( Normal (MFM/RLL) disk

  Normalmente necesitar este soporte, pues es el de los discos
  habituales en los PCs. Este manejador no gestiona discos SCSI, para
  eso est la opcin especfica que luego veremos.

  Ahora se le preguntar si quiere usar ``old disk-only'' y manejadores
  ``new IDE''. Tiene que elegir uno de ellos. La diferencia principal es
  que el nuevo (new IDE) maneja controladoras secundarias y CD-ROMs
  IDE/ATAPI, hasta cuatro dispositivos, pero ocupa 4 KB ms que el
  antiguo. Se supone que los nuevos manejadores mejoran tambin
  velocidad y fiabilidad, en especial si dispone de dispositivos EIDE.

  3.4.3.  Soporte de redes ( Networking support )

  En principio, contestara afirmativamente si la mquina estuviera en
  una red local o conectada a la Internet con SLIP/PPP. Sin embargo,
  muchos programas, como ocurre con el sistema X Window, requieren el
  soporte de red, as que lo mejor es contestar `y' siempre. Despus se
  le preguntar si quiere soporte TCP/IP: conteste afirmativamente aun
  no estando seguro.

  3.4.4.  Limitar memoria a 16 Mb ( Limit memory to low 16MB )

  Hay controladores de DMA en 386 con problemas para direccionar ms de
  16 MB de RAM. Contestar `y' en el caso (raro) de que tenga uno de
  stos.

  3.4.5.  Comunicacin entre procesos System V  ( System V IPC )

  Una de las mejores definiciones del IPC est en el glosario del libro
  del Perl. Curiosamente, los programadores de Perl suelen usar IPC para
  comunicar sus procesos, as como muchas otras aplicaciones (como DOOM,
  sobre todo), por lo que no es buena idea contestar `n' si no se est
  seguro de lo que hace.

  3.4.6.  486, Pentium, PPro ) ) Tipo de CPU (386, 486, Pentium, PPro) (
  Processor type (386,

  Nota: En anteriores ncleos, la opcin era "Usar el parmetro -m486 en
  el compilador" (Use -m486 flag for 486-specific optimizations)

  Tradicionalmente, esto era una optimizacin compatible con todos los
  chips, aunque ms rpido en la CPU elegida (y en todo caso, ocupaba
  algo ms). Actualmente, esto puede no ser cierto, con lo que deber
  elegir siempre la CPU que tenga (aunque la versin de 386 funcionar
  en todas las mquinas).

  3.4.7.  Soporte SCSI ( SCSI support )

  Si tiene dispositivos SCSI, conteste `y'. Se le preguntarn entonces
  ms cosas: soporte de CD-ROM, discos y qu clase de adaptador utiliza.
  Vea el documento SCSI-HOWTO para ms detalle.

  3.4.8.  Soportes de tarjetas de red ( Network device support )

  Si tiene tarjeta de red, o quiere usar PPP, SLIP o PLIP (puerto
  paralelo usado para conectarse a Internet), conteste afirmativamente.
  El script le preguntar ahora qu tarjeta tiene y qu protocolo usar.

  3.4.9.  Sistemas de ficheros ( Filesystems )

  El programa le preguntar si quiere soporte para los siguientes
  sistemas de ficheros:

  Standard (minix) - Las nuevas distribuciones no crean sistemas Minix,
  y mucha gente no las usa para nada, pero puede convenir elegirla.
  Algunos ``discos de rescate'' usan el sistema Minix como formato de
  sus disquetes, ya que da menos problemas.

  Extended fs - Fue la primera versin del sistema extendido, pero ya no
  se usa. No necesita seleccionarla.

  Second extended - Este es el sistema ms usado. Seguramente lo usar
  Vd. tambin. Seleccione `y'. (-- Ojo con seleccionarlo como mdulo;
  aunque se puede, el sistema de ficheros en el que est su particin /
  debe estar incluido el el kernel no-modularmente, ya que de lo
  contrario no podr arrancar.--)

  xiafs filesystem - Hace mucho pudo ser usado, pero ahora mismo no
  conocemos a nadie que lo utilice.

  msdos - Seleccinelo si quiere acceder desde Linux a sus particiones
  de MS-DOS o quiere montar disquetes de ese sistema.

  umsdos - Este sistema permite aadir a un sistema MS-DOS las
  caractersticas tpicas de Unix como nombres largos o enlaces. Sirve
  para quienes quieran instalar Linux en la particin DOS, pero nada
  ms.

  /proc - Uno de los grandes inventos desde la leche condensada.  (una
  idea robada descaradamente a Bell Labs, si no me equivoco) No se trata
  de algo que se guarde en el disco, sino de una interfaz por medio de
  ficheros con la tabla de procesos del ncleo, usada por programas como
  `ps'. Pruebe a teclear `cat /proc/meminfo' o `cat /proc/devices'.
  Algunos shells (rc, concretamente) hacen uso de /proc/self/fd (en
  lugar de /dev/fd) para E/S. Debe contestar afirmativamente a la
  pregunta: muchas utilidades de Linux lo necesitan.

  NFS - Si su mquina est en red y quiere acceder a sistemas de
  ficheros remotos con NFS, conteste `y' a esta pregunta.

  ISO9660 - Tpico en los CD-ROMs. Si tiene un CD-ROM, seleccione esta
  opcin.

  OS/2 HPFS - En el momento de escribir esto, el soporte HPFS es de slo
  lectura. (-- Y por lo que se ``oye'', as se quedar...--)

  System V and Coherent - para particiones de sistemas Coherent y System
  V (otras variantes de Unix para PC).

  Adiciones desde la edicin del Howto original (Rev. 2.1):

  quota support - Seleccinelo si quiere administrar el espacio que
  consumen en disco los usuarios del sistema; necesitar adems las
  utilidades quotas-1.55, disponibles en:

  ftp://ftp.funet.fi/pub/Linux/kernel/src/subsystems/quota/all.tar.gz

  Tenga en cuenta que este tipo de control restrictivo slo funcionar
  sobre sistemas de ficheros ext2.

  mandatory lock support: Cambia el algoritmo para proporcionar un
  sistema de bloqueos ms seguro, a fin de evitar la corrupcin de
  ficheros por parte de las aplicaciones en los accesos a disco
  simultneo. Esto puede interesar probable y nicamente cuando se usen
  grandes bases de datos o dedique su sistema Linux a servidor de
  ficheros. Tenga en cuenta que deber tener servidores (samba, mars-
  nwe, etc...) que soporten esta nueva caracterstica.

  vfat. En conjuncin con el sistema de fichero fat o msdos nos
  permitir acceso a las particiones de w95, con soporte de nombres
  ``largos'' y dems. En el momento de escribir esto, se desconoce si
  soportar la ``nueva'' fat32 del recin aparecido w95-OSR2.

  SMB filesystem support: En conjuncin con el paquete samba (--  Cuyo
  COMO est disponible en castellano, mire en la seccin ``'' para ms
  informacin.--) nos permitir montar volmenes compartidos por
  clientes de red NetBios.

  SMB w95 bug workaround - :-) qu decir... corrije un bug que
  experimentan los volmenes exportados por servidores w95.

  Amiga FFS support - Soporte para el sistema de ficheros Fast File
  System de Amiga.

  UFS filesystem support - Soporte para el Unix FileSystem, empleado por
  algunos *nixes BSD, como SunOS, FreeBSD, NetBSD, NeXTstep.  Permite
  montar dichas particiones o disquetes en modo de slo lectura.

  Esta opcin contiene otras dos opciones adicionales relacionadas con
  las tablas de particin de los discos segn provengan de uno u otro
  *nix.  Escoja el men en lnea help para mayor informacin.

  NCP filesystem support - Permite montar volmenes NetWare.  Necesitar
  programas cliente para llevarlo a cabo, no obstante.
  root filesystem on NFS - necesario para estaciones de trabajo sin
  disco duro, que arranquen por red y monten todo su sistema de ficheros
  por NFS.

  BOOTP support - Si su caso es el anterior, y arranca por red, este
  protocolo le permitir obtener su IP dinmicamente, usando el
  protocolo BOOTP. (Siempre que su tarjeta de red incorpore una ROM que
  lo permita).

  RARP support - Idem de lo anterior, en este caso usando el protocolo
  RARP.

  Sys V and Coherent filesystem support permitir montar particiones de
  otros *nixes System V, como SCO Unix, Xenix y Coherent. Lea la ayuda
  asociada.

  Actualmente, hay un mdulo no oficial que permite acceso a sistemas de
  ficheros NTFS, usados por wNT, su autor es Martin von Lwis,
  loewis@informatik.hu-berlin.de. Su nivel de soporte es ciertamente
  rudimentario todava, pero siempre es bueno saberlo...

  ms informacin en http://www.informatik.hu-berlin.de:80/~loewis/ntfs

  3.4.9.1.  Pero no s qu sistemas de ficheros necesito!

  De acuerdo, teclee `mount'. La salida ser como esta:

        blah# mount
        /dev/hda1 on / type ext2 (defaults)
        /dev/hda3 on /usr type ext2 (defaults)
        none on /proc type proc (defaults)
        /dev/fd0 on /mnt type msdos (defaults)

  Observe cada lnea; la palabra que sigue a `type' es el tipo de
  sistema usado. En este ejemplo, los sistemas raz (/) y /usr usan el
  sistema ``second extended'', adems usamos sistema ``proc'' y hay
  montado un disquete MS-DOS.

  Para saber qu sistemas de ficheros usa en el ncleo actual puede
  teclear `cat /proc/filesystems' siempre y cuando tenga al menos
  soporte proc.

  Otros sistemas de ficheros ms raramente usados ocupan tambin mucho.
  Quizs le interese meterlos como mdulos (vea la correspondiente
  seccin, y vea tambin la seccin ``'' para saber por qu no se
  recomiendan ncleos que ocupen mucho).

  3.4.10.  Manejadores de tipo carcter ( Character devices )

  Aqu se activan los manejadores para impresoras (por puerto paralelo),
  ratones de bus, ratones PS/2 (usado tambin en muchos trackballs de
  los porttiles), algunos manejadores de cintas y otros.  Conteste
  segn su hardware.

  Nota: ``Selection'' es un programa que le permite usar el ratn para
  cortar y pegar texto entre consolas virtuales, fuera de las X-Window.
  Actualmente no es una opcin de configuracin, sino un estndar.

  Nota 2: `Selection' est bastante obsoleto. Es mucho mejor el programa
  ``gpm'' (-- General Purpose Mouse support, Soporte Genrico para
  Ratones--) puesto que hace cosas como manejar diversos protocolos de
  ratones, etc.

  3.4.11.  Tarjeta de sonido ( Sound card )

  Si siente gran necesidad de or el ladrido del `biff', conteste `y' y
  despus otro programa de configuracin le preguntar acerca de la
  tarjeta de sonido que tiene. Una observacin: cuando le pregunte si
  quiere instalar la versin completa del manejador, conteste `n' y
  ahorrar memoria, aunque tendr que elegir qu caractersticas desea
  incluir. Le recomiendo aqu que lea el Sonido-Como (-- Disponible en
  castellano, obviamente--)

  donde encontrar mucha ms informacin.

  3.4.12.  Otras opciones de configuracin

  No todas las opciones se han listado ya que cambian mucho y otras son
  completamente evidentes (por ejemplo, el soporte 3Com 3C509). Hay una
  lista ms extensa en el siguiente URL de Axel Boldt, axel@uni-
  paderborn.de:

  http://math-www.uni-paderborn.de/~axel/config_help.html

  o por FTP annimo en:

  ftp://sunsite.unc.edu/pub/Linux/kernel/config/krnl_cnfg_hlp.x.yz.tgz

  donde x.yz se refiere a la versin del ncleo.  En las ltimas
  versiones (2.0.x) se incluyen estos documentos entre los ficheros de
  las fuentes del ncleo (directorio Documentation/...).

  3.4.13.  Kernel hacking

  Traduccin del fichero README de Linus:

  La configuracin ``kernel hacking'' suele dar lugar a un ncleo ms
  grande y/o lento, y puede hacerlo menos estable al configurar algunas
  rutinas especiales para encontrar errores del ncleo (kmalloc()).
  Para un ncleo de ``produccin'' deber contestar `n' a la pregunta.

  3.5.  Y ahora qu? (El fichero Makefile ).

  Tras hacer make config, un mensaje le dir que ya est preparado el
  ncleo y que ``revise el fichero Makefile para opciones adicionales'',
  etc.

  Por tanto, veamos el Makefile. Probablemente no tendr que cambiar
  nada, pero debe mirarse. Sus opciones podrn cambiarse con el comando
  `rdev' una vez que el ncleo est compilado.

  4.  Compilacin del ncleo

  4.1.  Limpieza y dependencias

  Cuando se termina de configurar, se le instar a ejecutar `make dep' y
  `clean'. Haga `make dep', lo que preparar las dependencias en poco
  tiempo, a menos que su PC sea muy lento. Cuando acabe, haga `make
  clean'. Esto elimina ficheros objetos y dems de la versin anterior.
  No olvidar este paso.

  4.2.  El momento de compilar

  Despus de preparar dependencias, puede ejecutar `make zImage' o `make
  zdisk' (esta es la parte que tarda ms tiempo). `make zImage'
  compilar el ncleo y lo dejar comprimido en arch/i386/boot/zImage
  junto a otros ficheros. Con `make zdisk' el nuevo ncleo se copiar
  adems en el disquete que est puesto en la disquetera ``A:''.
  `zdisk' es interesante para probar ncleos; si explota (o simplemente
  no hace nada) se quita el disquete de la disquetera y podr arrancar
  el ncleo antiguo. Adems sirve para arrancar si borr accidentalmente
  el ncleo del disco duro. Tambin puede usarlo para instalar nuevos
  sistemas simplemente volcando el contenido de un disco en otro (``
  todo esto y ms !! Ahora, cunto pagara?'').

  Los ncleos recientes estn comprimidos, con una `z' comenzando su
  nombre. Un ncleo comprimido se descomprime automticamente al ser
  ejecutado.

  4.3.  Otras opciones del ` make '

  Con `make mrproper' har una limpieza mucho ms ``intensa''.  Suele
  hacer falta cuando se actualiza (parchea) el ncleo. Pero esta opcin
  borra tambin su fichero de configuracin del ncleo, as que guarde
  una copia del correspondiente fichero .config si cree que le interesa.

  La opcin `make oldconfig' intentar configurar el ncleo con un
  fichero de configuracin anterior (-- A partir del 2.0.xx no es
  necesario, make recuerda la ltima configuracin--)

  evitando todo el proceso del `make config'. Si no ha compilado
  anteriormente el ncleo o no tiene un fichero de configuracin
  anterior, no lo elija pues normalmente querr algo que se salga de la
  configuracin por defecto.

  Para compilacin con mdulos, vea la seccin correspondiente.

  4.4.  Instalacin del ncleo

  Una vez que tenga un nuevo ncleo que parezca funcionar como desea,
  ser el momento de instalarlo. Casi todo el mundo utiliza LILO (LInux
  LOader)  para esto. Con `make zlilo' se instalar el ncleo ejecutando
  LILO, quedando listo para rearrancar, pero esto solo funcionar si
  LILO est bien configurado para su sistema: el ncleo es /vmlinuz,
  LILO est en /sbin y la configuracin de LILO (/etc/lilo.conf) es
  coherente con lo anterior.

  En otro caso, necesitar usar LILO directamente. Hay un paquete que lo
  instala de manera adecuada, pero su fichero de configuracin tiende a
  confundir a la gente. Observe el fichero de configuracin (estar en
  /etc/lilo.conf o en /etc/lilo/config para versiones ms antiguas), y
  vea cul es la configuracin actual. El fichero de configuracin ser
  como ste:

       image = /vmlinuz
               label = Linux
               root = /dev/hda1
               ...

  La lnea `image =' apunta al ncleo instalado actualmente. Casi
  siempre es /vmlinuz. `label' es el identificador usado para
  seleccionar qu sistema arrancar, y `root' es el disco o particin a
  usar para el directorio raz. Haga una copia de seguridad de su
  antiguo ncleo y copie en /vmlinuz o donde diga el fichero anterior el
  fichero zImage que haya generado el proceso de compilacin.  Ahora,
  ejecute LILO (en sistemas modernos, ser simplemente teclear `lilo'.
  En sistemas antiguos, habr que poner `/etc/lilo/install' o
  `/etc/lilo/lilo -C /etc/lilo/config'.)

  Si quiere saber ms sobre la configuracin de LILO, o no tiene LILO,
  obtenga la versin ms reciente de su servidor FTP favorito y siga las
  instrucciones que le acompaan.

  Para arrancar uno de sus antiguos ncleos, copie las lneas anteriores
  incluyendo `image = xxx' al principio del fichero de configuracin de
  LILO, y cambie `image = xxx' por `image = yyy' donde `yyy' es el
  nombre de camino completo al fichero de la copia de seguridad
  guardada. Ahora, cambie `label = zzz' por `label = linux-backup' y
  reejecute LILO. Puede ser que necesite poner una lnea en el fichero
  con `delay=x' donde x son las centsimas de segundo que LILO esperar
  antes de arrancar con la primera opcin, de modo que pueda
  interrumpirse (con la tecla SHIFT) y seleccionarse qu ncleo desea
  arrancar (tecleando la etiqueta (label) asignada).

  Inciso de la revisin 2.1

  Una forma muy cmoda de llevar todo el tema del LILO, si lo tenemos
  instalado, y las compilaciones, etc, es aadir lo siguiente en el
  /etc/lilo.conf:

       image=/vmlinuz
               label=ultimo
               root=/dev/hd[loquesea]
               read-only
               append = ""
       image=/vmlinuz.old
               label=anterior
               root=/dev/hd[loquesea]
               read-only
               append = ""

  Al compilar, si lo hacemos con la secuencia de comandos

       # make dep; make clean; make zlilo; make modules; make modules_install

  el make zlilo renombrar la anterior imagen del kernel a /vmlinuz.old
  , dejando la nueva como /vmlinuz, e instalar LILO, a continuacin con
  lo cual lo hacemos todo automgicamente.

  La rdenes make modules; make modules_install compilarn los mdulos
  que hayamos seleccionado, y los instalarn. No olvidar ejecutar depmod
  -a en cuanto hayamos arrancado con dicho ncleo.

  En caso de que estemos compilando por segunda vez una misma versin de
  ncleo, y hayamos variado el nmero de mdulos a compilar, es posible
  que la ejecutar make dep nos encontremos con un mensaje de error; esto
  se debe a que los antiguos mdulos que no hayamos compilado ahora no
  son borrados. Pueden borrarse tranquilamente.

  5.  Parchear el ncleo

  5.1.  Aplicacin de un parche

  Las actualizaciones incrementales del ncleo se distribuyen como
  parches (-- No tomar con sentido peyorativo el trmino ``parche'', no
  se trata de un ``remiendo'', o ``chapuza'', lo que hacemos al
  ``parchear'' es modificar directamente los fuentes del ncleo,
  incluyendo las variaciones que se hayan introducido.ver el comando
  diff y patch para ms referencias.--) Por ejemplo, si tiene la versin
  1.1.45 y ve que existe un parche `patch46.gz', con ese fichero podr
  actualizarse a la 1.1.46.  Debera antes de nada guardar una copia del
  rbol de directorios de las fuentes del ncleo actual (haciendo `make
  clean', luego `tar cvfz antiguas-fuentes.tar.gz linux' desde el
  directorio /usr/src).

  Ahora, supongamos que tiene `patch46.gz' en /usr/src. Vaya a ese
  directorio y escriba

       zcat patch46.gz | patch -p0

  (o bien

       patch -p0 < patch46

  si ya estaba descomprimido). Ver rpida (o lentamente, depende del
  ordenador) una serie de mensajes que le dicen que se intentan aplicar
  los cambios, cules tienen xito y cules no.  Normalmente, esto ir
  bien y no habr que preocuparse de tanto mensaje, aunque con la opcin
  -s solo saldrn los mensajes de error.

  Inciso de la revisin 2.1:

  No es infrecuente que haya que borrar el rbol de los fuentes entero y
  reinstalarlos de nuevo; muchas veces, se tiene un .tar.gz con los
  fuentes ms un montn de parches; para evitarse el tener que parchear
  uno a uno, puede invocar lo siguiente desde la lnea de comandos:
  (asumo que tratamos de parchear p. ej. con parches a partir del 2.0.20
  hasta el 2.0.27, usamos bash y estamos en /usr/src, teclee pwd para
  cerciorarse).

       # for i in patch-2.0.2[1234567].gz; do
       >zcat $i | patch -p0
       >done

  Investigue por su cuenta, ver qu potencia hay en la lnea de
  comandos *nix...

  fin del inciso

  Para ver qu partes no se han modificado correctamente, busque los
  ficheros .rej en el directorio de las fuentes. Si se usan algunas
  versiones de patch (antiguas, sobre todo) esos ficheros tendrn
  extensin `#'. Con el comando find encontrar fcilmente los ficheros:

       find . -name '*.rej' -print

  imprime todos los ficheros .rej que estn en el directorio actual o
  subdirectorios.

  Si todo ha ido bien, haga `make clean', `config' y `dep' como se
  describi en las secciones ``'' y ``''.

  Hay algunas opciones ms en el comando patch. Con -s, como hemos
  dicho, se suprimen todos los mensajes salvo los errores. Si guarda las
  fuentes del ncleo en otro lugar que no sea /usr/src/linux, con patch
  -p1 se parchearn las cosas limpiamente. Otras opciones de inters se
  encuentran bien documentadas en las pginas man.

  5.2.  Si algo va mal

  El problema ms comn es que una ejecucin de patch intente modificar
  el fichero `config.in' y no parezca quedar bien, porque haya hecho
  cambios en l de acuerdo con su mquina. Este problema sucede con
  versiones antiguas. Para corregirlo, busque el fichero config.in.rej,
  y vea qu tiene el parche originado. Los cambios suelen ir marcados
  con `+' o `-' al principio de las lneas.  Edtelo, recordando si las
  opciones estaban puestas a Y o a N, y ejecute

       patch -p0 < config.in.rej

  y si no tiene fallos, puede continuar con el resto del proceso. El
  fichero config.in.rej permanecer, aunque puede borrarlo.

  Si encuentra otros problemas, puede que haya aplicado un parche fuera
  de orden. Si el programa patch responde con

       previously applied patch detected: Assume -R?

  probablemente estar intentando aplicar un parche anterior a su
  versin actual. Si responde `y', intentar degradar sus fuentes, y
  normalmente fallar, obligndole a preparar un nuevo rbol de fuentes.

  Para anular el efecto de un parche, use `patch -R' con el parche
  original.

  Lo mejor ante un problema es reinstalar un rbol de fuentes limpio y
  empezar de nuevo.

  5.3.  Limpieza de ficheros .orig

  Despus de algunos parches, los ficheros .orig empezarn a abultar
  mucho. Por ejemplo, si estamos ya con el ncleo 1.1.51 y empezamos con
  el 1.1.48, borrar los .orig nos ahorrara medio megabyte. Con

  find .-name '*.orig' -exec rm -f {} ';'

  se automatizar esa limpieza. En versiones que usen el # en lugar de
  .rej, sustituya el .orig por un `~'.

  Una forma mejor de hacer esto es usar xargs de GNU:

  find .-name '*.orig' | xargs rm

  o el mtodo ``ms seguro pero ms pesado'':

  find . -name '*.orig' -print0 | xargs --null rm --

  5.4.  Otros parches

  Hay otros parches (los llamaremos ``no estndares'') que si se
  aplican, probablemente provocarn que los parches de Linus no
  funcionen correctamente, teniendo que retroceder, corregir las fuentes
  o el parche, instalar de nuevo las fuentes, o una combinacin de lo
  anterior.

  inciso de la R. 2.1: Existe una pgina con informacin centralizada
  sobre este tipo de parches en:

  http://www.ecsnet.com/html/linux_21_upatch.html

  Este es un buen sitio para buscar si necesita soporte para algn
  dispositivo esotrico o implementacin reciente. Tenga en cuenta, no
  obstante, que la mayora sern para el kernel actual de desarrollo,
  aunque puedan aplicarse algunos ( eiste otra pgina en la misma
  localizacin citada anteriormente) en el kernel de produccin.

  fin del inciso

  Por ejemplo, el autor utilizaba el parche `noblink' que anula el
  parpadeo del cursor en las consolas virtuales. Este parche se
  actualiza (o actualizaba) frecuentemente para los nuevos ncleos. Como
  ahora muchos manejadores se pueden cargar como mdulos, los parches ya
  son menos necesarios.

  6.  Paquetes adicionales

  El ncleo de Linux tiene ms caractersticas no documentadas en el
  cdigo; stas se utilizan normalmente va parches no estndares.
  Algunas caractersticas se listan a continuacin.

  6.1.  kbd

  La consola de Linux tiene ms prestaciones que las conocidas, como
  cambiar las fuentes, cambiar el modo de vdeo, etc. El paquete kbd
  tiene programas que permiten al usuario hacer esto, junto con nuevas
  fuentes de texto y mapas de teclado, y se encuentra disponible en los
  mismos sitios donde estn las fuentes del ncleo.

  6.2.  util-linux

  Rik Faith, faith@cs.unc.edu recopil una gran coleccin de utilidades
  de Linux conocidas como `util-linux', que ahora mantiene Nicolai
  Langfeldt, util-linux@math.uio.no. Se encuentran en
  ftp://sunsite.unc.edu/pub/Linux/system/Misc, con programas como
  setterm, rdev y ctrlaltdel, importantes para el ncleo. Como dice Rik,
  no lo instale sin pensarlo, instalarlo todo sin necesidad puede
  causarle despus algunos problemas.

  6.3.  hdparm

  Son programas hechos con el ncleo oficial, para optimizar y jugar con
  con los parmetros del disco duro, distribuyndose por separado.

  7.  Problemas tpicos

  7.1.  make clean

  Si su nuevo ncleo hace cosas raras, puede ser que se le olvidara
  hacer `make clean' antes de compilar. Los sntomas suelen ser extraos
  cuelgues, problemas de E/S... asegrese tambin de hacer `make dep'.

  7.2.  Ncleos muy lentos o muy grandes

  Si su ncleo consume mucha memoria, o la compilacin se hace eterna
  incluso con su nuevo 786DX6/440, probablemente se deber a haber
  elegido demasiados manejadores, sistemas de ficheros, etc. a soportar
  en el sistema. Si no los va a usar, no los incluya, puesto que
  consumen memoria.  Lo tpico en estos casos es que se recurre
  demasiado al intercambio con el disco, lo que se aprecia en un ruido
  `excesivo' del disco duro.

  Puede ver cunta memoria ocupa su ncleo comparando los valores
  obtenidos al ver el fichero /proc/meminfo, o con el comando dmesg o el
  log de los mensajes del ncleo, donde ver algo parecido a esto:

       Memory: 15124k/16384k available (552k kernel code, 384k reserved, 324k data)

  En mi 386 (con pocos drivers configurados) sale:

       Memory: 7000k/8192k available (496k kernel code, 384k reserved, 312k data)

  7.3.  El ncleo no compila

  Si no compila, puede ser por un fallo de parcheo, u otro tipo de
  corrupcin en los ficheros fuente. Adems, la versin de gcc puede no
  ser correcta o los propios ficheros de #include. Asegrese que los
  enlaces simblicos necesarios (descritos en el fichero README de
  Linus) existen. En general, cuando un ncleo estndar no se puede
  compilar, es porque hay algn problema serio en el sistema, y ser
  necesario reinstalar algunos programas.

  Tambin puede suceder que le den errores compilando el ncleo 1.2.x
  con un gcc ELF (2.6.3 o superior). Se puede intentan arreglar
  aadiendo las siguientes lneas al fichero arch/i386/Makefile:

       AS=/usr/i486-linuxaout/bin/as
       LD=/usr/i486-linuxaout/bin/ld -m i386linux
       CC=gcc -b i486-linuxaout -D__KERNEL__ -I$(TOPDIR)/include

  Ahora, haga `make dep' y `make zimage' de nuevo.

  En algunos casos muy raros el gcc romper con un mensaje similar a
  ``xxx exited with signal 15''. En este caso la solucin puede estar en
  desactivar la cach de segundo nivel, pensar en un fallo hardware de
  la memoria... o reinstalar de nuevo el gcc.

  7.4.  El nuevo ncleo no parece arrancar

  No se ejecut LILO, o no est bien configurado. A veces, se ponen
  errores como `boot = /dev/hda1' en lugar de `boot = /dev/hda'.

  7.5.  Se olvid ejecutar LILO , y el sistema ya no arranca

  Vaya problema! Lo mejor que puede hacerse ahora es arrancar con un
  disquete y preparar otro disquete para arrancar Linux (con `make
  zdisk' se hizo uno). Necesita saber qu sistema de ficheros raz (/)
  tiene, dnde est y su tipo (por ejemplo, ext2 o minix). En este
  ejemplo, tambin hay que saber dnde estn los ficheros de /usr, en
  otra particin.

  En el siguiente ejemplo, / es /dev/hda1, y el sistema con las fuentes
  del ncleo es /dev/hda3, montado como /usr normalmente. Ambos son
  sistemas ext2. La imagen compilada estar en el sistema de las
  fuentes.

  La idea es que si hay un fichero zImage correcto, puede salvarse en un
  disquete. Otra posibilidad (que funcionar mejor o peor, segn el
  caso) se ver en otro ejemplo.

  En primer lugar, arranque con un disquete de instalacin o de rescate,
  y monte el sistema de ficheros que contenga el ncleo a usar:

        mkdir /mnt
        mount -t ext2 /dev/hda3 /mnt

  Si mkdir le dice que el directorio ya existe, no hay problema.  Ahora,
  pase al directorio donde est el ncleo compilado. Vea que

       /mnt + /usr/src/linux/arch/i386/boot - /usr = /mnt/src/linux/arch/i386/boot

  Ponga un disco con formato en la unidad ``A:'' (que no sea el disquete
  con el que ha arrancado) y copie el ncleo a l:

        cd /mnt/src/linux/arch/i386/boot
        dd if=zImage of=/dev/fd0
        rdev /dev/fd0 /dev/hda1

  vaya a / y desmonte el sistema de ficheros:

        cd /
        umount /mnt

  Ahora puede rearrancar el sistema desde el disquete. No olvide
  ejecutar LILO!

  Como se ha dicho, hay otra alternativa. Si el ncleo est en el
  directorio raz (por ejemplo /vmlinuz), puede usarlo para un disquete
  de arranque. Suponiendo las condiciones anteriores, haramos los
  cambios siguientes en el ejemplo anterior: /dev/hda3 por /dev/hda1 (el
  sistema raz), /mnt/src/linux por /mnt, y `if=zImage' por
  `if=vmlinuz'. El resto puede ignorarse.

  Usar LILO con discos grandes (de ms de 1024 cilindros) puede dar
  problemas. Le recomendamos que lea el mini-HOWTO sobre LILO para ms
  informacin. (-- As como el Discos-Grandes-mini-Como, disponible en
  castellano, ver seccin ``''.--)

  7.6.  Mensaje de aviso: ` warning: bdflush not running '

  Es un problema muy importante. Desde la versin 1.0 del ncleo (20 de
  Abril de 1994), hay un programa, `update' que, peridicamente, vuelca
  al disco la cach de buffers del sistema. Obtenga las fuentes de
  `bdflush' (est donde se distribuyen las fuentes del ncleo) e
  instlelas (quizs deba usar mientras lo hace el ncleo antiguo).
  Despus del rearranque, se instalar en memoria como `update' y ya no
  habr ms avisos.

  7.7.  Salen mensajes sobre smbolos no definidos, y no compila

  Esto ser probablemente porque tenga un compilador ELF (gcc 2.6.3 y
  posteriores) y las fuentes 1.2.x o anteriores. Habitualmente esto se
  corrige aadiendo las siguientes lneas al archivo arch/i386/Makefile:

       AS=/usr/i486-linuxaout/bin/as
       LD=/usr/i486-linuxaout/bin/ld -m i386linux
       CC=gcc -b i486-linuxaout -D__KERNEL__ -I$(TOPDIR)/include

  Esto permitir compilar el ncleo 1.2.x con libreras a.out.

  7.8.  No consigo que me detecte mi CD-ROM IDE/ATAPI

  Mucha gente tiene este problema, siendo las causas muy diversas.

  El error ms comn es tener el dispositivo en una interfaz IDE sin
  compaa de otro disco, para lo que debe ser configurado como
  ``maestro'' (master) o ``nico'' (single), nunca como ``esclavo''
  (slave).

  Creative Labs est poniendo interfaces IDE en sus tarjetas de sonido.
  Sin embargo, esto es un problema cuando se tienen ya dos interfaces
  IDE en la placa, en la IRQ 15. Entonces se suele configurar el IDE de
  la tarjeta de sonido en la IRQ 11, y los ncleos 1.2.x no saben
  manejar esto (tener, en la prctica, tres IDE).

  En las versiones 1.3.x se empieza a intentar soportar esto, pero est
  en desarrollo y en todo caso no incluye autodeteccin. Para
  utilizarlo, pues, deber hacer algunas cosas.
  Si no tiene segunda IDE en placa, cambie los ``jumpers'' de la tarjeta
  de sonido referentes a la interfaz IDE para que ocupen la IRQ 15
  (segunda interfaz). Esto debera funcionar.

  Si por el contrario hay en total tres interfaces, obtenga un ncleo
  1.3.x (por ejemplo, el 1.3.57 lo incluye) y lea el documento
  drivers/block/README.ide, donde encontrar ms informacin.

  7.9.  Salen mensajes sobre cosas de encaminamiento obsoletas

  Consiga nuevas versiones de los programas `route' y otros que
  manipulan tablas de encaminamiento. El fichero
  /usr/include/linux/route.h tiene cambios al respecto.

  7.10.  La funcin de cortafuegos no funciona en el ncleo 1.2.0

  Actualcese al menos a la 1.2.1.

  7.11.  Mensaje: `` Not a compressed kernel Image file ''

  No utilice el fichero vmlinux creado en /usr/src/linux para arrancar,
  sino el mencionado zImage.

  7.12.  Hay problemas con la consola al pasarse a la 1.3.x

  Ponga `linux' en la entrada `console' del fichero /etc/termcap.
  Adems, deber hacer una entrada en terminfo.

  7.13.  Algunas cosas no compilan despus de la actualizacin

  El ncleo incluye ciertos ficheros #include (acaban en referencian con
  la lnea:

       #include <linux/xyzzy.h>

  Normalmente, hay un enlace simblico `linux' de
  /usr/include al directorio /usr/src/linux/include/linux.  Si no existe
  tal enlace, o apunta a un lugar incorrecto, muchas cosas compilarn
  mal. Por ejemplo, el problema es obvio si borr las fuentes del ncleo
  porque le ocupaban mucho. Otro problema puede tener relacin con los
  permisos de los ficheros, tal vez debido a un umask de la cuenta root
  que obligue a crear los ficheros ocultos a otros usuarios por defecto.
  Puede solucionar esto con el comando chmod, pero ser ms cmodo
  descomprimir las fuentes del ncleo aadiendo la opcin -p (preservar
  modo)  al comando tar:

       blah# tar zxvpf linux.x.y.z.tar.gz linux/include

  Nota: Con ``make config'' se crea el enlace /usr/src/linux si no
  existe.

  8.  Notas sobre la actualizacin a la versin 2.0.x

  La versin 2.0.x se instala de manera algo diferente a otras
  versiones, y requiere actualizar software auxiliar. El fichero
  Documentation/Changes de las fuentes contiene informacin muy
  importante sobre esto, como lo referente a los paquetes que debe
  actualizar (gcc, libc...).

  9.  Mdulos

  Los mdulos del ncleo cargables le permitirn simplificar la
  configuracin del ncleo y ahorrar memoria. Sirven para aadir
  dinmicamente nuevos soportes de sistemas de ficheros o manejadores, a
  un ncleo que ya est corriendo.

  9.1.  Instalacin de las utilidades asociadas

  Estas utilidades estn disponibles all donde est el ncleo, como
  modules-x.y.z.tar.gz. Elija el que corresponda a su ncleo.
  Descomprmalo con `tar zxvf modules-x.y.z.tar.gz', cambie al
  directorio que crea (modules-x.y.z), lase el fichero README, y siga
  las instrucciones de instalacin (normalmente, tan simple como `make
  install'). Con ello tendr las utilidades insmod, rmmod, ksyms, lsmod,
  genksyms, modprobe y depmod en /sbin.  Si lo desea, puede probar el
  manejador ejemplo ``hw'' con insmod; lea el fichero INSTALL para ms
  detalle.

  insmod inserta un mdulo en el ncleo arrancado. Generalmente los
  mdulos son ficheros .o; el manejador ejemplo es drv_hello.o, con lo
  que para insertarlo se usara `insmod drv_hello.o'. Para ver los
  mdulos cargados, pruebe lsmod. La salida ser como sta:

        blah# lsmod
        Module:#pages:Used by:
        drv_hello1

  `drv_hello' es el nombre del mdulo, que usa una pgina (4k) de
  memoria, y no hay mdulos que dependan de l en este momento. Para
  quitar el mdulo, teclee `rmmod drv_hello'. Vea que rmmod necesita el
  nombre del mdulo, no del fichero. Ese nombre lo obtiene al listar los
  mdulos instalados. Las otras utilidades de mdulos se encuentran
  documentadas en los manuales on-line.

  Inciso de la revisin 2.1

  Tres cosas relativas a mdulos:

    Siempre que compile un kernel nuevo, y sus correspondientes mdulos
     (con make modules; make modules_install tras los make dep; make
     clean; make zImage (-- O make zlilo, si usa LILO como gestor de
     arranque.--)
      lo primero que ha de hacer al arrancar con el mismo, para computar
     las dependencias entre mdulos, es invocar el comando

       depmod -a

    Desde la aparicin de kerneld, el andar insertando y retirando
     mdulos de memoria a mano no se estila mucho, en su lugar es
     kerneld quien se encarga de esto. Para hacer uso de l, asegrese
     de responder s al soporte kerneld durante la configuracin del
     ncleo, y llmelo desde los scripts de inicializacin del sistema,
     que estn tpicamente en /etc/rc.d/rc.x.

     Sigue pudiendo cargar mdulos a voluntad; el comando recomendado es
     modprobe modulo, que tendr en cuenta las dependencias entre
     mdulos, cargando todos los necesarios (como por ejemplo el mdulo
     slhc en el caso de que queramos cargar el mdulo ppp.)

     Atencin: El soporte de compresin CCP (bsd_comp) no est includo
     en esto debido a problemas de copyright, por lo que deberemos
     cargarlo a mano; o bien ejecutamos la orden modprobe bsd_comp
     cuando queramos cargar ppp, o bien lo insertamos despus de haber
     cargado ppp y slhc, con por ejemplo, modprobe ppp.

     Lea el fichero /usr/src/linux/Documentation/modules.txt, disponible
     en castellano en http://www.insflug.org/pub/online/modulos.txt para
     profundizar sobre este tema, as como sobre el tercero de los
     tems:

    /etc/modules.conf o /etc/conf.modules. Lea el anterior fichero
     (modulos.txt).

  9.2.  Mdulos distribuidos con el ncleo 1.2.2

  Algunos sistemas de ficheros, manejadores SCSI y de tarjetas de red,
  as como otras utilidades son cargables como mdulos. Para usarlos, lo
  primero, no incluirlos en el ncleo principal (al compilarlo, no decir
  que `s' al manejador correspondiente durante el `make config').
  Luego se arranca ese ncleo (-- Esto es obsoleto en el caso de los
  ncleos 2.0.x, recurdelo; con los 2.0.x puede compilarlo todo
  seguido, y arrancar posteriormente, ejecutar depmod -a y estar todo
  listo.  --) y se entra de nuevo en /usr/src/linux para hacer `make
  modules', lo que compilar mdulos para todas aquellas opciones que no
  se eligieron durante el `make config', y los dejar en
  /usr/src/linux/modules. Puede ahora ejecutar `make modules_install'
  que los instalar en /lib/modules/x.y.z siendo x.y.z la versin del
  ncleo.

  Esto es especialmente til con los sistemas de ficheros que, como
  minix o msdos, no se usan normalmente. As, cuando se quiera leer un
  disquete MSDOS, primero se cargara el mdulo con insmod (-- Mejor
  modprobe, que como hemos comentado, tendr en cuenta las dependencias
  entre mdulos que ha generado depmod -a, cargndolos todos.--) y se
  descargara al finalizar. Esto ahorrar unos 50K de memoria en la
  operacin normal del ncleo. Notar que el sistema Minix siempre deber
  estar dentro del ncleo (no como mdulo) si se quiere hacer un
  disquete de rescate con l.

  10.  Otras opciones de configuracin.

  Esta seccin contiene informacin sobre otras opciones de
  configuracin que se ofrecen durante `make config'.

  10.1.  Opciones generales

  Normal floppy disk support (soporte de floppy normal): es exactamente
  eso. Lea el fichero drivers/block/README.fd, es importante para
  usuarios de IBM Thinkpad.

  XT harddisk support (soporte de disco duro de XT): interesante si
  quiere usar una controladora XT de 8 bits.

  PCI bios support(soporte de Bios PCI): si tiene PCI, puede
  interesarle. Vaya con cuidado: algunas placas PCI antiguas pueden
  colgar al sistema con esta opcin. Ms informacin al respecto se
  encontrar en el documento PCI-HOWTO.

  Kernel support for ELF binaries (soporte para binarios ELF): ELF es un
  intento de uniformizar arquitecturas y sistemas operativos.  Linux
  tambin pretende conseguirlo (-- De hecho, es el estndar actual para
  todo el software en Linux. Podr seguir ejecutando sus (posiblemente
  obsoletos) antiguos binarios a.out, dotando al kernel, --modularmente,
  por ejemplo-- de soporte para los mismos.--) .

  Set version information on all symbols for modules (mantener
  informacin de versin en los smbolos de los mdulos): en el pasado,
  los mdulos se recompilaban con cada nuevo ncleo. Si responde
  afirmativamente, podr usar mdulos de otra versin. Para ms detalle,
  consulte el fichero README.modules.

  Enable loadable module support Responda que s a esto si pretende
  hacer uso de los mdulos cargables en tiempo de ejecucin.

  Kernel daemon support (e.g. autoload for modules)Esto es absolutamente
  necesario si pretende hacer uso de kerneld. En breve se dispondr de
  una versin en castellano del Kerneld Mini-HOWTO. Ver seccin ``''.

  10.2.  Opciones de red

  Se describen en el documento NET-2-HOWTO (o NET-algo-HOWTO).

  11.  Consejos y trucos

  11.1.  Redireccin de la salida de compilacin o parcheado.

  Si le interesa tener ``logs'' de lo que hagan los comandos `make' o
  `patch', puede hacerlo redirigiendo su salida a un fichero. Primero,
  debe saber qu shell est utilizando (con el comando `grep root
  /etc/passwd' puede saberlo, buscando en el resultado algo as como
  `/bin/csh' o `/bin/sh'). Una vez localizado, si utiliza sh o bash,
  puede redirigir la salida de un comando como `make' con:

       (comando) 2>&1 | tee (fich)

  La lnea anterior pondr la salida de `(comando)' en el fichero
  `(fich)'.

  Si se trata de csh o tcsh, teclee,

        (comando) |& tee (fich)

  Para rc (shell que raramente usar) se tecleara,

        (comando) >[2=1] | tee (fich)

  11.2.  Instalacin condicional del ncleo

  Hay ms mtodos para probar un nuevo ncleo que no sea usar un
  disquete. A diferencia de otros Unix, LILO puede arrancar cualquier
  fichero con el ncleo que se encuentre en el disco (-- As como montar
  particiones de disco distintas segn se le indique, con lo cual
  podemos tener varias instalaciones distintas y poder arrancar con una
  y otra, incluso compartiendo alguna de ellas.--) (siempre y cuando
  ste est por debajo de los 1024 cilindros, lea la documentacin de
  LILO para ms detalle).  Puede tener al final de /etc/lilo.conf una
  lnea parecida a sta:

   image = /usr/src/linux/arch/i386/zImage
   label = nuevo_nucleo

  lo que le permitir seleccionar en el arranque (habiendo ejecutado
  antes lilo para reconfigurar) el nuevo_nucleo en lugar del habitual
  que ser probablemente /vmlinuz. Para poder hacer esta seleccin hay
  que mantener pulsada la tecla SHIFT al arrancar, para que aparezca el
  prompt de LILO que le permita teclear la etiqueta (nuevo_nucleo u
  otra)  del ncleo elegido.

  Si desea tener varios fuentes de ncleos distintos en el disco
  (cuidado!, le puede suponer muchos megas), lo normal es tener cada
  versin x.y.z en el directorio /usr/src/linux-x.y.z y ``seleccionar''
  o activar cada ncleo sin ms que redefinir el enlace simblico
  /usr/src/linux apuntando al directorio que desee (por ejemplo, yo hice
  `ln -sf /usr/src/linux-1.2.3 /usr/src/linux' en su momento).
  Asegrese que /usr/src/linux no es ya un directorio, sino como mucho
  antiguos enlaces simblicos. De otro modo, el resultado del anterior
  comando no ser el esperado.

  11.3.  Actualizaciones del ncleo

  Russell Nelson, nelson@crynwr.com lleva una lista que resume los
  cambios en las nuevas versiones del ncleo. Son breves pero
  interesantes antes de decidirse por instalar una nueva versin. Se
  puede encontrar por FTP annimo en ftp://ftp.emlist.com/pub/kchanges o
  a travs del URL:

  http://www.crynwr.com/kchanges

  12.  Otros documentos COMO  que pueden serle tiles

    Sonido-Como (-- Aquellos cuyo nombre incluya la palabra ``Como''
     estn disponibles traducidos.--) : tarjetas de sonido y utilidades

    SCSI-HOWTO: todo sobre controladores y dispositivos SCSI

    NET-2-HOWTO: todo sobre redes

    PPP-Como: redes con PPP concretamente

    PCMCIA-HOWTO: acerca de manejadores para porttiles

    ELF-HOWTO: ELF: qu es, cmo migrar...

    Hardware-HOWTO: revisin del hardware soportado por Linux

  13.  Miscelnea

  13.1.  El autor

  El autor y encargado de mantener el original de este documento en
  Ingls es Brian Ward bri@blah.math.tu-graz.ac.at. Envenme cualquier
  comentario, aadidos o correcciones que considere oportunos. En
  particular, lo que ms me interesa son las correcciones. Si quiere
  agradecerme de alguna forma especial que haya escrito este documento,
  siempre podr enviarme ordenadores o CD-ROMs que no use, o simplemente
  una bonita postal de su zona...

  Puede ver mi pgina principal de WWW en los URLs:

  http://www.math.psu.edu/ward/

  http://blah.tu-graz.ac.at/~ward/

  Aunque intento atender en lo posible el correo, recuerde que sin
  embargo recibo muchos mensajes diarios, lo que har que pueda pasar
  tiempo antes de contestar su mensaje. Especialmente, si me enva
  alguna consulta, trate de ser lo ms claro y detallado posible en su
  mensaje. Por ejemplo, si se trata de hardware que no funcione, trate
  de explicarme con el mximo detalle la configuracin de que se trata.
  No se preocupe si hace preguntas simples, puesto que si no se la
  pregunta a nadie nunca tendra respuesta!. Agradecer tambin las
  sugerencias.

  Si me escribe y no obtiene respuesta en mucho tiempo (digamos, ms de
  tres semanas), puede que accidentalmente haya borrado su mensaje (lo
  siento, intntelo de nuevo).

  Recibo muchos mensajes sobre cosas que realmente son problemas de
  hardware. Est bien, pero tenga en cuenta que yo no conozco todo el
  hardware existente en el mundo y no siempre puedo ayudarle.
  Personalmente, uso mquinas con discos IDE y SCSI, CD-ROMs SCSI,
  tarjetas de red 3Com y WD, ratones serie, placas base con PCI,
  controladoras SCSI NCR 810, CPUs AMD 386DX40 con coprocesador Cyrix,
  procesadores AMD 5x86, 486DX4 y tambin de Intel (todo esto es una
  lista de lo que conozco, pero ciertamente no es una recomendacin para
  su equipo, aunque si quiere, puede preguntarme :-) ).

  La versin -0.1 se escribi el 3 de Octubre de 1994. Este documento
  est disponible en SGML, PostScript, TeX, roff y ASCII.

  Nota del traductor: Al igual que el autor original, me pongo a su
  disposicin para resolver problemas que estn en mi mano, y sobre
  todo, aceptar sugerencias sobre esta traduccin, perteneciente al
  proyecto LUCAS (LinUx en CAStellano) coordinado por Ramn Gutirrez.
  Actualmente, se han preparado versiones SGML, HTML y ASCII.

  Nota de la revisin 2.1: Ver la seccin ``''. Me sumo a las propuestas
  anteriores. A partir de esta revisin, este COMO est disponible en
  SGML, HTML, ASCII, PostScript, DVI, LyX, y cualquier otro formato
  soportado por linuxdoc-sgml. Le recomiendo encarecidamente que si
  piensa imprimirlo, lo haga con las versiones .dvi o .ps, la calidad no
  tiene color en comparacin con las otras versiones para imprimir. Y al
  fin y al cabo, me he tomado el trabajo de revisarlo precisamente por
  esto :-), asi como actualizarlo un poco.

  El traductor, Juan Jos Amor, jjamor@ls.fi.upm.es se encuentra
  disponible por correo electrnico y tambin en el WWW:

  http://lml.ls.fi.upm.es/~jjamor.

  13.2.  Pendiente de hacer

  La seccin ``'' es pequea. Espero poderla agrandar gracias a sus
  sugerencias.

  Lo mismo para la seccin ``''.

  Hay que aadir ms informacin acerca de recuperacin de cuelgues y
  errores.

  13.3.  Colaboraciones

  Se incluy una pequea parte del README de Linus (acerca de las
  opciones de ``kernel hacking''). (Gracias, Linus!).

  uc@brian.lunetix.de (Ulrich Callmeier): patch -s y xargs.

  quinlan@yggdrasil.com (Daniel Quinlan): muchas correcciones y
  aadidos.

  nat@nataa.frmug.fr.net (Nat Makarevitch): mrproper, tar -p.

  boldt@math.ucsb.edu (Axel Boldt): recopil descripciones de
  configuraciones del ncleo en la red, luego me envi la lista.

  lembark@wrkhors.psyber.com (Steve Lembark): sobre mltiples formas de
  arrancar.

  kbriggs@earwax.pd.uwa.edu.au (Keith Briggs): algunas correcciones y
  sugerencias.

  mailto:rmcguire@freenet.columbus.oh.us (Ryan McGuire): adiciones
  realizables.

  dumas@excalibur.ibp.fr (Eric Dumas): traduccin al Francs.

  simazaki@yu-gate.yamanashi.ac.jp (Yasutada Shimazaki): traduccin al
  Japons.

  jjamor@lml.ls.fi.upm.es (Juan Jos Amor Iglesias): traduccin al
  Castellano. ;-)

  donahue@tiber.nist.gov (Michael J Donahue): errores tipogrficos,
  ganador de la ``sliced bread (-- Proviene de la popular expresin
  anglosajona ``... it's the best thing since sliced bread'', algo as
  como (literalmente) ``... es lo mejor que se ha inventado desde las
  tostadas'', suele utilizarse para expresar ``... es lo mejor que haya
  parido mente humana''.--) competition''.

  rms@gnu.ai.mit.edu (Richard Stallman):  concepto sobre la
  documentacin de libre distribucin.

  dak@Pool.Informatik.RWTH-Aachen.DE (David Kastrup): El tema del NFS.

  La gente que me ha enviado correo con preguntas y problemas tambin me
  ha sido de extrema ayuda.

  13.4.  Notas sobre el Copyright, Licencia y Todo Eso

  Nota del traductor: Aunque se traducen las notas siguientes, se copian
  tambin intactas para respetar los trminos de la Licencia.

       ===========Copyright notice, License, and all that stuff ==================

       Copyright (c) Brian Ward, 1994-1996.
       Permission is granted to make and distribute copies of this manual provided
       the copyright notice and this permission notice are preserved on all
       copies.

       Permission is granted to copy and distribute modified versions of this
       manual under the conditions for verbatim copying, provided that the derived
       work is distributed under the terms of a permission notice identical to
       this one. Translations fall under the catagory of ``modified versions.''

       Warranty: None.

       Recommendations
       :
       Commercial redistribution is allowed and encouraged; however, it is
       strongly recommended that the redistributor contact the author before the
       redistribution, in the interest of keeping things up-to-date (you could
       send me a copy of the thing you're making while you're at it). Translators
       are also advised to contact the author before translating. The printed
       version looks nicer. Recycle.

       =============================================================================

  Copyright  Brian Ward, 1994, 1995.

  Se concede permiso para realizar y distribuir copias de este
  documento, siempre proporcionando esta nota y la del Copyright en
  todas las copias.

  Se concede permiso para copiar y distribuir versiones modificadas de
  este documento, bajo las condiciones propuestas para copias completas.
  Las traducciones se incluyen en la categora de ``versiones
  modificadas''.

  Garantas: Ninguna.

  Recomendaciones: Se permite y recomienda redistribuir comercialmente
  este documento; sin embargo, se sugiere que el distribuidor contacte
  antes con el autor, con el fin de mantener las cosas al da. Con este
  mismo propsito se recomienda tambin a los traductores que contacten
  con el autor.

  14.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.


El presente directorio contiene las traducciones efectuadas hasta ahora al
castellano; existen ms documentos cuya traduccin est en marcha. 

Recomendamos encarecidamente que haga uso de las versiones *.ps o *.dvi
(para imprimir) o *.html. Las que estn en ASCII pueden contener errores
debido a algunos bugs que contiene el script sgml2txt; no obstante, se ha
subsanado ya el problema de los nombres de seccin incompleta en los
Indices Generales. 

Adems, es una pena usar ASCII plano disponiendo de las otras versiones, y
esa es precisamente la razn por la que el autor no lo mejora ;-) 

FTP:
	ftp://ftp.insflug.org

WWW:
	http://www.insflug.org

LISTA DE CORREO:

insflug@insflug.org :
---------------------
	Enviar un email a insflug-request@insflug.org, con 'subscribe'
en el subject.

	
CONTACTOS

	pacopepe@insflug.org
	ftpmaster@insflug.org
	webmaster@insflug.org


Esperamos que las traducciones le sean de utilidad, disfrute del LiNUX!! :)

  Trucos y consejos para Linux
  Vince Reed, reedv@rpi.edu
  v0.1, 30 August 1994

  Este documento describe ideas para ahorrar tiempo y tcnicas para
  hacer de linux un sistema mas fcil de configurar y de usar. Todo lo
  incluido aqui es demasiado general como para ser incluido en
  cualquiera de los otros Howtos.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Ayudas Cortas

  2.1.    Mover directorios entre sistemas de ficheros.

  2.2.    Parche para el GNU, Ted Stern, stern@amath.wwashington.edu

  2.3.    Cmo puedo hacer que el sistema no ejecute el fsck en cada
  arranque? Dale Lutz, dal@wimsey.com

  2.4.    Cmo evitar fsck's causados por "device busy" al arrancar. Jon
  Tombs, jon@gtex02.us.es

  2.5.    Cmo imprimir una pgina con margen para hacer agujeros. Mike
  Dickey, mdickey@thorplus.lib.purdue.edu

  2.6.    Un mtodo para buscar a travs de rboles de ficheros una
  expresin regular dada, Raul Deluth Miller, rockwell@nova.umd.edu

  2.7.    Un script para limpiar despus de usar programas que crean
  ficheros temporales y de backup, Barry Tolnas,
  tolnas@nestor.engr.utk.edu

  3.      Ayudas Detalladas

  3.1.    Compartiendo particiones de swap entre Linux y Windows. Tony
  Acero,  ace3@midway.uchicago.edu

  3.2.    Cmo configurar xdm's chooser para seleccionar host. Arrigo
  Triculzi, a.triulzi@ic.ac.uk

  4.      La traduccin

  5.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Bienvenido al Linux Tips HOWTO, un lugar donde encontrar rpidas
  respuestas a preguntas no cubiertas en howtos mas especficos sobre
  linux.  En el Tips Howto, tambin encontrars pequeas y elegantes
  artimaas para hacer el uso y administracin de un sistema Linux
  todavia mas fcil. No obstante, como esta es slo la segunda versin
  del Tips Howto, el nmero de ayudas es an muy pequeo. La prxima
  versin no tiene porque ser as, no obstante... Por favor, enviarme
  vuestras ideas para ser incluidas en futuros howtos. Gracias por
  adelantado !

  Vince Reed, reedv@rpi.edu, Mantenedor del Linux TIPS HOWTO

  2.  Ayudas Cortas

  2.1.  Mover directorios entre sistemas de ficheros.

  (Alan Cox, A.Cox@swansea.ac.uk)

  Forma rpida de mover un rbol entero de ficheros de un disco a otro:

       (cd /origen/directorio; tar cf - . ) | (cd /dest/directorio; tar xvfp -)

  2.2.  Parche para el GNU, Ted Stern, stern@amath.wwashington.edu

  Para cambiar el comportamiento del VPATH. (Make 3.70)

  No s si mucha gente tiene este problema, pero hay una caracterstica
  del GNU make versin 3.70 que no me gusta. VPATH acta raramente si le
  das un path absoluto. Existe un patch extremadamente slido que
  arregla esto, el cual se puede obtener de Paul D. Smith,
  psmith@wellfleet.com. l tambin pone la documentacin y el patch
  despus de cada revisin del GNU make en el servidor de newsgroups al
  cual tengo acceso.

  2.3.  arranque? Dale Lutz, dal@wimsey.com Cmo puedo hacer que el sis
  tema no ejecute el fsck en cada

  Cmo hago para que e2fsck no chequee mi disco cada vez que arranco?

  Cuando recompilas el kernel, el sistema de ficheros se marca como
  "sucio" y por eso el disco es chequeado en cada arranque. La solucin
  es ejecutar :

         rdev -R /zImage 1

  Esto arregla el kernel para que no se siga creyendo que el sistema de
  ficheros est "sucio".

  Nota : Si usas lilo, entonces aade slo-lectura al setup del linux en
  tu fichero de configuracion del lilo (normalmente /etc/lilo.conf)

  2.4.  Tombs, jon@gtex02.us.es Cmo evitar fsck's causados por "device
  busy" al arrancar. Jon

  Si usualmente sufres errores de "device busy" al apagar , que dejan al
  sistema de ficheros con la necesidad de un fsck al arrancar, aqu
  tienes un arreglo simple :

  Aade la siguiente linea al fichero /etc/brc o /sbin/brc

       mount -o remount,ro /mount.dir

  para todos tus sistemas de ficheros montados excepto /, antes de la
  llamada para desmontar -a. Esto significa que si, por alguna razn,
  shutdown falla al matar todos los procesos y desmontar los discos,
  stos estarn igualmente limpios al arrancar. Me ahorra un montn de
  tiempo al arrancar.

  2.5.  Cmo imprimir una pgina con margen para hacer agujeros. Mike
  Dickey, mdickey@thorplus.lib.purdue.edu

       #!/bin/sh
       # /usr/local/bin/print
       # una muestra de impresin simple, para permitirnos
       # perforar lo obtenido y poder archivarlo:
       cat $1 | pr -t -o 5 -w 85 | lpr

  2.6.  regular dada, Raul Deluth Miller, rockwell@nova.umd.edu Un
  mtodo para buscar a travs de rboles de ficheros una expresin

  He llamado a este script 'forall'. Se usa as :

       forall /usr/include grep -i ioctl
       forall /usr/man grep ioctl

  Aqu est forall:

       #!/bin/sh
       if [ 1 = `expr 2 \> $#` ]
       then
       echo Usage: $0 dir cmd [optargs]
       exit 1
       fi
       dir=$1
       shift
       find $dir -type f -print | xargs "$@"

  2.7.  temporales y de backup, Barry Tolnas, tolnas@nestor.engr.utk.edu
  Un script para limpiar despus de usar programas que crean ficheros

  Aqu tenis un sencillo script que desciente recursivamente un
  directorio borrando ficheros de auto-grabado y backup de emacs,
  ficheros .o, y ficheros .log de TeX. Tambin comprime ficheros .tex y
  ficheros README.  Yo lo llamo ``squeeze'' en mi sistema.

       #!/bin/sh
       #SQUEEZE borra ficheros inutiles, y comprime ficheros .tex y README
       #By Barry tolnas, tolnas@sun1.engr.utk.edu
       #
       echo squeezing $PWD
       find  $PWD \( -name \*~ -or -name \*.o -or -name \*.log -or -name \*\#\) exec rm -f {} \;
       find $PWD \( -name \*.tex -or -name \*README\* -or -name \*readme\* \) - exec gzip -9 {} \;

  3.  Ayudas Detalladas

  3.1.  ace3@midway.uchicago.edu Compartiendo particiones de swap entre
  Linux y Windows. Tony Acero,

  1. Formatea la particin como una particin dos, y crea el fichero de
     swap del Windows en ella, pero no ejecutes windows todava. (Hay
     que mantener el fichero de swap completamente vaco de momento,
     para poder comprimirlo bien).

  2. Arranca linux y graba la particin en un fichero.  Por ejemplo, si
     la particin es /dev/hda8:

       dd if=/dev/hda8 of=/etc/dosswap

  3. Comprime el fichero de swap del dos; como es virtualmente todo
     ceros, se comprimir muy bien

       gzip -9 /etc/dosswap

  4. Aade lo siguiente al fichero /etc/rc para preparar e instalar el
     espacio de swap sobre Linux :

     XXXXX es el numero de bloques en la particion de swap

  mkswap /dev/hda8 XXXXX
  swapon -av

  Asegrate de aadir una entrada para la particin de swap en el
  fichero /etc/fstab

  5. Si tu paquete init/reboot soporta /etc/brc o /sbin/brc aade lo
     siguiente a /etc/brc, si no, haz lo mismo a mano cuando quieras
     arrancar dos u os/2 y quieras convertir la particin de swap a la
     versin dos/windows:

       swapoff -av
       zcat /etc/dosswap.gz | dd of=/dev/hda8 bs=1k count=100

  Ten en cuenta que esto slo escribe los 100 primeros bloques en la
  particin. He averiguado empricamente que esto es suficiente.

  Cules son las ventajas y las desventajas de hacer esto?

  Ventajas: Ahorras una substancial cantidad de espacio en el disco.

  Desventajas: Si el paso 5 no es automtico, tienes que hacerlo a mano,
  y enlentece el proceso de rearrancar unos nanosegundos :-)

  3.2.  Cmo configurar xdm's chooser para seleccionar host. Arrigo
  Triculzi, a.triulzi@ic.ac.uk

  1. Edita el fichero que arranca xdm, (lo mas probable /etc/rc/rc.6 o
     /etc/rc.local) para que contenga las siguientes lneas en la
     seccin de startup:

       /usr/bin/X11/xdm
       exec /usr/bin/X11/X -indirect hostname

  2. Edita /usr/lib/X11/xdm/Xservers y comenta la lnea que arranca el
     servidor en el terminal. p.ej, que comienza por 0:

  3. Rearranca la mquina y ya est todo.

  He aadido ste porque cuando estuve, desesperadamente, intentando
  configurarlo para mi propia subnet, me llev sobre una semana
  solventar todos los problemas.

  Advertencia: con viejas SLS (1.1.1) por alguna razn puedes dejar un
  -nodaemon despus de la lnea de xdm. esto NO funciona para versiones
  posteriores.

  4.  La traduccin

  La presente traduccin ha sido realizada por Javier Gracia, FidoNet:
  2:343/143, componente del INSFLUG.

  En caso de querer colaborar en las diversas traducciones que se estn
  llevando a cabo, ponte en contacto con:

    Francisco Jos Montilla, pacopepe@insflug.org para el INSFLUG:
     www.insflug.org para colaboracin en la traduccin y autora de
     COMOs, FAQs (PUFs en castellano).

    LuCas, traduccin de las guas (documentos extensos, libros):
     lucas.ctv.es, Juan Jos Amor, jjamor@ls.fi.upm.es, 2:341/12.19

  5.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Gua de usuario de Linuxdoc-SGML
  Por Matt Welsh. Puesta al da por Greg Hankins, greg.hank
  ins@cc.gatech.edu
  Montilla, pacopepe@insflug.org
  v1.5, 8 Marzo 1996

  Este documento es una gua de usuario del sistema Linuxdoc-SGML, un
  formateador basado en SGML que permite obtener varios tipos de for
  matos de salida. Se pueden producir archivos de texto plano (ASCII e
  ISO-8859-1), DVI, PostScript, HTML, GNU info, LyX, y RTF a partir de
  un slo fuente SGML. Esta gua documenta el paquete Linuxdoc-SGML en
  su versin 1.5.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Acerca de este documento.

  1.2.    Por qu SGML?

  1.3.    Cmo funciona.

  2.      Instalacin.

  2.1.    Instalacin del software

  2.2.    Formateando documentos

  2.2.1.  Obteniendo texto plano como salida.

  2.2.2.  Produciendo LaTeX, DVI o PostScript

  2.2.3.  Produciendo salida HTML

  2.2.4.  Creando salida GNU Info

  2.2.5.  Creando salida LyX

  2.2.6.  Creando salida RTF

  2.2.7.  Comprobando la sintaxis del SGML

  2.3.    Tabla de Cdigos ISO 8859-1

  3.      Redaccin de Documentos con Linuxdoc-SGML

  3.1.    Conceptos Bsicos

  3.2.    Caracteres Especiales

  3.3.    Entornos Code y Verbatim

  3.4.    Estructura Global del Documento.

  3.4.1.  El Prembulo

  3.4.2.  Prrafos y Secciones

  3.4.3.  Finalizando el documento

  3.5.    Referencias Cruzadas

  3.6.    Fuentes (Tipogrficas)

  3.7.    Listados

  3.8.    Ms Informacin.

  4.      Anexo a la Traduccin al Castellano.

  4.1.    Aspectos Importantes del SGML-LaTeX en Castellano

  4.1.1.  Tildes, Ees, Etc.

  4.1.2.  Tamao del Papel.

  4.1.3.  Los ttulos de las Tablas de Contenidos, Bibliografa, etc.

  5.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Esta es una gua de usuario para el sistema de procesado de
  documentacin linuxdoc-SGML, concebido para producir informacin
  relativa a LiNUX.  Consiste en una Definicin de Tipo de Documento
  SGML (DTD), junto con un juego de ``archivos de reemplazo'' que
  convierten el SGML a fuentes inteligibles por groff, LaTeX, HTML, GNU
  info, LyX, y RTF.

  linuxdoc-sgml Est fuertemente basado en el paquete QWERTZ DTD de
  Thomas Gordon thomas.gordon@gmd.de. Lo nico que he hecho han sido
  revisiones a sus definiciones de tipo de documento, y los archivos
  sustitutorios para su empleo especfico con d ocumentacin relativa a
  LiNUX.

  linuxdoc-sgml no pretende ser un sistema genrico de procesado de
  documentacin.  A pesar de que puede emplearse para documentos de
  varias clases, lo he limitado para el uso de los escritores de LiNUX
  para producir HOWTOs, FAQs, y (posteriormente) para los manuales del
  Linux Documentation Project (LDP). No pretende ser un sistema de pr
  ocesado de documentacin genrico; He manipulado sus posibilidades con
  este propsito.

  Si se percibe una falta de generalidad en el sistema, se debe a esta
  razn. No hay nada que limite linuxdoc-SGML a la produccin de
  documentacin sobre LiNUX, pero todo lo producido con este sistem a
  tendr un aspecto caracterstico. Si se desea que la apariencia sea
  distinta, sugiero que se emplee un sistema ms generalizado como el
  QWERTZ DTD, en combinacin con las herramientas Linuxdoc-SGML.

  Uno de los objetivos de este sistema es hacer fcil la produccin de
  documentos en distintos formatos. Hasta ahora, la mayora de la
  documentacin LiNUX haba sido producida a travs de edicin manual.
  Un sistema como groff puede ocuparse del formate o para una versin
  ASCII, pero sigue sin poder proporcionar HTML (para su uso en World
  Wide Web), LaTeX (para documentos impresos con calidad), o GNU info.
  Por este motivo, si faltan prestaciones en este sistema de las que se
  quisiese disfrutar, hzmelo saber, por favor! La idea es que no hagan
  falta demasiadas triquiuelas para producir documentos agradables en
  mltiples formatos.

  El autor debe de tener que hacer lo mnimo posible.

  1.1.  Acerca de este documento.

  Este documento fue escrito usando el DTD linuxdoc-sgml. Contiene ms o
  menos todo lo que se necesita saber para escribir documentos SGML con
  este DTD (definicin de tipo de documento). Vase Linuxdoc-
  Ejemplo.sgml para ver un ejemplo de documento que se puede tener como
  modelo a la hora de escribir los propios.

  1.2.  Por qu SGML?

  Eleg SGML para este sistema porque est concebido especficamente
  para su posterior transformacin a otros formatos. SGML, abreviatura
  de Standard Generalized Markup Language, permite especificar la
  estructura del documento---esto es, qu tipo de cosas dan forma al
  documento. La estructura del documento se especifica con un DTD.
  linuxdoc-sgml es un DTD que especifica la estructura para los HOWTOs y
  otros documentos de LiNUX. QWERTZ es otro DTD; el SGML estndar
  proporciona DTDs para libros , artculos, y otras clases de
  documentacin genrica.

  El DTD especifica los nombres de los ``elementos'' que forman parte de
  un documento. Un elemento es simplemente una parte de la
  estructura---como una seccin, subseccin, un prrafo, o simplemente
  algo menor como texto remarcado. A diferencia del LaT eX, no obstante,
  estos elementos no son en modo alguno intrnsecos al SGML en s mismo.
  La definicin de documento linuxdoc-sgml viene a definir elementos muy
  similares a su equivalentes en LaTeX ---tiene secciones, subsecciones,
  ``entornos'' de texto y d ems---. No obstante, empleando SGML se
  pueden definir cualquier tipo de estructuras de documento que se
  quieran. En cierto modo, es similar al TeX de bajo nivel, mientras que
  el DTD linuxdoc-sgml se parece ms al LaTeX.

  No dejarse confundir por esta analoga. SGML no es un sistema de
  formateo de documentacin. No existe un ``formateador SGML'' en s
  mismo.  El fuente SGML es slo convertido a otros formatos para su
  procesado.  Adems, el SGML por s mismo lo nic o que hace es
  especificar la estructura del documento. No existen dispositivos o
  ``macros'' intrnsecos al SGML en s mismo. Todos estos aspectos son
  definidos en el DTD. No se puede hacer uso del SGML sin el DTD ---el
  DTD define lo que hace el SGML---

  1.3.  Cmo funciona.

  He aqu cmo procesar un documento con SGML y cmo funciona el DTD
  linuxdoc-sgml. Primero, se necesita una definicin de tipo de
  documento (DTD). Yo estoy empleando el DTD QWERTZ, que fue realizado
  en sus principios por un grupo de personas que neces itaban un DTD
  estilo LaTeX. He modificado el DTD QWERTZ obteniendo el DTD linuxdoc-
  sgml para nuestros propsitos.  El DTD nicamente configura la
  estructura del documento. Una pequea porcin del mismo tiene este
  aspecto:

       <!element article - -
               (titlepag, header?,
                toc?, lof?, lot?, p*, sect*,
                (appendix, sect+)?, biblio?) +(footnote)>

  Esta parte configura la estructura global para un ``article'', que
  viene a ser un ``estilo de documento'' en LaTeX. El artculo consiste
  en una pgina de portada (titlepag), un encabezamiento opcional,
  (header); una tabla de contenidos opcional tambin, (toc), listado de
  figuras y de tablas opcionales (lof y lot), cualquier nmero de
  prrafos (p), y secciones principales (sect) apndices opcionales
  (appendix), bibliografa (biblio) y notas al pie (footnote ).

  Como puede observarse, el DTD no menciona nada acerca de cmo debera
  de formatearse el documento, o sobre el aspecto que debera tener.
  Simplemente define qu partes conforman el documento. En alguna parte
  del DTD, son definidas las estructuras de titlepag, header, sect, as
  como otros elementos.

  No se precisa saber nada acerca de la sintaxis del DTD para escribir
  documentacin. Simplemente lo presento para que as se sepa su
  aspecto, y lo que hace. Se necesita estar familiarizado con la
  estructura que defina el DTD. De no ser as, podr a violarse la
  estructura a la hora de tratar de escribir un documento, y quedarse
  muy confundido con los mensajes de error resultantes. Describiremos en
  detalle la estructura de los documentos linuxdoc-sgml ms tarde.

  El siguiente paso es escribir el documento empleando la estructura
  definida por el DTD. Nuevamente, el DTD linuxdoc-sgml hace que la
  apariencia de los documentos sea muy similar al LaTeX ---muy simple de
  seguir---. En la jerga SGML, un documento esc rito empleando un DTD
  especfico, se conoce como una instancia de ese documento.

  A fin de traducir el fuente SGML a otro formato (como LaTeX o groff)
  para su procesado, el fuente SGML (el documento que escribiste) es
  analizado junto con el DTD por (lo adivinaste) el analizador SGML.

  Estoy empleando el analizador sgmls de James Clark, jjc@jclark.com,
  quien precisamente resulta ser el creador de groff. Estamos en buenas
  manos.  El analizador (sgmls) nicamente toma tu documento y verifica
  que sigue la estructura definida anteriormente en el DTD. Tambin
  devuelve un formato ms esplcito de tu documento, con todos las
  ``macros'' y dems elementos expandidos, lo cual es inteligible para
  sgmlasp, la siguiente fase del proceso.

  sgmlsasp es el responsable de la conversin de la salida de sgmls a
  otro formato (como LaTeX). Lleva a cabo esta tarea usando archivos
  sustitutivos, que describen cmo convertir elementos del SGML original
  al fuente correspondiente en el formato ``destino'' (como LaTeX o
  groff).

  Por ejemplo, parte del archivo de reemplazamiento para LaTeX tendra
  este aspecto:

       <itemize>       +       "\\begin{itemize}      +
       </itemize>      +       "\\end{itemize}        +

  El cual dice que siempre que se comience un elemento itemize en el
  fuente SGML, deber ser reemplazado por

       \begin{itemize}

  en el fuente LaTeX. (Como dije, los elementos del linuxdoc-sgml DTD
  son muy similares a sus equivalentes en LaTeX).

  Asi que para convertir el SGML a otro formato, todo lo que se ha de
  hacer es escribir un archivo de reemplazamiento nuevo para ese formato
  que proporcione las analogas apropiadas para los elementos SGML en el
  nuevo formato. En la prctica, no es tan simp le ---por ejemplo, si se
  est intentando convertir a un formato que no est estructurado
  enteramente como tu DTD, van a haber problemas---. En cualquier caso,
  es ms fcil de hacer que escribir analizadores individuales y
  traductores para varios tipos de formatos de salida; SGML proporciona
  un sistema genrico de conversin de fuentes a varios formatos.

  Una vez sgmlsasp ha concluido su trabajo, se obtiene el fuente LaTeX
  que corresponde al documento SGML original, el cual puede ser
  formateado empleando LaTeX como se hara normalmente. Posteriormente
  dar en este documento ejemplos y mostrar los com andos empleados
  para llevar a cabo la traduccin y formateo. Todo puede ser llevado a
  cabo desde la lnea de comandos.

  Pero primero, debo describir cmo instalar y configurar el software.

  2.  Instalacin.

  Hacerse con linuxdoc-sgml-1.5.tar.gz de alguno de los siguientes
  servidores ftp:

    ftp://sunsite.unc.edu/pub/Linux/utils/text/linuxdoc-sgml-1.5.tar.gz

    ftp://tsx-11.mit.edu/pub/linux/docs/linuxdoc-sgml-1.5.tar.gz

    ftp://ftp.cc.gatech.edu/pub/people/gregh/linuxdoc-sgml/linuxdoc-
     sgml-1.5.tar.gz

  Parches actualizados para la versin 1.5 pueden encontrarse en:

  ftp://ftp.cc.gatech.edu/pub/people/gregh/linuxdoc-sgml.

  Puede obtener informacin actualizada en:

  Linuxdoc-SGML WWW Page.

  El archivo linuxdoc-sgml-1.5.tar.gz contiene todo lo necesario para
  escribir documentos SGML y convertirlos a groff, LaTeX, HTML, GNU
  info, LyX, y RTF. Adems de este paquete, se necesitarn las
  siguientes herramientas -- no son requeridas por el sistema SGML en
  s, pero sugiero hacerse con ellas para poder as formatear tus
  documentos y verificar que todo aparece como debe antes de
  distribuirlas.

  1. groff. Necesitas la versin 1.08  1.09. Aparentemente, parte del
     tratamiento de los mrgenes en groff se encuentra en estado de
     perfeccionamiento de versin en versin; ambos funcionarn, pero se
     obtendrn resultados ligeramente dist intos. (Particularmente, en
     la 1.09 el margen izquierdo no es sangrado dos caracteres como lo
     era en la 1.08.
     Es soportable en la 1.09, pero en la 1.08, tiene un aspecto
     terrible) Las versiones precedentes a la 1.08 no funcionarn.
     Puedes obtener esto de ftp://prep.ai.mit.edu/pub/gnu.

     Hay una versin binaria para LiNUX en
     ftp://sunsite.unc.edu/pub/Linux/utils/text Tambin.  Necesitars
     groff para producir texto ASCII simple a partir tus documentos
     SGML.  (TeX/LaTeX se emplearn para obtener bonitas copias impresas
     en PostScript y dvi).

  2. TeX y LaTeX. Estos estn disponibles ms o menos, en todos lados;
     no debera de haber problema en conseguirlo e instalarlo. (Hay una
     distribucin de binarios en sunsite.unc.edu). Por supuesto, slo lo
     necesitaremos si pretendemos formatear nues tros documentos SGML
     con LaTeX/TeX, por lo que esto es opcional.

  3. Si quieres visualizar el HTML generado, recomiendo conseguir el
     NCSA Mosaic 2.6 o posterior, disponible en
     ftp://sunsite.unc.edu/pub/Linux/system/Network/info-systems.

  4. gawk y las herramientas GNU info, para formatear y visualizar los
     ficheros info. Estn disponibles tambin en

     ftp://prep.ai.mit.edu/pub/gnu, o en
     ftp://sunsite.unc.edu/pub/Linux/utils/text (para gawk) y

     ftp://sunsite.unc.edu/pub/Linux/system/Manual-pagers (para las
     herramientas GNU info.)

  5. LyX (un interface quasi-WYSIWYG para el LaTeX, con esquemas SGML),
     est disponible en ftp://ftp.via.ecp.fr.

  2.1.  Instalacin del software

  Los pasos necesarios para la instalacin y configuracin de linuxdoc-
  sgml son los siguientes:

  1. Primero, desempaquetar el archivo tar linuxdoc-sgml-1.5.tar.gz
     donde sea. Esto crear el directorio linuxdoc-sgml-1.5, donde
     residirn todos los archivos SGML. No importa donde descomprimas
     este archivo; simplemente, no muevas nada del dir ectorio linuxdoc-
     sgml-1.5.

  2. Leer el fichero INSTALL. Contiene instrucciones detalladas de
     instalacin.

     Si todo va bien, estars listo para empezar a utilizar el sistema.

  2.2.  Formateando documentos

  Digamos que tienes el documento SGML pepito.sgml que queremos
  formatear. He aqu una revisin genrica de cmo formatear el
  documento a lo s distintos formatos.  Para ver una lista completa de
  opciones, consultar las pginas man

  2.2.1.  Obteniendo texto plano como salida.

  Si se quiere obtener texto plano como resultado, emplear el comando:

       % sgml2txt foo.sgml

  Ntese que he limitado la conversin de groff para la salida de texto
  simple.  Es decir, he quitado los encabezamientos de pgina, cambiado
  los mrgenes, y dems. Con un poco de trabajo, puedes producir
  PostScript y DVI de la salida de groff, pero sugiero que se emplee
  LaTeX para ello.

  Puedes producir fuentes groff para pginas man, que pueden ser
  formateadas con groff -man. Para hacer esto:

        % sgml2txt -man
       foo.sgml

  2.2.2.  Produciendo LaTeX, DVI o PostScript

  Para producir documentos LaTeX a partir del fuente SGML, ejecutar:

       % sgml2latex foo.sgml

  Si quieres producir salida PostScript (va dvips) emplea la opcin -p:

       % sgml2latex -p foo.sgml

  O puedes producir un fichero DVI usando el parmetro -d, como aqu:

       % sgml2latex -d foo.sgml

  2.2.3.  Produciendo salida HTML

  Si quieres obtener HTML como salida, haz lo siguiente:

       % sgml2html -img foo.sgml

  Esto producir tanto foo.html, como foo-1.html, foo-2.html, y dems
  ---un archivo por cada seccin del documento.  Ejecuta tu navegador
  WWW en foo.html, que es el archivo cabecera.  Asegurarse de que todos
  los ficheros HTML correspondientes al documento estn en un
  directorio, ya que se referencian unos a otros con URLs locales.  Los
  iconos referenciados en la salida HTML estn localizados en
  $LINUXDOCLIB/icons. Estos debern ser copiados tambin a la
  localizacin final de los documentos HTML. $LINUXDOCLIB est definida
  al comienzo de los scripts de con versin SGML.

  Si empleas sgml2html sin el parmetro -img, los documentos HTML
  tendrn las etiquetas ``previous'', ``next'', y ``table of contents''
  para la navegacin. Puedes saltarte esa configuracin por defecto
  creando un archivo en $LINUXDOCLIB /rep/html/<nombre_archivo>,
  sustituyendo con tus palabras, las apropiadas para los distintos
  lenguajes. El archivo posee el siguiente formato:

       PrevPage:    nuevovalor
       NextPage:    nuevovalor
       TOC:         nuevovalor

  Ver el ejemplo deutsch.

  2.2.4.  Creando salida GNU Info

  Si quieres formatear tu archivo para el visualizador GNU info, lo
  nico que has de ejecutar es:

       % sgml2info foo.sgml

  2.2.5.  Creando salida LyX

  Para obtener salida LyX, emplear el comando:

       % sgml2lyx foo.sgml

  2.2.6.  Creando salida RTF

  Si quieres obtener salida RTF, usa el comando:

       % sgml2rtf foo.sgml

  Esto producir como salida foo.rtf, as como foo-1.rtf, foo-2.rtf, y
  as; un fichero por cada seccin del documento.

  2.2.7.  Comprobando la sintaxis del SGML

  Si lo nico que quieres es comprobar si habra errores en la
  conversin del SGML emplea el script sgmlcheck. Por ejemplo:

       % sgmlcheck foo.sgml

  2.3.  Tabla de Cdigos ISO 8859-1

  La tabla de caracteres ISO 8859-1 puede ser usada con caracteres
  internacionales en transformaciones a texto ASCII plano, LaTeX y HTML
  (--  nota para los textos en Castellano:

  Esta es la tabla que se ha de emplear si se emplean tildes, ees, etc;
  basta con escribirlos como tales en los fuentes, y emplear el
  parmetro sgml2html)--) Para hacer u so de esta propiedad, pasar al
  script el parmetro -l, por ejemplo:

       % sgml2txt -l foo.sgml

  Puedes emplear los caracteres ISO 8859-1 en los fuentes, sern
  transformados en los cdigos de escape apropiados de cada tipo de
  formato.

  3.  Redaccin de Documentos con Linuxdoc-SGML

  Para la mayora, redactar documentacin empleando la Definicin de
  Tipo de Documento es muy simple, y similar en ciertas cosas al LaTeX.
  No obstante, hay algunas advertencias a tener en cuenta. En esta
  seccin, expondr en una introduccin la redaccin de documentacin
  con SGML.

  Ver el archivo Linuxdoc-Ejemplo.sgml para tener un ejemplo (y
  tutorial) de documento SGML que pueda usarse como modelo a seguir a la
  hora de redactar tus propios documentos. Slo discutir algunas de las
  prestaciones del SGML aqu, pero el fuente no es muy le gible como
  ejemplo. Mejor imprimir el fuente (as como la salida ya formateada)
  de Linuxdoc-Ejemplo.sgml para as tener una referencia real a la que
  acudir.

  3.1.  Conceptos Bsicos

  Examinando los fuentes del documento ejemplo, te percatars de que hay
  una serie de ``etiquetas'' enmarcadas con parntesis en ngulo (-- N.
  del T.
  ``smbolos de mayor/menor q ue''--) (< y >). Una etiqueta especifica
  simplemente el comienzo y final de un elemento, siendo un elemento
  algo como una seccin, prrafo, una frase con texto en tipografa
  cursiva (itlica), un ``item'' de un listado , y dems. El uso de una
  etiqueta es similar a los comandos de LaTeX como \item o
  \section{...}.

  Por poner un ejemplo sencillo, para producir este texto en negrita,
  escrib:

       Por poner un ejemplo sencillo, para producir <bf>este texto en negrita</bf>, ...

  en el fuente. <bf> da comienzo a la regin de texto en negrita, y
  </bf> la finaliza. Como alternativa, se puede emplear la forma
  abreviada

       Por poner un ejemplo sencillo, para producir <bf/este texto en negrita/, ...

  que encierra el texto en negrita entre barras. (Si el texto contenido
  entre las barras contiene barras tambin, debers usar el mtodo
  ``largo'', como es el caso de los nombres de archivo en Unix).

  Hay otros aspectos que tener en cuenta respecto a caracteres
  especiales (esa es la razn por la que vers todas esas absurdas
  expresiones con simbolos de ``&'' si observas los fuentes; las
  describir pronto).

  En algunos casos, la etiqueta de fin para un elemento en particular es
  opcional. Por ejemplo, para comenzar una seccin, empleas la etiqueta
  de <sect>; de todos modos, la etiqueta de finalizacin de la seccin
  (que podra aparecer al final del cuerpo de la seccin propiamente,
  no justo tras el ttulo de la seccin!) es opcional e implcito
  cuando se da comienzo a otra seccin de la misma ``profundidad''.  En
  general, no debemos preocuparnos de esos detalles; basta con seguir el
  modelo empleado en el tutorial (Linuxdoc-Ejemplo.sgml).

  3.2.  Caracteres Especiales

  Para obtener una lista detallada de caracteres especiales, echar un
  vistazo a alguno de los ficheros de reemplazamiento. Normalmente el
  LaTeX se quejar de la mayora de caracteres especiales, por lo que
  paginando $LINUXDOCLIB/rep/latex/general  sera un buen sitio donde
  comenzar. $LINUXDOCLIB est definido al comienzo de los scripts de
  conversin.

  Obviamente, los parntesis en ngulo son por s mismos caracteres
  especiales en los fuentes SGML. Hay otros a los que prestar atencin.
  Por ejemplo, digamos que quisieras teclear una expresin que contenga
  parntesis en ngulo, como esta: <foo>. Para obtener el parntesis en
  ngulo izquierdo (o de apertura)tendrs que emplear el elemento &lt;
  que es una macro que se expandir al carcter de parntesis en ngulo
  actual. Por tanto, en el fuente tecle:

  Generalmente, lo que comience con un smbolo de ``&'' (-- N. del T.
  ``ampersand''--) es una macro especial. Por ejemplo, existe &percnt;
  para obtener un %, &verbar; para |, y as. Para todos los caracteres
  especiales existen estas entidades precedidas por ``ampersands'' para
  representarlos.

  Normalmente, no necesitamos emplear la macro con ampersand para
  obtener un carcter especial, no obstante, en algunos casos es
  necesario. Los ms utilizados son:

    Usar &amp; con el ``ampersand'' (&),

    Usar &lt; para el smbolo menor que (<),

    Usar &gt; para el smbolo mayor que (>),

    Usar &etago; para el el smbolo menor que con una barra inversa
     (</)

    Usar &dollar; con el smbolo de dlar ($),

    Usar &num; con la almohadilla (#),

    Usar &percnt; con el smbolo de tanto por ciento (%),

    Usar &tilde; con una tilde (~),

    Usar `` y '' con las comillas, o emplear &dquot con ".

  3.3.  Entornos Code y Verbatim

  Mientras tratbamos el asunto de los caracteres especiales, deb
  mencionar tambin el ``entorno'' verbatim empleado para incluir texto
  literal en la salida (preservando los espacios, sangras, y dems). El
  elemento verb se emplea para esto; tiene el siguiente aspecto:

       <verb>
       Un poco de texto literal a incluir como ejemplo en la salida.
       </verb>

  El entorno verb no te permite emplear todo en su interior
  literalmente. Especficamente, debers hacer lo siguiente en el
  interior de los entornos verb.

    Usar &ero; para obtener un ampersand,

    Usar &etago; para obtener </,

    No usar \end{verbatim} dentro de un entorno verb ya que es as como
     lo emplea LaTeX para finalizar el entorno verbatim (En el futuro,
     podra ser posible ocultar el formateador de texto subyacente
     enteramente, pero el analizador no soporta esta caracterstica
     todava.)

  El entorno code es mayormente como el entorno verb, a excepcin de las
  lneas horizontales que son aadidas al texto que enmarca, como aqu:

  ______________________________________________________________________
  He aqui un entorno code de muestra.
  ______________________________________________________________________

  Debers usar el entorno tscreen antes de cualquier entorno verb, como
  aqu:

       <tscreen><verb>
       He aqui un poco de texto de ejemplo
       </verb></tscreen>

  tscreen es un entorno que nicamente sangra el texto y selecciona como
  fuente tipogrfica por defecto tt. Esto hace que los ejemplos tengan
  mejor aspecto, tanto en las versiones LaTeX como ASCII.  Se puede usar
  tscreen sin verb de todos modos, pero si se incluye algn carcter
  especial en el ejemplo, ser necesario emplear ambos.  tscreen no
  procesa los caracteres especiales. Ver ejemplo.sgml para los ejemplos.

  El entorno quote es similar a tscreen, con la excepcin de que no se
  selecciona como fuente tipogrfica por defecto tt. Por tanto, puedes
  emplear quote para menciones que no requieren interaccin de la
  computadora, como en:

       <quote>
       He aqui una muestra de texto a sangrar, como en una cita.
       </quote>

  que generar:

       He aqui una muestra de texto a sangrar, como en una cita.

  3.4.  Estructura Global del Documento.

  Antes de meternos en profundidad con los detalles, describir la
  estructura global de un documento definido por el DTD linuxdoc.  Echar
  un vistazo a Linuxdoc-Ejemplo.sgml para ver un buen ejemplo de cmo
  definir un documento.

  3.4.1.  El Prembulo

  En el ``prembulo'' del documento, se definen aspectos como la
  informacin del ttulo, y el estilo del documento. Para un documento
  de tipo Howto (-- N. del T.
  tendra este aspecto:

  <!doctype linuxdoc system>

  <article>

  <title>Linux Foo-HOWTO

  <author>Norbert Ebersol, <tt/norb@baz.com/

  <date>v1.0, 9 March 1994

  <abstract>
  Este documento describe como usar las herramientas foo para frobnicar
  librerias menganitas, empleando el relincador xyzzy...
  </abstract>

  <toc>

  Los elementos debern ir ms o menos en ese orden. La primera lnea
  comunica al analizador SGML que emplee el DTD Linuxdoc-SGML. La
  etiqueta <article> fuerza al documento a seguir el estilo ``article''.
  El DTD QWERTZ original define ``report''  (-- N. del T.  y ``book''
  (-- N. del T.

  tambin; no he retocado stos para su uso con Linuxdoc-SGML.

  Las etiquetas title, author, y date (-- N. del T.  deberan resultar
  obvias.  La etiqueta date incluye el nmero de versin y la ltima
  fecha de modificacin del documento.

  La etiqueta abstract define el texto que ser impreso en el
  encabezamiento del documento, antes de la tabla de contenidos. Si no
  se va a incluir una tabla de contenidos (la etiqueta toc),
  probablemente no sea necesario un elemento abstract. Sugiero que todos
  los Linux HOWTOs sigan este mismo formato para el premb ulo, para que
  el ttulo, resumen, y tabla de contenidos estn todos ah y tengan una
  apariencia similar.

  3.4.2.  Prrafos y Secciones

  Tras el prembulo, estamos listos para sumergirnos en el documento.
  Disponemos de los siguientes comandos de seccionamiento:

    sect:  Para secciones de nivel principal (como 1, 2, y as en
     adelante)

    sect1: Para secciones secundarias (como 1.1, 2.1, y dems)

    sect2: Para secciones de tercer nivel

    sect3: Para secciones de cuarto nivel

    sect4: Para secciones de quinto nivel

  stas son a grosso modo equivalentes a sus respectivas en LaTeX
  section, subsection, y dems.

  Tras la etiqueta sect (o sect1, sect2, etc.) vendr el nombre de la
  seccin. Por ejemplo, al comienzo de este documento, tras el
  prembulo, viene la etiqueta:

       <sect>Introduccion

  Y al comienzo de esta seccin (Prrafos y Secciones), est la
  etiqueta:

       <sect2>Parrafos y Secciones.

  Tras la etiqueta de seccin, se comienza el cuerpo de la seccin. En
  cualquier caso, se debe empezar el cuerpo con una etiqueta <p>, como
  sigue:

       <sect>Introduccion
       <p>

       Esta es una guia de usuario del sistema de procesado de documentacion
       linuxdoc-sgml ...

  Esto es as para comunicar al analizador que se ha terminado con el
  ttulo de la seccin, y que ests listo para comenzar con el cuerpo. A
  partir de ah, los prrafos siguientes se comienzan con una lnea en
  blanco (tal y como se hara en TeX). Por ejemplo,

       He aqui el final del primer parrafo.

       Y aqui comenzamos este nuevo.

  No hay razn para usar etiquetas <p> al comienzo de cada prrafo;
  nicamente al comienzo del primer prrafo tras un comando de
  seccionamiento.

  3.4.3.  Finalizando el documento

  Al final del documento, se debe emplear la etiqueta:

       </article>

  Para comunicar al analizador que hemos finalizado con el elemento
  article (que engloba al documento completo en conjunto)

  3.5.  Referencias Cruzadas

  Ahora iremos con otras prestaciones del sistema.  Las referencias
  cruzadas son fciles. Por ejemplo, si queremos definir una referencia
  cruzada a cierta seccin, necesitars etiquetar esa seccin con un
  nombre, como sigue:

       <sect1>Introduccion<label id="sec-intro">

  Ahora ya se podr referir a esa seccin en cualquier lugar del texto
  empleando la expresin:

       Ver seccion <ref id="sec-intro" name="Introduccion"> para una introduccion.

  Esto sustituir la etiqueta ref con el nmero de seccin etiquetado
  como sec-intro. El argumento name para ref es necesario para
  transformaciones a groff y HTML. La definicin de macro de groff que
  emplea Linuxdoc-SGML no soporta referencias cruzadas, y algunas veces
  es preferible referirse a ella por su nombre en lugar de por su
  nmero.

  Por ejemplo, esta seccin es la ``Cross-references''.

  Existe tambin un elemento url para los ``Universal Resource
  Locators'', o URLs, empleados en los World Wide Web. Este elemento
  deber ser empleado para referirse a otros documentos, ficheros
  disponibles para FTP, y dems. Por ejemplo,

       Puedes obtener los documentos HOWTO en
       <tt><htmlurl url="http://sunsite.unc.edu/mdw/HOWTO/"
       name="The Linux HOWTO INDEX"></tt>.

  El argumento url especifica el URL actual en s mismo. Un enlace al
  URL en cuestin ser aadido actualmente al documento HTML.

  El argumento opcional name especifica el texto que ser anclado al URL
  (para la conversin HTML) o que dar nombre como descripcin del URL
  (para LaTeX y groff). Si no se incluye ningn parmetro name, se
  emplear el propio del URL.

  Por ejemplo, puede obtener el paquete Linuxdoc-SGML de

  ftp://sunsite.unc.edu/pub/Linux/utils/text/linuxdoc-sgml-1.5.tar.gz.

  Una variante muy til de este htmlurl, que suprime la creacin de la
  parte correspondiente al URL excepto en HTML. Lo cual es muy til para
  cosas como las direcciones e-mail personales; se puede escribir:

  <tt><htmlurl url="mailto:esr@snark.thyrsus.com"
  name="esr@snark.thyrsus.com"></tt>

  y obtener ``esr@snark.thyrsus.com'' en la salida a texto mejor que el
  repetitivo ``esr@snark.thyrsus.com <mailto:esr@snark.thyrsus.com>''
  manteniendo la validez en los documentos URL y HTML.

  3.6.  Fuentes (Tipogrficas)

  En esencia, las mismas fuentes soportadas por LaTeX lo son por
  Linuxdoc-SGML.  Ntese de todos modos, que en la conversin a texto
  ASCII (va groff) se prescinde de la informacin relativa a fuentes.
  Por tanto, podrn emplearse las fuentes todo lo que se quiera, con el
  beneficio correspondiente en la conversin a LaTeX. Pero no basarse en
  las fuentes para hacer comprender algo concreto en la versin ASCII.

  Particularmente, la etiqueta tt descrita anteriormente puede ser
  empleada para obtener una fuente de tipo ``mquina de escribir'' de
  anchura constante, que deber emplearse en todas las direcciones e-
  mail, nombres de mquina, de fichero, etc.

  Por ejemplo:

       He aqui una muestra de <tt>texto tipo maquina de escribir </tt> para
       ser incluida en el documento.

  El equivalente:

       He aqui una muestra de <tt/texto tipo maquina de escribir/ para ser
       incluido en el documento.

  Recurdese que slo se puede hacer uso de este mtodo abreviado si el
  texto englobado no contiene barras.

  Se pueden conseguir otras fuentes; bf para obtener negrita y em para
  obtener cursiva. Bastantes ms tipos de fuentes son soportados
  tambin, pero no las recomiendo, porque al convertir esos documentos a
  otros formatos como el HTML podr an no ser soportados. La negrita,
  tipo mquina de escribir, y cursiva (-- N. del T.

  deberan ser todas las necesarias.

  3.7.  Listados

  Existen varios tipos de listados soportados. Son:

    itemize para listados marcados con puntos como este

    enum para listados numerados

    descrip para obtener listados ``descriptivos''

  Cada elemento o tem de un listado itemize o enum deber ser marcado
  con una etiqueta item. Los tems en descrip son marcados con tag.

  Por ejemplo:

       <itemize>
       <item>He aqui un item.
       <item>He aqui un segundo item.
       </itemize>

  Que tendr este aspecto:

    He aqui un item

    He aqui un segundo item

  O, para un enum,

       <enum>
       <item>He aqui el primer item.
       <item>He aqui el segundo item.
       </enum>

  Ya se coge la idea. Los listados pueden contener niveles tambin; ver
  el documento de ejemplo para ms detalles.

  Un listado descrip es ligeramente diferente, y tambin ligeramente ms
  feo, pero podras querer emplearlo en ciertas ocasiones:

       <descrip>
       <tag/Gnats./ bugs raros que vuelan por el ventilador de tu disipador.
       <tag/Gnus./ bugs raros que corren por tu CPU.
       </descrip>

  que acaban teniendo este aspecto:

     Gnats.
        bugs raros que vuelan por el ventilador de tu disipador.

     Gnus.
        bugs raros que corren por tu CPU.

  3.8.  Ms Informacin.

    The QWERTZ User's Guide est disponible en:
     ftp://ftp.cs.cornell.edu/pub/mdw/SGML.

     QWERTZ (y por tanto, Linuxdoc-SGML) tiene bastantes prestaciones
     como frmulas matemticas, tablas, figuras, y dems. No recomiendo
     emplear la mayora de estas prestaciones en los HOWTOs sobre LiNUX
     debido a que no saldran bien en las versiones de texto ASCII.

     Si deseases escribir documentacin genrica en SGML, sugiero
     emplear el DTD QWERTZ original, en lugar del ``retocado'' Linuxdoc-
     SGML, que he modificado para el uso en particular con los HOWTOs de
     LiNUX y documentacin similar.

    Las herramientas originales QWERTZ de Tom Gordon pueden obtenerse
     en:

    Ms informacin acerca de SGML puede encontrarse en las siguientes
     pginas WWW:

     1. SGML en la web

     2. Pgina Web del SGML

    El analizador de James Clark's sgmls, su sucesor, nsgmls y otras
     herramientas pueden encontrarse en:  ftp://ftp.jclark.com  y en
     James Clark's WWW Page <http://www.jclark.com>.

    Puedes unirte a la lista de correo de Linuxdoc-SGML enviando correo
     a:

     majordomo@via.ecp.fr con subscribe linuxdoc-sgml en el cuerpo del
     mensaje. La direccin de correo es:  linuxdoc-sgml@via.ecp.fr.

    Se puede obtener ms informacin sobre LyX en:

     LyX WWW Page.  LyX es un procesador de texto de alto nivel,
     interface al LaTeX, quasi-WYSIWYG (-- N.del T.
     ``What You See Is What You Get'', algo as como ``lo que ves es lo
     que vas a obtener''--) , que genera muchos estilos y diseos casi
     automticamente. Acelera el aprendizaje del LaTeX y hace que
     diseos complicados sean fciles e intuitivos.

  4.  Anexo a la Traduccin al Castellano.

  4.1.  Aspectos Importantes del SGML-LaTeX en Castellano

  4.1.1.  Tildes, Ees, Etc.

  Para que aparezcan las tildes, ees y dems caracteres tipogrficos
  tpicos del castellano que no sean ``caracteres especiales'' basta
  como escribirlos como tales en el fuente (para ello, debers cargar el
  mapa de teclado espaol, es.map, cosa q ue se suele configurar con el
  programa de instalacin de LiNUX), que el editor los soporte (para vi
  no hacen falta ms configuraciones) y pasarle el parmetro `-l' al
  script de conversin utilizado; (actualmente, slo soportan esta
  opcin sgml2la tex, sgml2html, y sgml2txt).

  4.1.2.  Tamao del Papel.

  Este no es un aspecto crucial, pero no est de ms saberlo. Para que
  los documentos a LaTeX se formateen en un tamao de papel A4, tpico
  en nuestro pas, basta con que al script de conversin se le pase el
  parmetro `-a'. Tambin se puede especificar est o a dvips con la
  opcin `-a4'.

  4.1.3.  Los ttulos de las Tablas de Contenidos, Bibliografa, etc.

  Este era un aspecto bastante molesto del LaTeX, el que se generasen
  automticamente los ttulos de las macros toc, lof, lot, biblio,
  etc... con los ttulos en ingls; esto est solucionado empleando el
  paquete babel que suele veni r incluido con LaTeX, y que en lo que a
  nosotros atae, da soporte a castellano, cataln y gallego.

  Para hacer uso del mismo basta con ejecutar texconfig, y configurar
  las ``hyphenation tables'', generalmente editando desde el shell de
  configuracin de texconfig el archivo languaje.dat, en el que se ha de
  descomentar el patrn perten eciente al espaol; al salir de texconfig
  tendris el LaTeX configurado para funcionar en castellano.
  Personalmente, dejo solamente el patrn perteneciente al espaol, y no
  tengo problemas, no s si dar problemas dejando varios.

  Despus es necesario editar el fichero &LINUXDOCLIB/rep/latex/mapping
  y aadir en las definiciones de cada DTD (article, etc), ``spanish'',
  de modo que quedara as:

       ______________________________________________________________________
       <qwertz>        +
       </qwertz>       +

       <article>       + "\\documentstyle\[linuxdoc-sgml,isolatin,spanish,qwertz,[OPTS]\]{article}\n"                                   ^  ^  ^
                               "\\input{epsf.tex}\n"   +

       </article>      +       "\\end{document}"       +

       [...]
       ______________________________________________________________________

  5.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  -Ejemplo breve de Linuxdoc-SGML
  Matt Welsh, mdw@cs.cornell.edu
  pacopepe@insflug.org
  v1.0, 28 Marzo 1994

  Este documento es un breve ejemplo del uso del DTD Linuxdoc-SGML
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      El fuente

  3.      Algunos ejemplos

  3.1.    Esto es una subseccin

  3.1.1.  Esto es una subsubseccin

  3.2.    Texto de muestra

  3.3.    Referencias cruzadas

  3.4.    Empleo de fuentes

  3.5.    Listados

  4.      Notas del Traductor

  5.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Este documento es un breve ejemplo del uso del Linuxdoc-SGML DTD.
  Puedes formatearlo empleando el comando:

       % sgml2txt example.sgml

  esto producir texto ASCII simple. Se puede producir tambin LaTeX,
  HTML y texinfo.

  2.  El fuente

  El observar el fuente de este fichero ser instructivo para mostrar
  cmo usar varias de las estructuras del paquete Linuxdoc-SGML. Debe
  leerse tambin Linuxdoc-SGML, Gua de usuario, del archivo gua.sgml.

  Los fuentes son y parecen similares al LaTeX, como puede verse. Los
  prrafos se separan mediante lneas en blanco, y las macros se colocan
  entre signos "mayor-menor que". Es bastante simple.

  3.  Algunos ejemplos

  He aqu algunos ejemplos de elementos que sern empleados en el
  fuente.  Primero, descendamos a una subseccin:

  3.1.  Esto es una subseccin

  Como reza en la cabecera. Ntese que se precisa usar el comando p para
  comenzar el cuerpo de la seccin, tras el comando sect1. He aqu una
  subsubseccin:

  3.1.1.  Esto es una subsubseccin

  Ok. Hay 5 niveles de secciones disponibles. Emplear los siguientes
  comandos sect, sect1, sect2, sect3, y sect4 para obtenerlas. Este
  documento emplea el estilo article que es apropiado para HOWTOs y
  otros documentos; el estilo report, (que incluye el comando de seccin
  chapt)  deben ser los empleados en la documentacion del LDP.

  3.2.  Texto de muestra

  Todo va bien, as que sigues tecleando, y quieres mostrar cdigo de
  ejemplo, o un ejemplo de I/O con un programa, o cualquier cosa. Usa
  los screen, como este:

       Este es un ejemplo de entorno ''verb''

  O tambin este:

       ______________________________________________________________________
       Este es un ejemplo de entorno ''code''
       ______________________________________________________________________

  El entorno tscreen simplemente define un tamano de fuente pequeo,
  indentandolo de forma agradable. No es necesario para definir un
  entorno verb or code, pero sugiero que se haga as.

  La Linuxdoc-SGML, Gua de usuario , explica que caracteres especiales
  pueden y no pueden ser empleados bajo un entorno verb y code.

  3.3.  Referencias cruzadas

  Y qu hay sobre las referencias cruzadas? Esta seccin ha sido
  marcada con el comando label; el uso de ref nos proporciona una
  referencia cruzada, como la que hay en en ''Ver seccin ``''''para mas
  seas.

  Hasta ahora, las referencias cruzadas no funcionaban en la
  transformacin de nroff para texto ASCII simple.

  3.4.  Empleo de fuentes

  Quieres fuentes, y las tenemos. Por supuesto no aparecen como son en
  la versin ASCII del texto, pero todas ellas s son modeladas en los
  variados formatos de salida: boldface, emphasis, sans serif, slanted,
  typewriter, e ita lics.

  3.5.  Listados

  Los listados son tambien fciles. Simplemente, emplee el elemento
  itemize con el comando item, como se observa aqui:

    Esto es un listado

    No hay nada excitante en ello.

    Tambin se soportan mltiples elementos.

    Nuevamente, no nos sorprende.

     1. Listados enumerados con enum tambin funcionan.

     2. Descripciones de entorno empleando descrip junto tag pueden ser
        empleadas, como aqu puede verse.

     Primer item.
        He aqu un item.

     Segundo item.
        Aqu hay otro

     Tercer item.
        Vamos a por el tercero?

    Un item final para acabarlos.

  Esto es simplemente todo lo que se necesita para ponerse en marcha
  escribiendo documentos SGML, empleando linuxdoc-sgml DTD. Por favor,
  hazmelo saber si piensas que se debera cambiar o aadir algo a este
  documento.

  4.  Notas del Traductor

  Para que las tildes, ees y dems elementos tipogrficos
  caractersticos de nuestro idioma aparezcan al procesarlos, es preciso
  pasar el parmetro fuente; el sgml2xxx se encargar de expa ndirlos a
  ``&xxcute'' etc...

  5.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.
  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Mp3-Como para Linux
  Philip Kerr, phil@websentric.com
  Traducido por: Ariel Graneros, larocka@yahoo.com
  v1.10, Septiembre de 1999. Traduccin: Diciembre 1999

  Este texto, describe el hardware, software y procedimientos necesarios
  para comprimir y escuchar archivos MP3 bajo Linux
  ______________________________________________________________________

  ndice general


  1. Introduccin.

  2. Derechos de autor de este documento.

  3. Dnde obtener este documento.

  4. Reconocimientos.

  5. Renuncia de responsabilidad.

  6. Requisitos de hardware en cuanto a rendimiento.

  7. Requisitos de software

  8. Configuracin de su sistema.

     8.1 Configuracin para la captura analgica de audio.
     8.2 Configuracin del CD-ROM para la captura de audio.
     8.3 Configuraciones adicionales.

  9. Codificacin desde la entrada de audio.

  10. Codificacin desde el CD-ROM.

  11. Escuchando MP3s

  12. Crticas, comentarios y sugerencias.

  13. Notas de la traduccin al castellano.

  14. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Introduccin.


  Este documento describe el hardware, software y procedimientos
  necesarios para codificar y escuchar archivos de sonido en formato
  MP3, desde Linux.


  2.  Derechos de autor de este documento.


  Los derechos de autor para la versin en ingls de este documento,
  pertenecen a Philip Kerr, 1999.

  A menos que se indique lo contrario, los Copyrights de los documentos
  Linux HOWTO, pertenecen a sus respectivos autores. Los Linux-HOWTOs
  pueden ser reproducidos y distribuidos en todo o en parte, por
  cualquier medio fsico o electrnico, en tanto esta declaracin de los
  derechos de autor acompae al documento en todas sus copias. Se
  permite y alienta tambin, la redistribucin comercial, en cuyo caso,
  el autor quisiera recibir informacin respecto a estas.

  Cualquier traduccin, trabajo derivado, o agregado que incorporasen
  cualquier documento de los Linux-HOWTO, debe ir con una copia de este
  copyright. Esto es, no puede producirse otro trabajo basado en un
  HOWTO, e imponer restricciones adicionales a su distribucin. Se
  permitir la excepcin a estas reglas bajo ciertas condiciones;
  contctese con el coordinador del HOWTO, en la direccin que se indica
  ms abajo. En breve, quisiramos promover la difusin de esta
  informacin a travs de tantos medios como sea posible. Pero de todos
  modos, retendremos los derechos de autora de los COMOs, y pedimos se
  nos informe de cualquier plan de redistribuirlos.

  Ante cualquier duda, contacte a Tim Bynum, el coordinador de los
  Linux-HOWTOs, a linux-howto@metalab.unc.edu via email.


  3.  Dnde obtener este documento.


  La versin original ms reciente de este documento puede obtenerla en
  el LDP (Linux Documentation Project) en: http://metalab.unc.edu/LDP/.

  La versin en castellano ms reciente, puede obtenerla en el Insflug
  http://www.insflug.org/documentos/MP3-Como/


  4.  Reconocimientos.


  Para escribir este Como, tuve que devorar el Sound-HOWTO(Sonido-COMO)
  de Jeff Tranter y el Sound-Playing-HOWTO (Reproduccion-de-Sonido-COMO)
  de Yoo. C. Chung.

  Gracias tambin a los autores de otros HOWTOs cuyo trabajo, sirvi de
  referencia al mo:

  Linux System Administrators Guide de Lars Wirzenius.

  Linux Network Administrators Guide de Olaf Kirch.

  Multi Disk System Tuning HOWTO de Stein Gjoen.


  5.  Renuncia de responsabilidad.


  Use la informacin contenida en este documento, bajo su propio riesgo.
  Declino cualquier responsabilidad por los contenidos de este
  documento. El uso de los conceptos, ejemplos, y/u otro contenido del
  presente texto, es completamente bajo su propio riesgo.

  Las licencias de Copyright pertenecen a sus dueos, a menos que se
  especifique expresamente lo contrario. La sola mencin, no pretende
  afectar la validez de cualquier marca comercial o marca registrada.

  La mencin de productos o marcas de fbrica, no implica garantas de
  ningn tipo. Se le recomienda hacer copias de seguridad de su sistema,
  antes de realizar cambios o instalaciones importantes, adems de
  hacerlo regularmente.




  6.  Requisitos de hardware en cuanto a rendimiento.


  El procesamiento digital de Audio, es una tarea que absorbe mucho de
  los recursos del sistema, y de sus capacidades de E/S. Recomiendo como
  mnimo, una mquina con procesador de tipo Pentium.

  Si est usted por codificar audio desde una fuente analgica, una
  tarjeta de sonido PCI, le dar los mejores resultados. La diferencia
  en el rendimiento de E/S entre placas ISA y PCI, es muy significativa,
  mas de 132 Mbits/seg en el caso de tarjetas PCI (valor tomado del PCI-
  HOWTO). Naturalmente, mientras mejor sea la calidad de la placa sonido
  en cuanto a su relacin seal-ruido, mejor ser la calidad de los
  archivos MP3 que se obtenga. He estado usando una SoundBlaster PCI128,
  y la cambi por una SoundBlaster Live Value; ambas tienen excelente
  desempeo, pero la Live tiene una relacin S/R bastante superior,
  suficiente para un trabajo semi-profesional. Recuerde la vieja mxima
  del procesamiento de datos: Si entra basura, sale basura!.

  Cuando grabe seales analgicas de audio a su disco duro,
  procedimiento conocido como d2d o Direct-To-Disk (Directamente al
  disco), el rendimiento de su disco e interface sern crticos. Si
  utiliza un sistema basado en tecnologa IDE, modo 4 o Ultra-DMA,
  procure que sean tan veloces como pueda en su tasa de transferencia.

  La solucin ideal sera emplear un sistema basado en SCSI, puesto que
  sus interfaces y discos obtienen de lejos, mejores rendimientos,
  cercanos en trabajo constante a valores de entre 5mbits/sec para SCSI
  I hasta 80mbits/sec para SCSI Ultra2 Wide. Los discos IDE podrn
  alcanzar velocidades de 8.3 MB/s a 33 MB/s para Ultra-ATA, pero
  recuerde que esos son slo valores de pico. Los valores promedio son
  bastante menores. Si puede hacerse con un disco SCSI AV, hgalo. Los
  discos AV tienen el sistema de cabezas de lecto-escritura optimizado
  para la trasferencia constante de datos. Los otros discos, tanto IDE
  como SCSI, no pueden soportar la transferencia constante de datos,
  debido al calentamiento.

  Claro que un disco que posee cach, dar mejores resultados que otro
  que no lo tenga, actuando como bfer para los casos en que el
  desempeo de las cabezas se vea excedido por las necesidades de
  transferencia.

  Si su disco no cumple con las especificaciones de arriba, su grabacin
  estar plagada de ruidos y saltos, en las partes en que el disco no
  haya podido escribir la seal digitalizada. Si piensa dedicarse a
  grabar sucesos irrepetibles, como recitales en vivo, ser mejor que
  invierta en tecnologa SCSI.

  Otra causa de fallos en la escritura directa al disco, es un sistema
  sobrecargado. Las tareas corriendo en segundo plano pueden frenar
  momentneamente al sistema. Se recomienda correr tan pocas tareas en
  segundo plano como se pueda, en particular servicios basados en redes.
  Para ms informacin acerca de la configuracin de los servicios de
  red, as como scripts de inicio, refirase a las guas del
  Administrador de Redes y Administrador del Sistema.

  El trabajo de la memoria de intercambio puede enlentecer tambin el
  sistema, as que lo mejor ser que instale tanta memoria RAM como
  pueda; le recomiendo 32Mb como mnimo, pero de seguro le vendra bien
  un poco ms.

  Para los que quieren obtener lo mximo de sus sistemas, optimizar el
  kernel probablemente no sea una mala idea.

  Si bien las especificaciones de hardware de ms arriba, le dejarn
  ante un equipo mnimamente decente para sus trabajos de codificar
  informacin de audio, no dude experimentar con equipos ms viejos/ms
  pequeos, si no tiene nada mejor a mano.

  Es un buen desafo para un sysadmin, lograr resultados satisfactorios
  de un equipo ms pequeo.

  Otro factor importante es el cableado de audio. Los cables y
  conectores baratos, de baja calidad, producirn como resultado,
  grabaciones de calidad pobre. Si su tarjeta admite el uso de
  conectores RCA, prefiralos. Usar conectores dorados, y mantener los
  cables de audio apartados de los de alimentacin o datos, ayudar a
  evitar interferencias y elevar la calidad (si no tiene ms remedio,
  crcelos a 90 grados).

  Pero tenga en cuenta que la fortuna que gaste en el mejor de los
  cableados, se perder si el resto del equipo no ha sido optimizado.

  Para extraer la informacin de audio desde la unidad de CD-ROM, la
  velocidad ser factor determinante del tiempo que tome la lectura de
  los datos desde los discos. Una lectora de simple velocidad, ser
  demasiado lenta, a menos que se arme Vd. de mucha paciencia.

  Si su CD no tiene capacidad de extraccin de audio por el bus de
  datos, no est todo perdido; la unidad de CD-ROM se puede conectar a
  la tarjeta de sonido, bien sea utilizando el conector interno, o
  uniendo la salida de auriculares de la lectora, con la entrada de
  lnea de la placa de audio. Regule el volumen de los auriculares hasta
  que no note distorsin.

  Aunque ni los niveles de salida ni la impedancia de la toma de
  auriculares son iguales a los de lnea, estos se compensan, y se
  pueden obtener resultados aceptables, y esto aplica  para cualquier
  otro dispositivo con salida de auriculares, como por ejemplo,
  walkmans, sintonizadores de radio porttiles.  minidiscs porttiles,
  etc. De todos modos, slo debe ser utilizado como ltimo recurso,
  cuando no haya otro medio.

  Para obtener informacin detallada acerca de cmo configurar su placa
  de sonido, sera muy aconsejable la lectura del Sound-HOWTO (Su
  traduccin, Sonido-COMO est disponible en
  http://www.insflug.org/documentos/Sonido-Como).


  7.  Requisitos de software


  Convertir las seales de audio a MP3s supone normalmente un proceso de
  dos etapas, la primera es la de grabar el audio a formato WAV, y la
  segunda es convertir el archivo WAV, a MP3. Dependiendo del formato
  desde el que quiera convertir: CD o audio directo, precisar
  herramientas distintas para obtener su archivo WAV.

  Si pretende codificar desde la entrada de audio, precisar un programa
  que grabe la entrada de audio de su tarjeta de sonido, y la almacene
  como archivo WAV en su disco duro. A continuacin algunas herramientas
  que pueden ser de utilidad:


    wavrec se distribuye como parte de wavplay, disponible para
     descargar de:

     ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/

    cdda2wav Para convertir Audio CD a formato WAV, accin conocida
     como rippeo o extraccin:

     http://metalab.unc.edu/pub/Linux/apps/sound/cdrom/

    cdparanoia

     http://www.xiph.org/

    Para convertir archivos WAV a formato MP3:

    Blade's MP3 Encoder (bladeenc)

     http://bladeenc.cjb.net

    Para escuchar (reproducir) sus archivos MP3, necesitar un
     reproductor:


    Xmms (Conocido desde sus principios como X11Amp)

     http://www.xmms.org

    Xaudio

     http://www.xaudio.com


    Necesitara tambin un programa de mezcla (it/mixer/); Xmixer
     funciona muy bien, y se incluye con la mayora de las
     distribuciones.


  8.  Configuracin de su sistema.


  Esta seccin, describir los conceptos bsicos para preparar un
  sistema Linux, para grabar sonido desde la entrada correspondiente, o
  desde el lector de CD-ROM.

  Basar esta descripcin en mi sistema Linux Intel, corriendo RedHat
  5.2, pero el asunto de la distribucin que se use, no hace diferencia.
  Trabajar en breve, sobre la versin para plataformas Sparc. (Si tiene
  xito con este COMO, hgamelo saber).

  Desde luego que un requisito razonable, a esta altura, es una tarjeta
  de sonido funcionando. Insisto nuevamente en la lectura del Sound-
  HOWTO (Sonido-COMO, http://www.insflug.org/documentos/Sonido-Como) de
  Jeff Tranter, para una buena lectura posterior del Sound-Playing-
  HOWTO, (http://www.insflug.org/documentos/Reproduccion-De-Sonido-Como
  de Yoo.  C. Chung.

  Los COMOs que menciono, cubrirn el tema de hacer funcionar la tarjeta
  de sonido, mucho mejor de lo que podra hacerlo yo aqu.


  8.1.  Configuracin para la captura analgica de audio.


  Primeramente, configure su fuente de sonido. Hay muchas maneras de
  enviar audio a su PC Linux, y algunas de las mas comunes son:

  De Line Out a Line In. (Salida de Lnea. a Entrada de Lnea). La
  mayora de los sistemas de audio, posee un conector de salida de
  lnea. El nivel de los conectores de lnea, es un estndar que
  especifica el voltaje y la corriente que puede emitir un dispositivo.
  Si mal no recuerdo, se trata de 500mA para sistemas domsticos y semi-
  profesionales, y 750mA, para equipamientos profesionales. Supongo que
  el estndar en tarjetas de sonido, ronda los 500mA, pero las tarjetas
  ms nuevas, puede que se adhieran al segundo estndar. No habr mucha
  diferencia a menos que trabaje con niveles de seal muy altos.

  Los niveles de Lnea, normalmente se usan para conectar entre s
  equipos Hi-Fi y amplificadores, as que aparatos como Platinas de
  cinta (Decks), Sintonizadores de Radio, Reproductores de discos
  compactos, DAT y MiniDisc, deberan poder conectarse sin problemas.

  Los tocadiscos (giradiscos) o bandejas, debido a que poseen un nivel
  de salida distinto (Phono) pueden tener algn tipo de problema. Lea
  ms adelante para obtener mas informacin.

  Tambin podra capturar audio de un VCR. Casi todos los equipos de
  este tipo, poseen un conector para la salida de sonido, o bien es
  posible obtener una salida de linea del conector SCART, si tuviera
  uno.

  Salida de grabacin a Ent. de Lnea, Salida de Linea a Entrada de
  Cinta del amplificador de potencia. Esta configuracin reemplaza la
  grabadora de cinta convencional que se conecta al equipo de potencia,
  por su PC con Linux. La salida de Linea a la entrada de Cinta, permite
  monitorear el nivel de seal.

  Micrfonos en la entrada de Micrfono. Los voltajes generados por los
  micrfonos, suelen ser mucho menores que los de lnea, as que si
  planea conectar su Micro a la entrada de lnea, puede que jams grabe
  nada en absoluto.

  ATENCIN, hacer las cosas al revs, es decir, conectar seales con
  nivel de Lnea en la entrada de Mic., puede daar seriamente su
  tarjeta de sonido!!

  Los tocadiscos o giradiscos (Espaa), bandejas o tornamesas (Latino-
  Amrica) proporcionan un tipo de seal de salida denominada Phono, y
  la diferencia de este tipo de seal no radica slo en en nivel de la
  misma, sino en su impedancia y en un tipo especial de ecualizacin
  posterior necesaria (RIAA). Si conecta un tocadiscos directamente a
  una toma de lnea, no slo puede daar el sistema, sino que la
  grabacin ser psima. Si desea digitalizar discos de vinilo, tiene 3
  opciones:


    Conectar el tocadiscos a la entrada de Phono de su amplificador, y
     la salida Rec Out del amplificador a la Lnea In de su tarjeta de
     sonido:



         Tocadiscos                Amplificador                       PC
       +------------+       +--------------------+          +-----------+
       |   Out      |       |  Phono    Rec Out  |          |  Line In  |
       |    R ()------------->() R     R ()----------------->() R   |
       |            |       |                    |          |           |
       |    L ()------------->() L     L ()----------------->() L   |
       |            |       |                    |          |           |
       +------------+       +--------------------+          +-----------+





  o alternativamente, si tiene entrada/salida Tape/DAT/MiniDisc, y un
  conmutador de seleccin de fuente de grabacin: conecte la toma Tape
  Out en lugar de Rec out a la entrada de lnea del PC, y la salida
  (line out del PC a la toma Tape In; de este modo podr escuchar el PC
  en el equipo, y direccionar al PC la fuente que quiera usando el
  conmutador de fuente de grabacin (rec out selector).

    Si no tiene amplificador con entrada Phono, puede utilizar una
     pequea mesa de mezclas, que tenga entrada Phono, y llevar la
     salida maestra a la entrada de lnea del PC. No obstante, la
     calidad de la preecualizacin RIAA de las mismas, as como su
     relacin seal ruido suele dejar bastante que desear.

    Existen preamplificadores con ecualizacin RIAA, que proporcionan
     seal de linea a partir de una de Phono.

  As mismo cuanto mejor sea la calidad de la cpsula/aguja (stylus) que
  ponga en su tocadiscos, mejor sonido obtendr. Stanton es una marca
  aceptable bastante popular y no muy cara.

  Para utilizar rganos y sintetizadores, se conectan a la entrada de
  lnea (Line In). Las guitarras van por Lnea, pasando por una Caja de
  Inyeccin, usada para elevar la seal a nivel de Linea).

  Antes de conectar nada a su tarjeta de sonido, cercirese de que los
  niveles de volumen de todo, estn al mnimo, y si se tratase de
  micrfonos, que estn apagados, o bien, lejos de los
  parlantes/altavoces.


  8.2.  Configuracin del CD-ROM para la captura de audio.


  Preparar el sistema para extraer el audio de sus CDs, es en realidad
  un procedimiento bastante fcil.

  Si puede or los CDs que reproduce, a travs de los
  parlantes/altavoces y/o el amplificador que conecta a su tarjeta de
  sonido, es muy posible que pueda tambin grabar de ellos.


  8.3.  Configuraciones adicionales.


  Debe entrar en su sistema como lo hace siempre, y usando un programa
  de mezcla, ajustar los niveles adecuados de sonido para que la
  grabacin suene bastante fuerte, pero sin saturar. Yo utilizo mi odo.
  Con el tiempo, sabr cules son los niveles ptimos para su equipo en
  particular.

  Insisto en que debe usted deshabilitar cualquier servicio innecesario,
  o incluso iniciar el sistema en modo monousuario, en especial cuando
  codifique a MP3 desde una fuente de audio. Esto es para asegurar que
  los servicios activos sern los menos, y tambin los retrasos del
  sistema, a la hora de grabar.

  Yo consegu un disco SCSI separado, exclusivamente para hacer mis
  grabaciones en l; lo referir como /mnt/mp3. Hice esto,
  fundamentalmente por el rendimiento que se gana, al usar dispositivos
  SCSI. Por otro lado, grabando en un disco dedicado, se asegura que las
  cabezas no saltarn de repente a otro punto del disco mientras grabe.

  Si precisa informacin respecto a cmo conectar mltiples discos en un
  sistema Linux, srvase leer el Multi-Disk-HOWTO, de Stein GJoen. Puede
  ayudarle.


  9.  Codificacin desde la entrada de audio.



  Antes que nada, cercirese de que cuenta con espacio suficiente en el
  disco duro. Tenga en cuenta que las grabaciones en calidad CD, 44.1
  KHz, 16 bit estreo, ocupan algo de 5Mb. por minuto.

  Yo normalmente grabo en calidad DAT, es decir 48KHz 16 bit stereo.

  Usando wavrec, uso la sintaxis siguiente:



       /usr/local/bin/wavrec -t 60 -s 48000 -S /mnt/mp3/temp.wav




  La primera parte es la ruta especfica a wavrec. -t 60 indica cuanto
  tiempo se debe grabar, en segundos.

  La tercera opcin, especifica la calidad de grabacin (48000 es la
  frecuencia de muestreo DAT, 44100 es la correspondiente a la calidad
  del CD).

  La ultima opcin, indica la trayectoria y archivo destino.

  Para ver la lista completa de parmetros, ejecute waverec --help, o
  lea la pgina del manual correspondiente.

  Este procedimiento, producir un archivo WAV. A continuacin,
  necesitar comprimirlo a formato MP3.

  Use bladeEnc, con los siguientes parmetros en su linea de comandos:



       /usr/local/bin/bladeenc [fuente] [destino] -br 256000




  La opcin -br, indica el ratio de bits por segundo, en este caso, la
  he fijado al mximo (256Kbps). La trayectoria al ejecutable bladeenc,
  puede ser diferente tambin en su sistema.

  Como anteriormente, para conocer el conjunto completo de opciones de
  bladeenc, acompelo con el parmetro --help. En realidad de momento
  no es un parmetro vlido, pero le mostrar la lista de opciones de
  todos modos.


  10.  Codificacin desde el CD-ROM.


  De nuevo, asegrese que hay espacio suficiente en el disco duro.

  Escrib un script muy simple en Perl, que extraer las pistas de un CD
  y luego las comprimir:










  #!/usr/bin/perl

  if ($ARGV[0] ne "") {

      $acount = 1;
      do {
           $cdcap = system("cdparanoia", $count, "/mnt/mp3/tmp/cdda.wav");
           $track = "$ARGV[1]/track".$count.".mp3";
           $benc = system("bladeenc/tmp/cdda.wav $track -br 256000");
           $count++;
      } until $count > $ARGV[0];
      exit;

  } else {
       print "Uso: cdriper [no. de pistas] [directorio destino]\n\n";
  }




  Las lneas de mayor inters son:

  $cdcap = system("cdparanoia", $count, "/mnt/mp3/tmp/cdda.wav");

  Esta lnea llama al extractor de audio (ripper), cdparanoia.  Aquel
  convierte la informacin de audio en crudo del CD, a un archivo en
  formato WAV.

  Estoy usando cdparanoia, pero si quiere usar CDDA2WAV, la linea de
  comando sera:

  $cdcap = system("cdda2wav", $count, "/mnt/mp3/tmp/cdda.wav");

  Los parmetros que siguen, son $count: el nmero de pista que se va a
  extraer, y la trayectoria de salida para el archivo que se obtenga. En
  mi ejemplo, ser el directorio tmp en mi disco SCSI MP3.

  El archivo WAV que se obtiene, es convertido a Mp3 luego, usando
  BladeEnc.

  Escrib este script para Perl, para poder extraer un CD sin tener que
  extraer y comprimir cada pista, y sin usar el modo batch de
  CDParanoia.  Ese modo toma ms espacio en disco, ya que CDParanoia
  extrae el CD completo, lo que puede llegar a significar mas de 600Mb.

  Nota: Tenga en cuenta que el script de ms arriba es muy bsico, y
  carece de ciertas habilidades, como control de errores, etc. Mejrelo
  a su gusto.


  11.  Escuchando MP3s


  Muy bien, con algo de suerte, debe tener usted algunos MP3 en su disco
  duro, listos para escuchar.

  Los dos reproductors de Mp3 ms populares para Linux son Xaudio y Xmms
  (conocido desde el principio como X11amp).

  Hay enlaces a sus respectivos sitios en internet, en la seccin ``''

  He basado este COMO en mi uso de xaudio, fundamentalmente porque puede
  usarse estando o no en Xwindow.

  Este programa es shareware.

  Xaudio es un paquete de programas, de los que nos interesan en
  especial xaudio y mxaudio.

  mxaudio tiene una interfaz muy agradable, y es fcil de usar.

  Las opciones de xaudio pueden verse con el parmetro -help. (xaudio
  -h).

  Para reproducir una pista MP3, intente


       xaudio pista.mp3




  Para reproducir un directorio,



       xaudio *.mp3




  Ambos programas estn acompaados por un archivo README. (LAME)


  12.  Crticas, comentarios y sugerencias.


  Aparece hardware y software nuevo  continuamente. Si utiliza alguna
  versin ms moderna de los programas, o hardware que se lista en este
  documento, o puede agregar cualquier cosa en esta rea, por favor
  enve su Informacin para inclurla, a phil@websentric.com, y la
  incluir en futuras versiones.

  Y ahora divirtase con sus MP3!


  13.  Notas de la traduccin al castellano.


  La primera versin del MP3-Como, ha sido realizada por Ariel Graneros
  larocka@yahoo.com, para su revisin y posterior distribucin en el
  Insflug, por lo que encontrar la ltima versin de esta traduccin en
  http://www.insflug.org

  He tratado de llevar adelante la traduccin del modo ms claro
  posible, no encontrando trmino adecuado para definir rip, optando por
  emplear extraer, y proponiendo la adopcin del trmino ripear.


  14.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.


  En ella encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.













































  Linux Meta-FAQ
  Michael K. Johnson, johnsonm@nigel.vnet.net
  v4.2, 8 de Febrero de 1996

  Esta es la Meta-FAQ para Linux. Es principalmente una lista de preci
  adas fuentes de informacin. Remtete a esas fuentes si quieres apren
  der ms sobre Linux o tienes problemas y necesitas ayuda. Lars Wirze
  nius (wirzeniu@cc.helsinki.fi) escribi la primera versin de este
  documento y ahora est mantenido por Michael K. Johnson (john
  sonm@nigel.vnet.net).  Escrbame si tiene alguna pregunta sobre este
  documento.

  1.  Introduccin

     Qu es Linux?
        Linux es una implementacin de sistemas operativos POSIX
        independiente de la especificacin, con extensiones de SYSV y de
        BSD, que ha sido escrita de la nada. No incluye ningn cdigo
        propietario. Linux es distribuible libremente bajo la "GNU
        Public License". Funciona en compatibles IBM PC con bus ISA o
        EISA (incluyendo las variantes de bus local como PCI y VLB) y
        con procesador 386 o superior.

        Adems, tambin funciona en algunos Amiga y Atari con MMU
        (unidad de gestin de memoria). Esto es, 68020 con MMU externa,
        68030 o 68040.  Una FPU (unidad de punto flotante) tambin es
        requerida y lo ser hasta que alguien escriba un emulador de
        FPU.

        Respecto del soporte para las Alpha de DEC est actualmente en
        desarrollo el ncleo y DEC ha sacado una distribucin denominada
        "BLADE" disponible en ftp.dec.com en el directorio
        /pub/DEC/Linux-Alpha/.  El Linux comercial de Red Hat est ahora
        disponible tambin para las Alpha.

        El soporte para las Sparc est progresando rpidamente y tanto
        Red Hat como Debian han anunciado la prxima llegada de
        distribuciones para ellas.

        Soportes para ARM, PowerPC y MIPS estn en distintas fases de
        desarrollo, pero no lo esperes ya. Lee comp.os.linux.announce en
        su lugar.

        Lee la FAQ para conocer los requisitos de hardware con ms
        exactitud. El ncleo de Linux est escrito por Linus Torvalds
        (Linus.Torvalds@.Helsinki.FI) de Finlandia y por otros
        voluntarios.  La mayor parte de los programas que corren en
        Linux son programas gratuitos de Unix, muchos de ellos del
        proyecto GNU.

     FAQ de Linux
        Una coleccin de problemas comunes y sus soluciones. Respuestas
        a muchas preguntas con mayor rapidez que en la red. Almacenadas
        en muchos FTP sites de Linux (incluyendo /pub/linux/docs en
        tsx-11.mit.edu) y en rtfm.mit.edu el site general para las
        FAQ's.

     HOWTO's sobre Linux
        Son similares a las FAQ's, pero en lugar de responder cuestiones
        tpicas explican cmo hacer tareas comunes, como encargar una
        distribucin de Linux, configurar los servicios de impresin
        bajo Linux, establecer un enlace UUCP bsico, etc. Ver
        sunsite.unc.edu, directorio /pub/Linux/docs/HOWTO/ para las
        versiones definitivas de todos los HOWTO's. Otros sites que
        mantienen copias actualizadas de los HOWTO's son
        ftp.cc.gatech.edu y tsx-11.mit.edu.

        Adems hay muchos pequeos documentos, sin formato fijo,
        llamados "mini-HOWTOs". Estos documentos cubren asuntos muy
        concretos, tales como BogoMIPS o Color-ls. Estn disponibles en
        el directorio /pub/Linux/docs/HOWTO/mini/

     Grupos de noticias sobre Linux
        Hay diversos grupos de noticias de USENET para Linux. No es mala
        idea seguir al menos comp.os.linux.announce si usas Linux. Este
        grupo est moderado por Lars Wirzenius. Para presentar
        documentos al grupo de noticias escribe a la direccin linux-
        announce@news.ornl.gov.  Puedes dirigir tus cuestiones sobre
        comp.os.linux.announce a Lars Wirzenius,
        wirzeniu@kruuna.helsinki.fi

        El grupo de noticias comp.os.linux.announce es un grupo de
        noticias moderado para anuncios sobre Linux (nuevos programas,
        correccin de errores, etc).

        El grupo de noticias comp.os.linux.answers es un grupo de
        noticias moderado al que se envan la Linux FAQ, los HOWTO's y
        otros documentos.

        El grupo de noticias comp.os.linux.setup es un grupo de noticias
        no moderado para la discusin de asuntos y problemas relativos a
        la puesta en funcionamiento de sistemas Linux.

        El grupo de noticias comp.os.linux.admin es un grupo de noticias
        no moderado para la discusin sobre la administracin de un
        sistema Linux.

        El grupo de noticias comp.os.linux.development.system es un
        grupo de noticias no moderado dedicado especficamente a la
        discusin sobre el desarrollo del kernel (ncleo) de Linux. Las
        nicas cuestiones sobre desarrollo de aplicaciones que deben ser
        discutidas aqu son aquellas que estn ntimamente ligadas al
        ncleo. Todas las dems cuestiones de desarrollo son
        probablemente genricas de Unix y deben ser dirigidas un grupo
        de comp.unix, a menos que sean preguntas muy ligadas a Linux, en
        cuyo caso deben ser enviadas a comp.os.linux.apps.

        El grupo de noticias comp.os.linux.development.apps es un grupo
        de noticias no moderado destinado a la discusin sobre el
        desarrollo de aplicaciones en relacin con Linux. No est para
        discutir sobre el lugar en el que se puede conseguir una
        aplicacin para Linux, ni para discusin entre aquellos que
        quieren aplicaciones para Linux.

        El grupo de noticias comp.os.linux.hardware es para preguntas de
        hardware especficas de Linux.

        El grupo de noticias comp.os.linux.networking es para preguntas
        especficas de Linux sobre desarrollo de redes y su puesta a
        punto.

        El grupo de noticias comp.os.linux.x es para cuestiones sobre X-
        Windows relativas a Linux.

        El grupo de noticias comp.os.linux.misc es para cualquier
        discusin que no est cubierta en las temticas de los
        anteriores grupos.
        Por norma, no reenves entre los grupos de noticias de Linux. El
        nico reenvo que es aceptable es un envo ocasional de un grupo
        no moderado a comp.os.linux.announce. La razn para dividir
        comp.os.linux en varios grupos es reducir el trfico en cada
        uno.  Aquellos que no sigan esta regla sern fulminados sin
        piedad...

     Otros grupos de noticias
        No creas que todas tus preguntas son apropiadas para un grupo de
        Linux slo porque t trabajes en Linux. No es tu pregunta
        realmente sobre la progamacin de la shell en cualquier unix o
        clnico de unix?. Entonces pregunta en comp.unix.shell. Es
        sobre GNU Emacs?.  Entonces prueba en gnu.emacs.help. Adems, si
        no conoces otro grupo en el que preguntar, pero piensas que lo
        debe haber, pregunta cortsmente si hay otro grupo que sea ms
        apropiado para tu cuestin. Al menos los grupos
        comp.unix.{questions,shell,programming,bsd,admin} adems de
        comp.windows.x.i386unix deberan ser tiles para un usuario de
        Linux.

     El World-Wide Web
        Greg Hankins, gregh@cc.gatech.edu, mantiene la pgina web madre
        para el proyecto Linux. Su URL es
        http://sunsite.unc.edu/mdw/linux.html

     Linux Journal
        Una revista llamada Linux Journal apareci hace ms de un ao.
        Incluye artculos destinados a casi cualquier nivel y pretende
        ser de ayuda a todos los usuarios de Linux. La subscripcin por
        un ao cuesta $22 en USA, $27 en Canada y Mjico, y $32 en
        cualquier otro pas, pagables en moneda USA. Las solicitudes de
        subscripcin pueden ser enviadas por email a subs@ssc.com, por
        fax a +1-206-782-7191, por telfono a +1-206-782-7733 o por
        correo a Linux Journal, PO Box 85867, Seattle, WA 98145-1867
        USA. SSC tiene una clave PGP pblica por si quieres enviar el
        nmero de tu tarjeta de crdito va email encriptado: haz finger
        a info@ssc.com

     Los Mapas
        La informacin del software gratuito disponible para Linux puede
        ser encontrada en el "Linux Software Map", que est en
        sunsite.unc.edu en /pub/Linux/docs/LSM.gz

        Informacin de proyectos no comerciales puede ser encontrada en
        el "Projects Map", que es enviado ocasionalmente a
        comp.os.linux.announce y guardado en sunsite.unc.edu en el
        directorio /pub/Linux/docs/Projects-Map/Projects-Map.gz

        Informacin sobre productos comerciales puede ser encontrada en
        el "Linux Commercial Products Map" que es enviado ocasionalmente
        a comp.os.linux.announce

  2.  Obtener Linux

  3.  FTP sites de Linux

  Una lista ms completa de los FTP sites de Linux est en el "Linux
  INFO-SHEET", que puede ser encontrado en tsx-11.mit.edu en el
  directorio /pub/linux/docs/. Una versin DVI est en INFO-SHEET.dvi y
  una PostScript en INFO-SHEET.ps.  Los sites ms importantes estn
  listados aqu; por favor, dirgete al INFO-SHEET para conocer el ms
  cercano a t (hay muchos mirrors).

       Nombre textual           Direccion IP    Directorio Linux
       =======================  ==============  ================
       tsx-11.mit.edu           18.172.1.2      /pub/linux
       sunsite.unc.edu          152.2.22.81     /pub/Linux
       nic.funet.fi             128.214.248.6   /pub/OS/Linux

  Estos servidores son los principales de Linux, a los que la mayor
  parte de la informacin llega. Hay muchos servidores espejo de stos;
  por favor, usa el ms cercano a t (cercana a travs de la red).

  3.1.  Linux en BBS's

  Ocasionalmente, alguien manda una lista de BBS's que tienen Linux
  disponible para bajrselo. Prubalas si no tienes FTP. Esta lista
  puede obtenerse por ftp a tsx-11.mit.edu como
  /pub/linux/docs/bbs.list. Puedes usar ftpmail (descrito en este mismo
  documento) para ello si tienes acceso al correo electrnico o pedirle
  a cualquier amigo con acceso a Internet que la consiga para t.

  3.2.  Linux en soportes fsicos

  Linux es distribuido en soporte fsico, incluyendo floppies, CD-ROM y
  cintas, por diversos vendedores. Remtete a el "Distribution HOWTO",
  enviado regularmente a comp.os.linux.announce, y disponible por ftp en
  sunsite.unc.edu como /pub/Linux/docs/HOWTO/distribution-HOWTO.

  3.3.  AFS

  Linux est disponible por AFS montando el volumen project.linux de
  sipb.mit.edu

  3.4.  Redes comerciales

  GEnie tiene un mirror de la mayor parte de tsx-11.mit.edu y
  sunsite.unc.edu.  Compu$erve tambin tiene algunos archivos Linux.

  3.5.  Servidores de correo y similares

  Sunsite ofrece servicios de ftp-mail service en
  ftpmail@sunsite.unc.edu.

  4.  Distribuciones de Linux (aka "releases")

  Linux es distribuido por su autor nicamente como el ncleo. Otras
  personas han recopilado "distribuciones" que pueden ser usadas. Estas
  distribuciones unen el ncleo tal y como su autor lo saca al software,
  para constituirse en un completo paquete de trabajo. La mayora de las
  versiones incluyen tanto programas de aplicacin como software del
  sistema.

  Hay diversas distribuciones de Linux, que estn disponibles en varios
  servidores. Sunsite contiene casi todas las distribuciones en
  /pub/Linux/distributions. Las distribuciones tpicamente recomendadas
  y disponibles gratuitamente son Slackware, Red Hat y Debian. Estas
  pueden ser todas obtenidas gratis en Internet y tambin son vendidas
  en floppies y en CD-ROM's.

  Hay ms distribuciones de Linux. Distribuidores de Linux ms
  comerciales se anuncian en Linux Journal.

  5.  Listas de correo de Linux

  Usadas fundamentalmente para discusin entre desarrolladores de nuevas
  funcionalidades y beta-testers. Ver direcciones en la FAQ. Enva un
  mensaje a majordomo@vger.rutgers.edu con la nica palabra help en su
  cuerpo y obtendrs correo explicndote cmo suscribirte a las muchas
  listas de correo que sobre Linux existen.

  Guarda ese mensaje, ya que te indicar cmo borrarte de las listas, y
  si mandas molestos mensajes a la lista quejndote de que no eres capaz
  (porque no seguiste las instrucciones y no guardaste el mensaje que te
  indicaba cmo hacerlo), podrs ser fustigado por malgastar el dinero y
  el ancho de banda de los dems.

  6.  Documentacin para varios programas

  Muchos programas vienen con algn tipo de documentacin, a menudo en
  un fichero llamado README o similar. Es una MUY buena idea leerlos
  atentamente.  Es aburrido ver (y responder) preguntas que estn
  contestadas en la documentacin.

  7.  Ms Documentacin

  El Linux Documentation Project est trabajando en mucha documentacin.
  Hasta el momento, ms de 1600 pginas de documentacin tipo libro han
  visto la luz para el pblico en general, un amplio conjunto de pginas
  man tambin han salido, y ms que queda por llegar. Comprueba
  sunsite.unc.edu:/pub/Linux/docs/LDP para documentos escritos por el
  LDP. El LDP tambin proporciona los HOWTO's, descritos ms arriba.

  8.  Siguiendo las versiones actuales

  Las nuevas versiones importantes, programas y las versiones portadas
  son normalemente anunciadas en comp.os.linux.announce.  finger
  torvalds@klaava.helsinki.fi para obtener informacin sobre el ncleo.

  9.  Este Documento

  La ltima versin de este documento debera estar siempre disponible
  de tsx-11.mit.edu en /pub/linux/docs en el fichero META-FAQ. Una
  versin DVI debera encontrarse en el mismo directorio como META-
  FAQ.dvi, y una versin PostScript como META-FAQ.ps.

  10.  Legalidad

  Las marcas registradas son de sus propietarios. La satisfaccin no
  est garantizada. No se ofrecen garantas sobre este documento.
  Ninguna donde est prohibido.

  El contenido de este documento es de dominio pblico, pero si lo
  citas, por favor, s educado y nombra la fuente.

  11.  Nota del traductor

  Hola, soy Ivn Casado, del INSFLUG. Me he encargado de traducir este
  documento por amor al arte (al arte del Linux, por supuesto). Espero
  que sea de tu inters y que comprendas que an hay mucho por traducir
  y ms an por escribir.

  He intentado ajustarme totalmente al original de Michael K. Jonhson y
  he revisado la traduccin un par de veces. No obstante an puede
  quedar algo por pulir o se me ha podido colar alguna errata, de cuya
  responsabilidad me hago cargo, pero jams de sus consecuencias.

  Para cualquier comentario, errata o consulta sobre la traduccin,
  acude al rea R34.LINUX de FidoNet o contacta conmigo por NetMail a la
  direccin 2:345/425.25 de la misma red.

  Un saludo, Ivn Casado.

  12.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Mutt-i, GnuPG y PGP Como
  Andrs Seco AndresSH@ctv.es y J.Horacio M.G.
  homega@ciberia.es
  v1.2, 7 de Febrero de 2000

  Este documento explica la forma de configurar Mutt-i, PGP y GnuPG en
  sus diferentes versiones (2.6.x, 5.x y GnuPG) de forma rpida indi
  cando los posibles problemas que pueden surgir al enviar correo fir
  mado o cifrado para ser ledo por clientes de correo que no se ajustan
  a las especificaciones PGP/MIME definidas en la RFC2015 y por otros
  sistemas operativos. Incluye adems un ejemplo de configuracin de
  procmail para enviar las claves pblicas de forma automtica a peti
  ciones recibidas por correo electrnico, como si de un servidor de
  claves se tratara.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Copyright y descarga de responsabilidad

  3.      Nota sobre el intercambio de correo desde/hacia internet

  4.      Configuracin de mutt

  5.      PGP y GnuPG

  5.1.    PGP2

  5.2.    PGP5

  5.3.    GnuPG

  6.      Integracin de PGP y Mutt

  6.1.    Ficheros de configuracin opcionales

  6.2.    Variables de Configuracin General

  6.3.    Variables de Configuracin para PGP2

  6.4.    Variables de Configuracin para PGP5

  6.5.    Variables de Configuracin para GnuPG

  6.6.    Variables de Configuracin Mixta

  7.      Macros interesantes para mutt

  7.1.    Firma sobre el propio texto del mensaje sin usar PGP/MIME con
  PGP5

  7.2.    Firma sobre el propio texto del mensaje sin usar PGP/MIME con
  GnuPG

  7.3.    Edicin del fichero de alias y recarga del mismo

  7.4.    Ms ejemplos de macros

  8.      Algunas recetas para Procmail

  8.1.    Configuracin de Procmail para devolver las claves pblicas
  automticamente

  8.2.    Verificacin y descifrado automticos de mensajes firmados sin
  PGP/MIME

  8.3.    Cambio del tipo MIME para mensajes con claves pblicas sin
  PGP/MIME

  9.      Intercambio de mensajes firmados/cifrados entre diferentes
  clientes de correo y plataformas

  10.     Programas y versiones utilizados

  11.     Ms informacin

  12.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Este documento explica la forma de configurar Mutt-i y PGP en sus
  versiones 2.6.x, 5.x y GnuPG para poder tener en marcha de forma
  rpida un lector de correo con seguridad de firmas y cifrado digital.

  Para esto se incluirn ficheros de configuracin de ejemplo que
  servirn para la puesta en marcha. Para obtener el mximo rendimiento
  y usar todas las caractersticas de los programas que se utilizarn
  ser necesario leer la documentacin adjunta a cada programa y
  reconfigurar dichos ficheros de configuracin que se incluyen como
  ejemplos.

  Adems, se comentarn algunos problemas derivados de la falta de
  seguimiento de la recomendacin RFC2015 sobre PGP/MIME por parte de
  muchos programas de correo electrnico, tanto en Linux como en otros
  sistemas operativos.

  Ser presentado tambin un ejemplo de configuracin de procmail de
  forma que puedan ser enviadas las claves pblicas de manera automtica
  a la recepcin de mensajes que las soliciten.

  Nos gustara dar las gracias a Roland Rosenfeld roland@spinnaker.de,
  Christophe Pernod xtof.pernod@wanadoo.fr, Denis Alan Hainsworth
  denis@cs.brandeis.edu y Angel Carrasco acarrasco@jet.es por sus
  correcciones y sugerencias.

  2.  Copyright y descarga de responsabilidad

  Este documento es copyright  1999 Andrs Seco y J. Horacio M.G., y es
  un documento libre. Puedes distribuirlo bajo los trminos de la GNU
  General Public License, que puedes encontrar en
  http://www.gnu.org/copyleft/gpl.html. Una copia de sta traducida al
  castellano la puedes encontrar en
  http://visar.csustan.edu/~carlos/gpl-es.html

  La informacin y otros contenidos en este documento son lo mejor de
  nuestros conocimientos. Sin embargo, hemos podido cometer errores. As
  que deberas determinar si deseas seguir las instrucciones que se
  encuentran en este documento.

  Nadie es responsable de cualquier dao en sus ordenadores y cualquier
  otra prdida por el uso de la informacin contenida aqu.

  LOS AUTORES Y MANTENEDORES NO SON RESPONSABLES DE CUALQUIER DAO
  INCURRIDO A CAUSA DE ACCIONES TOMADAS EN BASE A LA INFORMACION
  CONTENIDA EN ESTE DOCUMENTO.
  Por supuesto, estamos abiertos a todo tipo de sugerencias y
  correcciones sobre el contenido de este documento.

  3.  Nota sobre el intercambio de correo desde/hacia internet

  Este documento no trata sobre el intercambio de mensajes de correo
  electrnico entre el equipo local y otros equipos (en red local o en
  internet). Dicho intercambio debe ser realizado mediante programas que
  acten como Agentes de Transferencia de Mensajes (MTAs) como Sendmail,
  http://www.sendmail.org, qmail, http://www.es.qmail.org, Exim,
  http://www.exim.org, Smail, ftp://ftp.planix.com/pub/Smail, etc.

  En este documento se presupone que este mtodo de envo/recepcin de
  mensajes fuera del equipo local ya est instalado y funcionando de
  forma correcta. Si puede enviar un mensaje y leer su correo con el
  comando mail desde el indicador de linea de comando de su equipo,

       $ mail -s <asunto> <usuario@dominio.net>
       escribir aqu el texto, y finalizar con un punto en la lnea siguiente

  es que debes tener instalado algn tipo de MTA que se encargue de la
  transferencia de mensajes. En caso contrario, puedes encontrar
  documentacin al respecto en las pginas de manual de smail:

       $ man smail

  o del MTA que tengas instalado, y las de fetchmail:

       $ man fetchmail

  o en otro documento similar a estos que haga referencia a dichos
  programas.

  4.  Configuracin de mutt

  El siguiente fichero de ejemplo es vlido para comenzar a usar Mutt de
  forma bsica incluyendo caminos para los ficheros de alias, mensajes
  enviados y mensajes postpuestos. Se puede realizar una mayor
  personalizacin atendiendo a las indicaciones del manual de Mutt en
  /usr/doc/mutt/ o /usr/doc/mutt-i/

  Ejemplo simple de ~/.muttrc:

  set folder=~/Mail
  set alias_file=.alias
  set postponed=.postponed
  set record=MensajesEnviados
  set signature=.signature
  my_hdr From: Nombre Apellido <Nombre@dominio.com>
  source =.alias

  Es necesario que exista el directorio ~/Mail, que es el que aparece
  como un signo de igual que en el fichero de configuracin
  ~/Mail/.alias, y =.postponed quiere decir para Mutt
  ~/Mail/.postponed). No obstante es posible tener estos ficheros en
  otro directorio siempre y cuando indiquemos el camino completo en
  ~/.muttrc, y tengamos los permisos necesarios para trabajar en dicho
  directorio.

  Tambin hay que personalizar la linea my_hdr con el nombre y la
  direccin de correo electrnico adecuados. En el fichero
  ~/Mail/.signature se puede incluir la firma que aparecer en todos los
  mensajes que se enven.

  Este fichero de configuracion puede llegar a hacerse muy grande, por
  lo que es comn separar algunos de sus comandos en ficheros
  diferentes. Por lo pronto, son facilmente separables las lineas de
  configuracin de PGP o GnuPG y las macros de teclado que
  personalicemos. Para ello seria necesario aadir las lineas siguientes
  al fichero ~/.muttrc:

       source = ~/Mail/.mutt.macros
       source = ~/Mail/.gnupgp.mutt

  y utilizar los ficheros ~/Mail/.mutt.macros y ~/Mail/.gnupgp.mutt para
  introducir en ellos las macros de teclado y la configuracin de PGP o
  GnuPG que ms adelante se comentan.

  Para una informacin ms extensiva y completa sobre el uso y
  configuracin de Mutt, as como de caractersticas avanzadas, ver el
  Manual de Mutt en http://www.lucas.org/manual_mutt.html.

  5.  PGP y GnuPG

  Para usar cualquiera de las versiones de PGP con Mutt-i, primero ser
  necesario configurar adecuadamente PGP de modo que existan el fichero
  con las claves pblicas (anillo de claves pblicas) y el fichero con
  las claves privadas (anillo de claves privadas). Conviene probar
  previamente PGP desde la lnea de comandos para asegurarse de que
  firma y cifra correctamente.

  Recordemos que para Unix las versiones de PGP existentes son 2.6.3(i)
  y 5.0(i), que de ahora en adelante llamaremos PGP2 y PGP5
  respectivamente. GnuPG es un sistema de codificacin nuevo, todava en
  desarrollo aunque muy avanzado, de cdigo abierto y libre, en muchos
  aspectos superior a PGP (ver GnuPG mini como en
  http://www.insflug.org/documentos/GPG-Mini-Como/).

  Aclararemos tambin que PGP, al ser un sistema desarrollado en los
  EE.UU., est sujeto a ciertas leyes sobre la exportacin de programas
  que incluyen cdigo criptogrfico;  por esta razn existe una versin
  internacional para casi todas las versiones numricas, y sta vienen
  denotadas por la letra i (pgp - pgpi).

  5.1.  PGP2

  PGP2 genera claves con el algoritmo RSA (http://www.rsa.com), y como
  algoritmo de cifrado usa IDEA (http://www.ascom.ch).

  Ambos son algoritmos propietarios y su uso est restringido por sus
  respectivas patentes.

  Para su correcto funcionamiento, una vez instalado el programa,
  deberemos tener un directorio ~/.pgp, en el que se encuentren el
  fichero de configuracin pgp-i.conf y los ficheros con los anillos de
  claves pblicas y privadas, pubring.pgp y secring.pgp respectivamente.

  5.2.  PGP5

  Las claves generadas por PGP5 son del tipo DSS/DH (Digital Signature
  Standard / Diffie-Helman). PGP5 usa como algoritmos de cifrado CAST,
  Triple-DES, e IDEA.  PGP5 puede trabajar con datos cifrados y/o
  firmados con RSA (PGP2), e incluso usar estas claves para cifrar y/o
  firmar digitalmente (con claves generadas por PGP2, ya que PGP5 no
  puede generar dichas claves).  Por contra, PGP2 no reconoce las claves
  DSS/DH de PGP5;  esto crea un problema de incompatibilidad, pues en
  Unix/Linux todava muchos usuarios tienen instalado slo la versin de
  PGP2.

  Para el correcto funcionamiento de PGP5, en el directorio ~/.pgp, se
  encontrarn los anillos de claves pblicas y privadas (pubring.pkr y
  secring.skr respectivamente), as como el fichero de configuracin
  pgp.cfg.

  En caso de tener instaladas las dos versiones de PGP (por tanto,
  habremos instalado y configurado PGP2 antes que PGP5), el fichero de
  configuracin ~/.pgp/pgp.cfg de PGP5 lo crearemos como un enlace
  simblico al fichero de configuracin ~/.pgp/pgp-i.conf,

       ~/.pgp$ ln -s pgp-i.conf pgp.cfg

  aadiendo las siguientes lneas al final del fichero ~/.pgp/pgp-
  i.conf:

       PubRing = "~/.pgp/pubring.pkr"
       SecRing = "~/.pgp/secring.skr"
       RandSeed = "~/.pgp/randseed.bin"

  Los ficheros con los anillos de claves de las diferentes versiones
  pueden coexistir sin ningn problema en el mismo directorio.
  5.3.  GnuPG

  GnuPG es un programa con las mismas funciones que el anterior. A
  diferencia de PGP, GnuPG evita el uso de algoritmos con patentes
  restrictivas. PGP puede ser usado libremente con fines personales,
  pero no comerciales, y su desarrollo es cerrado.  GnuPG es de libre
  uso, y de desarrollo abierto, al igual que nuestro sistema operativo
  favorito (adems de que su implementacin y desarrollo es
  principalmente en Linux).

  Las claves generadas por GnuPG son del tipo DSA/ElGamal (Digital
  Signature Algorithm, tambin conocido como DSS). Es totalmente
  compatible con PGP, excepto en el uso de los algoritmos con patentes
  restrictivas RSA e IDEA.  No obstante, es posible implementar cierta
  compatibilidad al respecto (ver GnuPG mini como en
  http://www.insflug.org/documentos/GPG-Mini-Como/ para su configuracin
  e interaccin con PGP2 y PGP5).

  6.  Integracin de PGP y Mutt

  La operacin a realizar en los mensajes salientes (firmar, cifrar o
  ambas) se elige justo antes de pulsar y para enviar el mensaje, en
  el men de opciones que aparece con la opcin p. Una vez elegida la
  operacin a realizar simplemente cambiar la linea de PGP en la
  cabecera que se muestra en pantalla, pero hasta que no enviemos el
  mensaje con y no se nos pedir introducir la frase de paso para
  activar la firma del mensaje o las claves publicas a utilizar para el
  cifrado en caso de que no coincida algn destinatario con los que
  tienen clave pblica en nuestro anillo de claves.

  NOTA: En caso de que cometamos un error al introducir la frase de paso
  cuando nos es solicitada, parecer que Mutt se queda colgado, pero
  no ser as, si no que estar esperando que la volvamos a introducir.
  Para ello pulsaremos la tecla <Intro> y borraremos la contrasea de la
  memoria con el juego de teclas <Ctrl>F.  A continuacin repetiremos la
  operacin de enviar el mensaje (y) y tendremos que volver a
  introducir la contrasea.

  Mutt, en este caso, usar PGP/MIME para enviar el mensaje, de modo que
  aparecer un nuevo adjunto al mensaje con la firma (si slo hemos
  elegido firmar) o cifrar el mensaje completo (todas sus partes MIME,
  adjuntos incluidos) y dejar tan solo 2 partes MIME, la primera con la
  versin de PGP/MIME y la segunda con el mensaje total (adjuntos
  incluidos) cifrado (y firmado si as lo solicitamos).

  Nota: Por varios motivos, como que el lector de correo del
  destinatario del mensaje no sea capaz de reconocer el formato MIME,
  podemos necesitar que la firma no vaya acompaando al mensaje como un
  adjunto, sino que aparezca en el mismo cuerpo del mensaje. Para este
  modo, ver la seccin que trata sobre application/pgp con ``PGP5'' y
  con ``GnuPG''.

  En los mensajes entrantes que vengan firmados o cifrados con PGP/MIME,
  Mutt intentar verificar la firma y/o descifrarlo automticamente. Ver
  la seccin sobre ``recetas para procmail'', en donde se comenta cmo
  cambiar de forma automtica el tipo MIME para los mensajes recibidos
  cifrados o firmados, que no indican su tipo MIME correctamente.

  6.1.  Ficheros de configuracin opcionales

  En las siguientes secciones se habla sobre las modificaciones al
  fichero de configuracin de Mutt para poder usar ``PGP2'', ``PGP5'', y
  ``GnuPG'' con comodidad.

  Para ello se usa un fichero de configuracin llamaremos .gnupgp.mutt
  (el nombre es inventado y le podramos llamar de cualquier otro modo,
  siempre y cuando indiquemos el origen de este fichero de configuracin
  en el fichero de configuracin principal ~/.muttrc.

  Esto se hace incluyendo el origen (dnde est situado) completo del
  fichero de configuracin .gnupgp.mutt, en una lnea al final del
  fichero ~/.muttrc.  El directorio en el que situemos ste u otros
  ficheros opcionales de configuracin puede ser cualquiera, siempre y
  cuando tengamos los permisos correctos de acceso a l (en un captulo
  anterior lo incluimos dentro del directorio ~/Mail/), o podemos crear
  un directorio dentro de nuestro directorio de usuario, con un nombre
  aleatorio:

       ~$ mkdir mutt.varios

  en el que copiaremos (o crearemos) el fichero de configuracin
  opcional

       source ~/mutt.varios/.gnupgp.mutt

  De este modo Mutt aceptar las variables de configuracin en

  Este sistema es til para evitar tener un fichero de configuracin
  desordenado y demasiado grande, y puede ser usado para poner cualquier
  otro grupo de variables de configuracin en otro fichero aparte.  Por
  ejemplo, de modo parecido aunque no igual, si usamos vim como el
  editor por defecto en Mutt, le podemos indicar a .muttrc que use un
  fichero de configuracin .vimrc distinto al que usamos cuando usemos
  vim sobre la lnea de comandos.  Para ello, copiaremos primero
  ~/.vimrc a nuestro directorio ficticio para ficheros de configuracin
  opcionales ~/mutt.varios/ y le daremos un nombre distinto (vg.
  vim.mutt):

       $ cd /home/usuario
       ~$ cp .vimrc mutt.varios/vim.mutt

  a continuacin cambiaremos las variables de configuracin que deseamos
  que sean distintas en vim como editor de Mutt, y finalmente
  modificaremos

       set editor="/usr/bin/vim -u ~/mutt.varios/vim.mutt"

  Con esta ltima lnea estamos indicando a Mutt que, en lugar de usar
  su editor interno por defecto, use un editor externo, Vim, con las
  opciones de configuracin que deseamos.

  6.2.  Variables de Configuracin General

  Hay un nmero de variables que nos servirn para el uso de cualquiera
  de los tres sistemas de cifrado pblico con Mutt por igual.  stas
  variables son del tipo booleano, y aceptan las opciones set (activada)
  o unset (desactivada).

  En el fichero de configuracin (bien sea ~/.muttrc, o
  ~/mutt.varios/.gnupgp.mutt, o el que decidamos), el signo de
  almohadilla (#) es un comentario libre y no se interpreta.  Por tanto,
  lo usaremos aqu delante de la aclaracin a cada una de las variables:

     unset pgp_autosign
        # si esta variable est activada, Mutt nos pedir firmar todo el
        # correo saliente. ``(1)''

     unset pgp_autoencrypt
        # si esta variable est activada, Mutt nos pedir cifrar todo el
        # correo saliente. ``(1)''

     set pgp_encryptself
        # guardar una copia cifrada de todos los mensajes que se enven
        cifrados
        # (precisa de la variable de configuracin general set
        copy=yes).

     set pgp_replysign
        # al responder a un mensaje firmado, requerir que el mensaje de
        respuesta
        # sea tambin firmado.

     set pgp_replyencrypt
        # al responder a un mensaje cifrado, requerir que nuestra
        respuesta
        # tambin vaya cifrada.

     set pgp_verify_sig=yes
        # queremos que se verifique automticamente las firmas de los
        mensajes
        # entrantes? por supuesto que s!

     set pgp_timeout=<n>
        # eliminar la contrasea de la memoria intermedia cada <n>
        # segundos.``(2)''

     set pgp_sign_as=
     # qu clave quiero usar por defecto para firmar los mensajes
     salientes?
     # Nota: es posible especificar un id de usuario en lugar de un id
     de
     # clave, pero esto podra confundir si tenemos el mismo id de
     usuario
     # para distintas claves.

     set pgp_strict_enc
     # usar codificacin quoted-printable siempre que PGP la
     # requiera.

     unset pgp_long_ids
     # no usar identificadores de claves de 64 bits, usar de 32 bits.

     set pgp_sign_micalg=<algo>
     # algoritmo de comprobacin de la integridad de un mensaje, en
     donde
     # <algo> es uno de los siguientes:``(3)''

     
     pgp-mda5
     para claves RSA

     
     pgp-sha1
     para claves DSS (DSA)

     
     pgp-rmd160

  En las tres subsecciones siguientes se especificarn las variables a
  configurar para cada una de las versiones.  La cuarta subseccin
  explica los cambios en las variables en caso de que usemos ms de una
  versin.

  (1) dado que el contnuo requerimiento por parte de Mutt para que
  firmemos o cifremos todos los mensajes salientes puede representar un
  inconveniente, es deseable dejar esta variable desactivada.  Esto es
  especialmente as en el caso del cifrado, ya que no dispondremos de
  las claves pblicas de todos los destinatarios.

  (2) depende del nmero de mensajes que firmemos o descifremos
  generalmente, nos interesar mantener la contrasea en la memoria
  durante ms o menos tiempo.  Esta opcin nos evita que tengamos que
  introducir la contrasea por cada mensaje que firmemos, o por cada
  mensaje cifrado que leamos.  Aviso: mantener la contrasea en la
  memoria es inseguro, especialmente en sistemas conectados a una red.

  (3) esto slo es necesario para la clave con la que hayamos
  configurado para firmar.  Cuando la clave la escojamos desde el men
  de composicin, Mutt se encargar de calcular el algoritmo.

  6.3.  Variables de Configuracin para PGP2

  Para utilizar PGP2 con Mutt-i es necesario aadir las siguientes
  lneas al fichero ~/mutt.varios/.gnupgp.mutt:

  set pgp_default_version=pgp2
  set pgp_key_version=default
  set pgp_receive_version=default
  set pgp_send_version=default
  set pgp_sign_micalg=pgp-md5
  set pgp_v2=/usr/bin/pgp
  set pgp_v2_pubring=~/.pgp/pubring.pgp
  set pgp_v2_secring=~/.pgp/secring.pgp

  Evidentemente, debern existir los ficheros ~/.pgp/pubring.pgp y
  secring.pgp. Ms informacin sobre PGP2 con el comando man pgp.

  6.4.  Variables de Configuracin para PGP5

  Para utilizar PGP5 con Mutt-i es necesario aadir las siguientes
  lneas al fichero ~/mutt.varios/.gnupgp.mutt:

       set pgp_default_version=pgp5
       set pgp_key_version=default
       set pgp_receive_version=default
       set pgp_send_version=default
       set pgp_sign_micalg=pgp-sha1
       set pgp_v5=/usr/bin/pgp
       set pgp_v5_pubring=~/.pgp/pubring.pkr
       set pgp_v5_secring=~/.pgp/secring.skr

  Evidentemente, debern existir los ficheros ~/.pgp/pubring.pkr y
  secring.pkr. Ms informacin sobre PGP 5 con el comando man pgp5.

  6.5.  Variables de Configuracin para GnuPG

  Para utilizar GnuPG con Mutt-i es necesario aadir las siguientes
  lneas al fichero ~/mutt.varios/.gnupgp.mutt:

       set pgp_default_version=gpg
       set pgp_key_version=default
       set pgp_receive_version=default
       set pgp_send_version=default
       set pgp_sign_micalg=pgp-sha1
       set pgp_gpg=/usr/bin/gpg
       set pgp_gpg_pubring=~/.gnupg/pubring.gpg
       set pgp_gpg_secring=~/.gnupg/secring.gpg

  Evidentemente, debern existir los ficheros ~/.gnupg/pubring.gpg y
  secring.gpg. Ms informacin sobre GnuPG com el comando man gpg.gnupg,
  man gpgm, y man gpg.

  6.6.  Variables de Configuracin Mixta

  En el caso que deseemos tener ms de uno de los tres sistemas a la
  vez, es preciso modificar algunas de las variables que hemos comentado
  anteriormente.  En realidad tan slo se trata de eliminar la
  redundancia en la versin configurada por defecto.

  Si, por ejemplo, decidiramos usar GnuPG como el sistema a utilizar
  por defecto, todas las teclas relacionadas con PGP/GnuPG de Mutt
  llamaran a ste sistema para cualquier operacin de cifrar,
  descifrar, firmar, verificar, etc...
  $set_pgp_default una sla vez, as:

       set pgp_default_version=gpg

  con lo cual, y para el uso conjunto de los tres sistemas, la parte
  correspondiente al fichero ~/mutt.varios/.gnupgp.mutt podra quedar
  del siguiente modo:

       set pgp_default_version=gpg     # versin a usar por defecto

       set pgp_key_version=default     # clave que se usar por defecto, en este
                                       # caso la definir gnupg

       set pgp_receive_version=default # para descodificar usar la versin que se
       set pgp_send_version=default    # haya configurado por defecto (gpg)

       set pgp_gpg=/usr/bin/gpg        # localizacin del binario de GnuPG
       set pgp_gpg_pubring=~/.gnupg/pubring.gpg        # fichero de claves pub. GnuPG
       set pgp_gpg_secring=~/.gnupg/secring.gpg        # fichero de claves secr. GnuPG

       set pgp_v2=/usr/bin/pgp         # localizacin del binario de PGP2
       set pgp_v2_pubring=~/.pgp/pubring.pgp           # fichero de claves pub. PGP2
       set pgp_v2_secring=~/.pgp/secring.pgp           # fichero de claves secr. PGP2

       set pgp_v5=/usr/bin/pgp         # localizacin del binario de PGP5
       set pgp_v5_pubring=~/.pgp/pubring.pkr           # fichero de claves pub. PGP5
       set pgp_v5_secring=~/.pgp/secring.skr           # fichero de claves secr. PGP5

  7.  Macros interesantes para mutt

  Mutt es altamente configurable y puede modificar su forma de trabajo
  de modo muy flexible si se hace un uso adecuado de las opciones de
  .muttrc.

  Aqu se presentan algunas macros que ayudarn a generar firmas
  evitando seguir el estndar PGP/MIME, para enviarlas a destinatarios
  que sabemos de cierto que no pueden verificar las firmas PGP/MIME, y
  para editar el fichero de alias y volver a cargarlo sin salir de Mutt
  (aunque esto ltimo no est relacionado con PGP/GnuPG, se presenta
  como ejemplo para mostrar el poder de las macros en Mutt).

  Es posible indicar a Mutt las combinaciones de teclado que queremos
  utilizar para las opciones de PGP/GnuPG que deseamos implementar en el
  correo electrnico. Aun cuando algunas de estas opciones vienen
  configuradas por defecto, podemos fcilmente cambiarlas o aadir otras
  modificando la configuracin.

  7.1.  Firma sobre el propio texto del mensaje sin usar PGP/MIME con
  PGP5

  Antes de la existencia de PGP/MIME, la firma de un mensaje iba
  incluida en el cuerpo del mensaje. Este caso sigue siendo comn con
  muchos lectores de correo.

  En caso de que queramos firmar de esta forma, tenemos dos opciones,
  dejar el tipo MIME del mensaje intacto o modificarlo como
  application/pgp.

  Para implementar estas dos formas de firmar en Mutt, aadiremos las
  lneas siguientes al fichero ~/mutt.varios/mutt.macros.  Previamente,
  habremos indicado el origen de este fichero de configuracin opcional
  al fichero de configuracin principal .muttrc; ver ``ficheros de
  configuracin opcionales'':

       macro   compose \Cp     "F/usr/bin/pgps\ny"
       macro   compose S       "F/usr/bin/pgps\ny^T^Uapplication/pgp; format=text; x-action=sign\n"

  y de esta forma, pulsando <Ctrl>p o S podremos incluir la firma
  digital en el adjunto del mensaje sobre el que est situado el cursor
  en la pantalla, en la que se encontrar el mensaje listo para ser
  enviado.

  7.2.  Firma sobre el propio texto del mensaje sin usar PGP/MIME con
  GnuPG

  Igual que en el caso anterior, pero con GnuPG. Las macros quedan de la
  siguiente manera:

       macro   compose \CP     "Fgpg --clearsign\ny"
       macro   compose \CS     "Fgpg --clearsign\ny^T^Uapplication/pgp; format=text; x-action=sign\n"

  7.3.  Edicin del fichero de alias y recarga del mismo

  Con esta macro para incluir en ~/mutt.varios/macros.mutt puedes editar
  con vi (modificando la linea puedes usar otro editor) el fichero de
  alias sin salir de Mutt pulsando <Alt>a.

       macro   index   \ea     "!vi ~/Mail/.alias\n:source =.alias\n"

  7.4.  Ms ejemplos de macros

  El siguiente listado ha sido obtenido de Roland Rosenfeld y presenta
  macros para cambiar el sistema de firmado/cifrado por defecto y
  firmar sin PGP/MIME con GnuPG:

  # ~/Mail/.muttrc.macros
  # Fichero de configuracin del teclado en Mutt-i
  # copiado, modificado y traducido del original:
  #
  ################################################################
  # The ultimative Key-Bindings for Mutt                         #
  #                                                              #
  # (c) 1997-1999 Roland Rosenfeld <roland@spinnaker.rhein.de>   #
  #                                                              #
  # $ Id: keybind,v 1.36 1999/02/20 19:36:28 roland Exp roland $ #
  ################################################################
  #
  # Para su correcto funcionamiento, aadir al fichero de
  # configuracin ~/.muttrc la lnea:
  # source ~/Mail/.muttrc.macros
  #

  # Generic keybindings
  # (para todos los mens de Mutt excepto el del paginador!)
  # Con las tres siguientes podemos cambiar el sistema de cripto que
  # estemos utilizando por defecto:

  # <ESC>1 para GnuPG
  macro   generic \e1     ":set pgp_default_version=gpg ?pgp_default_version\n"\
                          "Switch to GNU-PG"

  # <ESC>2 para PGP2
  macro   generic \e2     ":set pgp_default_version=pgp2 ?pgp_default_version\n"\
                          "Switch to PGP 2.*"

  # <ESC>5 para PGP5
  macro   generic \e5     ":set pgp_default_version=pgp5 ?pgp_default_version\n"\
                          "Switch to PGP 5.*"

  # index, OpMain, MENU_MAIN
  # (Men principal)
  # La siguiente slo funciona desde el men principal (el que nos
  # encontramos nada ms abrir Mutt).  La combinacin de las teclas
  # <CTRL>K nos permite extraer las claves pblicas de un mensaje si las
  # hubiere (esto se sabe porque el mensaje viene precedido por la letra
  # K):

  macro  pager   \Ck     ":set pipe_decode pgp_key_version=pgp2\n\e\ek:set pgp_key_version=pgp5\n\e\ek:set pgp_key_version=gpg\n\e\ek:set pgp_key_version=default nopipe_decode\n"\ "Extract PGP keys to PGP2, PGP 5, and GnuPG keyrings"

  # pager, OpPager, MENU_PAGER
  # (Men del Paginador)
  # Permite las mismas operaciones que en el primer caso, y con las mismas
  # combinaciones de claves, pero en este caso desde el men del
  # paginador:

  macro   pager   \e1     ":set pgp_default_version=gpg ?pgp_default_version\n"\
                          "switch to GNUPG"

  macro   pager   \e2     ":set pgp_default_version=pgp2 ?pgp_default_version\n"\
                          "switch to PGP 2.*"

  macro   pager   \e5     ":set pgp_default_version=pgp5 ?pgp_default_version\n"\
                          "switch to PGP 5.*"

  # compose, OpCompose+OpGerneric, MENU_COMPOSE
  # (Men de composicin)
  # Las siguientes operaciones se realizan desde el men de composicin.
  # Esto es, una vez hemos compuesto el mensaje y lo cerramos para
  # enviarlo, justo antes de presionar la tecla "Y" que nos permita
  # pasrselo al MTA.

  # En este caso creamos un men que se abre al presionar la tecla "P".
  # Las opciones de este men las ligamos a MENU_PGP. Estas son las
  # opciones de uso principal (codificacin y firma).

  bind    compose p       pgp-menu

  # Como muchos programas no son capaces de implementar las
  # espicificaciones de MIME/PGP (especialmente los de M$), las teclas
  # <CTRL>P nos permitirn firmar los mensajes "a la antigua"
  # (Application/PGP):

  macro   compose \CP     "Fgpg --clearsign\ny"

  # A continuacin, <CTRL>S nos permitir firmar "a la MIME/PGP" con la
  # clave que tengamos definida por defecto.  Esta macro no es necesaria
  # ya que lo mismo podemos hacer desde el men "P":
  macro   compose \CS     "Fgpg --clearsign\ny^T^Uapplication/pgp; format=text; x-action=sign\n"

  Es posible aadir ms macros, y algunas otras vienen ya configuradas
  por defecto en nuevas versiones de Mutt.  Algunas otras opciones
  incluyen:

    <CTRL>K (extraer claves pblicas adjuntas a un mensaje)

    <ESC>K (adjuntar una clave pblica a un mensaje)

    <CTRL>F (al usar la contrasea para firmar o descodificar un
     mensaje, sta queda grabada en memoria.  De este modo podemos
     borrar la contrasea de la memoria)

    etc...

  Para ver qu otras opciones tenemos activadas basta con ir al men de
  ayuda (?)  desde el men en que nos encontremos.

  8.  Algunas recetas para Procmail

  8.1.  automticamente Configuracin de Procmail para devolver las
  claves pblicas

  Aunque no es el objetivo de este Como, comentaremos que la forma ms
  segura de obtener la clave pblica de una persona es que ella misma
  nos la prova en mano.

  Como en muchas ocasiones este mtodo no es posible (distancia que
  separa a los interesados) las personas se pueden enviar por correo
  electrnico las claves pblicas o buscarlas en un servidor de claves,
  pero ninguno de los mtodos garantiza que la clave obtenida sea
  realmente de quien parece ser su poseedor, a menos que mediante una
  comunicacin de otro tipo que consideremos seguro (buscar en la guia
  de telfonos al propietario y pedirle que nos lea la huella de su
  clave pblica para confirmar que es la misma de la clave que hemos
  obtenido por el metono no seguro).

  Lo que presentamos a continuacin es un ejemplo de receta para
  aadir en .procmailrc del procesador de correo Procmail para devolver
  automticamente su clave pblica al remitente cuando reciba un mensaje
  con un determinado texto en la lnea Asunto:

       :0 h
       * ^Subject:[    ]+\/(|enviar)[  ]+clave pub\>.*
       | mutt -s "Re: $MATCH" `formail -rtzxTo:` </clau/miclave.asc

  Lo que aqu dice es lo siguiente:  tenemos una copia de nuestra clave
  pblica en ASCII, en un directorio (en este caso el directorio /clau),
  en un fichero llamado miclave.asc;  as, cuando procmail reciba un
  mensaje que lleve en la lnea de Asunto: (Subject:) la frase enviar
  clave pub, enviar el fichero al remitente.

  IMPORTANTE: lo que va entre los corchetes es un espacio y un
  tabulador.

  8.2.  Verificacin y descifrado automticos de mensajes firmados sin
  PGP/MIME

  Cuando recibimos un mensaje firmado digitalmente del tipo MIME/PGP y
  lo abrimos en nuestro lector de correo preferido (Mutt, cul si no?),
  ste nos lo reconoce como tal y comprueba la veracidad de la firma
  siempre que tengamos la clave pblica del firmante.  Estos mensajes
  son los que llevan la letra S al lado:

       36  S  05/09 Andres Seco Her ( 12K) Al fin

  mientras los mensajes codificados llevan la letra P:

       12  P  03/24 Andres Seco Her (6,3K) Re: FW: Re: Mutt - pgp/gnupg

  Pero si el mensaje viene firmado al estilo application/pgp, nos
  encontraremos que al abrir el mensaje no habr verificacin, y ste
  vendr con el texto rodeado con la firma digital, as:

  -----BEGIN PGP SIGNED MESSAGE-----

  Date: Tue, 25 May 1999 13:04:26 +0200
  From: La Corporacin <bill@reboot.com>
  Subject: Actualizacin S.O.
  To: Sufrido Usuario <pepe@casa.es>

  Sufrido usuario:

  le comunicamos que puede usted adquirir la ltima actualizacin del
  programa O.E. con la adquisicin de nuestro sistema operativo reboot99
  por el mdico precio de ... etc.

  -----BEGIN PGP SIGNATURE-----
  Version: 2.6.3ia
  Charset: noconv

  iKBGNpUBX0235VapRBUy1KklAQGl9wQA3SBMio0bbbajHAnyKMOlx3tcgNG7/UVC
  AbqXcUnyGGOo13Nbas95G34Fee3wsXIFo1obEfgiRzqPzZPLWoZdAnyTlZyTwCHe
  6ifVpLTuaXvcn9/76rXoI6u9svN2cqHCgHuNASKHaK9034uq81PSdW4QdGLgLoeB
  vnGmxE+tGg32=
  =Xidf
  -----END PGP SIGNATURE-----

  Para poder verificarlo tendramos que guardarlo en un fichero y
  hacerlo desde la lnea de comandos.  Sin embargo, es posible convertir
  estos mensajes con Procmail para que Mutt los reconozca como MIME/PGP.
  Basta con aadir a .procmailrc:

       :0
       * !^Content-Type: message/
       * !^Content-Type: multipart/
       * !^Content-Type: application/pgp
       {
           :0 fBw
           * ^-----BEGIN PGP MESSAGE-----
           * ^-----END PGP MESSAGE-----
           | formail \
               -i "Content-Type: application/pgp; format=text; x-action=encrypt"

           :0 fBw
           * ^-----BEGIN PGP SIGNED MESSAGE-----
           * ^-----BEGIN PGP SIGNATURE-----
           * ^-----END PGP SIGNATURE-----
           | formail \
               -i "Content-Type: application/pgp; format=text; x-action=sign"
       }

  Como se puede ver esto sirve tanto para los mensajes firmados como
  para los cifrados con application/pgp.

  8.3.  Cambio del tipo MIME para mensajes con claves pblicas sin
  PGP/MIME

  Cuando recibes una clave pblica desde un MUA sin soporte PGP/MIME,
  debes salvar la clave en disco y despues insertarla en tu anillo
  pblico de llaves, pero, incluyendo estas lineas en .procmailrc puedes
  realizar la insercin directamente desde el propio Mutt.

       ______________________________________________________________________
           :0 fBw
           * ^-----BEGIN PGP PUBLIC KEY BLOCK-----
           * ^-----END PGP PUBLIC KEY BLOCK-----
           | formail -i "Content-Type: application/pgp-keys; format=text;"
       ______________________________________________________________________

  Gracias a Denis Alan por esta nota de Procmail.

  9.  correo y plataformas Intercambio de mensajes firmados/cifrados
  entre diferentes clientes de

  Inicialmente, las firmas PGP se aadian al final del texto que
  deseaban firmar.  Posteriormente, se incluyo el tipo MIME
  application/pgp para indicar que el bloque a continuacin contenia
  firma o cifrado PGP, y finalmente con la especificacin de PGP/MIME se
  consigui separar la firma de los bloques a los que afectaba, de modo
  que no fueran modificados en absoluto y alguien que no tuviese PGP
  pudiese ver el mensaje exactamente como fue enviado (no cuando est
  cifrado, evidentemente) sin aadidos al principio y al final de PGP.

  La situacin actual es tal que existen pocos clientes de correo
  capaces de integrarse con PGP para ofrecer PGP/MIME, de modo que suele
  ser necesario enviar mensajes firmados digitalmente de modo que con
  clientes de correo que no soportan PGP/MIME puedan ser verificadas las
  firmas.

  En Linux, los clientes de correo disponibles que cumplen la
  especificacin PGP/MIME son mutt-i y pine. En Windows, solo los
  clientes de correo Eudora en sus versiones 3.x y 4.x soportan
  PGP/MIME. Si conoce otros clientes que lo soporten esperamos su
  mensaje indicndonoslo, para incluirlo aqu.

  10.  Programas y versiones utilizados

  Para el desarrollo de esta documentacin hemos utilizado las
  siguientes versiones de mutt:

    Mutt 0.93i - con esta versin de mutt no se puede utilizar GnuPG.

    Mutt 0.95.3i - todas las versiones de PGP y GnuPG son utilizables.

  Y las siguientes versiones de PGP y GnuPG:

    PGPi 5.0

    GnuPG 0.4.3

    GnuPG 0.9.4

  11.  Ms informacin

  La documentacin original a partir de la cual ha sido obtenido este
  documento puede ser encontrada en las paginas man de mutt, pg, pgp5,
  gnupg, procmail, en los directorios correspondientes de /usr/doc y en
  las paginas de los paquetes en la world wide web:

    Pgina Oficinal de Mutt - http://www.mutt.org

    Pgina Pricipal de GnuPG - http://www.gnupg.org

    Pgina internacional de PGP - http://www.pgpi.com

    Pgina Oficinal de Procmail - http://www.procmail.org

  Las recomendaciones (request for comments, RFC) que hacen referencia a
  temas tratados en el documento son las siguientes:

    1847 - Security Multiparts for MIME: Multipart/signed and
     Multipart/encripted

    1848 - MIME Object Security Services

    1991 - PGP Message Exchange Formats

    2015 - MIME Security with Pretty Good Privacy (PGP)

    2440 - OpenPGP Message Format

  y pueden ser encontradas en /usr/doc/doc-rfc y en diversos lugares de
  la world wide web, como http://metalab.unc.edu y http://nic.mil.
  Puedes solicitar informacin sobre las RFCs en RFC-INFO@ISI.EDU

  12.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En ella encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.

  NIS(YP)/NIS+/NYS COMO
  Andrea Dell'Amico, Mitchum DSouza, Erwin Embsen, Peter
  Eriksson
  l0.5, 24 de Enero de 1995 18 de Julio de 1996

  Configuracin y detalles de NIS(YP), NIS+ y NYS (Yellow Pages), sis
  temas de autentificacin distribuda.
  ______________________________________________________________________

  ndice General:

  1.      Glosario

  1.1.    Algo de Informacin General

  2.      Introduccin

  2.1.    Nuevas Versiones de Este Documento (En ingls)

  2.2.    Nota de Renuncia

  2.3.    FeedBack

  2.4.    Agradecimientos

  3.       NIS o NIS+ ?

  3.1.     NIS tradicional o la librera NYS ?

  4.      Cmo trabaja

  5.       Qu necesitas para configurar NIS ?

  5.1.    El Mapeador de Puertos RPC

  5.2.    Determinar si eres Servidor, Esclavo o Cliente.

  5.3.    El Software

  5.4.    Configurar un Cliente NIS usando NIS Tradicional

  6.       Qu necesitas para configurar NYS ?

  6.1.    Determinar si eres un Servidor, Esclavo o Cliente.

  6.2.    El Software

  6.3.    Configurar un Cliente NYS usando NYS

  6.4.    El Fichero nsswitch.conf

  6.5.    Haz usar NYS a tus binarios

  7.      Configurar un Servidor NIS

  7.1.    El Programa Servidor ypserv

  7.2.    El Programa yppasswdd

  8.      Verificar la Instalacin NIS/NYS

  9.      Problemas Comunes y soluciones con NIS

  10.     Preguntas Realizadas Frecuentemente

  11.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Glosario

  En este documento se han usado muchos acrnimos. Aqu se listan los
  ms importantes junto a una breve explicacin:

     DBM
        DataBase Management, una librera de funciones que mantiene
        pares clave-contenido en una base de datos.

     DLL
        Dynamically Linked Library, una librera enlazada a un programa
        ejecutable en tiempo de ejecucin.

     domainname
        Un nombre "clave" que es usado por clientes NIS para ser capaces
        de localizar un servidor NIS adecuado que sirve a esa clave
        domainname. Notar que esto no tiene nada que ver necesariamente
        con el "dominio" (nombre de mquina) DNS de la(s) mquina(s).

     FTP
        File Transfer Protocol, un protocolo usado para transferir
        ficheros entre dos ordenadores.

     libnsl
        Name services library, una librera de llamadas a servicios de
        nombres (getpwnam, getservbyname, etc...) en Unixes SVR4.

     libsocket
        Socket services library, una librera para llamadas a servicios
        de sockets (socket, bind, listen, etc...) en Unixes SVR4.

     NIS
        Network Information Service, un servicio que proporciona
        informacin, que tiene que ser conocida por toda la red, a todas
        las mquinas de la red. Hay soporte para NIS en la librera
        estndar de Linux libc, y a la que en el texto nos referiremos
        como "NIS tradicional".

     NIS+
        Network Information Service (Plus :-), es esencialmente un NIS
        con ``esteroides''. NIS+ fue diseado por Sun Microsystems Inc.
        como un sustituto de NIS, con una mejor seguridad y un mejor
        manejo de _grandes_ instalaciones.

     NYS
        Este es el nombre de un proyecto que viene de NIS+,YP y Switch y
        que est organizado por Peter Eriksson <pen@lysator.liu.se>.
        Contiene, entre otras cosas, una completa reimplementacin del
        cdigo del NIS (=YP) usando la funcionalidad del Name Services
        Switch de la librera NYS.

     RPC
        Remote Procedure Call. Las rutinas RPC permiten a los programas
        en C realizar llamadas a procedimientos en otras mquinas a
        travs de la red. Cuando la gente habla de RPC, normalmente se
        refiere a la variante SunRPC.

     YP Yellow Pages(tm), Pginas Amarillas en Ingls, es una marca
        registrada en el Reino Unido por la British Telecom plc. (la
        telefnica inglesa, vamos).

     TCP-IP
        Transmission Control Protocol/Internet Protocol. Es un protocolo
        de comunicacin de datos usado a menudo en mquinas Unix.

  1.1.  Algo de Informacin General

  Las siguientes lneas estn sacadas del Sun(tm) System & Network
  Administration Manual:

           "NIS se llamaba en un principio Sun Yellow Pages (YP)
            pero el nombre Yellow Pages(tm) es una marca registrada
            en el Reino Unido por la British Telecom plc y no
            puede ser usado sin permiso."

  NIS viene de Network Information Service. Su propsito es proveer
  informacin, que tiene que ser conocida a lo largo de la red, a todas
  las mquinas de la red. La informacin ms indicada para ser
  distribuida por NIS es:

    nombres de login/passwords/directorios home (/etc/passwd)

    informacin de grupos (/etc/group)

  As que, por ejemplo, si la entrada de tu password est grabada en la
  base de datos passwd de NIS, sers capaz de entrar en todas las
  mquinas de la red que tengan corriendo los programas clientes NIS.

  Sun es una marca registrada de Sun Microsystems, Inc. licenciada a
  SunSoft, Inc.

  2.  Introduccin

  Cada vez ms y ms mquinas Linux estn siendo instaladas como parte
  de una red de computadoras. Para simplificar la administracin de la
  red, la mayor parte de las redes (sobre todo, redes basadas en
  mquinas Sun) ejecutan el Network Information Service. Las mquinas
  Linux pueden sacar gran partido a los servicios NIS existentes o
  proveer servicio NIS por s mismas. Pueden incluso (con la librera
  NYS) actuar como un cliente NIS+ limitado.

  Este documento intenta responder cuestiones sobre la configuracin de
  NIS(YP) en tu mquina Linux. No habla sobre cmo configurar NIS+. No
  olvides leer la seccin ``''

  2.1.  Nuevas Versiones de Este Documento (En ingls)

  Nuevas versiones de este documento sern enviadas peridicamente
  (aproximadamente, cada mes) a los newsgroups comp.os.linux.announce y
  comp.os.linux.misc. Este documento se encuentra archivado en varios
  FTP sites, incluyendo sunsite.unc.edu en el directorio
  /pub/Linux/docs/HOWTO.

  2.2.  Nota de Renuncia

  Aunque este documento ha sido recogido con lo mejor de nuestros
  conocimientos, puede contener, y probablemente contendr, errores. Por
  favor, lete todos los ficheros README adjuntos a cualquiera de los
  varios paquetes de software descritos en este documento para obtener
  una informacin ms detallada y precisa. Nosotros intentaremos
  mantener este documento tan libre de errores como sea posible.

  2.3.  FeedBack

  Si tienes algn comentario, preguntas o sugerencias, por favor,
  envimelas por e-mail a Erwin Embsen <erwin@nioz.nl>. Y si encuentras
  errores u omisiones obvias, definitivamente debes contactar con l (--
  Aunque me temo que no sabe castellano, as que cuntale lo que sea en
  ingls...--) .

  2.4.  Agradecimientos

  Nos gustara agradecer a toda la gente que ha contribuido (directa o
  indirectamente) a la realizacin de este documento. En orden
  alfabtico:

       Andrea Dell'Amico <adellam@di.unipi.it>
       Mitchum DSouza    <Mitch.Dsouza@Dubai.Sun.COM>
       Erwin Embsen      <erwin@nioz.nl>
       Byron A Jeff      <byron@cc.gatech.edu>
       Peter Eriksson    <pen@lysator.liu.se>

  Theo de Raadt <deraadt@fsa.ca> es responsable del cdigo original de
  los yp-clients. Swen Thuemmler <swen@uni-paderborn.de> port el cdigo
  de los yp-clients y de las yp-routines en la libc (de nuevo, basndose
  en el trabajo de Theo).

  3.   NIS o NIS+ ?

  La eleccin entre NIS y NIS+ es fcil - usa NIS si no tienes que usar
  NIS+ o si no tienes severas necesidades de seguridad. NIS+ es mucho
  ms problemtico de administrar (es bastante fcil de manejar la parte
  del cliente, pero la parte del servidor es horrible). Otro problema es
  que el soporte para NIS+ bajo Linux est todava en desarrollo --una
  cosa importante de la que todava carece es del soporte para
  encriptacin y autentificacin de datos que es _la_ principal razn
  por la que alguien querra usar NIS+...--

  3.1.   NIS tradicional o la librera NYS ?

  La eleccin entre el NIS tradicional o el cdigo NIS de la librera
  NYS es una eleccin entre vagancia y madurez vs. flexibilidad y deseos
  de aventura.

  El cdigo "NIS tradicional" est en la librera C estndar y ha estado
  ah fuera por mucho tiempo, sufriendo a veces de su edad y de un poco
  de inflexibilidad.

  El cdigo NIS de la librera NYS, por otro lado, requiere, una de dos,
  o que recompiles y re-enlaces todos tus programas a la librera
  libnsl, o que recompiles la librera libc para que incluya el cdigo
  libnsl (o tal vez puedas ir y obtener una versin precompilada de
  alguien que ya lo haya hecho).

  Otra diferencia es que el cdigo tradicional NIS tiene algn soporte
  para Netgroups NIS, cosa que el cdigo NYS no tiene (todava). Por
  otro lado, el cdigo NYS te permite manejar Shadow Passwords de una
  forma transparente.

  4.  Cmo trabaja

  En una red debe haber al menos una mquina actuando como un servidor
  NIS.  Puedes tener mltiples servidores NIS, cada uno sirviendo a
  diferentes "dominios" NIS - o puedes tener servidores NIS
  cooperativos, donde uno es el llamado servidor NIS maestro, y todos
  los dems son los llamados servidores NIS esclavos (para un "dominio"
  NIS determinado, eso es!) - o puedes tener una mezcla de ellos...

  Los servidores esclavos solo tienen copias de las bases de datos NIS y
  reciben estas copias del servidor NIS maestro cada vez que se realizan
  cambios a las bases de datos maestras. Dependiendo del nmero de
  mquinas que haya en tu red y de la seriedad de tu red, podras
  decidir si instalar uno o ms servidores esclavos. Cada vez que un
  servidor NIS se cae o va muy lento respondiendo peticiones, un cliente
  NIS conectado a ese servidor intentar encontrar otro que no est
  cado o que vaya ms rpido.

  Las bases de datos NIS estn en el formato DBM, que deriva de las
  bases de datos ASCII. Por ejemplo, los ficheros /etc/passwd y
  /etc/group pueden ser directamente convertidos a formato DBM usando
  software de translacin ASCII <--> DBM ("dbload", includo con el
  software del servidor). El servidor NIS maestro debera tener ambas,
  las bases de datos ASCII y las DBM.

  Los servidores esclavos sern notificados de cualquier cambio en los
  mapas NIS, (va el programa "yppush"), y recibirn automticamente los
  cambios necesarios para sincronizar sus bases de datos. Los clientes
  NIS no necesitan hacer esto ya que stos siempre hablan directamente
  con el servidor NIS para leer la informacin almacenada en sus bases
  de datos DBM.

  El autor de los clientes YP para Linux nos ha informado de que el
  ypbind ms reciente (del paquete yp-clients.tar.gz) es capaz de
  obtener el servidor a partir de un fichero de configuracin --lo que
  quiere decir que no es necesario un broadcast (lo cual es inseguro,
  debido al hecho de que cualquiera podra instalar un servidor NIS y
  contestar a las peticiones de broadcast...).--

  5.   Qu necesitas para configurar NIS ?

  5.1.  El Mapeador de Puertos RPC

  Para ejecutar algn software de los mencionados ms adelante
  necesitars ejecutar antes el programa /usr/sbin/rpc.portmap. Algunas
  distribuciones Linux ya tienen cdigo para arrancar ste demonio en
  /etc/rc.d/rc.inet2.  Todo lo que tienes que hacer es "descomentar" ese
  cdigo y rearrancar tu mquina Linux para activarlo.

  El mapeador RPC (portmap(8c)) es un servidor que convierte nmeros de
  programas RPC en nmeros de puerto de protocolo TCP/IP (o UDP/IP).
  Debe estar ejecutndose para poder realizar llamadas RPC (que es lo
  que el software de cliente NIS hace) a servidores RPC (como un
  servidor NIS) de esa mquina. Cuando un servidor RPC arranca, avisar
  al mapeador de puertos por cul puerto est escuchando, y a qu
  nmeros de programas RPC est preparado para servir. Cuando un cliente
  desea hacer una llamada RPC a un nmero de programa dado, primero
  deber contactar con el mapeador de puertos de la mquina servidora
  para determinar el nmero de puerto al que los paquetes RPC deben ser
  enviados.

  Normalmente los servidores RPC estndar son arrancados por inetd(8c),
  de modo que el mapeador de puertos debe ser iniciado antes de que
  inetd sea invocado.

  5.2.  Determinar si eres Servidor, Esclavo o Cliente.

  Para contestar a esta cuestin debes considerar dos casos:

  1. Tu mquina va a ser parte de una red en la que ya existen
     servidores NIS.

  2. Todava no tienes servidores NIS en la red.

  En el primer caso, slo necesitas los programas cliente (ypbind,
  ypwhich, ypcat, yppoll, ypmatch). El programa ms importante es
  ypbind. Este programa debe estar ejecutndose en todos los casos, esto
  es, debe aparecer siempre en la lista de procesos. Es un proceso de
  los llamados demonio y necesita ser iniciado desde el fichero de
  arranque del sistema (ej. /etc/rc.local). Tan pronto como ypbind est
  en marcha, tu sistema se convierte en un cliente NIS.

  En el segundo caso, si no tienes servidores NIS, entonces tambin
  necesitars un programa servidor NIS (normalmente llamado ypserv). La
  seccin `` Qu necesitas para configurar NYS ?''  describe como
  configurar un servidor NIS en tu maquina Linux usando la
  implementacin del ypserv de Peter Eriksson (<pen@lysator.liu.se>).
  Nota que sta implementacin NO soporta el concepto maestro-esclavo
  del que hemos hablado en la seccin `` NIS o NIS+ ?''.  Usando este
  software, todos tus servidores NIS sern servidores maestros. Hay otro
  servidor gratuito disponible, llamado "yps", escrito por Tobias Reber
  en Alemania que s soporta el concepto maestro-esclavo, pero que tiene
  otras limitaciones.

  5.3.  El Software

  La librera del sistema "/usr/lib/libc.a" (version 4.4.2 y superiores)
  o la librera compartida "/usr/lib/libc.sa" y sus DLL relacionadas
  contienen todas las llamadas al sistema necesarias para compilar
  satisfactoriamente el software del cliente y del servidor NIS.

  Ha habido informes de gente diciendo que NIS slo funciona con las
  versiones 4.5.21 y superiores de "/usr/lib/libc.a" as que si quieres
  ir a lo seguro, no uses libc's ms antiguas. El software de cliente
  NIS puede obtenerse de:

         Servidor               Directorio                       Nombre de fichero

         ftp.uni-paderborn.de   /pcsoft2/linux/local/yp          yp-clients.tar.gz
         ftp.funet.fi           /pub/OS/Linux/BETA/NYS/clients   yp-clients.tar.gz
         ftp.lysator.liu.se     /pub/NYS/clients                 yp-clients.tar.gz
         sunsite.unc.edu        /pub/Linux/system/Network/admin  yp-clients.tar.gz

  Una vez hayas obtenido el software, por favor, sigue las instrucciones
  que vienen con l.

  5.4.  Configurar un Cliente NIS usando NIS Tradicional

  Asumiendo que hayas compilado satisfactoriamente el software, ya
  estars preparado para instalarlo. Un lugar idneo para el demonio
  ypbind es el directorio /usr/sbin.

  Por supuesto, para ello debers entrar como root. Los otros binarios
  (ypwhich, ypcat, yppoll, ypmatch) deben ir en un directorio accesible
  por todos los usuarios, /usr/etc o /usr/local/bin por ejemplo. Sera
  una buena idea probar el ypbind antes de incorporarlo en
  /etc/rc.d/rc.inet2.

  Para probar el ypbind haz lo siguiente:

    Asegrate de que tienes establecido ya tu nombre de dominio. Si no
     lo tienes ejecuta el comando:

                   /bin/domainname-yp nis.domain

  donde nis.domain debe ser alguna cadena de caracteres, que normalmente
  _NO_ debe estar relacionada con el nombre de dominio de tu mquina!
  La razn para esto es que hace un poco ms difcil a crackers externos
  el obtener la base de datos de passwords de tus servidores NIS. Si no
  sabes cul es el nombre de dominio NIS de tu red, pregunta al admin
  istrador de tu sistema/red.

    Arrancar "/usr/sbin/rpc.portmap" si no est ya ejecutndose.

    Crear el directorio "/var/yp" si no existe.

    Iniciar "/usr/sbin/ypbind"

    Usar el comando "rpcinfo -p localhost" para comprobar si ypbind es
     capaz de registrar su servicio con el mapeador de puertos. El
     rpcinfo debera producir una salida parecida a:

              program vers proto   port
               100000    2   tcp    111  portmapper
               100000    2   udp    111  portmapper
               100007    2   udp    637  ypbind
               100007    2   tcp    639  ypbind
               300019    1   udp    660

    Podras tambin ejecutar "rpcinfo -u localhost ypbind". Este
     comando debera producir una salida similar a:

               program 100007 version 2 ready and waiting

  Finalmente, no olvides que para bsquedas de nodos debes establecer (o
  aadir) "nis" a la entrada de orden de bsquedas en tu fichero
  /etc/host.conf. Por favor, lee la pgina man "resolv+.8" para ms
  detalles.

  En este punto, ya podras usar programas cliente NIS como ypcat,
  etc...  Por ejemplo, "ypcat passwd" te devolver la base de datos NIS
  de los passwords completa.

  IMPORTANTE: Si te saltaste el procedimiento de prueba asegrate de que
  has establecido el nombre de dominio, y creado el directorio:

           /var/yp

  Este directorio DEBE existir para que ypbind pueda iniciarse
  satisfactoriamente.

  Si el test funcion, puede que ahora quieras cambiar los ficheros
  /etc/rc.d/rc.M y /etc/rc.d/rc.inet2 en tu sistema para que ypbind se
  inicie durante el arranque y para que tu sistema acte como un cliente
  NIS. Edita el fichero /etc/rc.d/rc.M y busca los comandos que
  establecen el nombre de dominio. Cambia el nombre de dominio por el
  nombre de tu dominio. Tambin, edita el fichero /etc/rc.d/rc.inet2,
  ``descomenta'' las lneas que inician el demonio rpc.portmap, y aade
  las siguientes lneas justo despus del lugar donde se arranca
  rpc.portmap:

           #
           # Arranca el demonio ypbind:
           #
           if [ -f ${NET}/ypbind -a -d /var/yp ]; then
               echo -n " ypbind"
               ${NET}/ypbind
           fi

  Al contrario que con la implementacin de Sun del NIS no necesitas
  editar los ficheros /etc/passwd y /etc/group para poder aprovechar
  NIS. La implementacin de Sun necesita una lnea "+:*:0:0:::" en el
  /etc/passwd y una lnea "+:*:0:" en el /etc/group para decirle a NIS
  que busque en las bases de datos NIS de los passwords y de los grupos.

  IMPORTANTE: Nota que el comando finger te informar con mensajes "no
  such user" si no aades la lnea "+:*:0:0:::" en /etc/passwd. Volver a
  poner la lnea "+:*:0:0:::" en /etc/passwd arreglar el finger.

  Bueno, esto es todo. Rearranca la mquina y observa los mensajes de
  arranque para ver si ypbind efectivamente se ha iniciado.

  IMPORTANTE: Nota que la caracterstica netgroup est implementada
  empezando en la libc v4.5.26. Los netgroups permiten control de acceso
  para cada mquina y para cada usuario en el dominio NIS, y requieren
  una entrada como sta:

           +@this_machine_users

  en /etc/passwd. Pero si tienes una versin de libc anterior a la
  4.5.26, todos los usuarios de la base de datos NIS de passwords pueden
  acceder a tu mquina Linux si ejecutas "ypbind".

  6.   Qu necesitas para configurar NYS ?

  6.1.  Determinar si eres un Servidor, Esclavo o Cliente.

  Para contestar esta cuestin debes considerar dos casos:

    Tu mquina va a ser parte de una red en la que ya existen
     servidores NIS.

    Todava no tienes servidores NIS en la red.

  En el primer caso tienes dos opciones:

    O reenlazas todos los programas cliente y demonio con la librera
     NYS libnsl.so (o las enlazas estticamente con libnsl.a). Esto
     supone aadir la lnea:

                   LIBS=-lnsl

  a tu Makefile, que indica que quieres enlazar la Network Services
  Library. Bsicamente, todos los demonios de red y el programa "login"
  necesitan ser recompilados.

    O puedes recompilar la librera C estndar libc para que incluya
     las funciones de librera de los clientes NYS, y despus reenlazar
     todos los programas enlazados estticamente (los programas
     enlazados dinmicamente tienen la nueva versin de libc
     automticamente). Para ms informacin sobre sta opcin, mira la
     seccin``Haz usar NYS a tus binarios''  ms abajo.

  De forma similar al caso del NIS tradicional, si no tienes servidores
  NIS, entonces tambin necesitars un programa servidor NIS
  (normalmente llamado ypserv) y tendrs que designar una de las
  mquinas de tu red como servidor NIS maestro. De nuevo, quizs quieras
  establecer al menos un servidor esclavo junto con el maestro.

  6.2.  El Software

  Necesitas obtener y compilar la librera libnsl.so de servicios NYS.
  Si no tienes las herramientas DLL instaladas puedes obtener una
  librera precompilada compartida, esttica o en cdigo fuente del
  mismo servidor mencionado ms abajo. Nota, de todos modos, que la
  versin precompilada puede ser (y probablemente es) ms vieja que la
  ltima edicin del cdigo fuente.

  La librera NYS (en versin cdigo fuente y precompilada) puede ser
  obtenida de:

           Servidor            Directorio                     Nombre fichero

           ftp.lysator.liu.se  /pub/NYS/libs                  nys-0.27.4.tar.gz
           ftp.lysator.liu.se  /pub/NYS/binaries/lib          libnsl.so.1.0.a26

           ftp.funet.fi        /pub/OS/Linux/BETA/NYS/libs    nys-0.27.4.tar.gz
           ftp.funet.fi        /pub/OS/Linux/BETA/NYS/lib     libnsl.so.1.0.a26

  Versiones precompiladas de los programas "login" y "su" pueden ser
  obtenidos de:

           Servidor            Directorio                     Nombre fichero

           ftp.lysator.liu.se  /pub/NYS/binaries/bin          login
           ftp.lysator.liu.se  /pub/NYS/binaries/bin          su

           ftp.funet.fi        /pub/OS/Linux/BETA/NYS/bin     login
           ftp.funet.fi        /pub/OS/Linux/BETA/NYS/bin     su

  Similarmente, se pueden obtener ejemplos de ficheros de cofiguracin
  de:

      Servidor            Directorio                     Nombre fichero

      ftp.lysator.liu.se  /pub/NYS/binaries/etc          *conf
      ftp.funet.fi        /pub/OS/Linux/BETA/NYS/etc     *conf

  Para compilar la librera nsl, sigue las instrucciones que vienen con
  el software. Si deseas compilar la librera DLL compartida debes tener
  las herramientas DLL instaladas en su sitio (/usr/dll). Las
  herramientas DLL (el paquete tools-2.11.tar.gz o posterior) pueden ser
  obtenidas de los servidores habituales.

  6.3.  Configurar un Cliente NYS usando NYS

  A diferencia del NIS tradicional, no se necesita ninguna configuracin
  para un cliente NYS. Todo lo que se necesita, es que el fichero de
  configuracin NIS (/etc/yp.conf) apunte al servidor correcto para su
  informacin. Adems, el fichero de configuracin del Name Services
  Switch (/etc/nsswitch.conf) debe estar correctamente configurado.

  Por favor, refierse a los ejemplos proporcionados con el cdigo
  fuente.

  6.4.  El Fichero nsswitch.conf

  El fichero de Network Services Switch /etc/nsswitch.conf determina el
  orden de las bsquedas realizadas cuando se pide una pieza especfica
  de informacin, de la misma forma que el fichero /etc/host.conf
  determina la manera en que se realizan las bsquedas de hosts.
  Insistimos, eche un vistazo al fichero proporcionado en la
  distribucin del cdigo fuente. Por ejemplo, la lnea

           hosts: files nis dns

  especifica que las funciones de bsqueda de host deben primero mirar
  en el fichero /etc/hosts local, seguido de una bsqueda NIS y,
  finalmente, usar el DNS (/etc/resolv.conf y named). Si al llegar a
  este punto no se encuentra el host correspondiente se devuelve un
  error.

  6.5.  Haz usar NYS a tus binarios

  En vez de reenlazar cada binario con la librera NYS (libnsl.so), se
  ha conseguido una solucin ms limpia proporcionando al usuario la
  posibilidad de compilar una libc que incluya NYS. Esto significa que
  todo lo que necesitas hacer es recompilar una nueva libc y sustituir
  la /lib/libc.so.x.y.z existente para que todos los programas (los
  compilados no-estticamente) utilicen NYS.

  Esta combinacin tambin te da la ventaja sobre la implementacin del
  NIS tradicional en la libc de linux, en que permite soporte
  transparente para shadow passwords (va el fichero
  /etc/nisswitch.conf).
  Sigue los sencillos pasos indicados ms adelante para recompilar una
  libc que incluya NYS.

    Asegrate de que tienes las ltimas herramientas DLL instaladas.
     Para ms informacin acerca de dnde conseguirlas lete el GCC-FAQ.

    Consigue los ltimos fuentes de la libc. (de nuevo, mira el GCC-
     FAQ)

    Consigue los ltimos fuentes del nys de:

                 ftp.lysator.liu.se:/pub/NYS/libs

  y descomprmelos en el directorio de la libc-linux fuente.  Actual
  mente la distribucin es la "nys-0.27.4.tar.gz".

    Ejecuta el ./configure y contesta "n" a la pregunta

                 Values correct (y/n) [y] ?

  Luego sigue con las siguientes cuestiones y la ltima pregunta ahora
  ser

                 Build a NYS libc from nys-0.27 (y default) ?

  contesta "y" a sta.

    Luego ejecuta el comando

                 % make

  La librera generada tras la compilacin se llamar algo as como

           libc.so.4.5.26

  y estar bajo el directorio jump/libc-nys. Para instalar esta librera
  nuestro consejo sera copiarla a /lib con un nombre lexicogrficamente
  superior que el nmero que actualmente tiene. Simplemente con aadir
  la letra "a" lo podremos conseguir. Por ejemplo:

           % cp jump/libc-nys/libc.so.4.5.26 /lib/libc.so.4.5.26a

  Alternativamente, podramos aadirle "nys" para poder identificarlo
  rpidamente. Ahora ejecuta el siguiente comando

           % ldconfig

  que resetear tu cach para usar la nueva librera. La estrategia del
  enlazador dinmico puede ser examinada con el comando "ldconfig -p".

  Bsicamente esto es todo. Ahora todos tus programas deben poder
  utilizar NYS. Por favor, nota que usualmente el programa "login" est
  compilado estticamente y que por lo tanto no puede acceder a las
  nuevas funciones NYS de la nueva libc. Debers recompilar "login" sin
  el parmetro -static, o enlazarlo estticamente a la librera
  libnsl.a.

  7.  Configurar un Servidor NIS

  7.1.  El Programa Servidor ypserv

  Este documento slo describe cmo configurar el servidor NIS "ypserv".
  La configuracin del servidor "yps" es similar _pero_ no exactamente
  igual as que ten esto en cuenta si intentas aplicar estas
  instrucciones a "yps"!

  El software del Servidor NIS puede ser encontrado en:

           Servidor            Directorio                         Nombre fichero

           ftp.lysator.liu.se  /pub/NYS/servers                   ypserv-0.11.tar.gz
           ftp.funet.fi        /pub/OS/Linux/BETA/NYS/servers     ypserv-0.11.tar.gz
           mcsun.eu.net        /os/linux/BETA/NYS/servers         ypserv-0.11.tar.gz
           ftp.univie.ac.at    /unix/system/linux/funet/BETA/NYS/servers
                                                                  ypserv-0.11.tar.gz

  El setup del servidor es el mismo para NIS tradicional y para NYS.

  Compila el software para generar los programas "ypserv", "dbcat" y
  "dbload". Primeramente debes determinar qu ficheros necesitas que
  estn disponibles via NIS y despus aade o elimina las entradas
  apropiadas de ypMakefile. Luego instala el fichero ypMakefile en
  /var/yp con el nombre Makefile.

  Y ahora crea los ficheros DLL escribiendo:

           % cd /var/yp; make

  Cercirate de que el mapeador de puertos (rpc.portmap) est en marcha,
  y arranca el servidor "ypserv". El comando

           % rpcinfo -u localhost ypserv

  debera dar una salida como

           program 100004 version 2 ready and waiting

  Ya est, tu servidor ya est en marcha.

  7.2.  El Programa yppasswdd

  Cada vez que los usuarios cambien sus passwords, la base de datos NIS
  y probablemente otras bases de datos que dependan de la base de datos
  NIS de los passwords deben ser actualizadas. El programa "yppasswdd"
  es un servidor que maneja cambios de password y que se asegura de que
  la informacin NIS ser actualizada acordemente. El software para
  "yppasswdd" puede encontrarse en:

           Servidor                   Directorio                     Nombre fichero

           ftp.lysator.liu.se    /pub/NYS                        yppasswdd-0.5.tar.gz
           ftp.funet.fi          /pub/OS/Linux/BETA/NYS/servers  yppasswdd-0.5.tar.gz

  Una vez obtenido el software, sigue las instrucciones que vienen con
  l.

  8.  Verificar la Instalacin NIS/NYS

  Si todo es correcto (como debera serlo), deberas poder verificar tu
  instalacin con unos pocos comandos. Asumiendo, por ejemplo, que tu
  fichero passwd est siendo soportado por NIS, el comando

      % ypcat passwd

  debera devolverte los contenidos de tu fichero NIS passwd. El comando

           % ypmatch userid passwd

  (donde userid es el nombre de login de un usuario arbitrario) debera
  devolver la entrada correspondiente a ese usuario en el fichero NIS
  passwd. Los programas "ypcat" e "ypmatch" deberan venir incluidos con
  tu distribucin de NIS tradicional o de NYS.

  9.  Problemas Comunes y soluciones con NIS

  Aqu van algunos problemas comunes segn los informes de varios
  usuarios:

  1. La versin 4.5.19 de libc no funciona. NIS no funcionar con ellas.

  2. Si actualizas las libreras de 4.5.19 a 4.5.24, el comando su
     dejar de funcionar. Necesitas obtener el comando su de la
     distribucin 1.2.0 de Slackware. Tambin de ah podrs obtener las
     libreras actualizadas.

  3. Puedes encontrar problemas con NIS y DNS en la misma mquina.  Mi
     servidor DNS a veces pasa del NIS. Todava no he averiguado por
     qu.

  4. Cuando un servidor NIS se cae y vuelve a levantarse ypbind arranca
     con mensajes como:

              yp_match: clnt_call:
                          RPC: Unable to receive; errno = Connection refused

  y los logins de aquellos que estn registrados en la base de datos NIS
  son rechazados. Intenta entrar como root y si lo consigues, mata el
  ypbind y arrncalo de nuevo.

  10.  Preguntas Realizadas Frecuentemente

  La mayora de tus preguntas ya deberan estar contestadas. Si todava
  tienes alguna pregunta sin contestar tal vez quieras enviar un mensaje
  a

           comp.os.linux.help

  o contactar con uno de los autores de este HOWTO.

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Traducido el 3-I-1997.  Noticias COMO
  Vince Skahan, vince@halcyon.com
  Traducido por Urko Lusa, ulusa@frodo.com
  v1.4, 29-XI-1995.

  Este documento describe la puesta en marcha y mantenimiento de noti
  cias de Usenet bajo Linux. Es necesario leerlo si se planea publicar o
  leer noticias de Usenet, ya sea en el sistema local o entre varios
  sistemas.  Probablemente no es necesario leer este documento si no se
  desea incorporar noticias de Usenet como una de las prestaciones del
  sistema.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Nuevas versiones de este documento

  1.2.    Sugerencias, crticas y comentarios.

  1.3.    Informacin sobre el copyright

  1.4.    Nota de descargo

  1.4.1.  dem sobre la traduccin

  1.5.    Otras fuentes de informacin

  1.5.1.  Usenet

  1.5.2.  Libros

  1.6.    Dnde NO buscar ayuda

  2.      Requerimientos de hardware

  3.      Obtener programas de noticias de Usenet

  4.      Programas de transporte de noticias

  4.1.    Cnews Cleanup Release

  4.1.1.  Instalacin de Cnews

  4.1.2.  Configuracin de Cnews

  4.1.3.  Mantenimiento de un sistema con Cnews

  4.2.    InterNetNews ( INN )

  4.2.1.  Instalacin de INN

  4.2.2.  Configuracin de INN

  4.2.3.  Mantenimiento de un sistema con INN

  4.3.    Otros agentes de transporte de noticias

  5.      Lectores de noticias

  5.1.    Tin

  5.2.    Trn/Mthreads

  5.3.    NN

  5.4.    Otros lectores

  6.      Agradecimientos

  7.      Preguntas frecuentes sobre Usenet (en c.o.l.*  de todas
  formas)

  7.1.    Por qu no puedo publicar en grupos moderados?

  7.2.    Por qu tengo problemas que parecen estar relacionados con
  los permisos?

  7.3.    Por qu puedo publicar artculos localmente, pero despus no
  aparecen ni se envan a otros servidores?

  7.4.    Por qu mi distribucin binaria no tiene nntp ?

  7.5.    Por qu dice doexpire  (o relaynews ) que hay una "grave
  falta de espacio" cuando hay un montn de sitio?

  7.6.    Por qu todo parece normal, pero no se publican los
  artculos?

  7.7.    Puedo integrar news overview  (NOV) en trn/tin/nn  para
  sustituir a las varias bases de datos independientes?

  7.8.    Por qu no podemos tener una distribucin binaria de NNTP ?

  7.9.    Cmo configuro NNTP  para permitir lectura/escritura
  alrededor de la red *sin* almacenar ningn artculo o base de datos
  localmente?

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  La intencin de este documento es contestar a algunas de las preguntas
  y comentarios que parecen encajar en la definicin de "preguntas
  frecuentes" sobre programas de noticias bajo Linux en general, y la
  versin en la distribucin Slackware en particular.

  Este documento, junto con los "COMOS" de correo y UUCP, sustituye al
  UUCP-NEWS-MAIL-FAQ que anteriormente se publicaba en
  comp.os.linux.announce.

  1.1.  Nuevas versiones de este documento

  Las nuevas versiones de este documento sern peridicamente publicadas
  en comp.os.linux.announce, comp.answers, y news.answers.  Tambin
  sern enviadas a los diversos servidores FTP annimos que archivan tal
  informacin, incluyendo ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO (--
  N. del T./: El autor se refiere, lgicamente, a la versin original en
  ingls.--)

  Adems, tambin debera ser posible encontrar este documento en la
  Linux WorldWideWeb home page en http://sunsite.unc.edu/mdw/linux.html.

  1.2.  Sugerencias, crticas y comentarios.

  Estoy interesado en recibir por correo electrnico cualquier
  comentario, positivo o negativo, relativo al contenido de este
  documento. Pngase en contacto conmigo si encuentra errores u
  omisiones obvias.

  Leo, aunque no necesariamente respondo, todo el correo electrnico que
  recibo. Las peticiones para mejorar este documento sern consideradas
  segn la combinacin que se d ese da entre tiempo disponible, mrito
  de la peticin, y presin sangunea :-)

  Los insultos irn silenciosamente a /dev/null, as que no se moleste.

  Particularmente, el estndar sobre rutas para el sistema de archivos
  de Linux es algo en evolucin. Lo que aparece en este documento son
  slo ejemplos basados en el estndar en curso a la hora de escribirlo,
  y en las rutas usadas en las distribuciones o paquetes de programas
  que he visto personalmente. Por favor, consulte su distribucin
  particular de Linux para saber qu rutas utiliza.

  Los comentarios sobre el formato del documento deberan ir dirigidos
  al coordinador de los HOWTO: Greg Hankins (gregh@sunsite.unc.edu).

  1.3.  Informacin sobre el copyright

  El News-HOWTO es copyright 1994 Vince Skahan.

  Pueden reproducirse o distribuirse copias literales de este documento
  en cualquier medio fsico o electrnico sin permiso del autor. Las
  traducciones estn igualmente permitidas sin permiso expreso si se
  incluye un aviso sobre quin hizo la traduccin.

  Se pueden usar pequeas citas del documento sin consentimiento previo
  del autor. Los trabajos derivados y distribuciones parciales del News-
  HOWTO deben ser acompaados ya sea con una copia literal de este
  fichero o con una referencia a la copia original.

  Se permite y se insta a la redistribucin comercial. Sin embargo, al
  autor le gustara ser avisado de tales distribuciones (como cortesa).

  En resumen, deseamos promover la diseminacin de esta informacin por
  tantos canales como sea posible. Sin embargo, deseamos mantener el
  copyright de los documentos HOWTO.

  Es ms, deseamos diseminar TODA la informacin contenida en los HOWTO.
  Si tiene alguna pregunta, por favor contacte con Greg Hankins, el
  coordinador de los HOWTO de Linux en gregh@sunsite.unc.edu.

  1.4.  Nota de descargo

  Por supuesto, no asumo ninguna responsabilidad potencial por los
  contenidos de este documento. El uso de los conceptos, ejemplos, y/u
  otros contenidos de este documento es un riesgo que el lector debe
  asumir como propio.

  1.4.1.  dem sobre la traduccin

  El traductor no se responsabiliza de los contenidos de este documento.
  Tampoco tiene por qu compartir ninguna opinin, criterio, gusto,
  estilo, sugerencia o afirmacin del autor. Ante cualquier duda,
  consltese el original en ingls.

  1.5.  Otras fuentes de informacin

  1.5.1.  Usenet

    news.admin.misc Sobre la administracin de noticias en general.

    news.admin.policy       Normativas de Usenet.

    news.admin.technical Mantenimiento de noticias de red.  (Moderado)

    news.software.b         Sobre B-news y programas compatibles.

    news.software.nn        Sobre el lector de noticias "nn".

    news.software.nntp Protocolo de Transferencia de Noticias en Red.

    news.software.readers   Programas para leer noticias.

    news.sysadmin           Comentarios a administradores de sistemas.

    news.announce.newusers Explicaciones para nuevos usuarios.
     (Moderado)

    news.newusers.questions Preguntas y respuestas para nuevos
     usuarios.

  1.5.2.  Libros

  A continuacin, una lista no exhaustiva de libros que pueden ayudar.

    "Managing UUCP and USENET", publicado por O'Reilly & Associates, es
     en mi opinin el mejor libro para conocer los programas y
     protocolos necesarios para ser parte de Usenet.

    "Unix Communications", publicado por The Waite Group, contiene una
     buena descripcin de todas las piezas (y ms), y cmo encajan unas
     con otras.

    "Practical Unix Security" publicado por O'Reilly & Associates,
     contiene una buena disertacin sobre seguridad en UUCP en general.

    "The Internet Complete Reference", de Osborne, es un buen libro de
     referencia que explica los diversos servicios disponibles en
     Internet, siendo una buena fuente de informacin sobre noticias,
     correo, y otros varios recursos de Internet.

    "The Linux Networking Administrators' Guide", de Olaf Kirch del
     Linux DOC Project, est disponible en la red y tambin publicado
     por (al menos) O'Reilly y SSC  (-- N. del T./: Tambin disponible
     en castellano bajo el ttulo de Gua de administracin de redes con
     Linux. Vase seccin ``''--) . Es una buena manera de aprender
     sobre todo lo que sobre redes de Unix pueda imaginarse.

  1.6.  Dnde NO buscar ayuda

  No hay nada "especial" en configurar y mantener las noticias de Usenet
  bajo Linux. Por lo tanto, no se debera publicar preguntas genricas
  sobre noticias en los grupos comp.os.linux.*.

  Al menos que su pregunta sea realmente especfica sobre Linux (p. ej.,
  ``qu parches se necesitan para ejecutar INN con el bash1.12 en SLS
  v1.03?'')  debera publicar sus preguntas en los grupos mencionados
  arriba.

  Permtaseme repetir esto.

  Ya no hay virtualmente ninguna razn para publicar nada relacionado
  con las noticias en la jerarqua comp.os.linux.* Existen grupos en la
  jerarqua news.* para manejar *TODAS* sus preguntas.

  SI PUBLICA VD. EN COMP.OS.LINUX.* PREGUNTAS NO ESPECFICAS SOBRE
  LINUX, EST BUSCANDO AYUDA EN EL SITIO EQUIVOCADO. LOS EXPERTOS EN
  NOTICIAS DE USENET ESTN EN LOS GRUPOS ANTERIORMENTE MENCIONADOS Y
  GENERALMENTE NO USAN LINUX.

  HACER PREGUNTAS NO ESPECFICAS DE LINUX EN LA JERARQUA LINUX ES UN
  DESPERDICIO DE TIEMPO PARA VD. Y PARA TODOS LOS DEMS, Y
  FRECUENTEMENTE LO NICO QUE CONSEGUIR ES RETRASAR LA RESPUESTA A SUS
  PREGUNTAS.

  2.  Requerimientos de hardware

  No hay requerimientos especficos de hardware para mantener un sistema
  de noticias bajo Linux. El nico requisito es disponer de suficiente
  espacio en disco para mantener los programas en s, las bases de datos
  sobre hebras, y la cantidad de noticias que se deseen mantener en el
  sistema.  Supngase un mnimo de 10Mb para empezar.

  3.  Obtener programas de noticias de Usenet

  Todos los programas que se mencionan en este "COMO" estn disponibles
  en los servidores FTP annimos habituales.

  El directorio /networking/news de ftp.uu.net es generalmente un buen
  sitio por el que empezar.

  La distribucin newspak-2.4.tar.z contiene los ficheros de
  configuracin y ayuda relativos a la construccin de programas de
  UUCP, noticias y correo bajo Linux a partir de las diversas fuentes
  gratuitas disponibles.  Generalmente se puede encontrar en
  ftp://sunsite.unc.edu/pub/Linux/system/Mail/news. Si no puede
  encontrarlo en sunsite, por favor enveme un mensaje y me asegurar de
  que reciba una copia.

  4.  Programas de transporte de noticias

  Hoy en da hay dos paquetes principales de "transporte" de noticias
  para *nix, Cnews e INN. El viejo "Bnews" ha sido declarado
  oficialmente muerto y no soportado por sus autores.

  El "transporte" de noticias se define aqu como los programas que
  trabajan detrs de las cmaras para publicar y propagar los artculos,
  as como para hacerlos disponibles a los lectores de noticias.

  Puede Vd. configurar sus rutas como guste, siempre que UUCP tenga la
  ruta absoluta a rnews en el fichero Permissions, y siempre que
  configure sus lectores de forma que puedan encontrar "inews" y "mail".

  Importante - est Vd. buscando problemas si intenta mezclar CNews e
  INN. Escoja uno u otro. Es correcto aadir el servidor NNTP "Reference
  Release"  a Cnews, ya que estn pensados para complementarse.

  4.1.  Cnews Cleanup Release

  El estndar actual de facto en programas de noticias es Cnews. Lleva
  funcionando unos cuantos aos; yo lo vi por primera vez alrededor de
  1988.  La versin actual en el momento de escribir estas lneas se
  llama "Cnews Cleanup Release, with patch CR.G".

  La mayor ventaja de Cnews es su madurez. Funciona bajo cualquier *nix
  que se pueda encontrar y hay literalmente miles de sistemas usndolo
  alrededor del mundo.

  Su mayor desventaja es que parece haber sido diseado para conexiones
  UUCP por mdem, y por tanto requiere la adicin de un servidor NNTP
  para manejar transferencia en tiempo real de noticias por Internet.

  A pesar de esto, el administrador novel debera probablemente usar
  Cnews primero, ya que es muy estable, bien documentado, y es usado por
  miles de administradores expertos que pueden contestar a sus
  preguntas.

  La 'Cleanup Release' afirma que "el soporte para Overview ha sido
  plenamente integrado y es ms rpido de lo que sola ser". El
  resultado es que se puede usar el soporte NOV de Cnews en vez de usar
  programas externos de ordenamiento en hebras, tales como nn, tin y
  trn.

  Todava no me he aclarado de cmo implementar esta parte, ya que me
  cambi a INN en casa hace tiempo. Si alguien quiere darme alguna pista
  para actualizar este documento, que por favor me deje unas lneas por
  correo electrnico.

  La distribucin newspack de sunsite contiene ficheros de configuracin
  que funcionan en la Cnews Cleanup Release bajo Linux, as como un
  parche de un par de lneas necesario para evitar algunos problemas de
  "doexplode" con bash1.12.

  Bsicamente, se ejecuta el nuevo script 'quiz' y se aceptan las
  opciones por defecto. Tendr Vd. que acudir a su rbol /usr/include
  para contestar a algunas preguntas, pero es bastante sencillo.

  4.1.1.  Instalacin de Cnews

  Instalar la Cleanup Release de Cnews es simplemente seguir los pasos
  que se detallan en la documentacin. Simplemente obtenga las fuentes,
  extrigalas, y siga las instrucciones.

  El fichero quiz.def de newspack fue generado al ejecutar "quiz" la
  primera vez, simplemente verificando los ficheros de /usr/include para
  obtener las respuestas correctas.

  Necesitar una versin reciente de 'bash' para que Cnews pase sus
  auto-tests. Teclee 'bash -version' para saber qu versin tiene.  La
  versin 1.14.2 definitivamente no es buena. La versin actual
  (mientras se escribe esto) 1.14.5 parece mejor.

  Steve Robbins ha averiguado que la reciente 'cleanup release' de Cnews
  ha encontrado un error en el comando 'join' de GNU de shellutils-1.9.
  Hay algunos parches necesarios para solventar el problema. Steve los
  puso en sunsite por peticin ma.

  4.1.2.  Configuracin de Cnews

  Como mnimo, necesitar editar o cuando menos echar un vistazo a los
  siguientes ficheros. Todos deberan estar en /usr/local/lib/news:

    active             - el fichero con los grupos activos

    batchparms         - parmetros de proceso por lotes

    explist            - configuracin de caducidad de los artculos

    mailname           - nombre de su servidor

    mailpaths          - direcciones de los moderadores de grupos

    organization       - su organizacin

    sys                - control de lo que se pide y enva

    whoami             - el nombre de su sistema para la lnea Path:

  4.1.3.  Mantenimiento de un sistema con Cnews

  Primeramente, una sencilla regla es no enredar a mano con los ficheros
  que tienen utilidades para configurarlos. Particularmente, no edite
  newsfeeds manualmente (ejecute "addfeed" en vez de eso), y no enrede
  con el fichero active (use "addgroup"). En caso de duda, lea y relea
  los documentos de la distribucin en los fuentes.

  Todo lo dems puede hacerse va cron. Mi crontab para "news" es como
  el siguiente:

          # procesar los paquetes comprimidos que vienen de otros sistemas
          # y tambien publicar los articulos originados localmente
          20 *       * * * /usenet/sw/news/bin/input/newsrun

          # crear los paquetes para enviar
          0 *        * * * /usenet/sw/news/bin/batch/sendbatches myfeedsite

          # borrar articulos caducados
          59 0       * * * /usenet/sw/news/bin/expire/doexpire

          # vigilar el cotarro y avisar si es necesario
          10 5       * * * /usenet/sw/news/bin/newsdaily
          00 5       * * * /usenet/sw/new/bin/newswatch

          # desactivar el proceso de paquetes entrantes entre 6:30AM - 4:00 PM
          30 6       * * * /usenet/sw/news/bin/input/newsrunning off
          00 16      * * * /usenet/sw/news/bin/input/newsrunning on

  4.2.  InterNetNews ( INN )

  INN es un recin llegado a la escena, pero est ganando popularidad
  conforme madura. Su mayor ventaja es la velocidad y el hecho de que
  contiene un servidor NNTP integrado. Su principal desventaja es que es
  nuevo y no se instala y funciona necesariamente en todos los *nix
  estndar todava.  Adems, opera con un demonio (el innd) siempre
  funcionando. El trato parece ser memoria por velocidad.

  He mantenido un servidor con una entrada de unos 5Mb por noche sobre
  UUCP con INN, en un 386-33 con 8Mb (normalmente no se estaba
  ejecutando X Window), a travs de un mdem de 14.4Kb sin ningn
  problema.

  Los administradores de noticias noveles probablemente no deberan
  intentar instalar INN hasta que tengan experiencia con B-news o Cnews.
  A pesar de ser rpido y verstil, est prcticamente sin documentar
  para el principiante (aunque en la prctica es bastante sencillo una
  vez que te lo imaginas).

  INN es muy quisquilloso con los permisos. No enrede con ellos.

  INN tambin es muy puntilloso con tener un protocolo TCP/IP "de
  calidad"  con el que trabajar. Linux no cumple necesariamente este
  requisito actualmente, as que se recomienda obtener una distribucin
  de INN especfica para Linux, en cualquier de los servidores de
  archivos de Linux.

  4.2.1.  Instalacin de INN

  ( por Arjan de Vet - devet@info.win.tue.nl )

  He hecho un parche + un paquete de configuracin para ejecutar INN 1.4
  bajo Linux. Puede encontrarse en:

  ftp://ftp.win.tue.nl/pub/linux/ports/inn-1.4-linux.tar.gz

  INN depende en gran medida de un buen sustituto para /bin/sh. Yo uso
  una versin beta de bash 1.13 que est disponible para Linux en los
  servidores de ficheros habituales. bash 1.12 da algunos pequeos
  problemas al no manejar correctamente los grupos de noticias (puede
  que algn otro problema tambin, no recuerdo).

  4.2.2.  Configuracin de INN

  Bsicamente, siga las instrucciones de Arjan y el sistema estar
  listo.  Aqu hay un sumario de qu hacer.

  1. En config.data, asegrese de que aparece "HAVE_UNIX_DOMAIN DONT"

  2. Aada el nombre del sistema en el que funciona innd a hosts.nntp.
     Si slo dispone de UUCP, ese es el nombre de su servidor

  3. Asegrese de que no tiene una lnea para nntp en /etc/inetd.conf

  4. Asegrese de que innshellvars contiene "HAVE_UUSTAT DO" en vez del
     "DONT" en este config.data de ejemplo si tiene Vd. instalado uustat
     del paquete Taylor UUCP. Definir esto incorrectamente resultar en
     que no se procesen las noticias salientes.

  5. Si usa Vd. INN, defina el syslogd tal como se recomienda, porque es
     muy, muy til.

  Hay un FAQ (-- N. del T./Preguntas de Uso Frecuente, (PUFs)--)

  espectacular (!!!!) sobre INN que aparece mensualmente.  Bsquelo en
  de hacerlo.

  4.2.3.  Mantenimiento de un sistema con INN

  He descubierto que un sistema Linux con INN no requiere prcticamente
  ninguna atencin y mantenimiento mientras se tenga un cron adecuado.
  Bsicamente, querr Vd. un crontab parecido al siguiente:

          # mantenimiento diario, asi como borrar articulos y ficheros
          # .overview caducados
          1 0 * * * /usenet/sw/inn/bin/news.daily expireover delayrm < /dev/null

          # enviar articulos
          5 * * * * /usenet/sw/inn/lib/send-uucp

  ( si usa Vd. bash1.13, el "< /dev/null" no es necesario )

  4.3.  Otros agentes de transporte de noticias

  A continuacin, una lista no exhaustiva de otros programas de
  transporte de noticias que funcionan bajo Linux:

    dynafeed

    nntp1.5.11

    slurp1.05

  5.  Lectores de noticias

  No existe un "lector de noticias verdadero". Como resultado, hay
  muchos lectores bien conocidos que se compilan fcilmente bajo Linux
  en particular.  En el momento de escribir esto, "tin", "trn", y "nn"
  estn en la mayora de las distribuciones de Linux disponibles y en
  newspack.

  A la hora de elegir un lector de noticias, se requiere bsicamente
  algo que sea fcil de usar, muy configurable por el usuario, y con
  capacidad para ordenar por hebras y filtrar los artculos (seleccionar
  los artculos interesantes o hacer que los no interesantes no
  aparezcan en absoluto).

  Puede configurar sus rutas como quiera en tanto en cuanto todos los
  lectores puedan encontrar "inews" de su instalacin de Cnews o INN, y
  el programa "mail" para mandar respuestas por correo electrnico a los
  artculos.

  Esta seccin tratar brevemente sobre varios de los lectores ms
  populares.  Antes de que pregunte, yo uso "nn" por un montn de
  razones :-)

  5.1.  Tin

  Tin es un lector con capacidad de ordenamiento en hebras que trata de
  ser fcil para los nuevos usuarios. Soporta filtrado de artculos y
  hebras NOV.  Si utiliza Vd. INN, leer los ficheros .overview por
  defecto, y no escribir ficheros ndice.

  Para compilar Tin bajo Linux, simplemente edite el fichero Makefile
  para indicar dnde se encuentran ciertos programas (especialmente la
  ubicacin de inews) y teclee "make linux". No se requiere ningn
  parche para tin bajo Linux.

  Para ordenar los artculos en hebras, puede simplemente invocar a tin
  con el parmetro "-u" para actualizar los ficheros ndice.

  Para usar la capacidad de tin para leer va NNTP, complese con
  "NNTP_ABLE"  definido. Esto resultar en un fichero llamado "tin" para
  el servidor local y otro llamado "rtin" para lectura NNTP. "tin -r"
  obtendr el mismo resultado que "rtin".

  Iain Lea recomienda la siguiente entrada de crontab, y dice que se
  necesita hacer un "make daemon" para compilar tind.

          # ordenar en hebras
          35 * * * * /usenet/bin/tind -u

  He usado tin sobre un enlace SLIP como lector NNTP. Si conecta Vd.
  con un sistema que disponga de todos los grupos de Usenet, se har muy
  viejo esperando a que tin se baje el fichero "active".

  5.2.  Trn/Mthreads

  trn es un derivado de "rn" con capacidad para ordenar en hebras.
  trn3.2 y superiores tienen la posibilidad de seleccionar entre
  "mthreads" (el creador de hebras de trn) o NOV (creador de hebras de
  INN).

  Para compilarlo, simplemente ejecute Configure y acepte las opciones
  por defecto. Es posible que necesite lib4.4.1 y bash-1.13 (hay una
  beta disponible en varios servidores de archivos de Linux) para
  ejecutar Configure con xito. Probablemente necesitar tanto bash1.13
  como libs4.4.1 para conseguir que el nuevo Configure funcione
  correctamente.

  La distribucin newspak de sunsite contiene ficheros de configuracin
  funcionales para trn bajo Linux.

  Es probablemente poco deseable intentar editar un config.sh a mano, a
  menos que est Vd. haciendo algo *MUY* sencillo, como cambiar las
  rutas para adecuarlas a sus gustos. Si hace esto, necesitar ejecutar
  "Configure -S"  antes de "make depend", "make" y "make install".

  Aunque "Configure" falla generalmente bajo Linux con bash1.12,
  "Configure -S" funciona bien, as que si toma Vd. el config.sh de
  newspak como punto de partida, estar muy cerca.

  Compilar con soporte NNTP es tan simple como contestar "yes" cuando
  Configure le pregunte si lo quiere (suponiendo que Configure funciona
  en su sistema). Un futuro lanzamiento de newspak incluir un config.sh
  para NNTP, as como el ya existente para sistema local para aquellos
  de nosotros que seguimos usando bash1.12.

  He usado trn sobre un enlace SLIP como lector NNTP. Si conecta Vd.
  con un sistema que disponga de todos los grupos de Usenet, se har muy
  viejo esperando a que trn se baje el fichero "active" y a que ordene
  los artculos.

  Hay docenas de parmetros con los que invocar a trn para obtener toda
  clase de comportamientos. Lea la pgina de manual de "trn" para
  conocer los detalles. Yo uso una buena prestacin de trn para indicar
  todos los parmetros fcilmente:

    Cree un fichero ~/.trnrc con todas las opciones

    export TRNINIT="~/.trnrc"

  La distribucin actual de newspak tiene una copia de mi .trnrc como
  ejemplo.

  trn3.2 y superiores permiten elegir al usuario hebras NOV o de
  mthreads. Por lo tanto, recomiendo compilar el programa para permitir
  ambos mecanismos (es una pregunta de Configure). Para elegir uno de
  ellos en el momento de ejecucin, pruebe "trn -Zo" para NOV y "trn
  -Zt" para mthreads. Yo defino un alias para trn para usar el mecanismo
  deseado.

  Para construir la base de datos de mthreads, haga algo como lo
  siguiente en el crontab de "news":

               # crear la base de datos de mthreads
               35 * * * * /usenet/bin/mthreads all

  5.3.  NN

  La distribucin newspak de sunsite contiene ficheros de configuracin
  funcionales para nn6.4.18 que Vd. puede copiar en el lugar adecuado y
  teclear "make" bajo Linux. Tambin funcionan con la beta 6.5b3 de la
  prxima actualizacin nn6.5.

  Cuando haya terminado la compilacin, necesita hacer lo siguiente:

    ejecutar el programa "inst" para instalar cosas.  (instalar todo)

    inicializar la base de datos

    arrancar nnmaster

  Consulte los documentos de nn para ms detalles. Compilar, configurar
  y ejecutar nn bajo Linux no es diferente a ejecutar nn en cualquier
  otro *nix con la excepcin de que podra desearse ejecutar nnmaster
  desde cron en vez de como demonio. Si se ejecuta como demonio bajo
  Linux, es posible que tienda a no activarse adecuadamente (de todas
  formas el efecto de ejecutarlo desde cron es el mismo).

  El soporte para "nn" es tan simple como las siguientes entradas de
  crontab:

               # ejecutar nnmaster
               # (no necesario si se usa NOV de INN en nn-6.5beta3)
               25 * * * * /usenet/sw/nn/lib/nnmaster

               # purgar la base de datos de nn
               # (no necesario si se usa NOV de INN en nn-6.5beta3)
               0  4       * * * /usenet/sw/nn/bin/nnadmin =EYW

               # obtener una copia del fichero active de "nngoback" y guardar los
               # ultimos 7
               0 3 * * * /usenet/sw/nn/lib/back_act 7

  He experimentado un poco ejecutando nn como lector NNTP sobre una
  conexin SLIP. En este caso, querr Vd. editar ligeramente el fichero
  config.h. Lea los comentarios del fichero para conocer los detalles.
  Cuando se usa como lector NNTP, nn ejecuta una copia local de nnmaster
  para mantener la base de datos en el sistema local, con lo que la
  seleccin de artculos es muy rpida (aunque por supuesto hay que
  esperar un poco al cuerpo del artculo si se usa SLIP con un mdem).

  La nueva versin (6.5.x) de nn tiene soporte para la base de datos NOV
  de INN, lo que hace absolutamente innecesario el uso de nnmaster. Esta
  configuracin est altamente recomendada, ya que como resultado, no se
  tendr que gastar tiempo de la CPU para ejecutar nnmaster en absoluto,
  y no se producirn desfases entre la base de datos y los artculos
  reales disponibles.

  5.4.  Otros lectores

  A continuacin, una lista no exhaustiva de lectores de noticias que se
  dice funcionan bajo Linux:
    tass

    xrn

    gnus

  6.  Agradecimientos

  Las siguientes personas han ayudado en la recopilacin de informacin
  (y experiencia) que ayud a hacer posible este documento:

  Ed Carp, Steve Robbins, Ian Taylor, Greg Naber, Matt Welsh, Iain Lea,
  Arjan de Vet.

  Si me olvido de alguien, mis disculpas.

  7.  Preguntas frecuentes sobre Usenet (en c.o.l.*  de todas formas)

  7.1.  Por qu no puedo publicar en grupos moderados?

  Probablemente porque el lector de noticias trata de usar /bin/mail
  para enviar el correo y no le gusta. Sustituya el /bin/mail de las
  viejas versiones de SLS con el mailx-5.5.tar.z de una distribucin
  Slackware moderna, use el pkgtool de Slackware para instalarlo y
  asunto arreglado.

  Otra posibilidad es que tenga definido el grupo moderado como no
  moderado en su sistema local, y que alguien en la red est borrando
  silenciosamente el artculo (algn programa de proceso de noticias, no
  una persona).  Asegrese de ejecutar "checkgroups" siempre que el
  artculo checkgroups aparezca por news.admin cada pocas semanas.

  7.2.  permisos?  Por qu tengo problemas que parecen estar relaciona
  dos con los

  Porque lo estn :-)

  Compruebe que sus permisos son correctos y que tiene un usuario y
  grupo "news" en /etc/passwd y /etc/group que coincida con la
  distribucin binaria que use. Parece ser que todava no existe una
  norma comn sobre las cuentas habituales en Linux.

  Todo el material de /usr/local/lib/news debera ser news.news,
  debera ser setuid root.

  Puede Vd. usar el UID y GID que quiera para "news".

  7.3.  aparecen ni se envan a otros servidores?  Por qu puedo pub
  licar artculos localmente, pero despus no

  Probablemente porque no se invoc a newsrun desde cron. Puede ser que
  editase Vd. el fichero sys y lo enredase. Puede ser que no tenga el
  rbol /usr/spool/news/out.going o similar. Puede ser porque usa Vd.
  una distribucin con las versiones 'Performance' o desde cron para
  procesar los lotes que se enviarn a otros servidores, y para hacer
  visibles los artculos localmente.
  No cree los grupos o servidores editando los ficheros active o sys.
  Use las utilidades de /usr/local/lib/news/bin/maint para hacerlo.

  7.4.  Por qu mi distribucin binaria no tiene nntp ?

  Porque se supone que es muy fcil de instalar en Linux y porque no
  quise que el material para noticias de SLS fuese el doble de grande
  teniendo que mantener versiones nntp y no nntp de los lectores y
  sistema de transporte de noticias. Tambin porque se compila con
  informacin especfica para cada sitio que no puede ser modificada en
  ningn fichero de configuracin una vez se ha compilado.

  7.5.  Por qu dice doexpire  (o relaynews ) que hay una "grave falta
  de espacio" cuando hay un montn de sitio?

  Porque no puede leer /etc/mtab. Pngale permisos 644. Esto ocurre
  cuando se desmonta un sistema de archivos montado por root con una
  mscara que no permite al resto de los usuarios leer ficheros
  pertenecientes a root.

  7.6.  Por qu todo parece normal, pero no se publican los artculos?

  Las versiones viejas de Linux tienen un sed "roto" que Cnews pone en
  evidencia. En particular, si se instal sobre una SLS vieja, asegrese
  de mirar /bin y /usr/bin y compruebe que slo tiene una copia de sed y
  de que es moderna.

  A partir de la 'Performance Release' de alrededor de febrero de 1993,
  es necesario ejecutar 'newsrun' peridicamente desde cron para
  procesar cosas. Esta es una prestacin que aparentemente sorprende a
  alguna gente.

  7.7.  para sustituir a las varias bases de datos independientes?
  Puedo integrar news overview  (NOV) en trn/tin/nn

  S. trn, tin, y la beta de nn ahora lo soportan.

  Puede integrarlo en las versiones Performance y Cleanup de Cnews, as
  como en varios lectores de noticias.

  La copia beta de nn6.5 que tengo aqu tiene soporte NOV y funciona sin
  problemas en Linux. La uso aqu y tengo nn ejecutndose sin tener que
  ejecutar nnmaster (!). Busque en ftp://uniwa.uwa.edu.au para obtener
  una copia.

  7.8.  Por qu no podemos tener una distribucin binaria de NNTP ?

  Porque una parte significativa de la informacin local debe
  especificarse antes de la compilacin y no puede determinarse
  automgicamente en tiempo de ejecucin. Si tanto lo necesita, por
  favor obtenga INN en vez de intentarlo con Cnews ms NNTP.

  7.9.  de la red *sin* almacenar ningn artculo o base de datos local
  mente?  Cmo configuro NNTP  para permitir lectura/escritura alrede
  dor

  ( mdw@sunsite.unc.edu (Matt Welsh) )

  1. Obtenga la "implementacin de referencia" de nntp y una copia de rn
     de su depsito de archivos local. Si conectase con ftp.uu.net
     obtendra:

     nntp.1.5.11.tar.Z

  2. Compile nntp como sigue:

    copie common/conf.h.dist a common/conf.h.

    Edite common/conf.h para activar ciertas opciones: Las nicas que
     yo activ fueron:

    DOMAIN: indefnalo (es decir, cambie la lnea a #undef DOMAIN).

    REALDOMAIN: Defnalo. Busca el dominio usando las libreras.

    SERVER_FILE: Defnalo como el nombre del fichero que contendr el
     nombre de su servidor de noticias (p. ej. la mquina a travs de la
     cual leer y publicar noticias). Yo uso
     "/usr/local/lib/news/server".

    PASSFILE: Si su servidor de noticias requiere autorizacin (p. ej.
     algn tipo de nombre de usuario y contrasea)  para publicar,
     defina esto como el nombre del fichero que contiene el nombre de
     usuario y la contrasea (descrito ms abajo). Yo uso
     "/usr/local/lib/news/nntppass".

    Decid guardar el resto del material de noticias en
     /usr/local/lib/news. As que configur el resto de rutas del
     archivo (p.  ej. ACTIVE_FILE, NEWSGROUPS_FILE, etc.) para que
     usasen /usr/local/lib/news. Muchos de esos ficheros son usados slo
     por el servidor NNTP, no por el cliente, pero para asegurarme los
     cambi todos para que apuntasen al directorio correcto; simplemente
     asegrese de crear el directorio de forma acorde.

  3. Cree el usuario "usenet" si no lo ha hecho ya. El programa inews se
     ejecuta perteneciendo a este usuario. Todo lo que se necesita es un
     identificativo de usuario, no se necesita un directorio de usuario
     o una shell ni nada de eso. Simplemente inserte la siguiente lnea
     en su /etc/passwd:

                                       usenet:*:13:1::/:

  Asegrese de que el identificativo de usuario ("13" arriba) es nico.
  El grupo puede ser cualquiera; yo uso "daemon" (gid 1).

  4. Cree el fichero SERVER_FILE. Por ejemplo, mi servidor de noticias
     es "wonton.tc.cornell.edu", as que cre el fichero
     /usr/local/lib/news/server conteniendo la siguiente lnea:

                        wonton.tc.cornell.edu

  5. Cree el fichero PASSFILE. Este fichero contiene lneas de la forma

       <nombre del servidor> <nombre del usuario> <clave>

  Supongamos que su servidor de noticias (el del fichero SERVER_FILE) es
  "shoop.vpizza.com", y que para publicar en esa mquina se requiere ser
  autorizado como usuario "news" con la contrasea "floof".  Por tanto,
  en el fichero PASSFILE (yo uso /usr/local/lib/news/nntppass), se nece
  sita la siguiente lnea:

                 shoop.vpizza.com news floof

  6. Proteja este fichero! El programa inews se ejecuta perteneciendo
     al usuario "usenet", as que haga que este directorio de noticias
     pertenezca a dicho usuario, as como el fichero nntppass.

               chown usenet /usr/local/lib/news
               chmod 755 /usr/local/lib/news
               chown usenet /usr/local/lib/news/nntppass
               chmod 600 /usr/local/lib/news/nntppass

  De forma que nadie ms pueda leer este fichero. No, las contraseas no
  estn encriptadas.

  7. Vuelva al directorio donde estn las fuentes de nntp.1.5.11 y
     teclee "make client". En este punto se compilar la versin NNTP de
     inews, que es el nico programa utilizado por el cliente NNTP.

     Cuando compil inews, haba un error en la librera que causaba que
     la funcin uname() de uname.c se llamase a s misma eternamente.
     Esto probablemente ya haya desaparecido; sin embargo, si inews
     parece colgarse y su sistema empieza a ralentizarse *un montn*,
     debera renombrar la funcin "uname()" de uname.c a algo como
     "mi_uname()", y sustituir las llamadas a uname() por llamadas a
     mi_uname() (en inews.c).  Escrbame (-- Nota de VDS - esto
     significa escribir a Matt, no a m :-)--) . si se encuentra con
     este problema.

  8. Teclee "make install_client". Esto instalar inews y dems ficheros
     necesarios. Tambin, enlace /usr/local/lib/news/inews con
     /usr/local/bin/inews.

     Ahora debera ser capaz de publicar (a mano). Pruebe algo como
     esto:

                       $ inews -h << EOF
                       Newsgroups: misc.test
                       From: yo@foo.bar.com
                       Subject: Prueba
                       Reply-To: mi-direcccion-real@cualquiera.edu

                       Esto es una prueba
                       EOF

  Si esto funciona, inews debera publicar el artculo. Lo sabr Vd.
  porque los programas automticos de respuesta de misc.test contestarn
  a la direccin del campo Reply-To. Por favor, no publique artculos de
  prueba en grupos de verdad, como c.o.l. :)

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Linux PCMCIA COMO
  David Hinds, dhinds@hyper.stanford.edu
  Romero, dlr@cuates.pue.upaep.mx
  Original: v2.40, 10 Septiembre 1999

  Este documento describe cmo instalar y usar los servicios de las tar
  jetas PCMCIA con Linux. Las ltimas versiones de este documento puede
  encontrarlas siempre en ftp://hyper.stanford.edu/pub/pcmcia/doc. La
  versin en HTML est en http://hyper.stanford.edu/HyperNews/get/pcm
  cia/home.html
  ______________________________________________________________________

  ndice general





















































  1. Informacin general y requerimientos de hardware

     1.1 Introduccin
     1.2 Licencia y renuncia de responsabilidad
     1.3 Cul es la ltima versin, y dnde puedo obtenerla?
     1.4 Qu sistemas estn soportados?
     1.5 Qu tarjetas estn soportadas?
     1.6 Cundo estar soportada mi tarjeta favorita (no soportada)?
     1.7 Listas de correo y otras fuentes de informacin
     1.8 Por qu no distribuyen binarios?
     1.9 Por qu el paquete es tan grande?

  2. Compilacin e instalacin

     2.1 Prerequisitos y configuracin del kernel
     2.2 Instalacin
     2.3 Opciones de inicio
     2.4 Configuracin de recursos del sistema
     2.5 Notas acerca de distribuciones de Linux especficas
        2.5.1 Debian
        2.5.2 Red Hat, Caldera, Mandrake
        2.5.3 Slackware
        2.5.4 SuSE

  3. Resolucin de problemas de instalacin y configuracin

     3.1 No se cargan los mdulos bsicos de PCMCIA.
     3.2 Algunos mdulos controladores no cargan
     3.3 fallos en la bsqueda de interrupciones
     3.4 Fallos en la bsqueda de puertos de E/S
     3.5 Fallos durante la comprobacin de la memoria
     3.6 Fallo al detectar cuando se inserta o se extrae la tarjeta
     3.7 Faltan recursos del sistema
     3.8 Conflicto de recursos entre dos tarjetas
     3.9 No se completa la configuracin de dispositivos

  4. Uso y caractersticas

     4.1 Herramientas para configurar y monitorizar dispositivos PCMCIA
        4.1.1 El demonio de configuracin
        4.1.2 Las utilidades
        4.1.3 Insercin y extraccin de tarjetas
        4.1.4 Servicios de Tarjetas y Administracin Avanzada de Energa
        4.1.5 Apagado del sistema PCMCIA
     4.2 Un vistazo a los scripts de configuracin de PCMCIA
     4.3 Adaptadores de red PCMCIA
        4.3.1 Parmetros de dispositivos de red
        4.3.2 Comentarios acerca de tarjetas especficas
        4.3.3 Diagnstico de problemas con adaptadores de red
     4.4 Dispositivos serie PCMCIA y mdems
        4.4.1 Parmetros de dispositivos serie
        4.4.2 Diagnstico de problemas con dispositivos serie
     4.5 Dispositivos PCMCIA de puerto paralelo
        4.5.1 Parmetros de dispositivos paralelos
        4.5.2 Diagnstico de problemas con dispositivos de puertos paralelos
     4.6 Adaptadores SCSI PCMCIA
        4.6.1 Parmetros de dispositivos SCSI
        4.6.2 Comentarios acerca de tarjetas especficas
        4.6.3 Diagnstico de problemas con adaptadores SCSI
     4.7 Tarjetas de memoria PCMCIA
        4.7.1 Parmetros de dispositivos de memoria
        4.7.2 Uso de tarjetas de memoria flash
     4.8 Tarjetas PCMCIA para unidades ATA/IDE
        4.8.1 Parmetros para discos ATA/IDE
        4.8.2 Diagnstico de problemas con adaptadores ATA/IDE
     4.9 Tarjetas multifuncin
  5. Temas avanzados

     5.1 Apartado de recursos para dispositivos PCMCIA
     5.2 Cmo puedo separar configuraciones de los dispositivos para casa y el trabajo?
     5.3 Arranque desde un dispositivo PCMCIA
        5.3.1 El script
        5.3.2 Creacin de un disquete de inicio
        5.3.3 Instalacin de una imagen

  6. Problemas con tarjetas no soportadas

     6.1 Configuracin de tarjetas no reconocidas
     6.2 Soporte para una tarjeta ethernet compatible con NE2000
     6.3 Tarjetas PCMCIA para unidades de disquete
     6.4 Qu hay de las tarjetas Xircom?

  7. Trucos para depurar e informacin de programacin

     7.1 Envo de informes de
     7.2 Interpretacin de los informes generados por los
     7.3 Primeros auxilios al depurar a bajo nivel
     7.4 (TT
     7.5 Programacin de controladores de servicios PCMCIA para nuevas tarjetas
     7.6 Sugerencias para los autores de controladores PCMCIA
     7.7 Sugerencias para encargados de las distribuciones de Linux

  8. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Informacin general y requerimientos de hardware



  1.1.  Introduccin


  Los Servicios de Tarjeta para Linux son un paquete de soporte completo
  para PCMCIA o PC Card. Incluye un conjunto de mdulos cargables en el
  kernel que implementan una versin de la interface del programa de
  aplicacin de Servicios de Tarjetas, un conjunto de controladores de
  clientes para tarjetas especficas, y un demonio controlador de
  tarjetas que responde a los eventos de insercin y extraccin de
  tarjetas, el cual carga y descarga los controladores segn sea
  necesario. Soporta extraccin en caliente de la mayora de tarjetas,
  por lo que pueden ser insertadas y extradas de forma segura en
  cualquier momento.

  Este software est en continuo desarrollo. Probablemente contenga
  bugs, y debe ser usado con precaucin. Har lo que est en mi mano
  para resolver los problemas que me son comunicados, pero si no me los
  dice, nunca lo sabr. Si usa este cdigo, espero que me enve sus
  experiencias, buenas o malas!

  Si tiene sugerencias de cmo puede mejorarse este documento, por favor
  hgamelo saber (dhinds@hyper.stanford.edu).


  1.2.  Licencia y renuncia de responsabilidad


  Derechos Reservados  1998 David A. Hinds


  Este documento puede ser reproducido o distribuido en cualquier forma
  sin mi permiso previo. Las versiones modificadas de este documento,
  incluyendo traducciones a otros idiomas, pueden ser distribuidos
  libremente, si son claramente identificados como tales, y siempre que
  este copyright se incluya intacto.

  Este documento puede ser includo en distribuciones comerciales sin mi
  previo consentimiento. Aunque no suponga requisito, me gustara estar
  informado de su uso. Si pretende incorporar este documento en un
  trabajo para ser publicado, por favor contacte conmigo para asegurarme
  que tiene la ltima versin disponible.

  Este documento se proporciona TAL CUAL, sin garantas expresas o
  implcitas. Utilice la informacin en este documento bajo su propio
  riesgo.


  1.3.  Cul es la ltima versin, y dnde puedo obtenerla?


  La versin actual de los Servicios de Tarjetas es la 3.0, y las
  actualizaciones menores o reparaciones de bugs se numeran 3.0.1,
  3.0.2, y as sucesivamente.

  El cdigo fuente de la ltima versin est disponible en
  ftp://hyper.stanford.edu en el directorio /pub/pcmcia como pcmcia-
  cs-3.0.?.tar.gz.  Habr usualmente varias versiones ah.  Por lo
  general, solo conservo la ltima versin menor para dar origen a una
  versin mayor.

  Las nuevas versiones pueden contener cdigo relativamente sin probar,
  as que tambin conservo la ltima versin de la ltima mayor como
  colchn relativamente estable; el retraso actual es 2.9.12. Vd.
  decide qu versin es ms apropiada, el archivo CHANGES mostrar las
  diferencias ms importantes.

  ftp://hyper.stanford.edu es replicado en ftp://sunsite.unc.edu (y
  todos los servidores rplica de Sunsite) en /pub/Linux/kernel/pcmcia.

  Si no se siente Vd. a gusto compilando controladores, hay
  controladores precompilados incluidos con las versiones actuales de la
  mayora de las distribuciones principales de Linux, incluyendo
  Slackware, Debian, Red Hat, Caldera, SuSE, e Yggdrasil, entre otros.


  1.4.  Qu sistemas estn soportados?


  Este paquete debera correr en la mayora de porttiles basados en
  Intel y que sean Linuxizables. Tambin corre en plataformas basadas
  en Alpha (DEC Multia, por ejemplo). Se programa para hacer al paquete
  completamente dual-endian, as que tambin soporta plataformas basadas
  en PowerPC (Apple Powerbooks, por ejemplo). Los controladores de
  sockets ms comunes estn soportados. Las bahas de tarjetas PCMCIA
  para sistemas de escritorio deben funcionar si usan un controlador
  soportado, y se conectan directamente al bus ISA o PCI, lo opuesto a
  los adaptadores SCSI-a-PCMCIA o IDE-a-PCMCIA.

  Estn soportados los siguientes controladores:


    Cirrus Logic PD6710, PD6720, PD6722, PD6729, PD6730, PD6732, PD6832

    Intel i82365sl B, C, y secuencias DF, 82092AA


    O2Micro OZ6729, OZ6730, OZ6832, OZ6833, OZ6836, OZ6860

    Omega Micro 82C092G

    Ricoh RF5C296, RF5C396, RL5C465, RL5C466, RL5C475, RL5C476, RL5C478

    SMC 34C90

    Texas Instruments PCI1130, PCI1131, PCI1210, PCI1220, PCI1221,
     PCI1250A, PCI1251A, PCI1251B, PCI1450

    Toshiba ToPIC95, ToPIC97 (experimental)

    Vadem VG465, VG468, VG469

    VLSI Technologies 82C146, VCF94365

    VIA VT83C469

    Databook DB86082, DB86082A, DB86084, DB86084A, DB86072, DB86082B

  Otros controladores que estn registrados como compatibles con el
  Intel i82365sl, funcionarn tambin como norma general.

  El soporte para tarjetas CardBus de 32 bits es todava experimental.
  Los manejadores previos a la versin 3.0 slo soportan tarjetas de 16
  bits en sockets CardBus. Debido al paso tan rpido en el cambio de la
  tecnologa para el hardware de porttiles, aparecen nuevos
  controladores frecuentemente, y puede producirse cierto estancamiento
  entre el momento en que aparece un nuevo modelo en el mercado, y el
  que haya soporte para ese controlador.

  Toshiba ha dispuesto parcialmente documentacin sobre sus chipsets
  ToPIC95 y ToPIC97, sin embargo, la informacin que han liberado no ha
  sido la realmente adecuada. A pesar de los informes de conflictos,
  Toshiba no ha hecho algn esfuerzo efectivo para remediar esta
  situacin.  Hay problemas serios en el soporte de Linux para los
  chipsets ToPIC, que no pueden ser resueltos hasta que est disponible
  una documentacin mejor, o la ayuda adecuada por parte de Toshiba. No
  recomiendo el uso de porttiles Toshiba por el momento. Para el uso de
  tarjetas de 16 bits, recomiendo establecer el modo de puente a PCIC en
  la configuracin de la BIOS; para tarjetas CardBus, la decisin es
  suya.

  El controlador Motorola 6AHC05GA usado en porttiles Hyundai, no est
  soportado. El controlador en la HP Omnibook 600 tampoco.


  1.5.  Qu tarjetas estn soportadas?


  La versin actual incluye controladores para una variedad de tarjetas
  ethernet, para tarjetas mdem y puertos serie, varios controladores
  para adaptadores SCSI, un controlador para tarjetas de unidades
  ATA/IDE, y controladores para tarjetas de memoria que slo soportan la
  mayora de tarjetas SRAM y algunas tarjetas flash. El archivo
  SUPPORTED.CARDS includo en cada versin de Servicios de Tarjetas
  lista todas las tarjetas que se sabe que funcionan al menos en un
  sistema.

  La probabilidad de que funcione una tarjeta que no est en la lista de
  soportados depende del tipo. Esencialmente todos los mdems deberan
  funcionar con el controlador provisto. Algunas tarjetas de red pueden
  funcionar si hay versiones OEM de las tarjetas soportadas. Otro tipo
  de tarjetas de E/S (frame buffers, tarjetas de sonido, etc) no
  funcionarn hasta que alguien escriba los controladores apropiados.
  1.6.  Cundo estar soportada mi tarjeta favorita (no soportada)?


  Desafortunadamente, no me pagan por escribir controladores para
  dispositivos, as que si quiere tener un controlador para su tarjeta
  favorita, probablemente tendr trabajar un poco.  Idealmente, me
  gustara trabajar hacia un modelo como el del kernel de Linux, donde
  yo sea el responsable principalmente del cdigo del ncleo y otros
  autores puedan contribuir y mantener los controladores para tarjetas
  especficas. El archivo SUPPORTED.CARDS menciona algunas tarjetas para
  las cuales los controladores estn actualmente en progreso. Tratar de
  ayudar donde pueda, pero tenga en cuenta que depurar controladores de
  dispositivo del kernel por email no es particularmente efectivo.

  Los fabricantes interesados en ayudar a proveer soporte Linux para sus
  productos pueden contactar conmigo a fin de acordar consultoras.


  1.7.  Listas de correo y otras fuentes de informacin


  Sola mantener una base de datos y una lista de correo de usuarios de
  Linux PCMCIA. Recientemente he convertido mi pgina web para
  informacin de Linux PCMCIA en un sitio HyperNews, con un conjunto de
  listas de mensajes de temas de Linux PCMCIA. Hay listas para
  instalacin y configuracin, para diferentes tipos de tarjetas, para
  programar y depurar. La pgina de informacin de Linux PCMCIA est en
  http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html. Los usuarios
  pueden solicitar otificacin por email de nuevas respuestas a
  preguntas particulares, o notificacin para todos los mensajes nuevos
  en una categora dada. Espero que esto sea un repositorio til de
  informacin, para cuestiones que van ms all del enfoque del COMO.

  Hay una lista de Linux dedicada a asuntos de porttiles, la lista
  linux-laptop. Para ms informacin, enve un mensaje con la palabra
  help a majordomo@vger.rutgers.edu. Para suscribirse, enve un email
  que contenga el mensaje subscribe linux-laptop a la misma direccin.
  Esta lista de correo puede ser un buen foro de discusin de asuntos de
  Linux PCMCIA.

  La pgina de Linux Laptop est en
  http://www.cs.utexas.edu/users/kharker/linux-laptop tiene enlaces a
  muchos sitios que tienen informacin acerca de la configuracin de
  tipos especficos de porttiles para Linux. Hay tambin una base de
  datos para buscar informacin acerca de configuracin de sistemas.


  1.8.  Por qu no distribuyen binarios?


  Para mi, distribuir los binarios puede suponer una molestia
  importante.  Esto es complicado porque algunas caractersticas solo
  pueden ser seleccionadas al momento de compilar, y porque los mdulos
  dependen mucho de contar con una configuracin correcta del kernel.
  As, probablemente necesite distribuir mdulos precompilados junto con
  los kernels correspondientes.  Ms que esto, la necesidad ms grande
  de los mdulos precompilados es cuando se instala Linux en un sistema
  limpio. Esto tpicamente requiere configurar los controladores para
  que puedan ser utilizados en el proceso de instalacin, para una
  distribucin de Linux en particular. Cada distribucin de Linux tiene
  su propia idiosincrasia, y no me resulta factible el proveer discos
  boot y root para cada una de las combinaciones de controladores y
  distribuciones.

  PCMCIA forma parte ahora de las principales distribuciones de Linux,
  incluyendo RedHat, Caldera, Slackware, Yggdrasil, Craftworks y Nascent
  Technology.



  1.9.  Por qu el paquete es tan grande?


  Bueno, no es realmente tan grande al fin y al cabo. Todos los mdulos
  controladores ocupan alrededor de 500K de espacio en disco. Los
  programas de utilidades aaden unos 70K, y los scripts en /etc/pcmcia
  son de 50K. Los controladores principales ocupan unos 55K de la
  memoria del sistema. El demonio cardmgr ser generalmente
  intercambiado excepto cuando cuando las tarjetas sean insertadas o
  extradas. El tamao total del paquete es comparable a las
  implementaciones de servicios de tarjetas de DOS/Windows.



  2.  Compilacin e instalacin




  2.1.  Prerequisitos y configuracin del kernel


  Antes de empezar, debera pensar si realmente necesita compilar el
  paquete por s mismo. Todas las distribuciones comunes de Linux vienen
  con paquetes de controladores precompilados. Generalmente, slo
  necesita instalar los controladores si necesita una caracterstica
  nueva de los ms actuales, o si ha actualizado y/o reconfigurado su
  kernel de forma que es incompatible con los incluidos en su
  distribucin de Linux. A pesar de que compilar el paquete no es
  tcnicamente difcil, requiere algo de familiaridad general con Linux.

  Las siguientes cosas deben estar instaladas en su sistema antes de
  comenzar:


    El rbol de fuentes del kernel, serie 2.0.*, 2.1.*, o 2.2.*

    Un conjunto apropiado de utilidades de mdulos.

    La interface de utilidades XForms para X11 (Opcional).

  Necesita tener la estructura completa del cdigo fuente del kernel, no
  slo una imagen actualizada del kernel. Los mdulos de los
  controladores contienen algunas referencias a los archivos fuentes del
  kernel. Mientras que Vd. busca compilar un kernel nuevo para eliminar
  manejadores innecesarios, instalar PCMCIA no requiere que lo haga as.

  Los fuentes y parches estables actuales del kernel estn disponibles
  en
  ftp://sunsite.unc.edu/pub/Linux/kernel/v2.0, o en
  ftp://tsx-11.mit.edu/pub/linux/sources/system/v2.0 Los kernels en
  desarrollo los puede encontrar en los subdirectorios v2.1.  las
  utilidades de mdulos actuales puede encontrarlas en la misma
  ubicacin.

  En los fuentes del kernel de Linux, el archivo Documentation/Changes
  describe las versiones de todas las clases de otros componentes del
  sistema que son requeridas por esa versin del kernel. Probablemente
  quiera revisarlo y verificar que su sistema est actualizado,
  especialmente si tiene actualizado el kernel. Si est usando un kernel
  en desarrollo, asegrese de estar usando la combinacin correcta de
  bibliotecas compartidas y herramientas de mdulos.
  Cuando configure su kernel, si planea usar una tarjeta ethernet
  PCMCIA, debe activar el soporte para red, y desactivar los
  controladores normales de tarjetas de red de Linux, incluyendo pocket
  and portable adapters.  Todos los controladores para tarjetas de red
  PCMCIA estn compilados como mdulos cargables. Cualquiera de los
  controladores compilados dentro de su kernel slo desperdiciar
  espacio.

  Si quiere usar SLIP, PPP o PLIP, necesitar ya sea configurar el
  kernel con ese soporte activado, o usar la versin de los mdulos
  cargables de esos controladores. Hay una desafortunada deficiencia en
  el proceso de configuracin de los kernels 1.2.X, en el que no es
  posible establecer opciones de configuracin (como compresin SLIP)
  para un mdulo cargable, as que es probablemente mejor enlazar SLIP
  dentro del kernel si es que lo necesita.

  Para usar un adaptador token ring PCMCIA, el kernel debe estar
  configurado con la opcin Token Ring driver support (CONFIG_TR)
  activada, aunque debe dejar CONFIG_IBMTR desactivado.

  Si requiere usar un adaptador IDE PCMCIA, su kernel debe estar
  configurado con la opcin CONFIG_BLK_DEV_IDE_PCMCIA activada, para los
  kernels desde 2.0.* hasta 2.1.*. Los kernels antiguos no soportan
  dispositivos IDE extrables; los nuevos no requieren una configuracin
  especial.

  Si va a usar un adaptador SCSI PCMCIA, debe habilitar CONFIG_SCSI
  cuando configure el kernel. Debe activar tambin cualquier controlador
  de alto nivel (disco SCSI, cinta, cdrom, genrico) que espere usar.
  Debe desactivar todos los controladores de bajo nivel para adaptadores
  en particular, porque slo le quitarn espacio.

  Si busca modularizar un controlador que se necesita para un
  dispositivo PCMCIA, debe modificar /etc/pcmcia/config para especificar
  qu mdulos necesitan ser cargados para qu tipos de tarjetas. Por
  ejemplo, si el controlador serie est modularizado, entonces la
  definicin del dispositivo serie debera ser:



              device "serial_cs"
                class "serial" module "misc/serial", "serial_cs"




  Este paquete incluye una utilidad llamada cardinfo que est basada en
  X para monitorizar el estado de la tarjeta. Est basada en un toolkit
  de libre distribucin, la biblioteca XForms. Esta librera est
  disponible como un paquete separado de la mayora de distribuciones de
  Linux. Si desea compilar cardinfo, deber instalar XForms y todas las
  cabeceras y bibliotecas de desarrollo habituales para X antes de
  configurar el paquete PCMCIA.


  2.2.  Instalacin


  He aqu una sinopsis del proceso de instalacin:


    Descomprima pcmcia-cs-3.0.?.tar.gz en /usr/src

    Ejecute make config en el nuevo directorio pcmcia-cs-3.0.?


    Ejecute make all, y luego make install.

    Configure el script de inicio y los archivos de opciones en
     /etc/pcmcia para su sistema.

  Si planea instalar cualquier controlador que sea una contribucin y
  que no est includo en la distribucin principal de PCMCIA,
  descomprima cada uno de ellos en el directorio raz del rbol PCMCIA.
  Luego siga las instrucciones normales de compilacin. Los
  controladores extras se compilarn e instalarn automticamente.

  Cuando ejecute make config, se le preguntarn algunas opciones de
  configuracin y se comprobar su sistema para verificar que se
  satisfagan todos los prerequisitos para instalar soporte PCMCIA. En la
  mayora de los casos, slo tendr que aceptar todas las opciones de
  configuracin que vienen por omisin. Asegrese de comprobar
  cuidadosamente la salida de ste comando en caso de que hubiera
  problemas. Estn disponibles las siguientes opciones:



     Hay un directorio de instalacin alternativo?
        Si est compilando el paquete para instalarlo en otro equipo,
        especifique un directorio destino alternativo cuando se le
        pregunte. Debe ser una ruta absoluta. Todos los archivos sern
        instalados relativos a este directorio. Entonces estar listo
        para aplicar tar a este directorio y copiarlo a su equipo
        destino, y desempaquetarlo relativo a su directorio raz para
        instalar todo en los lugares apropiados.


     Necesita indicadores de compilacin para depurar?
        Vea la seccin ``Primeros auxilios al depurar a bajo nivel''
        para mayor informacin acerca de esta opcin.


     Necesita compilar versiones trusting de las utilidades de
        tarjetas?"  Algunas de las utilidades de soporte (cardctl y
        cardinfo) pueden ser compiladas ya sea de forma safe o trusting.
        La forma safe previene a los usuarios no-root de modificar
        configuraciones de tarjetas. La forma trusting permite a los
        usuarios ordinarios ejecutar comandos para suspender y reactivar
        tarjetas, resetear tarjetas, y cambiar el esquema de
        configuracin actual.  La forma configurada por omisin es safe.


     Necesita incluir soporte para tarjetas de 32-bits (CardBus)?
        Deber seleccionar esta opcin si desea usar tarjetas CardBus de
        32-bits.  No se requiere para tener soporte con puentes CardBus
        si slo planea usar tarjetas PC de 16-bits.


     Necesita incluir chequeo de recursos para BIOS PnP?
        Esto compila cdigo adicional en el mdulo principal PCMCIA para
        comunicarse con el BIOS PnP de un sistema para obtener
        informacin de los recursos que estn incluidos en la placa
        madre (puertos serie y paralelos, sonido, etc), para ayudar a
        prevenir conflictos de recursos. Si se habilita, se crearn
        algunos archivos extra de recursos bajo /proc/bus/pccard, y las
        herramientas lspnp y setpnp se pueden usar para visualizar y
        manipular los dispositivos PnP del BIOS.


     Cmo configurar opciones especficas del kernel?
        Hay algunas opciones de configuracin del kernel que afectan a
        las herramientas PCMCIA. El script de configuracin puede
        deducirlo desde el kernel actual (el caso por omisin y ms
        comn).  Alternativamente, si est compilando para instalar en
        otro equipo, puede leer la configuracin del rbol de los
        fuentes del kernel, o cada opcin se puede establecer
        interactivamente.


  El script de configuracin se puede ejecutar de forma no-interactiva,
  para compilar automticamente o para reconfigurar rpidamente despus
  de una actualizacin del kernel. Algunas opciones adicionales no
  utilizadas con frecuencia slo pueden ser establecidas desde la lnea
  de comandos.  Ejecutando: Configure --help se listarn todas las
  opciones disponibles.

  Al ejecutar make all seguido de make install compilar y luego
  instalar los mdulos del kernel y los programas de utilidades.  Los
  mdulos del kernel sern instalados en /lib/modules/<version>/pcmcia.
  Los programas cardctl y cardmgr sern instalados en /sbin. Si cardinfo
  se compila, ser instalado en /usr/bin/X11.

  Los archivos de configuracin sern instalados en el directorio
  /etc/pcmcia. Si est instalando sobre una versin antigua, sus scripts
  de configuracin anteriores se respaldarn antes de ser reemplazados.
  Los scripts guardados tendrn la extensin de tipo *.O.

  Si no sabe qu tipo de controlador usa su sistema, puede utilizar la
  utilidad probe en el subdirectorio cardmgr/ para determinarlo.  Hay
  dos tipos principales: el tipo Databook TCIC-2 y el tipo compatible
  con Intel i82365SL.

  En raras ocasiones, el comando probe ser incapaz de determinar su
  tipo de controlador automticamente. Si tiene un sistema Halikan NBD
  486, tiene un controlador TCIC-2 en una localizacin inusual:
  necesitar editar rc.pcmcia para cargar el mdulo tcic, y tambin
  especificar el parmetro PCIC_OPTS a tcic_base=0x02c0.

  En algunos sistemas que usan controladores Cirrus, incluyendo el Nec
  Versa M, la bios pone el controlador en un estado especial de
  suspensin al iniciar el sistema. En esos sistemas, el comando probe
  fallar al encontrar cualquier controlador conocido. Si esto pasa,
  edite rc.pcmcia y especifica PCIC a i82365, y PCIC_OPTS a wakeup=1.


  2.3.  Opciones de inicio


  El script de inicio de PCMCIA reconoce varios grupos de opciones de
  inicio, establecidas por medio de variables de entorno. Se pueden
  separar mltiples opciones por medio de espacios y encerradas en
  comillas. La colocacin de las opciones de inicio depende de la
  distribucin de Linux que se est usando. Pueden ser colocados
  directamente en el script de inicio, o pueden mantenerse en un archivo
  de opciones separado. Revise la seccin ``Notas acerca de
  distribuciones de Linux especficas'' para ms detalles. Se pueden
  establecer las siguientes variables:



     PCMCIA
        Esta variable especifica si el soporte PCMCIA debe ser iniciado
        o no. Si est especificado de forma diferente a yes, el script
        de inicio ser desactivado.


     PCIC
        Esto identifica el mdulo controlador de PC Card Interface
        Controller. Hay dos opciones: tcic o i82365. Virtualmente todos
        los controladores actuales estn en el grupo i82365. Esta es la
        nica opcin obligatoria a establecer.


     PCIC_OPTS
        Esto especifica las opciones para el mdulo PCIC. Algunos
        controladores tienen caractersticas opcionales que pueden o no
        ser implementadas en un sistema en particular. En algunos casos,
        es imposible para el socket controlador detectar si esas
        caractersticas estn implementadas. Revise la pgina del manual
        correspondiente para una descripcin completa de las opciones
        disponibles.


     CORE_OPTS
        Esto especifica las opciones para el mdulo pcmcia_core, el cual
        implementa los servicios principales del controlador PC Card. Es
        conveniente echar un vistazo a man pcmcia_core para ms
        informacin.


     CARDMGR_OPTS
        Esto especifica las opciones que se pasarn al demonio cardmgr.
        Revise man cardmgr para ms informacin.


     SCHEME
        Si est activado, el esquema de configuracin de PC Card ser
        inicializado a este modo en el momento de arrancar. Revise la
        seccin ``Un vistazo a los scripts de configuracin de PCMCIA''
        para ver la discusin de esquemas.


  Los controladores de sockets de bajo nivel, tcic e i82365, tienen
  varios parmetros de sincronizacin de bus que pueden necesitar ser
  ajustados para sistemas con velocidades de bus no muy usuales. Los
  sntomas de los problemas de sincronizacin incluyen problemas al
  reconocer las tarjetas, congelamiento bajo carga pesada, tasas de
  error altas, o rendimiento pobre de dispositivos. Slo ciertos puentes
  tienen parmetros de sincronizacin ajustables, revise la pgina
  correspondiente del manual para ver qu opciones existen para su
  controlador. He aqu un pequeo resumen:


    Los controladores Cirrus tienen muchos parmetros de
     sincronizacin.  Lo ms importante parece ser el indicador
     cmd_time, la cual determina la longitud de los ciclos de bus
     PCMCIA. En los sistemas rpidos 486 (DX4-100, por ejemplo) parece
     ser beneficioso el incrementar esto de 6 (por omisin) a 12 o 16.

    El controlador Cirrus PD6729 PCI tiene el indicador fast_pci, la
     cual debe establecerse si la velocidad del bus PCI es mayor a 25
     Mhz.

    Para controladores Vadem VG-468 y Databook TCIC-2, el indicador
     async_clock cambia la velocidad relativa del bus PCMCIA y los
     ciclos de bus del equipo. Activar este indicador aade estados de
     espera extra a algunas operaciones. Sin embargo, todava no he
     sabido de ningn porttil que necesite esto.


    El mdulo pcmcia_core tiene el parmetro cis_speed para cambiar la
     velocidad de la memoria, la cual se usa para acceder a la
     Estructura de Informacin de Tarjeta (Card Information Structure)
     (CIS) de una tarjeta. En algunos sistemas con pulsos de bus
     rpidos, incrementar este parmetro (por ejemplo, reducir la
     velocidad de los accesos a tarjeta) puede resultar beneficioso para
     quien tenga problemas al reconocerlas.

    Esto no es cuestin de sincronizacin, pero si Vd. tiene ms de un
     controlador ISA-a-PCMCIA en su sistema o tiene bahas extra en una
     estacin, el mdulo i82365 debe ser cargado con el parmetro
     extra_sockets establecido a 1. Esto no deber ser necesario para
     deteccin de puentes PCI-a-PCMCIA y PCI-a-CardBus.

  He aqu algunas configuraciones de sincronizacin para algunos
  sistemas especficos:


    En un ARM Pentium-90 o en un Midwest Micro Soundbook Plus, use
     freq_bypass=1 cmd_time=8.

    En un Midwest Micro Soundbook Elite, use cmd_time=12.

    En un Gateway Liberty, pruebe con cmd_time=16.

    En un Samsung SENS 810, use fast_pci=1.


  2.4.  Configuracin de recursos del sistema


  Los servicios de tarjetas deben evitar automticamente el ocupar
  puertos e interrupciones que ya estn en uso por otros dispositivos
  estndar.  Intentar as mismo detectar conflictos con dispositivos
  desconocidos, pero esto no es del todo fiable, y en algunos casos
  puede que necesite excluir explcitamente recursos para un dispositivo
  en /etc/pcmcia/config.opts.

  He aqu algunas configuraciones de recursos para tipos especficos de
  porttiles. Revselas con cuidado: pueden darle informacin necesaria
  para resolver problemas, pero algunas estn (inevitablemente)
  obsoletas y ciertamente contienen errores. Las correcciones y
  adiciones sern bienvenidas.


    En un AMS SoundPro, excluya la irq 10.

    En algunos modelos AMS TravelPro 5300, use el rango de memoria
     0xc8000-0xcffff.

    En un BMX 486DX2-66, excluya irq 5, irq 9.

    En un Chicony NB5, use el rango de memoria 0xda000-0xdffff.

    En un Compaq Presario 1020, excluya el puerto 0x2f8-0x2ff, irq 3,
     irq 5.

    En un HP Omnibook 4000C, excluya el puerto 0x300-0x30f.

    En un IBM ThinkPad 380, y posiblemente en las series 385 y 600,
     excluya el puerto 0x230-0x233, e irq 5.

    En un IBM ThinkPad 600, excluya el puerto 0x2f8-0x2ff.

    En un Micron Millenia Transport, excluya irq 5, irq 9.

    En un NEC Versa M, excluya irq 9, y el puerto 0x2e0-2ff.

    En un NEC Versa P/75, excluya irq 5, irq 9.

    En un NEC Versa S, excluya irq 9, irq 12.

    En las series NEC Versa 6000, excluya el puerto 0x2f8-0x33f, irq 9,
     irq 10

    En un ProStar 9200, Altima Virage, y Acquiline Hurricane DX4-100,
     excluya irq 5, y el puerto 0x330-0x35f.  Puede usar el rango de
     memoria 0xd8000-0xdffff.

    En un Siemens Nixdorf SIMATIC PG 720C, use el rango de memoria
     0xc0000-0xcffff, y el puerto 0x300-0x3bf.

    En un TI TravelMate 5000, use el rango de memoria 0xd4000-0xdffff.

    En un Toshiba T4900 CT, excluya irq 5, y los puertos 0x2e0-0x2e8,
     0x330-0x338.

    En un Twinhead 5100, HP 4000, Sharp PC-8700 and PC-8900, excluya
     irq 9 (sonido), irq 12.

    En un MPC 800 Series, excluya irq 5, y el puerto 0x300-0x30f para
     el CD-ROM.


  2.5.  Notas acerca de distribuciones de Linux especficas


  Esta seccin est incompleta. Todas las correcciones y adiciones sern
  bienvenidas.


  2.5.1.  Debian


  Debian usa el conjunto de scripts de arranque de tipo System V. El
  script de inicio PCMCIA est instalado en /etc/init.d/pcmcia, y las
  opciones de inicio se especifican en /etc/pcmcia.conf. La
  configuracin de syslog de Debian colocar los mensajes del kernel en
  /var/log/messages y los mensajes del demonio cardmgr en
  /var/log/daemon.log.

  Debian distribuye el sistema PCMCIA en dos paquetes: el paquete
  pcmcia-cs que contiene cardmgr y otras herramientas, pginas del
  manual, y los scripts de configuracin; y el paquete pcmcia-modules
  que contiene los mdulos controladores del kernel.


  2.5.2.  Red Hat, Caldera, Mandrake


  Estas distribuciones usan la organizacin de scripts System V. El
  script de inicio de PCMCIA est instalado en /etc/rc.d/init.d/pcmcia,
  y las opciones de arranque se guardan en /etc/sysconfig/pcmcia.
  Observe que al instalar el paquete de Red Hat puede instalar un
  archivo de opciones de inicio por omisin que tiene PCMCIA
  desactivado.  Para habilitar PCMCIA, la variable PCMCIA debe
  establecerse en yes.  La configuracin por omisin del syslogd de Red
  Hat grabar todos los mensajes interesantes en /var/log/messages.

  El paquete PCMCIA de Red Hat contiene un reemplazo para el script de
  inicio de red, /etc/pcmcia/network, el cual se acopla al panel de
  control de red de Red Hat. Esto es conveniente para el caso donde slo
  se usa un adaptador de red, con un conjunto de parmetros de red, pero
  no tiene la flexibilidad completa del script regular de red PCMCIA.
  Compilar e instalar una distribucin fuente de PCMCIA nueva,
  sobreescribir el script de red, rompiendo el enlace con el panel de
  control. Si prefiere el script de Red Hat, puede evitarlo bien usando
  nicamente RPMS de Red Hat, o creando /etc/pcmcia/network.opts que
  contenga lo siguiente:



              if [ -f /etc/sysconfig/network-scripts/ifcfg-eth0 ] ; then
                  start_fn () {
                      /sbin/ifup $1
                  }
                  stop_fn () {
                      /sbin/ifdown $1
                  }
              fi




  Red Hat maneja su distribucin de los fuentes de PCMCIA con pocas
  modificaciones dentro de su SRPM del kernel, en lugar de gestionarlo
  como un paquete separado.


  2.5.3.  Slackware


  Slackware usa el conjunto de scripts de inicio de BSD. El script de
  inicio de PCMCIA est instalado en /etc/rc.d/rc.pcmcia, y las opciones
  de inicio se especifican en el mismo rc.pcmcia. El script de inicio de
  PCMCIA se invoca desde /etc/rc.d/rc.S.


  2.5.4.  SuSE


  SuSE usa el conjunto de scripts System V, con los scripts de inicio
  almacenados en /sbin/init.d. El script de inicio de PCMCIA est
  instalado en /sbin/init.d/pcmcia, y las opciones de arranque se
  guardan en /etc/rc.config. El script de inicio de SuSE est algo
  limitado y no permite que las variables de inicio de PCMCIA sean
  invalidados desde el prompt de inicio de lilo.


  3.  Resolucin de problemas de instalacin y configuracin


  Esta seccin describe algunos de los errores ms comunes del
  subsistema PCMCIA. Compare sus sntomas con los ejemplos. Esta seccin
  slo describe fallos generales que no son especficas de un
  controlador o tipo de tarjeta en particular.

  Antes de diagnosticar un problema, debe saber dnde se almacena el
  registro del sistema (revise la seccin ``Notas acerca de
  distribuciones de Linux especficas''). Debe estar familiarizado con
  las herramientas bsicas de diagnstico como dmesg y lsmod.  Preste
  especial atencin al hecho de que muchos componentes de los
  controladores (incluyendo todos los mdulos del kernel) tienen sus
  propias pginas individuales en el manual.

  Intente definir su problema lo ms ampliamente posible. Si tiene
  varias tarjetas, pruebe cada tarjeta de forma aislada, y en diferentes
  combinaciones. Intente arranques de Linux en fro y arranques en
  caliente de Windows. Compare el arrancar con tarjetas insertadas, o
  insertar las tarjetas despus de iniciar. Si normalmente usa su
  porttil ensamblado con una dockstation, prebelo aparte. Algunas
  veces, dos bahas se comportarn de forma diferente.
  Es casi imposible depurar problemas de un controlador cuando se
  intenta instalar Linux por medio de un dispositivo PCMCIA. En lugar de
  eso, si puede identificar el problema basndose en los sntomas, los
  discos de instalacin son difciles de modificar, especialmente sin
  tener acceso a un sistema Linux ya funcionando. La personalizacin e
  instalacin de los discos de instalacin es completamente dependiente
  de la distribucin de Linux que elija, y ms all del enfoque de este
  documento. En general, el mejor curso de accin es instalar Linux
  usando otros medios, obteniendo los controladores ms recientes, y
  depurando el problema entonces, si es que persiste.


  3.1.  No se cargan los mdulos bsicos de PCMCIA.


  Sntomas:


    Aparecen errores acerca de que la versin del kernel difiere cuando
     se ejecuta el script de inicio de PCMCIA.

    Despus de iniciar, lsmod no muestra algn mdulo PCMCIA.

    cardmgr informa no pcmcia driver in /proc/devices en el registro
     del sistema.

  Los mdulos del kernel contienen informacin de la versin, la cual se
  comprueba con el kernel actual cuando se carga un mdulo. El tipo de
  chequeo depende de la opcin del kernel CONFIG_MODVERSIONS. Si es
  falso, entonces el nmero de versin del kernel se compila dentro de
  cada mdulo y el programa insmod comprueba esto para compararlo con el
  kernel actual. Si CONFIG_MODVERSIONS es verdadero, entonces cada
  smbolo exportado por el kernel tiene un checksum. Esos cdigos se
  comparan con los cdigos correspondientes compilados dentro de un
  mdulo.

  La idea de esto fue crear mdulos menos dependientes de la versin,
  porque los checksums slo pueden cambiar si la interface del kernel
  cambia, y podra generalmente permanecer a lo largo de actualizaciones
  menores del kernel. En esencia, los checksums se han desactivado
  para ser mas restrictivos, porque muchas interfaces del kernel
  dependen de las opciones pasadas al momento de compilarse. Tambin,
  los checksums han resultado ser jueces excesivamente pesimistas
  respecto a compatibilidad.

  El enfoque prctico de esto es que los mdulos del kernel estn muy
  atados a tanto la versin del kernel, como a muchas opciones de
  configuracin del mismo. Generalmente, un grupo de mdulos compilados
  para un kernel 2.0.31 no cargar con otros kernels 2.0.31 a menos que
  se tome un cuidado especial asegurndose que los dos fueron compilados
  con configuraciones similares. Esto resulta ser un asunto difcil para
  la distribucin de mdulos precompilados del kernel.

  Tiene Vd. varias opciones:


    Si obtuvo controladores precompilados como parte de una
     distribucin de Linux, verifique que est usando el mismo kernel
     que vena con su distribucin, sin modificaciones. Si pretende usar
     los mdulos precompilados que venan con su distribucin, deber
     permanecer con el mismo kernel que trajera sta.

    Si ha reconfigurado o actualizado su kernel, probablemente
     necesitar compilar e instalar el paquete PCMCIA desde cero. Esto
     se hace fcilmente si ya tiene instalada la estructura fuente del
     kernel. Revise la seccin ``Compilacin e instalacin'' para
     instrucciones ms detalladas.

    En algunos casos, las incompatibilidades en otros componentes del
     sistema pueden prevenir la carga correcta de los mdulos del
     kernel. Si ha actualizado su propio kernel, ponga atencin a la
     seccin ``Requisitos'' acerca de utilidades para mdulos y binutils
     que se listan en el archivo Documentation/Changes del rbol de
     directorios de los fuentes del kernel.


  3.2.  Algunos mdulos controladores no cargan


  Sntomas:


    Los mdulos base (pcmcia_core, ds, i82365) cargan correctamente.

    Al insertar una tarjeta, emite un pitido agudo + un pitido grave.

    cardmgr informa de errores de versiones diferentes en el registro
     del sistema.

  Algunos de los mdulos controladores requieren servicios del kernel
  que pueden o no estar presentes, dependiendo de la configuracin del
  kernel.  Por ejemplo, los controladores de tarjetas SCSI requieren que
  el kernel sea compilado con soporte SCSI, y los controladores de red
  requieren un kernel de red. Si a un kernel le falta una caracterstica
  necesaria, insmod puede avisar acerca de smbolos indefinidos y
  rechazar la carga de un mdulo en particular. Note que los mensajes de
  error de insmod no distinguen entre errores por diferencias de
  versiones y errores por falta de smbolos.

  Especficamente:


    El controlador serie serial_cs requiere que el soporte en el kernel
     est activado con CONFIG_SERIAL. Este controlador se debe compilar
     como mdulo.

    El soporte para tarjetas serie multipuerto o tarjetas multifuncin
     que incluyen dispositivos serie o mdems, requieren que se active
     CONFIG_SERIAL_SHARE_IRQ.

    Los clientes SCSI requieren que CONFIG_SCSI est activada, junto
     con las opciones apropiadas para los controladores de alto nivel
     (CONFIG_BLK_DEV_SD, CONFIG_BLK_DEV_SR etc. para kernels 2.1) que
     pueden ser compilados como mdulos.

    Los controladores de red requieren que se habilite CONFIG_INET El
     soporte para red del kernel no se puede compilar como mdulo.

    El cliente token-ring requiere que el kernel se compile con la
     opcin CONFIG_TR activada.

  Hay dos formas de proceder:


    Recompile el kernel con las caractersticas necesarias activadas.

    Si las caractersticas han sido compiladas como mdulos, entonces
     modifique /etc/pcmcia/config para precargar esos mdulos.

  El archivo /etc/pcmcia/config puede especificar qu mdulos
  adicionales necesitan cargarse para un cliente en particular. Por
  ejemplo, para el controlador serial, uno puede ser:
              device "serial_cs"
                class "serial" module "misc/serial", "serial_cs"




  Las rutas hacia los mdulos se especifican relativas al nivel ms alto
  del directorio de mdulos para la versin actual del kernel; si no se
  especifica la ruta relativa, entonces la ruta por omisin ser hacia
  el subdirectorio pcmcia.


  3.3.  fallos en la bsqueda de interrupciones


  Sntomas:


    El sistema se congela cuando se cargan los controladores PCMCIA,
     incluso cuando no hay tarjetas presentes.

    El registro del sistema muestra que el sondeo tuvo xito, justo
     antes de que se congele, pero no muestra resultados de las pruebas
     de interrupciones.




  Despus de identificar el tipo de controlador, el controlador del
  socket sondea las interrupciones libres. Este sondeo o tanteo
  consiste en programar el controlador para cada interrupcin
  aparentemente libre, generando una interrupcin soft (suave), para ver
  si la interrupcin puede ser detectada correctamente. En algunos
  casos, el sondear una interrupcin en particular puede interferir con
  otro dispositivo del sistema.

  La razn de este tanteo es identificar interrupciones que parezcan
  estar libres (es decir, aquellas que no estn reservadas por otro
  controlador de dispositivo), ya sea porque no est conectado
  fsicamente a la controladora, o que est conectado a otro dispositivo
  que no tiene un controlador.

  En el registro del sistema, un sondeo realizado con xito tiene este
  aspecto:



              Intel PCIC probe:
                TI 1130 CardBus at mem 0x10211000, 2 sockets
                ...
                ISA irqs (scanned) = 5,7,9,10 status change on irq 10




  Hay dos formas de proceder:


    El sondeo de interrupciones puede estar restringida a una lista de
     interrupciones utilizando el parmetro irq_list para los
     controladores. Por ejemplo, irq_list=5,9,10 limitar la bsqueda a
     tres interrupciones. Todos los dispositivos PCMCIA estarn
     restringidos a usar esas interrupciones (asumiendo que pasen el
     tanteo). Puede ser que necesite determinar qu interrupciones son
     tanteables de forma segura a base de ensayo y error.

    El sondeo de interrupciones puede desactivarse completamente al
     cargar el controlador del socket con la opcin do_scan=0. En este
     caso, se usar una interrupcin por omisin, la cual evita
     interrupciones ya utilizadas por otros dispositivos.

  En cualquier caso, las opciones de tanteo pueden especificarse en el
  script de inicio de PCMCIA utilizando la definicin PCIC_OPTS, por
  ejemplo:



               PCIC_OPTS="irq_list=5,9,10"




  Como podr notar, /proc/interrupts es absolutamente intil cuando se
  van a diagnosticar problemas en el sondeo de interrupciones. El tanteo
  es lo suficientemente sensible como para nunca intentar usar una
  interrupcin que ya est en uso por otro controlador de Linux. Los
  controladores PCMCIA estn ya teniendo en cuenta toda la informacin
  de /proc/interrupts. Dependiendo del diseo del sistema, un
  dispositivo inactivo puede todava ocupar una interrupcin y causar
  problemas si es probado por PCMCIA.


  3.4.  Fallos en la bsqueda de puertos de E/S


  Sntomas:


    El sistema se congela cuando cardmgr se inicia por primera vez,
     incluso cuando no hay tarjetas presentes.

    El registro del sistema muestra un tanteo positivo del controlador
     del host, incluyendo resultados de sondeos de interrupcin, pero no
     muestra resultados de sondeos de E/S.

    En algunos casos, el tanteo de E/S ser positivo, pero avisa de un
     gran nmero de de exclusiones aleatorias.

  Cuando cardmgr procesa los rangos de puertos de E/S listados en
  /etc/pcmcia/config.opts, el kernel tantea esos rangos para detectar
  los dispositivos latentes que ocupan espacio de E/S pero que no estn
  asociados con un controlador de Linux. El tanteo es de slo lectura,
  pero en algunos casos extraos, leer desde un dispositivo puede
  interferir con una funcin importante del sistema, resultando en
  congelamiento.

  La gua de usuario de su sistema debe traer un mapa de los
  dispositivos del sistema, mostrando sus rangos de E/S y de memoria.
  Esos pueden ser excluidos explcitamente en config.opts.

  Por otra parte, si el sondeo no resulta fiable en su sistema, puede
  ser desactivado estableciendo CORE_OPTS a probe_io=0. En este caso,
  deber ser muy cuidadoso al especificar solamente rangos de puertos
  genuinamente disponibles en config.opts, en lugar de usar las
  configuraciones por omisin.


  3.5.  Fallos durante la comprobacin de la memoria


  Sntomas:

    Los controladores principales cargan correctamente cuando no hay
     tarjetas presentes, sin errores en el registro del sistema.

    El sistema se congela y/o reinicia tan pronto como se inserte una
     tarjeta antes de que se escuche algn pitido.

  O alternativamente:


    Todas las inserciones de tarjetas generan un pitido agudo seguido
     de un pitido grave.

    Todas las tarjetas son identificadas como anonymous memory cards

    El registro del sistema avisa que varios rangos de memoria han sido
     excluidos.

  Los mdulos principales realizan un chequeo de los primeros 16 bits de
  memoria en el momento en que se inserta la tarjeta. Esta exploracin
  puede interferir potencialmente con otros dispositivos de memoria
  mapeados. As mismo, los paquetes de controladores pre-3.0.0 realizan
  una exploracin ms agresiva que los controladores ms recientes. La
  ventana de memoria se define en /etc/pcmcia/config.opts. La ventana
  por omisin es grande, as que puede ayudar a restringir la
  exploracin a un rango ms reducido. Los rangos razonables para
  incluir son: 0xd0000-0xdffff, 0xc0000-0xcffff, 0xc8000-0xcffff, o
  0xd8000-0xdffff.

  Si tiene controladores PCMCIA DOS o Windows, puede deducir que regin
  de memoria usan esos controladores. Tenga en cuenta que las
  direcciones de memoria de DOS se especifican normalmente en forma de
  segmentos, los cuales dejan el ltimo dgito hexadecimal (as una
  direccin absoluta de 0xd0000 puede darse como 0xd000). Asegrese de
  aadir el dgito extra de cuando haga los cambios a config.opts.

  En casos no muy usuales, un fallo en el sondeo de memoria puede
  indicar un problema de configuracin en la sincronizacin con el
  controlador.  Revise la seccin ``Opciones de inicio'' para ms
  informacin acerca de cmo combatir los problemas comunes de
  sincronizacin.


    cs: warning: no high memory space available!

  Los puentes CardBus pueden reservar ventanas de memoria fuera del
  agujero de memoria de 640KB-1MB en la arquitectura de bus ISA.
  Generalmente es buena idea el configurar puentes CardBus para usar
  ventanas de memoria alta, porque es muy difcil que existan conflictos
  con otros dispositivos.  Tambin, las tarjetas CardBus pueden requerir
  grandes ventanas de memoria, las cuales puede ser difcil o imposible
  que coincidan en memoria baja.  Los servicios de tarjetas
  preferentemente localizarn las ventanas en memoria alta para puentes
  CardBus, si ambas ventanas de memoria (alta y baja) se definen en
  config.opts. El archivo config.opts por omisin ahora incluye una
  ventana de memoria alta de 0xa0000000-0xa0ffffff. Si tiene un puente
  CardBus y ha actualizado de una versin de PCMCIA anterior, aada esta
  ventana de memoria si no est ya definido.

  En algunos casos, la ventana de memoria alta por omisin no se
  utiliza.

  En algunos modelos IBM Thinkpad, una ventana de 0x60000000-0x60ffffff
  funcionar en lugar de la ventana por omisin.



  3.6.  Fallo al detectar cuando se inserta o se extrae la tarjeta


  Sntomas:


    Las tarjetas se detectan y configuran apropiadamente si estn
     presentes al momento de iniciar.

    Los controladores no responden a los eventos de insercin y
     extraccin, ya sea registrando los eventos en el registro del
     sistema, o emitiendo pitidos.

  En muchos casos, el controlador del socket (i82365 o tcic) probar
  automticamente y seleccionar la interrupcin apropiada para sealar
  cambios en el estado de la tarjeta. El tanteo automtico de
  interrupciones no funciona con algunos controladores compatibles con
  Intel, incluyendo los chips Cirrus y los chips usados en IBM
  Thinkpads. Si un dispositivo est inactivo en el momento del sondeo,
  su interrupcin puede parecer estar disponible. En esos casos, el
  controlador del socket puede usar una interrupcin que es usada por
  otro dispositivo.


  Con los controladores i82365 y tcic la opcin list_irq puede usarse
  para limitar las interrupciones que sern tanteadas. Esta lista limita
  el conjunto de interrupciones que pueden ser utilizadas por las
  tarjetas PCMCIA as como para monitorizar los cambios en el estado de
  la tarjeta. La opcin cs_irq puede usarse tambin para establecer
  explcitamente la interrupcin que ser utilizada para monitorizar
  dichos cambios.

  Si no puede encontrar un nmero de interrupcin que funcione, hay
  tambin un estado en modo de bsqueda: ambos, i82365 y tcic aceptarn
  una opcin poll_interval=100, para buscar cambios en el estado de la
  tarjeta una vez por segundo. Esta opcin puede usarse tambin si su
  sistema tiene un rango corto de interrupciones disponibles para
  utilizarse con tarjetas PCMCIA. Especialmente para sistemas con ms de
  un controlador de host, hay un pequeo punto para dedicar
  interrupciones para monitorizar cambios de estado de la tarjeta.

  Todas esas opciones deberan establecerse en la lnea PCIC_OPTS= ya
  sea en /etc/rc.d/rc.pcmcia o en /etc/sysconfig/pcmcia, dependiendo de
  la configuracin de su sistema.


  3.7.  Faltan recursos del sistema


  Sntomas:


    Cuando se inserta una tarjeta, es identificada correctamente, pero
     no puede ser configurada (secuencia de pitidos agudos/graves).

    Aparecen en el registro del sistema alguno de los siguientes
     mensajes:









         RequestIO: Resource in use
         RequestIRQ: Resource in use
         RequestWindow: Resource in use
         GetNextTuple: No more items
         could not allocate nn IO ports for CardBus socket n
         could not allocate nnK memory for CardBus socket n
         could not allocate interrupt for CardBus socket n





  La reserva de interrupciones indica generalmente un problema con el
  sondeo de interrupciones, vase la seccin ``Fallos en la bsqueda de
  interrupciones''.

  En algunos casos, el tanteo parece funcionar, pero nicamente aparecen
  una o dos interrupciones disponibles. Revise el registro de su sistema
  para ver si los resultados de la exploracin son plausibles.
  Desactivar el tanteo y seleccionar las interrupciones manualmente
  puede ayudar.

  Si el sondeo de interrupciones no est funcionando adecuadamente, el
  controlador del socket puede reservar una interrupcin para
  monitorizar inserciones de tarjetas, incluso cuando las interrupciones
  sean demasiado escasas para esto, constituye una buena idea. En este
  caso, puede Vd.  cambiar el controlador a modo de bsqueda
  estableciendo PCIC_OPTS a poll_interval=100. O, si tiene un
  controlador CardBus, intente con pci_csc=1, el cual selecciona una
  interrupcin PCI (si est disponible) para cambios de estado en la
  tarjeta.

  La reserva de puertos de E/S no es muy comn, pero algunas veces tiene
  lugar con tarjetas que requieren regiones de espacio de E/S grandes,
  contiguas y alineadas, o que slo reconocen pocas posiciones
  especficas de puertos.  Los rangos de puertos de E/S por omisin en
  /etc/pcmcia/config.opts normalmente son suficientes, pero pueden ser
  extendidos. En casos extraos, la reserva puede indicar que fall el
  sondeo de puertos de E/S; revise la seccin ``fallos en la bsqueda de
  puertos de E/S''.

  La reserva de memoria no es comn tampoco con las configuraciones de
  la ventana de memoria que vienen por omisin en config.opts. Las
  tarjetas CardBus pueden requerir regiones de memoria ms grandes que
  las tarjetas tpicas de 16-bits. Dado que de que las ventanas de
  memoria de las tarjetas CardBus pueden ser mapeadas a cualquier parte
  del espacio de la direccin PCI del host (en lugar de slo mapearlo al
  agujero de 640K-1MB en sistemas PC), es de utilidad especificar
  ventanas de memoria amplias en la memoria alta, tales como
  0xa0000000-0xa0ffffff.


  3.8.  Conflicto de recursos entre dos tarjetas


  Sntomas:


    Dos tarjetas funcionan bien cuando se usan separadamente.

    Cuando ambas tarjetas se insertan, slo funciona una.

  Esto usualmente indica un conflicto de recursos con un dispositivo del
  sistema que Linux no conoce. Los dispositivos PCMCIA son configurados
  dinmicamente, as, por ejemplo, las interrupciones son reservadas
  conforme se vayan necesitando, en lugar de ser asignadas
  especficamente a tarjetas o sockets en particular. Dada una lista de
  recursos que parecen estar disponibles, las tarjetas son recursos
  asignados en el orden en que son configurados. En este caso, a la
  tarjeta configurada en ltimo lugar se le est asignando un recurso
  que en efecto, no est libre.

  Revise el registro del sistema para ver qu recursos estn usados por
  la tarjeta que no funciona. Exclyalos de /etc/pcmcia/config.opts, y
  reinicie el demonio cardmgr para recargar la base de datos de
  recursos.


  3.9.  No se completa la configuracin de dispositivos


  Sntomas:


    Cuando se inserta una tarjeta, se escucha un pitido agudo.

    Las inserciones y extracciones posteriores de tarjetas son
     ignoradas.

  Esto indica que la tarjeta fue identificada con xito, sin embargo,
  cardmgr fue incapaz de completar el proceso de configuracin por
  alguna razn. La ms comn es que un paso en el script de
  configuracin se ha bloqueado. Un buen ejemplo podra ser el script de
  red bloquendose si una tarjeta de red se inserta sin tener presente
  una conexin a la red.

  Para verificar el problema, puede ejecutar manualmente un script de
  configuracin para ver dnde se est bloqueando. Los scripts estn en
  el directorio /etc/pcmcia. Toman dos parmetros: un nombre de
  dispositivo, y una accin. El demonio cardmgr graba los comandos de
  configuracin en el registro del sistema. Por ejemplo, si el registro
  del sistema muestra que el comando ./network start eth0 fue el ltimo
  comando ejecutado por cardmgr, el siguiente comando puede rastrear el
  script:



              sh -x /etc/pcmcia/network start eth0






  4.  Uso y caractersticas



  4.1.  Herramientas para configurar y monitorizar dispositivos PCMCIA


  Si los mdulos son todos cargados correctamente, la salida del comando
  lsmod debera verse como sigue, cuando no hay tarjetas insertadas:



         Module                  Size  Used by
         ds                      5640   2
         i82365                 15452   2
         pcmcia_core            30012   3  [ds i82365]


  El registro del sistema deber tambin incluir la salida del
  controlador del socket, describiendo el(los) controlador(es) del host
  encontrado(s) y el nmero de sockets detectados.


  4.1.1.  El demonio de configuracin cardmgr


  El demonio cardmgr es responsable de monitorizar los sockets PCMCIA,
  cargando los controladores cuando se necesita, y corriendo scripts a
  nivel de usuario en respuesta a las inserciones y extracciones de
  tarjetas.  Graba sus acciones en el registro del sistema, y tambin
  usa pitidos para sealar cambios en el estado de las tarjetas.  Los
  tonos de los pitidos indican el xito o fracaso de un paso de la
  configuracin en particular.  Dos pitidos agudos indican que la
  tarjeta fue identificada y configurada correctamente. Un pitido agudo
  seguido de un pitido grave indica que la tarjeta fue identificada,
  pero no pudo ser configurada por alguna razn.  Un pitido grave indica
  que la tarjeta no pudo ser identificada.

  cardmgr registra informacin del dispositivo para cada socket en
  /var/run/stab

  He aqu el contenido de un ejemplo de /var/run/stab:



              Socket 0: Adaptec APA-1460 SlimSCSI
              0       scsi    aha152x_cs      0       sda     8       0
              0       scsi    aha152x_cs      1       scd0    11      0
              Socket 1: Serial or Modem Card
              1       serial  serial_cs       0       ttyS1   5       65




  Para las lneas que describen dispositivos, el primer campo es el
  socket, el segundo es la clase del dispositivo, el tercero es nombre
  del controlador, el cuarto se usa para numerar mltiples dispositivos
  asociados con el mismo controlador, el quinto es el nombre del
  dispositivo, y los dos campos finales son los nmeros mayor y menor
  para este dispositivo (si es aplicable).

  El demonio cardmgr configura tarjetas basadas en una base de datos de
  tipos de tarjetas conocidas almacenadas en /etc/pcmcia/config.  Este
  archivo describe una variedad de controladores, describe cmo
  identificar esas tarjetas, y cual(es) controlador(es) pertenecen a
  cada tarjeta. El formato de este archivo se describe en la pgina del
  manual de pcmcia(5).


  4.1.2.  Las utilidades cardctl  y cardinfo


  El comando cardctl puede ser usado para comprobar el estado de un
  socket, o para ver cmo est configurado. Tambin puede ser usado para
  alterar el estado de configuracin de una tarjeta. He aqu un ejemplo
  de la salida del comando cardctl config:








    Socket 0:
      not configured
    Socket 1:
      Vcc = 5.0, Vpp1 = 0.0, Vpp2 = 0.0
      Card type is memory and I/O
      IRQ 3 is dynamic shared, level mode, enabled
      Speaker output is enabled
      Function 0:
        Config register base = 0x0800
          Option = 0x63, status = 0x08
        I/O window 1: 0x0280 to 0x02bf, auto sized
        I/O window 2: 0x02f8 to 0x02ff, 8 bit




  O cardctl ident, para obtener informacin de la identificacin de la
  tarjeta:



              Socket 0:
                no product info available
              Socket 1:
                product info: "LINKSYS", "PCMLM336", "A", "0040052D6400"
                manfid: 0x0143, 0xc0ab
                function: 0 (multifunction)





  Los comandos cardctl suspend y cardctl resume pueden usarse para
  desactivar una tarjeta sin descargar sus controladores asociados. El
  comando cardctl reset intenta resetear y reconfigurar una tarjeta.
  cardctl insert y cardctl eject emulan las acciones realizadas cuando
  una tarjeta es insertada o expulsada, incluyendo la carga y descarga
  de los controladores, y configurando o desactivando los dispositivos.

  Si est Vd. corriendo X, cardinfo produce de forma grfica el estado
  actual de todos los sockets PCMCIA, similar en contenido a cardctl
  config. Tambin proporciona una interfaz grfica para la mayora de
  las otras funciones de cardctl.


  4.1.3.  Insercin y extraccin de tarjetas


  En teora, puede insertar y extraer tarjetas PCMCIA en cualquier
  momento.  Sin embargo, es una buena idea no expulsar una tarjeta que
  est siendo utilizada por algn programa de aplicacin. Los kernels
  anteriores al 1.1.77 solan congelarse cuando las tarjetas serie/mdem
  eran expulsadas, aunque esto parece estar ya solucionado.


  4.1.4.  Servicios de Tarjetas y Administracin Avanzada de Energa


  Los servicios de tarjetas pueden ser compilados con soporte para APM
  (Advanced Power Management) (En castellano: Administracin Avanzada de
  Energa), si configur su kernel con soporte APM. APM est actualmente
  a cargo de Stephen Rothwell, Stephen.Rothwell@canb.auug.org.au. El
  demonio apmd es mantenido por Avery Pennarun,
  apenwarr@worldvisions.ca), con ms informacin disponible en
  http://www.worldvisions.ca/~apenwarr/apmd/. Los mdulos PCMCIA sern
  configurados automticamente para APM si es detectada una versin
  compatible en el sistema.

  Est APM configurado o no, puede usar cardctl suspend antes de
  suspender su porttil, y cardctl resume despus de despertarlo, para
  apagar y reactivar sus tarjetas PCMCIA. No funcionar con un mdem que
  est en uso, porque el controlador serie no puede guardar y
  restablecer los parmetros operativos del mdem.

  APM parece ser inestable en algunos sistemas. Si experimenta problemas
  con APM y PCMCIA en su sistema, intente localizar el problema en un
  paquete u otro antes de informar de un bug.

  Algunos controladores, notablemente los controladores PCMCIA SCSI, no
  pueden recuperarse de un ciclo de suspender/despertar. Cuando se usa
  una tarjeta PCMCIA SCSI, use siempre cardctl eject antes de suspender
  el sistema.


  4.1.5.  Apagado del sistema PCMCIA


  Para descargar el paquete PCMCIA completo, invoque rc.pcmcia con:



               /etc/rc.d/rc.pcmcia stop




  Este script tomar algunos segundos para ejecutarse, para darle tiempo
  a todos los controladores a desactivarse correctamente. Si un
  dispositivo est en uso actualmente, el proceso de desactivacin ser
  incompleto, y puede que algunos mdulos del kernel no sean
  descargados. Para prevenir esto, use cardctl eject para desactivar
  todos los sockets antes de invocar rc.pcmcia. El estado de salida del
  comando cardctl indicar si alguno de los sockets no pudo ser
  desactivado.


  4.2.  Un vistazo a los scripts de configuracin de PCMCIA


  Cada dispositivo PCMCIA tiene una clase asociada que describe cmo
  debe ser configurado y manejado. Las clases estn asociadas con los
  controladores de dispositivos en /etc/pcmcia/config. Actualmente hay
  cinco clases de dispositivos de E/S (red, SCSI, cdrom, disco, y serie)
  y dos clases de dispositivos de memoria (memoria y FTL).  Para cada
  clase, hay dos scripts en /etc/pcmcia: un script principal de
  configuracin (por ejemplo, /etc/pcmcia/scsi para dispositivos SCSI),
  y un script de opciones (por ejemplo, /etc/pcmcia/scsi.options). El
  script principal de un dispositivo ser invocado para configurarlo
  cuando se inserte una tarjeta, y para desactivar el dispositivo cuando
  sea extrada.  Para tarjetas con varios dispositivos asociados, el
  script ser invocado para cada dispositivo.

  Los scripts de configuracin inician al extraer algo de informacin
  acerca del dispositivo de /var/run/stab. Cada script construye una
  direccin de dispositivo, que nicamente describe el dispositivo que
  ha sido solicitado para configurar, en la variable de shell ADDRESS.
  Esto es pasado al script *.opts, el cual debe proporcionar informacin
  acerca de cmo debe ser configurado un dispositivo en esta direccin.
  Para algunos, la direccin del dispositivo es slo el nmero de
  socket. Para otros, se incluye informacin extra que puede ser til
  para decidir cmo configurar el dispositivo. Por ejemplo, los
  dispositivos de red pasan su direccin ethernet de hardware como parte
  de la direccin del dispositivo, as, el script network.opts puede
  usar esto para seleccionar diversas configuraciones.

  La primera parte de todas las direcciones de dispositivos es el
  esquema PCMCIA actual. Ese parmetro es usado para soportar
  mltiples conjuntos de configuraciones de dispositivos basadas en una
  simple variable externa definida por el usuario. Una uso de los
  esquemas puede ser el tener un esquema de casa, y un esquema de
  trabajo, el cual puede incluir diferentes conjuntos de parmetros de
  configuracin de red.  El esquema actual se selecciona usando el
  comando cardctl scheme. Si no se define un esquema, por omisin se
  establece el esquema default.

  Como regla general, cuando se configura Linux para un equipo porttil,
  los dispositivos PCMCIA deben ser configurados desde los scripts para
  dispositivos PCMCIA. No intente configurar un dispositivo PCMCIA de la
  misma forma en que configurara un dispositivo conectado de forma
  permanente. No obstante, algunas distribuciones de Linux suministran
  paquetes PCMCIA que estn relacionadas con las herramientas de
  configuracin de dispositivos propios de la misma distribucin. En ese
  caso, alguna de las siguientes secciones puede o no aplicar;
  idealmente, esto sera documentado por los encargados de la
  distribucin.


  4.3.  Adaptadores de red PCMCIA


  Las interfaces de red tipo ethernet normalmente tienen nombres como
  eth0, eth1, y as sucesivamente. Los adaptadores Token-Ring se manejan
  de forma similar, sin embargo, son llamadas comnmente tr0, tr1 y as
  sucesivamente. El comando ifconfig se usa para ver o modificar el
  estado de una interface de red. Una peculiaridad de Linux es que las
  interfaces de red no tienen archivos de dispositivo correspondientes
  en /dev/, as que no se sorprenda si no los encuentra.

  Cuando se detecta una tarjeta ethernet, le ser asignado el primer
  nombre de interface que est libre, normalmente eth0. cardmgr
  ejecutar el script /etc/pcmcia/network para configurar la interface,
  la cual normalmente lee las configuraciones de red de
  /etc/pcmcia/network.opts. Los scripts network, y network.opts sern
  ejecutados slo cuando su tarjeta ethernet est presente. Si su
  sistema tiene la facilidad de configuracin de red automtica, puede o
  no ser PCMCIA. Consulte la documentacin de su distribucin de Linux y
  la seccin `` Notas acerca de distribuciones de Linux especficas''
  para determinar si los dispositivos de red PCMCIA deben ser
  configurados con herramientas automticas, o editando network.opts.

  La direccin de dispositivo pasada a network.opts consiste en cuatro
  campos separados por comas: el esquema, el nmero de socket, la
  instancia de dispositivo, y la direccin ethernet de hardware de la
  tarjeta, La instancia de dispositivo es usada para numerar
  dispositivos para tarjetas que tienen varias interfaces de red, as
  que normalmente ser 0.  Si tiene varias tarjetas de red usadas para
  propsitos diferentes, una opcin puede ser el configurar las tarjetas
  basadas en la posicin del socket, como en:










         case "$ADDRESS" in
         *,0,*,*)
             # definiciones para tarjeta de red en el socket 0
             ;;
         *,1,*,*)
             # definiciones para tarjeta de red en el socket 1
             ;;
         esac




  Alternatvamente, pueden ser configuradas usando su direccin de
  hardware, como en:



         case "$ADDRESS" in
         *,*,*,00:80:C8:76:00:B1)
             # definiciones para una tarjeta D-Link
             ;;
         *,*,*,08:00:5A:44:80:01)
             # definiciones para una tarjeta IBM
         esac





  4.3.1.  Parmetros de dispositivos de red


  Los siguientes parmetros se pueden definir en network.opts:



     IF_PORT
        Especifica el tipo de transceptor ethernet, para tarjetas que no
        sean autodetectadas. Consulte man ifport para ver los nombres de
        los transceptores.


     PUMP
        Una opcin booleana (y/n): indica si la direccin IP e
        informacin de rutado del host se puede obtener ya sea por BOOTP
        o DHCP, con el demonio pump.


     BOOTP
        Una opcin booleana (y/n): indica si la direccin IP del host y
        su informacin de rutado se obtendrn usando el protocolo BOOTP,
        con bootpc.


     DHCP
        Un opcin booleana (y/n): indica si la direccin IP del host y
        su informacin de rutado se obtendrn de un servidor DHCP, con
        dhcpcd.


     IPADDR
        La direccin IP para esta interface.


     NETMASK, BROADCAST, NETWORK
        Parmetros bsicos de red: revise el COMO de red para ms
        informacin.


     GATEWAY
        La direccin IP de una mquina pasarela para la subred de este
        host.  Los paquetes con destinos hacia afuera de esta subred
        sern destinados a dicha pasarela.


     DOMAIN
        El nombre de dominio de la red local para este host, es usado al
        crear /etc/resolv.conf.


     SEARCH
        Una lista de bsqueda para bsqueda de nombres, es aadida a
        /etc/resolv.conf. DOMAIN y SEARCH son mutuamente exclusivos:
        revise man resolver para ms informacin.


     DNS_1,DNS_2,DNS_3
        Nombres de host o direcciones IP para servidores de nombres para
        esta interface, para ser aadidos a /etc/resolv.conf


     MOUNTS
        Una lista de puntos de montaje NFS para ser montados por esta
        interface.


     IPX_FRAME, IPX_NETNUM
        Para redes IPX: el tipo de frame y nmero de red, pasado al
        comando ipx_interface.


  Por ejemplo:



         case "$ADDRESS" in
         *,*,*,*)
             IF_PORT="10base2"
             BOOTP="n"
             IPADDR="10.0.0.1"
             NETMASK="255.255.255.0"
             NETWORK="10.0.0.0"
             BROADCAST="10.0.0.255"
             GATEWAY="10.0.0.1"
             DOMAIN="dominio.org"
             DNS_1="dns1.dominio.org"
             ;;
         esac




  Para montar y desmontar automticamente sistemas de archivos NFS,
  primero aada todos esos sistemas de archivos a /etc/fstab, incluyendo
  noauto en las opciones de montaje. En network.opts, liste los puntos
  de montaje de los sistemas de archivos en la variable MOUNTS. Es
  especialmente importante usar ya sea cardctl o cardinfo para apagar
  una tarjeta de red cuando NFS se encuentre activo. No es posible
  desmontar limpiamente los sistemas de archivos NFS si una tarjeta de
  red es smplemente expulsada sin precaucin.


  En adicin a los parmetros usuales de configuracin de red, el script
  network.opts puede especificar acciones extra a tomar despus de que
  una interface es configurada, o antes de que se apague la interface.
  Si network.opts define una funcin de shell llamada start_fn, ser
  invocada por el script de red despus de que la interface sea
  configurada, y el nombre de interface se pasar a la funcin como su
  primer (y nico)  argumento. Similarmente, si es definido, stop_fn se
  invocar antes de apagar una interfaz.

  El tipo de transceptor se puede seleccionar usando la configuracin
  IF_PORT. Esto puede ser, ya sea un valor numrico como en las
  versiones anteriores de PCMCIA, o una palabra clave que identifique el
  tipo de transceptor. Todos los controladores de red estn configurados
  por omisin para autodetectar la interface si es posible, o bien,
  utilizar 10baseT. El comando ifport se puede utilizar para comprobar
  el tipo de transceptor actual. Por ejemplo:



              # ifport eth0 10base2
              #
              # ifport eth0
              eth0    2 (10base2)




  El controlador actual (3.0.10 o posterior) de 3c589 debe autodetectar
  rpidamente los cambios de transceptor en cualquier momento.  Las
  primeras versiones del controlador 3x589 tenan un algoritmo de
  autodeteccin de transceptores algo lento y no muy amistoso. Para esas
  versiones, el cable de red apropiado debe ser conectado a la tarjeta
  cuando la tarjeta es configurada, o se puede forzar la autodeteccin
  con:



              ifconfig eth0 down up





  4.3.2.  Comentarios acerca de tarjetas especficas



    Con las tarjetas IBM CCAE y Socket EA, el tipo de transceptor
     (10base2, 10baseT, AUI), necesita configurarse cuando el
     dispositivo de red est configurado. Asegrese de que el tipo de
     transceptor que aparece en el registro del sistema concuerda con su
     conexin.

    Los controladores para tarjetas SMC, Megahertz, Ositech, y 3Com
     deben autodetectar el tipo de red conectada (10base2 o 10baseT).
     Establecer el tipo de transceptor cuando se carga el controlador
     sirve para definir la primera bsqueda de la tarjeta.

    La Farallon EtherWave actualmente est basada en la 3Com 3c589, con
     un transceptor especial. Aunque la EtherWave usa conexiones al
     estilo 10baseT, su transceptor requiere que la 3c589 sea
     configurada en modo 10base2.

    Si tiene problemas con un adaptador IBM CCAE, NE4100, Thomas
     Conrad, o Kingston, pruebe a incrementar el tiempo de acceso con la
     opcin mem_speed=# al mdulo pcnet_cs. Un ejemplo de cmo hacer
     esto se muestra en el archivo config.opts. Pruebe con velocidades
     por encima de 1000 (en nanosegundos).

    Para el adaptador New Media Ethernet, en algunos sistemas, puede
     ser necesario incrementar el tiempo de acceso al puerto de E/S con
     la opcin io_speed=# cuando se cargue el mdulo pcmcia_core.  Edite
     CORE_OPTS en el script de inicio para activar esta opcin.

    El soporte multicast en el controlador New Media Ethernet est
     incompleto. El ltimo controlador funcionar con kernels multicast,
     pero ignorar los paquetes multicast. El modo promiscuo debe
     funcionar apropiadamente.

    El controlador usado por los controladores token ring IBM y 3Com
     parecen comportarse bastante mal si las tarjetas no estn
     conectadas cuando son inicializadas. Conecte siempre esas tarjetas
     a la red antes de activarlas. Si ifconfig informa que la direccin
     de harware como todo 0, esto debe ser debido a un problema de
     configuracin de la ventana de memoria.

    Algunas tarjetas Linksys, D-Link, e IC-Card 10baseT/10base2 tienen
     una forma nica de seleccionar el tipo de transceptor que no es
     manejado por los controladores de Linux. Una solucin es arrancar
     DOS y utilizar la utilidad proporcionada por el fabricante para
     seleccionar el transceptor, haciendo entonces un arranque en
     caliente de Linux. Alternativamente, hay una utilidad Linux para
     realizar esta funcin, que est disponible en
      ftp://hyper.stanford.edu/pub/pcmcia/extras/dlport.c.

    Para adaptadores de red inalmbricos WaveLAN, Jean Tourrilhes,
     jt@hpl.hp.com)  tiene disponible el Wireless HOWTO (Cmo
     inalmbrico) en
     http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/


  4.3.3.  Diagnstico de problemas con adaptadores de red



    Es reconocida su tarjeta como una tarjeta ethernet? Revise el
     registro del sistema y asegrese de que cardmgr identifique la
     tarjeta correctamente e inicia uno de los controladores de red. Si
     no lo hace, su tarjeta puede ser utilizable todava si es
     compatible con una tarjeta soportada. Esto es posible hacerlo
     fcilmente si la tarjeta dice ser NE2000 compatible.

    Est configurada la tarjeta apropiadamente? Si est usando una
     tarjeta soportada, y fue reconocida por cardmgr, pero todava no
     funciona, pudo ser un conflicto de interrupcin o puerto con otro
     dispositivo. Determine qu recursos est utilizando la tarjeta (en
     el registro del sistema), e intente de nuevo excluyndolos en
     /etc/pcmcia/config.opts para forzar a la tarjeta a usar otros.

    Si su tarjeta parece estar configurada adecuadamente, pero a veces
     se congela, particularmente bajo carga alta, puede ser que necesite
     intentar cambiar los parmetros de sincronizacin de su controlador
     del socket. Revise la seccin ``Opciones de Inicio'' para ms
     informacin.

    Si obtiene mensajes de network unreachable cuando intenta acceder a
     la red, la informacin especificada en /etc/pcmcia/network.opts es
     incorrecta. Este mensaje es una indicacin absolutamente a prueba
     de tontos de que hay un error de rutado.  Por otra parte, las
     tarjetas mal configuradas normalmente fallarn silenciosamente.


    Para diagnosticar problemas en /etc/pcmcia/network.opts, empiece
     tratando de hacer ping a otros sistemas en la misma subred usando
     sus direcciones IP. Trate entonces de hacer ping a su puerta de
     enlace o pasarela (gateway), y a mquinas en otras subredes.
     Debe ser posible hacer ping a las mquinas por su nombre si lleva a
     cabo dichas pruebas con xito.

    Asegrese que su problema sea PCMCIA. Puede ser muy til comprobar
     si la tarjeta funciona correctamente bajo DOS con los controladores
     del fabricante.  Verifique bien sus modificaciones al script
     /etc/pcmcia/network.opts. Asegrese que su cable, conector T,
     terminador, etc. estn funcionando.


  4.4.  Dispositivos serie PCMCIA y mdems


  Los dispositivos serie de Linux son gestionados por medio de los
  archivos de dispositivo especiales /dev/ttyS* y /dev/cua*. En los
  kernels pre-2.2 los dispositivos ttyS* eran para conexiones entrantes,
  como mdems. El uso de dispositivos cua* se desaprueba en los kernels
  actuales, y se puede usar ttyS* para todas las aplicaciones. La
  configuracin de un dispositivo serie se puede examinar y modificar
  con el comando setserial.

  Cuando se detecta una tarjeta serie o mdem, se le asignar el primer
  slot de dispositivo serie que se encuentre disponible. Este ser
  usualmente /dev/ttyS1 (cua1) o /dev/ttyS2 (cua2), dependiendo del
  nmero de puertos serie que tenga. El dispositivo ttyS* es el que
  aparecer en /var/run/stab. El script de opciones por omisin para
  dispositivos serie, /etc/pcmcia/serial.opts, enlazar el dispositivo a
  /dev/modem por conveniencia. Para los kernels pre-2.2, el enlace se
  hace al dispositivo cua*.

  No intente usar /etc/rc.d/rc.serial para configurar un mdem PCMCIA.
  Este script slo debera ser utilizado para configurar dispositivos no
  extrables. Modifique /etc/pcmcia/serial.opts si quiere hacer algo
  especial para configurar su mdem. No intente tampoco cambiar las
  configuraciones de E/S y puerto de un dispositivo serie utilizando
  setserial. Esto podra decir al controlador serie que busque al
  dispositivo en un lugar diferente, pero no cambiar cmo el hardware de
  la tarjeta est configurado actualmente. El script de configuracin
  serie le permite especificar otras opciones para setserial, as como
  si se debe aadir una lnea a /etc/inittab para este puerto.

  La direccin del dispositivo pasada a serial.opts tiene tres campos
  separados por comas: el primero es el esquema, el segundo es el nmero
  de socket, y el tercero es la instancia del dispositivo. La instancia
  del dispositivo puede tomar varios valores para tarjetas que soporten
  mltiples puertos serie, pero para tarjetas de un slo puerto, siempre
  ser 0. Si comunmente usa ms de un mdem, puede especificar
  diferentes configuraciones basadas en la posicin del socket, como en:



              case "$ADDRESS" in
              *,0,*)
                  # Opciones para un modem en el socket 0
                  LINK=/dev/modem0
                  ;;
              *,1,*)
                  # Opciones para un modem en el socket 1
                  LINK=/dev/modem1
                  ;;
              esac

  Si un mdem PCMCIA ya est configurado cuando Linux arranca, puede ser
  identificado incorrectamente como un puerto serie ordinario. Esto es
  inofensivo, sin embargo, cuando los controladores PCMCIA toman el
  control del mdem, se le asignar un slot de dispositivo diferente.
  Por ello es mejor, ya sea analizar  /var/run/stab o usar /dev/modem,
  en lugar de indicar que este mdulo debe recargarse. Edite la entrada
  del dispositivo serie, de modo que se lea:



              device "serial_cs"
                class "serial" module "misc/serial", "serial_cs"





  4.4.1.  Parmetros de dispositivos serie


  Los siguientes parmetros se pueden definir en serial.opts:



     LINK
        Especifica una ruta para un enlace simblico a crear al
        dispositivo callout (para llamar hacia el exterior) (ejemplo,
        /dev/cua* para kernels pre-2.2 o /dev/ttyS* para kernels 2.2.x).


     SERIAL_OPTS
        Especifica las opciones que se pasan al comando setserial.


     INITTAB
        Si se especifica, se usar para aadir una entrada inittab para
        el dispositivo.


  Por ejemplo:



              case "$ADDRESS" in
              *,*,*,*)
                  LINK="/dev/modem"
                  SERIAL_OPTS=""
                  INITTAB="/sbin/getty"





  4.4.2.  Diagnstico de problemas con dispositivos serie



    Se reconoce su tarjeta como un mdem? Revise el registro del
     sistema y asegrese que cardmgr identifica la tarjeta correctamente
     e inicia el controlador serial_cs. Si no, necesitar aadir una
     nueva entrada en el fichero /etc/pcmcia/config para que pueda ser
     identificado apropiadamente. Consulte la seccin ``Configuracin de
     tarjetas no reconocidas'' para ms detalles.

    Es el mdem configurado satisfactoriamente por serial_cs?
     Nuevamente, revise el registro del sistema y busque los mensajes
     del controlador serial_cs. Si ve mensajes como register_serial()
     failed debe tener un conflicto de puerto de E/S con otro
     dispositivo.  Otra causa de conflictos tiene lugar cuando el
     dispositivo es reconocido como una UART 8250;  la mayora de mdems
     modernos deben identificarse como UART 16550A. Si piensa que est
     viendo un conflicto de puertos, edite /etc/pcmcia/config.opts y
     excluya el rango de puertos que fue reservado para el mdem.

    Hay un conflicto de interrupciones? Si el registro del sistema se
     parece normal, pero el mdem no funciona, pruebe a cambiar la irq a
     0 usando setserial y comprobar si el mdem funciona. Esto causa que
     el controlador serie use un modo de bsqueda ms bajo en lugar de
     usar interrupciones. Si esto parece solucionar el problema, es
     probable que otro dispositivo del sistema est usando la
     interrupcin seleccionada por serial_cs. Deber aadir una lnea a
     /etc/pcmcia/config.opts para excluir esta interrupcin.

    Si el mdem parece funcionar muy, muy lento, esto es casi un
     indicador seguro de un conflicto de interrupciones. Asegrese que
     su problema sea realmente PCMCIA. Puede ayudarle comprobar si la
     tarjeta funciona bajo DOS con los controladores del fabricante. As
     mismo, evite probar la tarjeta con algo complicado como SLIP o PPP
     hasta que est seguro que haga conexiones simples. Si es capaz de
     establecer conexiones simples, pero no con SLIP, su problema es
     ms probable que tenga que ver con SLIP, y no con PCMCIA.

    Si obtiene mensajes del kernel indicando que el mdulo serial_cs no
     puede cargarse, significa que su kernel no tiene soporte para
     dispositivo serie. Si ha compilado el controlador serie como
     mdulo, debe modificar /etc/pcmcia/config para indicar que el
     mdulo serie debe cargarse antes de serial_cs.


  4.5.  Dispositivos PCMCIA de puerto paralelo


  El controlador de puerto paralelo de Linux est estructurado por
  capas, as que varios tipos de dispositivos de alto nivel pueden
  compartir el mismo controlador de puerto de bajo nivel. Los
  dispositivos se gestionan a travs de los archivos especiales de
  dispositivo /dev/lp*. La configuracin de un dispositivo de impresora
  puede examinarse y modificarse con el comando tunelp.

  El mdulo parport_cs depende de los controladores parport y
  parport_pc, los cuales pueden ser compilados dentro del kernel o bien
  compilados como mdulos. La estructura del controlador por capas
  significa que cualquiera de los controladores paralelos de alto nivel
  (tales como el controlador plip, el controlador de impresora, etc.)
  deben ser compilados como mdulos. Estos controladores slo reconocen
  dispositivos de puerto paralelo en el momento de iniciar el mdulo,
  as que pueden cargarse despus de que cualquier dispositivo paralelo
  PC Card sea configurado.

  La direccin del dispositivo pasada a parport.opts tiene tres campos
  separados por comas: el primero es el esquema, el segundo es el nmero
  de socket, y el tercero es la instancia del dispositivo. La instancia
  del dispositivo puede tomar varios valores para tarjetas que soportan
  mltiples puertos paralelos, pero para tarjetas de un solo puerto,
  siempre ser 0. Si usa habitualmente ms de una tarjeta, necesitar
  especificar diferentes configuraciones basadas en la posicin del
  socket, como en:





         case "$ADDRESS" in
         *,0,*)
             # Opciones para una tarjeta en el socket 0
             LINK=/dev/printer0
             ;;
         *,1,*)
             # Opciones para una tarjeta en el socket 1
             LINK=/dev/printer1
             ;;
         esac




  Si configura el kernel para cargar el controlador bsico de puerto
  paralelo como mdulo, debe editar /etc/pcmcia/config para indicar qu
  mdulos necesitan cargarse. Edite la entrada para el dispositivo
  paralelo de modo que se lea:



              device "parport_cs"
                class "parport" module "misc/parport", "misc/parport_pc", "parport_cs"





  4.5.1.  Parmetros de dispositivos paralelos


  Los siguientes parmetros pueden especificarse en parport.opts:



     LINK
        Especifica la ruta del enlace simblico a crear hacia el puerto
        de impresora.


     LP_OPTS
        Especifica las opciones a pasar al comando tunelp.


  Por ejemplo:



              case "$ADDRESS" in
              *,*,*,*)
                  LINK="/dev/printer"
                  LP_OPTS=""





  4.5.2.  Diagnstico de problemas con dispositivos de puertos paralelos



    Hay un conflicto de interrupciones? Si el registro del sistema
     parece estar bien, pero el puerto no funciona, cambie la irq a 0
     usando tunelp, y compruebe si las cosas mejoran.  Esto cambia el
     controlador a modo de bsqueda. Si parece solucionar el problema,
     es probable que otro dispositivo en su sistema est utilizando la
     interrupcin seleccionada por parport_cs. Deber aadir una lnea a
     /etc/pcmcia/config.opts para excluir esta interrupcin.

    Si su kernel genera mensajes indicando que el mdulo parport_cs no
     puede cargarse, significa que el kernel no tiene soporte para
     dispositivos paralelos. Si tiene compilado el controlador paralelo
     como mdulo, necesita modificar /etc/pcmcia/config para indicar que
     los mdulos parport y parport_pc deben cargarse antes que
     parport_cs.


  4.6.  Adaptadores SCSI PCMCIA


  Todos los controladores que dan soporte actualmente a tarjetas SCSI
  PCMCIA son trabajos basados en alguna de las siguientes tarjetas bus
  ISA: Qlogic, Adaptec AHA-152X, o Future Domain TMC-16x0. Los
  controladores PCMCIA son compilados enlazando parcialmente cdigo
  especfico PCMCIA (en qlogic_cs.c, toaster_cs.c, o fdomain_cs.c) con
  el controlador SCSI normal de Linux. Debido a las limitaciones en el
  modelo del controlador SCSI de Linux, slo se soporta una tarjeta
  extrable por controlador.

  Cuando se detecta un nuevo adaptador SCSI, los controladores SCSI
  sondearn la presencia de dispositivos. Revise el registro del sistema
  para asegurar que los dispositivos sean detectado apropiadamente. Los
  nuevos dispositivos SCSI se asignarn a los primeros archivos de
  dispositivo SCSI disponibles. El primer disco SCSI ser /dev/sda, la
  primera cinta SCSI ser /dev/st0, y el primer CD-ROM ser /dev/scd0.

  En /var/run/stab se muestra una lista de los dispositivos conectados a
  este adaptador, y el script de configuracin /etc/pcmcia/scsi se
  llamar una vez para cada dispositivo conectado, ya sea para
  configurar o apagar ese dispositivo. El script por omisin no toma
  ninguna accin para configurar dispositivos SCSI, pero desmontar
  apropiadamente los sistemas de archivos en dispositivos SCSI cuando se
  extraiga la tarjeta.

  Las direcciones de dispositivo que se pasan a scsi.opts son
  complicadas, debido a la variedad de cosas que pueden conectarse a un
  adaptador SCSI. Las direcciones consisten de de seis o siete campos
  separados por comas: el esquema actual, el tipo de dispositivo, el
  nmero de socket, el canal SCSI, ID, y el nmero lgico de unidad, y
  opcionalmente, el nmero de particin. El tipo de dispositivo ser sd
  para discos, st para cintas, sr para unidades de CD-ROM, y sg para
  dispositivos SCSI genricos. Para la mayora de configuraciones, la
  unidad lgica y el canal SCSI sern 0. Para unidades de disco con
  varias particiones, scsi.opts se llamar primero para toda la unidad,
  con direcciones de cinco campos. El script deber establecer la
  variable PARTS una lista de particiones.  Entonces, scsi.opts ser
  llamado para cada particin, con las direcciones ms largas, de siete
  campos.

  Si su kernel no tiene un controlador de alto nivel (disco, cinta, etc)
  para un dispositivo SCSI en particular, entonces no ser configurado
  por los controladores PCMCIA. Como efecto lateral, el nombre del
  dispositivo en /var/run/stab ser algo como sd#nnnn donde nnnn es un
  nmero hexadecimal de cuatro dgitos. Esto pasa cuando cardmgr no
  puede traducir una ID de un dispositivo SCSI a su nombre de
  dispositivo correspondiente en Linux.

  Es posible modularizar los controladores SCSI de alto nivel para que
  puedan cargarse segn demanda. Para hacerlo, necesita editar
  /etc/pcmcia/config para decirle a cardmgr qu mdulos extra necesitan
  ser cargados cuando sea configurado su adaptador. Por ejemplo:

              device "aha152x_cs"
                class "scsi" module "scsi/scsi_mod", "scsi/sd_mod", "aha152x_cs"




  Especificara que se cargase el mdulo principal SCSI y el mdulo
  controlador de disco antes de cargar el mdulo controlador PCMCIA
  normal.  El script Configure de PCMCIA no detectar automticamente
  mdulos SCSI modularizados, as que necesitar usar la opcin de
  configuracin manual para habilitar el soporte SCSI.

  Encienda siempre los dispositivos SCSI antes de encender su porttil,
  o antes de insertar la tarjeta adaptadora, para que el bus SCSI est
  listo cuando el adaptador se configure. Tambin hay que ser muy
  cuidadoso al expulsar un adaptador SCSI. Asegrese que todos los
  dispositivos SCSI asociados sean desmontados y cerrados antes de
  expulsar la tarjeta. La mejor forma de asegurar esto es usar cardctl o
  cardinfo para solicitar que se desactive la tarjeta antes de
  expulsarla fsicamente. Por ahora, todos los dispositivos SCSI debern
  encenderse antes de conectar un adaptador SCSI, y debern permanecer
  conectados hasta que desconecte el adaptador y/o apague su porttil.

  Hay una complicacin potencial cuando se usan tarjetas que no se
  presentan con adaptadores de bus ISA ordinarios. El bus SCSI
  transporta una seal termination power (corriente de terminacin) que
  se necesita para que los terminadores pasivos SCSI ordinarios
  funcionen apropiadamente. Los adaptadores PCMCIA SCSI no suministran
  corriente de terminacin, as que si se requiere, deber
  proporcionarlo el dispositivo externo. Algunos dispositivos externos
  SCSI deben configurarse para suministrarlo. Otros, como el Iomega Zip
  y el Syquest EZ, usan terminadores activos que no dependen de ello. En
  algunos casos, puede ser necesario usar un bloque terminador especial
  como el APS SCSI Sentry 2, el cual tiene una fuente de alimentacin
  externa. Cuando configure la entrada para el dispositivo SCSI, hgalo
  teniendo en cuenta si alguno de sus dispositivos requieren o pueden
  suministrar corriente de terminacin o no.


  4.6.1.  Parmetros de dispositivos SCSI


  Los siguientes parmetros pueden ser especificados en scsi.opts:



     DO_FSTAB
        Es una opcin booleana (y/n): Especifica si se debe aadir una
        entrada /etc/fstab para este dispositivo.


     DO_FSCK
        Es una opcin booleana (y/n): Especifica si se debe comprobar
        este dispositivo antes de ser montado, con fsck -Ta.


     DO_MOUNT
        Es una opcin booleana (y/n): Especifica si este dispositivo
        debe montarse automticamente al momento de insertar la tarjeta.


     FSTYPE, OPTS, MOUNTPT
        El tipo de sistema de archivos, opciones de montaje, y punto de
        montaje que se utilizarn para la entrada en fstab y/o para
        montar el dispositivo.

  Por ejemplo, un script para configurar una unidad de disco en SCSI ID
  3, con dos particiones, y un CD-ROM en SCSI ID 6:



         case "$ADDRESS" in
         *,sd,*,0,3,0)
             # Este dispositivo tiene dos particiones...
             PARTS="1 2"
             ;;
         *,sd,*,0,3,0,1)
             # Opciones para la particion 1:
             #  actualizar /etc/fstab, y montar un sistema de archivos ext2 en /usr1
             DO_FSTAB="y" ; DO_FSCK="y" ; DO_MOUNT="y"
             FSTYPE="ext2"
             OPTS=""
             MOUNTPT="/usr1"
             ;;
         *,sd,*,0,3,0,2)
             # Opciones para la particin 2:
             #  actualizar /etc/fstab, y montar un sistema de archivos MS-DOS en /usr2
             DO_FSTAB="y" ; DO_FSCK="y" ; DO_MOUNT="y"
             FSTYPE="msdos"
             OPTS=""
             MOUNTPT="/usr2"
             ;;
         *,sr,*,0,6,0)
             # Opciones para un CD-ROM en SCSI ID 6
             PARTS=""
             DO_FSTAB="y" ; DO_FSCK="n" ; DO_MOUNT="y"
             FSTYPE="iso9660"
             OPTS="ro"
             MOUNTPT="/cdrom"
             ;;
         esac






  4.6.2.  Comentarios acerca de tarjetas especficas



    La tarjeta Adaptec APA-1480 CardBus necesita una ventana de puerto
     de E/S grande (256 puertos contiguos alineados en un lmite de 256
     puertos). Puede que sea necesario incluir las regiones de los
     puertos de E/S en /etc/pcmcia/config.opts para garantizar que cada
     ventana pueda encontrarse.

    No est soportado el adaptador Adaptec APA-460 SlimSCSI. Esta
     tarjeta se vendi originalmente bajo el nombre de Trantor, y cuando
     Adaptec se uni a Trantor, continuaron vendiendo la tarjeta Trantor
     con etiqueta Adaptec. La APA-460 no es compatible con ningn
     controlador de Linux existente.

    He sido informado de la mala interaccin entre la tarjeta New Media
     Bus Toaster y un scanner UMAX Astra 1200s. Debido a la complejidad
     del protocolo SCSI, cuando se diagnostican problemas con
     dispositivos SCSI, es digno de considerar que combinaciones
     incompatibles como esta pueden existir y no pueden documentarse.




  4.6.3.  Diagnstico de problemas con adaptadores SCSI



    Con el controlador aha152x_cs (usado por Adaptec, New Media, y
     algunos ms), parece que el soporte SCSI de conexin/reconexin
     constituye una fuente de problemas frecuentes con dispositivos de
     cinta. Para desactivar esta caracterstica, aada lo siguiente a
     /etc/pcmcia/config.opts:



         module "aha152x_cs" opts "reconnect=0"





    Con el controlador aha152x_cs, ciertos dispositivos parecen
     requerir un tiempo de espera de inicio ms grande, controlado con
     el parmetro reset_delay del mdulo. La unidad CDR Yamaha 4416S es
     uno de esos dispositivos. El resultado es que el dispositivo es
     identificado sin problemas, y luego se congela el sistema. En esos
     casos, pruebe:



              module "aha152x_cs" opts "reset_delay=500"





    Otra fuente potencial de problemas en el sondeo de dispositivos
     SCSI es el tanteo de LUNs mltiples. Si ve que la deteccin de un
     dispositivo es realizada sin problemas, seguida de timeouts del
     bus SCSI cuando se sondea el LUN 1 para ese dispositivo, debe
     desactivar la opcin CONFIG_SCSI_MULTI_LUN del kernel.

    Si tiene compilado el soporte SCSI modularmente (CONFIG_SCSI es m),
     debe modificar /etc/pcmcia/config para cargar los mdulos SCSI
     antes de que se cargue el controlador *_cs apropiado.

    Si obtiene mensajes de tipo aborting command due to timeout
     (abortando el comando debido a timeout), cuando se sondea el bus
     SCSI, es muy probable que tenga un conflicto de interrupciones.

    Si el controlador del host avisa no SCSI devices found (no se han
     encontrado dispositivos SCSI), verifique que el kernel fue
     compilado con los controladores SCSI de alto nivel apropiados para
     sus dispositivos (por ejemplo, disco, cinta, CD-ROM, y/o
     genricos). Si falta un controlador de alto nivel, los dispositivos
     de ese tipo se ignorarn.



  4.7.  Tarjetas de memoria PCMCIA


  El controlador memory_cs maneja todos los tipos de tarjetas de
  memoria, y tambin proporciona acceso directo al espacio de la
  direccin de memoria PCMCIA para tarjetas que tienen otras funciones.
  Cuando se carga, crea una combinacin de dispositivos de caracteres y
  de bloques.  Revise la pgina del manual del mdulo para ver una
  descripcin completa del esquema de nombres de estos dispositivos. Los
  dispositivos de bloques se usan para tener acceso a disco (creando y
  montando sistemas de archivos, etc.).  Los dispositivos de caracteres
  son para lecturas en bruto (que no se procesan) que no se guardan en
  el buffer y son escritas en posiciones arbitrarias.

  La direccin de dispositivo que se pasa a memory.opts consiste de dos
  campos: el esquema, y el nmero de socket. Las opciones se aplican a
  la primera particin de memoria comn en la tarjeta correspondiente.

  Algunas tarjetas de memoria antiguas, y la mayora de las tarjetas de
  RAM simple esttica, carecen de Card Information Structure, CIS
  (Estructura de Informacin de Tarjeta), que es el esquema que las
  tarjetas PCMCIA usan para identificarse a si mismas. Normalmente,
  cardmgr asumir que una tarjeta que carece de CIS es una tarjeta de
  memoria simple, y cargar el controlador memory_cs. Por tanto, un
  efecto lateral es que otros tipos de tarjetas pueden detectarse
  errneamente como tarjetas de memoria.

  El controlador memory_cs usa un algoritmo heurstico para determinar
  la capacidad de esas tarjetas. Este algoritmo no funciona con tarjetas
  protegidas contra escritura, y puede cometer errores en algunos otros
  casos. Si una tarjeta se configura de forma errnea, su tamao puede
  especificarse explcitamente cuando se haga uso de los comandos dd o
  mkfs.


  4.7.1.  Parmetros de dispositivos de memoria




     DO_FSTAB
        Es una opcin booleana (y/n): Especifica si se debe aadir una
        entrada /etc/fstab para este dispositivo.


     DO_FSCK
        Es una opcin booleana (y/n): Especifica si se debe comprobar
        este dispositivo antes de ser montado, con fsck -Ta.


     DO_MOUNT
        Es una opcin booleana (y/n): Especifica si este dispositivo
        debe montarse automticamente en el momento de insertar la
        tarjeta.


     FSTYPE, OPTS, MOUNTPT
        El tipo de sistema de archivos, opciones de montaje, y punto de
        montaje que se utilizarn para la entrada en fstab y/o para
        montar el dispositivo.


  He aqu un ejemplo de un script que montar automticamente las
  tarjetas de memoria basndose en el socket en que estn insertadas:












         case "$ADDRESS" in
         *,0,0)
             # Montar sistema de archivos, pero no actualizar /etc/fstab
             DO_FSTAB="n" ; DO_FSCK="y" ; DO_MOUNT="y"
             FSTYPE="ext2" ; OPTS=""
             MOUNTPT="/mem0"
             ;;
         *,1,0)
             # Montar sistema de archivos, pero no actualizar /etc/fstab
             DO_FSTAB="n" ; DO_FSCK="y" ; DO_MOUNT="y"
             FSTYPE="ext2" ; OPTS=""
             MOUNTPT="/mem1"
             ;;
         esac






  4.7.2.  Uso de tarjetas de memoria flash


  La direccin de dispositivo que se pasa a ftl.opts consiste en tres o
  cuatro campos: el esquema, el nmero de socket, el nmero de regin, y
  opcionalmente, el nmero de particin. La mayora de tarjetas flash
  tienen slo una regin de memoria flash, as que el nmero de regin
  ser generalmente cero siempre.

  Para usar una tarjeta de memoria flash como un dispositivo de bloques
  del tipo de un disco ordinario, primero se crea una particin FTL, o
  flash translation layer, en el dispositivo por medio del comando
  ftl_format. Esta capa oculta los detalles especficos de dispositivo
  de la programacin de la memoria flash y hace que la tarjeta se vea
  como un simple dispositivo de bloques. Por ejemplo:



              ftl_format -i /dev/mem0c0c




  Ntese que este comando accede a la tarjeta por medio de la interface
  raw de la tarjeta de memoria. Una vez formateada, la tarjeta puede
  tratarse como un dispositivo de bloques ordinario por medio del
  controlador ftl_cs. Por ejemplo:



              mke2fs /dev/ftl0c0
              mount -t ext2 /dev/ftl0c0 /mnt




  La nomenclatura de dispositivos FTL es difcil. Los nmeros menores de
  los dispositivos tienen tres partes: el nmero de tarjeta, el nmero
  de regin en esa tarjeta, y opcionalmente, la particin dentro de esa
  regin. Una regin puede ser tratada como un simple dispositivo de
  bloques sin tabla de particin (como un disquete), o puede
  particionarse como un disco duro.  El dispositivo ftl0c0 es la tarjeta
  0, regin de memoria comn 0, la regin entera. Los dispositivos de
  ftl0c0p1 a ftl0c0p4 son primariamente las particiones de 1 a 4 si la
  regin ha sido particionada.

  Hay dos formatos mayores para tarjetas de memoria flash: el estilo
  FTL, y el sistema de archivos Microsoft Flash. El formato FTL es
  generalmente ms flexible porque permite que pueda utilizarse
  cualquier sistema de archivos de alto nivel en una tarjeta flash como
  si fuera un dispositivo de disco ordinario. El FFS es un tipo sistema
  de archivos completamente diferente. Linux no puede manejar
  actualmente tarjetas formateadas con FFS.

  Las tarjetas flash Intel Series 100 usan el primer bloque flash de
  128k para almacenar la informacin de la configuracin de la tarjeta.
  Para prevenir el borrado accidental de esta informacin, ftl_format
  automticamente detectar esto y saltar al primer bloque cuando se
  cree una particin FTL.


  4.8.  Tarjetas PCMCIA para unidades ATA/IDE


  El soporte para unidades ATA/IDE se basa en el controlador IDE regular
  del kernel. La parte especfica PCMCIA del controlador es ide_cs.
  Asegrese de usar cardctl o cardinfo para apagar la tarjeta ATA/IDE
  antes de expulsarla, porque el controlador no fue programado a prueba
  de extraccin en caliente.

  La direccin de dispositivo que se pasa a ide.opts consiste de tres o
  cuatro campos: el esquema actual, el nmero de socket, el nmero de
  serie de la unidad, y un nmero opcional de particin. El comando
  ide_info puede usarse para obtener el nmero de serie del dispositivo
  IDE. Tal y como sucede con los dispositivos SCSI, ide.opts se llama
  primero para el dispositivo entero. Si ide.opts retorna una lista de
  particiones en la variable PARTS, el script entonces se llamar para
  cada particin.


  4.8.1.  Parmetros para discos ATA/IDE


  Los siguientes parmetros se pueden especificar en ide.opts:



     DO_FSTAB
        Es una opcin booleana (y/n): Especifica si se debe aadir una
        entrada /etc/fstab para este dispositivo.


     DO_FSCK
        Es una opcin booleana (y/n): Especifica si se debe comprobar
        este dispositivo antes de ser montado, con fsck -Ta.


     DO_MOUNT
        Es una opcin booleana (y/n): Especifica si este dispositivo
        debe montarse automticamente al momento de insertar la tarjeta.


     FSTYPE, OPTS, MOUNTPT
        El tipo de sistema de archivos, opciones de montaje, y punto de
        montaje que se utilizarn para la entrada en fstab y/o para
        montar el dispositivo.


  He aqui un ejemplo del archivo ide.opts para montar la primera
  particin de cualquier tarjeta ATA/IDE en /mnt.


              case "$ADDRESS" in
              *,*,*,1)
                  DO_FSTAB="y" ; DO_FSCK="y" ; DO_MOUNT="y"
                  FSTYPE="msdos"
                  OPTS=""
                  MOUNTPT="/mnt"
                  ;;
              *,*,*)
                  PARTS="1"
                  ;;
              esac






  4.8.2.  Diagnstico de problemas con adaptadores ATA/IDE



    Algunas unidades IDE violan la especificacin PCMCIA al requerir un
     tiempo mayor para iniciar que el mximo permitido para la
     configuracin de la tarjeta. Desde la versin 3.0.6, el controlador
     ide_cs automticamente intentar sondear el dispositivo para darle
     tiempo de iniciarlos. Con los controladores antiguos, necesita
     cargar el mdulo pcmcia_core con:



              CORE_OPTS="unreset_delay=400"





    Para usar una unidad de CD-ROM ATA/IDE, el kernel debe compilarse
     con CONFIG_BLK_DEV_IDECD activado. Normalmente ser el caso para
     los kernels estndar, sin embargo es bueno estar enterado por si
     compila un kernel personalizado.


  4.9.  Tarjetas multifuncin


  Se puede compartir una simple interrupcin entre varios controladores,
  como el controlador serie y el controlador ethernet: en efecto: la
  especificacin PCMCIA requiere que todas las funciones de las tarjetas
  compartan la misma interrupcin. Normalmente, todas las funciones de
  las tarjetas estn disponibles sin tener que intercambiar
  controladores.

  El uso simultneo de dos funciones de tarjetas es algo difcil y
  varios fabricantes de hardware han implementado el compartir
  interrupciones en sus propias formas incompatibles (y a veces
  propietarias). Los controladores para algunas tarjetas (Ositech Jack
  de Diamond, 3Com 3c562, Linksys) soportan de forma apropiada el acceso
  simultneo, pero otras (Megahertz en particular) no.

  Los kernels antiguos no soportan el compartir interrupciones entre
  diferentes controladores de dispositivos, as que no es posible para
  los controladores PCMCIA el configurar esta tarjeta para acceso
  simultneo ethernet y mdem. Los controladores ethernet y serie se
  cargan automticamente. Sin embargo, el controlador ethernet por
  omisin posee la interrupcin de la tarjeta. Para usar el mdem,
  puede descargar el controlador ethernet y reconfigurar el puerto serie
  haciendo algo como:



              ifconfig eth0 down
              rmmod 3c589_cs
              setserial /dev/modem autoconfig auto_irq
              setserial /dev/modem




  El segundo setserial debe verificar que el puerto ha sido configurado
  para usar la interrupcin que previamente utilizaba el controlador
  ethernet.



  5.  Temas avanzados



  5.1.  Apartado de recursos para dispositivos PCMCIA


  En teora, no debe importar qu interrupcin se reserva para cada
  dispositivo, mientras dos dispositivos no sean configurados para usar
  la misma interrupcin.

  En /etc/pcmcia/config.opts encontrar un lugar para excluir las
  interrupciones que son usadas por dispositivos no PCMCIA.

  De igual modo, no hay forma de especificar directamente las
  direcciones de E/S que va a utilizar una tarjeta. El archivo
  /etc/pcmcia/config.opts permite especificar rangos de puertos
  disponibles para ser usados por una tarjeta cualquiera, o para excluir
  rangos que causan conflictos con otros dispositivos.

  Despus de modificar /etc/pcmcia/config.opts, puede reiniciar cardmgr
  con kill -HUP.

  La interrupcin que se utiliza para monitorizar el estado de la
  tarjeta se determina por el mdulo controlador de bajo nivel del
  socket (i82365 o tcic) antes de que cardmgr pase a /etc/pcmcia/config,
  as no se ve afectado con los cambios a este archivo. Para establecer
  esta interrupcin, use la opcin cs_irq= cuando se cargue el
  controlador del socket, estableciendo la variable PCIC_OPTS en
  /etc/rc.d/rc.pcmcia

  Todos los controladores de tarjetas tienen un parmetro llamado
  irq_list para especificar qu interrupciones pueden intentar reservar.
  Dichas opciones deben establecerse en el archivo /etc/pcmcia/config.
  Por ejemplo:



              device "serial_cs"
                module "serial_cs" opts "irq_list=8,12"
                ...




  debe especificarse que el controlador serie debe utilizar slo la irq
  8 o la 12. Sin importar las configuraciones de irq_list, los Servicios
  de Tarjetas nunca reservarn una interrupcin que ya est siendo usada
  por otro dispositivo, o una interrupcin que est excluida en el
  archivo de configuracin.


  5.2.  trabajo?  Cmo puedo separar configuraciones de los dispositivos
  para casa y el


  Esto es bastante fcil con el soporte de esquemas. Usando dos
  esquemas de configuracin, llamados casa y trabajo. He aqu un ejemplo
  del script network.opts con configuraciones especficas de esquemas:



              case "$ADDRESS" in
              trabajo,*,*,*)
                  # definiciones para la tarjeta de red en el esquema trabajo
                  ...
                  ;;
              casa,*,*,*|default,*,*,*)
                  # definiciones para la tarjeta de red en el esquema casa
                  ...
                  ;;
              esac




  La primera parte de una direccin de dispositivo siempre es la
  configuracin del esquema. En este ejemplo, la segunda clusula case
  aplicar para ambos esquemas. As, si un esquema no est establecido
  por cualquier razn, se tomar por omisin la configuracin casa.

  Ahora, para seleccionar entre dos conjuntos de configuraciones,
  ejecute:



              cardctl scheme casa




  o bien



              cardctl scheme trabajo




  El comando cardctl hace el equivalente a apagar todas sus tarjetas y
  luego reiniciarlas. Este comando puede ejecutarse de forma segura
  estando el sistema PCMCIA cargado o no, pero el comando puede fallar
  si est usando otros dispositivos PCMCIA en ese momento (incluso si
  sus configuracion no es explcitamente dependiente de la configuracin
  del esquema).

  Para mostrar la configuracin del esquema, ejecute:



              cardctl scheme


  Por omisin, la configuracin del esquema es persistente a travs de
  los inicios del equipo. Esto puede tener efectos no deseados si la red
  se inicializa para el ambiente equivocado. Opcionalmente, puede
  establecer el valor inicial del esquema con la opcin de inicio
  SCHEME; consulte la seccin `` Opciones de Inicio'' para ms detalles.
  Tambin es posible establecer el esquema desde el prompt de inicio de
  lilo.  Debido a que lilo pasa opciones desconocidas a init como
  variables de entorno, un valor destinado a SCHEME (o cualquier otra
  opcin de inicio de PCMCIA) en el prompt de inicio se propagar al
  script de inicio PCMCIA.

  Para ahorrarse tecleo, los esquemas pueden ser especificados en el
  archivo de configuracin de lilo. Por ejemplo, puede tener:



              root = /dev/hda1
              read-only
              image = /boot/vmlinuz
                label  = casa
                append = "SCHEME=casa"
              image = /boot/vmlinuz
                label  = trabajo
                append = "SCHEME=trabajo"




  As, al teclear casa o trabajo en el prompt de inicio arrancar con el
  esquema PCMCIA apropiado.


  5.3.  Arranque desde un dispositivo PCMCIA


  Tener el sistema de archivos raz en un dispositivo PCMCIA es algo
  difcil porque el sistema PCMCIA de Linux no est diseado para ser
  enlazado dentro del kernel. Sus componentes principales, los mdulos
  cargables del kernel y el demonio cardmgr dependen de un sistema que
  ya est ejecutndose. La funcionalidad initrd del kernel sortea esta
  limitacin permitiendo a Linux iniciar utilizando un disco ram
  temporal como una imagen raz mnima, cargar los controladores, y
  remontar entonces un sistema de archivos raz diferente. La raz
  temporal puede configurar dispositivos PCMCIA y luego remontar un
  dispositivo PCMCIA como raz.

  La imagen initrd de residir en un dispositivo arrancable
  obligatoriamente;  lo que implica no puede tratarse de un dispositivo
  PCMCIA. Esta es una limitacin de BIOS, no del kernel. Aqui es til
  distinguir entre dispositivos arrancables (es decir, dispositivos
  desde los que se puede iniciar), y dispositivos root-ables (es decir,
  dispositivos origen, que son montados como raz). Los dispositivos
  arrancables se determinan por BIOS, y estn limitados generalmente a
  discos flexibles internos y unidades de disco duro. La funcionalidad
  initrd permite disponer de ms dispositivos origen, no de ms
  dispositivos arrancables.

  Algunas distribuciones de Linux permitirn la instalacin a un
  dispositivo conectado a un adaptador SCSI PCMCIA, como un efecto
  lateral involuntario de su soporte para instalar desde unidades de CD-
  ROM SCSI PCMCIA. Sin embargo, en la actualidad, no hay herramientas de
  instalacin de Linux que soporten el configurar una imagen initrd
  apropiada para iniciar Linux con un sistema de archivos raz PCMCIA.
  Configurar un sistema con raz PCMCIA de este modo requiere que se use
  otro sistema Linux para crear la imagen initrd. Si no tiene otro
  sistema Linux disponible, una opcin podra ser instalar temporalmente
  una configuracin mnima en una unidad no PCMCIA, crear una imagen
  initrd, y luego reinstalar en el dispositivo PCMCIA destino.

  El Linux Bootdisk-HOWTO contiene informacin general acerca de la
  configuracin de discos de inicio pero nada especfico de initrd.  El
  documento principal de initrd se incluye con las distribuciones
  recientes del cdigo fuente del kernel, en
  linux/Documentation/initrd.txt. Antes de empezar, debera leer este
  documento. Es de utilidad estar familiarizado con lilo. El uso de
  initrd tambin requiere que tenga un kernel compilado con
  CONFIG_BLK_DEV_RAM y CONFIG_BLK_DEV_INITRD activados.

  Esta es una tcnica de configuracin avanzada, y requiere un alto
  nivel de familiaridad con Linux y el sistema PCMCIA. Asegrese de leer
  toda la documentacin relevante antes de empezar. Las siguientes
  recetas deberan funcionar, pero las derivaciones de los ejemplos le
  pondrn rpidamente en un territorio desconocido y no soportado; y
  estar solo.

  Este mtodo requiere obligatoriamente que se use una versin del
  controlador PCMCIA 2.9.5 o posterior. Los paquetes PCMCIA antiguos o
  los componentes individuales no funcionarn en el contexto initrd. No
  mezcle componentes de diferentes versiones.


  5.3.1.  El script pcinitrd


  El script pcinitrd crea una imagen bsica para iniciar con una
  particin raz PCMCIA. La imagen incluye una jerarqua de directorios
  mnima, algunos archivos de dispositivos, unos cuantos binarios,
  bibliotecas compartidas, y un conjunto de mdulos controladores
  PCMCIA.  Cuando se invoca pcinitrd, especifique los mdulos
  controladores que busca que se incluyan en la imagen. Los componentes
  principales de PCMCIA, pcmcia_core y ds, se incluyen automticamente.

  Como ejemplo, digamos que su porttil usa un controlador compatible
  con i82365, y quiere iniciar Linux con el sistema de archivos raz en
  un disco duro conectado a un adaptador Adaptec SlimSCSI. Podra crear
  una imagen initrd apropiada con:



              pcinitrd -v initrd pcmcia/i82365.o pcmcia/aha152x_cs.o




  Para personalizar la secuencia de inicio de initrd, podra montar la
  imagen usando el dispositivo loopback con un comando como:



              mount -o loop -t ext2 initrd /mnt




  y luego editar el script linuxrc. Los archivos de configuracin se
  instalarn bajo /etc en la imagen, y tambin puede personalizarse.
  Consulte la pgina del manual de pcinitrd para mayor informacin.





  5.3.2.  Creacin de un disquete de inicio initrd


  Despus de crear una imagen con pcinitrd, puede crear un disquete de
  inicio copiando el kernel, la imagen initrd comprimida, y algunos
  archivos de soporte para lilo a un disquete limpio. En el ejemplo
  siguiente, asumimos que el dispositivo raz PCMCIA deseado es
  /dev/sda1:



              mke2fs /dev/fd0
              mount /dev/fd0 /mnt
              mkdir /mnt/etc /mnt/boot /mnt/dev
              cp -a /dev/fd0 /dev/sda1 /mnt/dev
              cp [kernel-image] /mnt/vmlinuz
              cp /boot/boot.b /mnt/boot/boot.b
              gzip < [initrd-image] > /mnt/initrd




  Genere un fichero /mnt/etc/lilo.conf que contenga:



              boot=/dev/fd0
              compact
              image=/vmlinuz
                  label=linux
                  initrd=/initrd
                  read-only
                  root=/dev/sda1




  Finalmente, invoque a lilo con:



              lilo -r /mnt




  Cuando lilo es invocado con -r, realiza todas las acciones tomando
  como directorio raz el especificado. La razn para crear los archivos
  de dispositivo bajo /mnt/dev es que lilo no podr usar esos archivos
  en /dev cuando se ejecute con este directorio raz alternativo.


  5.3.3.  Instalacin de una imagen initrd  en una unidad no-Linux


  Un uso comn de la funcionalidad initrd puede darse en sistemas donde
  el disco duro interno est dedicado a otro sistema operativo. El
  kernel de Linux y la imagen initrd pueden ponerse en una particin no-
  Linux, y lilo o LOADLIN pueden configurarse para iniciar Linux desde
  esas imgenes.

  Asumiendo que tiene un kernel que se ha configurado para el
  dispositivo raz apropiado, y una imagen initrd creada en otro
  sistema, la forma ms fcil de iniciar Linux es utilizando LOADLIN,
  como:

              LOADLIN <kernel> initrd=<imagen-initrd>




  Una vez que pueda iniciar Linux en su mquina destino, puede instalar
  lilo para permitir que Linux se inicie directamente. Por ejemplo,
  digamos que /dev/hda1 es la particin no-Linux destino y /mnt puede
  usarse como un punto de montaje. Primero, genere un subdirectorio en
  el destino para los archivos de Linux:



              mount /dev/hda1 /mnt
              mkdir /mnt/linux
              cp [imagen-del-kernel] /mnt/linux/vmlinuz
              cp [imagen-initrd] /mnt/linux/initrd




  En este ejemplo, digamos que /dev/sda1 es la particin raz de Linux
  deseada, en un disco duro SCSI montado va un adaptador PCMCIA SCSI.
  Para instalar lilo, genere un archivo lilo.conf que contenga:



              boot=/dev/hda
              map=/mnt/linux/map
              compact
              image=/mnt/linux/vmlinuz
                      label=linux
                      root=/dev/sda1
                      initrd=/mnt/linux/initrd
                      read-only
              other=/dev/hda1
                      table=/dev/hda
                      label=windows




  La lnea boot= dice que se instale el cargador de inicio en el MBR
  (master boot record) del dispositivo especificado. La lnea root=
  identifica el sistema de archivos raz deseado a usar despus de
  cargar la imagen initrd, que puede resultar innecesario si la imagen
  del kernel ya se encuentra configurada de esta forma. La seccin
  other= se usa para describir el otro sistema operativo instalado en
  /dev/hda1.

  Para instalar lilo en este caso, teclee:



              lilo -C lilo.conf




  Ntese que en este caso, el archivo lilo.conf usa rutas absolutas que
  incluyen /mnt. Hice esto en el ejemplo porque el sistema de archivos
  destino puede no soportar la creacin de archivos de dispositivos para
  las opciones boot= y root=.



  6.  Problemas con tarjetas no soportadas



  6.1.  Configuracin de tarjetas no reconocidas


  Asumiendo que su tarjeta est soportada por algn controlador
  existente, todo lo que se necesita hacer es aadir una entrada a
  /etc/pcmcia/config para decirle a cardmgr cmo identificar la tarjeta,
  y qu controlador(es) necesitan ser asociados a esta tarjeta.
  Consulte la pgina del manual de pcmcia para ms informacin acerca
  del formato del archivo de configuracin. Si inserta una tarjeta
  desconocida, cardmgr normalmente almacenar parte de informacin de la
  identificacin en el registro del sistema, lo cual puede usarse para
  elaborar la entrada de configuracin. Esta informacin puede mostrarse
  tambin con el comando cardctl ident.

  He aqu un ejemplo de cmo avisa cardmgr de una tarjeta no soportada
  en /usr/adm/messages



         cardmgr[460]: unsupported card in socket 1
         cardmgr[460]: product info: "MEGAHERTZ", "XJ2288", "V.34 PCMCIA MODEM"
         cardmgr[460]: manfid: 0x0101, 0x1234  function: 2 (serial)




  La entrada correspondiente en /etc/pcmcia/config podra ser:



              card "Megahertz XJ2288 V.34 Fax Modem"
                version "MEGAHERTZ", "XJ2288", "V.34 PCMCIA MODEM"
                bind "serial_cs"




  o usar los cdigos de ID ms compactos del producto:



              card "Megahertz XJ2288 V.34 Fax Modem"
                manfid 0x0101, 0x1234
                bind "serial_cs"





  Puede usar * para comparar cadenas que no necesiten concordar
  exactamente, como los nmeros de versin. Cuando haga nuevas entradas
  en la configuracin, hay que ser cuidadosos para copiar las cadenas
  exactamente, preservando maysculas y minsculas, y espacios en
  blanco.  Asegrese tambin de que la entrada en la configuracin tiene
  el msmo nmero de cadenas que aparecen en el archivo de registro.

  Tenga en cuenta que puede especificar cualquier controlador para una
  tarjeta, pero si slo est dando palos de ciego, no hay mucha razn
  para esperar que esto resulte productivo. Puede tener suerte y
  encontrar que su tarjeta est soportada por un controlador existente.
  Sin embargo, el resultado ms probable es que el controlador no
  funcione, y puede tener efectos laterales desafortunados como el
  congelamiento de su sistema. A diferencia de la mayora de los
  controladores de dispositivos, los cuales comprueban la pressencia de
  la tarjeta apropiada, el sondeo para un dispositivo PCMCIA se hace con
  cardmgr, y el controlador por s mismo puede no verificar antes de
  intentar comunicarse con el dispositivo.

  Despus de editar /etc/pcmcia/config, enve una seal a cardmgr para
  recargar el archivo con:



              kill -HUP `cat /var/run/cardmgr.pid`




  Si configura una entrada para una tarjeta nueva, por favor, enveme
  una copia para que pueda incluirla en el archivo de configuracin
  estndar.


  6.2.  Soporte para una tarjeta ethernet compatible con NE2000


  Antes de empezar: este procedimiento slo funcionar para tarjetas
  ethernet simples. Las tarjetas multifuncin (por ejemplo, las tarjetas
  combo ethernet/mdem) tienen una capa extra de complejidad en
  relacin a cmo estn integradas las dos funciones, y generalmente no
  pueden soportarse sin obtener algo de informacin de la configuracin
  provista por el fabricante de la tarjeta. Usar el procedimiento
  siguiente con una tarjeta multifuncin no resultar productivo en
  absoluto.

  Primero, compruebe si la tarjeta es reconocida por cardmgr. Algunas
  tarjetas que no estn listadas en SUPPORTED.CARDS son realmente
  versiones OEM de tarjetas que s estn soportadas. Si encuentra una
  tarjeta como sta, hgamelo saber para que pueda aadirla a la lista.

  Si su tarjeta no es reconocida, siga las instrucciones en la seccin
  ``Configuracin de tarjetas no reconocidas'' para crear una entrada en
  la configuracin para su tarjeta, y relacionar la tarjeta con el
  controlador pcnet_cs. Reinicie cardmgr para utilizar el archivo de
  configuracin actualizado.

  Si el controlador pcnet_cs dice que no puede determinar la direccin
  ethernet del hardware de la tarjeta, edite su nueva entrada en la
  configuracin para relacionar la tarjeta con el controlador de memoria
  memory_cs. Reinicie cardmgr para utilizar el nuevo archivo de
  configuracin actualizado. Necesitar conocer la direccin ethernet
  del hardware de la tarjeta. Esta direccin es una serie de seis
  nmeros hexadecimales de dos dgitos, impresos normalmente en la misma
  tarjeta. Si no estn impresos en la tarjeta, puede usar un controlador
  de DOS para mostrar la direccin. En cualquier caso, una vez que la
  sepa, ejecute:



              dd if=/dev/mem0a count=20 | od -Ax -t x1




  y busque el volcado de informacin de su tarjeta. Slo los bytes pares
  estn definidos, as que ignore los bytes impares del volcado. Anote
  el desplazamiento hexadecimal del primer byte de la direccin. Ahora,
  edite clients/pcnet_cs.c y busque la estructura hw_info.  Necesitar
  crear una nueva entrada para la tarjeta. El primer campo es el
  desplazamiento de memoria. Los siguientes tres campos son los primeros
  tres bytes de la direccin de hardware. El campo final contiene
  algunos indicadores de caractersticas especiales de la tarjeta; para
  empezar, pruebe establecindola a 0.

  Despus de editar pcnet_cs.c, compile e instale el nuevo mdulo.
  Edite nuevamente /etc/pcmcia/config/, y cambie la relacin de
  memory_cs con pcnet_cs. Siga las instrucciones para recargar el
  archivo de configuracin, y habr terminado. Por favor mndeme copias
  de sus nuevas entradas de configuracin a hw_info.

  Si no puede encontrar la direccin hardware de su tarjeta en el
  vaciado hexadecimal, como un ltimo recurso, puede forzar la
  direccin cuando se inicializa el mdulo pcnet_cs. Edite
  /etc/pcmcia/config.opts y aada una opcin hw_addr, como esta:



              module "pcnet_cs" opts "hw_addr=0x00,0x80,0xc8,0x01,0x02,0x03"




  Por supuesto, sustituya su propia direccin de hardware de la tarjeta
  en el punto apropiado. Tenga en cuenta que si ha tenido que hacer
  esto, es muy difcil que su tarjeta sea genuinamente compatible con
  NE2000. De hecho, no estoy seguro de la existencia de tarjetas que no
  sean manejadas por alguno de los dos primeros mtodos.


  6.3.  Tarjetas PCMCIA para unidades de disquete


  La interfaz para disquete PCMCIA que se usa en los Compaq Aero y otros
  equipos todava no est soportada por este paquete. La dificultad para
  soportar el disquete Aero radica en que el Aero parece usar un
  controlador PCMCIA personalizado para soportar DMA en el disquete. Sin
  saber exctamente cmo se hace esto, no hay forma de implementar
  soporte bajo Linux.

  Si la tarjeta del adaptador de disquete est presente cuando se
  inicia, la BIOS configurar la tarjeta, y Linux la identificar como
  una unidad de disquete normal. Cuando se cargan los controladores
  PCMCIA de Linux, notarn que la tarjeta ya est configurada y
  conectada al controlador de Linux, y este socket se dejar solo. As
  que, la unidad puede usarse si est presente al momento de iniciar,
  pero la tarjeta no se puede intercambiar en caliente.


  6.4.  Qu hay de las tarjetas Xircom?


  El paquete actual PCMCIA incluye un controlador para las tarjetas
  ethernet y ethernet/modem de Xircom, gracias al trabajo de Werner
  Koch. He dispuesto un foro especialmente para la discusin del
  desarrollo del controlador Xircom, en
  http://hyper.stanford.edu/HyperNews/get/pcmcia/xircom.html.

  Durante mucho tiempo, las tarjetas Xircom no fueron soportadas porque
  Xircom tena como poltica de la compaa no divulgar informacin
  tcnica acerca de sus tarjetas. Sin embargo, han modificado sus
  reglas, y ahora, distribuyen informacin de los controladores...



  7.  Trucos para depurar e informacin de programacin



  7.1.  Envo de informes de bugs  que son de utilidad


  La mejor forma de informar de bugs es usar las listas de mensajes de
  HyperNews en el servidor web de Linux PCMCIA. De este modo, otras
  personas podrn ver los problemas actuales (y reparaciones o trabajos
  relacionados, si estn disponibles). He aqui algunas cosas que se
  deben incluir en los informes de bugs:


    El tipo de sistema, y la salida del comando probe.

    Qu tarjetas PCMCIA est usando.

    Su versin del kernel de Linux, y la versin del controlador
     PCMCIA.

    Cualquier cambio que haya hecho a los archivos de inicio en
     /etc/pcmcia, o al script de inicio de PCMCIA.

    Todos los mensajes relacionados con PCMCIA en el registro de su
     sistema.

  Todos los mdulos PCMCIA y el demonio cardmgr envan mensajes de
  estado al registro del sistema, que estar normalmente en sitios como
  /var/log/messages o /usr/adm/messages. Este archivo debe ser el primer
  lugar a comprobar cuando se est rastreando un problema.  Cuando enve
  una notificacin de bug, incluya siempre el contenido de este archivo.
  Si tiene problemas para encontrar los mensajes de su sistema, revise
  /etc/syslog.conf para ver cuantas clases diferentes de mensajes se
  manejan.

  Antes de enviar una notificacin de bug, por favor asegrese que no
  est usando una copia obsoleta del paquete de controladores. Aunque
  resulte gratificante leer informes sobre un bug que ya he reparado, no
  supone un uso particularmente constructivo de mi tiempo.

  Si no tiene acceso a web, puede enviarme los informes de bugs a
  dhinds@hyper.stanford.edu. Sin embargo, prefiero que sean introducidos
  en mi servidor web, as pueden ser vistos por otros.


  7.2.  Interpretacin de los informes generados por los traps  del ker
  nel


  Si su problema incluye un fallo del kernel, el vaciado del registro
  del fallo slo es til si puede traducir la direccin del error, EIP,
  o algo semejante. Las versiones recientes de klogd intentan traducir
  las direcciones de fallos basndose en el mapa actual de smbolos del
  kernel, pero puede que no funcione si el error se produce en un
  mdulo, o si el problema es lo bastante severo como para que que klogd
  no pueda terminar de escribir la informacin del fallo en el registro
  del sistema.

  Si se localiza en el kernel principal, la direccin de fallo puede
  encontrarse en el archivo System.map. El cual puede estar instalado en
  /System.map o en /boot/System.map. Si est en un mdulo, el comando nm
  proporciona la misma informacin; sin embargo, la direccin del fallo
  necesita ajustarse basndose en la direccin de carga del mdulo.
  Digamos que experimenta el siguiente fallo del kernel:

              Unable to handle kernel NULL pointer dereference
              current->tss.cr3 = 014c9000, %cr3 = 014c9000
              *pde = 00000000
              Oops: 0002
              CPU:    0
              EIP:    0010:[<c2026081>]
              EFLAGS: 00010282




  La direccin de fallo es 0xc2026081. Si buscamos en System.map, vemos
  que esto est ms all de los lmites del kernel, por ejemplo, es un
  mdulo del kernel. Para determinar qu mdulo, revise la salida de
  ksyms -m | sort



              Address   Symbol                            Defined by
              c200d000  (35k)                             [pcmcia_core]
              c200d10c  register_ss_entry                 [pcmcia_core]
              c200d230  unregister_ss_entry               [pcmcia_core]
                        ...
              c2026000  (9k)                              [3c574_cs]
              c202a000  (4k)                              [serial_cs]




  As, 0xc2026081 est en el mdulo 3c574_cs con un desplazamiento de
  0x0081 desde el inicio del mdulo. Todava no podemos ver ms all de
  este desplazamiento en 3c574_cs.o: cuando el kernel carga un mdulo,
  inserta un encabezado en la direccin de carga del mismo, as el
  inicio real se desplaza desde la direccin mostrada en ksyms.  El
  tamao del encabezado vara con la versin del kernel:  para encontrar
  el tamao en su kernel, busque un mdulo que exporte smbolos (como
  pcmcia_core), y compare la direccin del smbolo con la salida de nm
  para ese mismo smbolo. En este ejemplo, register_ss_entry se carga
  con un desplazamiento de 0xc200d10c - 0xc200d000 = 0x010c, mientras
  que nm pcmcia_core.o muestra el desplazamiento como 0x00c0, as que el
  tamao del encabezado es 0x010c - 0x00c0 = 0x004c bytes.

  Regresando a 3c574_cs.o, nuestro desplazamiento de fallo es 0x0081, y
  restando el encabezado 0x004c, el desplazamiento real del mdulo es
  0x0035. Ahora comprobando el resultado de un nm 3c574_cs.o | sort,
  observamos:



         0000002c d if_names
         0000002c t tc574_attach
         00000040 d mii_preamble_required
         00000041 d dev_info




  El fallo se localiza en tc574_attach().

  En este ejemplo, el fallo no caus un congelamiento total del sistema,
  as que ksyms puede ejecutarse despus de haber tenido lugar el fallo.
  En otros casos, puede que tenga que deducir indirectamente las
  direcciones de carga del mdulo. La misma secuencia de eventos cargar
  normalmente los mdulos en el mismo orden y en las mismas direcciones.
  Si se produce un fallo cuando se inserta cierta tarjeta, obtenga la
  salida de ksyms antes de insertar la tarjeta, o con una tarjeta
  diferente insertada. Puede cargar manualmente los mdulos
  controladores de la tarjeta con insmod y ejecutar ksyms antes de
  insertarla.

  Para profundizar, consulte man insmod, man ksyms, y man klogd. En el
  rbol de los fuentes del kernel, Documentation/oops-tracing.txt
  tambin es relevante. He aqu unas cuantas pistas para depurar el
  kernel:


    Dependiendo del error, puede ser til traducir direcciones en el
     Trazado de llamadas, usando el mismo procedimiento para la
     direccin de error principal.

    Para diagnosticar un congelamiento silencioso, pruebe provocar el
     problema con X desactivado, porque los mensajes del kernel se
     envan a la consola en texto, y no sern visibles bajo X.

    Si mata a klogd muchos de los mensajes del kernel harn eco
     directamente a la consola de texto, el cual puede ser til si el
     problema impide a klogd escribir en el registro del sistema.

    Para hacer que todos los mensajes del kernel se enven a la
     consola, para kernels 2.1.x, si existe /proc/sys/kernel/printk,
     hacer:



              echo 8 > /proc/sys/kernel/printk





    La combinacin de teclas <RightAlt><ScrLk> imprime un vaciado del
     registro en la consola de texto. Esto puede funcionar en caso de
     que el sistema est o no completamente sin responder, y la
     direccin EIP puede interpretarse como fallo del kernel.

    Para los kernels 2.1.x configurados con CONFIG_MAGIC_SYSRQ
     activado, se pueden activar varias funciones de emergencia por
     medio de las combinaciones especiales de las teclas <Alt><SysRq>,
     que estn documentadas en Documentation/sysrq.txt dentro del rbol
     de los fuentes del kernel.


  7.3.  Primeros auxilios al depurar a bajo nivel


  Los mdulos PCMCIA contienen bastante cdigo de depuracin compilado
  de forma condicional. La mayor parte de este cdigo est bajo el
  control de las definiciones del preprocesador de PCMCIA_DEBUG. Si no
  est definido, el cdigo de depuracin no se compilar. Si se
  establece a 0, se compilar pero no estar activo. Los nmeros mayores
  especifican el incremento del nivel de detalle del registro. Cada
  mdulo compilado con PCMCIA_DEBUG definido tendr un parmetro entero,
  pc_debug, que controla el nivel de detalle de su salida. Esto puede
  ajustarse cuando se carga el mdulo, as la salida puede controlarse
  en base a cada mdulo sin necesidad de recompilar.

  Su configuracin por omisin para syslogd puede descartar los mensajes
  de depuracin del kernel. Para asegurarse de que se estn registrando,
  edite /etc/syslog.conf y compruebe que los mensajes kern.debug se
  registren en algn lugar. Consulte man syslog.conf para ms detalles.


  Hay algunas herramientas de depuracin en el subdirectorio debug_tools
  dentro de la distribucin de PCMCIA. Las utilidades dump_tcic y
  dump_i365 generan volcados completos de los controladores PCMCIA, y
  decodifican mucha de la informacin del registro.  Son tiles si tiene
  acceso a una hoja con los datos del chip controlador correspondiente.
  El comando dump_cis (dump_tuples en las distribuciones pre-3.0.2)
  lista el contenido de la CIS (Card Information Structure) (Estructura
  de Informacin de Tarjeta), y decodifica algunos bits importantes.
  dump_cisreg muestra los registros de configuracin local de una
  tarjeta.

  El controlador de tarjetas de memoria memory_cs a veces tambin es
  til para depurar problemas con PC Cards de 16 bits. Puede utilizarse
  con cualquier tarjeta, y no interfiere con otros controladores. Puede
  usarse para acceder directamente a los atributos de memoria o memoria
  comn de cualquier tarjeta. De igual modo, con las tarjetas CardBus,
  el controlador memory_cb puede utilizarse con cualquier tarjeta de 32
  bits, para dar acceso directo a los espacios de direcciones de esa
  tarjeta. Revise las pginas del manual para ms informacin.


  7.4.  /proc/bus/pccard


  A partir de los kernels 2.1.103, el paquete PCMCIA crea un rbol de
  informacin de estado bajo /proc/bus/pccard. La entrada memory muestra
  las posiciones de memoria para dispositivos PC Card en un formato
  similar a /proc/ioports. Cada socket tiene tambin su propio
  subdirectorio de entradas de estado. La entrada info identifica el
  controlador del host y describe sus caractersticas. La entrada exca
  es un volcado del registro ExCA compatible con Intel i82365sl que se
  configura para ese socket. Para los puentes CardBus, la entrada pci es
  el volcado del espacio de la configuracin PCI del puente, y la
  entrada cardbus es el vaciado de los registros de configuracin de
  CardBus.


  7.5.  Programacin de controladores de servicios PCMCIA para nuevas
  tarjetas


  El Linux PCMCIA Programmer's Guide constituye la mejor documentacin
  acerca de la interfaz de los controladores. La ltima versin estar
  siempre disponible en hyper.stanford.edu en /pub/pcmcia/doc, o va WWW
  en http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html.

  Con los dispositivos relativamente similares a los dispositivos ISA
  normales, probablemente pueda Vd. usar parcialmente controladores
  Linux existentes. En algunos casos, el tropiezo ms grande ser
  modificar un controlador existente que pueda manejar la insercin y
  extraccin de dispositivos despus del momento de iniciar. De los
  controladores actuales, el controlador de tarjeta de memoria es el
  nico controlador autnomo, que no depende de otras partes del kernel
  de Linux para hacer la mayor parte del trabajo sucio.

  En muchos casos, el mayor impedimento para soportar un nuevo tipo de
  tarjeta es el obtener informacin tcnica por parte del fabricante.
  Puede ser difcil el encontrar a quin preguntar, o a quien explicar
  que informacin se necesita. Sin embargo, con pocas excepciones, es
  muy difcil, si no imposible, el implementar un controlador para una
  tarjeta sin informacin tcnica por parte del fabricante.

  He escrito un controlador modelo con muchos comentarios que explican
  bastante cmo el controlador se comunica con los Servicios de
  Tarjetas; lo encontrar en la distribucin fuente de PCMCIA en
  clients/dummy_cs.c.
  7.6.  Sugerencias para los autores de controladores PCMCIA


  He decidido que no es realmente factible para mi el distribuir todos
  los controladores de PCMCIA como parte del paquete PCMCIA. Cada
  controlador nuevo hace que el paquete principal sea incrementalmente
  ms dificil de mantener, e incluir un controlador inevitablemente
  transfiere algo del trabajo de mantenimiento del autor del controlador
  hacia m. En lugar de ello, decidir caso por caso si se incluyen o no
  los controladores que sean contribuciones, basndome en la demanda de
  los usuarios y tambin en la facilidad de mantenerlos. Para los
  controladores que no se incluyen en el paquete principal, sugiero que
  los autores de los controladores adopten el esquema siguiente para
  empaquetar sus controladores de cara a su distribucin.

  Los archivos controladores deben acomodarse en el mismo esquema del
  directorio que utiliza la distribucin fuente de PCMCIA, as el
  controlador puede ser desempaquetado en la parte ms alta del rbol de
  los fuentes de PCMCIA. Debe incluir los archivos fuentes (en
  ./modules/), una pgina del manual (en ./man/), y los archivos de
  configuracin (en ./etc/ ). El directorio ms alto debe incluir
  tambin un archivo README.

  El directorio de ms alto nivel debe incluir un makefile, configurado
  para que make -f ... all y make -f ... install compilen el controlador
  e instalen los archivos apropiados. Si este archivo tiene una
  extensin .mk, ser invocado automticamente por el Makefile de ms
  alto nivel para los destinos all e install. He aqu un ejemplo de cmo
  debe elaborarse un Makefile:



              # Un simple Makefile para un controlador de contribucin
              FILES = sample_cs.mk README.sample_cs \
                      modules/sample_cs.c modules/sample_cs.h \
                      etc/sample etc/sample.opts man/sample_cs.4
              all:
                      $(MAKE) -C modules MODULES=sample_cs.o
              install:
                      $(MAKE) -C modules install-modules MODULES=sample_cs.o
                      $(MAKE) -C etc install-clients CLIENTS=sample
                      $(MAKE) -C man install-man4 MAN4=sample_cs.4
              dist:
                      tar czvf sample_cs.tar.gz $(FILES)




  Este Makefile usa los destinos de instalacin que se definen en la
  versin 2.9.10 y versiones posteriores del paquete PCMCIA. Este
  makefile tambin incluye un destino dist para conveniencia del autor
  del controlador.  Probablemente desee aadir un nmero de versin al
  final del nombre del paquete (por ejemplo, sample_cs-1.5.tar.gz). Una
  distribucin completa puede ser similar a:



              sample_cs.mk
              README.sample_cs
              modules/sample_cs.c
              modules/sample_cs.h
              etc/sample
              etc/sample.opts
              man/sample_cs.4


  De esta forma, cuando un controlador de contribucin se desempaquete,
  se convierte en parte esencial del rbol de los fuentes de PCMCIA.
  Puede hacer uso de los archivos de encabezados de PCMCIA, as como
  tambin de la maquinaria para comprobar la configuracin del sistema
  del usuario, y chequeo automtico de dependencias, tal y como un
  controlador normal.

  Aceptar controladores preparados de acuerdo a esta especificacin y
  los colocar en el directorio /etc/pcmcia/contrib en mi servidor FTP,
  hyper.stanford.edu. El archivo README en este directorio describir
  cmo desempaquetar un controlador de contribucin.

  La interface de controlador no ha cambiado mucho a pesar del tiempo, y
  ha preservado casi siempre su compatibilidad con las versiones
  anteriores. Un controlador normalmente no necesitar actualizarse para
  revisiones menores en el paquete principal. Tratar de notificar a los
  autores de los controladores externos de los cambios que se requiera
  realizar a sus controladores.


  7.7.  Sugerencias para encargados de las distribuciones de Linux


  Si su distribucin tiene herramientas para configuracin del sistema
  que quiera que sean compatibles PCMCIA, por favor, use los archivos
  *.opts en /etc/pcmcia para su integracin. Dichos archivos no sern
  modificados si un usuario compila e instala una nueva versin del
  paquete PCMCIA. Si modifica los scripts principales de configuracin,
  una instalacin fresca sobreescribir silenciosamente sus scripts
  personalizados y romper la conexin con sus herramientas de
  configuracin. Contacte conmigo si no est seguro de cmo escribir un
  script de opciones apropiado, o si necesita caractersticas
  adicionales.

  Resulta muy til para los usuarios (y para mi) que documente cmo
  deriva su distribucin del paquete PCMCIA que se describe en este
  documento. En particular, por favor documente los cambios al script de
  inicio y a los scripts de configuracin. Si me manda la informacin
  apropiada, la incluir en la seccin ``Notas acerca de distribuciones
  de Linux especficas''.

  Cuando construya una distribucin PCMCIA, considere el incluir los
  controladores aportados, que no son parte del paquete PCMCIA
  principal.  Por razones de mantenimiento, estoy tratando de limitar el
  tamao del paquete principal, aadiendo solamente controladores nuevos
  si considero que son de inters general. Los dems controladores se
  distribuirn por separado, como se describe en la seccin anterior. La
  divisin entre controladores generales y separados es algo arbitraria
  y en parte histrica, y no debera implicar diferencia alguna en
  cuanto a calidad.


  8.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En lla encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.















































Muchas ms traducciones!!
  Linux PPP HOWTO
  Al Longyear, longyear@netcom.com.
  (INSFLUG), ragundo@bitmailer.net
  v1.0, 9 Marzo 1996

  Este documento contiene una lista con las preguntas ms habituales
  (FAQ, o PUF, Preguntas de Uso Frecuente, en castellano)  sobre PPP
  para Linux (junto con sus respuestas). No es realmente un Como, pus
  se adapta ms al formato clsico de Pregunta/Respuesta de las PUF.
  ______________________________________________________________________

  ndice General:

  1.      Prefacio.

  2.      Informacin general

  2.1.     Qu es PPP ?.

  2.2.    Mi universidad ( o compaa ) no soporta PPP.  Puedo usar PPP
  ?.

  2.3.     Dnde se encuentra PPP?.

  2.4.    Acabo de conseguir el paquete PPP.  Qu hago con l ?.

  2.5.     (Dnde est la documentacin ?.  Hay un HOWTO ?, etc.). 
  Dnde puedo conseguir documentacin adicional sobre PPP ?.

  2.6.     Podra alguien enviarme scripts para PPP, de tal manera que
  pueda comprender cmo se han escrito ?.

  2.7.     Dnde debo preguntar para resolver mis posibles dudas sobre
  PPP?.

  2.8.    Mi software PPP no funciona.  Qu hago ?.

  2.9.     Cmo debo usar PPP con un sistema remoto que usa asignacin
  dinmica de direcciones IP ?.  Cada vez que conecto obtengo una
  direccin IP distinta !!!.

  2.10.    Cmo puedo saber que direccin IP me ha sido asignada cuando
  se usa asignacin dinmica de direcciones ?.

  2.11.    Puedo usar la misma direccin IP local para todas las lneas
  de un servidor PPP?.

  3.      Otras implementaciones.

  3.1.     Existen otras implementaciones de PPP distintas a la de
  Linux ?. Me gustara saber si existe alguna para HP-UX o AIX o ...

  3.2.     Existe un programa llamado dp  ?.

  3.3.     Cules son los RFCs que describen el protocolo PPP ?.

  4.      Compatibilidad.

  4.1.     Puede PPP dialogar con un interface tipo SLIP ?.

  4.2.     Qu es mejor: usar PPP o SLIP ?.

  4.3.     Qu es mejor para la identificacin y verificacin: CHAP o
  PAP ?.

  5.      Ficheros de identificacin y verificacin.

  5.1.     Cul es el formato del fichero /etc/pap-secrets  ?.  Hay
  algn ejemplo disponible ?.

  5.2.     Cul es el formato del fichero /etc/chap-secrets  ?.  Hay
  algn ejemplo disponible ?.

  6.      Problemas de compilacin.

  6.1.    Hay errores cuando intento compilar el kernel.

  7.      Problemas al ejecutar pppd .

  7.1.    pppd  dice que la versin 0.0.0 est fuera de fecha.

  7.2.    pppd  dice que el kernel no est configurado para PPP. Pero yo
  estoy seguro de haber habilitado la opcin al recompilarlo.

  7.3.    pppd  no funciona a menos que sea root.

  7.4.    Obtengo el mensaje: unable to create pid file: no such file or
  directory .

  7.5.    Obtengo el mensaje: /etc/ppp/options: no such file or
  directory .

  7.6.    No puedo averiguar cul es mi direccin IP local.

  7.7.    No puedo averiguar la direccin IP remota.

  7.8.    Obtengo mensajes dicindome que el nmero mgico no es
  aceptado.

  7.9.    Obtengo un mensaje: protocol reject for protocol fffb .

  7.10.   El software PPP conecta con el sistema remoto, enva unas
  cuantos tramas, pero parece como si la conexin no fuese completa. 
  Qu significa esto ?.

  7.11.   El script /etc/ppp/ip-up  no funciona.

  7.12.   No puedo conectar con la red merit.

  8.      DIP

  8.1.    DIP no tiene soporte para ejecutar PPP.

  9.      Terminacin del proceso.

  9.1.     Existe un comando similar a dip -k  para PPP ?.

  9.2.    PPP no cuelga el mdem cuando termina.

  10.     Transferencia de datos.

  10.1.    En las transferencias con ftp, parece que la conexion muere
  cuando hago un put . Sin embargo, si hago get  funciona perfectamente.
   Qu ocurre ?.

  10.2.    Cmo debo usar el control de flujo XON/XOFF ?.

  10.3.    El mdem parece que conecta a velocidades extraas. Cuando
  uso  minicom , el mdem siempre usa 14400 bits/segundo. Sin embargo,
  PPP dice que est conectando a 9600, 7200 e incluso a 2400
  bits/segundo.  Cmo puedo corregir esto ?.
  10.4.   Cuando hago ftp, la operacin get  es muy lenta, pero la
  operacin put , sin embargo, es muy rpida.  Porqu ?.

  10.5.   La opcin proxyarp  no encuentra la direccin hardware.

  11.     Rutado y otros problemas.

  11.1.    Mi ruta al sistema remoto sigue desapareciendo !. Estuvo
  activa unos 3 minutos y ha vuelto a desaparecer.  Ayuda !.

  11.2.    Me gustara conectar los ordenadores de mi red a Internet
  usando PPP. Slo tengo una direccin IP que me es asignada por mi
  proveedor de servicios de conexin (incluso esa direccin IP es
  asignada dinmicamente).  Cmo puedo hacer esto ?.

  11.3.   Conecto con la mquina del sistema remoto, pero no puedo
  hacerlo con ninguna otra mquina de dicho sistema.

  11.4.   Tengo una ruta por defecto pero sigo sin poder acceder al
  resto de mquinas.  Y ahora que hago ?.

  11.5.   No puedo hacer ping  a mi direccin IP local.

  12.     Interaccin con otras implementaciones de PPP.

  12.1.   Estoy usando Trumpet (para MSDOS) y la conexin simplemente
  termina.  Porqu ocurre esto ?.

  12.2.   Estoy usando dp-3.1.2  (con SunOS) y el sistema no me permite
  hacer nada ms que ping  o nslookup .  Porqu ocurre esto ?.

  12.3.   No puedo conectar con/desde mi mquina con Windows NT.

  13.     Otros mensajes enviados al system log.

  13.1.   Alarm.

  13.2.   SIGHUP.

  13.3.   SIGINT.

  13.4.   Unknow protocol (c025) received .

  13.5.   Unknow protocol (80fd) received .

  13.6.   La conexin falla con errores como ioctl(TIOCGETD): I/O error
  o ioctl(PPPIOCSINPSIG): I/O error .

  13.7.   Ocurren errores del tipo ioctl(PPPIOCGDEBUG): I/O error ,
  ioctl(TIOCSETD): I/O error  o ioctl(TIOCNXCL): I/O error .  Porqu
  ocurre esto ?.

  13.8.   ifconfig  me proporciona una informacin extraa con PPP.

  13.9.   El fichero proc/net/dev  parece que esta vaco.

  13.10.  El kernel informa que los dispositivos PPP estn siendo
  "desactivados" cuando el sistema empieza a arrancar.

  13.11.  Acabo de comprobar que /proc/net/dev  no tiene ningn
  dispositivo PPP.  Donde estn ?.

  14.     Rutado con redes locales (usando PPP como un "bridge"
  econmico).

  14.1.   Slattach  e ifconfig  no funcionan como con SLIP.

  14.2.   Quiero definir una ruta a la red entera y no slo a un host de
  esa red.

  15.     Otras caractersticas y protocolos.

  15.1.    Existe soporte para demand dial  ?.

  15.2.    Existe soporte para filtrado ( filtering ) ?.

  15.3.    Existe soporte para IPX ?.

  15.4.    Existe soporte para NetBIOS ?.

  15.5.    Existe soporte para ISDN ?.

  15.6.    Existe soporte para multipuntos (multi-point) ?.

  15.7.    Existe soporte para PPP sncrono ?.

  16.     Miscelnea

  16.1.    Existe un lector de correo compatible con PPP ?.

  16.2.    Y un lector de news ?.

  17.     Preguntas sobre chat .

  17.1.   Mi mdem no marca cuando ejecuto chat .

  17.2.   El mdem solo marca en el segundo intento.

  17.3.   El script de chat  se para tras enviar el login al sistema
  remoto y nunca enva el password.

  18.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Prefacio.

  Si tiene alguna correccin sobre este documento, por favor,
  notifquesela a Al Longyear (longyear@netcom.com). Si tiene alguna
  correccin relativa a la traduccin, contacte con Rafael Agundo
  (ragundo@bitmailer.net).

  Este documento forma parte de los HOWTO y FAQs de Linux. Estos
  documentos pueden conseguirse va ftp en sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/> (este es el sitio
  oficial) o bien mediante WWW en la Linux Documentation home page
  <http://sunsite.unc.edu/mdw/linux.html>. No espere que este HOWTO
  aparezca publicado en comp.os.linux.answers, debido a problemas de
  espacio.

  A lo largo de este documento, se usa la palabra remoto para designar
  "el sistema que est al final del enlace a traves del mdem". En la
  documentacin sobre PPP suele aparecer tambin como peer.  Cuando se
  habla de rutado suele aparecer como gateaway. La direccin IP del
  sistema remoto aparecer como el campo direccin indistintamente el
  trmino ingls frame junto con sus equivalentes en castellano: trama o
  paquete.

  Microsoft es una marca registrada de Microsoft Corporation. Morning
  Star es una marca registrada de Morning Star Technologies. El resto de
  productos mencionados en este documento son marcas registradas de sus
  respectivas compaas.

  2.  Informacin general

  2.1.   Qu es PPP ?.

  PPP o Point-to-Point Protocol (Protocolo de Punto a Punto) est
  reconocido como uno de los protocolos oficiales de internet. Este
  protocolo se usa para intercambiar tramas IP (y de otro tipo) a travs
  de una lnea serial. El nmero de RFC para describir PPP es el 1661.
  No es el nico, hay otros muchos documentos relacionados con PPP.

  Contrariamente a lo que algunas personas piensan, PPP no significa
  "Peer to Peer Processing", aunque se pueda realizar una comunicacin
  peer to peer usando TCP/IP a traves de un enlace PPP.

  2.2.  Mi universidad ( o compaa ) no soporta PPP.  Puedo usar PPP
  ?.

  En general, no. Una implementacin clsica de PPP requiere cambios en
  las rutas y en los dispositivos conectados al sistema operativo. En
  definitiva, sera necesario volver a recompilar el kernel en el
  ordenador remoto.

  Obtener un nuevo kernel no es tarea para un usuario normal de un
  sistema.  Si puede convencer al administrador de su sistema de las
  ventajas de tener instalado soporte PPP, entonces puede ser que se
  instale dicho soporte. Si no es as, entonces no podr usar
  probablemente PPP.

  Sin embargo, si usted usa un sistema soportado por la compaa que
  est vendiendo el paquete adaptador TIA (The Internet Adapter),
  entonces puede ser que si pueda usar PPP. El autor de este HOWTO no
  tiene disponible mucha informacin sobre este paquete, sin embargo
  parece ser que ofrecer soporte PPP en su prxima versin. (Esta
  informacin puede estar ya anticuada, mejor contacte con ellos
  directamente. Para averiguar ms sobre TIA, puede visitar
  www.marketplace.com <http://www.marketplace.com/tia/tiahome>

  Actualmente ya existe una versin para Linux de este paquete.

  Si su sistema no est soportado por el paquete TIA, ni puede convencer
  a su administrador de sistema para que adopte PPP, entonces debera
  usar el paquete term. Algunos proveedores de servicios de conexin
  pueden ponerle trabas a utilizar term para conectar con sus sistemas.
  Hay varias razones para ello, pero la ms importante est referida a
  temas de 'seguridad'.

  Adems del paquete TIA, Danny Gasparovski ha escrito un programa
  llamado slirp, el cual realizar funciones similares al de TIA. Este
  programa, junto con su cdigo fuente, puede obtenerse mediante ftp
  <ftp://blitzen.canberra.edu.au/pub/slirp>

  Debera conseguir el cdigo fuente del programa si desea obtener una
  mejor informacin de cmo funciona.  La primera impresin es que el
  programa es una excelente alternativa al paquete comercial de TIA.

  2.3.   Dnde se encuentra PPP?.

  El paquete PPP est dividido en dos partes. La primera se encuentra en
  el kernel. A partir del kernel 1.1.13, el driver ya forma parte de los
  drivers de red del sistema.

  La segunda parte es el demonio (daemon) pppd. Este es un proceso
  obligatorio a ejecutar cuando quiera realizar una conexin PPP. El
  cdigo fuente para pppd se encuentra en el fichero ppp-2.2.0.tar.gz de
  sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/serial>

  La versin 2.2 de PPP y posteriores estn diseadas para ser
  utilizadas slo con versiones de kernel mayores o iguales que la 1.2.
  No utilize esta versin con versiones del kernel 1.1 o inferior, dado
  que tanto el cdigo de red, como el driver tty estn ya desfasados.

  2.4.  Acabo de conseguir el paquete PPP.  Qu hago con l ?.

  Read The Fine Material available.

  (--  ( Pequea broma del autor que sustituye el famoso trmino RTFM:
  Read The Fucked Manual, lea el jodido manual por RTFM: Read The Fine
  Material, lea los agradables manuales).  --)

  Comience por leer el fichero README y despus el fichero README.linux.
  Para ms fuentes de documentacin vea la siguiente pregunta.

  2.5.  puedo conseguir documentacin adicional sobre PPP ?.   (Dnde
  est la documentacin ?.  Hay un HOWTO ?, etc.).  Dnde

  Hay varias fuentes de informacin sobre la manera en que se ha
  implementado el protocolo PPP para Linux.

    El fichero README que viene junto con el paquete.

    El fichero README.linux que tambin viene junto con el paquete.

    El documento Net-2-HOWTO.

    La Network Administration Guide (NAG).

    La pgina man de pppd.

    La PPP FAQ. (Este HOWTO no lo es aunque lo parezca).

  El fichero HOWTO se encuentra en el lugar habitual para los HOWTOs de
  Linux.  Actualmente estn en sunsite.unc.edu
  <sunsite.unc.edu/pub/Linux/docs/HOWTO>.

  La Network Administration Guide (Guia de Administracin de Red ) puede
  obtenerse en sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/docs/LDP/network-guide>. Tambin est
  publicada en forma de libro impreso por la editorial O'Reilly and
  Associates <http://www.ora.com>. Si prefiere un documento profesional,
  bien impreso y encuadernado, consiga una copia del libro en su
  librera habitual.

  Las pginas man vienen includas junto con el cdigo fuente del
  paquete PPP.  Casi con seguridad, ser necesario moverlas al
  directorio habitual donde se sitan las pginas man, /usr/man/man8
  antes de que el comando man pueda encontrarlas. Tambin puede usar
  nroff y more para leerlas directamente.

  La PPP FAQ describe el protocolo PPP en general, junto con varias de
  sus implementaciones. La PPP FAQ puede encontrarse en el area de news
  comp.protocols.PPP y tambin archivada en rtfm.mit.edu
  <ftp://rtfm.mit.edu/pub/usenet>.  Actualmente, la PPP FAQ est
  dividida en 8 partes.

  2.6.  comprender cmo se han escrito ?.   Podra alguien enviarme
  scripts para PPP, de tal manera que pueda

  Existen unos pocos scripts que vienen incluidos con el cdigo fuente
  del paquete.  Estos ejemplos cubren los tipos de accesos ms normales
  que usted va a encontrar, accesos donde se conecta a una mquina UNIX
  que le va a pedir un login y un password.

  Con el cdigo fuente de pppd no vienen scripts especficos para
  conectar con un sistema en concreto. Si tiene problemas para conectar
  con dicho sistema, entonces debera pedir ayuda a alguien de su
  sistema y si no la encuentra, debera preguntar en el area local de
  news de su sistema.  Si, por ltimo, sigue sin poder encontrar ayuda,
  pregunte en el grupo adecuado de Linux en usenet (vea la siguiente
  pregunta).  Desafortunadamente, el autor no tiene tiempo para poder
  suministrar scripts para cada sistema en concreto.

  2.7.   Dnde debo preguntar para resolver mis posibles dudas sobre
  PPP?.

  El grupo adecuado de usenet para preguntar es comp.protocols.PPP o
  comp.os.linux.setup.  Use estos grupos para realizar preguntas del
  tipo: " Cmo debo usar pppd ?" o " Porqu no funciona esto ? ".

  Preguntas del estilo: " Porqu no consigo compilar pppd ?", son
  preguntas que debe dirigir al grupo comp.os.linux.networking.

  Por favor, no utilice para estas cuestiones comp.os.linux.help,
  incluso si su sistema sigue recibiendo este grupo de news (ya
  obsoleto).

  2.8.  Mi software PPP no funciona.  Qu hago ?.

  Esta es una de las preguntas ms habituales que suelen hacerse. Si
  usted enva esta pregunta a usenet sin dar una informacin ms
  especfica, lo ms probable es que la gente que lea el area la ignore.

  Vea primero la pregunta referida a errores que aparecen al desconectar
  el mdem (pregunta ``PPP no cuelga el mdem cuando termina'').  Estos
  errores no son la causa del problema, sino slo sntomas.  Preguntar
  qu puede ir mal incluyendo slo estos errores tampoco sirve de mucho,
  asi que...

  Lo que realmente debe proporcionar junto con su peticin de ayuda es
  una copia del system log (syslog) que obtiene cuando ejecuta pppd con
  la opcin debug. Adems, si usa chat para establecer la comunicacin,
  use la opcin -v en la lnea de comandos de chat para ver qu es lo
  que est ocurriendo realmente.

  Incluya adems los mensajes que proporcione el kernel al arrancar el
  sistema. Estos mensajes aportan informacin sobre el hardware que
  tiene instalado en su mquina, tipo de UART, versin de PPP, etc.

  Incluya tambin toda la informacin que pueda relacionada con su
  problema.  El tipo de disco duro que tenga, la marca de su tarjeta de
  sonido, o cuanta memoria tiene su tarjeta de vdeo son irrelevantes.
  Lo importante son cosas como el tipo de sistema al que desea conectar,
  la versin de PPP (o de terminal) que usa el sistema remoto, el tipo
  de mdem o la velocidad con la que quiere conectar.

  Tenga en cuenta cuando ponga su syslog, que debe eliminar cualquier
  posible referencia a su nmero de telfono, su login o su password. No
  son importantes a la hora de solucionar el problema, pero si pueden
  causarle ms de un problema de seguridad el proporcionar a todo el
  mundo su clave de acceso.  Elimine tambin cualquier lnea que no
  provenga del kernel o de pppd.

  NUNCA ejecute pppd con la opcin kdebug 31 para acompaar su peticin
  de ayuda.

  Si su problema requiere examinar el flujo de datos que se intercambia
  entre los ordenadores implicados en la conexin, recibir un email
  solicitndole que lo enve. Desafortunadamente, usenet cuesta
  demasiado dinero a mucha gente como para engrosar innecesariamente la
  longitud de los mensajes.

  La informacin relativa sobre PPP est estructurada en varios niveles.
  La informacin de debug es enviada al nivel de debug. Los mensajes
  aclaratorios son enviados al nivel de informacin. Los errores son
  enviados al nivel de error. Incluya todos los mensajes que provengan
  del grupo 'local2' del proceso pppd.

  Por ltimo, no borre la informacin relativa a la impresin de
  tiempos. Es importante.

  2.9.  dinmica de direcciones IP ?.  Cada vez que conecto obtengo
  una direccin IP distinta !!!.   Cmo debo usar PPP con un sistema
  remoto que usa asignacin

  La asignacin de la direccin IP local est en funcin de las opciones
  que se proporcionen a pppd y del protocolo IPCP. Debera utilizar la
  direccin IP mgica 0.0.0.0 si necesita especificar su direccin IP
  local. La mayora de la gente simplemente no incluye la direccin IP
  local en las opciones de pppd.

  La otra opcin relacionada con este tema se llama noipdefault.  Esta
  opcin indica a su proceso pppd que no debe obtener su direccin IP
  local a partir de los datos que contenga su fichero /etc/hosts, sino
  que dicha direccin IP debe proporcionarla el sistema remoto. La
  mayora de la gente usa esta opcin cuando la direccin IP es asignada
  dinmicamente. Sin embargo, esta opcin no debe entenderse como "usa
  direcciones IP dinmicas". El uso de direcciones IP dinmicas es
  automtico cuando no se proporciona la direccin IP local.

  2.10.  usa asignacin dinmica de direcciones ?.   Cmo puedo saber
  que direccin IP me ha sido asignada cuando se

  Utilize el fichero ejecutable /etc/PPP/ip-up. La direccin IP local es
  el cuarto parmetro que se le pasa a este fichero en su lnea de
  comandos. Este fichero se ejecuta cuando pppd conoce su direccin IP
  local.
  Adems, por si le interesa, el quinto parmetro que se le pasa a este
  fichero es la direccin IP remota del sistema con el que ha conectado.

  Si siente curiosidad sobre el valor que le ha sido asignado, entonces
  debera ejecutar ifconfig. Este programa le mostrar los valores
  actuales de la direcciones IP local y remota bajo el campo "P-t-P".

  2.11.  un servidor PPP?.   Puedo usar la misma direccin IP local
  para todas las lneas de

  Si. La direccin local no es significativa para el sistema local. Lo
  que si debe tener es una nica direccin IP remota. El rutado de
  informacin se realiza usando la direccin IP remota, no la local.

  3.  Otras implementaciones.

  3.1.  Me gustara saber si existe alguna para HP-UX o AIX o ...  
  Existen otras implementaciones de PPP distintas a la de Linux ?.

  Revise la PPP FAQ mencionada anteriormente. Consulte la pregunta ``
  Dnde est la documentacin ?.''.

  HP-UX est soportado por el paquete comercial de Morningstar. El
  soporte para AIX se encuentra ya disponible en la versin 2.2 del
  paquete pppd.

  Si no encuentra el sistema que busca, pregunte en comp.protocols.ppp y
  NO en los grupos de Linux.

  Por favor, no mande email al autor de este HOWTO con cuestiones del
  estilo:  " Conoce algn paquete PPP para el sistema xxxx ?". Estas
  preguntas sern archivadas "apropiadamente" :-).

  El paquete pppd que se encuentra en sunsite no contiene cdigo que
  implementa interfaces del tipo stream. Esto se debe a que estos tipos
  de interfaces tienen copyright. El grupo de personas que han diseado
  el paquete pppd ha realizado gestiones para ver si se podan cambiar
  los trminos de este copyright. Por el momento, no ha habido
  respuesta.

  Por esta razn, y dado que sunsite est dedicado especficamente a
  Linux, se han eliminado los ports de PPP para AIX, SunOS, Next y otros
  sistemas que contenan protocolos con streams.  Se siguen manteniendo
  los ports para BSD y para Linux. Si quiere conseguir el cdigo de pppd
  para otros sistemas, consulte la PPP FAQ. Alternativamente, puede
  utilizar archie. No intente buscarlo en los mirrors de sunsite porque
  tampoco estar ah.

  3.2.   Existe un programa llamado dp  ?.

  Si, existe. El paquete dp fue considerado al inicio del desarrollo de
  la traslacin de PPP a Linux. Es un buen programa, permite "demand
  dial", pero slo funciona con sistemas que soportan streams. SunOS
  (Solaris) es un ejemplo de estos sistemas. Linux, por el momento, NO
  soporta streams.

  Existen otros paquetes para PPP circulando por Internet. Portable PPP
  es un paquete muy similar al de TIA. Tambin existe otro paquete
  denominado simplemente ppp. El paquete KA9Q tambin contiene cdigo
  que implementa PPP.

  De todos estos paquetes, pppd fue el que ms se ajustaba a las
  necesidades de la traslacin a Linux, por eso fue elegido.

  (Si quiere ms informacin sobre estos programas, as como sobre
  otros, pregunte en el grupo comp.protocols.ppp ).

  3.3.   Cules son los RFCs que describen el protocolo PPP ?.

  La implementacin actual de PPP es una mezcla de varios de ellos. La
  mayor parte del cdigo de PPP aparece descrito en los RFCs 1331 y
  1332. Estos RFCs han quedado obsoletos hoy en da. RFC 1331 fue
  substituido por el RFC 1548 y ste a su vez fue sustituido 6 meses ms
  tarde por el RFC 1661.

  La mayora de las implementaciones de PPP no tienen porqu tener
  ningn problema con la versin PPP de Linux. Para una lista completa,
  consulte la PPP FAQ.

  Extrado de la PPP FAQ:

       Los RFCs 1134, 1171, 1172 (y 1055 para este tema en con
       creto)  han quedado obsoletos. Slo son interesantes si va a
       conectar con una implementacin "muy antigua" de PPP y no
       consigue negociar con ella. Por ejemplo, el PPP remoto le
       pregunta al suyo por la opcin 2 de IPCP con slo una longi
       tud de 4 y con un tipo de compresin 0x0037.
       (Todava existe un montn de todo esto circulando por ah .
       Sea cuidadoso ah fuera).

  Linux, por ejemplo, detectara esta condicin y la corregira
  automticamente.

  4.  Compatibilidad.

  4.1.   Puede PPP dialogar con un interface tipo SLIP ?.

  No. SLIP funciona con SLIP y PPP funciona con PPP.

  Algunos vendedores ofrecen productos que trabajan tanto con SLIP como
  con PPP. Sin embargo, estos paquetes deben de ser configurados para
  trabajar bien con SLIP, bien con PPP, pero no con ambos a la vez.
  Actualmente, no hay ninguna forma de saber si se est solicitando
  utilizar PPP o SLIP en el momento de establecer una comunicacin.

  4.2.   Qu es mejor: usar PPP o SLIP ?.

  Depende de muchos factores. Generalmente, las personas que hacen esta
  pregunta, no han ledo el documento Net-2-HOWTO. Consulte la pregunta
  `` Dnde est la documentacin ?.''.

  Una excelente discusin terica sobre esta cuestin est disponible en
  el servidor WWW de Morning Star <http://www.mornignstar.com/>.

  4.3.   Qu es mejor para la identificacin y verificacin: CHAP o PAP
  ?.

  Si puede elegir, use CHAP. Si no le queda ms remedio use PAP, es
  mejor que nada. (-- A lo largo del documento se utilizar el trmino
  "identificacin y verificacin" en vez del equivalente ingls
  "authentification".--)

  5.  Ficheros de identificacin y verificacin.

  5.1.  algn ejemplo disponible ?.   Cul es el formato del fichero
  /etc/pap-secrets  ?.  Hay

  El protocolo de identificacin y verificacin PAP se usa
  principalmente para enviar al sistema remoto su login y su password en
  ese sistema. Ms concretamente, debe enviar el nombre del sistema
  remoto, el nombre de su cuenta en ese sistema y su password.

  Si el usuario en la mquina abbot quiere llamar a costello, la entrada
  correspondiente en /etc/pap-secrets debera ser:

       #account        remote          password        IP address list
       abbot           *               firstbase

  5.2.  Hay algn ejemplo disponible ?.   Cul es el formato del
  fichero /etc/chap-secrets  ?. 

  El problema ms comn es que se suele olvidar que para que CHAP
  funcione, AMBOS ordenadores implicados en la comunicacin deben de
  tener su fichero /etc/chap-secrets convenientemente configurado.

  Siguiendo con el ejemplo anterior, si abbot quiere hablar con
  costello, entonces el fichero /etc/chap-secrets de abbot debe contener

       #remote         local           secret          IP address list
       abbot           costello        firstbase       10.10.10.2
       costello        abbot           who             10.10.10.1

  Y en la mquina costello /etc/chap-secrets debe tener

       #remote         local           secret          IP address list
       abbot           costello        firstbase       10.10.10.2
       costello        abbot           who             10.10.10.1

  6.  Problemas de compilacin.

  6.1.  Hay errores cuando intento compilar el kernel.

  El paquete con la versin 2.2 de pppd contiene las instrucciones
  necesarias para que pueda compilar el programa. Brevemente, necesita
  ejecutar el comando configure. As se generarn los enlaces adecuados
  para el Makefile. Despus, haga un make kernel. Esto instalar las
  nuevas partes del programa que deban ser actualizadas.

  Una vez hecho esto, vuelva a recompilar el kernel. Debe hacerlo
  incluso si ya haba construdo anteriormente otro kernel para soportar
  PPP. El driver suministrado con las versiones del kernel 1.2 y las
  primeras del 1.3 no es compatible con la versin 2.2 de pppd.

  Una vez recompilado el kernel, ya puede seguir compilando pppd, chat y
  pppstats.

  7.  Problemas al ejecutar pppd .

  7.1.  pppd  dice que la versin 0.0.0 est fuera de fecha.

  Est intentando ejecutar la versin 2.2 de pppd sin haber vuelto a
  recompilar los drivers en el kernel.

  7.2.  yo estoy seguro de haber habilitado la opcin al recompilarlo.
  pppd  dice que el kernel no est configurado para PPP. Pero

  Asegrese de que compil el kernel y de que lo est ejecutando
  actualmente.  Puede ser que lo haya recompilado, pero no lo haya
  movido al directorio adecuado donde pueda verlo el gestor de arranque
  (LILO, por ejemplo).

  Asegrese tambin de que no tiene una copia vieja de pppd en su disco
  y est ejecutando esa versin. La versin anterior de pppd se guardaba
  en /usr/lib/ppp. A muchas personas no les gustaba ese directorio, asi
  que en la nueva versin 2.2 se ha movido pppd, chat y pppstats al
  directorio /usr/sbin. Si sus scripts todava apuntan hacia
  /usr/lib/ppp, entonces probablemente est ejecutando el cdigo
  antiguo.

  7.3.  pppd  no funciona a menos que sea root.

  El proceso pppd requiere hacer algunos cambios en el sistema de red, y
  tales cambios slo debera hacerlos el usuario root. Si quiere que
  otro usuario ejecute pppd, asegrese de configurar correctamente sudo
  para permitir usar pppd a dicho usuario.

  chmod root pppd
  chmod 4755 pppd

  Si quiere que el acceso a pppd est limitado a un determinado grupo de
  usuarios, haga que el proceso pppd pertenezca a ese grupo en concreto
  y no permita que nadie ms pueda ejecutarlo.

  7.4.  directory .  Obtengo el mensaje: unable to create pid file: no
  such file or

  Necesita crear un directorio denominado /var/run. En versiones
  anteriores de la distribucin Slackware, exista un acceso directo
  (symlink) al directorio /etc.  En realidad, este mensaje no es un
  error, sino un aviso (warning). PPP funcionar correctamente aunque
  aparezca este mensaje. Sin embargo, el fichero script PPP-off depende
  de este fichero para funcionar.  Es una buena idea crear el directorio
  antes mencionado o bien crear un acceso directo al sitio adecuado.

  El fichero de cabezera POSIX paths.h define, con el nombre _VAR_RUN,
  el lugar donde debe de encontrarse este fichero. Si quiere usar un
  directorio distinto para PPP y/u otros paquetes, cambie el valor de
  este campo y vuelva a compilar el paquete.

  7.5.  directory .  Obtengo el mensaje: /etc/ppp/options: no such file
  or

  Necesita crear este directorio y dentro de l un fichero llamado
  options. Necesita, adems tener los permisos adecuados para que pueda
  ser visible por el proceso pppd (root, generalmente).

  Este fichero debera estar vaco. Para crearlo, use el comando touch.

  Para ms informacin sobre la funcin de este fichero, consulte la
  pgina man de pppd, pppd(8).

  7.6.  No puedo averiguar cul es mi direccin IP local.

  Este problema suele aparecer con muchas configuraciones de la Telebit
  Netblazer.  El problema no es del servidor de terminal, sino que el
  sistema donde se ha instalado no le ha proporcionado un conjunto de
  direcciones IP vlidas.

  Esto pueden ocurrir por una serie de situaciones:

    La tarjeta Netblazer no tiene su direccin IP (la de usted) y usted
     no tiene su direccin IP.

    La Netblazer no sabe la direccin IP de su site y usted no sabe la
     direccin IP de la Netblazer.

  El enlace no funcionar hasta que ambas direcciones IP esten
  definidas.

  Debe indicarle a la Netblazer la direccin IP a usar. Use la direccin
  IP local y la direccion IP remota como parmetros a pasar al proceso
  pppd.  Esta opcin tiene el formato:

  pppd local_ip:remote_ip [resto de opciones]

  (o sea la direccin IP local, dos puntos y la direccin IP remota).

  7.7.  No puedo averiguar la direccin IP remota.

  Vea la pregunta anterior.

  7.8.  Obtengo mensajes dicindome que el nmero mgico no es aceptado.

  Este mensaje aparecer en su log como "magic number not ACK" o "magic
  number NAK". Este es un error grave y PPP no funcionar.

  Hay una probabilidad de una entre 4 billones de que los dos sistemas
  que se van a conectar tengan el mismo nmero mgico. Si obtiene
  continuamente fallos de conexin debidos al nmero mgico, las
  probabilidades de que esto sea una coincidencia se reducirn
  geomtricamente.

  Las razones ms comunes de este fallo son:

    El sistema remoto no est ejecutando PPP y usted piensa que s lo
     est haciendo.  Est seguro de que el sistema remoto ha sido
     configurado para ejecutar PPP ?.  Est el proceso PPP en su lugar
     adecuado ?.  Tiene los permisos adecuados ?.

     Si ocurre esto, el shell est haciendo un eco de los datos que se
     le mandan.  Esta es la causa ms comun.

    El mdem ha desconectado nada ms iniciar la conexin y le ha
     dejado conectado con una cuenta en el sistema remoto. La mayora de
     los mdem estn configurados para hacer un eco de los datos que se
     les mandan, asi que lo que usted esta viendo no es ms que el eco
     de los datos que usted est mandando.

  En cualquiera de los dos casos anteriores, el sistema Linux est
  enviando datos al sistema remoto, el cual, a medida que llegan, se los
  vuelve a enviar a usted. Esta situacin se denomina un lazo (loop en
  ingles).

  7.9.  Obtengo un mensaje: protocol reject for protocol fffb .

  Este mensaje suele aparecer cuando intenta conectar con un servidor de
  terminal de la casa Xiplex. Segn los fabricantes, la versin 5.1 de
  su software tiene numerosos problemas con PPP. A partir de la versin
  5.3 estos problemas ya se han solucionado.

  Si usa la versin 5.1 use la opcion vj-max-slots 3 en la lnea de
  comandos de pppd para limitar el numero de slots a 3. El problema
  radica en que el servidor Xiplex acepta peticiones de hasta 16 slots,
  pero a partir del tercero no funciona. Si funcionase bien, deberia
  retornar un frame del tipo NAK dentro del mrgen que hay especificado
  para ello, pero el servidor no hace tal cosa.

  Alternativamente, tambin puede eliminar la compresin de cabeceras
  Van Jacobson con la opcin -vj a pasar a pppd.

  7.10.  tramas, pero parece como si la conexin no fuese completa. 
  Qu significa esto ?.  El software PPP conecta con el sistema remoto,
  enva unas cuantos

  Linux no soporta mdems RPI. Si su mdem es RPI necesitar otro tipo
  de mdem para poder usarlo con Linux. Esta situacin no tiene visos de
  cambiar segn la poltica que mantiene Rockwell.

  Examine el system log que obtiene cuando usa la opcin debug en la
  lnea de comandos de pppd. (Necesita el log de todas maneras si quiere
  pedir ayuda a alguien). Si el log muestra que se est enviando el
  frame LCP-request continuamente y adems el nmero id no se
  incrementa, sino que permanece fijo, entonces esto significa que no se
  estn enviando frames entre su mquina y la mquina remota.

  Las tres causas ms comunes de este fallo son las siguientes:

    El software PPP no est funcionando en la mquina con la que quiere
     conectar. Est enviando tramas PPP a otro software que debe de
     estar preguntndose: " Qu es todo este XLSKFDJFpeojd23623 que
     estoy recibiendo ?".

     Asegrese de que el sistema remoto est ejecutando PPP antes de que
     usted intente conectarse a l. Pruebe a usar un programa de
     comunicaciones "normal" y llame hasta que llegue a la secuencia
     normal de login del sistema remoto al que se conecte.  Recibe
     ahora frames PPP ?.

     Los frames de PPP son muy fciles de identificar. Suelen tener 40
     caracteres de longitud y contienen varios caracteres. No tienen un
     retorno de carro que separe lneas y se mandan en una secuencia
     cclica, con una pausa entre secuencias.

    La lnea serial no est configurada con 8 bits de datos. PPP
     requiere que la lnea serial est configurada para 8 bits de datos,
     sin paridad y 1 bit de stop.

     Por defecto, el software PPP coloca la linea serial con 8 bits por
     dato, sin paridad y un bit de stop. El sistema remoto debe tambin
     adoptar esta configuracin. Si no es as, aparecern errores de
     paridad (parity) y de trama (frame).

     PPP ignora caracteres enteros. PPP no es capaz de ignorar bits tal
     y como lo hace kermit. PPP no funcionar con un enlace de
     comunicacin de 7 bits por dato.

    El sistema remoto est configurado para usar algn metodo de
     identificacin y verificacin (CHAP o PAP). Si usted no ha
     configurado su sistema con alguno de estos mtodos, el sistema
     remoto ignora cualquier paquete IPCP de informacin que se le
     mande, ya que estar esperando el paquete de identificacin y
     verificacin.

     En cualquier caso la solucin consiste bien en deshabilitar la
     identificacin y verificacin en el sistema remoto, bien
     habilitarla en su sistema.

     Examine la recepcin de las tramas del tipo LCP configure en el log
     de la conexin. Si aparece un auth significa que el sistema remoto
     requiere identificacin y verificacin.

  7.11.  El script /etc/ppp/ip-up  no funciona.

  El proceso pppd ejecuta el script /etc/ppp/ip-up cuando la "capa"  del
  protocolo IP se ha establecido correctamente. pppd y el protocolo IP
  le proporcionan al script los parmetros que definen el status de la
  lnea (nombre del dispositivo de conexin, velocidad de comunicacin y
  direccin IP).

  Sin embargo, lo que puede parecer confuso es que se trata a
  /etc/ppp/ip-up como a un programa ejecutable y no como a un script. El
  programa se "lanza" mediante la funcin exec de Linux.

  Esto quiere decir que si desea utilizar este script debe de hacer dos
  cosas:

    Necesita tener el fichero marcado como ejecutable. Haga esto con
     chmod.  Los permisos correctos de funcionamiento deberan ser de
     100.  Usando chmod con un valor de 500 es aceptable si va a leer
     del fichero, o bin usar el valor de 700 su va a escribir en l.
     Este fichero debera ser usado por el usuario root.

    El fichero debe tener como primera lnea:

         #!/bin/sh

  El caracter # debe ser el primer caracter de la primera lnea del
  fichero.  El intrprete de este script (/bin/sh en este caso) puede
  ser cualquier programa que pueda ser utilizado para ejecutar scripts.
  La mayora de la gente utiliza el shell Bourne sh, pero pueden usarse
  otros como el C shell csh o incluso perl. Lo realmente importante es
  que los dos primeros caracteres sean # y !  respectivamente.

  7.12.  No puedo conectar con la red merit.

  Algunos usuarios de esta red han sealado que es necesario utilizar
  PAP para conectar con esta red.  Ha probado a activar esta opcin ?.

  8.  DIP

  8.1.  DIP no tiene soporte para ejecutar PPP.

  La versin ms actual de dip-uri si soporta el uso de PPP, ya que
  utilizando la opcin mode PPP, dip lanzar el proceso pppd
  automticamente. Sin embargo, pppd necesita ser invocado con varias
  opciones para poder funcionar correctamente. Como dip no pasa estas
  opciones a pppd, dichas opciones deben de estar almacenadas en el
  fichero /etc/ppp/options.

  dip es un programa que controla el establecimiento de una conexin
  SLIP entre mquinas con la ayuda de otros programas: slattach,
  ifconfig y route.  Todos estos programas deben ser utilizados para
  lograr una conexin SLIP vlida, sin embargo, no son necesarios para
  realizar una conexin PPP.

  dip puede ser usado para efectuar la llamada telefnica y arrancar el
  software PPP en el sistema remoto. Para utilizarlo en este modo, es
  mejor usarlo como un parmetro a pasar con la opcin connect. Sin
  embargo, usted tiene la opcin de permitir que dip controle el enlace.
  Es indiferente como pppd sea ejecutado, lo que si es realmente
  importante es que debe ser ejecutato obligatoriamente, ya que es un
  programa imprescindible para el protocolo PPP.

  9.  Terminacin del proceso.

  9.1.   Existe un comando similar a dip -k  para PPP ?.

  No. En el directorio de chat hay un PPP-off script.  Ejecutando este
  script se consigue el mismo efecto que con dip -k.  Este script
  aparece a continuacin. Para usarlo, corte el texto, slvelo en el
  fichero nombrado arriba y hagalo ejecutable con chmod.

         #!/bin/sh
         DEVICE=ppp0
         #
         # Si el fichero ppp0 pid existe es que el programa esta funcinando. Paralo.
         if [ -r /var/run/$DEVICE.pid ]; then
                 kill -INT 'cat /var/run/$DEVICE.pid'
         #
         # Si kill no ha funcionado entoces no hay ningun proceso asociado a este
         # pid. Tambien puede significar que el fichero lock sigue abierto. Seria deseable
         # borrar tambien el fichero lock.
                 if [ ! "$?" = "0" ]; then
                         rm -f /var/run/$DEVICE.pid
                         echo "ERROR: Removed stale pid file"
                         exit 1
                 fi
         #
         # OK. Ahora dejamos a pppd terminar a su manera.
                 echo "PPP link to $DEVICE terminated."
                 exit 0
         fi
         #
         # el proceso PPP no esta ejecutandose para ppp0
         echo "ERROR: PPP link is not active on $DEVICE"
         exit 1

  9.2.  PPP no cuelga el mdem cuando termina.

  Hay varias razones para que ocurra esto:

     Especific la opcin mdem en la lnea de comandos de pppd ?.
     Este parmetro controla si es pppd el que debe controlar las
     seales de status del mdem. Este parmetro aparece explicado ms
     detalladamente en la pgina man de pppd.

     Tiene el mdem configurado para usar las seales DCD y DTR ?. La
     secuencia Hayes para el mdem es normalmente &C1. Si resetea el
     mdem durante la sesin con ATZ, asegrese de que configura su
     mdem correctamente.

     La seal DTR la genera el ordenador e indica al mdem cuando
     desconectar.  La secuencia Hayes para esto es &D1 o &D2, siendo &D2
     la opcin preferida por PPP. Muchos fabricantes de mdems
     deshabilitan este uso de la seal DTR en la configuracin de
     fbrica que viene almacenada en el mdem .

     Est utilizando un cable barato que no conecta la senal DCD entre
     el ordenador y el mdem ?. Los cables de los ordenadores Machintosh
     "Classic"  son un ejemplo. Estos ordendadores no usan esta seal.

    Para conexiones a una cuenta en un sistema remoto,  lanza la
     ejecucin de pppd de forma correcta ?.  El proceso pppd debera ser
     lanzado (con exec) desde un script y no desde la lnea de comandos
     del shell que est usando. Si hace esto ltimo y ejecuta pppd, ser
     el shell el que reciba la seal HUP (hang-up, colgar) y no pppd.

     Un script tpico para lanzar pppd es el siguiente:

     ___________________________________________________________________
     #!/bin/sh
     exec pppd -detach modem ...
     ___________________________________________________________________

    El uso conjunto de de dip y diald puede interferir en algunas
     ocasiones con la capacidad de pppd para detectar la falta de
     portadora de la lnea serial. En esta situacin, debera usar las
     opciones lcp-echo-request y lcp-echo-failure para que pppd pueda
     detectar esta condicin.

  10.  Transferencia de datos.

  10.1.  cuando hago un put . Sin embargo, si hago get  funciona perfec
  tamente.  Qu ocurre ?.   En las transferencias con ftp, parece que
  la conexion muere

   Est activado el control de flujo (flow control) ?. Esto se hace
  pasando a pppd la opcin crtscts para usar control de flujo RTS/CTS
  (hardware) o xonxoff para control de flujo XON/XOFF (software). Si no
  tiene habilitado el control de flujo, probablemente est
  sobrescribiendo en los buffers del mdem. Esto tiene consecuencias
  catastrficas si utiliza compresin de cabezeras vj (Van Jacobson).

  10.2.   Cmo debo usar el control de flujo XON/XOFF ?.

  Es mejor utilizar control de flujo hardware (CTS/RTS). Sin embargo, si
  se ve obligado a usar control de flujo software, siga los siguientes
  pasos:

    Necesita especificar la opcin xonxoff en la lnea de comandos de
     pppd. Esta opcin le dice al dispositivo serial a utilizar que
     utilice este tipo de control de flujo. Adems, carga los dos
     caracteres (XON y XOFF) dentro del driver tty.

    Necesita especificar los caracteres que representan XON y XOFF en
     el parmetro asyncmap que se pasa a pppd. Esto avisa al sistema
     remoto que debe separar estos caracteres cuando quiera envirselos
     a su mquina. Esto se indica normalmente con la opcin asyncmap
     a0000.

    Naturalmente, no olvide decirle a su mdem que utilice control de
     flujo XON/XOFF. En los mdem ZyXEL, se suele utilizar la secuencia
     "R1&H4".

  10.3.  minicom , el mdem siempre usa 14400 bits/segundo. Sin embargo,
  PPP dice que est conectando a 9600, 7200 e incluso a 2400
  bits/segundo.  Cmo puedo corregir esto ?.   El mdem parece que
  conecta a velocidades extraas. Cuando uso

  Especifique la velocidad que desea en la lnea de comandos de pppd.
  Si no especifica la velocidad, PPP utilizar cualquier velocidad que
  exista.  Algunos programas no dejan los parmetros de la lnea serial
  iguales que cuando se ejecutaron. Esto puede causar que la lnea tenga
  una configuracin extraa.

  Linux no soporta mdems que utilizan RPI (Rockwell Protocol Interface)
  porque es un protocolo propietario. Dado que Rockwell no quiere
  facilitar el cdigo necesario para poder hacer una adaptacin a Linux,
  hay muy pocas posibilidades de ques estos mdem sean soportados por
  Linux. La solucin en este caso es clara: no usar mdems RPI.

  Si no sabe si un mdem es RPI cuando quiera adquirirlo, fjese en las
  frases publicitarias que aparecen en la caja. Frases del estilo "con
  correccin de errores software", o "compatible con Windows" o
  "requiere un driver especial para funcionamiento completo", usualmente
  suelen indicar que el mdem es RPI.

  10.4.  operacin put , sin embargo, es muy rpida.  Porqu ?.  Cuando
  hago ftp, la operacin get  es muy lenta, pero la

   Especific la opcin asyncmap 0 cuando ejecut pppd ?. Si olvid
  esto, el peer debe doblar todos los caracteres de control en el rango
  0x00..0x1F (hexadecimal).  Esto supone una reduccin de velocidad de
  un 12.5 % cuando est recibiendo datos.

   Ha configurado bien el sistema remoto ?.  Olvid especificar el
  control de flujo del mdem remoto ?.

  10.5.  La opcin proxyarp  no encuentra la direccin hardware.

  Use el paquete ppp-2.1.2d.tar.gz. El proceso pppd fu compilado
  errneamente con el kernel 1.1.8 y usaba definiciones Net-3 en vez de
  la Net-2 como le corresponda.

  Consulte ademas el mini HOWTO proxy-ARP sobre los requerimientos
  necesarios para utilizar proxy ARP.

  El paquete 2.1 tiene establecido un lmite de 64 dispositivos de red.
  Cuando se escribi el cdigo de proxyarp se pens que era un nmero
  razonable, dado que la mayora de la gente suele tener uno o dos
  controladores Ethernet como mximo en una mquina. Hoy en da hay
  mquinas que tienen conectados hasta 128 dispositivos de red.

  La versin 2.2 ha elevado el lmite a 256 dispositivos de red. Este
  lmite aparece en forma de un #define que se encuentra en el mdulo
  sys-linux.c.

  11.  Rutado y otros problemas.

  11.1.  unos 3 minutos y ha vuelto a desaparecer.  Ayuda !.   Mi ruta
  al sistema remoto sigue desapareciendo !. Estuvo activa

  Esta no es una pregunta que est relacionada con PPP.

  Pista:  NO EJECUTE routed !.

  11.2.  PPP. Slo tengo una direccin IP que me es asignada por mi
  proveedor de servicios de conexin (incluso esa direccin IP es asig
  nada dinmicamente).  Cmo puedo hacer esto ?.   Me gustara conec
  tar los ordenadores de mi red a Internet usando

  No se puede. Al menos no de la manera que a usted le gustara hacerlo
  normalmente. El problema reside en que su proveedor no sabra las
  direcciones IP de las mquinas conectadas a su red y, por tanto, no
  rutara ninguna trama a su sistema local.

  Sin embargo, existen otras soluciones:

    Puede hacer un telnet a la mquina que est conectada a Internet
     usando pppd. Una vez conectado a esa mquina, ya puede hacer telnet
     o ftp al resto de Internet. Realmente, esto no es mucho mejor que
     usar el ordenador directamente, pero es til para realizar cosas
     sencillas.

    Use un kernel reciente de la serie 1.3 y utilice la opcion IP
     Masquerade. Para saber ms sobre cmo usar esta caracterstica,
     debera unirse a la lista de correo electrnico linux-net developer
     o bien consultar el documento Net-2-HOWTO.

    Ejecute el programa socks en su sistema PPP. Este programa
     realizar la misma funcin que si usa IP Masquerade pero, por
     contra, necesitar clientes modificados. La ventaja de usar socks
     es que este programa lleva mucho tiempo circulando por ah y muchos
     clientes entendern el concepto de servidor proxy (proxy server)
     que es necesario para trabajar correctamente con el programa.

  11.3.  con ninguna otra mquina de dicho sistema.  Conecto con la
  mquina del sistema remoto, pero no puedo hacerlo

   Ha olvidado aadir el parmetro defaultroute a la lnea de comandos
  de pppd ?. Este parmetro aade una ruta por defecto (default route) a
  su sistema de rutado, permitiendo que los frames dirigidos a otras
  direcciones IP se canalicen a travs del dispositivo PPP.

  El software PPP no reemplazar la ruta por defecto si ya exista una
  anterior a la ejecucin de pppd. El motivo de esto es evitar que
  alguien pueda destruir accidentalmente la ruta por defecto a sus
  routers ethernet. Un aviso aparecer en el system log si defaulrotute
  no se ejecuta por esta razn.

  11.4.  mquinas.  Y ahora que hago ?.  Tengo una ruta por defecto
  pero sigo sin poder acceder al resto de

  El problema no es entonces de su sistema Linux local. Lo ms probable
  es que haya un problema de rutado en la mquina remota.

  El sistema remoto no est configurado para IP forwarding. En el RFC de
  PPP se especifica que esta opcin NO debe estar activada por defecto.
  Esta opcin debe habilitarse. Para sistemas Linux, necesita volver a
  compilar el kernel y especificar que desea IP forwarding/gatewaying.

  El ordenador remoto necesita una ruta hacia su mquina de la misma
  manera que usted necesita una ruta hacia l. Esto puede hacerse por
  uno de los cuatro mtodos siguientes. Cada uno tiene sus ventajas y
  sus inconvenientes y recuerde que slo puede usar un metodo y slo
  uno.

    Use una ruta de host (host route). En cada host del sistema remoto,
     aada una ruta a la direccin IP de su mquina Linux, siendo el
     gateway la mquina que usted usa para conectar con ese sistema.
     Esto es adecuado si el sistema remoto tiene pocas mquinas
     conectadas y usa una red simple, sin bridges, routers, gateways,
     etc.

    Use una ruta de red (network route). Divida la direccin IP remota
     de tal manera que la direccin IP local de su mquina Linux, la de
     la mquina remota con la conecta usando PPP y la de la tarjeta
     Ethernet que conecta esta mquina con el resto de su red
     pertenezcan al mismo dominio.

     Esto funciona si tiene suficientes direcciones IP para poder
     repartirlas.  Si tiene un dominio de direcciones IP de red de clase
     B, esta solucin funciona muy bien, puesto que puede poner todas
     las direcciones de las mquinas remotas en el mismo dominio de
     direcciones IP.

     Una vez hecho esto, aada una ruta de red en cada uno de los
     gateways y routers, de tal forma que cualquier direccin de la red
     remota sea enviada al servidor de terminal. La mayora de las
     configraciones de redes locales tienen muchos hosts pero pocos
     routers. (Por ejemplo, en sii.com, hay unos 300 hosts activos con
     solo 3 routers).

    Use gated en todos los gateways y en el servidor de terminal.  Con
     esto se consigue que el servidor de terminal propague (broadcast)
     los frames para su direccin IP a los gateways adecuados. Como los
     hosts tendrn una ruta por defecto a uno de los gateways, este
     gateway generar una trama de redireccin ICMP y el host especfico
     aadir automticamente su propia ruta de host.

    Utilice proxy ARP en el servidor de terminal. Esto slo funcionar
     si su direccin IP remota est en el mismo dominio de direcciones
     IP que uno de los dominios de las tarjetas de red del sistema
     remoto.

     No hay solucion "exacta". Debe elegir la que mejor se adapte a sus
     circunstancias.

  Si su router remoto necesita recibir tramas RIP para poder actualizar
  la ruta hacia su sistema, entonces debera usar el programa bcastd de
  sunsite.unc.edu. Este programa genera las tramas RIP sin necesidad de
  que tenga que instalar y ejecutar gated.

  11.5.  No puedo hacer ping  a mi direccin IP local.

  No puede hacer esto porque normalmente no tiene definida una ruta
  hacia esa direccin. Este es el modo normal de funcionamiento, asi que
  no hay nada anormal.  Si quiere hacer un ping a su sistema, utilice la
  direccin del dispositivo loopback (127.0.0.1).

  Puede hacer un ping a la direccion IP remota, si as lo desea. Sin
  embargo, algunos servidores de terminal no permitirn esto, ya que esa
  direccin esta ocupada telefnicamente para ellos. Esto depende de la
  configuracin especfica de cada servidor .  En general, no haga ping
  a ninguna de las 2 direcciones ( local o remota ). Elija una direccin
  IP de otra mquina que sepa que est en la red remota (una de su
  nameserver, por ejemplo).

  Mientras el software PPP no haga esta tarea, debe de aadir
  manualmente a la tabla de rutado la ruta al host con el que acaba de
  conectar. Esto se hace con el comando

  route add -host 192.187.163.32 lo

  Donde la direccin IP local es 192.187.163.32 en este ejemplo. Esto le
  dice al software de red que debe dirigir todas las tramas destinadas a
  su direccin IP al dispositivo loopback. Una vez que ha aadido la
  ruta apropiada a la direccin IP local, entonces ya puede usar esta
  direccin como el destino para las tramas IP.

  Usted es el responsable de eliminar esta ruta cuando el enlace
  termine.

  12.  Interaccin con otras implementaciones de PPP.

  12.1.  termina.  Porqu ocurre esto ?.  Estoy usando Trumpet (para
  MSDOS) y la conexin simplemente

  Trumpet no acepta ningn tipo de compresin de cabeceras VJ. Utilize
  pppd con la opcin -vj para desactivar esta compresin.

  12.2.  hacer nada ms que ping  o nslookup .  Porqu ocurre esto ?.
  Estoy usando dp-3.1.2  (con SunOS) y el sistema no me permite

  Existe un fallo en la versin 3.1.2 de dp. Actualcese a la versin
  3.1.2a o posterior. Puede conseguirla en el home site de dp
  <http://www.ecn.purdue.edu>.

  Hasta que consiga esta actualizacin, no utilice compresin de
  cabeceras VJ.

  12.3.  No puedo conectar con/desde mi mquina con Windows NT.

  Microsoft ha elegido para Windows NT un sistema no estandar de
  identificacin y verificacin. Estn en su derecho, ya que han
  registrado su propio protocolo en la IANA. Si en la casilla "accept
  only Microsoft encrypted authentication" est activada en la entrada
  "phone book", entonces la conexin no podr realizarse. Esta opcin le
  indica a Windows NT, que slo puede comunicarse con otro sistema que
  tenga implementado el protocolo PPP propio de Microsoft (otro sistema
  Windows NT).

  Linux no soporta este tipo de identificacin y verificacin.  Si puede
  cambiar las opciones del sistema de su Windows NT, vaya a las opciones
  de Windows NT Phone Book, eliga advanced, luego security settings y
  asegrese de que la casilla "Accept any authentication including clear
  text" est activada y que la casilla "accept only Microsoft encrypted
  authentication" no est activada. El resto de casillas del cuadro de
  dialogo no influyen en este tema.

  Una vez hecho esto, utilice PAP en su mquina Linux y ponga el login y
  el password de la mquina Windows NT en el fichero habitual
  etc/ppp/pap-secrets/.

  La secuencia de identificacin y verificacin de Microsoft es una
  variante del sistema PAP con el password protegido por un sistema de
  criptografiado del tipo DES. El sistema PAP normal enva las password
  sin encriptar, lo cual supone una violacion de seguridad dentro del
  sistema de seguridad que Microsoft ha elegido (tipo C2).

  Versiones anteriores del cdigo de PPP a la 2.1.2c tienen un fallo en
  el sistema de decodificacin de las peticiones de identificacin y
  verificacin. Una comunciacin entre un sistema Windows NT y esta
  versin no podrn nunca negociar. La versin actual, 2.2 o la 2.1.2d
  (si necesita el soporte para la serie de kernels 1.1) deberan ser
  usadas en esta situacin

  Segun Scott Hutton (shutton@habanero.ucs.indiana.edu):

  Bsicamente, NT RAS (Remote Access Services) terminar la conexin si
  su mquina rechaza (REJ) algn componente del protocolo que sea
  crtico (i.e.  el protocolo de identificacin y verificacin). El
  truco consiste en crear un fichero chap-secrets de lo mas simple. El
  mio es:

       *       ""      ""

  Esto le dice a pppd que debe enviar un NAK (no aceptado) en vez de un
  REJ (rechazado). Con la clave de registro (registry key) SPAP
  eliminada, el siguiente protocolo a probar es PAP (que es el que yo
  uso).

  Otras personas afirman que SOLO los servicios de red TCP/IP deben
  estar habilitados en el RAS (ni NetBEUI ni IPX (Ed: IPX est
  comprobndose ahora.  Hasta que est instalado convenientemente, es
  una buena idea deshabilitarlo.)). Tambin he tenido que batallar con
  un montn de claves de registro (registry keys) para eliminar timeouts
  (que son problemticos cuando slo se quiere usar TCP/IP):

         HKEY_LOCAL_MACHINE\eSYSTEM\eCurrentControlSet\eServices\eRemoteAccess\eP
                  Autodisconnect: REG_DWORD: 0

  y para conseguir que el rutado funcione correctamente:

    HKEY_LOCAL_MACHINE\eSYSTEM\eCurrentControlSet\eServices\eRasArp\eParamet
             DisableOtherSrcPackets: REG_DWORD: 0

  Para finalizar, la clave a eliminar para eliminar SPAP es:

       HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\PPP\SPAP

  13.  Otros mensajes enviados al system log.

  13.1.  Alarm.

  Esto no es un problema, aunque su nombre lo parezca. Slo significa
  que un temporizador (timer) ha concluido su cuenta. Los temporizadores
  son una parte necesaria durante la fase de establecimiento del
  protocolo.

  13.2.  SIGHUP.

  El proceso pppd ha recibido una seal HUP. La seal HUP se genera por
  el software que controla el dispositivo tty cuando el dispositivo
  remoto al que se estaba conectado ha terminado el enlace a travs del
  mdem. Esto significa que el mdem ha colgado ("hang up" en ingls) la
  conexin.  El programa kill tambin puede ser usado para enviar esta
  seal al proceso pppd.  Cuando pppd recibe esta seal, empieza la
  secuencia de finalizacin del enlace de una manera ordenada.

  13.3.  SIGINT.

  El proceso pppd ha recibido una seal INT. Esta seal la genera el
  software que controla la consola cuando se pulsa un CTRL+C y pppd se
  est ejecutando como un proceso de segundo plano (background).
  Igualmente kill tambin puede generar esta seal para el proceso pppd.
  De hecho, esta es la forma educada de finalizar la ejecucin de pppd y
  terminar con el enlace. Vea la pregunta referida a dip -k (pregunta
  `` Existe algn comando similar a <tt>dip -k</tt> para PPP ?.'') para
  ver un script que realiza esta funcin.  De la misma manera que con
  SIGHUP, pppd termina con el enlace de una manera ordenada.

  13.4.  Unknow protocol (c025) received .

  El sistema remoto desea utilizar el protocolo Lynk Quality Reporting
  con su sistema Linux. Este protocolo no est soportado por la versin
  actual de PPP para Linux. Esto no es un error, slo indica que el
  sistema remoto est enviando una invitacin a usar este protocolo y
  Linux le responde con un delicado: "No puedo hacer lo que me pides
  ahora, asi que no me marees ms con esto".

  El paquete PPP de Morning Star Software siempre intentar utilizar
  este protocolo LQP. Esto es normal y no significa que el enlace no
  pueda realizarse o sea errneo.

  13.5.  Unknow protocol (80fd) received .

  El sistema remoto quiere utilizar el protocolo de control de
  compresin (Compresion Control Protocol) con su sistema Linux. Este
  protocolo se situa "por encima" del protocolo bsico y, si se negocia
  correctamente, se obtiene una reduccin del nmero de bytes
  transmitidos en cada trama.  O sea, que la transmisin es ms rpida.

  Sin embargo, existen un buen nmero de compresores que pueden
  agruparse bajo el trmino de Compression Control Protocol. La versin
  2.2 del paquete PPP slo entiende uno: el compresor BSD. Este
  compresor funciona de forma muy parecida a como lo hace el programa
  compress de UNIX y utiliza una compresin del tipo LZW.  Dependiendo
  del tamao del cdigo, puede ser necesario una gran cantidad de
  espacio del kernel para incorporar los diccionarios de compresin y
  descompresin necesarios. Esto no debera ser utilizado si su mquina
  tiene un espacio limitado de memoria (ni siquiera lo intente si tiene
  8 megabytes o menos de RAM fsica). Para estos casos, debera adquirir
  un mdem decente que soporte este tipo de compresin.

  A menos que los dos extremos del enlace acepten este tipo de
  compresin, sta no se utilizar en la conexin.

  Otro tipo comn de compresor es Predictor-1. Necesita menos memoria y
  se ejecuta ms rpido. Sin embargo, su compresin no es tan buena como
  el de BSD, ya que enva unos pocos ms de bytes por cada trama.

  Muchos servidores de terminal comerciales utilizan un compresor
  denominado Stacker(TM) LZW o Protocolo LZS. Este tipo de compresor es
  comercial y requiere una licencia de uso. Aparentemente, Stacker le
  puede dar a usted esa licencia gratis, pero existe otra licencia ms
  especfica que le impide utilizar este tipo de compresin junto con
  pppd.

  13.6.  error  o ioctl(PPPIOCSINPSIG): I/O error .  La conexin falla
  con errores como ioctl(TIOCGETD): I/O

  Examine los mensajes que aparecen cuando arranca el sistema. Si
  aparece el mensaje PPP version 0.1.2 es que tiene una versin antigua
  del driver PPP.c.

  Si aparece PPP version 0.2.7, entonces tiene una versin actualizada
  de PPP.c para el paquete 2.1.2. Sin embargo, este fichero no fu
  compilado con el mismo conjunto de nmeros de ioctl. Asegurse que
  slo tiene un fichero llamado if_ppp.h. Debera estar situado en el
  directorio donde estn los ficheros include del kernel de linux. Una
  vez hecho esto, vuelva a compilar el kernel y el proceso pppd.

  Si aparece PPP version 2.2.0 entonces est usando el driver
  correspondiente a la versin 2.2 del paquete. Esta versin del driver
  solo funciona con las versiones 2.2 del paquete pppd. El programa pppd
  versin 2.2 slo funcionar con esta versin del driver.

  13.7.  ioctl(TIOCSETD): I/O error  o ioctl(TIOCNXCL): I/O error .  
  Porqu ocurre esto ?.  Ocurren errores del tipo ioctl(PPPIOCGDEBUG):
  I/O error ,

  El sistema remoto ha desconectado el telfono. Los drivers tty
  intentan reestablecer la disciplina de conexin que tenan antes de
  perder la lnea. A la vez, pppd intenta hacer lo mismo que estos
  drivers tty para poder recuperar la conexin.  Cuando se produce esta
  situacin es normal que estos errores aparezcan.

  13.8.  ifconfig  me proporciona una informacin extraa con PPP.

  Normalmente, ifconfig proporciona una informacin parecida a esta:

          ppp0      Link encap UNSPEC  HWaddr 00-00-00-00-00-00-00 ...
                    inet addr 192.76.32.2  P-t-P 129.67.1.65  Mask 255.255.255.0
                    UP POINTOPOINT RUNNING  MTU 1500  Metric 1

  Este mensaje aparece slo con propsitos informativos. Si usa una
  versin reciente del kernel, actualice el paquete nettools por el de
  http://sunacm.swan.ac.uk/pub/Linux/networking/nettools.

  13.9.  El fichero proc/net/dev  parece que esta vaco.

   Tecle el comando ls -l /proc/net y se est preguntando cmo puede
  ser que tenga un tamao de 0 bytes ?. Si es as, no se preocupe porque
  es normal. En vez de eso teclee:

  cat /proc/net/dev

  Ahora no debera de estar vaco. El hecho de que la longitud del
  fichero sea cero se debe a que se encuentra en un sistema de ficheros
  del tipo "proc". De la misma manera, usar more, less o most tampoco
  deben usarse para visualizar este fichero. Si quiere un resultado
  similar haga

  cat /proc/net/dev | less

  13.10.  "desactivados" cuando el sistema empieza a arrancar.  El ker
  nel informa que los dispositivos PPP estn siendo

  Esto no es un problema. Este mensaje es el resultado de la llamada que
  hace el driver de PPP al procedimiento unregister_netdev. Esta llamada
  permite al driver de PPP solicitar dinmicamente el nmero de
  dispositivos que sean necesarios. No hay un lmite real sobre el
  nmero de ellos a crear. Por poner un lmite, se ha elegido el valor
  de 256 dispositivos. Si encuentra que este nmero es pequeo, entonces
  debe cambiar el #define que se encuentra en el fichero ppp.c y poner
  el valor que desee. Este ser el nmero de dispositivos que sern
  cargados dinmicamente.

  13.11.  dispositivo PPP.  Donde estn ?.  Acabo de comprobar que
  /proc/net/dev  no tiene ningn

  No estn en ningn sitio. Fueron desconectados durante el arranque del
  sistema. Vea la pregunta anterior para ms informacin.

  14.  Rutado con redes locales (usando PPP como un "bridge" econmico).

  14.1.  Slattach  e ifconfig  no funcionan como con SLIP.

  No utilice slattach ni ifconfig con PPP. Estos programas se usan con
  SLIP. El proceso pppd realiza las funciones de estos programas en el
  momento adecuado. Estas funciones deben realizarse despus de que se
  hayan intercambiado los protocolos LCP e IPCP entre las mquinas que
  realizan la conexin.

  Usted no puede reemplazar ifconfig y slattach por pppd. La mayoria de
  los protocolos que se usan con PPP residen dentro del cdigo de pppd.
  Slo el protocolo IP ( y el IPX cuando est terminado ) residen dentro
  del kernel.

  La ruta de host (host route) al sistema remoto la aade
  automticamente pppd. No hay ninguna posibilidad de no aadir esta
  ruta. El proceso pppd terminar si no puede definirla y aadirla a la
  tabla de rutas del sistema.

  La ruta por defecto (default route) puede ser o no aadida. Esto se
  controla con la opcion defaultroute. Si ya exista una ruta por
  defecto anterior, pppd no definir una nueva, sino que conservar la
  ya existente.

  Si quiere gobernar el rutado para una red entera, ponga el comando
  route dentro del script /etc/ppp/ip-up. Los parmetros de este script
  son:

    $0 : nombre del script que se esta ejecutando (/etc/ppp/ip-up o
     /etc/ppp/ip-down ).

    $1 : nombre del dispositivo de red (ppp0 por ejemplo).

    $2 : nombre del dispositivo tty (/dev/cua0 por ejemplo).

    $3 : velocidad del dispositivo tty en bits por segundo (14400 por
     ejemplo).

    $4 : la direccin IP local (en formato xxx.yyy.zzz.vvv).

    $5 : la direccion IP remota (en formato xxx.yyy.zzz.vvv).

    $6 : el valor del parmetro ipparam.

  14.2.  Quiero definir una ruta a la red entera y no slo a un host de
  esa red.

  Existe en sunsite un paquete llamado devinfo.tar.gz que contiene una
  serie de pequeas utilidades que extraen datos sobre el dispositivo de
  red que se est usando y, junto con las direcciones IP del enlace,
  proporcionan informaciones muy tiles.  La documentacin se encuentra
  en las pginas man del paquete.

  Por ejemplo, si quiere rutar el dominio entero de direcciones IP en la
  red remota, haga lo siguiente en el script /etc/ppp/ip-up.
  Naturalmete, si los valores no son variables sino fijos, entonces
  simplemente use esos valores en las entradas apropiadas del comando
  route.

         # Obtener la mascara de red (netmask) para el dispositivo ppp0 (o cualquier otro).
         NETMASK = "devinfo -d $1 -t mask"
         # Obtener el dominio IP (sin la direccion del host eliminando los bits extra)
         DOMAIN = "netmath -a $5 $NETMASK"
         # Creamos la network route ahora que ya se sabe el dominio IP
         route -net add $DOMAIN gw $5

  15.  Otras caractersticas y protocolos.

  15.1.   Existe soporte para demand dial  ?.

  Utilice el paquete
  ftp://sunsite.unc.edu/pub/Linux/system/Network/serial. Est en
  sunsite, en el mismo directorio que el cdigo fuente de PPP.

  15.2.   Existe soporte para filtrado ( filtering ) ?.

  No hay intencin de implementar filtrado dentro del cdigo de PPP.  La
  versin 1.3 del kernel soporta una opcin firewall que debra usar en
  vez de buscar un mtodo de embutir la lgica de funcionamiento de un
  cortafuegos (firewall) dentro de un dispositivo de red. Puede usar
  bien ipfw, bien ipfwadm para definir las reglas que gobiernan el
  funcionamiento del cortafuegos que est dentro del kernel.

  15.3.   Existe soporte para IPX ?.

  El soporte IPX sera muy fcil de implementar. Esto se est haciendo
  en la actualidad, gracias, sobre todo, al apoyo de Caldera
  <http://www.caldera.com>.

  15.4.   Existe soporte para NetBIOS ?.

  Hay definido un protocolo PPP para NetBIOS. Sin embargo, la solucin
  ptima consiste en usar TCP/IP y la aplicacin samba.

  Microsoft y otras compaas han usado el protocolo PPP de NetBIOS.

  El protocolo nbfcp y su documentacin son de libre acceso y puede
  obtenerse de numerosas fuentes. El protocolo NetBIOS no es una familia
  de protocolos vlidos actualmente para Linux. Hasta que Linux lo
  soporte, no hace mucha falta el soporte de NetBIOS en el PPP de Linux.

  15.5.   Existe soporte para ISDN ?.

  Para que se soporte ISDN se necesita un driver ISDN que funcione. El
  diseo actual del driver PPP no se adapta bien al concepto ISDN de
  recepcin de bloques de datos. Esto est cambiando. Un driver para el
  interfaz Sonix se est desarrollando actualmente.

  15.6.   Existe soporte para multipuntos (multi-point) ?.

  Multi-point sera una caracterstica muy til para el PPP de Linux.
  Sin embargo, el autor no tiene conocimiento de nadie que est
  intentando construir este tipo de soporte actualmente.

  15.7.   Existe soporte para PPP sncrono ?.

  Son necesarios pequeos cambios para soportar un interfaz serial con
  comunicacin sncrona. El rediseo que se est haciendo del driver PPP
  est tambin orientado hacia este fin.  Kate Marika Alhola ha mostrado
  su inters en escribir este soporte.  Debera contactar con ella
  (kate@digiw.fi) para ms informacin.

  Actualmente, Kate ha informado al autor que este driver est ya en
  fase de pruebas, funcionando con mquinas Cisco(TM) y con velocidades
  de 64K y 256K. El cdigo fuente del programa se encuentra bajo la
  licencia GPL de la GNU y puede encontrarse en nic.funet.fi
  <ftp://nic.funet.fi/pub/Linux/kernel/xnet-sync-driver-1.0.tar.gz>

  16.  Miscelnea

  16.1.   Existe un lector de correo compatible con PPP ?.

   Uh ?. PPP no tiene nada que ver con el mail user agent (el programa
  que le presenta el correo en pantalla). Todos estos programas son
  compatibles con PPP.

  16.2.   Y un lector de news ?.

  Vuelva a leer la pregunta anterior.

  17.  Preguntas sobre chat .

  17.1.  Mi mdem no marca cuando ejecuto chat .

  El mdem debe encontrarse en modo comando para poder marcar. Si su
  mdem ya est en linea, los comandos de marcado se envan al sistema
  remoto como si fuesen datos normales.

  Si es posible, configure su mdem para que monitorice la seal DTR y
  retorne al modo de comandos cuando se desactive esta seal. Esto
  permitir al ordenador forzar al mdem para que vuelva al modo de
  comandos cuando el proceso pppd termine como resultado del fin de la
  conexin. De este modo, se asegura que el mdem se queda en el estado
  adecuado para que chat pueda marcar.

  Si no puede cambiar la configuracin del mdem, entonces debera
  cambiar la secuencia de marcado para que se parezca a la siguiente.
  Esta secuencia se asegura que el mdem est en modo comando antes de
  intentar enviar la secuencia de marcado al mdem.

        TIMEOUT 3 "" \rAT
       OK-+++\c-OK AT&D2&C1 TIMEOUT 60 OK ATDT555-1212 CONNECT

  Esta secuencia cambia el temporizador de alarma a 3 segundos. Este
  valor se acomoda al tiempo requerido por la mayora de los mdem para
  responder. Tras esto, enva un AT al mdem para esperar su respuesta
  OK. Si esto no sucede en el tiempo especificado en el TIMEOUT (3
  segundos), manda la secuencia +++ al mdem y espera de nuevo una
  respuesta OK del mdem. Una vez recibida la confirmacin del mdem,
  configura el mdem adecuadamente, restablece el TIMEOUT y marca (por
  tonos) el nmero de telfono (555-1212).

  17.2.  El mdem solo marca en el segundo intento.

  Vea la pregunta anterior. Generalmente esto suele ser causado por el
  mismo problema que el descrito en la pregunta anterior.

  17.3.  y nunca enva el password.  El script de chat  se para tras
  enviar el login al sistema remoto

  Algunos sistemas, especialmente SCO, vacan los buffers de recepcin
  justo tras escribir el prompt de entrada del login y del password.
  Chat normalmente transmite la respuesta al prompt nada ms ver este
  prompt. El resultado de todo esto es que la respuesta que ha enviado
  chat se pierde al vaciarse el buffer. Como el sistema remoto no ha
  recibido el login, no pregunta por el password y como chat est
  esperando precisamente eso, se ha llegado a un estado de bloqueo.

  La solucin es sencilla. Enleztezca las respuestas de chat, de tal
  forma que haya tiempo en el sistema remoto para vaciar su buffer antes
  de que chat enve la respuesta. Para hacer esto, cambie las cadenas de
  respuesta del script a algo como esto:

       ogin:--ogin: \d\daccount assword: \d\dhello2u2

  Donde cada \d representa un retraso (delay) de un segundo a esperar
  por chat antes de enviar la respuesta.

  18.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Traducido el 16-XI-1997.  Pilot COMO
  David H. Silber pilot@orbits.com
  v0.5, 17-VIII-1997.

  Este documento explica cmo usar su PalmPilot con un sistema Linux. A
  pesar de que los documentos COMO estn orientados al uso del sistema
  operativo Linux, ste en particular no depende de la versin de Unix
  utilizada.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Este documento

  1.2.    Lista de correo

  1.3.    Archivos de la lista de correo

  1.4.    Servidor FTP

  2.      Informacin General

  2.1.    Qu es un Pilot?

  2.2.    Diferentes tipos de Pilot

  2.3.    Instalacin del Hardware

  3.      Cmo compartir datos del Pilot con su sistema Linux

  3.1.    El programa pilot-link

  3.1.1.  Instalacin del programa pilot-link

  3.1.2.  Uso del programa pilot-link

  3.1.2.1.        pilot-xfer

  3.1.2.2.        install-memo

  3.1.2.3.        memos

  3.1.2.4.        pilot-addresses

  3.2.    makedoc

  3.2.1.  Instalacin de makedoc

  3.2.2.  Uso de makedoc

  3.3.    PilotManager

  4.      Herramientas para desarrollo de software para el Pilot

  4.1.    prc-tools

  4.1.1.  Instalacin de prc-tools

  4.1.2.  Uso de prc-tools

  5.      Gente

  6.      Anexo: El INSFLUG
  ______________________________________________________________________
  1.  Introduccin

  El Pilot se distribuye con software para sincronizar su memoria con
  los datos de un sistema Microsoft Windows. Opcionalmente se puede
  adquirir software para realizar la sincronizacin con ordenadores
  Macintosh de Apple.  La comunidad Linux/Unix ha sido ignorada por los
  fabricantes del Pilot.  Afortunadamente, ha sido desarrollado una
  serie de software gratuito para cubrir esta necesidad. Este documento
  describe dicho software, dnde obtenerlo y cmo instalarlo y usarlo.

  1.1.  Este documento

  La ltima versin de este documento puede obtenerse en
  parte del Linux Documentation Project (LDP). Vea
  http://sunsite.unc.edu/LDP/ para obtener ms informacin sobre el LDP
  y otros documentos HOWTO.

  Las versiones futuras cubrirn ms herramientas Unix para el
  desarrollo de programas de aplicacin que puedan ser ejecutados en el
  Pilot, as como sistemas para la transferencia de datos entre el
  sistema Unix y el Pilot.

  Si encuentra algo en este documento que necesite ser corregido o mejor
  explicado, por favor enveme un mensaje de correo electrnico a la
  direccin indicada anteriormente y especifique a qu versin de este
  documento se est refiriendo.

  Este documento es Copyright  1997 David H. Silber. Est publicado
  bajo los trminos de copyright que aparecen en el documento LDP HOWTO-
  INDEX.

  1.2.  Lista de correo

  La lista de correo pilot-unix es mantenida por Matthew Cravit pilot-
  unix-owner@lists.best.com.  Su introduccin es:

  La lista de correo pilot-unix es para la discusin y comparticin de
  ideas de aquellos interesados en el uso de los PDAs Pilot de US
  Robotics con sistemas UNIX. Esto incluye a la gente que est
  interesada en ayudar a desarrollar herramientas que permitan al Pilot
  operar con UNIX, y posiblemente desarrollar un SDK para el Pilot en
  entornos Unix.

  Para obtener ms informacin, incluyendo el cmo suscribirse a la
  lista, enve un mensaje con la palabra "INFO" a pilot-unix-
  request@lists.best.com. La lnea de tema no importa.

  1.3.  Archivos de la lista de correo

  Puede encontrar un archivo con todos los mensajes de la lista de
  correo pilot-unix en
  mantenido por Chris Stevens, albert@acm.rpi.edu.

  1.4.  Servidor FTP

  Hay disponible un servidor FTP con herramientas para usar el Pilot en
  sistemas Unix en
  mantenido por Jeff Dionne, jeff@ryeham.ee.ryerson.ca.

  2.  Informacin General

  2.1.  Qu es un Pilot?

  El Pilot es un pequeo Asistente Personal Digital. Est fabricado por
  U.S.  Robotics, ahora parte de 3Com.

  Para los que no estn familiarizados con el trmino, un Asistente
  Personal Digital es uno de esos pequeos dispositivos electrnicos que
  contienen normalmente varios tipos de informacin personal, como
  pueden ser direcciones y nmeros de telfono, un calendario, lista de
  recordatorios y/o apuntes y est diseado para ser transportado
  cmodamente as como estar a mano cuando la informacin se requiera.

  Los PDAs ms verstiles, como el Pilot, permiten que los datos
  almacenados en el PDA sean copiados a otro ordenador y que otros datos
  y nuevos programas sean instalados en el PDA desde un ordenador.

  2.2.  Diferentes tipos de Pilot

  Hay cuatro versiones del Pilot. Los dos ms antiguos, el 1000 y el
  5000 tienen 128k y 512k de RAM respectivamente.

  Los dos ms recientes, el PalmPilot Personal y el PalmPilot
  Professional tienen 512k y 1 Mb de RAM respectivamente. Tambin tienen
  una pantalla LCD retroiluminada y la versin 2.0 del sistema
  operativo. El Professional tambin incorpora soporte para el protocolo
  TCP/IP e incluye algunos programas adicionales.

  Es posible actualizar cualquier Pilot cambindole la tarjeta de
  memoria, la cual incluye tanto la RAM como la ROM. Por supuesto, esto
  no har que los pilots antiguos tengan una pantalla retroiluminada.

  2.3.  Instalacin del Hardware

  Los Pilot vienen con un "soporte" para el intercambio de datos con el
  ordenador de sobremesa. Este dispositivo es realmente un cable serie
  con un receptculo hecho a medida para colocar el Pilot y con un botn
  de "sincronizacin". Conecte su soporte a un puerto serie libre del
  ordenador. Cuando ejecute alguno de los programas, necesitar colocar
  su Pilot en el soporte y pulsar el botn de sincronizacin para que el
  Pilot sepa que se tiene que comunicar. Si se pulsa el botn estando el
  Pilot apagado, ste se encender automticamente.

  Por comodidad, cree un dispositivo, /dev/pilot que ser un nombre
  alternativo para el puerto serie donde el soporte del Pilot est
  conectado. Ejecute lo siguiente como root:

               ln /dev/cua0 /dev/pilot

  Sustituya cua0 con el nombre del puerto al cual tenga conectado su
  soporte del Pilot.

  3.  Cmo compartir datos del Pilot con su sistema Linux

  3.1.  El programa pilot-link

  El conjunto de utilidades disponibles en el paquete pilot-link le
  permitirn instalar programas en su Pilot, y transferir datos
  relativos a varias de las aplicaciones instaladas en el Pilot entre su
  sistema Linux y el Pilot. Aunque estos programas no estn tan
  elaborados como los que se distribuyen con el Pilot, le permitirn
  copiar sus datos en ambas direcciones. En general, cada programa
  individual maneja un tipo de datos.  El programa PilotManager est
  construido sobre el pilot-link y ofrece una solucin ms integrada,
  entre sus caractersticas se incluye la sincronizacin completa de
  varios tipos de datos.

  3.1.1.  Instalacin del programa pilot-link

  Las versiones empaquetadas siempre irn inevitablemente ligeramente
  retrasadas respecto a la distribucin original, pero sern ms fciles
  de instalar y no requieren configuracin. La distribucin original
  ser la mejor eleccin en aquellas raras ocasiones en las que haya
  estado esperando una nueva caracterstica o el arreglo de algn fallo.

  Puede obtener el paquete Debian de la versin 0.7.2 del programa
  pilot-link en ftp://ftp.debian.org/pub/debian/hamm/hamm/binary-
  i386/otherosfs/pilot-link_0.7.2-1.deb Instale este archivo de la
  manera habitual y pase directamente a usar el programa.

  Puede obtener el paquete RedHat de la versin 0.7.6 del programa
  pilot-link en
  ftp://ftp.redhat.com/pub/contrib/i386/pilot-link-0.7.6-2.i386.rpm.
  Instale este archivo de la manera habitual y pase directamente a usar
  el programa.

  Para otras versiones de Linux o Unix, obtenga la versin 0.8.2 del
  programa pilot-link de ftp://ryeham.ee.ryerson.ca/pub/PalmOS/pilot-
  link.0.8.2.tar.gz.  El nmero de versin es probable que cambie, pero
  las nuevas versiones estarn en el mismo lugar y con un nombre
  similar.

  Una vez que tenga la distribucin del programa, descomprmalo con:

               tar -xvzf pilot-link.0.8.2.tar.gz

  Esto crear un directorio (pilot-link.0.8.2) conteniendo los fuentes.

  Ejecute ./configure. Esto buscar por su sistema la informacin
  necesaria para compilar el programa. Por defecto la configuracin se
  realizar de tal manera que la instalacin posterior se realizar en
  el directorio /usr/local. Si quiere cambiar el directorio, ejecute
  nombre del directorio en el cual quiera que se instale el programa.

  Ejecute make. Con esto compilar el programa. El programa no se
  instalar hasta un poco ms tarde, de tal manera que pueda probarlo
  primero. (Si est reemplazando una versin anterior con una nueva
  versin, debe asegurarse que todas las funcionalidades que necesite
  funcionan correctamente. Generalmente, esto no es un problema.)

  Siendo el usuario root, ejecute make install. Este comando copiar los
  ficheros del programa en /usr/local (o donde haya indicado mediante la
  opcin --prefix). Si no puede acceder al sistema como root, puede
  instalar el programa en cualquier directorio en el que tenga derechos
  de escritura.

  No olvide aadir a su camino de bsqueda todo directorio nuevo que
  haya creado en el que estn almacenados ejecutables.

  3.1.2.  Uso del programa pilot-link

  La mayora de programas incluidos en el paquete pilot-link transfieren
  datos desde o hacia su Pilot.

  Cada vez que se use uno de estos programas, pulse el botn de
  sincronizacin HotSync del soporte de su Pilot. Esto iniciar la
  transferencia de datos en lo concerniente al Pilot. Observe que no
  todos estos programas le avisan de que pulse el botn de
  sincronizacin, por lo tanto debe acordarse usted mismo de hacerlo.

  Para obtener ms detalles, y para cualquier otra opcin de estos
  programas, consulte la correspondiente pgina del manual. Para el
  programa pilot-xfer, por ejemplo, teclee man pilot-xfer en la lnea de
  comandos.

  Si va a usar PilotManager, no se tiene que preocupar en aprender a
  usar estas utilidades.

  3.1.2.1.  pilot-xfer

  Posiblemente ste sea el programa ms til de los que se compone el
  paquete pilot-link. pilot-xfer permite instalar programas en el Pilot,
  realizar copias de seguridad, y restaurar esas copias de seguridad.

  Para instalar un programa:

               pilot-xfer /dev/pilot -i programa.prc

  Para realizar una copia de seguridad del Pilot:

               pilot-xfer /dev/pilot -b directorio-backup

  Este comando copiar todas las bases de datos que estn en el Pilot a
  un directorio llamado "directorio-backup", crendolo si ste no
  existe.

  Para restaurar datos en el Pilot:

               pilot-xfer /dev/pilot -r directorio-backup

  Normalmente, se tendr nicamente que hacer esta operacin si al Pilot
  se le acaban totalmente las bateras o si ha sido necesario
  reinicializarlo.

  Para listar los programas instalados en el Pilot:

               pilot-xfer /dev/pilot -l

  3.1.2.2.  install-memo

  Instala un archivo en el Pilot como una nota.

  Para instalar una nota en una categora ya existente:

               install-memo /dev/pilot -c categoria nota

  El nombre del archivo se insertar en la nota como su primera lnea y
  aparecer en el directorio de notas del Pilot.

  3.1.2.3.  memos

  Este programa captura cada nota presente en el Pilot y la muestra en
  el formato estndard de fichero de correo.

  Para ver las notas:

               memos /dev/pilot

  3.1.2.4.  pilot-addresses

  pilot-addresses transfiere la base de datos de direcciones hacia o
  desde el Pilot.

  Para leer la base de datos de direcciones del Pilot y escribirla en un
  archivo:

               pilot-addresses /dev/pilot -w archivo

  Para leer la base de datos de direcciones de un fichero y almacenarla
  en el Pilot:

               pilot-addresses /dev/pilot -r archivo

  3.2.  makedoc

  Una limitacin del programa de notas incorporado en el Pilot es que no
  maneja bien documentos grandes. Para compensar esto, Rick Bram
  mailto:rbram@concentric.net escribi Doc, un lector de documentos para
  el Pilot (consulte http://www.concentric.net/~rbram/doc.shtml).
  Cualquier documento puede ser convertido al formato de Doc con
  MakeDoc, de Pat Beirne pat.beirne@sympatico.ca.

  3.2.1.  Instalacin de makedoc

  MakeDoc puede obtenerse de
  http://www.concentric.net/~rbram/makedoc7.cpp.  Complelo con un
  compilador de C++ e instale el ejecutable resultante bajo el nombre
  "makedoc" en cualquier directorio incluido en su camino de bsqueda.
  Parece ser que hay un pequeo fallo en makedoc (versin 0.7a) que
  ocasiona que no se muestre un retorno de carro como ltimo caracter
  mostrado al usuario. Esto parece que no afecta al documento que se
  obtiene en el archivo, pero es molesto.

  Hay una nueva versin, pero necesita Java. Consulte la pgina web que
  tiene Pat Beirne sobre MakeDoc en
  http://cpu563.adsl.sympatico.ca/MakeDocJ.htm.

  3.2.2.  Uso de makedoc

  Use MakeDoc de la siguiente forma:

               makedoc documento.txt documento.prc "Titulo del documento"

  Este comando crear un archivo documento.prc que puede ser instalado
  en el Pilot usando pilot-xfer. El texto "Titulo del documento" se
  mostrar en el directorio de documentos que maneje Doc.

  La sintaxis de MakeDoc es como sigue:

               makedoc [-n] [-b] <archivo-texto> <archivo-prc> <titulo-documento>

  o bien

               makedoc -d [-b] <archivo-prc> <archivo-texto>

     archivo-texto
        es el archivo que se desea convertir.

     archivo-prc
        es el nombre del archivo resultante. (El nombre debe terminar en
        ".prc").

     titulo-documento
        el nombre que se quiere que sea mostrado en el directorio de
        documentos de Doc o Jdoc.

  Hay tambin opciones para decodificar el fichero .prc resultante y
  para manejar varias opciones de compresin.

  3.3.  PilotManager

  PilotManager es una herramienta de uso general que permite sincronizar
  varias bases de datos en una nica transferencia.

  No me ha sido posible compilar e instalar PilotManager a tiempo para
  escribir sobre l en esta versin del Pilot-COMO.

  Algunos enlaces que pueden ser de ayuda:

    El paquete PilotManager:
     http://playground.sun.com/~bharat/pilotmgr.html

    Un parche:
     ftp://ftp.orbits.com/pub/Pilot/pilotmgr,v1.009-BETA-3.patch

     Este parche para el PilotManager est nicamente pensado para ser
     aplicado a la versin 1.009 Beta 3 cuando es usado conjuntamente
     con la versin 0.8.0 del pilot-link. Instale los fuentes del
     PilotManager y aplique el parche con los siguientes comandos:

               tar -xvzf pilotmgr,v1.009-BETA-3.dev.tar.gz
               cd pilotmgr,v1.009-BETA-3
               patch -p1 < ../pilotmgr,v1.009-BETA-3.patch

  Espero poder instalar este programa en breve y comentarlo en una
  futura versin de este documento.

  4.  Herramientas para desarrollo de software para el Pilot

  4.1.  prc-tools

  El paquete prc-tools es un entorno de desarrollo completo construido a
  partir de las utilidades, compilador y depurador de GNU con la
  incorporacin de algunas otras herramientas especiales.

  No hay mucho en lo referente a documentacin, pero sera recomendable
  que visitase la pgina web Pilot Software development en
  http://www.massena.com/darrin/pilot/

  4.1.1.  Instalacin de prc-tools

  Obtenga la versin ms reciente de prc-tools de
  ftp://ryeham.ee.ryerson.ca/pub/PalmOS. Las herramientas GNU se pueden
  conseguir en ftp://prep.ai.mit.edu/pub/gnu. Debe coger los archivos
  binutils-2.7.tar.gz, gcc-2.7.2.2.tar.gz y gdb-4.16.tar.gz.  Las
  versiones indicadas de las herramientas GNU son las correctas para la
  versin 0.5.0 de prc-tools. Las versiones posteriores de prc-tools
  podran necesitar versiones ms recientes de las herramientas GNU.

  Ponga todos los archivos en un directorio. Descomprima slo el archivo
  de prc-tools. El archivo Makefile de prc-tools usar el resto de los
  archivos. Por defecto, prc-tools ser instalado en /usr/local/gnu. Si
  quiere que sea instalado en algn otro lugar, deber cambiar el valor
  de INSTALLDIR en el archivo Makefile. Los pasos a dar son:

               tar -xvzf prc-tools.0.5.0.tar.gz
               cd prc-tools-0.5.0

  Editar el archivo Makefile si es necesario.

               make doeverything

  4.1.2.  Uso de prc-tools

  Una buena referencia para el uso general de prc-tools es el directorio
  de ejemplos, y el archivo Makefile en particular. La documentacin
  para PilRC se encuentra en el archivo pilrc1.5/doc/pilrc.htm incluido
  como parte de la versin 0.5.0 de prc-tools.

  5.  Gente

  Kenneth Albanowski kjahds@kjahds.com Mantiene el conjunto de
  herramientas pilot-link.

  Donnie Barnes djb@redhat.com Empaquet el conjunto de herramientas
  pilot-link como paquete RedHat.

  Rick Bram rbram@concentric.net Autor de Doc.

  Matthew Cravit pilot-unix-owner@lists.best.com Propietario de la lista
  de distribucin pilot-unix.

  Jeff Dionne jeff@ryeham.ee.ryerson.ca Autor original del conjunto de
  herramientas pilot-link. Administra el FTP dedicado al projecto de
  desarrollo PalmOS/Pilot para UNIX.

  Mark W. Eichin eichen@kitten.gen.ma.us Realiz la conversin de pilot-
  link a Debian.

  David H. Silber pilot@orbits.com Autor de este documento.

  Chris Stevens albert@acm.rpi.edu Mantiene los recopilatorios de la
  lista de distribucin pilot-unix.

  6.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  CMO Programar el puerto serie en Linux
  por Peter H. Baumann, Peter.Baumann@dlr.de
  traduccin de Pedro Pablo Fbrega pfabrega@arrakis.es
  v0.3, 14 Junio 1997

  Este documento describe cmo programar comunicaciones con dispositivos
  sobre puerto serie en una mquina Linux.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Copyright

  1.2.    Versiones futuras de este Documento

  1.3.    Revisin

  2.      Comenzando

  2.1.    Depuracin

  2.2.    Configuracin del Puerto

  2.3.    Conceptos de entrada para dispositivos serie

  2.3.1.  Proceso de Entrada Cannico

  2.3.2.  Proceso de Entrada No Cannico

  2.3.3.  Entrada Asncrona

  2.3.4.  Espera de Entradas Origen Mltiple

  3.      Programas Ejemplo

  3.1.    Proceso de Entrada Cannico

  3.2.    Proceso de Entrada NO Cannico

  3.3.    Entrada Asncrona

  3.4.    Espera de Entradas de Origen Mltiple.

  4.      Otras fuentes de Informacin

  5.      Contribuciones

  5.1.    Traduccin

  6.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Este es el COMO Programar el puerto serie en Linux. Todo sobre cmo
  programar comunicaciones con otros dispositivos/ordenadores sobre una
  lnea serie, bajo Linux. Explicaremos diferentes tcnicas: E/S
  Cannica (slo se transmiten/reciben lneas completas), E/S asncrona,
  y espera para una entrada de origen mltiple.

  Este documento no describe cmo configurar un puerto serie, ya que
  esto ha sido descrito por Greg Hankins en el Serial-HOWTO (--
  Disponible en castellano como Serie-COMO.--)
  Tengo que hacer notar encarecidamente que no soy un experto en este
  campo, pero he tenido problemas con un proyecto que necesitaba tales
  comunicaciones. Los ejemplos de cdigo aadidos aqu se derivaron del
  cdigo de miniterm disponible en la gua de programadores del Linux
  Documentation Project:

  (ftp://sunsite.unc.edu/pub/Linux/docs/LDP/programmers-guide/ y
  espejos)  en el directorio de ejemplos. Si alguien tiene algn
  comentario, con gusto lo incorporar a este documento (ver seccin
  ``'').

  Todos los ejemplos fueron comprobados usando un ncleo Linux 2.0.29
  sobre un i386.

  1.1.  Copyright

  El CMO Programar el puerto serie en Linux es propiedad inteletual (C)
  1997 de Peter Baumann.  Los documentos Linux HOWTO - Linux COMO pueden
  ser reproducidos y distribuidos completos o en parte, en cualquier
  medio fsico o electrnico, con la nica condicin de que mantengan
  esta nota de propiedad intelectual en todas sus copias. La
  redistribucin comercial est permitida y fomentada; de todas formas
  al autor le gustara que se le notificaran tales distribuciones.

  Todas las traducciones, trabajos derivados o trabajos agregados que
  incorporen cualquier documento Linux HOWTO-Linux COMO debe estar
  cubierto por esta nota de propiedad intelectual. En resumen, no puede
  crear un trabajo derivado de un HOWTO-COMO e imponer restricciones
  adicionales a su distribucin. Se pueden conceder excepciones a estas
  reglas bajo ciertas condiciones; por favor contacte con el coordinador
  de los HOWTO en la direccin dada abajo.

  Resumiendo, queremos promover la difusin de esta informacin a travs
  de tantos canales com sea posible. No obstante queremos retener la
  propiedad intelectual de los docuentos HOWTO-COMO, y nos gustara que
  se nos notificara cualquier plan para redistribuir los HOWTO-COMO.

  Si tiene preguntas, por favor contacte con Greg Hankins, el
  coordinador de los HOWTO de Linux, en gregh@sunsite.unc.edu mediante
  correo electrnico.

  1.2.  Versiones futuras de este Documento

  Las nuevas versiones de COMO Programar el puerto serie en Linux
  estarn disponibles en:
  ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO/Serial-Programming-HOWTO y
  sus espejos.  Hay otros formatos, como versiones PostScript y DVI en
  el directorio other-formats.

  CMO Programar el puerto serie en Linux tambin est disponible en
  http://sunsite.unc.edu/LDP/HOWTO/Serial-Programming-HOWTO.html y ser
  enviado a comp.os.linux.answers mensualmente.

  1.3.  Revisin

  Por favor, mndeme cualesquiera correccin, pregunta, comentario,
  sugerencia o material adicional. Me gustara mejorar este HOWTO-COMO.
  Dgame exactamente qu es lo que no entiende, o qu debera estar ms
  claro. Me puede encontrar en Peter.Baumann@dlr.de va email. Por
  favor, incluya el nmero de versin del CMO Programar el puerto serie
  en Linux cuando escriba. Esta es la versin 0.3.

  2.  Comenzando

  2.1.  Depuracin

  La mejor forma de depurar su cdigo es configurar otra mquina Linux y
  conectar los dos ordenadores mediante un cable null-mdem.

  Use miniterm, disponible en el LDP Programmers Guide:
  (ftp://sunsite.unc.edu/pub/Linux/docs/LDP/programmers-guide/
  en el directorio de ejemplos) para transmitir caracteres a su mquina
  Linux. Miniterm se puede compilar con mucha facilidad y transmitir
  todas las entradas en bruto del teclado por el puerto serie.

  Slo las sentencias define (#define MODEMDEVICE "/dev/ttyS0") tienen
  que ser comprobadas.  Ponga ttyS0 para COM1, ttyS1 para COM2, etc.. Es
  esencial para comprobar que todos los caracteres se transmiten en
  bruto (sin un procesamiento de salida) por la lnea. Para comprobar su
  conexin, inicie miniterm en ambos ordemadores y teclee algo.  Los
  caracteres introducidos en un ordenador deberan aparecer en el otro y
  viceversa. La entrada no tendr eco en la pantalla del ordenador en el
  que escribamos.

  Para hacer un cable null-modem tiene que cruzar las lneas TxD
  (transmit) y RxD (receive). Para una descripcin del cable vea el
  Serie-COMO.

  Tambin es posible ejecutar estas comprobaciones con un slo
  ordenador, si tiene un puerto serie no utilizado. Puede ejecutar dos
  miniterm en sendas consolas virtuales. Si libera un puerto serie
  desconectando el ratn, recuerde redirigir /dev/mouse, si existe. Si
  usa una tarjeta multipuerto serie, est seguro de configurarla
  correctamente. Yo tena la ma mal configurada, y todo funcionaba bien
  mientras haca las comprobaciones en un slo ordenador. Cuando lo
  conect a otro, el puerto empez a perder caracteres. La ejecucin de
  dos programas en un ordenador nunca es completamente asncrona.

  2.2.  Configuracin del Puerto

  Los dispositivos /dev/ttyS* tienen como misin conectar terminales a
  su linux, y estn configurados para este uso al arrancar.  Hay que
  tener esto presente cuando se programen comunicaciones con un
  dispositivo. Por ejemplo, los puertos estn configurados para escribir
  en pantalla cada carcter enviado desde el dispositivo, que
  normalmente tiene que ser cambiado para la transmisin de datos.

  Todos los parmetros se pueden configurar fcilmente con un programa.
  La configuracin se guarda en una estructura struct termios, que est
  definida en <asm/termbits.h>:

  #define NCCS 19
  struct termios {
        tcflag_t c_iflag;         /* parametros de modo entrada */
        tcflag_t c_oflag;         /* parametros de modo salida */
        tcflag_t c_cflag;         /* parametros de modo control */
        tcflag_t c_lflag;         /* parametros de modo local */
        cc_t c_line;              /* disciplina de la linea */
        cc_t c_cc[NCCS];          /* caracteres de control */
  };

  Este archivo tambin incluye todas las definiciones de parmetros. Los
  parmetros de modo entrada de c_iflag manejan todos los procesos de
  entrada, lo cual significa que los caracteres enviados desde el
  dispositivo pueden ser procesados antes de ser ledos con read.

  De forma similar c_oflag maneja los procesos de salida.  c_cflag
  contiene la configuracin del puerto, como la velocidad en baudios,
  bits por carcter, bits de parada, etc... Los parmetros de modo local
  se guardan en c_lflag. Determinan si el carcter tiene eco, seales
  enviadas al programa, etc...

  Finalmente la tabla c_cc define el carcter de control para el fin de
  fichero, parada, etc... Los valores por defecto de los caracteres de
  control estn definidos en <asm/termios.h>. Los parmetros estn
  descritos en la pgina del manual termios(3).

  La estructura termios contiene los elementos c_line.  Estos elementos
  no se mencionan ni las pginas del manual para termios de Linux ni en
  las pginas de manual de Solaris 2.5. Podra alguien arrojar alguna
  luz sobre esto? No debera estar incluido en la estructura termio?

  2.3.  Conceptos de entrada para dispositivos serie

  Hay tres diferentes conceptos de entrada que queremos presentar. El
  concepto apropiado se tiene que escoger para la aplicacin a la que lo
  queremos destinar. Siempre que sea posible no haga un bucle para leer
  un slo carcter a fin de obtener una cadena completa. Cuando he hecho
  esto, he perdido caracteres, mientras que un read para toda la cadena
  no mostr errores.

  2.3.1.  Proceso de Entrada Cannico

  Es el modo de proceso normal para terminales, pero puede ser til
  tambin para comunicaciones con otros dispositivos. Toda la entrada es
  procesada en unidades de lneas, lo que significa que un read slo
  devolver una lnea completa de entrada. Una lnea est, por defecto,
  finalizada con un NL(ASCII LF), y fin de fichero, o un carcter fin de
  lnea. Un CR (el fin de lnea por defecto de DOS/Windows) no terminar
  una lnea con la configuracin por defecto.

  El proceso de entrada cannica puede, tambin, manejar los caracteres
  borrado, borrado de palabra, reimprimir carcter, traducir CR a NL,
  etc..

  2.3.2.  Proceso de Entrada No Cannico

  El Proceso de Entrada No Cannico manejar un conjunto fijo de
  caracteres por lectura, y permite un carcter temporizador. Este modo
  se debera usar si su aplicacin siempre lee un nmero fijo de
  caracteres, o si el dispositivo conectado enva rfagas de caracteres.

  2.3.3.  Entrada Asncrona

  Los dos modos descritos anteriomente se pueden usar en modos sncrono
  y asncrono. El modo sncrono viene por defecto, donde la sentencia
  read se bloquar hasta que la lectura est completa. En modo asncrono
  la sentencia read devolver inmediatamente y enviar una seal al
  programa llamador cuando est completa. Esta seal puede ser recibida
  por un manejador de seales.

  2.3.4.  Espera de Entradas Origen Mltiple

  No es un modo diferente de entrada, pero puede ser til si est
  manejando dispositivos mltiples. En mi aplicacin manejaba entradas
  sobre un socket TCP/IP y entradas sobre una conexin serie de otro
  ordenador de forma casi simultnea. El programa ejemplo dado abajo
  esperar una entrada de dos orgenes distintos. Si la entrada de una
  fuente est disponible, entonces ser procesada, y el programa
  esperar otra entrada nueva.

  La aproximacin presentada abajo parece ms bien compleja, pero es
  importante tener en cuenta que Linux es un sistema operativo
  multiproceso.  La llamada al sistema select no carga la CPU mientras
  espera una entrada, mientras que un bucle hasta que hay una una
  entrada disponible ralentizara demasiado el resto de procesos que se
  ejecuten a la misma vez.

  3.  Programas Ejemplo

  Todos los ejemplos provienen de miniterm.c. El buffer est limitado a
  255 caracteres, como la longitud mxima de cadena para el proceso de
  entrada cannica.  (<linux/limits.h> o <posix1_lim.h>).

  Vea los comentarios que hay en el cdigo para una explicacin del uso
  de los diferentes modos de entrada. Espero que el cdigo sea
  comprensible. El ejemplo de entrada cannica est mejor comentado, el
  resto de los ejemplos estn comentados slo donde difieren del ejemplo
  de entrada cannica para remarcar las diferencias.

  Las descripciones no son completas, por eso le invito a experimentar
  con los ejemplos para obtener mejores soluciones para su aplicacin.

  No olvide dar los permisos apropiados a los puertos serie:

       chmod a+rw /dev/ttyS1

  3.1.  Proceso de Entrada Cannico

  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <termios.h>
  #include <stdio.h>

  /* la tasa de baudios esta definida en  <asm/termbits.h>, que esta
     incluida <termios.h> */

  #define BAUDRATE B38400

  /* cambie esta definicion por el puerto correcto  */
  #define MODEMDEVICE "/dev/ttyS1"

  #define _POSIX_SOURCE 1 /* fuentes cumple POSIX  */

  #define FALSE 0
  #define TRUE 1

  volatile int STOP=FALSE;

  main()
  {
     int fd,c, res;
     struct termios oldtio,newtio;
     char buf[255];

  /*
        Abre el dispositivo modem para lectura y escritura y no como controlador
        tty porque no queremos que nos mate si el ruido de la linea envia
        un CTRL-C.
  */

     fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY );
     if (fd <0) {  perror(MODEMDEVICE); exit(-1);  }

     tcgetattr(fd,&oldtio); /* almacenamos la configuracion actual del puerto */

     bzero(newtio, sizeof(newtio)); /* limpiamos struct para recibir los
                                          nuevos parametros del puerto */

  /*
        BAUDRATE: Fija la tasa bps. Podria tambien usar cfsetispeed y cfsetospeed.
        CRTSCTS : control de flujo de salida por hardware (usado solo si el cable
        tiene todas las lineas necesarias Vea sect. 7 de Serial-HOWTO)
        CS8     : 8n1 (8bit,no paridad,1 bit de parada)
        CLOCAL  : conexion local, sin control de modem
        CREAD   : activa recepcion de caracteres
  */

     newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;

  /*
        IGNPAR  : ignora los bytes con error de paridad
        ICRNL   : mapea CR a NL (en otro caso una entrada CR del otro ordenador
        no terminaria la entrada) en otro caso hace un dispositivo en bruto
        (sin otro proceso de entrada)
  */

     newtio.c_iflag = IGNPAR | ICRNL;

  /*
        Salida en bruto.
  */
     newtio.c_oflag = 0;

  /*
        ICANON  : activa entrada canonica
        desactiva todas las funcionalidades del eco, y no envia segnales al
        programa
        llamador
  */

     newtio.c_lflag = ICANON;

  /*
        inicializa todos los caracteres de control
        los valores por defecto se pueden encontrar en /usr/include/termios.h,
        y vienen dadas en los comentarios, pero no los necesitamos aqui
  */

     newtio.c_cc[VINTR]    = 0;     /* Ctrl-c */
     newtio.c_cc[VQUIT]    = 0;     /* Ctrl-\ */
     newtio.c_cc[VERASE]   = 0;     /* del */
     newtio.c_cc[VKILL]    = 0;     /* @ */
     newtio.c_cc[VEOF]     = 4;     /* Ctrl-d */
     newtio.c_cc[VTIME]    = 0;     /* temporizador entre caracter, no usado */
     newtio.c_cc[VMIN]     = 1;     /* bloqu.lectura hasta llegada de caracter. 1 */
     newtio.c_cc[VSWTC]    = 0;     /* '\0' */
     newtio.c_cc[VSTART]   = 0;     /* Ctrl-q */
     newtio.c_cc[VSTOP]    = 0;     /* Ctrl-s */
     newtio.c_cc[VSUSP]    = 0;     /* Ctrl-z */
     newtio.c_cc[VEOL]     = 0;     /* '\0' */
     newtio.c_cc[VREPRINT] = 0;     /* Ctrl-r */
     newtio.c_cc[VDISCARD] = 0;     /* Ctrl-u */
     newtio.c_cc[VWERASE]  = 0;     /* Ctrl-w */
     newtio.c_cc[VLNEXT]   = 0;     /* Ctrl-v */
     newtio.c_cc[VEOL2]    = 0;     /* '\0' */

  /*
        ahora limpiamos la linea del modem y activamos la configuracion del
        puerto
  */

     tcflush(fd, TCIFLUSH);
     tcsetattr(fd,TCSANOW,&newtio);

  /*
        configuracion del terminal realizada, ahora manejamos las entradas.
        En este ejemplo, al introducir una  'z' al inicio de linea terminara el
        programa.
  */

     while (STOP==FALSE) {     /* bucle hasta condicion de terminar */

  /*
     bloque de ejecucion de programa hasta que llega un caracter de fin de
     linea, incluso si llegan mas de 255 caracteres.
     Si el numero de caracteres leidos es menor que el numero de caracteres
     disponibles, las siguientes lecturas devolveran los caracteres restantes.
     'res' tomara el valor del numero actual de caracteres leidos.
  */

                            res = read(fd,buf,255);
                            buf[res]=0;             /* envio de fin de cadena, a fin de poder usar printf */
                            printf(":%s:%d\n", buf, res);
                            if (buf[0]=='z') STOP=TRUE;
                         }

  /* restaura la anterior configuracion del puerto  */

     tcsetattr(fd,TCSANOW,&oldtio);
  }

  3.2.  Proceso de Entrada NO Cannico

  En el modo de proceso de entrada no cannico, la entrada no est
  ensamblada en lneas y el procesamiento de la entrada (erase, kill,
  delete, etc.) no ocurre. Dos parmetros controlan el comportamiento de
  este modo:  c_cc[VTIME] fija el temporizador de carcter, y fija el
  nmero mnimo de caracteres a recibir antes de satisfacer la lectura.

  Si MIN > 0 y TIME = 0, MIN fija el nmero de caracteres a recibir
  antes de que la lectura est realizada. Como TIME es cero, el
  temporizador no se usa.

  Si MIN = 0 y TIME > 0, TIME indica un tiempo de espera. La lectura se
  realizar si es ledo un slo carcter, o si se excede TIME (t =TIME
  *0.1 s). Si TIME se excede, no se devuelve ningn carcter.

  Si MIN > 0 y TIME > 0, TIME indica un temporizador entre caracteres.
  La lectura se realizar si se reciben MIN caracteres o el tiempo entre
  dos caracteres excede TIME. El temporizador se reinicia cada vez que
  se recibe un carcter y slo se hace activo una vez que se ha recibido
  el primer carcter.

  Si MIN = 0 y TIME = 0, la lectura se realizar inmediatamente.
  Devolver el nmero de caracteres disponibles en el momento, o el
  nmero de caracteres solicitados. De acuerdo con Antonino (ver
  contribuciones), podra poner un fcntl(fd, F_SETFL, FNDELAY); antes de
  leer para obtener el mismo resultado.

  Modificando newtio.c_cc[VTIME] y newtio.c_cc[VMIN] se pueden comprobar
  todos los modos descritos arriba.

  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <termios.h>
  #include <stdio.h>

  #define BAUDRATE B38400
  #define MODEMDEVICE "/dev/ttyS1"
  #define _POSIX_SOURCE 1 /* fuentes cumple POSIX */
  #define FALSE 0
  #define TRUE 1

  volatile int STOP=FALSE;

  main()
  {
     int fd,c, res;
     struct termios oldtio,newtio;
     char buf[255];

     fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY );
     if (fd <0) {  perror(MODEMDEVICE); exit(-1);  }

     tcgetattr(fd,&oldtio); /* salva configuracion actual del puerto  */

     bzero(newtio, sizeof(newtio));
     newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
     newtio.c_iflag = IGNPAR;
     newtio.c_oflag = 0;

  /* pone el modo entrada (no-canonico, sin eco,...) */

     newtio.c_lflag = 0;

     newtio.c_cc[VTIME]    = 0;   /* temporizador entre caracter, no usado */
     newtio.c_cc[VMIN]     = 5;   /* bloquea lectura hasta recibir 5 chars  */

     tcflush(fd, TCIFLUSH);
     tcsetattr(fd,TCSANOW,&newtio);

     while (STOP==FALSE) {                            /* bucle para entrada */
                            res = read(fd,buf,255);   /* devuelve tras introducir 5 */
                            buf[res]=0;               /* asi podemos printf... */
                            printf(":%s:%d\n", buf, res);
                            if (buf[0]=='z') STOP=TRUE;
                         }
     tcsetattr(fd,TCSANOW,&oldtio);
  }

  3.3.  Entrada Asncrona

  #include <termios.h>
  #include <stdio.h>
  #include <unistd.h>
  #include <fcntl.h>
  #include <sys/signal.h>
  #include <sys/types.h>

  #define BAUDRATE B38400
  #define MODEMDEVICE "/dev/ttyS1"
  #define _POSIX_SOURCE 1 /* fuentes cumple POSIX  */
  #define FALSE 0
  #define TRUE 1

  volatile int STOP=FALSE;

  void signal_handler_IO (int status);   /* definicion del manejador de segnal */
  int wait_flag=TRUE;                    /* TRUE mientras no segnal recibida */

  main()
  {
     int fd,c, res;
     struct termios oldtio,newtio;
     struct sigaction saio;           /* definicion de accion de segnal  */
     char buf[255];

  /* abre el dispositivo en modo no bloqueo (read volvera inmediatamente) */

        fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK);
     if (fd <0) {  perror(MODEMDEVICE); exit(-1);  }

  /* instala el manejador de segnal antes de hacer asincrono el dispositivo */

     saio.sa_handler = signal_handler_IO;
     saio.sa_mask = 0;
     saio.sa_flags = 0;
     saio.sa_restorer = NULL;
     sigaction(SIGIO,&saio,NULL);

  /* permite al proceso recibir SIGIO */

        fcntl(fd, F_SETOWN, getpid());

  /* Hace el descriptor de archivo asincrono (la pagina del manual dice solo
        O_APPEND y O_NONBLOCK, funcionara con  F_SETFL...) */

     fcntl(fd, F_SETFL, FASYNC);
     tcgetattr(fd,&oldtio); /* salvamos conf. actual del puerto */

  /*
        fija la nueva configuracion del puerto para procesos de entrada canonica
  */

     newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
     newtio.c_iflag = IGNPAR | ICRNL;
     newtio.c_oflag = 0;
     newtio.c_lflag = ICANON;
     newtio.c_cc[VMIN]=1;
     newtio.c_cc[VTIME]=0;
     tcflush(fd, TCIFLUSH);
     tcsetattr(fd,TCSANOW,&newtio);

  /* bucle de espera para entrada. Normalmente se haria algo util aqui  */

     while (STOP==FALSE) {
                            printf(".\n");usleep(100000);

  /*
  tras recibir SIGIO, wait_flag = FALSE, la entrada esta disponible y puede ser leida
   */

                  if (wait_flag==FALSE) {
                                     res = read(fd,buf,255);
                                     buf[res]=0;
                                     printf(":%s:%d\n", buf, res);
                                     if (res==1) STOP=TRUE; /* para el bucle si solo entra un CR */
                                     wait_flag = TRUE;      /* espera una nueva entrada */
                                  }
                         }
  /* restaura la configuracion original del puerto  */
        tcsetattr(fd,TCSANOW,&oldtio);
  }

  /***************************************************************************
  * manipulacion de segnales. pone wait_flag a FALSE, para indicar al bucle  *
  * anterior que los caracteres han sido recibidos                           *
  ***************************************************************************/

  void signal_handler_IO (int status)
  {
     printf("recibida segnal SIGIO.\n");
     wait_flag = FALSE;
  }

  3.4.  Espera de Entradas de Origen Mltiple.

  Esta seccin est al mnimo. Slo intenta ser un indicacin, y por
  tanto el ejemplo de cdigo es pequeo. Esto no slo funcionar con
  puertos serie, sino que tambin lo har con cualquier conjunto de
  descriptores de archivo.

  La llamada select y las macros asociadas usan un fd_set.  Esto es una
  tabla de bits, que tiene una entrada de bit para cada nmero de
  descriptor de archivo vlido.  select aceptar un fd_set con los bits
  fijados para los descriptores de archivos relevantes y devuelve un
  fd_set, en el cual los bits para el descriptor del archivo estn
  fijados donde ocurre una entrada, salida o excepcin. Todas la
  manipulaciones de fd_set se llevan a cabo mediante las macros
  proporcionadas. Ver tambin la pgina del manual select(2).

  #include <sys/time.h>
  #include <sys/types.h>
  #include <unistd.h>

  main()
  {
     int    fd1, fd2;  /* origenes de entrada  1 y 2 */
     fd_set readfs;    /* descriptor de archivo */
     int    maxfd;     /* mixmum file desciptor used */
     int    loop=1;    /* bucle mientras TRUE */

  /*
     open_input_source abre un dispositivo, fija el puerto correctamente
     y devuelve un descriptor de archivo
  */

     fd1 = open_input_source("/dev/ttyS1");   /* COM2 */
     if (fd1<0) exit(0);
     fd2 = open_input_source("/dev/ttyS2");   /* COM3 */
     if (fd2<0) exit(0);
     maxfd = MAX (fd1, fd2)+1;  /* entrada maxima de bits (fd) a probar */

  /* bucle para entrada */
        while (loop) {
                        FD_SET(fd1, &readfs);  /* comprobacion origen 1  */
                        FD_SET(fd2, &readfs);  /* comprobacion origen 2 */

  /* bloqueo hasta que la entrada esta disponible  */
                           select(maxfd, &readfs, NULL, NULL, NULL);
                        if (FD_ISSET(fd1))         /* entrada de origen 1 esta disponible */
                           handle_input_from_source1();
                        if (FD_ISSET(fd2))         /* entrada de origen 2 esta disponible */
                           handle_input_from_source2();
                     }

  }

  El ejemplo dado bloquea indefinidamente hasta que una entrada de una
  de las fuentes est disponible. Si necesita un temporizador para la
  entrada, slo sustituya la llamada select por:

       int res;
       struct timeval Timeout;

       /* fija el valor del temporizador en el bucle de entrada  */
       Timeout.tv_usec = 0;  /* milisegundos */
       Timeout.tv_sec  = 1;  /* segundos */
       res = select(maxfd, &readfs, NULL, NULL, &Timeout);
       if (res==0)
       /* numero de descriptores de archivo con input = 0, temporizador sobrepasado */

  Este ejemplo concluye el tiempo de espera tras un segundo. Si este
  tiempo transcurre, select devolver 0, pero tenga cuidado porque
  Timeout se decrementa por el tiempo actualmente esperado para la
  entrada por select. Si el valor de retardo es cero, select volver
  inmediatamente.

  4.  Otras fuentes de Informacin

    El Linux Serie-COMO describe cmo configurar un puerto serie y
     contiene informacin sobre hardware.

    Serial Programming Guide for POSIX Compliant Operating Systems, por
     Michael Sweet.

    La pgina del manual termios(3) describe todos los parmetros de la
     estructura termios.

  5.  Contribuciones

  Como se mencion en la introduccin, no soy un experto en este campo,
  pero he tenido mis propios problemas, y encontr la solucin con la
  ayuda de otras personas. Gracias por la ayuda de Mr. Strudthoff de
  European Transonic Windtunnel, Cologne, Michael Carter,
  mcarter@rocke.electro.swri.edu, y Peter Waltenberg,
  p.waltenberg@karaka.chch.cri.nz

  Antonino Ianella, antonino@usa.net escribi el Serial-Port-Programming
  Mini HOWTO, a la misma vez que yo preparaba este documento. Greg
  Hankins me pidi que incorporara el Mini-Howto de Antonino en este
  documento.

  La estructura de este documento y el formateo SGML provienen del
  Serial-HOWTO de Greg Hankins.

  5.1.  Traduccin

  Este documento ha sido traducido por

  Pedro Pablo Fbrega Martnez, pfabrega@arrakis.es

  Si encontris mejoras, aadidos o fallos, de cualquier tipo,
  indicdmelo para mejorar el documento.

  Insultos > /dev/null

  6.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  El Registro de la Propiedad Intelectual
  Juan Antonio Martnez, jantonio@dit.upm.es
  v1.0, 4 Octubre 1999

  La Propiedad Intelectual se puede definir como el conjunto de derechos
  que corresponden a determinadas personas sobre las obras que son
  creacin de su inteligencia.
  ______________________________________________________________________

  ndice general


  1. Prlogo

     1.1 Presentacin
     1.2 Copyright

  2. Conceptos y definiciones

     2.1 Definiciones
     2.2 Derechos y Deberes
     2.3 Caractersticas

  3. Registro de la propiedad intelectual

  4. Quin puede solicitar la inscripcin?

  5. Requisitos de las solicitudes

  6. Registro competente

  7. Legislacin

  8. Directorio

  9. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Prlogo



  1.1.  Presentacin


  A la hora de escribir mi ensayo La empresa ante el software libre,
  encontr un tema acerca del cual se escribe muy poco en el mundo Open
  Source: el concepto de propiedad del software. La opinin generalizada
  es que el modelo Open Source, y la GNU Public License constituyen una
  renuncia de hecho a la propiedad sobre el software

  Y sin embargo, la propiedad del software es el pilar bsico de la GPL:
  la legislacin americana y europea son muy explcitas: slo el autor
  de una obra tiene derecho a especificar los derechos de uso, copia y
  distribucin (copyright) de dicha obra. Para que nosotros, amantes de
  la GPL, podamos decir que un programa se distribuye bajo licencia GPL,
  el programa debe ser legalmente nuestro.

  Este documento est basado en la informacin que la Comunidad de
  Madrid ofrece a travs de su Servicio de Informacin y Documentacin
  Juvenil acerca de los derechos, deberes y procedimientos de
  inscripcin en el Registro de la Propiedad Intelectual.

  Una ltima observacin: Este documento NO trata explcitamente sobre
  el software: la legislacin espaola contempla los programas de
  ordenador como obras artsticas, cientficas o literarias


  1.2.  Copyright


  Este documento es Copyright de la Comunidad de Madrid, Consejera de
  Juventud y Cultura. Su contenido es de libre distribucin y copia,
  siempre que se cite su procedencia y autora.

  La adaptacin a linuxdoc-sgml ha sido realizada por Juan Antonio
  Martnez Castao  mailto:jantonio@dit.upm.es

  El documento original puede encontrarse en las pginas Web de
  InforJoven: http://www.comadrid.es/inforjoven


  2.  Conceptos y definiciones



  2.1.  Definiciones


  La propiedad intelectual de una obra literaria, artstica o cientfica
  corresponde al autor por el slo hecho de crearla. Se considera autor
  a la persona natural que crea alguna obra artstica, cientfica o
  literaria. Se presumir autor, salvo prueba de lo contrario, a quien
  aparezca como tal en la obra, mediante su nombre, firma o signo que lo
  identifique. Cuando la obra se divulgue en forma annima o bajo
  seudnimo o signo, el ejercicio de los derechos de propiedad
  intelectual corresponder a la persona natural o jurdica que la saque
  a la luz con el consentimiento del autor, mientras ste no revele su
  identidad. La divulgacin de una obra es toda expresin de la misma
  que, con el consentimiento del autor, la haga accesible por primera
  vez al pblico en cualquier forma.

  El objeto de la propiedad intelectual son las creaciones originales
  literarias, artsticas o cientficas expresadas por cualquier medio o
  soporte, tangible o intangible, actualmente conocido o que se invente
  en el futuro.


  2.2.  Derechos y Deberes


  La propiedad intelectual est integrada por derechos de carcter
  personal y patrimoniales, que atribuyen al autor la plena disposicin
  y el derecho exclusivo de los derechos de explotacin de su obra en
  cualquier forma y, en especial, los derechos de reproduccin,
  distribucin, comunicacin pblica y transformacin, que no podrn ser
  realizadas sin su autorizacin, salvo en los casos previstos en la
  Ley.

  El derecho a la propiedad intelectual tiene unos lmites. Las obras ya
  divulgadas podrn reproducirse sin autorizacin del autor en los
  siguientes casos:


    Como consecuencia o para constancia en un procedimiento judicial o
     administrativo.

    Para uso privado del copista y siempre que la copia no sea objeto
     de utilizacin colectiva ni lucrativa.
    Para uso privado de invidentes.

  Es lcita la inclusin en una obra propia de fragmentos de obras
  ajenas de naturaleza escrita, sonora o audiovisual, as como la de
  obras aisladas de carcter plstico, fotogrfico, figurativo o
  anlogo, siempre que se trate de obras ya divulgadas y su inclusin se
  realice a ttulo de cita o anlisis, comentario o juicio crtico. Tal
  utilizacin slo podr realizarse con fines docentes o de
  investigacin e indicando la fuente y el nombre del autor de la obra
  utilizada.

  Slo con el exclusivo fin de informar sobre la actualidad, se podrn
  reproducir, distribuir y comunicar las conferencias, alocuciones,
  informes ante los Tribunales y otras obras del mismo carcter que se
  hayan pronunciado en pblico.

  Los titulares de los derechos de autor no podrn oponerse a las
  reproducciones de las obras, cuando aquellas se realicen sin finalidad
  lucrativa por los museos, bibliotecas, fonotecas, filmotecas, etc.

  Los derechos de explotacin de la obra durarn toda la vida del autor
  y setenta aos despus de su muerte o declaracin de fallecimiento.

  La extincin de los derechos de explotacin de las obras determinar
  su paso al dominio pblico. Las obras de dominio pblico podrn ser
  utilizadas por cualquiera, siempre que se respete la autora y la
  integridad de la obra.


  2.3.  Caractersticas


  El derecho de la propiedad intelectual tiene las siguientes
  caractersticas:


    Los derechos de explotacin de la obra se transmiten, mortis
     causa, por cualquiera de los medios admitidos en derecho.

    Tambin pueden transmitirse por actos inter vivos.  La Ley de
     Propiedad Intelectual legitima al titular de los derechos por ella
     reconocidos para instar el cese de la actividad ilcita del
     infractor y exigir la indemnizacin de los perjuicios materiales y
     morales causados.

    Podrn ser objeto de inscripcin en el Registro los derechos de
     propiedad intelectual relativos a las obras y dems producciones
     protegidas por la Ley de Propiedad Intelectual.

    El titular o cesionario en exclusiva de un derecho de explotacin
     sobre una obra o produccin protegidas por la Ley podr anteponer a
     su nombre el smbolo,  con precisin del lugar y ao de la
     divulgacin de aquellas.



  3.  Registro de la propiedad intelectual


  El Registro de la Propiedad Intelectual tiene por objeto la
  inscripcin de los derechos relativos a las obras, actuaciones o
  producciones originales, literarias, artsticas o cientficas
  expresadas por cualquier medio o soporte, tangible o intangible,
  actualmente conocido o que se invente en el futuro.


  El Registro General de la Propiedad Intelectual es nico en todo el
  territorio nacional. Est integrado por los registros territoriales
  (establecidos y gestionados por las Comunidades Autnomas), el
  Registro Central (dependiente del Ministerio de Educacin y Cultura) y
  la Comisin de Coordinacin (integrada por un representante de cada
  Comunidad Autnoma, un representante del Ministerio de Educacin y
  Cultura y el titular del Ministerio Central).


  4.  Quin puede solicitar la inscripcin?


  Estn legitimados para solicitar las inscripciones:


    Los autores y dems titulares originarios de derechos de propiedad
     intelectual con respecto a la propia obra, actuacin o produccin.

    Los sucesivos titulares de derechos de propiedad intelectual.


  5.  Requisitos de las solicitudes


  Todas las solicitudes de inscripcin deben contener:


    Nombre, nacionalidad y domicilio del autor o autores.

    Fotocopia del DNI.

    Naturaleza y condiciones del derecho que se pretende inscribir.

  Dependiendo de la naturaleza del derecho que se desea inscribir,
  debern contener adems:


    Cuando se refieran a obras artsticas, cientficas y literarias:

    Ttulo de la obra (descripcin de la obra que permita su completa
     utilizacin).

    Declaracin de si la obra ha sido o no divulgada. En caso
     afirmativo, la fecha y lugar de la divulgacin.

    Cuando se refieran a derechos de la propiedad intelectual de los
     artistas-intrpretes o ejecutantes:

    Descripcin detallada por escrito, en un mximo de 25 folios, de la
     interpretacin, actuacin o ejecucin.

    Lugar y fecha de la interpretacin, actuacin o ejecucin.

    Ttulo y autor de la obra interpretada.

    Cuando se refieran a derechos de la propiedad intelectual de los
     productores de fonogramas:

    Nmero de depsito legal.

    Ttulo y autor de la obra fijada en el fonograma.

    Tipo de fonograma y sistema de grabacin.

    Lugar y fecha de publicacin del fonograma.

    Cuando se refieran a derechos de propiedad intelectual en los
     supuestos de produccin de grabaciones audiovisuales:

    Un mximo de 25 secuencias, que permitan una identificacin de la
     grabacin, y un resumen que no exceda de 25 pginas.

    Lugar y fecha de la divulgacin, en su caso.

    Cuando se refieran a derechos de propiedad intelectual en los
     supuestos de meras fotografas:

    El solicitante deber presentar 2 copias en positivo de 18 por 24 o
     bien de 24 por 24.

    Lugar y fecha de la divulgacin, en su caso.


  6.  Registro competente


  Para la primera inscripcin de los derechos de propiedad intelectual
  que los autores y dems titulares insten, ser competente el Registro
  Territorial correspondiente al domicilio del autor o titular
  solicitante.


  7.  Legislacin



    Real Decreto Legislativo 1/1996, de 12 de abril por el que se
     aprueba el Texto Refundido de Ley de Propiedad Intelectual
     regularizando, aclarando y armonizando las disposiciones legales
     vigentes sobre la materia (BOE 22 de abril de 1996).

    Reglamento del Registro de la Propiedad Intelectual 733/1993.  (BOE
     de 15 de junio de 1993).

    Subsidiariamente, las normas sobre propiedad del Cdigo Civil.


  8.  Directorio



    Registro General de la Propiedad Intelectual.

    Asesoras Jurdicas de la Red de Centros de Informacin Juvenil de
     la Comunidad de Madrid.

    Centro Regional de Informacin y Documentacin Juvenil


  9.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.


  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Juan Antonio Martnez, jantonio@dit.upm.es






















































  Quake I&II Mini Como
  lvaro Villalba Poncet, alvarovp@mad.servicom.es
  ver 0.7, 22 de Enero de 1999.

  Guia para configurar el Quake I y el II en linux.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin.

  2.      Requisitos.

  2.1.    Software.

  2.2.    Hardware:

  2.2.1.  Configuracin de la tarjeta de video

  2.2.2.  Configuracin de tarjetas aceleradoras

  2.2.3.  Configuracin del ratn

  2.2.4.  Configuracin de la tarjeta de sonido.

  3.      Quake :

  3.1.    Principales problemas:

  3.2.    Juego en Red (Quake World).

  3.3.    Aadidos al quake.

  4.      Quake II

  4.1.    Juego en Red

  4.2.    Principales Problemas

  4.3.    Principales modificaciones.

  5.      Cmo montar un server dedicado.

  5.1.    Quake

  5.2.    QuakeWorld.

  5.3.    Quake 2

  6.      Problemas con las tarjetas aceleradoras.

  7.      Servidores espaoles de quake.

  8.      Agradecimientos:

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin.

  Actualmente no hay muchos juegos "populares" portados a linux, de
  hecho solo est el doom, el quake (en todas sus versiones) y el
  InnerWorlds, pero todo se andar (actualmente hay fabricantes que han
  dicho que nunca portarn sus juegos a linux, algn da se comern sus
  palabras ... :) ).  El quake en linux funciona perfectamente, incluso
  ms rpido que en windows, adems si se quiere montar un server de
  quake es la plataforma perfecta, el nico problema que puede haber es
  con las tarjetas de video modernas (especialmente con las 3dfx de
  ltima generacin), ya que no todas tienen drivers para linux (pero
  cada vez son ms las soportadas).

  2.  Requisitos.

  2.1.  Software.

  Nos hacen falta los ejecutables para linux. Se pueden encontrar en
  muchos sitios , el principal es en idsoftware (ftp.idsoftware.com)
  pero este server va muy lento, el mejor sitio para bajarse todo lo
  necesario es la pgina de quake en linux
  (captured.com/threewave/linux/index.html). Ah se puede bajar todo lo
  necesario sin tener que sumergirse en los oscuros directorios de
  idsoftware ... Otro sitio sobre el Quake y Linux es quake.medina.net.
  Otros sitios donde se puede obtener casi todo el software necesario
  para el quake son:

    ftp.cdrom.com (muy lento, es mejor el mirror que hay en
     ftp.doc.is.ac.uk).

    ftp.sci.com/quake.

     www.quake2.com

  Para descomprimir un fichero tgz o tar.gz ponemos tar zxfv
  nombre_del_fichero.

  2.2.  Hardware:

  Los que pide el propio juego, osea, una tarjeta de video y un Pentium
  a 90 (yo he visto el quake corriendo en un 486 bajo linux y
  funcionaba, as que todo es cuestin de probar ;) ).

  2.2.1.  Configuracin de la tarjeta de video.

  Se puede jugar al quake desde las X o desde la SVGA, recomiendo la
  SVGA porque es mas rpida, pero si es un servidor con varios usuarios
  recomiendo la versin de las X (principalmente porque para correr la
  verson SVGA hace falta que el ejecutable sea setuid root, con los
  consiguientes riesgos de seguridad que esto conlleva), pero cada uno
  que use la que ms le guste ...

  Si vas a jugar en las X tendr que tenerlas configuradas (cualquier
  duda sobre cmo hacerlo mirela en el XFree86-Como)

  Para la SVGA normalmente no hay que tocar nada, el archivo de
  configuracin est en /etc/vga/libvga.config (En RedHat) o en
  /etc/libvga.config  (Slack). Si algo no va bien con la vga tendr que
  editar el fichero y poner los parmetros de su tarjeta (tipo de
  chipset, RamDac, etc) y del monitor (mrelas en los manuales del
  ordenador).

  2.2.2.  Configuracin de tarjetas aceleradoras.

  Lo primero que necesitaremos es una tarjeta aceleradora; hasta la
  fecha solo estn soportadas las basadas en el chip 3dfx (en el momento
  de escribir esto estaban portando los drivers para la banshee). Para
  poder usar una 3dfx necesitaremos bajarnos los siguientes ficheros:

    glide son las libreras que acceden directamente a la tarjeta, se
     pueden obtener de http://glide.xxedgexx.com/3DfxRPMS.html , ah
     podemos encontrar versiones en formato rpm (para RedHat, OpenLinux,
     SuSe) as como para glibc (RedHat 5.X, debian 2.X, SuSe 6.X) o,
     libc5. En esta pgina se puede obtener tambien informacin sobre
     las tarjetas soportadas. Necesitaremos como mnimo dos archivos:

     1. Glide2x_SDK-2.1 es el kit de desarrollo de la librera glide.

     2. Glide son las libreras propiamente dichas, dependiendo del tipo
        de 3dfx que tengamos necesitaremos:

        a. Glide_VG-2.46 para las tarjetas voodoo 1.

        b. Glide_VR-2.46 para las tarjetas voodoo rush.

        c. Glide_V2-2.51 para las tarjetas voodoo 2.

    Mesa es la versin free de las libreras OpenGL, se pueden obtener
     de http://www.ssec.wisc.edu/~brianp/Mesa.html. La ltima versin
     estable es la 3.0 y de desarrollo la 3.1, es recomendable bajarse
     la ltima estable (en este caso la 3.0). De ah cojeremos dos
     ficheros:

     1. MesaLib las libreras propiamente dichas.

     2. MesaDemos demos de la librera.

     Existen binarios de las libreras en todos los formatos, pero en
     este caso necesitaremos los fuentes porque las tenemos que recompi
     lar.

  Una vez obtenidos los ficheros necesarios lo primero que instalaremos
  son las glide, si nos las hemos bajado en rpm lo haremos con

       [root@unsCAred][~]# rpm -Uhv Glide_V[tipo de tarjeta]-[versin].rpm

  Si no disponemos del programa rpm podemos usar la utilidad rpm2cpio de
  la siguiente manera (desde el directorio / para que nos cree bien los
  directorios necesarios):

       [root@unsCAred][/]# cd /
       [root@unsCAred][/]# rpm2cpio archivo.rpm | cpio -i --make-directories
       [root@unsCAred][/]# ldconfig

  Para comprobar que las libreras estn correctamente instaladas ejecu
  tamos en el shell el comando:

  [root@unsCAred][~]# ldconfig -p|grep libglide
  [root@unsCAred][~]# ldconfig -p|grep libtexus

  Ahora instalamos el fichero Glide2x_SDK-2.1, del que solo necesitamos
  los includes Si tenemos rpm ponemos

       [root@unsCAred][~]# rpm -Uhv Glide2x_SDK-2.1-3.i386.rpm

  Si no disponemos de rpm usamos nuevamente el rpm2cpio de la siguiente
  manera:

       [root@unsCAred][~]# cd /tmp
       [root@unsCAred][/tmp]# rpm2cpio Glide2x_SDK-2.1-3.i386.rpm | cpio -i --make-directories
       [root@unsCAred][/tmp]# cd /usr/local/
       [root@unsCAred][/usr/local]# mkdir glide
       [root@unsCAred][/usr/local]# cd glide
       [root@unsCAred][/usr/local/glide]# mkdir include
       [root@unsCAred][/usr/local/glide]# cd include
       [root@unsCAred][/usr/local/glide/include]# cp /tmp/include/* .
       [root@unsCAred][/usr/local/glide/include]# ls
       3dfx.h      glidesys.h  gump.h      sst1vid.h
       glide.h     glideutl.h  linutil.h   texus.h

  En caso de haber usado el rpm tenemos que hacer un enlace simblico ya
  que las libreras Mesa buscarn la librera libglide en
  /usr/local/glide/lib, lo hacemos con lo siguiente:

       [root@unsCAred][~]#cd /usr/local/glide
       [root@unsCAred][/usr/local/glide]# mkdir lib
       [root@unsCAred][/usr/local/glide]# cd lib
       [root@unsCAred][/usr/local/glide/lib]# ln -s /usr/lib/libglide2x.so .
       [root@unsCAred][/usr/local/glide/lib]# ls
       libglide2x.so@

  Ahora que ya hemos instalado correctamente las libreras glide nos
  vamos a por las Mesa. Haremos lo siguiente:

       [root@unsCAred][~]# cd /tmp
       [root@unsCAred][/tmp]# tar zxfv MesaLib*
       []
       [root@unsCAred][/tmp]# tar zxfv MesaDemos*
       []
       [root@unsCAred][/tmp]# cd Mesa-3.0
       [root@unsCAred][/tmp/Mesa-3.0]# make realclean

  Ahora es cuando nos leemos el README que viene con las libreras, una
  vez hecho eso las compilamos, dependiendo del tipo de tarjeta aceler
  adora que tengamos pondremos lo siguiente:

    make linux-386-opt-glide si tenemos una voodoo 1.

    make linux-386-opt-V2-glide si tenemos una voodoo 2.

    si tenemos una voodoo rush podemos hacer uno de estos tres:

     1. make linux-glide para linux glide.

     2. make linux-386-glide para micros i386.

     3. make linux-386-glide-mits micros i386 con multiproceso.

     Despues de un rato y si no hemos tenido ningun problema las
     libreras ya estarn compiladas, ahora lo nico que queda es insta
     larlas. Si ya las tenamos instaladas antes lo nico que tenemos
     que hacer es copiar la librera nueva que hemos generado, para eso
     hacemos:

       [root@unsCAred][/tmp/Mesa-3.0]# cd lib
       [root@unsCAred][/tmp/Mesa-3.0/lib]# cp -a * /usr/lib

  He puesto el /usr/lib porque es donde las tena yo instaladas, si ya
  las tenamos en /usr/local/lib las copiaremos ah.  Si no las tenamos
  instaladas antes lo hacemos poniendo:

       [root@unsCAred][/tmp/Mesa-3.0]# make install

  Para concluir, ejecutamos como root el comando ldconfig y ya tendremos
  todo lo necesario para que funcione la 3dfx (bueno, an nos faltan los
  ejecutables para el quake, el quakeworld y el quake2).

  2.2.3.  Configuracin del ratn.

  Para que funcione el ratn tenemos que editar otra vez el fichero de
  configuracin de la vga (ver ``Configuracin de la tarjeta de video'')
  y poner el tipo de ratn que tenemos. Es necesario tener el gpm
  funcionando, que es el que se encarga de controlar el ratn en la
  consola. Si usa el gpm con el parmetro -R es recomendable cambiarlo
  antes de jugar con un script o algo parecido, ya que se nota bastante
  la velocidad de respuesta del mouse.

  En el quake se puede especificar el dispositivo en el que se encuentra
  el ratn mediante los parmetros -mdev [device] y la velocidad con
  -mrate [speed]. Los parmetros por defecto son /dev/mouse para el
  -mdev y 1200 para el -mrate.

  Lo errores con el ratn normalmente se deben a fallos en la
  configuracin del gpm o porque no se ha especificado el tipo de ratn
  en el libvga.config. Adems es muy comn que cuando se est jugando al
  quake y se cambia a otra consola el ratn deje de responder, esto se
  puede arreglar de dos maneras:
    Reiniciando el gpm (en RedHat con /etc/rc.d/init/gpm restart)

    Poniendo echo "*n" >/dev/mouse en una consola.

  Para cualquier duda o problema con un ratn de tres botones es
  recomendable consultar el Raton_3_botones-Como.

  2.2.4.  Configuracin de la tarjeta de sonido.

  No es extrictamente necesaria, pero jugar al quake sin sonido es como
  una primavera sin flores ;) . Para configurar la tarjeta de sonido
  consultar el Sonido-Como.) Para jugar sin sonido ponemos el parmetro
  -nosound. Adems de este hay otros parametrs que son:

    sndbits [8 or 16]

    sndspeed [speed] (8000, 11025, 22051 and 44100), por defecto 11025.

    sndmono.

    sndstereo (por defecto, siempre que sea posible).

  En el quake2 he experimentado problemas con el OSS y el driver para mi
  tarjeta (una AWE32), ya que cuando se reinicia el sistema de sonido
  deja de funcionar (esto no ocurre con el driver normal del kernel). El
  problema estaba en el compilador, si est usando el OSS, el egcs o el
  pgcc como compilador y un kernel de la serie 2.0.X puede que tenga
  problemas, la solucin pasa por instalarse el gcc-2.7.2.3 y recompilar
  el sndconfig con l (adems los kernels de esa versin es recomnedable
  compilarlos con el gcc y no con el egcs/pgcc).

  3.  Quake :

  Bueno, se acabaron las configuraciones, ahora toca jugar :)

  Necesitamos los archivos pak0.pak (para la share) y el pak0.pak y
  pak1.pak para la registrada. Si tenemos el quake ya instalado en otra
  particin (por ejemplo en windows) no hace falta copiarlos a la
  particin linux, podemos usar enlaces simblicos, lo nico que tenemos
  que hacer es montar la particion de windows, por ejemplo en /mnt/dos.

  Vamos a instalar el quake en /usr/local/games/quake (se puede instalar
  en cualquier sitio).

    Lo primero es crear ese directorio (mkdir /usr/local/games/quake).
     Un vez hecho eso creamos el directorio id1 (a partir de ahora todos
     los directorios van referenciados al /usr/local/games/quake) dentro
     del directorio quake.

    Copiamos el pak0.pak y el pak1.pak al directorio id (si lo hacemos
     con enlaces simblicos, y suponiendo que tenemos la particin donde
     est el pak0.pak y el pak1.pak montada en /mnt/dos ponemos como
     root:

       ln -s /mnt/dos/[ruta_al_quake]/quake/id/pak* /usr/local/games/quake/id

    Descomprimimos el ejecutable para linux en /usr/local/games/quake.

    Y ahora ... a jugar, ya no hace falta nada ms ... vamos al
     directorio /usr/local/games/quake y ponemos ./squake (o xquake si
     estamos en las X) y cruzamos los dedos. Si todo a ido bien ya est
     funcionando el quake. Si usamos una tarjeta aceleradora
     ejecutaremos

  Para cambiar la resolucin de la pantalla se usan dos comandos, nos
  ponemos en la consola del quake y ponemos vid_describemodes que nos da
  una descripcin de todos los modos de video posible (cada uno con un
  nmero).

  Ah luego ponemos vid_mode N siendo N el nmero que corresponde a la
  resolucin que queremos. Esto no funciona con las tarjetas
  aceleradoras, para cambiar la resolucin en ellas hay que
  especificarlo en el arranque mediate los parmetros -width ANCHO
  -height ALTO, sino arrancar por defecto en 640x480 (otra resolucin
  muy utilizada es 512x384).

  Si queremos medir los fps a una resolucin podemos hacerlo con
  timedemo demo1 desde consola, que intenta ejecutar lo ms rpido
  posible la demo1 y nos dice los fps.

  Si queremos comprobar los fps durante el juego lo podemos hacer con
  timerefresh (pero depende de la parte de la fase en la que nos
  encontremos).

  3.1.  Principales problemas:

  Pueden ser:

    La tarjeta de sonido no est configurada y hemos intentado arrancar
     con sonido. Solucin: arrancamos con ./squake -nosound.

    No tenemos puesto el HOSTNAME. Solucin: editamos el fichero
     /etc/hosts y aadimos el nombre de nuestra mquina, por ejemplo:

       127.0.0.1       localhost       localhost.localdomain        unsCAred

  y nos aseguramos de que en /etc/HOSTNAME pone unsCAred (en mi caso
  claro ;) )

    can't get I/O permisions. El squake necesita ser setuid root ,
     ejecutamos como root

       chown root.root squake
       chmod 4755 squake/

  (No me responsabilizo de nada que pase por tener el ejecutable setuid)
  (No se asuste!!!, esto tiene problemas de seguridad, si es la mquina
  de casa no se te va a romper el ordenador ni nada parecido, simple
  mente, la svga no es muy segura en cuanto a seguridad del sistema se
  refiere).

    No nos arranca en las X. Solucin arrancamos el servidor a 8 bits
     de profundidad de color con (startx -bpp 8).

  3.2.  Juego en Red (Quake World).

  El quake es un buen juego, pero cuando de verdad sorprende y crea
  adiccin es cuando se juega en red. No es lo mismo matar a un monstruo
  en mitad de un nivel que a tu amigo pukka (con lo segundo disfrutas ;)
  ).

  Cambia totalmente tu visin del juego y la manera de jugar, los
  movimientos se aceleran en un 200%. Para jugar en red lo nico que
  necesita es una conexin a internet o a una LAN.

  En la pgina de quake en linux ( ver ``Software.'') se puede encontrar
  un ejecutable que se llama qwcl. Esto es el cliente de QuakeWorld, que
  no es ms que una mejora de la engine de red del quake (solo sirve
  para jugar en red) con algunos aadidos, como el poder "cambiar" de
  piel o uniforme.

  Se puede jugar en red con el quake normal, pero la mejora con el qw es
  muy notable, de hecho, es muy raro encontrar servers de quake normal
  en internet, lo normal es que sean de quakeworld.

  Una herramienta muy til para jugar en internet es el qspy o el
  quickspy (para consola) que consiste en un programa que localiza
  servers de quake world y nos dice cuantas personas hay, el ping, etc.

  Hace poco ha salido el xqf que es un magnfico interface para el qspy
  hecho con gtk (para las X), se puede bajar de www.botik.ru/~roma/quake

  Para instalar el qw lo nico que hay que hacer es descomprimir el
  archivo qwcl en el directorio /usr/local/games/quake y poner (ver
  ``Servidores espaoles de quake'').

  Lo mejor es tener la ltima versin del qw (actualmente la 2.30) y la
  anterior ya que algunos server no se han actualizado an.

  Si se tiene una tarjeta aceleradora necesitar el glqwcl. Para
  indicarle la resolucin de pantalla se hace como en el glquake
  mediante los parmetros -width ANCHO -height ALTO.

  El parmetro rate XXXX controla el numero de bps que recibimos del
  servidor adems del nmero de fps. Para un modem de 33.6 el parmetro
  ptimo es de 3000, para un 28.8 de 2500.

  3.3.  Aadidos al quake.

  Uno de los principales factores que han hecho al quake un juego "de
  culto" es ademas de su excelente modo de red el que se le puedan
  aadir variaciones fcilmente.

  Puede aadirle nuevas armas, nuevos montruos, nuevos niveles, incluso
  nuevos "juegos". El ms popular es el Capture the Flag, que divide a
  todos los jugadores en dos equipos (es para jugar en red) y le da a
  cada uno una bandera y una base, la misin de cada equipo es capturar
  la bandera del otro y llevarla a su base, siempre y cuando no lo
  capturen la suya. La mayora de los patches o modificaciones se
  instalan igual.  Supongamos el ctf. Los pasos para instalarlo son.

  1. Se crea el directorio /usr/local/games/quake/ctf

  2. Se descomprimen los ficheros del ctf en ese directorio.

  3. Desde el directorio quake se pone ./squake -game ctf.

  Sin duda alguna la mejor variacin que se ha hecho del quake son los
  bots, osea robots dotados de inteligencia artificial para simular el
  juego en red con humanos. Los mejores son el omicron (por lo menos es
  el que ms me gusta a mi ;) ) y el reaperbot (una lista completa de
  los bots, con puntuaciones a cada uno y comentarios se puede encontrar
  en www.ionet.net/~mimpchnk)

  Otra variacin muy interesante es el Team Fortress que se puede
  encontrar en www.planetfortress.com/teamfortress>. Es bsicamente el
  ctf solo que podemos elegir distintos caracteres cada uno con
  funciones y armas diferentes. En este mod es donde menos importa las
  diferencias de ping y donde ms se juega en equipo.

  El Rocket Arena es otra variacin del quake, el argunmento es muy
  simple, dos entran, uno sale, osea, son combates uno contra uno en
  mapas especiales, los dos jugadores salen con todas las armas y
  armaduras y el que mate al otro se queda y sigue jugando contra el
  siguiente contrincante.  Tambien se pueden configurar los servidores
  para poder jugar por equipos. Se puede obtener de
  http://www.planetquake.com/servers/arena/.

  4.  Quake II

  Para jugar al quake2 lo nico que hace falta es el cd y el ejecutable,
  osea que aunque tu disco duro est lleno con un poco ms de 800k que
  es lo que ocupa el ejecutable puedes jugar. Lo nico que hay que hacer
  es lo siguiente:

    Lo primero, creamos un directorio /usr/local/games/quake2 (por
     ejemplo) y dentro de este un directorio baseq2.

    Copiamos el fichero /mnt/cdrom/Install/Data/baseq2/pak0.pak a este
     directorio. Si se quiere jugar sin copiarlo se hace un enlace
     simblico con

       ln -s /mnt/cdrom/Install/Data/baseq2/pak0.pak /usr/local/games/quake2/baseq2

  Atencin que el ficherito slo ocupa 160 megas ;).

    Luego creamos el directorio players dentro del baseq2 y los
     directorios male y female dentro de este (osea que queda algo as:

               quake2---|-baseq2---|-players---|-male
                                               |-female

    Compiamos todos los ficheros que hay en
     /mnt/cdrom/Install/Data/baseq2/players/male en male y los del
     female en female.

    Descomprimimos el quake2-3.20-i386-unknown-linux2.0.tar.gz en el
     directorio quake2.

  Y listo, ya podemos jugar.

  Si no tiene la libreras MesaGL instaladas tendr que copiar la que
  viene con el ejecutable a /usr/local/lib (por ejemplo) y poner
  ldconfig como root (tiene que ser la version 2.6beta3 como mnimo) e
  instalar las librerias glide si va a usar una 3dfx (ver
  ``Configuracin de tarjetas aceleradoras'').

  Si se va a jugar en la svga el fichero quake2 tiene que estar setuid
  root (con el ejecutable vienen un script para poner bien los
  permisos), simplemente ponemos ./fixperms.sh como root en el
  directorio quake2).

  Para arrancarlo usamos:

               ./quake2 +set vid_ref soft (para la svga)
               ./quake2 +set vid_ref softx (para las X)
               ./quake2 +set vid_ref gl (para jugar con 3dfx)
               ./quake2 +set vid_ref xgl (soporte para OpenGL,solo funciona en las X)
               ./quake2.3dfxgl (para usar el mini-port del OpenGL, solo en sistemas
       con glibc, es decir RedHat 5.X o debian 2.0)

  Eso solo se hace la primera vez, luego con poner ./quake2 sirve.

  4.1.  Juego en Red

  Para jugar en red arrancamos el quake2, vamos al menu multiplayer y le
  damos a join network game.

  Hay dos opciones, server list, update server list y luego una lista.
  Le damos a server list y aadimos las direcciones de servers que
  queramos , luego le damos a update server list y nos saldrn los
  servers con la informacin en la lista, colocado por ping, de menor a
  mayor.

  Tambien puedemos jugar poniendo +connect IP desde la consola del
  quake2 (que sale dandole a la tecla ). Previamente habremos
  configurado nuestro jugador en player config (el nombre, el modelo, la
  skin, el tipo de conexin y las opciones de descarga que se usan para
  bajarse skins, mapas, sonidos y dems cosas de los servidores).

  La mayoria de los servers usan lo mapas de deathmatch (q2dm*). En el
  quake venan en el cd, pero en el quake2 salieron despus con lo que
  si queremos jugar en internet estamos obligados a bajrnoslos.

  Los mapas vienen en la versin 3.13, ocupan unos 10 megas, ver
  ``Software.'', que adems del ejecutable traen un pak1.pak con los
  mapas de deathmatch).

  Se instalan descomprimiendo el archivo en el directorio quake2, pero
  hay que recordar que tenemos que instalar luego la versin 3.20 que es
  la que usan los servidores (esta es la ltima versin que ha salido
  hasta la fecha, es recomendable tener siempre la ltima versin y
  algunas veces necesario :) ).

  4.2.  Principales Problemas

  Aparte de los del quake uno (que tambien pasan aqu) un problema del
  quake 2 es:

    Cuando juego como usuario y me conecto a un server el programa
     termina .... Este es un problema de permisos, con una mala solucin
     ...  cuando juega en servers con modificaciones (como el ctf2 o el
     Lithium II) al conectar se reinicia el sistema de video, y si no
     esta como root el quake2 "suelta" la id del root despus de iniciar
     el sonido y el vdeo y se produce el problema de I/O perm. La nica
     manera de que esto no pase es jugando como root o usando sudo.

     Nota: para jugar al quake2 en red NO necesita tener el Cd del
     quake, slo tiene que tenerlo instalado (por supuesto, si est
     jugando desde el cd tendr que meterlo ;) ).

  4.3.  Principales modificaciones.

  Al igual que para quake, para quake 2 hay muchas modificaciones, la
  ms extendida es el Lithium II, que aade nuevas funcionalidades al
  quake (como runas que te dan distintos poderes o el "hook"), de hecho
  la mayor parte de los servidores usan el Lithium II, pero para jugar
  en ellos no hace falta ningun fichero extra.

  Si queremos usar bots como en el quake los nicos que conozco que
  funcionen en linux son los eraser (ver la url que hay en ``Aadidos al
  quake.'') pero consumen muchos recursos (an as se pueden usar).

  Otra modificacin que est sustituyendo al ctf2 es el lmctf que es una
  variacin de este con mapas ms grandes.

  El equivalente al Team Fortress del quake2 se llama Weapons Factory,
  que se puede obtener de http://www.captured.com/weaponsfactory/.

  El Rocket Arena 2 tambien est disponible y se puede bajar de la misma
  pgina que el Rocket Arena para quake (ver ``Aadidos al quake.''.

  5.  Cmo montar un server dedicado.

  Si tiene una conexin permanente a Internet, contribuya a la causa
  y monte un server de quake !!!

  5.1.  Quake

  Para montar un server de quake dedicado solo necesitamos los pak's y
  por supuesto el ejecutable (que se llama unixded-1.0-i386-unknown-
  linux2.0.tar.gz). Lo ejecutamos (se recomienda usar el screen y
  ponerlo en una consola detached) y listo.

  El screen lo puede encontrar en prep.ai.mit.edu/pub/gnu Lo nico que
  sale al arrancar un server dedicado es una consola de texto.

  5.2.  QuakeWorld.

  Para montar un server de quake world necesitamos el fichero
  qwsv2.30-i386-unknown-linux2.0.tar.gz>.

  Una modificacin muy interesante para montar un servidor es el Kombat
  Teams, que ofrece una serie de posibilidades a los usuarios como poder
  cambiar el mapa, fijar el tiempo, el lmite de frags, etc. Se puede
  bajar de http://www.demolition.org/k/.

  5.3.  Quake 2

  Aqu no necesitamos nada nuevo, solamente poner ./quake2 +set
  dedicated 1 +exec server.cfg. En server.cfg ponemos los mapas que
  queremos cargar y dems cosas, recordar que si no ponemos la linea map
  q2dm1, (por ejemplo) no se cargar ningun mapa. Igualmente se
  recomienda se usar el screen.

  6.  Problemas con las tarjetas aceleradoras.

  Hay una pgina con una faq muy completa sobre las 3dfx en
  www.voodooextreme.com/3Fingers.  Tambien hay un programa llamado
  GlideControl disponible en http://www.ling.ed.ac.uk/~oliphant/gc muy
  til para configurar los parmetros de las 3dfx.  Los problemas ms
  comunes suelen ser:

    Los usuarios no pueden usar la tarjeta aceleradora: Esto se puede
     solucionar instalando el Device3Dfx, que es un paquete que nos crea
     un dispositivo /dev/3dfx y mediante la insercin de un mdulo en el
     kernel (3dfx) permite que los usuarios puedan acceder a la tarjeta
     aceleradora. Asegurese si lo instala de que los permisos de
     /dev/3dfx estn correctamente puestos ( ejecute chmod  666
     /dev/3dfx  ). Este paquete se puede encontrar en
     http://glide.xxedgexx.com/3DfxRPMS.html.

    Cuando ejecuto el glquake me da un core dump:. El quake2 y el
     glqwcl estn disponibles para glibc, sin embargo el glquake no,
     esto crea bastantes problemas a la hora de hacerlo funcionar. Si
     tiene una voodoo2 en principio no debera tener problemas porque el
     propio paquete del Glide_V2 trae adems de las versiones de las
     libreras para glibc las de libc5 (que se instalan en
     /usr/i486-linux-libc5/lib), sin embargo el paquete de la voodoo 1
     no las trae, con lo que puede que tenga que bajarse la versin para
     libc5, extraer las libreras (si est en rpm con el mc es muy
     sencillo hacerlo, sino tendr que usar el rpm2cpio o el rpmget ya
     que si lo instala directamente con el rpm sobrescribir las de la
     versin para glibc) e instalarlas (en /usr/i486-linux-libc5/lib).
     Adems asegurese de que en el fichero /etc/ld.so.conf aparece el
     directorio /usr/i486-linux-libc5/lib y de que tiene instalado el
     paquete de compatibilidad con la libc5 (libc-5.3.X-Y en redhat).

       asegurese si se baja este paquete de que lo est cogiendo de una versin de
       RedHat 5.X o del directorio /libc6 en caso de que lo est cogiendo del contrib
       de RedHat, sino le sobreescribir las antiguas libreras y no funcionar el
       sistema!

  Otra posible causa de error es que falte alguna librera en la ruta de
  bsqueda del ejecutable, esto se puede comprobar mediante el comando
  ldd fichero. Si por ejemplo al hacer ldd glquake le sale alguna
  librera seguida de la linea Not Found ah estar el problema, ase
  gurese de que tiene esa librera instalada y que el directorio en el
  que est dicha librera aparece en el fichero /etc/ld.so.conf, si no
  lo est aada el directorio y ejecute luego como root ldconfig.

    Cuando ejecuto el glquake me da el error glquake: can't resolve
     symbol tena (vienen con el ejecutable del quake2) consulte la
     direccin de las librerias en ``Software'', instalelas y ejecute
     ldconfig.

    El glquake/glqwcl/quake2 se ve muy oscuro. Ajuste el contraste de
     la tarjeta, esto se hace mediante la variable de entorno SST_GAMMA
     en una voodoo 1 y SSTV2_GAMMA en las voodoo 2, por ejemplo poniendo
     :

       [unscared][~]$ export SSTV2_GAMMA=1.70

  Otra opcin es bajarse el programa GlideControl mencionado anterior
  mente con el que puede cambiar la gamma de la tarjeta adems de otros
  parmetros.

    Al jugar en linux obtengo menos fps que en windows: Bueno, las Mesa
     no estn todava lo suficientemente optimizadas, y en procesadores
     lentos no dan un buen rendimiento. Una opcin es probar el port de
     opengl que han incluido los autores del quake como opcin a las
     libreras Mesa (se llama lib3dfxgl.so). Para usarlo creese un
     fichero llamado glquake.3dfxgl y meta en l lo siguiente:

       #!/bin/sh
       LD_PRELOAD=./lib3dfxgl.so ./glquake $*

  Para el quake world puede usar el glqwcl.3dfxgl que viene con el
  glqwcl y en el quake2 puede especificar el miniport en las opciones de
  video.  Otra opcin es asegurarse de que la libMesaGL.so.2 es un
  enlace a la libMesaGL.so.3. La versin 3 est bastante ms optimizada
  que la 2.6 y el rendimiento aumenta bastante, el problema es que el
  glquake necesita la versin 2.6. Una solucin chapucera es hacer lo
  siguiente; lo primero vemos donde estn las libreras y los ejecuta
  bles:

       [root@unsCAred][/usr/local/games/quake2]# ls -la libMesaGL.so*
       lrwxrwxrwx  1 root  root     14 ene 18 19:30 libMesaGL.so -> libMesaGL.so.2
       lrwxrwxrwx  1 root  root     16 ene 18 19:30 libMesaGL.so.2 -> libMesaGL.so.2.6
       -rwxr-xr-x  1 root  root 897135 dic 26 14:43 libMesaGL.so.2.6
       [root@unsCAred][~]# ls -la /usr/lib/libMesaGL.so.2
       lrwxrwxrwx  1 root  root     12 ene 13 20:01 /usr/lib/libMesaGL.so.2 -> libMesaGL.so
       [root@unsCAred][~]# ls /usr/local/games/quake/glquake*
       /usr/local/games/quake/glquake         /usr/local/games/quake/glquake.mesa
       /usr/local/games/quake/glquake.3dfxgl

  ahora hacemos un script que borre el enlace de la libMesaGl.so.2,que
  aada en el path de bsqueda el directorio /usr/local/games/quake2,
  que ejecute el glquake y que deje todo como estaba.  Para usar las
  MesaGL:

       [root@unsCAred][~]# cat /usr/local/games/quake/glquake.mesa
       #!/bin/sh
       # Movemos la libreria para que no la carge:
       mv /usr/lib/libMesaGL.so.2 /usr/lib/libMesaGL.so.2.tmp
       # Aadimos el directorio del quake2 a la ruta de bsqueda
       LD_LIBRARY_PATH_OLD = $LD_LIBRARY_PATH
       LD_LIBRARY_PATH=/usr/local/games/quake2
       # Ejecutamos el glquake
       # Dejamos todo como estaba.
       mv /usr/lib/libMesaGL.so.2.tmp /usr/lib/libMesaGL.so.2
       LD_LIBRARY_PATH= $LS_LIBRARY_PATH_OLD

  Para el miniport de 3dfx:

       [root@unsCAred][~]# cat /usr/local/games/quake/glquake.3dfxgl
       #!/bin/sh

       # This script preloads the lib3dfxgl.so library which overrides the functions
       # present in libMesaGL.so.  This allows glquake to run using 3DFX's miniport
       # and without Mesa 3-D.  Glide and X11 libraries have to be installed tho,
       # even tho GLQuake doesn't use X11, it's linked against it because Mesa 3-D
       # requires them.
       mv /usr/lib/libMesaGL.so.2 /usr/lib/libMesaGL.so.2.tmp

       LD_LIBRARY_PATH_OLD= $LS_LIBRARY_PATH
       LD_LIBRARY_PATH=/usr/local/games/quake2
       LD_PRELOAD=./lib3dfxgl.so ./glquake $*
       mv /usr/lib/libMesaGL.so.2.tmp /usr/lib/libMesaGL.so.2
       LD_LIBRARY_PATH= $LS_LIBRARY_PATH_OLD

  El problema de hacer esto es que el script se tiene que ejecutar como
  root.  Una opcin para hacer lo mismo pero sin necesidad de ser root
  es eliminar la libMesaGL.so.2 de la ruta de bsqueda del ldconfig y
  ponerla en otro directorio (por ejemplo en /usr/local/lib/MesaGL).
  Para que nos funcionen los programas que necesitan las Mesa lo nico
  que tenemos que hacer es aadir la linea  export
  LD_LIBRARY_PATH=/usr/local/lib/MesaGL en el fichero ~/.bashrc si
  usamos el bash como shell o la linea
   setenv LD_LIBRARY_PATH /usr/local/lib/MesaGL en el .cshrc/.tcsh si
  usamos csh/tcsh. Haciendo esto tendramos lo siguiente:

       [root@unsCAred][~]# cd /usr/local/lib/MesaGL/
       [root@unsCAred][/usr/local/lib/MesaGL]# ls -la libMesaGL.so.2
       lrwxrwxrwx   1 root  root 23 ene 22 21:19 libMesaGL.so.2 -> /usr/lib/libMesaGL.so.3

  Ahora ya podemos eliminar las lineas que llevan un mv de los scripts
  glquake.mesa y glquake.3dfx con lo que ya no es necesario ser root
  para que funcione.

    No me funciona el ratn: Las 3dfx y el gpm no se llevan bien , en
     el README viene bastante claro que para que funcione el ratn con
     las tarjetas aceleradoras hay que matr el gpm antes. Para hacerlo
     solo que ejecutar un killall gpm como root (o un gpm -k>. Tambien
     se puede hacer mediante la orden /etc/rc.d/init.d/gpm stop y
     reiniciarlo con /etc/rc.d/inid.d/gpm start (esto para redhat, en
     otras distribuciones puede variar ligeramente el directorio stat.d
     ); Este sistema es el ms recomendable.

  7.  Servidores espaoles de quake.

  He aqu una lista de algunos servidores de quake en Espaa.

    QuakeWorld:

    GODS      147.83.7.151

    NPM 194.74.94.4:27500

    IBK 161.72.161.72:27500

    Spain 194.179.72.11

    FragZone Stockholm 194.14.204.119:27500

    Axes4All 194.109.6.220:27500

    quake.arrakis.es 195.5.65.162:27500

    [LPB] 147.96.20.220:27500

    Quake 2:

    NPM 194.74.94.9:27910 Deathmatch

    194.74.94.9:27920 Capture the flag

    MaTaDoR-Q2 158.109.8.88:27910 Deathmatch

    NOKLAN-Q2 194.224.96.59:27910 Deathmatch

    VAMP-Q2 158.53.204.155:27910 Capture the flag

    ARRAKIS 195.5.65.162:27910 Deathmatch

    195.5.65.165:29000 Capture the flag

    [QU]-Q2 194.179.71.92:27910 Deathmatch

    quake.ctv.es      195.57.143.92:27910 Deathmatch

  8.  Agradecimientos:

  A todos los habituales del canal #linux del irc hispano por
  soportarme, y en especial a aquellos que me han enseado las
  maravillas del quake (pukka, wait_man, Al y alguno que me dejo ...),
  adems de a todos los que contribuyen a la expansin del linux.

  A Graffic por el 3Dfx-COMOR del que he sacado casi toda la informacin
  sobre las 3dfx.

  A Satch Sky-Man y Devan por las correcciones y aadidos.

  A Id Software por hacer el quake, y lo ms importante, por portarlo a
  Linux.

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  RDSI COMO
  Antonio Verdejo Garca, averdejog.galileo@nexo.es
  pacopepe@insflug.org
  v0.2, 5 de Julio de 1998.

  Este COMO explica cmo configurar tarjetas pasivas RDSI para conex
  iones de red PPP con Linux (a Internet, servidores...). Describe los
  pasos para dar soporte tanto fsico como lgico, as como el mtodo de
  conexin, con 1 y 2 canales, y con llamada bajo demanda.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Hardware Soportado - Recomendado

  2.1.    Modelos de tarjetas pasivas

  2.2.    Soy muy precavido, y estoy leyendo esto antes de comprar la
  tarjeta. Cul recomendis?

  3.      Integracin fsica

  4.      Configuracin BIOS

  5.      Configuracin de recursos usados por el dispositivo.

  5.1.    Dispositivos Plug & Play

  5.2.    Configuracin de dispositivos NO PnP

  6.      Instalacin y configuracin de controladores

  6.1.    Soporte especfico a la tarjeta

  6.2.    Configuracin del Kernel

  6.2.1.  Soporte genrico en el kernel

  6.2.2.  Soporte especfico a la tarjeta

  6.3.    Carga de los mdulos - comprobacin del sistema

  7.      Instalacin y configuracin de software de aplicacin

  7.1.    Pero bueno, qu cmo conectooo?!

  7.2.    Scripts

  7.2.1.  rc.isdn  para un solo canal

  7.2.2.  rc.isdn  para dos canales

  7.2.3.  Explicacin de los scripts

  7.2.4.  ip-up

  7.2.5.  ip-down

  8.      Problemas Frecuentes

  8.1.    Al lanzar la conexin miro el /var/log/messages  y slo veo
  (una vez tras otra):

  8.2.    La conexin se corta tras un mensaje como:

  8.3.    Al inicializar el demonio ipppd obtengo el mensaje `` Can't
  find usable ippp device'' . A qu es debido?

  9.      Por Hacer

  10.     Copyright y Propiedad Intelectual

  11.     Colofn

  11.1.   Y no tenis nada que agradecer a nadie?

  11.1.1. De Antonio Verdejo

  11.1.2. De Francisco J. Montilla

  12.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Tanto bajo Linux como bajo cualquier sistema operativo (tal vez con la
  diferencia de que Linux har exactamente lo que le digamos, para bien
  o para mal) los pasos lgicos para hacer uso de cualquier perifrico,
  son los siguientes, del orden ms fsico al ms lgico:

  1. Comprobar que la marca y modelo del dispositivo estn soportados.

  2. Integrar el dispositivo fsicamente (pinchar la tarjeta o
     conectarla, y dems conexiones accesorias).

  3. Comprobar su integracin a nivel hardware: en los casos en que sea
     posible, que el ordenador reconozca dicho dispositivo. Por ejemplo,
     si el dispositivo es PnP, en BIOS Plug & Pray, aparecer al
     encender el ordenador, en alguna de las fases de testeo.

  4. Comprobar / configurar qu parametros usa (IRQ, Direcciones de
     memoria base, etc).

  5. Instalar los controladores de acuerdo a dichos parmetros.

  6. Instalar el software / utilidades necesarios para el uso efectivo
     de dichos dispositivos.

  Este proceso debe debe realizarse siguiendo estrictamente dicho orden,
  no pasando a la etapa siguiente a menos de que estemos completamente
  seguros de haberse llevado a cabo bien la previa. Y se aplica a la
  integracin de cualquier dispositivo bajo cualquier Sistema Operativo,
  si bien no muchos de los que se hacen llamar as hacen honor a su
  nombre como lo hace Linux ;-).

  2.  Hardware Soportado - Recomendado

  Pese a que las conexiones RDSI se pueden llevar a cabo tanto mediante
  adaptadores externos como tarjetas pasivas internas, en este documento
  nos centraremos en (y recomendamos) las tarjetas pasivas, por
  considerarlas una opcin mejor respecto a adaptadores externos RDSI,
  ya que:

  1. Su coste es generalmente 5 o 6 veces menor.

  2. La diferencia de rendimiento es inexistente.

  3. Es independiente de los puertos serie, no afectando al rendimiento
     o incluso viabilidad, el tipo de UART que se tenga (esto es muy
     importante si pensamos montar una pasarela a Internet con ese viejo
     486 que rueda por la oficina).

  4. El software y los drivers para las tarjetas pasivas internas
     permiten hacer autnticas virgueras, con una perfecta integracin,
     a diferencia de los mdems RDSI.

  2.1.  Modelos de tarjetas pasivas

  La gran mayora de los modelos que se listan a continuacin son
  tarjetas internas pasivas. El nmero de tarjetas soportadas crece casi
  con la misma velocidad que se suceden versiones del ncleo. Tenga en
  cuenta que si posee un adaptador externo (Zyxel o USR) el mtodo que
  se emplear ser el primero descrito en este documento (usando los
  scripts levemente modificados que se usan en una conexin con un mdem
  analgico).

  Por fortuna, este tipo de dispositivos suelen ser poco comunes (por su
  alto precio y nula diferencia en rendimiento en comparacin con una
  tarjeta interna, adems de no soportar el dial on demand ---llamada
  bajo demanda, en adelante DoD--- integrado directamente en el ipppd
  que s soportan los dispositivos ipppX).

  En cualquier caso, los problemas de configuracin que presentan se
  reducen al mnimo, y pasan por ajustar (en determinados casos) la
  cadena de inicializacin del guin de chat.

  Nos centraremos pues, casi en exclusiva, en las tarjetas internas.

  La lista est sacada de los ficheros README.* que acompaan a la parte
  del arbol de fuentes correspondientes al soporte RDSI que modifica un
  fichero .tar.gz del que hablaremos ms adelante en este documento:

    Teles 8.0/16.0/16.3 y compatibles

    Teles 16.3c

    Teles S0/PCMCIA

    Teles PCI

    Teles S0Box

    Creatix S0Box

    Creatix PnP S0

    Compaq ISDN S0 ISA

    AVM A1 (Fritz, Teledat 150)

    ELSA Microlink PCC-16, PCF, PCF-Pro, PCC-8

    ELSA Quickstep 1000

    ELSA Quickstep 1000PCI

    ELSA Quickstep 3000 (igual que una QS1000)

    ELSA Quickstep 3000PCI

    ELSA PCMCIA

    ITK ix1-micro Rev.2

    Eicon.Diehl Diva 2.0 ISA y PCI (S0 y U, PRO no soportada)

    Eicon.Diehl Diva Piccola

    ASUSCOM NETWORK INC. ISDNLink 128K PC adapter (cdigo I-IN100-ST-D)

    Dynalink IS64PH (versin OEM de ASUSCOM NETWORK INC. ISDNLink 128K
     adapter)

    Tarjetas basadas en HFC-2BS0 (TeleInt SA1)

    Sedlbauer Speed Card (Speed Win, Teledat 100)

    Sedlbauer Speed Star (PCMCIA)

    USR Sportster internal TA (compatible Stollmann tina-pp V3)

    ith Kommunikationstechnik GmbH MIC 16 ISA card

    Traverse Technologie NETjet PCI S0 card

    Dr. Neuhaus Niccy PnP/PCI

     Notas:  PCF, PCF-Pro: por ahora, solo la parte ISDN est soportada

    PCC-8: sin testear

    Teles PCMCIA es EXPERIMENTAL

    Teles 16.3c es EXPERIMENTAL

    Teles PCI es EXPERIMENTAL

    Teles S0Box es EXPERIMENTAL

    Eicon.Diehl Diva U interface sin testear

    ICN-ISDN-card

    PCBIT

    ISDN ISA SpellCaster

  Tenga en cuenta que esta es una lista general. Muchos de los modelos
  que aqu aparecen, no se encuentran en el mercado espaol. La mayora
  de las tarjetas son de origen alemn. La PCBIT es un "honrosa"
  excepcin: est fabricada en Portugal.

  De las tarjetas distribuidas por Telefnica y manufacturadas por
  Alcatel (si no recordamos mal), las infames SPC-2 en cualquiera de sus
  versiones (y sobre todo en la primera), ni hablaremos.

  Ninguno de los que suscriben tienen noticia (pese a utilizar en parte
  de su circuitera los chips Siemens) de que alguien haya conseguido
  hacerla funcionar bajo Linux. En cualquier caso, su funcionamiento
  (bajo un SO que incluya soporte para la misma) deja mucho que desear.

  Y como siempre, visita obligada a la documentacin que incluye el
  cdigo fuente del ncleo (mxime si se aventura a usar un kernel de la
  serie 2.1) bajo Documentation/isdn para obtener una lista lo ms
  actualizada posible.

  2.2.  tarjeta. Cul recomendis?  Soy muy precavido, y estoy leyendo
  esto antes de comprar la

  Como decamos en la seccin ``'', ante todo, tarjetas pasivas internas
  (que estn soportadas, claro est) frente a adaptadores RDSI externos.

  En general, las tarjetas pasivas con circuitera Siemens, y
  especialmente las que integran el juego de chipsets HSCX e ISAC, dado
  que el driver HiSax es el ms desarrollado y el que ms empuje tiene.

  Teniendo como criterios lo anterior, el rendimiento, la calidad, y la
  colaboracin que las marcas tienen con Linux en general, y con los
  desarrolladores de isdn4linux en particular:

  1. ELSA

  2. Creatix

  3. Resto de tarjetas soportadas

  La Creatix PnP es casi equivalente a la Teles 16.3 PnP (-- Ojo, NO la
  Teles 16.3c PnP, que pese a estar soportada experimentalmente, no
  tiene nada que ver en cuanto a calidad--) , si bien ha sido
  desarrollada ntegramente por Creatix; adems de la actitud positiva
  de Creatix respecto Linux, a diferencia de Teles.

  Apoye a los fabricantes que apuestan por Linux!

  3.  Integracin fsica

  Aparte de las precauciones con la esttica, (agrrese antes a algn
  objeto con bastante masa y conexin a tierra, como una tubera o
  radiador, para descargarla) es conveniente familiarizarnos con el
  dispositivo, anotar cuando proceda qu chipset tiene, si tiene o no
  jumpers, si es as para qu valen, etc.

  Asegrese de que la tarjeta queda firmemente asentada, ms de un
  problema inexplicable se ha debido muchas veces a esto.

  En algunas placas base, especialmente las de 486, no da completamente
  igual dnde se pincha la tarjeta. Familiarcese con su Placa Base.

  Los dispositivos RDSI suelen conectarse mediante cables de pares pin-
  a-pin, si bien no es estrictamente necesario que el cable sea de
  pares. El conector suele ser un RJ-45, idntico a los usados para
  redes.  Normalmente la tarjeta traer un cable, pero si no es as, o
  lo necesita ms largo, con un cable de red UTP corriente valdr.
  Tericamente, y en configuraciones del bus pasivo (instalacin
  telefnica propiamente dicha) tpicas, el cable puede ser de unos
  centenares de metros, si bien no hemos comprobado nunca de forma
  prctica este particular.

  Una ltima advertencia, para aquellos que estn leyendo esto para
  instalar en una empresa: los dispositivos RDSI suelen llevarse muy mal
  con las centralitas, especialmente con las Siemens.

  Si quiere ahorrarse quebraderos de cabeza, malos funcionamientos,
  interminables actualizaciones del firmware de la centralita, y en la
  mayora de los casos, para que simplemente funcione, exija que el bus
  pasivo RDSI para la tarjeta sea dedicado y directo. Se ahorrar
  infinidad de problemas, y el funcionamiento ser el que un entorno de
  produccin exige.

  4.  Configuracin BIOS

  La mayora de las tarjetas de hoy en da son Plug & Play, y esto,
  aunque parezca mentira, en BIOS con PnP es a veces una ventaja; la
  mayora de ellas muestran al arrancar los dispositivos PnP que han
  encontrado, por lo que si ste es su caso, y no le aparece nada, puede
  tener la absoluta certeza de que para el ordenador es como si no
  existiese. En algunas placas, hay que especificar qu recursos se
  dejan para asignar a los dispositivos PnP.

  En el resto de los casos, en combinaciones de placas / dispositivos no
  Plug & Play, puede ser necesario efectuar algn retoque en la BIOS,
  por ejemplo, si nuestra BIOS es PnP, pero el dispositivo no,
  posiblemente deba reservar recursos y/o asignarlos en la BIOS para l.

  5.  Configuracin de recursos usados por el dispositivo.

  5.1.  Dispositivos Plug & Play

  Bajo Linux, y mientras se trabaja en un soporte directo en el kernel
  para este "estndar", habremos de usar las herramientas del paquete
  isapnptools para asignar los recursos precisos al dispositivo. Como su
  nombre indica, solo valen para dispositivos PnP ISA, no para los PCI
  (que de todas formas, casi siempre han sido PnP en cuanto a enchufar y
  listo, no al estndar). La mayora de los servidores ftp que albergan
  contenidos Linux las tienen, as como las distribuciones Linux ms
  populares.

  Para configurar la tarjeta, use el programa pnpdump y vuelque su
  salida a un fichero, por ejemplo, a /tmp/isapnp.conf.

  Deber editarlo para reflejar los valores correctos. Una vez hecho
  esto, con isapnp /tmp/isapnp.conf tendr la tarjeta lista.

  Luego de haber comprobado que los valores son correctos, y que la
  tarjeta se inicializa correctamente, guarde el fichero
  definitivamente, en /etc/isapnp.conf.

  Al arrancar (y suponiendo que haya instalado o tuviera ya instaladas
  correctamente las pnptools) los scripts de inicializacin se
  encargarn de todo automticamente. En cualquier caso, y si viera que
  isapnp no se ejecuta al arrancar el Linux, siempre le queda la
  solucin de incluirlo en /etc/rc.d/rc.local o similar, o, en el peor
  de los casos, ejecutarlo a mano.

  El fichero generado por pnpdump del siguiente modo

       [root@hal /root]# pnpdump > /tmp/isapnp.conf

  y suponiendo que slo tenga una tarjeta PnP, una Teles.SO 16.3c PnP en
  este caso, si tiene una SoundBlaster PnP, esto estar al final
  generalmente, y ser similar a esto:

  # $Id: pnpdump.c,v 1.8 1997/01/14 21:05:35 fox Exp $
  # This is free software, see the sources for details.
  # This software has NO WARRANTY, use at your OWN RISK
  #
  # For details of this file format, see isapnp.conf(5)
  #
  # Compiler flags: -DREALTIME
  #
  # Trying port address 0203
  # Board 1 has serial identifier 0d 1a 09 0b 44 10 26 27 50
  # (DEBUG)
  (READPORT 0x0203)
  (ISOLATE)
  (IDENTIFY *)

  # Card 1: (serial identifier 0d 1a 09 0b 44 10 26 27 50)
  # TAG2610 Serial No 436800324 [checksum 0d]
  # Version 1.0, Vendor version 1.1
  # ANSI string -->TELES.S0/16.3c Plug&Play<--
  #
  # Logical device id TAG2610
  #     Device support I/O range check register
  #
  # Edit the entries below to uncomment out the configuration required.
  # Note that only the first value of any range is given, this may be
  changed if $# Don't forget to uncomment the activate (ACT Y) when happy

  (CONFIGURE TAG2610/436800324 (LD 0
  # Multiple choice time, choose one only !

  #     Start dependent functions: priority preferred
  #       Logical device decodes 16 bit IO address lines
  #             Minimum IO base address 0x0580
  #             Maximum IO base address 0x05bc
  #             IO base alignment 4 bytes
  #             Number of IO addresses required: 2
  # (IO 0 (BASE 0x0580))
  #       IRQ 3, 4, 5, 9, 10, 11, 12 or 15.
  #             High true, edge sensitive interrupt (by default)
  # (INT 0 (IRQ 3 (MODE +E)))

  #       Start dependent functions: priority acceptable
  #       Logical device decodes 16 bit IO address lines
  #             Minimum IO base address 0x0500
  #             Maximum IO base address 0x05bc
  #             IO base alignment 4 bytes
  #             Number of IO addresses required: 2
  # (IO 0 (BASE 0x0500))
  #       IRQ 10, 11 or 12.
  #             High true, edge sensitive interrupt (by default)
  # (INT 0 (IRQ 10 (MODE +E)))
  #       Start dependent functions: priority acceptable
  #       Logical device decodes 16 bit IO address lines
  #             Minimum IO base address 0x0680
  #             Maximum IO base address 0x06bc
  #             IO base alignment 4 bytes
  #             Number of IO addresses required: 2
  # (IO 0 (BASE 0x0680))
  #       IRQ 10, 11 or 12.
  #             High true, edge sensitive interrupt (by default)
  # (INT 0 (IRQ 10 (MODE +E)))

  #       Start dependent functions: priority functional
  #       Logical device decodes 16 bit IO address lines
  #             Minimum IO base address 0x1500
  #             Maximum IO base address 0x17fc
  #             IO base alignment 4 bytes
  #             Number of IO addresses required: 2
  # (IO 0 (BASE 0x1500))
  #       IRQ 3, 4, 5, 9, 10, 11, 12 or 15.
  #             High true, edge sensitive interrupt (by default)
  # (INT 0 (IRQ 3 (MODE +E)))

  #     End dependent functions
  #     Vendor defined tag:  84 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  #     Vendor defined tag:  84 06 00 00 00 00 00
  # (ACT Y)
  ))
  # End tag... Checksum 0x00 (OK)

  Simplemente hay que dejar una de las secciones (IO... ) e (INT...)
  eliminando los comentarios, y asegurarse (esto es importante) de
  eliminar el ltimo comentario de la lnea donde se lee # (ACT Y) para
  activar la incializacin de la tarjeta con los valores escogidos...

  Es conveniente anotar dichos valores, ya que los que tendremos que
  utilizar posteriormente (antelos).

  Y ni que decir tiene que no debemos asignarle recursos que ya estn
  siendo usados por otros dispositivos. Familiarcese con su sistema.

  Un cat /proc/interrupts o un cat /proc/ioports le ayudar,
  especialmente antes de instalar la tarjeta en el ordenador, siempre y
  cuando todos los dispositivos que tenga su ordenador sean reconocidos
  por Linux, ya que los que no lo sean no aparecern en los listados y
  no podremos saber qu recursos estn usando.

  Refirase a la seccin ``''.

  Un fichero /etc/isapnp.conf, una vez eliminados todos los comentarios
  suele tener este aspecto:

       (READPORT 0x0203)
       (ISOLATE)
       (IDENTIFY *)
       (CONFIGURE TAG2610/436800324 (LD 0
       (IO 0 (BASE 0x0580))
       (INT 0 (IRQ 3 (MODE +E)))
       (ACT Y)
       ))

  La salida del comando isapnp /etc/isapnp.conf, bien sea a mano o
  durante el arranque del sistema, suele ser as:

       [root@hal /root]# isapnp /tmp/isapnp.conf
       Board 1 has Identity 0d 1a 09 0b 44 10 26 27 50:  TAG2610 Serial No 436800324 [checksum 0d]

  5.2.  Configuracin de dispositivos NO PnP

  Se supone que ha ledo, entendido, y llevado a cabo con la absoluta
  certeza de haberlo hecho bien, la seccin ``''.

  No conocemos todos los dispositivos NO PnP disponibles en el mercado
  que funcionan con Linux. Pero la experiencia muestra que generalmente,
  para su configuracin tiene las siguientes opciones:

    Usar alguna utilidad, generalmente bajo DOS o Windows.

    Usar Jumpers del dispositivo si los tiene

    Usar una utilidad para linux (en contadsimas ocasiones)

  Normalmente, la ms cmoda y fiable es la de los jumpers, ya que no
  deberemos preocuparnos de si los reset borran la configuracin o no,
  aunque en algunas tarjetas (Teles.SO 16.3 NO PnP por ejemplo) slo
  posibilitan la asignacin de IOs. (Ojo, con esta tarjeta, son unos
  microrruptores muy pequeos, generalmente con un poco de grasa por
  encima).

  En el primer caso, si son utilidades DOS, siempre podremos arrancar
  con ese disquete antediluviano que rueda por el cajn, y configurar.
  Si es windows, y se tiene instalado tambin, tal vez tras unas
  encomiendas a San Pancracio, si Murphy est distrado, y la suerte
  est de nuestro lado, consigamos convencerla de que use los recursos
  que queremos.

  En sistemas en los que afortunadamente no est instalado, siempre
  podemos probar a pincharla en uno que s lo tenga, configurarla, y
  volverla a pinchar en el sistema Linux, si bien no siempre funciona.

  Otra posibilidad, si la suerte acompaa, es comprobar (la mayor parte
  de las veces mediante ensayo-error, y no siempre con absoluta certeza,
  aunque un vistazo a la documentacin de la tarjeta ayuda bastante)
  qu parmetros por defecto tiene el dispositivo de fbrica, y usarlos,
  siempre que no entren en conflicto con otros que ya tengamos
  instalados; si es as, dependiendo de dichos dispositivos puede ser
  hasta ms cmodo reconfigurarlos y dejar hueco al nuevo inquilino.

  Recuerde (incluso anote, insistimos) qu parmetros va a usar. Los
  necesitar ms adelante.

  6.  Instalacin y configuracin de controladores

  Los controladores son el software que hace funcionar al dispositivo, y
  que da soporte lgico al Sistema Operativo para interactuar con l. En
  Linux la integracin de este soporte se lleva a cabo configurando y
  compilando el ncleo o kernel, con lo que obtenemos un corazn del
  Sistema Operativo a la medida de cada mquina.

  Linux ofrece la posibilidad de compilarlo ntegro en el kernel o en
  mdulos aparte, que se cargan segn los necesite el sistema o no. Si
  no est familiarizado con todo esto, es momento de que lea el Kernel-
  Como, disponible en el Insflug http://www.insflug.org.

  El kernel necesitar tener dos tipos de soporte; uno genrico, (mdulo
  isdn) y otro especfico a la tarjeta (hisax, etc).

  Como algunas tarjetas RDSI, especialmente las que tienen soporte
  experimental, slo funcionan con controladores especficos modulares,
  nos centraremos en este tipo de soporte, por ser ms universal.

  No obstante, en los ejemplos supondremos que hacemos uso de kernels
  estables (2.0.xx), aunque tengamos que parchearlos. Puede usar kernels
  de desarrollo si lo prefiere, tan slo tngalo en cuenta en los
  ejemplos que aplique y modifquelos en consecuencia, sin olvidar que
  estos kernels son para lo que son, desarrollo, no siendo muy idneos
  para la instalacin por primera vez de algo que se desconoce.

  6.1.  Soporte especfico a la tarjeta

  Antes de continuar, suponemos que ha ledo la seccin ``'' y que sabe
  a ciencia cierta que su tarjeta est soportada.

  Si no parece estarlo, es conveniente que lea (s, bueno, relea ;-) de
  todos modos la documentacin que hay en
  /usr/src/linux/Documentation/isdn que siempre estar ms actualizada
  que este Como. Si no, no est todo perdido; obtenga el ltimo rbol de
  desarrollo de ftp://ftp.suse.com/pub/isdn4linux/v2.0/isdn.tar.gz y
  eche un vistazo a los ficheros de isdn/Documentation/isdn/, puede que
  se lleve una grata sorpresa.

  Si su tarjeta est soportada en la distribucin estndar del kernel
  actual (2.0.34 a da de hoy), salte a la seccin ``''. Si necesita
  parchear, siga leyendo.

  Para aadir soporte al kernel actual, integraremos una parte del rbol
  de fuentes modificada, que aada soporte para la misma. Obtenga el
  fichero ftp://ftp.suse.com/pub/isdn4linux/v2.0/isdn.tar.gz, suele ser
  un enlace simblico a la ltima versin del rbol de desarrollo RDSI
  disponible.

  No obstante... el soporte es experimental. Casos tpicos son los de
  las ltimamente disponibles popularmente Teles.SO 16.3c o las Asuscom.
  Los que suscriben no han visto nada anormal (cierto es que el tiempo
  de que hemos dispuesto para testearlas ha sido breve) y tienen
  noticias de varios servidores de los llamados de produccin que estn
  funcionando sin problemas con kernels estables y estas tarjetas.

  No obstante, no se parchea en el sentido estricto, ya que lo nico que
  se sustituye es la parte correspondiente a RDSI.

  La parte del rbol modificada lleva un fichero llamado std2kern que
  hace el trabajo de parcheo por nosotros, siempre y cuando
  /usr/src/linux sea el directorio donde residan las fuentes de linux.
  Asegrese de que exista; si en su sistema el directorio se llama
  /usr/src/linux-2.0.33, compruebe, y en su ausencia cree un enlace al
  mismo llamado linux; por ejemplo:

       cd /usr/src ;
       ln -s linux-2.0.33 linux

  Descomprima el rbol de fuentes isdn: suponiendo que ha dejado el
  fichero en /tmp:

       ( cd /usr/src; tar zxvf /tmp/isdn.tar.gz )

  Acceda a /usr/src/isdn, y ejecute el comando std2kern -d:

       cd /usr/src/isdn

  no olvide el "./" para dar el path directo al fichero, en la mayora
  de los sistemas el directorio actual no est en el PATH por seguridad.

  Compruebe que no se producen mensajes de error. Si es as, averige
  qu sucede. Lo ms tpico es que se haya equivocado en la eleccin de
  fichero, y haya escogido uno para un kernel de otra versin (2.1.xx
  por ejemplo).

  6.2.  Configuracin del Kernel

  Una vez hemos llevado a cabo los pasos anteriores procederemos a la
  configuracin y posterior recompilacin del kernel. Si no est
  habituado a esto, lase primero el Kernel-Como, disponible en Insflug,
  vea seccin ``INSFLUG''.

  Acceda a /usr/src/linux y ejecute su mtodo preferido de
  configuracin. Asegrese de activar, en la seccin principal, Code
  maturity level options el apartado Prompt for development and/or
  incomplete code/drivers, o de lo contrario, el programa de
  configuracin no le dar opcin a seleccionar controladores
  experimentales.

  Una vez hecho esto, seleccione:

  6.2.1.  Soporte genrico en el kernel

  Vaya a la seccin ISDN subsystem del men principal:

    ISDN support como mdulo (M).

    Support synchronous PPP

    Support generic MP (RFC 1717) (potestativo, necesario para canales
     mltiples)

    Support audio via ISDN (potestativo)

  Esto es para cuanto a soporte RDSI se refiere. En cuanto a soporte
  PPP, cuestiones especficas de redes, y dems aspectos, recurra al
  Como apropiado.

  6.2.2.  Soporte especfico a la tarjeta

  En la seccin ISDN subsystem del men principal, active el controlador
  que d soporte a su tarjeta. El ms popular es el HiSax, si ese es su
  caso, deber adems especificar:

    Protocolo a soportar: en nuestro caso, HiSax Support for EURO/DSS1
     y
    Cul de la familia de tarjetas soportadas por l es la suya; si por
     ejemplo es la veterana Teles.SO 16.3 NO PnP, la PnP, o la pcmcia
     (NO la 16.3c OJO) seleccionara HiSax Support for Teles 16.3 or PNP
     or PCMCIA.

  De nuevo, no conocemos ni podemos conocer todas las tarjetas
  soportadas por Linux. Es posible que en drivers experimentales haya
  que indicar alguna otra opcin; recurra a su sentido comn, a la
  documentacin (a la que no nos cansaremos de remitirle; este documento
  no es ms que una gua) y a nosotros, a fin de actualizar este Como.

  Salga del men guardando los cambios, y compile; no olvide el make
  modules y el make modules_install, y reinstalar el LILO para dicho
  kernel.

  Para ms informacin de cmo recompilar el kernel, vase el Kernel-
  Como, disponible en el Insflug, vea seccin ``INSFLUG''.

  6.3.  Carga de los mdulos - comprobacin del sistema

  Ya he recompilado, instalado los mdulos, y arrancado con el nuevo
  kernel.  Adems, he usado isapnp y todo parece haber ido bien...  Qu
  hago ahora?

  Se ha ganado un descanso. Tmese algo... ;-) No, en serio. Ahora viene
  la parte ms interesante.

  Hay varias formas de cargar los mdulos, en cualquier caso, la manera
  que nunca falla es hacerlo a mano directamente desde la lnea de
  comandos.  Supondremos que hacemos uso del soporte especfico HiSax.
  La sintaxis del mdulo hisax es la que sigue, si bien es conveniente
  leer (al final lo conseguiremos ;-), especialmente en drivers
  experimentales, /usr/src/linux/Documentation/isdn/README.HiSax.

       modprobe hisax type=<codigo tarjeta> protocol=<protocolo> io=<direccion E/S> irq=<interrupcion>

  Ha llegado el momento de echar mano de donde tuviera anotados (los
  anot?)  los parmetros que asignara en las secciones ``'' y ``''.

  Suponiendo que se trate de la tarjeta Teles.SO 16.3c PnP, que al fin y
  al cabo, fue la causante en origen de este Como:

       modprobe hisax type=14 protocol=2 io=<IO> irq=<IRQ>

  Por ejemplo:

       modprobe hisax type=14 protocol=2 io=0x0580 irq=11

  con lo que si miramos en /var/log/messages deberamos ver algo como:

       Jun 23 12:05:11 hal kernel: HiSax: Driver for Siemens chip set ISDN cards
       Jun 23 12:05:11 hal kernel: HiSax: Version 2.8
       Jun 23 12:05:11 hal kernel: HiSax: Revisions 1.15.2.8/1.10.2.5/1.10.2.3/1.30.2.6/1.8.2.5
       Jun 23 12:05:11 hal kernel: HiSax: Card 1 Protocol EDSS1 Id=HiSax (0)
       Jun 23 12:05:11 hal kernel: HiSax: Teles 16.3c driver Rev. 1.1.2.2
       Jun 23 12:05:11 hal kernel: teles3c: defined at 0x580 IRQ 3 HZ 100
       Jun 23 12:05:11 hal kernel: teles3c: resetting card
       Jun 23 12:05:11 hal kernel: Teles 16.3c: IRQ 11 count 0
       Jun 23 12:05:11 hal kernel: Teles 16.3c: IRQ 11 count 1
       Jun 23 12:05:11 hal kernel: HiSax: DSS1 Rev. 1.16.2.3
       Jun 23 12:05:11 hal kernel: HiSax: 2 channels added
       Jun 23 12:05:11 hal kernel: HiSax: module installed

  El tipo 14 es el que se corresponde con la Teles 16.3c PnP, el
  protocolo 2 es el usado en Espaa para las conexiones RDSI, EURO ISDN
  o EDSS1. Los otros dos valores (direccin de E/S e interrupcin)
  dependern de su configuracin particular, que anot en su momento,
  verdad?

  Dependiendo del driver, este puede que se cargue aun con parmetros
  errneos, si bien no es el caso del HiSax, que rehusar a hacerlo.

  Si sospechamos que pese a haberse cargado (repetimos, no en el caso
  del HiSax) hay por ejemplo conflictos de IRQ, o no est usando la que
  le hemos asignado, un indicador claro de esto es que al hacer un

       cat /proc/interrupts
        0:    9719062   timer
        1:     342221   keyboard
        2:          0   cascade
        4:     495989 + serial
       10:    1591809   ICN
       12:        681   eth0
       13:          1   math error

  en un sistema con una tarjeta ICN la lnea correspondiente a la irq
  usada por el controlador contase con 0 interrupciones de contador
  (segunda columna). Esto aplica para todos los dispositivos; si la
  lnea

       10:    1591809   ICN

  fuese

       10:    0         ICN

  sera un claro sntoma de que el driver ICN no est usando dicha
  interrupcin, casi seguro por fallo de configuracin. Tan slo por
  cargar correctamente,  debe de poner el contador a 1 al menos.

  Llegados a este punto, respire profundamente y sintase todo un gur
  Linuxero...  ;-) Ya casi est listo; para no tener que hacerlo en un
  futuro a mano, y suponiendo que tiene las modutils correctamente
  instaladas, edite o cree su /etc/conf.modules o /etc/modules.conf e
  inserte las siguientes lneas, (suponiendo que use por ejemplo una
  Teles 16.3 NO PnP/ con la IRQ 10 y la io 0x180 :

       alias isdn hisax
       options hisax type=3 protocol=2 io=0x180 irq=10

  ejecute depmod -a para computar/actualizar las dependencias entre
  mdulos; de ahora en adelante un modprobe hisax bastar.

  7.  Instalacin y configuracin de software de aplicacin

  Mi tarjeta parece que ya est lista. Puedo usar los scripts de
  conexin a Infova que usaba hasta ahora?

  No tal cual;  necesitar hacer ciertas modificaciones. Usaremos otro
  mtodo para conectarnos a iNET. En vez de usar el pppd asncrono de
  toda la vida, usaremos un pppd especial, sncrono, que permite algunas
  lindezas: el ipppd.

  Arranque su cliente ftp favorito, y dirjase a
  ftp://ftp.franken.de/pub/isdn4linux/v2.0/isdn4linux*.tar.gz que es el
  sitio oficial del ISDN4Linux. Ah tiene una mgnifica (aunque algo
  falta de actualizacin) FAQ en un perfecto ingls que debera tener al
  menos como punto de referencia.

  Le remitiramos a ella, pero si ha llegado hasta aqu y hacemos eso
  igual empezamos a sentir agudos pitidos en los oidos... ;-)

  Descomprimimos, configuramos, compilamos e instalamos. De la lista de
  utilidades las que ms nos interesan, son isdnctrl (directorio isdn) y
  el ipppd (directorio ppp4i4k/ipppd/version) porque son las que
  usaremos en el mtodo que describiremos despus.

  Normalmente, casi todas las distribuciones suelen llevar un paquete de
  utilidades RDSI que incluyen los programas que mencionamos, amn de
  abundante documentacin y scripts de ejemplo. Busque en su
  distribucin favorita.

  No obstante, si por alguna razn no consigue compilar los elementos
  necesarios, en ftp://ftp.insflug.org/pub/RDSI/ tiene a su disposicin
  el software mnimo necesario ya compilado.

  Como en todo sistema UN*X la comunicacin con los dispositivos fsicos
  (tarjetas, discos...) se realiza por medio de ficheros. Necesitaremos
  crear los dispositivos que harn que el kernel pueda trabajar con la
  tarjeta RDSI. Si usa un paquete de una distribucin es casi seguro que
  crear, si no lo estn ya, las entradas necesarias en el directorio
  /dev, si no es as, ejecute make devices en el directorio raz de las
  isdn4utils que baj antes, ser sufiente.

  7.1.  Pero bueno, qu cmo conectooo?!

  Vamos con ello. Dos mtodos, uno de ellos mencionado someramente. Se
  basa en aprovechar los scripts de conexin (que suponemos le
  funcionan) usados con un mdem analgico normal. Las variaciones son
  mnimas. Aada en el guin de chat la cadena de inicio

       ATS14=3&xxxxxxxxx (siendo xxxxxxxxx el numero de su linea RDSI)

  y sustituya donde corresponda el dispositivo /dev/modem por
  /dev/ttyI0. Usaremos el pppd normal y corriente que usbamos antes con
  el mdem. Nada ms que decir de este mtodo, salvo que no haga uso del
  parmetro +ua en el fichero options, est obsoleto en las ltimas
  versiones del paquete pppd.  .

  El segundo hace uso de las utilidades que nos bajamos anteriormente, y
  nos permitir conseguir llamadas bajo demanda (dial on demand, DoD).

  Opcin sta muy interesante en redes donde se vaya a usar la conexin
  RDSI para dar servicio iNET, por medio del enmascaramiento IP, a
  varios puestos de una red local, pues posibilitar el que la llamada
  se efecte automticamente por trfico de paquetes (abrir un
  navegador, lanzar el programa de correo, hacer un ping, etc.).

  La parte ms importante de este mtodo reside en los scripts usados
  para configurar la conexin. Los hay de mltiples formas, ms o menos
  "sofisticados". Los incluidos en este documento puede que no sean para
  ganar un Nobel, pero funcionan bastante bien. En este sentido, estamos
  abiertos (no hace falta decirlo) a modificaciones y/o comentarios,
  pero de eso hablaremos ms tarde.

  Unos puntos a destacar. Si queremos usar DoD, necesitaremos tener dos
  scripts en /etc/ppp tambin incluidos, para asegurarnos que la ruta
  por defecto apunte siempre a una direccin de iNET y al dispositivo
  RDSI.

  Esto, y, por supuesto, NO tener ninguna ruta por defecto a la(s)
  tarjeta(s) de red (ethernet normalmente) que ya tuviramos en nuestro
  sistema: el demonio de PPP (pppd o ipppd) no reemplaza la ruta por
  defecto, es un problema muy comn en los grupos de noticias y en los
  canales de Linux de IRC.

  El sntoma es que la conexin se establece, pero no podemos salir a
  iNET porque no tenemos sealizado por dnde hacerlo. No es el
  propsito de este documento extenderse demasiado en temas de rutado,
  pero en condiciones normales, no necesitaremos ruta por defecto,
  podemos usar rutas estticas;  dejaremos que el (i)pppd la establezca
  cuando as sea necesario.

  Y ser uno de los scripts (ip-down) el que se encargar de que en todo
  momento haya una ruta por defecto a iNET por la tarjeta RDSI.

  7.2.  Scripts

  Hace cosa de un mes fueron enviados a la lista de correo (an no est
  suscrito? a qu espera? ;-) del SLUG (l-linux@calvo.teleco.ulpgc.es),
  de modo que si est suscrito y no borra los mensajes, imagino que los
  tendr.
  Pero como no todo el mundo est en dicha lista (y este Como, que duda
  cabe, no sera tal sin ellos), aqu van:

  7.2.1.  rc.isdn  para un solo canal

       #!/bin/sh
       #
       # Thanks to Rainer Birkenmaier <rainer@kirk.mop.uni.ulm.de>
       # Hacked by Antonio Verdejo Garcia <averdejog.galileo@nexo.es>
       # & Francisco J Montilla <pacopepe@insflug.org>

       PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

       LOCAL_NUMBER="xxxxxxxxx"
       REMOTE_NUMBER="xxx"
       LOCAL_IP="195.76.154.169" # IP falsa por la que establecer ruta por
                                 # defecto, a fin de que salte el DoD
       DEVICE="ippp0"
       USER="user@ISP"

       isdnctrl addif  $DEVICE                 # Creamos un interfaz nuevo,'DEVICE'
       isdnctrl addphone $DEVICE out $REMOTE_NUMBER    # Numero al que llamar
       isdnctrl eaz $DEVICE $LOCAL_NUMBER      # EAZ: el numero de su RDSI
       isdnctrl l2_prot $DEVICE hdlc           # para PPP sincrono
       isdnctrl l3_prot $DEVICE trans          #
       isdnctrl encap $DEVICE syncppp          # encapsulacion de paquetes IP en
                                               # en  tramas PPP
       isdnctrl huptimeout $DEVICE 300         # tiempo de inactividad tras el que
                                               # desconectar: 300 sec. -> 5min
       isdnctrl chargehup $DEVICE off          # Colgar antes del siguiente paso
       isdnctrl secure $DEVICE on              # Aceptar llamadas de numeros
                                               # autorizados solamente
       ifconfig $DEVICE $LOCAL_IP
       route add -net 195.76.154.0 $DEVICE
       route add default $DEVICE

       /sbin/ipppd user $USER remotename infovia -d defaultroute noipdefault \
       ipcp-accept-local ipcp-accept-remote mru 1500 mtu 1500 lock -bsdcomp -pc -ac /dev/ippp0 &

  las ltimas dos lneas son una en realidad; puede indicar que se
  interprete como una sola tal y como se hace en el script con el \; o
  bien ponerlo en una sola lnea sin retorno de carro.

  Asegrese de que ipppd est en /sbin si transcribe tal cual este
  script; si no es as, modifique el path en el script.

  Vea la seccin ``'' para una explicacin acerca de qu parmetros ha
  de modificar y una explicacin sobre este script.

  7.2.2.  rc.isdn  para dos canales

  #!/bin/sh
  #
  # Thanks to Rainer Birkenmaier <rainer@kirk.mop.uni.ulm.de>
  # Hacked by Antonio Verdejo Garcia <averdejog.galileo@nexo.es>

  PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

  LOCAL_NUMBER="xxxxxxxxx"
  REMOTE_NUMBER="xxx"
  LOCAL_IP="195.76.154.169" # dummy; the IPCP negotiation overwrite it
  DEVICE="ippp0"
  USER="user@ISP"

  # additional for channel bundling:
  DEVICE1="ippp128"

  isdnctrl addif  $DEVICE                 # Create new interface 'DEVICE'
  isdnctrl addphone $DEVICE out $REMOTE_NUMBER    # Set outgoung phone-number
  isdnctrl eaz $DEVICE $LOCAL_NUMBER      # Set local EAZ ..
  isdnctrl l2_prot $DEVICE hdlc           # for sync PPP: set Level 2 to HDLC
  isdnctrl l3_prot $DEVICE trans          # not really necessary, 'trans' is default
  isdnctrl encap $DEVICE syncppp          # encap the IP Pakets in PPP frames
  isdnctrl huptimeout $DEVICE 300         # Hangup-Timeout is 300 sec. -> 5 min
  isdnctrl chargehup $DEVICE off          # Hangup before next Charge-Info
  isdnctrl secure $DEVICE on              # Accept only configured phone-number

  # additional for channel bundling:
  isdnctrl addslave $DEVICE $DEVICE1      # Create new slave interface 'DEVICE1'
  isdnctrl addphone $DEVICE1 out $REMOTE_NUMBER   # Set outgoung phone-number
  isdnctrl eaz $DEVICE1 $LOCAL_NUMBER     # Set local EAZ ..
  isdnctrl l2_prot $DEVICE1 hdlc          # for sync PPP: set Level 2 to HDLC
  isdnctrl l3_prot $DEVICE1 trans         # not really necessary, 'trans' is default
  isdnctrl encap $DEVICE1 syncppp         # encap the IP Pakets in PPP frames
  isdnctrl huptimeout $DEVICE1 300        # Hangup-Timeout is 300 sec. -> 5 min
  isdnctrl chargehup $DEVICE1 off         # Hangup before next Charge-Info
  isdnctrl secure $DEVICE1 on             # Accept only configured phone-number

  ifconfig $DEVICE $LOCAL_IP
  route add -net 195.76.154.0 $DEVICE
  route add default $DEVICE

  /sbin/ipppd user $USER remotename infovia -d defaultroute noipdefault ipcp-accept-local \
  ipcp-accept-remote mru 1500 mtu 1500 +mp lock -bsdcomp -pc -ac /dev/ippp0 /dev/ippp1 &

  7.2.3.  Explicacin de los scripts

  Los scripts no necesitan demasiadas explicaciones. Sustituir user e
  ISP por su nombre de usuario y el nombre de su proveedor (pepe@arrakis
  por ejemplo) y poner los valores adecuados en LOCAL_NUMBER (el nmero
  de su RDSI) y en REMOTE_NUMBER (055 si usa Infova).

  La direccin de LOCAL_IP es una direccin falsa, la negociacin IPCP
  la sobreescribe, pero por una simple razn de coherencia, conviene
  darle una IP vlida del rango de su proveedor, y asignarle a ella la
  ruta por defecto, (lo mismo se aplica para la direccin de red de la
  ruta del final del script) esto es necesario para que funcione el DoD.

  Las direcciones del ejemplo son de Intercom, pero valen de cualquier
  manera (funciona tambin usando las mismas con otros proveedores).
  Estas direcciones son las mismas que aparecen en los scripts ip-up e
  ip-down:
  7.2.4.  ip-up

       #!/bin/sh
       /sbin/route del default
       /sbin/route add default ippp0

  7.2.5.  ip-down

       #!/bin/sh
       /sbin/route del default
       /sbin/ifconfig ippp0 down
       /sbin/ifconfig ippp0 195.176.154.169
       /sbin/route add -net 195.176.154.0 ippp0
       /sbin/route add default ippp0

  Es posible que alguno de los comandos que aparecen en estos dos
  ltimos guiones sean redundantes. De nuevo, estamos abiertos a
  sugerencias.

  El rc.isdn de la seccin ``'' est preparado para el uso de dos
  canales y por lo tanto una conexin a 128 Kbps, usando uno de los
  canales como esclavo del primero. La opcin +mp es necesaria en este
  caso, adems de que haya seleccionado en la compilacin del kernel, en
  la seccin general de RDSI, Support Generic MP (RFC 1717). (Compruebe
  que exista la lnea CONFIG_ISDN_MPP=y en el fichero
  /usr/src/linux/.config, que es donde se almacena por defecto la
  configuracin del ncleo).

  Tenga en cuenta que, como es lgico, pagar el doble... Aunque esto en
  empresas no suele ser un problema, cuidado en casa, o ver como las
  facturas de Telefnica tienden a infinito... ;-)

  Para lanzar manualmente el segundo canal, ejecute isdnctrl addslave
  ippp128;  colgar automticamente tras un periodo sin trfico,
  tardando lo que hayamos especificado en el parmetro huptimeout del
  rc.isdn (en segundos).

  Con determinados proveedores no se nota demasiado el lanzar el segundo
  canal (Arrakis), con otros sin embargo, y tambin dependiendo del
  origen de nuestro trfico, si se nota, y bastante...

  Hay un demonio que se encarga de disparar/colgar el segundo canal
  segn el trfico y la saturacin que detecte; puede obtenerse de
  http://www.compound.se.

  En futuras versiones, tendr seccin propia; por ahora, si tiene un
  trabajo donde permitirse eso, se supone que tendr nivel como para
  manejarse con l sin problemas.

  8.  Problemas Frecuentes

  8.1.  (una vez tras otra): Al lanzar la conexin miro el /var/log/mes
  sages  y slo veo

       Apr 15 10:34:08 wanda kernel: ippp0: dialing 0 055...
       Apr 15 10:34:08 wanda kernel: ippp0: dialing 1 055...
       Apr 15 10:34:08 wanda kernel: ippp0: dialing 2 055...

  pero no veo nada ms, a qu puede ser debido?

  Es un problema fsico. Revise la conexin del cable tanto en la
  tarjeta como en el TR1. Revise la continuidad del cable as mismo.
  Cmbielo en ltimo trmino. Asegrese de que su TR1 tiene servicio...
  ;-) y Asegrese de no estar pasando por ninguna centralita.

  8.2.  La conexin se corta tras un mensaje como:

       Apr 15 15:58:28 wanda pppd[208]: Could not determine remote IP address

  y seguidamente:

       Apr 15 15:58:28 wanda pppd[208]: LCP terminated at peer's request
       Apr 15 15:58:28 wanda kernel: isdn_net: local hangup ippp0
       Apr 15 15:58:28 wanda kernel: ippp0: Chargesum is 0
       Apr 15 15:58:28 wanda pppd[208]: Modem hangup
       Apr 15 15:58:28 wanda pppd[208]: Connection terminated.

  Es un problema bastante comn debido a que Infova (en el supuesto de
  que la use para conectar) no nos asigna, ---o no lo hace con
  suficiente rapidez--- una direccin remota del enlace PPP.  Hay un
  solucin que funciona tanto en conexiones RDSI como RTC que consiste
  en pasarle nosotros una direccin en el establecimiento de la
  conexin. En el caso de conexiones va RTC (mdem corriente y
  moliente)  incluya una lnea en el /etc/ppp/options tal que:

       :172.16.1.96

  y deje el parmetro que le indica que, a pesar de todo, aceptaremos la
  IP que el extremo nos asigne como remota (ipcp-accept-remote). La IP
  que pongamos puede ser cualquiera, pero como siempre, y por seguir una
  regla, ponga una de las que normalmente nos asigna Infova de su rango
  (172.16.x.x por ejemplo).

  Gracias a Horacio J. Pea por este detalle (el primero al que se lo
  leimos en la lista del SLUG).

  El caso de conexiones va RDSI (sobre todo en el caso de que usemos el
  primer mtodo) se puede proceder de la misma forma, pues aunque se le
  pasen parmetros al (i)pppd, el demonio leer el fichero
  /etc/ppp/options.

  8.3.  usable ippp device'' . A qu es debido?  Al inicializar el
  demonio ipppd obtengo el mensaje `` Can't find

  Segn Frank Meyer, del grupo de desarrollo isdn4linux, se debe a que
  al lanzar el ipppd, este calcula un nmero aleatorio basndose en la
  funcin gethostid() que provoca una resolucin DNS, usando para ello
  el servidor de nombres que aparezca en /etc/resolv.conf.

  Si no tenemos la conexin activa, esto lgicamente no es posible y el
  DNS no puede ser alcanzado (y hablamos en el caso general de que no se
  disponga de un DNS local, como suele suceder comnmente).

  Para solucionarlo, incluya el nombre de su mquina (incluido
  localhost)  en el /etc/hosts con el dominio completo que haya
  especificado en /etc/resolv.conf. Hay otra solucin basada en un
  parche no oficial para evitar este comportamiento por parte del ipppd;
  el fichero syncPPP FAQ includo en el directorio de documentacin de
  las utilidades ISDN ampla este tema.

  9.  Por Hacer

    Por supuesto, integrar los comentarios y sugerencias que nos manden
     amablemente en este documento. Realimentacin, graciaaas.

    Estudiar el ibod para la gestin dinmica de conexiones a 128K por
     demanda de trfico.

    ToDo lo que se nos vaya ocurriendo... ;-)

  10.  Copyright y Propiedad Intelectual

  El RDSI-Como es Copyright  1998 Antonio Verdejo Garca & Francisco
  Jos Montilla Blanco.

  Este trabajo puede ser reproducido en su totalidad o en parte, tanto
  de forma impresa como electrnica, sujeto a las siguientes
  condiciones:

  1. La notificacin del copyright y esta licencia debe preservarse
     completa en todas las copias, tanto completas como parciales.

  2. Cualquier traduccin o trabajo derivado debe de ser aprobado por
     los autores por escrito antes de su distribucin.

  3. Si se distribuye el Trabajo parcialmente, deben de incluirse
     instrucciones de dnde obtener la versin completa original (en
     forma impresa o electrnica), as como los medios para conseguirla.

  4. Pueden ser reproducidas pequeas porciones como ilustraciones para
     revistas o citas para otros trabajos sin esta notificacin de
     permiso si se cita apropiadamente su procedencia.

  11.  Colofn

  Y bueno, por ahora esto es todo. Como una primera versin que es,
  estar plagada de pequeos (igual otros no tan pequeos) fallos,
  incorrecciones y seguro que nos dejamos un montn de temas en el
  tintero.

  Eso s, como hemos mencionado varias veces, nuestro buzn de correo
  est abierto a todo tipo de sugerencias, correcciones, dudas (que si
  humildemente podemos, intentaremos responder), as como desinteresadas
  donaciones para adquirir otras tarjetas... };) Lo que se os ocurra.
  En cualquier caso, prometemos contestar.

  11.1.  Y no tenis nada que agradecer a nadie?

  Ufff... Al contrario. No acabaramos nunca. Pero vamos a intentarlo;
  adems, es la parte ms relajada de todo esto.

  11.1.1.  De Antonio Verdejo

  Mi lista es interminable (tengo tanto que agradecer a tanta gente, y
  esta es la ma ;-), pero intentar ser breve.

  Para empezar, a Francisco Jos Montilla, mi apaero, porque fue quien
  me introdujo en esto de la RDSI y el Linux, gracias por tus
  "SOfritos", y por la paciencia que tienes conmigo y el Quake.
  Recuerdos a quien ya sabes.  Gracias por todo, de verdad. Ah!

  y vigila tu espalda, un da aparecer por DM4 con un bazoca y... ;-))

  A toda la gente del Lucas, Insflug e HispaLinux. Inmejorable trabajo
  el vuestro. A la gente de Enred (saludos ZoR) por organizar lo
  inorganizable y darle forma de Party.

  A Jess Fuentes Saavedra, por sus consejos. A Enrique Melero por
  idntica razn. A Iaki Arenaza por estar trabajando tambin en el
  tema RDSI. A Miguel Armas del Rio, por mantener la (creo) mejor lista
  de Linux en castellano.  A todos los contertulios de dicha lista por
  sus sugerencias y nimo, seguid as!

  A Alvaro Villalva (aka unsCAred) por que siempre est ah con su
  compilador preparado (-- FJM
  y su buscador a punto... ;-)

  A toda (TODA) la pea del canal linux del IRC Hispano (la lista no
  tendra fin, prometo -prometemos- citaros a todos en una prxima
  revisin de este documento, aunque sea en un anexo exclusivo ;-) por
  ser como son, por ser como sois, majsimos!... y a las linuxeras, por
  tener ese par de...  O:-)

  A mi hermano David, y en general a toda mi familia, por su apoyo.
  Gracias especiales a Isa, Regi y Basi por cuidarme tan bien (qu
  hara yo sin vosotras!).

  A mis amigos, mis mejores amigos (Jero, Javi, Alberto) porque siempre
  se puede contar con ellos, y porque comprenden que a veces pase ms
  tiempo con Linux que con ellos...

  A mis amigas, mis mejores amigas. A Begoa, por todo. A Ana Roco, en
  la distancia, porque s.

  A N. S. (``no s'') por su mirada. Siempre. A Alberto (aka Case) por
  sus cumpleaos.

  A Marc, por la tarjeta que dio el empujn definitivo a este Como. Y a
  la gente, que, junto a l (``1 para to2 y to2 para 1''), me hacen
  pensar diferente...  Are U dudez?

  A ``el gremio del cuervo'' por su msica (cojonuda) por su directo
  (destroyer) y por darme una idea de lo larga que puede ser (y no
  cortarme ante ello) una lista de agradecimientos... ;-) Y a Pepe, por
  supuesto, por descubrirme este pedaso grupo. Hello man, I am the
  Sun...

  A tod@s l@s que me dejo (y de l@s que sin duda tendr noticias).

  Y en general, a toda la gente que hace que, cada da que me levanto,
  no piense como Sneca, que deca Maana ser peor... ;-)

  Gracias!

  11.1.2.  De Francisco J. Montilla

  A mi apaero Toni, por compartir esas madrugadas linuxeras, por
  tenerme al da de lo que pasa en el mundo Linux, y por dejarme
  masacrarle al Quake tan generosamente :P.

  Y por dejarme sin nadie a quien agradecer. Abusooon!!!!!

  A mi mujer, por aguantar estoicamente mis trasnochadas Linuxeras, mi
  apegamiento ordenadoril, y animarme todava a darle duro a esto.

  12.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

This directory contains the available HOWTOS/FAQs translations to spanish till 
now; there are more documents coming.

FTP:
	ftp://ftp.insflug.org/

WWW:
	http://www.insflug.org

MAILING LIST:

insflug@insflug.org :
---------------------
	Send an email to insflug-request@insflug.org with the string 'subscribe'
on the subject.

CONTACTS:

	pacopepe@insflug.org
	ftpmaster@insflug.org
	webmaster@insflug.org

If you have any suggestion or critic, or need any help related with spanish 
support, feel free to contact us. 

We hope translations have been useful for you, enjoy LiNUX!!
  RPM COMO
  Donnie Barnes, djb@redhat.com
  Traductor: Antonio Ismael Olea Gonzlez,
  olea@iname.com 2:345/108.9@fidonet.org
  V2.0, April 8, 1997

  Este documento describe el uso del formato de paquetes de instalacin
  que se ha convertido en estndar de facto, el RPM (RedHat Package Man
  ager)
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Visin general

  3.      Informacin general

  3.1.    Adquirir RPM

  3.2.    Requerimientos de RPM

  4.      Usando RPM

  5.      Y ahora, qu puedo hacer de verdad  con RPM?

  6.      Construyendo paquetes RPM

  6.1.    El fichero rpmrc

  6.2.    El fichero spec

  6.3.    La Cabecera

  6.4.    %prep

  6.5.    %build

  6.6.    %install

  6.7.    Guiones opcionales pre y post Install/Uninstall

  6.8.    %files

  6.9.    Construccin

  6.9.1.  ``El rbol de Directorios de los Fuentes''

  6.9.2.  Prueba de construccin

  6.9.3.  Creacin de la Lista de Ficheros

  6.9.4.  Construyendo el paquete con RPM

  6.10.   Probndolo

  6.11.   Qu hacer con los nuevos paquetes RPM?

  6.12.   Y ahora qu?

  7.      Construccin multi-arquitectura de paquetes RPM

  7.1.    Ejemplo de fichero spec

  7.2.    Optflags

  7.3.    Macros

  7.4.    Excluyendo arquitectura de los paquetes.

  7.5.    Acabando

  8.      Copyright

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  RPM es el gestor de paquetes de Red Hat (Red Hat Package Manager).
  Aunque aparece Red Hat en su nombre, la intencin es que sea un
  sistema de empaquetado abierto y disponible para el uso de cualquiera.
  Permite a los usuarios tomar el cdigo fuente (source code) y
  empaquetarlo en forma de fuentes y binaria de forma que los ficheros
  binarios sean fcilmente instalables y rastreables y los fuentes
  puedan ser reconstruidas con facilidad. Tambin gestiona una base de
  datos de todos los paquetes y sus ficheros que puede ser usada para
  verificar paquetes e interrogarla para obtener informacin acerca de
  ficheros y/o paquetes.

  Red Hat Software anima a otros vendedores de distribuciones a dedicar
  un rato para examinar RPM y usarlo para sus propias distribuciones.
  RPM es completamente flexible y fcil de usar, aunque provee la base
  para un sistema muy extenso. Tambin es completamente abierto y
  disponible aunque agradeceramos informes de fallos (bugs) y sus
  reparaciones (fixes). Se concede permiso para usar y distribuir RPM,
  libre de royalties, bajo la proteccin de la licencia GPL.

  Puede encontrar informacin ms completa sobre RPM en el libro de Ed
  Bailey Maximum RPM.  Dicho libro est disponible en www.redhat.com.

  2.  Visin general

  Primero, permtame expresar parte de la filosofa tras RPM. Uno de los
  objetivos del diseo fue permitir el uso de fuentes ``prstinas (--
  N.T.: originales--)

  Con RPP (nuestro anterior sistema de empaquetado del cual RPM no
  deriva en absoluto), nuestros paquetes de fuentes deban ser
  ``hackeados (-- N.T.: retocados--) aplicaciones desde ellos.
  Tericamente, se poda instalar un paquete fuente RPP y efectuarle un
  make sin problemas.  Pero los fuentes no eran las originales, y no
  haba referencia alguna a los cambios que habamos hecho para que
  pudieran compilar. Se haca pues necesario bajarse los fuentes
  originales de forma separada.

  Con RPM, tiene los fuentes originales junto al ``parche (-- N.T.:
  patch en el original--) compilarlo. Vemos en esto una gran ventaja.
  Por qu? Son varias las razones. La primera es que si sale disponible
  una nueva versin de un programa, usted no necesita empezar desde la
  nada para conseguir que compile bajo RHL. Puede examinar el parche
  para saber qu podra necesitar hacer. De esta manera toda la
  configuracin por defecto de compilacin queda fcilmente a la vista.

  RPM tambin est diseado para disponer de potentes parmetros de
  consulta.  Usted puede hacer bsquedas de paquetes a lo largo de toda
  la base de datos o slo de ciertos ficheros. Tambin puede encontrar
  fcilmente a qu paquete pertenece un fichero y de dnde proviene. Los
  ficheros RPM en s mismos son archivos comprimidos, pero puede
  consultar paquetes independientes fcil y rpidamente, gracias a una
  cabecera binaria a medida aadida al paquete con toda la informacin
  que puede necesitar, almacenada sin comprimir. Esto permite consultas
  rpidas.

  Otra poderosa caracterstica es la habilidad de verificar paquetes. Si
  est preocupado por haber borrado algn fichero importante, slo tiene
  que verificar el paquete. Quedar cumplidamente informado de cualquier
  anomala.  Llegados a ese punto, podr reinstalar el paquete si lo
  considera necesario.  Cualquier fichero de configuracin que usted
  tenga quedar a salvo.

  Queremos agradecer a los colegas de la distribucin BOGUS por muchas
  de sus ideas y conceptos que han sido incluidos en RPM. Aunque RPM
  est completamente escrito por Red Hat Software, su funcionamiento
  est basado en cdigo escrito por BOGUS (PM y PMS).

  3.  Informacin general

  3.1.  Adquirir RPM

  La mejor forma de conseguir RPM es instalando Red Hat Commercial
  Linux. Si no quiere hacer eso, puede seguir usando RPM. Puede
  conseguirse en:

  ftp.redhat.com/pub/redhat/code/rpm

  3.2.  Requerimientos de RPM

  El principal requerimiento para ejecutar RPM es cpio 2.4.2 o superior.
  Aunque el sistema fue ideado para ser usado con Linux, puede ser
  perfectamente portado a cualquier sistema Unix. De hecho, ha sido
  compilado en SunOS, Solaris, AIX, Irix, AmigaOS, y otros.  Queda
  advertido que los paquetes binarios generados en diferentes tipos de
  sistemas Unix no sern compatibles.

  Estos son los mnimos requerimientos para instalar RPMs. Para
  construir RPMs a partir de los fuentes, necesitar todo lo normalmente
  requerido para construir un paquete, cosas como gcc, make, etc.

  4.  Usando RPM

  En su forma ms simple, RPM puede usarse para instalar paquetes:

               rpm -i foobar-1.0-1.i386.rpm

  El siguiente comando ms simple es desinstalar un paquete:

          rpm -e foobar

  Uno de los ms complejos pero ms tiles comandos le permiten instalar
  paquetes a travs de FTP. Si est conectado a la Red y quiere instalar
  un nuevo paquete, todo lo que necesita hacer es especificar el fichero
  con un URL vlido, como esto:

       rpm -i ftp://ftp.pht.com/pub/linux/redhat/rh-2.0-beta/RPMS/foobar-1.0-1.i386.rpm

  Apercbase de que ahora RPM puede hacer consultas y/o instalaciones a
  travs de FTP.

  Aunque estos son comandos simples, rpm puede usarse de multitud de
  formas, como puede verse en el mensaje de Ayuda:

  RPM version 2.3.9
  Copyright (C) 1997 - Red Hat Software
  This may be freely redistributed under the terms of the GNU Public License

  usage: rpm {--help}
         rpm {--version}
         rpm {--initdb}   [--dbpath <dir>]
         rpm {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]
                          [--replacepkgs] [--replacefiles] [--root <dir>]
                          [--excludedocs] [--includedocs] [--noscripts]
                          [--rcfile <file>] [--ignorearch] [--dbpath <dir>]
                          [--prefix <dir>] [--ignoreos] [--nodeps]
                          [--ftpproxy <host>] [--ftpport <port>]
                          file1.rpm ... fileN.rpm
         rpm {--upgrade -U} [-v] [--hash -h] [--percent] [--force] [--test]
                          [--oldpackage] [--root <dir>] [--noscripts]
                          [--excludedocs] [--includedocs] [--rcfile <file>]
                          [--ignorearch]  [--dbpath <dir>] [--prefix <dir>]
                          [--ftpproxy <host>] [--ftpport <port>]
                          [--ignoreos] [--nodeps] file1.rpm ... fileN.rpm
         rpm {--query -q} [-afpg] [-i] [-l] [-s] [-d] [-c] [-v] [-R]
                          [--scripts] [--root <dir>] [--rcfile <file>]
                          [--whatprovides] [--whatrequires] [--requires]
                          [--ftpuseport] [--ftpproxy <host>] [--ftpport <port>]
                          [--provides] [--dump] [--dbpath <dir>] [targets]
         rpm {--verify -V -y} [-afpg] [--root <dir>] [--rcfile <file>]
                          [--dbpath <dir>] [--nodeps] [--nofiles] [--noscripts]
                          [--nomd5] [targets]
         rpm {--setperms} [-afpg] [target]
         rpm {--setugids} [-afpg] [target]
         rpm {--erase -e} [--root <dir>] [--noscripts] [--rcfile <file>]
                          [--dbpath <dir>] [--nodeps] [--allmatches]
                          package1 ... packageN
         rpm {-b|t}[plciba] [-v] [--short-circuit] [--clean] [--rcfile  <file>]
                          [--sign] [--test] [--timecheck <s>] specfile
         rpm {--rebuild} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm
         rpm {--recompile} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm
         rpm {--resign} [--rcfile <file>] package1 package2 ... packageN
         rpm {--addsign} [--rcfile <file>] package1 package2 ... packageN
         rpm {--checksig -K} [--nopgp] [--nomd5] [--rcfile <file>]
                             package1 ... packageN
         rpm {--rebuilddb} [--rcfile <file>] [--dbpath <dir>]
         rpm {--querytags}

  Podr encontrar ms detalles acerca de la funcin de estos parametros
  en la pgina del manual de RPM.

  5.  Y ahora, qu puedo hacer de verdad  con RPM?

  RPM es una herramienta potentsima y, como puede ver, dispone de
  varios parmetros. La mejor forma de apercibirse de ellas es
  examinando unos cuantos ejemplos. Antes mostramos una
  instalacin/desinstalacin sencilla, ahora van unos cuantos ms:

    Supongamos que ha borrado unos cuantos ficheros por accidente, pero
     no est seguro de qu es lo que ha borrado. Si quiere verificar
     completamente su sistema y ver qu se ha perdido, puede hacer:

  rpm -Va

    Supongamos que se encuentra con un fichero que no reconoce. Para
     saber a qu paquete pertenece puede hacer:

       rpm -qf /usr/X11R6/bin/xjewel

  La salida podra ser:

       xjewel-1.6-1

    Supongamos que acaba de hacerse con un nuevo paquete RPM de koules,
     pero no sabe qu puede ser. Para obtener informacin al respecto:

       rpm -qpi koules-1.2-2.i386.rpm

  La salida podra ser:

       Name        : koules                      Distribution: Red Hat Linux Colgate
       Version     : 1.2                               Vendor: Red Hat Software
       Release     : 2                             Build Date: Mon Sep 02 11:59:12 1996
       Install date: (none)                        Build Host: porky.redhat.com
       Group       : Games                         Source RPM: koules-1.2-2.src.rpm
       Size        : 614939
       Summary     : SVGAlib action game with multiplayer, network, and sound support
       Description :
       This arcade-style game is novel in conception and excellent in execution.
       No shooting, no blood, no guts, no gore.  The play is simple, but you
       still must develop skill to play.  This version uses SVGAlib to
       run on a graphics console.

    Ahora quiere saber qu ficheros instala el paquete RPM. Puede
     hacer:

       rpm -qpl koules-1.2-2.i386.rpm

  La salida es:

       /usr/doc/koules
       /usr/doc/koules/ANNOUNCE
       /usr/doc/koules/BUGS
       /usr/doc/koules/COMPILE.OS2
       /usr/doc/koules/COPYING
       /usr/doc/koules/Card
       /usr/doc/koules/ChangeLog
       /usr/doc/koules/INSTALLATION
       /usr/doc/koules/Icon.xpm
       /usr/doc/koules/Icon2.xpm
       /usr/doc/koules/Koules.FAQ
       /usr/doc/koules/Koules.xpm
       /usr/doc/koules/README
       /usr/doc/koules/TODO
       /usr/games/koules
       /usr/games/koules.svga
       /usr/games/koules.tcl
       /usr/man/man6/koules.svga.6

  Estos son slo unos pocos ejemplos. Otros, an ms creativos, podr
  hacerlos fcilmente una vez que se haya familiarizado con RPM.

  6.  Construyendo paquetes RPM

  Construir paquetes RPM es algo realmente fcil de hacer, especialmente
  si puede conseguir que el software que intenta empaquetar pueda
  compilarse por s mismo.

  El procedimiento bsico es el siguiente:

    Asegrese que su /etc/rpmrc est configurado para su sistema.

    Hgase con el cdigo fuente del software a empaquetar para ser
     compilado en su sistema.

    Haga un parche con todos los cambios que ha tenido que realizar
     para que los fuentes se compilen adecuadamente.

    Cree un fichero .spec para el paquete.

    Asegrese de que todo est en su sitio.

    Construya el paquete usando RPM.

  En general, RPM construir tanto el paquete binario como el de los
  fuentes.

  6.1.  El fichero rpmrc

  En lo sucesivo, la nica configuracin de RPM est disponible en el
  fichero /etc/rpmrc. ste puede tener la siguiente apariencia:

  require_vendor: 1
  distribution: I roll my own!
  require_distribution: 1
  topdir: /usr/src/me
  vendor: Mickiesoft
  packager:  Mickeysoft Packaging Account <packages@mickiesoft.com>

  optflags: i386 -O2 -m486 -fno-strength-reduce
  optflags: alpha -O2
  optflags: sparc -O2

  signature: pgp
  pgp_name: Mickeysoft Packaging Account
  pgp_path: /home/packages/.pgp

  tmppath: /usr/tmp

  La lnea require_vendor obliga a RPM a requerir una lnea de vendor
  (distribuidor). sta puede venir o bien del propio fichero /etc/rpmrc
  o de la cabecera del fichero .spec. Para desactivar este parmetro
  debe cambiarse el nmero a 0. Esto tambin se aplica a las lneas
  require_distribution y require_group.

  La siguiente lnea es la de distribution (-- N.T.: distribucin--) .
  Puede definirla bien aqu o bien en el fichero buena idea asegurarse
  de que esta lnea es correcta, incluso cuando no se requiera.  La
  lnea de vendor (-- N.T.: distribuidor--)

  funciona de la misma manera, aunque puede contener cualquier cosa
  (ej.: Joe's Software and Rock Music Emporium).

  RPM tambin soporta ahora el empaquetado de paquetes para mltiples
  arquitecturas. El fichero rpmrc puede incluir una variable de opciones
  (optflags) que contiene parmetros especficos a la arquitectura.  Lea
  secciones posteriores para saber cmo usar esta variable.

  En adicin a las macros anteriores, hay disponibles unas cuantas ms.
  Puede usar:

       rpm --showrc

  para saber cul de sus etiquetas estn configuradas y cules son los
  parmetros disponibles.

  6.2.  El fichero spec

  Ahora hablaremos del fichero .spec. Estos ficheros son imprescindibles
  para construir un paquete. El fichero spec es una descripcin del
  software acompaado con instrucciones sobre cmo construirlo y una
  lista de ficheros de todos los binarios instalados.

  Debera nombrar a sus ficheros spec de acuerdo a una convencin
  estndar.  Tal como nombre de paquete-guin-nmero de versin-guin-
  nmero de publicacin-punto-spec.

  A continuacin, un pequeo fichero spec (eject-1.4.spec):

       Summary: ejects ejectable media and controls auto ejection
       Name: eject
       Version: 1.4
       Release: 3
       Copyright: GPL
       Group: Utilities/System
       Source: sunsite.unc.edu:/pub/Linux/utils/disk-management/eject-1.4.tar.gz
       Patch: eject-1.4-make.patch
       Patch1: eject-1.4-jaz.patch
       %description
       This program allows the user to eject media that is autoejecting like
       CD-ROMs, Jaz and Zip drives, and floppy drives on SPARC machines.

       %prep
       %setup
       %patch -p1
       %patch1 -p1

       %build
       make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"

       %install
       install -s -m 755 -o 0 -g 0 eject /usr/bin/eject
       install -m 644 -o 0 -g 0 eject.1 /usr/man/man1

       %files
       %doc README COPYING ChangeLog

       /usr/bin/eject
       /usr/man/man1/eject.1

  6.3.  La Cabecera

  La cabecera tiene unos cuantos campos estndar que usted necesita
  rellenar.  Tambin hay unas cuantas advertencias. Los campos deben ser
  rellenados tal como sigue:

    Summary: Descripcin en una sla lnea del paquete.

    Name: La cadena que vaya a servir de nombre para el fichero rpm.

    Version: La cadena que vaya a ser el nmero de versin para el
     fichero rpm.

    Release: El nmero de publicacin para un paquete dentro de un
     mismo nmero de versin (ej.: si crea un paquete y lo encuentra
     ligeramente defectuoso y necesita generarlo de nuevo, el siguiente
     paquete debera tener 2 como nmero de publicacin).

    Icon: El nombre del icono que podrn usar interfaces de instalacin
     alto nivel (como Red Hat `glint''). Debe ser un fichero

    Source: Esta lnea apunta a la localizacin HOME del fichero de
     fuentes original. Se usa si alguna vez quiere tener los fuentes de
     nuevo o chequear para nuevas versiones. Precaucin: el nombre del
     fichero en esta lnea DEBE coincidir con el nombre que tiene tal
     fichero en su sistema (ej.: no se haga con el fichero fuente y le
     cambie el nombre). Puede especificar ms de un fichero fuente de
     esta forma:

       Source0: blah-0.tar.gz
       Source1: blah-1.tar.gz
       Source2: fooblah.tar.gz

  Estos ficheros deben residir en el directorio SOURCES. (La estructura
  de directorios es discutida en una seccin posterior, ``El rbol de
  Directorios de las Fuentes'', ``'').

    Patch: El lugar donde podrn encontrarse los parches si los
     necesita de nuevo. Precaucin: el nombre debe coincidir con el de
     SUS propios parches. Puede especificar ms de un fichero de parches
     de esta forma:

       Patch0: blah-0.patch
       Patch1: blah-1.patch
       Patch2: fooblah.patch

  Estos ficheros deben residir en el directorio SOURCES.

    Copyright: Hace referencia al modelo de copyright al que se acoje
     el paquete. Puede tratarse de algo al estilo de GPL, BSD, MIT,
     public domain (-- N.T.: dominio pblico--) , distributable (--
     N.T.: distribuible--) o commercial (-- N.T.: comercial--) .

    BuildRoot: Hace referencia a un directorio que simular el raz (/)
     para la construccin e instalacin de un nuevo paquete. Puede
     usarlo para probar su paquete antes de instalarlo en su mquina.

    Group: Informa a un programa de instalacin de alto nivel (como Red
     Hat `glint'') dnde situar este paquete en particular dentro de la
     jerarqua de rpm. Actualmente, esta jerarqua viene a ser:

  Applications            (aplicaciones)
      Communications      (comunicaciones)
      Editors             (editores)
          Emacs           (Emacs)
      Engineering         (ingenieria)
      Spreadsheets        (hojas de calculo)
      Databases           (bases de datos)
      Graphics            (graficos)
      Networking          (redes de comunicaciones)
      Mail                (correo smtp)
      Math                (matematicas)
      News                (noticias nntp)
      Publishing          (edicion)
          TeX             (TeX)
  Base                    (basico)
      Kernel              (nucleo)
  Utilities               (utilidades)
      Archiving           (archivo)
      Console             (consola)
      File                (ficheros)
      System              (sistema)
      Terminal            (terminales)
      Text                (texto)
  Daemons                 (demonios)
  Documentation           (documentacion)
  X11                     (X11)
      XFree86             (XFree86)
          Servers         (servidores)
      Applications        (aplicaciones)
          Graphics        (graficos)
          Networking      (redes de comunicaciones)
      Games               (juegos)
          Strategy        (estrategia)
          Video           (video juegos)
      Amusements          (entretenimientos)
      Utilities           (utilidades)
      Libraries           (librerias)
      Window Managers     (gestores de ventana)
  Libraries               (librerias)
  Networking              (redes de comunicaciones)
      Admin               (administracion)
      Daemons             (demonios)
      News                (noticias nntp)
      Utilities           (utilidades)
  Development             (desarrollo)
      Debuggers           (depuradores)
      Libraries           (librerias)
          Libc            (libreria C)
      Languages           (lenguajes)
          Fortran         (fortran)
          Tcl             (tcl)
      Building            (Compilacion)
      Version Control     (control de versiones)
      Tools               (utiles)
  Shells                  (interpretes de comandos)
  Games                   (juegos)

    %description En realidad no es un elemento de la cabecera, pero
     debe ser descrito junto a sus otras partes. Necesita una etiqueta
     de descripcin por cada paquete o subpaquete. Se trata de un campo
     multilnea que debe ser usado para proporcionar una descripcin
     comprensible del paquete.
  6.4.  %prep

  Esta es la segunda seccin del fichero spec. Se usa para tener las
  fuentas listas para compilar. Aqu necesita hacer todo lo necesario
  para obtener los fuentes parcheadas y configuradas para ejecutar un
  make con ellas.

  Una cosa a sealar: Cada una de estas secciones es slo un lugar para
  ejecutar guiones de intrprete de comandos (-- N.T.: shell scripts en
  el original.--) . As podr crear un script simple para sh y colocarlo
  tras la etiqueta %prep para desempaquetar y parchear sus fuentes. En
  cualquier caso, hemos creado unas macros para ayudar en esto.

  La primera de estas macros es %setup. En su forma ms simple (sin
  parmetros en la lnea de comandos), se limita a desempaquetar los
  fuentes y cambiar el directorio actual al de los fuentes. Puede tener
  alguna de las siguientes opciones:

    -n nombre asignar el nombre del directorio en construccin.  Por
     defecto es $NAME-$VERSIN. Otras posibilidades incluyen $NAME,
     ${NAME}${VERSIN}, o cualquiera que use el fichero tar principal.
     (Apercbese de que estas variables ``$'' no son variables reales
     dentro del fichero spec.  Slo se usan aqu en lugar de un nombre
     ejemplo. Necesitar usar el nombre real y la versin de su paquete,
     no una variable).

    -c crear y cambiar al directorio nombrado antes de desempaquetar
     con tar.

    -b # desempaquetar con tar el fichero fuente # antes de cambiar al
     directorio (y esto no tiene sentido con -c, as que no lo haga).
     Slo es til cuando se usan varios archivos fuente.

    -a # desempaquetar el fichero fuente # despus de cambiar al
     directorio.

    -T Este parmetro anula la accin por defecto de desempaquetar el
     fichero fuente y requiere
     el fichero fuente principal. Necesitar esto cuando hayan fuentes
     secundarias.

    -D No borra el directorio antes de desempaquetar.  Slo resulta
     til cuando tenga ms de una macro de configuracin. Debera ser
     usado solamente en macros de configuracin despus de la primera
     (pero nunca en la primera).

  La siguiente de las macros disponibles es %patch. Esta macro ayuda a
  automatizar el proceso de aplicacin de parches a los fuentes.
  Necesita de varios parmetros, listadas a continuacin:

    # aplicar el parche Patch#.

    -p # especifica el nmero de directorios a evitar por el comando
     patch(1).

    -P La accin por defecto es aplicar Patch (o Patch0).  Este
     parmetro inhibe dicha accin y requiere un 0 para tener
     desempaquetado el fichero fuente principal. Esta opcin resulta
     til en una segunda (o posterior) macro %patch que requiera
     parmetros distintos a la primera macro.

    Tambin puede hacer %patch# en lugar de hacer el comando real:
     %patch # -P
  Estas deberan ser todas las macros que necesite. En cuanto las tenga
  claras, podr crear cualquier otra configuracin que necesite mediante
  guiones sh. Todo lo que incluya hasta la macro %build (discutida en la
  siguiente seccin) es ejecutado va sh. Busque en el ejemplo anterior
  el tipo de cosas que puede querer incluir all.

  6.5.  %build

  En realidad no hay ninguna macro en esta seccin. Solamente debe
  incluir todos los comandos que necesitara para construir y/o compilar
  el software una vez que haya desempaquetado y parcheado los fuentes, y
  se haya movido al directorio correcto. Es pues otra serie de comandos
  pasados a sh, as que cualquier comando aceptable por sh podr ir aqu
  (incluidos los comentarios). El directorio actual es reajustado en
  cada una de estas secciones al de mayor nivel en el directorio de
  fuentes, as que tngalo en cuenta. Puede moverse a travs de los
  subdirectorios si resultase necesario.

  6.6.  %install

  En realidad no hay ninguna macro en esta seccin.  Bsicamente debe
  incluir aqu cualquier comando necesario para instalar. Si el paquete
  a construir tiene disponible un comando make install, inclyalo aqu.
  Si no, o bien puede parchear el fichero Makefile y aadirle la
  funcionalidad make install e incluir dicha sentencia en esta seccin o
  bien instalarlo a mano mediante comandos sh. Puede considerar su
  directorio actual como el directorio superior del directorio de
  fuentes.

  6.7.  Guiones opcionales pre y post Install/Uninstall

  Puede incluir guiones que seran ejecutados antes y despus de la
  instalacin o desinstalacin de paquetes binarios. Una razn
  importante para esto es hacer cosas como ejecutar ldconfig tras la
  instalacin o eliminar paquetes que contienen libreras compartidas.
  Las macros para cada uno de los guiones son:

    %pre es la macro para los guiones pre-instalacin.

    %post es la macro para los guiones post-instalacin.

    %preun es la macro para los guiones pre-desinstalacin.

    %postun es la macro para los guiones post-desinstalacin.

  Los contenidos de estas secciones deben ser solamente guiones sh,
  luego no resulta necesaria la lnea #!/bin/sh.

  6.8.  %files

  Esta es la seccin donde debe listar los ficheros del paquete binario.
  RPM no tiene forma de saber qu ficheros binarios se han instalado
  tras ejecutar make install. NO hay forma de saberlo.

  Algunos han sugerido ejecutar un comando find antes y despus de la
  instalacin del paquete. En un sistema multiusuario, esto es
  inaceptable ya que pueden crearse otros ficheros durante la
  construccin del paquete que no tienen nada que ver con el mismo.

  Tambin hay algunas macros disponibles para hacer cosas especiales.
  Son las listadas a continuacin:

    %doc se usa para sealar los ficheros de documentacin del paquete
     fuente que desea que sean instalados en una instalacin binaria. La
     documentacin ser instalada en
     /usr/doc/$NOMBRE-$VERSIN-$PUBLICACIN.  La lista podr incluir
     varios ficheros en una sla lnea o puede listarlos de forma
     separada con una macro para cada uno de ellos.

    %config se usa para sealar los ficheros de configuracin en un
     paquete. Ficheros as pueden ser sendmail.cf, passwd, etc. Si
     posteriormente desinstala un paquete que incluye ficheros de
     configuracin, todos los ficheros sin modificar sern borrados y
     todos los ficheros modificados sern movidos a su nombre antiguo
     con el sufijo .rpmsave aadido a su nombre. Tambin puede incluir
     mltiples ficheros con esta macro.

    %dir seala a un nico directorio en la lista como propiedad de un
     paquete. Por defecto, si incluye en la lista un nombre de
     directorio SIN una macro %dir, TODO el contenido de ese directorio
     es incluido en la lista de ficheros y posteriormente instalado como
     parte del paquete.

    %files -f <nombredefichero> le permitir tener la lista de ficheros
     contenida en un fichero situado en el directorio de las fuentes.
     Resulta til en los casos en los que un paquete puede crear su
     propia lista de ficheros por s mismo. En ese caso slo tendr que
     incluir el nombre de ese fichero aqu y no necesitar especificar
     nada ms.

  La mayor precacucin que debe tener en cuenta en la lista de ficheros
  es la inclusin de directorios. Si por accidente incluye /usr/bin, su
  paquete binario contendr todos los ficheros contenidos en el
  directorio /usr/bin en su sistema.

  6.9.  Construccin

  6.9.1.  ``El rbol de Directorios de los Fuentes''

  Lo primero que necesita es un rbol de directorios de compilacin
  configurado de forma apropiada. Esto se puede hacer mediante el
  fichero /etc/rpmrc. La mayora de la gente slo usar /usr/src.

  Puede que necesite crear los siguientes directorios para organizar un
  rbol de construccin:

    BUILD es el directorio donde RPM lleva a cabo toda la construccin.
     No tiene que llevar a cabo su prueba de construccin en ningn
     sitio en particular; aqu es donde RPM llevar a cabo la
     compilacin y empaquetamiento.

    SOURCES es el directorio donde debe situar los ficheros fuente
     originales y los correspondientes parches. Es donde RPM buscar por
     defecto.

    SPECS es el directorio donde deben ir situados los ficheros spec.

    RPMS es donde RPM dejar los paquetes RPM binarios una vez
     construidos.

    SRPMS es donde RPM dejar los paquetes RPM fuentes.

  6.9.2.  Prueba de construccin

  Lo primero que querr hacer es asegurarse que los fuentes se
  construyen adecuadamente sin usar RPM. Para ello, desempaquete los
  fuentes, sitese en el directorio $NAME.orig. De nuevo desempaquete
  los fuentes. Use stos para compilar. Vaya al directorio de los
  fuentes y siga las instrucciones para construirlo. Si necesita editar
  algo, necesitar un parche. Una vez que lo tenga compilado, limpie el
  directorio fuentes.

  Asegrese que borra todos los ficheros creados por algn guin de
  configuracin. Haga entonces un cd hacia arriba, al directorio
  paterno. Deber hacer algo como:

       diff -uNr nombredirectorio.orig nombredirectorio > ../SOURCES/nombredirectorio-linux.patch

  Lo que crear un parche que podr usar en su fichero spec. Advierta
  que el ``linux'' que aparece en el nombre del parche es slo un
  identificador.  Usted probablemente querr usar algo ms descriptivo
  como ``config'' o ``bugs'' para describir el porqu del parche.
  Tambin es buena idea examinar el fichero parche que ha creado antes
  de usarlo para asegurarse de que no se han incluido binarios por
  error.

  6.9.3.  Creacin de la Lista de Ficheros

  Ahora que tiene los fuentes listos para construir y sabe cmo hacerlo,
  constryalo e instlelo. Examine la salida de la secuencia de
  instalacin y construya su lista de ficheros a partir de ah para
  incluirla en el fichero spec. Normalmente nosotros construimos el
  fichero spec en paralelo a todos estos pasos. Usted puede crear uno
  inicial y rellenar las partes sencillas e ir rellenando el resto
  conforme vaya completando los diferentes pasos.

  6.9.4.  Construyendo el paquete con RPM

  Una vez que tenga su fichero spec, est listo para intentar construir
  su paquete. La forma ms til de hacerlo es con un comando como el
  siguiente:

               rpm -ba foobar-1.0.spec

  Hay otras opciones tiles con el parmetro -b tales como:

    p obliga a ejecutar solamente la seccin prep del fichero spec.

    l efecta algunos chequeos en %files.

    c ejecuta la seccin %prep y compila. Resulta til cuando no est
     seguro de si sus fuentes compilan completamente. Puede parecer
     intil porque usted tal vez quiera jugar solamente con los fuentes
     hasta que compilen y usar entonces RPM, pero una vez que se haya
     acostumbrado a usar RPM, encontrar ocasiones en las que podr
     usarla.

    i ejecuta las secciones prep, compile e install.

    b ejecuta las secciones prep, compile e install y construye el
     paquete binario.

    a ejecuta las secciones prep, compile e install y construye los
     paquetes binario y fuentes.

  Hay varios modificadores para el parmetro -b. Son los siguientes:

    --short-circuit El proceso de construccin comenzar directamente
     por la fase especificada, saltndose las previas a la indicada.
     (Slo puede ser empleado en conjuncin con c e i).

    --clean elimina el rbol de construccin una vez que ha concluido.

    --keep-temps mantendr todos los ficheros temporales y los guiones
     que estuvieran en /tmp. Podr saber qu ficheros fueron creados
     all usando el parmetro -v.

    --test No lleva a cabo ninguna fase realmente, pero mantiene todos
     los ficheros temporales.

  6.10.  Probndolo

  Una vez que tenga los paquetes rpm binario y fuentes, necesitar
  probarlos.  La mejor forma y la ms sencilla es usar para el test una
  mquina completamente diferente de la que us para la construccin.
  Despus de todo, ha hecho un montn de make install en su mquina por
  lo que debera haber quedado instalado de forma aceptable.

  Puede ejecutar un rpm -u nombredepaquete al paquete a probar, pero
  puede ser decepcionante porque en la construccin del paquete usted
  hizo un make install. Si se dej algo fuera de la lista de ficheros,
  no ser desinstalado. Reinstale entonces el paquete binario y su
  sistema estar completo de nuevo, aunque no el paquete rpm.  Asegrese
  y tenga en mente que slo porque usted hace rpm -ba package; la
  mayora de la gente instalar su paquete slo con rpm -i package.

  Asegrese tambin de que no hace nada en las secciones build o install
  que necesite hacerse cuando los binarios se instalan por s mismos.

  6.11.  Qu hacer con los nuevos paquetes RPM?

  Una vez que ha hecho su propio RPM de algo (asumiendo que no ha sido
  empaquetado en RPM con anterioridad), puede contribuir con su trabajo
  a otras personas (asumiendo igualmente que el paquete en RPM es
  libremente distribuible). Para hacerlo, puede querer subirlo a
  ftp.redhat.com.

  6.12.  Y ahora qu?

  Por favor mire las secciones anteriores sobre pruebas y qu hacer con
  los nuevos RPM. Queremos todos los paquetes RPM disponibles que
  podamos conseguir, y queremos que estn correctamente empaquetados.
  Por favor, tmese el tiempo de probarlos adecuadamente y de subirlos
  para el beneficio de todos.

  Tambin, por favor asegrese de que no est haciendo llegar solamente
  software de libre disposicin. Software comercial y shareware (--
  N.T.: Probar antes de comprar--) no deberan ser subidos a menos que
  est claramente permitido en alguna clusula de su licencia. Esto
  incluye el software de Netscape, ssh, pgp, etc.

  7.  Construccin multi-arquitectura de paquetes RPM

  Ahora puede usarse RPM para construir paquetes para Intel i386,
  Digital Alpha ejecutando Linux y Sparc. Tambin se ha informado de su
  funcionamiento en estaciones de trabajo SGI y HP. Hay varias
  caractersticas que hacen que la construccin de paquetes para todas
  las plataformas sea fcil.  La primera de stas es la directiva
  ``optflags'' del fichero /etc/rpmrc.  Puede usarse para asignar las
  opciones usadas durante la construccin del software con valores
  especficos de cada arquitectura.  Otras son las macros ``arch'' en el
  fichero spec. Pueden usarse para diferentes cosas, en funcin de la
  arquitectura para la que se est construyendo. Otra ms, es la
  directiva ``Exclude'' de la cabecera.

  7.1.  Ejemplo de fichero spec

  El siguiente es parte del fichero spec para el paquete ``fileutils''.
  Est configurado para compilar en Alpha e Intel.

  Summary: GNU File Utilities
  Name: fileutils
  Version: 3.16
  Release: 1
  Copyright: GPL
  Group: Utilities/File
  Source0: prep.ai.mit.edu:/pub/gnu/fileutils-3.16.tar.gz
  Source1: DIR_COLORS
  Patch: fileutils-3.16-mktime.patch

  %description
  These are the GNU file management utilities.  It includes programs
  to copy, move, list, etc, files.

  The ls program in this package now incorporates color ls!

  %prep
  %setup

  %ifarch alpha
  %patch -p1
  autoconf
  %endif
  %build
  configure --prefix=/usr --exec-prefix=/
  make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s

  %install
  rm -f /usr/info/fileutils*
  make install
  gzip -9nf /usr/info/fileutils*

  7.2.  Optflags

  En este ejemplo puede ver cmo se usa la directiva ``optflags'' desde
  el fichero /etc/rpmrc. En funcin de la arquitectura para la que est
  construyendo, el valor adecuado lo proporciona RPM_OPT_FLAGS.  Debe
  parchear el fichero Makefile de su paquete para usar esta variable en
  lugar de las directivas normales que puede usar (como -m486 y -O2).
  Tendr una mejor perspectiva de lo que necesita hacer instalando este
  paquete de fuentes, desempaquetando el fichero tar con los fuentes y
  examinando el fichero Makefile. Examine el parche para el Makefile y
  compruebe qu cambios son necesarios realizar.

  7.3.  Macros

  La macro %ifarch es muy importante para todo esto. La mayora de las
  veces necesitar hacer un parche o dos especficos para una sla
  arquitectura. En ese caso, RPM le permitir aplicar ese parche slo
  para una arquitectura.

  En el ejemplo anterior, fileutils tiene un parche para mquinas de 64
  bits.  Obviamente, slo tiene aplicacin en Alpha, por el momento.
  Entonces, aadimos una macro %ifarch al parche de 64 tal como:

  %ifarch axp
  %patch1 -p1
  %endif

  Esto asegurar que el parche no es aplicado en cualquier arquitectura
  excepto en Alpha.

  7.4.  Excluyendo arquitectura de los paquetes.

  A la vez que puede tener fuentes RPM en un slo directorio para todas
  las plataformas, hemos implementado la posibilidad de ``excluir''
  paquetes para que no sean construidos en ciertas arquitecturas. Debido
  a esto, puede hacer cosas como:

       rpm --rebuild /usr/src/SRPMS/*.rpm

  y conseguir construir los paquetes adecuados. Si todava no ha portado
  una aplicacin a una determinada plataforma, todo lo que tiene que
  hacer es aadir una lnea como:

       ExcludeArch: axp

  a la cabecera del fichero spec del paquete de fuentes. Reconstruya
  entonces el paquete sobre la plataforma para la que est preparado.
  Como resultado tendr disponible un paquete compilable sobre Intel
  pero que es fcilmente omitible sobre Alpha.

  7.5.  Acabando

  Usar RPM para crear paquetes para mltiples arquitecturas es
  generalmente ms sencillo de hacer que conseguir que el paquete
  compile por s mismo en todos los casos. Como siempre, la mejor ayuda
  disponible cuando uno se queda bloqueado al construir un paquete RPM
  es examinar un paquete de fuentes similar.

  8.  Copyright

  Este documento y sus contenidos estn protegidos por las leyes de
  propiedad intelectual. Se permite la redistribucin de este documento
  siempre que sus contenidos permanezcan intactos y sin cambios. En
  otras palabras, solamente lo puede reformatear, reimprimir o
  redistribuir.

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Redes en Linux Como (Previamente Net-3 Como)
  Autor actual: Joshua Drake, {Poet}, poet@linuxports.com
  Autores originales: Terry Dawson (autor principal),
  terry@perf.no.itg.telstra.com.au; Alessandro Rubini,
  rubini@linux.it (mantenimiento)
  Traducido por: Ricardo Javier Crdenes Medina,
  a1402@serdis.dis.ulpgc.es
  v1.5, 20 de agosto de 1997, traduccin del 3 de septiembre
  de 1999

  Este Cmo es la base para entender la evolucin de las capacidades de
  Linux para tratar con redes informticas. Es el punto de partida para
  aprender todo sobre el mantenimiento de redes TCP/IP, la configuracin
  de los archivos relacionados con la red, y hay un amplio captulo
  sobre configuracin de dispositivos fsicos. En suma, un documento muy
  exhaustivo que merece la pena leer.
  ______________________________________________________________________

  ndice general















































  1. Introduccin.

  2. Historia del documento

     2.1 Comentarios y sugerencias

  3. Cmo usar este documento.

     3.1 Convenciones usadas en el documento

  4. Informacin general sobre las redes en Linux.

     4.1 Breve historia del desarrollo del
     4.2 Recursos referentes al tratamiento de redes con Linux.
     4.3 Dnde conseguir informacin sobre redes no especfica de Linux.

  5. Informacin genrica sobre la configuracin de redes.

     5.1 Qu necesito para comenzar?
        5.1.1 Cdigo fuente del ncleo.
        5.1.2 Herramientas de red actualizadas.
        5.1.3 Aplicaciones de red.
        5.1.4 Introduccin a las direcciones IP.
     5.2 Dnde debera poner las rdenes de configuracin?
     5.3 Creacin de las interfaces de red.
     5.4 Configuracin de una interfaz de red.
     5.5 Configuracin del sistema de resolucin de nombres (
        5.5.1 Qu hay en un nombre?
        5.5.2 Qu informacin necesitar
        5.5.3 (TT
        5.5.4 (TT
        5.5.5 (TT
        5.5.6 Ejecutar un servidor de nombres
     5.6 Configuracin de la interfaz
     5.7 Encaminamiento (
        5.7.1 Entonces qu hace el programa
     5.8 Configuracin de los servidores de red y los servicios.
        5.8.1 (TT
           5.8.1.1 Un ejemplo de fichero
        5.8.2 (TT
           5.8.2.1 Un ejemplo de
     5.9 Otros ficheros de configuracin relacionados con la red
        5.9.1 (TT
        5.9.2 (TT
     5.10 Seguridad en la red y control de acceso.
        5.10.1 (TT
        5.10.2 (TT
        5.10.3 El mecanismo de control de acceso
           5.10.3.1 (TT
           5.10.3.2 (TT
        5.10.4 (TT
        5.10.5 Configure su demonio de ftp adecuadamente.
        5.10.6 Cortafuegos para redes.
        5.10.7 Otras sugerencias.

  6. Informacin relacionada con IP y Ethernet

     6.1 Ethernet
     6.2 EQL - ecualizador de trfico para lneas mltiples
     6.3 IP Accounting (en Linux 2.0)
     6.4 IP Accounting (en Linux 2.2)
     6.5 IP Aliasing
     6.6 IP Firewall (para Linux 2.0)
     6.7 IP Firewall (para Linux 2.2)
     6.8 Encapsulacin IPIP
        6.8.1 Una configuracin de red con
        6.8.2 Configuracin de la mquina cuyos paquetes sern encapsulados
     6.9 Enmascarado IP (
     6.10 Proxy IP transparente
     6.11 IPv6
     6.12 Mobile IP
     6.13 Multicast
     6.14 NAT - Network Address Translation (Traduccin de direcciones de red)
     6.15 Traffic Shaper (Manipulacin del ancho de banda)
     6.16 Encaminamiento con Linux-2.2

  7. Uso de hardware comn en los PC

     7.1 RDSI
     7.2 PLIP en Linux-2.0
     7.3 PLIP en Linux-2.2
     7.4 PPP
        7.4.1 Mantener una conexin permanente a la red usando
     7.5 Cliente SLIP
        7.5.1 dip
        7.5.2 slattach
        7.5.3 Cundo usar cada uno?
        7.5.4 Servidor SLIP esttico con lnea por llamada y DIP.
        7.5.5 Servidor SLIP dinmico con lnea por llamada y DIP.
        7.5.6 Uso de Dip.
        7.5.7 Conexin SLIP permanente usando una lnea dedicada y slattach
     7.6 Servidor SLIP.
        7.6.1 Servidor slip usando
           7.6.1.1 Dnde obtener
           7.6.1.2 Configuracin de
           7.6.1.3 Configuracin de
           7.6.1.4 Configuracin del fichero
           7.6.1.5 Configuracin del fichero
           7.6.1.6 Configuracin del fichero
        7.6.2 Servidor Slip usando
           7.6.2.1 Configuracin del fichero /etc/diphosts
        7.6.3 Servidor SLIP usando el paquete

  8. Otras tecnologas de red

     8.1 ARCNet
     8.2 Appletalk (
        8.2.1 Configuracin del software Appletalk.
        8.2.2 Exportacin de un sistema de ficheros Linux va Appletalk.
        8.2.3 Compartir la impresora Linux a travs de Appletalk.
        8.2.4 Ejecucin de AppleTalk.
        8.2.5 Comprobacin de AppleTalk.
        8.2.6 Problemas con AppleTalk.
        8.2.7 Si necesitase ms informacin...
     8.3 ATM
     8.4 AX25 (
     8.5 DECNet
     8.6 FDDI
     8.7 Retransmisin de Tramas (
     8.8 IPX (
     8.9 NetRom (
     8.10 Protocolo Rose (
     8.11 Soporte SAMBA - NetBEUI, NetBios.
     8.12 Soporte de STRIP (
     8.13 Anillo con testigo (
     8.14 X.25
     8.15 Tarjeta WaveLan

  9. Cables y Cableado

     9.1 Cable serie Mdem NULO (NULL Modem)
     9.2 Cable de puerto paralelo (cable PLIP)
     9.3 Cableado Ethernet 10base2 (coaxial fino)
     9.4 Cable Ethernet de Par Trenzado

  10. Glosario de Trminos usados en este documento

  11. Linux para un PSI?

  12. Reconocimientos

  13. Copyright.

  14. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Introduccin.


  El Sistema Operativo Linux se enorgullece de contar con una
  implementacin de servicios de red basada en el ncleo, escrita casi
  por completo partiendo de cero. Su rendimiento en los ncleos
  recientes lo convierte en una alternativa vlida incluso a el mejor de
  sus iguales. Este documento intenta describir cmo instalar y
  configurar el software de red de Linux y sus herramientas asociadas.

  Esta es la primera entrega desde que LinuxPorts comenz a hacerse
  cargo del documento. Quisiera decir antes que nada que deseamos que
  durante los prximos meses encuentre de utilidad este documento, y que
  seamos capaces de proporcionar informacin precisa y puntual en lo que
  respecta al tratamiento de redes con Linux.

  Este documento, al igual que los otros Comos de los que nos
  encargamos, se va a convertir en algo muy diferente. Dentro de poco
  pasar a ser el Redes en Linux Como en lugar de ser slo el Net-3(4)
  Como. Va a cubrir temas como PPP, VPN (Redes Privadas Virtuales), y
  otros...


  2.  Historia del documento


  El NET-FAQ original fue escrito por Matt Welsh y Terry Dawson para
  responder preguntas frecuentes sobre las redes para Linux, un tiempo
  antes de que comenzara formalmente el Proyecto de Documentacin de
  Linux. Cubra las ltimas versiones de desarrollo del Linux Networking
  Kernel. El NET-2-HOWTO sobresey el NET-FAQ y fue uno de los
  documentos HOWTO originales del LDP. Cubra lo que se llam versin 2
  y posteriormente versin 3 del Linux Kernel Networking software. Este
  documento a su vez lo sobresee y slo se refiere a la versin 4 del
  Linux Networking Kernel: ms especficamente a las versiones 2.0.x y
  2.2.x del ncleo.

  Las versiones anteriores de este documento llegaron a ser bastante
  grandes a causa de la enorme cantidad de material que caa dentro de
  su mbito. Para ayudar a resolver este problema se han producido unos
  cuantos Como que tratan con temas especficos sobre redes. Este
  documento proporciona referencias a dichos Como cuando sean relevantes
  y cubre aquellas reas de las que an no se habla en otros documentos.


  2.1.  Comentarios y sugerencias



  Estamos interesados en que la gente nos proporcione sugerencias (que
  nos informen de cambios, errores, etc.). Por favor, pngase en
  contacto con nosotros en: poet@linuxports.com.  De nuevo, si encuentra
  algo errneo o cualquier cosa que deseara que fuese aadida, por
  favor, contacte con nosotros.


  3.  Cmo usar este documento.


  Este documento est organizado de una manera vertical. La primera
  seccin incluye material informativo y se la puede saltar si no es de
  su inters; lo que sigue es una discusin genrica sobre temas
  referentes a las redes, y debe asegurarse de entender esto antes de
  proceder con partes ms especficas. El resto, informacin especfica
  de la tecnologa, est agrupada en tres secciones principales:
  informacin relativa a Ethernet e IP, tecnologas pertinentes a
  hardware para PC de amplia difusin y tecnologas usadas slo rara
  vez.

  La metodologa que nosotros sugerimos a la hora de leer este documento
  es la siguiente:


     Lea las secciones genricas
        Estas secciones se aplican a toda, o casi toda tecnologa
        descrita ms adelante, y por tanto es muy importante que lo
        comprenda.


     Estudie su red
        Debera saber cmo est, o estar diseada su red, y exactamente
        qu tipo de hardware y tecnologa estar implementando.


     Lea la seccin ``IP y Ethernet'' si est
        conectado directamente a una LAN o a Internet" Esta seccin
        describe la configuracin bsica para Ethernet ya las varias
        posibilidades que ofrece Linux para las redes IP, como servicio
        de cortafuegos, encaminamiento avanzado, etc.


     Lea la siguiente seccin si est interesado en redes locales de
        bajo coste o en conexiones punto a punto" Esta seccin describe
        PLIP, PPP, SLIP y RDSI, las tecnologas de ms amplia difusin
        en estaciones de trabajo personales.


     Lea las secciones especficas a tecnologas relacionadas con sus
        necesidades" Si sus necesidades difieren de una solucin con IP
        y hardware comn, la seccin del final cubre detalles
        especficos a protocolos diferentes al IP y a hardware de
        comunicaciones peculiar.


     Configure
        Debera intentar configurar su red y tomar nota cuidadosamente
        de cualquier problema que tenga.


     Busque ms ayuda si la necesita
        Si experimenta problemas que este documento no le ayude a
        resolver entonces lea la seccin relativa a dnde encontrar
        ayuda o dnde informar de los errores.


     Divirtase!
        Trabajar en red es divertido, disfrtelo.



  3.1.  Convenciones usadas en el documento


  No se han utilizado convenciones especiales, pero debera estar al
  corriente de la manera en que aparecen las rdenes. Siguiendo el
  estilo clsico en la documentacin de Unix, cualquier orden que deba
  escribir en su intrprete de rdenes, estar prefijada por el smbolo
  prompt. Este Como muestra el prompt usuario$ para las rdenes que no
  necesitan que las ejecute el root. He escogido usar root# en lugar de
  un simple # para evitar confusiones con los trozos dispersos de
  guiones (shell script), donde la almohadilla (#) se usa para definir
  comentarios entre lneas.

  Cuando se muestran Opciones de Compilacin del Ncleo, se presentan
  en el formato usado por menuconfig. Deberan ser comprensibles incluso
  si usted (al igual que yo) no est acostumbrado a usar menuconfig. Si
  tiene dudas al respecto del anidamiento de las opciones, ejecutar el
  programa le ser de ayuda.

  Fjese en que los enlaces a otros documentos COMO son locales para que
  pueda acceder a las copias de los documentos del LDP que haya en el
  servidor al que usted est accediendo, en caso de que est leyendo la
  versin html de este documento. Si no dispone del paquete completo de
  documentos, cada COMO puede ser obtenido en www.linuxdoc.org
  (directorio /pub/Linux/HOWTO) y en sus incontables servidores rplica
  (mirror sites).


  4.  Informacin general sobre las redes en Linux.



  4.1.  Breve historia del desarrollo del Linux Networking Kernel .


  Desarrollar una nueva implementacin ncleo de la pila para el
  protocolo tcp/ip que rinda tan bien como las implementaciones
  existentes no es una tarea fcil. La decisin de no portar una de las
  implementaciones existentes se tom en un tiempo en que haba cierta
  incertidumbre al respecto de si las implementaciones existentes seran
  lastradas con copyrights restrictivos por el precedente sentado por
  U.S.L.  y en que haba un gran entusiasmo por hacerlo diferente y
  quizs incluso mejor de lo que se haba hecho.

  El voluntario original para liderar el desarrollo del ncleo del
  cdigo de red fue Ross Biro, biro@yggdrasil.com. Ross produjo una
  implementacin simple e incompleta pero aprovechable en su mayor parte
  de rutinas que fueron completadas con un controlador de Ethernet para
  la interfaz de red WD-8003.  Esto era suficiente para tener a mucha
  gente probando y experimentando con el software y algunas personas
  incluso intentaron conectar mquinas con esta configuracin a
  conexiones reales en Internet. La presin dentro de la comunidad de
  Linux conduciendo el desarrollo de la implementacin de la red estaba
  creciendo y, al final, el coste de una combinacin de cierta presin
  aplicada sobre Ross y sus propios compromisos personales le
  sobrecargaron y se descolg del puesto de desarrollador jefe. Los
  esfuerzos de Ross por iniciar el proyecto y la aceptacin de la
  responsabilidad de producir realmente algo til en tan controvertidas
  circunstancias fue lo que cataliz todo el trabajo futuro y por lo
  tanto supone un componente esencial en el xito del producto actual.

  Orest Zborowski, obz@Kodak.COM, produjo la interfaz original de
  programacin de sockets BSD para el ncleo de Linux. Fue un gran paso
  adelante ya que permiti portar a Linux muchas de las aplicaciones de
  red existentes sin modificaciones serias.

  Por aquel momento, Laurence Culhane, loz@holmes.demon.co.uk desarroll
  los primeros controladores de dispositivo para la implementacin del
  protocolo SLIP en Linux. Esto permiti a mucha gente que no tena
  acceso a redes Ethernet experimentar con el nuevo software de red. De
  nuevo, hubo gente que cogi este controlador y lo puso en servicio
  para conectarse a Internet.  Esto dio a mucha gente una idea de las
  posibilidades que podran hacerse realidad si Linux tuviera un soporte
  total de red y creciera el nmero de usuarios usando y experimentando
  de forma activa el software de red que exista.

  Una de las personas que tambin haba estado trabajando activamente en
  la tarea de construir la implementacin de red era Fred vam Kempen,
  waltje@uwalt.nl.mugnet.org.  Despus de un periodo de incertidumbre
  tras la renuncia de Ross al cargo de desarrollador jefe, Fred ofreci
  su tiempo y esfuerzos y acept el papel esencialmente sin oposicin.
  Fred tena planes ambiciosos sobre la direccin que quera que
  siguiese el software de red de Linux y orient el progreso hacia esos
  objetivos. Fred desarroll varias versiones del cdigo de red llamado
  el ncleo de cdigo NET-2 (el cdigo NET era el de Ross) que mucha
  gente pudo usar de manera ms til. Fred puso formalmente algunas
  innovaciones en la agenda de desarrollo, como la interfaz dinmica de
  dispositivo, la implementacin del protocolo Amateur Radio AX.25 y una
  interfaz de red diseada ms modularmente.  El cdigo NET-2 de Fred
  fue usado por un gran nmero de entusiastas, que creca continuamente
  segn se iba corriendo la voz de que el software funcionaba.  El
  software de red en esos momentos an estaba constituido por un gran
  nmero de parches a la versin estndar del ncleo y no estaba
  incluido en la versin normal. El NET-FAQ y el subsecuente NET-2-HOWTO
  describan el por entonces relativamente complejo procedimiento de
  ponerlo todo en marcha. Fred se concentraba en desarrollar
  innovaciones frente a las implementaciones estndar de red y eso
  estaba llevando tiempo.  La comunidad de usuarios estaba
  impacientndose por algo que funcionase eficazmente y satisficiera al
  80% de usuarios y, como con Ross, la presin sobre Fred como
  desarrollador en jefe creci.

  Alan Cox, iialan@www.uk.linux.org propuso una solucin al problema
  diseada para resolver la situacin. Propuso que l podra coger el
  cdigo NET-2 de Fred para quitar fallos, hacindolo eficaz y estable
  para que satisficiera al impaciente usuario de base al tiempo que
  retiraba esa presin de Fred permitindole continuar con su trabajo.
  Alan se puso a ello, obteniendo buenos resultados y su primera versin
  del cdigo de red de Linux fue llamada it/Net-2D(ebugged)/. El cdigo
  funcionaba bien en muchas configuraciones tpicas y el usuario de base
  estaba feliz. Alan puso claramente sus propias ideas y habilidad para
  contribuir al proyecto y como consecuencia comenzaron a aparecer
  muchas discusiones relativas a la direccin del cdigo NET-2.  Esto
  desarroll dos tendencias distintas dentro de la comunidad de red de
  Linux, una que tena la filosofa hazlo funcionar primero, y luego
  hazlo mejor y la otra hazlo mejor primero.  Linus termin
  arbitrando y ofreciendo su apoyo a los esfuerzos de desarrollo de Alan
  e incluy el cdigo de Alan en la distribucin estndar de las fuentes
  del ncleo.  Esto puso a Fred en una posicin difcil.  Cualquier
  desarrollo continuado podra debilitar la gran base de usuarios usando
  y probando activamente el cdigo y eso significara que los progresos
  seran lentos y difciles. Fred continu trabajando un tiempo y a la
  larga acab dejndolo y Alan se convirti en el nuevo jefe del
  esfuerzo de desarrollo de red para Linux.

  Donald Becker, becker@cesdis.gsfc.nasa.gov revel pronto su talento
  para los aspectos de bajo nivel de las redes y produjo un amplio
  abanico de controladores de red. Casi todos los incluidos en los
  ncleos actuales fueron desarrollados por l. Hay ms gente que ha
  hecho contribuciones significativas, pero el trabajo de Donald es
  prolfico y eso le garantiza una mencin especial.

  Alan continu refinando el cdigo NET-2-Debugged durante un tiempo
  mientras trabajaba en solucionar algunos de los problemas que quedaban
  sin mirar en la lista PORHACER. Por la poca en que al cdigo fuente
  1.3.* del ncleo les estaban creciendo los dientes, el cdigo de red
  haba migrado a la entrega NET-3 que es en la que las versiones
  actuales estn basadas.  Alan trabaj en muchos aspectos diferentes
  del cdigo de red y con la asistencia de mucha otra gente con talento
  de la comunidad de red de Linux hizo crecer el cdigo en todas
  direcciones.  Alan produjo dispositivos de red dinmicos y las
  primeras implementaciones de los estndares AX.25 e IPX. Alan ha
  continuado jugueteando con el cdigo, estructurndolo y mejorndolo
  lentamente hasta el estado en que se encuentra hoy da.

  Michael Callahan, callahan@maths.ox.ac.uk y Al Longyear
  longyear@netcom.com aportaron la implementacin del protocolo PPP, lo
  cual fue crtico para incrementar el nmero de gente que usaba
  activamente Linux para trabajar en red.

  Jonathon Naylor, sn@cs.nott.ac.uk ha contribuido mejorando
  significativamente el cdigo de AX.25 de Alan, aadiendo los
  protocolos NetRom y Rose. La implementacin de AX.25/NetRom/Rose es en
  s misma bastante significativa, porque ningn otro sistema operativo
  puede enorgullecerse de trabajar de forma nativa con estos protocolos
  aparte de Linux.

  Por supuesto, ha habido centenares de otras personas que han hecho
  contribuciones significativas al desarrollo del software de red de
  Linux.  A algunas de estas personas las encontrar ms adelante en la
  seccin de tecnologas especficas; otras personas han contribuido con
  mdulos, controladores, correcciones de errores, sugerencias, informes
  de pruebas y apoyo moral. En cada caso, cada uno puede decir que ha
  puesto su granito de arena y que ofreci lo que pudo. El cdigo de red
  del ncleo de Linux es un excelente ejemplo de los resultados que se
  pueden obtener del anrquico estilo de desarrollo de Linux. Si an no
  se ha sorprendido, lo har pronto. El desarrollo no se ha detenido.


  4.2.  Recursos referentes al tratamiento de redes con Linux.


  Hay varios sitios en los que puede encontrar informacin acerca de la
  implementacin de red de Linux.

  Tiene a su disposicin un montn de asesores. Podr encontrar un
  listado en la LinuxPorts Consultants Database,
  http://www.linuxports.com

  Alan Cox, quien en estos momentos se encarga de mantener el cdigo de
  red del ncleo de Linux tiene una pgina WWW con los ltimos titulares
  y eventos de inters relativos al estado de desarrollo de las
  funcionalidades presentes y futuras en cuanto al cdigo de red linux
  en: www.uk.linux.org.

  Otro buen sitio es un libro escrito por Olaf Kirch titulado la Gua
  para Administradores de Redes. Es parte del Proyecto de Documentacin
  de Linux http://www.linuxdoc.org y puede leerlo de forma interactiva
  en su versin HTML http://metalab.unc.edu/LDP/LDP/nag/nag.html, u
  obtenerlo en varios formatos mediante FTP (y en castellano) desde el
  archivo del proyecto LuCAS
  ftp://lucas.hispalinux.es/pub/LuCAS/Manuales-LuCAS/GARL.  El libro de
  Olaf es bastante extenso y procura una buena iniciacin de alto nivel
  a la configuracin de redes en Linux.

  Hay un grupo de noticias en la jerarqua de noticias de Linux dedicado
  a las redes y a materias relacionadas: comp.os.linux.networking

  Hay una lista de correo a la que se puede suscribir, donde hacer
  preguntas relacionadas al trabajo en redes con Linux. Para suscribirse
  debe mandar un mensaje:



       A: majordomo@vger.rutgers.edu
       Asunto: cualquier cosa
       Mensaje:

       subscribe linux-net




  En las diferentes redes de IRC suele haber canales #linux en los que
  suele haber gente que responde preguntas sobre linux y redes.

  Por favor, cuando vaya a informar de cualquier problema, recuerde
  incluir todos los detalles que pueda relevantes al respecto.  Debera
  informar, especficamente, de las versiones de los programas que est
  usando, sobre todo la versin del ncleo, la versin de herramientas
  como pppd o dip y la naturaleza exacta del problema que est
  experimentando.  Esto significa tomar nota de la sintaxis exacta de
  cualquier mensaje de error que reciba y de cualquier orden que est
  ejecutando.


  4.3.  Linux.  Dnde conseguir informacin sobre redes no especfica de


  Si est buscando informacin bsica de aprendizaje sobre redes tcp/ip
  en general, entonces le recomiendo que eche un vistazo a los
  siguientes documentos:



     TCP/IP Introduction
        este documento est tanto en versin texto
        ftp://athos.rutgers.edu/runet/tcp-ip-intro.doc como en versin
        PostScript ftp://athos.rutgers.edu/runet/tcp-ip-intro.ps.


     TCP/IP Administration
        este documento est tanto en versin texto
        ftp://athos.rutgers.edu/runet/tcp-ip-admin.doc como en versin
        PostScript ftp://athos.rutgers.edu/runet/tcp-ip-admin.ps.


  Si busca informacin algo ms detallada sobre redes tcp/ip entonces le
  recomiendo:


       Internetworking with TCP/IP, Volume 1: principles, protocols
       and architecture, de Douglas E. Comer, ISBN 0-13-227836-7,
       Prentice Hall publications, Tercera edicin, 1995.


  Si quiere aprender a escribir aplicaciones de red en entornos
  compatibles Unix entonces tambin le recomiendo:

       Unix Network Programming, by W. Richard Stevens, ISBN
       0-13-949876-1, Prentice Hall publications, 1990.


  Tambin debera probar el grupo de noticias comp.protocols.tcp-ip.
  Otra fuente importante de informacin tcnica especfica relativa a la
  Internet y al conjunto de protocolos tcp/ip son los RFC. RFC es un
  acrnimo de Request For Comments y es el medio estndar de enviar y
  documentar los protocolos estndar de Internet. Hay muchos sitios de
  donde tomar los RFC. Muchos de estos sitios son de FTP y otros
  proporcionan acceso por World Wide Web con un buscador asociado que le
  permite buscar palabras clave en la base de datos de RFC.

  Un posible lugar donde encontrar lo RFC es la base de datos de Nexor
  http://pubweb.nexor.co.uk/public/rfc/index/rfc.html.


  5.  Informacin genrica sobre la configuracin de redes.


  Las siguientes subsecciones las necesitar para saber y comprender
  ciertas cosas antes de que intente configurar la red. Son principios
  fundamentales que se aplican independientemente de la naturaleza
  exacta de la red que desee organizar.


  5.1.  Qu necesito para comenzar?


  Antes de que empiece a construir o configurar la red necesita saber
  algunas cosas. Las ms importantes son:


  5.1.1.  Cdigo fuente del ncleo.


  Antes que nada:

  La mayora de las distribuciones vienen por defecto con el soporte de
  red activado, por lo cual no habr que recompilar el ncleo. Si tiene
  hardware comn, debera irle bien. Por ejemplo, tarjetas de red  3COM,
  NE2000, o Intel.  Sin embargo proporcionamos la siguiente informacin
  por si necesita actualizar el ncleo.

  Como puede ser que el ncleo que est ejecutando no est preparado
  para los tipos de red o tarjetas que desee usar, probablemente
  necesitar las fuentes del ncleo para recompilarlo con las opciones
  apropiadas.

  Siempre puede obtener la ltima versin de CDROM.com
  permite que MUCHOS usuarios conecten simultneamente. El sitio oficial
  es kernel.org, pero use el anterior si tiene la posibilidad. Por
  favor, recuerde que ftp.kernel.org est seriamente sobrecargado. Use
  un servidor rplica.

  Normalmente las fuentes del ncleo se instalarn en el directorio
  /usr/src/linux. Para ms informacin sobre cmo aplicar parches y
  construir el ncleo debera leer el Kernel Como. Para ms informacin
  sobre cmo configurar mdulos del ncleo debera leer el Modules mini-
  Howto. Adems, el fichero README que hay en las fuentes del ncleo y
  el directorio Documentation son muy ilustrativos para el lector
  intrpido.

  A menos que se diga especficamente lo contrario, recomiendo que
  empiece con la versin estndar del ncleo (la que tenga un nmero par
  como segundo dgito del nmero de versin). Las versiones de
  desarrollo del ncleo (las que tienen el segundo dgito impar) podran
  tener algunos cambios estructurales u otros que podran causar
  problemas con otro software en su sistema. Si no est seguro de que
  pueda resolver ese tipo de problemas sumado al potencial de que haya
  otros errores de software, no los use.

  Por otro lado, algunas de las capacidades aqu descritas han sido
  introducidas durante el desarrollo de los ncleos 2.1, por lo que
  tendr que tomar una decisin: puede mantenerse en 2.0 mientras espera
  por el 2.2 y por una distribucin con cada herramienta actualizada, o
  puede coger un 2.1 y buscar los diversos programas necesarios para
  explotar las nuevas capacidades.  En el momento de escribir este Como,
  en Agosto de 1998, el ncleo disponible es el 2.1.115 y se espera que
  el 2.2 aparezca pronto.

  Nota del Traductor: En el momento en que acab la traduccin de este
  Como, en septiembre de 1999, las versiones disponibles del ncleo son
  la 2.2.12 (estable) y la 2.3.16 (desarrollo). Adems, las principales
  distribuciones han puesto al da sus herramientas para tratar las
  capacidades de la serie 2.1 y superiores.


  5.1.2.  Herramientas de red actualizadas.


  Las herramientas de red son los programas que usted usa para
  configurar los dispositivos de red de linux. Estas herramientas
  permiten asignar direcciones a dispositivos y configurar rutas, por
  ejemplo.

  La mayora de distribuciones modernas de Linux estn dotadas con las
  herramientas de red, por lo que si ha instalado Linux a partir de una
  distribucin y no ha instalado las herramientas de red, debera
  hacerlo.

  Si no ha instalado a partir de una distribucin entonces necesitar
  las fuentes para compilar las herramientas usted mismo. No es difcil.

  Las herramientas de red las mantiene ahora Bernd Eckenfelds y estn
  disponibles en:

  ftp://ftp.inka.de/pub/comp/Linux/networking/NetTools/ y estn
  replicadas en: ftp://ftp.uk.linux.org/pub/linux/Networking/base/.

  Tambin puede encontrar los ltimos paquetes de RedHat en
  ftp://ftp.cdrom.com/pub/linux/redhat/redhat-6.0/i386/base/net-
  tools-1.51-3.i386.rpm.

  Para Debian, los paquetes que traen las principales herramientas son
  los paquetes hostname, netbase y netstd, que encontrar en
  ftp://ftp.debian.org/debian/dists/stable/main/binary-i386/base/.

  Asegrese de que elige la versin que ms se ajuste al ncleo que
  desee usar y siga las instrucciones del paquete para instalarlo.

  Para instalar y configurar la versin actual, ---en el momento de
  traducirse esto--- esto necesitar hacer lo siguiente:









  usuario% cd /usr/src
  usuario% tar xvfz net-tools-x.xx.tar.gz
  usuario% cd net-tools-x.xx
  usuario% make config
  usuario% make
  root# make install




  O si no, use los paquetes de su distribucin. Por ejemplo, con RedHat:



       root# rpm -U net-tools-x.xx-y.i386.rpm




  y con Debian:



       root# dpkg -i hostname_x.xx-y.yy.deb
       root# dpkg -i netbase_x.xx-y.yy.deb
       root# dpkg -i netstd_x.xx-y.yy.deb




  En los anteriores ejemplos, x.xx se refiere a la versin de las
  herramientas, e y.yy a la revisin de los correspondientes paquetes.

  Si adems va a configurar un cortafuegos o a usar la caracterstica de
  IP Masquerade, necesitar ipfwadm.  La ltima versin la puede obtener
  en: ftp:/ftp.xos.nl/pub/linux/ipfwadm.  De nuevo se encontrar con ms
  de una versin disponible. Asegrese de coger la versin que ms se
  ajuste a su ncleo. Tenga en cuenta que las capacidades de cortafuegos
  de Linux cambiaron durante el desarrollo 2.1 y ipfwadm ha sido
  sustituida por ipchains en la versin 2.2 del ncleo.  ipfwadm slo
  vale para la versin 2.0 del ncleo. Se sabe de estas distribuciones
  que se ajustan a versiones 2.0 o anteriores del ncleo:


    Redhat 5.2 o anteriores

    Caldera antes de la versin 2.2

    Slackware antes de las versiones 4.x

    Debian antes de las versiones 2.x

  Para instalar y configurar la versin actual en el momento de escribir
  esto necesita leer el IPChains Howto, disponible en el Proyecto de
  Documentacin de Linux http://www.linuxdoc.org

  Tenga en cuenta que si tiene una versin 2.2 (o 2.1 de las ltimas)
  del ncleo, ipfwadm no es la herramienta correcta para configurar un
  cortafuegos. Esta versin del NET-3-HOWTO todava no trata con la
  nueva configuracin de cortafuegos. Si necesita informacin ms
  detallada sobre ipchains, por favor, dirjase al documento mencionado
  anteriormente.




  5.1.3.  Aplicaciones de red.


  Las aplicaciones de red son programas como telnet y ftp y sus
  respectivos programas servidores. David Holland estuvo manteniendo una
  distribucin de las ms comunes de la que ahora se ocupa
  :netbug@ftp.uk.linux.org.  Puede obtenerlas en:
  ftp://ftp.uk.linux.org/pub/linux/Networking/base.


  5.1.4.  Introduccin a las direcciones IP.


  Las direcciones del Protocolo Internet (IP) estn compuestas por
  cuatro bytes. La convencin es escribir estas direcciones en la
  denominada notacin decimal puntuada (dotted decimal notation). De
  esta forma cada byte es convertido en un nmero decimal (0-255),
  despreciando los ceros a la izquierda a menos que el nmero en s sea
  cero.  Por convencin, cada interfaz de una mquina o encaminador
  tiene una direccin IP. Es vlido usar la misma IP para cada interfaz
  de una sola mquina en algunas circunstancias, pero normalmente cada
  interfaz tiene su propia direccin.

  Las Redes basadas en Internet Procotol son secuencias contiguas de
  direcciones IP.  Todas las direcciones dentro de una red tienen un
  nmero de dgitos de en comn. A la porcin de la red que es comn a
  todas las direcciones llama la porcin de la red. Los dgitos
  restantes son llamados porcin de la mquina. Al nmero de bits que
  comparten todas las direcciones de una red se le llama mscara de red
  (netmask), y su papel es determinar qu direcciones pertenecen a la
  red y cules no.  Consideremos el siguiente ejemplo:



       ---------------------  ---------------
       Direccin Host         192.168.110.23
       Mscara de red         255.255.255.0
       Porcin de red         192.168.110.
       Porcin de Host        .23
       ---------------------  ---------------
       Direccin de Red       192.168.110.0
       Direccin de Difusin  192.168.110.255
       ---------------------  ---------------




  Cualquier direccin a la que se aplique una operacin and de bits con
  su mscara de red, revelar la direccin de la red a la que pertenece.
  La direccin de red es por tanto siempre el menor nmero de direccin
  dentro de el rango de la red y siempre tiene la porcin de mquina
  codificada toda con ceros.

  La direccin de difusin (broadcast) es una especial a la que
  escucha cada mquina en la red adems de a la suya propia. Esta
  direccin es a la que se envan los datagramas si se supone que todas
  las mquinas de la red lo deben recibir. Ciertos tipos de datos, como
  la informacin de encaminamiento y los mensajes de aviso son
  transmitidos a la direccin de difusin para que cada estacin en la
  red pueda recibirlo simultneamente. Hay dos estndares usados
  comnmente al respecto de la direccin de difusin. El ms ampliamente
  aceptado es el de usar la direccin ms alta posible en la red. En el
  ejemplo anterior sera 192.168.110.255. Por alguna razn, otras
  estaciones han adoptado la convencin de usar las direcciones de red
  como direcciones de difusin. En la prctica no importa mucho cual
  use, pero asegrese de que cada mquina en la red est configurada con
  la misma.

  Por razones administrativas, durante el desarrollo inicial del
  protocolo IP se formaron, de forma arbitraria, algunos grupos de
  direcciones como redes, y estas redes se agruparon en las llamadas
  clases.  Estas clases proporcionan un cierto nmero de redes de
  tamao estndar que pueden ser reservadas. Los rangos reservados son:



       ----------------------------------------------------------
       | Clase   | Mscara de    | Direcciones de red           |
       | de red  | red           |                              |
       ----------------------------------------------------------
       |    A    | 255.0.0.0     | 0.0.0.0    - 127.255.255.255 |
       |    B    | 255.255.0.0   | 128.0.0.0  - 191.255.255.255 |
       |    C    | 255.255.255.0 | 192.0.0.0  - 223.255.255.255 |
       |Multicast| 240.0.0.0     | 224.0.0.0  - 239.255.255.255 |
       ----------------------------------------------------------




  Las direcciones que deber usar dependen de lo que vaya a hacer
  exactamente. Puede que tenga que realizar varias de las siguientes
  actividades para obtener las direcciones que necesite:



     Instalar una mquina Linux en una red IP existente
        Si desea instalar una mquina Linux en una red IP existente
        entonces debera contactar con los administradores de la red y
        preguntarles por la siguiente informacin:


       Direccin IP del Host

       Direccin IP de la red

       Direccin IP de broadcast

       Mscara de red IP

       Direccin del encaminador (router)

       Direccin del Servidor de Nombre de Dominio (DNS)

        Debera configurar entonces el dispositivo de red Linux con esos
        detalles. No puede inventarlos y esperar que la configuracin
        funcione.


     Construir una nueva red propia que nunca conectar con
        Internet" Si est construyendo una red privada y no tiene
        intencin de conectar nunca esa red a Internet entonces puede
        elegir las direcciones que quiera. De todas maneras, por razones
        de seguridad y consistencia, se han reservado algunas
        direcciones IP de red especficamente para este propsito. Estn
        descritas en el RFC1597 y son las que siguen:







     -----------------------------------------------------------
     |      DIRECCIONES RESERVADAS PARA REDES PRIVADAS         |
     -----------------------------------------------------------
     | Clase   | Mscara de    | Direcciones de red            |
     | de red  | red           |                               |
     -----------------------------------------------------------
     |    A    | 255.0.0.0     | 10.0.0.0    - 10.255.255.255  |
     |    B    | 255.255.0.0   | 172.16.0.0  - 172.31.255.255  |
     |    C    | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 |
     -----------------------------------------------------------




     Primero debera decidir cun grande quiere que sea su red para
     entonces elegir tantas direcciones como necesite.



  5.2.  Dnde debera poner las rdenes de configuracin?


  Hay unas pocas opciones a elegir para el procedimiento de arranque del
  sistema Linux. Despus de que carga el ncleo, siempre ejecuta un
  programa llamado init. El programa init lee entonces el fichero de
  configuracin llamado /etc/inittab y comienza el proceso de arranque.
  Hay unos pocos init diferentes, aunque todo el mundo est ahora
  convergiendo al modelo SystemV, desarrollado por Miguel van
  Smoorenburg.

  A pesar de que el programa init sea el mismo, la configuracin del
  arranque del sistema est organizada de manera diferente en cada
  distribucin.

  Normalmente el fichero /etc/inittab contiene una entrada que dice algo
  como:



       si::sysinit:/etc/init.d/boot




  Esta lnea especifica el nombre del fichero de guin de ejecucin
  (script) que controla la secuencia de carga. Este fichero es algo as
  como el AUTOEXEC.BAT en MS-DOS.

  El guin de arranque suele llamar a otros, y a menudo la red se
  configura dentro de alguno de stos.

  La siguiente tabla puede ser usada como gua para su sistema:



       ----------------------------------------------------------------------
       Distrib. |Interfaz Configuracin/Encaminado  |Iniciacin del Servidor
       ----------------------------------------------------------------------
       Debian   | /etc/init.d/network               | /etc/rc2.d/*
       ----------------------------------------------------------------------
       Slackware| /etc/rc.d/rc.inet1                | /etc/rc.d/rc.inet2
       ----------------------------------------------------------------------
       RedHat   | /etc/rc.d/init.d/network          | /etc/rc.d/rc3.d/*
       ----------------------------------------------------------------------


  Fjese en que Debian y Red Hat usan un directorio entero de guiones
  que levantan los servicios del sistema (y normalmente la informacin
  no se encuentra en esos archivos; por ejemplo, el sistema de Red Hat
  almacena toda la configuracin del sistema en ficheros dentro de
  /etc/sysconfig, de donde es leda por los guiones de carga). Si quiere
  comprender los detalles del proceso de arranque del sistema, le
  sugiero que examine /etc/inittab y la documentacin que acompaa a
  init. Linux Journal va a publicar (o lo ha hecho ya) un artculo
  tratando la iniciacin del sistema, y este documento mantendr una
  referencia a l tan pronto como est disponible en la red.

  La mayora de distribuciones modernas incluyen algn programa que le
  permita configurar la mayora de interfaces de red. Si tiene una de
  stas entonces debera ver si hace lo que usted quiere antes de acudir
  a la configuracin manual.



       --------------------------------------------
       Distrib.  | Programa de configuracin de red
       --------------------------------------------
       RedHat    | /sbin/netcfg
       Slackware | /sbin/netconfig
       --------------------------------------------





  5.3.  Creacin de las interfaces de red.


  En muchos sistemas operativos Unix los dispositivos de red tienen
  correspondencias en el directorio /dev. Esto no pasa en Linux.  Los
  dispositivos de red se crean de forma dinmica y por tanto no
  requieren de la presencia de ficheros de dispositivo.

  En la mayora de los casos los dispositivos de red son creados
  automticamente por el controlador de dispositivos mientras se inicia
  y localiza el hardware. Por ejemplo, el controlador Ethernet crea
  interfaces eth[0..n] secuencialmente segn va encontrado tarjetas
  Ethernet. La primera tarjeta que encuentra es eth0, la segunda eth1,
  etc.

  Sin embargo, en algunos casos, de los que slip y ppp son ejemplos
  notables, los dispositivos de red son creados por la accin de algn
  programa de usuario. Se aplica la misma numeracin secuencial de
  dispositivos, pero no se crean al arrancar. La razn es que al
  contrario que con los dispositivos Ethernet, el nmero de dispositivos
  ppp o slip puede variar durante la actividad de la mquina. Estos
  casos sern cubiertos con ms detalle en secciones posteriores.


  5.4.  Configuracin de una interfaz de red.


  Cuando tenga todos los programas necesarios y su direccin e
  informacin de red, puede configurar la interfaz de red. Cuando
  hablamos de configurar una interfaz de red nos referimos al proceso de
  asignar direcciones apropiadas a un dispositivo y asignar valores
  adecuados a otros parmetros configurables.  El programa usado ms
  comnmente para hacer esto es la orden ifconfig (interface configure).

  Lo normal ser usar una orden similar a la siguiente:


       root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up




  En este caso estoy configurando la interfaz Ethernet eth0, con
  direccin IP 192.168.0.1 y mscara de red 255.255.255.0. El `up del
  final de la orden le dice al interfaz que debera activarse, pero
  normalmente se puede omitir, ya que es el valor por defecto. Para
  desactivar una interfaz, simplemente tiene que ejecutar ifconfig eth0
  down.

  El ncleo asume ciertas cosas cuando configura interfaces. Por
  ejemplo, puede especificar la direccin de red y difusin de una
  interfaz, pero si usted no lo hace, como en mi ejemplo anterior,
  entonces el ncleo har una suposicin razonable de cules deberan
  ser, basndose en la mscara que se le proporciona; si tampoco indica
  la mscara, entonces partir de la clase de la direccin IP
  configurada. En mi ejemplo, el ncleo asumir que se va a configurar
  una red clase C en la interfaz y establece una direccin de red
  192.168.0.0 y una direccin de difusin 192.168.0.255.  Hay otras
  muchas opciones para la orden ifconfig.  Las mas importantes son:



     up esta opcin activa una interfaz (y es la opcin por defecto).


     down
        esta opcin desactiva una interfaz.


     [-]arp
        esta opcin activa o desactiva el uso del protocolo de
        resolucin de direccin (address resolution protocol) sobre la
        interfaz


     [-]allmulti
        esta opcin activa o desactiva la recepcin de todos los
        paquetes multicast por hardware. El multicast por hardware
        permite que varios grupos de interfaces reciban paquetes
        remitidos a destinos especiales. Esto puede ser de importancia
        si est usando aplicaciones como videoconferencia, pero
        normalmente no se usa.


     mtu N
        este parmetro le permite especificar la MTU del dispositivo.


     netmask <direc>
        este parmetro le permite asignar la mscara de la red a la que
        pertenece el dispositivo.


     irq <direc>
        este parmetro slo trabaja con ciertos tipos de hardware, y
        permite especificar la IRQ del dispositivo.


     [-]broadcast [direc]
        este parmetro le permite activar y asignar la acepcin de
        datagramas destinados a la direccin de difusin, o desactivarla
        por completo.

     [-]pointopoint [direc]
        este parmetro le permite asignar la direccin de la mquina en
        el otro extremo de un enlace punto a punto, como en SLIP o PPP.


     hw <tipo> <direc>
        este parmetro le permite asignar la direccin del hardware de
        ciertos tipos de dispositivos de red. Esto no suele ser til
        para Ethernet, pero lo es para otras redes como AX.25.


  Puede usar la orden ifconfig sobre cualquier dispositivo de red.
  Algunos programas de usuario, como pppd y dip configuran
  automticamente los dispositivos de red al crearlos, por lo que es
  innecesario el uso de ifconfig con ellos.


  5.5.  Resolver ) Configuracin del sistema de resolucin de nombres (
  Name


  El sistema de resolucin de nombres es una parte de la biblioteca
  estndar de Linux.  Su funcin principal es proporcionar un servicio
  para convertir las denominaciones amistosas con el hombre de las
  mquinas como ftp.funet.fi a direcciones IP amigables para la
  mquina como 128.214.248.6.


  5.5.1.  Qu hay en un nombre?


  Posiblemente est familiarizado con la apariencia de los nombres de
  mquina de Internet, pero puede que no entienda como se construyen, o
  como se desconstruyen. Los nombres de dominio de Internet son
  jerrquicos por naturaleza; esto es, tienen una estructura en rbol.
  Un dominio es una familia, o grupo de nombres. Un dominio puede ser
  fragmentado en subdominios. Un dominio de nivel superior (toplevel
  domain) es un dominio que NO es un subdominio. Los Dominios de Nivel
  Superior estn especificados en el RFC-920. Algunos ejemplos de los
  ms comunes son:



     COM
        Organizaciones Comerciales

     EDU
        Organizaciones Educativas

     GOV
        Organizaciones Gubernamentales

     MIL
        Organizaciones Militares

     ORG
        Otras organizaciones

     NET
        Organizaciones relacionadas con InterNet

     Designador de Pas
        stos son cdigos de dos letras que representan a un pas en
        particular.


  Por razones histricas, la mayora de los dominios pertenecientes a
  uno de los de nivel superior que no basados en un nombre de pas, son
  de organizaciones dentro de los Estados Unidos, aunque los Estados
  Unidos tienen tambin su propio cdigo de pas .us. Esto ha dejado de
  ser cierto para los dominios .com y .org, que son usados de forma
  comn por compaas de fuera de los Estados Unidos de Amrica.

  Cada uno de estos dominios de nivel superior tiene subdominios. Los
  dominios de nivel superior basados en el nombre de un pas suelen
  estar divididos en subdominios basados en com, edu, gov, mil y org.
  Por ejemplo, encontrar cosas como com.au y gov.au, las organizaciones
  comerciales y gubernamentales en Australia.

  El siguiente nivel de divisin suele representar el nombre de la
  organizacin.  Los siguientes subdominios varan, a menudo basando el
  siguiente nivel en la estructura departamental de la organizacin a la
  que pertenecen, pero pueden estarlo en cualquier criterio considerado
  razonable y con significado claro para los administradores de la red
  de la organizacin.

  La parte ms a la izquierda de un nombre siempre es el nombre nico
  asignado a la mquina, y es llamada hostname, la porcin del nombre a
  la derecha del nombre de la mquina es el domainname (nombre de
  dominio), y el nombre completo es llamado Fully Qualified Domain Name
  (Nombre de Dominio Completamente Cualificado).

  Si usamos el ordenador de Terry como ejemplo, el nombre completamente
  cualificado es perf.no.itg.telstra.com.au. Esto significa que el
  nombre de la mquina es perf y el nombre de dominio el
  no.itg.telstra.com.au.  El nombre de dominio est basado en un dominio
  de nivel superior basado en su pas, Australia, y como su direccin de
  correo pertenece a una organizacin comercial tenemos .com como
  siguiente nivel de dominio.  El nombre de la compaa es (era)
  telstra, y la estructura interna de su nombre est basada en una
  estructura organizacional. En su caso, la mquina pertenece al Grupo
  de Tecnologa de la Informacin (Information Technology Group),
  seccin de Operaciones de Red (Network Operations).

  Los nombres son, por norma, bastante ms cortos; por ejemplo, mi PSI
  se llama systemy.it y mi organizacin sin nimo de lucro se llama
  linux.it, sin subdominio com ni org, por lo que mi propia mquina se
  llama morgana.systemy.it y rubini@linux.it es una direccin de correo
  electrnico vlida. Sepa que el dueo de un dominio tiene derecho
  tanto para registrar una mquina como para registrar subdominios; por
  ejemplo, el GUL (Grupo de Usuarios de Linux) al que pertenezco usa el
  dominio pluto.linux.it, porque los dueos de linux.it convinieron en
  abrir un subdominio para el GUL.


  5.5.2.  Qu informacin necesitar


  Necesitar saber a qu dominio pertenecen sus mquinas. El software de
  resolucin de nombres proporciona el servicio de traduccin haciendo
  consultas a un Servidor de Nombres de Dominio (Domain Name Server),
  por lo que deber saber la direccin IP del servidor de nombres
  (nameserver) local que vaya a usar.

  Hay tres ficheros que es necesario editar. Los comentar uno a uno.


  5.5.3.  /etc/resolv.conf


  /etc/resolv.conf es el fichero de configuracin principal del cdigo
  de resolucin de nombres. Su formato es bastante simple. Es un fichero
  de texto con una palabra clave por lnea. Hay tres palabras clave de
  uso frecuente, que son:


     domain
        esta palabra clave especifica el nombre de dominio local.


     search
        sta especifica una lista de dominios alternativos para
        completar el nombre de una mquina.


     nameserver
        sta, que puede utilizarse varias veces, especifica una
        direccin IP de un servidor de nombres de dominio para
        consultarlo cuando se resuelvan nombres.

  Su /etc/resolv.conf podra parecerse a ste:



       domain maths.wu.edu.au
       search maths.wu.edu.au wu.edu.au
       nameserver 192.168.10.1
       nameserver 192.168.12.1




  Este ejemplo especifica que el nombre de dominio por defecto para
  aadir a los nombres no cualificados (esto es, nombres de mquinas
  suministrados sin dominio) es maths.wu.edu.au, y que si no se
  encuentra la mquina en este dominio intentemos tambin el dominio
  wu.edu.au directamente.  Se proporcionan dos entradas de servidor de
  nombres, cada uno de los cuales puede ser llamado por el cdigo de
  resolucin de nombres para traducir el nombre.


  5.5.4.  /etc/host.conf


  El fichero /etc/host.conf es el lugar donde se configuran algunos
  elementos que gobiernan el comportamiento del cdigo de resolucin de
  nombres.  El formato de este fichero est descrito en detalle en la
  pgina de manual resolv+. El ejemplo siguiente funcionar en casi
  todas las circunstancias:



       order hosts,bind
       multi on




  Esta configuracin le dice al resolutor de nombres que examine el
  fichero /etc/hosts antes de intentar consultar a un servidor de
  nombres, y que devuelva todas las direcciones vlidas de una mquina
  que encuentre en el fichero /etc/hosts, en lugar de slo el primero.


  5.5.5.  /etc/hosts



  El fichero /etc/hosts es donde se pone el nombre y direccin IP de las
  mquinas locales. Si usted inserta un nombre en este fichero, entonces
  su ordenador no consultar a un servidor de dominio para obtener la
  direccin IP.  La desventaja de este mtodo es que usted mismo tendr
  que poner el fichero al da si la direccin de alguna mquina cambia.
  En un sistema bien administrado, las nicas entradas que suelen
  aparecer son la interfaz de loopback (prueba en bucle) y el nombre de
  la mquina local.



       # /etc/hosts
       127.0.0.1      localhost loopback
       192.168.0.1    this.host.name




  Se puede especificar ms de un nombre de mquina por lnea, como se
  demuestra en la primera entrada, que es la forma estndar para la
  interfaz de prueba (loopback).


  5.5.6.  Ejecutar un servidor de nombres


  Si quiere tener un servidor de nombres local, le resultar sencillo.
  Por favor, lea el DNS Como, http://www.insflug.org/documentos/DNS-
  Como/ y la documentacin incluida en su copia de BIND (Berkeley
  Internet Name Domain).


  5.6.  Configuracin de la interfaz loopback


  La interfaz loopback' es un tipo especial de interfaz que le permite
  hacer conexiones consigo mismo. Hay varias razones por las que podra
  querer esto. Por ejemplo, puede que desee probar algn tipo de
  programa sin interferir con alguien ms en su red. Por convencin, la
  direccin de red IP 127.0.0.1 ha sido asignada especficamente para el
  dispositivo de pruebas. Por lo que da igual lo que haga su mquina,
  que si abre una conexin de telnet a 127.0.0.1, siempre llegar a la
  interfaz interna.

  Configurar la interfaz loopback es simple y debera asegurarse de
  hacerlo.



       root# ifconfig lo 127.0.0.1
       root# route add -host 127.0.0.1 lo




  Hablaremos ms de la orden route en la siguiente seccin.


  5.7.  Encaminamiento ( Routing ).


  El encaminamiento es un tema amplio. Sera fcil llenar varios
  volmenes hablando de l. La mayora de ustedes tendrn requisitos de
  encaminamiento relativamente simples, pero algunos no. Cubrir
  solamente algunos de los fundamentos bsicos. Si est interesado en
  informacin ms detallada, entonces sugiero que se remita a las
  referencias propuestas al principio del documento.

  Comencemos con una definicin. Qu es el encaminamiento IP? Esta es
  la que yo suelo aplicar:


       El Encaminamiento IP es el proceso por el que una mquina
       con mltiples conexiones de red decide por dnde dirigir un
       datagrama IP que haya recibido.


  Sera til ilustrar esto con un ejemplo. Imagine una oficina con el
  encaminamiento tpico, que podra constar de un enlace PPP con
  Internet, varios segmentos Ethernet alimentando las estaciones de
  trabajo, y un enlace PPP hacia otra oficina. Cuando el encaminador
  recibe un datagrama en cualquiera de sus conexiones de red, el
  mecanismo que usa para determinar qu interfaz debera enviar el
  datagrama, es el encaminamiento. Las estaciones sencillas tambin
  necesitan encaminar. Todas las estaciones en Internet tienen dos
  dispositivos de red: uno es la interfaz de pruebas descrita
  anteriormente, y la otra es la que usa para comunicarse con el resto
  de la red, quiz una Ethernet, quiz una interfaz serie PPP o SLIP.

  Bien... Por tanto, cmo funciona el encaminado? Cada mquina tiene
  una lista de reglas, llamada tabla de encaminamiento. Esta tabla
  contiene columnas que suelen contener al menos tres campos: el primero
  es una direccin de destino, el segundo es el nombre de la interfaz a
  la que se va a encaminar el datagrama, y el tercero es (opcionalmente)
  la direccin IP de otra mquina que coger el datagrama en su
  siguiente paso a travs de la red. En Linux puede ver esta tabla
  usando la siguiente orden:



       root# cat /proc/net/route




  o con cualquiera de estas otras:



       root# /sbin/route -n
       root# /bin/netstat -r




  El proceso de encaminado es relativamente simple: se recibe un
  datagrama que llega, se examina la direccin de destino (para quin
  es) y se compara con cada entrada en la lista. Se selecciona la
  entrada que ms se parezca y se reenva el datagrama a la interfaz
  especificada. Si el campo de pasarela (gateway) est descrito, el
  datagrama se reenva a esa mquina mediante la interfaz especificada,
  y si no, se asume que la direccin de destino est en la red a la que
  se accede mediante la interfaz correspondiente.

  Para manipular esta tabla se usa una orden especial. Esta instruccin
  toma sus argumentos en lnea de rdenes y los convierte en llamadas al
  sistema del ncleo, que le piden que aada, borre o modifique entradas
  en la tabla de encaminamiento. Dicha orden se llama route.

  Un ejemplo sencillo. Imagine que tiene una red Ethernet. Le han dicho
  que pertenece a una red clase C con direccin 192.168.1.0. Le han dado
  la direccin IP 192.168.1.10 para su uso y tambin que 192.168.1.1 es
  un encaminador conectado a Internet.

  El primer paso es configurar la interfaz como se describi
  anteriormente.  Puede usar una orden como:



       root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up




  Ahora necesita aadir una entrada en la tabla de rutas para decirle al
  ncleo que los datagramas destinados a todas las mquinas con
  direcciones que se ajusten a 192.168.1.*, debern ser enviados al
  dispositivo Ethernet. Debera usar una orden similar a:



       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0




  Fjese en el uso del parmetro -net para especificar al programa route
  que esta entrada es una regla para una red completa. Otra opcin es
  -host, que indica una va especfica a una direccin IP en particular.

  Esta ruta le permitir establecer conexiones IP con todas las
  estaciones de su segmento Ethernet. Pero qu pasa con todas las
  mquinas con direccin IP que no estn en su segmento Ethernet?

  Sera bastante engorroso, por no decir imposible, tener que aadir
  caminos para cada red de destino posible, por lo que existe un truco
  que se usa para simplificar la tarea. A este truco se le llama camino
  por defecto. El camino por defecto se ajusta a todo destino posible,
  pero con prioridad mnima, por lo que si existe cualquier otra entrada
  que se ajuste a la direccin requerida, ser la que se use en lugar
  del camino por defecto.  La idea del camino por defecto es simplemente
  permitirle decir: y todo lo dems debera ir por aqu. En el ejemplo
  que me he inventado podra usar una orden como:



       root# route add default gw 192.168.1.1 eth0




  El parmetro gw le dice a la orden route que lo que le sigue es la
  direccin IP, o nombre, de una pasarela u otra mquina encaminadora a
  la que se deberan enviar todos los datagramas que se ajusten a esta
  entrada para futuro encaminamiento.

  Por lo tanto, la configuracin completa debera parecerse a:



       root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add default gw 192.168.1.1 eth0





  Si echa una mirada a los ficheros rc de red de su mquina, encontrar
  que al menos uno de ellos se parece mucho a esto. Es una configuracin
  muy comn.

  Veamos ahora una configuracin de encaminamiento un poco ms
  complicada.  Imaginemos que estamos configurando el encaminador de
  antes, el que soportaba el enlace PPP a Internet y los segmentos LAN
  alimentando las estaciones de trabajo en la oficina. Imaginemos que el
  encaminador tiene tres segmentos Ethernet y un enlace PPP. Nuestra
  configuracin de encaminamiento debera parecerse a esto:



       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add -net 192.168.2.0 netmask 255.255.255.0 eth1
       root# route add -net 192.168.3.0 netmask 255.255.255.0 eth2
       root# route add default ppp0




  Cada una de las estaciones debera usar la forma simple que
  presentamos anteriormente. Slo el encaminador necesita especificar
  cada uno de los caminos de red de forma separada, porque para las
  estaciones el mecanismo de encaminamiento por defecto enviar todos
  los paquetes al encaminador, dejndole el problema de repartirlos.
  Puede estar preguntndose por qu el encaminador por defecto
  presentado no especifica un gw. La razn es simple: los protocolos de
  enlace serie como PPP y SLIP slo tienen dos terminales en su red, uno
  en cada extremo. Especificar el host al otro extremo como pasarela no
  tiene sentido y es redundante, ya que no hay otra eleccin, por lo que
  no se necesita especificar una pasarela para este tipo de conexin de
  red.  Otros tipos como Ethernet, arcnet o token ring necesitan que se
  especifique la pasarela, ya que se puede acceder a un gran nmero de
  terminales al mismo tiempo.


  5.7.1.  Entonces qu hace el programa routed ?


  La configuracin de encaminamiento descrita anteriormente se ajusta a
  necesidades de red simples, donde los posibles caminos hacia los
  destinos son sencillos. Cuando se tienen necesidades de red ms
  complejas, las cosas se vuelven un poco ms complicadas.
  Afortunadamente la mayora de ustedes no tendr este problema.

  El gran problema con el encaminamiento manual o encaminamiento
  esttico que aqu se ha descrito, es que si una mquina o enlace
  falla en la red, entonces la nica manera en que podr dirigir sus
  datagramas por otra direccin, si es que existe, es interviniendo
  manualmente y ejecutando las rdenes apropiadas. Naturalmente esto es
  poco elegante, lento, nada prctico y peligroso. Se han desarrollado
  varias tcnicas para ajustar automticamente las tablas de
  encaminamiento en el caso de fallos en la red donde hubiera caminos
  alternativos. Todas estas tcnicas se agrupan de manera no muy oficial
  bajo la definicin protocolos de encaminamiento dinmico.

  Puede que haya odo de alguno de los protocolos ms comunes. Es
  probable que RIP (Routing Information Protocol) y OSPF (Open Shortest
  Path First Protocol) sean los ms comunes. El Routing Information
  Protocol es muy comn en redes pequeas, como las redes corporativas
  pequeas y medianas o en las redes de edificios. El OSPF es ms
  moderno y ms capaz de gestionar grandes configuraciones de red, y
  est mejor preparado para entornos donde haya un gran nmero de
  caminos posibles a travs de la red.  Las implementaciones habituales
  de estos protocolos son: routed (RIP) y gated (RIP, OSPF y otros). El
  programa routed suele venir incluido en las distribuciones de Linux, y
  si no, estar incluido en el paquete NetKit, detallado ms adelante.

  Un ejemplo de dnde y cmo debera usar un protocolo de encaminamiento
  dinmico vendra a ser algo como lo siguiente:



             192.168.1.0 /                         192.168.2.0 /
                255.255.255.0                         255.255.255.0
              -                                     -
              |                                     |
              |   /-----\                 /-----\   |
              |   |     |ppp0   //    ppp0|     |   |
         eth0 |---|  A  |------//---------|  B  |---| eth0
              |   |     |     //          |     |   |
              |   \-----/                 \-----/   |
              |      \ ppp1             ppp1 /      |
              -       \                     /       -
                       \                   /
                        \                 /
                         \               /
                          \             /
                           \           /
                            \         /
                             \       /
                              \     /
                           ppp0\   /ppp1
                              /-----\
                              |     |
                              |  C  |
                              |     |
                              \-----/
                                 |eth0
                                 |
                            |---------|
                            192.168.3.0 /
                               255.255.255.0




  Tenemos tres encaminadores A, B y C. Cada uno da servicio a un
  segmento Ethernet con una red IP de clase C (mscara de red
  255.255.255.0). Cada encaminador tiene tambin un enlace PPP a cada
  uno de los otros encaminadores. La red forma un tringulo.

  Debera estar claro que la tabla de encaminamiento del encaminador A
  podra ser algo como:



       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add -net 192.168.2.0 netmask 255.255.255.0 ppp0
       root# route add -net 192.168.3.0 netmask 255.255.255.0 ppp1




  Esto funcionara bien hasta que el enlace entre los encaminadores A y
  B falle. Si falla ese enlace, entonces con la entrada de
  encaminamiento mostrada anteriormente, las mquinas del segmento
  Ethernet de A no podrn alcanzar a las del segmento Ethernet en B
  porque sus datagramas sern dirigidos al enlace ppp0 de A que est
  mal. Podran seguir comunicndose todava con las mquinas del
  segmento Ethernet de C, y las del segmento Ethernet de C con las del
  segmento Ethernet de B, porque el enlace entre B y C an est intacto.

  Pero espere un momento. Si A puede hablar con C y C puede an hablar
  con B, por qu no puede A encaminar sus datagramas para B a travs de
  C y dejar que C se los mande a B? Este es exactamente el tipo de
  problema para el que fueron diseados los protocolos de encaminamiento
  dinmico como RIP. Si cada uno de los encaminadores A, B y C est
  ejecutando el demonio de encaminamiento, entonces sus tablas deberan
  ser ajustadas automticamente para reflejar el nuevo estado de la red
  si alguno de los enlaces falla. Configurar tal red es sencillo. En
  cada encaminador slo necesita hacer dos cosas. En este caso, para el
  Encaminador A:



       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# /usr/sbin/routed




  El demonio de encaminamiento routed encuentra automticamente todos
  los puertos de red activos cuando comienza y busca mensajes en cada
  uno de los dispositivos de red para poder determinar y poner al da la
  tabla de encaminamiento en el host.

  sta ha sido una explicacin muy concisa del encaminamiento dinmico y
  de dnde podra usarlo. Si quiere ms informacin, tendr que acudir a
  las referencias listadas al principio del documento.

  Los puntos importantes relacionados con el encaminamiento dinmico
  son:


  1. Slo necesita ejecutar un protocolo de encaminamiento dinmico
     cuando su mquina Linux tenga la posibilidad de elegir entre
     mltiples caminos para llegar a un destino.

  2. El demonio de encaminamiento dinmico modificar automticamente la
     tabla de encaminamiento para ajustarla a los cambios en la red.

  3. RIP es adecuado para redes de tamao pequeo y medio.


  5.8.  Configuracin de los servidores de red y los servicios.


  Los servidores de red y los servicios son aquellos programas que
  permiten a un usuario remoto hacer uso de su mquina Linux. Los
  programas servidores escuchan en los puertos de red. Los puertos de
  red son el medio de llegar a un servicio en particular en una mquina
  en particular, y es as como un servidor conoce la diferencia entre
  una conexin telnet y otra de FTP que le lleguen. El usuario remoto
  establece una conexin de red con la mquina, y el programa servidor,
  el demonio de red que est escuchando en ese puerto, aceptar la
  conexin y se ejecutar. Hay dos modos de operacin para los demonios
  de red. Ambos se usan por igual en la prctica. Las dos maneras son:



     autnomo (standalone)
        el programa demonio de red escucha en el puerto de red asignado
        y, cuando llega una conexin, se ocupa l mismo de dar el
        servicio de red.


     esclavo del servidor inetd
        el servidor inetd es un demonio de red especial que se
        especializa en controlar las conexiones entrantes. Tiene un
        fichero de configuracin que le dice qu programa debe ser
        ejecutado cuando se reciba una conexin. Cualquier puerto de
        servicio puede ser configurado tanto para el protocolo tcp como
        para udp. Los puertos son descritos en otro fichero del que
        hablaremos dentro de poco.


  Hay dos ficheros importantes que necesitamos configurar. Son el
  fichero /etc/services que asigna nombres a los nmeros de puerto y el
  fichero /etc/inetd.conf que es el fichero de configuracin del demonio
  de red inetd.


  5.8.1.  /etc/services


  El fichero /etc/services es una base de datos sencilla, que asocia un
  nombre que nosotros podamos entender, con un puerto de servicio de la
  mquina.  Su formato es bastante simple. Es un fichero de texto en el
  que cada lnea representa una entrada a la base de datos. Cada entrada
  comprende tres campos separados por cualquier nmero de espacios en
  blanco (espacio o tabulador). Los campos son:



       nombre      puerto/protocolo        sobrenombres     # comentario






     nombre
        una sola palabra que representa el servicio descrito.


     puerto/protocolo
        este campo est dividido en dos subcampos.


     puerto
        un nmero que especifica el nmero de puerto del servicio que
        estar disponible. La mayora de los servicios comunes tienen
        asignados nmeros de servicio, y estn descritos en el RFC-1340.


     protocolo
        este subcampo debe tener como valor tcp o udp.

        Es importante que tenga en cuenta que el servicio 18/tcp es muy
        diferente del 18/udp y que no hay razn tcnica por la cual
        deban existir ambos.  Normalmente prevalece el sentido comn, y
        slo ver una entrada tcp y otra udp para el mismo servicio si
        es que est disponible para ambos.


     sobrenombres
        (o alias) otros nombres que pueden usarse para referirse a esta
        entrada de servicio.


  Cualquier texto que aparezca en una lnea despus de un caracter # es
  ignorado y se trata como un comentario.
  5.8.1.1.  Un ejemplo de fichero /etc/services .


  Todas las distribuciones modernas de Linux tienen un buen fichero
  /etc/services. Para el caso de que est montando una mquina desde
  cero, aqu tiene una copia del fichero /etc/services proporcionado por
  una antigua la distribucin Debian http://www.debian.org:



























































  # /etc/services:
  # $Id: services,v 1.3 1996/05/06 21:42:37 tobias Exp $
  #
  # Network services, Internet style
  #
  # Note that it is presently the policy of IANA to assign a single well-known
  # port number for both TCP and UDP; hence, most entries here have two entries
  # even if the protocol doesn't support UDP operations.
  # Updated from RFC 1340, Assigned Numbers (July 1992).  Not all ports
  # are included, only the more common ones.

  tcpmux          1/tcp                           # TCP port service multiplexer
  echo            7/tcp
  echo            7/udp
  discard         9/tcp           sink null
  discard         9/udp           sink null
  systat          11/tcp          users
  daytime         13/tcp
  daytime         13/udp
  netstat         15/tcp
  qotd            17/tcp          quote
  msp             18/tcp                          # message send protocol
  msp             18/udp                          # message send protocol
  chargen         19/tcp          ttytst source
  chargen         19/udp          ttytst source
  ftp-data        20/tcp
  ftp             21/tcp
  ssh             22/tcp                          # SSH Remote Login Protocol
  ssh             22/udp                          # SSH Remote Login Protocol
  telnet          23/tcp
  # 24 - private
  smtp            25/tcp          mail
  # 26 - unassigned
  time            37/tcp          timserver
  time            37/udp          timserver
  rlp             39/udp          resource        # resource location
  nameserver      42/tcp          name            # IEN 116
  whois           43/tcp          nicname
  re-mail-ck      50/tcp                          # Remote Mail Checking Protocol
  re-mail-ck      50/udp                          # Remote Mail Checking Protocol
  domain          53/tcp          nameserver      # name-domain server
  domain          53/udp          nameserver
  mtp             57/tcp                          # deprecated
  bootps          67/tcp                          # BOOTP server
  bootps          67/udp
  bootpc          68/tcp                          # BOOTP client
  bootpc          68/udp
  tftp            69/udp
  gopher          70/tcp                          # Internet Gopher
  gopher          70/udp
  rje             77/tcp          netrjs
  finger          79/tcp
  www             80/tcp          http            # WorldWideWeb HTTP
  www             80/udp                          # HyperText Transfer Protocol
  link            87/tcp          ttylink
  kerberos        88/tcp          kerberos5 krb5  # Kerberos v5
  kerberos        88/udp          kerberos5 krb5  # Kerberos v5
  supdup          95/tcp
  # 100 - reserved
  hostnames       101/tcp         hostname        # usually from sri-nic
  iso-tsap        102/tcp         tsap            # part of ISODE.
  csnet-ns        105/tcp         cso-ns          # also used by CSO name server
  csnet-ns        105/udp         cso-ns
  rtelnet         107/tcp                         # Remote Telnet
  rtelnet         107/udp
  pop-2           109/tcp         postoffice      # POP version 2
  pop-2           109/udp
  pop-3           110/tcp                         # POP version 3
  pop-3           110/udp
  sunrpc          111/tcp         portmapper      # RPC 4.0 portmapper TCP
  sunrpc          111/udp         portmapper      # RPC 4.0 portmapper UDP
  auth            113/tcp         authentication tap ident
  sftp            115/tcp
  uucp-path       117/tcp
  nntp            119/tcp         readnews untp   # USENET News Transfer Protocol
  ntp             123/tcp
  ntp             123/udp                         # Network Time Protocol
  netbios-ns      137/tcp                         # NETBIOS Name Service
  netbios-ns      137/udp
  netbios-dgm     138/tcp                         # NETBIOS Datagram Service
  netbios-dgm     138/udp
  netbios-ssn     139/tcp                         # NETBIOS session service
  netbios-ssn     139/udp
  imap2           143/tcp                         # Interim Mail Access Proto v2
  imap2           143/udp
  snmp            161/udp                         # Simple Net Mgmt Proto
  snmp-trap       162/udp         snmptrap        # Traps for SNMP
  cmip-man        163/tcp                         # ISO mgmt over IP (CMOT)
  cmip-man        163/udp
  cmip-agent      164/tcp
  cmip-agent      164/udp
  xdmcp           177/tcp                         # X Display Mgr. Control Proto
  xdmcp           177/udp
  nextstep        178/tcp         NeXTStep NextStep       # NeXTStep window
  nextstep        178/udp         NeXTStep NextStep       # server
  bgp             179/tcp                         # Border Gateway Proto.
  bgp             179/udp
  prospero        191/tcp                         # Cliff Neuman's Prospero
  prospero        191/udp
  irc             194/tcp                         # Internet Relay Chat
  irc             194/udp
  smux            199/tcp                         # SNMP Unix Multiplexer
  smux            199/udp
  at-rtmp         201/tcp                         # AppleTalk routing
  at-rtmp         201/udp
  at-nbp          202/tcp                         # AppleTalk name binding
  at-nbp          202/udp
  at-echo         204/tcp                         # AppleTalk echo
  at-echo         204/udp
  at-zis          206/tcp                         # AppleTalk zone information
  at-zis          206/udp
  z3950           210/tcp         wais            # NISO Z39.50 database
  z3950           210/udp         wais
  ipx             213/tcp                         # IPX
  ipx             213/udp
  imap3           220/tcp                         # Interactive Mail Access
  imap3           220/udp                         # Protocol v3
  ulistserv       372/tcp                         # UNIX Listserv
  ulistserv       372/udp
  #
  # UNIX specific services
  #
  exec            512/tcp
  biff            512/udp         comsat
  login           513/tcp
  who             513/udp         whod
  shell           514/tcp         cmd             # no passwords used
  syslog          514/udp
  printer         515/tcp         spooler         # line printer spooler
  talk            517/udp
  ntalk           518/udp
  route           520/udp         router routed   # RIP
  timed           525/udp         timeserver
  tempo           526/tcp         newdate
  courier         530/tcp         rpc
  conference      531/tcp         chat
  netnews         532/tcp         readnews
  netwall         533/udp                         # -for emergency broadcasts
  uucp            540/tcp         uucpd           # uucp daemon
  remotefs        556/tcp         rfs_server rfs  # Brunhoff remote filesystem
  klogin          543/tcp                         # Kerberized `rlogin' (v5)
  kshell          544/tcp         krcmd           # Kerberized `rsh' (v5)
  kerberos-adm    749/tcp                         # Kerberos `kadmin' (v5)
  #
  webster         765/tcp                         # Network dictionary
  webster         765/udp
  #
  # From Assigned Numbers:
  #
  #> The Registered Ports are not controlled by the IANA and on most systems
  #> can be used by ordinary user processes or programs executed by ordinary
  #> users.
  #
  #> Ports are used in the TCP [45,106] to name the ends of logical
  #> connections which carry long term conversations.  For the purpose of
  #> providing services to unknown callers, a service contact port is
  #> defined.  This list specifies the port used by the server process as its
  #> contact port.  While the IANA can not control use of these ports it
  #> does register or list use of these ports as a convienence to the
  #> community.
  #
  ingreslock      1524/tcp
  ingreslock      1524/udp
  prospero-np     1525/tcp                # Prospero non-privileged
  prospero-np     1525/udp
  rfe             5002/tcp                # Radio Free Ethernet
  rfe             5002/udp                # Actually use UDP only
  bbs             7000/tcp                # BBS service
  #
  #
  # Kerberos (Project Athena/MIT) services
  # Note that these are for Kerberos v4 and are unofficial.  Sites running
  # v4 should uncomment these and comment out the v5 entries above.
  #
  kerberos4       750/udp         kdc     # Kerberos (server) udp
  kerberos4       750/tcp         kdc     # Kerberos (server) tcp
  kerberos_master 751/udp                 # Kerberos authentication
  kerberos_master 751/tcp                 # Kerberos authentication
  passwd_server   752/udp                 # Kerberos passwd server
  krb_prop        754/tcp                 # Kerberos slave propagation
  krbupdate       760/tcp         kreg    # Kerberos registration
  kpasswd         761/tcp         kpwd    # Kerberos "passwd"
  kpop            1109/tcp                # Pop with Kerberos
  knetd           2053/tcp                # Kerberos de-multiplexor
  zephyr-srv      2102/udp                # Zephyr server
  zephyr-clt      2103/udp                # Zephyr serv-hm connection
  zephyr-hm       2104/udp                # Zephyr hostmanager
  eklogin         2105/tcp                # Kerberos encrypted rlogin
  #
  # Unofficial but necessary (for NetBSD) services
  #
  supfilesrv      871/tcp                 # SUP server
  supfiledbg      1127/tcp                # SUP debugging
  #
  # Datagram Delivery Protocol services
  #
  rtmp            1/ddp                   # Routing Table Maintenance Protocol
  nbp             2/ddp                   # Name Binding Protocol
  echo            4/ddp                   # AppleTalk Echo Protocol
  zip             6/ddp                   # Zone Information Protocol
  #
  # Debian GNU/Linux services
  rmtcfg          1236/tcp                # Gracilis Packeten remote config server
  xtel            1313/tcp                # french minitel
  cfinger         2003/tcp                # GNU Finger
  postgres        4321/tcp                # POSTGRES
  mandelspawn     9359/udp        mandelbrot      # network mandelbrot

  # Local services




  En el da a da, este fichero se encuentra en proceso de continuo
  crecimiento segn se van creando nuevos servicios. Si piensa que su
  copia es incompleta, le sugiero que haga una copia del /etc/services
  de una distribucin reciente.


  5.8.2.  /etc/inetd.conf


  /etc/inetd.conf es el fichero de configuracin para el demonio
  servidor inetd. Su funcin es la de almacenar la informacin relativa
  a lo que inetd debe hacer cuando recibe una peticin de conexin a un
  servicio en particular. Para cada servicio que desee que acepte
  conexiones deber decirle a inetd qu demonio servidor de red
  ejecutar, y cmo ha de hacerlo.

  Su formato tambin es relativamente sencillo. Es un fichero de texto
  en el que cada lnea describe un servicio que desee proporcionar.
  Cualquier texto en una lnea que siga a # es ignorado y se considera
  un comentario.  Cada lnea contiene siete campos separados por
  cualquier nmero de espacios en blanco (espacio o tabulador). El
  formato general es el siguiente:



       servicio  tipo_socket  proto  flags  usuario  servidor  argumentos






     servicio
        es el servicio correspondiente a esta configuracin, tomado del
        fichero /etc/services.


     tipo_socket
        describe el tipo de socket que esta entrada considerar
        relevante. Los valores permitidos son: stream, dgram, raw, rdm o
        seqpacket.  Es un poco tcnico por naturaleza, pero por regla
        general casi todos los servicios basados en tcp usan stream, y
        casi todos los basados en udp usan dgram. Slo algunos demonios
        servidores muy particulares usarn otros valores.


     proto
        el protocolo considerado vlido para este servicio. Debera
        corresponder con la entrada apropiada en el fichero
        /etc/services y suele ser tcp o udp.  Los servidores basados en
        Sun RPC (Remote Procedure Call) usarn rpc/tcp o rpc/udp.
     flags
        slo hay dos valores posibles. Este campo le dice a inetd si el
        programa servidor de red libera el socket despus de comenzar la
        ejecucin, y si por tanto inetd podr ejecutar otro servidor
        para la siguiente peticin de conexin, o si inetd deber
        esperar y asumir que el demonio servidor que est ejecutndose
        controlar las nuevas peticiones de conexin. Esto tiene su
        dificultad, pero por norma general todos los servidores tcp
        deberan tener esta entrada con el valor nowait y la mayora de
        servidores udp deberan tener wait.  De todas maneras hay
        algunas excepciones notables, por lo que debera leer la gua de
        ejemplo si no est seguro.


     usuario
        este campo indica qu cuenta de usuario de /etc/passwd ser
        asignada como duea del demonio de red cuando se ejecute. Esto
        es a menudo til si quiere protegerse ante riesgos de seguridad.
        Puede asignar el usuario nobody a una entrada, por lo que si la
        seguridad del servidor de red es traspasada el posible dao
        queda minimizado.  Habitualmente, sin embargo, este campo est
        asignado a root, porque muchos servidores requieren privilegios
        de administrador para funcionar correctamente.


     servidor
        este campo es el camino completo hasta el programa servidor a
        ejecutar para esta entrada.


     argumentos
        este campo comprende el resto de la lnea de rdenes y es
        opcional. Es en donde se pone cualquier argumento de lnea de
        rdenes que desee pasar al programa demonio servidor cuando es
        ejecutado.



  5.8.2.1.  Un ejemplo de /etc/inetd.conf


  Al igual que pasa con el /etc/services, todas las distribuciones
  modernas incluirn un buen fichero /etc/inetd.conf para trabajar con
  l.  Aqu incluyo, como ejemplo, el fichero /etc/inetd.conf de la
  distribucin Debian http://www.debian.org.





















  # /etc/inetd.conf:  see inetd(8) for further informations.
  #
  # Internet server configuration database
  #
  #
  # Modified for Debian by Peter Tobias <tobias@et-inf.fho-emden.de>
  #
  # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
  #
  # Internal services
  #
  #echo           stream  tcp     nowait  root    internal
  #echo           dgram   udp     wait    root    internal
  discard         stream  tcp     nowait  root    internal
  discard         dgram   udp     wait    root    internal
  daytime         stream  tcp     nowait  root    internal
  daytime         dgram   udp     wait    root    internal
  #chargen        stream  tcp     nowait  root    internal
  #chargen        dgram   udp     wait    root    internal
  time            stream  tcp     nowait  root    internal
  time            dgram   udp     wait    root    internal
  #
  # These are standard services.
  #
  telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.telnetd
  ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.ftpd
  #fsp    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.fspd
  #
  # Shell, login, exec and talk are BSD protocols.
  #
  shell   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd
  login   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind
  #exec   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rexecd
  talk    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.talkd
  ntalk   dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.ntalkd
  #
  # Mail, news and uucp services.
  #
  smtp    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.smtpd
  #nntp   stream  tcp     nowait  news    /usr/sbin/tcpd  /usr/sbin/in.nntpd
  #uucp   stream  tcp     nowait  uucp    /usr/sbin/tcpd  /usr/lib/uucp/uucico
  #comsat dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.comsat
  #
  # Pop et al
  #
  #pop-2  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop2d
  #pop-3  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop3d
  #
  # `cfinger' is for the GNU finger server available for Debian.  (NOTE: The
  # current implementation of the `finger' daemon allows it to be run as `root'.)
  #
  #cfinger stream tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.cfingerd
  #finger stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.fingerd
  #netstat        stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/netstat
  #systat stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/ps -auwwx
  #
  # Tftp service is provided primarily for booting.  Most sites
  # run this only on machines acting as "boot servers."
  #
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /boot
  #bootps dgram   udp     wait    root    /usr/sbin/bootpd        bootpd -i -t 120
  #
  # Kerberos authenticated services (these probably need to be corrected)
  #
  #klogin         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k
  #eklogin        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k -x
  #kshell         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd -k
  #
  # Services run ONLY on the Kerberos server (these probably need to be corrected)
  #
  #krbupdate      stream tcp      nowait  root    /usr/sbin/tcpd  /usr/sbin/registerd
  #kpasswd        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/kpasswdd
  #
  # RPC based services
  #
  #mountd/1       dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.mountd
  #rstatd/1-3     dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rstatd
  #rusersd/2-3    dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rusersd
  #walld/1        dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rwalld
  #
  # End of inetd.conf.
  ident           stream  tcp     nowait  nobody  /usr/sbin/identd        identd -i





  5.9.  Otros ficheros de configuracin relacionados con la red


  Hay varios ficheros miscelneos relacionados con la configuracin de
  la red en Linux por los que podra estar interesado. Nunca debera
  tener que modificar estos ficheros, pero merece la pena describirlos
  para que sepa lo que contienen y para qu son.


  5.9.1.  /etc/protocols


  El fichero /etc/protocols es una base de datos que correlaciona
  nmeros de identificacin de protocolos con sus nombres. Esto lo usan
  los programadores para especificar protocolos por su nombre en sus
  programas y tambin por programas como tcpdump para mostrar nombres en
  lugar de nmeros en su salida. En general la sintaxis del fichero es:



       nombredelprotocolo  nmero  sobrenombres




  El fichero /etc/protocols proporcionado con la distribucin Debian
  http://www.debian.org es como sigue:

















  # /etc/protocols:
  # $Id: protocols,v 1.1 1995/02/24 01:09:41 imurdock Exp $
  #
  # Internet (IP) protocols
  #
  #       from: @(#)protocols     5.1 (Berkeley) 4/17/89
  #
  # Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992).

  ip      0       IP              # internet protocol, pseudo protocol number
  icmp    1       ICMP            # internet control message protocol
  igmp    2       IGMP            # Internet Group Management
  ggp     3       GGP             # gateway-gateway protocol
  ipencap 4       IP-ENCAP        # IP encapsulated in IP (officially IP)
  st      5       ST              # ST datagram mode
  tcp     6       TCP             # transmission control protocol
  egp     8       EGP             # exterior gateway protocol
  pup     12      PUP             # PARC universal packet protocol
  udp     17      UDP             # user datagram protocol
  hmp     20      HMP             # host monitoring protocol
  xns-idp 22      XNS-IDP         # Xerox NS IDP
  rdp     27      RDP             # "reliable datagram" protocol
  iso-tp4 29      ISO-TP4         # ISO Transport Protocol class 4
  xtp     36      XTP             # Xpress Tranfer Protocol
  ddp     37      DDP             # Datagram Delivery Protocol
  idpr-cmtp       39      IDPR-CMTP       # IDPR Control Message Transport
  rspf    73      RSPF            # Radio Shortest Path First.
  vmtp    81      VMTP            # Versatile Message Transport
  ospf    89      OSPFIGP         # Open Shortest Path First IGP
  ipip    94      IPIP            # Yet Another IP encapsulation
  encap   98      ENCAP           # Yet Another IP encapsulation





  5.9.2.  /etc/networks


  El fichero /etc/networks tiene una funcin similar a la del fichero
  /etc/hosts. Proporciona una base de datos sencilla de nombres de red y
  direcciones de red. Su formato difiere en que slo puede haber dos
  campos por lnea y los campos estn codificados as:



       nombredelared direccindered




  Un ejemplo podra ser:



       loopnet    127.0.0.0
       localnet   192.168.0.0
       amprnet    44.0.0.0




  Cuando use rdenes como route, si un destino es una red y la red tiene
  una entrada en el fichero /etc/networks entonces route mostrar el
  nombre de la red en lugar de su direccin.

  5.10.  Seguridad en la red y control de acceso.


  Djeme empezar esta seccin advirtiendo que la seguridad de su mquina
  y red ante ataques maliciosos es un arte complejo. No me considero un
  experto en este campo y aunque los mecanismos que voy a describir
  puedan ayudar, si quiere tomarse en serio la seguridad entonces le
  recomiendo que investigue un poco en el tema. Hay algunas buenas
  referencias en Internet relacionadas con la seguridad, incluido el
  Security HOWTO (Dispone de una  traduccin en
  http://www.insflug.org/documentos/Seguridad-Como/.

  Una regla general importante es: No ejecute servicios que no tenga
  intencin de usar'.  Muchas distribuciones vienen configuradas con
  todo tipo de servicios que se inician automticamente. Para asegurar
  un nivel mnimo de seguridad debera examinar el fichero
  /etc/inetd.conf y comentar (poner un # al inicio de la lnea) de toda
  declaracin de servicio que no vaya a usar. Buenos candidatos son:
  shell, exec, uucp, ftp y servicios de informacin como finger, netstat
  y systat.

  Hay todo tipo de mecanismos de seguridad y control de acceso,
  describir los ms elementales.


  5.10.1.  /etc/ftpusers


  El fichero /etc/ftpusers es un mecanismo sencillo que le permite
  denegar la entrada a ciertos usuarios mediante FTP. El fichero
  /etc/ftpusers lo lee el programa demonio de FTP (ftpd) cuando se
  recibe una conexin FTP. El fichero es una simple lista de aquellos
  usuarios que no tienen permitido el acceso. Puede parecerse a esto:



       # /etc/ftpusers - users not allowed to login via ftp
       root
       uucp
       bin
       mail





  5.10.2.  /etc/securetty


  El fichero /etc/securetty permite especificar qu dispositivos tty
  puede usar root para identificarse en el sistema. El fichero
  /etc/securetty es ledo por el programa de acceso (normalmente
  /etc/login). Su formato es una lista de los nombres de dispositivos
  tty permitidos, en todos los dems root tiene prohibida la entrada:



       # /etc/securetty - tty's on which root is allowed to login
       tty1
       tty2
       tty3
       tty4




  5.10.3.  El mecanismo de control de acceso hosts  de tcpd


  El programa tcpd que ha visto listado en el fichero /etc/inetd.conf
  proporciona mecanismos de control de registro y acceso a los servicios
  que haya de proteger.

  Cuando es invocado por el programa inetd lee dos ficheros que
  contienen reglas de acceso y que permiten o deniegan acceso al
  servidor que est protegiendo.

  Mirar en los ficheros de reglas hasta que encuentre la primera
  correspondencia. Si no se encuentran correspondencias asume que el
  acceso debera estar permitido para todo el mundo. La secuencia de
  archivos que revisa es: /etc/hosts.allow, /etc/hosts.deny. Describir
  cada uno de estos en seguida. Para una descripcin completa de este
  servicio debera referirse a las pginas del manual apropiadas
  (hosts_access (5) es un buen punto de partida).


  5.10.3.1.  /etc/hosts.allow


  El /etc/hosts.allow es un fichero de configuracin del programa
  /usr/sbin/tcpd. El fichero hosts.allow contiene reglas que describen
  qu mquinas tienen permiso para acceder a un servicio en la suya.

  El formato del fichero es bastante sencillo:



       # /etc/hosts.allow
       #
       # <lista de servicios>: <lista de hosts> [: orden]






     lista de servicios
        es una lista delimitada por comas de nombres de servidores a los
        que se aplica esta regla.  Ejemplos de nombre de servicio son:
        ftpd, telnetd y fingerd.


     lista de hosts
        es una lista de nombres de mquinas, delimitada por comas. Aqu
        tambin puede usar direcciones IP. De forma adicional, puede
        especificar nombres de mquinas o direcciones usando caracteres
        comodn para corresponder con grupos de mquinas. Por ejemplo:
        gw.vk2ktj.ampr.org para una mquina especfica, .uts.edu.au para
        cualquier nombre de mquina que acabe en esa cadena, 44. para
        cualquier direccin IP que comience con esos dgitos. Hay
        algunas palabras especiales para simplificar la configuracin,
        algunas de las cuales son:


       ALL, que se corresponde con cualquier host.

       LOCAL se corresponde con cualquier nombre de host que no
        contenga un . o sea que est en el mismo dominio que su mquina;

       PARANOID se corresponde con cualquier nombre que no se
        corresponda con esta direccin (name spoofing). Hay una ltima
        palabra que tambin es til.  La palabra
       EXCEPT permite proporcionar una lista con excepciones. Esto lo
        cubriremos en un captulo posterior.


     orden
        es un parmetro opcional. Este parmetro es el camino completo
        hasta una orden que debera ser ejecutada cada vez que se cumpla
        esta regla. Podra por ejemplo ejecutar una instruccin que
        intentase identificar quin est autenticado en el host que
        conecta, o generar un mensaje de correo u otro tipo de alerta a
        un administrador de sistema avisando de que alguien intenta
        conectar. Hay cierto nmero de expansiones que podramos
        incluir, algunos ejemplos comunes son: %h se expande al nombre
        de la mquina que se conecta o a su direccin si no tiene un
        nombre, %d es el demonio que est siendo llamado.


  Un ejemplo:



       # /etc/hosts.allow
       #
       # Permitir correo a todo el mundo
       in.smtpd: ALL
       # Todo telnet y FTP slo a hosts dentro de mi dominio y el host que tengo
       # en caso
       telnetd, ftpd: LOCAL, myhost.athome.org.au
       # Permitir finger a cualquiera pero mantener un registro de quin es.
       fingerd: ALL: (finger @%h | mail -s "finger desde %h" root)





  5.10.3.2.  /etc/hosts.deny


  El fichero /etc/hosts.deny es un fichero de configuracin del programa
  /usr/sbin/tcpd. El fichero hosts.deny contiene reglas que describen
  qu mquinas tienen prohibido el acceso a un servicio en su mquina.

  Un ejemplo simple podra parecerse a esto:



       # /etc/hosts.deny
       #
       # Desautorizar a todos los host con nombre sospechoso
       ALL: PARANOID
       #
       # Desautorizar a todos los host.
       ALL: ALL




  La entrada PARANOID es redundante porque la otra entrada abarca todo
  en cualquier caso. Ambas entradas seran razonables por defecto
  dependiendo de sus requisitos particulares.

  La configuracin ms segura es tener ALL: ALL por defecto en
  /etc/hosts.deny para despus dar permiso especficamente a aquellos
  servicios y hosts que se desee en /etc/hosts.allow.


  5.10.4.  /etc/hosts.equiv


  El fichero hosts.equiv se usa para garantizar a ciertos hosts y
  usuarios derechos de acceso a cuentas en su mquina sin que tenga que
  proporcionar una clave. Esto es til en un entorno seguro donde
  controle todas las mquinas, pero en otro caso es un peligro para la
  seguridad. Su mquina es slo tan segura como la menos segura de
  aquellas en las que confe.  Para maximizar la seguridad, no use este
  mecanismo, y anime a sus usuarios para que tampoco usen ficheros
  .rhost.


  5.10.5.  Configure su demonio de ftp adecuadamente.


  Muchos servidores estarn interesados en ejecutar un demonio de FTP
  annimo para permitir a otras personas que subir y descargar ficheros
  sin necesidad de un userid especfico. Si decide ofrecer este servicio
  asegrese de que configura el demonio de ftp apropiadamente para
  acceso annimo. La mayora de las pginas de ftpd(8) describen cmo
  hacerlo.  Debera asegurarse siempre de que sigue estas instrucciones.
  Una cosa importante es no usar una copia de su fichero /etc/passwd
  habitual en el directorio /etc de la cuenta annima; asegrese de que
  elimina todos los detalles sobre las cuentas excepto aquellos que deba
  tener, ya que en otro caso ser vulnerable a las tcnicas de
  adquisicin de claves por fuerza bruta.


  5.10.6.  Cortafuegos para redes.


  Un excelente medio de seguridad es no permitir que los datagramas
  lleguen siquiera a su mquina o servidores. Esto lo cubre en
  profundidad el http://www.insflug.org/documentos/Cortafuegos-Como/ y,
  ms concisamente, la ltima seccin de este documento.


  5.10.7.  Otras sugerencias.


  Hay otras sugerencias, que debera considerar, pero que realmente son
  cuestin de cada uno.



     sendmail
        a pesar de su popularidad, el demonio sendmail aparece con
        preocupante regularidad en los anuncios de alerta de seguridad.
        Usted decides, pero yo elijo no ejecutarlo.


     NFS y otros servicios Sun RPC
        tenga cuidado con estos. Hay todo tipo de posibles formas de
        explotar estos servicios. Es difcil de encontrar una opcin a
        los servicios NFS, y si decide usarlos, asegrese de que es
        cuidadoso con los permisos que da al configurarlo.



  6.  Informacin relacionada con IP y Ethernet


  Esta seccin cubre la informacin especfica a Ethernet e IP. Estas
  subsecciones han sido agrupadas juntas debido a que pienso que son las
  ms interesante dentro de la que previamente se llam seccin de
  Tecnologa Especfica. Cualquiera que tenga una LAN se beneficiar
  de esta parte.


  6.1.  Ethernet


  Los dispositivos Ethernet son eth0, eth1, eth2, etc.  A la primera
  tarjeta detectada por el ncleo se le asigna eth0 y al resto se les
  asigna secuencialmente en el orden en que sean detectadas.

  Por defecto, el ncleo de Linux slo intenta buscar una tarjeta de
  red, por lo que tendr que pasarle algunos parmetros para forzar la
  deteccin de las dems.

  Para aprender cmo hacer trabajar una tarjeta Ethernet bajo Linux
  debera acudir al Ethernet Howto, Ethernet-HOWTO.html.

  Una vez que tenga el ncleo compilado para reconocer su tarjeta
  Ethernet, configurar la tarjeta es sencillo.

  Normalmente debera hacer algo como:



       root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
       root# route add -net 192.168.0.0 netmask 255.255.255.0 eth0




  La mayora de los controladores Ethernet fueron desarrollados por
  Donald Becker, becker@CESDIS.gsfc.nasa.gov.


  6.2.  EQL - ecualizador de trfico para lneas mltiples


  El nombre del dispositivo EQL es eql. Con las fuentes estndar del
  ncleo slo podr tener un dispositivo EQL por mquina. EQL
  proporciona un medio para utilizar mltiples lneas punto a punto como
  un solo enlace PPP, slip o PLIP lgico para llevar tcp/ip. A menudo es
  ms barato usar varias lneas de baja velocidad que tener una sola
  lnea de alta velocidad.

  Opciones de Compilacin del Ncleo:



       Network device support  --->
         [*] Network device support
         <*> EQL (serial line load balancing) support





  Para poder usar este mecanismo la mquina en el otro extremo de la
  lnea debe admitirlo tambin. Linux, Livingstone Portmasters y los
  nuevos servidores dial-in soportan servicios compatibles.

  Para configurar EQL necesitar las herramientas eql que estn
  disponibles en
  ftp://metalab.unc.edu/pub/linux/system/Serial/eql-1.2.tar.gz.


  La configuracin es bastante directa. Se comienza por la interfaz eql.
  La interfaz es exactamente como la de cualquier otro dispositivo de
  red. La direccin IP y mtu se configura usando ifconfig, con algo
  como:



       root# ifconfig eql 192.168.10.1 mtu 1006




  Lo siguiente que se necesita es iniciar manualmente cada una de las
  lneas que se vayan a usar. Esta puede ser cualquier combinacin de
  dispositivos de red punto a punto. Cmo iniciar las conexiones depende
  del tipo de enlace que sea, por lo que ha de mirar las secciones
  apropiadas para ms informacin.

  Finalmente necesitar asociar el enlace serie con el dispositivo EQL,
  esto se llama esclavizar y se hace con la orden eql_enslave como se
  ve en el ejemplo:



       root# eql_enslave eql sl0 28800
       root# eql_enslave eql ppp0 14400




  El parmetro velocidad estimada que se da a eql_enslave no hace nada
  directamente. Lo usa el controlador (driver) EQL para determinar qu
  parte de los datagramas va a recibir cada dispositivo, para as afinar
  el balance de las lneas jugando con este valor.

  Para disociar una lnea de un dispositivo EQL use eql_emancipate de
  esta manera:



       #root eql_emancipate eql sl0




  Puede aadir rutas de la misma manera que para cualquier otro enlace
  punto a punto, excepto en que las rutas deben referirse al dispositivo
  eql en lugar de a los verdaderos dispositivos en serie. Normalmente
  usar:



       root# route add default eql




  El controlador EQL fue desarrollado por Simon Janes, simon@ncm.com.


  6.3.  IP Accounting (en Linux 2.0)


  Los servicios de auditora IP del ncleo de Linux le permiten
  recolectar y analizar datos de uso de la red. Los datos recogidos
  comprenden el nmero de paquetes y de bytes acumulados desde que se
  puso a cero la ltima vez.  Tiene a su disposicin varias reglas para
  categorizar estas cifras para que se ajusten a los propsitos que les
  vaya a dar. Esta opcin ha sido eliminada del ncleo a partir de la
  versin 2.1.102, porque el viejo sistema de cortafuegos basado en
  ipfwadm fue reemplazado por ipfwchains.

  Opciones de Compilacin del Ncleo:



       Networking options  --->
         [*] IP: accounting





  Despus de que haya compilado e instalado el ncleo necesitar hacer
  uso de la orden ipfwadm para configurar la auditora de IP. Hay muchas
  maneras diferentes de obtener la informacin de auditora para elegir.
  He creado un ejemplo sencillo de lo que podra ser til, pero debera
  leer la pgina de manual de ipfwadm para obtener ms informacin.

  Escena: Tenemos una red Ethernet que accede a la Internet mediante un
  enlace PPP. En la Ethernet tiene una mquina que ofrece cierta
  variedad de servicios y est interesado en saber cunto trfico se
  genera por cada conexin ftp y http, as como el trfico total tcp y
  udp.

  Podras usar un conjunto de rdenes que se pareciese a lo siguiente,
  que se presenta como guin de ejecucin de rdenes (shell script):



































  #!/bin/sh
  #
  # Borrar las reglas de contabilidad
  ipfwadm -A -f
  #
  # Establecer macros
  localnet=44.136.8.96/29
  any=0/0
  # Agregar reglas para los segmentos de la red local
  ipfwadm -A in  -a -P tcp -D $localnet ftp-data
  ipfwadm -A out -a -P tcp -S $localnet ftp-data
  ipfwadm -A in  -a -P tcp -D $localnet www
  ipfwadm -A out -a -P tcp -S $localnet www
  ipfwadm -A in  -a -P tcp -D $localnet
  ipfwadm -A out -a -P tcp -S $localnet
  ipfwadm -A in  -a -P udp -D $localnet
  ipfwadm -A out -a -P udp -S $localnet
  #
  # Reglas por defecto
  ipfwadm -A in  -a -P tcp -D $any ftp-data
  ipfwadm -A out -a -P tcp -S $any ftp-data
  ipfwadm -A in  -a -P tcp -D $any www
  ipfwadm -A out -a -P tcp -S $any www
  ipfwadm -A in  -a -P tcp -D $any
  ipfwadm -A out -a -P tcp -S $any
  ipfwadm -A in  -a -P udp -D $any
  ipfwadm -A out -a -P udp -S $any
  #
  # Mostrar las reglas
  ipfwadm -A -l -n
  #




  Los nombres ftp-data y www se refieren a lneas en /etc/services. La
  ltima orden da una lista de cada una de las reglas de auditora y
  muestra los totales obtenidos.

  Una cosa importante a tener en cuenta cuando analizamos IP accounting
  es que los totales de todas las reglas que se han cumplido se han
  incrementado, por tanto para obtener las diferencias tendr que hacer
  los clculos apropiados. Por ejemplo, si quiero saber cuantos datos no
  fueron de ftp, ni www restar los totales individuales de la regla que
  se corresponde con todos los puertos.





















  root# ipfwadm -A -l -n
  IP accounting rules
   pkts bytes dir prot source               destination          ports
      0     0 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 20
      0     0 out tcp  44.136.8.96/29       0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 80
     10   572 out tcp  44.136.8.96/29       0.0.0.0/0            80 -> *
    252 10943 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> *
    231 18831 out tcp  44.136.8.96/29       0.0.0.0/0             * -> *
      0     0 in  udp  0.0.0.0/0            44.136.8.96/29       * -> *
      0     0 out udp  44.136.8.96/29       0.0.0.0/0            * -> *
      0     0 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 20
      0     0 out tcp  0.0.0.0/0            0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 80
     10   572 out tcp  0.0.0.0/0            0.0.0.0/0            80 -> *
    253 10983 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> *
    231 18831 out tcp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 in  udp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 out udp  0.0.0.0/0            0.0.0.0/0            * -> *





  6.4.  IP Accounting (en Linux 2.2)


  El nuevo cdigo para llevar la contabilidad se accede mediante IP
  Firewall Chains. Consulte la pgina principal de IP chains
  http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html si
  desea ms informacin. Entre otras cosas, necesitar usar ipchains en
  lugar de ipfwadm para configurar sus filtros. (De
  Documentation/Changes en las ltimas fuentes del ncleo)


  6.5.  IP Aliasing


  Hay algunas aplicaciones para las que es til ser capaz de asignar
  varias direcciones IP a un slo dispositivo de red. Los Proveedores de
  Servicios de Internet usan esto a menudo para ofertar a sus usuarios
  WWW y FTP a medida.  Puede acudir al IP-Alias mini-HOWTO si quiere
  obtener ms informacin de la que aqu hay.

  Opciones de Compilacin del Ncleo:



       Networking options  --->
          ....
          [*] Network aliasing
          ....
          <*> IP: aliasing support




  Despus de compilar e instalar su ncleo con la implementacin de
  IP_Alias, la configuracin es muy sencilla. Los alias se aaden a
  dispositivos de red virtuales asociados al verdadero dispositivo de
  red.  Se aplica una convencin sencilla para dar nombres a estos
  dispositivos, que es <nombredisp>:<nm disp virtual>, por ejemplo
  eth0:0, ppp0:10, etc. Tenga en cuenta que dispositivo nombre:nmero
  slo se puede configurar despus de haber activado la interfaz
  principal.

  Por ejemplo, asumiremos que tiene una red Ethernet que soporta dos
  redes IP diferentes simultneamente y quiere que tu mquina tenga
  acceso directo a ambas. Podramos hacer algo como:



       root# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0

       root# ifconfig eth0:0 192.168.10.1 netmask 255.255.255.0 up
       root# route add -net 192.168.10.0 netmask 255.255.255.0 eth0:0




  Para borrar un alias sencillamente aadimos un `-' al final de su
  nombre y nos referimos a l de forma tan sencilla como:



       root# ifconfig eth0:0- 0




  Tambin sern borradas automticamente todas las rutas asociadas con
  ese alias.


  6.6.  IP Firewall (para Linux 2.0)


  Los temas referentes a Cortafuegos IP y al trabajo con Cortafuegos
  est cubierto en mayor profundidad en el
  http://www.insflug.org/documentos/Cortafuegos-Como/. Tener un
  Cortafuegos IP le permite asegurar su mquina frente a accesos por la
  red no autorizados filtrando o permitiendo que entren datagramas de o
  hacia las direcciones IP que sean designadas. Hay tres clases
  diferentes de reglas, filtrado de entradas (incoming filtering),
  filtrado de salidas (outgoing filtering) y filtrado de reenvos
  (forwarding filtering).  Las reglas de entradas son aplicadas a los
  datagramas recibidos en un dispositivo de red. Las reglas de salidas
  se aplican a los datagramas que va a transmitir un dispositivo de red.
  Las reglas de reenvos se aplican a datagramas que se reciben pero que
  no son para esta mquina, como por ejemplo datagramas que entran por
  una interfaz para ser encaminados por otra.

  Opciones de Compilacin del Ncleo:



       Networking options  --->
         [*] Network firewalls
         ....
         [*] IP: forwarding/gatewaying
         ....
         [*] IP: firewalling
         [ ] IP: firewall packet logging




  La configuracin de las reglas del cortafuegos IP se realiza usando la
  orden ipfwadm. Como mencion antes, yo no soy un experto en seguridad,
  por lo aunque le voy a presentar un ejemplo que se puede usar, usted
  debera investigar y desarrollar sus propias reglas si la seguridad es
  algo que le importe.

  El uso ms comn de los cortafuegos IP es probablemente cuando est
  usando su mquina Linux como encaminador y pasarela (gateway)
  cortafuegos para proteger tu red local de accesos sin autorizacin
  desde fuera de la red.

  La configuracin siguiente est basada en una contribucin de Arnt
  Gulbrandsen, agulbra@troll.no.

  El ejemplo describe la configuracin de las reglas de cortafuegos en
  la mquina cortafuegos/encaminadora ilustrada en este diagrama.



       -                                   -
        \                                  | 172.16.37.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |  172.16.174.30 | Linux |      |
       NET =================|  f/w  |------|    ..37.19
           |    PPP         | router|      |  --------
          /                 ---------      |--| Mail |
         /                                 |  | /DNS |
        /                                  |  --------
       -                                   -




  Las rdenes que siguen, deberan normalmente estar situadas en un
  fichero rc de manera que sean ejecutadas automticamente cada vez que
  el sistema reinicie. Para mayor seguridad deberan ser llamadas
  despus de que ser configuradas las interfaces de red, pero antes de
  que las interfaces hayan sido puestas en marcha para prevenir
  cualquier intento de acceder mientras la mquina cortafuegos est
  reiniciando.





























  #!/bin/sh

  # Limpiar la tabla de reglas de 'Reenvos'
  # Cambiar la poltica por defecto a 'accept'
  #
  /sbin/ipfwadm -F -f
  /sbin/ipfwadm -F -p accept
  #
  # .. y lo mismo para 'Entradas'
  #
  /sbin/ipfwadm -I -f
  /sbin/ipfwadm -I -p accept

  # Antes que nada, sellamos la interfaz PPP
  # Me encantara usar '-a deny' en lugar de '-a reject -y' pero entonces
  # sera imposible originar conexiones desde ese interfaz.
  # El -o causa que todos los datagramas rechazados sean registrados. Esto
  # toma espacio de disco a cambio de tener el conocimiento de un ataque
  # por error de configuracin.
  #
  /sbin/ipfwadm -I -a reject -y -o -P tcp -S 0/0 -D 172.16.174.30

  # Eliminar ciertos tipos de paquetes que obviamente han sido generados
  # de forma 'artificial': No puede venir nada de direcciones
  # multicast/anycast/broadcast
  #
  /sbin/ipfwadm -F -a deny -o -S 224.0/3 -D 172.16.37.0/24
  #
  # y nunca deberamos ver llegar por un cable nada de la red
  # 'loopback'
  #
  /sbin/ipfwadm -F -a deny -o -S 127.0/8 -D 172.16.37.0/24

  # aceptamos entradas de las conexiones SMTP y DNS, pero slo
  # hacia el Mail/Name Server
  #
  /sbin/ipfwadm -F -a accept -P tcp -S 0/0 -D 172.16.37.19 25 53
  #
  # DNS usa tanto UPD como TCP, por lo tanto los permitimos ambos
  # para quien pregunte por nuestro servidor de nombres
  #
  /sbin/ipfwadm -F -a accept -P udp -S 0/0 -D 172.16.37.19 53
  #
  # pero no "respuestas" que lleguen a puertos peligrosos como el de NFS
  # y extensiones de NFS de Larry McVoy. Si ejecutamos squid, aadir
  # su puerto aqu tambin.
  #
  /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 53 \
  -D 172.16.37.0/24 2049 2050

  # valen las respuestas a otros puertos de usuario
  #
  /sbin/ipfwadm -F -a accept -P udp -S 0/0 53 \
          -D 172.16.37.0/24 53 1024:65535

  # Rechazar conexiones de entrada a identd Usaremos 'reject' aqu para que
  # se le diga al ordenador que intenta conectar que no contine, si no lo
  # hiciramos, experimentaramos retrasos mientras ident da un error de
  # 'time out'
  #
  /sbin/ipfwadm -F -a reject -o -P tcp -S 0/0 -D 172.16.37.0/24 113

  # Aceptamos algunas conexiones a servicios comunes desde las redes
  # 192.168.64 y 192.168.65, que son amistades en las que confiamos.
  #
  /sbin/ipfwadm -F -a accept -P tcp -S 192.168.64.0/23 \
         -D 172.16.37.0/24 20:23

  # aceptar y dejar pasar cualquier cosa que se origine dentro
  #
  /sbin/ipfwadm -F -a accept -P tcp -S 172.16.37.0/24 -D 0/0

  # denegar la mayora del resto de conexiones TCP y registrarlas
  # (aade 1:1023 si tiene problemas con el FTP)
  #
  /sbin/ipfwadm -F -a deny -o -y -P tcp -S 0/0 -D 172.16.37.0/24

  # ... para UDP tambin
  #
  /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 -D 172.16.37.0/24




  Las buenas configuraciones de cortafuegos son un poco complicadillas.
  Este ejemplo debera ser un punto de partida razonable. La pgina de
  manual de ipfwadm ofrece ms asistencia en lo que respecta al manejo
  de la herramienta. Si intenta configurar un cortafuegos, asegrese de
  que hace suficientes preguntas para tener informacin de las fuentes
  que considera fiables y haga algunas pruebas de funcionamiento con su
  configuracin desde el exterior de la red.


  6.7.  IP Firewall (para Linux 2.2)


  Al nuevo cdigo para controlar el cortafuegos se accede mediante IP
  Firewall Chains. Consulte la pgina principal de IP Chains
  http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html si
  desea ms informacin. Entre otras cosas, necesitar usar ipchains en
  lugar de ipfwadm para configurar sus filtros.  (De
  Documentation/Changes en las ltimas fuentes del ncleo)

  Estamos avisados de que esto est seguramente desfasado y estamos
  trabajando para tener esta seccin ms al da. Es posible que tengamos
  una versin nueva para agosto de 1999.


  6.8.  Encapsulacin IPIP


  Qu razn hay para encapsular datagramas IP dentro de datagramas IP?
  Le parecer una tontera si nunca ha visto antes sus aplicaciones.
  Bien, aqu tenemos un par de ejemplos comunes en los que se usa:
  Mobile-IP e IP-Multicast.  Posiblemente su uso ms extendido o al
  menos el mejor conocido es Amateur Radio.

  Opciones de Compilacin del Ncleo:



           Networking options  --->
               [*] TCP/IP networking
               [*] IP: forwarding/gatewaying
               ....
               <*> IP: tunneling




  Los dispositivos tneles de IP se denominan tunl0, tunl1, etc.

  Pero por qu?. Bien, bien. Las reglas convencionales de
  encaminamiento de redes IP comprenden direcciones de red y mscaras de
  red. Esto hace que conjuntos de direcciones contiguas sean encaminadas
  mediante una sola regla de encaminamiento. Esto es muy conveniente,
  pero significa que slo puede usar una direccin IP en particular
  cuando est conectado a alguna parte de la red a la que pertenece.  En
  la mayora de los casos esto vale, pero si suele desplazarse entonces
  no ser capaz siempre de conectar desde el mismo sitio. La
  encapsulacin IP/IP (IP tunneling) le permite saltarse esta
  restriccin permitiendo que los datagramas que estn destinados a su
  direccin IP sean encapsulados y dirigidos a otra direccin IP. Si
  sabe que va a estar durante un tiempo trabajando en otra red IP
  entonces podr poner a punto una mquina de su red habitual para que
  acepte los datagramas que van dirigidos a su IP y que los reenve a la
  direccin que est usando de manera temporal.


  6.8.1.  Una configuracin de red con tneles




        192.168.1/24                          192.168.2/24

            -                                     -
            |      ppp0 =            ppp0 =       |
            |  aaa.bbb.ccc.ddd  fff.ggg.hhh.iii   |
            |                                     |
            |   /-----\                 /-----\   |
            |   |     |       //        |     |   |
            |---|  A  |------//---------|  B  |---|
            |   |     |     //          |     |   |
            |   \-----/                 \-----/   |
            |                                     |
            -                                     -




  El diagrama ilustra otra posible razn para usar encapsulacin IPIP,
  las redes privadas virtuales. Este ejemplo presupone que tiene dos
  mquinas cada una con una sola conexin ppp a Internet. Cada mquina
  tiene una sola direccin IP. Tras cada una de estas mquinas hay
  algunas redes privadas de rea local configuradas con direcciones de
  red IP reservadas.  Supongamos que quiere permitir que cualquier
  mquina en la red A se conecte con cualquier mquina en la red B, como
  si estuvieran conectadas a Internet por una ruta de red. La
  encapsulacin IP se lo permitir. Tenga en cuenta que la encapsulacin
  no resuelve el problema de cmo hacer que las mquinas las redes A y B
  se comuniquen con otras mquinas en Internet, ya que para seguimos
  necesitando trucos como el Enmascaramiento IP.  La encapsulacin la
  realiza normalmente una mquina que est funcionando como encaminador.

  El encaminador Linux A debera configurarse as:












  #!/bin/sh
  PATH=/sbin:/usr/sbin
  mask=255.255.255.0
  remotegw=fff.ggg.hhh.iii
  #
  # Configuracin Ethernet
  ifconfig eth0 192.168.1.1 netmask $mask up
  route add -net 192.168.1.0 netmask $mask eth0
  #
  # Configuracin ppp0 (iniciar enlace ppp, establecer ruta por defecto)
  pppd
  route add default ppp0
  #
  # Configuracin del dispositivo tnel
  ifconfig tunl0 192.168.1.1 up
  route add -net 192.168.2.0 netmask $mask gw $remotegw tunl0




  El encaminador Linux `B' debera configurarse con:



       #!/bin/sh
       PATH=/sbin:/usr/sbin
       mask=255.255.255.0
       remotegw=aaa.bbb.ccc.ddd
       #
       # Configuracin Ethernet
       ifconfig eth0 192.168.2.1 netmask $mask up
       route add -net 192.168.2.0 netmask $mask eth0
       #
       # Configuracin ppp0 (iniciar enlace PPP, establecer ruta por defecto)
       pppd
       route add default ppp0
       #
       # Configuracin del dispositivo tnel
       ifconfig tunl0 192.168.2.1 up
       route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0




  La orden:



       route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0




  se leera: Enva cualquier datagrama destinado a 192.168.1.0/24 dentro
  de un datagrama IPIP con direccin de destino aaa.bbb.ccc.ddd'.

  Las configuraciones son recprocas en cada extremo. El dispositivo de
  tnel usa el gw dado en la ruta como destino del datagrama IP en el
  que encerrar el datagrama que ha recibido para encaminar.  Esa
  mquina debe saber cmo desencapsular datagramas IPIP, esto es, debe
  tambin estar configurada con un dispositivo tnel.





  6.8.2.  Configuracin de la mquina cuyos paquetes sern encapsulados


  No tiene por qu estar encaminando una red entera. Por ejemplo puede
  estar encapsulando una sola direccin IP. En este caso podra
  configurar el dispositivo tunl en la mquina `remota' con su direccin
  IP y el extremo A usar la mquina encaminadora (y Proxy Arp) en lugar
  encaminar la red a travs del dispositivo tnel. Dibujemos de nuevo y
  modifiquemos apropiadamente nuestra configuracin. Ahora tenemos una
  mquina B que quiere actuar y comportarse como si estuviera conectada
  a Internet y al mismo tiempo fuera parte de una red remota soportada
  por la mquina A:



        192.168.1/24

            -
            |      ppp0 =                ppp0 =
            |  aaa.bbb.ccc.ddd      fff.ggg.hhh.iii
            |
            |   /-----\                 /-----\
            |   |     |       //        |     |
            |---|  A  |------//---------|  B  |
            |   |     |     //          |     |
            |   \-----/                 \-----/
            |                      tambin: 192.168.1.12
            -




  El encaminador Linux A debera configurarse as:



       #!/bin/sh
       PATH=/sbin:/usr/sbin
       mask=255.255.255.0
       remotegw=fff.ggg.hhh.iii
       #
       # Configuracin Ethernet
       ifconfig eth0 192.168.1.1 netmask $mask up
       route add -net 192.168.1.0 netmask $mask eth0
       #
       # Configuracin ppp0 (iniciar enlace ppp, establecer ruta por defecto)
       pppd
       route add default ppp0
       #
       # Configuracin del dispositivo tnel
       ifconfig tunl0 192.168.1.1 up
       route add -host 192.168.1.12 gw $remotegw tunl0
       #
       # Proxy ARP para la mquina remota
       arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub




  El encaminador Linux B debera configurarse as:






  #!/bin/sh
  PATH=/sbin:/usr/sbin
  mask=255.255.255.0
  remotegw=aaa.bbb.ccc.ddd
  #
  # Configuracin ppp0 (iniciar enlace ppp, establecer ruta por
  # defecto)
  pppd
  route add default ppp0
  #
  # Configuracin del dispositivo tnel
  ifconfig tunl0 192.168.1.12 up
  route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0




  Esta clase de configuracin es ms tpica de aplicaciones Mobile-IP,
  donde una mquina quiere moverse por Internet y mantener una nica IP
  fija. Debera leer la seccin Mobile-IP (IP Mvil) si quiere ms
  informacin de cmo se hace esto en la prctica.


  6.9.  Enmascarado IP ( IP Masquerade )


  Mucha gente dispone de una sola cuenta por conexin telefnica para
  conectarse a Internet. Casi todos los que utilizan esa configuracin
  se ve limitado a una sola direccin IP que le da el Proveedor de
  Servicios de Internet. Esto normalmente es bastante para permitir un
  slo acceso completo a la red. El Enmascarado IP es un truco
  inteligente que permite que varias mquinas usen una sola direccin
  IP, haciendo que las otras mquinas se hagan pasar, y de ah el
  trmino de enmascaramiento, por la mquina que realmente tiene la
  conexin. Hay un pequeo defecto y es que el enmascarado funciona casi
  siempre en un slo sentido, y este es que las mquinas enmascaradas
  pueden hacer llamadas, pero no pueden aceptar o recibir llamadas de
  otras mquinas remotas. Esto significa que algunos servicios de red
  como talk no funcionarn y otros como ftp debern ser configurados en
  modo pasivo (PASV) para que funcionen.  Afortunadamente los servicios
  de red ms comunes como telnet, WWW e irc funcionan bien.

  Opciones de Compilacin de Red:



           Code maturity level options  --->
               [*] Prompt for development and/or incomplete code/drivers
           Networking options  --->
               [*] Network firewalls
               ....
               [*] TCP/IP networking
               [*] IP: forwarding/gatewaying
               ....
               [*] IP: masquerading (EXPERIMENTAL)




  Lo normal es que su mquina Linux est usando una lnea slip o PPP
  como si fuera una mquina aislada. Sin embargo, podemos tener adems
  otros dispositivos de red configurados, quiz una ethernet,
  configurada con una de las direcciones de red privadas. Las mquinas
  que van a ser enmascaradas podran estar en esta segunda red. Cada una
  de ellas debera tener asignada la direccin IP del puerto Ethernet de
  la mquina Linux como la pasarela (gateway) por defecto.
  Una configuracin tpica podra ser algo parecido a:



       -                                   -
        \                                  | 192.168.1.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |                | Linux | .1.1 |
       NET =================| masq  |------|
           |    PPP/slip    | router|      |  --------
          /                 ---------      |--| host |
         /                                 |  |      |
        /                                  |  --------
       -                                   -




  Enmascarado con IPFWADM

  Las rdenes ms importantes para esta configuracin son:



       # Ruta de red hacia la Ethernet
       route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       #
       # Ruta por defecto al resto de Internet
       route add default ppp0
       #
       # Hace que todas las mquinas de la red 192.168.1/24 sean
       # enmascarados
       ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0




  Enmascarado con IPCHAINS



       # Ruta de red hacia la Ethernet
       route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       #
       # Ruta por defecto al resto de Internet
       route add default ppp0
       #
       # Hace que todas las mquinas de la red 192.168.1/24 sean
       # enmascarados
       ipchains -A forward -s 192.168.1.0/24 -j MASQ




  Puede obtener ms informacin sobre Enmascarado IP de Linux en la
  pgina de recursos de IP Masquerade
  http://www.hwy401.com/achau/ipmasq. Tambin hay un documento muy
  detallado que habla sobre enmascaramiento, que es el IP-Masquerade-
  Como (que tambin ensea a configurar otros sistemas operativos para
  trabajar teniendo un Linux como servidor enmascarador).





  6.10.  Proxy IP transparente


  El proxy transparente de IP es una caracterstica que le permite
  redirigir servidores o servicios destinados a otra mquina a esos
  servicios en esta mquina. Normalmente esto es til cuando tiene un
  Linux como encaminador que adems proporciona un servidor proxy.
  Debera redirigir todas las conexiones destinadas a este servicio de
  forma remota al servidor local de proxy.

  Opciones de Compilacin del Ncleo:



           Code maturity level options  --->
               [*] Prompt for development and/or incomplete code/drivers
           Networking options  --->
               [*] Network firewalls
               ....
               [*] TCP/IP networking
               ....
               [*] IP: firewalling
               ....
               [*] IP: transparent proxy support (EXPERIMENTAL)




  La configuracin de la caracterstica de proxy transparente se realiza
  mediante la orden ipfwadm.

  Un ejemplo que podra ser til es el siguiente:



       root# ipfwadm -I -a accept -D 0/0 telnet -r 2323




  Este ejemplo har que cualquier intento de conexin al puerto telnet
  (23) por parte de otra mquina sea redirigida al puerto 2323 de esta
  mquina. Si tiene un servicio activo en ese puerto, podra redirigir
  las conexiones telnet, hacer un registro de lo que pasa, o cualquier
  cosa que se ajuste a sus necesidades.

  Un ejemplo ms interesante es redirigir todo el trfico http a travs
  de un almacn cach local. Sin embargo, el protocolo usado por los
  servidores proxy es diferente al http nativo: mientras que un cliente
  conecta a www.servidor.com:80 y pregunta por /camino/pgina, cuando
  conecta a la cach local busca proxy.dominio.local:8080 y pregunta por
  www.servidor.com/camino/pgina.

  Para filtrar una peticin http a travs del proxy local, necesitar
  adaptar el protocolo insertando un pequeo servidor llamado transproxy
  (lo puede encontrar en la web). Si quiere puede ejecutarlo en el
  puerto 8081, y ejecutar esta orden:



       root# ipfwadm -I -a accept -D 0/0 80 -r 8081





  Entonces, el programa transproxy recibir todas las conexiones que
  tengan que alcanzar servidores externos y las pasar al proxy local
  arreglando las diferencias de protocolo.


  6.11.  IPv6


  Justo ahora que crea que empezaba a entender las redes IP las reglas
  cambian! IPv6 es la notacin abreviada de la versin 6 del Internet
  Protocol. IPv6 fue desarrollada principalmente para responder a los
  temores de la comunidad de Internet al respecto de que pronto habr
  escasez de direcciones IP para asignar. Las direcciones IPv6 son de 16
  bytes (128 bits). IPv6 incorpora varios cambios ms, en su mayor parte
  simplificaciones, que harn que las redes IPv6 sean ms manejables que
  las IPv4.

  Linux ya tiene una implementacin de IPv6 que funciona, pero no est
  completa, a partir de la serie de ncleos 2.2.*.

  Si quiere experimentar con esta prxima generacin de tecnologa de
  Internet, o le hace falta, debera leerse la IPv6-FAQ que est
  disponible en http://www.terra.net/ipv6.


  6.12.  Mobile IP


  El trmino movilidad de IP describe la habilidad de una mquina que es
  capaz de mover su conexin de red de un punto de Internet a otro sin
  cambiar su direccin IP o perder conectividad. Normalmente cuando una
  mquina con IP cambia su punto de conexin tambin debe cambiar su
  direccin IP. La Movilidad de IP soluciona este problema asignando una
  IP fija a la mquina mvil y usando encapsulacin IP (tunneling) con
  encaminado automtico para asegurar que los datagramas destinados a
  ella se encaminan a la verdadera direccin IP que est usando en ese
  momento.

  Est en camino un proyecto para proporcionar un juego completo de
  herramientas de movilidad de IP para Linux. El estado del proyecto y
  las herramientas los puede obtener de la pgina principal de Linux
  Mobile IP http://anchor.cs.binghamton.edu/~mobileip.


  6.13.  Multicast


  IP Multicast permite encaminar datagramas IP hacia a un nmero
  arbitrario de mquinas con IP de forma simultnea. Este mecanismo se
  explota para proporcionar material de amplia distribucin por Internet
  como transmisiones de imagen y sonido y otras aplicaciones noveles.

  Opciones de Compilacin del Ncleo:



            Networking options  --->
                [*] TCP/IP networking
                ....
                [*] IP: multicasting






  Esto requiere un conjunto de herramientas y algo de configuracin de
  la red.  Una fuente de informacin sobre cmo instalar y configurar
  esto para Linux la encontramos en
  http://www.teksouth.com/linux/multicast.


  6.14.  red) NAT - Network Address Translation (Traduccin de direc
  ciones de


  El servicio de Traduccin de Direcciones de Redes IP es algo as como
  el hermano mayor estandarizado del servicio de Enmascarado IP de
  Linux.  Est especificado con cierto detalle en el RFC-1631 en su
  archivo RFC ms prximo.  NAT proporciona caractersticas que no posee
  el Enmascarado IP que lo hacen eminentemente ms apropiado para su uso
  en los diseos de encaminamiento de cortafuegos corporativos y en
  instalaciones a mayor escala.

  Michael Hasenstein, Michael.Hasenstein@informatik.tu-chemnitz.de, ha
  desarrollado una implementacin alfa de NAT para el ncleo 2.0.29 de
  Linux. La documentacin e implementacin de Michaels est disponible
  en: la pgina Web de Linux IP Network Address http://www.csn.tu-
  chemnitz.de/HyperNews/get/linux-ip-nat.html

  Los ncleos ms modernos de Linux 2.2.x tambin incluyen algo de la
  funcionalidad NAT en el algoritmo de encaminamiento.


  6.15.  Traffic Shaper (Manipulacin del ancho de banda)


  El traffic shaper (regulador de caudal) es un controlador que crea
  nuevas interfaces de red, las cuales tienen una limitacin en el
  caudal, definida por el usuario, y que actan sobre una interfaz de
  red fsica para hacer la comunicacin real, pudiendo ser utilizadas
  por el encaminador para el trfico saliente.

  El regulador fue introducido con Linux-2.1.15 y fue portado a
  Linux-2.0.36 (apareci en el 2.0.36-pre-patch-2 distribuido por Alan
  Cox, el autor del dispositivo regulador y mantenedor de Linux-2.0).

  El regulador de caudal slo puede ser compilado como mdulo y para
  configurarlo se usa el programa shapecfg con rdenes como las
  siguientes:



       shapecfg attach shaper0 eth1
       shapecfg speed shaper0 64000




  El dispositivo regulador slo puede controlar el ancho de banda del
  trfico de salida, ya que los paquetes son transmitidos a travs suyo
  de acuerdo con las tablas de rutas; sin embargo, una funcionalidad de
  rutas por direccin de origen podra ayudar a limitar el ancho de
  banda global de mquinas especficas que estn usando un encaminador
  Linux.

  Linux-2.2 implementa tambin ese tipo de encaminamiento, y si lo
  necesita en Linux-2.0, busque el parche de Mike McLagan, en
  ftp://ftp.invlogic.com.  Lea Documentation/networking/shaper.txt si
  desea ms informacin al respecto del shaper.


  Si quiere probar un intento de regulacin de caudal de paquetes
  entrantes, use rshaper-1.01 (o ms nuevo). Lo encontrar en
  ftp://ftp.systemy.it/pub/develop.


  6.16.  Encaminamiento con Linux-2.2


  La ltima versin de Linux, la 2.2, ofrece mucha flexibilidad en lo
  que a poltica de encaminamiento se refiere. Desafortunadamente,
  deber esperar a la siguiente versin de este Como, o acudir a las
  fuentes del ncleo.


  7.  Uso de hardware comn en los PC



  7.1.  RDSI


  La Red Digital de Servicios Integrados (RDSI) es una serie de
  estndares que especifican una red digital conmutada de propsito
  general. Una llamada RDSI crea un servicio de datos asncrono punto a
  punto hacia el destino. RDSI suele distribuirse con un enlace de gran
  velocidad que se divide en varios canales discretos. Hay dos tipos de
  canales diferentes, los Canales B que son los que realmente
  transportan los datos del usuario y un slo canal llamado canal D que
  se usa para enviar informacin de control a la RDSI para establecer
  llamadas y otras funciones. En Australia, por ejemplo, RDSI se
  distribuye con un enlace de 2Mbps que se divide en 30 canales
  discretos B de 64kbps con un canal D de 64kbps.  Se pueden usar
  cualquier nmero de canales en cualquier momento y en cualquier
  combinacin. Usted podra, por ejemplo, establecer 30 llamadas
  separadas a 30 destinos diferentes a 64kbps cada uno, o 15 llamadas a
  15 destinos diferentes a 128kbps cada uno (dos canales por llamada), o
  sencillamente un pequeo nmero de llamadas y dejar el resto de los
  canales sin usar. Se puede usar un canal tanto para llamadas entrantes
  como salientes. La intencin original de la RDSI fue permitir a las
  compaas de telecomunicaciones proporcionar un slo servicio de datos
  que pudiera transmitir tanto telfono (mediante voz digitalizada) como
  servicios de datos a su casa o negocio sin que tuviera que hacer
  ningn cambio especial de configuracin.

  Hay unas pocas maneras diferentes de conectar su ordenador a un
  servicio RDSI. Una manera es usar un dispositivo llamado Adaptador
  Terminal que se enchufa a la Unidad Terminadora de Red que su compaa
  local de telecomunicaciones tuvo que instalar al proporcionarle el
  servicio RDSI y que presenta unas cuantas interfaces serie. Uno de
  estos interfaces se usa para introducir instrucciones de
  establecimiento de llamadas y la configuracin y los otros son los que
  realmente se conectan a los dispositivos de red que usarn los
  circuitos de datos cuando se hayan establecido. Linux trabajar con
  este tipo de configuracin sin modificacin alguna, simplemente tiene
  que tratar el puerto del Adaptador Terminal como tratara cualquier
  otro dispositivo serie.  Otra manera, que es para la que est diseado
  el soporte de RDSI del ncleo permite instalar una tarjeta RDSI en su
  mquina Linux y dejar entonces que sea el propio Linux quien maneje
  los protocolos y haga las llamadas.

  Opciones de Compilacin del Ncleo:





      ISDN subsystem  --->
          <*> ISDN support
          [ ] Support synchronous PPP
          [ ] Support audio via ISDN
          < > ICN 2B and 4B support
          < > PCBIT-D support
          < > Teles/NICCY1016PC/Creatix support





  La implementacin del ncleo de Linux de la RDSI soporta varios tipos
  diferentes de tarjetas RDSI. Son las que vienen listadas en las
  opciones de configuracin del ncleo.


    ICN 2B and 4B

    Octal PCBIT-D

    Tarjetas Teles ISDN y compatibles

  Algunas de estas tarjetas requieren que se les carguen ciertos
  programas antes de funcionar. Hay una utilidad aparte que hace esto.

  Hay disponibles ms detalles de cmo configurar el soporte RDSI de
  Linux en el directorio /usr/src/linux/Documentation/isdn/ y tambin un
  listado PUF (Pregutas de Uso Frecuente) dedicado a isdn4linux en
  http://www.lrz-muenchen.de/~ui161ab/www/isdn.  (Puede pulsar sobre la
  bandera inglesa para la versin en ingls).

  Una nota al respecto de PPP. El conjunto de protocolos PPP operar
  tanto sobre lineas serie sncronas como asncronas. El demonio PPP
  (pppd) que se suele distribuir para Linux slo soporta el modo
  asncrono. Si desea ejecutar los protocolos PPP sobre el servicio
  RDSI, necesitar una versin especial modificada. En la documentacin
  anteriormente mencionada encontrar detalles de cmo encontrarlo.

  En http://www.insflug.org/documentos/RDSI-Como/ tiene a su disposicin
  un documento con detalles especficos de la configuracin en Espaa.


  7.2.  PLIP en Linux-2.0


  Los nombres de los dispositivos PLIP son `plip0', `plip1' y `plip2'.

  Opciones de Compilacin del Ncleo:



           Network device support  --->
               <*> PLIP (parallel port) support




  plip (Parallel Line IP), se parece a SLIP en que se usa para
  proporcionar conexiones punto a punto entre dos mquinas, excepto en
  que est diseado para usar los puertos paralelos de impresora de la
  mquina en lugar de los puertos serie (se incluye un diagrama de
  cableado en la seccin de diagramas de cableado ms adelante). Como es
  posible transmitir ms de un bit a la vez con un puerto paralelo, es
  posible obtener mayores velocidades con la interfaz plip que con los
  dispositivos serie estndar.  Adems, puede aprovecharse incluso el
  ms sencillo de los puertos paralelos, el puerto de impresora, en
  lugar de tener que comprar una UART 16550AFN, comparativamente ms
  cara, para los puertos serie. PLIP usa mucha CPU si lo comparamos con
  un enlace serie y casi seguro que no ser una buena opcin si puede
  obtener algunas tarjetas Ethernet baratas, pero funcionar cuando no
  est disponible nada ms y adems lo har bastante bien.  Se puede
  esperar una tasa de transferencia de alrededor de 20 kilobytes por
  segundo cuando el enlace est funcionando correctamente.

  Los controladores de dispositivo de PLIP compiten con el controlador
  de dispositivo paralelo por el hardware del puerto paralelo. Si desea
  usar ambos controladores deber compilar los dos como mdulos para
  asegurarse de que es capaz de elegir qu puerto quiere que use PLIP y
  qu puertos usar como dispositivos para la impresora. Lea el Modules
  mini-Howto para obtener ms informacin sobre la configuracin de los
  mdulos en el ncleo.

  Por favor tenga en cuenta que algunos porttiles usan circuitera que
  no funcionar con PLIP porque no permiten algunas combinaciones de
  seales en las que se basa PLIP, que las impresoras no usan.

  El interfaz plip de Linux es compatible con el Crynwyr Packet Driver
  PLIP y esto significa que puede conectar su mquina Linux a una
  mquina DOS que est ejecutando cualquier clase de programas tcp/ip
  mediante plip.

  En la serie de ncleos 2.0.* los dispositivos PLIP estn asignados a
  puertos e IRQ como sigue



           dispositivo  i/o    IRQ
           ----------- -----   ---
           plip0       0x3bc   5
           plip1       0x378   7
           plip2       0x278   2




  Si sus puertos paralelos no se ajustan a alguna de las combinaciones
  de encima entonces tendr que cambiar la IRQ de un puerto usando el
  parmetro irq de la orden ifconfig. Asegrese de que activa las IRQ de
  los puertos de impresora en la ROM BIOS antes, si es que dispone de
  esa opcin. Como alternativa, puede especificar las opciones io= e
  irq= como argumentos a insmod, si usa mdulos. Por ejemplo:



       root# insmod plip.o io=0x288 irq=5




  La operacin PLIP se controla con dos retardos, cuyos valores por
  defecto suelen ser correctos. Posiblemente necesite incrementarlos si
  tiene una mquina un tanto lenta, en cuyo caso los temporizadores a
  incrementar estn en la otra mquina. Hay un programa llamado
  plipconfig que permite cambiar la configuracin de los temporizadores
  sin recompilar el ncleo. Viene con muchas distribuciones Linux.

  Para configurar una interfaz plip, necesitar invocar las siguientes
  rdenes (o aadirlas a su guin de iniciacin del sistema):



  root# /sbin/ifconfig plip1 pliplocal pointopoint plipremota
  root# /sbin/route add plipremota plip1




  Aqu, el puerto usado es el que est en la direccin E/S 0x378;
  pliplocal y plipremota son los nombres o direcciones IP usadas para
  los extremos del cable PLIP. Personalmente, prefiero tenerlas en mi
  base de datos /etc/hosts:



       # entradas plip
       192.168.3.1   pliplocal
       192.168.3.2   plipremota




  El parmetro pointopoint tiene el mismo significado que para SLIP, en
  el que especifica la direccin de la mquina en el otro extremo del
  enlace.

  En casi todos los aspectos, se puede tratar una interfaz plip como si
  fuese una interfaz SLIP, excepto que no se puede (ni se necesita) usar
  dip ni slattach.

  Para obtener ms informacin al respecto de PLIP, acuda al PLIP mini-
  Howto.


  7.3.  PLIP en Linux-2.2


  Durante el desarrollo de las versiones 2.1 del ncleo, se cambi la
  implementacin del puerto paralelo, hacia una configuracin mejor.

  Opciones de compilacin del ncleo:



           General setup  --->
               [*] Parallel port support
           Network device support  --->
               <*> PLIP (parallel port) support




  El nuevo cdigo de PLIP se comporta como el anterior (se usan las
  mismas rdenes ifconfig y route que en la seccin anterior, pero la
  iniciacin del dispositivo es diferente debido a la avanzada
  implementacin del manejo del puerto paralelo).

  El primer dispositivo PLIP siempre es denominado plip0, siendo ste
  el que primero detecta el sistema, de manera similar a lo que ocurre
  con los dispositivos Ethernet. El verdadero puerto paralelo que se va
  a usar es uno de los que estn disponibles, tal como se muestra en
  /proc/parport. Por ejemplo, si slo tiene un puerto paralelo, slo
  tendr un directorio llamado /proc/parport/0.

  Si el ncleo no detecta la IRQ usada por el puerto, insmod plip
  fallar; en este caso simplemente tendr que escribir el nmero
  correcto en /proc/parport/0/irq y reinvocar insmod.

  Hay disponible informacin completa al respecto del puerto paralelo en
  el archivo Documentation/parport.txt, parte de las fuentes de su
  ncleo.


  7.4.  PPP


  Los nombres de los dispositivos PPP son ppp0, ppp1, etc. Los
  dispositivos estn numerados de forma secuencial de manera que el
  primer dispositivo configurado recibe el 0.

  Opciones de compilacin del Ncleo:



           Networking options  --->
               <*> PPP (point-to-point) support




  La configuracin del PPP est cubierta en detalle en el PPP-Como,
  http://www.insflug.org/documentos/PPP-Como/.


  7.4.1.  Mantener una conexin permanente a la red usando pppd .


  Si es tan afortunado como para tener una conexin semi-permanente a la
  red y quiere hacer que su mquina establezca automticamente la
  conexin PPP si se pierde, existe un truco sencillo para hacerlo.

  Configure el PPP de tal manera que pueda ser iniciado por el usuario
  root ejecutando la orden:



       # pppd




  Asegrese de que tiene configurada la opcin -detach en el fichero
  /etc/ppp/options. Entonces, inserte la siguiente lnea en el fichero
  /etc/inittab, bajo las definiciones de getty.



       pd:23:respawn:/usr/sbin/pppd




  Esto har que el programa init ejecute y monitorice el programa pppd y
  que lo reinicie automticamente si muere.


  7.5.  Cliente SLIP


  Los nombres de los dispositivos SLIP son sl0, sl1, etc.  siendo
  asignado el 0 al primer dispositivo configurado y el resto
  incrementando secuencialmente segn van siendo configurados.


  Opciones de compilacin del ncleo:



           Network device support  --->
               [*] Network device support
               <*> SLIP (serial line) support
               [ ]  CSLIP compressed headers
               [ ]  Keepalive and linefill
               [ ]  Six bit SLIP encapsulation




  El SLIP (Serial Line Internet Protocol) le permite usar tcp/ip sobre
  una lnea serie, sea una lnea de telfono con un mdem, o una lnea
  dedicada.  Por supuesto para usar SLIP necesitar tener acceso a un
  servidor SLIP de algn tipo. Muchas universidades y empresas de todo
  el mundo proporcionan acceso mediante SLIP.

  Slip usa los puertos serie de su mquina para transportar datagramas
  IP.  Para hacerlo debe tomar el control del dispositivo serie. Los
  dispositivos SLIP se denominan sl0, sl1, etc. Cmo se corresponden a
  sus dispositivos serie? El cdigo de red usa lo que denominados una
  llamada ioctl (i/o control - control de e/s) para convertir los
  dispositivos serie en dispositivos SLIP. Se le proporcionan dos
  programas que pueden hacer esto, y se llaman dip y slattach.


  7.5.1.  dip


  dip (Dialup IP) es un sofisticado programa capaz de programar la
  velocidad del dispositivo serie, ordenar a su mdem que llame al otro
  extremo del enlace, identificarle automticamente en el servidor
  remoto, examinar los mensajes que le enva el servidor y obtener
  informacin tal como su direccin IP y ejecutar las ioctl necesarias
  para conmutar su puerto serie al modo SLIP. dip tiene una gran
  capacidad para ejecutar guiones (scripts) y esto lo puede explotar
  para automatizar el procedimiento de autenticacin.

  Puede encontrarlo en:
  ftp://metalab.unc.edu/pub/Linux/system/Network/serial/dip/dip337o-
  uri.tgz.

  Para instalarlo, intente lo siguiente:



           usuario% cd /usr/src
           usuario% gzip -dc dip337o-uri.tgz | tar xvf -
           usuario% cd dip-3.3.7o
           root# make install




  El Makefile asume la existencia de un grupo denominado uucp, pero
  puede que usted quiera cambiarlo a dip o SLIP dependiendo de su
  configuracin.


  7.5.2.  slattach



  slattach es un programa muy sencillo comparado con dip, muy fcil de
  usar, pero no tiene la sofisticacin de dip. No tiene capacidad para
  ejecutar guiones, todo lo que hace es configurar su dispositivo serie
  como dispositivo SLIP. Asume que tiene toda la informacin que
  necesita y la lnea serie se establece antes de que lo invoque.
  slattach es ideal para usarlo donde necesite una conexin permanente
  al servidor, como un cable fsico o una lnea dedicada.


  7.5.3.  Cundo usar cada uno?


  Debera usar dip cuando su enlace a la mquina servidora de SLIP es un
  mdem, o algn otro enlace temporal. Debera usar slattach cuando
  disponga de una lnea dedicada, quiz un cable, entre su mquina y el
  servidor, y no se necesita ejecutar ninguna accin especial para hacer
  que el enlace funcione. Mire la seccin ``Conexin Permanente con
  Slip'' para ms informacin.

  configurar SLIP se parece mucho a configurar una interfaz Ethernet
  (lea la seccin ``Configuracin de un dispositivo Ethernet'' ms
  atrs).  Sin embargo, hay unas pocas diferencias clave.

  Antes que nada, los enlaces SLIP son diferentes a las redes Ethernet
  en que slo hay dos mquinas en la red, una en cada extremo del
  enlace. Al contrario que con Ethernet que est disponible para su uso
  nada ms que termine de cablear, con SLIP, dependiendo del tipo de
  enlace que tenga, puede que tenga que iniciar la conexin de red de
  alguna manera especial.

  Si est usando dip entonces esto no debera hacerlo en el momento de
  arrancar, sino algo ms adelante, cuando est preparado para usar el
  enlace. Es posible automatizar este procedimiento.  Si est usando
  slattach entonces probablemente quieras aadir una seccin a su
  fichero rc.* correspondiente. Esto lo describiremos pronto.

  Hay dos tipos principales e servidores SLIP: servidores de direcciones
  IP dinmicas y servidores de direcciones IP estticas. Casi cualquier
  servidor SLIP le pedir al conectar una identificacin y una
  contrasea.  dip puede proporcionar estos datos automticamente.


  7.5.4.  Servidor SLIP esttico con lnea por llamada y DIP.


  Un servidor esttico de SLIP es aqul en el que se le ha dado una
  direccin IP que es exclusivamente suya. Cada vez que conecte al
  servidor, tendr que configurar su puerto SLIP con esa direccin. El
  servidor esttico de SLIP contestar a la llamada del mdem,
  posiblemente le pregunte su nombre de usuario y contrasea, y entonces
  encaminar cualquier datagrama destinado a su direccin mediante esa
  conexin. Si tiene un servidor esttico, entonces puede que quiera
  aadir una entrada con su direccin IP y el nombre de su mquina (ya
  que sabe cuales sern) en /etc/hosts. Tambin debera configurar
  algunos otros ficheros como: rc.*, host.conf, resolv.conf,
  /etc/HOSTNAME y rc.local. Recuerde que cuando configure rc.*, no
  necesita aadir ninguna orden especial para la conexin SLIP ya que es
  dip el que hace todo el trabajo duro al configurar la interfaz.
  Necesitar proporcionarle a dip la informacin apropiada de manera que
  configure la interfaz por usted despus de ordenarle al mdem que
  establezca la llamada y de darle de alta en el servidor SLIP.

  Si esta es la manera de trabajar de su servidor SLIP entonces puede
  pasar a la seccin ``Uso de Dip'' para aprender a configurar dip de
  forma apropiada.

  7.5.5.  Servidor SLIP dinmico con lnea por llamada y DIP.


  Un servidor dinmico de SLIP es aqul que le asigna una direccin IP
  al azar, a partir de una reserva de direcciones, cada vez que se
  registra. Eso significa que no hay garantas de que tenga una
  direccin en particular cada vez, y esa direccin puede ser usada por
  otra persona despus de que usted haya desconectado. El administrador
  de red que configur el servidor SLIP habr asignado un rango de
  direcciones para que el servidor SLIP las use, cuando el servidor
  recibe una nueva llamada entrante, localiza la primera direccin sin
  asignar, gua a quien llama a travs del procedimiento de registro y
  entonces imprime un mensaje de bienvenida que contiene la direccin IP
  que se le ha asignado, para entonces proceder a usar esa direccin IP
  durante toda la llamada.

  La configuracin para este tipo de servidor es similar a la
  configuracin para un servidor esttico, excepto en que debe aadir un
  paso en el que obtiene la direccin IP que el servidor le ha asignado
  y configura su dispositivo SLIP con ella.

  De nuevo, dip hace el trabajo duro y las nuevas versiones son
  suficientemente sofisticadas no slo como para registrarle, sino
  tambin como para leer automticamente la direccin IP impresa en el
  mensaje de bienvenida y almacenarla de manera que pueda configurar el
  dispositivo SLIP con ella.

  Si esta es la manera de trabajar de su servidor SLIP, entonces puede
  pasar a la seccin ``Uso de Dip'' para aprender a configurar dip de
  forma apropiada.


  7.5.6.  Uso de Dip.


  Como se explic anteriormente, dip es un programa potente que puede
  simplificar y automatizar el proceso de llamada a el servidor SLIP,
  registro, inicio de la conexin y configuracin de tus dispositivos
  SLIP con las rdenes ifconfig y route apropiadas.

  Esencialmente, para usar dip escribiremos un guin dip, que es
  bsicamente una lista de rdenes que dip comprende y que le dicen cmo
  debe realizar cada una de las acciones que usted quiere que haga.
  Eche un vistazo al fichero sample.dip que viene con dip para hacerse
  una idea de cmo funciona. dip es un programa bastante potente, con
  muchas opciones. No las va a encontrar todas aqu, y tendr que mirar
  la correspondiente pgina man, el README y los ficheros de ejemplo que
  vendrn con su versin de dip.

  Fjese en que el guin sample.dip asume que est accediendo a un
  servidor SLIP esttico, por lo que su IP ya se conoce de antemano. Las
  nuevas versiones de dip incluyen, para los servidores SLIP dinmicos,
  una orden que puede usarse para leer y configurar automticamente el
  dispositivo SLIP con la direccin IP que el servidor dinmico le
  asigna. El ejemplo siguiente es una versin modificada y traducida del
  sample.dip que viene con dip337j-uri.tgz y probablemente sea un buen
  punto de partida. Puede que quiera grabarlo como /etc/guiondip y
  editarlo para que se ajuste a su configuracin.








  #
  # sample.dip    Programa de soporte de conexin para Dialup IP
  #
  #               Este fichero (debera mostrar) muestra el uso de DIP
  #       Este fichero debera funcionar para los servidores dinmicos
  #       de tipo Annex, si usted usa un servidor esttico entonces utilice
  #       el fichero sample.dip que viene en el paquete dip337-uri.tgz
  #
  #
  # Versin:      @(#)sample.dip  1.40    20/07/93
  #
  # Autor:        Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  #

  main:
  # Lo siguiente es configurar el nombre y direccin del otro extremo
  # La mquina a la que llamo se llama 'xs4all.hacktic.nl'
  # (== 193.78.33.42)
  get $remote xs4all.hacktic.nl
  # Asignar 255.255.255.0 como mscara de red de sl0
  netmask 255.255.255.0
  # Asignar el puerto serie y velocidad deseados
  port cua02
  speed 38400

  # Reiniciar el mdem y la lnea terminal
  # Esto parece darle problemas a algunas personas!
  reset

  # Nota! Valores "estndar" predefinidos de "errlevel"
  #  0 - OK
  #  1 - CONNECT
  #  2 - ERROR
  #
  # Puede cambiarlos buscando "addchat()" en *.c...

  # Nos preparamos para llamar.
  send ATQ0V1E1X4\r
  wait OK 2
  if $errlvl != 0 goto problema_con_modem
  dial 555-1234567
  if $errlvl != 1 goto problema_con_modem

  # Estamos conectados. Registrarse en el sistema.
  login:
  sleep 2
  wait ogin: 20
  if $errlvl != 0 goto problema_al_registrarse
  send MILOGIN\n
  wait ord: 20
  if $errlvl != 0 goto clave_erronea
  send MIPASSWD\n
  loggedin:

  # Ahora estamos registrados.
  wait SOMEPROMPT 30
  if $errlvl != 0 goto error_de_prompt

  # Ordenamos al servidor que entre en modo SLIP
  send SLIP\n
  wait SLIP 30
  if $errlvl != 0 goto error_de_prompt

  # Obtenemos nuestra direccin IP del servidor y la asignamos
  #   Aqu asumiremos que tras ordenar al servidor SLIP que entre
  #   en modo SLIP, nos imprime nuestra direccin IP.
  get $local remote 30
  if $errlvl != 0 goto prompt_error

  # Configurar los parmetros operativos de SLIP
  get $mtu 296
  # Aseguramos que se ejecuta "route add -net default xs4all.hacktic.nl"
  default

  # Decimos hola y arrancamos!
  done:
  print CONNECTED $local ---> $rmtip
  mode CSLIP
  goto salir

  error_de_prompt:
  print Se produjo un TIME-OUT esperando a que arrancara sliplogin
  goto error

  problema_al_registrarse:
  print Hubo un problema esperando por el mensaje Login:...
  goto error

  clave_erronea:
  print Hubo un problema esperando por el mensaje Password:...
  goto error

  problema_con_modem:
  print Hubo un problema con el mdem...
  error:
  print FALL LA CONEXIN a $remote
  quit

  salir:
  exit




  El ejemplo anterior asume que estamos llamando a un servidor SLIP
  dinmico. Si est llamando a un servidor SLIP esttico, entonces
  debera funcionarle el fichero sample.dip que viene con
  dip-337-uri.tgz.

  Cuando se le da a dip la orden get $local, busca en el texto que viene
  del otro extremo una cadena que se parezca a una direccin IP, osea
  una cadena de nmeros separados por caracteres .. Esta modificacin
  se hizo especficamente pensando en los servidores SLIP dinmicos,
  para que el proceso de leer la direccin IP pudiera ser automatizado.

  El ejemplo anterior crear automticamente una ruta por defecto a
  travs del enlace SLIP. Si no es lo que deseaba, a lo mejor porque
  tiene una conexin Ethernet que debera ser la ruta por defecto,
  entonces elimine la orden default del guin. Despus de que haya
  acabado de ejecutarse el guin, si ejecuta la orden ifconfig, ver que
  hay un dispositivo sl0. Este es el dispositivo SLIP. Si fuese
  necesario, podra modificar su configuracin a mano, despus de que la
  orden dip haya acabado, usando las rdenes ifconfig y route.

  Por favor, observe que dip le permite elegir varios protocolos
  diferentes en la orden mode. El ejemplo ms comn es cSLIP que es SLIP
  con compresin. Por favor, tenga en cuenta que ambos extremos del
  enlace deben concordar, por lo que debe asegurarse de que elija lo que
  elija, sea la mismo que lo que tenga el servidor.

  El ejemplo anterior es bastante robusto y debera copar con la mayora
  de los errores. Para obtener ms informacin, haga el favor de
  dirigirse a las pginas man de dip. Naturalmente podra, por ejemplo,
  codificar un guin para que haga cosas como llamar de nuevo al
  servidor si no consigue conectarse tras un periodo de tiempo
  determinado, o incluso hacer intentos con varios servidores si tiene
  acceso a ms de uno.


  7.5.7.  Conexin SLIP permanente usando una lnea dedicada y slattach


  Si lo que tiene es un cable entre dos mquinas, o es tan afortunado
  como para tener una lnea dedicada, o algn otro tipo de conexin en
  serie permanente entre su mquina y otra, entonces no necesita la
  complejidad de usar dip para establecer un enlace serie. slattach es
  una utilidad muy sencilla de usar, que le permite suficiente
  funcionalidad como para configurar una conexin.

  Como la conexin ser permanente, querr aadir algunas rdenes al
  fichero rc pertinente. En esencia, todo lo que necesita hacer para
  tener una conexin permanente es asegurarse de que configura el
  dispositivo serie a la velocidad correcta y que lo pasa a modo SLIP.
  slattach permite hacer esto con una sola orden. Aade lo siguiente al
  fichero rc pertinente:



       #
       # Activar una conexin SLIP esttica por lnea dedicada
       #
       #  configuramos /dev/cua0 para 19.2kbps y cslip
       /sbin/slattach -p cslip -s 19200 /dev/cua0 &
       /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
       #
       # Fin de SLIP esttico




  Nota del traductor: A fecha de la traduccin, la serie estable del
  ncleo era la 2.2. En la serie 2.2, los dispositivos /dev/cuaX han
  sido completamente eliminados, unificndolos a los /dev/ttySX.

  Donde:


     IPA.IPA.IPA.IPA
        representa su direccin IP.

     IPR.IPR.IPR.IPR
        representa la direccin IP del extremo remoto.

  slattach asigna el primer dispositivo SLIP sin asignar al dispositivo
  serie especificado. slattach comienza por sl0. Por lo tanto la primera
  orden slattach asocia el dispositivo SLIP sl0 al dispositivo serie
  especificado y sl1 la siguiente vez, etc.

  slattach le permite configurar varios protocolos diferentes con el
  argumento -p. En su caso podr usar tanto SLIP como cSLIP dependiendo
  de si quiere o no usar compresin. Nota: ambos extremos deben estar de
  acuerdo sobre si usar compresin o no.


  7.6.  Servidor SLIP.



  Si tiene una mquina, quiz conectada a una red, a la que le gustara
  que otra mquina pudiese llamar y proporcionar servicios de red,
  entonces necesita configurarla como servidor. Si quiere usar SLIP como
  protocolo de lnea serie, entonces tiene tres opciones para configurar
  su mquina Linux como servidor SLIP. Yo preferira usar la primera
  presentada, sliplogin, ya que parece la ms sencilla de configurar y
  entender, pero presentar un sumario de cada una, para que pueda tomar
  su propia decisin.


  7.6.1.  Servidor slip usando sliplogin .


  sliplogin es un programa, que puede asignar a los usuarios de SLIP en
  lugar de un shell normal, que convierte una lnea terminal en una
  lnea SLIP.  Esto le permite configurar una mquina Linux tanto como
  servidor de direcciones estticas, obteniendo los usuarios la misma
  direccin cada vez que llaman, o como servidor de direcciones
  dinmicas, donde los usuarios obtienen una direccin que no tiene que
  ser necesariamente la misma que la ltima vez que llamaron.

  El que llama se registrar igual que en un proceso estndar de login,
  introduciendo su nombre de usuario y contrasea, pero en lugar de
  presentarle un intrprete de rdenes normal tras el registro, se
  ejecuta sliplogin, el cual busca en su fichero de configuracin
  (/etc/slip.hosts) una entrada con el nombre de usuario que corresponda
  a la persona que llam. Si lo encuentra, entonces configura la lnea
  como clean y de 8 bit, y hace una llamada ioctl para convertir la
  disciplina de la lnea a SLIP. Cuando se completa este proceso, toma
  lugar la ltima parte de la configuracin, en la cual sliplogin invoca
  un guin de intrprete de rdenes que configura la interfaz SLIP con
  la direccin ip y mscara de red relevantes, y asigna las rutas
  apropiadas. Este guin suele llamarse /etc/slip.login pero, de forma
  parecida a getty, si ciertos usuarios requieren una iniciacin
  especial, entonces puede crear guiones de configuracin llamados
  /etc/slip.login.nombreusuario que sern ejecutados especficamente
  para ellos en lugar del que hay por defecto.

  Tambin hay tres o cuatro ficheros que necesitar configurar para
  tener sliplogin en funcionamiento. Detallar cmo y dnde obtener los
  programas y cmo se configura cada uno. Los ficheros son:


    /etc/passwd, para las cuentas de los usuarios que llaman.

    /etc/slip.hosts, para almacenar la informacin nica a cada usuario
     que llama.

    /etc/slip.login, que lleva la configuracin del encaminamiento que
     necesite hacerse para el usuario.

    /etc/slip.tty, que ser necesario slo si est configurando el
     servidor para asignar direcciones dinmicas y contiene una tabla de
     direcciones a asignar.

    /etc/slip.logout, que contiene las rdenes necesarias para dejar
     las cosas a punto una vez el usuario cuelgue o cierre la conexin.


  7.6.1.1.  Dnde obtener sliplogin


  Puede que ya tenga el paquete sliplogin instalado como parte de su
  distribucin; si no es as entonces podr obtenerlo de:
  ftp://metalab.unc.edu/pub/linux/system/Network/serial/sliplogin-2.1.1.tar.gz.
  El fichero tar contiene tanto las fuentes, como los programas ya
  compilados y una pgina man.

  para asegurar que slo son capaces de ejecutar sliplogin los usuarios
  autorizados, debera aadir una entrada al fichero /etc/group similar
  a la siguiente:



        ..
       slip::13:radio,fred
        ..




  Cuando instale el paquete sliplogin, el Makefile cambiar el grupo al
  que pertenece el programa sliplogin por slip, y esto significa que
  slo los usuarios que pertenezcan a ese grupo sern capaces de
  ejecutarlo. El ejemplo anterior autorizar ejecutar sliplogin slo a
  los usuarios radio y fred.

  Para instalar los ejecutables en el directorio /sbin y la pgina de
  man en la seccin 8, haga lo siguiente:



       # cd /usr/src
       # gzip -dc .../sliplogin-2.1.1.tar.gz | tar xvf -
       # cd sliplogin-2.1.1
       # <..edite el Makefile si no usa shadow password..>
       # make install




  Si quiere recompilar los ejecutables tras la instalacin, aada un
  make clean antes de make install. Si quiere instalar los ejecutables
  en cualquier otro lado, necesitar editar la regla install en el
  Makefile.

  Por favor, lea los ficheros README que vienen con el paquete si quiere
  obtener ms informacin.


  7.6.1.2.  Configuracin de /etc/passwd  para mquinas que usan Slip.


  Lo normal es que cree algunos login especiales en el fichero
  /etc/passwd para la gente que llama con Slip. Una convencin
  comnmente aceptada es usar el nombre de la mquina que llaman
  prefijndole una letra S mayscula. Por tanto, por ejemplo, si la
  mquina que llama se denomina radio, entonces podras crear una
  entrada en /etc/passwd que se pareciese a:



       Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin




  Realmente no importa cmo se llame la cuenta, siempre y cuando tenga
  algn significado para usted.

  Nota: el que llama no necesita ningn directorio personal, ya que no
  se le presentar ningn intrprete de rdenes, por tanto /tmp es una
  buena eleccin. Observe tambin que se usa sliplogin en lugar de un
  intrprete de rdenes normal.


  7.6.1.3.  Configuracin de /etc/slip.hosts


  El fichero /etc/slip.hosts es el fichero en el que sliplogin busca las
  entradas que se correspondan al nombre de login que de las que obtiene
  los detalles de configuracin para esa persona. Es aqu donde se
  especifica la direccin ip y la mscara de red que se le asignar al
  que llama y que sern configuradas para su uso.  Las entradas para dos
  mquinas, una con configuracin esttica para radio y otra, con
  configuracin dinmica, para la mquina albert, deberan parecerse a
  lo siguiente:



       #
       Sradio   44.136.8.99   44.136.8.100  255.255.255.0  normal      -1
       Salbert  44.136.8.99   DYNAMIC       255.255.255.0  compressed  60
       #




  Las entradas del fichero /etc/slip.hosts son


  1. el nombre de login del que llama.

  2. la direccin ip de la mquina servidor, osea esta mquina.

  3. la direccin IP que se asignar al que llama. Si este campo se
     rellena con DYNAMIC entonces se asignar una direccin ip basada en
     la informacin contenida en el fichero /etc/slip.tty del que se
     habl antes.  Nota: deber usar al menos la versin 1.3 de
     sliplogin para que esto funcione.

  4. la mscara de red asignada a la mquina que llama en notacin
     decimal punteada, por ejemplo 255.255.255.0 para una mscara de red
     para una clase C.

  5. las opciones del modo slip, que le permiten activar o desactivar la
     compresin y otras caractersticas de slip. Los valores permitidos
     aqu son normal y compressed.

  6. un parmetro de timeout que especifica cunto tiempo puede estar
     ociosa la lnea (sin recibir datagramas) antes de que se desconecte
     la lnea.  Un valor negativo desactivar esta caracterstica.

  7. argumentos opcionales.

  Nota: Para los campos 2 y 3 puede usar tanto el nombre de la mquina
  como su direccin IP en notacin decimal. Si usted usa nombres
  entonces tendrn que ser resueltos, esto es, su mquina deber ser
  capaz de localizar la direccin ip de esos nombres o en caso contrario
  el guin fallar cuando sea ejecutado. Puede probarlo intentando hacer
  telnet hacia esos nombres, y si obtiene el mensaje Trying
  nnn.nnn.nnn... entonces es que su mquina ha sido capaz de encontrar
  una direccin ip para ese nombre. Si obtiene el mensaje Unknown host,
  entonces no lo consigui. En este caso, use una direccin ip en
  notacin decimal o ponga a punto la configuracin de su resolutor de
  nombres. (Ver seccin ``Resolucin de Nombres'').


  Los modos slip ms comunes son:


     normal
        para habilitar el SLIP normal sin compresin.

     compressed
        para habilitar la compresin de cabeceras de van Jacobsen
        (cSLIP)

  Por supuesto, son mutuamente exclusivos. Puede usar uno o el otro,
  pero no ambos. Para obtener ms informacin sobre las otras opciones
  disponibles, ve a las pginas de man.


  7.6.1.4.  Configuracin del fichero /etc/slip.login .


  Despus de que sliplogin haya examinado el /etc/slip.hosts y
  encontrado una entrada que concuerde, intentar ejecutar el fichero
  /etc/slip.login para configurar la interfaz SLIP con su direccin ip y
  su mscara.

  El fichero de ejemplo /etc/slip.login proporcionado con el paquete
  sliplogin se parece a esto:



       #!/bin/sh -
       #
       #       @(#)slip.login  5.1 (Berkeley) 7/1/90
       #
       # fichero de login genrico para una lnea SLIP. sliplogin
       # lo invoca con los parmetros:
       #     $1       $2       $3    $4, $5, $6 ...
       # unidadSLIP veloctty   pid   los argumentos de la entrada en slip.host
       #
       /sbin/ifconfig $1 $5 pointopoint $6 mtu 1500 -trailers up
       /sbin/route add $6
       arp -s $6 <hw_addr> pub
       exit 0
       #




  Podr comprobar que este guin se limita a usar las rdenes ifconfig y
  route para configurar el dispositivo SLIP con su direccin ip,
  direccin ip remota y mscara de red y crea una ruta hasta la
  direccin remota a travs del dispositivo SLIP. Exactamente lo mismo
  que hara si estuviera usando la orden slattach.

  Advierta tambin el uso de Proxy ARP para asegurar que otras mquinas
  en la misma Ethernet que la mquina servidora sabrn cmo llegar a la
  mquina que llama. El campo <hw_addr> (direccin hardware) debera ser
  la direccin hardware de la tarjeta Ethernet de la mquina. Si su
  mquina servidora no est en una red Ethernet, entonces puede eliminar
  completamente esa lnea.


  7.6.1.5.  Configuracin del fichero /etc/slip.logout .


  Cuando la llamada se corta, querr asegurarse de que se restaura el
  estado normal del dispositivo serie para que otras personas sean
  capaces ms adelante de registrarse correctamente. Esto se lleva a
  cabo mediante el uso del fichero /etc/slip.logout. Es de formato
  bastante sencillo y se le llama con los mismos argumentos que al
  fichero /etc/slip.login.



       #!/bin/sh -
       #
       #               slip.logout
       #
       /sbin/ifconfig $1 down
       arp -d $6
       exit 0
       #




  Todo lo que hace es desactivar (down) la interfaz, lo que borrar la
  ruta que se cre anteriormente. Tambin usa la orden arp para borrar
  cualquier proxy que se estableciese. De nuevo, no necesita la orden
  arp en el guin si su mquina servidora no tiene un puerto ethernet.


  7.6.1.6.  Configuracin del fichero /etc/slip.tty.


  Si est usando asignacin dinmica de direcciones ip (tiene
  configurada cualquier mquina con la palabra clave DYNAMIC en el
  fichero /etc/slip.hosts, entonces deber configurar el fichero
  etc/slip.tty para que tenga una lista de las direcciones que se
  asignarn a qu puerto. Slo necesita este fichero si desea que su
  servidor asigne de manera dinmica las direcciones a los usuarios.

  El fichero es una tabla que lista los dispositivos tty que darn
  soporte a las conexiones SLIP y las direcciones ip que deberan
  asignarse a los usuarios que llaman a ese puerto.

  Su formato es como sigue:



       # slip.tty    tty -> correspondencias IP para SLIP dinmico
       # formato: /dev/tty?? xxx.xxx.xxx.xxx
       #
       /dev/ttyS0      192.168.0.100
       /dev/ttyS1      192.168.0.101
       #




  Lo que dice esta tabla es que a la gente que llame al puerto
  /dev/ttyS0 y que tengan la palabra DYNAMIC en su campo de direccin
  remota en el fichero /etc/slip.hosts les ser asignada una direccin
  de 192.168.0.100.

  De esta manera slo necesita asignar una direccin por puerto para
  todos los usuarios que no requieran una direccin dedicada para ellos.
  Esto le ayuda a mantener bajo mnimos los nmeros de direccin para
  evitar su escasez.





  7.6.2.  Servidor Slip usando dip .


  Djeme empezar diciendo que parte de la informacin que sigue viene de
  las pginas de manual de dip, donde se documenta brevemente la manera
  de usar Linux como servidor SLIP. por favor, preste atencin, puesto
  que lo siguiente est basado en el paquete dip337o-uri.tgz y
  probablemente no ses aplicable a otrs versiones de dip.

  dip tiene un modo de operacin de entrada, en el cual asigna
  automticamente una entrada para el usuario que lo invoque y configura
  la lnea serie como enlace SLIP de acuerdo con la informacin que
  encuentre en el fichero /etc/dipshosts. Este modo de operacin de
  entrada se activa invocando a dip como diplogin. Es as por tanto la
  manera de usar dip como servidor SLIP, creando cuentas especiales
  donde se usa diplogin como login shell.

  Lo primero que necesita hacer es un enlace simblico como sigue:



       # ln -sf /usr/sbin/dip /usr/sbin/diplogin




  Despus necesitar aadir entradas tanto al fichero /etc/passwd como
  al /etc/diphosts. Las entradas que necesita hacer tienen el formato
  que sigue:

  Para configurar Linux como servidor SLIP con dip, se necesita crear
  algunas cuentas SLIP especiales para los usuarios, en las que se usa
  dip (en modo entrada) como login shell. Se sugiere la convencin de
  comenzar los nombres de las cuentas SLIP con una S mayscula, como por
  ejemplo Sfredm.

  Una entrada en /etc/passwd para un usuario SLIP se parece a:



       Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
       ^^         ^^        ^^  ^^   ^^   ^^   ^^
       |          |         |   |    |    |    \__ diplogin como login shell
       |          |         |   |    |    \_______ Directorio `home'
       |          |         |   |    \____________ Nombre completo del usuario
       |          |         |   \_________________ ID de grupo del usuario
       |          |         \_____________________ ID del usuario
       |          \_______________________________ Contrasea cifrada
       \__________________________________________ Nombre de Login del Usuario SLIP




  Despus de que el usuario se registre, el programa login, si encuentra
  y autentica al usuario, ejecutar la orden diplogin.  dip, cuando es
  invocado como diplogin, sabe que debe asumir automticamente que va a
  ser usado como intrprete de rdenes de login. Cuando comienza como
  diplogin, la primera cosa que hace es usar la funcin getuid() para
  tomar el userid de quien fuera que lo invoc. Entonces busca en el
  fichero /etc/diphosts la primera entrada que se corresponda bien con
  el userid, bien con el dispositivo tty por el que entr la llamada y
  se configura apropiadamente. Por razones de sentido comn, para que se
  pueda dar a un usuario una entrada en el fichero diphosts, o bien para
  que se le d la configuracin por defecto, es posible montar el
  servidor de tal manera que se pueda tener una mezcla de usuarios a los
  que se asigne la direccin de forma esttica o dinmica.
  dip aadir automticamente una entrada Proxy-ARP si se le invoca en
  modo entrada, por lo que no tendr que preocuparse de hacerlo
  manualmente.


  7.6.2.1.  Configuracin del fichero /etc/diphosts


  /etc/diphosts lo usa dip para buscar configuraciones ya establecidas
  para mquinas remotas. Estas mquinas remotas pueden ser usuarios que
  llaman a la mquina Linux, o pueden ser mquinas a las que usted
  llamas desde su mquina.

  El formato general para /etc/diphosts es como sigue:



        ..
       Suwalt::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
       ttyS1::145.71.34.3:145.71.34.2:255.255.255.0:Dynamic ttyS1:CSLIP,296
        ..




  Los campos son:


  1. nombre de login: el que devuelve getpwuid(getuid()) o el nombre de
     la tty.

  2. sin uso: para compatibilidad con passwd

  3. Direccin Remota: direccin IP de la mquina que llama, puede ser
     tanto la numrica como el nombre.

  4. Direccin Local: direccin IP de esta mquina, en nmero o por
     nombre.

  5. Mscara de red: en notacin decimal puntuada.

  6. Campo de comentario: ponga aqu lo que quiera.

  7. protocolo: Slip, cSLIP, etc.

  8. MTU: nmero decimal.

  Un ejemplo de entrada en /etc/net/diphosts para un usuario SLIP remoto
  podra ser:



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296




  lo que especifica un enlace SLIP con direccin remota 145.71.34.1 y
  MTU de 296, o:



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006



  que especifica un enlace capaz de usar cSLIP con direccin remota
  145.71.34.1 y MTU de 1006.

  Por tanto, todos los usuarios que desee que tengan asignado un acceso
  de llamada con IP esttica deberan tener una entrada en
  /etc/diphosts.  Si quiere que los usuarios que llaman a un puerto en
  particular y, que los detalles sean asignados dinmicamente, deber
  tener entonces una entrada para el dispositivo tty y no una basada en
  el usuario. Debera configurar al menos una entrada para cada
  dispositivo tty que usen los usuarios para asegurar que hay disponible
  para ellos una configuracin adecuada independientemente al mdem al
  que llamen.

  Cuando un usuario se registra recibir las preguntas normales sobre su
  cuenta y contrasea en las que debera introducir su userid o
  contrasea de SLIP-login. Si se verifican, entonces el usuario no ver
  mensajes especiales y slo tendr que cambiar el modo SLIP en su
  extremo. El usuario debera ser capaz de conectar y quedar configurado
  con los parmetros relevantes del fichero diphosts.


  7.6.3.  Servidor SLIP usando el paquete dSLIP .


  Matt Dillon, dillon@apollo.west.oic.com ha escrito un paquete que no
  slo hace llamadas SLIP entrantes sino tambin llamadas salientes.  El
  paquete de Matt es una combinacin de pequeos programas y guiones que
  coordinan las conexiones por usted. Necesitar tener instalado tcsh ya
  que al menos uno de los guiones lo necesita. Matt proporciona una
  copia ejecutable de la utilidad expect ya que la necesita otro de los
  guiones. Adems necesitar tener algo de experiencia con expect para
  hacer que este paquete funcione a su gusto, pero no deje que eso le
  desanime.

  Matt ha escrito unas instrucciones de instalacin muy buenas en el
  fichero README, por lo que no pienso repetirlas.

  Puede obtener el paquete dSLIP de su sitio de origen:

  ftp://apollo.west.oic.com/pub/linux/dillon_src/dSLIP203.tgz

  o desde:

  ftp://metalab.unc.edu/pub/Linux/system/Network/serial/dSLIP203.tgz

  Lase el fichero README y cree las entradas en /etc/passwd y
  /etc/group antes de hacer make install.


  8.  Otras tecnologas de red


  Las siguientes subsecciones son especficas a ciertas tecnologas de
  red.  La informacin que contienen no son vlidas necesariamente para
  cualquier otro tipo de tecnologa. Los conceptos estn ordenados
  alfabticamente.


  8.1.  ARCNet


  Los nombres de dispositivo ARCNet son arc0e, arc1e, arc2e etc. o
  arc0s, arc1s, arc2s etc. A la primera tarjeta detectada por el ncleo
  se le asigna arc0e o arc0s y el resto es asignado secuencialmente en
  el orden en que se detecte. La letra del final identifica si ha
  seleccionado el formato de paquete de encapsulacin Ethernet o el
  formato de paquete especificado en el RFC 1051.

  Opciones de Compilacin del Ncleo:



           Network device support  --->
               [*] Network device support
               <*> ARCnet support
               [ ]   Enable arc0e (ARCnet "Ether-Encap" packet format)
               [ ]   Enable arc0s (ARCnet RFC1051 packet format)




  Una vez que haya compilado el ncleo apropiadamente para admitir su
  tarjeta Ethernet, la configuracin de la tarjeta es sencilla.

  Normalmente se usa algo como:



       # ifconfig arc0e 192.168.0.1 netmask 255.255.255.0 up
       # route add -net 192.168.0.0 netmask 255.255.255.0 arc0e




  Lea, por favor, los ficheros
  /usr/src/linux/Documentation/networking/arcnet.txt y
  /usr/src/linux/Documentation/networking/arcnet-hardware.txt si desea
  obtener ms informacin.

  La implementacin de ARCNet fue desarrollada por Avery Pennarun,
  lapenwarr@foxnet.net.


  8.2.  Appletalk ( AF_APPLETALK )


  La implementacin de Appletalk no utiliza nombres especiales para sus
  dispositivos ya que usa otros ya existentes.

  Opciones de Compilacin del Ncleo:



           Networking options  --->
               <*> Appletalk DDP




  Trabajar con Appletalk permite a una mquina Linux interconectar con
  redes Apple. Una utilidad importante que se saca de esto es poder
  compartir recursos tales como impresoras y discos entre una mquina
  Linux y ordenadores Apple. Se necesita un programa adicional, que se
  llama netatalk. Wesley Craig netatalk@umich.edu representa a un equipo
  llamado el Research Systems Unix Group, de la Universidad de Michigan
  y han creado el paquete netatalk, que proporciona programas que
  implementan la pila del protocolo Appletalk y algunas utilidades.  El
  paquete netatalk viene en su distribucin de Linux, y si no, lo puede
  encontrar en su servidor de origen, en la Universidad de Michigan
  ftp://terminator.rs.itd.umich.edu/unix/netatalk/.


  Para compilar e instalar el paquete haga algo como esto:



       user% tar xvfz .../netatalk-1.4b2.tar.Z
       user% make
       root# make install




  Puede que quiera editar el Makefile antes de ejecutar make.
  Principalmente para cambiar la variable DESTDIR, que define el lugar
  donde sern instalados los ficheros. El directorio por defecto
  /usr/local/atalk suele ser una buena eleccin.


  8.2.1.  Configuracin del software Appletalk.


  La primera cosa que tiene que hacer para que todo funcione es
  asegurarse de que estn presentes las entradas apropiadas en el
  fichero /etc/services.  La entradas que necesita son:



       rtmp  1/ddp   # Routing Table Maintenance Protocol
       nbp   2/ddp   # Name Binding Protocol
       echo  4/ddp   # AppleTalk Echo Protocol
       zip   6/ddp   # Zone Information Protocol




  El siguiente paso es crear los ficheros de configuracin de Appletalk
  en el directorio /usr/local/atalk/etc (o donde haya instalado el
  paquete).

  El primer fichero a crear es el /usr/local/atalk/etc/atalkd.conf.  En
  principio, este fichero slo necesita una lnea que da el nombre del
  dispositivo a travs del cual se accede a la red donde estn tus
  mquinas Apple.



       eth0




  El demonio Appletalk aadir ms detalles despus de ejecutarse.


  8.2.2.  Exportacin de un sistema de ficheros Linux va Appletalk.


  Existe la posibilidad de exportar sistemas de ficheros desde una
  mquina Linux a la red para que las mquinas Apple en la red puedan
  compartirlos.

  Para hacerlo tiene que configurar el fichero
  /usr/local/atalk/etc/AppleVolumes.system. Hay otro fichero de
  configuracin llamado /usr/local/atalk/etc/AppleVolumes.default, que
  tiene exactamente el mismo formato y describe qu sistemas de archivos
  recibirn los usuarios que conecten con privilegios de invitado.

  Puede encontrar todos los detalles de configuracin de estos ficheros
  y qu significa cada opcin en la pgina de manual del afpd.

  Un ejemplo sencillo podra parecerse a esto:



       /tmp Scratch
       /home/ftp/pub "Espacio Pblico"




  Que exportara su sistema de ficheros /tmp como el Volumen AppleShare
  Scratch y el directorio pblico de FTP como el Volumen AppleShare
  Espacio Pblico. Los nombres de volumen no son obligatorios, el
  demonio elegir un nombre por defecto, pero no le va a morder si lo
  especifica.


  8.2.3.  Compartir la impresora Linux a travs de Appletalk.


  Puede compartir una impresora linux con mquinas Apple de manera
  bastante sencilla. Necesita ejecutar el programa papd que es el
  Printer Access Protocol Daemon de Appletalk. Cuando ejecute este
  programa, aceptar peticiones de las mquinas Apple y meter la tarea
  de impresin en la cola del demonio de la impresora local para ser
  impreso.  Debe editar el fichero /usr/local/atalk/etc/papd.conf para
  configurar el demonio. La sintaxis de este fichero es la misma que la
  del fichero /etc/printcap. El nombre que le d a la definicin se
  registrado con el protocolo de nombres de Appletalk, NBP.

  Un ejemplo de configuracin podra ser como ste:



       TricWriter:\
          :pr=lp:op=cg:




  Que pondra a disposicin de la red Appletalk la impresora TricWriter
  y todos los trabajos aceptados seran impresos en la impresora linux
  lp (definida en el fichero /etc/printcap) usando lpd. La entrada op=cg
  dice que el usuario de Linux cg es el operador de la impresora.


  8.2.4.  Ejecucin de AppleTalk.


  Muy bien, ahora debera estar preparado para probar esta configuracin
  bsica.  Hay un fichero rc.atalk proporcionado con el paquete netatalk
  que debera funcionar bien, por lo que todo lo que tiene que hacer es:



       root# /usr/local/atalk/etc/rc.atalk




  y todo debera comenzar y ejecutarse bien. No debera ver mensajes de
  error y el software enviar mensajes a la consola indicando cada etapa
  segn comienza.
  8.2.5.  Comprobacin de AppleTalk.


  Para comprobar que el software est funcionando adecuadamente, vaya a
  una de las mquinas Apple, abra el men Apple, seleccione el Chooser,
  pulse sobre AppleShare, y debera aparecer la mquina Linux.


  8.2.6.  Problemas con AppleTalk.



    Puede que necesite ejecutar el software Appletalk antes de
     configurar la red IP. Si tiene problemas ejecutando los programas
     Appletalk, o si despus de ejecutarlo tiene problemas con la red
     IP, entonces intente ejecutar los programas Appletalk antes de
     ejecutar el fichero rc correspondiente.


    El afpd (Apple Filing Protocol Daemon) desordena mucho el disco
     duro. Bajo el punto de montaje crea un par de directorios llamados
     .AppleDesktop y Network Trash Folder. Adems, por cada directorio
     al que acceda crear un .AppleDouble bajo l de manera que pueda
     almacenar resource forks, etc. Por tanto, pinselo dos veces antes
     de exportar /, o se pasar un rato borrando despus.

    El programa afpd espera que las claves que vengan de los Mac estn
     sin cifrar. Esto podra ser un problema de seguridad; por tanto,
     sea cuidadoso cuando ejecute este demonio en una mquina conectada
     a Internet, o sufrir las consecuencias si algn indeseable decide
     hacerle alguna maldad.

    Las herramientas de diagnstico existentes como netstat e ifconfig
     no soportan Appletalk. La informacin en bruto est disponible en
     el directorio /proc/net si tuviese necesidad de ella.


  8.2.7.  Si necesitase ms informacin...



  Eche un vistazo a la pgina del Linux Netatalk-Howto de Anders
  Brownworth si quiere una descripcin ms detallada de cmo configurar
  Appletalk para Linux en http://thehamptons.com/anders/netatalk.


  8.3.  ATM


  Werner Almesberger, werner.almesberger@lrc.di.epfl.ch est dirigiendo
  un proyecto para proporcionar una implementacin del Asynchronous
  Transfer Mode en Linux.  Puede obtener informacin actualizada sobre
  el estado del proyecto en: http://lrcwww.epfl.ch/linux-atm.


  8.4.  AX25 ( AF_AX25 )


  Los nombres de los dispositivos AX.25 son sl0, sl1, etc. en los
  ncleos 2.0.* y ax0, ax1, etc. a partir de los ncleos 2.1.*.

  Opciones de Compilacin del Ncleo:




      Networking options  --->
          [*] Amateur Radio AX.25 Level 2




  Los protocolos AX25, Netrom y Rose estn cubiertos por el AX25 Howto.
  Estos protocolos son usados por los Operadores de Amateur Radio de
  todo el mundo para experimentar con packet radio.

  La mayora del trabajo de implementacin de estos protocolos lo ha
  hecho Jonathon Naylor, sn@cs.nott.ac.uk.


  8.5.  DECNet


  Actualmente se est trabajando en la implementacin de DECNet. Debera
  aparecer en algn ncleo 2.1.* tardo.


  8.6.  FDDI


  Los nombres de dispositivo FDDI son fddi0, fddi1, fddi2, etc. A la
  primera tarjeta detectada por el ncleo se le asigna fddi0 y al resto
  se le asigna secuencialmente en el orden en que son detectadas.

  Lawrence V. Stefani, larry_stefani@us.newbridge.com, ha desarrollado
  un controlador para las tarjetas FDDI EISA y PCI de Digital Equipment
  Corporation.

  Opciones de Compilacin del Ncleo:



           Network device support  --->
               [*] FDDI driver support
               [*] Digital DEFEA and DEFPA adapter support




  Cuando tenga el ncleo compilado para trabajar con el controlador FDDI
  e instalado, la configuracin de la interfaz FDDI es casi idntica al
  de una interfaz Ethernet. Simplemente ha de especificar la interfaz
  FDDI apropiada en las rdenes ifconfig y route.


  8.7.  Retransmisin de Tramas ( Frame Relay )


  Los nombres de dispositivo Frame Relay son dlci00, dlci01, etc para
  los dispositivos de encapsulacin DLCI y sdla0, sdla1, etc para los
  FRAD.

  El Frame Relay (Retransmisin de tramas) es una tecnologa de red
  diseada para ajustarse al trfico de comunicacin de datos que es de
  naturaleza explosiva o intermitente. La conexin a una red Frame
  Relay se realiza usando un Frame Relay Access Device (FRAD). El Linux
  Frame Relay implementa IP sobre Frame Relay segn se describe en el
  RFC-1490.

  Opciones de Compilacin del Ncleo:


           Network device support  --->
               <*> Frame relay DLCI support (EXPERIMENTAL)
               (24)   Max open DLCI
               (8)   Max DLCI per device
               <*>   SDLA (Sangoma S502/S508) support




  Mike McLagan, mike.mclagan@linux.org, desarroll el soporte de Frame
  Relay y las herramientas de configuracin.

  Actualmente los nicos FRAD soportados son los S502A, S502E y S508 de
  Sangoma Technologies http://www.sangoma.com Para configurar los
  dispositivos FRAD y DLCI despus de haber recompilado el ncleo
  necesitar las herramientas de configuracin Frame Relay. Estn
  disponibles en ftp://ftp.invlogic.com/pub/linux/fr/frad-0.15.tgz.
  Compilar e instalar las herramientas es algo muy sencillo, pero la
  carencia de un fichero Makefile para todo lo convierte en un proceso
  bsicamente manual:



       user% tar xvfz .../frad-0.15.tgz
       user% cd frad-0.15
       user% for i in common dlci frad; make -C $i clean; make -C $i; done
       root# mkdir /etc/frad
       root# install -m 644 -o root -g root bin/*.sfm /etc/frad
       root# install -m 700 -o root -g root frad/fradcfg /sbin
       root# install -m 700 -o root -g root dlci/dlcicfg /sbin




  Tenga en cuenta que estas rdenes usan sintaxis de sh. Si utiliza un
  intrprete de rdenes tipo csh (como tcsh), el bucle for ser
  diferente.

  Despus de instalar las herramientas necesitar crear un fichero
  /etc/frad/router.conf. Puede usar esta plantilla, que es una versin
  modificada de uno de los ficheros de ejemplo:

























  # /etc/frad/router.conf
  # Esta es una plantilla de configuracin para retransmisin de tramas.
  # Se incluyen todas las etiquetas. Los valores por defecto estn basados
  # en el cdigo proporcionado con los controladores DOS para la tarjeta
  # Sangoma S502A.
  #
  # Un '#' en cualquier parte de una lnea constituye un comentario
  # Los espacios en blanco son ignorados (puede indentar con tabuladores
  # tambin)
  # Las entradas [] y claves desconocidas son ignoradas
  #

  [Devices]
  Count=1                 # Nmero de dispositivos a configurar
  Dev_1=sdla0             # el nombre del dispositivo
  #Dev_2=sdla1            # el nombre del dispositivo

  # Lo especificado aqu es aplicado a todos los dispositivos y puede ser
  # cambiado para cada tarjeta en particular.
  #
  Access=CPE
  Clock=Internal
  KBaud=64
  Flags=TX
  #
  # MTU=1500              # Mxima longitud del IFrame, por defecto 4096
  # T391=10               # valor T391    5 - 30, por defecto 10
  # T392=15               # valor T392    5 - 30, por defecto 15
  # N391=6                # valor N391    1 - 255, por defecto 6
  # N392=3                # valor N392    1 - 10, por defecto 3
  # N393=4                # valor N393    1 - 10, por defecto 4

  # Lo especificado aqu da los valores por defecto para todas las tarjetas
  # CIRfwd=16             # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511

  #
  #
  # Configuracin especfica para el dispositivo
  #
  #

  #
  # El primer dispositivo es un Sangoma S502E
  #
  [sdla0]
  Type=Sangoma            # Tipo del dispositivo a configurar, actualmente
                          # slo se reconoce SANGOMA
  #
  # Estas claves son especficas al tipo "Sangoma"
  #
  # El tipo de tarjeta Sangoma - S502A, S502E, S508
  Board=S502E
  #
  # El nombre del firmware de prueba para la tarjeta Sangoma
  # Testware=/usr/src/frad-0.10/bin/sdla_tst.502
  #
  # El nombre del firmware FR
  # Firmware=/usr/src/frad-0.10/bin/frm_rel.502
  #
  Port=360                # Puerto de esta tarjeta
  Mem=C8                  # Direccin de la memoria, A0-EE, depende
  IRQ=5                   # Nmero de la IRQ, no especificar para la S502A
  DLCIs=1                 # Nmero de DLCI asociados al dispositivo
  DLCI_1=16               # Nmero del DLCI n 1, 16 - 991
  # DLCI_2=17
  # DLCI_3=18
  # DLCI_4=19
  # DLCI_5=20
  #
  # Lo especificado aqu se aplica a este dispositivo nada ms y
  # prevalece sobre los valores por defecto
  #
  # Access=CPE            # CPE o NODE, por defecto CPE
  # Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
  # Clock=Internal        # External o Internal, por defecto Internal
  # Baud=128              # Tasa en baudios del CSU/DSU asociado
  # MTU=2048              # Longitud mxima del IFrame, por defecto 4096
  # T391=10               # valor T391    5 - 30, por defecto 10
  # T392=15               # valor T392    5 - 30, por defecto 15
  # N391=6                # valor N391    1 - 255, por defecto 6
  # N392=3                # valor N392    1 - 10, por defecto 3
  # N393=4                # valor N393    1 - 10, por defecto 4

  #
  # El segundo dispositivo es otra tarjeta
  #
  # [sdla1]
  # Type=FancyCard        # Type of the device to configure.
  # Board=                # Type of Sangoma board
  # Key=Value             # values specific to this type of device

  #
  # DLCI Default configuration parameters
  # These may be overridden in the DLCI specific configurations
  #
  CIRfwd=64               # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511

  #
  # DLCI Configuration
  # These are all optional. The naming convention is
  # [DLCI_D<devicenum>_<DLCI_Num>]
  #

  [DLCI_D1_16]
  # IP=
  # Net=
  # Mask=
  # Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=64
  # Bc_fwd=512
  # Be_fwd=0
  # CIRbak=64
  # Bc_bak=512
  # Be_bak=0

  [DLCI_D2_16]
  # IP=
  # Net=
  # Mask=
  # Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=16
  # Bc_fwd=16
  # Be_fwd=0
  # CIRbak=16
  # Bc_bak=16
  # Be_bak=0




  Cuando haya terminado el fichero /etc/frad/router.conf, el nico paso
  que queda es configurar el dispositivo en s. Esto es slo un poco ms
  complejo que la configuracin de un dispositivo de red normal. Debe
  recordar activar el dispositivo FRAD antes que los dispositivos de
  encapsulacin DLCI. Es mejor que ponga estas rdenes en un guin, ya
  que son muchos:



       #!/bin/sh
       # Configurar los parmetros del frad y los DLCI
       /sbin/fradcfg /etc/frad/router.conf || exit 1
       /sbin/dlcicfg file /etc/frad/router.conf
       #
       # Activar el dispositivo FRAD
       ifconfig sdla0 up
       #
       # Configurar los dispositivos de encapsulacin DLCI
       ifconfig dlci00 192.168.10.1 pointopoint 192.168.10.2 up
       route add -net 192.168.10.0 netmask 255.255.255.0 dlci00
       #
       ifconfig dlci01 192.168.11.1 pointopoint 192.168.11.2 up
       route add -net 192.168.11.0 netmask 255.255.255.0 dlci00
       #
       route add default dev dlci00
       #





  8.8.  IPX ( AF_IPX )


  El protocolo IPX se usa comnmente en entornos de redes de rea local
  Novell Netware(tm). Linux incluye una implementacin de este protocolo
  y puede ser configurado para actuar como punto final en una red, o
  como encaminador de IPX.

  Opciones de Compilacin del Ncleo:



           Networking options  --->
               [*] The IPX protocol
               [ ] Full internal IPX network




  Los protocolos IPX y el NCPFS estn cubiertos en gran profundidad en
  el IPX Howto.




  8.9.  NetRom ( AF_NETROM )


  Los nombres de los dispositivos NetRom son nr0, nr1, etc.

  Opciones de Compilacin del Ncleo:



           Networking options  --->
               [*] Amateur Radio AX.25 Level 2
               [*] Amateur Radio NET/ROM




  Los protocolos AX25, Netrom y Rose estn cubiertos en el AX25 Howto.
  Estos protocolos los usan Operadores de Amateur Radio de todo el mundo
  en la experimentacin de packet radio.

  La mayora del trabajo de la implementacin de estos protocolos lo ha
  Jonathon Naylor, jsn@cs.nott.ac.uk.


  8.10.  Protocolo Rose ( AF_ROSE )


  Los nombres de los dispositivos Rose son rs0, rs1, etc, en los ncleos
  2.1.*. Rose est disponible a partir de los ncleos 2.1.*.

  Opciones de Compilacin del Ncleo:



           Networking options  --->
               [*] Amateur Radio AX.25 Level 2
               <*> Amateur Radio X.25 PLP (Rose)




  Los protocolos AX25, Netrom y Rose estn cubiertos por el AX25 Howto.
  Estos protocolos los usan Operadores de Amateur Radio de todo el mundo
  en la experimentacin de packet radio.

  La mayora del trabajo de la implementacin de estos protocolos lo ha
  hecho Jonathon Naylor, jsn@cs.nott.ac.uk.


  8.11.  Soporte SAMBA - NetBEUI, NetBios.


  SAMBA es una implementacin del protocolo Session Management Block.
  Samba permite que los sistemas de Microsoft (y otros) monten y usen
  sus discos e impresoras.

  SAMBA y su configuracin vienen cubiertos en detalle en el
  http://www.insflug.org/documentos/Samba-Como/.


  8.12.  Soporte de STRIP ( Starmode Radio IP )


  Los nombres de los dispositivos STRIP son st0, st1, etc.


  Opciones de Compilacin del Ncleo:



           Network device support  --->
               [*] Network device support
               ....
               [*] Radio network interfaces
               < > STRIP (Metricom starmode radio IP)




  STRIP es un protocolo diseado especficamente para un rango de radio-
  mdems Metricon para un proyecto de investigacin conducido por la
  Universidad de Stanford llamado MosquitoNet Project
  http://mosquitonet.Stanford.EDU/mosquitonet.html. Es muy interesante
  leerse esto, incluso si no est interesado directamente en el
  proyecto.

  Las radios Metricon se conectan a un puerto serie, emplean tecnologa
  de espectro amplio y suelen ser capaces de alcanzar los 100kbps. Hay
  informacin disponible acerca de las radios Metricon en el servidor
  Web de Metricon http://www.metricom.com.

  En estos momentos las herramientas y utilidades estndar de red no
  implementan el controlador STRIP, por lo que deber obtener algunas
  herramientas preparadas desde el servidor WWW de MosquitoNet. Los
  detalles sobre los programas que necesitar estn disponibles en la
  pgina de MosquitoNet sobre STRIP
  http://mosquitonet.Stanford.EDU/strip.html.

  En resumen de la configuracin, use un programa slattach modificado
  para establecer STRIP como la disciplina de lnea de un dispositivo
  serie tty y entonces configurar el dispositivo st[0-9] resultante
  igual que hara con uno Ethernet con una excepcin importante: por
  razones tcnicas, STRIP no soporta el protocolo ARP, por lo que deber
  configurar manualmente las entradas ARP de cada una de las mquinas en
  la subred.  Esto no debera ser demasiado oneroso.


  8.13.  Anillo con testigo ( Token Ring )


  Los nombres de los dispositivos de anillo con testigo son tr0, tr1,
  etc. El anillo con testigo es un protocolo de red LAN estndar de IBM
  que evita colisiones proporcionando un mecanismo que permite que slo
  una de las estaciones en la red tenga en un momento determinado
  derecho a transmitir. Una estacin mantiene un testigo (token)
  durante un tiempo determinado y sa es la nica con permiso para
  transmitir.  Cuando ha transmitido los datos le pasa el testigo a la
  siguiente estacin.  El testigo traza un bucle entre todas las
  estaciones activas, de ah el nombre de Anillo con Testigo.

  Opciones de Compilacin del Ncleo:



           Network device support  --->
               [*] Network device support
               ....
               [*] Token Ring driver support
               < > IBM Tropic chipset based adaptor support



  La configuracin de un anillo con testigo es idntica a la de una
  Ethernet con la excepcin del nombre de los dispositivos a configurar.


  8.14.  X.25


  El X.25 es un protocolo de circuitos basados en conmutacin de
  paquetes definido por el C.C.I.T.T. (una organizacin de estndares
  reconocida por compaas de Telecomunicaciones en la mayor parte del
  mundo). En estos momentos est en funcionamiento una implementacin de
  X.25 y LAPB y los ncleos 2.1.* ms recientes incluyen el trabajo que
  est en progreso.

  Jonathon Naylor jsn@cs.nott.ac.uk est liderando el desarrollo y se ha
  establecido una lista de correo para discutir materias relativas al
  X.25 en Linux. Para suscribirse, enve un mensaje a:
  majordomo@vger.rutgers.edu con el texto subscribe linux-x25 en el
  cuerpo del mensaje.

  Se pueden obtener las primeras versiones de las herramientas de
  configuracin desde el sitio de FTP de Jonathon en
  ftp://ftp.cs.nott.ac.uk/jsn.


  8.15.  Tarjeta WaveLan


  Los nombres de los dispositivos Wavelan son eth0, eth1, etc.

  Opciones de Compilacin del Ncleo:



       Network device support  --->
           [*] Network device support
           ....
           [*] Radio network interfaces
           ....
           <*> WaveLAN support




  La tarjeta WaveLAN es una tarjeta de red LAN inalmbrica de amplio
  espectro. La tarjeta se parece bastante en la prctica a una tarjeta
  Ethernet y se configura de la misma manera.

  Puede obtener informacin acerca de la tarjeta Wavelan de Wavelan.com
  http://www.wavelan.com.


  9.  Cables y Cableado


  Aquellos de ustedes que se manejen con un soldador puede que quieran
  construir sus propios cables para interconectar dos mquinas Linux.
  Los siguientes diagramas de cableado deberan serles de ayuda.


  9.1.  Cable serie Mdem NULO (NULL Modem)


  No todos los cables Mdem NULO son iguales. Muchos cables mdem nulo
  hacen poco ms que un pequeo truco para que el ordenador crea que
  estn presentes todas las seales apropiadas, cruzando los cables de
  transmisin y recepcin. Esto vale, pero significa que deber usar
  programas de control de flujo software (XON/XOFF), que es menos
  eficiente que el control de flujo hardware. El siguiente cable
  proporciona la mejor sealizacin posible entre las mquinas y permite
  usar control de flujo por hardware (RTS/CTS).



       Nombre Patilla Patilla                           Patilla
        Datos Tx       2  -----------------------------  3
        Datos Rx       3  -----------------------------  2
        RTS            4  -----------------------------  5
        CTS            5  -----------------------------  4
        Tierra         7  -----------------------------  7
        DTR            20 -\---------------------------  8
        DSR            6  -/
        RLSD/DCD       8  ---------------------------/-  20
                                                     \-  6





  9.2.  Cable de puerto paralelo (cable PLIP)


  Si pretende usar el protocolo PLIP entre dos mquinas, entonces este
  cable funcionar independientemente del tipo de puertos paralelos que
  tenga instalados.



       Nombre Patilla  Patilla        Patilla
        STROBE         1*
        D0->ERROR      2  ----------- 15
        D1->SLCT       3  ----------- 13
        D2->PAPOUT     4  ----------- 12
        D3->ACK        5  ----------- 10
        D4->BUSY       6  ----------- 11
        D5             7*
        D6             8*
        D7             9*
        ACK->D3        10 ----------- 5
        BUSY->D4       11 ----------- 6
        PAPOUT->D2     12 ----------- 4
        SLCT->D1       13 ----------- 3
        FEED           14*
        ERROR->D0      15 ----------- 2
        INIT           16*
        SLCTIN         17*
        GROUND         25 ----------- 25




  Notas:


    No conecte las patillas marcadas con un asterisco, *.

    Las tomas de tierra extra son 18,19,20,21,22,23 y 24.

    Si el cable que est usando tiene apantallamiento metlico, debera
     estar conectado a la carcasa DB-25 en slo uno de los extremos.


  Cuidado: Un cable PLIP mal hecho puede destruir la tarjeta
  controladora. Sea muy cuidadoso y examine dos veces cada conexin para
  asegurarse de que no va a hacer ms trabajo ni a llevarse ms infartos
  de lo necesario.

  Aunque puede que sea capaz de tener cables PLIP para grandes
  distancias, debera evitarlo. Las especificaciones del cable permiten
  una longitud de alrededor de 1 metro. Por favor, tenga mucho cuidado
  cuando tienda cables PLIP largos, ya que las fuentes de campos
  electromagnticos fuertes, como los rayos, cables de corriente y
  emisoras de radio pueden interferir en los controladores, y a veces
  daarlos. Si realmente quiere conectar dos ordenadores a larga
  distancia, debera intentar obtener un par de tarjetas Ethernet para
  thin-net (red de cable fino) y tender cable coaxial.


  9.3.  Cableado Ethernet 10base2 (coaxial fino)


  10base2 es un estndar de cableado Ethernet que especifica el uso de
  cables coaxiales de 52 ohmios con un dimetro de alrededor de 5
  milmetros. Hay un par de reglas importantes a recordar cuando
  conectemos mquinas con cableado 10base2. La primera es que debe usar
  terminadores en ambos extremos del cable. Un terminador es una
  resistencia de 52 ohmios que ayuda a asegurar que la seal es
  absorbida y no reflejada cuando alcanza el final del cable. Sin un
  terminador a cada extremo del cable, podra pasar que la Ethernet sea
  ineficiente o que no funcione.  Normalmente debera usar conectores en
  T para interconectar las mquinas por lo que terminar con algo que
  se parezca a:




        |==========T=============T=============T==========T==========|
                   |             |             |          |
                   |             |             |          |
                 -----         -----         -----      -----
                 |   |         |   |         |   |      |   |
                 -----         -----         -----      -----




  Donde el | a cada extremo representa un terminador, el ======
  representa cables coaxiales con conectores BNC a cada extremo y las T
  representan conectores en T. Debera hacer que la longitud del cable
  entre la T y el PC lo ms corto posible ya que, idealmente, la T
  debera estar directamente enchufada a la tarjeta Ethernet.


  9.4.  Cable Ethernet de Par Trenzado


  Si tiene slo dos tarjetas Ethernet de par trenzado y desea
  conectarlas, entonces no necesita un concentrador. Puede cablear las
  dos tarjetas directamente una a otra. Hay un diagrama que muestra cmo
  hacerlo incluido en el Ethernet Howto


  10.  Glosario de Trminos usados en este documento


  La siguiente lista contiene algunos de los trminos ms importantes
  usados en este documento.

     ARP
        Es un acrnimo para del Protocolo de Resolucin de Direcciones
        (Address Resolution Protocol) y es la manera en que asocia una
        mquina de red una direccin IP con una direccin hardware.


     ATM
        Es un acrnimo de Modo Asncrono de Transferencia (Asynchronous
        Transfer Mode). Una red ATM empaqueta los datos en bloques de
        tamao estndar que puede transportar eficientemente de un punto
        a otro. ATM es una tecnologa de red basada en circuitos de
        paquetes conmutados.


     cliente
        Suele ser la parte de un programa que se encuentra en el lado
        del usuario. Hay ciertas excepciones, por ejemplo, en el sistema
        de ventanas X11 es el servidor el que est con el usuario, y el
        cliente puede estar ejecutndose en una mquina remota. El
        cliente es el programa o terminal de un sistema que est
        recibiendo el servicio proporcionado por el servidor. En el caso
        de sistema de igual a igual (peer to peer), como slip o ppp, se
        dice que el cliente es el extremo que inicia la conexin y el
        extremo remoto, que ha sido llamado, es el servidor.


     datagrama
        Un datagrama es un paquete discreto de datos y cabeceras que
        contiene direcciones, que es la unidad bsica de transmisin a
        travs de una red IP. Puede que lo haya odo llamar paquete.


     Direccin hardware
        Es un nmero que identifica de forma unvoca una mquina en una
        red fsica en la capa de acceso al medio. Algunos ejemplos son
        las Direcciones Ethernet y las Direcciones AX.25.


     Direccin IP
        Es un nmero que identifica unvocamente una mquina TCP/IP en
        la red. La direccin es de 4 bytes de longitud y normalmente se
        la representa en notacin decimal puntuada, donde cada byte es
        representado en decimal con puntos . entre ellos.


     DLCI
        DLCI viene de Data Link Connection Identifier y se usa para
        identificar una conexin virtual punto a punto en particular a
        travs de una red de Retransmisin de Tramas. Los DLCI los suele
        asignar el proveedor de red de Retransmisin de Tramas.


     ISP
        Vase PSI.


     MSS
        El Tamao Mximo de Segmento (Maximum Segment Size) es la mayor
        cantidad de datos que pueden ser transmitidos a la vez. Si
        quiere prevenir la fragmentacin, el MSS debera ser igual al
        MTU de la cabecera IP.


     MTU
        La Mxima Unidad de Transmisin (Maximum Transmission Unit) es
        un parmetro que determina el mayor datagrama que puede ser
        transmitido por una interfaz IP sin necesidad de dividirlo en
        unidades ms pequeas. La MTU debera ser ms grande que el
        mayor datagrama que desee transmitir sin fragmentar. Fjese que
        esto slo previene la fragmentacin de manera local, algunos
        otros enlaces por el camino pueden tener una MTU ms pequea y
        el datagrama ser fragmentado all. Los valores normales son
        1500 bytes para una interfaz Ethernet, o 576 bytes para una
        interfaz SLIP.


     PSI
        Es un acrnimo de Proveedor de Servicios de Internet (ISP -
        Internet Service Provider). Son organizaciones y compaas que
        proporcionan conectividad con Internet.


     RDSI
        Es un acrnimo de Red Digital de Servicios Integrados (ISDN en
        ingls). La RDSI proporciona medios estandarizados por los
        cuales las compaas de Telecomunicaciones pueden llevar
        informacin tanto de voz como de datos segn las premisas de los
        abonados. Tcnicamente la RDSI es una red de circuitos de
        paquetes conmutados.


     Retransmisin de tramas
        La retransmisin de tramas (o Frame Relay) es una tecnologa de
        red idealmente preparada para transportar trfico que es de
        naturaleza espordica o a rfagas. Los costes de red se reducen
        compartiendo varios abonados a la retransmisin de tramas la
        misma capacidad de red y dejndoles a ellos el deseo de usar la
        red en momentos ligeramente diferentes.


     ruta
        La ruta es el camino que siguen los datagramas a travs de la
        red para alcanzar su destino.


     servidor
        Normalmente es la parte del programa o terminal de un sistema
        remoto con respecto al usuario. El servidor proporciona algn
        servicio a uno o varios clientes. Los ejemplos de servidores
        incluyen ftp, Network File System o Domain Name Server. En el
        caso de sistemas de igual a igual (peer to peer) tales como slip
        o ppp. Se dice que es el servidor el extremo del enlace que
        recibe la llamada y el otro extremo es el cliente.


     ventana
        La ventana es la mayor cantidad de datos que el extremo receptor
        puede aceptar en un momento dado.


  11.  Linux para un PSI?


  Si est interesado en usar Linux para propsitos de PSI entonces le
  recomiendo que eche un vistazo a la pgina principal de Linux ISP
  http://www.anime.net/linuxisp si quiere obtener una buena lista de
  enlaces a la informacin que pudiera necesitar.





  12.  Reconocimientos


  Me gustara dar las gracias a las siguientes personas por su
  contribucin a este documento (no estn por orden): Terry Dawson, Axel
  Boldt, Arnt Gulbrandsen, Gary Allpike, Cees de Groot, Alan Cox,
  Jonathon Naylor, Claes Ensson, Ron Nessim, John Minack, Jean-Pierre
  Cocatrix, Erez Strauss.

  El traductor quisiera tambin reconocer el trabajo de Fernando Tricas,
  por su inestimable ayuda en el proceso de revisin del documento.

  El mayor de los reconocimientos a la gran labor de Francisco Montilla
  pacopepe@insflug.org y el grupo Insflug  http://www.insflug.org para
  conseguir aportar documentacin de calidad al movimiento LiNUX.
  Animo!


  13.  Copyright.


  Copyright Information


  The NET-3-HOWTO, information on how to install and configure
  networking support for Linux. Copyright (c) 1997 Terry Dawson, 1998
  Alessandro Rubini, 1999 {POET} - LinuxPorts

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version. This program is distributed in the
  hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  PURPOSE. See the GNU General Public License for more details. You
  should have received a copy of the GNU General Public License along
  with this program; if not, write to the: Free Software Foundation,
  Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


  14.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En ella encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Ponga su granito de arena; si detecta una errata o incorreccin en
  este documento, por favor, dirjase a
  http://www.insflug.org/documentos/Redes-En-Linux-Como/ y aporte su
  sugerencia o errata en lnea.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.


























































  Reproduccin De Sonido COMO
  Yoo C. Chung http://laplace.snu.ac.kr/~wacko/,
  wacko@laplace.snu.ac.kr
  Traduccin: Fernndez Pradier Maurice, batsman@geocities.com
  v1.5, 7 de Noviembre de 1997

  Este documento contiene una lista de las aplicaciones para Linux
  capaces de reproducir diversos formatos de sonido.
  ______________________________________________________________________

  ndice General:

  1.      Prlogo

  2.      Introduccin

  2.1.    Copyright de este documento

  2.2.    Copyright de las aplicaciones listadas

  2.3.    Dnde conseguir este documento

  2.4.    Comentarios

  2.5.    Agradecimientos

  3.      Reproduccin de diversos formatos de sonido

  3.1.    MIDI

  3.1.1.  El conjunto adagio

  3.1.2.  TiMidity

  3.1.3.  playmidi

  3.2.    Mdulos

  3.2.1.  tracker

  3.2.2.  gmod

  3.2.3.  MikMod

  3.2.4.  xmp

  3.2.5.  s3mod

  3.2.6.  mod

  3.2.7.  nspmod

  3.2.8.  yampmod

  3.3.    Ficheros de sonido MPEG

  3.3.1.  mpg123

  3.3.2.  maplay 1.2

  3.3.3.  maplay 1.3b

  3.3.4.  maplay3

  3.3.5.  splay

  3.3.6.  Sajber Jukebox

  3.3.7.  amp

  3.3.8.  XAudio

  3.3.9.  l3dec-l3enc  Codificador/decodificador de nivel III Shareware

  3.4.    WAV

  3.4.1.  wavplay

  3.4.2.  XWave

  3.5.    Otras cosas

  3.5.1.  sox

  3.5.2.  bplay

  3.5.3.  SIDPLAY

  3.5.4.  RealAudio Player

  3.5.5.  cat

  4.      Otras utilidades de sonido

  4.1.    volume

  4.2.    Sound Studio

  4.3.    setmixer

  4.4.    Tickle Music

  5.      Referencias

  6.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Prlogo

  La traduccin de este documento se inscribe dentro del proyecto
  INSFLUG.  La ltima revisin se realiz el 30/5/98.

  2.  Introduccin

  Esto es el Reproduccin-De-Sonido COMO. Contiene una lista de los
  diversos formatos de sonido y de las aplicaciones que pueden ser
  usadas para reproducirlos. Adems lista algunos trucos y consejos
  referentes al uso de estas aplicaciones. Tambin describe algunas
  aplicaciones relacionadas con el sonido pero no directamente con su
  reproduccin. Sin embargo, este documento no describe cmo configurar
  Linux para dotarlo de soporte para el sonido. Consulte el Sonido-Como
  traducido por Sergio Alonso Manzanedo, sa.manzanedo@vll.servicom.es
  para obtener instrucciones sobre cmo configurar un sistema Linux para
  tener sonido e informacin acerca del hardware soportado.

  Este documento trata de las aplicaciones de sonido para el usuario
  final.  Esto significa que solamente trata lo que un usuario medio
  tiene que conocer del sonido desde el punto de vista de las
  aplicaciones, y no cosas exticas como la sntesis de voz, o
  informacin acerca del hardware que es tratada en el Sonido COMO.

  2.1.  Copyright de este documento

  This document can be freely distributed and modified (I would
  appreciate it if I were notified of any modifications), as long as
  this copyright notice is preserved.  However, it cannot be placed
  under any further restrictions, and a modified document must have the
  same copyright as this one.  Also, credit must be given where due.

  Este documento puede ser distribuido libremente y modificado
  (apreciara que se me las notificara), siempre y cuando esta nota de
  copyright sea conservada. Sin embargo, ninguna otra restriccin
  adicional podr ser aplicada y cualquier trabajo derivado de ste debe
  tener el mismo copyright. Algn crdito debe ser acordado donde sea
  necesario.

  2.2.  Copyright de las aplicaciones listadas

  Si no se menciona ningn copyright, la aplicacin est sometida a la
  Licencia GNU General Public License.

  2.3.  Dnde conseguir este documento

  La versin oficial (en ingls) ms reciente de este documento puede
  ser obtenida del Linux Documentation Project,
  http://sunsite.unc.edu/mdw/linux.html. La versin no oficial ms
  reciente puede ser obtenida de http://laplace.snu.ac.kr/~wacko/howto/.

  Una versin en coreano de este documento (un poco desfasada) est
  disponible en http://plaza.snu.ac.kr/~wacko/howto/Sound-Playing-
  HOWTO.ks.

  Una versin en japons de este documento est disponible en
  http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/euc/Sound-Playing-HOWTO.euc.

  La ltima versin Oficial (INSFLUG) en espaol del documento que est
  leyendo estar siempre en http://www.insflug.org, y en la pgina del
  traductor,
  http://www.geocities.com/SiliconValley/Vista/4289/Reproducir-sonido-
  index.html.

  2.4.  Comentarios

  No lo s todo, y no uso todas las aplicaciones aqu listadas (algunas
  no las puedo ni probar), as que seguro que hay errores. Por otro
  lado, los programas evolucionan continuamente, de tal forma que la
  documentacin tiende a quedarse desfasada. Por lo tanto, si encuentra
  algo incorrecto, por favor enveme a wacko@power1.snu.ac.kr cualquier
  correccin. Las Sugerencias o adiciones a este documento sern
  bienvenidas.

  2.5.  Agradecimientos

  A todos los autores de las aplicaciones descritas en este COMO.
  Tambin a Hannu Savolainen por el estupendo controlador de sonido y a
  Linus Torvalds por el gran SO que lo soporta.  Querra dar las gracias
  a Raymond Nijssen (raymond@es.ele.tue.nl), Jeroen Rutten
  (jeroen@es.ele.tue.nl), Antonio Prez (aperez@arrakis.es), Ian Jackson
  (ijackson@gnu.ai.mit.edu), y Peter Amstutz (amstpi@freenet.tlh.fl.us)
  por sus informaciones y ayuda.

  3.  Reproduccin de diversos formatos de sonido

  Hay muchos tipos de formatos de sonido (WAV, MIDI, MPEG, etc...). A
  continuacin son enumerados, as como las aplicaciones que pueden ser
  usadas para reproducirlos.

  3.1.  MIDI

  MIDI proviene de Musical Instrument Device Interface. Los ficheros
  midi tienen normalmente la extensin .mid.  Contienen informacin de
  secuenciado, es decir, acerca de cundo tocar qu instrumento y de qu
  forma, etc.  Segn su hardware (y tal vez dependiendo del sofware que
  use para reproducirlo), el sonido puede ser excelente, o bien
  insufrible.

  3.1.1.  El conjunto adagio

  Este conjunto incluye mp (un reproductor de ficheros MIDI desde la
  lnea de comandos) y xmp (un reproductor de ficheros basado en XView).
  Necesitar las extensiones SlingShot para usar xmp.  Tambin contiene
  otros programas para reproducir partituras de Adagio.

  Si tiene una GUS, mp puede reproducir ficheros MOD (vase la seccin
  ``Mdulos'' para ms informacin).

  Un pequeo y molesto fallo (en la versin 0.5) es que el sonido acaba
  bruscamente al final. En vez de terminar el sonido en la forma
  especificada por el fichero MIDI, acaba repitiendo la nota
  inmediatamente anterior a la final durante un largo intervalo de
  tiempo. Esto no ha hecho que deje de usar mp, pero puede disuadir a
  alguien de usarlo para trabajo 'de verdad'. Tambin arranca de forma
  relativamente lenta.

  El programa no contiene ninguna informacin de copyright (al menos
  ninguna que haya sido capaz de encontrar), as que asumo que puede ser
  libremente redistribuido y modificado. No me tome al pie de la letra,
  de todas formas. (Por una interpretacin estricta de la ley de
  copyright, nada nos da el derecho de hacer estas cosas, pero no creo
  que sta fuese la intencin del autor.)

  Existe una versin del CMU MIDI Toolkit para Linux (aunque hay
  suficientes adiciones como para que no sea una simple conversin) cuyo
  autor es Greg Lee, lee@uhunix.uhcc.hawaii.edu.

  Puede ser encontrada en
  ftp://tsx-11.mit.edu/pub/linux/packages/sound/adagio05.tar.gz Los
  ficheros binarios includos estn en formato a.out (enlazados con
  libreras antiguas) y el fichero xmp da un fallo de segmentacin en el
  entorno X11R6 (XFree86 3.1.1, libc 4.7.2).  El fichero mp funciona
  bien en un entorno a.out.

  Necesitar un poco de maa para compilarlo. Realmente, no es muy
  difcil.  Todo lo que tiene que hacer es incluir el modificador -lfl
  al final de SHROBJ y XMPOBJ en el fichero Makefile.  Esto es para
  enlazarlo con la librera flex, que no es enlazada por defecto. Siga a
  continuacin las instrucciones de instalacin. Y no olvide instalar
  las extensiones XView y SlingShot si quiere compilar xmp.

  3.1.2.  TiMidity

  Alguna gente recomienda este programa experimental por su buen sonido
  (y es cierto, es mucho mejor que mp en una Sound Blaster 16, y
  probablemente no sea muy diferente en una GUS).  Sin embargo, tiene
  como inconveniente el importante uso de la CPU. Reproduce ficheros
  MIDI mediante una conversin a formato WAV y despus reproduce este
  ltimo (tambin puede convertir un fichero MIDI en un WAV sin
  reproducirlo si lo desea). Esta es la razn de su uso intensivo de la
  CPU.

  Tambin tiene una interfaces ncurses, SLang, Tcl/Tk y Motif.

  Necesita un parche para poder usarlo con tarjetas Gravis Ultrasound.
  Consulte la FAQ incluida con TiMidity para ms informacin.

  El autor es Tuukka Toivonen, tt@cgs.fi).

  La ltima versin de timidity puede ser encontrada en
  http://www.cgs.fi/~tt/timidity/.  Esta pgina tambin contiene un
  enlace a una pequea librera de parches para GUS. La versin Motif
  puede obtenerse de http://www.loria.fr/~pagel

  3.1.3.  playmidi

  Este es un reproductor de MIDI que funciona con FM, GUS y MIDI
  externo.  Se dice que comienza ms rpidamente que otros. Tambin es
  capaz de reproducir ficheros Creative Music, Microsoft RIFF y ficheros
  MIDI de gran tamao de juegos como Ultima 7.

  Tiene una interfaz bajo X y otra para SVGA. Tambin tiene una opcin
  para reproduccin en tiempo real siguiendo todas las notas en cada
  canal y la velocidad de reproduccin (incluido automticamente con
  xplaymidi y splaymidi).

  Debera hacer algo como

       $ splaymidi foo.mid; stty sane

  si va a usar la interfaz SVGA, porque no reinicializa el modo tty del
  terminal correctamente. La interfaz SVGA es susceptible de ser
  eliminada prximamente.

  Ha sido realizado por Nathan Laredo, laredo@gnu.ai.mit.edu o
  laredo@ix.netcom.com).

  Puede ser obtenido por FTP annimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/playmidi-2.3.tar.gz

  3.2.  Mdulos

  Los mdulos (en el campo de la msica por ordenador) son ficheros de
  msica digital, compuestos de un conjunto de muestras y de informacin
  de secuenciado, que indican al reproductor cundo reproducir qu
  muestra (instrumento) en qu pista y en qu tono, y realizando
  opcionalmente un efecto como vibrato, por ejemplo.

  Una ventaja que tiene sobre MIDI es que puede incluir casi cualquier
  tipo de sonido (incluyendo voces humanas). Otra es que suena
  exactamente igual en cualquier sistema, porque las muestras estn en
  el mdulo.  Una desventaja que tiene es que es mucho ms grande que
  MIDI. Adems, no tiene ningn formato estndar (el nico verdadero es
  el ProTracker, con el que muchos mdulos no son compatibles). Apareci
  en el Amiga.

  Normalmente tienen la extensin .mod. Hay muchas otras extensiones
  dependiendo de en qu formato estn.

  3.2.1.  tracker

  Este programa portable (ha sido portado a muchas plataformas)
  reproduce mdulos de msica SoundTracker y ProTracker. Usa solamente
  salida de 16 bits en estreo, y considero que la calidad es muy buena.
  Si necesita una forma simple de reducir el uso de la CPU, use la
  opcin -mono.

  Es un programa giftware citando al autor, Marc Espie,
  Marc.Espie@ens.fr).

  Puede encontrar una versin con el fichero Makefile modificado para
  Linux en
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tracker-4.3-linux.tar.gz

  3.2.2.  gmod

  ste es un reproductor de mdulos para la tarjeta Gravis Ultrasound.
  Soporta los formatos MOD de 4/6/8 pistas, 8 pistas 669, MultiTracker
  (MTM), UltraTracker (ULT), FastTracker (XM) y ScreamTracker III (S3M).

  Requiere la versin 3.0 o posterior de el controlador de sonido. Y una
  GUS, por supuesto. Tal vez tenga que modificar el ncleo para hacer
  que el control de volumen funcione de la forma deseada.

  Tiene una interfaz X. Usa las libreras QT (versin 0.99 o superior).
  Vea http://www.troll.no/ para informacin sobre QT.

  Puede ser libremente distribuido. Fue escrito originalmente por Hannu
  Savolainen, y ahora es mantenido por Andrew J. Robinson,
  robinson@cnj.digex.net.

  Puede ser encontrado por ftp annimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/gmod+x-3.0.1.tgz

  3.2.3.  MikMod

  Este reproductor de mdulos reconoce los formatos XM, ULT, STM, S3M,
  MTM, MOD y UNI. (El formato UNI es uno interno usado por MikMod).
  Soporta los mdulos comprimidos. Usa sonido estreo de 16 bits como
  salida. Use la opcin -m (para sonido monoaural) si necesita una forma
  sencilla de reducir el uso de la CPU.

  La versin para Unix usa ncurses o Tcl/Tk para su interfaz.  Tambin
  puede ser usado como una librera, y no slo como un programa
  independiente.

  Ha sido escrito por Jean-Paul Mikkers, mikmak@via.nl). Ahora es
  mantenido por Jake Stine, dracoir@epix.net).

  Es shareware que tiene que ser registrado si desea usarlo
  comercialmente.  Tambin necesita permiso para distribuirlo
  comercialmente (la distribucin no comercial no lo necesita).

  La versin para Unix puede ser encontrada en
  http://www.aics.net/~amstutz/mikmod.html.

  3.2.4.  xmp

  ste es un reproductor de mdulos (no confundir con el xmp de Adagio)
  que puede reproducir MOD, S3M, STM, 669, y mdulos XM (otros formatos
  tambin son soportados, pero an estn en fase experimental o
  incompletos) en tarjetas de sonido con tabla de sntesis de ondas (GUS
  o SoundBlaster 32AWE), o en sistemas con SoftOSS (un controlador de
  sntesis wavetable por software), En un futuro prximo la salida
  ordinaria DSP debera ser posible igualmente.

  Tambin est disponible una interfaz bajo xmp.

  Fue escrito por Claudio Matsuoka (claudio@brasil.enemy.org y H.
  Carraro Jr.

  Puede ser encontrado en http://www.mardre.net/~claudio/xmp.

  3.2.5.  s3mod

  Reproduce mdulos MOD de 4/6/8 pistas y mdulos de Scream Tracker 3.
  Usa salida monoaural de 8 bits con una frecuencia de muestreo de 22000
  Hz por defecto. Puede usar la opcin -s para usar estreo, -b para
  habilitar la salida de 16 bits, y -f para especificar la frecuencia de
  muestreo. Sin embargo, el sonido resultante es peor que el de tracker
  (algn ruido), as que recomiendo el uso de tracker en vez de s3mod
  para reproducir ficheros MOD comunes (a menos que tenga una mquina
  poco potente). Usa mucho menos la CPU que tracker.

  El copyright pertenece a Daniel Marks y David Jeske, jeske@uiuc.edu
  pero puede hacer lo que quiera con l (excepto afirmar que lo ha
  escrito).

  Puede ser encontrado por ftp annimo en
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/s3mod-v1.09.tar.gz

  3.2.6.  mod

  Este programa en fase beta reproduce MODs (15/31 instrumentos, hasta
  32 voces), MTMs, ULTs y S3Ms en la tarjeta Gravis Ultrasound. Puede
  usar tambin mdulos comprimidos si tiene gzip, lharc, unzip, o unarj
  instalados. No puede reproducir mdulos Powerpack, o los comprimidos
  mediante ciertos compositores de Amiga (firma "PACK").
  Requiere al menos la versin 3.0 del controlador de sonido. No
  funcionar con la versin 2.90-2 o anteriores. La interfaz de texto
  requiere ncurses. Tambin est incluida una interfaz X que usa Tcl/Tk.

  Ha sido escrito por Mikael Nordqvist, mech@df.lth.se o
  d91mn@efd.lth.se.

  Puede ser encontrado por ftp annimo en
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/mod-v0.81.tgz

  3.2.7.  nspmod

  ste es un reproductor de mdulos en fase alpha que puede reproducir
  mdulos MTM, S3M y MOD. Se supone que es un reproductor de mdulos
  para tarjetas de sonido sin DSP (no se confunda con lo que Creative
  Labs llama DSP). Su uso de la CPU es similar al de tracker.

  Tiene una funcin que permite que los mdulos se reproduzcan en bucles
  si as lo especifican. El nmero de bucles puede ser limitado mediante
  la opcin -l.  Tan solo usa 8 bit en la salida de sonido (en la
  versin 0.1).

  Ha sido escrito por Toru Egashira, toru@jms.jeton.or.jp.

  Puede ser encontrado por ftp annimo en
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/nspmod-0.1.tar.gz.

  3.2.8.  yampmod

  Este programa en fase alpha ha sido concebido para reproducir mdulos
  de 4 canales usando el mnimo de recursos de la CPU. No fue diseado
  para producir sonido de alta calidad. As que slo produce sonido de
  22 kHz en monoaural.  Adems, la salida no es tan "limpia" como
  debera, lo que refleja su condicin de software en fase alpha.

  Ha sido escrito por David Groves, djg@djghome.demon.co.uk.

  Est disponible por ftp en
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/yampmod-0.1.tar.gz

  3.3.  Ficheros de sonido MPEG

  MPEG es un estndar que especifica la codificacin de video y del
  audio asociado para almacenamiento digital. MPEG est normalmente
  asociado al video, pero la parte de audio del estndar puede ser usada
  por separado.

  sta define tres niveles: nivel I, II, y III.  Los reproductores que
  pueden decodificar los niveles superiores tambin pueden decodificar
  las inferiores. (ej: un reproductor de nivel III puede reproducir los
  ficheros de tipo II). Los ficheros MPEG de tipo I tienen
  corrientemente la extensin .mpg (as que si un fichero no puede ser
  reproducido por un reproductor de video MPEG, es probablemente de
  audio).; los de tipo II normalmente .mp2 y los de tipo III suelen
  tener .mp3. La compresin del sonido es bastante buena. Un fichero de
  tipo MPEG II de dos megabytes ocupara probablemente hasta 25
  megabytes en un fichero de muestras PCM con la misma calidad.

  3.3.1.  mpg123

  Este programa beta es un reproductor de audio MPEG eficiente, con
  soporte para mpeg 1.0/2.0 de niveles I, II y III. Est basado en el
  cdigo de muchas fuentes. Es capaz de reproducir en tiempo real flujos
  ledos por HTTP (es decir, uno puede reproducir audio MPEG
  directamente desde la World Wide Web).

  El autor principal es Michael Hipp, Michael.Hipp@student.uni-
  tuebingen.de. Puede ser usado y distribuido sin modificar libremente
  para fines no comerciales.  Su inclusin en una coleccin de software
  libre (como en imgenes de CD-ROM de servidores FTP) est
  explicitamente permitida.

  La ltima versin puede ser obtenida de http://www.heim3.tu-
  clausthal.de/~olli/mpg123/.

  3.3.2.  maplay 1.2

  Este reproductor de audio MPEG tan slo soporta los niveles I y II.
  Carece de soporte para el nivel III en la versin 1.2. Soporta
  tarjetas de sonido de 16 bits bajo Linux (sin embargo, los rumores
  dicen que algunas tarjetas de 16 bits no funcionan con maplay.

  Usa muchos recursos de la CPU, tomando hasta alrededor de 55% del
  tiempo de proceso en un Pentium 60MHz. La salida es intolerable en un
  486 66MHz porque la CPU simplemente no puede seguir el sonido. Si esto
  le ocurre, intente reproducir solamente un lado del flujo de sonido
  (con las opciones -l o -r), en vez del estreo por defecto.

  Un ligero cambio en uno de los ficheros puede ser necesario para
  compilarlo. Necesitar aadir la lnea siguiente al comienzo del
  fichero configuration.sh.

       #! /bin/sh

  maplay 1.2 puede ser obtenido por ftp annimo de ftp://ftp.cs.tu-
  berlin.de/pub/multimedia/maplay1.2/maplay1_2.tar

  3.3.3.  maplay 1.3b

  Esta es una modificacin no oficial (es decir, no del autor original)
  de maplay 1.2, que puede ejecutarse con un uso de la CPU menor.
  Consigue sto principalmente haciendo que la salida u-law funcione
  realmente en otras plataformas aparte de SPARC. Tenga en cuenta que
  usa u-law como salida por defecto, as que la calidad del sonido es
  menor.

  Las modificaciones fueron hechas por Orlando Andico,
  orly@gibson.eee.upd.edu.ph.

  Se puede obtener via ftp annimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay-1.3b-
  Linux.tar.gz.

  3.3.4.  maplay3

  Otro derivado de maplay 1.2. Aade soporte para audio MPEG de nivel
  III. En estos momentos parece tener ciertos fallos en su reproduccin
  (se oyen algunos ruidos agudos). Tendr que probar con las opciones
  para solucionar esto.

  Las modificaciones fueron realizadas por Timo Jantunen,
  timo.jantunen@hut.fi o jeti@cc.hut.fi. Dice que se puede usar
  libremente, pero no se permite ganar dinero. Sin embargo, no estoy
  totalmente seguro de la validez de este copyright, puesto que el
  maplay original est bajo la licencia GNU General Public License, que
  no permite que los trabajos derivados tengan un copyright diferente.

  Se puede obtener via ftp annimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay3.tar.gz.

  3.3.5.  splay

  Este player beta es otro derivado de maplay 1.2 (realmente, es un
  derivado de maplay 1.2+, que es un derivado de maplay 1.2 para MS
  Windows solamente).  Aade soporte para audio MPEG de nivel III.
  Tambin puede reproducir ficheros WAV. Adems, es capaz de reproducir
  audio recibido a travs de una conexin HTTP.

  Otra caracterstica de splay es que puede ser usado como una librera
  (bajo la LGPL), as que puede ser usado en otros programas. Tambin
  intenta mejorar el rendimiento usando threading (necesita pthreads
  para usar esta caracterstica) y un poco de ensamblador.

  splay usa una interfaz de lnea de comando y opcionalmente una
  interfaz bajo X (que usa QT).

  Si despus de compilarlo no funciona (por ejemplo, da fallos de
  segmentacin), intente recompilarlo de nuevo sin threading.

  Es de Jung Woo-jae jwj95@eve.kaist.ac.kr.

  Puede ser obtenido desde http://adam.kaist.ac.kr/~jwj95/.

  3.3.6.  Sajber Jukebox

  Este programa es un reproductor MPEG con una interfaz grfica. Est
  basado en splay, as que incluye soporte para MPEG de nivel I, II y
  III.  Tambin puede reproducir audio MPEG en tiempo real, mediante una
  conexin HTTP. Es adems fcil de configurar.

  Usa las libreras QT, http://www.troll.no/ (al menos la versin 1.2).
  Tambin usa la librera LinuxThreads,
  http://pauillac.inria.fr/~xleroy/linuxthreads/ (el binario incluido
  slo funciona con la versin 0.5).

  El autor es Joel Lindholm, wizball@kewl.campus.luth.se.

  La ltima versin puede obtenerse por
  ftp://kewl.campus.luth.se/pub/jukebox.

  3.3.7.  amp

  Este reproductor MPEG beta slo soporta audio MPEG de nivel III.
  Puede reproducir directamente a la tarjeta de sonido, o dar salida a
  ficheros PCM o WAV en bruto o sin cabecera. Tambin usa bastante CPU
  (alrededor de 60% en un Pentium 133MHz).

  Fue escrito por Tomislav Uzelac, tuzelac@rasip.fer.hr.  Puede ser
  usado y distribuido libremente, mientras no sea vendido comercialmente
  sin permiso (sin embargo, est explcitamente permitido incluirlo en
  CD-ROMs que contengan software libre).

  Puede ser obtenido por ftp://ftp.rasip.fer.hr/pub/mpeg/amp-0.7.3.tgz.

  3.3.8.  XAudio

  Esta librera alpha fue escrita para ser una implementacin rpida de
  una librera de descompresin MPEG para varias interfaces grficas.
  Soporta audio MPEG de nivel I, II y III. Puede acceder aleatoriamente
  al flujo de audio. Se incluye una interfaz de lnea de comandos, al
  igual que una bajo Motif (Lesstif)  en la versin para Linux.

  Es de Gilles Boccon-Gibod, Alain Jobart y otros. Las interfaces para
  la librera pueden ser descargadas libremente. La librera en s debe
  ser licenciada para usarla (una licencia para cdigo fuente y binarios
  tambin est disponible).

  Las interfaces de la librera pueden obtenerse de
  http://www.mpeg.org/xaudio/.

  3.3.9.  Shareware l3dec-l3enc  Codificador/decodificador de nivel III

  Este es realmente un conversor que transforma los ficheros MPEG de
  nivel III en WAV, AIFF, SND, AIFC, o ficheros de mustra PCM. La
  versin para Linux no reproduce directamente el sonido con la tarjeta.
  Se tiene que transformar en primer lugar a otro formato.

  Sin embargo, cuando intente reproducir un fichero convertido mediante
  sox, seguramente obtendr slo ruido porque el orden de los bytes en
  las muestras PCM no es correcto (al menos en las plataformas Intel).
  Necesitar dar a sox la opcin -x para resolver el problema.  Hay
  algunos reproductores que no necesitan que le indique el orden de los
  bytes, as que no tendr que preocuparse de esto.

  Si tiene un ordenador muy rpido (al menos un Pentium a 90Mhz),
  entonces puede intentar reproducirlo directamente sin convertir el
  fichero MPEG a otro formato, como en el ejemplo siguiente (este
  ejemplo asume que est usando sox y reproduciendo una muestra de 44.1
  kHz estreo).

       $ l3dec foo.mp3 -sto | play -t raw -x -u -w -c 2 -r 44100 -

  El nmero tras -r es la frecuencia de muestreo de audio, y el nmero
  tras -c depende de si es mono o estreo (o incluso tetrafnico). Si
  esto parece muy complicado, o incmodo de usar continuamente, puede
  crearse algo como un script o un alias.

  Este es shareware con copyright de Fraunhofer-IIS. Hay disponible una
  versin de evaluacin para Linux (sistemas x86) por ftp annimo en
  ftp://ftp.fhg.de/pub/layer3  Slo convierte audio MPEG de nivel III.

  3.4.  WAV

  Cita de la pgina man de sox:

       Parecen ser muy similares a los ficheros IFF, pero no
       iguales. Son el formato de fichero nativo de Windows 3.1.
       Obviamente, Windows 3.1 es de una importancia tan increible
       para la industria de la computacin que simplemente tena
       que tener su propio formato de fichero de sonido.

  Normalmente tienen la extensin .wav.

  Vea tambin la seccin ``sox'' y ``bplay'' para otros reproductores de
  WAV aparte de los listados aqu.

  3.4.1.  wavplay

  Este programa tiene una interfaz de lnea de comandos y otra para X
  Window para reproducir y grabar en formato WAV. Usa locking as que
  slo un sonido puede ser reproducido a la vez. Su capacidades de
  locking pueden ser usadas separadamente de las de reproduccin de
  sonido.

  Adems de su interfaz de lnea de comandos, tambin tiene una para
  Motif, que puede ser usada con Lesstif.

  Fue originalmente escrito por Andre Fuechsel, af1@irz.inf.tu-
  dresden.de, y la implementacin actual es de Warren W. Gay,
  bx249@freenet.toronto.on.ca o mailto:wwg@ica.net.

  Se puede obtener via ftp annimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/wavplay-1.0.tar.gz.

  3.4.2.  XWave

  Este programa est basado en wavplay. Tambin tiene una intefaz para X
  Window para reproducir y grabar en formato WAV. Sin embargo, tambin
  tiene ciertas capacidades de edicin y puede aadir efectos.

  Todava tiene fallos, as que el autor apreciara cualquier informe de
  fallo, correcciones, o nuevo cdigo.

  Es cardware, o en otras palabras puede distribuirlo libremente si lo
  registra enviando al autor una postal. Pero lo puede usar sin
  registrarse, mientras no le cojan???

  El autor es Will Fish fishwj@ee.port.ac.uk.

  XWave puede ser encontrado en
  ftp://ftp.ee.port.ac.uk/pub/linux/sound/xwave0.01-1.tar.gz.

  3.5.  Otras cosas

  Esta seccin lista programas que reproducen sonido y que no merecen
  una seccin aparte (es decir, formatos para los que slo hay un
  reproductor disponible).

  3.5.1.  sox

  Este programa es realmente un convertidor, es decir que convierte
  sonido de un formato a otro. Cuando es invocado como play, sin
  embargo, reproduce el sonido (la aplicacin play del Sonido COMO
  probablemente se refiere a esto).

  Soporta binarios en bruto (sin cabecera)  y dato textual, archivos
  IRCAM, Sound Blaster .voc, SPARC .au (con cabecera), Mac HCOM, PC/DOS
  Beach .smp, CD-R (CDAudio, segn el libro naranja), y Apple/sGI AIFF
  as como formatos 8SVX.

  A partir de los kernel 1.3.6x, puede que tenga que hacer un pequeo
  cambio en un archivo para hacer que reproduzca el sonido directamente.
  Concretamente, tal vez deba cambiar la linea 179 en sbdsp.c de

               if (abuf_size < 4096 || abuf_size > 65536) {

  a

               if (abuf_size < 1 || abuf_size > 65536) {

  Pero de nuevo, tal vez no tenga que hacer esto; hacerlo no estropear
  nada.

  Ha sido escrito por mucha gente, y puede ser usado para cualquier
  propsito.

  Puede encontrarse por ftp annimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/Lsox-linux.tar.gz.

  Una versin ms reciente de Chris Bagwell,
  cbagwell@mwsun026.aud.alcatel.com, est basado en la ltima versin
  gamma del sox original, y puede obtenerse por ftp de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/sox-11gamma-
  cb3.tar.gz

  3.5.2.  bplay

  Este programa beta reproduce audio bruto, WAV y VOC. Tambin puede
  grabar a estos ficheros. Usa varias tcnicas para lograr la mxima
  velocidad posible, as que puede ejecutarse aceptablemente incluso en
  mquinas lentas. Una de esas tcnicas requiere que los programas
  instalados sean setuid root. Los paranoicos que quieran usarlo podrn
  querer el paquete Debian de Ian Jackson, ijackson@gnu.ai.mit.edu, que
  desconecta la caracterstica que necesita el bit setuid.

  El autor es David Monro, davidm@gh.cs.usyd.edu.au.

  Puede obtenerse por ftp annimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/bplay-0.96.tar.gz

  3.5.3.  SIDPLAY

  Este programa emula el chip "Sound Interface Device" (MOS 6581,
  comnmente llamado SID) y la unidad de micro procesador (MOS 6510) del
  Commodore 64.  Por sto, es capaz de cargar y ejecutar programas en
  cdigo mquina de C64 que producen msica o sonido. En general estos
  fragmentos de cdigo y datos han sido extrados de juegos y programas
  de demostracin que han sido transferidos directamente desde el C64.

  Usa una interfaz de lnea de comandos por defecto. Tambin hay
  interfaces para Tk y QT disponibles separadas desde la pgina
  principal.

  Es mantenido por Michael Schwendt, sidplay@geocities.com.

  Puede obtenerse de http://www.geocities.com/SiliconValley/Lakes/5147/.

  3.5.4.  RealAudio Player

  Esto le permite escuchar el sonido en tiempo real a travs de Internet
  sin descargar el fichero completo antes. Puede ser usado solo, pero
  est realmente diseado para ser usado con un navegador web (los
  explcitamente soportados son Mosaic y Netscape). No puede ser usado
  sin X (no sera capaz de hacerlo funcionar con Lynx en una consola de
  texto).

  Es de Progressive Networks, Inc. No puede ser redistribuido,
  modificado, etc. Mire la licencia para detalles exactos sobre lo que
  puede hacer.  Puede ser obtenido mediante un registro gratuito en la
  pgina de RealAudio, http://www.realaudio.com/.

  3.5.5.  cat

  Uno podra preguntarse qu tiene que ver cat, la utilidad de
  concatenacin, con la reproduccin de sonidos. Mostrar su uso a
  travs de un ejemplo.

       $ cat sample.voc > /dev/dsp
       $ cat sample.wav > /dev/dsp
       $ cat sample.au > /dev/audio

  Hacer un cat de un fichero .au a /dev/audio normalmente funcionar, y
  si tiene bastante suerte y el fichero tiene el orden adecuado de bytes
  (para su plataforma), etc., un cat de un fichero de sonido que una
  muestras PCM (como .wav o .voc) a /dev/dsp puede incluso sonar bien.

  Esto no supone un uso absurdo de cat. Puede ser til, por ejemplo si
  tiene un fichero de sonido que ninguno de sus programas reconoce, y
  sabe que usa muestras PCM; entonces puede hacerse una idea muy
  aproximada de como suena de esta forma (si tiene suerte).

  4.  Otras utilidades de sonido

  Esta seccin no tiene nada que ver con la reproduccin de sonido. Ms
  bien, es una coleccin de algunas utilidades que pueden ser tiles.

  4.1.  volume

  Es una interfaz de lnea de comandos para controlar el volumen (que
  otra cosa podra ser?). Tambin tiene un programa independiente con
  una interfaz Tcl/Tk incluido en el paquete para controlar el volumen y
  reproducir ficheros .au. Un reproductor Tcl/Tk de CD, muy simple, est
  tambin incluido.

  Es Freeware, escrito por Sam Lantinga, slouken@cs.ucdavis.edu.

  Puede ser obtenido de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/soundcard/volume-2.1.tar.gz.

  4.2.  Sound Studio

  sta es una aplicacin Tcl/Tk que soporta reproduccin, grabacin y
  edicin de sonido digital mediante sox.  Incluye sox en la
  distribucin para evitar problemas de compatibilidad.

  Fue escrito por Paul Sharpe y N. J. Bailey, N.J.Bailey@leeds.ac.uk.
  Puede ser usado y redistribuido libremente si les enva una postal.

  Puede ser encontrado en http://www.elec-
  eng.leeds.ac.uk/staff/een6njb/Software/Studio/screens.html.

  4.3.  setmixer

  Este es un mezclador de lnea de comandos.

  El autor es Michal Jaegermann, michal@ellpspace.math.ualberta.ca.

  4.4.  Tickle Music

  Este programa Tcl/Tk beta es un navegador de ficheros de msica que le
  permite reproducir varios formatos mientras tenga un programa
  apropiado en su sistema. Por defecto gmod es usado para reproducir
  fichero MOD y mp para MIDI (puede modificar el cdigo fuente para usar
  otros programas).

  Ha escrito por Shannon Hendrix shendrix@pcs.cnu.edu o
  shendrix@escape.widomaker.com, a quien pertenece el copyright.

  Puede ser obtenerse por ftp annimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tmusic-1.0.tar.gz

  5.  Referencias

  1. La documentacin incluida con las aplicaciones referenciadas en
     este documento.

  2. El Sonido En Linux - COMO, disponible en el INSFLUG, vea la seccin
     ``''.

  3. The Linux MIDI and Sound Pages

  4. alt.binaries.sounds.mods FAQ

  5. MPEG Audio Layer 3 FAQ

  6. Programmer's Guide to OSS

  7. SoX home page

  6.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Traducido a 9 de Octubre de 1996 Samba COMO
  David Wood, dwood@plugged.net.au
  Traducido por: Ricardo Javier Crdenes Medina,
  a1402@correo.dis.ulpgc.es
  v1.0, 10 de Agosto de 1996

  Este documento describe la manera de usar el paquete Samba, que dota a
  Linux de soporte para el protocolo Session Message Block (SMB),
  tambin llamado NetBIOS o LanManager.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Ms Informacin

  3.      Instalacin

  4.      Ejecutando los demonios

  5.      Configuracin General ( /etc/smb.conf )

  6.      Compartiendo Una Unidad Linux Con Mquinas Windows

  7.      Compartiendo Una Unidad Windows Con Mquinas Linux

  8.      Compartiendo Una Impresora Linux Con Mquinas Windows

  9.      Compartiendo Una Impresora Windows Con Mquinas Linux

  10.     Copyright

  11.     Reconocimientos

  12.     Notas sobre/del traductor

  13.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Este el es SMB COMO. Describe cmo usar el protocolo Session Message
  Block (SMB), tambin llamado protocolo NetBIOS o LanManager, con el
  Linux.

  Este documento es mantenido por David Wood (dwood@plugged.net.au).
  Cualquier aadido, modificacin o correccin puedes enviarla aqu para
  incluirla en la siguiente entrega.

  El protocolo SMB es usado por Microsoft Windows 3.11, NT y 95 para
  compartir discos e impresoras. Usando el paquete de herramientas Samba
  creado por Andrew Tridgell, las mquinas UNIX (incluyendo Linux)
  pueden compartir discos e impresoras con servidores Windows.

  Hay cuatro cosas que uno puede hacer con Samba:

  1. Compartir una unidad de Linux con mquinas Windows.

  2. Compartir una unidad de Windows con mquinas Linux.

  3. Compartir una impresora de Linux con mquinas Windows.

  4. Compartir una impresora de Windows con mquinas Linux.

  Todos estos puntos estn cubiertos en este documento.

  Excusatorio: Los procedimientos y scripts le funcionan al autor o se
  sabe que les funciona a la gente que los don. Algunas configuraciones
  pueden dar problemas con la informacin que aqu se da. Si te
  encuentras en tal situacin, puedes mandar un e-mail al autor con
  sugerencias para mejorar este documento, pero el autor no garantiza
  nada. Qu esperabas? El autor tambin es un experto, despus de
  todo...

  2.  Ms Informacin

  Este COMO intenta explicar la configuracin de servicios SMB bsicos
  de ficheros e impresoras en una mquina Linux. Samba es un paquete muy
  complejo y completo.  No debera haber razn para duplicar toda la
  documentacin de Samba aqu.

  Para mayor informacin, por favor lee alguno de estos documentos:

    La documentacin de Samba, disponible en el paquete de distribucin
     del Samba. El paquete est disponible en:
     ftp://nimbus.anu.edu.au/pub/tridge/samba/

    El COMO "Imprimiendo en Linux". (Linux Printing HOWTO)

    El Mini-HOWTO Print2Win.

  3.  Instalacin

  La ltima versin del cdigo de Samba est disponible en:

  ftp://nimbus.anu.edu.au/pub/tridge/samba/

  De todas maneras, si has instalado la distribucin RedHat de Linux,
  tienes la opcin de instalarlo como paquete. Algunas otras
  distribuciones tambin incluyen los ejecutables de Samba.

  Se requieren los dos demonios siguientes para el paquete Samba. Se
  suelen instalar en /usr/sbin y se pueden ejecutar tanto desde los
  scripts de arranque del sistema como desde inetd. Algunos scripts de
  ejemplo los puedes ver en ``Ejecutando los demonios''.

    smbd (El demonio de SMB)

    nmbd (Provee un nameserver de NetBIOS para soporte de clientes)

  Habitualmente, se instalan en /usr/bin los siguientes ejecutables de
  Samba, aunque la localizacin (como de costumbre) es opcional.

    smbclient       (Un cliente SMB para maquinas UNIX)

    smbprint        (Un script para imprimir a una impresora en un
     servidor SMB)

    smbprint.sysv   (Como el de encima, pero para mquinas UNIX SVR4)

    smbstatus       (Lista de las conexiones SMB en marcha en el
     servidor local)

    smbrun          (Un script 'cola' para facilitar la ejecucin de
     aplicaciones en servidores )

  Adicionalmente, se incluye en este COMO un script llamado 'print', que
  sirve como un til front end para el script smbprint.

  El paquete Samba es sencillo de instalar. Simplemente consigue el
  cdigo fuente del servidor que nombramos antes, y lee el fichero
  README de la distribucin.  Hay tambin un fichero llamado
  docs/INSTALL.txt en la distribucin que te da un sencillo conjunto de
  instrucciones paso a paso.

  Siguiendo con la instalacin, pon los demonios en /usr/sbin y los
  ejecutables en /usr/bin. Instala las pginas del manual en
  /usr/local/man.

  Cuando compiles el paquete Samba, deberas especificar en el Makefile
  la localizacin del fichero de configuracin, smb.conf. Generalmente
  debera estar en /etc, pero puedes ponerlo donde quieras. A estas
  alturas, presumimos que especificaste la localizacin del fichero de
  configuracin como /etc/smb.conf, el fichero de registro como
  /var/log/samba-log.%m y el directorio de bloqueo como /var/lock/samba

  Instala el fichero de configuracin, smb.conf. Ve al directorio donde
  se compil el Samba. Mira en el directorio examples/simple y lee el
  fichero README. En ese directorio encontrars el fichero smb.conf.
  Cpialo en /etc. TEN CUIDADO! Si tienes una distribucin de Linux que
  tiene el Samba instalado ya, puede que ya tengas un fichero de
  configuracin en /etc. Probablemente deberas usar el antiguo.

  Si no quieres que tu configuracin est en /etc, ponla donde quieras y
  luego pon un enlace simblico en /etc:

               ln -s /path/to/smb.conf /etc/smb.conf

  4.  Ejecutando los demonios

  Los dos demonios de SMB son /usr/bin/smbd y /usr/sbin/nmbd.

  Puedes ejecutar los demonios de Samba desde inetd o como procesos
  independientes . Si ests configurando un servidor de ficheros
  permanente, deberan ejecutarse desde inetd para que sean reejecutados
  si 'mueren'. Si solo quieres usar los servicios SMB de vez en cuando o
  como ayuda a la administracin del sistema, puedes ejecutarlos con un
  script en /etc/rc.d/init.d o incluso a mano cuando los necesites.

  Para ejecutar los demonios desde inetd, pon las siguientes lneas en
  el fichero de configuracin de inetd, /etc/inetd.conf:

           # Servicios SAMBA NetBIOS (para comparticin de ficheros e impresoras en PC)
           netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
           netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd

  Entonces reejecuta inetd con el siguiente comando:

           kill -HUP 1

  Para ejecutarlos desde los scripts de inicio del sistema, pon las
  siguientes lneas en /etc/rc.d/init.d/smb y hazle un enlace simblico
  con los ficheros indicados en los comentarios:

       ______________________________________________________________________
           #!/bin/sh
           #
           # /etc/rc.d/init.d/smb - comienza y termina los servicios SMB.
           #
           # Se deben crear los siguientes ficheros como enlaces simbolicos a este fichero:
           # symlinks: /etc/rc.d/rc1.d/K35smb  (Termina los servicios SMB al cerrar el sistema)
           #           /etc/rc.d/rc3.d/S91smb  (Comienza los servicios SMB en modo multiusuario)
           #           /etc/rc.d/rc6.d/K35smb  (Termina los servicios SMB al hacer un reboot)
           #

           # Libreria de funciones
           . /etc/rc.d/init.d/functions

           # Configuracion de red
           . /etc/sysconfig/network

           # Asegurarse que la red esta a punto
           [ ${NETWORKING} = "no" ] && exit 0

           # Comprobar como fuimos llamados
           case "$1" in
             empezar)
               echo -n "Poniendo en marcha los servicios SMB: "
               daemon smbd -D
               daemon nmbd -D
               echo
               touch /var/lock/subsys/smb
               ;;
             parar)
               echo -n "Terminando los servicios SMB: "
               killproc smbd
               killproc nmbd
               rm -f /var/lock/subsys/smb
               echo ""
               ;;
             *)
               echo "Modo de uso: smb {empezar|parar}"
               exit 1
           esac

       ______________________________________________________________________

  5.  Configuracin General ( /etc/smb.conf )

  La configuracin de Samba en un Linux (u otra mquina UNIX) es
  controlada por un solo fichero, /etc/smb.conf. Este fichero determina
  qu recursos del sistema quieres compartir con el mundo exterior y que
  restricciones deseas poner en ellos.

  Como las siguientes secciones 'direccionarn' la comparticin de
  unidades e impresoras de Linux con mquinas Windows, el fichero
  smb.conf mostrado en esta seccin es lo ms simple posible, solo para
  propsitos introductorios.

  No te preocupes por los detalles, an. Otras secciones ms adelante
  introducirn los conceptos ms importantes.

  Cada seccin del fichero empieza con una cabecera como [global],
  [impresoras], etc.

  La seccin [global] define unas pocas variables que Samba usar para
  definir la comparticin de todos los recursos.

  La seccin [homes] permite a los usuarios remotos acceder a sus
  respectivos directorios principales en la mquina Linux local (cada
  uno al suyo nada ms). Esto es, si un usuario de Windows intenta
  conectar a este recurso desde su mquina Windows, ser conectado a su
  directorio personal. A tener en cuenta que para hacer esto, tiene que
  tener una cuenta en la mquina Linux. ;-)

  El fichero smb.conf que viene debajo como ejemplo permite a los
  usuarios remotos acceder a su directorio principal en la mquina local
  y escribir en un directorio temporal. Para que un usuario de Windows
  vea estos recursos, la mquina Linux debe estar en la red local.
  Entonces el usuario simplemente conecta una unidad de red desde el
  Explorador de Windows o el Windows File Manager.

  Fjate que en las siguientes secciones, se darn entradas adicionales
  a este fichero para permitir la comparticin de ms recursos.

  ______________________________________________________________________

  ; /etc/smb.conf
  ;
  ; Reinicia el servidor cada vez que hagas cambios a este fichero, ej:
  ; /etc/rc.d/init.d/smb parar
  ; /etc/rc.d/init.d/smb empezar

  [global]
  ; Quita el comentario a la siguiente linea si quieres cuentas de invitado
  ; guest account = nobody
     log file = /var/log/samba-log.%m
     lock directory = /var/lock/samba
     share modes = yes

  [homes]
     comment = Directorios principales
     browseable = no
     read only = no
     create mode = 0750

  [tmp]
     comment = Espacio de ficheros temporales
     path = /tmp
     read only = no
     public = yes

  ______________________________________________________________________

  6.  Compartiendo Una Unidad Linux Con Mquinas Windows

  Como se muestra en el fichero smb.conf anterior, compartir una unidad
  Linux con usuarios Windows es fcil. De todas maneras, como todo lo
  dems con Samba, puedes tener las cosas MUY controladas. Aqu tienes
  unos pocos ejemplos:

  Para compartir un directorio con todo el mundo, crea una copia de la
  seccin [tmp] aadiendo algo como esto al smb.conf:

       ______________________________________________________________________

       [public]
          comment = Cosas publicas
          path = /home/public
          public = yes
          writable = yes
          printable = yes

       ______________________________________________________________________

  Para que este directorio lo pueda leer todo el mundo, pero que slo lo
  puedan cambiar gente del grupo 'laborales', modifica la entrada de
  esta manera:

       ______________________________________________________________________

       [public]
          comment = Cosas publicas
          path = /home/public
          public = yes
          writable = yes
          printable = no
          write list = @laborales

       ______________________________________________________________________

  Para aprender otros truquillos con que jugar con las unidades
  compartidas, mira la documentacin de Samba o las pginas del man.

  7.  Compartiendo Una Unidad Windows Con Mquinas Linux

  Se incluye un programa cliente de SMB para mquinas UNIX con la
  distribucin de Samba. Provee un interfaz estilo ftp para la lnea de
  comandos. Puedes usar esta utilidad para transferir ficheros entre un
  'servidor' Windows y un cliente unix.

  Para ver qu recursos estn disponibles en un host dado, ejecuta:

           /usr/sbin/smbclient -L host

  donde 'host' es el nombre de la mquina que quieres 'ver'. Esto
  devolver un lista de nombres de 'servicios' --esto es, nombres de
  unidades o impresoras que puede compartir contigo--. A menos que el
  servidor SMB no tenga la seguridad configurada, te preguntar por una
  clave. Dale la clave de la cuenta de 'invitados' o de tu cuenta
  personal en esa mquina.

  Por ejemplo:

           smbclient -L zimmerman

  La salida de este comando debera ser algo parecido a esto:

  Server time is Sat Aug 10 15:58:27 1996
  Timezone is UTC+10.0
  Password:
  Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]

  Server=[ZIMMERMAN] User=[] Workgroup=[WORKGROUP] Domain=[]

          Sharename      Type      Comment
          ---------      ----      -------
          ADMIN$         Disk      Remote Admin
          public         Disk      Public
          C$             Disk      Default share
          IPC$           IPC       Remote IPC
          OReilly        Printer   OReilly
          print$         Disk      Printer Drivers

  This machine has a browse list:

          Server               Comment
          ---------            -------
          HOPPER               Samba 1.9.15p8
          KERNIGAN             Samba 1.9.15p8
          LOVELACE             Samba 1.9.15p8
          RITCHIE              Samba 1.9.15p8
          ZIMMERMAN

  La lista muestra otros servidores SMB con recursos para compartir con
  la red.

  Para usar el cliente, ejecuta:

           /usr/sbin/smbclient servicio <password>

  donde 'servicio' es una mquina y un servicio. Por ejemplo, si ests
  intentando entrar en un directorio que ha sido compartido como
  'public' en una mquina llamada zimmerman, el servicio debera
  llamarse \\zimmerman\public. De todas maneras, debido a restricciones
  del shell, necesitars poner las barras invertidas con secuencias de
  escape, por lo que al final saldr algo parecido a esto:

           /usr/sbin/smbclient \\\\zimmerman\\public miclave

  donde 'miclave' es una cadena literal con tu password.

  Entonces te aparecer el 'prompt' del smbclient:

  Server time is Sat Aug 10 15:58:44 1996
  Timezone is UTC+10.0
  Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]
  smb: \>

  Escribe 'h' para obtener una ayuda de como usar el cliente:

       smb: \> h
       ls             dir            lcd            cd             pwd
       get            mget           put            mput           rename
       more           mask           del            rm             mkdir
       md             rmdir          rd             prompt         recurse
       translate      lowercase      print          printmode      queue
       cancel         stat           quit           q              exit
       newer          archive        tar            blocksize      tarmode
       setmode        help           ?              !
       smb: \>

  Si sabes usar el ftp, no deberas necesitar las pginas del man del
  smbclient.

  8.  Compartiendo Una Impresora Linux Con Mquinas Windows

  Para compartir una impresora Linux con mquinas Windows, necesitas
  asegurarte de que la impresora est preparada para trabajar bajo
  Linux. Si puedes imprimir desde Linux, preparar una 'comparticin' SMB
  de la impresora es automtico.

  Mrate el COMO Imprimir (Printing HOWTO) para poner a punto la
  impresora con Linux.

  Como el autor usa una impresora conectada a una mquina Windows NT,
  esta seccin no debera ser vista como algo definitivo, sino como mera
  sugerencia.  Cualquiera que tenga detalles que compartir con el autor,
  por favor, que los mande a dwood@plugged.net.au para que esta seccin
  pueda ser completada.

  Aade la configuracin de la impresora a tu smb.conf:

  ______________________________________________________________________

  [global]
     printing = bsd
     printcap name = /etc/printcap
     load printers = yes
     log file = /var/log/samba-log.%m
     lock directory = /var/lock/samba

  [printers]
     comment = Todas las impresoras
     security = server
     path = /var/spool/lpd/lp
     browseable = no
     printable = yes
     public = yes
     writable = no
     create mode = 0700

  [ljet]
     security = server
     path = /var/spool/lpd/lp
     printer name = lp
     writable = yes
     public = yes
     printable = yes
     print command = lpr -r -h -P %p %s

  ______________________________________________________________________

  Asegrate de que el 'path' de la impresora (en este caso bajo [ljet])
  se corresponde al directorio de 'spool' en /etc/printcap!

  NOTA: Hay algunos problemas compartiendo impresoras conectadas a UNIX
  con mquinas Windows NT usando Samba. Un problema es que NT 'vea' la
  impresora compartida correctamente. Para conseguirlo, mrate las notas
  en la distribucin de Samba en el fichero docs/WinNT.txt. El otro va
  con problemas con las claves. Mrate los comentarios en ese mismo
  fichero para conseguir una molesta ganancia de conocimientos y fallos
  (jejeje) para arreglar el problema.

  9.  Compartiendo Una Impresora Windows Con Mquinas Linux

  Para compartir una impresora en una mquina Windows, debes hacer lo
  siguiente:

  a) Debes tener las entradas adecuadas en /etc/printcap y deben
  corresponderse a la estructura de directorios local (el directorio de
  spool, etc)

  b) Debes tener el script /usr/bin/smbprint. Viene con las fuentes de
  Samba, pero no con la distribucin de ejecutables del Samba. Ms abajo
  comentamos una copia ligeramente modificada.

  c) Si quieres convertir ficheros ASCII a PostScript, debes tener el
  'nenscript' o su equivalente. nenscript es un conversor de PostScript
  y habitualmente est instalado en /usr/bin.

  d) Puedes desear que las impresiones de Samba sean ms sencillas
  teniendo un front end fcil de usar. Ms abajo tienes un sencillo
  script en perl para manejar ASCII, PostScript o PostScript generado.
  La entrada para /etc/printcap que tenemos debajo es para una impresora
  HP 5MP en un host Windows NT. Las entradas son las siguientes:

  ______________________________________________________________________

          cm - comentario
          lp - nombre del dispositivo a abrir para salida
          sd - el directorio de spool de la impresora (en la mquina local)
          af - el fichero de cuentas
          mx - el tamano maximo del fichero (cero es ilimitado)
          if - nombre del fichero de entrada (script)

  ______________________________________________________________________

  Para ms informacin, lee el COMO Imprimir (Printing HOWTO) o la
  pgina del man de printcap.

       ______________________________________________________________________

       # /etc/printcap
       #
       # //zimmerman/oreilly via smbprint
       #
       lp:\
               :cm=HP 5MP PostScript OReilly en zimmerman:\
               :lp=/dev/lp1:\
               :sd=/var/spool/lpd/lp:\
               :af=/var/spool/lpd/lp/acct:\
               :mx#0:\
               :if=/usr/bin/smbprint:

       ______________________________________________________________________

  Asegrate de que los directorios de spool y cuentas existe y se puede
  escribir en ellos. Asegura tambin que la lnea 'if' tiene el path
  adecuado para el script smbprint (que damos debajo) y que apunta al
  dispositivo adecuado. (el fichero /dev especial).

  Lo siguiente es el propio script smbprint. Normalmente est en
  /usr/bin y es atribuible a Andrew Tridgell, la persona que cre el
  Samba (que yo sepa). Viene con la distribucin de las fuentes del
  Samba, pero est ausente de algunas distribuciones de ejecutables, por
  lo que lo he recreado aqu.

  Te podra interesar mirarlo con cuidado. Hay algunas pequeas
  alteraciones que han demostrado ser tiles.

  ______________________________________________________________________

  #!/bin/sh -x

  # Este script es un filtro de entrada para la impresion de printcap en
  # una maquina unix. Usa el programa smbclient para imprimir un fichero
  # en el servidor y servicio basados en smb especificados.
  # Por ejemplo, puedes tener una entrada en printcap como esta
  #
  # smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
  #
  # que creara una impresora unix llamada "smb" que imprimira a traves de
  # este script. Necesitarras crear el directorio de spool /usr/spool/smb
  # con los permisos y pertenencias apropiados para tu sistema.

  # Ahora preparalos con el servidor y servicio en que quieras imprimir
  # En este ejemplo tengo un PC WfWg llamado "lapland" que tiene una
  # impresora exportada llamada "printer" sin password.

  #
  # Script alterado por hamilton@ecnz.co.nz (Michael Hamilton)
  # para que servicio, servidor y clave puedan ser leidos desde un
  # fichero /usr/var/spool/lpd/PRINTNAME/.config
  #
  # Para que esto funcione la entrada en /etc/printcap debe incluir un
  # fichero de cuentas (af=...):
  #
  #   cdcolour:\
  #       :cm=CD IBM Colorjet on 6th:\
  #       :sd=/var/spool/lpd/cdcolour:\
  #       :af=/var/spool/lpd/cdcolour/acct:\
  #       :if=/usr/local/etc/smbprint:\
  #       :mx=0:\
  #       :lp=/dev/null:
  #
  # El fichero /usr/var/spool/lpd/PRINTNAME/.config deberia contener:
  #   servidor=SERVIDOR_PC
  #   servicio=NOMBRE_IMP
  #   clave="clave"
  #
  # Ej.
  #   servidor=PAULS_PC
  #   servicio=CJET_371
  #   clave=""

  #
  # Fichero de registro para correcciones, cambiar a /dev/null si se quiere
  #
  fichreg=/tmp/smb-print.log
  # fichreg=/dev/null

  #
  # El ultimo parametro para el filtro es el nombre del fichero de
  # cuentas
  #
  dir_spool=/var/spool/lpd/lp
  fich_config=$dir_spool/.config

  # Deberia leer las siguientes variables activadas en el fichero de
  # configuracion:
  #   servidor
  #   servicio
  #   clave
  #   usuario
  eval `cat $fich_config`
  #
  # Algo de ayuda en la correccion de errores. Cambia el >> por > si
  # quieres salvar algo de espacio.
  #
  echo "servidor $servidor, servicio $servicio" >> $fichreg

  (
  # NOTA: Puede que quieras anadir la linea `echo translate' si quieres CR/LF
  # automatico cuando imprimes.
          echo translate
          echo "print -"
          cat
  ) | /usr/bin/smbclient "\\\\$servidor\\$servicio" $clave -U $usuario -N -P >> $fichreg

  ______________________________________________________________________

  La mayora de las distribuciones de Linux vienen con el nenscript para
  convertir los documentos ASCII a Postscript. El siguiente script perl
  hace la vida ms fcil dando un interfaz sencillo para que linux
  imprima a travs de smbprint.

  ______________________________________________________________________

  Forma de uso: print [-a|c|p] <nombre_fichero>
                -a imprime <nombre_fichero> como ASCII
                -c imprime <nombre_fichero> formateado como codigo fuente
                -p imprime <nombre_fichero> como Postscript
        Si no se pasa ningun parametro, print intenta
        averiguar el tipo de fichero e imprimirlo
        adecuadamente.

  ______________________________________________________________________

  smbprint tiende a truncar las lneas demasiado largas cuando imprime
  ficheros ASCII. Este rompe las lneas largas donde haya un espacio en
  blanco (en lugar de en mitad de una palabra), si es posible.

  El formateado de cdigo fuente se hace con nenscript. Coge un fichero
  ASCII y lo formatea en 2 columnas con una cabecera mu' mona (fecha,
  nombre de fichero , etc). Adems enumera las lneas. Usndolo como
  ejemplo, se pueden lograr otros tipos de formateado.

  Los documentos Postscript tambin se imprimen correctamente, por lo
  que pasan directamente.

  ______________________________________________________________________

  #!/usr/bin/perl

  # Script:   print
  # Autores:  Brad Marshall, David Wood
  #           Plugged In Communications
  # Fecha:    960808
  # Cambios:  Ricardo Javier Cardenes Medina
  # Razon:        Traduccion de comentarios y codigo a espanol para
  #               mayor comprension.
  # Fecha:    961109 (Sab 9 de Noviembre de 1996)
  #
  # Script para imprimir a Oreilly que esta actualmente en zimmerman.
  # Proposito: Toma ficheros de varios tipos como parametros y
  # los procesa apropiadamente para mandarlos al script de impresion de Samba.
  #
  # Tipos soportados actualmente:
  #
  # ASCII      - Asegura que las lineas con mas de $largo_linea caracteres seran
  #              divididas aprovechando los espacios en blanco.
  # PostScript - No hace nada.
  # Codigo     - Lo formatea en PostScript (usando nenscript) para una mejor
  #              presentacion (fuente, etc...).
  #

  # Maxima longitud permitida para cada linea de texto ASCII.
  $largo_linea = 76;

  # Path y nombre del script 'print' de Samba.
  $prog_print = "/usr/bin/smbprint";

  # Path y nombre del nenscript (el convertidor ASCII-->PostScript)
  $nenscript = "/usr/bin/nenscript";

  unless ( -f $prog_print ) {
          die "No encuentro $prog_print!";
  }
  unless ( -f $nenscript ) {
          die "No encuentro $nenscript!";
  }

  &InterpLinCom(@ARGV);

  # DBG
  print "El tipo de fichero es $tipofich\n";

  if ($tipofich eq "ASCII") {
          &Rompe($largo_linea);
  } elsif ($tipofich eq "codigo") {
          &FormateaCodigo;
  } elsif ($tipofich eq "postscript") {
          &CreaTabla;
  } else {
          print "Lo siento..tipo de fichero desconocido.\n";
          exit 0;
  }
  # Enviar el array a smbprint
  open(IMPRESORA, "|$prog_print") || die "No puedo abrir $prog_print: $!\n";
  foreach $linea (@newlines) {
          print IMPRESORA $linea;
  }
  # Enviar un avance de linea extra en caso de que el fichero tenga una
  # ultima linea incompleta.
  print IMPRESORA "\n";
  close(IMPRESORA);
  print "Terminado\n";
  exit 0;

  # --------------------------------------------------- #
  #         Todo lo de debajo es una subrutina          #
  # --------------------------------------------------- #

  sub InterpLinCom {
          # Interpreta la linea de comando, averiguando el tipo de fichero

          # Toma $par y $fich como parametro (si existe) y nombre del
          # fichero.
          if ($#_ < 0) {
                  &FormaUso;
          }
          # DBG
          #       foreach $elemento (@_) {
          #               print "*$elemento* \n";
          #       }

          $par = shift(@_);
          if ($par =~ /\-./) {
                  $com = $par;
          # DBG
          #       print "\Encontrado $com.\n";

                  $fich = shift(@_);
          } else {
                  $fich = $par;
          }

          # Defining the file type
          unless ($com) {
                  # No tenemos parmetro

                  if ($fich =~ /\.ps$/) {
                          $tipofich = "postscript";
                  } elsif ($fich =~ /\.java$|\.c$|\.h$|\.pl$|\.sh$|\.csh$|\.m4$|\.inc$|\.html$|\.htm$/) {
                          $tipofich = "codigo";
                  } else {
                          $tipofich = "ASCII";
                  }

                  # Procesa $fich buscando el tipo y devuelve $tipofich
          } else {
                  # Tenemos el tipo en $par
                  if ($com =~ /^-p$/) {
                          $tipofich = "postscript";
                  } elsif ($com =~ /^-c$/) {
                          $tipofich = "codigo";
                  } elsif ($com =~ /^-a$/) {
                          $tipofich = "ASCII"
                  }
          }
  }

  sub FormaUso {
          print "
  Forma de uso: print [-a|c|p] <nombre_fichero>
                -a imprime <nombre_fichero> como ASCII
                -c imprime <nombre_fichero> formateado como codigo fuente
                -p imprime <nombre_fichero> como Postscript
        Si no se pasa ningun parametro, print intenta
        averiguar el tipo de fichero e imprimirlo
        adecuadamente.\n
  ";
          exit(0);
  }

  sub Rompe {
          # Crea una tabla con las lineas del fichero, donde cada linea es
          # menor que el numero de caracteres especificado, y las rompe
          # solo en los espacios en blanco

          # Toma el numero de caracteres a los que limitar la linea.
          $limite = pop(@_);

          # DBG
          #print "Entrando en la subrutina Rompe\n";
          #print "El limite de caracteres es $limit\n";

          # Lee en el fichero, lo interpreta y pone en la tabla.
          open(FICHERO, "<$fich") || die "No puedo abrir $fich: $!\n";
          while(<FICHERO>) {
                  $linea = $_;

                  # DBG
                  #print "La linea es:\n$linea\n";

                  # Rompe la linea si se pasa del limite.
                  while ( length($linea) > $limite ) {

                          # DBG
                          #print "Rompiendo...";

                          # Toma los primeros $limite +1 caracteres.
                          $cacho = substr($linea,0,$limite +1);

                          # DBG
                          #print "La linea parcial es:\n$cacho\n";

                          # Mira a ver si el ultimo caracter es un espacio.
                          $ultimo_car = substr($cacho,-1, 1);
                          if ( " " eq $ultimo_car ) {
                              # Si lo es, imprime el resto.

                              # DBG
                              #print "El ultimo caracter era un espacio\n";

                              substr($linea,0,$limite + 1) = "";
                              substr($cacho,-1,1) = "";
                              push(@newlines,"$cacho\n");
                          } else {
                               # Si no lo es, busca el ultimo espacio en la
                               # sub-linea e imprime hasta alli.

                              # DBG
                              #print "El ultimo caracter no era un espacio\n";

                               # Borra el ultimo caracter que pasa de $limite
                               substr($cacho,-1,1) = "";
                               # Da la vuelta a la linea para hacer mas
                               # sencillo buscar el espacio.
                               $cachoreves = reverse($cacho);
                               $indice = index($revpart," ");
                               if ( $indice > 0 ) {
                                 substr($linea,0,$limite-$indice) = "";
                                 push(@newlines,substr($cacho,0,$limite-$indice)
                                     . "\n");
                               } else {
                                   # No hay espacios en la linea, por lo que
                                   # se imprime hasta $limite.
                                 substr($linea,0,$limite) = "";
                                 push(@newlines,substr($cacho,0,$limite)
                                     . "\n");
                               }
                          }
                  }
                  push(@newlines,$linea);
          }
          close(FICHERO);
  }

  sub FormateaCodigo {
          # Llama a la subrutina Rompe cuando filtra a traves de nenscript
          &Rompe($largo_linea);

          # Manda los resultados a traves de nenscript para crear un
          # fichero Postscript que de una forma decente a nuestro codigo
          # fuente para imprimirlo (fuente Courier, numero de lineas, ...).
          # E imprime todo esto a un fichero temporal.
          $fichtmp = "/tmp/nenscript$$";
          open(FICHERO, "|$nenscript -2G -i$fich -N -p$fichtmpfich -r") ||
                  die "No pude abrir nenscript: $!\n";
          foreach $linea (@newlines) {
                  print FICHERO $linea;
          }
          close(FICHERO);

          # Vuelca el fichero temporal en una tabla para que pueda
          # ser pasado al script de impresion de Samba.
          @newlines = ("");
          open(FICHERO, "<$fichtmp") || die "No puedo abrir $fichtmp: $!\n";
          while(<FICHERO>) {
                  push(@newlines,$_);
          }
          close(FICHERO);
          system("rm $fichtmp");
  }

  sub CreaTabla {
          # Crear la tabla para postscript
          open(FICHERO, "<$fich") || die "No puedo abrir $fich: $!\n";
          while(<FICHERO>) {
                  push(@newlines,$_);
          }
          close(FICHERO);
  }

  ______________________________________________________________________

  10.  Copyright

  This HOWTO is copyright 1996 by David Wood.  It may be reproduced in
  any form and freely distributed as long as the file stays intact,
  including this statement.

  Este COMO tiene un copyright de 1996 por David Wood. Puede ser
  reproducido en cualquier forma y distribuido libremente mientras el
  fichero se mantenga intacto , incluyendo esta lnea.

  11.  Reconocimientos

  Tan pronto como me mandes sugerencias, te pondr aqu en la siguiente
  entrega.

  12.  Notas sobre/del traductor

  Este es mi primer trabajo para el INSFLUG, grupo del que tuve
  conocimiento esta misma semana (esto fue escrito el sbado 9 de
  noviembre de 1996). Para que veis que aqu nos damos prisa con las
  cosas y que esto va rpido.

  Ricardo Crdenes es un simple estudiante de la E.U. de Informtica en
  la ULPGC (Universidad de Las Palmas de Gran Canaria).

  Ahora mismo est en su tercer ao y tiene dos cosas que agradecer a la
  uni: Internet y el LiNUX. La primera la tiene presente desde el primer
  mes en la escuela. El segundo lo descubri y empez a quererlo y
  mimarlo desde que se vio obligado a ceder casi la mitad de su disco
  duro (210MB -sigh!-) para poder cumplir con unas prcticas de S.
  Operativos en mitad del segundo curso (hasta ahora no se ha
  arrepentido)

  Cualquier donacin para la compra de un nuevo disco duro y poder
  rebajar el 88-95% de ocupacin que se mantiene constantemente en las
  particiones, y as poder dedicarse con ms holgura a la traduccin de
  COMOs, FAQs y cosas de esas que tan bien os vienen, ser bien recibida
  }8-)))))

  Si quieres contactar con l por alguna de esas extraas razones de la
  vida (por ejemplo, una donacin para su nuevo disco duro 8-))))),
  podis dejarle un mensaje aqu: a1402@correo.dis.ulpgc.es

  13.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Serie COMO de Linux
  por Greg Hankins, greg.hankins@cc.gatech.edu
  v1.9, 2 Enero 1997, traduccin del 2 Junio 1997

  Este documento describe cmo configurar los dispositivos de comuni
  cacin serie en una mquina Linux.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Copyright

  1.2.    Nuevas versiones de este documento

  1.3.    Realimentacin

  1.4.    Renuncia de responsabilidad

  2.      Hardware serie soportado

  2.1.    Placas serie normales de PC

  2.2.    Mdems Plug and Play (PnP)

  2.3.    Placas serie multipuerto no-inteligentes (con UARTs
  8250/16450/16550A)

  2.4.    Placas serie multipuerto inteligentes

  2.5.    Hardware serie no soportado

  3.      Cules son los nombres de los puertos serie?

  3.1.    Nmeros de dispositivo mayor y menor de los puertos serie en
  /dev

  3.1.1.  Creacin de dispositivos en /dev

  3.2.    Notas sobre placas multipuerto no-inteligentes

  3.3.    Notas sobre placas multipuerto inteligentes

  4.      Programas interesantes que debera conocer

  4.1.    Qu es getty ?

  4.1.1.  Acerca de getty_ps

  4.1.2.  Acerca de mgetty

  4.1.3.  Acerca de agetty

  4.2.    Qu es setserial ?

  5.      Cmo puedo llamar con mi mdem?

  5.1.    Requerimientos de hardware

  5.1.1.  Notas sobre mdems internos

  5.2.    Hablando con el mdem

  5.3.    Configuracin del mdem para llamar

  5.4.    Control de flujo por hardware

  6.      Cmo puedo llamar y recibir llamadas con mi mdem usando
  getty_ps ?

  6.1.    Configuracin del mdem para llamar y recibir llamadas

  6.2.    Instalacin de getty_ps

  6.3.    Configurando uugetty

  6.4.    uugety  a medida

  7.      Cmo puedo tener un terminal conectado a mi PC?

  7.1.    Hardware requerido

  7.2.    Configurando getty

  7.3.    Notas sobre cmo configurar un PC como terminal

  8.      Puedo usar ms de dos dispositivos serie?

  8.1.    Eligiendo las interrupciones de los dispositivos serie

  8.2.    Configurando las direcciones de los dispositivos serie

  9.      Cmo puedo configurar el puerto serie para velocidades altas?
  qu velocidad debo usar con mi mdem?

  10.     Programas de comunicaciones y utilidades

  11.     Trucos serie y miscelneas

  11.1.   kermit y zmodem

  11.2.   Activando los tipos de terminal automgicamente

  11.3.   ls  en color en conexiones serie

  11.4.   Imprimiendo en una impresora conectada a un terminal

  11.5.   Puede linux configurar los dispositivos serie
  automgicamente?

  11.5.1. Notas sobre placas multipuerto

  12.     Un paso ms ...

  12.1.   Qu son los ficheros de bloqueo?

  12.2.   ``baudios'' Vs. ``bps''

  12.3.   Qu son las UARTs? Cmo afectan al rendimiento?

  12.4.   Cul es la diferencia real entre los dispositivos  /dev/cua N
  Y /dev/ttyS N ?

  13.     Eliminando problemas

  13.1.   Me dice: ``line NNN  of inittab invalid''

  13.2.   Cuando intento llamar, dice: ``/dev/cua N : Device or resource
  busy'' (dispositivo o recurso ocupado)

  13.3.   Me dice: ``Id S N  respawning too fast: disabled for 5
  minutes'' (Id S N  reiniciado demasiado rpido: desconectado durante 5
  minutos) Asegrese de que el mdem est configurado correctamente.
  Mire los registros E  y Q . Esto puede ocurrir cuando el mdem est
  negociando con getty . Asegrese de estar llamando correctamente a
  getty  desde  /etc/inittab . Si usa una sintaxis o nombre de
  dispositivo incorrectos puede causar graves problemas. Esto tambin
  puede ocurrir cuando est fallando la inicializacin de  uugetty .

  13.4.   Los dispositivos serie son lentos, o los dispositivo serie
  slo pueden enviar en una direccin

  13.5.   Mi mdem se bloquea despus de colgar, o uugetty  no se
  reinicia.

  13.6.   Tengo un terminal conectado al PC, pero despus de escribir un
  nombre de registro, slo se bloquea

  13.7.   A velocidades altas, mi mdem pierde datos

  13.8.   Al arrancar, linux no informa a los dispositivos serie de cmo
  los he configurado

  13.9.   rz  y/o sz  no funcionan cuando llamo a mi mquina linux con
  un mdem

  13.10.  En mi pantalla estn saliendo caracteres muy graciosos

  13.11.  getty  o uugetty  no funciona todavia

  14.     Otras fuentes de informacin

  15.     Contribuciones

  16.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Este es el Serie COMO de Linux. Todo sobre cmo configurar mdems y
  terminales bajo Linux, algunos trucos de serie, y soluciones a
  problemas.  Este COMO est dirigido a Linux funcionando bajo un
  hardware basado en un x86, aunque debe funcionar en otras
  arquitecturas.

  1.1.  Copyright

  El Serial HOWTO de Linux es copyright (C) 1993 - 1997 de Greg Hankins.
  Los documentos HOWTO de Linux pueden ser reproducidos y distribuidos
  total o parcialmente, en cualquier medio fsico o electrnico, con tal
  que esta nota de copyright est en todas las copias. La redistribucin
  comercial es permitida y se anima a ello; de cualquier modo, al autor
  le gustara que se le notificase este tipo de distribuciones.

  Todas las traducciones, trabajos derivados, o trabajos agregados
  incorporando cualquier documento HOWTO de Linux deben estar bajo las
  condiciones de esta nota de copyright. Es decir, no puede producir un
  trabajo derivado de un HOWTO e imponer restricciones adicionales en su
  distribucin. Excepciones a estas reglas pueden ser garantizadas bajo
  ciertas condiciones; por favor, contacte con el coordinador de los
  HOWTOs de Linux en la direccin que se da despus.

  En breve, queremos promover la diseminacin de esta informacin a
  travs de todos los canales posibles. De todas maneras, deseamos
  retener el copyright de los HOWTOs, y nos gustara que se nos
  notificase cualquier plan de redistribucin de los HOWTOs.

  Para cualquier consulta, por favor, contacte con Greg Hankins, el
  coordinador de los HOWTOs de Linux, en gregh@sunsite.unc.edu a travs
  del correo electrnico.

  1.2.  Nuevas versiones de este documento

  Las nuevas versiones de Serial HOWTO (versin en ingls (-- Ver
  seccin ``Grupos Linuxeros en Espaa'' para las traducciones al
  Castellano--) ) se pueden conseguir en

    ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO/Serial-HOWTO

  y servidores espejo (mirror sites). Existen otros formatos, as como
  PostScript y DVI en el directorio other-formats. El Serial-HOWTO
  tambin est disponible en

    http://sunsite.unc.edu/LDP/HOWTO/Serial-HOWTO.html

  y se enviar a comp.os.linux.answers mensualmente.

  1.3.  Realimentacin

  Por favor, enveme cualquier pregunta, comentario, sugerencia, o
  material adicional. Siempre estoy ansioso de or lo que opinan sobre
  el HOWTO.  Tambin estoy atento a mejoras!. Dgame exactamente qu es
  lo que no entiende, o que debe aclararse. Puede contactar conmigo en
  greg.hankins@cc.gatech.edu va email. Todas las cartas sern
  contestadas, aunque puede llevarme una semana o as, dependiendo de lo
  ocupado que est. Tengo muchas cartas de root y sitios
  desconfigurados. Por favor, enveme el correo como una persona real, y
  asegrese de que su sistema de correo funcione, as podr contestarle.
  Si no le respondo en dos semanas, por favor, vuelva a enviarme la
  carta de nuevo.

  Tambin puede contactar conmigo en:  Greg Hankins
  Computing
  30332-0280

  Por favor, incluya el nmero de versin de el Serial HOWTO cuando
  escriba, esta es la versin 1.9.

  1.4.  Renuncia de responsabilidad

  Los resultados pueden variar. Las respuestas dadas puede que no
  funcionen en todos los sistemas y con todas las configuraciones
  posibles.

  2.  Hardware serie soportado

  Se sabe que Linux funciona con el siguiente hardware serie.

  2.1.  Placas serie normales de PC

    placas serie estndar de PC (COM1 - COM4), a los cuales los
     dispositivos serie externos (mdems, ratn serie, etc, ...) pueden
     ser conectados.

    mdems internos de PC estndar (COM1 - COM4)

    Quickpath Systems Port-Folio 550e (IRQs permitidas 3, 4, 5, 9, 10,
     11, 12, y 15)

  Nota: debido a conflictos de direccin, no puede usar COM4 y la placa
  de vdeo IBM8514 simultneamente. Esto es debido a un error en la
  placa IBM8514.

  2.2.  Mdems Plug and Play (PnP)

  Los mdems PnP funcionan con Linux. Sin embargo, recomiendo que no se
  usen porque son complejos. Existen un par de cosas que puede probar:

    Intente desconectar la caracterstica PnP en la BIOS de su
     ordenador y mdem.

    Arranque Win95, configure el mdem, y vea si la configuracin
     permanece cuando arranque Linux. Si no, entonces:

    Arranque Win95, configure el mdem, y entonces haga un arranque en
     caliente de Linux, as se preservar la configuracin. Puede hacer
     esto con el cargador loadlin.

    Consiga las herramientas de PnP en http://www.redhat.com/linux-
     info/pnp.

    Y, por supuesto, puede adquirir un mdem de verdad.

  2.3.  8250/16450/16550A) Placas serie multipuerto no-inteligentes (con
  UARTs

    AST FourPort y clnicas (4 puertos)

    Accent Async-4 (4 puertos)

    Arnet Multiport-8 (8 puertos)

    Bell Technologies HUB6 (6 puertos)

    Boca BB-1004 (4 puertos), BB-1008 (8 puertos), BB-2016 (16 puertos)

    Boca IOAT66 (6 puertos)

    Boca 2by4 (4 puertos serie, 2 puertos paralelos)

    Computone ValuePort V4-ISA (compatible AST FourPort)

    Digi PC/8 (8 puertos)

    GTEK BBS-550 (8 puertos)

    Longshine LCS-8880, Longshine LCS-8880+ (compatible AST FourPort)

    Moxa C104, Moxa C104+ (compatible AST FourPort)

    PC-COMM (4 puertos)

    SIIG I/O Expander 2S IO1812 (4 puertos)

    STB-4COM (4 puertos)

    Twincom ACI/550

    Usenet Serial Board II (4 puertos)

  En general, Linux soportar cualquier placa que use una UART 8250,
  16450, 16550, 16550A (o compatible), o un mdem interno que emule una
  de las UARTs anteriores.

  Nota: el BB-1004 y BB-1008 no soporta lneas DCD y RI, y no se pueden
  usar para recibir llamadas. Funcionan bien en otras tareas.

  2.4.  Placas serie multipuerto inteligentes

    Comtrol RocketPort (36MHz ASIC; 4, 8, 16  32 puertos)
     contacto: info@comtrol.com o http://www.comtrol.com
     soportado por Comtrol

    Computone IntelliPort II (16MHz 80186; 4, 8  16 puertos),
     IntelliPort II EXpandable (20MHz 80186; 16 - 64 puertos)
     contacto: Michael H. Warfield, mhw@wittsend.atl.ga.us
     pre-ALPHA

    Cyclades Cyclom-Y (UARTs CD1400 de Cirrus Logic; 8 - 32 puertos),
     contacto: sales@cyclades.com o http://www.cyclades.com
     soportado por Cyclades
     localizacin del controlador: ftp://ftp.cyclades.com/pub/cyclades e
     incluido en el ncleo del Linux desde la versin 1.1.75

    Digi PC/Xi (12.5MHz 80186; 4, 8,  16 puertos),
     (12.5/16MHz 80186; 2, 4, u 8 puertos),
     8 puertos),
     contacto: sales@dgii.com o http://www.dgii.com
     soportado por Digi
     Linux desde la versin 2.0

    Digi COM/Xi (10MHz 80188; 4 u 8 puertos)
     Park, si@wimpol.demon.co.uk
     ALPHA
     meses debido a su trabajo. Mark Hatle,
     fray@krypton.mankato.msus.edu se ha ofrecido voluntario cortsmente
     para tener el controlador disponible por si usted lo necesita.

    Equinox SuperSerial Technology (30MHz ASIC; 2 - 128 puertos)
     estado del controlador: soportado por Equinox
     controlador: ftp://ftp.equinox.com/library/sst

    GTEK Cyclone (16C654 UARTs; 6, 16 y 32 puertos),
     (24MHz Dallas DS80C320; 8 puertos),
     8 puertos),
     spot@gtek.com o http://www.gtek.com
     soportado por GTEK

    Hayes ESP (8 - 64 puertos)
     arobinso@nyx.net o http://www.nyx.net/~arobinso
     controlador: BETA
     localizacin del controlador: http://www.nyx.net/~arobinso e
     incluido en el ncleo del Linux desde la versin 2.1.15

    Maxpeed SS (Toshiba; 4, 8 y 16 puertos)
     info@maxpeed.com o http://www.maxpeed.com
     soportado por Maxpeed

    Moxa C218 (12MHz 80286; 8 puertos),
     TMS320; 8 - 32 puertos)
     http://www.moxa.com.tw
     soportado por Moxa

    SDL RISCom/8 (CD180 de Cirrus Logic; 8 puertos)
     sales@sdlcomm.com or http://www.sdlcomm.com
     soportado por SDL

    Omega COMM-8 (8 puertos)
     vpetree@infi.net

    Specialix SIO (20MHz Zilog Z280; 4 - 32 puertos),
     (25MHz Zilog Z280; 4 - 32 puertos)
     simonallen@cix.compulink.co.uk
     controlador: BETA

    Stallion EasyIO-4 (4 puertos), EasyIO-8 (8 puertos), y
     EasyConnection (8 - 32 puertos) - cada uno con UARTs CD1400 de
     Cirrus Logic,
     (10/12 MHz 80186 CPU; 4, 8 o 16 puertos),
     CPU; 4, 8, 12, 16 o 32 puertos),
     CPU; 8 - 64 puertos)
     http://www.stallion.com
     soportado por Stallion
     ncleo del Linux desde la versin 1.3.27

  Una revisin de los productos de Comtrol, Cyclades, Digi y Stallion
  fue imprimida en Junio de 1995 en la distribucin de Linux Journal. El
  artculo est disponible en http://www.ssc.com/lj/issue14.

  2.5.  Hardware serie no soportado

  Los mdems que afirman ser ``Winmodems'', por ejemplo el USR Sporster
  Winmodem e IBM Aptiva MWAVE, no estn soportados por Linux.  Estos
  mdems usan diseos propietarios que requieren controladores
  especiales de Windows.  Evite este tipo de mdems. Adems, evite los
  mdems que requieran los controladores Rockwell RPI por las mismas
  razones.

  Las placas serie inteligentes que requieran controladores no
  disponibles para Linux tampoco funcionarn .

  3.  Cules son los nombres de los puertos serie?

  Un puerto de E/S es un modo de conseguir que los datos entren y salgan
  de un ordenador. Existen muchos tipos de puertos de E/S como los
  puertos serie, puertos paralelos, controladores de disqueteras, placas
  ethernet, etc. Trataremos con puertos serie ya que los mdems y los
  terminales son dispositivos serie. Cada puerto serie debe tener una
  direccin de E/S, y una interrupcin (IRQ).

  Estos son los cuatro puertos serie correspondientes a COM1 - COM4:

       /dev/cua0, /dev/ttyS0 (COM1) direccion 0x3f8 IRQ 4
       /dev/cua1, /dev/ttyS1 (COM2) direccion 0x2f8 IRQ 3
       /dev/cua2, /dev/ttyS2 (COM3) direccion 0x3e8 IRQ 4
       /dev/cua3, /dev/ttyS3 (COM4) direccion 0x2e8 IRQ 3

  Si Linux no detecta ningn puerto serie cuando arranca, entonces
  asegrese de que el soporte de comunicaciones serie est compilado y
  activo en el ncleo.

  Los dispositivos /dev/ttySN son para conexiones de entrada y los
  dispositivos /dev/cuaN son para conexiones de salida.  N es el nmero
  del puerto serie.

  En este documento me referir a COM1 como ttyS0, COM2 como ttyS1, COM3
  como ttyS2, y COM4 como ttyS3. Si me refiero a un dispositivo
  especfico en /dev, siempre lo preceder de /dev para evitar
  confusiones. Ntese que por defecto estos dispositivos tienen IRQs que
  se solapan. No puede usar todos los puertos con la configuracin por
  defecto, debe reasignar IRQs diferentes.  Vea la seccin ``Puedo usar
  ms de dos dispositivos serie?'' para configurar las IRQs.

  En algunas instalaciones se crean dos dispositivos extras, /dev/modem
  para el mdem y /dev/mouse para el ratn. Los dos son enlaces
  simblicos al dispositivo /dev/cuaN apropiado que usted especific
  durante la instalacin (a menos que tenga un bus mouse, entonces
  /dev/mouse apuntar al dispositivo del bus mouse).

  Existen algunas discusiones sobre los mritos de /dev/mouse y
  /dev/modem. Yo estoy totalmente en contra del uso de estos enlaces. En
  particular, si est planeando usar su mdem para recibir llamadas
  puede tener problemas debido a que los ficheros de bloqueo puede que
  no funcionen correctamente si usa /dev/modem. selos si lo desea, pero
  asegrese de que apuntan al dispositivo correcto. Sin embargo, si
  mueve o borra este enlace, algunas aplicaciones (minicom por ejemplo)
  pueden necesitar una reconfiguracin.

  3.1.  /dev Nmeros de dispositivo mayor y menor de los puertos serie
  en

       /dev/ttyS0 mayor 4, menor 64    /dev/cua0 mayor 5, menor 64
       /dev/ttyS1 mayor 4, menor 65    /dev/cua1 mayor 5, menor 65
       /dev/ttyS2 mayor 4, menor 66    /dev/cua2 mayor 5, menor 66
       /dev/ttyS3 mayor 4, menor 67    /dev/cua3 mayor 5, menor 67

  Ntese que todas las distribuciones deben traer estos dispositivos
  correctamente creados. Puede comprobarlo escribiendo:

  linux% ls -l /dev/cua*
  linux% ls -l /dev/ttyS*

  3.1.1.  Creacin de dispositivos en /dev

  Si le falta un dispositivo, tendr que crearlo con el comando mknod.
  Por ejemplo, suponga que necesita crear un dispositivo para ttyS0:

       linux# mknod -m 666 /dev/cua0 c 5 64
       linux# mknod -m 666 /dev/ttyS0 c 4 64

  Puede usar el script MAKEDEV, que est en /dev. Esto simplifica la
  creacin de dispositivos. Por ejemplo, si necesita crear el
  dispositivo para ttyS0 puede escribir:

       linux# cd /dev
       linux# ./MAKEDEV ttyS0

  Esto dirige la creacin de dispositivos para entrada y salida, y
  debera establecer los permisos adecuados.

  3.2.  Notas sobre placas multipuerto no-inteligentes

  Los dispositivos que su placa multipuerto usa dependen del tipo de
  placa que tenga. Estas estn listadas con detalle en rc.serial que
  viene con el programa setserial. Recomiendo conseguir la ltima
  versin de setserial si est intentando usar placas multipuerto.
  Seguramente necesitar crear estos dispositivos. Puede usar el comando
  mknod, o el script MAKEDEV. Los dispositivos para placas multipuerto
  se crean sumando ``64 + nmero de puerto''. As, si quiere crear un
  dispositivo para ttyS17, debe escribir:

       linux# mknod -m 666 /dev/cua17 c 5 81
       linux# mknod -m 666 /dev/ttyS17 c 4 81

  Note que ``64 + 17 = 81''. Si usa el script MAKEDEV, puede escribir:

       linux# cd /dev
       linux# ./MAKEDEV ttyS17

  Nota: el manual SIIG en el listado de IO1812 para COM5-COM8 es
  errneo.  Debera ser COM5=0x250, COM6=0x258, COM7=0x260, y
  COM8=0x268.

  Nota: El Registro de Estado de Interrupcin de la Digi PC/8 es en
  0x140.

  Nota: para una AST Fourport, puede necesitar especificar skip_test en
  rc.serial.

  3.3.  Notas sobre placas multipuerto inteligentes

  Lea la informacin que viene con el controlador. Estas placas usan
  dispositivos especiales, y no los estndar. Esta informacin vara
  dependiendo de su hardware.

  4.  Programas interesantes que debera conocer

  4.1.  Qu es getty ?

  getty es un programa que controla el proceso de login cuando se
  conecta a una mquina Unix. Puede necesitar getty si quiere que sea
  posible llamar a su mquina Linux con un mdem. No necesita getty si
  lo nico que quiere es llamar con su modem. Existen tres versiones que
  son normalmente usadas con Linux: getty_ps, mgetty y agetty. La
  sintaxis de estos programas difieren, as que asegrese de comprobar
  que est usando la sintaxis correcta para el getty que est usando.

  4.1.1.  Acerca de getty_ps

  Esta versin de getty fue originalmente escrita por Paul Sutcliffe
  Jr., paul@devon.lns.pa.us. Muchas distribuciones vienen con el paquete
  getty_ps instalado. El paquete getty_ps contiene dos programas. getty
  se usa para la consola, y dispositivos de terminal - y uugetty se usa
  para los mdems. Yo uso esta versin de getty, as que me concentrar
  en el paquete getty_ps en este COMO.

  4.1.2.  Acerca de mgetty

  mgetty es una versin de getty escrita por Gert Dring,
  gert@greenie.muc.de, para ser usada con el mdem.  Adems de permitir
  acceso telefnico, mgetty tambin da soporte de FAX con sendfax, que
  acompaa a mgetty. La documentacin de mgetty es bastante buena, y no
  necesita ningn suplemento.  Por favor, dirjase a ella para las
  instrucciones de instalacin.  Puede encontrar la ltima informacin
  sobre mgetty en http://www.leo.org/~doering/mgetty/.

  4.1.3.  Acerca de agetty

  agetty es la tercera variacin de getty. Fue originalmente escrita por
  W.Z. Venema, wietse@wzv.win.tue.nl. Es una simple, y completamente
  funcional, implementacin de getty que va mejor con las consolas
  virtuales o los terminales que con los mdems.

  4.2.  Qu es setserial ?

  setserial es un programa que le permite ver y modificar los distintos
  atributos de un dispositivo serie, incluyendo las direcciones de los
  puertos, las interrupciones, y otras opciones de los puertos serie.
  Fue inicialmente escrito por Rick Sladkey, y fue bastante modificado
  por Ted T'so, tytso@mit.edu, que actualmente lo mantiene. Puede saber
  que versin tiene ejecutando setserial sin argumentos. Recomiendo
  conseguir la ltima versin de algn servidor FTP de Linux.

  Cuando su sistema Linux arranca, slo son configurados ttyS{0-3},
  usando las IRQs 3 y 4 por defecto. Por eso, si tiene cualquier otro
  puerto serie en otras placas o si ttyS{0-3} tiene una IRQ no estndar,
  debe usar este programa para configurar esos puertos serie. Para la
  lista completa de opciones, consulte la pgina man.

  5.  Cmo puedo llamar con mi mdem?

  5.1.  Requerimientos de hardware

  Primero, asegrese de que tiene el cable correcto. El mdem requiere
  un cable directo, sin pins cruzados. Cualquier tienda de informtica
  puede tenerlo. Asegrese de tener el gnero correcto. Si est usando
  el puerto serie DB25, siempre debe ser el DB25 macho. No lo confunda
  con el puerto paralelo, que es el DB25 hembra. Conecte su mdem a uno
  de los puertos serie. Consulte el manual de su mdem para saber cmo
  hacerlo si necesita ayuda.

  5.1.1.  Notas sobre mdems internos

  Para un mdem interno, no necesitar un cable. Un mdem interno no
  necesita un puerto serie, tiene uno interno. Todo lo que necesita
  hacer es configurarlo para usar una interrupcin que no est siendo
  usada, y configurar la direccin de E/S del puerto. Consulte el manual
  de su mdem si se atasca. Adems, vea la seccin ``Puedo usar ms de
  dos dispositivos serie?'' si necesita ayuda para elegir las
  interrupciones y las direcciones.

  En en algunas placas madres tendr que desconectar el puerto serie que
  el mdem est suplantando para evitar conflictos. Esto se puede hacer
  con los puentes o en la configuracin de la BIOS, dependiendo de su
  placa madre.  Consulte el manual de su placa madre.

  Debido a un error en la placa de vdeo IBM8514, puede tener problemas
  si quiere poner su mdem interno en ttyS3. Si Linux no detecta su
  mdem interno en ttyS3, puede usar setserial y el mdem funcionar
  bien. Los mdems internos conectados en ttyS{0-2} no deben tener
  ningn problema para ser detectados. Linux no efecta ninguna
  autoconfiguracin en ttyS3 debido a este error en la placa de vdeo.

  5.2.  Hablando con el mdem

  Use kermit o algn otro programa simple de comunicaciones para probar
  la configuracin, antes de meterse en programas de comunicacin ms
  complejos. (Por razones legales, kermit no se distribuye en las
  distribuciones comerciales. Puede encontrar la ltima versin de
  kermit en ftp://sunsite.unc.edu/pub/Linux/apps/comm y servidores
  espejo). Por ejemplo, digamos que su mdem est en ttyS3, y su
  velocidad es 38400 bps. Puede hacer lo siguiente:
       linux# kermit
       C-Kermit 5A(188), 23 Nov 92, POSIX
       Type ? or HELP for help
       C-Kermit>set line /dev/cua3
       C-Kermit>set speed 38400
       /dev/cua3, 38400 bps
       C-Kermit>c
       Connecting to /dev/cua3, speed 38400.
       The escape character is Ctrl-\ (ASCII 28, FS)
       Type the escape character followed by C to get back,
       or followed by ? to see other options.
       ATV1
       OK
       <ctrl>-\-C
       (Back at linux)
       C-Kermit>quit
       linux#

  Si su mdem responde a los comandos AT, puede suponer que est
  funcionando correctamente en lo que respecta a Linux. Intente llamar a
  otro mdem. Si no le gusta kermit, pruebe uno de los programas de
  comunicaciones ms avanzados. Mire en la seccin ``Programas De
  Comunicaciones'' sobre programas de comunicaciones si necesita una
  gua.

  Cuando llame con su mdem, configure la velocidad a la ms alta que
  ste soporte. Las versiones de Linux con una versin de libc superior
  a 5.x tienen soporte para velocidades de hasta 115200 bps. libc
  normalmente est en /lib, as que mire all para saber que versin
  tiene. Si Linux no reconoce una velocidad de 57600  115200 bps,
  entonces debe usar el programa setserial para configurar el puerto
  serie a una velocidad mayor.  Vea la seccin ``Cmo configurar el
  puerto serie para velocidades altas?'' para saber cmo hacer esto.
  Despus, configure la velocidad a 38400 bps en el programa de
  comunicaciones.

  5.3.  Configuracin del mdem para llamar

  Si slo va a hacer llamadas, puede configurar el mdem como quiera.
  Si tiene la intencin de usar el mdem para recibir llamadas, debe
  configurar el mdem a la misma velocidad a la que quiera que funcione
  getty. Es decir, si quiere usar getty a 38400 bps, ponga la velocidad
  a 38400 bps cuando configure el mdem. Esto se hace para prevenir
  desajustes entre el ordenador y el mdem. En general, la configuracin
  de fbrica, que activa la correccin de errores y el control de flujo
  por hardware, es la mejor configuracin para hacer llamadas, consulte
  el manual de su mdem para activar estas opciones.

  A mi me gusta ver los cdigos resultantes, por eso activo Q0 -
  devuelve los cdigos resultantes. Para activar esto en mi mdem, tengo
  que preceder el nombre de registro con el comando AT.  Usando kermit u
  otro programa de comunicaciones, conctelo al mdem y escriba: ATQ0.

  Tambin me gusta ver lo que escribo, por eso activo E1 - activa el eco
  de comandos. Si su mdem tiene capacidad de compresin de datos,
  probablemente quiera activarlo.  Consulte el manual de su mdem para
  ms ayuda, y una lista de opciones completa. Si su mdem puede grabar
  la configuracin activa, asegrese de guardarla (se suele hacer con
  AT&W, pero varia entre los fabricantes de mdems), si no tendr que
  configurar los registros cada vez que active el mdem, o lo reinicie.

  5.4.  Control de flujo por hardware

  Si su mdem soporta el control de flujo por hardware (RTS/CTS), le
  recomiendo que lo use. Esto es particularmente importante para mdems
  que soporten la compresin de datos. Primero, tendr que activar el
  control de flujo RTS/CTS del puerto serie. Es mejor hacerlo en el
  arranque, en el fichero /etc/rc.d/rc.local o /etc/rc.d/rc.serial.
  Asegrese de que estos ficheros son llamados desde el fichero
  principal rc.sysinit!. Necesita hacer lo siguiente para cada puerto
  serie en que quiera activar el control de flujo por hardware:

       stty crtscts < /dev/cuaN

  Tambin debe activar el control de flujo RTS/CTS en el mdem.
  Consulte el manual de su mdem para saber cmo hacerlo, ya que vara
  entre fabricantes de mdems. Asegrese de guardar la configuracin del
  mdem si ste soporta el almacenamiento del perfil.

  6.  Cmo puedo llamar y recibir llamadas con mi mdem usando getty_ps
  ?

  Consiga que su mdem llame correctamente. Si no ha ledo la seccin
  ``Cmo puedo llamar con mi mdem?'', lala ahora!.  Contiene
  informacin de configuracin muy importante. No necesita leer esta
  seccin si lo nico que quiere hacer es llamar con el mdem.

  6.1.  Configuracin del mdem para llamar y recibir llamadas

  Para llamar y recibir llamadas, tiene que configurar el mdem de un
  cierto modo (de nuevo, usando los comandos AT del mdem):

       E1      activa el eco de comandos
       Q0      devuelve los codigos resultantes
       V1      habilita el codigo de resultados largos (texto)
       S0=0    nunca contesta (uugetty hace esto con la opcion WAITFOR)

  Si no configura esto correctamente, la cadena INIT de su fichero de
  configuracin puede fallar, echando a perder el proceso completo.
  Pero, ms sobre ficheros de configuracin despus ...

       &C1     DCD se activa solamente despues de conectar
       &S0     DSR siempre esta activo
       DTR activa/desactiva el reinicio del modem (depende del fabricante - RTFM)

  Esto afecta a lo que hace su mdem cuando inicia o finaliza una
  llamada.

  Si su mdem no puede almacenar el perfil, puede usar la cadena INIT de
  su fichero de configuracin. Valo ms adelante.  Algunos mdems
  tienen interruptores DIP que afectan a la configuracin de los
  registros.  Asegrese de que estn configurados correctamente.

  He iniciado una coleccin de configuraciones para diferentes tipos de
  mdems. Hasta ahora slo tengo unos pocos, si desea enviarme una
  configuracin que funcione, por favor, hgalo!.  Puede conseguirla en
  ftp://ftp.cc.gatech.edu/pub/people/gregh/modem-configs.

  Nota: para conseguir que mi mdem USR Courier V.34 se reinicie
  correctamente cuando se desactiva el DTR, he tenido que activar &D2 y
  S13=1 (esto activa el bit 0 del registro S13).  Se ha confirmado que
  esto funciona igualmente en mdems USR Sportster V.34.

  Nota: algunos mdems Supra tratan el DCD de modo diferente a otros
  mdems.  Si est usando un Supra, pruebe a poner &C0 y no &C1. Tambin
  debe poner &D2 para manejar el DTR correctamente.

  6.2.  Instalacin de getty_ps

  Consiga la ltima versin en sunsite.unc.edu:/pub/Linux/system/Serial.
  Por defecto, getty_ps se configura para usar la norma FSSTND
  (FileSystem STaNDard) de Linux, lo cual significa que los binarios
  estarn en /sbin, y los ficheros de configuracin se llamarn
  /etc/conf.{uu}getty.ttySN.  Esto no est claro en la documentacin!.
  Tambin se espera que los ficheros de bloqueo estn en /var/lock.
  Asegrese de que existe el directorio /var/lock.

  Si no quiere usar la norma FSSTND, los binarios pueden ir en /etc, los
  ficheros de configuracin pueden ir en /etc/default/{uu}getty.ttySN, y
  los ficheros de bloqueo pueden ir en /usr/spool/uucp. Recomiendo hacer
  las cosas de esto modo si est usando UUCP, porque UUCP puede tener
  problemas si mueve los ficheros de bloqueo a donde no los busca.

  getty_ps tambin puede usar syslogd para guardar los mensajes.  Vea
  las pginas man de syslogd(1) y syslog.conf(5) para configurar
  syslogd, si no lo tiene funcionando todava. Los mensajes se guardan
  con prioridad LOG_AUTH, los errores usan LOG_ERR, y la depuracin usa
  LOG_DEBUG. Si no quiere usar syslogd puede editar tune.h en los
  ficheros fuente de getty_ps para usar otro fichero de almacenamiento
  en su lugar, llamado /var/adm/getty.log por defecto.

  Decida si quiere usar la norma FSSTND y la capacidad syslog. Tambin
  puede elegir una combinacin de ambos. Edite los ficheros Makefile,
  tune.h y config.h para reflejar sus decisiones. Despus compile e
  instale siguiendo las instrucciones incluidas en el paquete.

  A partir de este punto, todas las referencias a getty_ps se referirn
  a getty_ps. Las referencias a uugetty se referirn a uugetty que viene
  con el paquete getty_ps.  Estas instrucciones no funcionarn en mgetty
  o agetty.

  6.3.  Configurando uugetty

  Para recibir llamadas y llamar con su mdem, vamos a usar uugetty.
  uugetty hace importantes comprobaciones de los ficheros de bloqueo.
  Actualice /etc/gettydefs para incluir las entradas de los mdems si
  todava no estn all (ntese que cada entrada apunta a otra, esto no
  es para velocidades fijas - las lneas en blanco son necesarias entre
  cada entrada):

       # Entradas del modem
       38400# B38400 CS8 # B38400 SANE -ISTRIP HUPCL #@S @L @B login: #19200

       19200# B19200 CS8 # B19200 SANE -ISTRIP HUPCL #@S @L @B login: #9600

       9600# B9600 CS8 # B9600 SANE -ISTRIP HUPCL #@S @L @B login: #2400

       2400# B2400 CS8 # B2400 SANE -ISTRIP HUPCL #@S @L @B login: #1200

       1200# B1200 CS8 # B1200 SANE -ISTRIP HUPCL #@S @L @B login: #300

       300# B300 CS8 # B300 SANE -ISTRIP HUPCL #@S @L @B login: #38400

  Si tiene un mdem de 9600 bps o ms rpido con compresin de datos,
  puede bloquear la velocidad del puerto serie y permitir que el mdem
  controle las transiciones a otras velocidades. Entonces, en vez de la
  serie descendente de lneas listadas antes, /etc/gettydefs slo
  necesita contener una lnea para el mdem:

       # velocidad fijada a 38400
       F38400# B38400 CS8 # B38400 SANE -ISTRIP HUPCL #@S @L @B login: #F38400

       # velocidad fijada a 19200
       F19200# B19200 CS8 # B19200 SANE -ISTRIP HUPCL #@S @L @B login: #F19200

       # velocidad fijada a 9600
       F9600# B9600 CS8 # B9600 SANE -ISTRIP HUPCL #@S @L @B login: #F9600

  Si tiene configurado su modem con control de flujo por hardware
  RTS/CTS, puede aadir CRTSCTS a las entradas:

       # velocidad fijada a 38400 con control de flujo por hardware
       F38400# B38400 CS8 CRTSCTS # B38400 SANE -ISTRIP HUPCL CRTSCTS #@S @L @B login: #F38400

       # velocidad fijada a 19200 con control de flujo por hardware
       F19200# B19200 CS8 CRTSCTS # B19200 SANE -ISTRIP HUPCL CRTSCTS #@S @L @B login: #F19200

       F9600# B9600 CS8 CRTSCTS # B9600 SANE -ISTRIP HUPCL CRTSCTS #@S @L @B login: #F9600

  Si quiere, puede hacer que uugetty escriba cosas interesantes en el
  mensaje de login. En los ejemplos, tenemos el nombre del sistema, la
  lnea serie, y la velocidad actual en bps. Puede aadir otras cosas:

         @B    Velocidad actual en bps (calculada en el momento que se lee @B).
         @D    Fecha actual, en MM/DD/AA.
         @L    Linea serie a la cual est conectado getty.
         @S    Nombre del sistema.
         @T    Hora actual, en HH:MM:SS (24 horas).
         @U    Numero de usuarios actualmente conectados. Esto es, el numero
               de entradas en el fichero /etc/utmp que tienen un campo ut_name
               no nulo.
         @V    Valor de VERSION, dado en el fichero de opciones por defecto.
         Para que se vea el carcter '@', use '\@' o '@@'.

  Despus, asegrese de que tiene un dispositivo de entrada y otro de
  salida para el puerto serie en que est el mdem. Si tiene el mdem en
  ttyS3, necesitar los dispositivos /dev/cua3 y /dev/ttyS3. Si no tiene
  los dispositivos adecuados, vea la seccin ``Creacin De Dispositivos
  En <TT>/dev</TT>'' para saber como crearlos.

  6.4.  uugety  a medida

  Existen un montn de parmetros que puede configurar para cada puerto.
  Estn implementados en distintos ficheros de configuracin para cada
  puerto. El fichero /etc/conf.uugetty ser usado por cada ejecucin de
  uugetty, y /etc/conf.uugetty.ttySN ser usado solamente para ese
  puerto. Se pueden encontrar ejemplos de ficheros de configuracin por
  defecto en los ficheros fuentes de getty, que viene con la mayora de
  las distribuciones de Linux. Debido a lo que ocupan, no lo vamos a
  listar aqu. Ntese que si est usando una versin antigua de getty
  (anterior a la 2.0.7e), o no est usando FSSTND, entonces el fichero
  por defecto debe ser /etc/default/uugetty.ttySN. Mi fichero
  /etc/conf.uugetty.ttyS3 es como sigue:

       # ejemplo de fichero de configuracion de uugetty para un modem compatible
       # Hayes para permitir las conexiones a traves de mdem
       #
       # fichero de bloqueo alternativo a comprobar ... si este fichero de bloqueo
       # existe, entonces uugetty se ejecuta de nuevo y el modem se reinicia
       ALTLOCK=cua3
       ALTLINE=cua3
       # lnea a inicializar
       INITLINE=cua3
       # tiempo para desconectar si est inactivo ...
       TIMEOUT=60
       # cadena de inicializacion del modem ...
       # formato: <esperado> <enviado> ... (secuencia de chat)
       INIT="" AT\r OK\r\n
       WAITFOR=RING
       CONNECT="" ATA\r CONNECT\s\A
       # esta linea configura el tiempo de espera antes de enviar el mensaje de login
       DELAY=1
       #DEBUG=010

  Aada la siguiente lnea a /etc/inittab, as uugetty se ejecutar en
  el puerto serie (sustituyndolo por la informacin correcta para su
  entorno - localizacin del fichero de configuracin, puerto,
  velocidad, y tipo de terminal por defecto):

       S3:456:respawn:/sbin/uugetty -d /etc/default/uugetty.ttyS3 ttyS3 F38400 vt100

  Vuelva a ejecutar init:

       linux# init q

  En el parmetro de velocidad de /etc/inittab, debe poner la velocidad
  en bps ms alta que soporte su mdem. Ya que uugetty no soporta
  velocidades de 57600  115200 bps, debe usar el programa setserial
  para configurar el puerto serie a una velocidad superior. Vea la
  seccin ``Cmo puedo configurar el puerto serie para velocidades
  altas?'' para saber cmo hacer esto.  Entonces, ponga 38400 bps en
  /etc/inittab.

  Ahora Linux vigilar el puerto serie por posibles conexiones.  Llame
  desde otro sitio y conctese a su sistema Linux.

  uugetty tiene muchas opciones, vea la pgina man de getty(1m) para una
  descripcin completa. Adems de otras cosas hay una caracterstica de
  planificacin y otra de rellamada.

  7.  Cmo puedo tener un terminal conectado a mi PC?

  Las instrucciones de esta seccin sirven para la conexin de
  terminales, as como otros ordenadores a un puerto serie de su sistema
  Linux.

  7.1.  Hardware requerido

  Asegrese de tener el cable correcto. Un cable de mdem nulo comprado
  en cualquier tienda de informtica puede valer. Pero debe ser un
  cable de modem nulo!. Muchas tiendas de informtica venden este tipo
  de cable como cable serie de impresora. Asegrese de estar usando el
  puerto serie, el DB25 o el DB9 macho, y no el puerto paralelo (DB25
  hembra o Centronics).

  Para un conector DB25, necesita como mnimo:

  DB25 macho en el PC                     DB25 en el Terminal
  TxD   Transmision de datos  2 --> 3     RxD   Recepcion de datos
  RxD   Recepcion de datos    3 <-- 2     TxD   Transmision de datos
  SG    Tierra                7 --- 7     SG    Tierra

  Si quiere tener seales de sincronizacin del hardware, debe tener un
  cable completo de mdem nulo:

  DB25 macho del PC                       DB25 del terminal
  TxD  Transmision de datos   2 --> 3     RxD  Recepcion de datos
  RxD  Recepcion de datos     3 <-- 2     TxD  Transmision de datos
  RTS  Peticion de envio      4 --> 5     CTS  Listo para envio
  CTS  Listo para envio       5 <-- 4     RTS  Peticion de envio
  DSR  Modem listo            6
                              |
  DCD  Deteccion de portadora 8 <-- 20    DTR  Terminal listo
  SG   Tierra                 7 --- 7     SG   Tierra
                                    6     DSR  Modem listo
                                    |
  DTR  Terminal listo        20 --> 8     DCD  Deteccion de portadora

  Si tiene un conector DB9 en el puerto serie, intente lo siguiente:

  DB9 del PC                              DB25 del terminal
  RxD  Recepcion de datos     2 <-- 2     TxD  Transmision de datos
  TxD  Transmision de datos   3 --> 3     RxD  Recepcion de datos
  SG   Tierra                 5 --- 7     SG   Tierra

  Alternativamente, un cable completo DB9-DB25 de mdem nulo:

  DB9 del PC                              DB25 del terminal
  RxD  Recepcion de datos     2 <-- 2     TxD  Transmision de datos
  TxD  Transmision de datos   3 --> 3     RxD  Recepcion de datos
                                    6     DSR  Modem listo
                                    |
  DTR  Terminal listo         4 --> 8     DCD  Deteccion de portadora
  GND  Tierra                 5 --- 7     GND  Tierra
  DCD  Deteccion de portadora 1
                              |
  DSR  Modem listo            6 <-- 20    DTR  Terminal listo
  RTS  Peticion de envio      7 --> 5     CTS  Listo para envio
  CTS  Listo para envio       8 <-- 4     RTS  Peticion de envio
  (RI  Indicador de llamada   9, no se necesita)

  (Efectivamente, los pins 2 y 3 realmente tienen significados opuestos
  en los conectores DB9 a los que tienen en los conectores DB25!)

  Si no est usando un cable completo de mdem nulo, deber hacer el
  siguiente truco: en la parte del conector que va al ordenador, conecte
  juntos RTS y CTS, y adems conecte juntos DSR, DCD y DTR. De este
  modo, cuando el ordenador busque una cierta seal de sincronismo, la
  coger (de l mismo).

  Ahora que tiene el tipo de cable adecuado, conecte el terminal al
  ordenador. Si puede, dgale al terminal que ignore las seales de
  control de mdem. Pruebe a configurar el terminal a 9600 bps, 8 bits
  de datos, 1 bit de parada y sin bit de paridad.

  7.2.  Configurando getty

  Aada las siguientes entradas en /etc/gettydefs para usar getty en su
  terminal, si todava no estn all:

       # Entrada para un terminal no-inteligente a 38400 bps
       DT38400# B38400 CS8 CLOCAL # B38400 SANE -ISTRIP CLOCAL #@S @L login: #DT38400

       # Entrada para un terminal no-inteligente a 19200 bps
       DT19200# B19200 CS8 CLOCAL # B19200 SANE -ISTRIP CLOCAL #@S @L login: #DT19200

       # Entrada para un terminal no-inteligente a 9600 bps
       DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S @L login: #DT9600

  Si lo desea, puede hacer que getty imprima cosas interesantes en el
  mensaje de login. En los ejemplos, imprime el nombre del sistema y la
  lnea serie. Puede aadir ms cosas:

       @B    Velocidad actual en bps (calculada en el momento que se lee @B).
       @D    Fecha actual, en MM/DD/AA.
       @L    Linea serie a la cual esta conectado getty.
       @S    Nombre del sistema.
       @T    Hora actual, en HH:MM:SS (24 horas).
       @U    Numero de usuarios actualmente conectados. Esto es, el numero
             de entradas en el fichero /etc/utmp que tienen un campo ut_name
             no nulo.
       @V    Valor de VERSION, dado en el fichero de opciones por defecto.
       Para que se vea el caracter '@', use '\@' o '@@'.

  Asegrese de que no existe un fichero de configuracin de getty o
  uugetty para el puerto serie al que est conectado el terminal
  (/etc/default/{uu}getty.ttySN o /etc/conf.{uu}getty.ttySN), ya que
  probablemente esto interferir si ejecuta getty en un terminal. Borre
  el fichero si existe.

  Edite el fichero /etc/inittab para ejecutar getty en un puerto serie
  (substituya la informacin por la correcta para su entorno - puerto,
  velocidad, y tipo de terminal por defecto):

       S1:456:respawn:/sbin/getty ttyS1 DT9600 vt100

  Vuelva a ejecutar init:

       linux# init q

  Ahora, debera estar viendo una peticin de login en el terminal.
  Debe pulsar return para conseguir la atencin del terminal.

  7.3.  Notas sobre cmo configurar un PC como terminal

  Mucha gente configura otros PCs como terminales conectados a un
  sistema Linux. Por ejemplo, un viejo 8088 u 80286 es perfecto para
  este propsito.  Todo lo que necesita es un disco de arranque de DOS
  que contenga una versin de DOS apropiada para un terminal-PC, y un
  programa de comunicaciones para ejecutar en el terminal-PC.

  kermit funciona muy bien para esto. Puede encontrar versiones
  precompiladas de kermit para casi todos los SO que existen en
  ftp://watsun.cc.columbia.edu/pub/ftp/kermit. Otros programas de
  comunicaciones populares de DOS, como Telix y procomm funcionan igual
  de bien. Asegrese de introducir la informacin del puerto serie en la
  configuracin de comunicaciones del terminal-PC.

  8.  Puedo usar ms de dos dispositivos serie?

  No necesita leer esta seccin, a menos que quiera usar tres o ms
  dispositivos serie... (suponiendo que tiene una placa multipuerto).

  Suponiendo que tiene otro puerto serie sin usar, s, puede. El nmero
  de puertos serie que puede usar est limitado por el nmero de
  interrupciones (IRQs) y direcciones de puertos de E/S que tengamos
  disponibles. Esto no es una limitacin de Linux, es una limitacin del
  bus del PC. Cada dispositivo serie debe tener asignado una
  interrupcin propia y una direccin. Un dispositivo serie puede ser un
  puerto serie, un mdem interno, o una placa serie multipuerto.

  Las placas serie multipuerto estn especialmente diseadas para tener
  mltiples puertos serie que comparten la misma IRQ. Linux obtiene los
  datos de ellos usando una direccin de E/S para cada puerto de la
  placa.

  8.1.  Eligiendo las interrupciones de los dispositivos serie

  El PC normalmente viene con ttyS0 y ttyS2 en la IRQ 4, y ttyS1 y ttyS4
  en la IRQ 3. Puede saber que IRQs estn usndose viendo
  /proc/interrupts. Para usar ms de dos dispositivos serie, debe
  reasignar las interrupciones. Una buena eleccin es reasignar una
  interrupcin del puerto paralelo. El PC normalmente viene con IRQ 5 e
  IRQ 7 configuradas como interrupciones para los puertos paralelos,
  pero poca gente usa dos puertos paralelos. Puede reasignar una de las
  interrupciones a un dispositivo serie, y an usar felizmente un puerto
  paralelo.  Necesitar el programa setserial para hacer esto. Adems,
  tendr que jugar con los puentes de su placa, vea los documentos de su
  placa. Ponga los puentes para la IRQ que quiera para cada puerto.

  Necesitar configurar algunas cosas, ya que hay una, y solamente una
  interrupcin para cada dispositivo serie. As es como tengo mi
  configuracin en /etc/rc.d/rc.local - debe hacerlo donde quiera que
  tenga su fichero de inicializacin:

       /sbin/setserial /dev/cua0 irq 3      # mi raton serie
       /sbin/setserial /dev/cua1 irq 4      # mi terminal Wyse no-inteligente
       /sbin/setserial /dev/cua2 irq 5      # mi modem Zoom
       /sbin/setserial /dev/cua3 irq 9      # mi modem USR

  Asignacin estndar de IRQ:

                IRQ  0    Reloj en el canal 0
                IRQ  1    Teclado
                IRQ  2    Cascada para el controlador 2
                IRQ  3    Puerto serie 2
                IRQ  4    Puerto serie 1
                IRQ  5    Puerto paralelo 2
                IRQ  6    Disquetera
                IRQ  7    Puerto paralelo 1
                IRQ  8    Reloj de tiempo real (24 horas)
                IRQ  9    Redireccionada a IRQ 2
                IRQ 10    no asignada
                IRQ 11    no asignada
                IRQ 12    no asignada
                IRQ 13    Coprocesador matematico
                IRQ 14    Controlador de disco duro 1
                IRQ 15    Controlador de disco duro 2

  No existen realmente un Modo Correcto de hacer las cosas cuando se
  eligen las interrupciones. Slo asegrese de que no las est usando la
  placa madre, o cualquier otra placa. 2, 3, 4, 5,  7 son buenas
  elecciones.  ``no asignada'' significa que actualmente nada estndar
  usa estas IRQs.  Ntese tambin que la IRQ 2 es la misma que la IRQ 9.
  Puede llamarlo 2  9, el controlador serie lo entender. Si tiene una
  placa serie con un conector de 16 bits, tambin puede usar las IRQ 10,
  11, 12  15.

  Slo asegrese de no usar las IRQs 0, 1, 6, 8, 13  14!. Estas son
  usadas por la placa madre. La har muy desgraciada si coge sus IRQs.
  Cuando lo haga, compruebe otra vez /proc/interrupts y asegrese de que
  no haya conflictos.

  8.2.  Configurando las direcciones de los dispositivos serie

  El siguiente paso es configurar la direccin del puerto. Vea el manual
  de su placa para configurar los puentes. Como las interrupciones,
  puede haber slo un dispositivo serie en cada direccin. Los puertos
  suelen venir configurados de la siguiente manera:

       ttyS0 direccion 0x3f8
       ttyS1 direccion 0x2f8
       ttyS2 direccion 0x3e8
       ttyS3 direccion 0x2e8

  Elija la direccin que desee para cada dispositivo serie que tenga y
  configure los puentes en concordancia. Tengo mi mdem en ttyS3, el
  ratn en ttyS0, y el terminal en ttyS2.

  Cuando arranque de nuevo, Linux debera ver los puertos serie en las
  direcciones en las que lo ha definido. La IRQ que Linux ve puede que
  no corresponda a la IRQ que ha configurado con los puentes. No se
  preocupe por esto. Linux no hace ninguna deteccin de IRQ mientras
  arranca, porque la deteccin de IRQ no es fiable y puede ser falsa.
  Use setserial para decirle a Linux que IRQ est usando el puerto.
  Puede ver /proc/ioports para saber que direcciones del puerto de E/S
  est usando Linux despus de arrancar.

  9.  velocidad debo usar con mi mdem?  Cmo puedo configurar el
  puerto serie para velocidades altas? qu

  Esta seccin le ayudar a calcular la velocidad a usar cuando use su
  mdem con un programa de comunicaciones, o con un programa getty.

    Si tiene algo ms lento que un mdem de 9600 bps (V.32), configure
     la velocidad a la ms alta que su mdem soporte. Por ejemplo 300
     bps (V.21/Bell 103), 1200 bps (V.22/Bell 212A),  2400 bps
     (V.22bis).

    Si tiene un mdem de 9600 bps (V.32), con compresin de datos
     V.42bis, ponga la velocidad a 38400 bps .  La compresin V.42bis
     tiene una velocidad terica de 4:1, es decir ``4 * 9600 = 38400''.

    Si tiene un mdem de 14400 bps (V.32bis), con compresin de datos
     V.42bis, use setserial con el parmetro spd_hi para configurar el
     puerto serie a 57600 bps (4 * 14400 = 57600).

     Use el parmetro spd_hi si tiene un mdem a 28800  33600 bps (V.FC
     o V.34) (4 * 28800 = 115200).

     Despus, use la velocidad de 38400 bps en su programa de
     comunicaciones, o en /etc/inittab. Esta es ahora la velocidad ms
     alta que ha configurado. Asegrese de tener UARTs 16550A.

     Si su versin de libc es por lo menos 5.x, debe haber velocidades
     llamadas 57600 y 115200. libc est en /lib, as que mire all para
     saber que versin tiene. Puede usar esto directamente (sin usar
     setserial), si sus aplicaciones han sido compiladas para usarlas.
     Existen muchas distribuciones por ah, as que lo mejor que puede
     hacer es probar las velocidades ms altas si tiene una versin
     reciente de una distribucin Linux.

  Compruebe primero la configuracin de setserial en la lnea de
  comandos, y despus cuando est funcionando, pngalo en
  /etc/rc.d/rc.serial o /etc/rc.d/rc.local, yo he puesto ttyS3 a 115200
  bps escribiendo:

       /sbin/setserial /dev/cua3 spd_vhi

  Asegrese de estar usando un path vlido para setserial, y un nombre
  vlido para el dispositivo. Puede comprobar la configuracin de un
  puerto serie ejecutando:

       setserial -a /dev/cuaN

  10.  Programas de comunicaciones y utilidades

  Una vez que todo est funcionando, puede querer echar un vistazo a
  programas ms avanzados. Todos estn asequibles en los servidores
  habituales de FTP, si no vienen ya con su distribucin.
    ecu - un programa de comunicaciones

    minicom - programa de comunicaciones parecido a telix

    procomm - programa de comunicaciones con zmodem parecido a procomm

    seyon - programa de comunicaciones basado en X

    xc - paquete de comunicaciones xcomm

  Estos programas ofrecen ms herramientas que kermit solo, incluyendo
  agenda telefnica, auto-marcado y cosas por el estilo.

    Otros programas muy tiles son term y SLirP. Ofrecen funcionalidad
     TCP/IP usando una cuenta de la shell.

    screen es otro programa multi-sesin. Se comporta igual que las
     consolas virtuales.

    callback es un programa que hace que su mdem le llame al lugar de
     donde usted le ha llamado.

    getty+fax controla las cosas del FAX, y provee un getty
     alternativo.

    ZyXEL es un programa de control para los mdems ZyXEL U-1496.
     Controla las llamadas entrantes, llamadas de respuesta de
     seguridad, enviar FAX, y funciones de buzn de voz.

    El software de SLIP y PPP se puede encontrar en
     ftp://sunsite.unc.edu/pub/Linux/system/Network/serial.

    Se puede encontrar otras cosas en
     ftp://sunsite.unc.edu/pub/Linux/system/Serial y
     ftp://sunsite.unc.edu/pub/Linux/apps/comm o uno de los muchos
     servidores espejo. Estos son los directorios donde se estn
     manteniendo los programas serie.

  11.  Trucos serie y miscelneas

  Aqu vienen algunos trucos serie que puede encontrar tiles ...

  11.1.  kermit y zmodem

  Para usar zmodem con kermit, aada lo siguiente a .kermc:

       define rz !rz < /dev/cuaN > /dev/cuaN
       define sz !sz \%0 > /dev/cuaN < /dev/cuaN

  Asegrese de poner el puerto correcto en el que est el mdem.
  Despus, para usarlo, solamente escriba rz o sz <nombre_de_fichero> en
  la lnea de comandos de kermit.

  11.2.  Activando los tipos de terminal automgicamente

  Para activar automgicamente un tipo de terminal cuando se conecte,
  adalo al fichero /etc/inittab. Si tengo un terminal vt100 en ttyS1,
  debo aadir ``vt100'' al comando getty:

       S1:456:respawn:/sbin/getty ttyS1 DT9600 vt100

  Tambin puede conseguir tset en
  ftp://sunsite.unc.edu:/pub/Linux/system/Terminal-management o en un
  servidor espejo. Vea los documentos que vienen con tset para aprender
  como usarlo. tset puede establecer las caractersticas de un terminal
  cuando usted se conecte, y no depende de ninguna opcin por defecto.

  11.3.  ls  en color en conexiones serie

  Si ls est causando problemas en la emulacin del terminal con la
  opcin de color, desconctela. ls --color, y ls --colour usan las
  caractersticas de color. Algunas instalaciones tienen ls preparado
  para usar el color por defecto. Busque en /etc/profile y
  /etc/csh.cshrc alias de ls.  Tambin puede ponerle el alias ls --no-
  color a ls, si no quiere cambiar la configuracin por defecto del
  sistema.

  11.4.  Imprimiendo en una impresora conectada a un terminal

  Hay un programa llamado vtprint que hace esto, escrito por Garrett
  D'Amore, garrett@sdsu.edu. Est disponible en
  ftp://ftp.sdsu.edu/pub/vtprint, y en http://www.sdsu.edu/~garrett. Lo
  siguiente ha sido extrado del fichero README que viene con el
  programa:

       vtprint es un programa que permite a los usuarios imprimir
       desde un anfitrin Unix remoto a una impresora conectada a
       un terminal local o emulador, lo cual es perfecto para
       imprimir ficheros en casa, etc. (Slo con ficheros de texto,
       creo.)

  11.5.  Puede linux configurar los dispositivos serie automgicamente?

  S. Para conseguir que Linux detecte y configure los dispositivos
  serie automticamente al arrancar, aada la lnea:

       /sbin/setserial /dev/cuaN auto_irq skip_test autoconfig

  al fichero /etc/rc.d/rc.local o /etc/rc.d/rc.serial.  Haga esto para
  cada puerto serie que quiera que se autoconfigure.  Asegrese de poner
  un nombre de dispositivo que realmente exista en su mquina.

  11.5.1.  Notas sobre placas multipuerto

  Para direcciones de placas, e IRQs, mire en rc.serial que viene con el
  programa setserial. Trae muchos detalles sobre placas multipuerto,
  incluyendo las direcciones de E/S y los nombres de los dispositivos.

  12.  Un paso ms ...

  Esta seccin no necesita ser leda, pero puede ayudarle a comprender
  algo mejor el Unix, y el mundo de las telecomunicaciones.

  12.1.  Qu son los ficheros de bloqueo?

  Un fichero de bloqueo es simplemente un fichero que dice que
  dispositivo se est usando. Estn en /usr/spool/uucp, o /var/lock.
  Los ficheros de bloqueo en Linux se llaman LCK..nombre, donde nombre
  puede ser un nombre de dispositivo, o un nombre de un sitio UUCP.
  Ciertos procesos crean estos bloqueos para as poder tener acceso
  exclusivo a un dispositivo, por ejemplo, si llama con su mdem,
  aparecer un bloqueo para que otros procesos sepan que alguien est
  usando actualmente el mdem. Los bloqueos principalmente contienen el
  PID del proceso que tiene bloqueado el dispositivo. Muchos programas
  comprueban si un dispositivo est bloqueado, e intentan determinar si
  ese bloqueo es todava vlido buscando en la tabla de procesos el que
  tiene bloqueado el dispositivo. Si el bloqueo es vlido, el programa
  se cerrar (o debera cerrarse). Si no, algunos programas borran el
  bloqueo viejo, y usan el dispositivo, creando su propio bloqueo. Otros
  programas solamente se cierran y dicen que el dispositivo est
  usndose.

  12.2.  ``baudios'' Vs. ``bps''

  ``baudios'' y ``bps'' son, quizs, unos de los trminos peor usados en
  el campo de los ordenadores y telecomunicaciones. Mucha gente usa
  estos trminos indiferentemente, cuando de hecho no son lo mismo!.

     baudios
        La velocidad en baudios es una medida de cuantas veces por
        segundo cambia una seal, por ejemplo una seal enviada por un
        mdem (moulador-demodulador). Es decir, una velocidad de 1200
        baudios implica que una seal cambia cada 833 microsegundos. Las
        velocidades de los mdems normales son 50, 75, 110, 300, 600,
        1200, y 2400. La mayora de los mdems rpidos van a 2400
        baudios. Debido a limitaciones del ancho de banda en las lneas
        telefnicas de voz, las velocidades superiores a 2400 baudios
        son difciles de alcanzar, y slo funcionan en lneas
        telefnicas de alta calidad.  Se pueden codificar varios bits
        por baudio, para conseguir velocidades que excedan la velocidad
        del baudio. Se llama ``baudio'' en honor a Emile Baudot,
        inventor de la impresora asncrona del telgrafo (teletipo).

     bps
        La velocidad en bps es una medida de cuantos bits por segundo
        son transmitidos. Las velocidades en bps de los mdem normales
        son 50, 75, 110, 300, 1200, 2400, 9600, ... 115200. Usando
        mdems con compresin V.42bis (compresin mxima 4:1), son
        posibles velocidades tericas de hasta 115200 bps. Esto es lo
        que la mayora de la gente quiere decir cuando mal usan la
        palabra ``baudios''.

  As, si mdems de alta velocidad estn funcionando a 2400 baudios,
  cmo pueden enviar 14400 bps?. Los mdems alcanzan una velocidad en
  bps mayor que la velocidad en baudios codificando varios bits en cada
  cambio de seal, o cambio de fase. De este modo, cuando 2 o ms bits
  son codificados por baudio, la velocidad en bps supera a la velocidad
  en baudios. Si su mdem se conecta a 14400 bps, estar enviando 6 bits
  en cada cambio de fase, a 2400 baudios.

  Cmo empez esta confusin?. Bien, volviendo a cuando los mdems
  lentos eran mdems de alta velocidad, la velocidad en bps realmente
  era igual a la velocidad en baudios. Un bit poda ser codificado por
  cambio de fase.  La gente poda usa bps y baudios intercambindolos,
  porque eran el mismo nmero. Por ejemplo, un mdem de 300 bps tambin
  tena una velocidad de 300 baudios. Todo esto cambi cuando llegaron
  los mdems ms rpidos, y la velocidad en bits super a la velocidad
  en baudios.

  12.3.  Qu son las UARTs? Cmo afectan al rendimiento?

  Las UARTs (Universal Asyncronous Receiver Transmitter) son circuitos
  integrados de la placa serie del PC.  Su propsito es convertir los
  datos a bits, enviarlos a la lnea serie, y despus reconstruir los
  datos en el otro terminal. Las UARTs tratan los datos en bloques del
  tamao de un byte, que adems es, convenientemente, el tamao de los
  caracteres ASCII.

  Digamos que tiene un terminal conectado a su PC. Cuando escriba un
  carcter, el terminal da el carcter a su transmisor (tambin una
  UART).  El transmisor enva ese byte a la lnea serie, un bit cada
  vez, a una determinada velocidad. En el otro PC, la UART que recibe,
  coge todos los bits, reconstruye el byte y lo coloca en el bfer.

  Existen dos tipos diferentes de UARTs. Probablemente ha odo algo
  sobre las UARTs no inteligentes - la 8250 y 16450, y las UARTs FIFO -
  la 16550A.  Para entender las diferencias, examinemos primero qu
  ocurre cuando una UART ha enviado o recibido un byte.

  La UART no puede hacer nada con los datos por s misma, slo los enva
  y los recibe. La CPU recibe una interrupcin del dispositivo serie
  cada vez que se recibe o enva un byte. Entonces la CPU mueve el byte
  recibido desde el bfer de la UART a algn lugar de la memoria, o le
  da a la UART otro byte a enviar. Las UARTs 8250 y 16450 slo tienen un
  bfer de 1 byte.  Esto significa, que cada vez que se enva o recibe 1
  byte, se interrumpe a la CPU.  A velocidades bajas, est bien. Pero, a
  velocidades de transferencia alta, la CPU est demasiado ocupada
  tratando con la UART, y no le deja tiempo de atender otras tareas. En
  algunos casos, la CPU no puede atender la interrupcin a tiempo, y se
  sobreescribe el byte, debido a que llegan demasiado rpido.

  Ah es cuando son tiles las UARTs 16550A. Estos integrados tienen un
  bfer FIFO de 16 bytes. Esto significa que pueden recibir o transmitir
  hasta 16 bytes antes de tener que interrumpir a la CPU.  La CPU no
  slo puede esperar, sino que puede entonces transferir los 16 bytes de
  una sola vez. Aunque es raro que el umbral de interrupcin est a 16,
  esto es una ventaja significante frente a las otras UARTs, que slo
  tienen un bfer de 1 byte. La CPU recibe menos interrupciones, y est
  libre para hacer otras cosas. No se pierden datos, y todo el mundo es
  feliz. (Tambin existe una UART 16550, pero es tratada como un 16450
  ya que no funciona bien.)

  En general, las UARTs 8250 y 16450 deben valer para velocidades de
  hasta 38400 bps. A velocidades mayores que 38400 bps, puede empezar a
  tener prdida de datos. Otros sistemas operativos de PC (definicin
  usada aqu vagamente) como DOS no son multitarea, por eso deben ser
  capaces de habrselas mejor con 8250  16450. Por eso es por lo que
  algunas personas no sufren prdidas de datos, hasta que cambian a
  Linux.

  Las placas sin UART y las multipuerto inteligentes usan integrados DSP
  para hacer las tareas de bfer y control adicional, esto libera mucho
  ms la CPU. Por ejemplo, las placas Cyclades Cyclom y Stallion EasyIO
  usan una UART Cirrus Logic CD1400, y muchas placas usan CPUs 80186 o
  incluso CPUS RISC especiales, para controlar la E/S serie.

  Tenga en mente que este tipo de UART no inteligentes no son malas,
  simplemente no son buenas para velocidades altas. No debe tener
  problemas conectando un terminal, o un ratn a estas UARTs. Pero, para
  un mdem de alta velocidad, la 16550A es imprescindible.

  Puede comprar placas serie con la UART 16550A por un poco ms de
  dinero, solamente pregunte al vendedor que tipo de UART tiene la
  placa. O si quiere actualizar su placa, simplemente compre el chip
  16550A y reemplcelo por su UART 16450. Son compatibles patilla a
  patilla. Algunas placas traen la UART en zcalo para este propsito,
  si no, puede soldarlo.  Ntese que probablemente se ahorrar un montn
  de problemas consiguiendo una placa nueva, si tiene el dinero, cuestan
  menos de 5000 ptas.

  12.4.  /dev/cua N  Y /dev/ttyS N ?  Cul es la diferencia real entre
  los dispositivos

  La nica diferencia es el modo en que se abren los dispositivos. Los
  dispositivos para recibir llamadas /dev/ttySN se abren en modo
  bloqueante, hasta que se haya detectado la portadora (CD)  (esto es,
  alguien conecta). As, cuando alguien quiere usar el dispositivo
  /dev/cuaN, no hay conflictos con un programa que est vigilando el
  dispositivo /dev/ttySN (a menos que alguien est conectado, por
  supuesto).

  Las mltiples entradas /dev, permiten operaciones sobre el mismo
  dispositivo fsico con diferentes caractersticas de operacin.
  Tambin permite a los programas getty estndar coexistir con cualquier
  otro programa serie, sin que getty tenga que ser reajustado con
  bloqueos de ningn tipo. Es especialmente til ya que los ficheros de
  bloqueo de los ncleos Unix estndar, y los bloqueos de UUCP son de
  aviso y no de obligatoriedad.

  13.  Eliminando problemas

  13.1.  Me dice: ``line NNN  of inittab invalid''

  Asegrese de estar usando la sintaxis correcta para su versin de
  init. Las diferentes versiones de init que hay por ah usan sintaxis
  diferentes en el fichero /etc/inittab.  Asegrese de estar usando la
  sintaxis correcta para su versin de getty.

  13.2.  busy'' (dispositivo o recurso ocupado) Cuando intento llamar,
  dice: ``/dev/cua N : Device or resource

  Este problema puede surgir cuando DCD o DTR no estn activados
  correctamente. DCD slo debe activarse cuando haya una conexin en
  curso (ej: alguien ha llamado a este sistema), no cuando getty est
  vigilando el puerto. Compruebe el mdem para asegurarse de que est
  configurado para activar DCD slo cuando haya una conexin. DTR debe
  estar activo siempre que alguien est usando, o vigilando la lnea,
  como getty, kermit, o algn otro programa de comunicaciones.

  Otra causa comn de los errores de ``device busy'' (dispositivo
  ocupado), es que haya configurado el puerto serie con una interrupcin
  que ya est siendo usada. Cuando cada dispositivo se inicializa, le
  pide permiso a Linux para usar las interrupciones hardware.  Linux
  sigue la pista de a quin se le ha asignado cada interrupcin, y si la
  interrupcin ya est siendo usada ser imposible que el dispositivo se
  inicialice correctamente. El dispositivo realmente no tiene muchas
  formas de avisarle de que esto est ocurriendo, excepto que cuando
  intente usarlo, dar un mensaje de error ``device busy''.  Compruebe
  las interrupciones de todas las placas (serie, ethernet, SCSI, etc).
  Busque conflictos de IRQ.

  13.3.  (Id S N  reiniciado demasiado rpido: desconectado durante 5
  minutos) Asegrese de que el mdem est configurado correctamente.
  Mire los registros E  y Q .  Esto puede ocurrir cuando el mdem est
  negociando con getty .  Asegrese de estar llamando correctamente a
  getty  desde /etc/inittab . Si usa una sintaxis o nombre de disposi
  tivo incorrectos puede causar graves problemas. Esto tambin puede
  ocurrir cuando est fallando la inicializacin de uugetty .  Me dice:
  ``Id S N  respawning too fast: disabled for 5 minutes''

  13.4.  pueden enviar en una direccin Los dispositivos serie son
  lentos, o los dispositivo serie slo

  Probablemente tenga un conflicto de IRQ. Asegrese de que no se estn
  compartiendo IRQs. Compruebe todas las placas (serie, ethernet, SCSI,
  etc). Asegrese de que los puentes, y los parmetros de setserial son
  los correctos en todos los dispositivos serie.  Revise tambin
  /proc/ioports y /proc/interrupts por si hubiera conflictos.

  13.5.  Mi mdem se bloquea despus de colgar, o uugetty  no se reini
  cia.

  Esto puede ocurrir cuando no se reinicia el mdem al desactivar el
  DTR. He visto que los LEDs RD y SD de mi mdem se vuelven locos cuando
  esto ocurre. Debe tener el mdem reiniciado. Muchos mdems compatible
  Hayes hacen esto con &D3, pero en mi USR Courier, he tenido que poner
  &D2 y S13=1. Mire en el manual de su mdem.

  13.6.  nombre de registro, slo se bloquea Tengo un terminal conectado
  al PC, pero despus de escribir un

    Si est usando getty:  Probablemente no tendr puesto CLOCAL en
     ninguna lnea de /etc/gettydefs para el terminal, y probablemente
     no est usando un cable completo de mdem nulo. Necesita CLOCAL, el
     cual le dice a Linux que ignore las seales del control del mdem.
     Debera parecerse a esto:

       # 38400 bps, entrada para un Terminal no inteligente
       DT38400# B38400 CS8 CLOCAL # B38400 SANE -ISTRIP CLOCAL #@S @L login: #DT38400

       # 19200 bps, entrada para un Terminal no inteligente
       DT19200# B19200 CS8 CLOCAL # B19200 SANE -ISTRIP CLOCAL #@S @L login: #DT19200

       # 9600 bps, entrada para un Terminal no inteligente
       DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S @L login: #DT9600

  Despus, elimine el proceso getty con el comando kill y se generar un
  proceso nuevo con la nueva entrada.

    Si est usando agetty:  Aada el parmetro -L a la lnea de agetty
     en /etc/inittab. Esto har que ignore las seales de control del
     mdem. Despus ejecute de nuevo init escribiendo init q.  La lnea
     debera ser como esta:

       s1:345:respawn:/sbin/agetty -L 9600 ttyS1 vt100

  13.7.  A velocidades altas, mi mdem pierde datos

  Si est intentando usar el mdem a ms de 38400 bps, y no tiene una
  UART 16550A, debe conseguirla. Vea la seccin ``Qu son las UARTs?''
  para saber ms sobre las UARTs.

  13.8.  he configurado Al arrancar, linux no informa a los dispositivos
  serie de cmo los

  Esto es verdad. Linux no realiza ninguna deteccin de IRQ al arrancar,
  slo hace la deteccin de los dispositivos serie. As que no haga caso
  de lo que diga sobre las IRQs, ya que asume que son las IRQs estndar.
  Esto se hace porque la deteccin de IRQs no es fiable, y puede ser
  falsa.

  As, an cuando tengo mi ttyS2 en la IRQ5, me sale

       Jan 23 22:25:28 misfits vmunix: tty02 at 0x03e8 (irq = 4) is a 16550A

  cuando Linux arranca.

  Tiene que usar setserial para decirle a Linux la IRQ que est usando.
  Despus de que Linux arranque, puede mirar en el fichero
  /proc/interrupts para ver que IRQs se han configurado realmente.

  13.9.  con un mdem rz  y/o sz  no funcionan cuando llamo a mi mquina
  linux

  Si Linux busca /dev/modem cuando intenta enviar un fichero, mire en
  /etc/profile, y /etc/csh.cshrc. Algunas distribuciones definen ah
  muchos alias, sobre todo Slackware. Estos alias echan a perder los
  programas zmodem. Elimnelos o corrjalos.

  13.10.  En mi pantalla estn saliendo caracteres muy graciosos

  Esto ocurre en las consolas virtuales cuando enva datos binarios a la
  pantalla, o a veces en conexiones serie.  La forma de arreglar esto es
  escribiendo echo ^v^[c. Para los que son incapaces de identificar los
  caracteres de control, es:

       linux% echo <ctrl>v<esc>c

  13.11.  getty  o uugetty  no funciona todavia

  Existe la opcin DEBUG que viene con getty_ps. Edite el fichero de
  configuracin /etc/conf.{uu}getty.ttySN y aada DEBUG=NNN. Donde NNN
  es una de las combinaciones numricas siguiente, dependiendo de lo que
  quiera depurar:

       D_OPT   001            activacion de las opciones
       D_DEF   002            procesamiento del fichero de opciones por defecto
       D_UTMP  004            procesamiento de utmp/wtmp
       D_INIT  010            inicializacion de la linea (INIT)
       D_GTAB  020            procesamiento del fichero gettytab
       D_RUN   040            otros diagnosticos de ejecucion
       D_RB    100            depuracion de rellamada
       D_LOCK  200            procesamiento de bloqueo de uugetty
       D_SCH   400            procesamiento de tareas
       D_ALL   777            todo lo anterior

  Poniendo DEBUG=010 es una buena forma de empezar.

  Si est ejecutando syslogd, la informacin de depuracin aparecer en
  los ficheros log. Si no est usando syslogd la informacin aparecer
  en /tmp/getty:tyySN si depura getty y /tmp/uugetty:ttySN si usa
  uugetty, y en /var/adm/getty.log. Mire la informacin de depuracin y
  vea que est ocurriendo. Probablemente necesitar ajustar algunos
  parmetros del fichero de configuracin, y reconfigurar el mdem.

  Tambin lo puede intentar con mgetty. Algunas personas tienen mejores
  resultados con l.

  14.  Otras fuentes de informacin

    pginas man de: agetty(8), getty(1m), gettydefs(5), init(1),
     login(1), mgetty(8), setserial(8)

    El manual del mdem

    NET-2 HOWTO: todo sobre redes, incluido SLIP, CSLIP, y PPP

    PPP HOWTO: ayuda para PPP

    Printing HOWTO: para configurar una impresora serie

    Term HOWTO: todo lo que quera saber sobre el programa term

    UPS HOWTO: configuracin de una UPS conectada al puerto serie

    UUCP HOWTO: informacin sobre como configurar UUCP

     Grupos de noticias de Usenet:

       comp.os.linux.answers
       FAQs, How-To's. READMEs, etc. sobre Linux.
       comp.os.linux.hardware
       Compatibilidad de hardware con el sistema operativo Linux.
       comp.os.linux.networking
       Redes y comunicaciones bajo Linux.
       comp.os.linux.setup
       Instalacin de Linux y administracion de sistemas.

    La lista de correo serie en Linux. Para apuntarse, mande un mail a
     majordomo@vger.rutgers.edu, con ``subscribe linux-serial'' en el
     cuerpo del mensaje, obtendr un mensaje de ayuda. El servidor
     tambin ofrece otras listas de Linux. Enve el comando ``lists''
     para obtener una lista de las listas de correo.

    Un libro blanco para discutir sobre comunicaciones serie y placas
     serie multipuerto est a su disposicin en Cyclades en
     http://www.cyclades.com.

    Modem FAQs:

  15.  Contribuciones

  Es imposible escribir este HOWTO solo. Aunque una gran parte de este
  HOWTO lo he escrito yo, he tenido que reescribir muchas contribuciones
  para mantener la continuidad del estilo y flujo de escritura. Gracias
  a todos los que han contribuido o comentado algo, la lista de personas
  es demasiado larga para ponerla aqu (ms de cien). En especial quiero
  darle las gracias a Ted T'so por responder a preguntas sobre los
  controladores serie, a Kris Gleason que suele mantener getty_ps, y a
  Gert Dring que mantiene mgetty.

  16.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Instalacin y configuracin de un servidor de IRC
  Diego Berrueta Muoz, berrueta@geocities.com y Jos Alfredo
  Osl Posadas, aosle@pinon.ccu.uniovi.es
  Julio 1998

  Este documento describe los pasos y el software necesarios para crear
  un servidor de IRC con Linux: el demonio de IRC, el bot de gestin del
  servidor y un programa cliente de IRC.
  ______________________________________________________________________

  ndice general


  1. Nota de los autores

  2. Introduccin

     2.1 Qu es el IRC?
     2.2 Qu es un servidor de IRC?
     2.3 Qu necesita un servidor de IRC?
     2.4 Comandos bsicos de IRC
     2.5 Ataques en el IRC

  3. Demonio de IRC:

     3.1 Funcin de un demonio
     3.2 Descripcin de
     3.3 Obtencin e instalacin
     3.4 Configuracin previa a la compilacin
     3.5 Compilacin
     3.6 El fichero
     3.7 Ejecucin del demonio

  4. El

     4.1 Funcin de un
     4.2 (IT
     4.3 Instalacin
     4.4 Edicin del cdigo fuente
     4.5 Compilacin
     4.6 Configuracin
     4.7 Ejecucin

  5. Cliente de IRC

     5.1 Funcin de un cliente de IRC
     5.2 Descripcin de
     5.3 Obtencin e instalacin
     5.4 Configuracin
     5.5 Ejecucin

  6. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Nota de los autores


  Este documento es el resultado de un trabajo realizado para el curso
  "Administracin de un sistema UNIX con Linux", impartido en el verano
  de 1998 en la Escuela Universitaria de Ingeniera Tcnica en
  Informtica de Oviedo (EUITIO).


  Los autores quieren aclarar que no son, ni pretenden ser, expertos en
  IRC. Por eso, este documento puede contener errores. Esperamos que
  sepan perdonarlos y nos los comuniquen.

  Para obtener ms informacin sobre Linux, no olvide visitar la pgina
  web del Proyecto Lucas, (http://lucas.ctv.es/) donde se encargan de
  traducir las guas de Linux al castellano, y la pgina de INSFLUG
  (http://www.insflug.org/), que coordina la traduccin de los
  documentos HOWTO y FAQ).


  2.  Introduccin



  2.1.  Qu es el IRC?


  El IRC (Internet Relay Chat) surgi como una ampliacin del programa
  talk, tratando de superar sus limitaciones. Se trata de un sistema de
  conversacin en tiempo real a travs de redes de ordenadores y, por
  supuesto, de Internet. Las principales diferencias con el talk son las
  siguientes:


    Incorpora un protocolo mucho ms elaborado, independiente de la
     plataforma.

    Posibilidad de conversaciones en las que intervengan ms de dos
     participantes: el lmite depende slo de las posibilidades de los
     servidores.

    Organizacin de las charlas en forma de mltiples canales: por
     establecer un smil, los canales son salones donde se dan cita un
     cierto nmero de usuarios. Esta posibilidad se aprovecha
     generalmente para realizar canales temticos, que son el punto de
     encuentro de personas con inquietudes parecidas.

    Posibilidad de conectar varias redes, para poner en comunicacin un
     gran nmero de usuarios.

    Los usuarios pueden ocultar su identidad, lo que facilita
     conversaciones ms espontneas, pero tambin puede crear riesgos de
     seguridad.

  El IRC naci hace diez aos, cuando el finlands Jarkko Oikarinen
  escribi el primer programa para poder efectuar conversaciones con una
  estructura cliente-servidor. Su expansin fue muy rpida, puesto que
  pronto se implant en la red nacional finlandesa (FUNET), y
  posteriormente en Noruega, Suiza y Estados Unidos.

  La primera gran red de IRC fue EFNet (1990), y despus surgieron otras
  como Undernet (http://www.undernet.org), IRCNet, DALNet, StarChat,
  StarLink, NewLet. Tambin existen redes para las personas de habla
  hispana, como RedLatina, IRC-Hispano (http://www.irc-hispano.org) o la
  ms reciente, Esnet (http://www.esnet.org).  Algunas de estas redes
  son de grandes magnitudes: por ejemplo, en Undernet existen ms de
  diez mil canales.


  2.2.  Qu es un servidor de IRC?


  Como se ha comentado, el IRC se basa en redes de ordenadores. En estas
  redes, al menos un de los ordenadores trabaja como servidor, y sus
  funciones son recoger todos los mensajes enviados por los usuarios y
  reenviarlos. Por tanto, los mensajes no son enviados directamente del
  emisor al destinatario, sino que pasan por el servidor.

  Esta filosofa de funcionamiento permite al administrador del servidor
  ejercer un cierto control: por ejemplo, puede impedir el acceso a
  determinados usuarios, ampliar las posibilidades de conversacin
  comunicando varios servidores o limitar las posibilidades de los
  usuarios.  Adems, hace que todos los usuarios se conecten, en
  principio, en igualdad de condiciones, excepto el administrador, por
  supuesto.


  2.3.  Qu necesita un servidor de IRC?


  Para que un sistema UNIX pueda hacer las funciones de un servidor de
  IRC, es suficiente con lo siguiente:


    Tener acceso a la red.

    Instalar el software apropiado.

  Dando por supuesto el primer apartado, vamos a puntualizar ms en el
  segundo. Qu tipo de software se requiere? En principio, para el
  establecimiento de un servicio bsico, es suficiente con ejecutar un
  demonio de IRC, que se encargar de las tareas descritas en el
  apartado anterior. Sin embargo, esto proporcionar un servicio
  precario: para un gestin eficiente y automtica de la red de IRC, se
  hace necesario un bot o script, que se encargue de la gestin de
  usuarios y canales sin intervencin por parte del administrador.

  Con el fin de poder monitorizar y administrar la red, es conveniente
  que el servidor disponga tambin de un software cliente de IRC.


  2.4.  Comandos bsicos de IRC


  Antes de describir los comandos, es necesario conocer cul es, a
  grandes rasgos, la filosofa del funcionamiento del IRC. Como ya ha
  quedado dicho, las conversaciones se organizan en canales, que a su
  vez se identifican por un nombre (generalmente comienza con el smbolo
  &), y un topic, que es una breve descripcin de los temas a los que
  est dedicado el canal.

  Para poder dar coherencia a las conversaciones, los usuarios tambin
  estn identificados por un nombre, que se llama nick o apodo.  Con el
  fin de poder mostrar una informacin ms explcita sobre el usuario,
  muchas redes exigen introducir el nombre completo y direccin de
  correo electrnico para poder acceder; sin embargo, la mayora de
  usuarios aprovecha estos campos para introducir algn comentario ms o
  menos gracioso.

  Cuando un usuario est dentro de un canal, cualquier texto que escriba
  y que no sea reconocido como un comando, ser enviado a todos los
  dems usuarios que forman parte del canal, y se indicar el apodo del
  usuario emisor. De la misma forma, la recepcin de mensajes es
  automtica; simplemente aparecen en la pantalla cuando son enviados.

  Dentro de un canal existe al menos un usuario que tiene ms
  privilegios que el resto. Se conoce como operador (Op), y tiene, entre
  otros, el poder de expulsar a otros usuarios del canal.

  Un usuario puede estar presente en varios canales, aunque para poder
  disfrutar plenamente de esta posibilidad, es necesario tener un
  software cliente potente y manejable.

  Los comandos que se van a describir ahora son los ms elementales que
  debe conocer un usuario para participar en las conversaciones. Estos
  comandos son enviados por el cliente al servidor, quien se encarga de
  reaccionar de forma adecuada ante ellos.


    /HELP: permite obtener ayuda.

    /JOIN &nombre_canal, /CHANNEL &nombre_canal:

     introduce al usuario en el canal especificado. Si este canal no
     existe, se crea (la gestin dinmica de canales es otra de las
     posibilidades del IRC), y adems confiere al usuario el privilegio
     de ser el operador del canal.

    /WHO nombre_canal: muestra una lista de los usuarios del IRC. Si se
     indica un nombre de canal, restringe el listado a las personas que
     estn presentes en ese canal.

    /WHOIS nick: muestra ms informacin sobre un usuario del que
     conocemos su nick. Sin embargo, por las razones ya comentadas, la
     informacin no suele ser cierta.

    /TOPIC cadena: cambia el topic o descripcin del canal (si tenemos
     privilegios para poder hacerlo).

    /NICK nuevo_nick: permite cambiar nuestro nick o apodo.

    /MSG nick mensaje: enva un mensaje personal a un usuario
     determinado, sin que los dems usuarios lo vean en su pantalla.

    /SIGNOFF, /SI, /BYE, /EXIT, /QUIT: cualquiera de ellos sirve para
     abandonar la conversacin. Si se aade un texto detrs del comando,
     ser enviado como mensaje de despedida.

    /USERS: muestra una lista de todos los usuarios conectados al
     servidor.

    /AWAY: se utiliza para anunciar que, sin abandonar el servidor,
     vamos a estar unos minutos sin atender a la conversacin.

    /QUERY nick: invita al usuario indicado a participar en una
     conversacin privada. Si el receptor responde con un comando
     similar, el dilogo particular dar comienzo.

  Los siguientes comandos los utilizan exclusivamente los operadores:


    /OPER nick password: da al usuario indicado los privilegios de
     operador (si la contrasea es vlida).

    /KICK nick: expulsa al usuario indicado del servidor.

    /QUOTE comando: permite enviar comandos al servidor. Se puede
     utilizar para matar el demonio o realizar operaciones
     privilegiadas.

  Para una lista ms completa de los posibles comandos de IRC, se puede
  acudir a ftp://ftp.rediris.es/docs/rfc/14xx/1459.





  2.5.  Ataques en el IRC


  Como veremos ms adelante, tanto el demonio de IRC como el bot de
  gestin de los canales dedican una parte importante de su
  funcionalidad a impedir la entrada de algunos usuario en las redes de
  IRC.  Por qu es tan importante poder hacer esto?

  La razn es que existen usuarios con grandes conocimientos sobre el
  IRC, y que muestran una actitud beligerante respecto a las ms
  desprevenidos, los usuarios noveles. Aprovechndose de las grietas del
  sistema, son capaces de expulsar a otros usuarios e incluso colgar
  mquinas remotas, mediante diversos tipos de estrategias:


    Flood: consiste en requerir mucha informacin de un usuario de
     manera continua (mediante version, whois, ping, dcc, etc.), con el
     objeto de que la mquina atacada devuelva todas las peticiones,
     llegando a poner en peligro de saturacin al servidor, que
     proceder a expulsarla.

    Floodnets: son grupos de usuarios coordinados mediante scripts, que
     consiguen hacer el trabajo de flood ms efectivo.

    Botnets: se trata de una versin automatizada (mediante scripts)
     del flood.

    ICMP: este tipo de ataques son mucho ms sofisticados y malignos.
     Como dato, baste decir que existe un script escrito en slo cinco
     lneas de perl y capaz de bloquear una mquina Windows remota.

    Smurf: consiste en enviar un ping a la direccin broadcast de una
     gran red, con la identidad del remitente falseada para que apunte a
     la persona atacada. Las respuestas de las mquinas de la red irn
     directamente a esta persona, rompindole la conexin.

  Al crear un servidor de IRC, se debe poner mucha atencin en la
  prevencin de ataques. Los ataques por saturacin son relativamente
  fciles de evitar mediante un bot capaz de detectarlos sobre la marcha
  y anularlos.  Sin embargo, contra los ataques ICMP, la mejor manera de
  defenderse es utilizar la ltima versin del ncleo y los parches.

  Para dificultar an ms el seguimiento de los atacantes, stos suelen
  emplear bouncers, que son demonios colocados en una tercera mquina y
  que se limitan a redirigir todos los paquetes que les lleguen.  De
  esta forma, el pirata puede actuar sin temor a que descubran su IP.

  Se puede consultar ms informacin sobre estos temas (ataques,
  defensas y monitorizacin) en las siguientes direcciones:
  http://www.irchelp.org/irchelp/nuke/ y
  http://www.esi.us.es/~roman/tacticas.html.


  3.  Demonio de IRC: ircd



  3.1.  Funcin de un demonio ircd


  En una arquitectura centralizada como es la arquitectura cliente-
  servidor se distinguen precisamente estas dos partes: cliente, que es
  el que demanda un servicio; y el servidor, que es el que lo oferta. En
  la mquina servidor coexistirn tantos programas esperando a la
  escucha de nuevas peticiones como servicios diferentes se oferten.

  Estos programas, denominados demonios (daemons en la terminologa
  inglesa) son programas que estn en ejecucin, cargados en memoria, y
  que estn encargados de responder a las peticiones que hacen los
  programas clientes, que generalmente estn ubicados en otras mquinas,
  pero que pueden ejecutarse tambin en la propia mquina servidor. Por
  tanto, siempre hay una correspondencia directa entre el programa o
  demonio del servidor y el programa cliente de la mquina cliente.

  En nuestro caso particular de IRC, el servidor ser la mquina que
  ejecute el demonio ircd y los clientes sern los programas que los
  usuarios utilicen para engancharse a este servidor.


  3.2.  Descripcin de ircd-hybrid


  A la hora de instalar un servidor de IRC hay que elegir un demonio de
  ircd. Existen algunos como el irdu, utilizado en la red Undernet, o el
  ms bsico, ircd, sin modificacin alguna.  Pero nosotros hemos
  escogido el ircd-hybrid versin 5.2p1 por ser el ms completo. Es el
  usado en la red Efnet.


  3.3.  Obtencin e instalacin


  Algunas distribuciones como Debian incluyen este software entre sus
  paquetes bsicos. Si utilizamos otra distribucin, se puede recurrir
  al FTP o contactar con sus autores en la direccin ircd-
  hybrid@vol.com.

  El primer paso es descomprimir el paquete con el comando:



       tar xvzf ircd.tar.gz




  Los ficheros descomprimidos los alojaremos en el directorio
  /usr/src/ircd-hybrid-5.2p1/.

  Algunos de los ficheros ms importantes son:


    INSTALL: describe los pasos a realizar para la instalacin.

    README.FIRST, README.hybrid, README.small_nets: como siempre,
     conviene leerlos antes de proceder a la instalacin.

    Opers.txt: describe los comandos para el operador del servidor IRC.

    Doc/: este directorio contiene documentacin sobre IRC.


  3.4.  Configuracin previa a la compilacin


  Como sugiere la documentacin, es preciso revisar algunos ficheros
  donde se definen varios parmetros, por lo que ser necesario compilar
  el programa.  Sin embargo, el primer paso es adaptar los ficheros de
  configuracin y compilacin a nuestro sistema. Esto lo haremos
  ejecutando el script ./configure.


  A continuacin, editaremos parte del cdigo fuente (por motivos de
  optimizacin): puesto que nuestra red no va a tener las pretensiones
  de afluencia de usuarios que tiene Efnet, acortaremos un poco los
  recursos reservados por el ircd para que consuma menos memoria.

  El primer fichero que cambiaremos ser include/config.h, que define
  muchas de las directrices de comportamiento del servidor.
  Modificaremos dos lneas define de esta forma:



       #define HARD_FDLIMIT    256
       #define INIT_MAXCLIENTS 150




  Tambin quitaremos la lnea



       #define DO_IDENTD




  para que no chequee constantemente la identidad de todo aquel que
  entre, ralentizando los accesos al servidor.

  El fichero src/list.c define el tamao de algunas tablas mediante
  smbolos del preprocesador. Pondremos el valor 64 a las variables
  LINK_PREALLOCATE y CLIENTS_PREALLOCATE, lo que es suficiente para una
  red donde no se prevee un acceso mayor a 60 usuarios.

  El ltimo paso antes de la compilacin es editar el fichero Makefile
  resultante de ejecutar el script ./configure, para que la lnea que
  especifica los parmetros que usar el compilador gcc quede de la
  siguiente forma:



       # Default CFLAGS
       CFLAGS= -g -O2 -DCPU=586 -m486




  Los dos ltimos parmetros son opcionales, y sirven para optimizar el
  cdigo generado para mquinas Pentium/AMD.


  3.5.  Compilacin


  Una vez hechos todos los ajustes pertinentes, se puede proceder a la
  compilacin propiamente dicha, con el comando:



       make




  La compilacin transcurrir durante unos minutos, tras los cuales, si
  no se ha producido ningn error, slo faltar crear el directorio
  /usr/local/ircd/, donde se instalarn los ficheros ejecutables gracias
  a la orden:



       make install





  3.6.  El fichero ircd.conf


  Ahora se configura el servidor de IRC. Esto se hace editando el
  fichero /usr/local/ircd/ircd.conf, que se estructura en diferentes
  lneas, identificadas con una letra, y que contienen parmetros
  separados por el signo ':'. Algunas de las lneas ms importantes son:


    A: informacin sobre los administradores:


     1. Compaa

     2. Localizacin

     3. Direccin de contacto


    M: informacin sobre el servidor:


     1. Nombre del host

     2. Direccin IP (opcional)

     3. Nombre del servidor IRC

     4. Puerto (generalmente, 6667).


    K: restricciones de acceso a usuarios o redes completas:


     1. Nombre del host.

     2. Horario.

     3. Nombre de usuario.


    C y N: conexiones a otros servidores de IRC.

    R: establece restricciones a travs de un programa externo de
     validacin.

    D: otra forma de impedir conexiones a redes enteras, mostrando un
     comentario.

    E: excepciones a la lnea K.

    F: super-excepcin (similar a la anterior, pero se salta los
     lmites de clases de usuarios).


    Y: define una clase de usuario:


     1. Nmero de clase.

     2. Frecuencia de ping (segundos).

     3. Usuarios por IP.

     4. Nmero mximo de enlaces.

     5. Tamao de la cola de envo.


    I: permite el acceso a algunas mquinas:


     1. Dominio o direccin IP.

     2. Password del cliente.

     3. No documentado (generalmente '*').

     4. No documentado.

     5. Nmero de clase asociada.


    o: define operadores locales (recomendado):


     1. usuario@host.

     2. Clave encriptada.

     3. Nick del operador.

     4. No documentado (generalmente 0).

     5. No documentado (generalmente 0).


    O: define operadores globales.

    P: configura puertos adicionales.

  Tras las modificaciones oportunas, nuestro fichero ircd.conf es:



       M:maquina.euitio.uniovi.es:156.35.98.138:IRC EUITIO:6667
       A:Universidad de Oviedo EUITIO:Asturias:SysAdm <root@maquina.euitio.uniovi.es>
       Y:0:90:3:2:100000
       Y:1:90:3:20:100000
       I:*.euitio.uniovi.es::*::1
       I:156.35.53.*::*::1
       Y:3:90:1:100:100000
       I:NOMATCH::*@*PPP*::3
       I:NOMATCH::*@*slip*::3
       o:root@maquina.euitio.uniovi.es:mAJif8plpvVls:Operador:0:0
       # Fin del fichero
       # No especificamos nada en las lneas
       # - C, N, L y N: porque no nos conectamos a ningn otro servidor
       # - K, R, D, E y F: porque no establecemos restricciones tan fuertes
       # - P: porque no tenemos ms puertos

  Nota: para obtener el campo clave encriptada de la lnea o, hay que
  utilizar la herramienta mkpasswd, ubicada en el directorio tools, que
  toma una cadena de texto y la devuelve encriptada.

  Podemos verificar la correcta sintaxis del fichero de configuracin
  ircd.conf mediante la utilizacin de la herramienta tools/chkconf.

  Tambin podemos modificar el fichero ircd.motd para establecer el
  mensaje del da que aparecer a los usuarios que establezcan contacto
  con el servidor.


  3.7.  Ejecucin del demonio


  Por motivos de seguridad, no es posible lanzar el demonio como root,
  as que, o bien se lanza a mano como usuario irc, simplemente con:



       /usr/local/ircd/ircd




  o aadiendo la siguiente lnea en el fichero /etc/inetd.conf:



       ircd stream tcp wait irc /etc/ircd ircd -i




  para que arranque automticamente cada vez que se inicie el equipo
  servidor.  Sin embargo, este segundo mtodo no lo hemos podido
  confirmar porque, aparentemente, no ha funcionado.



  4.  El bot  de gestin del servidor



  4.1.  Funcin de un bot  de gestin del servidor


  La funcin de un bot o script de gestin del servidor es ampliar las
  posibilidades del IRC, y a la vez permitir un cierto control sobre los
  usuarios. El bot se introduce como un usuario ms, pero adquiere el
  poder del operador, lo que le permite administrar de manera eficiente
  los canales. Entre sus posibilidades estn:


    Envo de mensajes peridicos a ciertos canales.

    Impedir la entrada de usuarios no deseados.

    Reconocer a los administradores del servidor y cederles el poder.

    Aumentar la seguridad general del servidor.

    Impedir que los usuarios puedan expulsarse entre ellos.

  Existen multitud de bots disponibles. Entre los ms importantes,
  podemos destacar:
    Eggdrop: posiblemente el ms conocido, pero tambin el ms complejo
     de instalar y mantener. Requiere TCL.

    Uworld.

    Cservice.

    Argobot.


  4.2.  Argobot


  El Argobot es un bot relativamente sencillo escrito por el espaol
  Jess Cea Avin (http://www.argo.es/~jcea), aunque algunas grandes
  redes hispanas de IRC estn adoptndolo. Soporta todas las
  caractersticas antes enunciadas, pero sin profundizar en ellas, de
  forma que no resulta tan grande y complejo como Eggdrop. Como ventaja
  aadida, ocupa muy poca memoria y es muy eficiente. Es un bot
  multicanal capaz de:


    Proteger los modos de un canal.

    Dar y quitar los privilegios de operador de forma manual y
     automtica.

    Enviar mensajes (notices) a los usuarios recin llegados a un
     canal.

    Controlar el acceso y configuracin de modos y permisos
     independientemente para cada canal.

    Acceder a redes que exigen claves.

  Otras caractersticas del Argobot son:


    Se distribuye con el cdigo fuente completo (escrito en lenguaje
     C), y que adems puede compilarse bajo UNIX o en plataformas
     Windows.

    Utiliza un fichero de configuracin.

    Lleva registros (ficheros log) de toda la actividad que se produce
     en el servidor.

    Puede reconfigurarse sin necesidad de detener su actividad, es
     decir, puede modificarse su configuracin y cargar de nuevo el bot
     sin que los usuarios adviertan ningn cambio ni interrupcin del
     servicio.


  4.3.  Instalacin


  El Argobot se puede conseguir en la pgina web de su creador
  (http://www.argo.es/~jcea/irc/argobot.htm). Existen multitud de
  versiones, algunas desarrolladas especficamente para alguna gran red,
  y adems se pueden conseguir una veintena de parches que corrigen
  algunos defectos y aaden nuevas caractersticas.

  Si optamos por obtener el Argobot por Internet, descubriremos que
  apenas incluye unos pocos ficheros (cdigo fuente C), y como nica
  documentacin un fichero README muy breve. Para paliar esta
  deficiencia, su autor a puesto toda la documentacin disponible a
  travs de Internet, en forma de pginas web. Es necesario, por tanto,
  descargar estas pginas y leerlas detenidamente.

  El Argobot se suministra en forma de un fichero .tgz, que una vez
  descomprimido (en nuestro caso, en el directorio /usr/src/argobot/) da
  lugar a cuatro ficheros:


    argobot.c: fichero principal del cdigo fuente.

    argo_parser.c: cdigo fuente que interpreta el fichero de
     configuracin.

    argobot.conf: fichero de configuracin.

    argobot.log: mantiene un registro de los comandos enviados al bot.

  Es importante comprobar que este ltimo fichero se ha creado
  realmente.  Debido a algunas configuraciones de tar, es posible que no
  se genere este fichero (porque est vaco), lo que provocar errores
  al intentar ejecutar el Argobot. En este caso, es necesario crear el
  fichero manualmente (con la orden touch, por ejemplo), y darle los
  permisos apropiados.

  Nota: si queremos utilizar una de las caractersticas ms avanzadas
  del Argobot, como es la propagacin de lneas K (slo tiene sentido en
  redes de varios servidores), ser necesario seguir las instrucciones
  relativas a los permisos y el fichero ircd.conf.


  4.4.  Edicin del cdigo fuente


  Antes de compilar, es conveniente comprobar que el cdigo fuente esta
  bien adaptado a nuestro sistema. Las modificaciones que debemos hacer
  dependen de la forma en la que vamos a ejecutar el bot:


    Si vamos a ejecutar el bot como root (es el mtodo recomendado),
     nos aseguraremos de que est definido SEGURIDAD (con la sentencia
     #define SEGURIDAD), y que las macros UID y GID tienen valores
     apropiados. Si adems vamos a hacer un CHROOT (que es una medida
     adicional de seguridad), definiremos el directorio que debe tomar
     como raz con la sentencia #define CHROOT <directorio>.

    Si vamos a ejecutar el bot como un usuario distinto a root, debemos
     eliminar el smbolo SEGURIDAD (con la sentencia #undef SEGURIDAD).

  Adems de estas modificaciones, podemos definir el smbolo VERBOSE
  para que se impriman en la pantalla todos los mensajes que el servidor
  enva al Argobot. Otro smbolo interesante es CONTROL_FLOOD, que por
  defecto est activado, pero que deberemos eliminar si el nodo al que
  conectamos est preparado para controlar los ataques por flood.


  4.5.  Compilacin


  Como ya se ha indicado, el Argobot puede ser compilado bajo mltiples
  plataformas. En Linux, es suficiente con hacer:






  gcc -Wall -g argobot.c -o argobot
  chown root argobot
  chgrp root argobot




  La primera instruccin realiza la compilacin, generando el fichero
  argobot. Con las dos siguientes, establecemos los propietarios de este
  fichero.


  4.6.  Configuracin


  La tarea de configuracin se limita al fichero argobot.conf, aunque
  tambin es necesario crear una nueva cuenta de usuario para el
  operador del servidor IRC.

  El fichero argobot.conf es un fichero de texto que contiene lneas con
  comandos. Al hacer la instalacin, se genera un fichero de ejemplo,
  pero lo ms conveniente es modificarlo para adaptarlo a nuestras
  necesidades. Los comandos son:


    IRCnick <nick>: indica cul es el nick que debe emplear el bot para
     identificarse como operador ante el nodo IRC.

    IRCpasswd <password>: complementa al comando anterior, indicando la
     clave necesaria para adquirir los privilegios de operador.

    nick <nick>: especifica el nick bajo el que aparecer el bot a los
     usuarios.

    server <servidor>: sirve para indicar el servidor a que va a
     conectarse.

    port <puerto>: indica el puerto al que se va a conectar
     (generalmente, el 6667).

    passwd <password>: clave que ser enviada al servidor al principio
     de la conexin, con lo que se podr acceder a otras redes que
     necesiten claves.

    away <mensaje>: mensaje que se muestra a los usuarios al entrar.

    nick_collide <mensaje>: mensaje enviado a aquellos usuarios que
     estn utilizando el nick indicado en el comando nick.
     Inmediatamente despus, se les expulsar mediante un kick.

    umbral_kline <valor>: indica cuntos intentos de conexin se
     permitirn antes de poner una lnea k local. El valor ms corriente
     es cinco. Esto es una medida de proteccin contra los usuarios que
     tengan una actitud sospechosa.

    timeout_klines <valor>: indica cuntos segundos permanecer activa
     una lnea k local. El valor ms aconsejable es en torno a 900 (es
     decir, 15 minutos).

    timeout_whowas <valor>: indica cada cuntos segundos hay que
     comprobar la presencia de clones (usuarios que estn presentes bajo
     varios nicks, lo que suele ser sntoma de actividades peligrosas).
     Es conveniente un valor en torno a cinco.

    timer <offset> <periodo> <comando>: se utiliza para enviar comandos
     peridicos al servidor de IRC, que se repetirn cada cierto nmero
     de segundos. El offset indica el retraso del primer envo.

    set <alias> <mscara> [clave]: define un usuario. El nombre de
     referencia (interno al Argobot ser el alias, y se aplicar a aquel
     usuario que satisfaga las condiciones de la mscara, que tiene la
     forma nick!usuario@dominio (se admiten comodines).

    group <nombre_grupo> <alias> [<alias>...]: define un grupo de
     usuarios, cuyo nombre ser el indicado, y al que pertenecern los
     usuarios indicados a continuacin.

    join <canal> [clave]: indica al bot que debe gestionar el canal
     indicado, entrando con la clave proporcionada, que es opcional. Si
     utilizamos la clave GOD, se forzar la entrada del bot. NOTA: dado
     que el carcter '#' se emplea para indicar comentarios, no debe
     escribirse en el campo canal. Por tanto, si escribimos linux,
     estamos refirindonos al canal #linux.

  Puede haber tantos comandos join como sean necesarios. Para cada uno
  de ellos, se pueden indicar opciones especficas para el canal,
  mediante los siguientes comandos:


    autoop <grupo>: cualquier usuario del grupo indicado ser
     automticamente dotado de los privilegios de operador cuando entre
     en el canal.

    privil <grupo>: declara privilegiados a los miembros del grupo
     indicado, lo que les permitir enviar comandos al bot.

    mode_default <modos>: indica el modo por defecto del canal.

    mode_disallow <modos>: prohibe algunos modos en el canal.

    log <fichero>: almacena toda la actividad del canal en un fichero.
     Se incluyen marcas temporales cada diez minutos.

    notice <texto>: indica un mensaje que ser enviado a todos los
     usuarios que entren en el canal.

    allow_any_ban: permite a los operadores del canal hacer
     prcticamente todo, lo que no es muy aconsejable.

  Para nuestro sistema, el fichero argobot.conf es el siguiente:






















  #
  # Parmetros globales
  #

  # Nick utilizado a la hora de identificarse como IRCop, as como
  # para el WHOIS
  IRCnick ArgoBot

  # Password correspondiente al nick anterior
  IRCpasswd miclave
  # Nick bajo el cual debe aparecer el bot
  nick _ArgoBOT
  passwd miclave

  # Nombre del dominio al que se va a conectar el bot
  server maquina.euitio.uniovi.es
  port 6667

  # Mensaje que aparece en el away del bot
  away Bot de control de maquina.euitio.uniovi.es. No respondemos \
  de los fallos.

  # Mensaje enviado con el KILL a cualquier usuario que est utilizando el
  # nick definido en el comando NICK anterior
  nick_collide Escoge otro Nick, por favor

  # Las siguientes lneas configuran distintos aspectos de la seguridad
  umbral_kline 5  # Mximo nmero de intentos (desconectado)
  timeout_klines 15  # 15 minutos
  timeout_whowas 5 # Tiempo entre whowas

  #
  #
  # Grupos de usuarios
  #
  #

  # Define el grupo de usuarios al que pertenecen todos
  set todos *!*@*      # Comodines
  group todos todos

  # Define el grupo de IRCops
  set diego *!diego@maquina.euitio.uniovi.es
  set alfredo *!alfredo@maquina.euitio.uniovi.es
  group IRCops diego alfredo

  # Define el grupo de proveedores
  group proveedores diego alfredo

  # Canal ayuda-esnet
  group ayuda-esnet diego alfredo

  #
  #
  # Canales
  #
  #

  join linux GOD
  autoop IRCops
  mode_default ntm
  mode_disallow silpko
  notice Canal dedicado a los amantes del Linux. \
  Prohibido a Bill Gates.
  timer 60 60 privmsg #linux :Mensaje enviado al canal linux de forma \
  automtica
  timer 60 9999 topic #linux :Canal para los autenticos entendidos en \
  informtica y sistemas operativos.

  # Pone un modo para reducir el consumo de ancho de banda
  timer 60 600 mode _argobot :+d





  4.7.  Ejecucin


  Para ejecutar el bot, basta con escribir (preferiblemente como root):



       cd /usr/src/argobot
       ./argobot




  Si iniciamos Argobot de esta manera, imprimir por la pantalla toda la
  actividad que registre (como entradas y salidas de usuarios), lo que
  puede ser conveniente por motivos de depuracin, pero resulta
  innecesario durante una ejecucin normal. Por tanto, es muy frecuente
  ejecutar el Argobot en segundo plano y redireccionando la salida:



       nohup argobot &




  Esto nos evitar ver todos los mensajes por la pantalla, pero los
  enviar a un fichero llamado nohup.out situado en el directorio
  actual. El problema es que este fichero puede crecer muy rpidamente,
  de manera que en grandes redes se suele enlazar con el dispositivo
  nulo, para convertirlo en un agujero negro:



       ln -s /dev/null nohup.out




  Durante la ejecucin de una sesin de IRC, los usuarios autorizados
  pueden enviar mensajes al bot para cambiar su funcionamiento. Para
  realizar esta tarea, se emplea el comando MSG del IRC:



       /MSG _argobot <clave> <comando> <canal> [nick]




  Donde comando puede ser:


    op: da privilegios de operador al usuario indicado.


    deop: quita los privilegios de operador al usuario indicado.

    invite: invita a un usuario a un canal.


  5.  Cliente de IRC



  5.1.  Funcin de un cliente de IRC


  La funcin de un cliente de IRC es conectarse al servidor y filtrar la
  informacin disponible para cada usuario. Adems, debe encargarse de
  enviar los mensajes y comandos que escribe el usuario mediante el
  protocolo de IRC.

  El cliente habitualmente reside en la mquina del usuario y se conecta
  al servidor a travs de un puerto (generalmente el 6667). Existen
  clientes de IRC para todas las plataformas, dado que no es necesario
  que la plataforma cliente coincida con la del servidor. En los
  sistemas Windows, el cliente ms popular es el mIRC, que nosotros
  elegimos para hacer las primeras pruebas y asegurarnos de que el
  demonio estaba funcionando correctamente. Una vez confirmado el buen
  funcionamiento del servidor, instalamos un cliente para Linux. Para
  esta plataforma, la oferta es muy grande. Los ms conocidos son:


    Kirc (ftp://ftp.kde.org/): el ms antiguo cliente en el entorno
     KDE.  Tiene un entorno grfico muy cuidado, pero carece de algunas
     caractersticas bsicas.

    Ksirc (http://www.ksirc.org/): tambin para el KDE y resultado de
     la evolucin de un cliente en modo texto (el Sirc). Est todava en
     fase de desarrollo.

    Keric (http://www.indonesia-undernet.org/keirc): otro ms que
     funciona bajo KDE y es uno de los ms prometedores, aunque an est
     muy lejos de poder ofrecer una versin completamente estable.

    BitchX (http://www.bitchx.com/): el cliente en modo texto preferido
     por los usuarios de Linux.

    ScrollZ (http://www.scrollz.com/): tiene caractersticas similares
     al BitchX, y es el ms veterano de todos, lo que le permite
     alcanzar una buena velocidad y un gran nivel de optimizacin (menor
     consumo de recursos).

    YagIRC (http://www.sicom.fi/~ikioma/yagirc.html). Cliente para el
     entorno GNOME, bastante reciente y capaz de mostrar un interfaz en
     modo texto o en modo grfico.


  5.2.  Descripcin de BitchX


  Entre sus caractersticas estn:


    Varias conversaciones en el mismo canal.

    Mltiples servidores.

    Autocompletado de nicks.


    Soporte para scripts.

    Cliente de FTP incorporado.

    Nuevas caractersticas exclusivas, como son: cliente de correo
     integrado y un reproductor de CDs musicales.


  5.3.  Obtencin e instalacin


  El BitchX puede conseguirse en http://www.bitchx.com/, desde donde se
  pueden conseguir varios ficheros: uno de ellos contiene el paquete
  bsico y los dems son accesorios opcionales.

  Tras descomprimir y desempaquetar el fichero con la orden tar en el
  directorio /usr/local/BitchX/, obtendremos directamente los
  ejecutables, puesto que se distribuye con los fuentes ya compilados.


  5.4.  Configuracin


  No contiene ningn fichero de configuracin, sino que las opciones se
  establecen mediante variables de entorno. Las principales son:


    IRCNICK: establece el nick por defecto.

    IRCUSER: establece el nombre de usuario por defecto.

    IRCNAME: permite escribir el nombre real del usuario.

    IRCSERVER: nombre del servidor a utilizar.

    IRCPORT: puerto a utilizar.

  Es conveniente dar valor a estas variables en los scripts de arranque
  o bien en el fichero ~/.profile de cada usuario del sistema.


  5.5.  Ejecucin


  El ejecutable se llama BitchX-tcl, pero resulta conveniente crear un
  enlace simblico llamado irc situado en un directorio que forme parte
  del path para simplificar el trabajo de los usuarios.


  6.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En ella encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.


















































  RAID-Software CMO
  Jakob stergaard, jakob@ostenfeld.dk
  piernas@ditec.um.es
  v. 0.90.3 - Alpha, 22 mayo 1999

  Este CMO describe cmo usar un RAID software bajo Linux. Debera usar
  los parches RAID disponibles en ftp://ftp.fi.kernel.org/pub/linux/dae
  mons/raid/alpha. El CMO original en ingls se puede encontrar en
  http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/.
  ______________________________________________________________________

  ndice general






















































  1. Introduccin

     1.1 Renuncia de responsabilidad
     1.2 Requisitos

  2. Por qu RAID?

     2.1 Detalles tcnicos
     2.2 Trminos
     2.3 Niveles RAID
        2.3.1 Discos de reserva
     2.4 Espacio de intercambio (

  3. Asuntos hardware

     3.1 Configuracin IDE
     3.2 Cambio de discos en caliente (
        3.2.1 Intercambio en caliente de dispositivos IDE
        3.2.2 Intercambio en caliente (
        3.2.3 Intercambio en caliente con SCA

  4. Configuracin de RAID

     4.1 Configuracin general
     4.2 Modo lineal
     4.3 RAID-0
     4.4 RAID-1
     4.5 RAID-4
     4.6 RAID-5
     4.7 El superbloque persistente
     4.8 Tamaos de segmento unitario
        4.8.1 RAID-0
        4.8.2 RAID-1
        4.8.3 RAID-4
        4.8.4 RAID-5
     4.9 Opciones de
     4.10 Autodeteccin
     4.11 Arrancar desde RAID
        4.11.1 Mtodo 1
        4.11.2 Mtodo 2
     4.12 Dificultades

  5. Comprobacin

     5.1 Simulacin de un fallo de disco
     5.2 Simulacin de corrupcin de datos

  6. Rendimiento

     6.1 RAID-0
     6.2 RAID-0 con TCQ
     6.3 RAID-5
     6.4 RAID-10

  7. Agradecimientos

  8. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Introduccin



  Este CMO ha sido escrito por Jakob stergaard basndose en un gran
  nmero de mensajes de correo entre el autor, Ingo Molnar
  (mingo@chiara.csoma.elte.hu) -- uno de los desarrolladores de RAID --,
  la lista de correo linux-raid (linux-raid@vger.rutgers.edu) y diversas
  personas.

  La razn por la que se ha escrito este CMO, a pesar de existir ya un
  RAID-Software CMO es que el anterior describe el estilo antiguo de
  RAID por software, presente en los ncleos existentes. Este CMO
  describe el uso del nuevo estilo de RAID que se ha desarrollado ms
  recientemente.  ste nuevo estilo de RAID tiene muchas caractersticas
  no presentes en el anterior.

  Parte de la informacin de este CMO le puede parecer trivial si es un
  entendido en RAID. Sltese esas partes.


  1.1.  Renuncia de responsabilidad


  La declinacin obligatoria de responsabilidades:

  Aunque el cdigo RAID tratado aqu me ha parecido ser estable, y para
  muchas otras personas, puede no funcionar para Usted. Si pierde todos
  sus datos, su trabajo, es golpeado por un camin o cualquier otra
  cosa, no ser culpa ma ni de los desarrolladores. Concincese de que
  usa el software RAID y esta informacin por su cuenta y riesgo!. No
  hay ningn tipo de garanta de que ningn software ni esta informacin
  sean correctos en modo alguno, ni adecuados para cualquier tipo de uso
  en particular.  Haga copia de seguridad de sus datos antes de
  experimentar con esto. Ms vale prevenir que lamentarse.


  1.2.  Requisitos


  Este CMO asume que est usando alguna de las ltimas versiones 2.2.x
  o 2.0.x del ncleo con un parche raid0145 acorde y la versin 0.90 del
  paquete raidtools. Ambos se pueden encontrar en
  ftp://ftp.fi.kernel.org/pub/linux/daemons/raid/alpha. El parche RAID,
  el paquete raidtools y el ncleo deben concordar tanto como sea
  posible. En ocasiones puede ser necesario usar un ncleo antiguo si no
  hay parches raid disponibles para el ltimo.


  2.  Por qu RAID?


  Puede haber muchas buenas razones para usar RAID. Unas pocas son: la
  posibilidad de combinar varios discos fsicos en un nico dispositivo
  virtual ms grande, o mejoras en el rendimiento y redundancia.


  2.1.  Detalles tcnicos


  El RAID de Linux puede funcionar sobre la mayora de los dispositivos
  de bloque. No importa si usa dispositivos IDE, SCSI o una mezcla de
  ambos.  Incluso algunas personas han usado dispositivo de bloque en
  red (Network Block Device, NBD) con diferentes grados de xito.

  Asegrese de que el bus (o buses) de los discos son lo suficientemente
  rpidos. No debera tener 14 discos UW-SCSI en un nico bus UW, si
  cada disco puede dar 10MB/s y el bus slo puede sostener 40MB/s.
  Adems, slo debera tener un dispositivo por bus IDE. El uso de
  discos como maestro/esclavo es funesto para el rendimiento. IDE es
  realmente ineficiente accediendo a ms de un disco por bus.
  Naturalmente, todas las placas madre modernas tienen dos buses IDE,
  por lo que puede configurar dos discos en RAID sin comprar ms
  tarjetas controladoras.

  La capa RAID no tiene absolutamente nada que ver con la capa del
  sistema de ficheros. Puede poner cualquier sistema de ficheros sobre
  un dispositivo RAID, tal y como hara con cualquier otro dispositivo
  de bloques.



  2.2.  Trminos


  La palabra RAID se refiere a RAID por software de Linux.  Este CMO no
  trata ningn aspecto de RAID por hardware.

  Cuando se describen configuraciones, es til referirse al nmero de
  discos y sus tamaos. En todos los casos se usa la letra N para
  denotar el nmero de discos activos en el array (sin contar los discos
  de reserva). La letra S es el tamao del disco ms pequeo en el
  array, a menos que se diga otra cosa. La letra P representa el
  rendimiento de un disco en el array, en MB/s. Cuando se use,
  supondremos que los discos son igual de rpidos, lo cual no siempre
  puede ser cierto.

  Note que se asume que las palabras dispositivo y disco significan lo
  mismo. Normalmente, los dispositivos usados para construir un
  dispositivo RAID son particiones de discos, no necesariamente discos
  enteros. Pero, normalmente, combinar varias particiones de un mismo
  disco no tiene sentido, por lo que las palabras dispositivo y disco
  simplemente significan particiones de discos diferentes.


  2.3.  Niveles RAID


  Lo siguiente es una breve descripcin de lo que soportan los parches
  RAID de Linux. Parte de esta informacin es informacin RAID
  absolutamente bsica, aunque he aadido unas pocas reseas de lo que
  hay de especial en la implementacin de Linux de los niveles.
  Simplemente, sltese esta seccin si conoce RAID. Regrese despus
  cuando tenga problemas :)

  Los actuales parches RAID para Linux soportan los siguientes niveles:


    Modo Lineal (Linear mode)

    Dos o ms discos se combinan en un nico dispositivo fsico. Los
     discos se adjuntan unos a otros de tal manera que las escrituras
     en el dispositivo RAID primero llenarn el disco 0, a continuacin
     el disco 1 y as sucesivamente. Los discos no tienen porqu ser del
     mismo tamao. De hecho, los tamaos no importan para nada aqu :)

    No existe redundancia en este nivel. Si un disco falla perder toda
     su informacin con toda probabilidad. Sin embargo, puede tener
     suerte y recuperar algunos datos, ya que el sistema de ficheros
     simplemente habr perdido un gran puado de datos consecutivos.

    El rendimiento de las lecturas y las escrituras no se incrementar
     para lecturas/escrituras individuales. Pero si varios usuarios usan
     el dispositivo, puede tener la suerte de que un usuario use
     efectivamente el primer disco y el otro usuario acceda a ficheros
     que por casualidad residan en el segundo disco. Si esto ocurre,
     ver un aumento en el rendimiento.


    RAID-0

    Tambin llamado modo striping o de distribucin por bandas.  Como
     el modo lineal salvo que las lecturas y escrituras se realizan en
     paralelo en los dispositivos. stos deben tener aproximadamente el
     mismo tamao.  Puesto que todos los accesos se realizan en
     paralelo, los discos se llenan por igual. Si un dispositivo es
     mucho mayor que los otros dems, el espacio extra se utilizar en
     el dispositivo RAID durante las escrituras en el extremo superior,
     aunque slo se acceder a este disco ms grande. Naturalmente, esto
     perjudica el rendimiento.

    Como en el modo lineal, tampoco hay redundancia en este nivel.  A
     diferencia del modo lineal, no ser capaz de recuperar ningn dato
     si un disco falla. Si elimina un disco de un grupo RAID-0, el
     dispositivo RAID no perder simplemente un bloque consecutivo de
     datos, sino que se llenar con pequeos agujeros por todo el
     dispositivo. Probablemente, e2fsck no sea capaz de recuperar gran
     cosa.

    El rendimiento de las lecturas y las escrituras se incrementar, ya
     que las lecturas y las escrituras se realizan en paralelo sobre los
     dispositivos. Normalmente, sta es la razn principal para usar
     RAID-0. Si los buses a los discos son suficientemente rpidos,
     puede obtener casi N*P MB/seg.


    RAID-1

    Este es el primer modo que realmente tiene redundancia. RAID-1 se
     puede usar en dos o ms discos con cero o ms discos de reserva.
     Este modo mantiene en un disco un duplicado exacto de la
     informacin del otro(s) disco(s). Por supuesto, los discos deben
     ser del mismo tamao. Si un disco es mayor que otro, su dispositivo
     RAID ser del tamao del disco ms pequeo.

    Si se eliminan (o fallan) hasta N-1 discos, los datos permanecern
     intactos. Si existen discos de reserva disponibles y el sistema (es
     decir, las controladoras SCSI o los chipsets IDE, etc.) sobreviven
     al desastre, comenzar inmediatamente la reconstruccin de un
     duplicado en uno de los discos de reserva, despus de la deteccin
     del fallo del disco.

    Normalmente, el rendimiento de las lecturas aumenta hasta casi N*P,
     mientras que el rendimiento de las escrituras es el mismo que el de
     un nico dispositivo o, tal vez, incluso menos. Las lecturas se
     pueden hacer en paralelo pero, cuando se escribe, la CPU debe
     transferir N veces la cantidad de datos que normalmente
     transferira (recuerde, se deben enviar N copias idnticas de todos
     los datos a los discos).


    RAID-4

    Este nivel de RAID no se usa con mucha frecuencia. Se puede usar
     sobre 3 o ms discos. En lugar de duplicar completamente la
     informacin, guarda informacin de paridad en un nico disco y
     escribe datos a los otros discos de forma parecida a un RAID-0. Ya
     que uno de los discos se reserva para informacin de paridad, el
     tamao del array ser (N-1)*S, donde S es el tamao del disco ms
     pequeo del array.  Como en un RAID-1, los discos deben ser del
     mismo tamao, o de lo contrario tendr que aceptar que el valor de
     S en la frmula (N-1)*S anterior ser el tamao del disco ms
     pequeo del array.

    Si un disco falla, y no es el de paridad, se puede usar la
     informacin de paridad para reconstruir todos los datos. Si dos
     discos fallan, se perder toda la informacin.  .

    La razn por la que este nivel no se usa con mucha frecuencia es
     que la informacin de paridad se guarda en un nico disco. Esta
     informacin se debe actualizar cada vez que se escribe en uno de
     los otros discos. Por eso, el disco de paridad se convertir en un
     cuello de botella si no es mucho ms rpido que los otros discos.
     Sin embargo, si por pura casualidad tuviera muchos discos lentos y
     un disco muy rpido, este nivel de RAID podra resultarle muy til.


    RAID-5

    Este es quizs el modo RAID ms til cuando uno desea combinar un
     mayor nmero de discos fsicos y todava conservar alguna
     redundancia.  RAID-5 se puede usar sobre 3 o ms discos, con cero o
     ms discos de reserva.  El tamao del dispositivo RAID-5 resultante
     ser (N-1)*S, tal y como sucede con RAID-4. La gran diferencia
     entre RAID-5 y RAID-4 es que la informacin de paridad se
     distribuye uniformemente entre los discos participantes, evitando
     el problema del cuello de botella del RAID-4.

    Si uno de los discos falla, todos los datos permanecern intactos,
     gracias a la informacin de paridad. Si existen discos de reserva
     disponibles, la reconstruccin comenzar inmediatamente despus del
     fallo del dispositivo. Si dos discos fallan simultneamente, todos
     los datos se perdern. RAID-5 puede sobrevivir a un fallo de disco,
     pero no a dos o ms.

    Normalmente, el rendimiento de las lecturas y las escrituras se
     incrementar, pero es difcil predecir en qu medida.


  2.3.1.  Discos de reserva


  Los discos de reserva son discos que no forman parte del grupo RAID
  hasta que uno de los discos activos falla. Cuando se detecta un fallo
  de disco, el dispositivo se marca como defectuoso y la reconstruccin
  se inicia inmediatamente sobre el primer disco de reserva disponible.

  De esta manera, los discos de reserva proporcionan una buena seguridad
  extra, especialmente a sistemas RAID-5 que tal vez, sean difciles de
  lograr (fsicamente). Se puede permitir que el sistema funcione
  durante algn tiempo con un dispositivo defectuoso, ya que se conserva
  toda la redundancia mediante los discos de reserva.

  No puede estar seguro de que su sistema sobrevivir a una cada de
  disco.  La capa RAID puede que maneje los fallos de dispositivos
  verdaderamente bien, pero las controladoras SCSI podran fallar
  durante el manejo del error o el chipset IDE podra bloquearse, o
  muchas otras cosas.



  2.4.  Espacio de intercambio ( swap ) sobre RAID


  No hay ninguna razn para usar RAID a fin de aumentar el rendimiento
  del sistema de paginacin de memoria (swap). El propio ncleo puede
  balancear el intercambio entre varios dispositivos si simplemente les
  da la misma prioridad en el fichero /etc/fstab.
  Un buen fstab se parece a ste:



       /dev/sda2       swap           swap    defaults,pri=1   0 0
       /dev/sdb2       swap           swap    defaults,pri=1   0 0
       /dev/sdc2       swap           swap    defaults,pri=1   0 0
       /dev/sdd2       swap           swap    defaults,pri=1   0 0
       /dev/sde2       swap           swap    defaults,pri=1   0 0
       /dev/sdf2       swap           swap    defaults,pri=1   0 0
       /dev/sdg2       swap           swap    defaults,pri=1   0 0




  Esta configuracin permite a la mquina paginar en paralelo sobre
  siete dispositivos SCSI. No necesita RAID, ya que esa ha sido una
  caracterstica del ncleo desde hace mucho tiempo.

  Otra razn por la que podra interesar usar RAID para swap es la alta
  disponibilidad. Si configura un sistema para arrancar desde, por
  ejemplo, un dispositivo RAID-1, el sistema podra ser capaz de
  sobrevivir a un fallo de disco. Pero si el sistema ha estado paginando
  sobre el ahora dispositivo defectuoso, puede estar seguro de que se
  vendr abajo. El intercambio sobre un dispositivo RAID-1 solucionara
  este problema.

  Sin embargo, el intercambio sobre RAID-{1,4,5} NO est soportado.
  Puede configurarlo, pero fracasar. La razn es que la capa RAID
  algunas veces reserva memoria antes de realizar una escritura. Esto
  produce un bloqueo, quedando en un punto muerto, ya que el ncleo
  tendr que reservar memoria antes de que pueda intercambiar, e
  intercambiar antes de que pueda reservar memoria.

  Es triste pero cierto, al menos por ahora.


  3.  Asuntos hardware


  Esta seccin mencionar algunos de los asuntos hardware involucrados
  en el funcionamiento de un RAID software.


  3.1.  Configuracin IDE


  En efecto, es posible hacer funcionar un RAID sobre discos IDE.
  Tambin se puede obtener un rendimiento excelente. De hecho, el precio
  actual de los discos y las controladoras IDE hacen de IDE algo a tener
  en cuenta cuando se montan nuevos sistemas RAID.


    Estabilidad fsica: tradicionalmente, los discos IDE han sido de
     peor calidad mecnica que los discos SCSI. Incluso hoy en da, la
     garanta de los discos IDE es tpicamente de un ao, mientras que,
     a menudo, es de 3 a 5 aos en los discos SCSI. Aunque no es justo
     decir que los discos IDE son por definicin de menor calidad, uno
     debera ser consciente de que los discos IDE de algunas marcas
     pueden fallar con ms frecuencia que los discos SCSI similares.
     Sin embargo, otras marcas usan exactamente la misma estructura
     mecnica tanto para los discos SCSI como para los discos IDE. Todo
     se reduce a: todos los discos fallan, tarde o temprano, y uno
     debera estar preparado para ello.


    Integridad de los datos: al principio, IDE no tena forma de
     asegurar que los datos enviados a travs del bus IDE eran los
     mismos que los datos escritos realmente en el disco. Esto se debi
     a la falta total de paridad, sumas de verificacin (checksums),
     etc. Ahora, con el estndar UltraDMA, los dispositivos IDE realizan
     una suma de verificacin sobre los datos que reciben y por eso es
     altamente improbable que los datos se corrompan.

    Rendimiento: no voy a escribir aqu sobre el rendimiento de IDE de
     forma detallada. Una historia realmente breve sera:


    Los dispositivos IDE son rpidos (12 MB/s y ms)

    IDE tiene una mayor sobrecarga de CPU que SCSI (pero, a quin le
     preocupa?)

    Slo usa un disco IDE por bus, los discos esclavos deterioran el
     rendimiento.

    Resistencia a los fallos: la controladora IDE normalmente sobrevive
     a un dispositivo IDE que ha fallado. La capa RAID marcar el disco
     como defectuoso y, si est trabajando con un RAID de nivel 1 o
     superior, la mquina debera trabajar igual de bien hasta que la
     desconecte para su mantenimiento.

  Es muy importante que slo use un disco IDE por bus IDE.  Dos discos
  no slo arruinaran el rendimiento sino que, tambin, el fallo de un
  disco a menudo garantiza el fallo del bus y, por tanto, el fallo de
  todos los discos de ese bus. En una configuracin RAID tolerante a
  fallos (RAID de niveles 1, 4, 5) el fallo de un disco se puede
  manejar, pero el fallo de dos discos (los dos discos del bus que ha
  fallado debido a uno de ellos) dejar el array inutilizable. Tambin,
  el dispositivo esclavo o la controladora IDE de un bus pueden
  confundirse de manera horrible cuando el dispositivo maestro del bus
  falla. Un bus, un disco, esa es la regla.

  Existen controladoras IDE PCI baratas. A menudo puede obtener 2 o 4
  buses por unos 80 dlares. Considerando el precio mucho ms bajo de
  los discos IDE respecto a los discos SCSI, dira que un array de
  discos IDE podra ser una solucin realmente buena si uno puede vivir
  con los relativamente pocos discos (unos 8 probablemente) que se
  pueden conectar a un sistema tpico (a menos que, naturalmente, tenga
  muchas ranuras PCI para dichas controladoras IDE).


  3.2.  Cambio de discos en caliente ( Hot-Swap )


  ste ha sido un tema de actualidad en la lista linux-kernel durante
  algn tiempo. Aunque el intercambio en caliente de los dispositivos
  est soportado hasta cierto punto, todava no es algo que se pueda
  hacer fcilmente.


  3.2.1.  Intercambio en caliente de dispositivos IDE


  No lo haga! IDE no soporta en modo alguno el intercambio en caliente.
  Seguro, puede funcionar para usted si compila el soporte IDE como
  mdulo (slo posible en la serie 2.2.x del ncleo) y lo vuelve a
  cargar despus de que haya reemplazado el dispositivo. Pero tambin
  puede terminar perfectamente con una controladora IDE frita y
  observar que el perodo de dicho sistema fuera de servicio ser mucho
  mayor que habiendo reemplazado el dispositivo con el sistema apagado.

  El principal problema, aparte de los aspectos elctricos que pueden
  destruir su hardware, es que se debe reexplorar el bus IDE despus de
  que se hayan intercambiado los discos. El manejador IDE actual no
  puede hacer eso. Si el nuevo disco es 100% idntico al antiguo
  (geometra, etc.)  puede que funcione incluso sin volver a explorar el
  bus pero, crame, aqu est caminando por el filo de la navaja.


  3.2.2.  Intercambio en caliente ( Hot-Swap ) de dispositivos SCSI


  El hardware SCSI normal tampoco es capaz de soportar intercambios en
  caliente. Sin embargo, puede que funcione. Si su manejador SCSI
  soporta la reexploracin del bus y la conexin y desconexin de
  dispositivos, puede ser capaz de intercambiar dispositivos en
  caliente.  Sin embargo, en un bus SCSI normal probablemente no debera
  desenchufar dispositivos mientras su sistema est todava encendido.
  Pero, le repito, puede que funcione simplemente (y tambin puede
  terminar con su hardware frito).

  La capa SCSI debera sobrevivir si un disco muere, pero no todos los
  manejadores SCSI soportan esto todava. Si su manejador SCSI muere
  cuando un disco cae, su sistema caer con l y la conexin en caliente
  no ser verdaderamente interesante entonces.


  3.2.3.  Intercambio en caliente con SCA


  Con SCA debera ser posible conectar dispositivos en caliente. Sin
  embargo, no poseo el hardware para probar esto y no he odo de nadie
  que lo haya probado, por lo que verdaderamente no puedo dar ninguna
  receta de cmo hacer esto.

  De todos modos, si quiere jugar con esto, debera conocer los aspectos
  internos de SCSI y de RAID. Por tanto, no voy a escribir aqu nada que
  no pueda comprobar que funciona. En cambio, s puedo proporcionarle
  algunas pistas:


    Busque la cadena remove-single-device en linux/drivers/scsi/scsi.c

    Eche un vistazo a raidhotremove y raidhotadd

  No todos los manejadores SCSI soportan la conexin y desconexin de
  dispositivos. En la serie 2.2 del ncleo, al menos los manejadores de
  la controladoras Adaptec 2940 y Symbios NCR53c8xx parecen soportarlo,
  mientras que otras puede que s o puede que no. Agradecera que
  alguien me pasara ms informacin sobre esto...


  4.  Configuracin de RAID



  4.1.  Configuracin general


  Esto es lo que necesita para cualquiera de los niveles RAID:


    Un ncleo.  Obtenga la versin 2.0.36 o un ncleo 2.2.x reciente.

    Los parches RAID.  Normalmente existe un parche disponible para los
     ncleos recientes.

    El paquete de herramientas RAID (raidtools).

    Paciencia, una pizza y su bebida con cafena favorita.

  Todo este software se puede encontrar en
  ftp://ftp.fi.kernel.org/pub/linux;.  Las herramientas RAID y los
  parches estn en el subdirectorio daemons/raid/alpha. Los ncleos se
  encuentran en el subdirectorio kernel.

  Parchee el ncleo, configrelo para incluir el soporte del nivel RAID
  que quiera usar. Complelo e instlelo.

  A continuacin desempaquete, configure, compile e instale las
  herramientas RAID.

  Hasta ahora todo va bien. Si rearranca ahora, debera tener el fichero
  /proc/mdstat. Recurdelo, ese fichero es su amigo. Vea lo que contiene
  haciendo cat /proc/mdstat. Le debe decir que tiene registrada la
  personalidad RAID (es decir, el modo RAID) correcta y que actualmente
  no hay dispositivos RAID activos.

  Cree las particiones que quiere incluir en su grupo RAID.

  Ahora, vayamos a un modo especfico.


  4.2.  Modo lineal


  De acuerdo, as que tiene dos o ms particiones que no son
  necesariamente del mismo tamao (pero que, naturalmente, pueden serlo)
  que quiere adjuntar unas con otras.

  Prepare el fichero /etc/raidtab para describir su configuracin. He
  preparado un /etc/raidtab para dos discos en modo lineal y el fichero
  se parece a esto:



       raiddev /dev/md0
               raid-level      linear
               nr-raid-disks   2
               persistent-superblock 1
               device          /dev/sdb6
               raid-disk       0
               device          /dev/sdc5
               raid-disk       1




  Aqu no se soportan discos de reserva. Si un disco muere, el array
  muere con l. No hay informacin que poner en un disco de reserva.

  Creemos el array. Ejecute la orden:



         mkraid /dev/md0




  Esto inicializar su array, escribir superbloques persistentes y
  arrancar el array.

  chele un vistazo a /proc/mdstat. Debe ver que el array est
  funcionando.

  Ahora, puede crear un sistema de ficheros, justo como hara con
  cualquier otro dispositivo, montarlo, incluirlo en su /etc/fstab, etc.


  4.3.  RAID-0


  Tiene dos o ms dispositivos, de aproximadamente el mismo tamao, y
  quiere combinar sus capacidades de almacenamiento y rendimiento
  accedindolos en paralelo.

  Prepare el fichero /etc/raidtab para describir su configuracin. Un
  raidtab de ejemplo se parece a esto:



       raiddev /dev/md0
               raid-level      0
               nr-raid-disks   2
               persistent-superblock 1
               chunk-size     4
               device          /dev/sdb6
               raid-disk       0
               device          /dev/sdc5
               raid-disk       1




  Como en el modo lineal, los discos de reserva tampoco se soportan
  aqu.  Un RAID-0 no tiene redundancia, por lo que cuando un disco
  muere, el array le acompaa.

  Una vez ms, ejecute simplemente



         mkraid /dev/md0




  para inicializar el array. Esto debe inicializar los superbloques y
  poner en funcionamiento el dispositivo RAID. che un vistazo a
  /proc/mdstat para ver qu sucede. Debera ver que su dispositivo ahora
  est en funcionamiento.

  /dev/md0 est listo para ser formateado, montado, usado y maltratado.


  4.4.  RAID-1


  Tiene dos dispositivos de aproximadamente el mismo tamao y quiere que
  cada uno de los dos sea un duplicado del otro. Finalmente, tiene ms
  dispositivos que quiere guardar como discos de reserva preparados, que
  automticamente formarn parte del duplicado si uno de los
  dispositivos activos se rompe.

  Configure as el fichero /etc/raidtab:



  raiddev /dev/md0
          raid-level      1
          nr-raid-disks   2
          nr-spare-disks  0
          chunk-size      4
          persistent-superblock 1
          device          /dev/sdb6
          raid-disk       0
          device          /dev/sdc5
          raid-disk       1




  Si tiene discos de reserva, puede aadirlos al final de la
  especificacin de dispositivos como



               device          /dev/sdd5
               spare-disk      0




  Recuerde configurar la entrada nr-spare-disks adecuadamente.

  De acuerdo, ahora estamos listos para comenzar la inicializacin del
  RAID.  Se debe construir el duplicado, es decir, los contenidos (de
  todos modos, sin importancia ahora, ya que el dispositivo todava est
  sin formatear) de los dos dispositivos se deben sincronizar.

  D la orden


         mkraid /dev/md0




  para comenzar la inicializacin del duplicado.

  Compruebe el fichero /proc/mdstat. Debe decirle que se ha puesto en
  funcionamiento el dispositivo /dev/md0, que est siendo reconstruido
  el duplicado y una cuenta del tiempo estimado para la terminacin de
  la reconstruccin.

  La reconstruccin se realiza usando el ancho de banda libre de E/S. De
  esta manera, su sistema debe ser capaz todava de responder en gran
  medida, aunque los LEDs de sus discos deben parpadear lozanamente.

  El proceso de reconstruccin es transparente, por lo que realmente
  puede usar el dispositivo aunque la duplicacin est actualmente en
  curso.

  Intente formatear el dispositivo mientras la reconstruccin se est
  realizando. Funcionar. Tambin puede montarlo y usarlo mientras la
  reconstruccin se est realizando. Naturalmente, si el disco
  equivocado se rompe mientras se est realizando la reconstruccin, no
  hay solucin.


  4.5.  RAID-4



  Nota! No he comprobado esta configuracin por m mismo. La
  configuracin de ms abajo es mi mejor suposicin, no algo que
  realmente haya tenido funcionando.

  Tiene tres o ms dispositivos de aproximadamente el mismo tamao, un
  dispositivo es significativamente ms rpido que los otros
  dispositivos y quiere combinarlos todos en un nico dispositivo ms
  grande, conservando todava alguna informacin de redundancia.
  Finalmente, tiene varios dispositivos que desea usar como discos de
  reserva.

  Configure el fichero /etc/raidtab as:


       raiddev /dev/md0
               raid-level      4
               nr-raid-disks   4
               nr-spare-disks  0
               persistent-superblock 1
               chunk-size      32
               device          /dev/sdb1
               raid-disk       0
               device          /dev/sdc1
               raid-disk       1
               device          /dev/sdd1
               raid-disk       2
               device          /dev/sde1
               raid-disk       3




  Si tuviramos discos de reserva, se insertaran de forma parecida,
  siguiendo las especificaciones de discos RAID;



               device         /dev/sdf1
               spare-disk     0




  como de costumbre.

  Su array se puede inicializar con la orden



          mkraid /dev/md0




  como es habitual.

  Debera ver la seccin ``'' de opciones especiales de mke2fs antes de
  formatear el dispositivo.


  4.6.  RAID-5


  Tiene tres o ms dispositivos de aproximadamente el mismo tamao,
  quiere combinarlos en un dispositivo mayor, pero conservando todava
  cierto grado de redundancia para la seguridad de datos. Finalmente,
  tiene varios dispositivos para usar como discos de reserva, que no
  tomarn parte en el array antes de que otro dispositivo falle.

  Si usa N dispositivos donde el tamao del ms pequeo es S, el tamao
  de todo el array ser (N-1)*S. El espacio que falta se usa para
  informacin de paridad (redundancia). De esta manera, si cualquier
  disco falla, todos los datos permanecern intactos. Pero si dos discos
  fallan, todos los datos se perdern.

  Configure el fichero /etc/raidtab as:



       raiddev /dev/md0
               raid-level      5
               nr-raid-disks   7
               nr-spare-disks  0
               persistent-superblock 1
               parity-algorithm        left-symmetric
               chunk-size      32
               device          /dev/sda3
               raid-disk       0
               device          /dev/sdb1
               raid-disk       1
               device          /dev/sdc1
               raid-disk       2
               device          /dev/sdd1
               raid-disk       3
               device          /dev/sde1
               raid-disk       4
               device          /dev/sdf1
               raid-disk       5
               device          /dev/sdg1
               raid-disk       6




  Si tuviramos discos de reserva, se insertaran de forma parecida,
  siguiendo las especificaciones de discos RAID;



               device         /dev/sdh1
               spare-disk     0




  Y as sucesivamente.

  Un tamao de segmento de 32KB es un buen valor por defecto para muchos
  sistemas de ficheros de propsito general de estas proporciones. El
  array sobre el que se utiliza el raidtab anterior es un dispositivo de
  7 por 6 GB = 36 GB (recuerde que (N-1)*S = (7-1)*6 = 36). Contiene un
  sistema de ficheros ext2 con un tamao de bloque de 4KB. Podra
  incrementar tanto el tamao del segmento unitario del array como el
  tamao de bloque del sistema de ficheros si su sistema de ficheros
  fuera o bien mucho mayor o bien si simplemente contuviera ficheros muy
  grandes.

  Vale, ya hemos hablado bastante. Configure el fichero /etc/raidtab y
  veamos si funciona. Ejecute la orden



    mkraid /dev/md0




  y observe qu ocurre. Es de esperar que sus discos comiencen a
  trabajar como locos debido a que empiezan la reconstruccin de su
  array. chele un vistazo a /proc/mdstat para ver qu est sucediendo.

  Si el dispositivo se ha creado correctamente, el proceso de
  reconstruccin comenzar ahora. Su array no ser consistente hasta que
  esta fase de reconstruccin haya terminado. No obstante, el array es
  totalmente funcional (excepto, por supuesto, para el manejo de fallos
  de dispositivos) y puede formatearlo y usarlo incluso mientras se est
  reconstruyendo.

  Consulte la seccin ``'' de opciones especiales de mke2fs antes de
  formatear el array.

  Bueno, ahora que ya tiene su dispositivo RAID funcionando, siempre
  puede pararlo o rearrancarlo usando las rdenes



         raidstop /dev/md0




  y



         raidstart /dev/md0,




  respectivamente.

  En lugar de colocar stos en ficheros de inicio y rearrancar un nmero
  astronmico de veces hasta hacer que funcione, siga leyendo y haga
  funcionar la autodeteccin.


  4.7.  El superbloque persistente


  Si volviramos a aquellos maravillosos das (The Good Old Days (TM)),
  las herramientas RAID (raidtools) leeran su fichero /etc/raidtab y a
  continuacin inicializaran el array. Sin embargo, esto requerira que
  el sistema de ficheros sobre el que reside /etc/raidtab estuviera
  montado. Esto es imposible si quiere arrancar a partir de un RAID.

  Tambin, la anterior aproximacin produca complicaciones al montar
  sistemas de ficheros sobre dispositivos RAID. stos no se podan
  colocar en el fichero /etc/fstab como era usual, sino que tenan que
  ser montados en los guiones (scripts) de inicio.

  Los superbloques persistentes solucionan estos problemas. Cuando un
  array se inicializa con la opcin persistent-superblock en el fichero
  /etc/raidtab, se escribe un superbloque especial al principio de todos
  los discos participantes en el array. Esto permite al ncleo leer la
  configuracin de los dispositivos RAID directamente de los discos
  involucrados, en lugar de leerla de algn fichero de configuracin que
  puede no estar disponible en todo momento.
  Sin embargo, todava debera mantener un fichero /etc/raidtab
  consistente, ya que puede necesitar este fichero para una
  reconstruccin posterior del array.

  Los superbloques persistentes son obligatorios si desea la
  autodeteccin de sus dispositivos RAID durante el arranque del
  sistema. Esto se describe en la seccin ``''.



  4.8.  Tamaos de segmento unitario


  El tamao de segmento unitario merece una explicacin.  Nunca puede
  escribir de forma totalmente paralela a un grupo de discos. Si tuviera
  dos discos y quisiera escribir un byte, tendra que escribir cuatro
  bits en cada disco; realmente, todos los segundos bits iran al disco
  0 y los otros al disco 1.  Sencillamente, el hardware no soporta eso.
  En su lugar, elegimos algn tamao de de segmento unitario que
  definimos como la masa atmica ms pequea de datos que puede ser
  escrita en los dispositivos. Una escritura de 16 KB con un tamao de
  segmento unitario de 4 KB provocara que el primer y tercer segmento
  unitario de 4KB se escriban en el primer disco, y el segundo y el
  cuarto en el segundo, en el caso de un RAID-0 de dos discos. De esta
  manera, para grandes escrituras, podra observar menor sobrecarga
  teniendo segmentos lo suficientemente grandes, mientras que los arrays
  que contuvieran principalmente ficheros pequeos se podran beneficiar
  ms de un tamao de segmento unitario ms pequeo.

  Los tamaos de segmento unitario se pueden especificar para todos los
  niveles de RAID excepto para el modo lineal.

  Para un rendimiento ptimo, debera experimentar con el valor, as
  como con el tamao de bloque del sistema de ficheros que pusiera en el
  array.

  El argumento de la opcin chunk-size en /etc/raidtab especifica el
  tamao de segmento unitario en kilobytes. Por tanto, 4 significa 4 KB.


  4.8.1.  RAID-0


  Los datos se escriben casi en paralelo en todos los discos del array.
  Realmente, se escriben chunk-size bytes en cada disco, de forma
  consecutiva.

  Si especifica un tamao de segmento unitario de 4 KB y escribe 16 KB a
  un array de 3 discos, el sistema RAID escribir 4 KB a los discos 0, 1
  y 2, en paralelo, y a continuacin los 4 KB restantes al disco 0.

  Un tamao de segmento unitario de 32 KB es un punto de partida
  razonable para la mayora de los arrays. Pero el valor ptimo depende
  muchsimo del nmero de discos implicados, del contenido del sistema
  de ficheros que aloja y de muchos otros factores. Experimente con l
  para obtener el mejor rendimiento.


  4.8.2.  RAID-1


  Para las escrituras, el tamao de segmento unitario no afecta al
  array, ya que se deben escribir todos los datos a todos los discos sin
  importar qu.  Para las lecturas, sin embargo, el tamao de segmento
  unitario indica cuntos datos leer consecutivamente de los discos
  participantes. Ya que todos los discos activos del array contienen la
  misma informacin, las lecturas se pueden hacer en paralelo al estilo
  de un RAID-0.


  4.8.3.  RAID-4


  Cuando se realiza una escritura en un array RAID-4, tambin se debe
  actualizar la informacin de paridad en el disco de paridad. El tamao
  de segmento unitario es el tamao de los bloques de paridad. Si se
  escribe un byte a un array RAID-4, entonces se leern chunk-size bytes
  de los N-1 discos, se calcular la informacin de paridad y se
  escribirn chunk-size bytes al disco de paridad.

  El tamao de segmento unitario afecta al rendimiento de las lecturas
  de la misma manera que en un RAID-0, ya que las lecturas de un RAID-4
  se realizan de la misma forma.


  4.8.4.  RAID-5


  En RAID-5 el tamao de segmento unitario tiene exactamente el mismo
  significado que en un RAID-4.

  Un tamao de segmento unitario razonable para un RAID-5 es 128 KB
  pero, como siempre, puede desear experimentar con ste.

  Tambin consulte la seccin ``'' de opciones especiales de mke2fs.
  Esto afecta al rendimiento de un RAID-5.


  4.9.  Opciones de mke2fs


  Hay disponible una opcin especial cuando se formatean dispositivos
  RAID-4 y RAID-5 con mke2fs. La opcin -R stride=nn permitir a mke2fs
  situar mejor diferentes estructuras de datos especficas de ext2 en un
  dispositivo RAID de forma inteligente.

  Si el tamao de segmento unitario es 32 KB significa que 32 KB de
  datos consecutivos residirn en un nico disco. Si queremos construir
  un sistema de ficheros ext2 con un tamao de bloque de 4KB, nos damos
  cuenta de que habr 8 bloques del sistema de ficheros en una segmento
  unitario del array. Podemos pasar esta informacin a la utilidad
  mke2fs cuando se cree el sistema de ficheros:



         mke2fs -b 4096 -R stride=8 /dev/md0




  El rendimiento de un RAID-{4,5} se ve fuertemente influido por esta
  opcin. No estoy seguro de cmo la opcin stride afectar a otros
  niveles RAID. Si alguien tiene informacin sobre esto, por favor, que
  la enve a mi direccin email.


  4.10.  Autodeteccin


  La autodeteccin permite a los dispositivos RAID ser automticamente
  reconocidos por el ncleo durante el arranque, justo despus de que se
  realice la deteccin ordinaria de particiones.
  Esto requiere varias cosas:


  1. Necesita todo el soporte necesario para autodeteccin (SCSI, IDE,
     RAID, etc) en el ncleo (no como mdulo) o bien crear una imagen
     initrd, lo cual de todos modos es absurdo, dado lo improbable de
     que descargue dicho soporte en un sistema activo.

     Compruebe esto.

  2. Debe haber creado los dispositivos RAID usando superbloques
     persistentes.

  3. El tipo de particin de los dispositivos usados en el RAID se debe
     establecer a 0xFD (use fdisk y establezca el tipo a fd)

  NOTA: asegrese de que su RAID NO EST FUNCIONANDO antes de cambiar
  los tipos de las particiones. Use raidstop /dev/md0 para parar el
  dispositivo.

  Si sigue los pasos 1, 2 y 3 de arriba, la autodeteccin debera
  activarse.  Pruebe rearrancar. Cuando el sistema se levante, vea el
  contenido de /proc/mdstat; debera decirle que su RAID est
  funcionando.

  Durante el arranque, podra ver mensajes similares a stos:



        Oct 22 00:51:59 malthe kernel: SCSI device sdg: hdwr sector= 512
         bytes. Sectors= 12657717 [6180 MB] [6.2 GB]
        Oct 22 00:51:59 malthe kernel: Partition check:
        Oct 22 00:51:59 malthe kernel:  sda: sda1 sda2 sda3 sda4
        Oct 22 00:51:59 malthe kernel:  sdb: sdb1 sdb2
        Oct 22 00:51:59 malthe kernel:  sdc: sdc1 sdc2
        Oct 22 00:51:59 malthe kernel:  sdd: sdd1 sdd2
        Oct 22 00:51:59 malthe kernel:  sde: sde1 sde2
        Oct 22 00:51:59 malthe kernel:  sdf: sdf1 sdf2
        Oct 22 00:51:59 malthe kernel:  sdg: sdg1 sdg2
        Oct 22 00:51:59 malthe kernel: autodetecting RAID arrays
        Oct 22 00:51:59 malthe kernel: (read) sdb1's sb offset: 6199872
        Oct 22 00:51:59 malthe kernel: bind<sdb1,1>
        Oct 22 00:51:59 malthe kernel: (read) sdc1's sb offset: 6199872
        Oct 22 00:51:59 malthe kernel: bind<sdc1,2>
        Oct 22 00:51:59 malthe kernel: (read) sdd1's sb offset: 6199872
        Oct 22 00:51:59 malthe kernel: bind<sdd1,3>
        Oct 22 00:51:59 malthe kernel: (read) sde1's sb offset: 6199872
        Oct 22 00:51:59 malthe kernel: bind<sde1,4>
        Oct 22 00:51:59 malthe kernel: (read) sdf1's sb offset: 6205376
        Oct 22 00:51:59 malthe kernel: bind<sdf1,5>
        Oct 22 00:51:59 malthe kernel: (read) sdg1's sb offset: 6205376
        Oct 22 00:51:59 malthe kernel: bind<sdg1,6>
        Oct 22 00:51:59 malthe kernel: autorunning md0
        Oct 22 00:51:59 malthe kernel: running: <sdg1><sdf1><sde1><sdd1><sdc1><sdb1>
        Oct 22 00:51:59 malthe kernel: now!
        Oct 22 00:51:59 malthe kernel: md: md0: raid array is not clean --
         starting background reconstruction




  Esta es la salida de la autodeteccin de un array RAID-5 que no fue
  limpiamente desactivado (es decir, la mquina se cay). La
  reconstruccin se inicia automticamente. Montar este dispositivo es
  perfectamente seguro, ya que la reconstruccin es transparente y todos
  los datos son consistentes (slo es la informacin de paridad la que
  es inconsistente - aunque la misma no se necesita hasta que un
  dispositivo falle).

  Los dispositivos autoarrancados tambin son automticamente parados
  durante el cierre del sistema. No se preocupe de los guiones de
  inicio.  Simplemente, use los dispositivos /dev/md como cualquier otro
  dispositivo /dev/sdX o /dev/hdX.

  S, verdaderamente es as de fcil.

  Quizs desee buscar cualquier orden raidstart/raidstop en sus guiones
  de inicio/parada /etc/rc.d/rc.sysinit y /etc/rc.d/init.d/halt (guiones
  de inicio estndares de RedHat). Se usan para el antiguo estilo de
  RAID y no tienen utilidad en el nuevo estilo de RAID con
  autodeteccin.  Elimine las lneas y todo ir perfectamente bien.


  4.11.  Arrancar desde RAID


  Existen varias formas de configurar un sistema que monta su sistema de
  ficheros raz sobre un dispositivo RAID. Desafortunadamente, ninguna
  de las distribuciones de Linux con las que yo he probado (RedHat y
  Debian) soportan un dispositivo RAID como dispositivo del sistema de
  ficheros raz durante el proceso de instalacin. Por tanto, le va a
  doler un poco si quiere esto pero, de hecho, es posible.

  Actualmente, LILO no maneja dispositivos RAID y por ello, no se puede
  cargar el ncleo desde un dispositivo RAID en el instante del
  arranque. Su sistema de ficheros /boot tendr que residir en un
  dispositivo que no sea RAID. Un modo de asegurar que su sistema
  arranca, pase lo que pase, es crear particiones /boot similares en
  todas las unidades de su RAID, de esa forma la BIOS siempre puede
  cargar datos desde, por ejemplo, la primera unidad disponible. Esto
  necesita que no arranque con un disco defectuoso en su sistema.

  Otra forma de asegurar que su sistema siempre arranca es crear un
  disquete de arranque cuando toda la configuracin se haya terminado.
  Si muere el disco en el que reside el sistema de ficheros /boot,
  siempre puede arrancar desde el disquete.


  4.11.1.  Mtodo 1


  Este mtodo asume que posee un disco de reserva en el que puede
  instalar el sistema y que no es parte del RAID que configurar ms
  adelante.


    Primero, instale un sistema normal en su disco extra.

    Obtenga el ncleo que piensa ejecutar, obtenga los parches y las
     herramientas RAID y haga que su sistema arranque con el nuevo
     ncleo con soporte RAID. Asegrese de que el soporte RAID est
     dentro del ncleo y que no se carga como mdulo.

    Ahora debe configurar y crear el RAID que tiene pensado usar para
     el sistema de ficheros raz. ste es un procedimiento estndar como
     ya se describi en ``''.

    Simplemente para asegurarse de que todo est bien, trate de
     rearrancar el sistema para ver si el nuevo RAID aparece durante el
     arranque. Debera aparecer.


    Coloque un sistema de ficheros sobre el nuevo array (usando
     mke2fs), y mntelo en /mnt/newroot.

    Ahora, copie el contenido de su sistema de ficheros raz actual (el
     disco extra) al nuevo sistema de ficheros raz (el array). Hay
     muchas formas de hacer esto. Una de ellas es



        cd /
        find . -xdev | cpio -pm /mnt/newroot




    Debe modificar el fichero /mnt/newroot/etc/fstab para usar el
     dispositivo correcto (el dispositivo raz /dev/md?) para el sistema
     de ficheros raz.

    Ahora, desmonte el sistema de ficheros /boot actual y mntelo en su
     lugar en /mnt/newroot/boot. Esto es necesario para que LILO
     funcione correctamente en el siguiente paso.

    Actualice /mnt/newroot/etc/lilo.conf para que apunte a los
     dispositivos correctos. El dispositivo de arranque debe ser todava
     un disco normal (no un dispositivo RAID) pero el dispositivo raz
     debe apuntar a su nuevo RAID. Cuando est hecho, ejecute lilo -r
     /mnt/newroot Esta ejecucin de LILO debera terminar sin errores.

    Rearranque el sistema y observe que todo aparece como se esperaba
     :)

  Si est haciendo esto con discos IDE, asegrese de indicarle a su BIOS
  que todos los discos son del tipo auto-detect, as la BIOS permitir
  a su mquina arrancar incluso cuando un disco haya fallado.


  4.11.2.  Mtodo 2


  Este mtodo necesita que parchee su paquete raidtools para poder
  incluir la directiva failed-disk en /etc/raidtab. Busque en los
  archivos de la lista de correo Linux-raid los mensajes enviados por
  Martin Bene, alrededor del 23 de abril de 1999, donde se envi el
  parche failed-disk.  Se espera que esta funcionalidad est pronto en
  el paquete raidtools (para cuando est leyendo esto puede que incluso
  no necesite parchear las raidtools).

  Slo puede utilizar este mtodo en RAIDs de niveles 1 o superiores.
  La idea es instalar un sistema sobre un disco que es adrede marcado
  como estropeado en el RAID, copiar a continuacin el sistema en el
  RAID que estar funcionando en modo degrado y finalmente hacer que el
  RAID use el ya no necesario disco de instalacin, aniquilando la
  anterior instalacin pero haciendo que el RAID funcione en modo no
  degradado.


    Primero, instale un sistema normal sobre un disco (que ms tarde
     formar parte de su RAID). Es importante que este disco (o
     particin) no sea el ms pequeo. Si lo es, no ser posible
     aadirlo al RAID ms tarde!

    A continuacin, obtenga el ncleo, los parches, las herramientas,
     etc., etc. Ya conoce el ejercicio. Haga que su sistema arranque con
     un nuevo ncleo que tenga el soporte RAID que necesita compilado
     dentro del ncleo.
    Ahora, configure el RAID con su dispositivo raz actual como el
     failed-disk (disco estropeado) en el fichero raidtab. No coloque el
     failed-disk como el primer disco en el fichero raidtab, eso le dar
     problemas para poner en marcha el RAID. Cree el RAID y coloque un
     sistema de ficheros en l.

    Pruebe a rearrancar y vea si el RAID aparece como debera hacerlo.

    Copie los ficheros del sistema y reconfigure el sistema para usar
     el RAID como dispositivo raz, como se ha descrito en la seccin
     ``'' anterior.

    Cuando su sistema arranque con xito desde el RAID, puede modificar
     el fichero raidtab para incluir el failed-disk anterior como un
     disco raid-disk normal. Ahora, ejecute raidhotadd para aadir el
     disco a su sistema RAID.

    Ahora debera tener un sistema capaz de arrancar desde un RAID no
     degradado.


  4.12.  Dificultades


  Nunca NUNCA nunca reparticione discos que son parte de un RAID que
  est funcionando. Si debe alterar la tabla de particiones de un disco
  que es parte de un RAID, pare primero el array y reparticione despus.

  Es fcil poner demasiados discos en un bus. Un bus Fast-Wide SCSI
  normal puede sostener 10 MB/s que es menos de lo que muchos discos
  pueden obtener por s solos hoy en da. Por supuesto, colocar seis de
  tales discos en un bus no le proporcionar el aumento de rendimiento
  esperado.

  La mayora de los controladores SCSI slo le proporcionarn un
  rendimiento extra si los buses SCSI son llevados prcticamente al
  mximo por los discos conectados a ellos. No observar una mejora de
  rendimiento por usar dos controladoras 2940 con dos discos SCSI viejos
  en lugar de simplemente hacer funcionar los dos discos sobre una sola
  tarjeta.

  Si olvida la opcin persistent-superblock puede que su array no
  arranque por las buenas despus de que haya sido parado. Simplemente,
  recree el array con la opcin colocada correctamente en el fichero
  /etc/raidtab.

  Si un RAID-5 no logra reconstruirse despus de que un disco haya sido
  eliminado y reinsertado, puede deberse al orden de los dispositivos en
  el fichero /etc/raidtab. Intente mover el primer par device -- raid-
  disk al final de la descripcin del array en el fichero raidtab.


  5.  Comprobacin


  Si piensa usar un RAID para obtener tolerancia a fallos, tambin puede
  que quiera comprobar su configuracin para ver si realmente funciona.
  Ahora bien, cmo se simula un fallo de disco?.

  El resumen es que no puede, salvo quizs atravesando mediante un hacha
  incandescente la unidad sobre la que quiere simular el fallo.  Nunca
  puede saber qu ocurrir si un disco muere. Puede que se apodere
  elctricamente del bus al que est conectado, haciendo que todas las
  unidades de ese bus sean inaccesibles, aunque nunca he odo que eso
  haya ocurrido. La unidad tambin puede simplemente informar de un
  fallo de lectura/escritura a la capa SCSI/IDE que a su vez har que la
  capa RAID maneje esta situacin de forma elegante. Afortunadamente,
  esta es la forma en la que normalmente ocurren las cosas.


  5.1.  Simulacin de un fallo de disco


  Si quiere simular un fallo de disco desconecte la unidad. Debe hacer
  esto con el sistema apagado. Si est interesado en comprobar si sus
  datos pueden sobrevivir con un disco menos de los habituales, no hay
  motivo para ser un vaquero de las conexiones en caliente aqu. Apague
  el sistema, desconecte el disco y encindalo de nuevo.

  Mire en el registro del sistema (generado por syslogd) y en
  /proc/mdstat para ver qu es lo que est haciendo el RAID. Ha
  funcionado?.

  Recuerde que debe utilizar un RAID-{1,4,5} para que su array sea capaz
  de sobrevivir a un fallo de disco. Un modo lineal o un RAID-0 fallarn
  totalmente cuando se pierda un dispositivo.

  Cuando haya reconectado el disco de nuevo (recuerde, con el sistema
  apagado, naturalmente) podr aadir el nuevo dispositivo al RAID otra
  vez, con la orden raidhotadd.


  5.2.  Simulacin de corrupcin de datos


  Un RAID (ya sea hardware o software) asume que si una escritura en un
  disco no devuelve un error, entonces la escritura ha tenido xito. Por
  tanto. si su disco corrompe datos sin devolver un error, sus datos se
  corrompern. Naturalmente, esto es muy improbable que ocurra, pero es
  posible, y producira un sistema de ficheros corrupto.

  Un RAID no puede y no est pensado para proteger contra la corrupcin
  de datos del medio de almacenamiento fsico. Por tanto, tampoco tiene
  ningn sentido corromper a propsito los datos de un disco (usando dd,
  por ejemplo) para ver cmo manejar el sistema RAID esa situacin. Es
  ms probable (a menos que corrompa el superbloque del RAID) que la
  capa RAID no descubra nunca la corrupcin, sino que su sistema de
  ficheros en el dispositivo RAID se corrompa.

  As es como se supone que funcionan las cosas. Un RAID no es una
  garanta absoluta para la integridad de datos, simplemente le permite
  conservar sus datos si un disco muere (naturalmente, con RAIDs de
  niveles iguales o superiores a 1).


  6.  Rendimiento


  Esta seccin contiene varias pruebas de evaluacin de prestaciones
  (benchmarks) de un sistema real usando un RAID software.

  Las evaluaciones se han realizado con el programa bonnie y todas las
  veces con ficheros dos o ms veces ms grandes que el tamao de la RAM
  fsica de la mquina.

  Estas evaluaciones slo miden el ancho de banda de entrada y de salida
  sobre un nico gran fichero. Esto es algo interesante de saber si uno
  est interesado en el mximo rendimiento de E/S para grandes
  lecturas/escrituras. Sin embargo, tales nmeros nos dicen poco sobre
  cul sera el rendimiento si el array se usara para un almacn
  temporal de noticias, un servidor web, etc. etc. Tenga siempre en
  cuenta que los nmeros de las evaluaciones son el resultado de
  ejecutar un programa sinttico.  Pocos programas del mundo real hacen
  lo que bonnie hace y, aunque es interesante mirar estos nmeros de
  E/S, no son indicadores en ltima instancia del rendimiento de los
  dispositivos del mundo real.

  Por ahora, slo poseo resultados de mi propia mquina. La
  configuracin es:


    Dual Pentium Pro 150 MHz

    256 MB RAM (60 MHz EDO)

    Tres IBM UltraStar 9ES 4.5 GB U2W SCSI

    Adaptec 2940U2W

    Un IBM UltraStar 9ES 4.5 GB UW SCSI

    Adaptec 2940 UW

    Ncleo 2.2.7 con los parches RAID

  Los tres discos U2W cuelgan de la controladora U2W y el disco UW
  cuelga de la controladora UW.

  Parece imposible sacar mucho ms de 30 MB/s a travs de los buses SCSI
  de este sistema, usando un RAID o no. Mi suposicin es que, debido a
  que el sistema es bastante antiguo, el ancho de banda de la memoria lo
  fastidia y, por tanto, limita lo que se puede enviar a travs de las
  controladoras SCSI.


  6.1.  RAID-0


  Lectura significa entrada de bloques secuencial y Escritura significa
  salida de bloques secuencial. El tamao de fichero fue de 1GB en todas
  las pruebas. Las pruebas se realizaron en modo monousuario. Se
  configur el controlador (driver) SCSI para que no utilizara tagged
  command queuing, TCQ).


  |                             |                    |                |                  |
  |Tamao de segmento unitario  |  Tamao de bloque  |  Lectura KB/s  |  Escritura KB/s  |
  |                             |                    |                |                  |
  |4k                           |  1k                |  19712         |  18035           |
  |4k                           |  4k                |  34048         |  27061           |
  |8k                           |  1k                |  19301         |  18091           |
  |8k                           |  4k                |  33920         |  27118           |
  |16k                          |  1k                |  19330         |  18179           |
  |16k                          |  2k                |  28161         |  23682           |
  |16k                          |  4k                |  33990         |  27229           |
  |32k                          |  1k                |  19251         |  18194           |
  |32k                          |  4k                |  34071         |  26976           |



  A partir de esto vemos que el tamao de segmento unitario del RAID no
  importa mucho.  Sin embargo, el tamao de bloque del sistema de
  ficheros ext2 debera ser tan grande como fuera posible, lo cual
  significa 4KB (es decir, el tamao de pgina) en una IA-32 (N.T.:
  arquitectura Intel de 32 bits).



  6.2.  RAID-0 con TCQ


  Esta vez, el manejador SCSI se configur para usar TCQ, con una
  longitud de cola de 8. Por lo dems, todo es lo mismo de antes.


  |                             |                    |                |                  |
  |Tamao de segmento unitario  |  Tamao de bloque  |  Lectura KB/s  |  Escritura KB/s  |
  |                             |                    |                |                  |
  |32k                          |  4k                |  33617         |  27215           |



  No se realizaron ms pruebas. Activar el TCQ pareci incrementar
  ligeramente el rendimiento de las escrituras, pero verdaderamente no
  hubo mucha diferencia en absoluto.


  6.3.  RAID-5


  El array se configur para funcionar en el modo RAID-5 y se hicieron
  pruebas similares.


  |                             |                    |                |                  |
  |Tamao de segmento unitario  |  Tamao de bloque  |  Lectura KB/s  |  Escritura KB/s  |
  |                             |                    |                |                  |
  |8k                           |  1k                |  11090         |  6874            |
  |8k                           |  4k                |  13474         |  12229           |
  |32k                          |  1k                |  11442         |  8291            |
  |32k                          |  2k                |  16089         |  10926           |
  |32k                          |  4k                |  18724         |  12627           |



  Ahora, tanto el tamao de segmento unitario como el tamao de bloque
  parecen realmente significativos.


  6.4.  RAID-10


  Un RAID-10 significa bandas duplicadas o un array RAID-1 de dos arrays
  RAID-0. El tamao de segmento unitario es tanto el tamao de las
  porciones del array RAID-1 como del array RAID-0. No realic pruebas
  en las que esos tamaos de segmento unitario fueran diferentes, aunque
  esa debera ser una configuracin perfectamente vlida.


  |                             |                    |                |                  |
  |Tamao de segmento unitario  |  Tamao de bloque  |  Lectura KB/s  |  Escritura KB/s  |
  |                             |                    |                |                  |
  |32k                          |  1k                |  13753         |  11580           |
  |32k                          |  4k                |  23432         |  22249           |



  No se realizaron ms pruebas. El tamao de fichero fue de 900MB debido
  a que las cuatro particiones involucradas eran de 500 MB cada una, lo
  cual no deja espacio para un fichero de 1GB en esta configuracin
  (RAID-1 sobre dos arrays de 1000MB).



  7.  Agradecimientos


  Las siguientes personas han contribuido a la creacin de este
  documento:


    Ingo Molnar

    Jim Warren

    Louis Mandelstam

    Allan Noah

    Yasunori Taniike

    La gente de la lista de correo Linux-RAID

    El que se me olvida, lo siento :)

  Por favor, enve correcciones, sugerencias, etc. al autor. Es la nica
  forma en que este CMO puede mejorar.

  Enve correcciones, sugerencias, etc. sobre esta traduccin al espaol
  a Juan Piernas Cnovas (piernas@ditec.um.es).


  8.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones oficiales:  www.insflug.org. Asegrese de comprobar
  cul es la ltima versin disponible en el Insflug antes de bajar un
  documento de un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  que estamos trabajando incesantemente para aadir.

  Se proporcionar tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  en http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros.

  Francisco Jos Montilla, pacopepe@insflug.org.



  El Sonido en LiNUX - COMO
  Jeff Tranter, jeff_tranter@mitel.com
  Traducido por Sergio Alonso Manzanedo sa.manzanedo@vll.ser
  vicom.es
  v1.14, 10 Junio 1996

  Este documento describe el soporte de sonido para Linux. Enumera el
  hardware de sonido soportado, describe cmo configurar los drivers del
  ncleo y contesta a las preguntas ms frecuentes. Intenta ensear ms
  rpido a los nuevos usuarios y reducir el gran trfico en los grupos
  de noticias de Usenet.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin.

  1.1.    Reconocimientos.

  1.2.    Nuevas versiones de este documento.

  1.3.    Sugerencias, crticas y comentarios.

  1.4.    Poltica de distribucin.

  2.      Tecnologa de la tarjeta de sonido.

  3.      Hardware soportado.

  3.1.    Tarjetas de sonido.

  3.2.    Drivers de sonido alternativos.

  3.3.    Altavoz del PC.

  3.4.    Puerto paralelo.

  4.      Instalacin.

  4.1.    Instalar la tarjeta de sonido.

  4.2.    Configurar el ncleo.

  4.3.    Creando los ficheros de dispositivo.

  4.4.    Inicializando Linux y comprobando la instalacin.

  4.5.    Resolucin de problemas.

  4.5.1.  Punto 1: asegrate de que realmente ests ejecutando el ncleo
  compilado.

  4.5.2.  Punto 2: asegrate de que los drivers de sonido del ncleo
  estn compilados en l.

  4.5.3.  Punto 3: Detect el ncleo tu tarjeta de sonido durante la
  inicializacin?

  4.5.4.  Punto 4: Puedes leer datos desde el dispositivo dsp ?

  4.5.5.  Punto 5: Cuando todo falla...  :-(

  5.      Aplicaciones de soporte de sonido.

  6.      6. FAQ.

  6.1.    Cules son los ficheros de dispositivo de sonido?

  6.2.    Cmo puedo reproducir una muestra de sonido?

  6.3.    Cmo puedo grabar una muestra?

  6.4.    Puedo tener ms de una tarjeta de sonido?

  6.5.    Error: No such file or directory for sound devices

  6.6.    Error: No such device for sound devices

  6.7.    Error: No space left on device for sound devices

  6.8.    Error: device busy for sound devices

  6.9.    Todava tengo errores de dispositivo ocupado (device busy)!

  6.10.   Reproduccin parcial de un fichero de sonido digitalizado.

  6.11.   Hay pausas cuando reproduzco ficheros MOD.

  6.12.   Tengo errores de compilacin al compilar aplicaciones de
  sonido.

  6.13.   Tengo SEGV al ejecutar ficheros binarios que antes
  funcionaban.

  6.14.   Qu errores conocidos o limitaciones hay en el driver de
  sonido?

  6.15.   Qu significan todas las opciones de configuracin del driver
  de sonido?

  6.16.   Dnde estn documentados los ioctls()  del driver de sonido?

  6.17.   Cales son los recursos de la CPU necesarios para
  reproducir/grabar sin pausas?

  6.18.   Problemas con una PAS16 y un adaptador host Adaptec 1542 SCSI.

  6.19.   Problemas con el sintetizador FM de una SoundBlaster Pro 1.

  6.20.   Es posible leer y escribir muestras simultneamente?

  6.21.   Mi SB16 est puesta con un IRQ 2, pero la configuracin no me
  deja usar este valor.

  6.22.   Son soportadas la SoundBlaster AWE32 o la SoundBlaster16 ASP?

  6.23.   Si estoy en Linux y despus inicio una sesin de DOS, tengo
  errores y/o las aplicaciones de sonido no funcionan correctamente.

  6.24.   Problemas ejecutando DOOM bajo Linux.

  6.25.   Cmo puedo reducir el ruido recogido por mi tarjeta de
  sonido?

  6.26.   Puedo reproducir sonido, pero no puedo grabar.

  6.27.   Mi tarjeta de sonido "compatible" slo funciona si primero la
  inicializo bajo MS-DOS.

  6.28.   Mi tarjeta de sonido "compatible" SoundBlaster 16-bit slo
  funciona en el modo 8-bit bajo Linux

  6.29.   Dnde puedo encontrar aplicaciones de sonido para Linux?

  6.30.   Puede el driver de sonido ser compilado como mdulo cargable?

  6.31.   Puedo usar la tarjeta de sonido para sustituir el beep de la
  consola del sistema?

  6.32.   Qu es VoxWare?

  6.33.   Son soportadas las tarjetas de sonido Plug-and-Play?

  6.34.   Sox/Play/Vplay saca el mensaje "invalid block size 1024"

  6.35.   Por qu el driver de sonido tiene su propio programa de
  configuracin?

  6.36.   Las opciones del mezclador son borradas cuando cargo el
  mdulo del driver de sonido!

  6.37.   Solamente el root puede grabar sonido.

  7.      Referencias

  8.      Acerca de la traduccin.

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin.

  Este es el documento Linux Sound HOWTO. Debe ser entendido como una
  gua de referencia rpida que cubre todo lo que necesitas saber para
  instalar y configurar el soporte de sonido bajo Linux. Se contestan
  las preguntas ms frecuentes sobre el sonido en Linux, adems de
  incluir referencias a otras fuentes de informacin sobre mltiples
  caractersticas relativas a la generacin de sonido y msica por
  ordenador.

  El alcance est limitado a los aspectos sobre las tarjetas de sonido
  relacionadas con Linux. Remtase a los otros documentos listados en la
  seccin Referencias para informacin ms general sobre tarjetas de
  sonido y generacin de sonido y msica por ordenador.

  1.1.  Reconocimientos.

  La mayor parte de esta informacin proviene de los ficheros README que
  vienen junto con el cdigo fuente del driver de sonido, de Hannu
  Savolainen hannu@voxware.pp.fi.  Doy las gracias a Hannu y toda esa
  gente que ha desarrollado los drivers de sonido del ncleo y todas las
  utilidades.

  Gracias al paquete Linuxdoc-SGML, este HOWTO est disponible en varios
  formatos, todos generados a partir de un mismo fichero fuente.

  1.2.  Nuevas versiones de este documento.

  Versiones nuevas de este documento sern enviadas peridicamente al
  grupo de noticias comp.os.linux.answers. Tambin sern enviadas a
  varios ftp annimos que archivan este tipo de informacin, incluyendo
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/.
  Versiones de hipertexto de ste y otros HOWTOs estn disponibles en
  mltiples sites, incluyendo http://sunsite.unc.edu/mdw/mdw.html La
  mayora de las distribuciones de Linux en formato CD-ROM incluyen los
  HOWTOs en el directorio /usr/doc/, aunque tambin los puedes comprar
  en formato impreso a muchos vendedores.

  Una traduccin en francs de este documento est disponible en
  ftp://ftp.ibp.fr/pub2/linux/french/docs/HOWTO/.

  Una traduccin en japons de este documento est disponible en
  http://yebisu.ics.es.osaka-u.ac.jp/linux/.

  Una traduccin en italiano de este documento est disponible en
  http://www.psico.unipd.it/ildp/docs/HOWTO/Sound-HOWTO.html.

  Si haces una traduccin de este documento en otro lenguaje,
  comuncamelo y lo incluir como una referencia en este apartado.

  1.3.  Sugerencias, crticas y comentarios.

  Confo que a t, el usuario, este documento te sea de utilidad. Si
  tienes alguna sugerencia, correccin, o comentario, por favor
  envamelos jeff_tranter@mitel.com, y tratar de incorporarlas en la
  prxima revisin.

  Tambin estoy deseando contestar preguntas generales sobre tarjetas de
  sonido y Linux, tan bien como pueda. Antes de hacerlo, por favor lee
  toda la informacin de este HOWTO, y envame informacin detallada
  sobre el problema.

  Si t publicas este documento en un CD-ROM o impreso en papel, una
  copia complementaria ser apreciada. Envame un email para decirte mi
  direccin postal. Considera tambin hacer una donacin al Linux
  Documentation Project para ayudar a soportar la libre documentacin de
  Linux. Contacta con el coordinador de los HOWTO de Linux, Greg Hankins
  gregh@sunsite.unc.edu para ms informacin.

  1.4.  Poltica de distribucin.

  Copyright (C) 1996 Jeff Tranter.

  Este HOWTO es documentacin libre; lo puedes redistribuir y/o
  modificar bajo los trminos de la licencia pblica general del GNU
  como public la Free Software Foundation.

  Este documento es distribuido con la esperanza de que ser de
  utilidad, pero sin ninguna garanta.

  Puedes obtener una copia de la licencia pblica general del GNU
  escribiendo a la Free Software Foundation, Inc., 675 Mass Ave,
  Cambridge, MA 02139, USA.

  2.  Tecnologa de la tarjeta de sonido.

  Esta seccin da unas nociones de tecnologa de sonido en ordenador,
  para ayudarte a entender los conceptos usados ms tarde en el
  documento. Debes consultar un libro de sonido digital o de proceso de
  seal digital para aprender ms.

  El sonido es una propiedad analgica; puede tomar cualquier valor en
  un intervalo continuo. Los ordenadores son digitales; parece que
  trabajan con valores discretos.  Las tarjetas de sonido usan un
  dispositivo conocido como convertidor analgico a digital (A/D o ADC)
  para convertir los voltajes correspondientes a las ondas de sonido
  analgico en valores digitales o numricos los cuales pueden ser
  guardados en memoria. Similarmente un convertidor digital analgico
  (D/A o DAC) convierte valores numricos en un voltaje analgico el
  cual puede ser reconducido a un altavoz, produciendo sonido.

  El proceso de conversin de analgico a digital, conocido como
  muestreo (sampling), introduce algunos errores. Dos factores son
  fundamentales en determinar con qu fidelidad la seal de muestra
  representa a la original. La frecuencia de muestreo (sampling rate) es
  el nmero de muestras hechas por unidad de tiempo (generalmente
  expresado en muestras por segundo o hertzios). Una frecuencia de
  muestreo baja genera una representacin de menos calidad de la seal
  analgica. El tamao de muestreo (sample size) es el rango de valores
  usados para representar cada muestra, generalmente expresado en bits.
  Cuanto mayor sea el tamao de muestra de mayor calidad ser la seal
  digital.

  Las tarjetas de sonido usan comnmente muestras de 8 o de 16 bits y
  frecuencias de muestreo desde 4000 hasta 44000 muestras por segundo.
  Las muestras pueden estar contenidas en un canal (mono) o en dos
  (estreo).

  La sntesis de FM es una tcnica antigua para producir sonido. Se basa
  en combinar diferentes formas de onda (por ejemplo sinoidal,
  triangular, cuadrada). La sntesis de FM es ms fcil de implementar
  en hardware que la conversin D/A, pero es ms difcil de programar y
  menos flexible.

  Algunas tarjetas de sonido traen la sntesis de FM para conservar la
  compatibilidad con otras tarjetas y software anteriores.

  Generalmente se proporcionan varios generadores de sonido o voces.

  La sntesis de tabla de onda (WaveTable) combina la flexibilidad de la
  conversin D/A con la capacidad de mltiples canales de la sntesis de
  FM.  Con este esquema las voces digitalizadas pueden ser cargadas en
  una memoria dedicada, y despus reproducidas, combinadas, y
  modificadas con pocos recursos de la CPU.

  La mayora de las tarjetas de sonido proporcionan la capacidad de
  mezclar, combinar seales de diferentes fuentes de entrada y controlar
  los niveles de ganancia.

  MIDI significa Musical Intrument Digital Interface (interfase digital
  para instrumentos musicales), y es el hardware estndar y el protocolo
  software que permite a los instrumentos musicales comunicarse con
  cualquier otro.  Los eventos enviados a travs de un bus MIDI tambin
  pueden ser guardados como ficheros MIDI para editarlos ms tarde y
  reproducirlos. Algunas tarjetas de sonido traen un interfase MIDI. Las
  que todava no pueden reproducir ficheros MIDI usan las capacidades de
  la placa de la tarjeta de sonido.

  Los ficheros MOD son un formato comn para las canciones generadas por
  ordenador.  Como informacin sobre las notas musicales a ser
  reproducidas los ficheros contienen muestras digitalizadas de los
  instrumentos (o voces). Los ficheros MOD son originarios de los
  ordenadores Amiga, pero pueden ser reproducidos en otros sistemas,
  incluyendo Linux, con el software adecuado.

  3.  Hardware soportado.

  Esta seccin lista las tarjetas de sonido y los interfases que
  actualmente son soportados bajo Linux. Esta informacin est basada en
  los ltimos ncleos de Linux.

  El driver de sonido tiene su propio nmero de versin. El ltimo
  ncleo estable de Linux realizado hasta ahora era la versin 2.0,
  usando la versin 3.5.2-960330 del driver de sonido.

  El autor del driver de sonido, Hannu Savolainen, normalmente tambin
  realiza nuevas versiones beta del driver de sonido como parches del
  ncleo antes de que sean incluidas como parte de la distribucin
  estndar del ncleo de Linux.

  Esta informacin slo es vlida para Linux en la plataforma Intel.
  Algo de informacin puede ser aplicable a otras arquitecturas de
  procesadores, pero yo no tengo experiencia o informacin de primera
  mano.

  3.1.  Tarjetas de sonido.

  Las siguientes tarjetas de sonido son soportadas por el driver de
  sonido del ncleo de Linux:

    ATI Stereo F/X

    AdLib

    Ensoniq SoundScape (and compatibles made by Reveal and Spea)

    Gravis Ultrasound

    Gravis Ultrasound ACE

    Gravis Ultrasound Max

    Gravis Ultrasound with 16 bit sampling option

    Logitech Sound Man 16

    Logitech SoundMan Games

    Logitech SoundMan Wave

    MAD16 Pro (OPTi 82C929)

    Media Vision Jazz16

    MediaTriX AudioTriX Pro

    Microsoft Windows Sound System (MSS/WSS)

    Mozart (OAK OTI-601)

    Orchid SW32

    Personal Sound System (PSS)

    Pro Audio Spectrum 16

    Pro Audio Studio 16

    Pro Sonic 16

    Roland MPU-401 MIDI interface

    Sound Blaster 1.0

    Sound Blaster 16

    Sound Blaster 16ASP

    Sound Blaster 2.0

    Sound Blaster AWE32

    Sound Blaster Pro

    TI TM4000M notebook

    ThunderBoard

    Turtle Beach Tropez

    Yamaha FM synthesizers (OPL2, OPL3 and OPL4)

    6850 UART MIDI Interface

  Las siguientes tarjetas no son soportadas, bien porque son obsoletas,
  bien porque el fabricante no proporcion la informacin de
  programacin necesaria para escribir un driver:

    Pro Audio Spectrum (original)

    Pro Audio Spectrum+

    antiguas tarjetas (basadas en la Sierra Aria) fabricadas por
     Diamond

  Las tarjetas que usan el protocolo Plug and Play (enchufar y comenzar)
  no son actualmente soportadas, pero lo sern en el futuro.

  Otras tarjetas de sonido que son reclamadas de ser compatibles con
  alguna de las que s que son soportadas deben funcionar si tienen
  hardware compatible (por ejemplo nivel de registro). Algunas tarjetas
  descritas como "100% compatibles con SoundBlaster" no son registradas
  como compatibles. Algunos consejos para obtener tarjetas compatibles
  que funcionen son dados ms tarde en este documento. Si tienes una
  tarjeta que funciona y no est includa en esta lista, hzmelo saber y
  la aadir a la misma.

  El ncleo de Linux soporta el puerto SCSI que viene en algunas
  tarjetas de sonido (por ejemplo en la ProAudioSpectrum 16) y el
  interfase de algunas unidades de CD-ROM (por ejemplo SoundBlaster
  Pro). Lea los documentos Linux SCSI HOWTO y CD-ROM HOWTO para ms
  informacin.

  Un mdulo del ncleo cargable para soportar puertos de juegos
  (joysticks), incluyendo los que vienen en algunas tarjetas de sonido,
  est tambin disponible.

  Notar que los drivers del ncleo, SCSI, CD-ROM y tarjeta de sonido son
  independientes unos de otros.

  Para obtener la ltima informacin del driver de la tarjeta de sonido,
  visita la pgina WWW de Savolainen listada en la seccin de
  Referencias.

  3.2.  Drivers de sonido alternativos.

  Hay disponibles algunos drivers de sonido "no oficiales", no incluidos
  en la distribucin estndar del ncleo de Linux, y usados en lugar del
  driver estndar de sonido.

  Markus Mummert (mum@mmk.e-technik.tu-muenchen.de) un paquete de
  drivers para las tarjetas Turtle Beach MultiSound (clsica), Tahiti y
  Monterey. La documentacin afirma:

  "Est diseado para la reproduccin/grabacin de alta calidad en disco
  duro sin perder sincronizacin alguna en un sistema ocupado.  Otras
  caractersticas como la sntesis de ondas, MIDI y el procesador
  digital de seal no pueden ser usadas. Tampoco es posible la grabacin
  y reproduccin simultneas.  Actualmente reemplaza a VoxWare y ha sido
  probado en bastantes versiones de ncleos, desde la 1.0.9 hasta la
  1.2.1. Tambin se puede instalar en sistemas UN*X SysV386R3.2."

  Se puede encontrar en http://www.cs.colorado.edu/~mccreary/tbeach.

  Kim Burgaard (burgaard@daimi.aau.dk) ha escrito un driver de
  dispositivo y utilidades para el interfase MIDI de la Roland MPU-401.
  El acceso al mapa de software Linux da esta descripcin:

  "Un driver de dispositivo para los interfases MIDI de la Roland
  MPU-401 (incluyendo Roland SCC-1 y RAP-10/ATW-10). Le acompaa una
  importante coleccin de utilidades, incluyendo un reproductor y
  grabador de ficheros estndar MIDI.

  Han sido hechos numerosos avances desde la versin 0.11a. entre otras
  cosas, el driver incorpora ahora la poltica de comparticin de IRQ y
  cumple con el nuevo mdulo interfase del ncleo.  Funcionabilidad
  metrnoma, posibilidad de sincronizacin (por ejemplo grficos por
  golpes de bases sin perder precisin), interfase avanzado  de
  reproduccin/grabacin y mucho, mucho ms."

  Se puede encontrar en
  ftp://sunsite.unc.edu/pub/Linux/kernel/sound/mpu-401-0.2.tar.gz

  3.3.  Altavoz del PC.

  Un driver alternativo de sonido est disponible y no requiere hardware
  adicional de sonido (usa el altavoz interno del PC). Es compatible con
  la mayora del software del driver de la tarjeta de sonido, pero como
  era de esperar, ofrece una salida de mucha peor calidad y consume
  muchos recursos de la CPU.  Los resultados pueden variar dependiendo
  de las caractersticas internas del altavoz. Para ms informacin, lea
  la documentacin que acompaa a su versin.

  La versin actual es la 0.9b y se puede encontrar en
  ftp://ftp.informatik.hu-berlin.de/pub/os/linux/hu-sound

  3.4.  Puerto paralelo.

  Otra opcin es hacer un conversor digital->analgico usando el puerto
  paralelo de la impresora y algunos componentes adicionales. ste
  genera una mejor calidad de sonido que el altavoz interno, pero
  consume todava ms recursos del sistema. El paquete del driver de
  sonido del PC menciona por encima el soporte de esto, e incluye las
  instrucciones para construir el hardware necesario.

  4.  Instalacin.

  Configurar Linux para que soporte sonido implica los siguientes pasos:

  1. Instalar la tarjeta de sonido.

  2. Configurar y construir el ncleo para que soporte sonido.

  3. Crear los ficheros de dispositivo.

  4. Bootear el ncleo Linux y comprobar la instalacin.

  La siguiente seccin cubre cada uno de estos pasos en detalle.

  4.1.  Instalar la tarjeta de sonido.

  Sigue las instrucciones del fabricante para instalar el hardware o
  encrgaselo a tu vendedor.

  4.2.  Configurar el ncleo.

  Cuando inicialmente instalas Linux, ests usando el ncleo
  precompilado.  estos ncleos generalmente no soportan sonido. Lo mejor
  es recompilar el ncleo con los drivers que necesites. Tambin puedes
  queres recompilar el ncleo para actualizar hacia una nueva versin o
  para liberar recursos de memoria minimizando el tamao del mismo.

  El Linux Kernel HOWTO Linux Kernel HOWTO puede ser consultado para ms
  detalles en la construccin del ncleo. Slo mencionar los aspectos
  que son especficos a las tarjetas de sonido.

  Si nunca has configurado el ncleo para soporte de sonido, es una
  buena idea leer todos los ficheros Readme incluidos con los drivers de
  sonido del ncleo, particularmente aquellos que se refieren a tu tipo
  de tarjeta.  Los siguientes ficheros de documentacin se pueden
  encontrar en el directorio de sonido del ncleo, generalmente
  instalado en /usr/src/linux/drivers/sound:

  CHANGELOG       - Descripcin de los cambios en cada versin.  COPYING
  - Restricciones de copia y copyright.  Readme          - ltimas y ms
  importantes noticias.  Readme.aedsp16  - Informacin sobre la tarjeta
  Audio Excel DSP 16.  Readme.cards    - Notas de configuracin de
  tarjetas especficas.  Readme.linux    - Notas de instalacin separada
  de drivers de sonido.  Readme.modules  - Cmo construir un driver como
  un mdulo del ncleo cargable.  Readme.v30      - Nuevas
  caractersticas de la versin 3.0 del driver de sonido.
  experimental.txt- Notas de caractersticas experimentales.

  Sigue el procedimiento usual de construccin del ncleo. Hay tres
  formas de ejecutar el proceso de configuracin. Un interfase grfico
  de usuario que se ejecuta bajo X11 puede ser llamado usando make
  xconfig. Un sistema basado en mens que slo requiere un display de
  texto est disponible como make menuconfig. Yo asumir que usas el
  proceso tradicional de configuracin de lnea de comando usando la
  llamada make config, aunque el proceso es similar en cada caso.

  Tambin es posible construir el driver de sonido como un mdulo
  cargable del ncleo. Yo recomiendo construir el driver dentro del
  ncleo. Una vez que est comprobado y que funciona t puedes probar
  usando la opcin de mdulo del ncleo.

  Cuando ejecutes make config, activa el soporte de sonido contestado
  "y" a la pregunta
             Sound card support (CONFIG_SOUND) [M/n/y/?]

  Al final de las preguntas de configuracin un programa de
  configuracin de sonido ser compilado, ejecutado y te preguntar qu
  opciones de sonido quieres. Ten cuidado cuando contestes a estas
  preguntas, ya que si contestas incorrectamente a alguna, repercutir
  en preguntas posteriores. Por ejemplo, no contestes "yes" (s) a la
  primera pregunta (PAS16) si realmente no tienes una PAS16. No actives
  ms tarjetas de las que realmente tienes, ya que consumen memoria.
  Adems algunos drivers (como el MPU401) pueden entrar en conflicto con
  el controlador SCSI e impedir la inicializacin del ncleo.

  Aqu listo una pequea descripcin de cada una de las opciones del
  dilogo de configuracin. Contesta "y" (s) o "n" (no) en cada
  pregunta. La respuesta por defecto es mostrada en primer lugar y en
  maysculas, de tal forma que "Y/n/? significa "y" (s) por defecto, y
  "N/y/? significa "n" (no). Para usar el valor por defecto basta con
  pulsar return, pero hay que recordar que el valor por defecto no
  significa que sea necesariamente correcto.

  Si introduces como respuesta una interrogacin (?) saldr un corto
  mensaje describindote esa opcin de configuracin.

  Notar que no todas las preguntas sern respondidas. El programa de
  configuracin desactivar algunas preguntas dependiendo de las
  anteriores respuestas.  Adems l tambin elegir algunas opciones
  automticamente.

             Old configuration exists in /etc/soundconf. Use it Y/n/?

  Si previamente has compilado el ncleo para soporte de sonido entonces
  la configuracin anterior se puede salvar. Si quieres usar el anterior
  set up contesta "y" (s). Si estas intentando una configuracin difer
  ente o has actualizado un ncleo nuevo, debes contestar "n" (no) e ir
  a travs del proceso de configuracin.

             ProAudioSpectrum 16 support Y/n/?

  Contesta "y" (s) si tienes una Pro Audio Spectrum 16, Pro Audio Stu
  dio 16 o Logitech SoundMan 16. No contestes "y" (s) si tienes otra
  tarjeta de Media Visin o Logitech desde que no son compatibles con
  PAS16.

             SoundBlaster support Y/n/?

  Contesta "y" (s) slamente si tienes una SoundBlaster original de
  Creative Labs o una clnica 100% compatible a nivel hardware como por
  ejemplo una Thunderboard o una SM Games. Si tu tarjeta estaba en la
  lista de tarjetas soportadas busca las instrucciones especficas en el
  fichero Readme.cards antes de contestar a la pregunta. Para una
  tarjeta desconocida debes contestar "y" (s) si la tarjeta presume de
  ser compatible con SoundBlaster.

             Gravis Ultrasound support Y/n/?

  Contesta "y" (s) si tienes una GUS o una GUS MAX. Contesta "n" (no)
  en caso contrario ya que el driver consume mucha memoria.

             MPU-401 support (NOT for SB16) Y/n/?

  Ten cuidado con esta pregunta. El interfase MPU401 es soportado por
  casi todas las tarjetas de sonido, aunque algunas tarjetas tienen su
  propio driver MPU401. Activar la opcin MPU401 con esas tarjetas
  causar un conflicto. Tambin el activar MPU401 en un sistema que
  realmente no tiene un MPU401 puede causar algn problema.  Si tu tar
  jeta estaba en la lista de tarjetas soportadas busca las instrucciones
  especficas en el fichero Readme.cards.  Lo mejor es contestar "y"
  (s) si tienes una tarjeta con un interfase MPU401 MIDI.

             6850 UART Midi support Y/n/?

  Lo mejor es contestar "n" (no) siempre. El interfase UART 6850 rara
  mente es usado.

             PSS (ECHO-ADI2111) support Y/n/?

  Contesta "y" (s) si solamente tienes una Orchid SW32, Cardinal DSP16
  o alguna otra tarjeta basada en el juego de chips PSS (AD1848 codec +
  ADSP-2115 DSP chips + Echo ESC614 ASIC chips).

             16 bit sampling option of GUS (not GUS MAX) Y/n/?

  Contesta "y" (si) si tienes instalado una tarjeta hija de 16 bits en
  tu GUS. Contesta "n" (no) si tienes una GUS MAX.  Activando esta
  opcin desactivamos el soporte GUS MAX.

             GUS MAX support Y/n/?

  Contesta "y" (s) si tienes una GUS MAX.

        Microsoft Sound System support Y/n/?

  Piensa otra vez cuidadosamente antes de contestar "y" (s) a esta pre
  gunta. Lo mejor es contestar s cuando tengas una tarjeta original
  Windows Sound System fabricada por Microsoft o una Aztech SG16 Pro (o
  una NX16 Pro). Tambin puedes contestar "y" (s) en el caso de que tu
  tarjeta no estuviera en la lista anterior. Para las tarjetas que
  tienen soporte VoxWare, consulta las instrucciones especficas en el
  fichero Readme.cards. Algunos driver tienen su propio soporte MSS y
  por lo tanto activar esta opcin causar un conflicto.

             Ensoniq Soundscape support Y/n/?

  Contesta "y" (s) si tienes una tarjeta basada en el juego de chips
  Ensoniq Soundscape.

             MediaTriX AudioTriX Pro support Y/n/?

  Contesta "y" (s) si tienes una AudioTriX Pro.

             Support for MAD16 and/or Mozart based cards?

  Contesta "y" (s) si tu tarjeta tiene un chip de interfase de audio
  Mozart (OAK OTI-601) o un MAX16 (OPTI 82C928 o 82C929).  Estos chips
  son actualmente muy comunes por lo que es posible que algunas tarjetas
  "sin nombre" tengan alguno de ellos.  Adems el chip MAX16 es usado en
  algunas tarjetas fabricadas por fabricantes como Turtle Beach
  (Tropez), Reveal y Diamond.

             Support for Crystal CS4232 based (PnP) cards Y/n/?

  Contesta "y" (s) si tu tarjeta est basada en el juego de chip Crys
  tal CS4232.

             Support for Turtle Beach Wave Front (Maui, Tropez) synthesizers

  Contesta "y" (s) si tienes algunas de estar tarjetas.

             SoundBlaster Pro support Y/n/?

  Activa esta opcin si tu tarjeta es una SoundBlaster Pro o Sound
  Blaster 16. Activala tambin con cualquier clnico de la SoundBaster
  Pro. Contestar "n" (no) ahorra algo de memoria pero contestar "y" (s)
  es la mejor opcin.

             SoundBlaster 16 support Y/n/?

  Actvala si tienes una SoundBaster 16 (includa la AWE32).

             Audio Excel DSP 16 initialization support Y/n/?

  Activa esta opcin si tienes una tarjeta Audio Excel DSP 16.  Mira el
  fichero readme.aedsp16 para ms informacin.

  Despus el programa de configuracin hace algunas preguntas de
  servicios de alto nivel. La contestacin recomendada es "y" (s) para
  cada una de las preguntas. Contesta "n" (no) solamente si sabes que no
  vas a utilizar esa opcin.

             /dev/dsp and /dev/audio support (usually required) Y/n/?

  Contesta "y" (s). Si contestas "n" (no) desactivas los dispositivos
  de los conversores A/D D/A /dev/dsp y /dev/audio.

             MIDI interface support Y/n/?

  Si contestas "n" (no) desactivas los dispositivos /dev/midixx y el
  acceso a cualquier puerto MIDI usando /dev/sequencer y /dev/music.
  Esta opcin tambin afecta a los dispositvos compatibles con el MPU401
  y/o General MIDI.

             FM synthesizer (YM3812/OPL-3) support Y/n/?

  Contesta "y" (s) aqu.

            /dev/sequencer support Y/n/?

  Contestar "n" (no) desactiva /dev/sequencer y /dev/music.

       Do you want support for the mixer of SG NX Pro ?

  Contesta "y" (s) si tienes una tarjeta Sound Galaxy NX Pro y quieres
  soporte para sus funciones extras.

            Do you want support for the MV Jazz16 (ProSonic etc.) ?

  Contesta "y" (s) si tienes una tarjeta MV Jazz16.

            Do you have a Logitech SoundMan Games Y/n/?

  Contesta "y" (s) si tienes una tarjeta Logitech SoundMan Games.

  Despus de las preguntas anteriores, el programa de configuracin
  pregunta por la informacin especfica de la tarjeta. Generalmente es
  ajustar la direccin I/O, IRQ y el DMA. Con algunas tarjetas el
  programa pregunta por los ficheros que van a ser usados durante la
  inicializacin de la tarjeta. Son las tarjetas que tienen un chip o un
  microprocesador DSP el cual debe ser inicializado bajando un programa
  (microcdigo) a la tarjeta. En algunos casos este fichero es escrito a
  un fichero de cabecera .h por el programa de configuracin y ya es
  incluido en el driver durante la compilacin. Lee de nuevo la
  informacin concerniente a tu tarjeta en el fichero Readme.cards.

  Por ltimo sers preguntado:

            The sound driver is now configured.
            Save copy of this configuration to /etc/soundconf [Y/n/?]

  Normalmente debes contestar "y" (s) por si ms tarde necesitas recom
  pilar el ncleo, y as ya tienes la opcin de usar la misma configu
  racin del driver de sonido.

  Si ests actualizando un driver anterior de sonido, asegrate de que
  los ficheros /usr/include/sys/soundcard.h y
  /usr/include/sys/ultrasound.h tienen enlaces simblicos a los ficheros
  correspondientes en /usr/include/linux o que simplemente contiene las
  lneas #include <linux/soundcard.h> y #include <linux/ultrasound.h>,
  respectivamente.

  Ahora ests preparado para compilar e instalar el nuevo ncleo.

  4.3.  Creando los ficheros de dispositivo.

  La primera vez que el driver de sonido del ncleo es configurado
  necesitas crear los ficheros del dispositivo del sonido. La forma ms
  fcil de hacer esto es cortar el script que viene al final del fichero
  Readme.linux en el directorio /usr/src/linux/drivers/sound y
  ejercutarlo como root.

  Si tus entradas de dispositivo ya existen, debes asegurarte que son
  correctas.  Si no lo son o si no estas seguro, ejecuta el anterior
  script y el reemplazar las entradas existentes por las correctas.

  Algunas distribuciones antiguas de Linux incorporaban scripts que
  creaban ficheros de dispositivo incorrectos. Debes tener el script
  /dev/MAKEDEV para crear los ficheros de dispositivo. Usando el script
  includo con el driver de sonido del ncleo es lo mejor ya que siempre
  estar actualizado con los ltimos dispositivos de sonido soportado.

  Despus de ejecutar el script los ficheros de dispositivo de sonido
  deben parecerse a lo siguiente:

       lrwxrwxrwx   1 root        11 Aug 22 00:01 audio -> /dev/audio0
       crw-rw-rw-   1 root   14,   4 Aug 22 00:01 audio0
       crw-rw-rw-   1 root   14,  20 Aug 22 00:01 audio1
       lrwxrwxrwx   1 root         9 Aug 22 00:01 dsp -> /dev/dsp0
       crw-rw-rw-   1 root   14,   3 Aug 22 00:01 dsp0
       crw-rw-rw-   1 root   14,  19 Aug 22 00:01 dsp1
       crw-rw-rw-   1 root   14,   2 Aug 22 00:01 midi00
       crw-rw-rw-   1 root   14,  18 Aug 22 00:01 midi01
       crw-rw-rw-   1 root   14,  34 Aug 22 00:01 midi02
       crw-rw-rw-   1 root   14,  50 Aug 22 00:01 midi03
       crw-rw-rw-   1 root   14,   0 Aug 22 00:01 mixer
       crw-rw-rw-   1 root   14,  16 Aug 22 00:01 mixer1
       crw-rw-rw-   1 root   14,   8 Aug 22 00:01 music
       crw-rw-rw-   1 root   14,  17 Aug 22 00:01 patmgr0
       crw-rw-rw-   1 root   14,  33 Aug 22 00:01 patmgr1
       crw-rw-rw-   1 root   14,   1 Aug 22 00:01 sequencer
       lrwxrwxrwx   1 root        10 Aug 22 00:01 sequencer2 -> /dev/music
       crw-rw-rw-   1 root   14,   6 Aug 22 00:01 sndstat

  Presta particular atencin a los nombres de dispositivo y al mayor y
  menor nmero de dispositivo listado en la cuarta y quinta columnas.

  Si estas usando el driver del altavoz del PC, lee la documentacin que
  lee con el paquete para determinar qu ficheros de dispositivo crear.

  Normalmente la configuracin que usantes cuando construirte el ncleo
  ser vlida para el driver de la tarjeta de sonido. Tambin es posible
  pasar parmetros al ncleo en la lnea de comandos (por ejemplo desde
  LILO) para configurar el driver de sonido. Esto est definido en el
  fichero Readme.linux.  Raras veces ser necesario usarlo. La principal
  razn de esto es para que los desarrolladores de discos de arranque de
  linux puedan crear un ncleo que soporte varias tarjetas de sonido.

  4.4.  Inicializando Linux y comprobando la instalacin.

  Ahora debes estar preparado para inicializar el ncleo y comprobar los
  drivers de sonido. Sigue el procedimiento habitual para instalar y
  reinicializar el nuevo ncleo (por supuesto ten a mano el anterior
  ncleo por si hay problemas)

  Durante la inicializacin, comprueba un mensaje como el siguiente
  cuando emerja el texto (si las lneas aparecen muy rpido y no las
  puedes leer, utiliza el comando dmesg):

     snd2 <SoundBlaster Pro 3.2> at 0x220 irq 5 drq 1
     snd1 <Yamaha OPL-3 FM> at 0x388 irq 0 drq 0

  ste debe coincidir con el tipo de tu tarjeta de sonido y con los
  parmetros que ella tenga (si es que tiene alguno).

  El driver tambin puede visualizar mensajes de error y advertencias
  durante el inicio. Estate atento para ver alguno cuando inicies por
  primera vez despus de haber configurado el driver de sonido.

  Lo siguiente que debes comprobar es el fichero de dispositivo
  /dev/sndstat.  Si lees el estado del driver de sonido del fichero de
  dispositivo te proporcionar informacin adicional sobre si el driver
  de la tarjeta de sonido a sido inicializado correctamente. Un ejemplo
  de salida puede ser este:

          % cat /dev/sndstat
          Sound Driver:3.5.2-960330 (Tue  4 16:31:10 EDT 1996 root,
          Linux fizzbin 2.0.0 #1 Mon Jun 3 16:59:37 EDT 1996 i386)
          Kernel: Linux fizzbin 2.0.0 #1 Tue Jun 4 16:57:55 EDT 1996 i386
          Config options: a80002

          Installed drivers:
          Type 1: OPL-2/OPL-3 FM
          Type 2: SoundBlaster
          Type 6: SoundBlaster 16bit
          Type 7: SB MPU

          Card config:
          SoundBlaster at 0x220 irq 5 drq 1,5
          OPL-2/OPL-3 FM at 0x388 irq 0 drq 0

          Audio devices:
          0: SoundBlaster Pro 3.2

     Synth devices:
     0: Yamaha OPL-3

          Midi devices:
          0: SoundBlaster

          Timers:
          0: System clock

          Mixers:
          0: SoundBlaster

  Ahora debes estar preparado para reproducir un fichero de sonido. Coge
  un fichero de ejemplo y envalo al dispositivo de sonido para
  comprobar la salida de sonido. Por ejemplo:

          % cat endoftheworld >/dev/dsp
          % cat crash.au >/dev/audio

  (Asegrate de que no te olvidas el ">")

  Algunos ficheros de sonido se pueden obtener de: ftp://tsx-11.mit.edu

  Ahora puedes comprobar la grabacin de sonido. Si tienes capacidad de
  entrada de sonido, puedes hacer un test rpido con el siguiente
  comando.

       # record 4 seconds of audio from microphone
       EDT% dd bs=8k count=4 < /dev/audio > sample.au
       4+0 records in
       4+0 records out
       # play back sound
       % cat sample.au > /dev/audio

  Obviamente para que esto funcione necesitas un micrfono conectado a
  la tarjeta de sonido. Tambin necesitas un programa mezclador (mixer)
  para seleccionar al micrfono como dispositivo de entrada y ajustar el
  nivel de grabacin.

  Si pasas el test, puedes pensar razonablemente que el hardware y el
  software D/A y A/D funciona. Si tienes problemas, mira la siguiente
  seccin de este documento.

  4.5.  Resolucin de problemas.

  Si todava tienes problemas despus de seguir las instrucciones del
  HOWTO, aqu hay algunas cosas que debes comprobar. Las comprobaciones
  estn listadas en orden ascendente de complejidad. Si una comprobacin
  falla, resuelve el problema antes de pasar al siguiente punto.

  4.5.1.  Punto 1: asegrate de que realmente ests ejecutando el ncleo
  compilado.

  Puedes comprobar la fecha del ncleo para ver si ests ejecutando el
  que has compilado con el soporte de sonido. Puedes hacer esto con el
  comando uname

          % uname -a
          Linux fizzbin 2.0.0 #1 Tue Jun 4 16:57:55 EDT 1996 i386

  o bien visualizando el fichero /proc/version:

          % cat /proc/version
          Linux version 2.0.0 (root@fizzbin) (gcc version 2.7.0) #1 Tue Jun 4 16:57:55 EDT 1996

  Si la fecha no corresponde con la que era cuando compilaste el ncleo,
  entonces estas ejecutando el anterior ncleo. Reinicializaste? Si
  usas el LILO, lo reinstalaste? (ejecuta /etc/lilo/install). Si
  inicias desde disquete, creaste un nuevo disco de inicio antes de
  iniciar la sesin?.

  4.5.2.  Punto 2: asegrate de que los drivers de sonido del ncleo
  estn compilados en l.

  Puedes ver qu drivers estn compilados mirando el /proc/devices:

     % cat /proc/devices
     Character devices:
      1 mem
      4 tty
      5 cua
      6 lp
     14 sound
     15 Joystick

          Block devices:
           2 fd
           3 hd
          25 sbpcd

  Lo que estamos buscando es el dispositivo 14, llamado sound. Si el
  dispositivo de sonido no es listado entonces algo se hizo mal en la
  configuracin del ncleo o en su construccin. Comienza el proceso de
  instalacin comenzando otra vez la configuracin y construyendo el
  ncleo.

  4.5.3.  Punto 3: Detect el ncleo tu tarjeta de sonido durante la
  inicializacin?

  Asegrate de que la tarjeta de sonido fue detectada cuando
  inicializaste.  Deberas haber visto un mensaje. Si el mensaje
  apareci fuera de pantalla, puedes revisarlo usando el comando dmesg

  % dmesg

  o

  % tail /var/adm/messages

  Si tu tarjeta de sonido no fue encontrada entonces algo est mal.
  Asegrate de que est bien instalada. Si la tarjeta de sonido funciona
  bajo DOS entonces puedes asegurar de que no es debido al hardware por
  lo que seguramente el problema est en la configuracin del ncleo.
  Quiz configuraste tu tarjeta con un tipo equivocado o con parmetros
  equivocados, o quizs tu tarjeta no es compatible con los drivers de
  tarjeta de sonido del ncleo de Linux.

  Una posibilidad es que tu tarjeta sea una del tipo "compatible" que
  requiere inicializacin por el driver del DOS. Intenta iniciar una
  sesin de DOS y cargar el driver suministrado por el vendedor de la
  tarjeta de sonido.  Despus inicia una sesin de linux pulsando
  control-alt-delete. Asegrate de que la direccin I/O, el DMA y el IRQ
  para Linux son los mismos que los usados bajo DOS. Lee el fichero
  Readme.cards para configurar tu tipo de tarjeta.

  Si t tarjeta de sonido no est listada en este documento, es posible
  que los drivers de Linux no la soporten. Como ayuda, comprueba las
  referencias listadas al final de este documento.

  4.5.4.  Punto 4: Puedes leer datos desde el dispositivo dsp ?

  Intenta leer desde el dispositivo /dev/audio usando el comando dd
  listado anteriormente en este documento. El comando se debe ejecutar
  sin errores.

  Si esto no va bien, es posible que la causa sea el fichero del
  dispositivo.  Asegrate que los ficheros de dispositivo del directorio
  /dev tienen los nmeros mayor y menor listados anteriormente.
  Comprueba que los permisos del fichero de dispositivo permiten lectura
  y escritura.

  Una posibilidad remota es que sea problema del hardware. Intenta
  comprobar el driver bajo DOS, si es posible, para determinar si sta
  puede ser la causa.

  4.5.5.  Punto 5: Cuando todo falla...  :-(

  Si todava tienes problemas, te sugerimos que intentes las siguientes
  cosas:

    Relee este documento cuidadosamente.

    Lee las referencias listadas al final de este documento,
     especialmente las concernientes a los ficheros Readme del cdigo
     fuente del ncleo.

    Enva tu pregunta al grupo de noticias comp.os.linux o a cualquier
     otro.

    Enva tu pregunta al canal de sonido (Sound) de la lista de correo
     de Linux.

    Intenta usar el ltimo ncleo Linux.

    Contacta con el vendedor de tu ordenador.

    Contacta con el fabricante de la tarjeta de sonido.

    Escribe al autor del driver de sonido.

    Escribe al autor del Sound HOWTO.

    Ejecuta emacs y pulsa Esc-x doctor.

  5.  Aplicaciones de soporte de sonido.

  Aqu doy un ejemplo de tipos de aplicaciones que te gustara tener si
  tienes una tarjeta de sonido bajo Linux. Comprueba el Mapa de Software
  de Linux (Linux Software Map), sites de archivos en Internet, y/o
  ficheros en tu CD-ROM de Linux para informacin mas actualizada.

  Como mnimo, a ti te gustara obtener las siguientes aplicaciones de
  sonido:

    Utilidad de conversin a formato de fichero de audio (por ejemplo
     Sox).

    Utilidad de mezcla (por ejemplo aumix o xmix).

    Reproductor/grabador de ficheros digitalizados (por ejemplo play o
     wavplay).
    Reproductor de ficheros MOD (por ejemplo tracker).

    Reproductor de ficheros MIDI (por ejemplo mp).

  Tambin hay versiones de texto y versiones GUI de esas herramientas.
  Tambin hay aplicaciones ms esotricas que quizs te gustara probar
  (por ejemplo speech para reconocimiento y sntesis).

  6.  6. FAQ.

  Esta seccin contesta algunas de las preguntas que mas comnmente han
  aparecido en los grupos de noticias Usenet y en las listas de correo.

  6.1.  Cules son los ficheros de dispositivo de sonido?

  stos son los nombres de ficheros de dispositivo "estndar", aunque
  algunas distribuciones de Linux utilizan nombres ligeramente
  diferentes.

  /dev/audio normalmente un enlace a /dev/audio0

  /dev/audio0 Dispositivo de audio compatible con las estaciones de
  trabajo Sun (solamente una implementacin parcial, ya que no soporta
  el interfase ioctl)

  /dev/audio1 Segundo dispositivo de audio (si es soportado por la
  tarjeta)

  /dev/dsp Normalmente un enlace a /dev/dsp0

  /dev/dsp0 Primer dispositivo de rastreo digital

  /dev/dsp1 Segundo dispositivo de rastreo digital

  /dev/mixer Mezclador de sonido

  /dev/mixer1 Segundo mezclador de sonido

  /dev/music Interfase del secuenciador de alto nivel

  /dev/patmgr0 Manager de parches

  /dev/patmgr1 Manager de parches

  /dev/sequencer Acceso a bajo nivel MIDI, FM, y GUS

  /dev/sequencer2 Normalmente un enlace a /dev/music

  /dev/midi00 Primer puerto "crudo" MIDI

  /dev/midi01 Segundo puerto "crudo" MIDI

  /dev/midi02 Tercer puerto "crudo"  MIDI

  /dev/midi03 Cuarto puerto "crudo" MIDI

  /dev/sndstat Visualiza el estado del driver de sonido cuando es ledo

  El driver del altavoz del PC incorpora los siguientes dispositivos:

  /dev/pcaudio equivalente a /dev/audio

  /dev/pcsp equivalente a /dev/dsp

  /dev/pcmixer equivalente a /dev/mixer

  6.2.  Cmo puedo reproducir una muestra de sonido?

  Los ficheros de sonido de las estaciones de trabajo Sun (.au) pueden
  ser reproducidos envindoles al dispositivo /dev/audio. Las muestras
  pueden ser enviadas al /dev/dsp. Es preferible usar un programa como
  por ejemplo play, el cual reconocer la mayora de los tipos de
  ficheros y pasar a la tarjeta de sonido la correcta frecuencia de
  muestreo, etc.

  6.3.  Cmo puedo grabar una muestra?

  Leer /dev/audio o /dev/dsp devolver un muestreo de datos que puede
  ser redireccionado a un fichero. Un programa como el vrec har ms
  fcil el controlar la frecuencia de muestreo, la duracin, etc.
  Tambin necesitas un programa muestrador para seleccionar el
  dispositivo de entrada adecuado.

  6.4.  Puedo tener ms de una tarjeta de sonido?

  Se soportan hasta dos tarjetas. Es posible instalar una Gravis
  UltraSound o una MPU-401 con una SoundBlaster, SoundBlaster Pro,
  SoundBlaster16 o ProAudioSpectrum16. No es posible tener una
  ProAudioSpectrum16 y SoundBlaster a la vez (la PAS16 tiene un emulador
  SB en ella). Tampoco es posible tener ms de una tarjeta del mismo
  tipo a la vez (por ejemplo la combinacin  GUS + GUS no es posible.

  Puedes cambiar los parmetros de configuracin de la tarjeta de sonido
  al inicializar usando las opciones de la lnea de comandos desde el
  cargador de inicio como el LILO. Lee el fichero Readme.linux para ms
  detalles.

  6.5.  Error: No such file or directory for sound devices

  Necesitas crear los ficheros de dispositivo del driver de sonido. Mira
  la seccin sobre creacin de ficheros de dispositivo. Si tienes que
  hacer los ficheros de dispositivo, asegrate de que tienen los nmeros
  de dispositivo mayor y menor correcto (algunas distribuciones antiguas
  en CD-ROM de Linux no crean los ficheros de dispositivo correctos
  durante la instalacin).

  6.6.  Error: No such device for sound devices

  No has inicializado con un ncleo que contiene el driver de sonido o
  la direccin de I/O de la configuracin no corresponde con tu
  hardware. Comprueba que ests ejecutando el nuevo ncleo compilado y
  verifica que las opciones introducidas en la configuracin del driver
  de sonido corresponden con las opciones del hardware.

  6.7.  Error: No space left on device for sound devices

  Esto puede ocurrir si intentas grabar datos a /dev/audio o /dev/dsp
  sin haber creado los ficheros de dispositivo necesarios. El
  dispositivo de sonido ahora es un fichero normal y ocupa tu particin
  de disco. Necesitas ejecutar el script descrito en la seccin sobre
  creacin de ficheros de dispositivo de este documento.

  6.8.  Error: device busy for sound devices

  Solamente un proceso puede ser abierto en un dispositivo de sonido a
  la vez. A la mayora nos gusta saber si otro proceso est usando el
  dispositivo en cuestin. Una forma de averiguar sto es usar el
  comando fuser:

  % fuser -v /dev/dsp /dev/dsp:             USER       PID ACCESS
  COMMAND tranter    265 f....  tracker

  En el ejemplo de arriba, el comando fuser muestra que el proceso 265
  tiene el dispositivo abierto. Esperar que el proceso se complete o
  matarlo permitir que el dispositivo de sonido pueda ser accedido una
  vez ms.

  6.9.  Todava tengo errores de dispositivo ocupado (device busy)!

  De acuerdo con Brian Gough, para las tarjetas SoundBlaster que usan el
  canal DMA 1 hay un conflicto en potencia con el driver de la cinta
  QIC-02, la cual tambin usa el DMA 1, causando los errores "device
  busy". Si ests usando FTAPE, debes tener este driver activado. De
  acuerdo con el FTAPE-HOWTO el driver QIC-02 no es esencial para el uso
  de FTAPE; solamente el driver QIC-117 es necesario. Reconfigurar el
  ncleo para usar el QIC-117 en vez del QIC-02 permite coexistir a
  FTAPE y al driver de sonido.

  (la siguiente explicacin fue aportada por Harald Albrecht
   albrecht@igpm.rwth-aachen.de)

  Algunos soportes de tarjetas de sonido usan el canal DMA 0. El
  programa de configuracin del driver de sonido permite esto, y el
  ncleo compila correctamente, pero el acceso al dispositivo de sonido
  nos devuelve un mensaje de error "device busy" (dispositivo ocupado).

  La razn es que el ncleo de Linux reserva el canal DMA 0 para el
  refresco de la DRAM. Esto no es del todo verdad para las placas
  modernas 386/486 las cuales usan su propia lgica de refresco. Lo
  puedes corregir cambiando esta lnea en el fichero
  /usr/src/linux/kernel/dma.c:

          static volatile unsigned int dma_chan_busy[MAX_DMA_CHANNELS] = {
                          1, 0, 0, 0, 1, 0, 0, 0
          };

  Reemplaza el primer 1 con un 0; esto activa el canal DMA 0. No hagas
  lo mismo con el canal DMA 4. El cdigo debe parecerse a sto:

          static volatile unsigned int dma_chan_busy[MAX_DMA_CHANNELS] = {
                          0, 0, 0, 0, 1, 0, 0, 0
          };

  Recompila y reinicia con el nuevo ncleo.

  6.10.  Reproduccin parcial de un fichero de sonido digitalizado.

  El sntoma generalmente es que una muestra de sonido se reproduce
  durante un segundo y despus se para completamente o devuelve un
  mensaje de error como "missing IRQ" o "DMA timeout". La mayora de las
  veces significa que tienes los parmetros del IRQ o del canal DMA
  incorrectos.  Verifica que la configuracin del ncleo corresponde con
  los puentes de la tarjeta de sonido y que no entran en conflicto con
  otro dispositivo.

  Otro sntoma es que la muestra de sonido se "repite". Esto es
  generalmente causado por un conflicto IRQ.

  6.11.  Hay pausas cuando reproduzco ficheros MOD.

  Reproducir ficheros MOD requiere gran capacidad de la CPU. Si tienes
  algunos procesos ms ejecutndose en tu ordenador, el reproducir en
  tiempo real ser muy lento. Tus opciones son:

    Intenta reproducir con una menor frecuencia de muestreo o en modo
     mono.

    Elimina otros procesos.

    Compra un ordenador ms rpido.

    Compra una tarjeta de sonido ms potente (por ejemplo, Gravis
     Ultrasound).

  Si tienes una tarjeta Gravis Ultrasound, debes usar uno de los
  reproductores de ficheros MOD escritos especficamente para la GUS
  (por ejemplo gmod).

  6.12.  Tengo errores de compilacin al compilar aplicaciones de
  sonido.

  La versin 1.0c y el driver de sonido anterior usaban un esquema
  ioctl() diferente e incompatible. Obtn un cdigo fuente ms moderno o
  haz los cambios necesarios para adaptarlo al nuevo driver de sonido.
  Mira el fichero del driver de sonido Readme para ms detalles.

  Asegrate tambin de que has usado la ltima versin del soundcard.h y
  ultrasound.h cuando compiles la aplicacin. Lee las instrucciones de
  instalacin del principio de este texto.

  6.13.  Tengo SEGV al ejecutar ficheros binarios que antes funcionaban.

  Este es probablemente el mismo problema que el descrito en la anterior
  cuestin.

  6.14.  Qu errores conocidos o limitaciones hay en el driver de
  sonido?

  Lee los ficheros Readme y CHANGELOG incluidos con el fuente del driver
  de sonido del ncleo.

  6.15.  Qu significan todas las opciones de configuracin del driver
  de sonido?

  Durante la configuracin del driver de sonido, un programa de
  configuracin es compilado y ejecutado. Este programa te hace algunas
  preguntas y despus genera el fichero cabecera local.h que define la
  configuracin de la tarjeta de sonido.

  El fichero de configuracin define (o "undefine") lo siguientes
  smbolos:

       Smbolo                 Significado
       ======                  ===========
       KERNEL_SOUNDCARD        activa/desactiva el driver de sonido
       EXCLUDE_PAS             soporte de ProAudioSpectrum
       EXCLUDE_SB              soporte de SoundBlaster
       EXCLUDE_ADLIB           soporte de AdLib
       EXCLUDE_GUS             soporte de Gravis UltraSound
       EXCLUDE_MPU401          soporte del interfase MPU-401 MIDI
       EXCLUDE_UART6850        soporte de la UART 6850 MIDI
       EXCLUDE_PSS             soporte de Professional Sound System
       EXCLUDE_GUS16           soporte de Gravis UltraSound
       EXCLUDE_GUSMAX          soporte de Gravis UltraSound Max
       EXCLUDE_MSS             soporte de Microsoft Sound System
       EXCLUDE_SBPRO           soporte de SoundBlaster Pro
       EXCLUDE_SB16            soporte SoundBlaster 16
       EXCLUDE_AUDIO           soporte de voz digitaliza
       EXCLUDE_MIDI            soporte de interfase MIDI
       EXCLUDE_YM3812          soporte de sintetizador FM (YM3812/OPL-3)
       EXCLUDE_SEQUENCER       soporte del secuenciador MIDI
       EXCLUDE_PRO_MIDI        soporte de SoundBlaster Pro MIDI
       EXCLUDE_CHIP_MIDI       soporte de MIDI on CHIP
       SBC_BASE 0x220          direccin base de I/O de la SoundBlaster
       SBC_IRQ                 nmero de IRQ de la SoundBlaster
       SBC_DMA                 canal DMA de la SoundBlaster
       SB16_DMA                canal DMA de la SoundBlaster 16
       SB16_MIDI_BASE          direccin base del puerto MIDI de la SoundBlaster 16
       PAS_IRQ                 nmero de IRQ de la ProAudioSpectrum
       PAS_DMA                 canal DMS de la ProAudioSpectrum
       GUS_IRQ                 nmero IRQ de la Gravis UltraSound
       GUS_DMA                 canal DMA de la Gravis UltraSound DMA
       GUS_BASE                direccin base de la Gravis UltraSound
       MPU_IRQ                 nmero IRQ del MPU-401
       MPU_BASE                direccin base del puerto del MPU-401
       DSP_BUFFSIZE            tamao del buffer del DMA

  Tambin se definen otras cosas, como por ejemplo nivel de revisin del
  driver de sonido y el da y la hora en que la configuracin fue hecha.

  Hay otros parmetros que no son seleccionados por el programa de
  configuracin. Si necesitas cambiarlos, edita el fichero
  sound_config.h.

  Para desactivar el driver de sonido, ejecuta make config y contesta no
  a la pregunta "Sound card support?".

  6.16.  Dnde estn documentados los ioctls()  del driver de sonido?

  Estn parcialmente documentados en la Hacker's Guide to VoxWare,
  actualmente disponible en formato borrador. La ltima versin es el
  borrador 2, y se puede encontrar en ftp://nic.funet.fi.  Nota que es
  un directorio oculto y que no saldr en el listado de directorios. Si
  t "cd" al directorio y usas el "dir" del FTP, los ficheros estarn
  ah.

  6.17.  Cales son los recursos de la CPU necesarios para repro
  ducir/grabar sin pausas?

  No hay una respuesta fcil para esta pregunta, ya que depende de:

    Si ests usando muestreo PCM o sntesis FM.

    Frecuencia de muestreo y tamao de muestreo.

    Qu aplicacin ests usando para reproducir o grabar.

    Hardware de la tarjeta de sonido.

    Frecuencia de I/O del disco, velocidad del reloj de la CPU, tamao
     del cach, etc.

  En general, las mquinas 386 deberan reproducir muestras o msica
  sintetizada FM en una tarjeta de sonido de 8 bits sin problemas.

  Reproducir ficheros MOD, necesita muchos recursos de la CPU. Algunas
  medidas experimentales han mostrado que reproducir a 44kHz necesita
  ms del 40% de la velocidad de un 486/50 y un 386/25 ha penas puede
  reproducir rpidamente ms de 22kHz (con una tarjeta de 8 bits como la
  SoundBlaster). Una tarjeta como la Gravis UltraSound ejecuta ms
  funciones en el hardware y requerir menos recursos de la CPU.

  Todo esto supone que el ordenador no est ejecutando otras tareas
  intensivas en la CPU.

  Convertir ficheros de sonido y aadir efectos usando una utilidad como
  Sox es mucho ms rpido si tienes un coprocesador matemtico. El
  driver del ncleo por si mismo no hace clculos en punto flotante.

  6.18.  Problemas con una PAS16 y un adaptador host Adaptec 1542 SCSI.

  (La siguiente explicacin fue dada por seeker@indirect.com)

  Linux solamente reconoce el 1542 en la direccin 330 (por defecto) o
  en la 334 y la PAS solamente permite la emulacin MPU-401 en la 330.
  Aunque desactives el MPU-401 bajo software, algo todava entra en
  conflicto con el 1542 si l est con su direccin por defecto. Mover
  el 1542 a la direccin 334 hace feliz a todos.

  Adems, tanto el 1542 como la PAS16 hacen DMA de 16 bits, por lo que
  si haces una muestra a 16 bits 44kHz y en estreo y salvas el fichero
  a un dispositivo SCSI cuelgas el 1542, por lo que tienes un problema.
  El DMA traslapa y no hay suficiente tiempo para refrescar la RAM, por
  lo que obtienes el mensaje "PARITY ERROR-SYSTEM HALTED", sin ningn
  motivo que lo cause. Hay algo peor porque los vendedores de unidades
  de cinta QIC-117 recomiendan cambiar el bus en on/off las veces que el
  1542 sea ms largo de lo normal. Consigue el programa SCSISEL.EXE de
  la BBS de Adaptec o de cualquier otro lugar de Internet, y reduce el
  tiempo del bus en on o incrementa el tiempo del bus en off hasta que
  el problema se solucione. SCSISEL cambia los parmetros de la EEPROM,
  por lo que es ms duradero que un parche en el driver del DOS desde
  una lnea del CONFIG.SYS, y funcionar si inicias bien en Linux (en
  vez del parche en el DOS)

  El ltimo problema: los viejos juegos de chip Symphony reducen
  drsticamente el tiempo de los ciclos de I/O para aumentar los accesos
  al bus. Ninguna de las tablas que yo he probado han ningn problema
  con el tiempo de reduccin excepto la PAS16. La BBS de Media Vision
  tiene el fichero SYMPFIX.EXE el cual se supone que soluciona el
  problema aadiendo un bit de diagnstico en el controlador del bus del
  Symphony, pero no da muchas garantas. Lo que t necesitas es:

    Dile al ditribuidor de la placa madre que reemplace el chip con el
     bus de la antigua versin.

    Reemplaza la placa madre, o

    compra otra tarjeta de sonido de marca diferente.

  Young Microsystems actualizar las placas que importan por 30$ (US);
  otros vendedores harn lo mismo si puedes probar quin hizo o import
  la placa madre (buena suerte). El problema est en el chip del
  interfase del bus de ProAudio, que yo sepa. Nadie compra una tarjeta
  de 120$ y la conecta a un AT de 6MHz. La mayora lo har en un 386/486
  a 25-40MHz, y seguramente podr manipular al menos frecuencias de bus
  de 12MHz si los chips estn bien diseados.

  El primer problema depende del juego de chips usados en tu placa
  madre, de la velocidad del bus y de otros parmetros de la BIOS, y de
  la fase de la luna.  El segundo problema depende del parmetro de la
  opcin de refresco (oculto o sincronizado), de la frecuencia de DMA
  del 1542 y (posiblemente) de la frecuencia de I/O (entrada/salida) del
  bus.  El tercero se puede determinar llamando a Media Vision y
  preguntndoles qu chip de Symphony es incompatible con su lento
  diseo. Atento: 3 de 4 tcnicos con los que habl tenan el cerebro
  daado. Asist atnito a todo lo que hablaron acerca del hardware de
  los dems, ya que ellos no parece que conozcan el suyo muy bien.

  6.19.  Problemas con el sintetizador FM de una SoundBlaster Pro 1.

  La nueva SoundBlaster Pro tiene un chip OPL-3, pero la antigua versin
  1 usaba el OPL-2. El driver de sonido asume la presencia de un OPL-3.
  La versin 2.5 y posteriores del driver de sonido corrigen este
  problema.

  6.20.  Es posible leer y escribir muestras simultneamente?

  Debido a limitaciones del hardware, esto no es posible con la mayora
  de las tarjetas de sonido. Algunas tarjetas nuevas lo soportan. Mira
  la seccin de "modo bidireccional" en la Hacker's Guide To VoxWare
  para ms informacin.

  6.21.  Mi SB16 est puesta con un IRQ 2, pero la configuracin no me
  deja usar este valor.

  En los ltimos 286, la interrupcin IRQ 2 es asignada al segundo
  controlador de interrupciones. Es equivalente a IRQ 9.

  6.22.  Son soportadas la SoundBlaster AWE32 o la SoundBlaster16 ASP?

  Estas tarjetas traen chips especiales (ASP y Emu) que soportan
  caractersticas adicionales como sntesis de onda de tabla, aunque
  Creative Labs no colabora aportando informacin sobre su programacin.
  A menos que ellos cambien su poltica no puede haber soporte bajo
  Linux de este hardware especial. Las tarjetas son soportadas como
  tarjetas SoundBlaster 16 normales bajo Linux.

  La tarjeta Gravis Ultrasound tiene capacidades similares a la AW32, y
  es soportada bajo Linux. Las tarjetas basadas en otros DSPs como
  Dispositivos Analgicos ADSP-21xx sern soportados en el futuro.

  6.23.  Si estoy en Linux y despus inicio una sesin de DOS, tengo
  errores y/o las aplicaciones de sonido no funcionan correctamente.

  Esto ocurre despus de un reinicio suave hacia el DOS. Algunas veces
  el mensaje de error se refiere engaosamente a que est mal el fichero
  CONFIG.SYS.

  La mayora de las tarjetas de sonido tienen programable por software
  los parmetros del IRQ y del DMA. Si tu usas parmetros diferentes
  entre el Linux y el MS-DOS/Windows, esto causar problemas. Algunas
  tarjetas de sonido no aceptan nuevos parmetros sin una completa
  inicializacin (reset) (por ejemplo corta la corriente o pulsa el
  botn de reset).

  La solucin ms rpida para este problema es llevar a cabo un completo
  reinicio usando el botn de reset o cortando la energa despus de un
  reinicio suave (por ejemplo ctrl-alt-del).

  La solucin correcta es que usas los mismos parmetros IRQ y DMA con
  el MS-DOS y con el Linux (o no uses MS-DOS).

  6.24.  Problemas ejecutando DOOM bajo Linux.

  Para la correcta salida de sonido necesitas la versin 2.90 o
  posterior del driver de sonido. Tiene soporte para el "modo DOOM" en
  tiempo real.

  Las muestras de sonido son de 16 bits. Si t tienes una tarjeta de
  sonido de 16 bits puedes hacer que el sonido funcione usando uno de
  los muchos programas disponibles en ftp://sunsite.unc.edu

  Si la ejecucin del DOOM en tu sistema es pobre, desactiva el sonido
  (renombrando el fichero sndserver).

  Por defecto DOOM no soporta msica (como en la versin del DOS). El
  programa musserver aadir soporte para msica al DOOM bajo Linux. Lo
  puedes encontrar en ftp://pandora.st.hmc.edu

  6.25.  Cmo puedo reducir el ruido recogido por mi tarjeta de sonido?

  Usar cables con buen aislante y probar la tarjeta de sonido en
  diferentes slots te ayudar a reducir el ruido. Si la tarjeta de
  sonido tiene control de volumen puedes intentar diferentes posiciones
  (al mximo es probablemente lo mejor.

  Usar un programa mezclador te asegurar que las entradas no deseadas
  (por ejemplo el micrfono) estn puestas a cero.

  Algunas tarjetas de sonido simplemente no estn diseadas con buen
  aislante y con toma de tierra y son propensas a generar ruido.

  6.26.  Puedo reproducir sonido, pero no puedo grabar.

  Si tu puedes reproducir sonido pero no puedes grabar, sigue estos
  pasos:

    Usa un programa mezclador para elegir el dispositivo apropiado
     (como por ejemplo el micrfono).

    Usa el mezclador para seleccionar la ganancia de entrada al mximo.

    Si puedes, intenta probar la tarjeta de sonido grabando bajo MS-DOS
     para comprobar si es un problema de hardware.

  6.27.  Mi tarjeta de sonido "compatible" slo funciona si primero la
  inicializo bajo MS-DOS.

  Algunos clnicos de tarjeta de sonido no son verdaderamente 100%
  compatibles.  Algunas veces contienen circuitera extra como por
  ejemplo mezcladores. La puedes usar bajo Linux si primero la
  inicializas bajo MS-DOS y despus haces un inicio suave de Linux (por
  ejemplo Ctrl-alt-del).

  Un usuario me inform el obtena mejores resultados si l usaba
  LOADLIN en vez de LILO para inicializar Linux despus de inicializar
  su tarjeta de sonido bajo MS-DOS (esto era con una tarjeta de sonido
  Diamond).

  La verdadera solucin es obtener del fabricante cules son las
  diferencias y aadir soporte al driver de sonido. Esto ha sido hecho,
  por ejemplo, con la Sound Galaxy NX Pro.

  6.28.  Mi tarjeta de sonido "compatible" SoundBlaster 16-bit slo fun
  ciona en el modo 8-bit bajo Linux

  Las tarjetas de sonido de 16 bits descritas como compatibles
  SoundBlaster realmente slo son compatibles con la SoundBlaster Pro de
  8 bits. Generalmente tienen un modo de 16 bits que no es compatible
  con la SoundBlaster 16 y tampoco es compatible con el driver de sonido
  del Linux.

  Si t tarjeta est listada como compatible con el Microsoft Windows
  Sound System, puedes hacerla funcionar en el modo 16 bits si tienes
  activado el WSS en el driver de sonido del Linux. Probablemente
  tendrs que hacer tambin el truco de inicializarla bajo el DOS para
  que la tarjeta funcione.

  6.29.  Dnde puedo encontrar aplicaciones de sonido para Linux?

  Estos son unos buenos sites para buscar aplicaciones especficas de
  sonido para Linux:

    ftp://sunsite.unc.edu:/pub/Linux/kernel/sound/

    ftp://sunsite.unc.edu:/pub/Linux/apps/sound/

    ftp://tsx-11.mit.edu:/pub/linux/packages/sound/

    ftp://nic.funet.fi:/pub/OS/Linux/util/sound/

    ftp://nic.funet.fi:/pub/OS/Linux/xtra/snd-kit/

    ftp://nic.funet.fi:/pub/OS/Linux/ALPHA/sound/

  6.30.  Puede el driver de sonido ser compilado como mdulo cargable?

  Con los ltimos ncleos el driver de sonido es soportado como un
  mdulo cargable.

  Mira los ficheros /usr/src/linux/drivers/sound/Readme.modules y
  /usr/src/linux/Documentation/modules.txt (o /usr/src/linux/README)
  para ms detalles.

  6.31.  Puedo usar la tarjeta de sonido para sustituir el beep de la
  consola del sistema?

  Intenta el programa oplbeep en ftp://sunsite.unc.edu

  Una variante es el programa beep en ftp://sunsite.unc.edu

  El paquete modutils tiene un programa de ejemplo y un parche del
  ncleo que soporta llamadas a programas externos para generar los
  sonidos del ncleo.

  Alternativamente, algunas tarjetas se pueden conectar al altavoz del
  PC por lo que todos los sonidos van a los altavoces de la tarjeta.

  6.32.  Qu es VoxWare?

  Los drivers de sonido del ncleo soportan diferentes sistemas
  operativos basados en la arquitectura Intel y compatibles con Unix, y
  se pueden obtener como un paquete separado del ncleo del Linux. Hasta
  febrero del 96 el autor haba llamado al software "VoxWare".
  Desafortunadamente este nombre ha sido registrado por VoxWare
  Incorporate, y no puede ser usado. El 29 de marzo de 1996 Hannu
  Savolainen anunci que el nuevo nombre era Unix Sound System (USS).

  El Unix Sound System (USS) va a ser un driver del sonido del ncleo
  disponible comercialmente para varios sistemas Unix, vendido por
  4Front Technologies. Una versin libre, conocida como USS/Lite
  continuar siendo disponible con total libertad para los sistemas
  Linux.

  Para ms informacin mira la pgina Web de 4Front Technologies.
  http://www.4front-tech.com

  6.33.  Son soportadas las tarjetas de sonido Plug-and-Play?

  Linux todava no soporta Plug-and-Play (enchufar y funcionar), pero se
  est trabajando en ello. De un tiempo para ac algunos usuarios han
  obtenido xito quitando las opciones Plug-and-Play de su BIOS, o
  inicializando los dispositivos bajo Windows 95 antes de hacer un
  inicio suave de Linux.

  6.34.  Sox/Play/Vplay saca el mensaje "invalid block size 1024"

  Un cambio en el driver de sonido de la versin 1.3.67 rompa algunos
  programas de reproduccin de sonido el cual (incorrectamente)
  chequeaba que el resultado del ioctl SNDCTL_DSP_GETBLKSIZE era mayor
  que 4096. Debes tener una versin ms nueva del programa (si es
  posible) o arreglarlo t mismo. Para el programa Sox
  ftp://sunsite.unc.edu el siguiente parche funciona:

            --- sbdsp.c.orig        Thu Feb 22 22:46:00 1996
            +++ sbdsp.c     Thu Feb 22 22:51:18 1996
            @@ -176,7 +176,7 @@
                    }

                    ioctl (dspfd, SNDCTL_DSP_GETBLKSIZE, &abuf_size);
            -       if (abuf_size < 4096 || abuf_size > 65536) {
            +       if (abuf_size < 1) {
                            if (abuf_size == -1)
                            perror (dspname);
                            else

  6.35.  Por qu el driver de sonido tiene su propio programa de con
  figuracin?

  El driver de sonido soporta diferentes parmetros de configuracin. El
  programa de configuracin includo con el driver de sonido comprueba
  las dependencias entre los parmetros. Las herramientas usadas para
  configurar el ncleo no soportan este nivel de funcionabilidad.

  Los ncleos recientes 1.3.x opcionalmente permiten usar las
  herramientas de configuracin del ncleo estndar con el driver de
  sonido. Lee las notas en el fichero CHANGELOG para el driver de
  sonido. Esto es todava experimental y algunas opciones no pueden ser
  seleccionadas de esta forma.

  6.36.  Las opciones del mezclador son borradas cuando cargo el mdulo
  del driver de sonido!

  Puedes construir el driver de sonido como un mdulo cargable y usar
  kerneld para cargarlo y descargarlo automticamente. Esto puede
  presentar un problema: cuando el mdulo de recargado los parmetros
  del mezclador vuelven a sus valores por defecto. Para algunas tarjetas
  de sonido esto puede ser muy ruidoso (por ejemplo la SB16) o muy
  silencioso. Markus Gutschke gutschk@uni-muenster.de encontr esta
  solucin: usa una lnea en tu fichero /etc/conf.modules como la que
  sigue:

             options sound dma_buffsize=65536 && /usr/bin/setmixer igain 0 ogain 0 vol 75

  Esto har que t programa mezclador (en este caso setmixer) sea ejecu
  tado inmediatamente despus de que t driver de sonido es cargado. El
  parmetro dma_buffsize es slo un valor arbitrario necesario porque el
  comando de opcin requiere una opcin en la lnea de comando. Cambia
  la lnea segn como necesites corresponder tu programa mezclador y los
  parmetros de ganancia.

  Si t has compilado el driver de sonido dentro de tu ncleo y queres
  seleccionar que el mezclador gane cuando inicias, t puedes llamar a
  t programa mezclador en un fichero de inicio del sistema como por
  ejemplo /etc/rc.d/rc.local

  6.37.  Solamente el root puede grabar sonido.

  Por defecto el script que hay en el fichero Readme.linux que crea los
  ficheros de dispositivo de sonido slo permite que los dispositivos
  sean ledos por el root. Esto se hace para aumentar la seguridad. En
  un entorno de red, usuarios externos se pueden conectar de forma
  remota a un PC con Linux, y con tarjeta de sonido y micrfono, y te
  pueden escuchar a escondidas.  Si a ti no te preocupa eso, puedes
  cambiar los permisos usados en el script.

  7.  Referencias

  Si tienes una tarjeta de sonido que soporte un CD-ROM o un interfase
  SCSI, el Linux SCSI HOWTO y el Linux CD-ROM HOWTO tienen informacin
  adicional que puede serte muy til.

  Hannu Savolainen ha escrito una versin borrador de Hacker's Guide to
  VoxWare.  La ltima versin es el borrador 2, y puede ser encontrado
  en ftp://nic.funet.fi.

  Las siguientes FAQs son posteadas regularmente al grupo de noticias de
  Usenet news.announce y tambin son archivadas en ftp://rtfm.mit.edu:

    PCsoundcards/generic-faq (Generic PC Soundcard FAQ)

    PCsoundcards/soundcard-faq (comp.sys.ibm.pc.soundcard FAQ)

    PCsoundcards/gravis-ultrasound/faq (Gravis UltraSound FAQ)

    audio-fmts/part1 (Descripciones de formatos de ficheros de audio)

    audio-fmts/part2 (Descripciones de formatos de ficheros de audio)

  Las FAQs tambin aportan listas de correo para temas especficos y
  sites de archivos. Los siguientes grupos de noticias de Usenet tratan
  sobre temas de sonido y/o msica:

    alt.binaries.sounds.* (varios grupos para postear ficheros de
     sonido)

    alt.binaries.multimedia (para postear ficheros Multimedia)

    alt.sb.programmer (temas de programacin de la Soundblaster)

    comp.multimedia (temas Multimedia)

    comp.music (teora e investigacin de msica por computadora)

    comp.sys.ibm.pc.soundcard.* (varios grupos IBM PC de tarjetas de
     sonido)

  Una pgina Web dedicada a la multimedia puede ser encontrada en
  http://viswiz.gmd.de. Creative Labs tiene su pgina Web en
  http://www.creaf.com/. MediaTrix tiene su pgina Web en
  http://www.mediatrix.com/.

  Las listas de correo de Linux tienen un nmero de "canales" dedicados
  a diferentes temas, includo el sonido. Para saber cmo unirte, enva
  un mail con la palabra "help" como cuerpo del mensaje a
  majordomo@vger.rutgers.edu. (Nota: cuando escriba esto, estas listas
  de correo fueron sobrecargadas y se busc un reemplazo)

  Como mencion en varias anteriores ocasiones, el driver de sonido del
  ncleo incluye una serie de ficheros Readme que contienen informacin
  acerca del driver de la tarjeta de sonido. Generalmente se encuentran
  en el directorio /usr/src/linux/drivers/sound.

  Se puede contactar con el autor del driver de sonido del ncleo, Hannu
  Savolainen, en la direccin hannu@voxware.pp.fi. Tambin tiene una
  pgina Web en http://personal.eunet.fi/pp/voxware. Esta pgina es el
  mejor sitio para enterarse de las ltimas tarjetas de sonido
  soportadas, problemas y solucin de errores.

  El Mapa de Software de Linux (Linux Software Map (LSM)) es una
  referencia de gran valor para localizar software de Linux. Buscar
  palabras en el LSM como por ejemplo sonido es una buena forma de
  identificar aplicaciones referentes a hardware de sonido. El LSM se
  puede encontrar en varios FTP annimos, incluyendo
  ftp://sunsite.unc.edu/pub/Linux/docs/LSM.gz.

  El Linux Documentation Project ha producido varios libros de Linux,
  incluyendo Linux Installation and Getting Started (-- Disponible en
  castellano en http://www.infor.es/LuCAS--) . Estn disponibles
  libremente en la mayora de FTP annimos de archivos de Linux, o
  tambin pueden ser comprados en formato impreso.

  Por ltimo, una puntualizacin un poco sinvergenza: Si quieres
  aprender un poco ms sobre multimedia bajo Linux (especialmente
  programacin de aplicaciones para tarjetas de sonido y CD-ROM), compra
  mi nuevo libro Multimedia on Linux publicado por O'Reilly and
  Associates (http://www.ora.com/). Estar disponible a partir de
  Septiembre de 1996.

  8.  Acerca de la traduccin.

  Este documento ha sido traducido por Sergio Alonso Manzanedo
  sa.manzanedo@vll.servicom.es con la colaboracin de Laura Febrero
  Arias en cuanto a lo de teclear todo este monstruito.

               GRACIAS LAURA POR TECLEAR ESTO EN DOS TARDES!

  Espero que sirva de bastante a la comunidad Linux en castellano.

  Para cualquier aclaracin, correccin, duda o cualquier otra cosa, no
  dudes en contactar conmigo.  Apreciar tambin cualquier
  puntualizacin sobre las faltas de ortografa y las posibles erratas
  (adjuntar en el subject el nombre Laura).

  Nada ms.

  Saludos.   ;-)

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.
  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Spanish Linux HOWTO
  Gonzalo Garca Agullo, Gonzalo.Garcia-Agullo@jrc.es.
  v0.1, 20 Agosto de 1996

  Esta es la primersima edicin del Linux en Castellano COMO. La audi
  encia a la que va destinado este documento es la creciente familia de
  linuxeros espaoles y latinoamericanos, por lo que este COMO, por
  supuesto, est en castellano.  Algunos no-hispanohablantes han solici
  tado informacin sobre Linux en entorno castellano, bien sea para el
  desarrollo de software o su soporte en castellano, o simplemente para
  entrar en contacto con la comunidad linuxera Hispanohablante.  Sea
  cual sea su caso, bienvenido...
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Empecemos por el principio...

  1.2.    Qu es linux?

  1.3.    Cmo conseguirlo?

  1.4.    Socorro! Dnde estn los manuales?

  2.      Distribuciones

  3.      Ayuda a la instalacin de la distribucin Slackware

  3.1.    Instalacin con UMSDOS

  3.2.    Instalacin en particin nativa de Linux.

  3.2.1.  Preliminares

  3.2.2.  Formateo de la particin.

  3.2.3.  Instalacin de los discos.

  3.2.4.  Configuracin

  4.      Espaolizacin  de Linux

  4.1.    Consola

  4.2.    Shell bash

  4.3.    Shell tcsh

  4.4.    Algunas aplicaciones

  4.5.    Xwindow

  4.6.    Emulador de DOS (DOSEMU)

  4.7.    Correo electrnico

  5.      Conectividad de Linux

  5.1.    Conectividad casera

  5.2.    Servidor de terminales

  5.3.    Red PPP

  5.4.    Servidor de modems

  5.5.    Conexion directa a Internet

  5.6.    Infova: acceso a Internet desde casa

  5.6.1.  Qu es infova?

  5.6.2.  Como conectar entonces?

  6.      Direcciones tiles

  6.1.    Direcciones electrnicas

  6.1.1.  WWW

  6.1.2.  FTP Anonimo

  6.1.3.  Grupos de noticias

  6.1.4.  Listas de correo

  6.1.5.  En Fidonet

  6.2.    Direcciones de Firmas comerciales

  6.3.    Bibliografa.

  7.      Copyright

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  1.1.  Empecemos por el principio...

  Este documento pretende ser el punto de entrada de los
  hispanohablantes al mundo Linux, intentando abarcar tanto a los
  principiantes de este apasionante sistema como a los ya iniciados que
  buscan informacin puntual. Se tratarn de forma genrica todos los
  temas que puedan interesar al usuario de Linux, desarrollndolos en
  castellano o dando referencias a otras fuentes de informacin en
  nuestro idioma, as como orientacin cuando tenga que acudir a otras
  HOWTO y en general a cualquier documento en ingls.

  Se distribuye integrado con el Linux Documentation Project en todos
  los foros de informacin Linux en Internet. Se actualiza
  peridicamente, pudiendo encontrar la ltima versin en Linux/Espaa
  <http://www.cs.us.es/archive/linux.html>

  Notas del autor: Aunque puede ser interesante de por s, traducir sin
  ms informacin ya editada en ingls no es el objetivo de este
  documento, sino ms bien servir de base al usuario hispanohablante y
  divulgar el Linux en nuestro idioma. Una ambicin de quien escribe es,
  desde estas lneas, poner su grano de arena para coordinar los
  esfuerzos (valiosos pero muy diseminados por la red) de tanto Linuxero
  como ya hay. Otro objetivo menos pretencioso de este documento es
  complementar todas las demas Howto's en aquellos aspectos concretos
  que afecten a los usuarios hispanos (configuracin del sistema y de
  las aplicaciones para trabajar en nuestro idioma, teclados, correo
  electrnico en espaol, etc). Un tercer objetivo ser servir de agenda
  actualizada de direcciones espaolas dedicadas a Linux, tanto para
  difusin de las distribuciones originales de software Linux como de
  desarrollos propios en espaol que se vayan publicando. Vaya desde
  aqu mi agradecimiento en esta primera versin para Antonio L. Delgado
  <mailto:antonio-luis.delgado@cs.us.es>, compaero de la Facultad de
  Informtica de Sevilla, por prestarse a echar una mano redactando esta
  Howto en las calurosas tardes de Sevilla.

  Cualquier comentario, sugerencia para nuevos contenidos, rectificacin
  de errores, crtica, etc. es no slo bienvenido sino tambin esperado.
  Contacta por correo electrnico para todo lo que quieras.

  1.2.  Qu es linux?

  Linux es una implementacin del sistema operativo UNIX (uno ms de
  entre los numerosos clnicos del histrico Unix), pero con la
  originalidad de ser gratuito y a la vez muy potente, que sale muy bien
  parado (no pocas veces victorioso) al compararlo con las versiones
  comerciales para sistemas de mayor envergadura y por tanto
  tericamente superiores. Comenz como proyecto personal del -entonces
  estudiante- Linus Torvalds, quien tom como punto de partida otro
  viejo conocido, el Minix de Andy. S. Tanenbaum (profesor de sistemas
  operativos que cre su propio sistema operativo Unix en PCs XT para
  usarlo en su docencia). Actualmente Linus lo sigue desarrollando, pero
  a estas alturas el principal autor es la red Internet, desde donde una
  gigantesca familia de programadores y usuarios aportan diariamente su
  tiempo aumentando sus prestaciones y dando informacin y soporte
  tcnico mtuo.  La versin original -y aun predominante- comenz para
  PCs compatibles (Intel 386 y superiores), existiendo tambin en
  desarrollo versiones para prcticamente todo tipo de plataformas:
  PowerPC <http://www.cs.us.es/archive/linuxppc/>, Sparc
  <http://www.geog.ubc.ca/sparclinux.html>, Alpha
  <http://www.azstarnet.com/~axplinux>, Mips <http://www.fnet.fr/linux-
  mips/>, etc. De todas ellas la ms reciente en este momento es la
  versin para PowerMac <http://www.mklinux.org> (el PowerPC de Apple)
  basada en el microkernel Mach 3.0 y de la que ya hay una distribucin
  para desarrolladores avalada directamente por Apple y OSF pero
  conservando el espritu (gratuito, de libre distribucin, etc) de la
  version original. Un servidor la acaba de probar hace unos das y se
  ha llevado una grata sorpresa (an tendr muuuchos fallos, pero para
  ser una primersima versin y el poco tiempo que lleva en marcha, ha
  avanzado ms de lo que me esperaba).

  1.3.  Cmo conseguirlo?

  La primera fuente para conseguir el sistema Linux es la propia red
  Internet, y es donde estarn siempre las ltimas versiones y las
  aplicaciones ms actualizadas en muchos servidores de FTP annimo.
  Otra va muy frecuente, de inters para principiantes y para quienes
  no deseen o no puedan permitirse copiar tanta cantidad de informacin
  a traves de la red, es mediante las versiones comercializadas en
  CDROM. Hay empresas que se dedican a elaborar CDROMs de bajo coste con
  recopilaciones de software, manuales, etc. El corazn del sistema es
  el mismo, aunque pueden tener externamente presentaciones y formas
  distintas de instalacin. Hay revistas especializadas que tambin
  suelen incluir CDs con alguna versin de Linux. Hacia el final de este
  documento se relacionan diversas fuentes de Linux, tanto servidores
  pblicos en la red como direcciones de empresas que lo comercializan.

  Una ventaja (para muchos usuarios termina siendo un inconveniente) es
  la gran rapidez con la que se se desarrolla Linux. Constantemente
  llegan a los principales servidores Linux en la red actualizaciones
  del ncleo del sistema, de aplicaciones, utilidades, manuales y
  documentacin, etc. Es bueno estar al da, seguir con atencin su
  evolucin y aprovechar las mejoras que se incorporen, pero en la
  mayora de los casos no vale la pena estar reinstalando software por
  el simple hecho de ser una nueva versin, sino que hay que ser un poco
  selectivos, al menos con el software. En el caso de los manuales, How-
  To's, grupos de noticias y/o listas de correo s que vale la pena
  estar "a la ltima", sobre todo porque es all donde nos sacarn de
  apuros cuando agotemos nuestros propios recursos...

  1.4.  Socorro! Dnde estn los manuales?

  Como ocurre en todas las versiones de Unix, el primer sitio donde
  mirar cuando tenga una duda concreta sobre tal comando, fichero de
  configuracin, etc. es la orden 'man', que incluye la ayuda de
  referencia de Unix. Pero slo es til en ese mbito, cuando ya se sabe
  ms o menos lo se que busca, y slo se necesita aclarar dudas
  concretas. Para todo lo dems la mejor fuente de informacin es, cmo
  no, la propia red. En ella estn disponibles tanto libros completos
  (de los que algunas editoriales especializadas han publicado versiones
  en papel) como la coleccin "Linux HOWTO", de la que este documento
  forma parte. Hay una HOWTO para prcticamente cualquier tema. Su
  objetivo es cubrir, mediante manuales breves, concisos y especficos,
  cualquier duda que pueda surgir. Se actualizan permanentemente, y se
  distribuyen a travs del denominado "Linux Documentation Project"
  (LDP) en Internet. La misma informacin se publica en muy diferentes
  formatos, orientados tanto a la bsqueda y consulta en lnea como a su
  lectura convencional. Todas las versiones de Linux incluyen estos
  manuales (al menos la ltima edicin disponible en el momento de
  recopilar el CDROM correspondiente), y al final de este documento se
  aportan algunas de las muchas direcciones para consultar en la red.

  2.  Distribuciones

  Extracto de la Distributions-HOWTO sobre distintas versiones de Linux.
  Acuda a ella para ampliar informacin

  El nico elemento comn a todas las versiones Linux es su kernel -el
  ncleo del sistema operativo-, que se desarrolla de forma coordinada y
  con actualizaciones sistemticas. Sin embargo todo sistema operativo
  necesita, junto al ncleo del sistema, todo un conjunto de utilidades
  y herramientas de instalacin, configuracin y uso. Ah juegan su
  papel las diferentes distribuciones: algunos particulares, entidades y
  empresas se dedican a hacer determinadas recopilaciones de software
  que ellos mismos preparan para que sean facilmente instalables y
  configurables. Todas ellas facilitan el software junto a su cdigo
  fuente, pero la flexible licencia GNU a la que se acojen permite tanto
  ofrecerlas gratuitamente como distribuirlas por canales comerciales
  (lo que se paga es el trabajo de recopilacin, el software de cosecha
  propia que pueda aportar, una presentacin ms elaborada, gastos de
  distribucin y soporte tcnico al usuario).

  Algunas de las distribuciones ms conocidas son:

     Slackware
        Esta distribucion es quizas de las ms extendidas en todo el
        mundo y la ms conocida en Espaa, ya que es la que han
        divulgado las publicaciones del sector. Incluye con creces todo
        el software que cualquier usuario medio o avanzado pueda
        necesitar, y su mtodo de instalacin es asequible aunque lejos
        de las tpicas y vistosas instalaciones a las que el usuario
        nefito esta acostumbrado en los sistemas comerciales.  Tiene
        diversos derivados comercializados bajo diferentes nombres (por
        ej. "Slackware Pro") que mejoran la instalacin e incluyen
        manuales y bibliografa en un nico lote. Esta en todos los FTPs
        principales, siendo  <http://www.cdrom.com/> su distribuidor de
        origen.

     Red Hat
        Creada por Red Hat Software, en Connecticut, EE.UU. Una de sus
        ventajas es el atractivo sistema de instalacin (en modo
        grfico) y el cmodo mantenimiento de componentes de software,
        lo que facilita enormemente las tan frecuentes actualizaciones.
        Se puede obtener tanto gratuitamente en la red como adquiriendo
        el CDROM correspondiente. Otras empresas comercializan tambin
        sistemas basados en Red Hat, como Caldera Inc. y Pacific Hi-
        Tech. An poco conocida en Espaa pero pujante, sobre todo para
        principiantes. Sus creadores estan en  <http://www.redhat.com>.
        El mencionado sistema de gestin de componentes de software es
        obra suya, pero lo han ofrecido con carcter abierto y gratuito
        a los dems desarrolladores bajo la licencia de GNU, por lo que
        es previsible que en el futuro otros muchos asuman este sistema
        en sus propias distribuciones, lo que facilitar enormemente las
        actualizaciones.

     Debian
        La Free Software Fundation (FSF) es bien conocida entre los
        acrrimos usuarios de software gratuito para Unix. Son los
        creadores del sistema GNU, su futuro Unix gratuito. Ya hay mucho
        material pero no un sistema operativo completo, asi que mientras
        tanto ofrecen un Unix integrado por el nucleo de Linux y el
        software de GNU.  <http://www.debian.org>.

  3.  Ayuda a la instalacin de la distribucin Slackware

  Este es un extracto de la Installation-HOWTO, orientada
  fundamentalmente a la instalacin de Linux Slackware. Mucha de la
  informacin sobre instalacion de Slackware es aplicable a cualquier
  versin de Linux, pero no necesariamente al pie de la letra.

  Aparte de otras muchas variantes que se puedan considerar, a la hora
  de instalar Linux en nuestro disco duro hay bsicamente dos formas:
  UMSDOS y Particin nativa. Cada una tiene sus ventajas e
  inconvenientes, pero como se ver es recomendable que todos los
  usuarios terminen usando el segundo mtodo ya que es el ms eficiente
  y el que mejor aprovecha las ventajas de Linux.

  3.1.  Instalacin con UMSDOS

  Consiste en aprovechar el espacio de disco que queda libre en los PCs
  con MSDOS, sin necesidad de tocar las particiones de disco. Linux es
  un sistema operativo, y como tal totalmente independiente, no
  requiriendo por tanto ningun otro sistema operativo en su ordenador
  (aunque puede convivir perfectamente con ellos). Sin embargo es un
  parque muy amplio el de usuarios que ya tienen instalado MSDOS y/o MS-
  Windows y que, al no considerase expertos, no se atreven en un primer
  momento a reparticionar el disco para sustituir total o parcialmente a
  su sistema actual. Para ellos, o simplemente para quien quiera ver y
  probar Linux sin ser tan drasticos formateando discos duros, la
  solucin es UMSDOS. Permite crear, a partir de un directorio de MSDOS,
  toda la estructura que tendra un disco nativo de Linux. Cuando
  arranque el sistema, Linux emular su disco a partir de la informacin
  en ese directorio. Es totalmente funcional, pero puede ser ligeramente
  ms lento en ordenadores de gama media-baja y no aprovecha la gestin
  de disco nativo. Una gran ventaja es que si se libera disco en Linux,
  implcitamente estamos creando espacio que ser aprovechable cuando
  arranquemos MSDOS, y viceversa. Adems, el da que queramos
  deshacernos de Linux (poco probable!) o que simplemente nos decidamos
  a hacer una instalacin completa, desinstalar ese Linux es tan
  sencillo como simplemente borrar sin contemplaciones el directorio
  C:\LINUX que cre desde MSDOS.

  3.2.  Instalacin en particin nativa de Linux.

  Salvo la fase inicial en la que se preparan las particiones nativas o
  el UMSDOS, el procedimiento restante de instalacin es bsicamente el
  mismo.  Ya que puede ser el que provoque ms dudas, centraremos estos
  consejos de instalacin en la instalacin con particin nativa. Pero
  recuerde que

  ______________________________________________________________________
     ESTO NO ES UNA GUIA DE INSTALACION, SINO UN COMPLEMENTO A LAS
     INTRUCCIONES DE INSTALACION DE SU VERSION DE LINUX.

     LEA LA INSTALLATION-HOWTO Y/O EL MANUAL QUE ACOMPAA A SU DISTRIBUCION
     ANTES DE COMENZAR, O DE LO CONTRARIO PUEDE FALLAR LA INSTALACION E
     INCLUSO INUTILIZAR EL SOFTWARE QUE PUEDA TENER YA INSTALADO EN SU
     ORDENADOR.

     LA DISTRIBUCION TOMADA COMO BASE ES LINUX SLACKWARE 3.0. EL PROCEDIMIENTO
     PUEDE VARIAR DE UNAS VERSIONES A OTRAS. EN CASO DE DUDA ACUDA A LOS
     MANUALES DE SU SISTEMA O CONSULTE A LOS CANALES DE AYUDA Y SOPORTE LINUX
     HABITUALES (EN INTERNET O A SU DISTRIBUIDOR)

     LOS AUTORES DE ESTA DOCUMENTACION NO SE RESPONSABILIZAN DE LOS POSIBLES
     DESASTRES QUE PUEDA OCASIONAR. SI DECIDE CONTINUAR ES BAJO SU EXCLUSIVA
     RESPONSABILIDAD. (Nos gusta dormir tranquilos ;^) )
  ______________________________________________________________________

  3.2.1.  Preliminares

  En esta instalacin es necesario que LINUX disponga de una particin
  distinta a la de MSDOS para trabajar. Si ya tiene algn sistema
  instalado, lo ms frecuente es que sea una nica particin DOS que
  ocupe todo el disco, por lo que reparticionar supone eliminar esa
  particin para volver a crearla asignndole menos disco para hacer
  sitio a Linux (o para drselo totalmente, segn la instalacin
  escogida). Eso supone perder como norma general todos los datos en las
  particiones ya existentes.

  Existe, sin embargo, una utilidad anexa a Linux que corre sobre MSDOS
  y que permite "encoger" una particin de DOS siempre que la unidad
  tenga espacio libre y haya sido totalmente defragmentada (con la
  utilidad "DEFRAG" de MSDOS 6.x o similares). Esto le permitir crear
  nuevas particiones conservando sus datos en la particin MSDOS actual.
  Esta utilidad se llama "fips" y la encontrar en su servidor habitual
  en la red junto a otras utilidades de MSDOS para ayudar a la
  instalacin de Linux.
  LEA LA DOCUMENTACION DE FIPS ANTES DE UTILIZARLO.

  Primero debe liberar en MSDOS el espacio que pretenda reservar para la
  nueva particin de Linux (y para el espacio de swap, como despus se
  comentar). Despus debe defragmentar la particin de DOS con la
  utilidad "defrag" que acompaa a las ltimas versiones de DOS, o bien
  sus equivalentes de PCTools o Norton. Ahora puede correr el programa
  fips y crear una nueva particin con el espacio liberado. Lo habitual
  ser crear dos particiones: una Linux native para el sistema, y una
  Linux swap con por ej. el doble que de RAM, pero en caso de necesidad
  incluso puede ahorrarse una particin especfica para swap, y "robar"
  ese espacio de disco bien a MSDOS o al propio Linux.

  3.2.2.  Formateo de la particin.

  Una vez aadida la nueva particin que destinaremos a Linux, hay que
  preparar la siguiente etapa, el arranque de Linux, ya que salvo el
  apartado anterior en el que salvaguardamos la instalacin previa de
  MSDOS, toda la instalacin se har desde el propio Linux. Para
  arrancar necesitaremos dos disquetes (en algunas distribuciones como
  RedHat pueden ser tres), donde grabaremos tanto el ncleo del sistema
  operativo como los primeros programas con los que poder empezar a
  instalar. El primer disquete es el que etiquetaremos como "boot disk",
  y es donde ir el ncleo del sistema con el que arrancar. Como Linux
  es casi un sistema "a la carta", que puede llevar en el ncleo ms o
  menos funcionalidades segn nuestras necesidades, deberemos escoger
  entre los ncleos precompilados aquel que se adapte mejor a nuestro
  caso. En el futuro ser recomendable que incluso recompilemos nuestro
  propio ncleo para personalizarlo an ms, aadir lo que falte y
  simplificar lo que sobre en nuestro caso. El siguiente disquete es el
  "root disk" o "ramdisk", que incluye el software mnimo que cargaremos
  en memoria para la instalacin.

  En la distribucin de Linux tendremos una serie de ficheros que
  constituyen "imgenes" de esos disquetes. Es decir, una vez elegidas
  qu diquetes necesitaremos, los crearemos a partir de esas imgenes,
  bien desde otro sistema Linux ya funcionando (o incluso de cualquier
  Unix en general), bien desde MSDOS con otra utilidad complementaria de
  "fips": "rawrite".

  Una vez hecho esto ya puedes arrancar con tus discos. Introduce el
  "boot disk", arranca el ordenador y sigue sus instrucciones. Cuando
  finalice la fase de arranque Slackware te ofrecer un smbolo para
  hacer "login" (entrar en el sistema), mientras que RedHat arrancar
  directamente la aplicacin de instalacin. Utiliza el nombre "root"
  como nombre de usuario (es el super-usuario que administra el
  sistema). La primera vez no necesitars clave alguna para entrar.

  Ya estas en el prompt de Linux, desde donde puedes crear tus
  particiones y tu espacio de swap (es una zona especial de disco que
  Linux usa como memoria virtual que complementa a la memoria RAM del
  ordenador). Al igual que en MSDOS, el comando para gestionar
  particiones se llama "fdisk". En algunas versiones hay tambin una
  "cfdisk" con un interfaz ms asequible, aunque iguales en lo bsico.

  Si posees una particin de MSDOS, no te asustes, sigue adelante, no la
  vas a perder simplemente por entrar en fdisk, pero s que debes tener
  precaucin al aadir la particin linux sobre el espacio que le
  habamos quitado a MSDOS, para no afectar a ste.

  Dentro de fdisk usa la opcin 'n' para aadir nuevas particiones.
  Dalas de alta como particiones primarias (si ya tienes una particion
  de arranque con MSDOS, sta ser la particin 1 y a partir de ah
  aadirs particiones Linux).  Es ahora el momento de aadir el espacio
  de swap, conveniente siempre, e incluso imprescindible si se dispone
  de memoria igual o inferior a 8Mb. Como regla orientativa puede servir
  tener el doble de swap que RAM (para 8Mb o menos de RAM), y 1.5 veces
  para memorias superiores, pero depende de la disponibilidad de disco y
  de memoria que tengamos, as como del uso que le vayamos a dar. En
  realidad ser tu experiencia la que te ir diciendo en sucesivas
  instalaciones cunto swap necesitas. En caso de disponer de ms de un
  disco duro es muy recomendable tener separadas las particiones de
  linux y de swap (por ej. DOS+swap en uno y linux en el otro), lo que
  mejorar el rendimiento global.

  Una vez creadas las particiones, hay que definir tambin en fdisk el
  uso que van a tener (tipo de particin), siendo obviamente "linux swap
  partition" (tipo 83) para el swap, y "Linux native partition" para el
  propio linux. Al final, y siguiendo con este ejemplo, tendrs tres
  particiones definidas:

    MSDOS, marcada como "activa", con el arranque.

    Linux swap.

    Linux Native, donde residir el linux.

  NO TENGAS MIEDO POR TOCAR Y PROBAR: HASTA QUE NO USES LA OPCION DE
  ESCRIBIR A DISCO, PUEDES HACER TODO TIPO DE PRUEBAS Y/O CANCELARLO
  TODO HASTA ESTAR SEGURO Y GRABAR LA NUEVA TABLA DE PARTICIONES.

  Es probable que haya que rearrancar si modificamos las particiones, y
  continuar con el software de instalacin de nuestro Linux. En el caso
  de Slackware, ese software de instalacin ya necesita al menos 8Mb de
  memoria, por lo que si estamos justos de memoria tendremos que activar
  ya mismo el swap antes de ejecutarlo. Si ese es el caso, hay que
  hacerlo en dos pasos: formatear la particin de swap y luego activarla
  para que empiece a complementar la RAM. Los comandos seran

  ______________________________________________________________________
    mkswap -c /dev/hdXX
    swapon /dev/hdXX
  ______________________________________________________________________

  donde /dev/hdXX sera el nombre de la particin que hemos definido
  como swap. Una vez hecho esto, Slackware ya aporta una utilidad de
  instalacin que detectar las particiones creadas y proceder con el
  resto de la instalacin con la aplicacin "setup", que nos guiar
  durante toda la instalacin con un sencillo interfaz de mens, que no
  requiere muchas explicaciones. Durante una de las etapas de la
  instalacin Setup intentar preparar el swap. Si lo hemos hecho ya a
  mano habr que indicarle que se lo salte, mientras que en el resto de
  los casos dejaremos que setup haga todo lo que tenga que hacer.

  3.2.3.  Instalacin de los discos.

  Slackware divide la distribucin del sistema operativo en "series"
  temticas, y a su vez cada una de ellas en directorios que se
  corresponden perfectamente con disquetes de 1.44Mb. Los discos
  esenciales seran los de la "Serie A", con los que el sistema ya es
  arrancable autnomamente desde el disco duro, aunque en la prctica
  lgicamente instalaremos tambin la "AP" (aplicaciones bsicas), "N"
  (software de red, si vamos a conectarnos con cualquier modalidad), "D"
  (compiladores y libreras), "X" y "XAP" para el entorno grfico
  XFree86.
  Por su parte RedHat organiza el software tambin en "paquetes"
  instalables de forma independiente y tambin agrupados por temas,
  aunque no sigue ningn esquema traducible en disquetes, por lo que las
  nicas vas de instalacin son CDROM o directamente de la red.

  3.2.4.  Configuracin

  Una vez cargados a disco los paquetes de software, la siguiente fase
  ser la de configuracin, que se realiza desde el mismo programa de
  setup. Como esta parte es muy variable y depende de cada caso. Nos
  centraremos en dos puntos tpicamente problematicos: el arranque del
  sistema (incluida la posibilidad de arrancar mltiples sistemas
  operativos desde distintas particiones o distintos discos) y la
  configuracin de red

  Para instalar un mtodo de arranque de Linux hay dos utilidades:
  "Lilo" y "Loadlin".  La primera es un pequeo programa que se instala
  en el "Master boot record" del disco duro o en la particin que fdisk
  marc como "activa", y que permite arrancar indistintamente Linux, DOS
  6.x, Windows95, etc. La segunda es una utilidad de MSDOS que permite
  dejar en paz los arranques de particiones, haciendo en su lugar un
  "arranque en caliente" directamente desde DOS. Ambos funcionan bien,
  por lo que elegir una u otra es cuestin de preferencias de cada cual.
  En el segundo caso podr darnos algn error si hubiera algn programa
  de DOS residente en memoria que pueda obstaculizar la carga de Linux.
  Eso es relativamente facil de solucionar jugando un poco con las
  configuraciones de DOS (incluso con los menus de arranque que
  incorpora el config.sys de MSDOS 6.x), pero incluso en ese caso
  podemos encontrarnos dos obstaculos mas: si tenemos instalado
  DoubleSpace/Drivespace hay que evitar que se cargue en memoria
  pulsando F8 durante el inicio de DOS para poder ejecutar Loadlin (no
  hay otra forma de pararlo ya que normalmente se carga incluso antes
  que config.sys), y ademas si usamos Windows95 hay que pulsar
  igualmente F8 para arrancar con solo el smbolo del sistema, evitando
  entrar en el modo grfico.

  Linux puede convivir con cualquier sistema operativo, pero unos dan
  mas dolores de cabeza que otros, por lo que en caso de duda acude a la
  documentacin correspondiente (la de instalacin de la propia
  distribucin y la Booting-HOWTO. De todas formas, si una vez instalado
  Linux no conseguimos arrancarlo (sabemos que est ah pero no
  conseguimos entrar en l), siempre queda un recurso asequible:
  introduce el "boot disk" y en vez de darle a INTRO cuando te aparezca
  un simbolo "boot", teclea root=dev/XXXX/ indicando que ya hay un Linux
  en la particin correspondiente, y que debe usarlo en vez de continuar
  con una hipottica instalacin. Lo nico diferente es que se estara
  usando el ncleo (kernel) del disquete en vez del instalado en el
  disco duro, pero a partir de ah montar la particin del disco duro y
  usar todo lo ya instalado all.

  Otro problema frecuente (solventado en la ltima version de RedHat
  pero no an en Slackware) es que graba en el disco duro un ncleo
  genrico en vez del que hayamos usado en el "boot disk", que era
  precisamente el que habamos elegido, por lo que es habitual que, si
  necesitamos algn controlador especfico para algn dispositivo o
  cualquier otra funcionalidad, cuando arranquemos directamente desde el
  disco duro ya no nos lo reconocer. Si estamos usando LILO haz lo
  siguiente para arreglarlo: entra como superusuario, copia la imagen
  que habias usado para generar el "boot disk" sobre el fichero
  "/vmlinuz" del disco duro y ejecuta "lilo" para reinstalar el arranque
  con el ncleo correcto. Si estas usando LOADLIN, simplemente dale como
  parmetro el fichero del ncleo correcto (es facil tener varios
  ncleos y elegir en cada caso el que interese). Seguir arrancando con
  el disquete como en el caso anterior sera tambin otra posibilidad
  para no perder ese CDROM, esa tarjeta, etc.

  4.  Espaolizacin  de Linux

  Uno de los aspectos ms molestos es no poder escribir con naturalidad
  en nuestro idioma por falta de soporte de los caracteres especiales en
  el software. El juego de caracteres bsico de ASCII es de 7 bits, y no
  incluye ni las vocales acentuadas ni nuestra maltratada ''.  Hay una
  norma ISO-8859-1 ( ISO-Latin1) que s que abarca todos los caracteres
  pero que sigue dando la lata en muchas tareas habituales, como el
  correo electrnico (muchos sistemas solo respetan 7 bits, por lo que
  textos que podemos ver correctamente en nuestro ordenador
  probablemente se visualizarn de forma lamentable cuando los enviemos
  a otra persona. A continuacin se mencionan algunas de las situaciones
  ms frecuentes y cmo intentar solucionarlas.

  4.1.  Consola

   ...O cmo demonios poder usar acentos en nuestro propio ordenador

  Mediante el comando loadkeys se cargan las tablas de traduccin del
  teclado.  Estas tablas traducen los cdigos que se generan al pulsar
  las teclas a los que reciben los programas. Los ficheros que contienen
  estas tablas de traduccin se encuentran en el directorio
  /usr/lib/kbd/keytables/ y el fichero que contiene el mapeado del
  teclado espaol se denomina es.map. Su objetivo es que si pulsamos una
  determinada combinacin de teclas, aparezca en pantalla el carcter
  que tenemos pintado en nuestro teclado, y no su equivalente en el
  teclado que se usa en cualquier otro pas.

  La llamada a este comando suele ser de la forma siguiente, que
  aparecer en el arranque por defecto (en Slackware estara
  en/etc/rc.d/rc.keymap):

       loadkeys /usr/lib/kbd/keytables/es.map

  Nota del autor: A igual configuracin de teclado, ms de una vez me
  han fallado los acentos por recompilar el ncleo, pero en el momento
  de escribir estas lneas an no he visto la causa...

  4.2.  Shell bash

  Para que la bash soporte el uso de vocales acentuadas asi como de la
  letra  basta con incluir las siguientes lneas en un fichero .inputrc
  (o al menos en .bash_profile) en tu $HOME:

  ______________________________________________________________________
  set meta-flag on                # conservar bit 8 en entrada de teclado
  set output-meta on      # conservar bit 8 en salida por terminal
  set convert-meta off    # no convertir secuencias de escape

  export LC_CTYPE=ISO_8859_1
  ______________________________________________________________________

  4.3.  Shell tcsh

  Para que la tcsh soporte el uso de vocales acentuadas asi como de la
  letra  basta con incluir las siguientes lneas en un fichero .tcshrc
  (o al menos en .login) en tu $HOME:

  ______________________________________________________________________
  setenv LANG C
  setenv LC_CTYPE "iso_8859_1"
  ______________________________________________________________________

  4.4.  Algunas aplicaciones

  Sera excesivamente largo detallar todas las posibilidades para
  trabajar con caracteres de 8 bits en todas las aplicaciones,
  utilidades, comandos del sistema, etc. Aqu van algunos ejemplos:

     Editor joe
        Joe tiene un parmetro -asis para que conserve los caracteres de
        8 bits.

     less
        Por defecto muestra solamente los caracteres de 7 bits (los de 8
        los representa por su cdigo ASCII). Ello protege de ver en
        pantalla "basura" si por error intentamos leer ficheros
        binarios, de datos, etc., pero impide ver nuestros acentos. Se
        puede modificar momentneamente con el modificador -r desde la
        propia utilidad, pero sera mejor tener definida la variable de
        entorno LESSCHARSET=latin1.

     ls Para que muestre los caracteres especiales en los nombres de los
        ficheros tiene las opciones -8 -N, que se pueden aadir a la
        variable LS_OPTIONS que probablemente ya tengas definida por
        defecto.

     mc Este clnico Norton tiene una opcin Full 8 bits del submen
        Display bits... bajo Options.

     nroff, groff
        Dispone de una opcin -Tlatin1

  4.5.  Xwindow

  El entorno grfico XWindow usa para configurar el teclado un comando
  llamado xmodmap que tiene la misma funcion que loadkeys para la
  consola de texto. Ernest Artiaga (drw@portos.upc.es) prepar un
  fichero de configuracion para Xmodmap que genera los acentos con la
  tecla AltGr, que entre otros sitios puede encontrar en
  <ftp://ftp.cs.us.es/pub/Linux/contrib/Xmodmap-es>, y que podemos
  colocar como $HOME/.xmodmap para que se cargue como parte de nuestra
  configuracin. Existe tambin una utilidad
  /usr/lib/kbd/keytables/mk_modmap que genera un listado para Xmodmap a
  partir del mapa de teclado usado por loadkeys.

  De todas formas este mtodo no es perfecto, ya que muchas aplicaciones
  bajo Xwindow tienen su propia forma de configuracin o simplemente no
  tienen soporte para caracteres extendidos por lo que a veces es
  posible que podamos usar acentos en una ventana y no en la aplicacin
  de la ventana de al lado.

  4.6.  Emulador de DOS (DOSEMU)

  La linea de configuracin del teclado en /etc/dosemu.conf deber
  incluir 'layout es-latin1' para poder usar la '' y las aperturas de
  interrogacin y admiracin. Una vez hecho esto, es posible cargar la
  configuracin habitual con keyb sp desde el propio emulador de DOS, o
  bien ejecutar 'keybes2.com, una pequea utilidad para el propio
  emulador disponible en varias de las direcciones habituales.

  4.7.  Correo electrnico

  Por ltimo en relacin con el uso del espaol en Linux, pero no menos
  importante, es poder leer y recibir por mensajera electrnica textos
  escritos en espaol sin deformar su contenido ni perder los acentos y
  smbolos propios.

  El problema se reduce a lo de siempre: el uso de caracteres especiales
  no incluidos en la tipografa bsica sajona requiere trabajar con 8
  bits, pero an hay muchos sistemas que siguen trabajando con 7 bits,
  lo que trunca o deforma mensajes escritos sin las debidas
  precauciones.

  En el estndar RFC822 que define el formato usado en los mensajes de
  correo de Internet no se permite el uso de 8 bits en las cabeceras de
  los mensajes, dejando abierta la posibilidad de 8 bits en el cuerpo
  del mensaje. Pero tampoco podemos abusar de esa posibilidad ya que no
  tenemos garantas de que lo respete cualquier sistema que pueda
  recibir nuestros documentos. Una solucin cada vez ms extendida, y
  que permite a los usuarios escribir con libertad y enviar
  prcticamente cualquier informacin dejando todos esos detalles al
  software de gestin del correo (tanto los agentes de usuario como los
  agentes de transporte en los servidores de correo) es mediante el
  estandar MIME, que permite codificar nuestros mensajes de 8 bits y
  reducirlos a caracteres de 7 bits que puedan pasar a travs de
  cualquier sistema sin peligro de perder informacin. El inconveniente
  (cada vez menor a medida que este sistema se extienda ms y ms) es
  que si intentamos leer un mensaje con codificacin MIME sin un
  software que no implemente este sistema y no pueda interpretarlo,
  puede que veamos "basura" intercalada con nuestro mensaje, o que
  incluso no entendamos nada de nada.

  MIME deja toda la responsabilidad al software, por lo que si ambos
  extremos (remitente y destinatario) usan software compatible con MIME,
  el usuario puede enviar junto a textos simples cualquier combinacin
  de tipos de ficheros (documentos generados por procesadores de textos,
  grficos, sonido, video, etc). Ni siquiera es necesario que ambos usen
  el mismo software. Basta con que ambos sean capaces de generar la
  codificacin durante el envo, y de interpretarla en la recepcin.
  5.  Conectividad de Linux

  Uno de los puntos muy fuertes de Linux es su gran conectividad:
  incluso con recursos modestos en hardware puede ser un hbil servidor
  de red y convivir practicamente con cualquier configuracion que ya
  tengamos funcionando en nuestra red. A medida que mejoremos el
  equipamiento, Linux aprovechar todos los recursos convirtindose en
  un potente centro de servicios.  Si no consigo abrirte el apetito de
  curiosidad, echa un vistazo a las varias How-To sobre el tema o lo
  lamentaras... :)

  Como digno miembro de la familia Unix, el entorno nativo de red en el
  que ha nacido Linux es el TCP/IP, asi que nos moveremos en Internet y
  en las redes locales basadas en esta familia de protocolos como pez en
  el agua. Puede actuar tanto de simple cliente hasta como una potente
  estacion de trabajo de bajo coste, pasando por un XTerminal con todo
  su entorno grafico con absolutamente todo el software necesario, ya
  incluido o de ms o menos fcil instalacion.

  En el nivel fsico (cacharreo para entendernos), Linux puede
  conectarse con otros Linux o con cualquier otro sistema usando casi
  cualquier cosa: cableado serie, paralelo, modems convencionales,
  tarjetas RDSI, Frame Relay, redes locales ethernet  token ring,
  radiopaquete (AX.25 para radioaficionados), etc.

  En cuanto a protocolos de red, lo que lleva en la sangre es el
  mencionado TCP/IP, pero puede acceder (como cliente o como servidor,
  segun los casos) a redes basadas en IPX (Novell), AppleTalk
  (Macintosh) y SMB (red LanManager para conectar con Windows para
  trabajo en grupo, Windows 95 y Windows NT).  Por si sirve de pista,
  quien escribe ha hecho ya la prueba de poner un simple PC de gama
  media como nodo principal para dar servicios de disco, impresoras y,
  sobre todo, acceso a Internet a una LAN ethernet de 75 puestos de
  trabajo que usan indistintamente cualquiera de los mencionados
  protocolos compartiendo indistintamente sus recursos. Y lo mejor de
  todo es que nadie fue capaz de distinguir desde sus respectivos
  puestos a Linux del servidor propio que les atenda hasta entonces. De
  hecho lleva varios meses en uso ininterrumpido y slo Linux ha sido
  capaz de hacer simultneamente de servidor para usuarios Unix, Windows
  3.11, Windows 95, NT, DOS, Netware y Mac sin colgarse ni una sola vez
  y con un coste ridculo. Nadie me garantiza que nunca me vaya a
  fallar, pero lo doy por modesta pero absolutamente victorioso en
  comparacin con sistemas comerciales tericamente superiores y con un
  coste mucho mayor.

  Otra situacin en la que actualmente uso Linux es como servidor de
  Web, mail, FTP annimo (de servicio pblico a la red) y servicios de
  salida a Internet para una red local de 2.100 usuarios, tambin con
  muy buenos resultados a pesar de la fuerte carga de trabajo contnuo
  las 24 horas.

  5.1.  Conectividad casera

  Algunas de las situaciones tpicas en las que se puede aprovechar la
  capacidad de trabajo en red de Linux podran ser:

  5.2.  Servidor de terminales

  Quin no tiene en casa un PC (o algo peor) que se ha quedado antiguo
  pero que an funciona? Cualquier ordenador con un puerto serie y algun
  software de emulacin de terminal puede conectarse a un Linux,
  permitiendo varios usuarios trabajando simultaneamente. Para quien no
  lo haya hecho alguna vez, es la forma ms simple de comprobar por s
  mismo que Linux es un sistema 100% multiusuario y multitarea. Todos
  los recursos de memoria, disco, etc.  estarn a la vez disponibles
  para compartirlos entre tantos usuarios como puertos serie tengamos.

  5.3.  Red PPP

  Enlazando ordenadores por puertas serie, paralelo, modems, etc, es
  posible no solamente que un Linux sea el ordenador principal y otros
  usuarios accedan a travs de simples terminales, sino que es posible
  aprovechar la capacidad de todos los equipos sumando recursos.  Desde
  un equipo se puede acceder a impresoras, discos, etc. de cualquier
  otro equipo. El protocolo PPP permite crear una red TCP/IP entre todos
  ellos, usando como enlace tanto modems como simples cables. A medida
  que cambiemos la red fsica por algo mas "decente" como una LAN
  ethernet o anlogo, mejorarn las prestaciones como es lgico, pero la
  idea es la misma y el software de usuario son idnticos (lo que vara,
  claro esta, es la configuracin del propio sistema operativo).

  5.4.  Servidor de modems

  Combinando los dos apartados anteriores, podemos unir la capacidad de
  servidor de puertos serie (a los que conectaremos modems) y el
  protocolo PPP (para dar a esas lneas serie la funcionalidad del
  TCP/IP). As podemos dar servicio de acceso a Internet a los usuarios
  que se nos conecten por telfono.

  5.5.  Conexion directa a Internet

  Ciertamente no es lo normal en casa, pero es relativamente frecuente
  encontrarlo en universidades y de un tiempo para ac tambin es
  habitual en empresas. Si tenemos una red local enganchada a su vez a
  un proveedor (acadmico o comercial), entonces una simple tarjeta de
  red y una simple configuracin del sistema sern suficientes para
  conectar Linux, que actuar como un ordenador Unix cualquiera, con
  todas sus ventajas. De hecho en la red encontraremos ms de un
  servidor que esconde un Linux en sus "entraas", o que precisamente
  quien nos est haciendo de proveedor de acceso sea un Linux. Pero hay
  que tener en cuenta tambien sus inconvenientes de seguridad: igual que
  podemos conectarnos desde Linux, es perfectamente posible que se
  conecten a nosotros inadvertidamente, por lo que, salvo que
  necesitemos mantener abierto algun servicio en particular, es
  recomendable cerrar "todas las ventanas" para evitar problemas.
  Algunos buenos consejos para un Linux de uso personal seran:

    Crea cuentas para los usuarios que realmente vayan a usarlo, y
     asgnales claves dificilmente adivinables (no hace falta
     complicarse la vida con claves imposibles, pero tampoco debes
     ponrselo fcil a los intrusos)

    Hazte cargo de la clave del administrador root y procura mantenerla
     a salvo. Si la facilitas a alguien ms, mentalzale para que la use
     con precaucin (por otra parte tambin es una forma de aprender
     nociones bsicas de administracin de sistemas...)

    Ponte como root, edita /etc/inetd.conf y ponle un signo de
     comentario (#) a todas las lineas excepto aquellas que abran
     servicios que necesites mantener accesibles; luego haz "killall -1
     inetd". No te cortes y cierralo todo, que siempre estaras a tiempo
     de reabrir aisladamente aquello que eches en falta

    Aunque te consideres muy capaz de administrar un sistema de este
     tipo, no tengas la mala costumbre de usar root como usuario
     habitual con el que te conectes al sistema, o en caso de despiste
     podras provocar algun destrozo.  Es mas seguro que entres como un
     usuario "raso" y uses su - root cuando necesites hacer alguna
     operacion concreta como super-usuario (recuerda usar exit para
     volver a tu status normal cuando termines lo que tenas que hacer
     como super-usuario)

    El sistema va dejando muchos mensajes registrando la actividad de
     los usuarios y del propio sistema en mltiples ficheros de
     contabilidad. Muchos de ellos se centralizan a traves del servicio
     syslogd. En cuanto empieces a desenvolverte un poco con el manual y
     los comandos bsicos para moverte por el sistema, aprende a recoger
     la informacin que genere ese servicio, eliminar la intil, revisar
     la til y limpiar la contabilidad de vez en cuando (de lo contrario
     te puedes dar un susto cuando veas ficheros gigantescos que devoran
     espacio de disco con informacin desfasada despues de tanto tiempo)

  5.6.  Infova: acceso a Internet desde casa

  5.6.1.  Qu es infova?

  Infova es una red creada por Telefnica a la que los usuarios acceden
  desde cualquier punto de la red telefnica espaola a precio de
  llamada local. Funciona como una intranet (una red basada en los
  mismos protocolos que Internet, pero independiente y sin integrarse en
  ella). No tiene por tanto acceso directo a Internet, pero es un buen
  intermediario ya que abarata costes tanto para el usuario como para el
  proveedor de acceso a internet, que aprovecha su infraestructura sin
  tener que invertir en una red propia.  En este sentido es una va
  interesante de acceso, pero para evitar confusiones hay que tener
  presente que Infova NO es Internet, sino un producto comercial de
  Telefnica. An despues de habernos conectado a Infova seguimos
  necesitando un proveedor de acceso a Internet para estar
  verdaderamente conectados a la red de redes.

  Al funcionar igual que Internet (el software de Infova no es ms que
  un PPP y un navegador de web, que utiliza como interfaz de usuario) es
  perfectamente posible usar Linux para conectarse, pero surge el
  problema tpico de configuracin: Telefnica facilita su software
  gratuito para entornos comerciales tpicos (Windows 3.11, Windows95 y
  Macintosh) que Linux no necesita (ya lo tiene). Pero Linux lo que
  necesita es conocer la configuracion de su red, para poder integrarse
  en ella.

  5.6.2.  Como conectar entonces?

  El software bsico es el pppd, que a travs del modem crear un enlace
  TCP/IP entre nuestro ordenador e Infovia. Una vez creado, podremos
  contactar con nuestro "verdadero" proveedor, quien nos abrir las
  puertas a Internet, y a partir de ese momento ya podremos usar
  cualquiera de nuestras propias aplicaciones habituales desde Linux.
  Como complemento de pppd usaremos una utilidad chat que se encargara
  de dialogar via modem con el ordenador remoto al comienzo de la
  llamada, mientras se establece la conexin. Tambin intervendrn
  varios ficheros de configuracin (unos genricos de Linux para
  cualquier conexin TCP/IP, otros caractersticos de las conexiones a
  travs de PPP y modem, y por ltimo alguno que usemos en el caso
  concreto de Infova). Un detalle sobre versiones de software: un
  inconveniente en la evolucin de Linux ha sido un cambio en la
  implementacin del PPP que hace incompatible algunos pppd con algunas
  versiones del kernel. Si nuestro ncleo est entre 1.2.13 y 1.3.95
  debemos usar un pppd 2.1.2d o superior, mientras que necesitaremos un
  pppd 2.2.0e o superior para los ncleos ms recientes.

  El listado siguiente es un ejemplo del fichero principal de
  configuracin de pppd, en el que a su vez se hace referencia a varios
  ficheros que deberemos crear: identificacin y clave facilitada por el
  proveedor de acceso, el guin de inicio de conexin, y el de cierre y
  cuelgue del modem. /dev/modem es un enlace (un "symbolic link") que
  usaremos como nombre genrico para el modem, y que debe apuntar al
  nombre del dispositivo real en el que lo tengamos conectado.

  /etc/ppp/options:

  ______________________________________________________________________
    modem passive crtscts noipdefault defaultroute
    lock lcp-echo-interval 15 lcp-echo-failure 5 mtu 1500
    +ua /etc/ppp/infovia.pass
    connect "/usr/sbin/chat -v -f /etc/ppp/infovia.chat"
    disconnect "/usr/sbin/chat -v -f /etc/ppp/infovia-off.chat"
    /dev/modem 38400
  ______________________________________________________________________

  /etc/ppp/infovia.pass es un fichero con simplemente dos lneas, una
  con el login (identificacin de usuario) y otra con la clave. Para
  acceder a Internet deberemos introducir en ambos casos lo que indique
  el proveedor, mientras que si slo vamos a navegar por Infova (sin
  salir a Internet) es suficiente con poner infovia como usuario
  genrico e infovia como clave.

  /etc/ppp/infovia.chat contiene el guin que utilizar chat en su
  dilogo con el modem. Un ejemplo de su contenido podra ser:

  ______________________________________________________________________
    TIMEOUT 6
    ABORT '\nBUSY\r'
    ABORT '\nNO ANSWER\r'
    ABORT '\nNO CARRIER\r'
    ABORT '\nRING\r\n\r\RING\r'
    ABORT '\nNO DIALTONE\r'
    ''    ATDP055
    'CONNECT'
  ______________________________________________________________________

  En el ejemplo anterior se usa marcacin por pulsos. Si fuera por tonos
  sustituir ATDP por ATDT. Adems, si al nmero 055 de llamada a Infova
  hubiera que aadir algn prefijo de centralita o cualquier otra
  marcacin especial, no hay ms que incluirlo en el listado. Por su
  parte el de cierre de conexin y reseteo del modem sera algo as:

  /etc/ppp/infovia-off.chat:

  ______________________________________________________________________
    TIMEOUT 3
    ''    '\r'
    '\r'  '+++\c'
    '\r'  ATH0
    OK    ATH0
    OK
  ______________________________________________________________________

  6.  Direcciones tiles

  6.1.  Direcciones electrnicas

  Esta seccion es la que previsiblemente cambiara con mas frecuencia,
  dado el fuerte auge de Linux y la consiguiente mayor disponibilidad de
  material para Linux en castellano. Esto es solo un ejemplo para
  empezar en esta primera edicion...

  6.1.1.  WWW

     Linux/Espaa <http://www.cs.us.es/archive/linux.html>
        En Sevilla, el servidor ms veterano, con mirrors de LDP/WWW,
        Slackware, Sunsite, Linux/PPC (la sede para Europa de
        linuxppc.org), MkLinux (Linux para Powermac), RedHat (para PC y
        Alpha), etc.

     Grupo de Usuarios de Informtica <http://luna.gui.uva.es>
        En Valladolid, con mirrors de LDP/WWW, Slackware, Sunsite y
        manuales traducidos.

     Pgina de Juan Jos Amor
        <http://lml.ls.fi.upm.es/~jjamor/linux/LDP/>
        En Madrid, traducciones de las How-To.

     Linux Spanish Manpages <http://www.infodrom.north.de/linux/man
        pages-es/>
        Traduccin del manual del sistema.

  6.1.2.  FTP Anonimo

  6.1.3.  Grupos de noticias

  6.1.4.  Listas de correo

  Aparte de las numerossimas listas de correo en ingls (desde las ms
  genricas hasta las ms especializadas en temas muy concretos), en
  Espaa hay actualmente dos listas dedicadas a Linux en general:

    linux@hades.udg.es <mailto:linux@hades.udg.es> en Girona.  Persona
     de contacto para mas informacin: Paco Culebras Amigo
     paco@hades.udg.es <mailto:paco@hades.udg.es>
    l-linux@cic.teleco.ulpgc.es <mailto:l-linux@cic.teleco.ulpgc.es> en
     la escuela de Teleco en Las Palmas.

  6.1.5.  En Fidonet

  Si Internet te queda muy lejos pero lo tuyo es Fidonet, entonces
  probablemente ya sabrs que existe un area R34.LINUX con bastante
  actividad (es una de las areas ms animadas! ;^) Mucha de la
  informacin distribuida en Internet tiene su rplica en Fidonet,
  adems del valioso soporte mtuo entre los propios usuarios.

    Europa III 2:346/207

    La Voix 2:345/410 (+34)(5) 427 5321

  6.2.  Direcciones de Firmas comerciales

  Poco a poco va creciendo el numero de empresas que prestan atencion al
  pujante Linux y desarrollan aplicaciones, ofrecen soporte tecnico y/o
  venden algunas de las distribuciones en CDROM que se mencionaban
  anteriormente.

     En Madrid

       ABC Analog (91) 634 20 00

       Sertec Informatica (91) 364 23 88

     En Barcelona

       CD-Ware (93) 302 04 35

     En Bilbao

       Kender <http://www.kender.es> (94) 476 19 22

     En Valencia

       Encis-Net <http://www.encis.es> (96) 351 25 88

  6.3.  Bibliografa.

    Linux Edicin Especial, por Jack Tackett, David Gunter y Lance
     Brown.  Editado por Prentice Hall Hispanoamericana, 1996. ISBN
     968-880-580-7.  Incluye un CD con Slackware 2.20.

    The Linux programmer's guide, por Sven Goldt, Sven van der Meer,
     Scott Burkett, Matt Welsh.

  7.  Copyright

  Copyright (c) Gonzalo Garca-Agull <mailto:Gonzalo.Garcia-
  Agullo@jrc.es> 1996.  Elaborado a partir de experiencia propia y de
  informacin recopilada a travs de Internet. Vayan mis agradecimientos
  para Paco Culebras Amigo <mailto:paco@hades.udg.es> y Antonio L.
  Delgado Gonzalez <mailto:Antonio-Luis.Delgado@cs.us.es>, buenos
  linuxeros alla donde los haya.

  Este documento se publica bajo la Licencia General GNU, lo que permite
  su libre distribucin gratuita siempre que se conserve en su
  integridad y se retenga el copyright original.

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

More translations!!
F ABOGACIA.;1                       	Abogacia-Por-Linux-Como
F ACCESIBI.;1                       	Accesibilidad-Como
F BASH-PRO.;1                       	Bash-Prompt-Como
F BITCHX-C.;1                       	BitchX-Como
F CDROM-CO.;1                       	CDRom-Como
F CONFIGUR.;1                       	Configuracion-Impresion-Como
F CORTAFUE.;1                       	Cortafuegos-Como
F DIALD-CO.;1                       	Diald-Como
F DNS-COMO.;1                       	DNS-Como
F DOS-A-LI.;1                       	Dos-a-Linux-Como
F DOS-WIN-.;1                       	Dos-Win-Linux-Como
F DOSEMU-C.;1                       	Dosemu-Como
F FEDDI-CO.;1                       	FEddi-Como
F FTP-ANON.;1                       	Ftp-Anonimo-Como
F FUENTE-I.;1                       	Fuente-ISO-Como
F GRABADOR.;1                       	Grabadoras-Como
F IFMAIL-C.;1                       	Ifmail-Como
F INFOBIA-.;1                       	Infobia-Como
F INFOSHEE.;1                       	InfoSheet-Como
F INN-SUCK.;1                       	Inn-Suck-Como
F IP-MASQU.;1                       	IP-Masquerade-Como
F KERNEL-C.;1                       	Kernel-Como
F LEAME.;1                          	LEAME
F LINUX-TI.;1                       	Linux-Tips-Como
F LINUXDOC.;1                       	Linuxdoc-Ejemplo
F LINUXDOC.000;1                    	Linuxdoc-Como
F METAFAQ-.;1                       	MetaFAQ-Como
D MINI                              	mini
F MP3-COMO.;1                       	MP3-Como
F MUTT-GNU.;1                       	Mutt-GnuPG-PGP-Como
F NIS-COMO.;1                       	Nis-Como
F NOTICIAS.;1                       	Noticias-Como
F PCMCIA-C.;1                       	PCMCIA-Como
F PILOT-CO.;1                       	Pilot-Como
F PORHACER.;1                       	PORHACER
F PPP-COMO.;1                       	PPP-Como
F PROGRAMA.;1                       	Programacion-Serie-Como
F PROPIEDA.;1                       	Propiedad-Intelectual-Como
F QUAKEI-I.;1                       	QuakeI-II-Como
F RDSI-COM.;1                       	RDSI-Como
F README.;1                         	README
F REDES-EN.;1                       	Redes-En-Linux-Como
F REPRODUC.;1                       	Reproduccion-De-Sonido-Como
F RPM-COMO.;1                       	RPM-Como
F SAMBA-CO.;1                       	Samba-Como
F SERIE-CO.;1                       	Serie-Como
F SERVIDOR.;1                       	Servidor-IRC-Como
F SOFTWARE.;1                       	Software-RAID-Como
F SONIDO-C.;1                       	Sonido-Como
F SPANISH-.;1                       	Spanish-Como
F TERM-COM.;1                       	Term-Como
F TERMINAL.;1                       	Terminales-Como
F TODO.;1                           	TODO
F UMSDOS-C.;1                       	Umsdos-Como
F USO-IMPR.;1                       	Uso-Impresion-Como
F UUCP-COM.;1                       	UUCP-Como
F XFREE86-.;1                       	XFree86-Como
  TERM Como
  Patrick Reijnen, patrickr@bart.nl
  Traduccin de Alfonso Belloso, alfon@bipv02.bi.ehu.es
  v1.0, 1 Enero de 1995

  Lo que sigue es una gua detallada de configuracin del programa de
  comunicaciones term en Linux.
  ______________________________________________________________________

  ndice General:

  1.      Informacin

  1.1.    Copyright statement

  1.2.    DISCLAIMER

  2.      Introduccin

  2.1.    Sobre este Documento

  2.2.    Qu es el TERM?

  3.      Cmo funciona el TERM

  3.1.    Nomenclatura

  4.      Poniendo a punto las cosas.

  4.1.    Qu necesitas tener de antemano.

  4.2.    Explicacin de conceptos.

  4.2.1.  ``Sharing''  (comparticin).

  4.2.2.  `` Full TERM networking '' (conexin de red completamente
  TERM)

  4.3.    Compilacin del TERM

  4.3.1.  Construir el term  hasta la versin 1.15

  4.3.2.  Construir el term , versiones 1.16 hasta 1.19

  4.3.3.  Construir el TERM , versiones 2.0.0  y superiores

  4.4.    client.a, libtermnet.a, libtermnet.sa, libtermnet.so

  4.5.    Estableciendo variables de entorno.

  4.6.    Probar el TERM

  4.7.    TERM  y los programas de comunicaciones.

  4.7.1.  kermit

  4.7.2.  seyon

  4.8.    Hacer un enlace transparente.

  4.9.    Ejecutar linecheck

  4.10.   Prueba a correr el TERM

  4.11.   Terminar tu conexin term

  4.12.   Cmo eliminar TERM  de tus particiones.

  4.13.   Optimizacin de la conexin

  4.14.   Resolucin de problemas

  5.      Clientes TERM

  6.      X y TERM

  7.      tredir

  7.1.     tredir  puede morder!

  7.2.    Trucos tontos de tredir

  7.2.1.  X window

  7.2.2.  Correo con TERM

  8.      tudpredir

  9.      Automatizando las cosas.

  10.     Portando software para usarlo con term .

  10.1.   Portar y compilar los fuentes.

  10.2.   Termificar  ( termify ).

  11.     Clientes term .

  11.1.   Clientes term  disponibles en los servidores ftp .

  11.2.   El paquete termnet .

  11.3.   Solicitado, pero an no soportado:

  12.     Term  y la seguridad

  12.1.   trsh .

  12.2.   txconn  y xauth

  12.3.   sxpc , xhost  y xauth

  13.     Cosas a recordar

  14.     Estabilidad de las versiones de term

  15.     Tabla de velocidad de term .

  16.     Pistas y trucos encontrados en la red

  17.     Otras Cosas

  18.     Reconocimientos

  19.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Informacin

  1.1.  Copyright statement

  This document may be distributed freely as a whole in any form and
  free of charge. Parts of this document may be distributed, provided
  that this copyright message is included and the reader is informed
  that this is not the full HOWTO document. Furthermore , there is to be
  a pointer as to where the full document can be obtained. Specifically,
  it may be included in commercial distributions, without prior consent.
  However, I would like to be informed of such usage.

  This HOWTO may be translated into any language, whatsoever, provided
  that you leave this copyright statement and the disclaimer intact, and
  that a notice is appended stating who translated the document.

  1.2.  DISCLAIMER

  While I have tried to include the most correct and up-to-date
  information available, I cannot guarantee that usage of the
  information in this document does not result in loss of data. I
  provide NO WARRANTY about the information in this HOWTO and I cannot
  be made liable for any consequences for any damage resulting from
  using information in this HOWTO.

  2.  Introduccin

  2.1.  Sobre este Documento

  Este COMO intenta aclarar algunas de las confusiones al usar term, el
  gran programa de Michael O'Reilly que permite multiplexar tu lnea
  serie y establecer una conexin de red. De principio a fin, los
  documentos que vienen con el term son bastante buenos, y este COMO no
  pretende reemplazarlos.  La intencin de este documento es dar una
  idea de fondo de cmo trabaja el term y detallar los pasos para
  conseguir algunos de los servicios de red ms comunes trabajando bajo
  term. Se debe hacer hincapi en que este documento no cubre todo lo
  que se debe saber sobre el term.  Despus de leerlo, deberan leerse
  las manpages sobre term, ya que stas incluyen informacin que no se
  encuentra aqu.

  2.2.  Qu es el TERM?

  term es un programa, escrito por Michael O'Reilly,
  michael@iinet.com.au , que corre sobre una lnea serie para permitir a
  conexiones mltiples operar de forma concurrente --es decir, puedes
  estar recibiendo un fichero con tu mdem mientras trabajas en un
  sistema remoto (distinto)-- a travs de la misma conexin mdem. El
  term tambin se puede usar para abrir ventanas de cliente X sobre una
  conexin serie.  Por medio de las utilidades tredir y tupredir de las
  versiones 2.0.x y superiores del term, ste puede proporcionar muchos
  de los servicios de red ``tradicionales'':  mail, news, ftp, telnet,
  xarchie, etc. En esencia, term es muy parecido a otros protocolos
  serie como SLIP o PPP. La ventaja de term es que puede correr
  enteramente desde el espacio de usuario, sin requerir soporte del
  kernel ni del sistema o administradores de red.

  A diferencia de SLIP o PPP, tu mquina no llega a tener su propia
  direccin IP. Todo el trfico deber ir dirigido al host remoto, y
  ser redirigido a tu mquina mediante TERM.

  3.  Cmo funciona el TERM

  Antes de experimentar con term es altamente aconsejable leer primero
  este captulo completo y el fichero INSTALLATION que viene con el
  paquete. Tambin conviene echar una ojeada a las pginas de manual de
  linecheck, (term)test y term. Esto te ayudar a trabajar ms fcil y
  ms rpido.

  3.1.  Nomenclatura

  Asumo que ests llamando a un sistema a travs de algn tipo de
  servidor de terminal. Utilizo los trminos ``local'' y ``remoto'' para
  referirme a los sistemas conectados en casa y en la red
  respectivamente (a no ser que los use para referirme a alguna otra
  cosa :-).

  term proporciona a la mquina local, que no tiene conexin de red,
  pero que est conectada por una lnea serie a una mquina remota, la
  cual a su vez est conectada a una red, servicios de red. Observemos
  cmo una mquina con una conexin de red ``tradicional'' proporciona
  estos servicios.

  Primero el usuario invoca un programa, como telnet o ftp, que requiere
  un servicio de red. Lo que estos programas hacen es hacer una llamada
  del sistema solicitando servicios de red. El sistema operativo obtiene
  entonces estos servicios a travs de su interface de red (por ejemplo,
  manda y recibe paquetes sobre la ethernet).

  SLIP y PPP hacen exactamente esto, convirtiendo la lnea mdem en un
  interface de red, lo cual en principio no es diferente de una
  ethernet. La pega est en que estos protocolos hacen de la mquina
  conectada por mdem parte de la red, justo como cualquier otra
  mquina.  Esto exige toda la tarea administrativa asociada al hecho de
  ser un nodo de la red (ms an, ya que el enlace mdem tambin hay que
  administrarlo).

  En ausencia de una conexin de red como SLIP o PPP, qu es lo que se
  hace tpicamente?. Bien, llamas a tu mquina conectada a la red, lees
  tu correo, tus news, etc, si necesitas un fichero, primero te lo
  transfieres a la mquina remota y entonces te lo envas a la mquina
  local usando el kermit o algn otro programa de comunicaciones.

  Esto es una pena, especialmente porque en realidad slo puedes hacer
  que una cosa use el enlace mdem a la vez. La idea que hay detrs del
  term es bsicamente automatizar y multiplexar este proceso.  El term
  se invoca en ambas mquinas, local y remota, y los dos procesos se
  comunican entre s por la lnea mdem.  Cuando necesitas un servicio
  de red, haces una solicitud al daemon del term local, el cual
  transmite la peticin al daemon del term en la mquina remota
  (conectada a la red). El resultado se devuelve a travs de la lnea
  mdem.

  Para ser ms precisos, pongamos que quieres conseguir un fichero por
  ftp. Primero necesitas una versin de ftp que pueda hablar con term.
  Invocas termftp como lo haces con un ftp normal, pongamos 'termftp
  nethost.gov', pero esta versin especial hace su solicitud de red al
  daemon del term local en vez de al kernel. El term local transfiere
  esta peticin, a travs de la lnea del mdem, al term remoto, el cual
  establece una conexin con nethost.gov, y transmite los datos de
  vuelta sobre el enlace mdem.

  term es lo suficientemente listo como para tener muchas cosas
  diferentes funcionando a la vez, por lo que puedes tener varias
  sesiones de red distintas usando el mismo enlace mdem; por ejemplo
  puedes estar dentro de otra mquina lejana va termtelnet mientras
  contina la transferencia del termftp.

  Si esto es demasiado abstracto (o engorroso) no te preocupes; la
  informacin importante que hay que extraer de esta seccin es que hay
  dos copias del term corriendo, una a cada lado del enlace mdem.

  4.  Poniendo a punto las cosas.

  4.1.  Qu necesitas tener de antemano.

  Antes de comenzar a construir y usar el TERM debes asegurarte de que
  tienes incluido el soporte TCP/IP en el kernel. Adems, asegrate de
  que est activo el interface loopback de TCP/IP. Si ste es tu caso,
  puedes seguir con el resto de esta seccin.

  4.2.  Explicacin de conceptos.

  En las versiones nuevas del term han aparecido dos conceptos nuevos.
  Estos dos conceptos se explican en los siguientes apartados.

  4.2.1.  ``Sharing''  (comparticin).

  A partir de la versin 1.16 aparece el concepto de compartir la
  conexin TERM con otros usuarios. Esto significa que cuando habilitas
  la caracterstica ``shared'' (compartida), ms gente podr usar la
  misma conexin TERM que t ests usando, es decir, cuando ests
  trabajando en tu mquina remota a travs de tu conexin TERM (has
  usado trsh en tu mquina local para acceder, por ejemplo) otra persona
  en tu mquina local podr usar la misma conexin TERM al mismo tiempo
  para transmitir un fichero con ftp a su cuenta en tu mquina local
  desde un ftp site de cualquier lugar del mundo.

  Cuando deshabilitas la caracterstica ``shared'' (compartida) (o sea,
  ejecutas TERM en modo privado) t y solo t (sin contar a root :-)
  puede usar la conexin TERM.

  Por supuesto, slo necesitas instalar el ``shared'' TERM en el extremo
  en el que quieres permitir a la gente usar la misma conexin TERM que
  t ests usando. As que, si otra gente tiene cuenta en tu mquina
  local y quieren usarlo desde algn lugar de tu red remota habilitas la
  caracterstica shared en el extremo remoto de tu conexin TERM. De
  esta forma toda esta gente puede acceder a tu mquina a la vez
  compartiendo la misma conexin TERM entre s y contigo mismo. (NOTA:
  el primer ejemplo necesitaba habilitar la caracterstica shared en el
  extremo local de la conexin TERM).

  NOTA para la instalacin como root:

  Cuando instalas TERM como root, primero debes crear un grupo TERM
  (antes de compilar) sin miembros, aadiendo la siguiente lnea en
  /etc/group:

       term::16:root

  o cualquier otro GID no usado en lugar del 16 si ste ya est en uso.

  Despus de compilar e instalar coloca al TERM y sus clientes el SGID
  term:

       chgrp term <cliente_term>
       chmod g+s <cliente_term>

  Tambin cualquier programa que hagas utilizable con TERM debe tener
  SGID TERM.

  4.2.2.  `` Full TERM networking '' (conexin de red completamente
  TERM)

  A partir de la versin 2.0.0 de TERM se usa el concepto full TERM
  networking (conexin de red totalmente TERM). Cuando tu nica conexin
  con el mundo exterior es una conexin TERM, tienes una red full TERM
  (completamente TERM) y deberas compilar el TERM con full TERM
  networking.  En este caso se ha puesto un fichero llamado termnet en
  el directorio compartido.  Esto dice a TERM que tu nica conexin con
  el exterior es a travs del TERM.

  Cuando tambin tienes algn otro tipo de conexin de red adems de los
  programas (pasados a TERM) de la conexin TERM, primero intenta que
  realicen su trabajo usando esta otra conexin. Si sta falla entonces
  se invoca el TERM y se intenta realizar el trabajo a travs de la
  conexin TERM. Para aclarar esto, ahora se da un ejemplo en el que el
  se usa telnet hecho utilizable en TERM.  Este telnet debera funcionar
  con y sin TERM.

       telnet localhost

  no usa el TERM para conectar, pero

       telnet zeus.cs.kun.nl

  usar el TERM slo si no tienes otro tipo de conexin de red.

  El full TERM networking tambin implica el mentir sobre el nombre del
  host local, diciendo que es el host remoto en su lugar. Adems,
  provoca que bind (0) acte siempre en el host remoto. En esencia hace
  que muchos programas puedan usarse sin ir a travs del TERM mientras
  el TERM est corriendo. Desafortunadamente, la mayora de programas y
  demonios UDP no funcionarn con TERM sin estos incmodos trucos.

  4.3.  Compilacin del TERM

  Si tienes suerte esto slo debe implicar un make. Sin embargo, lo ms
  probable es que necesites hacer ms. Debido a nuevas opciones en las
  versiones nuevas del TERM (sharing, configure) ahora es un poco ms
  complicado crear el ejecutable del TERM. Hoy en da pueden seguirse un
  par de caminos para obtener el ejecutable.

  Para cubrir todos los caminos a seguir con los que puede construirse
  el TERM vamos a dividir esta seccin en tres partes:

  1. Construir el TERM hasta la versin 1.15

  2. Construir el TERM, versiones 1.16 hasta 1.19

  3. Construir el TERM, versiones 2.0.0 y superiores

  4.3.1.  Construir el term  hasta la versin 1.15

  Para estas versiones del term, la compilacin no debera implicar
  ejecutar ms que estos comandos

       make DO=install OS-type
       make installman

  Encontrars el term, sus clientes y las pginas de manual (man)
  cmodamente construidas e instaladas y listas para usar despus de
  esto.

  Adems, necesitars crear un directorio $HOME/term. Este directorio lo
  usar el term para buscar su fichero termrc.

  La nica cosa que puedes querer hacer es cambiar algunos de los paths
  en el Makefile, o cambiar alguna opcin del compilador.

  4.3.2.  Construir el term , versiones 1.16 hasta 1.19

  Para construir el term ahora puedes elegir una de las siguientes
  formas:

  1. Como un usuario normal, construir el term en modo privado

  2. Como un usuario normal, construir el term en modo shared

  3. Como root, construir el term en modo privado

  4. Como root, construir el term en modo shared

  Abajo se explicar cmo habilitar/deshabilitar la opcin shared
  durante la compilacin del term

  1. Eres un usuario normal (sin acceso de root) y NO quieres COMPARTIR
     (SHARE) la conexin term con otros usuarios.

     Como usuario que no quiere compartir la conexin term con otros
     usuarios deberas hacer lo siguiente para construir el term:

          make DO=install OS-type
          make installman

  Despus de esto, el term, sus clientes y las pginas de manual estn
  generados e instalados.

  Adems, necesitars crear un directorio $HOME/term. Este directorio lo
  usar el term para buscar su fichero termrc.

  La nica cosa que puedes querer hacer es cambiar algunos de los paths
  en el Makefile o cambiar algn parmetro del compilador.

  2. Eres un usuario normal (sin acceso de root) y SI quieres COMPARTIR
     (SHARE) la conexin term con otros usuarios.

     Como usuario que quiere compartir la conexin term con otros
     usuarios deberas hacer lo siguiente para construir el term:

          make DO=installshare USERSHARE=$HOME/term OS-type
          make installman

  Despus de esto, el term, sus clientes y las pginas de manual estarn
  compiladas e instaladas.

  Adems, tendrs un directorio $HOME/term (por defecto) con permisos
  drwxrwxr-x. En este directorio encontrars al menos el socket usado
  por el term para sus conexiones (tmp/private/socket=).

  3. Eres root y NO quieres COMPARTIR (SHARE) la conexin term con otros
     usuarios.

     Como root que no quiere compartir la conexin term con otros
     usuarios deberas hacer lo siguiente para construir el term:

          make DO=install OS-type
          make installman

  Despus de esto, el term, sus clientes y las pginas de manual estarn
  compiladas e instaladas.

  Adems, tendrs un directorio llamado /usr/local/lib/term (por
  defecto) con permisos drwxr-xr-x. En este directorio encontrars al
  menos el socket usado por el term para sus conexiones (tmp/pri
  vate/socket=).

  4. Eres root y quieres COMPARTIR (SHARE) la conexin term.

     Primero, asegrate de haber ledo la seccin sobre ``sharing''
     anterior.

     Como root que quiere compartir la conexin term deberas hacer lo
     siguiente:

          make DO=installshare OS-type
          make installman

  Despus de esto, el term, sus clientes y las pginas de manual estarn
  compiladas e instaladas.

  Adems, tendrs un directorio llamado /usr/local/lib/term (por
  defecto) con permisos drwxrwxr-x. En este directorio encontrars al
  menos el socket usado por el term para sus conexiones (tmp/pri
  vate/socket=).

  4.3.3.  Construir el TERM , versiones 2.0.0  y superiores

  Primero asegrate de haber ledo la seccin sobre ``full term
  networking'' de arriba.

  Para las versiones de term 2.0.0 y superiores hay muchas formas de
  generar el binario del term y los clientes. Todo esto puede hacerse
  tanto por root como por un usuario cualquiera:

  1. Generar el term en modo privado sin full term networking

  2. Generar el term en modo privado con full term networking

  3. Generar el term en modo shared sin full term networking

  4. Generar el term en modo shared con full term networking

  En estas versiones de term ha aparecido una nueva forma de compilar,
  usando el script configure. Cuando se ejecuta configure ste chequea
  en que sistema operativo ests tratando de instalar el term, si el
  directorio origen est disponible o no, y si hay puesta alguna opcin
  runtime.  De acuerdo con las cosas encontradas configure crea entonces
  un Makefile usando Makefile.in que se entrega con el paquete del term.

  Dos de las opciones ms importantes para configure son --root y --user
  que establecen si el term ser instalado por root o por un usuario
  cualquiera. Se pueden usar otras opciones para instalar el term de la
  forma que quieras (con paths no estndar, por ejemplo).

  1. Generar el term en modo privado sin full term networking

     Para generar el term de este modo necesitas ejecutar los siguientes
     comandos (tanto para root como para cualquiera):

          make install installman

  Esto genera los binarios, instalndolos junto con las pginas de man
  ual.

  2. Generar el term en modo privado con full term networking

     Para generar el term de este modo necesitas ejecutar los siguientes
     comandos (tanto para el root como para cualquiera):

          make installnet installman

  Esto genera los binarios, instalndolos junto con las pginas de man
  ual.

  3. Generar el term en modo shared sin full term networking

     Para generar el term de este modo necesitas ejecutar los siguientes
     comandos (tanto para el root como para cualquiera):

          make share installman

  Esto genera los binarios e instala estos binarios y las pginas de
  manual.

  4. Generar el term en modo shared con full term networking

     Para generar el term de este modo necesitas ejecutar los siguientes
     comandos (tanto para el root como para cualquiera):

          make share installnet installman

  Esto genera los binarios e instala estos binarios y las pginas de
  manual.

  4.4.  client.a, libtermnet.a, libtermnet.sa, libtermnet.so

  Con el term se suministra una librera con funciones para clientes
  term.

  Hasta la versin 1.16 esta libreria se llamaba client.a. Durante la
  compilacin de term se generaba esta librera, que despus se usaba en
  la compilacin de los clientes term. No se instalaba en otro
  directorio.

  A partir de la versin 1.16 se cambi el nombre de la librera por
  libtermnet.a. Hasta la versin 1.19 esta librera se crea en el
  directorio term y despus se usa durante la compilacin de los
  clientes term. No se instala en otro directorio.

  A partir de la versin 2.0.0, adems de libtermnet.a tambin se crean
  libtermnet.so y libtermnet.sa (libreria shared y librera exported
  initialized) durante la instalacin del paquete term. Durante la
  instalacin de todas las partes del paquete, estos tres ficheros de
  libreras se instalan en el directorio /usr/local/lib (por defecto).
  Y despus se hace un enlace desde libtermnet.so.2 a
  libtermnet.so.2.x.x.

  Finalmente se ejecuta ldconfig para crear los enlaces necesarios y el
  cach (para uso del enlazador dinmico, ld.so) para las libreras
  compartidas ms recientes que se encuentran en los directorios
  especificados en la lnea de comandos, en el fichero /etc/ld.so.conf,
  y en los directorios permitidos (/usr/lib y /lib).

  Si la instalacin se hace correctamente, los tres ficheros de librera
  podrn ser usados por los clientes de term que son generados con
  libreras dinmicas en lugar de estticas. Estas libreras tambin se
  pueden usar ahora para portar tu software propio a fin de poderlo usar
  con el term (ver ms adelante).

  4.5.  Estableciendo variables de entorno.

  term reconoce un par de variables de entorno que pueden definir los
  usuarios. Las tres primeras de stas que se explicarn son:

    TERMDIR

    TERMSHARE

    TERMMODE

  Definiendo estas variables puedes controlar el modo en que se ejecuta
  el term.

  Para versiones del term hasta la 1.15 slo es importante la variable
  TERMDIR (estas versiones no reconocen el modo shared).  Para estas
  versiones TERMDIR se debera definir como sigue:

       setenv TERMDIR $HOME     # csh o tcsh
       export TERMDIR=$HOME     # bash

  A partir de la versin 1.16 term tambin reconoce las variables
  TERMSHARE y TERMMODE. Con estas variables se le puede indicar al term
  que funcione en modo privado o en modo compartido.  Explicaremos como
  definir las variables para ambos modos.

  1. Ejecutar term en modo privado puede hacerse definiendo las
     variables TERMDIR y TERMMODE de la siguiente forma:

     Para csh o tcsh:

          setenv TERMDIR $HOME
          setenv TERMMODE 0

  Para bash:

       export TERMDIR=$HOME export TERMMODE=0

  2. Si quieres usar el term en modo compartido hay dos formas de
     definir las variables:

     a. Si term se instala como un programa SUID slo se debe definir
        TERMMODE. (README en el paquete del term).

                setenv TERMMODE 'numero'    # csh o tcsh
                export TERMMODE='numero'    # bash

     En 'numero' debe ponerse 1 si se est usando una versin del term
     entre la 1.16 y la 1.19 (README.share en el paquete del term) y 2
     si se est usando la versin de term 2.0.0 o superior (README.secu
     rity en el paquete del term).

     b. Si term se instala como un programa SGID las variables se deben
        definir del siguiente modo:

        Para csh o tcsh:

                setenv TERMMODE 1
                setenv TERMDIR /usr/local/lib/term
                setenv TERMSHARE $TERMDIR

     Para bash:

             export TERMMODE=1
             export TERMDIR=/usr/local/lib/term
             export TERMSHARE=$TERMDIR

     Poniendo las variables de esta forma har posible que se ejecuten
     clientes viejos (linkados con una versin antigua del client.a) en
     modo compartido (shared).

  A partir de la versin 2.0.0, term tambin reconoce la variable
  TERMSERVER.  Se necesita definir esta variable cuando se tienen varios
  mdems y mas de una conexin a la vez. Para especificar que conexin
  usar, se debe ejecutar el term con un nombre de servidor:

       nohup term -v /dev/modem1 Connection1 & nohup term -v /dev/modem2 Connection2 &

  Los usuarios deberan definir la variable TERMSERVER con el nombre de
  conexin que quieran usar:

       setenv TERMSERVER Connection1           # csh o tcsh
       export TERMSERVER=Connection2           # bash

  4.6.  Probar el TERM

  Haz un make test (o make termtest para versiones nuevas del term) para
  generar el demonio de prueba del term.  (term)test funciona ejecutando
  dos copias del term en tu sistema, una ``local'' y una ``remota''.
  Ambas leern tu termrc; de modo que puedas ajustar su comportamiento.
  Ahora ejecuta (term)test. Deberas poder hacer un trsh y un tupload.
  Prueba con:

        tupload ./term /usr/tmp

  deberas de conseguir tener una copia del binario term en /usr/tmp ).
  La salida del term local debera aparecer en local.log y la remota en
  remote.log. Puedes ejecutar term con el parmetro -d255 para poder
  registrar lo que ocurra en estos ficheros, o habilitar el debugging en
  tu termrc.

  NOTA: Ejecuta el test como ./test para evitar el test del sistema.

  4.7.  TERM  y los programas de comunicaciones.

  Antes de poder usar term, tienes que establecer una conexin va mdem
  usando un programa de comunicaciones como kermit o seyon.  En la
  documentacin del programa encontrars qu tienes que hacer para
  conectarte con la mquina remota.

  Cuando hayas establecido la conexin y quieras ejecutar term,
  necesitas suspender o salir del programa de comunicaciones sin cerrar
  la conexin.

  A continuacin explicar cmo hacer esto con algunos programas de
  comunicaciones.

  4.7.1.  kermit

  Iniciar term cuando se usa kermit es fcil. En el prompt local de
  kermit se teclea ``suspend'', de modo que volvers al prompt de Linux.
  Desde este prompt puedes ya establecer la conexin term.

  4.7.2.  seyon

  Una forma de iniciar chequeo de lnea o TERM cuando usas seyon es
  poner linecheck y TERM en el men Transfer (controlado por el fichero
  $HOME/.seyon/protocols).

  Aade al fichero $HOME/.seyon/protocols lo siguiente:

       "Line check" "$cd /tmp; linecheck"
       "Term" "$term -c off -w 10 -t 150 -s 38400 -l $HOME/tlog"

  Ahora, cuando inicies linecheck o term en la mquina local, selecciona
  en el men Transfer el tem ``Line Check'' o ``Term''.

  Por supuesto, tambin podras usar el botn de comando de shell y
  teclear en el cuadro de dilogo que se te abrir los comandos
  linecheck o term. Esto mismo hace redireccin automtica al comando.

  4.8.  Hacer un enlace transparente.

  Presumiblemente, puedes establecer una conexin mdem entre tus hosts
  local y remoto. Tpicamente lo que haces es, llamar a algn tipo de
  servidor de terminales y conectas con tu host remoto a travs de l.

  Tambin sueles usar para ello software de terminal, como kermit o
  seyon para comunicar con tu mdem (los ejemplos de este documento usan
  el kermit, ya que es el que usa el autor). Si ests teniendo problemas
  con el mdem, o con el software de terminal, echa una ojeada al Serial
  HOWTO; esto debera ayudarte.
  Una vez establecido el enlace, querrs hacerlo lo ms transparente
  posible.  Comprueba los comandos en el servidor de terminal (help o ?
  suele ser un buen comienzo). Busca la opcin 8 bits siempre que sea
  posible. Esto puede implicar cambiar la forma en que accedes a tu
  sistema, por ejemplo, si el servidor usa rlogin, tendrs que usarlo
  poniendo el parmetro -8 para hacerlo transparente.

  Especialmente vigila el control de flujo por xon/xoff. No lo
  necesitas. Intenta habilitar el control de flujo por hardware,
  rts/cts. Puede que tengas que mirar la documentacin de tu mdem para
  saber cmo configurarlo para hacer comunicaciones rts/cts de 8 bits.

  4.9.  Ejecutar linecheck

  ATENCIN: En algunos documentos las opciones de lnea de comandos para
  linecheck se citan en orden incorrecto. He comprobado esto y he
  hallado que el orden de las opciones que menciono aqu abajo es el
  correcto.

  NOTA: a partir de la versin de term 2.3.0 linecheck ya no necesitar
  tener el nombre del fichero de log en la lnea de comandos.  Escribir
  su salida al fichero linecheck.log en el directorio desde el que se
  ejecute linecheck.

  linecheck es un programa que se entrega con el term.  Comprueba la
  transparencia de un enlace, produciendo informacin de configuracin
  que necesita el term para funcionar correctamente.  linecheck manda
  todos los 256 caracteres de 8 bits posibles sobre el enlace y verifica
  que cada uno se transmite correctamente.

  Hay que configurar term para manejar caracteres que no pueden ser
  transmitidos por el enlace, y linecheck determina cules son estos
  caracteres. Debes usar linecheck despus de haber establecido un
  enlace mdem lo ms transparente posible. Para correr linecheck haz lo
  siguiente:

  1. En el sistema remoto, ejecuta  linecheck linecheck.log

  2. Vuelve a tu sistema local y suspende tu programa de comunicaciones
     (^Z en kermit) (si no te robar caracteres del linecheck).

  3. En el sistema local ejecuta

       linecheck linecheck.log > /dev/modem < /dev/modem

  Cuando termine linecheck encontrars un conjunto de nmeros al final
  de los ficheros linecheck.log. Estos son los que deberas poner como
  linecheck.log local deca que 'escape' era el 29 y 157. As que, mi
  termrc local escapa (evita) estos caracteres y mi termrc remoto
  ninguno. Si se escapa (evita) un carcter en un extremo, tambin debo
  ignorarlo (ignore) en el otro; as que, en este ejemplo, debera
  ignorar 29 y 157 en mi sistema remoto.

  Si linecheck se cuelga, prueba a usar

  linecheck linecheck.log 17 19

  en el sistema remoto, y

       linecheck linecheck.log 17 19 > /dev/modem < /dev/modem

  en el sistema local. Esto evitar tus caracteres de xon/xoff (control
  de flujo), que colgarn tu lnea si tienes control de flujo por
  software. Si soluciona los problemas de cuelgues, tendrs que
  escapar/ignorar 17/19 en ambos termrc. Si tu servidor de terminal
  tiene otros caracteres que lo cuelguen, prueba a correr lineckeck con
  esos caracteres escapados como el ejemplo de arriba. Puedes marcar
  esos caracteres si linecheck se cuelga.  Si es este el caso, mtalo, y
  luego mira en los logs. Los ltimos caracteres transmitidos es
  probable que sean los culpables. Vuelve a intentarlo escapando estos
  caracteres.

  En resumen, mi termrc local tiene las lneas:

       escape 29
       escape 157

  y mi termrc remoto tiene las lneas:

       ignore 29
       ignore 157

  ya que mi linecheck.log remoto deca que 'escape 29 y 157'.

  4.10.  Prueba a correr el TERM

  Accede a tu sistema remoto, haciendo el enlace lo ms transparente
  posible (si no lo has hecho an).  Arranca term en el extremo remoto.
  Yo lo hago as:

       exec term -r -l $HOME/tlog -s 38400 -c off -w 10 -t 150

  Vamos a desgranar las opciones una por una (ten en cuenta que con
  igual facilidad podra poner estas opciones en mi termrc. Lo hice as
  porque evitaba tener que editar un fichero mientras pona a punto el
  term).

  exec implica destruir la shell actual, corriendo en su lugar el
  programa indicado. Ejecuto las cosas con exec porque no pretendo usar
  mi shell de login de nuevo; estara desperdiciando memoria. Si ests
  depurando el enlace y eres capaz de abortar el term remoto, puede que
  no quieras hacer el exec.

  La opcin -r es necesaria slo en un extremo. term ver a este extremo
  como el remoto de la conexin (ten en cuenta que el extremo remoto del
  term puede ser tu propia mquina local). Si no usas esta opcin en un
  extremo los clientes de term se caern espontneamente.

  -l $HOME/tlog. Esto registra los errores en el fichero tlog en mi
  directorio home. Muy til para depurar. No hay razn para no ponerlo.

  -s 38400 : Tengo un mdem 14400, con compresin. Para ratios de
  compresin ptimos, necesito poder mandar bits al pipe lo ms rpido
  posible. Para un mdem ms lento, debera ser un nmero menor. Fjate
  que si tienes una UART 16450 en tu puerto serie, las velocidades altas
  pueden provocar prdida de datos por desbordamiento del chip de tu
  puerto serie.  term se recuperar de esto, pero si ves muchos mensajes
  en tu log, (o recibes ``overrun warnings'' en versiones del kernel
  0.99pl15 en adelante) necesitars reducir este nmero.

  -c off : Desactiva la compresin de datos. Tengo un mdem con
  compresin, y no necesito comprimir las cosas dos veces.

  -w 10 -t 150 : De nuevo estas son opciones para optimizar mi enlace de
  mdem rpido. Pongo mi ventana a 10 y mi timeout a 150.  Esto lo hago
  de acuerdo con la recomendacin de la pgina de manual de term_setup.

  Vuelve sobre tu mquina local y suspende tu programa de comunicaciones
  (^Z en kermit). No querrs que est corriendo a la vez que term, ya
  que luchara con el term por el puerto serie.  Si puedes convencer a
  tu mdem de que no cuelgue cuando salgas de tu programa de
  comunicaciones (cuando cambia el DTR), podras salir del programa en
  este punto.

  Ahora lanza el term local. Yo uso:

       term -c off -l $HOME/tlog -s 38400 -w 10 -t 150 < /dev/modem > /dev/modem &

  Necesito decirle al term donde est el mdem; As que apunto tanto la
  entrada como la salida estndar a /dev/modem (eso es lo que hacen < y
  >).  Tambin lo hago correr en background; de modo que puedo usar esta
  consola para otra cosa si la necesito.

  term debera de funcionar ya :-). Prueba con trsh, a ver qu pasa. Si
  se cuelga, o el enlace parece lento, echa una ojeada a tu tlog en
  ambos extremos. Tienes timeouts o mensajes de error?  Si es as,
  entonces es que has configurado algo mal. Vulvelo a intentar (despus
  de que hayas terminado de leer esto :-). Observa que la conexin no
  parecer muy rpida, especialmente si usas compresin - ser un poco a
  saltos. La velocidad real aparece durante transmisiones de ficheros y
  similares.

  4.11.  Terminar tu conexin term

  Muy probablemente, una vez que hayas hecho un montn de trabajo usando
  el term, querrs terminar el trabajo y deshacer tu conexin term. Para
  poder hacer esto hay cuatro formas:

  1. Matar (kill) los programas term a ambos lados de la conexin. Esta
     es la forma menos recomendada de terminar tu conexin.

  2. Una forma mejor es ejecutar el siguiente comando localmente:

          echo '00000' > /dev/modem

  Esto terminar la conexin term correctamente. Funcionar en todas las
  versiones del term. Hay que asegurarse de que la secuencia contiene al
  menos cinco ceros.

  3. En el termrc de versiones 2.0.0 y superiores se puede incluir una
     sentencia terminate <cualquier cadena>. Esto establece una cadena
     que har que salga del term (``00000'' por defecto). Debe ser de
     una longitud de 5 caracteres por lo menos, para evitar
     terminaciones accidentales.

  4. A partir de la versin 1.14 existe el programa tshutdown (realmente
     para la versin 1.14 est disponible como patch, para versiones ms
     recientes se incluye en el paquete). Ejecutando tshutdown, la
     conexin term finalizar perfectamente.

  4.12.  Cmo eliminar TERM  de tus particiones.

  Ok, me habis preguntado por esto. As que voy a presentar los pasos a
  seguir para desinstalar term:

    Eliminar directorios con su contenido. Dependiendo de cmo hayas
     instalado term, tendrs uno o ms de los siguientes directorios:

       $HOME/.term/termrc
       $HOME/.term/termrc.<servidor>
       $HOME/term/termrc
       $HOME/term/termrc.<servidor>
       /usr/local/lib/term/termrc
       /usr/local/lib/term/termrc.<servidor>
       /etc/termrc
       /etc/termrc.<servidor>

  Estos directorios pueden eliminarse con su contenido, usando

  /bin/rm -rf

    El grupo term. En algn momento de la instalacin tuviste que crear
     un grupo llamado term. Busca en /etc/group una lnea con ese grupo
     y brrala.

    Los ejecutables y paquetes del term. Esta es la parte ms difcil.
     Para los ejecutables, busca en el directorio /usr/local/bin o
     $HOME/bin.

     Con otros ejecutables que hiciste compatibles con term no puedo
     ayudarte. Necesitas saber qu ejecutables modificaste para saber
     cules borrar. No olvides ficheros de configuracin y otros que
     vengan con esos ejecutables.

    Ficheros de librera. Lo mejor es teclear lo siguiente:

       cd /
       find . -name libtermnet* -exec /bin/rm {} \;

  Esto encontrar y borrar todos los ficheros de librera relacionados
  por todo tu disco duro.

    Ficheros include. De nuevo, lo mejor es que teclees esto:

       cd /
       find . -name termnet.h -exec /bin/rm {} \;

    Manuales en lnea. Cuando instalaste term los manuales se colocaron
     en uno de los directorios siguientes:

       /usr/local/man/man1
       /usr/local/man/cat1
       $HOME/man/man1
       $HOME/man/cat1

  Debes buscar por lo menos las siguientes pginas de manual:  term,
  term_clients, term_setup, tdownload, linecheck, trdate, trdated,
  termrc, termtest, tmon, tredir, trsh, tshutdown, tudpredir, tupload,
  txconnand y por ltimo, tiptest.

    Directorio temporal del usuario. Borra el directorio
     /usr/tmp/private y sus contenidos.

  Despus de todo este ejercicio, podrs estar bastante seguro de que
  has borrado todo lo relacionado con term.

  4.13.  Optimizacin de la conexin

  Una vez que consigues ejecutar el term, puede que quieras intentar
  optimizar las cosas. Una buena forma de medir la velocidad de tu
  enlace es corriendo tmon en una ventana mientras transfieres un
  fichero en otra. Intenta con ficheros de texto y ficheros comprimidos
  suficientemente grandes; el texto a secas debera dar un factor del
  doble de rpido que el comprimido. Los parmetros que querrs ajustar
  son baudrate [velocidad del puerto]  (-s), compression (-c), windows
  [tamao de ventana]  (-w), timeout [tiempo de espera] (-t) y retrain
  (-A).

  Cuidado con el parmetro retrain. Con la versin 1.19 del term obtengo
  peor rendimiento, que va de un 80% a un 90% comparado con la ejecucin
  del term sin el parmetro retrain. No est claro si se trata de un bug
  en la versin 1.19 y si este problema existe slo en la versin 1.19
  del term.

  Baudrate: el nmero mximo de bits por segundo que el term intentar
  enviar a travs del enlace serie. term evitar enviar caracteres a una
  velocidad superior a sta. Por defecto se usa la velocidad del puerto
  serie del ordenador, pero hay que avisar que sta puede ser demasiado
  alta si el mdem funciona a una velocidad menor sobre la lnea
  telefnica. La opcin baudrate est indicada para sistemas que
  almacenan en buffer la salida al mdem. Durante la configuracin y el
  ajuste es mejor usar un baudrate pequeo que uno que sea demasiado
  grande. Para enlaces de alta velocidad (> 38400), ponerlo sin lmite
  ser probablemente ventajoso. Esto se consigue usando el valor off.
  term confiar entonces solamente en el kernel para controlar el flujo.

  Compression: necesitars poner en on si no tienes un mdem con
  compresin. Si tienes un mdem de stos, pon compression off, de lo
  contrario estars comprimiendo las cosas dos veces, lo que
  habitualmente incrementa la cantidad de datos transmitidos. Los mdems
  con compresin son aquellos que usan los protocolos MNP-5 o V42.bis.
  Observa la documentacin del mdem y el mensaje del mdem cuando
  conecta.

  Windows: este es el nmero de unidades de datos, o paquetes, que el
  term enviar por la lnea antes de obtener reconocimiento (ack) desde
  el term remoto. Para mdems rpidos, aumentar esto puede ser una
  mejora; para enlaces ms lentos esto puede saturar el extremo remoto.

  Timeout: el tiempo que el term esperar a un ack.  Si has aumentado
  windows y ests teniendo timeouts en el fichero de log, prueba a
  aumentar este valor.

  Para un 14400/V42.bis, yo uso -c off -w 10 -t 150. Consigo unos 1700
  cps en ficheros comprimidos y 3500 cps en ficheros ASCII usando
  tupload.

  4.14.  Resolucin de problemas

  En esta seccin se dan algunas opiniones sobre qu comprobar cuando se
  tienen problemas ejecutando el term o alguno de sus clientes.

    Has borrado la estructura de directorios del term? En las nuevas
     versiones del term ha cambiado un par de veces la estructura del
     rbol de directorios bajo /usr/local/lib/term. Si no te has dado
     cuenta de ello, puedes haber causado todo tipo de mensajes de
     error.  Lo mejor es borrar el rbol de directorios bajo
     /usr/local/lib/term (salvando tu termrc) y entonces instalar la
     nueva versin. De esta forma evitas pelearte con un rbol de
     directorios lioso.

    Borraste los sockets antiguos? Cuando pongas al da tu versin del
     term borra todos los sockets (llamados socket=) creados por el
     term. El no hacer esto puede causar extraos problemas.  Para
     averiguar qu socket est atendiendo el term, puedes usar el
     programa netstat.

    El term no compila correctamente en SunOS 4.1.3? Has configurado
     el term con ./configure --user. Durante la compilacin ests
     teniendo un error de ensamblador, relacionado con que el parmetro
     -k no es reconocido.  La razn de este error es desconocida. La
     solucin es configurar el term con libreras estticas. Es decir,
     tendrs que hacer ./configure --user --static y entonces seguir con
     el proceso de compilacin como sueles hacerlo normalmente. Ahora el
     term debera compilar correctamente.

    El termtest te est presentando el error:

       Term: failed to connect to term socket '/root/.term/sockettest'

  (Term: falla la conexin al socket de term '/root/.term/sockettest')

  Cuando termtest corre espera que el ejecutable term est en el mismo
  sitio que ste. Cuando haces un make install antes de ejecutar
  termtest, el binario de TERM es movido a /usr/local/bin (u otro simi
  lar).

  Para ello hay que hacer algo parecido a esto:

       ln -s /usr/local/bin/term /usr/src/term-<numero_de_version>/term

    Ests usando el binario adecuado? El term se ha modificado
     bastante, y muchos sistemas tienen versiones diferentes de los
     programas rondando por ellos. Asegrate de que ests usando la
     versin correcta.  Esto tambin se aplica al linecheck. Puede
     usarse una orden del tipo bash -a, o el comando whereis para saber
     qu programa se est ejecutando. Las versiones de term posteriores
     a 1.11 deberan mostrar su nmero de versin al comenzar. (Aunque
     la versin 1.14 dice ser la 1.12. Sigh.)

    Tienes el termrc correcto en el lugar adecuado? Dependiendo de la
     versin de term que ests corriendo y el modo en que instalaste el
     term (siendo root o usuario) este fichero debe estar en uno de los
     siguientes directorios:

     /usr/local/lib/term/termrc
     /usr/local/lib/term/termrc.<servidor>
     /etc/termrc
     /etc/termrc.<servidor>

  Algunos sistemas tienen termrc's preinstalados; asegrate de que no
  estn antes de instalar. Si ests ejecutando cosas como root, busca en
  /.term.

  El term crea ficheros (sockets en realidad) mientras se ejecuta;  de
  modo que tiene su propio directorio, ~/.term, donde est el fichero
  termrc (ntese, no hay un punto precediendo a termrc!).

    Encuentra el term su fichero termrc? Cuando inicias term a ambos
     lados, deberas ver mensajes como este de abajo:

          Term version: 2.2.9
          Reading file:  /usr/local/lib/term/termrc
          Using shared mode.

  Cuando falta la segunda lnea el term no puede encontrar su fichero
  termrc y sabes que algo ha ido mal durante la instalacin (a no ser
  que no ests usando el fichero termrc y ests introduciendo todas las
  opciones en lnea de comandos :-). Comprueba la localizacin y los
  permisos del fichero termrc en el lugar donde term no puede encontrar
  su fichero termrc.

    Es correcta la sintaxis de las entradas en el termrc? Un problema
     comn es que la gente que necesite usar el escape e ignorar ciertos
     caracteres, los introduzca as en el fichero termrc:

       escape 1,4,30,255
       ignore 1,4,30,255

  Aunque si term no reconoce lo anterior tampoco avisar de ello. Sim
  plemente lo ignorar.

  Cuando tienes que ignorar o ``escapar'' caracteres, tendrs que poner
  los en diferentes lneas del fichero termrc, cada lnea comenzando por
  la palabra escape o ignore. Slo cuando haya que hacerlo con varios
  caracteres deber hacerse de la siguiente forma:

  escape 16-19      # escapar caracteres 16, 17, 18, 19
  escape 23         # 23
  escape 255        # ...y 255
  ignore 16-19      # ignorar caracteres 16, 17, 18, 19
  ignore 23         # 23
  ignore 255        # ...y 255

    Est montado tu directorio term o .term con NFS? Si tu directorio
     term o .term est montado con NFS necesitas poner el parmetro
     -DTERM_NFS_DIR en la lnea CFLAGS del Makefile. Aunque, al autor el
     usar este parmetro le produce un error de compilacin al compilar
     term 1.19 en una mquina con SunOS 4.*.

    Pertenecen los ficheros y directorios al usuario y grupo correcto
     y tienen los permisos adecuados? Esto no debera ser problema ya
     que estos permisos se ponen durante la fase de instalacin. Sin
     embargo, cuando portas tus propios programas a term debes
     prevenirte de ello.  Tambin cuando se cambia el modo en que esta
     trabajando term (por ejemplo de modo privado a modo shared) deben
     adaptarse las propiedades y permisos de ficheros y directorios.

    Ests obteniendo el error gethostbyname: <hostname>: Non-
     authoritative `host not found', o `server failed'?

     Para resolver esto tienes que chequear las siguientes cosas:

     1. Est configurado correctamente el fichero /etc/hosts?
        <hostname> no es el nombre de tu host (las versiones viejas de
        SLS y algunas viejas y nuevas versiones Slackware se entregan
        con el hostname darkstar, por ejemplo). Cambia esto en el
        fichero. Debe contener al menos una lnea como la que sigue (el
        formato se describe encima de ella):

          # Formato del fichero:
          #  IP_NUMBER            HOSTNAME        ALIASES
          #
          # Este es el nombre de tu maquina, en primer lugar, seguido de aliases
          #
          127.0.0.1       localhost       linuxpc.dominio  linuxpc

     Cuando tu nica conexin con el exterior se hace mediante term, la
     lnea anterior es la nica que debe aparecer en /etc/hosts. No pon
     gas otros nodos de Internet en ese fichero, pues term no trabajar
     con ellos.

     2. Puede leer todo el mundo tus ficheros /etc/rc* y
        /etc/resolv.conf?

          chmod ugo+r

     3. Por ltimo, asegrate de haber instalado el loopback-interface
        de TCP/IP en tu mquina. Puedes comprobarlo ejecutando el
        comando ifconfig. Cuando est instalado dicho interface, se ver
        lo siguiente en pantalla:

          lo        Link encap:Local Loopback
                    inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.255.255.0
                    UP BROADCAST LOOPBACK RUNNING  MTU:2000  Metric:1
                    RX packets:0 errors:0 dropped:0 overruns:0
                    TX packets:4984 errors:0 dropped:0 overruns:0

     Durante el arranque tambin puedes ver qu protocolos se utilizan.
     En mi mquina aparece lo siguiente:

          IP Protocols: ICMP, UDP, TCP

     Para ms informacin sobre cmo instalar el loopback-interface,
     lete el NET-HOWTO.

    Ests obteniendo todo tipo de mensajes timed out en tus ficheros
     log de term? Esto significa que tu conexin de term no est
     optimizada. Un pequeo nmero de esos mensajes nunca es problema.
     Estos son debidos muy posiblemente a que los factores temporales
     influyen en la conexin fsica entre tus hosts remoto y local.

     Cuando tienes un montn de estos mensajes todo el tiempo, tu
     conexin se ralentizar considerablemente. Tienes que ajustar los
     parmetros mencionados en la anterior seccin ``''. Adems, esta
     parte de la instalacin es un proceso de prueba y error. No se
     pueden dar unas reglas fijas sobre los valores a colocar en los
     variados parmetros ya que son muchos los factores que influyen en
     la conexin.  Estos factores difieren entre las conexiones e
     incluso en el tiempo.

    No te funcionan los ftp con puertos redirigidos? Es un problema
     habitual con ftp, que necesita trabajar con los puertos 20 y 21. La
     nica solucin es usar una versin TERMificada de ftp o ncftp. Sin
     embargo, algunas de estas aplicaciones adaptadas tampoco
     funcionarn.

  5.  Clientes TERM

  Term proporciona varios clientes por defecto. Esto incluye trsh, tmon,
  tupload, tredir, txconn y en nuevas versiones trdate, trdated.
  Adems, a partir de la versin 2.0.0 est disponible tudpredir y desde
  la versin 2.1.0 tambin tdownload.  Esta seccin har referencia a
  trsh, tmon, tupload, tdownload, trdate y trdated. El resto tiene su
  propia seccin cada uno.  No funcionar ningn cliente de term hasta
  que se haya establecido un enlace term.
  tmon es una utilidad simple para monitorizar las estadsticas del
  enlace. Imprime un diagrama de tiempo de caracteres transmitidos y
  recibidos. Se invoca simplemente como tmon. Desde la versin 1.11,
  tmon ha tenido un bug que provoca que alguna informacin se trunque
  (??).

  trsh es similar a rsh. Sin argumentos, genera una shell interactiva en
  el sistema remoto (esto es, te introduce directamente en el sistema
  remoto). trsh es uno de las principales maneras de acceder al extremo
  remoto del enlace a travs de term. Si se le pasa un argumento, trsh
  ejecuta ese argumento como un comando en el sistema remoto. Por
  ejemplo, con trsh ls se obtendra una lista de ficheros del directorio
  home del sistema remoto.

  tupload transfiere un fichero, si se indica como primer argumento,
  desde el sistema local al remoto. Por defecto los ficheros se pondrn
  en el mismo directorio desde el que se invoc term en el otro extremo.
  Para colocar los ficheros en otro directorio se deben poner sus
  nombres como segundo argumento a tupload. Por ejemplo, si se desea
  poner una copia del fichero term114.tar.gz en /usr/tmp en el sistema
  remoto, se escribira tupload term114.tar.gz /usr/tmp.

  Cuando se usa tupload es posible utilizar comodines como en tupload
  a.*.  La shell expande los comodines y llama a tupload como tupload
  a.1 a.2 ......

  tdownload transferir un fichero, si se indica como primer argumento,
  desde el sistema remoto al local. Por defecto, los ficheros se
  colocarn en el mismo directorio desde el que se invoc al term en el
  lado local. Para colocar los ficheros en otro directorio, hay que
  indicar sus nombres como segundo argumento a tdownload. Por ejemplo si
  se quiere poner una copia del fichero term114.tar.gz en /usr/tmp del
  sistema local, escribira tdownload term114.tar.gz /usr/tmp.

  Cuando se usa tdownload no es posible utilizar comodines como
  tdownload a.*. La razn es que el directorio remoto no est disponible
  para la shell local cuando se usa tdownload; de modo que la shell
  local no puede expandir los comodines.

  trdate es una utilidad de puesta en hora. Lee la hora en la mquina
  remota y pone el reloj local con la hora del remoto. Se debe ejecutar
  como root.

  trdated es la versin demonio de trdate. Cuando se pone en marcha en
  rc.local se ejecuta como un demonio en cuyo caso ajusta el tiempo cada
  5 minutos (por defecto). Incluso si no existe conexin term, este
  demonio se pondr en marcha si se coloca en rc.local. Una vez que se
  cree una conexin term, comenzar a ajustar la hora.

  6.  X y TERM

  term permite a los usuarios abrir ventanas X en la mquina local desde
  clientes que estn corriendo en una mquina de la red. Esto se hace
  usando el cliente txconn. txconn se ejecuta en el remoto, la mquina
  conectada en red; se invoca simplemente como txconn. Se coloca en
  background y devuelve un nmero a la salida estndard; este nmero es
  el nmero de display que los clientes deben usar para acceder al
  servidor X de la mquina local. Un ejemplo aclarar sto. Estoy
  accediendo a mi cuenta, va trsh, en mi host remoto, llamado ``foo''.
  En foo realizo lo siguiente:

  foo$ txconn
  Xconn bound to screen 10
  :10
  foo$

  Ahora, para cualquier host en el que quiera correr un cliente X, o
  sea, verlo en el servidor X de mi mquina local, har:

       setenv DISPLAY foo:10

  (para bash debera usarse export DISPLAY=foo:10). En algunos casos
  adems de eso puede ser necesario hacer un xhost + foo en la mquina
  local. Ahora, cuando arranque el cliente, intentar conectar con la
  pantalla 10 de la mquina foo, pero txconn estar escuchando en esa
  pantalla, y pasar todos los paquetes con protocolo X va term al
  servidor X en el host local; es decir, la ventana se abrir en la
  mquina local.

  Es posible trabajar en el otro sentido - correr un cliente en la
  mquina local y tener abierta la ventana en una mquina remota de la
  red; sin embargo, retrasaremos esta explicacin hasta despus de haber
  comentado tredir.

  txconn no es terriblemente seguro; cualquiera puede conectar con el
  servidor local va term y provocar todo tipo de daos. Si este tipo de
  cosas son preocupantes, podra ser una buena idea considerar el uso de
  xauth para autorizar las conexiones. Consulte la pgina de manual
  sobre xauth.

  El protocolo X no es muy eficiente; desperdicia algo de ancho de
  banda.  Esto no suele ser un problema en una ethernet, pero puede ser
  un crimen va mdem. Se supone que X11R6 presenta una versin de bajo
  ancho de banda del protocolo X, LBX. Si, por el contrario, se est
  usando X11R5 puede recurrirse a una utilidad llamada sxpc que comprime
  el protocolo X, mejorando la respuesta sobre lneas serie. sxpc
  incluye un texto sobre cmo hacerlo funcionar con term, y est
  recomendado. El paquete sxpc tambin explica como usar xauth; por lo
  que est doblemente recomendado.

  7.  tredir

  tredir es una de las utilidades ms potentes de term, permitiendo que
  la mayora de los servicios de red importantes puedan obtenerse en un
  enlace term. Antes de explicar cmo se usa tredir, es necesario dar
  algunas nociones sobre los servicios de red.

  Ya se ha hablado antes sobre los servicios de red, pero no se ha dicho
  exactamente qu son. Los servicios son justo eso - servicios que
  proporciona la red. Ejemplos de servicios incluyen telnet, que
  proporciona logins entre mquinas, el ftp (File Transfer Protocol), o
  Protocolo de Transferencia de Ficheros, que transfiere ficheros entre
  mquinas, y smtp, el protocolo de transmisin de correo, que se usa
  siempre que se enva un correo electrnico.

  Cada servicio de red tiene un nmero de puerto asociado a l. El mapeo
  de nmeros de puerto con los servicios correspondientes se da en el
  fichero /etc/services. Este fichero debera ser el mismo en todas las
  mquinas conectadas a Internet.

  Como se accede a estos servicios? Cada mquina en red corre un
  demonio llamado inetd, el cual escucha los intentos de conexin a los
  puertos de red. Estas peticiones pueden llegar tanto desde la red,
  como desde la propia mquina. Un servicio de red se obtiene conectando
  con un puerto inetd en particular. Cuando se hace una solicitud de
  red, inetd conoce exactamente qu servicio est implicado, por el
  nmero de puerto al que se hizo la solicitud. Si se configura inetd
  para hacerlo, proporcionar el servicio adecuado a la conexin que lo
  solicita. La configuracin de inetd es la que se da en el fichero
  /etc/inetd.conf, que contiene una lista de los servicios que
  proporciona inetd. Para ms informacin vea las pginas de manual de
  inetd e inetd.conf.

  Se puede comunicar directamente con los servicios de red usando telnet
  (ntese bien, no termtelnet). Por ejemplo, para hablar con el demonio
  de sendmail (o smtp) en la mquina nombre_de_mquina;, se puede hacer
  un telnet nombre_de_mquina smtp , o telnet nombre_de_mquina 25, (ya
  que 25 es el puerto asignado a smtp en /etc/services). Debera obtener
  una agradable bienvenida del demonio de la mquina remota. Este es un
  truco muy til para depurar problemas de red y chequear puertos
  redirigidos con tredir (ver abajo).

  tredir funciona de modo similar a inetd. Funciona en background como
  un demonio, escuchando los puertos de red, esperando a una peticin.
  Cuando se hace una solicitud de un servicio, en vez de proporcionar
  ese servicio, como hace inetd, tredir traslada la solicitud a travs
  del enlace term hasta el term remoto, quien hace la solicitud a la
  red, devolviendo el resultado de nuevo por el enlace hasta el cliente
  local. tredir puede trasladar la solicitud a cualquier mquina de la
  red, pero por defecto la enva a la mquina al otro extremo del enlace
  term.  tredir ``redirige'' los servicios TCP (Transmision Control
  Protocol) a travs del enlace term.

  Un ejemplo lo aclarar. Vamos a redirigir un puerto local al puerto
  telnet de la mquina remota. Para hacer esto pondramos tredir 2023
  23.  Ahora, cualquiera que conecte al puerto 2023 de la mquina local
  ser redirigido al puerto 23 (telnet) de la mquina remota. Aqu va
  una sesin de ejemplo; la mquina local es mimaquina.modem.casa y la
  remota es netsun.

       $ tredir 2023 23
       Redirecting 2023 to 23
       $ telnet localhost 2023
       Trying 127.0.0.1...
       Connected to mimaquina.modem.casa
       Escape character is '^]'.

       SunOS UNIX (netsun)
       login:

  Este ejemplo es realmente muy til. Si en su lugar hiciera el tredir
  sobre netsun, entonces podra hacer telnet a mimaquina desde la red
  simplemente conectndome al puerto redirigido de la mquina en red
  (usando telnet) - esto es, telnet netsun 2023.

  El principio general de uso del tredir es redirigir el servicio
  deseado a una mquina de la red. El siguiente ejemplo nos permitir
  leer las News en la mquina local a travs del enlace term desde un
  servidor de News de la red. Las News las proporciona el servicio nntp,
  puerto 119. Todos los lectores de News decentes permiten especificar
  qu puerto van a utilizar, ya sea en un fichero de configuracin o en
  una variable de entorno. Vamos a especificar que el puerto local sea
  el 2119.  Ahora supongamos que el servidor de News es news.domain.org;
  entonces le diremos al software de lectura de News que el servidor
  nntp se encuentra en el puerto 2119 del host local. Como esto
  depender del lector de News que se use, probaremos el enlace con
  telnet en lugar de ejecutar un lector de News:

       $ tredir 2119 news.domain.org:119
       Redirecting 2119 to news.domain.org:119
       $ telnet localhost 2119
       Trying 127.0.0.1...
       Connected to mimaquina.modem.casa.
       Escape character is '^]'.
       200 news.domain.org InterNetNews NNRP server INN 1.4 07-Dec-41 ready
       (posting ok).

  Si ha podido llegar tan lejos, todo lo que tiene que hacer es
  configurar su lector de News para poder leer las News desde casa va
  term.  (ntese bien, si lee las News de este modo, asegrese de que en
  todos los mensajes que deje ponga una cabecera Reply-To: a una
  direccin de correo en la que pueda ser localizado, o de lo contrario
  la gente que quiera ponerse en contacto con Ud. mandar el correo a
  cualquier dato que su lector de News ponga en la cabecera From:).

  7.1.   tredir  puede morder!

  El astuto lector, tras leer el ltimo ejemplo se preguntar porqu se
  redirigi en puerto 2119 al puerto 119 --ya que el puerto por defecto
  de los lectores de News es el 119--, porqu no podra hacer un tredir
  119 news.domain.org:119 y evitar la configuracin del lector de News?
  La respuesta es que todos los puertos con nmeros inferiores a 1024
  son ``puertos reservados'', y nicamente el superusuario puede
  escucharlos. Si se desea tomar un riesgo en seguridad y hacer de
  tredir un programa suid, o ejecutar tredir como root, entonces se
  pueden redirigir puertos reservados y evitar as la molestia de
  renombrar servicios.

  Otro problema de usar los puertos reservados es que inetd a menudo ya
  est escuchando en esos puertos, y solamente un programa puede
  escuchar un puerto a la vez. Si se quiere usar tal puerto, se debe
  cambiar inetd.conf de modo que inetd ya no escuche en ese puerto que
  se quiere redirigir.  Esto se hace fcilmente comentando la lnea
  correspondiente al servicio poniendo el carcter # al comienzo de la
  misma. El superusuario tiene que mandar una seal HUP a inetd (kill -1
  <inetd-pid>) para hacer que vuelva a leer su configuracin.

  7.2.  Trucos tontos de tredir

  En esta seccin describiremos algunos de los usos ms comunes de
  tredir. Ya hemos descrito como redirigir los servicios nntp y telnet;
  Ahora daremos algunos ejemplos ms complicados.
  7.2.1.  X window

  En una seccin previa, se describi como hacer que un cliente X que
  corre en la red abra una ventana en la mquina de casa usando txconn.
  La misma tcnica se podra usar en la mquina de casa para mostrar un
  cliente en la mquina del lado remoto del enlace term. Pero cmo
  puede uno ver un cliente X en una mquina de red que no es el extremo
  remoto? La respuesta se basa en conocer que X usa un servicio de red
  concreto igual que los otros programas que hemos explicado. Un
  servidor X escucha peticiones de red en un puerto cuyo nmero viene
  dado por la frmula: puerto = 6000 + nmero de display, p.ej. un
  servidor X manejando la pantalla 0 en una mquina escuchara el puerto
  6000, si estuviramos manejando la pantalla 2, escuchara el puerto
  6002. Si se pone la variable de entorno DISPLAY en maquinaX:n, los
  clientes X tratarn de conectar con el puerto 6000+n de maquinaX.

  Podemos usar esto para trucar los clientes X de la mquina local y
  abrir ventanas en displays remotos. Supongamos que quiero abrir un
  xterm, corriendo en mi mquina local, en el display 0 de la mquina
  maquinaX, que esta corriendo en algn lugar de la red. Primero
  escoger un nmero de display local, digamos que el 2 (no se usa el 0,
  ya que es el que estar usando el servidor X local). Mapear este
  display al display 0 de maquinaX.  En trmino de puertos, esto
  significa que quiero redirigir el puerto local 6002 al puerto remoto
  6000. Har lo siguiente:

       $ tredir 6002 xmachine:6000
       $ setenv DISPLAY localhost:2
       $ xterm

  Esto debera abrir un xterm en la mquina maquinaX. Observe que he
  puesto el DISPLAY a localhost:2. Esto es porque los clientes X usan a
  veces sockets de dominio unix en lugar de sockets de dominio Internet,
  a su propio criterio, cuando conectan con un display local, si DISPLAY
  se pone a :2.  localhost:2 indica que use una conexin TCP.

  Observe que en lo que concierne a maquinaX, la solicitud X viene de la
  mquina del extremo remoto del enlace term (mquinaremota) - de modo
  que si necesita autorizar la conexin, debera hacer bien xhost +
  mquinaremota en maquinaX, o bien usar xauth para actualizar el
  fichero .Xauthority en su mquina local para el display nmero 2,
  usando la clave de maquinaX.

  De nuevo, para acelerar las conexiones X, se puede usar el programa
  sxpc, que incluye una explicacin sobre cmo usar tredir para
  establecer el enlace y autorizarlo usando xauth.

  7.2.2.  Correo con TERM

  Est bien, vosotros lo pedsteis. El correo electrnico tiene la
  justificada reputacin de ser una de las cosas ms dificiles de hacer
  funcionar bien en un sistema UNIX. Para conseguir que el term funcione
  correctamente con el correo es preciso entender cmo funciona el
  correo, lo cual va ms all del objetivo de este documento.

  Para aprender ms sobre correo, debera consultar un libro de
  administracin de sistemas UNIX y/o la FAQ de la conferencia
  comp.mail.misc, disponible en el ftp annimo de
  ftp://rtfm.mit.edu/pub/usenet/comp.mail.misc.

  Tambin tiene a su disposicin 2 paquetes en el ftp annimo de
  sunsite.unc.edu que le ayudarn a poner en marcha el correo bajo term
  - son term.mailerd+smail de Byron A. Jeff y BCRMailHandlerXXX de Bill
  C. Riemers.

  Como se ha dicho, haremos una breve descripcin de como funciona el
  correo electrnico. Hay dos partes que hacen funcionar el correo, el
  envo de mensajes y la recepcin de los mismos. Comenzaremos con el
  envo de mensajes desde su ordenador local a la red.

  Hay dos clases de programas de correo. El primero es el Agente de
  Correo de Usuario (MUA - Mail User Agent). Los MUAs ayudan a leer,
  componer y mandar mensajes. Ejemplos de MUAs son el elm, pine, mail y
  vm. Los MUAs no usan para nada la red; solamente agrupan los mensajes
  - el trabajo duro de envo de correo se hace a travs de la segunda
  clase de programas, los agentes de transferencia de correo (MTA - Mail
  Transfer Agent). Estos son invocados desde los MUAs. Toman el mensaje,
  deciden dnde enviarlo observando la direccin, y finalmente lo envan
  a travs de la red.

  Los dos MTAs mas comunes en sistemas Linux son sendmail y smail. La
  idea bsica es hacer que su MTA se conecte a otro MTA que est
  corriendo en otra mquina de la red que sepa qu hacer con su mensaje.
  Esto se consigue redirigiendo un puerto local hacia el puerto smtp de
  la mquina en red.  Entonces debe indicar a su MTA que tome todos los
  mensajes con los que no sepa que hacer, y los enve fuera a travs del
  puerto redirigido de su mquina local al MTA de la mquina remota, la
  cual encaminar los mensajes hacia su destino correcto.

  Cmo hacemos esto usando smail? Primero redirigiremos un puerto al
  puerto smtp de la mquina de correo de la red (mailhost):

       tredir XXXX mailhost:25

  donde XXXX es el nmero de puerto al que se conecta smail en el host
  local (tenga en cuenta que hay que dar un nombre al puerto en
  /etc/services para hacer que smail lo reconozca). smail tiene varios
  ficheros de configuracin que generalmente estn en
  /usr/local/lib/smail.  Los que nos interesan son config, routers y
  transports.  Observar que presumimos que ya ha configurado smail
  correctamente para el correo local - envo a ficheros y tuberas y
  dems cosas. De nuevo, consulte la documentacin si no lo ha hecho.

  En el fichero config, ponemos la siguiente definicin:

       smart_path=localhost

  localhost es la mquina a la que se conecta smail cuando no sabe que
  hacer con un mensaje.

  En routers ponemos:

       smart_host:
       driver=smarthost,
       transport=termsmtp;
       path = localhost

  En transports ponemos:

       termsmtp:        driver=tcpsmtp,
               inet,
               return_path,
               remove_header="From",
               append_header="From: SU_DIRECCION_DE_RED",
               -received,
               -max_addrs, -max_chars;
               service=SU_SERVICIO_SMTP,

  En el de arriba, las lneas header cambian la cabecera From en todo
  correo saliente por la direccin SU_DIRECCION_DE_RED, que ser la
  direccin de red a la que quiere que le enven el correo. Si su enlace
  term va a ser usado por ms de una persona, tendr que hacer algo ms
  laborioso, como mantener una base de datos de direcciones de red de
  usuarios locales e insertar las mismas en las cabeceras From:.

  La lnea service es el nombre del nmero de puerto local que ha
  redirigido al puerto smtp de la mquina conectada a la red. En mi
  versin de smail no es posible ponerlo como un nmero, asi que tengo
  que ponerlo como un nombre, como ``foo'', y entonces definir ``foo''
  en /etc/services de modo que sea el nmero del puerto redirigido. Si
  usa un suid de tredir y se redirige el puerto smtp (25), no es
  necesario definir esto.

  Esto debera ser suficiente para hacerlo funcionar. Si decide usar
  sendmail la base es la misma pero difiere en los detalles. Ronald
  Florence (ron@mlfarm.com) me dijo que el sendmail de Sun no mandar
  mensajes mltiples encolados a travs de un puerto redirigido; el
  sendmail 8.6.9 de BSD funciona bien. l hizo los siguientes cambios al
  sendmail.cf para que funcionase con term.  En este caso se usa el
  puerto por defecto de sendmail (25) para el trfico sobre una ethernet
  local de forma que el correo Internet se pasa al puerto TCP
  redirigido.

       #
       # Crear el mailer termsmtp, el cual envia el correo via el puerto TCP
       # redirigido
       #
       Mtermsmtp,P=[TCP], F=mDFMuCXe, S=22, R=22, A=TCP $h PORTNUMBER

  Aqu, PORTNUMBER es el nmero del puerto redirigido en la mquina
  local. Este debera ser un puerto sin usar por encima del 2000.
  Seguidamente le decimos a sendmail a que mquina conectarse, y ponemos
  a termsmtp como mailer por defecto.

       #
       # relevo de correo principal
       #
       DMtermsmtp
       #
       # maquina del relevo principal: usa el mailer $M para enviar el
       # correo de otros dominios
       #
       DR HOSTNAME
       CR HOSTNAME

  Aqu HOSTNAME es el nombre de tu host local (funcionar localhost?).
  La ltima entrada va debajo de Rule 0 para pasar el correo Internet.

       # Pass other valid names up the ladder to our forwarder
       R$*<@$*.$+>$*           $#$M    $@$R $:$1<@$2.$3>$4     user@any.domain

  Cuando la conexin term se haya establecido con el host Internet,
  ejecute los siguientes comandos en la mquina local.

       tredir PORTNUMBER internet.host:25
       /usr/lib/sendmail -q

  Pasamos ahora a la recepcin de correo electrnico usando term.
  Asumiremos que el correo se enva a su cuenta en el servidor de correo
  (mailhost) de la red. La solucin ms simple es usar trsh o termtelnet
  para acceder al servidor y leer su correo all.

  Sin embargo, tambin es posible hacer pasar el correo automticamente
  a su mquina local. Una forma de hacer esto es usar el Post Office
  Protocol, (POP). POP fue diseado precisamente para este propsito:
  enviar correo a mquinas que tienen conexiones de red espordicas.

  Para usar POP ha de tener instalado un servidor POP en mailhost.
  Suponiendo que lo tiene, puede usar entonces un cliente POP para
  recoger su correo cada poco tiempo. Esto se hace, como podra esperar,
  usando tredir. El servicio POP es el 110 (Observe que hay un protocolo
  ms antiguo, POP-2, que usa el puerto 109; en este documento
  describiremos POP-3, que es la ltima versin de POP). Hay varios
  clientes POP disponibles. Uno, escrito en el lenguaje de scripts perl,
  es pop-perl-1.X, escrito por William Perry y mantenido por m mismo -
  puede encontrarse en sunsite en /pub/Linux/system/Mail.

  Para usar POP se redirige un puerto local al puerto 110 de mailhost y
  se configura el cliente para recoger su correo de localhost usando el
  puerto local. Como ejemplo, supongamos que hay un servidor POP
  corriendo en mailhost. Redirigiremos en puerto local 2110, y
  ejecutamos el cliente pop-perl:

  $ tredir 2110 mailhost:110
  Redirecting 2110 to mailhost:110
  $ pop
  Username: bill
  Password: <introduzca su password para mailhost>
  Pop Host: name of local
  Pop Port: 2110
  Starting popmail daemon for bill

  Si no tiene un servidor POP disponible, el paquete BCRMailHandler
  tiene un programa para capturar su correo desde un enlace term hasta
  su mquina local. No lo he usado, pero cualquier comentario de alguien
  que lo haya hecho ser bienvenido. Tambin puede usar el paquete
  term.mailerd+smail para este propsito. Sin embargo, BCRMailHandler y
  term.mailerd+smail ya no funcionan con versiones de term 2.0.0 o
  superiores.

  8.  tudpredir

  tudpredir es similar a tredir si se observa lo que estos programas
  hacen y cmo se ejecutan. La gran diferencia entre los dos es que
  tredir se usa para redirigir servicios de red TCP, mientras tudpredir
  redirige servicios de red UDP (User Datagram Protocol) a travs de un
  enlace term. Una diferencia ms importante entre los dos programas es
  que tredir se convierte en un demonio en segundo plano una vez que se
  ha establecido el puerto local, mientras los comandos tudpredir hay
  que ponerlos en segundo plano manualmente.

  El formato de una llamada a tupredir es:

       tudpredir [esta_maquina:]puerto [la_otra_maquina:]puerto

  9.  Automatizando las cosas.

  Ahora que ya sabe cmo conseguir todos los servicios de red sobre
  term, sera bonito colocar las cosas de tal modo que su enlace se
  establezca y configure automticamente. Bsicamente hay infinitas
  formas de hacerlo, dependiendo de que programa de comunicacin utilice
  y cmo acceda a su sistema remoto.

  Un programa que yo no he usado, pero que he odo que es bastante
  agradable, es fet: un front-end para term. Est diseado para
  introducirle en un sistema remoto y poner en marcha term y todos sus
  tredirs. Cualquier comentario sobre fet ser bienvenido.

  Le dar un ejemplo de una serie de comandos que usa kermit para
  introducirse en el sistema remoto y que efecta todas las
  inicializaciones de term. Obviamente, si usa estos ejemplos, tendr
  que modificarlos para sus propios procedimientos de acceso.

  El comando que se invoca en este caso es la shell script knet, dada
  por:

       #!/bin/sh
       /usr/bin/kermit -y $HOME/.kerm_term > $HOME/klog < /dev/null 2>& 1
       exec $HOME/bin/tstart >> $HOME/klog 2>& 1

  La script .kerm_term viene dada por:

       pause 2
       # El numero al que llamar
       output atdtXXXXXXX \13
       # Acceso al servidor de terminal
       input 145 {name: }
       output MYNAME \13
       input 3 {word: }
       output MYPASSWORD \13
       input 5 {xyplex>}
       # Hacer la linea transparente
       output term telnet-t \13
       output term stopb 1 \13
       # Conectar al host remoto
       output telnet remotehost.somedomain.org \13
       input 10 {ogin: }
       output MYOTHERNAME \13
       input 3 word:
       output MYOTHERPASSWORD \13
       pause 5
       # Lanzar term en el host remoto
       output exec term -s 38400 -l $HOME/tlog -w 10 -t 150  \13
       ! /usr/bin/term -r -l $HOME/tlog -s 38400 -c off -w 10 -t 150 < /dev/modem  > /dev/modem &
       # Abrir otros clientes aqui
       suspend
       !killall -KILL term

  y finalmente, el script tstart que lanza los clientes term es:

  #!/bin/sh
  #
  # Esto hace que salga el correo, pueda leer news, y pueda recoger correo.
  #
  /usr/local/bin/tredir 2025 25 2119 newshost:119 2110 pophost:110
  #
  # Puedo abrir una Xwindow aqui
  #
  /usr/local/bin/trsh -s txconn
  #
  # Ahora recibire el correo....
  #
  /usr/local/bin/pop
  #
  # Limpiar la cola, en caso de boo-boos
  #
  /usr/bin/runq
  #
  # Acabado
  #
  echo ^G^G > /dev/console

  Cuando por fin quiera cerrar la conexin, retoma y termina el kermit.
  La ltima lnea del script mata el term local y al sistema a su estado
  inicial. (--  Nota del autor: en lugar de hacer !killall -KILL term,
  creo que sera posible hacer solamente !tshutdown. Funcionar esto
  tambin?  --)

  Como ya dije, hay zillones de formas de hacerlo; estas slo se han
  citado como ejemplos para que pueda comenzar. Otros ejemplos pueden
  encontrarse en los paquetes autoterm y JoelTermStuff.

  10.  Portando software para usarlo con term .

  En principio, todos los programas que se puedan usar sobre una red
  pueden usarse en combinacin con term. Algunos de ellos podr
  encontrarlos ya como binarios con soporte para term. Esto incluye
  telnet, (nc)ftp, mosaic y muchos otros. La mayora de estos programas
  se han compilado para term 1.17 o anteriores. A pesar de eso, an
  deberan funcionar con versiones ms nuevas de term.

  Otra forma de hacer que los programas funcionen con term es portarlos
  usted mismo. Este proceso es el que se describe en la siguiente
  subseccin.

  El ltimo modo de compatibilizar sus programas con term es
  termificndolos.

  10.1.  Portar y compilar los fuentes.

  Portar software a term se puede hacer usando un procedimiento bastante
  sencillo:

  Si est instalado en /usr/local por root:

  1. Aada a los flags de compilacin -include
     /usr/local/include/termnet.h

  2. y aada a la lista de libreras -ltermnet

  Si est instalado en su directorio home:

  1. Aada a los parmetros de compilacin -include $HOME/term/termnet.h

  2. y aada a la lista de libreras -L$HOME/term -ltermnet

  Ahora compile el software como se describe en el documento INSTALL o
  README que venga con el software. Ya estara todo!

  En este momento los comandos deberan funcionar con y sin term.

       telnet localhost

  no usa term para conectar, pero

       telnet bohr.physics.purdue.edu

  usar term slo si no hay otro tipo de conexin de red.

  Algunos comandos, como rlogin, slo pueden ser usados por root y por
  el propietario de la conexin term (personas privilegiadas).

  Algunos comandos term sern transparentes a term y slo usarn term
  cuando no haya otra opcin. Algunos ejemplos tpicos son telnet y ftp.

  Otros requieren un parmetro externo para indicarles que les es
  posible usar term. En estos programas se incluyen xarchie, fsp e
  ytalk.

  Se puede poner el parmetro a estos programas para que usen term, bien
  colocando la variable de entorno TERMMODE como se especifica en
  README.security, o bien, ejecutando make installnet.  Eventualmente,
  el fichero termnet creado contendr instrucciones de red especficas,
  pero por ahora slo est probada su existencia.

  Si se aade una conexin ethernet, puede simplemente quitar el fichero
  termnet y continuar usando los mismos binarios!

  NOTA: Aquellos programas que fueron portados en los tiempos del
  client.a, an pueden ser recompilados para usarlos con versiones
  nuevas de term cambiando simplemente la referencia a client.a por
  libtermnet.a.

  10.2.  Termificar  ( termify ).

  Este paquete convertir los binarios enlazados dinmicamente para usar
  term.

  Antes de poder termificar deber asegurarse de que tiene una versin
  2.2i (en esta versin 2.2.8?) de term o posterior y libc.so.4.5.26 o
  posterior.  Entonces hay que crear el fichero libt.so.4 en el
  directorio /lib (ver el fichero README del paquete).

  El problema en este momento es que hay que rehacer el fichero
  libt.so.4 cada vez que renueve la versin de term.

  Despus de crear la librera podr dejar que termify ``digiera'' al
  programa que se quiere hacer term-compatible, usando el comando:

       termify <programa>

  Si no le gusta el resultado puede des-termificar el programa que acaba
  de termificar, usando el comando:

       termify -u <programa>

  Por fin, el paquete tambin contiene un script para termificar
  completamente smail; de modo que no son necesarias definiciones
  especiales de transporte. La nica cosa que quiz quiera cambiar es la
  direccin del From:.

  11.  Clientes term .

  11.1.  Clientes term  disponibles en los servidores ftp .

  A continuacin se da una lista de aplicaciones que corren con term. Yo
  no digo que esta lista est completa; as que cualquier aadido ser
  bienvenido. Siempre que sea posible indicar el site y directorio
  donde se pueda encontrar la aplicacin. Si indico sunsite.unc.edu (--
  En Espaa contamos con un magnfico y veloz mirror de SunSite,
  localizable en sunsite.rediris.es--) como el lugar donde encontrar la
  aplicacin, quiero decir que puede encontrarla en uno de los dos
  directorios siguientes:

  1. ftp://sunsite.unc.edu/pub/Linux/apps/comm/term/apps

  2. ftp://sunsite.unc.edu/pub/Linux/apps/comm/term/extra

  All vamos! :-)

  paquete TERM:

  tupload
  tdownload           (versiones 2.1.0 y posteriores)
  trsh
  tmon
  tredir
  tudpredir           (versiones 2.0.0 y posteriores)
  txconn
  trdate(d)
  tshutdown
  libtermnet

  Transferencia de ficheros:

       ftpd                sunsite.unc.edu
       termncftp           sunsite.unc.edu
       ncftp185            sunsite.unc.edu:/pub/Linux/system/Network/file-transfer
       fsp                 sunsite.unc.edu:/pub/Linux/system/Network/file-transfer

  Sistemas de Informacin:

       lynx
       Mosaic              sunsite.unc.edu:/pub/Linux/system/Network/info-systems/Mosaic
       chimera
       netscape            sunsite.unc.edu:/pub/Linux/system/Network/info-systems
       httpd
       xgopher
       gopher              sunsite.unc.edu

  Acceso remoto:

       termtelnet          sunsite.unc.edu
       rlogin              physics.purdue.edu:/pub/bcr/term/extra
       rsh                 physics.purdue.edu:/pub/bcr/term/extra

  Noticias (news):

       tin 1.3             sunsite.unc.edu:/pub/Linux/system/Mail/news
       news2               sunsite.unc.edu

  Correo:

  slurp               sunsite.unc.edu
  smail               sunsite.unc.edu
  term.mailerd+smail  sunsite.unc.edu
  BCRMailHandlerXXX   physics.purdue.edu:/pub/bcr/term

  Scripts automatizadores:

       JoelTermStuff       sunsite.unc.edu
       autoterm            sunsite.unc.edu
       fet                 sunsite.unc.edu

  Otros programas:

       inetd               sunsite.unc.edu
       rdate               sunsite.unc.edu
       xgospel             sunsite.unc.edu:/pub/Linux/games/x11/networked
       termify             physics.purdue.edu:/pub/bcr/term/extra
       xboard              sunsite.unc.edu
       ircII               sunsite.unc.edu:/pub/Linux/system/Network/chat
       whois
       xwebster            sunsite.unc.edu
       sxpc                ftp.x.org:/R5contrib
       xztalk              sunsite.unc.edu:/pub/Linux/apps/sound/talk

  11.2.  El paquete termnet .

  El paquete termnet-2.0.4-Linux-bin.tar.gz
  (ftp://sunsite.unc.edu/pub/Linux/apps/comm/term) contiene un par de
  clientes precompilados, un par de scripts, pginas de manual y
  libtermnet.so.2.00.04.  Los clientes se han compilado usando esta
  versin de libtermnet.so. El paquete contiene los siguientes clientes:

       fet         perl        sperl4.036  tmon        tshutdown   xgopher
       finger      perl4.036   suidperl    trdate      tudpredir   ytalk
       ftp         rcp         taintperl   trdated     tupload
       fwhois      rlogin      telnet      tredir      txconn
       ncftp       rsh         term        trsh        xarchie

  AVISO: El paquete tambin contiene el conjunto completo de clientes
  compilados de term 2.0.4 incluyendo el mismo term. No instale este
  paquete hasta que est seguro de lo que quiere. Destruir otras
  versiones de term y sus clientes si empieza a enredar con los
  ejecutables.

  11.3.  Solicitado, pero an no soportado:

  1. DOOM: El problema con este juego parece ser el hecho de que usa el
     puerto 5029 ya sea como cliente o como servidor.

  2. NFS: El servidor NFS se supone que slo acepta llamadas si el
     socket que solicita la conexin est ligado a un puerto por debajo
     del 1024. Esto parece ser problemtico. Sin embargo, algunos
     servidores NFS tienen una opcin insegura. En este caso NFS podra
     funcionar ocasionalmente, si se le aade al term soporte RPC.

  12.  Term  y la seguridad

  En esta seccin puntualizar algunos aspectos sobre la seguridad
  usando TERM. Los problemas sern expuestos junto a un mecanismo para
  aumentar su seguridad.

  12.1.  trsh .

  trsh es inseguro si se usa para acceder al Linux local desde el
  sistema remoto. El problema con TERM y sus clientes es que en el otro
  extremo de la comunicacin el superusuario puede ejecutar programas de
  TERM.

  Esto tambin indica que el ``root'' del otro sistema puede ejecutar
  trsh y entrar con los privilegios del propietario de la conexin
  fcilmente. Si este propietario es ``root'' la habremos liado.

  La solucin es simple: poner la siguiente lnea en el fichero termrc
  de la mquina local:

       denyrsh on

  Con esto, nadie podr usar trsh desde el sistema remoto para entrar en
  el local. Cuando t mismo quieras entrar, podrs hacerlo an usando
  telnet y puertos redirigidos.

  12.2.  txconn  y xauth

  txconn no es terriblemente seguro; cualquiera puede conectar al
  servidor local con term y hacer de todo. Si te preocupa, puedes usar
  xauth para establecer las autorizaciones de acceso. Mira el ejemplo de
  la siguiente seccin.

  12.3.  sxpc , xhost  y xauth

  sxpc en combinacin con xhost + es muy peligroso si no usas xauth.

  Usar xauth es muy importante para mantener la seguridad cuando se usa
  sxpc. Si no usas xauth al usar sxpc, ser muy peligroso tener xhost +.
  Algunos peligros son:
    Alguien puede saber lo que hay en tu pantalla

    Alguien puede saber lo que tecleas

    Alguien puede teclear sobre alguna de tus ventanas (por ejemplo, un
     comando que borre tus ficheros :-( )

  xauth forma parte de las versiones R4 y posteriores de X. Aqu
  describiremos cmo usar bsicamente el xauth. Esta configuracin es
  vulnerable al husmeo de la red, pero puede convivir con ella
  fcilmente.

  NOTA: cuando uses xauth asegrate que la variable $DISPLAY no tiene el
  valor localhost (o localhost:loquesea). Si tu variable $DISPLAY vale
  localhost, los clientes no podrn encontrar la informacin de
  autorizacin. Lo mejor es usar el nombre real de la mquina. Si sigues
  las instrucciones de compilacin del README, y compilas sin la
  variable -DNOGETHOSTNAME puede que todo funcione.

  Sea C la mquina que ejecuta clientes, y D la mquina que pone la
  pantalla.

  Primero, elige una ``clave'', de hasta 16 pares de dgitos
  hexadecimales (nmeros del rango 0-9 y a-f). Necesitars proporcionar
  esta clave en el lugar de <clave> en este ejemplo:

  En C:

       % xauth
       xauth:  creating new authority file $HOME/.Xauthority
       Using authority file $HOME/.Xauthority
       xauth> add Nombre_de_C:8 MIT-MAGIC-COOKIE-1 <clave>
       xauth> exit

  En D:

       % xauth
       xauth:  creating new authority file $HOME/.Xauthority
       Using authority file $HOME/.Xauthority
       xauth> add Nombre_de_D/unix:0 MIT-MAGIC-COOKIE-1 <clave>
       xauth> add Nombre_de_D:0 MIT-MAGIC-COOKIE-1 <clave>
       xauth> exit

  Cuando inicies el servidor X en D deberas poner el parmetro -auth
  $HOME/.Xauthority. Puede que necesites crear o editar el fichero
  $HOME/.xserverrc para controlar el inicio del servidor X. Por ejemplo:

       #!/bin/sh
       exec X  -auth $HOME/.Xauthority $*

  Asegrate que el fichero .Xauthority es legible slo por C y por D.

  13.  Cosas a recordar

  En esta seccin intento obsequiarle con una lista de direcciones ftp
  de utilidad, URL's, etc. donde puede encontrar software e informacin
  sobre term.

  Ftp:

    ftp://sunsite.unc.edu:/pub/Linux/apps/comm/term/

    ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO/

    ftp://physics.purdue.edu:/pub/bcr/term/

  URL:

    http://sunsite.unc.edu/mdw/HOWTO/Term-HOWTO.html

    http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html (siempre
     tiene la ltima versin)

    http://physics.purdue.edu/~bcr/homepage.html

  Netnews:

       comp.os.linux.announce           aqui se anuncian nuevas versiones de term
       comp.os.linux.help               aqui puede poner sus dudas sobre term
       comp.os.linux.misc               o aqui
       comp.protocols.misc              las respuestas a las preguntas son enviadas aqui.

  Cuando comience a hacer preguntas en las news, por favor, asegrese de
  que da a la gente del grupo tanta informacin como necesitan para
  resolver su problema (versin de term, de qu modo establece su
  conexin, etc.).

  En este momento hay en uso muchas versiones de term y todas ellas
  tienen sus problemas comunes y especficos. Adems, cuando quiera una
  respuesta til, al menos indique qu versin de term est usando. De
  lo contrario, en algunos casos slo por adivinacin ser posible
  ayudarle a resolver sus problemas.

  Documentos relacionados:

    Using Term to Pierce an Internet Firewall HOWTO de Barak
     Pearlmutter,
     bap@learning.scr.siemens.com

    Cortafuegos-Como (-- Disponible en castellano, consulte la seccin
     ``''--) de David Rudder, drig@execpc.com

    Serial HOWTO, de Greg Hankins, gregh@cc.gatech.edu

    Net-2/Net-3 HOWTO de Terry Dawson, terryd@extro.ucc.su.oz.au

  14.  Estabilidad de las versiones de term

  Hay muchas versiones de term rondando en estos momentos. El que
  mantiene el term, Bill Riemers, ha hecho una lista de versiones de
  term indicando qu versiones son estables y qu versiones es mejor
  evitar. La lista es la siguiente:

             term110          --> no puedo decir con seguridad
             term111          --> no puedo decir con seguridad
             term112          --> no puedo decir con seguridad
             term113          --> no puedo decir con seguridad
             term114          --> version BETA bastante estable
             term115          --> version BETA inestable BETA
             term116          --> version BETA inestable BETA
             term117          --> version BETA inestable BETA
             term118          --> version BETA semiestable
             term119          --> version GAMMA estable
             term-2.0.X       --> BETA versiones BETA semiestables
             term-2.1.X       --> mas versiones BETA estables
             term-2.2.X       --> nuevas versiones BETA
             term-2.3.X       -->

  15.  Tabla de velocidad de term .

  Gracias a Bill McCarthy ahora disponemos de una tabla con informacin
  de la velocidad de term para diferentes mdems, versiones de term y
  condiciones de conexin. El propsito es dar, tanto a los usuarios
  nuevos como a los experimentados, una idea de lo que otra gente est
  usando y los resultados que consiguen.

                             LINUX TERM CHART 8/14/94

  |___velocidad/marca____|___vel. linea__|__cps med__|__max.__|__ver term_|
  | 1)  USR SP 14.4      |   9600        |  950      |  963   | 1.17      |
  | 2)  USR SP 14.4      |  14400        | 1376      |  n/a   | 1.18p06   |
  | 3)  Zoom 2400        |   2400        |  220      |  230   | 1.19      |
  | 4)  Boca V.32bis 14  |  57600        | 1400      |  n/a   | 1.01/09?  |
  | 5)  Viva 14.4        |  14400        | 1300      |  n/a   | 1.16      |
  | 6)  USR SP 14.4      |  14400+       | 1550      | 1680   | 1.19      |
  | 7)  Intel 14.4 Fax   |  14400        | 1400      | 1650   | 2.0.4     |
  | 8)  cable tv hookup  |  57600        | 1500      | 1800   | 1.18p06   |
  | 9)  Twincom 144/DFi  |  57600        | 1500      | 4000?  | 2.0.4     |
  | 10) USR SP 14.4      |  14400        | 1200      | 1500   | 1.08      |
  | 11) cable tv hookup  |  19200        | 1300      | 1800   | 1.19      |
  |-----------------------------------------------------------------------|

  +parametros en el termrc:

  1) default escapes   2) window 5       3) baudrate 2400    4) n/a
   baudrate 9600        timeout 200       window 3
   window 10                              noise on
   timeout 150

  5) compress off      6) baudrate 19200  7) ignore 19+17    8) compress off
   window 10            compress on        window 4           escape 0, 13,
   timeout 150                             timeout 90         16-19, 255
   baudrate 38400                                             baudrate 0
                                                              shift 224
                                                              flowcrtl 500
                                                              window 10
                                                              timeout 70
                                                              retrain on
                                                              breakout 24
  9) compress off     10) compress off      11) baudrate 19200
   baudrate 57600       baudrate 38400        compress on
   window 10            escape 17, 19         shift 224
   timeout 200          remote                escape 0, 13 16-17
   noise on                                   19, 255
   share on                                   window 10
   remote                                     timeout 40

  Escapar caracteres en un extremo implica ignorarlos en el otro extremo.

  16.  Pistas y trucos encontrados en la red

  En los grupos de news relacionados con Linux surgen de nuevo muchas
  preguntas sobre term cada 15 das, junto con las respuestas a estas
  preguntas. Para reducir el trfico del grupo de news, intentar hacer
  un resumen de esas preguntas y las respuestas a las mismas. Algunas de
  las respuestas han sido probadas por m, ya que tambin tuve los
  citados problemas. Otras simplemente las he tomado sin comprobarlas.

    Mucha gente, en especial los que usan Ultrix, parecen tener
     problemas con el vi porque les muestra menos de 24 lneas en
     ventanas con 24 lneas. Hay dos formas de resolver este problema:

     1. Acceda al sistema remoto usando:

          trsh -s telnet <hostname>

     2. Ponga resize; clear en su fichero .login

     3. La mejor solucin parece ser poner lo siguiente en el remoto:

          stty 38400

    Mucha gente parece tener problemas con cadas de la conexin term,
     cualesquiera que sean los motivos de la cada. As que antes de
     poner en marcha aplicaciones, la gente quiere saber si su conexin
     term sigue viva o no. Esto se puede probar usando estos pequeos
     ejemplos de shell scripts:

     Si est usando tcsh:

       if ( { trsh -s true } ) then
         ...
       endif

  Si est usando bash:

       if trsh -s true; then
         ...
       fi

    El navegador de WWW netscape causa a la gente problemas para
     funcionar con term. La buena noticia es que puede funcionar. He
     aqu cmo:

     1. Termificar el netscape

     2. Lanzar termnetscape. En el men Options | Preferences |
        Mail/Proxys dejar todos los campos proxy en blanco; poner en el
        campo SOCKS: remotehost y 80

     3. Ignorar el error que saldr en el men de opciones.

     4. Si no funciona bien: en el men Options | Preferences |
        Mail/Proxys dejar todos los campos proxy en blanco, poner en el
        campo SOCKS: none y 80

     5. Ignorar el error que saldr en el men de opciones.

     Scott Blachowicz me envi un mensaje diciendo que hay una forma
     fcil de hacer que Netscape u otro navegador funcione bien con term
     si tiene instalado un servidor proxy (como el httpd del CERN) para
     ser usado en el lado remoto del enlace term. En el lado local
     tendrs que hacer esto entonces:

  

           tredir local:8080 remota:80

  Donde remota es el nombre remoto del servidor proxy.

    Ejecuta el navegador, y en las opciones o como se llame, pon los
     proxies como local, puerto 8080. En algunos navegadores esto se
     hace mediante variables de entorno como:

                       export http_proxy=http://localhost:8080/
                       export ftp_proxy=http://localhost:8080/

  17.  Otras Cosas

  Algunas cosas que se podran incluir:

    Aumento de soluciones a problemas

    Extensin del tema sobre seguridad

    termwrap

    Sugerencias

  De todos modos, si tiene sugerencias, crticas, o cualquier otra cosa
  que decir sobre este documento, por favor, hgalo!. Como Bill
  Reynolds est muy ocupado en estos momentos, yo, Patrick Reijen, me he
  hecho cargo de la autora del Term-COMO. Se me puede encontrar
  (actualmente) en patrickr@cs.kun.nl o en patrickr@sci.kun.nl.

  18.  Reconocimientos

  Hay que dar las gracias a mucha gente. Primero y principalmente a
  Michael o'Reilly y todos los desarrolladores del term, que nos han
  proporcionado esta gran herramienta. Tambin quisiera agradecer a
  todos los que dieron su experiencia y contribuyeron a este COMO. Esto
  incluye a Ronald Florence, Tom Payerle, Bill C. Riemers, Hugh Secker-
  Walker, Matt Welsh, Bill McCarthy, Sergio y todos los que me olvido de
  mencionar.
  19.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Terminales Serie COMO
  Marc Malagelada Duch marc@hades.udg.es
  Maquetador Linuxdoc-SGML: Antonio Ismael Olea Gonzlez,
  olea@poboxes.com 2:345/108.9@fidonet.org
  v2.0 13 Septiembre 96

  Todo sobre la instalacin y configuracin de terminales en sistemas
  Linux, desde diagramas y tcnicas de soldadura de los cables, hasta
  los detalles de configuracin del hardware y software.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Hardware

  2.1.    Puertos serie

  2.1.1.  Puerto serie DB9

  2.1.2.  Puerto serie DB25

  3.      Cableado

  3.1.    Cables NULL MDEM

  3.1.1.  NULL MDEM de 3 hilos

  3.1.2.  NULL MDEM de 3 hilos con protocolo por hardware emulado

  3.1.3.  NULL MDEM de 7 hilos con protocolo por hardware

  3.2.    Construccin fsica del cable

  3.2.1.  Listado de las patillas

  3.2.2.  Localizacin fsica de las patillas en un DB9

  3.2.3.  Localizacin fsica de las patillas de un DB25

  3.2.4.  Soldar-Como

  3.2.5.  Ejemplos de cables: DB25-DB25

  3.2.6.  Ejemplos de Cables: DB9-DB9

  3.2.7.  Ejemplos de cables: DB25-DB9 o DB9-DB25

  3.3.    Compra del cable ya hecho

  3.3.1.  Cables NULL-MDEM

  3.3.2.  Solucin con cajitas NULL-MDEM y cable de mdem

  3.4.    Conectores DIGITAL VT320 y 420

  4.      Configuracin del software

  4.1.    Linux

  4.2.    El terminal.

  4.3.    Afinando Linux para la conexin

  4.3.1.  Explicacin de la lnea del inittab

  4.3.2.  Parmetros de agetty

  4.4.    Afinando el terminal

  4.5.    Solucin a posibles problemas

  4.5.1.  Comprobacin del cable

  4.5.2.  El cable funciona pero Linux no.

  5.      Contacto

  5.1.    Agradecimientos

  6.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Creo que conectar un terminal a un Linux es una de las experiencias
  ms bonitas que se pueden hacer para ver cmo tu PC monousuario se
  convierte en una autntica estacin de trabajo multiusuario, adems de
  poder aprovechar tu viejo PC-XT o PC-AT para terminal.

  Lo que hace falta es un PC con Linux, que supongo que ya tenis, que
  disponga de un puerto serie libre. Cuidadn cuidadn con esas mquinas
  con COM3 y COM4 que suelen compartir IRQ con COM1 y COM2, de forma que
  suelen traer problemas cuando se usa por ejemplo COM1 y COM3 o COM2 y
  COM4.

  Tambin hace falta un terminal, que debe disponer de un puerto serie.
  Lo mismo dicho antes para los COM3 y los COM4, es tambin aplicable
  aqu si ese terminal va a ser vuestro viejo PC-XT o cualquier otro PC.

  Igualmente le va a hacer falta un software de emulacin de terminal
  para poder cumplir su misin. Ese software puede ser el mismo software
  que se usa para llamar por el mdem, por ejemplo el TELIX, el
  PROCOMM+, o el Terminal del Ventanucos. Si el terminal es realmente un
  terminal, por ejemplo un DEC VT220 o similar, va a ser ms fcil,
  aunque no todo el mundo tiene un terminal en su casa, es ms frecuente
  encontrar un viejo 8088.

  Para poder transmitir los datos hace falta un cable de los llamados
  null-mdem o de lneas cruzadas, habindolos de muchos tipos. El que
  yo tengo montado es el mismo que el que recomienda el MSDOS para usar
  el INTERLNK/INTERSVR, que adems funciona de maravilla en Linux.

  Por ltimo, hacen falta unas pocas ganas de hacer pruebas.

  2.  Hardware

  2.1.  Puertos serie

  Puertos serie hay de 2 tipos: Los DB25 y los DB9.

  Los DB9 son los vulgarmente (e incorrectamente) conocidos como puertos
  de mouse. Tienen 9 patillas y son "macho" es decir: que las patillas
  son pinchos. En los conectores "hembra", las patillas son orificios
  para que entren los pinchos. Cualquier semejanza con el sexo real est
  hecha con toda la intencionalidad. :-)

  2.1.1.  Puerto serie DB9

  A continuacin os pongo un "grfico" cutre para que sepis que es lo
  que hay que ver detrs del PC para localizar el puerto serie:

                                    .---------------.
                                    \   o o o o o   /
                                     \   o o o o   /
                                      `-----------'

  Si localizis alguno, que adems tiene que ser macho (pinchos)
  seguramente se trata de un puerto serie.

  Si lo encontris en su versin "hembra" (con orificios) se trata de el
  adaptador de VDEO (CGA, Hrcules, EGA o VGA-digital).

  2.1.2.  Puerto serie DB25

  Tambin podis encontrar su versin de 25 pines:

                            .-------------------------------.
                            \   o o o o o o o o o o o o o   /
                             \   o o o o o o o o o o o o   /
                              `---------------------------'

  Igualmente, las patillas tienen que ser pinchos. Si son orificios, se
  trata de un puerto de impresora.

  Debis localizar uno de los dos en cada uno de los PCs (Linux y
  terminal)  Seguramente vais a encontrar que en alguno de ellos hay de
  los dos. Para saber si se trata del COM1 o del COM2 lo ms prctico es
  conectar un ratn y cargar el driver para COM1 o para COM2 y ver si
  funciona.

  Las situaciones ms normales son:

    Si slo se encuentra uno de ellos, es el COM1;

    Si se encuentran los dos, normalmente el pequeo es el COM1 y el
     otro es el COM2;

    Si hay 2 pequeos hay que descifrar cul es el COM1 y cul el COM2.
     Esto sucede con equipos HP y COMPAQ, y suele venir indicado cul es
     el 1 y cul es el 2. Si no, a por un ratn serie y hacer pruebas.

    No los encuentro!: Mejor pasar un programa de informacin del PC
     para saber si hay puertos serie disponibles. Uno de fcil
     localizacin es el msd.exe del MSDOS6.2 (Teclear msd y pulsar la
     C).

  Una vez localizados los puertos serie de cada PC, voy a escribir
  algunas recomendaciones:

    Mejor no utilizar el COM3 si se usa el COM1. Igualmente no usar el
     COM4 si se usa el COM2 (-- N. del Revisor:
     Podremos usar dichos puertos siempre que:
     a) Configuremos el hardware (por BIOS o por jumpers) para usar
     alguna otra IRQ libre, y
     b) Configuremos el Linux para que los inicialice al arrancar con el
     comando setserial, ver Serie-Como.--)

    Cuidadn cuidadn con los tornillos que hay en los lados de los
     conectores; hay que comprobar que estn bien atornillados ya que de
     lo contrario podra caer la tuerca interior dentro de la caja del
     PC y provocar un desastre.

  3.  Cableado

  3.1.  Cables NULL MDEM

  Bueno, voy a explicar qu son las lneas (patillas) del puerto serie:

     GND
        Es la masa. Como toda seal, tiene que estar referida a una
        masa.

     RX Seal de recepcin. Son los datos que se reciben. (entrada)

     TX Seal de transmisin. Por aqu salen los datos. (salida)

     DTR
        Data Terminal Ready. Indica que el terminal est encendido.
        (salida)

     DSR
        Data Set Ready. Se ha establecido conexin. (entrada)

     CTS
        Clear To Send. El terminal est aceptando datos. (salida)

     RTS
        Request to Send. Aqu se introduce una seal cuando se pide un
        dato. (in)

  Esto que hay aqu no puedo decir que sea correcto del todo. Eso es lo
  que me he deducido yo despus de hojearme el manual del chip 8250
  (UART) y leer alguna cosa sobre transmisiones RS232.

  3.1.1.  NULL MDEM de 3 hilos

  El cable Null-mdem ms bsico que existe es el siguiente:

       GND---------------------------------------------------GND
       RX----------------------------------------------------TX
       TX----------------------------------------------------RX

  Ese mismo ya funciona con el Linux. Slo 3 cables. Para controlar el
  flujo de datos se usa el protocolo por software XON/XOFF

  3.1.2.  NULL MDEM de 3 hilos con protocolo por hardware emulado

  Otro cable null-mdem es el siguiente:

       GND --------------------------------------------------GND
       RX----------------------------------------------------TX
       TX----------------------------------------------------RX
       RTS--------.                                 .--------RTS
                   )                               (
       CTS--------'                                 `--------CTS
       DSR--------.                                 .--------DSR
                   )                               (
       DTR--------'                                 `--------DTR

  Este emula el protocolo CTS/RTS y DSR/DTR por hardware, aunque slo es
  eso, una emulacin. Para controlar el flujo de datos se sigue
  recurriendo al protocolo software XON/XOFF.

  3.1.3.  NULL MDEM de 7 hilos con protocolo por hardware

       GND --------------------------------------------------GND
       RX----------------------------------------------------TX
       TX----------------------------------------------------RX
       RTS---------------------------------------------------CTS
       CTS---------------------------------------------------RTS
       DSR---------------------------------------------------DTR
       DTR---------------------------------------------------DSR

  Este cable usa el protocolo CTS/RTS para controlar el flujo por
  hardware e incluye las lneas DSR-DTR para saber si el terminal est
  conectado.  Sigue funcionando si se usa protocolo por software.

  Yo creo que es el ms flexible; adems, ese mismo cable es el que se
  usa para el INTERLNK/INTERSVR de MSDOS, o el LAPLINK (WIN o DOS).  Es
  el que tengo yo montado.

  3.2.  Construccin fsica del cable

  3.2.1.  Listado de las patillas

  Las patillas fsicas en los pines son las siguientes:

       Segnal              Patilla en DB9           Patilla en DB25
       --------------------------------------------------------------
       GND:..................patilla 5................patilla 7
       RX:...................patilla 2................patilla 3
       TX:...................patilla 3................patilla 2
       RTS:..................patilla 7................patilla 4
       CTS:..................patilla 8................patilla 5
       DSR:..................patilla 6................patilla 6
       DTR:..................patilla 4................patilla 20

  3.2.2.  Localizacin fsica de las patillas en un DB9

  Los conectores suelen llevar una chuleta numerando los pines en el
  plstico que rodea a los susodichos, ese plstico que a veces es azul,
  o a veces en negro o a veces es blanco.  Vista desde el LADO DE FUERA
  DEL PC, que tambin concuerda con la vista desde la CARA DE LAS
  SOLDADURAS de un DB9 Hembra usado para construir el cable:

                                   .---------------.
                                   \   1 2 3 4 5   /
                                    \   6 7 8 9   /
                                     `-----------'

  Vista desde el lado de fuera de un DB9 Hembra usado para construir el
  cable:

                                   .---------------.
                                   \   5 4 3 2 1   /
                                    \   9 8 7 6   /
                                     `-----------'

  3.2.3.  Localizacin fsica de las patillas de un DB25

  Vista desde el exterior del PC, que tambin concuerda con la vista
  desde la cara de las soldaduras de un DB25 hembra usado para construir
  el cable:

               .-----------------------------------------------.
               \   13  12  11  10  9  8  7  6  5  4  3  2  1   /
                \    25  24  23  22 21 20 19 18 17 16 15 14   /
                 `-------------------------------------------'

  Vista desde el lado de fuera de un DB25 hembra usado para construir el
  cable:

                    .-----------------------------------------------.
                    \   1  2  3  4  5  6  7  8  9  10  11  12  13   /
                     \   14 15 16 17 18 19 20 21 22  23  24  25    /
                      `-------------------------------------------'

  3.2.4.  Soldar-Como

  Hay que soldar, de manera que deberais procuraros un poco de estao
  (metal para hacer la soldadura) y un pequeo soldador de ms de 15W.

  Recomendaciones para soldar:

  Calentar con la punta del soldador los extremos de los cables a soldar
  y mientras estn calientes, depositar en la punta un poco de estao.
  Parece que hacen falta 3 manos para hacer esa operacin, una para
  aguantar el cable, otra para el soldador y la tercera para aguantar el
  estao. Hacedlo de la siguiente manera:

  1. Primero pelar las puntas de los cables de colores para dejar el
     cobre al descubierto.

  2. Despus, con una mano aguantar el cable, y con la otra el soldador,
     tras haber estaado previamente la punta del mismo. Para eliminar
     el exceso de estao de la punta, introducirla en un trozo de
     esponja inservible humedecida.

  3. Calentar la punta del cable y mientras se hace eso, acercar el
     conjunto soldador-cable al hilo de estao y fundir un poco.

  4. Esperar a que el estao fluya por la superficie del cable y
     entonces apartar el soldador.

  Esa operacin se debe repetir para todos los cables de colores. No
  tengis miedo de quemar los cables con la temperatura del soldador.
  Los cables deberan estar preparados.

  Con esa operacin estis estaando el cable.

  Hay que estaar tambin los pines de los conectores DB25 y/o DB9, que
  es ms fcil: con el conector apoyado encima de la mesa, y el soldador
  en una mano, se toca el pin en el que deber ir soldado un cable, y se
  espera un momentito a que se caliente; con la otra mano se acerca el
  estao, que con la temperatura va a fundirse dejando la superficie del
  pin a soldar forrada de estao.

  Por ltimo, con el conector apoyado encima de la mesa, con una mano se
  coge el soldador y con la otra se acerca el cable que debe ir soldado
  en el pin, se ponen en contacto cable y pin (los dos bien estaados) y
  se toca con el soldador alguna de las dos partes (mejor las dos). El
  estao se va a fundir y va a poner en contacto cable y pin. Entonces
  se retira el soldador y se espera que el estao se enfre. No soplar
  para acelerar el enfriamiento, ya que podra dar lugar a soldaduras
  fras. Ya est hecha la soldadura.

  Para los que quieran pasarse de listos y no quieran "perder el tiempo"
  estaando las cosas, se van a dar cuenta que para soldar un cable a un
  conector les harn falta 4 manos:

    Una para aguantar el soldador;

    Otra para aguantar el estao;

    Otra para aguantar el cable;

    Y la ltima para aguantar el conector.

  As que no os lo recomiendo a no ser que dispongis de 4 manos.

  nimo que es MUY fcil; saber soldar os va a solucionar muchos
  problemas, y adems vais a poder solucionar muchas averas por culpa
  de soldaduras rotas o defectuosas.

  3.2.5.  Ejemplos de cables: DB25-DB25

  Conexin de un PC-Linux con conector DB25 y un terminal con conector
  DB25.

  Material necesario:

    2 conectores DB25 hembra;

    2 carcasas para DB25;

    Cable de 7 hilos (o ms) con malla, comprar los metros necesarios.

  La longitud del cable no debe sobrepasar los 30 metros.

  Precio aproximado:

    400 ptas para los 2 conectores con carcasa y

    100 ptas el metro en Girona para el cable.

  Conexiones:

    7 (GND) -----------------------------------------7 (GND)
    2 (TX) ------------------------------------------3 (RX)
    3 (RX) ------------------------------------------2 (TX)
    5 (CTS) -----------------------------------------4 (RTS)
    4 (RTS) -----------------------------------------5 (CTS)
    6 (DSR) -----------------------------------------20 (DTR)
    20 (DTR)-----------------------------------------6 (DSR)
    CHASIS-------------------(malla)-------------------CHASIS

  La malla del cable (tejido de cobre que envuelve los cablecillos
  finos) debe conectarse al chasis (parte metlica) del conector.

  La conexin de la malla establece el mismo nivel de potencial
  (voltaje) entre los 2 PCs y evita que grandes cargas de electricidad
  esttica fluyan a travs de las lneas y fundan el chip del puerto
  serie. Adems, se produce un efecto de apantallamiento, que evita que
  seales electromagnticas interfieran en la informacin que circula
  por la lnea.

  Eso va sobre todo para la gente que en su casa no dispone de toma de
  tierra o que tiene el PC sobre una superficie de moqueta o alfombra.
  Si al tocar tu PC recibes calambres, asegrate que la malla esta
  conectada o seguro que vas a fundir el puerto serie de tu PC o
  terminal.

  Igual que en otro documento, tambin voy a decir que algunas veces he
  odo que el chip del puerto serie explota, literalmente vuela por los
  aires, al conectar un cable sin malla.

  Por eso os recomiendo que CONECTIS SIEMPRE LA MALLA.

  3.2.6.  Ejemplos de Cables: DB9-DB9

  Conexin de un PC-Linux con conector DB9 y un terminal con conector
  DB9.

  Material necesario:

    2 conectores DB9 hembra;

    2 Carcasas para DB9;

    Cable de 7 hilos (o ms) con malla, comprar los metros necesarios.

  La longitud del cable no debe sobrepasar los 30 metros.

  Precio aproximado:

    350 ptas para los 2 conectores con carcasa, y

    100 ptas el metro en Girona para el cable.

  Conexiones:

    5 (GND) -----------------------------------------5 (GND)
    3 (TX) ------------------------------------------2 (RX)
    2 (RX) ------------------------------------------3 (TX)
    8 (CTS) -----------------------------------------7 (RTS)
    7 (RTS) -----------------------------------------8 (CTS)
    6 (DSR) -----------------------------------------4 (DTR)
    4 (DTR)------------------------------------------6 (DSR)
    CHASIS-------------------(malla)------------------CHASIS

  La malla del cable (tejido de cobre que envuelve los cablecillos
  finos) debe conectarse al chasis (parte metlica) del conector.

  La conexin de la malla establece el mismo nivel de potencial
  (voltaje) entre los 2 PCs y evita que grandes cargas de electricidad
  esttica fluyan a travs de las lneas y fundan el chip del puerto
  serie. Adems, se produce un efecto de apantallamiento, que evita que
  seales electromagnticas interfieran en la informacin que circula
  por la lnea.

  Eso va sobre todo para la gente que en su casa no dispone de toma de
  tierra o que tiene el PC sobre una superficie de moqueta o alfombra.
  Si al tocar tu PC recibes calambres, asegrate que la malla esta
  conectada o seguro que vas a fundir el puerto serie de tu PC o
  terminal.

  Igual que en otro documento, tambin voy a decir que algunas veces he
  odo que el chip del puerto serie explota, literalmente vuela por los
  aires, al conectar un cable sin malla.

  Por eso os recomiendo que CONECTIS SIEMPRE LA MALLA.

  3.2.7.  Ejemplos de cables: DB25-DB9 o DB9-DB25

  Conexin de un PC-Linux con conector DB25 y un terminal con conector
  DB9, o de un PC-Linux con conector DB9 y un terminal con conector
  DB25. (es el mismo cable)

  Material necesario:

    1 conector DB9 hembra;

    1 conector DB25 hembra;

    1 carcasa para DB25;

    1 carcasa para DB9;

    Cable de 7 hilos (o ms) con malla, comprar los metros necesarios.

  La longitud del cable no debe sobrepasar los 30 metros.

  Precio aproximado:

    375 ptas para los 2 conectores con carcasa, y

    100 ptas el metro en Girona para el cable.

  Conexiones:

       Conector DB9                                    Conector DB25
         7 (GND) -----------------------------------------7 (GND)
         3 (TX) ------------------------------------------3 (RX)
         2 (RX) ------------------------------------------2 (TX)
         8 (CTS) -----------------------------------------4 (RTS)
         7 (RTS) -----------------------------------------5 (CTS)
         6 (DSR) -----------------------------------------20 (DTR)
         2 (DTR)------------------------------------------6 (DSR)
         CHASIS-------------------(malla)-----------------CHASIS

  La malla del cable (tejido de cobre que envuelve los cablecillos
  finos) debe conectarse al chasis (parte metlica) del conector.

  La conexin de la malla establece el mismo nivel de potencial
  (voltaje) entre los 2 PCs y evita que grandes cargas de electricidad
  esttica fluyan a travs de las lneas y fundan el chip del puerto
  serie. Adems, se produce un efecto de apantallamiento, que evita que
  seales electromagnticas interfieran en la informacin que circula
  por la lnea.

  Eso va sobre todo para la gente que en su casa no dispone de toma de
  tierra o que tiene el PC sobre una superficie de moqueta o alfombra.
  Si al tocar tu PC recibes calambres, asegrate que la malla esta
  conectada o seguro que vas a fundir el puerto serie de tu PC o
  terminal.

  Igual que en otro, documento tambin voy a decir que algunas veces he
  odo que el chip del puerto serie explota, literalmente vuela por los
  aires, al conectar un cable sin malla.

  Por eso os recomiendo que CONECTIS SIEMPRE LA MALLA.

  3.3.  Compra del cable ya hecho

  3.3.1.  Cables NULL-MDEM

  Hay que pedir un cable tipo NULL-MDEM en alguna tienda de electrnica
  o de ordenadores. Alguna gente tambin los conoce como cables cruzados
  o cables de LAPLINK.

  Es bastante difcil encontrar un cable ya montado con la conexin de
  los pines que nos conviene, aunque como este montaje es bastante
  frecuente, es posible encontrarlo; no obstante, no os quejis despus
  si no funciona, porque bajo la denominacin "null-mdem" hay un montn
  de cables diferentes, como los que se comentaban en la seccin ``''.

  Si has ido a parar a esta seccin porque no sabes soldar, te
  recomiendo que lo pruebes, es bastante fcil. Lete las
  recomendaciones, y si las cumples el xito esta asegurado.

  Adems, los cables ya hechos valen bastante dinero.

  Para el Linux os va a funcionar casi cualquier tipo de null-mdem,
  pero el INTERLNK/INTERSVR requiere la configuracin exacta.

  3.3.2.  Solucin con cajitas NULL-MDEM y cable de mdem

  Si no encontris cables null-mdem, podis hacer lo siguiente:

  Comprar un cable de mdem (pin a pin) y luego insertar entre el PC y
  uno de los cabos del cable de mdem una caja de empalmes con
  configuracin NULL-MDEM.

  Caja de empalmes:

                           _____.-----------------------------.____
                          !     !    --------------------     !    !
                          !     !    !                  !     !    !
                          !     !    !                  !     !    !
                  DB25->  !     !    !    NULL-MODEM    !     !    !  <-DB25
                          !     !    !                  !     !    !
                          !     !    !                  !     !    !
                          !     !    --------------------     !    !
                          `----.!_____________________________!.---'

  Que se monta de la siguiente manera:

                           caja
                   ----    null                                   -------
                       !   modem                                  !
                   PC  !_.------._  _      cable de modem        _! PC
                       !  nllmdm  || `==========================' !
                       !-.______.-'`-'      (pin a pin)         `-!
                    ___!                                          !------

  Esa opcin en bastante cara, ya que un cable de mdem ya vale al menos
  600 ptas, y si le aadimos el coste de la caja mull-mdem (1000ptas),
  te puede salir bastante caro. Te sigo recomendando que pruebes a hacer
  la soldadura t mismo.

  3.4.  Conectores DIGITAL VT320 y 420

  El conector de DIGITAL EQUIPMENT CORPORATION (DEC) para la serie de
  terminales VT320 y VT420 no es tan raro como parece.

  Ese conector se llama DEC-423 MMJ (Modified Modular Jack) y se parece
  a un RJ45 pero con la lengeta descentrada (-- Nota del maquetador
  Los RJ45 son esos conectores transparentes de 8 hilos algo ms gordos
  que los RJ11 del telfono, tambin llamados Giant Modular Jack,
  empleados en los cables de red de par trenzado.  :-)--)

  El patillaje es el siguiente:

                             DTR   TX    GND   GND   RX    DSR
                         ----------------------------------------
                         !   !_!   !_!   !_!   !_!   !_!   !_!   !
                         !                                       !
                         !                                       !
                         !                                       !
                         !                                       !
                         !                                       !
                         !                                       !
                         !                                       !
                         !                                       !
                         !_____________________                  !
                                               !                 !
                                               !                 !
                                               !_________________!

  4.  Configuracin del software

  4.1.  Linux

  Entra como superusuario y modifica el /etc/inittab de la siguiente
  manera:

    Tienes que buscar la seccin #Serial lines y aadir una lnea como
     la siguiente:

       s2:45:respawn:/sbin/agetty -L 38400 ttyS1

  En la que habr que cambiar algunas cosas dependiendo del puerto serie
  del PC-Linux en donde tengas el terminal conectado:

     Si tienes el terminal en el COM1:
        s1:45:respawn:/sbin/agetty -L 9600 ttyS0

     Si tienes el terminal en el COM2:
        s2:45:respawn:/sbin/agetty -L 9600 ttyS1

     Si tienes el terminal en el COM3:
        s3:45:respawn:/sbin/agetty -L 9600 ttyS2

     Si tienes el terminal en COM4:
        s4:45:respawn:/sbin/agetty -L 9600 ttyS3

    Una vez insertada esa lnea en /etc/inittab, hay que hacer que el
     proceso init relea el fichero inittab; para ello ejecutaremos la
     orden:

       init q

  4.2.  El terminal.

  Cargar el MSDOS y entrar en el programa de emulacin de terminales.

  Debes elegir el tipo de terminal ANSI o, VT100, VT102, VT220, VT52.

  Cualquiera de ellos debera funcionar como mnimo para comprobar que
  la lnea funciona.

  Los parmetros del puerto serie deben ser 9600,N,8,1.

  Apretando un par de ENTERs debera salir en la pantalla del terminal
  el texto de LOGIN.

  Si eso no funciona, algo est pasando en las lneas serie.

  4.3.  Afinando Linux para la conexin

  Espero que hayis llegado hasta aqu sin mucha dificultad.

  4.3.1.  Explicacin de la lnea del inittab

  Aqu voy a explicar esa lnea que hay que aadir al inittab.

  Qu significa cada cosa:

       s2:45:respawn:/sbin/agetty -L 9600 ttyS1
       ^  ^     ^             ^      ^      ^
       |  |     |             |      |      |
       |  |     |             |      |      `---- /dev/ttyS1 es decir COM2:
       |  |     |             |      |            es el dispositivo que soporta
       |  |     |             |      |            la conexion. Se puede cambiar
       |  |     |             |      |            por ttyS0, ttyS2 o ttyS3.
       |  |     |             |      |
       |  |     |             |      |
       |  |     |             |      `------- Baudios a los que se efectua la
       |  |     |             |               conexion: puede ser uno de los
       |  |     |             |               siguientes: 300, 600, 1200, 2400
       |  |     |             |               9600, 19200, 38400, 57600, 115200
       |  |     |             |               Si tienes una UART tipo 8250 o
       |  |     |             |               16450 mejor que no pases de 9600
       |  |     |             |               so pena de freir el PC a interrup-
       |  |     |             |               ciones. En el terminal da igual
       |  |     |             |               porque no tiene que hacer nada mas,
       |  |     |             |               pero en el PC-Linux importa no
       |  |     |             |               pasarse so pena de perder potencia
       |  |     |             |               de multiproceso.
       |  |     |             |               Recomiendo 19200 baudios.
       |  |     |             |
       |  |     |             |
       |  |     |             `-- Programa que va a controlar la comunicacion por
       |  |     |                 la parte Linux. Existen el controlador
       |  |     |                 agetty, otro es el uugetty. Tambien esta el getty
       |  |     |                 Aqui hay que jugar un poco. Yo uso agetty, que no
       |  |     |                 quiere decir que sea el mejor, pero funciona.
       |  |     |
       |  |     |
       |  |     `----- No puedo asegurar que eso sea cierto, pero me parece que
       |  |            sirve para que el proceso agetty se auto-restaure cuando
       |  |            por alguna razon muera.
       |  |
       |  |
       |  `----- No puedo asegurar que sea cierto, pero me parece que son los
       |         runlevels validos para que funcione ese terminal.
       |
       `----- Identificacion. Cuando por ejemplo se hace 'top' salen los procesos
              que estan funcionando en la maquina. Una de las columnas del top
              es la del terminal donde se estan ejecutando. En los procesos
              ejecutados desde este terminal va a salir el 's2' o lo que se
              escriba aqui.

  4.3.2.  Parmetros de agetty

  Fijos que en la lnea que estamos estudiando, le paso el parmetro -L
  a agetty. Si hacis man agetty podris comprobar porqu hago eso:
  estoy forzando a que la lnea sea local, es decir, que no se haga la
  la comprobacin del pin de CD (Carrier Detect). Ese pin debera estar
  conectado en el cable, pero no lo hago para mantener la compatibilidad
  con el INTERLNK/INTERSVR de Microsoft MSDOS. Una vez ms el Linux se
  adapta a las necesidades del usuario. (Me suena esa frase a WIN95!?)

  Tambin podis activar el protocolo de hardware RTS/CTS, que acelerar
  un poco la comunicacin. Para hacer eso necesitis que el cable os
  soporte esa funcin; adems deberis configurar el terminal o mejor
  dicho, El software de terminal para que lo haga. Yo no lo tengo
  habilitado.  Para activar el protocolo por hardware CTS/RTS pasadle el
  parmetro '-h' a agetty, por ejemplo:

       s2:45:respawn:/sbin/agetty -hL 9600 ttyS1

  4.4.  Afinando el terminal

  Aqu ms que un afinamiento os voy a explicar cmo instalar el Telix
  3.22 para DOS para que haga de terminal.

    Primero tenis que conseguir los archivos va FTP o va algn cdrom
     de Shareware (-- N. del R.
     BBS--) . Yo voy a explicar la versin 3.22, que no es la ltima,
     pero tampoco es vieja.

     Los archivos se llaman:

    tlx322-1.zip

    tlx322-2.zip

    tlx322-3.zip

    tlx322-4.zip

     De los cuales slo vais a necesitar los dos primeros.

    Descomprimid los ZIPs tlx322-1.zip y tlx322-1.zip en un directorio.
     Una vez descomprimidos, ejecutad 'MODEMCFG.EXE' y escoged alguno de
     los de 1200 baudios (para que no quiera grabar la RAM del mdem).
     Seleccionas el puerto correspondiente y sales del programa.

    Si te falta espacio (o quieres tener el Telix en un disquete porque
     no tienes disco duro o por comodidad) puedes cargarte el CS.EXE y
     el CSS.EXE.

     Yo tengo Telix322 + MSDOS6.2 + KERMIT.EXE en 1 disco de 720K.

    Ejecutar TELIX.EXE y una vez haya intentado sin resultado
     inicializar el mdem, pulsas ALT-O (opciones).

    Te vas a Modem and dialing y en el mdem init string le pones un
     par de control-M (se hace poniendo un acento circunflejo ^ y una
     M).

    Te vas al Terminal options y pones lo pertinente en la opcin A:
     por ejemplo COM2, 19200, None, 8, 1.

    El el mismo men de Terminal Options, la opcin C debera estar en
     ANSI o en VT102.

    En el mismo men de Terminal Options, la opcin I debera estar en:
     Backspace key sends DEL.

    En el mismo men de Terminal Options, vas a encontrar la opcin K
     que sirve para controlar el flujo por hardware. (agetty -h).

    Finalmente te vas a Write Setup to Disk.

    Sales del Telix: ALT-X

    Vuelves a entrar. Te debera salir el login en la pantalla.

  4.5.  Solucin a posibles problemas

  Siempre se pueden tener problemas, aunque conozco a bastante gente que
  ha montado este cable y le ha funcionado.

  Qu hacer si no funciona:

  4.5.1.  Comprobacin del cable

  Para probar el cable, coges los 2 PCs, les pones en marcha un Telix y
  pulsas en ambos ALT-P.

  Configura ambos PCs a una velocidad de 1200 baudios, N, 8,1.

  Configura en cada PC el COM correspondiente.

  Escribe desde un PC y tendrs que ver el texto en la pantalla del
  otro.

  Prueba desde ambos PCs. Puede ser que la comunicacin slo sea mono-
  direccional por algn defecto del cable o del hardware.

  Si el cable est bien construido y el hardware no falla eso debera ir
  bien.

  4.5.2.  El cable funciona pero Linux no.

  Qu velocidad escogiste? Prueba desde 9600 baudios a ver qu tal.

  Puede ser que tengas problemas de velocidad. Ejecuta MSD en ambos
  ordenadores para ver qu UARTs tienen. Seguramente el PC viejo tendr
  una 8250, por lo que no es recomendable pasar de 9600, aunque he
  probado a 19200 y suele funcionar.

  Nuestro terminal en hades.udg.es es un 286-12 con UART 8250 y le
  podemos sacar 38400, aunque a veces falla.

  Las velocidades son las mismas?

  La velocidad que escojas en el Telix o el programa que utilices para
  emular un terminal tiene que ser la misma que configures en la lnea
  del /etc/inittab.

  Habilitaste algn protocolo por hardware?

  Algunos puertos serie no llevan todas las lneas, as que aunque el
  cable las tenga, no llegan hasta el Linux o el programa de terminal.
  Prueba deshabilitando el protocolo por hardware, es decir, quitando el
  parmetro '-h' del agetty en /etc/inittab, y habilitando el protocolo
  XON/XOFF por software en el programa de comunicaciones.

  Ests seguro que pusiste ttyS0 para COM1, ttyS1 para COM2, ttyS2 para
  COM3 y ttyS3 para COM4? Es muy fcil colarse, el ttySx es siempre uno
  menos que el COMx.

  Puede que tengas algn problema de IRQs. Ests compartiendo IRQ con
  algn otro dispositivo?

  Haz pruebas con el minicom (clnico del Telix para Linux) para saber
  si los datos al menos llegan.

  Comprueba los majors y los minors de los puertos de comunicaciones:

       /dev/ttyS0: crw-rw-rw-   X  USER GROUP  4,  64  xxx xx xx:xx ttyS0
       /dev/ttyS1: crw-rw-rw-   X  USER GROUP  4,  65  xxx xx xx:xx ttyS1
       /dev/ttyS2: crw-rw-rw-   X  USER GROUP  4,  66  xxx xx xx:xx ttyS2
       /dev/ttyS3: crw-rw-rw-   X  USER GROUP  4,  67  xxx xx xx:xx ttyS3
                                               ^    ^
                                               |    |
                                               |    |
                                               |    `------MINOR
                                               `-----------MAJOR

  5.  Contacto

  Alguna sugerencia, o preguntas, dudas, cuestiones varias, etc a
  marc@hades.udg.es o tambin a

    mm6344@pluto.udg.es

    mm6344@speedy.udg.es

    marc@abu.udg.es

  5.1.  Agradecimientos

  A Paco (paco@hades.udg.es) por poner la lista de Linux en marcha y por
  la ayuda recibida, que fue l quien me ense a conectar terminales al
  Linux.

  6.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Linux UUCP COMO
  Vince Skahan, vince@halcyon.com
  v1.5, 29 Noviembre 1995

  Este documento describe la instalacin de UUCP bajo Linux. Necesita
  leer este documento si tiene previsto acceder a sistemas remotos via
  UUCP mediante mdem, mediante conexin directa o a travs de internet.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Nuevas versiones de este documento

  1.2.    Comentarios

  1.3.    Informacin del Copyright

  1.4.    Renuncia de responsabilidad.

  1.5.    Otras fuentes de informacin

  1.5.1.  Documentos HOWTO de Linux

  1.5.2.  USENET

  1.5.3.  Listas de Correo

  1.5.4.  Libros

  1.6.    Dnde NO  buscar ayuda.

  2.      Requerimientos de Hardware

  3.      Dnde conseguir UUCP

  4.      Instalacin del Software

  4.1.    Extraccin de los fuentes comprimidos

  4.2.    Edicin del Makefile.in  para especificar los directorios de
  instalacin.

  4.3.    Ejecucin de `` configure ''

  4.4.    Elaboracin de la futura configuracin del software

  4.4.1.  Examinar el conf.h  y el Makefile  para asegurarse de que
  estn bien.

  4.4.2.  Editar el policy.h  para su sistema local.

  4.5.    Compilar e instalar el software

  4.6.    Preparar los ficheros de configuracin

  4.7.    Haga un intento

  4.8.    No funciona - Por qu?

  5.      Preguntas de Uso Frecuente ( PUF s) sobre el UUCP  de Linux

  5.1.    Por qu est mi binario de uucp  configurado en formato  HDB
  en lugar de ``Taylor''?

  5.2.    Por qu me contesta `` timeout '' en las conexiones cuando
  actualic a uucp-1.04 ?

  5.3.    Por qu el uucp HDB  annimo parece no funcionar?

  5.4.    Qu quiere decir `` no matching ports found ''?

  5.5.    Qu ficheros de configuracin son buenos para el formato HDB
  ?

  5.6.    Utilizar uucico  para llamar a nmeros alternativos

  6.      Agradecimientos

  7.      La traduccin

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  El propsito de este documento es contestar algunas de las cuestiones
  y comentarios que ms aparecen en las Frequently Asked Questions (--
  P.U.F.s, Preguntas de Uso Frecuente--) sobre el software UUCP bajo
  Linux en general y la versin en las distribuciones de Linux SLS y
  Slackware en particular.

  Este documento junto con los correspondientes documentos ``HOWTO'' de
  Mail y News sustituyen el UUCP-NEWS-MAIL-FAQ que anteriormente ha sido
  publicado en comp.os.linux.announce.

  1.1.  Nuevas versiones de este documento

  Nuevas versiones de este documento sern publicadas peridicamente en
  comp.os.linux.announce, comp.answers, y news.answers.  Tambin se
  aaden a varios sistemas de ftp annimos que acogen este tipo de
  informacin, incluyendo ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO.

  Adems, generalmente se puede encontrar este documento en la pgina
  principal del WorldWideWeb de Linux en
  http://sunsite.unc.edu/mdw/linux.html.

  1.2.  Comentarios

  Estoy interesado en cualquier comentario por correo electrnico,
  positivo o negativo, respecto a este documento. Por descontado
  escrbame si encuentra errores u omisiones obvias.

  Leo, pero no necesariamente contesto, todo el correo que recibo. Las
  peticiones para mejorar sern consideradas en funcin de la
  combinacin de tiempo disponible, el mrito de la peticin, y la
  presin sangunea que tenga ese da :-)

  No se preocupe, los insultos irn tranquilamente a /dev/null.

  En particular, el estndar del sistema de directorios de Linux est en
  continua evolucin. Todos los ejemplos de este documento estn basados
  en el estndar utilizado en el momento en que esa parte del documento
  fue escrita y en el sistema de directorios utilizados en las
  distribuciones y kits que personalmente vi. Por favor consulte su
  particular distribucin de Linux para comprobar los directorios que
  utiliza.

  Los comentarios concernientes al actual formato del documento deben
  dirigirse al coordinador de los HOWTO

  1.3.  Informacin del Copyright

  El UUCP-HOWTO es copyright 1994 de Vince Skahan.

  Copias exactas pueden ser reproducidas o distribuidas por cualquier
  medio fsico o electrnico sin el permiso del autor. Las traducciones
  son igualmente permitidas sin el permiso expreso del autor si incluyen
  informacin sobre quin hizo la traduccin.

  Citas cortas pueden ser utilizadas sin el consentimiento previo del
  autor.  Los trabajos y distribuciones derivados del UUCP-HOWTO deben
  ser acompaados con una copia exacta de este documento o con una
  indicacin de dnde encontrarlo.

  Las redistribuciones comerciales son permitidas y alentadas; no
  obstante, el autor agradecer ser notificado de cada una de las
  distribuciones (como cortesa).

  Resumiendo, queremos promover la divulgacin de esta informacin a
  travs de todos los medios que sea posible. Aunque deseamos conservar
  el copyright de los documentos HOWTO.

  Queremos que TODA la informacin que incorporan los HOWTO tenga la
  mxima divulgacin posible. Si tiene preguntas, por favor dirjase a
  Greg Hankins, el coordinador de los HOWTO de Linux, en
  gregh@sunsite.unc.edu

  1.4.  Renuncia de responsabilidad.

  Por supuesto, rechazo cualquier responsabilidad potencial por el
  contenido de este documento. La utilizacin de conceptos, ejemplos y/o
  otro contenido de este documento es completamente bajo su propio
  riesgo.

  1.5.  Otras fuentes de informacin

  1.5.1.  Documentos HOWTO de Linux

  Hay cantidad de material excepcional proporcionado en otros documentos
  HOWTO de Linux y en el Linux DOC project. En particular, puede querer
  echar una mirada a lo siguiente:

    el Serial Communications HOWTO

    el Ethernet HOWTO

    el Linux Networking Administrators' Guide (-- Disponible en
     castellano, (GARL) ver seccin ``''--)

  1.5.2.  USENET

  comp.mail.uucp puede responder muchas de sus preguntas sobre UUCP.

  1.5.3.  Listas de Correo

  Existe una lista de correo sobre el Taylor UUCP.  Para inscribirse (o
  borrarse) de la lista, enve un mail a

  taylor-uucp-request@gnu.ai.mit.edu

  1.5.4.  Libros

  Las versiones HDB y V2 de UUCP estn tratadas en la documentacin de
  cada vendedor as como en la mayora de libros sobre comunicaciones en
  *nix.

  Los ficheros de configuracin de Taylor actualmente slo estn
  documentados en los ficheros de configuracin proporcionados con los
  fuentes (y supuestamente en la distribucin de SLS). Para leerlos de
  forma ms ``agradable''  puede obtener el programa ``infosrc'' de los
  discos ``s'' de SLS y compilarlo.

  Lo que sigue es un conjunto de  diferentes libros que le ayudarn.

    ``Managing UUCP and USENET''  de O'Reilly and Associates es en mi
     opinin el mejor libro que hay para comprender los programas y
     protocolos involucrados en las entraas de un servidor USENET.

    ``Unix Communications''  de The Waite Group contiene una buena
     descripcin de todas las partes (y ms), y de cmo trabajan juntas.

    ``Practical Unix Security''  de O'Reilly and Associates tiene una
     buena discusin de cmo hacer seguro el UUCP en general.

    ``The Internet Complete Reference''  de Osborne es un cuidado libro
     de referencia que explica los diferentes servicios disponibles en
     Internet y es una gran fuente de informacin sobre news, correo, y
     otros recursos disponibles en Internet.

    ``The Linux Networking Administrators'Guide (-- Ver seccin
     mencionada anteriormente.--) Project est disponible en la red y
     tambin publicado por (al menos) O'Reilly y SSC. Hay gran cantidad
     de informacin para aprender sobre todo lo que pueda imaginar que
     necesita conocer sobre las redes Unix.

  1.6.  Dnde NO  buscar ayuda.

  No hay nada ``especial'' sobre la configuracin y ejecucin de UUCP
  bajo Linux.  Por consiguiente, casi seguro que NO necesita hacer
  preguntas sobre el UUCP en general en los grupos de noticias
  comp.os.linux.* .

  A no ser que su pregunta sea realmente especfica de Linux (p.ej.
  ``por favor decidme qu fichero de configuracin est soportado por
  los binarios de Taylor uucp v1.04 en la SLS v1.02''), seguramente
  deber dirigir sus preguntas a comp.mail.uucp o a la lista de correo
  de Taylor UUCP indicada anteriormente.
  Djeme repetir esto.

  Virtualmente, no existe ninguna razn para enviar nada referente a
  uucp a la jerarqua de comp.os.linux. Existen grupos de noticias en la
  jerarqua de comp.mail.* para dejar TODAS sus preguntas.

  SI ENVA A COMP.OS.LINUX.* CONSULTAS NO ESPECFICAS DE LINUX, EST
  BUSCANDO AYUDA EN EL LUGAR EQUIVOCADO. LOS EXPERTOS SOBRE UUCP SE
  MUEVEN EN LOS GRUPOS INDICADOS ANTERIORMENTE Y GENERALMENTE NO
  UTILIZAN LINUX.

  ENVIAR A LA JERARQUA DE LINUX CONSULTAS NO ESPECFICAS DE LINUX
  MALGASTA SU TIEMPO Y EL DE TODOS LOS DEMS Y NORMALMENTE RETRASA LA
  OBTENCIN DE SU RESPUESTA.

  2.  Requerimientos de Hardware

  No hay requerimientos especiales de hardware para UUCP bajo Linux.
  Bsicamente cualquier mdem compatible Hayes trabaja bien con UUCP.

  En la mayora de casos, querr el mdem ms rpido que pueda
  conseguir. En general, deber tener una UART 16550 en su puerto serie
  o en su mdem para conseguir velocidades por encima de 9600 baudios.

  Si no sabe lo que quiere decir la ltima frase, por favor consulte el
  grupo com.dcom.modems o los distintos FAQs sobre mdems y
  comunicaciones serie as como los documentos que peridicamente se
  publican en USENET.

  3.  Dnde conseguir UUCP

  Los fuentes del UUCP de Taylor (versin actual 1.05) estn disponibles
  en ftp://prep.ai.mit.edu y los binarios en distintas distribuciones de
  Linux.

  La distribucin newspak-2.4.tar.z contiene ficheros de configuracin y
  ficheros readme referentes a la compilacin del software de uucp, news
  y mail bajo linux de varias fuentes de libre distribucin.

  Normalmente se puede encontrar (-- Para los residentes en Espaa, se
  cuenta con un mirror rapidsimo en:
  en ftp://sunsite.unc.edu/pub/Linux/system/Mail/news Si no lo puede
  encontrar en sunsite, por favor escrbame y me asegurar de que le
  llegue una copia.

  4.  Instalacin del Software

  (La mayor parte de esta seccin es una copia exacta del fichero README
  en los fuentes del UUCP Taylor v1.05 - est proporcionado aqu pero
  puedo ayudar a ``RTFM'' diciendo en su lugar justo lo que debe hacer)

  La explicacin detallada de cmo compilar est en uucp.texi en los
  fuentes.

  Puede obtener los ``bien conocidos'' ficheros conf.h y policy.h para
  Linux del la distribucin newspak mencionada anteriormente en la
  seccin ``otras fuentes de informacin''. En ese caso, probablemente
  ir directo a teclear ``make''.

  4.1.  Extraccin de los fuentes comprimidos

  Para extraer el archivo tar gzipeado, haga lo siguiente:

                       gunzip -c nombrefichero.tar.gz | tar xvf -

  El tar ``moderno'' puede hacer:

                       tar -zxvf nombrefichero.tgz

  4.2.  Edicin del Makefile.in  para especificar los directorios de
  instalacin.

  Aqu, pongo ``prefix'' a ``/usr'' en lugar del que viene por defecto
  ``/usr/local''

  4.3.  Ejecucin de `` configure ''

  Teclear ``sh configure''.

  El script de configuracin compilar unos cuantos programas de test
  para ver qu hay disponible en el sistema y calcular algunas cosas.

  El script de configuracin crear el conf.h a partir del conf.h.in y
  el Makefile del Makefile.in. Tambin crear el fichero config.status,
  el cual es un shell script que actualmente crea los ficheros.

    Mejor que editar el fichero Makefile.in en los fuentes como se ha
     indicado anteriormente, se puede conseguir lo mismo con:

                       configure --prefix=/usr/lib

  4.4.  Elaboracin de la futura configuracin del software

  4.4.1.  estn bien.  Examinar el conf.h  y el Makefile  para asegu
  rarse de que

  Yo dejo lo que est por defecto.

  4.4.2.  Editar el policy.h  para su sistema local.

    poner el tipo de lockfiles que quiere (HAVE_HDB_LOCKFILES)

    poner el tipo de ficheros de configuracin que quiere construir
     (HAVE_TAYLOR_CONFIG, HAVE_V2_CONFIG, HAVE_HDB_CONFIG)

    poner el tipo de estructura de directorio de spool que quiere
     (SPOOLDIR_HDB)

    poner el tipo de mtodo de registro que quiere (HAVE_HDB_LOGGING)

    poner el camino por defecto para buscar los comandos (Yo he aadido
     /usr/local/bin para el mio)

  4.5.  Compilar e instalar el software

    teclear ``make''.

    Utilizar ``uuchk | more'' para comprobar los ficheros de
     configuracin. Se puede usar ``uuconv'' para convertir entre
     distintos formatos de ficheros de configuracin.

    Escribir ``make install'' para instalar.

  4.6.  Preparar los ficheros de configuracin

  Recomendara empezar por coger los buenos ficheros de configuracin
  para HDB que se adjuntan e instalarlos.

    Asegrese que el fichero Permissions indica exactamente dnde se
     pueden encontrar rmail y rnews si los ha instalado en cualquier
     otro sitio que el indicado en policy.h

    Asegrese que el fichero Devices coincide con la ubicacin actual
     de su mdem (cua1=COM2 en los ejemplos)

    Editar el fichero Systems para preparar los sistemas con los que
     conectar con sus velocidades, nmero de telfono, nombre de
     usuario y password.

     PROTEGER CONTRA LECTURA DE TODO EL MUNDO ESTE FICHERO

    Preparar el fichero Permissions y aadir un conjunto de lneas por
     cada sistema con el que quiera conectar. Por razones de seguridad,
     se recomienda que cada uno tenga una cuenta separada (si se permite
     conectar desde fuera) y un directorio principal para que se puedan
     encontrar pistas.

  4.7.  Haga un intento

               /usr/lib/uucp/uucico -r 1 -x 9 -s remote_system_name

  el -x 9 le dar el mximo de informacin de depuracin escrita en el
  fichero
  preparacin inicial.

  Normalmente ejecuto con -x 4 ya que este nivel deja bastante
  informacin que me ayuda con los problemas de login. Obviamente, esto
  contiene informacin clara sobre su fichero System (cuenta/password)
  as que protjalo contra lectura de todo el mundo.

    de Pierre.Beyssac@emeraude.syseca.fr

     Taylor tiene ms niveles de registro. Utilice todos los -x para
     conseguir el mayor nivel posible.

     Adems, haga ``tail -f /usr/spool/uucp/.Admin/audit.local''
     mientras depura para ver que ocurre en ejecucin.

  4.8.  No funciona - Por qu?

  En general, puede referirse a la documentacin mencionada
  anteriormente si las cosas no funcionan. Tambin puede dirigirse a los
  vecinos mas experimentados en UUCP para que le ayuden. Normalmente,
  suele ser un error tipogrfico.

  5.  Preguntas de Uso Frecuente ( PUF s) sobre el UUCP  de Linux

  5.1.  HDB  en lugar de ``Taylor''?  Por qu est mi binario de uucp
  configurado en formato

  (Modo religioso on - Conozco gente que es tan creyente en ``facilidad
  de uso''  como yo en ``ser estndar''. Es por esto que hacen cdigo
  fuente desde el que puede construir usted mismo :-))

  Porque es IMHO la implementacin estndar de facto en este momento.
  Hay miles de sistemas con administradores experimentados y hay muchos
  lugares donde puede encontrar informacin increblemente buena
  concerniente a la preparacin de HDB.

  El uucp-1.04 que est en SLS 1.02 y posteriores acepta los tres
  formatos de ficheros de configuracin. Mientras no pueda probarlos, yo
  hice RTFM e Ian Taylor me dijo que deberan funcionar.

  El orden de bsqueda de los ficheros de configuracin es Taylor,
  despus V2 (L.sys) y finalmente HDB. Utilice la utilidad uuconv en
  /usr/lib/uucp para convertir los ficheros de configuracin de un
  formato a otro.

  Si no puede esperar, grabe los fuentes para uucp y especifique
  HAVE_BNU_CONFIG, HAVE_V2_CONFIG y HAVE_TAYLOR_CONFIG en el fichero
  policy.h y escriba ``make''.

  Los siguientes pasos son extraos, pero funcionan, si quiere ejecutar
  configuraciones Taylor de ficheros binarios que no la aceptan.

    De mbravo@tctube.spb.su (Michael E. Bravo)

     - aadir ``-I /usr/local/lib/uucp/config'' a todas las invocaciones
     de cualquier programa perteneciente al paquete uucp
  Adems, la Slackware actual tiene un bonito setup donde han separado
  los ficheros de configuracin para varias configuraciones en
  directorios distintos.  Por ejemplo, los ficheros de configuracin de
  HDB iran en /usr/lib/uucp/hdb_config. Mientras 'estaba dando vueltas'
  a esto, he probado el UUCP sacado de la Slackware en formato HDB sin
  problemas de momento.

  5.2.  actualic a uucp-1.04 ?  Por qu me contesta `` timeout '' en
  las conexiones cuando

    de Ed Carp - erc@apple.com

     Si utiliza un dispositivo ``Direct'' en el fichero Devices, hay
     ahora 10 segundos de tiempo lmite compilado. Cambie de nombre del
     dispositivo a otro que no sea ``Direct''. Si modifica sobre los
     ficheros de ejemplo de /usr/lib/uucp proporcionados con SLS, no
     habr problemas con esto.

    de Greg Naber - greg@squaly.halcyon.com

     Si se tienen timeouts del script chat, puede modificar los fuentes
     editando la lnea 323 en uuconf/syssub.c y cambiar los timeouts por
     defecto de 10 segundos a algo ms largo.

    de Ed Rodda - ed@orca.wimsey.bc.ca

     Si tiene los timeouts del script de chat, tpicamente conectando
     con otros sistemas Taylor, una pausa despus del login puede
     corregir esto.

       feed Any ACU,ag 38400 5551212 ogin: \c\d "" yourname word: passwd

    de Dr. Eberhard W. Lisse - el@lisse.NA

     Algunos kernels hacen que el mdem cuelgue despus de un par de
     segundos.  El siguiente parche enviado por Ian Taylor puede ayudar.

       *** conn.c.orig Mon Feb 22 20:25:24 1993
       --- conn.c      Mon Feb 22 20:33:10 1993
       ***************
       *** 204,209 ****
       --- 204,212 ----

            /* Make sure any signal reporting has been done before we set
              fLog_sighup back to TRUE.  */
       +   /* SMR: it seems to me if we don't care about SIGHUPS, we should clear
       +      the flag before we return  */
       +   afSignal[INDEXSIG_SIGHUP] = FALSE;
           ulog (LOG_ERROR, (const char *) NULL);
           fLog_sighup = TRUE;

  5.3.  Por qu el uucp HDB  annimo parece no funcionar?

  El uucp annimo de SLS slo funciona en el formato Taylor porque est
  compilado con HAVE_TAYLOR_CONFIG. Si quiere hacer uucp annimo en
  formato HDB, deber recompilar los fuentes definiendo HDB. Ian Taylor
  est considerando qu mtodo adoptar para tratar esta ``prestacin''.

  Adems, Taylor en formato HDB parece distinguir espacios y lneas en
  blanco. Para estar seguro, asegrese de que no hay lneas en blanco o
  espacios de ms en el fichero Permissions.

  Por ltimo, compruebe que tiene un fichero llamado remote.unknown en
  /usr/lib/uucp y que NO es ejecutable. Mire el libro de O'Reilly &
  Associates ``Managing UUCP and USENET'' para ms detalles sobre este
  fichero.

  5.4.  Qu quiere decir `` no matching ports found ''?

  Con toda probabilidad, est intentando utilizar un dispositivo
  (/usr/lib/uucp/Devices) que no existe, o el dispositivo que especifica
  en el fichero /usr/lib/uucp/Systems no coincide con los dispositivos
  vlidos en el fichero Devices.

  Lo siguiente son versiones saneadas de mis ficheros de configuracin
  de Taylor 1.05 HDB que actualmente me funcionan.

  Ve el ``ACU'' en Systems? Esto le dice qu ``puerto'' utilizar en
  Devices

  Ve la palabra ``scout'' en Systems? Esto le dice qu dialer utilizar
  en Dialers.

  Si tena un puerto ACU, pero ninguno que coincidiera con el dialer
  especificado en la misma lnea en Systems, obtendr este mensaje.

  5.5.  Qu ficheros de configuracin son buenos para el formato HDB ?

  Lo que siguen son ficheros de configuracin ``buenos'' para Taylor
  1.05 bajo Linux en formato HoneyDanBer. Funcionan en kernels 0.99-8 o
  posteriores.  Todos los ficheros deben estar en /usr/lib/uucp a no ser
  que haya modificado los fuentes para poner la librera de uucp en otro
  lugar.

  Si *TIENE* puestas cosas en directorios no estndar, d por seguro que
  cosas como el sendmail se confundirn. Necesita asegurar que todos los
  programas de comunicacin estn de acuerdo con su idea de caminos
  ``estndar''.

  Si est ejecutando un kernel 0.99-7 o anterior, cambie ``cua1'' por
  ``ttyS1''.

  #------------- Devices -------------
  # asegurese de que el dispositivo (cua1 aqui) concuerda con su sistema
  # cua1 = COM2
  #
  # aqui ``scout'' es el modem Digicom Scout Plus 19.2 que uso.
  # tbfast etc. es para las distintas velocidades de un modem Telebit Trailblazer
  # Plus
  #
  ACU cua1 - 19200 scout
  ACU cua1 - 9600 tbfast
  ACU cua1 - 1200 tbslow
  ACU cua1 - 2400 tbmed

  #------------- dialers --------------
  # notese la configuracion de los registros del Trailblazer ``al vuelo''
  # ``scout'' es un modem Digicom Scout Plus (Hayes-compatible) que uso aqui
  scout   =W-,    "" ATM0DT\T CONNECT
  tbfast  =W-,    "" A\pA\pA\pT OK ATS50=255DT\T CONNECT\sFAST
  tbslow  =W-,    "" A\pA\pA\pT OK ATS50=2DT\T CONNECT\s1200
  tbmed   =W-,    "" A\pA\pA\pT OK ATS50=3DT\T CONNECT\s2400

  #-------------- Systems -------------
  # esta es una entrada muy generica que funcionara en la mayoria de los sistemas
  #
  # Any;1 significa que puede llamar una vez por minuto con el uso de -f (forzar)
  # ACU,g significa forzar el protocolo ``g'' en lugar del que usa Taylor por
  # defecto, ``i''.
  #
  fredsys Any;1 ACU,g 19200 scout5555555 "" \r ogin:--ogin: uanon word: uanon

  #-------------------------------- Permissions -------------------------

  # El Taylor UUCP en modo HDB parece ser sensible a lineas en blanco.
  # Asegurese de que todos las lineas de permisos son reales, o estan comentadas
  #
  # esta es una entrada anonima
  #
  LOGNAME=nuucp MACHINE=OTHER \
  READ=/usr/spool/uucp/nuucp \
  WRITE=/usr/spool/uucp/nuucp \
  SENDFILES=yes REQUEST=yes \
  COMMANDS=/bin/rmail
  #
  # Esta es la configuracion normal para un sistema remoto que ``habla''
  # con nosotros. Notese el path absoluto a rnews, ya que este sistema
  # coloca las cosas en lugares que no son ``estandard''.
  #
  LOGNAME=fredsys MACHINE=fredsys \
  READ=/usr/spool/uucp/fredsys:/usr/spool/uucp/uucppublic:/files \
  WRITE=/usr/spool/uucp/fredsys:/usr/spool/uucppublic \
  SENDFILES=yes REQUEST=yes \
  COMMANDS=/bin/rmail:/usr/local/lib/news/bin/rnews
  #----------------------------------------------------------------------

  5.6.  Utilizar uucico  para llamar a nmeros alternativos

  La nueva versin v1.05 ha aadido el switch '-z' a uucico para
  intentar nmeros alternativos como sistema remoto.

  6.  Agradecimientos

  La gente que sale a continuacin me ha ayudado a juntar la informacin
  (y experiencia) que ha hecho este documento posible:

  Ed Carp, Steve Robbins, Ian Taylor, Greg Naber, Matt Welsh, Pierre
  Beyssac

  Si me he olvidado de alguien, mis disculpas.

  7.  La traduccin

  Este documento ha sido traducido por Eduardo Calatayud Ares
  ecalatayud@st.upc.es, FidoNet 2:343/108.123 componente del INSFLUG
  (Impatient & Novatous Spanish Fidonet LiNUX Users Group) uno de los
  diferentes grupos de usuarios existentes en Espaa.

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  EL CMO DEL UMSDOS
  Jacques Gelinas, jacques@solucorp.qc.ca
  v1.1, 13 November 1995

  Umsdos es un sistema de ficheros de Linux sobre uno FAT. Ofrece una
  alternativa al sistema de ficheros ext2. Su objetivo principal es con
  seguir una ms fcil coexistencia con los datos de una particin FAT,
  compartindola.  En este documento primero se explica cmo usar umsdos
  con diversas configuraciones, y despus se explica cmo funciona y se
  da alguna informacin. Se deja para el lector la decisin de si es una
  buena eleccin para l.
  ______________________________________________________________________

  ndice General:

  1.      Dnde est el UMSDOS?

  1.1.    Historia

  1.2.    Disponibilidad

  1.3.    Distribuciones que lo soportan

  1.4.    Lugar original donde encontrarlo

  1.5.    Documentacin Tcnica

  1.6.    Quin lo escribi

  2.      umsdos  como particin raz

  2.1.    El concepto de la pseudorraz.

  2.2.    Lo que hay que saber de la pseudorraz

  3.      Distintos aspectos del funcionamiento de umsdos

  3.1.    Opciones de mount

  3.2.    Cmo establecer los valores por omisin para la raz

  3.3.    Swap o no swap

  4.      Cmo arrancar un sistema umsdos

  4.1.    Loadlin

  4.2.    Con un disquete

  4.3.    LILO

  4.4.    Cmo defragmentar una particin umsdos

  4.5.    Trucos avanzados

  5.      Principios bsicos

  5.1.    Introduccin

  5.2.    umsdos  puede reemplazar al sistema de ficheros Ms-DOS .

  5.3.    Promocin de directorios

  5.4.    Cmo promover: /sbin/umssync

  5.5.    Uso de /sbin/umssync  durante el arranque

  5.6.    Cmo DESpromover

  5.7.    Qu pasa con los ficheros creados durante una sesin DOS ?

  6.      Instalacin/Desinstalacin y algunos truquillos

  6.1.    La pseudorraz /mnt/linux

  6.2.    Preparar /mnt/linux

  6.3.    Asegurarse de que /mnt/linux/  est correctamente configurado.

  6.4.    Oops releasing pseudo root ...

  6.5.    Cmo DESinstalar un sistema umsdos

  6.6.    Mover un sistema umsdos  a otro disco DOS

  6.7.    Cmo instalar 50 sistemas con umsdos

  7.      Disponer una seccin Linux  en una particin DOS

  8.      POR-QU-UMSDOS

  8.1.    El objetivo de umsdos

  8.2.    Quin lo necesita

  8.3.    Acerca de la eficiencia

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Dnde est el UMSDOS?

  1.1.  Historia

  El proyecto umsdos comenz en 1992 y se puso a disposicin de la red
  en enero del 1994 en forma de parche. Se incluy en la distribucin
  estndar del ncleo (kernel) de linux en Julio, comenzando con el
  ncleo 1.1.36.

  umsdos fue pronto adoptado por la distribucin Slackware, incluso
  antes de que fuera oficialmente incluido en el ncleo.

  umsdos empez a ser mejorado a partir del ncleo 1.1.60.  Su
  rendimiento ha mejorado radicalmente, especialmente en lo que se
  refiere a escritura. A partir del 1.1.70 (ms o menos), vuelve a ser
  estable.

  Un error de consideracin fue corregido en Linux 1.2.2. El error en
  cuestin estaba dando la lata a los usuarios desde el principio (se
  cambiaba el nombre a algunos ficheros dando la impresin de que haban
  desaparecido). Ntese que la Slackware 2.2 an incluye la versin
  1.2.1 del ncleo, luego contiene ese error.

  1.2.  Disponibilidad

  Est disponible como parche para los ncleos 1.0.x. Va incluido en los
  ncleos 1.2. Se puede compilar dentro del ncleo o cargarlo como
  mdulo. Sin embargo, hay que tener en cuenta que hoy por hoy, si se
  quiere usar umsdos en forma de mdulo cargable se debe tambin usar el
  sistema de ficheros Ms-DOS como mdulo cargable. Esto es debido a una
  limitacin en el sistema de mdulos (algunos smbolos se exportan slo
  cuando los controladores se instalan como mdulos).

  1.3.  Distribuciones que lo soportan

  Por el momento creo que slo Slackware lo incluye. Seguramente me
  equivoco, as que por favor corregidme.

  1.4.  Lugar original donde encontrarlo

  El lugar original de umsdos es sunsite.unc.edu. Se debe buscar en el
  directorio

  1.5.  Documentacin Tcnica

  Hay un montn de documentacin sobre el funcionamiento interno de
  umsdos. Se encuentra disponible tanto en formato HTML como en formato
  texto en la misma ubicacin que las utilidades.

  Por lo que yo s, la versin HTML no est disponible en ningn
  servidor de Web. Se debe transferir, destarrar, y leer localmente.

  1.6.  Quin lo escribi

  Jacques Gelinas jacques@solucorp.qc.ca

  2.  umsdos  como particin raz

  2.1.  El concepto de la pseudorraz.

  Mediante el uso de umsdos, Linux se puede instalar en una particin de
  DOS normal y corriente. Linux se instala entonces como segundo (o
  tercer) sistema operativo en la particin. Para evitar conflictos con
  los nombres de los ficheros (Si ya hubiera, por ejemplo, un directorio
  bin, o tmp, en el disco C:), umsdos utiliza un inteligente truco: La
  pseudorraz.

  Todos los ficheros de Linux se instalan en un subdirectorio del DOS
  llamado linux. Generalmente C:\LINUX. La estructura normal de
  directorios de Linux/Unix va ah. As se tiene

  

     C:\LINUX\BIN

  

     C:\LINUX\ETC

  

     C:\LINUX\LIB

  

     C:\LINUX\ROOT

  

     C:\LINUX\SBIN

  

     C:\LINUX\TMP

  

     C:\LINUX\USR

  

     C:\LINUX\VAR

  Cuando arranca, el umsdos trata de encontrar el directorio linux y el
  /linux/etc. Si existen, activa el modo pseudorraz.

  Bsicamente, el modo pseudorraz cambia el directorio raz de la
  particin a C:\LINUX con lo que queda el rbol de directorios
  convencional de Unix

  

     /bin

  

     /etc

  

     /lib

  

     /root

  

     /sbin

  

     /tmp

  

     /usr

  

     /var

  A esta lista aade uno nuevo llamado DOS, que es un directorio
  virtual.

  2.2.  Lo que hay que saber de la pseudorraz

    Slo se puede activar este modo al arrancar el sistema.  No hay
     manera de activarlo mediante una operacin de montado (con el
     comando mount).

    Este mecanismo no es ms que una visin diferente de un sistema de
     ficheros umsdos normal. Esto significa que una particin que se usa
     habitualmente como particin raz se puede montar normalmente sin
     que se produzca ningn efecto de pseudorraz.

     Por ejemplo, si se arranca linux con un disquete de mantenimiento y
     se monta la que es habitualmente la particin raz en /mnt, todos
     los directorios de linux se encontrarn en /mnt/linux/bin,
     /mnt/linux/etc, etc...

  3.  Distintos aspectos del funcionamiento de umsdos

  3.1.  Opciones de mount

  Se pueden usar las mismas opciones que para el sistema de ficheros Ms-
  DOS. La opcin conv= es cuestionable en un sistema umsdos.  Yo sugiero
  evitarla. Las opciones que ms probablemente se querr usar son

    uid=

    gid=

    umask=

  nicamente se debe recordar que umsdos trata los directorios no
  promovidos de la misma forma que el sistema de ficheros Ms-DOS. Las
  opciones de arriba se aplicarn globalmente a todos los directorios no
  promovidos. uid establece el propietario por omisin, gid establece el
  grupo por omisin, y umask establece los permisos por omisin.

  3.2.  Cmo establecer los valores por omisin para la raz

  umssetup sirve para establecer en tiempo de ejecucin el propietario
  de la particin raz. Para otras particiones umsdos, se pueden usar
  las opciones de mount o umssetup.  La manera recomendada para
  particiones no raz es poner la opcin apropiada en /etc/fstab. Aqu
  va un ejemplo. Se debera poner lo siguiente en /etc/rc.d/rc.S

              /sbin/umssetup -u jack -g group -m 0755 /

  3.3.  Swap o no swap

  El uso de un fichero de intercambio (swap) es por lo general ms lento
  que una particin de intercambio. Sin embargo, es mucho ms flexible.
  Un fichero de intercambio en una particin umsdos se configura de la
  misma manera que para cualquier otro sistema de ficheros de Linux. Por
  ejemplo, para poner 8 megaoctetos de fichero de intercambio en el
  directorio raz:

       dd if=/dev/zero bs=1024k count=8 of=/swap
       mkswap /swap 8192
       sync
       swapon /swap

  Una vez hecho esto, se puede poner lo siguiente en /etc/fstab

       /swapswapswapdefault

  Y el fichero de intercambio se activar en cada arranque del sistema
  (hay por lo general un "swapon -a" en /etc/rc.d/rc.S).

  4.  Cmo arrancar un sistema umsdos

  4.1.  Loadlin

  El paquete lodlin15.tgz est disponible en
  ftp://sunsite.unc.edu/pub/Linux/system/Bootutils Esta utilidad es
  especialmente apropiada para arrancar un sistema umsdos.  Generalmente
  todo lo que hay que hacer es

       Arrancar el DOS
       C:>loadlinx zimage root=D:

  Donde zimage es una imagen normal (comprimida) del ncleo que
  simplemente se ha copiado a algn sitio del disco del DOS. D: es el
  disco del DOS donde se ha instalado Linux.

  4.2.  Con un disquete

  Arrancar un sistema umsdos con un disquete no es distinto a arrancar
  un sistema Ext2. Se necesita un fichero (zImage) con una imagen
  comprimida del ncleo convenientemente inicializado para localizar la
  particin raz umsdos.  Esto se consigue generalmente con la orden
  rdev. La secuencia siguiente inicializa una zImage y la pone en un
  disquete.

       rdev zImage /dev/hda1
       rdev -R zImage 0
       dd if=zImage bs=8192 of=/dev/fd0

  Si esto parece lioso, se puede simplemente crear un disco de arranque
  de Ms-DOS e incluir lo siguiente en l:

    loadlin.exe

    loadlinx.exe

    zimage

  y ponerle un autoexec.bat como este

       loadlinx zimage rw root=C:

  4.3.  LILO

  LILO, el programa de arranque oficial de Linux tambin se puede usar
  para arrancar un sistema umsdos. Sin embargo, no tengo ninguna
  experiencia con l. Desde la versin 1.1.60 debera funcionar. Por
  favor mandadme correo si sabis algo.

  4.4.  Cmo defragmentar una particin umsdos

  Se puede hacer con cualquier herramienta de DOS. Los ficheros creados
  por umsdos no tienen nada de especial. Y umsdos no espera nada
  especial (estructura del directorio, orden de las entradas en el
  directorio, etc...) del sistema de ficheros DOS que lo soporta.

  Por lo que yo s, no hay ninguna herramienta de Linux que haga esto.

  4.5.  Trucos avanzados

  umsdos se apoya en el fichero --linux-.--- que a su vez se apoya en el
  directorio del DOS. A algunos usuarios puede apetecerles experimentar
  un poco. La utilidad udosctl, que es parte del paquete umsdos_progs
  (que tambin contiene umssync y umssetup) permite hacer operaciones
  bsicas con los directorios (listado, borrado) independientemente del
  fichero --linux-.--- y del directorio del DOS.

  5.  Principios bsicos

  5.1.  Introduccin

  umsdos hace corresponder los ficheros de Linux directamente con
  ficheros de Ms-DOS. La traduccin es uno a uno (biyectiva).  No se
  toca el contenido de los ficheros. umsdos slo acta sobre los
  nombres. Con los ficheros especiales (enlaces y dispositivos, por
  ejemplo) utiliza una gestin especial.

  Por cada directorio hay un fichero llamado --linux-.---.

  5.2.  umsdos  puede reemplazar al sistema de ficheros Ms-DOS .

  Se puede ver umsdos como un superconjunto de propsito general del
  sistema de ficheros Ms-DOS de linux.  Esta flexibilidad es, de hecho,
  la causa de gran parte de la confusin sobre umsdos. Aqu est el
  porqu. Si se intenta montar un disquete DOS recin formateado con
  esto

       mount -t umsdos /dev/fd0 /mnt

  Y se hace esto,

       ls / >/mnt/FICHEROCONNOMBREMUYLARGO
       ls -l /mnt

  Se obtiene lo siguiente

       -rwxr-xr-x   1 root     root  302 Apr 14 23:25 ficheroc

  As, que, por el momento, parece como si el sistema de ficheros umsdos
  no hiciera mucho ms (la verdad es que nada ms) que el sistema de
  ficheros Ms-DOS normal de Linux.

  ???

  5.3.  Promocin de directorios

  No es muy impresionante por el momento. Ahora viene la gracia.  A
  menos que se promueva, un directorio DOS ser manejado igual por
  umsdos que como lo sera por el sistema de ficheros DOS.  umsdos
  utiliza un fichero especial en cada subdirectorio para hacer la
  traduccin entre las capacidades extendidas de umsdos y las
  limitaciones del sistema de ficheros DOS.  Este fichero es invisible
  para los usuarios de umsdos, pero es visible cuando se arranca en DOS.
  Para evitar llenar la particin DOS intilmente con esos ficheros
  (--linux-.---), el fichero es ahora opcional. Si no existe, umsdos se
  comporta como Ms-DOS.

  Cuando se promueve un directorio, cualquier operacin posterior ser
  hecha con la semntica completa de la que normalmente disfrutan los
  usuarios de Unix y Linux. Y cualquier subdirectorio creado desde
  entonces (en un directorio ya promovido) ser promovido
  silenciosamente.

  Esta caracterstica permite organizar la particin DOS en material del
  DOS y material del Linux. Es importante entender que el fichero
  --linux-.--- ocupa algo de espacio (generalmente 2k por directorio).
  El DOS habitualmente utiliza bloques grandes (de hasta 16k para una
  particin de 500M), as que evitar que haya ficheros --linux-.--- en
  todas partes puede resultar beneficioso.

  5.4.  Cmo promover: /sbin/umssync

  Se puede promover un directorio en cualquier momento usando
  /sbin/umssync. Se puede usar en cualquier momento.  Al promover un
  directorio ocurre lo siguiente

    Se crea un --linux-.---.

    Se establece una relacin uno a uno (biyectiva) entre el contenido
     del fichero --linux-.--- y lo que en ese momento sea el contenido
     del directorio.

  /sbin/ummsync conserva un fichero --linux-.--- ya existente. No lo
  crea de la nada todas las veces. Simplemente le aade las entradas que
  le falten (Ficheros creados durante una sesin DOS) y le quita las
  entradas que se refieran a ficheros que ya no existen en el directorio
  DOS. De ah le viene el nombre. umssync pone --linux-.--- en
  sincronismo con el directorio DOS que hay debajo.

  5.5.  Uso de /sbin/umssync  durante el arranque

  Es una buena idea poner, si no existiera, una llamada a /sbin/umssyc
  al final del fichero /etc/rc.d/rc.S. La lnea siguiente es adecuada
  para la mayor parte de los sistemas:

       /sbin/umssync -r99 -c -i+ /

  La opcin -c evita que umssync promueva directorios.  Solamente
  actualizar los ficheros --linux-.--- donde ya existan.

  Esa lnea tiene utilidad si se accede al directorio Linux durante las
  sesiones DOS. No existe en Linux una manera eficiente de decir que un
  directorio ha sido modificado por el DOS as que umsdos no puede hacer
  un umssync segn se necesite.

  5.6.  Cmo DESpromover

  Simplemente hay que eliminar el fichero --linux-.--- usando el DOS.
  Aunque quien lo haga acabar arrepintindose.

  5.7.  Qu pasa con los ficheros creados durante una sesin DOS ?

  A menos que se use umssync en un directorio donde el DOS haya aadido
  o borrado ficheros, se advertirn algunas dificultades:

    No hace que se caiga el sistema ni causa grandes problemas, slo
     incomodidad :-)

    Los ficheros creados por el DOS:

    Sern invisibles desde Linux.

    Cuando se intente crear un fichero con el mismo nombre, dar un
     mensaje de error diciendo que el fichero ya existe.

    Esto, ms que un verdadero problema, crea confusin.  No daa el
     sistema de ficheros.

    Los ficheros borrados por el DOS no causan problemas.  umsdos
     advertir su ausencia en el primer acceso.  Se mostrar (y
     generalmente se escribir en /var/adm/syslog) un mensaje al
     respecto.

  6.  Instalacin/Desinstalacin y algunos truquillos

  La instalacin de un sistema basado en umsdos no difiere gran cosa de
  la instalacin de un sistema Linux ordinario (basado en Ext2).

  Hay dos diferencias fundamentales.

  6.1.  La pseudorraz /mnt/linux

  Los pasos normales de una instalacin son

  1. Hacer una particin con fdisk y formatearla.

  2. Montarla en el directorio /mnt de nuestro disco raz de
     instalacin.

  3. Copiar todos los paquetes en /mnt.

  El paso 1 no es necesario con umsdos (acaso no era el objetivo de
  umsdos no tener que reformatear?).

  Es posible instalar un sistema umsdos simplemente copiando todos los
  paquetes en /mnt. Funcionara, pero creara una ristra de
  subdirectorios en el directorio raz del DOS (C:) y no sera
  agradable. Esa es la razn por la que todas las instalaciones con
  umsdos usan la pseudorraz. Y es la gran diferencia entre una
  instalacin normal con Ext2 y una con umsdos: Los ficheros se copian
  en /mnt/linux.

  6.2.  Preparar /mnt/linux

  /mnt/linux no es un directorio ordinario. Tiene que ser promovido para
  que maneje correctamente los nombres largos de Linux y los ficheros
  especiales (enlaces, dispositivos).  Los pasos requeridos para poner a
  punto /mnt/linux son:

  1. mkdir /mnt/linux

  2. umssync /mnt/linux

  Y ya est!

  6.3.  Asegurarse de que /mnt/linux/  est correctamente configurado.

  A pesar de que la puesta a punto de /mnt/linux es muy sencilla, hay
  circulando por ah muchos paquetes de instalacin que lo hacen mal.
  Cmo es posible?

  El problema de instalacin ms importante suele provenir del uso de
  versiones incompatibles del programa umssync.  umsdos fue actualizado
  en Linux 1.1.88 (No lo recuerdo con exactitud) y qued un fallo en
  umssync. Para evitar confusin entre la comunidad de Linux, se decidi
  incrementar el nivel de compatibilidad requerido para todas las
  herramientas de umsdos. Las antiguas versiones de las utilidades
  fueron simplemente rechazadas.

  Parece que muchas distribuciones no han actualizado el umssync de sus
  disquetes de instalacin.

  Todava hay muchas distribuciones en ese estado por ah. El resultado
  de hecho es que el directorio /mnt/linux no se promueve y se truncan
  todos los nombres largos de fichero y se rechazan todos los ficheros
  especiales.

  Es posible comprobar si algo ha ido mal en los primeros momentos de la
  instalacin. Gracias al mecanismo de pseudoconsolas de Linux se puede
  hacer sin salir del programa de instalacin.  Hay que seguir los
  siguientes pasos:

  1. Pulsar Alt-F2 (la tecla Alt al mismo tiempo que la tecla F2).

  2. entrar como superusuario (root).

  3. cd /mnt/linux

     Si eso falla, es que se est haciendo demasiado pronto.  Al
     terminar la seleccin de paquetes es un buen momento para hacerlo.

  4. >TOTO

  5. ls -l

     Debera aparecer un fichero vaco llamado TOTO en letras
     maysculas. Si aparece en minsculas algo ha ido mal.  Intentaremos
     ejecutar umssync de nuevo.  umssync puede usarse una y otra vez sin
     ningn problema.

     umssync .  la comprobacin del TOTO. Si aparece TOTO correctamente
     todo est bien. La instalacin tiene algo extrao, pero lo hemos
     solucionado.

  6. Pulsar Alt-F1 para volver a la pantalla de instalacin.

  Si la comprobacin falla, la mejor solucin es hacerse con un disco de
  instalacin ms moderno. Normalmente se puede arreglar el disco raz
  de instalacin ponindole una versin ms moderna de umssync. No es
  difcil, pero se requiere un sistema Linux en funcionamiento.
  Simplemente hay que montar el disco raz y reemplazar el umssync
  problemtico por uno nuevo.

  6.4.  Oops releasing pseudo root ...

  La mayor parte de las instalaciones umsdos que fallan lo hacen
  mostrando ese curioso mensaje. Por muy extrao que parezca el mensaje,
  no se trata de un bug (error) en umsdos. Estas son las causas
  conocidas:

    La ms comn

     La instalacin de Slackware trata de configurar un fichero de
     intercambio (swap) en los primeros momentos de la instalacin.
     Para hacerlo, pide que se seleccione una particin (un disco del
     DOS), entonces lo monta y configura el fichero de intercambio.

     Cuando se instala un sistema Slackware, se debe configurar la
     particin receptora antes de instalar nada.  Esto normalmente
     significa que se monta la particin DOS en /mnt, se crea el
     directorio /mnt/linux, y se le aplica umssync.

     De ah es de donde viene la mayor parte de los problemas.  La
     mayora de los usuarios olvidan el paso de "configuracin de la
     particin receptora" ("setup target partition") y pasan sin ms al
     resto de la instalacin.  Como /mnt est ya montado, este error
     pasa desapercibido.  Eso significa que /mnt/linux no ha sido creado
     adecuadamente (No ha sido promovido). Ningn fichero especial, ni
     enlace, ni fichero con nombre largo se podr crear correctamente.

    Programa umssync no vlido

     No se ha creado /mnt/linux correctamente. Esto est generalmente
     causado por un programa umssync inadecuado en el disco de
     instalacin raz.

    Un antiguo error en umsdos

     Haba un error en umsdos previo a Linux 1.2.2.  El modo pseudo-root
     no se activaba adecuadamente si no exista el fichero /etc/init.
     Ahora init se ubica en /sbin. Se puede solucionar esto hacindose
     con un nuevo ncleo. Eso es lo recomendado puesto que haba otro
     error que se solucion en la versin 1.2.2.

     Si no es posible la actualizacin, habr que hacer lo siguiente

     1. Arrancar con el disquete de instalacin.

     2. Entrar como superusuario.

     3. mount -t umsdos /dev/hdXX /mnt

        Donde /dev/hdXX es la particin DOS.

     4. cd /mnt/linux/etc

     5. ln -s ../sbin/init init

     6. cd /

     7. Ctrl-Alt-Del

     8. Arrancar el sistema umsdos normalmente.

  Por desgracia, los dos primeros problemas de instalacin producen una
  instalacin completamente inservible. Se debe desinstalar (Vase la
  seccin siguiente) y volver a instalar.

  6.5.  Cmo DESinstalar un sistema umsdos

  Una cosa que sorprende agradablemente de umsdos y su mecanismo de
  pseudorraz es que se puede DESinstalar sin problemas. Simplemente hay
  que arrancar en DOS y borrar recursivamente el directorio linux. Eso
  es todo. umsdos no requiere ningn controlador especial en el
  config.sys, ni crea nada extrao fuera del directorio linux.

  6.6.  Mover un sistema umsdos  a otro disco DOS

  Se puede hacer desde Linux o desde DOS.  Slamente hay que copiar
  recursivamente el directorio linux de un disco al otro. Despus hay
  que ajustar el sistema de arranque (generalmente el programa loadlin)
  y el fichero /etc/fstab.

  umsdos puede vivir en cualquier disco DOS. No hay necesidad de
  instalarlo en el disco C:, ni en el primer disco duro.  No importa en
  absoluto.

  De hecho, se puede decidir tener varias instalaciones umsdos en
  distintos discos simplemente para experimentar.

  6.7.  Cmo instalar 50 sistemas con umsdos

  Y si instalamos un montn de sistemas Linux en un santiamn?

  Los sistemas umsdos viven en un mundo DOS. Se puede sacar provecho de
  esto si se quiere instalar Linux fcilmente.

  Se puede instalar y configurar un sistema con umsdos en un ordenador,
  y, cuando se est satisfecho con la configuracin y los distintos
  paquetes seleccionados, arrancar en DOS y copiar el directorio linux
  completo al servidor de ficheros de DOS (en caso de que exista, claro.
  Tal vez un PC-NFS). Entonces se va a otro ordenador con DOS y
  simplemente se copian los ficheros del disco de red al disco duro
  local.  Eso es todo. Slamente habr que ajustar el fichero .bat de
  arranque (Loadlinx) y ya.

  Con unos ajustes mnimos (nombre de la mquina, direccin IP),
  cualquiera puede instalar un sistema Linux en un minuto.

  Los lectores interesados apuntarn que instalar un sistema Linux
  copiando un sistema en funcionamiento tambin sirve para cualquier
  otro tipo de sistema Linux, incluyendo los basados en Ext2.

  Una de las bellezas de Linux es que no hay fichero ocultos que tengan
  que ser instalados por un mgico programa de instalacin.

  7.  Disponer una seccin Linux  en una particin DOS

  Incluso para los usuarios de Ext2 (sistema de ficheros nativo de
  Linux) tiene utilidad umsdos. La siguiente es una situacin frecuente:

    Como Linux es tu sistema operativo preferido, la particin de Linux
     empieza a llenarse ms y ms.

    Tu particin de DOS est medio vaca y cogiendo polvo.

    De repente te quedas sin espacio en la particin Ext2.

    An no ests seguro de querer deshacerte del DOS.

  umsdos puede salvar la situacin. Se puede poner un directorio Linux
  en la particin de DOS y usarlo sin restricciones para Linux. Por
  ejemplo, pongamos que queremos crear un nuevo directorio llamado
  "extra" en el disco C:. Y queremos que se comporte como un directorio
  normal de Linux.  Habra que hacer lo siguiente (suponiendo que C: es
  /dev/hda1):

       mkdir /c
       /sbin/mount -t umsdos /dev/hda1 /c
       mkdir /c/extra
       umssync /c/extra

  Hay que ser superusuario (root) para hacerlo.

  Si se configura el /etc/fstab adecuadamente, siempre se tendr acceso
  al directorio /c/extra.

  8.  POR-QU-UMSDOS

  No basta con explicar cmo funciona o se instala un sistema con
  umsdos. La mayora de la gente busca algunos consejos sobre si usar
  umsdos o no.

  8.1.  El objetivo de umsdos

  El objetivo de umsdos era facilitar la instalacin de Linux.  Otro
  objetivo era facilitar su DESinstalacin. La idea detrs de esto era
  favorecer la difusin de Linux.  La instalacin de un nuevo sistema
  operativo es siempre problemtica.  OS/2 por ejemplo enguarrina
  tranquilamente el directorio raz del disco C: con una ristra de
  nuevos directorios.  Si eres tan inteligente como yo, adems te borra
  los ficheros config.sys y autoexec.bat :-(

  El invento de la pseudorraz de umsdos evita esta invasin no deseada.
  Linux se puede DESinstalar sin ningn efecto lateral.

  8.2.  Quin lo necesita

  Si se tiene un disco duro pequeo, umsdos permite compartir el espacio
  del disco entre DOS y Linux. Un disco de menos de 300M es en mi
  opinin un disco pequeo. Baso esta opinin en el tamao de los
  diversos paquetes disponibles hoy da. Un popular procesador de textos
  se puede cepillar unos 70 megaoctetos si se seleccionan todas las
  opciones.

  Si se tiene un disco duro ms grande, se debe tomar en consideracin
  la opcin de tener una particin dedicada para Linux donde use el
  sistema de ficheros Ext2. Ext2 utiliza un tamao de bloque ms pequeo
  que DOS (exactamente 1K) por lo que instalar muchos ficheros pequeos
  utiliza menos espacio que en una particin umsdos.

  8.3.  Acerca de la eficiencia

  Lo siguiente es aplicable a umsdos si se le compara con Ext2.

    El manejo de directorios es ms rpido en Ext2. Esto es debido a la
     sobrecarga de la estructura de doble directorio de umsdos.

    El acceso a los ficheros (lectura y escritura) es probablemente ms
     rpido en umsdos que en Ext2. Esto es debido a la simplicidad del
     sistema de ficheros con FAT usado por el DOS.

     Tngase en cuenta que esta simplicidad tiene un coste:

    Un mximo de alrededor de 65.000 ficheros o bloques por particin.
     Esto tambin significa que una particin de 500 megaoctetos utiliza
     un tamao de bloque de 16K. En otras palabras, un fichero que
     contenga un slo octeto consumir 16K de espacio de disco.

    Todo es controlado por una FAT ubicada al principio del disco duro.
     Esto hace probablemente ms frgil al sistema de ficheros DOS.

    No se toman precauciones para evitar la fragmentacin de los
     ficheros. Un sistema umsdos se usar generalmente como estacin de
     trabajo de un slo usuario. En ese caso tiene demasiada
     importancia. Si se usa como sistema multiusuario, los ficheros se
     esparcirn por todo el disco, reduciendo la eficiencia de los
     accesos a los mismos.

    Los enlaces simblicos se guardan en ficheros normales. Si se
     intenta tener muchos, se encontrar que umsdos usa bastante ms
     espacio de disco que Ext2.

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  COMO Usar el sistema de Impresin en Linux
  Matt Foster, mwf@engr.uark.edu
  Traducido por: Ricardo Javier Crdenes Medina,
  a1402@correo.dis.ulpgc.es
  v1.0, 5 Agosto de 1995, Traduccin 9 de Octubre de 1996.

  Este documento describe cmo usar el sistema de spooling para impreso
  ras de lneas que provee el sistema operativo Linux. Si est buscando
  una gua para poner a punto su entorno de impresin, por favor, lea el
  Configuracin de Impresion Como.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Histrico de este COMO

  1.2.    Copyrights y Marcas registradas

  1.3.    Obteniendo los COMOs sobre Imprimir en Linux

  1.4.    Sugerencias, crticas y aportaciones

  1.5.    Reconocimientos

  2.      Imprimir bajo Linux

  2.1.    Histrico

  2.2.    Lo bsico de imprimir

  2.3.    Viendo la cola de impresin

  2.4.    Cancelando un trabajo de impresin

  3.      Elementos miscelneos

  3.1.    Formateado

  3.2.    Las variables de entorno PRINTER

  3.3.    Imprimiendo ficheros PostScript

  3.4.    Imprimiendo ficheros TeX

  3.5.    Imprimir ficheros formateados con troff

  4.      Respuestas a preguntas frecuentes

  5.      Resolucin de problemas

  6.      Referencias

  7.      Colofn

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  * Nota del traductor. A partir de ahora usar el verbo bajar para
  traducir el ingls download, ya que aunque no es literalmente
  correcto, es la forma en que ms lo he escuchado a otros usuarios
  espaoles y es la que yo mismo uso.
  Este documento describe cmo usar el sistema de spooling para
  impresoras de lneas que provee el sistema operativo Linux. Si ests
  buscando una gua para poner a punto tu entorno de impresin, por
  favor, lee el Linux Printing Setup HOWTO.

  1.1.  Histrico de este COMO

  Esta versin de este COMO es una reescritura completa del original
  escrito por Grant Taylor grant@god.tufts.edu y Brian McCauley
  B.A.McCauley@bhan.ac.uk He intentado mantener el material presentado
  por el COMO De Grant y Brian, pero he modificado drsticamente el
  estilo de presentacin y la profundidad de los temas tratados. Me
  parece que esto hace el COMO ms completo y fcil de leer. Slo puedo
  esperar que ests de acuerdo.

  1.2.  Copyrights y Marcas registradas

  Algunos nombres mencionados en este COMO estn registrados en
  copyrights y/o estn reclamados como Marcas registradas de ciertas
  personas y/o compaas.  Dichos nombres aparecen con la inicial o el
  nombre completo en maysculas en este COMO.

  El COMO Usar la Impresora en Linux v1.0 (c) 1995 Matt Foster.

  A menos que se diga otra cosa, cada autor de documentos COMO de Linux
  tiene el copyright de los que haya escrito. Estos documentos pueden
  ser reproducidos y distribuidos totalmente o en parte, en cualquier
  medio fsico o electrnico, mientas ese aviso de copyright se mantenga
  en todas las copias. La redistribucin comercial est permitida y
  alentada; sin embargo, al autor le gustara que se le notificasen
  dichas distribuciones.

  Todas las traducciones, trabajos derivados o trabajos agregados que
  incorporen cualquier documento COMO de Linux deben ser cubiertos bajo
  este aviso de copyright. Esto es, no puedes producir trabajos
  derivados de un COMO e imponer restricciones adicionales en su
  distribucin. Se pueden admitir excepciones a estas reglas bajo
  ciertas condiciones; por favor contacte con el coordinador de los COMO
  de Linux en la direccin que aparece ms abajo.

  En resumen, deseamos promocionar la diseminacin de esta informacin a
  travs de cuantos canales sea posible. De todas maneras, queremos
  retener el copyright de los documentos COMO, y nos gustara ser
  notificados de cualquier plan para redistribuir los COMOs.

  Si tienes cualquier pregunta, por favor contacta con Greg Hankins, el
  coordinador de los HOWTO de Linux, en gregh@sunsite.unc.edu. Puedes
  hacer un finger a esta direccin para averiguar el nmero de telfono
  e informacin adicional de contacto.

  1.3.  Obteniendo los COMOs sobre Imprimir en Linux

  Te recomiendo que si quieres imprimir una copia de este COMO que hayas
  bajado la versin PostScript. Est formateada de manera ms esttica y
  sencilla de leer. Puedes obtener la versin Postscript desde alguno de
  los muchos 'sites' de distribucin de Linux (como SunSITE,
  ftp://sunsite.unc.edu/Linux/docs/Howtos/), o directamente desde mi
  pgina World Wide Web en http://www.engr.uark.edu/~mwf/pht/

  1.4.  Sugerencias, crticas y aportaciones

  Las preguntas, comentarios o correcciones para este COMO deben ser
  dirigidas a mwf@engr.uark.edu

  1.5.  Reconocimientos

  Gracias a toda la gente que apart el tiempo necesario para leer la
  versin alfa de ese COMO y respondi con multitud de comentarios y
  sugerencias que ayudaron mucho (algunos podris ver vuestros
  comentarios reflejados en la versin)

  Me gustara tambin agradecer a Grant y Brian por la gran cantidad de
  informacin que me han dado durante la transicin de autora.

  2.  Imprimir bajo Linux

  Esta seccin comenta cmo imprimir ficheros, examinar la cola de
  impresin, eliminar trabajos de la cola, formatear ficheros antes de
  imprimirlos, y configurar tu entorno de impresin.

  2.1.  Histrico

  El sistema de impresin de Linux (el sistema lp) es una adaptacin del
  cdigo escrito por los Regents de la Universidad de California para la
  versin Berkeley Software Distribution (BSD) del sistema operativo
  UNIX.

  2.2.  Lo bsico de imprimir

  La forma ms simple (con mucho) de imprimir en el sistema operativo
  Linux es enviar el fichero a ser impreso directamente al dispositivo
  de impresin. Una manera de hacer esto es usar el comando cat. Como
  usuario root, uno puede hacer lo siguiente:

       # cat tesis.txt > /dev/lp

  En este caso, /dev/lp es un enlace simblico al verdadero dispositivo
  de impresin (una matricial, lser, tipogrfica o plotter). Mira la
  pgina del man ln(1) para ms informacin acerca de enlaces
  simblicos.

  Para el propsito de la seguridad, slo el usuario root y los usuarios
  de su mismo grupo como el demonio de impresin son capaces de escribir
  directamente a la impresora. Es por esto por lo que se tienen que usar
  comandos como lpr, lprm y lpq para acceder a la impresora.

  Por esto, los usuarios tienen que usar lpr para imprimir un fichero.
  El comando lpr es responsable de preocuparse por el trabajo inicial
  para imprimir un fichero, pasando entonces el control a otro programa,
  lpd, el demonio de las impresoras de lneas.

  Este demonio le dice entonces a la impresora cmo imprimir el fichero.

  Cuando lpr es ejecutado, primero copia el fichero a un cierto
  directorio (el directorio de spool) donde el fichero permanece hasta
  que lpd lo imprime. Una vez se le dice a lpd que hay un fichero para
  imprimir, crear una copia de s mismo (lo que los programadores
  llaman un 'fork'). Esta copia imprimir nuestro fichero mientras la
  copia original queda esperando otras peticiones. Esto permite que
  hayan mltiples trabajos a la vez en una cola.

  Las sintaxis de lpr(1) es bastante familiar,

       $ lpr [ opciones ] [ nombre_fichero ... ]

  Si no se especifica un nombre de fichero, lpr asume que la entrada
  ser efectuada por la entrada estndar (normalmente el teclado o la
  salida de otro programa). Esto permite que el usuario redirija la
  salida de un programa al dispositivo de impresin. Por ejemplo:

       $ cat tesis.txt | lpr

  o algo ms potente, como

       $ pr -l60 tesis.txt | lpr

  El comando lpr acepta varios argumentos en la lnea de comandos que
  permiten al usuario controlar cmo trabaja. Algunos de los argumentos
  ms ampliamente usados son: -Pprinter especifica la impresora a usar,
  -h suprime la impresin de la pgina, burst, -s crea un enlace
  simblico en lugar de copiar el fichero completo al directorio de
  spooling (til para ficheros grandes), y -#num especifica el nmero de
  copias a imprimir.  Un ejemplo de interaccin con lpr podra ser algo
  como

       $ lpr -#2 -sP dj tesis.txt

  Este comando creara un enlace simblico al fichero tesis.txt en el
  directorio de spool de la impresora llamada dj, donde debera ser
  procesado por lpd. Adems debera imprimir una segunda copia de
  tesis.txt.

  Para ver un listado de todas las opciones que reconoce lpr, ver la
  pgina del man lpr(1).

  2.3.  Viendo la cola de impresin

  Algunas veces es til saber qu trabajos estn actualmente en una cola
  de impresin particular. Esta es la nica tarea del comando lpq.

  Para ver qu hay en la cola de la impresora por defecto (definida por
  /etc/printcap), usa

         $ lpq
         lp is ready and printing
         Rank   Owner      Job  Files                            Total Size
         active mwf        31   tesis.txt                        682048 bytes

  2.4.  Cancelando un trabajo de impresin

  Otra til caracterstica para cualquier sistema de impresin es la
  capacidad de cancelar un trabajo que ha sido 'encolado' anteriormente.
  Para hacer esto, usa lprm.

        $ lprm -

  El comando anterior cancela todos los trabajos de impresin que son
  propiedad del usuario que envi el comando. Se puede cancelar un
  trabajo de forma individual obteniendo primero el nmero del trabajo
  usando lpq, dando entonces el nmero a lprm. Por ejemplo

       $ lprm 31

  cancelara el trabajo 31 (tesis.txt) en la impresora por defecto.

  3.  Elementos miscelneos

  Esta seccin comenta algunos de las cosas de utilidad general que
  puedes querer saber sobre imprimir bajo Linux.

  3.1.  Formateado

  Como la mayora de los ficheros ASCII no estn formateados para la
  impresin, es til formatearlos de alguna manera antes de que sean
  realmente impresos. Esto puede incluir poner un ttulo y nmero en
  cada pgina, poner mrgenes, espaciado doble, sangra, o imprimir el
  fichero en mltiples columnas. Una forma comn de hacer esto es usar
  un preprocesador de impresin como pr.

       $ pr +4 -d -h"Ph.D. Thesis, 2nd Draft" -l60 tesis.txt | lpr

  En el ejemplo de antes, pr tomar el fichero tesis.txt y saltara las
  primeras tres pginas (+4), pondra la longitud de pgina en 60 lneas
  (-l60), doble espacio de la salida (-d), y aadira la frase "Ph.D.
  Thesis, 2nd Draft" al principio de cada pgina (-h). lpr imprimira
  entonces la salida de pr. Mira la pgina del manual para ms
  informacin acerca de cmo usar pr.

  3.2.  Las variables de entorno PRINTER

  Todos los comandos del sistema de impresin de Linux aceptan la opcin
  -P.  Esta opcin permite que el usuario especifique que impresora usar
  como salida.  Si un usuario no especifica la impresora a usar,
  entonces se asumir que la impresora por defecto es el dispositivo de
  salida.

  En lugar de tener que especificar la impresora a usar cada vez que
  imprimes, puedes poner en la variable de entorno PRINTER el nombre de
  la impresora que quieres usar. Esto se hace de diferentes maneras por
  cada shell. Para el bash puedes hacerlo con

       $ PRINTER="nombre_de_impresora"; export PRINTER

  en csh, lo puedes hacer con

       % setenv PRINTER "nombre_de_impresora"

  Estos comandos pueden ser situados en tus scripts de login (.profile o
  .cshrc), o enviados en la lnea de comandos. (Leer bash(1) y csh(1)
  para ms informacin sobre las variables de entorno.)

  3.3.  Imprimiendo ficheros PostScript

  Imprimir ficheros PostScript en una impresora que tiene un intrprete
  PostScript es sencillo; simplemente usa lpr, y la impresora se ocupar
  de todos los detalles por ti. Para aquellos de vosotros que no tienen
  impresoras con capacidades PostScript, nos veremos obligados a usar
  otros medios. Por suerte, hay programas disponibles que pueden
  entender el PostScript, y traducirlo a un lenguaje que la mayora de
  las impresoras pueden comprender. Probablemente el ms conocido de
  estos es Ghostscript.

  La responsabilidad de Ghostscript es convertir todas las descripciones
  de un fichero PostScript a los comandos que la impresora entienda.
  Para imprimir un fichero PostScript usando Ghostscript, podras hacer
  algo como

       $ gs -dNOPAUSE -sDEVICE=deskjet -sOutputFile=|lpr tesis.ps

  Date cuenta que en el ejemplo anterior hemos enviado la salida de
  Ghostscript hacia el comando lpr usando la opcin -sOutputFile.

  Ghostview es un interface de Ghostscript para el Sistema X Window. Te
  permite previsualizar un fichero PostScript antes de que lo imprimas.
  Ghostview y Ghostscript pueden ser bajados desde
  ftp://prep.ai.mit.edu/pub/gnu/

  3.4.  Imprimiendo ficheros TeX

  Una de las maneras ms fciles de imprimir los ficheros TeX es
  convertirlos a PostScript y entonces imprimirlos usando Ghostscript.
  Para hacerlo, primero necesitas convertirlos de TeX a un formato
  conocido como DVI (siglas de DeVice-Independent, independiente del
  dispositivo). Puedes hacerlo con el comando tex(1). Entonces necesitas
  convertir el dispositivo DVI a PostScript usando dvips. Todo esto
  debera ser de la siguiente manera cuando lo escribas.

       $ tex tesis.tex
       $ dvips tesis.dvi

  Ahora ya ests preparado para imprimir los ficheros PostScript
  resultantes tal como se describe anteriormente.

  3.5.  Imprimir ficheros formateados con troff

       $ groff -Tascii tesis.tr | lpr

  o, si lo prefieres,

       $ groff tesis.tr > tesis.ps

  Y entonces imprimir el fichero PostScript como se describi
  anteriormente.
  4.  Respuestas a preguntas frecuentes

  P1.   Cmo puedo prevenir el efecto de escalera (staircase effect)?

  R1. El efecto de escaln ocurre por la manera en que algunas
  impresoras esperan que se acaben las lneas. Algunas impresoras
  quieren lneas que terminen con un retorno_de_carro/avance_de_lnea
  CR/LF (estilo DOS) en lugar de con la secuencia por defecto de los
  sistemas tipo UNIX (slo un avance de lnea, LF).  La manera ms
  sencilla de solucionar esto es mirar si tu impresora puede conmutar
  entre ambos estilos de alguna manera (un interruptor DIP o mandando
  una secuencia de escape). Para hacer la segunda necesitas crear un
  filtro (ver P2 y Foster95b).

  Una forma rpida de arreglarlo es usar un filtro en la lnea de
  comandos. un ejemplo de esto podra ser

       $ cat tesis.txt | todos | lpr

  P2.  Qu es un filtro?

  R2. Un filtro es un programa que lee de la entrada estndar (stdin),
  realiza alguna accin sobre esa entrada, y escribe en la salida
  estndar (stdout). Los filtros se usan para montn de cosas,
  incluyendo el procesado de textos.

  P3.  Qu es un filtro mgico?

  R3. Un filtro mgico es un filtro que realiza una accin basada en el
  tipo de un fichero. Por ejemplo, si el fichero es puro texto, entonces
  simplemente imprimir el fichero usando los mtodos normales. Si el
  fichero es PostScript, o cualquier otro formato, podra imprimirlo
  usando otro mtodo (ghostscript).

  5.  Resolucin de problemas

  Esta seccin cubre algunos problemas comunes en tu sistema de
  impresin. Manda sugerencias para esta seccin a mwf@engr.uark.edu

  6.  Referencias

  Esta es una seccin de referencias sobre el sistema de impresin
  Linux. He intentado mantener la seccin de referencias de este COMO lo
  ms concentrada posible. Si crees que he olvidado algn tema
  significativamente importante, por favor no dudes en contactar
  conmigo.

  Antes de que mandes tu pregunta a un grupo USENET, considera lo
  siguiente:

    Est la impresora aceptando trabajos? (usa lpc(8) para verificarlo)

    Est la respuesta a tu pregunta cubierta en este COMO , o en el
     COMO Configurar la Impresin (Printing Setup HOWTO)?
     Si contestas 's' a alguna de estas dos cosas, deberas pensarlo
     dos veces antes de enviar tu pregunta. Y cuando finalmente enves
     el mensaje a un grupo de noticias, incluye toda la informacin
     pertinente. Intenta no decir slo algo como "Estoy teniendo
     problemas con lpr, por favor ayuden." Este tipo de mensajes sern
     ignorados. Adems intenta incluir la versin del kernel que ests
     ejecutando, cundo ocurri el error y el mensaje de error
     especfico que devolvi el sistema (si lo hizo).

    Welsh, Matt.  Linux Installation and Getting Started (-- Disponible
     en castellano merced al grupo LuCAS como Linux, Instalacin y
     Primeros Pasos (LIPP), consultar anexo referente a grupos LiNUXeros
     en Espaa--) Un excelente texto introductorio para el principiante.

    Foster, Matt.  Linux Printing Setup HOWTO (-- Disponible en
     castellano igualmente--) , ver seccin ``''El suplemento a este
     COMO; cubre temas tales como preparar y configurar el software de
     impresin.

  Pginas del Manual:

    cat(1) Concatena e imprime ficheros

    dvips(1) Convierte un fichero TeX DVI a PostScript

    ghostview(1) Previsualiza ficheros PostScript usando Ghostscript

    groff(1) Front-end para el sistema de formateo groff

    gs(1) Intrprete/Visor Ghostscript

    lpc(8) Programa de control de la impresora de lneas

    lpd(8) Demonio del spool de la impresora de lneas

    lpq(1) Examina la cola de impresin

    lpr(1) Impresor off-line

    lprm(1) Elimina trabajos de la cola de impresin

    pr(1) Convierte ficheros de texto para imprimir

    tex(1) Formateo y tipado de texto

  Grupos de noticias de USENET

    comp.os.linux.*: Muchsima informacin sobre Linux

    comp.unix.*: Debates relacionados con el UNIX

  7.  Colofn

  Este COMO fue escrito usando vi, el editor fundamental; la mente
  humana, la computadora fundamental; e imaginacin, la herramienta
  fundamental.  La computadora elegida fue una Gateway2000 i486/50
  corriendo la Slackware 2.2 con la versin 1.3.4 del kernel. El
  documento original fue escrito en formato mark-up usando Linuxdoc-SGML
  (-- Cuya gua est disponible en castellano, consultar anexo Grupo
  LiNUXeros en Espaa--) (una versin hackeada del QWERTZ DTD de Tom
  Gordon). El COMO fue entonces enviado va mail a Greg Hankins, el
  coordinador del Proyecto de Documentacin de Linux. All fue
  convertido a formatos PostScript, TeXinfo, DVI, ASCII y HTML.
  La traduccin se escribi con el pico, en un i586/90 corriendo el
  kernel 2.0.0 con mark-ups de Linuxdoc-SGML.

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Linux XFree86 COMO
  Por Matt Welsh, mdw@sunsite.unc.edu
  Montilla, pacopepe@insflug.org
  v3.0, 15 Marzo de 1995

  Este documento describe cmo obtener, instalar y configurar la versin
  3.1.1 de la variante XFree86 del Sistema X Window (X11R6)  para sis
  temas LiNUX. Es una gua paso a paso para configurar XFree86 en su
  sistema.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Requisitos de Hardware

  3.      Instalacin de XFree86

  4.      Configuracin de XFree86

  5.      Introduccin de informacin sobre la tarjeta de vdeo.

  6.      Ejecucin de XFree86

  7.      Aparicin de Problemas

  8.      Copyright

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  El sistema X Window (-- N. del T. W-i-n-d-o-w, sin la `s' final, a
  diferencia de cierto sistema aperitivo ;-)--) es un enorme y potente
  (y en cierto modo, complejo) entorno grfico para sistemas UNIX.  El
  cdigo original del Sistema X Window fue desarrollado en el MIT (-- N.
  del T. Masachussets Institute of Technology, Instituto Tecnolgico de
  Masachussets)--) ; las casas comerciales han hecho desde entonces de X
  un estndard industrial para plataformas UNIX. Prcticamente, cada
  estacin de trabajo UNIX que exista en el mundo hace funcionar alguna
  variante del Sistema X Window.

  Ha sido desarrollada una adaptacin de libre distribucin del Sistema
  X Window del MIT, versin 11, edicin 6 (X11R6) para sistemas UNIX
  sobre 80386/80486/Pentium, por un equipo de programadores encabezados
  originariamente por David Wexelblat (dwex@XFree86.org).  La edicin,
  conocida como XFree86, est disponible para implementaciones UNIX
  System V/386, 386BSD, y otras basadas en x86, incluyendo LiNUX.
  Incluye todos los binarios (-- N. del T. Ejecutables ya compilados--)
  , ficheros de soporte, libreras y herramientas necesarias.

  En este documento, daremos una descripcin paso a paso de cmo
  instalar y configurar XFree86 para LiNUX, aunque tendrs que completar
  ciertos detalles por t mismo, leyendo la documentacin adjunta a la
  misma distribucin de XFree86. (Esta documentacin es discutida ms
  adelante.)  No obstante, el uso y personalizacin del sistema X Window
  sobrepasa el objetivo de este documento ---para este propsito,
  deberas hacerte con alguno de los buenos libros existentes sobre el
  empleo del sistema X Window---

  2.  Requisitos de Hardware

  Como en XFree86 versin 3.1.1, difundida en Febrero del 1995, son
  soportados los chipsets que detallamos ms adelante. La documentacin
  incluida con su adaptador de vdeo debera especificar el chipset que
  emplea. Si est buscando un nueva tarjeta grfica, o va a comprar una
  mquina nueva que la incorpora, haga que el vendedor le especifique
  con exactitud la marca, modelo, y chipset de la tarjeta.  Para ello,
  es posible que el vendedor tenga que contactar con el servicio tcnico
  para tu propio beneficio; generalmente, los vendedores estarn
  contentos de hacerlo.

  Muchos vendedores de hardware para PC dirn que la tarjeta es una
  "SVGA estndard" que "debera funcionar" en su sistema.  Explique que
  su software (mencione LiNUX y XFree86!) no soporta todos los chipsets
  de vdeo, y que debe tener informacin detallada.

  Tambin se puede determinar el chipset de su tarjeta de vdeo
  ejecutando el programa SuperProbe que incluye la distribucin de
  XFree86.  Esto se trata con mayor detalle ms adelante.

  Son soportados los siguientes chipsets SVGA (-- N. del T. Como
  comprender el lector por la fecha de divulgacin del presente
  documento, esta lista no es ni mucho menos actual; una visita a
  www.xfree86.org es un buen mtodo para obtener informacin ms
  reciente. Otros lugares de inters: www.nine.com,(informacin sobre
  configuracines LiNUX de sus tarjetas) www.s3.com--) :

    Tseng ET3000, ET4000AX, ET4000/W32

    Western Digital/Paradise PVGA1

    Western Digital WD90C00, WD90C10, WD90C11, WD90C24, WD90C30,
     WD90C31, WD90C33

    Genoa GVGA

    Trident TVGA8800CS, TVGA8900B, TVGA8900C, TVGA8900CL, TVGA9000,
     TVGA9000i, TVGA9100B, TVGA9200CX, TVGA9320, TVGA9400CX, TVGA9420

    ATI 18800, 18800-1, 28800-2, 28800-4, 28800-5, 28800-6, 68800-3,
     68800-6, 68800AX, 68800LX, 88800

    NCR 77C22, 77C22E, 77C22E+

    Cirrus Logic CLGD5420, CLGD5422, CLGD5424, CLGD5426, CLGD5428,
     CLGD5429, CLGD5430, CLGD5434, CLGD6205, CLGD6215, CLGD6225,
     CLGD6235, CLGD6420

    Compaq AVGA

    OAK OTI067, OTI077

    Avance Logic AL2101

    MX MX68000, MX680010

    Video 7/Headland Technologies HT216-32

  Los siguientes chipsets SVGA con prestaciones de aceleracin tambin
  son soportados:

    8514/A (y clnicas genuinas)

    ATI Mach8, Mach32

    Cirrus CLGD5420, CLGD5422, CLGD5424, CLGD5426, CLGD5428, CLGD5429,
     CLGD5430, CLGD5434, CLGD6205, CLGD6215, CLGD6225, CLGD6235

    S3 86C911, 86C924, 86C801, 86C805, 86C805i, 86C928, 86C864, 86C964

    Western Digital WD90C31, WD90C33

    Weitek P9000

    IIT AGX-014, AGX-015, AGX-016

    Tseng ET4000/W32, ET4000/W32i, ET4000/W32p

  Las tarjetas que emplean estos chipsets son soportadas en todos las
  clases de buses, incluyendo VLB y PCI.

  Todo lo anterior es soportado tanto en modos monocromo y 256 colores,
  con la excepcin de los chipsets Avance Logic (--  N. del T. Atencin:
  esta tarjeta ha tenido una difusin muy amplia en Espaa.--) , MX y
  Video 7, que slo son soportados en el modo de 256 colores. Si su
  tarjeta de vdeo tiene bastante DRAM instalada, muchos de los
  anteriores chipsets (-- N. del T. Por propia experiencia, la Avance
  Logic tiene idnticas prestaciones con 1  2 megas de DRAM; no soporta
  ms colores por ampliarla a 2 megas :-(.--) son soportados en modos de
  16 y 32 bits por pixel (ms especficamente, algunas tarjetas Mach32,
  P9000, S3 y Cirrus). La configuracin corriente es 8 bits por pixel
  (osea, 256 colores).

  Los servidores monocromos tambin soportan tarjetas VGA genricas, y
  las tarjetas monocromas Hercules, Hyundai HGC1280, Sigma LaserView, y
  Apollo monochrome. En la Compaq AVGA, slo son soportados 64k de
  memoria de vdeo para el servidor monocromo, y la GVGA no ha sido
  probada con ms de 64k.

  Esta lista crecer indudablemente con el tiempo. Las notas de
  distribucin de la versin actual de XFree86 contendrn una relacin
  completa de los chipsets de vdeo soportados.

  Un problema al que se enfrentan los desarrolladores de XFree86 es que
  ciertos fabricantes de tarjetas de vdeo no emplean mecanismos
  estndar para determinar las frecuencias de reloj empleadas para
  controlar la tarjeta. Algunos de ellos o no proporcionan
  especificaciones describiendo cmo programar la tarjeta, o exigen a
  los desarrolladores firmar una declaracin de no-divulgacin para
  obtener la informacin.

  Esto limita obviamente la libre distribucin del software XFree86, que
  es algo que no est dispuesto a hacer el equipo de desarrollo de
  XFree86.  Durante bastante tiempo, este ha sido un problema con
  determinadas tarjetas de vdeo fabricadas por Diamond, pero al tiempo
  de la divulgacin de la versin 3.1 de XFree86, Diamond ha comenzado a
  trabajar con el equipo de desarrollo a fin de distribuir controladores
  de libre distribucin para estas tarjetas.

  La configuracin recomendada para XFree86 bajo LiNUX es una mquina
  486 con al menos 8 megabytes de RAM, y una tarjeta de vdeo con alguno
  de los chipsets relacionados anteriormente. Para obtener unas
  prestaciones ptimas, sugerimos emplear una tarjeta aceleradora, como
  una tarjeta con chipset S3. Se debe comprobar la documentacin de
  XFree86 y asegurarse de que su tarjeta en particular es soportada
  antes de decidirse y adquirir hardware costoso. Los ndices
  comparativos de rendimiento para varias tarjetas bajo XFree86 son
  enviadas regularmente a los newsgroups comp.windows.x.i386unix y
  comp.os.linux.x.

  Como nota al margen, mi sistema personal LiNUX es un 486DX2-66, 20
  megabytes de RAM, equipado con un tarjeta de chipset VLB S3-864 con 2
  megabytes de DRAM. He ejecutado benchmarks (--  N. del T. Programas
  para evaluar las prestaciones de un sistema determinado.--) bajo X en
  esta mquina y en estaciones de trabajo Sun Sparc IPX. El sistema
  LiNUX es a grosso modo 7 veces ms rpido que el Sparc IPX. (Para los
  curiosos, XFree86-3.1 bajo LiNUX, se ejecuta a alrededor de 171,000
  xstones; el Sparc IPX a alrededor de 24,000).

  En general, XFree86 en un sistema LiNUX con tarjeta aceleradora le
  proporcionar muchas ms prestaciones que las encontradas en
  estaciones de trabajo UNIX comerciales (que generalmente utilizan
  simples framebuffers (--  N. del T. Genricamente, dispositivo fsico
  capaz de almacenar informacin sobre una imagen en memoria.--) para
  los grficos)

  Su mquina precisar al menos 4 megabytes de RAM fsica, y 16
  megabytes de RAM virtual global. (por ejemplo, 8 megas de fsica y 8
  megas de swap (--  N. del T. Mecanismo por el cual se pasan a disco
  pginas de memoria RAM cuando sta se agota. En adelante, me referir
  a este sistema como paginacin tambin.--) ).

  Recurdese que cuanta ms RAM fsica se tenga, menos paginar el
  sistema al y desde el disco cuando la memoria est baja. Debido a que
  la paginacin es inherentemente lenta (los discos son muy lentos
  comparados con la memoria), el tener 8 megabytes o ms de RAM es lo
  necesario para hacer funcionar XFree86 confortablemente.

  Un sistema con 4 megabytes (-- N. del T. Para aquellos que no puedan
  disponer de ms, o por razones de espacio en el HD, decir a ttulo
  informativo que existe el paquete Tiny-X para estos casos.--) de RAM
  fsica podra funcionar mucho ms lento (hasta 10 veces) que uno con 8
  o ms megas.

  3.  Instalacin de XFree86

  La distribucin binaria de XFree86 puede encontrarse en varios
  servidores de FTP. En sunsite.unc.edu, se encuentra en /pub/Linux/X11.
  ( En el momento de escribir esto, la versin actual es la 3.1.1; se
  distribuyen nuevas versiones peridicamente).

  Es muy probable que se haya obtenido XFree86 como parte de una
  distribucin LiNUX, en cuyo caso el obtener el software por separado
  no es necesario.

  Si se obtiene XFree86 por FTP directamente, la siguiente relacin
  enumera los archivos de la distribucin XFree86-3.1.

  Se requiere uno de los siguientes servidores:

     XF86-3.1.1-8514.tar.gz
        Servidor para tarjetas basadas en 8514.

     XF86-3.1.1-AGX.tar.gz
        Servidor para tarjetas basadas en AGX.

     XF86-3.1.1-Mach32.tar.gz
        Servidor para tarjetas basadas en Mach32.

     XF86-3.1.1-Mach8.tar.gz
        Servidor para tarjetas basadas en Mach8.

     XF86-3.1.1-Mono.tar.gz
        Servidor para modos de vdeo monocromos.

     XF86-3.1.1-P9000.tar.gz
        Servidor para tarjetas basadas en P9000.

     XF86-3.1.1-S3.tar.gz
        Servidor para tarjetas basadas en S3.

     XF86-3.1.1-SVGA.tar.gz
        Servidor para tarjetas basadas en Super VGA.

     XF86-3.1.1-VGA16.tar.gz
        Servidor para tarjetas basadas en VGA/EGA.

     XF86-3.1.1-W32.tar.gz
        Servidor para tarjetas basadas en ET4000/W32.

  Son necesarios todos los siguientes archivos:

     XF86-3.1.1-bin.tar.gz
        El resto de los binarios de X11R6.

     XF86-3.1.1-cfg.tar.gz
        Archivos de configuracin xdm, xinit y fs.

     XF86-3.1.1-doc.tar.gz
        Documentacin y pginas man.

     XF86-3.1.1-inc.tar.gz
        Archivos include.

     XF86-3.1.1-lib.tar.gz
        Libreras X compartidas y ficheros de soporte.

     XF86-3.1-fnt.tar.gz
        Fuentes (tipogrficas) bsicas.

  Son opcionales los siguientes archivos:

     XF86-3.1-ctrb.tar.gz
        Programas de contribucin seleccionados.

     XF86-3.1-extra.tar.gz
        Servidores XFree86 extra y binarios.

     XF86-3.1-lkit.tar.gz
        Kit de enlace de Servidores para personalizaciones.

     XF86-3.1-fnt75.tar.gz
        Fuentes de pantalla de 75-dpi.

     XF86-3.1-fnt100.tar.gz
        Fuentes de pantalla de 100-dpi.

     XF86-3.1-fntbig.tar.gz
        Fuentes grandes Kanji y otras.

     XF86-3.1-fntscl.tar.gz
        Fuentes escalables (Speedo, Tipo1).

     XF86-3.1-man.tar.gz
        Pginas de manual.

     XF86-3.1-pex.tar.gz
        Binarios PEX, archivos include y libreras.

     XF86-3.1-slib.tar.gz
        Libreras estticas X y archivos de soporte.

     XF86-3.1-usrbin.tar.gz
        Demonios (--  N. del T. Para los que vienen del dos, son
        anlogos a los TSRs.--) que residen en /usr/bin.

     XF86-3.1-xdmshdw.tar.gz
        Versin de ``Shadow password'' de xdm.

  El directorio XFree86 debe contener archivos README y notas de la
  instalacin para la versin actual.

  Todo lo necesario para instalar XFree86 es hacerse con los anteriores
  ficheros, crear el directorio /usr/X11R6 (como root), y descomprimir
  los archivos de /usr/X11R6 con un comando como:

       gzip -dc XF86-3.1.1-bin.tar.gz | tar xfB -

  Recurdese que estos archivos tar son empaquetados en relacin con
  /usr/X11R6.  Por tanto, es importante desempaquetar los archivos ah.

  Tras desempaquetar los archivos, lo primero que se necesita es enlazar
  el archivo /usr/X11R6/bin/X al servidor que se est usando. Por
  ejemplo, si se desea usar el servidor color SVGA, se debe enlazar
  /usr/bin/X11/X con /usr/X11R6/bin/XF86_SVGA. Si en lugar de este se
  desea emplear el servidor monocromo, reenlazar este archivo con
  XF86_MONO mediante el comando

        ln -sf
       /usr/X11R6/bin/XF86_MONO /usr/X11R6/bin/X

  Lo mismo contina siendo cierto si se emplea alguno de los dems
  servidores.

  Si no se est seguro de cul servidor usar, o no se conoce el chipset
  de la tarjeta, se puede ejecutar el programa SuperProbe, que se
  encuentra en /usr/X11R6/bin (est incluido en el paquete XF86-3.1-bin
  listado anteriormente).  Este programa intentar determinar el tipo de
  chipset y otra informacin;  anotar sus resultados para posteriores
  referencias.

  Es preciso asegurarse de que /usr/X11R6/bin est en el path.  Esto
  puede conseguirse editando el fichero por defecto de su sistema
  /etc/profile o /etc/csh.login (basado en el shell o intrprete de
  comandos que Vd. u otros usuarios del sistema utilicen.) O se puede
  simplemente aadir el directorio al path personal modificando
  /etc/.bashrc o /etc/.cshrc, dependiendo del shell empleado.

  Tambin es preciso asegurarse de que /usr/X11R6/lib pueda ser
  localizado por ld.so, el runtime linker (--  N. del T.  Alguna
  sugerencia para traducir este trmino? enlazador dinmico de
  libreras (o es muy ``liberal'' esta traduccin)?.--) . Para hacer
  esto, aadir la lnea

       /usr/X11R6/lib

  al fichero /etc/ld.so.conf, y ejecutar /sbin/ldconfig, como root.

  4.  Configuracin de XFree86

  La configuracin de XFree86 no es difcil en la mayora de los casos.
  De todos modos, si se da el caso de que emplees hardware cuyos
  controladores estn en desarrollo, o desees obtener las mejores
  prestaciones o resoluciones de una tarjeta grfica aceleradora, la
  configuracin de XFree86 puede requerir tiempo en algn aspecto.

  En esta seccin describiremos cmo crear y editar el archivo
  XF86Config, que configura el servidor XFree86. En muchos casos es
  mejor empezar con una configuracin ``bsica'' de XFree86, que emplee
  una resolucin baja, como 640x480, que debera ser soportada por todas
  las tarjetas de vdeo y monitores de todo tipo. Una vez se tenga
  XFree86 funcionando a resolucin baja, estndar, se podr jugar con la
  configuracin para explotar las posibilidades de su hardware de vdeo.
  La idea es que lo que se debe saber es si XFree86 funciona del todo en
  su sistema, y de que no hay nada errneo en la configuracin, antes de
  intentar la a veces difcil tarea de configurar XFree86 para su
  autntico uso.

  Adems de la documentacin relacionada aqu, se debe leer la siguiente
  documentacin:

    La documentacin XFree86, en /usr/X11R6/lib/X11/doc (contenida en
     el paquete XFree86-3.1-doc). Debe ser ledo especialmente el
     fichero README.Config, que es un tutorial sobre la configuracin de
     XFree86.

    Varios chipsets de vdeo tienen ficheros README aparte, sitos en el
     directorio mencionado antes (como README.Cirrus y README.S3).
     Lense si son aplicables a su caso.

    La pgina man para XFree86.

    La pgina man para XF86Config.

    La pgina man para el servidor en concreto que se est usando.
     (como XF86_SVGA o XF86_S3).

  El fichero principal de configuracin de XFree86 es
  /usr/X11R6/lib/X11/XF86Config.  Este fichero contiene informacin de
  su ratn, parmetros de su tarjeta de vdeo, y dems cosas
  relacionadas. El fichero XF86Config.eg se adjunta con la distribucin
  como ejemplo. Copiar este fichero a XF86Config y editarlo como punto
  de partida.

  La pgina man de XF86Config explica el formato de este fichero en
  detalle.  Lase esta pgina ahora, si es que no lo ha hecho todava.

  Vamos a presentar un fichero de configuracin de muestra XF86Config,
  parte por parte. Este archivo puede no parecerse exactamente al
  fichero incluido con la distribucin de XFree86, pero la estructura es
  la misma.

  Tngase en cuenta que el formato del archivo XF86Config puede variar
  con cada versin de XFree86; esta informacin slo es vlida para la
  versin 3.1 de XFree86.

  Asimismo, no se debe copiar sin ms el fichero de configuarcin
  descrito aqu a su sistema e intentar usarlo. El intentar emplear un
  fichero de configuracin que no se corresponde a su hardware puede
  someter al monitor a funcionar a una frecuencia demasiado alta para el
  mismo; se ha informado de monitores (especialmente monitores de
  frecuencia fija) que han sido daados o inutilizados por el uso de
  ficheros XF86Config configurados incorrectamente. La conclusin:
  Asegrese completamente de que su archivo XF86Config se corresponde a
  su hardware antes de intentar hacer uso de l.

  Cada seccin del fichero XF86Config va entre el par de lneas

       Section "section-name"
         ...
       EndSection

  La primera parte del fichero XF86Config es Files, que tiene este
  aspecto:

       Section "Files"
           RgbPath     "/usr/X11R6/lib/X11/rgb"
           FontPath    "/usr/X11R6/lib/X11/fonts/misc/"
           FontPath    "/usr/X11R6/lib/X11/fonts/75dpi/"
       EndSection

  La lnea RgbPath define la trayectoria o path hacia la base de datos
  de color de X11R6, y cada lnea FontPath define la trayectoria hacia
  el directorio que contenga las fuentes X11. En general no hace falta
  modificar estas lneas; basta con cerciorarse de que hay una entrada
  FontPath por cada tipo de fuente que se haya instalado (es decir, por
  cada directorio de /usr/X11R6/lib/X11/fonts).

  La siguiente seccin es ServerFlags, que especifica distintos
  parmetros para el servidor. Generalmente esta seccin est vaca.

  Section "ServerFlags"
  # descomentar esto puede causar un ``core dump'' en el punto en que
  # se reciba una signal. Esto puede dejar la consola en un estado inoperante,
  # pero puede proveer un seguimiento de los fallos mejor al core dump para
  # ayudar a localizar errores
  #    NoTrapSignals

  # Descomentar esto para inhabilitar la secuencia de salida del servidor
  #    DontZap
  EndSection

  Aqu tenemos todos los renglones comprendidos por las secciones
  descomentados.

  La siguiente seccin es Keyboard. Esta deber ser bastante intuitiva.

       Section "Keyboard"
           Protocol    "Standard"
           AutoRepeat  500 5
           ServerNumLock
       EndSection

  Hay ms opciones disponibles ---ver el fichero XF86Config si se quiere
  modificar la configuracin del teclado--- lo anterior debe funcionar
  en la mayora de los sistemas.

  La siguiente seccin es Pointer, que especifica los parmetros para el
  ratn.

       Section "Pointer"

           Protocol    "MouseSystems"
           Device      "/dev/mouse"

       # Baudrate y SampleRate son solo para algunos ratones Logitech
       #    BaudRate   9600
       #    SampleRate 150

       # Emulate3Buttons es una opcion para los ratones de 2 botones tipo Microsoft
       #    Emulate3Buttons

       # ChordMiddle es una opcion para algunos ratones de 3 botones Logitech
       #    ChordMiddle

       EndSection

  Las nicas opciones que deberan afectarle por ahora son Protocol y
  Device. Protocol especifica el protocolo que su ratn usa (no la marca
  o modelo del ratn). Los tipos vlidos de Protocol (bajo LiNUX, hay
  otras opciones disponibles para otros Sistemas Operativos) son:

    BusMouse

    Logitech

    Microsoft

    MMSeries

    Mouseman

    MouseSystems

    PS/2

    MMHitTab

  BusMouse Debe ser empleado con el ratn tipo busmouse Logitech.
  Tngase en cuenta que los ratones antiguos Logitech usarn protocolos
  Logitech, pero los nuevos ratones Logitech emplean protocolos tanto
  Microsoft como Mouseman.  Este es un caso en el que el protocolo no
  tiene que ver necesariamente con la marca o modelo del ratn.

  Device especifica el fichero de dispositivo con el que se puede
  acceder al ratn. En la mayora de los sistemas LiNUX, es /dev/mouse.
  /dev/mouse ES generalmente un enlace al puerto serie apropiado (como
  /dev/cua0) para un ratn serie, o al dispositivo busmouse para ratones
  busmouse. En cualquiera de los casos, asegurarse de que el fichero de
  dispositivo mencionado en Device existe.

  La siguiente seccin es Monitor, que especifica las caractersticas de
  tu monitor. Como con otras secciones del fichero XF86Config, puede
  haber ms de una seccin Monitor.  Esto es til si se tiene ms de un
  monitor conectado a un sistema, o si se emplea el mismo fichero
  XF86Config con multiples configuraciones de hardware.  No obstante, en
  general, slo se necesitar una seccin Monitor.

       Section "Monitor"

           Identifier  "CTX 5468 NI"

           # Estos valores son unicamente para un CTX 5468NI! No intentar emplearlo
           # con su monitor (a menos que tenga este modelo)

           Bandwidth    60
           HorizSync    30-38,47-50
           VertRefresh  50-90

           # Modes: Name      dotclock  horiz                vert

           ModeLine "640x480"  25       640 664 760 800      480 491 493 525
           ModeLine "800x600"  36       800 824 896 1024     600 601 603 625
           ModeLine "1024x768" 65       1024 1088 1200 1328  768 783 789 818

       EndSection

  La lnea Identifier se emplea para otorgar un nombre arbitrario a la
  entrada Monitor. Esta puede ser una cadena; se emplear para referirse
  posteriormente a la entrada Monitor en el fichero XF86Config.

  Estas son listadas a continuacin.

  HorizSync especifica las frecuencias horizontales de sincronismo para
  su monitor, en kHz. Si se tiene un monitor multisync, tiene que ser un
  rango de valores (o varios rangos separados por comas), como se ve a
  continuacin. Si se tiene un monitor de frecuencia fija, debe ser una
  relacin de valores concretos, como:

           HorizSync    31.5, 35.2, 37.9, 35.5, 48.95

  El manual del monitor debe proporcionar esos valores en las
  especificaciones tcnicas. Si no se dispone de esta informacin, se
  puede contactar tanto con el fabricante como con el vendedor del
  monitor para obtenerlas. Tambin existen otras fuentes de informacin.

  VertRefresh especifica los intervalos verticales de refresco
  horizontal vlidos (o frecuencias de sincronismo vertical) para el
  monitor, en Hz.  Como HorizSync, este dato puede ser un intervalo o
  una lista de valores discretos; el manual del monitor debe de tener
  una lista de ellos.

  HorizSync y VertRefresh se emplean slo para comprobar doblemente que
  las resoluciones de pantalla que se especifiquen estn comprendidas en
  los intervalos vlidos. Esto se hace para disminuir el riesgo de daar
  el monitor, intentando hacerlo funcionar a una frecuencia para la que
  no est diseado.

  la indicacin ModeLine se emplea para especificar una nica resolucin
  para el monitor. El formato de ModeLine es

       ModeLine nombre valores_de_reloj valores_horiz. valores_vert.

  nombre es una cadena arbitraria, que se emplear para referirse a
  dicho modo de resolucin en el archivo posteriormente.
  valores_de_reloj son las frecuencias de reloj a las que se somete, o
  ``dot-clock'' asociado a dicho modo de resolucin. La frecuencia de
  reloj se especifica normalmente en MHz, y es el rango al cual la
  tarjeta de vdeo deber mandar los ``pixels'' al monitor a esa
  resolucin.  valores_horiz y valores_vert son cuatro valores,
  especificando cada uno cundo debe de dispararse el haz de electrones,
  y cundo tienen lugar los pulsos horizontales y verticales de
  sincronismo durante un barrido.

  Cmo se pueden determinar los valores de ModeLine para su monitor?
  El fichero VideoModes.doc, incluido con la distribucin de XFree86,
  describe en detalle cmo determinar esos valores para cada modo de
  resolucin que soporte el monitor. Antes que nada, valores_de_reloj
  debe corresponderse a uno de los valores de ``dot-clock'' que pueda
  producir su tarjeta. Posteriormente, en el archivo XF86Config
  especificaremos estos valores; slo se pueden usar modos de vdeo con
  un valor de frecuencia_de_reloj soportados por la tarjeta de vdeo.

  Hay dos ficheros incluidos en la distribucin de XFree86 que puede que
  contengan valores de ModeLine para su monitor. Estos archivos son
  modeDB.txt y Monitors, residiendo ambos en /usr/X11R6/lib/X11/doc.

  Se debe comenzar con los valores de ModeLine para los tiempos
  correspondientes al monitor estndar VESA, que son soportados por la
  mayora de los monitores. modeDB.txt incluye valores de tiempo para
  resoluciones VESA estndar. En ese fichero, se vern entradas como:

       # 640x480@60Hz Non-Interlaced mode
       # Horizontal Sync = 31.5kHz
       # Timing: H=(0.95us, 3.81us, 1.59us), V=(0.35ms, 0.064ms, 1.02ms)
       #
       # name        clock   horizontal timing     vertical timing      flags
        "640x480"     25.175  640  664  760  800    480  491  493  525

  Este es un valor de tiempo estndar VESA para un modo de vdeo
  640x480.  Emplea un ``dot-clock'' de 25.175, que debe de ser soportado
  por la tarjeta de vdeo para usar este modo (ms sobre esto despus).
  Para incluir esta entrada en el archivo XF86Config, deber emplearse
  la lnea:

       ModeLine "640x480" 25.175 640 664 760 800 480 491 493 525

  Tngase en cuenta que el argumento nombre para ModeLine (en este caso
  "640x480") es una cadena de valores arbitrarios --- por convencin, se
  nombra el modo tras la resolucin, pero nombre puede ser tcnicamente
  cualquier dato descriptivo que d una referencia sobre el modo para
  nosotros.---

  Para cada ModeLine empleado, el servidor comprobar que las
  especificaciones para dicho modo caen dentro del intervalo de valores
  especificados con Bandwidth, HorizSync y VertRefresh.

  Si no es as, el servidor protestar cuando se intente iniciar X (ms
  sobre esto ms adelante). Por cierta razn, el ``dot-clock'' empleado
  por el modo en cuestin no deber ser mayor que el valor usado por
  Bandwidth.  (No obstante, en muchos casos es ms seguro el uso de
  modos con un ancho de banda ligeramente mayor del que el monitor puede
  soportar.)  Si los valores estndar VESA no funcionan en su caso
  (sabr, tras intentarlo, usarlos ms adelante) es momento de mirar en
  modeDB.txt y Monitors, que incluyen valores para modos especficos de
  muchos tipos de monitor.  Se pueden crear entradas ModeLine para los
  valores hallados en esos dos ficheros tambin.  Asegrese de slo
  emplear valores para el modelo especfico de monitor que se tenga.

  Tngase en cuenta que muchos monitores de 14 y 15 pulgadas no soportan
  los modos de resolucin ms altos, ni a veces resoluciones de 1024x768
  a valores bajos de frecuencias de reloj. Esto significa que si no
  puede encontrar modos de alta resolucin para su monitor en esos
  archivos, es muy probable que el monitor no los soporte.

  Si se est completamente perdido, y no se puede hacer funcionar los
  valores ModeLine para su monitor, se puede seguir las instrucciones
  del archivo VideoModes.doc, incluido con la distribucin de XFree86,
  para generar valores de ModeLine de las especificaciones enumeradas en
  el manual del monitor. Aunque el tiempo requerido para intentar
  generar valores ModeLine a mano puede variar, este es un buen sitio
  donde mirar si no se encuentran los valores que se precisan.
  VideoModes.doc tambin describe el formato de la indicacin ModeLine y
  otros aspectos del servidor XFree86 con morboso detalle.

  Por ltimo, si se obtienen valores ModeLine que son casi, pero no del
  todo correctos, puede ser posible ir modificando ligeramente sus
  valores hasta obtener los resultados deseados. Por ejemplo, si al
  ejecutarse XFree86 la imagen del monitor se desva ligeramente, o
  parece fluctuar, se pueden seguir las instrucciones del fichero
  VideoModes.doc para intentar corregir esos valores. Asegrese tambin
  de comprobar los mandos del monitor propiamente dicho! En muchos casos
  es necesario cambiar el tamao horizontal o vertical de la imagen tras
  arrancar XFree86 para centrarla y ajustar su tamao correctamente. El
  tener dichos mandos de control en el frontal del monitor pueden desde
  luego hacerle la vida ms fcil.

  No se deben emplear valores de frecuencia o de ModeLine para otros
  modelos de monitor que no sea el suyo. Si se intenta someter al
  monitor a otra frecuencia para la que no est diseado, se puede daar
  o incluso inutilizar definitivamente.

  La siguiente seccin del fichero XF86Config es Device, que especifica
  los parmetros de su tarjeta de vdeo. He aqu un ejemplo.

       Section "Device"
               Identifier "#9 GXE 64"

               # Nada por ahora; completaremos estos valores posteriormente.

       EndSection

  Esta seccin define las propiedades de una tarjeta de vdeo en
  particular.  Identifier es una secuencia arbitraria que describe a la
  tarjeta; usaremos esta secuencia para referirnos a la tarjeta
  posteriormente.

  Inicialmente, no es preciso incluir nada en la seccin Device, excepto
  en Identifier. Esto se debe a que emplearemos el propio servidor X
  para probar las propiedades de la tarjeta de vdeo, introducindolas
  en la seccin Device ms tarde.  El servidor XFree86 es capaz de
  comprobar el chipset de vdeo, las frecuencias de reloj, RAMDAC, y la
  cantidad de RAM de vdeo que tiene la tarjeta.

  No obstante, antes de que hagamos esto, necesitamos terminar de
  escribir el fichero XF86Config. La siguiente seccin es Screen, que
  especifica la combinacin de tarjeta de vdeo/monitor a usar por un
  servidor en particular.

        Section "Screen"
            Driver     "Accel"
            Device     "#9 GXE 64"
            Monitor    "CTX 5468 NI"
            Subsection "Display"
                Depth      16
                Modes      "1024x768" "800x600" "640x480"
                ViewPort   0 0
                Virtual    1024 768
            EndSubsection
        EndSection

  La lnea Driver especifica el servidor X que se va a emplear.  Los
  valores vlidos para Driver son:

    Accel: Para los servidores XF86_S3, XF86_Mach32, XF86_Mach8,
     XF86_8514, XF86_P9000, XF86_AGX, y XF86_W32 ;

    SVGA: Para el servidor XF86_SVGA ;

    VGA16: Para el servidor XF86_VGA16 ;

    VGA2: Para el servidor XF86_Mono ;

    Mono: Para los controladores de los servidores no-VGA monocromos de
     XF86_Mono y XF86_VGA16.

  Debe de asegurarse de que /usr/X11R6/bin/X es un enlace simblico al
  servidor que se est empleando.

  La lnea Device especifica la secuencia Identifier de la seccin
  Device correspondiente a la tarjeta de vdeo a emplear para dicho
  servidor. Anteriormente, creamos una seccin Device con la lnea

       Identifier "#9 GXE 64"

  Por tanto, empleamos "#9 GXE 64" en la lnea Device aqu.

  Anlogamente, la lnea Monitor especifica el nombre de la seccin
  Monitor a usarse con este servidor. Aqu, "CTX 5468 NI" es el
  Identifier empleado para la seccin Monitor descrita anteriormente.

  Subsection "Display" define varias propiedades del servidor XFree86
  correspondientes a su combinacin de monitor/tarjeta de vdeo.  El
  archivo XF86Config describe todas estas opciones en detalle;  la
  mayora de ellas son para ``poner la guinda'' al pastel y no son
  necesarias para hacer funcionar el sistema.

  Las opciones que debe conocer son:

    Depth. Define el nmero de planos de color ---el nmero de bits por
     pixel---. Normalmente, Depth est configurado a 8. Para el servidor
     VGA16, se debe usar una profundidad (de color) de 4, y para el
     servidor monocromo una profundidad de 1. Si se est empleando una
     tarjeta aceleradora con suficiente memoria para soportar ms bits
     por pixel, se puede definir Depth (-- Profundidad.--) a 16, 24, o
     32.  Si se experimentan problemas con profundidades de color
     superiores a 8, configrelo para 8 nuevamente e intente solucionar
     el problema ms adelante.

    Modes. Esta es la lista de nombres de modos de vdeo que han sido
     definidos empleando la etiqueta ModeLine de la seccin Monitor.

     En la anterior seccin empleamos a ModeLines con el nombre
     "1024x768", "800x600", y "640x480".  Por tanto, usaremos una lnea
     Modes tal como

                Modes    "1024x768" "800x600" "640x480"

  El primer modo que aparece en esta lnea ser el adoptado por defecto
  al arrancar XFree86. Una vez se est ejecutando XFree86, se puede cam
  biar entre los modos que aparezcan aqu empleando las teclas ctrl-alt-
  numerico + y ctrl-alt-numerico -.

  Lo mejor sera emplear modos de baja resolucin al configurar inicial
  mente XFree86, como 640x480, que tendern a funcionar en la mayora de
  los sistemas.  Una vez se tenga la configuracin bsica funcionando,
  se puede modificar XF86Config para proporcionar mayores resoluciones.

    Virtual. Establece el tamao de escritorio virtual. XFree86 posee
     la capacidad de emplear la memoria adicional disponible en su
     tarjeta para aumentar el tamao de su escritorio. Cuando mueva el
     puntero del ratn al borde de la pantalla, el escritorio se
     desplazar, visualizando el espacio adicional.  Por tanto, incluso
     si se emplean los modos de menor resolucin como 800x600, se puede
     definir Virtual a la resolucin total que pueda proporcionar su
     tarjeta (una tarjeta de vdeo de 1 megabyte puede soportar 1024x768
     con una profundidad de 8 bits por pixel; una tarjeta de 2 megabytes
     1280x1024 con una profundidad de 8, o 1024x768 a una profundidad de
     16) (-- N. del T. Recurdese, esto siempre que la tarjeta CUMPLA
     los estndares VESA, cosa que no todas hacen, como referenciamos
     antes, especialmente las superbaratas.--) .  Por supuesto, la
     superficie al completo nunca podr estar visible al completo, pero
     sigue pudiendo ser empleada.

     La capacidad Virtual es una forma estupenda de emplear la memoria
     de su tarjeta de vdeo, pero es ms bien limitada. Si se desea
     utilizar un verdadero escritorio virtual, sugerimos emplear fvwm, o
     un gestor de ventanas similar en su lugar. fvwm permite tener
     escritorios virtuales suficientemente grandes (implementado
     mediante la ocultacin de ventanas y similar, en vez de almacenar
     el escritorio completo en la memoria de vdeo de golpe). Ver las
     pginas man de fvwm para obtener ms detalles sobre esto; la
     mayora de los sistemas LiNUX emplean fvwm por defecto.

    ViewPort. Si se emplea la opcin Virtual descrita anteriormente,
     ViewPort define las coordinadas de la esquina superior izquierda
     del escritorio virtual al arrancar XFree86.  Lo ms usado es
     Virtual 0 0; si no se especifica as, el escritorio se centra en la
     pantalla del escritorio virtual (lo cual puede no ser lo deseado).

  Existen muchas opciones para esta seccin; ver la pgina man de
  XF86Config para una descripcin completa. En la prctica no son
  necesarias estas opciones para conseguir que XFree86 funcione
  inicialmente.

  5.  Introduccin de informacin sobre la tarjeta de vdeo.

  Ahora su archivo XF86Config est listo para funcionar, con la
  excepcin de la informacin completa sobre la tarjeta de vdeo. Lo que
  vamos a hacer es emplear el servidor X para comprobar el resto de la
  informacin, introducindola posteriormente en XF86Config.

  En lugar de tantear esta informacin usando el servidor X, los valores
  XF86Config para muchas tarjetas estn listados en los ficheros
  modeDB.txt, AccelCards, and Devices. Estos archivos se encuentran
  todos en /usr/X11R6/lib/X11/doc. Adems, hay varios archivos README
  (-- N. del T. Lame.--)

  para determinados chipsets. Se debe buscar en esos ficheros
  informacin sobre su tarjeta de vdeo, y emplearla (los valores de
  frecuencias de reloj, tipo de chipset, y las posibles opciones) en el
  archivo XF86Config. Si no hay ningn tipo de informacin, se puede
  tantear como se describe aqu.

  En estos ejemplos mostraremos la configuracin para una tarjeta de
  vdeo #9 GXE 64, que emplea el chipset XF86_S3.  Se da la
  circunstancia de que esta tarjeta es la que emplea el autor, pero lo
  discutido aqu es aplicable a cualquier tarjeta.

  Lo primero a hacer es determinar el tipo de chipset de vdeo empleado
  en la tarjeta. Si ejecuta SuperProbe (que reside en /usr/X11R6/bin)
  le informar acerca de esto, pero se necesita conocer el nombre del
  chipset de vdeo como lo conoce el servidor X.

  Para hacer esto, ejecute el comando

       X -showconfig

  Esto le proporcionar los nombres de chipset conocidos por su servidor
  X.  (Las pginas man los enumeran tambin). Por ejemplo, para el
  servidor acelerador XF86_S3, obtenemos:

       XFree86 Version 3.1 / X Window System
       (protocol Version 11, revision 0, vendor release 6000)
       Operating System: Linux
       Configured drivers:
         S3: accelerated server for S3 graphics adaptors (Patchlevel 0)
             mmio_928, s3_generic

  Los nombres vlidos de chipset para este servidor son mmio_928 y
  s3_generic. La pgina man del servidor XF86_S3 describe estos chipsets
  y qu tarjetas los emplean. En el caso de la tarjeta de vdeo #9 GXE
  64, el apropiado es mmio_928.

  Si no se sabe qu chipset usar, el servidor X puede comprobarlo por
  t.  Para hacer esto, ejecutar el comando

       X -probeonly > /tmp/x.out 2>&1

  si se emplea bash como intrprete de comandos. Si se emplea csh,
  probar:

       X -probeonly &> /tmp/x.out

  Este comando debe ser ejecutado cuando el sistema no est bajo carga,
  es decir, mientras no tenga lugar ninguna otra actividad en el
  sistema. Este comando intentar calcular las frecuencias de reloj de
  su tarjeta (como vimos antes), y la carga del sistema puede estropear
  los clculos.

  El resultado de lo anterior (en /tmp/x.out) debe contener lneas como
  las que siguen:

       XFree86 Version 3.1 / X Window System
       (protocol Version 11, revision 0, vendor release 6000)
       Operating System: Linux
       Configured drivers:
         S3: accelerated server for S3 graphics adaptors (Patchlevel 0)
             mmio_928, s3_generic
          ...
       (--) S3: card type: 386/486 localbus
       (--) S3: chipset:   864 rev. 0
       (--) S3: chipset driver: mmio_928

  Aqu observamos que los dos chipsets vlidos para este servidor (en
  este caso, XF86_S3) son mmio_928 y s3_generic. El servidor tras
  tantear encontr una tarjeta de vdeo empleando el chipset mmio_928.

  Aadir en la seccin Device del archivo XF86Config una lnea Chipset,
  que contenga el nombre del chipset determinado anteriormente. Por
  ejemplo,

       Section "Device"
               # Aqui ya teniamos definido el identificador...
               Identifier "#9 GXE 64"
               # adicion de esta linea:
               Chipset "mmio_928"
       EndSection

  Ahora necesitamos determinar las frecuencias de funcionamiento de
  reloj empleadas por la tarjeta de vdeo. La frecuencia de
  funcionamiento de reloj, o dot clock es simplemente la velocidad a la
  que la tarjeta de vdeo puede enviar puntos de imagen o pixels al
  monitor. Como hemos visto, cada resolucin de monitor tiene un dot
  clock asociado a l.  Ahora necesitamos determinar cales frecuencias
  de reloj son utilizables por la tarjeta de vdeo.

  Primero debe de mirar en los archivos (modeDB.txt, y dems)
  mencionados anteriormente, y ver si las frecuencias de reloj de su
  tarjeta se enumeran all.

  Los dot clocks sern normalmente listados de 8  16 valores, todos los
  cuales estn en MHz. Por ejemplo, si miramos en modeDB.txt podemos
  observar una entrada para la tarjeta de vdeo Cardinal ET4000, que
  tiene este aspecto:

       # chip    ram   virtual   clocks                           default-mode  flags
        ET4000   1024  1024 768   25  28  38  36  40  45  32   0  "1024x768"

  Como podemos observar, las frecuencias de barrido para esta tarjeta
  son 25, 28, 38, 36, 40, 45, 32, y 0 MHz.

  En la seccin Devices del fichero XF86Config, se debe aadir una lnea
  Clocks que contenga el listado de dot clocks para su tarjeta.

  Por ejemplo, para los clocks anteriores, aadiramos la lnea

               Clocks 25 28 38 36 40 45 32 0

  A la seccin Devices del fichero, tras Chipset.  Tngase en cuenta
  que el orden de los valores es importante! no desordene el listado o
  borre los duplicados.

  Si no se pueden encontrar las frecuencias de barrido asociadas a su
  tarjeta, el servidor X puede tambin tantearlas. Empleando el comando
  X -probeonly descrito anteriormente, el resultado contendra lneas
  con el siguiente aspecto:

       (--) S3: clocks:  25.18  28.32  38.02  36.15  40.33  45.32  32.00  00.00

  Podemos entonces aadir una lnea Clocks que contenga todos esos
  valores, tal y como los obtenemos. Se puede usar ms de una lnea
  Clocks en XF86Config en el caso de que todos los valores no cupiesen
  en una.  Nuevamente, es preciso asegurarse de que se introducen en el
  mismo orden en que son proporcionados.

  Asegrese de que no hay una lnea Clocks (o de que est descomentada)
  en la seccin Devices del fichero al usar X -probeonly para tantear
  las frecuencias. Si hubiese una lnea Clocks presente, el servidor no
  tanteara esos valores, empleara los valores presentes en XF86Config.

  Tngase en cuenta que algunas tarjetas aceleradoras emplean chips de
  frecuencias programables. (ver la pgina man de XF86_Accel para ms
  detalles;  esto generalmente es aplicable a tarjetas S3, AGX y XGA-2.)
  Este chip permite, esencialmente, al servidor X, comunicar a la
  tarjeta qu dot clocks usar. Si este es el caso, puede que no se pueda
  encontrar el listado de los dot clocks para la tarjeta en ninguno de
  los ficheros anteriores. O la lista de las frecuencias de reloj
  obtenida al usar X -probeonly puede slo contener uno o dos valores
  concretos, siendo el resto duplicados o cero.

  Para tarjetas que empleen un chip programable, se debe emplear un
  lnea ClockChip, en lugar de Clocks en el fichero XF86Config.
  ClockChip proporciona el nombre del chip que emplea la tarjeta de
  vdeo; las pginas man de cada servidor describen cules son. Por
  ejemplo, en el fichero README.S3, podemos ver que varias tarjetas
  S3-864 emplean un chip ``ICD2061A'', y que debemos emplear la lnea

          ClockChip "icd2061a"

  en lugar de Clocks en el archivo XF86Config. Como con Clocks, esta
  lnea deber estar en la seccin Devices, tras Chipset.

  Anlogamente, algunas tarjetas aceleradoras precisan que se
  especifique el tipo de chip RAMDAC en el fichero XF86Config, empleando
  una lnea Ramdac.  La pgina man de XF86_Accel describe esta opcin.
  Normalmente, el servidor X averiguar correctamente el RAMDAC.

  Algunas tarjetas de vdeo requieren que se especifiquen ciertas
  opciones en la seccin Devices de XF86Config. Estas opciones sern
  descritas en la pgina man de su servidor, as como en otros ficheros
  (como README.cirrus o README.S3. Estas opciones son activadas
  empleando la lnea Option. Por ejemplo, la tarjeta #9 GXE 64 necesita
  dos opciones:

               Option "number_nine"
               Option "dac_8_bit"

  Generalmente, el servidor X funcionar sin estas opciones, pero son
  necesarias para conseguir prestaciones ptimas. Hay demasiadas
  opciones para describirlas aqu, y cada una depende de la tarjeta de
  vdeo empleada en particular. Si debe usar alguna de estas opciones,
  ---me temo que no--- las pginas man del servidor X y algunos ficheros
  en /usr/X11R6/lib/X11/doc especificarn cules son.

  As que cuando se haya terminado, se acabar con una seccin Devices
  que tendr este aspecto:

       Section "Device"
               # Esta seccion device es para esta #9 GXE 64 solo!
               Identifier "#9 GXE 64"
               Chipset "mmio_928"
               ClockChip "icd2061a"
               Option "number_nine"
               Option "dac_8_bit"
       EndSection

  La mayora de las tarjetas de vdeo precisarn una lnea Clocks, en
  lugar de ClockChip, como se describi anteriormente. La anterior
  seccin Device es nicamente vlida para una tarjeta de vdeo en
  particular, la #9 GXE 64.

  Hay otras opciones que pueden ser incluidas en la seccin Devices.
  Comprobar las pginas man del servidor para los detalles ms
  escurridizos, aunque lo anterior debe de bastar para la mayora de los
  sistemas.

  6.  Ejecucin de XFree86

  Con el fichero XF86Config configurado, se est preparado para arrancar
  el servidor X y dar un garbeo. Lo primero, asegurarse de que
  /usr/X11R6/bin est en el path.

  El comando para arrancar XFree86 es

       startx

  Este es una ``cubierta'' de xinit (en caso de que se estuviese
  acostumbrado a emplear xinit en otros sistemas UNIX).

  Este comando arrancar el servidor X y ejecutar los comandos que se
  encuentran en el fichero .xinitrc (-- N. del T. Para los usuarios de
  RedHat, .Xclients.--) . en su directorio home ejecutar. Si este
  fichero no existe, se emplear por defecto
  /usr/X11R6/lib/X11/xinit/xinitrc.

  Un fichero .xinitrc convencional tiene este aspecto:

       #!/bin/sh

       xterm -fn 7x13bold -geometry 80x32+10+50 &
       xterm -fn 9x15bold -geometry 80x34+30-10 &
       oclock -geometry 70x70-7+7 &
       xsetroot -solid midnightblue &

       exec twm

  Este script arrancar dos clientes xterm, un oclock, y configura el
  color de la ventana raz (el fondo) a midnightblue.  Arrancar
  entonces twm, el gestor de ventanas. Tngase en cuenta que twm, se
  ejecuta con el mandato del intrprete de comandos exec ; esto hace que
  el proceso xinit sea reemplazado por twm.  Una vez que el proceso twm
  finalice, se cerrar el servidor X. Se puede hacer finalizar twm
  empleando los mens principales: presionando el botn 1 del ratn
  sobre el fondo del escritorio, se abrir un men emergente que
  permitir Exit Twm.

  Es preciso asegurarse de que el ltimo comando de .xinitrc se arranca
  con exec, y que no se coloca en modo de ejecucin background o segundo
  plano (sin un ``&'' al final de la lnea).  De no ser as, el servidor
  X morira tan pronto como se arrancasen los clientes del fichero
  .xinitrc

  Alternativamente, se puede salir de X presionando la combinacin ctrl-
  alt-backspace.  Esto matara al servidor X directamente, saliendo del
  sistema de ventanas.

  Lo anterior es una muy muy simple configuracin del escritorio.
  Multitud de maravillosos programas y configuraciones estarn
  disponibles con trabajar un poco el fichero .xinitrc.  Por ejemplo, el
  gestor de ventanas fvwm proporciona escritorio virtual, pudiendo
  personalizarse colores, fuentes, tamao y posiciones de ventanas, y
  as segn le plazca a uno. A pesar de que el Sistema X Window pueda
  parecer un tanto simplista en un principio, es extremadamente potente,
  ya que puede ser personalizado para uno mismo.

  Si es la primera vez que se encuentra con el entorno X Window, le
  recomendamos encarecidamente hacerse con un libro como The X Window
  System: A User's Guide.  El empleo y configuracin de X es demasiado
  profundo para tratarlo aqu. Ver las pginas man de xterm, oclock, y
  twm para hacerse con pistas para ponerse al da.

  7.  Aparicin de Problemas

  A veces, algo no ir del todo bien cuando se arranque el servidor X.
  Esto suele estar causado casi siempre por un problema en el archivo
  XF86Config.  Generalmente, los valores de frecuencia del monitor no
  estn, o las frecuencias dot clock de la tarjeta de vdeo estn
  definidos de forma incorrecta.  Si la pantalla parece fluctuar, o los
  bordes estn deformados, es una clara indicacin de que los valores de
  frecuencia o dot clocks del monitor son errneos. Asegrese tambin de
  que de que se est especificando correctamente el chipset de su
  tarjeta de vdeo, as como otras opciones de la seccin Device del
  fichero XF86Config. Hay que estar absolutamente seguro de que se
  emplea el servidor X correcto y de que /usr/X11R6/bin/X es un enlace
  simblico a este servidor.

  Si todo lo dems falla, trate de arrancar X ``a pelo''; es decir
  emplee un comando como:

       X > /tmp/x.out 2>&1

  Se puede entonces matar el servidor X (empleando la combinacin de
  teclas ctrl-alt-backspace) y examinar el contenido de /tmp/x.out.  El
  servidor X informar de todas las advertencias o errores ---por
  ejemplo, si la tarjeta de vdeo no tiene un dot clock que se
  corresponda con un modo soportado por el monitor.

  El fichero VideoModes.doc incluido en la distribucin XFree86 contiene
  muchas sugerencias de cmo manipular los valores de su fichero
  XF86Config.

  Recuerde que puede emplear ctrl-alt-numerico + y ctrl-alt-numerico -
  para ir conmutando entre los modos de vdeo listados en la lnea Modes
  de la seccin Screen de XF86Config. Si el modo de mayor resolucin a
  no parece correcto, trate de cambiar a resoluciones menores. Esto le
  permitir saber, por lo menos, que esas partes de su configuracin de
  X estn funcionando correctamente.

  Compruebe tambin los controles de posicin y tamao horizontal y
  vertical de su monitor. En muchos casos, es necesario ajustarlos
  cuando se arranca X.  Por ejemplo, si la pantalla parece estar movida
  ligeramente (-- N. del T. Ligeramente es eso, ligeramente.--) a un
  lado, normalmente se puede corregir esto usando los controles del
  monitor.

  El newsgroup de USENET comp.windows.x.i386unix est dedicado a
  discusiones sobre XFree86, as como comp.os.linux.x. Sera una buena
  idea observar ese newsgroup para enviar consultas relativas a su
  configuracin de vdeo ---puede que se encuentre con alguien con los
  mismos problemas que uno tiene.---

  8.  Copyright

  Este documento es Copyright (c)1995 de Matt Welsh. Este trabajo puede
  ser reproducido en su totalidad o en parte, tanto de forma impresa
  como electrnica, sujeto a las siguientes condiciones:

  1. La notificacin del copyright y esta licencia debe preservarse
     completa en todas las copias, tanto completas como parciales.

  2. Cualquier traduccin o trabajo derivado debe de ser aprobado por el
     autor por escrito antes de su distribucin.

  3. Si se distribuye el Trabajo parcialmente, deben de incluirse
     instrucciones para poder obtener la versin completa (en forma
     impresa o electrnica), as como los medios para conseguirla.

  4. Pueden ser reproducidas pequeas porciones como ilustraciones para
     revistas o citas para otros trabajos sin esta notificacin de
     permiso si se cita apropiadamente su procedencia.

  Pueden otorgarse excepciones a estas normas para propsitos
  acadmicos; escrbase al autor del trabajo, y pregntesele. Estas
  restricciones estn para proteger a los autores, no para restringiros
  como educadores o alumnos.

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  HOWTO 3Dfx pour Linux
  Bernd Kreimeier (bk@gamers.org)
  v1.16, 6 February 1998

  Ce document dcrit l'utilisation des cartes acclratrices 3Dfx sous
  Linux.  Il contient une liste de diffrents matriels compatibles,
  dcrit la configuration des gestionnaires de priphriques impliqus
  et propose des rponses aux questions les plus courantes.
  ______________________________________________________________________

  Table des matires























































  1. Introduction

     1.1 Contributions et contacts
     1.2 Noms des produits et protection industrielle
     1.3 Historique
     1.4 Versions actualises du document
     1.5 Retour d'exprience
     1.6 Licence

  2. Technologie des acclrateurs graphiques

     2.1 Les bases
     2.2 Configuration matrielle
     2.3 Quelques mots sur l'organisation du Voodoo Graphics (tm)

  3. Installation

     3.1 Installation de la carte.
        3.1.1 Solutions aux problmes d'installation
        3.1.2 Configuration du noyau
        3.1.3 Configuration des priphriques
     3.2 Gestion des crans
        3.2.1 Affichage avec un seul cran
        3.2.2 Un moniteur avec deux entres vido
        3.2.3 Deux crans
     3.3 Installation des logiciels Glide
        3.3.1 Le programme
        3.3.2 Test de l'installation

  4. Rponses aux questions les plus courantes ( la Foire Aux Questions )

  5. FAQ: quel Matriel ?

     5.1 Systme ncessaire :
     5.2 Est-ce que a fonctionne avec Linux-Alpha ?
     5.3 Quels sont les composants 3Dfx compatibles avec la distribution ?
     5.4 Le Voodoo Rush (tm) est-il gr ?
     5.5 Le Voodoo 2 (tm) est-il gr ?
     5.6 Quelles sont les cartes compatibles avec Glide ?
     5.7 Qu'est-ce qui distingue les cartes ?
     5.8 Qu'en est-il de l'AGP?

  6. FAQ: Voodoo Graphics (tm) ? 3Dfx ?

     6.1 3Dfx, qui est-ce ?
     6.2 Qui est Quantum3D ?
     6.3 Voodoo Graphics (tm), qus acco ?
     6.4 Voodoo Rush (tm) ?
     6.5 Voodoo 2 (tm) ?
     6.6 Qu'est ce qu'un intermdiaire VGA ?
     6.7 Qu'est-ce que le Texelfx, un TMU ?
     6.8 Qu'est ce qu'une unit Pixelfx ?
     6.9 Qu'est-ce que le mode SLI ?
     6.10 Le SLI avec une seule carte ?
     6.11 Quelle quantit de mmoire ?
     6.12 Le Voodoo Graphics (tm) gre-t-il l'affichage en 24 ou 32 bits ?
     6.13 Le calcul de profondeur du Voodoo Graphics (tm) est-t-il en 24 ou 32 bits par pixel ?
     6.14 Quelles rsolutions offre le Voodoo Graphics (tm) ?
     6.15 Quelles sont les tailles de texture disponibles ?
     6.16 Le Voodoo Graphics (tm) gre-t-il les textures palettises ?
     6.17 Qu'en est-il du dpassement de frquence d'horloge ?
     6.18 O puis-je trouver d'autres informations concernant le Voodoo Graphics (tm) ?

  7. FAQ: Glide? TexUS?

     7.1 Glide, qus acco ?
     7.2 TexUS, qus acco ?
     7.3 Glide est-il un freeware?
     7.4 O trouver Glide?
     7.5 Les sources de Glide sont elles disponibles ?
     7.6 Quel est le support de Linux Glide ?
     7.7 O puis-je poser des questions ayant trait  Glide ?
     7.8 O envoyer les notifications de bug ?
     7.9 Qui assure la maintenance de Linux Glide ?
     7.10 Comment puis-je contribuer  Linux Glide?
     7.11 Dois-je ncessairement avoir recours  Glide ?
     7.12 Dois-je programmer avec l'API Glide ?
     7.13 Quelle est la version courante de Glide ?
     7.14 Qu'en est-il de la gestion de plusieurs Texelfx ?
     7.15 Linux Glide est il semblable  Glide pour DOS/Windows ?
     7.16 O trouver des informations sur Glide?
     7.17 O trouver des dmos Glide ?
     7.18 Qu'est-ce qu'ATB?

  8. FAQ: Glide et XFree86 ?

     8.1 Glide fonctionne-t-il avec XFree86 ?
     8.2 Doit-on se cantonner au plein cran ?
     8.3 Quel est le problme des cartes AT3D/Voodoo Rush (tm) ?
     8.4 Qu'en est-il de GLX pour XFree86 ?
     8.5 Glide et les serveurs X commerciaux ?
     8.6 Glide et SVGA ?
     8.7 Glide et GGI ?

  9. FAQ: OpenGL/Mesa ?

     9.1 Qu'est ce qu'OpenGL ?
     9.2 O trouver davantage d'informations sur OpenGL ?
     9.3 IGlide met-il en oeuvre OpenGL ?
     9.4 Existe-t-il un pilote OpenGL pour 3Dfx ?
     9.5 Existe-t-il une version commerciale d'OpenGL pour Linux et 3Dfx ?
     9.6 Qu'est-ce que Mesa ?
     9.7 Mesa fonctionne-t-elle avec 3Dfx ?
     9.8 Qu'en est-il de la portabilit de Mesa pour Glide?
     9.9 O trouver des informations sur Mesa ?
     9.10 O trouver des informations sur Mesa Voodoo ?
     9.11 Mesa gre-t-il le texturage multiple ?
     9.12 Mesa supporte-t-elle le filtrage tri-linaire en une seule tape ?
     9.13 Qu'est-ce que le hack Mesa ( "Window Hack" ) ?
     9.14 Qu'en est-il de GLUT ?

  10. FAQ: Quake ?

     10.1 O en est le pilote 3Dfx GL pour Quake ?
     10.2 Existe-t-il une version Linux de 3Dfx glQuake ?
     10.3 glQuake fonctionne-t-il dans une fentre XFree86 ?
     10.4 Comment rinitialiser l'affichage aprs un plantage de glQuake ?
     10.5 Des problmes avec Quake pour Linux ?
     10.6 Les trous de scurit de Quake pour Linux
     10.7 Linuxquake supporte-t-il le texturage multiple ?
     10.8 O trouver des informations  jour sur glQuake pour Linux ?

  11. FAQ: solutions aux problmes courants ?

     11.1 Cette carte a-t-elle t teste ?
     11.2 chec lors du changement des privilges d'entres/sorties ?
     11.3 Un fonctionnement sans les droits root est-il possible ?
     11.4 L'affichage est dplorable !
     11.5 La dernire image ne disparat pas !
     11.6 L'conomiseur d'cran se dclenche ( deux crans ) ?
     11.7 Mon ordinateur semble se bloquer ( X11, un seul cran ) !
     11.8 Ma machine se bloque ( un ou deux crans ) ?
     11.9 Ma machine se bloque ( avec une carte S3 ) ?
     11.10 Pas de conflit d'adresse mais la machine se bloque quand mme !
     11.11 Mesa est actif mais n'accde pas  la carte !
     11.12 Rinitialiser une carte SLI ( configuration  deux cartes ) ?
     11.13 Rinitialiser une carte SLI ( configuration  une seule carte ) ?


  ______________________________________________________________________







  11..  IInnttrroodduuccttiioonn

  Ce document est le 3Dfx HOWTO pour Linux. Il contient toutes les
  informations ncessaires  l'installation et la configuration du 3Dfx
  sous Linux. Des rponses aux questions les plus frquentes sur
  l'utilisation du 3Dfx ainsi que des pointeurs vers d'autres sources
  d'informations en rapport avec l'acclration matrielle du graphisme
  sur ordinateur sont fournies.

  Ce document n'est valable que pour les architectures PC munies de
  Linux.  Certaines informations peuvent tre valables sur d'autres
  architectures mais je n'ai aucune exprience dans ce domaine. Seules
  sont couvertes les cartes  base de 3Dfx. L'utilisation d'autres
  cartes acclratrices dborde du cadre de ce document.



  11..11..  CCoonnttrriibbuuttiioonnss eett ccoonnttaaccttss

  Ce document n'existerait pas sans l'information glane par de
  multiples personnes : celles qui se sont impliques dans le portage et
  le test de Glide pour Linux, les dveloppeurs des pilotes Mesa et Mesa
  Voodoo et celles qui ont relu ce document pour le compte de 3Dfx et de
  Quantum3D. Ce texte leur est redevable de l'intgralit de certaines
  parties.

  Daryll Strauss daryll@harlot.rb.ca.us a effectu le portage, Paul J.
  Metzger pjm@rbd.com modifications du pilote Mesa Voodoo ( crit par
  David Bucciarelli ) tech.hmw@plus.it) pour Linux, Brian Paul
  brianp@RA.AVID.COM a procd  l'intgration au sein de sa librairie
  Mesa. En ce qui concerne l'acclration Voodoo Graphics (tm) de Mesa,
  des remerciements supplmentaires sont dus  Henri Fousse, Gary
  McTaggart, et au dveloppeur de 3Dfx Mesa pour DOS, Charlie Wallace
  Charlie.Wallace@unistudios.com.  Le personnel de 3Dfx, et plus
  particulirement Gary Sanders, Rod Hughes, et Marty Franz, a fourni
  des informations importantes. On citera galement Ross Q. Smith chez
  Quantum3D.  Les pages des sites web traitant du Voodoo Extreme et de
  3Dfx reclent des informations utiles. Je me suis galement renseign
  dans les forums Usenet 3Dfx. GlQuake2 pour Linux, qui repose sur
  Glide et Mesa, est maintenu par Dave Kirsch zoid@idsoftware.com.
  Merci  tout ceux qui ont envoy des corrections et des mises  jours
  par courrier lectronique et plus particulirement  Mark Atkinson
  pour m'avoir rappel la mthode de mise en oeuvre du cble vido.

  Grce aux outils  SGML-Tools ( ex Linuxdoc-SGML ), ce HOWTO est
  disponible dans plusieurs formats qui reposent tous sur le contenu de
  ce fichier. Pour en savoir davantage sur SGML-Tools, reportez vous 
  la page suivante : pobox.com/~cg/sgmltools.



  11..22..  NNoommss ddeess pprroodduuiittss eett pprrootteeccttiioonn iinndduussttrriieellllee

  3Dfx, le logo 3Dfx Interactive , Voodoo Graphics (tm) et  Voodoo Rush
  (tm) sont des marques dposes appartenant  3Dfx Interactive, Inc.
  Glide, TexUS, Pixelfx et Texelfx sont des marques dposes par 3Dfx
  Interactive, Inc. OpenGL est une marque dpose par Silicon Graphics.
  Obsidian est une marque dpose par Quantum3D. Les autres noms de
  produits sont des marques dposes de leurs propritaires respectifs.


  11..33..  HHiissttoorriiqquuee


     VVeerrssiioonn 11..0033
        First version for public release.

     VVeerrssiioonn 11..1166
        Current version v1.16 6 February 1998.


  11..44..  VVeerrssiioonnss aaccttuuaalliisseess dduu ddooccuummeenntt

  Vous trouverez la version la plus rcente de l'original en langue
  anglaise de ce document  la page web : www.gamers.org/dEngine/xf3D/.

  Les nouvelles versions seront postes priodiquement sur le forum
  Usenet comp.os.linux.answers. Des archives sont galement disponibles
  sur divers serveurs ftp anonymes tels que
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/.

  De nombreux sites web proposent des versions hypertextes, notamment
  sunsite.unc.edu/LDP/. La plupart des distributions de Linux sur CD
  incluent les HOWTO, en gnral dans le rpertoire /usr/doc/.  Certains
  vendeurs proposent des versions imprimes.

  Si vous traduisez ce document dans une autre langue, faites le moi
  savoir que je puisse y faire rfrence.


  11..55..  RReettoouurr dd''eexxpprriieennccee

  Je m'en remets  vous, lecteur, pour rendre ce HOWTO utile. Envoyez
  les corrections, suggestions et commentaires  mon adresse (
  bk@gamers.org ) et je les prendrai en compte dans une nouvelle
  version. Mentionnez HOWTO 3Dfx dans le champ Sujet du courrier afin
  que procmail le dirige vers le fichier adquat.

  Avant de signaler un bug ou de poser une question, _l_i_s_e_z _c_e _H_O_W_T_O _d_a_n_s
  _s_o_n _i_n_t__g_r_a_l_i_t_. Vous pourrez ensuite envoyer un compte rendu _d__t_a_i_l_l_
  du problme.

  Si ce document est publi sous forme papier ou sur CD-ROM,
  j'apprcierais une copie. Demandez moi mon adresse postale via le
  courrier lectronique. Les dons de soutien au Linux Documentation
  Project ( LDP ) pour le dveloppement de la documentation libre Linux
  seront apprcis. Pour plus d'informations, contactez le responsable
  du projet Linux HOWTO, Tim Bynum Linux HOWTO coordinator, Tim Bynum
  (linux-howto@sunsite.unc.edu).


  11..66..  LLiicceennccee

  Copyright (c) 1997, 1998 by Bernd Kreimeier.  La distribution de ce
  document doit se conformer aux termes de la licence LDP tels que
  dfinis  l'adresse : sunsite.unc.edu/LDP/COPYRIGHT.html.

  22..  TTeecchhnnoollooggiiee ddeess aaccccllrraatteeuurrss ggrraapphhiiqquueess

  22..11..  LLeess bbaasseess

  Il s'agit ici de survoler _b_r_i__v_e_m_e_n_t les concepts de l'acclration
  graphique pour faciliter le reste de la lecture.  Pour en apprendre
  plus, vous pourrez consulter des livres traitant d'OpenGL.


  22..22..  CCoonnffiigguurraattiioonn mmaattrriieellllee

  Les acclrateurs graphiques se prsentent sous diverses formes : soit
  comme une carte PCI traitant les signaux vido issus d'une carte VGA (
  usuelle ou acclre ), soit comme une carte PCI grant le graphisme
  VGA et la 3D. Dans ce cas, l'ancien priphrique VGA est mis hors
  circuit. Les cartes 3Dfx  base de composants Voodoo Graphics (tm)
  appartiennent  la premire catgorie. On y reviendra ultrieurement.


  S'il n'y a pas de conflit d'adresses, n'importe quelle carte
  acclratrice 3D peut tre prsente dans la machine sans perturber son
  fonctionnement sous Linux. Cependant, l'accs aux fonctions
  acclratrices ncessite un pilote spcifique. Une carte combinant les
  fonctions 2D et 3D peut se comporter diffremment.


  22..33..  QQuueellqquueess mmoottss ssuurr ll''oorrggaanniissaattiioonn dduu VVooooddoooo GGrraapphhiiccss ((ttmm))

  En gnral, les accs  la mmoire de stockage des textures et au
  tampon mmoire vido constituent un srieux goulot d'tranglement.
  Chaque pixel ncessite au moins un ( sinon quatre voire huit ) accs
  en lecture  la mmoire de stockage des textures ainsi qu'un accs en
  lecture pour la profondeur et un accs en lecture/criture  la
  mmoire vido.

  L'architecture Voodoo Graphics (tm) spare l'espace mmoire ddi aux
  textures de celui concern par le stockage des pixels et introduit un
  rendu  deux niveaux, chacun disposant d'une unit ddie ( Texelfx et
  Pixelfx ) qui gre sa propre mmoire. Le rythme de fonctionnement
  dpasse ainsi la moyenne mais des restrictions quant  l'utilisation
  de la mmoire apparaissent : le stockage de textures dans la zone de
  mmoire cran est impossible.

  Enfin, le Voodoo Graphics (tm) est susceptible d'employer deux Texelfx
  (ou TMU pour texture management unit ) et on peut combiner deux
  systmes Voodoo Graphics (tm) par un mcanisme nomm SLI ( Scan-Line
  Interleaving ). Le SLI consiste  ne faire traiter par chaque Pixelfx
  qu'une ligne sur deux, rduisant ainsi la bande passante requise par
  chaque Pixelfx pour accder  sa propre mmoire.


  33..  IInnssttaallllaattiioonn

  La mise en place du 3Dfx sous Linux passe par les tapes suivantes :


  1. installation de la carte;

  2. installation des logiciels Glide;

  3. compilation, dition de liens et/ou excution de l'application.

  Les sections suivantes couvrent ces tapes en dtail.



  33..11..  IInnssttaallllaattiioonn ddee llaa ccaarrttee..

  Reportez vous aux instructions donnes par le fabricant de votre
  matriel pour mettre la carte en place. Il ne devrait pas s'avrer
  ncessaire d'aller modifier les IRQ, les canaux DMA : le Plug&Plante
  (tm) ou les valeurs en sortie d'usine sont censs fonctionner. On
  accde aux cartes dcrites ci-aprs via l'espace d'adressage mmoire.
  On n'a donc pas besoin d'interruption. Les chevauchements en mmoire
  avec d'autres priphriques constituent les seuls conflits possibles.

  Puisque 3Dfx n'intervient pas dans le dveloppement et la fabrication
  de cartes, il est inutile de les contacter en cas de problmes.


  33..11..11..  SSoolluuttiioonnss aauuxx pprroobbllmmeess dd''iinnssttaallllaattiioonn

  Afin de vrifier l'installation et l'adressage mmoire des
  priphriques, faites un cat /proc/pci. La sortie devrait ressembler 
  ce qui suit :

  ______________________________________________________________________
    Bus  0, device  12, function  0:
      VGA compatible controller: S3 Inc. Vision 968 (rev 0).
        Medium devsel.  IRQ 11.
        Non-prefetchable 32 bit memory at 0xf4000000.

    Bus  0, device   9, function  0:
      Multimedia video controller: Unknown vendor Unknown device (rev 2).
        Vendor id=121a. Device id=1.
        Fast devsel.  Fast back-to-back capable.
        Prefetchable 32 bit memory at 0xfb000000.
  ______________________________________________________________________


  ( cas d'une Diamond Monster 3D utilise conjointement  une Diamond
  Stealth-64 ). Un cat /proc/cpuinfo /proc/meminfo aidera  rsoudre les
  conflits et sera utile pour signaler un bug.

  Les noyaux courants afficheront peut-tre au dmarrage :

  ______________________________________________________________________
  Jun 12 12:31:52 hal kernel: Warning : Unknown PCI device (121a:1).
  Please read include/linux/pci.h
  ______________________________________________________________________


  Rien de grave. Cependant, si vous possdez une carte exotique ou
  rcemment mise  jour, prenez le temps de lire les conseils donns au
  dbut du fichier /usr/include/linux/pci.h afin de transmettre les
  informations utiles  linux-pcisupport@cao-vlsi.ibp.fr.

  Si des problmes se manifestent avec votre carte, examinez ce qui se
  passe sous DOS et/ou Windows. Il est peu probable qu'un constructeur
  prenne la peine de rpondre  une demande d'aide ou au rapport d'un
  bug sous Linux. Pour avoir pratiqu le service d'aide de Diamond via
  courrier lectronique, je ne m'attendrais d'ailleurs pas trop  une
  raction quel que soit le systme d'exploitation.


  33..11..22..  CCoonnffiigguurraattiioonn dduu nnooyyaauu

  Seule la gestion du bus PCI est requise.  Le Linux Kernel HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html> fournit tous les
  dtails relatifs  la compilation d'un noyau.


  33..11..33..  CCoonnffiigguurraattiioonn ddeess pprriipphhrriiqquueess

  Pour l'instant, les pilotes ne ncessitent pas de priphriques
  particuliers.  Contrairement aux gestionnaires de cartes sons qui
  requirent les entres /dev/dsp et /dev/audio dont la prsence n'est
  pas garantie, les pilotes reposent ici sur le /dev/mem qui est
  toujours disponible.  Il vous faudra bien sr disposer des droits de
  super-utilisateur ou recourir  setuid pour accder  la carte
  acclratrice.


  33..22..  GGeessttiioonn ddeess ccrraannss

  Deux configurations sont possibles avec les cartes acclratrices.
  Soit vous faites transiter les signaux vido issus de votre carte
  usuelle par l'acclrateur graphique, soit vous employez simultanment
  deux crans.  Reportez vous aux manuels utilisateurs du constructeur
  de votre carte pour plus de dtails. Les deux solutions ont t
  essayes avec la Monster 3D.


  33..22..11..  AAffffiicchhaaggee aavveecc uunn sseeuull ccrraann

  Ce mode opratoire permet de vrifier le bon fonctionnement de base de
  la carte acclratrice : si le signal vido n'est pas transmis 
  l'cran, une dfaillance matrielle est  envisager.

  Notez qu'il risque de se produire un affaiblissement sensible du
  signal. On a signal le cas de cbles de pitre qualit fournis avec
  la Monster 3D ( par exemple ) et celui que j'ai essay n'a pas fait
  exception.

  Les configurations reposant sur un cran unique reclent d'autres
  subtilits.  Le passage d'un mode d'affichage VGA  l'affichage
  acclr modifie aussi bien la rsolution que la frquence du moniteur
  , et ce mme si vous travaillez avec X11 en 640x480. De surcrot, avec
  X11, votre application a la charge de grer les vnements souris et
  claviers sans quoi vous vous exposez  de srieuses difficults ( X
  reste naturellement invisible lorsque l'on a bascul en mode acclr
  ). L'utilisation d'une console SVGA  la place de X11 est
  envisageable.

  Si vous avez l'intention de n'utiliser qu'un seul cran duquel vous
  exigerez des changements de mode frquents, n'oubliez pas que les
  composants de votre moniteur risquent de se fatiguer.


  33..22..22..  UUnn mmoonniitteeuurr aavveecc ddeeuuxx eennttrreess vviiddoo

  Certains moniteurs haut-de-gamme ( par exemple le EIZO F-784-T )
  offrent deux connecteurs : un BNC  5 broches ( RGB, HSync, VSync ) et
  un Sub-D VGA usuel. Ces crans comportent gnralement des boutons de
  slection de l'entre vido. Il est ainsi possible d'utiliser le
  connecteur BNC avec la carte graphique habituelle via un cble adquat
  et de relier l'acclrateur 3Dfx  l'autre entre.



  33..22..33..  DDeeuuxx ccrraannss

  La carte acclratrice n'a nul besoin d'une entre VGA. Au lieu de
  faire transiter par cette dernire le signal vido usuel, vous pouvez
  diriger les sorties vidos vers deux moniteurs diffrents. Cette
  solution est certes la plus dispendieuse mais elle donne les meilleurs
  rsultats. Vous pourrez ainsi utiliser conjointement X11 et
  l'affichage acclr en plein cran  des fins de dboggage et de
  dveloppement.

  La carte acclratrice cesse de fournir le moindre signal vido
  lorsqu'elle n'est plus utilise. Par consquent,  chaque fois que
  l'application concerne s'arrte, les composants conomiseurs
  d'nergie risquent, selon la configuration de votre matriel, d'entrer
  en action. Le moniteur se lassera peut-tre  la longue. Utilisez donc
  :

  ______________________________________________________________________
  setenv SST_DUALSCREEN 1
  ______________________________________________________________________


  pour maintenir la sortie vido active.


  33..33..  IInnssttaallllaattiioonn ddeess llooggiicciieellss GGlliiddee

  Les pilotes et la librairie Glide sont runis dans un unique fichier
  compress. Dcompactez/dtarez les avec tar et gzip et suivez les
  instructions fournies dans les fichiers README et INSTALL qui
  accompagnent le logiciel. Par dfaut, les fichiers sont installs dans
  les rpertoires lib, bin, include sous /usr/local/glide/ et le chemin
  d'accs aux librairies correspondants est ajout au ld.conf.
  L'installation des fichiers et la modification du ld.conf sont des
  tapes indpendantes. Sans l'tape de mise  jour du ld.conf, vous
  devrez positionner manuellement la variable d'environnement
  LD_LIBRARY_PATH.

  Les fichiers d'en-tte doivent tre visibles par le compilateur si
  vous souhaitez compiler vos propres applications graphiques ! Si
  l'installation par dfaut ne vous satisfait pas, vrifiez bien que les
  bibliothques dynamiques sont accessibles sans quoi vous aurez droit 
  un can't load library 'libglide.so'.



  33..33..11..  LLee pprrooggrraammmmee ddeetteecctt

  La distribution logicielle inclut le programme bin/detect ( les
  sources ne sont pas disponibles ). Le lanant sous l'identit root,
  vous obtiendrez quelque chose dans le genre :

  ______________________________________________________________________
  slot  vendorId   devId   baseAddr0  command  description
  ----  --------  ------  ----------  -------  -----------
    00    0x8086  0x122d  0x00000000   0x0006  Intel:430FX (Triton)
    07    0x8086  0x122e  0x00000000   0x0007  Intel:ISA bridge
    09    0x121a  0x0001  0xfb000008   0x0002  3Dfx:video multimedia adapter
    10    0x1000  0x0001  0x0000e401   0x0007  ???:SCSI bus controller
    11    0x9004  0x8178  0x0000e001   0x0017  Adaptec:SCSI bus controller
    12    0x5333  0x88f0  0xf4000000   0x0083  S3:VGA-compatible display co
  ______________________________________________________________________


  Si vous n'tes pas root, vous serez gratifi d'un :

  ______________________________________________________________________
  Permission denied: Failed to change I/O privilege. Are you root?
  ______________________________________________________________________


  Si vous signalez un bug, joignez une copie de la sortie cran de
  detect.

  33..33..22..  TTeesstt ddee ll''iinnssttaallllaattiioonn

  La distribution Glide comprend un rpertoire avec des programmes de
  test.  Ces programmes sont soumis au copyright 3Dfx. Leur utilisation
  n'est licite que pour les possesseurs d'une carte munie d'un composant
  3Dfx. Reportez vous au fichier LICENSE de la distribution ou au site
  web www.3dfx.com pour plus de dtails.

  Bien que des binaires soient disponibles, il est recommand de
  compiler soi-mme les programmes. Certains excutables ont besoins de
  fichiers tels alpha.3df que vous trouverez dans le mme rpertoire.
  Tous les test ont lieu avec une rsolution de 640 par 480. Certains
  demanderont des caractres, d'autre se cantonneront  afficher Press A
  Key To Begin Test. Mfiez vous d'un ventuel accaparement des
  vnements de saisie par X11 si ce dernier fonctionne galement sur le
  mme cran.

  Le fichier README.test donne la liste des programmes ainsi que divers
  dtails.


  44..  RRppoonnsseess aauuxx qquueessttiioonnss lleess pplluuss ccoouurraanntteess (( llaa FFooiirree AAuuxx QQuueessttiioonnss
  ))

  Ce paragraphe reprend les rponses aux questions les plus frquemment
  poses sur Usenet ou dans les liste de diffusion. Dans un souci
  d'efficacit, les questions ont t regroupes dans diverses parties :

    FAQ: Quel Matriel ?

    FAQ: Voodoo Graphics (tm) ? 3Dfx ?

    FAQ: Glide ?

    FAQ: Glide et SVGA ?

    FAQ: Glide et XFree86 ?

    FAQ: Glide ou OpenGL/Mesa ?

    FAQ: Et Quake ?

    FAQ: A marche p...

     La plupart des problmes devraient trouver une rponse ici.



  55..  FFAAQQ:: qquueell MMaattrriieell ??

  55..11..  SSyyssttmmee nncceessssaaiirree ::

  Un compatible PC sous Linux disposant d'un bus PCI compatible avec la
  spcification 2.1, un moniteur supportant le mode 640 par 480 et une
  carte acclratrice  base de composant Voodoo Graphics (tm) 3Dfx. Le
  fonctionnement sera le mme sur un P5 ou un P6 qu'il possde les
  extension MMX ou non. Les versions actuelles des programmes
  n'utilisent pas le MMX mais elles ont t optimises pour le P6.

  Certaines phrases pourraient conduire  penser qu'une distribution
  RedHat est ncessaire. Bien que Glide pour Linux ait t initialement
  dvelopp dans un environnement RedHat 4.1, il a galement t utilis
  avec d'autres distributions telles la Slackware ou la Debian 1.3.1
  voire avec des installations maisons.


  55..22..  EEsstt--ccee qquuee aa ffoonnccttiioonnnnee aavveecc LLiinnuuxx--AAllpphhaa ??

  Pour l'instant, il n'y a pas de distribution Glide pour Linux hors des
  plateformes x86. Les sources Glide n'tant pas disponibles, il vous
  faudra attendre les binaires. Quantum3D a annonc une version DEC
  Alpha. Contactez Daryll Strauss si vous tes prts  participer au
  dveloppement.

  Se pose aussi la question du portage des modules crits en assembleur.
  Bien qu'un code C quivalent soit disponible, le module en assembleur
  de Glide permet une amlioration significative des performances selon
  le type de microprocesseur P5.


  55..33..  QQuueellss ssoonntt lleess ccoommppoossaannttss 33DDffxx ccoommppaattiibblleess aavveecc llaa ddiissttrriibbuuttiioonn
  ??

  Pour l'instant, le Voodoo Graphics (tm) 3Dfx est accept. Le Voodoo
  Rush (tm) n'est pas encore gr.


  55..44..  LLee VVooooddoooo RRuusshh ((ttmm)) eesstt--iill ggrr ??

  La version actuelle de Glide pour Linux ne gre pas le Voodoo Rush
  (tm). Une mise  jour est en cours de dveloppement.

  A l'origine, le pilote Voodoo Rush (tm) de Glide utilise Direct Draw.
  On devrait pouvoir utiliser une portion de la bibliothque d'origine
  DOS ds lors que les parties lies  2D/Direct Draw/D3D seront
  remplaces.

  Les cartes Voodoo Rush (tm) telles l'_H_e_r_c_u_l_e_s _S_t_i_n_g_r_a_y _1_2_8_/_3_D ou
  l'_I_n_t_e_r_g_r_a_p_h _I_n_t_e_n_s_e _R_u_s_h ne sont donc actuellement pas gres.


  55..55..  LLee VVooooddoooo 22 ((ttmm)) eesstt--iill ggrr ??

  Le portage actuel de la librairie Glide ne supporte pas le Voodoo 2
  (tm).


  55..66..  QQuueelllleess ssoonntt lleess ccaarrtteess ccoommppaattiibblleess aavveecc GGlliiddee ??

  Il n'existe pas de carte officielle ( 3Dfx ne fabrique pas de cartes
  ).  Cette section ne vise pas  rpertorier toutes les cartes
  disponibles mais seulement  donner un aperu de ce qui existe en
  citant au besoin les fauteuses de troubles.

  Notez que la gestion d'une carte donne sous Linux ne se limite pas 
  la disponibilit d'un pilote pour le composant d'acclration 3D mais
  requiert galement une bonne compatibilit avec la librairie SVGA ou
  XFree86.  Pour l'instant, une solution venant en complment de la
  carte graphique est prfrable en ce qu'elle vous laisse libre de
  choisir pour cette dernire une carte correctement gre sous Linux.

  Toutes les cartes Quantum3D Obsidian, indpendemment de leur mmoire
  ddie aux textures, de celle affecte au tampon de mmoire vido, du
  nombre d'units Pixelfx, Texelfx ou SLI, devraient fonctionner. Idem
  pour les autres cartes  base de Voodoo Graphics (tm) telles la
  Righteous 3D d'Orchid, la Canopus Pure 3D, la Flash 3D ou la Monster
  3D de Diamond.  Les cartes reposant sur un Voodoo Rush (tm) ne sont
  pas supportes.

  Les cartes qui ne reposent pas sur des composants fournis pas 3Dfx
  telles celles que fabriquent S3, Matrox, 3Dlabs et Videologic ne
  fonctionnent _P_A_S avec les pilotes 3Dfx et dbordent du cadre de ce
  document.


  55..77..  QQuu''eesstt--ccee qquuii ddiissttiinngguuee lleess ccaarrtteess ??

  Les fabricants de cartes utilisant tous le mme composant, les
  diffrences sont lies  la conception de la carte. La qualit du
  cble et des connecteurs peuvent varier ( Orchid semble ainsi tre
  meilleur sur ce point que Diamond ), une sortie vido supplmentaire
  pour la tlvision peut tre disponible ( Canopus Pure 3D ) et,
  surtout, les quantits de mmoire diffrent.

  Les cartes les plus courantes sont ddies au jeu et ne comprennent
  que 2 Mo de mmoire. La Canopus Pure 3D est cependant fournie avec une
  mmoire pour les textures allant jusqu' 4 Mo, ce qui amliore
  nettement le rendu des jeux qui modifient dynamiquement les textures
  ou ont recours  des textures d'illumination ( Quake par exemple ).

  Quantum 3D propose la palette de cartes 3Dfx la plus tendue et vous
  irez surement chez eux si vous tes  la recherche d'une carte haut de
  gamme.  Quantum 3D vise le march de la simulation tandis que la
  plupart des autres vendeurs se cantonnent au march des utilisateurs
  courants de PC.



  55..88..  QQuu''eenn eesstt--iill ddee ll''AAGGPP??

  A ma connaissance il n'existe pas de carte AGP Voodoo Graphics (tm) ni
  Voodoo Rush (tm). Je ne sais pas o en est la gestion de l'AGP sous
  Linux.

  Le chipset Voodoo 2 (tm) est prvu pour le bus AGP. En fait, il le
  considre comme un bus PCI rapide, et n'utilise pas,  ma connaissance
  les spcificits du bus AGP. Le gain en performances est nanmoins li
   l'augmentation de la vitesse du bus.

  Le noyau Linux reconnatra une carte AGP  base de Voodoo 2 (tm) comme
  si elle tait sur un second bus PCI, comme c'est dj le cas avec la
  carte RIVA-128 AGP.

  Voici ce que donne /proc/pci :

  ______________________________________________________________________
  Bus  1, device   0, function  0:
   VGA compatible controller: Unknown vendor Unknown device (rev 16).
   Vendor id=12d2. Device id=18.
   Medium devsel.  Fast back-to-back capable.  IRQ 9.
   Master Capable.  Latency=64.
   Min Gnt=3.Max Lat=1.
   Non-prefetchable 32 bit memory at 0xfd000000.
   Prefetchable 32 bit memory at 0xf6000000.
  ______________________________________________________________________




  66..  FFAAQQ:: VVooooddoooo GGrraapphhiiccss ((ttmm)) ?? 33DDffxx ??

  66..11..  33DDffxx,, qquuii eesstt--ccee ??

  3Dfx est un fabricant de composants pour l'acclration graphique 3D
  bas  San Jose. Leur site officiel : www.3dfx.com.  3Dfx ne vend pas
  de cartes, contrairement  d'autres socits ( Quantum3D par exemple
  ).

  66..22..  QQuuii eesstt QQuuaannttuumm33DD ??

  Quantum3D est une entreprise issue de 3Dfx qui fabrique des cartes
  acclratrices haut de gamme  base de composants 3Dfx  usage
  personnel et professionnel. Quantum3D intervient galement sur le
  march des jeux d'arcade. Pour avoir davantage de renseignements,
  consultez donc leurs pages : www.quantum3d.com Pour toute question
  concernant Quantum3D, envoyez un message lectronique  :
  info@quantum3d.




  66..33..  VVooooddoooo GGrraapphhiiccss ((ttmm)),, qquuss aaccccoo ??

  Le Voodoo Graphics (tm) est un composant lectronique fabriqu par
  3Dfx. Il est employ dans les cartes d'acclration graphique pour PC.
  Reportez vous  la section du HOWTO concernant le matriel.


  66..44..  VVooooddoooo RRuusshh ((ttmm)) ??

  Le Voodoo Rush (tm) est un driv du Voodoo Graphics (tm) muni d'une
  interface pour oprer de concert avec un acclrateur graphique VGA
  2D. Les fonctions acclratrices peuvent alors tre restreintes  une
  fentre. Cette possibilit n'est pas encore gre sous Linux.


  66..55..  VVooooddoooo 22 ((ttmm)) ??

  Le Voodoo 2 (tm) succde, avec des amliorations, au Voodoo Graphics
  (tm). Quantum3D, Creative Labs, Orchid Technologies et Diamond
  Multimedia fournissent des cartes intgrant le Voodoo 2 (tm).

  Bien que le Voodoo 2 (tm) soit cens tre compatible, une nouvelle
  version de Glide devra tre dveloppe pour Linux.


  66..66..  QQuu''eesstt ccee qquu''uunn iinntteerrmmddiiaaiirree VVGGAA ??

  Les cartes Voodoo Graphics (tm) ( mais pas les Voodoo Rush (tm) ) sont
  des cartes acclratrices censes travailler de concert avec une carte
  VGA 2D. Pour rsumer, le signal vido en sortie de la carte VGA sert
  d'entre  la carte Voodoo Graphics (tm) qui par dfaut se contente de
  transmettre au moniteur. Si le Voodoo Graphics (tm) est activ ( par
  exemple durant un jeu ), il intercepte le signal VGA, bascule l'cran
  en 640 par 480, ajuste la frquence conformment aux exigences du
  pilote et gnre lui mme le signal vido. La carte VGA n'a pas besoin
  d'tre informe de ce qui se passe et, dans les faits, elle ne l'est
  pas.

  Ce mode opratoire prsente plusieurs avantages : d'une part le choix
  de la carte vido reste libre, point d'importance sous Linux puisque
  XFree86 ne peut grer toutes les rvisions et variantes des jeux de
  composants, et d'autre part l'introduction du graphisme 3D acclr se
  fait au meilleur prix. La mdaille a son revers : le plantage d'un
  applicatif utilisant le Voodoo Graphics (tm) risque de bloquer la
  sortie vido usuelle et le signal vido transitant par l'intermdiaire
  VGA est dtrior.


  66..77..  QQuu''eesstt--ccee qquuee llee TTeexxeellffxx,, uunn TTMMUU ??

  Les composants Voodoo Graphics (tm) comportent deux units. La
  premire contrle l'accs  la mmoire ddie aux textures, met en
  place les textures et passe la main  la seconde unit qui assure la
  gestion du tampon de mmoire vido. La premire partie est nomme
  Texelfx. Il faut savoir que certaines cartes telles l'Obsidian de
  Quantum3D sont capables d'utiliser deux Texelfx. Selon l'application,
  on doublera ainsi la puissance de calcul.

  Chaque Texelfx peut grer 4 Mo de mmoire pour ses textures. Une
  configuration munie de deux Texelfx dispose de 8 Mo utilisables et ce
  mme si seule une unit est requise par le logiciel. Les deux Texelfx
  oprent de concert pour certaines oprations tel le filtrage tri-
  linaire ou l'illumination qui ont lieu en une seule phase ( ex.
  GlQuake ).  A charge des applications Glide d'utiliser correctement
  les Texelfx pour accder aux performances thoriques.

  On ne peut pas recourir  deux Texelfx afin d'afficher simultanment
  plusieurs triangles texturs. Soit un triangle ne requiert qu'une
  seule texture, au tel cas un seul Texelfx est actif, soit deux
  textures sont utilises en une seule passe. Un Texelfx ne peut accder
  qu' sa mmoire propre.


  66..88..  QQuu''eesstt ccee qquu''uunnee uunniitt PPiixxeellffxx ??

  Il s'agit de la seconde partie d'un composant Voodoo Graphics (tm),
  charge de la gestion du tampon de mmoire vido ( mise  jour de la
  couleur des pixel, etc ... ). Deux Pixelfx peuvent cooprer en mode
  dit SLI, doublant ainsi le rythme d'affichage. Les cartes Quantum3D
  Obsidian offrent cette fonctionnalit.



  66..99..  QQuu''eesstt--ccee qquuee llee mmooddee SSLLII ??

  Le SLI est une abrviation pour "Scanline Interleave" ou entrelacement
  des lignes d'affichage. Dans ce mode de fonctionnement, on relie deux
  Pixelfx qui calculent le rendu, sur les lignes paires pour l'un, sur
  les lignes impaires pour l'autre. Chaque Pixelfx ne stocke plus que la
  moiti de l'image et du tampon de calcul de profondeur dans sa zone de
  mmoire propre et le nombre de pixels affichables est ainsi doubl.

  Les Pixelfx peuvent tre sur deux cartes distinctes relies de faon
  adquate.  Certaines cartes Obsidian supportent le SLI avec le  Voodoo
  Graphics (tm).

  Plusieurs cartes pouvant dcoder simultanment les mmes adresses PCI
  et recevoir les mmes donnes, le SLI ne ncessite pas un surcrot de
  bande passante. Sur un autre plan, les donnes relatives aux textures
  doivent tre prsentes sur les deux cartes.


  66..1100..  LLee SSLLII aavveecc uunnee sseeuullee ccaarrttee ??

  Il existe  prsent deux types de cartes Quantum3D pour faire du SLI.
  A l'origine il fallait deux cartes, deux connecteurs PCI et un cble
  de liaison ( Obsidian 100-4440 ). La nouvelle version se comporte 
  l'identique mais ne ncessite qu'un seul connecteur PCI ( Obsidian
  100-4440SB ).


  66..1111..  QQuueellllee qquuaannttiitt ddee mmmmooiirree ??

  La diffrence entre les cartes utilisant les composants Voodoo
  Graphics (tm) se fait essentiellement sur la quantit de mmoire et
  sur son organisation. A cet gard, les cartes Quantum3D sont dcrites
  par un schma  trois niveaux. Le schma suivant, qui anticipe le
  Voodoo 2 (tm), diffre lgrement. A noter que si l'on utilise
  plusieurs Texelfx, tous doivent possder la mme quantit de mmoire (
  pour les textures ).  Idem en ce qui concerne l'utilisation simultane
  de plusieurs Pixelfx;.

  ______________________________________________________________________
      "SLI / Pixelfx / Texelfx1 / Texelfx2 "
  ______________________________________________________________________


  Une carte courante munie de deux fois 2 Mo est dcrite par le quadru
  plet 1/2/2/0, la quantit totale de mmoire tant gale au minimum
  requis de 4Mo. Une Canopus Pure 3D, munie de 6 Mo, est du type
  1/2/4/0. Une Obsidian-2220 avec deux Texelfx; est du type 1/2/2/2 et 
  une Obsidian SLI-2440 board correspondrait 2/2/4/4. Une carte double 
  2 Pixelfx, chacun possdant 2 Texelfx et 4 Mo de mmoire vido, les
  Texelfx ayant chacun 4 Mo pour les textures, serait du type 2/4/4/4
  pour une quantit totale de mmoire de SLI*(Pixelfx+Texelfx1+Texelfx2)
  soit 24 Mo.



  66..1122..  LLee VVooooddoooo GGrraapphhiiccss ((ttmm)) ggrree--tt--iill ll''aaffffiicchhaaggee eenn 2244 oouu 3322 bbiittss
  ??

  Non. L'architecture Voodoo Graphics (tm) fonctionne  16 bpp en
  interne. Idem pour le Voodoo Rush (tm) et le Voodoo 2 (tm). Quantum3D
  affirme mettre en oeuvre un affichage  22 bpp avec un tampon de
  mmoire vido ( 16 bpp ) compress.


  66..1133..  LLee ccaallccuull ddee pprrooffoonnddeeuurr dduu VVooooddoooo GGrraapphhiiccss ((ttmm)) eesstt--tt--iill eenn 2244
  oouu 3322 bbiittss ppaarr ppiixxeell ??

  Non. L encore, l'architecture interne est sur 16 bits. Mme chose
  pour le Voodoo Rush (tm) et le Voodoo 2 (tm). Quantum3D affirme
  obtenir une prcision effective de 22 bpp pour le tampon de profondeur
  ( Z-buffer ) avec des calculs en flottant sur 16 bits.


  66..1144..  QQuueelllleess rrssoolluuttiioonnss ooffffrree llee VVooooddoooo GGrraapphhiiccss ((ttmm)) ??

  Le jeu de composants Voodoo Graphics (tm) gre jusqu' 4 Mo de mmoire
  vido. Avec un tampon double et un tampon de profondeur, 2 Mo de
  mmoire permettent du 640 par 480 et 4 Mo du 800 par 600.

  Le 960 par 720 n'est malheureusement pas accessible. Le Voodoo
  Graphics (tm) ne peut oprer que sur des rsolutions divisibles par 32
  dans les deux directions, ce qui emmne le 960 par 720  960 par 736,
  soit 4,04 Mo de mmoire pour les trois zones de mmoire considres en
  16 bit.

  En utilisant deux cartes en SLI, ou une carte avec un double Pixelfx
  en SLI, chaque tampon de mmoire vido n'a plus  stocker qu'une
  moiti de l'image. Dans ce cas, 2 fois 4 Mo permettent d'obtenir du
  1024 par 768, ce qui constitue de toute faon le maximum accessible
  compte tenu de l'architecture matrielle. Vous pourrez certes faire du
  1024 par 768 avec un triple tampon mais le matriel est incapable de
  tenir le 1280 par 960 avec un tampon double.

  Notez que la prsence d'un tampon triple ( les applications ne
  ncessitent par de signal VSync de synchronisation ), de mmoire
  intermdiaire pour la stro ( avec des lunettes  LCD ) ou toute
  autre configuration particulire diminue d'autant la rsolution
  maximale.



  66..1155..  QQuueelllleess ssoonntt lleess ttaaiilllleess ddee tteexxttuurree ddiissppoonniibblleess ??

  Le composant Voodoo Graphics (tm) accepte au maximum des textures de
  256 par 256.  Les dimensions des textures doivent tre des puissances
  de 2.  Il est judicieux de regrouper les textures de petite taille (
  16x16 par exemple ) au sein de textures plus grandes et d'adapter le
  systme de coordonnes des textures en consquence.


  66..1166..  LLee VVooooddoooo GGrraapphhiiccss ((ttmm)) ggrree--tt--iill lleess tteexxttuurreess ppaalleettttiisseess ??

  Les composants Voodoo Graphics (tm) et Glide grent l'extension
  correspondante de OpenGL. La dernire version de Mesa comporte les
  extensions GL_EXT_paletted_texture et GL_EXT_shared_texture_palette.


  66..1177..  QQuu''eenn eesstt--iill dduu ddppaasssseemmeenntt ddee ffrrqquueennccee dd''hhoorrllooggee ??

  Mettant de ct les considrations relatives  la garantie et au
  risque de surchauffe, si vous voulez obtenir de meilleurs performances
  en augmentant la frquence d'horloge, des informations sont
  disponibles sur le web. Le mcanisme consiste  modifier certaines
  variables d'environnement Glide.

  La frquence d'horloge recommande dpend de la carte. Si la frquence
  d'horloge par dfaut de la Diamond Monster 3D est de 50 MHz, son
  feuillet de spcifications vous laisse l'emmener  57 MHz.  Tout
  dpend des divers composants utiliss et de la faon dont la carte a
  t conue ( en particulier au niveau des temps d'accs  la mmoire
  ).  Si vous allez trop loin, des artefacts d'affichage feront leur
  apparition ( entre autre choses ). Une frquence de 57 MHz reste en
  gnral admissible, ce qui est bien moins le cas du 60 MHz.

  L'augmentation de la frquence d'horloge provoque un accroissement
  non-linaire de l'nergie dissipe. Si vous augmentez de faon
  permanente la frquence d'horloge, n'oubliez pas de revoir le
  mcanisme de refroidissement.  Une bonne source de renseignements
  accessible via le Web est le "3Dfx Voodoo Heat Report" par Eric van
  Ballegoie. A vos risques et prils.


  66..1188..  OO ppuuiiss--jjee ttrroouuvveerr dd''aauuttrreess iinnffoorrmmaattiioonnss ccoonncceerrnnaanntt llee VVooooddoooo
  GGrraapphhiiccss ((ttmm)) ??

  3Dfx a rdig une FAQ qui devrait se trouver  l'adresse suivante :
  web site.  Vous trouverez des informations sur la vente aux adresses
  suivantes : www.3dfx.com et www.quantum3d.com.

  Certains sites non-officiels sont bien renseigns : www.ve3d.com,
  www.ve3d.com.


  77..  FFAAQQ:: GGlliiddee?? TTeexxUUSS??

  77..11..  GGlliiddee,, qquuss aaccccoo ??

  Glide comprend une API propritaire et des pilotes pour la gestion des
  acclrateurs graphiques 3D reposant sur les composants fabriqus par
  3Dfx. Glide est disponible pour DOS, Windows et Macintosh.  Daryll
  Strauss a effectu le portage Linux.


  77..22..  TTeexxUUSS,, qquuss aaccccoo ??

  La distribution comprend une bibliothque libtexus.so ( 3Dfx
  Interactive Texture Utility Software ). Il s'agit d'une bibliothque
  de fonctions utilitaires et de traitement de l'image qui met en forme
  les images avant leur traitement dans la bibliothque 3Dfx Interactive
  Glide. Cette bibliothque inclut des fonctions de conversion de
  formats de fichiers, la cration de mipmap et la gestion des textures
  3Dfx compresses ( 3Dfx Interactive Narrow Channel Compression ).

  Le programme texus lit les images dans divers formats courants ( TGA,
  PPM, RGT ), gnre des mipmaps et crit les images sous forme de
  textures 3Dfx ( reportez vous par exemple au fichier alpha.3df
  disponible dans la distribution ). Pour les dtails relatifs aux
  paramtres de texus et  l'API, reportez vous  la documentation
  TexUS.


  77..33..  GGlliiddee eesstt--iill uunn ffrreeeewwaarree??

  Non. Glide n'est pas en GPL ni couvert par une quelconque license du
  mme type. Tous les dtails se trouvent dans le fichier LICENSE de la
  distribution. Dans les faits, en tlchargeant et en utilisant le
  logiciel, vous acceptez les termes de la license d'utilisateur final
  tel qu'il se trouve sur le site 3Dfx.  Glide est fourni sous forme de
  binaires et vous ne devez pas utiliser ni distribuer d'autres fichiers
  que ceux accessibles publiquement si vous n'avez pas sign un NDA. La
  distribution Glide comprenant les sources du programme de test est
  proprit de 3Dfx.

  Il en est de mme de toutes les sources disponibles dans la
  distribution Glide. Selon les termes de 3Dfx : les sources
  n'appartiennent pas au domaine public mais elles peuvent tre fournies
  sans limitations aux possesseurs de produits 3Dfx.  Pas de carte, pas
  de code !


  77..44..  OO ttrroouuvveerr GGlliiddee??

  Le SDK 3Dfx est tlchargeable via le web :
  www.3dfx.com/software/download_glide.html.  Tout ce qui a trait  3Dfx
  et qui est publiquement accessible, se trouve gnralement sur le site
  3Dfx.

  Il y a galement un site FTP : ftp.3dfx.com.  Le temps de maintien de
  connexion du FTP est plus long et certains des fichiers les plus
  volumineux ont t dcoups en trois ( environ 3 Mo pour chaque partie
  ).


  77..55..  LLeess ssoouurrcceess ddee GGlliiddee ssoonntt eelllleess ddiissppoonniibblleess ??

  Non. L'accs aux sources de Glide requiert la signature d'un NDA avec
  3Dfx.


  77..66..  QQuueell eesstt llee ssuuppppoorrtt ddee LLiinnuuxx GGlliiddee ??

  Actuellement, il n'y a pas de support pour Linux Glide.  La
  distribution est fournie dans les mmes conditions que la DLL 3Dfx GL
  ( voir plus bas ).

  3Dfx souhaite cependant fournir le meilleur support possible et met en
  place les outils adquats. Pour l'instant, vous devrez vous en
  remettre au forum USENET de 3Dfx ( voir plus bas ).

  Enfin, la page web de Quantum3D annonce un support Linux concernant
  l'Obsidian sur les architectures Intel et AXP pour le second semestre
  97.

  77..77..  OO ppuuiiss--jjee ppoosseerr ddeess qquueessttiioonnss aayyaanntt ttrraaiitt  GGlliiddee ??

  Il existe des forums USENET fournis par 3Dfx : news.3dfx.com.  Ils
  sont ddis  3Dfx et  Glide de faon gnrale et fourniront surtout
  des indications pour DOS, Windows95 et NT.  La liste actuelle est la
  suivante :

  ______________________________________________________________________
  3dfx.events
  3dfx.games.glquake
  3dfx.glide
  3dfx.glide.linux
  3dfx.products
  3dfx.test
  ______________________________________________________________________


  ainsi que les forums 3dfx.oem.products.* pour les diffrentes cartes (
  3dfx.oem.products.quantum3d.obsidian par exemple ).  Utilisez
  news.3dfx.com/3dfx.glide.linux pour toutes les questions ayant trait 
  Linux Glide.

  Une liste de diffusion spcifique  Linux Glide est en prparation
  pour 1998. Envoyez un courrier lectronique  : majordomo@gamers.org,
  avec un champ sujet vide et comme corps de message : info linux-3dfx.
  Vous obtiendrez ainsi des informations sur la liste ( comment
  souscrire, accs aux archives, conseils de rdaction, etc ... ).


  77..88..  OO eennvvooyyeerr lleess nnoottiiffiiccaattiioonnss ddee bbuugg ??

  Pour l'instant, utilisez le forum USENET :
  news.3dfx.com/3dfx.glide.linux.  Un support officiel par courrier
  lectronique n'est pas encore disponible. Pour tout ce qui n'est pas
  spcifique  Linux Glide, postez dans les autres forums.


  77..99..  QQuuii aassssuurree llaa mmaaiinntteennaannccee ddee LLiinnuuxx GGlliiddee ??

  3Dfx nommera bientt quelqu'un pour s'occuper officiellement de la
  maintenance. Le responsable ( officieux ) du portage reste pour le
  moment Daryll Strauss. Envoyez vos avis de bug dans le forum adquat (
  cf ci-dessus ). Si vous tes persuad d'avoir identifi un bug non-
  repertori, crivez  Daryll : daryll@harlot.rb.ca.us


  77..1100..  CCoommmmeenntt ppuuiiss--jjee ccoonnttrriibbuueerr  LLiinnuuxx GGlliiddee??

  Vous pouvez dcrire de faon prcise les bugs que vous remarquez.  Il
  est galement possible de fournir un programme d'exemple pour la
  distribution. L'amlioration des sources du pilote Mesa Voodoo bas
  sur Glide serait la bienvenue. Reportez vous  la section sur Mesa
  Voodoo plus bas.



  77..1111..  DDooiiss--jjee nncceessssaaiirreemmeenntt aavvooiirr rreeccoouurrss  GGlliiddee ??

  Oui. Pour l'instant, il n'existe pas d'autre pilote Voodoo Graphics
  (tm) sous Linux. Glide est la seule interface pour dialoguer avec le
  matriel. Vous pouvez nanmoins crire du code OpenGL sans rien
  connatre  Glide et utiliser Mesa avec le pilote Mesa Voodoo reposant
  sur Glide. Savoir  quel point Glide est impliqu aide cependant 
  identifier les bugs ainsi que les limitations du pilote.


  77..1122..  DDooiiss--jjee pprrooggrraammmmeerr aavveecc ll''AAPPII GGlliiddee ??

  Tout dpend de l'application. Glide est une API propritaire.  Elle
  reste certes voisine d'OpenGL ou de Mesa, mais elle contient quand
  mme certaines fonctionnalits qui, pour les unes, sont disponibles
  comme des extensions d'OpenGL et, pour les autres, n'existent nulle
  part ailleurs.

  Si vous souhaitez utiliser l'API OpenGL, vous aurez besoin de Mesa (
  cf. plus bas ). Mesa, ou plus exactement le pilote Mesa Voodoo,
  propose une API voisine de celle d'OpenGL, cette dernire tant assez
  rpandue et plutt bien documente. Le pilote Mesa Voodoo est
  cependant en phase alpha et il vous faudra accepter des performances
  parfois limites ainsi que l'absence de certaines fonctionnalits.

  En rsum, le choix vous appartient. Si vous voulez les meilleurs
  performances au prix d'ventuelles difficults lors du portage vers
  des architectures non-3Dfx, Glide n'est pas un mauvais choix.  Si vous
  vous souciez avant tout de portabilit, OpenGL sera peut-tre une
  meilleure solution  long terme.


  77..1133..  QQuueellllee eesstt llaa vveerrssiioonn ccoouurraannttee ddee GGlliiddee ??

  La version actuelle de Linux Glide est 2.4. La version suivante sera
  vraisemblablement identique  la version actuelle pour DOS/Windows, 
  savoir la 2.4.3. Pour l'instant, certaines parties de Glide sont
  diffrentes pour les cartes Voodoo Rush (tm) ( VR ) et Voodoo Graphics
  (tm) ( VG ). Sous Windows, vous devez donc rcuprer la distribution
  correspondante. Il en sera de mme sous Linux. Il y aura surement une
  autre distribution pour les cartes Voodoo 2 (tm) ( V2 ).

  Glide 3.0 tendra l'API aux ventails et aux rubans de triangles et
  grera les optimisations de changement d'tat. La gestion des
  ventails et des rubans diminuera notablement dans certains cas la
  quantit de donnes transmise par triangle. Le pilote Mesa en
  bnficiera puisque l'API OpenGL dispose de modes spcifiques de ce
  type. Pour des explications plus dtailles, consultez la
  documentation OpenGL.


  77..1144..  QQuu''eenn eesstt--iill ddee llaa ggeessttiioonn ddee pplluussiieeuurrss TTeexxeellffxx ??

  Des Texelfx ( ou TMU ) multiples peuvent 2 employs lors d'un filtrage
  tri-linaire ( de type mipmap ) avec Linux Glide.  La qualit de
  l'image est amliore sans pertes de performances.  Il vous faudra une
  carte munie de deux Texelfx ( une des cartes Obsidian de Quantum3D
  donc ). A charge de l'application de rclamer l'utilisation des deux
  Texelfx. Il n'y a rien d'automatique.

  Notez ds  prsent que la plupart des applications visent les cartes
  grand public qui ne sont munies que d'un seul Texelfx.  Elles
  n'envisagent pas l'ventualit de la prsence d'une seconde unit et
  ne s'en servent donc pas. Il ne s'agit pas d'une limitation de Glide
  mais bien d'une mauvaise conception des applications.



  77..1155..  LLiinnuuxx GGlliiddee eesstt iill sseemmbbllaabbllee  GGlliiddee ppoouurr DDOOSS//WWiinnddoowwss ??

  La version publique de Linux Glide devrait tre identique aux versions
  disponibles pour DOS/Windows. Les nouvelles versions pour Linux
  arriveront peut-tre un peu aprs celles pour DOS/Windows.



  77..1166..  OO ttrroouuvveerr ddeess iinnffoorrmmaattiioonnss ssuurr GGlliiddee??

  3Dfx fournit des informations exhaustives. Vous pouvez les tlcharger
  via leur site web : www.3dfx.com/software/download_glide.html.  Ces
  informations sont disponibles gratuitement ds lors que vous avez
  achet une carte  base de composant 3Dfx.  Lisez attentivement les
  termes du contrat de licence.

  Dans un premier temps, vous pouvez vous intresser aux documents
  suivants :

    _G_l_i_d_e _R_e_l_e_a_s_e _N_o_t_e_s

    _G_l_i_d_e _P_r_o_g_r_a_m_m_i_n_g _G_u_i_d_e

    _G_l_i_d_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l

    _G_l_i_d_e _P_o_r_t_i_n_g _G_u_i_d_e

    _T_e_x_U_s _T_e_x_t_u_r_e _U_t_i_l_i_t_y _S_o_f_t_w_a_r_e

    _A_T_B _R_e_l_e_a_s_e _N_o_t_e_s

    _I_n_s_t_a_l_l_i_n_g _a_n_d _U_s_i_n_g _t_h_e _O_b_s_i_d_i_a_n

     Il s'agit de documents disponibles tels quels au format(s) Word et
     inclus sinon dans la distribution Glide.  Des versions PostScript
     sont tlchargeables : www.3dfx.com.  Notez que les numros de
     version ne correspondent pas toujours  ceux de Glide.


  77..1177..  OO ttrroouuvveerr ddeess ddmmooss GGlliiddee ??

  Vous trouverez des sources de dmos pour Glide parmi les programmes de
  test de la distribution et sur le site de 3Dfx.  Certaines parmi ces
  dernires ncessitent ATB : le portage impliquerait la rcriture du
  gestionnaire d'vnements.

  En outre, vous trouverez srement des choses intressantes dans les
  sources des dmos OpenGL qui accompagnent Mesa et GLUT. Bien que les
  API Glide et OpenGL diffrent, elles se destinent  des matriels dont
  les organisations sont voisines.



  77..1188..  QQuu''eesstt--ccee qquu''AATTBB??

  Certaines des dmos 3Dfx pour Glide ne reposent pas seulement sur
  Glide mais galement sur la boite  outils pour l'arcade 3Dfx ( ATB ou
  Arcade ToolBox ). Cette dernire existe sous DOS et Win32 mais n'a pas
  encore t porte sous Linux. Si vous tes un dveloppeur dans l'me,
  les sources sont disponibles dans le cadre du programme "Total
  Immersion". Le portage devrait donc tre possible.



  88..  FFAAQQ:: GGlliiddee eett XXFFrreeee8866 ??


  88..11..  GGlliiddee ffoonnccttiioonnnnee--tt--iill aavveecc XXFFrreeee8866 ??

  En fait, les priphriques Voodoo Graphics (tm) ne se proccupent pas
  de X.  Le serveur X ne remarque d'ailleurs mme pas que le signal
  vido issu du matriel VGA n'atteint pas le moniteur. Si vos
  applications ne font pas attention  X, le passage de Glide en plein
  cran risque de soulever des difficults ( cf la section de rsolution
  des problmes ). Pour viter le surcrot de code charg d'assurer la
  cohabitation avec X, utilisez plutt la console SVGA.

  Pour rsumer, la bonne entente avec XFree86 est possible pour autant
  que vous vous en occupiez. Vous pouvez avoir recours au "hack de
  fentre" Mesa. Il est plus lent que le mode plein cran mais reste
  plus rapide qu'un rendu purement logiciel ( cf la section suivante ).



  88..22..  DDooiitt--oonn ssee ccaannttoonnnneerr aauu pplleeiinn ccrraann ??

  Les priphriques Voodoo Graphics (tm) ne se soucient gure de modes
  d'opration fentrs. Il en est de mme de Linux Glide.  Le hack Mesa
   venir permet cependant de copier le contenu du tampon de mmoire
  vido d'une carte Voodoo Graphics (tm) dans une fentre X11.



  88..33..  QQuueell eesstt llee pprroobbllmmee ddeess ccaarrtteess AATT33DD//VVooooddoooo RRuusshh ((ttmm)) ??

  Le problme est inhrent  l'utilisation des cartes Voodoo Rush (tm)
  sous Linux. A la base, elles sont censes jouer un rle de cartes
  acclratrices VGA 2D/3D, que ce soit seules ou en tant que cartes
  filles. Le composant VGA li au Voodoo Rush (tm) est un acclrateur
  multimdia Promotion-AT3D d'Alliance Semiconducteur.  XFree86 requiert
  un pilote pour le composant AT3D.

  Il existe une mailing list et un site web avec une FAQ  ce sujet :
  www.frozenwave.com/linux-stingray128.  Vous y obtiendrez l'information
  la plus  jour.  Suse maintient un pilote :
  ftp.suse.com/suse_update/special/xat3d.tgz.  On signale que le serveur
  SVGA de XFree86 fonctionne galement en 8, 16 et 32 bpp. Le support
  officiel sera vraisemblablement prsent dans la version 4.0 de la
  XFree86. XFree86 s'est dcid  mettre au point une distribution
  intermdiaire, la 3.3.2, qui pourrait trs bien rsoudre le problme.

  La configuration suivante du XF86Config est cense fonctionner :

  ______________________________________________________________________
  # device section settings
  Chipset "AT24"
  Videoram 4032

  # modes vidos tests par Oliver Schaertel
  #  25.18  28.32  for 640 x 480   (70hz)
  #  61.60         for 1024 x 786  (60hz)
  #  120           for 1280 x 1024 (66hz)
  ______________________________________________________________________


  En fin de compte, mme si les pilotes XFree86 ne sont pas encore ter
  mins, il n'y a rien de rdhibitoire.

  Voici un peu plus de prcisions techniques : la gestion du Voodoo Rush
  (tm) exige de la part du serveur X la capacit d'accder  une zone
  dans la mmoire vido de la carte AT3D tandis que le Voodoo Rush (tm)
  a galement besoin de cette mmoire pour stocker son second buffer et
  celui du calcul de profondeur.  Le besoin d'allocation et de
  vrouillage de la mmoire n'est pas spcifique aux composants 3Dfx. On
  le rencontre galement dans la gestion des cartes TV capables de
  saisir l'image. Les dveloppements XFree86 sont actifs dans ce
  domaine. Cela implique des changements au niveau o X est li au
  matriel ( XAA ), changements qui sont  lors actuel mis en oeuvre via
  l'extension XFree86 DGA ( Direct Graphics Access ) aux spcifications
  X11R6.1. L'extension fera peut-tre partie d'une ralisation GLX
  d'XFree86. Les serveurs X actuels agissent comme s'ils taient les
  seuls  accder au tampon de mmoire vido et affectent tout ce qui
  n'est pas directement utilis pour l'affichage au stockage de pixmaps
  ( typiquement pour les fontes ).


  88..44..  QQuu''eenn eesstt--iill ddee GGLLXX ppoouurr XXFFrreeee8866 ??

  Il y a quelques difficults.

  Les priphriques Voodoo Graphics (tm) grs par la version actuelle
  de Linux Glide ne fonctionnent qu'en plein cran et ne sont pas prvus
  pour partager leur tampon de mmoire vido dans un environnement
  multi-fentres. GLX, ou toute autre intgration avec X11, n'est donc
  pas encore ralisable.

  Le Voodoo Rush (tm) devrait accepter de cooprer avec XFree86 : une
  carte conforme aux spcifications SVGA fonctionnera avec le serveur
  SVGA XFree86. Cependant, Linux Glide ne supporte pas encore ce
  composant. Il en est de mme du serveur S3 et des autres serveurs
  XFree86.

  Enfin, GLX est intimement li  OpenGL, ou, en ce qui concerne Linux,
   Mesa. L'quipe XFree86 travaille en ce moment  l'intgration de
  Mesa avec leurs serveurs X. GLX est en bta et les points d'ancrage
  sont prsents dans XFree86 3.3.  Reportez vous aux pages GLX de Steve
  Parker pour des informations les plus  jour :
  www.cs.utah.edu/~sparker/xfree86-3d/ De plus, XFree86 et SuSe ont
  joint leurs efforts dans la ralisation d'un GLX. Cf :
  www.suse.de/~sim/.  Pour l'instant, Mesa mule toujours de faon
  logicielle GLX avec Linux.



  88..55..  GGlliiddee eett lleess sseerrvveeuurrss XX ccoommmmeerrcciiaauuxx ??

  Je n'ai reu aucun courrier ayant trait  l'utilisation de Glide et/ou
  de Mesa avec des serveurs X commerciaux. Je suis intress par toute
  information sur le sujet, notamment s'il existe un serveur X
  commercial offrant GLX.



  88..66..  GGlliiddee eett SSVVGGAA ??

  Vous ne devriez pas rencontrer de problmes avec des applications
  Glide  un ou deux crans dans les modes d'affichage VGA. Il peut
  galement s'avrer intressant d'activer une rsolution de 640 par 480
  parmi les modes SVGA si vous travaillez avec un seul cran.


  88..77..  GGlliiddee eett GGGGII ??

  Jon Taylor est en train de mettre au point un pilote GGI pour Glide.
  Il n'est pas encore distribu officiellement et le restera jusqu' ce
  que GGI 0.0.9 soit achev. Pour davantage d'informations au sujet de
  GGI, consultez : synergy.caltech.edu/~ggi/.  Si vous aimez vivre
  dangereusement, vous ne rsisterez pas au charme de la combinaison
  XGGI ( serveur X pour XFree86 reposant sur GGI ) + GGI pour Glide. Il
  existe galement un pilote GGI qui s'interface avec l'API OpenGL. Il a
  t test avec Mesa sans acclration. Pour tout rsumer, cela
  signifie que X11R6 est disponible sur Voodoo Graphics (tm) grce 
  Mesa ou  Glide.



  99..  FFAAQQ:: OOppeennGGLL//MMeessaa ??

  99..11..  QQuu''eesstt ccee qquu''OOppeennGGLL ??

  OpenGL est une API pour le graphisme de niveau intermdiaire
  dveloppe par SGI  partir de leur interface prcdente Iris GL.
  OpenGL est devenu un standard il y a de a quelques annes. Il est
  fourni et maintenu par l'ARB ( Architectural Revision Board ), une
  organisation  laquelle appartiennent par exemple SGI, IBM, DEC et
  Microsoft.

  OpenGL fournit tout un ensemble de fonctions 2D et 3D pour le rendu de
  triangles et de polygones sur du matriel acclrateur muni d'une
  architecture en pipeline. De faon plus gnrale, OpenGL forme un
  ensemble d'outils puissant pour le graphisme acclr sur ordinateur.


  99..22..  OO ttrroouuvveerr ddaavvaannttaaggee dd''iinnffoorrmmaattiioonnss ssuurr OOppeennGGLL ??

  Le site officiel d'OpenGL, administr par les membres de l'ARB :
  www.opengl.org,

  On prfrera peut tre la passerelle vers OpenGL de Mark Kilgard :
  reality.sgi.com/mjk_asd/opengl-links.html.  Ce site contient des
  pointeurs vers des livres, des pages de manuel en ligne, GLUT, GLE,
  Mesa, des portages sous divers OS ainsi que de nombreuses dmos et des
  outils.

  Si le dveloppement de jeu utilisant OpenGL vous tente, il existe une
  liste de diffusion OpenGL-GameDev-L@fatcity.com accessible via
  Listserv@fatcity.com. Il s'agit d'une liste  contenu fortement
  technique et dont le dbit est trs lev. Vous recourerez srement 
  procmail pour ventiler la centaine de messages quotidiens qui en
  provient.  Pour rduire le besoin en bande passante, servez vous de la
  commande SET OpenGL-GameDev-L DIGEST. Cette liste est inapproprie si
  vous cherchez des documents d'introduction.  L'archivage est assur
  par le logiciel ListServ. Les commandes INDEX OpenGL-GameDev-L et GET
  OpenGL-GameDev-L "filename" permettent de se faire un ide avant de
  souscrire.



  99..33..  IIGGlliiddee mmeett--iill eenn ooeeuuvvrree OOppeennGGLL ??

  Non. Glide est une API propritaire de 3Dfx dont plusieurs fonctions
  sont spcifiques aux composants Voodoo Graphics (tm) et Voodoo Rush
  (tm).  Une librairie OpenGL 3Dfx est en cours de ralisation ( voyez
  plus bas ). Diverses fonctionnalits Glide ncessiteraient des
  extensions  OpenGL, certaines tant dj disponibles par ailleurs (
  les textures palettises par exemple ).

  La librairie Mesa de Brian Paul et le pilote Mesa Voodoo de David
  Bucciarelli sont ce qui se rapproche le plus d'une version Linux
  d'OpenGL acclre grce  des priphriques particuliers ( voyez plus
  bas ).



  99..44..  EExxiissttee--tt--iill uunn ppiilloottee OOppeennGGLL ppoouurr 33DDffxx ??

  Les sites web de 3Dfx et de Quantum3D annoncent une version d'OpenGL
  pour Voodoo Graphics (tm) en fin d'anne 1997. Le pilote est
  actuellement en bta et seuls peuvent y accder les dveloppeurs ayant
  souscrit  un accord de bta-test spcifique.


  Aucun portage vers Linux n'a encore t annonc pour l'instant.


  99..55..  EExxiissttee--tt--iill uunnee vveerrssiioonn ccoommmmeerrcciiaallee dd''OOppeennGGLL ppoouurr LLiinnuuxx eett 33DDffxx
  ??

  Je n'ai entendu parler de rien de tel. La dernire fois que je m'y
  suis intress, ni MetroX, ni XInside ne proposaient OpenGL.


  99..66..  QQuu''eesstt--ccee qquuee MMeessaa ??

  Mesa constitue une ralisation libre de l'API OpenGL, dont l'auteur
  est Brian Paul, et  laquelle de nombreuses personnes ont contribu.
  Ses performances sont respectables et bien qu'elle ne soit pas
  certifie de faon officielle, sa conformit aux spcifications de
  l'ARB la rend, sinon parfaitement compatible avec OpenGL, du moins
  plus complte que bon nombre de produits commerciaux.



  99..77..  MMeessaa ffoonnccttiioonnnnee--tt--eellllee aavveecc 33DDffxx ??

  La dernire version de Mesa 2.6 fonctionne avec Linux Glide 2.4. Bien
  que ce soit le cas depuis des versions plus anciennes, ce pilote est
  encore en dveloppement. Attendez vous donc  des bugs et des
  performances loignes de l'optimum.  Les progrs sont cependant
  permanents et les correctifs aux bugs viennent souvent assez vite.

  Il vous faudra l'archive de la bibliothque Mesa : iris.ssec.wisc.edu
  FTP site.  Il est galement conseill de s'abonner  la liste de
  diffusion, notamment pour dbusquer les bugs ou les limitations du
  pilote.  Vrifiez que vous disposez bien de la version la plus
  rcente.  Mesa 3.0 est en prparation.


  99..88..  QQuu''eenn eesstt--iill ddee llaa ppoorrttaabbiilliitt ddee MMeessaa ppoouurr GGlliiddee??

  Mesa est disponible pour Linux et Win32. Une application qui s'appuie
  sur Mesa ne devrait tre spcifique qu'en ce qui concerne le code li
  au systme. Typiquement il s'agira de passer d'X  Windows ou de WGL 
  GLX. Si vous avez recours  GLUT ou  Qt, vous devriez viter toutes
  les spcificits dues au systme pour une grande majorit
  d'applications. Il n'y a que quelques domaines particuliers, comme
  l'chantillonage des positions successives de la souris, qui ne sont
  pas couverts par les GUI portables dont on dispose.

  Mesa/Glide est galement disponible pour DOS. Il s'agit d'un portage
  32 bits maintenu par Charlie Wallace qui assure la synchronisation
  avec Mesa. Pour la dernire version, reportez vous  :
  www.geocities.com/~charlie_x/.


  99..99..  OO ttrroouuvveerr ddeess iinnffoorrmmaattiioonnss ssuurr MMeessaa ??

  La page web de Mesa : www.ssec.wisc.edu/~brianp/Mesa.html.  L'archive
  de la liste de distribution Mesa : www.iqm.unicamp.br/mesa/.  Cette
  liste n'est certes pas ddie  3Dfx ni  Glide mais il s'agit d'un
  bon point de dpart si le recours au matriel 3Dfx pour acclrer Mesa
  vous intresse.


  99..1100..  OO ttrroouuvveerr ddeess iinnffoorrmmaattiioonnss ssuurr MMeessaa VVooooddoooo ??

  Pour les informations les plus  jour sur le pilote Mesa Voodoo de
  David Bucciarelli tech.hmw@plus.it, reportez vous  la page web : www-
  hmw.caribel.pisa.it/fxmesa/.




  99..1111..  MMeessaa ggrree--tt--iill llee tteexxttuurraaggee mmuullttiippllee ??

  Pas encore en ce qui concerne Mesa 2.6 mais la question est  l'tude.
  Vous disposerez probablement d'une extension OpenGL EXT_multitexture
  sous Mesa une fois qu'elle sera acheve.  Il n'y a pas de
  spcifications figes pour le texturage multiple dans OpenGL. La
  version 1.2 d'OpenGL est cense prciser les choses.  Les prochaines
  versions de Mesa incluront peut tre une mise en oeuvre spcifique au
  pilote Glide mais ceci ne sera pas une priorit tant qu'il ne se
  trouvera que quelques cartes Obsidian Quantum3D  intgrer plusieurs
  TMU. La banalisation des cartes Voodoo 2 (tm) changera certainement la
  donne.


  99..1122..  MMeessaa ssuuppppoorrttee--tt--eellllee llee ffiillttrraaggee ttrrii--lliinnaaiirree eenn uunnee sseeuullee
  ttaappee ??

  Linux Glide gre cette opration mais ce n'est pas le cas de Mesa ( au
  moins jusqu' la version 2.6 ). Le dveloppement est en cours.


  99..1133..  QQuu''eesstt--ccee qquuee llee hhaacckk MMeessaa (( ""WWiinnddooww HHaacckk"" )) ??

  La dernire version de Mesa incorpore une fonctionnalit exprimentale
  pour XFree86 sous Linux. L'mulation GLX de Mesa copie le dernier
  tampon de mmoire vido mis  jour depuis la carte Voodoo Graphics
  (tm) vers la mmoire vido pour chaque appel  la fonction
  glXSwapBuffers. Mesa offre galement cette possibilit sous Windows.

  Il en rsulte bien sr une charge assez importante au niveau du bus
  PCI, et ce d'autant plus que le mcanisme utilise l'extension SHM du
  MIT  X11 et non pas le DGA XFree86 lors des accs  la mmoire vido.
  On pourrait thoriquement employer la mme technique avec SVGA par
  exemple. Le calcul du rendu limit  une fentre peut donc tirer
  pleinement parti de la prsence d'une carte Voodoo Graphics (tm). De
  plus, on vite l'intermdiation VGA qui dgrade le signal vido ( les
  moniteurs haut de gamme tels le EIZO F784-T l'illustrent trs bien ).

  Notez que cette fonctionnalit exprimentale n'a _R_I_E_N  voir avec le
  Voodoo Rush (tm). Elle ne concerne que les cartes Voodoo Rush (tm), un
  point c'est tout. Enfin, il est ncessaire d'utiliser une version
  modifie de GLUT puisque la gestion des vnements et la cohabitation
  avec le gestionnaire de fentres sont alors du ressort de
  l'application ( et non du pilote ! ).

  Vrifiez le positionnement des variables suivantes :

  ______________________________________________________________________
  export SST_VGA_PASS=1          # to stop video signal switching
  export SST_NOSHUTDOWN=1        # to stop video signal switching
  export MESA_GLX_FX="window"    # to initiate Mesa window mode
  ______________________________________________________________________


  Si vous oubliez une des variables SST, votre carte VGA sera dsactive
  et l'affichage disparatra. X restera cependant toujours actif et vous
  risquez d'prouver certaines difficults pour revenir en aveugle  une
  situation normale.

  Pour clore le sujet, on remarquera que la bibliothque libMesaGL.a (
  ou celle en .so ) est susceptible de contenir les fonctions
  d'interfaage pour diffrents clients. Ainsi les fonctions GLX, OSMesa
  et fxMesa ( voir mme SVGAMesa ) peuvent tre compiles au sein d'une
  unique bibliothque libMesaGL.a.  Un programme client attentif saura
  les appeler simultanment.



  99..1144..  QQuu''eenn eesstt--iill ddee GGLLUUTT ??

  La distribution GLUT de Mark Kilgard constitue une excellente
  ressource pour ce qui est des applications type et des utilitaires.
  Vous la trouverez  : reality.sgi.com/mjk_asd/glut3/.  La dernire
  version est GLUT 3.6 et les discussions ont commenc pour GLUT 3.7 (
  alias GameGLUT ). Mark Kilgard ayant rcemment quitt SGI, il est
  possible que l'archive se dplace en cours d'anne; pour l'instant
  elle reste en place sur le site de SGI.

  Il existe une liste de diffusion spcifique  GLUT : glut@perp.com.
  Envoyez  majordomo@perp.com le message suivant :

  ______________________________________________________________________
     help
     info glut
     subscribe glut
     end
  ______________________________________________________________________



  GLUT grant le ddoublement des tampons de mmoire, le fentrage, les
  vnements et d'autres oprations fortement lies au matriel et au
  systme d'exploitation, la cohabitation de GLUT avec Voodoo Graphics
  (tm) ncessite un support qui est encore en cours de dveloppement au
  niveau de GLX pour Mesa. La plupart des situations sont dj prises en
  compte.



  1100..  FFAAQQ:: QQuuaakkee ??

  1100..11..  OO eenn eesstt llee ppiilloottee 33DDffxx GGLL ppoouurr QQuuaakkee ??

  Quake GL, encore appel mini-driver, ou miniport, ou Game GL, ou GL
  alpha, ne met en oeuvre qu'un sous ensemble d'OpenGL orient vers
  Quake ( cf http://www.cs.unc.edu/~martin/3dfx.html pour une liste
  officieuse de programmes accepts ).  Quake GL n'est maintenu par
  personne et ne bnficie d'aucun support. A l'origine il s'agissait
  d'une DLL Win32 ( opengl32.dll ) fournie par 3Dfx.  Cette DLL n'a pas
  t porte sous Linux et il n'est pas prvu qu'elle le soit un jour.


  1100..22..  EExxiissttee--tt--iill uunnee vveerrssiioonn LLiinnuuxx ddee 33DDffxx ggllQQuuaakkee ??

  Oui. Les binaires de linuxquake v0.97 supportent Mesa et Glide.
  L'excutable du programme q2test de Quake2 pour Linux et Voodoo
  Graphics (tm) est galement disponible. L'apparition en janvier 1998
  de linuxquake2-3.10 offre une version complte de Quake2 pour Linux.
  Dave "Zoid" Kirsch est officiellement charg de tenir  jour les
  portages Linux de Quake, Quakeworld, Quake2 ainsi les versions Mesa.
  Notez qu'aucune version de Quake pour Linux ne bnficie du support
  officiel de la part d'Id Software.

  Pour les dernires versions : ftp.idsoftware.com/idstuff/quake/unix/.



  1100..33..  ggllQQuuaakkee ffoonnccttiioonnnnee--tt--iill ddaannss uunnee ffeennttrree XXFFrreeee8866 ??

  Une mise  jour de Mesa et de la version associe de glQuake pour
  Linux est en cours. Mesa supporte le fentrage via GLX mais glQuake
  pour Linux n'a pas recours  GLX.


  1100..44..  CCoommmmeenntt rriinniittiiaalliisseerr ll''aaffffiicchhaaggee aapprrss uunn ppllaannttaaggee ddee ggllQQuuaakkee
  ??

  Essayez d'utiliser le programme pass fourni avec la distribution
  Glide. Tout ce qu'il fait consiste  activer puis dsactiver la carte.
  Si la carte dialogue bien avec la machine, ceci devrait la
  rinitialiser (la carte :)). Si la carte est belle et bien bloque,
  ceci ne fonctionnera pas et un redmarrage est  envisager.


  1100..55..  DDeess pprroobbllmmeess aavveecc QQuuaakkee ppoouurr LLiinnuuxx ??

  Voici une liste,  jour au 7 janvier 1998, des problmes ventuels.
  Est absent tout ce qui n'a pas trait au matriel 3Dfx.

    Quake2 doit tre lanc par le super utilisateur si l'on souhaite
     recourir  la SVGALib et/ou au rendu GL. Ce n'est pas ncessaire
     sous X11 mais les priphriques lis  la souris et au son doivent
     tre accessibles en lecture/criture par les utilisateurs courants
     du logiciel.

    Certains artefacts se manifestent pendant le chargement avec X11.
     Cela reste normal en 16 bits. Le programme ne fonctionnera pas en
     24 bits ( TrueColor ). Ce serait de toute faon assez lent.

    On signale divers plantages en cas de rendu via GL. Vrifiez que
     vous avez bien install la bibliothque Mesa fournie avec Quake2 !
     Les versions plus anciennes ne fonctionnent pas correctement.

    Si vous ressentez un "retard" avec le rendu GL, si vous avez
     l'impression que la frquence de rafrachissement ne suit pas les
     dplacements de votre souris, tapez "gl_finish 1" dans la console.
     Vous forcez ainsi la mise  jour en fonction du dfilement des
     images.

    Vrifiez que gpm ou tout autre slection sont dsactivs quand le
     moteur de rendu GL est en action ou alors la souris sera
     inutilisable lorsque Quake2 fonctionne avec GL.


  1100..66..  LLeess ttrroouuss ddee ssccuurriitt ddee QQuuaakkee ppoouurr LLiinnuuxx

  Ainsi que Dave Kirsch l'a signal le 28 janvier 1998, Quake2 pour
  Linux prsente un trou de scurit. Mme si le README ne le mentionne
  pas particulirement, Quake2 ne doit pas tre setuid.

  Si vous dsirez employer les routines de rendu ref_soft et ref_gl, il
  vous faudra excuter Quake2 sous l'identit root. N'activez pas le
  droit attribuant les privilges de super utilisateur  toute
  invocation du programme !

  Le rendu sous X11 ne requiert pas les privilges root ( ds lors que
  le /dev/dsp est accessible  tous en criture ).  Le serveur associ
  n'a bien entendu pas non plus besoin de droits particuliers.

  La question des droits root exigs par certains jeux est rcurrente 
  Linux depuis plusieurs annes. Entre autre objectifs, le projet GGI
  tente de rsoudre ce problme. L'avenir devrait apporter un ref_ggi.

  1100..77..  LLiinnuuxxqquuaakkee ssuuppppoorrttee--tt--iill llee tteexxttuurraaggee mmuullttiippllee ??

  glQuake offrira vraisemblablement une telle extension ds lors que le
  pilote OpenGL impliqu l'autorisera. Pour l'instant, Mesa et le pilote
  Glide pour Linux ne grent pas cette extension. Le texturage multiple
  n'est donc pas disponible. Reportez vous  la section sur Mesa et le
  texturage multiple pour davantage de dtails.


  1100..88..  OO ttrroouuvveerr ddeess iinnffoorrmmaattiioonnss  jjoouurr ssuurr ggllQQuuaakkee ppoouurr LLiinnuuxx ??

  Essayez les sites suivants : "The Linux Quake Resource" 
  linuxquake.telefragged.com, ou "Linux Quake Page" 
  www.planetquake.com/threewave/linux/.  Jetez donc un oeil dans la base
  de donnes "SlipgateCentral" pour trouver des sites Quake Linux :
  www.slipgatecentral.com.




  1111..  FFAAQQ:: ssoolluuttiioonnss aauuxx pprroobbllmmeess ccoouurraannttss ??

  1111..11..  CCeettttee ccaarrttee aa--tt--eellllee tt tteessttee ??

  Une liste suit. Je ne dispose pas d'une liste acheve de vendeurs et
  de cartes vu que l'on n'a pas mis en vidence de difficults lies 
  une carte spcifique. Pour l'instant, seuls 3Dfx et Quantum3D ont
  procur des cartes aux dveloppeurs afin que ceux-ci les testent.  Les
  cartes Quantum3D s'avrent donc un choix raisonnable. Toutes les
  autres cartes  base de composants Voodoo Graphics (tm) sont censes
  fonctionner.  Ont t signales la Righteous 3D d'Orchid, la Maxi 3D
  Gamer de Guillemot et la Monster 3D de Diamond.

  Les fabricants souhaitant valider la compatibilit de leurs cartes
  Voodoo Graphics (tm), Voodoo Rush (tm) ou Voodoo 2 (tm) avec les
  versions  venir de Linux, de XFree86, de Glide pour linux et de Mesa
  peuvent contacter l'auteur de ce document qui se fera un plaisir de
  transmettre leur requte aux personnes ayant la charge des pilotes
  concerns.  Si vous tes tent par le portage de Linux Glide sur une
  plateforme autre que les compatibles PC - DEC alpha par exemple -,
  prenez contact avec Daryll Strauss qui se charge de la mise  jour de
  Glide pour Linux : daryll@harlot.rb.ca.us


  1111..22..  cchheecc lloorrss dduu cchhaannggeemmeenntt ddeess pprriivviillggeess dd''eennttrreess//ssoorrttiieess ??

  Il faut que vous soyez root ou bien que l'identit associe  votre
  application puisse tre telle ( cf  setuid  ). Le pilote se sert du
  priphrique /dev/mem pour les transferts DMA. Ce n'est pas sans
  raisons que seul root en bnficie du droit d'accs.  Reportez vous au
  README dans la distribution de Glide pour Linux.


  1111..33..  UUnn ffoonnccttiioonnnneemmeenntt ssaannss lleess ddrrooiittss rroooott eesstt--iill ppoossssiibbllee ??

  Non. Des solutions de remplacement sont en cours de ralisation.


  1111..44..  LL''aaffffiicchhaaggee eesstt ddpplloorraabbllee !!

  Si votre configuration ncessite un intermdiaire VGA analogique, la
  qualit d'affichage avec SVGA ou X11 peut s'avrer dcevante.  Essayez
  donc un autre cble. Ceux qui accompagnent la Monster 3D de Diamond
  sont notoirement plus mauvais que ceux livrs avec la Righteous 3D
  d'Orchid. Quoi qu'il en soit, il y aura toujours une dgradation
  rsiduelle.
  Si la carte acclratrice dlivre une image mdiocre en 640 par 480 en
  plein cran, un problme matriel est envisageable.  Contactez le
  fabricant de la carte ( pas 3Dfx ! ) puisque la qualit du signal
  vido, indpendamment du circuit acclrateur, dpend du choix de la
  RAMDAC et des composants de sortie.


  1111..55..  LLaa ddeerrnniirree iimmaaggee nnee ddiissppaarraatt ppaass !!

  Vous avez quitt votre application via Ctrl-C ou d'une autre faon
  brutale. La carte acclratrice conserve le contenu de son tampon de
  mmoire vido comme source du signal vido tant qu'on ne lui demande
  pas explicitement d'arrter.



  1111..66..  LL''ccoonnoommiisseeuurr dd''ccrraann ssee ddcclleenncchhee (( ddeeuuxx ccrraannss )) ??

  Lorsqu'une application s'achve dans une configuration  deux crans,
  la carte acclratrice ne fournit plus de signal vido et
  l'conomiseur se dclenche. Pour viter a :

  ______________________________________________________________________
  setenv SST_DUALSCREEN 1
  ______________________________________________________________________





  1111..77..  MMoonn oorrddiinnaatteeuurr sseemmbbllee ssee bbllooqquueerr (( XX1111,, uunn sseeuull ccrraann )) !!

  Si X fonctionne en mme temps qu'une application Glide, la souris se
  retrouve surement  pointer hors de la fentre. Les vnements clavier
  n'atteignent donc plus l'application.

  Si votre programme concurrence X11, il est conseill d'installer une
  fentre plein cran ou de se servir des fonctions XGrabPointer et
  XGrabServer tandis que le serveur X est dsactiv. Notez que le
  recours  XGrabPointer et  XGrabServer ne qualifie pas une
  application comme particulirement propre  l'gard de X; le systme
  pourrait ainsi se retrouver bloqu.

  Si vous rencontrez ce problme alors que X n'est pas lanc, vrifiez
  qu'il n'y a pas de conflit matriel ( voir ci-dessous ).


  1111..88..  MMaa mmaacchhiinnee ssee bbllooqquuee (( uunn oouu ddeeuuxx ccrraannss )) ??

  Si le systme ne rpond plus et que la perte de focus est  exclure,
  un conflit matriel plus ou moins subtil est  envisager. Reportez
  vous au paragraphe traitant des problmes d'installation pour plus de
  dtails.

  Les difficults ne se limitent pas aux conflits d'adresses ( cf ci-
  dessous ).  Si vous crivez vous mme vos applications, oublier de
  fermer ses sommets est une cause courante de blocage. Reportez vous 
  la section "snapping" de la documentation Glide.


  1111..99..  MMaa mmaacchhiinnee ssee bbllooqquuee (( aavveecc uunnee ccaarrttee SS33 )) ??

  Il existe un problme de recouvrement de zones mmoires spcifique aux
  cartes S3. Le site web 3Dfx contient des informations et un patch au
  problme suscit mais seul Windows est concern.  Certaines cartes S3,
  typiquement les Diamond Stealth S3 968 les plus anciennes, rservent
  davantage de mmoire qu'elles n'en utilisent.  Le Voodoo Graphics (tm)
  doit donc tre plac ailleurs. Comme rien de tel n'a t signal avec
  Linux, peut-tre s'agit-il d'une *spcificit* Windows ?


  1111..1100..  PPaass ddee ccoonnfflliitt dd''aaddrreessssee mmaaiiss llaa mmaacchhiinnee ssee bbllooqquuee qquuaanndd mmmmee
  !!

  Peut-tre avez vous une carte qui ne gre pas le PCI de faon tout 
  fait standard. L'ASUS TP4XE possde  cet gard un connecteur dit
  "Media Slot" c'est--dire un connecteur PCI non standard qui tend ce
  dernier de faon  accueillir certaines cartes ASUS combinant des
  fonctions son et SCSI. L'auteur de ce document a prouv de srieuses
  difficults avec une Monster 3D de chez Diamond  laquelle il avait
  affect ce connecteur. Le dplacement de la carte vers un connecteur
  PCI standard a supprim tous les dysfonctionnements.  NdT: si le bios
  de votre carte ASUS comprend quelque chose suggrant un vague couplage
  des connecteurs PCI 3 et 4, lisez le manuel et essayez d'autre options
  sans quoi vous risquez des problmes ds qu'une carte quelconque
  occupera le connecteur maudit !


  1111..1111..  MMeessaa eesstt aaccttiiff mmaaiiss nn''aaccccddee ppaass  llaa ccaarrttee !!

  Vrifiez que vous avez bien recompil toutes les bibliothques,
  notamment les paquetages requis par les dmos. N'oubliez pas que GLUT
  ne gre pas encore le Voodoo Graphics (tm). Vrifiez que vous avez
  supprim les anciennes bibliothques, que vous avez relanc ldconfig
  et/ou positionn correctement votre LD_LIBRARY_PATH.  Mesa inclut
  plusieurs pilotes ( MIT SHM pour X11, rendu hors cran, Mesa Voodoo )
  utilisables simultanment et il se peut que vous deviez changer
  explicitement le pilote employ ( reportez vous  la fonction
  MakeCurrent ) si le Voodoo Graphics (tm) n'est pas choisi par dfaut.



  1111..1122..  RRiinniittiiaalliisseerr uunnee ccaarrttee SSLLII (( ccoonnffiigguurraattiioonn  ddeeuuxx ccaarrtteess )) ??

  Si le fonctionnement en mode SLI d'une carte Obsidian Quantum 3D est
  interrompu brutalement, les cartes se retrouvent dans un tat des plus
  incertains. Si vous avez deux cartes, vous utiliserez un programme
  nomm resetsli pour rinitialiser les cartes. Tant que vous ne l'aurez
  pas appel, la rinitialisation des cartes Obsidian restera
  impossible.



  1111..1133..  RRiinniittiiaalliisseerr uunnee ccaarrttee SSLLII (( ccoonnffiigguurraattiioonn  uunnee sseeuullee ccaarrttee
  )) ??

  Le programme resetsli susmentionn reste sans effet sur une carte
  Obsidian SLI (  savoir la 100-4440SB ). Rebootez en appuyant sur le
  bouton reset pour rinitialiser compltement la carte.













  Linux AX.25-HOWTO, Amateur Radio.
  Terry Dawson, VK2KTJ, terry@perf.no.itg.telstra.com.au,
  traduit par Franois Romieu,  <romieu@ensta.fr>
  v1.5, 17 Octobre 1997

  Le systme d'exploitation Linux est srement le seul au monde  pou
  voir se vanter d'offrir un support natif du protocole de transmission
  de donnes AX.25 employ par les radioamateurs  travers le monde. Le
  prsent document se veut un guide d'installation et de configuration
  de cette prise en charge.
  ______________________________________________________________________

  Table des matires





















































  1.  Introduction. Le document trouve son origine dans une annexe du HAM-HOWTO. L'importance de son dveloppement devint cependant incompatible avec une telle organisation. L'installation et la prise en charge intgre d'AX.25, la gestion NetRom et Rose sous Linux sont dcrites. Quelques exemples de configurations typiques fournissent une base de travail.

     1.1  Modifications par rapport  la version prcdente
     1.2  Nouvelles versions du document
     1.3  Autres documents

  2.  Les protocoles de paquets par radio et Linux

     2.1  Fonctionnement

  3.  Composants logiciels de la suite AX.25/NetRom/Rose

     3.1  Rcupration du noyau, des outils et utilitaires
        3.1.1  Sources du noyau
        3.1.2  Les outils rseau
        3.1.3  Les utilitaires AX.25

  4.  Installation des logiciels AX.25/NetRom/Rose

     4.1  Compilation du noyau
        4.1.1 Un mot sur les modules
        4.1.2 Qu'y a-t-il de nouveau dans les noyaux 2.0.x patchs et les 2.1.y ?
     4.2  Les outils de configuration du rseau
        4.2.1  Patch correctif incluant la gestion Rose
        4.2.2  Compilation des net-tools standard
     4.3  Utilitaires et applications AX.25

  5.  Numros d'identification, adresses et prliminaires divers

     5.1  Que sont les T1, T2, N2 ?
     5.2  Paramtres configurables dynamiquement

  6.  Configuration d'un port AX.25

     6.1  Cration des priphriques AX.25
        6.1.1  Cration des priphriques KISS
           6.1.1.1  Configuration des TNC Dual Port
        6.1.2  Cration d'un priphrique Baycom
        6.1.3  Configuration des paramtres d'accs au canal AX.25
           6.1.3.1  Configuration d'AX.25 avec le pilote BayCom
        6.1.4  Cration d'un priphrique modem-son
           6.1.4.1  Configuration de la carte son
           6.1.4.2  Configuration des priphriques modem-son
           6.1.4.3  Configuration des paramtres d'accs au canal AX.25
           6.1.4.4  Choix du volume et ajustement du pilote
           6.1.4.5  Configuration d'AX.25 avec le pilote SoundModem
        6.1.5  Cration d'un priphrique  base de carte PI
        6.1.6  Cration d'un priphrique PacketTwin
        6.1.7  Cration d'un priphrique SCC gnrique
           6.1.7.1  Rcupration et compilation des outils de configuration
           6.1.7.2  Configurer le pilote pour sa carte
              6.1.7.2.1  Configuration des paramtres matriels
           6.1.7.3  Configuration du canal
           6.1.7.4  Utilisation du pilote
           6.1.7.5 Les outils
        6.1.8  Cration d'un priphrique BPQ
        6.1.9  Configuration d'un noeud BPQ pour le dialogue avec la couche AX.25 de Linux
     6.2  Mise au point du fichier
     6.3  Routage AX.25

  7.  TCP/IP et l'interface AX.25

  8.  Configuration d'un port NetRom

     8.1  Le fichier
     8.2  Le fichier
     8.3  Cration des priphriques rseau NetRom
     8.4  Lancement du dmon NetRom
     8.5  Routage NetRom

  9.  TCP/IP sur une interface NetRom

  10.  Configuration des ports Rose

     10.1  Le fichier
     10.2  Cration des priphriques rseau Rose
     10.3  Routage Rose

  11.  Communications AX.25/NetRom/Rose

  12.  Configurer Linux pour accepter les connexions

     12.1  Le fichier
     12.2  Un exemple de fichier
     12.3  Lancer

  13.  Le logiciel

     13.1  Le fichier
     13.2  Le fichier
     13.3  Excution de
     13.4  Excution de

  14.  Configuration de

     14.1  Mise au point du fichier

  15.  Configuration de

     15.1  Mise au point du fichier
     15.2  Mise au point du fichier
     15.3  Associer les identifiants AX.25 aux comptes utilisateurs
     15.4  Ajout de PMS au fichier
     15.5  Tester PMS

  16.  Configuration des programmes

  17.  Configuration des commandes Rose Uplink et Downlink

     17.1  Configuration d'une liaison Rose descendante
     17.2  Configuration d'un liaison Rose montante

  18.  Association des identifiants AX.25 aux comptes utilisateurs

  19.  Entres du systme de fichier

  20.  Programmation rseau AX.25, NetRom, Rose

     20.1  Familles d'adresses
     20.2  Fichiers d'en-tte
     20.3  Mise en forme des identifiants et exemples

  21.  Quelques configurations-types

     21.1  Un petit rseau Ethernet local avec un routeur Linux vers un rseau radio local
     21.2  Passerelle d'encapsulation IP dans IP
     21.3  Configuration d'une passerelle d'encapsulation AXIP
        21.3.1  Options de configuration d'AXIP
        21.3.2  Un fichier de configuration
        21.3.3  Excuter
        21.3.4  Remarques concernant certains indicateurs des routes
     21.4  Lier NOS  Linux au moyen d'un pipe
  22.  O trouver de l'information sur... ?

     22.1 Transmission paquets par radio
     22.2 Documentation sur les protocoles
     22.3 Documentation sur le matriel

  23.  Groupes de discussion radioamateurs et Linux

  24.  Remerciements

  25.  Copyright.



  ______________________________________________________________________

  11..  LLee ddooccuummeenntt ttrroouuvvee ssoonn oorriiggiinnee ddaannss uunnee aannnneexxee dduu HHAAMM--HHOOWWTTOO..
  LL''iimmppoorrttaannccee ddee ssoonn ddvveellooppppeemmeenntt ddeevviinntt cceeppeennddaanntt iinnccoommppaattiibbllee aavveecc
  uunnee tteellllee oorrggaanniissaattiioonn.. LL''iinnssttaallllaattiioonn eett llaa pprriissee eenn cchhaarrggee iinnttggrree
  dd''AAXX..2255,, llaa ggeessttiioonn NNeettRRoomm eett RRoossee ssoouuss LLiinnuuxx ssoonntt ddccrriitteess.. QQuueellqquueess
  eexxeemmpplleess ddee ccoonnffiigguurraattiioonnss ttyyppiiqquueess ffoouurrnniisssseenntt uunnee bbaassee ddee ttrraavvaaiill..
  IInnttrroodduuccttiioonn..

  La mise en oeuvre des protocoles radioamateurs sous Linux est trs
  souple.  Les personnes peu familires du systme d'exploitation Linux
  trouveront peut-tre la configuration un peu obscure. Il vous faudra
  un certain temps pour matriser l'interaction des diffrents lments.
  Attendez-vous  une configuration pnible si vous ne vous tes pas
  auparavant familiaris avec Linux. N'esprez pas passer  Linux depuis
  un autre environnement en faisant l'conomie de tout apprentissage.


  11..11..  MMooddiiffiiccaattiioonnss ppaarr rraappppoorrtt  llaa vveerrssiioonn pprrccddeennttee


  Ajouts:
          Page ouaibe de Joerg Reuters
          Section "Informations supplmentaires"
          configuration d'ax25ipd.

  Corrections/Mises  jour:
          Prvention des conflits dus aux pty
          Nouvelles versions du module et des ax25-utils

  A faire:
          Mettre au point la section SCC qui est srement errone
          toffer la section touchant  la programmation





  11..22..  NNoouuvveelllleess vveerrssiioonnss dduu ddooccuummeenntt

  Les archives du Projet de Documentation Linux (LDP ou Linux
  Documentation Project) constituent le meilleur emplacement o trouver
  la dernire mouture de ce texte. Le LDP tient  jour un site ouaibe
  dans lequel figure l'AX.25 HOWTO : AX.25-HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/AX.25-HOWTO.html>.  Le texte est
  disponible sous diffrents formats  l'adresse suivante : archive ftp
  sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/docs/howto/>.  La
  version franaise est accessible via : archive Traduc.org
  <ftp://ftp.traduc.org/pub/HOWTO/FR>.

  Vous pouvez me contacter mais comme je transmets directement les
  nouvelles versions au coordinateur LDP des HOWTO, l'absence d'une
  nouvelle version indique srement que je ne l'ai pas termine.


  11..33..  AAuuttrreess ddooccuummeennttss

  La documentation sur les sujets apparents ne manque pas. Bon nombre
  de textes traitent de l'utilisation gnrale de Linux en rseau et je
  vous conseille vivement de les lire : ils vous guideront dans vos
  efforts et offrent une vision largie  d'autres configurations
  envisageables.

  Par exemple :

  HAM-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/HAM-HOWTO.html>,

  NET-3-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/NET-3-HOWTO.html>,

  Ethernet-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/Ethernet-HOWTO.html>,

  et :

  le Firewall-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/Firewall-
  HOWTO.html>

  Des informations plus gnrales sur Linux sont disponibles : Linux
  HOWTO <http://sunsite.unc.edu/LDP/HOWTO/>


  22..  LLeess pprroottooccoolleess ddee ppaaqquueettss ppaarr rraaddiioo eett LLiinnuuxx

  Le protocole _A_X_._2_5 fonctionne aussi bien en mode connect que non-
  connect et s'emploie tel quel pour des liaisons point--point ou pour
  encapsuler d'autres protocoles tels qu'IP ou NetRom.

  Sa structure se rapproche de celle du niveau 2 d'X25 avec des
  extensions qui l'adaptent  l'environnement radioamateur.

  Le protocole NetRom a pour objectif de fournir un protocole rseau
  complet.  Il repose sur AX.25 au niveau liaison de donnes et procure
  une couche rseau drive d'AX.25. Le protocole NetRom autorise le
  routage dynamique et la cration d'alias pour les noeuds.

  Le protocole Rose a t initialement conu et ralis par Tom Moulton
  alias W2VY. Il constitue une mise en oeuvre du protocole par paquets
  X25 et peut inter-oprer avec AX.25 au niveau liaison. Il fournit des
  services de couche rseau. Les adresses Roses comportent 10 digits.
  Les quatre premiers constituent le code d'identification du rseau de
  donnes (DNIC ou Data Network Identification Code) et sont rfrencs
  dans l'Appendice B de la recommandation X121 du CCITT. Des
  informations supplmentaires sur le protocole Rose sont disponibles
  sur le site suivant : Serveur Web RATS <http://www.rats.org/>.

  Alan Cox a cr les toutes premires versions de support noyau pour
  AX.25.  Jonathon Naylor <g4klx@g4klx.demon.co.uk> a poursuivi le
  dveloppement, ajout la gestion de NetRom et de Rose et assure 
  prsent officiellement la maintenance du code noyau relatif  AX.25.
  La prise en compte de DAMA est l'oeuvre de Joerg, DL1BKE,
  jreuter@poboxes.com.  Thomas Sailer, <sailer@ife.ee.ethz.ch> s'est
  charg des matriels Baycom et SoundModem. J'assure pour ma part le
  suivi des utilitaires AX.25.

  Linux gre les TNC (Terminal Node Controllers) KISS, les cartes Ottawa
  PI, les PacketTwin Gracilis et autres cartes  base de SCC Z8530 via
  le pilote SCC gnrique ainsi que les modems sur ports srie et
  parallle de Baycom.  Le nouveau pilote pour modems  base de carte
  son de Thomas accepte les Soundblaster et les cartes  base de
  composants Crystal.

  Le paquetage de programmes applicatifs comprend une messagerie
  individuelle (PMS ou Personal Message System), une balise, un
  programme de connexion en mode texte, un exemple de rcupration des
  trames AX.25 au niveau de l'interface et des utilitaires de
  configuration du protocole NetRom.  Il comprend galement un serveur
  de type AX.25 qui gre les demandes de connexions AX.25 et un dmon
  qui se charge de l'essentiel du travail pour le protocole NetRom.


  22..11..  FFoonnccttiioonnnneemmeenntt

  La mise en oeuvre d'AX.25 sous Linux lui est propre de A  Z. Bien
  qu'elle puisse ressembler  NOS,  BPQ ou  d'autres versions d'AX.25
  sur certains points, elle ne se confond avec aucune d'entre elles. La
  version Linux peut tre configure pour se comporter de faon voisine
  aux autres mais le processus n'en reste pas moins radicalement
  diffrent.

  Pour vous aider  comprendre la dmarche intellectuelle  suivre lors
  de la configuration, cette section dcrit les fonctionnalits
  structurelles d'AX.25 et son adaptation au contexte Linux.

   _D_i_a_g_r_a_m_m_e _s_i_m_p_l_i_f_i_ _d_e_s _c_o_u_c_h_e_s _p_r_o_t_o_c_o_l_a_i_r_e_s


       +----------+-----------+-------------+---------+
       | AF_AX.25 | AF_NETROM |   AF_INET   | AF_ROSE |
       +==========+===========+=============+=========+
       |          |           |             |         |
       |          |           |    TCP/IP   |         |
       |          |           +--------+    |         |
       |          |  NetRom            |    | Rose    |
       |          +--------------------+----+---------+
       |            AX.25                             |
       +----------------------------------------------+




  Le diagramme prcdent illustre simplement le fait que Rose, NetRom,
  AX.25 et TCP/IP reposent tous sur AX.25 mais que chacun est trait
  comme un protocole diffrent au niveau de l'interface de
  programmation. Les noms `AF_' correspondent aux noms donns aux
  `_F_a_m_i_l_l_e_s _d_'_A_d_r_e_s_s_e_s' de chacun du point de vue du programmeur. On
  notera ici l'obligation de configurer la pile AX.25 avant toute
  configuration des protocoles NetRom, Rose ou TCP/IP.

   _D_i_a_g_r_a_m_m_e _d_e_s _m_o_d_u_l_e_s _l_o_g_i_c_i_e_l_s _d_e _l_a _p_i_l_e _r__s_e_a_u _d_e _L_i_n_u_x
















  ---------------+-----------+-----------------------++----------+---------------
    Utilisateur  |Programmes |   call        node    ||  Dmons  | ax25d  mheardd
                 |           |   pms         mheard  ||          | inetd  netromd
  ---------------+-----------+-----------------------++----------+---------------
                 |Sockets    | open(), close(), listen(), read(), write(), connect()
                 |           +----------------------+-------------------+----------
                 |           |    AF_AX.25   |  AF_NETROM |   AF_ROSE   |  AF_INET
                 +-----------+--------------+-------+-----+-------------+----------
  Noyau          |Protocoles |    AX.25     |   NetRom    |     Rose    | IP/TCP/UDP
                 +-----------+--------------+-------------+-------------+----------
                 |Priph.    |    ax0,ax1   |  nr0,nr1    | rose0,rose1 | eth0,ppp0
                 +-----------+--------------+-------------+-------------+----------
                 |Pilotes    |  Kiss   PI2   PacketTwin   SCC   BPQ     | slip ppp
                 |           |    modems type son   Baycom              | ethernet
  ---------------+-----------+------------------------------------------+-----
  Matriel | Cartes PI2, PacketTwin, SCC, Srie, Ethernet
  ----------------------------------------------------------------------------


  Ce diagramme est plus gnral que le prcdent. Il montre les rela
  tions entre les applications, le noyau et le matriel ainsi qu'entre
  l'interface de programmation des sockets, les modules de protocoles,
  les priphriques rseau et leurs pilotes. Chaque niveau dpend de
  celui sur lequel il repose et, de faon gnrale, la configuration
  doit se faire de bas en haut. Par exemple, si vous souhaitez excuter
  le programme _c_a_l_l, vous devez configurer le matriel, vrifier que le
  pilote adquat est inclus dans le noyau, crer les priphriques noy
  aux correspondants et inclure le protocole requis par le programme
  _c_a_l_l. J'ai essay d'organiser le prsent document de cette faon.


  33..  CCoommppoossaannttss llooggiicciieellss ddee llaa ssuuiittee AAXX..2255//NNeettRRoomm//RRoossee

  Le paquetage AX.25 comprend trois volets : les sources du noyau, les
  outils de configuration rseau et les applications utilisateur.

  Les version 2.0.xx des noyaux Linux incluent les gestionnaires AX.25,
  NetRom, SCC Z8530, PacketTwin et ceux des cartes PI. Les noyaux 2.1.*
  les amliorent substantiellement. L'emploi d'un noyau 2.1.* dans un
  systme de production est vivement dconseill. Pour y remdier,
  Jonathon Naylor propose un ensemble de patches pour mettre  niveau la
  gestion du protocole radio amateur dans un noyau 2.0.28. L'application
  des patches est trs simple et apporte une palette de fonctionnalits
  autrement absentes du noyau tel le support Rose.  L'emploi d'un noyau
  2.2.x est galement envisageable.


  33..11..  RRccuupprraattiioonn dduu nnooyyaauu,, ddeess oouuttiillss eett uuttiilliittaaiirreess



  33..11..11..  SSoouurrcceess dduu nnooyyaauu

  Les sources du noyau sont disponibles via le rseau de miroirs de
  ftp.kernel.org : ffttpp..xxxx..kkeerrnneell..oorrgg o xx dsigne un code pays tel fr,
  uk, de, us, etc...  Les diffrentes version du noyau se trouvent en :


       /pub/linux/kernel/




  Version courante de mise  jour d'AX.25 : ffttpp..ppsspptt..ffii


  /pub/linux/ham/ax25/ax25-module-14e.tar.gz





  33..11..22..  LLeess oouuttiillss rrsseeaauu

  Dernire version alpha des outils rseau standard pour Linux grant
  AX.25 et NetRom : ffttpp..iinnkkaa..ddee


       /pub/comp/Linux/networking/net-tools/net-tools-1.33.tar.gz





  Paquetage ipfwadm : ffttpp..xxooss..nnll


       /pub/linux/ipfwadm/




  En 2.2.x, le paquetage _i_p_c_h_a_i_n_s remplace ipfwadm devenu obsolte.


  33..11..33..  LLeess uuttiilliittaaiirreess AAXX..2255

  Il existe deux familles distinctes d'outils AX.25. L'une ddie aux
  noyaux 2.0.* et l'autre destine aussi bien aux version 2.1.*  qu'aux
  noyaux 2.0.* patchs. Le numro de version de ax25-utils indique la
  version du noyau la plus ancienne  partir de laquelle les outils
  fonctionneront. A vous de choisir une version des ax25-utils
  approprie.  Les combinaisons suivantes fonctionnent,  uuttiilliisseezz lleess .


       Noyau Linux              Utilitaires AX.25
       ----------------------   -------------------------
       linux-2.0.29             ax25-utils-2.0.12c.tar.gz **
       linux-2.0.28+module12    ax25-utils-2.1.22b.tar.gz **
       linux-2.0.30+module14c   ax25-utils-2.1.42a.tar.gz
       linux-2.0.31+module14d   ax25-utils-2.1.42a.tar.gz
       linux-2.1.22 ++          ax25-utils-2.1.22b.tar.gz
       linux-2.1.42 ++          ax25-utils-2.1.42a.tar.gz




  NNoottee: les versions ax25-utils-2.0.* identifies ci-dessus avec le
  symbole '**' sont  prsent obsoltes. Le document couvre l'emploi des
  logiciels conseills dans les tables. Bien que les paquetages
  diffrent, la plus grande partie des informations reste valable pour
  les versions suivantes.

  Utilitaires AX.25 : ftp.pspt.fi
  <ftp://ftp.pspt.fi/pub/linux/ham/ax25/> ou : sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>


  44..  IInnssttaallllaattiioonn ddeess llooggiicciieellss AAXX..2255//NNeettRRoomm//RRoossee

  Une mise en oeuvre correcte d'AX.25 dans votre systme Linux ncessite
  l'installation et la configuration d'un noyau appropri ainsi que des
  utilitaires AX.25.


  44..11..  CCoommppiillaattiioonn dduu nnooyyaauu

  Si vous tes un habitu de la compilation du noyau Linux, contentez-
  vous de vrifier que vous avez activ les options adquates et sautez
  cette section.  Si ce n'est pas le cas, lisez ce qui suit.

  En principe, les sources du noyau sont dcompactes au niveau du
  rpertoire /usr/src dans un sous-rpertoire nomm linux. Pour ce
  faire, prenez l'identit du super-utilisateur root et excutez les
  commandes ci-dessous :



       # mv linux linux.old
       # cd /usr/src
       # tar xvfz linux-2.0.31.tar.gz
       # tar xvfz /pub/net/ax25/ax25-module-14e.tar.gz
       # patch -p0 </usr/src/ax25-module-14/ax25-2.0.31-2.1.47-2.diff
       # cd linux




  Une fois les sources du noyau dcompactes et la mise  jour
  applique, lancez le script de configuration et activez les options
  qui correspondent  la configuration matrielle dont vous souhaitez
  disposer. Vous utiliserez la commande :


       # make menuconfig




  Si vous tes bte^H^H^H^Hcourageux, vous pouvez essayer


       # make config




  Les claviophobes se serviront de :


       # make xconfig




  Je vais dcrire la mthode plein-cran (menuconfig) dont j'apprcie la
  facilit de dplacement mais vous tes libre d'en utiliser une autre.

  Dans tous les cas, vous devrez choisir parmi une srie d'options
  auxquelles il faudra rpondre par `Y' ou `N' (voire `M' si vous avez
  recours aux modules, ce sur quoi je fais l'impasse pour simplifier).

  Options importantes pour la configuration d'AX.25 :





  Code maturity level options  --->
      ...
      [*] Prompt for development and/or incomplete code/drivers
      ...
  General setup  --->
      ...
      [*] Networking support
      ...
  Networking options  --->
      ...
      [*] TCP/IP networking
      [?] IP: forwarding/gatewaying
      ...
      [?] IP: tunneling
      ...
      [?] IP: Allow large windows (not recommended if <16Mb of memory)
      ...
      [*] Amateur Radio AX.25 Level 2
      [?] Amateur Radio NET/ROM
      [?] Amateur Radio X.25 PLP (Rose)
      ...
  Network device support  --->
      [*] Network device support
      ...
      [*] Radio network interfaces
      [?] BAYCOM ser12 and par96 driver for AX.25
      [?] Soundcard modem driver for AX.25
      [?] Soundmodem support for Soundblaster and compatible cards
      [?] Soundmodem support for WSS and Crystal cards
      [?] Soundmodem support for 1200 baud AFSK modulation
      [?] Soundmodem support for 4800 baud HAPN-1 modulation
      [?] Soundmodem support for 9600 baud FSK G3RUH modulation
      [?] Serial port KISS driver for AX.25
      [?] BPQ Ethernet driver for AX.25
      [?] Gracilis PackeTwin support for AX.25
      [?] Ottawa PI and PI/2 support for AX.25
      [?] Z8530 SCC KISS emulation driver for AX.25
      ...


  Vous ddeevveezz rpondre `Y' aux options marques d'un *'. Le reste dpend
  de votre configuration matrielle et d'options laisses  votre choix.
  Certaines de ces options sont dcrites un peu plus loin. Si vous ne
  voyez pas ce dont il retourne, continuez la lecture et revenez  cette
  section ultrieurement.

  Une fois la configuration du noyau acheve, vous devriez pouvoir
  compiler proprement un nouveau noyau :



       # make dep
       # make clean
       # make zImage




  Dplacez ensuite le fichier arch/i386/boot/zImage et ditez le fichier
  /etc/lilo.conf en consquence avant de relancer _l_i_l_o pour tre sr que
  vous dmarrerez bien sur le bon noyau.





  44..11..11..  UUnn mmoott ssuurr lleess mmoodduulleess

  Je vous recommande de ne ppaass compiler quelque pilote que ce soit en
  tant que module. Dans presque toutes les installations, vous n'y
  gagnez rien sinon une complexit accrue. De nombreuses personnes ont
  des problmes avec les modules, non par la faute du code, mais parce
  que les modules sont plus compliqus  installer et  configurer.
  [NdT:manifestement nous ne faisons pas le mme arbitrage
  complexit/souplesse]

  Si vous avez choisi de compiler certains composants en tant que
  modules, vous devrez galement utiliser :


       # make modules
       # make modules_install




  afin d'installer vos modules  l'emplacement adquat.

  Certains ajouts au fichier /etc/conf.modules sont ncessaires afin que
  _k_e_r_n_e_l_d sache grer l'interface d'accs aux fonctions modularises.
  Les entres suivantes doivent tre prsentes :


       alias net-pf-3     ax25
       alias net-pf-6     netrom
       alias net-pf-11    rose
       alias tty-ldisc-1  slip
       alias tty-ldisc-3  ppp
       alias tty-ldisc-5  mkiss
       alias bc0          baycom
       alias nr0          netrom
       alias pi0a         pi2
       alias pt0a         pt
       alias scc0         optoscc    (or one of the other scc drivers)
       alias sm0          soundmodem
       alias tunl0        newtunnel
       alias char-major-4 serial
       alias char-major-5 serial
       alias char-major-6 lp






       # modprobe -c




  vous renverra la configuration courante.


  44..11..22..  QQuu''yy aa--tt--iill ddee nnoouuvveeaauu ddaannss lleess nnooyyaauuxx 22..00..xx ppaattcchhss eett lleess
  22..11..yy ??

  Les noyaux 2.1.* prsentent des amliorations au niveau de quasiment
  tous les pilotes et protocoles. Citons les plus significatives :

     MMoodduullaarriissaattiioonn
        tous les protocoles et gestionnaires ont t modulariss de
        faon  tre grs via _i_n_s_m_o_d et _r_m_m_o_d. La mmoire demande par
        le noyau diminue dans le cas de modules employs par
        intermittence. Le dveloppement et la mise au point des
        gestionnaires devient galement plus facile. Cela tant, la
        configuration devient lgrement plus complique.

     UUnniiffoorrmmiissaattiioonn ddeess ppiillootteess
        l'accs aux priphriques tels les Baycom, SCC, PI, PacketTwin
        et autres a maintenant lieu via une interface rseau usuelle
        semblable  celle du gestionnaire ethernet. Ils n'apparaissent
        dsormais plus comme des TNC KISS. L'utilitaire _n_e_t_2_k_i_s_s permet
        de crer une interface KISS pour ces priphriques si on le
        souhaite.

     bbuuggss
        il y a eu de nombreuses corrections et des fonctionnalits ont
        t ajoutes tel le protocole Rose.



  44..22..  LLeess oouuttiillss ddee ccoonnffiigguurraattiioonn dduu rrsseeaauu

  A prsent que le noyau est compil, vous devez faire de mme avec les
  nouveaux outils de configuration du rseau. Ces outils permettent de
  modifier la configuration des priphriques rseau et des tables de
  routage.

  Le nouveau paquetage alpha des net-tools standard gre AX.25 et
  NetRom. Je l'ai essay et il semble fonctionner correctement chez moi.


  44..22..11..  PPaattcchh ccoorrrreeccttiiff iinncclluuaanntt llaa ggeessttiioonn RRoossee

  Le paquetage standard net-tools-1.33.tar.gz comporte certains bugs qui
  affectent AX.25 et NetRom. J'ai produit un correctif qui supporte
  aussi Rose.

  Le patch est disponible  l'adresse suivante : zone.pspt.fi
  <ftp://zone.pspt.fi/pub/linux/ham/ax25/net-
  tools-1.33.rose.tjd.diff.gz>.



  44..22..22..  CCoommppiillaattiioonn ddeess nneett--ttoooollss ssttaannddaarrdd

  Lisez le fichier Release et suivez les indications qui y sont donnes.
  Je suis pass par les tapes ci-dessous :



       # cd /usr/src
       # tar xvfz net-tools-1.33.tar.gz
       # zcat net-tools-1.33.rose.tjd.diff.gz | patch -p0
       # cd net-tools-1.33
       # make config




  Arrivs  ce point, vous devrez rpondre  une srie de questions de
  configuration d'une faon similaire  ce qui se fait pour le noyau.
  N'oubliez pas d'inclure tous les protocoles et gestionnaires de
  priphriques dont vous souhaitez vous servir ultrieurement. Dans le
  doute, rpondez par l'affirmative (``Y'').

  Une fois la compilation effectue :

  # make install




  installera les programmes  leur place dfinitive.


  Pour disposer des fonctionnalits de type pare-feu IP (firewall), vous
  aurez besoin des derniers outils d'administration ipfwadm.  Ils
  remplacent ipfw qui ne fonctionne  prsent plus.

  Pour la compilation d'ipfwadm :


       # cd /usr/src
       # tar xvfz ipfwadm-2.0beta2.tar.gz
       # cd ipfwadm-2.0beta2
       # make install
       # cp ipfwadm.8 /usr/man/man8
       # cp ipfw.4 /usr/man/man4





  44..33..  UUttiilliittaaiirreess eett aapppplliiccaattiioonnss AAXX..2255

  Une fois les tapes de compilation et de redmarrage du noyau menes 
  leur terme avec succs, il vous reste  compiler les applications
  AX.25.  Les commandes devraient ressembler  ce qui suit :


       # cd /usr/src
       # tax xvfz ax25-utils-2.1.42a.tar.gz
       # cd ax25-utils-2.1.42a
       # make config
       # make
       # make install




  Les fichiers sont installs par dfaut dans les sous-rpertoires bin,
  sbin, etc et man du rpertoire /usr.

  S'il s'agit de la premire installation des utilitaires AX.25 sur
  votre systme, vous devrez installer quelques fichiers de
  configuration type dans le rpertoire /etc/ax25/ via :


       # make installconf





  En cas de messages du type :

  gcc -Wall -Wstrict-prototypes -O2 -I../lib -c call.c
  call.c: In function `statline':
  call.c:268: warning: implicit declaration of function `attron'
  call.c:268: `A_REVERSE' undeclared (first use this function)
  call.c:268: (Each undeclared identifier is reported only once
  call.c:268: for each function it appears in.)

  vrifiez encore une fois que les _n_c_u_r_s_e_s sont correctement installes.
  Le script de configuration tente de localiser les ncurses  certains
  emplacements usuels mais sur des installations faisant n'importe quoi
  avec les ncurses, le script choue  cette tape.


  55..  NNuummrrooss dd''iiddeennttiiffiiccaattiioonn,, aaddrreesssseess eett pprrlliimmiinnaaiirreess ddiivveerrss

  Chaque port AX.25 et NetRom sur votre systme doit se voir allouer un
  numro d'identification (callsign/ssid). Il se configure dans les
  fichiers dont il va tre  prsent question.

  Certaines mises en oeuvre d'AX.25 telles NOS et BPQ permettent
  l'emploi d'un ssid commun sur un mme port AX.25 et NetRom. Pour des
  raisons techniques assez compliques, Linux l'interdit. En pratique,
  a ne s'avre pas un problme aussi important qu'on pourrait le
  croire.

  Cela signifie que vous devez garder prsents  l'esprit certains
  lments lorsque vous configurez votre systme.


  1. Chaque port AX.25 et NetRom doit disposer d'un ssid unique.

  2. TCP/IP utilise le ssid du port AX.25 par lequel il met ou reoit
     (celui dont il est question juste au-dessus).

  3. NetRom emploie le ssid spcifi dans son fichier de configuration
     mais seulement lorsqu'il dialogue avec un autre NetRom. Il ne
     s'agit ppaass du ssid que les clients AX.25 de votre noeud NetRom vont
     employer.  Davantage de dtails sur ce point tout  l'heure.

  4. Rose utilise par dfaut le ssid du port AX.25  moins qu'on ne lui
     en spcifie explicitement un autre grce  la commande `_r_s_p_a_r_m_s'
     qui forcera le mme ssid sur ttoouuss les ports.

  5. Les autres programmes tels `_a_x_2_5_d' coutent via un ssid quelconque
     qui n'est soumis  aucune contrainte d'unicit entre ports
     diffrents.

  6. Si le routage est fait avec attention, vous pouvez affecter la mme
     adresse IP  tous les ports.


  55..11..  QQuuee ssoonntt lleess TT11,, TT22,, NN22 ??

  Toutes les piles AX.25 ne sont pas de type TNC2. La nomenclature Linux
  diffre sur certains points de celle du monde des TNC. Le tableau ci-
  dessous vous aidera  tablir les correspondances entre les diffrents
  concepts.
















  -------+----------+------------------------------------------------
  Linux  | TAPR TNC | Description
  -------+----------+------------------------------------------------
  T1     | FRACK    | Temps d'attente avant retransmission d'une
         |          | trame prive d'accus de rception.
  -------+----------+------------------------------------------------
  T2     | RESPTIME | Temps minimum d'attente entre trames avant
         |          | mission d'un acquittement.
  -------+----------+------------------------------------------------
  T3     | CHECK    | Priodicit d'mission d'un paquet de
         |          | vrification de l'tat de la connexion.
  -------+----------+------------------------------------------------
  N2     | RETRY    | Nombre de tentatives de retransmission avant
         |          | de signaler un chec.
  -------+----------+------------------------------------------------
  Idle   |          | Dure d'inactivit d'une connexion avant sa
         |          | fermeture.
  -------+----------+------------------------------------------------
  Window | MAXFRAME | Nombre maximal de trames transmises sans
         |          | acquittement.
  -------+----------+------------------------------------------------





  55..22..  PPaarraammttrreess ccoonnffiigguurraabblleess ddyynnaammiiqquueemmeenntt

  Les noyaux 2.1.* et 2.0.* +moduleXX permettent la modification  la
  vole de paramtres auparavant statiques. Un examen attentif de la
  structure du rpertoire /proc/sys/net/ rvle de nombreux fichiers
  dont les noms correspondent  ceux de paramtres rseau.  Les fichiers
  dans le rpertoire /proc/sys/net/ax25/ reprsentent chacun un port
  AX.25 configur. Le nom du fichier reflte celui du port.  La
  structure des fichiers dans /proc/sys/net/ax25/<portname>/ est la
  suivante :

  Fichier               Signification         Valeur                   Dfaut
  ip_default_mode       Mode IP par dfaut    0=DG 1=VC                0
  ax25_default_mode     Mode AX.25 par dfaut 0=normal 1=tendu        0
  backoff_type          Backoff               0=Linaire 1=exponentiel 1
  connect_mode          Mode connect         0=non 1=oui              1
  standard_window_size  Fentre standard      1  <= N <= 7             2
  extended_window_size  Fentre tendue       1  <= N <= 63            32
  t1_timeout            Dlai maximal T1      1s <= N <= 30s           10s
  t2_timeout            Dlai maximal T2      1s <= N <= 20s           3s
  t3_timeout            Dlai maximal T3      0s <= N <= 3600s         300s
  idle_timeout          Attente d'inactivit  0m <= N                  20m
  maximum_retry_count   N2                    1  <= N <= 31            10
  maximum_packet_length Trame AX.25           1  <= N <= 512           256


  T1, T2, T3 sont donns en secondes tandis que la dure d'inactivit
  est en minutes. Notez que les valeurs employes dans l'interface
  sysctl s'expriment dans une unit interne multiple par 10 du temps en
  secondes. La rsolution atteint donc le dixime de seconde. Dans le
  cas d'une alarme qui peut tre nulle, c'est  dire pour T3 et pour la
  dure d'inactivit, une valeur nulle quivaut  une dsactivation.


  La structure des fichiers dans /proc/sys/net/netrom/ est la suivante :





  Fichier                                    Valeur par dfaut
  default_path_quality                       10
  link_fails_count                           2
  network_ttl_initialiser                    16
  obsolescence_count_initialiser             6
  routing_control                            1
  transport_acknowledge_delay                50
  transport_busy_delay                       1800
  transport_maximum_tries                    3
  transport_requested_window_size            4
  transport_timeout                          1200




  La structure des fichiers dans /proc/sys/net/rose/ est la suivante :

  Fichier                                    Valeur par dfaut
  acknowledge_hold_back_timeout              50
  call_request_timeout                       2000
  clear_request_timeout                      1800
  link_fail_timeout                          1200
  maximum_virtual_circuits                   50
  reset_request_timeout                      1800
  restart_request_timeout                    1800
  routing_control                            1
  window_size                                3




  Le positionnement d'un paramtre se fait simplement en l'crivant dans
  le fichier. Par exemple, pour vrifier puis modifier la taille de
  fentre Rose, vous pourriez excuter :


       # cat /proc/sys/net/rose/window_size
       3
       # echo 4 >/proc/sys/net/rose/window_size
       # cat /proc/sys/net/rose/window_size
       4





  66..  CCoonnffiigguurraattiioonn dd''uunn ppoorrtt AAXX..2255

  Chaque application AX.25 ncessite un fichier de configuration
  spcifique pour obtenir les paramtres des ports AX.25 dfinis sur
  votre systme.  Pour les ports AX.25, il s'agit du fichier
  /etc/ax25/axport. Chaque port dont vous souhaitez vous servir doit
  tre rpertori dans ce fichier.


  66..11..  CCrraattiioonn ddeess pprriipphhrriiqquueess AAXX..2255

  Le priphrique rseau correspond  ce qui apparat lorsque vous
  entrez la commande `_i_f_c_o_n_f_i_g'. Il s'agit de l'abstraction logicielle
  par le biais de laquelle le noyau Linux met et reoit des donnes
  rseau. Presque tous les priphriques rseau sont associs  une
  entit matrielle mais il y a certaines exceptions. Le priphrique
  rseau se rattache directement  un gestionnaire de priphrique.

  Le code AX.25 de Linux inclut un grand nombre de gestionnaires de
  priphriques. Le pilote KISS est srement le plus courant mais on
  peut galement citer les pilotes SCC, Baycom et modem-son.

  Chacun de ces pilotes cre un priphrique lors de son invocation.


  66..11..11..  CCrraattiioonn ddeess pprriipphhrriiqquueess KKIISSSS

  OOppttiioonnss ddee ccoonnffiigguurraattiioonn dduu nnooyyaauu :


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Serial port KISS driver for AX.25




  Le TNC KISS sur un port srie constitue srement la configuration la
  plus courante.  vous de prconfigurer et de connecter le TNC  un
  port srie.  Un programme de communication tel _m_i_n_i_c_o_m ou _s_e_y_o_n vous
  permettra de configurer le TNC en kiss.

  Servez-vous du programme _k_i_s_s_a_t_t_a_c_h pour crer les priphriques KISS.
  Par exemple :


       # /usr/sbin/kissattach /dev/ttyS0 radio
       # kissparms -p radio -t 100 -s 100 -r 25




  Les priphriques KISS se retrouvent sous la dnomination `ax[0-9]'.
  Au premier appel de _k_i_s_s_a_t_t_a_c_h, `ax0' est cr ; au second, `ax1', etc
  ... Chaque priphrique KISS est associ  un port srie.

  _k_i_s_s_p_a_r_m_s permet de positionner divers paramtres sur un priphrique
  KISS.

  De faon prcise, l'exemple prcdent crerait un priphrique KISS
  reposant sur le priphrique srie `/dev/ttyS0' et le port `radio' du
  fichier /etc/ax25/axports. Il positionne ensuite _t_x_d_e_l_a_y et _s_l_o_t_t_i_m_e 
  100 ms et _p_p_e_r_s_i_s_t  25.

  Reportez vous aux pages de _m_a_n pour davantage d'informations.


  66..11..11..11..  CCoonnffiigguurraattiioonn ddeess TTNNCC DDuuaall PPoorrtt

  L'utilitaire _m_k_i_s_s inclus dans le paquetage ax25-utils permet l'emploi
  des modems d'un TNC  doubles ports. La configuration est simple. Elle
  consiste  prendre le contrle du priphrique srie connect au TNC
  multiports et  le faire ressembler  une collection de priphriques
  chacun connect  un TNC monoport. Vous devrez le faire _a_v_a_n_t toute
  autre configuration AX.25. Les priphriques que vous configurerez
  correspondent  des pseudo-TTY (/dev/ttyq*) et non aux ports srie.
  Les pseudo-TTY mettent en place un quivalent de tuyau via lequel des
  programmes prvus pour dialoguer avec des priphriques de type tty
  peuvent communiquer. Chaque tuyau possde une extrmit matre
  (`/dev/ptyq*') et une esclave (`/dev/ttyq*'). Les extrmits sont en
  relation telles que si /dev/ptyq0 est l'extrmit matre d'un tuyau,
  alors /dev/ttyq0 est son extrmit esclave. Le ct matre doit tre
  ouvert avant le ct esclave. _m_k_i_s_s divise un priphrique srie grce
   ce mcanisme.


  Par exemple, pour un TNC double-port connect au port srie /dev/ttyS0
  en 9600 bps, les commandes suivantes creront deux pseudo-tty qui se
  comporteront comme des ports sries munis de TNC usuels :



       # /usr/sbin/mkiss -s 9600 /dev/ttyS0 /dev/ptyq0 /dev/ptyq1
       # /usr/sbin/kissattach /dev/ttyq0 port1
       # /usr/sbin/kissattach /dev/ttyq1 port2




  /dev/ttyq0 et /dev/ttyq1 se manipulent ensuite avec _k_i_s_s_a_t_t_a_c_h comme
  dcrit prcdemment dans l'exemple relatif  port1 et port2.
  N'utilisez pas directement _k_i_s_s_a_t_t_a_c_h sur le port srie car _m_k_i_s_s y
  accde.

  _m_k_i_s_s accepte de nombreux arguments optionnels. En voici un rsum :

     --cc provoque l'ajout d'un octet de contrle  chaque trame KISS.  La
        plupart des mises en oeuvre de KISS ne le grent pas. La rom
        KISS G8BPG en est capable.

     --ss <<ssppeeeedd>>
        fixe le dbit du port srie.

     --hh active la ngociation matrielle sur le port srie (inactive par
        dfaut). La plupart des mises en oeuvre KISS ne la grent pas.

     --ll dclenche l'mission de messages  destination de _s_y_s_l_o_g.


  66..11..22..  CCrraattiioonn dd''uunn pprriipphhrriiqquuee BBaayyccoomm

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Code maturity level options  --->
           [*] Prompt for development and/or incomplete code/drivers
       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] BAYCOM ser12 and par96 driver for AX.25




  Malgr l'opinion suivant laquelle les modems Baycom ne
  fonctionneraient pas trs bien sous Linux, Thomas
  Sailer(<sailer@ife.ee.ethz.ch>) en a dvelopp le gestionnaire. Son
  pilote gre les ports srie Ser12 et Par96 ainsi que les modems
  parallles PicPar.  Vous trouverez davantage d'informations concernant
  les modems  l'adresse : Baycom Web site <http://www.baycom.de/>.

  La premire tape consiste  dterminer les ports d'entre/sortie et
  les adresses des ports srie ou parallle auxquels se connecte(nt)
  le(s) modem(s).

  Les priphriques BayCom se retrouvent sous la dnomination bc0, bc1,
  bc2 etc...

  L'utilitaire _s_e_t_h_d_l_c permet de configurer le pilote avec les
  paramtres prcdents. Si votre systme n'est muni que d'un seul
  modem, vous pouvez galement les passer en argument lors du chargement
  du module avec _i_n_s_m_o_d.

  Un exemple. Dsactivation du gestionnaire du port srie COM1: puis
  configuration du pilote BayCom pour un modem srie Ser12 sur ce mme
  port avec activation de l'option logicielle DCD :


       # setserial /dev/ttyS0 uart none
       # insmod hdlcdrv
       # insmod baycom mode="ser12*" iobase=0x3f8 irq=4




  Un modem parallle de type Par96 sur le port LPT1: utilisant la
  dtection DCD matrielle :


       # insmod hdlcdrv
       # insmod baycom mode="par96" iobase=0x378 irq=7 options=0




  Ce n'est pas la meilleure faon de faire. L'utilitaire _s_e_t_h_d_l_c
  fonctionne galement avec plusieurs priphriques.

  La page de _m_a_n d'_s_e_t_h_d_l_c est trs dtaille mais quelques exemples
  mettront en lumire les aspects les plus importants de la
  configuration.  On suppose que le module BayCom a dj t charg
  avec :


       # insmod hdlcdrv
       # insmod baycom




  Vous pouvez galement avoir incorpor le gestionnaire en dur dans le
  noyau.

  Configuration de bc0 pour un modem parallle BayCom sur LPT1 avec
  dtection DCD logicielle :


       # sethdlc -p -i bc0 mode par96 io 0x378 irq 7




  Configuration de bc1 pour un modem srie sur COM1 :


       # sethdlc -p -i bc1 mode "ser12*" io 0x3f8 irq 4





  66..11..33..  CCoonnffiigguurraattiioonn ddeess ppaarraammttrreess dd''aaccccss aauu ccaannaall AAXX..2255

  Ces paramtres quivalent  ppersist, txdelay et slottime pour KISS.
  Ici aussi, vous utiliserez _s_e_t_h_d_l_c.

  La page de man relative  _s_e_t_h_d_l_c reste la source d'informations la
  plus complte mais un ou deux autres exemples ne feront pas de mal.

  Configuration de bc0 avec TxDelay gal  200 ms, SlotTime  100 ms,
  PPersist  40, en half duplex :


       # sethdlc -i bc0 -a txd 200 slot 100 ppersist 40 half




  Notez que les paramtres de dure sont donns en millisecondes.


  66..11..33..11..  CCoonnffiigguurraattiioonn dd''AAXX..2255 aavveecc llee ppiilloottee BBaayyCCoomm

  Le pilote BayCom cre des priphriques rseau standard dont la
  configuration pour AX.25 est voisine de celle lie  l'emploi des
  cartes PI ou PacketTwin.

  Tout d'abord il faut donner un numro d'identification AX.25 au
  priphrique.  _i_f_c_o_n_f_i_g le fait trs bien :


       # /sbin/ifconfig bc0 hw ax25 VK2KTJ-15 up




  La commande prcdente affecte l'identit AX.25 VK2KTJ-15 au
  priphrique bc0. Vous disposez galement de _a_x_p_a_r_m_s mais vous aurez
  de toute faon besoin d'_i_f_c_o_n_f_i_g pour activer le priphrique :


       # ifconfig bc0 up
       # axparms -setcall bc0 vk2ktj-15




  L'tape suivante consiste  ajouter une entre dans le fichier
  /etc/ax25/axports comme vous le feriez pour tout autre priphrique.
  Les donnes du fichier axports tant associes aux priphriques
  rseau par l'intermdiaire du numro d'identification, la ligne que
  vous rajouterez devra comprendre celui de votre BayCom.

  La nouvelle interface AX.25 se comporte  prsent comme les autres.
  Vous pouvez la configurer pour IP, la grer via ax25d et l'utiliser
  pour NetRom ou Rose si bon vous semble.


  66..11..44..  CCrraattiioonn dd''uunn pprriipphhrriiqquuee mmooddeemm--ssoonn

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :






  Code maturity level options  --->
      [*] Prompt for development and/or incomplete code/drivers
  General setup  --->
      [*] Networking support
  Network device support  --->
      [*] Network device support
      ...
      [*] Radio network interfaces
      [*] Soundcard modem driver for AX.25
      [?] Soundmodem support for Soundblaster and compatible cards
      [?] Soundmodem support for WSS and Crystal cards
      [?] Soundmodem support for 1200 baud AFSK modulation
      [?] Soundmodem support for 4800 baud HAPN-1 modulation
      [?] Soundmodem support for 9600 baud FSK G3RUH modulation




  Thomas Sailer a dvelopp un nouveau pilote noyau qui traite une carte
  son comme un modem : connectez votre dispositif radio directement sur
  votre carte son pour mettre des paquets ! Thomas conseille au moins
  un 486DX2  66 MHz pour exploiter le logiciel ; tout le traitement
  numrique est effectu par le microprocesseur.

  Actuellement, le pilote mule les modems AFSK  1200 bps, HAPN  4880
  et FSK  9600 (compatible avec G3RUH). Seules les cartes son
  compatibles SoundBlaster et WindowsSoundSystem sont supportes. Un
  soupon d'lectronique est ncessaire pour aider la carte son 
  alimenter le dispositif radio.  Des informations sur ce sujet se
  trouvent sur la page suivante : Thomas's SoundModem PTT circuit web
  page <http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html>.  Les
  possibilits sont nombreuses : rcupration  la sortie de la carte
  son, traitement sur les ports parallle, srie ou midi. Des exemples
  de schmas illustrent tout ces cas sur le site de Thomas.


  Les priphriques modem-son se retrouvent sous la dnomination sm0,
  sm1, sm2, etc...

  RReemmaarrqquuee: le pilote SoundModem et le sous-systme de gestion du son
  entrent en comptition sous Linux. Assurez-vous que le son est
  dsactiv avant d'utiliser le pilote SoundModem. Vous pouvez bien sr
  compiler les deux en tant que modules, les insrer et les ter en
  fonction de vos besoins.


  66..11..44..11..  CCoonnffiigguurraattiioonn ddee llaa ccaarrttee ssoonn

  Le pilote SoundModem n'initialise pas la carte rseau. Le paquetage
  ax25-utils comprend l'utilitaire `_s_e_t_c_r_y_s_t_a_l' pour le faire sur les
  cartes son  base de composants Crystal. Si vous avez un autre modle
  de carte, servez-vous d'un autre logiciel pour l'initialiser. L'emploi
  de setcrystal est fort simple :


       setcrystal [-w wssio] [-s sbio] [-f synthio] [-i irq] [-d dma] [-c dma2]




  Par exemple, pour une carte SoundBlaster  l'adresse 0x388 employant
  l'interruption 10 et la canal DMA 1, vous entreriez :


       # setcrystal -s 0x388 -i 10 -d 1

  Pour une carte WindowSoundSystem  l'adresse 0x534 employant l'inter
  ruption 5 et la canal DMA 3 :


       # setcrystal -w 0x534 -i 5 -d 3




  Le paramtre [-f synthio] correspond  l'adresse du synthtiseur. Le
  paramtre [-c dma2] dtermine le second canal DMA pour un
  fonctionnement simultan dans les deux sens (full-duplex).


  66..11..44..22..  CCoonnffiigguurraattiioonn ddeess pprriipphhrriiqquueess mmooddeemm--ssoonn

  Une fois la carte son configure, vous devez spcifier au pilote o la
  trouver et quelle type de modem il lui faut muler.

  L'utilitaire _s_e_t_h_d_l_c vous permet de passer ces paramtres. Si vous
  n'avez qu'une seule carte installe, vous pouvez les passer en
  arguments  l'insertion du module SoundModem.

  Par exemple, avec une seule carte de type SoundBlaster configure
  comme ci-dessus, mulant un modem 1200 bps :


       # insmod hdlcdrv
       # insmod soundmodem mode="sbc:afsk1200" iobase=0x220 irq=5 dma=1




  Ce n'est pas la meilleure faon de faire. L'utilitaire _s_e_t_h_d_l_c fonc
  tionne galement avec plusieurs priphriques.

  La page de _m_a_n d'_s_e_t_h_d_l_c est trs dtaille mais quelques exemples
  mettront ici encore en lumire les aspects les plus importants de la
  configuration. On suppose que le module modem-son a dj t charg
  avec :


       # insmod hdlcdrv
       # insmod soundmodem




  Vous pouvez galement avoir incorpor le gestionnaire en dur dans le
  noyau.

  Configuration du pilote pour muler un modem G3RUH 9600 sur le
  priphrique sm0 avec la carte WindowsSoundSystem prcdente et le
  port parallle en 0x378 pour alimenter l'metteur :


       # sethdlc -p -i sm0 mode wss:fsk9600 io 0x534 irq 5 dma 3 pario 0x378




  Configuration du pilote pour muler un modem HAPN 4800 sur le
  priphrique sm1 avec la carte SoundBlaster prcdente et le port
  srie en 0x2f8 pour alimenter l'metteur :


  # sethdlc -p -i sm1 mode sbc:hapn4800 io 0x388 irq 10 dma 1 serio 0x2f8




  Configuration du pilote pour muler un modem AFS 1200 sur le
  priphrique sm1 avec la carte SoundBlaster prcdente et le port
  srie en 0x2f8 pour alimenter l'metteur :


       # sethdlc -p -i sm1 mode sbc:afsk1200 io 0x388 irq 10 dma 1 serio 0x2f8





  66..11..44..33..  CCoonnffiigguurraattiioonn ddeess ppaarraammttrreess dd''aaccccss aauu ccaannaall AAXX..2255

  Ces paramtres quivalent  ppersist, txdelay et slottime pour KISS.
  Ici aussi, vous utiliserez _s_e_t_h_d_l_c.

  La page de man relative  _s_e_t_h_d_l_c reste la source d'informations la
  plus complte mais un ou deux autres exemples ne feront toujours pas
  de mal.

  Configuration de sm0 avec TxDelay gal  100 ms, SlotTime  50 ms,
  PPersist  128 en full duplex :


       # sethdlc -i sm0 -a txd 100 slot 50 ppersist 128 full




  Notez que les paramtres de dure sont donns en millisecondes.


  66..11..44..44..  CChhooiixx dduu vvoolluummee eett aajjuusstteemmeenntt dduu ppiilloottee

  Il est _t_r__s important que les niveaux audio soient correctement
  ajusts pour qu'un modem-radio fonctionne correctement. Les modem-son
  n'chappent pas  la rgle. Thomas a mis au point des utilitaires pour
  faciliter cette tche : _s_m_d_i_a_g et _s_m_m_i_x_e_r.


     _s_m_d_i_a_g
        fournit deux type d'affichage : soit un cran de type
        oscilloscope, soit un visuel normal.

     _s_m_m_i_x_e_r
        permet l'ajustement des niveaux audio de transmission et de
        rception.

  _s_m_d_i_a_g en mode 'visuel' avec un priphrique SoundModem en sm0 :


       # smdiag -i sm0 -e




  _s_m_m_i_x_e_r avec un priphrique SoundModem en sm0 :


       # smmixer -i sm0

  66..11..44..55..  CCoonnffiigguurraattiioonn dd''AAXX..2255 aavveecc llee ppiilloottee SSoouunnddMMooddeemm

  Le pilote soundmodem cre des priphriques rseau standard dont la
  configuration pour AX.25 est voisine de celle lie  l'emploi des
  cartes PI ou PacketTwin.

  Tout d'abord il faut donner un numro d'identification AX.25 au
  priphrique.  _i_f_c_o_n_f_i_g le fait trs bien :


       # /sbin/ifconfig sm0 hw ax25 VK2KTJ-15 up




  La commande prcdente affecte l'identit AX.25 VK2KTJ-15 au
  priphrique sm0. Vous disposez galement de _a_x_p_a_r_m_s mais vous aurez
  de toute faon besoin d'_i_f_c_o_n_f_i_g pour activer le priphrique :


       # ifconfig sm0 up
       # axparms -setcall sm0 vk2ktj-15




  L'tape suivante consiste  ajouter une entre dans le fichier
  /etc/ax25/axports comme vous le feriez pour tout autre priphrique.
  Les donnes du fichier axports tant associes aux priphriques
  rseau par l'intermdiaire du numro d'identification, la ligne que
  vous rajouterez devra comprendre celui de votre modem-son.

  La nouvelle interface AX.25 se comporte  prsent comme les autres.
  Vous pouvez la configurer pour IP, la grer via ax25d et l'utiliser
  pour NetRom ou Rose si bon vous semble.


  66..11..55..  CCrraattiioonn dd''uunn pprriipphhrriiqquuee  bbaassee ddee ccaarrttee PPII

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Ottawa PI and PI/2 support for AX.25




  Les priphriques PI se retrouvent sous la dnomination `pi[0-9][ab]'
  o la premire carte dtecte se verra allouer `pi0', la seconde
  `pi1', etc... `a' et `b' se rapportent  la premire et  la seconde
  interface physique des cartes PI. Si vous avez inclus le pilote de
  cartes PI dans votre noyau et que la dtection s'est effectue
  correctement, vous pouvez configurer le priphrique :


       # /sbin/ifconfig pi0a hw ax25 VK2KTJ-15 up




  La commande prcdente affecte l'identit AX.25 VK2KTJ-15 au premier
  port de la carte PI et l'active. Pour utiliser le priphrique, il
  vous reste  ajouter au fichier /etc/ax25/axports l'entre
  correspondant  son identit AX.25.


  Le gestionnaire de cartes PI a t crit par : David Perry,
  <dp@hydra.carleton.edu>


  66..11..66..  CCrraattiioonn dd''uunn pprriipphhrriiqquuee PPaacckkeettTTwwiinn

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Gracilis PackeTwin support for AX.25




  Les priphriques PacketTwin se retrouvent sous la dnomination
  `pt[0-9][ab]' o la premire carte dtecte se verra allouer `pt0', la
  seconde `pt1', etc. `a' et `b' se rapportent  la premire et  la
  seconde interfaces physiques des cartes PacketTwin. Si vous avez
  inclus le pilote de cartes PI dans votre noyau et que la dtection
  s'est effectue correctement, vous pouvez configurer le priphrique :



       # /sbin/ifconfig pt0a hw ax25 VK2KTJ-15 up




  La commande prcdente affecte l'identit AX.25 VK2KTJ-15 au premier
  port de la carte PacketTwin et l'active. Pour utiliser le
  priphrique, il vous reste  ajouter au fichier /etc/ax25/axports
  l'entre correspondant  son identit AX.25.


  Le gestionnaire de cartes PacketTwin a t crit par : Craig Small
  VK2XLZ, <csmall@triode.apana.org.au>.


  66..11..77..  CCrraattiioonn dd''uunn pprriipphhrriiqquuee SSCCCC ggnnrriiqquuee

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Z8530 SCC KISS emulation driver for AX.25




  Joerg Reuter, DL1BKE, jreuter@poboxes.com a crit le module gnrique
  de gestion des cartes  base de SCC Z8530. Son pilote supporte une
  large gamme de cartes diffrentes et offre une interface similaire 
  un TNC KISS que vous pouvez traiter comme telle.


  66..11..77..11..  RRccuupprraattiioonn eett ccoommppiillaattiioonn ddeess oouuttiillss ddee ccoonnffiigguurraattiioonn

  Bien que le pilote soit inclus dans les arborescences standard du
  noyau, Joerg accompagne le paquetage de configuration dont vous aurez
  besoin des versions les plus rcentes.

  Vous trouverez le paquetage des outils de configuration  une des
  adresses suivantes : Joerg's web page <http://www.rat.de/jr/>

  ddbb00bbmm..aauuttoommaattiioonn..ffhh--aaaacchheenn..ddee


       /incoming/dl1bke/




  iinnssll11..eetteecc..uunnii--kkaarrllssrruuhhee..ddee


       /pub/hamradio/linux/z8530/




  ffttpp..uuccssdd..eedduu


       /hamradio/packet/tcpip/linux
       /hamradio/packet/tcpip/incoming/





  Diffrentes versions s'offrent  vous. Choisissez la plus adapte 
  votre noyau :


  z8530drv-2.4a.dl1bke.tar.gz   2.0.*
  z8530drv-utils-3.0.tar.gz    2.1.6 et au del




  Voici les commandes que j'ai employes lors de la compilation et de
  l'installation du paquetage pour mon noyau 2.0.30 :


       # cd /usr/src
       # gzip -dc z8530drv-2.4a.dl1bke.tar.gz | tar xvpofz -
       # cd z8530drv
       # make clean
       # make dep
       # make module         # Si vous souhaitez modulariser le pilote
       # make for_kernel     # Si vous prfrez un pilote inclus dans le noyau
       # make install



  Au terme de ces oprations, trois nouveaux excutables devraient
  s'tre installs dans votre rpertoire /sbin : _g_e_n_c_f_g, _s_c_c_i_n_i_t et
  _s_c_c_s_t_a_t. Ces programmes vont vous servir  configurer le pilote pour
  votre carte.

  De nouveaux priphriques apparatront galement dans votre rpertoire
  /dev sous les noms scc0-scc7. Ils joueront plus tard le rle de
  priphriques KISS que vous pourrez employer.

  Si vous lancez 'make for_kernel', vous devrez galement recompiler
  votre noyau. Afin que le pilote z8530 soit inclus, vrifiez que vous
  avez bien rpondu `Y'  : `Z8530 SCC kiss emulation driver for AX.25'
  durant le `make config'.

  Si vous avez choisi 'make module', le module scc.o sera install dans
  le sous-rpertoire adquat de /lib/modules et il ne vous sera pas
  ncessaire de recompiler tout le noyau. N'oubliez pas d'excuter un
  _i_n_s_m_o_d afin de charger le module avant d'essayer de le configurer.


  66..11..77..22..  CCoonnffiigguurreerr llee ppiilloottee ppoouurr ssaa ccaarrttee

  La conception du pilote SCC z8530 vise une flexibilit maximale ainsi
  que la gestion du plus grand nombre de cartes possible. Le prix 
  payer se retrouve au niveau de la configuration.

  Le paquetage comprend une documentation plus dtaille et vous aurez
  tout intrt  vous y reporter si vous rencontrez le moindre problme.
  Intressez-vous plus particulirement  doc/scc_eng.doc et 
  doc/scc_ger.doc. J'ai repris les points les plus importants mais de
  nombreux dtails sont passs sous silence.

  Le fichier de configuration principal, lu par le programme _s_c_c_i_n_i_t, se
  trouve en /etc/z8530drv.conf. Il se divise en deux parties :
  configuration des paramtres matriels et configuration du canal.  Une
  fois ce fichier au point, vous n'aurez plus qu' ajouter :


       # sccinit




  au fichier rc charg de la configuration du rseau et le priphrique
  sera initialis conformment au contenu du fichier de configuration.
  Effectuez ces oprations avant d'utiliser le gestionnaire.


  66..11..77..22..11..  CCoonnffiigguurraattiioonn ddeess ppaarraammttrreess mmaattrriieellss

  La premire partie se divise en strophes, chacune correspondant  un
  composant 8530. Une strophe comprend une liste de mots clefs et
  d'arguments.  Le fichier peut dcrire jusqu' quatre composants SCC
  par dfaut. Si vous avez besoin d'aller au-del, modifiez la ligne
  #define MAXSCC 4 dans le fichier scc.c.

  Liste des mots-clefs et des arguments :


     cchhiipp
        le terme chip sert  sparer les strophes. Il ne ncessite pas
        d'arguments et ceux-ci sont de toute faon ignors.

     ddaattaa__aa
        adresse du port de donnes pour le canal `A' du z8530. Un nombre
        hexadcimal est attendu en argument (par exemple 0x300).
     ccttrrll__aa
        adresse du port de contrle pour le canal `A' du z8530. Un
        nombre hexadcimal est attendu en argument (par exemple 0x304).

     ddaattaa__bb
        adresse du port de donnes pour le canal `B' du z8530. Un nombre
        hexadcimal est attendu en argument (par exemple 0x301).

     ccttrrll__bb
        adresse du port de contrle pour le canal `B' du z8530. Un
        nombre hexadcimal est attendu en argument (par exemple 0x305).

     iirrqq
        interruption (IRQ) utilise par le SCC 8530. Un entier, 5 par
        exemple, est attendu.

     ppcclloocckk
        frquence du signal d'horloge sur la broche PCLK du 8530.
        L'argument est donn en Hz par un nombre entier (4915200 par
        dfaut).

     bbooaarrdd
        modle de la munie du 8530 :         <<====== ne manque-t-il pas
        un mot ?

        PPAA00HHZZPP
           carte SCC PA0HZP

        EEAAGGLLEE
           carte Eagle

        PPCC110000
           carte SCC PC100 DRSI

        PPRRIIMMUUSS
           carte PRIMUS-PC (DG9BL)

        BBAAYYCCOOMM
           carte (U)SCC BayCom

     eesscccc
        optionnel, active la gestion des cartes SCC tendues (ESCC)
        telles la 8580, la 85180 ou la 85280. L'argument est une chane
        de caractres qui peut prendre les valeurs `yes' ou `no' (`no'
        par dfaut).

     vveeccttoorr
        optionnel, donne l'adresse du vecteur d'acquittement pour les
        cartes PA0HZP. Il est commun  l'ensemble des composants et
        prend par dfaut la valeur nulle.

     ssppeecciiaall
        optionnel, donne l'adresse du registre spcial sur diverses
        cartes. Nul par dfaut.

     ooppttiioonn
        optionnel. Nul par dfaut.

  Quelques exemples de configuration des cartes les plus courantes :


     BBaayyCCoomm UUSSCCCC




     chip    1
     data_a  0x300
     ctrl_a  0x304
     data_b  0x301
     ctrl_b  0x305
     irq     5
     board   BAYCOM
     #
     # SCC chip 2
     #
     chip    2
     data_a  0x302
     ctrl_a  0x306
     data_b  0x303
     ctrl_b  0x307
     board   BAYCOM





     PPAA00HHZZPP SSCCCC ccaarrdd


          chip 1
          data_a 0x153
          data_b 0x151
          ctrl_a 0x152
          ctrl_b 0x150
          irq 9
          pclock 4915200
          board PA0HZP
          vector 0x168
          escc no
          #
          #
          #
          chip 2
          data_a 0x157
          data_b 0x155
          ctrl_a 0x156
          ctrl_b 0x154
          irq 9
          pclock 4915200
          board PA0HZP
          vector 0x168
          escc no





     DDRRSSII SSCCCC ccaarrdd


          chip 1
          data_a 0x303
          data_b 0x301
          ctrl_a 0x302
          ctrl_b 0x300
          irq 7
          pclock 4915200
          board DRSI
          escc no


  Si vous disposez dj d'une configuration qui fonctionne avec votre
  carte sous NOS, la commande _g_e_n_c_f_g permet de convertir les commandes
  du pilote NOS PE1CHL en quelque chose d'utilisable pour le pilote
  z8530.

  _g_e_n_c_f_g s'invoque simplement avec les mmes paramtres que ceux
  employs pour le pilote PE1CHL avec NET/NOS. Par exemple, pour obtenir
  une bauche de fichier de configuration pour une carte OptopSCC :


       # gencfg 2 0x150 4 2 0 1 0x168 9 4915200





  66..11..77..33..  CCoonnffiigguurraattiioonn dduu ccaannaall

  Vous prciserez tous les autres paramtres relatifs au port que vous
  configurez dans la section spcifique au canal. Cette section se
  divise galement en strophes. Une strophe correspond  un port logique
  et il y aura donc deux strophes de canal pour une strophe de
  paramtres matriels puisque chaque SCC 8530 inclut deux ports.

  Les mots-clefs et leurs arguments s'inscrivent galement dans le
  fichier /etc/z8530drv.conf,  llaa ssuuiittee de la section des paramtres
  matriels.

  L'ordre est trs important dans cette section mais tout devrait
  marcher mme si vous vous cartez de celui propos.

      ddeevviiccee
        en premire position, spcifie le nom du priphrique auquel le
        reste de la configuration s'applique (par exemple /dev/scc0)

      ssppeeeedd
        dbit de l'interface en bits par seconde. Un nombre entier est
        attendu (par exemple 1200)

      cclloocckk
        origine de l'horloge de synchronisation des donnes. Les valeurs
        possibles sont :

         ddppllll
           fonctionnement normal monodirectionnel (half-duplex) ;

         eexxtteerrnnaall
           le modem dispose de sa propre horloge Rx/Tx ;

         ddiivviiddeerr
           utilisation du diviseur bidirectionnel (si disponible).

      mmooddee
        type de codage des donnes.  choisir entre nrzi et nrz

      rrxxbbuuffffeerrss
        nombre de tampons de rception  allouer en mmoire.  Un nombre
        entier est attendu (8 par exemple)

      ttxxbbuuffffeerrss
        nombre de tampons d'mission  allouer en mmoire. Un nombre
        entier est attendu (8 par exemple )

      bbuuffssiizzee
        taille des tampons d'mission et de rception. La valeur est
        donne en octets et correspond  la longueur totale d'une trame.
        Elle doit donc prendre en compte aussi bien les donnes que
        l'en-tte. Cet argument est optionnel et prend par dfaut la
        valeur 384

      ttxxddeellaayy
        dlai d'attente de la transmission KISS. Un nombre entier de ms
        est attendu

      ppeerrssiisstt
        paramtre persist (KISS). Argument de type entier

      sslloott
        slot time (KISS). Argument de type entier en ms

      ttaaiill
        the KISS transmit tail value. Argument entier en ms

      ffuulllldduupp
        indicateur de fonctionnement bidirectionnel (KISS),  choisir
        entre 1 pour le bidirectionnel et  0 pour le monodirectionnel

      wwaaiitt
        paramtre d'attente (KISS). Argument de type entier en ms

      mmiinn
        paramtre min (KISS). Argument de type entier en secondes

      mmaaxxkkeeyy
        temps de keyup (?) maximal (KISS). Argument de type entier en
        secondes

      iiddllee
        dlai d'attente sur inactivit (KISS). Argument de type entier
        en secondes

      mmaaxxddeeff
        paramtre maxdef (KISS). Argument de type entier

      ggrroouupp
        paramtre group (KISS). Argument de type entier

      ttxxooffff
        valeur de txoff (KISS). Argument de type entier en ms

      ssooffttddccdd
        valeur de softdcd (KISS). Argument de type entier

      sslliipp
        indicateur slip (KISS). Argument de type entier


  66..11..77..44..  UUttiilliissaattiioonn dduu ppiilloottee

  Il suffit d'employer les priphriques /dev/scc* comme on le ferait
  avec n'importe quel tty srie connect  un TNC KISS. Par exemple,
  avec une carte SCC, vous excuteriez quelque chose du style :


       # kissattach -s 4800 /dev/scc0 VK2KTJ




  NOS permet galement d'attacher le priphrique de la mme faon. Avec
  JNOS, vous entreriez une commande du style :

  attach asy scc0 0 ax25 scc0 256 256 4800





  66..11..77..55..  LLeess oouuttiillss ssccccssttaatt  eett ssccccppaarraamm

  Afin de diagnostiquer les problmes, _s_c_c_s_t_a_t affiche la configuration
  courante de n'importe quel priphrique SCC. Essayez :


       # sccstat /dev/scc0




  Vous devriez rcuprer une quantit impressionnante d'informations
  touchant  la configuration et  l'tat du port SCC /dev/scc0.


  _s_c_c_p_a_r_a_m sert  modifier la configuration aprs l'initialisation du
  noyau. La syntaxe est similaire  celle de la commande param de NOS.
  Pour positionner txtail  100 ms sur un port :


       # sccparam /dev/scc0 txtail 0x8





  66..11..88..  CCrraattiioonn dd''uunn pprriipphhrriiqquuee BBPPQQ

  OOppttiioonnss ddee ccoonnffiigguurraattiioonn dduu nnooyyaauu :



       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] BPQ Ethernet driver for AX.25





  Linux gre le BPQ compatible Ethernet. Vous pouvez ainsi dialoguer en
  AX.25 via un rseau Ethernet local et interconnecter votre poste Linux
  avec d'autres machines BPQ sur rseau local.

  Les priphriques BPQ se retrouvent sous la dnomination `bpq[0-9]'.
  `bpq0' est associ  `eth0', `bpq1'  `eth1' etc.

  La configuration est simple. Mettez d'abord en place un priphrique
  Ethernet standard. Pour cela, vous aurez pris soin d'inclure dans le
  noyau la gestion de votre adaptateur Ethernet. Pour plus de dtails,
  reportez vous  : Ethernet-HOWTO <Ethernet-HOWTO.html>.

  Avant d'activer la gestion BPQ, le priphrique Ethernet doit s'tre
  vu affecter un numro d'identification AX.25. Par exemple :


  # /sbin/ifconfig bpq0 hw ax25 vk2ktj-14 up




  Vrifiez bien que l'identifiant correspond  celui qui figure dans le
  fichier /etc/ax25/axports pour ce port.


  66..11..99..  CCoonnffiigguurraattiioonn dd''uunn nnooeeuudd BBPPQQ ppoouurr llee ddiiaalloogguuee aavveecc llaa ccoouucchhee
  AAXX..2255 ddee LLiinnuuxx

  Souvent, l'Ethernet BPQ repose sur des adresses de type multicast. Ce
  n'est pas le cas dans la mise en oeuvre sous Linux qui recourt aux
  adresses gnrales (broadcast) usuelles sur Ethernet. Le fichier
  NET.CFG du gestionnaire ODI BPQ doit donc tre modifi pour ressembler
   ce qui suit :



       LINK SUPPORT

               MAX STACKS 1
               MAX BOARDS 1

       LINK DRIVER E2000                    ; ou tout autre MLID adapt  votre carte

               INT 10                       ;
               PORT 300                     ; selon votre carte

               FRAME ETHERNET_II

               PROTOCOL BPQ 8FF ETHERNET_II ; requis pour BPQ - peut jouer sur PID

       BPQPARAMS                            ; optionnel - requis seulement pour
                                            ; modifier la cible par dfaut

               ETH_ADDR  FF:FF:FF:FF:FF:FF  ; adresse de la cible





  66..22..  MMiissee aauu ppooiinntt dduu ffiicchhiieerr //eettcc//aaxx2255//aaxxppoorrttss

  /etc/ax25/axports est un fichier texte standard que vous crerez avec
  n'importe quel diteur. Son format est le suivant :


       portname  callsign  baudrate  paclen  window  description




  avec :

      ppoorrttnnaammee
        nom affect au port

      ccaallllssiiggnn
        identifiant AX.25

      bbaauuddrraattee
        vitesse de communication avec le TNC


      ppaacclleenn
        longueur de paquet maximale applicable au port pour les
        communications AX.25 en mode connect

      wwiinnddooww
        paramtre de fentre (K) AX.25. Il s'agit de la mme chose que
        le paramtre  MAXFRAME  de nombreux TNC.

      ddeessccrriippttiioonn
        champ de commentaire

  Chez moi, le fichier ressemble  a :


       radio    VK2KTJ-15       4800        256     2       4800bps 144.800 MHz
       ether    VK2KTJ-14       10000000    256     2       BPQ/ethernet device




  Rappelez-vous que vous devez affecter un numro d'identification
  (ssid) unique  chaque port AX.25 que vous crez. Ajoutez une ligne
  pour chaque priphrique que vous emploierez ; cela concerne les ports
  KISS, BayCom, SCC, PI, PT et modem-son. Les entres dans le fichier
  sont associes aux priphriques rseau par le biais de
  l'identificateur AX.25 : au moins une bonne raison de les prendre
  diffrents.


  66..33..  RRoouuttaaggee AAXX..2255

  Vous pouvez dcider de mettre en place des routes par dfaut
  spcifiques  certains htes, par exemple pour des connexions AX.25
  courantes ou des connexions IP. L'utilitaire _a_x_p_a_r_m_s effectue cette
  tche. Sa page de _m_a_n en donne une description exhaustive.  titre
  d'exemple :


       # /usr/sbin/axparms -route add radio VK2XLZ VK2SUT




  Cette commande tablit une entre pour VK2XLZ via VK2SUT sur le port
  AX.25 nomm radio.


  77..  TTCCPP//IIPP eett ll''iinntteerrffaaccee AAXX..2255

  Si vous disposez d'interfaces KISS, deux mthodes s'offrent  vous
  pour configurer une adresse IP : soit la commande _k_i_s_s_a_t_t_a_c_h, soit le
  recours conventionnel  _i_f_c_o_n_f_i_g.

  Modifiant l'exemple KISS prcdent de faon  crer une interface
  AX.25 avec une adresse IP gale  44.136.8.5 et un MTU de 512 octets :


       # /usr/sbin/kissattach -i 44.136.8.5 -m 512 /dev/ttyS0 radio
       # /sbin/route add -net 44.136.8.0 netmask 255.255.255.0 ax0
       # /sbin/route add default ax0




  Au besoin, vous emploierez _i_f_c_o_n_f_i_g pour configurer les autres
  paramtres.
  Si vous disposez d'autre interfaces, utilisez _i_f_c_o_n_f_i_g pour configurer
  l'adresse IP et le masque de rseau du port et ajoutez une route vers
  le port comme vous le feriez avec n'importe quelle autre interface IP.
  L'exemple suivant s'appuie sur une carte PI mais fonctionnerait de
  faon similaire avec un priphrique AX.25 quelconque :


       # /sbin/ifconfig pi0a 44.136.8.5 netmask 255.255.255.0 up
       # /sbin/ifconfig pi0a broadcast 44.136.8.255 mtu 512
       # /sbin/route add -net 44.136.8.0 netmask 255.255.255.0 pi0a
       # /sbin/route add default pi0a




  Les commandes prcdentes correspondent  une configuration familire
  aux utilisateurs de NOS et de ses variantes ou de toute autre logiciel
  IP.  Notez que la route par dfaut n'est pas ncessaire si un autre
  priphrique rseau la met lui-mme en place.

  Pour tester votre configuration, lancez un ping ou un telnet vers
  votre machine :


       # ping -i 5 44.136.8.58




  L'argument `-i 5' force _p_i_n_g  envoyer ses requtes ICMP toutes les 5
  secondes et non chaque seconde.


  88..  CCoonnffiigguurraattiioonn dd''uunn ppoorrtt NNeettRRoomm

  Le protocole NetRom s'appuye sur les ports AX.25 que vous crerez. Sa
  configuration s'effectue par l'intermdiaire de deux fichiers. L'un
  dcrit les interfaces NetRom et l'autre les ports AX.25 sous-jacents.
  La procdure dtaille ci-dessous s'appliquera  toutes les interfaces
  NetRom que vous souhaiterez dfinir.


  88..11..  LLee ffiicchhiieerr //eettcc//aaxx2255//nnrrppoorrttss

  Ce fichier est l'analogue pour les ports NetRom du fichier
  /etc/ax25/axports pour les ports AX.25. Tous les priphriques NetRom
  que vous souhaitez employer doivent figurer dans le fichier
  /etc/ax25/nrports. Le plus souvent, une station Linux ne comprendra
  qu'un seul port NetRom qui utilisera certains des priphriques AX.25.
  Pour certains services tels un BBS, le besoin de dfinir plusieurs
  alias NetRom peut se manifester ; on ajoute alors des priphriques
  NetRom en consquence.

  Le format du fichier est le suivant :


       name callsign  alias  paclen   description




  Avec :

      nnaammee
        nom affect au port.

      ccaallllssiiggnn
        identifiant pour le trafic NetRom transitant par ce port.
        Attention, il ne s'agit ppaass de l'adresse  laquelle les clients
        doivent se connecter pour disposer d'une interface de type _n_o_e_u_d
        (ce mode sera dcrit un peu plus loin). L'identifiant doit tre
        unique et ne rapparatre nulle part dans les fichiers
        /etc/ax25/axports et /etc/ax25/nrports.

      aalliiaass
        alias NetRom du port.

      ppaacclleenn
        taille maximale des trames NetRom transmises par le port.

      ddeessccrriippttiioonn
        commentaire.

  Par exemple, pour crer un port NetRom connu du reste du rseau NetRom
  sous l'identit `LINUX:VK2KTJ-9' :


       netrom  VK2KTJ-9        LINUX   236     Linux Switch Port




  Des programmes tels _c_a_l_l se servent du fichier nrports.


  88..22..  LLee ffiicchhiieerr //eettcc//aaxx2255//nnrrbbrrooaaddccaasstt

  Ce second fichier peut contenir une nombre d'entres variable,
  normalement une pour chaque port AX.25 convoyant du trafic NetRom.

  Le format du fichier est le suivant :


       axport min_obs def_qual worst_qual verbose




  Avec :

      aaxxppoorrtt
        nom du port tir du fichier /etc/ax25/axports.  En l'absence
        d'entre dans le fichier /etc/ax25/nrbroadcasts pour un port
        AX.25, aucun routage NetRom n'aura lieu via ce port et toute
        diffusion NetRom sera ignore.

      mmiinn__oobbss
        paramtre d'obsolescence minimale du port.

      ddeeff__qquuaall
        qualit par dfaut.

      wwoorrsstt__qquuaall
        qualit minimale admissible. Toute route de qualit moindre sera
        ignore.

      vveerrbboossee
        activation de la diffusion des informations de routage globales
        ou seulement relatives au noeud.

  Par exemple :

  radio    1       200      100         1





  88..33..  CCrraattiioonn ddeess pprriipphhrriiqquueess rrsseeaauu NNeettRRoomm

  Une fois les deux fichiers mis au point, il faut crer les
  priphriques NetRom. La dmarche est proche du cas AX.25  ceci prs
  que l'on se sert  prsent de la commande _n_r_a_t_t_a_c_h. Elle constitue un
  pendant  la commande _a_x_a_t_t_a_c_h et cre des priphriques NetRom qui se
  retrouvent sous la dnomination `nr[0-9]' (la premire invocation
  produit `nr0', la seconde `nr1' etc.) Pour associer un priphrique
  NetRom au port dfini prcdemment, on utilise :


       # nrattach netrom




  Cette commande active le priphrique NetRom (nr0) nomm netrom con
  figur conformment au contenu du fichier /etc/ax25/nrports.


  88..44..  LLaanncceemmeenntt dduu ddmmoonn NNeettRRoomm

  Le noyau Linux gre le protocole NetRom et assure la commutation mais
  il ne prend pas en charge certaines fonctions. Le dmon NetRom
  maintient les tables de routage NetRom et diffuse les messages de
  routage NetRom. Il se lance via :


       # /usr/sbin/netromd -i




  Le fichier /proc/net/nr_neigh devrait progressivement se remplir
  d'informations concernant vos voisins NetRom.

  N'oubliez pas d'inclure la commande /usr/sbin/netromd dans vos scripts
  de dmarrage ou d'en crer un ddi  l'automatisation du processus.


  88..55..  RRoouuttaaggee NNeettRRoomm

  Peut-tre voudrez-vous mettre en place des routes statiques pour
  certains htes particuliers. La commande _n_r_p_a_r_m_s dispose d'une telle
  fonction. Reportez-vous  la page de _m_a_n pour une description
  complte. A titre d'exemple, pour indiquer sur mon port AX.25 `radio'
  une route NetRom vers le #MINTO:VK2XLZ-10 en passant par mon voisin
  VK2SUT-9 :


       # /usr/sbin/nrparms -nodes VK2XLZ-10 + #MINTO 120 5 radio VK2SUT-9





  _n_r_p_a_r_m_s permet galement de crer manuellement de nouveau voisins.  La
  commande suivante cre un voisin NetRom VK2SUT-9 d'une qualit de 120
  qui ne sera pas supprim automatiquement.

  # /usr/sbin/nrparms -routes radio VK2SUT-9 + 120





  99..  TTCCPP//IIPP ssuurr uunnee iinntteerrffaaccee NNeettRRoomm

  La configuration ressemble  celle d'AX.25 pour TCP/IP.

  Soit vous prcisez l'adresse IP et le MTU avec _n_r_a_t_t_a_c_h, soit vous
  utilisez les commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e. Il vous faudra ajouter  la
  main les caractristiques _a_r_p des htes concerns par votre routage
  puisque votre machine ne dispose d'aucun mcanisme pour dterminer une
  adresse NetRom utilisable afin d'atteindre une interface IP
  particulire.

  Pour crer une interface nr0 d'adresse IP 44.136.8.5, de MTU 512 et
  configur conformment aux spcifications du fichier /etc/ax25/nrports
  relatives au port NetRom appel netrom :


       # /usr/sbin/nrattach -i 44.136.8.5 -m 512 netrom
       # route add 44.136.8.5 nr0




  Autre mthode :


       # /usr/sbin/nrattach netrom
       # ifconfig nr0 44.136.8.5 netmask 255.255.255.0 hw netrom VK2KTJ-9
       # route add 44.136.8.5 nr0




  En ce qui concerne le volet arp et le routage, pour joindre l'inter
  face IP 44.136.80.4  l'adresse NetRom BBS:VK3BBS via un voisin NetRom
  d'identifiant VK2SUT-0, on excuterait :


       # route add 44.136.80.4 nr0
       # arp -t netrom -s 44.136.80.4 vk2sut-0
       # nrparms -nodes vk3bbs + BBS 120 6 sl0 vk2sut-0




  Les arguments `120' et `6' passs  la _n_r_p_a_r_m_s fixent les paramtres
  de qualit et d'obsolescence NetRom pour la route.


  1100..  CCoonnffiigguurraattiioonn ddeess ppoorrttss RRoossee

  Le protocole de transmission de paquets Rose est semblable  la couche
  trois des spcifications X.25. La gestion Rose du noyau est une
  version mmooddiiffiiee de FPAC Rose implementation
  <http://fpac.lmi.ecp.fr/f1oat/f1oat.html>.

  La couche Rose s'appuie sur les ports AX.25 que vous dfinissez. La
  procdure dtaille ci-dessous s'appliquera  toutes les interfaces
  NetRom que vous souhaiterez dfinir.


  1100..11..  LLee ffiicchhiieerr //eettcc//aaxx2255//rrssppoorrttss

  Ce fichier est l'analogue pour les ports Rose du fichier
  /etc/ax25/axports pour les ports AX.25.

  Le format du fichier est le suivant :


       name  addresss  description




  Avec :

      nnaammee
        nom affect au port.

      aaddddrreessss
        adresse Rose sur 10 digits.

      ddeessccrriippttiioonn
        commentaire.

  Par exemple :


       rose  5050294760  Rose Port




  Notez que Rose emploie par dfaut l'identifiant/ssid du port AX.25.

  La commande _r_s_p_a_r_m_s permet de modifier l'identifiant Rose. Par
  exemple, pour que Linux se serve de l'identifiant VK2KTJ-10 pour le
  trafic Rose sur tous les ports AX.25 .


       # /usr/sbin/rsprams -call VK2KTJ-10





  1100..22..  CCrraattiioonn ddeess pprriipphhrriiqquueess rrsseeaauu RRoossee

  Une fois le fichier /etc/ax25/rsports mis au point, vous pouvez crer
  les priphriques Rose en reprenant la dmarche AX.25. Vous emploierez
  la commande _r_s_a_t_t_a_c_h qui cre des priphriques sous l'appellation
  `rose[0-5]' (la premire invocation produit `rose0', la seconde
  `rose1' etc...). Par exemple :


       # rsattach rose




  Cette commande active le priphrique Rose (rose0) nomm `rose' con
  figur conformment au contenu du fichier /etc/ax25/rsports.





  1100..33..  RRoouuttaaggee RRoossee

  Le protocole Rose ne gre pour l'instant que le routage statique. Il
  se dfinit par le biais de la commande _r_s_p_a_r_m_s.

  Par exemple, pour indiquer une route vers le noeud Rose 5050295502 via
  un port AX.25 nomm `radio' dans le fichier /etc/ax25/axports en
  passant par le voisin d'identificateur VK2XLZ :



       # rsparms -nodes add 5050295502 radio vk2xlz




  Un masque vous permettra ventuellement de regrouper diffrentes
  destinations Rose sur une seule route. Par exemple :


       # rsparms -nodes add 5050295502/4 radio vk2xlz




  On retrouve l'exemple prcdent  ceci prs que toute adresse de des
  tination dont les quatre premiers digits correspondent (toute adresse
  commenant par 5050 donc) sera route. La variante suivante s'avre
  srement la moins ambigu :


       # rsparms -nodes add 5050/4 radio vk2xlz





  1111..  CCoommmmuunniiccaattiioonnss AAXX..2255//NNeettRRoomm//RRoossee

  Maintenant que vos interfaces AX.25, NetRom et Rose sont actives,
  vous devriez tre capable de procder  des essais.

  Le paquetage des utilitaires AX.25 comprend le programme `_c_a_l_l' qui
  sert d'intermdiaire pour AX.25, NetRom et Rose.

  Un appel AX.25 :


       /usr/bin/call radio VK2DAY via VK2SUT




  Un appel NetRom vers un noeud d'alias SUNBBS :


       /usr/bin/call netrom SUNBBS




  Un appel Rose pour HEARD au noeud 5050882960 :


       /usr/bin/call rose HEARD 5050882960

  Remarque : vous devez prciser  _c_a_l_l le port  employer, vu que le
  mme noeud de destination peut tre joignable via n'importe lequel des
  ports que vous aurez configurs.

  _c_a_l_l fournit un terminal de contrle en mode ligne de commande pour
  les appels AX.25. Les lignes commenant par `~' sont identifies comme
  des commandes. La commande `~.' coupe la communication.

  Reportez-vous  la page de man sous /usr/man pour davantage
  d'informations.


  1122..  CCoonnffiigguurreerr LLiinnuuxx ppoouurr aacccceepptteerr lleess ccoonnnneexxiioonnss

  Linux est un systme d'exploitation puissant qui prsente beaucoup de
  flexibilit dans sa configuration. Le cot de cette flexibilit se
  retrouve dans la mise au point de la configuration souhaite. Avant
  d'tre en mesure d'accepter les connexions AX.25, NetRom ou Rose, vous
  devez vous poser un certain nombre de questions. La plus importante :
  "Que vais-je laisser de visible aux utilisateurs une fois connects ?"
  Des gens ont mis au point de sympathiques petites applications qui
  fournissent des services aux appelants tels _p_m_s ou, plus volu, _n_o_d_e
  (tous deux sont compris dans le paquetage des utilitaires AX.25). Vous
  pouvez galement souhaiter offrir une invite d'identification afin que
  les utilisateurs disposent d'un shell ou mme crire vos propres
  programmes tels une base de donnes maison ou un jeu. Quoi que vous
  fassiez, il faut spcifier  AX.25 le programme  excuter quand une
  connexion s'tablit.

  Le dmon _a_x_2_5_d joue un rle similaire  celui rempli par _i_n_e_t_d pour
  les connexion TCP/IP entre machines UNIX. Il se met  l'coute des
  connexions entrantes et lorsqu'il en dtecte une, il examine par
  l'intermdiaire d'un fichier de configuration le programme  lancer
  auquel il transmet la connexion.  Puisqu'il s'agit d'un outil standard
  de gestion des appels AX.25, NetRom et Rose, je vais  prsent dcrire
  les tapes de sa configuration.


  1122..11..  LLee ffiicchhiieerr //eettcc//aaxx2255//aaxx2255dd..ccoonnff

  Ce fichier contient la configuration du dmon _a_x_2_5_d en charge des
  connexions AX.25, NetRom et Rose.

  Bien que le fichier paraisse un peu cryptique au premier abord, il
  s'avre rapidement des plus simples  l'usage, avec quelques piges 
  viter.

  Le format gnral du fichier est le suivant :



       # Je suis un commentaire qu'ax25d ignorera
       [nom de port] || <nom de port> || {nom de port}
       <interlocuteur1> window T1 T2 T3 idle N2 <mode> <uid> <cmd> <commande> <args>
       <interlocuteur2> window T1 T2 T3 idle N2 <mode> <uid> <cmd> <commande> <args>
       parametres window T1 T2 T3 idle N2 <mode>
       <interlocuteur3> window T1 T2 T3 idle N2 <mode> <uid> <cmd> <commande> <args>
          ...
       default    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <commande> <args>




  Avec :


      ## en dbut de ligne pour indiquer un commentaire ignor du
        programme _a_x_2_5_d

      <<ppoorrtt__nnaammee>>
        nom du port AX.25, NetRom ou Rose tel que spcifi dans un des
        fichiers /etc/ax25/axports, /etc/ax25/nrports ou
        /etc/ax25/rsports. Le nom du port est entour par `[]' s'il
        s'agit d'un port AX.25, `<>' si c'est un port NetRom ou `{}'
        pour un port Rose. Ce champ admet une variante qui prcde le
        nom du port par `callsign/ssid via' pour indiquer que vous
        voulez accepter les appels vers l'identificateur cit par
        l'intermdiaire de cette interface. Un exemple l'illustrera.

      <<ppeeeerr>>
        est l'identifiant du noeud auquel la configuration s'applique.
        Si vous ne spcifiez pas de ssid, tous seront considrs comme
        valables.

      wwiinnddooww
        paramtre de fentre AX.25 (K) ou valeur de MAXFRAMDE pour cette
        configuration.

      TT11
        dlai de retransmission de trame (T1) exprim en demi-secondes.

      TT22
        dlai d'attente par le logiciel AX.25 d'une seconde trame avant
        de prparer une rponse. S'exprime en secondes.

      TT33
        dlai d'inactivit avant qu'une connexion inactive ne soit
        coupe. S'exprime en secondes.

      iiddllee
        priode d'inactivit en secondes.

      NN22
        nombre d'essais de retransmission avant qu'une connexion ne soit
        coupe.

      <<mmooddee>>
        procure un mcanisme d'tablissement de certains types de
        permissions. Les modes sont activs ou inhibs grce  une
        combinaison de caractres reprsentant chacun un droit.
        L'accentuation ne joue pas et les caractres doivent former un
        bloc ininterrompu.

         uu//UU
           UTMP                   - non-support

         vv//VV
           Validate call          - non-support

         qq//QQ
           Quiet                  - pas d'enregistrement des connexions

         nn//NN
           check NetRom Neighbour - non-support

         dd//DD
           Disallow Digipeaters   - les connexions doivent tre directes

         ll//LL
           Lockout                - connexion interdite


         **//00
           marker                 - marqueur, pas de mode spcifique

      <<uuiidd>>
        userid sous laquelle le programme maintenant la connexion sera
        excut.

      <<ccmmdd>>
        nom complet de la commande  lancer, sans arguments.

      <<ccmmdd--nnaammee>>
        texte qui apparatra  l'invocation de _p_s comme commande du
        programme (en gnral la mme chose que <cmd> mais sans le
        chemin d'accs).

      <<aarrgguummeennttss>>
        arguments de ligne de commande passs  <:cmd> lorsqu'il est
        lanc. Les lments suivants permettent de passer des
        informations utilises :

         %%dd
           nom du port recevant la connexion

         %%UU
           identificateur AX.25 de l'extrmit connecte, sans ssid, en
           majuscules

         %%uu
           identificateur AX.25 de l'extrmit connecte, sans ssid, en
           minuscules

         %%SS
           identificateur AX.25 de l'extrmit connecte, avec ssid, en
           majuscules

         %%ss
           identificateur AX.25 de l'extrmit connecte, avec ssid, en
           minuscules

         %%PP
           identificateur AX.25 du noeud distant initiateur de la
           connexion, sans ssid, en majuscules

         %%pp
           identificateur AX.25 du noeud distant initiateur de la
           connexion, sans ssid, en minuscules

         %%RR
           identificateur AX.25 du noeud distant initiateur de la
           connexion, avec ssid, en majuscules

         %%rr
           identificateur AX.25 du noeud distant initiateur de la
           connexion, avec ssid, en minuscules

  Ue section au format prcdent est requise pour chaque interface
  AX.25, NetRom ou Rose que vous voulez voir accepter des connexions.

  Le paragraphe comprend deux lignes particulires, l'une commenant par
  la chane `parameters' et l'autre par la chane `default' (il y a une
  diffrence).

  `default' couvre tous les cas qui ne sont pas spcifis ailleurs.
  Ainsi, tous les appels sur l'interface <interface_call> ne disposant
  pas d'une rgle spcifique se retrouvent dans la rubrique `default'.
  En l'absence d'une telle section, toutes les connexions hors rgle
  sont immdiatement interrompues sans autre forme de procs.

  `parameters' est plus subtil et dissimule le pige mentionn
  prcdemment. Si le caractre `*' est prsent dans un champ, une
  valeur par dfaut issue de la section `parameters' est employe. Le
  noyau possde d'ailleurs une liste de valeurs utilises en l'absence
  de `parameters'. Le danger rside en ce que les entres spcifies via
  `parameters' ne s'appliquent qu'aux rgles qui les suivent.  Une mme
  interface peut comporter plusieurs entres `parameters'.  Notez que
  les rgles `parameters' ne permettent pas de positionner les champs
  `uid' et `command'.


  1122..22..  UUnn eexxeemmppllee ddee ffiicchhiieerr aaxx2255dd..ccoonnff



       # ax25d.conf pour VK2KTJ - 02/03/97
       # Ce fichier de configuration utilise le port AX.25 dfini plus haut.

       # <peer> Win T1  T2  T3  idl N2 <mode> <uid> <exec> <argv[0]>[<args....>]

       [VK2KTJ-0 via radio]
       parameters 1    10  *  *  *   *   *
       VK2XLZ     *     *  *  *  *   *   *    root  /usr/sbin/axspawn axspawn %u +
       VK2DAY     *     *  *  *  *   *   *    root  /usr/sbin/axspawn axspawn %u +
       NOCALL     *     *  *  *  *   *   L
       default    1    10  5 100 180 5   *    root  /usr/sbin/pms pms -a -o vk2ktj

       [VK2KTJ-1 via radio]
       default    *     *    *   *   *   0    root /usr/sbin/node node

       <netrom>
       parameters 1    10  *  *  *   *   *
       NOCALL     *     *  *  *  *   *   L
       default    *     *  *  *  *   *   0        root /usr/sbin/node node

       {VK2KTJ-0 via rose}
       parameters 1    10  *  *  *   *   *
       VK2XLZ     *     *  *  *  *   *   *    root  /usr/sbin/axspawn axspawn %u +
       VK2DAY     *     *  *  *  *   *   *    root  /usr/sbin/axspawn axspawn %u +
       NOCALL     *     *  *  *  *   *   L
       default    1    10  5 100 180 5   *    root  /usr/sbin/pms pms -a -o vk2ktj

       {VK2KTJ-1 via rose}
       default    *     *    *   *   *   0    root /usr/sbin/node node radio




  Dans cet exemple, toute personne rclamant une connexion via
  l'identificateur `VK2KTJ-0' du port AX.25 `radio' se verra appliquer
  les rgles suivantes :

  Tout appel depuis un identifiant `NOCALL' se verra rejet. Notez
  l'emploi du mode `L'.

  La ligne parameters modifie deux paramtres par dfaut du noyau
  (Window et T1) et excutera _/_u_s_r_/_s_b_i_n_/_a_x_s_p_a_w_n. Les instances de
  _/_u_s_r_/_s_b_i_n_/_a_x_s_p_a_w_n appeles ainsi apparatront en tant que _a_x_s_p_a_w_n dans
  un affichage issu de _p_s. Les deux lignes qui suivent dfinissent deux
  stations auxquelles s'appliqueront les permissions.

  La dernire ligne de la section est la rgle fourre-tout applique au
  reste des connexions (VK2XLZ et VK2DAY inclus ds lors qu'ils ont
  recours  un ssid diffrent de -1). Tous les paramtres prennent leurs
  valeurs par dfaut et le programme _p_m_s sera lanc avec un argument de
  ligne de commande spcifiant une connexion AX.25 d'identifiant VK2KTJ
  (reportez-vous  la partie `Configuration du PMS' pour davantage de
  dtails).

  La configuration suivante accepte les appels  VK2KTJ-1 via le port
  radio. Le programme _n_o_d_e est excut  chaque connexion.

  Vient ensuite une spcification de connexions NetRom (notez l'emploi
  des signes infrieur et suprieur  la place des crochets). Toute
  personne se connectant via le port `netrom' dclenche le programme
  _n_o_d_e si son identifiant est diffrent de `NOCALL'. Dans le cas
  contraire, tout accs est refus.

  Les deux dernires configurations concernent des connexions entrantes
  Rose, la premire pour ceux qui appellent le `VK2KTJ-0' sur notre
  noeud Rose et la seconde pour ceux qui emploient le `VK2KTJ-1'. Elles
  fonctionnent de la mme faon. Notez l'emploi des accolades qui
  indiquent des ports Rose.

  L'exemple manque un peu de naturel mais je crois qu'il illustre
  clairement les proprits importantes de la syntaxe du fichier de
  configuration. La page de _m_a_n explique dans son intgralit le contenu
  du fichier ax25d.conf.  Le paquetage ax25-utils inclut un exemple plus
  dtaill qui pourrait galement vous tre utile.


  1122..33..  LLaanncceerr aaxx2255dd

  Une fois les deux fichiers de configuration mis au point, lancez la
  commande :


       # /usr/sbin/ax25d




   prsent, les gens devraient pouvoir se connecter en AX.25  votre
  machine.  N'oubliez pas de modifier les fichiers de commande de dmar
  rage du systme de faon que ax25d soit invoqu automatiquement 
  chaque rinitialisation de la station.


  1133..  LLee llooggiicciieell nnooddee

  Le logiciel _n_o_d_e a t dvelopp par Tomi Manninen
  <tomi.manninen@hut.fi>. Il a t conu  partir du programme PMS et
  offre une fonctionnalit de noeud facilement configurable. Une fois
  les utilisateurs connects, il leur permet de se servir de telnet, de
  NetRom, de Rose et de AX.25 vers l'extrieur ainsi que d'obtenir
  diverses informations telles finger, la liste des noeuds et des
  coutes etc. Le noeud peut tre configur assez simplement pour
  excuter n'importe quelle commande Linux.

  Normalement, le noeud sera invoqu par _a_x_2_5_d, bien qu'il puisse
  galement tre appel par le dmon IP _i_n_e_t_d pour permettre aux
  utilisateurs d'obtenir un accs telnet  votre machine. Le lancement
  depuis la ligne de commande est galement possible.


  1133..11..  LLee ffiicchhiieerr //eettcc//aaxx2255//nnooddee..ccoonnff

  node.conf est un fichier texte qui spcifie la configuration du noeud.
  Son format est le suivant :

       # /etc/ax25/node.conf
       # Fichier de configuration du programme node(8)
       #
       # Un '#' indique une ligne de commentaire qui sera ignore.

       # Nom d'hte de la machine noeud
       hostname        radio.gw.vk2ktj.ampr.org

       # Rseau local
       # dfinit ce qui doit tre considr comme 'local' du point de vue de la
       # vrification des permissions grce  nodes.perms.
       localnet        44.136.8.96/29

       # Ports cachs
       # rend certains ports invisibles aux utilisateurs. Les ports n'apparatront pas
       # via la commande Ports.
       hiddenports     rose netrom

       # Identification du noeud
       # apparatra  l'invite du noeud
       NodeId          LINUX:VK2KTJ-9

       # Port NetRom
       # nom du port NetRom qui employ pour les connexions NetRom sortant du noeud
       NrPort          netrom

       # Dlai d'inactivit du noeud
       # en secondes
       idletimout      1800

       # Dlai d'inactivit des connexions
       # en secondes
       conntimeout     1800

       # Reprise de connexion
       # indique si les utilisateurs doivent tre reconnects spontanment en cas
       # de rupture de la connexion distante ou bien s'ils doivent tre compltement
       # dconnects.
       reconnect       on

       # Alias
       alias           CONV    "telnet vk1xwt.ampr.org 3600"
       alias           BBS     "connect radio vk2xsb"

       # Alias (commandes externes)
       # excution de commandes externes au noeud
       # extcmd <cmd> <flag> <userid> <commande>
       # Flag == 1 pour l'instant
       # <commande> a le mme format que dans ax25d.conf
       extcmd          PMS     1       root    /usr/sbin/pms pms -u %U -o VK2KTJ

       # Enregistrement
       # le niveau 3 est le plus dtaill, 0 dsactive l'enregistrement
       loglevel        3

       # Caractre de contrle
       # 20 = (Control-T)
       EscapeChar      20








  1133..22..  LLee ffiicchhiieerr //eettcc//aaxx2255//nnooddee..ppeerrmmss

  _n_o_d_e affecte des permissions aux utilisateurs. On dcide ainsi des
  utilisateurs qui ont le droit ou non d'employer des commandes telles
  (T)elnet ou (C)onnect. node.perms contient cinq champs. Le caractre
  `*' dans l'un d'eux indique une absence de contraintes pour son
  application. On construit ainsi facilement des rgles applicables par
  dfaut.


      uusseerr
        Le premier champ indique l'identifiant d'appel concern par les
        permissions.  Une ventuelle partie ssid sera ignore.

      mmeetthhoodd
        Chaque protocole et chaque mthode d'accs disposent galement
        de permissions.  Par exemple, les utilisateurs connects via
        AX.25 ou NetRom peuvent tre autoriss  se servir de (C)onnect
        tandis que ceux issus d'une session telnet depuis un noeud non-
        local s'en verront refuser l'accs. Le deuxime champ spcifie
        donc  quelle mthode d'accs les permissions s'appliquent.
        Voici les classes de mthodes d'accs :


          method  description
          ------  -----------------------------------------------------------
          ampr    session telnet depuis une adresse amprnet (44.0.0.0)
          ax25    connexion AX.25
          host    node invoqu depuis la ligne de commande
          inet    session telnet depuis une adresse non locale, de type non amprnet
          local   session telent depuis un hte 'local'
          netrom  connexion NetRom
          rose    connexion Rose
          *       n'importe quelle connexion




      ppoorrtt
        Vous pouvez galement contrler les permissions pour les
        utilisateurs AX.25 sur la base des ports employs. Le troisime
        champ contient un nom de port si vous dcidez d'employer cette
        possibilit (disponible seulement pour les connexions AX.25).

      ppaasssswwoorrdd
        Un mot de passe peut galement tre demand lors de
        l'tablissement de la connexion. Cela s'avre pratique pour
        protger des comptes utilisateurs spcifiques disposant de
        privilges particulirement levs. Si le quatrime champ est
        positionn, il correspond au mot de passe attendu.

      ppeerrmmiissssiioonnss
        Les permissions sont fixes par le biais du dernier champ de
        chaque ligne.  L'information est code au niveau du bit, chaque
        service disposant d'un bit qui indique s'il est ou non activ.
        Ci-suit la liste des services et la position du champ avec le
        bit positionn :









     valeur  description
     ------  -------------------------------------------------
      1      Login
      2      (C)onnect AX.25
      4      (C)onnect NetRom
      8      (T)elnet vers les htes locaux
      16     (T)elnet vers amprnet (44.0.0.0)
      32     (T)elnet vers les htes non-locaux, de type non-amprnet
      64     (C)onnect AX.25 pour les ports cachs
      128    (C)onnect Rose




     On additionne ensuite les puissances de deux associes aux bits des
     permissions actives. Le rsultat va dans le cinquime champ.

  Un exemple de fichier nodes.perms :



       # /etc/ax25/node.perms
       #
       # L'oprateur a pour identit VK2KTJ, s'identifie par le mot de passe 'secret'
       # et dispose de toutes les permissions pour toutes les mthodes de connexion.
       vk2ktj  *       *       secret  255

       # Les utilisateurs suivants sont exclus
       NOCALL  *       *       *       0
       PK232   *       *       *       0
       PMS     *       *       *       0

       # Les utilisateur d'INET n'ont pas le droit de se connecter
       *       inet    *       *       0

       # Les utilisateurs AX.25, NetRom, locaux, lis  l'hte ou AMPR disposent de
       # (C)onnect et de (T)elnet vers les htes locaux et ampr mais se voient
       # interdire les autres adresses IP.
       *       ax25    *       *       159
       *       netrom  *       *       159
       *       local   *       *       159
       *       host    *       *       159
       *       ampr    *       *       159





  1133..33..  EExxccuuttiioonn ddee nnooddee  ddeeppuuiiss aaxx2255dd

  L'invocation du programme _n_o_d_e par le dmon _a_x_2_5_d ncessite l'ajout de
  rgles appropries au fichier /etc/ax25/ax25d.conf. Je souhaitais une
  configuration telle que les utilisateurs puissent se connecter soit 
  _n_o_d_e soit  un service de leur choix. _a_x_2_5_d l'autorise par le biais
  d'une cration astucieuse d'alias de ports. Par exemple, partant de la
  configuration d'_a_x_2_5_d donne plus haut, on veut que tous les
  utilisateurs se connectant  VK2KTJ-1 reoivent le noeud. Pour cela,
  on ajoute la rgle suivante au fichier /etc/ax25/ax25d.conf :


       [vk2ktj-1 via radio]
       default    *     *    *   *   *   0    root /usr/sbin/node node




  Linux rpondra  toute demande de connexion sur le port AX.25 `radio'
  d'identifiant `VK2KTJ-1' en excutant le programme _n_d_e.


  1133..44..  EExxccuuttiioonn ddee nnooddee  ddeeppuuiiss iinneettdd

  Offrir la possibilit d'ouvrir une session telnet sur votre machine et
  d'accder au programme _n_o_d_e est une tache plutt facile. Commencez par
  choisir le port auquel les utilisateurs se connecteront. Dans mon
  exemple, j'ai pris arbitrairement le port 3694 bien que Tomi dtaille
  dans sa documentation la marche  suivre pour remplacer le dmon
  telnet usuel par le programme _n_o_d_e.

  Il faut modifier deux fichiers.

  Ajouter au fichier /etc/services :


       node    3694/tcp        #OH2BNS's node software




  et au fichier /etc/inetd.conf :


       node    stream  tcp     nowait  root    /usr/sbin/node node




  Une fois _i_n_e_t_d redmarr, tout utilisateur effectuant un telnet vers
  le port 3694 de votre machine se verra demander un login et, selon la
  configuration, un mot de passe avant d'tre connect  _n_o_d_e.


  1144..  CCoonnffiigguurraattiioonn ddee aaxxssppaawwnn ..

  _a_x_s_p_a_w_n permet aux stations AX.25 qui se connectent d'ouvrir une
  session sur votre machine. Il peut tre lanc par le programme _a_x_2_5_d
  dcrit ci-dessus d'une faon similaire  _n_o_d_e. Pour ouvrir une session
  utilisateur, vous ajouterez une variante de la ligne suivante au
  fichier /etc/ax25/ax25d.conf :


       default * * * * * 1 root /usr/sbin/axspawn axspawn %u




  Si la ligne s'achve sur le caractre +, l'utilisateur devra appuyer
  sur la touche d'entre avant de pouvoir s'identifier. Par dfaut, il
  n'y a pas d'attente. Toutes les configurations d'htes qui suivent la
  ligne prcdente dclencheront l'appel d'_a_x_s_p_a_w_n lorsqu'ils se con
  necteront. Quand _a_x_s_p_a_w_n s'excute, il vrifie tout d'abord que
  l'argument de ligne de commande fourni est un identifiant licite, sup
  prime le SSID puis parcourt le fichier /etc/passwd pour voir si
  l'utilisateur dispose d'un compte.  Si c'est le cas et que le mot de
  passe associ est "" (vide) ou +, la session utilisateur est ouverte.
  En prsence d'un autre mot de passe, celui-ci est demand. Si le
  compte n'existe pas, _a_x_s_p_a_w_n peut tre configur de faon  en crer
  un automatiquement.




  1144..11..  MMiissee aauu ppooiinntt dduu ffiicchhiieerr //eettcc//aaxx2255//aaxxssppaawwnn..ccoonnff

  Le format du fichier est le suivant :


       # /etc/ax25/axspawn.conf
       #
       # creation automatique de comptes utilisateur
       create    yes
       #
       # compte d'invite en l'absence de creation automatique et si tout le reste
       # echoue. Se desactive ave "no"
       guest     no
       #
       # id ou nom du groupe pour le compte automatique
       group     ax25
       #
       # id de depart
       first_uid 2001
       #
       # id maximale
       max_uid   3000
       #
       # emplacement des repertoires utilisateurs crees automatiquement
       home      /home/ax25
       #
       # shell utilisateur
       shell     /bin/bash
       #
       # lien entre les id utilisateur et le numero d'identification pour les
       # connexions sortantes
       associate yes




  Dtail des huit caractristiques configurables de _a_x_s_p_a_w_n :


     ##  indique un commentaire.

     ccrreeaattee
        si ce champ est positionn  yes alors _a_x_s_p_a_w_n tentera de crer
        un compte pour tout utilisateur qui n'apparat pas dans le
        fichier /etc/passwd.

     gguueesstt
        fournit le nom du compte  employer pour les utilisateurs n'en
        ayant pas lorsque _c_r_e_a_t_e est positionn  no. On y trouve
        souvent ax25 ou guest.

     ggrroouupp
        indique le groupe pour les utilisateurs qui n'apparaissent pas
        dans le fichier /etc/passwd.

     ffiirrsstt__uuiidd
        valeur de dpart des identits utilisateur lors de la cration
        automatique

     mmaaxx__uuiidd
        identit utilisateur maximale disponible  la cration
        automatique

     hhoommee
        rpertoire dans lequel seront crs les comptes utilisateurs

     sshheellll
        shell de login des nouveaux utilisateurs

     aassssoocciiaattee
        indique si les connexions sortantes de l'utilisateur ont lieu
        avec son identifiant d'appel personnel ou avec celui de votre
        station


  1155..  CCoonnffiigguurraattiioonn ddee ppmmss

  _p_m_s fournit un systme simple de messagerie personnelle. Il a t
  crit  l'origine par Alan Cox. Dave Brown, N2RJT, <dcb@vectorbd.com>
  en a repris le dveloppement. Les fonctionnalits sont restes
  simples : envoi de courrier lectronique au propritaire de la station
  et obtention d'informations limite. Dave travaille actuellement  les
  enrichir.

  Il faut tenir  jour quelques fichiers contenant des informations sur
  le systme et ajouter les entres adquates au fichier ax25d.conf de
  telle sorte qu'il s'excute pour les utilisateurs connects.



  1155..11..  MMiissee aauu ppooiinntt dduu ffiicchhiieerr //eettcc//aaxx2255//ppmmss..mmoottdd

  Le fichier /etc/ax25/pms.motd contient l'quivalent du message du jour
  affich aux utilisateurs aprs qu'ils se sont connects et ont reu
  l'en-tte usuel de BBS. Il s'agit d'un simple fichier texte qui sera
  transmis tel quel.


  1155..22..  MMiissee aauu ppooiinntt dduu ffiicchhiieerr //eettcc//aaxx2255//ppmmss..iinnffoo

  /etc/ax25/pms.info est galement un simple fichier texte dans lequel
  vous renseignerez des informations plus dtailles relatives  votre
  station ou  sa configuration. Ce fichier est transmis aux
  utilisateurs en rponse  la commande Info depuis l'invite PMS.


  1155..33..  AAssssoocciieerr lleess iiddeennttiiffiiaannttss AAXX..2255 aauuxx ccoommpptteess uuttiilliissaatteeuurrss

  Lors de l'envoi d'un courrier  destination d'un identifiant d'appel
  AX.25, _p_m_s s'attend  trouver une association avec une identit
  d'utilisateur usuelle sur la station. La section suivante dcrit le
  processus.


  1155..44..  AAjjoouutt ddee PPMMSS aauu ffiicchhiieerr //eettcc//aaxx2255//aaxx2255dd..ccoonnff

  L'ajout de _p_m_s au fichier ax25d.conf est trs simple. Il vous faut
  nanmoins garder un lment en tte : Dave a ajout la prise en compte
  d'arguments de ligne commande  PMS afin de grer diffrentes
  conventions de fin de ligne. AX.25 et NetRom requirent une fin de
  ligne et un saut de ligne tandis que le standard Unix comprend juste
  le caractre de fin de ligne.  Par exemple, pour une entre
  correspondant au lancement par dfaut de PMS  l'ouverture d'une
  connexion sur un port AX.25, vous ajouteriez :



       default  1  10 5 100 5   0    root  /usr/sbin/pms pms -a -o vk2ktj




  Cette ligne excute _p_m_s en lui prcisant qu'il s'agit d'une connexion
  AX.25 et que PMS a pour propritaire vk2ktj. Consultez la page de _m_a_n
  pour l'emploi d'autres mthodes de connexion.


  1155..55..  TTeesstteerr PPMMSS

  Excutez depuis la ligne de commande :

  # /usr/sbin/pms -u vk2ktj -o vk2ktj


  En remplaant votre identifiant d'appel par le mien, cela lancera pms
  en lui imposant l'emploi de la convention unix de fin de ligne et en
  donnant vk2ktj comme identit  l'utilisateur connect.

  Vous pouvez galement demander  un autre noeud de se connecter afin
  de confirmer le fonctionnement de votre ax25d.conf.


  1166..  CCoonnffiigguurraattiioonn ddeess pprrooggrraammmmeess uusseerr__ccaallll

  On trouve derrire ce nom les programmes _a_x_2_5___c_a_l_l et _n_e_t_r_o_m___c_a_l_l. Il
  s'agit de programmes trs simples destins  tre lancs par _a_x_2_5_d
  pour automatiser les connexions depuis des htes distants. On peut
  bien sr les employer dans des scripts ou via d'autres dmons tels
  _n_o_d_e.

  Ils quivalent au programme _c_a_l_l et n'effectuent aucun traitement sur
  les donnes, ce qui vous pargne le problme des conversions de fin de
  lignes.

  Un exemple pour commencer. On suppose que vous disposez d'un petit
  rseau personnel, d'une station Linux tenant lieu de passerelle radio
  et d'une autre machine -- on prendra un noeud BPQ -- qui lui est
  connecte par un lien ethernet.

  En principe, si vous voulez que les utilisateurs radio puissent
  joindre le noeud BPQ, il leur faudra le faire par l'intermdiaire de
  votre noeud Linux ou se connecter au dmon node puis tablir la
  connexion. _a_x_2_5___c_a_l_l peut simplifier le processus s'il est invoqu par
  _a_x_2_5_d.

  Prenons le cas d'un noeud BPQ d'identifiant VK2KTJ-9, la station Linux
  tant munie d'un port AX.25/ethernet nomm `bpq'. `radio' dsignera le
  port radio de la machine passerelle.

  Un enregistrement dans le fichier /etc/ax25/ax25d.conf  du type :


       [VK2KTJ-1 via radio]
       default    * * * *   *   *  *
                       root /usr/sbin/ax25_call ax25_call bpq %u vk2ktj-9




  permet aux les connexions directes  `VK2KTJ-1' qui n'est autre que le
  dmon Linux _a_x_2_5_d, celui ci les commutant automatiquement sur un lien
  AX.25  `VK2KTJ-9' via l'interface `bpq'.

  Vous pouvez essayer toutes sortes d'autres configurations. Les
  utilitaires `_n_e_t_r_o_m___c_a_l_l' et `_r_o_s_e___c_a_l_l' oprent de faon similaire.
  Un radioamateur en a fait usage pour faciliter l'accs  un BBS
  distant. En principe, on aurait d entrer  la main une chane de
  connexion dmesurment longue. Il a donc ajout une entre faisant
  apparaitre le BBS comme une entit appartenant au rseau local, _a_x_2_5_d
  servant en fait de proxy pour l'accs  la machine distante.


  1177..  CCoonnffiigguurraattiioonn ddeess ccoommmmaannddeess RRoossee UUpplliinnkk eett DDoowwnnlliinnkk

  Si vous avez l'habitude des ralisations Rose  base de ROM, vous ne
  serez pas dpays par la mthode d'appel AX.25  travers un rseau
  Rose.  Soit un noeud local d'utilisateurs Rose d'identifiant VK2KTJ-5
  et un appelant AX.25 souhaitant se connecter  VK5XXX au noeud Rose
  distant 5050882960, il lancera la commande :



       c vk5xxx v vk2ktj-5 5050 882960




  Au niveau du noeud distant, VK5XXX recevra une connexion avec
  l'identifiant des utilisateurs locaux AX.25 digipte par
  l'intermdiaire de l'identifiant des noeuds Rose distants.

  La couche protocolaire Rose de Linux ne gre pas cette fonctionnalit
  dans le noyau mais les deux applications _r_s_u_p_l_n_k et _r_s_d_w_n_l_n_k savent
  s'en charger.


  1177..11..  CCoonnffiigguurraattiioonn dd''uunnee lliiaaiissoonn RRoossee ddeesscceennddaannttee

  Afin que votre station Linux accepte un appel Rose et tablisse une
  connexion AX.25 vers une destination  l'coute de laquelle il n'est
  pas, vous devez ajouter un enregistrement  votre fichier
  /etc/ax25/ax25d.conf. En principe, cette ligne correspondra au
  comportement par dfaut pour les connexions Rose entrantes. Par
  exemple, vous tes  l'coute des demandes d'accs Rose aux
  destinations telles NODE-0 ou HEARD-0 que vous grez localement, mais
  toutes les autres connexions sont transmises  la commande _r_s_d_w_n_l_i_n_k
  sous l'hypothse qu'il s'agit d'utilisateurs AX.25.

  Une configuration typique :



       #
       {* via rose}
       NOCALL   * * * * * *  L
       default  * * * * * *  - root  /usr/sbin/rsdwnlnk rsdwnlnk 4800 vk2ktj-5
       #




  Avec cette configuration, tout appel qui effectue une connexion Rose
  sur votre noeud Linux vers une destination  l'coute de laquelle vous
  ne vous tenez pas se verra converti en une connexion AX.25 sur le port
  4800 avec VK2KTJ-5 pour chemin.


  1177..22..  CCoonnffiigguurraattiioonn dd''uunn lliiaaiissoonn RRoossee mmoonnttaannttee

  Pour que votre station Linux accepte les connexions AX.25 d'une faon
  similaire  celle du noeud Rose, vous ajouterez  votre fichier
  /etc/ax25/ax25d.conf une ligne du type :


       #
       [VK2KTJ-5* via 4800]
       NOCALL   * * * * * *  L
       default  * * * * * *  - root  /usr/sbin/rsuplnk rsuplnk rose
       #




  Notez la syntaxe particulire pour l'identifiant local. Le caractre
  `*' indique que l'application doit tre invoque si l'identifiant est
  reconnu dans le chemin de rptition d'une connexion.

  Avec cette configuration, un appel AX.25 peut tablir des appels Rose
  au moyen de la squence prsente dans l'introduction. Toute personne
  demandant un relai via l'identifiant VK2KTJ-5 sur le port AX.25 4800
  sera trait par la commande _r_s_u_p_l_n_k.


  1188..  AAssssoocciiaattiioonn ddeess iiddeennttiiffiiaannttss AAXX..2255 aauuxx ccoommpptteess uuttiilliissaatteeuurrss

  Dans de nombreuses situations, il est fortement souhaitable d'associer
  un identifiant  compte utilisateur. Par exemple lorsque plusieurs
  oprateurs radioamateurs partagent la mme machine et souhaitent
  employer leur propre identifiant lorsqu'ils effectuent des appels ou
  lorsque des utilisateurs de PMS dsirent dialoguer avec quelqu'un en
  particulier sur une station.

  Les utilitaires AX.25 permettent de raliser cette association. On l'a
  dj voqu dans la section relative  PMS mais je le rpte ici afin
  de m'assurer que vous ne passerez pas  ct.

  L'association s'effectue grce  la commande _a_x_p_a_r_m_s. Par exemple :


       # axparms -assoc vk2ktj terry




  Cette commande associe l'identifiant AX.25 vk2ktj  l'utilisateur
  terry. Tout courrier destin  vk2ktj sur _p_m_s sera transmis au compte
  Linux terry.

  Songez  mettre ces correspondances dans vos fichiers _r_c de dmarrage
  afin qu'elles soient disponibles  chaque rinitialisation.

  NNootteezz que vous ne devez surtout pas associer un identifiant au compte
  root vu que cela  pourrait poser des problmes de configuration 
  d'autres programmes.


  1199..  EEnnttrreess dduu ssyyssttmmee ddee ffiicchhiieerr //pprroocc//

  Le pseudo systme de fichiers /proc contient divers fichiers
  spcifiques aux programmes AX.25 et NetRom. Ces fichiers sont
  normalement employs par les utilitaires AX.25 mais leur formatage est
  tel qu'ils peuvent vous intresser. Le format est suffisamment simple
  pour ne pas ncessiter beaucoup d'explications.


     //pprroocc//nneett//aarrpp
         : liste des associations entre adresses IP et adresses de
        niveau MAC, qu'il s'agisse d'ethernet, d'AX.25 ou d'un autre
        protocole MAC.

     //pprroocc//nneett//aaxx2255
         : sockets AX.25 ouverts. Elles peuvent tre en attente de
        connexion ou actives.

     //pprroocc//nneett//aaxx2255__bbppqqeetthheerr
         : identifiants AX.25 de type Ethernet BPQ.

     //pprroocc//nneett//aaxx2255__ccaallllss
         : quivalences entre identits d'utilisateurs Linux et
        identifiants d'appel telles que dfinies par la commande _a_x_p_a_r_m_s
        _-_a_s_s_o_c.

     //pprroocc//nneett//aaxx2255__rroouuttee
         : informations sur les chemins AX.25

     //pprroocc//nneett//nnrr
         : sockets NetRom ouvertes. Elles peuvent tre en attente de
        connexion ou actives.

     //pprroocc//nneett//nnrr__nneeiigghh
         : liste de voisins NetRom

     //pprroocc//nneett//nnrr__nnooddeess
         : informations sur les voisins NetRom

     //pprroocc//nneett//rroossee
         : sockets Rose ouvertes. Elles peuvent tre en attente de
        connexion ou actives.

     //pprroocc//nneett//rroossee__nnooddeess
         : correspondances entre destinations et voisins Rose

     //pprroocc//nneett//rroossee__nneeiigghh
         : liste de voisins Rose

     //pprroocc//nneett//rroossee__rroouutteess
         : connexions Rose en cours


  2200..  PPrrooggrraammmmaattiioonn rrsseeaauu AAXX..2255,, NNeettRRoomm,, RRoossee

  L'avantage le plus important li  l'utilisation des protocoles par
  paquets radioamateurs du noyau rside en la facilit de dveloppement
  des programmes et applications qui les emploient.

  Bien que la programmation rseau sous Unix dborde du cadre de ce
  document, je vais dcrire les principaux lments d'utilisation des
  protocoles AX.25, NetRom et Rose au sein de vos programmes.


  2200..11..  FFaammiilllleess dd''aaddrreesssseess

  La programmation AX.25, NetRom et Rose est assez semblable  la
  programmation TCP/IP sous Linux. LEs principales diffrences se font
  au niveau des familles d'adresses et des structures d'adresse  mettre
  en place.

  Les noms de familles d'adresses pour AX.25, NetRom et Rose sont
  respectivement AF_AX.25, AF_NETROM et AF_ROSE.


  2200..22..  FFiicchhiieerrss dd''eenn--ttttee

  Incluez toujours les fichiers `ax25.h', `netrom.h' ou `rose.h' si vous
  vous servez de ces protocoles. Les dbuts de fichiers-types
  ressemblent  quelque chose du style :
  Pour AX.25 :


       #include <ax25.h>
       int s, addrlen = sizeof(struct full_sockaddr_ax25);
       struct full_sockaddr_ax25 sockaddr;
       sockaddr.fsa_ax25.sax25_family = AF_AX.25




  Pour NetRom :


       #include <ax25.h>
       #include <netrom.h>
       int s, addrlen = sizeof(struct full_sockaddr_ax25);
       struct full_sockaddr_ax25 sockaddr;
       sockaddr.fsa_ax25.sax25_family = AF_NETROM;




  Pour Rose :


       #include <ax25.h>
       #include <rose.h>
       int s, addrlen = sizeof(struct sockaddr_rose);
       struct sockaddr_rose sockaddr;
       sockaddr.srose_family = AF_ROSE;





  2200..33..  MMiissee eenn ffoorrmmee ddeess iiddeennttiiffiiaannttss eett eexxeemmpplleess

  La librairie lib/ax25.a du paquetage des utilitaires AX.25 contient
  des routines de conversion des identifiants. Vous pouvez bien sr
  crire les vtres si vous le souhaitez.

  Les programmes _u_s_e_r___c_a_l_l sont d'excellents exemples  partir desquels
  travailler. Leur source code est inclus dans les outils AX.25.  Si
  vous passez un peu de temps  les examiner, vous remarquerez
  rapidement que quatre-vingt-dix pour cent du travail consiste 
  prparer l'ouverture des sockets. En fait la connexion est rapide mais
  la mise en place prend du temps.

  Les exemples sont assez simples pour ne pas prter  confusion. Si
  vous avez des questions, adressez-vous directement  la liste de
  diffusion linux-hams o quelqu'un vous aidera srement.


  2211..  QQuueellqquueess ccoonnffiigguurraattiioonnss--ttyyppeess

  Ci-suivent des exemples de configurations parmi les plus typiques. Il
  ne s'agit que d'un guide dans la mesure o il y a autant de faons de
  configurer un rseau qu'il y a de rseaux disponibles mais il peut
  vous servir de point de dpart.


  2211..11..  UUnn ppeettiitt rrsseeaauu EEtthheerrnneett llooccaall aavveecc uunn rroouutteeuurr LLiinnuuxx vveerrss uunn
  rrsseeaauu rraaddiioo llooccaall


  Nombre d'entre vous disposent de petits rseaux locaux chez eux et
  dsirent connecter les stations de ce rseau  un rseau radio local.
  J'ai ce type de configuration chez moi. J'ai russi  obtenir un bloc
  d'adresses contigus que je gre par une route unique sur mon Ethernet
  local. Votre coordinateur IP local vous aidera si vous souhaitez
  procder ainsi. Les adresses du rseau Ethernet local forment un sous-
  ensemble des adresses radio. Voici ma configuration personnelle avec
  le routeur Linux :



                                                 .      .   .    .    . .
         -+-                                .
          | Reseau        /---------\     .    Reseau
          | 44.136.8.96/29|         |    .     44.136.8/24        \ | /
          |               | Routeur |   .                          \|/
          |               |         |  .                            |
          |          eth0 |    &    |  .  /-----\    /----------\   |
          +---------------+         +-----| TNC |----| Radio    |---/
          |   44.136.8.97 | serveur |  .  \-----/    \----------/
          |               |         | sl0
          |               |  Linux  | 44.136.8.5
          |               |         |    .
          |               |         |     .
          |               \_________/       .
         -+-                                     .      .   .    .    . .








































  #!/bin/sh
  # /etc/rc.net
  # Configuration d'un port AX.25 de type KISS et d'une interface Ethernet

  echo "/etc/rc.net"
  echo "  Configuring:"

  echo -n "    loopback:"
  /sbin/ifconfig lo 127.0.0.1
  /sbin/route add 127.0.0.1
  echo " done."

  echo -n "    ethernet:"
  /sbin/ifconfig eth0 44.136.8.97 netmask 255.255.255.248 \
                  broadcast 44.136.8.103 up
  /sbin/route add 44.136.8.97 eth0
  /sbin/route add -net 44.136.8.96 netmask 255.255.255.248 eth0
  echo " done."

  echo -n "    AX.25: "
  kissattach -i 44.136.8.5 -m 512 /dev/ttyS1 4800
  ifconfig sl0 netmask 255.255.255.0 broadcast 44.136.8.255
  route add -host 44.136.8.5 sl0
  route add -net 44.136.8.0 window 1024 sl0

  echo -n "    Netrom: "
  nrattach -i 44.136.8.5 netrom

  echo "  Routing:"
  /sbin/route add default gw 44.136.8.68 window 1024 sl0
  echo "    default route."
  echo done.

  # end




  /etc/ax25/axports


       # name  callsign        speed   paclen  window  description
       4800    VK2KTJ-0        4800    256     2       144.800 MHz




  /etc/ax25/nrports


       # name  callsign        alias   paclen  description
       netrom  VK2KTJ-9        LINUX   235     Linux Switch Port




  /etc/ax25/nrbroadcast


       # ax25_name     min_obs def_qual        worst_qual      verbose
       4800            1       120             10              1





    L'option IP_FORWARDING doit tre active dans le noyau.

    Les fichiers de configuration AX.25 correspondent essentiellement 
     ceux donns dans les sections prcdentes. Reportez-y vous si
     ncessaire.

    J'ai dcid d'attribuer au port radio une adresse qui n'appartient
     pas au bloc attribu  mon rseau local. Rien n'y obligeait et
     j'aurais d facilement y affecter l'adresse 44.136.8.97.

    44.136.8.68 correspond  ma passerelle d'encapsulation IP dans IP
     et est donc ma route par dfaut.

    Chaque station sur l'Ethernet est munie de la route suivante :


       route add -net 44.0.0.0 netmask 255.0.0.0 \
               gw 44.136.8.97 window 512 mss 512 eth0





  Les paramtres _m_s_s et _w_i_n_d_o_w me permettent d'obtenir les meilleures
  performances possibles aussi bien pour les connexions Ethernet locales
  que pour les accs radio.

    smail, http, ftp et d'autres dmons s'excutent galement sur le
     routeur qui est ainsi la seule station  fournir aux autres des
     services.

    Le routeur est un 386DX20 d'entre de gamme avec 20 Mo de disque et
     une configuration Linux minimaliste.


  2211..22..  PPaasssseerreellllee dd''eennccaappssuullaattiioonn IIPP ddaannss IIPP

  L'emploi de Linux comme passerelle d'encapsulation IP est maintenant
  courant  travers le monde. Le nouveau gestionnaire de tunnel IP
  accepte les routes multiples encapsules et rend obsolte l'ancien
  dmon _i_p_i_p.

  Un schma classique :



                                                 .      .   .    .    . .
         ---                                .
          | Reseau        /----------\     .    Reseau
          | 154.27.3/24   |          |    .     44.136.16/24       \ | /
          |               |  Linux   |   .                          \|/
          |               |          |  .                            |
          |          eth0 |          |  .  /-----\    /----------\   |
          +---------------+Passerelle+-----| TNC |----| Radio    |---/
          |   154.27.3.20 |          |  .  \-----/    \----------/
          |               |  IPIP    | sl0
          |               |          | 44.136.16.1
          |               |          |    .
          |               |          |     .
          |               \__________/       .
         ---                                     .      .   .    .    . .





  Voici les fichiers de configuration intressants :



       # /etc/rc.net
       # This file is a simple configuration that provides one KISS AX.25
       # radio port, one Ethernet device, and utilises the kernel tunnel driver
       # to perform the IPIP encapsulation/decapsulation
       #
       echo "/etc/rc.net"
       echo "  Configuring:"
       #
       echo -n "    loopback:"
       /sbin/ifconfig lo 127.0.0.1
       /sbin/route add 127.0.0.1
       echo " done."
       #
       echo -n "    ethernet:"
       /sbin/ifconfig eth0 154.27.3.20 netmask 255.255.255.0 \
                       broadcast 154.27.3.255 up
       /sbin/route add 154.27.3.20 eth0
       /sbin/route add -net 154.27.3.0 netmask 255.255.255.0 eth0
       echo " done."
       #
       echo -n "    AX.25: "
       kissattach -i 44.136.16.1 -m 512 /dev/ttyS1 4800
       /sbin/ifconfig sl0 netmask 255.255.255.0 broadcast 44.136.16.255
       /sbin/route add -host 44.136.16.1 sl0
       /sbin/route add -net 44.136.16.0 netmask 255.255.255.0 window 1024 sl0
       #
       echo -n "    tunnel:"
       /sbin/ifconfig tunl0 44.136.16.1 mtu 512 up
       #
       echo done.
       #
       echo -n "Routing ... "
       source /etc/ipip.routes
       echo done.
       #
       # end.




  et :



       # /etc/ipip.routes
       # This file is generated using the munge script
       #
       /sbin/route add -net 44.134.8.0 netmask 255.255.255.0 tunl0 gw 134.43.26.1
       /sbin/route add -net 44.34.9.0 netmask 255.255.255.0 tunl0 gw 174.84.6.17
       /sbin/route add -net 44.13.28.0 netmask 255.255.255.0 tunl0 gw 212.37.126.3
          ...
          ...
          ...




  /etc/ax25/axports




  # name  callsign        speed   paclen  window  description
  4800    VK2KTJ-0        4800    256     2       144.800 MHz




  Quelques points  noter :


    Le nouveau gestionnaire de tunnel utilise le champ _g_w de la table
     de routage  la place du paramtre _p_o_i_n_t_o_p_o_i_n_t pour fixer l'adresse
     de la passerelle IPIP distante. Il supporte ainsi plusieurs routes
     par interface.

    Vous ppoouuvveezz attribuer la mme adresse  deux interfaces rseau.
     Dans l'exemple courant, sl0 et tunl0 ont tous deux t munis de
     l'adresse IP du port Radio. La passerelle distante rcupre ainsi
     la bonne adresse de votre passerelle dans les datagrammes
     encapsuls qu'elle reoit.

    Les commandes de routage relatives aux routes encapsules peuvent
     tre gnres automatiquement via une version modifie du script
     _m_u_n_g_e incluse ci-dessous. Les instructions de routage sont crites
     dans un fichier spar et appeles par la commande source
     /etc/ipip.routes de _b_a_s_h (en supposant que vous employez les mmes
     conventions).  Le fichier source doit tre au format de commande
     route NOS.

    Remarquez l'emploi de l'argument _w_i_n_d_o_w dans la commande _r_o_u_t_e. Ce
     paramtre amliore les performances de la liaison radio.


  Le nouveau script tunnel-munge :

































  #!/bin/sh
  #
  # From: Ron Atkinson <n8fow@hamgate.cc.wayne.edu>
  #
  #  This script is basically the 'munge' script written by Bdale N3EUA
  #  for the IPIP daemon and is modified by Ron Atkinson N8FOW. It's
  #  purpose is to convert a KA9Q NOS format gateways route file
  #  (usually called 'encap.txt') into a Linux routing table format
  #  for the IP tunnel driver.
  #
  #        Usage: Gateway file on stdin, Linux route format file on stdout.
  #               eg.  tunnel-munge < encap.txt > ampr-routes
  #
  # NOTE: Before you use this script be sure to check or change the
  #       following items:
  #
  #     1) Change the 'Local routes' and 'Misc user routes' sections
  #        to routes that apply to your own area (remove mine please!)
  #     2) On the fgrep line be sure to change the IP address to YOUR
  #        gateway Internet address. Failure to do so will cause serious
  #        routing loops.
  #     3) The default interface name is 'tunl0'. Make sure this is
  #        correct for your system.

  echo "#"
  echo "# IP tunnel route table built by $LOGNAME on `date`"
  echo "# by tunnel-munge script v960307."
  echo "#"
  echo "# Local routes"
  echo "route add -net 44.xxx.xxx.xxx netmask 255.mmm.mmm.mmm dev sl0"
  echo "#"
  echo "# Misc user routes"
  echo "#"
  echo "# remote routes"

  fgrep encap | grep "^route" | grep -v " XXX.XXX.XXX.XXX" | \
  awk '{
          split($3, s, "/")
          split(s[1], n,".")
          if      (n[1] == "")        n[1]="0"
          if      (n[2] == "")        n[2]="0"
          if      (n[3] == "")        n[3]="0"
          if      (n[4] == "")        n[4]="0"
          if      (s[2] == "1")       mask="128.0.0.0"
          else if (s[2] == "2")       mask="192.0.0.0"
          else if (s[2] == "3")       mask="224.0.0.0"
          else if (s[2] == "4")       mask="240.0.0.0"
          else if (s[2] == "5")       mask="248.0.0.0"
          else if (s[2] == "6")       mask="252.0.0.0"
          else if (s[2] == "7")       mask="254.0.0.0"
          else if (s[2] == "8")       mask="255.0.0.0"
          else if (s[2] == "9")       mask="255.128.0.0"
          else if (s[2] == "10")      mask="255.192.0.0"
          else if (s[2] == "11")      mask="255.224.0.0"
          else if (s[2] == "12")      mask="255.240.0.0"
          else if (s[2] == "13")      mask="255.248.0.0"
          else if (s[2] == "14")      mask="255.252.0.0"
          else if (s[2] == "15")      mask="255.254.0.0"
          else if (s[2] == "16")      mask="255.255.0.0"
          else if (s[2] == "17")      mask="255.255.128.0"
          else if (s[2] == "18")      mask="255.255.192.0"
          else if (s[2] == "19")      mask="255.255.224.0"
          else if (s[2] == "20")      mask="255.255.240.0"
          else if (s[2] == "21")      mask="255.255.248.0"
          else if (s[2] == "22")      mask="255.255.252.0"
          else if (s[2] == "23")      mask="255.255.254.0"
          else if (s[2] == "24")      mask="255.255.255.0"
          else if (s[2] == "25")      mask="255.255.255.128"
          else if (s[2] == "26")      mask="255.255.255.192"
          else if (s[2] == "27")      mask="255.255.255.224"
          else if (s[2] == "28")      mask="255.255.255.240"
          else if (s[2] == "29")      mask="255.255.255.248"
          else if (s[2] == "30")      mask="255.255.255.252"
          else if (s[2] == "31")      mask="255.255.255.254"
          else                    mask="255.255.255.255"

  if (mask == "255.255.255.255")
          printf "route add -host %s.%s.%s.%s gw %s dev tunl0\n"\
                  ,n[1],n[2],n[3],n[4],$5
  else
          printf "route add -net %s.%s.%s.%s gw %s netmask %s dev tunl0\n"\
                  ,n[1],n[2],n[3],n[4],$5,mask
   }'

  echo "#"
  echo "# default the rest of amprnet via mirrorshades.ucsd.edu"
  echo "route add -net 44.0.0.0 gw 128.54.16.18 netmask 255.0.0.0 dev tunl0"
  echo "#"
  echo "# the end"





  2211..33..  CCoonnffiigguurraattiioonn dd''uunnee ppaasssseerreellllee dd''eennccaappssuullaattiioonn AAXXIIPP

  Nombre de passerelles Radio Amateur avec l'Internet encapsulent AX.25,
  NetRom et Rose dans IP. Le cas des trames AX.25 relve du RFC 1226
  crit par Brian Kantor. Mike Westerhof a ralis un dmon
  d'encapsulation AX.25 sous Unix en 1991. Le paquetage des utilitaires
  ax25-utils en contient une version lgrement amliore.

  Un programme d'encapsulation AXIP reoit des trames AX.25 d'un ct,
  examine la destination AX.25 afin d'en dduire l'adresse IP  laquelle
  les envoyer et les encapsule dans un datagramme TCP/IP avant de les
  mettre.  Il accepte galement les datagrammes TCP/IP qui contiennent
  des trames AX.25, extrait ces dernires et les traite comme s'il
  s'agissait de trames AX.25 reues depuis un port AX.25. La distinction
  des trames IP contenant de l'AX.25 se fait par l'intermdiaire d'un
  identifiant de protocole gal  4 (la valeur 94 est possible quoique
  dsute). Le RFC 1226 dcrit tout a en dtail.

  L'outil _a_x_2_5_i_p_d inclus dans le paquetage ax25-utils se prsente comme
  un programme grant une interface KISS, au travers de laquelle
  passeront des trames AX.25, et une interface d'adaptation TCP/IP. Il
  se configure par l'intermdiaire du fichier /etc/ax25/ax25ipd.conf.


  2211..33..11..  OOppttiioonnss ddee ccoonnffiigguurraattiioonn dd''AAXXIIPP

  _a_x_2_5_i_p_d opre dans deux modes : "digipeater" et "tnc". En mode "tnc",
  le dmon agit comme un TNC kiss. Vous lui fournissez des trames
  d'encapsulation KISS et il les transmet comme dans la configuration
  normale.  En mode "digipeater", le dmon agit comme un noeud de
  transmission AX.25.  Les diffrences entre ces deux modes sont
  subtiles.

  Vous configurez dans le fichier  cet effet les "routes" ou
  correspondances entre les identifiants AX.25 et les adresses IP des
  machines auxquelles vous dsirez galement transmettre des paquets
  AX.25. Chaque route dispose d'options qui seront expliques un peu
  plus tard.
  Voici les autres options  configurer :

  le tty du dmon _a_x_2_5_i_p_d ainsi que sa vitesse (en gnral l'extrmit
  d'un tuyau)

  l'identifiant souhait pour le mode "digipeat"

  l'intervalle beacon

  le choix entre une encapsulation AX.25 dans des datagrammes IP ou bien
  dans des datagrammes UDP/IP. L'essentiel des passerelles AXIP emploie
  une encapsulation IP mais certaines sont situes derrire des filtres
  qui ne laisseront passer que les datagrammes UDP/IP. Le choix doit
  concider avec ce qui est attendu  l'autre extrmit.


  2211..33..22..  ttyyppiiqquuee UUnn ffiicchhiieerr ddee ccoonnffiigguurraattiioonn //eettcc//aaxx2255//aaxx2255iippdd..ccoonnff

















































  #
  # fichier de configuration ax25ipd pour la station floyd.vk5xxx.ampr.org
  #
  # Transport axip. 'ip' garantit la compatibilite avec la plupart des
  # autres passerelles.
  #
  socket ip
  #
  # Mode d'operation de ax25ipd (digi ou tnc)
  #
  mode tnc
  #
  # Si digi est selectionne, vous devez definir un identifiant. Si vous avez
  # choisi tnc, l'identifiant est optionnel mais cela pourrait changer dans le
  # futur (2 identifiants pour une kiss double port).
  #
  #mycall vk5xxx-4
  #mycall2 vk5xxx-5
  #
  # En mode digi, on peut definir un alias (2 etc.).
  #
  #myalias svwdns
  #myalias2 svwdn2
  #
  # ident toutes les 540 secondes ...
  #
  #beacon after 540
  #btext ax25ip -- tncmode rob/vk5xxx -- Experimental AXIP gateway
  #
  # Port serie (ou tuyau connecte a kissattach dans mon cas)
  #
  device /dev/ttyq0
  #
  # Vitesse du peripherique
  #
  speed 9600
  #
  # niveau de log 0 - pas de sortie
  # niveau de log 1 - informations de configuration
  # niveau de log 2 - evenements majeurs et erreurs
  # niveau de log 3 - evenements majeurs, erreurs et suivi des trames AX.25
  # niveau de log 4 - tout
  # niveau de log 0 pour le moment
  #
  loglevel 2
  #
  # En mode digi, on peut avoir un veritable tnc. param permet de passer les
  # parametres tnc.
  #
  #param 1 20
  #
  # Adresses de broadcast. Chaque adresse figurant dans la liste sera relayee
  # vers une des routes munies de l'indicateur idoine.
  #
  broadcast QST-0 NODES-0
  #
  # Definition des routes AX.25. Autant que necessaires
  # Format :
  # route <id destination> <ip destination> [indicateur]
  #
  # Indicateurs valides :
  #         b  - broadcast
  #         d  - route par defaut
  #
  route vk2sut-0 44.136.8.68 b
  route vk5xxx 44.136.188.221 b
  route vk2abc 44.1.1.1
  #
  #





  2211..33..33..  EExxccuutteerr aaxx2255iippdd


      CCoommmmeenncceezz ppaarr mmeettttrree eenn ppaallccee llee ffiicchhiieerr /etc/ax25/axports


          # /etc/ax25/axports
          #
          axip    VK2KTJ-13       9600    256     AXIP port
          #





      EExxccuutteezz _k_i_s_s_a_t_t_a_c_h ppoouurr ccrreerr llee ppoorrtt ::


          /usr/sbin/kissattach /dev/ptyq0 axip





      LLaanncceezz _a_x_2_5_i_p_d ::


          /usr/sbin/ax25ipd &





      TTeesstteezz llaa lliiaaiissoonn AAXXIIPP ::


          call axip vk5xxx






  2211..33..44..  RReemmaarrqquueess ccoonncceerrnnaanntt cceerrttaaiinnss iinnddiiccaatteeuurrss ddeess rroouutteess

  "route" met en place les destinations d'envoi de vos trames AX.25
  encapsules. Lorsque le dmon _a_x_2_5_i_p_d reoit un paquet sur son
  interface, il compare l'identifiant de destination avec chacun de ceux
  prsents dans sa table de routage. S'il trouve une correspondance, le
  paquet est alors encapsul dans un datagramme IP et transmis  l'hte
  spcifi.

  Deux indicateurs peuvent tre ajouts  n'importe quelle route du
  fichier ax25ipd.conf :

     bb  tout trafic  destination d'une adresse repre par le mot-clef
        "broadcast" doit transiter par cette route.

     dd  tout paquet ne correspondant  aucune autre route doit suivre ce
        chemin.

  L'indicateur de broadcast est trs utile puisqu'il permet l'envoi
  d'informations  destination de toutes les stations vers des stations
  AXIP : les routes axip fonctionnent normalement en point--point et
  sont incapables de grer des paquets de diffusion gnrale.


  2211..44..  LLiieerr NNOOSS  LLiinnuuxx aauu mmooyyeenn dd''uunn ppiippee

  De nombreuses personnes aiment se servir de NOS sous Linux en raison
  de la richesse fonctionnelle et de la facilit d'emploi auxquelles il
  les a habitues. La plupart d'entre eux souhaitent que leur version de
  NOS puisse dialoguer avec le noyau Linux de faon  offrir certaines
  des possibilits de Linux aux radio-utilisateurs de NOS.

  Brandon S. Allbery, alias KF8NH, a fourni les informations qui suivent
  relatives  l'interconnexion de NOS avec le noyau Linux par
  l'intermdiaire de tuyaux (pipe).

  Linux et NOS grant tous deux le protocole SLIP, il est possible de
  les relier au moyen d'une liaison slip. Vous pourriez le faire grce 
  deux ports srie et  un cble null-modem mais ce serait aussi coteux
  qu'inefficace. Comme d'autres systmes de type Unix, Linux dispose de
  tuyaux dits `pipes' (prononcer paillepeu). Il s'agit de pseudo-
  priphriques qui mulent le comportement de tty usuels du point de
  vue des logiciels en redirigeant le flux vers d'autres tuyaux. Pour
  les utiliser, un programme doit d'abord ouvrir l'extrmit mmaattrree d'un
  tuyau aprs quoi un second programme peut ouvrir la terminaison
  eessccllaavvee. Lorsque les deux bouts sont ouverts, les programmes peuvent
  communiquer l'un avec l'autre en crivant des caractres dans les
  tuyaux comme s'il s'agissait de terminaux usuels.

  Pour employer les tuyaux entre NOS et Linux, vous devez d'abord
  choisir un tuyau. Le rpertoire /dev en regorge : les extrmits
  matres se nomment ptyq[1-f] et celles esclaves ttyq[1-f].  Gardez 
  l'esprit qu'elles fonctionnent par paires et que si vous utilisez
  /dev/ptyqf  un bout, vous devrez employer /dev/ttyqf  l'autre.

  Une fois le tuyau choisi, vous allouez la terminaison matre  Linux
  et l'esclave  NOS (le noyau dmarre le premier et l'extrmit matre
  doit tre la premire ouverte). N'oubliez pas que le noyau Linux doit
  tre muni d'une adresse IP diffrente de celle de NOS. A mettre en
  place si ce n'est pas dj le cas.

  Le tuyau se configure comme un priphrique srie. Pour une liaison
  slip, les commandes  excuter seront donc du type :



       # /sbin/slattach -s 38400 -p slip /dev/ptyqf &
       # /sbin/ifconfig sl0 broadcast 44.255.255.255 pointopoint 44.70.248.67 /
               mtu 1536 44.70.4.88
       # /sbin/route add 44.70.248.67 sl0
       # /sbin/route add -net 44.0.0.0 netmask 255.0.0.0 gw 44.70.248.67




  Dans cet exemple, le noyau Linux dispose de l'adresse 44.70.4.88 et
  NOS de l'adresse 44.70.248.67. La commande _r_o_u_t_e de la dernire ligne
  indique simplement au noyau Linux qu'il doit router tous les
  datagrammes  destination d'amprnet via le lien slip cr par la
  commande _s_l_a_t_t_a_c_h. Vous pouvez par exemple copier ces commandes dans
  le fichier /etc/rc.d/rc.inet2 (selon votre installation) aprs toutes
  les autres commandes de configuration rseau afin que la liaison slip
  apparaisse automatiquement  la rinitialisation du systme.
  Remarque : on ne gagne rien  utiliser _c_s_l_i_p au lieu de _s_l_i_p. Au
  contraire, les performances diminuent de par la nature purement
  virtuelle du lien (on passe plus de temps  compresser les en-ttes
  qu' transmettre toutes les donnes).

  Essayez les commandes suivantes pour configurer la terminaison du ct
  NOS :



       # you can call the interface anything you want; I use "linux" for convenience.
       attach asy ttyqf - slip linux 1024 1024 38400
       route addprivate 44.70.4.88 linux




  Ces commandes crent un port slip nomm `linux' sur l'extrmit
  esclave du tuyau et ajoutent une route qui y pointe. Une fois NOS
  dmarr, vous devriez pouvoir excuter des ping et des telnet de NOS
  vers Linux et vice-versa. Si ce n'est pas le cas, vrifiez encore une
  fois que vous ne vous tes tromp nulle part, surtout au niveau des
  adresses et des tuyaux.


  2222..  OO ttrroouuvveerr ddee ll''iinnffoorrmmaattiioonn ssuurr...... ??

  Ce document suppose une certaine exprience de la transmission paquets
  par radio, et, comme ce n'est pas forcment le cas, j'ai regroup un
  ensemble de rfrences  d'autres informations utiles.



  2222..11..  TTrraannssmmiissssiioonn ppaaqquueettss ppaarr rraaddiioo

  Vous trouverez des informations gnrales sur la transmission paquets
  par radio sur les sites suivants :

  American Radio Relay League <http://www.arrl.org/>,

  Radio Amateur Teleprinter Society <http://www.rats.org/>

  Tucson Amateur Packet Radio Group <http://www.tapr.org/>



  2222..22..  DDooccuummeennttaattiioonn ssuurr lleess pprroottooccoolleess


  AX.25, NetRom - Jonathon Naylor a regroup de nombreux documents sur
  le sujet qui sont disponibles via : ax25-doc-1.0.tar.gz
  <ftp://ftp.pspt.fi/pub/ham/linux/ax25/ax25-doc-1.0.tar.gz>



  2222..33..  DDooccuummeennttaattiioonn ssuurr llee mmaattrriieell


  Informations sur la carte PPII22 : Ottawa Packet Radio Group
  <http://hydra.carleton.ca/>.

  Informations sur le matriel BBaayyccoomm : Baycom Web Page
  <http://www.baycom.de/>.

  2233..  GGrroouuppeess ddee ddiissccuussssiioonn rraaddiiooaammaatteeuurrss eett LLiinnuuxx

  Il existe plusieurs endroits o parler de Linux ou de radio
  amateurisme.  Par exemple dans les groupes de discussion
  comp.os.linux.*, sur la liste de diffusion HAMS de vger.rutgers.edu.
  Mentionnons galement la liste tcp-group sur ucsd.edu (origine des
  discussions TCP/IP radio amateur) et le canal #linpeople sur le rseau
  irc linuxnet.

  Pour vous abonner  la liste de diffusion Linux lliinnuuxx--hhaammss, envoyez un
  courrier  :


       Majordomo@vger.rutgers.edu




  avec dans le corps du message la ligne suivante :


       subscribe linux-hams




  La ligne de sujet sera ignore.

  La liste de diffusion lliinnuuxx--hhaammss est archive aux adresses :

  zone.pspt.fi <http://hes.iki.fi/archive/linux-hams/> et :
  zone.oh7rba.ampr.org <http://zone.oh7rba.ampr.org/archive/linux-
  hams/>.  Les dbutants sont pris de commencer par utiliser les
  archives. Celles-ci contiennent des rponses  l'essentiel des
  questions courantes.


  Pour souscrire  la liste tcp-group, envoyez un courrier  l'adresse :


       listserver@ucsd.edu




  avec dans le corps du message la ligne :


       subscribe tcp-group




  RReemmaarrqquuee :: n'oubliez pas que tcp-group a pour thme les discussions
  autour de l'emploi des protocoles volus parmi lesquels figure
  TCP/IP.  _L_e_s _q_u_e_s_t_i_o_n_s _s_p__c_i_f_i_q_u_e_s _ _L_i_n_u_x _n_'_y _o_n_t _n_o_r_m_a_l_e_m_e_n_t _p_a_s
  _l_e_u_r _p_l_a_c_e_.


  2244..  RReemmeerrcciieemmeennttss

  Les personnes dont les noms suivent ont contribu  l'laboration de
  ce document (l'ordre n'a pas d'importance): Jonathon Naylor, Thomas
  Sailer, Joerg Reuter, Ron Atkinson, Alan Cox, Craig Small, John
  Tanner, Brandon Allbery, Hans Alblas, Klaus Kudielka, Carl Makin.

  2255..  CCooppyyrriigghhtt..

  Copyright (c) 1996 Terry Dawson.

  La distribution de ce document doit se conformer aux termes de la
  licence LDP tels que dfinis  l'adresse :
  sunsite.unc.edu/LDP/COPYRIGHT.html.



























































  L'acces a Linux : HOWTO
  Michael De La Rue,  <access-howto@ed.ac.uk>
  Traduit par Olivier Tharan, Olivier.Tharan@int-evry.fr
  v2.11, 28 mars 1997

  Le HOWTO Acces a Linux couvre l'utilisation des technologies adaptives
  avec Linux, en particulier l'utilisation  des  technologies  adaptives
  pour  rendre Linux accessibles a ceux qui ne pourraient pas l'utiliser
  autrement. Il couvre aussi des domaines dans lesquels on peut utiliser
  Linux au moyen de technologies adaptives plus generales.

  11..  IInnttrroodduuccttiioonn

  Le  but  de  ce document est de servir d'introduction aux technologies
  disponibles pour permettre l'utilisation de Linux aux personnes qui, a
  cause  d'une  incapacite,  auraient  des  problemes  a  l'utiliser. En
  d'autres mots, les groupes cibles de la technologie sont les aveugles,
  les  deficients  visuels,  les  sourds  et  les  personnes handicapees
  physiques. Les technologies ou autres informations seront ajoutees  au
  fur et a mesure de leur decouverte.

  Ces informations ne sont pas seulement destinees a ces personnes (bien
  que ce soit sans doute le but principal) mais aussi pour permettre aux
  developpeurs de Linux de prendre conscience des difficultes impliquees
  la-dedans. Le plus gros probleme est probablement que, pour l'instant,
  tres  peu  de  developpeurs Linux sont conscients des problemes et des
  nombreuses facons simples pour faciliter la vie des  implementeurs  de
  ce  systeme.  Ceci  a,  cependant,  change  considerablement depuis la
  naissance de ce document, au moins en partie grace a ce document, mais
  aussi  en plus grande partie grace au travail de certains developpeurs
  devoues, dont de nombreux sont mentionnes dans  les  remerciements  du
  document.

  Envoyez  tout  commentaire  ou information supplementaire ou offres de
  soutien a <access-howto@ed.ac.uk>. Cette adresse pourrait devenir  une
  liste de distribution dans le futur, ou etre passee automatiquement au
  futur mainteneur de ce HOWTO, alors veuillez ne pas l'utiliser pour du
  courrier personnel.

  Je  n'ai  pas  le  temps  de  suivre  le  developpement  dans tous les
  domaines. Je ne lirai probablement pas un courrier  avant  d'avoir  le
  temps   de  mettre  ce  document  a  jour.  Ils  sont  toujours  recus
  gracieusement. Si un courrier est envoye sur les listes blind-list  ou
  access-list,  je  les  _l_i_r_a_i  finalement  et mettrai toute information
  utile dans le document.  Sinon, veuillez envoyer une copie de tout  ce
  qui peut etre interessant a l'adresse electronique ci-dessus.

  On peut envoyer le courrier normal a

       Linux Access HOWTO
       23 Kingsborough Gardens
       Glasgow G12 9NH
       Scotland
       U.K.

  Et celui-ci fera petit a petit son chemin autour du monde jusqu'a moi.
  Le courrier electronique sera plus rapide de quelques semaines.

  On peut me contacter personnellement  en  utilisant  <miked@ed.ac.uk>.
  Puisque  je  filtre  automatiquement  tout  le courrier que je recois,
  veuillez utiliser l'autre adresse sauf  pour  du  courrier  personnel.
  Ceci risque plus de mener a une reponse appropriee.

  11..11..  PPoolliittiiqquuee ddee ddiissttrriibbuuttiioonn

       Le ACCESS-HOWTO est copyright (c) 1996 Michael De La Rue

       Le ACCESS-HOWTO peut etre distribue, a votre guise, soit sous les ter-
       mes de la licence publique du GNU (GPL) version 2 ou plus,  soit  sous
       les  termes  du  projet  de  documentation  Linux  (LDP). Ces licences
       devraient etre disponibles a l'endroit ou vous avez  eu  ce  document.
       Veuillez noter que puisque les termes du LDP n'autorisent pas la modi-
       fication (autre que la  traduction),  les  versions  modifiees  seront
       soumises de fait a la GPL.

  22..  CCoommppaarraaiissoonn eennttrree LLiinnuuxx eett lleess aauuttrreess ssyysstteemmeess dd''eexxppllooiittaattiioonn

  22..11..  CCoommppaarraaiissoonn GGeenneerraallee

  Le meilleur endroit pour en parler est dans des documents tels que 'La
  Feuille  d'Informations  Linux', la 'Meta FAQ Linux' et la 'FAQ Linux'
  (voir la section ``Documentation Linux''). Les raisons  majeures  pour
  une  personne  malvoyante  d'utiliser  Linux  inclueraient  le  reseau
  integre qui donne un acces complet a Internet. De facon plus generale,
  les  utilisateurs  sont  attires  par l'environnement de developpement
  complet inclus.  De  plus,  a  l'inverse  de  la  plupart  des  autres
  environnements  graphiques modernes, l'interface graphique de Linux (X
  Window) est clairement separee de l'environnement  sous-jacent  et  il
  existe   un   ensemble   complet  de  programmes  modernes  comme  des
  navigateurs Web et des logiciels de fax qui  fonctionnent  directement
  dans un environnement non graphique. Ceci augmente les possibilites de
  fournir des chemins d'acces differents aux fonctionnalites du  systeme
  ;  Emacspeak en est un bon exemple.

  Pour  d'autres  utilisateurs,  la  comparaison  est probablement moins
  favorable  et  moins  claire.  Les  gens  qui  ont  des  besoins  tres
  specifiques  et  complexes  trouveront que le systeme de developpement
  complet permet des solutions proprement personnalisees. Cependant,  la
  plupart  des logiciels existant sur d'autres systemes commence juste a
  etre disponible.  Cependant, le developpement s'etend  dans  quasiment
  toutes les directions.

  22..22..  DDiissppoonniibbiilliittee ddee llaa tteecchhnnoollooggiiee aaddaappttiivvee

  Il n'y a rien qui soit disponible dans le commerce _s_p_e_c_i_f_i_q_u_e_m_e_n_t pour
  Linux. Il y a un nombre remarquable de logiciels gratuits qui seraient
  utiles  en  adaptation,  par  exemple un synthetiseur vocal gratuit et
  quelques logiciels de controle  vocaux  gratuits.  Il  y  a  aussi  un
  certain  nombre  de paquetages gratuits qui fournissent un bon support
  pour les terminaux Braille, par exemple.

  22..33..  UUssaaggee pprraattiiqquuee

  Linux a un grand avantage par rapport a Windows : la  plupart  de  ses
  logiciels  sont  orientes vers la ligne de commande. Ceci est en train
  de  changer  et  presque  tout  est  maintenant  disponible  avec  une
  interface graphique. Cependant, parce que c'est a l'origine un systeme
  d'exploitation de programmeurs, on  ecrit  encore  des  programmes  en
  ligne  de  commande  qui  couvrent presque tous les centres d'interet.
  Pour les handicapes physiques, ceci veut  dire  qu'il  est  facile  de
  construire  des  programmes specialises pour repondre a leurs besoins.
  Pour  les  malvoyants,  ceci   devrait   rendre   l'utilisation   d'un
  synthetiseur  vocal  ou  d'un terminal Braille facile et utile dans le
  futur proche.

  Le systeme de  consoles  virtuelles  multiples  de  Linux  le  rendent
  pratique  a  utiliser comme systeme d'exploitation multitaches par une
  personne malvoyante travaillant directement avec le Braille.

  Le systeme de  fenetrage  utilise  par  Linux  (X11)  est  livre  avec
  beaucoup   d'outils  de  programmation,  et  devrait  etre  adaptable.
  Cependant, en pratique, les programmes  adaptifs  disponibles  jusqu'a
  present  ont  ete plus primitifs que ceux sur le Macintosh ou Windows.
  Ils  sont,  cependant,  completement  gratuits  (contrairement  a  des
  centaines de francs) et leur qualite s'ameliore vraiment.

  En  principe  il  devrait  etre  possible d'assembler un systeme Linux
  complet et utilisable pour une personne handicapee visuellement pour a
  peu  pres  500  $  (un  PC  de base, peu cher + une carte son). Ceci a
  comparer a  plusieurs  milliers  de  dollars  pour  d'autres  systemes
  d'exploitation  (logiciel  de  lecture  d'ecran / materiel de synthese
  vocale). Je dois encore voir ca.  Je  doute  que  cela  fonctionne  en
  pratique  car  les synthetiseurs vocaux disponibles pour Linux ne sont
  pas suffisamment bons.  Pour  une  personne  handicapee  physique,  la
  limitation viendra tout de meme de la depense en materiel de saisie.

  33..  MMaallvvooyyaannttss

  J'utiliserai deux categories ici. Les gens qui voient partiellement et
  ont besoin d'aide pour voir / dechiffrer / suivre le texte et ceux qui
  sont incapables d'utiliser une quelconque interface visuelle.

  33..11..  VVooiirr ll''eeccrraann aavveecc uunnee vviissiioonn bbaassssee

  Il y a beaucoup de problemes differents. Souvent l'agrandissement peut
  etre utile, mais ce n'est pas tout. Certaines personnes ne peuvent pas
  suivre  un  mouvement, d'autres ne peuvent pas trouver le curseur sauf
  s'il bouge. Ceci fait appel a une  panoplie  de  techniques,  dont  la
  plupart sont en cours d'ajout a X.

  33..11..11..  SSVVGGAATTeexxttMMooddee

  Ce  programme  est utile pour ameliorer la visibilite de l'ecran texte
  normal que fournit Linux. L'ecran normal fourni par Linux  affiche  80
  caracteres  de large sur 25 lignes. On peut changer ceci (et ameliorer
  la qualite des caracteres) en utilisant  SVGATextMode.  Il  permet  un
  acces  complet  aux  modes  possibles  d'une carte graphique SVGA. Par
  exemple, on peut rendre le texte plus  large  pour  que  seulement  50
  caracteres par 15 apparaissent a l'ecran. Il n'y a pas de moyen simple
  de zoomer sur des parties de l'ecran, mais vous pouvez  redimensionner
  au besoin.

  33..11..22..  SSyysstteemmee XX WWiinnddooww

  Pour les personnes qui peuvent voir l'ecran, il y a de bien nombreuses
  facons d'ameliorer X Window. Elles ne se  combinent  pas  encore  pour
  former  un  ensemble  coherent  de possibilites, mais peuvent resoudre
  bien des problemes si on les configure correctement.

  33..11..22..11..  DDiiffffeerreenntteess rreessoolluuttiioonnss dd''eeccrraann

  On  peut  configurer  le  serveur  X  avec  beaucoup  de   resolutions
  differentes.   La  frappe d'une simple touche peut alors changer entre
  celles-ci, permettant de voir un texte difficile a lire.

  Dans le fichier /etc/XF86config, vous avez une entree dans la  section
  Screen  avec  une ligne commencant par Modes. Si, par exemple, vous la
  mettez a :

       Modes       "1280x1024" "1024x768" "800x600" "640x480" "320x240"

  avec chaque mode configure correctement (ce qui  demande  un  moniteur
  assez  bon  pour la plus haute resolution), vous serez capable d'avoir
  quatre agrandissements d'ecran,  en  changeant  entre  les  differents
  niveaux avec :

  Ctrl + Alt + Pave-Plus et Ctrl + Alt + Pave-Moins

  Bouger  la souris autour de l'ecran vous fera glisser vers des parties
  differentes de l'ecran.  Pour  plus  de  details  sur  la  maniere  de
  configurer  ceci, vous devriez voir la documentation qui vient avec le
  serveur X XXFFrreeee8866.

  33..11..22..22..  AAggrraannddiisssseemmeenntt ddee ll''eeccrraann

  Il y a plusieurs programmes connus pour l'agrandissement d'ecran, xmag
  qui agrandira une partie de l'ecran autant que desire mais il est tres
  primitif. Un autre est xzoom. Je viens de dire qu'il  devait  y  avoir
  mieux que xmag, le voila. Voyez la section ``xzoom''.

  Un  autre  programme  disponible est puff. Celui-ci est specifiquement
  destine  aux  utilisateurs  deficients   visuels.   Il   fournit   des
  caracteristiques telles qu'une boite autour du pointeur pour le situer
  plus facilement. D'autres caracteristiques interessantes de puff  font
  que,  s'il est configure correctement, il est possible de selectionner
  et d'agrandir des portions de l'ecran  en  meme  temps  qu'elles  sont
  mises a jour. Cependant, il semble y avoir des interactions entre puff
  et le gestionnaire de fenetres qui  pourraient  le  rendent  difficile
  d'utilisation. Quand je l'ai utilise avec ma configuration fvwm, il ne
  repondait  pas  du  tout  a  mes  frappes   de   touches.   Cependant,
  l'utilisation de twm a ameliore la situation.

  Le  dernier  programme que j'ai vu fonctionner est dynamag. Celui-ci a
  aussi des avantages specifiques comme la possibilite  de  selectionner
  une   partie   specifique   de   l'ecran   et  de  la  surveiller,  en
  rafraichissant  l'affichage  agrandi  a  intervalles  reguliers  entre
  quelques dixiemes de seconde et vingt secondes. dynamag fait partie de
  la distribution UnWindows. Voyez ``'' pour plus de details.

  33..11..22..33..  CChhaannggeerr llaa ffoonnttee eeccrraann

  Les fontes ecran pour tout logiciel X proprement  ecrit  doivent  etre
  modifiables.  Vous pouvez simplement les rendre assez grandes pour que
  vous puissiez les lire. On fait generalement ceci en mettant une ligne
  dans  le  fichier  .Xdefaults  qui  devrait etre dans votre repertoire
  personnel. En mettant les lignes correctes dans celui-ci, vous  pouvez
  changer la fonte de vos programmes, par exemple :

  Emacs.font: -sony-fixed-medium-r-normal--16-150-75-75-c-80-iso8859-*

  Pour  voir  quelles  fontes  sont  disponibles,  utilisez le programme
  xfontsel sous X.

  Il devrait y avoir un moyen de changer les choses  a  un  niveau  plus
  fondamental  pour  que  tout ressorte avec une fonte agrandie. On peut
  realiser ceci en renommant les fontes, et  en  disant  aux  programmes
  generateurs  de  fontes  d'utiliser un niveau d'echelles different. Si
  quelqu'un reussit a faire tourner ceci proprement, qu'il m'envoie  les
  details du processus.

  33..11..22..44..  CCuurrsseeuurrss eenn ccrrooiixx,, eettcc..

  Pour  les  gens  qui  ont  des problemes a suivre les curseurs, il y a
  beaucoup de choses qui peuvent aider :

  +o  les curseurs en croix (une ligne verticale et une autre horizontale
     a partir du bord de l'ecran) ;

  +o  des curseurs clignotants (qui clignotent en pressant une touche).

  Aucun  logiciel a ma connaissance ne fournit specifiquement de curseur
  en croix. puff, mentionne dans la section precedente fournit cependant
  une  boite  clignotante  autour  du curseur qui peut rendre ce dernier
  beaucoup plus facile a situer.

  Pour l'instant le mieux qui puisse etre fait est de changer l'image du
  curseur. Fabriquez un fichier bitmap comme vous voulez, et un autre de
  la meme taille, mais completement noir. Convertissez-les au format XBM
  et lancez

          xsetroot -cursor curseur.xbm bitmap-noir.xbm

  En fait, si vous comprenez les masques, le fichier noir n'a pas besoin
  d'etre  completement  noir,  mais  commencez  avec  ca.   Le   fichier
  .Xdefaults  controle  les  curseurs  utilises  par les applications en
  cours. Pour avoir beaucoup plus d'informations, veuillez consulter  le
  mini HOWTO X Big Cursor, de Joerg Schneider, <schneid@ira.uka.de>

  33..11..33..  SSoonnoorriissaattiioonn

  En  supposant  que  l'utilisateur  puisse  entendre,  la communication
  sonore peut etre tres utile pour faire  un  environnement  de  travail
  plus  sympathique  et  agreable. Pour une personne a la vue basse, les
  indices sonores peuvent servir a aider  a  situer  le  pointeur  (voir
  ``UnWindows'').  Pour  un  utilisateur  en  mode  console  qui utilise
  Emacspeak  (voir  ``Emacspeak''),  les  icones   sonores   disponibles
  fourniront une souplesse tres utile.

  La  configuration  du  son sous Linux est couverte dans le HOWTO Linux
  Sound  (voir  ``Linux  Documentation'').  Une  fois  que  le  son  est
  installe, on peut jouer des sons avec la commande play include dans de
  nombreuses versions de Linux.  C'est  la  maniere  dont  j'utilise  ma
  version de UnWindows.

  33..11..44..  PPrroodduuiirree uunnee iimmpprreessssiioonn llaarrggee

  Utiliser  une  impression  large  avec  Linux est assez facile. Il y a
  plusieurs techniques.

  33..11..44..11..  LLaaTTeeXX // TTeeXX

  LaTeX est un systeme de preparation de documents extremement puissant.
  On  peut  l'utiliser  pour  produire des documents imprimes en gros de
  n'importe quelle sorte.  Bien  qu'il  soit  quelque  peu  complique  a
  apprendre,  beaucoup  de  documents  sont  produits  avec  LaTeX ou le
  programme de mise en page sous-jacent, TeX.

  Ceci produira du texte raisonnablement grand :

       \font\magnifiedtenrm=cmr10 at 20pt  % mettre une grande fonte
       \magnifiedtenrm
       voici du grand texte
       \bye

  Pour plus de details, voyez  un  livre  LaTeX  disponible  dans  toute
  librairie  informatique.  Il y a aussi un grand nombre d'introductions
  disponibles sur Internet.

  33..11..55..  SSoorrttiirr dduu tteexxttee llaarrggee

  Quasiment toutes les impressions sous Linux utilisent  PostScript,  et
  Linux peut piloter presque n'importe quelle imprimante en l'utilisant.
  Je sors des textes d'apprentissage larges en utilisant une  imprimante
  matricielle Epson normale.

  Pour  les  utilisateurs  de X, il y a plusieurs outils disponibles qui
  peuvent produire du texte large. Ceux-ci comprennent LyX, et  beaucoup
  de traitements de texte commerciaux.

  33..22..  AAiiddeess ppoouurr cceeuuxx qquuii nnee ppeeuuvveenntt ppaass uuttiilliisseerr ddee ssoorrttiiee vviissuueellllee

  Pour quelqu'un qui est  completement  incapable  d'utiliser  un  ecran
  normal, il y a deux alternatives : le Braille et la parole. Evidemment
  pour les gens qui ont aussi perdu l'ouie, la parole n'est pas toujours
  utile, de sorte que le Braille sera toujours important.

  Si  vous pouvez choisir, lequel choisir ? Ceci fait l'objet d'un debat
  _v_i_g_o_u_r_e_u_x. La parole est rapide d'utilisation, relativement bon marche
  et  vraiment  bonne pour les applications textuelles (par exemple lire
  un long document  comme  celui-ci).  Les  problemes  sont  d'avoir  un
  environnement  calme,  peut-etre  des  ecouteurs  pour travailler sans
  deranger les autres et  eviter  d'etre  ecoute  par  les  autres  (non
  disponible pour tous les synthetiseurs vocaux).

  Le  Braille  est  meilleur  pour les applications ou un positionnement
  precis est important (par exemple les tableurs). Il  peut  aussi  etre
  utile pour verifier le debut d'une phrase quand vous arrivez a la fin.
  Le Braille est, cependant, bien plus cher et plus lent  pour  lire  du
  texte.  Evidemment,  plus  vous  utilisez  le  Braille, plus vous etes
  rapide. Le Braille Niveau II est difficile a  apprendre,  mais  ca  en
  vaut  certainement  la  peine puisque c'est beaucoup plus rapide. Ceci
  veut dire  que  si  vous  n'utilisez  pas  le  Braille  pendant  assez
  longtemps,  vous  ne  pourrez  jamais decouvrir son plein potentiel et
  decider. De toute  facon,  j'en  ai  assez  dit  sur  ce  sujet  assez
  controverse.

  base sur l'original par James Bowden <jrbowden@bcs.org.uk>

  33..22..11..  TTeerrmmiinnaauuxx BBrraaiillllee

  Les  terminaux  Braille contiennent generalement une ou deux lignes de
  Braille.   Puisqu'ils  font  au  plus  80  caracteres  de  large,   et
  normalement  40,  ils  sont  quelque peu limites. J'en connais de deux
  sortes :

  +o  les terminaux Braille pilotes par materiel ;

  +o  les terminaux Braille pilotes par logiciel.

  La premiere sorte ne fonctionne que quand  l'ordinateur  est  en  mode
  texte   et   lit  la  memoire  ecran  directement.  Voyez  la  section
  ``Terminaux Braille pilotes par materiel''.

  La seconde sorte de terminaux  Braille  est  similaire,  en  bien  des
  facons,   a   un   ecran   de   terminal  normal  que  Linux  supporte
  automatiquement. Malheureusement, ils ont besoin de logiciels speciaux
  pour les rendre utilisables.

  Il  y  a  deux  paquetages  qui  aident  a  cela.  Le premier, BRLTTY,
  fonctionne avec plusieurs sortes d'afficheurs Braille et  les  auteurs
  peuvent  en  supporter  plus  au fur et a mesure qu'ils obtiennent les
  informations. En ce moment BRLTTY supporte les modeles CombiBraille de
  Tieman B.V., les modeles ABT3 de Alva B.V. et les modeles PowerBraille
  et Navigator de Telesensory Systems Inc. L'utilisation du Braille Lite
  de  Blazie Engineering comme afficheur Braille est decouragee, mais le
  support peut etre renouvele sur demande.  Voyez la section ``Terminaux
  Braille logiciels''.

  L'autre  paquetage dont j'ai connaissance est Braille Enhanced Screen.
  Il est fait pour fonctionner sur  d'autres  systemes  Unix  comme  sur
  Linux. Ceci devrait autoriser l'acces pour l'utilisateur a un terminal
  Braille avec beaucoup de possibilites utiles comme la  possibilite  de
  lancer des programmes differents dans differents _t_e_r_m_i_n_a_u_x _v_i_r_t_u_e_l_s en
  meme temps.

  33..22..22..  SSyynntthheessee vvooccaallee

  Les synthetiseurs vocaux prennent (normalement) du texte ASCII  et  le
  convertissent en vraie sortie parlee. Il est possible de les installer
  de maniere  soit  materielle  soit  logicielle.  Malheureusement,  les
  synthetiseurs vocaux gratuits pour Linux ne sont, parait-il, pas assez
  bons comme seul moyen de sortie.

  Les synthetiseurs vocaux materiels sont  l'alternative.  Le  principal
  que  je  connaisse  qui  fonctionne est DECtalk de Digital, pilote par
  emacspeak. Cependant,  a  ce  jour  (mars  1997)  un  pilote  pour  le
  synthetiseur  Doubletalk  a  ete  annonce. Utiliser l'acces complet de
  emacspeak pour l'ensemble des possibilites de Linux est assez  facile.
  Ceci  comprend  l'utilisation  normale du shell, d'un navigateur World
  Wide Web et de beaucoup d'autres  possibilites  similaires,  comme  le
  courrier electronique. Bien qu'il n'agisse que comme un simple lecteur
  de texte (similaire a celui d'IBM pour le PC) quand  il  controle  des
  programmes  qu'il  ne  comprend  pas, avec ceux qu'il comprend il peut
  fournir  des  controles  bien  plus  sophistiques.  Voyez  la  section
  ``Emacspeak'' pour plus d'informations sur emacspeak.

  33..22..33..  MMaanniippuulleerr llaa ssoorrttiiee ccoonnssoollee

  Quand  il  demarre,  Linux  pour  l'instant  affiche tous ses messages
  directement sur l'ecran normal (visuel). Ceci pourrait etre change  si
  quelqu'un  avec un niveau de base en programmation du noyau voulait le
  faire. Ceci veut  dire  qu'il  est  impossible  pour  la  plupart  des
  peripheriques Braille d'obtenir des informations sur ce que fait Linux
  avant que le systeme d'exploitation fonctionne completement.

  C'est seulement a cette etape que vous pouvez  demarrer  le  programme
  dont  vous avez besoin pour l'acces. Si on utilise le programme BRLTTY
  et on le lance tres tot dans le processus de demarrage, alors a partir
  de la on pourra lire les messages de l'ecran. La plupart des materiels
  et logiciels devront  tout  de  meme  attendre  que  le  systeme  soit
  completement  pret.  Ceci  rend  l'administration  d'un  systeme Linux
  difficile, mais pas impossible pour une personne mal-voyante. Une fois
  que le systeme est pret, cependant, vous pouvez revenir en arriere en,
  pressant (sur la disposition du clavier par defaut) les touches Shift-
  PageUp.

  Il  y  a  un systeme Braille qui peut utiliser la console directement,
  appele le Braillex. Il est  fait  pour  lire  directement  la  memoire
  ecran.  Malheureusement le defilement normal du terminal l'en empeche.
  Si vous utilisez un noyau plus recent que  1.3.75,  entrez  simplement
  linux  no-scroll  au  prompt  LILO  ou  configurez  LILO pour le faire
  automatiquement. Si vous avez une  version  plus  ancienne  de  Linux,
  voyez la section ``Terminaux Braille et memoire ecran''.

  Une  autre chose connue et utile est d'utiliser les sons pour indiquer
  quelle etape du processus de demarrage a ete atteinte. (suggestion  de
  T.V. Raman)

  33..22..44..  RReeccoonnnnaaiissssaannccee ooppttiiqquuee ddee ccaarraacctteerreess

  Il  existe un programme de reconnaissance optique de caracteres (OCR),
  gratuit pour Linux appele xocr.  En principe, s'il est assez  bon,  ce
  programme  devrait  permettre  aux  personnes  malvoyantes de lire des
  livres normaux jusqu'a un certain point. (La precision de l'OCR  n'est
  jamais  assez grande.) Cependant, selon la documentation, ce programme
  demande de l'entrainement pour reconnaitre la fonte particuliere qu'il
  va  utiliser  et je n'ai aucune idee sur sa valeur puisque je n'ai pas
  le materiel pour le tester.

  33..33..  CCoommmmeenncceerr aa aapppprreennddrree LLiinnuuxx

  Commencer a apprendre Linux peut sembler difficile et intimidant  pour
  quelqu'un   qui   n'a  aucune  connaissance  en  informatique  ou  des
  connaissances uniquement en DOS. Les choses suivantes peuvent aider :

  +o  Apprenez a utiliser Linux (ou UNIX) sur  le  systeme  de  quelqu'un
     d'autre avant de mettre le votre en place ;

  +o  Controlez Linux au depart a partir de votre propre terminal Braille
     ou vocal que  vous  connaissez.  Si  vous  prevoyez  d'utiliser  la
     parole,  vous  desirerez apprendre emacs tout de suite. Vous pouvez
     aussi l'apprendre au fur et a mesure. Voir ci-dessous ;

  +o  Si vous avez l'habitude de MS-DOS, lisez  le  mini-HOWTO  DOS2Linux
     pour  vous  aider a la conversion. (voir la section ``Les documents
     HOWTO Linux'').

  Le HOWTO Emacspeak ecrit par  Jim  Van  Zandt  (<jrv@vanzandt.mv.com>)
  couvre  ceci  en  plus  grands  details.  (voir  ``Les documents HOWTO
  Linux'').

  Si vous pensez utiliser Emacspeak, vous  devriez  savoir  qu'Emacspeak
  n'essaie  pas  d'enseigner  Emacs,  donc dans ce sens, la connaissance
  prealable d'Emacs est toujours utile. Ceci dit, vous  n'avez  surement
  pas  besoin  d'en  connaitre  beaucoup  sur Emacs avant de commencer a
  utiliser Emacspeak. En fait, une fois  qu'Emacspeak  est  installe  et
  fonctionne,  il  fournit une interface facile vers l'ensemble varie de
  documentation en ligne  qui  contient  les  pages  info,  et  facilite
  l'apprentissage de ce dont vous avez besoin.

  <<   En   resume   :   commencer  a  utiliser  Emacspeak  demande  peu
  d'apprentissage. Obtenir le meilleur d'Emacs et  d'Emacspeak,  surtout
  si vous voulez l'utiliser comme substitut de X Window comme je le fais
  demande en fait de devenir  familier  avec  de  nombreuses  extensions
  d'Emacs ; mais ceci est un processus progressif et ne necessite pas un
  seul jour de travail. >> - T.V. Raman

  Une  autre  option  qui  peut  vous  interesser  sont  les   cassettes
  d'entrainement  RNIB dont l'une d'entre elles couvre Unix. Vous pouvez
  les obtenir chez :

       RNIB
       Customer Services
       PO Box 173
       Peterborough
       Cambridgeshire PE2 6WS
       Tel: 01345 023153 (ne fonctionne probablement qu'en Grande-Bretagne)

  33..44..  LLee BBrraaiillllee eenn rreelliieeff

  Linux devrait etre la plate-forme parfaite  pour  piloter  une  presse
  Braille. Il y a beaucoup d'outils de formatage destines specifiquement
  aux peripheriques a taille fixe.  On  peut  simplement  connecter  une
  presse  Braille  au  port  serie en utilisant les mecanismes standards
  d'impression de  Linux.  Pour  plus  d'informations,  voyez  le  Linux
  Printing HOWTO.

  Il  y  a  un  paquetage  logiciel  gratuit  qui  fonctionne  comme  un
  traducteur multi-lingual  niveau  deux  disponible  pour  Linux  a  la
  _F_e_d_e_r_a_t_i_o_n _N_a_t_i_o_n_a_l_e _p_o_u_r _l_e_s _A_v_e_u_g_l_e_s americaine (_N_a_t_i_o_n_a_l _F_e_d_e_r_a_t_i_o_n
  _f_o_r _t_h_e _B_l_i_n_d).  Son nom est NFBtrans. Voyez la  section  ``traducteur
  NFB'' pour plus de details.

  44..  PPrroobblleemmeess dd''aauuddiittiioonn

  En majorite, il y a peu de problemes a utiliser un ordinateur chez les
  gens ayant des problemes d'audition. Quasiment toutes les sorties sont
  visuelles.   Il  y  a  quelques  situations  ou  la  sortie sonore est
  utilisee, cependant. Pour celles-ci, on peut quelquefois contourner le
  probleme en utilisant une sortie visuelle a la place.

  44..11..  LLeess cclloocchheess vviissuueelllleess

  Traditionnellement,  les  ordinateurs  font  `beep' quand un programme
  leur envoie un code special. Ceci est utilise en general  pour  preter
  attention  au  programme  et  peu d'autres choses. Dans la plupart des
  cas, il est possible de remplacer ceci en  faisant  clignoter  l'ecran
  entier  (ou  l'emulateur  de terminal). La maniere de le faire est par
  contre tres variable.

     xxtteerrmm ((ssoouuss XX))
        Pour  xterm,  vous  pouvez  soit  changer  la  configuration  en
        pressant  le  bouton du milieu de la souris tout en appuyant sur
        la   touche   controle,   ou   en   mettant   une   ligne   avec
        XTerm*visualBell:  true  dans  le  fichier  .Xdefaults  de votre
        repertoire personnel.

     llaa ccoonnssoollee ((ssaannss XX))
        La console est legerement plus complexe.  Veuillez voir le  mini
        HOWTO  Visual  Bell  d'Alessandro  Rubini  pour  des details la-
        dessus.  Disponible avec  tout  le  reste  de  la  documentation
        Linux. (voyez la section ``autres documents Linux''). La plupart
        du temps, la  configuration  se  fait  par  application,  ou  en
        changeant le noyau Linux lui-meme.

  55..  PPrroobblleemmeess pphhyyssiiqquueess

  On  doit  prendre  beaucoup  de  ces  problemes  individuellement. Les
  besoins de chacun, les manieres dont on peut  generer  une  entree  et
  d'autres  facteurs  varient  tellement  que  tout ce que ce HOWTO peut
  fournir est un ensemble generique de pointeurs vers des  logiciels  et
  des conseils utiles.

  55..11..  IInnccaappaacciittee aa uuttiilliisseerr uunnee ssoouurriiss oouu uunn ppooiinntteeuurr

  Une mobilite limitee peut rendre l'utilisation d'une souris difficile.
  Pour certaines personnes,  un  trackball  peut  etre  une  tres  bonne
  solution,  mais  pour  d'autres le seul peripherique d'entree possible
  est un clavier (ou meme quelque chose qui simule un clavier). Pour une
  utilisation  normale  de  Linux  ceci  ne devrait pas etre un probleme
  (mais voyez la section ``Rendre le clavier docile''),  mais  pour  les
  utilisateurs  de  X, ceci peut causer de gros problemes sous certaines
  circonstances.

  Heureusement, le gestionnaire de fenetres fvwm a ete  fait  pour  etre
  utilise  sans  pointeur  et  on  peut  faire  la plupart des choses en
  utilisant un clavier.  Je fais en fait ceci moi-meme quand je perds ma
  souris  (ne  me  demandez  pas pourquoi) ou si je veux juste taper. En
  fait l'utilisation d'autres programmes dependra  de  leur  capacite  a
  accepter les entrees au clavier. Beaucoup de programmes X le font pour
  toutes les fonctions. Beaucoup ne  le  font  pas.  Je  pense  que  les
  touches  qui  emulent  la  souris,  qui  devraient  se trouver dans la
  version courante de X, faciliteront ceci.

  55..11..11..  IInnccaappaacciittee aa uuttiilliisseerr uunn ccllaavviieerr

  Les personnes qui sont incapables d'utiliser  un  clavier  normalement
  peuvent  quelquefois  en  utiliser  un  par l'intermediaire d'un baton
  dirige par la tete ou par la bouche. Ceci  demande  une  configuration
  speciale  pour le clavier.  Veuillez voir aussi la section ``rendre le
  clavier docile''.

  55..11..11..11..  AAuuttrree mmaatteerriieell dd''eennttrreeee ((ssyysstteemmee XX WWiinnddooww sseeuulleemmeenntt))

  D'autres personnes ne peuvent pas utiliser le clavier du tout et seuls
  des peripheriques de pointage sont disponibles. Dans  ce  cas,  aucune
  solution  n'est  disponible  sous la console normale Linux et on devra
  utiliser X. Si on peut faire en sorte que l'extension  XInput  utilise
  le  peripherique  et si on peut trouver le bon logiciel pour convertir
  des donnees de pointeur en caracteres (je n'en ai pas encore  trouve),
  alors  tout  dispositif  de  pointage  devrait  etre  utilisable  sans
  clavier.

  Il y a un certain nombre de peripheriques qu'il est  bon  de  regarder
  pour  de  telles acquisitions de donnees, comme les ecrans tactiles ou
  les pointeurs oculaires. Nombre d'entre eux necessiteront un _p_i_l_o_t_e _d_e
  _p_e_r_i_p_h_e_r_i_q_u_e  ecrit  specifiquement. Ceci n'est pas vraiment difficile
  si la documentation est disponible, mais demande quelqu'un qui possede
  des  bonnes  competences  en  programmation C. Veuillez voir le _K_e_r_n_e_l
  _H_a_c_k_e_r_'_s  _G_u_i_d_e  et  autres  references  sur  le   noyau   pour   plus
  d'informations.  Une  fois que ceci sera mis en place, il devrait etre
  possible d'utiliser ces peripheriques comme une souris normale.

  55..11..22..  CCoonnttrroolleerr llee mmaatteerriieell pphhyyssiiqquuee ddeeppuuiiss LLiinnuuxx

  Le principal groupe d'interet ici est le Projet de  Laboratoire  Linux
  (Linux  Lab  Project).  En  general,  on peut controler la plupart des
  materiels   GPIB   (une   interface   normalisee   pour   l'equipement
  scientifique,  aussi  connue  sous  le  nom  de  bus IEEE). Ceci donne
  virtuellement beaucoup de potentiel pour des  projets  tres  ambitieux
  d'accessibilite. Autant que je sache, aucun d'entre eux n'a encore ete
  mis sur pied.

  55..22..  RReeccoonnnnaaiissssaannccee vvooccaallee

  La reconnaissance vocale  est  un  outil  tres  utile  pour  permettre
  l'utilisation   d'un   ordinateur.   Je   connais   deux  systemes  de
  reconnaissance pour Linux, le premier est ears qui est decrit ainsi  :
  ``la  reconnaissance  n'est pas optimale. Mais c'est bon pour jouer et
  ca sera  ameliore'',  le  deuxieme  est  AbbotDemo,  ``Un  systeme  de
  reconnaissance  vocale  continu independant de la personne'', qui peut
  etre plus interessant, bien qu'il ne soit pas disponible pour un usage
  commercial  sans  arrangement  prealable. Voyez la carte des logiciels
  Linux pour les details (section ``Autres documents Linux'').

  55..33..  RReennddrree llee ccllaavviieerr ddoocciillee

  55..33..11..  LLee ssyysstteemmee XX WWiinnddooww

  Le dernier serveur  X  qui  est  distribue  avec  Linux  peut  inclure
  beaucoup   de   caracteristiques  qui  assistent  l'acquisition.  Ceci
  comprend  des  caracteristiques  telles  que   StickKeys,   MouseKeys,
  RepeatKeys,  BounceKeys,  SlowKeys et TimeOut. Celles-ci permettent de
  parametrer le clavier selon les besoins de l'utilisateur.  Elles  sont
  fournies  avec l'extension XKB dans les versions de X apres la version
  6.1. Pour trouver votre version  et  voir  si  vous  avez  l'extension
  installee, vous pouvez essayer :

       xdpyinfo -queryExtensions

  55..33..22..  SSee ddeebbaarraasssseerr ddee llaa rreeppeettiittiioonn aauuttoommaattiiqquuee

  Pour  arreter  la  repetition des touches sur la console Linux, lancez
  cette commande (je pense qu'on doit la lancer une fois par  console  ;
  un  bon  endroit  pour  la  lancer  serait dans vos fichiers de login,
  .profile ou .login dans votre repertoire personnel) :

  setterm -repeat off

  Pour vous debarasser de la repetition automatique dans n'importe  quel
  serveur X, vous pouvez utiliser la commande :

       xset -r

  que  vous pourriez mettre dans le fichier lance quand vous commencez a
  utiliser   X   (souvent   .xsession   ou   .xinit    sous    certaines
  configurations).

  Il  est  bon de regarder ces deux commandes de plus pres pour d'autres
  manieres de changer le comportement de la console.

  55..33..33..  MMaaccrrooss :: bbeeaauuccoouupp dd''eennttrreeee ppoouurr ppeeuu ddee ttoouucchheess pprreesssseeeess

  Souvent dans de telles situations, le plus grand probleme est celui de
  la rapidite d'entree. Ici la chose la plus importante a viser  est  le
  nombre de commandes le plus grand en un minimum de frappes de touches.
  Pour les utilisateurs du shell bash ou tcsh, vous devriez regarder  la
  page  de  manuel, en particulier la completion de commandes et de noms
  de fichiers (pressez la touche TAB et bash essaie de  deviner  ce  qui
  vient derriere). Pour toute information sur les macros qui fournissent
  des sequences de commandes en appuyant sur une seule touche, jetez  un
  coup d'oeil au HOWTO Keystroke.

  55..33..44..  LLeess ttoouucchheess ccoollllaanntteess

  Les  touches collantes sont une caracteristique qui permet a quelqu'un
  qui ne  peut  presser  de  maniere  fiable  qu'un  bouton  a  la  fois
  d'utiliser  un  clavier avec toutes les touches de modification telles
  que Shift et Control. Ces touches, au lieu qu'on doive  les  maintenir
  enfoncees  en meme temps que l'autre touche deviennent plutot comme la
  touche Caps Lock et restent activees pendant que l'on  presse  l'autre
  touche.   Elles  peuvent  alors  soit  se  desactiver ou rester telles
  quelles pour la touche suivante selon ce dont on a besoin. Pour  avoir
  des  informations  sur la maniere de configurer ceci, veuillez voir le
  HOWTO Linux Keyboard, surtout la section _J_e  _n_e  _p_e_u_x  _u_t_i_l_i_s_e_r  _q_u_'_u_n
  _d_o_i_g_t  _p_o_u_r _t_a_p_e_r (section 15 dans la version que j'ai). - Information
  de Toby Reed.

  66..  PPrroobblleemmeess ddee pprrooggrraammmmaattiioonn ggeenneerraauuxx

  Beaucoup de problemes qu'il est important de tenir en compte sont  les
  memes  quand  on  ecrit des logiciels faits pour faciliter l'acces que
  quand on essaie de suivre de bons principes de programmation.

  66..11..  EEssssaayyeezz ddee ffaacciilliitteerr llaa mmiissee eenn ppllaaccee dd''iinntteerrffaacceess mmuullttiipplleess

  Si   votre  logiciel  n'est  utilisable  qu'a  travers  une  interface
  graphique, il peut etre tres difficile de le  rendre  utilisable  pour
  une  personne  qui  ne  peut  pas  voir. Si on ne peut l'utiliser qu'a
  travers une interface orientee ligne, quelqu'un qui ne peut pas  taper
  aura des difficultes.

  Fournissez  des  raccourcis  claviers  aussi bien que l'utilisation du
  pointeur X  normal  (generalement  la  souris).  Vous  pouvez  presque
  certainement  compter  sur l'utilisateur pour qu'il genere des frappes
  de touches sur votre application.

  66..22..  RReennddeezz llee llooggiicciieell ccoonnffiigguurraabbllee

  S'il est facile de changer de fonte alors les gens pourront la changer
  pour  celle  qu'il  peuvent  lire.  Si  on  peut changer l'ensemble de
  couleurs alors les gens qui ne voient pas  les  couleurs  seront  plus
  aptes a l'utiliser. Si on peut changer les fontes facilement alors les
  malvoyants trouveront votre logiciel plus utile.

  66..33..  TTeesstteezz llee llooggiicciieell ssuurr lleess uuttiilliissaatteeuurrss

  Si quelques personnes peuvent utiliser votre logiciel, chacune avec un
  probleme  d'acces  different,  elles seront plus a meme de deceler les
  problemes specifiques. Evidemment, ceci ne sera pas pratique pour tout
  le monde, mais vous pouvez toujours demander un retour d'informations.

  66..44..  RReennddeezz llaa ssoorrttiiee ddiissttiinnccttee

  A chaque fois que c'est possible, clarifiez les differentes parties de
  votre programme. Formatez les messages d'erreurs de maniere specifique
  pour les identifier. Sous X, assurez-vous  que  chaque  pan  de  votre
  fenetre  a  un  nom  pour  qu'un  logiciel  de  lecture d'ecran puisse
  l'identifier.

  66..55..  LLiicceenncceess

  Certains  logiciels  pour  Linux  (bien  que  ce  ne  soient  pas  les
  programmes  cles) ont des licences telles que _p_a_s _p_o_u_r _u_n_e _u_t_i_l_i_s_a_t_i_o_n
  _c_o_m_m_e_r_c_i_a_l_e. Ceci pourrait etre mauvais pour une personne qui commence
  par  utiliser le logiciel pour son travail personnel et qui commence a
  pouvoir travailler pour son emploi ; elle ne  pourrait  pas  le  faire
  avec   ceci.  Ce  pourrait  etre  quelque  chose  qui  les  libere  de
  dependances financieres et autres de la part d'autres personnes.  Meme
  si  l'auteur  du  logiciel  est pret a faire des exceptions, cela rend
  l'utilisateur vulnerable aux changements des  conditions  commerciales
  (une  certaine societe en achete les droits) et au refus des gens pour
  qui ils pourraient travailler (beaucoup de societes ont tres peur  des
  licences).  Il  est  beaucoup mieux d'eviter ce genre de licence quand
  c'est possible. La protection contre l'abus commercial  des  logiciels
  peut  etre acquise au besoin avec des licences plus specifiques telles
  que la licence publique du GNU ou la licence artistique.

  77..  AAuuttrreess iinnffoorrmmaattiioonnss

  77..11..  DDooccuummeennttaattiioonn ssuurr LLiinnuuxx

  La documentation Linux est essentielle a l'utilisation de Linux et  la
  plupart  des  documents  mentionnes ici devraient etre inclus dans les
  versions recentes de Linux, de toutes les sources que je connais.

  Si vous voulez obtenir les informations sur Internet,  voici  quelques
  exemples  de  sites.  Ils  devraient  y  avoir  des  miroirs  sur  les
  principaux sites FTP dans le monde.

  +o  ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/

  +o  tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/

  +o  sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/

  +o  ftp.ibp.fr (132.227.77.2) : /pub/linux/french/docs/

  77..11..11..  LLaa FFeeuuiillllee dd''IInnffoorrmmaattiioonnss LLiinnuuxx

  Une explication simple et efficace de ce qu'est Linux. C'est  une  des
  choses  que vous devriez remettre quand vous voulez expliquer pourquoi
  vous voulez Linux et ce pour quoi il est bon.

  La Feuille d'Informations Linux est disponible sur le World Wide Web a
  <http://sunsite.unc.edu/mdw/HOWTO/INFO-SHEET.html>  et autres miroirs.

  77..11..22..  LLaa MMeettaa--FFAAQQ LLiinnuuxx

  Une liste d'autres ressources d'informations, bien plus completes  que
  celle-ci.  La  Meta-FAQ  est  disponible  sur  le  World  Wide  Web  a
  <http://sunsite.unc.edu/mdw/HOWTO/META-FAQ.html> et autres miroirs.
  77..11..33..  LLaa ccaarrttee ddeess llooggiicciieellss LLiinnuuxx

  La liste des logiciels disponibles pour Linux sur Internet.  Bien  des
  paquetages  listes  ici  ont  ete  trouves  grace  a  elle.  Elle  est
  disponible     sous     forme     d'index     de      recherche      a
  <http://www.boutell.com/lsm/>.  Elle  est  aussi  disponible  comme un
  simple fichier texte sur tous les sites FTP decrits  dans  la  section
  ``Documentation Linux''.

  77..11..44..  LLeess ddooccuummeennttss HHOOWWTTOO LLiinnuuxx

  Les  documents HOWTO constituent la documentation principale de Linux.
  Cet HOWTO Acces a Linux en est un exemple.

  Le site de base du Projet  de  Documentation  Linux  qui  produit  ces
  informations  est   <http://sunsite.unc.edu/mdw/linux.html>.  Il  y  a
  aussi beaucoup de societes qui les produisent sous  forme  de  livres.
  Contactez un fournisseur Linux local pour plus de details.

  Les  documents  HOWTO  Linux seront dans le repertoire HOWTO dans tous
  les sites FTP mentionnes dans la section ``Documentation Linux''.

  77..11..55..  LLaa FFAAQQ LLiinnuuxx

  Une liste des `Questions Frequemment Posees'  avec  les  reponses  qui
  devraient  resoudre  bien  des  questions  generales. La liste FAQ est
  disponible  a  <http://www.cl.cam.ac.uk/users/iwj10/linux-faq/>  comme
  dans  tous  les  sites  FTP mentionnes dans la section ``Documentation
  Linux''.

  77..22..  LLiisstteess ddee ddiissttrriibbuuttiioonn

  Je connais deux listes  couvrant  ces  problemes  specifiquement  pour
  Linux.   Il  y  en  a  aussi d'autres qu'il est bon de regarder et qui
  couvrent l'utilisation des ordinateurs plus generalement. Par le fait,
  si un courrier est envoye a l'une de ces listes je le _l_i_r_a_i finalement
  et incluerai toute information importante dans le HOWTO  Access,  vous
  n'avez donc pas besoin de m'en adresser une copie separee sauf si ca a
  l'air urgent.

  77..22..11..  LLaa lliissttee LLiinnuuxx AAcccceessss

  Voici une liste generale couvrant les problemes d'acces a Linux.  Elle
  est faite _p_o_u_r _s_e_r_v_i_r _l_e_s _b_e_s_o_i_n_s _d_e_s _u_t_i_l_i_s_a_t_e_u_r_s _e_t _d_e_s _d_e_v_e_l_o_p_p_e_u_r_s
  _d_u _s_y_s_t_e_m_e  _d_'_e_x_p_l_o_i_t_a_t_i_o_n  _L_i_n_u_x  _e_t  _d_e  _l_o_g_i_c_i_e_l_s_,  _q_u_i  _s_o_n_t  _s_o_i_t
  _h_a_n_d_i_c_a_p_e_s  _o_u _v_e_u_l_e_n_t _a_i_d_e_r _a _r_e_n_d_r_e _L_i_n_u_x _p_l_u_s _a_c_c_e_s_s_i_b_l_e. Pour vous
  abonner, envoyez un courrier a  et dans le CORPS  (pas  le  sujet)  du
  message, mettez :

       subscribe linux-access <votre-adresse-email>

  77..22..22..  LLaa lliissttee LLiinnuuxx BBlliinndd

  Voici  une  liste de distribution couvrant l'utilisation de Linux pour
  les utilisateurs aveugles.  Il  y  a  aussi  une  liste  de  logiciels
  importants  et utiles rassembles dans l'archive de la liste. Pour vous
  abonner, envoyez un courrier a  <blinux-list-request@redhat.com>  avec
  le subject: help.  Cette liste est maintenant moderee.

  77..33..  RReeffeerreenncceess WWWWWW

  Le  World  Wide  Web,  par  sa nature, change tres rapidement. Si vous
  lisez  une  vieille  version  de  ce  document  quelques  informations
  risquent  d'etre  perimees.   La version d'origine que je garde sur le
  WWW ne devrait pas etre trop vieille de plus d'un ou deux mois,  alors
  veuillez vous y rapporter.

  La      documentation      sur      Linux     est     disponible     a
  <http://sunsite.unc.edu/mdw/linux.html>

  Acces a Linux sur le Web <http://www.tardis.ed.ac.uk/~mikedlr/access/>
  avec       toutes       les       versions       du       HOWTO      a
  <http://www.tardis.ed.ac.uk/~mikedlr/access/HOWTO/>.   De  preference,
  cependant,  telechargez  a partie d'un des principaux sites FTP Linux.
  Si j'ai beaucoup de trafic je devrai fermer ces pages et les  deplacer
  autre part.

  Le    projet    de    documentation   et   de   developpement   BLINUX
  <http://leb.net/blinux/>. << Le but du projet de documentation  et  de
  developpement  BLINUX  est  de  servir  de catalyseur qui stimulera et
  accelerera le developpement des logiciels et de la  documentation  qui
  permettront  aux  utilisateurs  aveugles  de faire tourner leur propre
  station Linux.>>

  Page WWW d'Emacspeak :

  <http://www.research.digital.com/CRL/personal/raman/emacspeak/emacspeak.html>

  Page       WWW       non       officielle       de       BRLTTY      :
  <http://www.sf.co.kr/t.linux/new/brltty.html>

  Yahoo (l'un des plus grands catalogues sur Internet) :

  <http://www.yahoo.com/Society_and_Culture/Disabilities/Adaptive_Technology/>

  Le projet Linux Lab  <http://www.fu-berlin.de/~clausi/>.

  Les  pages  BLYNX  :  des fichiers de support pour Lynx faits pour les
  utilisateurs       aveugles        et        deficients        visuels
  <http://leb.net/blinux/blynx/>.

  77..44..  FFoouurrnniisssseeuurrss

  Voici un fournisseur britannique pour le Braillex

       Alphavision Limited

  77..55..  FFaabbrriiccaannttss

  77..55..11..  AAllpphhaavviissiioonn

  Je  pense  que  ce  sont  des fabricants ? RNIB ne les liste que comme
  fournisseurs, mais d'autres disent qu'ils fabriquent le Braillex.

       Alphavision Ltd
       Seymour House
       Copyground Lane
       High Wycombe
       Bucks HP12 3HE
       England
       U.K.

     TTeelleepphhoonnee ::
        +44 1494-530 555

  77..55..11..11..  PPrroodduuiittss AAllpphhaavviissiioonn AATT ssuuppppoorrtteess ppaarr LLiinnuuxx

  +o  Braillex

  77..55..22..  BBllaazziiee EEnnggiinneeeerriinngg

  Le Braille Lite etait supporte dans la version d'origine de BRLTTY. Ce
  support  s'est  maintenant  arrete.  Si  vous  en  avez  un  et voulez
  l'utiliser avec Linux, cela pourrait etre possible en utilisant  cette
  version du logiciel.

       Blazie Engineering
       105 East Jarrettsville Rd.
       Forest Hill, MD 21050
       U.S.A.

     TTeelleepphhoonnee ::
        +1 (410) 893-9333

     FFAAXX ::
        +1 (410) 836-5040

     BBBBSS ::
        +1 (410) 893-8944

     EE--MMaaiill ::
        <info@blazie.com>

     WWWWWW ::
        <http://www.blazie.com/>

  77..55..22..11..  PPrroodduuiittss AATT BBllaazziiee

  +o  Braille Lite (support arrete)

  77..55..33..  DDiiggiittaall EEqquuiippmmeenntt CCoorrppoorraattiioonn

  Digital Equipment Corporation
  P.O. Box CS2008
  Nashua
  NH 03061-2008
  U.S.A

     CCoommmmaannddeess ::
        +1 800-722-9332

     IInnffooss tteecchhnniiqquueess ::
        +1 800-722-9332

     FFAAXX ::
        +1 603-884-5597

     WWWWWW ::
        <http://www.digital.com/>

  77..55..33..11..  PPrroodduuiittss DDEECC AATT ssuuppppoorrtteess ppaarr LLiinnuuxx

  +o  DECTalk Express

  77..55..44..  KKoommmmuunniikkaattiioonnss--TTeecchhnniikk SSttoollppeerr GGmmbbHH

       KTS Stolper GmbH
       Herzenhaldenweg 10
       73095 Albershausen
       Germany

     TTeelleepphhoonnee ::
        +49 7161 37023

     FFaaxx ::
        +49 7161 32632

  77..55..44..11..  PPrroodduuiittss KKTTGG AATT ssuuppppoorrtteess ppaarr LLiinnuuxx

  +o  Brailloterm

  88..  PPaaqquueettaaggeess llooggiicciieellss

  Les  references  de  cette section sont tirees directement de la carte
  des logiciels Linux que l'on  peut  trouver  dans  tous  les  endroits
  standards  pour la documentation Linux et qui liste quasiment tous les
  logiciels disponibles pour Linux.

  88..11..  EEmmaaccssppeeaakk

  Emacspeak est la partie logicielle d'une interface vocale pour  Linux.
  Tout autre programme base sur les caracteres, comme un browser WWW, ou
  telnet ou un autre editeur peuvent theoriquement  etre  utilises  avec
  emacspeak. La difference principale entre ca et un logiciel de lecture
  d'ecran normal pour un systeme d'exploitation tel que DOS est qu'il  a
  aussi  plein de possibilites en plus. Il est base sur l'editeur Emacs.

  Un editeur de texte est en general simplement un  programme  qui  vous
  permet  de  changer  le contenu d'un fichier, par exemple, en ajoutant
  des informations nouvelles a une lettre. Emacs est en fait loin d'etre
  un  editeur  de  texte  normal, et donc ce paquetage est beaucoup plus
  utile que vous ne pourriez l'imaginer. Vous  pouvez  lancer  n'importe
  quel  autre programme a partir d'Emacs, avec toute sortie qu'il genere
  pouvant apparaitre dans l'emulateur de terminal d'Emacs.

  Les raisons pour lesquelles Emacs est un meilleur  environnement  pour
  Emacspeak est qu'il peut comprendre la disposition sur l'ecran et peut
  interpreter  intelligemment  la  signification  de,  par  exemple,  un
  calendrier,  qui serait sinon un simple tableau desordonne de nombres.
  L'auteur de ce  paquetage  parvient  a  gerer  entierement  sa  propre
  machine  Linux  en faisant toute l'administration a partir d'Emacs. Il
  l'utilise aussi pour controler une grande variete d'autres machines et
  de logiciels directement de cette machine.

  Emacspeak  est  inclus dans la distribution Debian Linux et est inclus
  en tant que logiciel contribue dans la  distribution  Slackware.  Ceci
  veut  dire  qu'il est disponible sur de nombreuses distributions Linux
  sur CD-ROM. A l'heure ou ceci sera publie, la version incluse  sera  5
  ou  mieux,  mais  a  present  je n'ai que la version 4 disponible pour
  l'examiner.

       Begin3
       Titre :         emacspeak - interface de sortie parlee pour Emacs
       Version :       4.0
       Entre le :      30 MAI 96
       Description :   Emacspeak est le premier systeme complet de synthese
                       vocale qui permettra a toute personne malvoyante de
                       travailler directement sur un systeme Unix. (Jusqu'a
                       maintenant, la seule alternative disponible aux
                       utilisateurs deficients visuels etait d'utiliser un PC
                       dote de parole comme terminal.) Emacspeak repose sur
                       Emacs. Une fois que vous avez demarre Emacs avec Emacspeak
                       charge, vous avez une reponse parlee a tout ce que vous
                       faites. Cela dependra de ce que vous etes capable de faire
                       avec Emacs. Il n'y a rien que vous ne puissiez faire avec
                       Emacs :-)
       Mots cles :     handicap acces deficient visuel aveugle parole Emacs
       Auteur :        raman@adobe.com (T. V. Raman)
       Maintenu par :  jrv@vanzandt.mv.com (Jim Van Zandt)
       Site de base :  sunsite.unc.edu apps/sound/speech
                       124kB   emacspeak-4.0.tgz
       Autre site :
       Site d'origine : http://www.cs.cornell.edu /pub/raman/emacspeak
                       123kB   emacspeak.tar.gz/Info/People/raman/emacspeak/emacspeak.tar.gz
       Platformes :    DECtalk Express ou synthetiseur vocal DEC Multivoice,
                       GNU FSF Emacs 19 (version 19.23 ou plus) et TCLX
                       7.3B (TCL etendu).
       Licence :       GPL
       End

  88..22..  BBRRLLTTTTYY

  Voici un programme pour faire tourner un terminal Braille sur le  port
  serie.  Il  a  ete largement teste et utilise, et supporte de nombreux
  differents  types  de  materiels  (voir  l'entree  sur  la  Carte  des
  Logiciels Linux ci-dessous).

  Le  mainteneur  est  Nikhil  Nair,  <nn201@cus.cam.ac.uk>.  Les autres
  personnes qui travaillent dessus sont Nicolas Pitre, <nico@cam.org> et
  Stephane   Doyon,  <doyons@jsp.umontreal.ca>.  Veuillez  envoyer  tout
  commentaire a chacun d'entre eux.

  Les auteurs semblent interesses pour recevoir du support pour plus  de
  peripheriques  differents,  et  donc  si vous en avez un, vous devriez
  penser a les contacter. Ils auront certainement  besoin  d'information
  sur  la  programmation  du peripherique, donc si vous pouvez contacter
  votre fabricant et l'obtenir, ils seront plus a meme de vous aider.

  Voici une petite liste (tiree de leur fichier README) pour vous mettre
  l'eau a la bouche :

  +o  integration  complete des possibilites normales de visualisation de
     l'ecran ;

  +o  une grande etendue de capacites supplementaires en option, comme le
     curseur  clignotant  et  les  lettres majuscules, le gel de l'ecran
     pour une lecture plus  commode,  l'affichage  avec  attributs  pour
     reperer le texte selectionne, les liens hypertextes, etc. ;

  +o  routage  du  curseur  _i_n_t_e_l_l_i_g_e_n_t.  Ceci  facilite  le mouvement du
     curseur dans les editeurs de texte, etc. sans enlever les mains  de
     l'afficheur Braille ;

  +o  une  fonction  de  copier / coller. Ceci est particulierement utile
     pour copier des noms de fichiers longs, des commandes  compliquees,
     etc. ;

  +o  possibilite d'aide en ligne ;

  +o  support pour plusieurs codes Braille ;

  +o  une  conception  modulaire  qui  permet l'ajout relativement facile
     d'un nouveau pilote pour d'autres afficheurs Braille, ou  meme  (on
     peut l'esperer) le portage vers d'autres plate-formes _U_n_i_x_-_l_i_k_e.

  Begin3
  Titre :         BRLTTY - Logiciel d'acces a Unix pour une personne aveugle
                  utilisant un terminal Braille
  Version :       0.22, 22SEP95
  Date-entree :   24SEP95
  Description :   BRLTTY est un daemon qui fournit l'acces a une console Unix
                  pour une personne aveugle utilisant un afficheur Braille
                  (voir le fichier README pour plus d'explications).

                  BRLTTY ne fonctionne qu'avec les applications en mode texte.

                  Nous esperons que ce systeme sera etendu pour supporter
                  d'autres afficheurs Braille, et meme d'autres
                  plate-formes Unix.
  Mots-Cles :     Braille console acces malvoyant aveugle
  Auteur :        nn201@cam.ac.uk (Nikhil Nair)
                  nico@cam.org (Nicolas Pitre)
                  doyons@jsp.umontreal.ca (Stephane Doyon)
                  jrbowden@bcs.org.uk (James Bowden)
  Maintenu-par :  nn201@cam.ac.uk (Nikhil Nair)
  Site-de-base :  sunsite.unc.edu /pub/Linux/system/Access
                  110kb brltty-1.0.2.tar.gz (avec le fichier README)
                  6kb brltty-0.22.README
                  1kb brltty-1.0.2.lsm
  Plate-formes :  Linux (noyau 1.1.92 ou plus) sur un PC ou DEC Alpha.
                  Pas de X/graphiques.
                  - Tieman B.V.'s CombiBraille 25/45/85 ;
                  - Alva B.V. modeles ABT3xx ;
                  - Telesensory Systems Inc. PowerBraille 40 (pas les
                  65/80), Navigator 20/40/80 (derniere version logiciel
                  fabricant seulement ?).
  Copying-Policy : GPL
  End

  88..33..  SSccrreeeenn

  Screen  est  un  logiciel  standard  qui permet a plusieurs programmes
  differents de tourner en meme temps sur un seul  terminal.  Il  a  ete
  ameliore  pour  supporter directement certains terminaux Braille (ceux
  de Telesensory).

  88..44..  RRssyynntthh

  Voici un synthetiseur vocal liste dans la Carte des  Logiciels  Linux.
  Il   ne  marche  apparamment  pas  assez  bien  pour  qu'une  personne
  malvoyante l'utilise.  Utilisez du materiel a la place, ou  ameliorez-
  le... Un synthetiseur vocal gratuit serait vraiment utile.

  88..55..  xxooccrr

  xocr  est  un  paquetage qui met en place la reconnaissance optique de
  caracteres pour Linux. Comme pour Rsynth,  je  ne  pense  pas  que  ce
  paquetage  soit acceptable comme seul moyen d'entree pour une personne
  malvoyante. Je suspecte que l'algorithme  utilise  aie  besoin  d'etre
  examine  par  quelqu'un  qui  puisse  verifier qu'il lit correctement.
  J'aimerais qu'on me prouve le contraire.

  88..66..  xxzzoooomm

  xzoom est un agrandisseur  d'ecran,  du  meme  genre  que  xmag,  mais
  suffisamment  meilleur pour etre tres utile a une personne malvoyante.
  Les principaux desavantages de xzoom sont qu'il ne peut  pas  agrandir
  sous   lui-meme,  que  certaines  touches  de  controle  ne  sont  pas
  compatibles avec fvwm, le gestionnaire de fenetres normal  sous  Linux
  et  que  sa  configuration  par  defaut ne fonctionne pas a travers le
  reseau (ceci peut etre resolu au prix d'une baisse de vitesse). A part
  cela  sinon, il est excellent.  Il fait de l'agrandissement continu ce
  qui vous permet, par exemple, de faire defiler  un  document  vers  le
  haut  et  vers  le  bas  tout  en gardant agrandie la section que vous
  lisez. De meme, vous  pouvez  deplacer  une  petite  boite  autour  de
  l'ecran, en en agrandissant le contenu et en vous laissant chercher la
  partie que vous voulez voir. xzoom est aussi disponible sous forme  de
  RPM  sur  les  sites  normaux  de RedHat, ce qui le rend tres facile a
  installer pour les gens  qui  utilisent  le  systeme  RPM  (comme  les
  utilisateurs RedHat).

       Begin3
       Titre:          xzoom
       Version:        0.1
       Date-entree:    Mar 30 1996
       Description:    xzoom peut agrandir (par valeurs entieres) tourner
                       (par un multiple de 90 degres) et faire un miroir autour
                       des axes X ou Y des parties de l'ecran X11
                       et les afficher dans sa fenetre.
       Mots-Cles:      X11 zoom agrandi xmag
       Auteur:         Itai Nahshon <nahshon@best.com>
       Maintenu-par:   Itai Nahshon <nahshon@best.com>
       Site-de-base:   sunsite.unc.edu
                       probablement dans /pub/Linux/X11/xutils/xzoom-0.1.tgz
       Plate-formes:   Linux+11. Support seulement pour 8-bit.
                       Teste seulement sur Linux 1.3.* avec le serveur XSVGA 3.1.2
                       Necessite l'extension XSHM.
       Copying-policy: Gratuit
       End

  88..77..  NNFFBBttrraannss

  nfbtrans   est   un  programme  de  traduction  Braille  multi-niveaux
  distribue par la Federation Nationale des Aveugles aux Etats-Unis.  Il
  est distribue gratuitement dans l'espoir que quelqu'un l'ameliore. Les
  langues couvertes sont  l'anglais  americain,  l'anglais  britannique,
  l'espagnol, le russe, l'esperanto, l'allemand, l'hebreu biblique et le
  grec biblique, bien que d'autres puissent etre  ajoutees  en  ecrivant
  simplement  une  table  de  traduction.  Sont  aussi couverts certains
  symboles informatiques et mathematiques. J'ai  reussi  a  le  compiler
  sous  Linux, mais comme je n'ai pas de presse Braille disponible en ce
  moment, je n'ai pas pu le tester.

  NFBtrans est disponible  a  <ftp://nfb.org/ftp/nfb/braille/nfbtrans/>.
  Apres l'avoir telecharge, vous devrez le compiler.

  88..77..11..  CCoommppiilleerr NNFFBBttrraannss ssuurr LLiinnuuxx

  J'ai  envoye  ce  patch  au mainteneur de NFBtrans et il dit qu'il l'a
  inclus, donc si vous avez une  version  plus  recente  que  740,  vous
  n'aurez   surement   rien   de  special  a  faire.  Suivez  juste  les
  instructions incluses dans le paquetage.

       unzip -L NFBTR740.ZIP   #ou tout nom de fichier que vous ayez
       mv makefile Makefile

  Apres sauvez ce qui suit dans un fichier (par exemple patch-file)

       *** nfbpatch.c.orig     Tue Mar 12 11:37:28 1996
       --- nfbpatch.c  Tue Mar 12 11:37:06 1996
       ***************
       *** 185,190 ****
       --- 185,193 ----
           return (finfo.st_size);
         }                /* filelength */

       + #ifndef linux
       + /* pretty safe to assume all linux has usleep I think ?? this should be
       + done properly anyway */
         #ifdef SYSVR4
         void usleep(usec)
           int usec;
       ***************
       *** 195,200 ****
       --- 198,204 ----
         }                /* usleep */

         #endif
       + #endif

         void beep(count)
           int count;

  et lancez

       patch < patch-file

  puis tapez

       make

  et le programme devrait compiler.

  88..88..  UUnnWWiinnddoowwss

  UnWindows est un paquetage d'utilitaires d'acces sous X qui fournit de
  nombreuses  capacites  utiles  pour  les  deficients  visuels (pas les
  aveugles). Il comprend un agrandisseur d'ecran et d'autres utilitaires
  personnalises  pour  aider  a  situer le pointeur. Vous pouvez charger
  UnWindows depuis  <ftp://ftp.cs.rpi.edu/pub/unwindows>.

  Livre par defaut, le paquetage ne fonctionnera  pas  sur  Linux  parce
  qu'il  depend  de certaines capacites des Sun. Cependant, certains des
  utilitaires fonctionnent et j'ai reussi a porter la plupart  du  reste
  de  sorte  que  ce  paquetage peut interesser certaines personnes. Mon
  portage sera soit reincorpore dans l'original ou bien sera  disponible
  dans  les  archives  BLINUX  (voir  ``references  WWW''). L'utilitaire
  restant  qui  ne   fonctionne   pas   encore   est   l'utilitaire   de
  configuration.

  Dans ma version les programmes, au lieu de generer eux-memes les sons,
  ne font qu'appeler un autre programme. L'autre programme pourrait etre
  par exemple :

       play /usr/lib/games/xboing/sounds/ouch.au

  qui  rendrait  le  son  <<  ouch >> de xboing, par exemple il pourrait
  faire cela quand le pointeur atteint le bord gauche de l'ecran.

  88..88..11..  ddyynnaammaagg

  dynamag est un programme d'agrandissement d'ecran.  Veuillez  voir  la
  section   sur   l'agrandissement   d'ecran   (``agrandissement'').  Ce
  programme fonctionnait dans la distribution par defaut.

  88..88..22..  ccoolloorreeyyeess

  coloreyes facilite la localisation du pointeur de souris. Il  consiste
  en  une  paire  d'yeux  qui  regardent  toujours  dans la direction du
  pointeur (comme xeyes) et changent de couleur selon la distance de  la
  souris  aux  yeux  (different d'xeyes). Ceci ne fonctionne pas dans la
  distribution par defaut, mais la version de  test,  au  meme  endroit,
  semble fonctionner.

  88..88..33..  bboorrddeerr

  border  est  un programme qui detecte quand le pointeur de la souris a
  atteint le bord de l'ecran et fait un son selon le bord de l'ecran qui
  a  ete  atteint.  La  version  disponible  utilise  un  systeme de son
  specifique a Sun. Je l'ai maintenant change pour qu'au lieu  de  cela,
  il  lance  simplement  une  commande,  qui  peut  etre  n'importe quel
  programme de son sous Linux.

  88..88..44..  uunn--ttwwmm

  Le gestionnaire de fenetres est  un  programme  special  qui  controle
  l'emplacement de toutes les autres fenetres (programmes) affichees sur
  l'ecran X. un-twm en est une version speciale qui fait un son a chaque
  fois  que  le  pointeur  entre  dans  une  fenetre  differente. Le son
  dependra de la fenetre dans laquelle on  vient  d'entrer.  La  version
  distribuee  ne fonctionne pas avec Linux parce que, comme border, elle
  depend des capacites sonores des Sun. Encore une fois, j'ai  deja  une
  version speciale qui sera disponible au moment ou vous lirez ceci.

  99..  MMaatteerriieell

  99..11..  TTeerrmmiinnaauuxx BBrraaiillllee ppiillootteess aa ppaarrttiirr ddee llaa mmeemmooiirree eeccrraann

  Voici  des  terminaux  Braille  qui  peuvent  lire  la  memoire  ecran
  directement  en  mode texte normal. Il est possible de l'utiliser pour
  fonctionner  avec  Linux  pour  quasiment  toutes  les  choses   qu'un
  utilisateur   voyant   peut   faire  sur  la  console,  en  comprenant
  l'installation. Cependant, il a un  probleme  avec  le  defilement  du
  noyau  Linux normal, un patch du noyau doit donc etre applique.  Voyez
  ``Patcher le noyau pour Braillex et Brailloterm''.

  99..11..11..  BBrraaiilllleexx

  Le Braillex est un terminal qui est  fait  pour  lire  directement  la
  memoire  ecran,  s'affranchissant de tout probleme avec les programmes
  MS-DOS qui se comportent  de  facon  bizarre.  Si  vous  pouviez  voir
  quelque  chose  a  l'ecran,  alors ce terminal devrait etre capable de
  l'afficher en Braille. Sous Linux, malheureusement, la manipulation de
  l'ecran  est faite differemment de MS-DOS, et ceci doit par consequent
  etre un peu modifie.

  Pour faire fonctionner ce terminal,  vous  devez  appliquer  le  patch
  donne  ci-dessous  dans la section ``Patcher le noyau''.  Une fois que
  ceci est fait, le Braillex devient une des manieres les plus pratiques
  d'utiliser  Linux  puisqu'il  permet  de  lire toutes les informations
  normalement disponibles pour une personne voyante. D'autres  terminaux
  ne  demarrent  pas  tant  que  le systeme d'exploitation a entierement
  demarre.

  Le Braillex est disponible en deux arrangements  de  cellules  Braille
  (80x1  ou  40x2)  et il y a un modele, appele IB 2-D qui possede aussi
  une barre verticale pour  montrer  les  informations  sur  toutes  les
  lignes  de  l'ecran  (en  utilisant  4  points programmables par ligne
  d'ecran).

       Prix: 8,995 UKP (livres sterling) ou 11495 UKP pour le 2-D
       Fabricant: Alphavision Limited (UK)
       Fournisseurs: ????

  99..11..22..  BBrraaiillllootteerrmm

  ``Qu'est-ce que Brailloterm ?

  C'est  un  afficheur  Braille  rafraichissable,   fabrique   par   KTS
  Kommunikations-Technik  Stolper  GmbH.  Il possede 80 cellules Braille
  sur une ligne  unique.  Chaque  cellule  possede  8  points  qui  sont
  combines  (haut/bas)   pour  representer  un  caractere.  Par  defaut,
  Brailloterm me montre la  ligne  sur  laquelle  le  curseur  ecran  se
  trouve.  Je peux utiliser certaines fonctions du Brailloterm pour voir
  n'importe quelle ligne de l'ecran.'' - _J_o_s_e _V_i_l_m_a_r  _E_s_t_a_c_i_o  _d_e  _S_o_u_z_a
  <jvilmar@embratel.net.br>

  Jose  continue  en  disant que le terminal peut aussi utiliser le port
  serie sous DOS mais qu'il necessite un programme special. Je  ne  sais
  pas si l'un de ceux pour Linux fonctionnerait.

  Comme   pour  le  Braillex,  ceci  necessite  un  patch  special  pour
  fonctionner correctement avec le noyau. Voyez la section ``Patcher  le
  noyau''.

       Prix: autour de 23.000,- DM /  $ 15.000,
       Fabricant: Kommunikations-Technik Stolper GmbH
       Fournisseurs: ????

  99..11..33..  PPaattcchheerr llee nnooyyaauu ppoouurr llee BBrraaiilllleexx eett llee BBrraaiillllootteerrmm

  Ceci  s'applique  aussi  probablement  a  tout  autre terminal qui lit
  directement la memoire ecran pour fonctionner sous MS-DOS.  Cablez-moi
  pour  confirmer  que tous les terminaux que vous trouvez fonctionnent.
  Ceci ne s'applique pas aux terminaux pilotes avec le  logiciel  BRLTTY
  et peut en fait perdre certaines caracteristiques.

  Je  me  suis  laisse  dire  que  ce patch s'applique a tous les noyaux
  version 1.2.X. Il devrait aussi fonctionner sur  tous  les  noyaux  de
  1.1.X  a 1.3.72, avec un simple avertissement (warning) de patch (J'ai
  teste que le patch s'appliquait au moins jusqu'a 1.3.68). AA ppaarrttiirr  ddee
  11..33..7755  llee  ppaattcchh nn''eesstt pplluuss nneecceessssaaiirree parce qu'on peut configurer le
  noyau pour ne pas defiler en utilisant  `linux  no-scroll'  au  prompt
  LILO. Voyez le HOWTO Boot Prompt pour plus de details.

       *** drivers/char/console.c~     Fri Mar 17 07:31:40 1995
       --- drivers/char/console.c      Tue Mar  5 04:34:47 1996
       ***************
       *** 601,605 ****
         static void scrup(int currcons, unsigned int t, unsigned int b)
         {
       !       int hardscroll = 1;

               if (b > video_num_lines || t >= b)
       --- 601,605 ----
         static void scrup(int currcons, unsigned int t, unsigned int b)
         {
       !       int hardscroll = 0;

               if (b > video_num_lines || t >= b)

  Pour l'appliquer :

  1. sauvez le texte ci-dessus dans un fichier (disons patch-file) ;

  2. allez dans le repertoire drivers/char dans vos sources du noyau ;

  3. lancez

                       patch < patch-file

  4. compilez votre noyau comme d'habitude.

  Appliquez  ces  patches  et  vous  devriez  etre capable d'utiliser le
  terminal Braille comme d'habitude pour lire la console Linux.

  En bref, le patch veut juste dire << change le 1 en 0 dans la premiere
  ligne  de la fonction scrup qui devrait etre vers la ligne 603 dans le
  fichier drivers/char/console.c >>. La chose  principale  a  propos  de
  patch  est  que  ce programme comprend ceci, et qu'il sait deviner que
  faire quand  les  developpeurs  Linux  changent  des  choses  dans  ce
  fichier.

  Si  vous  voulez  utiliser  un  noyau  plus moderne avec le defilement
  completement desactive, (au lieu de la solution du prompt de demarrage
  que j'ai deja mentionnee), veuillez utiliser le patch suivant. CCeeccii nnee
  ss''aapppplliiqquuee ppaass aauuxx nnooyyaauuxx aanntteerriieeuurrss aa 11..33..7755.

       *** console.c~  Fri Mar 15 04:01:45 1996
       --- console.c   Thu Apr  4 13:29:48 1996
       ***************
       *** 516,520 ****
         unsigned char has_wrapped;          /* all of videomem is data of fg_console */
         static unsigned char hardscroll_enabled;
       ! static unsigned char hardscroll_disabled_by_init = 0;

         void no_scroll(char *str, int *ints)
       --- 516,520 ----
         unsigned char has_wrapped;          /* all of videomem is data of fg_console */
         static unsigned char hardscroll_enabled;
       ! static unsigned char hardscroll_disabled_by_init = 1;

         void no_scroll(char *str, int *ints)

  99..22..  TTeerrmmiinnaauuxx BBrraaiillllee ppiillootteess ppaarr llooggiicciieell

  Le principe de fonctionnement de ces  terminaux  est  tres  proche  de
  celui  d'un  terminal  comme  le  VT100. Ils se connectent sur le port
  serie et l'ordinateur doit lancer un programme  qui  leur  envoie  une
  sortie.  En  ce  moment on connait deux programmes pour Linux. BRLTTY,
  voir la section ``BRLTTY'') et l'ecran ameliore Braille.

  99..22..11..  TTiieemmaann BB..VV..

  99..22..11..11..  CCoommbbiiBBrraaiillllee

  Ce terminal Braille est supporte par le logiciel BRLTTY. IL est fourni
  en  trois  versions  avec  25,  45  ou  85  cellules Braille. Les cinq
  cellules supplementaires  par  rapport  a  un  affichage  normal  sont
  utilisees pour les informations d'etat.

       Prix: autour de 4600 UKP pour le modele 45 cellules...
       Fabricant: Tieman B.V.
       Fournisseurs: Concept Systems, Nottingham, England (telephone +44 115 925 5988)

  99..22..22..  AAllvvaa BB..VV..

  Les  modeles  ABT3xx sont supportes par BRLTTY. Seul le ABT340 est sur
  de fonctionner en ce moment.  Veuillez  donner  des  informations  aux
  auteurs de BRLTTY sur les autres modeles.

       Prix : 20 cellules, 2200 UKP ; 40 cellules, 4500 UKP ; 80 cellules, 8000 UKP
       Fabricant : Alva
       Fournisseurs : Professional Vision Services LTD, Hertshire, Angleterre
                      (+44 1462 677331)

  99..22..33..  AAffffiicchheeuurrss TTeelleesseennssoorryy SSyysstteemmss IInncc..

  Les  afficheurs  Telesensory  sont  supportes  a la fois par BRLTTY et
  screen, parce qu'ils ont fourni des informations sur la  programmation
  aux developpeurs.

  99..22..33..11..  PPoowweerrBBrraaiillllee

  Il  y  a trois modeles, le 40, le 65 et le 80. Seul le 40 est supporte
  par BRLTTY.

       NdT : prix apparemment faux dans la version originale

  99..22..33..22..  NNaavviiggaattoorr

  Encore une fois, il y a trois modeles, le 20, le  60  et  le  80.  Des
  versions recentes fonctionnent toutes avec BRLTTY mais le fait que des
  versions plus anciennes (avec un logiciel  constructeur  plus  ancien)
  fonctionnent aussi n'a pas ete confirme.

  Prix : 80 cellules, 7800 UKP
  Fabricant : Alva
  Fournisseurs : Professional Vision Services LTD, Hertshire, Angleterre
                 (+44 1462 677331)

  99..22..44..  BBrraaiillllee LLiittee

  Ceci  est  plus  un  ordinateur  portable qu'un terminal. Il pourrait,
  cependant, etre  utilise  avec  BRLTTY  version  0.22  (mais  pas  les
  versions  plus  recentes) comme si c'etait un terminal Braille normal.
  Malheureusement,  beaucoup  des  possibilites  disponibles   avec   le
  CombiBraille  ne peuvent pas etre utilisees avec le Braille Lite. Ceci
  veut dire que l'on devrait  l'eviter  autant  que  possible  pour  une
  utilisation avec Linux.

       Prix: $3,395.00
       Fabricant: Blazie Engineering

  99..33..  SSyynntthheettiisseeuurrss vvooccaauuxx

  Les  syntehtiseurs vocaux se connectent generalement sur le port serie
  d'un PC.  Les possibilites utiles comprennent :

  +o  des libelles en Braille sur les parties ;

  +o  beaucoup de voix pour permettre  a  des  parties  differentes  d'un
     document d'etre parlees differemment ;

  +o  l'utilisation  avec  des  ecouteurs  (non  disponible  sur tous les
     modeles).

  Le probleme critique est celui de  la  qualite  de  parole.  Ceci  est
  beaucoup  plus  important  pour  quelqu'un qui utilise le synthetiseur
  vocal comme principale source d'informations que  pour  quelqu'un  qui
  obtient simplement des beaux sons dans un jeu. Pour cette raison, T.V.
  Raman  semble  ne  recommander  que  le  DECTalk.   D'autres   options
  acceptables viendraient bien a propos.

  99..33..11..  DDEECCTTaallkk EExxpprreessss

  Ceci  est  un  synthetiseur  vocal  materiel.  Il  est  recommande  de
  l'utiliser avec Emacspeak et en fait la gamme  des  DECTalk  sont  les
  seuls  synthetiseurs  vocaux  qui fonctionnent avec ce paquetage en ce
  moment. Ce synthetiseur possede toutes les possibilites utiles que  je
  connaisse.  Le  seul  desavantage que je connaisse en ce moment est le
  prix.

  Prix: $1195.00
  Fabricant: Digital Equipment Corporation

  Fournisseurs: Beaucoup. J'aimerais des details sur ceux qui ont un
  support specifique a Linux / livraisons internationales ou autres choses
  notables. Sinon reportez-vous aux organisations locales, a Digital meme ou au
  pages WWW d'Emacspeak.

  99..33..22..  AAcccceenntt SSAA

  Voici un synthetiseur fabrique par  Aicom  Corporation.  Un  effort  a
  demarre  pour  en  ecrire  un  pilote,  mais  cependant ils ont besoin
  d'aide.                          Veuillez                         voir
  <http://www.cyberspc.mb.ca/~astrope/speak.html> si vous pensez pouvoir
  apporter votre aide.

  99..33..33..  ppuuccee SSppeeaakk aanndd SSppeellll SSPPOO225566--AALL22

  Un interet a ete prononce pour l'utilisation de cette  puce  dans  des
  circuits  vocaux  en kit. Je serais interesse de savoir si quelqu'un a
  trouve ceci utile. Un paquetage logiciel, speak-0.2pl1.tar.gz,  a  ete
  produit  par  David  Sugar,  <dyfet@tycho.com>.  Ce  que  je  redoute,
  cependant, est que la qualite du rendu ne soit pas  assez  bonne  pour
  une utilisation reguliere.

  1100..  RReemmeerrcciieemmeennttss

  De  nombreuses  parties  de  ce  document  ont  ete creees a partir de
  sources d'informations variees sur  Internet,  beaucoup  trouvees  sur
  Yahoo   et   le  moteur  de  recherche  AltaVista  de  DEC.  Celles-ci
  comprenaient la documentation de la plupart des  paquetages  logiciels
  mentionnes  dans ce texte. Certaines informations ont ete glanees dans
  les  feuilles  d'aide  du  Royal  National  Institute  for  the  Blind
  (institut royal national pour les aveugles).

  T.V.  Raman,  l'auteur  d'Emacspeak  a  apporte  de maniere fiable des
  commentaires, des informations et du texte et m'a mis en contact  avec
  d'autres personnes qu'il connaissait sur Internet.

  Kenneth Albanowski <kjahds@kjahds.com> a fourni le patch necessaire au
  Brailloterm et les informations s'y rapportant.

  Roland Dyroff de S.u.S.E. GmbH (Les  distributeurs  et  fabricants  de
  S.u.S.E. Linux (Anglais/Allemand)) ont recherche KTS Stolper GmbH a ma
  demande et ont obtenu quelques details materiels et  des  informations
  sur le Brailloterm.

  Les  verifications  les  plus  grandes et les plus attentionnees de ce
  document ont ete faites par  James  Bowden,  <jrbowden@bcs.org.uk>  et
  Nikhil  Nair  <nn201@cus.cam.ac.uk>,  les  auteurs  de  BRLTTY qui ont
  suggere un grand nombre de corrections  autant  que  des  informations
  supplementaires sur certains sujets.

  Les  contributeurs  des  listes de distribution blinux et linux-access
  ont contribue a ce document en me fournissant  des  informations  pour
  que je les lise.

  Mark     E.     Novak,     du     centre    de    recherches    Trace,
  <http://trace.wisc.edu/>,  m'a  dirige   vers   plusieurs   paquetages
  logiciels  et  des informations que je n'avais encore jamais vus. Il a
  aussi fait certains commentaires sur la structure du document que j'ai
  en partie pris en compte et je devrais surement en faire plus.

  D'autres contributeurs comprennent Nicolas Pitrie et Stephane Doyon.

  Quelques   autres  personnes  ont  apporte  des  commentaires  et  des
  informations.   Les  apports  specifiques  sont  remercies   dans   le
  document.

  Cette  version  a ete produite specialement pour le livre Dr. Linux de
  RedHat. Ceci parce qu'ils m'ont averti de sa sortie  immediate,  ainsi
  qu'a  d'autres  auteurs  du  LDP.   J'apprecie fortement leur facon de
  faire puisque  des  informations  fausses  ou  vieilles  restent  plus
  longtemps dans un livre que sur Internet.

  Il  n'y  aucun  doute  que  vous ayez fait un apport et je ne l'ai pas
  mentionne. Ne vous inquietez pas, c'etait un accident. Je suis desole.
  Dites-le moi et je vous ajouterai a la prochaine version.

  Breve introduction aux systemes et processeurs Alpha
  Neal  Crook, Digital Equipment (Publication: David Mosberger
  <mailto:davidm@azstarnet.com>)  (Adaptation  Francaise   par
  Christophe Vallat (miodrag@mygale.org))
  V0.11, 6 Juin 1997

  Ce  document  est  un  rapide apercu des processeurs et systemes Alpha
  existants.  Il y a un peu de parti pris, a  cause  de  mon  experience
  personnelle. Bien que je sois un employe de Digital Equipment Corpora-
  tion, il ne s'agit pas d'un d'un document officiel de Digital  et  les
  opinions exprimees sont les miennes, pas celles de Digital.

  11..  QQuu''eesstt--ccee qquuee AAllpphhaa ??

  "Alpha"  est le nom donne a l'architecture RISC 64 bits de Digital. Le
  projet Alpha commenca a Digital a la mi-1989, dans le but  de  fournir
  une  voie  de  migration haute-performance pour les clients VAX. Il ne
  s'agit pas de la premiere architecture RISC produite par Digital, mais
  ce  fut la premiere a etre mise sur le marche. Quand Digital a annonce
  Alpha en mars 1992, elle a pris la decision d'entrer sur le marche des
  composants electroniques en vendant des microprocesseurs Alpha.

  Alpha  est parfois designe par Alpha AXP, pour de vieilles et obscures
  raisons qu'il est inutile de preciser. Il suffit  de  dire  que  c'est
  exactement la meme chose.

  22..  QQuu''eesstt--ccee qquuee DDiiggiittaall SSeemmiiccoonndduuccttoorr ??

  Digital   Semiconductor   <http://www.digital.com/info/semiconductor/>
  (DS) est la  section  commerciale  de  Digital  Equipment  Corporation
  (Digital  -  nous  n'aimons  pas le sigle DEC) qui vend les composants
  electroniques. Parmi les produits de Digital figurent les processeurs,
  les chipsets associes, les pontages PCI-PCI et les composants PCI pour
  la communication et le multimedia.

  33..  PPrroocceesssseeuurrss AAllpphhaa

  Il y a actuellement 2 generations de base de  processeur  implementant
  l'architecture Alpha :

  +o  EV4

  +o  EV5

  Les  avis different quant au sens de "EV" (note : la vraie reponse est
  bien entendu "Electro Vlassic" ``[1]''), mais le chiffre represente la
  premiere  generation  de  technologie CMOS de Digital avec laquelle le
  processeur a ete concu. Ainsi, EV4 a ete initialement concue en CMOS4.
  Au fil du temps, un processeur tend a trouver une nouvelle jeunesse en
  etant optiquement retrecie dans la nouvelle generation de  CMOS.  EV45
  est  donc  la  base  EV4 concue en CMOS5. Il y a une grande difference
  entre retrecir une conception pour une technologie particuliere et  la
  reconcevoir  pour  cette  technologie (mais je ne veux pas entrer dans
  les  details).  Il  y  a  encore  quelques  variantes  :   la   CMOS4S
  (retrecissement optique de la CMOS4) et une CMOS5L.

  Les  vrais  technophiles  seront  curieux  de savoir que CMOS4 est une
  gravure en 0,75 micron, CMOS5 est une gravure en 0,5 micron, et  CMOS6
  est une gravure en 0,35 micron.

  Pour faire correspondre ces bases de processeur aux _p_u_c_e_s nous avons:

     2211006644--115500,,116666
        EV4 (initialement), EV4S (maintenant)

     2211006644--220000
        EV4S

     2211006644AA--223333,,227755,,330000
        EV45

     2211006666
        LCA4S (base EV4, avec coprocesseur EV4)

     2211006666AA--223333
        LCA45 (base EV4, mais avec coprocesseur EV45)

     2211116644--223333,,330000,,333333
        EV5

     2211116644AA--441177
        EV56

     2211226644
        EV6 <http://www.mdronline.com/report/articles/21264/21264.html>

  La  base  EV4  est  un  noyau  double-ecoulement  (il  peut  traiter 2
  instructions processeur par cycle d'horloge) super-pipeline  avec  une
  unite  de calcul entier, une unite de calcul flottant et prediction de
  branchement. Il a des bus de donnees internes de 64 bits et des caches
  de 8Ko etroitement couples, un jeu de chaque pour les instructions, et
  pour les donnees. Les  caches  sont  en  ecriture  immediate  ("write-
  through").

  La  base  EV45  a  quelques  ameliorations par rapport a la base EV4 :
  l'unite de calcul flottant est legerement  amelioree,  et  les  caches
  sont de 16Ko. (Note : Neal Crook a indique dans un courrier separe que
  les  modifications  de  l'unite  de  calcul  flottant  ameliorent  les
  performances  de la division. La FPU de l'EV4 prend 34 cycles pour une
  division en simple precision et 63 cycles pour une division en double-
  precision  (quelles que soient les donnees). En comparaison, le FPU de
  l'EV45 prend generalement 19  cycles  (34  au  pire)  pour  la  simple
  precision  et  29  cycles  (63  au  pire) pour la double-precision (en
  fonction des donnees).)

  La base  EV5  est  un  noyau  quadruple-ecoulement,  egalement  super-
  pipeline  etc  etc. Il a des caches de 8 Ko etroitement couples, un de
  pour les instructions et un pour  les  donnees.  Ces  caches  sont  en
  ecriture immediate. Il dispose egalement d'un cache de deuxieme niveau
  de 96 Ko sur le processeur (le Scache) qui est  associatif  3-morceaux
  et  en  ecriture  differee  ("write back").  Le gain de performance de
  l'EV4 a l'EV5 est superieur au seul gain genere par l'augmentation  de
  la  frequence.  En  plus  des  caches  plus  grands  et  du quadruple-
  ecoulement, il y a aussi des  ameliorations  de  sa  microarchitecture
  pour   reduire   les   temps  d'attente  producteur/consommateur  dans
  certaines voies.

  La base EV56 est fondamentalement la meme microarchitecture que l'EV5,
  mais  ajoute  quelques  nouvelles  instructions  pour  la  lecture  et
  l'ecriture sur 8  et  16  bits  (cf.  section  ``Les  octets  et  leur
  multiples'').  Elles  sont  principalement  destinees  aux  pilotes de
  peripheriques. La base EV56 est realisee en CMOS6, en 2,0 Volts.

  Le 21064 a ete annonce en mars 1992. Il utilise la base EV4,  avec  un
  bus  de  128  bits. L'interface du bus supporte une connexion 'facile'
  d'un cache externe de deuxieme niveau, avec une taille de bloc de  256
  bits  (2  fois  la  taille  du  bus).  La  vitesse  de  ce  Bcache est
  entierement configurable logiciellement.  Le  21064  peut  aussi  etre
  configure  pour  utiliser  un  bus  externe  de 64 bits (mais je crois
  qu'aucun  systeme  n'utilise  ce  mode).  Le  21064  n'impose   aucune
  contrainte  sur  le  Bcache,  mais  il  est  generalement configure en
  ecriture differee. Le  21064  contient  un  systeme  permettant  a  du
  materiel  separe de maintenir la coherence entre le Bcache et le cache
  interne, mais c'est complexe.

  Le 21066 utilise la base EV4 et integre un controleur de memoire et un
  pontage  de  bus  PCI.  Pour  economiser des broches, le controleur de
  memoire a un bus de 64 bits (mais les caches internes ont  une  taille
  de  bloc de 256 bits, comme le 21064, donc une lecture de bloc prend 4
  cycles du bus). Le controleur de memoire supporte le BCache et la DRAM
  externe.   La  vitesse  du  Bcache  et  de  la  DRAM  est  entierement
  configurable logiciellement, et peut etre controle  a  la  vitesse  du
  processeur.  La decomposition en 4 acces pour remplir un bloc de cacte
  n'est pas si mauvais qu'on peut le penser parce que l'acces a la  DRAM
  est  fait  en mode page.  Malheureusement, le controleur de memoire ne
  supporte ni les types de DRAM esoterique (SDRAM, EDO ou BEDO), ni  les
  RAMs  de  cache  synchrone.  L'interface  du  bus  PCI est entierement
  compatible avec PCI 2.0 et tourne jusqu'a 33 MHz.

  Le 21164 a un bus de donnees de 128  bits  et  supporte  les  lectures
  partielles,  avec jusqu'a deux lectures en cours en meme temps (ce qui
  permet une utilisation a 100% du bus de donnees  dans  les  meilleures
  conditions  de  reve, i.e. il est possible theoriquement de transferer
  128 bits de donnees a chaque cycle du  bus).  Le  21164  supporte  une
  connexion  facile d'un cache de troisieme niveau (Bcache) et a tout le
  systeme pour permettre a du materiel externe de maintenir la coherence
  de tous les caches. De cette facon, les conceptions de multiprocesseur
  symetrique sont 'faciles'.

  Le 21164A a ete annonce en octobre 1995. Il utilise la base EV56.  Son
  brochage est compatible avec celui du 21164, mais necessite des lignes
  d'alimentation separees ; toutes les broches qui  etaient  +3,3  Volts
  sur  le 21164 ont ete divisees en deux groupes ; un groupe fournit 2,0
  Volts au coeur du processeur, l'autre fournissant 3,3 Volts aux unites
  d'entrees/sorties.    Contrairement  aux  anciennes  conceptions,  les
  broches  du  21164A  n'acceptent  pas  5  Volts.  Le  resultat  de  ce
  changement  est  que les systemes 21164 ne peuvent en general pas etre
  mis a jour en 21164A (bien qu'il soit relativement simple de concevoir
  un  systeme  21164A  qui  puisse  aussi  accepter un 21164). Le 21164A
  dispose egalement de quelques nouvelles  broches  pour  supporter  les
  lectures  et  ecritures  sur  8  et  16 bits. Il ameliore egalement le
  support du 21164 pour les SRAMs synchrones qui composent le Bcache.

  44..  PPeerrffoorrmmaanncceess ccoommppaarreeeess dduu 2211006644 eett dduu 2211006666

  Le 21064 et le 21066 ont la meme base  (EV4).  Si  le  meme  programme
  tourne  sur  un  21064  et  un  21066,  a  la meme frequence, alors la
  difference de performance provient uniquement  de  la  bande  passante
  entre  le  Bcache et la memoire. Du code qui tombe principalement dans
  les caches _i_n_t_e_r_n_e_s tournera aussi rapidement. Il  y  a  2  principaux
  tueurs de performances :

  1. Du  code  qui  ecrit  enormement. Malgre les buffers en ecriture du
     21064 et du 21066 pour economiser  certains  delais,  du  code  qui
     ecrit enormement sera etrangle par la bande passante en ecriture du
     bus systeme. Cela est du au fait que les cache du  processeur  sont
     en ecriture immediate.

  2. Du  code  qui  veut  traiter  les  flottants  en  tant  qu'entiers.
     L'architecture Alpha ne permet pas des transferts  entre  registres
     entiers  et  registres  flottants.  Une  telle conversion doit etre
     faite en memoire (Et du coup, puisque les caches du processeur sont
     en  ecriture immediate, via le Bcache). (Note : il semble que l'EV4
     et l'EV45 peuvent effectuer la conversion via le premier  cache  de
     donnees (Dcache), a partir du moment ou la memoire est cachee. Dans
     ce cas, l'ecriture faite par la sequence  de  conversion  mettra  a
     jour  le  Dcache  et  la lecture qui va suivre sera, dans certaines
     circonstances, capable de lire la  valeur  du  Dcache,  evitant  un
     couteux  transfert  depuis  le  Bcache.  En  particulier, il semble
     meilleur d'executer les instructions stq/ldt ou stt/ldq dos a  dos,
     ce qui est plutot contraire a l'intuition.)

  Si vous effectuez la meme comparaison entre un 21064A et un 21066A, il
  y a un facteur supplementaire du aux differentes tailles des Icache et
  Dcache entre les deux processeurs.

  Maintenant,  le  21164 resoud ces deux problemes : il atteint des _b_i_e_n
  meilleures bandes passantes du bus systeme (malgre le meme  nombre  de
  broches  de  signal - oui, je _s_a_i_s que c'est a peu pres deux fois plus
  qu'un 21064, mais les supplementaires sont l'alimentation et la  masse
  !  (oui,  reellement!!))  et  il a des caches en ecriture differee. Le
  seul probleme restant est la reponse a la question "combien  il  coute
  ?"

  55..  QQuueellqquueess nnootteess ssuurr lleess ffrreeqquueenncceess

  Tous  les  processeurs  Alpha  actuels  utilisent des horloges a haute
  vitesse, parce que leur  microarchitecture  a  ete  concue  comme  "en
  cycles  courts". Cependant, du coup, aucun des bus systemes n'a besoin
  de tourner a de telles vitesses  :

  +o  sur les 21066(A), 21064(A) et 21164 la  vitesse  du  cache  externe
     (Bcache) est entierement programmable, a la resolution de l'horloge
     du processeur. Par exemple, pour un processeur a 275 MHz, le  temps
     d'acces en lecture du Bcache peut etre controle avec une resolution
     de 3,6 ns.

  +o  sur les 21066(A), la vitesse des DRAM est entierement programmable,
     a  la resolution de l'horloge du processeur (_p_a_s celle du bus PCI).

  +o  sur les 21064(A) et 21164(A), la frequence du bus  systeme  est  un
     sous-multiple  de  cele  du processeur. La plupart des cartes meres
     21064 utilisent une horloge du bus systeme a 33 MHz.

  +o  Le systemes a base de 21066 peuvent faire  tourner  le  bus  PCI  a
     n'importe  quelle  frequence par rapport au processeur. En general,
     le bus PCI tourne a 33 MHz.

  +o  Les systemes qui utilisent les chipset APECS (cf. section ``'') ont
     toujours  la  frequence du bus processeur egale a celle du bus PCI.
     Cela signifie que les deux bus tendent a tourner  soit  a  25  MHz,
     soit  a  33  MHz  (puisque  ce  sont  les frequences qui sont sous-
     multiples de celle  du  processeur).  Sur  les  systemes  APEC,  la
     vitesse  du  controleur  de DRAM est programmable logiciellement en
     fonction de la frequence du bus processeur.

  NNoottee:: quelqu'un a suggere qu'il obtenait de mauvaises performances sur
  un systeme 21066 parce que le controleur de memoire du 21066 ne tourne
  qu'a 33 MHz. En fait, ce sont  soulement  les  systemes  super-rapides
  21064A  qui  ont des controleurs de memoire qui tournent 'seulement' a
  33 MHz.

  66..  LLeess cchhiippsseett

  DS vend deux chipsets de support processeur. Le chipset 2107x (denomme
  APECS)  supporte  les  21064(A).  Le  chipset  2117x  (denomme  ALCOR)
  supporte les 21164. Il y aura aussi un chipset 2117xA  (denomme  ALCOR
  2) qui supportera le 21164A.

  Ces  deux  chipsets  fournissent  des  controleurs  de  memoire et des
  pontages PCI pour leur processeur. APECS fournit un pontage PCI de  32
  bits,  ALCOR  fournit un pontage PCI de 64 bits qui (conformement a la
  specification PCI) peut supporter des peripheriques PCI aussi bien  32
  bits que 64 bits.

  APECS  consiste  en  6  puces  de  208 broches (4 registres de 32 bits
  (DECADE), 1 controleur systeme (COMANCHE), 1 controleur  PCI  (EPIC)).
  Il  fournit  un  controleur  de  DRAM (bus memoire de 128 bits) et une
  interface PCI. Il effectue egalement tout le travail de maintien de la
  coherence  quand  un  peripherique PCI effectue une operation DMA vers
  (ou depuis) la memoire.

  ALCOR consiste en 5 puces (4 registres de 64 bits (Data  Switch,  DSW)
  208  broches  PQFP  et  1  controleur (Control, I/O Address, CIA) - un
  boitier plastique de 383 broches). Il fournit un  controleur  de  DRAM
  (bus memoire de 256 bits) et une interface PCI.  Il effectue egalement
  tout le travail de maintion de coherence  quand  un  peripherique  PCI
  effectue une operation DMA vers (ou depuis) la memoire.

  Il  n'existe pas de chipset supportant le 21066, puisque le controleur
  de memoire et le pontage PCI sont integres dans le processeur.

  77..  LLeess ssyysstteemmeess

  Le groupe applications de  DS  produit  des  exemples  de  conceptions
  utilisant  les  processeurs  et  leurs  chipsets  associes.  Il s'agit
  typiquement  de  cartes  meres  de  format  PC-AT,  avec  toutes   les
  fonctionnalites  que  vous  trouverez  typiquement  sur une carte mere
  Pentium haut  de  gamme.  Initialement,  ces  exemples  de  conception
  etaient  destines  a  etre  utilises  comme  point  de depart pour des
  tierces parties pour concevoir des cartes meres.  Ces  conceptions  de
  premiere  generation  furent nommees Evaluation Boards (EB).  Comme la
  quantite de  travail  necessaire  pour  concevoir  une  carte  mere  a
  augmente  (a  cause  de la montee en frequence des processeurs et pour
  respecter les regles sur l'emission de frequences  radio)  l'accent  a
  ete  mis  sur  la  conception  de  cartes  meres  utilisables pour une
  production en masse.

  Les groupes systeme de Digital ont produit  plusieurs  generations  de
  machines  a  base  de  processeurs  Alpha.  Certains  de  ces systemes
  utilisent des chipsets  concues  par  les  groupes  systeme,  d'autres
  utilisent  les  chipsets  de  DS.  Dans  certains  cas,  les  systemes
  utilisent une combinaison des deux.
  Plusieurs tierces  parties  ont  construit  des  systemes  a  base  de
  processeurs  Alpha.  Certaines  de  ces  entreprises  ont  concu leurs
  systemes a partir de zero, d'autres ont utilise les chipsets de DS, ou
  ont  copie/modifie  les  exemples  de  conception de DS, ou simplement
  assemblent leurs systemes a partir des cartes fabriquees et  verifiees
  par DS.

  L'EB64  : Conception obsolete utilisant un 21064 avec un controleur de
  memoire implemente en logique  programmee.  Entrees/Sorties  realisees
  par de la logique programmee pour s'interfacer a un chipset de pontage
  486<->ISA. Ethernet, SuperI/O (2S, 1P, LD) integre sur la carte  mere,
  bus ISA. Taille PC-AT. Alimentation standard PC.

  L'EB64+  :  Utilise un 21064 ou un 21064A, et un APECS. Bus ISA et PCI
  (3 emplacements ISA, 2 emplacements PCI, une paire sur un  emplacement
  partage).  Supporte des SIMMs de DRAM 36 bits. Le bus ISA est gere par
  un chipset de pontage Intel Saturn. Controleur  SCSI  (NCR  810  PCI),
  ethernet   (Digital  21040),  controleur  clavier  et  souris  (PS/2),
  SuperI/O (2S, 1P, LD), memoire CMOS et horloge sur la carte mere.  ROM
  de demarrage en EPROM. Taille PC-AT. Alimentation standard PC.

  L'EB66  :  Utilise  un  21066  ou un 21066A. Le sous-systeme d'entrees
  sorties  est  identique  a  celui  de  l'EB64+.  Taille  baby   PC-AT.
  Alimentation  standard  PC.  Les schemas de l'EB66 furent publies dans
  des publicites vantant le 21066 comme "le premier  microprocesseur  au
  monde  avec  PCI integre" (pour les amateurs d'anecdotes : il y a deux
  versions de cette publicite - j'ai dessine les circuits  et  ecrit  le
  boniment  dans  la  premiere version, et des americains ont malmene le
  boniment pour la deuxieme version)

  L'EB164 : Utilise un 21164 et ALCOR. Bus ISA et  PCI  (3  emplacements
  ISA,  2  emplacements PCI 64 bits (dont un partage avec un emplacement
  ISA) et 2 emplacements PCI 32 bits). Emplacement SIMM pour le  Bcache.
  Le  sous-systeme d'entrees sorties fournit un controleur SuperI/O (2S,
  1P, LD), un controleur clavier  et  souris  (PS/2),  memoire  CMOS  et
  horloge.  ROM  de  demarrage en memoire flash. Taille PC-AT. Necessite
  une alimentation en 3,3 Volts.

  L'AlphaPC64  (aussi  nommee  Cabriolet)  :  derive  de  l'EB64+   mais
  desormais  en taille baby PC-AT avec une ROM de demarrage en flash, et
  plus de controleur SCSI et ethernet sur la carte mere. 3  emplacements
  ISA,  4  emplacements  PCI  (dont un partage avec un emplacement ISA),
  emplacement SIMM pour le Bcache. Necessite  une  alimentation  en  3,3
  Volts.

  L'AXPpci33   (aussi  nommee  NoName),  est  basee  sur  l'EB66.  Cette
  conception est produite par le groupe technique OEM de Digital (TOEM).
  A  base  d'un  processeur  21066 tournant a 166 MHz ou 233 MHz. Taille
  baby PC-AT, necessite une alimentation standard  PC.   5  emplacements
  ISA  et  3 emplacements PCI (dont un partage avec un emplacement ISA).
  Il existe deux versions, avec un connecteur soit PS/2, soit  DIN  pour
  le clavier.

  D'autres  cartes  meres  a  base  de 21066 : la plupart, sinon toutes,
  disponibles sur le marche sont basees  sur  l'EB66  -  il  n'y  a  pas
  beaucoup  d'options  dans  la conception d'un systeme 21066, parce que
  tout le controle est fait par les puces.

  Multia (aussi nomme Universal Desktop Box) : il  s'agit  d'un  systeme
  boitier  bureau  tres  compact a base de 21066. Il comporte deux ports
  PCMCIA, une carte graphique 21030 (TGA), une carte ethernet  21040  et
  un  controleur SCSI NCR 810, ainsi qu'un lecteur de disquettes, 2 port
  serie et un port parallele. Ses capacites  d'extension  sont  limitees
  (un  emplacement  PCI) a cause de sa petite taille (il y a en plus des
  restrictions sur l'utilisation de l'emplacement PCI,  dont  je  ne  me
  souviens  plus).  (Notez que des Multia a base de 21066A ou de Pentium
  sont aussi disponibles).

  DEC PC 150 AXP (aussi nomme Jensen) :  c'est  un  tres  vieux  systeme
  Digital  -  l'un  des  systemes Alpha de premiere generation. Il n'est
  mentionne ici que parce qu'un certain nombre de ces systemes  semblent
  etre disponibles sur le marche de l'occasion. Le Jensen est un systeme
  grande tour qui utilise un 21064 a 150 MHz (des versions plus recentes
  utiliserent  des  processeurs plus rapides mais je ne suis pas sur des
  vitesses). Il utilisait de la logique programmee  pour  interfacer  le
  processeur a un pontage 486<->EISA.

  D'autres  systemes a base de 21064(A) : il existe encore 3 ou 4 autres
  conceptions de cartes mere (sans compter les _s_y_s_t_e_m_e_s Digital) et tous
  ceux que je connais sont derives de l'EB64+. Parmi ceux-ci :

  +o  EB64+   (certains   vendeurs   l'ont   assemble   et   vendu   sans
     modifications); taille AT.

  +o  Carte mere Aspen Systems : derivee de l'EB64+ ; taille baby AT.

  +o  Carte serveur Aspen Systems : beaucoup d'emplacements  PCI  (inclut
     un pontage PCI).

  +o  AlphaPC64 (aussi nommee Cabriolet), taile baby AT.

  D'autres systemes a base de 21164(A) : le seul que je connaisse qui ne
  soit pas un simple clone d'un EB164 est un systeme de DeskStation.  Ce
  systeme   est   construit   avec   un   controleur   de   memoire   et
  d'entrees/sorties proprietaire de DeskStation. Je ne sais  pas  quelle
  est leur attitude vis-a-vis de Linux.

  88..  LLeess oocctteettss eett lleeuurr mmuullttiipplleess

  Quand  l'architecture  Alpha  fut  presentee,  elle  etait  unique par
  rapport aux autres architectures RISC en  empechant  les  lectures  et
  ecritures  sur 8 et 16 bits. Elle supportait les lectures et ecritures
  sur 32 et 64 bits (mot long et quadruple  mot,  dans  la  terminologie
  Digital).  Les  co-architectes (Dick Sites et Rich Witek) justifiaient
  ce choix par ces avantages :

  1. Le support des octets dans le cache et le sous-systeme memoire tend
     a ralentir les acces pour les quantites de 32 et 64 bits.

  2. Le  support  des  octets rend difficile la creation d'un circuit de
     correction d'erreur haute-vitesse dans le cache et le  sous-systeme
     memoire.

  L'Alpha  compense  par de puissantes instructions pour la manipulation
  des octets et des groupes d'octets dans les registres de 64 bits.  Les
  tests  de performances standard pour les operations sur les chaines de
  caracteres (par exemples, certains tests de Byte) montrent que l'Alpha
  se comporte tres bien pour la manipulation des octets.

  L'absence  de  lectures et ecritures sur octet a des repercussions sur
  certains semaphores logiciels et sur la conception  des  sous-systemes
  d'entrees/sorties.   La   solution   de   Digital   au   probleme  des
  entrees/sorties est  d'utiliser  certaines  lignes  d'adresse  de  bas
  niveau  pour specifier la taille des donnees pendant les transferts de
  donnees, et de les decoder en masque d'octets. Cet  adressage  denomme
  "adressage clairseme" gache une partie de l'espace d'adressage et rend
  l'espace d'entrees/sorties non contigue  (j'en  dirais  plus  sur  cet
  adressage  clairseme  quand  j'aurai  fini  par  l'ecrire).  Notez que
  l'espace d'entrees/sorties, dans ce contexte, se refere a  toutes  les
  ressources  presentes  sur  le bus PCI et comprend aussi bien l'espace
  memoire PCI que l'espace d'entrees/sorties PCI.

  Avec l'apparition du 21164A, l'architecture Alpha a ete  etendue  pour
  inclure l'adressage des octets. L'execution des nouvelles instructions
  sur un  processeur  plus  ancien  declenchera  une  exception  PALcode
  OPCDEC,  pour  que  le  PALcode puisse gerer cet acces.  Cela aura une
  incidence sur les performances. Les ramifications  de  ceci  font  que
  l'utilisation  de  ces instructions devraient (a mon humble avis) etre
  limitee aux pilotes de peripheriques plutot qu'aux applications.

  Ces nouvelles possibilite de  lecture  et  ecriture  au  niveau  octet
  signifient  que  de  futurs  chipsets  pourront  supporter  un  espace
  d'entrees/sorties contigue.

  99..  LLee PPAALLccooddee

  Cet emplacement est destine a une section expliquant  le  PALcode.  Je
  l'ecrirai s'il y a suffisemment d'interet.

  1100..  PPoorrttaabbiilliittee

  La  possibilite  de  faire  tourner Linux sur n'importe quelle machine
  Alpha est generalement limitee par  votre  possibilite  d'obtenir  des
  informations  sur  les  details  sanglants de ses arcanes. Puisque des
  portages de Linux existent pour les cartes meres EB66, EB64+ et EB164,
  tous  les  systemes  bases  sur  les 21066, 21064/APECS et 21164/ALCOR
  devraient pouvoir faire tourner  Linux  avec  tres  peu  voire  aucune
  modification.  La  principale difference entre toutes ces cartes meres
  est la facon dont elles diffusent les  interruptions.  Il  y  a  trois
  sources d'interruptions :

  +o  peripheriques integres

  +o  peripheriques PCI

  +o  peripheriques ISA

  Tous  les  systemes  utilisent un systeme de pontage d'entrees/sorties
  (SIO) Intel en tant que pontage entre les  bus  PCI  et  ISA  (le  bus
  principal  est  PCI,  le  bus  ISA  est un bus secondaire utilise pour
  supporter  les  peripheriques  anciens  ou  basse  vitesse).   Le  SIO
  contient la traditionnelle paire de 8259 chaines.

  Certains   systemes   (par   exemple   le   NoName)   diffusent  leurs
  interruptions via le SIO vers le processeur. Certains systemes ont  un
  controleur    d'interruptions   separe   et   diffusent   toutes   les
  interruptions PCI plus l'interruption SIO  (sortie  du  8259)  via  ce
  controleur, et toutes les interruptions ISA via le SIO.

  Les autres differences entre ces systemes comprennent :

  +o  de combien d'emplacements ils disposent

  +o  quels sont les peripheriques PCI integres

  +o  si la ROM de demarrage est en memoire flash ou en EPROM

  1111..  PPlluuss dd''iinnffoorrmmaattiioonnss

  Toutes les conceptions de cartes d'evaluation et de cartes meres de DS
  sont libres de droits et la documentation complete pour une conception
  coute environ 50$ (300FF). Cela comprend tous les schemas, les sources
  des parties programmees, les feuilles d'informations du processeur  et
  du  chipset.  Les  kits  de  documentation sont disponibles aupres des
  distributeurs de Digital Semiconductor. Je  ne  suggere  pas  de  vous
  precipiter  aller  l'acheter,  mais  je  veux  faire remarquer que ces
  informations sont disponibles.

  J'espere que cela vous a ete utile. Les commentaires,  mises  a  jour,
  suggestions    d'extension    sont    a    envoyer    a   Neal   Crook
  <mailto:neal.crook@reo.mts.digital.com>.

  1122..  RReeffeerreenncceess

  [1]
  <http://www.research.digital.com/wrl/publications/abstracts/TN-13.html>
  Bill Hamburgen, Jeff Mogul, Brian Reid, Alan  Eustace,  Richard  Swan,
  Mary  Jo  Doherty,  and  Joel  Bartlett.   _C_h_a_r_a_c_t_e_r_i_z_a_t_i_o_n _o_f _O_r_g_a_n_i_c
  _I_l_l_u_m_i_n_a_t_i_o_n _S_y_s_t_e_m_s.  DEC WRL, Technical Note 13, April 1989.

  Assembly HOWTO
  Francois-Rene Rideau rideau@ens.fr
  v0.4l, 16 Novembre 1997

  (Version   francaise   realisee   par   Eric   Dumas  dumas@freenix.fr
  dumas@Linux.EU.Org, et Fare Rideau rideau@ens.fr, 11  Novembre  1997).
  Ce document decrit comment programmer en assembleur x86 en n'utilisant
  que des outils de developpement _l_i_b_r_e_s, et tout particulierement  avec
  le systeme d'exploitation Linux sur la plate-forme i386.  Les informa-
  tions contenues dans ce  document  peuvent  etre  applicables  ou  non
  applicables  a d'autres plates-formes materielles ou logicielles.  Les
  contributions a ce documents seront acceptees avec  gratitude.   _m_o_t_s_-
  _c_l_e_f_s:  assembleur, libre, macroprocesseur, preprocesseur, asm, inline
  asm, 32 bits, x86, i386, gas, as86, nasm

  11..  IInnttrroodduuccttiioonn

  11..11..  CCooppyyrriigghhtt

  Copyright (c) 1996,1997 Francois-Rene Rideau.  Ce document  peut  etre
  redistribue   sous  les  termes  de  la  license  LDP,  disponibles  a
  <http://sunsite.unc.edu/LDP/COPYRIGHT.html>.

  11..22..  NNoottee iimmppoorrttaannttee

  Ceci est cense etre la derniere version que j'ecrirai de ce  document.
  Il  y a un candidat pour reprendre en charge le document, mais jusqu'a
  ce qu'il le  reprenne  completement  en  main,  je  serai  heureux  de
  m'occuper de tout courrier concernant ce document.

  Vous  etes  tout  specialement  invites  a  poser  des  questions, a y
  repondre, a corriger les donnees, a ajouter de nouvelles informations,
  a  completer  les  references  sur  d'autres  logiciels,  a  mettre en
  evidence les erreurs et lacunes du document.  Si  vous  etes  motives,
  vous  pouvez  meme pprreennddrree eenn cchhaarrggee ccee ddooccuummeenntt.  En un mot, apporter
  votre contribution!

  Pour contribuer a ce document,  contactez  la  personne  qui  apparait
  actuellement en charge.  Au moment ou j'ecris ces lignes, il s'agit de
  Francois-Rene Rideau <mailto:rideau@clipper.ens.fr>) ainsi que de Paul
  Anderson <mailto:paul@geeky1.ebtech.net>.

  11..33..  AAvvaanntt--PPrrooppooss

  Ce  document est destine a repondre aux questions les plus frequemment
  posees par les gens qui developpent ou qui souhaitent  developper  des
  programmes  en  assembleurs  x86  32  bits  en utilisant des logiciels
  _l_i_b_r_e_s,  et  tout  particulierement  sous  Linux.   Vous  y  trouverez
  egalement  des  liens  sur  d'autres  documents traitant d'assembleur,
  fondes sur des outils logiciels qui ne sont pas libres, pas 32-bit, ou
  pas  dedies  a  l'architecture  x86,  bien que cela ne soit pas le but
  principal de ce document.

  Etant donne que l'interet principal de la programmation en  assembleur
  est    d'etablir    les   fondations   de   systemes   d'exploitation,
  d'interpreteurs, de compilateurs, et de jeux, la ou un  compilateur  C
  n'arrive  plus  a  fournir  le  pouvoir  d'expression  necessaire (les
  performances etant  de  plus  en  plus  rarement  un  probleme),  nous
  insisteront sur le developpement de tels logiciels.

  11..33..11..  CCoommmmeenntt uuttiilliisseerr ccee ddooccuummeenntt

  Ce  document  contient  des  reponses a un certain nombre de questions
  frequemment posees.  Des URL y sont donnes, qui pointent sur des sites
  contenant  documents  ou  logiciels.   Prenez  conscience que les plus
  utiles de ces sites sont dupliques sur des serveurs miroirs, et  qu'en
  utilisant le site miroir le plus proche de chez vous, vous evitez a un
  gachis inutile aussi bien de precieuses ressources reseau  communes  a
  l'Internet  que  de  votre  propre temps.  Ainsi, il existe un certain
  nombre de gros serveurs dissemines sur la planete, qui  effectuent  la
  duplication  d'autres  sites  importants.  Cherchez ou se trouvent ces
  sites et identifiez les plus proches de chez vous (du point de vue  du
  reseau).  Parfois, la liste des miroirs est donnees dans un fichier ou
  dans  le  message  de  connexion.  Suivez  ces   conseils.    Si   ces
  informations ne sont pas presentes, utilisez le programme archie.

  La version la plus recente de ce document peut etre trouvee sur

  <http://www.eleves.ens.fr:8080/home/rideau/Assembly-HOWTO>          ou
  <http://www.eleves.ens.fr:8080/home/rideau/Assembly-HOWTO.sgml>

  mais les repertoires de HowTo Linux _d_e_v_r_a_i_e_n_t normalement etre  a  peu
  pres a jour (je ne peux pas le garentir):

  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/> (?)

  La version francaise de ce document peut etre trouvee sur le site

  <ftp://ftp.ibp.fr/pub/linux/french/HOWTO/>

  11..33..22..  AAuuttrreess ddooccuummeennttss ddee rreeffeerreennccee

  +o  si  vous ne savez ce qu'est le _l_i_b_r_e logiciel, lisez avec attention
     la GPL (GNU General Public License), qui est utilisee dans un grand
     nombre de logiciels libres, et est une source d'inspiration pour la
     plupart des autres licences  d'utilisations  de  logiciels  libres.
     Elle se trouve generalement dans un fichier nomme COPYING, avec une
     version pour les bibliotheques de routines dans  un  fichier  nomme
     COPYING.LIB.    Les  ecrits  publies  par  la  FSF  (free  software
     foundation) peuvent egalement vous aider a comprendre le phenomene.

  +o  plus  precisement,  les  logiciels  libres  interessants  sont ceux
     desquels les sources sont disponibles,  que  l'on  peut  consulter,
     corriger,  et  desquels  on  peut  emprunter une partie.  Lisez les
     licences d'utilisation avec attention et conformez-vous y.

  +o  il existe une FAQ dans le forum de discussion comp.lang.asm.x86 qui
     repond  aux  questions  generales  concernant  la  programmation en
     assembleur  pour  x86,  et  aux   questions   concernant   certains
     assembleurs   commerciaux   dans  un  environnement  DOS  16  bits.
     Certaines de ces reponses peuvent s'appliquer a la programmation 32
     bits, aussi serez-vous sans-doute interesses de lire cette FAQ...

     <http://www2.dgsys.com/~raymoon/faq/asmfaq.zip>

  +o  Sont  disponibles  des  FAQs,  de la documentation, et des sources,
     concernant  la  programmation  sur  votre   plate-forme   preferee,
     quelqu'elle  soit, et vous devriez les consulter pour les problemes
     lies a votre plate-forme  qui  ne  seraient  pas  specifique  a  la
     programmation en assembleur.

  11..44..  HHiissttoorriiqquuee ddee ddooccuummeenntt

  Chaque  version inclue quelques modifications et corrections mineures,
  qui ne sont pas indiquees a chaque fois.

     VVeerrssiioonn 00..11     2233 AAvvrriill 11999966
        Francois-Rene "Fare"  Rideau  <rideau@ens.fr>  cree  et  diffuse
        initialement  le  document  sous  forme d'un mini-HOWTO car ``Je
        suis un peu fatigue d'avoir a repondre encore  et  toujours  aux
        memes questions dans le forum comp.lang.asm.x86''

     VVeerrssiioonn 00..22       44 MMaaii 11999966
        *

     VVeerrssiioonn 00..33cc      1155 JJuuiinn 11999966
        *

     VVeerrssiioonn 00..33ff    1177 OOccttoobbrree 11999966
        Tim  Potter indique l'option -fasm pour activer l'assembleur en-
        ligne de GCC sans le reste des optimisations de -O.

     VVeerrssiioonn 00..33gg    22 NNoovveemmbbrree 11999966
        Creation de l'historique. Ajout de pointeurs dans la section sur
        la  compilation  croisee.  Ajout  d'une  section  concernant  la
        programmation des entrees/sorties  sous  Linux  (en  particulier
        pour l'acces video).

     VVeerrssiioonn 00..33hh    66 NNoovveemmbbrree 11999966
        plus sur la compilation croisee - voir sur sunsite: devel/msdos/

     VVeerrssiioonn 00..33ii    1166 NNoovveemmbbrree 11999966
        NASM commence a etre particulierement interessant

     VVeerrssiioonn 00..33jj    2244 NNoovveemmbbrree 11999966
        Reference sur la version francaise

     VVeerrssiioonn 00..33kk    1199 DDeecceemmbbrree 11999966
        Quoi? J'avais oublie de parler de Terse?

     VVeerrssiioonn 00..33ll    1111 JJaannvviieerr 11999977
        *

     VVeerrssiioonn 00..44pprree11 1133 JJaannvviieerr 11999977
        Le mini-HOWTO au format texte est transforme en  un  authentique
        HOWTO  au  format  linuxdoc-sgml, pour explorer les possibilites
        dudit format.

     VVeerrssiioonn 00..44     2200 JJaannvviieerr 11999977
        Premiere diffusion de ce HOWTO.

     VVeerrssiioonn 00..44aa    2200 JJaannvviieerr 11999977
        Ajout de la section CREDITS

     VVeerrssiioonn 00..44bb    33 FFeevvrriieerr 11999977
        NASM mis avant AS86

     VVeerrssiioonn 00..44cc    99 FFeevvrriieerr 11999977
        Ajout   de   la   partie   "Avez-vous    besoin    d'utilisateur
        l'assembleur?"

     VVeerrssiioonn 00..44dd      2288 FFeevvrriieerr 11999977
        Annonce fantome d'un nouveau responsable de ce HowTo.

     VVeerrssiioonn 00..44ee      1133 MMaarr 11999977
        Version diffusee pour DrLinux

     VVeerrssiioonn 00..44ff      2200 MMaarrss 11999977
        *

     VVeerrssiioonn 00..44gg      3300 MMaarrss 11999977
        *

     VVeerrssiioonn 00..44hh      1199 JJuuiinn 11999977
        Ajouts a propos de "Comment ne pas utiliser l'assembleur"; mises
        a jour concernant NASM et GAS.

     VVeerrssiioonn 00..44ii      1177 JJuuiilllleett 11999977
        Informations sur l'acces au mode 16 bits a partir de Linux.

     VVeerrssiioonn 00..44jj      77 SSeepptteemmbbeerr 11999977
        *

     VVeerrssiioonn 00..44kk      1199 OOccttoobbrree 11999977
        je (Fare) reprends en main la traduction francaise du HowTo

     VVeerrssiioonn 00..44ll      1166 NNoovveemmbbrree 11999977
        version pour LSL 6eme edition.

        Il  s'agit  encore  d'une  nouvelle  ``toute  derniere   version
        realisee  par  Fare avant qu'un nouveau responsable ne prenne la
        main''.

  11..55..  CCrreeddiittss

  Je souhaiterais remercier les personnes suivantes:

  +o  Linus Torvalds <mailto:buried.alive@in.mail> pour Linux

  +o  Bruce Evans <mailto:bde@zeta.org.au> pour bcc d'ou as86 est extrait

  +o  Simon    Tatham    <mailto:anakin@poboxes.com>   et   Julian   Hall
     <mailto:jules@earthcorp.com> pour NASM.

  +o  Jim Neil <mailto:jim-neil@digital.net> pour Terse

  +o  Greg Hankins <mailto:gregh@sunsite.unc.edu>  pour  la  coordination
     des HOWTOs

  +o  Raymond Moon <mailto:raymoon@moonware.dgsys.com> pour sa FAQ

  +o  Eric  Dumas <mailto:dumas@Linux.EU.Org> pour la traduction initiale
     en francais...  (l'auteur, francais, est  le  premier  attriste  de
     devoir ecrire l'original en anglais)

  +o  Paul  Anderson  <mailto:paul@geeky1.ebtech.net>  et  Rahim Azizarab
     <mailto:rahim@megsinet.net>  pour  m'avoir  aide,   a   defaut   de
     reprendre le HowTo en main.

  +o  toutes les personnes qui ont contribue a l'ecriture de ce document,
     par leurs idees, remarques ou leur soutient moral.

  22..  AAvveezz--vvoouuss bbeessooiinn ddee ll''aasssseemmbblleeuurr??

  Je ne veux en aucun cas jouer les empecheurs-de-tourner-en-rond,  mais
  voici quelques conseils issus d'une experience gagnee a la dure.

  22..11..  LLee PPoouurr eett llee CCoonnttrree

  22..11..11..  LLeess aavvaannttaaggeess ddee ll''aasssseemmbblleeuurr

  L'assembleur  peut  vous permettre de realiser des operations tres bas
  niveau:

  +o  vous pouvez acceder aux registres et  aux  ports  d'entrees/sorties
     specifiques a votre machine;

  +o  vous pouvez parfaitement controler le comportemant du code dans des
     sections critiques  ou  pourraient  sinon  advenir  un  blocage  du
     processeur ou des peripheriques;

  +o  vous  pouvez  sortir des conventions de production de code de votre
     compilateur  habituel;  ce  qui  peut  vous  permettre  d'effectuer
     certaines   optimisations   (par   exemple  contourner  les  regles
     d'allocation memoire, gerer manuellement le cours  de  l'execution,
     etc.);

  +o  acceder  a  des  modes  de  programmation  non  courants  de  votre
     processeur  (par  exemple  du  code  16  bits  pour  l'amorcage  ou
     l'interfacage avec le BIOS, sur les peces Intel);

  +o  vous  pouvez construire des interfaces entre des fragments de codes
     utilisant des conventions incompatibles (c'est-a-dire  produit  par
     des  compilateurs  differents  ou  separes  par  une interface bas-
     niveau);

  +o  vous  pouvez  generer  un  code  assez  rapide  pour  les   boucles
     importantes  pour  pallier aux defauts d'un compilateur qui ne sait
     les optimiser (mais bon, il existe des  compilateurs  optimisateurs
     librement disponibles!);

  +o  vous  pouvez  generer  du  code  optimise  "a la main" qui est plus
     parfaitement regle pour  votre  configuration  materielle  precise,
     meme s'il ne l'est pour aucune autre configuration;

  +o  vous  pouvez  ecrire  du  code  pour le compilateur optimisateur de
     votre nouveau langage.  (c'est la une activite a  laquelle  peu  se
     livrent, et encore, rarement.)

  22..11..22..  LLeess iinnccoonnvveenniieennttss ddee ll''aasssseemmbblleeuurr

  L'assembleur  est  un  langage tres bas niveau (le langage du plus bas
  niveau qui soit au dessus du codage a la main de motifs d'instructions
  en binaire). En consequence:

  +o  l'ecriture de code en est longue et ennuyeuse;

  +o  les bogues apparaissent aisement;

  +o  les bogues sont difficiles a reperer et supprimer;

  +o  il  est  difficile  de  comprendre  et  de  modifier  du  code  (la
     maintenance est tres compliquee);

  +o  le  resultat  est  extremement  peu   portable   vers   une   autre
     architecture, existante ou future;

  +o  votre  code  ne sera optimise que une certaine implementation d'une
     meme  architecture:  ainsi,  parmi  les  plates-formes  compatibles
     Intel,  chaque  realisation  d'un  processeur  et  de ses variantes
     (largeur   du   bus,    vitesse    et    taille    relatives    des
     CPU/caches/RAM/Bus/disques,   presence  ou  non  d'un  coprocesseur
     arithmetique,  et  d'extensions  MMX  ou   autres)   implique   des
     techniques d'optimisations parfois radicalement differentes.  Ainsi
     different  grandement  les  processeurs  deja  existant  et   leurs
     variations:  Intel 386, 486, Pentium, PPro, Pentium II; Cyrix 5x86,
     6x86; AMD K5, K6.  Et ce n'est surement pas  termine:  de  nouveaux
     modeles  apparaissent  continuellement,  et  cette  liste meme sera
     rapidement depassee, sans parler du code ``optimise'' qui aura  ete
     ecrit pour l'un quelconque des processeurs ci-dessus.

  +o  le  code  peut  egalement  ne  pas  etre  portable entre differents
     systemes  d'exploitation  sur  la  meme  architecture,  par  manque
     d'outils  adaptes  (GAS  semble  fonctionner sur toutes les plates-
     formes; NASM semble fonctionner ou etre  facilement  adaptable  sur
     toutes les plates-formes compatibles Intel);

  +o  un  temps  incroyable  de  programmation  sera  perdu  sur de menus
     details, plutot que d'etre efficacement utilise pour la  conception
     et  le  choix des algorithmes utilises, alors que ces derniers sont
     connus pour etre la source  de  la  majeure  partie  des  gains  en
     vitesse  d'un  programme.   Par  exemple,  un grand temps peut etre
     passe a grapiller quelques cycles en ecrivant des routines  rapides
     de  manipulation  de chaines ou de listes, alors qu'un remplacement
     de la structure de  donnees  a  un  haut  niveau,  par  des  arbres
     equilibres  et/ou des tables de hachage permettraient immediatement
     un grand gain en vitesse, et une parallelisation  aisee,  de  facon
     portable permettant un entretien facile.

  +o  une  petite  modification  dans  la  conception  algorithmique d'un
     programme aneantit la validite du  code  assembleur  si  patiemment
     elabore,  reduisant  les  developpeurs  au  dilemne de sacrifier le
     fruit  de  leur  labeur,  ou  de  s'enchainer  a   une   conception
     algorithmique obsolete.

  +o  pour des programmes qui fait des choses non point trop eloignees de
     ce que font les benchmarks standards, les  compilateurs/optimiseurs
     commerciaux  produisent  du code plus rapide que le code assembleur
     ecrit a la main (c'est moins vrai sur les architectures x86 que sur
     les  architectures  RISC,  et sans doute moins vrai encore pour les
     compilateurs librement disponible.  Toujours  est-il  que  pour  du
     code C typique, GCC est plus qu'honorable).

  +o  Quoi qu'il en soit, ains le dit le saige John Levine, moderateur de
     comp.compilers, "les compilateurs rendent  aisee  l'utilisation  de
     structures  de  donnees  complexes;  ils  ne  s'arretent pas, morts
     d'ennui, a mi-chemin du travail, et produisent du code  de  qualite
     tout  a  fait satisfaisante".  Ils permettent egalement de propager
     _c_o_r_r_e_c_t_e_m_e_n_t les transformations du code a  travers  l'ensemble  du
     programme,  aussi  henaurme  soit-il,  et peuvent optimiser le code
     par-dela les frontieres entre procedures ou entre modules.

  22..11..33..  AAffffiirrmmaattiioonn

  En pesant le pour et le contre, on peut conclure que  si  l'assembleur
  est  parfois  necessaire, et peut meme etre utile dans certains cas ou
  il ne l'est pas, il vaut mieux:

  +o  minimiser l'utilisation de code ecrit en assembleur;

  +o  encapsuler ce code dans des interfaces bien definies;

  +o  engendrer automatiquement le code assembleur  a  partir  de  motifs
     ecrits  dans  un  langage plus de haut niveau que l'assembleur (par
     exemple, des macros contenant de l'assembleur en-ligne, avec GCC);

  +o  utiliser des outils automatiques pour transformer ces programmes en
     code assembleur;

  +o  faire en sorte que le code soit optimise, si possible;

  +o  utiliser  toutes les techniques precedentes a la fois, c'est-a-dire
     ecrire ou etendre la passe d'optimisation d'un compilateur.

  Meme dans les cas ou l'assembleur est necessaire (par exemple lors  de
  developpement d'un systeme d'exploitation), ce n'est qu'a petite dose,
  et sans infirmer les principes ci-dessus.

  Consultez a ce sujet les sources du noyau de Linux: vous verrez  qu'il
  s'y trouve juste le peu qu'il faut d'assembleur, ce qui permet d'avoir
  un systeme d'exploitation  rapide,  fiable,  portable  et  d'entretien
  facile.   Meme  un jeu tres celebre comme DOOM a ete en sa plus grande
  partie ecrit en C,  avec  une  toute  petite  routine  d'affichage  en
  assembleur pour accelerer un peu.

  22..22..  CCoommmmeenntt nnee ppaass uuttiilliisseerr ll''aasssseemmbblleeuurr

  22..22..11..  MMeetthhooddee ggeenneerraallee ppoouurr oobbtteenniirr dduu ccooddee eeffffiiccaaccee

  Comme  le  dit  Charles  Fiterman  dans  comp.compilers a propos de la
  difference entre code ecrit par l'homme ou la machine,

  ``L'homme devrait toujours gagner, et voici pourquoi:

  +o  Premierement, l'homme ecrit tout dans un langage de haut nivrau.

  +o  Deuxiemement, il mesure  les  temps  d'execution  (profiling)  pour
     determiner  les endroits ou le programme passe la majeure partie du
     temps.

  +o  Troisiemement,  il  demande  au  compilateur  d'engendrer  le  code
     assembleur produit pour ces petites sections de code.

  +o  Enfin,  il  effectue  a  la  main  modifications  et reglages, a la
     recherche des petites ameliorations possibles par rapport  au  code
     engendre par la machine.

     L'homme gagne parce qu'il peut utiliser la machine.''

  22..22..22..  LLaannggaaggeess aavveecc ddeess ccoommppiillaatteeuurrss ooppttiimmiissaatteeuurrss

  Des  langages  comme  ObjectiveCAML,  SML,  CommonLISP,  Scheme,  ADA,
  Pascal, C,  C++,  parmi  tant  d'autres,  ont  tous  des  compilateurs
  optimiseurs  librement  disponibles,  qui  optimiseront le gros de vos
  programmes, et produiront souvent du code meilleur que de l'assembleur
  fait-main,  meme  pour des boucles serrees, tout en vous permettant de
  vous concentrer sur des details haut niveau, et sans vous interdire de
  gagner  par  la  methode  precedente quelques pourcents de performance
  supplementaire, une fois la phase  de  conception  generale  terminee.
  Bien sur, il existe egalement des compilateurs optimiseurs commerciaux
  pour la plupart de ces langages.

  Certains langages ont des compilateurs qui produisent du  code  C  qui
  peut  ensuite  etre  optimise  par un compilateur C.  C'est le cas des
  langages LISP, Scheme, Perl, ainsi que de nombreux autres.  La vitesse
  des programmes obtenus est toute a fait satisfaisante.

  22..22..33..  PPrroocceedduurree ggeenneerraallee aa ssuuiivvrree ppoouurr aacccceelleerreerr vvoottrree ccooddee

  Pour accelerer votre code, vous ne devriez traiter  que  les  portions
  d'un  programme  qu'un outil de mesure de temps d'execution (profiler)
  aura  identifie  comme  etant  un  goulot   d'etranglement   pour   la
  performance de votre programme.

  Ainsi,  si  vous identifiez une partie du code comme etant trop lente,
  vous devriez

  +o  d'abord essayer d'utiliser un meilleur algorithme;

  +o  essayer de la compiler au lieu de l'interpreter;

  +o  essayer  d'activer  les  bonnes  options  d'optimisation  de  votre
     compilateur;

  +o  donner  au  compilateur des indices d'optimisation (declarations de
     typage en LISP; utilisation des extensions GNU avec GCC; la plupart
     des compilos fourmillent d'options);

  +o  enfin  de compte seulement, se mettre a l'assembleur si necessaire.

  Enfin,  avant  d'en  venir  a  cette  derniere  option,  vous  devriez
  inspecter   le  code  genere  pour  verifier  que  le  probleme  vient
  effectivement d'une mauvaise generation de code, car il se  peut  fort
  bien  que  ce  ne  soit pas le cas: le code produit par le compilateur
  pourrait etre meilleur que celui que vous auriez ecrit, en particulier
  sur  les architectures modernes a pipelines multiples!  Il se peut que
  les portions les plus lentes de  votre  programme  le  soit  pour  des
  raisons  intrinseques.   Les plus gros problemes sur les architectures
  modernes a processeur rapide sont dues aux delais introduits  par  les
  acces   memoires,   manques   des  caches  et  TLB,  fautes  de  page;
  l'optimisation des registres devient vaine, et il vaut mieux  repenser
  les  structures de donnees et l'enchainement des routines pour obtenir
  une meilleur localite des  acces  memoire.   Il  est  possible  qu'une
  approche completement differente du probleme soit alors utile.

  22..22..44..  IInnssppeeccttiioonn dduu ccooddee pprroodduuiitt ppaarr llee ccoommppiillaatteeuurr

  Il  existe  de  nombreuses  raisons  pour  vouloir  regarder  le  code
  assembleur produit par le compilateur. Voici ce que vous pourrez faire
  avec ce code:

  +o  verifier si le code produit peut ou non etre ameliorer avec du code
     assembleur ecrit a la main (ou par un reglage different des options
     du compilateur);

  +o  quand  c'est  le  cas,  commencer  a partir de code automatiquement
     engendre et le modifier plutot que de repartir de zero;

  +o  plus generalement, utilisez le code  produit  comme  des  scions  a
     greffer,  ce  qui  a  tout  le  moins  vous  laisse  permet d'avoir
     gratuitement tout le code d'interfacage avec le monde exterieur.

  +o  reperer des bogues eventuels dus au compilateur lui-meme (esperons-
     le tres rare, quitte a se restreindre a des versions ``stables'' du
     compilo).

  La maniere standard d'obtenir le code assembleur genere est d'appeller
  le  compilateur avec l'option -S.  Cela fonctionne avec la plupart des
  compilateur Unix y compris le compilateur GNU C (GCC); mais a vous  de
  voir  dans  votre cas.  Pour ce qui est de GCC, il produira un code un
  peu plus comprehensible avec l'option -fverbose-asm. Bien sur, si vous
  souhaitez obtenir du code assembleur optimise, n'oubliez pas d'ajouter
  les options et indices d'optimisation appropriees!

  33..  AAsssseemmbblleeuurrss

  33..11..  AAsssseemmbblleeuurr eenn--lliiggnnee ddee GGCCCC

  Le celebre GNU C/C++  Compiler  (GCC),  est  un  compilateur  32  bits
  optimisant  situe  au  coeur  du  projet  GNU.  Il gere assez bien les
  architectures x86 et permet d'inserer du code assembleur a l'interieur
  de  programmes C de telle maniere que les registres puissent etre soit
  specifies soit laisse aux bons soins de GCC.  GCC  fonctionne  sur  la
  plupart  des  plates-formes  dont Linux, *BSD, VSTa, OS/2, *DOS, Win*,
  etc.

  33..11..11..  OOuu ttrroouuvveerr GGCCCC

  Le  site  principal  de  GCC  est  le  site   FTP   du   projet   GNU:
  <ftp://prep.ai.mit.edu/pub/gnu/>  On  y  trouve  egalement  toutes les
  applications provenant du projet GNU.   Des  versions  configurees  ou
  precompilees       pour      Linux      sont      disponibles      sur
  <ftp://sunsite.unc.edu/pub/Linux/GCC/>.  Il existe un grand nombre  de
  miroirs FTP des deux sites partout de par le monde, aussi bien que des
  copies sur CD-ROM.

  Le groupe de developpement de GCC s'est recemment scinde en deux; pour
  plus   d'informations   sur   la  version  experimentale,  egcs,  voir
  <http://www.cygnus.com/egcs/>

  Les sources adaptes a votre systeme d'exploitation prefere  ainsi  que
  les  binaires  precompiles  peuvent  etre  trouves  sur  les sites FTP
  courants.
  Le portage le plus celebre de GCC pour DOS est DJGPP et il  peut  etre
  trouve dans le repertoire du meme nom sur les sites ftp.  Voir:

  <http://www.delorie.com/djgpp/>

  Il  existe  egalement  un  portage  de  GCC  pour  OS/2 appele EMX qui
  fonctionne egalement sous DOS et inclut un grand  nombre  de  routines
  d'emulation Unix.  Voir les sites

  <http://www.leo.org/pub/comp/os/os2/gnu/emx+gcc/>

  <http://warp.eecs.berkeley.edu/os2/software/shareware/emx.html>

  <ftp://ftp-os2.cdrom.com/pub/os2/emx09c/>

  33..11..22..   OOuu ttrroouuvveerr ddee llaa ddooccuummeennttaattiioonn ssuurr ll''aasssseemmbblleeuurr eenn lliiggnnee aavveecc
  GGCCCC??

  La  document  de  GCC  inclus  les fichiers de documentation au format
  texinfo.  Vous pouvez les compiler avec TeX et les  imprimer,  ou  les
  convertir au format .info et les parcourir interactivement avec emacs,
  ou encore les convertir au format HTML, ou en  a  peu  pres  n'importe
  quel  format  (avec  les  outils  adequats).   Les fichiers .info sont
  generalement installes en meme temps que GCC.

  La section a consulter est C Extensions::Extended Asm::

  La  section  Invoking  GCC::Submodel  Options::i386   Options::   peut
  egalement  vous  aider.   En  particulier,  elle  donne  les  noms  de
  contraintes  pour  les  registres  du  i386:   abcdSDB   correspondent
  respectivement  a  %eax,  %ebx,  %ecx,  %edx, %esi, %edi, %ebp (aucune
  lettre pour %esp).

  Le site "DJGPP Games  resource"  (qui  n'est  pas  reserve  aux  seuls
  developpeurs de jeux) possede une page particuliere sur l'assembleur:

  <http://www.rt66.com/~brennan/djgpp/djgpp_asm.html>

  Enfin,  il  existe  une  page  de  la  Toile  appelee "DJGPP Quick ASM
  Programming  Guide",  contenant  des  URL  sur  des  FAQ,  la  syntaxe
  assembleur AT&T x86, des informations sur l'assembleur en ligne, et la
  conversion des fichiers .obj/.lib:

  <http://remus.rutgers.edu/~avly/djasm.html>

  GCC soutraite l'assemblage proprement  dit  a  GAS  et  suit  donc  sa
  syntaxe  (voir plus bas), cela implique que l'assembleur en ligne doit
  utiliser des caracteres pourcents entre apostrophes pour qu'ils soient
  passes a GAS. Voir la section dediee a GAS.

  Vous   trouverez  un  _g_r_a_n_d  nombre  d'exemples  instructifs  dans  le
  repertoire linux/include/asm-i386/ des sources de Linux.

  33..11..33..  AAppppeelllleerr GGCCCC ppoouurr oobbtteenniirr dduu ccooddee  aasssseemmbblleeuurr  eenn  lliiggnnee  ccoorr--
  rreeccttee??

  Assurez-vous d'appeller gcc avec l'option -O (ou -O2, -O3,  etc)  pour
  activer  les  optimisations  et  l'assembleur en ligne.  Si vous ne le
  faites  pas,  votre  code  pourra  compiler  mais  ne  pas  s'executer
  correctement!!       En      fait     (merci     a     Tim     Potter,
  timbo@moshpit.air.net.au),  il  suffit  d'utiliser   l'option   -fasm,
  faisant partie de toutes les fonctionnalites activees par l'option -O.
  Donc si vous avez des problemes en raison d'optimisations boguees dans
  votre   implementation   de   gcc,   vous   pouvez  toujours  utiliser
  l'assembleur en ligne.   De  meme,  utilisez  l'option  -fno-asm  pour
  desactiver l'assembleur en ligne (on peut se demander pourquoi?).

  Plus  generalement,  les bonnes options de compilation a utiliser avec
  gcc sur les plates-formes x86 sont

  ______________________________________________________________________
          gcc -O2 -fomit-frame-pointer -m386 -Wall
  ______________________________________________________________________

  -O2 est le bon niveau d'optimisation.  Les  optimisations  superieures
  generent  un  code  un  peu  plus important, mais tres legerement plus
  rapide. De telles sur-optimisations peuvent etre utiles  que  dans  le
  cas  d'optimisations  de  boucles que vous pouvez toujours realiser en
  assembleur.  Si vous avez besoin de faire ce genre de  choses,  ne  le
  faites que pour les routines qui en ont besoin.

  -fomit-frame-pointer  permet au code genere de se passer de la gestion
  inutile des pointeurs de fenetre, ce qui rend le code plus petit  plus
  rapide et libere un registre pour de plus amples optimisations.  Cette
  option exclue  l'utilisation  des  outils  de  deboggage  (gdb),  mais
  lorsque vous les utilisez, la taille et la vitesse importent peu.

  -m386 genere un code plus compacte sans ralentissement notable, (moins
  de code signifie egalement mois d'entrees/sorties sur disque  et  donc
  une  execution  plus  rapide). Vous pouvez egalement utiliser l'option
  -mpentium sur la version GCC gerant l'optimisation pour ce processeur.

  -Wall  active  toutes  les  mises-en-garde  (warning) et vous evite de
  nombreuses erreurs stupides et evidentes.

  Pour optimiser encore plus, vous pouvez utiliser l'option  -mregparm=2
  et/ou  les  attributs  de fonctions qui peuvent etre utilises mais ils
  peuvent  dans  certains  cas  poser  de  nombreux  problemes  lors  de
  l'edition  de  liens avec du code externe (notamment les bibliotheques
  partagees)...

  Notez que vous pouvez ajoutez ces options aux  options  utilisees  par
  defaut   sur   votre  systeme  en  editant  le  fichier  /usr/lib/gcc-
  lib/i486-linux/2.7.2.3/specs (cependant, ne rajoutez pas -Wall  a  ces
  options).

  33..22..  GGAASS

  GAS est l'assembleur GNU, utilise par gcc.

  33..22..11..  OOuu llee ttrroouuvveerr??

  Au meme endroit ou vous avez trouve gcc, dans le paquetage binutils.

  33..22..22..  QQuu''eesstt--ccee qquuee llaa ssyynnttaaxxee AATT&&TT

  Comme  GAS  a  ete  invente pour supporter un compilateur 32 bits sous
  unix, il utilise la syntaxe standard "AT&T", qui ressemblent  assez  a
  l'assembleur  m68k.   La  syntaxe  n'est  ni  pire, ni meilleur que la
  syntaxe "Intel".  Elle  est  juste  differente.   Lorsque  vous  aurez
  l'habitude  de vous en servir, vous la trouverez plus reguliere que la
  syntaxe Intel, quoique que legerement plus ennuyeuse aussi.

  Voici les points les plus importants a propos de la syntaxe de GAS:

  +o  Les noms de registres sont  prefixes  avec  %,  de  facon  que  les
     registres sont %eax, %dl et consorts au lieu de juste eax, dl, etc.
     Ceci rend possible l'inclusion directe de noms de symboles externes
     C sans risque de confusion, ou de necessite de prefixes _.

  +o  L'ordre   des  operandes  est  source(s)  d'abord,  destination  en
     dernier, a l'oppose de la convention d'intel consistant a mettre la
     destination  en  premier,  les source(s) ensuite.  Ainsi, ce qui en
     syntaxe intel  s'ecrit  mov  ax,dx  (affecter  au  registre  ax  le
     contentu du registre dx) s'ecrira en syntaxe att mov %dx, %ax.

  +o  La  longueur  des  operandes  est  specifiee  comme  suffixe du nom
     d'instruction.  Le suffixe est b pour un octet (8 bit), w  pour  un
     mot  (16  bit),  et  l  pour  un mot long (32 bit). Par exemple, la
     syntaxe correcte pour l'instruction ci-dessus aurait du  etre  movw
     %dx,%ax.  Toutefois, gas n'est pas trop aussi strict que la syntaxe
     att l'exige, et le suffixe est optionel quand la longueur peut etre
     devinee  grace  aux operandes qui sont des registres, la taille par
     defaut etant 32 bit (avec une mise en garde quand on y fait appel).

  +o  Les  operandes  immediates  sont marques d'un prefixe $, comme dans
     addl $5,%eax (ajouter la valeur  longue  immediate  5  au  registre
     %eax).

  +o  L'absence  de  prefixe  a une operande indique une adresse memoire;
     ainsi movl $foo,%eax met l'_a_d_r_e_s_s_e  de  la  variable  foo  dans  le
     registre  %eax,  tandis  que  movl  foo,%eax  met  le contenu de la
     variable foo dans le registre %eax.

  +o  L'indexation ou l'indirection se fait en mettant entre  parentheses
     le  registre  d'index  ou  la case memoire contenant l'indirection,
     comme dans testb $0x80,17(%ebp) (tester le bit  de  poids  fort  de
     l'octet au deplacement 17 apres la case pointee par %ebp).

  Un  programme existe pour vous aider a convertir des programmes ecrits
  avec la syntaxe TASM en syntaxe AT&T. Voir

  <ftp://x2ftp.oulu.fi/pub/msdos/programming/convert/ta2asv08.zip>

  GAS possede une documentation complete  au  format  TeXinfo,  qui  est
  distribuee  entre  autre  avec les sources.  Vous pouvez parcourir les
  pages .info qui en sont extraites avec Emacs.  Il  y  avait  aussi  un
  fichier  nomme gas.doc ou as.doc disponible autour des sources de GAS,
  mais il a ete fusionne avec la documentation TeXinfo.   Bien  sur,  en
  cas  de  doute,  l'ultime documentation est constituee par les sources
  eux-memes!  Une section  qui  vous  interessera  particulierement  est
  Machine Dependencies::i386-Dependent::

  Les  sources de Linux dont un bon exemple: regardez dans le repertoire
  linux/arch/i386      les      fichiers      suivants:      kernel/*.S,
  boot/compressed/*.S, mathemu/*.S

  Si  vous  codez  ce  genre  de chose, un paquetage de thread, etc vous
  devriez regarder  d'autres  langages  (OCaml,  gforth,  etc),  ou  des
  paquetages  sur  les thread (QuickThreads, pthreads MIT, LinuxThreads,
  etc).
  Enfin generer a partir d'un programme C du code assembleur  peut  vous
  montrer  le genre d'instructions que vous voulez. Consultez la section
  ``Avez-vous besoin de l'assembleur?''  au debut de ce document.

  33..22..33..  mmooddee 1166 bbiittss lliimmiittee

  GAS est un assembleur 32 bits, concu pour assembler  le  code  produit
  par  un compilateur 32 bits.  Il ne reconnait que d'une maniere limite
  le mode 16 bits  du  i386,  en  ajoutant  des  prefixes  32  bits  aux
  instructions;  vous  ecrivez  donc  en  realite  du  code 32 bits, qui
  s'execute en mode 16 bits sur un processeur 32 bits.   Dans  les  deux
  modes,  il  gere  les registres 16 bits, mais pas l'adressage 16 bits.
  Utilisez les instructions .code16 et .code32 pour basculer d'un mode a
  l'autre.  Notez que l'instruction assembleur en ligne asm(".code16\n")
  autorisera gcc a generer du code 32  bits  qui  fonctionnera  en  mode
  reel!

  Le code necessaire pour que GAS gere le mode 16 bits aurait ete ajoute
  par Bryan Ford (a confirmer?). Toutefois, ce code n'est  present  dans
  aucune distribution de GAS que j'ai essayee (jusqu'a binutils-2.8.1.x)
  ...  plus d'informations a ce sujet seraient les  bienvenues  dans  ce
  HowTo.

  Une  solution bon marche pour inserer quelques instructions 16-bit non
  reconnues pas GAS consiste a definir des macros (voir  plus  bas)  qui
  produisent  directement du code binaire (avec .byte), et ce uniquement
  pour les rares instructions 16 bits dont vous avez  besoin  (quasiment
  aucunes,  si  vous  utilisez  le .code16 precedement decrit, et pouvez
  vous permettre de supposer que le code fonctionnera sur un  processeur
  32  bits). Pour obtenir le systeme de codage correct, vous pouvez vous
  inspirer des assembleurs 16 bits.

  33..33..  GGAASSPP

  GASP est un preprocesseur pour GAS.   Il  ajoute  des  macros  et  une
  syntaxe plus souple a GAS.

  33..33..11..  OOuu ttrroouuvveerr ggaasspp??

  gasp est livre avec gas dans le paquetage binutils GNU.

  33..33..22..  CCoommmmeenntt iill ffoonnccttiioonnnnee??

  Cela  fonctionne comme un filtre, tout comme cpp et ses variantes.  Je
  ne connais  pas  les  details,  mais  il  est  livre  avec  sa  propre
  documentation  texinfo,  donc consultez-la, imprimez-la, assimilez-la.
  La combinaison GAS/GASP me semble etre un macro-assembleur standard.

  33..44..  NNAASSMM

  Du projet Netwide Assembler est issu encore un autre assembleur, ecrit
  en  C,  qui  devrait  etre  assez  modulaire pour supporter toutes les
  syntaxes connues et tous les formats objets existants.

  33..44..11..  OOuu ttrroouuvveerr NNAASSMM??

  <http://www.cryogen.com/Nasm>

  Les versions binaires se trouvent sur votre  miroir  sunsite  habituel
  dans   le  repertoire  devel/lang/asm/.   Il  devrait  egalement  etre
  disponible sous forme d'archive .rpm ou .deb parmi les contributions a
  votre distribution preferee RedHat ou Debian.

  33..44..22..  SSoonn rroollee

  Au moment de l'ecriture de ce HOWTO, NASM en est a la version 0.96.

  La syntaxe est a la Intel.  Une gestion de macros est integree.

  Les  formats  objets  reconnus  sont bin, aout, coff, elf, as86, (DOS)
  obj, win32, et rdf (leur propre format).

  NASM peut etre utilisee comme assembleur  pour  le  compilateur  libre
  LCC.

  Comme  NASM  evolue rapidement, ce HowTo peut ne pas etre a jour a son
  sujet.  A moins que vous n'utilisiez BCC comme compilateur 16 bit  (ce
  qui  depasse  le  cadre  de  ce  document), vous devriez utiliser NASM
  plutot que AS86 ou MASM, car c'est un logiciel libre avec un excellent
  service  apres-don,  qui  tourne sur toutes plateformes logicielles et
  materielles.

  Note: NASM est egalement livre avec un desassembleur, NDISASM.

  Son analyseur "grammatical", ecrit a la main, le  rend  beaucoup  plus
  rapide  que GAS; en contrepartie, il ne reconnait qu'une architecture,
  en comparaison de la plethore d'architectures reconnues par GAS.  Pour
  les plates-formes x86, NASM semble etre un choix judicieux.

  33..55..  AASS8866

  AS86  est un assembleur 80x86, a la fois 16 et 32 bits, faisant partie
  du compilateur C de Bruce Evans (BCC).  Il possede une  syntaxe  a  la
  Intel.

  33..55..11..  WWhheerree ttoo ggeett AASS8866

  Une  version completement depassee de AS86 est diffusee par HJLu juste
  pour compiler le noyau Linux,  dans  un  paquetage  du  nom  de  bin86
  (actuellement version 0.4) disponible dans le repertoire GCC des sites
  FTP Linux.  Je deconseille son utilisation pour toute autre chose  que
  compiler  Linux.   Cette version ne reconnait qu'un format de fichiers
  minix modifie, que ne reconnaissent ni les binutils GNU ni aucun autre
  produit.  Il possede de plus certains bogues en mode 32 bits.  Ne vous
  en servez donc vraiment que pour compiler Linux.

  Les versions les plus recentes de Bruce  Evans  (bde@zeta.org.au)  est
  diffusee  avec  la  distribution  FreeBSD.  Enfin, elles l'etaient! Je
  n'ai pas pu trouver les sources dans la distribution  2.1.  Toutefois,
  vous pouvez trouver les sources dans

  <http:///www.eleves.ens.fr:8080/home/rideau/files/bcc-95.3.12.src.tgz>

  Le projet Linux/8086 (egalement  appele  ELKS)  s'est  d'une  certaine
  maniere  chargee  de  maintenir bcc (mais je ne crois pas qu'ils aient
  inclus    les     patches     32     bits).     Voir     les     sites
  <http://www.linux.org.uk/Linux8086.html> et  <ftp://linux.mit.edu/>.

  Entre  autres  choses,  ces versions plus recentes, a la difference de
  celle de HJLu, gerent le format  a.out  de  Linux;  vous  pouvez  donc
  effectuer  des  editions  de  liens  avec  des programmes Linux, et/ou
  utiliser les outils habituels provenant  du  paquetage  binutils  pour
  manipuler  vos  donnees.   Cette version peut co-exister sans probleme
  avec les versions precedentes (voir la question a ce sujet un peu plus
  loin).

  La  version  du  12  mars  1995  de BCC ainsi que les precedentes a un
  probleme  qui  provoque  la  generation  de  toutes   les   operations
  d'empilement/depilement   de   segments   en   16  bits,  ce  qui  est
  particulierement ennuyant lorsque vous developpez en mode 32 bits.  Un
  patch est diffuse par le projet Tunes

  <http://www.eleves.ens.fr:8080/home/rideau/Tunes/>

  a  partir du lien suivant: files/tgz/tunes.0.0.0.25.src.tgz ou dans le
  repertoire LLL/i386/.

  Le patch peut egalement etre directement recupere sur

  <http://www.eleves.ens.fr:8080/home/rideau/files/as86.bcc.patch.gz>

  Bruce Evans a accepte ce patch, donc si une version  plus  recente  de
  BCC existe, le patch devrait avoir ete integre...

  33..55..22..  CCoommmmee aappppeelllleerr ll''aasssseemmbblleeuurr??

  Voici l'entree d'un Makefile GNU pour utiliser bcc pour transformer un
  fichier assembleur .s a la fois en un objet a.out GNU .o et un listing
  .l:

  ______________________________________________________________________
  %.o %.l:        %.s
          bcc -3 -G -c -A-d -A-l -A\*(dR*.l -o \*(dR*.o \*(dR<
  ______________________________________________________________________

  Supprimez  %.l,  -A-l,  et  -A$*.l,  si  vous  ne  voulez pas avoir de
  listing.  Si vous souhaitez obtenir autre  chose  que  du  a.out  GNU,
  consultez  la  documentation  de  bcc  concernant  les  autres formats
  reconnus et/ou utilisez le programme objcopy du paquetage binutils.

  33..55..33..  OOuu ttrroouuvveerr ddee llaa ddooccuummeennttaattiioonn

  Les documentations se trouvent dans le paquetage bcc.   Des  pages  de
  manuel sont egalement disponibles quelque part sur le site de FreeBSD.
  Dans le doute, les sources sont assez souvent une bonne documentation:
  ce  n'est  pas  tres  commente mais le style de programmation est tres
  simple.  Vous pouvez essayer de voir comment  as86  est  utilise  dans
  Tunes 0.0.0.25...

  33..55..44..  vveerrssiioonn QQuuee ffaaiirree ssii jjee nnee ppeeuuxx pplluuss ccoommppiilleerr LLiinnuuxx aavveecc cceettttee
  nnoouuvveellllee

  Linus  est  submerge  par  le  courrier electronique et mon patch pour
  compiler Linux avec un as86 a.out n'a pas du lui  parvenir  (!).   Peu
  importe:  conservez  le  as86  provenant  du  paquetage  bin86 dans le
  repertoire /usr/bin, et laissez bcc installer le bon as86 en tant  que
  /usr/local/libexec/i386/bcc/as  comme  que  de  droit.   Vous  n'aurez
  jamais besoin d'appeler explicitement ce dernier, car  bcc  se  charge
  tres  bien  de tout, y compris la conversion en a.out Linux, lorsqu'il
  est appele avec les bonnes options.  Assemblez les fichiers uniquement
  en passant par bcc, et non pas en appelant as86 directement.

  33..66..  AAuuttrreess aasssseemmbblleeuurrss

  Il  s'agit  d'autres  possibilites,  qui sortent de la voie ordinaire,
  pour le cas ou les solutions precedentes ne vous conviennent pas (mais
  je  voudrais bien savoir pourquoi?), que je ne recommande pas dans les
  cas habituels, mais qui peuvent se montrer fort utiles si l'assembleur
  doit  faire  partie  integrante  du  logiciel  que  vous concevez (par
  exemple   un   systeme   d'exploitation   ou   un   environnement   de
  developpement).

  33..66..11..  LL''aasssseemmbblleeuurr ddee WWiinn3322FFoorrtthh

  Win32Forth  est  un systeme ANS FORTH 32 bit _l_i_b_r_e qui fonctionne sous
  Win32s, Win95, Win/NT.  Il comprend un assembleur 32 bit  libre  (sous
  forme  prefixe  ou postfixe) integree au langage FORTH.  Le traitement
  des macro est effectue en utilisant  toute  la  puissance  du  langage
  reflexif  FORTH.   Toutefois,  le  seul  contexte  d'entree  et sortie
  reconnu  actuellement  est  Win32For  lui-meme   (aucune   possibilite
  d'obtenir  un  fichier  objet, mais vous pouvez toujours l'ajouter par
  vous-meme, bien  sur).   Vous  pouvez  trouver  Win32For  a  l'adresse
  suivante: <ftp://ftp.forth.org/pub/Forth/win32for/>

  33..66..22..  TTeerrssee

  Terse  est un outil de programmation qui fournit _L_A syntaxe assembleur
  la plus compacte pour la famille des processeur  x86!   Voir  le  site
  <http://www.terse.com>.  Ce n'est cependant pas un logiciel libre.  Il
  y aurait eu un clone libre quelque  part,  abandonne  a  la  suite  de
  mensongeres allegations de droits sur la syntaxe, que je vous invite a
  ressusciter si la syntaxe vous interesse.

  33..66..33..  AAsssseemmbblleeuurrss nnoonn lliibbrreess eett//oouu nnoonn 3322 bbiittss

  Vous trouverez un peu plus d'informations sur eux, ainsi que  sur  les
  bases  de  la programmation assembleur sur x86, dans la FAQ de Raymond
  Moon      pour      le      forum       comp.lang.asm.x86.        Voir
  <http://www2.dgsys.com/~raymoon/faq/asmfaq.zip>

  Remarquez  que  tous  les  assembleurs  DOS devraient fonctionner avec
  l'emulateur DOS de Linux ainsi qu'avec  d'autres  emulateurs  du  meme
  genre.  Aussi, si vous en possedez un, vous pouvez toujours l'utiliser
  a l'interieur d'un vrai systeme d'exploitation.  Les assembleurs  sous
  DOS assez recents gerent egalement les formats de fichiers objets COFF
  et/ou des formats geres par la bibliotheque GNU BFD de  telle  maniere
  que  vous  pouvez  les utiliser en conjonction avec les outils 32 bits
  libres, en utilisant le programme GNU objcopy (du paquetage  binutils)
  comme un filtre de conversion.

  44..  MMeettaa--pprrooggrraammmmaattiioonn//mmaaccrroo--ttrraaiitteemmeenntt

  La  programmation  en  assembleur  est  particulierement penible si ce
  n'est pour certaines parties critiques des programmes.

  Pour travail donne, il faut l'outil approprie; ne choisissez donc  pas
  l'assembleur  lorsqu'il  ne  correspond pas au probleme a resoudre: C,
  OCAML, perl, Scheme peuvent etre un meilleur choix dans la plupart des
  cas.

  Toutefois,  il  y  a  certains cas ou ces outils n'ont pas un controle
  suffisamment fin sur la machine,  et  ou  l'assembleur  est  utile  ou
  necessaire.    Dans   ces   cas,   vous   apprecierez  un  systeme  de
  programmation par macros, ou un  systeme  de  meta-programmation,  qui
  permet  aux  motifs  repetitifs  d'etre factorises chacun en une seule
  definition indefiniment reutilisable.  Cela permet  une  programmation
  plus  sure,  une  propagation  automatique  des  modifications desdits
  motifs, etc.  Un assembleur de base souvent ne suffit pas,  meme  pour
  n'ecrire que de petites routines a lier a du code C.

  44..11..  DDeessccrriippttiioonn

  Oui,  je  sais  que  cette partie peut manquer d'informations utiles a
  jour.  Vous etes libres de me faire  part  des  decouvertes  que  vous
  auriez du faire a la dure...

  44..11..11..  GGCCCC

  GCC  vous  permet  (et vous oblige) de specifier les contraintes entre
  registres assembleurs et objets C,  pour  que  le  compilateur  puisse
  interfacer  le  code assembleur avec le code produit par l'optimiseur.
  Le code assembleur en ligne est  donc  constitue  de  motifs,  et  pas
  forcement de code exact.

  Et  puis,  vous  pouvez  mettre  du  code  assembleur  dans des macro-
  definitions de CPP ou des  fonctions  "en-ligne"  (inline),  de  telle
  maniere  que  tout le monde puisse les utiliser comme n'importe quelle
  fonction ou macro C.  Les fonctions en  ligne  ressemblent  enormement
  aux macros mais sont parfois plus propres a utiliser.  Mefiez-vous car
  dans tous  ces  cas,  le  code  sera  duplique,  et  donc  seules  les
  etiquettes  locales  (comme  1:)  devraient etre definies dans ce code
  assembleur. Toutefois,  une  macro  devrait  permettre  de  passer  en
  parametre le nom eventuellement necessaire d'une etiquette definie non
  localement (ou sinon, utilisez des methodes supplementaires  de  meta-
  programmation).   Notez  egalement que propager du code assembleur en-
  ligne repandra les bogues potentiels qu'il contiendrait, aussi, faites
  doublement attention a donner a GCC des contraintes correctes.

  Enfin, le langage C lui-meme peut etre considere comme etant une bonne
  abstraction de la programmation assembleur, qui devrait vous eviter la
  plupart des difficultes de la programmation assembleur.

  Mefiez-vous  des  optimisations  consistant  a passer les arguments en
  utilisant les registres: cela interdit aux fonctions concernees d'etre
  appelees  par des routines exterieurs (en particulier celles ecrites a
  la main en assembleur) d'une maniere standard;  l'attribut  asmlinkage
  devrait  empecher des routines donnees d'etre concernees par de telles
  options d'optimisation.  Voir les sources du noyau  Linux  pour  avoir
  des exemples.

  44..11..22..  GGAASS

  GAS  a  quelques menues fonctionnalite pour les macro, detaillees dans
  la documentation TeXinfo.  De plus

  J'ai entendu dire que les versions recentes en  seront dotees...  voir
  les fichiers TeXinfo).  De plus, tandis que GCC reconnait les fichiers
  en .s comme de l'assembleur a envoyer dans GAS, il reconnait aussi les
  fichiers  en  .S  comme devant etre filtrer a travers CPP avant d'etre
  envoyer a GAS.  Au risque de me repeter, je vous  convie  a  consulter
  les sources du noyau Linux.

  44..11..33..  GGAASSPP

  Il ajoute toutes les fonctionnalites habituelles de macro a GAS.  Voir
  sa documentation sous forme texinfo.

  44..11..44..  NNAASSMM

  NASM possede aussi son systeme de macros.  Consultez sa documentation.
  Si vous avez quelqu'idee lumineuse, contactez les auteurs, etant donne
  qu'ils sont en train de developper NASM activement.  Pendant  ce  meme
  temps, lisez la partie sur les filtres externes un peu plus loin.

  44..11..55..  AASS8866

  Il possede un systeme simple de macros, mais je n'ai pas pu trouver de
  documentation.    Cependant,   les   sources   sont   d'une   approche
  particulierement  aisee,  donc  si  vous etes interesse pour en savoir
  plus, vous devriez pouvoir les comprendre sans probleme.  Si vous avez
  besoin  d'un  peu  plus que des bases, vous devriez utiliser un filtre
  externe (voir un peu plus loin).

  44..11..66..  AAuuttrreess aasssseemmbblleeuurrss

  +o  Win32FORTH: CODE et END-CODE sont des macros qui ne  basculent  pas
     du mode interpretation au mode compilation; vous aurez donc acces a
     toute la puissance du FORTH lors de l'assemblage.

  +o  Tunes: cela ne fonctionne pas encore, mais le langage Scheme est un
     langage  de  tres  haut  niveau  qui  permet une meta-programmation
     arbitraire.

  44..22..  FFiillttrreess eexxtteerrnneess

  Quelque soit la gestion des macros de  votre  assembleur,  ou  quelque
  soit le langage que vous utilisez (meme le C), si le langage n'est pas
  assez expressif pour vous, vous pouvez  faire  passer  vos  fichier  a
  travers  un  filtre  externe  grace  a une regle comme suit dans votre
  Makefile:

  ______________________________________________________________________
  %.s:    %.S autres_dependances
          \*(dR(FILTER) \*(dR(FILTER_OPTIONS) < \*(dR< > \*(dR@
  ______________________________________________________________________

  44..22..11..  CCPPPP

  CPP n'est vraiment pas tres expressif, mais il suffit pour les  choses
  faciles, et il est appele d'une maniere transparente par GCC.

  Comme  exemple  de  limitation, vous ne pouvez pas declarer d'objet de
  facon a ce qu'un destructeur soit automatiquement appele a la  fin  du
  bloc  ayant  declare  l'objet.  Vous  n'avez  pas  de diversions ou de
  gestion de portee des variables, etc.

  CPP est livre avec tout compilateur C.  Si  vous  pouvez  faire  sans,
  n'allez  pas  chercher CPP (bien que je me demande comment vous pouvez
  faire).

  44..22..22..  MM44

  M4 vous donne la pleine puissance du macro-traitement, avec un langage
  Turing-equivalent,  recursivite,  expressions  regulieres,  etc.  Vous
  pouvez faire avec tout ce que cpp ne peut faire.

  Voir      macro4th/This4th       que       l'on       trouve       sur
  <ftp://ftp.forth.org/pub/Forth/>  dans  Reviewed/  ANS/  (?),  ou  les
  sources de Tunes 0.0.0.25 comme exemple de  programmation  avancee  en
  utilisant m4.

  Toutefois,  le systeme de citation est tres penible a utiliser et vous
  oblige a utiliser un style de programmation par  fonctions  recursives
  avec  passage explicite de continuation (CPS) pour toute programmation
  _a_v_a_n_c_e_e (ce qui n'est pas sans rappeler a TeX -- au fait quelqu'un  a-
  t-il  deja  essaye  d'utiliser  TeX  comme macro-processeur pour autre
  chose que de la mise-en-page?).  Toutefois, ce n'est pas pire que  cpp
  qui ne permet ni citation ni recursivite.

  La  bonne  version  de m4 a recuperer est GNU m4 1.4 (ou ulterieure si
  elle existe).  C'est celle qui contient le plus de  fonctionnalite  et
  le  moins  de  bogues  ou  de  limitations.   m4  est  concu pour etre
  intrinsequement lent pour toute utilisation sauf la plus simple;  cela
  suffit  sans  aucun doute pour la plupart des programmes en assembleur
  (vous n'allez  quand  meme  pas  ecrire  des  millions  de  lignes  en
  assembleur, si?).

  44..22..33..  MMaaccrroo--ttrraaiitteemmeenntt aavveecc vvoottrree pprroopprree ffiillttrree

  Vous  pouvez  ecrire  votre propre programme d'expansion de macro avec
  les outils courants comme perl, awk, sed, etc.  C'est assez  rapide  a
  faire  et  vous pouvez tout controler.  Mais bien toute puissance dans
  le macro-traitement doit se gagner a la dure.

  44..22..44..  MMeettaa--pprrooggrraammmmaattiioonn

  Plutot que d'utiliser un filtre externe qui effectue  l'expansion  des
  macros,  une  maniere de realiser cela est d'ecrire des programmes qui
  ecrivent d'autres programmes, en partie ou en totalite.

  Par exemple, vous pourriez utiliser  un  programme  generant  du  code
  source

  +o  pour creer des tables de sinus/cosinus (ou autre),

  +o  pour decompiler un fichier binaire en source annote annote,

  +o  pour compiler vos bitmaps en des routines d'affichage rapides,

  +o  pour  extraire  de  la  documentation,  du  code d'initilisation ou
     finalisation, des tables de descriptions, aussi bien  que  du  code
     normal depuis les memes fichiers sources;

  +o  pour  utiliser  une  technique  specifique  de  production de code,
     produite avec un script perl/shell/scheme

  +o  pour propager des donnees  definies  en  une  seule  fois  dans  de
     nombreux morceaux de code ou tables avec references croisees.

  +o  etc.

  Pensez-y!

  44..22..44..11..  BBaacckkeennddss pprroovveennaanntt ddee ccoommppiillaatteeuurr eexxiissttaannttss

  Des  compilateurs  comme  SML/NJ, Objective CAML, MIT-Scheme, etc, ont
  leur propre generateur de code assembleur,  que  vous  pouvez  ou  non
  utiliser,  si  vous  souhaitez  generer  du  code semi-automatiquement
  depuis les langages correspondants.

  44..22..44..22..  LLee NNeeww--JJeerrsseeyy MMaacchhiinnee--CCooddee TToooollkkiitt

  Il s'agit projet utilisant le langage de programmation Icon pour batir
  une    base    de    code    de   manipulation   d'assembleur.    Voir
  <http://www.cs.virginia.edu/~nr/toolkit/>

  44..22..44..33..  TTuunneess

  Le projet de systeme d'exploitation OS developpe son propre assembleur
  comme  etant  une  extension  du  langage Scheme. Il ne fonctionne pas
  encore totalement, de l'aide est bienvenue.

  L'assembleur manipule des arbres de  syntaxes  symboliques,  de  telle
  maniere  qu'il  puisse  servir  comme  base d'un traducteur de syntaxe
  assembleur, un desassembleur, l'assembleur d'un compilateur, etc.   Le
  fait  qu'il  utile  un  vrai  langage  de programmation puissant comme
  Scheme le rend imbatable pour le macro-traitement  et  pour  la  meta-
  programmation.

  <http://www.eleves.ens.fr:8080/home/rideau/Tunes/>

  55..  CCoonnvveennttiioonnss dd''aappppeell

  55..11..  LLiinnuuxx

  55..11..11..  EEddiittiioonn ddee lliieennss aavveecc GGCCCC

  C'est la solution la plus pratique.  Consultez la documentation de gcc
  et prenez exemple sur les sources du noyau Linux (fichiers .S qui sont
  utilises avec gas, non pas as86).

  Les  arguments  32  bits  sont  empiles  dans la pile vers le bas dans
  l'ordre inverse de l'ordre syntaxique (c'est-a-dire qu'on  accede  aux
  arguments  ou  les  depile  dans  l'ordre  syntaxique),  au-dessus  de
  l'adresse de retour 32 bits.  %ebp,  %esi,  %edi,  %ebx  doivent  etre
  conserves  par  l'appele,  les autres registres peuvent etre detruits;
  %eax doit contenir le resultat, ou %edx:%eax pour des resultats sur 64
  bits.

  Pile  virgule  flottante:  je  ne  suis  pas sur, mais je pense que le
  resultat se trouve dans st(0),  la  pile  etant  a  la  discretion  de
  l'appele.

  Notez  que GCC possede certaines options pour modifier les conventions
  d'appel en reservant certains registres, en mettant les arguments dans
  des  registres,  en  supposant  que  l'on  ne possede pas de FPU, etc.
  Consultez les pages .info concernant le i386.

  Il faut prendre garde a declarer l'attribut cdecl  pour  une  fonction
  qui  suit la convention standard GCC (je ne sais pas exactement ce que
  cela  produit  avec   des   conventions   modifiees).   Consultez   la
  documentation GCC dans la section: C Extensions::Extended Asm::

  55..11..22..  PPrroobblleemmeess EELLFF eett aa..oouutt

  Certains  compilateurs  C  ajoutent  un underscore avant tout symbole,
  alors que d'autres ne le font pas.

  En particulier, la version GCC a.out effectue ce genre d'ajouts, alors
  que la version ELF ne le fait pas.

  Si  vous etes confronte a ce probleme, regardez comment des paquetages
  existants traitent le problemes. Par exemple, recuperer  une  ancienne
  arborescence des sources de Linux, Elk, les qthreads ou OCAML...

  Vous  pouvez  egalement  redefinir  le  renommage  implicite  de  C en
  assembleur en ajoutant les instructions suivantes:

  ______________________________________________________________________
          void truc asm("machin") (void);
  ______________________________________________________________________

  pour s'assurer que la fonction C truc sera reellement  appelee  machin
  en assembleur.

  Remarquez  que  l'outil  objcopy,  du paquetage binutils, devrait vous
  permettre de transformer vos fichiers objets a.out en  objets  ELF  et
  peut-etre inversement dans certains cas.  D'une maniere plus generale,
  il vous permet d'effectuer de nombreuses  conversions  de  formats  de
  fichiers.

  55..11..33..  AAppppeellss ssyysstteemmeess ddiirreeccttss

  Il  n'est  absolument pas recommande d'effectuer de tels appels par ce
  que leurs conventions peuvent changer de temps en temps, ou d'un  type
  de  noyau  a  un  autre  (cf L4Linux), de plus, ce n'est pas portable,
  difficile a ecrire, redondant avec l'effort  entrepris  par  libc,  et
  enfin,  cela  empeche  les  corrections et les extensions effectuees a
  travers la libc, comme par exemple avec le programme zlibc qui realise
  une  decompression  a  la  volee de fichiers compresses avec gzip.  La
  maniere standard et recommendee d'effectuer des appels systemes est et
  restera de passer par la libc.

  Les   objets  partages  devraient  reduire  l'occupation  memoire  des
  programmes,  et  si  vous  souhaitez  absolument   avoir   de   petits
  executables,  utilisez  #! avec un interpreteur qui contiendra tout ce
  que vous ne voulez pas mettre dans vos binaires.

  Maintenant, si pour certaines raisons, vous ne souhaitez pas effectuer
  une  edition  des  liens  avec  la  libc,  recuperez-la  et essayez de
  comprendre comment elle fonctionne! Apres tout, vous pretendez bien la
  remplacer non?
  Vous     pouvez     aussi     regarder     comment     eforth     1.0c
  <ftp://ftp.forth.org/pub/Forth/Linux/linux-eforth-1.0c.tgz> le fait.

  Les sources de Linux sont fort utiles, en particulier le fichier d'en-
  tete  asm/unistd.h  qui  decrit  comment  sont  effectues  les  appels
  systeme...

  Le principe general est d'utiliser l'instruction  int  $0x80  avec  le
  numero  de  l'appel  systeme  __NR_machin (regarder dans asm/unistd.h)
  dans %eax, et les parametres (jusqu'a cinq)  dans  %ebx,  %ecx,  %edx,
  %esi, %edi. Le resultat est renvoye dans %eax avec un resultat negatif
  etant l'erreur dont l'oppose est tranfere par la libc dans  errno.  La
  pile utilisateur n'est pas modificee donc n'avez pas besoin d'en avoir
  une correcte lors de l'appel.

  55..11..44..  EEnnttrreeeess//ssoorrttiieess ssoouuss LLiinnuuxx

  Si vous  souhaitez  effectuer  des  entrees/sorties  directement  sous
  Linux,  soit  il  s'agit  de  quelque chose de tres simple qui n'a pas
  besoin de specificites du systeme et dans  ce  cas  la,  consultez  le
  mini-HOWTO  IO-Port-Programming,  ou alors vous devez creer un nouveau
  gestionnaire de peripherique  et  vous  devriez  alors  lire  quelques
  documents sur les meandres du noyau, le developpement de gestionnaires
  de  peripheriques,  les  modules  du  noyau,   etc.   Vous   trouverez
  d'excellents HOWTO ou autres documents du projet LDP.

  Plus  particulierement,  si  vous  souhaitez  realiser  des programmes
  graphiques,         rejoignez         le          projet          GGI:
  <http://synergy.caltech.edu/~ggi/>          <http://sunserver1.rz.uni-
  duesseldorf.de/~becka/doc/scrdrv.html>

  Dans tous les cas, vous devriez plutot utiliser l'assembleur en  ligne
  de  GCC  avec  les  macros  provenant  des  fichiers linux/asm/*.h que
  d'ecrire des sources en assembleur pur.

  55..11..55..  AAcccceeddeerr aauuxx ggeessttiioonnnnaaiirreess 1166 bbiittss aavveecc LLiinnuuxx//ii338866

  De telles choses sont theoriquement possibles  (preuve:  voir  comment
  DOSEMU  permet  a  des  programmes  d'acceder  au port serie), et j'ai
  entendu  des  rumeurs  que  certaines  personnes  le  font  (avec   le
  gestionnaire  PCI? Acces aux cartes VESA? PnP ISA? Je ne sais pas). Si
  vous avez de plus amples precisions a ce sujet, soyez  les  bienvenus.
  Le  bon  endroit  a  regarder est les sources du noyau, les sources de
  DOSEMU (et des autres programmes se trouvant dans le repertoire DOSEMU
  <ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/>), ainsi que les sources
  d'autres programmes bas niveaux (peut-etre GGI s'il  gere  les  cartes
  VESA).

  En  fait,  vous  devez  utiliser soit le mode protege 16 bits, soit le
  mode vm86.

  Le premier est plus simple a configurer mais il ne fonctionne  qu'avec
  du code ayant un comportement propre qui n'effectue pas d'arithmetique
  de segments ou d'adressage absolu  de  segment  (en  particulier  pour
  l'adressage  du  segment  0), a moins que par chance tous les segments
  utilises peuvent etre configure a l'avance dans le LDT.

  La seconde  possiblite  permet  d'etre  plus  "compatibles"  avec  les
  environnements  16  bits  mais  il  necessite  une  gestion  bien plus
  compliquee.
  Dans les deux cas, avant de sauter sur le code 16 bits, vous devez:

  +o  mmapper toute adresse absolue utilisee dans le code 16 bits  (comme
     la  ROM, les tampons video, les adresses DMA et les entrees/sorties
     passant des zones de memoires mappees) a partir  de  /dev/mem  dans
     votre espace d'adressage de votre processus.

  +o  configurer le LDT et/ou le moniteur en mode vm86.

  +o  demander   au   noyau  les  droits  d'acces  necessaires  pour  les
     entrees/sorties (voir plus haut).

  Encore une fois, lisez attentivement les codes sources situes dans  le
  repertoire  de  DOSEMU et consorts, en particulier ces mini-emulateurs
  permettant de faire tourner des programmes ELKS et/ou des  .COM  assez
  simples sous Linux/i386.

  55..22..  DDOOSS

  La  plupart  des  emulateurs DOS sont livres avec certaines interfaces
  d'acces aux services DOS. Lisez leur documentation a  ce  sujet,  mais
  bien  souvent,  ils  ne  font que simuler int $0x21 et ainsi de suite,
  donc c'est comme si vous etiez en mode reel (je doute qu'ils aient  de
  possibilites  de  fonctionner  avec des operandes 32 bits: ils ne font
  que reflechir l'interruption dans le mode reel ou dans le gestionnaire
  vm86).

  Certaines  documentations  concernant  DPMI (ou ses variantes peuvent)
  etre trouvees sur <ftp://x2ftp.oulu.fi/pub/msdos/programming/>

  DJGPP est livre avec son propre sous-ensemble, derive, ou remplacement
  (limite) de la glibc.

  Il est possible d'effectuer une compilation croisee de Linux vers DOS.
  Consultez  le  repertoire  devel/msdos/  de  votre   miroir   FTP   de
  sunsite.unc.edu.  Voir  egalement  le dos-extender MOSS du projet Flux
  d'utah.

  D'autres documentations et  FAQ  sont  plus  consacres  a  DOS.   Nous
  deconseillons le developpement sous DOS.

  55..33..  WWiinnddaauubbeerriieess......

  Heu,  ce  document  ne  traite  que de libre logiciel.  Telephonez-moi
  lorsque Windaube le deviendra ou du moins ses outils de developpement!

  En    fait,    apres    tout,    cela    existe:    Cygnus   Solutions
  <http://www.cygnus.com> a developpe la bibliotheque cygwin32.dll  pour
  que   les   programmes  GNU  puissent  fonctionner  sur  les  machines
  MicroMerdiques.  Donc, vous pouvez  utiliser  GCC,  GAS  et  tous  les
  outils  GNU  ainsi  que bon nombre d'applications Unix. Consultez leur
  site Web.  Je (Fare) ne souhaite pas m'etendre  sur  la  programmation
  sous  Windaube,  mais  je  suis  sur  que  vous  trouverez tout un tas
  d'informations partout...

  55..44..  VVoottrree pprroopprree ssyysstteemmee dd''eexxppllooiittaattiioonn

  Le  controle  sur  le  systeme  etant  ce  qui  attire   de   nombreux
  programmeurs  vers l'assembleur, une premisse ou un corollaire naturel
  de son utilisation est la volonte de  developper  son  propre  systeme
  d'exploitation.   Remarquons  tout d'abord que tout systeme permettant
  son   auto-developpement   pourrait   etre   qualifie    de    systeme
  d'exploitation,   combien  meme  tournerait-il  au-dessus  d'un  autre
  systeme sur lequel il se dechargerait  de  la  gestion  du  multitache
  (Linux sur Mach) ou des entrees/sorties (OpenGenera sur Digital Unix),
  etc.   Donc,  pour  simplifier  le  debogage,  vous  pouvez  souhaiter
  developper  votre  systeme  d'exploitation  comme  etant  un processus
  fonctionnant sous Linux (au prix d'un certain  ralentissement),  puis,
  utiliser  le  Flux  OS kit <http://ww.cs.utah.edu/projects/flux/> (qui
  permet l'utilisation des  drivers  Linux  et  BSD  dans  votre  propre
  systeme  d'exploitation)  pour  le  rendre independant.  Lorsque votre
  systeme est  stable,  il  est  toujours  temps  d'ecrire  vos  propres
  gestionnaires de materiels si c'est vraiment votre passion.

  Ce  HowTo  ne  couvrira  pas des sujets comme le code de chargement du
  systeme, le passage en mode 32 bits, la gestion des interruptions, les
  bases  concernant  les  horreurs  des processeurs Intel (mode protege,
  V86/R86), la definition de votre format d'objets ou de vos conventions
  d'appel.   L'endroit  ou  vous  pourrez trouver le plus d'informations
  concernant tous  ces  sujets  est  le  code  source  de  systeme  deja
  existants.

  Un   grand   nombre   de   pointeurs   se   trouvent   dans  la  page:
  <http://www.eleves.ens.fr:8080/home/rideau/Tunes/Review/OSes.html>

  66..  AA ffaaiirree eett ppooiinntteeuurrss

  +o  completer les sections incompletes;

  +o  ajouter des pointeurs sur des programmes et des documentations;

  +o  ajouter des exemples de tous les jours pour illustrer  la  syntaxe,
     la puissance et les limitation de chacune des solutions proposees;

  +o  demander aux gens de me donner un coup de main;

  +o  trouver  quelqu'un  qui  a assez de temps pour prendre en charge la
     maintenance de ce HOWTO;

  +o  peut-etre dire quelques  mots  sur  l'assembleur  d'autres  plates-
     formes?

  +o  Quelques  pointeurs  (en  plus  de  ceux  qui  se  trouvent dans ce
     document)

  +o  pages          de           manuel           pour           pentium
     <http://www.intel.com/design/pentium/manuals/>

  +o  hornet.eng.ufl.edu      pour      les      codages      assembleurs
     <http://www.eng.ufl.edu/ftp>

  +o  ftp.luth.se <ftp://ftp.luth.se/pub/msdos/demos/code/>

  +o  PM FAQ <ftp://zfja-gate.fuw.edu.pl/cpu/protect.mod>

  +o  Page Assembleur 80x86 <http://www.fys.ruu.nl/~faber/Amain.html>

  +o  Courseware <http://www.cit.ac.nz/smac/csware.htm>

  +o  programmation                        de                        jeux
     <http://www.ee.ucl.ac.uk/~phart/gameprog.html>

  +o  experiences  de  programmation  sous  Linux        exclusivement en
     assembleur <http://bewoner.dma.be/JanW>

  +o  Et bien  sur,  utilisez  vos  outils  habituels  de  recherche  sur
     Internet  pour trouver les informations. Merci de m'envoyer tout ce
     que vous trouvez d'interessant.

  Signature de l'auteur:

  --    ,                                         ,           _ v    ~  ^  --
  --
  -- Fare -- rideau@clipper.ens.fr -- Francois-Rene Rideau -- +)ang-Vu Ban --
  --                                      '                   / .          --
  Join the TUNES project for a computing system based on computing freedom!
                   TUNES is a Useful, Not Expedient System
  WWW page at URL: http://www.eleves.ens.fr:8080/home/rideau/Tunes/

  The Belgian HOWTO
  par Dag Wiers, en anglais et nerlandais dag@mind.be et en
  franais par Dany Vanderroost, danyv@euronet.be
  v1.0.22, 17 Fvrier 2000

  Ce document dcrit comment peaufiner la configuration de Linux pour
  les utilisateurs belges et recense les groupes d'utilisateurs belges,
  commerciaux et autres en Belgique.

  ______________________________________________________________________

  Table des matires






















































  1. Introduction

     1.1 Pourquoi ce document?
     1.2 Nouvelles versions de ce document
     1.3 Versions traduites
     1.4 Contributions
     1.5 Feedback
     1.6 Legal stuff
     1.7 Todo

  2. Configuration

     2.1 Le clavier
        2.1.1 Mode console
        2.1.2 XFree86
     2.2 Les applications et les possibilts/modes d'affichage
        2.2.1 Utilisation de fontes ISO-8859-1 en mode console
        2.2.2 Support du symbol Euro
     2.3 Fuseau horaire
     2.4 Locale support ou le support multilangues
        2.4.1 Nerlandais
        2.4.2 Franais
        2.4.3 Allemand
        2.4.4 Wallon
     2.5 Support de langue et des codepages maternels

  3. Configurer l'accs  Internet (informations sur les ISP belges)

     3.1 Connection avec un modem (PPP)
        3.1.1 Configuration du modem
        3.1.2 Installer pppd
        3.1.3 pap-secrets / chap-secrets
        3.1.4 Rseau
        3.1.5 Accorder des permissions aux fichiers
        3.1.6 Connection + dconnection
        3.1.7 Informations dpendantes des FAI (ISP)
     3.2 Connection avec votre adaptateur RNIS (ISDN)
        3.2.1 Mise  jour du kernel
        3.2.2 ISDN4Linux
        3.2.3 Configuration de l'interface
        3.2.4 pap-secrets / chap-secrets
        3.2.5 Network
        3.2.6 Permissions des fichiers
        3.2.7 Connection + dconnection
     3.3 Cablemodem (DHCP)
     3.4 ADSL

  4. Groupe des utilisateurs belges de Linux(Belgian Linux user groups ou BLUG)

     4.1 ALLIN Linux User Group
     4.2 Antwerp Linux User Group (ALUG)
     4.3 Brussels Linux User Group (BLUG)
     4.4 Charleroi Linux User Group (CAROLINUX)
     4.5 HCC Limburgse Linux Gebruikers Groep (HLLGG)
     4.6 HCC Linux Gebruikers Groep Antwerpen
     4.7 HCC Linux Gebruikers Groep Leuven
     4.8 Independent Group of Unix-Alikes and Network Activists (IGUANA)
     4.9 Infogroep (IGWE)
     4.10 Leuvense Linux Users (L2U)
     4.11 Limburgse Linux User Group (LILUG)
     4.12 Linux.be vzw/asbl
     4.13 Linux Belgian Team
     4.14 Linux Gebruikers Oost-Vlaanderen (LGOVL)
     4.15 Linux User Group De Bruxelles (BxLUG)
     4.16 Linux User Group De Namur
     4.17 Linux User Group Mons
     4.18 Linux User Movement Underground Mad Belgian Aliens (LUMUMBA)
     4.19 linuxbe.org
     4.20 Local Linux Support Group Gent (LLSGG)
     4.21 Open Technology Assembly Linux Special Interest Group
     4.22 Student Information Networking (SIN)
     4.23 TINA
     4.24 Unix Lovers Yield Student Services & Internet Support (ULYSSIS)
     4.25 Zeus WPI - Werkgroep Informatica RUG

  5. Les services commerciaux belges de Linux

     5.1 aDOC Services
     5.2 Arafox
     5.3 Better Access N.V.
     5.4 D. Connect
     5.5 Double Barrel Consultancy and Productions
     5.6 grmbl productions
     5.7 LIFE
     5.8 MIND NV
     5.9 Phidani Software SPRL
     5.10 Spier BVBA
     5.11 VirgoPlus sprl

  6. Belgian Linux resources

     6.1 Websites
        6.1.1 Linux en Belgique
        6.1.2 Linux-sites en nerlandais
        6.1.3 Linux-sites en franais
        6.1.4 Sites miroirs en Belgique
     6.2 HOWTO
        6.2.1 Web
        6.2.2 FTP
     6.3 Traductions des HOWTOs
        6.3.1 Nerlandais
        6.3.2 Franais
        6.3.3 Allemand
     6.4 FTP
        6.4.1 Kernel-sources
        6.4.2 Distributions
        6.4.3 Software
     6.5 Usenet
     6.6 Mailinglists
        6.6.1 Linux en Belgique
        6.6.2 Linux user groups
     6.7 IRC


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  PPoouurrqquuooii ccee ddooccuummeenntt??

  Puisqu'il n'y avait nulle part des informations sur internet pour les
  utilisateurs belges, nous avons commenc  rcolter celles qui nous
  paraissaient les plus importantes. Ce HOWTO vise  tre la liste
  dfinitives de toutes les informations propre  la Belgique pour
  Linux. Si vous ne le pensez pas, vous n'avez aucune excuses pour
  rclamer et certainement pas pour y participer. ;)

  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Si vous voulez en savoir plus sur le Projet de Documentation sur Linux
  (LDP) ou  propos des HOWTO, contactez le superviseur Tim Bynum linux-
  howto@sunsite.unc.edu.
  Tim Bynum poste mensuellement le listing sur diverses newsgroup
  nationaus et internationaux. De plus, les nouvelles versions du
  Belgian HOWTO seront toujours places en premier lieu sur internet
  (WWW) aux adresses suivantes  <http://dag.mind.be/howto/> et
  <http://club.euronet.be/howto.html>, veuillez vrifier rgulirement
  que la copie que vous avez est la dernire mise  jour.

  11..33..  VVeerrssiioonnss ttrraadduuiitteess

  Ce document est actuellement traduit en 3 langues (Anglais, Franais
  et Nerlandais), nous essayons de les garder toutes 3 en
  synchronisation mais la version Anglaise en est la source!

  Les versions anglaise et nerlandaise sont maintenues par Dag Wiers
  dag@mind.be et se trouvent :  <http://dag.mind.be/howto/>.

  La version franaise est maintenue par Dany Vanderroost
  danyv@euronet.be et se trouve :
  <http://club.euronet.be/dany.vanderroost/howto.html>.

  11..44..  CCoonnttrriibbuuttiioonnss

  Quelques personnes nous ont crits leurs suggestions et amliorations,
  merci :

    Wim Vandeputte wvdeputte@reptile.rug.ac.be

    Pablo Saratxaga srtxg@ping.be

    Christophe Lambin clambin@skynet.be

    Geert Uytterhoeven geert@linux-m68k.org

  Un grand merci  Ivo Clarysse soggie@iguana.be qui a commenc un sujet
  similaire auparavant () et dont le projet nous a permis de mettre ce
  document en ligne.

  11..55..  FFeeeeddbbaacckk

  Si quelques informations vous sembles fausses, dcevantes ou
  manquantes, nous apprcierions que vous nous envoyiez les
  amliorations. Comme nous ne sommes que des tres humains, ce document
  ne peut tre sans fautes mais votre contribution peut et fera la
  diffrence.

  Pour vous ajouter  un groupe d'utlisateur Linux ou commercial,
  envoyez nous toutes les informations utiles.

  11..66..  LLeeggaall ssttuuffff

  Les trademarks restent la proprits de leurs auteurs.

  Mme si les informations donnes dans ce document me semblent
  correctes, le contenu de ce document n'engagera en aucun cas la
  responsabilit de l'auteur. Utilisez les astuces et exemples  vos
  propre risques.

  Copyright  1998, 1999, 2000 par Dany Vanderroost. Ce document peut
  tre distribu selon les termes et conditions de la license LDP.

  11..77..  TTooddoo

  Cette partie comprend les choses que je veux inclure. Elles ne sont
  pas incluses dans la version anglaise (qui comprend celles propre 
  Dag)

    Ispell-software

    explication termes protocoles.

  22..  CCoonnffiigguurraattiioonn

  22..11..  LLee ccllaavviieerr

  Linux offre 2 mthodes pour configurer votre clavier. En mode console,
  vous pouvez utiliser loadkeys et sous XFree86 vous utiliserez xmodmap.

  22..11..11..  MMooddee ccoonnssoollee

  Pour utiliser la table de caractres d'un clavier belge, voici la
  marche  suivre

          loadkeys be2-latin1



  ou

          loadkeys be-latin1



  La seule diffrence entre les deux est le support des exposants 2 et 3
  (  (keycode 41)) ainsi que l'accent grave (keycode 43) sur
  be2-latin1.

  Habituellement loadkeys est lanc au dmarrage par des scripts situs
  quelque part dans _/_e_t_c_/_r_c_._d Certaines distributions le font
  diffremment. Mais la plupart utilisent un simple programme (comme
  kbdconfig chez RedHat ou yast chez SuSE) pour en changer les valeurs.

  22..11..22..  XXFFrreeee8866

  Pour configurer correctement votre clavier sous XFree86, vous avez
  plus de choix.En utlisant Xconfigurator (ou un programme similaire) un
  fichier de configuration pour XFree86 est cr (avec d'autres
  paramtres standarts). Ce fichier est appell _X_F_8_6_C_o_n_f_i_g et est
  habituellement situ dans _/_e_t_c ou _/_e_t_c_/_X_1_1

  Vrifiez (et changez si ncessaire) que vous avez les entres
  suivantes dans la Section Clavier.

          Section "Keyboard"
                  Protocol        "Standard"
                  XkbRules        "xfree86"
                  XkbModel        "pc101"
                  XkbLayout       "be"
          EndSection




  Si vous avez achet un clavier 'microsoft' (ou le clavier rfutant le
  pingouin ;p) vous pouvez activer ces 3 touches supplmentaires en
  changeant "pc101" en "pc104". (J'utilise ces touches comme meta-keys
  dans mon windowmanager afin que certains reccourcis claviers n'entrent
  pas en conflit avec ceux de mon wm).

  Pour que la touche AltGrfonctionne sous XFree86, il suffit simplement
  d'ajouter dans la Section Clavier:


                  RightAlt        ModeShift




  Pour que certaines combinaisons de touches fonctionnent sous X11, vous
  devez effectuer certains changements dans le fichier
  _/_u_s_r_/_X_1_1_R_6_/_l_i_b_/_X_1_1_/_x_k_b_/_s_y_m_b_o_l_s_/_b_e:

          key <AD11> {    [ dead_circumflex,       diaeresis      ],
                          [     bracketleft                       ]       };
          key <AC11> {    [          ugrave,         percent      ],
                          [      quoteright                       ]       };
          key <BKSL> {    [              mu,        sterling      ],
                          [       quoteleft                       ]       };
          key <AB10> {    [           equal,            plus      ],
                          [      asciitilde                       ]       };



  by

          key <AD11> {    [ dead_circumflex,  dead_diaeresis      ],
                          [     bracketleft                       ]       };
          key <AC11> {    [          ugrave,         percent      ],
                          [      dead_acute                       ]       };
          key <BKSL> {    [              mu,        sterling      ],
                          [      dead_grave                       ]       };
          key <AB10> {    [           equal,            plus      ],
                          [      dead_tilde                       ]       };




  Certaines personnes prfrent utiliser un alias (compose key) pour les
  caractres spciaux, comme par exemple:

          <compose>'e => 
          <compose>/o => 
          <compose>c, => 
          <compose>co => 
          <compose>ss => 




  Solution:

          xmodmap -e "keycode xx = Multi_key"



  ou

          xmodmap -e "keysym yy = Multi_key"



  o 'xx' est le code de la touche et 'yy' le caractre que vous choi
  sissez pour l'alias.  (utilisez xev pour en avoir les valeurs)

  Un autre solution est d'ajouter

          keycode xx = Multi_key


   votre  _/_._x_m_o_d_m_a_p_r_c. Son lancement est automatique.

  22..22..  LLeess aapppplliiccaattiioonnss eett lleess ppoossssiibbiillttss//mmooddeess dd''aaffffiicchhaaggee

  Certaines applications ont besoin d'tre compiles avec l'option
  "8-bit clean" pour pouvoir fonctionner correctement avec la table de
  caractre europenne. D'autres le font automatiquement.

  22..22..11..  UUttiilliissaattiioonn ddee ffoonntteess IISSOO--88885599--11 eenn mmooddee ccoonnssoollee

  Vous pouvez charger l'ISO-8859-1 en tapant la commande suivante dans
  votre console:

          setfont lat1u-16.psf
          mapscrn trivial
          echo -ne '\033(K'




  Pour utiliser les caractres , ,  or  vous devrez ajouter ces
  lignes dans votre  _/_._i_n_p_u_t_r_c:

          set meta-flag on
          set convert-meta off
          set output-meta on




  (ce doit tre fait pour chaque utilisateurs, si vous dsirez l'activer
  par dfaut pour tous, vous devez les ajouter dans le fichier
  _/_e_t_c_/_s_k_e_l_/ ou vous pouvez ajouter les ajouter dans _/_e_t_c_/_i_n_p_u_t_r_c et
  mettre la ligne suivante dans votre _/_e_t_c_/_b_a_s_h_r_c,


          export INPUTRC=/etc/inputrc




  )

  NNoottee:: ceci est seulement utilis par les programme utilisant la
  commande readlin (comme bash) De plus, vous devez ajouter les
  variables d'environnement:

          LC_CTYPE=iso-8859-1
          SYSFONT=lat1u-16.psf
          SYSTERM=linux




  22..22..22..  SSuuppppoorrtt dduu ssyymmbbooll EEuurroo

  Depuis que l'Europe a invent un nouveau caractre, l'Euro, il ya un
  nouveau standard. Il est appell ISO-8859-15 (aka Latin-9 ou Latin-0).
  Pour l'utiliser, vous avez besoin de nouvelles fontes et d'une
  nouvelle table de caractre qui sont incluses dans le paquet EURO que
  vous pouvez downloader sur: <ftp://ftp.freshmeat.net/pub/euro-patch/>.
  Bientt, celui-ci sera disponible dans toutes les distributions.

  Le changement de la table consiste en ces lignes:


          keycode  18 = +e        +E      currency
          keycode  46 = +c        +C      cent




  Et la variable suivante devra tre active:

          SYSFONT=lat0-16.psf



  pour tre sure que vous utilisez la bonne fonte.

  22..33..  FFuusseeaauu hhoorraaiirree

  Comme la Belgique est situe dans le fuseau horaire de l'Europe
  Centrale (aka MET) qui (en hiver) est quivalent  l'heure de
  Greenwhich plus 1 (GMT+1),vous pouvez simplement faire un lien
  symbolique de _/_u_s_r_/_l_i_b_/_z_o_n_e_i_n_f_o_/_l_o_c_a_l_t_i_m_e_/_M_E_T vers _/_e_t_c_/_l_o_c_a_l_t_i_m_e
  comme:

          ln -sf /usr/lib/zoneinfo/MET /etc/localtime



  ou

          ln -sf /usr/lib/zoneinfo/Europe/Brussels /etc/localtime



  Ceci ajuste automatiquement le changement d'heure (qui est GMT+2 en
  t).

  NNoottee:: certaines distributions ont un chemin d'accs diffrent,
  l'information du fuseau horaire peut se trouver dans _/_u_s_r_/_s_h_a_r_e ou
  autre...

  NNoottee22:: RedHat utilise un utilitaire qui s'appelle timeconfig, SuSE
  utilise yast

  Pour changer l'horloge CMOS et faire la synchonisation entre les deux
  horloges, faites comme ceci:

          hwclock --set --date="Feb 25 03:38"
          clock -u -s




  Si votre horloge est dfinie en tant que local (local time) (qui est
  fortement dcourag sauf si vous avez un autre OS install), faites:

          hwclock --set --date="Feb 25 04:38"
          clock -s



  [Notez qu'il y a une heure de diffrence ? ;p]

  22..44..  LLooccaallee ssuuppppoorrtt oouu llee ssuuppppoorrtt mmuullttiillaanngguueess

  Pas beaucoups de programmes ont ce support, si vous dsirez en savoir
  plus sur ce support ou comment crire vos propres programmes avec ce
  support, visitez: [put the damn url here ;p]
  Faites attention que ces variables rendent les problmes plus
  difficile  rsoudre si peu de personne peuvent vous aider !! Vous
  pouvez comprendre un problme quand il est crit en anglais technique
  mais il n'en est pas de mme avec certains termes obscure venant de la
  francisation ?!? Certains, manifestement, ne comprennent ni l'un ni
  l'autre. ;p

  22..44..11..  NNeerrllaannddaaiiss

  Pour activer le support du Nerlandais en Belgique sur un systme
  supportant le multilinguisme, vous avez juste  activer ces variables:

          LANG=nl
          LANGUAGE=nl_BE



  Essayez nl_BE.ISO_8859-1 si nl_BE ne fonctionne pas.

  22..44..22..  FFrraannaaiiss

  Si vous dsirez le support Franais, mettez:

          LANG=fr
          LANGUAGE=fr_BE



  Essayez fr_BE.ISO_8859-1 si fr_BE ne fonctionne pas.

  22..44..33..  AAlllleemmaanndd

  Si, enfin, vous dsirez le support Allemand, mettez:

          LANG=de
          LANGUAGE=de_BE



  Essayez de_BE.ISO_8859-1 si de_BE ne fonctionne pas.

  22..44..44..  WWaalllloonn

  Pour activer le support du Wallon, vous trouverez plus d'informations
  et de fichiers sur: <http://www.ping.be/linux/walon/>. Pour
  l'utiliser, mettez:

          LANG=wa
          LANGUAGE=wa_BE:fr_BE



  Essayez wa_BE.ISO_8859-1 si wa_BE ne fonctionne pas.

  22..55..  SSuuppppoorrtt ddee llaanngguuee eett ddeess ccooddeeppaaggeess mmaatteerrnneellss

  Ces options ajoutent le support des characterset et codepages belges.
  Si vous dsirez les avoir, il vous faudra recompiler le kernel avec
  ces options incluses.Ils ne s'appliquent que sur certains systmes
  (FAT-based, ISO9660, ...).

          < > Codepage 850 (Europe)
          < > NLS ISO 8859-1  (Latin 1; Languages de l'Europe de l'Ouest)
          < > NLS ISO 8859-15 (Latin 9; Languages de l'Europe de l'Ouest avec le support Euro)


  Situs dans  Filesystems > Native Language Support

  Si votre kernel est un kernel modulaire provenant de votre
  distributions (=vous n'avez jamais compil un kernel auparavant),
  alors vous pouvez utiliser:

          insmod nls_cp850
          insmod nls_iso8859_1
          insmod nls_iso8859_15




  33..  CCoonnffiigguurreerr ll''aaccccss  IInntteerrnneett ((iinnffoorrmmaattiioonnss ssuurr lleess IISSPP bbeellggeess))

  33..11..  CCoonnnneeccttiioonn aavveecc uunn mmooddeemm ((PPPPPP))

  Pour configurer correctement PPP, faites un tour sur: PPP-HOWTO
  <http://www.interweft.com.au/other/ppp-howto/ppp-howto.html>.  Je vais
  essayer de l'expliquer brivement, mais si vous avez des questions ou
  problmes, lisez trs attentivement les HOWTO.

  33..11..11..  CCoonnffiigguurraattiioonn dduu mmooddeemm

  Pour configurer votre modem, vous devez connaitre la chaine
  d'initialisation de votre modem. Pour en savoir plus sur celui-ci,
  visitez: Ask Mr. Modem <http://www.spy.net/~dustin/modem/>.

  AAtttteennttiioonn: si vous possdez un winmodem, vous ne pourrez l'utiliser.
  Pour plus d'informations sur ceux-ci, allez :
  <http://linmodems.org/>

  33..11..22..  IInnssttaalllleerr ppppppdd

  Maintenant, vous devez avoir install le paquet ppp (verifiez en
  tapant pppd --version), soyez certain d'avoir une version rcente.
  Ensuite, vrifiez que vous avez les fichiers suivants:

  _/_u_s_r_/_l_o_c_a_l_/_b_i_n_/_p_p_p



























          #!/bin/sh
          case $1 in
                  on|start)
                  TELEPHONE='555-1212'    # Le numro de tlphone
                  ACCOUNT='your_login'    # Votre nom pour la connectioN (comme 'George Burns')
                  PASSWORD='your_pass'    # Votre mot de passe ('Gracie Allen')
                  INITSTRING='AT&FF&;C1&D2Z' # La chaine d'initialisation du modem
                  IPLOCAL=0.0.0.0         # Adresse IP locale si connue. Dynamique = 0.0.0.0
                  IPREMOTE=0.0.0.0        # Adresse IP du provider si ncessaire. Normallement 0.0.0.0
                  DEVICE=/dev/ttyS1       # Port srie com1=ttyS0, com2=ttyS1,...
                  SPEED=57600             # 19200, 38400 or 57600 (ne pas essayer autre chose)
                  export TELEPHONE ACCOUNT PASSWORD INITSTRING
                  exec /usr/sbin/pppd $DEVICE $SPEED $IPLOCAL:$IPREMOTE \
                          user $ACCOUNT connect /etc/ppp/ppp-on-dialer
                  ;;
                  off|stop)
                  if [ -r /var/run/ppp0.pid ]; then
                          kill -INT `cat /var/run/ppp0.pid`
                          if [ ! "$?" = "0" ]; then
                                  rm -f /var/run/ppp0.pid
                                  echo "ERROR: Removed stale pid file"
                                  exit 1
                          fi
                          exit 0
                  fi
                  echo "ERROR: PPP link is not active on ppp0"
                  exit 1
                  ;;
                  info|status)
                  /usr/sbin/pppstats
                  ;;
                  *)
                  echo "Usage: ppp on|off|info|start|stop|status";
                  ;;
          esac




  _/_e_t_c_/_p_p_p_/_p_p_p_-_o_n_-_d_i_a_l_e_r

          #!/bin/sh
          exec /usr/sbin/chat -v                                  \
                  TIMEOUT         3                               \
                  ABORT           '\nBUSY\r'                    \
                  ABORT           '\nNO ANSWER\r'                       \
                  ABORT           '\nNO CARRIER\r'              \
                  ABORT           '\nNO DIALTONE\r'             \
                  ABORT           '\nRINGING\r\n\r\nRINGING\r'      \
                  ABORT           'Invalid Login'                 \
                  ABORT           'Login incorrect'               \
                  ''              "\r$INITSTRING\r"         \
                  'OK-+++\c-OK'  'ATH0'                          \
                  TIMEOUT         45                              \
                  OK              "ATDT$TELEPHONE"            \
                  CONNECT         ''                              \
                  ogin:--ogin:    "$ACCOUNT"                  \
                  ord:            "$PASSWORD"



  Vous pouvez oter l'option -v ds que tout fonctionne normalement.

  PPSS:: Vous pouvez remplacer


                  CONNECT         ''                              \



  par

                  CONNECT         \\d\\c                          \



  si vous avez des problmes de connection, nous ne l'avons pas test,
  faites le nous savoir !

  La commande pppd utilise _/_e_t_c_/_p_p_p_/_o_p_t_i_o_n_s pour prendre en compte ses
  options, vous pouvez les changer selon votre systme. Celles par
  dfauts fonctionnent cependant dans la majorit des cas.


          asyncmap 20a0000
          crtscts
          debug
          default-mru
          defaultroute
          detach
          escape 11,13,ff
          hide-password
          ipcp-accept-local
          ipcp-accept-remote
          lcp-echo-failure 4
          lcp-echo-interval 400
          lock
          modem
          mtu 1500
          netmask 255.255.255.0
          noipdefault
          passive

          #idle 300
          #kdebug 0
          #-vj



  Ds que la connection fonctionne  merveille, vous pouvez ter la
  fonction debug .

  AAtttteennttiioonn:: il est important de formater certains caractres spciaux,
  ainsi, tout caractre diffrent de [a-zA-Z0-9] et '_', sera pass en
  le prcdant du caractre '\'. Ainsi, 'e!b$l+' deviendra 'e\!b\$l\+'.
  Essayez si vous avez des problmes !

  33..11..33..  ppaapp--sseeccrreettss // cchhaapp--sseeccrreettss

  Si votre FAI (ISP) require CHAP ou PAP, vous avez besoin d'un de ces
  fichier avec votre nom d'utilisateur et votre password:

  _/_e_t_c_/_p_p_p_/_p_a_p_-_s_e_c_r_e_t_s or _/_e_t_c_/_p_p_p_/_c_h_a_p_-_s_e_c_r_e_t_s

          #client         server  secret          IP
          your_login      *       your_pass       *






  33..11..44..  RRsseeaauu

  Pour configurer votre serveur de noms, changez _/_e_t_c_/_r_e_s_o_l_v_._c_o_n_f. Si la
  connection est tablie mais que vous ne pouvez accder  une URL:
  c'est probablement l'erreur.

          domain nom_de_domaine_de_votre_isp
          nameserver votre_premier_DNS
          nameserver votre_second_DNS




  33..11..55..  AAccccoorrddeerr ddeess ppeerrmmiissssiioonnss aauuxx ffiicchhiieerrss

  Avant de pouvoir utiliser un script(shell), il doit avoir le bit x
  activ. Soyez certain d'avoir bien choisi les permissions afin que
  d'autres utilisateurs ne puissent lire les donnes inclues dans ces
  fichiers. Si toutefois, vous autorisez d'autres utilisateurs  faire
  des connections, il est prfrable d'utiliser sudo. Vous pouvez faire:

       chmod u+rw og-rwx -r /etc/ppp
       chmod u+x /etc/ppp/ppp-on-dialer /usr/local/bin/ppp




  33..11..66..  CCoonnnneeccttiioonn ++ ddccoonnnneeccttiioonn

  Ds lors, si _/_u_s_r_/_l_o_c_a_l_/_b_i_n est dans votre PATH, vous pouvez
  facilement vous connecter avec:

          ppp on



  et vous dconnecter avec:

          ppp off



  et pour prendre quelques statistiques, tapez:

          ppp status



  ou

          pppstats




  33..11..77..  IInnffoorrmmaattiioonnss ddppeennddaanntteess ddeess FFAAII ((IISSPP))


     DDiiggiibbeell::

        CCeerrttiiffiiccaattiioonn::
           PAP

        DDNNSS::
           194.119.240.62

        WWeebb::
           <http://www.digibel.org/>

        SSuuppppoorrtt::
           <http://support.digibel.be/linuxsup.htm>

     DDMMAA::

        CCeerrttiiffiiccaattiioonn::
           texte

        DDNNSS::
           195.13.24.1

        WWeebb::
           <http://www.dma.be/>

        SSuuppppoorrtt::
           <http://bewoner.dma.be/robvdw/ned/dma-nl.txt>

     EEuunneett::

        CCeerrttiiffiiccaattiioonn::
           texte

        OOppttiioonnss::
           proxyarp

        DDNNSS::
           193.74.208.135

        WWeebb::
           <http://www.eunet.be/>

        SSuuppppoorrtt::
           <http://www.Belgium.EU.net/customer/support/personnal/linux/>

     FFrreeeebbeell::

        CCeerrttiiffiiccaattiioonn::
           PAP

        DDNNSS::
           194.149.160.9, 194.149.160.1

        WWeebb::
           <http://www.freebel.net/>

        SSuuppppoorrtt
           pas encore officiel

     OOnnlliinnee::

        CCeerrttiiffiiccaattiioonn::
           texte

        OOppttiioonnss::
           noccp

        DDNNSS::
           62.112.0.7, 194.88.127.7

        WWeebb::
           <http://www.online.be/>


        SSuuppppoorrtt::
           pas encore officiel

     PPiinngg::

        CCeerrttiiffiiccaattiioonn::
           texte

        WWeebb::
           <http://www.ping.be/>

        SSuuppppoorrtt::
           <http://www.ping.be/Support/redhat.shtml>

     PPllaanneett IInntteerrnneett::

        CCeerrttiiffiiccaattiioonn::
           CHAP

        DDNNSS::
           194.119.232.3, 194.119.232.2

        WWeebb::
           <http://www.planetinternet.be/>

        SSuuppppoorrtt::
           pas encore officiel

     SSkkyynneett ((BBeellggaaccoomm))::

        CCeerrttffiiccaattiioonn::
           PAP

        DDNNSS::
           195.238.2.21, 195.238.2.22

        OOppttiioonnss::
           defaultroute

        WWeebb::
           <http://www.skynet.be/>

        SSuuppppoorrtt::
           pas encore officiel

     UUUUNNeett::

        CCeerrttiiffiiccaattiioonn::
           PAP

        WWeebb::
           <http://www.uunet.be/>

        DDNNSS::
           194.7.1.4, 194.7.15.70

        SSuuppppoorrtt::
           pas encore officiel

     VVTT44::

        CCeerrttiiffiiccaattiioonn::
           PAP

        WWEEBB::
           <http://www.vt4.net/>
        SSuuppppoorrtt::
           pas encore officiel

     WWaannaaddoooo ((EEuurroonneett))::

        CCeerrttiiffiiccaattiioonn::
           texte

        DDNNSS::
           195.74.193.12, 194.134.0.12

        WWeebb::
           <http://www.euronet.be/>  <www.wanadoo.be>

        SSuuppppoorrtt::
           <http://www.euronet.be/support/uk/linux/>

     WWoorrlldd OOnnlliinnee::

        CCeerrttiiffiiccaattiioonn::
           CHAP

        DDNNSS::
           212.233.1.34, 212.233.2.34

        WWeebb::
           <http://www.worldonline.be/>

        SSuuppppoorrtt::
           pas encore officiel

     XXSS44AALLLL::

        CCeerrttiiffiiccaattiioonn::
           PAP

        DDNNSS::
           194.109.6.66, 194.109.9.99

        WWeebb::
           <http://www.xs4all.be/>

        SSuuppppoorrtt::
           <http://pws1.xs4all.be/~helpdesk/new/linux/linuxconnect.html>

     YYuuccoomm::

        CCeerrttiiffiiccaattiioonn::
           CHAP

        WWeebb::
           <http://www.yucom.be/>

        SSuuppppoorrtt::
           pas encore officiel

  33..22..  CCoonnnneeccttiioonn aavveecc vvoottrree aaddaappttaatteeuurr RRNNIISS ((IISSDDNN))

  CCoonnttrriibbuutteedd bbyy CChhrriissttoopphhee LLaammbbiinn ccllaammbbiinn@@sskkyynneett..bbee

  Cette section ne vise pas  tre un guide dfinitif sur l'ISDN pour
  Linux. Pour plus de dtails sur ce sujet, rfrez-vous  Paul
  Slootman's ISDN4Linux HOWTO et ISDN4Linux-FAQ.



  33..22..11..  MMiissee  jjoouurr dduu kkeerrnneell

  Si vous utilisez un kernel 2.2.* , il est recommand de faire une mise
   jour des sources de ISDN; vous les trouverez sur
  <ftp://ftp.suse.com/pub/isdn4linux/>.  Pour plus d'infomartion,
  visitez: <http://www.brisse.dk/site/linux/docs/isdn.htm>

  AAtttteennttiioonn:: si vous avez achet rcemment un Eicon Diva 2.0 PCI (via
  Belgacom par exemple), il y a beaucoups de chances que vous ayez le
  Diva 2.01.Dans ce cas, vous devez obtenir la version date du 1
  juillet 1999 ou ultrieure !

  Ds que l'ISDN est en place, vous dmarrez le driver. Par exemple:

          modprobe hisax type=11 protocol=2



  Rfrez-vous aux Readme's pour les paramtres et valeurs correctes
  selon votre carte.

  33..22..22..  IISSDDNN44LLiinnuuxx

  Ensuite, vous avez besoin du kit ISDN4Linux.  Vous pouvez downloader
  la dernire version de ce kit :  <ftp://ftp.suse.com/pub/isdn4linux/>

  33..22..33..  CCoonnffiigguurraattiioonn ddee ll''iinntteerrffaaccee

  Ds que ce kit est install et configur, crivez un script
  configurant l'interface pour faire la connection. Comme toujours sous
  Linux, il y a diffrentes manire d'y arriver.

  _/_e_t_c_/_r_c_._d_/_r_c_._i_s_d_n:

          #!/bin/sh
          MSNREMOTE='555-1212'    # Numro du FAI
          MSNLOCAL='555-1313'     # mon numro sans 0 mais avec le code zonal
          ACCOUNT='george'        # Nom d'utilisateur pour le login (comme 'George Burns')
          IPLOCAL=10.0.0.2        # mon adresse IP fixe (uitilisez 10.0.0.2 si non fixe)
          IPREMOTE=0.0.0.0        # adresse IP du FAI
          INTERFACE=ippp0
          /sbin/modprobe hisax type=11 protocol=2
          /sbin/isdnctrl verbose 3 system on
          /sbin/isdnctrl addif $IF
          /sbin/isdnctrl secure $IF on
          /sbin/isdnctrl addphone $IF out $MSNREMOTE
          /sbin/isdnctrl eaz $IF $MSNLOCAL
          /sbin/isdnctrl huptimeout $IF 300
          /sbin/isdnctrl l2_prot $IF hdlc
          /sbin/isdnctrl l3_prot $IF trans
          /sbin/isdnctrl encap $IF syncppp
  #       /sbin/isdnctrl dialmode $IF auto
          /sbin/ifconfig $IF $IPLOCAL pointopoint $IPREMOTE -arp -broadcast
          /sbin/ipppd /dev/ippp0 user $ACCOUNT $IPLOCAL:$IPREMOTE




  Pour l'xcuter ds le dmarrage de la machine, il faut le rendre
  excutable et ajoutez la commande suivante dans _/_e_t_c_/_r_c_._d_/_r_c_._l_o_c_a_l:

          if [ -x /etc/rc.d/rc.isdn ]; then
                  . /etc/rc.d/rc.isdn
          fi


  La commande ipppd prend ses paramtres via le fichier
  _/_e_t_c_/_p_p_p_/_i_o_p_t_i_o_n_s:

          -ac
          -bsdcomp
          debug
          defaultroute
          ipcp-accept-local
          ipcp-accept-remote
          mru 1524
          mtu 1500
          noipdefault
          -pc
          useifip
          -vj
          -vjccomp

          #idle 360
          #persistent




  AAtttteennttiioonn:: Ne pas spcifier +pap ou +chap dans ce fichier. Ceci est
  utilis pour la certification d'un appel ENTRANT. Si vous le faites
  avec votre FAI, ipppd attendra que votre FAI ce certifie avec le
  protocole spcifi.

  AAtttteennttiioonn:: il est important de formater certains caractres spciaux,
  ainsi, tout caractre diffrent de [a-zA-Z0-9] et '_', sera pass en
  le prcdant du caractre '\'. Ainsi, 'e!b$l+' deviendra 'e\!b\$l\+'.
  Essayez si vous avez des problmes !

  Finalement, crez _/_e_t_c_/_p_p_p_/_i_p_-_d_o_w_n_._l_o_c_a_l pour manipuler la
  dconnection de l'interface:

          #!/bin/sh
          /sbin/ifconfig $1 down
          sleep 1
          /sbin/ifconfig $1 10.0.0.2 pointopoint




  NNoottee:: ceci est pour traiter quelques problmes avec le routage lors
  des dconnnections.  Quelqu'un a-t-il une solution plus lgantes?

  33..22..44..  ppaapp--sseeccrreettss // cchhaapp--sseeccrreettss

  Si votre FAI utilise PAP ou CHAP, crez un fichier _/_e_t_c_/_p_p_p_/_p_a_p_-
  _s_e_c_r_e_t_s ou _/_e_t_c_/_p_p_p_/_c_h_a_p_-_s_e_c_r_e_t_s. En voici le format:

          #client         server  secret          IP
          your_login      *       your_pass       *




  33..22..55..  NNeettwwoorrkk

  Pas rellement relatif  l'ISDN, mais de nombreuses personnes oublient
  cette phase (trops passionnes pour essayer de suite toute la matire
  apprise plus haut? :-)).

  Dans tous le cas, vous devez configure le DNS en crant le fichier
  _/_e_t_c_/_r_e_s_o_l_v_._c_o_n_f:
          domain le_nom_de_domaine_de_votre_fai
          nameserver premier_DNS
          nameserver second_DNS




  33..22..66..  PPeerrmmiissssiioonnss ddeess ffiicchhiieerrss

  Avant de pouvoir excuter un script, vous devez le rendre excutable.
  Souez sr d'avoir mis les bonnes permissions afin qu'aucun autres
  utilisateurs ne puisse lir les mots de passe contenus dans ces
  fichiers. Si vous dsirez qu'un autre utilisateur puisse communiquer,
  rfrez-vous  sudo et vous devez faire ceci:

      chmod u+rw og-rwx -r /etc/ppp
      chmod u+x /etc/rc.d/rc.isdn /etc/ppp/ip.down-local /usr/local/bin/isdn




  33..22..77..  CCoonnnneeccttiioonn ++ ddccoonnnneeccttiioonn

  Finalement, vous pouvez crer un petit script pour dmarrer et stopper
  la connection ISDN. Je l'ai mis sous _/_u_s_r_/_l_o_c_a_l_/_b_i_n_/_i_s_d_n:

          #!/bin/bash
          case $1 in
                  on|start)
                  /sbin/isdnctrl dial ippp0
                  ;;
                  off|stop)
                  /sbin/isdnctrl hangup ippp0
                  ;;
                  info|status)
                  /sbin/isdnctrl list ippp0
                  ;;
                  *)
                  echo "Usage: isdn on|off|info|start|stop|status"
                  ;;
          esac




  Ds lors, si _/_u_s_r_/_l_o_c_a_l_/_b_i_n est dans votre PATH, vous pouvez le faire
  facilement via:

          isdn on



  et:

          isdn off




  33..33..  CCaabblleemmooddeemm ((DDHHCCPP))

  DHCP a t cr pour rendre la vie plus facile et la plupart du temps,
  il le fait ;) Pour plus d'informations sur la configuration de votre
  version client du DHCP sont :
  <http://metalab.unc.edu/LDP/HOWTO/mini/DHCP.html> et une liste de FAQ
  :  <http://web.syr.edu/~jmwobus/comfaqs/dhcp.faq.html> qui dcrit
  tout ce que vous voulez savoir (en plus des informations ci-dessous)

  Beaucoups de personnes veulent connecter un rseau entier sur leur
  cablemodem, ce n'est pas un problme.Vous avez besoin de IP-
  Masquerading ( <http://metalab.unc.edu/LDP/HOWTO/mini/IP-
  Masquerade.html>) et tre certain que l'interface (qui communique avec
  le cablemodem) a une bonne adresse MAC !! Une autre solution (en cas
  de problmes) est de redmarrer votre cablemodem.


     CChheelllloo ((TTVVDD))::

        WWeebb::
           <http://www.chello.be/>

        SSuuppppoorrtt::
           pas encore officiel

        PPlluuss dd'' iinnffoorrmmaattiioonnss::
           <http://foobar.starlab.net/~soggie/tvd_linux/>

     PPaannddoorraa ((TTeelleenneett))::

        PPrrooxxyy aauuttoommaattiiqquuee::
           http://pac.pandora.be:8080

        hhttttpp pprrooxxyy::
           export http_proxy="http://proxy.pandora.be:8080/"

        WWeebb::
           <http://www.pandora.be/>

        SSuuppppoorrtt::
           pas encore officiel

        PPlluuss dd''iinnffoorrmmaattiioonnss::
           <http://users.pandora.be/de.boeve/pandora.html>

  33..44..  AADDSSLL


     TTuurrbboolliinnee ((BBeellggaaccoomm))::

        QQuueellqquueess rreennsseeiiggnneemmeenntt::
           utiliser DANA

        WWeebb::
           <http://www.turboline.be/>

        SSuuppppoorrtt::
           pas encore officiel

        PPlluuss dd''iinnffoorrmmaattiioonnss::
           <http://foobar.starlab.net/~soggie/turboline/>

  44..  GGrroouuppee ddeess uuttiilliissaatteeuurrss bbeellggeess ddee LLiinnuuxx((BBeellggiiaann LLiinnuuxx uusseerr ggrroouuppss
  oouu BBLLUUGG))

  Plus d'informations peuvent tre trouves dans le User Group HOWTO
  situ : <http://www.ntlug.org/~kclark/> Une liste complte des
  Groupes d'Utilisateurs de Linux est sur:
  <http://www.ssc.com/linux/glue/> et sur:
  <http://limestone.uoregon.edu/woven/lugww/>



  44..11..  AALLLLIINN LLiinnuuxx UUsseerr GGrroouupp


          Mechelbaan 260
          B-3130 Begijnendijk




     EEmmaaiill::
        allin@linuxfreak.com

     WWeebb::
        <http://come.to/allin/>

     CCoonnttaacctt::
        Paul Terweduwe paul@faes.be

     DDeerrnniirree mmooddiiffiiccaattiioonn::
        13 Avril 1999.

  44..22..  AAnnttwweerrpp LLiinnuuxx UUsseerr GGrroouupp ((AALLUUGG))


          Van Luppenstraat 70
          B-2018 Antwerp




     TTllpphhoonnee::
        +32 3 218 63 54

     EEmmaaiill::
        fv.alug@advalvas.be

     WWeebb::
        <http://sunsite.belnet.be/alug/>

     CCoonnttaacctt::
        Patrick Op de Beeck alug@pandora.be

     DDeerrnniirree mmooddiiffiiccaattiioonn::
        26 Dcembre 1999.

  44..33..  BBrruusssseellss LLiinnuuxx UUsseerr GGrroouupp ((BBLLUUGG))


          Brussels Linux User Group (BLUG)




     EEmmaaiill::
        johanb@linux.rave.org

     WWeebb::
        <http://linux.rave.org/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        24 Fvrier 1999.




  44..44..  CChhaarrlleerrooii LLiinnuuxx UUsseerr GGrroouupp ((CCAARROOLLIINNUUXX))


     Charleroi Linux User Group (CAROLINUX)




     EEmmaaiill::
        spirou@carolo.net

     WWeebb::
        <http://carolo.net/carolinux/>

     DDeerrnniirree mmooddiiffiiccaattiioonn::
        23 Septembre 1999.

  44..55..  HHCCCC LLiimmbbuurrggssee LLiinnuuxx GGeebbrruuiikkeerrss GGrrooeepp ((HHLLLLGGGG))


          HCC Limburgse Linux Gebruikers Groep




     EEmmaaiill::
        Linuxgg@hotmail.com

     WWeebb::
        <http://www.uunet.be/hcc/Limburg/Linuxgg>

     CCoonnttaacctt::
        Andy Peeters & Bruno Tony


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        31 Mai 1999.

  44..66..  HHCCCC LLiinnuuxx GGeebbrruuiikkeerrss GGrrooeepp AAnnttwweerrppeenn


          Armand Verachtert
          Turnhoutsebaan 421
          2140 Borgerhout




     WWeebb::
        <http://users.glo.be/~poe/index.html>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        25 Fvrier 1999.

  44..77..  HHCCCC LLiinnuuxx GGeebbrruuiikkeerrss GGrrooeepp LLeeuuvveenn


          Diegemstraat 61
          B-1930 Zaventem




     EEmmaaiill::
        Yvo.Dries@village.uunet.be
     WWeebb::
        <http://www.uunet.be/hcc/>

     CCoonnttaacctt::
        Yvo Dries Yvo.Dries@village.uunet.be


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        2 Aot 1999.

  44..88..  IInnddeeppeennddeenntt GGrroouupp ooff UUnniixx--AAlliikkeess aanndd NNeettwwoorrkk AAccttiivviissttss ((IIGGUUAANNAA))


          Milcampslaan 101
          B-1040 Schaarbeek




     TTllpphhoonnee::
        +32 2 657 77 36

     FFaaxx::
        +32 2 657 77 38

     EEmmaaiill::
        info@iguana.be

     WWeebb::
        <http://www.iguana.be/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        5 Mars 1999.

  44..99..  IInnffooggrrooeepp ((IIGGWWEE))


          Pleinlaan 2, 5F218 (building F)
          B-1050 Brussels




     TTllpphhoonnee::
        +32 2 629 33 56

     FFaaxx::
        +32 2 629 33 89

     EEmmaaiill::
        ig@igwe.vub.ac.be

     WWeebb::
        <http://igwe.vub.ac.be/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        6 Juillet 1999.

  44..1100..  LLeeuuvveennssee LLiinnuuxx UUsseerrss ((LL22UU))


          Leuvense Linux Users (L2U)


     EEmmaaiill::
        darkcompanion@village.uunet.be

     WWeebb::
        <http://l2u.iguana.be/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        28 Novembre 1999.

  44..1111..  LLiimmbbuurrggssee LLiinnuuxx UUsseerr GGrroouupp ((LLIILLUUGG))


          Limburgse Linux User Group (LILUG)




     EEmmaaiill::
        frank.eersels@ping.be

     WWeebb::
        <http://lilug.linuxatwork.at/>

     CCoonnttaacctt::
        Frank Eersels frank.eersels@ping.be


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        6 Mai 1999.

  44..1122..  LLiinnuuxx..bbee vvzzww//aassbbll


          Linux.be vzw/asbl
          Organisation pour la promotion de Linux en Belgique




     EEmmaaiill::
        info@linux.iguana.be

     WWeebb::
        <http://linux.iguana.be/>

     DDeerrnniirree mmooddiiffiiccaattiioonn::
        23 Septembre 1999.

  44..1133..  LLiinnuuxx BBeellggiiaann TTeeaamm


          Rue d'Aineffe 4
          B-4317 Borlez Faimes




     EEmmaaiill::
        manu@rtfm.be

     WWeebb::
        <http://linux.rtfm.be/>

     CCoonnttaacctt::
        Alexandre J.D. Dulaunoy adulau@rtfm.be
     DDeerrnniirree mmooddiiffiiccaattiioonn::
        25 Fvrier 1999.

  44..1144..  LLiinnuuxx GGeebbrruuiikkeerrss OOoosstt--VVllaaaannddeerreenn ((LLGGOOVVLL))


          Linux Gebruikers Oost-Vlaanderen




     EEmmaaiill::
        dennis@lgovl.freeservers.com

     WWeebb::
        <http://lgovl.freeservers.com/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        25 Fvrier 1999.

  44..1155..  LLiinnuuxx UUsseerr GGrroouupp DDee BBrruuxxeelllleess ((BBxxLLUUGG))


          Linux User Group De Bruxelles (BxLUG)




     EEmmaaiill::
        bxl_information@linuxbe.org

     WWeebb::
        <http://bxlug.linuxbe.org/>

     CCoonnttaacctt::
        Raphael Bauduin bxl_information@linuxbe.org


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        17 Juillet 1999.

  44..1166..  LLiinnuuxx UUsseerr GGrroouupp DDee NNaammuurr


          Linux User Group De Namur




     EEmmaaiill::
        namur@linuxbe.org

     WWeebb::
        <http://namur.linuxbe.org/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        17 Juillet 1999.

  44..1177..  LLiinnuuxx UUsseerr GGrroouupp MMoonnss


          Linux User Group Mons


     EEmmaaiill::
        webmaster@linuxwallonie.org

     WWeebb::
        <http://www.linuxwallonie.org/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        26 Mai 1999.

  44..1188..  LLiinnuuxx UUsseerr MMoovveemmeenntt UUnnddeerrggrroouunndd MMaadd BBeellggiiaann AAlliieennss ((LLUUMMUUMMBBAA))


          Universiteitslaan 1, Filii Lamberti
          3590 Diepenbeek




     EEmmaaiill::
        helpdesk@lumumba.luc.ac.be

     WWeebb::
        <http://lumumba.luc.ac.be/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        25 Fvrier 1999.

  44..1199..  lliinnuuxxbbee..oorrgg


          linuxbe.org




     EEmmaaiill::
        team@linuxbe.org

     WWeebb::
        <http://linuxbe.org/>

     CCoonnttaacctt::
        Cedric Gavage niddle@linuxbe.org


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        7 Fvrier 2000.

  44..2200..  LLooccaall LLiinnuuxx SSuuppppoorrtt GGrroouupp GGeenntt ((LLLLSSGGGG))


          Wim Vandeputte
          PB 144
          B-9000 Gent 12




     TTllpphhoonnee::
        +32 9 240 29 17

     FFaaxx::
        +32 9 240 34 39

     EEmmaaiill::
        wvdputte@reptile.rug.ac.be

     WWeebb::
        <http://llsgg.rug.ac.be/>

     CCoonnttaacctt::
        Wim Vandeputte wvdputte@reptile.rug.ac.be


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        4 Mars 1999.

  44..2211..  OOppeenn TTeecchhnnoollooggyy AAsssseemmbbllyy LLiinnuuxx SSppeecciiaall IInntteerreesstt GGrroouupp


          Kruipstraat 14
          B-1850 Grimbergen




     TTllpphhoonnee::
        +32 11 27 58 98

     FFaaxx::
        +32 11 27 03 89

     EEmmaaiill::
        info@ota.be

     WWeebb::
        <http://www.ota.be/sigs/linux/>

     CCoonnttaacctt::
        Jan Vanhercke jan.vanhercke@c-cure.be


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        4 Mars 1999.

  44..2222..  SSttuuddeenntt IInnffoorrmmaattiioonn NNeettwwoorrkkiinngg ((SSIINN))


          Kleinhoefstraat 4
          B-2440 Geel




     EEmmaaiill::
        sin@sin.khk.be

     WWeebb::
        <http://www.sin.khk.be/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        12 Juin 1999.

  44..2233..  TTIINNAA





     EEmmaaiill::
        vraagtina@digibel.org

     WWeebb::
        <http://tina.digibel.org/>

     CCoonnttaacctt::
        Roman Pauwels art@ping.be


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        3 Septembre 1999.

  44..2244..  UUnniixx LLoovveerrss YYiieelldd SSttuuddeenntt SSeerrvviicceess && IInntteerrnneett SSuuppppoorrtt ((UULLYYSSSSIISS))


          Blijde Inkomsstraat 21, lokaal 01.17
          B-3000 Leuven




     TTllpphhoonnee::
        +32 16 32 48 61

     EEmmaaiill::
        ulyssis@ulyssis.student.kuleuven.ac.be

     WWeebb::
        <http://www.ulyssis.student.kuleuven.ac.be/org/ulyssis/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        25 Fvrier 1999.

  44..2255..  ZZeeuuss WWPPII -- WWeerrkkggrrooeepp IInnffoorrmmaattiiccaa RRUUGG


          Krijgslaan 281 S9
          B-9000 Gent




     TTllpphhoonnee::
        +32 09 264 47 51

     EEmmaaiill::
        info@zeus.rug.ac.be

     WWeebb::
        <http://www.zeus.rug.ac.be/>

     CCoommmmeennttaaiirree::
        Rserv aux tudiants de la RUG


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        22 Juin 1999.

  55..  LLeess sseerrvviicceess ccoommmmeerrcciiaauuxx bbeellggeess ddee LLiinnuuxx

  Le Linux Documentation Project contient une liste mondiale des
  consultants Linux, Linux Consultants HOWTO et V.A.R HOWTO, et se
  trouve : <http://www.linuxports.com/>.

  55..11..  aaDDOOCC SSeerrvviicceess


          Avenue du Pesage, 31-33
          B-1050 Brussels




     TTllpphhoonnee::
        +32 2 646 00 76

     EEmmaaiill::
        sales@adoc-services.com

     WWeebb::
        <http://www.adoc-services.com/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        25 Fvrier 1999.

  55..22..  AArraaffooxx


      Avenue Joseph Wybranlaan 40
      B-1070 Brussels




     PPhhoonnee::
        +32 2 529 59 91

     FFaaxx::
        +32 2 529 59 92

     EEmmaaiill::
        info@arafox.com

     WWeebb::
        <http://www.arafox.com/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        11 February 2000.

  55..33..  BBeetttteerr AAcccceessss NN..VV..


          Geldenaakse Vest 6
          3000 Leuven




     TTllpphhoonnee::
        +32 16 29 80 45

     FFaaxx::
        +32 16 29 80 46

     EEmmaaiill::
        info@ba.be


     WWeebb::
        <http://www.ba.be/>

     TTyyppee ddee ssuuppppoorrtt::
        Aprs une installation sur site, nous aidons nos clients via une
        administration  distance avecSSH. La plupart des problmes sont
        transmis via email ou par notre propre system bas sur le web.
        Cela ne signifie pas qu'une fois en passant, un support
        tlphonique arrive..

     EExxppeerrttiissee ssppcciiaallee::
        Scurit, administration systme et setup, scurity
        (firewalling, tigerteaming, VPN, etc.),dfinition de seaux,
        rseaux sans fils, perturbations, dveloppement de produit, etc.
        Visitez http://www.ba.be pour plus d'informations.


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        7 Mars 1999.

  55..44..  DD.. CCoonnnneecctt


          Av. Van Goidtsnoven 33
          B-1180 Uccle




     EEmmaaiill::
        webmaster@dconnect.be

     WWeebb::
        <http://www.dconnect.be/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        25 Fvrier 1999.

  55..55..  DDoouubbllee BBaarrrreell CCoonnssuullttaannccyy aanndd PPrroodduuccttiioonnss


          Sportstraat 28
          B-9000 Gent




     TTllpphhoonnee::
        +32 9 222 77 64

     FFaaxx::
        +32 9 222 49 76

     EEmmaaiill::
        mvergall@double-barrel.be

     WWeebb::
        <http://www.double-barrel.be/>

     CCoonnttaacctt::
        Michael C. Vergallen mvergall@double-barrel.be

     TTyyppee ddee ssuuppppoorrtt::
        tlphone, email, administration  distance, chez nous, sur
        site.
     EExxppeerriiccee ssppcciiaallee::
        installation, administration systme, connection internet et
        intranet, sendmail, firewalls, proxys, DNS, perturbations
        software & hardware.


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        5 Mars 1999.

  55..66..  ggrrmmbbll pprroodduuccttiioonnss


          Korte Vuldersstraat
          B-8000 Brugge




     TTllpphhoonnee::
        +32 50 344366

     EEmmaaiill::
        info@grmbl.com

     WWeebb::
        <http://www.grmbl.com/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        2 Mars 1999.

  55..77..  LLIIFFEE


          Mgr. Vanwaeyenberglaan 6/10
          B-3000 Leuven




     TTllpphhoonnee::
        +32 477 57 50 71

     EEmmaaiill::
        info@life.be

     WWeebb::
        <http://www.life.be/>

     CCoonnttaacctt::
        Jasper Nuyens jasper@life.be

     TTyyppee ddee ssuuppppoorrtt::
        LIFE est la premire compagnie en Europe  offrir un service
        24/7 professionel pour Linux en Europe. LIFE propose en outre
        les service d'intallation de serveur et desktop , service 
        l'ducation et prix fixe pour developement. Exclusivementsur
        Linux.

     EExxppeerrttiissee ssppcciiaallee::
        Kernel driver development, database interconnectivity (VPN,
        wireless networking), security auditing (firewall, VPN, ethical
        hacking), e-commerce. Visitez notre WWW.



     DDeerrnniirree mmooddiiffiiccaattiioonn::
        20 April 1999.

  55..88..  MMIINNDD NNVV


          Naamsesteenweg 296
          B-3001 Heverlee - Leuven




     PPhhoonnee::
        +32 476 594 217 or +32 476 468 405

     EEmmaaiill::
        info@mind.be

     WWeebb::
        <http://mind.be/>

     CCoonnttaacctt::
        Peter Vandenabeele peter@mind.be ou Dag Wiers dag@mind.be

     TTyyppee ooff ssuuppppoorrtt::
        Installation & configuration, auditing & consultancy, support &
        maintenance, training & education, research & development.

     SSppeecciiaall eexxppeerrttiissee::
        Large Linux deployements, company security and network audits,
        remote server maintenance, application and kernel development,
        cluster computing, data recovery, ... See our website.


     LLaasstt mmooddiiffiieedd::
        11 Fvrier 2000.

  55..99..  PPhhiiddaannii SSooffttwwaarree SSPPRRLL


          Rue de l'autonomie 1
          B-1070 Brussels




     EEmmaaiill::
        info@phidani.be

     WWeebb::
        <http://www.phidani.be/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        25 Fvrier 1999.

  55..1100..  SSppiieerr BBVVBBAA


          Knaptandstraat 96-98
          B-9100  Sint-Niklaas





     EEmmaaiill::
        info@spier,be

     WWeebb::
        <http://www.spier.be/>


     DDeerrnniirree mmooddiiffiiccaattiioonn::
        02 Mars 1999.

  55..1111..  VViirrggooPPlluuss sspprrll


          Rue Dartois 1
          B-4000 Lige




     TTllpphhoonnee::
        +32 4 253 00 59

     FFaaxx::
        +32 4 253 00 49

     EEmmaaiill::
        contact@virgoplus.com

     WWeebb::
        <http://www.virgoplus.com/>

     CCoonnttaacctt::
        Bruno Mairlot bruno@virgoplus.com

     TTyyppee ddee ssuuppppoorrtt::
        tlphonique, email,ou administration rseaux  distance, chez
        nous, sur site

     EExxppeerrttiissee ssppcciiaallee::
        Installation, configuration, administration de Linux,connection
        internet ,developement intranet , firewalls, samba, netatalk,
        firewalls, proxys, DNS, web server (Apache), mod_perl, MySQL,
        Gui interface developpment (GTK+). Nous avons acquis une
        exprience avec les distributions Red Hat.


     DDeerrnniirree mmooddiiffiiccaattiioonnyy::
        28 Juin 1999.

  66..  BBeellggiiaann LLiinnuuxx rreessoouurrcceess

  66..11..  WWeebbssiitteess

  66..11..11..  LLiinnuuxx eenn BBeellggiiqquuee


    Linux in Belgium <http://linbel.iguana.be/>

    portail pour Linux <http://portail.linuxbe.org/>

    Belgian HOWTO <http://dag.mind.be/howto/Belgian-HOWTO.html>

    Belgian HOWTO in french
     <http://club.euronet.be/dany.vanderroost/howto.html>


  66..11..22..  LLiinnuuxx--ssiitteess eenn nneerrllaannddaaiiss


    <http://nl.linux.org/doc/>

    Nederlandstalige Linux Documentatie Project
     <http://doc.nllgg.nl/products/>

    Linux Support Website <http://www.linux-nl.cx/>

    Beginnen met Linux
     <http://user.online.be/~koendb/linux_beginners.html>

    Installatie Handleiding RedHat 5.2
     <http://user.online.be/~koendb/redhat.html>

  66..11..33..  LLiinnuuxx--ssiitteess eenn ffrraannaaiiss


    linuxbe.org <http://linuxbe.org/>

    linux-france.org <http://www.linux-france.org/>

  66..11..44..  SSiitteess mmiirrooiirrss eenn BBeellggiiqquuee


    Freshmeat at Chello (TVD) <http://be.eu.mirrors.freshmeat.net/>

    Linuxberg at Wallonie Internet <http://winbe.linuxberg.com/>

    Linuxberg at Online <http://online.linuxberg.com/>

    Linuxberg at Pandora (Telenet) <http://linuxberg.pandora.be/>

    Linux Gazette at Belnet
     <http://sunsite.belnet.be/alug/ftp_mirrors/linux_gazette/>

    LinuxFocus <http://linuxfocus.linuxbe.org>

    Linux France <http://linux-france.linuxbe.org>

    Linux Gazette at Linuxbe <http://linuxgazette.linuxbe.org>

  66..22..  HHOOWWTTOO

  La collection la plus importante d'informations sur Linux est sur
  internet. SVP, si vous dcouvrez des informations errones dans l'un
  d'eux, prenez contact avec l'auteur. C'est la seule manire de le
  corriger et de rester ensemble ;)

  66..22..11..  WWeebb


    HOWTO's at KULeuven <http://www.kulnet.kuleuven.ac.be/LDP/HOWTO/>

    HOWTO's at SIN <http://www.sin.khk.be/mirror/LDP/>

  66..22..22..  FFTTPP


    HOWTO's at Belnet
     <ftp://ftp.belnet.be/mirror/sunsite.unc.edu/pub/Linux/docs/HOWTO/INDEX.html>




  66..33..  TTrraadduuccttiioonnss ddeess HHOOWWTTOOss

  Comme le Nerlandais est le moins rpandu, c'est la dernire version
  supporte. Mais c'est en passe d'tre rsolu ;) (et peut-tre, pouvez-
  vous nous aider ?!?) Les versions Franaise et Allemande sont
  maintenues.

  66..33..11..  NNeerrllaannddaaiiss

  Une bonne initiative est en chantier mais il y a encore beaucoups 
  faire. Si vous dsirez y participer, commencez la traduction et
  envoyez la :  <http://nl.linux.org/doc/HOWTO/>.

  66..33..22..  FFrraannaaiiss

  Les versions franaises des HOWTOs peuvent tre trouvees sur:
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/french/>

  66..33..33..  AAlllleemmaanndd

  Les versions allemandes sont sur:
  <ftp://sunsite.unc.edu/pub/Linux/HOWTO/translations/german/>

  66..44..  FFTTPP

  La plupart du temps, il n'y a pas d'importance o vous prenez les
  fichiers, aussi longtemps que cela fonctionne. Mais pour vous sauver
  du temps et de la bande passante pour nous, il est prfrable de le
  prendre prs de chez vous ;) Naturellement, si j'en ai oubli, envoyez
  moi votre adresse ou correction.

  66..44..11..  KKeerrnneell--ssoouurrcceess


    Official Mirror kernel-sources at Chello (TVD)
     <ftp://ftp.be.kernel.org/>

    Mirror kernel-sources at linux.be.eu.org
     <ftp://ftp.linux.be.eu.org/mirrors/ftp.kernel.org/>

    Mirror kernel-sources at Digibel
     <ftp://ftp.digibel.be/pub/mirrors/ftp.kernel.org/>

  66..44..22..  DDiissttrriibbuuttiioonnss


    Red Hat

    Official Mirror at Belnet
     <ftp://ftp.belnet.be/mirror/ftp.redhat.com/>
     ftp://ftp.belnet.be/mirror/ftp.redhat.com/pub/redhat/redhat-
     _v_e_r_s_i_o_n/_a_r_c_h

    Mirror at Chello (TVD) <ftp://ftp.chello.be/mirror/ftp.redhat.com/>
     ftp://ftp.chello.be/mirror/ftp.redhat.com/redhat/redhat-
     _v_e_r_s_i_o_n/_a_r_c_h

    Mirror at linux.be.eu.org
     <ftp://ftp.linux.be.eu.org/mirrors/ftp.redhat.com/>

    Mirror at Pandora (Telenet)
     <ftp://mirrors.pandora.be/mirrors/ftp.redhat.com/>
     ftp://mirrors.pandora.be/mirrors/ftp.redhat.com/redhat/redhat-
     _v_e_r_s_i_o_n/_a_r_c_h


    Mirror at Digibel
     <ftp://ftp.digibel.be/pub/mirrors/ftp.redhat.com/>

    Debian

    Official Mirror at KULeuven
     <ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/ftp.debian.org/>

    Official Mirror  at spnet <ftp://debian.spnet.net/>

    Mirror at EUnet <ftp://ftp.eunet.be/pub/linux/debian/>

    Mirror at Skynet
     <ftp://ftp.skynet.be/mirror/linux/distributions/debian/>

    Mirror at Pandora (Telenet)
     <ftp://mirrors.pandora.be/mirrors/ftp.debian.org/>

    Mirror at Interpac
     <ftp://ftp.interpac.be/mirror/linux/distributions/debian/>

    Slackware

    Official Mirror at Interpac
     <ftp://ftp.interpac.be/mirror/linux/distributions/slackware/>

    Mirror at Skynet
     <ftp://ftp.skynet.be/mirror/linux/distributions/slackware/>

    Mirror at Globe <ftp://ftp.glo.be/pub/mirror/Slackware-3.6/>

    SuSE

    Mirror at Belnet <ftp://ftp.belnet.be/mirror3/ftp.suse.com/>

    Mirror at Pandora (Telenet) <ftp://mirrors.pandora.be/mirrors/>

    Mandrake

    Mirror at Belnet <ftp://ftp.belnet.be/packages/mandrake/>

  66..44..33..  SSooffttwwaarree


    Mirrors at Belnet <ftp://ftp.belnet.be/mirror/>

    Mirrors at Chello (TVD) <ftp://ftp.chello.be/mirror/>

    Mirrors at linux.be.eu.org <ftp://ftp.linux.be.eu.org/mirrors/>

    Mirrors at Pandora (Telenet) <ftp://mirrors.pandora.be/mirrors/>

    Mirrors at Digibel <ftp://ftp.digibel.be/pub/mirrors/>

  66..55..  UUsseenneett


    <news:be.comp.os.linux> sur Linux.iguana.be
     <http://linux.iguana.be/archive/>

    <news:be.comp.os.linux> sur WebWatch
     <http://www.webwatch.be/forums/be.comp.os.linux/MainTable.html>




  66..66..  MMaaiilliinngglliissttss

  66..66..11..  LLiinnuuxx eenn BBeellggiiqquuee


    info@linux.iguana.be

    lugs@linux.iguana.be

  66..66..22..  LLiinnuuxx uusseerr ggrroouuppss


    BLUG Mailinglist

    L2U Mailinglist

    LILUG Mailinglist

    LGOVL Mailinglist

  66..77..  IIRRCC

  La faon la plus rapide rapide pour avoir du support est l'IRC, mais
  attention parce que IRC est anonyme et de ce fait, il est facile de
  tromper les gens.

  Sur IRCnet il y a un canal appel #linux.be qui est relatif  bcol et
   la Belgian Linux-scene. Ce canal est petit mais il va surement
  grandir avec le temps. Pour avoir de l'aide en Anglais, un seul
  #linux.




































  Benchmarking HOWTO Linux
  par  Andre  D.  Balsa,  andrewbalsa@usa.net  <mailto:andrew-
  balsa@usa.net>
  traduit    par    Francois     Laagel,     f.laagel@ieee.org
  <mailto:f.laagel@ieee.org>
  v0.12, 15 Aout 1997 (v.f. : 2 du 28 Novembre 1997)

  Le  benchmarking  HOWTO  Linux traite de certains problemes relatifs a
  l'evaluation de performances de systemes Linux et presente un ensemble
  d'outils ainsi qu'un formulaire associe qui permettent de produire des
  mesures de performances significatives en quelques heures.   Peut-etre
  ce  document  contribuera-t-il  a  une diminution du nombre d'articles
  inutiles dans comp.os.linux.hardware...

  11..  IInnttrroodduuccttiioonn

  _"_C_e _d_o_n_t _o_n _n_e _p_e_u_t _p_a_r_l_e_r _d_o_i_t _e_t_r_e _p_a_s_s_e _s_o_u_s _s_i_l_e_n_c_e_._"

       _L_u_d_w_i_g _W_i_t_t_g_e_n_s_t_e_i_n _(_1_8_8_9_-_1_9_5_1_)_, _p_h_i_l_o_s_o_p_h_e _A_u_t_r_i_c_h_i_e_n

  L'evaluation de performances  (benchmarking)  consiste  a  mmeessuurreerr  la
  vitesse a laquelle un ordinateur execute une tache calculatoire, et ce
  de   facon   a    pouvoir    comparer    differentes    configurations
  logicielles/materielles.  Ceci  n'a  aauuccuunn  rapport  avec  la facilite
  d'utilisation, l'esthetique, les considerations d'ergonomie  ou  toute
  autre appreciation subjective.

  L'evaluation  de performances est une tache fastidieuse et repetitive.
  Elle necessite que l'on prete une grande attention aux  details.  Tres
  souvent les resultats obtenus ne sont pas ceux auxquels on s'attendait
  et sont sujet a interpretation (ce qui peut  tres  bien  etre  le  but
  d'une procedure d'evaluation de performances).

  Enfin,  l'evaluation de performances traite de faits et de chiffres et
  non pas d'opinion ou d'approximation.

  11..11..  PPoouurrqquuooii ll''eevvaalluuaattiioonn ddee ppeerrffoorrmmaanncceess eesstt--eellllee ssii iimmppoorrttaannttee ??

  Hormis les raisons mentionnees dans le BogoMips Mini-HOWTO (section 7,
  paragraphe 2), il arrive, lorsque l'on se constitue une machine Linux,
  que  l'on  soit  confronte  a  un budget limite et/ou a des besoins en
  performances minimales garanties.

  En d'autres termes, lorsque l'on se pose les questions suivantes :

  +o  Comment maximiser la performance avec un budget donne ?

  +o  Comment minimiser le cout necessaire  pour  obtenir  un  niveau  de
     performance donne ?

  +o  Comment  obtenir  le meilleur rapport performance/cout (etant donne
     un budget ou des besoins en performances minimales garanties) ?

  il faudra examiner, comparer et/ou produire des benchmarks (ndt  :  un
  benchmark  est  un  programme  ou un ensemble de programmes - on parle
  alors de suite - servant  a  evaluer  les  performances  d'un  systeme
  informatique).

  Minimiser   les   couts   sans  contraintes  de  performance  implique
  d'ordinaire la constitution d'une machine a partir  de  composants  de
  recuperation  (ce  vieux  386SX-16  qui  traine  dans  le  garage sera
  parfait), et ne necessite pas de benchmarks.  Maximiser la performance
  sans  cout  plafond n'est pas une situation realiste (a moins que l'on
  souhaite mettre un Cray dans son salon - la  banquette  recouverte  de
  cuir  qui  se  trouve  au  dessus des alimentations electriques est du
  meilleur gout, n'est-t-il pas ?).

  L'evaluation de performances sans contrainte de cout ni de performance
  minimale  garantie  n'a  pas  de  sens:  c'est  une  perte de temps et
  d'argent.  L'evaluation de performances n'a de sens que dans le  cadre
  d'une  prise  de  decision, c'est a dire si l'on a le choix entre deux
  alternatives ou plus.

  D'ordinaire des criteres autres que  le  ccoouutt  interviennent  dans  le
  processus decisionnel. Il peut s'agir de la disponibilite, du service,
  de la fiabilite, de considerations  strategiques  ou  de  toute  autre
  caracteristique  rationnelle  et  mesurable d'un systeme informatique.
  Par exemple,  lorsque  l'on  compare  la  performance  de  differentes
  versions du noyau Linux, la ssttaabbiilliittee est toujours plus importante que
  la vitesse d'execution.

  11..22..  NNoonn--ccrriitteerreess eenn mmaattiieerree dd''eevvaalluuaattiioonn ddee ppeerrffoorrmmaanncceess

  Malheureusement et tres souvent dans les newsgroups  (forums)  et  les
  mailing  lists  (listes  de diffusion par courrier electronique), sont
  cites :

  1. La reputation du fabriquant (non-mesurable et sans  signification).

  2. Les  parts  de  marche  du  fabriquant  (sans signification et non-
     pertinent).

  3. Des parametres irrationnels (superstition ou a-priori  par  exemple
     acheteriez-vous  un  processeur etiquete 131313ZAP et peint en rose
     ?).

  4. La   valeur    percue    (non-significative,    non-mesurable    et
     irrationnelle).

  5. L'ampleur   du   tapage   marketing  (ndt  :  mercatique  pour  les
     integristes :) est ce qu'il y a de pire, je crois. Personnellement,
     j'en  ai  marre  des  logos  "XXX  inside"  ou "kkkkkws compatible"
     (maintenant "aaaaaPowered" est de la partie, et  puis  quoi  encore
     ?).   AMHA,  les  milliards  de  dollards depenses durant de telles
     campagnes seraient bien mieux utilises par de equipes de  recherche
     pour  la  conception  de  nouveaux processeurs, plus rapides (moins
     chers  :-)  et  moins  bugges.  Aucune  campagne  publicitaire,  si
     ambitieuse  soit-elle,  n'est  en mesure de supprimer une bug de la
     FPU en calcul flottant sur le  tout  nouveau  processeur  que  vous
     venez  tout  juste  d'enficher  sur  votre  carte-mere, alors qu'un
     echange au profit d'un processeur re-concu le fera.

  6. Les opinions du type "Vous avez ce pour quoi  vous  avez  paye"  ne
     sont  precisement que ca : des opinions. Donnez-moi des faits, s'il
     vous plait.

  22..  PPrroocceedduurreess dd''eevvaalluuaattiioonn  ddee  ppeerrffoorrmmaanncceess  eett  iinntteerrpprreettaattiioonn  ddeess
  rreessuullttaattss

  Quelques recommendations semi-evidentes :

  1. Premierement et avant tout, iiddeennttiiffiieezz vvooss  oobbjjeeccttiiffss  dd''eevvaalluuaattiioonn
     ddee  ppeerrffoorrmmaanncceess. Qu'essayez vous exactement d'evaluer ? En quoi un
     processus d'evaluation de performances va-t-il vous aider a prendre
     une  decision  ulterieure  ? Combien de temps et quelles ressources
     voulez-vous consacrer a cet effort ?

  2. UUttiilliisseezz ddeess oouuttiillss ssttaannddaarrdd. Utilisez une version a jour et stable
     du  noyau, des versions standard et a jour de gcc et de la libc, et
     un benchmark standard. En bref, utilisez le LBT (voir plus loin).

  3. Donnez une ddeessccrriippttiioonn ccoommpplleettee de votre  configuration  materielle
     (voir le formulaire de compte-rendu plus loin).

  4. Essayez  d'iissoolleerr uunnee vvaarriiaabbllee uunniiqquuee. L'evaluation de performances
     comparative est plus informative que l'evaluation  de  performances
     "absolue". JJee nn''iinnssiisstteerraaii jjaammaaiiss aasssseezz llaa--ddeessssuuss.

  5. VVeerriiffiieezz  vvooss  rreessuullttaattss.  Faites  tourner vos benchmarks plusieurs
     fois et verifiez les variations des resultats obtenus, si variation
     il y a. Des variations inexpliquees invalideront vos resultats.

  6. Si  vous  pensez  que  votre  effort d'evaluation de performances a
     produit  de  l'information  significative,  ppaarrttaaggeezz--llaa   avec   la
     communaute Linux de facon pprreecciissee et ccoonncciissee.

  7. OOuubblliieezz  lleess  BBooggooMMiippss s'il vous plait. Je me promets d'implementer
     un jour un ASIC  (ndt  :  un  acronyme  pour  Application  Specific
     Integrated   Circuit,   c'est   un  circuit  integre  dedie  a  une
     application donnee) dans lequel  les  BogoMips  seront  cables.  Et
     alors on verra ce qu'on verra !

  22..11..  CCoommpprreennddrree lleess cchhooiixx eenn mmaattiieerree ddee bbeenncchhmmaarrkkss

  22..11..11..  BBeenncchhmmaarrkkss ssyynntthheettiiqquueess vvss.. bbeenncchhmmaarrkkss aapppplliiccaattiiffss

  Avant  de  consacrer  le  moindre  temps  aux  travaux d'evaluation de
  performances, il importe de faire un choix de  base  entre  benchmarks
  synthetiques et benchmarks applicatifs.

  Les benchmarks synthetiques sont specifiquement concus pour mesurer la
  performance des composants individuels d'un ordinateur, d'habitude  en
  poussant  l'un  desdits  composants  jusqu'a sa limite.  Un exemple de
  benchmark synthetique celebre est  la  suite  WWhheettssttoonnee,  initialement
  programmee  en 1972 par Harold Curnow en FORTRAN (ou etait-ce en ALGOL
  ?), et dont l'usage est toujours tres repandu de nos jours.  La  suite
  Whetstone  produira  une mesure de la performance d'une CPU en matiere
  de calcul flottant.

  La  principale  critique  que  l'on  puisse   faire   aux   benchmarks
  synthetiques  est  qu'ils  ne  representent  pas  la  performance d'un
  ordinateur,  en  tant  que  systeme  complexe,  dans  des   conditions
  d'utilisation  reelles.   Prenons par exemple la suite Whetstone, dont
  la boucle principale est tres courte, et qui donc peut aisement  tenir
  dans le cache primaire d'une CPU, cette suite maintient le pipeline de
  la FPU alimente en permanence de facon a pousser celle-ci a sa vitesse
  maximale. On ne peut pas vraiment critiquer la suite Whetstone si l'on
  se souvient qu'elle a ete programmee il y a 25 ans (sa conception  est
  meme  plus ancienne que ca !), mais il nous faut nous assurer que nous
  interpretons ses resultats avec prudence quand nous  nous  preoccupons
  d'evaluer les performances de micro-processeurs modernes.

  Un  autre aspect tres important qu'il nous faut avoir en tete a propos
  des benchmarks synthetiques est qu'idealement, ils  devraient  pouvoir
  nous  dire  quelque  chose  en ce qui concerne un aspect ssppeecciiffiiqquuee du
  systeme que l'on est en train de  tester,  et  ce  independamment  des
  autres  aspects  dudit  syseme  : un benchmark synthetique d'une carte
  D'E/S Ethernet devrait produire les memes resultats (ou des  resultats
  comparables)  que  ce  soit sur un 386SX-16 avec 4 MB de RAM ou sur un
  Pentium 200 MMX avec 64 MB de RAM. Si tel n'etait pas le cas, le  test
  mesurerait   la   performance   globale  de  l'association  CPU/carte-
  mere/bus/carte Ethernet/sous-systeme memoire/DMA,  ce  qui  n'est  pas
  tres  utile  puisque  la  difference au niveau des CPUs aura un impact
  plus important que la difference au niveau des cartes  Ethernet  (ceci
  suppose  bien sur que nous utilisions la meme combinaison noyau/driver
  (pilote de peripherique)). Dans le  cas  contraire  la  difference  de
  performances pourrait etre encore plus grande) !

  Enfin,  une  erreur  frequemment commise est de calculer la moyenne de
  divers benchmarks synthetiques et de pretendre  qu'une  telle  moyenne
  est  une  bonne  representation de la performance globale d'un systeme
  donne pour une utilisation dans la vie reelle.

  Voici un commentaire sur les benchmarks FPU (cite avec  la  permission
  du site Web de Cyrix Corp.) :

        _"_U_n_e  _u_n_i_t_e  _d_e  _c_a_l_c_u_l _f_l_o_t_t_a_n_t _a_c_c_e_l_e_r_e _l_e _l_o_g_i_c_i_e_l _c_o_n_c_u
       _p_o_u_r _l_'_u_t_i_l_i_s_a_t_i_o_n _d_e _l_'_a_r_i_t_h_m_e_t_i_q_u_e _f_l_o_t_t_a_n_t_e _: _t_y_p_i_q_u_e_m_e_n_t
       _i_l  _s_'_a_g_i_t  _d_e _p_r_o_g_r_a_m_m_e_s _d_e _C_A_O_, _d_e _t_a_b_l_e_u_r_s_, _d_e _j_e_u_x _e_n _3_D
       _e_t _d_'_a_p_p_l_i_c_a_t_i_o_n_s _d_e _c_o_n_c_e_p_t_i_o_n_. _C_e_p_e_n_d_a_n_t_, _l_a  _p_l_u_p_a_r_t  _d_e_s
       _a_p_p_l_i_c_a_t_i_o_n_s _P_C _p_o_p_u_l_a_i_r_e_s _d_'_a_u_j_o_u_r_d_'_h_u_i _u_t_i_l_i_s_e_n_t _a _l_a _f_o_i_s
       _d_e_s _i_n_s_t_r_u_c_t_i_o_n_s _f_l_o_t_t_a_n_t_e_s _e_t _l_'_a_r_i_t_h_m_e_t_i_q_u_e _e_n_t_i_e_r_e_. _C_'_e_s_t
       _p_o_u_r_q_u_o_i  _C_y_r_i_x  _a  _c_h_o_i_s_i  _d_e _m_e_t_t_r_e _l_'_a_c_c_e_n_t _s_u_r _l_e _p_a_r_a_l_-
       _l_e_l_i_s_m_e _l_o_r_s _d_e _l_a _c_o_n_c_e_p_t_i_o_n _d_u _p_r_o_c_e_s_s_e_u_r _6_x_8_6 _e_t _c_e  _d_a_n_s
       _l_e  _b_u_t  _d_'_a_c_c_e_l_e_r_e_r  _l_e_s  _p_r_o_g_r_a_m_m_e_s  _q_u_i _e_n_t_r_e_m_e_l_e_n_t _c_e_s _2
       _t_y_p_e_s _d_'_i_n_s_t_r_u_c_t_i_o_n_s_.

        _L_e  _m_o_d_e_l_e  _d_e  _t_r_a_i_t_e_m_e_n_t  _d_e_s  _e_x_c_e_p_t_i_o_n_s  _f_l_o_t_t_a_n_t_e_s  _d_e
       _l_'_a_r_c_h_i_t_e_c_t_u_r_e  _x_8_6  _p_e_r_m_e_t _a_u_x _i_n_s_t_r_u_c_t_i_o_n_s _e_n_t_i_e_r_e_s _d_'_e_t_r_e
       _e_m_i_s_e_s _e_t _d_e _s_e _t_e_r_m_i_n_e_r _p_e_n_d_a_n_t  _q_u_'_u_n_e  _i_n_s_t_r_u_c_t_i_o_n  _f_l_o_t_-
       _t_a_n_t_e  _e_s_t  _e_n  _c_o_u_r_s  _d_'_e_x_e_c_u_t_i_o_n_.  _A _l_'_o_p_p_o_s_e_, _u_n_e _s_e_c_o_n_d_e
       _o_p_e_r_a_t_i_o_n _f_l_o_t_t_a_n_t_e _n_e _p_o_u_r_r_a _p_a_s _e_t_r_e _e_x_e_c_u_t_e_e _a_l_o_r_s _q_u_'_u_n_e
       _p_r_e_c_e_d_e_n_t_e  _i_n_s_t_r_u_c_t_i_o_n  _f_l_o_t_t_a_n_t_e _e_s_t _e_n _c_o_u_r_s _d_'_e_x_e_c_u_t_i_o_n_.
       _P_o_u_r _s_u_p_p_r_i_m_e_r _c_e_t_t_e _l_i_m_i_t_a_t_i_o_n _d_e _p_e_r_f_o_r_m_a_n_c_e _c_r_e_e_e _p_a_r  _l_e
       _m_o_d_e_l_e  _d_e  _t_r_a_i_t_e_m_e_n_t  _d_e_s  _e_x_c_e_p_t_i_o_n_s _f_l_o_t_t_a_n_t_e_s_, _l_e _6_x_8_6_,
       _p_e_u_t _e_m_e_t_t_r_e _s_p_e_c_u_l_a_t_i_v_e_m_e_n_t _j_u_s_q_u_'_a  _4  _i_n_s_t_r_u_c_t_i_o_n_s  _f_l_o_t_-
       _t_a_n_t_e_s  _v_e_r_s  _l_a  _F_P_U  _i_n_t_e_g_r_e_e _s_u_r _l_e _c_i_r_c_u_i_t_. _P_a_r _e_x_e_m_p_l_e_,
       _d_a_n_s _u_n_e _s_e_q_u_e_n_c_e _d_e _c_o_d_e _c_o_n_s_t_i_t_u_e_e _d_e _2 _i_n_s_t_r_u_c_t_i_o_n_s _f_l_o_t_-
       _t_a_n_t_e_s  _(_F_L_T_s_)  _s_u_i_v_i_e_s  _d_e  _6 _i_n_s_t_r_u_c_t_i_o_n_s _e_n_t_i_e_r_e_s _(_I_N_T_s_)_,
       _e_l_l_e_s_-_m_e_m_e_s _s_u_i_v_i_e_s _d_e _2 _F_L_T_s_, _l_e _6_x_8_6 _p_e_u_t  _e_m_e_t_t_r_e  _t_o_u_t_e_s
       _c_e_s  _1_0 _i_n_s_t_r_u_c_t_i_o_n_s _v_e_r_s _l_e_s _u_n_i_t_e_s _d_'_e_x_e_c_u_t_i_o_n _a_p_p_r_o_p_r_i_e_e_s
       _a_v_a_n_t _q_u_e _l_'_e_x_e_c_u_t_i_o_n _d_e _l_a _p_r_e_m_i_e_r_e _F_L_T _n_e _s_e  _s_o_i_t  _t_e_r_m_i_-
       _n_e_e_.  _S_i  _a_u_c_u_n_e _d_e _c_e_s _i_n_s_t_r_u_c_t_i_o_n_s _n_e _p_r_o_v_o_q_u_e _d_'_e_x_c_e_p_t_i_o_n
       _(_c_e _q_u_i _e_s_t _t_y_p_i_q_u_e_)_, _l_'_e_x_e_c_u_t_i_o_n _c_o_n_t_i_n_u_e_, _l_e_s _u_n_i_t_e_s _f_l_o_t_-
       _t_a_n_t_e_s _e_t _e_n_t_i_e_r_e_s _t_e_r_m_i_n_a_n_t _l_'_e_x_e_c_u_t_i_o_n _d_e _c_e_s _i_n_s_t_r_u_c_t_i_o_n_s
       _e_n _p_a_r_a_l_l_e_l_e_.  _S_i _l_'_u_n_e _d_e_s _F_L_T_s _g_e_n_e_r_e  _u_n_e  _e_x_c_e_p_t_i_o_n  _(_l_e
       _c_a_s  _a_t_y_p_i_q_u_e_)_, _l_e_s _p_o_s_s_i_b_i_l_i_t_e_s _d_'_e_x_e_c_u_t_i_o_n _s_p_e_c_u_l_a_t_i_v_e_s _d_u
       _6_x_8_6 _p_e_r_m_e_t_t_e_n_t _q_u_e _l_'_e_t_a_t _d_u _p_r_o_c_e_s_s_e_u_r  _s_o_i_t  _r_e_s_t_i_t_u_e  _d_e
       _f_a_c_o_n  _a  _c_e  _q_u_e _c_e_l_u_i_-_c_i _s_o_i_t _c_o_m_p_a_t_i_b_l_e _a_v_e_c _l_e _m_o_d_e_l_e _d_e
       _t_r_a_i_t_e_m_e_n_t _d_e_s _e_x_c_e_p_t_i_o_n_s _f_l_o_t_t_a_n_t_e_s_.

        _L_'_e_x_a_m_e_n _d_e _c_o_d_e _d_e _b_e_n_c_h_m_a_r_k_s _s_y_n_t_h_e_t_i_q_u_e_s _f_l_o_t_t_a_n_t_s  _r_e_v_-
       _e_l_e  _q_u_e  _c_e_u_x_-_c_i  _u_t_i_l_i_s_e_n_t  _d_e_s  _s_e_q_u_e_n_c_e_s  _d_'_i_n_s_t_r_u_c_t_i_o_n_s
  _p_u_r_e_m_e_n_t _f_l_o_t_t_a_n_t_e_s _q_u_e _l_'_o_n _n_e _t_r_o_u_v_e _p_a_s _d_a_n_s _l_e_s _a_p_p_l_i_c_a_-
  _t_i_o_n_s  _d_u  _m_o_n_d_e  _r_e_e_l_.  _C_e  _t_y_p_e  _d_e _b_e_n_c_h_m_a_r_k_s _n_e _t_i_r_e _p_a_s
  _p_r_o_f_i_t _d_e_s  _p_o_s_s_i_b_i_l_i_t_e_s  _d_'_e_x_e_c_u_t_i_o_n  _s_p_e_c_u_l_a_t_i_v_e  _d_u  _p_r_o_-
  _c_e_s_s_e_u_r  _6_x_8_6_.  _C_y_r_i_x  _p_e_n_s_e  _q_u_e _l_e_s _b_e_n_c_h_m_a_r_k_s _n_o_n_-_s_y_n_t_h_e_-
  _t_i_q_u_e_s _b_a_s_e_s _s_u_r _d_e_s _a_p_p_l_i_c_a_t_i_o_n_s _d_u  _m_o_n_d_e  _r_e_e_l  _r_e_f_l_e_t_e_n_t
  _m_i_e_u_x _l_a _p_e_r_f_o_r_m_a_n_c_e _q_u_e _l_e_s _u_t_i_l_i_s_a_t_e_u_r_s _v_o_n_t _e_f_f_e_c_t_i_v_e_m_e_n_t
  _o_b_t_e_n_i_r_.  _L_e_s _a_p_p_l_i_c_a_t_i_o_n_s _d_u  _m_o_n_d_e  _r_e_e_l  _c_o_n_t_i_e_n_n_e_n_t  _d_e_s
  _i_n_s_t_r_u_c_t_i_o_n_s  _e_n_t_i_e_r_e_s  _e_t  _f_l_o_t_t_a_n_t_e_s  _e_n_t_r_e_m_e_l_e_e_s  _e_t _p_o_u_r
  _c_e_t_t_e _r_a_i_s_o_n _t_i_r_e_r_o_n_t _u_n  _m_e_i_l_l_e_u_r  _p_a_r_t_i  _d_e_s  _p_o_s_s_i_b_i_l_i_t_e_s
  _d_'_e_x_e_c_u_t_i_o_n _s_p_e_c_u_l_a_t_i_v_e _d_u _6_x_8_6_._"

  La  tendance  recente en matiere d'evaluation de performances consiste
  donc a choisir des  applications  usuelles  et  a  les  utiliser  pour
  mesurer  la  performance d'ordinateurs en tant que systemes complexes.
  Par exemple SSPPEECC, l'entreprise a but  non-lucratif  qui  a  concu  les
  celebres  suites de benchmarks synthetiques SPECINT et SPECFP, a lance
  un  projet  pour  developper  une   nouvelle   suite   de   benchmarks
  applicatifs.  Mais,  la  encore,  il  est tres improbable qu'une telle
  suite de benchmarks commerciale comporte du code Linux un jour.

  En resume, les  benchmarks  synthetiques  sont  valables  a  condition
  d'avoir  compris  leurs  objectifs  et  leurs  limites. Les benchmarks
  applicatifs   refleteront   mieux   la   performance   d'un    systeme
  informatique, mais aucun d'entre eux n'est disponible pour Linux.

  22..11..22..  BBeenncchhmmaarrkkss ddee hhaauutt--nniivveeaauu vvss.. ddee bbaass--nniivveeaauu

  Les  benchmarks  de  bas-niveau  ont  pour  ambition  la  mesure de la
  performance du materiel : la frequence de l'horloge du processeur, les
  temps  de  cycle de la DRAM (ndt : acronyme pour Dynamic Random Access
  Memory) et de la SRAM  (ndt  :  acronyme  pour  Static  Random  Access
  Memory)  cache,  temps  d'acces  moyen  d'un disque dur, temps d'acces
  piste a piste, etc...

  Cette approche peut etre utile si vous avez achete un systeme  et  que
  vous  vous  demandez  a partir de quels composants il a ete construit,
  bien qu'une meilleure facon de repondre a cette question soit d'ouvrir
  le  boitier, de dresser l'inventaire des composants que vous trouverez
  a l'interieur, et d'obtenir les specifications techniques pour  chacun
  d'entre eux (elles sont la plupart du temps disponibles sur le Web).

  Une autre utilisation possible des benchmarks de bas-niveau consiste a
  s'en servir pour verifier qu'un driver du  noyau  a  ete  correctement
  configure  pour  un  composant  materiel  donne : si vous disposez des
  specifications techniques de ce composant vous  pourrez  comparer  les
  resultats d'un benchmark de bas-niveau aux valeurs theoriques figurant
  dans les specs.

  Les benchmarks de haut-niveau ont plutot pour objectif la mesure de la
  performance de l'association materiel/driver/systeme d'exploitation en
  ce qui concerne un aspect specifique d'un  systeme  informatique  (par
  exemple  la  performance des entrees-sorties), ou meme une association
  specifique  materiel/driver/systeme  d'exploitation/application   (par
  exemple un benchmark Apache sur differents ordinateurs).

  Bien  sur,  tous  les  benchmarks de bas-niveau sont synthetiques. Les
  benchmarks de haut-niveau peuvent etre synthetiques ou applicatifs.

  22..22..  BBeenncchhmmaarrkkss ssttaannddaarrdd ddiissppoonniibblleess ppoouurr LLiinnuuxx

  AMHA, un test simple que tout le monde  peut  effectuer  a  l'occasion
  d'une  mise  a  jour  de  la  configuration de sa machine Linux est de
  lancer une compilation du noyau avant  et  apres  cette  mise  a  jour
  materielle/logicielle,  et  de  comparer les durees de compilation. Si
  tous les autres parametres sont les memes, alors ce test  est  valable
  en  tant  que  mesure  de la performance en matiere de compilation, et
  l'on peut affirmer en toute confiance que :

       "Le remplacement de A par B a conduit a une amelioration  de
       x % de la duree de compilation du noyau Linux dans telles et
       telles conditions".

  Ni plus, ni moins !

  Parce que la compilation du noyau est une  tache  tres  courante  sous
  Linux,  et  parce qu'elle met en oeuvre la plupart des fonctionnalites
  impliquees dans les benchmarks usuels (sauf le calcul flottant),  elle
  constitue  un test iissoollee plutot bon. Cependant, dans la majeure partie
  des cas, les resultats de ce test ne peuvent pas etre  reproduits  par
  d'autres   utilisateurs   de   Linux   a   cause  des  differences  de
  configurations materielles/logicielles.  Ce test ne constitue donc  en
  aucun   cas   une   metrique   permettant  de  comparer  des  systemes
  dissemblables (a moins que nous ne nous mettions tous d'accord sur  la
  compilation d'un noyau standard - voir plus loin).

  Malheureusement,  il  n'y  a pas d'outils d'evaluation de performances
  ciblant  specifiquement  Linux,  sauf   peut-etre   les   Byte   Linux
  Benchmarks. Ceux-ci sont une version legerement modifiee des Byte Unix
  Benchmarks qui datent de 1991  (modifications  Linux  par  Jon  Tombs,
  auteurs originels : Ben Smith, Rick Grehan et Tom Yager).

  Il existe un site Web central pour les Byte Linux Benchmarks.

  Une  version  amelioree  et mise a jour des Byte Unix Benchmarks a ete
  synthetisee par David C. Niemi. Elle  s'appelle  UnixBench  4.01  pour
  eviter  une confusion possible avec des versions anterieures. Voici ce
  que David a ecrit au sujet de ses modifications :

       "Les BYTE Unix benchmarks originels et  legerement  modifies
       sont nases a bien des egards ce qui fait d'eux un indicateur
       inhabituellement non-fiable de la performance d'un  systeme.
       J'ai  deliberement  fait en sorte que mes indices de perfor-
       mance soient tres differents pour eviter la  confusion  avec
       les vieux benchmarks."

  David  a  mis  en  place une liste majordomo de diffusion par courrier
  electronique  pour  les  discussions  relatives  a   l'evaluation   de
  performances   sous   Linux   et   sous  les  systemes  d'exploitation
  concurrents.  Vous pouvez vous joindre a ces discussions  en  envoyant
  un  e-mail  dont  le  corps  contiendra  "subscribe bench" a l'adresse
  majordomo@wauug.erols.com   <mailto:majordomo@wauug.erols.com>.    Les
  groupe  des utilisateurs de la region de Washington est aussi en train
  de mettre en place un site Web concernant les benchmarks sous Linux.

  Recemment,      Uwe      F.      Mayer,      mayer@math.vanderbilt.edu
  <mailto:mayer@math.vanderbilt.edu> a egalement porte la suite Bytemark
  de BYTE sous Linux. Il s'agit d'une suite  moderne  et  compilee  tres
  habilement  par  Rick  Grehan  du  magazine  BYTE.  Bytemark teste les
  performances de la CPU, de la  FPU  et  du  sous-systeme  memoire  des
  micro-ordinateurs  modernes  (ces benchmarks sont strictement orientes
  vers la performance du processeur, les E/S ou la  performance  globale
  du systeme ne sont pas pris en compte).
  Uwe  a aussi mis en place un site Web, site ou l'on peut acceder a une
  base de donnees contenant les resultats de sa version  des  benchmarks
  BYTEmark pour Linux.

  Si  vous  etes  a  la recherche de benchmarks synthetiques pour Linux,
  vous remarquerez assez vite que sunsite.unc.edu  ne  propose  que  peu
  d'outils  d'evaluation  de performances. Pour mesurer les performances
  relatives de serveurs X, la suite xbench-0.2 de  Claus  Gittinger  est
  disponible  sur  sunsite.unc.edu,  ftp.x.org  et d'autres sites (ndt :
  notamment ftp.lip6.fr qui est l'un des mirroirs de sunsite). Dans  son
  immense sagesse, Xfree86.org refuse de promouvoir ou de recommender le
  moindre benchmark.

  XFree86-benchmarks Survey est un  site  Web  comprenant  une  base  de
  donnees de resultats relatifs a x-bench.

  En  ce  qui concerne les E/S purement disque, l'utilitaire hdparm (qui
  fait partie de la plupart des distributions, mais est aussi disponible
  sur sunsite.unc.edu) permet de mesurer les taux de transfert grace aux
  options -t et -T.

  Il existe plein d'autres outils disponibles  librement  (sous  license
  GPL)  sur  Internet  pour  tester  divers aspects de la performance de
  votre machine Linux.

  22..33..  LLiieennss eett rreeffeerreenncceess

  La FAQ du newsgroup comp.benchmarks par Dave  Sill  est  la  reference
  standard  en  matiere  d'evaluation  de  performances.  Elle n'est pas
  particulierement orientee Linux, mais elle n'en reste  pas  moins  une
  lecture  recommendee  pour  tous  ceux qui font preuve d'un minimum de
  serieux envers le sujet.  Elle est disponible sur nombre de sites  FTP
  et  de  sites  Web  et recense 5566 bbeenncchhmmaarrkkss ddiiffffeerreennttss avec des liens
  vers des sites FTP permettant de les telecharger. Cependant,  certains
  des benchmarks recenses sont des produits commerciaux.

  Je  n'entrerai  pas  dans  la  description  detaillee  des  benchmarks
  mentionnes dans la FAQ de comp.benchmarks, mais il y a  au  moins  une
  suite  de  bas-niveau  au  sujet  de laquelle j'aimerai faire quelques
  commentaires : la suite lmbench de Larry McVoy. Je cite David C. Niemi
  :

        _"_L_i_n_u_s  _e_t _D_a_v_i_d _M_i_l_l_e_r _s_'_e_n _s_e_r_v_e_n_t _b_e_a_u_c_o_u_p _p_a_r_c_e _q_u_'_e_l_l_e
       _p_e_r_m_e_t _d_e_s _m_e_s_u_r_e_s _d_e _b_a_s_-_n_i_v_e_a_u _u_t_i_l_e_s _e_t _p_e_u_t _a_u_s_s_i  _q_u_a_n_-
       _t_i_f_i_e_r  _l_a  _b_a_n_d_e _p_a_s_s_a_n_t_e _e_t _l_a _l_a_t_e_n_c_e _d_'_u_n _r_e_s_e_a_u _s_i _v_o_u_s
       _a_v_e_z  _d_e_u_x  _m_a_c_h_i_n_e_s  _a  _v_o_t_r_e  _d_i_s_p_o_s_i_t_i_o_n  _p_o_u_r  _l_e  _f_a_i_r_e
       _t_o_u_r_n_e_r_.  _M_a_i_s _l_m_b_e_n_c_h _n_'_e_s_s_a_i_e _p_a_s _d_e _p_r_o_d_u_i_r_e _u_n _i_n_d_i_c_e _d_e
       _p_e_r_f_o_r_m_a_n_c_e _g_l_o_b_a_l_._._._"

  Un site  FTP  assez  complet  en  matiere  de  benchmarks  disponibles
  lliibbrreemmeenntt  a  ete  mis  en place par Alfred Aburto. La suite Whetstone
  utilisee dans le LBT est disponible sur ce site.

  Une FFAAQQ  mmuullttii--ffiicchhiieerr  ppaarr  EEuuggeennee  MMiiyyaa  est  egalement  postee  sur
  comp.benchmarks; c'est une excellente reference.

  33..  LLee LLiinnuuxx BBeenncchhmmaarrkkiinngg TToooollkkiitt ((LLBBTT))

  Je  propose ici un ensemble d'outils pour l'evaluation de performances
  sous Linux. C'est la version  preliminaire  d'un  vaste  environnement
  d'evaluation  de  performances  pour  Linux,  il  est  destine  a etre
  ameliore et a voir ses fonctionnalites etendues.  Prenez  le  pour  ce
  qu'il  vaut,  c'est-a-dire  une  proposition. Si vous pensez que cette
  suite de test n'est pas valable, prenez la liberte de m'envoyer (ndt :
  a l'auteur et non au traducteur, merci :-) vos critiques par e-mail et
  soyez surs que je serai heureux d'integrer les  changements  que  vous
  aurez  suggere  dans  la  mesure  du  possible.  Avant  d'entamer  une
  polemique, lisez ce HOWTO et les documents cites en  reference  :  les
  critiques  informes  sont  les bienvenus, les critiques steriles ne le
  sont pas.

  33..11..  MMoottiivvaattiioonnss

  Elles sont dictees par le bon sens, tout simplement :

  1. Cette suite ne doit pas necessiter  plus  d'une  journee  de  duree
     d'execution.   En   matiere  de  benchmarks  comparatifs  (diverses
     executions), personne ne veut passer des jours a essayer de trouver
     la  configuration  materielle le plus rapide pour un systeme donne.
     Idealement, l'ensemble de la suite devrait pouvoir  tourner  en  15
     minutes sur une machine moyenne.

  2. Tout le code source doit etre disponible librement sur le Net, pour
     des raisons evidentes.

  3. Les benchmarks devraient fournir des chiffres simples et  refletant
     la performance mesuree.

  4. Il  devait  y  avoir  un  melange  de benchmarks synthetiques et de
     benchmarks applicatifs.

  5. Chacun des benchmarks ssyynntthheettiiqquueess devrait pousser un  sous-systeme
     particulier a ses limites.

  6. Les  resultats  des  benchmarks  ssyynntthheettiiqquueess ne devraient ppaass etre
     combines par le biais d'une moyenne afin d'en extraire  un  facteur
     de  merite  global  (cela va a l'encontre du principe fondateur des
     benchmarks  synthetiques  et  conduit  a  une  perte  d'information
     considerable).

  7. Les  benchmarks applicatifs devraient etre representatifs de taches
     couramment executees sur des systemes Linux.

  33..22..  SSeelleeccttiioonn ddeess bbeenncchhmmaarrkkss

  J'ai selectionne 5 suites des benchmarks differentes en evitant autant
  que possible les recouvrements dans les tests :

  1. Compilation du noyau 2.0.0 (configuration par defaut) avec gcc.

  2. Whetstone  version  10/03/97  (la  version  la  plus recente de Roy
     Longbottom).

  3. xbench-0.2 (avec les parametres d'execution rapide).

  4. Les benchmarks UnixBench version 4.01 (resultats partiels).

  5. Les benchmarks de la suite BYTEmark du magazine BYTE beta release 2
     (resultats partiels).

  Pour  les  tests 4 et 5, "(resultats partiels)" signifie qu'une partie
  seulement des resultats produits est prise en compte.

  33..33..  DDuurreeee ddeess tteessttss

  1. Compilation du noyau 2.0.0 : 5 - 30 minutes, selon  la  performance
     rreeeellllee de votre machine.

  2. Whetstone : 100 secondes.

  3. Xbench-0.2 : < 1 heure.

  4. Les benchmarks d'UnixBench version 4.01 : environs 15 minutes.

  5. Les  benchmarks de la suite BYTEmark du magazine BYTE : environs 10
     minutes.

  33..44..  CCoommmmeennttaaiirreess

  33..44..11..  CCoommppiillaattiioonn dduu nnooyyaauu 22..00..00

  +o  QQuuooii :: c'est le seul benchmark applicatif de la LBT.

  +o  Le code est largement disponible (cad que  j'ai  finalement  trouve
     une utilisation pour mes vieux CD-ROMs Linux).

  +o  La  plupart  des  linuxiens  recompilent  leur noyau assez souvent,
     c'est donc une mesure significative de la performance globale.

  +o  Le noyau est gros et gcc utilise une bonne  partie  de  la  memoire
     (ndt : surtout a l'edition de liens) : ceci contribue a attenuer le
     biais induit par le cache L2 lorsque l'on se contente de passer  de
     petits tests.

  +o  Les E/S vers le disque sont frequentes.

  +o  Procedure  de  test  :  trouvez  une antique arborescence source de
     2.0.0, compilez la  avec  les  options  par  defaut  (make  config,
     appuyez  sur Enter autant de fois que necessaire). Le temps affiche
     doit correspondre a la duree passee sur la  compilation  cad  apres
     que  vous ayez tape make zImage (sans prendre en compte le make dep
     clean). Notez que l'architecture cible par defaut est i386, donc si
     vous  compilez  sur  une  autre  architecture,  gcc devrait etre en
     mesure de cross-compiler en utilisant i386 en tant  qu'architecture
     cible.

  +o  RReessuullttaattss  ::  la  duree de compilation en minutes et secondes (s'il
     vous plait, ne rapportez pas les fractions de secondes).

  33..44..22..  LLaa ssuuiittee WWhheettssttoonnee

  +o  QQuuooii :: mesure la performance en calcul flottant pur  a  l'interieur
     d'une  courte  (et  dense)  boucle. Le code source (en C) est assez
     lisible et il est tres facile de voir quelles sont  les  operations
     flottantes impliquees.
  +o  C'est le plus court des tests de la LBT :-).

  +o  C'est  un  "Vieux  Classique"  : des chiffres sont disponibles pour
     comparaison, ses defauts et ses faiblesses sont bien connues.

  +o  Procedure de test : le code source  le  plus  recent  devrait  etre
     telecharge  depuis  le site d'Aburto. Compilez le et executez le en
     mode double precision. Specifiez  gcc  et  -O2  en  tant  que  pre-
     processeur  et  option  du  compilateur  respectivement. Definissez
     aussi la variable du pre-processur POSIX a 1 pour preciser le  type
     de machine.

  +o  RReessuullttaattss  :: un indice de performance en calcul flottant exprime en
     MWIPS.

  33..44..33..  XXbbeenncchh--00..22

  +o  QQuuooii :: mesure la performance de serveurs X.

  +o  La mesure en xStones fournie par xbench est une moyenne ponderee de
     quelques  tests rapportes aux performances obtenues sur une vieille
     station Sun  ne  disposant  que  d'un  display  d'un  seul  bit  de
     profondeur  (ndt  :  en  clair,  c'est  du  monochrome pur et dur).
     Mouais...  on  peut  legitimement  se  demander   si   xbench   est
     veritablement  adequat  en  tant  que  test  pour  des  serveurs  X
     modernes. Neanmoins, c'est le meilleur outil que j'ai trouve.

  +o  Procedure de test : compilez avec -O2. On specifiera aussi quelques
     options  pour  une  execution  courte  :  ./xbench  -timegoal  3  >
     results/name_of_your_linux_box.out.  Pour generer l'indice xStones,
     il nous faudra encore lancer un script awk; la facon la plus simple
     de le faire etant de taper make summary.ms. Jetez un  coup  d'oeuil
     au  fichier  summary.ms : l'indice xStone de votre systeme est dans
     la derniere colonne de la ligne contenant le nom de  votre  machine
     -- nom que vous aurez specifie pendant le test.

  +o  RReessuullttaattss :: un indice de performances exprime en xStones.

  +o  Note : ce test, en l'etat, est depasse. Il devrait etre re-ecrit.

  33..44..44..  UUnniixxBBeenncchh vveerrssiioonn 44..0011

  +o  QQuuooii : mesure la performance globale d'un systeme UNIX. Ce test met
     en oeuvre evidence la performance des E/S fichier et de la  gestion
     du multi-taches par le noyau.

  +o  J'ai  supprime tous les resultats de tests arithmetiques et je n'ai
     conserve que les tests orientes systeme.

  +o  Procedure de test : make avec -O2. Execution avec ./Run -1 (tournez
     chacun  des  tests  une fois). Vous trouverez les resultats dans le
     fichier ./results/report.   Calculez  la  moyenne  geometrique  des
     indices  de  EXECL  THROUGHPUT,  FILECOPY 1, 2, 3, PIPE THROUGHPUT,
     PIPE-BASED CONTEXT SWITCHING, PROCESS CREATION,  SHELL  SCRIPTS  et
     SYSTEM CALL OVERHEAD.

  +o  RReessuullttaattss :: un indice de performance du systeme.

  (ndt  :  la  moyenne  geometrique se definit comme la racine n-ieme du
  produit des n termes consideres)
  33..44..55..  LLeess bbeenncchhmmaarrkkss BByytteemmaarrkk dduu mmaaggaazziinnee BBYYTTEE

  +o  Quoi : fournit une bonne mesure de la  performance  CPU.  Voici  un
     extrait  de  la  documentation  : _"_C_e_s _b_e_n_c_h_m_a_r_k_s _o_n_t _e_t_e_s _c_o_n_c_u _d_e
     _f_a_c_o_n _a _m_e_t_t_r_e _e_n _e_v_i_d_e_n_c_e _l_a _l_i_m_i_t_e _s_u_p_e_r_i_e_u_r_e _d_e _l_a  _C_P_U_,  _d_e  _l_a
     _F_P_U  _e_t  _d_e  _l_'_a_r_c_h_i_t_e_c_t_u_r_e  _m_e_m_o_i_r_e  _d_'_u_n  _s_y_s_t_e_m_e_. _I_l_s _n_e _p_e_u_v_e_n_t
     _m_e_s_u_r_e_r _l_a _p_e_r_f_o_r_m_a_n_c_e _d_u _s_o_u_s_-_s_y_s_t_e_m_e _g_r_a_p_h_i_q_u_e_, _d_e_s _a_c_c_e_s  _d_i_s_q_u_e
     _o_u  _d_u  _d_e_b_i_t _r_e_s_e_a_u _(_c_e _s_o_n_t _l_a _l_e _d_o_m_a_i_n_e _d_'_u_n _e_n_s_e_m_b_l_e _d_i_f_f_e_r_e_n_t
     _d_e  _b_e_n_c_h_m_a_r_k_s_)_.  _C_'_e_s_t  _p_o_u_r_q_u_o_i_,  _i_l  _e_s_t  _s_o_u_h_a_i_t_a_b_l_e  _q_u_e  _v_o_u_s
     _n_'_u_t_i_l_i_s_i_e_z  _l_e_s  _r_e_s_u_l_t_a_t_s  _d_e  _c_e_s  _t_e_s_t_s  _q_u_'_e_n  _t_a_n_t _q_u_'_e_l_e_m_e_n_t
     _d_'_a_p_p_r_e_c_i_a_t_i_o_n _p_a_r_t_i_e_l_l_e_, _e_t _n_o_n _p_a_s _t_o_t_a_l_e_, _l_o_r_s  _d_e  _l_'_e_v_a_l_u_a_t_i_o_n
     _d_e _l_a _p_e_r_f_o_r_m_a_n_c_e _d_'_u_n _s_y_s_t_e_m_e_._"

  +o  J'ai  supprime  tous  les  resultats  de  test FPU puisque la suite
     Whetstone est tout aussi  representative  des  performances  a  cet
     egard.

  +o  J'ai  decompose  les  tests entiers en deux groupes : ceux qui sont
     plus representatifs de la performance cache  memoire/CPU,  et  ceux
     qui utilisent l'arithmetique entiere de la CPU.

  +o  Procedure  de  test : make avec -O2. Executez le test avec ./nbench
     >myresults.dat ou quelque chose d'approchant.  Puis,  a  partir  de
     myresults.dat,  calculez  la  moyenne  geometrique  des indices des
     tests STRING  SORT,  ASSIGNMENT  et  BITFIELD.  Ceci  vous  donnera
     l'iinnddiiccee  mmeemmooiirree. Calculez  la moyenne geometrique des indices des
     tests NUMERIC SORT, IDEA, HUFFMAN et FP EMULATION:  c'est  l'iinnddiiccee
     eennttiieerr.

  +o  RReessuullttaattss  ::  un  indice memoire et un indice entier calcules comme
     explique ci-dessus.

  33..55..  AAmmeelliioorraattiioonnss ppoossssiibblleess

  La  suite  de  benchmarks  ideale  tournerait  en  quelques   minutes,
  comprendrait  des  benchmarks synthetiques testant chaque sous-systeme
  separement et des benchmarks  applicatifs  fournissant  des  resultats
  pour  differentes  applications. Elle produirait aussi automatiquement
  un rapport complet et eventuellement l'enverrait par e-mail a une base
  de donnees centrale sur le Web.

  La  portabilite  n'est  pas  vraiment  notre  souci premier dans cette
  affaire.  Pourtant, une telle  suite  devrait  tourner  au  moins  sur
  toutes  les versions (> 2.0.0) du noyau Linux, et ce dans toutes leurs
  declinaisons possibles (i386, Alpha, Sparc...).

  Si quelqu'un a la moindre idee concernant l'evaluation de performances
  reseau  au  moyen d'un test a la fois simple, facile d'emploi, fiable,
  et dont la mise en oeuvre prendrait moins de 30 minutes (configuration
  et execution), s'il vous plait contactez-moi.

  33..66..  FFoorrmmuullaaiirree ddee rraappppoorrtt LLBBTT

  Au-dela  des tests, la procedure d'evaluation de performances n'aurait
  pas  ete  complete  sans  un  formulaire  decrivant  la  configuration
  materielle  utilisee  lors  de  leur execution. Le voici donc : (il se
  conforme aux directives prescrites dans la FAQ de comp.benchmarks) :

  (ndt : le formulaire en question n'a deliberement pas ete traduit,  de
  facon a ce que l'auteur de ce HOWTO puisse automatiser leur traitement
  en vue de maintenir une base de donnees de resultats. Voir la  section
  4 pour un exemple de formulaire correctement rempli).

  ______________________________________________________________________
  LINUX BENCHMARKING TOOLKIT REPORT FORM
  ______________________________________________________________________

  ______________________________________________________________________
  CPU
  ==
  Vendor:
  Model:
  Core clock:
  Motherboard vendor:
  Mbd. model:
  Mbd. chipset:
  Bus type:
  Bus clock:
  Cache total:
  Cache type/speed:
  SMP (number of processors):
  ______________________________________________________________________

  ______________________________________________________________________
  RAM
  ====
  Total:
  Type:
  Speed:
  ______________________________________________________________________

  ______________________________________________________________________
  Disk
  ====
  Vendor:
  Model:
  Size:
  Interface:
  Driver/Settings:
  ______________________________________________________________________

  ______________________________________________________________________
  Video board
  ===========
  Vendor:
  Model:
  Bus:
  Video RAM type:
  Video RAM total:
  X server vendor:
  X server version:
  X server chipset choice:
  Resolution/vert. refresh rate:
  Color depth:
  ______________________________________________________________________

  ______________________________________________________________________
  Kernel
  =====
  Version:
  Swap size:
  ______________________________________________________________________

  ______________________________________________________________________
  gcc
  ===
  Version:
  Options:
  libc version:
  ______________________________________________________________________

  ______________________________________________________________________
  Test notes
  ==========
  ______________________________________________________________________

  ______________________________________________________________________
  RESULTS
  ========
  Linux kernel 2.0.0 Compilation Time: (minutes and seconds)
  Whetstones: results are in MWIPS.
  Xbench: results are in xstones.
  Unixbench Benchmarks 4.01 system INDEX:
  BYTEmark integer INDEX:
  BYTEmark memory INDEX:
  ______________________________________________________________________

  ______________________________________________________________________
  Comments*
  =========
  * Ce champ n'est present dans ce formulaire que pour de possibles
  interpretations des resultats, et tant que tel, il est optionnel.
  Il pourrait cependant constituer la partie la plus importante de votre
  compte-rendu, tout particulierement si vous faites de l'evaluation
  de performances comparative.
  ______________________________________________________________________

  33..77..  TTeesstt ddee ppeerrffoorrmmaanncceess rreesseeaauu

  Le test des performances reseau est un veritable defi en soi puisqu'il
  implique au moins deux machines: un serveur et  une  machine  cliente.
  Pour  cette  raison ce genre de test necessite deux fois plus de temps
  pour etre mis en place, il y a plus de variables a  controler,  etc...
  Sur  un  reseau  Ethernet,  il me semble votre meilleure option est le
  paquetage ttcp. (a developper)

  33..88..  LLeess tteessttss SSMMPP

  Les tests SMP sont un autre defi, et tout  test  concu  specifiquement
  pour  un environnement SMP aura des difficultes a s'averer valide dans
  des conditions d'utilisation reelles parce  que  les  algorithmes  qui
  tirent  parti  du  SMP sont difficiles a developper. Il semble que les
  versions du noyau Linux les plus  recentes  (>  2.1.30  ou  pas  loin)
  feront  du scheduling (ndt : ordonnancement de thread ou de processus)
  a grain fin ; je n'ai pas plus d'information que ca pour le moment.

  Selon David Niemi, _"_._._. _s_h_e_l_l_8 de la suite Unixbench 4.01 _f_a_i_t _d_u  _b_o_n
  _t_r_a_v_a_i_l  _e_n  _m_a_t_i_e_r_e  _d_e _c_o_m_p_a_r_a_i_s_o_n _d_e _m_a_t_e_r_i_e_l_/_S_E _s_i_m_i_l_a_i_r_e_s _e_n _m_o_d_e
  _S_M_P _e_t _e_n _m_o_d_e _U_P_._"

  (ndt : SMP = Symetric Multi-Processing, UP = Uni-Processor)

  44..  UUnnee eexxeeccuuttiioonn ttyyppee eett lleess rreessuullttaattss

  Le LBT a ete lance sur  ma  machine  perso.,  une  machine  de  classe
  Pentium  tournant  Linux  que j'ai assemblee moi-meme et que j'utilise
  pour ecrire ce HOWTO. Voici le compte-rendu LBT pour ce systeme :

  LINUX BENCHMARKING TOOLKIT REPORT FORM

  CPU
  ==

  Vendor: Cyrix/IBM

  Model: 6x86L P166+

  Core clock: 133 MHz

  Motherboard vendor: Elite Computer Systems (ECS)

  Mbd. model: P5VX-Be

  Mbd. chipset: Intel VX

  Bus type: PCI

  Bus clock: 33 MHz

  Cache total: 256 KB

  Cache type/speed: Pipeline burst 6 ns

  SMP (number of processors): 1

  RAM
  ====

  Total: 32 MB

  Type: EDO SIMMs

  Speed: 60 ns

  Disk
  ====

  Vendor: IBM

  Model: IBM-DAQA-33240

  Size: 3.2 GB

  Interface: EIDE

  Driver/Settings: Bus Master DMA mode 2

  Video board
  ===========

  Vendor: Generic S3

  Model: Trio64-V2

  Bus: PCI

  Video RAM type: EDO DRAM

  Video RAM total: 2 MB

  X server vendor: XFree86

  X server version: 3.3

  X server chipset choice: S3 accelerated

  Resolution/vert. refresh rate: 1152x864 @ 70 Hz

  Color depth: 16 bits

  Kernel
  =====

  Version: 2.0.29

  Swap size: 64 MB

  gcc
  ===

  Version: 2.7.2.1

  Options: -O2

  libc version: 5.4.23

  Test notes
  ==========

  Une charge tres faible. Les tests ci-dessus ont ete executes
  avec quelques unes des options specifiques du Cyrix/IBM 6x86 activees
  grace au programme setx86. Il s'agit de : fast ADS, fast IORT, Enable DTE,
  fast LOOP, fast Lin. VidMem.

  RESULTS
  ========

  Linux kernel 2.0.0 Compilation Time: 7m12s

  Whetstones: 38.169 MWIPS.

  Xbench: 97243 xStones.

  BYTE Unix Benchmarks 4.01 system INDEX: 58.43

  BYTEmark integer INDEX: 1.50

  BYTEmark memory INDEX: 2.50

  Comments
  =========

  Il s'agit la d'une configuration tres stable et dotee de performances
  homogenes, ideale pour une utilisation individuelle et/ou developper
  sous Linux. Je rendrai compte des resultats obtenus avec un 6x86MX des
  que j'aurai reussi a mettre la main sur l'un d'entre eux !

  55..  PPiieeggeess eett mmiisseess eenn ggaarrddee eenn mmaattiieerree dd''eevvaalluuaattiioonn ddee ppeerrffoorrmmaanncceess

  Apres  avoir compile ce HOWTO, j'ai commence a comprendre pourquoi les
  mots de "piege" et de "mise en  garde"  sont  si  souvent  associes  a
  l'evaluation de performances.

  55..11..  CCoommppaarreerr ddeess ppoommmmeess eett ddeess oorraannggeess

  Ou  devrais-je  dire  des  Apples  et  des  PCs  ?  (ndt : pour gouter
  pleinement toute la finesse de ce jeu de  mots,  il  faut  quand  meme
  savoir  que  pomme se dit apple en anglais :-) C'est tellement evident
  et c'est une controverse tellement eculee que je ne rentrerai pas dans
  les  details.   Je  doute  que  le temps necessaire pour booter un Mac
  compare a celui d'un Pentium moyen soit une veritable mesure  de  quoi
  que  ce  soit.  De facon similaire on pourrait parler du boot de Linux
  vs. Windows NT, etc...  Essayez autant que possible  de  comparer  des
  machines identiques a une seule difference pres.

  55..22..  IInnffoorrmmaattiioonn iinnccoommpplleettee

  Un  seul  exemple  suffira  a  l'illustration  de  cette  erreur  tres
  courante.  On lit souvent  dans  comp.os.linux.hardware  l'affirmation
  suivante  :  "Je  viens  tout  juste  d'enficher le processeur XYZ qui
  tourne a nnn MHz et la compilation du noyau prend maintenant i minutes
  (ajustez  XYZ,  nnn  et  i  selon  vos  besoins). C'est enervant parce
  qu'aucune autre information n'est fournie: on ne connait meme  pas  la
  quantite de RAM, la taille du swap, les autres taches qui tournaient a
  ce moment la, la version du noyau, les modules selectionnes,  le  type
  de disque dur, la version de gcc, etc...

  Je  vous  recommende  d'utiliser  le  formulaire  de compte-rendu LBT,
  lequel fournit au moins un cadre informationnel standard.

  55..33..  MMaatteerriieell//llooggiicciieell pprroopprriieettaaiirree

  Un fabriquant de micro-processeurs bien connu  a  publie  naguere  des
  resultats   de  benchmarks  produits  avec  une  version  speciale  et
  personnalisee de  gcc.  Considerations  ethiques  mises  a  part,  ces
  resultats sont denues de toute signification, en effet, la totalite de
  la communaute Linux aurait utilise la version standard de gcc. Le meme
  genre  de  consideration  vaut  aussi  pour  le materiel proprietaire.
  L'evaluation de performances est beaucoup plus utile quand elle va  de
  pair  avec  du  materiel  sur  etagere et du logiciel gratuit (au sens
  GNU/GPL).

  55..44..  PPeerrttiinneennccee

  On parle de Linux,  non  ?  On  devrait  donc  faire  abstraction  des
  benchmarks  produits  sous  d'autres systemes d'exploitation (ceci est
  une instance particuliere de la comparaison des pommes et des  oranges
  mentionnee  plus  haut).  Si  l'on se propose d'evaluer la performance
  d'un serveur Web, on pourra aussi se dispenser de citer la performance
  FPU et toute autre information non-pertinente. Dans de tels cas, moins
  c'est plus.  Enfin, vous n'avez pas non plus besoin de parler de l'age
  de  votre  chat,  de  votre  humeur  pendant  que  vous procedez a une
  evaluation de performances, etc...

  66..  FFAAQQ

     QQ11..
        Existe-t-il un indice de performances  specifique  aux  machines
        Linux ?
     AA.. Non,  Dieu  merci  personne n'a encore invente de mesure du type
        Lhinuxstone (tm). Meme  si  c'etait  le  cas,  ca  n'aurait  pas
        beaucoup  de  sens  : les machines Linux sont utilisees pour des
        taches tellement differentes allant des serveurs Web  lourdement
        charges  aux  stations  graphiques pour utilisation individelle.
        Aucun facteur de merite ne peut decrire les  performances  d'une
        machine Linux dans des situations si differentes.

     QQ22..
        Alors,  pourquoi  ne  pas choisir une douzaine de metriques pour
        resumer la performance de diverses machines Linux ?

     AA.. Ca serait une situation ideale. J'aimerai voir  ca  devenir  une
        realite. Y-a-t-il des volontaires pour un pprroojjeett dd''eevvaalluuaattiioonn ddee
        ppeerrffoorrmmaanncceess ssoouuss LLiinnuuxx ? Avec  un  site  Web  et  une  base  de
        donnees de rapports bien concus, complete et en ligne ?

     QQ33..

     AA.. Les  BogoMips  n'ont strictement rien a voir avec la performance
        de votre machine. Voir le BogoMips Mini-HOWTO.

     QQ44..
        Quel est le "meilleur" benchmark pour Linux ?

     AA.. Ca depend completement de quel  aspect  des  performances  d'une
        machine  Linux  on  souhaite  mesurer.  Il  y  a  des benchmarks
        differents pour faire des  mesures  reseau  (taux  de  transfert
        soutenu  sous  Ethernet),  des  mesures  de  serveur de fichiers
        (NFS), de bande  passante,  de  performance  CAO,  de  temps  de
        transaction, de performance SQL, de performances de serveur Web,
        de performance temps-reel, de performance CD-ROM, de performance
        sous  Quake  (!), etc ... Pour autant que je sache, aucune suite
        de benchmarks supportant tous ces tests n'existe pour Linux.

     QQ55..
        Quel est le processeur le plus rapide pour Linux ?

     AA.. Le plus rapide pourquoi faire ? Si on est plutot oriente  calcul
        intensif,  alors  un Alpha a frequence d'horloge elevee (600 MHz
        et ca continue a grimper) devrait etre plus rapide que n'importe
        quoi  d'autre,  du fait que les Alphas ont ete concus dans cette
        optique. D'un autre cote, si  vous  voulez  vous  constituer  un
        serveur  de  news tres rapide, il est probable que le choix d'un
        sous-systeme disque rapide et de beaucoup de RAM vous  menera  a
        de  meilleures ameliorations de performances qu'un changement de
        processeur (a prix constant).

     QQ66..
        Laissez-moi reformuler la derniere question, alors : y-a-t-il un
        processeur qui soit le plus rapide dans les applications d'usage
        general ?

     AA.. C'est une question delicate mais la reponse est  simple  :  NON.
        On  peut toujours concevoir un systeme plus rapide meme pour des
        applications  d'usage  general  independamment  du   processeur.
        D'ordinaire,  en  conservant  tous  les autres parametres a leur
        valeur  nominale,  des   frequences   d'horloge   plus   elevees
        permettent  d'obtenir  de meilleures performances (ndt : surtout
        si on parle de systemes synchrones :-) et aussi plus de maux  de
        tete.  Si  vous  retirez un vieux Pentium a 100 MHz d'une carte-
        mere (laquelle n'est pas souvent) upgradable,  et  que  vous  le
        remplaciez  par  un  Pentium 200 MHz MMX vous devriez sentir une
        difference  de  performances  notable.  Bien  sur,  pourquoi  se
        contenter  de  16  MB de RAM ? Le meme investissement aurait ete
        fait de facon encore plus avisee au  profit  de  quelques  SIMMs
        supplementaires...

     QQ77..
        Donc la frequence d'horloge du processeur a une influence sur la
        performance d'un systeme ?

     AA.. La plupart  des  taches  sauf  les  boucles  de  NOP  (qui  sont
        d'ailleurs  supprimees  a  la  compilation  par les compilateurs
        modernes) une augmentation de la frequence  d'horloge  permettra
        d'obtenir  une  augmentation  lineaire  de  la  performance. Des
        applications  gourmandes  en  ressources  CPU  et  tres  petites
        (pouvant  donc  tenir dans le cache L1 : 8 ou 16KB) verront leur
        performances   augmenter   dans   la   meme    proportion    que
        l'augmentation de la frequence d'horloge.  Cependant les "vrais"
        programmes comportent des boucles qui ne tiennent  pas  dans  le
        cache  primaire,  doivent partager le cache secondaire (externe)
        avec d'autres processus et dependent de composants externes (ndt
        :  pour les E/S) beneficieront d'un gain de performance beaucoup
        moins important.  Tout ceci parce que le cache L1  fonctionne  a
        la  meme  frequence  d'horloge  que  le processeur, alors que la
        plupart des caches L2 et  des  autres  sous-systemes  (DRAM  par
        exemple) tournent en asynchrone a des frequences plus basses.

     QQ88..
        D'accord, dans ce cas, une derniere question sur le sujet : quel
        est   le   processeur    presentant    le    meilleur    rapport
        prix/performance pour une utilisation d'usage general sous Linux
        ?

     AA.. Definir une "utilisation d'usage general sous Linux"  n'est  pas
        chose  facile  ! Etant donnee une application quelconque, il y a
        toujours moyen de determiner quel processeur du  moment  detient
        le  meilleur  rapport  prix/performance pour ladite application.
        Mais  les  choses  changent  si  rapidement  a  mesure  que  les
        fabriquants  diffusent  de  nouveaux  processeurs,  que dire "le
        processeur XYZ a n MHz est le choix du moment" serait  forcement
        reducteur.   Cependant,   le   prix   du  processeur  n'est  pas
        significatif dans le cout d'un systeme complet que l'on assemble
        soi-meme.   Donc,  la  question  devrait  plutot  etre  "comment
        maximize-t-on le rapport performance/cout d'une  machine  donnee
        ?"  Et  la  reponse a cette question depend en grande partie des
        besoins en performance minimale garantie et/ou du  cout  maximal
        de la configuration que l'on considere. Il arrive parfois que le
        materiel sur etagere ne permette pas d'atteindre les besoins  en
        performance  minimale  garantie que l'on souhaite obtenir et que
        des systemes RISC couteux soient la  seule  alternative  viable.
        Pour    une   utilisation   personnelle,   je   recommende   une
        configuration equilibree et homogene  du  point  de  vue  de  la
        performance globale (et maintenant debrouillez vous pour deviner
        ce que j'entends par equilibre et homogene :-);  le  choix  d'un
        processeur  est une decision importante, mais pas plus que celle
        du disque dur et de sa capacite, celle de la  quantite  de  RAM,
        celle de la carte graphique, etc...

     QQ99..
        Qu'est-ce qu'une amelioration significative des performances ?

     AA.. Je  dirais  que  tout  ce qui est sous 1% n'est pas significatif
        (pourrait etre decrit  comme  marginal).  Nous  autres,  simples
        mortels, avons du mal a percevoir la difference entre 2 systemes
        dont les temps de reponses sont distants de moins de 5%  .  Bien
        sur,  certains  evaluateurs  de  performances  -  plutot  de  la
        tendance  integriste  -  ne  sont  aucunement  humains  et  vous
        raconteront,  en  comparant  2  systemes  dont  les  indices  de
        performances sont de  65.9  et  de  66.5,  que  ce  dernier  est
        indubitablement plus rapide.
     QQ1100..
        Comment   puis-je  obtenir  une  amelioration  significative  de
        performance a moindre cout ?

     AA.. Puisque le code source  complet  de  Linux  est  disponible,  un
        examen attentif et une re-conception algorithmique de procedures
        cles peuvent, dans certains cas, deboucher sur des ameliorations
        jusqu'a  un facteur 10 en terme de performance.  Si l'on est sur
        un projet commercial et qu'on ne souhaite pas plonger  dans  les
        trefonds   du   code   source  du  systeme,  ll''iimmpplliiccaattiioonn  dd''uunn
        ccoonnssuullttaanntt LLiinnuuxx eesstt nneecceessssaaiirree. Cf. le Consultants-HOWTO.

  77..  CCooppyyrriigghhtt,, rreemmeerrcciieemmeennttss eett ddiivveerrss

  77..11..  CCoommmmeenntt ccee ddooccuummeenntt aa--tt--iill eettee pprroodduuiitt

  La premiere etape a consiste en la lecture de la  section  4  "Writing
  and  submitting a HOWTO" de l'index des HOWTOs ecrit par Greg Hankins.

  Je ne savais absolument rien au sujet de SGML ou de LaTeX mais,  apres
  avoir  lu  divers  commentaires  a propos de SGML-Tools, j'etais tente
  d'utiliser un paquetage de generation  de  documentation  automatique.
  Cependant   l'insertion   manuelle  de  directives  de  formattage  me
  rappelait l'epoque ou j'assemblais a la main un  moniteur  512  octets
  pour  un  processeur  8  bits  aujourd'hui disparu. J'ai donc fini par
  recuperer les sources de LyX, les compiler et je m'en suis servi  dans
  son  mode  LinuxDoc.   Une association chaudement recommendee : LLyyXX eett
  SSGGMMLL--TToooollss.

  77..22..  CCooppyyrriigghhtt

  Le Linux Benchmarking HOWTO est place sous le regime du copyright  (C)
  1997  par  Andre  D. Balsa. Les HOWTO Linux peuvent etre reproduits en
  totalite ou en partie et distribues en totalite ou  partiellement  sur
  n'importe  quel  support  physique ou electronique, a condition que ce
  message  de  copyright  soit  conserve  dans  toutes  les  copies.  La
  redistribution   commerciale  est  permise  et  encouragee;  cependant
  l'auteur aimerait etre prevenu de l'existence de telles distributions.

  Toute  traduction  (ndt  :  dont  acte  :-),  tout  travail  derive ou
  peripherique incorporant un HOWTO  Linux  doit  etre  couvert  par  ce
  message de copyright.

  C'est-a-dire  qu'il  ne  vous  est pas possible de produire un travail
  derive  a  partir   d'un   HOWTO   et   d'imposer   des   restrictions
  supplementaires  sur  sa  distribution.  Des  exceptions a cette regle
  pourront etre accordees sous certaines conditions; veuillez  contacter
  le coordinateur des HOWTO Linux a l'adresse specifiee ci-apres.

  Pour  etre  bref, nous souhaitons promouvoir la dissemination de cette
  information  par  autant  de  canaux  que  possible.  Cependant,  nous
  souhaitons  garder  un  droit de copyright sur les HOWTOs et aimerions
  etre averti de tout projet de redistribution les concernant.

  Si vous avez  des  questions,  veuillez  contacter  Greg  Hankins,  le
  coordinateur  des  HOWTOs Linux, a gregh@sunsite.unc.edu par e-mail ou
  au +1 404 853 9989 par telephone.

  (ndt : pour cette version francaise du document  original,  il  semble
  plus  approprie  de contacter Eric Dumas, coordinateur des traductions
  de  HOWTOs  dans  la  langue  de  Moliere  par  e-mail   a   l'adresse
  dumas@freenix.EU.org).

  77..33..  NNoouuvveelllleess vveerrssiioonn ddee ccee ddooccuummeenntt

  De  nouvelles  version  du  Benchmarking-HOWTO  Linux  seront  mises a
  disposition sur sunsite.unc.edu et sur les sites mirroir (ndt : citons
  ftp.lip6.fr  pour  nous autres francophones). Ce document existe aussi
  sous d'autres formats tels que PostScript et dvi, et sont  disponibles
  dans  le  repertoire  other-formats.  Le Benchmarking-HOWTO Linux  est
  egalement disponible pour des clients WWW comme Grail, un butineur Web
  ecrit   en   Python.   Il   sera   aussi   poste   regulierement   sur
  comp.os.linux.answers.

  77..44..  RReettoouurr

  Les  suggestions,   corrections,   et   ajouts   sont   desires.   Les
  contributeurs sont les bienvenus et en seront remercies. Les incendies
  (ndt : est-ce une traduction acceptable de flame ?) sont  a  rediriger
  sur /dev/null.

  Je serai toujours joignable a andrewbalsa@usa.net.

  77..55..  RReemmeerrcciieemmeennttss

  David  Niemi,  l'auteur  de  la  suite Unixbench, s'est avere etre une
  source inepuisable d'informations et de critiques (fondees).

  Je veux aussi remercier Greg Hankins, le coordinateur des HOWTO  Linux
  et  l'un  des  principaux contributeurs au paquetage SGML-tools, Linus
  Torvalds et toute la communaute  Linux.  Ce  HOWTO  est  ma  facon  de
  renvoyer l'ascenseur.

  77..66..  PPaarraavveenntt

  Votre kilometrage peut varier et variera sans doutes. Soyez conscients
  que l'evaluation de performances est un sujet  tres  sensible  et  une
  activite qui consomme enormement de temps et d'energie.

  77..77..  MMaarrqquueess ddeeppoosseeeess

  Pentium  et  Windows  NT  sont  des  marques  deposees  d'Intel  et de
  Microsoft Corporations respectivement.

  BYTE et BYTEmark sont des marques deposees de McGraw-Hill, Inc.

  Cyrix et 6x86 sont des marques deposees de Cyrix Corporation.

  Linux n'est pas une marque deposee, et esperons  qu'elle  ne  le  sera
  jamais.

  Beowulf HOWTO
  Jacek Radajewski and Douglas Eadline (traduction : Emmanuel
  PIERRE, epierre@e-nef.com )
  v1.1.1, 22 Novembre 1998

  Ce document est une introduction  l'architecture Beowulf Supercompu
  teur. Il fournit les informations de base sur la programmation par
  allle, et inclut des liens vers des documents plus spcifiques et des
  pages web.
  ______________________________________________________________________

  Table des matires






















































  1. Prambule

     1.1 Mise en garde
     1.2 Copyright
     1.3 Au sujet de ce HOWTO
     1.4 Au sujet des auteurs
     1.5 Remerciements

  2. Introduction

     2.1 A qui s'adresse ce HOWTO ?
     2.2 Qu'est-ce que Beowulf ?
     2.3 Classification

  3. Aperu de l'Architecture

     3.1 A quoi cela ressemble-t-il ?
     3.2 Comment utiliser les autres noeuds ?
     3.3 En quoi un Beowulf diffre-t-il d'un COW ?

  4. Conception du Systme

     4.1 Brefs rappels sur la programmation parallle
     4.2 Les mthodes de programmation parallle
        4.2.1 Pourquoi plus d'un CPU ?
        4.2.2 La "caisse" en programmation parallle
           4.2.2.1 Systmes d'exploitation Mono-Tche:
           4.2.2.2 Systmes d'exploitation Multi-Tches:
           4.2.2.3 Systmes d'exploitation Multi-Tches avec plusieurs CPU:
           4.2.2.4 Sous-tches (Threads) sur les autres CPU d'un Systme d'exploitation Multi-Tches:
           4.2.2.5 Envoyer des messages sur des Systmes d'exploitation Multi-Tches avec plusieurs CPU:
     4.3 Architectures pour le calcul parallle
        4.3.1 Architectures Matrielles
        4.3.2 Architectures Logicielles et API
           4.3.2.1 Messages
           4.3.2.2 Threads
        4.3.3 Architecture des Applications
     4.4 Convenance
     4.5 Ecrire et porter des logiciels parallles
        4.5.1 Dterminer les parties concurrentes de votre programme
        4.5.2 Estimer le paralllisme efficacement
        4.5.3 Dcrire les parties concurrentes de votre programme
           4.5.3.1 Les mthodes explicites
           4.5.3.2 Mthodes Implicites

  5. Ressources Beowulf

     5.1 Points de dpart
     5.2 Documentation
     5.3 Publications
     5.4 Logiciels
     5.5 Machines Beowulf
     5.6 D'autres Sites Intressants
     5.7 Histoire

  6. Code Source

     6.1 sum.c
     6.2 sigmasqrt.c
     6.3 prun.sh


  ______________________________________________________________________



  11..  PPrraammbbuullee

  11..11..  MMiissee eenn ggaarrddee

  Nous n'accepterons aucune responsabilit pour toute information
  incorrecte prsente dans ce document, ni pour aucun des dommages qui
  pourraient en rsulter.



  11..22..  CCooppyyrriigghhtt

  Copyright  1997 - 1998 Jacek Radajewski et Douglas Eadline.  Le droit
  de distribuer et de modifier ce document est autoris sous la licence
  GNU General Public License.


  11..33..  AAuu ssuujjeett ddee ccee HHOOWWTTOO


  Jacek Radajewski a commenc  travailler sur ce document en novembre
  1997 et a t ensuite rejoint par Douglas Eadline. En quelques mois,
  le HOWTO Beowulf est devenu un document consistant, et en aot 1998,
  il a t dcoup en trois: Beowulf HOWTO, Beowulf Architecture Design
  HOWTO, the Beowulf Installation and Administration HOWTO. La Version
  1.0.0 de ce document a t soumise au Linux Documentation Project le
  11 novembre 1998. Nous esprons que ce ne soit que le dbut de ce qui
  deviendra une documentation complte du Projet de Documentation
  Beowulf (Beowulf Documentation Project).


  11..44..  AAuu ssuujjeett ddeess aauutteeuurrss


    Jacek Radajewski est Administrateur Rseau, et prpare un degr
     honorifique en Informatique  l'Universit du Southern Queensland,
     Australie. Le premier contact de Jacek avec Linux eut lieu en 1995
     et il en tomba amoureux du premier coup. Jacek construisit son
     premier cluster Beowulf en Mai 1997 et a jou avec cette
     technologie depuis, toujours  la recherche de la meilleure manire
     de tout organiser.  Vous pouvez joindre Jacek par courriel 
     jacek@usq.edu.au

    Douglas Eadline, Ph.D. est le President et le Principal
     Scientifique (Principal Scientist)  Paralogic, Inc., Bethlehem,
     PA, USA.  Form en tant que Chimiste Physique/Analytique, il s'est
     investi dans les ordinateurs depuis 1978, anne o il a construit
     sa premire machine pour l'utiliser avec l'instrumentation
     chimique. A ujourd'hui, le Dr. Eadline s'intresse  Linux, aux
     clusters Beowulf, et aux algorithmes parallles.  Le Dr. Eadline
     peut tre joint par courriel  deadline@plogic.com


  11..55..  RReemmeerrcciieemmeennttss

  L'criture du HOWTO Beowulf a t longue, et il est finalement complet
  grce  de nombreuses personnes. Nous voudrions remercier celles qui
  suivent pour leur aide et leurs contributions  ce HOWTO:

    Becky pour son amour, son soutien, et sa comprhension.

    Tom Sterling, Don Becker, et les autres personnes de la NASA qui
     furent  l'origine du projet Beowulf.

    Thanh Tran-Cong et la Faculty of Engineering and Surveying pour
     avoir donn la machine Beowulf _t_o_p_c_a_t pour les tests de Beowulf.
    Mon suprieur Christopher Vance pour de nombreuses bonnes ides.

    Mon ami Russell Waldron pour de grandes ides de programmation, son
     intrt gnral pour le projet, et son soutien.

    Mon ami David Smith pour la relecture de ce document.

    Et de nombreuses autres personnes sur la liste de diffusion Beowulf
     qui nous ont fournis beaucoup de retour et d'ides.

    Toutes les personnes qui sont responsables du systme
     d'exploitation Linux et de tous les autres outils gratuits utiliss
     sur _t_o_p_c_a_t et les diverses machines Beowulf.



  22..  IInnttrroodduuccttiioonn

  Au fur et  mesure que les niveaux de performance et de commodit des
  ordinateurs et des rseaux augmentent, il devient de plus en plus
  facile de construire des systmes informatiques parallles  partir de
  composants facilement disponibles, plutt que de construire des
  processeurs sur de trs coteux Superordinateurs.  En fait, le rapport
  prix/performances d'une machine de type Beowulf est de trois  dix
  fois meilleur que celui des superordinateurs traditionnels.
  L'architecture Beowulf s'chelonne bien, elle est facile  construire
  et vous ne payez que pour le matriel, puisque la pluspart des
  logiciels sont gratuits.


  22..11..  AA qquuii ss''aaddrreessssee ccee HHOOWWTTOO ??

  Ce HOWTO s'adresse aux personnes qui ont dj eu au moins des contacts
  avec le systme d'exploitation Linux. La connaissance de la
  technologie Beowulf ou d'un systme d'exploitation plus complexe et de
  concepts rseaux n'est pas essentielle, mais des aperus de la
  programmation parallle sont bienvenus (aprs tout, vous devez avoir
  de bonnes raisons de lire ce document). Ce HOWTO ne rpondra pas 
  toutes les questions que vous pourriez vous poser au sujet de Beowulf,
  mais, esprons-le, vous donnera des ides et vous guidera dans la
  bonne direction. Le but de ce HOWTO est de fournir des informations de
  base, des liens et des rfrences vers des documents plus approfondis.


  22..22..  QQuu''eesstt--ccee qquuee BBeeoowwuullff ??

  _F_a_m_e_d _w_a_s _t_h_i_s _B_e_o_w_u_l_f_: _f_a_r _f_l_e_w _t_h_e _b_o_a_s_t _o_f _h_i_m_, _s_o_n _o_f _S_c_y_l_d_, _i_n
  _t_h_e _S_c_a_n_d_i_a_n _l_a_n_d_s_.  _S_o _b_e_c_o_m_e_s _i_t _a _y_o_u_t_h _t_o _q_u_i_t _h_i_m _w_e_l_l _w_i_t_h _h_i_s
  _f_a_t_h_e_r_'_s _f_r_i_e_n_d_s_, _b_y _f_e_e _a_n_d _g_i_f_t_, _t_h_a_t _t_o _a_i_d _h_i_m_, _a_g_e_d_, _i_n _a_f_t_e_r
  _d_a_y_s_, _c_o_m_e _w_a_r_r_i_o_r_s _w_i_l_l_i_n_g_, _s_h_o_u_l_d _w_a_r _d_r_a_w _n_i_g_h_, _l_i_e_g_e_m_e_n _l_o_y_a_l_: _b_y
  _l_a_u_d_e_d _d_e_e_d_s _s_h_a_l_l _a_n _e_a_r_l _h_a_v_e _h_o_n_o_r _i_n _e_v_e_r_y _c_l_a_n_.  Beowulf est le
  pome pique le plus ancien en Anglais qui ait t conserv.  C'est
  l'histoire d'un hros d'une grande force et d'un grand courage qui a
  dfait un monstre appel Grendel. Voir l'``Historique'' pour en savoir
  plus sur le hros Beowulf.


  Il y a peut-tre de nombreuses dfinitions de Beowulf, autant que de
  personnes qui construisent ou utilisent des Superordinateurs Beowulf.
  Certains disent qu'ils peuvent appeler leur systme Beowulf seulement
  s'il est construit de la mme faon que la machine d'origine de la
  NASA. D'autres vont  l'extrme inverse et appellent ainsi n'importe
  quel systme de stations qui excutent du code parallle. Ma
  dfinition d'un Beowulf se situe entre ces deux avis, et est fonde
  sur de nombreuses contributions dans la liste de diffusion Beowulf.

  Beowulf est une architecture multi-ordinateurs qui peut tre utilise
  pour la programmation parallle. Ce systme comporte habituellement un
  noeud serveur, et un ou plusieurs noeuds clients connects entre eux 
  travers Ethernet ou tout autre rseau. C'est un systme construit en
  utilisant des composants matriels existants, comme tout PC capable de
  faire tourner Linux, des adaptateurs Ethernet standards, et des
  switches. Il ne contient aucun composant matriel propre et est
  aisment reproductible. Beowulf utilise aussi des lments comme le
  systme d'exploitation Linux, Parallel VirtualMachine (PVM) et Message
  Passing Interface (MPI). Le noeud serveur contrle l'ensemble du
  cluster et sert de serveur de fichiers pour les noeuds clients.  Il
  est aussi la console du cluster et la passerelle (gateway) vers le
  monde extrieur. De grandes machines Beowulf peuvent avoir plus d'un
  noeud serveur, et ventuellement aussi d'autres noeuds ddis  des
  tches particulires, par exemple comme consoles ou stations de
  surveillance.  Dans de nombreux cas, les noeuds clients d'un systme
  Beowulf sont idiots (dumb): plus ils sont idiots, mieux ils sont. Les
  noeuds sont configurs et contrls par le noeud serveur, et ne font
  que ce qu'on leur demande de faire. Dans une configuration client sans
  disque (diskless), les noeuds clients ne connaissent mme pas leur
  adresse IP ou leur nom jusqu' ce que le serveur leur dise qui ils
  sont. Une des principales diffrences entre Beowulf et un Cluster de
  Stations de travail (COW) est le fait que Beowulf se comporte plus
  comme une simple machine plutt que comme plusieurs stations de
  travail. Dans de nombreux cas, les noeuds clients n'ont pas de
  claviers ni de moniteurs, et on n'y accde que par une connection
  distante ou par un terminal srie. Les noeux Beowulf peuvent tre
  envisags comme un CPU + des ensembles de mmoires qui peuvent tre
  branchs dans le cluster, exactement comme un CPU ou un module mmoire
  peut tre branch dans une carte mre.


  Beowulf n'est pas un ensemble de matriels spcialiss, une nouvelle
  topologie rseau ou le dernier hack du kernel. Beowulf est une
  technologie de clustering d'ordinateurs Linux pour former un
  superordinateur parallle, virtuel. Mme s'il y a de nombreux
  paquetages comme des patches du noyau, PVM, les librairies MPI, et des
  outils de configuration qui rendent l'architecture Beowulf plus
  rapide, plus facile  configurer, et plus facilement utilisable, on
  peut construire une machine de classe Beowulf en utilisant une
  distribution Standard de Linux sans ajouter d'autres logiciels.  Si
  vous avez deux Linux en rseau qui partagent au moins le mme systme
  de fichier racine via NFS, et qui se font confiance pour excuter des
  sessions distantes (rsh), alors on peut dire que vous avez un simple
  Beowulf de deux noeuds.



  22..33..  CCllaassssiiffiiccaattiioonn

  Les systmes Beowulf ont t construits  partir de nombreux
  constituants.  Pour des considrations de performances, des composants
  moins communs (i.e.  produits par un seul fabricant) ont t utiliss.
  Afin de recenser les diffrents types de systmes et de rendre les
  discussions au sujet des machines un peu plus faciles, nous proposons
  la mthode simple de classification suivante:

  CLASSE I BEOWULF:

  Cette classe concerne des machines faites d'lments globalement
  disponibles.  Nous devrons utiliser les tests de certification
  "Computer Shopper" pour dfinir les composants d'assemblage.
  ("Computer Shopper" est un mensuel sur les PC et leurs composants.)
  [NdT: US seulement ; pour un quivalent, on peut voquer par exemple
  "PC Direct".] Le test est le suivant:

  Un Beowulf CLASSE I est une machine qui peut tre assemble  partir
  de pices trouves dans au moins quatre journaux de publicit de
  grande diffusion.


  Les avantages des systmes de CLASS I sont:

    le matriel est disponible de noubreuses sources (faible cot,
     maintenance facile)

    ne dpendant pas d'un seul vendeur de matriel

    support des drivers par les commodits Linux

    bas habituellement sur des standards (SCSI, Ethernet, etc.)

  Les dsavantages d'un systme de CLASSE I sont:

    de meilleures performances peuvent ncessiter du matriel de CLASSE
     II

  CLASSE II BEOWULF

  Un Beowulf CLASSE II Beowulf est simplement une machine qui ne passe
  pas le test de certification "Computer Shopper". Ce n'est pas une
  mauvaise chose.  D'autre part, il s'agit plutt d'une classification
  de la machine.

  Les avantages d'un systme de CLASSE II sont:

    les performances peuvent tre assez bonnes !

  Les dsavantages des systmes de CLASSE II sont:

    le support des drivers peut varier

    reposent sur un seul vendeur de matriel

    peuvent tre plus chers que les systmes de CLASSE I.

  Une CLASSE n'est pas ncessairement meilleure qu'une autre. Cela
  dpend surtout de vos besoins et de votre budget. Cette classification
  des systmes sert seulement  rendre les discussions sur les systmes
  Beowulf un peu plus succintes. La "Conception du Systme" peut aider 
  dterminer quelle sorte de systme est le plus appropri  vos
  besoins.





  33..  AAppeerruu ddee ll''AArrcchhiitteeccttuurree



  33..11..  AA qquuooii cceellaa rreesssseemmbbllee--tt--iill ??

  Je pense que la meilleure faon de dcrire l'architecture d'un
  superordinateur Beowulf est d'utiliser un exemple qui est trs proche
  du vrai Beowulf, mais aussi familier  beaucoup d'administrateurs
  systmes.  L'exemple le plus proche d'une machine Beowulf est un Unix
  de laboratoire avec un serveur et un certain nombre de clients. Pour
  tre plus spcifique, j'utiliserai le DEC Alpha au laboratoire
  d'informatique de la Facult des Sciences de l'USQ comme exemple. Le
  serveur est appel _b_e_l_d_i_n et les machines clientes sont _s_c_i_l_a_b_0_1,
  _s_c_i_l_a_b_0_2, _s_c_i_l_a_b_0_3, jusqu' _s_c_i_l_a_b_2_0. Tous les clients ont une copie
  locale du systme d'exploitation Digital Unix 4.0 install, mais ont
  l'espace disque utilisateur (/home) et /usr/local du serveur via NFS
  (Network File System). Chaque client a une entre pour le serveur et
  tous les autres clients dans son fichier /etc/hosts.equiv: ainsi tous
  les clients peuvent excuter une cession distante (rsh) vers tout
  autre. La machine serveur est un serveur NIS pour tout le laboratoire,
  ainsi les informations des comptes sont les mmes sur toutes les
  machines. Une personne peut s'asseoir  la console de _s_c_i_l_a_b_0_2, se
  logue, et a le mme environnement que s'il tait logu sur le serveur,
  ou _s_c_i_l_a_b_1_5. La raison pour laquelle les clients ont la mme
  prsentation est que le systme d'exploitation est install et
  configur de la mme faon sur toutes les machines, les espaces /home
  et /usr/local sont physiquement sur le mme serveur et les clients y
  accdent via NFS. Pour plus d'informations sur NIS et NFS, reportez-
  vous  NIS et NFS.



  33..22..  CCoommmmeenntt uuttiilliisseerr lleess aauuttrreess nnooeeuuddss ??


  Maintenant que nous avons une vision correcte de l'architecture du
  systme, regardons comment nous pouvons utiliser les cycles CPU des
  machines dans le laboratoire. Toute personne peut se loguer sur
  n'importe laquelle des machines, et lancer un programme dans son
  rpertoire de base, mais peut aussi clater la mme tche sur
  diffrentes machines simplement en excutant un shell distant. Par
  exemple, si nous voulons calculer la somme des racines carres de tous
  les entiers inclus strictement entre 1 et 10, nous crivons un simple
  programme appel sigmasqrt (voir ``code source'') qui fait cela
  exactement. Pour calculer la somme des racines carres des nombres de
  1  10, nous excutons :

  [jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 10
  22.468278

  real    0m0.029s
  user    0m0.001s
  sys     0m0.024s


  La commande time nous permet de vrifier le temps mis en excutant
  cette tche. Comme nous pouvons le voir, cet exemple a pris seulement
  une petite fraction de seconde (0.029 sec) pour s'excuter, mais que
  se passe-t-il si je veux ajouter la racine carre des entiers de 1  1
  000 000 000 ?  Essayons ceci, et calculons le temps coul:


  [jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 1000000000
  21081851083600.559000

  real    16m45.937s
  user    16m43.527s
  sys     0m0.108s




  Cette fois, le temps d'excution de ce programme est considrablement
  suprieur.  La question vidente qui se pose est: est-il possible de
  diminuer le temps d'excution de cette tche et comment ? La rponse
  vidente est de dcouper la tche en un ensemble de sous-tches et
  d'excuter ces sous-tches en parallle sur tous les ordinateurs. Nous
  pouvons sparer la grande tche d'addition en 20 parties en calculant
  un intervalle de racines carres et en les additionnant sur un seul
  noeud.  Quand tous les noeuds ont fini les calculs et retournent leurs
  rsultats, les 20 nombres peuvent tre additionns ensemble et fournir
  la solution finale. Avant de lancer ce processus, nous allons crer un
  "named pipe" qui sera utilis par tous les processus pour crire leurs
  rsultats:


  [jacek@beldin sigmasqrt]$ mkfifo output
  [jacek@beldin sigmasqrt]$ ./prun.sh & time cat output | ./sum
  [1] 5085
  21081851083600.941000
  [1]+  Done                    ./prun.sh

  real    0m58.539s
  user    0m0.061s
  sys     0m0.206s



  Cette fois, cela prend 58.5 secondes. C'est le temps qui a t
  ncessaire entre le dmarrage du processus et le moment o les noeuds
  ont fini leurs calculs et crit leurs rsultats dans la pipe. Ce temps
  n'inclut pas l'addition finale des 20 nombres, mais il reprsente une
  petite fraction de seconde et peut tre ignor. Nous pouvons voir
  qu'il y a un avantage significatif  excuter une tche en parallle.
  En fait la tche en parallle s'est excute 17 fois plus vite, ce qui
  est trs raisonnable pour un facteur 20 d'augmentation du nombre de
  CPU. Le but de l'exemple prcdent est d'illustrer la mthode la plus
  simple de parallliser du code concurrent. En pratique, des exemples
  aussi simples sont rares et diffrentes techniques (les API de PVM et
  PMI) sont utilises pour obtenir le paralllisme.



  33..33..  EEnn qquuooii uunn BBeeoowwuullff ddiiffffrree--tt--iill dd''uunn CCOOWW ??

  Le laboraroire d'informatique dcrit plus haut est un exemple parfait
  d'un cluster de stations (COW). Qu'est-ce qui rend donc Beowulf si
  spcial et en quoi diffre-t-il d'un COW ? En ralit il n'y a pas
  beaucoup de diffrence, mais un Beowulf a quelques caractristiques
  uniques. La premire est que dans la plupart des cas, les noeuds
  clients dans un cluster Beowulf n'ont pas de clavier, de souris, de
  carte graphique ni de moniteur. Tous les accs aux noeuds clients sont
  faits par une connection distante du noeud serveur, un noeud ddi 
  une console, ou une console srie. Cela parce qu'il n'y a aucun besoin
  pour un noeud client d'accder  des machines en dehors du cluster, ni
  pour des machines en dehors du cluster d'accder  des noeuds clients
  directement; c'est une pratique habituelle que les noeuds clients
  utilisent des adresses IP prives comme les plages d'adresses
  10.0.0.0/8 ou 192.168.0.0/16 (RFC 1918
  http://www.alternic.net/rfcs/1900/rfc1918.txt.html). D'habitude la
  seule machine qui est aussi connecte au monde externe en utilisant
  une seconde carte rseau est le noeud serveur. La faon la plus
  habituelle d'accder au systme est soit d'utiliser la console du
  serveur directement, soit de faire un telnet ou un login distant
  (rlogin) sur le noeud serveur d'une station personnelle. Une fois sur
  celui-ci, les utilisateurs peuvent diter et compiler leur code, et
  aussi distribuer les tches sur tous les noeuds du cluster. Dans la
  plupart des cas, les COW sont utilises pour des calculs parallles la
  nuit et les week-ends, quand les stations ne sont pas utilises
  pendant les journes de travail, utilisant ainsi les priodes de
  cycles libres des CPU. D'autre part, le Beowulf est une machine ddie
  au calcul parallle, et optimise pour cette tche. Il donne aussi un
  meilleur rapport prix/performance puisqu'il est constitu de
  composants grand public et qu'il tourne principalement  partir de
  logiciels libres. Beowulf donne aussi davantage l'image d'une seule
  machine, ce qui permet aux utilisateurs de voir le cluster Beowulf
  comme une seule station de calcul.



  44..  CCoonncceeppttiioonn dduu SSyyssttmmee

  Avant d'acheter du matriel, il serait de bon aloi de considrer le
  design de votre systme. Il y a deux approches matrielles qui sont
  impliques dans le design d'un systme Beowulf: le type de noeuds ou
  d'ordinateurs que vous allez utiliser, et la mthode que vous allez
  utiliser pour vous connecter aux noeuds d'ordinateurs. Il n'y a qu'une
  seule approche logicielle qui puisse affecter votre choix matriel: la
  librairie de communication ou API. Une discussion plus dtaille sur
  le matriel et les logiciels de communication est fournie plus loin
  dans ce document.

  Alors que le nombre de choix n'est pas grand, il y a des
  considrations de conception qui doivent tre prises pour la
  construction d'un cluster Beowulf. La science (ou art) de la
  "programmation parallle" tant l'objet de nombreuses interprtations,
  une introduction est fournie plus bas. Si vous ne voulez pas lire les
  connaissances de base, vous pouvez survoler cette section, mais nous
  vous conseillons de lire la section ``Convenance'' avant tout choix
  dfninitif de matriel.


  44..11..  BBrreeffss rraappppeellss ssuurr llaa pprrooggrraammmmaattiioonn ppaarraallllllee

  Cette section fournit des informations gnrales sur les concepts de
  la programmation parallle. Ceci n'est PAS exhaustif, ce n'est pas une
  description complte de la programmation parallle ou de sa
  technologie. C'est une brve description des enjeux qui peuvent
  influer fortement sur le concepteur d'un Beowulf, ou sur son
  utilisateur.


  Lorsque vous dciderez de construire votre Beowulf, de nombreux points
  dcrits plus bas deviendront importants dans votre processus de choix.
  A cause de la nature de ses "composants", un Superordinateur Beowulf
  ncessite de prendre de nombreux facteurs en compte, car maintenant
  ils dpendent de nous. En gnral, il n'est pas du tout difficile de
  comprendre les objectifs impliqus dans la programmation parallle.
  D'ailleurs, une fois que ces objectifs sont compris, vos attentes
  seront plus ralistes, et le succs plus probable. Contrairement au
  "monde squentiel", o la vitesse du processeur est considre comme
  le seul facteur important, la vitesse des processeurs dans le "monde
  parallle" n'est que l'un des paramtres qui dtermineront les
  performances et l'efficacit du systme dans son ensemble.



  44..22..  LLeess mmtthhooddeess ddee pprrooggrraammmmaattiioonn ppaarraallllllee

  La programmation parallle peut prendre plusieurs formes. Du point de
  vue de l'utilisateur, il est important de tenir compte des avantages
  et inconvnients de chaque mthodologie. La section suivante tente de
  fournir quelques aperus sur les mthodes de programmation parallle
  et indique o la machine Beowulf fait dfaut dans ce continuum.


  44..22..11..  PPoouurrqquuooii pplluuss dd''uunn CCPPUU ??

  Rpondre  cette question est important. Utiliser 8 CPU pour lancer un
  traitement de texte sonne comme "trop inutile" -- et ce l'est. Et
  qu'en est-il pour un serveur web, une base de donnes, un programme de
  ray-tracing, ou un planificateur de projets ? Peut-tre plus de CPU
  peuvent-ils amliorer les performances. Mais qu'en est-il de
  simulations plus complexes, de la dynamique des fluides, ou d'une
  application de Fouille de Donnes (Data Mining) ? Des CPU
  supplmentaires sont absolument ncessaires dans ces situations.
  D'ailleurs, de multiples CPU sont utiliss pour rsoudre de plus en
  plus de problmes.

  La question suivante est habituellement: "Pourquoi ai-je besoin de
  deux ou quatre CPU ? Je n'ai qu' attendre le mga super rapide
  processeur 986." Il y a de nombreuses raisons:

  1. Avec l'utilisation de systmes d'exploitations multi-tches, il est
     possible de faire plusieurs choses en mme temps. Cela est un
     "paralllisme" naturel qui est exploit par plus d'un CPU de bas
     prix.

  2. La vitesse des processeurs double tous les 18 mois mais qu'en est-
     il de la vitesse de la mmoire ? Malheureusement, celle-ci
     n'augmente pas aussi vite que celle des processeurs. Gardez 
     l'esprit que beaucoup d'applications ont besoin de mmoire autre
     que celle du cache processeur et de l'accs disque. Faire les
     choses en parallle est une faon de contourner ces limitations.

  3. Les prdictions indiquent que la vitesse des processeurs ne
     continuera pas  doubler tous les 18 mois aprs l'an 2005. Il y a
     divers obstacles  surmonter pour maintenir ce rythme.

  4. Suivant l'application, la programmation parallle peut acclrer
     les choses de 2  500 fois (et mme plus dans certains cas). De
     telles performances ne sont pas disponibles sur un seul processeur.
     Mme les Superordinateurs qui utilisaient  un moment un seul
     processeur spcialis trs rapide sont maintenant constitus de
     nombreux CPU plus banals.

  Si vous avez besoin de vitesse --  cause d'un problme li au calcul
  et/ou aux entres/sorties --, il vaut la peine de considrer
  l'approche parallle.  Comme le calcul parallle est implment selon
  de nombreuses voies, rsoudre votre problme en parallle ncessitera
  de prendre quelques dcisions importantes. Ces dcisions peuvent
  affecter dramatiquement la protabilit, la performance, et le cot de
  votre application.

  Avant d'tre par trop technique, regardons un vrai "problme de calcul
  parallle" en utilisant un exemple qui nous est familier: faire la
  queue  une caisse.


  44..22..22..  LLaa ""ccaaiissssee"" eenn pprrooggrraammmmaattiioonn ppaarraallllllee

  Considrons un grand magasin avec 8 caisses regroupes devant le
  magasin. Imaginons que chaque caisse est un CPU et chaque client un
  programme informatique. La taille du programme (quantit de calcul)
  est la taille de la commande de chaque client. Les analogies suivantes
  peuvent tre utilises pour illustrer les concepts de la programmation
  parallle:


  44..22..22..11..  SSyyssttmmeess dd''eexxppllooiittaattiioonn MMoonnoo--TTcchhee::

  Une caisse ouverte (et en service) qui ne peut traiter qu'un client 
  la fois.

  Exemple en Informatique : MS DOS



  44..22..22..22..  SSyyssttmmeess dd''eexxppllooiittaattiioonn MMuullttii--TTcchheess::

  Une caisse ouverte, mais maintenant nous pouvons traiter une partie de
  chaque commande  un instant donn, aller  la personne suivante et
  traiter une partie de sa commande. Tout le monde "semble" avancer dans
  la queue en mme temps, mais s'il n'y a personne dans la queue, vous
  serez servi plus vite.

  Exemple en Informatique : UNIX, NT avec un seul CPU


  44..22..22..33..  SSyyssttmmeess dd''eexxppllooiittaattiioonn MMuullttii--TTcchheess aavveecc pplluussiieeuurrss CCPPUU::

  Maintenant on ouvre plusieurs caisses dans le magasin. Chaque commande
  peut tre traite par une caisse diffrente et la queue peut avancer
  plus vite.  Ceci est appel SMP - Gestion Multiple Symtrique
  (Symmetric Multi-processing).  Mme s'il y a plus de caisses ouvertes,
  vous n'avancerez pas plus vite dans la queue que s'il n'y avait qu'une
  seule caisse.

  Exemple en Informatique : UNIX, NT avec plusieurs CPU



  44..22..22..44..  SSoouuss--ttcchheess ((TThhrreeaaddss)) ssuurr lleess aauuttrreess CCPPUU dd''uunn SSyyssttmmee
  dd''eexxppllooiittaattiioonn MMuullttii--TTcchheess::

  Si vous "sparez" les objets de votre commande, vous pouvez tre
  capable d'avancer plus vite en utilisant plusieurs caisses en mme
  temps. D'abord, nous postulons que vous achetez une grande quantit
  d'objets, parce que le temps que vous investirez pour "sparer" votre
  commande doit tre regagn en utilisant plusieurs caisses. En thorie,
  vous devriez tre capables de vous dplacer dans la queue "n" fois
  plus vite qu'avant, o "n" est le nombre de caisses. Quand les
  caissiers ont besoin de faire des sous-totaux, ils peuvent changer
  rapidement les informations visuellement et en discutant avec toutes
  les autres caisses "locales". Ils peuvent aussi aller chercher
  directement dans les registres des autres caisses pour trouver les
  informations dont ils ont besoin pour travailler plus vite. La limite
  tant le nombre de caisses qu'un magasin peut effectivement installer.

  La loi de Amdals montre que l'acclration de l'application est lie 
  la portion squentielle la plus lente excute par le programme (NdT:
  i.e. majore par la tche la plus lente).

  Exemple en Informatique : UNIX ou NT avec plusieurs CPU sur la mme
  carte-mre avec des programmes multi-threads.



  44..22..22..55..  pplluussiieeuurrss CCPPUU:: EEnnvvooyyeerr ddeess mmeessssaaggeess ssuurr ddeess SSyyssttmmeess
  dd''eexxppllooiittaattiioonn MMuullttii--TTcchheess aavveecc

  De faon  amliorer la performance, la Direction ajoute 8 caisses 
  l'arrire du magasin. Puisque les nouvelles caisses sont loin du
  devant du magasin, les caissiers doivent tlphoner pour envoyer leurs
  sous-totaux vers celui-ci. La distance ajoute un dlai supplmentaire
  (en temps) dans la communication entre caissiers, mais si la
  communication est minimise, cela ne pose pas de problme. Si vous
  avez vraiment une grosse commande, une qui ncessite toutes les
  caisses, alors comme avant votre vitesse peut tre amliore en
  utilisant toutes les caisses en mme temps, le temps sopplmentaire
  devant tre pris en compte. Dans certains cas, le magasin peut n'avoir
  que des caisses (ou des lots de caisses) localiss dans tout le
  magasin : chaque caisse (ou lot) doit communiquer par tlphone.
  Puisque tous les caissiers peuvent discutter par tlphone, leur
  emplacement importe peu.

  Exemple en Informatique : Une ou plusieurs copies d'UNIX ou NT avec
  plusieurs CPU sur la mme, ou diffrentes cartes-mres communiquant
  par messages.

  Les scnarios prcdents, mme s'ils ne sont pas exacts, sont une
  bonne reprsentation des contraintes qui agissent sur les systmes
  parallles.  Contrairement aux machines avec un seul CPU (ou caisse),
  la communication est importante.


  44..33..  AArrcchhiitteeccttuurreess ppoouurr llee ccaallccuull ppaarraallllllee

  Les mthodes et architectures habituelles de la programmation
  parallle sont reprsentes ci-dessous. Mme si cette description
  n'est en aucun cas exhaustive, elle est suffisante pour comprendre les
  impratifs de base dans la conception d'un Beowulf.


  44..33..11..  AArrcchhiitteeccttuurreess MMaattrriieelllleess


  Il y a typiquement deux faons d'assembler un ordinateur parallle:


  1. La mmoire locale des machines qui communiquent par messages
     (Clusters Beowulf)

  2. Les machines  mmoire partage qui communiquent  travers la
     mmoire (machines SMP)

  Un Beowulf typique est une collection de machines mono-processeurs
  connectes utilisant un rseau Ethernet rapide, et qui est ainsi une
  machine  mmoire locale. Une machine  4 voies SMP est une machine 
  mmoire partage et peut tre utilise pour du calcul parallle -- les
  applications parallles communiquant via la mmoire partage. Comme
  pour l'analogie du grand magasin, les machines  mmoire locale (donc
   caisse individuelle) peuvent tre scalairises jusqu' un grand
  nombre de CPU ; en revanche, le nombre de CPU que les machines 
  mmoire partage peuvent avoir (le nombre de caisses que vous pouvez
  placer en un seul endroit) peut se trouver limit  cause de
  l'utilisation (et/ou de la vitesse) de la mmoire.

  Il est toutefois possible de connecter des machines  mmoire partage
  pour crer une machine  mmoire partage "hybride". Ces machines
  hybrides "ressemblent"  une grosse machine SMP pour l'utilisateur et
  sont souvent appeles des machines NUMA (accs mmoire non uniforme)
  parce que la mmoire globale vue par le programmeur et partage par
  tous les CPU peut avoir diffrents temps d'accs. A un certain niveau
  d'ailleurs, une machine NUMA doit "passer des messages" entre les
  groupes de mmoires partages.

  Il est aussi possible de connecter des machines SMP en tant que noeuds
  de mmoire locale. Typiquement, les cartes-mres de CLASSE I ont soit
  2 ou 4 CPU et sont souvent utilises comme moyens pour rduire le cot
  global du systme.  L'arrangeur (scheduler) interne de Linux dtermine
  combien de ces CPU sont partags. L'utilisateur ne peut ( ce jour)
  affecter une tche  un processeur SMP spcifique. Cet utilisateur
  peut quand mme dmarrer deux processus indpendants ou un programme
  multi-threads et s'attendre  voir une amlioration de performance par
  rapport  un systme  simple CPU.




  44..33..22..  AArrcchhiitteeccttuurreess LLooggiicciieelllleess eett AAPPII

  Il y a basiquement deux faons d'"exprimer" la concurrence dans un
  programme:

  1. En envoyant des Messages entre les processeurs

  2. En utilisant les threads du systme d'exploitation (natives)

  D'autres mthodes existent, mais celles-l sont le plus gnralement
  employes. Il est important de se souvenir que l'expression de
  concurrence n'est pas ncessairement contrle par la couche
  matrielle. Les Messages et les Threads peuvent tre implments sur
  des SMPn NUMA-SMP, et clusters -- mme si, comme expliqu ci-dessous,
  l'efficacit et la portabilit sont des facteurs importants.



  44..33..22..11..  MMeessssaaggeess

  Historiquement, la technologie de passage de messages refltait les
  dbuts des ordinateurs parallles  mmoire locale. Les messages
  ncessitent la copie des donnes tandis que les Threads utilisent des
  donnes  la place. Le temps de latence et la vitesse  laquelle les
  messages peuvent tre copis sont les facteurs limitants des modles
  de passage de messages. Un message est assez simple: des donnes et un
  processeur de destination. Des API de passage de messages rpandues
  sont entre autres PVM ou MPI. Le passage de Messages peut tre
  implment avec efficacit en utilisant ensemble des Threads et des
  Messages entre SMP et machines en cluster.  L'avantage d'utiliser les
  messages sur une machine SMP, par rapport aux Threads, est que si vous
  dcidez d'utiliser des clusters dans le futur, il est facile d'ajouter
  des machines ou de scalairiser vos applications.


  44..33..22..22..  TThhrreeaaddss

  Les Threads ont t dvelopps sur les systmes d'exploitation parce
  que la mmoire partage des SMP (moutiprocessorage symmtrique)
  permettait une communication trs rapide et une synchronisation de la
  mmoire partage entre les parties d'un programme. Les Threads
  marchent bien sur les systmes SMP parce que la communication a lieu 
  travers la mmoire partage. Pour cette raison, l'utilisateur doit
  isoler les donnes locales des donnes globales, sinon les programmes
  ne fonctionneront pas correctement.  Cela est en contraste avec les
  messages: une grande quantit de copie peut tre limine avec les
  threads car les donnes sont partages entre les processus (threads).
  Linux implmente les Threads POSIX. Le problme avec les Threads vient
  du fait qu'il est difficile de les tendre au-del d'une machine SMP,
  et, comme les donnes sont partages entre les CPU, la gestion de la
  cohrence du cache peut contribuer  le charger. Etendre les Threads
  au-del des limites des performances des SMP ncessite la technologie
  NUMA qui est chre et n'est pas nativement supporte par Linux.
  Implmenter des Threads par dessus les messages a t fait
  ((http://syntron.com/ptools/ptools_pg.htm)), mais les Threads sont
  souvent inefficients une fois implments en utilisant des messages.

  On peut rsumer ainsi les performances:








            performance        performance
            machine SMP     cluster de machines  scalabilit
            -----------     -------------------  -----------
  messages     bonne             meilleure        meilleure

  threads    meilleure           mauvaise*        mauvaise*

  * ncessite une technologie NUMA coteuse.




  44..33..33..  AArrcchhiitteeccttuurree ddeess AApppplliiccaattiioonnss

  Pour excuter une application en parallle sur des CPU multiples,
  celle-ci doit tre explicitement dcoupe en parties concurrentes. Une
  application standard mono-CPU ne s'excutera pas plus rapidement mme
  si elle est excute sur une machine multi-processeurs. Certains
  outils et compilateurs peuvent dcouper les programmesn mais la
  paralllisation n'est pas une opration "plug and play".  Suivant
  l'application, la paralllisation peut tre facile, extrmement
  difficile, voire impossible suivant les contraintes de l'algorithme.

  Avant de parler des besoins applicatifs, il nous faut introduire le
  concept de Convenance (Suitability).


  44..44..  CCoonnvveennaannccee

  Beaucoup de questions au sujet du calcul parallle ont la mme
  rponse:

  "Cela dpend entirement de l'application."

  Avant de passer directement aux opportunits, il y a une distinction
  trs importante qui doit tre faite: la diffrence entre CONCURRENT et
  PARALLELE.  Pour clarifier cette discussion, nous allons dfinir ces
  deux termes ainsi:

  les parties CONCURRENTES d'un programme sont celles qui peuvent tre
  calcules indpendamment.

  Les parties PARALLELES d'un programme sont celles qui sont excutes
  sur des lments de calculs au mme moment.

  La distinction est trs importante, parce que la CONCURRENCE est une
  proprit d'un programme et l'efficacit en PARALLELISME est une
  proprit de la machine.  Idalement, l'excution en parallle doit
  produire des performances plus grandes. Le facteur limitant les
  performances en parallle est la vitesse de communication et le temps
  de latence entre les noeuds de calcul. (Le temps de latence existe
  aussi dans les applications TMP threades  cause de la cohrence du
  cache). De nombreux tests de performances communs sont hautement
  parallles, et ainsi la communication et le temps de latence ne sont
  pas les points importants. Ce type de problme peut tre appel
  "videmment parallle".  D'autres applications ne sont pas si simples
  et excuter des parties CONCURRENTES du programme en PARALLELE peut
  faire en sorte que le programme fonctionne plus lentement, et ainsi
  dcaler toute performance de gain dans d'autres parties CONCURRENTES
  du programme. En termes plus simples, le cot en temps de
  communication doit en ptir au profit de celui gagn en temps de
  calcul, sinon l'excution PARALLELE des parties CONCURRENTES est
  inefficace.

  La tche du programmeur est de dterminer quelles parties CONCURRENTES
  le programmeur DOIT excuter en PARALLELE et pour quelles parties il
  NE DOIT PAS le faire. Sa rponse dterminera l'EFFICACITE de
  l'application. Le graphe suivant rsume la situation pour le
  programmeur:





           | *
           | *
           | *
   % des   | *
   appli-  |  *
   cations |  *
           |  *
           |  *
           |    *
           |     *
           |      *
           |        ****
           |            ****
           |                ********************
           +-----------------------------------
            temps de communication/temps de calcul



  Dans un ordinateur parallle parfait, le rapport communication/calcul
  devrait tre gal et tout ce qui est CONCURRENT pourrait tre
  implment en PARALLELE.  Malheureusement, les vrais ordinateurs
  parallles, incluant les machines  mmoire partage, sont sujets aux
  effets dcrits dans ce graphe. En concevant un Beowulf, l'utilisateur
  devrait garder celui-ci en tte parce que la performance dpend du
  rapport entre le temps de communication et le temps de calcul pour un
  ORDINATEUR PARALLELE SPECIFIQUE. Les applications peuvent tre
  portables entre les ordinateurs parallles, mais il n'y a aucune
  garantie qu'elles seront efficaces sur une plateforme diffrente.

  EN GENERAL, IL N'EXISTE PAS DE PROGRAMME PORTABLE EFFICACE EN
  PARALLELE

  Il y a encore une autre consquence au graphe prcdent. Puisque
  l'efficacit dpend du rapport communication/calcul, changer juste un
  composant du rapport ne signifie pas ncessairement qu'une application
  s'excutera plus rapidement. Un changement de vitesse processeur, en
  gardant la mme vitesse de communication, peut avoir des effets
  inattendus sur votre programme. Par exemple, doubler ou tripler la
  vitesse du processeur, en gardant la mme vitesse de communication,
  peut maintenant rendre des parties de votre programme qui sont
  efficaces en PARALLELE, plus efficaces si elles taient excutes
  SEQUENTIELLEMENT. Cela dit, il se peut qu'il soit plus rapide
  maintenant d'excuter les parties qui taient avant PARALLELES en tant
  que SEQUENTIELLES. D'autant plus qu'excuter des parties inefficaces
  en PARALLELE empchera votre application d'atteindre sa vitesse
  maximale. Ainsi, en ajoutant un processeur plus rapide, vous avez
  peut-tre ralenti votre application (vous enpchez votre nouveau CPU
  de fonctionner  sa vitesse maximale pour cette application).

  UPGRADER VERS UN CPU PLUS RAPIDE PEUT REELLEMENT RALENTIR VOTRE
  APPLICATION

  Donc, en conclusion, pour savoir si oui ou non vous pouvez utiliser un
  environnement matriel parallle, vous devez avoir un bon aperu des
  capacits d'une machine particulire pour votre application. Vous
  devez tenir compte de beaucoup de facteurs: vitesse de la CPU,
  compilateur, API de passage de messages, rseau... Notez que se
  contenter d'optimiser une application ne donne pas toutes les
  informations. Vous pouvez isoler une lourde partie de calcul de votre
  programme, mais ne pas connatre son cot au niveau de la
  communication. Il se peut que pour un certain systme, le cot de
  communication ne rende pas efficace de parallliser ce code.


  Une note finale sur une erreur commune: on dit souvent qu'"un
  programme est PARALLELISE", mais en ralit seules les parties
  CONCURRENTES ont t identifies. Pour toutes les raisons prcdentes,
  le programme n'est pas PARALLELISE. Une PARALLELISATION efficace est
  une proprit de la machine.



  44..55..  EEccrriirree eett ppoorrtteerr ddeess llooggiicciieellss ppaarraalllllleess

  A partir du mmoment o vous avez dcid de concevoir et de construire
  un Beowulf, considrer un instant votre application en accord avec les
  observations prcdentes est une bonne ide.

  En gnral, vous pouvez faire deux choses:

  1. Y aller et construire un Beowulf CLASSE I et aprs y ajuster votre
     application. Ou excuter des applications parallles que vous savez
     fonctionner sur votre Beowulf (mais attention  la portabilit et 
     l'efficacit en accord avec les informations cites ci-dessus).

  2. Examiner les applications dont vous avez besoin sur votre Beowulf,
     et faire une estimation quant au type de matriel et de logiciels
     qu'il vous faut.

  Dans chaque cas, vous devrez considrer les besoins en efficacit.  En
  gnral, il y a trois choses  faire:

  1. Dterminer les parties concurrentes de votre programme

  2. Estimer le paralllisme efficacement

  3. Dcrire les parties concurrentes de votre programme

  Examinons-les successivement:


  44..55..11..  DDtteerrmmiinneerr lleess ppaarrttiieess ccoonnccuurrrreenntteess ddee vvoottrree pprrooggrraammmmee

  Cette tape est couvent considre comme "parallliser votre
  programme".  Les dcisions de paralllisation seront faites  l'tape
  2. Dans cette tape, vous avez besoin de dterminer les liens et les
  besoins dans les donnes.

  D'un point de vue pratique, les applications peuvent prsenter deux
  types de concurrence: calcul (travaux numriques) et E/S (Bases de
  Donnes). Mme si dans de nombreux cas, la concurrence entre calculs
  et E/S est orthogonale, des applications ont besoin des deux. Des
  outils existants peuvent faire l'analyse de la concurrence sur des
  applications existantes. La plupart de ces outils sont conus pour le
  FORTRAN. Il y a deux raisons pour lesquelles le FORTRAN est utilis:
  historiquement, la majorit des applications gourmandes en calculs
  numriques taient crites en FORTRAN et c'tait donc plus facile 
  analyser. Si aucun de ces outils n'est disponible, alors cette tape
  peut tre quelque peu difficile pour des applications existantes.




  44..55..22..  EEssttiimmeerr llee ppaarraalllllliissmmee eeffffiiccaacceemmeenntt

  Sans l'aide d'outils, cette tape peut ncessiter un cycle de tests et
  erreurs, ou seulement de bons vieux rflexes bien duqus. Si vous
  avez une application spcifique en tte, essayez de dterminer la
  limite du CPU (lie au calcul) ou les limites des disques (lies aux
  E/S). Les spcifits de votre Beowulf peuvent beaucoup dpendre de vos
  besoins. Par exemple, un problme li au calcul peut ne ncessiter
  qu'un petit nombre de CPU trs rapides et un rseau trs rapide 
  faible temps de latence, tandis qu'un problme li aux E/S peut mieux
  travailler avec des CPU plus lents et un Ethernet rapide.

  Cette recommandation arrive souvent comme une surprise pour beaucoup,
  la croyance habituelle tant que plus le processeur est rapide, mieux
  c'est.  Mais cela n'est vrai que si vous avez un budget illimit: les
  vrais systmes peuvent avoir des contraintes de cots qui doivent tre
  optimises.  Pour les problmes lis aux E/S, il existe une loi peu
  connue (appele la loi de Eadline-Dedkov) qui est assez utile:

  Soient deux machines parallles avec le mme index de performance CPU
  cumule, celle qui a les processeurs les plus lents (et probablement
  un rseau de communication interprocesseur plus lent) aura les
  meilleures performances pour des applications domines par les E/S.

  Mme si les preuves de cette rgle vont au-del de ce document, vous
  pouvez trouver intressant de lire l'article _P_e_r_f_o_r_m_a_n_c_e
  _C_o_n_s_i_d_e_r_a_t_i_o_n_s _f_o_r _I_/_O_-_D_o_m_i_n_a_n_t _A_p_p_l_i_c_a_t_i_o_n_s _o_n _P_a_r_a_l_l_e_l _C_o_m_p_u_t_e_r_s
  (format Postscript 109K) (ftp://www.plogic.com/pub/papers/exs-pap6.ps)

  Une fois que vous aurez dtermin quel type de concurrence vous avez
  dans votre application, vous devrez estimer  quel point elle sera
  efficace en parallle. Voir la Section ``Logiciels'' pour une
  description des outils Logiciels.

  En l'absence d'outils, il vous faudra peut-tre improviser votre
  chemin lors de cette tape. Si une boucle lie aux calculs est mesure
  en minutes et que les donnes peuvent tre transfres en secondes,
  alors c'est un bon candidat pour la paralllisation. Mais souvenez-
  vous que si vous prenez une boucle de 16 minutes et la coupez en 32
  morceaux, et que vos transferts de donnes ont besoin de quelques
  secondes par partie, alors cela devient plus rduit en termes de
  performances. Vous atteindrez un point de retours en diminution.


  44..55..33..  DDccrriirree lleess ppaarrttiieess ccoonnccuurrrreenntteess ddee vvoottrree pprrooggrraammmmee

  Il y a plusieurs faons de dcrire les parties concurrentes de votre
  programme:

  1. L'excution parallle explicite

  2. L'excution parallle implicite

  La diffrence principale entre les deux est que le paralllisme
  explicite est dtermin parl'utilisateur, alors que le paralllisme
  implicite est dtermin par le compilateur.


  44..55..33..11..  LLeess mmtthhooddeess eexxpplliicciitteess

  Il y a principalement des mthodes o l'utilisateur peut modifier le
  code source spcifique pour une machine parallle. L'utilisateur doit
  soit ajouter des messages en utilisant PVM ou MPI, soit ajouter des
  threads POSIX. (Souvenez vous que les threads ne peuvent se dplacer
  entre les cartes-mres SMP).

  Les mthodes explicites tendent  tre les plus difficiles 
  implmenter et  dboguer. Les utilisateurs ajoutent typiquement des
  appels de fonctions dans le code source FORTRAN 77 standard ou C/C++.
  La librairie MPI a ajout des fonctions pour rendre certaines mthodes
  parallles plus faciles  implmenter (i.e. les fonctions
  scatter/gather). De plus, il est aussi possible d'ajouter des
  librairies standard qui ont t crites pour des ordinateurs
  parallles.  Souvenez-vous quand mme du compromis
  efficacit/portabilit.


  Pour des raisons historiques, beaucoup d'applications gourmandes en
  calculs sont crites en FORTRAN. Pour cette raison, FORTRAN dispose du
  plus grand nombres de supports pour le calcul parallle (outils,
  librairies ...). De nombreux programmeurs utilisent maintenant C ou
  rcrivent leurs applications FORTRAN existantes en C, avec l'ide que
  C permettra une excution plus rapide.  Mme si cela est vrai puisque
  C est la chose la plus proche du code machine universel, il a quelques
  inconvnients majeurs. L'utilisation de pointeurs en C rend la
  dtermination des dpendances entre donnes et l'analyse automatique
  des pointeurs extrmement difficiles. Si vous avez des applications
  existantes en FORTRAN et que vous voudrez les parallliser dans le
  futur - NE LES CONVERTISSEZ PAS EN C !


  44..55..33..22..  MMtthhooddeess IImmpplliicciitteess

  Les mthodes implicites sont celles dans lesquelles l'utilisateur
  abandonne quelques dcisions de paralllisation (ou toutes) au
  compilateur. Par exemple le FORTRAN 90, High Performance FORTRAN
  (HPF), Bulk Synchronous Parallel (BSP), et toute une srie de mthodes
  qui sont en cours de dveloppement.

  Les mthodes implicites ncessitent de la part de l'utilisateur des
  informations concernant la nature concurrente de leur application,
  mais le compilateur prendra quand mme beaucoup de dcicions sur la
  manire d'excuter cette concurrence en parallle. Ces mthodes
  procurent un niveau de portabilit et d'efficacit, mais il n'y a pas
  de "meilleure faon" de dcrire un problme concurrent pour un
  ordinateur parallle.


  55..  RReessssoouurrcceess BBeeoowwuullff



  55..11..  PPooiinnttss ddee ddppaarrtt



    Liste de diffusion US Beowulf. Pour s'inscrire, envoyer un courriel
      beowulf-request@cesdis.gsfc.nasa.gov avec le mot _s_u_b_s_c_r_i_b_e dans
     le corps du message.

    Homepage Beowulf http://www.beowulf.org

    Extreme Linux http://www.extremelinux.org

    Extreme Linux Software pour Red Hat http://www.redhat.com/extreme



  55..22..  DDooccuummeennttaattiioonn



    La dernire version du Beowulf HOWTO en
     Anglaishttp://www.sci.usq.edu.au/staff/jacek/beowulf.

    La dernire version du Beowulf HOWTO en Franaishttp://www.e-
     nef.com/linux/beowulf.

    Construire un systme Beowulf
     http://www.cacr.caltech.edu/beowulf/tutorial/building.html

    Les liens de Jacek sur Beowulf
     http://www.sci.usq.edu.au/staff/jacek/beowulf.

    Beowulf Installation and Administration HOWTO (DRAFT)
     http://www.sci.usq.edu.au/staff/jacek/beowulf.

    Linux Parallel Processing HOWTO
     http://yara.ecn.purdue.edu/~pplinux/PPHOWTO/pphowto.html



  55..33..  PPuubblliiccaattiioonnss



    Chance Reschke, Thomas Sterling, Daniel Ridge, Daniel Savarese,
     Donald Becker, and Phillip Merkey _A _D_e_s_i_g_n _S_t_u_d_y _o_f _A_l_t_e_r_n_a_t_i_v_e
     _N_e_t_w_o_r_k _T_o_p_o_l_o_g_i_e_s _f_o_r _t_h_e _B_e_o_w_u_l_f _P_a_r_a_l_l_e_l _W_o_r_k_s_t_a_t_i_o_n.
     Proceedings Fifth IEEE International Symposium on High Performance
     Distributed Computing, 1996.
     http://www.beowulf.org/papers/HPDC96/hpdc96.html


    Daniel Ridge, Donald Becker, Phillip Merkey, Thomas Sterling
     Becker, and Phillip Merkey. _H_a_r_n_e_s_s_i_n_g _t_h_e _P_o_w_e_r _o_f _P_a_r_a_l_l_e_l_i_s_m _i_n
     _a _P_i_l_e_-_o_f_-_P_C_s. Proceedings, IEEE Aerospace, 1997.
     http://www.beowulf.org/papers/AA97/aa97.ps


    Thomas Sterling, Donald J. Becker, Daniel Savarese, Michael R.
     Berry, and Chance Res. _A_c_h_i_e_v_i_n_g _a _B_a_l_a_n_c_e_d _L_o_w_-_C_o_s_t _A_r_c_h_i_t_e_c_t_u_r_e
     _f_o_r _M_a_s_s _S_t_o_r_a_g_e _M_a_n_a_g_e_m_e_n_t _t_h_r_o_u_g_h _M_u_l_t_i_p_l_e _F_a_s_t _E_t_h_e_r_n_e_t _C_h_a_n_n_e_l_s
     _o_n _t_h_e _B_e_o_w_u_l_f _P_a_r_a_l_l_e_l _W_o_r_k_s_t_a_t_i_o_n.  Proceedings, International
     Parallel Processing Symposium, 1996.
     http://www.beowulf.org/papers/IPPS96/ipps96.html


    Donald J. Becker, Thomas Sterling, Daniel Savarese, Bruce Fryxell,
     Kevin Olson. _C_o_m_m_u_n_i_c_a_t_i_o_n _O_v_e_r_h_e_a_d _f_o_r _S_p_a_c_e _S_c_i_e_n_c_e _A_p_p_l_i_c_a_t_i_o_n_s
     _o_n _t_h_e _B_e_o_w_u_l_f _P_a_r_a_l_l_e_l _W_o_r_k_s_t_a_t_i_o_n.  Proceedings,High Performance
     and Distributed Computing, 1995.
     http://www.beowulf.org/papers/HPDC95/hpdc95.html



    Donald J. Becker, Thomas Sterling, Daniel Savarese, John E.
     Dorband, Udaya A. Ranawak, Charles V. Packer. _B_E_O_W_U_L_F_: _A _P_A_R_A_L_L_E_L
     _W_O_R_K_S_T_A_T_I_O_N _F_O_R _S_C_I_E_N_T_I_F_I_C _C_O_M_P_U_T_A_T_I_O_N. Proceedings, International
     Conference on Parallel Processing, 95.
     http://www.beowulf.org/papers/ICPP95/icpp95.html

    Publications sur le site de Beowulf
     http://www.beowulf.org/papers/papers.html




  55..44..  LLooggiicciieellss


    PVM - Parallel Virtual Machine/Machine Parallle Virtuelle
     http://www.epm.ornl.gov/pvm/pvm_home.html



    LAM/MPI - Local Area Multicomputer / Message Passing Interface
     Multi-Ordinateurs locaux  / Interface de Transmission de Messages
     http://www.mpi.nd.edu/lam

    BERT77 - outil de conversion FORTRAN
     http://www.plogic.com/bert.html

    logiciels Beowulf de la page du Projet Beowulf
     http://beowulf.gsfc.nasa.gov/software/software.html

    Jacek's Beowulf-outils ftp://ftp.sci.usq.edu.au/pub/jacek/beowulf-
     utils

    bWatch - logiciel de surveillance de
     clusterhttp://www.sci.usq.edu.au/staff/jacek/bWatch




  55..55..  MMaacchhiinneess BBeeoowwuullff


    Avalon consiste en 140 processeurs Alpha, 36 Go de RAM, et est
     probablement la machine Beowulf la plus rapide, allant  47.7
     Gflops et classe 114me sur la liste du Top 500.
     http://swift.lanl.gov/avalon/

    Megalon-A Massively PArallel CompuTer Resource (MPACTR) consiste en
     14 quadri CPU Pentium Pro 200 noeuds, et 14 Go de RAM.
     http://megalon.ca.sandia.gov/description.html

    theHIVE - Highly-parallel Integrated Virtual Environment est un
     autre Superordinateur Beowulf rapide. theHIVE est de 64 noeuds, une
     machine de 128 CPU avec un total de 4 Go de RAM.
     http://newton.gsfc.nasa.gov/thehive/

    Topcat est une machine beaucoup plus petite, constitue de 16 CPU
     et 1.2 Go de RAM. http://www.sci.usq.edu.au/staff/jacek/topcat

    MAGI cluster -- c'est un trs bon site avec de nombreux liens de
     qualit. http://noel.feld.cvut.cz/magi/




  55..66..  DD''aauuttrreess SSiitteess IInnttrreessssaannttss



    Linux SMPhttp://www.linux.org.uk/SMP/title.html

    Paralogic - Achetez un Beowulf http://www.plogic.com


  55..77..  HHiissttooiirree



    Lgendes - Beowulf  http://legends.dm.net/beowulf/index.html

    Les Aventures de Beowulf
     http://www.lnstar.com/literature/beowulf/beowulf.html


  66..  CCooddee SSoouurrccee


  66..11..  ssuumm..cc


  /* Jacek Radajewski jacek@usq.edu.au */
  /* 21/08/1998 */

  #include <stdio.h>
  #include <math.h>

  int main (void) {

    double result = 0.0;
    double number = 0.0;
    char string[80];


    while (scanf("%s", string) != EOF) {

      number = atof(string);
      result = result + number;
    }

    printf("%lf\n", result);

    return 0;

  }




  66..22..  ssiiggmmaassqqrrtt..cc

























  /* Jacek Radajewski jacek@usq.edu.au */
  /* 21/08/1998 */

  #include <stdio.h>
  #include <math.h>

  int main (int argc, char** argv) {

    long number1, number2, counter;
    double result;

    if (argc < 3) {
      printf ("usage : %s number1 number2\n",argv[0]);
      exit(1);
    } else {
      number1 = atol (argv[1]);
      number2 = atol (argv[2]);
      result = 0.0;
    }

    for (counter = number1; counter <= number2; counter++) {
      result = result + sqrt((double)counter);
    }

    printf("%lf\n", result);

    return 0;

  }





  66..33..  pprruunn..sshh































  #!/bin/bash
  # Jacek Radajewski jacek@usq.edu.au
  # 21/08/1998

  export SIGMASQRT=/home/staff/jacek/beowulf/HOWTO/example1/sigmasqrt

  # $OUTPUT doit tre un canal nomm (named pipe)
  # mkfifo output

  export OUTPUT=/home/staff/jacek/beowulf/HOWTO/example1/output

  rsh scilab01 $SIGMASQRT         1  50000000 > $OUTPUT < /dev/null&
  rsh scilab02 $SIGMASQRT  50000001 100000000 > $OUTPUT < /dev/null&
  rsh scilab03 $SIGMASQRT 100000001 150000000 > $OUTPUT < /dev/null&
  rsh scilab04 $SIGMASQRT 150000001 200000000 > $OUTPUT < /dev/null&
  rsh scilab05 $SIGMASQRT 200000001 250000000 > $OUTPUT < /dev/null&
  rsh scilab06 $SIGMASQRT 250000001 300000000 > $OUTPUT < /dev/null&
  rsh scilab07 $SIGMASQRT 300000001 350000000 > $OUTPUT < /dev/null&
  rsh scilab08 $SIGMASQRT 350000001 400000000 > $OUTPUT < /dev/null&
  rsh scilab09 $SIGMASQRT 400000001 450000000 > $OUTPUT < /dev/null&
  rsh scilab10 $SIGMASQRT 450000001 500000000 > $OUTPUT < /dev/null&
  rsh scilab11 $SIGMASQRT 500000001 550000000 > $OUTPUT < /dev/null&
  rsh scilab12 $SIGMASQRT 550000001 600000000 > $OUTPUT < /dev/null&
  rsh scilab13 $SIGMASQRT 600000001 650000000 > $OUTPUT < /dev/null&
  rsh scilab14 $SIGMASQRT 650000001 700000000 > $OUTPUT < /dev/null&
  rsh scilab15 $SIGMASQRT 700000001 750000000 > $OUTPUT < /dev/null&
  rsh scilab16 $SIGMASQRT 750000001 800000000 > $OUTPUT < /dev/null&
  rsh scilab17 $SIGMASQRT 800000001 850000000 > $OUTPUT < /dev/null&
  rsh scilab18 $SIGMASQRT 850000001 900000000 > $OUTPUT < /dev/null&
  rsh scilab19 $SIGMASQRT 900000001 950000000 > $OUTPUT < /dev/null&
  rsh scilab20 $SIGMASQRT 950000001 1000000000 > $OUTPUT < /dev/null&



































  The Linux BootPrompt-HOWTO
  Par Paul Gortmaker.
  v1.14, 1er Fevrier 1998

  Ce  document  est le BootPrompt-Howto, qui est un condense de tous les
  parametres de boot qui peuvent etre transmis au noyau de LLiinnuuxx lors de
  la  sequence  de  boot. Ceci inclut tous les parametres concernant les
  peripheriques. Une partie traitant de la facon dont le noyau trie  les
  parametres  de  demarrage ainsi qu'un tour d'horizon des logiciels les
  plus repandus pour demarrer le noyau de LLiinnuuxx    sont  aussi  inclues.
  CCeettttee vveerrssiioonn ffrraannccaaiissee aa eettee rreeaalliisseeee ppaarr
   _L_a_u_r_e_n_t _R_E_N_A_U_D (lrenaud@hol.fr).

  11..  IInnttrroodduuccttiioonn

  Le  noyau  a  une  capacite  limitee pour accepter des informations au
  moment du demarrage sous la forme d'une ligne de commande, semblable a
  une  liste  d'arguments  que  vous  pouvez  passer  a un programme. En
  general, ceci est  utilise  pour  donner  au  noyau  des  informations
  concernant  les  parametres du materiel que le noyau n'est pas capable
  de determiner tout seul, ou pour se substituer/ecraser les valeurs que
  le noyau pourrait detecter.

  Cependant, si vous avez juste copie une image du noyau directement sur
  une disquette, (c.a.d  cp zImage /dev/fd0) alors  vous  n'avez  aucune
  chance  de  pouvoir specifier quelque argument que ce soit a ce noyau.
  C'est  pourquoi  beaucoup  d'utilisateurs  de  LLiinnuuxx   utilisent   des
  logiciels  comme  _L_I_L_O  ou  _l_o_a_d_l_i_n qui se chargent de transmettre ces
  arguments au noyau, et de le faire alors demarrer.

  _N_O_T_E _I_M_P_O_R_T_A_N_T_E _P_O_U_R _L_E_S _U_T_I_L_I_S_A_T_E_U_R_S _D_E _M_O_D_U_L_E_S _: Les  parametres  de
  demarrage  en  general, ne s'appliquent qu'aux pilotes de materiel qui
  sont compiles directement dans le noyau.  Ils n'ont  _a_u_c_u_n  _e_f_f_e_t  sur
  les  pilotes  qui  sont  charges  en  tant que modules. La plupart des
  distributions utilisent des modules. Si vous ne  savez  pas,  regardez
  dans   man   depmod   et   man  modprobe  en  suivant  le  contenu  de
  /etc/conf.modules.

  Cette version couvre les distributions du  noyau  jusqu'a  la  v2.0.33
  incluse.  Des informations qui font partie des noyaux en developpement
  jusqu'a la version 2.1.84 sont aussi documentees.

  Le BootPrompt-Howto est edite et mis a jour par :

       Paul Gortmaker, gpg109@rsphy1.anu.edu.au

  [Notez que les parametres de demarrage qui sont specifiques aux  ports
  et  peripheriques non-i386 (ex : Atari/Amiga) ne sont actuellement pas
  documentes.]

  11..11..  RReessppoonnssaabbiilliittee eett CCooppyyrriigghhtt

  Ce document _n_'_e_s_t _p_a_s l'evangile ! Bien que ce  soit  probablement  la
  source  d'information  la  plus  a  jour  que  vous  puissiez trouver.
  Personne n'est responsable de ce qui peut arriver a votre  materiel  a
  part  vous.  Si  votre  materiel  s'enflamme  brusquement  (ce qui est
  quasiment impossible ! ) je ne suis pas responsable. C'est a dire  QUE
  L'AUTEUR  N'EST PAS RESPONSABLE DES DOMMAGES QUI PEUVENT ETRE PRODUITS
  PAR DES ACTIONS RESULTANT D'INFORMATIONS CONTENUES DANS CE DOCUMENT.

  Ce document est soumis au Copyright (c) 1995-1998 de Paul Gortmaker.

  Ce document peut etre copie en respectant les termes de la GNU General
  Public  Licence,  version  2, ci-incluse en reference. Voir le fichier
  linux/COPYING fourni avec le noyau Linux pour plus de details.

  Si vous avez  l'intention  d'incorporer  ce  document  au  sein  d'une
  publication,  merci  de  me  contacter,  et  je  ferai  un effort pour
  m'assurer que vous avez les informations les plus a jour  disponibles.
  Par  le passe, des versions perimees de HOWTO ont ete publiees, ce qui
  a  attriste  les  developpeurs  qui  ont  ete  harceles  de  questions
  auxquelles ils avaient deja repondu dans des versions plus recentes.

  11..22..  DDooccuummeennttaattiioonn AAssssoocciieeee

  Les  documentations  les  plus  a  jour seront toujours les sources du
  noyau. Pas si vite ! Ne soyez pas effrayes. Vous n'avez pas besoin  de
  connaitre  la  programmation  pour  lire  les  commentaires  dans  les
  fichiers source. Par exemple, si vous recherchez un argument qui  peut
  etre  transmis  au pilote AHA1542 SCSI, il vous suffit d'aller dans le
  repertoire  linux/drivers/scsi,  et  de  regarder  dans   le   fichier
  aha1542.c  et dans les cent premieres lignes vous trouverez en anglais
  une description simple et complete des parametres de demarrage que  le
  pilote 1542 peut recevoir.

  Une autre bonne chose seront les fichiers de documentation livres avec
  le noyau lui-meme. Il y en  a  aujourd'hui  pas  mal,  et  la  plupart
  d'entre     eux    peuvent-etre    trouves    dans    le    repertoire
  linux/Documentation   et tous  ses  sous  repertoires.  Le  repertoire
  linux  se  trouve  generalement  dans  /usr/src/. Parfois des fichiers
  README.foo peuvent se trouver dans le repertoire associe  aux  pilotes
  (c.a.d. linux/drivers/XXX/, ou XXX sera scsi, char, ou net.

  Si   vous  avez  trouve  quels  sont  les  parametres  que  vous  avez
  l'intention d'utiliser, et que vous voulez savoir comment  transmettre
  ces  informations  au  noyau,  alors  regardez  la  documentation  qui
  correspond au logiciel que vous utilisez pour demarrer le  noyau  (par
  exemple : LILO ou loadlin). Un bref survol est fourni ci-dessous, mais
  il ne remplace pas  la  documentation  fournie  avec  le  logiciel  de
  demarrage.

  11..33..  LLee ggrroouuppee ddee ddiissccuussssiioonn LLiinnuuxx

  Si  vous  avez  des  questions  sur  la transmission des parametres au
  noyau, s'il vous plait, LISEZ D'ABORD ce document. Si ce  document  et
  les  documents associes qui sont mentionnes ci-dessus ne repondent pas
  a votre (vos) question(s), alors vous pouvez essayer de la (les) poser
  dans  le groupe de discussion LLiinnuuxx (fr.comp.os.linux pour la France).
  Bien sur, il serait bon de lire les messages du groupe avant de  poser
  aveuglement  vos  questions, il se peut que quelqu'un d'autre ait deja
  pose la meme question, ou peut-etre est-ce  une  question  frequemment
  posee  (FAQ).   Un  coup d'oeuil rapide a la FAQ linux avant de poster
  est une _b_o_n_n_e idee. On pourra trouver les FAQ quelque  part,  dans  un
  repertoire proche de celui ou vous avez trouve ce document.

  Les  questions  generales concernant la configuration de votre systeme
  peuvent etre directement posees dans  le  groupe  comp.os.linux.setup.
  Nous  vous  demandons  _s_'_i_l  _v_o_u_s  _p_l_a_i_t  de  respecter  ces  quelques
  recommandations, et de ne pas cross-poster vos demandes dans  d'autres
  groupes.

  11..44..  NNoouuvveelllleess VVeerrssiioonnss ddee ccee DDooccuummeenntt

  Les  nouvelles  versions  (en  anglais)  de  ce  document peuvent etre
  recuperees par FTP  anonyme  sur  le  site  sunsite.unc.edu,  dans  le
  repertoire  /pub/Linux/docs/HOWTO/.  Notez  que  _S_u_n_S_I_T_E  est  souvent
  surcharge, donc il vaudrait mieux aller chercher ce  document  sur  un
  des sites ftp miroir de Linux.

  Ces  documents en langue francaise se trouvent sur le site ftp.lip6.fr
  dans de repertoire /pub/linux/french/docs/HOWTO.

  Des  mises  a  jour  seront  faites  chaque  fois  que  de   nouvelles
  informations  /  pilotes seront disponibles. Si la copie que vous etes
  en train de lire date de plus de  quelques  mois,  il  serait  bon  de
  verifier qu'il n'en existe pas une version plus recente.

  Ce  document  est  produit  en  utilisant le systeme SGML specialement
  concu pour le projet LLiinnuuxx Howto, et il existe differents  formats  de
  sortie disponibles : postscript, dvi, ascii, html, et bientot TeXinfo.

  Je vous recommande de visualiser ce document en HTML (via un  logiciel
  de  navigation  WWW  )  ou  dans  le format PostScript/dvi.  Tous deux
  contiennent  les  references  croisees  qui  sont  perdues  dans   les
  conversions en ASCII.

  Si vous voulez obtenir la copie officielle de sunsite, voici l'URL.

  BootPrompt-HOWTO         <http://sunsite.unc.edu/mdw/HOWTO/BootPrompt-
  HOWTO.html>

  22..  VVuuee dd''EEnnsseemmbbllee ddeess PPaarraammeettrreess ddee DDeemmaarrrraaggee

  Cette partie donne un  certain  nombre  d'exemples  de  logiciels  qui
  peuvent  etre utilises pour transmettre les parametres de demarrage au
  noyau. Elle donne aussi une idee de la facon dont les parametres  sont
  traites,  quelles sont les limitations des parametres de demarrage, et
  la facon dont ils sont repartis vers chaque peripherique pour lesquels
  ils ont ete concus.

  Il est _i_m_p_o_r_t_a_n_t de noter que l'on _n_e _p_e_u_t _p_a_s utiliser d'espaces dans
  un  parametre  de  demarrage,  mais  seulement  entre  des  parametres
  differents.  Une  liste  de  valeurs correspondant a un seul parametre
  doit utiliser des virgules  comme  separateur  entre  les  differentes
  valeurs, la aussi, sans aucun espace. Voir les exemples ci-dessous.

  ______________________________________________________________________
          ether=9,0x300,0xd0000,0xd4000,eth0  root=/dev/hda1            *BON*
          ether = 9, 0x300, 0xd0000, 0xd4000, eth0  root = /dev/hda1    *MAUVAIS*
  ______________________________________________________________________

  22..11..  LLIILLOO ((LLIInnuuxx LLOOaaddeerr))

  Le  programme  LILO (LInux LOader) ecrit par Werner Almesberger est le
  plus couramment utilise. Il  a  la  capacite  de  demarrer  differents
  noyaux,  et  stocke  les informations de configuration dans un fichier
  contenant  exclusivement  du   texte.    Beaucoup   de   distributions
  fournissent  LILO  comme "boot-loader" (chargeur de noyau) par defaut.
  LILO  peut  demarrer  DOS,  OS/2,  LLiinnuuxx,  FreeBSD,  etc.  sans  aucun
  probleme, et il est tres souple.

  Une  configuration  classique est d'avoir LILO qui arrete le demarrage
  et affiche LILO: peu  de  temps  apres  que  vous  ayez  allume  votre
  ordinateur.   Il   attendra  alors  quelques  instants  en  vue  d'une
  eventuelle saisie de  l'utilisateur,  faute  de  quoi  il  lancera  le
  systeme d'exploitation par defaut. Les etiquettes couramment utilisees
  dans les fichiers de configuration de LILO  sont  linux  ,  backup  et
  msdos.  Si  vous  desirez  entrer  un  parametre de demarrage, vous le
  taperez ici, apres avoir entre l'etiquette du systeme que vous  voulez
  que LILO lance, comme indique dans l'exemple ci-dessous.

  ______________________________________________________________________
          LILO: linux root=/dev/hda1
  ______________________________________________________________________

  LILO  est  fourni  avec  une  documentation  excellente,  et  pour les
  parametres de demarrage dont nous parlons ici, la commande append=  de
  LILO  est  d'une  tres  grande importance lorsque l'on veut ajouter un
  parametre  de  demarrage  de  facon  permanente  dans  le  fichier  de
  configuration  de  LILO.  Vous  ajoutez  tout simplement quelque chose
  comme append = "foo=bar"  dans  le  fichier  /etc/lilo.conf.  On  peut
  l'ajouter  soit  en  haut  du  fichier  de  configuration,  afin qu'il
  s'applique a toutes les sections, ou dans une section correspondant  a
  un  systeme  particulier en le mettant dans une section image=.  Voyez
  la documentation de LILO pour une description plus complete.

  22..22..  LLooaaddLLiinn

  L'autre chargeur de noyau couramment utilise est `LoadLin' qui est  un
  programme  DOS  qui  est  capable de lancer un noyau LLiinnuuxx a partir du
  prompt du dos (avec des parametres  de  demarrage)  en  supposant  que
  certaines  ressources  sont  disponibles.  Ceci est tres bien pour les
  gens qui utilisent le DOS et qui veulent basculer sur LLiinnuuxx  a  partir
  du DOS.

  C'est  aussi  tres  pratique  si  vous  possedez  du  materiel qui est
  dependant du pilote fourni pour le DOS afin de mettre le materiel dans
  un  etat  donne.  Un  exemple  frequent : les cartes son `SoundBlaster
  Compatible' qui requierent un pilote DOS pour positioner  un  ensemble
  de   registres  proprietaires  pour  mettre  la  carte  dans  un  mode
  compatible SoundBlaster. Demarrez le DOS avec  le  pilote  requis,  et
  maintenant chargez LLiinnuuxx a partir du prompt du DOS avec LOADLIN.EXE en
  esquivant la remise a zero de la carte qui intervient si on  redemarre
  completement  la machine. De cette facon, la carte est laissee dans le
  mode compatible SB et par consequent est utilisable sous LLiinnuuxx.

  Il y a aussi  d'autres  programmes  qui  peuvent  etre  utilises  pour
  demarrer LLiinnuuxx. Pour une liste complete, regardez sur votre miroir ftp
  LLiinnuuxx  local,  les   programmes   disponibles   dans   le   repertoire
  system/Linux-boot/.

  22..33..  LL''uuttiilliittaaiirree ````rrddeevv''''

  Un  certain  nombre  des  parametres  de  demarrage du noyau ont leurs
  valeurs par defaut stockees  dans  differents  octets  de  l'image  du
  noyau.  Il  existe  un utilitaire baptise rdev qui est installe sur la
  plupart des systemes et qui sait ou sont ces valeurs, et  comment  les
  changer.  Il  peut  aussi  modifier un certain nombre de choses qui ne
  possedent pas de parametre de  demarrage  equivalent,  comme  le  mode
  video utilise par defaut.

  L'utilitaire  rdev  est couramment associe a swapdev, ramsize, vidmode
  et rootflags. Les cinq parametres que rdev peut  modifier  sont  :  le
  peripherique  de demarrage, le peripherique de swap, les parametres du
  disque RAM, le mode video par defaut, et  l'autorisation  de  lecture-
  seule/lecture-ecriture sur le peripherique racine.

  Des  informations  plus  completes  sur  rdev peuvent etre obtenues en
  tapant rdev -h ou en lisant la page correspondante  du  manuel  fourni
  (man rdev).

  22..44..  CCoommmmeenntt llee nnooyyaauu ggeerree tt--iill lleess ppaarraammeettrreess ??

  La plupart des parametres de demarrage utilisent la syntaxe suivante :

  ______________________________________________________________________
          nom[=valeur_1][,valeur_2]...[,valeur_11]
  ______________________________________________________________________

  ou `nom' est un mot cle unique qui  est  utilise  pour  reconnaitre  a
  quelle  partie  du noyau sont destinees les valeurs associees (si il y
  en a). Plusieurs parametres de demarrage peuvent  etre  transmis  sous
  forme d'une liste d'elements, comme celle situe ci-dessus, separes par
  des espaces. Notez que la limite de 11 parametres  est  reelle,  c'est
  pourquoi  le  code ci-dessus ne comporte que 11 parametres separes par
  des virgules pour un mot cle. Toutefois,  vous  pouvez  reutiliser  le
  meme  mot  cle  avec  11  parametres  de plus dans des situations tres
  complexes, en  sachant  que  ceci  est  accepte  par  la  fonction  de
  configuration. Notez aussi que le noyau partage la liste en un maximum
  de 10 parametres entiers, et une chaine de caracteres accompagnatrice,
  donc vous pouvez reellement fournir 11 entiers, dans la mesure ou vous
  assurez la conversion du 11eme parametre, de chaine en entier, dans le
  pilote lui meme.

  La  plupart  sont pris en charge par linux/init/main.c.  Tout d'abord,
  le noyau cherche a voir si le parametre  fait  partie  des  parametres
  speciaux  comme  `root=', `ro', `rw', ou `debug'.  La signification de
  ces parametres speciaux est decrite plus loin dans ce document.

  Il parcourt alors une liste de fonctions de  configuration  (contenues
  dans le tableau bootsetups) pour voir si la chaine parametre specifiee
  (comme  par  exemple  `foo')  a  ete  associee  a  une   fonction   de
  configuration  (foo_setup())  pour  un peripherique particulier ou une
  partie du noyau. Si vous passez  au  noyau  la  ligne  foo=3,4,5,6,bar
  alors,  il  cherchera  dans le tableau bootsetups pour voir si `foo' y
  figure.  S'il  y  est,  alors  il  pourra  appeler  la   fonction   de
  configuration  associee a `foo' (foo_setup()) et prendra en charge les
  parametres 3, 4, 5 et 6 tels qu'ils  sont  donnes  dans  la  ligne  de
  commande  adressee  au  noyau,  et traitera aussi le parametre de type
  chaine bar.

  22..55..  PPoossiittiioonnnneemmeenntt ddeess VVaarriiaabblleess dd''EEnnvviirroonnnneemmeenntt..

  Quelque chose du type `foo=bar',  qui  n'est  pas  accepte  comme  une
  fonction  de  configuration  telle  qu'elle est decrite ci-dessus, est
  interpretee comme une  variable  d'environnement  a  positionner.   Un
  exemple  (inutile ?) serait d'utiliser `TERM=vt100' comme parametre de
  demarrage.

  22..66..  PPaasssseerr ddeess ppaarraammeettrreess aauu pprrooggrraammmmee ``iinniitt''

  Tous les parametres restants qui ne sont pas pris par le noyau et  qui
  ne  sont pas consideres comme etant des variables d'environnement sont
  transmis au processus initial, qui est generalement le programme init.
  Le  parametre  le  plus  couramment passe au processus init est le mot
  _s_i_n_g_l_e qui demande a init  de  demarrer  l'ordinateur  en  mode  mono-
  utilisateur,  et  de  ne  pas lancer les "daemons" (demons) habituels.
  Regardez la  page  du  manuel  correspondant  a  la  version  de  init
  installee   sur  votre  systeme,  afin  de  connaitre  les  parametres
  acceptes.

  33..  PPaarraammeettrreess GGeenneerraauuxx nnoonn ssppeecciiffiiqquueess aa uunn PPeerriipphheerriiqquuee

  Voici des  parametres  qui  ne  sont  pas  lies  a  des  peripheriques
  particuliers.  Ils  sont  simplement  lies  a  un  certain  nombre  de
  parametres internes au noyau,  comme  la  gestion  memoire,  celle  du
  disque RAM, celle du systeme de fichiers racine, etc.

  33..11..  OOppttiioonnss dduu ssyysstteemmee ddee ffiicchhiieerrss rraacciinnee

  Les  options  suivantes  determinent  toutes  la  facon  dont le noyau
  selectionne et manipule le systeme de fichiers racine.

  33..11..11..  LLee ppaarraammeettrree ``rroooott==''

  Ce parametre indique au noyau  quel  peripherique  doit  etre  utilise
  comme  "root  filesystem"  (racine  du systeme de fichiers) pendant le
  demarrage. Par defaut, c'est le peripherique  racine  du  systeme  sur
  lequel le noyau a ete construit.  Par exemple, si le noyau en question
  a ete construit sur un systeme qui utilise `/dev/hda1' comme partition
  racine, alors le peripherique racine par defaut sera `/dev/hda1'. Pour
  outrepasser  cette  valeur  et  selectionner  le  second  lecteur   de
  disquette comme peripherique racine, il faut utiliser `root=/dev/fd1'.
  Les peripheriques racine valides sont un des peripheriques suivants :

  (1) /dev/hdaN a /dev/hddN, ou N est la partition pour les disques `a a
  d' compatibles ST-506.

  (2) /dev/sdaN a /dev/sdeN, ou N est la partition pour les disques `a a
  e' compatibles SCSI.

  (3) /dev/xdaN a /dev/xdbN, ou N est la partition pour les disques `a a
  b' compatibles XT.

  (4)  /dev/fdN,  ou  N est le numero du lecteur de disquette. La valeur
  N=0 correspond au disque DOS `A:', et N=1 correspond a `B:'.

  (5) /dev/nfs, qui n'est pas vraiement un peripherique, mais plutot  un
  indicateur  pour  dire  au  noyau de rechercher le systeme de fichiers
  racine via le reseau.

  La plus maladroite et  la  moins  compatible  des  specifications  des
  peripheriques disque ci-dessus, qui est le format nombre majeur/nombre
  mineur est aussi acceptee (par exemple /dev/sda3 a pour  major  8,  et
  pour minor 3, vous pouvez donc utiliser root=0x803 comme alternative).

  C'est un des parametres de  demarrage  qui  a  sa  valeur  par  defaut
  stockee  dans  l'image  du  noyau, et qui peut etre aussi modifiee par
  l'utilitaire rdev.

  33..11..22..  LLee ppaarraammeettrree ``rroo''

  Quand le noyau demarre, il a besoin du  systeme  de  fichiers  racine,
  pour  enumerer  les elements de base de celui-ci.  C'est le systeme de
  fichiers racine qui est monte au demarrage.  Cependant, si le  systeme
  de  fichiers  racine  est  monte  avec  un  acces en ecriture, vous ne
  pourrez pas controler  de  facon  fiable  l'integrite  du  systeme  de
  fichiers,  car  il  peut  y  avoir  des  fichiers en cours d'ecriture.
  L'option `ro' indique au noyau de monter le systeme de fichiers racine
  en lecture seule, de facon que les programmes de controle de coherence
  du systeme de fichiers (fsck) puissent etre certain qu'il  n'y  a  pas
  d'ecritures  en  cours  pendant  la  duree du test. Aucun programme ou
  processus ne peut ecrire dans les fichiers situes sur  le  systeme  de
  fichiers  en question jusqu'a ce qu'il ait ete `remonte' avec un acces
  en lecture/ecriture.

  C'est un des parametres de  demarrage  qui  a  sa  valeur  par  defaut
  stockee  dans  l'image  du  noyau, et qui peut etre aussi modifiee par
  l'utilitaire rdev.

  33..11..33..  LLee ppaarraammeettrree ``rrww''

  Ceci est le contraire le plus parfait de ce qui precede, c'est a  dire
  que  ce  parametre  indique  au  noyau de monter le systeme de fichier
  racine en lecture/ecriture. N'executez surtout  pas  un  programme  de
  type `fsck' sur un systeme de fichiers monte en lecture/ecriture.

  La  meme  valeur stockee dans le fichier image mentionne ci-dessus est
  aussi accessible via rdev

  33..22..  OOppttiioonnss lliieeeess aa llaa ggeessttiioonn ddeess ddiissqquueess vviirrttuueellss ((ddiissqquueess RRAAMM))

  Les  options  suivantes correspondent a la facon dont le noyau gere le
  peripherique disque  virtuel,  qui  est  souvent  utilise  comme  zone
  d'amorcage  durant  la  phase d'installation, ou pour des machines qui
  utilisent des pilotes  modulaires  qui  doivent  etre  installes  pour
  acceder au systeme de fichiers racine.

  33..22..11..  LLee ppaarraammeettrree ``rraammddiisskk__ssttaarrtt==''

  Pour  permettre  a  une  image  du  noyau  de loger sur une disquette,
  conjointement avec une image compressee du disque virtuel, la commande
  `ramdisk_start=<offset>' est ajoutee. Le noyau ne peut pas etre inclus
  dans l'image compressee du systeme de fichiers du disque virtuel,  car
  il  doit  etre  stocke a partir du bloc zero de facon a ce que le BIOS
  puisse charger le secteur d'amorce (bootsector) et que le noyau puisse
  alors s'auto-lancer.

  Note  :  Si  vous utilisez une image du disque virtuel non compressee,
  alors le noyau peut faire partie de l'image du systeme de fichiers qui
  est  charge  sur  le  disque virtuel, et la disquette peut-etre lancee
  avec LILO, ou les deux peuvent etre distincts comme  c'est  fait  pour
  les images compressees.

  Si  vous utilisez deux disques boot/root (noyau sur le disque 1, image
  u disque virtuel sur le disque 2) alors, le disque  virtuel  demarrera
  au  bloc zero, et un deplacement (offset) de zero sera utilise.  Etant
  donne que  c'est  la  valeur  par  defaut,  vous  n'aurez  pas  besoin
  actuellement d'utiliser cette commande.

  33..22..22..  LLee ppaarraammeettrree ``llooaadd__rraammddiisskk==''

  Ce  parametre  indique  au  noyau si il essaye de charger une image du
  disque virtuel ou pas. En specifiant `load_ramdisk=1' on indiquera  au
  noyau  de  charger une disquette dans le disque virtuel. La valeur par
  defaut est zero, ce qui  signifie  que  le  noyau  n'essaiera  pas  de
  charger un disque virtuel.

  Voyez  le fichier linux/Documentation/ramdisk.txt pour une description
  complete  des  nouveaux  parametres  de  demarrage,  et  comment   les
  utiliser.  La  facon  dont  ces parametres peuvent etre positionnes et
  stockes dans l'image du noyau via 'rdev' est aussi decrite.

  33..22..33..  LLee ppaarraammeettrree ``pprroommpptt__rraammddiisskk==''

  Ce parametre indique  au  noyau  si  il  doit  ou  non  vous  demander
  d'inserer  la  disquette contenant l'image du disque virtuel. Dans une
  configuration a une seule disquette, l'image du disque virtuel est sur
  la meme disquette que le noyau qui vient juste de se charger/demarrer,
  et donc un message d'invite est inutile. Dans ce cas, on peut utiliser
  `prompt_ramdisk=0'.  Dans une configuration avec deux disquettes, vous
  devez  avoir  la  possibilite  de  changer  de  disquette,  et   alors
  `prompt_ramdisk=1'  peut-etre utilise. Etant donne que c'est la valeur
  par defaut, on n'a pas vraiment besoin de l'indiquer.

  Note Historique : Des gens sournois on l'habitude d'utiliser  l'option
  de  LILO  `vga=ask'  pour stopper temporairement le demarrage et avoir
  ainsi une chance de pouvoir passer de la disquette boot a la disquette
  root.

  Voyez  le fichier linux/Documentation/ramdisk.txt pour une description
  complete  des  nouveaux  parametres  de  demarrage,  et  comment   les
  utiliser.  La  facon  dont  ces parametres peuvent etre positionnes et
  stockes dans l'image du noyau via 'rdev' est aussi decrite.

  33..22..44..  LLee ppaarraammeettrree ``rraammddiisskk__ssiizzee==''

  Bien que ce soit vrai que le disque  virtuel  augmente  sa  taille  de
  facon dynamique, il existe une limite maximum afin qu'il n'utilise pas
  toute la memoire vive (RAM) disponible et vous laisse dans une  triste
  situation.  Par  defaut,  la  taille est de 4096 (c.a.d. 4MB) qui doit
  etre suffisant pour la plupart des besoins. Vous pouvez ecraser  cette
  taille  par  defaut  pour  une  plus grande ou une plus petite avec ce
  parametre de demarrage.
  Voyez le fichier linux/Documentation/ramdisk.txt pour une  description
  complete   des  nouveaux  parametres  de  demarrage,  et  comment  les
  utiliser. La facon dont ces parametres  peuvent  etre  positionnes  et
  stockes dans l'image du noyau via 'rdev' est aussi decrite.

  33..22..55..  LLee ppaarraammeettrree ``rraammddiisskk=='' ((oobbssoolleettee))

  NOTE  :  Ce parametre est obsolete, et ne doit pas etre utilise exepte
  sur les noyaux v1.3.47 et ceux plus anciens. Les  commandes  que  l'on
  peut utiliser pour les disques virtuels sont documentees ci-dessous.

  Ceci indique la taille en Kilo-Octets du disque virtuel (RAM disk) que
  vous pouvez eventuellement utiliser. Par exemple,  si  vous  souhaitez
  avoir  un  systeme de fichiers racine sur une disquette 1.44 Mo charge
  sur le disque virtuel, vous devrez utiliser :

  ______________________________________________________________________
          ramdisk=1440
  ______________________________________________________________________

  C'est un des parametres de  demarrage  qui  a  sa  valeur  par  defaut
  stockee  dans  l'image  du  noyau,  et qui peut etre aussi modifie par
  l'utilitaire rdev.

  33..22..66..  LLee ppaarraammeettrree ``nnooiinniittrrdd'' ((ddiissqquuee RRAAMM iinniittiiaall))

  La version v2.x  du noyau et les versions plus recentes  possedent  la
  caracteristique  de  pouvoir  avoir  le  systeme  de  fichiers  racine
  initialement sur un disque virtuel, et le noyau  execute  linuxrc  sur
  cette  image  memoire. Cette caracteristique est generalement utilisee
  pour permettre de  charger  des  modules  necessaires  au  montage  du
  systeme  de fichiers racine reel (par exemple : charger les modules du
  pilote SCSI stockes dans l'image du disque virtuel, et alors monter le
  systeme de fichiers racine reel sur un disque SCSI).

  Le  parametre  `noinitrd'  actuel  determine ce qui arrive aux donnees
  initrd apres que le noyau ait demarre. Lorsqu'il est indique, au  lieu
  de  se convertir en disque virtuel, il est accessible via /dev/initrd,
  et peut-etre lu juste avant que la RAM soit liberee pour  le  systeme.
  Pour  de  plus amples details sur l'utilisation du disque RAM initial,
  consultez linux/Documentation/initrd.txt.  De plus, les  versions  les
  plus  recentes  LILO  et  LOADLIN  doivent  contenir  des informations
  complementaires tres interessantes.

  33..33..  PPaarraammeettrreess ddee DDeemmaarrrraaggee rreellaattiiffss aa llaa GGeessttiioonn ddee llaa MMeemmooiirree..

  Les  parametres suivants modifient la facon dont linux detecte ou gere
  la memoire physique et virtuelle de votre systeme.

  33..33..11..  LLee ppaarraammeettrree ``mmeemm==''

  Ce parametre vise deux objectifs : L'objectif principal est d'indiquer
  la  quantite  de  memoire installee (ou une valeur plus petite si vous
  desirez limiter le quantite de  memoire  disponible  pour  linux).  Le
  second  ojectif  (tres  utilise)  est  de  specifier mem=nopentium qui
  indique au noyau de linux de ne pas utiliser les  caracteristiques  de
  la table de performance de pages de 4 MO (4MB page table performance).

  L'appel initial au BIOS defini dans la specification des  PC,  et  qui
  renvoie  la  taille  de  la  memoire  installee, a ete concu pour etre
  capable de donner des tailles memoire jusqu'a 64 Mo  (He  oui,  encore
  une   manque   de   prevoyance,   tout   comme  les  disques  de  1024
  cylindres...Pfffff). Linux utilise cet appel au BIOS au demarrage pour
  determiner  quelle  est la quantite de memoire installee. Si vous avez
  plus de 64 Mo de memoire  vive  installee,  vous  pouvez  utiliser  ce
  parametre de demarrage pour indiquer a Linux quelle est la quantite de
  memoire  dont  vous  disposez.  Voici  une  citation  de   Linus   sur
  l'utilisation du parametre `mem='.

  "Le  noyau  acceptera  tous  les  parametres  `mem=xx'  que  vous  lui
  donnerez, et s'il s'apercoit que vous  lui  avez  menti,  il  plantera
  lamentablement  tot  ou  tard. Le parametre indique la plus haute zone
  adressable, donc `mem=0x1000000' signifie  que  vous  avez  16  Mo  de
  memoire,  par  exemple.   Pour  une machine ayant 96 Mo de memoire, le
  parametre serait `mem=0x6000000'."

  NOTE NOTE NOTE: certaines machines peuvent utiliser le  sommet  de  la
  memoire pour le cache du BIOS ou quelque chose d'autre, c'est pourquoi
  il se peut que vous n'ayez pas vraiment la totalite de ces 96 Mo comme
  memoire  adressable.  Le  contraire  est aussi exact : certaines puces
  feront un plan de la memoire physique couverte par la zone  BIOS  dans
  la zone situee juste au dessus du sommet de la memoire, donc le sommet
  de la memoire peut etre actuellement 96Mo +  384ko  par  exemple.   Si
  vous  indiquez  a  LLiinnuuxx  qu'il  a plus de memoire qu'il doit en avoir
  actuellement, des choses plutot desagreables vous arriveront  :  peut-
  etre pas tout de suite, mais un jour surement.''

  Notez  que  cet  argument n'a pas besoin d'etre en hexadecimal, et que
  les suffixes `k' et `M'  (en  majuscule  ou  minuscule,  peu  importe)
  peuvent  etre  utilises  pour  indiquer  respectivement kilo-octets et
  Mega-octets (le `k' multiplie  par  10  votre  valeur  et  le  `M'  la
  multiplie  par 20).  La mise en garde exposee ci-dessus reste vraie en
  cela qu'une machine avec 96 Mo peut fonctionner avec  mem=97920k  mais
  echouer avec soit mem=98304k ou mem=96M.

  33..33..22..  LLee ppaarraammeettrree ``sswwaapp==''

  Il  permet  a  l'utilisateur  de  regler certains des parametres de la
  memoire virtuelle qui sont lies  aux  fichiers  d'echange  (swap)  sur
  disque.  Il accepte les huit parametres suivants :

  ______________________________________________________________________
          MAX_PAGE_AGE
          PAGE_ADVANCE
          PAGE_DECLINE
          PAGE_INITIAL_AGE
          AGE_CLUSTER_FRACT
          AGE_CLUSTER_MIN
          PAGEOUT_WEIGHT
          BUFFEROUT_WEIGHT
  ______________________________________________________________________

  Les  utilisateurs  avertis  pourront  jeter un coup d'oeuil au fichier
  linux/mm/swap.c et sur les donnees du repertoire /proc/sys/vm.

  33..33..33..  LLee ppaarraammeettrree ``bbuuffff==''

  Comme le parametre  `swap=',  il  permet  a  l'utilisateur  de  regler
  certains des parametres relatifs a la gestion des tampons memoire.  Il
  accepte les six parametres suivant :

  ______________________________________________________________________
          MAX_BUFF_AGE
          BUFF_ADVANCE
          BUFF_DECLINE
          BUFF_INITIAL_AGE
          BUFFEROUT_WEIGHT
          BUFFERMEM_GRACE
  ______________________________________________________________________

  Les utilisateurs avertis pourront jeter un  coup  d'oeuil  au  fichier
  linux/mm/swap.c et sur les donnees du repertoire /proc/sys/vm.

  33..44..  PPaarraammeettrreess ddee ddeemmaarrrraaggee ppoouurr lleess ssyysstteemmeess ddee ffiicchhiieerrss rraacciinnee NNFFSS

  Linux supporte des systemes comme les stations de travail sans disques
  a condition que leur systeme de  fichiers  racine  soit  de  type  NFS
  (Network  FileSystem  ou  Systeme de Fichiers Reseau).  Ces parametres
  sont utilises pour indiquer a la station exempte de disque sur  quelle
  machine  elle  doit  aller  chercher  son systeme.  Notez aussi que le
  parametre root=/dev/nfs est requis.  Des informations  detaillees  sur
  l'utilisation  d'un systeme de fichiers racine NFS sont contenues dans
  linux/Documentation/nfsroot.txt. Je vous conseille de lire ce fichier,
  car  ce  qui suit est juste un resume rapide extrait directement de ce
  document.

  33..44..11..  LLee ppaarraammeettrree ``nnffssrroooott==''

  Ce parametre indique au  noyau  quelle  machine,  quel  repertoire  et
  quelles  options  NFS  sont  utilisees  pour  son  systeme de fichiers
  racine.  La structure du parametre est la suivante :

  ______________________________________________________________________
          nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
  ______________________________________________________________________

  Si le parametre nfsroot n'est pas donne sur la ligne de  commande,  on
  utilisera  par  defaut  `/tftpboot/%'.  Les  autres  options  sont les
  suivantes :

  <server-ip> - Indique l'adresse IP du serveur NFS. Si ce  champ  n'est
  pas  indique, l'adresse par defaut determinee par la variable nfsaddrs
  (voir ci-dessous) est utilisee. Une des utilisations de  ce  parametre
  est par exemple l'utilisation de serveurs differents pour RARP et NFS.
  Generalement vous pouvez le laisser a blanc.

  <root-dir> - Nom du repertoire sur le serveur a  monter  en  tant  que
  racine.   Si il y a un caractere `%' dans la chaine, le caractere sera
  remplace par la representation ASCII de l'adresse IP du client.

  <nfs-options> - Options NFS standard. Toutes les options sont separees
  par  des  virgules.  Si le champ option n'est pas indique, les valeurs
  suivantes sont utilisees par defaut :

          port            = tel que donne par le demon portmap du serveur
          rsize           = 1024
          wsize           = 1024
          timeo           = 7
          retrans         = 3
          acregmin        = 3
          acregmax        = 60
          acdirmin        = 30
          acdirmax        = 60
          flags           = hard, nointr, noposix, cto, ac

  33..44..22..  LLee ppaarraammeettrree ``nnffssaaddddrrss==''

  Ce parametre de demarrage positionne les differentes adresses qui sont
  necessaires  a  la  communication sur le reseau. Si ce parametre n'est
  pas indique, le noyau essaie d'utiliser RARP et/ou BOOTP pour calculer
  ces parametres. La structure est la suivante :

  ______________________________________________________________________
          nfsaddrs=<my-ip>:<serv-ip>:<gw-ip>:<netmask>:<name>:<dev>:<auto>
  ______________________________________________________________________

  <my-ip>  -  Adresse IP du client. Si elle est vide, cette adresse sera
  determinee par RARP ou BOOTP. Le protocole utilise depend de ce qui  a
  ete  active  pendant  la  configuration  du  noyau et sur le parametre
  <auto>. Si ce parametre n'est pas vide, ni RARP, ni  BOOTP  ne  seront
  utilises.

  <serv-ip>  -  Adresse  IP  du  serveur  NFS.  Si RARP est utilise pour
  determiner l'adresse du client et que ce  parametre  N'EST  PAS  vide,
  seules  les  reponses  du  serveur  specifie  seront  acceptees.  Pour
  utiliser differents serveurs NFS et RARP, indiquez votre serveur  RARP
  ici  (ou  laissez  le  a blanc), et indiquez votre serveur NFS dans le
  parametre nfsroot (voir ci-dessus).  Si  cette  entree  est  a  blanc,
  l'adresse  utilisee  est celle du serveur qui repond a la requete RARP
  ou BOOTP.

  <gw-ip> - Adresse IP d'une passerelle (gateway) si le serveur est  sur
  un  sous-reseau different. Si cette entree est vide, aucune passerelle
  n'est utilisee et le serveur est suppose etre sur le reseau  local,  a
  moins qu'une valeur n'ait ete recue par BOOTP.

  <netmask>  -  Masque de reseau pour les interfaces de reseau local. Si
  ce parametre est vide, le masque de reseau est deduit de l'adresse  IP
  du client, a moins qu'une valeur n'ait ete recue par BOOTP.

  <name>  -  Nom  du  client. Si il est vide, l'adresse IP du client est
  utilisee en notation ASCII, sauf si une valeur a ete recue par  BOOTP.

  <dev>  -  Nom  du  peripherique reseau a utiliser. Si le parametre est
  vide, tous les peripheriques sont utilises pour les requetes RARP,  et
  le  premier  trouve  pour BOOTP. Pour NFS, le peripherique utilise est
  celui pour lequel on a recu une reponse  a  RARP  ou  BOOTP.  Si  vous
  n'avez  qu'un peripherique, vous pouvez sans aucun risque le laisser a
  blanc.

  <auto> - Methode a utiliser pour  l'autoconfiguration.  Si  `rarp'  ou
  `bootp'  sont  indiques,  le  protocole  specifie  est utilise.  Si la
  valeur est `both' ou vide,  les  deux  protocoles  seront  utilises  a
  condition  qu'ils  aient ete actives durant la configuration du noyau.
  Utiliser 'none' signifie pas d'autoconfiguration; Dans  ce  cas,  vous
  devez   indiquer  toutes  les  valeurs  necessaires  dans  les  champs
  precedents.

  Le parametre <auto> peut apparaitre seul  comme  valeur  du  parametre
  nfsaddrs   (sans   tous  les  caracteres  `:'  avant).  Dans  ce  cas,
  l'autoconfiguration est utilisee. Toutefois, la  valeur  `none'  n'est
  pas disponible dans ce cas.

  33..55..  DD''aauuttrreess ppaarraammeettrreess ddee ddeemmaarrrraaggee ddiivveerrss

  Ces  differents  parametres de demarrage permettent a l'utilisateur de
  gerer certains parametres internes du noyau.

  33..55..11..  LLee ppaarraammeettrree ``ddeebbuugg''

  Le noyau envoie  des  messages  importants  (et  moins  importants)  a
  l'operateur  via  la  fonction  printk().  Si le message est considere
  comme important, la fonction printk() envoie une copie sur la  console
  active, mais le transmet aussi a la fonction klogd() qui l'archive sur
  le disque. La raison pour laquelle le message est envoye a la  console
  et  archive  sur  disque,  est  simple  : dans certaines circonstances
  malheureuses (par exemple une defaillance du  disque)  le  message  ne
  serait pas ecrit sur le disque et serait perdu.

  Le  seuil a partir duquel un message est considere comme important, ou
  ne l'est pas, est determine par  la  variable  console_loglevel.   Par
  defaut,  l'affichage  sur  la  console  est declenche pour tout ce qui
  depasse le DEBUG (niveau 7). Ces niveaux sont definis dans le  fichier
  include  kernel.h.  Le  fait de specifier comme parametre de demarrage
  debug forcera le niveau de suivi a 10, de facon que _t_o_u_s les  messages
  du noyau apparaissent sur la console.

  Le  niveau  de  suivi de la console peut aussi etre positionne pendant
  l'utilisation via une option du programme klogd().  Consultez la  page
  du manuel correspondant a la version installee sur votre systeme, pour
  voir comment utiliser ce programme.

  33..55..22..  LLee ppaarraammeettrree ``iinniitt==''

  Par defaut, le noyau lance le programme `init' au demarrage, qui prend
  alors soin de configurer l'ordinateur pour les utilisateurs en lancant
  les programmes getty, les scripts `rc' et tout  le  reste.   Le  noyau
  recherche  d'abord  /sbin/init,  ensuite /etc/init (secondaire), et en
  dernier  recours,  il  essaiera  d'utiliser  /bin/sh   (eventuellement
  /etc/rc).   Si  par exemple, votre programme init est corrompu et donc
  stoppe vous serez en mesure de demarrer, en utilisant le parametre  de
  demarrage init=/bin/sh qui vous positionnera directement dans un shell
  au demarrage, vous permettant de remplacer les programmes corrompus.

  33..55..33..  LLee PPaarraammeettrree ``nnoo338877''

  Certains coprocesseurs i387 ont des bogues qui apparaissent lorsqu'ils
  sont  utilises  en  mode protege 32 bits. Par exemple, certaines puces
  ULSI-387 recentes, provoquent  un  blocage  irreversible  lorsqu'elles
  font  des  calculs  un virgule flottante, apparemment du a un bug dans
  les  instructions  FRSAV/FRRESTOR.  L'utilisation  du   parametre   de
  demarrage  `no387'  fait  ignorer a LLiinnuuxx le coprocesseur mathematique
  s'il y en a un. Bien sur, votre noyau doit alors obligatoirement  etre
  compile  avec  l'option d'emulation du coprocesseur !  Cela peut aussi
  etre interessant si vous possedez une de ces _t_r_e_s vielles machines 386
  qui peuvent utiliser une FPU 80287, alors que LLiinnuuxx ne peut pas.

  33..55..44..  LLee PPaarraammeettrree ``nnoo--hhlltt''

  La famille des processeurs i386 (et les suivantes) ont une instruction
  `htl' qui indique au processeur que rien ne va se produire jusqu'a  ce
  qu'un  peripherique  externe (clavier, modem, disque, etc.) demande au
  processeur d'accomplir une tache. Ceci  permet  au  processeur  de  se
  mettre  dans  un  mode `low-power' (economie d'energie) dans lequel il
  reste a l'etat de zombi  jusqu'a  ce  qu'un  peripherique  externe  le
  reveille   (generalement   via   une  interruption).  Certaines  puces
  i486DX-100 recentes ont un probleme avec l'instruction `htl'  qui  est
  le  suivant  :  elles ne peuvent pas retourner en mode operationnel de
  facon  fiable  apres  que  cette   instruction   ait   ete   utilisee.
  L'utilisation  de l'instruction `no-hlt' indique a LLiinnuuxx de simplement
  executer une boucle infinie quand il n'y a rien d'autre a faire, et de
  _n_e _p_a_s  arreter votre processeur quand il n'y a aucune activitee. Ceci
  permet aux personnes qui utilisent ces puces  defectueuses  d'utiliser
  LLiinnuuxx,  bien  qu'ils doivent etre informes du fait que le remplacement
  dans le cadre de la garantie est possible.

  33..55..55..  LLee ppaarraammeettrree ``nnoo--ssccrroollll''

  L'utilisation de ce parametre au  demarrage  desactive  le  defilement
  d'ecran  (scrolling) qui rend difficile l'emploi de terminaux Braille.

  33..55..66..  LLee ppaarraammeettrree ``ppaanniicc==''

  Dans le cas tres desagreable d'une alerte  du  noyau  (kernel  panic),
  c'est  a  dire  une erreur interne qui a ete detectee par le noyau, et
  pour laquelle il a decide qu'elle etait suffisamment grave pour  raler
  bruyamment  et  tout  arreter  ;  le  comportement par defaut est d'en
  rester la  jusqu'a  ce  que  quelqu'un  se  penche  sur  le  probleme,
  visualise  le message sur l'ecran et redemarre la machine.  Cependant,
  si une machine fonctionne sans surveillance dans  un  local  isole  il
  peut-etre  souhaitable qu'il redemarre de lui-meme afin que la machine
  revienne  en  ligne.  Par  exemple,  l'utilisation  de  `panic=30'  au
  demarrage  forcera  le noyau a essayer de redemarrer 30 secondes apres
  que l'alerte du noyau se soit produite. Une valeur  a  zero  donne  le
  comportement  par defaut, qui est d'attendre eternellement.  Notez que
  cette  valeur  d'attente  peut  aussi  etre  lu  et  positionnee   via
  l'interface sysctl /proc/sys/kernel/panic.

  33..55..77..  LLee ppaarraammeettrree ``pprrooffiillee==''

  Les  developpeurs  du noyau peuvent activer une option qui leur permet
  de suivre comment et ou le noyau consomme ses cycles CPU, dans le  but
  d'augmenter  ses  capacites  et  ses  performances.  Cette option vous
  permet de positionner cet indicateur de suivi au moment du  demarrage.
  Generalement  il  est  positionne  a  deux. Vous pouvez aussi compiler
  votre noyau avec l'option de suivi par defaut. Dans tous les  cas,  il
  vous  faudra  un outil comme readprofile.c afin d'utiliser les donnees
  fournies par /proc/profile.

  33..55..88..  LLee ppaarraammeettrree ``rreebboooott==''

  Cette option controle le type de redemarrage que  Linux  fera  lorsque
  vous  ferez  une  remise  a zero de votre ordinateur (generalement via
  /sbin/init en faisant un Ctrl-Alt-Suppr).  Le comportement par  defaut
  des derniers noyaux v2.0 est de faire un redemarrage `a froid' (c.a.d.
  remise a zero complete, le BIOS comtrole la  memoire,  etc.)  au  lieu
  d'un  redemarrage `a chaud' (c.a.d pas de remise a zero totale, pas de
  controle de la memoire).  Il a ete  modifie  pour  prendre  la  valeur
  froid  par defaut depuis que cela semble fonctionner sur des materiels
  bon marche ou endommages qui ne  voulaient  pas  redemarrer  lorsqu'un
  redemarrage a chaud etait requis. Pour retrouver l'ancien comportement
  (c.a.d redemarrage a chaud) utilisez reboot=w en fait  n'importe  quel
  mot commancant par w fonctionnera.

  Pourquoi  cela pourrait-il vous ennuyer ? Certains disques incluant de
  la memoire cache peuvent detecter un redemarrage a  chaud,  et  ecrire
  les  donnees du cache sur le disque. Lors d'un redemarrage a froid, la
  carte peut-etre remise a zero, et les donnees stockees dans la memoire
  cache  seront perdues. D'autres ont signale que des systemes prenaient
  beaucoup de temps pour verifier la memoire, et/ou des  BIOS  SCSI  qui
  etaient  tres  long  a  s'initialiser  lors d'un demarrage a froid, et
  c'est  par  consequent  une  excellente  raison   pour   utiliser   le
  redemarrage a chaud.

  33..55..99..  LLee ppaarraammeettrree ``rreesseerrvvee==''

  Ceci  est  utilise  pour  _p_r_o_t_e_g_e_r  les  zones  des  ports  d'I/O  des
  programmes de test.  La syntaxe de la commande est la suivante :

       reserve=iobase,extent,iobase,extent...

  Sur certaines machines, il peut-etre necessaire d'empecher les pilotes
  de peripheriques de controler les peripheriques a une certaine adresse
  (auto-test). Ceci peut-etre necessaire pour du materiel mal concu  qui
  peut  provoquer  un _b_l_o_q_u_a_g_e au demarrage (comme par exemple certaines
  cartes reseaux ethernet), du materiel mal reconnu,  du  materiel  dont
  l'etat  a  ete modifie par un test recent, ou encore si vous ne voulez
  pas que le noyau initialise certains materiels.

  Le  parametre  de  demarrage  reserve  s'attaque  a  ce  probleme   en
  specifiant  une  zone  d'un  port  d'entree/sortie  qui n'a pas besoin
  d'etre testee. Cette zone est "reservee" (verrouillee) dans  la  table
  d'enregistrement  des  ports  du  noyau comme si un peripherique avait
  deja ete trouve dans cette zone (avec le nom reserved).  Notons que ce
  mecanisme  n'est  pas  necessaire sur la plupart des machines.  Il est
  indispensable d'utiliser ce parametre uniquement en cas de probleme ou
  dans certains cas particuliers.
  Les  ports d'entree/sortie dans la zone specifiee sont proteges contre
  les controles de peripheriques qui font un check_region() au  lieu  de
  tester  aveuglement  une  region d'entree/sortie. Ceci a ete introduit
  pour etre utilise lorsqu'un pilote plante, avec la NE2000 par exemple,
  ou  identifie de facon incorrecte un autre peripherique comme etant le
  sien.  Un pilote de peripherique correct ne doit pas tester  une  zone
  reservee,  a  moins  qu'un  autre  parametre  de demarrage lui demande
  explicitement de le faire. Ceci implique que le parametre reserve doit
  etre le plus souvent utilise avec un autre parametre de demarrage. Par
  consequent si vous specifiez une  region  reserve  pour  preserver  un
  peripherique  particulier,  vous  devrez en general aussi specifier de
  facon explicite un test pour ce peripherique. La plupart  des  pilotes
  ignorent  la  table  d'enregistrement  des  ports si on leur donne une
  adresse specifique.

  Par exemple, la ligne de demarrage

  ______________________________________________________________________
          reserve=0x300,32  blah=0x300
  ______________________________________________________________________

  laisse tous les pilotes  de  peripheriques,  excepte  le  pilote  pour
  `blah', tester 0x300-0x31f.

  Comme  d'habitude  avec  les  parametres  de  demarrage, il existe une
  limite a 11 parametres, c'est pourquoi vous ne pouvez indiquer  que  5
  zones  protegees par mot cle reserve. Plusieurs ordres reserve peuvent
  etre utilises si vous avez une requete vraiment tres complexe.

  33..55..1100..  LLee ppaarraammeettrree ``vvggaa==''

  Notez que ce n'est pas vraiment un parametre de demarrage.  C'est  une
  option  interpretee par LILO et non pas par le kernel, contrairement a
  tous les autres arguments. Pourtant, son utilisation  est  devenue  si
  commune  qu'une  mention  lui  est  reservee  ici.  Il peut aussi etre
  positionne grace a rdev -v ou par  equivalence  avec  vidmode  sur  le
  fichier  vmlinuz. Cela permet au programme de configuration d'utiliser
  le BIOS video pour changer  le  mode  d'ecran  par  defaut,  avant  le
  demarrage  du  noyau  de Linux. Les modes courants sont 80x50, 132x44,
  etc. Le meilleur moyen d'utiliser cette option est  de  demarrer  avec
  vga=ask,  qui vous demandera a l'aide d'une liste des differents modes
  que vous pourrez utiliser avec votre carte video, avant de demarrer le
  noyau.  Une  fois  que  vous  avez le nombre que vous voulez utiliser,
  provenant de la liste ci-dessus, vous pouvez, plus tard, le  placer  a
  la  place  de  'ask'.  Pour  plus  d'informations, veuillez, s'il vous
  plait, regarder le  fichier  linuxDocumentation/svga.txt/  qui  existe
  depuis  les dernieres versions du noyau.  Notez que les noyaux recents
  (version 2.1 et superieures) ont leur programme de  configuration  qui
  permettent  de  changer  le  mode  video,  sous la forme d'une option,
  listee comme un  _S_u_p_p_o_r_t  _d_e  _s_e_l_e_c_t_i_o_n  _d_e  _m_o_d_e  _v_i_d_e_o  (_V_i_d_e_o  _m_o_d_e
  _s_e_l_e_c_t_i_o_n  _s_u_p_p_o_r_t), donc vous devez selectionner cette option si vous
  voulez cette  caracteristique.

  44..  PPaarraammeettrreess ddee ddeemmaarrrraaggee ppoouurr lleess PPeerriipphheerriiqquueess SSCCSSII

  Cette section contient une description des parametres de demarrage qui
  sont  utilises pour passer des informations concernant les adaptateurs
  hotes et les peripheriques SCSI.
  44..11..  PPaarraammeettrreess ppoouurr lleess ppiillootteess ddee nniivveeaauu iinntteerrmmeeddiiaaiirree

  Les pilotes de niveau intermediaire  prennent  en  charge  des  choses
  comme  le  disques,  les  CD-Roms  et  les  bandes sans s'attacher aux
  specificitees de chaque peripheriques.

  44..22..  NNoommbbrree mmaaxxiimmuumm ddee LLUUNN ccoonnttrroolleess ((``mmaaxx__ssccssii__lluunnss==''))

  Chaque peripherique SCSI peut avoir un nombre de  `sous-peripheriques'
  qui  le  composent.  L'exemple  le plus courant est represente par les
  nouveaux CD-ROM SCSI qui utilisent plus d'un disque a la fois grace  a
  un  chargeur  de  CD.  Chaque CD est adressable comme un `Logical Unit
  Number' (LUN = Numero d'Unite Logique) de  ce  peripherique  multiple.
  Mais la plupart des peripheriques comme les disques durs, les lecteurs
  de bandes et  autres,  sont  des  peripheriques  simples  et  on  leur
  attribue le LUN zero.

  Le  probleme  survient avec les peripheriques a un seul LUN qui ont un
  mauvais  microprogramme.  Certains  peripheriques  SCSI   mal   concus
  (anciens  et  malheureurement nouveaux aussi) ne supportent pas d'etre
  testes pour des LUN differents de zero. Ils repondent en se  bloquant,
  et peuvent aussi verrouiller tout le bus SCSI en meme temps.

  Les  nouveaux  noyaux  ont une option de configuration qui vous permet
  d'indiquer le nombre maximum de LUN  a  tester.  Par  defaut,  ils  ne
  testent que le LUN zero, pour eviter le probleme decrit ci-dessus.

  Pour  specifier  le  nombre de LUN a tester au moment du demarrage, il
  suffit d'entrer le parametre de demarrage `max_scsi_luns=n', ou n  est
  un  nombre compris entre un et huit. Pour eviter les problemes decrits
  precedemment, on peut  utiliser  n=1  pour  eviter  de  perturber  les
  peripheriques defectueux.

  44..33..  PPaarraammeettrreess ppoouurr lleess LLeecctteeuurrss ddee BBaannddeess SSCCSSII ((``sstt==''))

  Certaines  configurations de demarrage pour les lecteurs de bande SCSI
  peuvent etre obtenues en utilisant ce qui suit :

  ______________________________________________________________________
          st=buf_size[,write_threshold[,max_bufs]]
  ______________________________________________________________________

  Les deux premiers nombres sont donnes en kilo-octets.  La  valeur  par
  defaut  du  buf_size  est  32  ko,  et la taille maximum qui peut etre
  donnee est la valeur ridicule de 16384 ko.   La  zone  write_threshold
  est  la valeur a laquelle le tampon est envoye vers la bande, avec une
  valeur par defaut de 30ko.  Le nombre  maximum  de  tampons  varie  en
  fonction  du  nombre  de lecteurs detectes, et a une valeur par defaut
  egale a deux. Voici un exemple d'utilisationnbsp;:

  ______________________________________________________________________
          st=32,30,2
  ______________________________________________________________________

  Des indications plus precises peuvent etre trouvees  dans  le  fichier
  README.st  qui  est  dans  le  repertoire  scsi  de l'arborescence des
  sources du noyau.

  44..44..  PPaarraammeettrreess ppoouurr lleess aaddaappttaatteeuurrss SSCCSSII

  Notations utilisees dans cette section :

  iobase  Le premier port d'Entree/Sortie que le  serveur  SCSI  occupe.
  Ceux-ci  sont  donnes  en  notation hexadecimale, et sont generalement
  situes dans la fourchette 0x200 a 0x3ff.

  irq   L'interruption  materielle  pour  laquelle  la   carte   a   ete
  configuree. Les valeurs autorisees dependront de la carte en question,
  mais seront generalement 5, 7, 9,  10,  11,  12,  et  15.  Les  autres
  valeurs  etant  generalement utilisees pour les peripheriques courants
  comme les disques durs IDE, les  lecteurs  de  disquettes,  les  ports
  serie, etc.

  dma   Le  canal DMA (Direct Memory Access - Acces Direct a la Memoire)
  Generalement applique aux cartes de pilotage du bus. Les cartes PCI et
  VLB  pilotent  directement  le bus, et ne necessitent pas de canal DMA
  ISA.

  scsi-id  L'identifiant que la carte-serveur utilise pour  s'identifier
  elle-meme  sur  le  bus SCSI. Un certain nombre de cartes serveur vous
  permettront de modifier cette valeur, alors  que  d'autres  ont  cette
  valeur  stockee de facon definitive sur la carte. La valeur par defaut
  la plus courante est sept, mais les cartes Seagate  et  Future  Domain
  TMC-950 par exemple utilisent la valeur six.

  parity    Determine  si  la  carte  serveur  SCSI  doit  demander  aux
  peripheriques connectes de fournir une valeur de parite avec tous  les
  echanges  d'informations.  La  valeur  1  indique  que la detection de
  parite est activee, et la valeur 0 desactive le  controle  de  parite.
  Encore  une  fois, toutes les cartes ne supportent pas la selection du
  controle de parite par les parametres de demarrage.

  44..44..11..   AAddaapptteecc  aahhaa115511xx,,  aahhaa115522xx,,   aaiicc66226600,,   aaiicc66336600,,   SSBB1166--SSCCSSII
  ((``aahhaa115522xx==''))

  Les valeurs aha font reference a des cartes et les  valeurs  aic  font
  reference  aux puces SCSI actuelles de ce type de cartes, y compris la
  Soundblaster-16 SCSI.

  Le code de test de ces serveurs SCSI recherche  s'il  existe  un  BIOS
  installe,  et  s'il  n'est  pas present, le test ne trouvera pas votre
  carte. Vous aurez alors a utiliser le parametre de demarrage  avec  la
  syntaxe suivante :

  ______________________________________________________________________
           aha152x=iobase[,irq[,scsi-id[,reconnect[,parity]]]]
  ______________________________________________________________________

  Notez  que  si  le  pilote  a  ete  compile avec l'option de recherche
  d'erreur activee, une sixieme valeur peut etre specifiee pour fixer le
  niveau de recherche d'erreur.

  Tous  les  parametres  sont  decrits  au debut de cette section, et la
  valeur reconnect permet au peripherique de se  deconnecter/reconnecter
  si  une  valeur  differente  de  zero  est utilisee.  Voici un exemple
  d'utilisation :

  ______________________________________________________________________
          aha152x=0x340,11,7,1
  ______________________________________________________________________

  Notez que les parametres doivent etre  donnes  dans  l'ordre,  ce  qui
  signifie  que  si  vous desirez specifier une configuration de parite,
  vous devrez alors indiquer les valeurs  de  iobase,  irq,  scsi-id  et
  reconnect aussi.

  44..44..22..  AAddaapptteecc aahhaa115544xx ((``aahhaa11554422==''))

  Ce  sont  les gammes de cartes aha154x. Les differentes cartes aha1542
  ont un controleur de disquette  i82077  en  interne,  tandis  que  les
  cartes  de  la  serie  aha1540  n'en  ont  pas.  Ce  sont des cartes a
  "busmastering", (controle de bus) et  elles  ont  des  parametres  qui
  permettent  d'indiquer  le  niveau  ``d'equite''  qui est utilise pour
  partager le  bus  avec  les  autres  peripheriques.  Le  parametre  de
  demarrage ressemble a ce qui suit.

  ______________________________________________________________________
          aha1542=iobase[,buson,busoff[,dmaspeed]]
  ______________________________________________________________________

  Les  valeurs  couramment  utilisees  pour  iobase sont les suivantes :
  0x130, 0x134, 0x230,  0x234,  0x330,  0x334.   Des  clones  de  cartes
  peuvent autoriser d'autres valeurs.

  Les valeurs buson, busoff indiquent le nombre de microsecondes pendant
  lesquelles la carte est prioritaire sur le bus ISA.  Les  valeurs  par
  defaut  sont  11 us prioritaire, et 4 us non prioritaire, de facon que
  d'autres cartes (comme une carte Ethernet ISA LANCE) aient une  chance
  d'avoir acces au bus ISA.

  La  valeur  dmaspeed  fait reference a la vitesse (en Mo/s) a laquelle
  s'effectue le transfert DMA (Direct Memory  Access,  Memoire  a  Acces
  Direct).  La  valeur  par defaut est 5 Mo/s. Les nouvelles versions de
  ces cartes vous permettent  de  selectionner  cette  valeur  de  facon
  logicielle  alors  que  les  anciennes cartes utilisait des cavaliers.
  Vous pouvez utiliser des valeurs allant jusqu'a 10 Mo/s  en  supposant
  que  votre  carte  mere  soit  capable  de les supporter. Experimentez
  prudemment si vous utilisez des valeurs superieures a 5 Mo/s.

  44..44..33..  AAddaapptteecc aahhaa227744xx,, aahhaa228844xx,, aaiicc77xxxxxx ((``aaiicc77xxxxxx==''))

  Ces cartes peuvent recevoir un parametre selon la syntaxe suivante :

  ______________________________________________________________________
          aic7xxx=extended,no_reset
  ______________________________________________________________________

  La valeur de extended, si elle est differente de zero, indique que  la
  traduction  etendue  pour  les disques de grande capacite est activee.
  La valeur no_reset, si elle est differente de zero, indique au  pilote
  de  ne  pas  reinitialiser  le  bus SCSI lorsqu'il configure la carte-
  serveur au demarrage.

  44..44..44..  AAddaappttaatteeuurrss SSCCSSII AAddvvaannSSyyss ((``aaddvvaannssyyss==''))

  Le pilote AdvanSys peut  accepter  jusqu'a  quatre  adresses  I/O  qui
  seront testees pour une carte SCSI AdvanSys. Notez que ces valeurs (si
  elles sont utilisees) n'auront en aucun cas d'effet sur les tests EISA
  ou  PCI.  Elles sont seulement utilisees pour tester les cartes ISA et
  VLB.  De plus, si le pilote a ete compile avec  l'option  de  debogage
  activee,  le  niveau  de  detail  des  informations  renvoyees  par le
  debogage peut etre indique en ajoutant un parametre 0xdeb[0-f]. Le 0-f
  permet de faire afficher les 16 niveaux de messages de debogage.

  44..44..55..  AAddaappttaatteeuurr AAllwwaayyss IINN22000000 ((``iinn22000000==''))

  Contrairement  aux  autres  parametres  de demarrage, le pilote IN2000
  utilise des prefixes de type chaine  ASCII  pour  la  plupart  de  ses
  parametres entiers; Voici la liste des parametres acceptes :

  ioport:addr

  -  Ou  addr  est  l'adresse  IO d'une carte (generalement sans memoire
  morte 'ROM').

  noreset

  - Pas de parametres optionnels. Evite la remise a zero du bus SCSI  au
  moment du demarrage.

  nosync:x

  -  x  est  un  masque  d'octets  (bitmask)  ou  les  7  premiers  bits
  correspondent aux 7  peripheriques  SCSI  possibles  (bit  0  pour  le
  peripherique   #0,   etc).   Positionnez  un  bit  pour  PREVENIR  une
  negociation de synchronisation sur ce peripherique.  Par  defaut  sync
  est DESACTIVE sur tous les peripheriques.

  period:ns

  -  ns  est la duree minimum en nanosecondes d'une periode de transfert
  de donnees en SCSI. La valeur par defaut est 500; les valeurs  doivent
  etre comprises entre 250 et 1000.

  disconnect:x

  - x = 0 pour ne jamais autoriser les deconnexions, 2 pour toujours les
  autoriser. x = 1 fait des deconnexions 'selon le besoin', ce  qui  est
  la valeur par defaut et generalement le meilleur choix.

  debug:x  -  Si `DEBUGGING_ON' est positionne, x est un masque d'octets
  qui provoque differents types de sorties  de  debogage  pour  imprimer
  (voyez le DB_xxx definis dans in2000.h).

  proc:x  - Si `PROC_INTERFACE' est defini, x est un masque d'octets qui
  indique comment fontionne l'interface /proc et ce qu'elle  fait  (voir
  la definition de PR_xxx dans in2000.h

  Quelques exemples d'utilisation sont listes ci-dessous :

  ______________________________________________________________________
          in2000=ioport:0x220,noreset
          in2000=period:250,disconnect:2,nosync:0x03
          in2000=debug:0x1e
          in2000=proc:3
  ______________________________________________________________________

  44..44..66..  MMaatteerriieell bbaassee ssuurr uunn AAMMDD AAMM5533CC997744 ((``AAMM5533CC997744==''))

  Contrairement aux autres pilotes, celui-ci n'utilise pas de parametres
  de demarrage pour indiquer les E/S, les IRQ ou les DMA (depuis que  le
  AM53C974  est un peripherique PCI, il n'a pas besoin de la faire).  En
  revanche, les parametres sont utilises pour communiquer les  modes  de
  transfert  et  les vitesses qui doivent etre utilises entre le serveur
  (host) et le peripherique cible. Utilisons un exemple pour y voir plus
  clair :

  ______________________________________________________________________
          AM53C974=7,2,8,15
  ______________________________________________________________________

  Ceci peut etre interprete de la maniere suivante :

  `Pour  communiquer  entre  le controleur d'identifiant SCSI-ID 7 et le
  peripherique d'identifiant SCSI-ID 2, un taux de transfert de 8 MHz en
  mode  synchrone,  avec  un  decalage  maximum  de  15 octets doit etre
  negocie.' De plus amples details peuvent etre trouves dans le  fichier
  linux/drivers/scsi/README.AM53C974

  44..44..77..  LLeess sseerrvveeuurrss SSCCSSII BBuussLLooggiicc aavveecc lleess nnooyyaauuxx vv11..22 ((``bbuussllooggiicc==''))

  Dans les anciens noyaux, les pilotes buslogic n'acceptent  qu'un  seul
  parametre, qui est l'adresse d'entree/sortie. Elle doit correspondre a
  l'une des valeurs suivantes :

  0x130, 0x134, 0x230, 0x234, 0x330, 0x334.

  44..44..88..  LLeess sseerrvveeuurrss SSCCSSII BBuussLLooggiicc aavveess lleess nnooyyaauuxx vv22..xx ((``BBuussLLooggiicc==''))

  Avec   les  noyaux  v2.x,  le  pilote  BusLogic  accepte  de  nombreux
  parametres (notez la casse ci dessus ; B  et  L  majuscule  !!!).   La
  description  detaillee  qui suit est extraite directement du pilote de
  Leonard N. Zubkoff inclus dans le noyau v2.0 .

  Pour le pilote BusLogic, une  ligne  de  commande  destinee  au  noyau
  comprend  l'identifiant du pilote "BusLogic=" eventuellement suivi par
  une serie d'entiers separes par des virgules,  et  accessoirement  par
  une  suite de chaines aussi separees par des virgules. Chaque ligne de
  commande s'applique a un adaptateur BusLogic. Des lignes  de  commande
  multiples  peuvent etre utilisees sur des systemes utilisant plusieurs
  cartes BusLogic.

  Le premier entier indique est l'adresse d'Entree/Sortie (I/O  Address)
  a  laquelle  l'adaptateur  est situe. Si il n'est pas specifie, il est
  positionne a zero, ce qui indique d'appliquer cette ligne de  commande
  au   premier  adaptateur  BusLogic  trouve  lors  de  la  sequence  de
  detection. Si une adresse I/O est fournie sur la ligne de commande, la
  sequence de detection est ignoree.

  Le  second  entier  fourni  est  la  profondeur de la 'Tagged Queue' a
  utiliser pour  les  peripheriques  cibles  qui  utilisent  le  'Tagged
  Queuing'.  La  profondeur  de  cette  file  correspond  au  nombre  de
  commandes SCSI qui  peuvent  etre  envoyees  simultanement  pour  etre
  executees.  Si  rien  n'est indique, la valeur par defaut est zero, et
  indique d'utiliser une valeur determinee automatiquement  en  fonction
  du  'Total Queue Depth' de l'adaptateur, ainsi que du nombre, du type,
  de la vitesse des peripheriques cible detectes.  Pour les  adaptateurs
  qui  requierent  des 'ISA Bounce Buffers', le 'Tagged Queue Depth' est
  automatiquement  positionne  a   'BusLogic_TaggedQueueDepth_BB'   pour
  eviter une preallocation excessive de memoire 'DMA Bounce Buffer'. Les
  peripheriques  cibles  qui  ne  supportent  pas  le  'Tagged  Queuing'
  utilisent      une     'Queue     Depth'     ayant     pour     valeur
  'BusLogic_UntaggedQueueDepth'.

  Le troisieme entier est le 'Bus Settle Time' (temps  de  stabilisation
  du bus) en secondes. C'est le temps a attendre entre une remise a zero
  physique de l'adaptateur, qui initialise une  remise  a  zero  du  bus
  SCSI,  et  le  moment  ou  l'on peut passer une commande SCSI. Si rien
  n'est indique, il est a zero par defaut, ce qui indique d'utiliser  la
  valeur BusLogic_DefaultBusSettleTime.

  Le  quatrieme  entier  correspond  aux  options locales. Si rien n'est
  indique, la valeur par defaut est 0. Notez  que  ces  options  locales
  sont uniquement utilisees sur un adaptateur hote specifique.

  Le  cinquieme  entier  correspond  aux options globales. Si rien n'est
  indique, le valeur par defaut est 0. Notez que  les  options  globales
  sont appliquees a tous les adaptateurs hotes.

  Les  chaines  d'options  sont  utilisees  pour  controler  le  'Tagged
  Queuing', le recouvrement d'erreur, et le test de l'adaptateur hote.

  Les indications pour le  'Tagged  Queuing'  commencent  par  "TQ:"  et
  permettent d'indiquer precisemment ou le 'Tagged Queuing' est autorise
  sur les peripheriques cibles qui  le  supportent.  Les  specifications
  suivantes sont disponibles :

  TQ:Default

  -  Le  'Tagged Queuing' sera permis, base sur la version de micro-code
  de l'adaptateur hote BusLogic et conditionne par la valeur de  'Tagged
  Queue Depth' qui doit permettre la mise en file d'attente de multiples
  commandes.

  TQ:Enable

  - Le 'Tagged Queuing' est active pour tous les  peripheriques  de  cet
  adaptateur  hote,  outrepassant  toutes  les  limitations qui seraient
  imposees par la version de micro-code de cet adaptateur.

  TQ:Disable

  - Le 'Tagged Queuing'  sera  desactive  pour  tous  les  peripheriques
  relies a cet adaptateur hote.

  TQ:<Per-Target-Spec>

  -  Le  'Tagged  Queuing'  sera  controle  individuellement pour chaque
  peripherique cible. <Per-Target-Spec> est une sequence  de  caracteres
  "Y",  "N",  et  "X".  "Y" active le 'Tagged Queuing', "N" desactive le
  'Tagged Queuing', et "X" correspond a la valeur par defaut  basee  sur
  la   version   du  micro-code.  Le  premier  caractere  correspond  au
  peripherique cible 0, le second au peripherique cible 1, et  ainsi  de
  suite  ;  Si  la sequence de caracteres "Y", "N", et "X" ne suffit pas
  pour  tous  les  peripheriques  cibles,  les  caracteres  non-indiques
  prendront la valeur "X".

  Notez que la demande explicite de 'Tagged Queuing' peut conduire a des
  problemes. Cette capacite est fournie principalement pour permettre de
  desactiver   le   'Tagged   Queuing'  sur  des  peripheriques  qui  ne
  l'utilisent pas correctement.

  Les indications de la Strategie de Recouvrement  d'Erreurs  commencent
  par "ER:" et permettent d'indiquer l'action de recouvrement d'erreur a
  effectuer quand la 'ResetCommand' est appellee en raison d'un incident
  sur  une  commande  SCSI,  de facon a finir correctement.  Les options
  suivantes sont disponibles :

  ER:Default

  - Le Recouvrement d'Erreur choisira entre la remise  a  zero  physique
  (Hard  Reset) et la remise a zero du bus des peripheriques (Bus Device
  Reset) selon les recommandations du sous systeme SCSI.

  ER:HardReset

  - Le Recouvrement d'Erreur demandera une remise  a  zero  physique  de
  l'adaptateur  hote,  ce  qui provoquera aussi une remise a zero du bus
  SCSI.

  ER:BusDeviceReset

  - Le recouvrement d'Erreur  enverra  un  message  'Bus  Device  Reset'
  (remise  a  zero  du  bus) individuellement au peripherique provoquant
  l'erreur. Si le Recouvrement d'Erreur est a  nouveau  appele  pour  ce
  peripherique,  et  qu'aucune  commande SCSI de ce peripherique n'a ete
  executee avec succes depuis le dernier message 'Bus  Device  Reset'  a
  ete envoye, alors une remise a zero physique est provoquee.

  ER:None

  -  Le Recouvrement d'Erreur sera supprime. Cette option peut seulement
  etre selectionnee si un 'SCSI Bus Reset'  ou  un  'Bus  Device  Reset'
  provoque  un  plantage  du  peripherique  cible  de  facon  totale  et
  irrecuperable.

  ER:<Per-Target-Spec>

  - Le Recouvrement d'Erreur sera controle individuellement pour  chaque
  peripherique.   <Per-Target-Spec>  est une sequence de caracteres "D",
  "H", "B", et "N". "D" correspond a 'Default', "H" a 'Hard Reset',  "B"
  a 'Bus Device Reset', et "N" a 'None'. Le premier caractere correspond
  au peripherique 0 , le second au peripherique 1, et ainsi de suite. Si
  la  sequence  de  caracteres  "D", "H", "B", et "N" ne suffit pas pour
  tous  les   peripheriques   possibles,   les   carracteres   manquants
  correspondront a "D".

  Les specifications de test de l'adaptateur hote sont les suivantes :

  NoProbe  -  Aucun  test  d'aucune  sorte  ne  doit  etre  fait, et par
  consequent, aucun adaptateur hote BusLogic ne sera detecte.

  NoProbeISA - Aucun test des adresses I/O standard ISA ne sera fait, et
  par consequent, seuls les adaptateurs hotes PCI seront detectes.

  NoSortPCI  -  Les  adaptateurs  hotes PCI seront enumeres dans l'ordre
  fourni par le BIOS PCI,  ignorant  tous  les  parametres  de  l'option
  "Utilisation  du # des bus et peripheriques pour la sequence d'analyse
  du bus PCI" de l'AutoSCSI.

  44..44..99..  LLeess ccaarrtteess SSCCSSII EEAATTAA ((``eeaattaa==''))

  Depuis la deja ancienne  version  v2.0  du  noyau,  les  pilotes  EATA
  acceptent un parametre de demarrage permettant d'indiquer les adresses
  d'entree/sortie qui doivent etre testees. Il est de la forme :

  ______________________________________________________________________
          eata=iobase1[,iobase2][,iobase3]...[,iobaseN]
  ______________________________________________________________________

  Le pilote testera les adresses dans l'ordre ou elles sont fournies.

  44..44..1100..  FFuuttuurree DDoommaaiinn TTMMCC--88xxxx,, TTMMCC--995500 ((``ttmmcc88xxxx==''))

  Le code de test pour ces hotes SCSI recherche  un  BIOS  installe,  et
  s'il  n'en  detecte aucun, le test ne trouvera pas votre carte.  Ou si
  la signature de votre BIOS  n'est  pas  reconnue,  elle  ne  sera  pas
  trouvee  non  plus. Dans ce cas, vous aurez a utiliser un parametre de
  demarrage de la forme :

  ______________________________________________________________________
          tmc8xx=mem_base,irq
  ______________________________________________________________________

  La valeur mem_base est l'adresse dans le plan  memoire  de  la  region
  d'entree/sortie  utilisee  par  la  carte.  C'est generalement une des
  valeurs suivantes :

  0xc8000, 0xca000, 0xcc000, 0xce000, 0xdc000, 0xde000.

  44..44..1111..  FFuuttuurree DDoommaaiinn TTMMCC--1166xxxx,, TTMMCC--33226600,, AAHHAA--22992200 ((``ffddoommaaiinn==''))

  Le  pilote  detecte ces cartes selon une liste connue de signatures de
  BIOS ROM. Pour obtenir une liste complete  des  revisions  connues  de
  BIOS,  voyez  le  fichier  linux/drivers/scsi/fdomain.c  qui  contient
  beaucoup d'informations en debut de fichier. Si votre BIOS  n'est  pas
  connu  du  pilote,  vous  pourrez  utiliser  un  forcage  de  la facon
  suivante :

  ______________________________________________________________________
          fdomain=iobase,irq[,scsi_id]
  ______________________________________________________________________

  44..44..1122..  LLee lleecctteeuurr ZZIIPP IIOOMMEEGGAA // PPoorrtt PPaarraalllleellee ((``ppppaa==''))

  Ce pilote est pour l'adaptateur SCSI de l'IOMEGA  Port  Parallele  qui
  est integre dans le lecteur IOMEGA ZIP. Il peut aussi fonctionner avec
  le peripherique d'origine IOMEGA PPA3. Le parametre de demarrage  pour
  ce pilote a la structure suivante :

  ______________________________________________________________________
          ppa=iobase,speed_high,speed_low,nybble
  ______________________________________________________________________

  ou  tous  les  parametres  sont  facultatifs,  sauf  'iobase'. Si vous
  souhaitez modifier un des trois elements, il serait  bon  de  lire  au
  prealable le document linux/drivers/scsi/README.ppa afin d'obtenir des
  details sur ces parametres.

  44..44..1133..  CCoonnttrroolleeuurrss uuttiilliissaanntt uunn NNCCRR55338800 ((``nnccrr55338800==''))

  Selon votre carte, le 5380 peut-etre  soit  'i/o  mapped'  ou  'memory
  mapped'  (repertorie  en entree/sortie ou repertorie en memoire).  Une
  adresse en dessous de 0x400 indique souvent l'i/o mapping,  cependant,
  les  materiels  PCI  et EISA utilisent des adresses d'entree/sortie au
  dessus de 0x3ff. Dans tous les cas, vous indiquez l'adresse, la valeur
  de  l'IRQ,  et  la valeur du canal DMA. Un exemple pour une carte 'i/o
  mapped' serait : ncr5380=0x350,5,3.  Si la  carte  n'utilise  pas  les
  interruptions,   une   valeur   d'IRQ   255   (0xff)  desactivera  les
  interruptions. Une IRQ  a  254  indiquera  d'activer  l'autotest.  Des
  details    supplementaires    sont    fournis    dans    le   document
  linux/drivers/scsi/README.g_NCR5380.

  44..44..1144..  CCoonnttrroolleeuurrss uuttiilliissaanntt uunn NNCCRR5533cc440000 ((``nnccrr5533cc440000==''))

  Le support du 53c400 est fait avec le meme pilote que  le  support  du
  5380  mentionne  ci-dessus. Le parametre de demarrage est identique au
  precedent, sauf qu'aucun canal DMA n'est utilise par le 53c400.

  44..44..1155..  CCoonnttrroolleeuurrss uuttiilliissaanntt uunn NNCCRR5533cc440066aa ((``nnccrr5533cc440066aa==''))

  Ce pilote utilise un parametre de demarrage de la forme suivante :

  ______________________________________________________________________
          ncr53c406a=PORTBASE,IRQ,FASTPIO
  ______________________________________________________________________

  ou   les  parametres  IRQ  et  FASTPIO  sont  optionnels.  Une  valeur
  d'interruption  a  zero  desactive  l'utilisation  des  interruptions.
  L'utilisation  d'une  valeur a 1 pour FASTPIO active l'utilisation des
  instructions insl et outsl au lieu des instructions mono-octet inb  et
  outb.  Le  pilote peut aussi utiliser le DMA comme une option utilisee
  lors de la compilation (compile-time option).

  44..44..1166..  PPrroo AAuuddiioo SSppeeccttrruumm ((``ppaass1166==''))

  La PAS16 utilise une  puce  NCR5380  SCSI,  et  les  nouveaux  modeles
  peuvent  etre  configures de facon logicielle. La syntaxe du parametre
  est la suivante :

  ______________________________________________________________________
          pas16=iobase,irq
  ______________________________________________________________________

  La seule difference est que vous pouvez  specifier  une  valeur  d'IRQ
  egale  a  255,  qui  indique au pilote de travailler sans utiliser les
  interruptions,  malheureusement  au  detriment  des  performances.  La
  valeur de iobase est generalement 0x388.

  44..55..  SSeeaaggaattee SSTT--00xx ((``sstt00xx==''))

  Le  code  du  programme  de  test  de  cet hote SCSI recherche un BIOS
  installe, et s'il n'y en a aucun de present, le test ne  trouvera  pas
  votre carte.  Ou si la signature de votre BIOS n'est pas reconnue elle
  ne sera pas trouvee non plus. Dans ce cas, vous aurez  a  utiliser  le
  parametre suivant :

  ______________________________________________________________________
          st0x=mem_base,irq
  ______________________________________________________________________

  La  valeur de mem_base est l'adresse dans le plan memoire de la region
  d'entree/sortie utilisee par la carte. En general, il s'agit d'une des
  valeurs  suivantes  :  0xc8000,  0xca000,  0xcc000,  0xce000, 0xdc000,
  0xde000.

  44..66..  TTrraannttoorr TT112288 ((``tt112288==''))

  Cette carte est aussi concue autour de la puce NCR5380, et accepte les
  options suivantes :

  ______________________________________________________________________
          t128=mem_base,irq
  ______________________________________________________________________

  Les  valeurs  autorisees  pour  mem_base sont les suivantes : 0xcc000,
  0xc8000, 0xdc000, 0xd8000.

  44..66..11..  CCaarrtteess SSCCSSII UUllttrraassttoorr ((``uu1144--3344ff==''))

  Notez que pour cette carte tout se presente  sous  la  forme  de  deux
  pilotes independants, nommes CONFIG_SCSI_U14_34F qui utilise u14-34f.c
  et CONFIG_SCSI_ULTRASTOR qui utilise ultrastor.c. C'est le u14-34f qui
  (jusqu'au  dernier noyau v2.0) accepte un parametre de demarrage de la
  forme :

  ______________________________________________________________________
          u14-34f=iobase1[,iobase2][,iobase3]...[,iobaseN]
  ______________________________________________________________________

  Le pilote autotestera les adresses  dans  l'ordre  dans  lequel  elles
  apparaissent.

  44..66..22..  CCaarrtteess WWeesstteerrnn DDiiggiittaall WWDD77000000 ((``wwdd77000000==''))

  Le test du pilote pour le wd7000 cherche une chaine connue de BIOS ROM
  et connait quelques reglages standards de  configuration.   Si  il  ne
  retrouve  pas les valeurs correctes pour votre carte, ou que vous avez
  une version de BIOS non reconnue, vous  pouvez  utiliser  le  prametre
  suivant :

  ______________________________________________________________________
          wd7000=irq,dma,iobase
  ______________________________________________________________________

  44..77..  CCaarrtteess nn''aacccceeppttaanntt ppaass lleess ppaarraammeettrreess ddee ddeemmaarrrraaggee

  Pour  l'instant,  les  cartes  SCSI  suivantes  n'utilisent  aucun des
  parametres de demarrage. Dans certains cas, vous pouvez "bricoler" les
  valeurs  en  editant  directement  le  pilote  lui-meme,  si  cela est
  necessaire bien sur.

          Adaptec aha1740 (autotest EISA),
          NCR53c7xx, 8xx (PCI, toutes les deux)
          Qlogic Fast (0x230, 0x330)
          Qlogic ISP (PCI)

  55..  DDiissqquuee DDuurrss

  Cette section fait la  liste  de  tous  les  parametres  de  demarrage
  associes  aux  lecteurs  de  disques standards MFM/RLL, ST-506, XT, et
  IDE.  Notez que les deux pilotes IDE et ST-506 HD  acceptent  l'option
  `hd='.

  55..11..  PPaarraammeettrreess ddeess lleecctteeuurrss ddee DDiissqquueess//CCDD--RROOMM IIDDEE

  Les pilotes IDE acceptent un certain nombre de parametres, qui vont de
  la definition des caracteristiques du  disque,  a  la  correction  des
  erreurs   produites  par  les  nouvelles  puces  ou  celles  qui  sont
  defectueuses.  Ce qui suit est un resume des parametres  de  demarrage
  possibles.   Pour  plus  de  details,  il faut _a_b_s_o_l_u_m_e_n_t consulter le
  fichier ide.txt dans  le  repertoire  linux/Documentation,  duquel  ce
  resume est extrait.

  ______________________________________________________________________

   "hdx="  est reconnu pour toutes les valeurs de "x", de "a" to "h", comme "hdc".
   "idex=" est reconnu pour toutes les valeurs de "x" de "0" a "3", comme "ide1".

   "hdx=noprobe"          : le lecteur est peut-etre present, mais ne pas le tester
   "hdx=none"             : le lecteur n'est PAS present, ignorer le cmos et
                            ne pas tester.
   "hdx=nowerr"           : ignorer le bit WRERR_STAT sur ce lecteur
   "hdx=cdrom"            : le lecteur est present, et c'est un cdrom
   "hdx=cyl,head,sect"    : le lecteur est present, avec la description indiquee
   "hdx=autotune"         : le pilote essaiera de regler la vitesse de l'interface
                            pour atteindre le plus rapide des modes PIO supportes,
                            si possible pour ce lecteur seulement.
                            Ce n'est pas supporte par tous les types de puces,
                            et peut de temps en temps poser des problemes avec
                            les disques IDE anciens ou originaux.

   "idex=noprobe"         : ne pas tenter d'acceder ou utiliser cette interface
   "idex=base"            : tester l'interface a l'adresse indiquee,
                            ou "base" est generalement 0x1f0 ou 0x170
                            et "ctl" est considere comme etant "base"+0x206
   "idex=base,ctl"        : indiquer les deux, base et ctl
   "idex=base,ctl,irq"    : indiquer les valeurs de base, ctl, et irq
   "idex=autotune"        : le pilote tentera de regler la vitesse de l'interface
                            pour atteindre le plus rapide des modes PIO supportes,
                            pour tous les lecteurs de cette interface.
                            Ce n'est pas supporte par tous les types de puces,
                            et peut de temps en temps poser des problemes avec
                            les disques IDE anciens ou originaux.

   "idex=noautotune"      : le pilote n'essaiera PAS de regler la vitesse
                            de l'interface. Ceci est la valeur par defaut pour
                            le plupart des puces, excepte le cmd640.
   "idex=serialize"       : ne pas empieter sur les operations sur idex et ide(x^1)
  ______________________________________________________________________

  Les  suivants  sont  valides  SEULEMENT  pour ide0, et les valeurs par
  defaut pour base, ctl et ports ne doivent pas etre modifies.

  ______________________________________________________________________

   "ide0=dtc2278"         : teste/supporte l'interface DTC2278
   "ide0=ht6560b"         : teste/supporte l'interface HT6560B
   "ide0=cmd640_vlb"      : *REQUIS* pour les cartes VLB avec la puce CMD640
                            (pas pour PCI - automatiquement detecte)
   "ide0=qd6580"          : teste/supporte l'interface qd6580
   "ide0=ali14xx"         : teste/supporte les puces ali14xx (ALI M1439/M1445)
   "ide0=umc8672"         : teste/supporte les puces umc8672
  ______________________________________________________________________

  Tout le reste  est  rejete  par  un  message  "BAD  OPTION"  (mauvaise
  option).

  55..22..  OOppttiioonnss dduu ppiilloottee ssttaannddaarrdd SSTT--550066 ((``hhdd==''))

  Le  pilote  standard  de  disque  accepte  les memes parametres que le
  pilote IDE. Notez cependant qu'il ne requiert que 3 valeurs (C/H/S)  -
  Ni  plus  ni  moins,  et  il  vous  ignorera  -.  De  plus, il accepte
  uniquement le parametre `hd=', c'est a dire que `hda=', `hdb=' et tout
  le reste ne sont pas autorises ici. Le format est le suivant :

  ______________________________________________________________________
          hd=cyls,heads,sects
  ______________________________________________________________________

  Si  deux  disques  sont installes, la ligne ci-dessus est repetee avec
  les caracteristiques techniques du second disque.

  55..33..  OOppttiioonnss dduu ppiilloottee ddee ddiissqquuee XXTT ((``xxdd==''))

  Si vous etes malchanceux au  point  d'utiliser  une  de  ces  vieilles
  cartes 8 bits qui transfere les donnees a la vitesse fulgurante de 125
  ko/s, c'est ici qu'est le scoop. Le  code  de  test  pour  ces  cartes
  recherche  un  BIOS  installe  et  s'il  n'en  trouve  pas, le test ne
  detectera pas votre carte. Ou encore, si la signature  de  votre  BIOS
  n'est pas reconnue, le test ne trouvera pas votre carte non plus. Dans
  n'importe lequel  de  ces  cas,  vous  devrez  utiliser  le  parametre
  suivant :

  ______________________________________________________________________
          xd=type,irq,iobase,dma_chan
  ______________________________________________________________________

  La  valeur de type indique qui est le constructeur de la carte et peut
  prendre  les  valeurs  suivantes  :  0=generic;  1=DTC;  2,3,4=Western
  Digital,   5,6,7=Seagate;   8=OMTI.  La  seule  difference  entre  les
  differents types pour un meme constructeur est la chaine BIOS utilisee
  pour  la detection, et qui n'est pas utilisee si le type est specifie.

  La fonction xd_setup() ne controle pas les valeurs,  et  supporte  que
  vous  saisissiez  les  4  valeurs. Ne soyez pas decu. Voici un exemple
  d'utilisation   pour   un   controleur    WD1002    avec    un    BIOS
  inactive/supprime, utilisant les parametres `par defaut' du controleur
  XT :

  ______________________________________________________________________
          xd=2,5,0x320,3
  ______________________________________________________________________

  66..  CCDD--RROOMMss ((NNoonn--SSCCSSII//AATTAAPPII//IIDDEE))

  Cette section fait l'inventaire de tous les  parametres  de  demarrage
  possibles  pour  les lecteurs de CD-ROM. Ceci n'inclut pas les CD-ROMs
  SCSI ou IDE/ATAPI. Consultez les sections appropriees pour  ces  types
  de CD-ROMs.
  Notez  que  la plupart de ces CD-ROM ont des fichiers de documentation
  que vous  _d_e_v_r_i_e_z  lire,  et  ils  sont  tous  dans  le  repertoire  :
  linux/Documentation/cdrom.

  66..11..  LL''iinntteerrffaaccee AAzztteecchh ((``aazzttccdd==''))

  La syntaxe pour ce type de carte est :

  ______________________________________________________________________
          aztcd=iobase[,magic_number]
  ______________________________________________________________________

  Si  vous  positionnez le magic_number (nombre magique) a 0x79 alors le
  pilote   essaiera   puis   laissera   tomber   dans   le   cas   d'une
  microprogrammation   inconnue.   Toutes   les  autres  valeurs  seront
  ignorees.

  66..22..  LL''iinntteerrffaaccee SSoonnyy CCDDUU--3311AA eett CCDDUU--3333AA ((``ccdduu3311aa==''))

  On rencontre cette interface CD-ROM sur certaines cartes son Pro Audio
  Spectrum,  ainsi  que  sur  les autres cartes d'interface fournies par
  Sony.  La syntaxe est la suivante :

  ______________________________________________________________________
          cdu31a=iobase,[irq[,is_pas_card]]
  ______________________________________________________________________

  Le fait de specifier une valeur d'IRQ egale a zero indique  au  pilote
  que  les  interruptions  logicielles ne sont pas supportees (comme sur
  certaines cartes PAS). Si votre carte supporte les interruptions, vous
  devrez  les utiliser car elles abaissent la consommation de CPU par le
  pilote.

  Le `is_pas_card' peut-etre saisi sous la forme suivante `PAS' si  vous
  utilisez  une  carte  Pro  Audio  Spectrum,  mais on peut aussi ne pas
  l'indiquer.

  66..33..  LL''iinntteerrffaaccee SSoonnyy CCDDUU--553355 ((``ssoonnyyccdd553355==''))

  La syntaxe pour cette interface de CD-ROM est :

  ______________________________________________________________________
          sonycd535=iobase[,irq]
  ______________________________________________________________________

  La valeur zero peut-etre utilisee comme `bouche-trou' pour l'I/O  base
  si l'on desire specifier une valeur d'IRQ.

  66..44..  LL''iinntteerrffaaccee GGoollddSSttaarr ((``ggssccdd==''))

  La syntaxe pour cette interface de CD-ROM est :

  ______________________________________________________________________
          gscd=iobase
  ______________________________________________________________________

  66..55..  LL''iinntteerrffaaccee ssttaannddaarrdd MMiittssuummii ((``mmccdd==''))

  La syntaxe pour cette interface de CD-ROM est :

  ______________________________________________________________________
          mcd=iobase,[irq[,wait_value]]
  ______________________________________________________________________

  La  valeur  wait_value  est  utilisee  comme  une  valeur  interne  de
  depassement de temps pour les gens qui ont  des  problemes  avec  leur
  disques,  et  peut,  ou  non,  etre  implementee  en  fonctions  d'une
  instruction DEFINE lors de la compilation.

  66..66..  LL''iinntteerrffaaccee IISSPP1166 ((``iisspp1166==''))

  la syntaxe pour cette interface de CD-ROM est :

  ______________________________________________________________________
          isp16=[port[,irq[,dma]]][[,]drive_type]
  ______________________________________________________________________

  Utiliser une valeur a 0 pour irq ou dma signifie qu'ils  ne  sont  pas
  utilises.  Les  valeurs possibles pour drive_type sont noisp16, Sanyo,
  Panasonic, Sony, et Mitsumi.  L'utilisation de noisp16  desactive  les
  lecteurs totalement.

  66..77..  LL''iinntteerrffaaccee MMiittssuummii XXAA//MMuullttiiSSeessssiioonn ((``mmccddxx==''))

  Pour  l'instant,  ce  pilote  `experimental'  possede  une fonction de
  configuration mais aucun parametre n'est  encore  implemente  (version
  1.3.15).   Le  materiel  est  le  meme  que  ci-dessus, mais le pilote
  possede de nouvelles fonctionnalites.

  66..88..  LL''iinntteerrffaaccee OOppttiiccss SSttoorraaggee ((``ooppttccdd==''))

  La syntaxe pour ce type de carte est :

  ______________________________________________________________________
          optcd=iobase
  ______________________________________________________________________

  66..99..  LL''iinntteerrffaaccee PPhhiilllliippss CCMM220066 ((``ccmm220066==''))

  La syntaxe pour ce type de carte est :

  ______________________________________________________________________
          cm206=[iobase][,irq]
  ______________________________________________________________________

  La valeur de l'IRQ est comprise entre 3  et  11,et  les  adresses  des
  ports d'entree/sortie sont comprises entre 0x300 et 0x370, vous pouvez
  donc specifier un ou deux nombres,  dans  n'importe  quel  ordre.   Il
  accepte aussi `cm206=auto' pour activer l'autotest.

  66..1100..  LL''iinntteerrffaaccee SSaannyyoo ((``ssjjccdd==''))

  La syntaxe pour ce type de carte est :

  ______________________________________________________________________
          sjcd=iobase[,irq[,dma_channel]]
  ______________________________________________________________________

  66..1111..  LL''iinntteerrffaaccee SSoouunnddBBllaasstteerr PPrroo ((``ssbbppccdd==''))

  La syntaxe de ce type de carte est :

  ______________________________________________________________________
          sbpcd=iobase,type
  ______________________________________________________________________

  Ou  type  prend  une des valeurs suivantes (Attention : le respect des
  majuscules  et  des  minuscules  est  important)   :   `SoundBlaster',
  `LaserMate',  ou  `SPEA'.  L'adresse d'entree/sortie de base est celle
  de l'interface de CD-ROM, et _n_o_n celle de la partie son de la carte.

  77..  AAuuttrreess PPeerriipphheerriiqquueess MMaatteerriieellss

  Tous les autres peripheriques qui ne peuvent etre classes dans une des
  categories ci-dessus sont entasses ici.

  77..11..  PPeerriipphheerriiqquueess EEtthheerrnneett ((``eetthheerr==''))

  Differents pilotes utilisent differents parametres, mais ils partagent
  tous au moins une IRQ, une adresse d'entree/sortie, et un nom. Dans sa
  forme la plus generique, cela ressemble a ca :

  ______________________________________________________________________
          ether=irq,iobase[,param_1[,param_2,...param_8]]],name
  ______________________________________________________________________

  Le  premier  argument  non-numerique  est  pris  comme nom.  La valeur
  param_n (si elle est applicable)  a  generalement  des  significations
  differentes  pour  chaque  carte/pilote.   Les  valeurs  courantes  de
  param_n sont utilisees pour indiquer des choses comme l'adresse de  la
  memoire  partagee,  la selection d'interface, le canal DMA et ainsi de
  suite.

  L'utilisation la plus courante de ce parametre est de forcer  le  test
  d'une  seconde  carte  ethernet,  alors que par defaut on en teste une
  seule. Ceci peut etre accompli avec un simple ordre :

  ______________________________________________________________________
          ether=0,0,eth1
  ______________________________________________________________________

  Notez que la valeur zero pour l'IRQ et l'I/O base dans  l'exemple  ci-
  dessus indiquent au pilote de faire un autotest.

  NOTE  IMPORTANTE POUR LES UTILISATEURS DE MODULES : ce qui est indique
  ci-dessus _n_e _f_o_r_c_e_r_a _p_a_s un autotest pour une seconde si vous utilisez
  les pilotes de peripheriques en tant que modules chargeables au moment
  de l'execution (au lieu de les avoir  compiles  dans  le  noyau).   La
  plupart   des  distributions  de  Linux  utilisent  un  noyau  central
  depouille combine avec une large selection de pilotes  modulaires.  Le
  parametre ether= s'applique seulement aux pilotes compiles directement
  dans le noyau.

  Le  Ethernet-HowTo  decrit  de  facon  exhaustive   l'utilisation   de
  plusieurs  cartes  simultanement, ainsi que la facon dont est utilisee
  la valeur param_n en fonction des specificites de chaque carte/pilote.
  Les  lecteurs  concernes  pourront  faire reference a la section de ce
  document correspondant a leur carte pour une information plus precise.
  Ethernet-HowTo <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html>

  77..22..  LLee ppiilloottee dduu LLeecctteeuurr ddee DDiissqquueetttteess ((``ffllooppppyy==''))

  Il  existe  de  nombreuses  options  pour  le  pilote  du  lecteur  de
  disquette, et qui sont listees  dans  le  fichier  README.fd  dans  le
  repertoire   linux/drivers/block.   Cette   information  est  extraite
  directement du fichier.

  floppy=mask,allowed_drive_mask

  Positionne le "bitmask" (masque binaire) des lecteurs autorises  a  la
  valeur mask. Par defaut, seules les unites 0 et 1 de chaque controleur
  de lecteur de disquette sont autorisees. Ceci est  fait  car  certains
  materiels  non-standards  (cartes  meres ASUS PCI) mettent la pagaille
  dans le clavier lorsque l'on accede aux unites 2 ou  3.  Cette  option
  est un peu obsolete en raison de l'option cmos.

  floppy=all_drives

  Positionne  le "bitmask" (masque binaire) des disques autorises a tous
  les disques. Utilisez ceci si vous  avez  plus  de  deux  lecteurs  de
  disquette connectes a un controleur de lecteur de disquettes.

  floppy=asus_pci

  Positionne le "bitmask" uniquement aux unites autorisees 0 et 1.  (Par
  defaut)

  floppy=daring

  Indique au pilote du lecteur de disquette que vous avez un  controleur
  de  lecteur  de  disquette  qui  se  conduit  bien.  Ceci  permet  des
  operations plus efficaces et plus discretes,  mais  peut  echouer  sur
  certains controleurs. Ceci peut accelerer certaines operations.

  floppy=0,daring

  Indique  au  pilote  du lecteur de disquette que votre controleur doit
  etre utilise avec precaution.

  floppy=one_fdc

  Indique au pilote de  lecteur  de  disquette  que  vous  n'avez  qu'un
  controleur de lecteur de disquette (Par defaut).

  floppy=two_fdc _o_u floppy=address,two_fdc

  Indique  au  pilote  de  lecteur  de  disquette  que  vous  avez  deux
  controleurs de lecteurs de disquette. Le second controleur est suppose
  etre  a  l'adresse  indiquee. Si l'adresse n'est pas donnee on suppose
  qu'elle est egale a 0x370.

  floppy=thinkpad

  Indique au pilote de lecteur de disquette que vous avez  un  Thinkpad.
  Les  Thinkpads  utilisent une convention inversee pour la "disk change
  line" (ligne de changement de disque).

  floppy=0,thinkpad

  Indique au pilote de lecteur de disquette que vous ne possedez pas  un
  Thinkpad.

  floppy=drive,type,cmos

  Positionne  le  type  cmos  du  drive a type.  De plus, ce lecteur est
  autorise dans le "bitmask" (masque binaire).  C'est pratique  si  vous
  avez  plus  de  deux  lecteurs  de  disquette (seuls deux peuvent etre
  decrits dans la cmos physique), ou si votre BIOS utilise  un  type  de
  CMOS  non-standard.  Si  l'on  positionne  le  CMOS  a 0 pour les deux
  premiers disques (par defaut) le pilote de lecteur  de  disquette  ira
  lire la cmos physique.

  floppy=unexpected_interrupts

  Imprime  un  message  d'alerte  lorsqu'une interruption inattendue est
  recue (comportement par defaut).

  floppy=no_unexpected_interrupts _o_r floppy=L40SX

  Ne pas imprimer de  message  lorsqu'une  interruption  inattendue  est
  recue.   Ceci  est  necessaire sur un IBM L40SX portable dans certains
  modes video (il semble qu'il y ait une interaction entre la  video  et
  les  disquettes).   Les  interruptions inattendues affectent seulement
  les performances, et peuvent etre ignorees sans crainte).

  77..33..  LLee ppiilloottee ddee ssoonnss ((``ssoouunndd==''))

  Le pilote de sons peut aussi recevoir des parametres de demarrage  qui
  ecraseront  les  valeurs  compilees  dans le programme. Ceci n'est pas
  recommande, et de plus c'est complexe. Ceci est decrit (etait decrit ?
  )    dans    le    fichier    Readme.Linux,    dans    le   repertoire
  linux/drivers/sound.  Il  accepte  de  recevoir  un  parametre  de  la
  forme :

  ______________________________________________________________________
          sound=device1[,device2[,device3...[,device11]]]
  ______________________________________________________________________

  Ou  chaque  valeur  de deviceN est de la forme 0xTaaaId, et les octets
  sont utilises de la facon suivante :

  T - type de peripherique : 1=FM, 2=SB, 3=PAS, 4=GUS, 5=MPU401, 6=SB16,
  7=SB16-MPU401

  aaa - adresse d'entree/sortie en hexadecimal.

  I - ligne d'interruption en hexadecimal (i.e 10=a, 11=b, ...).

  d - canal DMA.

  Comme  vous  pouvez  le voir, ceci reste assez malpropre et vous ferez
  mieux de compiler vos propres valeurs comme c'est recommande. Si  l'on
  utilise  un  parametre de demarrage `sound=0' on desactive entierement
  le pilote de sons.

  77..44..  LLee ppiilloottee ddee ssoouurriiss ssuurr bbuuss ""BBuuss MMoouussee"" ((``bbmmoouussee==''))

  Le pilote des souris sur bus accepte un seul  parametre,  qui  est  la
  valeur de l'IRQ materielle a utiliser.

  77..55..  LLee ppiilloottee MMSS BBuuss MMoouussee ((``mmssmmoouussee==''))

  Le pilote MS mouse accepte un seul parametre, qui correspond a l'IRQ a
  utiliser.
  77..66..  LLee ppiilloottee dd''iimmpprriimmaanntteess ((``llpp==''))

  Depuis le noyau 1.3.75, vous pouvez indiquer  au  pilote  d'imprimante
  quels  sont  les  ports  qu'il doit utiliser et ceux qu'il _n_e _d_o_i_t _p_a_s
  utiliser. Vous devriez l'utiliser si vous ne voulez pas que le  pilote
  demande  tous  les  ports  paralleles  disponibles, alors que d'autres
  pilotes (c.a.d. PLIP, PPA) peuvent aussi les utiliser.

  Le  format  du  parametre  est  des  paires  i/o,  IRQ.  Par  exemple,
  lp=0x3bc,0,0x378,7  utilisera le port d'adresse 0x3bc en mode IRQ-less
  (election), et utilisera l'IRQ 7 pour le port d'adresse 0x378. Le port
  0x278  (si  il y en a un) ne sera pas teste, jusqu'a ce que l'autotest
  soit  utilise  en  l'absence  d'un  parametre  `lp='  argument.   Pour
  desactiver totalement le pilote d'impression, on peut utiliser lp=0.

  77..77..  LLee ppiilloottee IICCNN IISSDDNN ((``iiccnn==''))

  Le  pilote  ISDN  necessite  un  parametre  de  demarrage  de la forme
  suivante :

  ______________________________________________________________________
          icn=iobase,membase,icn_id1,icn_id2
  ______________________________________________________________________

  ou iobase est l'adresse du port d'entree/sortie de la  carte,  membase
  est  l'adresse de base de la memoire partagee de la carte, et les deux
  icn_id sont des chaines d'identification ASCII uniques.

  77..88..  LLee ppiilloottee PPCCBBIITT IISSDDNN ((``ppccbbiitt==''))

  Ce parametre de demarrage utilise des paires de valeurs de la forme :

  ______________________________________________________________________
          pcbit=membase1,irq1[,membase2,irq2]
  ______________________________________________________________________

  ou membaseN est l'adresse de base de la memoire partagee de  la  Nieme
  carte,  et  irqN  est l'interruption de la Nieme carte.  La valeur par
  defaut est IRQ 5 et l'adresse de base 0xD0000.

  77..99..  LLee ppiilloottee TTeelleess IISSDDNN ((``tteelleess==''))

  Le pilote ISDN  necessite  un  parametre  de  demarrage  de  la  forme
  suivantenbsp;:

  ______________________________________________________________________
          teles=iobase,irq,membase,protocol,teles_id
  ______________________________________________________________________

  ou iobase est l'adresse du port e/s de la carte, membase est l'adresse
  de base de la  memoire  partagee,  irq  est  le  canal  d'interruption
  utilise par la carte, et teles_id est l'identifiant ASCII unique.

  77..1100..  LLee ppiilloottee DDiiggiiBBooaarrdd ((``ddiiggii==''))

  Le  pilote DigiBoard accepte une chaine de six identifiants ou entiers
  separes par des virgules. Les 6 valeurs dans l'ordre sont :

          Active/Desactive la carte
          Type de la carte_: PC/Xi(0), PC/Xe(1), PC/Xeve(2), PC/Xem(3)
          Active/Desactive la mise en ordre alternative des broches
          Nombre de ports sur cette carte
          Port E/S sur lequel la carte est configuree  (en HEXA si on
          utilise des chaines d'identification)
          Adresse de base de la fenetre memoire (en HEXA si on utilise les
          chaines d'identification)

  Un exemple de parametre de demarrage correct (dans  ses  deux  formes)
  est :

  ______________________________________________________________________
          digi=E,PC/Xi,D,16,200,D0000
          digi=1,0,0,16,512,851968
  ______________________________________________________________________

  Notez  que  le pilote prend les valeurs par defaut de 0x200 pour l'i/o
  et pour la memoire partagee  0xD0000  en  l'absence  de  parametre  de
  demarrage  digi=.  Il  n'y a pas d'autotest effectue.  Plus de details
  peuvent       etre        trouves        dans        le        fichier
  linux/Documentation/digiboard.txt.

  77..1111..  llee ppiilloottee RRIISSCCoomm//88 MMuullttiippoorrtt SSeerriiaall ((``rriissccoomm88==''))

  Jusqu'a  quatre  cartes  peuvent  etre  supportees  en fournissant une
  valeur d'E/S unique pour chaque carte installee.  Les  autres  details
  pourront-etre trouves dans le fichier linux/Documentation/riscom8.txt.

  77..1122..  LLee mmooddeemm SSeerriiee//PPaarraalllleellee RRaaddiioo BBaayyccoomm ((``bbaayyccoomm==''))

  Le format du parmetre de demarrage pour ces peripheriques  est  de  la
  forme :

  ______________________________________________________________________
          baycom=modem,io,irq,options[,modem,io,irq,options]
  ______________________________________________________________________

  Utiliser modem=1 signifie que vous avez le peripherique ser12, modem=2
  signifie que vous  avez  le  peripherique  par96.  Utiliser  options=0
  signifie   l'utilisation   du  DCD  materiel,  et  options=1  signifie
  l'utilisation du DCD logiciel. L'io et l'irq  sont  l'adresse  I/O  de
  base  du port, et la valeur de l'interruption.  Il y a plus de details
  dans le fichier README.baycom qui est generalement dans le  repertoire
  /linux/drivers/char/.

  88..  CCoonncclluussiioonn

  Si   vous  avez  trouve  des  fautes  de  frappe  manifestes,  ou  des
  informations perimees dans ce document, faites le moi savoir.  Il  est
  facile de laisser passer quelque chose.

  Merci,

  Paul Gortmaker, Paul.Gortmaker@anu.edu.au

  Merci de faire parvenir vos remarques sur la traduction de ce document
  a Laurent Renaud, lrenaud@hol.fr

  (http://wwwperso.hol.fr/~lrenaud)

  Disquettes d'amorce Linux
  Tom Fawcett (fawcett@croftj.net)
  (traduction : Frank Pavageau, pavageau@imaginet.fr)
  3.5, Juillet 1999

  Ce document dcrit comment dfinir et crer vos propres disquettes
  d'amorce et racine pour Linux. Ces disquettes peuvent tre utilises
  comme disques de secours, ou pour tester de nouveaux composants du
  systme. Si vous n'avez pas lu la FAQ Linux et autres documents du
  mme genre, tels que le HOWTO d'installation Linux et le Guide
  d'Installation de Linux, vous ne devriez pas essayer de crer de dis
  quettes d'amorce. Si vous souhaitez juste crer des disquettes pour
  prvenir les cas urgents, lisez l'annexe "Disques d'amorce prfab
  riqus".
  ______________________________________________________________________

  Table des matires

















































  1. Prface

     1.1 Notes
     1.2 Retours et remerciements
     1.3 Politique de distribution
     1.4 Notes du traducteur

  2. Introduction

  3. Disques d'amorce et dmarrage

     3.1 Dmarrage
     3.2 Types de disques

  4. Construire un systme racine

     4.1 Aperu
     4.2 Cration du systme de fichiers
     4.3 Remplissage du systme de fichiers
        4.3.1 /dev
        4.3.2 /etc
        4.3.3 /bin et /sbin
        4.3.4 /lib
     4.4 Utilisation de PAM et NSS
        4.4.1 PAM (Pluggable Authentication Modules)
        4.4.2 NSS (Name Service Switch)
     4.5 Modules
     4.6 Quelques ultimes dtails
     4.7 C'est dans la poche

  5. Choisir un noyau

  6. Assemblage et fabrication de la ou des disquettes

     6.1 Transfert du noyau avec LILO
     6.2 Transfert du noyau sans LILO
     6.3 Mise en place du mot disque mmoire
     6.4 Transfert du systme racine

  7. En cas de problme, ou L'agonie de la dfaite

  8. Sujets divers

     8.1 Rduire la taille du systme racine
     8.2 Systme racine sans disque mmoire
     8.3 Construire un disque utilitaire

  9. La mthode des pros

  10. Foire Aux Questions (FAQ)

  11. Ressources et pointeurs

     11.1 Disques d'amorce prfabriqus
     11.2 Paquetages de secours
     11.3 Scripts shell et Graham Chapman
     11.4 LILO : le chargeur Linux
     11.5 FAQ Linux et HOWTOs
     11.6 Utilisation du disque mmoire
     11.7 Le processus de dmarrage de Linux

  12. Codes d'erreur du dmarrage de LILO

  13. Exemple de contenu de rpertoires sur un disque racine

  14. Exemple de contenu des rpertoires d'un disque utilitaire
  ______________________________________________________________________

  11..  PPrrffaaccee


  NNoottee :: ccee ddooccuummeenntt ppeeuutt ttrree oobbssoollttee.. Si la date sur la page de titre
  a plus de six mois, vrifiez la page du Linux Documentation Project
  <http://metalab.unc.edu/LDP/HOWTO/Bootdisk-HOWTO.html> (et sa
  traduction franaise  <http://www.freenix.fr/linux/HOWTO/Bootdisk-
  HOWTO.html>) au cas o une version plus rcente s'y trouverait.

  Bien que ce document doive tre lisible dans sa forme texte, il a _b_i_e_n
  meilleure allure en PostScript (.ps) ou HTML en raison de la
  typographie utilise. Nous vous conseillons de choisir une de ces
  versions. La version Info est, pour l'instant, tellement mal gnre
  qu'elle en est inutilisable.



  11..11..  NNootteess


  Graham Chapman (grahamc@zeta.org.au) a crit le premier Bootdisk-HOWTO
  et en a assur la maintenance jusqu' la version 3.1. Tom Fawcett
  (fawcett@croftj.net) a ajout beaucoup d'informations pour le support
  du noyau 2.0, et effectue dsormais la maintenance du document, depuis
  la version 3.2. Il contient toujours une bonne partie crite par
  Chapman.

  Ce document concerne llee nnooyyaauu LLiinnuuxx 22..00 eett lleess vveerrssiioonnss uullttrriieeuurreess.
  Si vous avez un vieux noyau (1.2.xx ou antrieur), veuillez consulter
  les versions prcdentes du Bootdisk-HOWTO archives sur la page de
  Graham Chapman <http://www.zeta.org.au/~grahamc/linux.html>.

  Les informations contenues dans ce document concerne Linux sur plate-
  forme IInntteell. Bien des lments doivent pouvoir tre appliqus  Linux
  sur d'autres processeurs, mais nous n'en avons pas personnellement
  l'exprience, ni ne possdons d'informations de ce type. Si quelqu'un
  a expriment les disques d'amorce sur d'autres plate-formes, qu'il
  nous contacte.



  11..22..  RReettoouurrss eett rreemmeerrcciieemmeennttss


  Tout retour, bon ou mauvais, sur le contenu de ce document est le
  bienvenu. Nous avons fait de notre mieux pour vrifier que les
  instructions et informations ici prsentes sont prcises et fiables.
  Merci de nous signaler toute erreur ou omission.

  Nous remercions les nombreuses personnes nous ayant fourni des
  corrections et suggestions. Leurs contributions ont permis d'amliorer
  ce document bien au del de ce que nous aurions pu raliser seuls.

  Envoyez vos commentaires, corrections et questions  l'auteur 
  l'adresse ci-dessus (ou au traducteur pour des problmes dans la
  version franaise). Cela ne me drange pas d'essayer de rpondre  vos
  questions, mais merci de lire la section ``En cas de problme''
  d'abord.






  11..33..  PPoolliittiiqquuee ddee ddiissttrriibbuuttiioonn


  Copyright  1995,1996,1997,1998,1999 by Tom Fawcett and Graham
  Chapman.  This document may be distributed under the terms set forth
  in the Linux Documentation Project License at
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.  Please contact the
  authors if you are unable to get the license.

  This is free documentation.  It is distributed in the hope that it
  will be useful, but wwiitthhoouutt aannyy wwaarrrraannttyy; without even the implied
  warranty of mmeerrcchhaannttaabbiilliittyy or ffiittnneessss ffoorr aa ppaarrttiiccuullaarr ppuurrppoossee.

  Copyright  1995,1996,1997,1998,1999 Tom Fawcett et Graham Chapman. Ce
  document peut tre distribu sous les termes de la Licence du Linux
  Documentation Project lisible 
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>. Merci de contacter les
  auteurs si vous n'arrivez pas  rcuprer la licence.

  Cette documentation est libre. Elle est distribue dans l'espoir
  d'tre utile, mais ssaannss aauuccuunnee ggaarraannttiiee ; sans mme la garantie
  implicite de vvaalleeuurr mmaarrcchhaannddee ou de ccoorrrreessppoonnddrree  uunn bbuutt ppaarrttiiccuulliieerr.

  Vous utilisez les informations contenues dans ce document  vos
  propres risques. Nous dclinons toute responsabilit quant  son
  contenu. L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entirement  vos propres risques.

  Tous les droits sont dtenus par leurs propritaires respectifs, sauf
  mention contraire explicite. L'utilisation d'un terme dans ce document
  ne constitue pas une limitation  sa validit en tant que marque.

  Le fait de citer un produit ou une marque particulire ne constitue
  pas un endossement.

  Il est fortement conseill d'effectuer une sauvegarde de votre systme
  avant une installation importante ainsi qu' intervalles rguliers.


  11..44..  NNootteess dduu ttrraadduucctteeuurr


  Correspondances anglais/franais utilises dans la traduction :

    I/O : E/S, entres/sorties.

    backup : archive.

    boot loader : chargeur, lanceur.

    boot : amorce, amorcer, dmarrage, dmarrer.

    boot/root disk : disquette d'amorce/racine.

    dynamic library : bibliothque partage.

    filesystem : systme de fichiers, systme.

    inode : i-noeud.

    library : bibliothque.

    loopback device : priphrique de boucle.

    package : paquetage.

    path : chemin.

    ramdisk : disque virtuel en mmoire, disque mmoire.

    root device : priphrique racine.

    root : racine.

    runlevel : niveau d'excution.

    swap : pagination.


  22..  IInnttrroodduuccttiioonn


  Les disques d'amorce Linux sont utiles dans nombre de situations,
  telles que :


    Tester un nouveau noyau ;

    Redmarrer aprs un problme de disque : tout depuis la perte d'un
     secteur d'amorce  l'atterrissage d'une tte de lecture sur le
     disque ;

    Rparer un systme endommag. Une petite erreur en tant que root
     peut rendre le systme inutilisable, et il peut alors tre
     ncessaire de dmarrer depuis une disquette pour corriger le
     problme ;

    Mettre  jour des fichiers critiques du systme, tels que libc.so.

  Les disques d'amorce peuvent tre obtenus de diffrentes manires :


    Utiliser ceux d'une distribution telle que la Slackware. Cela vous
     permettra au moins de dmarrer ;

    Utiliser un paquetage de cration de disques de secours, prvus
     pour les cas d'urgence ;

    Apprendre ce que ncessite le fonctionnement de chaque type de
     disque, puis crer les vtres.

  Certaines personnes choisissent la dernire solution afin de tout
  faire eux-mmes. Ainsi, si quelque chose ne marche plus, ils peuvent
  se dbrouiller pour corriger le problme. Et c'est un excellent moyen
  pour apprendre le fonctionnement d'un systme Linux.

  Ce document suppose une certaine familiarit avec les concepts
  d'administration d'un systme Linux. Par exemple, vous devez connatre
  les rpertoires, les systmes de fichiers, les disquettes. Vous devez
  savoir utiliser mount et df,  quoi servent les fichiers /etc/passwd
  et fstab et quelle tte ils ont. Enfin, vous devez savoir que la
  plupart des commandes dans ce HOWTO doivent tre excutes en tant que
  root.

  Crer vos propres disquettes d'amorce  partir de zro peut tre
  compliqu. Si vous n'avez pas lu la FAQ Linux et autres documents du
  mme genre, tels que le HOWTO d'installation Linux et le Guide
  d'Installation de Linux, vous ne devriez pas essayer de crer de
  disques d'amorce. Si vous souhaitez juste crer des disques pour
  prvenir les cas urgents, il est bbiieenn plus simple d'en rcuprer des
  prfabriqus. Lisez l'appendice ``Disques d'amorce prfabriqus'' ci-
  dessous pour savoir o en trouver.
  33..  DDiissqquueess dd''aammoorrccee eett ddmmaarrrraaggee


  Un disque d'amorce est essentiellement un systme Linux miniature et
  auto-suffisant contenu sur une disquette. Il doit pouvoir effectuer
  nombre d'oprations possibles sur un systme Linux de taille normale.
  Avant d'essayer d'en crer un, vous devez comprendre les bases du
  dmarrage de Linux. Nous en faisons ici une prsentation qui devrait
  suffire  la comprhension de la suite du document. Bien des dtails
  ou des possibilits ont t omis.



  33..11..  DDmmaarrrraaggee



  Tous les PC dmarrent en excutant du code situ en mmoire morte (
  savoir, le BIOS) afin de charger le secteur situ au secteur 0,
  cylindre 0 du disque d'amorce. Celui-ci est habituellement le premier
  lecteur de disquette (appel A: sous DOS et /dev/fd0 sous Linux). Le
  BIOS essaye alors d'excuter ce secteur. Sur la plupart des disques
  d'amorce, le secteur 0, cylindre 0 contient :

    soit le code d'un chargeur tel que LILO, qui trouve le noyau, le
     charge et l'excute pour raliser le dmarrage proprement dit,

    soit le dbut du noyau d'un systme d'exploitation, tel que Linux.

  Si un noyau Linux a t copi directement sur une disquette, le
  premier secteur du disque sera le premier secteur du noyau Linux lui-
  mme. Ce premier secteur continuera le dmarrage en chargeant le reste
  du noyau depuis le priphrique d'amorce.

  Une fois que le noyau est compltement charg, il effectue certaines
  initialisations de priphriques. Il essaye ensuite de charger et
  monter un ssyyssttmmee ddee ffiicchhiieerrss rraacciinnee depuis un priphrique
  quelconque. Un systme de fichiers racine est simplement celui qui est
  mont en tant que "/". Il faut dire au noyau o trouver ce systme
  racine ; s'il ne peut trouver d'image  charger, il s'arrte.

  Dans certains cas au dmarrage (souvent lors du dmarrage depuis une
  disquette), le systme de fichiers racine est charg dans un ddiissqquuee
  mmmmooiirree, auquel le systme accde ensuite en mmoire comme s'il
  s'agissait d'un vrai disque. Il y a deux raisons  un tel chargement
  en mmoire. Premirement, la mmoire vive est plusieurs ordres de
  magnitude plus rapide qu'une disquette, et le systme est donc
  rapide ; deuximement, le noyau peut charger un ssyyssttmmee ddee ffiicchhiieerrss
  ccoommpprreessss depuis la disquette et le dcompresser en mmoire,
  permettant ainsi de stocker plus de fichiers sur la disquette.

  Une fois le systme de fichiers racine charg et mont, vous voyez un
  message tel que :


          VFS: Mounted root (ext2 filesystem) readonly.




  A ce moment, le systme trouve le programme init dans le systme
  racine (dans /bin ou /sbin) et l'excute. init lit sa configuration
  dans /etc/inittab, cherche une ligne nomme sysinit, et excute le
  script indiqu. Le script sysinit est en gnral un fichier du genre
  /etc/rc ou /etc/init.d/boot. Le script est un ensemble de commandes
  shell qui mettent en place les services de base du systme, tels que :
    Lancer fsck sur tous les disques ;

    Charger les modules ncessaires du noyau ;

    Lancer la pagination ;

    Initialiser le rseau ;

    Monter les disques indiqus dans fstab.

  Ce script appelle lui-mme souvent nombre d'autres scripts pour
  raliser une initialisation modulaire. Par exemple, dans la structure
  SysVinit habituelle, le rpertoire /etc/rc.d/ contient une structure
  complexe de sous-rpertoires dont les fichiers indiquent comment
  lancer et arrter la plupart des services du systme. Par contre, sur
  un disque d'amorce, le script sysinit est souvent trs simple.

  Quand le script sysinit se termine, le contrle revient  init, qui
  entre alors dans le _n_i_v_e_a_u _d_'_e_x__c_u_t_i_o_n _p_a_r _d__f_a_u_t, spcifi dans
  inittab par le mot cl initdefault. La ligne du niveau d'excution
  indique en gnral un programme tel que getty, responsable de la
  gestion des communications par la console ou les ttys. C'est le
  programme getty qui affiche l'invite habituelle "login:". Lui-mme
  excute  son tour le programme login pour grer la validation du
  login et mettre en place la session de l'utilisateur.



  33..22..  TTyyppeess ddee ddiissqquueess


  Aprs avoir revu les bases du dmarrage, nous pouvons dfinir les
  diffrents types de disques mis en jeu. Ces disques sont classs en
  quatre catgories. a et l dans le document, on emploie le terme
  "disque" pour dsigner une disquette, sauf prcision contraire, bien
  que la majeure partie de la discussion puisse galement s'appliquer 
  des disques durs.



     AAmmoorrccee
        Un disque contenant un noyau pouvant tre amorc. Il peut tre
        utilis pour dmarrer le noyau, qui pourra alors charger un
        systme racine depuis un autre disque. Il est en gnral
        ncessaire d'indiquer au noyau o se trouve ce systme racine.

        Souvent un disque d'amorce charge le systme racine depuis une
        autre disquette, mais il est possible de lui indiquer un disque
        dur d'o il chargera le systme racine  la place. Souvent,
        c'est dans le but de tester un nouveau noyau (d'ailleurs, "make
        zdisk" cre un tel disque d'amorce automatiquement  partir du
        code source du noyau).


     RRaacciinnee
        Un disque avec un systme de fichiers contenant les fichiers
        ncessaires au fonctionnement d'un systme Linux. Un tel disque
        ne contient pas forcment un noyau ou un chargeur.

        Un disque racine peut tre utilis pour faire tourner le systme
        indpendamment de tout autre disque, une fois le noyau amorc.
        En gnral le disque racine est copi automatiquement vers un
        disque mmoire. Cela permet un accs au disque racine bien plus
        rapide, et libre le lecteur pour une disquette d'utilitaires.


     AAmmoorrccee//rraacciinnee
        Un disque contenant  la fois un noyau et un systme de fichiers
        racine. Autrement dit, il contient tout ce qui est ncessaire au
        dmarrage et au fonctionnement d'un systme Linux sans disque
        dur. L'avantage de ce type de disque est sa compacit : tout ce
        dont on a besoin est sur un seul disque. Nanmoins, la taille
        toujours plus importante des programmes implique une difficult
        croissante pour tout faire tenir sur une seule disquette, mme
        avec de la compression.


     UUttiilliittaaiirree
        Un disque contenant un systme de fichier non destin  tre
        mont en tant que racine. Il s'agit d'un disque de donnes
        supplmentaires. Vous pouvez utiliser ce genre de disque pour
        rajouter des utilitaires, quand vous en avez trop pour un seul
        disque amorce.



  En gnral, lorsque l'on parle de "construire un disque d'amorce",
  c'est de la cration des parties amorce (noyau) et racine (fichiers)
  qu'il est question, soit en un seul morceau (un seul disque
  amorce/racine), soit sparment (un disque amorce et un racine).
  L'approche la plus flexible pour des disquettes de secours est
  d'utiliser des disquettes amorce et racine spares, et une ou
  plusieurs disquettes utilitaires pour supporter le trop-plein.




  44..  CCoonnssttrruuiirree uunn ssyyssttmmee rraacciinnee


  Pour crer un systme racine, il faut slectionner les fichiers
  ncessaires au systme pour fonctionner. Dans cette section nous
  dcrivons comment crer un _s_y_s_t__m_e _r_a_c_i_n_e _c_o_m_p_r_e_s_s_. Une option moins
  courante est de crer un systme non compress sur une disquette que
  l'on monte directement ; cette alternative est dcrite dans la section
  ``Systme racine sans disque mmoire''.


  44..11..  AAppeerruu


  Un systme racine doit contenir tout ce qui est ncessaire au bon
  fonctionnement d'un systme Linux complet. Pour cela, le disque doit
  contenir un systme Linux minimum :


    La structure de base des fichiers ;

    Un ensemble minimum de rpertoires : /dev, /proc, /bin, /etc, /lib,
     /usr, /tmp ;

    Un ensemble d'utilitaires de base : sh, ls, cp, mv, etc ;

    Un ensemble minimum de fichiers de configuration : rc, inittab,
     fstab, etc ;

    Des priphriques : /dev/hd*, /dev/tty*, /dev/fd0, etc ;

    Des bibliothques d'excution fournissant les fonctions de base
     ncessaires aux utilitaires.


  Bien sr, n'importe quel systme devient utile ds que l'on peut faire
  tourner quelque chose dessus, et une disquette racine ne devient en
  gnral utilisable que lorsque vous pouvez faire quelque chose du
  genre :


    Contrler un systme de fichiers sur un autre disque ; par exemple,
     pour contrler le systme racine de votre disque dur, vous devez
     pouvoir dmarrer Linux depuis un autre disque, telle qu'une
     disquette racine. Vous pouvez alors lancer fsck sur votre disque
     racine habituel tant qu'il n'est pas mont ;

    Rcuprer tout ou partie de votre disque racine initial  partir
     d'une sauvegarde en utilisant des utilitaires d'archivage et de
     compression tels que cpio, tar, gzip et ftape.


  Nous dcrirons comment construire un systme _c_o_m_p_r_e_s_s_, ainsi appel
  car il est compress sur disque et qu'une fois dmarr, le noyau le
  dcompresse dans un disque mmoire.  Avec un systme compress vous
  pouvez faire tenir beaucoup de fichiers ( peu prs six mgaoctets)
  sur une disquette standard de 1440K. Puisque le systme de fichiers
  est bien plus gros que la disquette, il ne peut tre construit
  directement sur la disquette. Il nous faut le construire ailleurs et
  le compresser avant de le copier sur la disquette.


  44..22..  CCrraattiioonn dduu ssyyssttmmee ddee ffiicchhiieerrss


  Pour crer un tel systme racine, il vous faut un autre priphrique
  capable de stocker tous les fichiers avant leur compression. Ce
  priphrique doit pouvoir contenir  peu prs quatre mgaoctets.
  Plusieurs solutions s'offrent  vous :


    Utiliser un ddiissqquuee mmmmooiirree (PRIPHRIQUE = /dev/ram0). Dans ce cas,
     la mmoire est utilise pour simuler un disque physique. Le disque
     mmoire doit tre suffisamment grand pour contenir un systme de
     fichiers de la bonne taille. Si vous utilisez LILO, cherchez dans
     votre fichier de configuration (/etc/lilo.conf) une ligne du type :


         RAMDISK_SIZE = nnn


  qui dtermine combien de mmoire peut tre au plus alloue  un disque
  mmoire. La valeur par dfaut est de 4096 Ko, ce qui devrait suffire.
  Il ne sert probablement  rien de crer un tel disque mmoire sur une
  machine possdant moins de 8 Mo de RAM.

  Vrifiez que vous avez un priphrique tel que /dev/ram0, /dev/ram ou
  /dev/ramdisk. Si ce n'est pas le cas, crez /dev/ram0 avec mknod
  (numro majeur 1, numro mineur 0).

    Une partition de disque dur inutilise et assez grande (plusieurs
     mgaoctets) est aussi une bonne solution.

    Utiliser un pprriipphhrriiqquuee ddee bboouuccllee ((llooooppbbaacckk)), qui permet
     d'utiliser un fichier comme s'il s'agissait d'un priphrique
     normal. Avec un priphrique de boucle, vous pouvez crer un
     fichier de 3 mgaoctets sur votre disque dur et construire le
     systme de fichiers dedans.

     Tapez man losetup pour savoir comment utiliser un priphrique de
     boucle. Si vous n'avez pas losetup, vous pouvez le rcuprer, ainsi
     que des versions compatibles de mount et umount, dans le paquetage
     util-linux disponible dans le rpertoire
     <ftp://ftp.win.tue.nl/pub/linux/utils/util-linux/>.


     Si vous n'avez pas de priphrique de boucle (/dev/loop0,
     /dev/loop1, etc) sur votre systme, vous devez en crer un avec
     "mknod /dev/loop0 b 7 0". Une fois les excutables mount et umount
     spciaux installs, crez un fichier temporaire sur le disque dur
     suffisamment grand (par exemple, /tmp/fsfile). Vous pouvez utiliser
     une commande du type :


             dd if=/dev/zero of=/tmp/fsfile bs=1k count=nnn



  pour crer un fichier de _n_n_n blocs.

  Utilisez le nom du fichier  la place de PRIPHRIQUE ci-dessous.
  Quand vous excutez une commande mount, vous devez inclure l'option
  "-o loop" pour dire au programme d'utiliser un priphrique de boucle.
  Par exemple :

          mount -o loop -t ext2 /tmp/fsfile /mnt



  va monter /tmp/fsfile (par priphrique de boucle) sur le point de
  montage /mnt. Un coup de df le confirmera.



  Aprs avoir choisi une de ces options, prparez le PRIPHRIQUE avec :

          dd if=/dev/zero of=PRIPHRIQUE bs=1k count=3000



  Cette commande initialise  zro le priphrique. Cette tape est
  importante pour la compression ultrieure du systme de fichiers, afin
  que toutes les portions inutilises soient remplies de zro pour une
  compression maximum.

  Ensuite, crez le systme de fichiers. Le noyau Linux sait charger
  automatiquement deux types de systme de fichiers dans un disque
  mmoire : minix et ext2, avec une prfrence pour ext2. Si vous le
  choisissez, vous voudrez peut-tre utiliser l'option -i afin de crer
  plus d'i-noeuds que par dfaut ; -i 2000 est une bonne valeur qui vous
  vitera de tomber  court d'i-noeuds. Vous pouvez sinon conomiser des
  i-noeuds en supprimant pas mal de fichiers /dev/ inutiles. mke2fs cre
  par dfaut 360 i-noeuds sur une disquette de 1,44 Mo. Je trouve 120 i-
  noeuds largement suffisants sur mon actuelle disquette racine de
  secours, mais si vous conservez tous les priphriques dans le
  rpertoire /dev vous dpasserez facilement les 360. L'utilisation d'un
  systme racine compress permet de crer un systme de fichiers plus
  grand, contenant donc plus d'i-noeuds par dfaut, mais vous pourrez
  quand mme vouloir rduire le nombre de fichiers ou augmenter le
  nombre d'i-noeuds.

  Vous allez donc taper une commande du genre :

          mke2fs -m 0 -i 2000 PRIPHRIQUE



  (Si vous utilisez un priphrique de boucle, le fichier que vous
  utilisez doit tre indiqu  la place de ce PRIPHRIQUE. mke2fs vous
  demandera alors si vous voulez vraiment faire cela ; rpondez oui.)

  La commande mke2fs dtectera automatiquement l'espace disponible et se
  configurera selon. Le paramtre -m 0 permet de ne pas rserver
  d'espace pour root, et laisse donc plus d'espace disponible sur le
  disque.

  Ensuite, montez le priphrique :


          mount -t ext2 PRIPHRIQUE /mnt



  (Vous devez crer un point de montage /mnt s'il n'existe pas encore.)
  Dans les sections suivantes, tous les rpertoires destination sont
  supposs relatifs  /mnt.



  44..33..  RReemmpplliissssaaggee dduu ssyyssttmmee ddee ffiicchhiieerrss


  Voici un minimum raisonnable de rpertoires  crer sur votre systme
  racine :


    /dev : Priphriques, ncessaires aux E/S ;

    /proc : Rpertoire de base ncessaire au systme de fichiers proc ;

    /etc : Fichiers de configuration du systme ;

    /sbin : Excutables systmes critiques ;

    /bin : Excutables de base considrs comme partie intgrante du
     systme ;

    /lib : Bibliothques partages ncessaires  l'excution des
     programmes ;

    /mnt : Un point de montage pour la maintenance des autres disques ;

    /usr : Utilitaires et applications supplmentaires.

  (La structure de rpertoires prsente ici concerne uniquement les
  disquettes racines. Les vrais systmes Linux ont une politique plus
  complexe et discipline, appele la Hirarchie Standard de Systme de
  Fichiers (Filesystem Hierarchy Standard), qui dtermine o les
  fichiers doivent se trouver.)


  Trois de ces rpertoires resteront vides sur les systmes racine, il
  suffit donc de les crer avec mkdir. Le rpertoire /proc n'est qu'une
  base sous laquelle le systme proc est plac. /mnt et /usr ne sont que
  des points de montage utiliss une fois que le systme amorce/racine
  tourne. Encore une fois, il suffit de crer ces rpertoires.

  Les quatre autre rpertoires sont dcrits dans les sections suivantes.





  44..33..11..  //ddeevv


  Tous les systmes Linux ont besoin d'un rpertoire /dev contenant un
  fichier spcial par priphrique accessible au systme. Le rpertoire
  en lui-mme est normal, et peut tre cr avec mkdir de la manire
  habituelle. Les fichiers spciaux de priphrique doivent par contre
  tre crs diffremment,  l'aide de la commande mknod.

  Il y a un raccourci par contre : copiez le contenu de votre rpertoire
  /dev existant, puis supprimez ceux dont vous n'avez pas besoin. Il
  suffit juste de copier les fichiers spciaux avec l'option -R. Cela
  copie le rpertoire sans tenter de copier le contenu des fichiers.
  _A_t_t_e_n_t_i_o_n _ _b_i_e_n _u_t_i_l_i_s_e_r _u_n _R _e_n _m_a_j_u_s_c_u_l_e _! Si vous utilisez
  l'option en minuscule -r, vous allez vous retrouver en train de copier
  le contenu complet de votre disque dur -- ou au moins tout ce que
  pourra en contenir une disquette ! Prenez donc vos prcautions, et
  utilisez la commande :


          cp -dpR /dev /mnt



  en supposant que la disquette est monte sur /mnt. Les options dp
  demandent la copie des liens symboliques en tant que lien, plutt que
  celle du fichier qui se trouve au bout de celui-ci, et la conservation
  des attributs originaux des fichiers, pour garder les bons
  propritaires.

  Si vous voulez le faire vous-mmes, utilisez ls -l pour afficher les
  numros majeurs et mineurs des priphriques qui vous intressent, et
  crez-les sur la disquette en utilisant mknod.

  Quelle que soit la manire retenue pour copier les priphriques, il
  faut vrifier que tous les priphriques dont vous aurez besoin sont
  bien prsents sur la disquette de secours. Par exemple, ftape utilise
  les priphriques de bande, qu'il vous faudra donc tous copier si vous
  comptez utiliser votre lecteur de bande depuis le disque amorce.

  A noter qu'un i-noeud est ncessaire pour chaque fichier de
  priphrique, et que les i-noeuds sont parfois une ressource rare,
  spcialement sur les systmes de fichiers sur disquette. Il n'est donc
  pas idiot d'enlever tous les fichiers de priphrique dont vous n'avez
  pas besoin du rpertoire /dev de la disquette. Bien des priphriques
  ne sont clairement pas ncessaires sur des systmes spcifiques. Par
  exemple, si vous n'avez pas de disques SCSI vous pouvez tranquillement
  enlever tous les fichiers commenant par sd. De mme, si vous ne
  comptez pas utiliser de port srie vous pouvez supprimer tous les
  fichiers commenant par cua.

  _N_'_o_u_b_l_i_e_z _p_a_s _d_'_i_n_c_l_u_r_e _l_e_s _f_i_c_h_i_e_r_s _s_u_i_v_a_n_t_s _d_a_n_s _l_e _r__p_e_r_t_o_i_r_e _:
  console, kmem, mem, null, ram, tty1.


  44..33..22..  //eettcc


  Ce rpertoire doit contenir un certain nombre de fichiers de
  configuration. Sur la plupart des systmes, on peut les rpartir en
  trois groupes :


  1. Ncessaires  tout moment, par exemple rc, fstab, passwd ;


  2. Peut-tre ncessaires, mais on n'en est pas sr ;

  3. Du bazar oubli l.

  Les fichiers non essentiels peuvent tre identifis avec la commande :



               ls -ltru




  Les fichiers sont classs dans l'ordre inverse de dernire date
  d'accs, donc tout fichier qui n'est jamais lu peut tre exclu d'une
  disquette racine.

  Sur mes disquettes racine, je n'ai que 15 fichiers de configuration.
  Mon travail se rduit alors  grer trois groupes de fichiers :


  1. Ceux que je dois configurer pour un systme d'amorce et racine :


     a. rc.d/* : scripts de dmarrage du systme et de changement de
        niveau d'excution ;

     b. fstab : liste des systmes de fichiers  monter ;

     c. inittab : paramtres pour le processus init, le premier  tre
        lanc au dmarrage.


  2. Ceux que je dois nettoyer pour un systme d'amorce et racine :

     a. passwd : liste des utilisateurs, des rpertoires utilisateurs,
        etc ;

     b. group : groupes d'utilisateurs ;

     c. shadow : mots de passe cachs des utilisateurs. Il se peut que
        vous n'ayez pas ce fichier ;

     d. termcap : la base de donnes de fonctionnalits des terminaux.


     Si la scurit est importante, passwd et shadow doivent tre net
     toys pour ne pas copier de mots de passe d'utilisateurs hors du
     systme et pour qu'en cas de dmarrage sur disquette, les logins
     indsirables soient rejets.

     Assurez-vous que passwd contienne au moins root. Si vous comptez
     donner accs  d'autres utilisateurs, vrifiez l'existence de leurs
     rpertoires utilisateurs et de leurs shells.

     termcap, la base de donnes de terminaux, fait en gnral plusieurs
     centaines de kilo-octets. Vous devrez faire du mnage dans la ver
     sion de votre disquette d'amorce/racine pour ne conserver que le ou
     les terminaux que vous utilisez, ce qui se rduit en gnral 
     l'entre linux-console.


  3. Le reste. Ils fonctionnent trs bien tels quel, je ne les modifie
     donc pas.


  Parmi tout cela, je n'ai en ralit que deux fichiers  configurer, et
  ils ne doivent contenir qu'tonnamment peu de choses.

    rc doit contenir :

             #!/bin/sh
             /bin/mount -av
             /bin/hostname Kangaroo



  Vrifiez que ce sont les bons rpertoires. Il n'est pas rellement
  ncessaire de lancer hostname, mais cela donne juste meilleure allure.

    fstab doit au moins contenir :


             /dev/ram0       /       ext2    defaults
             /dev/fd0        /       ext2    defaults
             /proc           /proc   proc    defaults



  Vous pouvez copier des lignes de votre fstab actuel, mais vous ne
  devriez pas monter automatiquement de partitions de votre disque dur ;
  utilisez le mot cl noauto pour celles-l. Votre disque peut tre
  endommag ou mort quand vous utilisez le disque d'amorce.

  Votre inittab doit tre modifi pour que la ligne sysinit lance rc ou
  quelque autre script basique d'amorce. De plus, si vous ne souhaitez
  pas que les utilisateurs se loguent sur les ports srie, commentez
  toutes les entres getty qui rfrencent des priphriques ttys ou
  ttyS  la fin de la ligne. Laissez les ports tty pour pouvoir vous
  loguer sur la console.

  Un fichier inittab minimal contient cela :

          id:2:initdefault
          si::sysinit:/etc/rc
          1:2345:respawn:/sbin/getty 9600 tty1
          2:23:respawn:/sbin/getty 9600 tty2



  Le fichier inittab dcrit ce que va lancer le systme dans divers
  tats, dont le dmarrage, le passage en mode multi-utilisateurs, etc.
  Attention aux noms de fichiers rfrencs dans inittab ; si init ne
  peut trouver le programme, le disque d'amorce s'arrtera, et vous
  n'aurez peut-tre mme pas de message d'erreur.


  Notez que certains programmes ne peuvent tre dplacs en raison
  d'autres programmes qui rfrencent en dur leur position. Par exemple
  sur mon systme, /etc/shutdown rfrence en dur /etc/reboot. Si je
  dplace reboot vers /bin/reboot, et que je lance une commande
  shutdown, elle va chouer en ne trouvant pas le fichier reboot.


  Pour le reste, copiez juste tous les fichiers texte de votre
  rpertoire /etc, ainsi que tous les excutables prsents dans /etc
  dont vous n'tes pas sr de pouvoir vous passer. Basez-vous sur
  l'exemple de la section ``Exemple de contenu des rpertoires d'un
  disque racine''. Il vous suffira probablement de copier ces fichiers,
  mais les systmes pouvant tre trs diffrents, il n'est pas certain
  que le mme ensemble de fichiers sur votre systme soit quivalent aux
  fichiers lists. La seule mthode sure est de partir d'inittab et d'en
  dduire ce qui est ncessaire.

  La plupart des systmes utilisent maintenant un rpertoire /etc/rc.d/
  contenant des scripts shell pour les diffrents niveaux d'excution.
  Il faut au minimum avoir un script rc unique, mais il peut tre plus
  simple de carrment copier inittab et le rpertoire /etc/rc.d depuis
  votre systme puis de nettoyer les scripts shell dans le rpertoire
  rc.d pour enlever tous les traitements inutiles pour un systme sur
  disquette.


  44..33..33..  //bbiinn eett //ssbbiinn


  Le rpertoire /bin est un endroit pratique pour tous les utilitaires
  ncessaires aux oprations de base, tels que ls, mv, cat et dd. Voir
  l'appendice ``Exemple de contenu des rpertoires d'un disque racine''
  pour un exemple d'ensemble de fichiers pouvant aller dans les
  rpertoires /bin et /sbin. Il ne contient aucun des utilitaires
  ncessaires  la rcupration d'une sauvegarde, tels que cpio, tar et
  gzip. C'est parce que je place ceux-ci sur une disquette utilitaire
  spare, pour conserver de la place sur la disquette d'amorce et
  racine. Une fois la disquette d'amorce/racine dmarre, elle est
  copie sur le disque mmoire, laissant ainsi le lecteur de disquette
  libre pour en monter une autre, la disquette utilitaire. En gnral je
  la monte sur /usr.

  La cration d'une disquette utilitaire est dcrite ci-dessous dans la
  section ``Construire un disque utilitaire''. Il est probablement
  souhaitable d'y maintenir une copie des mmes versions d'utilitaires
  de sauvegarde que ceux utiliss pour crire les sauvegardes, histoire
  de ne pas perdre de temps en essayant d'installer des versions qui ne
  peuvent pas lire vos bandes de sauvegarde.

  _V__r_i_f_i_e_z _q_u_e _v_o_u_s _m_e_t_t_e_z _l_e_s _p_r_o_g_r_a_m_m_e_s _s_u_i_v_a_n_t_s _: init, getty ou un
  quivalent, login, mount, un shell capable de faire tourner votre
  script rc, un lien de sh vers le shell en question.



  44..33..44..  //lliibb


  Vous mettez dans /lib les bibliothques partages et chargeurs
  ncessaires. Si les bibliothques ncessaires ne sont pas trouves
  dans /lib, le systme ne pourra pas dmarrer. Avec de la chance, un
  message vous expliquera pourquoi.

  Pratiquement tous les programmes ont au moins besoin de la
  bibliothque libc, libc.so._N, _N tant le numro de version courant.
  Vrifiez votre rpertoire /lib, libc.so.N est en gnral un lien
  symbolique vers un fichier avec un numro de version complet :



       % ls -l /lib/libc.so*
       -rwxr-xr-x   1 root     root      4016683 Apr 16 18:48 libc-2.1.1.so*
       lrwxrwxrwx   1 root     root           13 Apr 10 12:25 libc.so.6 -> libc-2.1.1.so*




  Dans le cas prsent, il vous faut libc-2.1.1.so. Pour trouver les
  autres bibliothques ncessaires, il faut lancer la commande ldd sur
  tous les excutables que vous prvoyez de mettre sur la disquette. Par
  exemple :
          % ldd /sbin/mke2fs
          libext2fs.so.2 => /lib/libext2fs.so.2 (0x40014000)
          libcom_err.so.2 => /lib/libcom_err.so.2 (0x40026000)
          libuuid.so.1 => /lib/libuuid.so.1 (0x40028000)
          libc.so.6 => /lib/libc.so.6 (0x4002c000)
          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)



  Tous les fichiers  droite sont ncessaires. Le fichier peut en
  ralit tre un lien symbolique.

  Notez que certaines bibliothques sont _a_s_s_e_z _g_r_o_s_s_e_s et ne tiendront
  pas facilement sur votre systme racine. Par exemple, la libc.so cite
  prcdemment fait environ 4 mgas. Vous devrez probablement nettoyer
  les bibliothques en les copiant sur votre systme racine. Reportez-
  vous  la section ``Rduire la taille du systme racine'' pour plus
  d'informations.

  Il faut galement inclure dans /lib un chargeur pour les
  bibliothques. Il s'agira soit de ld.so (pour les bibliothques
  a.out), soit de ld-linux.so (pour les bibliothques ELF). Les versions
  rcentes de ldd vous indiquent de quel chargeur vous avez besoin,
  comme dans l'exemple ci-dessus, mais de plus anciennes versions ne le
  font pas forcment. Si vous ne savez pas duquel vous avez besoin,
  utilisez la commande file sur la bibliothque. Par exemple :


          % file/lib/libc.so.4.7.2 /lib/libc.so.5.4.33 /lib/libc-2.1.1.so
          /lib/libc.so.4.7.2: Linux/i386 demand-paged executable (QMAGIC), stripped
          /lib/libc.so.5.4.33: ELF 32-bit LSB shared object, Intel 80386, version 1, stripped
          /lib/libc-2.1.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1, not stripped



  Le mot QMAGIC indique que 4.7.2 est pour les bibliothques a.out, et
  ELF que 5.4.33 et 2.1.1 sont pour les ELF.

  Copiez le ou les chargeurs dont vous avez besoin sur le systme racine
  que vous tes en train de construire. Les bibliothques et chargeurs
  doivent tre tests _a_t_t_e_n_t_i_v_e_m_e_n_t avec les excutables inclus. Si le
  noyau ne peut charger une bibliothque ncessaire, il s'arrtera en
  gnral net, sans message d'erreur.



  44..44..  UUttiilliissaattiioonn ddee PPAAMM eett NNSSSS


  Votre systme peut utiliser des bibliothques charges dynamiquement
  mais invisible  ldd.


  44..44..11..  PPAAMM ((PPlluuggggaabbllee AAuutthheennttiiccaattiioonn MMoodduulleess))


  Si votre systme utilise PAM (Pluggable Authentication Modules, soit
  Modules Externes d'Authentification), tenez-en compte dans la
  construction de votre disque d'amorce, sans quoi vous ne pourrez pas
  vous loguer. En quelques mots, PAM est une mthode modulaire
  sophistique pour authentifier les utilisateurs et contrler leur
  accs aux services. Pour dterminer simplement si votre systme
  utilise PAM, cherchez dans le rpertoire /etc de votre disque dur un
  fichier pam.conf ou un rpertoire pam.d ; si l'un des deux existe,
  vous devez prvoir un minimum de support pour PAM. (Vous pouvez aussi
  lancer ldd sur votre excutable login ; si la sortie contient
  libpam.so, vous avez besoin de PAM.)

  Heureusement, la scurit est rarement un problme avec les disques
  d'amorce tant donn que quiconque avec un accs physique  la machine
  peut en gnral faire tout ce qu'il veut dessus. Vous pouvez donc
  compltement dsactiver PAM en crant un fichier /etc/pam.conf simple
  sur votre systme racine contenant :


  ______________________________________________________________________
  OTHER   auth       optional     /lib/security/pam_permit.so
  OTHER   account    optional     /lib/security/pam_permit.so
  OTHER   password   optional     /lib/security/pam_permit.so
  OTHER   session    optional     /lib/security/pam_permit.so
  ______________________________________________________________________



  Copiez galement le fichier /lib/security/pam_permit.so sur votre
  systme racine. Cette bibliothque ne fait qu'environ 8 Ko et ne cote
  donc pas grand chose.

  Notez bien que cette configuration donne  tous un accs complet aux
  fichiers et services de votre machine. Si vous avez des impratifs de
  scurit sur votre disque d'amorce pour une raison ou une autre, vous
  devrez copier une partie, voire l'ensemble de la configuration PAM de
  votre disque dur vers le systme racine. Lisez bien attentivement la
  documentation de PAM, et copiez toutes les bibliothques ncessaires
  depuis /lib/security vers votre systme racine.

  Vous devez aussi inclure /lib/libpam.so sur le disque racine. Mais
  vous le saviez dj puisque vous avez lanc ldd sur /bin/login qui
  vous a montr la dpendance.



  44..44..22..  NNSSSS ((NNaammee SSeerrvviiccee SSwwiittcchh))


  Si vous utilisez glibc (appele aussi libc6), vous devez tenir compte
  des services de noms sans quoi vous ne pourrez pas vous loguer. Le
  fichier /etc/nsswitch.conf contrle les recherches dans les bases de
  donnes pour divers services. Si vous ne comptez pas accder  des
  services du rseau (tels que des recherches DNS ou NIS), un simple
  fichier nsswitch.conf comme suit suffit :


  ______________________________________________________________________
          passwd:     files
          shadow:     files
          group:      files
          hosts:      files
          services:   files
          networks:   files
          protocols:  files
          rpc:        files
          ethers:     files
          netmasks:   files
          bootparams: files
          automount:  files
          aliases:    files
          netgroup:   files
          publickey:  files
  ______________________________________________________________________


  Ce fichier spcifie que tous les services ne sont fournis que par des
  fichiers locaux  la machine. Vous devez aussi inclure le fichier
  /lib/libnss_files.so.1 qui est charg dynamiquement pour grer les
  recherches dans les fichiers.

  Si vous comptez accder au rseau depuis votre disque d'amorce, vous
  pouvez crer un fichier nsswitch.conf plus complet. Voir la page de
  manuel de nsswitch pour plus de dtails. N'oubliez pas d'inclure un
  fichier /lib/libnss__s_e_r_v_i_c_e.so.1 pour chaque _s_e_r_v_i_c_e que vous ajoutez.



  44..55..  MMoodduulleess


  Si votre noyau est modulaire, vous devez savoir quels modules vous
  voudrez charger depuis votre disque d'amorce une fois le systme
  dmarr. Il vous faudra inclure les modules ftape et zftape si vos
  sauvegardes sont sur bandes, les modules pour priphriques SCSI si
  vous en avez, et ventuellement ceux pour le support PPP ou SLIP si
  vous souhaitez accder au rseau en cas d'urgence.

  Ces modules doivent tre placs dans /lib/modules. Vous devez aussi
  inclure insmod, rmmod et lsmod. Si vous souhaitez charger les modules
  automatiquement, prenez modprobe, depmod et swapout. Et si vous
  utilisez kerneld, prenez le avec son fichier de configuration
  /etc/conf.modules.

  Nanmoins, le principal avantage  utiliser les modules est que vous
  pouvez dplacer les modules non essentiels sur un disque utilitaire et
  ne les charger que lorsque ncessaire, ce qui prend alors moins de
  place sur le disque racine. Si vous devez grer beaucoup de
  priphriques, il vaut mieux procder de cette manire plutt que de
  construire un seul gros noyau contenant tous les gestionnaires.

  _A_t_t_e_n_t_i_o_n_, _p_o_u_r _d__m_a_r_r_e_r _a_v_e_c _u_n _s_y_s_t__m_e _d_e _f_i_c_h_i_e_r_s _e_x_t_2 _c_o_m_p_r_e_s_s__,
  _v_o_u_s _d_e_v_e_z _a_v_o_i_r _i_n_c_l_u_s _l_e _s_u_p_p_o_r_t _p_o_u_r _d_i_s_q_u_e _m__m_o_i_r_e _e_t _e_x_t_2_. Ils ne
  peuvent tre installs par modules.



  44..66..  QQuueellqquueess uullttiimmeess ddttaaiillss


  Certains programmes, tels que login, se plaignent si le fichier
  /var/run/utmp et le rpertoire /var/log n'existent pas.  Donc :


          mkdir -p /mnt/var/{log,run}
          touch /mnt/var/run/utmp



  Enfin, aprs avoir install toutes les bibliothques dont vous avez
  besoin, lancez ldconfig pour refabriquer /etc/ld.so.cache sur le
  systme racine. Le cache indique au loader o trouver les
  bibliothques. Pour refabriquer ld.so.cache, lancez les commandes
  suivantes :


          chdir /mnt; chroot /mnt /sbin/ldconfig



  La commande chroot est ncessaire car ldconfig reconstruit toujours le
  cache pour le systme racine courant.
  44..77..  CC''eesstt ddaannss llaa ppoocchhee


  Une fois le systme racine construit, dmontez-le, copiez-le dans un
  fichier et compressez-le :


          umount /mnt
          dd if=PRIPHRIQUE bs=1k | gzip -v9 > rootfs.gz



  Une fois cette tape effectue, vous obtenez un fichier rootfs.gz
  contenant votre systme racine compress. Vrifiez sa taille pour tre
  sr qu'il tient sur une disquette. Si a n'est pas le cas vous devrez
  y retourner pour supprimer certains fichiers. La section ``Rduire la
  taille du systme racine'' vous donnera des astuces pour y arriver.



  55..  CChhooiissiirr uunn nnooyyaauu


  Vous avez maintenant un systme de fichiers racine complet et
  compress. La prochaine tape consiste  construire ou choisir un
  noyau. Dans la plupart des cas, vous pouvez copier votre noyau courant
  et dmarrer la disquette avec. Cependant dans certains cas, vous
  voudrez peut-tre construire un noyau diffrent.

  La taille peut jouer. Si vous faites une disquette d'amorce/racine
  unique, le noyau va tre un des plus gros fichiers de la disquette et
  il vaut donc mieux essayer d'en rduire la taille au maximum. Pour ce
  faire, construisez-le avec le minimum de fonctionnalits ncessaires
  au bon fonctionnement du systme cible. Cela implique de retirer tout
  ce dont vous n'avez pas besoin. Le support rseau est un bon candidat,
  tout comme le support pour tout type de disque et de priphrique dont
  vous n'avez pas l'usage sur un systme lanc par disquette. Comme
  indiqu prcdemment, votre noyau doit contenir le support pour disque
  mmoire et ext2.

  Une fois les fonctionnalits ncessaires dtermines, vous devez
  trouver ce qu'il faut rajouter. L'utilisation la plus courante d'une
  disquette d'amorce/racine est l'examen et la rcupration d'un systme
  racine endommag, ce qui peut ncessiter le support de certaines
  fonctionnalits supplmentaires dans le noyau. Par exemple, si vos
  sauvegardes sont stockes sur bande avec Ftape pour grer l'accs au
  lecteur de bande et que vous perdez votre disque racine ainsi que ceux
  contenant Ftape, vous ne pourrez plus rcuprer vos sauvegardes depuis
  les bandes. Vous devrez rinstaller Linux, rapatrier et rinstaller
  ftape, puis essayer de lire vos sauvegardes.

  Ce que je veux dire, c'est que quelle que soit la mthode d'E/S que
  vous utilisez au niveau du noyau pour les sauvegardes, elle doit se
  trouver aussi sur votre noyau d'amorce.


  La procdure de construction d'un noyau est dcrite dans la
  documentation fournie avec celui-ci. C'est assez simple  suivre, vous
  pouvez donc commencer par faire un tour dans /usr/src/linux. Si vous
  avez des problmes pour construire un noyau, vous ne devriez
  probablement pas essayer de faire de disquette d'amorce/racine de
  toute manire. Pensez  compresser le noyau avec "make zImage".




  66..  AAsssseemmbbllaaggee eett ffaabbrriiccaattiioonn ddee llaa oouu ddeess ddiissqquueetttteess


  Vous avez maintenant un noyau et un systme de fichiers compress. Si
  vous construisez un disque d'amorce/racine unique, vrifiez que leur
  taille ne dpasse pas celle du disque. Si vous avez un dcoupage sur
  deux disquettes, vrifiez que la taille du systme racine ne dpasse
  pas celle de la disquette.

  Il vous faut choisir entre l'utilisation de LILO pour dmarrer le
  noyau du disque d'amorce et la copie du noyau directement sur la
  disquette d'amorce, sans LILO. L'avantage de LILO est la possibilit
  de passer des paramtres au noyau, ce qui peut tre ncessaire pour
  initialiser votre matriel (Regardez le fichier /etc/lilo.conf sur
  votre machine. S'il existe et contient une ligne du type "append=...",
  vous avez besoin de passer des paramtres). Son inconvnient est une
  complexit accrue dans la construction du disque d'amorce, ainsi
  qu'une place occupe sur la disquette lgrement plus importante. Vous
  devrez configurer un petit systme de fichier spar que nous
  appellerons le ssyyssttmmee nnooyyaauu, o vous transfrerez le noyau ainsi que
  quelques autres fichiers ncessaires  LILO.


  Si vous dcidez d'utiliser LILO, continuez la lecture ; si par contre
  vous voulez copier le noyau directement sur la disquette, passez
  directement  la section ``Transfert du noyau sans LILO''.


  66..11..  TTrraannssffeerrtt dduu nnooyyaauu aavveecc LLIILLOO



  La premire chose  faire est de crer un petit fichier de
  configuration pour LILO. Il doit ressembler  :


  ______________________________________________________________________
          boot      =/dev/fd0
          install   =/boot/boot.b
          map       =/boot/map
          read-write
          backup    =/dev/null
          compact
          image     = NOYAU
          label     = Bootdisk
          root      =/dev/fd0
  ______________________________________________________________________



  Pour la signification de ces paramtres, voir la documentation
  utilisateur de LILO. Il vous faudra probablement aussi rajouter une
  ligne append=...  ce fichier, comme dans le fichier /etc/lilo.conf de
  votre disque dur.

  Sauvez-le en tant que bdlilo.conf.

  Vous devez maintenant crer un petit systme de fichier, que nous
  appellerons ssyyssttmmee nnooyyaauu, pour le diffrencier du systme racine.

  Tout d'abord, calculez la taille que celui-ci doit faire. Prenez la
  taille de votre noyau en blocs (la taille donne par "ls -l NOYAU"
  divise par 1024 et arrondie au chiffre suprieur), et ajoutez 50.
  Cinquante blocs sont en gros la taille ncessaire aux i-noeuds ainsi
  qu'aux autres fichiers. Vous pouvez calculer le nombre exact si vous
  voulez, ou simplement utiliser 50. Si vous crez un ensemble avec deux
  disques, vous pouvez carrment surestimer l'espace ncessaire puisque
  le disque n'est utilis que par le noyau de toute manire. Appelez ce
  nombre BLOCS_NOYAU.

  Mettez une disquette dans le lecteur (pour simplifier, supposons qu'il
  s'agit de /dev/fd0) et crez le systme noyau ext2 dessus :


          mke2fs -i 8192 -m 0 /dev/fd0 BLOCS_NOYAU




  L'option "-i 8192" indique que l'on souhaite un i-noeud pour 8192
  octets. Ensuite, montez le systme, supprimez le rpertoire lost+found
  et crez des rpertoire dev et boot pour LILO :


          mount /dev/fd0 /mnt
          rm -rf /mnt/lost+found
          mkdir /mnt/{boot,dev}



  Ensuite, crez les priphriques /dev/null et /dev/fd0. Au lieu de
  chercher leurs numros de priphriques, vous pouvez simplement les
  copier depuis votre disque dur avec l'option -R :


          cp -R /dev/{null,fd0} /mnt/dev



  LILO a besoin d'une copie de son chargeur d'amorce, boot.b, que vous
  pouvez trouver sur votre disque dur. Il est d'habitude dans le
  rpertoire /boot.


          cp /boot/boot.b /mnt/boot



  Enfin, copiez le fichier de configuration de LILO que vous avez cr
  prcdemment, avec votre noyau. Les deux peuvent tre placs dans le
  rpertoire racine :


          cp bdlilo.conf NOYAU /mnt



  Tout ce dont LILO a besoin est maintenant sur le systme noyau, vous
  pouvez donc le lancer. Le paramtre -r de LILO est utilis pour
  installer le chargeur sur une autre racine que la courante :


          lilo -v -C bdlilo.conf -r /mnt



  LILO doit s'excuter sans erreur, aprs quoi le systme noyau devrait
  ressembler  :




  ______________________________________________________________________
  total 361
    1 -rw-r--r--   1 root     root          176 Jan 10 07:22 bdlilo.conf
    1 drwxr-xr-x   2 root     root         1024 Jan 10 07:23 boot/
    1 drwxr-xr-x   2 root     root         1024 Jan 10 07:22 dev/
  358 -rw-r--r--   1 root     root       362707 Jan 10 07:23 vmlinuz
  boot:
  total 8
    4 -rw-r--r--   1 root     root         3708 Jan 10 07:22 boot.b
    4 -rw-------   1 root     root         3584 Jan 10 07:23 map
  dev:
  total 0
    0 brw-r-----   1 root     root       2,   0 Jan 10 07:22 fd0
    0 crw-r--r--   1 root     root       1,   3 Jan 10 07:22 null
  ______________________________________________________________________




  Ne vous inquitez pas si la taille des fichiers n'est pas exactement
  la mme que la votre.

  Laissez maintenant le disque dans le lecteur et allez  la section
  ``Mise en place du mot disque mmoire''.


  66..22..  TTrraannssffeerrtt dduu nnooyyaauu ssaannss LLIILLOO


  Si vous n'utilisez _p_a_s LILO, transfrez le noyau sur le disque
  d'amorce avec la commande dd :


          % dd if=NOYAU of=/dev/fd0 bs=1k
          353+1 records in
          353+1 records out



  Dans ce exemple, dd a crit 353 enregistrements complets, plus 1
  partiel, ce qui signifie que le noyau occupe les 354 premiers blocs de
  la disquette. Appelez ce nombre BLOCS_NOYAU et pensez  l'utiliser
  dans la section suivante.

  Enfin, indiquez que le priphrique racine doit tre la disquette
  elle-mme, et que le noyau doit tre charg en lecture/criture.


          rdev /dev/fd0 /dev/fd0
          rdev -R /dev/fd0 0




  Attention  bien utiliser un -R majuscule dans la seconde commande
  rdev.



  66..33..  MMiissee eenn ppllaaccee dduu mmoott ddiissqquuee mmmmooiirree


  Le mmoott ddiissqquuee mmmmooiirree situ dans l'image du noyau permet de spcifier
  o se trouve le systme racine, ainsi que d'autres options. Le mot
  peut tre lu et modifi avec la commande rdev, et sa valeur
  s'interprte de la manire suivante :
          bits  0-10 :    Dcalage jusqu'au dbut du disque mmoire, en blocs
                          de 1024 octets
          bits 11-13 :    Inutilis
          bit     14 :    Drapeau indiquant s'il faut charger un disque mmoire
          bit     15 :    Drapeau pour faire une pause avant de charger le
                          systme racine



  Si le bit 15 est mis  1, le noyau vous demandera au moment du
  dmarrage de changer la disquette dans le lecteur. C'est ncessaire si
  vous utilisez un ensemble de deux disques.

  Il y a deux cas, suivant que vous crez une disquette d'amorce/racine
  unique ou un ensemble "amorce+racine" spar.


  1. Si vous crez un disque unique, le systme racine compress sera
     plac juste aprs le noyau, et donc le dcalage sera le premier
     bloc libre (qui doit tre au mme endroit que BLOCS_NOYAU). Le bit
     14 sera mis  1, et le bit 15  0.

     Supposons par exemple que vous construisez un disque unique dont le
     systme racine doit commencer au bloc 253 (valeur dcimale). Le mot
     disque mmoire devrait valoir 253 (toujours en dcimal) avec le bit
     14  1 et le bit 15  0. Pour calculer sa valeur vous pouvez
     simplement additionner les valeurs dcimales. 253 + (2^14) = 253 +
     16384 = 16637. Si vous ne comprenez pas d'o sort ce nombre,
     entrez-le dans une calculatrice scientifique et convertissez-le en
     binaire.

  2. Si vous crez par contre un ensemble de deux disques, le systme
     racine sera au bloc zro du second disque, et le dcalage sera donc
     zro. Le bit 14 sera mis  1 tout comme le bit 15. La valeur
     dcimale sera donc de 2^14 + 2^15 = 49152 dans ce cas.


  Aprs avoir bien calcul la valeur du mot disque mmoire, crivez-le
  avec rdev -r. Attention  utiliser la valeur _d__c_i_m_a_l_e. Si vous
  utilisez LILO, l'argument de rdev doit tre le _c_h_e_m_i_n _d_'_a_c_c__s _a_u _n_o_y_a_u
  _m_o_n_t_, c'est  dire /mnt/vmlinuz ; si vous avez copi le noyau avec
  dd, utilisez  la place le nom du priphrique du lecteur de disquette
  (c'est  dire /dev/fd0).


          rdev -r NOYAU_OU_LECTEUR_DE_DISQUETTE VALEUR



  Si vous avez utilis LILO, dmontez maintenant la disquette.



  66..44..  TTrraannssffeerrtt dduu ssyyssttmmee rraacciinnee


  La dernire tape concerne le transfert du systme racine.


    Si le systme racine doit tre plac sur le mme disque que le
     noyau, transfrez-le avec dd et son option seek, qui indique
     combien de blocs sauter :


             dd if=rootfs.gz of=/dev/fd0 bs=1k seek=BLOCS_NOYAU

    Si le systme racine doit tre plac sur un second disque, sortez
     la premire disquette, mettez la seconde dans le disque, puis
     transfrez-y le systme racine :


             dd if=rootfs.gz of=/dev/fd0 bs=1k



  Bravo, vous avez fini ! _V_o_u_s _d_e_v_r_i_e_z _t_o_u_j_o_u_r_s _t_e_s_t_e_r _u_n _d_i_s_q_u_e
  _d_'_a_m_o_r_c_e _a_v_a_n_t _d_e _l_e _r_a_n_g_e_r _j_u_s_q_u_'_ _l_a _p_r_o_c_h_a_i_n_e _u_r_g_e_n_c_e _! S'il
  n'arrive pas  dmarrer, continuez  lire.



  77..  EEnn ccaass ddee pprroobbllmmee,, oouu LL''aaggoonniiee ddee llaa ddffaaiittee



  Lorsque l'on cre des disques d'amorce, les premiers essais n'amorcent
  souvent pas la machine. En gnral, la mthode utilise consiste 
  construire le disque racine  partir de composants de votre systme
  actuel pour essayer d'obtenir que le systme de la disquette commence
   afficher des messages sur la console. Une fois qu'il a commenc 
  vous parler, la bataille est presque gagne puisque vous pouvez voir
  de quoi il se plaint et corriger les problmes un  un jusqu' ce que
  le systme fonctionne normalement. Si le systme s'arrte brutalement
  sans explication, il peut tre difficile d'en trouver la cause. Pour
  que le systme en arrive au point o il commence  afficher ses
  messages, un certain nombre de composants doivent tre prsents et
  bien configurs. La procdure  suivre pour dterminer les raisons du
  silence de votre systme est la suivante :


    Si vous voyez un message du genre :


     Kernel panic: VFS: Unable to mount root fs on XX:YY



  C'est un problme courant qui ne peut avoir que quelques causes. Tout
  d'abord, cherchez le priphrique _X_X_:_Y_Y dans la listes de codes des
  priphriques ; s'agit-il du bon priphrique racine ?  Si ce n'est
  pas le bon, vous n'avez sans doute pas lanc rdev -R, ou alors sur la
  mauvaise image. Si le code du priphrique est correct, vrifiez
  attentivement quels gestionnaires de priphriques ont t compils
  dans le noyau. Assurez-vous le support pour le lecteur de disquettes,
  les disques mmoires et le systme de fichiers ext2 sont bien inclus ;

    Vrifiez que le disque racine contient bien les rpertoires que
     vous croyez. Il est facile de se tromper de niveau d'arborescence
     et de se retrouver avec quelque chose du genre /racine/bin au lieu
     de /bin sur votre disquette racine ;

    Vrifiez qu'il y a un /lib/libc.so avec le mme lien que celui
     prsent dans le rpertoire /lib de votre disque dur ;

    Vrifiez que tous les liens symboliques du rpertoire /dev de votre
     systme actuel existent galement sur le systme racine, quand ces
     liens sont vers des priphriques inclus sur la disquette racine.
     Notamment, les liens sur /dev/console sont souvent essentiels ;

    Vrifiez que vous avez inclus les fichiers /dev/tty1, /dev/null,
     /dev/zero, /dev/mem, /dev/ram et /dev/kmem ;

    Vrifiez la configuration de votre noyau : le support pour toutes
     les ressources ncessaires jusqu' l'invite de login doit tre
     directement inclus et non pas sous forme de modules. _L_e _s_u_p_p_o_r_t _d_e_s
     _d_i_s_q_u_e_s _m__m_o_i_r_e_s _e_t _d_e _e_x_t_2 _d_o_i_v_e_n_t _d_o_n_c __t_r_e _p_r__s_e_n_t_s _d_a_n_s _l_e
     _n_o_y_a_u ;

    Vrifiez que le priphrique racine et le disque mmoire sont
     correctement configurs dans le noyau.

  Une fois ces points gnraux vrifis, vous pouvez vous pencher sur
  ces points plus prcis :


  1. Vrifiez qu'init est prsent en tant que /sbin/init ou /bin/init,
     et qu'il est excutable ;

  2. Lancez ldd init pour vrifier les bibliothques d'init. Il n'y a
     normalement que libc.so, mais sait-on jamais... Vrifiez que vous
     avez bien inclus les bibliothques et leurs chargeurs ;

  3. Vrifiez que vous avez le bon chargeur pour vos bibliothques :
     ld.so pour a.out et ld-linux.so pour ELF ;

  4. Vrifiez le contenu de /etc/inittab sur la disquette d'amorce et
     ses ventuels appels  getty (ou tout autre programme du genre, tel
     que agetty, mgetty ou getty_ps).  Comparez-le plusieurs fois avec
     l'inittab de votre disque dur. Vrifiez les pages de manuel du
     programme que vous utilisez pour tre sr de sa cohrence. inittab
     peut tre le morceau le plus difficile en raison de sa syntaxe et
     du contenu qui dpendent de la version d'init utilise et de la
     nature du systme. La seule manire de s'en dbarrasser, c'est de
     lire les pages de manuel d'init et inittab afin de comprendre
     exactement ce que fait le systme lorsqu'il dmarre. Vrifiez que
     /etc/inittab contient bien une entre concernant l'initialisation
     du systme. Elle doit contenir une commande lanant le script
     d'initialisation du systme, qui doit lui aussi exister ;

  5. Comme pour init, lancez ldd sur votre getty pour voir ses besoins,
     et vrifiez que les bibliothques et chargeurs ncessaires sont
     prsents sur le systme racine ;

  6. Assurez-vous d'avoir inclus un excutable de shell (par exemple
     bash ou ash) capable de faire tourner tous vos scripts rc ;

  7. Si vous avez un fichier /etc/ld.so.cache sur le disque de secours,
     refabriquez-le (le fichier, pas le disque).



  Si init dmarre mais vous obtenez un message du type :


          Id xxx respawning too fast: disabled for 5 minutes




  il provient d'init et indique gnralement que getty ou login meurt
  aussitt aprs son lancement.  Vrifiez les excutables de getty et
  login, et les bibliothques dont ils dpendent. Vrifiez que les
  appels depuis /etc/inittab sont corrects. Si vous obtenez d'tranges
  messages de getty, cela peut signifier que les arguments dans
  /etc/inittab sont faux. Les options des programmes getty sont
  variables ; on signale que les arguments sont parfois incompatibles
  entre deux versions d'agetty.

  Si vous obtenez une invite de login et qu'aprs avoir entr un nom de
  login valide, le systme vous en demande un autre aussitt, le
  problme peut venir de PAM ou NSS. Lisez la section ``Utilisation de
  PAM et NSS''. Le problme peut aussi venir du fait que vous utilisez
  les mots de passe cachs et que vous n'avez pas copi le fichier
  /etc/shadow sur votre disque d'amorce.

  Si vous essayez de lancer un excutable tel que df prsent sur votre
  disque de secours, mais n'obtenez qu'un message du type : df: not
  found, vrifiez deux chose : (1) que le rpertoire contenant le
  binaire est bien dans votre PATH, et (2) que vous avez les
  bibliothques (et chargeurs) ncessaires au programme.



  88..  SSuujjeettss ddiivveerrss



  88..11..  RRdduuiirree llaa ttaaiillllee dduu ssyyssttmmee rraacciinnee


  Parfois un systme racine est trop gros pour tenir sur une disquette,
  mme aprs compression. Voici quelques techniques pour rduire sa
  taille, cites par ordre dcroissant d'efficacit :


     AAuuggmmeenntteezz llaa ddeennssiitt dduu ddiissqquuee
        Par dfaut, les disquettes sont formattes  1440 Ko, mais des
        formats plus denses existent. fdformat peut formatter des
        disques avec les tailles suivantes : 1600, 1680, 1722, 1743,
        1760, 1840 et 1920. La plupart des lecteurs 1440 Ko peuvent
        supporter 1722 Ko, et c'est ce que j'utilise toujours pour les
        disques d'amorce. Lisez la page de manuel de fdformat ainsi que
        /usr/src/linux/Documentation/devices.txt.


     CChhaannggeezz ddee sshheellll
        Certains shells populaires sous Linux, tels que bash et tcsh,
        sont gros et ncessitent de nombreuses bibliothques. D'autres
        options plus lgres existent, telles que ash, lsh, kiss et
        smash, bien plus petites et ncessitant peu (ou pas) de
        bibliothques. La plupart de ces shells de remplacement sont
        disponibles sur
        <http://metalab.unc.edu/pub/Linux/system/shells/>. Vrifiez que
        le shell que vous utilisez sait faire tourner les commandes de
        tous les scripts rc que vous incluez sur le disque d'amorce.


     NNeettttooyyeezz lleess bbiibblliiootthhqquueess eett bbiinnaaiirreess
        De nombreux binaires et bibliothques restent non nettoys (ils
        contiennent les informations pour le debogage). Si vous lancez
        'file' sur ces fichiers, il vous indiquera 'not stripped' si
        c'est le cas. Lorsque vous copiez des binaires sur votre systme
        racine, une bonne habitude  prendre est d'utiliser :


                objcopy --strip-all ORIGINE DESTINATION



     Et lorsque vous copiez des bibliothques :


             objcopy --strip-debug ORIGINE DESTINATION

     DDppllaacceezz lleess ffiicchhiieerrss nnoonn eesssseennttiieellss vveerrss uunn ddiissqquuee uuttiilliittaaiirree
        Si certains binaires ne sont pas immdiatement ncessaires au
        dmarrage ou au login, vous pouvez les dplacer sur un disque
        utilitaire. Lisez la section ``Construire un disque utilitaire''
        pour les dtails. Vous pouvez aussi dplacer les modules vers un
        disque utilitaire.



  88..22..  SSyyssttmmee rraacciinnee ssaannss ddiissqquuee mmmmooiirree



  La section ``Construire un systme racine'' explique comment
  construire un systme racine compress charg en mmoire lors du
  dmarrage du systme. Cette mthode qui prsente beaucoup d'avantages
  est souvent utilise. Nanmoins, certains systmes possdant peu de
  mmoire ne peuvent se permettre d'utiliser de la RAM pour un disque
  mmoire, et doivent donc utiliser un systme racine mont directement
  depuis la disquette.

  De tels systmes sont en ralit plus facile  construire que les
  systmes racines compresss car on peut les crer directement sur
  disquette plutt qu'en passant par un autre priphrique
  intermdiaire, et ne ncessitent pas de compression. Nous indiquerons
  les diffrences de procdure par rapports aux instructions
  prcdentes. Si vous choisissez cette mthode, rappelez-vous bien que
  vous aurez _b_e_a_u_c_o_u_p _m_o_i_n_s _d_'_e_s_p_a_c_e _d_i_s_q_u_e disponible.


  1. Calculez la taille disponible pour les fichiers racines.

     Si vous construisez un systme d'amorce/racine unique, vous devez
     arriver  faire tenir tous les blocs du noyau ainsi que tous les
     blocs du systme racine sur un seul disque.

  2. A l'aide de mke2fs, crez un systme racine de la bonne taille sur
     une disquette.

  3. Remplissez le systme comme dcrit prcdemment.

  4. Aprs cela, dmontez le systme et transfrez-le vers un fichier
     sur le disque, mais _s_a_n_s _l_e _c_o_m_p_r_e_s_s_e_r.

  5. Transfrez le noyau sur une disquette comme dcrit prcdemment.
     Lorsque vous calculerez le mot disque mmoire, mettez le bit 14  0
     pour indiquer que le systme racine ne doit pas tre charg en
     mmoire. Lancez la commande rdev indique.

  6. Transfrez le systme racine comme prcdemment.

  Vous pouvez prendre quelques raccourcis. Si vous construisez un
  systme avec deux disques, vous pouvez construire le systme de
  fichiers racine directement sur le second disque au lieu de le
  transfrer sur le disque dur puis  nouveau sur la disquette. De mme,
  si vous construisez un disque d'amorce/racine unique et si vous
  utilisez LILO, vous pouvez crer un systme de fichiers _u_n_i_q_u_e sur
  toute la disquette contenant le noyau, les fichiers de LILO et les
  fichiers racine, avant de simplement lancer LILO comme dernire tape.



  88..33..  CCoonnssttrruuiirree uunn ddiissqquuee uuttiilliittaaiirree



  Construire un disque utilitaire est assez facile : crez simplement un
  systme de fichiers sur une disquette formatte et copiez les fichiers
  dessus. Pour l'utiliser depuis un disque d'amorce, montez-le
  manuellement une fois le systme dmarr.

  Les instructions prcdentes indiquent qu'un disque utilitaire peut
  tre mont en tant que /usr. Dans ce cas, les binaires doivent tre
  placs dans un rpertoire /bin du disque utilitaire, afin d'tre
  rfrencs si vous mettez /usr/bin dans votre chemin. Les
  bibliothques supplmentaires ncessaires aux binaires sont  placer
  dans /lib sur le disque utilitaire.

  Il faut penser  plusieurs choses lorsque l'on cre un disque
  utilitaire :


  1. Ne placez pas de binaires ou de bibliothques essentiels au systme
     sur le disque utilitaire, puisqu'il ne sera montable qu'une fois le
     systme dmarr ;

  2. Vous ne pouvez pas utiliser de lecteur de disquette et de lecteur
     de bande sur port disquette en mme temps. Ce qui veut dire que si
     votre lecteur de bande est sur un port disquette, vous ne pourrez
     pas y accder tant que votre disque utilitaire sera mont ;

  3. L'accs aux fichiers du disque utilitaire sera lent.

  L'annexe ``Exemple de contenu de disque utilitaire'' montre ce que
  peut contenir un tel disque. Voici quelques ides de fichiers qui
  peuvent vous tre utiles : programmes de diagnostic et de manipulation
  de disques (format, fdisk) et systmes de fichiers (mke2fs, fsck,
  debugfs, isofs.o), un diteur de texte lger (elvis, jove), des
  utilitaires de compression et archivage (gzip, tar, cpio, afio), de
  gestion de bande (mt, tob, taper), de communication (ppp.o, slip.o,
  minicom) et de gestion de priphriques (setseriad, mknod).


  99..  LLaa mmtthhooddee ddeess pprrooss


  Vous avez peut-tre remarqu comme les disques d'amorce utiliss par
  les principales distributions comme Slackware, RedHat ou Debian
  paraissent plus sophistiqus que ce que dcrit ce document. Les
  disques d'amorce de distribution professionnelles se basent sur les
  mmes principes que ceux dcrits ici, mais utilisent diverses astuces
  pour satisfaire aux besoins supplmentaires de leurs disques d'amorce.
  Tout d'abord, ils doivent pouvoir fonctionner sur une grande varit
  de matriel et doivent donc pouvoir interagir avec l'utilisateur et
  charger divers gestionnaires de priphriques. Ensuite, ils doivent
  pouvoir travailler avec beaucoup d'options d'installation diffrentes,
  de manire plus ou moins automatique. Enfin, les disques d'amorce des
  distributions combinent en gnral la possibilit d'installer le
  systme avec celle de le rparer.


  Certains disques d'amorce utilisent une fonctionnalit appele iinniittrrdd
  (iinniittiiaall rraammddiisskk, ou ddiissqquuee mmmmooiirree iinniittiiaall). Cette fonctionnalit est
  apparue aux alentours de la version 2.0.x et permet au noyau de
  dmarrer en deux tapes. Quand le noyau commence son dmarrage, il
  charge une premire image de disque mmoire depuis le disque d'amorce.
  Ce disque mmoire initial est un systme racine contenant un programme
   excuter avant le chargement du vrai systme racine. Ce programme
  inspecte en gnral l'environnement et/ou demande  l'utilisateur de
  slectionner diverses options de dmarrage, telles que le priphrique
  sur lequel on va trouver le vrai disque racine. En gnral, il charge
  des modules supplmentaires ne faisant pas partie du noyau. Quand ce
  programme initial se termine, le noyau charge la vraie image racine et
  continue son dmarrage normalement. Pour plus d'information sur
  initrd, lisez /usr/src/linux/Documentation/initrd.txt et
  <ftp://elserv.ffm.fgan.de/pub/linux/loadlin-1.6/initrd-example.tgz>.

  Vous trouverez ci-dessous des rsums sur la manire dont les disques
  d'installation de chaque distribution semblent marcher, aprs tude de
  leurs systmes de fichiers et/ou code source. Nous ne garantissons pas
  l'exactitude des informations, ni qu'elles n'ont pas chang depuis les
  versions indiques.

  Slackware (v.3.1) utilise un dmarrage direct avec LILO semblable  la
  description de la section ``Transfert du noyau avec LILO''. Le disque
  d'amorce de la Slackware affiche un message de dmarrage ("Welcome to
  the Slackware Linux bootkernel disk!") en utilisant le paramtre
  message de LILO. Ce message indique  l'utilisateur d'entrer une ligne
  de paramtres de dmarrage si ncessaire. Aprs le dmarrage, un
  systme  racine est charg depuis une seconde disquette. L'utilisateur
  lance un  script de configuration (setup) qui dmarre l'installation.
  Au lieu d'utiliser  un noyau modulaire, Slackware fournit un certain
  nombre de noyaux diffrents, et c'est  l'utilisateur de fournir celui
  qui correspond  sa configuration matrielle.

  RedHat (v.4.0) utilise aussi un dmarrage avec LILO. Il charge un
  disque mmoire compress sur le premier disque, qui fait tourner une
  version personnalise d'init. Ce programme demande quels gestionnaires
  utiliser puis charge des fichiers supplmentaires depuis un autre
  disque si ncessaire.

  Debian (v.1.3) possde probablement le groupe de disques
  d'installation le plus sophistiqu. Il utilise le chargeur SYSLINUX
  pour choisir diffrentes options de chargement, puis utilise une image
  initrd pour guider l'utilisateur dans l'installation. Il semble
  utiliser  la fois des versions personnalises d'init et du shell.



  1100..  FFooiirree AAuuxx QQuueessttiioonnss ((FFAAQQ))


  QQ.. JJee ddmmaarrrree ddeeppuuiiss mmeess ddiissqquueess dd''aammoorrccee//rraacciinnee eett rriieenn nnee ssee ppaassssee..
  QQuuee ffaaiirree ??


  Voir la section prcdente ``En cas de problmes''.

  QQ.. CCoommmmeenntt ffoonnccttiioonnnnee llee ddiissqquuee dd''aammoorrccee SSllaacckkwwaarree//DDeebbiiaann//RReeddHHaatt ??


  Voir la section prcdente ``La mthode des pros''.

  QQ.. CCoommmmeenntt ffaaiirree uunn ddiissqquuee dd''aammoorrccee aavveecc uunn ggeessttiioonnnnaaiirree ppoouurr XXYYZZ ??


  Le plus simple est d'obtenir un noyau Slackware depuis le site miroir
  de Slackware le plus proche. Les noyaux Slackware sont des noyaux
  gnriques contenant le plus de gestionnaires pour le plus de
  priphriques diffrents possibles. Si vous avez un contrleur SCSI ou
  IDE, vous avez de bonnes chances de trouver un gestionnaire
  correspondant dans le noyau Slackware.

  Allez dans le rpertoire a1 et slectionnez un noyau SCSI ou IDE
  suivant votre type de contrleur. Vrifiez dans le fichier
  xxxxkern.cfg correspondant au noyau choisi qu'il contient bien les
  gestionnaires que vous voulez. Si c'est le cas, le noyau correspondant
  devrait pouvoir dmarrer votre ordinateur. Rcuprez le fichier
  xxxxkern.tgz et copiez-le sur votre disquette d'amorce comme indiqu
  dans la section sur la fabrication des disques d'amorce.

  Vous devez ensuite vrifier le priphrique racine indiqu dans le
  noyau, en utilisant la commande :

          rdev zImage



  rdev vous montrera alors le priphrique actuellement configur dans
  le noyau. Si ce n'est pas celui que vous voulez, utilisez rdev pour le
  changer. Par exemple, le noyau que j'ai essay pointait sur /dev/sda2,
  mais ma partition racine SCSI est sur /dev/sda8. Pour utiliser une
  disquette racine, vous devrez lancer la commande :


          rdev zImage /dev/fd0



  Si vous voulez aussi savoir comment configurer un disque racine
  Slackware, cela dpasse le cadre de ce HOWTO, et je vous suggre donc
  de consulter le Guide d'Installation de Linux ou de rcuprer la
  distribution Slackware. Voir la section ``Rfrences'' de ce HOWTO.

  QQ.. CCoommmmeenntt mmeettttrree  jjoouurr llee nnooyyaauu ddee mmaa ddiissqquueettttee dd''aammoorrccee ??


  Copiez simplement le noyau sur votre disquette d'amorce  l'aide de la
  commande dd s'il s'agit d'une disquette d'amorce sans systme de
  fichier, ou par la commande cp pour un disque d'amorce/racine.
  Reportez-vous  la section ``Dmarrage'' de ce HOWTO pour les dtails
  de cration d'un disque d'amorce. Le processus dcrit s'applique aussi
  bien  la mise  jour d'un noyau sur le disque d'amorce.

  QQ.. CCoommmmeenntt mmeettttrree  jjoouurr mmaa ddiissqquueettttee rraacciinnee aavveecc ddee nnoouuvveeaauuxx
  ffiicchhiieerrss ??


  Le plus simple est de recopier le systme de fichiers depuis le disque
  racine vers le PRIPHRIQUE que vous avez utilis (comme dans la
  section prcdente ``Cration du systme racine''). Montez ensuite le
  systme de fichiers et modifiez-le. Vous devez vous souvenir d'o
  partait votre systme racine et du nombre de blocs qu'il occupait :


          dd if=/dev/fd0 bs=1k skip=DEBUTRACINE count=BLOCS | \
                  gunzip > PRIPHRIQUE
          mount -t ext2 PRIPHRIQUE /mnt



  Une fois les modifications effectues, recommencez comme prcdemment
  (dans la section ``C'est dans la poche'') et retransfrez le systme
  racine sur le disque. Vous ne devriez pas avoir  retransfrer le
  noyau ou  recalculer le mot disque mmoire si vous ne changez pas la
  position de dpart du nouveau systme de fichiers.

  QQ.. CCoommmmeenntt rreettiirreerr LLIILLOO ppoouurr ppoouuvvooiirr rreeddmmaarrrreerr DDOOSS ??

  Ce n'est pas rellement un problme de disque d'amorce, mais il est
  souvent pos. Sous Linux, vous pouvez lancer :



          /sbin/lilo -u




  Vous pouvez aussi utiliser la commande dd pour copier la sauvegarde
  effectue par LILO sur le secteur d'amorce. Reportez-vous  la
  documentation de LILO si vous voulez essayer.

  Sous DOS et Windows vous pouvez utiliser la commande DOS :


               FDISK /MBR




  MBR signifie Master Boot Record (Enregistrement d'Amorce Matre), et
  il remplace le secteur de dmarrage avec une version propre du DOS,
  sans modifier la table de partitions. Certains puristes n'apprcient
  pas cette mthode, mais mme l'auteur de LILO, Werner Almesberger, le
  suggre. C'est facile et a marche.

  QQ.. CCoommmmeenntt ppuuiiss--jjee ddmmaarrrreerr ssii jj''aaii ppeerrdduu mmoonn nnooyyaauu _e_t mmoonn ddiissqquuee
  dd''aammoorrccee ??


  Si vous n'avez pas de disque d'amorce sous la main, le plus simple est
  d'obtenir un noyau Slackware pour votre type de contrleur de disque
  (IDE ou SCSI) comme dcrit prcdemment dans "Comment faire un disque
  d'amorce avec un gestionnaire pour XYZ ?". Vous pouvez alors dmarrer
  votre ordinateur avec ce noyau, puis rparer les dommages ventuels.

  Le noyau que vous rcuprerez peut ne pas avoir comme priphrique
  racine ce que vous souhaitez comme disque et partition. Par exemple,
  le noyau gnrique SCSI de Slackware utilise /dev/sda2 comme
  priphrique racine, alors que ma partition racine Linux se trouve
  tre /dev/sda8. Dans ce cas il faut changer le priphrique racine.

  Vous pouvez changer les paramtres de priphrique racine et disque
  mmoire du noyau mme si vous n'avez que le noyau, et un autre systme
  d'exploitation tel que DOS.

  rdev modifie les paramtres du noyau en changeant les valeurs  un
  dcalage fix dans le fichier du noyau, et vous pouvez donc faire de
  mme si vous avez un diteur hexadcimal disponible sous quelque
  systme d'exploitation fonctionnant encore -- par exemple, Norton
  Utilities Disk Editor sous DOS. Vous devez alors vrifier puis
  ventuellement modifier les valeurs dans le noyau, aux dcalages
  suivants :



       HEX     DEC  DESCRIPTION
       0x01F8  504  Octet de poids faible du mot disque mmoire
       0x01F9  505  Octet de poids fort du mot disque mmoire
       0x01FC  508  Numro mineur du priphrique racine : voir ci-dessous
       0X01FD  509  Numro majeur du priphrique racine : voir ci-dessous




  L'interprtation du mot disque mmoire tait dcrite dans la
  prcdente section ``Mise en place du mot disque mmoire''.


  Les numros majeurs et mineurs de priphrique doivent correspondre au
  priphrique  partir duquel le systme racine sera mont. Certaines
  valeurs utiles parmi lesquelles vous pouvez choisir sont :



       DEVICE        MAJEUR MINEUR
       /dev/fd0           2      0   1er lecteur de disquette
       /dev/hda1          3      1   partition 1 sur le 1er disque IDE
       /dev/sda1          8      1   partition 1 sur le 1er disque SCSI
       /dev/sda8          8      8   partition 8 sur le 1er disque SCSI




  Une fois ces valeurs mises en place, vous pouvez crire le fichier sur
  une disquette en utilisant soit Norton Utilities Disk Editor, soit un
  programme appel rawrite.exe. Ce programme est inclus dans toutes les
  distributions. C'est un programme DOS qui crit directement un fichier
  sur le disque, en commenant  partir du secteur d'amorce, au lieu de
  l'crire dans le systme de fichiers. Si vous utilisez Norton
  Utilities, vous devez crire le fichier un disque physique en
  commenant au dbut du disque.

  QQ.. CCoommmmeenntt ffaaiirree ddeess ccooppiieess ssuuppppllmmeennttaaiirreess ddeess ddiissqquueetttteess
  dd''aammoorrccee//rraacciinnee ??


  Les supports magntiques se dtriorant avec le temps, vous devriez
  conserver plusieurs copies de votre disque de secours, au cas o
  l'original n'est plus lisible.

  Le plus simple pour copier une disquette quelle qu'elle soit, y
  compris une disquette d'amorce ou utilitaire, est d'utiliser la
  commande dd pour copier le contenu de la disquette originale vers un
  fichier de votre disque dur, puis de rutiliser la mme commande pour
  recopier le fichier vers une nouvelle disquette. Notez que vous n'avez
  pas besoin de monter la disquette, et ne devriez pas le faire, car dd
  utilise l'interface directe du priphrique.

  Pour copier l'original, entrez la commande :


               dd if=NOMPRIPHRIQUE of=NOMFICHIER
               o NOMPRIPHRIQUE est le nom du priphrique du lecteur de disquette
               et NOMFICHIER le nom du fichier de sortie (sur le disque dur)




  Ne pas mettre le paramtre count permet  dd de copier la disquette en
  entier (2880 blocs en haute densit).

  Pour recopier le fichier rsultant sur une nouvelle disquette, insrez
  celle-ci et entrez la commande inverse :


               dd if=NOMFICHIER of=NOMPRIPHRIQUE




  A noter que la discussion prcdente suppose que vous n'avez qu'un
  seul lecteur de disquette. Si vous en avez deux du mme type, vous
  pouvez copier les disquettes  l'aide d'une commande du type :

               dd if=/dev/fd0 of=/dev/fd1




  QQ.. CCoommmmeenntt ppuuiiss--jjee ddmmaarrrreerr ssaannss aavvooiirr  ttaappeerr ""aahhaaxxxxxxxx==nnnn,,nnnn,,nnnn"" 
  cchhaaqquuee ffooiiss ??


  Quand un priphrique disque ne peut pas tre dtect automatiquement,
  il faut fournir au noyau une chane de paramtres de commande du
  priphrique, telle que :


               aha152x=0x340,11,3,1




  Cette chane peut tre fournie de diffrentes manires grce  LILO :


    En l'entrant sur la ligne de commande  chaque dmarrage du systme
     avec LILO. C'est assez ennuyeux ;

    En utilisant le mot cl "lock" de LILO pour lui faire stocker la
     ligne de commande comme ligne de commande par dfaut, ce qui fera
     utiliser  LILO les mmes options  chaque dmarrage ;

    En utilisant la directive append= dans le fichier de configuration
     de LILO. Attention  encadrer la chane de paramtres avec des
     guillemets.

  Par exemple, une ligne de commande utilisant la chane ci-dessus
  serait :


               zImage  aha152x=0x340,11,3,1 root=/dev/sda1 lock




  Cela passerait la chane de paramtres pour le priphrique tout en
  demandant au noyau d'utiliser /dev/sda1 comme priphrique racine et
  de sauvegarder la ligne de commande pour la rutiliser pour tous les
  dmarrages futurs.

  Un exemple de directive APPEND peut tre :


               APPEND = "aha152x=0x340,11,3,1"




  Attention, la chane de paramtres ne doit PAS tre entoure de
  guillemets sur la ligne de commande, mais DOIT l'tre dans la
  directive APPEND.

  Notez aussi que pour que la chane de paramtres soit utilise, le
  noyau doit contenir le gestionnaire pour ce type de disque. Si ce
  n'est pas le cas, personne n'coute la chane de paramtres, et vous
  devrez reconstruire le noyau pour inclure le gestionnaire requis. Pour
  plus de dtails sur la reconstruction du noyau, rendez-vous dans
  /usr/src/linux et lisez le README, et lisez la FAQ Linux et le HOWTO
  Installation. Vous pouvez aussi obtenir un noyau gnrique pour votre
  type de disque et l'installer.

  Il est fortement recommand aux lecteurs de lire la documentation de
  LILO avant de faire des expriences d'installation de LILO. Une
  utilisation imprudente de la directive BOOT peut endommager des
  partitions.

  QQ.. AAuu ddmmaarrrraaggee,, jj''oobbttiieennss ll''eerrrreeuurr ""AA:: ccaannnnoott eexxeeccuuttee BB""..  PPoouurrqquuooii ??


  Il existe plusieurs utilitaires qui rfrencent en dur le nom d'autres
  programmes. a n'arrive pas tout le temps, mais cela peut expliquer
  pourquoi un excutable peut ne pas tre trouv sur votre systme mme
  si vous l'y voyez. Vous pouvez vrifier si un programme donn est
  rfrence en dur dans un autre en utilisant la commande strings et en
  passant son rsultat par grep.

  On trouve comme exemples connus de rfrence en dur :

    shutdown dans certaines versions rfrence /etc/reboot en dur, et
     reboot doit donc tre plac dans le rpertoire /etc ;

    init a pos des problmes  au moins une personne, pour qui le
     noyau ne trouvait pas init.

  Pour corriger ces problmes, vous pouvez soit dplacer les programmes
  vers le rpertoire attendu, soit changer les fichiers de configuration
  (par exemple inittab) pour rfrencer le bon rpertoire. En cas de
  doute, mettez les programmes dans le mme rpertoire que sur votre
  disque dur, et utilisez les mmes fichiers inittab et /etc/rc.d que
  sur celui-ci.

  QQ.. MMoonn nnooyyaauu ggrree lleess ddiissqquueess mmmmooiirreess,, mmaaiiss lleess iinniittiiaalliissee  00 KKoo


  Quand cela arrive, un message du noyau apparatra au moment du
  dmarrage, du type :


          Ramdisk driver initialized : 16 ramdisks of 0K size



  C'est probablement parce que la taille a t fixe par les paramtres
  du noyau  0 au moment du dmarrage. Cela peut tre d  un paramtre
  oubli dans le fichier de configuration de LILO :



               ramdisk= 0




  Certaines vieilles distributions l'incluaient dans des exemples de
  fichiers de configuration de LILO, et servaient  craser les
  paramtres antrieurs du noyau. Si vous trouvez une telle ligne,
  supprimez-la.

  Attention, si vous essayez d'utiliser un disque mmoire dont la taille
  est de 0 Ko, le comportement est imprvisible et peut conduire  une
  panique (panic) du noyau.




  KK..  RReessssoouurrcceess eett ppooiinntteeuurrss


  Lorsque vous rcuprez un paquetage, prenez toujours la dernire
  version, sauf si vous avez de bonnes raisons pour ne pas le faire.


  KK..11..  DDiissqquueess dd''aammoorrccee pprrffaabbrriiqquuss


  Ce sont les sources des disques d'amorce des distributions. _M_e_r_c_i
  _d_'_u_t_i_l_i_s_e_r _u_n _s_i_t_e _m_i_r_o_i_r _p_o_u_r _r__d_u_i_r_e _l_a _c_h_a_r_g_e _s_u_r _c_e_s _m_a_c_h_i_n_e_s_.


    Disques d'amorce Slackware
     <http://metalab.unc.edu/pub/Linux/distributions/slackware/current/bootdsks.144/>,
     disques racines
     <http://metalab.unc.edu/pub/Linux/distributions/slackware/current/rootdsks/>
     et sites miroirs Slackware <http://www.slackware.com/getslack/> ;

    Disques d'amorce RedHat
     <http://metalab.unc.edu/pub/Linux/distributions/redhat/current/i386/images/>
     et sites miroirs Red Hat <http://www.redhat.com/mirrors.html> ;

    Disques d'amorce Debian
     <ftp://ftp.debian.org/pub/debian/dists/stable/main/disks-
     i386/current/> et sites miroirs Debian
     <ftp://ftp.debian.org/pub/debian/README.mirrors.html>.

  En plus des disques d'amorce des distributions, les images de disques
  de secours suivantes sont disponibles. Sauf prcision contraire, elles
  sont disponibles dans le rpertoire
  <http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html>.


    tomsrtbt, par Tom Oehser, est un disque d'amorce/racine unique 
     base de noyau 2.0, avec de nombreux programmes de support et
     fonctionnalits. Il support IDE, SCSI, les bandes, les adaptateurs
     rseaux, PCMCIA et plus encore. Environ 100 programmes utilitaires
     et autres outils sont inclus, pour rparer et rcuprer les
     disques. Le paquetage contient aussi des scripts pour dsassembler
     et reconstruire les images afin de pouvoir ajouter des complments
     si ncessaire ;



    rescue02, par John Comyns, est un disque de secours  base de noyau
     1.3.84, qui supporte IDE, Adaptec 1542 et NCR53C7,8xx. Il est 
     base de binaires ELF mais contient suffisamment de commandes pour
     tre utilis sur n'importe quel systme. Certains modules peuvent
     tre chargs aprs le dmarrage pour d'autres cartes SCSI. Il ne
     fonctionnera probablement pas sur les systmes avec 4 Mo de RAM car
     il utilise un disque mmoire de 3 Mo ;



    resque_disk-2.0.22, par Sergei Viznyuk, est un disque
     d'amorce/racine complet bas sur le noyau 2.0.22, comprenant le
     support pour IDE, de nombreux contrleurs SCSI, et ELF/a.out. Il
     contient aussi nombre de modules et d'utilitaires pour rparer et
     rcuprer un disque dur ;



    les images de cramdisk,  base de noyau 2.0.33, disponibles pour
     machines  4 et 8 Mo de mmoire. Elles contiennent l'mulation
     mathmatique et le rseau (PPP et script dialin, NE2000, 3C509), ou
     le support pour lecteur ZIP sur port parallle. Ces images de
     disquettes peuvent dmarrer un 386 avec 4 Mo de RAM. Le support de
     MSDOS est inclus, ce qui fait que vous pouvez les rcuprer sur le
     rseau vers une partition DOS.

     <http://metalab.unc.edu/pub/Linux/system/recovery/images>



  KK..22..  PPaaqquueettaaggeess ddee sseeccoouurrss


  Plusieurs paquetages de cration de disques de secours existent sur
  metalab.unc.edu. Vous prcisez  ces paquetages un ensemble de
  fichiers  inclure, et le logiciel automatise ( divers degrs) la
  cration d'un disque d'amorce. Voir
  <http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html> pour
  plus d'informations. _V__r_i_f_i_e_z _b_i_e_n _l_e_s _d_a_t_e_s _d_e_s _f_i_c_h_i_e_r_s : certains
  paquetages n'ont pas t mis  jour depuis des annes et ne supportent
  pas la cration d'un systme racine compress sur disque mmoire. A
  notre connaissance, Yard est le seul paquetage le permettant.



  KK..33..  SSccrriippttss sshheellll eett GGrraahhaamm CChhaappmmaann


  Graham Chapman a crit un ensemble de scripts pouvant tre utiles
  comme exemple sur la manire de crer des disques d'amorce. Dans les
  prcdentes versions de ce HOWTO, les scripts apparaissaient en
  annexe, mais ils ont t supprims du document et placs sur une page
  web :

  <http://www.zeta.org.au/~grahamc/linux.html>

  Vous pourrez trouver ces scripts utiles, mais si oui, lisez
  attentivement les instructions : par exemple, si vous prcisez le
  mauvais priphrique de pagination, vous verrez votre systme racine
  se faire compltement et dfinitivement effacer. Vrifiez que vous
  l'avez bien configur avant de le lancer !



  KK..44..  LLIILLOO :: llee cchhaarrggeeuurr LLiinnuuxx


  Ecrit par Werner Almesberger. Excellent chargeur d'amorce, dont la
  documentation comprend des informations sur le contenu du secteur
  d'amorce et les premires tapes du processus de dmarrage.

  Ftp depuis  <ftp://tsx-11.mit.edu/pub/linux/packages/lilo/>. Il est
  aussi disponible sur Metalab et ses miroirs.


  KK..55..  FFAAQQ LLiinnuuxx eett HHOOWWTTOOss


  Ils sont disponibles depuis de nombreuses sources. Jetez un coup
  d'oeil au forum Usenet news.answers et comp.os.linux.announce (et
  fr.comp.os.linux.annonces) pour une version franaise).

  La FAQ est disponible sur
  <http://metalab.unc.edu/pub/Linux/docs/faqs/linux-faq> et les HOWTOs
  sur  <http://metalab.unc.edu/pub/Linux/docs/HOWTO> (en franais, sur
  <http://www.freenix.fr/linux/HOWTO/>).
  La plupart des documentations sur Linux peuvent tre trouves sur la
  page principale du Linux Documentation Project
  <http://metalab.unc.edu/LDP/>.

  Si vous tes dsespr, envoyez un courrier lectronique  mail-
  server@rtfm.mit.edu avec le mot "help" dans le message, puis suivez
  les instructions.



  KK..66..  UUttiilliissaattiioonn dduu ddiissqquuee mmmmooiirree


  La documentation fournie avec le noyau Linux contient une excellente
  description de la manire dont fonctionne le nouveau code de disque
  mmoire. Voir /usr/src/linux/Documentation/ramdisk.txt. C'est crit
  par Paul Gortmaker, et comprend une section sur la cration d'un
  disque mmoire compress.



  KK..77..  LLee pprroocceessssuuss ddee ddmmaarrrraaggee ddee LLiinnuuxx


  Pour plus de dtails sur le processus de dmarrage de Linux, voici
  quelques pointeurs :


    Le Linux System Administrators' Guide (Guide des Administrateurs
     Systmes Linux) contient une section sur le dmarrage. Voir
     <http://metalab.unc.edu/LDP/LDP/sag/c1582.html> ;

    La "Technical overview" (Description technique succincte) de LILO
     <http://metalab.unc.edu/pub/Linux/system/boot/lilo/lilo-t-21.ps.gz>
     dcrit d'une manire extrmement pousse le processus de dmarrage,
     d'un point de vue technique et bas niveau, jusqu'au moment o le
     noyau est lanc ;

    Le code source est le guide ultime. Ci-dessous se trouvent quelques
     fichiers du noyau relatifs au processus de dmarrage. Si vous avez
     le code source du noyau Linux, vous pouvez les trouver sous
     /usr/src/linux sur votre machine ; sinon, Shigio Yamaguchi
     (shigio@wafu.netgate.net) a un trs sympathique navigateur
     hypertexte pour le noyau   <http://wafu.netgate.net/linux/>. Voici
     quelques fichiers correspondants :



     aarrcchh//ii338866//bboooott//bboooottsseecctt..SS,,sseettuupp..SS
        Contient le code assembleur pour le secteur d'amorce.


     aarrcchh//ii338866//bboooott//ccoommpprreesssseedd//mmiisscc..cc
        Contient le code pour dcompresser le noyau.


     aarrcchh//ii338866//kkeerrnneell//
        Rpertoire contenant le code d'initialisation du noyau. setup.c
        contient le mot disque mmoire.


     ddrriivveerrss//bblloocckk//rrdd..cc
        Contient le gestionnaire de disque mmoire. Les procdures
        rd_load et rd_load_image chargent des blocs depuis un
        priphrique vers un disque mmoire. La procdure
        identify_ramdisk_image dtermine quel type de systme de
        fichiers est trouv, et s'il est compress.





  LL..  CCooddeess dd''eerrrreeuurr dduu ddmmaarrrraaggee ddee LLIILLOO


  Les questions sur ces erreurs sont poses si souvent sur Usenet que
  nous les incluons ici en tant que service public. Ce rsum est
  extrait de la Documentation Utilisateur de LILO de Werner Almesberger,
  disponible sur
  <http://metalab.unc.edu/pub/Linux/system/boot/lilo/lilo-u-21.ps.gz>.

  Quand LILO se charge, il affiche le mot "LILO". Chaque lettre est
  imprime avant ou aprs l'excution d'une action spcifique. Si LILO
  choue  un moment donn, les lettres affiches jusque l peuvent tre
  utilises pour identifier le problme.



     ((rriieenn))
        Aucun morceau de LILO n'a t charg. Soit LILO n'est pas
        install, soit la partition sur laquelle son secteur d'amorce se
        trouve n'est pas active.


     LL  Le premier morceau du chargeur d'amorce a t charg et dmarr,
        mais il ne peut charger le second morceau. Les codes d'erreur 
        deux chiffres indiquent le type de problme. (Voir galement la
        section "Codes d'erreur disque".) Ce cas indique en gnral une
        panne de priphrique ou une incohrence de gomtrie (c'est 
        dire de mauvais paramtres disques).


     LLII Le premier morceau du chargeur d'amorce a pu charger le second
        morceau, mais n'a pas russi  l'excuter. Cela peut tre caus
        par une incohrence de gomtrie ou par le dplacement de
        /boot/boot.b sans lancer l'installateur de carte.


     LLIILL
        Le second morceau du chargeur d'amorce a t dmarr, mais il ne
        trouve pas la table de descripteurs dans le fichier carte. C'est
        en gnral d  une panne de priphrique ou une incohrence de
        gomtrie.


     LLIILL??
        Le second morceau du chargeur d'amorce a t charg  un adresse
        incorrecte. C'est en gnral caus par une subtile incohrence
        de gomtrie, ou par le dplacement de /boot/boot.b sans lancer
        l'installateur de carte.


     LLIILL--
        La table de descripteurs est corrompue. Cela peut tre d  une
        incohrence de gomtrie ou au dplacement de /boot/map sans
        lancer l'installeur.


     LLIILLOO
        Tous les lments de LILO ont t correctement chargs.


  Si le BIOS signale une erreur lorsque LILO essaye de charger une image
  d'amorce, le code d'erreur correspondant est affich. Ces codes vont
  de 0x00  0xbb. Reportez-vous au Guide Utilisateur de LILO pour leur
  explication.



  MM..  EExxeemmppllee ddee ccoonntteennuu ddee rrppeerrttooiirreess ssuurr uunn ddiissqquuee rraacciinnee



  Voici le contenu d'un exemple de systme racine et d'une disquette
  utilitaire.





















































  Rpertoire racine:
  drwx--x--x   2 root     root         1024 Nov  1 15:39 bin
  drwx--x--x   2 root     root         4096 Nov  1 15:39 dev
  drwx--x--x   3 root     root         1024 Nov  1 15:39 etc
  drwx--x--x   4 root     root         1024 Nov  1 15:39 lib
  drwx--x--x   5 root     root         1024 Nov  1 15:39 mnt
  drwx--x--x   2 root     root         1024 Nov  1 15:39 proc
  drwx--x--x   2 root     root         1024 Nov  1 15:39 root
  drwx--x--x   2 root     root         1024 Nov  1 15:39 sbin
  drwx--x--x   2 root     root         1024 Nov  1 15:39 tmp
  drwx--x--x   7 root     root         1024 Nov  1 15:39 usr
  drwx--x--x   5 root     root         1024 Nov  1 15:39 var

  /bin:
  -rwx--x--x   1 root     root        62660 Nov  1 15:39 ash
  -rwx--x--x   1 root     root         9032 Nov  1 15:39 cat
  -rwx--x--x   1 root     root        10276 Nov  1 15:39 chmod
  -rwx--x--x   1 root     root         9592 Nov  1 15:39 chown
  -rwx--x--x   1 root     root        23124 Nov  1 15:39 cp
  -rwx--x--x   1 root     root        23028 Nov  1 15:39 date
  -rwx--x--x   1 root     root        14052 Nov  1 15:39 dd
  -rwx--x--x   1 root     root        14144 Nov  1 15:39 df
  -rwx--x--x   1 root     root        69444 Nov  1 15:39 egrep
  -rwx--x--x   1 root     root          395 Nov  1 15:39 false
  -rwx--x--x   1 root     root        69444 Nov  1 15:39 fgrep
  -rwx--x--x   1 root     root        69444 Nov  1 15:39 grep
  -rwx--x--x   3 root     root        45436 Nov  1 15:39 gunzip
  -rwx--x--x   3 root     root        45436 Nov  1 15:39 gzip
  -rwx--x--x   1 root     root         8008 Nov  1 15:39 hostname
  -rwx--x--x   1 root     root        12736 Nov  1 15:39 ln
  -rws--x--x   1 root     root        15284 Nov  1 15:39 login
  -rwx--x--x   1 root     root        29308 Nov  1 15:39 ls
  -rwx--x--x   1 root     root         8268 Nov  1 15:39 mkdir
  -rwx--x--x   1 root     root         8920 Nov  1 15:39 mknod
  -rwx--x--x   1 root     root        24836 Nov  1 15:39 more
  -rws--x--x   1 root     root        37640 Nov  1 15:39 mount
  -rwx--x--x   1 root     root        12240 Nov  1 15:39 mt
  -rwx--x--x   1 root     root        12932 Nov  1 15:39 mv
  -r-x--x--x   1 root     root        12324 Nov  1 15:39 ps
  -rwx--x--x   1 root     root         5388 Nov  1 15:39 pwd
  -rwx--x--x   1 root     root        10092 Nov  1 15:39 rm
  lrwxrwxrwx   1 root     root            3 Nov  1 15:39 sh -> ash
  -rwx--x--x   1 root     root        25296 Nov  1 15:39 stty
  -rws--x--x   1 root     root        12648 Nov  1 15:39 su
  -rwx--x--x   1 root     root         4444 Nov  1 15:39 sync
  -rwx--x--x   1 root     root       110668 Nov  1 15:39 tar
  -rwx--x--x   1 root     root        19712 Nov  1 15:39 touch
  -rwx--x--x   1 root     root          395 Nov  1 15:39 true
  -rws--x--x   1 root     root        19084 Nov  1 15:39 umount
  -rwx--x--x   1 root     root         5368 Nov  1 15:39 uname
  -rwx--x--x   3 root     root        45436 Nov  1 15:39 zcat

  /dev:
  lrwxrwxrwx   1 root     root            6 Nov  1 15:39 cdrom -> cdu31a
  brw-rw-r--   1 root     root      15,   0 May  5  1998 cdu31a
  crw-------   1 root     root       4,   0 Nov  1 15:29 console
  crw-rw-rw-   1 root     uucp       5,  64 Sep  9 19:46 cua0
  crw-rw-rw-   1 root     uucp       5,  65 May  5  1998 cua1
  crw-rw-rw-   1 root     uucp       5,  66 May  5  1998 cua2
  crw-rw-rw-   1 root     uucp       5,  67 May  5  1998 cua3
  brw-rw----   1 root     floppy     2,   0 Aug  8 13:54 fd0
  brw-rw----   1 root     floppy     2,  36 Aug  8 13:54 fd0CompaQ
  brw-rw----   1 root     floppy     2,  84 Aug  8 13:55 fd0D1040
  brw-rw----   1 root     floppy     2,  88 Aug  8 13:55 fd0D1120
  brw-rw----   1 root     floppy     2,  12 Aug  8 13:54 fd0D360
  brw-rw----   1 root     floppy     2,  16 Aug  8 13:54 fd0D720
  brw-rw----   1 root     floppy     2, 120 Aug  8 13:55 fd0D800
  brw-rw----   1 root     floppy     2,  32 Aug  8 13:54 fd0E2880
  brw-rw----   1 root     floppy     2, 104 Aug  8 13:55 fd0E3200
  brw-rw----   1 root     floppy     2, 108 Aug  8 13:55 fd0E3520
  brw-rw----   1 root     floppy     2, 112 Aug  8 13:55 fd0E3840
  brw-rw----   1 root     floppy     2,  28 Aug  8 13:54 fd0H1440
  brw-rw----   1 root     floppy     2, 124 Aug  8 13:55 fd0H1600
  brw-rw----   1 root     floppy     2,  44 Aug  8 13:55 fd0H1680
  brw-rw----   1 root     floppy     2,  60 Aug  8 13:55 fd0H1722
  brw-rw----   1 root     floppy     2,  76 Aug  8 13:55 fd0H1743
  brw-rw----   1 root     floppy     2,  96 Aug  8 13:55 fd0H1760
  brw-rw----   1 root     floppy     2, 116 Aug  8 13:55 fd0H1840
  brw-rw----   1 root     floppy     2, 100 Aug  8 13:55 fd0H1920
  lrwxrwxrwx   1 root     root            7 Nov  1 15:39 fd0H360 -> fd0D360
  lrwxrwxrwx   1 root     root            7 Nov  1 15:39 fd0H720 -> fd0D720
  brw-rw----   1 root     floppy     2,  52 Aug  8 13:55 fd0H820
  brw-rw----   1 root     floppy     2,  68 Aug  8 13:55 fd0H830
  brw-rw----   1 root     floppy     2,   4 Aug  8 13:54 fd0d360
  brw-rw----   1 root     floppy     2,   8 Aug  8 13:54 fd0h1200
  brw-rw----   1 root     floppy     2,  40 Aug  8 13:54 fd0h1440
  brw-rw----   1 root     floppy     2,  56 Aug  8 13:55 fd0h1476
  brw-rw----   1 root     floppy     2,  72 Aug  8 13:55 fd0h1494
  brw-rw----   1 root     floppy     2,  92 Aug  8 13:55 fd0h1600
  brw-rw----   1 root     floppy     2,  20 Aug  8 13:54 fd0h360
  brw-rw----   1 root     floppy     2,  48 Aug  8 13:55 fd0h410
  brw-rw----   1 root     floppy     2,  64 Aug  8 13:55 fd0h420
  brw-rw----   1 root     floppy     2,  24 Aug  8 13:54 fd0h720
  brw-rw----   1 root     floppy     2,  80 Aug  8 13:55 fd0h880
  brw-rw----   1 root     disk       3,   0 May  5  1998 hda
  brw-rw----   1 root     disk       3,   1 May  5  1998 hda1
  brw-rw----   1 root     disk       3,   2 May  5  1998 hda2
  brw-rw----   1 root     disk       3,   3 May  5  1998 hda3
  brw-rw----   1 root     disk       3,   4 May  5  1998 hda4
  brw-rw----   1 root     disk       3,   5 May  5  1998 hda5
  brw-rw----   1 root     disk       3,   6 May  5  1998 hda6
  brw-rw----   1 root     disk       3,  64 May  5  1998 hdb
  brw-rw----   1 root     disk       3,  65 May  5  1998 hdb1
  brw-rw----   1 root     disk       3,  66 May  5  1998 hdb2
  brw-rw----   1 root     disk       3,  67 May  5  1998 hdb3
  brw-rw----   1 root     disk       3,  68 May  5  1998 hdb4
  brw-rw----   1 root     disk       3,  69 May  5  1998 hdb5
  brw-rw----   1 root     disk       3,  70 May  5  1998 hdb6
  crw-r-----   1 root     kmem       1,   2 May  5  1998 kmem
  crw-r-----   1 root     kmem       1,   1 May  5  1998 mem
  lrwxrwxrwx   1 root     root           12 Nov  1 15:39 modem -> ../dev/ttyS1
  lrwxrwxrwx   1 root     root           12 Nov  1 15:39 mouse -> ../dev/psaux
  crw-rw-rw-   1 root     root       1,   3 May  5  1998 null
  crwxrwxrwx   1 root     root      10,   1 Oct  5 20:22 psaux
  brw-r-----   1 root     disk       1,   1 May  5  1998 ram
  brw-rw----   1 root     disk       1,   0 May  5  1998 ram0
  brw-rw----   1 root     disk       1,   1 May  5  1998 ram1
  brw-rw----   1 root     disk       1,   2 May  5  1998 ram2
  brw-rw----   1 root     disk       1,   3 May  5  1998 ram3
  brw-rw----   1 root     disk       1,   4 May  5  1998 ram4
  brw-rw----   1 root     disk       1,   5 May  5  1998 ram5
  brw-rw----   1 root     disk       1,   6 May  5  1998 ram6
  brw-rw----   1 root     disk       1,   7 May  5  1998 ram7
  brw-rw----   1 root     disk       1,   8 May  5  1998 ram8
  brw-rw----   1 root     disk       1,   9 May  5  1998 ram9
  lrwxrwxrwx   1 root     root            4 Nov  1 15:39 ramdisk -> ram0
  ***  Je n'ai inclus de priphriques que pour les partitions IDE que
  ***  j'utilise. Si vous utilisez du SCSI, prenez les priphriques
  ***  /dev/sdXX  la place.
  crw-------   1 root     root       4,   0 May  5  1998 tty0
  crw--w----   1 root     tty        4,   1 Nov  1 15:39 tty1
  crw-------   1 root     root       4,   2 Nov  1 15:29 tty2
  crw-------   1 root     root       4,   3 Nov  1 15:29 tty3
  crw-------   1 root     root       4,   4 Nov  1 15:29 tty4
  crw-------   1 root     root       4,   5 Nov  1 15:29 tty5
  crw-------   1 root     root       4,   6 Nov  1 15:29 tty6
  crw-------   1 root     root       4,   7 May  5  1998 tty7
  crw-------   1 root     tty        4,   8 May  5  1998 tty8
  crw-------   1 root     tty        4,   9 May  8 12:57 tty9
  crw-rw-rw-   1 root     root       4,  65 Nov  1 12:17 ttyS1
  crw-rw-rw-   1 root     root       1,   5 May  5  1998 zero

  /etc:
  -rw-------   1 root     root          164 Nov  1 15:39 conf.modules
  -rw-------   1 root     root          668 Nov  1 15:39 fstab
  -rw-------   1 root     root           71 Nov  1 15:39 gettydefs
  -rw-------   1 root     root          389 Nov  1 15:39 group
  -rw-------   1 root     root          413 Nov  1 15:39 inittab
  -rw-------   1 root     root           65 Nov  1 15:39 issue
  -rw-r--r--   1 root     root          746 Nov  1 15:39 ld.so.cache
  ***  ld.so.cache est cr par ldconfig et garde en cache les
  ***  emplacements des bibliothques. Beaucoup de choses ne
  ***  fonctionnent pas au dmarrage si ld.so.cache n'est pas l.
  ***  Vous pouvez soit le rgnrer aprs cration du disque d'amorce,
  ***  soit inclure ldconfig sur le disque d'amorce et le lancer
  ***  dans un script rc.x pour mettre le cache  jour.
  -rw-------   1 root     root           32 Nov  1 15:39 motd
  -rw-------   1 root     root          949 Nov  1 15:39 nsswitch.conf
  drwx--x--x   2 root     root         1024 Nov  1 15:39 pam.d
  -rw-------   1 root     root          139 Nov  1 15:39 passwd
  -rw-------   1 root     root          516 Nov  1 15:39 profile
  -rwx--x--x   1 root     root          387 Nov  1 15:39 rc
  -rw-------   1 root     root           55 Nov  1 15:39 shells
  -rw-------   1 root     root          774 Nov  1 15:39 termcap
  -rw-------   1 root     root           78 Nov  1 15:39 ttytype
  lrwxrwxrwx   1 root     root           15 Nov  1 15:39 utmp -> ../var/run/utmp
  lrwxrwxrwx   1 root     root           15 Nov  1 15:39 wtmp -> ../var/log/wtmp

  /etc/pam.d:
  -rw-------   1 root     root          356 Nov  1 15:39 other

  /lib:
  *** J'ai un systme ELF avec glibc qui ncessite donc le chargeur ld-2.so.
  -rwxr-xr-x   1 root     root        45415 Nov  1 15:39 ld-2.0.7.so
  lrwxrwxrwx   1 root     root           11 Nov  1 15:39 ld-linux.so.2 -> ld-2.0.7.so
  -rwxr-xr-x   1 root     root       731548 Nov  1 15:39 libc-2.0.7.so
  lrwxrwxrwx   1 root     root           13 Nov  1 15:39 libc.so.6 -> libc-2.0.7.so
  lrwxrwxrwx   1 root     root           17 Nov  1 15:39 libcom_err.so.2 -> libcom_err.so.2.0
  -rwxr-xr-x   1 root     root         6209 Nov  1 15:39 libcom_err.so.2.0
  -rwxr-xr-x   1 root     root       153881 Nov  1 15:39 libcrypt-2.0.7.so
  lrwxrwxrwx   1 root     root           17 Nov  1 15:39 libcrypt.so.1 -> libcrypt-2.0.7.so
  -rwxr-xr-x   1 root     root        12962 Nov  1 15:39 libdl-2.0.7.so
  lrwxrwxrwx   1 root     root           14 Nov  1 15:39 libdl.so.2 -> libdl-2.0.7.so
  lrwxrwxrwx   1 root     root           16 Nov  1 15:39 libext2fs.so.2 -> libext2fs.so.2.4
  -rwxr-xr-x   1 root     root        81382 Nov  1 15:39 libext2fs.so.2.4
  -rwxr-xr-x   1 root     root        25222 Nov  1 15:39 libnsl-2.0.7.so
  lrwxrwxrwx   1 root     root           15 Nov  1 15:39 libnsl.so.1 -> libnsl-2.0.7.so
  -rwx--x--x   1 root     root       178336 Nov  1 15:39 libnss_files-2.0.7.so
  lrwxrwxrwx   1 root     root           21 Nov  1 15:39 libnss_files.so.1 -> libnss_files-2.0.7.so
  lrwxrwxrwx   1 root     root           14 Nov  1 15:39 libpam.so.0 -> libpam.so.0.64
  -rwxr-xr-x   1 root     root        26906 Nov  1 15:39 libpam.so.0.64
  lrwxrwxrwx   1 root     root           19 Nov  1 15:39 libpam_misc.so.0 -> libpam_misc.so.0.64
  -rwxr-xr-x   1 root     root         7086 Nov  1 15:39 libpam_misc.so.0.64
  -r-xr-xr-x   1 root     root        35615 Nov  1 15:39 libproc.so.1.2.6
  lrwxrwxrwx   1 root     root           15 Nov  1 15:39 libpwdb.so.0 -> libpwdb.so.0.54
  -rw-r--r--   1 root     root       121899 Nov  1 15:39 libpwdb.so.0.54
  lrwxrwxrwx   1 root     root           19 Nov  1 15:39 libtermcap.so.2 -> libtermcap.so.2.0.8
  -rwxr-xr-x   1 root     root        12041 Nov  1 15:39 libtermcap.so.2.0.8
  -rwxr-xr-x   1 root     root        12874 Nov  1 15:39 libutil-2.0.7.so
  lrwxrwxrwx   1 root     root           16 Nov  1 15:39 libutil.so.1 -> libutil-2.0.7.so
  lrwxrwxrwx   1 root     root           14 Nov  1 15:39 libuuid.so.1 -> libuuid.so.1.1
  -rwxr-xr-x   1 root     root         8039 Nov  1 15:39 libuuid.so.1.1
  drwx--x--x   3 root     root         1024 Nov  1 15:39 modules
  drwx--x--x   2 root     root         1024 Nov  1 15:39 security

  /lib/modules:
  drwx--x--x   4 root     root         1024 Nov  1 15:39 2.0.35

  /lib/modules/2.0.35:
  drwx--x--x   2 root     root         1024 Nov  1 15:39 block
  drwx--x--x   2 root     root         1024 Nov  1 15:39 cdrom

  /lib/modules/2.0.35/block:
  -rw-------   1 root     root         7156 Nov  1 15:39 loop.o

  /lib/modules/2.0.35/cdrom:
  -rw-------   1 root     root        24108 Nov  1 15:39 cdu31a.o

  /lib/security:
  -rwx--x--x   1 root     root         8771 Nov  1 15:39 pam_permit.so

  ***  Rpertoires bases pour les montages
  /mnt:
  drwx--x--x   2 root     root         1024 Nov  1 15:39 SparQ
  drwx--x--x   2 root     root         1024 Nov  1 15:39 cdrom
  drwx--x--x   2 root     root         1024 Nov  1 15:39 floppy

  /proc:

  /root:
  -rw-------   1 root     root          176 Nov  1 15:39 .bashrc
  -rw-------   1 root     root          182 Nov  1 15:39 .cshrc
  -rw-------   1 root     root           47 Nov  1 15:39 .glintrc
  -rwx--x--x   1 root     root          455 Nov  1 15:39 .profile
  -rw-------   1 root     root         4014 Nov  1 15:39 .tcshrc

  /sbin:
  -rwx--x--x   1 root     root        23976 Nov  1 15:39 depmod
  -rwx--x--x   2 root     root       274600 Nov  1 15:39 e2fsck
  -rwx--x--x   1 root     root        41268 Nov  1 15:39 fdisk
  -rwx--x--x   1 root     root         9396 Nov  1 15:39 fsck
  -rwx--x--x   2 root     root       274600 Nov  1 15:39 fsck.ext2
  -rwx--x--x   1 root     root        29556 Nov  1 15:39 getty
  -rwx--x--x   1 root     root         6620 Nov  1 15:39 halt
  -rwx--x--x   1 root     root        23116 Nov  1 15:39 init
  -rwx--x--x   1 root     root        25612 Nov  1 15:39 insmod
  -rwx--x--x   1 root     root        10368 Nov  1 15:39 kerneld
  -rwx--x--x   1 root     root       110400 Nov  1 15:39 ldconfig
  -rwx--x--x   1 root     root         6108 Nov  1 15:39 lsmod
  -rwx--x--x   2 root     root        17400 Nov  1 15:39 mke2fs
  -rwx--x--x   1 root     root         4072 Nov  1 15:39 mkfs
  -rwx--x--x   2 root     root        17400 Nov  1 15:39 mkfs.ext2
  -rwx--x--x   1 root     root         5664 Nov  1 15:39 mkswap
  -rwx--x--x   1 root     root        22032 Nov  1 15:39 modprobe
  lrwxrwxrwx   1 root     root            4 Nov  1 15:39 reboot -> halt
  -rwx--x--x   1 root     root         7492 Nov  1 15:39 rmmod
  -rwx--x--x   1 root     root        12932 Nov  1 15:39 shutdown
  lrwxrwxrwx   1 root     root            6 Nov  1 15:39 swapoff -> swapon
  -rwx--x--x   1 root     root         5124 Nov  1 15:39 swapon
  lrwxrwxrwx   1 root     root            4 Nov  1 15:39 telinit -> init
  -rwx--x--x   1 root     root         6944 Nov  1 15:39 update

  /tmp:

  /usr:
  drwx--x--x   2 root     root         1024 Nov  1 15:39 bin
  drwx--x--x   2 root     root         1024 Nov  1 15:39 lib
  drwx--x--x   3 root     root         1024 Nov  1 15:39 man
  drwx--x--x   2 root     root         1024 Nov  1 15:39 sbin
  drwx--x--x   3 root     root         1024 Nov  1 15:39 share
  lrwxrwxrwx   1 root     root           10 Nov  1 15:39 tmp -> ../var/tmp

  /usr/bin:
  -rwx--x--x   1 root     root        37164 Nov  1 15:39 afio
  -rwx--x--x   1 root     root         5044 Nov  1 15:39 chroot
  -rwx--x--x   1 root     root        10656 Nov  1 15:39 cut
  -rwx--x--x   1 root     root        63652 Nov  1 15:39 diff
  -rwx--x--x   1 root     root        12972 Nov  1 15:39 du
  -rwx--x--x   1 root     root        56552 Nov  1 15:39 find
  -r-x--x--x   1 root     root         6280 Nov  1 15:39 free
  -rwx--x--x   1 root     root         7680 Nov  1 15:39 head
  -rwx--x--x   1 root     root         8504 Nov  1 15:39 id
  -r-sr-xr-x   1 root     bin          4200 Nov  1 15:39 passwd
  -rwx--x--x   1 root     root        14856 Nov  1 15:39 tail
  -rwx--x--x   1 root     root        19008 Nov  1 15:39 tr
  -rwx--x--x   1 root     root         7160 Nov  1 15:39 wc
  -rwx--x--x   1 root     root         4412 Nov  1 15:39 whoami

  /usr/lib:
  lrwxrwxrwx   1 root     root           17 Nov  1 15:39 libncurses.so.4 -> libncurses.so.4.2
  -rw-r--r--   1 root     root       260474 Nov  1 15:39 libncurses.so.4.2

  /usr/sbin:
  -r-x--x--x   1 root     root        13684 Nov  1 15:39 fuser
  -rwx--x--x   1 root     root         3876 Nov  1 15:39 mklost+found

  /usr/share:
  drwx--x--x   4 root     root         1024 Nov  1 15:39 terminfo

  /usr/share/terminfo:
  drwx--x--x   2 root     root         1024 Nov  1 15:39 l
  drwx--x--x   2 root     root         1024 Nov  1 15:39 v

  /usr/share/terminfo/l:
  -rw-------   1 root     root         1552 Nov  1 15:39 linux
  -rw-------   1 root     root         1516 Nov  1 15:39 linux-m
  -rw-------   1 root     root         1583 Nov  1 15:39 linux-nic

  /usr/share/terminfo/v:
  -rw-------   2 root     root         1143 Nov  1 15:39 vt100
  -rw-------   2 root     root         1143 Nov  1 15:39 vt100-am

  /var:
  drwx--x--x   2 root     root         1024 Nov  1 15:39 log
  drwx--x--x   2 root     root         1024 Nov  1 15:39 run
  drwx--x--x   2 root     root         1024 Nov  1 15:39 tmp

  /var/log:
  -rw-------   1 root     root            0 Nov  1 15:39 wtmp

  /var/run:
  -rw-------   1 root     root            0 Nov  1 15:39 utmp

  /var/tmp:






  NN..  EExxeemmppllee ddee ccoonntteennuu ddeess rrppeerrttooiirreess dd''uunn ddiissqquuee uuttiilliittaaiirree





       total 579
       -rwxr-xr-x   1 root     root        42333 Jul 28 19:05 cpio*
       -rwxr-xr-x   1 root     root        32844 Aug 28 19:50 debugfs*
       -rwxr-xr-x   1 root     root       103560 Jul 29 21:31 elvis*
       -rwxr-xr-x   1 root     root        29536 Jul 28 19:04 fdisk*
       -rw-r--r--   1 root     root       128254 Jul 28 19:03 ftape.o
       -rwxr-xr-x   1 root     root        17564 Jul 25 03:21 ftmt*
       -rwxr-xr-x   1 root     root        64161 Jul 29 20:47 grep*
       -rwxr-xr-x   1 root     root        45309 Jul 29 20:48 gzip*
       -rwxr-xr-x   1 root     root        23560 Jul 28 19:04 insmod*
       -rwxr-xr-x   1 root     root          118 Jul 28 19:04 lsmod*
       lrwxrwxrwx   1 root     root            5 Jul 28 19:04 mt -> mt-st*
       -rwxr-xr-x   1 root     root         9573 Jul 28 19:03 mt-st*
       lrwxrwxrwx   1 root     root            6 Jul 28 19:05 rmmod -> insmod*
       -rwxr-xr-x   1 root     root       104085 Jul 28 19:05 tar*
       lrwxrwxrwx   1 root     root            5 Jul 29 21:35 vi -> elvis*












































  The Linux Busmouse Howto, version franaise
  Chris Bagwell, cbagwell@sprynet.com
  v2.0, 14 fvrier 2000

  (Adaptation et maintenance de la version franaise par  Philippe
  Gaucher <mailto://gaucher@easynet.fr>) Ce document explique comment
  installer, configurer et utiliser les souris  bus sous Linux. On y
  trouve la liste des souris reconnues et on tente de rpondre aux ques
  tions les plus courantes qui apparaissent dans les forums de discus
  sion sur Usenet et les listes de distribution.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Copyright et dngations
     1.2 Ractions
     1.3 Remerciements
     1.4 Notes sur la version franaise

  2. Dtermination du type de votre souris

     2.1 Les interfaces de souris
        2.1.1 Les souris Inport
        2.1.2 Les souris Logitech
        2.1.3 Les souris PS/2
        2.1.4 Les combins ATI
        2.1.5 Les digitaliseurs Palmpilot IBM PC110
        2.1.6 Les souris des ordinateurs Apple de bureau
        2.1.7 Souris hybride
     2.2 Les protocoles de souris

  3. Comment faire fonctionner votre souris

     3.1 Rglage de l'interruption de la souris
        3.1.1 Les souris Inport et Logitech
        3.1.2 Les souris ATI-XL
        3.1.3 Les souris PS/2
     3.2 Configuration du noyau
        3.2.1 Compilation du noyau
        3.2.2 Modification  des interruptions avec un noyau rcent
     3.3 Les

  4. Utilisation de votre souris

     4.1 Configuration des applications
        4.1.1 RedHat
        4.1.2 Autres distributions
     4.2 gpm.
     4.3 XFree86
     4.4 XFree86 et gpm

  5. Vous n'arrivez toujours pas  faire marcher votre souris ?

     5.1 Autres sources d'information
        5.1.1 3-Button Mouse HOWTO
        5.1.2 Laptop-HOWTO
        5.1.3 Wacom Tablet HOWTO


  ______________________________________________________________________



  11..  IInnttrroodduuccttiioonn

  Ce document est un guide pour faire marcher votre souris  bus sous
  Linux. Avec les distributions les plus avances qui sont disponibles
  actuellement, la configuration de ce type de souris est en gnral
  facile, mais si vous rencontrez vraiment des problmes, ce document
  vous donnera une meilleure comprhension sur la faon de configurer
  manuellement votre souris, au niveau matriel et logiciel.

  Aussi loin que je me souvienne, le support des souris  bus a toujours
  t implment dans le noyau, et il n'y a pas eu de relles
  modifications pendant une longue priode. Ce document devrait donc
  tre valable pour n'importe quelle version de Linux que vous pourriez
  vraisemblablement avoir.



  11..11..  CCooppyyrriigghhtt eett ddnnggaattiioonnss

  Ce document est Copyright (c)2000 par Chris Bagwell. Ce document peut
  tre distribu selon les termes de la license du _L_i_n_u_x _D_o_c_u_m_e_n_t_a_t_i_o_n
  _P_r_o_j_e_c_t  http://linuxdoc.org/copyright.html
  <http://linuxdoc.org/copyright.html>. Merci de contacter l'auteur si
  vous ne pouvez pas vous procurer cette licence.


  Vous utilisez les informations contenues dans ce document  vos
  propres risques. Nous dclinons toute responsabilit quant  son
  contenu. L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entirement  vos propres risques.

  Tous les droits sont dtenus par leurs propritaires respectifs, sauf
  mention contraire explicite. L'utilisation d'un terme dans ce document
  ne constitue pas une limitation  sa validit en tant que marque.

  Le fait de citer un produit ou une marque particulire ne constitue
  pas un endossement.

  Il est fortement conseill d'effectuer une sauvegarde de votre systme
  avant une installation importante ainsi qu' intervalles rguliers.




  11..22..  RRaaccttiioonnss

  Si vous trouvez des erreurs dans ce document, si vous avez le moindre
  commentaire  propos du contenu, une mise  jour ou bien un supplment
   ajouter, envoyez-le moi par un courriel  l'adresse lectronique
  signale tout au dbut.



  11..33..  RReemmeerrcciieemmeennttss

  Ce howto a t, dans l'esprit de Linux, un effort collectif. Tous mes
  remerciements  Mike Battersby, mib@deakin.edu.au qui commena cette
  FAQ. La plupart des erreurs ont probablement t rajoutes par moi-
  mme.


  Tous mes remerciements  Johan Myreen pour la section concernant les
  souris PS/2, Robert T. Harris pour son aide concernant les sections
  ATI-XL, Reuben Sumner pour des infos varies et des critiques
  constructives.

  Merci aussi  la foule des gens qui m'ont envoy des informations sur
  les souris, ou bien des corrections, et aussi des mots
  d'encouragement.




  11..44..  NNootteess ssuurr llaa vveerrssiioonn ffrraannaaiissee

  L'adaptation de ce document a t commence et maintenue par Patrick
  Robbe jusqu' la version 1.2, puis par Graud Canet jusqu' la version
  1.8.



  22..  DDtteerrmmiinnaattiioonn dduu ttyyppee ddee vvoottrree ssoouurriiss

  Il y a deux caractristiques diffrentes et importantes que vous aurez
  besoin de savoir concernant votre souris avant de continuer : quelle
  interface est utilise par la souris et quel est le protocole employ.


  L'interface est l'aspect matriel de la souris, et elle inclut des
  choses comme les ports d'entres/sorties utiliss ou comment vrifier
  que c'est install. C'est la partie qui concerne le noyau, afin qu'il
  sache comment lire les donnes provenant de la souris.


  Le protocole est l'aspect programmation de la souris. Les applications
  ont besoin de connatre ce protocole pour interprter les donnes
  brutes provenant de la souris, et qui leur sont envoyes par
  l'intermdiaire du noyau.



  22..11..  LLeess iinntteerrffaacceess ddee ssoouurriiss

  Le noyau de Linux jusqu'au 2.2 reconnat actuellement quatre types
  diffrents de souris bus : Inport (Microsoft), Logitech, PS/2 et ATI-
  XL.


  La srie 2.4 des noyaux inclut le support de plusieurs nouveaux bus de
  souris, notamment le pad digitaliseur PC110 d'IBM et la souris de
  bureau Apple. Elle contient aussi des pilotes pour des souris USB qui
  sont parfois discuts avec les souris  bus car elles ne rentrent pas
  dans le cadre des interfaces sries les plus courantes.


  Il n'y a pas de mthode miracle pour dterminer le type d'interface de
  votre souris -- les constructeurs de souris ont gnralement leur
  propre ide de ce qu'est un standard.  Les sections suivantes
  devraient vous aider, sinon il faudra improviser.


  22..11..11..  LLeess ssoouurriiss IInnppoorrtt

  Elles comprennent la plupart des souris Microsoft ancien style, celles
  qui ont la forme d'une savonnette Dove.  Les souris Inport se
  connectent gnralement  une carte d'interface qui se branche sur le
  bus de la carte mre. Si la prise du cble de votre souris est ronde,
  qu'elle a 9 contacts et une encoche sur l'un des cts, vous avez
  certainement une souris Inport.



  ATI affirme actuellement que toutes les cartes combo ATI VGA + bus
  pour souris utilisent le matriel de Inport Microsoft. Donc les
  possesseurs de telles cartes devraient en premier essayer d'utiliser
  les pilotes pour souris  bus Microsoft.


  La carte ATI-XL VGA + bus pour souris est en thorie compatible avec
  le pilote pour souris  bus Microsoft Inport mais a une utilisation
  des interruptions lgrement diffrentes et donc il y a un pilote
  spcifique.  vitez autant que possible ce pilote qui n'est pas trs
  bien support.




  22..11..22..  LLeess ssoouurriiss LLooggiitteecchh

  Les souris Logitech, en gnral, ressemblent comme deux gouttes d'eau
  aux souris Inport. Elles aussi se connectent  une carte d'interface
  via une prise mini-din  9 connecteurs. Elles sont d'habitude livres
  dans des botes Logitech, ou bien il y a marqu "Logitech" sur la
  carte d'interface, de faon  ce qu'on puisse formellement reconnatre
  que c'est une souris Logitech.




  22..11..33..  LLeess ssoouurriiss PPSS//22

  Les souris PS/2 ne sont pas du tout des souris qui se connectent sur
  le bus. L'interface des souris PS/2 n'est pas sur une carte
  d'extension, la souris tant connecte au port de priphrique
  auxiliaire PS/2 sur le contrleur clavier.  Une souris PS/2 est munie
  d'une prise mini-DIN  6 connecteurs, similaire  la prise du clavier.
  Beaucoup de portables utilisent galement ce type d'interface pour
  leur _t_r_a_c_k_b_a_l_l -- mis  part le connecteur, bien entendu.


  22..11..44..  LLeess ccoommbbiinnss AATTII ssoouurriiss--vviiddoo

  Les souris ATI-XL sont une variante des souris Inport, avec de lgres
  diffrences dans la configuration des interruptions. Elle sont
  fournies avec les cartes ATI-XL combinant l'adaptateur vido et
  l'interface souris. Si vous n'tes pas sr d'avoir une carte ATI-XL
  (et donc une souris du mme nom), c'est probablement que vous n'en
  avez pas.  Ce type de souris peut utiliser au choix le pilote ATI-XL
  ou Inport du noyau ; mme si le premier devrait donner de meilleurs
  rsultats.

  Il existe aussi une carte adaptateur vido/souris, plus ancienne,
  appele VGA1024 ou ATI VGA Wonder. Ces cartes sont faites de la mme
  faon que les ATI-XL, mais utilisent le protocole des souris Logitech.
  En ce qui concerne ces souris, bien que leur conception matrielle
  soit la mme que celle des ATI-XL, vous devez les configurer (IRQ) de
  la mme faon que les souris Logitech.



  22..11..55..  LLeess ddiiggiittaalliisseeuurrss PPaallmmppiilloott IIBBMM PPCC111100

  Le palmpilot IBM PC110 contient un pad digitaliseur qui peut tre
  utilis pour muler une souris grce au protocole des souris PS/2.
  Dans un tel cas, vous configurez l'interface matrielle  l'aide du
  pilote du priphrique IBM PC110 and configurez l'interface logicielle
  comme vous le feriez pour une souris PS/2.

  22..11..66..  LLeess ssoouurriiss ddeess oorrddiinnaatteeuurrss AAppppllee ddee bbuurreeaauu

  Ce bus de souris est commun  tous les Macintoshs et utilise un
  connecteur  4 broches. La souris est controle par le noyau mais
  toute application ncessitera d'tre informe sur la nature de ce
  protocole de souris particulier. Je ne suis pour le moment pas au
  courant du type de protocole qu'utilise cette souris.



  22..11..77..  SSoouurriiss hhyybbrriiddee

  A l'poque o les souris  bus taient populaires, les compagnies
  vendant du matriel ont beaucoup expriment et ont chang leurs
  technologies entre elles. Par consquent vous pourriez avoir une
  souris ATI qui utilise l'interface matriel de Logitech, ou une
  Logitech qui utilise l'interface Inport. Si vous savez que vous avez
  une souris  bus mais que vous n'arrivez pas  la faire marcher avec
  les configurations standards interface/protocole, essayez
  d'exprimenter en utilisant diffrents pilotes d'interfaces avec
  diffrents protocoles de souris.




  22..22..  LLeess pprroottooccoolleess ddee ssoouurriiss

  Le monde PC baigne dans des protocoles diffrents qui entrent en
  conflit les uns avec les autres. Heureusement, le choix de souris se
  connectant sur le bus est considrablement plus rduit que celui des
  souris srie. La plupart des souris Inport, Logitech et ATI-XL
  utilisent le protocole "BusMouse", bien qu'il y ait d'anciennes souris
  Logitech qui utilisent le protocole "MouseSystem", et d'autres encore
  plus anciennes qui utilisent le protocole "Logitech". Les souris PS/2
  utilisent le protocole PS/2.


  33..  CCoommmmeenntt ffaaiirree ffoonnccttiioonnnneerr vvoottrree ssoouurriiss

  Une fois que vous avez dtermin le type d'interface de votre souris
  et son protocole, vous tes prt  poursuivre.


  33..11..  RRggllaaggee ddee ll''iinntteerrrruuppttiioonn ddee llaa ssoouurriiss



  Maintenant que vous avez trouv quelle interface matrielle utilise
  votre souris, vous allez avoir besoin de savoir quelle interruption
  votre souris utilise, et de vous assurer qu'elle n'entre en conflit
  avec aucun des autres priphriques que vous avez installs. Ce
  dernier point mrite d'tre rpt : aassssuurreezz--vvoouuss qquu''eellllee nn''eennttrree eenn
  ccoonnfflliitt aavveecc aauuccuunn ddeess aauuttrreess pprriipphhrriiqquueess qquuee vvoouuss aavveezz iinnssttaallllss !!


  Assurez-vous que votre souris n'essaie pas d'utiliser la mme
  interruption que l'un de vos autres priphriques -- la souris ne peut
  pas partager une ligne d'interruption sous Linux, mme si elle le peut
  sous d'autres systmes d'exploitation. Consultez la documentation de
  tous vos autres priphriques pour voir quelle interruption ils
  utilisent.



  Les souris  bus sous Linux ne dclarent pas quelle IRQ elles
  utilisent jusqu' ce qu'elles soient sollicites par une application.
  Les matriels Plug-n-Play dclarent souvent leurs interruptions
  pendant la phase de dmarrage. Cela rend possible qu'une carte Plug-n-
  Play de votre matriel s'empare de l'IRQ de votre souris. Gardez 
  l'esprit que, si d'autres systmes d'exploitation peuvent initialiser
  ces cartes  une IRQ qui n'est pas utilise par votre souris, les
  choses peuvent ne pas tre aussi simples avec Linux. C'est  vous de
  vous assurer que l'ensemble de votre quipement ne connat pas de
  conflit.



  Dans la plupart des  cas, l'IRQ4 est utilise  par le premier port
  srie (/dev/ttyS0),    l'IRQ3   par  le  second (/dev/ttyS1)  (en
  supposant que vous ayez rellement ces priphriques  -- sinon vous
  pouvez en toute quitude utiliser leur IRQ),  l'IRQ5 pour certains
  adaptateurs SCSI, et l'IRQ12 pour  certaines cartes rseau. Avoir une
  carte utilisant l'IRQ12 est un srieux  problme,  dans  la  mesure
  o gnralement, vous ne pouvez utiliser que l'IRQ12 pour le port
  PS/2.


  Pour les  souris ATI-XL, Inport  et Logitech,  le  noyau utilise par
  dfaut l'IRQ5, donc si vous tes forc d'utiliser un noyau pr-compil
  (par exemple si vous utilisez Linux  partir d'un CD-ROM), vous devrez
  faire avec. Si vous utilisez  une  souris  Inport  ou Logitech avec
  un  noyau plus rcent, vous devriez pouvoir passer une option par la
  ligne de commande au noyau, lui indiquant les interruptions que vous
  utilisez, sans avoir  recompiler.


  33..11..11..  LLeess ssoouurriiss IInnppoorrtt eett LLooggiitteecchh

  Si vous ouvrez le capot de votre ordinateur et regardez la carte sur
  laquelle se branche votre souris, vous  devriez remarquer un bloc  de
  cavaliers sur la carte (avec  un peu de chance, il  sera indiqu
  "INTERRUPT"), avec les positions pour les interruptions (aussi
  appeles IRQ) numro 2,3,4 et 5. Pour changer d'interruption,
  dplacez  simplement le   cavalier de  sa  position actuelle  la
  paire de connecteurs approprie.



       ******************************************************
       ***     ASSUREZ-VOUS QUE L'ORDINATEUR EST TEINT   ***
       ***         AVANT DE TOUCHER AUX CAVALIERS         ***
       ******************************************************





  33..11..22..  LLeess ssoouurriiss AATTII--XXLL

  Les souris ATI-XL, ainsi que quelques autres souris ATI, ont une
  interruption rglable   par logiciel  -- vous  devriez  avoir reu
  avec  votre souris un programme MS-DOS (VSETUP.EXE) pour rgler l'IRQ.
  Pour ce faire, vous devez (provisoirement) redmarrer sous MS-DOS et
  excuter ce programme. Notez que  le programme VSETUP  reconnat un
  paramtre optionnel  /70  pour augmenter le   taux de
  rafrachissement   vertical (ce qui   diminue le scintillement). Le
  programme VSETUP vous permet  galement de  choisir entre l'adresse
  primaire  et l'adresse secondaire     --   vous avez intrt    
  slectionner  l'adresse  primaire, sinon  le  noyau  ne  sera pas
  capable de dtecter votre souris.


  Une  fois que  VSETUP aura t   excut,  vous devrez  faire  un
  redmarrage  froid (_h_a_r_d _r_e_s_e_t) pour que la nouvelle configuration
  prenne effet.


  33..11..33..  LLeess ssoouurriiss PPSS//22

  Les souris PS/2 utilisent  toujours l'IRQ 12 -- il  n'y  a aucun moyen
  de  le changer (sinon au fer  souder). Dans le  cas (rare) o un
  autre priphrique utilise l'IRQ 12, il vous faudra le reconfigurer
  pour qu'il utilise une autre ligne d'interruption.


  33..22..  CCoonnffiigguurraattiioonn dduu nnooyyaauu

  Pour que votre souris bus  fonctionne correctement, vous devrez
  recompiler le noyau en  y intgrant le support de   souris bus. Si
  vous utilisez un noyau prcompil, sachez que ces noyaux sont souvent
  munis d'un support intgr des trois  souris  bus. Ce ne   sera
  peut-tre pas  suffisant.  Le noyau pourrait essayer  d'utiliser une
  mauvaise     interruption, ou la  dtection  pourrait s'embrouiller et
  se tromper de type  de souris.


  Dans la srie pre-2.4 des noyaux il n'y a pas de support pour l'auto-
  dtection de l'IRQ qu'une souris  bus utilise. Donc si votre carte
  est configure pour autre chose que la valeur par dfaut IRQ5 du
  noyau, vous allez avoir besoin de faire reconnatre au noyau l'IRQ
  effectivement utilise. Cela peut tre fait plusieures manires. La
  plus simple est de passer l'information au noyau au moment du
  dmarrage dans une ligne de commande. Lire s'il-vous-plait la section
  ``Compilation du noyau'' mais aprs avoir d'abord lu la section
  ``Modification des interruptions sous un noyau rcent''. Une grande
  aide dans ce type de problme : le Bootprompt-HOWTO, disponible sur la
  plupart des sites qui distribuent ce HOWTO.





  33..22..11..  CCoommppiillaattiioonn dduu nnooyyaauu

  Allez   dans le   rpertoire  du noyau    (on  suppose  ici qu'il
  s'agit  de /usr/src/linux) et faites un



       make config




  Si vous n'tes  pas sr du  type de votre souris, la  premire  fois
  que vous recompilez le noyau, vous pouvez slectionner  toutes les
  souris bus qui vous sont proposes en option, dans l'espoir  que le
  noyau dtecte automatiquement le bon type.  Cette  mthode a  un
  succs mitig :  a ne  marche  pas toujours,  mais d'un autre ct a
  peut vous viter  d'avoir  recompiler le noyau plusieurs fois.

  Rpondez "y"ou "m"   la question  concernant votre type d'interface
  et "n"   toutes  les autres questions  concernant  les  souris bus.
  Utilisez l'option "m" si la configuration de votre systme permet le
  chargement des modules. Si ce n'est   pas le cas,  ou si  vous  ne pas
  comprenez de  quoi il s'agit,  il n'y a aucun  inconvnient  
  rpondre  "y", ce qui  intgrera directement le support dans le noyau.

  Par exemple, si vous avez une souris Inport, vous devrez rpondre "y"
   la question


       Microsoft busmouse support


  et "n"   toutes les  autres  questions sur les  souris bus.  Rpondez
  comme d'habitude  toutes les questions qui ne concernent pas les
  souris.

  Pour compiler le noyau avec le support des souris PS/2, rpondez "y" 
  la question


       PS/2 mouse (aka "auxiliary device") support


  Le pilote de souris PS/2 reconnat en fait deux types de
  priphriques : le contrleur standard PS/2 et une interface PS/2
  spciale de Chips &Technologies,   qui   est utilise  pour   les
  portables Texas  Instruments Travelmate et Gateway Nomad. Pour
  compiler le support des _t_r_a_c_k_b_a_l_l_s sur ces machines, rpondez "y"  la
  question


       C&T 82C710 mouse port support (as on TI Travelmate)


  Notez que   vous devrez auparavant avoir rpondu  "y"  la  question
  sur le pilote PS/2 standard pour avoir la possibilit de  rpondre 
  cette question, puisque le pilote 82C710 en est en fait un supplment.

  Lorsqu'il est configur  la fois  pour une interface PS/2 standard
  et pour le  contrleur 82C710,  le pilote recherche d'abord une  puce
  82C710 lors du  dmarrage. S'il choue, le  pilote standard est
  utilis   la place, donc un noyau configur pour les deux types
  d'interfaces devrait aussi fonctionner sur une machine dote d'un port
  PS/2 standard.  Toutefois, il y a eu un  cas rapport o  le pilote a
  dtect  par erreur  un processeur 82C710, alors pour mettre toutes
  les chances  de votre ct,   ne choisissez pas  le support du 82C710
  si vous n'en avez pas besoin.

  Compilez votre nouveau noyau et redmarrez normalement.

  Maintenant, vous  allez pouvoir  indiquer  au  noyau quelle
  interruption est utilise par votre  souris. Vous pouvez sauter  cette
  tape si vous avez  une souris PS/2, qui utilise toujours l'IRQ 12.

  Si vous  avez une souris Logitech, Inport,  ou une souris  ATI qui
  utilise le protocole             Logitech,               ditez
  le      fichier /usr/src/linux/include/linux/busmouse.h et changez la
  ligne :


       #define MOUSE_IRQ               5


  pour correspondre  l'IRQ rellement utilise par votre souris (Cf. la
  section ``Rglage de l'interruption de la souris'' pour des dtails
  concernant le rglage de l'IRQ)

  Si    vous    avez      une    souris   ATI-XL,      ditez     le
  fichier /usr/src/linux/drivers/char/atixlmouse.c et changez la ligne :


       #define ATIXL_MOUSE_IRQ         5


  pour correspondre  l'IRQ rellement utilise par votre souris.

   cause des caprices  de l'architecture PC,  si votre souris utilise
  l'IRQ 2, vous devez crire IRQ 9 dans le #define.

  Exemples :

  Pour une souris sur l'IRQ 3, modifiez la ligne comme suit :


       #define MOUSE_IRQ               3


  Pour une souris sur l'IRQ 2, modifiez la ligne comme suit :


       #define MOUSE_IRQ               9


  Ensuite, compilez le  noyau  selon  les instructions qui
  l'accompagnent  et redmarrez avec le  nouveau noyau.  Le support  de
  votre souris bus  devrait maintenant tre correctement inclus dans le
  noyau compil.




  33..22..22..  MMooddiiffiiccaattiioonn  ddeess iinntteerrrruuppttiioonnss aavveecc uunn nnooyyaauu rrcceenntt

  Ces indications concernant la modification des interruptions utilises
  par le noyau fonctionnent avec n'importe quelle  version. Les noyaux
  plus rcents ( partir de quelque part dans les 2.x.x)  permettent de
  passer des arguments au noyau pendant le dmarrage, par le biais de
  LILO ou LOADLIN, afin de prciser le numro d'interruption concernant
  les souris Logitech et Microsoft Inport.  Cela peut  vous faire
  gagner pas  mal  de  temps  si  vous pouvez viter  de recompiler le
  noyau (ou d'apprendre  le faire). Si vous avez configur votre noyau
  de faon   charger le pilote  souris en tant  que module, vous
  devrez alors faire passer ces informations au chargement du module.

  Vos pouvez  ajouter les options suivantes   la ligne  de commande
  lors de votre dmarrage avec LILO :



       bmouse=3 (pour une souris Logitech)
       msmouse=3 (pour une Microsoft Inport)




  Remplacez les 3  par  le numro   d'interruption de  votre  souris.
  Voici  un exemple de cette mthode avec LILO :


       LILO:linux msmouse=3


  Vous pouvez  consulter  vos documentations de   LILO et  LOADLIN pour
  savoir comment ajouter  des informations   leurs fichiers de
  configuration, afin de ne pas avoir  les taper  la main  chaque
  dmarrage.

  Si  vous     utilisez les   modules,    vous  pouvez   dfinir les
  interruptions manuellement, en utilisant insmodcomme suit :



       insmod msbusmouse.o mouse_irq=3 (souris Inport)
       insmod busmouse.o mouse_irq=3 (Logitech)




  Si  votre     systme   utilise kerneld    pour    charger  les
  modules automatiquement, vous pouvez  diter votre fichier
  /etc/conf.modules ou /etc/modules.conf (celui que votre systme
  utilise), et y ajouter une des lignes suivantes :



       options msbusmouse mouse_irq=3
       options busmouse mouse_irq=3





  33..33..  LLeesspprriipphhrriiqquueess aassssoocciiss aauuxx ssoouurriiss..

  Sous Linux,  on  accde  aux  souris  via  les priphriques   du
  rpertoire /dev. Le tableau qui  suit donne la liste  des types
  d'interfaces et les priphriques associs.



       INTERFACE        PERIPH.        MAJEUR    MINEUR
       ---------------------------------------------
       Logitech        /dev/logibm      10       0
       PS/2            /dev/psaux       10       1
       Inport          /dev/inportbm    10       2
       ATI-XL          /dev/atibm       10       3

                    Tableau 1.  Priphriques associs aux souris.





     NNoottee ::
        Si vous utilisez votre souris ATI-XL avec le pilote Inport, vous
        devez  utiliser  le priphrique  /dev/inportbm, et non  pas le
        priphrique /dev/atibm.

  Les colonnes  majeur   et   mineur donnent   les   numros  de
  priphrique correspondants.

  Si  vous n'avez pas  ces priphriques, il  vous faut tout d'abord les
  crer.  Pour ce faire, vous devez excuter ce qui suit (en tant que
  _r_o_o_t)



       mknod /dev/logibm   c 10 0
       mknod /dev/psaux    c 10 1
       mknod /dev/inportbm c 10 2
       mknod /dev/atibm    c 10 3


     NNoottee ::
        Il y a un certain temps dans l'histoire (de moins en moins)
        rcente de Linux, le nom des priphriques  a chang. Les noms
        suivants ont t  remplacs  par    ceux donns   plus   haut,
        et  doivent tre  effacs : bmousems, bmouseps2, bmouseatixl,
        bmouselogitech.

  Nombreux   sont  ceux qui  aiment     crer  un   lien symbolique
  entre  le priphrique associ   leur souris et /dev/mouse  de faon
   ne pas avoir  se rappeler quel priphrique ils doivent utiliser.
  Si vous avez une distribution rcente de  Linux, vous avez
  certainement  un tel lien. Si c'est le cas, ou si  vous crez  ce
  lien, assurez-vous qu'il   pointe bien sur  le priphrique
  correspondant  votre type de souris.


  44..  UUttiilliissaattiioonn ddee vvoottrree ssoouurriiss


  Cette section traite de l'utilisation gnrale de votre souris avec
  diffrentes applications



  44..11..  CCoonnffiigguurraattiioonn ddeess aapppplliiccaattiioonnss

  La plupart des distributions Linux vous demanderont le type de votre
  souris durant leur installation et configureront gpm et X-Window pour
  vous. Si vous ne slectionnez pas le protocole correct de souris ou si
  vous installez une nouvelle souris avec une nouvelle interface, vous
  pouvez en gnral lancer un programme qui reconfigurera pour vous et
  gpm et X-Window afin d'utiliser le nouveau protocole.



  44..11..11..  RReeddHHaatt

  Sous RedHat, vous pouvez lancer le programme /usr/sbin/mouseconfig.



  44..11..22..  AAuuttrreess ddiissttrriibbuuttiioonnss

  Consultez les documents qui sont livrs avec.


  44..22..  ggppmm..

  gpm est un programme qui vous permet de raliser des oprations de
  copier-coller entre diffrents terminaux virtuels sous Linux, de la
  mme faon que sous X. C'est, de plus, un bon moyen de tester votre
  souris. La version actuelle de gpm est gpm-1.13.tar.gz
  <http://sunsite.unc.edu/pub/Linux/system/mouse/gpm-1.13.tar.gz> et
  vous pouvez la trouver dans votre site FTP Linux favori (comme
  ftp.lip6.fr -- NdT). Elle contient des instructions pour sa
  compilation. La plupart des distributions de Linux contiennent un
  excutable de gpm prcompil.

  En lanant gpm, utilisez l'option -t pour prciser votre protocole de
  souris, et l'option -m pour indiquer quel priphrique vous utilisez.
  Trois protocoles utiles aux souris bus sont logi, bm et ps2. Par
  dfaut, le priphrique souris est /dev/mouse, aussi pouvez-vous
  omettre l'option -m si vous avez dj le lien symbolique appropri.
  Voici un exemple pour une souris Microsoft Inport :


       gpm -t bm


  ou, si vous utilisez le protocole PS/2 :


       gpm -t ps2


  Vous devriez alors,   en  bougeant   votre souris,    voir un petit
  bloc rectangulaire se dplacer sur l'cran ; vous devriez aussi
  pouvoir faire du copier-coller entre les terminaux virtuels en
  utilisant les boutons de la souris. Pour  savoir  comment faire,
  lisez la  documentation de gpm, ou tapez man gpm.


  44..33..  XXFFrreeee8866

  Pour utiliser votre souris bus sous XFree86, vous devez indiquer le
  protocole de votre souris  dans  votre fichier  Xconfig. Si vous
  utilisez le protocole BusMouse,  votre  fichier Xconfig  devrait
  contenir  la section suivante  (y compris les guillemets) :



       Section "Pointer"
           Protocol "Busmouse"
           Device "/dev/mouse"

           # Autres options telles que Emulate3Buttons
       EndSection





  Pour les souris PS/2 changez la ligne concernant le protocole en :


           Protocol "PS2"





  Si vous avez une souris  deux boutons, ajoutez la ligne


       Emulate3Buttons




  qui vous  permettra de simuler la  prsence d'un troisime bouton en
  pressant simultanment les deux seuls que  vous avez.  Toutes les
  autres  lignes  se rapportant     la souris,   comme  "BaudRate"  et
  "SampleRate" devraient tre commentes, car elles n'ont aucun effet
  sur les souris bus.


  44..44..  XXFFrreeee8866 eett ggppmm

  Durant une longue priode du dveloppement du noyau,  il n'tait pas
  possible de partager  les souris bus entre les  diffrents processus.
   cause de cela, il tait  difficile  d'utiliser XFree86 et   gpm en
  mme temps.  Si vous essayez de lancer X  pendant que vous  utilisez
  gpm et que vous  obtenez l'erreur suivante, c'est que vous utilisez un
  de ces anciens noyaux :


       Fatal server error:
       Cannot open mouse (Device or resource busy)





  Il y a deux faons de faire marcher gpm avec XFree86 sous ces noyaux.
  La premire  consiste   tuer  toute  instance de gpm   en  cours
  avant  de dmarrer XFree86.      La     seconde  consiste     
  utiliser     l'option  repeater   de  gpm (qui prend les  donnes
  de la souris et rpte l'information dans plusieurs applications).


  Je vous conseille, autant que possible, de mettre  jour votre noyau,
  afin de pouvoir partager  votre souris bus  entre les applications.
  Dans ce document, je me   contenterai  d'voquer une mthode
  permettant   de faire fonctionner ensemble XFree86 et gpm avec ces
  vieux  noyaux. Veuillez vous reporter  la   documentation  de gpm
  si vous souhaitez   utilisez  la mthode du rpteur.


  gpm permet de terminer ses propres instances en tapant :



       gpm -k



  Cela doit tre fait  avant de lancer X11. Vous  voudrez peut-tre
  ajouter une ligne au dbut de votre script startx  pour que gpm soit
  arrt automatiquement. Vous pouvez galement placer  la fin du
  script une commande qui redmarre gpm, de telle sorte qu'il se relance
    la sortie de votre session X.


  55..  VVoouuss nn''aarrrriivveezz ttoouujjoouurrss ppaass  ffaaiirree mmaarrcchheerr vvoottrree ssoouurriiss ??

  Alors comme a, vous  avez   lu ce howto   une  douzaine de fois,
  tout  fait scrupuleusement comme vous pensiez devoir  le  faire, et
  votre souris  refuse encore de fonctionner ?  Le meilleur conseil  que
  je puisse vous  donner est : faites des  expriences. C'est sr,  vous
  allez en baver, mais  au bout du compte la seule faon de savoir  ce
  qui va marcher  ou non avec votre souris, c'est d'essayer toutes les
  solutions jusqu'  ce que vous trouviez la bonne.


  Comme toujours,  s'il y  a quelque chose  que  vous  ne comprenez
  pas, lisez d'abord  la  page de manuel,  et  voyez si a vous    aide.
  Si vous  avez une question spcifique, ou un problme pour lequel vous
  pensez que je peux vous aider,  n'hsitez pas  me contacter  
  l'adresse qui  figure  au dbut de ce howto, et je verrai si je peux
  vous aider  ou vous diriger vers quelqu'un qui peut.


  Le newsgroup comp.os.linux.setup, ou comp.os.linux.hardware est
  l'endroit tout indiqu  pour les discussions  et/ou  les questions
  concernant les souris, alors s'il vous plat, ne postez pas  ces
  questions dans d'autres groupes, et en particulier ne cross-postez pas
  de questions dans 2 ou plus de groupes de   la  hirarchie Linux,
  ils sont  dj assez en   dsordre comme a ! Lorsque vous postez une
  question, vous  aurez une meilleure rponse (et bien moins de _f_l_a_m_e_s)
  si vous  utilisez  bon escient les lignes Subject: et Keywords:. Par
  exemple


       Subject: BUSMICE - Gateway 2000 mouse wont work.
       Keywords: mouse busmouse gateway





  NdT :  Le groupe   francophone fr.comp.os.linux.configuration  est  le
  groupe pertinent o  poster vos messages,  mais   n'oubliez pas les
  recommandations ci-dessus. En particulier, si vous n'avez trouv de
  solution nulle part, vous pouvez      poster     votre    question
  dans       le    groupe  modr fr.comp.os.linux.moderated.



  55..11..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  Voici quelques sources d'information concernant Linux et les souris.



  55..11..11..  33--BBuuttttoonn MMoouussee HHOOWWTTOO

  Pour les souris PS/2  3 boutons. Il donne des indications pour faire
  marcher le bouton intermdiaire.




  55..11..22..  LLaappttoopp--HHOOWWTTOO

  Il donne des indications pour faire marcher une souris externe en mme
  temps que la souris fournie avec.




  55..11..33..  WWaaccoomm TTaabblleett HHOOWWTTOO

  Il donne des indications pour faire marcher un Wacom Tablet comme une
  souris.




















  HOWTO Graveur de CDs
  Winfried  Truemper,  <winni@xpilot.org>, traduit par Olivier
  Tharan, <tharan@int-evry.fr>
  Version 2.4.1, 16 decembre 1997

  Ce document parle du processus de gravage de CDs sous Linux.

  11..  IInnttrroodduuccttiioonn

  Ma premiere experience avec des graveurs de CDs a ete  guidee  par  le
  "Linux  CD  Writer mini-HOWTO" de Matt Cutts <cutts@cs.unc.edu>. Merci
  Matt !

  Bien que mon intention n'etait que de mettre ce document  a  jour,  je
  l'ai  reecrit a partir du debut apres avoir realise combien tout avait
  change depuis 1994.

  11..11..  AAvveerrttiisssseemmeenntt

  JJee ((WWiinnffrriieedd TTrruueemmppeerr)) rreejjeettttee ttoouuttee ggaarraannttiiee ccoonncceerrnnaanntt ccee  ddooccuummeenntt,,
  iinncclluuaanntt  ttoouutteess  lleess  ggaarraannttiieess  iimmpplliicciitteess  ddee mmiissee ssuurr llee mmaarrcchhee eett
  dd''uuttiilliittee ppoouurr uunn cceerrttaaiinn uussaaggee ;; eenn aauuccuunn ccaass oonn nnee ppoouurrrraa  mmee  tteenniirr
  ccoommppttee  ddee  ddoommmmaaggeess  ssppeecciiaauuxx,, iinnddiirreeccttss oouu ccoonnsseeccuuttiiffss aa,, nnii dd''aauuccuunn
  ddoommmmaaggee qquueellqquu''iill ssooiitt rreessuullttaanntt ddee llaa ppeerrttee dd''uuttiilliissaattiioonn,, ddee ddoonnnneeeess
  oouu  ddee  pprrooffiittss,,  qquuee  ccee  ssooiitt  ddaannss  uunnee  aaccttiioonn  ccoonnttrraaccttuueellllee,,  ddee
  nneegglliiggeennccee  oouu  aauuttrree  aaccttiioonn,,  ddeeccoouullaanntt  ddee  oouu  eenn  rreellaattiioonn   aavveecc
  ll''uuttiilliissaattiioonn  ddee  ccee  ddooccuummeenntt..   En  gros,  lisez  et utilisez a vos
  propres risques.

  11..22..  LLeeccttuurreess ssuuggggeerreeeess

  La FAQ sur  les  CD-R  a   <http://www.cd-info.com/CDIC/Technology/CD-
  R/FAQ.html>  est  une  FAQ  generale  portant sur les disques compacts
  enregistrables (CD-R).

  Le _H_O_W_T_O _C_D_-_R_O_M _L_i_n_u_x explique tout ce qu'on devrait  savoir  sur  les
  lecteurs  de  CD-ROMs sous Linux. En supplement, vous pourrez jeter un
  coup d'oeil sur le _H_O_W_T_O _S_C_S_I _L_i_n_u_x et le _H_O_W_T_O _n_o_y_a_u _L_i_n_u_x.

  11..33..  TTeerrmmiinnoollooggiiee...... LLaasseerrss aauu mmaaxxiimmuumm...... FFeeuu !!

  _C_D_-_R_O_M veut dire _D_i_s_q_u_e _c_o_m_p_a_c_t _a _m_e_m_o_i_r_e _e_n  _l_e_c_t_u_r_e  _s_e_u_l_e  (Compact
  Disc  Read  Only  Memory),  un  support de stockage utilisant un laser
  optique pour lire des trous microscopiques sur un disque  brillant  en
  argent.  (La  brillance argentee vient d'une couche aluminisee qui est
  le support.) Les trous representent  les  morceaux  d'information  (en
  quelque  sorte)  et  sont  si  petits  que  des  milliards d'entre eux
  tiennent sur le disque. Un CD est  donc  un  support  de  stockage  de
  masse.

  Le   terme   _C_D_-_R  est  une  forme  abregee  de  _C_D_-_R_O_M  _e_n_r_e_g_i_s_t_r_a_b_l_e
  (Recordable)  et  se  rapporte  au  CD  qui   n'a   pas   ces   "trous
  microscopiques" sur sa surface... Il est donc vide.

  A  la place de la couche aluminisee (argentee) un CD-R possede un film
  special (colore) dans lequel des "trous microscopiques" peuvent y etre
  brules.  Ceci est realise en donnant au laser, qui normalement ne fait
  que palper les trous, un peu plus de puissance pour  qu'il  brule  les
  trous. Cette action ne peut se faire qquu''uunnee sseeuullee ffooiiss sur un CD-R.

  Vous  pouvez  toutefois  laisser  certaines  parties  vides  pour  une
  ecriture ulterieure, creant ce qu'on appelle un CD multi-sessions.

  Ce HOWTO parle de  la  tache  d'ecrire  un  CD-R.  Bienvenue  a  bord,
  Capitaine.

  11..44..  GGrraavveeuurrss ddee CCDD--RROOMM ssuuppppoorrtteess

  La liste detaillee des modeles qu'on a vu fonctionner correctement (ou
  pas) est disponible a

       <http://www.shop.de/cgi-bin/winni/lsc.pl>

  La liste sera incluse dans  les  versions  futures  de  ce  HOWTO.  La
  plupart  des  graveurs  de  CD-ROM  SCSI  sont  supportes  et la toute
  nouvelle version de cdrecord supporte  meme  les  graveurs  de  CD-ROM
  ATAPI.

  Si  votre  materiel  n'est pas supporte, vous pouvez toujours utiliser
  Linux pour creer une image du CD ulterieur,  mais  vous  devrez  alors
  utiliser  un  logiciel sous DOS pour ecrire l'image sur le CD-R. (Vous
  aurez envie de faire ceci parce que la plupart des  logiciels  DOS  ne
  peuvent  pas gerer les noms de fichiers longs disponibles avec Linux.)

  Dans ce cas, vous pouvez  passer  toutes  les  sections  relatives  au
  materiel   (celles   sur   les   _p_e_r_i_p_h_e_r_i_q_u_e_s   _S_C_S_I   _g_e_n_e_r_i_q_u_e_s  et
  cdwrite/cdrecord).

  11..55..  PPoossssiibbiilliitteess"" ssuuppppoorrtteeeess

  En ce moment les logiciels pour graver des CDs sous  Linux  supportent
  les caracteristiques principales suivantes :

       Caracteristique         cd-write-2.1            cdrecord-1.7
       -------------------------------------------------------------
       Support ATAPI           non                     oui
       Multisession            en partie               oui

       RockRidge               oui (mkisofs)           oui (mkisofs)
       El Torito               oui (mkisofs)           oui (mkisofs)
       HFS                     oui (mkhybrid)          oui (mkhybrid)
       Joliet                  oui (mkhybrid)          oui (mkhybrid)

  _R_o_c_k_R_i_d_g_e  est  un  extension  qui  autorise des noms de fichiers plus
  longs et une arborescence de repertoires plus profonde. _E_l _T_o_r_i_t_o peut
  permettre  de  produire  des  CDs  bootables.  Veuillez  consulter  la
  documentation  jointe  pour  plus  de  details  sur  ces  possibilites
  speciales.  _H_F_S  permet  a  un  Macintosh  de  lire le CD-ROM comme si
  c'etait un volume HFS. _J_o_l_i_e_t apporte les  noms  longs  (entre  autres
  choses) a certaines variantes de Windows (95, NT).

  La section ``'' liste la disponibilite des logiciels mentionnes.

  11..66..  LLiisstteess ddee ddiissttrriibbuuttiioonn

  Si  vous  voulez rejoindre l'equipe de developpement (avec l'intention
  de les _a_i_d_e_r activement), envoyez un courrier electronique a

       cdwrite-request@pixar.com

  et mettez la commande subscribe dans le corps du message.

  11..77..  DDiissppoonniibbiilliittee

  La toute derniere version de ce document  est  toujours  disponible  a
  partir de

       <http://www.shop.de/~winni/linux/>

  (NdT  :  en  France,  c'est a  <http://www.freenix.fr/linux/>, mais la
  version peut ne pas etre la derniere en date.)

  22..  PPrreeppaarreezz vvoottrree mmaacchhiinnee LLiinnuuxx ppoouurr ggrraavveerr ddeess CCDD--RROOMMss

  Avant novembre 1997, les logiciels pour Linux ne supportaient pas  les
  graveurs  de  CD-ROM  ATAPI. En consequence, la version actuelle de ce
  HOWTO se concentre sur les peripheriques SCSI.

  La bonne nouvelle est que manipuler des peripheriques ATAPI  est  bien
  plus  facile  et  vous  pouvez  quand  meme  utiliser ce HOWTO si vous
  oubliez le terme "peripherique SCSI generique". Pour  trouver  comment
  dialoguer  avec des peripheriques ATAPI vous pouvez lancer la commande
  cdrecord -scanbus.

  22..11..  CCoonnffiigguurreezz llee mmaatteerriieell

  Eteignez votre ordinateur, et branchez le graveur de CDs  sur  le  bus
  SCSI.

  Assurez-vous  que le bus SCSI est termine proprement et choisissez une
  ID SCSI libre pour le graveur. Regardez le HOWTO SCSI  Linux  si  vous
  n'etes  pas  sur.  Si  vous  etes  completement depasse, demandez a un
  expert.

  Remettez le courant et regardez les messages que le BIOS du controleur
  SCSI  affiche immediatement apres l'allumage de l'ordinateur.  S'il ne
  reconnait pas votre  graveur,  revenez  a  l'etape  precedente.   Vous
  devriez voir un message comme celui-ci :

  (Image manquante ; quelqu'un en a-t-il une copie d'ecran ?)

  22..22..  NNoottee ssuurr llee ggrraavvaaggee ddee CCDDss ssoouuss LLiinnuuxx

  Au  contraire d'autres rumeurs, le noyau Linux _n_'_a _p_a_s besoin de patch
  pour ecrire sur des CDs. Bien que le fichier  drivers/scsi/scsi.c  des
  sources du noyau contienne les lignes
                         case TYPE_WORM:
                         case TYPE_ROM:
                           SDpnt->writeable = 0;

  ceci  veut seulement dire que ces CDs et WORMs ne sont pas accessibles
  en ecriture a travers les peripheriques standards /dev/sda - /dev/sdh,
  ce qui est normal.

  Au  lieu  d'utiliser  ces  peripheriques, l'ecriture des CDs se fait a
  travers les _p_e_r_i_p_h_e_r_i_q_u_e_s _S_C_S_I _g_e_n_e_r_i_q_u_e_s qui permettent presque  tout
  -- meme l'ecriture sur les CDs.

  22..33..  CCrreeeezz lleess ppeerriipphheerriiqquueess ggeenneerriiqquueess

  Le _H_O_W_T_O _S_C_S_I _L_i_n_u_x dit a propos des peripheriques SCSI generiques :

       Le  pilote de peripherique SCSI generique fournit une inter-
       face pour envoyer des commandes  SCSI  a  tous  les  periph-
       eriques  SCSI -- disques, lecteurs de bandes, CDROMs, mecan-
       ismes de changement de support, etc.

  Parler des peripheriques generiques en tant  qu'_i_n_t_e_r_f_a_c_e_s  veut  dire
  qu'ils  fournissent  une maniere differente d'acceder au materiel SCSI
  par rapport aux peripheriques normaux.

  Cette maniere detournee est obligatoire parce  que  les  peripheriques
  normaux  sont faits pour lire des donnees a l'echelle du bloc a partir
  d'un disque, d'un lecteur de bandes ou d'un lecteur  de  CD-ROM.  D'un
  autre  cote,  piloter  un  graveur  de CD-ROM (ou un scanner) est plus
  exotique, par exemple on doit pouvoir positionner le laser. Pour avoir
  une   implementation   propre   (et  par  consequent  rapide)  de  ces
  peripheriques normaux,  toutes  ces  actions  exotiques  doivent  etre
  realisees a travers les peripheriques SCSI generiques.

  Puisque   l'on  peut  tout  faire  au  materiel  SCSI  a  travers  les
  peripheriques  generiques,  ils  ne  sont  pas  limites  a  un   usage
  specifique -- d'ou le nom _g_e_n_e_r_i_q_u_e.

  Deplacez-vous  dans  le  repertoire  /dev  et verifiez la presence des
  peripheriques SCSI generiques ; la commande ls devrait montrer  sga  -
  sgh :

                       bash> cd /dev
                       bash> ls -l sg*
                       crw-------   1 root   sys     21,   0 Jan  1  1970 sga
                       crw-------   1 root   sys     21,   1 Jan  1  1970 sgb
                       crw-------   1 root   sys     21,   2 Jan  1  1970 sgc
                       crw-------   1 root   sys     21,   3 Jan  1  1970 sgd
                       crw-------   1 root   sys     21,   4 Jan  1  1970 sge
                       crw-------   1 root   sys     21,   5 Jan  1  1970 sgf
                       crw-------   1 root   sys     21,   6 Jan  1  1970 sgg
                       crw-------   1 root   sys     21,   7 Jan  1  1970 sgh

  Si  vous  n'avez  pas  ces  fichiers  de  peripheriques,  creez-les en
  utilisant le script /dev/MAKEDEV :

                       bash> cd /dev/
                       bash> ./MAKEDEV sg

  Maintenant les fichiers de peripheriques devraient se montrer.

  22..44..  EEttaabblliisssseezz ll''uuttiilliissaattiioonn ddeess  ppeerriipphheerriiqquueess  _S_C_S_I  _g_e_n_e_r_i_q_u_e  et
  _l_o_o_p_b_a_c_k

  Le noyau Linux necessite un module qui lui  donne  la  possibilite  de
  gerer  les  peripheriques  SCSI  generiques.  Si  votre  noyau courant
  possede cette aptitude, elle  devrait  etre  listee  dans  le  pseudo-
  fichier /proc/devices :

                       bash> cat /proc/devices
                       Character devices:
                        1 mem
                        2 pty
                        3 ttyp
                        4 ttyp
                        5 cua
                        7 vcs
                       21 sg          <---------- veut dire "peripherique SCSI
                       30 socksys                            generique"

                       Block devices:
                        2 fd
                        7 loop        <---------- on peut meme utiliser le
                        8 sd                      loopback
                       11 sr          <---------- veut dire "CD-ROM SCSI"

  Vous  devrez  peut-etre  taper  la  commande insmod sg, insmod loop ou
  insmod sr_mod pour charger le module dans le noyau.  Re-verifiez apres
  avoir essaye ceci.

  Si l'une d'entre elle ne fonctionne pas, vous devez reconfigurer votre
  noyau et le recompiler.

                   bash$ cd /usr/src/linux
                   bash$ make config

                   [..]
                   *
                   * Additional Block Devices
                   *
                   Loopback device support (CONFIG_BLK_DEV_LOOP) [M/n/y/?] M

                   [..]
                   *
                   * SCSI support
                   *
                   SCSI support (CONFIG_SCSI) [Y/m/n/?] Y
                   *
                   * SCSI support type (disk, tape, CD-ROM)
                   *
                   SCSI disk support (CONFIG_BLK_DEV_SD) [Y/m/n/?] Y
                   SCSI tape support (CONFIG_CHR_DEV_ST) [M/n/y/?] M
                   SCSI CD-ROM support (CONFIG_BLK_DEV_SR) [M/n/y/?] M
                   SCSI generic support (CONFIG_CHR_DEV_SG) [M/n/y/?] M

                   [..]
                   ISO9660 cdrom filesystem (CONFIG_ISO9660_FS) [Y/m/n/?] M

  Veuillez noter que j'ai omis les questions un peu moins importantes.

  22..55..  CCoonnssttrruuiirree eett iinnssttaalllleerr llee nnooyyaauu

  Si vous avez des questions concernant ceci, la lecture suggeree est le
  HOWTO  Noyau Linux. De plus, votre distribution Linux devrait contenir
  de la documentation sur ce probleme.

  (Astuce : pendant la recompilation,  vous  pouvez  continuer  sur  les
  etapes ``'' et au-dela)

  22..66..  RReeddeemmaarrrreerr ll''oorrddiinnaatteeuurr ppoouurr aammoorrcceerr llee cchhaannggeemmeenntt

  Ne paniquez pas si le noyau Linux affiche les messages plus rapidement
  que  vous  ne  pouvez  les  lire,  au   moins   l'initialisation   des
  peripheriques SCSI peut etre reaffichee avec la commande dmesg :

          scsi0 : NCR53c{7,8}xx (rel 17)
          scsi : 1 host.
          scsi0 : target 0 accepting period 100ns offset 8 10.00MHz
          scsi0 : setting target 0 to period 100ns offset 8 10.00MHz

            Vendor: FUJITSU   Model: M1606S-512        Rev: 6226
            Type:   Direct-Access                      ANSI SCSI
          Detected scsi disk sda at scsi0, channel 0, id 0, lun 0

            Vendor: NEC       Model: CD-ROM DRIVE:84   Rev:  1.0a
            Type:   CD-ROM                             ANSI SCSI
          Detected scsi CD-ROM sr0 at scsi0, channel 0, id 4, lun 0

          scsi : detected 1 SCSI disk total.
          SCSI device sda: hdwr sector= 512 bytes. Sectors= 2131992

  On   a   montre   ci-dessus   uniquement   la   partie   des  messages
  d'initialisation qui rapportent la detection  des  peripheriques  SCSI
  presents physiquement.

  22..77..  CCrreeaattiioonn ddeess _p_e_r_i_p_h_e_r_i_q_u_e_s _l_o_o_p_b_a_c_k

  Deplacez-vous  dans  le  repertoire  /dev  et verifiez la presence des
  _p_e_r_i_p_h_e_r_i_q_u_e_s _l_o_o_p_b_a_c_k. Ce n'est pas grave  si  vous  n'avez  pas  ces
  peripheriques,  mais  c'est pratique si vous les avez (Voir la section
  ``''). Si vous les avez deja, la commande ls devrait montrer  loop0  -
  loop7 :

                       bash$ cd /dev
                       bash$ ls -l loop*
                       brw-rw----   1 root  disk    7,   0 Sep 23 17:15 loop0
                       brw-rw----   1 root  disk    7,   1 Sep 23 17:15 loop1
                       brw-rw----   1 root  disk    7,   2 Sep 23 17:15 loop2
                       brw-rw----   1 root  disk    7,   3 Sep 23 17:15 loop3
                       brw-rw----   1 root  disk    7,   4 Sep 23 17:15 loop4
                       brw-rw----   1 root  disk    7,   5 Sep 23 17:15 loop5
                       brw-rw----   1 root  disk    7,   6 Sep 23 17:15 loop6
                       brw-rw----   1 root  disk    7,   7 Sep 23 17:15 loop7

  Si  vous  n'avez  pas  ces  fichiers  de  peripheriques,  creez-les en
  utilisant le script /dev/MAKEDEV :

                       bash> cd /dev/
                       bash> ./MAKEDEV loop

  La derniere commande ne reussit que si vous avez le module  loop  dans
  votre  noyau  (voir la section ``'' pour la manipulation des modules).
  Si insmod loop ne donne rien, vous devez attendre que le nouveau noyau
  soit correctement installe (voir ``''.

  22..88..  OObbtteenneezz llee llooggiicciieell ppoouurr ggrraavveerr lleess CCDDss

  22..88..11..  UUttiilliittaaiirreess eenn lliiggnnee ddee ccoommmmaannddee

  Le paquetage suivant est obligatoire pour generer des maquettes de CD-
  Rs :

       <ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs/> (mkisofs)

       <ftp://ftp.ge.ucl.ac.uk/pub/mkhfs> (mkhybrid)

  Selon  le  modele  de  votre  graveur  de  CDs  (voir  ``''), l'un des
  logiciels suivants est necessaire pour ecrire les  maquettes  sur  les
  CD-Rs :

       <ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/> (cdrecord)

       <ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/>
       (cdwrite)

  Veuillez utiliser les miroirs de ces serveurs FTP les plus proches  de
  vous ou chargez-les a partir d'un CD.

  Assurez-vous  absolument que vous avez la version 2.0 ou superieure de
  cdwrite.  Aucune version plus ancienne et surtout aucune version  beta
  ne  fonctionneront  !  Ne  croyez  pas  les pages de manuel du (vieil)
  mkisofs qui indique que vous avez besoin de la version 1.5 de cdwrite.

  Pour avoir des informations sur le portage de cdwrite sur Irix et AIX,
  visitez l'URL

       <http://lidar.ssec.wisc.edu/~forrest/>

  Si vous utilisez un noyau anterieur a  2.0.31,  vous  aurez  envie  de
  patcher  mkisofs  pour  contourner  un  bogue  du  code  du systeme de
  fichiers de Linux. La distribution Debian fournit  un  patch  pour  la
  version  1.05  de  mkisofs qui lui ajoute l'option -K (voir ``'') ; il
  est disponible sur

       <ftp://ftp.debian.org/pub/debian/rex/source/misc/mkisofs_1.11-1.diff.gz>

  Ce  patch  n'est  necessaire que si vous voulez monter l'image du CD a
  travers le peripherique loopback (voir ``'').

  22..88..22..  UUnnee iinntteerrffaaccee uuttiilliissaatteeuurr ggrraapphhiiqquuee ((ooppttiioonnnneellllee))

  X-CD-Roast est un programme de gravage de CDs fonctionnant entierement
  sous X, et succede a cdwtools-0.93. Il est disponible sur

       <http://www.fh-muenchen.de/home/ze/rz/services/pro-
       jects/xcdroast/e_overview.html>

  En  ce  moment  X-CD-Roast  est  base  sur  une  version  patchee   de
  cdwrite-2.0 et possede par consequent les memes caracteristiques (voir
  ``''). Les versions futures pourraient etre basees sur le logiciel  de
  remplacement cdrecord.

  33..  EEccrriirree uunn CCDD

  ``Si  en  fumee tu te transformes, je ne cesserai de jouer pendant que
  tu te consumes.''  (L'empereur  Neron  en  ecrivant  ses  propres  CDs
  classiques ; il n'avait rien compris)

  En general l'ecriture d'un CD se fait en deux etapes :

  +o  recolter  les  logiciels  desires  et  les  empaqueter  en un grand
     fichier avec mkisofs/mkhybrid ;

  +o  ecrire le grand fichier sur le CD  enregistrable  avec  cdwrite  ou
     cdrecord.

  Il  est aussi possible de combiner les deux etapes en une avec un tube
  mais ceci n'est pas recommande parce que ce n'est pas fiable. Voir ci-
  dessous.

  33..11..   DDeetteerrmmiinneezz  aa  qquueell  ppeerriipphheerriiqquuee SSCCSSII ggeenneerriiqquuee llee ggrraavveeuurr eesstt
  aattttaacchhee

  (Veuillez  noter : la facon actuelle de nommage des peripheriques SCSI
  sous Linux est compliquee a souhait et pas assez fiable. Le  fait  que
  je la decrive ici en maints details ne devrait pas etre mal interprete
  comme la confirmation de cette etat de faits. Les personnes  possedant
  un  graveur  de CD-ROMs ATAPI peuvent essayer "cdrecord -scanbus" pour
  detecter le bon peripherique et sauter le reste de cette section.)

  Apres avoir suivi toutes les etapes du dernier chapitre, votre systeme
  devrait  etre  capable  de gerer le gravage de CDs. Cette section peut
  etre utilisee comme preuve que tout fonctionne comme prevu.

  Lancez la commande dmesg. Elle devrait rapporter les messages du noyau
  Linux,  avec  ceux  imprimes lors du demarrage (limitation : seulement
  les 200 derniers) et contient des informations sur le graveur  de  CDs
  connectes au bus SCSI.

  Exemple simple :

                     Vendor: YAMAHA  Model: CDR100       Rev: 1.11
                     Type:   WORM                        ANSI SCSI revision: 02
                   Detected scsi CD-ROM sr1 at scsi0, channel 0, id 3, lun 0

  Cette  machine  possede  quatre  peripheriques SCSI connectes (vous ne
  pouvez pas le voir donc je vous le dis), avec les ID SCSI allant de  0
  a  3.  Le  graveur  est  le  quatrieme  peripherique SCSI physiquement
  present  et  doit  donc  etre  connecte  sur  /dev/sgd  (le  quatrieme
  peripherique  SCSI generique quand on compte a partir de la lettre a).
  Dans ce cas, la commande

                   cdwrite  --eject  --device /dev/sgd

  ouvre  le  tiroir  et  est  un  test  pour  voir  si  tout  fonctionne
  correctement. Un exemple plus complique :

                   scsi0 : AdvanSys SCSI 1.5: ISA (240 CDB)
                   scsi1 : Adaptec 1542
                   scsi : 2 hosts.

                     Vendor: HP      Model: C4324/C4325  Rev: 1.20
                     Type:   CD-ROM                      ANSI SCSI revision: 02
                   Detected scsi CD-ROM sr0 at scsi0, channel 0, id 2, lun 0

                     Vendor: IBM     Model: DPES-31080   Rev: S31Q
                     Type:   Direct-Access               ANSI SCSI revision: 02
                   Detected scsi disk sda at scsi1, channel 0, id 0, lun 0

                   scsi : detected 1 SCSI cdrom 1 SCSI disk total.
                   SCSI device sda: hdwr sector= 512 bytes.

  Dans  cet exemple deux controleurs SCSI hebergent un peripherique SCSI
  chacun.  Quel  gachis  (ils  sont  capables  d'heberger  jusqu'a  sept
  peripheriques  chacun). Ce n'est pas ma configuration alors arretez de
  demander si j'ai trop d'argent... Cependant  dans  le  but  d'etre  un
  exemple  dont  on  peut se passer, cette configuration est excellente.
  :-)

  Dans l'exemple ci-dessus le graveur de CD a l'ID SCSI 2 mais elle  est
  associee  au  premier  peripherique  SCSI generique /dev/sga parce que
  c'est le premier peripherique SCSI physiquement present  que  Linux  a
  detecte.  J'espere  que  ceci  montre  clairement  que  l'ID SCSI d'un
  peripherique n'a rien a voir avec le peripherique generique associe.

  Deux questions restent en suspens : qu'arrive-t-il si vous  prenez  le
  mauvais   peripherique   ?   Si   vous   ne   specifiez   ni  l'option
  "--<MANUFACTURER>" ni n'ecrivez de donnees  sur  le  peripherique,  en
  general un message d'avertissement est affiche et rien de plus :

                       bash$ cdwrite  --eject  --device /dev/sgb

                       Unknown CD-Writer; if this model is compatible with any
                       supported type, please use the appropriate command line
                       flag.

                       Manufacturer:  IBM
                       Model:         DPES-31080
                       Revision:      S31Q

  Dans ce cas le peripherique /dev/sbg est un disque dur SCSI (d'IBM).

  Si  vous  ecrivez  des  donnees  sur  le mauvais peripherique, vous en
  ecrasez le contenu d'origine et endommagerez votre  systeme  de  facon
  probablement  irremediable.  Faites  attention, cela m'est deja arrive
  par accident.

  33..22..  RRaasssseemmbblleerr lleess llooggiicciieellss

  En general cela prend plus de temps qu'on ne le croit ;  Rappelez-vous
  que  les  fichiers manquants ne pourront pas etre ajoutes une fois que
  le CD sera ecrit. :-)

  Gardez aussi a l'esprit qu'un certain montant de l'espace  libre  d'un
  CD  est  utilise  pour  stocker  les  informations  sur  le systeme de
  fichiers ISO 9660 (en general quelques Mo).

  33..33..  SSttoocckkeerr lleess ddoonnnneeeess ssuurr uunn CCDD

  Le terme _I_S_O _9_6_6_0 se rapporte au format dans lequel les  donnees  sont
  stockees  sur  le  CD  Pour  etre  plus  precis  : c'est le systeme de
  fichiers sur le CD.

  Bien sur, l'apparence des fichiers stockes dans ce format est  unifiee
  par  le  noyau  Linux  comme  pour tout autre systeme de fichiers. Par
  consequent, si vous montez un CD dans l'arborescence des  repertoires,
  vous  ne  pouvez  pas  distinguer son contenu des autres fichiers... a
  part le fait qu'on ne peut ecrire dessus... meme pas  pour  root.  :-)
  (Le mecanisme utilise pour unifier l'apparence des fichiers est appele
  _s_y_s_t_e_m_e _d_e _f_i_c_h_i_e_r_s _v_i_r_t_u_e_l, en abrege _V_F_S.

  Les possibilites du systeme de fichiers ISO 9660 ne sont pas si riches
  comparees  a  celles  du  systeme de fichiers ext2 qui est normalement
  utilise sous Linux.  Par contre, le CD n'est inscriptible qu'une seule
  fois et certaines possibilites n'ont meme pas de sens. Les limitations
  du systeme de fichiers ISO 9660 sont :

  +o  uniquement huit niveaux de sous-repertoires  autorises  (comptes  a
     partir  du  repertoire  racine  du  CD)  (utilisez  les  extensions
     RockRidge pour augmenter ce nombre) ;

  +o  longueur maximale des noms de fichiers : 32 caracteres ;

  +o  capacite de 650 Mo.

  33..44..  CCrreeeerr uunn ssyysstteemmee ddee ffiicchhiieerrss IISSOO 99666600

  Avant de pouvoir utiliser un support  de  stockage  (par  exemple  une
  disquette,  un  disque  dur  ou  un  CD),  il doit avoir un systeme de
  fichiers (en langage DOS : etre formate). Ce systeme de  fichiers  est
  responsable  de  l'organisation et de l'incorporation des fichiers qui
  devraient etre stockes sur le support.

  Bon, un CD inscriptible ne  l'est  qu'une  fois  et  donc  si  nous  y
  ecrivons  un  systeme  de  fichiers  vide,  il  serait formate -- mais
  resterait pour l'eternite completement vide. :-)

  Nous avons donc besoin d'un outil qui cree le systeme de  fichiers  en
  meme  temps  qu'il  copie  les fichiers sur le CD. Cet outil s'appelle
  mkisofs. Une utilisation simple ressemble a ceci :

                   mkisofs  -r  -o cd_image   collection_privee/
                                `---------'   `----------------'
                                     |                |
                     ecrire la sortie vers    prendre repertoire comme entree

  L'option '-r' positionne les permissions de  tous  les  fichiers  pour
  etre  lisibles  publiquement  sur  le CD et permet les extensions Rock
  Ridge. C'est ce que l'on veut en general  et  l'utilisation  de  cette
  option est recommandee jusqu'a ce que vous sachiez ce que vous faites.
  (Astuce : sans le '-r', le point de montage prend les  permissions  de
  collection_privee !)

  Si  vous  utilisez  un  noyau  Linux  anterieur a 2.0.31, vous devriez
  ajouter l'option '-K' pour contourner un bogue du code du  systeme  de
  fichiers. Vous avez besoin de la version patchee de mkisofs pour cela.
  Cette option est equivalente a  l'option  '-P'  de  cdwrite.  Veuillez
  regarder la page de manuel de mkisofs pour plus de details.

  mkisofs  essaiera de convertir tous les noms de fichiers au format 8.3
  utilise par DOS pour assurer une compatibilite  maximale.  En  cas  de
  conflits  de  noms  (des  fichiers differents qui auraient le meme nom
  8.3), des numeros sont utilises dans  les  noms  de  fichiers  et  les
  informations  sur le nom de fichier choisi sont imprimees sur l'erreur
  standard (en general l'ecran).

  NNee ppaanniiqquueezz ppaass ::

       Sous Linux, vous ne verrez jamais ces noms de  fichiers  8.3
       parce que Linux utilise les extensions Rock Ridge qui conti-
       ennent les informations d'origine du  fichier  (permissions,
       nom de fichier, etc.).

  Maintenant  vous  pouvez  vous  demander pourquoi la sortie de mkisofs
  n'est pas envoyee directement au peripherique de gravage. Ceci est  du
  a deux raisons :

  +o  mkisofs  ne  connait rien sur la maniere de piloter les graveurs de
     CD (voir la section ``'') ;

  +o  On ne peut pas compter sur cette methode (voir ``'').

  La synchronisation d'un graveur de CD est un point tellement  critique
  que nous ne le remplissons pas directement avec mkisofs (rappelez-vous
  que Linux n'est pas un systeme d'exploitation en temps reel et que les
  taches peuvent etre mal temporisees). A la place, il est recommande de
  stocker la sortie de mkisofs dans un fichier separe sur le disque dur.
  Ce  fichier  est alors une image parfaite du CD a venir et est en fait
  ecrite sur le CD avec l'outil cdwrite dans un deuxieme temps.

  L'image parfaite est stockee dans un fichier enorme, et vous avez donc
  besoin  de  la meme quantite d'espace disque libre que ce que prennent
  vos logiciels rassembles. C'est le probleme.

  On pourrait penser a creer une partition supplementaire pour  cela  et
  ecrire l'image sur cette partition plutot que dans un fichier. Je suis
  contre cette strategie parce que  si  vous  ecrivez  sur  la  mauvaise
  partition  (a  cause  d'une faute de frappe), vous pouvez perdre votre
  systeme Linux en entier. De plus,  c'est  du  gachis  d'espace  disque
  parce  que  l'image  du CD represente des donnees temporaires que l'on
  pourra effacer apres avoir grave le CD.
  33..55..  TTeesstteerr ll''iimmaaggee CCDD

  Linux a la possibilite de monter des fichiers  comme  si  c'etait  des
  partitions  de  disques.  Ceci  est  tres  utile  pour  verifier si la
  structure des repertoires de l'image du CD est bonne. Pour  monter  le
  fichier  cd_image cree ci-dessus dans le repertoire /cdrom, envoyez la
  commande

               mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /cdrom

  Vous pouvez maintenant inspecter  les  fichiers  sous  /cdrom  --  ils
  apparaissent  exactement  comme  ils  le seraient sur un vrai CD. Pour
  demonter l'image CD, tapez simplement umount /cdrom.  Attention  :  si
  vous n'avez pas utilise l'option '-K' avec mkisofs, le dernier fichier
  sur /cdrom peut ne pas etre entierement lisible.

  Note :

       certaines versions anciennes de mount ne savent  pas  manip-
       uler les peripheriques loopback. Si vous avez une version de
       mount si vieille que ca, c'est une  indication  pour  mettre
       votre systeme Linux a jour.

       Plusieurs   personnes  m'ont  deja  suggere  de  mettre  des
       informations sur la maniere d'obtenir les dernieres versions
       de  mount dans ce HOWTO.  Je refuse toujours de le faire. Si
       votre distribution Linux contient un vieux mount, dites-leur
       que  c'est  une erreur. Si votre distribution Linux se met a
       jour difficilement, dites-leur que c'est une erreur.

       Si je devais donner toutes les informations necessaires pour
       contourner  les  erreurs des distributions Linux mal faites,
       ce HOWTO serait beaucoup plus gros et dur a lire.

  33..66..  RReemmaarrqquueess ssuurr lleess ddiissqquueess CCDD RReeiinnssccrriippttiibblleess vviieerrggeess

  Le magazine informatique allemand  "c't"  donne  une  liste  de  trucs
  concernant les CD vierges dans leur numero de novembre 1996 :

  +o  les  disques "sans-noms" (noname) ne sont en general pas de la plus
     grande qualite et il vaut mieux ne pas les utiliser ;

  +o  si un CD reinscriptible est defectueux, il y a des chances  que  ca
     soit  la  meme  chose pour le paquet entier (si vous en avez achete
     plus d'un a la fois) ; vous avez peut-etre de la chance  et  pouvez
     au moins utiliser les 500 premiers Mo de tels CDs...

  +o  ne touchez pas les CD sur leur face brillante avant l'ecriture.

  33..77..  EEccrriivveezz ll''iimmaaggee dduu CCDD ssuurr uunn CCDD

  Plus  grand chose a faire. Avant de vous montrer la derniere commande,
  laissez-moi  vous  avertir  que  les  graveurs  de  CDs  doivent  etre
  alimentes  par  un  flot  continu de donnees parce qu'ils n'ont que de
  petits caches de donnees. Le processus d'ecriture de l'image CD sur le
  CD  ne  doit  donc  pas  etre interrompu ou bien le resultat est un CD
  corrompu.

  Pour etre sur que rien ne vient interrompre le processus,  virez  tous
  les  utilisateurs  de votre systeme et debranchez le cable Ethernet...
  Lisez le _B_a_s_t_a_r_d _O_p_e_r_a_t_o_r _F_r_o_m _H_e_l_l pour en  apprendre  sur  la  bonne
  attitude a adopter. ;-)

  Si  vous  etes  pret  mentalement, mettez une blouse noire, multipliez
  l'ID SCSI du graveur de CD par son numero de version et allumez autant
  de bougies, recitez deux strophes de la FAQ ASR et finalement tapez :

               cdwrite --device /dev/sgd cd_image

  ou bien

               cdrecord -v speed=2 dev=4,0 cd_image

  selon  le  logiciel  que  vous  voulez  utiliser.  Vous devez bien sur
  remplacer le peripherique d'exemple par le  peripherique  SCSI  auquel
  votre graveur de CD est connecte.

  Veuillez  noter  qu'aucun  graveur  ne peut repositionner son laser et
  continuer au point ou il a ete derange. Par consequent toute vibration
  forte  ou  meme  un  choc detruira completement le CD que vous etes en
  train de graver.

  33..88..  SSii qquueellqquuee cchhoossee vvaa mmaall......

  dessous de bouteilles. :-)

  44..  QQuueessttiioonnss ffrreeqquueemmmmeenntt ppoosseeeess,, aavveecc lleess rreeppoonnsseess

  44..11..  AA qquueell ppooiinntt llee pprroocceessssuuss ddee bbrruulluurree eesstt--iill sseennssiibbllee ??""

  Reponse  :  cela  depend  de  votre  graveur.  Les  graveurs  modernes
  devraient avoir un tampon de donnees de 1 Mo a  peu  pres  et  peuvent
  tenir  une a deux secondes sans donnees. Voyez les manuels ou demandez
  au fabricant si vous voulez connaitre les details.  Independamment  de
  la taille de ces tampons, vous devez garantir un debit constant de 300
  Ko/s ou 600 Ko/s sur une longue periode.

  Les processus qui utilisent beaucoup le disque, comme la mise  a  jour
  de  la  base de donnees _l_o_c_a_t_e diminuent le debit maximum et abimeront
  certainement le CD ;  vous  feriez  mieux  de  verifier  que  de  tels
  processus  ne  sont  pas  demarres par cron, at ou anacron pendant que
  vous gravez des CD-Rs.

  Par contre, certaines personnes m'ont dit qu'elles avaient compile  un
  noyau  pendant le gravage d'un CD sans aucun probleme. Vous aurez bien
  sur besoin d'une machine rapide pour de telles experiences.

  44..22..  LLaa ffrraaggmmeennttaattiioonn aa--tt--eellllee ddeess mmaauuvvaaiiss eeffffeettss ssuurr llee fflloott ??""

  La  fragmentation est en general tellement basse qu'on ne remarque pas
  son impact.

  Si vous n'en etes pas certain, regardez les messages imprimes lors  du
  demarrage,  le  pourcentage  de  fragmentation  est indique lors de la
  verification du systeme de fichiers. Vous pouvez verifier cette valeur
  avec la commande tres dangereuse

                       bash$ e2fsck -n  /dev/sda5        # '-n' est important !
                       [partie effacee -- ignorez toute erreur]
                       /dev/sda5: 73/12288 files (12.3% non-contiguous)

  Dans  cet exemple, la fragmentation semble etre tres grande -- mais il
  n'y a que 73 fichiers tres petits sur ce systeme de fichiers  (utilise
  sur /tmp) et la valeur _n_'_e_s_t _p_a_s alarmante.

  44..33..   EEsstt--iill ppoossssiibbllee ddee ssttoocckkeerr ll''iimmaaggee CCDD ssuurr uunn ssyysstteemmee ddee ffiicchhiieerr
  UUMMSSDDOOSS ??""

  Oui.  Le seul systeme de fichiers ni assez fiable ni assez rapide pour
  graver des CD est NFS (_N_e_t_w_o_r_k _F_i_l_e_S_y_s_t_e_m, systeme de fichiers par  le
  reseau).

  J'utilise moi-meme UMSDOS pour partager l'espace disque entre Linux et
  DOS/Win sur un PC (486/66) dedie au gravage des CDs.

  44..44..  YY aa--tt--iill uunn mmooyyeenn ddee ppaasssseerr oouuttrree lleess lliimmiittaattiioonnss ddee IISSOO 99666600 ??""

  Oui. Vous pouvez mettre le systeme de fichiers qui vous plait  sur  le
  CD.   Mais certains systemes d'exploitation ne pourront rien en faire.

  Voici la recette :

  +o  creez un fichier vide d'une taille de 650 Mo :

                       dd if=/dev/zero of="fic_vide" bs=1024k count=650

  +o  creez un systeme de fichiers ext2 sur ce fichier :

                  bash$ /sbin/mke2fs fic_vide
                  fic_vide is not a block special device.
                  Proceed anyway? (y,n) y

  (NdT : mke2fs demande confirmation de creer le systeme de fichiers sur
  un fichier normal.) ;

  +o  montez ce fichier vide a l'aide du peripherique loopback :

                       mount -t ext2 -o loop=/dev/loop1 fic_vide /mnt

  +o  copiez les fichiers vers /mnt et demontez-le apres ;

  +o  utilisez  cdwrite  ou  cdrecord  sur fic_vide (qui n'est plus vide)
     comme si c'etait une image ISO 9660.

  Si vous voulez creer une  entree  dans  /etc/fstab  pour  un  tel  CD,
  desactivez sa verification, par exemple :

               /dev/cdrom      /cdrom  ext2    defaults,ro     0  0

  Le  premier 0 veut dire "ne me compte pas dans les dumps", la deuxieme
  (importante) veut dire "ne verifie pas les erreurs au demarrage" (fsck
  n'arrivera pas a verifier les erreurs eventuelles sur le CD).

  44..55..  CCoommmmeenntt lliirree eett eeccrriirree ddeess CCDDss aauuddiioo ??""

  Veuillez  prendre  les paquetages "cdda2wav" et "sox", disponibles sur
  sunsite" et ses miroirs :

       <ftp://sun-
       site.unc.edu/pub/Linux/apps/sound/cds/cdda2wav0.71.src.tar.gz>
       <ftp://sunsite.unc.edu/pub/Linux/apps/sound/con-
       vert/sox-11gamma-cb3.tar.gz>

  cdda2wav vous permet de prendre un intervalle specifique (ou une plage
  entiere) de votre CD audio et le convertit en un fichier  audio)  pour
  qu'on puisse l'ecrire sur le CD-R avec cdwrite.

  44..66..  CCoommmmeenntt rreecchheerrcchheerr ddeess ppeerriipphheerriiqquueess SSCCSSII aapprreess llee ddeemmaarrrraaggee  ??""

  Le  fichier  drivers/scsi/scsi.c  contient  les informations suivantes
  (NdT : traduites en francais) :

       /*
        * Utilisation : echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
        * avec "0 1 2 3" remplaces par vos "Carte Canal Id Lun".
        * Considerez ceci comme une caracteristique BETA.
        *     ATTENTION : Ceci n'est pas fait pour brancher vos
        *     peripheriques a chaud. Comme le SCSI n'a pas ete fait
        *     pour ca, vous pouvez endommager votre materiel !
        * Cependant il est peut-etre autorise d'allumer un
        * peripherique deja branche. Il n'est peut-etre pas garanti
        * que ce peripherique ne corrompe pas un transfert de donnees
        * en cours.
        */

  44..77..   EEsstt--iill ppoossssiibbllee ddee ffaaiirree uunnee ccooppiiee eexxaaccttee dd''uunn CCDD ddee ddoonnnneeeess ??""

  Oui. Mais vous devriez etre conscient du fait que toute  erreur  faite
  en lisant l'original (due a la poussiere ou a des rayures) donnera une
  copie defectueuse.

  Premier cas : vous avez un graveur de CDs  et  un  lecteur  de  CD-ROM
  separe. En tapant la commande :

       cdwrite -v -D /dev/sgc --pad -b  $(isosize  /dev/scd0) /dev/scd0

  ou

       cdrecord -v dev=3,0 speed=2 -isosize /dev/scd0

  vous lisez le flot de donnees du lecteur de CD-ROM attache a /dev/scd0
  et l'ecrivez directement sur le graveur par /dev/sgc.

  Deuxieme cas : vous n'avez pas de lecteur de CD-ROM separe. Vous devez
  utiliser le graveur pour lire le CD-ROM comme ceci :

       dd if=/dev/scd0 of=cdimage bs=1c count=`isosize  /dev/scd0`

  Cette  commande  est  equivalente  au  resultat de mkisofs, vous devez
  continuer tel que c'est decrit a la section ``''. Veuillez  noter  que
  cette methode ne fonctionnera pas sur des CDs audio !

  44..88..  LLiinnuuxx ppeeuutt--iill lliirree ddeess CCDDss JJoolliieett ??""

  Oui.  Mais  vous devez patcher le noyau et le recompiler. Pour plus de
  details, voyez
       <http://www-plateau.cs.berkeley.edu/people/chaf-
       fee/joliet.html>

  44..99..   CCoommmmeenntt  ppuuiiss--jjee lliirree//mmoonntteerr ddeess CCDD--RROOMMss aavveecc llee ggrraavveeuurr ddee CCDDss
  ??""

  Comme  vous  le feriez avec un lecteur de CD-ROM normal. Aucune astuce
  la-dessous. Notez que vous devez utiliser les peripheriques  scd  (CD-
  ROM  SCSI)  pour  monter  les  CDs  en  lecture. Voici un exemple pour
  /etc/fstab :

               /dev/scd0       /cdrom  iso9660 ro,user,noauto  0  0

  55..  DDeeppaannnnaaggee

  55..11..  CCaa nnee mmaarrcchhee ppaass :: ssoouuss LLiinnuuxx

  Veuillez d'abord verifier que le  graveur  fonctionne  avec  un  autre
  systeme d'exploitation. Concretement :

  +o  Est-ce que le controleur reconnait le graveur comme un peripherique
     SCSI ?

  +o  Est-ce que le logiciel pilote reconnait le graveur ?

  +o  Est-il possible de fabriquer un CD avec les logiciels fournis ?

  Si "ca ne fonctionne pas" meme sous d'autres systemes  d'exploitation,
  vous avez un conflit materiel ou un materiel defectueux.

  55..22..  CCaa nnee mmaarrcchhee ppaass :: ssoouuss DDOOSS eett aassssiimmiilleess

  Essayez  d'utiliser  Linux.  L'installation  et  la  configuration des
  pilotes SCSI pour DOS est une horreur. Linux est trop complique ? Ha !

  55..33..  EErrrreeuurrss SSCCSSII ppeennddaanntt llaa pphhaassee ddee ggrraavvaaggee

  Il est fort probable que ces erreurs soient dues a :

  +o  possibilite de deconnection/reconnection (scatter/gather) manquante
     sur le bus SCSI ;

  +o  materiel pas assez refroidi ;

  +o  materiel defectueux (devrait etre detecte par ``'').

  Sous des circonstances variees, les peripheriques SCSI se deconnectent
  et  se  reconnectent  par  eux-memes  (de maniere electronique) du bus
  SCSI.  Si  cette  possibilite  n'est  pas  disponible   (verifiez   le
  controleur  et  les  parametres  du  noyau), certains graveurs ont des
  problemes pendant le gravage ou le fixage du CD-R.

  En particulier, le  pilote  SCSI  NCR  53c7,8xx  a  cette  possibilite
  desactivee par defaut, et vous devriez donc verifier ceci en premier :

               NCR53c7,8xx SCSI support                  [N/y/m/?] y
                  always negotiate synchronous transfers [N/y/?] (NEW) n
                  allow FAST-SCSI [10MHz]                [N/y/?] (NEW) y
                  allow DISCONNECT                       [N/y/?] (NEW) y

  66..  RReemmeerrcciieemmeennttss

     AAnnddrreeaass EErrddmmaannnn <<eerrddmmaannnn@@zzpprr..uunnii--kkooeellnn..ddee>>
        a fourni l'exemple du graveur Yamaha ;

     AArrtt SSttoonnee <<ssttoonnee@@mmaatthh..uubbcc..ccaa>>
        a eu l'idee de mettre des systemes de fichiers non ISO 9660  sur
        un CD ;

     BBaarrttoosszz MMaarruusszzeewwsskkii <<BB..MMaarruusszzeewwsskkii@@zzssmmeeiiee..ttoorruunn..ppll>>
        a rapporte des erreurs de prononciation ;

     BBeerrnnhhaarrdd GGuubbaannkkaa <<bbeegg@@iipppp--ggaarrcchhiinngg..mmppgg..ddee>>
        a  remarque  le  besoin  d'une  version  recente  de  mount pour
        utiliser le peripherique loopback ;

     BBrriiaann HH.. TToobbyy
        a fignole l'orthographe ;

     BBrruuccee PPeerreennss <<bbrruuccee@@ppiixxaarr..ccoomm>>
        a donne des informations sur la liste de distribution cdwrite ;

     DDaallee SScchheeeettzz <<ddwwaarrff@@ppoollaarriiss..nneett>>
        a aide a ameliorer la section sur la creation de l'image du CD ;

        a donne l'URL de l'outil mkhybrid ;

     EEddwwiinn HH.. KKrriibbbbss
        a remarque que '-K' necessite de patcher mkisofs ;

     GGeerraalldd CC SSnnyyddeerr <<ggccssnnyydd@@lloooopp..ccoomm>>
        a teste l'ecriture d'un CD-ROM ext2 (voir ``'') ;

     IInnggoo FFiisscchheenniisscchh <<iinnggoo@@mmii..uunnii--kkooeellnn..ddee>>
        a   fourni   l'exemple  des  deux  controleurs  hebergeant  deux
        peripheriques ;

     JJaannnnee HHiimmaannkkaa <<sshheemm@@ooyytt..oouulluu..ffii>>
        pointeur vers le patch du noyau pour lire des CDs Joliet ;

     JJooeerrgg SScchhiilllliinngg <<sscchhiilllliinngg@@ffookkuuss..ggmmdd..ddee>>
        informations sur cdrecord ;

     JJooss vvaann GGeeffffeenn <<jjooss@@ttnnjj..pphhyyss..ttuuee..nnll>>
        a note le probleme dans ``'' ;

     MMaarrkkuuss DDiicckkeebboohhmm <<mm..ddiicckkeebboohhmm@@uunnii--kkooeellnn..ddee

     PPiieerrrree PPffiisstteerr <<pppp@@uupplliifftt..ffrr>>
        a aide a developper la recette des copies exactes ;

     RRiicckk CCoocchhrraann <<rriicckk@@mmsscc..ccoorrnneellll..eedduu>>
        indice sur dis-/reconnect desactive par defaut  dans  le  pilote
        NCR ;

     SStteepphhaann NNooyy <<ssttnnooyy@@mmii..uunnii--kkooeellnn..ddee>>
        des informations et son experience sur l'ecriture de CDs audio ;

     SStteepphheenn HHaarrrriiss <<sswweehh@@mmppnn..ccoomm>>
        a donne des indices sur l'ecriture des CDs audio ;

     TThhee SShheeeeppyy OOnnee <<kkeerroo@@eessccaappee..ccoomm>>
        a suggere l'utilisation des CD rates en dessous de bouteilles ;

     VVoollkkeerr KKuullhhmmaannnn <<kkuuhhllmmaavv@@eelleecc..ccaanntteerrbbuurryy..aacc..nnzz>>
        a remarque que le paquetage cdwrite ne contient pas mkisofs.

  Fin du HOWTO graveur de CDs sous Linux

  Guide d'utilisation d'un lecteur de CD-ROM sous Linux
  Jeff Tranter, tranter@pobox.com - Adaptation franaise Bruno
  Cornec, bruno@victoria.frmug.org
  v1.14, 24 Mars 1999

  Ce document dcrit l'installation, la configuration et l'utilisation
  d'un lecteur de CD-ROM sous Linux. Il indique les matriels pris en
  charge et rpond  certaines questions frquemment poses. Le but est
  de rendre les nouveaux utilisateurs rapidement oprationnels et de
  rduire le trafic des forums USENET et des listes de discussion.
  ______________________________________________________________________

  Table des matires





















































  1. Introduction

     1.1 Remerciements
     1.2 Nouvelles versions de ce document
     1.3 Suggestions
     1.4 Licence de Distribution

  2. La technologie du CD-ROM

  3. Matriels pris en charge

     3.1 Les lecteurs de CD-ROM ATAPI
     3.2 Les lecteurs de CD-ROM SCSI
     3.3 Les lecteurs de CD-ROM  interface propritaire
     3.4 Lecteur sur port parallle
     3.5 Pilotes alternatifs

  4. Installation

     4.1 Installation du matriel
     4.2 Configuration et fabrication du noyau Linux
     4.3 Cration des fichiers de priphrique et passage de paramtres  l'initialisation
        4.3.1 Le pilote Sbpcd
        4.3.2 Pilote Sonycdu535
        4.3.3 Pilote Cdu31a
        4.3.4 Pilote Aztcd
        4.3.5 Pilote Gscd
        4.3.6 Pilote Mcd
        4.3.7 Pilote Mcdx
        4.3.8 Pilote Cm206
        4.3.9 Pilote Optcd
        4.3.10 Pilote Sjcd
        4.3.11 Pilote Paride
        4.3.12 Pilote SCSI
        4.3.13 Pilote IDECD
     4.4 Amorage du noyau Linux
     4.5 Montage, Dmontage, et jection du media
     4.6 Dpannage
        4.6.1 tape 1: Assurez vous d'excuter le noyau que vous avez compil
        4.6.2 tape 2: Assurez vous que les pilotes adquats sont dans le noyau
        4.6.3 tape 3: Le noyau a-t-il dtect votre lecteur lors de l'amorage ?
        4.6.4 tape 4: Pouvez-vous lire des donnes du lecteur ?
        4.6.5 tape 5: Pouvez-vous monter le disque ?
        4.6.6 Diagnostiquer des problmes audio-numriques
        4.6.7 Si rien ne marche

  5. Les applications

     5.1 Platines de lecture de CDs audio-numriques
     5.2 Le CD-Photo
     5.3 Mkisofs
     5.4 Outils ISO-9660

  6. Rponses aux questions frquemment poses (FAQ)

     6.1 Comment un utilisateur n'tant pas
     6.2 Pourquoi ai-je
     6.3 Comment exporter un CD-ROM vers d'autres machines via NFS ?
     6.4 Puis-je amorcer Linux  partir d'un CD-ROM ?
     6.5 Comment peut-on lire les donnes des CDs audio-numriques ?
     6.6 Pourquoi la commande
     6.7 Est-ce que Linux prend en charge les graveurs de CD ?
     6.8 Pourquoi est-ce que j'obtiens mount: Read-only file system lorsque je monte un CD-ROM ?
     6.9 Pourquoi le tiroir du lecteur s'ouvre-t-il quand j'arrte le systme ?
     6.10 J'ai un CD "spcial" qui ne peut tre mont
     6.11 Est-ce que des lecteurs multi-CDs fonctionnent avec Linux ?
     6.12 J'obtiens des erreurs "/cdrom: Permission denied" ou "/cdrom: permission non accorde"
     6.13 Comment dois-je interprter les messages d'erreur noyau du pilote IDE CD ?
     6.14 Comment puis-je savoir la vitesse de mon lecteur de CD-ROM ?
     6.15 Mon lecteur de CD-ROM s'est arrt de fonctionner aprs l'installation de Linux
     6.16 Il y a des fichiers cachs sur un CD que je ne peux lire
     6.17 O est documente l'API du CD-ROM ?
     6.18 Pourquoi ne vois-je pas les noms de fichiers longs sur ce CD-ROM Windows?
     6.19 Le systme de fichiers Joliet de Microsoft est-il pris en charge ?
     6.20 Linux prend-il en charge les CDs "extra" ?
     6.21 Linux prend-il en charge les DVD-ROM ?
     6.22 Linux prend-il en charge les CD-RW ?

  7. Rfrences



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Ce document indique comment utiliser un lecteur de CD-ROM sous  Linux.
  Il est conu comme un guide de rfrence rapide, couvrant tout ce que
  vous avez besoin de savoir pour installer et configurer un lecteur de
  CD-ROM sous Linux. Les questions frquemment poses au sujet des CD-
  ROMs y trouvent une rponse, et des rfrences sont donnes concernant
  d'autres sources d'informations relatives  la technologie et aux
  applications lies au CD-ROM.


  11..11..  RReemmeerrcciieemmeennttss


  La plupart des informations contenues ici proviennent de la
  documentation et des fichiers, fournis avec le code source du noyau
  Linux, de la FAQ du forum Usenet alt.cdrom et de remarques
  d'utilisateurs de Linux.

  Grce au logiciel SGML Tools ce document est maintenant disponible
  dans plusieurs formats, tous gnrs  partir d'un mme source.


  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt


  De nouvelles versions de ce document seront diffuses priodiquement
  dans le forum comp.os.linux.answers. Elles seront galement mises 
  jour sur les divers sites ftp anonymes qui archivent de telles
  informations, notamment
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/>.  Des versions
  hypertextuelles de ce HOWTO ainsi que d'autres sont disponibles sur de
  nombreux sites de la toile (World Wide Web), y compris
  <http://metalab.unc.edu/LDP/HOWTO/>. La plupart des distributions
  Linux sur CD-ROM comprend les HOWTOs, souvent sous le rpertoire
  /usr/doc, et vous pouvez aussi en acheter des exemplaires imprims
  chez de nombreux vendeurs. Quelques fois, les HOWTOs disponibles par
  l'intermdiaire des vendeurs de CD-ROM, des sites ftp ou sous forme
  imprime sont prims. Si ce HOWTO date de plus de six mois, alors une
  nouvelle copie est probablement disponible sur l'Internet.

  _V_e_u_i_l_l_e_z _n_o_t_e_r _q_u_e_, _v_u_e _l_a _n_a_t_u_r_e _d_y_n_a_m_i_q_u_e _d_e _l_'_I_n_t_e_r_n_e_t_, _t_o_u_s _l_e_s
  _l_i_e_n_s _v_e_r_s _l_e_s _s_i_t_e_s _w_e_b _e_t _f_t_p _m_e_n_t_i_o_n_n__s _d_a_n_s _c_e _d_o_c_u_m_e_n_t _s_o_n_t
  _s_u_s_c_e_p_t_i_b_l_e_s _d_e _c_h_a_n_g_e_r_.

  Des traductions de ce document sont disponibles dans plusieurs langues
  :
  Chinoise :  <http://www.linux.org.tw/CLDP/CDROM-HOWTO.html>

  Franaise :  <http://www.freenix.org/unix/linux/HOWTO/> [NDT : le
  miroir primaire est disponible  l'adresse  <ftp://ftp.medasys-
  digital-systems.fr/pub/linux/doc/>]

  Japonaise :  <http://jf.linux.or.jp/JF/JF.html/>

  Polonaise :  <http://www.jtz.org.pl/Html/CDROM-HOWTO.pl.html>

  Espagnole :  <ftp://ftp.insflug.org/es>

  Sudoise :  <http://www.swe-doc.linux.nu/>

  La majorit des traductions de ce HOWTO et des autres HOWTO consacrs
   Linux peut aussi tre trouve  l'adresse
  <http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/> et
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/>.  [NDT :
  les versions franaises peuvent aussi tre trouves aux adresses
  <http://www.freenix.org/unix/linux/HOWTO/> et
  <ftp://ftp.lip6.fr/pub/Linux/french/HOWTO>].

  Si vous faites une traduction de ce document dans une autre langue,
  faites le moi savoir pour que j'inclue une rfrence ici.


  11..33..  SSuuggggeessttiioonnss


  Je me repose sur vous, lecteur pour rendre ce HOWTO utile.  Si vous
  avez des suggestions, des corrections, ou des commentaires, n'hsitez
  pas  me les envoyer tranter@pobox.com, et j'essaierai de les
  incorporer dans une prochaine rvision. [NDT : Pour ce qui concerne
  la traduction, veuillez les faire parvenir au traducteur
  bruno@victoria.frmug.org]

  Je souhaite aussi rpondre aux questions gnrales sur les CD-ROM sous
  Linux, du mieux possible. Avant de les poser, lisez s'il vous plat
  toutes les informations de ce HOWTO, et ensuite envoyez moi un rapport
  dtaill de votre problme. Veuillez ne pas me poser de questions sur
  les lecteurs de CD-ROM sur d'autres systmes d'exploitation que Linux.

  Si vous publiez ce document sur un CD-ROM ou sous forme papier, une
  copie de remerciement serait apprcie; envoyez moi un courrier
  lectronique pour obtenir mon adresse postale. Considrez galement
  l'opportunit de faire une donation au Projet Linux de Documentation
  pour encourager la documentation libre autour de Linux. Contactez le
  coordinateur des HOWTO Linux, Tim Bynum (linux-howto@metalab.unc.edu),
  pour plus d'informations.


  11..44..  LLiicceennccee ddee DDiissttrriibbuuttiioonn


  Copyright (c) 1995-1999 Jeff Tranter.  Traduction Copyright (c)
  1995-1999 Bruno Cornec. [NDT : ce qui suit s'applique  cette
  traduction galement]

  Ce document peut tre diffus dans les mmes termes que ceux en
  vigueur dans la licence LDP consultable  l'adresse
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.





  22..  LLaa tteecchhnnoollooggiiee dduu CCDD--RROOMM



  "Un CD-ROM est de la mmoire morte, et un systme de disque compact
  audio-numrique est disponible en tant que mdia organis de donnes numriques
  pour cet usage. Pour lire des CDs audio-numriques, veuillez insrer une prise
  de casque."
  --- extrait d'un manuel d'utilisation d'un lecteur de CD-ROM



  Ne paniquez pas ! Le monde de la technologie du CD-ROM n'est pas aussi
  confus que votre manuel d'utilisation.

  CD-ROM signifie _C_o_m_p_a_c_t _D_i_s_c _R_e_a_d_-_O_n_l_y _M_e_m_o_r_y(Disque Compact servant
  de Mmoire accessible en lecture uniquement), un mdia de stockage,
  utilisant un laser optique pour lire des trous microscopiques sur la
  couche d'aluminium du disque en polycarbonate.  Il utilise le mme
  format que les disques compacts audio-numriques.  En raison de sa
  haute capacit de stockage, de sa fiabilit et de son faible cot, le
  CD-ROM est devenu un moyen de stockage de plus en plus rpandu.

  La capacit de stockage d'un disque CD-ROM est approximativement de
  650 Mo, soit l'quivalent de plus de 500 disquettes 3"1/2 haute
  densit, ou encore d'environ 250.000 pages dactylographies.

  La premire gnration de lecteurs (connue sous le nom de _s_i_m_p_l_e
  _v_i_t_e_s_s_e), fournissait un taux de transfert d'environ 150 Ko par
  seconde. Les fabriquants de lecteurs ont ensuite produit des lecteurs
  double vitesse (300 Ko/s), quadruple vitesse (600 Ko/s), et plus
  rapides. Les lecteurs du moment fonctionnent  plus de 40 fois la
  vitesse (40x), bien que l'on atteigne le taux maximum de transfert
  seulement sur certaines portions de la surface du disque.

  La plupart des lecteurs de CD-ROM utilisent soit une interface SCSI
  (Small Computer Systems Interface), soit une interface IDE ATAPI, soit
  une interface propritaire. Ils permettent aussi gnralement l'coute
  de disques audio-numriques, par l'entremise d'une prise casque
  externe, ou d'une sortie Hi-Fi. Certains lecteurs de CDs permettent
  aussi la lecture de trames (frames) de donnes issues d'un disque
  audio-numrique, sous une forme numrique.

  Les CD-ROM sont habituellement formats avec un systme de fichier
  ISO-9660 (prcdemment appel _H_i_g_h _S_i_e_r_r_a). Ce format calque
  l'utilisation de noms de fichiers sur celle de MS-DOS (8+3
  caractres). Les _E_x_t_e_n_s_i_o_n_s _R_o_c_k _R_i_d_g_e utilisent des champs non-
  dfinis dans la norme ISO-9660, pour autoriser les noms de fichiers
  plus longs et l'ajout d'informations propres  Unix (par exemple, les
  droits associs au fichier, les liens symboliques, etc).  Microsoft a
  dfini un systme de fichiers ISO propritaire appel Joliet, qui
  prend en charge les noms de fichiers longs en utilisant l'encodage de
  caractres 16 bits UNICODE.

  Le _C_D _P_h_o_t_o est un standard dvelopp par Kodak, pour permettre le
  stockage d'images photographiques sous forme de donnes numriques sur
  un CD-ROM. Grce  un logiciel appropri, il est possible de
  visualiser les images sur un ordinateur, de les manipuler, ou de les
  imprimer. Des informations peuvent tre ajoutes sur un CD Photo  une
  date ultrieure; ceci est appel une possibilit _m_u_l_t_i_-_s_e_s_s_i_o_n.

  Les graveurs de CD (CD-R) permettent l'criture sur un CD spcial
  "dor", qui peut tre lu par n'importe quel lecteur de CD-ROM. Les
  donnes ne peuvent y tre crites qu'une fois, bien que l'utilisation
  du format multi-session, permette d'ajouter de nouvelles donnes au
  disque. Ces lecteurs deviennent de plus en plus abordables.
  Les lecteurs de CD-RW (read/write ou lecture/criture) autorisent de
  multiples critures de donnes sur le CD. Ils utilisent des disques
  spciaux qui ne peuvent pas tre lus sur des lecteurs de CD-ROM
  standard, bien que les lecteurs de CD-RW eux-mmes sachent lire des
  disques standard.

  Le DVD-ROM tend la capacit de stockage du CD jusqu' 17 gigaoctets.
  Ils sont couramment utiliss comme mdia de distribution pour les
  films longue dure encods avec le format MPEG-2. L'encodage vido
  MPEG est habituellement utilis conjointement avec des dcodeurs
  matriels spcialiss.


  33..  MMaattrriieellss pprriiss eenn cchhaarrggee


  Cette section prsente les lecteurs de CD-ROM et les interfaces qui
  sont actuellement pris en charge par Linux. Les informations sont ici
  bases sur le dernier noyau Linux stable, qui en ce moment est la
  version 2.2.4.

  Ces informations sont seulement valides pour Linux sur plate-forme
  Intel. L'essentiel s'applique  Linux sur d'autres architectures de
  processeurs, de la mme manire.


  33..11..  LLeess lleecctteeuurrss ddee CCDD--RROOMM AATTAAPPII


  L'ATAPI (ATA Packet Interface - Interface par paquets ATA) est un
  protocole pour le contrle des priphriques de stockage. Il est
  construit sur l'interface ATA (Attachement AT), le nom officiel du
  standard ANSI pour l'interface IDE, dvelopp pour les disques durs.
  L'ATAPI est communment utilis pour les disques durs, les lecteurs de
  CD-ROM, les lecteurs de bandes, et d'autres priphriques. tant
  actuellement le type d'interface le plus populaire, il offre la
  plupart des fonctions du SCSI, sans besoin d'un contrleur ou de
  cbles chers.

  Le noyau Linux dispose d'un pilote qui devrait fonctionner avec
  n'importe quel lecteur de CD-ROM conforme au standard ATAPI. La liste
  des fabriquants fournissant des lecteurs compatibles inclut Aztech,
  Mitsumi, NEC, Sony, Creative Labs, et Vertos. Si vous avez achet
  rcemment un lecteur de CD-ROM, en particulier s'il est quadruple
  vitesse au moins, vous tes quasiment assurs qu'il est IDE/ATAPI.

  Linux propose galement un pilote du noyau d'mulation IDE SCSI, qui
  permet  un priphrique IDE/ATAPI d'apparatre, au niveau logiciel,
  comme un priphrique SCSI, ce qui autorise l'utilisation d'un pilote
  de priphrique SCSI au lieu du pilote natif ATAPI. Ceci est utile
  quand vous disposez d'un priphrique ATAPI pour lequel aucun pilote
  natif n'a t crit (par exemple, un lecteur ATAPI PD-CD ou CDR); vous
  pouvez utiliser cette mulation conjointement avec le pilote de
  priphrique SCSI appropri.


  33..22..  LLeess lleecctteeuurrss ddee CCDD--RROOMM SSCCSSII


  Le SCSI (Small Computer Systems Interface) est un format populaire en
  ce qui concerne les lecteurs de CD-ROM. Ses principaux avantages sont
  un taux de transfert relativement rapide, une capacit  reconnatre
  de multiples priphriques, et sa prise en compte par une grande
  varit d'ordinateurs. Quelques dsavantages du SCSI sont le besoin
  d'une carte contrleur et de cbles relativement chers.

  Tout lecteur de CD-ROM SCSI avec une taille de blocs de 512 ou 2048
  octets devrait fonctionner sous Linux; ceci inclut la grande majorit
  des lecteurs de CD-ROM du march.

  Vous aurez galement besoin d'une carte contrleur SCSI; Cf "Comment
  utiliser des priphriques SCSI ("SCSI HOWTO") pour plus d'information
  sur le matriel d'interface.

  Il est  noter que certains lecteurs de CD-ROM comprennent un
  contrleur propritaire ayant une interface modifie, non entirement
  compatible avec le standard SCSI (par exemple, ne permettant pas
  d'ajouter d'autres priphriques SCSI sur le bus). Ceux-ci ne
  fonctionneront vraisemblablement _p_a_s avec Linux.


  33..33..  LLeess lleecctteeuurrss ddee CCDD--RROOMM  iinntteerrffaaccee pprroopprriittaaiirree


  De nombreux lecteurs utilisant des interfaces propritaires sont
  disponibles; l'interface est souvent fournie par l'entremise d'une
  carte son. De simples cartes d'interface, quivalentes  l'interface
  propose sur les cartes son, sont galement disponibles. Ces lecteurs
  sont gnralement moins chers et de taille infrieure aux lecteurs
  SCSI. Leur dsavantage est le manque de standardisation et
  d'volutivit.

  Il est  noter que ces interfaces propritaires sont parfois appeles
  abusivement IDE, parce que,  l'instar des disques durs IDE, elles
  utilisent une simple interface base sur le bus PC/AT. Pour ajouter 
  la confusion, certains fabriquants, et de faon notable Creative Labs,
  ont fourni diffrents types de lecteurs de CD-ROM et ont propos des
  interfaces propritaires, SCSI et ATAPI sur leurs cartes son.

  Les lecteurs de CD-ROM suivants,  interface propritaire, sont
  reconnus au niveau du noyau Linux (les lecteurs prsents sur la mme
  ligne sont compatibles entre eux):

  Le tableau ci-dessous donne les lecteurs de CD-ROM propritaires qui
  sont connus pour fonctionner sous Linux. Des pilotes pour des lecteurs
  additionnels peuvent tre disponibles dans les derniers noyaux de
  dveloppement ou en tant que rustine du noyau. Ces dernires peuvent
  le plus souvent tre trouves  l'adresse
  <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cdrom/>.  Vrifiez
  aussi les fichiers de documentation inclus avec la distribution du
  noyau, habituellement installs dans le rpertoire
  /usr/src/linux/Documentation/cdrom, pour obtenir les dernires
  informations.



















                  Lecteurs de CD-ROM propritaires

  Fabriquant              Type            Pilote du noyau         Notes
  ----------              ----            ---------------         -----
  Panasonic               CR-521          sbpcd                   Note 1
  Panasonic               CR-522          sbpcd                   Note 1
  Panasonic               CR-523          sbpcd                   Note 1
  Panasonic               CR-562          sbpcd                   Note 1
  Panasonic               CR-563          sbpcd                   Note 1
  Creative Labs           CD-200          sbpcd
  IBM                     External ISA    sbpcd                   Note 2
  Longshine               LCS-7260        sbpcd
  Teac                    CD-55A          sbpcd
  Sony                    CDU-31A         cdu31a
  Sony                    CDU-33A         cdu31a
  Sony                    CDU-535         sonycd535               Note 3
  Sony                    CDU-531         sonycd535
  Aztech                  CDA268-01A      aztcd                   Note 4
  Orchid                  CDS-3110        aztcd
  Okano/Wearnes           CDD110          aztcd
  Conrad                  TXC             aztcd
  CyCDROM                 CR520ie         aztcd
  CyCDROM                 CR940ie         aztcd
  GoldStar                R420            gscd                    Note 5
  Philips/LMS             CM206           cm206                   Note 6
  Mitsumi                 CRMC LU005S     mcd/mcdx                Note 7, 8
  Mitsumi                 FX001           mcd/mcdx                Note 7, 8
  Optics Storage          Dolphin 8000AT  optcd
  Lasermate               CR328A          optcd
  Sanyo                   H94A            sjcd
  various                 various         isp16                   Note 9



  Notes:


  1. Vous pouvez trouver ces lecteurs sous les noms Creative Labs,
     Panasonic, Matsushita, ou Kotobuki.

  2. Ce lecteur est le mme que le Panasonic CR-562.

  3. Peut aussi tre vendu sous le nom Procomm.

  4. Ce pilote est pour le lecteur CDA268-01A seulement. Les autres
     modles, y compris le CDA268-03I et le CDA269-031SE ne sont pas
     propritaires et doivent utiliser le pilote du noyau IDECD (ATAPI).

  5. Peut aussi tre vendu dans le kit multimdia Reveal.

  6. Le lecteur Philips CM205 n'est pas pris en charge par ce pilote,
     mais il existe un pilote spar en version alpha disponible sur le
     serveur ftp://metalab.unc.edu sous
     /pub/Linux/kernel/patches/cdrom/lmscd0.4.tar.gz

  7. Peut aussi tre vendu sous le nom Radio Shack.

  8. Il y a deux pilotes disponibles. "mcd" est le pilote originel, et
     "mcdx" est le nouveau pilote avec plus de fonctions (mais
     ventuellement moins stable).

  9. Ce pilote fonctionne avec les lecteurs de CD-ROM qui sont relis 
     l'interface disponible sur les cartes son ISP16, MAD16 ou Mozart.

     Si un lecteur mentionn ici n'est pas pris en charge par votre
     noyau, vous avez probablement besoin de le mettre  niveau avec une
     nouvelle version.

  Si votre lecteur n'est pas de l'un des modles mentionns ici, en
  particulier s'il a t achet rcemment et s'il est quadruple vitesse
  ou plus rapide, il utilise probablement l'interface IDE/ATAPI
  mentionne dans une section prcdente. _L_'_e_r_r_e_u_r _l_a _p_l_u_s _c_o_u_r_a_n_t_e
  _p_a_r_m_i _l_e_s _u_t_i_l_i_s_a_t_e_u_r_s _d_e _C_D_-_R_O_M _s_o_u_s _L_i_n_u_x _e_s_t _d_e _p_e_n_s_e_r _q_u_e _t_o_u_t
  _l_e_c_t_e_u_r _r_a_c_c_o_r_d_ _ _u_n_e _c_a_r_t_e _S_o_u_n_d_B_l_a_s_t_e_r _d_o_i_t _u_t_i_l_i_s_e_r _l_e _p_i_l_o_t_e
  _S_B_P_C_D. Creative Labs et la plupart des autres fabriquants ne vendent
  plus de lecteur disposant d'interface propritaire, ils suivent le
  standard de l'interface ATAPI/IDE.


  33..44..  LLeecctteeuurr ssuurr ppoorrtt ppaarraallllllee


  Il existe des priphriques de stockage externes, y compris des
  lecteurs de CD-ROM, qui se connectent sur le port parallle des
  ordinateurs personnels. Dans la plupart des cas, ces priphriques
  utilisent en interne une interface IDE ainsi qu'un adaptateur qui
  interconnecte le bus IDE interne au port parallle du PC.

  Linux dispose d'un pilote IDE pour port parallle qui prend en charge
  la majorit des priphriques sur port parallle. Au moment o
  j'cris, il prend en charge les priphriques des vendeurs suivants
  (ainsi que la plupart des clones et autres lecteurs sans nom
  compatibles avec ceux-ci): ATEN, Avatar, DataStor, Fidelity
  International Technology, Freecom, Hewlett-Packard, Imation, KT
  Technology, KingByte Information Corp., Maxell, MicroSolutions,
  OnSpec, Shuttle Technology, SyQuest, et ValuStore.

  Des informations additionnelles peuvent tre trouves  l'adresse
  <http://www.torque.net/linux-pp.html>.


  33..55..  PPiillootteess aalltteerrnnaattiiffss


  Il existe un pilote du noyau alternatif pour les lecteurs
  Panasonic/Matsushita CR-56x crit par Zoltan Vorosbaranyi. Il peut
  tre trouv  l'adresse
  <ftp://ftp.honlap.net/pub/linux/pcd/pcd-0.30.tar.gz>.


  44..  IInnssttaallllaattiioonn


  L'installation d'un lecteur de CD-ROM sous Linux comporte les tapes
  suivantes :


  1. Installation du matriel.

  2. Configuration et fabrication du noyau Linux.

  3. Cration des fichiers de priphrique et positionnement des
     paramtres d'amorage.

  4. Amorage du noyau Linux

  5. Montage du mdia.

  Les sections suivantes vont couvrir chacune de ces tapes en dtail.



  44..11..  IInnssttaallllaattiioonn dduu mmaattrriieell


  Veuillez suivre les instructions du fabricant pour l'installation du
  matriel, ou laissez votre revendeur effectuer l'opration. Les
  dtails varieront suivant la nature du lecteur, interne ou externe, et
  le type de l'interface utilise. Il n'y a aucune exigence spcifique
  quant  l'installation sous Linux. Il est possible que vous ayez 
  positionner des cavaliers sur le lecteur et/ou la carte d'interface
  pour un fonctionnement correct; certains pilotes du noyau incluent des
  fichiers de documentation qui contiennent cette information.

  Comme expliqu dans le fichier ide-cd, les lecteurs de CD-ROM ATAPI
  doivent tre configurs par cavalier comme "seul" ("single") ou
  "matre" ("master"), et non "esclave" ("slave") lorsqu'un seul
  priphrique IDE est raccord  l'interface (bien que cette
  restriction ne soit plus obligatoire avec les noyaux rcents).


  44..22..  CCoonnffiigguurraattiioonn eett ffaabbrriiccaattiioonn dduu nnooyyaauu LLiinnuuxx


  Lors de la premire installation de Linux  partir d'un CD-ROM, vous
  utiliserez vraisemblablement les disquettes d'amorage (boot et root)
  fournies avec votre distribution Linux. Si possible, choisissez une
  disquette d'amorage avec un pilote de noyau pour votre type de
  lecteur de CD-ROM. Si vous ne pouvez pas trouver de disque d'amorage
  avec le pilote de CD-ROM ncessaire au votre, vous avez plusieurs
  options :


  1. Amorcer directement depuis le CD-ROM (si votre CD Linux et votre
     ordinateur le permettent)

  2. Installer  travers le rseau

  3. Amorcer DOS, et installer les fichiers Linux sur votre disque dur.

  4. Amorcer DOS, et crer un jeu de disquettes pour installer Linux

  5. Trouver quelqu'un qui peut fabriquer pour vous une disquette
     d'amorage contenant le pilote ncessaire pour votre CD-ROM

  Le Guide d'installation de Linux (Linux Installation HOWTO)
  <http://metalab.unc.edu/LDP/HOWTO/Installation-HOWTO.html> a
  d'avantage d'informations sur l'installation de Linux. Si vous avez
  achet Linux sur CD-ROM, il y a des chances qu'il y ait galement des
  instructions d'installation (le petit livret  l'intrieur du botier
  de disque, et/ou des fichiers sur le CD).

  Une fois Linux install, la plupart des utilisateurs voudra compiler
  son propre noyau, en gnral pour l'une des raisons suivantes :


    prendre en charge un lecteur de CD-ROM ou un autre matriel

    voluer vers une nouvelle version du noyau

    librer des ressources mmoire en minimisant la taille du noyau

  Le Guide du noyau Linux (Linux Kernel HOWTO)
  <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html> doit tre
  consult pour les dtails de fabrication du noyau. Je mentionnerai
  uniquement ici les points qui sont spcifiques aux lecteurs de CD-ROM.


  videmment, vous devez intgrer la prise en charge pour votre lecteur
  de CD-ROM lorsque vous faites un "make config".

  Si vous avez un lecteur de CD-ROM ATAPI, vous devez rpondre yes aux
  questions:



       Enhanced IDE/MFM/RLL disk/cdrom/tape support (CONFIG_BLK_DEV_IDE) [Y/n/?]
       (Prise en charge volue des disques/lecteurs de CD-ROM/lecteurs de bande IDE/MFM/RLL)
       Include IDE/ATAPI CDROM support (CONFIG_BLK_DEV_IDECD) [Y/n/?]
       (inclusion de la prise en charge des CD-ROMs IDE/ATAPI)




  Pour les lecteurs de CD-ROM SCSI, activez ces options :



       SCSI support (CONFIG_SCSI) [Y/n/m/?]
       (Prise en charge du SCSI)
       SCSI CDROM support (CONFIG_BLK_DEV_SR) [Y/n/m/?]
       (Prise en charge de CD-ROM SCSI)




  Activez galement la prise en charge de votre carte adaptateur SCSI,
  lorsque cela vous est demand, par exemple :



       Adaptec AHA152X/2825 support (CONFIG_SCSI_AHA152X) [Y/n/m/?]
       (Prise en charge des cartes Adaptec de type AHA152X)




  Pour les lecteurs de CD-ROM  interface propritaire, activez le
  pilote appropri. Vous pouvez utiliser le tableau prsent dans la
  section prcdente pour dterminer le pilote  utiliser pour votre
  modle.

  Virtuellement tous les CD-ROM utilisent le systme de fichier
  ISO-9660, vous devez donc aussi l'activer :



       ISO 9660 CDROM filesystem support (CONFIG_ISO9660_FS) [Y/n/m/?]
       (Prise en charge du systme de fichier ISO9660)




  Bien que cela ne soit pas ncessaire pour le fonctionnement du CD-ROM,
  si vous avez une carte son prise en charge par Linux, il est possible
  que vous vouliez l'activer et configurer le pilote son du noyau en
  mme temps. Le Guide de configuration du Son (Sound HOWTO)
  <http://metalab.unc.edu/LDP/HOWTO/Sound-HOWTO.html> peut tre une
  rfrence utile pour cela.

  Vous devez ensuite suivre la procdure habituelle de fabrication et
  d'installation du noyau .  N'amorcez pas le systme avec le nouveau
  noyau, tant que vous n'avez pas cr les fichiers de priphriques et
  que vous n'avez pas rgl les paramtres d'amorage, ainsi que dcrit
  dans la section suivante.

  Le systme de fichiers ISO-9660 et presque tous les pilotes de
  lecteurs de CD-ROM peuvent tre compils comme modules chargeables du
  noyau. Ce procd permet aux pilotes du noyau d'tre chargs et
  dchargs sans ramorcer le systme, ce qui libre aussi de la
  mmoire. Je vous recommande d'avoir votre installation du CD-ROM
  fonctionnelle en utilisant des pilotes compils dans le noyau d'abord.
  L'utilisation des modules est dcrite dans la documentation des
  modules et dans le Guide du noyau (Kernel HOWTO)
  <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>.

  Si un type de lecteur mentionn ici n'est pas pris en charge par votre
  noyau, vous devrez vraisemblablement le mettre  jour pour une version
  plus rcente.

  Il est possible que vous ayez  utiliser un pilote distribu
  sparment du code source du noyau. Ceci implique habituellement
  d'appliquer une rustine au noyau. A nouveau le Guide du noyau (Kernel
  HOWTO) <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html> explique
  comment le faire.

  Notez qu'il existe un programme de configuration du noyau  base de
  menus, invoqu par "make menuconfig" et une version graphique base
  sur X11, invoque par "make xconfig". Les trois moyens de
  configuration offrent tous une aide en ligne.


  44..33..  CCrraattiioonn ddeess ffiicchhiieerrss ddee pprriipphhrriiqquuee eett ppaassssaaggee ddee ppaarraammttrreess 
  ll''iinniittiiaalliissaattiioonn


  Le noyau utilise des fichiers de priphriques pour identifier quel
  pilote utiliser. Si vous utilisez une distribution standard de Linux,
  il est possible que les fichiers de priphrique ncessaires aient t
  crs pendant l'installation. Sous la distribution Slackware de Linux,
  par exemple, il y a un outil de paramtrage, setup dot de menus, qui
  inclut le paramtrage des lecteurs de CD-ROM, et la plupart des
  systmes dispose d'un script /dev/MAKEDEV. Si vous n'utilisez pas ces
  mthodes, vous pouvez appliquer la procdure manuelle dcrite dans
  cette section. Mme si vous utilisez l'une de ces mthodes, il est
  recommand de vrifier au moins les fichiers de priphrique par
  rapport aux informations de cette section.

  Vous crez le fichier de priphrique en excutant les commandes shell
  correspondant  votre type de lecteur. Ceci doit tre effectu en tant
  que superutilisateur (root). Notez que certaines distributions Linux
  peuvent utiliser des noms de priphriques de CD-ROM lgrement
  diffrents de ceux mentionns ici.

  Il est recommand de crer aussi un lien symbolique vers le
  priphrique de CD-ROM pour s'en souvenir plus facilement. Par
  exemple, pour un lecteur de CD-ROM IDE qui se trouve en deuxime
  position sur la seconde interface, le lien serait cr en utilisant :



       # ln -s /dev/hdd /dev/cdrom




  Si vous voulez couter des CDs audio-numriques, vous devrez
  positionner les protections sur le fichier de priphrique (le vrai
  fichier, pas le lien symbolique pointant dessus) pour permettre  tous
  les utilisateurs de lire, par exemple :
       # chmod 664 /dev/hdd
       # ls -l /dev/hdd
       brw-rw-r--   1 root     disk      22,  64 Feb  4  1995 /dev/hdd




  Si vous amorcez Linux, le pilote de priphrique tente de dterminer
  si les priphriques appropris sont prsents, typiquement en testant
  des adresses spcifiques. De nombreux pilotes testent automatiquement
   plusieurs adresses, mais en raison des diffrences de configuration,
  de conflits possibles entre pilotes et de limitations du matriel, les
  pilotes ont parfois besoin d'aide pour identifier les adresses et
  d'autres paramtres. La plupart des pilotes acceptent une option
  passe au niveau de la ligne de commande par le noyau au pilote de
  priphrique. Ceci peut s'effectuer interactivement, ou plus
  commodment, se configurer dans votre outil d'amorage. Avec LILO, par
  exemple, vous ajouteriez une commande append telle que la suivante 
  votre fichier /etc/lilo.conf:



       append = "sbpcd=0x230,SoundBlaster"




  Consultez la documentation de LILO pour plus d'informations.

  Dans la section suivante, je prsente les problmes spcifiques  un
  pilote de priphrique particulier, y compris les fichiers de
  priphrique, les paramtres d'amorage, et les possibilits des
  diffrents pilotes. Vous avez seulement besoin de lire la section
  relative  votre type de lecteur. Les fichiers de documentation se
  trouvent gnralement dans le rpertoire
  /usr/src/linux/Documentation/cdrom.


  44..33..11..  LLee ppiilloottee SSbbppccdd



            Auteur principal: Eberhard Moenkeberg (emoenke@gwdg.de)
      Support multi sessions: oui (mais pas tous les lecteurs)
      Support multi lecteurs: oui
   Support module chargeable: oui
     Lecture de trames audio: oui (uniquement les CR-562, CR-563, CD-200)
            Test automatique: oui
        Fichier priphrique: /dev/sbpcd, nombre majeur 25
    Fichier de configuration: sbpcd.h
  Option configuration noyau: Matsushita/Panasonic CDROM support?
    Fichier de documentation: sbpcd



  Ce pilote accepte une ligne de commande du noyau de la forme:



       sbpcd=<io-address>,<interface-type>




  o le premier paramtre est l'adresse de base du priphrique (par ex.
  0x230), et <interface-type> est soit "SoundBlaster", "LaserMate", ou
  "SPEA". Consultez le fichier sbpcd.h pour des conseils sur le type
  d'interface  utiliser. L'utilisation de sbpcd=0 dsactive la
  dtection automatique ainsi que le pilote.

  Le fichier de priphrique peut tre cr par:



       # mknod /dev/sbpcd b 25 0




  Jusqu' quatre lecteurs par contrleur sont pris en charge. Les trois
  lecteurs suivants sur le premier contrleur utiliseront les nombres de
  priphrique mineurs 1  3. Si vous avez plus d'un contrleur, crez
  les fichiers de priphrique avec des nombres majeurs 26, 27 et 28,
  jusqu' un maximum de 4 contrleurs (soit 16 lecteurs de CD-ROM au
  total; il est  esprer que ce soit suffisant pour la plupart des
  utilisateurs :-)

  Consultez le fichier sbpcd pour plus d'informations sur ce pilote.

  _S_i _v_o_u_s _a_v_e_z _a_c_h_e_t_ _r__c_e_m_m_e_n_t _u_n _l_e_c_t_e_u_r _d_e _C_D_-_R_O_M_, _n_e _p_r__s_u_p_p_o_s_e_z
  _p_a_s_, _p_a_r_c_e _q_u_'_i_l _e_s_t _c_o_n_n_e_c_t_ _ _u_n_e _c_a_r_t_e _S_o_u_n_d_B_l_a_s_t_e_r _q_u_'_i_l _d_o_i_v_e
  _u_t_i_l_i_s_e_r _c_e _p_i_l_o_t_e _d_u _n_o_y_a_u_. _L_a _p_l_u_p_a_r_t _d_e_s _l_e_c_t_e_u_r_s _d_e _C_D_-_R_O_M _v_e_n_d_u
  _p_a_r _C_r_e_a_t_i_v_e _L_a_b_s _s_o_n_t _m_a_i_n_t_e_n_a_n_t _d_e_s _l_e_c_t_e_u_r_s _I_D_E_/_A_T_A_P_I_.


  44..33..22..  PPiilloottee SSoonnyyccdduu553355



            Auteur principal: Ken Pizzini (ken@halcyon.com)
      Support multi sessions: non
      Support multi lecteurs: non
   Support module chargeable: oui
     Lecture de trames audio: non
            Test automatique: non
        Fichier priphrique: /dev/sonycd535, nombre majeur 24
    Fichier de configuration: sonycd535.h
  Option configuration noyau: Sony CDU535 CDROM support?
    Fichier de documentation: sonycd535



  Ce pilote accepte une ligne de commande du noyau de la forme:



       sonycd535=<io-address>




  o <io-address> est l'adresse de base du contrleur (par ex. 0x320).
  Alternativement, vous pouvez positionner la valeur de cette adresse
  dans le fichier sonycd535.h et la compiler dans le noyau.

  Le fichier de priphrique peut tre cr par:



       # mknod /dev/sonycd535 b 24 0


  Certaines distributions Linux utilisent /dev/sonycd pour ce
  priphrique. D'anciennes versions de ce pilote utilisaient un nombre
  majeur de priphrique 21; vrifiez que votre fichier de priphrique
  est correct.

  Ce pilote tait anciennement distribu sous forme de rustine, mais il
  fait maintenant partie du noyau standard. Consultez le fichier
  sonycd535 pour plus d'informations sur ce pilote.


  44..33..33..  PPiilloottee CCdduu3311aa



            Auteur principal: Corey Minyard (minyard@-rch.cirr.com)
      Support multi sessions: oui
      Support multi lecteurs: non
   Support module chargeable: oui
     Lecture de trames audio: oui
            Test automatique: non
        Fichier priphrique: /dev/cdu31a, nombre majeur 15
    Fichier de configuration: cdu31a.h
  Option configuration noyau: Sony CDU31A/CDU33A CDROM support?
    Fichier de documentation: cdu31a



  Ce pilote accepte une ligne de commande du noyau de la forme:



       cdu31a=<io-address>,<interrupt>,PAS




  Le premier nombre est l'adresse d'entre/sortie de base de la carte
  (par ex. 0x340), le second est le numro d'interruption  utiliser (0
  indique l'utilisation d'entres/sorties scrutes en cycle (polled). le
  troisime paramtre, optionnel, doit tre "PAS", si le lecteur est
  connect  une carte son Pro-Audio Spectrum 16, sinon, il est laiss
  vide.

  Si le pilote est charg en tant que module, il utilise un format
  lgrement diffrent. Si on charge le pilote en utilisant les
  commandes modprobe ou insmod, les paramtres prennent la forme
  suivante :



       cdu31a_port=<io-address> cdu31a_irq=<interrupt>




  L'adresse d'entre/sortie de base est requise, alors que le numro
  d'interruption est optionnel.

  Le fichier de priphrique peut tre cr par:



       # mknod /dev/cdu31a b 15 0



  Consultez le fichier cdu31a pour plus d'informations sur ce pilote.

  Consultez aussi la page Web maintenue par Jeffrey Oxenreider
  (zureal@infinet.com) qui couvre un grand nombre de problmes courants
  avec ces lecteurs. On peut la trouver  l'adresse
  <http://lemures.shinma.symix.com/~zureal/cdu31a.html>.


  44..33..44..  PPiilloottee AAzzttccdd



            Auteur principal: Werner Zimmermann (zimmerma@rz.fht-esslingen.de)
      Support multi sessions: oui
      Support multi lecteurs: non
   Support module chargeable: oui
     Lecture de trames audio: non
            Test automatique: non
        Fichier priphrique: /dev/aztcd0, nombre majeur 29
    Fichier de configuration: aztcd.h
  Option configuration noyau: Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support?
    Fichier de documentation: aztcd



  Ce pilote accepte une ligne de commande du noyau de la forme:



       aztcd=<io-address>




  o le paramtre est l'adresse d'entre/sorties de base de la carte
  (par ex. 0x340).

  Le fichier de priphrique peut tre cr par:



       # mknod /dev/aztcd0 b 29 0




  Veuillez noter que ce pilote ne fonctionne que pour le modle
  CDA268-01A. Les autres modles, y compris les CDA268-03I et
  CDA269-031SE ne sont pas propritaires et doivent utiliser le pilote
  IDECD (ATAPI) du noyau.

  Consultez le fichier aztcd pour plus d'informations sur ce pilote.


  44..33..55..  PPiilloottee GGssccdd











            Auteur principal: Oliver Raupach (raupach@nwfs1.rz.fh-hannover.de)
      Support multi sessions: non
      Support multi lecteurs: non
   Support module chargeable: oui
     Lecture de trames audio: non
            Test automatique: non
        Fichier priphrique: /dev/gscd0, nombre majeur 16
    Fichier de configuration: gscd.h
  Option configuration noyau: Goldstar R420 CDROM support?
    Fichier de documentation: gscd



  Ce pilote accepte une ligne de commande du noyau de la forme:



       gscd=<io-address>




  spcifiant l'adresse d'entre/sortie de base de la carte (par ex.
  0x340).

  Le fichier de priphrique peut tre cr par:



       # mknod /dev/gscd0 b 16 0




  Consultez le fichier gscd et le site Web  <http://linux.rz.fh-
  hannover.de/~raupach/> pour plus d'informations sur ce pilote.


  44..33..66..  PPiilloottee MMccdd



            Auteur principal: Martin (martin@bdsi.com)
      Support multi sessions: non
      Support multi lecteurs: non
   Support module chargeable: oui
     Lecture de trames audio: non
            Test automatique: non
        Fichier priphrique: /dev/mcd, nombre majeur 23
    Fichier de configuration: mcd.h
  Option configuration noyau: Standard Mitsumi CDROM support?
    Fichier de documentation: mcd



  Il s'agit de l'ancien pilote pour les lecteurs Mitsumi, qui est
  disponible depuis dj un certain temps. Vous pouvez aussi essayer le
  nouveau pilote mcdx, qui a de nouvelles fonctions mais est
  potentiellement moins stable.

  Ce pilote accepte une ligne de commande du noyau de la forme:



       mcd=<io-address>,<irq>

  spcifiant l'adresse d'entre/sortie de base de la carte (par ex.
  0x340) et le numro d'interruption requis (IRQ).

  Le fichier de priphrique peut tre cr par:



       # mknod /dev/mcd b 23 0




  Consultez le fichier mcd pour plus d'informations sur ce pilote.


  44..33..77..  PPiilloottee MMccddxx



            Auteur principal: Heiko Schlittermann
      Support multi sessions: oui
      Support multi lecteurs: oui
   Support module chargeable: oui
     Lecture de trames audio: non (non pris en charge par le matriel)
            Test automatique: non
        Fichier priphrique: /dev/mcdx0, nombre majeur 20
    Fichier de configuration: mcdx.h
  Option configuration noyau: Experimental Mitsumi support?
    Fichier de documentation: mcdx



  Il s'agit du nouveau pilote pour les lecteurs Mitsumi. L'ancien pilote
  mcd, potentiellement plus stable est toujours disponible.

  Ce pilote accepte une ligne de commande du noyau de la forme:



       mcdx=<io-address>,<irq>




  spcifiant l'adresse d'entre/sortie de base de la carte (par ex.
  0x340) et le numro d'interruption requis (IRQ).

  Le fichier de priphrique peut tre cr par:



       # mknod /dev/mcdx0 b 20 0




  Si vous avez achet rcemment un lecteur de CD-ROM Mitsumi, ne
  prsupposez pas qu'il doit utiliser ce pilote du noyau. Les nouveaux
  lecteurs Mitsumi sont maintenant compatibles EIDE/ATAPI, et ils
  devraient utiliser le pilote du noyau idecd  la place.

  Consultez le fichier mcdx pour plus d'informations sur ce pilote.




  44..33..88..  PPiilloottee CCmm220066



            Auteur principal: David A. van Leeuwen (david@tm.tno.)
      Support multi sessions: oui
      Support multi lecteurs: non
   Support module chargeable: oui
     Lecture de trames audio: non
            Test automatique: oui
        Fichier priphrique: /dev/cm206cd, nombre majeur 32
    Fichier de configuration: cm206.h
  Option configuration noyau: Philips/LMS CM206 CDROM support?
    Fichier de documentation: cm206



  Ce pilote accepte une ligne de commande du noyau de la forme:



       cm206=<io-address>,<interrupt>




  o le premier nombre est l'adresse d'entre/sortie de base de la carte
  (par ex. 0x340). Le second est le numro d'interruption.

  Le fichier de priphrique peut tre cr par:



       # mknod /dev/cm206cd b 32 0




  Consultez le fichier cm206 pour plus d'informations sur ce pilote.


  44..33..99..  PPiilloottee OOppttccdd



            Auteur principal: Leo Spiekman (spiekman@dutette.et.tudelft.nl)
      Support multi sessions: oui
      Support multi lecteurs: non
   Support module chargeable: oui
     Lecture de trames audio: non
            Test automatique: non
        Fichier priphrique: /dev/optcd0, nombre majeur 17
    Fichier de configuration: optcd.h
  Option configuration noyau: Experimental Optics Storage ... CDROM support?
    Fichier de documentation: optcd



  Ce pilote accepte une ligne de commande du noyau de la forme:



       optcd=<io-address>



  pour spcifier l'adresse d'entre/sortie de base de la carte (par ex.
  0x340).

  Le fichier de priphrique peut tre cr par:



       # mknod /dev/optcd0 b 17 0




  Consultez le fichier optcd pour plus d'informations sur ce pilote.


  44..33..1100..  PPiilloottee SSjjccdd



            Auteur principal: Vadim V. Model (vadim@rbrf.msk.su)
      Support multi sessions: non
      Support multi lecteurs: non
   Support module chargeable: oui
     Lecture de trames audio: non
            Test automatique: non
        Fichier priphrique: /dev/sjcd, nombre majeur 18
    Fichier de configuration: sjcd.h
  Option configuration noyau: Experimental Sanyo H94A CDROM support?
    Fichier de documentation: sjcd



  Ce pilote accepte une ligne de commande du noyau de la forme:



       sjcd=<io-address>,<interrupt>,<dma>




  indiquant l'adresse de base, l'interruption et le canal DMA  utiliser
  (par ex. sjcd=0x340,10,5).

  Le fichier de priphrique peut tre cr par:



       # mknod /dev/sjcd b 18 0




  Consultez le fichier sjcd pour plus d'informations sur ce pilote.


  44..33..1111..  PPiilloottee PPaarriiddee









            Auteur principal: Grant R. Guenther (grant@torque.net)
      Support multi sessions: non
      Support multi lecteurs: oui
   Support module chargeable: oui
     Lecture de trames audio: non
            Test automatique: oui
        Fichier priphrique: /dev/pcd0, nombre majeur 46
    Fichier de configuration: bpcd.h
  Option configuration noyau: Parallel port IDE device support?
    Fichier de documentation: paride.txt



  Il s'agit du pilote pour les divers types de priphriques de stockage
  qui se relient sur un port parallle. Normalement, le pilote dtectera
  automatiquement le priphrique sur port parallle. La documentation
  indique les paramtres qui peuvent tre utiliss pour spcifier des
  paramtres au priphrique si l'auto-dtection ne fonctionne pas.

  Le fichier de priphrique pour le premier lecteur peut tre cr en
  utilisant :



       # mknod /dev/pcd0 b 46 0




  Consultez le fichier /usr/src/linux/Documentation/paride.xt pour plus
  d'informations sur ce pilote. Notez qu'il remplace le pilote bpcd
  prsent dans les anciens noyaux.


  44..33..1122..  PPiilloottee SSCCSSII



            Auteur principal: David Giller
      Support multi sessions: oui (dpendant du lecteur)
      Support multi lecteurs: oui
   Support module chargeable: oui
     Lecture de trames audio: non
            Test automatique: oui
        Fichier priphrique: /dev/scd0, nombre majeur 11
    Fichier de configuration: cdrom.h
  Option configuration noyau: SCSI CDROM support?
    Fichier de documentation: scsi.txt



  Il y a des options pour les lignes de commande du noyau spcifiques 
  chaque contrleur SCSI. Consultez le SCSI HOWTO pour plus
  d'informations.

  Plusieurs lecteurs sont pris en charge ( concurrence du nombre
  maximum de priphriques sur le bus SCSI). Crez les fichiers de
  priphrique avec un nombre majeur de 11 et des nombres mineurs
  commenant  0:



       # mknod /dev/scd0 b 11 0
       # mknod /dev/scd1 b 11 1


  Alors que le pilote du noyau ne prend pas lui-mme en charge la
  lecture de trames audio-numriques, certains lecteurs SCSI en ont la
  capacit et fonctionneront avec le programme cdda2wav (qui utilise
  l'interface gnrique SCSI du noyau).

  Reportez vous galement  la discussion sur le pilote d'mulation SCSI
  en IDE prcdemment dans ce document.


  44..33..1133..  PPiilloottee IIDDEECCDD



            Auteur principal: Scott Snyder (snyder@fnald0.fnal.gov)
      Support multi sessions: oui
      Support multi lecteurs: oui
   Support module chargeable: non
     Lecture de trames audio: oui (pour les lecteurs le prenant en charge)
            Test automatique: oui
        Fichier priphrique: /dev/hd{a,b,c,d}, nombre majeur 22
    Fichier de configuration: cdrom.h
  Option configuration noyau: Include support for IDE/ATAPI CDROMs?
    Fichier de documentation: ide-cd



  Il s'agit du pilote pour les lecteurs de CD-ROM ATAPI. Ce pilote
  accepte une ligne de commande du noyau de la forme:



       hdx=cyls,heads,sects,wpcom,irq
         or
       hdx=cdrom




  o hdx peut tre n'importe lequel des {hda,hdb,hdc,hdd}, ou simplement
  hd, pour dsigner le prochain lecteur en squence. Seuls les trois
  premiers paramtres sont requis (cyls,heads,sects). Par exemple
  hdc=1050,32,64 hdd=cdrom.

  Faire en sorte que le pilote IDE reconnaisse votre lecteur de CD-ROM
  peut tre dlicat, spcialement si vous avez plus de 2 priphriques
  ou plus d'un contrleur IDE. Habituellement, il est seulement
  ncessaire de passer la ligne d'options de commande correcte depuis
  LILO. Le fichier /usr/src/linux/Documentation/ide-cd explique comment
  faire cela. Lisez le attentivement.

  Les noyaux Linux rcents disposent d'une meilleure prise en charge des
  priphriques IDE multiples. Si vous avez des problmes avec un ancien
  noyau, le mettre  jour peut aider.

  Certains contrleurs IDE ont des problmes matriels que le pilote du
  noyau peut contourner. Vous devrez peut-tre passer des paramtres
  additionnels au pilote pour l'activer. Consultez la documentation pour
  plus de dtails.


  44..44..  AAmmoorraaggee dduu nnooyyaauu LLiinnuuxx


  Vous pouvez maintenant redmarrer avec le nouveau noyau. Vrifier la
  prsence d'un message comme celui montr ci-dessous, indiquant que le
  lecteur de CD-ROM a t trouv par le pilote de priphrique (le
  message change suivant le type de lecteur):



       hdd: NEC CD-ROM DRIVE:282, ATAPI CDROM drive




  Si les messages affichs lors de l'amorage dfilent trop vite pour
  tre lus, il est possible de les visualiser a posteriori par la
  commande dmesg ou tail /var/log/messages.

  Si le lecteur n'a pas t trouv, un problme s'est alors produit.
  Consultez la section concernant le dpannage.


  44..55..  MMoonnttaaggee,, DDmmoonnttaaggee,, eett jjeeccttiioonn dduu mmeeddiiaa


  Pour monter un CD-ROM, insrez un disque dans le lecteur, et excutez
  la commande mount, en tant que superutilisateur (Ceci suppose que vous
  avez cr un lien symbolique vers votre fichier de priphrique, comme
  recommand prcdemment et qu'un rpertoire vide /mnt/cdrom existe):



       # mount -t iso9660 -r /dev/cdrom /mnt/cdrom




  Le contenu du CD-ROM peut maintenant tre accd sous le rpertoire
  /mnt/cdrom.

  Il existe d'autres options de la commande mount que vous pourrez
  vouloir utiliser; consultez la page du manuel (man) de mount(8) pour
  plus de dtails.

  Vous pouvez ajouter une entre au fichier /etc/fstab pour monter
  automatiquement un CD-ROM lors de l'amorage de Linux, ou pour
  spcifier des paramtres  utiliser au montage; voir la page du manuel
  de fstab(5).

  Il est  noter que pour couter des CDs audio-numriques vous _n_e _d_e_v_e_z
  _p_a_s essayer de les monter.

  Pour dmonter un CD-ROM, utiliser la commande umount en tant que
  superutilisateur :



       # umount /mnt/cdrom




  Le disque ne peut tre dmont que si aucun processus n'accde au
  lecteur  ce moment-l (donc, n'ayant pas non plus leur rpertoire par
  dfaut sur un rpertoire du disque mont). Vous pouvez alors jecter
  le disque. La plupart des lecteurs ont un bouton d'jection; il existe
  aussi un programme isol eject qui permet d'jecter un CD-ROM de faon
  purement logicielle.

  Notez que vous ne devriez pas jecter un disque tant qu'il est mont
  (ceci peut tre possible ou non suivant le type de lecteur). Certains
  lecteurs de CD-ROM peuvent jecter automatiquement un CD-ROM lorsqu'il
  est dmont et faire rentrer le tiroir du CD quand un disque est mont
  (vous pouvez dsactiver cette fonction  la compilation du noyau ou
  par commande logicielle).

  Il est possible qu'aprs avoir cout un CD audio-numrique, vous ne
  puissiez plus monter un CD-ROM. Vous avez besoin d'envoyer la commande
  audio "stop" (en utilisant un programme de lecture de CDs audio-
  numriques) avant d'essayer le montage. Ce problme semble apparatre
  seulement avec le pilote SBPCD.

  Les noyaux rcents incluent un autochargeur fonctionnant en mode noyau
  qui fournit le montage transparent des mdias amovibles, y compris les
  CD-ROM. Vous pouvez trouver les outils ncessaires  son utilisation 
  l'adresse  <ftp://ftp.kernel.org/pub/linux/daemons/autofs/>.


  44..66..  DDppaannnnaaggee


  Si vous continuez  rencontrer des problmes aprs avoir suivi les
  instructions de ce HOWTO, voici un certain nombre de points 
  vrifier. Ces vrifications sont donnes par ordre croissant de
  complexit. Si une vrification choue, rsolvez le problme avant de
  passer  l'tape suivante.


  44..66..11..  ttaappee 11:: AAssssuurreezz vvoouuss dd''eexxccuutteerr llee nnooyyaauu qquuee vvoouuss aavveezz ccoomm
  ppiill


  Vous pouvez vrifier le marquage temporel du noyau, pour voir si vous
  excutez celui que vous avez compil avec la prise en charge des CD-
  ROMs. Vous pouvez faire ceci avec la commande uname:



       % uname -a
       Linux fizzbin 2.2.4 #1 Tue Mar 232 11:23:21 EST 1999 i586 unknown




  ou en affichant le fichier /proc/version:



       % cat /proc/version
       Linux version 2.2.4 (root@fizzbin) (gcc version 2.7.2.3) #1 Tue Mar 23 11:23:21 EST 1999




  Si le marquage temporel ne correspond pas  la date de compilation du
  noyau, vous devez alors excuter un ancien noyau. Vous rappelez-vous
  avoir redmarr ? Si vous utilisez LILO, l'avez-vous rinstall
  (typiquement en excutant /sbin/lilo)? Si vous dmarrez depuis une
  disquette, avez-vous recr une nouvelle disquette d'amorage et
  l'avez-vous utilise pour redmarrer ?


  44..66..22..  ttaappee 22:: AAssssuurreezz vvoouuss qquuee lleess ppiillootteess aaddqquuaattss ssoonntt ddaannss llee
  nnooyyaauu



  Vous pouvez voir quels pilotes sont compils dans le noyau en
  consultant /proc/devices:



       % cat /proc/devices
       Character devices:
        1 mem
        2 pty
        3 ttyp
        4 ttyS
        5 cua
        7 vcs

       Block devices:
        3 ide0
       22 ide1




  D'abord, cherchez votre pilote de priphrique de CD-ROM. Ce sont tous
  des priphriques en mode bloc, dans ce cas nous pouvons voir que le
  pilote idecd de nombre majeur 22 est prsent.

  Assurez vous galement que le systme de fichiers ISO-9660 est compil
  dans le noyau, en consultant /proc/filesystems:



       % cat /proc/filesystems
               ext2
       nodev   proc
       nodev   devpts
               vfat
               iso9660




  Vous pouvez aussi vrifier les adresses d'entres/sorties utilises
  par le pilote en consultant /proc/ioports:



       howto % cat /proc/ioports
        ...
       0230-0233 : sbpcd
        ...




  Si l'un des pilotes que vous pensiez avoir compil dans le noyau n'est
  pas affich, alors quelque chose s'est mal pass lors de la
  configuration ou de la construction du noyau. Effectuez de nouveau le
  processus d'installation, en commenant par la configuration et la
  construction du noyau.


  44..66..33..  ttaappee 33:: LLee nnooyyaauu aa--tt--iill ddtteecctt vvoottrree lleecctteeuurr lloorrss ddee
  ll''aammoorraaggee ??


  Assurez vous que le priphrique CD-ROM a t dtect par le noyau.
  Vous devriez avoir vu un message  l'amorage. Si les messages ont
  disparu de l'cran, vous pouvez habituellement les revoir en utilisant
  la commande dmesg:



       % dmesg




  ou



       % tail /var/log/messages




  Si votre lecteur n'a pas t trouv, alors quelque chose ne va pas.
  Assurez vous qu'il est aliment et que les cbles sont correctement
  connects. Si votre lecteur dispose de cavaliers pour l'adressage,
  vrifiez qu'ils sont correctement positionns (par ex. lecteur 0 si
  vous avez un seul lecteur). Les CD-ROM ATAPI doivent tre paramtrs
  comme "seul" (single) ou "matre" (master), et non "esclave" (slave)
  lorsqu'un seul priphrique IDE est raccord  l'interface. Si le
  lecteur fonctionne sous DOS, alors vous pouvez tre relativement
  confiant dans le fonctionnement du matriel.

  De nombreux pilotes du noyau utilisent la dtection automatique, mais
  certains non, et de toute faon, elle n'est pas toujours fiable.
  Utilisez les options de la ligne de commande du noyau pour votre type
  de pilote. Vous pourrez vouloir essayer plusieurs valeurs diffrentes,
  si vous n'tes pas sr des adresses d'entre/sortie ou d'autres
  paramtres. LILO peut tre (et est gnralement) configur pour vous
  permettre d'entrer les paramtres manuellement lors de l'amorage.

  Une autre possibilit est que vous ayez utilis le mauvais pilote de
  noyau pour votre lecteur de CD-ROM. Certaines documentations se
  rfrent  des interfaces propritaires en tant qu'IDE, ce qui peut
  vous conduire  croire faussement que ce sont des lecteurs ATAPI.

  Une autre possibilit est que votre lecteur (ou votre carte
  d'interface) soit du type "compatible" qui ncessite une
  initialisation par un pilote DOS. Essayez d'amorcer le DOS et de
  charger le pilote de priphrique DOS fourni par le vendeur. Amorcez
  ensuite Linux  chaud en utilisant Control-Alt-Suppr.

  Si votre lecteur n'est pas mentionn dans ce document, il est possible
  qu'il n'y ait pas de pilote disponible pour lui sous Linux. Vous
  pouvez vrifier avec certaines des rfrences mentionnes  la fin de
  ce document pour obtenir de l'aide.


  44..66..44..  ttaappee 44:: PPoouuvveezz--vvoouuss lliirree ddeess ddoonnnneess dduu lleecctteeuurr ??


  Essayez de lire depuis le lecteur de CD-ROM. Taper la commande
  suivante allume la LED d'activit du lecteur (si elle existe) et
  aucune erreur ne devrait tre reporte. Utilisez le fichier de
  priphrique adapt  votre lecteur et assurez vous qu'un CD-ROM est
  insr; utilisez Control-C pour sortir.




  # dd if=/dev/cdrom of=/dev/null bs=2048
  ^C
  124+0 records in
  124+0 records out




  Si cela fonctionne, alors le noyau communique avec le lecteur et vous
  pouvez passer  l'tape 5.

  Sinon, une cause possible rside dans le fichier de priphrique.
  Assurez vous que le fichier de priphrique dans le rpertoire /dev
  dispose de nombres majeur et mineur corrects, comme mentionn
  prcdemment pour votre type de lecteur. Vrifiez que les permissions
  du fichier de priphrique permettent la lecture et l'criture.

  Une possibilit loigne peut tre un problme matriel. Essayez de
  tester le lecteur sous un autre systme d'exploitation, si possible,
  pour dterminer si ceci pourrait tre le cas.


  44..66..55..  ttaappee 55:: PPoouuvveezz--vvoouuss mmoonntteerr llee ddiissqquuee ??


  Si vous pouvez lire depuis le lecteur, mais ne pouvez monter le
  disque, vrifiez d'abord que vous avez compil la prise en charge du
  systme de fichiers ISO-9660 en consultant /proc/filesystems, comme
  dcrit prcdemment.

  Assurez vous que vous montez le disque avec les options "-t iso9660"
  et "-r" et qu'un vrai CD-ROM   la norme ISO-9660 (pas un CD audio-
  numrique) a t insr dans le lecteur. Vous devriez normalement
  pouvoir monter les disques en tant que superutilisateur.

  Assurez vous que le point de montage existe et est un rpertoire vide.

  Si vous montez automatiquement le CD-ROM  l'amorage, assurez vous
  que vous avez des entres correctes dans votre fichier /etc/fstab.

  Si vous excutez le dmon syslog, il peut y avoir des messages
  d'erreur du noyau que vous ne voyez pas. Essayez d'utiliser la
  commande "dmesg" :



       % dmesg
       SBPCD: sbpcd_open: no disk in drive




  Il peut aussi y avoir des erreurs reportes dans des fichiers situs
  sous /var/log, suivant la manire dont votre systme est configur.


  44..66..66..  DDiiaaggnnoossttiiqquueerr ddeess pprroobbllmmeess aauuddiioo--nnuummrriiqquueess


  Si le lecteur fonctionne pour les CD-ROM, mais pas pour couter des
  CDs audio-numriques, voici quelques pistes possibles :

  Vous avez besoin d'un programme pour couter les CDs audio-numriques.
  Certaines applications peuvent mal fonctionner ou ne pas tre
  compatibles avec votre lecteur. Essayez une autre application, et/ou
  essayez de les recompiler vous-mme. Un bon endroit pour chercher des
  applications de ce type est :
  <ftp://metalab.unc.edu/pub/Linux/apps/sound/cdrom/>.

  Peu de lecteurs de CD-ROM ne prennent pas en charge les CDs audio-
  numriques. Vrifiez le fichier de documentation ou le code source
  pour voir si c'est le cas.

  Vrifiez si le son peut tre entendu au travers de la prise casque. Si
  c'est le cas, alors le problme est probablement d  votre carte son.
  Utilisez un programme de table de mixage pour positionner le niveau du
  volume et du priphrique d'entre. Assurez vous d'avoir install le
  cble audio reliant le lecteur de CD-ROM  la carte son. Assurez vous
  que le pilote du noyau de votre carte son est install et oprationnel
  (consultez le Sound HOWTO).


  44..66..77..  SSii rriieenn nnee mmaarrcchhee


  Si vous avez toujours des problmes, voici quelques suggestions
  finales  essayer :


    Relisez attentivement ce HOWTO

    Lisez les rfrences mentionnes  la fin de ce document, en
     particulier les fichiers sources relatifs du noyau

    Posez une question dans l'un des forums comp.os.linux ou un autre
     forum Usenet (NDT: fr.comp.os.linux.* pour la communaut
     francophone)

    Envoyez une question sur une liste de diffusion Linux

    Essayez d'utiliser le dernier noyau Linux

    Contactez le revendeur de votre ordinateur

    Contactez le fabricant de votre lecteur de CD-ROM

    Envoyez un courrier lectronique au mainteneur du pilote du noyau
     concern (consultez le fichier /usr/src/linux/MAINTAINERS)

    Envoyez moi un courrier lectronique

    Lancez Emacs et tapez Esc-x doctor :-)


  55..  LLeess aapppplliiccaattiioonnss


  Cette section prsente brivement quelques unes des nombreuses
  applications concernant les CD-ROMs et disponibles sous Linux.
  Vrifiez la liste des logiciels sous Linux (Linux Software Map) quant
  aux dernires versions et aux sites o elles sont archives.


  55..11..  PPllaattiinneess ddee lleeccttuurree ddee CCDDss aauuddiioo--nnuummrriiqquueess


  De nombreux programmes de lecture de CDs audio-numriques sont
  disponibles, soit au moyen d'un casque reli au lecteur, soit par
  l'entremise de la carte son  laquelle le lecteur est reli.



     WWoorrkkmmaann
        Une platine graphique, s'excutant en environnement X11 avec une
        base de donnes des CDs et de nombreuses autres fonctions.


     WWoorrkkBBoonnee
        Une platine interactive s'excutant en mode texte.


     xxccddppllaayyeerr
        Une platine simple s'excutant en environnement X11.


     ccddppllaayyeerr
        Une platine trs simple pilote par la ligne de commandes.


     XXmmccdd
        Une platine s'excutant en environnement X11/Motif.


     xxmmiittssuummii
        Une autre platine s'excutant en environnement X11 pour les
        lecteurs Mitsumi.


     xxppllaayyccdd
        Une autre platine s'excutant en mode X11, livre avec une
        platine de mixage son et des programmes VU-mtre.


     ccddttooooll
        Des outils en mode ligne de commande pour couter des CDs audio-
        numriques.

  Certains de ces programmes sont cods pour utiliser un fichier de
  priphrique prcis pour accder au CD-ROM (par exemple, /dev/cdrom).
  Il est dans ce cas soit possible de passer le nom correct de ce
  fichier en paramtre, soit de crer un lien symbolique dans le
  rpertoire /dev. Si vous envoyez la sortie CD vers une carte son, vous
  pourrez avoir besoin d'un programme de mixage pour ajuster le volume
  ou slectionner l'entre du CD-ROM pour enregistrer.


  55..22..  LLee CCDD--PPhhoottoo


  Les CDs Photo utilisent un systme de fichiers ISO-9660 contenant les
  fichiers images dans un format propritaire. Certains lecteurs de CD-
  ROMs ne savent pas lire les CDs Photo.

  Le programme hpcdtoppm crit par Hadmut Danisch convertit des fichiers
  de CDs Photo en un format pixmap portable. Il peut tre obtenu 
  l'adresse  <ftp://ftp.gwdg.de/pub/linux/hpcdtoppm> ou en tant que
  partie des utilitaires PBM (portable bit map), disponibles sur de
  nombreux sites d'archives (cherchez "pbm" ou "netpbm").

  Le programme photocd crit par Gerd Knorr (kraxel@cs.tu-berlin.de)
  peut convertir des images de CDs Photo en des fichiers Targa ou
  bitmaps Windows ou OS/2.

  Le mme auteur a crit le programme xpcd, en environnement X11, pour
  manipuler les images de CDs Photo. Vous pouvez slectionner des images
   la souris, visualiser l'image dans une petite fentre, et charger
  l'image  n'importe laquelle de ses 5 rsolutions possibles. Vous
  pouvez aussi isoler une partie de l'image et ne charger que celle-ci.
  Cherchez ces paquetages  l'adresse  <ftp://ftp.cs.tu-
  berlin.de/pub/linux/Local/misc/>.

  Le programme de manipulation d'images ImageMagick prend aussi en
  charge les CDs Photo. Il est disponible  l'adresse
  <ftp://ftp.x.org/contrib/applications/ImageMagick/>.


  55..33..  MMkkiissooffss


  Le paquetage mkisofs d'Eric Youngdale permet de crer un systme de
  fichiers ISO-9660 sur une partition du disque dur. Celui-ci peut
  ensuite tre utilis pour aider  la cration et au test de systmes
  de fichiers de CD-ROM avant le pressage des disques.

  Les outils pour graver rellement les donnes sur des lecteurs de CDs
  rinscriptibles tendent  tre propres  chaque fournisseur. Ils
  requirent galement une criture des donnes sans interruption, ce
  qui fait qu'un systme d'exploitation multi-tches comme Linux n'y est
  pas particulirement adapt.


  55..44..  OOuuttiillss IISSOO--99666600


  Il existe quelques outils pour vrifier le format des disques
  ISO-9660; vous pourrez les trouver utiles pour tester des CDs
  suspects. Le paquetage peut tre trouv  l'adresse
  <ftp://ftp.cdrom.com/pub/unixfreeware/archive/>. Ils ont t crits
  par Bill Siegmund et Rich Morin.


  66..  RRppoonnsseess aauuxx qquueessttiioonnss ffrrqquueemmmmeenntt ppoosseess ((FFAAQQ))



  66..11..  CCoommmmeenntt uunn uuttiilliissaatteeuurr nn''ttaanntt ppaass ssuuppeerruuttiilliissaatteeuurr  ppeeuutt--iill
  mmoonntteerr//ddmmoonntteerr ddeess ddiissqquueess ??


  La plupart des commandes mount comprennent une option _u_s_e_r.  Si vous
  ajoutez une entre de cette nature au fichier /etc/fstab:



       /dev/sbpcd  /mnt/cdrom   iso9660     user,noauto,ro




  alors, un utilisateur ordinaire pourra monter et dmonter le disque en
  utilisant ces commandes :



       % mount /mnt/cdrom
       % umount /mnt/cdrom




  Par dfaut, le disque sera mont avec certaines options qui assurent
  la scurit (par exemple, des programmes ne pourront tre excuts,
  des fichiers de priphriques seront ignors). Si cela est trop
  restrictif, vous pouvez utiliser des options additionnelles (par
  exemple, l'option "exec" autorisera l'excution de programmes).
  Consultez la page de manuel de mount(8) pour les dtails.

  Une autre mthode consiste  obtenir le paquetage usermount qui permet
   des utilisateurs n'tant pas superutilisateur de monter et dmonter
  des priphriques amovibles tels que disquettes et CD-ROMs, mais
  restreint l'accs aux autres priphriques (tels que les partitions du
  disque dur). Il est disponible sur les principaux sites d'archives.

  Enfin, vous pouvez crire un petit programme C qui monte et dmonte le
  CD-ROM et l'installer en tant qu'excutable setuid.

  Le site d'archives ftp.cdrom.com dispose du fichier source mount.c qui
  permet le montage d'un CD-ROM non mont (uniquement) par des
  utilisateurs ordinaires. Il s'excute en tant que programme setuid.


  66..22..  PPoouurrqquuooii aaii--jjee ddeevviiccee iiss bbuussyy  qquuaanndd jjee ddmmoonnttee uunn CCDD--RROOMM ??


  Le disque ne peut tre dmont s'il y a encore un processus accdant
  au lecteur, ceci comprend les processus ayant leur rpertoire par
  dfaut positionn sur le systme de fichiers mont. Si vous ne pouvez
  pas identifier le processus utilisant le disque, utilisez la commande
  fuser, comme dans l'exemple ci-aprs.



       % umount /cdrom
       umount: /dev/hdd: device is busy
       % fuser -v /cdrom
                            USER       PID ACCESS COMMAND
       /mnt/cdrom           tranter    133 ..c..  bash




  Sur certains systmes, vous pouvez avoir besoin d'tre
  superutilisateur pour excuter la commande fuser de manire  voir les
  processus d'autres utilisateurs.


  66..33..  CCoommmmeenntt eexxppoorrtteerr uunn CCDD--RROOMM vveerrss dd''aauuttrreess mmaacchhiinneess vviiaa NNFFSS ??


  Vous avez besoin d'ajouter une ligne au fichier /etc/exports. Les
  utilisateurs sur les autres machines pourront alors monter le
  priphrique. Consultez la page de manuel de exports(5), pour plus de
  dtails.


  66..44..  PPuuiiss--jjee aammoorrcceerr LLiinnuuxx  ppaarrttiirr dd''uunn CCDD--RROOMM ??


  Quand on installe initialement Linux, la mthode la plus ordinaire est
  d'utiliser une disquette d'amorage. Certaines distributions Linux
  autorisent l'amorage du noyau Linux sur CD directement depuis le DOS.

  Avec les bons CD-ROM, ROM BIOS, et lecteur de CD-ROM ATAPI, il est
  possible d'amorcer Linux directement depuis un CD. La dernire version
  de mkisofs prend galement en charge la cration de tels disques qui
  utilisent le standard El Torito pour les CDs amorables.




  66..55..  CCoommmmeenntt ppeeuutt--oonn lliirree lleess ddoonnnneess ddeess CCDDss aauuddiioo--nnuummrriiqquueess ??


  Heiko Eissfeldt (heiko@colossus.escape.de) et Olaf Kindel ont crit un
  utilitaire qui lit les donnes audio-numriques et les enregistre en
  fichiers son au format .wav. Le paquetage est intitul cdda2wav.tar.gz
  et peut tre trouv sur metalab.unc.edu.

  Un autre utilitaire pour extraire les donnes audio-numriques est
  cdparanoia disponible  l'adresse
  <http://www.mit.edu/afs/sipb/user/xiphmont/cdparanoia>.

  tant donn que les lecteurs de CD-ROM changent trs vite, il est
  difficile de donner une liste des modles prenant en charge la lecture
  de donnes audio-numriques. Le mieux est d'obtenir le dernier
  paquetage cdda2wav ou cdparanoia et de lire la documentation.

  Pour plus d'informations sur le sujet, consultez le site Web
  http://www.tardis.ed.ac.uk/~psyche/cdda/ et la FAQ du forum alt.cd-rom
  mentionne dans la section des rfrences.


  66..66..  PPoouurrqquuooii llaa ccoommmmaannddee ffiinndd  nnee ffoonnccttiioonnnnee--tt--eellllee ppaass nnoorrmmaalleemmeenntt
  ??


  Sur des disques au format ISO-9660, sans les extensions Rock Ridge,
  vous devez ajouter l'option -noleaf  la commande find. Consultez la
  page de manuel de find(1) pour plus de dtails.

  (selon mon exprience, virtuellement tous les CDs Linux rcents
  utilisent les extensions Rock Ridge, donc ce problme ne devrait se
  produire que trs rarement.)


  66..77..  EEsstt--ccee qquuee LLiinnuuxx pprreenndd eenn cchhaarrggee lleess ggrraavveeuurrss ddee CCDD ??


  Le paquetage X-CD-Roast pour Linux est un frontal graphique pour
  l'utilisation de graveurs de CD. Ce paquetage peut tre trouv sur
  metalab.unc.edu sous /pub/Linux/utils/disk-
  management/xcdroast-0.95.tar.gz

  Consultez galement le HOWTO sur le gravage de CD, disponible 
  l'adresse  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/CD-
  Writing.html> ou  <http://metalab.unc.edu/LDP/HOWTO/CD-Writing.html>.


  66..88..  PPoouurrqquuooii eesstt--ccee qquuee jj''oobbttiieennss mmoouunntt:: RReeaadd--oonnllyy ffiillee ssyysstteemm
  lloorrssqquuee jjee mmoonnttee uunn CCDD--RROOMM ??


  Le CD-ROM est un media en lecture seule. Avec certains noyaux
  prcdents, il tait possible de monter des CD-ROMs en
  lecture/criture; les tentatives pour crire des donnes sur le CD
  tait simplement ignores.  partir de la version 1.1.33 du noyau,
  ceci a t corrig de telle manire que les CD-ROMs doivent tre
  monts en lecture seule (par ex. en utilisant l'option -r de la
  commande mount).


  66..99..  PPoouurrqquuooii llee ttiirrooiirr dduu lleecctteeuurr ss''oouuvvrree--tt--iill qquuaanndd jj''aarrrrttee llee
  ssyyssttmmee ??



  Le pilote sbpcd prend en charge automatiquement l'jection du CD quand
  il est dmont. Dans d'anciennes versions du noyau, c'tait le
  comportement par dfaut. Si vous arrtez votre systme, un CD mont
  sera dmont, entranant son jection.

  Cette fonction est une commodit lors du changement de disques. Si le
  tiroir est ouvert quand vous montez ou lisez un CD, il se fermera
  aussi automatiquement.

  J'ai constat que cela ne causait des problmes qu'avec peu de
  programmes (par ex. cdplay et workbone). A partir de la version 1.1.60
  du noyau, vous pouvez contrler cette fonction par logiciel. Un
  programme d'exemple est compris dans le fichier de documentation du
  pilote sbpcd (ou utilisez le programme eject). Vous pouvez aussi
  contrler le comportement par dfaut, en ditant le fichier source du
  noyau sbpcd.h.


  66..1100..  JJ''aaii uunn CCDD ""ssppcciiaall"" qquuii nnee ppeeuutt ttrree mmoonntt


  Le CD "spcial" a toutes les chances d'tre un disque XA (comme tous
  les CDs Photo ou les pseudos crs en utilisant des graveurs de CD-R).
  La plupart des pilotes CD-ROM de noyau Linux ne prend pas en charge
  les disques XA, bien que vous puissiez trouver une rustine qui ajoute
  cette fonction sur l'un des sites d'archives.

  Le pilote sbpcd _p_r_e_n_d _e_n _c_h_a_r_g_e les disques XA. Si vous utilisez ce
  pilote, vous pouvez dterminer si le disque est au format XA en
  utilisant la procdure suivante : allez dans le fichier sbpcd.c et
  activez l'affichage de la table des matires [TDM] ("Table of
  Contents" DBG_TOC). Construisez et installez un nouveau noyau et
  amorcez le. A chaque montage, les informations de la TDM seront
  crites (soit sur la console, soit dans un fichier de traces). Si la
  premire valeur affiche dans l'en-tte de la TDM est "20", alors
  c'est un disque au format XA. Cet octet est "00" pour des disques
  normaux. Si l'affichage de la TDM montre diffrentes plages, c'est
  aussi un signe qu'il s'agit d'un disque au format XA.

  (Remerciements  Eberhard Moenkeberg pour les informations
  prcdentes)

  D'autres possibilits pour des CDs illisibles sont :


  1. Le disque n'utilise pas un systme de fichiers ISO-9660 (par ex.
     certains utilisent SunOS ou HFS)

  2. C'est un CD audio-numrique

  3. Le CD est endommag ou dfectueux

  4. Vous avez mis le disque  l'envers :-)


  66..1111..  EEsstt--ccee qquuee ddeess lleecctteeuurrss mmuullttii--CCDDss ffoonnccttiioonnnneenntt aavveecc LLiinnuuxx ??


  Plusieurs utilisateurs ont mentionn leur russite avec des lecteurs
  multi-CDs SCSI. Vous aurez sans doute besoin d'activer l'option de
  configuration du noyau "Test de toutes les LUNs sur chaque
  priphrique SCSI ou "Probe all LUNs on each SCSI device" (Ce n'est
  pas utile si votre lecteur multi-CDs est dj reconnu par le pilote
  SCSI. Consultez le fichier /usr/src/linux/drivers/scsi.c).


  Au moins un utilisateur a d aussi augmenter une temporisation SCSI
  dans le pilote du noyau. Un symptme de ce cas est un message d'erreur
  du type "wrong fs type, bad option, bad superblock on /dev/sr5, or too
  many mounted file systems" (soit "mauvais type de systme de fichiers,
  mauvaise option, mauvais superbloc sur /dev/sr5, ou trop de systmes
  de fichiers monts") lors de la tentative de montage d'un CD pour la
  premire fois, alors qu'un second essai immdiatement aprs russit.
  Pour augmenter la temporisation, augmenter la valeur de IOCTL_TIMEOUT
  au dbut du fichier /usr/src/linux/drivers/scsi/sr_ioctl.c et
  recompilez votre noyau. Une valeur de 10000 au lieu de la valeur par
  dfaut de 3000 a fonctionn avec un lecteur NEC Multispin 4Xc.

  Il peut tre ncessaire de crer des fichiers spciaux supplmentaires
  de type block, de faon  ce que toutes les LUNs puissent tre
  accdes. Un fichier de priphrique est ncessaire pour chaque LUN.
  Ainsi, pour un lecteur multi-CDs  7 disques, vous aurez besoin des
  fichiers /dev/sr0  /dev/sr6 (et plus si vous avez d'autres lecteurs
  de CD-ROM SCSI). Pour crer ces fichiers spciaux de type block,
  excutez en tant que superutilisateur la commande mknod /dev/sr? b 11
  ?, o ? est le chiffre requis.

  Les lecteurs multi-CDs Nakamichi MBR-7 (7 disques), NEC Multispin 4Xc
  et Pioneer (12 disques) ont t mentionns comme oprationnels.

  Des lecteurs multi-CDs EIDE/ATAPI sont galement disponibles. Le noyau
  prend en charge certains lecteurs utilisant la fonction ioctl
  CDROM_SELECT_DISC. Le fichier de documentation du pilote IDE-CD du
  noyau comprend le code source d'un programme permettant de
  slectionner l'emplacement disque, ou vous pouvez utiliser des outils
  diffrents comme le programme eject, dcrit prcdemment.


  66..1122..  JJ''oobbttiieennss ddeess eerrrreeuurrss ""//ccddrroomm:: PPeerrmmiissssiioonn ddeenniieedd"" oouu ""//ccddrroomm::
  ppeerrmmiissssiioonn nnoonn aaccccoorrddee""


  Certains CDs ont des permissions du rpertoire racine telles qu'elles
  ne permettent qu'au superutilisateur de les lire. Il s'agit d'une
  erreur de la part du fabriquant du CD-ROM et constitue un rel souci.
  Certaines personnes ont fourni une rustine pour leur noyau de faon 
  contourner le problme.

  Consultez aussi la question relative aux fichiers cachs plus loin
  dans ce document.


  66..1133..  CCoommmmeenntt ddooiiss--jjee iinntteerrpprrtteerr lleess mmeessssaaggeess dd''eerrrreeuurr nnooyyaauu dduu
  ppiilloottee IIDDEE CCDD ??


  Qu'est ce que cela signifie lorsque j'obtiens un message du pilote IDE
  CD-ROM tel que : "hdxx: code: xx key: x asc: xx ascq: x" ?

  C'est un message de statut/d'erreur du lecteur de CD-ROM IDE. Par
  dfaut, le pilote IDECD donne une information brute, plutt que de
  gcher de l'espace du noyau avec des messages d'erreur. Vous pouvez
  changer ce dfaut et afficher les messages d'erreur rels en allant
  dans le fichier /usr/src/linux/drivers/block/ide-cd.c, et en mettant
  la valeur de VERBOSE_IDE_CD_ERRORS  1, puis en recompilant le noyau.


  66..1144..  CCoommmmeenntt ppuuiiss--jjee ssaavvooiirr llaa vviitteessssee ddee mmoonn lleecctteeuurr ddee CCDD--RROOMM ??


  Il y a un moyen. Cette commande mesure combien de temps est ncessaire
   la lecture de 1500Ko de donnes du CD:
       % time -p dd if=/dev/cdrom of=/dev/null bs=1k count=1500
       1500+0 records in
       1500+0 records out
       real 5.24
       user 0.03
       sys 5.07




  Le taux de transfert d'un lecteur simple vitesse est de 150Ko par
  seconde, ce qui devrait prendre environ 10 secondes. Au double de la
  vitesse, cela prendra 5 secondes, au quadruple, 2,5, etc...

  Le temps "real" ci-dessus est probablement le meilleur chiffre 
  regarder -- dans ce cas, il indique un lecteur double vitesse. Vous
  pouvez augmenter la quantit de donnes  transfrer pour obtenir des
  valeurs plus prcises (au cas o vous vous le demanderiez, les donnes
  ne sont pas mises en cache). Vous devriez probablement excuter cette
  commande quelques fois et prendre la moyenne.

  J'ai galement crit un petit programme C qui mesure et affiche le
  taux de transfert du CD-ROM; je peux l'envoyer  qui le demande.


  66..1155..  MMoonn lleecctteeuurr ddee CCDD--RROOMM ss''eesstt aarrrrtt ddee ffoonnccttiioonnnneerr aapprrss
  ll''iinnssttaallllaattiioonn ddee LLiinnuuxx


  Le symptme usuel est que la disquette d'amorage utilise pour
  installer initialement Linux reconnaissait votre lecteur de CD-ROM,
  mais aprs l'installation de Linux sur votre disque dur ou votre
  disquette, il ne le reconnat plus.

  La cause la plus frquente de ce problme est qu'avec certaines
  distributions Linux, le noyau qui est install sur votre disque dur
  (ou votre disquette) n'est pas ncessairement le mme que celui qui
  tait sur votre disquette d'amorage. Vous avez choisi une disquette
  d'amorage qui correspondait  votre matriel et votre CD-ROM, alors
  que le noyau qui est install est un noyau "gnrique" qui ne prend
  pas en charge le lecteur de CD-ROM. Vous pouvez vrifier cela en
  suivant la rubrique "Dpannage" expose prcdemment dans ce document
  (par ex. en commenant par vrifier /proc/devices).

  La solution est de recompiler votre noyau, en vous assurant que les
  pilotes pour votre lecteur de CD-ROM et tout autre ncessaire (par ex.
  le contrleur SCSI, le systme de fichiers ISO-9660) soient inclus.
  Consultez le Kernel HOWTO <http://metalab.unc.edu/LDP/HOWTO/Kernel-
  HOWTO.html> si vous ne savez pas comme raliser cela.

  Si vous avez pass des options en ligne de commande  la disquette
  d'amorage (par ex. "hdc=cdrom") vous devez ajouter celles-ci au
  fichier de configuration de votre programme d'amorage (typiquement
  /etc/lilo.conf).


  66..1166..  IIll yy aa ddeess ffiicchhiieerrss ccaacchhss ssuurr uunn CCDD qquuee jjee nnee ppeeuuxx lliirree


  Certains CDs ont des fichiers avec le bit "cach" positionn.
  Normalement, ces fichiers ne sont pas visibles. Si vous montez le CD
  avec l'option "unhide" (dcacher), alors les fichiers devraient tre
  accessibles (cela ne semble pas tre document quelque part).



  66..1177..  OO eesstt ddooccuummeennttee ll''AAPPII dduu CCDD--RROOMM ??


  Si vous voulez crire votre propre application, telle qu'une
  application de platine de lecture de CD audio-numrique, vous aurez
  besoin de comprendre l'interface de programmation des applications
  (API) fournie par Linux.

  A l'origine, les pilotes CD-ROM du noyau utilisaient leur propres
  fonctions ioctl() pour fournir les services spcifiques  chaque
  lecteur. Des fichiers d'en-tte, tel que /usr/include/linux/sbpcd.h
  les dcrivent. tant donn que de nombreux pilotes taient bass sur
  d'autres pilotes, les interfaces, bien que non identiques,
  partageaient beaucoup de choses communes.

  Plus rcemment, il y a eu une initiative dirige par David van Leeuwen
  (david@tm.tno.nl) pour standardiser l'API des lecteurs de CD-ROM, en
  regroupant le code commun en une seule place et en assurant que tous
  les pilotes se comportent de faon identique. Ceci est document dans
  le fichier /usr/src/linux/Documentation/cdrom/cdrom-standard.tex. De
  nombreux pilotes du noyau se comportent ainsi. A partir de la version
  2.0 du noyau, tous les pilotes de CD-ROM se conforment  cette API.

  Mon livre, _S_o_n _e_t _i_m_a_g_e_s _s_o_u_s _L_i_n_u_x, entre plus en dtail dans la
  programmation des lecteurs de CD-ROM, en particulier pour les
  fonctions audio-numriques. Consultez la fin de la section Rfrences.


  66..1188..  PPoouurrqquuooii nnee vvooiiss--jjee ppaass lleess nnoommss ddee ffiicchhiieerrss lloonnggss ssuurr ccee CCDD--
  RROOMM WWiinnddoowwss??


  Si vous avez un CD-ROM qui dispose de noms de fichiers longs sous
  Windows mais pas sous Linux, c'est qu'il utilise probablement le
  format propritaire Microsoft de systme de fichiers Joliet. Consultez
  la prochaine question pour obtenir une solution.


  66..1199..  LLee ssyyssttmmee ddee ffiicchhiieerrss JJoolliieett ddee MMiiccrroossoofftt eesstt--iill pprriiss eenn
  cchhaarrggee ??


  Microsoft a cr une extension au format ISO-9660 intitule Joliet.
  Elle permet l'encodage des noms de fichiers longs en utilisant le
  format UNICODE 16 bits.

  A partir de la version 2.0.34, le noyau Linux prend en charge les
  extensions pour le systme de fichiers Microsoft Joliet. Vous devrez
  activer cette prise en charge dans le noyau.

  Si vous voulez afficher correctement  l'cran les noms de fichiers
  avec des jeux de caractres nationaux, vous devrez activer la prise en
  charge des jeux de caractres ISO8859 appropris dans le noyau.


  66..2200..  LLiinnuuxx pprreenndd--iill eenn cchhaarrggee lleess CCDDss ""eexxttrraa"" ??


  Certains CDs audio-numriques sont "tendus" (extra) avec des donnes
  additionnelles. Typiquement, vous trouverez sur ces CDs les plages
  audio traditionnelles sur un CD, ainsi qu'une plage de donnes qui
  peut tre monte comme systme de fichiers ISO-9660.

  Un CD "extra" que j'ai examin avait des applications Microsoft
  Windows et Apple Macintosh dessus (qui ne fonctionneront pas
  directement sous Linux, bien sr, bien que j'aie connu un succs
  partiel en excutant l'application Windows sous l'mulateur Windows
  WINE). Il y avait des images GIF qui pouvaient tre visualises 
  l'aide d'un outil standard tel que xv et des animations au format
  Apple QuickTime qui pouvaient l'tre en utilisant le programme xanim.
  C'tait un disque multisession que certains lecteurs de CD-ROM anciens
  ne peuvent lire. Sur le disque se trouvait un fichier readme.txt
  contenant une Foire Aux Questions sur les CD Extra.


  66..2211..  LLiinnuuxx pprreenndd--iill eenn cchhaarrggee lleess DDVVDD--RROOMM ??


  Les lecteurs de DVD-ROM conformes aux standards SCSI et ATAPI
  devraient fonctionner avec Linux, en ce qui concerne la lecture de
  disques utilisant un format de systme de fichiers ISO-9660. En
  d'autres termes, ils fonctionneront comme un (ventuellement norme)
  lecteur de CD-ROM.

  De nombreux disques DVD-ROM utilisent le systme de fichiers UDF. Au
  moment de l'criture de ce document, ceci est encore en dveloppement.
  Des rustines pour le noyau sont disponibles  l'adresse
  <http://trylinux.com/projects/udf/>.

  D'autre part, je ne suis pas au fait d'une prise en charge quelconque
  des DVD vido  encodage MPEG-2, ni par logiciel, ni en conjonction
  avec un dcodeur DVD matriel. Apparemment, le standard dcrivant le
  format d'encodage ne peut tre obtenu que contre une forte somme et
  sous accord de non-divulgation (NDA). Un autre problme est que le
  dcodage MPEG utilise gnralement du matriel propritaire pour
  lequel le fabriquant pourrait ne pas vouloir fournir d'informations
  sur sa programmation. Ces facteurs pourraient empcher le
  dveloppement de tout logiciel libre de lecture des DVD vido pour
  Linux.


  66..2222..  LLiinnuuxx pprreenndd--iill eenn cchhaarrggee lleess CCDD--RRWW ??


  Les lecteurs de CD-RW conformes aux standards SCSI et ATAPI devraient
  fonctionner avec Linux, en ce qui concerne les disques utilisant un
  format de systme de fichiers ISO-9660. Ceci comprend la possibilit
  d'crire sur le disque.

  De nombreux disques CD-RW utilisent le systme de fichiers UDF. Au
  moment de l'criture de ce document, ceci est encore en dveloppement.
  Des rustines pour le noyau sont disponibles  l'adresse
  <http://trylinux.com/projects/udf/>.


  77..  RRffrreenncceess


  J'ai dj mentionn les fichiers de documentation, installs
  typiquement sous le rpertoire /usr/src/linux/Documentation/cdrom. Ils
  peuvent se rvler une mine d'or d'informations utiles.

  Les FAQ (Foires aux questions) suivantes sont diffuses priodiquement
  sur Usenet dans le forum news.answers et archives sur les sites FTP
  tels que  <ftp://rtfm.mit.edu/>:


    FAQ du forum alt.cd-rom

    FAQ du forum comp.periphs.scsi


    Enhanced IDE/Fast-ATA/ATA-2 FAQ

  De nombreux autres HOWTOs Linux contiennent des informations utiles
  concernant les CD-ROM :

    SCSI HOWTO <http://metalab.unc.edu/LDP/HOWTO/unmaintained/SCSI-
     HOWTO.html> (NDT: ou en franais Le SCSI HOWTO Linux
     <http://www.freenix.org/unix/linux/HOWTO/SCSI-HOWTO.html>)

    Hardware Compatibility HOWTO
     <http://metalab.unc.edu/LDP/HOWTO/Hardware-HOWTO.html> (NDT: ou en
     franais HOWTO Compatibilit Linux <-> Matriel
     <http://www.freenix.org/unix/linux/HOWTO/Hardware-HOWTO.html>)

    Sound HOWTO <http://metalab.unc.edu/LDP/HOWTO/Sound-HOWTO.html>
     (NDT: ou en franais Le Linux Sound-HOWTO
     <http://www.freenix.org/unix/linux/HOWTO/Sound-HOWTO.html>)


    Kernel HOWTO <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>
     (NDT: ou en franais Le HOWTO du noyau de Linux
     <http://www.freenix.org/unix/linux/HOWTO/Kernel-HOWTO.html>)

    Distribution HOWTO <http://metalab.unc.edu/LDP/HOWTO/Distribution-
     HOWTO.html> (NDT: ou en franais Le Howto sur les distributions de
     Linux <http://www.freenix.org/unix/linux/HOWTO/Distribution-
     HOWTO.html>)

    CD Writing HOWTO <http://metalab.unc.edu/LDP/HOWTO/CD-Writing.html>
     (NDT: ou en franais HOWTO Graveur de CDs
     <http://www.freenix.org/unix/linux/HOWTO/CD-Writing-HOWTO.html>)

  Au moins une douzaine de socits vendent des distributions Linux sur
  CD-ROM; la plupart d'entre elles sont mentionnes dans le Distribution
  HOWTO.

  Les forums Usenet suivants couvrent des sujets relatifs aux CD-ROM :


    comp.publish.cdrom.hardware

    comp.publish.cdrom.multimedia

    comp.publish.cdrom.software

    comp.sys.ibm.pc.hardware.cd-rom

    alt.cd-rom

    alt.cd-rom.reviews

  Les forums comp.os.linux sont aussi de bonnes sources d'informations
  spcifiques  Linux, (NDT: ainsi que les forums francophones
  fr.comp.os.linux.*).

  Il existe une archive importante d'informations et de logiciels sur le
  CD-ROM  l'adresse  <ftp://ftp.cdrom.com/pub/cdrom/>.

  Une FAQ sur les priphriques IDE et ATA peut tre trouve aux
  adresses  <ftp://rtfm.mit.edu/pub/usenet/news.answers/pc-hardware-
  faq/enhanced-IDE/> et
  <http://www.seagate.com/techsuppt/faq/faqlist.html>.

  Western Digital, la socit qui a introduit le protocole IDE, procure
  de l'information sur ce protocole sur leur site FTP  l'adresse
  <ftp://fission.dt.wdc.com/pub/standards/atapi>.
  Un site Web consacr au multimdia peut tre visit  l'adresse
  <http://viswiz.gmd.de/MultimediaInfo/>. Creative Labs dispose d'un
  site Web  l'adresse  <http://www.creaf.com/>.

  La _L_i_n_u_x _S_o_f_t_w_a_r_e _M_a_p (LSM Liste des Logiciels sous Linux) est une
  rfrence invaluable pour trouver du logiciel sous Linux. La LSM peut
  tre trouve sur divers sites FTP anonymes, y compris
  <ftp://metalab.unc.edu/pub/Linux/docs/LSM/> (prcdemment sunsite). Il
  y a aussi de nombreux sites Web qui maintiennent des bases de donnes
  d'applications Linux. Un de ces sites est  <http://www.freshmeat.net>.

  La liste de diffusion Linux dispose d'un certain nombre de "canaux"
  consacrs  diffrents sujets. Pour trouver comment les rejoindre,
  envoyez un courrier lectronique avec le mot "help" ( l'aide) en tant
  que corps de message  l'adresse majordomo@vger.rutgers.edu

  Le projet de documentation de Linux a produit de nombreux livres sur
  Linux, incluant _L_e _s_y_s_t__m_e _L_i_n_u_x. Ils sont librement disponibles en
  FTP anonyme  partir des principaux sites d'archives Linux ou peuvent
  tre achets sous forme de livres imprims.

  Enfin, une publicit honteuse : si vous voulez en apprendre beaucoup
  plus sur le multimdia sous Linux (en particulier les applications et
  la programmation des CD-ROMs et des cartes son), jetez un oeil  mon
  livre _S_o_n _e_t _i_m_a_g_e_s _s_o_u_s _L_i_n_u_x, ISBN 1-56592-219-0, publi par
  O'Reilly and Associates. La version originale en anglais, aussi bien
  que des traductions en franais et en japonais sont maintenant
  imprimes. Pour tout dtail appeler le 800-998-9938 pour l'Amrique du
  Nord ou vrifiez la page Web
  <http://www.ora.com/catalog/multilinux/noframes.html> ou  ma page
  personnelle  <http://www.pobox.com/~tranter/> (NDT: ou encore
  <http://www.editions-oreilly.fr/use/linuxmultim.html>).


































  Le HOWTO chinois
  Hong Zhang, hongz@seas.ucla.edu
  v0.1, 2 Avril 1997

  Ceci  est  le  document HOWTO permettant d'employer le Chinois dans un
  environnement Linux. Il indique comment obtenir, installer et  config-
  urer des programmes chinois. On peut trouver la derniere version de ce
  HOWTO a turb10.seas.ucla.edu:/pub/

  11..  IInnttrroodduuccttiioonn

  Ce document concernant  l'utilisation  du  Chinois  sous  Linux  etait
  attendu,  notamment  par  moi-meme,  depuis  longtemps. Comme de toute
  evidence aucun HOWTO de ce type n'est disponible  sur  Internet,  j'ai
  decide  d'en  entreprendre  l'ecriture.  Ce  n'est rien d'autre qu'une
  tentative de rendre la vie un peu plus simple. Veuillez faire parvenir
  vos  commentaires et suggestions a hongz@seas.ucla.edu. Ce document ne
  comporte aucune notion de copyright. Vous pouvez en faire ce  que  bon
  vous  semble  tant  que  vous  ne  m'attaquez  pas en justice pour des
  dommages qui auraient pu decouler de son utilisation.

  Vous pouvez trouver la plupart des programmes chinois sur :

       <http://cnapps.ifcss.org> et <ftp://linux.csie.nctu.edu.tw:/pub/linux>

  22..  LLaa vveerrssiioonn cchhiinnooiissee ddee XX--WWiinnddooww

  Le  systeme  X-Window  est un environnement graphique puissant dedie a
  UNIX. Xfree86 est une libre implementation du Systeme X-Window du  MIT
  (X11R6).  La version chinoise consiste en un patch sur Xfree86 destine
  a permettre l'affichage des caracteres chinois dans l'environnement X-
  Window.  Son  auteur  est  Shin-Ray  Lee  (srlee@csie.nctu.edu.tw). La
  version actuelle de CXwin ne reconnait que le codage  BIG5.  Elle  est
  disponible  pour  a la fois XFree86 3.1 et XFree86 3.2 . CXwin donne a
  vos menus chinois des barres  de  titre  en  Chinois  pour  differents
  gestionnaires   de   fenetres   et  permet  egalement  d'afficher  des
  sinogrammes dans quelques applications.

  22..11..  OOuu ttrroouuvveerr ttoouutt cceellaa

  22..11..11..  CCXXwwiinn 33..11

  On peut trouver  XFree86  3.1  sur  le  plus  important  site  ftp  de
  logiciels chinois ftp.ifcss.org:/pub/software/linux/X11R6/CXwin/elf ou
  sur l'un de ses miroirs. Vous n'avez besoin que d'un seul  serveur  X.
  Dans  mon  cas,  il  me  faut XF86_SVGA.gz, mais XF86_VGA16.gz devrait
  convenir a la plupart des cartes graphiques.

  22..11..22..  CCXXwwiinn 33..22

  Pour autant que je sache, XFree86 3.2  est  la  derniere  version  qui
  fonctionne  avec  CXwin. Vous pouvez recuperer CXwin 3.2 au format ELF
  pour Linux a linux.csie.nctu.edu.tw:/pub/linux/CXwin/elf

  22..11..33..  LLeess ppaattcchheess

  Si vous disposez des sources de XFree86, vous pouvez  en  obtenir  des
  patches au meme endroit et compiler les binaires vous-meme.

  22..22..  CCoommmmeenntt iinnssttaalllleerr

  Decompressez le fichier 'gzippe', dans mon cas /tmp/XF86_SVGA.gz

       # gzip -d XF86_SVGA.gz

  Devenez  super-utilisateur (root) et faites une copie de sauvegarde de
  votre serveur X originel.

       # cd /usr/X11R6/bin
       # mv XF86_SVGA XF86_SVGA_BACKUP

  Deplacez CXwin vers son repertoire ad-hoc

       # mv /tmp/XF86_SVGA /usr/X11R6/bin
       # chown root.bin XF86_SVGA
       # chmod 4755 XF86_SVGA

  Pour fonctionner correctement, CXwin  _a  _e_g_a_l_e_m_e_n_t  _b_e_s_o_i_n  _d_e  _q_u_a_t_r_e
  _f_o_n_t_e_s  _B_I_G_5  :  taipei15, taipei16, taipeik20 et taipeik24.  Veuillez
  vous referer a la ``Section ``'''' pour savoir comment  installer  des
  polices de caracteres chinoises.

  CXwin  3.1  est  encore  un  peu bogue et instable. Je vous recommande
  d'effectuer une mise a jour vers XFree86 3.2 et d'utiliser CXwin  3.2.
  Ce  programme  est  encore  en  phase  alpha, vous pouvez donc vous en
  servir, mais a vos risques et perils. Cependant, je  l'utilise  depuis
  plus  de trois mois et il fonctionne tout simplement a merveille. Vous
  trouverez quelques sympathiques  captures  d'ecran  de  mon  bureau  a
  <http://turb10.seas.ucla.edu/ hongz>.

  33..  CCXXtteerrmm eett HHzzttttyy

  CXterm  est  un  simulateur  de terminal, exactement comme xterm, mais
  avec  la  capacite  en  plus  d'afficher  et  d'accepter  l'entree  de
  caracteres  chinois.  Il gere les codages GB et BIG5. Avec hztty, vous
  pouvez aussi lire du texte encode en HZ, couramment utilise  dans  les
  forums    de   discussion   chinois.    La   lecture   de   CXTERM.FAQ
  (cs.purdue.edu:ftp/pub/ygz) vous fournira tous details d'installation.
  L'auteur de ce remarquable logiciel est Yongguang Zhang.

  33..11..  RReeccuuppeerreerr llee ppaaqquueettaaggee ccxxtteerrmm eett hhzzttttyy

  cxterm5.0.p3.tar.gz   correspond  a  la  derniere  mouture  de  cxterm
  (version 5.0). Ce paquetage incluant a la fois cxterm  et  les  fontes
  chinoises,  est  tres facile a installer. Cxterm et hztty peuvent etre
  obtenus depuis

  cxterm5.0.p3.tar.gz    ftp.ifcss.org:/pub/software/x-win/cxterm
  hztty-2.0.tar.gz       ftp.ifcss.org:/pub/software/unix/convert

  33..22..  IInnssttaalllleerr ccxxtteerrmm

  Decompresser le paquetage cxterm

       # tar -xvzf cxterm5.0.p3.tar.gz

  Ce qui aura pour effet de creer un nouveau repertoire cxterm-5.0

       # cd cxterm-5.0
       # ./config.sh

  Si vous voulez installer cxterm pour tous les utilisateurs du systeme,
  vous devez passer en root avant de lancer la commande ``./config.sh''.
  A present, vous  pouvez  suivre  les  instructions  pour  compiler  et
  installer cxterm.

  -----------------------------------------------------------------------------
      --- BASIC MENU ---
    0. Read COPYRIGHT Notice
    1. Compile, Install, and Configure "CXTERM 5.0" in One Step

      --- OPTION MENU ---
    2. Compile cxterm (not to install)
    3. Install cxterm (after successful compilation in 2)
    4. Install additional Chinese font(s) for your X window
    5. Configure your account for using cxterm (after installation in 3)

    x. Exit
  -----------------------------------------------------------------------------
  Please choose (0/1/2/3/4/5/x) :

  Choisissez  l'option  1  si  vous  voulez que le script d'installation
  fasse tout a votre place. A mi-parcours, on vous demandera de preciser
  le  repertoire  d'installation.  Personnellement, j'ai installe cxterm
  dans /usr/local/chinese.  Deux fontes sont egalement fournies avec  le
  paquetage  cxterm,  le  choix  des  options  1  et  3  les  installera
  automatiquement.  Il  est  possible  d'en  ajouter  d'autres  grace  a
  l'option  4.  Cxterm installe, assurez-vous que les executables cxterm
  et CXterm sont dans votre chemin de recherche.  Pour les shells  C  et
  Tcsh

       # set path (/usr/local/chinese/bin $path)

  Pour sh et bash

       # setenv PATH=$PATH:/usr/local/chinese/bin ; export PATH

  CXterm est un script shell destine a charger les ressources d'X-Window
  puis a lancer cxterm.  Pour utiliser cxterm en mode GB, essayez ceci

       # CXterm -gb

  Ou en mode BIG5

       # CXterm -big5

  33..33..  IInnssttaalllleerr hhzzttttyy

  Hztty  transcrit  le  Chinois  entre  differents  types  de   codages.
  Decompactez hztty-2.0.tar.gz

       # tar -xvzf hztty-2.0.tar.gz
       # cd hztty-2.0
       # make linux

  Apres  compilation,  deplacez l'executable hztty vers votre repertoire
  bin et la page de man vers votre repertoire man.

       # mv hztty /usr/local/bin
       # chmod 555 /usr/local/bin/hztty
       # cp hztty.1 /usr/local/man/man1
       # chmod 444 /usr/local/man/man1/hztty.1

  Prenez connaissance du mode d'utilisation de hztty en lisant  sa  page
  de man.

  33..44..  PPaattcchh ccoouulleeuurr ppoouurr ccxxtteerrmm

  Un fichier patch cxterm-5.0.p3-color.patch.gz se trouve egalement dans
  le     meme      repertoire      que      cxterm5.0.p3.tar.gz      sur
  ftp.ifcss.org:/pub/software/x-win/cxterm.   Vous  pouvez  patcher  les
  sources de cxterm de facon a ce qu'il gere les attributs  de  couleurs
  ANSI.  Supposons  ici, que vous ayez l'arborescence des sources cxterm
  dans /tmp/cxterm-5.0

       # cp cxterm-5.0.p3-color.patch.gz /tmp
       # gzip -d cxterm-5.0.p3-color.patch.gz
       # patch < cxterm-5.0.p3-color.patch
       # cd cxterm-5.0
       # ./config.sh

  Le color-cxterm est assez sympathique. Mais il y a  un  detail  genant
  quand  j'essaie  d'entrer  du Chinois dans un color-cxterm: la zone de
  saisie en partie basse du cxterm ne se rafraichit pas  correctement  ;
  il  faut  que  je  tape ``Ctrl-L'' pour reafficher tout l'ecran. C'est
  probablement un simple probleme de termcap.  J'espere que quelqu'un me
  fournira un indice.

  33..55..  LLeess aannoommaalliieess

  Quelquefois,  le  Copier-Coller  peut  ne pas fonctionner au niveau de
  l'invite d'un shell cxterm. Tcsh mange le  huitieme  bit.  Vous  devez
  taper  ``setenv  LANG''  pour  corriger  cela.   Essayez  aussi ``stty
  pass8''.

  44..  LLeess eeddiitteeuurrss cchhiinnooiiss

  44..11..  CCeellvviiss eett CCVViimm --  ddeess cclloonneess ddee vvii//eexx

  C-Elvis est un clone de vi/ex, l'editeur standard d'UNIX. Il  autorise
  l'edition  de  textes  chinois,  Europeens, et le melange des deux. C-
  Elvis reconnait presque toutes les commandes vi/ex, aussi bien en mode
  visual  qu'en  mode  ex  (:)  ,  pour  les  sinogrammes comme pour les
  caracteres romains.  C-Elvis peut etre employe a la fois pour les deux
  systemes  de  codage  de texte chinois standard, GB2312-80 et Big5. Il
  vous faudra l'utiliser au sein d'un terminal chinois  tel  que  cxterm
  pour pouvoir saisir et afficher des sinogrammes.

  44..11..11..  RReeccuuppeerreerr cceellvviiss

  Le site ftp de celvis est

  celvis-1.3.tar.gz               ifcss.org:/pub/software/unix/editor

  44..11..22..  IInnssttaalllleerr cceellvviiss

       # tar -xvzf celvis-1.3.tar.gz
       # cd celvis

  Vous devez editer tmp.c, et supprimer les lignes 93-95

  ______________________________________________________________________
  #if OS9
                    if we don't have write permission...
  #endif
  ______________________________________________________________________

  Puis, vous pouvez compiler avec

       # cp Makefile.s5 Makefile
       # make install

  Comme le Makefile n'est pas prevu pour Linux, il se peut que vous ayez
  beaucoup de messages d'avertissement (warning), mais vous pouvez  tous
  les ignorer.  celvis sera installe dans /usr/local/bin.

  44..11..33..  CCvviimm

  CVim  est  un patch destine a ajouter la gestion du Chinois a vim-4.2.
  Il inclut quelques caracteristiques propres  a  vi  qui  ne  sont  pas
  reconnues  par celvis-1.3, comme la numerotation des lignes, le saut a
  la ligne automatique  et  l'edition  de  gros  fichiers.  Vous  pouvez
  trouver      vim-4.2-Chinese-patch      et      vim-4.2.tar.gz     sur
  ftp.csie.nctu.edu.tw:/pub/Unix/Chinese/cvim

       # tar -xvzf vim-4.2.tar.gz
       # cd vim-4.2/src
       # patch < ../../vim-4.2-Chinese-patch

  Vous pouvez editer le fichier ``vim-4.2/src/feature.h'' pour l'adapter
  a votre gout.  La compilation est toute bete, faites simplement

       # make
       # make install

  44..22..  CCjjooee -- JJooee''ss OOwwnn CChhiinneessee EEddiittoorr

  JOE  est  un  editeur de texte ASCII plein ecran, freeware, a vocation
  professionnelle et concu pour tourner sous UNIX.  Il  ressemble  a  la
  plupart des editeurs que l'on peut trouver dans le monde du compatible
  IBM PC. Bien que je ne l'utilise pas  moi-meme,  c'est  assurement  un
  editeur remarquable.

  44..22..11..  RReeccuuppeerreerr ccjjooee

  Vous pouvez trouver cjoe-2.8.tgz au meme endroit que celvis-1.3.tar.gz

  cjoe-2.8.tgz            ifcss.org:/pub/software/unix/editor

  44..22..22..  CCoommppiilleerr eett iinnssttaalllleerr ccjjooee

  Commencez par editer le fichier Makefile si  vous  souhaitez  modifier
  l'emplacement  des binaires, des fichiers d'initialisation de la table
  des touches et des pages de man.  Sinon, faites simplement ce qui suit

       # make
       # make install

  44..33..  CCeemmaaccss eett CCCChheellpp ppoouurr EEmmaaccss

  Cemacs  est  un  moyen  d'afficher et d'editer des fichiers en Chinois
  avec GNU Emacs. Pour pouvoir utiliser Cemacs,  il  faut  lancer  Emacs
  depuis  un  terminal  chinois  ou  sous un programme d'emulation comme
  cxterm. CCHELP est un systeme qui permet d'obtenir instantanement  des
  renseignements  utiles  sur les sinogrammes. Une fois CCHELP installe,
  le  fait  de  cliquer  sur  n'importe  quel  caractere  chinois   fera
  apparaitre  un  message  d'aide  montrant  le  caractere  lui-meme, sa
  prononciation en PinYin,  ainsi  qu'une  indication  de  son  sens  en
  Anglais. Les codages chinois GB et BIG5 sont tous les deux reconnus.

  44..33..11..  RReeccuuppeerreerr CCeemmaaccss eett CCCChheellpp

  On      peut      les      trouver      tous      les     deux     sur
  ftp.math.psu.edu:/pub/simpson/chinese

  44..33..22..  IInnssttaallllaattiioonn

  Suivez les indications fournies dans les fichiers README respectifs de
  cemacs et cchelp.

  44..44..  MMuullee eett XXeemmaaccss 2200..00

  44..44..11..  RReeccuuppeerreerr MMuullee--22..33 eett llee ppaattcchh ppoouurr LLiinnuuxx

  mule-2.3.tar.gz            ftp.ifcss.org:/pub/software/mule/editor
                             sunsite.unc.edu:/pub/Linux/distribution/je/sources/mule
  mule-2.3+lx.diff.gz        sunsite.unc.edu:/pub/Linux/distribution/je/sources/mule

  44..44..22..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn

  Decompactez le paquetage puis appliquez le patch

       # tar -xvzf mule-2.3.tar.gz
       # patch < mule-2.3+lx.diff
       # cd mule-2.3/
       # ./configure "i386-*-linux" --with-x11 --with-x-toolkit --with-gcc

  Si  vous  voulez  peaufiner  votre  version  de mule, lisez le fichier
  ``INSTALL''   puis,   essayez   ``./configure   --help''.   Apres   la
  configuration,   il   vous   faudra  legerement  modifier  le  fichier
  ``src/Makefile''  en   changeant  ``-lcurses''  en  ``-lncurses''.   A
  present, faites

       # make
       # make install

  Le repertoire d'installation par defaut est /usr/local.

  44..44..33..  LL''uuttiilliissaattiioonn dduu CChhiinnooiiss ssoouuss MMuullee--22..33

  Si  vous  avez  installe  des polices, vous pouvez faire usage de mule
  pour toutes entrees/sorties de  sinogrammes.  La  plupart  des  fontes
  chinoises sont en corps 16 ou 24, par consequent, vous pouvez essayer

       # mule -fn 8x16 &

  Ou

       # mule -fn 12x24 &

  Sous  mule tapez M-x load-library RETURN chinese RETURN .  La commande
  ``Ctrl-]'' permet de basculer entre les differents modes de saisie.

  44..44..44..  XXeemmaaccss 2200..00

  Pas encore essaye.

  55..  IInnssttaallllaattiioonn ddee ffoonntteess cchhiinnooiisseess

  55..11..  IInnssttaallllaattiioonn ddee ffoonntteess XX--WWiinnddooww

  55..11..11..  OOuu ttrroouuvveerr ddeess ffoonntteess GGBB eett BBIIGG55

  Il est tres probable que vous  ayez  deja  quelques  fontes  chinoises
  dormant sur votre systeme. Pour trouver les fontes GB, faites

       # xlsfonts | grep gb
       -cclib-song-medium-r-normal--0-0-72-72-c-0-gb2312.1980-1
       -cclib-song-medium-r-normal--16-160-72-72-c-160-gb2312.1980-1
       -isas-fangsong ti-medium-r-normal--0-0-72-72-c-0-gb2312.1980-0
       -isas-fangsong ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
       -isas-song ti-medium-r-normal--0-0-72-72-c-0-gb2312.1980-0
       -isas-song ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
       -isas-song ti-medium-r-normal--24-240-72-72-c-240-gb2312.1980-0
       hanzigb13fs
       hanzigb13st
       hanzigb16fs
       hanzigb16st
       hanzigb24st

  Les  cinq dernieres dans l'exemple precedent sont simplement des alias
  des cinq premieres. Pour des fontes BIG5

  # xlsfonts | grep big5
  -kc-kai-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
  -kc-kai-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
  -kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
  -kc-ming-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
  -kc-ming-medium-r-normal-fantizi-15-150-75-75-c-160-big5.eten.3.10-1
  -kc-ming-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
  -uw-ming-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
  -uw-ming-medium-r-normal-fantizi-16-160-75-75-c-160-big5.eten.3.10-1
  -uw-ming-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
  -uw-songti-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
  -uw-songti-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
  -uw-songti-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1

  Si vous n'en avez aucune ou en voulez d'autres, vous pouvez  jeter  un
  coup  d'oeil  dans  ftp.ifcss.org:/pub/software/fonts/ ou gb/bdf/ con-
  tient les fontes GB, et big5/bdf les BIG5.

  55..11..22..  IInnssttaalllleerr ddeess ffoonntteess XX

  Supposons que vous ayez les BIG5 eb5-24k2.bdf.gz et GB  gb24st.bdf.gz.
  Pour les faire passer au format .pcf

       # gzip -cd eb5-24k2.bdf.gz | bdftopcf -t > eb5-24k2.pcf
       # gzip -cd gb24st.bdf.gz | bdftopcf -t > gb24st.pcf
       # compress *.pcf

  Installez les fontes dans /usr/X11R6/lib/X11/fonts/misc

       # mv *.pcf.Z /usr/X11R6/lib/X11/fonts/misc/
       # cd /usr/X11R6/lib/X11/fonts/misc
       # mkfontdir .

  Apres l'installation, allez regarder le fichier fonts.dir qui contient
  a present deux lignes

       eb5-24k2.pcf.Z -kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
       gb24st.pcf.Z -isas-song ti-medium-r-normal--24-240-72-72-c-240-gb2312.1980-0

  Il se peut que vous deviez creer des alias pour  ces  fontes,  ce  qui
  vous  epargnera  pas mal de saisie au moment d'invoquer des programmes
  chinois. Ajoutez alors ces deux lignes au fichier fonts.alias

       gb24st    "-isas-song ti-medium-r-normal--24-240-72-72-c-240-gb2312.1980-0"
       taipeik24 "-kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1"

  Il faut maintenant mettre votre serveur X-Window au courant de  toutes
  ces operations avec

       # xset fp rehash

  Si tout se passe bien, c'est le moment d'utiliser vos nouvelles fontes

       # cxterm -GB -fn 12x24 -fh gb24st &

  55..22..  LLeess ffoonntteess HHBBFF

  Les fontes HBF se composent de fichiers d'en-tete et  de  fichiers  de
  fontes bitmap.  Vous devez disposer des deux pour pouvoir en installer
  une. Vous en trouverez sur ftp.ifcss.org:/pub/software/fonts .

  Si vous desirez utiliser par  exemple  la  fonte  GB  FangSong  Jianti
  ccfs24.hbf,  vous  devrez  recuperer  les  trois  fichiers ccfs24.hbf,
  cclib.n24 et ccsys.24 . Le fichier 00index.txt dans le repertoire  des
  fontes  ifcss vous donnera les noms de fichiers pour chaque fonte HBF.

  66..  UUttiilliittaaiirreess dd''iimmpprreessssiioonn

  66..11..  CCNNPPRRIINNTT

  Cnprint est un utilitaire qui permet d'imprimer des textes chinois  ou
  de  les  convertir  en  PostScript.  Son fonctionnement est simplement
  analogue a celui de n'importe quelle commande d'impression et il  gere
  les formats GB, HZ et BIG5.

  66..11..11..  OOuu ssee ttrroouuvvee ccnnpprriinntt

  Vous         pouvez        trouver        cnprint260.tar.gz        sur
  ftp.ifcss.org:/pub/software/unix/print

  66..11..22..  IInnssttaalllleerr ccnnpprriinntt

  Le paquetage cnprint260.tar.gz ne contient que quatre fichiers

       # ls
       cnprint.1     cnprint.c     cnprint.cmd   cnprint.help

  Vous pouvez le compiler avec

       # gcc cnprint.c -o cnprint
       # mv cnprint /usr/local/bin
       # mv cnprint.1 /usr/local/man/man1

  Pour que cnprint fonctionne correctement ,  vous  devez  specifier  le
  chemin absolu des fichiers de fontes HBF. Avec csh ou tcsh
       # setenv HBFPATH "/usr/local/chinese/HBF/"

  Avec sh ou Bash

       # set HBFPATH="/usr/local/chinese/HBF/"; export HBFPATH

  Le  fichier  cnprint.cmd  contient les reglages par defaut de cnprint.
  Il devrait etre place dans BFPATH

       # cp cnprint.cmd $HBFPATH

  Pour convertir des textes chinois en PostScript, utilisez la  commande
  ``cnprint -w FILENAME''

  66..22..  GGBB22PPSS

  GB2PS est un autre utilitaire d'impression compatible avec les codages
  GB et HZ.  Il est livre avec une page de garde pour imprimer du  HXWZ.

  66..22..11..  OOuu ttrroouuvveerr GGBB22PPSS

  Le paquetage:
  gb2ps.2.02.tar.gz       ftp.ifcss.org:/pub/software/unix/print

  Les fontes:
  csong24.ccf     ckai24.ccf   ftp.ifcss.org:/pub/software/fonts/gb/misc
  cfang24.ccf     chei24.ccf

  Placez  les fontes quelque part. Les miennes sont dans /usr/local/chi-
  nese/CFONT

  66..22..22..  IInnssttaalllleerr GGBB22PPSS

  Avant de compiler gb2ps, vous devez modifier deux parametres  dans  le
  Makefile, le repertoire des fontes et celui de la page de garde

       CFONT=/usr/local/chinese/CFONT/
       COVERPAGE=/usr/local/chinese/lib/cover.ps

  Puis tapez simplement

       # make
       # cp gb2ps /usr/local/bin

  66..33..  DDTToopp

  Je ne sais pas grand chose a ce sujet.

  77..  AAffffiicchheerr dduu CChhiinnooiiss ddaannss NNeettssccaappee

  Sur  Internet,  beaucoup  de  pages  web  sont  consacrees a ce sujet.
  Netscape (de preference une version egale ou superieure a la 2.1) gere
  aussi bien GB que BIG5. Voici trois etapes necessaires pour visualiser
  du Chinois (BIG5) avec Netscape

  1. Configurez les fontes X comme indique dans la ``Section ``''''

  2. Lancez   netscape    et    ouvrez    le    menu    Options/Document
     Encoding/Traditional Chinese (Big5)

  3. Dans  le menu Options/General Preferences/fonts choisissez la fonte
     que vous desirez utiliser.

     Ceci dit, vous pouvez vous  demander  pourquoi  vous  n'avez  droit
     qu'au  corps  16.0  fixe  (Fixed(HKU) Size 16.0).  Il s'avere qu'il
     vous    faut    editer    le    fichier     /usr/X11R6/lib/X11/app-
     defaults/Netscape pour avoir acces a plus de fontes.  Supposons que
     vous ayez les fontes BIG5 suivantes

       # xlsfonts | grep big5
       -hku-fixed-medium-r-normal--0-0-72-72-c-0-big5.hku-0
       -hku-fixed-medium-r-normal--16-160-72-72-c-160-big5.hku-0
       -kc-kai-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
       -kc-kai-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
       -kc-kai-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
       -kc-ming-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
       -kc-ming-medium-r-normal-fantizi-15-150-75-75-c-160-big5.eten.3.10-1
       -kc-ming-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1
       -uw-ming-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
       -uw-ming-medium-r-normal-fantizi-16-160-75-75-c-160-big5.eten.3.10-1
       -uw-ming-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
       -uw-songti-medium-r-normal-fantizi-0-0-75-75-c-0-big5.eten.3.10-1
       -uw-songti-medium-r-normal-fantizi-20-200-75-75-c-200-big5.eten.3.10-1
       -uw-songti-medium-r-normal-fantizi-24-240-75-75-c-240-big5.eten.3.10-1

  Ajoutez  cette   ligne   a   votre   fichier   /usr/X11R6/lib/X11/app-
  defaults/Netscape

       *documentFonts.charset*big5.eten.3.10-1:              x-x-big5

  A present, Netscape peut toutes les utiliser.

  88..  LLee TTeexx cchhiinnooiiss

  Je ne connais pas vraiment ces paquetages.

  88..11..  CCJJKK

  88..22..  LLee TTeexx dduu ppaauuvvrree

  88..33..  CChhTTeexx

  99..  UUttiilliissaattiioonn dduu CChhiinnooiiss ddaannss uunnee ccoonnssoollee ---- CChhddrrvv eett WWZZCCEE

  Chdrv est un simulateur de terminal chinois. Il permet l'affichage  du
  Chinois  en  dehors  d'X-Window.  Base  sur  VGALIB,  il  necessite un
  moniteur VGA ou SVGA, et n'admet que le codage BIG5, mais vous  pouvez
  quand meme visualiser des fichiers GB grace a hztty

  99..11..  RReeccuuppeerreerr cchhddrrvv

  chdrvbin-1.0.7.tar.gz      sunsite.unc.edu:/pub/Linux/util/nls
                             ftp.ifcss.org:/pub/software/linux/tty
  chdrvfont.tar.gz (HBF)     ftp.ifcss.org:/pub/software/linux/tty

  99..22..  IInnssttaalllleerr cchhddrrvv

  Decompactez le paquetage de distribution de binaires

       # tar -xvzf chdrvbin-1.0.7.tar.gz
       # mv chdrvfont.tar.gz chdrv-1.0.7/
       # cd chdrv-1.0.7

  Prenez   connaissance  des  instructions  contenues  dans  le  fichier
  INSTALL.1.0.  Editez le script installbin. Si vous utilisez  des  mots
  de  passe  shadow  sur  votre systeme, il faut aussi editer le fichier
  chinese.conf, en enlevant le commentaire de la ligne

  LOGINPROGRAM /bin/telnet

  et en commentant la ligne

  LOGINPROGRAM /bin/login

  Maintenant, vous pouvez y aller

       # ./installbin

  99..33..  CCoonnssoollee cchhiinnooiissee GGBB -- WWZZCCEE

  L'Environnement  Chinois   Wei   Zhong   (WZCE)   est   un   paquetage
  d'applications  gerant  le  traitement  de  donnees  dans  le cadre de
  consoles virtuelles VGA sur des PC tournant sous UNIX.

  99..33..11..  OOuu eesstt--iill ??

  wzce_linux_elf_2.21n.tgz    ftp.ifcss.org:/pub/software/linux/tty

  99..33..22..  IInnssttaallllaattiioonn

  Lisez le fichier wzce_linux.readme

  1100..  UUnn ttrraaiitteemmeenntt ddee tteexxttee cchhiinnooiiss ---- CChhiinneesseePPoowweerr

  Un traitement de texte WYSIWYG sous X-Window, tres convivial et venant
  d'Extreme-Orient.   Il assure les modes de saisie GB, Big5, JIS et KS,
  l'impression PostScript, et l'affichage.  Il peut generer  un  fichier
  gif en 7 couleurs du document. Sympathique pour creer des pages Web en
  Chinois. ChinesePower a recours aux fontes HBF ou TTF.

  1100..11..  OOuu oobbtteenniirr cchhppoowweerr

  chpower-2.0.tar.gz       ftp.ifcss.org:/pub/software/x-win/editor/

  1100..22..  IInnssttaalllleerr cchhppoowweerr

  Chpower necessite des fontes HBF ainsi que la bibliotheque Motif  pour
  pouvoir  etre  compile.   Tout  d'abord, modifiez le fichier Makefile,
  puis

       # make

  vous construira les binaires. Creez aussi quelques  variables  d'envi-
  ronnement

       # setenv HBFPATH /usr/local/chinese/HBF/
       # setenv TTFPATH /usr/local/chinese/TTF/
       # setenv HZINPUTDIR /usr/local/chinese/dict/
       # setenv CHPOWERPATH path_of_chinesepower

  1111..  WWaabbii 22..22 eett llee ssyysstteemmee ddee ffeenneettrraaggee cchhiinnooiiss

  J'utilise  SoftPC  sur  NextStep et j'y ai installe Chinese Star. Cela
  fonctionne a merveille, mais n'ayant pas les moyens de me  payer  Wabi
  2.2,  je  vous serai reconnaissant de me faire savoir si vous utilisez
  des logiciels chinois sous Wabi 2.2 pour Linux.

  1122..  DD''aauuttrreess ggaatteerriieess

  1122..11..  CCrrxxvvtt

  Le paquetage xcin.tar.gz  contient  un  rxvt  chinois.  Il  admet  les
  attributs  de  couleurs  ANSI et consomme moins de memoire que cxterm.
  Xcin lui-meme est un serveur  d'entrees  (Entrees  ETEN  ?),  mais  je
  n'utilise que crxvt.

  1122..11..11..  RReeccuuppeerreerr CCrrxxvvtt

  xcin-2.1a.tgz       ftp.ifcss.org:/pub/software/x-win/xcin

  1122..11..22..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn

  Voici  la  procedure requise pour compiler uniquement crxvt (xcin peut
  necessiter un systeme ETEN).

       # tar -xvzf xcin-2.1a.tgz
       # cd big5-pack/xcin
       # xmkmf
       # gcc -I/usr/X11R6/include -O2 -m486 -pipe -DDELETE_K=0 -DAuto_First=1 \
       > -c cli_xcin.c -o cli_xcin.o
       # cd ../crxvt
       # xmkmf
       # make
       # cp crxvt /usr/local/bin

  1122..22..  KKttttyy

  Ktty est un autre utilitaire dans le  style  de  Hztty  permettant  la
  lecture   du   Chinois   dans  kterm  ou  pxvt.  Vous  pouvez  obtenir
  ktty1.3.tar.gz depuis  ftp.ifcss.org:/pub/software/unix/convert  .  Ce
  paquetage  ne  peut  pas etre compile tel quel sous Linux. Vous devrez
  utiliser  le  fichier  ``tty.c''  se  trouvant   dans   le   paquetage
  hztty-2.0.tar.gz et ajouter deux lignes au Makefile

  ______________________________________________________________________
  linux:
        ${MAKE} ${MFLAGS} DEFINES='-DPOSIX -DSYSV -DUSE_SYSV_UTMP' ${PROG}
  ______________________________________________________________________

  A present, compilez-le avec

       # make linux

  1122..33..  TTiinnTTiinn++++

  TinTin++  n'est  pas  un  programme chinois. Il est tres pratique pour
  jouer    a    des    Mud    chinois.    Il    est     disponible     a
  ftp.princeton.edu:/pub/tintin++ .  Voici trois sites de Mud chinois

  FengYun                  fengyun.com   5555
  Xi You Ji                129.105.79.24 6905
  Xia ke Xing              207.76.64.2   5555

  1133..  EEnnccoorree bbeessooiinn dd''aaiiddee ??

  +o  rtfm.mit.edu:/pub/usenet/news.answers/chinese-text/big5-faq

  +o  CXterm.FAQ

  1144..  AAppppeennddiiccee -- CCaattaalloogguuee ddee llooggiicciieellss cchhiinnooiiss ddee FFTTPP..IIFFCCSSSS..OORRGG

  _A_t_t_e_n_t_i_o_n:  les  paquetages  precompiles  pour  Linux  ne  sont   plus
  d'actualite et peuvent ne pas fonctionner !

  ****
  UNIX
  ****

  ========
  UNIX:BBS
  ========

  programme     : Phoenix BBS
  version       : 4.0, 31/08/1995
  fonction      : o Systeme de BBS multi-utilisateurs UNIX,
                  o forums de discussion, courrier electronique prive
                  o dialogues en direct multi-canaux, dialogues en vis-a-vis
                  o Iemail Internet, passerelle de News,
                  o 0Announce : interface de saisie d'informations dans le style Gopher.
                  o parametre pour permettre plus de 256 utilisateurs en ligne
                  o menu configurable, affichage plein ecran
                  o messages en Chinois
  URL           : ftp://ftp.ifcss.org/pub/software/unix/bbs/PhoenixBBS-4.0.tar.gz
  auteur        : Ji-Tzay Yang, Ming-Feng Chen, Tzung-Yu Wen

  ============
  UNIX:C-UTILS
  ============

  programme     : addpy
  version       : 1.0
  fonction      : Pour annoter du PinYin en Hanzi peu communs ainsi que certains plus
                  courants lus en acces direct. Gestion des styles a la fois GB (simplifie)
                  et BIG5 (traditionnel). Base sur des statistiques tirees d'une enorme
                  encyclopedie chinoise et de tables hanzi-freq-pinyin bien preparees.
                  Code source et donnees brutes sont fournis.
  URL           : ftp://ifcss.org/pub/software/unix/c-utils/addpy.tar.gz
  nom de fichier: README.addpy, b5addpy.l, gbaddpy.l, b5addpy.dat, gbaddpy.dat, makefile
  auteur        : Guo Jin

  programme     : rm4mat
  version       : n/a
  fonction      : Retire les codes de formatages d'impression de quelques fichiers codes en GB.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/c-utils/rm4mat.c
  auteur        : Chenghong Wang

  programme     : mail_hxwz
  version       : 1.1
  fonction      : Il extrait du HXWZ de votre courrier (suppose que vous y soyez abonne).
                  C'est un script shell Bourne qui tourne sur la plupart des systemes Unix.
                  Il peut se relancer automatiquement chaque vendredi.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/c-utils/mail_hxwz
  auteur        : Yaoen Zhang

  programme     : auto_get_hxwz
  version       : 1.2
  fonction      : Il capture la sortie courante de HXWZ au format GB ou PostScript, et assure
                  egalement le traitement et l'impression de ces fichiers, ainsi que le nettoyage apres coup.
                  Il fera gagner du temps aussi bien a vous qu'a votre machine.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/c-utils/auto_get_hxwz
  auteur        : Yaoen Zhang

  programme     : less chinois
  version       : 290, 25/05/1995
  fonction      : Pour parcourir des fichiers de texte en BIG5 et GB.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/c-utils/cless-290.tar.gz
  auteur        : Paul W. Shew
  commentaires  : requiert un terminal chinois, comme cxterm.

  programme     : cscreen
  version       : 3.2b
  fonction      : C'est une gestion d'ecran modifiee pour minic ETen dans un cxterm.
                  Apres avoir lance cscreen dans un cxterm, il va intercepter
                  chaque deplacement du curseur et examiner si un sinogramme se
                  trouve a la position d'ecran courante. Si c'est le cas, un deplacement
                  automatique ad-hoc sera genere.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/c-utils/cscreen-3.2b.tar.gz
  auteur        : Shih-Kun Huang

  programme     : ytalk
  version       : 3.0.2c6
  fonction      : ytalk-3.02c ameliore la compatibilite avec les stations de travail de DEC,
                  fournit un rafraichissement sur 2 octets pour les terminaux comme cxterm,
                  et peut transmettre le caractere de code 254, utilise en interne par ytalk-3.0
                  comme fonction d'effacement; Il est compatible avec ytalk-3.0, cytalk-3.0,
                  cytalk-3.0.2, ytalk-3.02c0/1/2/3/4/5, c'est-a-dire que vous avez toujours
                  acces a la touche Delete, ou Backspace. Si on utilise ytalk-3.02c4 des deux
                  cotes, le code 254 est transparent, et on peut donc se parler avec plus de
                  mots chinois.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/c-utils/ytalk-3.0.2c6.tar.gz
  auteur        : Sze-Yao Ni

  programme     : lunar
  version       : 2.1
  fonction      : programme de conversion entre les calendriers solaire et chinois lunaire;
                  calcul egalement de la date de naissance au format astrologique "4 colonnes"
  URL           : ftp://ftp.ifcss.org/pub/software/unix/c-utils/lunar-2.1.tar.gz
  auteur        : Ricky Yeung et Fung Fung Lee
  commentaires  : peut sortir du code GB, du bitmap ou simplement de l'ASCII

  programme     : DateStar - Generateur de calendrier chinois
  version       : 1.1
  fonction      : Affiche un calendrier chinois et occidental en ASCII,
                  BIG-5 (Hongkong, Taiwan), GuoBiao (Standard PRC) et HZ (Reseau).
                  Imprime sur deux des types d'imprimantes laser les plus repandues,
                  PostScript et HP LaserJet (PCL). Genere quatre formats differents :
                  calendrier annuel, mensuel, hebdomadaire sur une page et sur deux pages.
                  Affiche un calendrier avec les 24 phases solaires (JieQi), les tiges celestes
                  et les branches terrestres (huit caracteres TianGan DiZhi).
                  Permet des annotations definies par l'utilisateur.
                  Applicable de 1841 jusqu'a 2060.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/c-utils/datestar-1.1.tar.gz
  auteur        : Youzhen Cheng
  commentaires  : la version UNIX tourne sur station de travail SUN sous SUN OS 4.1.x
                  voir /software/dos/c-utils pour la version DOS

  programme     : pull
  version       : 2.9, 07/04/1996
  fonction      : 1. Extrait le ou les fichiers originaux d'un ou de plusieurs
                     fichiers uuencodes/compresses/splittes.
                   a) uudecode un fichier et affiche le nom de son fichier decode
                   b) decompresse un fichier .zz (= .gz/.Z/.zip)
                   c) uudecode + decompresse
                   d) uudecode + cat (concatene) + gunzip
                  2. Compresse des fichiers. Inverse le processus d'extraction ci-dessus.
                     compresse, (splitte), puis encode un ou des fichiers.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/utils/pull.c.gz
  auteur        : Yao Li

  programme     : utf-utils
  version       : 15 octobre 1993.
  fonction      : quelques utilitaires pour traiter du texte Unicode/ISO-10646 avec
                  l'encodage FSS-UTF.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/c-utils/utf-utils.tar.gz
  auteur        : Ross Paterson

  programme     : gbfmt
  version       : 1.0
  fonction      : formatage GB avec largeur de ligne variable, GB<->HZ
  URL           : ftp://ftp.ifcss.org/pub/software/unix/c-utils/gbformat.tar.gz
  auteur        : Dongxiao Yue (http://www.cs.umn.edu/~dyue/wiihist/gbfmt.html)

  ===========
  UNIX:EDITOR
  ===========

  programme     : celvis
  version       : 1.3
  fonction      : editeur vi pouvant traiter du Chinois.
                  Tourne principalement sur des terminaux chinois, p. ex. cxterm, ou sur des IBM-PC
                  avec un DOS chinois. Fonctionne exactement comme l'editeur vi sous Unix,
                  sauf qu'il n'effectue pas de saut de ligne automatique pour les longues lignes.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/editor/celvis.tar.gz
                  ftp://ftp.cs.purdue.edu/pub/ygz
  auteur        : Man-Chi Pong, Yongguang Zhang
  commentaires  : commentaires, rapports de bugs, modifications a: c-elvis@cs.purdue.edu

  programme     : JOE chinois (Joe's Own Editor)
  version       : 2.8c
  fonction      : Localisation chinoise en BIG5 d'un editeur de texte plein ecran. Les raccourcis clavier
                  reprennent ceux de WordStar et TURBO-PASCAL. Il utilise totalement
                  termcap et terminfo, est concu pour fonctionner correctement sur des reseaux et des
                  modems lents, et comporte le meilleur de vi. Des plus pratiques pour editer
                  du texte brut, comme des articles de news USENET et des sources de langages structures
                  en blocs tels que C et PASCAL.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/editor/joe2.8_c.tar.gz
  auteur        : <u8222034@cc.nctu.edu.tw>

  ============
  UNIX:CONVERT
  ============

  programme     : cn2jp
  version       : 1.3.2, 11/04/1996
  fonction      : routines de conversion de systemes de codage pour le Chinois et le Japonais.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/cn2jp1.3.2.tar.gz
  auteur        : Seke Wei

  programme     : ktty
  version       : 1.3, 11/04/1996
  fonction      : C'est un transcripteur de terminal kanji entre le Chinois et le Japonais.
                  Il permet la traduction en ligne des codes de telle sorte que vous pouvez
                  en visualiser un en temps reel en utilisant votre terminal chinois ou japonais.
                  Il tourne sous Unix et est inspire du paquetage 'hztty'.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/ktty1.3.tar.gz
  auteur        : Seke Wei

  programme     : code1
  version       : 1.3, 11/04/1996
  fonction      : C'est un explorateur de fichiers multilingue pour le Chinois et le Japonais.
                  Il tourne sous Unix et permet l'exploration de fichiers dans differents types de
                  codages a l'aide d'un terminal chinois ou japonais.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/code1.3.tar.gz
  auteur        : Seke Wei

  programme     : programme HUG
  version       : 1.0, 20/05/1995
  fonction      : Conversion entre les codes HZ, Uudecode/uuencode, et GB.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/shug.osf.zip
                  ftp://ftp.ifcss.org/pub/software/unix/convert/shug.sun4.zip
  auteur        : Yinrong Huang
  programme     : hztty
  version       : 2.0 Jan 29, 1994
  fonction      : Ce programme fait passer une session tty d'un systeme d'encodage vers un autre.
                  Par exemple, l'execution de hztty dans un cxterm peut vous permettre
                  de lire/ecrire du Chinois au format HZ, lequel n'est pas reconnu par cxterm.
                  Si vous avez baucoup d'applications dans differents types d'encodages, mais que
                  votre terminal prefere n'en reconnaisse qu'un, hztty peut vous rendre la vie plus facile.
                  Par exemple, hztty peut transformer votre cxterm GB en un terminal HZ, Unicode
                  (16bit, ou UTF8, ou UTF7), ou Big5.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/hztty-2.0.tar.gz
  auteur        : Yongguang Zhang

  programme     : EHZ
  version       : 2.0
  fonction      : Conversion entre GB/BIG5/CNS et EHZ-BIG5/GB/CNS.
                  Patch sur hztty pour la gestion de EHZ-BIG5/GB/CNS.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/EHZ-2.0.tar.gz
  auteur        : Ricky Yeung
  commentaires  : Contient aussi la specification EHZ et la EHZ-BIG5-CNS de Fung Fung Lee.

  programme     : b5cns
  version       : prototype
  fonction      : fonctions pour des conversions Big5 <-> CNS
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/b5cns.tar.gz
  auteur        : Ross Paterson

  programme     : c2t
  version       : n/a
  fonction      : convertit du Chinois code en GB ou BIG5 en PinYin
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/c2t.tar.gz
  auteurs       : Tommi Kaikkonen et Katya Ta

  programme     : Paquetage d'encodage BeTTY/CCF/B5
  version       : 1.534, 22/03/1995
  fonction      : Un paquetage de conversion de codages chinois pour des codes
                  largement utilises a Taiwan ainsi que pour le code GB tres repandu
                  sur le continent, plus une methode d'encodage Big5 sur 7 bits
                  (B5Encode3/B5E3, une extension d'encodage de HZ vers GB).
                  Il inclut des convertisseurs off-line (CCF/filtres de codes chinois
                  et B5E/B5Encode) et un convertisseur on-line (BeTTY) qui fait
                  en sorte que votre terminal chinois natif reconnaisse les systemes
                  de codage principalement utilises a Taiwan et les encodages GB et HZ.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/BeTTY-1.534.tar.gz
                  ftp://hermes.ee.nthu.edu.tw/shin/betty/BeTTY-1.534.tar.gz
  auteur        : Jing-Shin Chang

  programme     : BeTTY-ws_2fl.p1
  version       : 1.0 (patch sur BeTTY-1.534) octobre 1995.
  fonction      : 1. fait en sorte que BeTTY respecte la taille de la fenetre (tty).
                  2. un deuxieme filtre de conversion chinois peut etre ajoute.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/BeTTY-ws2fl.p1.tar.gz
  auteur        : Wei Dong

  programme     : c2gif
  version       : 0.01, 21/10/1995
  fonction      : convertit un fichier de texte BIG5 en fichier GIF
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/c2gif001.tar.gz
                  http://www.math.ncu.edu.tw/~luors/c2gif/
  auteur        : Luoh Ren-Shan

  programme     : gb2jis
  version       : 1.5, 19/11/1995
  fonction      : convertit de GB (ou HZ) vers JIS en PinYin a deux lettres
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/gb2jis.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/bdf/guobiao16.bdf.gz
  auteur        : Koichi Yasuoka
  programme     : jis2gb
  version       : 1.5, 01/10/1996
  fonction      : convertit du JIS en GB (ou HZ)
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/jis2gb.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/bdf/guobiao16.bdf.gz
  auteur        : Koichi Yasuoka

  programme     : HZ
  version       : 2.0
  fonction      : conversion des formats GB, HZ et zW entre eux.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/HZ-2.0.tar.gz
  auteur        : Fung F. Lee

  programme     : Utilitaires de specification et de conversion HZ+
  version       : 0.77
  fonction      : HZ+ est une representation 7 bits pratique de textes melangeant Big5, GB,
                  et ASCII destinee a etre employee sur Internet dans des e-mail, des news, etc.
                  Le code source des utilitaires de conversion Big5 <-> HZ+ et GB <-> HZ+ est
                  inclus. Les executables DOS sont dans une autre archive, /software/dos/convert/hzp.zip.
                  Nouveaute dans cette version Unix, un simple terminal HZ+ pour cxterm permet a
                  l'utilisateur de lire des mails et des news de facon transparente.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/hzp.tar.gz
  auteur        : Stephen G. Simpson

  programme     : hc
  version       : 3.0
  fonction      : convertit du GB vers du BIG5 et vice-versa.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/hc-30.tar.gz
  auteur        : Fung F. Lee et Ricky Yeung

  programme     : Table de conversion pour Hanzi (hc)
  version       : 01/05/1994
  fonction      : La table de conversion reconnait le programme Hanzi Convert
                  (auteur : Fung F. Lee et Ricky Yeung) GB<->Big5.
                  Inclut la gestion du Russe, des nombres, du Japonais, des
                  symboles graphiques et des codes "incorrects". Fichier de texte
                  contenant des commentaires.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/sym-supp.tab
                  ftp://ftp.ifcss.org/pub/software/unix/convert/in-corr.tab
  auteur        : Chi-Ming Tsai

  programme     : pbmbig5
  version       : 0.01, 02/11/1995
  fonction      : convertit des fichiers de texte chinois codes en Big5 en fichiers graphiques pbm.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/pbmbig5-0.01.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/big/hbf/kck24.hbf
                  ftp://ftp.ifcss.org/pub/software/fonts/big/hbf/kcchin24.f02
  auteur        : Wei-Jou Chen

  programme     : Utilitaires UTF
  version       : 31 mai 1994.
  fonction      : divers utilitaires pour l'encodage UTF d'Unicode/ISO-10646,
                  incluant la conversion depuis ISO-2022 et (partiellement) vice-versa.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/utf.tar.gz
  auteur        : Ross Paterson

  programme     : utf7
  version       : prototype, a utiliser a vos risques et perils.
  fonction      : fonctions pour convertir du code UTF-7 avec d'autres.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/utf7.tar.gz
  auteur        : Ross Paterson

  programme     : Encodeur et decodeur ISO-2022-CN
  version       : beta 960408
  fonction      : Convertit les codes CN-GB et CN-CNS entre eux.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/convert/iso-cn.tgz
  auteur        : handa@etl.go.jp
  commentaires  : Le code BIG5 n'est pas encore gere.

  ===============
  UNIX:NETWORKING
  ===============

  programme     : gopher2.014c
  version       : 2.0.14
  fonction      : Localisation chinoise d'un client gopher capable d'effectuer des
                  recherches sur des chaines Big5 8 bits sur IBM AIX, SUN OS, et
                  n'importe quelle autre machine.
                  Compatible avec tout systeme chinois Big5 tel que ET et cxterm.
                  Binaires executables pour IBM et Sun inclus.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/networking/gopher2.014c.tar.gz
                  ftp://ftp.ifcss.org/pub/software/unix/networking/gopher.ibm.tar.gz
                  ftp://ftp.ifcss.org/pub/software/unix/networking/gopher.sun.tar.gz
  auteur        : Hoo-Tung Cheuk (NCTU CIS, Taiwan)

  programme     : Tin chinois
  version       : 1.2PL2a
  fonction      : Lecteur de news tin 1.2PL2 avec bascule messages Anglais/Big5.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/networking/ctin122a.tar.gz
  auteur        : Shih-Kun Huang

  programme     : NcFTP compatible avec la messagerie chinoise
  version       : 2.3.0c, 17/01/1996
  fonction      : Patch chinois (BIG5) sur NcFTP.
                  A present, il permet d'afficher n'importe quel message chinois depuis
                  un serveur ftp, au lieu de "\xxx".  Compatible avec les attributs couleur
                  ANSI en mode Ligne.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/networking/ncftp-2.3.0.chinese.tgz
  auteur        : NCEMRSoft (original), Aiken Sam (patch chinois)

  ==========
  UNIX:PRINT
  ==========

  programme     : C2PS
  version       : 1.30 Aug 1 1995
  fonction      : Transcrit des documents chinois codes en Big5 en PostScript Niveau 2.
                  Cette version correspond a l'architecture Sparcstation. Grace a des fontes
                  chinoises TrueType, vous pourrez creer les plus beaux documents avec C2PS.
                  C'est une DEMO. Vous pouvez la copier et l'utiliser librement.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/print/c2ps130sos.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/big5/ms-win/
  auteur        : Hsueh-I Lu

  programme     : cnprint
  version       : 2.60  25 janvier 1995
  fonction      : Imprime ou convertit en PostScript GB/Hz/BIG5/JIS/KSC/UTF8 etc
                  (conforme a EPSF-3.0). Rapide. Multicolonnes. Impression verticale.
                  Necessite peu d'espace disque. Traitement "intelligent" des
                  ponctuations. Flexibilite dans le choix des fontes, taille de caractere,
                  largeur/hauteur, espacement de lignes et de caracteres, orientation du papier,
                  marges, etc. Compatible avec les caracteres europeens. Modes speciaux pour
                  imprimer du HXWZ. Voir le readme pour plus de details.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/print/cnprint260.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/{gb,big5,misc,unicode}/hbf/
  auteur        : Yidao Cai
  commentaires  : v2.60 existe aussi sous VMS, utilisez v2.61 sous DOS

  programme     : GBscript
  version       : 1.11
  fonction      : Convertit des textes mixtes GB/ASCII en sortie PostScript.
                  Grande vitesse d'impression (4ppm sur LaserWriter NTX).
                  Compatible Adobe-2.1.
                  Faible taille des fichiers PS (400K pour une sortie HXWZ).
  URL           : ftp://ftp.ifcss.org/pub/software/unix/print/gbscript-1.11.tar.gz
  auteur        : Yan Zhou

  programme     : gb2ps
  version       : 2.02
  fonction      : convertit du GB/HZ en PostScript, gere le formatage de page ordinaire
                  (choix des polices chinoises ainsi que de leur taille, page de garde,
                  numerotation des pages, etc). Les cinq polices chinoises Song, Kai,
                  Fang Song, Hei et FanTi sont fournies dans cette livraison.
                  L'encodage HZ est egalement accepte.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/print/gb2ps.2.02.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/fan24.ccf.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/fang24.ccf.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/hei24.ccf.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/kai24.ccf.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/misc/song24.ccf.gz
  auteur        : Wei SUN

  programme     : news2ps
  version       : n/a
  fonction      : news2ps convertit du BIG5 en Postscript
  URL           : ftp://ftp.ifcss.org/pub/software/unix/print/news2ps.c
                  ftp://ftp.ifcss.org/pub/software/fonts/big5/misc/chinese.16.new
  auteur        : The Society of HKU Postgraduate on Chinese Affairs
  commentaires  : renommez chinese.16.new en chinese.16

  programme     : hz2ps
  version       : 3.1
  fonction      : Convertit des textes hanzi (GB/BIG5) en PostScript.
                  Utilise des fontes HBF.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/print/hz2ps-3.1.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/{gb,big5}/hbf/
  auteur        : Fung F. Lee

  ===========
  UNIX:VIEWER
  ===========

  programme     : ChiRK
  version       : 1.2a
  fonction      : Afficheur de textes GB/HZ/BIG5 sur des terminaux (ou emulateurs) capables
                  de gerer les graphismes Tektronics 401x, tels que GraphOn,DEC VT240/330,
                  Xterm, Tektool sur Sun, EM4105 sur PC, VersaTerm-Pro sur Mac, etc.
                  Affiche jusqu'a 17 lignes de 40 caracteres chinois par ecran. Fonctionne
                  directement avec les programmes Unix de mail et de news.
                  Fourni avec quatre fontes.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/viewer/ChiRK-1.2a.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/hbf/cclib.v
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/hbf/cclib.16
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/hbf/cclibf.16.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/big5/misc/chinese.16.new.gz
  auteur        : Bo Yang
  commentaires  : renommez chinese.16.new en chinese.16

  programme     : Cbanner
  version       : 1.10, 950821
  fonction      : Pour afficher des sinogrammes en banniere
  URL           : ftp://ftp.ifcss.org/pub/software/unix/banner/cbanner1.10.tar.gz
  auteur        : Sheen Cherng-Dar, re-ecrit par Jonen Liu
  commentaires  : requiert des fontes systeme chinoises ETen Big5.

  programme     : gb2text
  version       : n/a
  fonction      : convertit du GB en texte
  URL           : ftp://ftp.ifcss.org/pub/software/unix/viewer/gb2text.c
  auteur        : Ding Yijun

  programme     : hzbanner
  version       : 1.1, 15 fevrier 1995
  fonction      : Affiche des GuoBiao dans le style Song en caracteres geants ASCII,
                  reconnait les codages GB2312-80 (^[$A), GB2312-80 + GB8565-88 (^[$(E),
                  EUC chinois (Guobiao 8 bits), CNS Plans 1 & 2, BIG5 et HZ.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/viewer/hzbanner11.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/gb/bdf/guobiao16.bdf.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/cns/bdf/cns1hku16.bdf.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/cns/bdf/cns2hku16.bdf.gz
  auteur        : Koichi Yasuoka

  programme     : hzview
  version       : 3.1
  fonction      : Affiche des textes hanzi (GB/BIG5) sur un simple terminal.
                  Utilise des polices HBF.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/viewer/hzview-3.1.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/{gb,big5}/hbf/
  auteur        : Fung F. Lee

  programme     : cnview
  version       : 3.1 (version UNIX. Version DOS disponible a /software/dos/viewer)
  fonction      : Affiche des textes chinois encodes en GB/Hz/Big5 sur * HP-UNIX (X-window) *
  URL           : ftp://ftp.ifcss.org/pub/software/unix/viewer/cnview.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/{big5,gb}/hbf/
  auteur        : Jifang Lin

  programme     : readgb
  version       : n/a
  fonction      : convertit du GB en texte
  URL           : ftp://ftp.ifcss.org/pub/software/unix/viewer/readgb.c
  auteur        : Yuzhao Lu
  commentaires  : modifie a partir de readnews.c

  programme     : readnews
  version       : n/a
  fonction      : readnews convertit du BIG5 en images ascii matricielles
  URL           : ftp://ftp.ifcss.org/pub/software/unix/viewer/readnews.c
                  ftp://ftp.ifcss.org/pub/software/fonts/big5/misc/chinese.16.new.gz
  auteur        : The Society of HKU Postgraduate on Chinese Affairs
  commentaires  : renommez chinese.16.new en chinese.16

  ==========
  UNIX:INPUT
  ==========

  programme     : CCTeach
  version       : 1.0
  fonction      : Didacticiel relatif aux methodes de saisie des sinogrammes.
                  Aide le debutant a apprendre la saisie en CC, plus divers utilitaires
                  suivant "cxterm NewFace" dont un dictionnaire associe, des raccourcis
                  clavier, un encodeur de phrases WuBi, et un convertisseur de ".tit" <==> ".titnf".
                  Base sur GB et Big5 (ETen et HongKong).
                  Gere toutes les methodes de saisie grace a un dictionnaire externe.
                  Necessite cxterm sous unix, CC ou ZW sous DOS.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/input/CCTeach1.0.tar.gz
  auteur        : Xiaokun Zhu

  =========
  UNIX:MISC
  =========

  programme     : ICCS 1.3
  version       : 1.3, 26 juin 1994
  fonction      : Serveur Internet d'echecs chinois
  URL           : ifcss.org:/software/unix/misc/iccs-1.3.tar.gz
  auteur        : Xi Chen
  commentaires  : Fichier retire pour des raisons legales le 3 juillet 1996. Veuillez contacter
                  l'auteur Xi Chen a xichen@abel.math.harvard.edu pour plus de renseignements.

  ========
  UNIX:WWW
  ========

  programme     : cdelegate
  version       : 1.4a, 01/05/1996
  fonction      : C'est un patch chinois sur DeleGate, une passerelle pour des services WWW.
                  Fournit un transcodage Chinois/Japonais pour les navigateurs WWW.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/www/cdelegate1.4.tar.gz
  auteur        : Seke Wei

  programme     : Lynx chinois
  version       : 2.5FMc, 19/07/1996
  fonction      : Patch chinois BIG5/GB sur lynx, un client WWW pour des terminaux vt100.
                  On cherche des volontaires pour continuer le patch.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/www/clynx25.zip
  auteur        : Nelson Chin

  programme     : Serveur Internet de MahJongg (serveur + applette client)
  version       : 0.2beta
  fonction      : fournit un serveur et un client graphique pour jouer au MahJongg sur
                  Internet.
  URL           : ftp://ftp.ifcss.org/pub/software/unix/www/MJ_dist.tar.gz
  auteur        : Zuwei Thomas Feng
  *****
  LINUX
  *****

  programme     : Serie D (Outils chinois, binaires ELF)
  version       : 1.00,  25 mars 1995
  fonction      : Distribution binaire de divers outils chinois pratiques:
                  Afficheurs -- cxterm, crxvt; Serveur d'entrees -- xcin; GB,Big5,HZ,B5E3
                  transcodeurs -- ccf, hc, hz2gb, gb2hz, zw2hz, b5decode,
                  b5encode; Outils d'impression -- lunar, ttf2ps; Pseudo tty -- hztty,
                  betty; Divers scripts, pages de man, dictionnaires, polices HBF et X;
                  chdrv, celvis, elm, sendmail
  URL           : ftp://ftp.ifcss.org/pub/software/linux/CLinux/CTool/d1
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/CTool/d2
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/CTool/d3
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/CTool/d4
  auteur        : Eric Lin
  commentaires  : necessite XFree86 3.1+, bibliotheques ELF

  programme     : Serie C (Paquetages chinois pour Slackware)
  version       : N/A
  fonction      : Les paquetages chinois reunis par Wei-Jou Chen peuvent etre installes
                  par les outils de configuration Slackware. L'idee de base est de pouvoir
                  installer et retirer des programmes chinois facilement, les debutants
                  pouvant ainsi les lancer sans trop de problemes.
  URL           : ftp://ftp.ifcss.org/pub/software/linux/CLinux/c1/
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/c2/
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/c3/
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/c4/
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/c5/
  compileur     : CHEN, Wei-Jou

  programme     : Serie MU (Paquetages Mule pour Slackware)
  version       : N/A
  fonction      : Les paquetages Emacs 2.0 Multi-Langues pour XFree86 2.X et 3.1
                  reunis par Shawn Hsiao peuvent etre installes par les outils de
                  configuration Slackware.
  URL           : ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu1/
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu2/
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu3/
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu4/
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu5/
                  ftp://ftp.ifcss.org/pub/software/linux/CLinux/mu6/
  compileur     : Shawn Hsiao

  =============
  LINUX:C-UTILS
  =============

  programme     : GNU fileutils-3.9
  version       : 3.9, 1 August 1994
  fonction      : Version chinoise des utilitaires de fichiers GNU pour Linux.
  URL           : ftp://ftp.ifcss.org/pub/software/linux/c-utils/fileutils-3.9-bin-chinese.tar.gz
  auteur        : Patrick D'Cruze

  programme     : C2PS
  version       : 1.30 Aug 1 1995
  fonction      : Transcrit des documents chinois codes en Big5 en PostScript Niveau 2.
                  C'est la version pour Linux. L'utilisation de polices TrueType chinoises,
                  vous pourrez creer les plus beaux documents en Chinois avec C2PS.
                  C'est une version DEMO. Vous pouvez la copier et l'utiliser librement.
  URL           : ftp://ftp.ifcss.org/pub/software/linux/chinese_utils/c2ps130lnx.tar.gz
                  ftp://ftp.ifcss.org/pub/software/fonts/big5/ms-win/
  auteur        : Hsueh-I Lu

  ============
  LINUX:EDITOR
  ============

  programme     : ?  ???? ??  pour Linux (version promotionnelle)
  version       : v2.163
  fonction      : Editeur de texte dans le style de PE2, concu specialement pour le Chinois.
  URL           : ftp://ftp.ifcss.org/pub/software/
  agent         : LU, Heman

  =========
  LINUX:TTY
  =========

  programme     : chdrv
  version       : 1.0.7, 1995.12.20
  fonction      : Simulateur de terminal chinois. Ne necessite pas X-Window.
  URL           : ftp://ftp.ifcss.org/pub/software/linux/tty/chdrv-1.0.7.tar.gz
                  ftp://ftp.ifcss.org/pub/software/linux/tty/chdrvbin-1.0.7.tar.gz
                  ftp://ftp.ifcss.org/pub/software/linux/tty/chdrvfont.tar.gz
  auteur        : WANG, Yu-Chung

  ===========
  LINUX:X11R6
  ===========

  programme     : Behavior DTop (pour Linux)
  version       : 1.4, Beta
  fonction      : Un paquetage de PAO chinois complet, caracterise par une conception
                  orientee objet de la manipulation des differents composants contenus
                  dans les documents, tels que les textes, les tableaux, les graphiques,
                  les equations et les images, le tout sous une forme integree.
                  Deux polices en relief sont fournies avec la version Beta.
                  Sortie PostScript. Convient aussi pour la PAO en Anglais.
                  (cf. les fichiers README & le manuel DTop formate pour une liste
                  exhaustive des fonctions et caracteristiques).
  URL           : ftp://ftp.ifcss.org/pub/software/linux/X11R6/dtop1.4/
  auteur        : DTop Development Group

  adaptation franaise 16 juin 1999 Linux Commercial HOWTO
  Mr. Poet <poet@linuxports.com>, d'aprs un travail de Martin
  Michlmayr (jusqu' la version 5.36).  Adaptation franaise
  Bernard Choppy.  Relecture Jean-Luc Cassel.
  v5.38, 7 mars 1999,

  Ce document traite des logiciels et applications commerciaux
  disponibles pour Linux.  Il est maintenu par Mr. Poet <poet@linux
  ports.com>,
  ______________________________________________________________________

  Table des matires






















































  1. A propos de ce document

  2. Information sur la proprit

  3. Avertissement

  4. Information associe

  5. Linux pour le march commercial ?

     5.1 systmes ddis
     5.2 Grands comptes
     5.3 Niches de march
     5.4 Biographie

  6. Dveloppement de site web

     6.1 ASWedit, diteur HTML
     6.2 Empress DataWEB
     6.3 EZ-EDIT
     6.4 LinkScan 2.0
     6.5 TalentSoft Web+ (WebPlus)
     6.6 VirtuFlex 1.1
     6.7 Web Crossing
     6.8 ThreadTrack et WebTailor de Webthreads.

  7. Bases de donnes

     7.1 c-tree Plus
     7.2 Empress
     7.3 Essentia
     7.4 FairCom Server
     7.5 INFORMIX-SE
     7.6 Just Logic/SQL
     7.7 KE Texpress
     7.8 Qddb
     7.9 Raima Database Manager++
     7.10 Empress Embedded SGBD/R
     7.11 SOLID Server
     7.12 Velocis Database Server
     7.13 Yard SQL

  8. Visualisation de donnes et CAO

     8.1 IDL (Interactive Data Language)
     8.2 Megahedron
     8.3 Tecplot 7.0
     8.4 VariCAD
     8.5 VARKON
     8.6 XVScan

  9. Outils de dveloppement

     9.1 ACUCOBOL-GT
     9.2 Amzi! Serveur Prolog & Logic
     9.3 Basmark QuickBASIC
     9.4 Masse Critique CM3
     9.5 Dynace
     9.6 Absoft FORTRAN 77
     9.7 Finesse
     9.8 ISE Eiffel
     9.9 EiffelBench
     9.10 IdeaFix
     9.11 j-tree
     9.12 KAI C++
     9.13 Khoros Pro 2.1
     9.14 MetaCard
     9.15 ObjectManual Release 3.0
     9.16 Critical Mass Reactor
     9.17 Resource Standard Metrics
     9.18 r-tree
     9.19 sdoc (Source Documenter)
     9.20 SEDIT, S/REXX
     9.21 SNiFF+
     9.22 ST/X (Smalltalk/X)
     9.23 tdb (Tcl Dvermineur)
     9.24 tprof (Tcl Profiler)
     9.25 View Designor/X (VDX)
     9.26 XBasic
     9.27 XMove 4.0 pour Linux

  10. Emulation

     10.1 Emulus
     10.2 Executor 2
     10.3 Wabi 2.2 pour OpenLinux

  11. Logiciels financiers

     11.1 BB Stock Pro et BB Stock Tool
     11.2 TimeClock

  12. Bibliothques

     12.1 FontScope
     12.2 INTERACTER
     12.3 Matrix<LIB> - bibliothque C++ mathmatique matricielle
     12.4 Bibliothque de compression de donnes PKWARE pour Linux
     12.5 ReadyBase
     12.6 SIMLIB IG

  13. Mathmatiques

     13.1 Maple V Release 4 - The Power Edition
     13.2 MATCOM et bibliothque MATCOM MATH
     13.3 Mathematica 3.0
     13.4 MATLAB et Simulink

  14. Multimdia

     14.1 Peter Lipa et ses voyages
     14.2 Lucka Vondrackova et ses voyages
     14.3 Peter Nagy et ses voyages
     14.4 Mpeg TV Player 1.0
     14.5 Xaudio

  15. Serveurs de rseau

     15.1 Critical Angle X.500 Enabler
     15.2 Serveur de nouvelles DNEWS
     15.3 Aventail InterNet Policy Manager
     15.4 Aventail VPN
     15.5 Wanpipe
     15.6 Serveur web Zeus

  16. Outils de bureau

     16.1 Corel Wordperfect 8
     16.2 The American Heritage Dictionary Deluxe
     16.3 Applixware Office Suite pour Linux
     16.4 D.M.S. Document Management System
     16.5 HotWire EasyFAX
     16.6 NExS, the Network Extensible Spreadsheet
     16.7 Axene Office
     16.8 Projector et Projector/Net
     16.9 The Virtual Office System
     16.10 XAllWrite
     16.11 Axene Xclamation
     16.12 XQuad

  17. Traitement de texte

     17.1 Edith Pro pour X11
     17.2 TeraSpell 97 pour Emacs

  18. Outils d'administration systme

     18.1 Host Factory
     18.2 PerfectBACKUP+
     18.3 Venus

  19. Produits X Window

     19.1 Serveur d'affichage Accelerated-X
     19.2 BXwidgets
     19.3 BXwidgets/DB
     19.4 Serveur graphique de portable Accelerated-X
     19.5 MaXimum cde Developer's Edition v1.0
     19.6 Serveur d'affichage Multi-ttes Accelerated-X
     19.7 Serveur d'affichage OpenGL Accelerated-X
     19.8 Motif certifi OSF

  20. Autres logiciels

     20.1 ABACUS 4
     20.2 BBBS
     20.3 Clustor
     20.4 FootPrints
     20.5 Aladdin Ghostscript
     20.6 Magician
     20.7 journyx WebTime
     20.8 LanSafe
     20.9 LjetMgr
     20.10 Synchronize/CyberScheduler

  21. Logiciel libre pour matriel commercial

     21.1 Cartes srie multi-ports Stallion Technologies


  ______________________________________________________________________

  11..  AA pprrooppooss ddee ccee ddooccuummeenntt


  Voici le Linux Commercial HOWTO.  Il contient une liste de logiciels
  commerciaux disponibles pour Linux.  Le Linux Commercial HOWTO ne
  contient aucune information sur les distributions Linux -- c'est
  l'objet du Distribution HOWTO.


  Si vous entrez en contact avec une des entreprises ou achetez un des
  produits de ce document, veuillez mentionner le Linux Commercial
  HOWTO.


  Ce document a t initialement labor par Harald Milz
  <Harald.Milz@Linux.org>.  puis maintenu par Martin Michlmayr
  <tbm@cyrius.com>.  et actuellement par Mr. Poet ET LinuxPorts
  <poet@linuxports.com>.

  Si des informations complmentaires sur le Linux Documentation Project
  ou les HOWTO Linux sont ncessaires, il est possible de contacter le
  superviseur Tim Bynum <linux-howto@metalab.unc.edu>.


  Tim Bynum poste mensuellement le listing sur diffrents groupes de
  news nationaux et internationaux.  De plus, le Linux Commercial HOWTO
  se trouve sur le World Wide Web  l'adresse :
  http://www.linuxports.com.  Les nouvelles versions du Linux Commercial
  HOWTO sont toujours places d'abord sur ce site.  Contrlez donc si la
  copie que vous lisez actuellement est toujours  jour !


  NdT : La version franaise est disponible  : Jussieu (LIP6).

  Par dfinition, elle se trouve moins  jour que l'original.  N'hsitez
  donc pas  rechercher dans la version anglaise si ncessaire.

  Ce document comportant de nombreux termes techniques correspondant 
  de nombreux corps de mtiers, le traducteur prie ses lecteurs et les
  entreprises concernes de bien vouloir excuser les erreurs qui se sont
  certainement glisses dans cette adaptation.

  Par ailleurs, s'il est habituel aux tats-Unis de prsenter son
  produit en des termes logieux et hyperboliques (the wold's premier,
  the best software in the world, etc.), la mentalit franaise supporte
  relativement mal ce genre d'auto-promotion.  Le traducteur s'est donc
  permis de transposer de telles formulations en d'autres plus sobres,
  pour viter que ces formules n'aient un impact ngatif lors de la
  lecture.

  Le Commercial-HOWTO n'est pas un forum d'annonces de produits ni un
  espace marketing -- c'est un service aux acheteurs potentiels et 
  l'ensemble de la communaut Linux.  Les revendeurs ne seront pas
  indiqus -- cette liste est destine aux entreprises productrices de
  logiciels.  Les deux objectifs principaux sont les suivants :


    Elle doit aider les entreprises qui souhaitent utiliser Linux 
     trouver des applications et des solutions logicielles.  La
     distribution internationale de cette liste augmentera les
     possibilits de contacts ;

    Elle est faite pour prouver l'utilisabilit commerciale de Linux et
     ainsi encourager les vendeurs  porter leur logiciel dessus.

  Les entreprises et dveloppeurs qui proposent leurs produits sous
  Linux et sont intresss par une inscription dans le Commercial-HOWTO
  sont invits  remplir le formulaire suivant et  me contacter  :
  poet@linuxports.com.


  Ce HOWTO contiendra des entres tabulaires pour chaque produit (comme
  dans l'exemple ci-aprs).  Le format en est similaire (les longueurs
  de champs/paragraphes sont arbitraires)  celui de la nouvelle carte
  du logiciel Linux (Linux Software Map, ou LSM).  Si vous souhaitez que
  j'ajoute les informations vous concernant, _f_a_i_t_e_s _c_o_u_r_t, sinon je
  serai oblig de limiter moi-mme.  Par ailleurs, envoyez-moi de
  l'ASCII pur, ni HTML, no PostScript.

  NdT : Le formulaire qui suit est celui  utiliser pour communiquer
  avec le mainteneur de la liste.  Une description des champs est place
  plus bas.
       Category:

               Databases, Data Visualisation, Development tools, Financial
               Software, Mathematics, Multimedia, Network Management, Text Processing,
               X Window or Other Software.

       Name:

       The name of your application.

       Description:

       Short description of the package, just the basic functionality.

       Distribution media:

       Licensing policy:

       Whatever applies.
        Is there a free demo or shareware version available
       via FTP or WWW?  Where?

       OS provisions:

       Kernel version, XFree86 version, Motif version, RAM, harddisk usage, etc.

       Documentation:

       Printed documentation, page number, online help, language.

       Extra features and add-Ons:

       (and their prices)

       Price range:

       Whatever it costs.

       Vendor:

       Address:
       Phone: (U.S.
       and Canada: if you like to be reachable internationally,
              please don't enter only a +1 800 or +1 900 number)
       Fax:
       EMail:
       URL :
       Contact:





  NdT : Pensez  envoyer votre texte en anglais ! Le descriptif qui suit
  ne doit pas tre utilis tel quel.



     CCaattggoorriiee
        Bases de donnes, visualisation de donnes, outils de
        dveloppement, mathmatiques, multimdia, gestion de rseau,
        traitement de texte, X Window ou autre logiciel.


     NNoomm
        Nom de l'application.
     ddeessccrriippttiioonn ::
        Courte description du paquetage, seulement les fonctionnalits
        de base.


     SSuuppppoorrtt ddee ddiissttrriibbuuttiioonn ::
        disquettes, CD-ROM, bandes ou autres


     PPoolliittiiqquuee ddee lliicceennccee ::
        ce qui s'applique -- y a-t-il une version de dmonstration ou
        shareware disponible par FTP ou WWW ? O ?


     CCoonnffiigguurraattiioonn OOSS ::
        versions de noyau, de XFree86, de Motif, RAM, occupation disque
        etc.


     DDooccuummeennttaattiioonn ::
        documentation imprime, nombre de pages, aide en ligne, langue.


     EEllmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        et leur prix.


     OOrrddrree ddee pprriixx ::
        ce qu'il cote.


     VVeennddeeuurr ::
        adresse, tlphone (en France, ajoutez le prfixe de
        l'international : 33, et retirez le 0 en tte de votre numro.
        Par exemple : 33-1.23.45.67.89 pour le numro 01.23.45.67.89),
        fax, e-mail, URL et nom de la personne  contacter.


  22..  IInnffoorrmmaattiioonn ssuurr llaa pprroopprriitt


  Ce HOWTO est la proprit intellectuelle de :

    Martin Michlmayr  1996, 1997, 1998 ;

    Mr. Poet  1999

    Bernard Choppy (en ce qui concerne l'adaptation franaise)  1996,
     1997, 1998, 1999.


  Une copie exacte peut tre ralise et diffuse sur tout support
  physique ou lectronique sans autorisation de l'auteur.  Les
  traductions sont de mme permises sans autorisation de l'auteur si
  elles comportent une indication sur le traducteur.


  De courtes citations peuvent tre utilises sans consentement
  pralable de l'auteur.  Les travaux drivs et diffusions partielles
  du Linux Commercial HOWTO doivent tre accompagnes, soit d'une copie
  exacte de ce fichier (NdT : de la version originale anglaise, bien
  sr), soit d'un pointeur vers une copie exacte.


  Le redistribution commerciale est autorise et encourage, nammoins
  l'auteur souhaite tre inform de telles redistributions.
  En bref, nous souhaitons promouvoir la dissmination de l'information
   travers autant de canaux que possible.  Nammoins, nous souhaitons
  conserver le copyright des documents HOWTO, et souhaitons tre
  informs de tout plan de redistribution des HOWTO.


  Nous voulons mme que _t_o_u_t_e l'information fournie dans les HOWTO soit
  diffuse.  Si vous avez des questions, contactez Tim Bynum, le
  coordinateur des HOWTO Linux  : linux-howto@metalab.unc.edu.

  NdT : En ce qui concerne la version franaise de ce document, les
  mmes restrictions s'appliquent de la mme manire, ainsi que les
  droits de reproduction et diffusion.  Dans tous les cas, la mention :
  " Adaptation franaise par Bernard Choppy " doit tre jointe  toute
  citation, partielle ou totale, diffusion ou distribution, de quelque
  nature qu'elle soit.


  33..  AAvveerrttiisssseemmeenntt


  Ce HOWTO n'est pas exactement un HOWTO au sens du : Linux
  Documentation Project.  En revanche, c'est un instrument
  d'investigation parmi les opportunits commerciales sous Linux et
  d'inventaire des applications dj portes et vendues dans une version
  Linux native.  En tant que vendeur de logiciel, vous savez
  probablement que vous pouvez aussi proposer une version de votre
  application lie statiquement pour SCO aux utilisateurs Linux, qui
  fonctionnera probablement sous l'mulateur iBCS2 (bien qu'avec une
  petite perte de performances et une plus grande consommation de
  mmoire).  De telles applications ne se trouveront pas ici.

  Je ne slectionnerai ni dslectionnerai aucun produit en particulier.
  Au contraire, quiconque souhaite voir son produit inclus verra son
  souhait exauc.  Nammoins, je me rserve le droit de limiter les
  entres individuelles pour les faire tenir dans le cadre.

  Si vous ne trouvez pas un produit ou un vendeur particuliers dans
  cette liste, cela est probablement d  l'une des raisons qui
  suivent :


    Je n'ai jamais entendu parler de ce produit ou de ce vendeur, et
     n'ai donc jamais essay d'entrer en contact ;

    Je suis entr en contact, mais le vendeur ne m'a pas encore
     rpondu ;

    Je suis entr en contact, mais le vendeur a positivement indiqu
     qu'il ne vend pas son produit pour Linux (actuellement) ;

  Dans tous les cas, contactez-moi si vous pensez que quelque chose
  manque ainsi que si vous dcouvrez une erreur dans ce fichier (NdT :
  pour tout problme concernant la traduction elle-mme, n'hsitez pas 
  contacter le traducteur).


  Quelquefois, deux adresses sont mentionnes dans le champ "Vendeur :"
  Dans ces cas j'ai reu l'information de l'importateur/distributeur
  allemand.  L'adresse du constructeur original est toujours mentionne
  en premier.





  44..  IInnffoorrmmaattiioonn aassssoocciiee

  Il existe un autre document qui parle de logiciel commercial sous
  Linux.  Elle est maintenue par : <Alan Cox>
  <mailto:Alan.Cox@linux.org> et peut tre trouve  :
  http://www.uk.linux.org/LxCommercial.html.

  Par ailleurs, vous pouvez visiter le site : Linux Mall sur lequel vous
  pouvez commander de nombreux produits parmi ceux prsents par ce
  HOWTO..


  55..  LLiinnuuxx ppoouurr llee mmaarrcchh ccoommmmeerrcciiaall ??

  Copyright  1996 iX Multiuser Multitasking Magazin
  Avec l'autrisation de iX Multiuser Multitasking Magazin !


  Certains me demandent : "Quand Linux sera-t-il prt pour le _m_a_c_h_
  _c_o_m_m_e_r_c_i_a_l ?"  Je pense que la premire chose  tudier est ce qu'on
  entend par "commercial" dans ce contexte.

  Certains diteurs de CD-ROM ont ajout le mot "commercial"  leur nom,
  simplement pour faire croire aux techniciens que leur produit convient
  seulement aux banques et socits d'assurance.  D'autres personnes
  regardent leurs produits avec ddain et disent que "Linux n'a pas la
  _q_u_a_l_i_t_ _c_o_m_m_e_r_c_i_a_l_e", car il y manque telle ou telle fonctionnalit
  dont ils ont besoin, ou parce qu'ils le croient instable (souvent sans
  mme l'avoir essay une seule fois).


  Pour moi, le mot "commercial" a perdu autant de valeur sur le march
  que d'autres mots de verbiage :



    "Ouvert" contre "propritaire" (certains disent maintenant qu'Unix
     est "propritaire") ;

    `"Station de travail" contre "PC" (Mais en fait, qu'est-ce qu'une
     station de travail, rellement ?).

  Dans les premiers temps de l'informatique, le march commercial tait
  constitu des banques, des compagnies d'assurances et d'organisations
  diverses dans lesquelles l'utilisation de COBOL ou RPG (NdT : en
  franais : GAP) tait majoritaire.  Le march technique tait un
  march scientifique, de l'ingnierie et de l'industrie dans lesquels
  FORTRAN et l'assembleur taient utiliss.  A un moment donn, le terme
  "commercial" semble avoir chang de smantique au profit de "adapt au
  march de masse" contre "adapt aux bidouilleurs".


  Pour les besoins de cet article, j'utiliserai la seconde smantique et
  expliquerai pourquoi je pense que Linux est adapt aux besoins
  commerciaux plutt qu' celui des dilettantes et bidouilleurs et
  adapt au march de masse plutt qu' des segments limits.


  Pour ceux d'entre vous qui dtestent les longs articles, ou qui
  disposent de peu de temps, je vais indiquer tout de suite mes
  conclusions.  Ensuite, vous pourrez aller boire une bire ou avoir
  d'autres activits amusantes :


  "Oui, Linux est adapt au march commercial...  dans certains cas".

  Pour qu'un systme d'exploitation soit adapt au march de masse, il
  doit disposer de certains attributs :



    disposer de nombreuses applications ;

    tre relativement facile  installer ;

    disposer de nombreuses applications ;

    tre relativement facile  maintenir ;

    disposer de nombreuses applications ;

    tre relativement facile  utiliser ;

    disposer de nombreuses applications ;

    ne pas planter (trop souvent) ;

    disposer de nombreuses applications ;

    tre conomique ;

    disposer de nombreuses applications.

  Mais vous pouvez liminer toutes ces considrations dans le march de
  masse d'aujourd'hui si une seule prmisse est vraie :


  Vous disposez de nombreuses applications.


  Aprs tout, il n'y aurait pas 170 000 000 systmes DOS dans le monde
  si toutes les autres _a_v_a_i_e_n_t _d_ tre vraies.


  J'ai souvent ajout qu'il devait tre conomique, mais l'histoire m'a
  prouv que j'avais tort sur ce point.  Si les gens avaient addistionn
  le cot total de la proprit, Apple aurait certainement gagn la
  guerre contre le PC.  Mais les gens ignorent les cots humains des
  autres (et mme d'eux-mmes), alors qu'ils se cognent la tte contre
  les murs pour faire fonctionner quelque chose, que le systme plante
  rgulirement, ou que la combinaison de touches qu'ils ont le plus
  d'habitude de manipuler est :


               <CTRL><ALT><DEL>




  Dans les premiers temps de l'informatique, les gens taient heureux de
  dpenser des milliers de francs pour un simple diteur de texte ASCII,
  ou de travailler avec une simple feuille de calcul.  Et c'tait un
  acte de management de les acheter, avec des tas de commandes en
  urgence, pour avoir l'intgration multimdia sur leur systme
  d'exploitation, et disposer de toutes les applications que leur voisin
  (ou chef, ou compatriote) avait sur _s_o_n systme.  Et ils voulaient
  avoir ces applications facilement, certainement pas plus difficilement
  en tout cas que de dcrocher leur tlphone pour commander sur cata
  logue ou d'aller au magasin du coin pour les acheter.



  Maintenant, qu'est-ce qui est  l'origine de cette plthore
  d'applications pour un systme d'exploitation ? La facilit de
  programmation ? De bons outils de dveloppement ? Les fonctionnalits
  du systme d'exploitation ? La stabilit dans le temps des
  interfaces ?


  La rponse est "aucune d'entre elles".  Bien que toutes ces
  caractristiques puissent aider  convaincre un dveloppeur
  d'applications d'effectuer un portage, le seul critre dterminant est
  le parc de la plate-forme d'un systme d'exploitation.  A nouveau, si
  MS-DOS tait compar  MacOS, ou mme  Unix et que le parc n'entrait
  pas en ligne de compte, nous savons quels sont les deux systmes qui
  disposeraient du plus grand nombre d'applications, et ils ne
  proviendraient pas de Microsoft.


  Bien qu'il soit vrai que certains vendeurs de Linux travaillent pour
  proposer ces applications au march de masse (lisez le dernier "...
  pour les nuls", le nombre d'applications qui tournent sur plate-forme
  Microsoft a t estim  plus de 35 000.  SunOs dispose d'environ
  10 000 applications, avec d'autres "Unix commerciaux" (y compris
  Solaris 2.x) beaucoup moins reprsentatifs en nombre.  Il faudra
  longtemps aux vendeurs de Linux pour disposer du nombre d'applications
  ncessaire pour toucher le march de masse, en particulier si celles-
  ci ne dpendent de la compatibilit ni iBCS2, ni DOS/Windows (qui
  peuvent actuellement fournir un grand nombre d'applications), mais
  sont plutt des applications "natives" Linux.


  Donc les applications sont le roi (et la reine) du march de masse et
  la base installe (en volume) ou la promesse d'une volution explosive
  (toujours en volume) est la clef de celles-ci.  Mais le march de
  masse est-il seulement "commercial" ?  La rponse est "non".  Le
  march de masse est un sous-ensemble (quoique fort vaste) du march
  commercial.  Voyons donc les besoins du reste du march commercial.
  Nous allons l'tudier en le segmentant ainsi :


    systmes "ddis" ;

    grands comptes ;

    niches de march.


  55..11..  ssyyssttmmeess ddddiiss


  Quand je parle de systme ddis, je pense spcifiquement  un
  ordinateur qui dispose d'une application spcifique (ou pas si
  spcifique) qui tourne dessus.  Des exemples de systmes ddis sont
  les terminaux point de vente, systmes de CAO, etc.  Mais dans une
  acception plus large, d'autres applications comme les serveurs Web,
  serveurs de noms (comme BIND), etc.  peuvent aussi tre considrs
  comme "ddis", puisqu'ils ne disposent que des quelques programmes
  ncessaires pour le systme.


  Habituellement, les systmes ddis sont ceux pour lesquels un
  indpendant (ISV) ou un revendeur  valeur ajoute (VAR) choisit un
  matriel, un systme d'exploitation, porte une application dessus,
  puis duplique ce systme 500 ou 1 000 fois sans modifier l'application
  de base.  Ces ISV et VAR vont essayer de choisir la solution la moins
  chre qui colle aux besoins de leur clientle.

  Linux est parfait pour ce genre d'applications.  Le systme
  d'exploitation est suffisamment stable pour porter et tester
  compltement une application.  Une fois pleinement test et stable, le
  paquetage compet est "coul dans le bronze" et dupliqu un nombre
  quelconque de fois pour le client final.


  Puisque le systme d'exploitation peut tre librement copi et qu'il
  tourne sur du matriel bon march, les cots variables (NdT : _i_._e_.
  _m_a_r_g_i_n_a_u_x) sont minimaux.  Mme un dveloppeur non familier du systme
  Linux (qui a donc besoin d'aide pour le faire tourner sur une plate-
  forme) aura un retour sur investissement rapide grce aux conomies de
  1 000  5 000 F par licence du systme d'exploitation.  De plus, le
  code source est entirement disponible pour le systme complet, en cas
  de problme ultrieur.  Il est possible d'acheter une grande quantit
  d'heures de support technique Linux pour 1 000  5 000 F.


  Comme je l'ai dit plus haut, je compte les fournisseurs d'accs
  Internet (ISP) dans la population concerne par les systmes "ddis",
   la fois pour Internet et pour l'intranet.  Pourquoi surcharger son
  gros, cher et complexe serveur avec le service du Web alors qu'une
  simple petite machine peut assurer cette charge ?  Pourquoi ne pas
  faire tourner les NIS secondaires sur une machine Linux ?  ou
  peut-tre le serveur bind ?


  Dans les premiers temps de Digital Unix (connu ensuite sous le nom de
  DEC OSF/1), nous n'avions pas beaucoup d'applications.  En fait, nous
  n'en avions aucune.  L'quipe marketing venait me voir avec des ttes
  d'enterrement pour me demander s'il tait possible de vendre un
  systme d'exploitation sans application.  J'ai invent le terme
  "Turbocharging" qui permettait  un systme Digital Unix d'utiliser la
  vitesse et la puissance du processeur Alpha (ainsi que le dbit de nos
  quipements rseau) pour dcharger NIS, NFS, bind et autres des
  machines SPARC surcharges.  Nous avons aussi montr aux gens comment
  utiliser la commande rsh(1) pour permettre  l'Alpha d'effectuer une
  partie de leurs traitements gourmands en CPU tout en renvoyant les
  rsultats  la SPARC sur leur bureau.  Cela permettait aux SPARC de
  travailler plus sur les applications et moins sur les autres tches
  d'"administration systme".  Nous avons vendu des tas de systmes
  Digital Unix fonds exclusivement sur l'excution de ces tches.
  Aujourd'hui, bien sr, Digital Unix dispose de beaucoup plus
  d'applications et des bases de donnes mmoire trs vastes qui sont
  extrmement rapides.  Mais le mme principe s'applique.  Le moteur de
  base de donnes tourne sur le systme Alpha, fournit les donnes  des
  moteurs SPARC comme un "Turbochargeur".  Je peux voir les systmes
  Linux s'orienter dans la mme direction, en suivant le mme chemin.



  55..22..  GGrraannddss ccoommpptteess


  Les grands comptes ont souvent des applications maison qui doivent
  tre dployes sur un vaste rseau.  Ou encore ils ont une direction
  qui impose une certaine suite d'applications qui peuvent ensuite tre
  portes sur Linux.  Puisque ces grands comptes sont trs vastes, leurs
  cots de systmes d'explotation sont trs importants et l'conomie
  d'chelle engendre par l'utilisation de Linux peut couvrir
  compltement les cots de portage.


  Ou encore ces grands comptes peuvent "influencer" leurs fournisseurs
  de logiciels pour effectuer le portage sous Linux.  Finalement, il
  peuvent mme changer certaines de leurs habitudes informatiques
  (utiliser des programmes existants) si les conomies d'chelle sont
  suffisantes.


  Des entreprises comme Caldera crent des suites d'applications et se
  rapprochent des grands comptes pour leur montrer les conomies de
  systmes d'exploitation possibles par la bascule vers Linux.  Bien
  qu'il soit impossible que tout application concevable par le client
  puisse tourner sur Linux, le mlange d'applications natives, iBCS2,
  DOSEMU et WABI peut constituer une jolie suite qui couvre leurs
  besoins.


  55..33..  NNiicchheess ddee mmaarrcchh


  Enfin, il y a ce que j'appelle des "niches de march".  Les marchs
  qui peuvent acheter Linux simplement parce que c'est Linux et non 
  cause des suites applicatives existantes.


  Dans le champ de l'ducation, il y a trois marchs principaux :

    administration ;

    "informatique de campus" ;

    cours d'informatique.

  La partie administrative est l'aspect "commercial" du march.  Elle
  cherche des systmes simples  utiliser qui puissent assurer les
  tches administratives de la dimension de celles d'une petite ville.


  L'"informatique de campus" est la fourniture de puissance de calcul et
  de services de tous types, services de Web et de recherche dans les
  domaines scientifiques non-informatiques (par exemple, la modlisation
  molculaire).


  Enfin, il y a les cours d'informatique, aussi bien dans l'enseignement
  secondaire qu'en suprieur ainsi que la recherche en informatique.


  Alors que le sous-march administratif s'appuie plus sur des
  applications spcifiques, les deux autres en ont un besoin plus limit
  (les cours d'informatique en ayant le moins besoin).  Ces derniers
  peuvent utiliser beaucoup plus les applications free -- et shareware
  qui sont dj portes sous Linux.  Cela leur donne une plateforme trs
  conomique (d'un point de vue logiciel) tout en leur permettant de
  voir et (souvent) de modifier le code source pour les applications
  qu'ils utilisent.


  Plus important, dans le domaine de la recherche informatique, les
  rsultats de la recherche peuvent tre librement distribus  d'autres
  travaillant dans le mme domaine ou mme publis en code source pour
  illustrer les rsultats.  Cela ne peut se faire avec des systmes
  d'exploitation "commerciaux".


  Certaines universits utilisent Linux de plus en plus pour leur
  campus.  D'un point de vue "commercial", leurs besoins sont les mmes
  que ceux de nombreux mtiers.  Les tudiants venant du milieu scolaire
  connatront Linux, et passeront le mot  leurs employeurs futurs.

  Finalement, il y a le bidouilleur informatique et le march du
  dveloppement logiciel.  Je fais partie de ce march par celui des
  radio-amateurs.  Dans ce sous-march des radio-amateurs, la radio est
  souvent utilise simplement pour parler  d'autres gens, mais en mme
  temps, les utilisateurs recherchent de nouvelles manires d'utiliser
  la radio, et de l'amliorer.  De nombreux ingnieurs en lectricit
  ont commenc comme radio-amateurs.  Ainsi, cela peut se faire avec
  Linux puisque pour la premire fois, le prix du matriel et le code
  source du systme d'exploitation sont  la porte du simple mortel.


  En conclusion, je pense que Linux contient les lments ncessaires
  pour certains types d'utilisation "commerciale" :


    stabilit et qualit ;

    faibles cots variables pour les systmes ddis ;

    taille explosive pour attirer les ISV.

  Ce dont Linux a rellement besoin est que la communaut "commerciale"
  comprenne ce qui est en train de se passer, et qu'elle l'utilise l o
  il est utile.  Cela accrotra le volume encore plus, ce qui attirera
  d'autres applications.

  (NdT : Dans ce qui suit, Jon "maddog" Hall parle au futur, mais la
  traduction ayant lieu aprs l'vnement, le traducteur s'est permis,
  pour plus de clart, de transposer l'ensemble au pass compos).

  Tout au long de ces lignes, je voudrais faire part d'un effort
  conjoint de USENIX et de Linux International qui a eu lieu en janvier
  1997  Anaheim, Californie (tats-Unis).  Il y a eu une confrence de
  dveloppement conjointe USENIX/Linux et bien qu'une certaine partie de
  la confrence Linux ait t oriente vers le dveloppement du systme
  d'exploitation Linux, l'essentiel de la confrence a t orient vers
  les dveloppeurs d'application et les gens du marketing pour leur
  permettre de mieux comprendre le systme d'exploitation Linux et
  comment vendre leurs applications et services dans le march Linux.
  Nous esprons avoir montr aux ISV, VAR, revendeurs et distributeurs
  comment faire de l'argent en vendant leurs applications et services
  sur le systme Linux.



  55..44..  BBiiooggrraapphhiiee


  Jon ``maddog'' Hall est Senior Leader dans le groupe Unix de Digital
  Equipment Corporation.  Il est dans l'industrie informatique depuis
  vingt-cinq ans, dans Unix depuis seize ans et a particip 
  l'mergence de six systmes d'exploitation, y compris Linux sur Alpha.
  Il a un MS (NdT : Master in Science) en informatique.


  66..  DDvveellooppppeemmeenntt ddee ssiittee wweebb


  66..11..  AASSWWeeddiitt,, ddiitteeuurr HHTTMMLL


     ddeessccrriippttiioonn ::
        ASWedit est un diteur de texte HTML commercial, intuitif et
        facile  utiliser.  Il fonctionne dans trois modes
        indpendants : un mode d'dition texte simple et deux modes de
        validation sensibles au contexte destins  la production de
        documents destins aussi bien  InterNet qu' l'intranet.  Les
        deux modes HTML sont : standard et exprimental.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, DAT 4 mm, cartouche quart de pouce et
        cartouches 8 mm, InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        Base par machine.  Le nombre d'utilisateurs sur la machine
        porteuse de licence est illimit.  Une version du programme,
        appele AsWedit, est disponible gratuitement pour les tudiants
        et l'encadrement ducatif, ainsi que pour les organisations
        charitables sans but lucratif, et  des fins d'valuation libre
        individuelle ou par des organisations commerciales.  Il est
        disponible par FTP depuis de nombreuses archives.  Des dtails
        sont disponibles  : http://www.advasoft.com/asWedit.html.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2.13 ou suprieur (ELF), X11R6, Motif 2.0 (sauf pour la
        version lie statiquement), 5 Mo de RAM, 1,5  3,5 Mo d'espace
        disque.

     DDooccuummeennttaattiioonn ::
        Documentation imprime, aide en ligne, langage : Manuel
        utilisateur (44 pages), Manuel de rfrence de HTML 3.2 tendu
        (89 pages), Manuel de rfrence HTML 3.2 exprimental (106
        pages).  Aide en ligne hypertexte sensible au contexte (560 ko).
        Des fichiers de ressources traduits sont disponibles pour les
        langues suivantes : anglais (par dfaut), tchque, danois,
        hollandais, franais, allemand, polonais, portugais, espagnol et
        sudois.  Les commandes et messages sont traduits dans chaque
        langue, mais l'aide en ligne et la documentation sont
        disponibles seulement en anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        La licence comprend une anne de mises  jour gratuites par FTP.


     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Possibilit d'interfaage avec des filtres Unix externes.
        Hautement configurable.  Supporte quatre butineurs diffrents
        pour la prvisualisation.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 149.  Remises par quantits.

     VVeennddeeuurr ::
        AdvaSoft Ltd.


           30 Hatch Road London SW16 4PN Angleterre




     TTllpphhoonnee ::
        +44 181 251 0033

     FFaaxx ::
        +44 181 251 0011
     EE--mmaaiill ::
        as@advasoft.com

     UURRLL ::
        http://www.advasoft.com

     CCoonnttaacctt ::
        Andre Stochniol

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        30 aot 1997.


  66..22..  EEmmpprreessss DDaattaaWWEEBB


     ddeessccrriippttiioonn ::
        Empress DataWEB permet de construire rapidement des applications
        dynamiques, interactives et alimentes par bases de donnes.
        Aucun langage de programmation n'est  apprendre ; les
        dveloppeurs d'applications peuvent simplement utiliser HTML
        avec les extensions Empress pour l'accs au SGBD/R.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Contacter le vendeur pour des copies d'valuation.

     CCoonnffiigguurraattiioonn OOSS ::
        16 Mo de RAM; 60 Mo d'espace disque (lments complmentaires :
        un butineur est indispensable).

     DDooccuummeennttaattiioonn ::
        Aide en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique complet, factur sparment.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Des lments supplmentaires comme un serveur HTTP et d'autres
        outils facilitant la cration d'applications web sont livres
        avec le paquetage logiciel.

     DDiissppoonniibbllee ddeeppuuiiss ::
        avril, 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter le vendeur.

     VVeennddeeuurr ::
        Empress Software Inc.


           6401 Golden Triangle Drive Greenbelt, MD 20770 tats-Unis.






           3100 Steeles Avenue East Markham, ON L3R 8T3 Canada

     TTllpphhoonnee ::
        +1 301 220 1919 (tats-Unis), +1 905 513 8888 (Canada)

     FFaaxx ::
        +1 301 220 1919 (tats-Unis), +1 905 513 1668 (Canada)

     EE--mmaaiill ::
        sales@empress.com

     UURRLL ::
        http://www.empress.com

     CCoonnttaacctt ::
        Dick Naedel

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  66..33..  EEZZ--EEDDIITT


     ddeessccrriippttiioonn ::
        EZ-EDIT est un diteur HTML en ligne, qui permet aux
        utilisateurs de grer compltement leur site web depuis un
        navigateur (diter, crer, recharger, renommer/dplacer/copier,
        crer et supprimer des rpertoires).  EZ-EDIT est le seul
        diteur qui dispose de la fonction "filtre de fichiers" qui
        permet de spcifier les types des fichiers autoriss sur votre
        systme.  Crez l'identit visuelle de votre choix  partir des
        16 fichiers prototypes EZ-EDIT de plus de 80 paramtres.  Il est
        aussi possible de dterminer des limites en espace disque.  Le
        support du tlchargement de fichiers depuis un formulaire est
        inclus, ainsi qu'un gnrateur de pages Java.  Toute
        l'administration est ralise depuis un navigateur web.


     SSuuppppoorrtt ::
        disquettes 3,5 pouces, InterNet (FTP et web).


     PPoolliittiiqquuee ddee lliicceennccee ::
        une dmonstration gratuite est disponible sur notre site web.
        La version de dmonstration est dverrouille en version
        complte  l'aide de la clef d'enregistrement.


     CCoonnffiigguurraattiioonn OOSS ::
        Linux/Intel.


     DDooccuummeennttaattiioonn ::
        Manuels de l'utilisateur et de l'administrateur en ligne HTML
        (anglais seulement).


     EEllmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Service de mise  jour, support (par e-mail).


     DDiissppoonniibbllee ddeeppuuiiss ::
        17 septembre 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD149 ,95.

     VVeennddeeuurr ::
        Relative Web


           P.O. Box 351
          Saylorsburg, PA 18353-0351
          tats-Unis




     TTllpphhoonnee ::
        +1 610 381 3072

     FFaaxx ::
        +1 610 381 3072

     EE--mmaaiill ::
        ez-edit@relative-web.com

     UURRLL ::
        http://www.relative-web.com/dynamic/ez-edit

     CCoonnttaacctt ::
        John Bergeron

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        6 octobre 1997.


  66..44..  LLiinnkkSSccaann 22..00


     ddeessccrriippttiioonn ::
        LinkScan fonctionne sur serveurs Unix et NT aussi bien sur
        InterNet que sur les intranets, et peut tester plus de 40 000
        liens par heure car il est le seul contrleur de liens 
        traitement simultan multi-thread.  LinkScan a t test sur des
        sites de plus de 45 000 pages et plus de 80 000 liens.  LinkScan
        produit aussi deux types rvolutionnaires de cartes de sites
        web.  La carte des sites de LinkScan contient chaque lien d'un
        site web dans un format hirarchique qui ressemble  une table
        des matires.  La carte dpliable de LinkScan permet de naviguer
        parmi les divers niveaux d'un site web via un ensemble restreint
        d'icnes de navigation.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        Par machine.  Des copies d'valuation gratuites peuvent tre
        tlcharges depuis notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Ncessite Perl 5 ou suprieur.

     DDooccuummeennttaattiioonn ::
        La documentation complte et une FAQ intuitive peuvent tre
        trouves sur notre site web.

     SSuuppppoorrtt pprroodduuiitt ::
        Ce produit est en permanence mis  jour et maintenu.  Toute
        question par e-mail ou tlphone aura une rponse rapide.  Le
        support technique est gratuit.

     DDiissppoonniibbllee ddeeppuuiiss ::
        7 janvier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 495.

     VVeennddeeuurr ::
        Electronic Software Publishing Corporation


           1504 #8-00200 main Street Gardnerville, NV 89410-5273 tats-Unis.




     EE--mmaaiill ::
        ken@elsop.com

     UURRLL ::
        http://www.elsop.com

     CCoonnttaacctt ::
        Ken Churilla

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        6 novembre 1997.


  66..55..  TTaalleennttSSoofftt WWeebb++ ((WWeebbPPlluuss))


     ddeessccrriippttiioonn ::
        TalentSoft Web+ est un outil ddi au dveloppement
        d'applications client/serveur sur le web sans criture de
        programmes CGI de bas niveau.  Web+ permet la cration rapide et
        facile de pages web hautement fonctionnelles qui s'interfacent
        avec des bases de donnes, des systmes de fichiers, l'e-mail,
        des applets Java, des applications propritaires (EXEs, DLLs),
        et qui communiquent avec d'autres applications  l'aide des
        sockets TCP/IP.  Web+ fonctionne avec tous les serveurs web,
        bases de donnes et systmes d'exploitation habituels et
        s'interface de prs avec les serveurs Netscape via NSAPI et CGI.
        Web+ agit aussi comme middleware multi-thread qui interface les
        serveurs web avec les bases de donnes, l'e-mail, les sockets
        TCP/IP et d'autres applications.  Consultez le lien "Teach Me
        Web+" sur notre site web pour le tutoriel interactif avec des
        exercices pratiques.  Nous sommes fiers d'tre les premiers 
        fournir l'interprtation dynamique de code sur Internet !  Vous
        pouvez ds maintenant commencer  crire et  faire tourner
        votre propre application web sans acheter ni installer Web+.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, CD-ROM et InterNet (FTP et web).

     SSyyssttmmee ddee lliicceennccee ::
        Copie d'valuation gratuite disponible 
        http://www.TalentSoft.com.  Des messages sont affichs sur les
        versions d'essai mais celles-ci n'expirent pas.

     CCoonnffiigguurraattiioonn OOSS ::
        16 Mo RAM, 5 Mo d'espace disque.
     DDooccuummeennttaattiioonn ::
        Documentation imprime (environ 200 pages) et aide en ligne
        HTML.  Anglais seulement.

     SSuuppppoorrtt pprroodduuiitt ::
        e-mail gratuit, confrence web+, et support tlphonique.
        Formation payante disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1er mai 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis, Royaume Uni, Hong Kong, Chine, Singapour.

     OOrrddrree ddee pprriixx ::
        de USD 195  USD 1295.

     VVeennddeeuurr ::
        TalentSoft / Talent Information Management, LLC.


           900 Nicollet Mall, Suite 700 Minneapolis, MN 55402 tats-Unis.






           P.O.
          Box 2997 Minneapolis, MN 55402 tats-Unis.




     TTllpphhoonnee ::
        +1 612 338 8900

     FFaaxx ::
        +1 612 904 0010

     EE--mmaaiill ::
        info@TalentSoft.com

     UURRLL ::
        http://www.TalentSoft.com

     CCoonnttaacctt ::
        Victor Tong, Ian Gorrie, Jeff Persche, Tony Tong

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        8 aot 1997.


  66..66..  VViirrttuuFFlleexx 11..11


     ddeessccrriippttiioonn ::
        VirtuFlex 1.1 est un gnrateur d'applications web permettant
        d'ajouter des fonctionnalits dynamiques  un site web.
        VirtuFlex permet de transformer des sites web en applications
        vivantes par l'interfaage des bases de donnes, du fax, de l'e-
        mail et des "pagers" avec le web.  VirtuFlex dispose de
        fonctionnalits sophistiques qui peuvent tre ajoutes aux
        sites web par un simple dveloppeur HTML.  VirtuFlex est
        rutilisable, modulaire, facile d'emploi, performant et permet
        la connectivit avec  peu prs n'importe quelle base de
        donnes.  VirtuFlex est compos d'un langage de macros, d'un
        processeur de macros, d'un serveur de bases de donnes et de
        paquetages de prototypes.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        Base par domaine.  Copie d'valuation gratuite disponible sur
        notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        format binaire Linux ELF (noyaux 1.2.x ou suprieur).  VirtuFlex
        tourne sur des stations Unix standard de 8 Mo de RAM minimum,
        16 Mo recommands.

     DDooccuummeennttaattiioonn ::
        Tlchargeable en anglais depuis notre site web.

     SSuuppppoorrtt pprroodduuiitt ::
        Support de base de quatre heures.  Autres options de support
        disponibles -- dtails par tlphone.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Des paquetages de prototypes pr-construits sont fournis
        gratuitement avec VirtuFlex pour le tl-achat, les groupes de
        discussion thmatiques, la construction d'applications bases de
        donnes, des questionnaires  choix multiples, des robots
        d'exploration et des journaux cycliques.  De nouveaux paquetages
        apparaissent rgulirement.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier par UniDirect, Soft Export et InterNet.

     OOrrddrree ddee pprriixx ::
        USD 995, remises ducation.

     VVeennddeeuurr ::
        VirtuFlex Software Corp.


           930 Massachusetts Avenue
          Cambridge, MA 02139 tats-Unis.




     TTllpphhoonnee ::
        +1 617 497 8006

     FFaaxx ::
        +1 617 492 0486

     EE--mmaaiill ::
        comments@virtuflex.com

     UURRLL ::
        http://www.virtuflex.com

     CCoonnttaacctt ::
        Dan Housman


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        17 mars 1997.


  66..77..  WWeebb CCrroossssiinngg


     ddeessccrriippttiioonn ::
        Serveur de confrences en ligne pour l'intranet et l'extranet et
        le monde entier avec des forums de discussion et des chambres de
        dialogues.  Web Crossing est un serveur d'applications de
        groupware, accessible avec n'importe quel butineur, via de
        nombreux serveurs web.  Il rend la communication plus efficace
        et productive que les groupes de nouvelles ou les listes de
        diffusion e-mail.

     SSuuppppoorrtt ::
        InterNet.

     SSyyssttmmee ddee lliicceennccee ::
        commercial.  Version de dmonstration totalement fonctionnelle.

     OOrrddrree ddee pprriixx ::
        USD 995 illimite.

     VVeennddeeuurr ::
        Lundeen & Associates


           P.O.
          Box 2900 Alameda, CA 94501 tats-Unis.




     TTllpphhoonnee ::
        +1 510 521 5855

     FFaaxx ::
        +1 510 522 6647

     EE--mmaaiill ::
        sales@lundeen.com

     UURRLL ::
        http://webcrossing.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        30 septembre 1997.


  66..88..  TThhrreeaaddTTrraacckk eett WWeebbTTaaiilloorr ddee WWeebbtthhrreeaaddss..


     ddeessccrriippttiioonn ::
        ThreadTrack et WebTailor sont des paquetages lgers de scripts
        CGI indpendants des serveurs et butineurs, dvelopps sous
        Linux, qui ajoutent des fonctions aux serveurs web.  ThreadTrack
        permet de tracer l'activit des visiteurs d'un site web, tandis
        que WebTailor permet de modifier dynamiquement le contenu d'un
        site web en rponse  l'action ou au profil d'un visiteur.
        WebTailor utilise un langage simple de script ct serveur pour
        modifier le contenu du site.  Le langage, conu pour des
        concepteur web non-techniciens, est facile  apprendre et 
        utiliser.  Pour les techniciens, l'interface CGI a t tendue
        pour permettre le passage de paramtres en fonction du visiteur
        entre des scripts qui tournent sur diffrentes pages.
        ThreadTrack marque chaque visiteur du site avec un
        identificateur unique durant toute la visite La session de
        chaque visiteur est enregistre clic par clic, ainsi une base de
        donnes de l'activit individuelle et consolide est disponible.
        Des rapports intuitifs sont inclus, et les donnes (dBase III)
        sont facilement transfrables vers des paquetages de rapports
        spcifiques.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        Version de dmonstration totalement fonctionnelle 30 jours
        disponible  : http://www.webthreads.com

     CCoonnffiigguurraattiioonn OOSS ::
        Toute version de Linux sur x86, a.out et ELF.

     DDooccuummeennttaattiioonn ::
        Site web et en ligne fournies avec le paquetage.

     SSuuppppoorrtt pprroodduuiitt ::
        support e-mail.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Interface msql.  Option gestion d'enregistrement de sites.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juin 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        ThreadTrack  partir de USD 295.  WebTailor  partir de USD 895.

     VVeennddeeuurr ::
        Webthreads, L.L.C.


           1919 Gallows Road, 10th floor Vienna, VA 22182 tats-Unis.




     TTllpphhoonnee ::
        +1 703 848 9027

     FFaaxx ::
        +1 703 848 2444

     EE--mmaaiill ::
        info@webthreads.com

     UURRLL ::
        http://www.webthreads.com

     CCoonnttaacctt ::
        Gavin Sutcliffe

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        18 mars 1997.



  77..  BBaasseess ddee ddoonnnneess


  77..11..  cc--ttrreeee PPlluuss


     ddeessccrriippttiioonn ::
        Fond sur un algorithme avanc B+tree (quilibr), l'API c-tree
        Plus gre tous les aspects des entres/sorties de base de
        donnes.  Programmes mono-utilisateurs ou multi-utilisateurs
        sans serveur diffusables sans royalties, et migration
        d'application existantes c-tree Plus par recompilation.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Base par programmeur.  Diffusion mono-utilisateur, multi-
        utilisateurs ou multi-utilisateurs sans serveur sans royalties.
        Contactez FairCom pour les restrictions possibles : les bases de
        donnes gnralistes et les systmes de dveloppement
        d'applications sont interdits.

     CCoonnffiigguurraattiioonn OOSS ::
        3 Mo d'espace disque, 128 ko de RAM.

     DDooccuummeennttaattiioonn ::
        Manuels imprims fournis.  Documentation en ligne complte sur
        CD-ROM, disponible en anglais et japonais.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique complet trois mois  compter de la date
        d'achat.  Support technique illimit et mises  jour disponibles
        ensuite par le programme de maintenance c-tree Plus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 895 sources comprises.

     VVeennddeeuurr ::
        FairCom


           4006 W.Broadway Columbia, MO 65203-0100 tats-Unis.




     TTllpphhoonnee ::
        +1 573 445 6833

     FFaaxx ::
        +1 573 445 9698

     EE--mmaaiill ::
        Faircom@faircom.com

     UURRLL ::
        http://www.faircom.com


     CCoonnttaacctt ::
        Tamra Brown <tami@faircom.com>

     VVeennddeeuurr ::
        FairCom Europe


           Via Patrioti 6 I-24021 Albino Italie




     TTllpphhoonnee ::
        +39 35 773 464

     FFaaxx ::
        +39 35 773 806

     EE--mmaaiill ::
        Europe@faircom.com

     VVeennddeeuurr ::
        FairCom Japon


           Ikeda Bldg.
          #3 4F, 112-5 Komei-chou, Tsu-city MIE 514 Japon




     TTllpphhoonnee ::
        +81 059 229 7504

     FFaaxx ::
        +81 059 249 723

     VVeennddeeuurr ::
        FairCom do Brasil Ltda.

     TTllpphhoonnee ::
        +55 11 3872 9802

     FFaaxx ::
        +55 11 3862 1752

     EE--mmaaiill ::
        Brsil@faircom.com


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.


  77..22..  EEmmpprreessss


     ddeessccrriippttiioonn ::
        Empress pour Linux est un SGBD/R multimdia destin aux membres
        de la communaut Linux en augmentation rapide.  Les lments-
        clefs du paquetage comprennent le puissant SGBD/R Empress ainsi
        que dynamic SQL, Empress 4GL, Empress GUI Builder pour le
        dveloppement rapide d'interfaces homme-machine graphiques pour
        des applications Empress, un jeu d'outils HTML web, et une
        interface graphique "pointez et cliquez" de l'environnement de
        dveloppement du SGBD/R Empress.  Une version allge mono-
        utilisateur de ce produit, Personal Empress pour Linux est aussi
        disponible.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        Versions de dmonstrations disponibles par FTP.  Contactez
        imprativement le vendeur.

     CCoonnffiigguurraattiioonn OOSS ::
        Empress GUI Builder ncessite OSF Motif version 1.2.4 ou 2.0.
        16 Mo RAM.  80 Mo d'espace disque.  CPU 486 ou suivant.

     DDooccuummeennttaattiioonn ::
        Documentation imprime.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique complet payant.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Les autres possibilits offertes par le paquetage comprennent
        les bibliothques partages, la mmoire partage, les fonctions
        de bibliothque mathmatique et une interface avec le langage C.

     DDiissppoonniibbllee ddeeppuuiiss ::
        dcembre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Base par utilisateur simultan.  Contacter le vendeur.

     VVeennddeeuurr ::
        Empress Software Inc.


           6401 Golden Triangle Drive Greenbelt, MD 20770 tats-Unis.






           3100 Steeles Avenue East Markham, ON L3R 8T3 Canada




     TTllpphhoonnee ::
        +1 301 220 1919 (tats-Unis), +1 905 513 8888 (Canada)

     FFaaxx ::
        +1 301 220 1919 (tats-Unis), +1 905 513 1668 (Canada)

     EE--mmaaiill ::
        sales@empress.com

     UURRLL ::
        http://www.empress.com

     CCoonnttaacctt ::
        Dick Naedel


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  77..33..  EEsssseennttiiaa


     ddeessccrriippttiioonn ::
        Moteur de base de donnes.  Quelques fonctionnalits : bases
        distantes, client/serveur, contrle de cohrence automatique,
        sauvegardes incrmentales, miroir, shadowing, base distribue,
        journalisation, versions, RISE, SGBD objet, architecture
        client/serveur implmentant le modle relationnel trois tiers,
        serveurs coopratifs, indpendance de langue configurable au
        niveau utilisateur (anglais, espagnol, portugais).

     SSuuppppoorrtt ::
        DAT 4 mm, cartouche 8 mm, cartouche 150/525 Mo.  Version
        ducation  :

       ftp://ftp.inter-soft.com

       http://www.inter-soft.com/html/products/essentia

     SSyyssttmmee ddee lliicceennccee ::
        Commercial.  Version gratuite pour Linux.

     CCoonnffiigguurraattiioonn OOSS ::
        10 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Disponible en PostScript et HTML.

     SSuuppppoorrtt pprroodduuiitt ::
        Contacter essentia-info@inter-soft.com pour plus de
        renseignements.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        SQL Server, interface ODBC pour Windows, interface JDBC,
        serveurs utilisateurs.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1993.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Argentine, Brsil, Russie, Mexique, Venezuela et tats-Unis.

     OOrrddrree ddee pprriixx ::
        Version Linux gratuite (avec quelques restrictions).  Autres
        prix disponibles sur demande.

     VVeennddeeuurr ::
        InterSoft Argentine S.A.


           Crdoba 883 9th.
          Floor Capital Federal (1054) Argentine




     TTllpphhoonnee ::
        +54 1 318 8900

     FFaaxx ::
        +54 1 318 8997
     EE--mmaaiill ::
        info@inter-soft.com

     UURRLL ::
        http://www.inter-soft.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  77..44..  FFaaiirrCCoomm SSeerrvveerr


     ddeessccrriippttiioonn ::
        Moniteur transactionnel hautes performances multi-thread.  Parmi
        les fonctionnalits : traitement de transactions de qualit
        industrielle, comprenant le commit et le rollback intgraux ;
        points de sauvegarde intermdiaires et trace complte ; gestion
        automatique des traces ; reprise sur redmarrage/dsastre ; mots
        de passe utilisateurs ; administration de la scurit d'accs et
        en ligne ; verrous en lecture/criture aux niveaux
        enregistrement/clef individuelle, etc.


     SSuuppppoorrtt ::
        disquettes 3,5 pouces et CD-ROM.


     SSyyssttmmee ddee lliicceennccee ::
        Base par machine.  Contacter FairCom pour les questions
        spcifiques de licence.


     CCoonnffiigguurraattiioonn OOSS ::
        2 Mo de RAM.


     DDooccuummeennttaattiioonn ::
        Manuels imprims fournis avec le produit.  documentation en
        ligne complte sur CD-ROM, disponible en anglais et japonais.


     SSuuppppoorrtt pprroodduuiitt ::
        support technique complet trois mois  compter de la date
        d'achat.  Support technique illimit et mises  jour disponibles
        ensuite par le programme de maintenance serveur.


     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1995.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        USD 445-USD 6795 selon la plate-forme et le nombre
        d'utilisateurs.  Licences spciales et accords OEM disponibles.


     VVeennddeeuurr ::
        FairCom



     4006 W.
     Broadway Columbia,
     MO 65203-0100
     tats-Unis.





     TTllpphhoonnee ::
        +1 573 445 6833


     FFaaxx ::
        +1 573 445 9698


     EE--mmaaiill ::
        Faircom@faircom.com


     UURRLL ::
        http://www.faircom.com


     CCoonnttaacctt ::
        Tamra Brown <tami@faircom.com>


     VVeennddeeuurr ::
        FairCom Europe


           Via Patrioti 6 I-24021 Albino Italie





     TTllpphhoonnee ::
        +39 35 773 464


     FFaaxx ::
        +39 35 773 806


     EE--mmaaiill ::
        Europe@faircom.com


     VVeennddeeuurr ::
        FairCom Japon


           Ikeda Bldg.
          #3 4F, 112-5 Komei-chou, Tsu-city MIE 514 Japon





     TTllpphhoonnee ::
        +81 059 229 7504


     FFaaxx ::
        +81 059 249 723


     VVeennddeeuurr ::
        FairCom do Brasil Ltda.


     TTllpphhoonnee ::
        +55 11 3872 9802


     FFaaxx ::
        +55 11 3862 1752


     EE--mmaaiill ::
        Brsil@faircom.com


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.



  77..55..  IINNFFOORRMMIIXX--SSEE



     ddeessccrriippttiioonn ::
        INFORMIX-SE est un moteur de bases de donnes SQL pour des
        applications de petite  moyenne dimension.  C'est la solution
        idale pour les entreprises qui souhaitent la puissance du SQL
        sans les ncessits d'administration complexe de bases de
        donnes.  Avec plus de dix ans de fiabilit prouve, INFORMIX-SE
        est une rfrence dans le monde des serveurs de bases de donnes
        Unix.

        INFORMIX-ESQL/C : Productivit, souplesse, portabilit et
        standards sont ce  quoi les programmeurs peuvent atteindre avec
        l'utilisation d'INFORMIX-ESQL pour C.  Les dveloppeurs peuvent
        continuer  utiliser ces langages de troisime gnration
        familiers pour dvelopper des applications et bnficier des
        avantages de l'utilisation de SQL pour accder aux donnes
        depuis celles-ci.


     SSuuppppoorrtt ::
        CD-ROM et Internet (FTP).


     SSyyssttmmee ddee lliicceennccee ::
        Licence de dveloppement gratuite.  Les licences d'utilisation
        doivent tre acquises sparment.  Les informations concernant
        les deux licences sont disponibles sur
        http://www.informix.com/informix/solutions/linux/lx.html.


     CCoonnffiigguurraattiioonn OOSS ::
        Le processus serveur ncessite 1,2 Mo de RAM pour s'excuter, et
        peut tre install avec 6 Mo d'espace disque.


     DDooccuummeennttaattiioonn ::
        Documentation en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique annuel et contrats de maintenance du logiciel.


     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        TBD.


     DDiissppoonniibbllee ddeeppuuiiss ::
        22 juillet 1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        Pour avancer avec votre licence de dveloppement, Informix
        propose des contrats de maintenance  des prix attractifs au-
        travers du systme Informix-Assurance :
        http://www.informix.com/informix/services/csp/assurance/assurance.htm

     VVeennddeeuurr ::
        Informix Software, Inc.


     EE--mmaaiill ::
        sales@informix.com http://www.informix.com/cgi-bin/contact.pl


     UURRLL ::
        http://www.informix.com


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        21 septembre 1998.


  77..66..  JJuusstt LLooggiicc//SSQQLL


     ddeessccrriippttiioonn ::
        Systme de gestion de bases de donnes relationnelles

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        Runtime illimit fourni.

     DDooccuummeennttaattiioonn ::
        Manuel imprim, exemples.

     SSuuppppoorrtt pprroodduuiitt ::
        e-mail, fax ou tlphone.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::

       option client/serveur : permet d'excuter les applications sur
        plusieurs ordinateurs sous Windows ou Linux, avec accs  une
        base centrale sous Linux ;

       option web-enabling : passerelle entre un serveur HTTP et une
        base de donnes Just Logic/SQL.  Ni C ni Perl ncessaire.  Les
        commandes SQL sont directement incluses dans les fichiers HTML.
        Compatible avec Netscape, Apache, NCSA et tous les autres
        serveurs HTTP compatibles CGI.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1993.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 149-USD 395.

     VVeennddeeuurr ::
        Just Logic Technologies


          P.O. Box 63050,
          40 Commerce Street
          Nun's Island, Montral, QC H3E 1V6
          Canada




     TTllpphhoonnee ::
        +1 514 761 6887

     FFaaxx ::
        +1 514 642 6480

     EE--mmaaiill ::
        sales@justlogic.com

     UURRLL ::
        http://www.justlogic.com

     CCoonnttaacctt ::
        Luc Vallieres

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        5 aot 1997.


  77..77..  KKEE TTeexxpprreessss


     ddeessccrriippttiioonn ::
        KE Texpress est un moteur de base de donnes trs rapide qui
        supporte les structures et oprations objet, relationnelles et
        texte libre.  Il est particulirement adapt aux applications 
        jeux de donnes importants, oprations complexes et grand nombre
        d'utilisateurs concurrents.  KE Texpress est utilis pour une
        grande varit d'applications bases de donnes web.  Parmi les
        applications verticales, on trouve la gestion de collections,
        des systmes de bibliothques, des statistiques vitales, des
        archives, de la recherche de texte et de la gestion
        d'enregistrements.

     SSuuppppoorrtt ::
        InterNet (FTP et web) et cartouche.

     SSyyssttmmee ddee lliicceennccee ::
        Base par utilisateur simultan.  Version de dmonstration
        totalement fonctionnelle 30 jours disponible sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        bibliothques Linux ELF et a.out.  Ncessite environ 30 Mo
        d'espace disque.  Tourne sur plus de 20 autres varits d'Unix
        et sur Windows NT.

     DDooccuummeennttaattiioonn ::
        Documentation imprime et HTML disponible.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique annuel (e-mail, fax et tlphone) et contrats
        de maintenance logicielle.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::

       module Texhtml web - publie les bases KE Texpress sur le web ;

       Texql - langage SQL-like ;

       TexAPI - API avec bibliothques client pour Windows (C, C++ et
        VB), Unix et Macintosh Systme 7 ;

       TexODBC - pilotes ODBC pour Windows.

        KE Software dispose d'un grand service de consultants qui
        assiste les client dans le dveloppement d'applications bases de
        donnes KE Texpress.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1984.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis, Canada, Australie, Hong Kong, Japon et Malaisie.

     OOrrddrree ddee pprriixx ::
        USD 2 000  USD 100 000+.

     VVeennddeeuurr ::
        KE Software Inc.


           303-601 West Broadway Vancouver, BC V5Z 4C2 Canada




     TTllpphhoonnee ::
        +1 604 877 1960

     FFaaxx ::
        +1 604 877 1961

     EE--mmaaiill ::
        info@kesoftware.com

     UURRLL ::
        http://www.kesoftware.com

     CCoonnttaacctt ::
        Andrzej Kowalski

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  77..88..  QQddddbb



     ddeessccrriippttiioonn ::
        Qddb est un logiciel de bases de donnes rapide, puissant et
        flexible qui tourne sous Unix.  Parmi ses fonctionnalits : API
        Tcl/Tk, simplicit, une application base de donnes peut tre
        ralise en environ 5 minutes avec nxqddb.  Interface CGI pour
        des bases de donnes en ligne rapides et faciles.  Fonction de
        recherche rapide et puissante.  Gnrateur d'tats.  Graphiques
        et diagrammes.  Publipostage par e-mail, courrier et cartes
        postales.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, cartouche et InterNet (FTP et web).

     SSyyssttmmee ddee lliicceennccee ::
        Versions GNU et Commerciale disponibles.

     CCoonnffiigguurraattiioonn OOSS ::
        La version GNU est livre avec sources.  Paquetages binaires
        disponibles pour Linux, FreeBSD et BSD/OS(BSDI) -- formats rpm
        et kit d'installation.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne et fichiers PostScript disponibles.
        Manuels imprims aussi disponibles sur demande.

     SSuuppppoorrtt pprroodduuiitt ::
        Supports utilisateur et programmeur disponibles avec les
        contrats de mise  jour.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        API Tcl/Tk, interface CGI, gnrateur d'tats, de nombreuses
        applications libres et commerciales bties avec Qddb.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Voir http://www.hsdi.com/orders

     VVeennddeeuurr ::
        Herrin Software Dveloppement, Inc.


           41 South Highland Avenue Prestonsburg, KY 41653 tats-Unis.




     TTllpphhoonnee ::
        +1 606 886 8202

     FFaaxx ::
        +1 606 277 3239

     EE--mmaaiill ::
        info@hsdi.com

     UURRLL ::
        http://www.hsdi.com

     CCoonnttaacctt ::
        Eric Herrin

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 novembre 1997.


  77..99..  RRaaiimmaa DDaattaabbaassee MMaannaaggeerr++++


     ddeessccrriippttiioonn ::
        Moteur de bases de donnes bas niveau hautes performances avec
        API C bibliothque de classes C++,  inclure dans des
        applications.  Cette base de donnes est utilise dans des
        centaines d'applications commerciales.  Elle inclut le source de
        la bibliothque de classes C++ qui encapsule la navigation dans
        la base et le stockage d'objets ainsi que le rechargement dans
        des classes C++, ce qui ajoute une interface oriente objet.
        Elle supporte de multiples modles de bases de donnes, y
        compris relationnel, rseau et combin.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et cartouche.

     SSyyssttmmee ddee lliicceennccee ::
        Licence de dveloppement payante, runtime illimit.

     DDooccuummeennttaattiioonn ::
        Documentation tendue disponible auprs de Raima Corporation,
        couvrant tous les aspects de la base de donnes, de l'API C et
        de la bibliothque de classes C++.

     SSuuppppoorrtt pprroodduuiitt ::
        Disponible auprs de Raima Corporation sur une base annuelle,
        arrosage disponible.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        IHM Windows, gnrateur d'tats.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1984, initialement appele db_VISTA.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Direct aux tats-Unis, par distributeurs  l'international -
        Allemagne, Angleterre, France, Italie, Espagne, Pays-Bas,
        Russie, Estonie, Argentine, Colombie, Singapour, Malaisie,
        Australie, Finlande, Taiwan, autres pays.

     OOrrddrree ddee pprriixx ::
        Module base de donnes RDM++ mono-utilisateur USD 995, multi-
        utilisateurs USD 2 395.  System mono-utilisateur USD 1 395,
        multi-utilisateurs USD 3 395 (System inclut la base de donnes
        RDM++, l'outil de requtes QUERY SQL et l'outil de
        restructuration de base REVISE).  Sources payantes disponibles
        pour toutes versions.  Selon la classe de machine ;  partir de
        USD 3 995 sans les utilitaires systme ; USD 6 195 avec les
        utilitaires systme.

     VVeennddeeuurr ::
        Raima Corporation


           4800 Columbia Center 701 5th Avenue Seattle, WA 98104




     TTllpphhoonnee ::
        +1 800 327 2462, +1 206 515 9477
     FFaaxx ::
        +1 206 748 5200

     EE--mmaaiill ::
        sales@raima.com

     UURRLL ::
        http://www.raima.com

     CCoonnttaacctt ::
        Dave Morse

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        18 mars 1997.


  77..1100..  EEmmpprreessss EEmmbbeeddddeedd SSGGBBDD//RR


     ddeessccrriippttiioonn ::
        Le SGBD/R Empress Embedded est un jeu d'outils de dveloppement
        de systmes incorpors.  Le moteur SGBD/R est rapide, compact et
        facile  incorporer.  De plus, ce paquetage possde des
        capacits suprieures de gestion d'objets bruts.  Le SGBD/R
        Embedded Empress est adapt  InterNet via la passerelle
        JDBC/ODBC disponible.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        Contacter le vendeur pour des copies d'valuation.

     CCoonnffiigguurraattiioonn OOSS ::
        32 Mo de RAM, 60 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Documentation imprime.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique payant complet.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Les fonctionnalits supplmentaires fournies avec le jeu
        d'outils sont Empress Report Writer et enhanced InterNet
        capabilities (possibilit d'utiliser les applets Java, etc.) via
        le jeu d'outils HTML.

     DDiissppoonniibbllee ddeeppuuiiss ::
        janvier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
         partir de USD 1 000 pour PC, USD 4 000 pour les stations de
        travail, USD 16 000 pour les serveurs intermdiaires.

     VVeennddeeuurr ::
        Empress Software Inc.


           6401 Golden Triangle Drive Greenbelt, MD 20770 tats-Unis.



           3100 Steeles Avenue East Markham, ON L3R 8T3 Canada




     TTllpphhoonnee ::
        +1 301 220 1919 (tats-Unis), +1 905 513 8888 (Canada)

     FFaaxx ::
        +1 301 220 1919 (tats-Unis), +1 905 513 1668 (Canada)

     EE--mmaaiill ::
        sales@empress.com

     UURRLL ::
        http://www.empress.com

     CCoonnttaacctt ::
        Dick Naedel

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  77..1111..  SSOOLLIIDD SSeerrvveerr


     ddeessccrriippttiioonn ::
        SOLID Server est un moteur de bases de donnes pour de nouvelles
        applications et de nouveaux produits.  Il est extrmement facile
         configurer, et ncessite peu de ressources.  SOLID Server est
        standard et trs puissant.  Il est parfaitement adapt 
        l'utilisation distribue en copies non dcomptes.  Sa
        maintenance est sans problme, ncessitant peu ou pas de travail
        de l'administrateur.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et InterNet (FTP et web).

     SSyyssttmmee ddee lliicceennccee ::
        Protection contre la copie.

     CCoonnffiigguurraattiioonn OOSS ::
        Au moins 2 Mo de RAM, 8 Mo recommands.  Environ 3-4 Mo d'espace
        disque.

     DDooccuummeennttaattiioonn ::
        Manuels et aide en ligne en anglais.  web.

     SSuuppppoorrtt pprroodduuiitt ::
        Disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        SOLID Desktop USD 99, SOLID Server USD 199/machine, SOLID Web
        Engine USD 495.

     VVeennddeeuurr ::
        Solid Information Technology Ltd


      Huovitie 3 FIN-00400 Helsinki Finlande




     TTllpphhoonnee ::
        +358 9 477 4730

     FFaaxx ::
        +358 9 477 47 390

     EE--mmaaiill ::
        info@solidtech.com

     UURRLL ::
        http://www.solidtech.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  77..1122..  VVeelloocciiss DDaattaabbaassee SSeerrvveerr


     ddeessccrriippttiioonn ::
        Velocis Database Server est conu pour les dveloppeurs
        d'applications bases de donnes qui recherchent un moteur
        performant client/serveur ou web.  Velocis est un moteur de
        bases de donnes chelonnable client/Serveur SQL qui dispose
        d'un riche jeu de choix d'architecture et d'API y compris ANSI
        SQL, SQL C, C bas niveau, bibliothques de classes C++, et
        support d'API spcifiques.  Contrairement aux produits de bases
        de donnes client/serveurs habituels, Velocis supporte aussi
        bien les bases de modle relationnel que rseau  pointeurs dans
        toutes leurs combinaisons, aussi bien que le traitement de
        chaque ct de l'quation client/serveur.  Les choix de plates-
        formes multiples, API, localisation de traitement (client ou
        serveur), et de modle de base de donnes peuvent tre mlangs
        et combins pour satisfaire les besoins de performance de
        virtuellement n'importe quelle application.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et cartouche.

     SSyyssttmmee ddee lliicceennccee ::
        Licence de dveloppement.  Des runtimes sont ncessaires pour
        distribuer les applications.

     DDooccuummeennttaattiioonn ::
        Documentation extensive disponible auprs de Raima Corporation,
        couvrant tous les aspects de base de donnes, API C et
        bibliothque de classes C++.


     SSuuppppoorrtt pprroodduuiitt ::
        Disponible auprs de Raima Corporation sur base annuelle,
        arrosage disponible.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        IHM Windows, gnrateur d'tats, Gestionnaire d'objets Raima.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1993, initialement appel Raima Database Server.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.
     OOrrddrree ddee pprriixx ::
        1-8 utilisateurs : USD 1 995, 1-25 utilisateurs : USD 3 995,
        illimit : USD 8 995.

     VVeennddeeuurr ::
        Raima Corporation


           4800 Columbia Center 701 5th Avenue Seattle, WA 98104




     TTllpphhoonnee ::
        +1 800 327 2462, +1 206 515 9477

     FFaaxx ::
        +1 206 748 5200

     EE--mmaaiill ::
        sales@raima.com

     UURRLL ::
        http://www.raima.com

     CCoonnttaacctt ::
        Dave Morse

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 novembre 1997.


  77..1133..  YYaarrdd SSQQLL


     ddeessccrriippttiioonn ::
        YARD propose les produits suivant :

       YARD-SQL -- SGBD/R SQL client/serveur compatible X/Open XPG4 et
        ANSI SQL 92 avec support d'accs rseau  des bases distantes ;

       YARD-ESQLC -- Embedded SQL pour C ;

       YARD-ODBC -- interface ODBC pour clients MS Windows ;

       YARD-X -- client Motif pour accs aux bases de donnes (sans
        outil de dveloppement) ;

       YARD-JDBC -- interface Java.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        Numro de licence et clef d'activation pour chaque produit et
        installation avec licence par utilisateur.  Une dition Prive
        (limite  1 utilisateur et  une base de donnes de 5 Mo) est
        disponible pour usage priv non commercial et valuation  :
        ftp://ftp.yard.de.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux version ELF.  1 Mo de RAM (minimum) pour la mmoire
        partage, 500 ko par utilisateur.  Espace disque : YARD-SQL
        10 Mo, YARD-ESQLC 1 Mo, YARD-ODBC 1.5 Mo et YARD-X 5 Mo.


     DDooccuummeennttaattiioonn ::
        Manuel de rfrence et utilisateur de 600 pages imprim en
        allemand.  Documentation en anglais disponible au format
        PostScript.

     SSuuppppoorrtt pprroodduuiitt ::
        Sur demande.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Tous nos produits sont aussi disponibles pour les autres
        systmes Unix courants (i.e.  SCO Unix, SPARC Solaris, IBM, HP,
        SGI).

     DDiissppoonniibbllee ddeeppuuiiss ::
        janvier 1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Contacter YARD Software GmbH pour toute information sur les
        revendeurs.

     OOrrddrree ddee pprriixx ::
        Sur demande.

     VVeennddeeuurr ::
        YARD Software GmbH


           Wikingerstr.
          18 D-51107 Kln Allemagne




     FFaaxx ::
        +49 221 98664 99

     EE--mmaaiill ::
        yard@yard.de

     UURRLL ::
        http://www.yard.de

     FFTTPP ::
        ftp://ftp.yard.de

     CCoonnttaacctt ::
        Thomas Schonhoven <thomass@yard.de>

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  88..  VViissuuaalliissaattiioonn ddee ddoonnnneess eett CCAAOO


  88..11..  IIDDLL ((IInntteerraaccttiivvee DDaattaa LLaanngguuaaggee))


     ddeessccrriippttiioonn ::
        IDL est un logiciel puissant d'analyse et de visualisation de
        donnes et de dveloppement d'applications.  Les fonctionnalits
        d'IDL comportent : entres/sorties flexibles, dessin 2D,
        graphiques 3D, rendu volumique, traitement d'image,
        mathmatiques, statistiques, kit de dveloppement d'IHM trans-
        plate-forme, plus un langage de programmation de haut niveau
        orient tableaux.  IDL s'utilise pour l'analyse de donnes
        visuelle, le prototypage rapide ou le dveloppement
        d'applications.  Les programmes IDL, y compris leur IHM
        graphique, sont portables sur Linux, Windows 3.1, Windows 95,
        Windows NT, Mac, PowerMac, Unix et VMS.

        La version IDL tudiant est limite en fonctionnalits par
        rapport  IDL 5.0.  Elle est conue pour correspondre aux
        environnements d'enseignement en laboratoires, et donner accs
        aux tudiants  un logiciel spcifiquement dessin pour les
        cursus techniques, tels que physique, astronomie, gnie,
        sciences de la terre, mdicales ou informatiques.  Pour plus
        d'informations ou pour commander, consultez notre site web.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        CD-ROM de dmonstration gratuit disponible ou tlchargement par
        FTP.

     CCoonnffiigguurraattiioonn OOSS ::
        IDL 5.0 est compil sur le noyau 2.0.18 Linux et la distribution
        Red Hat version 4.0.  16 Mo RAM minimum recommand.  50 Mo
        d'espace disque.

     DDooccuummeennttaattiioonn ::
        Plus de 3 000 pages de documentation imprime et aide en ligne
        hypertexte.

     SSuuppppoorrtt pprroodduuiitt ::
        Service clientle, maintenance/mise  jour, formation et
        consulting sont disponibles.  De plus, un groupe Usenet est
        ddi  IDL.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        ENVI : application de traitement d'image  dtection  distance,
        Data Miner : accs aux bases de donnes ODBC, support HDF, CDF,
        NetCDF, animation, trancheur de volumes, cartographie haute
        rsolution intgrs.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Contactez le vendeur.

     OOrrddrree ddee pprriixx ::
        Contactez le vendeur/distributeur.

     VVeennddeeuurr ::
        Research Systems, Inc.


           2995 Wilderness Place
          Boulder, CO 80301
          tats-Unis.




     TTllpphhoonnee ::
        +1 303 786 9900

     FFaaxx ::
        +1 303 786 9909

     EE--mmaaiill ::
        info@rsinc.com

     UURRLL ::
        http://www.rsinc.com

     FFTTPP ::
        ftp://ftp.rsinc.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        5 novembre 1997.


  88..22..  MMeeggaahheeddrroonn


     ddeessccrriippttiioonn ::
        Un moteur graphique 3D flexible et puissant contrl par un
        langage interprt de haut niveau appel SMPL.  Avec lui, vous
        pouvez apprendre sur la 3D, crire vos propres simulations
        interactives, animations et lancer de rayons.  Vous pouvez mme
        crire votre propre ombreur, paramtrer les objets et
        dplacements procduraux, et utiliser jusqu' 64 ordinateurs
        simultanment pour le calcul rseau.  Comporte les excutables
        pour Windows 95, Windows NT x86 et Alpha, SGI Irix et Linux.

     SSuuppppoorrtt ::
        CD-ROM ISO-9660 et Rock Ridge.

     SSyyssttmmee ddee lliicceennccee ::
        Trs adaptable.  Le propritaire peut lancer autant de copies
        qu'il le peut, sur autant de plates-formes.  Version de
        dmonstration, documentation complte et exemples d'images et de
        scripts disponibles sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Supporte les noyaux 1.2.8 or 1.3.15.  Excutable non-ELF, a.out
        (QMAGIC).  16 Mo de RAM minimum recommand.  7 Mo d'espace
        disque recommand.

     DDooccuummeennttaattiioonn ::
        En HTML sur CDROM.

     SSuuppppoorrtt pprroodduuiitt ::
        Serveur de nouvelles priv, e-mail.  Corrections sur le site
        web.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Tout est inclus sur un seul CD-ROM.

     DDiissppoonniibbllee ddeeppuuiiss ::
        aot 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier, direct et par revendeurs.

     OOrrddrree ddee pprriixx ::
        USD 99

     VVeennddeeuurr ::
        Syndesis Corporation


           235 South main Street Jefferson, WI 53549 tats-Unis.


     TTllpphhoonnee ::
        +1 414 674 5200

     FFaaxx ::
        +1 414 674 6363

     EE--mmaaiill ::
        syndesis@threedee.com

     UURRLL ::
        http://www.threedee.com

     CCoonnttaacctt ::
        John Foust <jfoust@threedee.com>

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        3 novembre 1997.


  88..33..  TTeeccpplloott 77..00


     ddeessccrriippttiioonn ::
        Tecplot est un logiciel de visualisation de donnes interactif
        pour le dessin XY, graphique 2D et 3D, contour, vecteur et
        points ombrs (NdT : Que les spcialistes excusent la pauvret
        de la traduction:-(().  Pour plus d'informations, Voyez le site
        web Amtec Engineering.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        Licences individuelles (verrou par noeud) ou rseau.  Copies
        d'valuation disponibles sur CD-ROM ou par FTP anonyme.

     CCoonnffiigguurraattiioonn OOSS ::
        12 Mo minimum, Linux 1.2 ou suprieur (disponible en versions
        lies statiquement ou dynamiquement).  La version dynamique
        ncessite Motif 1.2 ou suprieur.  32 Mo RAM recommand.

     DDooccuummeennttaattiioonn ::
        Manuels utilisateur et de rfrence imprims, aide en ligne
        complte.  Anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Mise  jour et support technique inclus avec la licence pour les
        trois premiers mois.  Payant ensuite (demander EUSS).  Formation
        possible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        V7 depuis septembre 1996, V6 depuis aot 1993.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Nombreux, voir le site web Amtec.

     OOrrddrree ddee pprriixx ::
        USD 1 795 par licence individuelle, USD 2 395 par licence rseau
        mono-utilisateur, USD 1 795 par utilisateur supplmentaire.
        Prix pour les tats-Unis et le Canada seulement.

     VVeennddeeuurr ::
        Amtec Engineering, Inc



      PO Box 3633 Bellevue, WA 98009-3633 tats-Unis.




     TTllpphhoonnee ::
        +1 800 676 7568, +1 425 827 3304

     FFaaxx ::
        +1 425 827 3989

     EE--mmaaiill ::
        tecplot@amtec.com

     UURRLL ::
        http://www.amtec.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  88..44..  VVaarriiCCAADD


     ddeessccrriippttiioonn ::
        Systme de DAO mcanique disponible pour Linux, Windows 95 et
        Windows NT

        Le systme est quip avec toutes les ressources de base
        ncessaire pour le travail de gnie des constructeurs et
        dessinateurs.  Il inclut des fonction de modlisation 3D, dessin
        2D, dition, transformations, objets utilisateurs et cration de
        blocs, groupes et symboles.  Le systme entier est hautement
        paramtrable et largement ouvert.


     SSuuppppoorrtt ::
        CD-ROM, InterNet (web).


     SSyyssttmmee ddee lliicceennccee ::
        Version de dmonstration gratuite disponible sur notre site web


     CCoonnffiigguurraattiioonn OOSS ::
        Noyau version 2.0 ou suprieure, XFree version 3?1 ou
        suprieure, 16 Mo de RAM, 20 Mo d'espace disque et libc 5.4.


     DDooccuummeennttaattiioonn ::
        Aide en ligne en anglais.


     SSuuppppoorrtt pprroodduuiitt ::
        Nouvelle version tous les trois mois environ.


     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Gratuit des nouvelles versions pendant la premire anne.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1991.



     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        De USD 199  USD 499.


     VVeennddeeuurr ::
        VariCAD



          931 Greenbriar Avenue
          Ottawa, ON K2C 0J8
          Canada





     TTllpphhoonnee ::
        +1 613 723 5319


     FFaaxx ::
        +1 613 723 5319


     EE--mmaaiill ::
        mail@varicad.com


     UURRLL ::
        http://www.varicad.com


     CCoonnttaacctt ::
        Petr Placek

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        15 aot 1998.


  88..55..  VVAARRKKOONN


     ddeessccrriippttiioonn ::
        Un outil de dveloppement de haut niveau pour la DAO et les
        applications de modlisation de produits.  Modlisation
        paramtrique interactive en 2D et 3D avec base de donnes
        oriente objet.  DAO de haut niveau et langage de modlisation
        MoS inclus.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        Binaires libres pour Linux.

     CCoonnffiigguurraattiioonn OOSS ::
        Ncessite X mais pas Motif.  Besoins : 3 Mo d'espace disque pour
        l'installation de base et 3 Mo de RAM pour l'excution.

     DDooccuummeennttaattiioonn ::
        400 pages de documentation inclues dans la version libre pour
        Linux.

     SSuuppppoorrtt pprroodduuiitt ::
        Service de mise  jour en continu et consultation libre
        disponible pour USD 75/mois.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Pilotes de traceurs supplmentaires disponibles gracieusement.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        La version Linux est gratuite.

     VVeennddeeuurr ::
        Microform AB


           Henningsholmsgatan 4 S-703 69 Orebro Sude




     TTllpphhoonnee ::
        +46 19314932

     FFaaxx ::
        +46 19314969

     EE--mmaaiill ::
        info@microform.se

     UURRLL ::
        http://www.microform.se

     CCoonnttaacctt ::
        Johan Kjellander

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        5 fvrier 1997.


  88..66..  XXVVSSccaann


     ddeessccrriippttiioonn ::
        Logiciel de numrisation et de manipulation d'images pour
        numriseurs HP ScanJet.

     SSuuppppoorrtt ::
        InterNet (e-mail et FTP).  cartouche 4mm DDS2 DAT ou disquettes
        3,5 pouces (USD 15 de plus aux tats-Unis, USD 25 
        l'international).

     SSyyssttmmee ddee lliicceennccee ::
        XVScan est fond sur XV et n'est pas disponible en version de
        dmonstration pour des raisons de limites de licences.  Fourni
        avec code source complet.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux, test avec 1.2.x et 2.0.x, ncessite un pilote SCSI
        rcent (pas infrieur  1.1.79).  Motif n'est pas ncessaire.
        Toute version XFree (X11R5, X11R6).

     DDooccuummeennttaattiioonn ::
        En ligne, web, Anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Mises  jour gratuites la premire anne.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Aussi disponible pour HP-UX, BSD/OS 2.2 et 3.0, SunOS 4.1.x,
        Solaris 2.x et FreeBSD.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 50 pour envoi par FTP ou e-mail.  USD 15 de plus pour les
        mdia aux tats-Unis, USD 15  l'international.  Cartes
        accrditives Mastercard, Visa, Discover, et Amrican Express
        acceptes.

     VVeennddeeuurr ::
        tummy.com, ltd.


           3506 Stratton Drive Fort Collins, CO 80525-2722 tats-Unis.




     TTllpphhoonnee ::
        +1 970 223 8215

     FFaaxx ::
        +1 408 490 2728

     EE--mmaaiill ::
        xvscan@tummy.com

     UURRLL ::
        http://www.tummy.com/xvscan

     CCoonnttaacctt ::
        Sean Reifschneider <jafo@tummy.com> ou Evelyn Mitchell
        <efm@tummy.com>

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  99..  OOuuttiillss ddee ddvveellooppppeemmeenntt



  99..11..  AACCUUCCOOBBOOLL--GGTT


     ddeessccrriippttiioonn ::
        ACUCOBOL-GT est un systme de dveloppement COBOL ANSI-85 avec
        compilateur, bibliothque d'excution, dvermineur, outils de
        support et documentation.  Il offre l'indpendance matrielle du
        code source, une IHM graphique COBOL, des fonctionnalits
        client/serveur, le support du multi-thread et la flexibilit de
        la source de donnes.  De plus, ACUCOBOL-GT est compatible
        an 2 000.

     SSuuppppoorrtt ::
        Disquettes 3,5 pouces actuellement (un CD-ROM est prvu pour le
        deuxime trimestre 1998).

     SSyyssttmmee ddee lliicceennccee ::
        Une licence d'excution pour chaque application installe y
        compris les droits de licence pour chaque produit en copie
        d'valutation 30 jours est disponible sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux a.out et ELF. Test sur Linux Red Hat 4.1 avec noyau
        2.0.30.

     DDooccuummeennttaattiioonn ::
        Documentation imprime en anglais pour chaque produit, aide en
        ligne pour la version d'valuation web.

     SSuuppppoorrtt pprroodduuiitt ::
        Service de mise  jour pour 20% par an du prix de licence du
        produit.  Formations d'entranement aux produits de base
        (DDM 600 par jour  dates prdfinies).  Support technique
        inclus dans le service de mise  jour.

     DDiissppoonniibbllee ddeeppuuiiss ::
        fvrier 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 1 500 pour un systme de dveloppement mono-utilisateur
        (Linux), USD 300 par dveloppeur supplmentaire, tarifs de
        diffusion d'excutables sur demande (prix variables selon la
        forme du contrat).

     VVeennddeeuurr ::
        (Allemagne) Acucobol Deutschland GmbH


          Otto-Hahn-Str. 9
          D-61381 Friedrichsdorf
          Allemagne




     TTllpphhoonnee ::
        +49 6175 93310

     FFaaxx ::
        +49 6175 1429

     EE--mmaaiill ::
        aschmidt@acucobol.de

     CCoonnttaacctt ::
        Annette Schmidt


     VVeennddeeuurr ::
        (tats-Unis) Acucobol, Inc.


     7950 Silverton Avenue, Suite #201
     San Diego, CA 92126
     tats-Unis




     TTllpphhoonnee ::
        +1 800 COBOL 85, +1 619 6897220

     FFaaxx ::
        +1 619 566 3071

     EE--mmaaiill ::
        info@acucobol.com

     UURRLL ::
        http://www.acucobol.com

     CCoonnttaacctt ::
        Jeff Freedman

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        1er novembre 1997.



  99..22..  AAmmzzii!! SSeerrvveeuurr PPrroolloogg && LLooggiicc


     ddeessccrriippttiioonn ::
        Amzi! permet l'intgration aise de composants intelligents avec
        des applications conventionnelles, autorisant des bases logiques
        proposant des avis, la configuration et l'ajustement de
        systmes, le diagnostic de problmes, l'application de rgles
        professionnelles, le contrle de processus et l'interprtation
        de documents.  Votre application accde  une base logique de
        rgles exactement comme  des enregistrements de base de
        donnes.  Les rgles sont exprimes en Prolog, un langage qui
        dispose de puissantes possibilits de recherche.  Le serveur
        logique Amzi! est encapsul comme une classe C++ et comme API C.
        Vous pouvez ajouter vos propres fonctions Prolog en C/C++.
        Comprend : compilateur, serveur, dvermineur, diteur de liens,
        excutables, gnrateur, API d'appels bidirectionnels du
        serveur, documentation complte, tutoriel Prolog intuitif et des
        quantits d'exemples de code.

     SSuuppppoorrtt ::
        InterNet.

     SSyyssttmmee ddee lliicceennccee ::
        L'dition Professionnelle comprend une licence illimite.
        L'dition Personnelle est limite  la distribution
        d'application non-commerciales.

     CCoonnffiigguurraattiioonn OOSS ::
        Environ 350 ko de RAM pour une petite application, 3-4 Mo
        d'espace disque.

     DDooccuummeennttaattiioonn ::
        Format HTML, y compris le tutoriel Prolog complet.

     SSuuppppoorrtt pprroodduuiitt ::
        Les service Subscription Plus comprend les mises  jour
        automatiques pour un an, USD 198.  Services de dveloppement
        spcifique disponibles.
     LLiinnuuxx SSuuppppoorrtt::
        Pas de systme Linux inclus.  Pour Amzi!, support technique
        gratuit par tlphone, fax et e-mail.

     DDiissppoonniibbllee ddeeppuuiiss ::
        3 novembre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        dition personnelle, USD 49 (Shareware).  dition
        Professionnelle, USD 298.

     VVeennddeeuurr ::
        Amzi! inc.


           40 Samuel Prescott Drive Stow, MA 01775 tats-Unis.




     TTllpphhoonnee ::
        +1 508 897 7332

     FFaaxx ::
        +1 508 897 2784

     EE--mmaaiill ::
        info@amzi.com

     UURRLL ::
        http://www.amzi.com

     CCoonnttaacctt ::
        Mary Kroening

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  99..33..  BBaassmmaarrkk QQuuiicckkBBAASSIICC


     ddeessccrriippttiioonn ::
        Le compilateur Basmark QuickBASIC est un compilateur BASICA,
        MoASIC et Microsoft QuickBASIC multi-utilisateurs conu pour
        apporter des performances et un comportement homogne sur
        diffrentes machines (i.e. i386 et i486, Pentium, SPARC,
        RS/6000, HP PA-RISC) sous Unix, AIX, SunOS, Linux, HP-UX et
        Xenix.

     SSuuppppoorrtt ::
        InterNet.

     SSyyssttmmee ddee lliicceennccee ::
        Base par machine, sans limitation d'excution.

     CCoonnffiigguurraattiioonn OOSS ::
        GNU GAS et LD doivent tre installs.

     DDooccuummeennttaattiioonn ::
        Manuel de plus de 400 pages, notes de version et d'installation
        disponibles en version imprime pour USD 50 (plus frais
        d'envoi).
     SSuuppppoorrtt pprroodduuiitt ::
        Mises  jour disponibles pour USD 139 moins frais d'envoi.
        Contrats de maintenance disponibles.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Interface C-ISAM (Informix Inc.) en source C pour USD 35.

     DDiissppoonniibbllee ddeeppuuiiss ::
        dcembre 1993.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 195 (moins frais d'envoi)

     VVeennddeeuurr ::
        Basmark Corporation


           P.O.
          Box 40450 Cleveland, OH 44140 tats-Unis.




     TTllpphhoonnee ::
        +1 216 871 8855

     FFaaxx ::
        +1 216 871 9011

     EE--mmaaiill ::
        jgo@basmark.com (pour commander)

     UURRLL ::
        http://www.basmark.com

     CCoonnttaacctt ::
        Joseph O'Toole (pour commander)

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 novembre 1997.


  99..44..  MMaassssee CCrriittiiqquuee CCMM33


     ddeessccrriippttiioonn ::
        Compilateur et environnement d'excution de dveloppement de
        systmes.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        Commercial avec source des bibliothques, licences d'valuation
        disponibles par tlchargement  : http://www.cmass.com/cm3.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux/ELF.

     DDooccuummeennttaattiioonn ::
        En ligne.


     SSuuppppoorrtt pprroodduuiitt ::
        Optionnel.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Voir http://www.cmass.com/cm3

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis.

     OOrrddrree ddee pprriixx ::
        USD 479/site.

     VVeennddeeuurr ::
        Critical Mass, Inc.


           Critical Mass, Inc.
          225R Concord Avenue Cambridge, MA 02138 tats-Unis.




     TTllpphhoonnee ::
        +1 617 354 6277

     FFaaxx ::
        +1 617 354 5027

     EE--mmaaiill ::
        info@cmass.com

     UURRLL ::
        http://www.cmass.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        19 mai 1997.


  99..55..  DDyynnaaccee


     ddeessccrriippttiioonn ::
        Dynace (prononcer "dynastie" sans le "t") est un ensemble
        prprocesseur, fichiers include et bibliothque qui tend le
        langage C avec des fonctionnalits objet avances, ramasse-
        miettes automatique et multi-threading.  Dynace est capable
        d'ajouter des fonctionnalits disponibles auparavant seulement
        dans des langages comme Smalltalk et CLOS sans toute la
        surcharge habituellement associe  ces environnements.

     SSuuppppoorrtt ::
        InterNet (web) y compris tout le code source.

     SSyyssttmmee ddee lliicceennccee ::
        Une licence par programmeur ; les applications sont libres  la
        diffusion.  Le systme complet se trouve  :
        http://www.edge.net/algorithms.  Libre pour usage non
        commercial.

     CCoonnffiigguurraattiioonn OOSS ::
        Tout Linux.


     DDooccuummeennttaattiioonn ::
        310 pages en Postscript, HP PCL, ou TeX DVI.

     SSuuppppoorrtt pprroodduuiitt ::
        Dynace-support@edge.net

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Systme de dveloppement Windows complet.

     DDiissppoonniibbllee ddeeppuuiiss ::
        dcembre 1993.

     OOrrddrree ddee pprriixx ::
        USD 599.

     VVeennddeeuurr ::
        Algorithms Corporation


           3020 Liberty Hills Drive Franklin, TN 37067 tats-Unis.




     TTllpphhoonnee ::
        +1 800 566 8991, +1 615 791 1636

     FFaaxx ::
        +1 615 791 7736

     EE--mmaaiill ::
        blake@edge.net

     UURRLL ::
        http://www.edge.net/algorithms

     CCoonnttaacctt ::
        Blake McBride

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  99..66..  AAbbssoofftt FFOORRTTRRAANN 7777


     ddeessccrriippttiioonn ::
        Compilateur et dvermineur ANSI FORTRAN 77 compatible VAX/VMS.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        licence mono-utilisateur ; paquetages multi-utilisateurs
        disponibles.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2.13.

     DDooccuummeennttaattiioonn ::
        Plus de 300 pages de documentation papier.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique gratuit.


     DDiissppoonniibbllee ddeeppuuiiss ::
        mars 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 525-USD 2 000.

     VVeennddeeuurr ::
        Absoft Corporation


           2781 Bond Street Rochester Hills, MI 48309 tats-Unis.




     TTllpphhoonnee ::
        +1 248 853 0050

     FFaaxx ::
        +1 248 853 0108

     EE--mmaaiill ::
        sales@absoft.com

     UURRLL ::
        http://www.absoft.com

     CCoonnttaacctt ::
        Wood Lotz

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.


  99..77..  FFiinneessssee


     ddeessccrriippttiioonn ::
        IHM graphique OSF/Motif pour les scripts shell.

     SSuuppppoorrtt ::
        InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        Finesse est un produit entirement commercial pour les Unix
        lorsqu'une licence par noeud est possible.  La version Linux est
        librement disponible  : FTP.  Le support disquette est 
        DDM 90.

     CCoonnffiigguurraattiioonn OOSS ::
        Bibliothques ELF.  X11R6.  Motif non ncessaire.

     DDooccuummeennttaattiioonn ::
        Fichier PostScript.

     SSuuppppoorrtt pprroodduuiitt ::
        Aucun support pour la version libre.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.
     OOrrddrree ddee pprriixx ::
        Dmonstration gratuite.  Version commerciale avec support sur
        demande.

     VVeennddeeuurr ::
        science + computing GmbH


           Hagellocher Weg 71 D-72070 Tbingen Allemagne




     TTllpphhoonnee ::
        +49 7071 9457 0

     FFaaxx ::
        +49 7071 9457 27

     EE--mmaaiill ::
        info@science-computing.de

     UURRLL ::
        http://www.science-computing.de

     FFTTPP ::
        ftp://ftp.science-computing.de/pub/finesse.

     CCoonnttaacctt ::
        Olaf Flebbe

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        25 fvrier 1997.


  99..88..  IISSEE EEiiffffeell


     ddeessccrriippttiioonn ::
        ISE Eiffel est un environnement de dveloppement orient objet.
        ISE Eiffel fournit une solution complte pour les dveloppeurs
        de logiciels avec de pures mthodes orientes objet, de
        l'analyse et de la conception  la gnration de code, la
        maintenance et la rtro-ingnierie.  Les composants d'ISE Eiffel
        sont : EiffelBench, EiffelBase, EiffelBuild, EiffelVision,
        EiffelLex, EiffelParse, EiffelNet, EiffelStore, ObjEdit,
        EiffelCase, EiffelMath, EiffelWeb, DLE (dition de liens
        dynamique avec Eiffel) et SCOOP (mcanisme de
        distribution/concurrence).

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP et web)

     SSyyssttmmee ddee lliicceennccee ::
        Aucune charge de distribution pour les produits, commerciaux ou
        autres, dvelopps avec la technologie d'ISE.  Pour le cas des
        produits commerciaux, nous exigeons simplement que le produit et
        sa documentation mentionnent clairement ISE Eiffel.  Le
        copyright doit faire mention de l'utilisation/incorporation de
        ISE Eiffel par la mention (a) Fonctionnalits "ISE Eiffel"
        (NdT : la validit lgale de la traduction n'est pas garantie)
        clairement visible dans la documentation du produit, et (b) une
        fentre logicielle ou un message jaillissant "ISE Eiffel" (NdT :
        la validit lgale de la traduction n'est pas garantie)
        clairement visible durant le processus d'installation du produit
        faisant mention du copyright.
     CCoonnffiigguurraattiioonn OOSS ::
        Linux ELF ou a.out.

     DDooccuummeennttaattiioonn ::
        Documentation imprime.  Aide en ligne complmentaire.

     SSuuppppoorrtt pprroodduuiitt ::
        service de mise  jour, maintenance, formation disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        aot 1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
         partir de USD 99.

     VVeennddeeuurr ::
        Interactive Software Engineering, Inc.


           ISE Building
          270 Storke Road, 2nd Floor
          Goleta, CA 93117
          tats-Unis.




     TTllpphhoonnee ::
        +1 805 685 1006

     FFaaxx ::
        +1 805 685 6869

     EE--mmaaiill ::
        info@eiffel.com

     UURRLL ::
        http://www.eiffel.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        3 octobre 1997.


  99..99..  EEiiffffeellBBeenncchh


     ddeessccrriippttiioonn ::
        Outil CASE orient objet.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP et web).

     SSyyssttmmee ddee lliicceennccee ::
        Aucune charge de distribution pour les produits, commerciaux ou
        autres, dvelopps avec la technologie d'ISE.  Pour le cas des
        produits commerciaux, nous exigeons simplement que le produit et
        sa documentation mentionnent clairement ISE Eiffel.  Le
        copyright doit faire mention de l'utilisation/incorporation de
        ISE Eiffel par la mention (a) Fonctionnalits "ISE Eiffel"
        (NdT : la validit lgale de la traduction n'est pas garantie)
        clairement visible dans la documentation du produit, et (b) une
        fentre logicielle ou un message jaillissant "ISE Eiffel" (NdT :
        la validit lgale de la traduction n'est pas garantie)
        clairement visible durant le processus d'installation du produit
        faisant mention du copyright.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux ELF ou a.out.

     DDooccuummeennttaattiioonn ::
        Eiffel : l'environnement.

     SSuuppppoorrtt pprroodduuiitt ::
        service de mise  jour, maintenance, formation disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        aot 1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
         partir de USD 99.

     VVeennddeeuurr ::
        Interactive Software Engineering, Inc.


           ISE Building
          270 Storke Road, 2nd Floor
          Goleta, CA 93117
          tats-Unis.




     TTllpphhoonnee ::
        +1 805 685 1006

     FFaaxx ::
        +1 805 685 6869

     EE--mmaaiill ::
        info@eiffel.com

     UURRLL ::
        http://www.eiffel.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        3 octobre 1997.


  99..1100..  IIddeeaaFFiixx


     ddeessccrriippttiioonn ::
        L'environnement de dveloppement d'applications InterSoft sous
        Unix (ou IdeaFix  InterSoft Developpement Environment of
        Applications For unIX), est un ensemble d'outils de
        dveloppement conu pour constituer un environnement intgr
        aussi bien pour les programmeurs que pour les utilisateurs.  Le
        but d'IdeaFix est de maximiser les performances et la
        productivit dans les deux cas.  Pour l'utilisateur final,
        IdeaFix fournit une interface agrable et un systme d'aide en
        ligne.  IdeaFix fournit au dveloppeur des outils qui
        simplifient le dveloppement de critres de conception tels que
        les bases relationnelles et la programmation structure
        modulaire.

     SSuuppppoorrtt ::
        4/8 mm.  DAT, cartouche 150/525 Mo.  Version enseignement
        disponible  :

       ftp://ftp.inter-soft.com/pub/ideafix

       http://www.inter-soft.com/html/products/ideafix

     SSyyssttmmee ddee lliicceennccee ::
        Commercial.

     CCoonnffiigguurraattiioonn OOSS ::
        20 Mo d'espace disque, et compilateur GNU C/C++.

     DDooccuummeennttaattiioonn ::
        Disponible en PostScript.

     SSuuppppoorrtt pprroodduuiitt ::
        Contact ideafix-info@inter-soft.com pour plus d'informations.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        SQL server, environnement de dveloppement Dali, Cracker pour
        Windows.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1986.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Argentine, Brsil, Russie, Mexique, Vnzula et tats-Unis.

     OOrrddrree ddee pprriixx ::
        Versions Linux libres (avec quelques restrictions).  Autres prix
        disponibles sur demande.

     VVeennddeeuurr ::
        InterSoft Argentine S.A.


           Crdoba 883 9th.
          Floor Capital Federal (1054) Argentine




     TTllpphhoonnee ::
        +54 1 318 8900

     FFaaxx ::
        +54 1 318 8997

     EE--mmaaiill ::
        info@inter-soft.com

     UURRLL ::
        http://www.inter-soft.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  99..1111..  jj--ttrreeee


     ddeessccrriippttiioonn ::
        Bnficiez de la puissance de clients Java tout en maintenant
        une base de donnes consolides sur un grand nombre de systmes
        d'exploitation.  L'API Java associe aux fonctionnalits ISAM c-
        tree Plus permet des fonctionnalits Java au travers de mthodes
        natives/RMI.  j-tree utilise la puissance/flexibilit de toute
        la gemme de serveurs de bases de donnes FairCom.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        Une licence de c-tree Plus, puis dploiement libre.

     CCoonnffiigguurraattiioonn OOSS ::
        2 Mo de RAM.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne complte sur CD-ROM, disponible en
        anglais et japonais.

     SSuuppppoorrtt pprroodduuiitt ::
        Trois mois de support technique complet  compter de la date
        d'achat.

     DDiissppoonniibbllee ddeeppuuiiss ::
        aot 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Sur demande.

     VVeennddeeuurr ::
        FairCom


           4006 W.
          Broadway Columbia, MO 65203-0100 tats-Unis.




     TTllpphhoonnee ::
        +1 573 445 6833

     FFaaxx ::
        +1 573 445 9698

     EE--mmaaiill ::
        Faircom@faircom.com

     UURRLL ::
        http://www.faircom.com

     CCoonnttaacctt ::
        Tamra Brown <tami@faircom.com>

     VVeennddeeuurr ::
        FairCom Europe


           Via Patrioti 6 I-24021 Albino Italie





     TTllpphhoonnee ::
        +39 35 773 464

     FFaaxx ::
        +39 35 773 806

     EE--mmaaiill ::
        Europe@faircom.com

     VVeennddeeuurr ::
        FairCom Japon


           Ikeda Bldg.
          #3 4F, 112-5 Komei-chou, Tsu-city MIE 514 Japon




     TTllpphhoonnee ::
        +81 059 229 7504

     FFaaxx ::
        +81 059 249 723

     VVeennddeeuurr ::
        FairCom do Brasil Ltda.


     TTllpphhoonnee ::
        +55 11 3872 9802


     FFaaxx ::
        +55 11 3862 1752

     EE--mmaaiill ::
        Brsil@faircom.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        9 aot 1997.


  99..1122..  KKAAII CC++++


     ddeessccrriippttiioonn ::
        Le compilateur KAI C++ est conforme au dernier standard, hautes
        performances, faible cot d'abstraction, syntaxe et
        bibliothques identiques sur toutes les plates-formes supportes
        et support client de haut niveau.  Aucun autre compilateur n'est
        aussi proche du standard.

     SSuuppppoorrtt ::
        InterNet (FTP et web).

     SSyyssttmmee ddee lliicceennccee ::
        Commercial.  Version d'valuation gratuite 30 jours disponible
        sur http://www.kai.com/kcc_howto.shtml

     CCoonnffiigguurraattiioonn OOSS ::
        Red Hat Linux 2.1 ou suprieur.  Autres logiciels : gcc 2.7.2.1.
        15 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne complte fournie.
     SSuuppppoorrtt pprroodduuiitt ::
        Support technique gratuit.  Le service de support annuel
        comprend les mises  jour automatiques pour une anne complte,
        USD 79.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 395 monoprocesseur ; USD 545 multiprocesseur.

     VVeennddeeuurr ::
        Kuck & Associates, Inc.


           1906 Fox Drive Champaign, IL  61820-7345 tats-Unis.




     TTllpphhoonnee ::
        +1 217 356 2288

     FFaaxx ::
        +1 217 356 5199

     EE--mmaaiill ::
        kai@kai.com

     UURRLL ::
        http://www.kai.com/kcc_howto.shtml

     CCoonnttaacctt ::
        Bruce Leasure <bruce@kai.com>

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        14 juillet 1997.


  99..1133..  KKhhoorrooss PPrroo 22..11


     ddeessccrriippttiioonn ::
        Khoros Pro 2.2 est un environnement de dveloppement logiciel
        muni de fonctions avances de traitement d'image, dveloppement
        logiciel, et visualisation de donnes.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        La licence mono-utilisateur est incluse dans le CD-ROM Khoros
        Pro.  Licences disponibles pour les dveloppeurs et
        indpendants.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.18, gcc 2.7.2, compilateur FORTRAN f2c 19951025+ AT&T
        Bell Labs.

     DDooccuummeennttaattiioonn ::
        Documentation imprime ; Guides d'installation et utilisateur
        sur CD-ROM.  Jeu de cinq manuels du dveloppeur disponibles
        auprs de KRI.
     SSuuppppoorrtt pprroodduuiitt ::
        Formations dveloppement logiciel et traitement numrique
        d'images prvues en 1998.  Voir
        http://www.khoral.com/formation/formation.html.  Maintenance,
        support technique et de dveloppement payants auprs de KRI.

     DDiissppoonniibbllee ddeeppuuiiss ::
        aot 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.  Tarif ducation via Addison Wesley.

     OOrrddrree ddee pprriixx ::
        Khoros Pro 2.2 mono-utilisateur  USD 549.  licences indpendant
         partir de USD 5 000 en fonction de la plate-forme et de la
        structure organisationnelle.  Accords de distribution payants.

     VVeennddeeuurr ::
        Khoral Research Inc.


           6001 Indian School NE Suite 200 Albuquerque, NM 87110 tats-Unis.




     TTllpphhoonnee ::
        +1 505 837 6500

     FFaaxx ::
        +1 505 881 3842

     EE--mmaaiill ::
        info@khoral.com

     UURRLL ::
        http://www.khoral.com

     FFTTPP ::
        ftp://ftp.khoral.com

     CCoonnttaacctt ::
        Annie MacFarlane <annie@khoral.com>

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  99..1144..  MMeettaaCCaarrdd


     ddeessccrriippttiioonn ::
        MetaCard est un outil de dveloppement d'IHM graphiques
        multimdia compatible avec HyperCard d'Apple Corporation.
        Chacun peut utiliser MetaCard pour btir des applications
        graphiques et des documents hypermdia  l'aide d'un diteur
        puissant, par manipulation directe et d'un langage de script
        facile  apprendre.

        MetaCard dpasse HyperCard par l'inclusion de contrles en
        couleur et d'images, de graphiques vectoriels, ascenseurs et
        botes de dialogue.  Le langage de script MetaCard supporte les
        tableaux, les proprits spcifiques (utilisateur), et est fond
        sur la technologie du "compilateur virtuel" hautes performances.
        Les piles dveloppes avec MetaCard sont portables sur toutes
        les plates-formes Unix classiques et Windows 95/NT et peuvent
        tre diffuses sans limite.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et InterNet (FTP et e-mail).

     SSyyssttmmee ddee lliicceennccee ::
        La licence MetaCard est attribue  un utilisateur individuel
        nomm, mais peut tre utilise sur toute machine ou combinaison
        de machines par cet utilisateur.  Des paquetages multi-
        utilisateurs sont aussi disponibles.

        La distribution de dmonstration (sauvegarde dsactive) est
        disponible par FTP anonyme  : ftp://ftp.metacard.com/MetaCard
        et ftp://ftp.uu.net/vendor/MetaCard.

     CCoonnffiigguurraattiioonn OOSS ::
        Le moteur Linux est bti autour d'un systme 1.2.13 ELF.
        Minumum 8 Mo RAM pour l'excution, 16 Mo RAM pour le
        dveloppement.  Rsolution minimum 640x480x8 pour l'excution,
        800x600x8 pour le dveloppement.  Le systme de dveloppement
        ncessite environ 5 Mo d'espace disque.  GUI est compatible
        Motif, mais ne ncessite pas les bibliothques Motif.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne complte fournie.  Documentation imprime
        en option payante.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique e-mail gratuit, support tlphonique payant
        disponible.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Une version bibliothque de MetaCard directement linkable  des
        programmes C (Embedded MetaCard) est disponible en option
        payante.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juin 1992.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Licence de dveloppement mono-utilisateur toutes plateformes :
        USD 995.

     VVeennddeeuurr ::
        MetaCard Corporation


           4710 Shoup pl.
          Boulder, CO 80303 tats-Unis.




     TTllpphhoonnee ::
        +1 303 447 3936

     FFaaxx ::
        +1 303 499 9855

     EE--mmaaiill ::
        info@metacard.com


     UURRLL ::
        http://www.metacard.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  99..1155..  OObbjjeeccttMMaannuuaall RReelleeaassee 33..00


     ddeessccrriippttiioonn ::
        Gnrateur automatique de documentation de programmes C++.
        Gnre de la documentation en diffrents formats, y compris
        HTML, RTF, MIF ainsi que classes Java.

     SSuuppppoorrtt ::
        InterNet (FTP et web).

     SSyyssttmmee ddee lliicceennccee ::
        Licences mono-, multi-utilisateurs, site et flottante.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux ELF.

     DDooccuummeennttaattiioonn ::
        Fournie en PostScript avec la distribution.

     SSuuppppoorrtt pprroodduuiitt ::
        Gratuit 30 jours.  Ensuite, par cycle contractuel de six mois 
        un an.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Une nouvelle version par trimestre.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis.

     OOrrddrree ddee pprriixx ::
        USD 2 295 pour la plupart des Unix.  Gratuit pour les
        utilisateurs Linux en environnement non commercial.

     VVeennddeeuurr ::
        ObjectSoftware, Inc.


           3519 Misty Meadow Drive
          Dallas, TX 75287
          tats-Unis.




     TTllpphhoonnee ::
        +1 214 373 2021

     FFaaxx ::
        +1 972 662 0756

     EE--mmaaiill ::
        objsoft@netcom.com

     UURRLL ::
        http://www.obsoft.com
     CCoonnttaacctt ::
        Bobby Sardana

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        30 septembre 1997.


  99..1166..  CCrriittiiccaall MMaassss RReeaaccttoorr


     ddeessccrriippttiioonn ::
        Environnement distribu de dveloppement d'applications.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Commercial avec source des bibliothques, licences d'valuation
        disponibles  la vente.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux/ELF.

     DDooccuummeennttaattiioonn ::
        Documentation complte incluse (imprime et en ligne)

     SSuuppppoorrtt pprroodduuiitt ::
        Optionnel.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Voir
        http://www.cmass.com/reactor/overview/index.html#reactor_features

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis.

     OOrrddrree ddee pprriixx ::
        USD 479-USD 3 500/site.  Remises pour usages non commerciaux et
        ducation.

     VVeennddeeuurr ::
        Critical Mass, Inc.


           Critical Mass, Inc.
          225R Concord Avenue Cambridge, MA 02138 tats-Unis.




     TTllpphhoonnee ::
        +1 617 354 6277

     FFaaxx ::
        +1 617 354 5027

     EE--mmaaiill ::
        info@cmass.com

     UURRLL ::
        http://www.cmass.com


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        19 mai 1997.


  99..1177..  RReessoouurrccee SSttaannddaarrdd MMeettrriiccss


     ddeessccrriippttiioonn ::
        Un outil de mesure de code source et d'analyse qualitative pour
        C et C++.  Il effectue des mesures standard comme le nombre de
        lignes de code, la complexit cyclomatique et l'analyse
        fonctionnelle.  Cet outil est portable sur la plupart des
        principaux systmes d'exploitation.  L'analyse qualitative
        contrle des erreurs smantiques que de nombreux compilateurs
        manquent et renforce les standard de dveloppement logiciel.

     SSuuppppoorrtt ::
        Le logiciel peut tre charg sur notre site web ou envoy par e-
        mail ou encore sur disquettes aux formats tar et ZIP.

     SSyyssttmmee ddee lliicceennccee ::
        Licence de partagiciel pour la version de dmonstration qui
        traite un fichier.  Les licences commerciales mono-utilisateur
        et rseau traitent n'importe quel nombre de fichiers de toute
        taille depuis les caractres jokers de la ligne de commande,
        depuis une liste ou en descendant rcursivement une arborescence
        de rpertoires.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2.

     DDooccuummeennttaattiioonn ::
        Documentation complte incluse (imprime et en ligne). Anglais
        seulement.

     SSuuppppoorrtt pprroodduuiitt ::
        1 support e-mail. Maintenance logicielle de 1 an disponible.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Certaines licences sont fournies avec le code source non
        modifiable pour compilation sur un systme spcifique.  Chaque
        version est livre avec un outil d'impression amliore et un
        utilitaire de conversion DOS vers Unix.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mars 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        De USD 99,99 pour une licence mono-utilisateur sans code source
        jusqu' USD 999,95 pour une licence site rseau.

     VVeennddeeuurr ::
        M Squared Technologies


           2128 Hidden Pine Lane
          Apopka, FL 32712
          tats-Unis.





     TTllpphhoonnee ::
        +1 407 880 2627

     FFaaxx ::
        +1 407 880 2627

     EE--mmaaiill ::
        m2tech@reachus.com

     UURRLL ::
        http://www.m2tech.net

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        25 septembre 1998.


  99..1188..  rr--ttrreeee


     ddeessccrriippttiioonn ::
        Gnrateur d'tats r-tree en source C.

        Ralise des tats complexes, multi-lignes en tenant compte de
        virtuellement tous les aspects de la gnration d'tats.  Le
        seul besoin en programmation est l'appel de la fonction report
        de r-tree, qui lit les fichiers de donnes c-tree, effectue les
        calculs, supervise les ruptures et totaux et ralise l'tat
        format.  Complet avec source C.  Ncessite c-tree Plus.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Base par programmeur.  Contacter FairCom pour les restrictions
        possibles.

     DDooccuummeennttaattiioonn ::
        Manuels imprims fournis avec le produit ; documentation en
        ligne complte sur CD-ROM, disponible en anglais et japonais.

     SSuuppppoorrtt pprroodduuiitt ::
        Trois mois de support technique complet  compter de la date
        d'achat.  Support technique illimit et mises  jour disponibles
        ensuite via le programme de maintenance r-tree.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 445.

     VVeennddeeuurr ::
        FairCom


           4006 W.
          Broadway Columbia, MO 65203-0100 tats-Unis.




     TTllpphhoonnee ::
        +1 573 445 6833
     FFaaxx ::
        +1 573 445 9698

     EE--mmaaiill ::
        Faircom@faircom.com

     UURRLL ::
        http://www.faircom.com

     CCoonnttaacctt ::
        Tamra Brown <tami@faircom.com>

     VVeennddeeuurr ::
        FairCom Europe


           Via Patrioti 6 I-24021 Albino Italie




     TTllpphhoonnee ::
        +39 35 773 464

     FFaaxx ::
        +39 35 773 806

     EE--mmaaiill ::
        Europe@faircom.com

     VVeennddeeuurr ::
        FairCom Japon


           Ikeda Bldg.
          #3 4F, 112-5 Komei-chou, Tsu-city MIE 514 Japon




     TTllpphhoonnee ::
        +81 059 229 7504

     FFaaxx ::
        +81 059 249 723

     VVeennddeeuurr ::
        FairCom do Brasil Ltda.


     TTllpphhoonnee ::
        +55 11 3872 9802


     FFaaxx ::
        +55 11 3862 1752

     EE--mmaaiill ::
        Brsil@faircom.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.




  99..1199..  ssddoocc ((SSoouurrccee DDooccuummeenntteerr))


     ddeessccrriippttiioonn ::
        Ce programme aide  la ralisation de documentation complte et
        indexe  partir de sources (C, tcl, Perl actuellement
        disponible, d'autres suivront bientt).  Vous ajoutez des
        informations  vos scripts  l'aide de pod (Plain old
        documentation -- bonne vieille documentation), le format de
        documentation utilis par Perl.  Les options de documentation
        fournies par pod sont simples et aises  apprendre, mais
        suffisamment puissantes pour crer des documents de belle
        allure.  sdoc utilise cette information pour crer un document
        pod qui,  son tour, peut tre transform en HTML, LaTeX (et
        PostScript), nroff ou texte simple.  La fonction de
        prvisualisation de tdoc vous permet de crer la documentation
        interactivement - ajouter ou modifier vos insertions dans le
        fichier source et contrler la validit du rsultat.  Quelques
        points majeurs :

       la documentation est fournie en source, aucun fichier spar
        n'est ncessaire ;

       options de formatage puissantes combines  un apprentissage
        ais ;

       une documentation de belle allure peut tre cre sans fatigue ;

       indexation automatique ;

       rsultat possible en HTML, PostScript et de nombreux autres
        formats (jetez un coup d'oeil  la page de man de perlpod ou aux
        convertisseurs pod).

        Le documenteur Tcl est aussi disponible en version commerciale.
        Celle-ci ajoute les fonctionnalits suivantes :

       significativement plus rapide ;

       utilisation possible de Netscape pour la prvisualisation ;

       inclut le concept de paquetage pour l'automatisation de la
        slection de fichiers ;

       connexion directe  emacs pour l'dition de fichiers ;

       cration directe en PostScript ;

       support complet, mises  jour ;

       documentation complte.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et InterNet (e-mail et web).

     SSyyssttmmee ddee lliicceennccee ::
        version domaine public de sdoc disponible sur l'archive tcl de
        neosoft :

       http://www.neosoft.com/tcl/ftparchive/sorted/dveloppement

       ftp://ftp.neosoft.com/pub/tcl/sorted/dveloppement

     CCoonnffiigguurraattiioonn OOSS ::
        Systme ELF avec X11.

     DDooccuummeennttaattiioonn ::
        Aide sensible au contexte et documentation complte au format
        Pod.  Disponible en PostScript sur demande.

     SSuuppppoorrtt pprroodduuiitt ::
        Support d'installation inclus, support complmentaire
        disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter softWorks pour les dtails de tarification.  Remises
        ducation.

     VVeennddeeuurr ::
        softWorks, Richard Schwaninger


           Theodor-Krnerstr.
          173 A-8010 Graz Autriche




     TTllpphhoonnee ::
        +43 316 686590

     FFaaxx ::
        +43 316 686590

     EE--mmaaiill ::
        risc@ping.at

     UURRLL ::
        http://members.ping.at/risc

     CCoonnttaacctt ::
        Richard Schwaninger

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.


  99..2200..  SSEEDDIITT,, SS//RREEXXXX


     ddeessccrriippttiioonn ::
        SEDIT est un puissant diteur qui ressemble au XEDIT d'IBM.  Il
        fonctionne sous X window ou en mode caractre.  S/REXX est une
        implmentation Unix complte du langage procdural SAA d'IBM, 
        la diffrence que la spcification numrique est limite 
        15 chiffres.  S/REXX fonctionne comme un macro-langage intgr
        pour SEDIT aussi bien que comme un puissant langage de
        programmation moderne en alternative  un langage de script
        shell.  SEDIT et S/REXX sont disponibles en paquetage ou
        sparment.  Voir notre site web pour plus d'informations, y
        compris les tarifs pour Linux, etc.  Pour d'autres informations,
        contactez l'un des distributeurs locaux cits sur le site web,
        ou crivez-nous  : sedit@dialup.FranceNet.fr

     SSuuppppoorrtt ::
        4mm, 8 mm, quart de pouce ou disquettes 3,5 pouces et InterNet
        (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        SEDIT et S/REXX sont des produits commerciaux.  Voir le site web
        ci-dessus pour les dtails.  Pour les besoins de dmonstration,
        une licence provisoire sera fournie sur demande  quiconque
        charge le produit par FTP.

     CCoonnffiigguurraattiioonn OOSS ::
        Nous pensons que ces produits doivent fonctionner avec tout
        noyau Linux rcent (depuis 1.1.18) supportant le format a.out.
        Motif est inclus totalement dans SEDIT et SEDIT est distribu
        avec les bibliothques partages XFree86 3.1.

     DDooccuummeennttaattiioonn ::
        La documentation est fournie en PostScript, en fichiers complets
        d'aide en ligne, et en manuels imprims optionnels.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique disponible pour tous les utilisateurs
        enregistrs.  Pour la maintenance, voir les URL ci-dessus.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Un dvermineur interactif graphique REXX est disponible en
        option comme les manuels imprims, les supports physiques et la
        maintenance.  Voir les URL ci-dessus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        La version Linux originelle est disponible depuis le troisime
        trimestre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.  voir les URL ci-dessus pour l'information  jour.

     OOrrddrree ddee pprriixx ::
        Les informations tarifaires doivent tre demandes au
        distributeur local responsable de votre pays.  Une licence
        conomique 2 utilisateurs est disponible pour Linux sans mdia
        ni documentation imprime avec d'autres options pour plus
        d'utilisateurs, S/REXX, manuels, etc.

     VVeennddeeuurr ::
        Benaroya


           31 Rue de Constantinople F-75008 Paris France




     TTllpphhoonnee ::
        +33 1 47 22 22 13

     FFaaxx ::
        +33 1 47 22 06 17

     EE--mmaaiill ::
        sedit@dialup.FranceNet.fr

     UURRLL ::
        http://www.sedit.com

     CCoonnttaacctt ::
        Robert Benaroya


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  99..2211..  SSNNiiFFFF++


     ddeessccrriippttiioonn ::
        SNiFF+ est un environnement de programmation ouvert,
        chelonnable et multi-plates-formes pour C/C++, Java, CORBA IDL
        et FORTRAN.  Le but principal de SNiFF+ tait de crer un
        environnement de programmation efficace et portable avec une IHM
        confortable et un support spcial pour la programmation oriente
        objet.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        Licence d'essai disponible.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2 ou 2.0.

     DDooccuummeennttaattiioonn ::
        Documentation imprime et version HTML.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Extensions disponibles pour d'autres langages de programmation.

     VVeennddeeuurr ::
        TakeFive Software GmbH


           Jakob-Haringer-Strae 8 A-5020 Salzburg Autriche




     TTllpphhoonnee ::
        +43 662 4579150

     FFaaxx ::
        +43 662 4579156

     EE--mmaaiill ::
        info@takefive.co.at

     UURRLL ::
        http://www.takefive.co.at

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        3 novembre 1997.


  99..2222..  SSTT//XX ((SSmmaallllttaallkk//XX))


     ddeessccrriippttiioonn ::
        ST/X est une implmentation complte du langage de programmation
        Smalltalk avec un environnement de dveloppement qui fournit
        tous les avantages que l'on puisse attendre du langage
        Smalltalk : un langage totalement orient objet, un
        environnement de dveloppement graphique avec diteurs,
        tableurs, dvermineur symbolique, compilateur incrmental et
        compilation juste--temps en code machine aussi bien qu'une
        bibliothque de classes complte.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Licences non-commerciales, d'valuation et commerciales
        disponibles.  Version de dmonstration sur InterNet, assez
        ancienne, qui doit tre mise  jour courant 1997.

     CCoonnffiigguurraattiioonn OOSS ::
        ST/X ncessite 32 Mo ou plus de RAM et 100 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        La documentation de ST/X est disponible en ligne en hypertexte
        (HTML).

     SSuuppppoorrtt pprroodduuiitt ::
        eXept Software AG fournit assistance, formation, et consulting.
        Support sur site disponible.  Service de mise  jour et de
        maintenance pour la licence commerciale.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        ST/X inclut un compilateur en code machine supplmentaire et la
        possibilit d'intgrer du code C directement dans les mthodes
        Smalltalk.  Cela permet l'exploitation et l'utilisation de
        bibliothques existantes ou l'amlioration des performances dans
        les oprations critiques.  Intgr dans ST/X se trouve un
        butineur HTML totalement implment en Smalltalk.  Il supporte
        les applets et scripts Smalltalk intgrs dans des pages HTML.
        Cela permet le dveloppement d'application InterNet et Intranet
        de manire analogue  celle de Java.

     DDiissppoonniibbllee ddeeppuuiiss ::
        ST/X est disponible depuis assez longtemps en version bta.
        eXept Software AG a dvelopp et commercialis ST/X ensuite
        depuis 1996.  Claus Gittinger (le dveloppeur de ST/X) est
        membre fondateur de eXept.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Licences non-commerciales, valuation et commerciales
        disponibles.  Licence commerciale  USD 3 500.  Licence
        d'valuation de six mois  USD 350.  Licence non commerciale 
        USD 150 plus frais de port et d'emballage.

     VVeennddeeuurr ::
        eXept Software AG


           Besigheimerstr.
          1 D-74369 Lchgau Allemagne




     TTllpphhoonnee ::
        +49 7143 870045

     FFaaxx ::
        +49 7143 870048

     EE--mmaaiill ::
        info@exept.de
     UURRLL ::
        http://home.t-online.de/home/exept

     CCoonnttaacctt ::
        David Queeney

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        5 aot 1997.


  99..2233..  ttddbb ((TTccll DDvveerrmmiinneeuurr))


     ddeessccrriippttiioonn ::
        Dvermineur pour scripts tcl.  Il permet le dverminage
        interactif de programmes tcl/tk et acclre le cycle de
        dveloppement.  Points majeurs :

       excution pas  pas avec points d'arrt ;

       affichage et manipulation de variables locales et globales ;

       modifications de code source  la vole et redmarrages rapides
        de programme ;

       interface utilisateur graphique facile  utiliser ;

       configuration et installation aises.

        La version commerciale ajoute les fonctionnalits suivantes :

       affichage de contexte plein cran ;

       lien direct avec l'diteur (actuellement emacs) ;

       Scripting et extensions utilisateur (tcl) ;

       support de plugin (script, popup) ;

       beaucoup plus rapide ;

       support complet, mises  jour ;

       documentation complte.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et InterNet (e-mail et web)

     SSyyssttmmee ddee lliicceennccee ::
        version domaine public de tdb disponible sur l'archive tcl de
        neosoft :

       http://www.neosoft.com/tcl/ftparchive/sorted/development

       ftp://ftp.neosoft.com/pub/tcl/sorted/development

     CCoonnffiigguurraattiioonn OOSS ::
        Systme ELF avec X11.

        Notez que tdb ncessite des modifications aux bibliothques C
        tcl et dpend aussi du chargement dynamique.  Consultez le
        paquetage info pour plus de dtails.  tcl n'est pas ncessaire
        pour utiliser le dvermineur, tout le code ncessaire est
        inclus.

        La version commerciale est disponible en source et le support de
        portage vers d'autres plates-formes est disponible.  Contactez
        softWorks pour les dtails.

     DDooccuummeennttaattiioonn ::
        Aide sensible au contexte et documentation complte au format
        HTML.  Disponible en PostScript sur demande.

     SSuuppppoorrtt pprroodduuiitt ::
        Aide  l'installation incluse, support additionnel disponible.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Dvermineur-PlugIns pour les tches de dverminages spcialises
        (e.g.  pour dverminer les hirarchies de widget tk) est aussi
        disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 450 pour une version binaire, USD 750 pour le source, remise
        ducation de 10%.

     VVeennddeeuurr ::
        softWorks, Richard Schwaninger


           Theodor-Krnerstr.
          173 A-8010 Graz Autriche




     TTllpphhoonnee ::
        +43 316 686590

     FFaaxx ::
        +43 316 686590

     EE--mmaaiill ::
        risc@ping.at

     UURRLL ::
        http://members.ping.at/risc

     CCoonnttaacctt ::
        Richard Schwaninger

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.


  99..2244..  ttpprrooff ((TTccll PPrrooffiilleerr))


     ddeessccrriippttiioonn ::
        Profileur pour scripts tcl.  Il permet la cration de donnes de
        profil pour les programmes tcl ainsi que l'analyse et
        l'inspections dtailles par une prsentation graphique.  Cet
        outil est particulirement adapt si l'on rencontre des
        problmes de performances avec les scripts tcl.  Plutt que de
        rcrire toute l'application en C, il est possible d'isoler les
        procdures critiques et de les acclrer (en utilisant C si
        ncessaire).  Points majeurs :
       affichage des flux d'appels ;

       graphiques de nombres d'appels, temps CPU et temps rel ;

       tableau du jeu de donnes de profil ;

       analyse conjointe de procdures tcl et de commandes C ;

       IHM graphique facile d'utilisation ;

       aquisition simplifie de donnes de profil ;

       configuration et installation aises.

        tprof est disponible aussi bien dans le domaine public et en
        version commerciale.  La version commerciale ajoute les
        fonctionnalits suivantes :

       _z_o_o_m sur les sous-ensembles de donnes intressants ;

       impression des jeux de donnes ;

       images PostScript (eps) des graphiques et tableaux ;

       concatnation de jeux de donnes multiples ;

       export de jeux de donnes  diffrents formats (i.e. sc/xspread,
        Wingz, DBase, texte) ;

       beaucoup plus rapide ;

       support complet, mises  jour ;

       documentation complte.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, InterNet (e-mail et web).

     SSyyssttmmee ddee lliicceennccee ::
        La version domaine public de tprof est disponible sur
        sunsite.unc.edu et ses miroirs.

     CCoonnffiigguurraattiioonn OOSS ::
        systme ELF avec X11.

     DDooccuummeennttaattiioonn ::
        Aide sensible au contexte et documentation complte au format
        HTML.  Disponible en PostScript sur demande.

     SSuuppppoorrtt pprroodduuiitt ::
        Aide  l'installation incluse, support additionnel disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter softWorks pour les dtails et remises.

     VVeennddeeuurr ::
        softWorks, Richard Schwaninger



      Theodor-Krnerstr.
     173 A-8010 Graz Autriche




     TTllpphhoonnee ::
        +43 316 686590

     FFaaxx ::
        +43 316 686590

     EE--mmaaiill ::
        risc@ping.at

     UURRLL ::
        http://members.ping.at/risc

     CCoonnttaacctt ::
        Richard Schwaninger

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.


  99..2255..  VViieeww DDeessiiggnnoorr//XX ((VVDDXX))


     ddeessccrriippttiioonn ::
        Gnrateur d'interfaces Motif qui gnre du code C et C++.  VDX
        fournit un affichage tel cran/tel crit, un navigateur d'arbre
        des widget, un diteur de ressources, des prototypes de widget
        et d'autres outils de conception d'interfaces utilisateur.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        Version de dmonstration gratuite.  Clefs de licence payantes
        supprimant les limitations de la version de dmonstration.
        Trois types de licences sont disponibles : entreprise, poste et
        tudiant.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux, ELF, X11R6, Libc.5, 5 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Aide en ligne, anglais.  Manuel PostScript, anglais. Une version
        allemande du manuel est disponible.

     SSuuppppoorrtt pprroodduuiitt ::
        Mises  jour mineures (1.x vers 1.x) gratuites.  Support e-mail
        gratuit.

     DDiissppoonniibbllee ddeeppuuiiss ::
        dcembre 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        DDM 800 (approximativement USD 470), Mise  jour majeure (1.x
        vers 2.x) DDM 500 (approximativement USD 295).

     VVeennddeeuurr ::
        Bredex GmbH
           Fallersleber-Tor-Wall 23 D-38100 Braunschweig Allemagne




     TTllpphhoonnee ::
        +49 531 24 33 00

     FFaaxx ::
        +49 531 24 33 099

     EE--mmaaiill ::
        info@bredex.de

     UURRLL ::
        http://www.bredex.de

     CCoonnttaacctt ::
        Regina Heine

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        13 octobre 1997.


  99..2266..  XXBBaassiicc


     ddeessccrriippttiioonn ::
        XBasic est un environnement de dveloppement de programmes
        visuels intuitifs qui intgre un puissant diteur, un
        compilateur BASIC 32/64 bits avanc, un dvermineur et les
        outils de conception d'IHM et graphique.  XBasic est entirement
        crit en XBasic.

     SSuuppppoorrtt ::
        InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        Base par machine.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux (ELF 1.2.13 ou suprieur).

     DDooccuummeennttaattiioonn ::
        Manuel de plus de 300 pages (format Word).

     SSuuppppoorrtt pprroodduuiitt ::
        USD 3 par minute.

     DDiissppoonniibbllee ddeeppuuiiss ::
        janvier 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 195.

     VVeennddeeuurr ::
        Basmark Corporation


          P.O. Box 40450
          Cleveland, OH 44140
          tats-Unis.

     TTllpphhoonnee ::
        +1 216 871 8855

     FFaaxx ::
        +1 216 871 9011

     EE--mmaaiill ::
        jgo@basmark.com

     UURRLL ::
        http://www.basmark.com

     CCoonnttaacctt ::
        Joseph G. O'Toole

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 novembre 1997.


  99..2277..  XXMMoovvee 44..00 ppoouurr LLiinnuuxx


     ddeessccrriippttiioonn ::
        XMove est un paquetage logiciel de conception, prototypage et
        test d'IHM graphique de systme logiciel fond sur des valeurs 
        modification dynamique.  Le nom XMove est aussi l'abrviation de
        "X Window System Meter Object Visualization and Editing Tool"
        (Outil systme X-Window de visualisation et d'dition d'objets
        de mtrique - NdT : Ouf !).  Systme X Window : XMove est
        totalement fond sur le standard X Window.  XMove a t
        spcifiquement conu pour ce standard d'IHM graphiques.  Dans de
        nombreuses applications, XMove peut tre utilis en complment
        d'OSF/Motif.  Objets de mtrique : l'objet de mtrique est la
        rfrence aux fonctions dynamiques de XMove.  A l'aide de Xmove,
        l'utilisateur peut affecter des attributs dynamiques  tout
        objet graphique en complment de la dfinition de son
        comportement statique.  Visualisation : indique que l'affichage
        et la manipulation des graphiques spcifiques de l'application,
        qui peuvent tre conus interactivement avec XMove, sont
        raliss par XMove pendant l'excution de l'application.  Outil
        d'dition : indique les possibilits interactives de cration
        des lments graphiques spcifiques de l'application statiques
        et dynamiques  l'aide des diteurs XMove.  XMove gnre le code
        C++ ncessaire pour dvelopper l'application de manire trs
        simple dans le systme X-Window.  XMove est un systme de
        dveloppement graphique orient objet.

     SSuuppppoorrtt ::
        CD-ROM, InterNet (e-mail et web).

     DDooccuummeennttaattiioonn ::
        Manuels PostScript inclus dans le paquetage.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mars 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     TTaarriiffiiccaattiioonn ((EEuurrooppee,, AAssiiee,, AAuussttrraalliiee)) ::

       USD 6 000 (y compris diteur et bibliothques).

       USD 3 500 (diteur seul)


       USD 3 500 (bibliothques seules)

      TTaarriiffiiccaattiioonn((AAmmrriiqquuee))::

       USD 5 000 (y compris diteur et bibliothques).

       USD 3 000 (diteur seul)

       USD 3 000 (bibliothques seules)

     VVeennddeeuurr ::
        Future Technologies


           Via B.
          Cairoli, 1 I-33170 Pordenone Italie




     TTllpphhoonnee ::
        +39 434 20 91 07

     FFaaxx ::
        +39 434 20 95 10

     EE--mmaaiill ::
        info@futuretg.com

     UURRLL ::
        http://www.futuretg.com

     CCoonnttaacctt ::
        Giovanni A.  Orlando

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        12 aot 1997.


  1100..  EEmmuullaattiioonn


  1100..11..  EEmmuulluuss


     ddeessccrriippttiioonn ::
        Emulus est une application X-Window/Motif qui s'appuie sur
        TCP/IP pour tablir une connexion vers un hte grand systme
        IBM, en mulation 3270.  Emulus supporte les graphiques grand
        systme, y compris les extensions flux de donnes graphiques
        3270 utilises par le logiciel grand systme SAS.  Parmi les
        autres fonctionnalits, on trouve le paramtrage par des
        dialogues, une fonction de script d'enregistrement et excution
        de sessions hte, EasyPads (fentres de boutons paramtres), et
        le copier/coller entre Emulus et d'autres applications X.
        Emulus est aussi fourni avec Helplus, un outil d'aide hypertexte
        modlis de manire similaire  celle de WinHelp.  Il est
        utilis pour fournir une aide en ligne  Emulus, mais peut aussi
        tre utilis pour dvelopper une aide pour d'autres applications
        X.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Base par CPU.
     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2 ou suprieur, 8-16 Mo RAM, 5 Mo d'espace disque ;
        Motif li statiquement.

     DDooccuummeennttaattiioonn ::
        Manuel imprim, pages de man, aide en ligne, anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique de l'institut SAS.

     OOrrddrree ddee pprriixx ::
        USD 99 ; comprend la documentation imprime et le support
        technique pour un an.

     VVeennddeeuurr ::
        SAS Institute Inc.


           SAS Campus Drive Cary, NC 27513 tats-Unis.




     TTllpphhoonnee ::
        +1 919 677 8000

     FFaaxx ::
        +1 919 677 8166

     EE--mmaaiill ::
        saspjh@unx.sas.com

     UURRLL ::
        http://www.sas.com

     CCoonnttaacctt ::
        Phil Herold

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  1100..22..  EExxeeccuuttoorr 22


     ddeessccrriippttiioonn ::
        Executor 2 Permet  votre systme Linux d'excuter de nombreuses
        applications Macintosh, y compris les logiciels commerciaux tels
        qu'Adobe Photoshop et Illustrator, Quark XPress, Microsoft Word,
        Excel et Quicken, ainsi qu'une grande quantit de sharewares,
        freewares et dmonstrations Macintosh.  Une base de
        compatibilit est disponible sur notre site web.  Executor 2
        vous permet aussi de lire et crire les mdia formats pour
        Macintosh sans perte des importantes mta-donnes telles que le
        type et le crateur du fichier.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Logiciel commercial avec version de dmonstration limite dans
        le temps disponible sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux/X et Linux/SVGAlib.

     DDooccuummeennttaattiioonn ::
        Mini-manuel de 30 pages dans le coffret du CD-ROM, informations
        complmentaires disponibles sur notre site web et dans le groupe
        de nouvelles comp.emulators.mac.executor.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Chaque CD-ROM Executor 2 contient Executor/DOS et
        Executor/Linux.  Vous pouvez passer de l'un  l'autre, mais ne
        pouvez utiliser qu'un seul d'entre eux  la fois.

     OOrrddrree ddee pprriixx ::
        Prix conseill : USD 249.  Tarif ducation : USD 149, tarif
        tudiants : USD 65.

     VVeennddeeuurr ::
        ARDI


          Suite 4-101
          1650 University Boulevard, NE
          Albuquerque, NM 87102
          tats-Unis.




     TTllpphhoonnee ::
        +1 505 766 9115

     FFaaxx ::
        +1 505 766 5153

     EE--mmaaiill ::
        questions@ardi.com

     UURRLL ::
        http://www.ardi.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 novembre 1997.


  1100..33..  WWaabbii 22..22 ppoouurr OOppeennLLiinnuuxx


     ddeessccrriippttiioonn ::
        Caldera a port et diffuse sous licence la technologie Wabi de
        SunSoft qui permet d'excuter les principales applications
        Windows 3.1 sur des systmes Linux.  Caldera Wabi 2.2 pour Linux
        peut tre utilis sur Caldera OpenLinux, un environnement
        ouvert, pour grer  distance des application Windows 3.1 
        domicile, au travail ou en dplacement.  Les socits
        partenaires qui crent des solutions clefs en mains fondes sur
        des environnements comme SCO OpenServer 5 ou Windows NT peuvent
        maintenant utiliser la solution Wabi/COL pour augmenter leurs
        revenus par la rduction du cot global et des besoins systme.
        Le prix conseill de Wabi 2.2 pour Linux est de USD 199.  Le
        produit ncessite Linux sur un processeur Intel 386 (ou
        suprieur), 16 Mo RAM (24 Mo recommand), vido VGA et 10 Mo
        d'espace disque.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Base par utilisateur.  Ni shareware, ni FTP.
     CCoonnffiigguurraattiioonn OOSS ::
        Fonctionne sur Caldera Network Desktop et OpenLinux.

     DDooccuummeennttaattiioonn ::
        En ligne et manuel imprim.

     SSuuppppoorrtt pprroodduuiitt ::
        Support d'installation de 30 jours par e-mail et tlphone.

     DDiissppoonniibbllee ddeeppuuiiss ::
        18 novembre 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        47 pays dans le monde ; voir notre site web pour la liste des
        revendeurs.

     OOrrddrree ddee pprriixx ::
        USD 199 et licences additionnelles  USD 179.  Tarif tudiant
        USD 149 et licences additionnelles  USD 129.

     VVeennddeeuurr ::
        Caldera, Inc.


           633 S.
          550 E.
          Provo, UT 84606 tats-Unis.




     TTllpphhoonnee ::
        +1 800 850 7779, +1 801 377 7687

     FFaaxx ::
        +1 801 377 8752

     EE--mmaaiill ::
        orders@caldera.com

     UURRLL ::
        http://www.caldera.com

     CCoonnttaacctt ::
        Nathan Hatch

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        14 novembre 1997.


  1111..  LLooggiicciieellss ffiinnaanncciieerrss


  1111..11..  BBBB SSttoocckk PPrroo eett BBBB SSttoocckk TTooooll


     ddeessccrriippttiioonn ::
        BB Stock Pro et BB Stock Tool sont des outils de suivi et
        d'analyse de stocks pour investisseurs.  Les fonctionnalits
        incluent la reprsentation de stocks, l'analyse technique, le
        timing du march et la gestion de portefeuille.  De plus, il
        dispose d'alertes ajustables, la dtection et la gestion
        automatique de scission de stocks, l'affichage cran des stocks,
        des lments les plus actifs et des fortes variations de prix,
        d'une liste de points de contrles personnalise, excution
        automatique et mise  jour aise par InterNet soit par connexion
        directe, soit derrire un pare-feu via un serveur proxy.

     SSuuppppoorrtt ::
        InterNet (FTP et web).

     SSyyssttmmee ddee lliicceennccee ::
        Base par machine.  Une version d'valuation gratuite de 30 jours
        est disponible sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0 ELF.

     DDooccuummeennttaattiioonn ::
        Aide en ligne sensible au contexte, et manuel utilisateur en
        HTML, visualisable par un butineur web.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique gratuit.  Foire aux questions et rponses
        disponibles sur notre site web.

     DDiissppoonniibbllee ddeeppuuiiss ::
        Version Sun SPARC disponible depuis dcembre 1993.  Version
        Linux disponible depuis avril 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis, Canada, Sude, Allemagne, Singapour, Malaisie,
        Taiwan.

     OOrrddrree ddee pprriixx ::
        Version Linux  USD 99.

     VVeennddeeuurr ::
        Falkor Technologies


           P.O.
          Box 14201 Fremont, CA 94539 tats-Unis.




     TTllpphhoonnee ::
        +1 510 505 0700

     EE--mmaaiill ::
        skyline@falkor.com

     UURRLL ::
        http://www.falkor.com

     CCoonnttaacctt ::
        Henry Chen

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        18 mars 1997.


  1111..22..  TTiimmeeCClloocckk


     ddeessccrriippttiioonn ::
        Paquetage pointeuse de temps de travail et de visiteurs pour
        PME.  Comprend un module d'tats paramtrables, une interface
        pour lecteurs barcode/cartes magntiques et un module d'export
        de donnes.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        Base par CPU, nombre d'utilisateurs illimit.

     DDooccuummeennttaattiioonn ::
        Manuel imprim et aide en ligne HTML inclus avec le logiciel.

     SSuuppppoorrtt pprroodduuiitt ::
        Gratuit, temps de rponse habituel en 20 minutes.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        interface pour lecteurs barcode/cartes magntiques.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1992 versions XENIX et MS-DOS version, 1994 version AIX, octobre
        1996 version Linux.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis.

     OOrrddrree ddee pprriixx ::
        USD 149.99.

     VVeennddeeuurr ::
        Quality Software Solutions, Inc.


          1322 Dodds Avenue
          Chattanooga, TN 37404
          tats-Unis.




     TTllpphhoonnee ::
        +1 888 423 5757, +1 423 821 5757

     FFaaxx ::
        +1 423 629 0744

     EE--mmaaiill ::
        dbryson@tclock.com

     UURRLL ::
        http://www.tclock.com

     CCoonnttaacctt ::
        Donald Bryson

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  1122..  BBiibblliiootthhqquueess


  1122..11..  FFoonnttSSccooppee


     ddeessccrriippttiioonn ::
        Bibliothque de rasterisation de polices type 1.  Permet aux
        utilisateurs d'chelonner, faire pivoter les caractres de
        type 1 et d'obtenir une bitmap en sortie.  Le produit inclut les
        sources compltes.
     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        Licence mono-utilisateur avec le produit.  Puisque celui-ci
        inclut les sources compltes et que nos ressources sont
        limites, il est fourni _s_a_n_s _g_a_r_a_n_t_i_e et _s_a_n_s _s_u_p_p_o_r_t.  Des
        contrats de support sont disponibles en option.  Des licences
        OEM, site et entreprises sont disponibles.

     DDooccuummeennttaattiioonn ::
        Manuel joliment compos en deux colonnes au format PostScript
        fourni avec le paquetage.

     SSuuppppoorrtt pprroodduuiitt ::
        Contrats de support disponibles  la vente.

     DDiissppoonniibbllee ddeeppuuiiss ::
        15 octobre 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 39,95. Les habitants de Californie sont soumis aux taxes sur
        la vente.  Prix sujet  modification sans avertissement.

     VVeennddeeuurr ::
        CurveSoft Inc.


          2053 Grant Road, Suite 555
          Los Altos, CA 94024
          tats-Unis




     TTllpphhoonnee ::
        +1 800 563 0843, +1 510 843 6485 (ventes seulement)

     FFaaxx ::
        +1 650 254 0900

     EE--mmaaiill ::
        info@curvesoft.com

     UURRLL ::
        http://www.curvesoft.com

     CCoonnttaacctt ::
        Munagala V. S. Ramanath

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        24 octobre 1997.


  1122..22..  IINNTTEERRAACCTTEERR


     ddeessccrriippttiioonn ::
        INTERACTER est une bibliothque de fonctions graphiques et d'IHM
        portable pour les dveloppeurs FORTRAN.  Les programmes fonds
        sur INTERACTER sont portables sur une grande quantit de
        compilateurs FORTRAN sur Unix, VMS, Windows et DOS.  La version
        Linux supporte f2c et g77 (ELF).  Les fonctions incluent menus,
        fentres texte, formulaires, primitives graphiques, graphiques
        de prsentation, impression (nombreux formats) et interface
        systme d'exploitation.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et DAT 4mm.

     SSyyssttmmee ddee lliicceennccee ::
        Les programmes fonds sur INTERACTER peuvent tre distribus
        sans royalties.  Version de dmonstration Linux disponible 
        http://www.dmonstrationn.co.uk/issltd.

     CCoonnffiigguurraattiioonn OOSS ::
        La version Linux supporte X Window (via Xlib), les terminaux
        graphiques ou la console Linux console (mode texte couleur).
        Ncessite g77 ou f2c.

     DDooccuummeennttaattiioonn ::
        Manuel imprim de deux volumes en anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique gratuit illimit.  Nouvelles versions tous les
        six mois.  Mises  jour tlchargeables.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Jeu d'outils optionnel INTERACTER comprenant un gnrateur de
        formulaires, outil de visualisation graphique, aide en ligne,
        post-processeur d'impression et diteur de fichiers de
        configuration.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Distributeurs en Amrique du nord, Europe et Australie.

     OOrrddrree ddee pprriixx ::
        Version Linux : USD 675 (Royaume Uni 450).

     VVeennddeeuurr ::
        Interactive Software Services Ltd.


           Westwood House Littleton Drive Huntington Staffs WS12 4TS Royaume Uni




     TTllpphhoonnee ::
        +44 1543 503611

     FFaaxx ::
        +44 1543 574566

     EE--mmaaiill ::
        support@issltd.dmonstrationn.co.uk

     UURRLL ::
        http://www.dmonstrationn.co.uk/issltd

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        1er octobre 1997.




  1122..33..  MMaattrriixx<<LLIIBB>> -- bbiibblliiootthhqquuee CC++++ mmaatthhmmaattiiqquuee mmaattrriicciieellllee


     ddeessccrriippttiioonn ::
        Matrix<LIB> est une bibliothque C++ mathmatique matricielle
        compatible Matlab, conue pour le dveloppement de code C++
        scientifique avanc.  Notre objectif principal de conception
        tait de conserver un code C++ clair et similaire  son
        quivalent Matlab, facilitant la bascule entre Matlab et C++.
        Si vous savez programmer Matlab, vous savez dj comment
        utiliser notre bibliothque mathmatique Matrix<LIB>.  Le code a
        aussi t optimis avec prcaution pour des performances
        maximales.  Matrix<LIB> est aussi inclus dans la distribution
        MATCOM V2.  La bibliothque inclut des oprateurs mathmatiques
        complexes, binaires et unaires, de puissantes capacits
        d'indexation, du traitement de signal, des entres/sorties
        fichiers, de l'algbre linaire, des oprations sur les chanes
        et des graphiques.  Plus de 300 fonctions mathmatiques sont
        incluses dans Matrix<LIB>.  MS Windows et de nombreuses plates-
        formes Unix sont supportes avec une varit de compilateurs
        C++.  Une version d'valuation (compltement fonctionnelle,
        limite  30 jours) est disponible en tlchargement gratuit sur
        notre site web.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        De la licence individuelle  la licence site.  Contacter The
        MathTools pour les dtails.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2, gcc 2.6.3 ou suprieur, 8 Mo de RAM, 15 Mo d'espace
        disque.

     DDooccuummeennttaattiioonn ::
        Manuels utilisateur et rfrence de la bibliothque en
        diffrents formats (MS Word, MS Write, texte, PostScript).

     SSuuppppoorrtt pprroodduuiitt ::
        Support produit rapide par e-mail seulement.  Le section support
        de la page web donne un accs immdiat  un ensemble de
        ressources, support technique, rponses  la foire aux
        questions, documents techniques, etc.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        MathTools Accelerator : apporte un gain de performances
        significatif aux programmes Matrix<LIB>  l'aide de l'algbre
        linaire et des multiplications de matrices, sur un Pentium avec
        le compilateur Visual C++.

     DDiissppoonniibbllee ddeeppuuiiss ::
        novembre 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 499 (version ducation pour USD 249).

     VVeennddeeuurr ::
        MathTools, Ltd.




      P.O.
     Box 855 Horsham, PA 19044-0855 tats-Unis.




     TTllpphhoonnee ::
        +1 212 208 4476

     FFaaxx ::
        +1 888 628 4866, +1 215 957 1719

     EE--mmaaiill ::
        info@mathtools.com

     UURRLL ::
        http://www.mathtools.com

     CCoonnttaacctt ::
        Robert G.  Ford

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.


  1122..44..  BBiibblliiootthhqquuee ddee ccoommpprreessssiioonn ddee ddoonnnneess PPKKWWAARREE ppoouurr LLiinnuuxx


     ddeessccrriippttiioonn ::
        La bibliothque effectue de la compression sans perte de donnes
        et consiste en routines de compression, extraction et contrle
        d'erreur.  Pour conserver la flexibilit et garder la taille de
        code de la bibliothque  un minimum, la Bibliothque de
        compression de donnes PKWARE ne cre pas d'archives compatibles
        .ZIP.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        Base par machine sans royalties.

     CCoonnffiigguurraattiioonn OOSS ::
        Intel x86, 36 ko RAM pour la compression et 13 ko RAM pour la
        dcompression, 1 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Manuel imprim de 33 pages et notes d'installation spares en
        anglais.  Exemples de code fournies sur disque.

     SSuuppppoorrtt pprroodduuiitt ::
        Gratuit.  Support technique par tlphone, fax ou e-mail.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Aussi compatible avec FreeBSD.

     DDiissppoonniibbllee ddeeppuuiiss ::
        14 septembre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Australie, Brsil, France, Allemagne, Inde, Italie, Allemagne,
        Pays-Bas, Japon, et Royaume Uni.

     OOrrddrree ddee pprriixx ::
        USD 450.  Remises ducation.

     VVeennddeeuurr ::
        PKWARE, Inc.


           9025 N.
          Deerwood Drive Brown Deer, WI 53223-2480 tats-Unis.




     TTllpphhoonnee ::
        +1 414 354 8699

     FFaaxx ::
        +1 414 354 8559

     EE--mmaaiill ::
        info@pkware.com

     UURRLL ::
        http://www.pkware.com

     CCoonnttaacctt ::
        Bob Gorman

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        5 aot 1997.


  1122..55..  RReeaaddyyBBaassee


     ddeessccrriippttiioonn ::
        Une bibliothque dynamique de base de donnes encapsulable avec
        une API C, un module Perl et une interface Java.


     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP et web).


     SSyyssttmmee ddee lliicceennccee ::
        Licence commerciale.  Une dmonstration gratuite de 30 jours est
        disponible.


     CCoonnffiigguurraattiioonn OOSS ::
        Noyau 2.0.x, 1 Mo de RAM.


     DDooccuummeennttaattiioonn ::
        Documentation en ligne.


     SSuuppppoorrtt pprroodduuiitt ::
        Service de mise  jour, maintenance et formation payants.


     DDiissppoonniibbllee ddeeppuuiiss ::
        mars 1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis.


     OOrrddrree ddee pprriixx ::
        USD 1295 pour 50 licences utilisateur final.


     VVeennddeeuurr ::
        Dynamical Systems, Ltd.



          175 W. Jackson Boulevard, Suite A253
          Chicago, IL 60604
          tats-Unis





     TTllpphhoonnee ::
        +1 312 341 1755

     FFaaxx ::
        +1 312 341 1891

     EE--mmaaiill ::
        info@dynamical-systems.com

     UURRLL ::
        http://www.dynamical-systems.com

     CCoonnttaacctt::
        Gary Kuper

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        22 avril 1998



  1122..66..  SSIIMMLLIIBB IIGG


     ddeessccrriippttiioonn ::
        SIMLIB IG est une bibliothque C.  Elle permet  l'utilisateur
        de communiquer avec un gnrateur d'images Evans & Sutherland
        (systmes Liberty et ESIG)  l'aide d'un protocole Ethernet de
        base trs efficace.  Il n'est pas ncessaire d'utiliser des
        opcodes, puisque SIMLIB IG fournit une API pour les
        fonctionnalits des gnrateurs d'images.

     SSuuppppoorrtt ::
        DAT 4mm format tar et disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        Commercial.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.

     DDooccuummeennttaattiioonn ::
        Manuel imprim en anglais, exemples de code source sur le
        support.

     OOrrddrree ddee pprriixx ::
        USD 2 500.

     VVeennddeeuurr ::
        KNIENIEDER Simulationstechnik
           Technologiezentrum Tirol Eduard Bodemgasse 5 A-6020 Innsbruck Autriche




     TTllpphhoonnee ::
        +43 512 390415 650

     FFaaxx ::
        +43 512 364000 20, +43 512 364000 30

     EE--mmaaiill ::
        office@knienieder.co.at

     CCoonnttaacctt ::
        Stephan Haidacher

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        29 septembre 1997.


  1133..  MMaatthhmmaattiiqquueess


  1133..11..  MMaappllee VV RReelleeaassee 44 -- TThhee PPoowweerr EEddiittiioonn


     ddeessccrriippttiioonn ::
        Maple V Release 4 est le puissant systme d'algbre informatique
        utilis par les mathmaticiens, ingnieurs et scientifiques pour
        l'enseignement et la recherche.  Maple V vous permet de raliser
        une grande quantit de calculs symboliques et numriques
        rapidement et de manire fiable.  Il inclut plus de 2 500
        fonctions mathmatiques, graphiques 2D et 3D, animation, et
        plus.  Les nouvelles fonctionnalits de la Release 4 incluent le
        surlignage, les styles et hyper-liens, la notation au format
        mathmatique en entre, sortie et texte, la recherche en texte
        intgrale de la base d'aide et de nouvelles fonctions de calcul
        et traage.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Licence d'utilisation illimit de la version acquise, licence
        flottante  tarif par utilisateur.

     CCoonnffiigguurraattiioonn OOSS ::
        Noyau Linux 2.0.0 ou suprieur, X11 R6.1 ou suprieur (pour
        excuter les composants d'IHM X11), 12 Mo de RAM conseills.
        Les binaires sont disponibles au format ELF seulement.

     DDooccuummeennttaattiioonn ::
        3 manuels : "Maple V - Learning Guide", "Maple V - Programming
        Guide", "The Maple V Handbook".  Aussi disponible en allemand :
        "Einfhrung in Maple V" et "Programmieren mit Maple V".
        Documentation et aide en anglais, une varit de manuels
        disponibles dans des langues diffrentes.

     SSuuppppoorrtt pprroodduuiitt ::
        Mises  jour/maintenance selon la licence, contacter le
        distributeur ou WMSI.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Bibliothque partage par e-mail et FTP.  Liste de diffusion
        gratuite disponible (maple_group@daisy.waterloo.edu).
     DDiissppoonniibbllee ddeeppuuiiss ::
        septembre 1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis/Canada, Europe et Asie.

     VVeennddeeuurr ::
        Waterloo Maple Inc.


           450 Phillip Street Waterloo, ON N2L 5J2 Canada




     TTllpphhoonnee ::
        +1 519 747 2373

     FFaaxx ::
        +1 519 747 5284

     EE--mmaaiill ::
        info@maplesoft.com

     VVeennddoorr iinn AAlllleemmaaggnnee::
        Scientific Computers GmbH


           Franzstr.
          106 D-52064 Aachen Allemagne




     TTllpphhoonnee ::
        +49 241 47075 0

     FFaaxx ::
        +49 241 44983

     EE--mmaaiill ::
        maple@scientific.de

     CCoonnttaacctt ::
        Andreas Himmeldorf

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  1133..22..  MMAATTCCOOMM eett bbiibblliiootthhqquuee MMAATTCCOOMM MMAATTHH


     ddeessccrriippttiioonn ::
        MATCOM est un compilateur Matlab vers C++ et une bibliothque
        mathmatique matricielle C++.  MATCOM compile les fichiers
        source Matlab (Fichiers M) en code source C++.  Le code
        rsultant est li avec la bibliothque de classes matricielles
        C++ fournie pour crer des excutables autonomes ou des fichiers
        MEX.

        Le code C++ et la bibliothque peuvent tre inclus dans des
        produits, sans royalties, vitant de traduire le prototype
        algorithmique.

        Le code compil tourne significativement plus vite que le source
        interprt originel.

        Les matrices de doubles, floats, ints et chars sont supportes,
        rduisant l'utilisation de mmoire pour de nombreuses
        applications, en particulier celles de traitement de signal et
        d'image.

        MS Windows et de nombreuses plates-formes Unix sont supportes
        avec une varit de compilateurs C++.  Une version d'valuation
        (compltement fonctionnelle, limite  30 jours) est disponible
        en tlchargement gratuit sur notre site web.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        De la licence individuelle  la licence site.  Contacter The
        MathTools pour les dtails.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2, gcc 2.6.3 ou suprieur, 8 Mo de RAM, 15 Mo d'espace
        disque.

     DDooccuummeennttaattiioonn ::
        Manuels utilisateur et rfrence de la bibliothque en
        diffrents formats (MS Word, MS Write, texte, PostScript).

     SSuuppppoorrtt pprroodduuiitt ::
        Support produit rapide par e-mail seulement.  Le section support
        de la page web donne un accs immdiat  un ensemble de
        ressources, support technique, rponses  la foire aux
        questions, documents techniques, etc.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        MathTools Accelerator : apporte un gain de performances
        significatif aux programmes MATCOM  l'aide de l'algbre
        linaire et des multiplications de matrices, sur un Pentium avec
        le compilateur Visual C++.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 499 (version ducation pour USD 249).

     VVeennddeeuurr ::
        MathTools, Ltd.


           P.O.
          Box 855 Horsham, PA 19044-0855 tats-Unis.




     TTllpphhoonnee ::
        +1 212 208 4476

     FFaaxx ::
        +1 888 628 4866, +1 215 957 1719

     EE--mmaaiill ::
        info@mathtools.com
     UURRLL ::
        http://www.mathtools.com

     CCoonnttaacctt ::
        Robert G.  Ford

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.


  1133..33..  MMaatthheemmaattiiccaa 33..00


     ddeessccrriippttiioonn ::
        Mathematica 3.0 -- connu pour fournir des solutions numriques
        et symboliques rapides et fiables -- est idal pour la cration
        d'tats techniques et prsentations interactifs qui incluent
        texte, formules actives, graphiques et boutons et palettes
        paramtrables.  D'importantes nouvelles fonctionnalits, comme
        un nouveau systme typographique compatible mathmatiques
        rendent Mathematica encore plus ais d'utilisation.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Commercial, CD-ROM de dmonstration 30 jours pleinement
        fonctionnel.

     CCoonnffiigguurraattiioonn OOSS ::
        Noyau 1.2 ou suprieur.

     DDooccuummeennttaattiioonn ::
        The Mathematica Book 1 400 pages.  Manuel complet et fichiers
        d'aide en ligne additionnels.

     SSuuppppoorrtt pprroodduuiitt ::
        Trois niveaux de service, voir http://www.wolfram.com/service
        pour les dtails.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Environ 15 paquetages applicatifs.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 1 295, remises ducation, licences site disponibles.

     VVeennddeeuurr ::
        Wolfram Research Europe Ltd


          10 Blenheim Office Park
          Lower Road
          Long Hanborough
          Oxfordshire
          OX8 8LN
          Royaume Uni




     TTllpphhoonnee ::
        +44 1993 883400

     FFaaxx ::
        +44 1993 883800

     EE--mmaaiill ::
        info@wolfram.co.uk

     UURRLL ::
        http://www.wolfram.co.uk

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        25 mai 1998.


  1133..44..  MMAATTLLAABB eett SSiimmuulliinnkk


     ddeessccrriippttiioonn ::
        MATLAB est un langage de hautes performances pour le calcul
        technique.  Il intgre le calcul, la visualisation et la
        programmation dans un environnement facile  utiliser dans
        lequel les problmes et leurs solutions sont exprimes dans une
        notation mathmatique familire.  MATLAB supporte le
        dveloppement de grandes applications complexes.  Les
        fonctionnalits incluent le the M-file Performance Profiler pour
        l'optimisation algorithmique, les diteur et dvermineur
        graphiques interactifs, et de puissants outils interactifs pour
        le traitement du signal et la conception de systmes de
        contrle.  Simulink est un paquetage logiciel puissant et
        interactif de modlisation, analyse et simulation de systmes
        dynamiques.  Il fournit des simulations extrmement fiables de
        systmes en temps continu non-linaires et de systmes 
        plusieurs modes opratoires.  Les fonctionnalits incluent le
        support de l'excution conditionnelle de sous-systmes, des
        solveurs  l'tat de l'art, des amliorations ergonomiques comme
        l'tiquetage des signaux et ports et de nouveaux blocs.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        Utilisant les options de verrouillage par CPU GlobeTrotter
        (FLEXlm) ou flottant en rseau.  Contacter The MathWorks pour
        les dtails.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.18, 32 Mo de RAM, 40 Mo d'espace disque (60 Mo avec
        tous les fichiers d'aide et la documentation).

     DDooccuummeennttaattiioonn ::
        Documentation imprime, aide en ligne, MATLAB Reference Guide
        (HTML).

     SSuuppppoorrtt pprroodduuiitt ::
        The MathWorks supporte une varit de services autour d'InterNet
        pour fournir l'information produit et les services 24h/24.  Ces
        services donnent un accs immdiat  un ensemble de ressources,
        feuilles de donnes produits, support technique, rponses  la
        foire aux questions, lments fournis par les utilisateurs,
        forums de discussion ouverts, et plus.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Extensions MATLAB : Compilateur MATLAB, Bibliothque
        mathmatique C++ MATLAB.  Botes  outils : Logique floue,
        traitement du signal, traitement d'image, Spline, rseau
        neuronal, systme de contrle, contrle de robustesse, analyse
        Mu & synthse, identification de systme, optimisation,
        statistiques, finances, identification de systmes en domaines
        de frquences, analyse spectrale d'ordre lev, communication,
        contrle LMI, contrle sur le modle prdictif, fondation NAG,
        quation diffrentielle partielle, conception de contrle QFT,
        mathmatiques symboliques et mathmatiques symboliques tendues,
        Wavelet.  Extensions Simulink : acclrateur Simulink,
        environnement temps rel.  Jeux de blocs : virgule fixe, DSP,
        conception de contrle non linaire.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juin 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Sur demande.

     VVeennddeeuurr ::
        The MathWorks, Inc.


           24 Prime Park Way Natick, MA 01760 tats-Unis.




     TTllpphhoonnee ::
        +1 508 647 7000 x7322

     FFaaxx ::
        +1 508 647 7002

     EE--mmaaiill ::
        efroio@mathworks.com, brian@mathworks.com

     UURRLL ::
        http://www.mathworks.com

     CCoonnttaacctt ::
        Enza Froio (marketing), Brian Bourgault (technique)

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        27 mars 1997.


  1144..  MMuullttiimmddiiaa


  1144..11..  PPeetteerr LLiippaa eett sseess vvooyyaaggeess


     ddeessccrriippttiioonn ::
        Il s'agit d'un CD-ROM multimdia sur le jazzman bien connu Peter
        Lipa.  C'est le premier produit de la collection Voyages de
        groupes et chanteurs de la socit KDK  comporter la version
        Linux du programme directement sur le CD-ROM.  Celui-ci contient
        plus de huit heures de musique en qualit quasi-CD (101 chansons
        en entier), plus de 30 minutes de vido, 2 heures de
        conversation, plus de 120 photos, 10 chansons karaok et de
        nombreuses autres informations (Journes du jazz de Bratislava,
        divers concerts partout dans le monde, apparitions TV et au
        thtre...).  Le CD-ROM est multilingue anglais, allemand et
        slovaque.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Le programme est gratuit, les donnes sont soumises  licence
        par machine.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.27 ou suprieur (peut fonctionner en 1.2), XFree86 3.2
        (peut fonctionner avec des versions plus anciennes de X11R6),
        16 Mo de RAM, 10  30 Mo d'espace disque, sans Motif, Linux
        Intel ELF.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne et description rapide des contrles dans
        le livret du CD-ROM (anglais, allemand et slovaque).

     DDiissppoonniibbllee ddeeppuuiiss ::
        14 octobre 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 30 plus frais d'envoi.  Comprend la mise  jour illimite
        des programmes par FTP.

     VVeennddeeuurr ::
        KDK Company, Ltd.


          Vodna 8
          040 01 Kosice
          Slovaquie




     TTllpphhoonnee ::
        +421 95 6233335

     FFaaxx ::
        +421 95 6233336

     EE--mmaaiill ::
        linux@kdk.sk

     UURRLL ::
        http://www.kdk.sk, http://obchod.kdk.sk (magasin virtuel).

     CCoonnttaacctt ::
        Ivan Schreter

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        1er novembre 1997.


  1144..22..  LLuucckkaa VVoonnddrraacckkoovvaa eett sseess vvooyyaaggeess


     ddeessccrriippttiioonn ::
        Il s'agit d'un CD-ROM multimdia sur la jeune chanteuse et
        actrice Lucka Vondrackova.  Ce CD-ROM est multi-lingue anglais,
        slovaque et tchque.  Le produit ne contient pas actuellement la
        version Linux du programme directement sur le CD-ROM (celle-ci
        est fournie sur une disquette supplmentaire ou peut tre
        tlcharge par FTP).  Le CD-ROM contient plus de trois heures
        de musique (toutes les chansons de Lucka en entier), 9 clips
        vido, toutes les paroles des chansons de Lucka avec musique et
        accords de guitare, plus de 130 photos, de nombreuses interviews
        intressantes, 10 chansons karaok et de nombreuses autres
        informations sur Lucka.

     SSuuppppoorrtt ::
        Donnes multimdia sur CD-ROM, programme sur disquette ou par
        FTP.

     SSyyssttmmee ddee lliicceennccee ::
        Le programme est gratuit, les donnes sont soumises  licence
        par machine.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.27 ou suprieur (peut fonctionner en 1.2), XFree86 3.2
        (peut fonctionner avec des versions plus anciennes de X11R6),
        16 Mo de RAM, 10  30 Mo d'espace disque, sans Motif, Linux
        Intel ELF.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne et description rapide des contrles dans
        le livret du CD-ROM (anglais, allemand et slovaque).

     DDiissppoonniibbllee ddeeppuuiiss ::
        14 octobre 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 34 plus frais d'envoi.  Comprend la mise  jour illimite
        des programmes par FTP.

     VVeennddeeuurr ::
        KDK Company, Ltd.


          Vodna 8
          040 01 Kosice
          Slovaquie




     TTllpphhoonnee ::
        +421 95 6233335

     FFaaxx ::
        +421 95 6233336

     EE--mmaaiill ::
        linux@kdk.sk

     UURRLL ::
        http://www.kdk.sk, http://obchod.kdk.sk (magasin virtuel).

     CCoonnttaacctt ::
        Ivan Schreter

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        1er novembre 1997.

  1144..33..  PPeetteerr NNaaggyy eett sseess vvooyyaaggeess


     ddeessccrriippttiioonn ::
        Il s'agit d'un CD-ROM multimdia sur le chanteur populaire
        slovaque Peter Nagy.  Ce CD-ROM est en slovaque seulement.  Le
        produit ne contient pas actuellement la version Linux du
        programme directement sur le CD-ROM (celle-ci est fournie sur
        une disquette supplmentaire ou peut tre tlcharge par FTP).
        Le CD-ROM contient plus de quatre heures de musique
        (154 exemples de chansons, 38 chansons en entier), 9 clips
        vido, 93 chansons avec paroles, musique et accords de guitare,
        120 photos, 8 interviews, des citations du livre Musicross, de
        nombreuses autres informations sur Peter Naguy et ses albums.

     SSuuppppoorrtt ::
        Donnes multimdia sur CD-ROM, programme sur disquette ou par
        FTP.

     SSyyssttmmee ddee lliicceennccee ::
        Le programme est gratuit, les donnes sont soumises  licence
        par machine.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.27 ou suprieur (peut fonctionner en 1.2), XFree86 3.2
        (peut fonctionner avec des versions plus anciennes de X11R6),
        16 Mo de RAM, 10  30 Mo d'espace disque, sans Motif, Linux
        Intel ELF.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne et description rapide des contrles dans
        le livret du CD-ROM (anglais, allemand et slovaque).

     DDiissppoonniibbllee ddeeppuuiiss ::
        14 octobre 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 34 plus frais d'envoi.  Comprend la mise  jour illimite
        des programmes par FTP.

     VVeennddeeuurr ::
        KDK Company, Ltd.


          Vodna 8
          040 01 Kosice
          Slovaquie




     TTllpphhoonnee ::
        +421 95 6233335

     FFaaxx ::
        +421 95 6233336

     EE--mmaaiill ::
        linux@kdk.sk

     UURRLL ::
        http://www.kdk.sk, http://obchod.kdk.sk (magasin virtuel).

     CCoonnttaacctt ::
        Ivan Schreter

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        1er novembre 1997.


  1144..44..  MMppeegg TTVV PPllaayyeerr 11..00


     ddeessccrriippttiioonn ::
        Afficheur vido  et CD-vido temps-rel MPEG (avec audio).

     SSuuppppoorrtt ::
        InterNet

     SSyyssttmmee ddee lliicceennccee ::
        Partagiciel pour une utilisation personnelle sans but lucratif.
        Licences commerciales indispensables pour une utilisation
        commerciale ou gouvernementale.

     DDooccuummeennttaattiioonn ::
        Aide en ligne et manuel HTML sur le site web.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Transferts de flux vido au-travers de rseaux.

     OOrrddrree ddee pprriixx ::
        Licence partagiciel pour USD 10.  Licences commerciales :
        prendre contact avec MpegTV  : sales@mpegtv.com.

     VVeennddeeuurr ::
        MpegTV LLC


          90 Divisadero Street, #15
          San Francisco, CA 94117
          tats-Unis.




     TTllpphhoonnee ::
        +1 415 864 6466

     EE--mmaaiill ::
        info@mpegtv.com

     UURRLL ::
        http://www.mpegtv.com,

     CCoonnttaacctt ::
        Tristan Savatier

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        23 dcembre 1998.


  1144..55..  XXaauuddiioo


     ddeessccrriippttiioonn ::
        Reproduction sonore MP3.  (avec audio).

     SSuuppppoorrtt ::
        InterNet
     SSyyssttmmee ddee lliicceennccee ::
        Libre pour une utilisation personnelle sans but lucratif.
        Licences commerciales indispensables pour une utilisation
        commerciale ou gouvernementale.

     DDooccuummeennttaattiioonn ::
        Aide en ligne et manuel HTML sur le site web.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Transferts de flux audio de qualit CD au travers de rseaux.

     OOrrddrree ddee pprriixx ::
        Gratuit pour une utilisation personnelle sans but lucratif.
        Licences commerciales : prendre contact avec MpegTV  :
        sales@mpegtv.com.

     VVeennddeeuurr ::
        MpegTV LLC


          90 Divisadero str, #15
          San Francisco, CA 94117
          tats-Unis.




     TTllpphhoonnee ::
        +1 415 864 6466

     EE--mmaaiill ::
        xaudio@mpegtv.com

     UURRLL ::
        http://www.xaudio.com,

     CCoonnttaacctt ::
        Gilles Boccon-Gibod

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        23 dcembre 1998.



  1155..  SSeerrvveeuurrss ddee rrsseeaauu


  1155..11..  CCrriittiiccaall AAnnggllee XX..550000 EEnnaabblleerr


     ddeessccrriippttiioonn ::
        Critical Angle X.500 Enabler permet  un serveur de rpertoires
        LDAP-seulement d'tre intgr dans un service de rpertoire
        X.500 tel que le rpertoire PARADISE international white pages
        ou un service de rpertoire d'entreprise.  Il supporte toutes
        les oprations X.500(88), y compris l'authentification.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        Base par serveur.

     CCoonnffiigguurraattiioonn OOSS ::
        La plate-forme de rfrence est Red Hat Linux 3 ou suprieur
        pour Intel.
     DDooccuummeennttaattiioonn ::
        Documentation en anglais incluse.

     SSuuppppoorrtt pprroodduuiitt ::
        Souscription aux mises  jour disponible.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Licence mono-serveur pour USD 495.

        Il existe aussi (en 1997) une version spciale, PARADISE X.500
        Enabler, exclusivement pour les universits.  Cette version
        n'inclut pas le support de l'authentification ni les oprations
        de modifications ; il est prvu seulement pour la recherche
        d'informations publiques.  Une licence mono-serveur de PARADISE
        X.500 Enabler est actuellement  USD 95.

     VVeennddeeuurr ::
        Critical Angle Inc.


           4815 W.
          Braker Lane #502-385
          Austin TX 78759
          tats-Unis




     EE--mmaaiill ::
        info@critical-angle.com

     UURRLL ::
        http://www.critical-angle.com

     CCoonnttaacctt ::
        Mark Wahl

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        5 aot 1997.


  1155..22..  SSeerrvveeuurr ddee nnoouuvveelllleess DDNNEEWWSS


     ddeessccrriippttiioonn ::
        DNEWS est un serveur de nouvelles NNTP avanc, complet.  Il
        convient pour les fournisseurs d'accs InterNet et les
        Intranets.  DNEWS peut tre utilis en remplacement de INN ou
        cnews et rsultera gnralement en des performances accrues et
        une administration fortement rduite.  Les fonctionnalits
        incluent : installation et gestion aises, configuration des
        expirations flexible, restrictions d'accs flexibles,
        confirmation e-mail des dpts d'articles, extensions XOVER,
        extensions de streaming , option de synchronisation dynamique,
        passerelle news vers web.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        Commercial, DNEWS est un logiciel en libre essai et peut tre
        tlcharg depuis notre site web pour essai libre.

     CCoonnffiigguurraattiioonn OOSS ::
        Rien de spcial

     DDooccuummeennttaattiioonn ::
        Un manuel utilisateur est fourni au format HTML.  Aide en ligne
        incluse.

     SSuuppppoorrtt pprroodduuiitt ::
        Support par Netwin LTD.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        DNEWSWEB - passerelle news vers web.  Permet aux groupes locaux
        et Usenet d'tre ajouts  des pages HTML ordinaires, et permet
        de lire et poster dans les groupes locaux et Usenet directement
        depuis n'importe quel butineur web.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 485 (Enregistrement gratuit pour coles et universits).

     VVeennddeeuurr ::
        Netwin LTD


           P.O Box 27574 MT Roskill Auckland Nouvelle Zlande




     FFaaxx ::
        +64 9 6300 689

     EE--mmaaiill ::
        netwin@netwinsite.com

     UURRLL ::
        http://netwinsite.com

     CCoonnttaacctt ::
        Stephen Pugmire

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  1155..33..  AAvveennttaaiill IInntteerrNNeett PPoolliiccyy MMaannaaggeerr


     ddeessccrriippttiioonn ::
        Serveur commercial SOCKS5 pour Linux avec support de multiples
        mthodes d'authentification, contrle d'accs sophistiqu,
        filtrage de flux de donnes et fonctions d'audit intelligent.
        NdT : le chiffrement est soumis  autorisation spcifique en
        France.


     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).



     SSyyssttmmee ddee lliicceennccee ::
        Commercial, dmonstration gratuite disponible 
        http://www.aventail.com/download.html


     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.x, 32 Mo de RAM recommands, l'outil d'administration
        ncessite X11R6 ou suprieur.  Approximativement 14 Mo d'espace
        disque ncessaire (moins avec Perl 5.003 et Perl/Tk dj
        installs).


     DDooccuummeennttaattiioonn ::
        Documentation en anglais disponible au format PDF ou Microsoft
        Word.


     SSuuppppoorrtt pprroodduuiitt ::
        Support technique gratuit 90 jours.  Maintenance annuelle  20%
        du prix d'achat initial.  La maintenance inclut les mises  jour
        du produit.


     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Modules d'authentification et de filtrage permettant d'ajouter
        des fonctionnalits lors de l'excution.


     DDiissppoonniibbllee ddeeppuuiiss ::
        novembre 1996.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.  Les produits VPN sont disponibles seulement en
        clefs de chiffrement  40 bits en-dehors des tats-Unis et du
        Canada  cause des restrictions  l'export.


     OOrrddrree ddee pprriixx ::
        IPM  partir de USD 6 495.  VPN  partir de USD 7 995.


     VVeennddeeuurr ::
        Aventail Corporation



          808 Howell Street, 2nd Floor
          Seattle, WA 98101
          tats-Unis.





     TTllpphhoonnee ::
        +1 888 762 5785, +1 206 215 1111


     FFaaxx ::
        +1 206 215 1120


     EE--mmaaiill ::
        info@aventail.com

     UURRLL ::
        http://www.aventail.com


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        23 juin 1998.



  1155..44..  AAvveennttaaiill VVPPNN


     ddeessccrriippttiioonn ::
        Aventail VPN fonctionne sous Linux, Unix et Windows :NT.  Il se
        compose de multiples mthodes d'authentification et chiffrement,
        de contrles d'accs sophistiqus, de filtrages intelligents et
        ne ncessite aucune modification du systme d'exploitation sous-
        jacent ni du client, ni du serveur.  Les modules
        d'authentification incluent nom d'utilisateur et mot de passe,
        CHAP, RADIUS, SSL, certification numrique et scurit par
        tokens.  Les modules de chiffrement comportent DES, Triple DES
        et MD 4/5.  Les contrles d'accs d'Aventail VPN permettent
        d'attribuer des droits aux utilisateurs selon des variables
        telles que le rle d'un utilisateur dans une entreprise,
        l'association de groupes, la destination prvue, le type
        d'application, le type de chiffrement et/ou d'authentification,
        ou mme des informations encore plus spcifiques.  Aventail VPN
        est le seul produit fonctionnant par-dessus PPTP, IPSec et L2TP.
        NdT : le chiffrement est soumis  autorisation spcifique en
        France.


     SSuuppppoorrtt ::
        CD-ROM.


     SSyyssttmmee ddee lliicceennccee ::
        Version d'valuation 60 jours ; Le prix est fonction des
        connexions du serveur et de la quantit de clients.


     SSuuppppoorrtt pprroodduuiitt ::
        Garantie automatique 90 jours et support technique tlphonique.
        Un Programme Annuel de Support est disponible en option, au prix
        de 20% du prix total de licence, renouvelable chaque anne.


     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1997.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
         partir de USD 6 995.  Prix en fonction du nombre de
        connexions.


     VVeennddeeuurr ::
        Aventail Corporation




     808 Howell Street, 2nd Floor
     Seattle, WA 98101
     tats-Unis.





     TTllpphhoonnee ::
        +1 888 762 5785, +1 206 215 1111


     FFaaxx ::
        +1 206 215 1120


     EE--mmaaiill ::
        info@aventail.com


     UURRLL ::
        http://www.aventail.com


     CCoonnttaacctt ::
        Deanna Leung


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        23 juin 1998.



  1155..55..  WWaannppiippee


     ddeessccrriippttiioonn ::
        Wanpipe s'intgre dans la pile de routage Linux pour raliser le
        routage IP ou IPX sur des rseaux  relais de trames, PPP ou
        X.25  des vitesses allant jusqu' 2 048 Mbps.  Wanpipe est
        quip, soit d'interfaces V.35, EIA530, X.21 ou RS232, soit d'un
        CSU/DSU T1 ou T1 fractionnel (NdT : Euh...???!!) intgr.  Des
        fonctions tendues de dverminage et surveillance en rendent
        l'installation et l'utilisation aises.


     SSuuppppoorrtt ::
        InterNet (FTP).


     SSyyssttmmee ddee lliicceennccee ::
        Source Linux distribu librement.


     CCoonnffiigguurraattiioonn OOSS ::
        Toutes versions de Linux.


     DDooccuummeennttaattiioonn ::
        Fournie avec le source pour Linux.


     SSuuppppoorrtt pprroodduuiitt ::
        Support par Sangoma, unlimited.


     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        CSU/DSU T1 ou FT1 intgr optionnel, choix du cblage V.35,
        EIA530, X.21 ou RS232.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1995.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis, Royaume-Uni, Isral, Pologne, Canada, Allemagne,
        Core, Chine.


     OOrrddrree ddee pprriixx ::
        USD 589   USD 859.


     VVeennddeeuurr ::
        Sangoma Technologies Inc.


          1001 Denison Street, Suite 101
          Markham, ON L3R 2Z6
          Canada





     TTllpphhoonnee ::
        +1 905 474 1990 +1 800 388 2475


     FFaaxx ::
        +1 905 474 9223


     EE--mmaaiill ::
        dm@sangoma.com


     UURRLL ::
        http://www.sangoma.com


     FFTTPP ::
        ftp://ftp.sangoma.com/pub/linux


     CCoonnttaacctt ::
        David Mandelstam


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        8 mai 1998.


  1155..66..  SSeerrvveeuurr wweebb ZZeeuuss


     ddeessccrriippttiioonn ::
        Serveur d'applications web chelonnable pour hbergement FAI
        (fournisseur d'accs InterNet), intranets et commerce
        lectronique scuris (NdT : rappel : le chiffrement est soumis
         autorisation pralable en France).  Support Frontpage complet,
        SSL3 128 bits mondial, compatibilit Apache, interface
        d'administration dlgable centre web.

        Le dveloppement d'applications est en ISAPI, applets serveur
        Java et CGI.  Un Java distribu ct serveur permet une
        connectivit bases de donnes  hautes performances.

        Nombre de serveurs virtuels illimit avec configuration par
        groupes, statistiques temps-rel, ajustement de bande passante
        et traces tendues.


     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        Une licence par machine excutant le logiciel.  Licences
        d'valuation de 30 jours disponibles sur notre site web.

     DDooccuummeennttaattiioonn ::
        Aide en ligne, disponible en allemand et espagnol.

     OOrrddrree ddee pprriixx ::
        Licence ducation : UKL 50. Licence commerciale : UKL 999.

     VVeennddeeuurr ::
        Zeus Technology LTD


          St Johns Innovations Centre, Cowley Road
          Cambridge, CB4 4WS
          UK




     TTllpphhoonnee ::
        +44 1223 42 17 27

     FFaaxx ::
        +44 1223 42 17 31

     EE--mmaaiill ::
        sales@zeustech.net

     UURRLL ::
        http://www.zeustech.net

     CCoonnttaacctt ::
        Bryan Amesbury bames@zeustech.net

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        23 dcembre 1997.


  1166..  OOuuttiillss ddee bbuurreeaauu


  1166..11..  CCoorreell WWoorrddppeerrffeecctt 88



     ddeessccrriippttiioonn ::
        Wordperfect 8 for Linux Personal Edition est un traitement de
        texte de classe mondiale, natif sous Linux.  Il offre les mmes
        outils intuitifs, interface graphique, et formats de fichiers
        que la version Windows.  Wordperfect 8 for Linux importe 40
        formats de documents (y compris Word97) et supporte plus de
        1 000 imprimantes.

        Wordperfect 8 for Linux Server Edition inclut tout ce qui se
        trouve dans la Personal Edition, plus un excutable pour
        terminaux texte et un certain nombre d'utilitaires puissants,
        comme une fusion/impression en arrire-plan.  Une licence
        concurrente est aussi disponible pour Server Edition dans le
        cadre d'une utilisation en entreprise.

        Wordperfect 8 for Linux (les deux versions) existe en anglais
        (US, UK, canadien et australien),  franais (national et
        canadien), allemand, italien, espagnol et hollandais.




     SSuuppppoorrtt ::
        CD-ROM et InterNet (web).


     SSyyssttmmee ddee lliicceennccee ::
        Par machine pour Personal Edition.  Licence concurrente pour
        Server Edition.


     CCoonnffiigguurraattiioonn OOSS ::
        Noyau 2.0.x et versions stables suivantes, libc.  Pour X-Window,
        9 Mo de RAM pour le premier utilisateur, puis 2,5 Mo de RAM par
        utilisateur supplmentaire, 43  104 Mo d'espace disque (selon
        les options d'installation).  Pour les terminaux caractres,
        2 Mo de RAM pour le premier utilisateur, puis 1 Mo de RAM par
        utilisateur supplmentaire, 31  40 Mo d'espace disque (selon
        les options d'installation).



     DDooccuummeennttaattiioonn ::
        Documentation imprime pour les versions graphique et mode
        caractres (environ 750 pages chacune).  Manuels disponibles en
        ligne (format Adobe Acrobat) pour la version graphique.


     SSuuppppoorrtt pprroodduuiitt ::
        Support autonome pour Personal Edition (base de connaissances,
        groupes de discussion, etc.), support e-mail et hotline payante.
        30 jours de support de mise en route pour Server Edition,
        support e-mail.  Complments de support et paquetages de
        maintenance disponibles.


     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Des centaines de modules de langues (fournis par Corel) qui
        fournissent des prototypes de claviers, des dictionnaires
        orthographiques et autres outils ncessaires pour crer des
        documents dans d'autres langues.  Dictionnaires orthographiques
        mdicaux (tierce partie - contacter info@sdcorp.com pour les
        dtails.


     DDiissppoonniibbllee ddeeppuuiiss ::
        septembre 1998.



     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        De USD 39.95  USD 495


     VVeennddeeuurr ::
        Software Development Corporation



          512 East 1860 South
          Provo, UT 84606
          tats-Unis.





     TTllpphhoonnee ::
        +1 801 370 9600


     FFaaxx ::
        +1 801 370 9696


     EE--mmaaiill ::
        info@sdcorp.com


     UURRLL ::
        http://www.sdcorp.com


     CCoonnttaacctt ::
        John Gleave


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        15 aot 1998.


  1166..22..  TThhee AAmmeerriiccaann HHeerriittaaggee DDiiccttiioonnaarryy DDeelluuxxee


     ddeessccrriippttiioonn ::
        Cette version attendue depuis longtemps est idale pour les
        rdacteurs techniques, auteurs et chercheurs.  Auparavant
        disponible seulement sur PC, le produit offre la rfrence
        ultime pour les utilisateurs Linux, avec les dfinitions
        compltes de plus de 200 000 mots, plus prononciations,
        drivations, utilisation correcte, idiomes et exemples de
        phrases.  Le Thesaurus mondialement connu de 500 000 mots de
        Roget est entirement inclus avec le AHD.  Navigation, recherche
        par mot et par sujet, anagrammes et plus.  Licences mono-
        utilisateur, rseau, ducation et site disponibles pour Linux et
        les principales plates-formes Unix.

     SSuuppppoorrtt ::
        CD-ROM, cartouches, InterNet (FTP et web).

     SSyyssttmmee ddee lliicceennccee ::
        Mono-utilisateur verrouill par noeud ou licence serveur
        (partage).  Une dmonstration unclockable gratuite est
        disponible sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Motif, 8-16 Mo RAM, 15 Mo d'espace disque ou lancement depuis le
        CD-ROM.

     DDooccuummeennttaattiioonn ::
        Documentation sous forme de fichier d'aide.  Anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        maintenance disponible.  Appeler DUX pour les dtails.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Volumes de rfrence et autres langues annoncs.

     DDiissppoonniibbllee ddeeppuuiiss ::
        fvrier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Actuellement aux tats-Unis et en Allemagne.  Nanmoins, les
        ventes sont effectues  l'international par des copies
        unclockables FTP/web et vendues via les principales cartes de
        crdit.

     OOrrddrree ddee pprriixx ::
        USD 49.95 pour la version mono-utilisateur  verrouillage de
        noeud.  Appeler DUX ou un revendeur autoris pour les remises
        par quantits ou les tarifs de licences site.

     VVeennddeeuurr ::
        DUX Software Corporation


           425 Sherman Avenue
          Ste 330 Palo Alto, CA 94306 tats-Unis.




     TTllpphhoonnee ::
        +1 800 543 4999, +1 415 473 1800

     FFaaxx ::
        +1 415 462 8723

     EE--mmaaiill ::
        sales@dux.com

     UURRLL ::
        http://www.dux.com

     CCoonnttaacctt ::
        Bob Adams, Rob DuFrane

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.


  1166..33..  AApppplliixxwwaarree OOffffiiccee SSuuiittee ppoouurr LLiinnuuxx


     ddeessccrriippttiioonn ::
        Suite bureautique totalement graphique et totalement intgre
        pour Linux.  Inclut traitement de texte, tableur, grapheur de
        prsentation, e-mail, client base de donnes et logiciel de
        cration HTML.  Comprend aussi Builder, un programme de
        dveloppement rapide d'applications (RAD).

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Licence par utilisateur simultan.

     CCoonnffiigguurraattiioonn OOSS ::
        Noyau 1.2.13 ou suprieur, XFree86 3.1.2 ou suprieur, 16 Mo
        RAM, 150 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Manuel de mise en route.  Documentation en ligne en anglais,
        franais et allemand.

     SSuuppppoorrtt pprroodduuiitt ::
        Support payant disponible.  Les utilisateurs peuvent s'inscrire
        sur la liste applixware-list@redhat.com et accder aux archives
        et FAQ sur le site web.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Interfaces en franais et allemand, dictionnaires
        internationaux.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Amrique du nord, Europe, Japon, Australie.

     OOrrddrree ddee pprriixx ::
        USD 99.  Mises  jour pour USD 79.

     VVeennddeeuurr ::
        Applix, Inc.


          112 Turnpike Road
          Westboro, MA 01581
          tats-Unis.




     TTllpphhoonnee ::
        +1 508 870 0300

     EE--mmaaiill ::
        mrlinux@applix.com

     UURRLL ::
        http://linux.applixware.com

     CCoonnttaacctt ::
        Richard Manly <rmanly@applix.com>

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        1er octobre 1998.


  1166..44..  DDooccuummeenntt MMaannaaggeemmeenntt SSyysstteemm DD..MM..SS..



     ddeessccrriippttiioonn ::
        Le systme collecte des documents en Tiff-g4, PostScript et JPEG
        et les organise en dossiers avec des informations
        d'enregistrement comme noms et descriptions.  Le systme est
        accessible par tout butineur web : visualisation, modification,
        texte intgral et fax sont fournis par une interface web.  Les
        nouveaux documents sont raliss par simple impression.

     SSyyssttmmee ddee lliicceennccee ::
        Le systme est install par le vendeur sur votre machine Linux
        avec une licence serveur, clients et nombre de documents
        illimits.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.

     DDooccuummeennttaattiioonn ::
        HTML.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Intgration SQL server, capture d'impression depuis un logiciel
        d'accounting.

     OOrrddrree ddee pprriixx ::
        Sur demande.

     VVeennddeeuurr ::
        Studio LEADER Pro


           Via Pietrastretta, 76 I-38100 Trento Italie




     TTllpphhoonnee ::
        +39 461 828229

     FFaaxx ::
        +39 461 829826, +39 461 829877

     EE--mmaaiill ::
        DMS@leader.it

     UURRLL ::
        http://www.leader.it

     CCoonnttaacctt ::
        Guido Brugnara <brugnara@leader.it>

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        19 aot 1997.


  1166..55..  HHoottWWiirree EEaassyyFFAAXX


     ddeessccrriippttiioonn ::
        Programme de gestion de fax avec IHM graphique totalement
        fonctionnel.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        valuation gratuite totalement fonctionnelle depuis notre site
        web.

     CCoonnffiigguurraattiioonn OOSS ::
        5.5 Mo d'espace disque, 4 Mo RAM.

     DDooccuummeennttaattiioonn ::
        Aide en ligne sensible au contexte.

     SSuuppppoorrtt pprroodduuiitt ::
        Par e-mail et Usenet seulement.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1er janvier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis/Canada (Unisource Systems, Inc.),  Allemagne/Europe
        (Delix Computer, GmbH).

     OOrrddrree ddee pprriixx ::
        USD 99.

     VVeennddeeuurr ::
        Unisource Systems, Inc.


           1409 N.
          Cove Boulevard
          Longwood, FL 32750 tats-Unis.




     TTllpphhoonnee ::
        +1 407 834 1973

     FFaaxx ::
        +1 407 834 8013

     EE--mmaaiill ::
        sales@unisrc.com

     UURRLL ::
        http://www.unisrc.com

     CCoonnttaacctt ::
        Gary Heller

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        3 octobre 1997.


  1166..66..  NNEExxSS,, tthhee NNeettwwoorrkk EExxtteennssiibbllee SSpprreeaaddsshheeeett


     ddeessccrriippttiioonn ::
        NExS est un paquetage tableur graphique complet conu pour tirer
        avantage des fonctionnalits avances d'Unix et du systme X
        Window.  Il inclut plus de 230 fonctions de calcul et 13 types
        de graphiques 2D et 3D pour les applications d'ingnierie,
        scientifiques et commerciales.  NExS est extensible par une API
        rseau qui permet de raliser des modules annexes dans
        diffrents langages de programmation.  Le bus logiciel de NExS
        inclut 63 "prises" permettant  des processus distants de se
        connecter et d'tendre les fonctionnalits de base, ce qui
        autorise le dveloppement d'applications rseau sophistiques.

     SSuuppppoorrtt ::
        InterNet (FTP et web).

     SSyyssttmmee ddee lliicceennccee ::
        NExS Personal Edition est mono-utilisateur et pour un seul type
        de plate-forme.  L'utilisateur peut utiliser la licence sur
        diffrentes machines.  La licence Professional Edition est une
        licence rseau flottante qui permet  un ensemble de licences
        d'tre utilises sur n'importe quelle plate-forme supporte de
        votre rseau.  Sans licence, NExS fonctionne en "mode
        dmonstration" avec des fonctionnalits limites.

     CCoonnffiigguurraattiioonn OOSS ::
        NExS tourne sur les noyaux Linux ELF.  Deux versions existent
        pour Linux, l'une ncessite les bibliothques partages Motif
        2.0, et l'autre qui inclut Motif 2.0 li statiquement.

     DDooccuummeennttaattiioonn ::
        Le guide de l'utilisateur NExS est disponible en PostScript
        (format letter, 431 pages, ou format A4, 403 pages), et en HTML.
        La documentation des API et de tclNExS sont disponible
        sparment du guide de l'utilisateur, aussi en PostScript et
        HTML.  Documentation imprime aussi disponible.  Toute la
        documentation est en anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Le support e-mail gratuit est standard.  Support tlphonique
        payant disponible.  Corrections de bogues et mises  jour
        mineures (e.g., 1.2.x -> 1.3.0) sont gratuites.  Les mises 
        jour majeures font l'objet d'une remise substantielle pour les
        licences existantes.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Modules NExS et contributions utilisateurs sont disponibles 
        http://www.xess.com/plugins.html.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::

       USD 149 (USD 99 ducation) pour Personal Edition

       USD 249 (USD 125 ducation) pour Professional Edition

     VVeennddeeuurr ::
        X Engineering Software Systems (XESS) Corp.


           P.O.
          Box 33091 Raleigh, NC 27636 tats-Unis.




     TTllpphhoonnee ::
        +1 800 961 7840, +1 919 387 0076

     FFaaxx ::
        +1 919 387 1302

     EE--mmaaiill ::
        info@xess.com
     UURRLL ::
        http://www.xess.com

     FFTTPP ::
        ftp://ftp.vnet.net/pub/users/xess/NExS

     CCoonnttaacctt ::
        Dave Van den Bout <devb@xess.com>

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        15 mars 1997.


  1166..77..  AAxxeennee OOffffiiccee


     ddeessccrriippttiioonn ::
        La suite Axene Office inclut Xclamation (publication
        bureautique), XQuad (tableur), XAllWrite (traitement de texte)
        et XMayday (navigateur de documentation HTML).  Disponible en
        anglais, franais, allemand et espagnol.


     SSuuppppoorrtt ::
        CD-ROM, cartouche et InterNet (FTP).


     SSyyssttmmee ddee lliicceennccee ::
        Licences poste ou flottantes.  Version de dmonstration
        tlchargeable par FTP


     CCoonnffiigguurraattiioonn OOSS ::
        8  16 Mo de RAM, 10 Mo d'espace disque ou excution depuis le
        CD-ROM.  Versions a.out ou ELF.


     DDooccuummeennttaattiioonn ::
        Aide en ligne HTML et documentation imprime.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        USD 49.


     VVeennddeeuurr ::
        Axene Inc.


          30, Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          tats-Unis.






     TTllpphhoonnee ::
        +1 201 434 4244


     EE--mmaaiill ::
        info@axene.com


     UURRLL ::
        http://www.axene.com/english/showroom.html
        ftp://ftp.axene.com/pub


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        8 fvrier 1998.


  1166..88..  PPrroojjeeccttoorr eett PPrroojjeeccttoorr//NNeett


     ddeessccrriippttiioonn ::
        Cre des plannings de projets et diagrammes de Gantt par analyse
        de chemin critique depuis des listes d'activits (tches) et
        leurs dures et contraintes associes.  Projector produit des
        rsultats imprims et PRojector/Net, du HTML pour les clients
        web.


     SSuuppppoorrtt ::
        disquettes 3,5 pouces.


     SSyyssttmmee ddee lliicceennccee ::
        Licences mono-utilisateur et serveur.  Une version de
        dmonstration est disponible en tlchargement sur notre site
        web.


     CCoonnffiigguurraattiioonn OOSS ::
        Projector ncessite Ghostscript ou une imprimante PostScript.
        Projector/Net ncessite seulement un navigateur web capable
        d'afficher des graphiques (Netscape et IE conviennent).  Les
        besoins en mmoire sont pour les deux versions (trs
        approximativement) la taille du module charg plus 44 octets par
        activit plus 32 octets par contrainte plus la taille du fichier
        de description de projet ( l'exclusion des commentaires).
        Test seulement avec Red Hat Linux 4.2.  Projector/Net test
        seulement avec un serveur Linux/Apache avec Internet Explorer et
        Netscape ct client.


     DDooccuummeennttaattiioonn ::
        Contenue en entier dans le README de la distribution et les
        exemples de fichiers de description de projets (anglais).


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        USD 200 pour Projector.  USD 2 500 pour Projector/Net.


     VVeennddeeuurr ::
        IEDU
          Morris Dovey
          1001 Office Park Road, Suite 300
          West Des Moines, IA 50265
          tats-Unis.





     TTllpphhoonnee ::
        +1 515 225 1636


     EE--mmaaiill ::
        mrdovey@iedu.com


     UURRLL ::
        http://www.iedu.com/project


     CCoonnttaacctt ::
        Morris Dovey


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        8 mai 1998.


  1166..99..  TThhee VViirrttuuaall OOffffiiccee SSyysstteemm


     ddeessccrriippttiioonn ::
        Gestion de documents d'entreprise (GED) client/serveur 
        fonctionnalits Internet.  Numrise directement dans Linux
        depuis un client MS-Windows sans utiliser le courrier
        lectronique ni FTP.


     SSuuppppoorrtt ::
        disquettes 3,5 pouces, cartouche et InterNet (FTP).


     SSyyssttmmee ddee lliicceennccee ::
        Client de dmonstration MS-Windows gratuit disponible sur notre
        site web.  Serveur d'valuation 30 jours disponible sur demande.


     CCoonnffiigguurraattiioonn OOSS ::
        Serveur : Linux 2.0.  Client : Ms-Windows :95 et MS-Windows NT
        Desktop.


     DDooccuummeennttaattiioonn ::
        Aide en ligne et manuel de l'administrateur imprim.


     EEllmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Archivage de fichiers MS-Windows.


     OOrrddrree ddee pprriixx ::
        USD 4995 - 5 utilisateurs, 1 numriseur, dition entreprise.



     VVeennddeeuurr ::
        CONTEXT Information Systems, Ltd.



          314 S. 2nd Street
          Oakland, MD 21550
          tats-Unis.





     TTllpphhoonnee ::
        +1 301 334 6550


     EE--mmaaiill ::
        sales@contextis.com


     UURRLL ::
        http://www.contextis.com


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        13 juin 1998.


  1166..1100..  XXAAllllWWrriittee


     ddeessccrriippttiioonn ::
        L'application de traitement de texte Axene XAllWrite autorise la
        cration de documents d'excellente qualit avec facilit, depuis
        la simple lettre  la vaste publication complexe.  Il dispose
        d'outils de gestion multi-documents, intgration d'images bitmap
        ou vectorielles, diverses possibilits de polices et l'export au
        format HTML.  Disponible en anglais, franais, allemand et
        espagnol.


     SSuuppppoorrtt ::
        CD-ROM, cartouche et InterNet (FTP).


     SSyyssttmmee ddee lliicceennccee ::
        Licences poste ou flottantes.  Version de dmonstration
        tlchargeable par FTP.


     CCoonnffiigguurraattiioonn OOSS ::
        8  16 Mo de RAM, 10 Mo d'espace disque ou excution depuis le
        CD-ROM.  Versions a.out ou ELF.


     DDooccuummeennttaattiioonn ::
        Aide en ligne HTML et documentation imprime.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.
     OOrrddrree ddee pprriixx ::
        USD 25.


     VVeennddeeuurr ::
        Axene Inc.


          30, Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          tats-Unis.





     TTllpphhoonnee ::
        +1 201 434 4244


     EE--mmaaiill ::
        info@axene.com


     UURRLL ::
        http://www.axene.com/english/xallwrite.html
        ftp://ftp.axene.com/pub


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        8 fvrier 1998.


  1166..1111..  AAxxeennee XXccllaammaattiioonn


     ddeessccrriippttiioonn ::
        Xclamation dispose de fonctionnalits multi-documents, multi-
        colonnes et gouttires, marques de rgle magntiques,
        intgration de texte, d'images bitmap ou vetorielles avec des
        cadres polymorphes, fonctions d'dition avance de cadres (y
        compris logiques, zoom, contourage, rotation, fond transparent,
        etc.) et exportation de texte au format HTML.  Disponible en
        anglais, franais, allemand et espagnol.


     SSuuppppoorrtt ::
        CD-ROM, cartouche et InterNet (FTP).


     SSyyssttmmee ddee lliicceennccee ::
        Licences poste ou flottantes.  Version de dmonstration
        tlchargeable par FTP


     CCoonnffiigguurraattiioonn OOSS ::
        8  16 Mo de RAM, 10 Mo d'espace disque ou excution depuis le
        CD-ROM.  Versions a.out ou ELF.


     DDooccuummeennttaattiioonn ::
        Aide en ligne HTML et documentation imprime.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.
     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        USD 25.


     VVeennddeeuurr ::
        Axene Inc.


          30, Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          tats-Unis.





     TTllpphhoonnee ::
        +1 201 434 4244


     EE--mmaaiill ::
        info@axene.com


     UURRLL ::
        http://www.axene.com/english/xclamation.html
        ftp://ftp.axene.com/pub


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        8 fvrier 1998.


  1166..1122..  XXQQuuaadd


     ddeessccrriippttiioonn ::
        Xquad prsente toutes les fonctions ncessaires au calcul
        scientifique et  la prsentation graphique de donnes
        numriques, y compris plus de 100 fonctions mathmatiques,
        logiques et de manipulation de chanes, diffrents types de
        graphes (de l'histogramme au radar), l'importation de fichiers
        de donnes externes (Texte, Excel, etc.), des outils de
        production qui permettent au texte contenu dans des cellules
        d'avoir un effet direct sur la prsentation graphique.
        Disponible en anglais, franais, allemand et espagnol.


     SSuuppppoorrtt ::
        CD-ROM, cartouche et InterNet (FTP).


     SSyyssttmmee ddee lliicceennccee ::
        Licences poste ou flottantes.  Version de dmonstration
        tlchargeable par FTP.


     CCoonnffiigguurraattiioonn OOSS ::
        8  16 Mo de RAM, 10 Mo d'espace disque ou excution depuis le
        CD-ROM.  Versions a.out ou ELF.


     DDooccuummeennttaattiioonn ::
        Aide en ligne HTML et documentation imprime.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        USD 25.


     VVeennddeeuurr ::
        Axene Inc.


          30, Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          tats-Unis.





     TTllpphhoonnee ::
        +1 201 434 4244


     EE--mmaaiill ::
        info@axene.com


     UURRLL ::
        http://www.axene.com/english/xquad.html ftp://ftp.axene.com/pub


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        8 fvrier 1997.


  1177..  TTrraaiitteemmeenntt ddee tteexxttee


  1177..11..  EEddiitthh PPrroo ppoouurr XX1111


     ddeessccrriippttiioonn ::
        Edith Pro est un paquetage simple et puissant d'dition de texte
        comme d'e-mail, HTML, LaTeX et de langages de programmation.  Il
        est destin aux gens qui souhaitent un outil d'dition flexible
        mais qui ne sont pas disposs  passer beaucoup de temps 
        apprendre ni  configurer leur application.  Il inclut un
        butineur rapide texte-seulement avec l'accs au manuel systme
        et info.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttmmee ddee lliicceennccee ::
        Vous tes seulement autoris  tlcharger Edith depuis les
        pages web de ZFC pour un _u_s_a_g_e _p_e_r_s_o_n_n_e_l.  Sans licence, Edith
        affichera rgulirement des messages indiquant que la copie ne
        dispose pas de licence.  L'utilisation personnelle sans licence
        est autorise, mais les organisations doivent acqurir une
        licence.

     CCoonnffiigguurraattiioonn OOSS ::
        Binaire ELF.  1 Mo est suffisant pour diter des textes de
        taille normale.

     DDooccuummeennttaattiioonn ::
        L'aide en ligne HTML reprend entirement le manuel imprim.  Le
        manuel imprim contient des illustrations qui ne sont pas dans
        l'aide en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Les mises  jour gratuites peuvent tre tlcharges depuis les
        pages web de ZFC.  Les dtenteurs de licence seront aviss des
        mises  jour.  Les dtenteurs de licence peuvent contacter ZFC
        par e-mail pour un support immdiat.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1er janvier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier directement par ZFC.

     OOrrddrree ddee pprriixx ::
        NLG 70 (environ USD 35) par machine, NLG 400 (environ USD 200)
        licence site.  Remise ducation 50%.

     VVeennddeeuurr ::
        ZFC


           P.O.
          Box 15813 1001 NH Amsterdam Pays-Bas




     TTllpphhoonnee ::
        +31 20 4 208 248

     EE--mmaaiill ::
        zfc@zfc.nl

     UURRLL ::
        http://www.zfc.nl

     CCoonnttaacctt ::
        Annius V.  Groenink

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  1177..22..  TTeerraaSSppeellll 9977 ppoouurr EEmmaaccss


     ddeessccrriippttiioonn ::
        TeraSpell 97 pour Emacs est le correcteur orthographique
        intuitif pour Emacs qui met en valeur les mots mal orthographis
        et effectue un contrle  la vole de l'orthographe.  TeraSpell
        97 pour Emacs dfinit un nouveau standard de qualit pour les
        vrificateurs orthographiques en fournissant le systme de
        correction le plus avanc disponible sur le march.  TeraSpell
        limine le traditionnel dialogue de correction et acclre le
        processus de correction orthographique de vos documents.  La
        mise en valeur visuelle vous permet d'identifier efficacement
        toutes les fautes d'orthographe en une seule fois et ignore tous
        les non-mots que vous pouvez avoir utilis dans votre document.
        TeraSpell peut contrler l'orthographe durant la frappe.  Ds
        que vous frappez un mot incorrect, il passe en surbrillance.  En
        cliquant avec le bouton droit sur un mot mis en valeur, un menu
        de suggestions apparat.

     SSuuppppoorrtt ::
        InterNet (e-mail et web).

     SSyyssttmmee ddee lliicceennccee ::
        Version d'valuation disponible gratuitement sur notre site web.
        Licence mono-utilisateur, 3, 5, 10, 20 utilisateurs.  Licences
        site et universits.

     CCoonnffiigguurraattiioonn OOSS ::
        Emacs 19.29.1 ou suprieur.  XEmacs 19.14 ou suprieur.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Support e-mail.  Mises  jour web.  FAQ sur le web.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Langues additionnelles disponibles.

     DDiissppoonniibbllee ddeeppuuiiss ::
        aot 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 29,99 licence tudiant mono-utilisateur Linux.  USD 89 mono-
        utilisateur Linux, Solaris, Irix, HPUX.

     VVeennddeeuurr ::
        Teragram Corporation


           236 Huntington Avenue Boston MA 02115-4701 tats-Unis.




     TTllpphhoonnee ::
        +1 617 369 0100

     FFaaxx ::
        +1 617 369 0101

     EE--mmaaiill ::
        info@teragram.com

     UURRLL ::
        http://www.teragram.com

     CCoonnttaacctt ::
        Yves Schabes

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        16 aot 1997.

  1188..  OOuuttiillss dd''aaddmmiinniissttrraattiioonn ssyyssttmmee


  1188..11..  HHoosstt FFaaccttoorryy


     ddeessccrriippttiioonn ::
        Host Factory est un systme de contrle du contenu logiciel
        complet d'un parc de machines Unix.  Host Factory vous permet de
        paramtrer un systme Unix prototype et de l'utiliser pour btir
        des centaines de systmes similaires.  Vous pouvez effectuer des
        modifications incrmentales sur des systmes actifs et annuler
        celles-ci si elles chouent.  Les modifications sont traces
        dans un systme de fichiers de contrle de versions.  Host
        Factory fournit un environnement de gestion de configuration et
        de contrle de version de htes complets.

     SSyyssttmmee ddee lliicceennccee ::
        Commercial et GPL.

     DDooccuummeennttaattiioonn ::
        Documentation imprime.

     SSuuppppoorrtt pprroodduuiitt ::
        e-mail.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Sur demande.  Tarifs ducation.

     VVeennddeeuurr ::
        Working Version


           31 Shea Road Cambridge, MA 02140 tats-Unis.




     EE--mmaaiill ::
        bb@wv.com

     UURRLL ::
        http://www.wv.com

     CCoonnttaacctt ::
        Brian Bartholomew

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        22 juillet 1997.


  1188..22..  PPeerrffeeccttBBAACCKKUUPP++


     ddeessccrriippttiioonn ::
        PerfectBACKUP+ est un utilitaire de sauvegarde/restauration pour
        Unix/Linux.  C'est un outil de sauvegarde/restauration trs
        rapide qui existe depuis 1985.  Pralablement dnomm aux tats-
        Unis FASTBACK PLUS pour Unix, le pendant de l'outil DOS FASTBACK
        PLUS, il dispose maintenant d'interfaces en mode caractre et
        Motif, du support du rseau, de la compression, de la
        vrification et de la reprise, de la planification et est
        compatible aussi bien tar que cpio.  Sauvegarde tous les
        fichiers, priphriques, partitions, etc.  Et peut sauvegarder
        aussi des disques Windows, Netware et Windows NT.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, InterNet (web), DAT 4/8 mm et bientt CD-
        ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Copie d'valuation gratuite sur notre site web.  Manuel en ligne
        gratuit  la mme adresse.  Base par CPU, utilisateurs
        illimits.

     CCoonnffiigguurraattiioonn OOSS ::
        Noyaux 1.2.x et 2.0.x,  X11R6, Motif 1.2, 3 Mo de RAM, 3 Mo
        d'espace disque.

     DDooccuummeennttaattiioonn ::
        Imprime (188 pages), PostScript en ligne, et aide en ligne.
        Documentation en anglais, mais aide par tlphone et e-mail
        disponible aussi en espagnol.

     SSuuppppoorrtt pprroodduuiitt ::
        Supports e-mail et tlphone illimits gratuits.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Fourni avec des programmes libres PC pour lire des disquettes
        tar/cpio.  Module AutoChanger avec recyclage de cartouches.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        tats-Unis, Canada, Royaume Uni, Suisse, Singapour, Malaisie,
        Allemagne.

     OOrrddrree ddee pprriixx ::
        De USD 79  USD 499.  Linux par le Net (sans mdium)  USD 79 et
        HP/UX  USD 499.  Produit complet.

     VVeennddeeuurr ::
        Unisource Systems, Inc.


           1409 North Cove Boulevard
          Longwood, FL 32750 tats-Unis.




     TTllpphhoonnee ::
        +1 407 834 1973

     FFaaxx ::
        +1 407 834 1973

     EE--mmaaiill ::
        sales@unisrc.com

     UURRLL ::
        http://www.unisrc.com

     CCoonnttaacctt ::
        Gary Heller
     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        15 mars 1997.


  1188..33..  VVeennuuss


     ddeessccrriippttiioonn ::
        Venus est un outil d'administration distribu pour tout rseau
        bti avec des stations Unix de diffrents constructeurs.  Un
        rseau Venus se prsente  l'utilisateur comme un systme
        informatique homogne et garantit l'accs transparent  toute
        ressource rseau.  Il fournit des outils logiciels pour les
        principales tches de gestion de grappes, distribution
        logicielle et administration de systmes de fichiers et
        d'utilisateurs.

     SSyyssttmmee ddee lliicceennccee ::
        Commercial.

     CCoonnffiigguurraattiioonn OOSS ::
        Actuellement bti sur la distribution S.u.S.E.

     DDooccuummeennttaattiioonn ::
        Documentation imprime, aide en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Hotline, e-mail, cours.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Sur demande.  Tarifs ducation.

     VVeennddeeuurr ::
        science + computing GmbH


           Hagellocher Weg 71 D-72070 Tbingen Allemagne




     TTllpphhoonnee ::
        +49 7071 9457 0

     FFaaxx ::
        +49 7071 9457 27

     EE--mmaaiill ::
        info@science-computing.de

     UURRLL ::
        http://www.science-computing.de

     CCoonnttaacctt ::
        Olaf Flebbe

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        25 fvrier 1997.


  1199..  PPrroodduuiittss XX WWiinnddooww


  1199..11..  SSeerrvveeuurr dd''aaffffiicchhaaggee AAcccceelleerraatteedd--XX


     ddeessccrriippttiioonn ::
        Serveur d'affichage X de niveau commercial avec des
        fonctionnalits de classe station de travail comme afficheurs
        multiples, overlays, et correction gamma, FreeBSD, et Linux.  Le
        serveur Accelerated-X pilote les matriels graphiques les plus
        populaires, y compris les dernires cartes de ATI, Diamond,
        Matrox, NeoMagic, Number 9, et S3.  En tout, plus de 490
        diffrentes cartes sont supportes.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Par CPU.

     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problme connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Manuel de 100 pages reli.

     SSuuppppoorrtt pprroodduuiitt ::
        Support illimit inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


           1801 Broadway, Suite 1710 Denver, CO 80202 tats-Unis.




     TTllpphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        14 aot 1997.

  1199..22..  BBXXwwiiddggeettss


     ddeessccrriippttiioonn ::
        BXwidgets est un jeu de widgets supplmentaire destin
        spcifiquement au dveloppement d'applications Motif
        commerciales.  Il inclut des widgets spciaux pour les champs
        d'entre tabulaires, masques, formats et le support complet
        d'un systme d'aide.  Tout a l'apparence Motif et est
        indpendant de la plate-forme.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        Licence en code source.

     CCoonnffiigguurraattiioonn OOSS ::
        Tout noyau, X11R5 ou X11R6, Motif 1.1 or Motif 1.2.

     DDooccuummeennttaattiioonn ::
        Environ 250 pages de documentation avec exemples.  Quelques
        programmes de dmonstration.

     SSuuppppoorrtt pprroodduuiitt ::
        Support et service de mise  jour disponible (DDM 1 200; environ
        USD 750)

     DDiissppoonniibbllee ddeeppuuiiss ::
        1992.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Allemagne, Royaume Uni et tats-Unis.

     OOrrddrree ddee pprriixx ::
        DDM 1 600 (environ USD 1 000) pour une licence complte source.

     VVeennddeeuurr ::
        BREDEX GmbH


           Fallersleber-Tor-Wall 23 D-38100 Braunschweig Allemagne




     TTllpphhoonnee ::
        +49 531 24 33 0 0

     FFaaxx ::
        +49 531 24 33 0 99

     EE--mmaaiill ::
        info@bredex.de

     UURRLL ::
        http://www.bredex.de

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        3 novembre 1997.


  1199..33..  BBXXwwiiddggeettss//DDBB



     ddeessccrriippttiioonn ::
        BXwidgets/DB est un jeu de widgets supplmentaire pour l'accs
        aux bases de donnes relationnelles.  Les donnes peuvent tre
        automatiquement demandes sur la base de donnes, affiches en
        diffrents formats, modifies et stockes dans la base.  Toutes
        les applications bties avec BXwidgets/DB sont indpendantes de
        la base de donnes.  L'accs  la base de donnes est ralis
        par des serveurs transactionnels.  Serveur transactionnel et
        base de donnes peuvent rsider sur d'autres htes du rseau.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Base par systme d'exploitation, sans restriction d'utilisation.
        Licence d'valuation disponible.

     CCoonnffiigguurraattiioonn OOSS ::
        X11R5 et Motif 1.2.

     DDooccuummeennttaattiioonn ::
        Manuel imprim en anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Support et service de mise  jour disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.

     OOrrddrree ddee pprriixx ::
        DDM 4 900 (environ USD 2 900).

     VVeennddeeuurr ::
        BREDEX GmbH


           Fallersleber-Tor-Wall 23 D-38100 Braunschweig Allemagne




     TTllpphhoonnee ::
        +49 531 24 33 0 0

     FFaaxx ::
        +49 531 24 33 0 99

     EE--mmaaiill ::
        info@bredex.de

     UURRLL ::
        http://www.bredex.de

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        3 novembre 1997.


  1199..44..  SSeerrvveeuurr ggrraapphhiiqquuee ddee ppoorrttaabbllee AAcccceelleerraatteedd--XX


     ddeessccrriippttiioonn ::
        Serveur d'affichage X de niveau commercial avec des
        fonctionnalits de classe station de travail comme afficheurs
        multiples, overlays, et correction gamma, FreeBSD, et Linux.  Le
        serveur Accelerated-X pilote les matriels graphiques les plus
        populaires, y compris les dernires cartes de Dell, IBM,
        Toshiba, et Neo Magic.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Par CPU.

     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problme connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Manuel de 100 pages reli.

     SSuuppppoorrtt pprroodduuiitt ::
        Support illimit inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


           1801 Broadway, Suite 1710 Denver, CO 80202 tats-Unis.




     TTllpphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        14 aot 1997.


  1199..55..  MMaaXXiimmuumm ccddee DDeevveellooppeerr''ss EEddiittiioonn vv11..00


     ddeessccrriippttiioonn ::
        Un bureau rseau complet qui permet aux administrateurs
        d'intgrer des PC standard dans des rseaux Unix existants avec
        une meilleure internationalisation et les mmes fonctionnalits
        que sur des stations plus chres.  Inclut aussi des outils de
        dveloppement.

     SSuuppppoorrtt ::
        CD-ROM.
     SSyyssttmmee ddee lliicceennccee ::
        Par CPU.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problme connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Manuel de 100 pages reli pour Accelerated-X et manuel de
        300 pages reli pour CDE.

     SSuuppppoorrtt pprroodduuiitt ::
        Support illimit inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


           1801 Broadway, Suite 1710 Denver, CO 80202 tats-Unis.




     TTllpphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        14 aot 1997.


  1199..66..  SSeerrvveeuurr dd''aaffffiicchhaaggee MMuullttii--tttteess AAcccceelleerraatteedd--XX


     ddeessccrriippttiioonn ::
        Serveur d'affichage X de niveau commercial avec des
        fonctionnalits de classe station de travail comme afficheurs
        multiples, overlays, et correction gamma pour FreeBSD et Linux.
        Le serveur Accelerated-X pilote les matriels graphiques les
        plus populaires, y compris les dernires cartes de
        Colorgraphics, STB, et Matrox.  En tout, plus de 10 cartes
        diffrentes supportes.


     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Par CPU.

     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problme connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Manuel de 100 pages reli.

     SSuuppppoorrtt pprroodduuiitt ::
        Support d'installation inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


           1801 Broadway, Suite 1710 Denver, CO 80202 tats-Unis.




     TTllpphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        14 aot 1997.


  1199..77..  SSeerrvveeuurr dd''aaffffiicchhaaggee OOppeennGGLL AAcccceelleerraatteedd--XX


     ddeessccrriippttiioonn ::
        Serveur d'affichage X de niveau commercial avec des
        fonctionnalits de classe station de travail comme afficheurs
        multiples, overlays, et correction gamma pour FreeBSD et Linux.
        Le serveur Accelerated-X pilote les matriels graphiques les
        plus populaires, y compris les dernires cartes de ATI, Diamond,
        Matrox, NeoMagic, Number 9, et S3.  La dernire version de
        OpenGL de Silicon Graphics Inc.  En tout, plus de 450 cartes
        diffrentes supportes.


     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Par CPU.

     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problme connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Manuel de 100 pages reli.

     SSuuppppoorrtt pprroodduuiitt ::
        Support d'installation inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


           1801 Broadway, Suite 1710 Denver, CO 80202 tats-Unis.




     TTllpphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        14 aot 1997.


  1199..88..  MMoottiiff cceerrttiiffii OOSSFF


     ddeessccrriippttiioonn ::
        Une licence Motif complte certifie OSF avec environnement de
        dveloppement.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttmmee ddee lliicceennccee ::
        Par CPU.


     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problme connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Notes de version qui incluent des rfrences  d'excellents
        manuels de rfrences commerciaux.

     SSuuppppoorrtt pprroodduuiitt ::
        Support d'installation inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


          1801 Broadway,
          Suite 1710
          Denver, CO 80202
          tats-Unis.




     TTllpphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        14 aot 1997.


  2200..  AAuuttrreess llooggiicciieellss


  2200..11..  AABBAACCUUSS 44


     ddeessccrriippttiioonn ::
        Le systme de contrle de processus ABACUS 4 est un systme
        logiciel par blocs destin au contrle de processus temps rel
        industriels et autres.


     SSuuppppoorrtt ::
        Disponible sur http://www.arosnet.se/bbab/abacus-4.980708.tar.gz


     SSyyssttmmee ddee lliicceennccee ::
        Licence par machine


     CCoonnffiigguurraattiioonn OOSS ::
        Test sur Slackware 3.4, devrait fonctionner sur toute
        distribution de Linux.


     DDooccuummeennttaattiioonn ::
        Le manuel de rfrence est en HTML et inclus dans le produit.
        Il est consultable  :
        http://www.arosnet.se/bbab/abacusmanual/index.html


     SSuuppppoorrtt pprroodduuiitt ::
        Support e-mail.


     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier


     OOrrddrree ddee pprriixx ::
        USD 1 995 par processeur, remises par quantits.


     VVeennddeeuurr ::
        McHedlund Associates


          c/o Bristol Babcock AB
          Fallhammargatan 2a
          S-72133 Vsters
          Sude





     TTllpphhoonnee ::
        +46 21 350450


     FFaaxx ::
        +46 21 350455


     EE--mmaaiill ::
        abacusabacus@hotmail.com abacus4@geocities.com


     UURRLL ::
        http://www.geocities.com/Eureka/Enterprises/2275/abacus4.html


     CCoonnttaacctt ::
        Franck McNamara


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        12 juillet 1998.
  2200..22..  BBBBBBSS


     ddeessccrriippttiioonn ::
        Paquetage BBS complet avec support complet InterNet et FidoNet.
        RNIS, courrier, processeur de courrier, TICK, AllFix, telnet,
        FTP, finger, nouvelles, courrier lectronique, passerelle, hors-
        ligne, VT320, ANSI, multilingue, multi-noeuds, Mg, diteur plein
        cran complet, multi-tches, CD-ROM, HYDRA, Zmodem, kermit,
        BZLink, TCP/IP, vocal, fax, jeux de caractres, comptes, IRC, et
        beaucoup, beaucoup plus.  Tout ce qu'il faut pour faire un BBS !


     SSuuppppoorrtt ::
        Disquettes 3,5 pouces et InterNet (FTP et web)


     SSyyssttmmee ddee lliicceennccee ::
        Base par noeud. La version shareware peut tre tlcharge
        depuis http://www.bbbs.net

     CCoonnffiigguurraattiioonn OOSS ::
        La version en cours, 3.33, est pour la libc5.  La prochaine
        version et la bta en cours sont pour la libc6.


     DDooccuummeennttaattiioonn ::
        Documentation ASCII et HTML en anglais.


     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        De nombreux utilitaires tierce partie.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier


     OOrrddrree ddee pprriixx ::
        USD 60 pour une licence deux noeuds.


     VVeennddeeuurr ::
        Foobar Oy



          Paavolankatu 3 D 34
          FIN-20240 Turku
          Finlande





     TTllpphhoonnee ::
        +358 2 240 1513


     FFaaxx ::
        +358 2 240 7755


     EE--mmaaiill ::
        b@bbs.net

     UURRLL ::
        http://www.bbs.net


     CCoonnttaacctt ::
        Kim Heino


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        2 aot 1998.



  2200..33..  CClluussttoorr


     ddeessccrriippttiioonn ::
        Clustor est un programme de gestion de vastes tches de calcul.
        Clustor simplifie grandement les activits intenses de calculs
        classiques en excutant de nombreuses fois le mme programme
        avec des valeurs d'entre diffrentes.  Clustor permet une
        augmentation de performances par la distribution des travaux sur
        le rseau et une gestion de tches amliore par une IHM
        agrable.

        Cibl pour les utilisateurs qui excutent des tches lourdes de
        calcul, Clustor supporte toutes les phases de l'excution de
        celles-ci : prparation, gnration de travail et excution de
        celui-ci.  Avec Clustor, les utilisateurs qui n'ont pas de
        connaissances particulires de programmation d'applications
        parallles, tels que les scientifiques, ingnieurs et chercheurs
        sont en mesure d'utiliser la puissance d'ordinateurs en rseau.

     SSuuppppoorrtt ::
        InterNet (web).  CD-ROM optionnel.

     SSyyssttmmee ddee lliicceennccee ::
        Une licence de dmonstration gratuite limite en fonctionnalits
        et une autre complte limite  30 jours sont disponibles sur
        notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2 ou suprieur.

     DDooccuummeennttaattiioonn ::
        Site web, documentation imprime en option.

     SSuuppppoorrtt pprroodduuiitt ::
        Support e-mail.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Fonctionnalit de suivi de charge et de partage de ressources,
        programme d'installation rseau.

     DDiissppoonniibbllee ddeeppuuiiss ::
        fvrier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier

     OOrrddrree ddee pprriixx ::
         partir de USD 495.

     VVeennddeeuurr ::
        Active Tools Inc.

     246 First Street, Suite 310
     San Francisco, CA 94105
     tats-Unis.




     TTllpphhoonnee ::
        +1 415 882 7062

     FFaaxx ::
        +1 415 680 2369

     EE--mmaaiill ::
        info@activetools.com

     UURRLL ::
        http://www.activetools.com

     CCoonnttaacctt ::
        Rok Sosic, Sergij Foski

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.


  2200..44..  FFoooottPPrriinnttss


     ddeessccrriippttiioonn ::
        Le premier systme logiciel de hotline fond sur le web.  Trace
        problmes et solutions, tickets d'incidents -- toute information
        que vous devez grer -- et la rend disponible  vos clients ou
        utilisateurs par le web.  Rside sur serveur web Unix ou NT ;
        accs indpendant de la plate-forme par n'importe quel butineur
        web.

     SSuuppppoorrtt ::
        InterNet (FTP et web).  Aussi disponibles : 3.5" disquettes et
        cartouche.

     SSyyssttmmee ddee lliicceennccee ::
        valuation gratuite disponible  http://www.unipress.com/cgi-
        bin/free_evals ou ftp://ftp.unipress.com/pub/free_evals.

        Base par utilisateur.

     CCoonnffiigguurraattiioonn OOSS ::
        Tout Linux avec un serveur web.

     DDooccuummeennttaattiioonn ::
        Manuel/aide en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        15% du prix d'achat pour maintenance et mises  jour.  Support
        technique par web et tlphone gratuit.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1er janvier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 1 995 par starter pack (logiciel serveur plus 3 licences
        utilisateur).  Les licences peuvent tre groupes (par nombre
        d'utilisateurs ayant accs  votre hotline, i.e. tous vos
        clients utilisent une seule licence groupe) ou individuelles
        (les ingnieurs et administrateurs hotline doivent tre
        titulaires chacun d'une licence individuelle).

     VVeennddeeuurr ::
        UniPress Software, Inc.


           2025 Lincoln Highway Edison, NJ 08817 tats-Unis.




     TTllpphhoonnee ::
        +1 800 222 0550, +1 732 287 2100

     FFaaxx ::
        +1 732 287 4929

     EE--mmaaiill ::
        info@unipress.com

     UURRLL ::
        http://www.unipress.com/footprints

     CCoonnttaacctt ::
        Sue Glassberg <sue@unipress.com>

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        4 aot 1997.


  2200..55..  AAllaaddddiinn GGhhoossttssccrriipptt


     ddeessccrriippttiioonn ::
        Interprteur PostScript, PDF, PCL5e (2Q97), PCL5c (2Q97), et PCL
        XL.  Permet une prvisualisation sous X-Window, la conversion
        vers une demi-douzaine de formats de fichiers graphiques, et la
        sortie sur des quantits d'imprimantes.  Fonctionne dans tous
        les environnements systme, pas seulement Linux et sur tout
        processeur (32- ou 64-bit) muni d'un compilateur C.  Peut
        piloter des priphriques noir et blanc, RVB, et CMJN, aussi
        bien en deux niveaux qu'en tons continus.  Pour plus
        d'information, voir http://www.cs.wisc.edu/~ghost/index.html.
        Notez que Aladdin Ghostscript est un produit OEM seulement : les
        licences utilisateur ne sont pas disponibles (ni ncessaires,
        puisque le produit est libre pour les utilisateurs finaux), ni
        le support utilisateur.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttmmee ddee lliicceennccee ::
        Base par CPU en principe.  La licence inclut normalement code
        source, mises  jour, et support.

     CCoonnffiigguurraattiioonn OOSS ::
        X11R5 ou suprieur ncessaire pour la prvisualisation X-Window.
        Des modules spcifiques systme sont disponibles pour Unix (y
        compris Linux), VMS, MS Windows (y compris Windows NT), OS/2, et
        Macintosh.  Le portage vers d'autres systmes est simple :
        toutes les dpendances sont regroupes dans un seul fichier de
        typiquement moins de 10 lignes de codes.

     DDooccuummeennttaattiioonn ::
        documentation en ligne seulement, en anglais.  Actuellement en
        texte ASCII simple ; les versions texinfo et HTML sont en
        prparation.

     SSuuppppoorrtt pprroodduuiitt ::
        Normalement inclus avec la licence ; par e-mail, tlphone et
        fax.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Chaque langage d'entre est tarif sparment, avec une remise
        pour plusieurs langages.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1988 en logiciel libre, 1991 commercialement.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Ngoci pour chaque client.

     VVeennddeeuurr ::
        Artifex Software Inc.


          454 Las Gallinas Avenue, Suite 108
          San Rafael, CA 94903
          tats-Unis.




     TTllpphhoonnee ::
        +1 415 492 9861

     FFaaxx ::
        +1 415 492 9862

     EE--mmaaiill ::
        info@arsoft.com

     UURRLL ::
        http://www.cs.wisc.edu/~ghost/index.html

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        30 septembre 1997.


  2200..66..  MMaaggiicciiaann


     ddeessccrriippttiioonn ::
        Magician est une interface Java hautes performances pour les
        implmentations natives OpenGL permettant le dveloppement
        d'applications OpenGL sophistiques en Java.


     SSuuppppoorrtt ::
        CD-ROM et InterNet (WWW).


     SSyyssttmmee ddee lliicceennccee ::
        Gratuit pour un usage personnel.  Une licence individuelle est
        disponible permettant un support technique plus rapide ainsi que
        le logiciel sur support CD pour toutes les plateformes et un
        manuel imprim.  Les utilisateurs commerciaux doivent possder
        une licence d'utilisation.  Des licences source sont aussi
        disponibles.


     CCoonnffiigguurraattiioonn OOSS ::
        Fonctionne sur Linux (libc5 et glibc).


     DDooccuummeennttaattiioonn ::
        Rfrence des API javadoc librement tlchargeable.  Guide du
        Programmeur librement tlchargeable.


     SSuuppppoorrtt pprroodduuiitt ::
        Support par e-mail, tlphone et fax.  Il existe des listes de
        diffusion inter-dveloppeurs.  L'achat d'une licence
        (personnelle ou commerciale) donne la priorit d'accs au
        support.


     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Support de tous les appels OpenGL 1.1 GL et GLU.  De nombreuses
        fonctionnalits de Aux et GLUT ont aussi t transpose dans
        l'environnement Java.  Support intgr simple des vues
        multiples.  Rendement multi-thread.  Support des appels directs
        OpenGL ou des mthodes polymorphiques.


     DDiissppoonniibbllee ddeeppuuiiss ::
        10 juin 1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        Licence individuelle : USD 35 Licence commerciale : USD 200 par
        jeu.  Prix de la licence source disponible sur demande.


     VVeennddeeuurr ::
        Arcane Technology Ltd.



          P.O. Box 3738
          Glasgow, G41 4YD
          cosse
          Royaume-Uni





     TTllpphhoonnee ::
        +44 141 423 3449


     FFaaxx ::
        +44 141 423 3449


     EE--mmaaiill ::
        magician-sales@arcana.co.uk
     UURRLL ::
        http://www.arcana.co.uk/products/magician


     CCoonnttaacctt ::
        Alligator Descartes


     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        12 juillet 1998.



  2200..77..  jjoouurrnnyyxx WWeebbTTiimmee


     ddeessccrriippttiioonn ::
        Un logiciel de suivi de temps et de prsence fond sur le web.
        Il est possible d'enregistrer et de ressortir les temps de
        prsence d'employs partout dans le monde  l'aide de la
        puissance d'InterNet, ou dans toute votre entreprise sur votre
        intranet.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        Gratuit pour les 60 premiers jours d'utilisation, USD 1 000 plus
        USD 25 par utilisateur ensuite.

     CCoonnffiigguurraattiioonn OOSS ::
        Fonctionne sur toute version de Linux.

     DDooccuummeennttaattiioonn ::
        Toute la documentation est en ligne au format HTML et incluse
        avec le produit.

     SSuuppppoorrtt pprroodduuiitt ::
        15% du prix d'achat par anne.

     llmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Fonctionne avec tout navigateur, y compris ceux en mode texte
        comme lynx.  Export ais de donnes vers Microsoft Excel ou
        Quickbooks.  Serveur web et moteur de base de donnes gratuits
        inclus dans le paquetage.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1er aot 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        De USD 1 000  USD 10 000

     VVeennddeeuurr ::
        journyx


          6716 Beauford Drive
          Austin, TX 78750
          tats-Unis.




     TTllpphhoonnee ::
        +1 512 345 8282

     FFaaxx ::
        +1 512 342 9379

     EE--mmaaiill ::
        info@journyx.com

     UURRLL ::
        http://journyx.com

     CCoonnttaacctt ::
        Curt Finch

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        24 octobre 1997.


  2200..88..  LLaannSSaaffee


     ddeessccrriippttiioonn ::
        LanSafe III est une application de gestion d'onduleur.  Elle
        fournit les fonctionnalits d'arrt automatique correct en cas
        de panne de courant de longue dure qui risque de dpasser la
        capacit de sauvegarde des batteries.  LanSafe III permet les
        messages broadcast et l'envoi d'e-mail selon les modifications
        des conditions d'alimentation secteur dfinies par
        l'utilisateur.

     SSyyssttmmee ddee lliicceennccee ::
        LanSafe III est fourni en paquetage avec les onduleurs d'Exide
        Electronics suivants :

       OneUPS Plus ;

       NetUPS ;

       PowerWare Prestige ;

       PowerWare Profile ;

       PowerWare Plus 5xx.

        Il est aussi envoy avec les onduleurs FPS Power Systems :

       PowerRite Plus ;

       PowerRite Max ;

       PowerWorks30 ;

       PowerWorks40 ;

       sries 9 000 ;

       sries 10 000.

        Il est aussi possible d'acqurir une licence spare pour
        l'utilisation avec un des modles pr-cits ou des onduleurs
        d'autres constructeurs.


     CCoonnffiigguurraattiioonn OOSS ::
        Linux noyau 2.0.  Les interfaces sont fournies pour X/Motif et
        en mode caractre.

     DDooccuummeennttaattiioonn ::
        Aide et manuel en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Disponible.

     EEllmmeennttss eett ppoossssiibbiilliittss ssuuppppllmmeennttaaiirreess ::
        Support d'onduleurs d'autres marques.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 149.

     VVeennddeeuurr ::
        Exide Electronics


          8609 Six Forks Road
          Raleigh, NC 27615
          tats-Unis.




     VVeennddeeuurr ((EEuurrooppee,, mmooyyeenn--oorriieenntt,, AAffrriiqquuee)) ::
        Exide Electronics S.A.


          MPL House, Prescott Road
          Poyle, Colnbrook
          Berkshire, SL3 0AE
          Royaume Uni




     TTllpphhoonnee ::
        +1 800 554 3448, +1 919 872 3020, +44 1753 686200

     FFaaxx ::
        +1 800 75 EXIDE, +44 1753 686827

     EE--mmaaiill ::
        info@exide.com, mailto:info@deltecpower.com,
        mailto:sales_support@exide.co.uk,

     UURRLL ::
        http://www.exide.com, http://www.deltecpower.com,
        http://www.fpsUPS.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        12 ctobre 1997.


  2200..99..  LLjjeettMMggrr


     ddeessccrriippttiioonn ::
        Les imprimantes Hewlett-Packard (aussi bien laser que jet
        d'encre) disposent d'un jeu tendu d'options configurables.  Ces
        options sont normalement configures pas le panneau frontal de
        l'imprimante.

        Les options principales sont :

       mode conomique pour conomiser du toner ;

       mode conomie d'nergie ;

       slection de format de page ;

       police/jeu de caractres et slection de langue.

        Avec LjetManager il est possible de modifier ces options
        directement  l'cran.  C'est particulirement pratique pour les
        imprimantes sans panneau frontal (comme la LaserJet 5L) ou si
        l'on dispose de plusieurs imprimantes.

        LjetManager prsente une IHM graphique, internationalisable et
        est fourni avec une documentation et des pages d'aide au format
        HTML.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, InterNet (e-mail et web).

     SSyyssttmmee ddee lliicceennccee ::
        Une version de dmonstration de LjetMgr est disponible 
        l'emplacement suivant et sur les sites miroirs correspondants :
        ftp://sunsite.unc.edu/pub/Linux/system/Printing. Jetez un coup
        d'oeil  ljetmgr-2.6.README et les fichiers d'accompagnement.

     CCoonnffiigguurraattiioonn OOSS ::
        Ncessite une imprimante qui supporte PJL.  Disponible pour
        Linux sur Intel.

     DDooccuummeennttaattiioonn ::
        Aide contextuelle complte et documentation au format HTML.  Une
        version PostScript est disponible sur demande.

     SSuuppppoorrtt pprroodduuiitt ::
        Le tarif inclut le support d'installation et une anne de mises
         jour gratuites.  Support additionnel disponible sur demande.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter softWorks pour les tarifs actuels.  Remises ducation.

     VVeennddeeuurr ::
        softWorks, Richard Schwaninger


           Theodor-Krnerstr.
          173 A-8010 Graz Autriche




     TTllpphhoonnee ::
        +43 316 686590

     FFaaxx ::
        +43 316 686590

     EE--mmaaiill ::
        risc@ping.at

     UURRLL ::
        http://members.ping.at/risc

     CCoonnttaacctt ::
        Richard Schwaninger

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        7 aot 1997.


  2200..1100..  SSyynncchhrroonniizzee//CCyybbeerrSScchheedduulleerr


     ddeessccrriippttiioonn ::
        Logiciel d'ordonnancement pour rseaux locaux, tendus et
        intranets.

     SSuuppppoorrtt ::
        InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        Base par utilisateur.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux.

     DDooccuummeennttaattiioonn ::
        Jetez un coup d'oeil  notre site web.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1989.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 100 par utilisateur.

     VVeennddeeuurr ::
        Crosswind Technologies, Inc.


          1505 Ocean street, Suite 1
          Santa Cruz, CA 95060
          tats-Unis




     TTllpphhoonnee ::
        +1 408 469 1780

     FFaaxx ::
        +1 408 469 1750

     EE--mmaaiill ::
        info@crosswind.com

     UURRLL ::
        http://www.crosswind.com
     CCoonnttaacctt ::
        Anne Becker

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        13 novembre 1997.


  2211..  LLooggiicciieell lliibbrree ppoouurr mmaattrriieell ccoommmmeerrcciiaall

  Cette section recouvre le logiciel libre (e.g. pilotes) pour des
  matriels spcialiss.

  2211..11..  CCaarrtteess ssrriiee mmuullttii--ppoorrttss SSttaalllliioonn TTeecchhnnoollooggiieess


     ddeessccrriippttiioonn ::
        Stallion fournit un support Linux pour ses gammes de cartes
        multi-ports EasyIO et EasyConnection.  EasyIO est disponible
        soit avec 4 ports srie asynchrone avec connecteurs RJ45, soit 8
        ports srie asynchrone avec connecteurs RJ45 ou DB25.  EasyIO
        supporte des vitesses de transfert jusqu' 145 kbps ou 460 kbps
        par port (selon le modle) et la signalisation modem complte.
        Des pilotes sont disponibles pour de nombreux systmes sur
        Intel, y compris Linux.  EasyIO est disponible pour le bus ISA.

        EasyConnection est une solution multi-ports extensible qui
        fournit 8  64 ports srie asynchrone par incrments de 8 ou 16
        ports.  Les connecteurs RJ45 et DB25 sont disponibles.  Les
        fonctions incluent la suppression des surtensions, la
        signalisation modem complte et des vitesses de transfert
        jusqu' 145 Kbit/s or 460 Kbit/s par port (selon la version).
        EasyConnection est disponible pour les bus ISA, EISA et PCI.

     SSuuppppoorrtt ::
        InterNet (FTP).

     SSyyssttmmee ddee lliicceennccee ::
        Le pilote Linux est disponible gratuitement et est couvert par
        la Licence Publique Gnrale GNU (GPL).  Le code source est
        fourni.

     CCoonnffiigguurraattiioonn OOSS ::
        Le pilote le plus courant supporte toutes les versions de noyau
        2.0.x.  Les pilotes sont mis  jour rgulirement pour rester en
        concordance avec les modifications de noyaux.

     DDooccuummeennttaattiioonn ::
        Documentation de rfrence matrielle fournie avec les cartes.
        Le paquetage pilote Linux contient un fichier README avec les
        informations d'installation et d'utilisation.

     SSuuppppoorrtt pprroodduuiitt ::
        Stallion Technologies supporte maintenant compltement les
        pilotes Linux pour cartes Stallion.  Les mises  jour
        logicielles sont disponibles sur InterNet.  Stallion fournit
        aussi le support technique pour le matriel.  Contacter support
        Stallion pour toute assistance.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.  Disponible dans de nombreux pays.

     OOrrddrree ddee pprriixx ::
        Les tarifs des cartes varient selon le pays.  Contacter le
        bureau local Stallion Technologies pour la disponibilit et les
        tarifs locaux.  Le paquetage pilote contient un fichier
        d'information sur les bureaux locaux Stallion Technologies.

     VVeennddeeuurr ::
        Stallion Technologies Pty Ltd.


           2880 Research Park Drive, Suite 160 Soquel, CA 95073 tats-Unis.




     TTllpphhoonnee ::
        +1 800 347 7979

     FFaaxx ::
        +1 408 477 0444

     EE--mmaaiill ::
        info@stallion.com

     UURRLL ::
        http://www.stallion.com

     FFTTPP ::
        ftp://ftp.stallion.com

     DDeerrnniirree mmooddiiffiiccaattiioonn ::
        30 septembre 1997.




































  traduction $Rvision: 1.2 $ du 18 dcembre 1998 Configura
  tion HOWTO (en franais)
  Guido Gonzato <mailto:guido@ibogfs.cineca.it> (traduit en
  franais par Basile Starynkvitch <mailto:basile.starynke
  vitch@cea.fr> et Arnaud Gomes-do-Vale
  <mailto:gomesdv@mail.dotcom.fr>)
  v1.2.2, 10 avril 1998

  Ce HOWTO vise  rendre plus faciles et plus rapides les rglages fins
  de votre systme Linux nouvellement install. Vous trouverez ici un
  jeu de configurations pour les applications les plus courantes, de
  faon  pouvoir bien travailler sur un systme agrable  utiliser.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Pourquoi ce HOWTO
     1.2 Ce que nous allons configurer

  2. Configuration gnrale du systme

     2.1 Clavier
     2.2  propos du noyau
     2.3 Blocage de
     2.4 Optimisation des disques durs
     2.5 Lecteur Zip sur port parallle
     2.6 Pilotes de priphriques
     2.7 Messages de dmarrage
     2.8 Nom de machine
     2.9 La souris
     2.10 Rpertoires de montage
     2.11 (TT
        2.11.1 Un conseil de prudence
     2.12 Configuration d'imprimante

  3. Configuration des logiciels

     3.1 bash(1)
     3.2 ls(1)
     3.3 less(1)
     3.4 emacs(1)
     3.5 joe(1)
     3.6 jed(1)
     3.7 (TT
     3.8 TeX et compagnie
     3.9 PPP
     3.10 Client POP
     3.11 Systme de Fentrage X
     3.12 Fortran
     3.13 Configurations utilisateurs
     3.14 Mise  jour

  4. Fin

     4.1 Copyright
     4.2 Ractions
     4.3 Dcharge


  ______________________________________________________________________



  11..  IInnttrroodduuccttiioonn

  11..11..  PPoouurrqquuooii ccee HHOOWWTTOO

  J'ai install Linux sur de nombreux PC, et j'ai not que les
  distributions actuelles sont formidables, mais, hlas, manquent
  souvent de configurations mme les plus simples. La plupart des
  programmes fonctionnent ds le dpart, mais pas tous. De plus, j'ai
  remarqu que les mmes questions reviennent sans cesse sur
  comp.os.linux.setup.

  Pour essayer de remdier  cette situation, et pour avoir un aide-
  mmoire pour les nouvelles installations, j'ai crit une liste des
  choses  faire, qui est ensuite devenue ce HOWTO. Vous y trouverez
  donc un certain nombre d'exemples de configurations pour les
  applications, les programmes et les services les plus courants, qui
  devraient vous conomiser pas mal de temps et de travail.

  Quelques uns des exemples dcrits dans ce HOWTO dpendent dans une
  certaine mesure de la distribution utilise. Je n'ai accs qu' des
  machines tournant sous Red Hat et Caldera OpenLinux, donc ne prenez
  pas mes conseils comme parole d'vangile si vous avez une Slackware,
  une Debian ou toute autre distribution. Dans tous les cas, lire la
  documentation et les HOWTO est toujours payant, donc il est conseill
  de le faire de toute faon.


  11..22..  CCee qquuee nnoouuss aalllloonnss ccoonnffiigguurreerr

  Il peut y avoir beaucoup de configurations matrielles pour un PC,
  mais d'aprs moi voici la plus frquente: un PC avec un gros disque
  dur, divis en trois partitions (une pour DOS/Windows, une pour Linux,
  une pour la pagination [swap]), une carte son, un modem, un lecteur de
  CD-ROM, une imprimante, une souris. Un lecteur Zip sur port parallle
  est galement de plus en plus courant.

  C'est le matriel que je suppose que vous avez  configurer, mais il
  est facile de l'adapter  d'autres configurations. Il est sous-entendu
  que vous tes super-utilisateur root lorsque vous ditez, configurez,
  bidouillez.

  Et maintenant, les gars, au boulot!


  22..  CCoonnffiigguurraattiioonn ggnnrraallee dduu ssyyssttmmee

  22..11..  CCllaavviieerr

  D'abord, comment configurer le clavier. Si vous avez rat cette tape
   l'installation ou si vous avez chang de clavier, vous devez :


    Choisir une table de clavier adquate dans /usr/lib/kbd/keytables/;
     par exemple, fr-latin1.map y dsigne le clavier franais Azerty.

    Editer le fichier /etc/sysconfig/keyboard pour qu'il contienne:

     KEYTABLE="/usr/lib/kbd/keytables/fr-latin1.map"



    Pour configurer le taux de rptition et le dlai du clavier,
     ajouter cette ligne dans /etc/rc.d/rc.sysinit ou, si vous tes sous
     Caldera, /etc/rc.d/rc.boot:


  /sbin/kbdrate -s -r 16 -d 500  # ce que vous voulez






  Au prochain redmarrage, votre clavier fonctionnera convenablement.
  Pour recharger la configuration du clavier sans avoir  rinitialiser
  la machine, placez-vous dans /etc/rc.d/init.d et tapez la commande
  ./keytable start.





  22..22..   pprrooppooss dduu nnooyyaauu

   mon avis, la premire chose  faire ensuite est la fabrication d'un
  noyau bien adapt  votre systme. C'est trs simple  faire, mais,
  quoi qu'il en soit consultez le fichier README dans  </usr/src/linux/>
  ou le Kernel-HOWTO. Quelques conseils :


    dterminez prcisment vos besoins. C'est plus productif de choisir
     un noyau appropri, d'y appliquer les rustines (patches) et de le
     recompiler une fois pour toutes, plutt que de reconfigurer et
     recompiler tous les mois; ceci est particulirement vrai si votre
     machine Linux est un serveur. N'oubliez pas d'inclure le support de
     tout matriel que vous envisagez d'ajouter plus tard (SCSI, Zip,
     cartes rseau, etc);

    si votre PC est quip d'un processeur Cyrix, appliquez les
     rustines appropries pour en amliorer les performances. Voir
     <http://www.linuxhq.com/patch/20-p0591.html> ;

    les utilisateurs de portables voudront amliorer la lisibilit de
     leur cran LCD en appliquant la rustine noblink. La dernire
     version s'appelle noblink-X.X.tar.gz et est disponible sur
     <ftp://sunsite.unc.edu/pub/Linux/kernel/patches/console>.
     Installez le paquetage, puis ajoutez la ligne suivante  votre
     /etc/profile:



       /usr/local/bin/cursor bgreen  # ou une autre couleur





    sur un portable, si vous pensez utiliser un modem/fax PCMIA, ne
     compilez pas le pilote srie en module, mais directement dans le
     noyau, sinon votre modem PCMIA ne fonctionnera pas;

    Rappelez-vous que Linux ne verra votre carte son que si vous la
     configurez correctement. Dans la plupart des cas, c'est facile,
     mais pensez bien  activer toutes les options ncessaires
     (n'oubliez pas /dev/dsp et /dev/audio);

    Si vous voyez ces ennuyeux messages de modprobe qui indiquent que
     certains modules n'ont pas pu tre trouvs, a veut dire que votre
     /etc/conf.modules a besoin d'un rafistolage. Si vous n'utilisez pas
     les modules Appletalk et IPX, ajoutez ces lignes:


  alias net-pf-4 off
  alias net-pf-5 off





    Pour gagner du temps la prochaine fois que vous recompilerez le
     noyau, une bonne ide est de sauvegarder votre configuration dans
     un fichier que vous garderez dans un endroit sr.



  22..33..  BBllooccaaggee ddee sseennddmmaaiill

  Sur certains systmes, sendmail bloque la machine au dmarrage.
  Vrifiez que votre fichier /etc/hosts contient une ligne



       127.0.0.1 localhost






  22..44..  OOppttiimmiissaattiioonn ddeess ddiissqquueess dduurrss

  Vous pouvez normment amliorer les performances de votre disque dur
  en utilisant _p_r_u_d_e_m_m_e_n_t hdparm(8). S'il n'est pas fourni avec votre
  distribution de Linux, vous pouvez le trouver sur
  <ftp://sunsite.unc.edu/pub/Linux/system/hardware>; cherchez un fichier
  appel hdparm-X.Y.tar.gz.



  22..55..  LLeecctteeuurr ZZiipp ssuurr ppoorrtt ppaarraallllllee

  Pour utiliser la version sur port parallle du lecteur Zip, vous
  pouvez utiliser le pilote par dfaut qui se trouve dans les noyaux
  2.x.x rcents. Pendant la configuration du noyau, n'oubliez pas de
  valider le support du SCSI et des disques SCSI (dans le noyau ou en
  tant que modules). Attention, il peut y avoir des conflits entre
  l'imprimante et le lecteur Zip s'ils se trouvent sur le mme port
  parallle.

  Les disquettes Zip sont vendues pr-formates sur la partition
  /dev/sda4. Pour faire fonctionner le Zip, il suffit de taper les
  commandes suivantes:



       ~# chmod 666 /dev/sda4  # tout le monde peut utiliser le lecteur Zip
       ~# insmod ppa




  Le Zip peut maintenant tre mont normalement (le mieux est de mettre
  la deuxime ligne dans /etc/rc.d/rc.sysinit). Vous pouvez aussi y
  accder avec les mtools en ajoutant la ligne suivante  votre
  /etc/mtools.conf:



  drive z: file="/dev/sda4" exclusive




  Cependant, il existe un meilleur pilote ppa: jetez un coup d'oeil 
  <http://www.torque.net/~campbell>



  22..66..  PPiillootteess ddee pprriipphhrriiqquueess

  Il peut manquer des priphriques en /dev/ (ou des liens vers les
  vritables priphriques). Vrifiez  quoi correspondent vos souris,
  modems, et lecteur de CDROM, puis procdez comme suit :



       ~#  cd /dev
       /dev#  ln -s /dev/cua0 mouse
       /dev#  ln -s /dev/cua1 modem
       /dev#  ln -s /dev/hdb cdrom




  et si vous le dsirez, faites un chmod 666 sur ces priphriques (les
  vrais priphriques, pas les liens!) pour les rendre accessibles 
  tous. Truc: sur certains portables, la souris est /dev/psaux; tenez en
  compte en configurant X11.

  De plus, vous aurez envie de rendre le lecteur de disquettes
  accessible  tous par la commande chmod 666 /dev/fd*.  Ceci peut
  entrainer des problmes de scurit, mais j'en ignore les dtails.
  Tout commentaire  ce propos est bienvenu.



  22..77..  MMeessssaaggeess ddee ddmmaarrrraaggee

  Si vous souhaitez personnaliser ces messages, vrifiez si votre script
  /etc/rc.d/rc.local crase les fichiers /etc/issue et /etc/motd; dans
  ce cas, ditez-le convenablement.



  22..88..  NNoomm ddee mmaacchhiinnee

  La commande hostname nouveau_nom ne suffit pas. Pour viter le blocage
  de sendmail, respectez les tapes suivantes:


    ditez /etc/sysconfig/network et changez-y le nom de la machine
     (par exemple nouveau_nom.localdomain).

    modifiez convenablement /etc/HOSTNAME

    rajoutez le nouveau nom dans la ligne suivante de /etc/hosts:



       127.0.0.1            localhost   nouveau_nom.localdomain




  22..99..  LLaa ssoouurriiss

  Le serveur de souris gpm est utile pour le copier/coller en mode
  console, et pour utiliser la souris dans certaines applications.
  Vrifiez que vous avez un fichier /etc/sysconfig/mouse qui contient :



       MOUSETYPE="Microsoft"
       XEMU3=yes




  De plus, vous devez avoir un fichier /etc/rc.d/init.d/gpm. Bien sr,
  il faut vous assurer que cette configuration correspond bien  votre
  souris.  Attention, sur certains portables MOUSETYPE vaut PS/2.

  Sous Caldera, tout ce que vous avez  faire est d'ajouter la ligne
  suivante  /etc/rc.d/rc.boot:



       /usr/bin/gpm






  22..1100..  RRppeerrttooiirreess ddee mmoonnttaaggee

  Il est pratique d'avoir des points de montage pour la disquette et
  d'autres priphriques. Par exemple, vous pouvez procder comme suit :



       ~#  cd /mnt
       /mnt#  mkdir a: ; mkdir floppy ; mkdir cdrom ; mkdir win ; mkdir zip




  Ceci cre des points de montage pour une disquette formate DOS, une
  disquette formate Ext2, un CDROM, la partition DOS, et le lecteur Zip
  du port parallle.


  Puis ditez le fichier /etc/fstab et ajoutez y les entres suivantes :



       /dev/fd0        /mnt/a:         msdos           user,noauto 0 1
       /dev/fd0        /mnt/floppy     ext2            user,noauto 0 1
       /dev/cdrom      /mnt/cdrom      iso9660         ro,user,noauto 0 1
       /dev/sda4       /mnt/zip        vfat            user,noauto 0 1
       /dev/hda1       /mnt/win        vfat            user,noauto 0 1





  Bien videmment, vous devez mettre le bon priphrique dans le premier
  champ. Pour accder aux partitions fat32, vous trouverez une rustine
  pour le noyau et des informations a
  <http://bmrc.berkeley.edu/people/chaffee/fat32.html>. NdT: La rustine
  n'est plus ncessaire depuis le noyau 2.0.34.



  22..1111..  lliilloo ((88)) eett LLooaaddLLiinn

  Beaucoup d'utilisateurs veulent que leur PC puisse faire tourner  la
  fois Linux et DOS/Windows, et veulent choisir au dmarrage quel
  systme utiliser. Supposons que /dev/hda1 contienne DOS/Windows,
  tandis que /dev/hda2 contienne Linux.

  Procdez alors comme suit :



       ~#  fdisk
       Using /dev/hda as default device!

       Command (m for help):a
       Partition number (1-4): 2

       Command (m for help):w

       ~#




  Ceci rend amorable (bootable) la partition Linux. Cette tape devrait
  tre effectue par activate quand on utilise le QuickInst de LILO,
  mais ne marche pas avec ma RedHat.


  Puis entrez le fichier /etc/lilo.conf suivant :


       boot = /dev/hda2
       compact
       delay = 50
       # message = /boot/bootmesg.txt  # crivez le votre
       root = current
       image = /boot/vmlinuz  # la premire entre lance Linux par dfaut
         label = linux
       other = /dev/hda1
         table = /dev/hda
         label = dos





  Maintenant lancez /sbin/lilo et c'est tout!  LILO tant une _p_a_r_t_i_e
  _c_r_i_t_i_q_u_e de votre installation, je vous invite vivement  en consulter
  la documentation.


  Pour dmarrer Linux depuis DOS sans un arrt explicite, mettez
  LOADLIN.EXE dans un rpertoire (de la partition DOS) inclus dans le
  chemin (path) du DOS, puis copiez votre noyau en C:\DOS\VMLINUZ par
  exemple. Le fichier de commandes LINUX.BAT suivant dmarrera Linux :






  rem   linux.bat
  smartdrv /C
  loadlin c:\dos\vmlinuz root=/dev/hda2 r




  Si vous utilisez Windows 95, modifiez les proprits de ce fichier
  pour qu'il s'excute en mode MS-DOS.


  22..1111..11..  UUnn ccoonnsseeiill ddee pprruuddeennccee

  Faire une copie de votre MBR avant d'installer Linux peut vous sauver
  la mise. Utilisez restorrb (inclus dans le paquetage FIPS) avant
  l'installation, ou utilisez une disquette de secours Linux et lancez
  cette commande:



       rescue:~# dd if=/dev/hda of=MBR bs=512 count=1




  puis faites au moins deux copies du fichier MBR sur des disquettes. En
  cas de dsastre, vous pourrez rinstaller votre ancien MBR avec la
  commande:



       rescue:~# dd if=/mnt/MBR of=/dev/hda bs=446 count=1




  en supposant que la disquette contenant le fichier MBR est monte sous
  /mnt. Vous pouvez galement utiliser la commande FDISK /MBR depuis une
  disquette de secours DOS.



  22..1122..  CCoonnffiigguurraattiioonn dd''iimmpprriimmaannttee

  Les distributions RedHat et Caldera contiennent un bon outil de
  configuration, printtool; si vous n'utilisez pas ces distributions,
  voici la configuration manuelle.


  On suppose que vous avez une imprimante non-PostScript que vous
  utilisez pour imprimer du texte brut (par exemple du source en C) et
  des fichiers PostScript avec _G_h_o_s_t_S_c_r_i_p_t qui est suppos tre dj
  install.


  Installer votre imprimante demande quelques tapes :

    Vrifiez sur quel port parallle elle se trouve; essayez




        ~# echo "hello, world" > /dev/lp0
        ~# echo "hello, world" > /dev/lp1


  et notez laquelle de ces 2 commandes marche.

    Crer deux rpertoires-tampons



       ~#  cd /var/spool/lpd
       /var/spool/lpd/#  mkdir raw ; mkdir postscript





    Si votre imprimante imprime en escalier (comme la plupart des jets
     d'encre) vous avez besoin d'un filtre. Essayez d'imprimer deux
     lignes avec :




        ~# echo "premiere ligne" > /dev/lp1 ; echo "deuxieme ligne" > /dev/lp1





  Si la sortie est de la forme



       premiere ligne
                     deuxieme ligne




  c'est que vous avec besoin du filtre. Crez alors un fichier
  /var/spool/lpd/raw/filter contenant




       #!/bin/sh
       # fichier /var/spool/lpd/raw/filter
       # Ce filtre d'impression supprime l'effet d'escalier
       awk '{print $0, "\r"}'





  puis rendez-le excutable par chmod 755 /var/spool/lpd/raw/filter.

    Faites un filtre pour l'mulation PostScript. Crez le fichier
     /var/spool/lpd/postscript/filter contenant :











  #!/bin/sh
  # fichier /var/spool/lpd/postscript/filter
  DEVICE=djet500
  RESOLUTION=300x300
  PAPERSIZE=a4
  SENDEOF=

  nenscript -TUS -ZB -p- |
  if [ "$DEVICE" = "PostScript" ]; then
          cat -
  else
          gs -q -sDEVICE=$DEVICE \
                  -r$RESOLUTION \
                  -sPAPERSIZE=$PAPERSIZE \
                  -dNOPAUSE \
                  -dSAFER \
                  -sOutputFile=- -
  fi

  if [ "$SENDEOF" != "" ]; then
          printf "\004"
  fi





  (dans cet exemple on suppose une imprimante HP DeskJet. Adaptez-le 
  la vtre).

    Enfin, ajoutez les entres suivantes dans /etc/printcap :




       # entres dans /etc/printcap
       lp|ps|PS|PostScript|djps:\
               :sd=/var/spool/lpd/postscript:\
               :mx#0:\
               :lp=/dev/lp1:\
               :if=/var/spool/lpd/postscript/filter:\
               :sh:
       raw:\
               :sd=/var/spool/lpd/raw:\
               :mx#0:\
               :lp=/dev/lp1:\
               :if=/var/spool/lpd/raw/filter:\
               :sh:





  Pour des configurations d'imprimante plus complexes ou plus exotiques,
  le Printing-HOWTO vous attend.


  Utilisateurs de RedHat: sachez que le GSDEVICE choisi par printtool
  fonctionne, mais n'est pas forcment le meilleur pour votre
  imprimante. Vous pouvez envisager de bricoler le fichier
  postscript.cfg; j'y ai chang GSDEVICE de cdj500en djet500 et mes
  impressions sont maintenant beaucoup plus rapides.




  33..  CCoonnffiigguurraattiioonn ddeess llooggiicciieellss

  Voici la liste des fichiers de configuration que nous allons modifier:
  /etc/profile /etc/bashrc .bashrc .bash_profile .inputrc .less .lessrc
  .xinitrc .fvwmrc .fvwm2rc95 .Xmodmap .Xdefaults .jedrc. .abbrevs.sl
  .joerc .emacs. N'ajoutez pas d'utilisateurs avant d'avoir termin la
  configuration. Les fichiers dont le nom commence par un point iront
  dans /etc/skel.


  33..11..  bbaasshh((11))

  Pour affiner le comportement de bash, voici les fichiers  diter :


    /etc/bashrc contient les alias et fonctions globales au systme;

    /etc/profile positionne globalement les variables d'environnement
     et lance les programmes de dmarrage communs;

    $HOME/.bashrc contient les alias et fonctions propres 
     l'utilisateur;

    $HOME/.bash_profile positionne les variables d'environnement de
     l'utilisateur et lance ses programmes de dmarrage propres;

    $HOME/.inputrc contient les liaisons du clavier et autres bricoles.


  Voici des exemples de ces fichiers. D'abord le plus important :
  /etc/profile qui configure beaucoup de proprits de votre systme,
  comme illustr ci-dessous :


































  ______________________________________________________________________

  # /etc/profile

  # Environnement global au systme et programmes de dmarrage
  # Les fonctions et alias vont dans /etc/bashrc

  # Ce fichier configure globalement
  #
  #   o le chemin d'excution (path)
  #   o les invites (prompts)
  #   o quelques variables d'environnement
  #   o ls en couleurs
  #   o comportement de less
  #
  # Les utilisateurs peuvent craser ces configurations et en ajouter
  # d'autres dans leur $HOME/.bash_profile

  # mettre un chemin d'excution dcent

  echo $PATH | grep X11R6 > /dev/null
  if [ $? = 1 ] ; then   # ajouter des entres au chemin
    PATH="$PATH:/usr/X11R6/bin:$HOME/bin:."
  fi

  # indiquer  l'utilisateur les shells de login. En login, l'invite
  # (prompt) est en bleu, autrement en magenta. L'invite de root est rouge

  USER=`whoami`
  if [ $LOGNAME = $USER ] ; then
    COLOUR=44
  else
    COLOUR=45
  fi

  if [ $USER = 'root' ] ; then
    COLOUR=41
  fi

  # mettez un vrai caractre chappement (Escape) au lieu de ^[
  # Pour cela: sous emacs: ^Q ESC   sous vi: ^V ESC   sous joe: ` 0 2 7
  # sous jed: `ESC
  # Enlevez ";1" si vous n'aimez pas l'attribut "gras".
  ESC=^[
  PS1='$ESC[$COLOUR;37;1m$USER:$ESC[37;40;1m\w\$ '
  PS2="Continue> "

  # pas de core dump svp
  ulimit -c 0

  # positionner le umask (permission par dfaut des nouveaux fichiers)

  if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
          umask 002
  else
          umask 022
  fi

  # quelques variables

  USER=`id -un`
  LOGNAME=$USER
  MAIL="/var/spool/mail/$USER"
  EDITOR=jed
  HOSTNAME=`/bin/hostname`
  HISTSIZE=1000
  HISTFILESIZE=1000
  export PATH PS1 PS2 USER LOGNAME MAIL EDITOR HOSTNAME HISTSIZE HISTFILESIZE

  # ls en couleurs

  eval `dircolors /etc/DIR_COLORS -b`
  export LS_OPTIONS='-F -s -T 0 --color=tty'

  # configuration de less

  LESS='-M-Q'
  LESSEDIT="%E ?lt+%lt. %f"
  LESSOPEN="| lesspipe.sh %s"
  VISUAL=jed
  LESSCHARSET=latin1
  export LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET

  # configurer globalement d autres programmes
  for i in /etc/profile.d/*.sh ; do
          if [ -x $i ]; then
                  . $i
          fi
  done
  ______________________________________________________________________





  Voici le fichier /etc/bashrc :



       ______________________________________________________________________

       # /etc/bashrc
       # Fonctions et alias globaux au systme
       # les variables d'environnement vont en /etc/profile
       alias which="type -path"
       alias d="ls"
       alias dir="d"
       ______________________________________________________________________





  Et voici un exemple de .bashrc :


















  ______________________________________________________________________

  # Sourcer les definitions globales

  if [ -f /etc/bashrc ]; then
          . /etc/bashrc
  fi

  # Ceci est ncessaire pour notifier les utilisateurs qu'ils se trouvent dans un shell sans login

  if [ "$GET_PS1" = "" ] ; then
    COLOUR=45
  # mettre un vrai caractre chappement (Escape) au lieu de ^[
    ESC=^[
    PS1='$ESC[$COLOUR;37m`whoami`:$ESC[37;40m\w\$ '
    export PS1
  fi

  # alias

  alias cp='cp -i'
  alias l=less
  alias lyx='lyx -width 900 -height 700'
  alias mv='mv -i'
  alias rm='rm -i'
  alias x=startx

  # Quelques fonctions utiles

  inst() # Installer une archive .tar.gz dans le repertoire courant
  { gzip -dc $1 | tar xvf - }

  cz() # Lister le contenu d'une archive .zip
  { unzip -l $* }

  ctgz() # Lister le contenu d'une archive .tar.gz
  {
    for file in $* ; do
      gzip -dc ${file} | tar tf -
    done
  }

  tgz() # Crer une archive .tgz  la zip.
  {
    name=$1 ; tar -cvf $1 ; shift
    tar -rf ${name} $*
    gzip -S .tgz ${name}
  }
  ______________________________________________________________________





  Voici un exemple de .bash_profile :











  ______________________________________________________________________

  # fichier $HOME/.bash_profile

  # Environment et programmes de dmarrage propres  l'utilisateur
  # Ce fichier contient des configurations dfinies par l'utilisateur
  # crasant celles dans /etc/profile

  # configurer les alias et fonctions propres  l'utilisateur
  if [ -f ~/.bashrc ]; then
          GET_PS1="NO"  # Ne pas changer la couleur de l'invite
          . ~/.bashrc
  fi

  # quelques rpertoires "par dfaut"
  export CDPATH="$CDPATH:$HOME:$HOME/text:$HOME/text/geology"

  # pour rparer l'espace arrire sous rxvt 2.45
  if [ "$COLORTERM" != "" ] ; then
    stty erase ^?
    ESC=^[  # put a real escape character instead of ^[
    echo -n "$ESC[36l"
  fi
  ______________________________________________________________________





  Voici un fichier ~/.inputrc :



       ______________________________________________________________________

       # fichier $HOME/.inputrc

       # liaison des touches du clavier

       "\e[1~": beginning-of-line
       "\e[3~": delete-char
       "\e[4~": end-of-line
       # les touches (F1 .. F5) sont "\e[[A" ... "\e[[E"
       "\e[[A": "info \C-m"

       set bell-style visible         # sans bip sonore
       set meta-flag On               # permettre les caractres  8 bits (accentus)
       set convert-meta Off           # .. ne pas les convertir
       set output-meta On             # .. les afficher correctement
       set horizontal-scroll-mode On  # parcourir les longues lignes de commandes
       set show-all-if-ambiguous On   # aprs avoir press TAB
       ______________________________________________________________________





  Pour que les touches arrire (backspace) et suppr (delete)
  fonctionnent correctement dans xterm et d'autres applications X11, il
  vous faut galement :


    insrer ce qui suit dans votre .xinitrc :



  # dans $HOME/.xinitrc dfinir le clavier X11
  usermodmap=$HOME/.Xmodmap
  xmodmap $usermodmap





    mettre ce qui suit dans votre .Xmodmap :


       ! dans $HOME/.Xmodmap
       keycode 22 = BackSpace
       keycode 107 = Delete




  ce qui rpare votre console.

  Pour corriger xterm :

    insrer ce qui suit dans votre ~/.Xdefaults :


       xterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n\
               <Key>Delete:        string(0x1b) string("[3~")\n\
               <Key>Home:          string(0x1b) string("[1~")\n\
               <Key>End:           string(0x1b) string("[4~")\n\
               Ctrl<Key>Prior:     string(0x1b) string("[40~")\n\
               Ctrl<Key>Next:      string(0x1b) string("[41~")

       nxterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n\
               <Key>Delete:        string(0x1b) string("[3~")\n\
               <Key>Home:          string(0x1b) string("[1~")\n\
               <Key>End:           string(0x1b) string("[4~")\n\
               Ctrl<Key>Prior:     string(0x1b) string("[40~")\n\
               Ctrl<Key>Next:      string(0x1b) string("[41~")





  Pour rxvt, c'est un peu plus compliqu, vu que certaines options de
  compilation influent sur son comportement. Voyez le fichier
  .bash_profile ci-dessus.

  Voir les pages du manuel (commande man) de bash(1) et readline(3) pour
  plus de dtails.

  N'esprez pas voir toutes les applications fonctionner correctement.
  Si vous lancez joe sous xterm par exemple, certaines touches ne
  fonctionnent pas; c'est vrai aussi pour les versions de rxvt
  antrieures  la 2.21.


  33..22..  llss((11))

  La commande ls peut afficher les rpertoires avec des couleurs pour
  diffrencier les types de fichiers. Pour configurer cette option,
  ajoutez les lignes suivantes dans /etc/profile:


       eval `dircolors /etc/DIR_COLORS -b`
       export LS_OPTIONS='-F -T 0 --color=tty'

  (Si vous n'avez pas de fichier /etc/DIR_COLORS, enlevez la rfrence 
  ce fichier de la premire ligne).  Ceci positionne la variable
  d'environnement LS_COLORS selon les listes de couleurs dfinies dans
  /etc/DIR_COLORS. _N_o_t_e_: ne me demandez pas pourquoi, mais a ne marche
  pas dans certaines anciennes versions de rxvt (antrieures  2.21);
  utilisez alors xterm ou un programme similaire. Il semble que rxvt ait
  un bogue l'empchant dans certains cas d'hriter correctement des
  variables d'environnement.

  Le ls de Caldera n'a pas de couleurs, mail il existe un quivalent:
  color-ls. Ajoutez ceci  /etc/bashrc:



       alias ls="color-ls $LS_OPTIONS"





  33..33..  lleessss((11))

  Avec cet excellent pagineur, vous pouvez visualiser non seulement des
  fichiers de texte ordinaires, mais aussi des fichiers comprims par
  gzip, des archives tar ou zip, des pages de manuel (commande man),
  etc. Sa configuration prend quelques tapes :


    pour l'utiliser avec les touches de mouvement, ayez ce fichier
     ~/.lesskey en ASCII dans votre rpertoire domestique:


       ^[[A   back-line
       ^[[B   forw-line
       ^[[C   right-scroll
       ^[[D   left-scroll
       ^[OA   back-line
       ^[OB   forw-line
       ^[OC   right-scroll
       ^[OD   left-scroll
       ^[[6~  forw-scroll
       ^[[5~  back-scroll
       ^[[1~  goto-line
       ^[[4~  goto-end
       ^[[7~  goto-line
       ^[[8~  goto-end





  puis lancez la commande lesskey. Celle-ci cre un fichier binaire
  .less contenant les liaisons des touches.

    Ecrivez le fichier suivant dans /usr/bin/lesspipe.sh:











  ______________________________________________________________________
  #!/bin/sh
  # fichier /usr/bin/lesspipe.sh

  # Prprocesseur pour 'less' utilis quand la variable d'environnement suivante est dfinie
  # LESSOPEN="|lesspipe.sh %s"

  lesspipe() {
    case "$1" in
    *.tar) tar tf $1 2>/dev/null ;; # Pour voir le contenu d'archives .tar ou .tgz
    *.tgz|*.tar.gz|*.tar.Z|*.tar.z) tar ztf $1 2>/dev/null ;;
    *.Z|*.z|*.gz) gzip -dc $1  2>/dev/null ;; # Pour voir les fichiers comprims correctement (.gz)
    *.zip) unzip -l $1 2>/dev/null ;; # Pour voir les archives (.zip)
    *.arj) unarj -l $1 2>/dev/null ;;
    *.rpm) rpm -q -p -i -l $1 2>/dev/null ;;
    *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.man) FILE=`file -L $1`
      FILE=`echo $FILE | cut -d ' ' -f 2`
      if [ "$FILE" = "troff" ]; then
        groff -s -p -t -e -Tascii -mandoc $1
      fi ;;
    *) FILE=`file -L $1` ; # Vrification pour le cas d'un fichier binaire
      FILE1=`echo $FILE | cut -d ' ' -f 2`
      FILE2=`echo $FILE | cut -d ' ' -f 3`
      if [ "$FILE1" = "Linux/i386" -o "$FILE2" = "Linux/i386" \
           -o "$FILE1" = "ELF" -o "$FILE2" = "ELF" ]; then
        strings $1
      fi ;;
    esac
  }

  lesspipe $1
  ______________________________________________________________________





  et n'oubliez pas de le rendre excutable par chmod 755 lesspipe.sh.

    ajoutez ces lignes dans /etc/profile :


       ______________________________________________________________________
       LESS="-M-Q"                     # invite longue, silencieuse
       LESSEDIT="%E ?lt+%lt. %f"       # diter  ligne du haut
       LESSOPEN="| lesspipe.sh %s"     # filtre
       VISUAL=jed                      # diteur par dfaut- mettez votre prfr
       LESSCHARSET=latin1              # afficher les caractres accentus
       export LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET
       ______________________________________________________________________





  La variable LESSCHARSET dpend du fait qu'on habite en Europe Occiden
  tale, o est utilis le jeu de caractres ISO 8859-1. Les collgues
  Amricains, Japonais, Russes, etc.. devraient la configurer autrement.


  33..44..  eemmaaccss((11))

  Je n'utilise pas emacs, donc je n'ai qu'un seul conseil  vous donner.
  Certaines distributions d'emacs ne sont pas prconfigures pour les
  couleurs et la dcoration syntaxique. Ajoutez ce qui suit dans votre
  ~/.emacs
       ;; dans fichier $HOME/.emacs
       (global-font-lock-mode t)
       (setq font-lock-maximum-decoration t)




  Ceci ne marche qu'avec X11. Je vous laisse lire attentivement toute la
  documentation d'emacs pour dcouvrir comment l'adapter  vos besoins.
  Cela peut prendre des mois de bidouillage!


  33..55..  jjooee((11))

  Certaines personnes rapportent que joe fonctionne en couleurs sous
  X11, mais pas sur la console. De plus, certaines touches spciales ne
  fonctionnent pas.  ma connaissance, personne n'a russi  rsoudre le
  premier problme; certains ont suggr de bidouiller /etc/termcap.

  Si vous rencontrez ce problme, voici une solution rapide (et peu
  lgante):



       ~$ export TERM=vt100
       ~$ joe monfichier
          (ditez votre fichier)
       ~$ export TERM=linux





  33..66..  jjeedd((11))

  C'est mon diteur favori; il fait ce dont j'ai besoin, mais est plus
  lger et plus facile  configurer qu' emacs, et  mon humble avis
  mule mieux les autres diteurs. Beaucoup d'utilisateurs de mon
  universit veulent jed pour muler EDT, l'diteur de VMS.

  Les fichiers de configuration sont .jedrc et /usr/lib/jed/lib/*. Le
  premier est adapt du fichier jed.rc de ce rpertoire-l.


    pour que jed utilise correctement certaines touches, crez un
     fichier /usr/lib/jed/lib/defaults.sl dont la seule ligne est :


       () = evalfile("linux");





    ditez /usr/lib/jed/lib/linux.sl : dcommentez la ligne contenant
     Info_Directory = "/usr/info" et ajoutez /bin/mail aprs UCB_Mailer
     =

    il est trs simple de configurer jed pour qu'il mule EDT (ou
     d'autres diteurs). Vous devez juste diter quelques lignes dans
     .jedrc. Si vous souhaitez utiliser la touche + du pav numrique
     pour supprimer des mots entiers au lieu d'un seul caractre,
     ajouter ceci dans .jedrc :



  unsetkey("\eOl");
  unsetkey("\eOP\eOl");
  setkey("edt_wdel", "\eOl");
  setkey("edt_uwdel", "\eOP\eOl");





  aprs la ligne contenant () = evalfile("edt");.

    Pour que xjed utilise le pav numrique en mulation EDT il vous
     faut ajouter ce qui suit dans votre .Xmodmap :



       keycode 77  = KP_F1
       keycode 112 = KP_F2
       keycode 63  = KP_F3
       keycode 82  = KP_F4
       keycode 86  = KP_Separator





  De plus, assurez-vous que votre /etc/X11/XF86Config contient les
  lignes suivantes :




       #    ServerNumLock  # doit tre comment
       XkbDisable





  Ceci s'applique  XFree 3.2.  moins que vous n'utilisiez un clavier
  standard amricain (Qwerty), notez que XkbDisable pose quelques petits
  problmes. Vous les dcouvrirez par vous-mme.

    La personnalisation des couleurs pour xjed se fait en ajoutant des
     lignes comme suit dans .Xdefaults


       xjed*Geometry: 80x32+150+50
       xjed*font: 10x20
       xjed*background: midnight blue





    la possibilit d'"abrviation" permet de gagner un temps fou.
     Mettez ce qui suit dans un fichier $HOME/.abbrevs.sl:









  create_abbrev_table ("Global", "");
  define_abbrev ("Global", "GG", "Guido Gonzato");
  create_abbrev_table ("TeX", "\\A-Za-z0-9");
  define_abbrev ("TeX", "\\beq", "\\begin{equation}");
  define_abbrev ("TeX", "\\eeq", "\\end{equation}");
  % et ainsi de suite...





  puis tapez ESC x abbrev_mode pour que jed en tienne compte. Pour que
  les abrviations fonctionnent par dfaut, ajoutez ceci dans votre
  .jedrc:



       define text_mode_hook ()
       {
         set_abbrev_mode (1);
       }
       %
       define fortran_hook ()
       {
         set_abbrev_mode (1);
         use_abbrev_table ("Fortran");
       }
       % et ainsi de suite...








  33..77..  eeffaaxx ((11))

  Ce paquetage est probablement le plus pratique pour envoyer et
  recevoir simplement des fax. Vous allez devoir adapter le script
  /usr/bin/fax; c'est facile, mais quelques particularits m'ont caus
  un gros mal de crne:


    DIALPREFIX: la simple indication de "T" ou "P" risque de ne pas
     fonctionner dans pas mal de pays. Mettez plutt "ATDT" ou "ATDP":

    INIT et RESET: ces chanes de caractres contiennent les squences
     d'initialisation "-i" et "-k", ncessaires  efax. Si vous voulez
     ajouter une commande AT, ajoutez la  la bonne chane en enlevant
     "AT" et en faisant prcder le reste de "-i" ou "-k". Par exemple,
     pour ajouter la commande "ATX3"  INIT, rajoutez "-iX3".



  33..88..  TTeeXX eett ccoommppaaggnniiee

  Je suppose que vous avez la distribution TeTeX. Quelques trucs ici :


    pour configurer les motifs de csure pour votre langue, ditez le
     fichier /usr/lib/texmf/texmf/tex/generic/config/language.dat puis
     lancez :



  ~#  texconfig init ; texconfig hyphen





    pour installer un paquetage LaTeX, aprs avoir ajout les fichiers
     sous /usr/lib/texmf/texmf/tex/latex/ lancez la commande texhash
     pour que TeTeX reconnaisse le nouveau paquetage.

    pour configurer dvips, le fichier  diter est
     /usr/lib/texmf/texmf/dvips/config/config.ps. Soyez conscient que
     les champs concernant la rsolution par dfaut dterminent aussi le
     comportement de xdvi. Si vous remarquez des crations intempestives
     de polices (fonts)  chaque excution, ajoutez dans votre
     .Xdefaults une ligne



       XDvi*mfmode:





  Cela peut aider.



  33..99..  PPPPPP

  Je suppose que votre noyau est compil avec le support de PPP et
  TCP/IP, avec support du loopback et que votre logiciel pppd est
  correctement install et setuid root. Bien sr, votre FAI doit
  utiliser PPP.

  Il y a dornavant deux faons de faire fonctionner PPP : a) une
  configuration manuelle, et b) utiliser un programme de configuration
  "auto-magique". Que vous choisissiez l'un ou l'autre moyen, vous aurez
  besoin des informations suivantes:


    le numro de tlphone de votre FAI;

    son serveur de noms;

    ses serveurs de news et de courrier lectronique;

    son nom de domaine;

    votre nom d'utilisateur et votre mot de passe.

  La configuration manuelle est un casse-tte. Il s'agit d'diter des
  fichiers et d'crire des scripts; pas trop de travail, mais les
  erreurs sont faciles  faire, et les nouveaux utilisateurs sont
  souvent intimids. Si vous voulez vous y lancer, le PPP HOWTO est l
  pour vous. Sinon, il existe des logiciels qui vous demandent les
  informations ci-dessus et qui font tout le travail eux-mmes.

  Le mieux est certainement de trouver un ami dj connect et de
  tlcharger les outils suivants:


    EzPPP, un utilitaire sous X11, dont le site Internet se trouve 
     l'adresse  <http://www.serv.net/~cameron/ezppp/index.html>. Trs
     simple  utiliser, se passe de commentaires;
    pour les connexions en mode console, essayez les outils disponibles
       <ftp://sunsite.unc.edu/pub/linux/system/network/serial/ppp>. Un
     des meilleurs est pppsetup-X.XX.tar.gz.

    l'utilitaire le plus simple  configurer  l'heure actuelle est
     certainement wvdial. Vous lui donnez le numro de tlphone de
     votre FAI, votre nom d'utilisateur et votre mot de passe, et c'est
     parti. Extrait du fichier README: "There is a (currently cheesy)
     web page for wvdial at:
      <http://www.worldvisions.ca/wvdial>" ("Il y a une page web (plutt
     naze pour l'instant)  l'adresse:
     <http://www.worldvisions.ca/wvdial>). Trs sympathique.



  33..1100..  CClliieenntt PPOOPP

  Pour aller chercher votre courrier lectronique sur un serveur POP,
  utilisez un client POP tel que fetchpop ou fetchmail. Ce dernier est
  plus avanc, et c'est probablement la seule alternative si le serveur
  PPP de votre fournisseur a des problmes avec la commande LAST.

  Pour configurer ces clients :


    fetchpop: la premire fois que vous le lancez, il vous demandera
     quelques informations. Rpondez  ses questions et c'est tout.

    fetchmail: adaptez cet exemple de .fetchmailrc:



       # fichier $HOME/.fetchmailrc
       poll mbox.monfai.com with protocol pop3;
         user jean there with password  _Biz%_ar  is jean here





  Vous devez mettre les permissions de ce fichier avec chmod 600
  .fetchmailrc autrement fetchmail refusera avec raison de dmarrer. Cet
  exemple est trs rudimentaire, et suppose que sendmail tourne chez
  vous; les possibilits de configuration sont infinies. Reportez-vous 
  <http://www.ccil.org/~esr/fetchmail>.



  33..1111..  SSyyssttmmee ddee FFeennttrraaggee XX

  Une fois que vous avez russi  faire marcher X11 (bonne carte
  graphique, etc.), il existe d'inombrables possibilits de
  configuration; cela dpend de votre gestionnaire de fentres (window
  manager). Dans tous les cas, il s'agit d'diter un ou des fichier[s]
  textuel[s] de votre rpertoire utilisateur. Selon le gestionnaire de
  fentres:


    fvwm: copiez /etc/X11/fvwm/system.fvwmrc dans votre rpertoire
     comme .fvwmrc; visualisez-le et commencez  exprimenter. Le
     fichier system.fvwmrc fourni est  mon avis un peu trop simple et
     ne rend pas justice  fvwm.

    fvwm95-2: copiez /etc/X11/fvwm95-2/fvwm2rc95 dans votre rpertoire
     comme .fvwm2rc95 puis ditez-le. L'exemple fourni est fort bon.

    TheNextLevel: c'est un peu plus dur  configurer. Copiez les
     fichiers /etc/X11/TheNextLevel/.*  dans votre rpertoire.
     Parcourez-les attentivement, puis essayez de les adapter. Le
     premier  regarder est .fvwm2rc.defines.


  De plus, soyez certain d'avoir un .xinitrc correct. Par exemple:



       #! /bin/sh
       # fichier $HOME/.xinitrc

       # configurer le clavier correctement
       usermodmap=$HOME/.Xmodmap
       xmodmap $usermodmap

       xset s noblank  # turn off the screen saver
       xset s 300 2    # screen saver start after 5 min
       xsetroot -solid "medium blue" &

       # rxvt est conome en mmoire, mais les versions
       # antrieures  la 2.21 souffrent de bogues affectant
       # les couleurs et la rcupration de l'environnement.
       # Prenez une version plus rcente ou utilisez xterm

       xterm -ls -bg black -fg white -sb -sl 500 -j -ls -fn 10x20 -fb 10x20bold \
       -title "xterm en Couleurs" -geometry 80x25+150+0 &

       fvwm95-2





  33..1122..  FFoorrttrraann


  D'aprs moi, une bonne alternative  g77 est le traducteur Fortran
  vers C f2c et son interface yaf77.

  Vous pouvez obtenir yaf77-X.Y.tgz depuis
  <ftp://sunsite.unc.edu/pub/Linux/devel/languages/fortran> et ses
  miroirs (NdT: notamment
  <ftp://ftp.lip6.fr/pub/linux/sunsite/devel/languages/fortran> en
  France).



  33..1133..  CCoonnffiigguurraattiioonnss uuttiilliissaatteeuurrss

  C'est une bonne ide de fournir aux nouveaux utilisateurs quelques
  fichiers de configurations dj prts  leur premire connexion. Pour
  cela, mettez dans /etc/skel/ : .bashrc, .bash_profile, .bash_logout,
  .inputrc, .less, .xinitrc, .fvwmrc, .fvwm2rc95, .Xmodmap, .Xdefaults,
  .jedrc, .abbrevs.sl, .joerc, et .emacs.

  Remarquez que .pinerc n'est pas compltement adaptable. Vrifiez
  toutefois que les champs user-domain, smtp-server et nntp-server y
  sont corrects.






  33..1144..  MMiissee  jjoouurr

  Si vous faites une mise  jour complte de votre machine, pensez 
  sauvegarder quelques autres fichiers auparavant, par exemple
  /etc/X11/XF86Config et /usr/bin/fax.



  44..  FFiinn

  44..11..  CCooppyyrriigghhtt

  Sauf indication contraire, les documents HOWTO Linux sont sous le
  copyright de leurs auteurs respectifs. Les documents HOWTO Linux
  peuvent tre reproduits et distribus en tout ou en partie, sur tout
  medium physique ou lectronique, tant que cette notice de copyright y
  figure intacte dans tout copie. La redistribution commerciale est
  permise et encourage; toutefois, l'auteur souhaiterait tre averti de
  ces distributions.

  Toutes les traductions et oeuvres drives ou compilations contenant
  tout document HOWTO Linux doivent tre couvertes par cette clause de
  copyright. C'est--dire que vous ne pouvez pas produire une oeuvre
  drive de ces HOWTO et imposer des restrictions supplmentaires 
  leur distribution; pour toute exception, veuillez contacter le
  coordinateur Linux HOWTO  l'adresse ci-dessous.

  En rsum, nous souhaitons promouvoir la diffusion de cette
  information par tous les canaux. Nanmoins, nous souhaitons conserver
  le copyright sur les documents HOWTO, et voulons tre prvenus de tous
  projets de redistributions.

  Si vous avez des questions, contacter Tim Bynum, le coordinateur des
  HOWTO Linux par courrier lectronique  linux-howto@sunsite.unc.edu.



  44..22..  RRaaccttiioonnss

  Ce document ncessite encore plus que les autres HOWTO vos souhaits,
  vos suggestions, critiques et contributions. Les ractions sont non
  seulement utiles, mais ncessaires. Si vous pensez que quelque chose
  manque ici, envoyez moi un courrier lectronique. Si vous avez une
  distribution autre que RedHat ou Caldera et que vos fichiers de
  configuration sont diffrents ou situs dans d'autres rpertoires,
  faites-le moi savoir et j'ajouterai vos astuces. Mon but est de rendre
  Linux aussi facilement utilisable que possible.

  Linux comportant un trs grand nombre de logiciels, il est donc
  impossible d'en indiquer tous les pointeurs. Veuillez restreindre vos
  requtes et suggestions aux programmes les plus raisonnables, selon
  votre bon sens.


  44..33..  DDcchhaarrggee

  Ce Config-HOWTO a t rdig en anglais par Guido Gonzato
  guido@ibogfs.cineca.it puis traduit en franais par Basile
  Starynkvitch Basile.Starynkevitch@cea.fr et Arnaud Gomes-do-Vale
  gomesdv@mail.dotcom.fr. Merci beaucoup aux autres auteurs de HOWTO et
  pages de manuel, dont j'ai chapard sans vergogne le travail.

  Ce document est fourni tel quel. Je l'ai crit aussi prcisement que
  possible, mais vous en utilisez l'information  vos risques et prils.
  En aucun cas je ne peux tre rendu responsable des dommages rsultant
  de son utilisation.
  J'espre que vous trouverez ce travail utile. Quand j'installe un
  nouveau systme Linux, il me sert!


  Profitez-en bien!


  Guido (l'auteur) [et Basile et Arnaud, les traducteurs].


























































  DNS HOWTO
  Nicolai Langfeldt <janl@math.uio.no>
  <arn_mat@club-internet.fr>
  Version 2.2, du 11 fvrier 1999

  Comment devenir un administrateur de DNS  la petite semaine.
  ______________________________________________________________________

  Table des matires


  1. Prambule

     1.1 Aspect juridique
     1.2 Remerciements et appel aux bonnes volonts
     1.3 Ddicace

  2. Introduction.

  3. Un Serveur de Noms qui ne sert que de cache.

     3.1 Dmarrer named.
     3.2 Le rendre encore meilleur
     3.3 Flicitations !

  4. Un domaine

     4.1 Mais avant tout, un brin de thorie
     4.2 Notre propre domaine
     4.3 La zone inverse
     4.4 Prcautions d'usage
     4.5 Pourquoi est-ce que les lookup inverss ne marchent pas ?
        4.5.1 La zone inverse n'est pas dlgue.
        4.5.2 Vous avez un sous-rseau sans classe

  5. Un exemple tir d'un domaine rel

     5.1 /etc/named.conf (ou /var/named/named.conf)
     5.2 /var/named/root.hints
     5.3 /var/named/zone/127.0.0
     5.4 /var/named/zone/land-5.com
     5.5 /var/named/zone/206.6.177

  6. Maintenance

  7. Passer de la version 4  la version 8

  8. Questions et Rponses

  9. Comment devenir un administrateur DNS de haut vol



  ______________________________________________________________________

  11..  PPrraammbbuullee

  Mots-cls : DNS, bind, bind-4, bind-8, named, dialup, ppp, slip, isdn,
  Internet, domain, name, hosts, resolving, caching


  Ce document fait partie du _L_i_n_u_x _D_o_c_u_m_e_n_t_a_t_i_o_n _P_r_o_j_e_c_t.




  11..11..  AAssppeecctt jjuurriiddiiqquuee

  (C)opyright 1995-1999 Nicolai Langfeldt. Ne modifiez pas ce document
  sans en modifier le message de copyright en consquence. Vous pouvez
  distribuer ce document librement sous rserve de conserver le message
  de copyright.


  11..22..  RReemmeerrcciieemmeennttss eett aappppeell aauuxx bboonnnneess vvoolloonnttss

  J'aimerais remercier Arnt Gulbrandsen qui a tant souffert en relisant
  les brouillons de ce document et qui a apport nombre de suggestions
  pertinentes. Merci galement  tous ceux qui m'ont envoy leurs
  suggestions par courrier lectronique. Merci beaucoup ! Vous m'aidez
  vraiment dans ce travail.


  Ce document n'est pas destin  atteindre un jour un tat final, alors
  faites-moi part de vos problmes ainsi que de vos succs, cela me
  permettra d'amliorer ce HOWTO. Merci d'envoyer les commentaires et/ou
  les questions et mme l'argent  janl@math.uio.no. Si vous m'envoyez
  un courrier lectronique, merci de _v__r_i_f_i_e_r que votre adresse de
  retour est correcte car je reois _b_e_a_u_c_o_u_p de courrier lectronique.
  Essayez aussi de lire le chapitre ``FAQ'' avant de m'envoyer un mail.
  Autre chose je (l'auteur) ne parle qu'anglais et norvgien.


  Si vous ne parlez ni l'anglais ni le norvgien, vous pouvez toujours
  envoyer vos commentaires en franais au traducteur (arn_mat@club-
  internet.fr) qui fera suivre.


  Si vous voulez traduire ce HOWTO, prvenez-moi pour que je puisse
  garder le compte de toutes les langues dans lesquelles il a t
  traduit :-), de plus, cela me permettra de vous tenir au courant des
  volutions de ce HowTo.


  11..33..  DDddiiccaaccee

  Ce HOWTO est ddi  Anne Line Norheim. Pourtant, elle ne le lira sans
  doute jamais, ce n'est pas du tout son genre.


  22..  IInnttrroodduuccttiioonn..

  CCee qquuee ccee ddooccuummeenntt eesstt eett ccee qquu''iill nn''eesstt ppaass


  Le DNS est le _D_o_m_a_i_n _N_a_m_e _S_y_s_t_e_m. C'est l'ensemble des rgles
  utilises par les machines et les logiciels pour tablir, entre autres
  choses, la correspondance entre les noms de machines et les adresses
  IP, dont chaque machine sur le net est pourvue. Ce document explique
  comment dfinir de telles correspondances  l'aide d'un systme Linux.
  Une correspondance est tout simplement une relation entre deux objets,
  dans notre cas un nom de machine, comme ftp.linux.org, et l'adresse IP
  de cette machine, 199.249.150.4.


  Le DNS constitue pour le non-initi (vous dans le cas prsent ;-) une
  des parties les plus obscures de l'administration de rseau. Le but de
  ce HOWTO est d'essayer d'en claircir quelques aspects. Ce document
  explique comment configurer un DNS _s_i_m_p_l_e. Nous allons commencer avec
  un serveur de noms qui ne sert qu' faire cache puis nous continuerons
  en configurant un serveur DNS primaire pour un domaine. Pour des
  configurations plus complexes, jetez un coup d'oeil  la section
  ``FAQ'' de ce document. Si vous n'y trouvez pas ce que vous cherchez,
  vous allez alors devoir _l_i_r_e la Vraie Documentation. Je reviendrai sur
  ce en quoi consiste la Vraie Documentation dans le chapitre ``final''.


  Avant de commencer, vous devez configurer votre machine pour tre
  capable de vous connecter par telnet sur d'autres machines mais aussi
  pouvoir recevoir des connexions sur votre machine. Vous devez aussi
  tre en mesure de vous connecter au rseau par tous les services
  possibles, et en particulier pouvoir faire telnet 127.0.0.1, ce qui
  revient  vous connecter  votre propre machine (vrifiez tout de
  suite que a marche !). Il est aussi ncessaire, pour commencer, que
  les fichiers /etc/nnswitch.conf (ou /etc/host.conf), /etc/resolv.conf
  et /etc/hosts soient correctement configurs car je n'expliquerai pas
  ici  quoi ils servent. Si tout cela n'est pas dj configur et en
  tat de marche, lisez le NET-3-HOWTO.


  Si vous utilisez une connexion SLIP ou PPP, il est indispensable
  qu'elle fonctionne. Lisez le PPP HOWTO si ce n'est pas le cas.


  Quand je dis ``votre machine'', j'entends la machine sur laquelle vous
  aller essayer d'installer le DNS, et non pas une autre machine dont
  vous pourriez vous servir pour accder au rseau.


  Je supposerai par la suite que vous ne vous trouvez pas derrire un
  firewall qui bloque les requtes de rsolution de nom. Si tel est le
  cas, vous aurez besoin d'une configuration spciale. Reportez-vous
  alors au chapitre ``FAQ''.


  Le service de rsolution de nom sous Unix est assur par un programme
  appel named. Il fait partie du paquetage ``bind'', gr par Paul
  Vixie pour l'Internet Software Consortium. named est inclus dans la
  plupart des distributions de Linux et se trouve le plus souvent
  install dans /usr/sbin/named. Si vous disposez d'un named, vous
  pouvez vraisemblablement l'utiliser. Si vous n'en avez pas, chargez-en
  un  partir d'un site FTP Linux ou allez chercher la dernire et
  meilleure version des sources du programme depuis
  ftp.isc.org/isc/bind/src/cur/bind-8/. Ce HowTo parle de bind version
  8. L'ancienne version de ce HowTo, a propos de bind 4 est toujours
  disponible  www.math.uio.no/~janl/DNS/ au cas ou vous auriez bind 4.
  Si la page man de named parle de named.conf vous avec bind 8, si elle
  parle (tout a la fin, dans la section FILES) de named.boot vous avez
  bind 4. Si vous avez bind 4, et si la scurit fait partie de vos
  proccupations, vous devriez vraiment passer  bind 8.


  Le service DNS est une base de donnes  l'chelle du rseau tout
  entier. Faites donc trs attention  ce que vous y introduisez. Si
  vous y mettez n'importe quoi, vous en retirerez n'importe quoi, et les
  autres aussi. Conservez votre DNS bien propre,  jour et cohrent et
  vous verrez qu'il vous offrira le meilleur de lui-mme. Apprenez a
  l'utiliser, l'administrer, le dbogger et vous ferez partie de ces
  administrateurs qui empchent que le rseau ne s'croule sous le poids
  des systmes mal grs.


  Dans ce document, je dis des choses qui ne sont pas tout  fait vraies
  (mais qui le sont toujours au moins  moiti). Si je le fais, c'est
  toujours dans le but de rendre les choses plus simples. Tout marchera
  (probablement ;-) trs bien si vous croyez ce que je vous dis.


  AAssttuuccee :: S'ils existent dj, faites une copie de sauvegarde de tous
  les fichiers que je vous demande de modifier. Ainsi, si plus rien ne
  marche aprs ce que nous allons faire, vous pourrez toujours revenir
  au bon vieux temps o tout marchait bien.


  33..  UUnn SSeerrvveeuurr ddee NNoommss qquuii nnee sseerrtt qquuee ddee ccaacchhee..

  UUnn pprreemmiieerr aappeerruu ddee llaa ccoonnffiigguurraattiioonn dd''uunn DDNNSS,, ttrrss uuttiillee ppoouurr cceeuuxx
  qquuii uuttiilliisseenntt uunnee ccoonnnneexxiioonn eenn ddiiaalluupp..


  Un serveur de noms qui ne sert que de cache trouve la rponse aux
  requtes de rsolution de nom et se souvient de cette rponse chaque
  fois qu'on lui posera la mme question par la suite. Cela rduira les
  temps de rponse, surtout si vous avez une connexion plutt lente.


  Vous avez tout d'abord besoin du fichier /etc/named.conf. Ce fichier
  est lu au lancement de named. Pour le moment, il ne doit pas contenir
  autre chose que :


  ______________________________________________________________________
  // Fichier de config pour un serveur de noms qui ne fait que du cache

  options {
          directory "/var/named";

          // Enlever les commentaires peut vous aider si vous avez a passer a
          // travers un firewall et que a ne marche pas :

          // query-source port 53;
  };

  zone "." {
          type hint;
          file "root.hints";
  };

  zone "0.0.127.in-addr.arpa" {
          type master;
          file "pz/127.0.0";
  };
  ______________________________________________________________________




  TTRRSS IIMMPPOORRTTAANNTT :: Dans certaines versions de ce document, les fichiers
  lists comme ci-dessus prsentent un certain nombre de caractres
  espace ou tabulation avant le premier caractre non blanc de la ligne.
  Ils ne sont pas supposs faire partie du fichier. EEffffaacceezz ddoonncc ttoouuss
  lleess ccaarraaccttrreess bbllaannccss de dbut de ligne des fichiers que vous copiez-
  collez  partir de ce HOWTO.


  La ligne ``directory'' indique  named l'endroit o il doit rechercher
  ses fichiers. Tous les fichiers dont nous parlerons maintenant auront
  un chemin relatif relatifs  ce rpertoire. Ainsi, pz est un sous-
  rpertoire de /var/named, c'est a dire /var/named/pz. D'aprs le _L_i_n_u_x
  _F_i_l_e_s_y_s_t_e_m _S_t_a_n_d_a_r_d, ce rpertoire doit tre /var/named.


  On trouve  cet endroit le fichier /var/named/root.hints, qui doit
  ressembler  ceci :
  ______________________________________________________________________
  ; Il se peut qu'il y ait quelques commentaires ici si vous avez dj ce
  ; fichier. de toutes faon, ce sont des commentaires, ils ne sont pas
  ; important du tout.

  .                     6D IN NS        G.ROOT-SERVERS.NET.
  .                     6D IN NS        J.ROOT-SERVERS.NET.
  .                     6D IN NS        K.ROOT-SERVERS.NET.
  .                     6D IN NS        L.ROOT-SERVERS.NET.
  .                     6D IN NS        M.ROOT-SERVERS.NET.
  .                     6D IN NS        A.ROOT-SERVERS.NET.
  .                     6D IN NS        H.ROOT-SERVERS.NET.
  .                     6D IN NS        B.ROOT-SERVERS.NET.
  .                     6D IN NS        C.ROOT-SERVERS.NET.
  .                     6D IN NS        D.ROOT-SERVERS.NET.
  .                     6D IN NS        E.ROOT-SERVERS.NET.
  .                     6D IN NS        I.ROOT-SERVERS.NET.
  .                     6D IN NS        F.ROOT-SERVERS.NET.

  G.ROOT-SERVERS.NET.     5w6d16h IN A    192.112.36.4
  J.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.10
  K.ROOT-SERVERS.NET.     5w6d16h IN A    193.0.14.129
  L.ROOT-SERVERS.NET.     5w6d16h IN A    198.32.64.12
  M.ROOT-SERVERS.NET.     5w6d16h IN A    202.12.27.33
  A.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.4
  H.ROOT-SERVERS.NET.     5w6d16h IN A    128.63.2.53
  B.ROOT-SERVERS.NET.     5w6d16h IN A    128.9.0.107
  C.ROOT-SERVERS.NET.     5w6d16h IN A    192.33.4.12
  D.ROOT-SERVERS.NET.     5w6d16h IN A    128.8.10.90
  E.ROOT-SERVERS.NET.     5w6d16h IN A    192.203.230.10
  I.ROOT-SERVERS.NET.     5w6d16h IN A    192.36.148.17
  F.ROOT-SERVERS.NET.     5w6d16h IN A    192.5.5.241
  ______________________________________________________________________




  SSoouuvveenneezz--vvoouuss bbiieenn ddee ccee qquuee jj''aaii ddiitt ppoouurr lleess ccaarraaccttrreess bbllaannccss eenn
  ttttee ddee lliiggnnee !!


  Ce fichier donne une description de tous les serveurs de noms du monde
  qui se trouvent  la racine (au plus haut niveau) de la hirarchie des
  serveurs de noms. Il arrive que cette liste change, c'est pourquoi il
  est essentiel que ce fichier soit maintenu  jour. Reportez-vous  la
  section ``maintenance'' pour savoir comment le garder  jour. Le
  contenu de ce fichier est dcrit dans la page de man de named mais
  cette dernire s'adresse plus,  mon humble avis,  ceux qui savent
  dj comment fonctionne ce programme.


  La section suivante de named.conf est la dernire partie. Elle sera
  explique dans un chapitre suivant, pour l'instant, crez un fichier
  appel 127.0.0 dans le sous rpertoire pz :












  ______________________________________________________________________
  @               IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                                  1       ; Serial
                                  8H      ; Refresh
                                  2H      ; Retry
                                  1W      ; Expire
                                  1D)     ; Minimum TTL
                          NS      ns.linux.bogus.
  1                       PTR     localhost.
  ______________________________________________________________________




  Aprs a, vous avez besoin d'un fichier /etc/resolv.conf qui ressemble
   peu prs  a :


  ______________________________________________________________________
  search subdomain.your-domain.edu your-domain.edu
  nameserver 127.0.0.1
  ______________________________________________________________________




  La ligne search spcifie dans quels domaines il faudra chercher
  lorsque vous voudrez vous connecter sur une machine de nom quelconque.
  La ligne ``nameserver'' indique  quelle adresse votre machine peut
  contacter un serveur de noms. Si vous voulez indiquer plusieurs
  serveurs de nom, mettez une ligne ``nameserver'' pour chacun. Dans
  notre cas, il s'agit de notre propre machine puisque c'est elle qui
  fait tourner named. (Note : named ne lit jamais ce fichier, c'est le
  _r__s_o_l_v_e_u_r qui utilise named qui le fait).


  Voyons sur un exemple  quoi sert ce fichier : si un client cherche 
  contacter foo, on essaye d'abord foo.subdomain.your-domain.edu puis
  foo.your-domain.edu et enfin foo. Si un client essaye de contacter
  sunsite.unc.edu, on essaye d'abord sunsite.unc.edu.subdomain.your-
  domain.edu (je sais, c'est stupide, mais c'est comme a) puis
  sunsite.unc.edu.your-domain.edu et enfin sunsite.unc.edu. Faites
  attention  ne pas mettre trop de noms de domaine dans la ligne search
  car cela prend du temps de tous les essayer.


  Cet exemple suppose que vous appartenez au domaine subdomain.your-
  domain.edu. Votre machine s'appelle alors certainement your-
  machine.subdomain.your-domain.edu. La ligne search ne doit pas
  contenir votre TLD (Top Level Domain; edu dans notre cas). Si vous
  vous connectez frquemment  des machines dans un autre domaine, vous
  pouvez rajouter ce domaine dans la ligne search comme ceci :


  ______________________________________________________________________
  search subdomain.your-domain.edu your-domain.edu other-domain.com
  ______________________________________________________________________




  et ainsi de suite. videmment, il faut appliquer cet exemple  de
  vrais noms de domaines. Remarquez qu'ici il n'y a pas de point  la
  fin des noms de domaine. C'est important, notez l'absence de points
  aux fins des noms de domaines.

  Ensuite, suivant votre version de la libc, vous allez devoir modifier
  soit /etc/nsswitch.conf, soit /etc/host.conf. Si vous avez dj
  nsswitch.conf, c'est celui-l que nous allons modifier, sinon ce sera
  host.conf.


  //eettcc//nnsssswwiittcchh..ccoonnff


  C'est un long fichier qui spcifie o trouver diffrentes sortes de
  types de donnes, dans quel fichier ou quelle base de donnes. Il
  contient gnralement des commentaires prcieux au dbut, que vous
  auriez tout intrt  lire. Ensuite, trouvez la ligne qui commence par
  ``hosts:'', elle doit ressembler  ceci:


  ______________________________________________________________________
  hosts: files dns
  ______________________________________________________________________




  Si il n'y a aucune ligne qui commence par ``hosts:'', mettez celle ci-
  dessus. Elle dit que les programmes doivent d'abord regarder dans
  /etc/hosts puis demander au DNS en suivant les indications de
  resolv.conf.


  //eettcc//hhoosstt..ccoonnff


  Ce fichier contient certainement plusieurs lignes, dont une doit
  commencer par order et ressembler  a :


  ______________________________________________________________________
  order hosts,bind
  ______________________________________________________________________




  Si il n'y a pas de ligne ``order'', il faut en mettre une. Elle
  indique aux routines de rsolution de nom de regarder d'abord dans
  /etc/hosts puis de demander au serveur de noms (que vous avez prcis
  dans resolv.conf comme tant 127.0.0.1).


  33..11..  DDmmaarrrreerr nnaammeedd..

  Aprs tout a, il est temps de dmarrer named. Si vous utilisez une
  connexion en dialup, commencez par vous connecter. Tapez ``ndc start''
  et appuyez sur la touche entre, sans donner d'options. Si a ne
  marche pas, essayez plutt ``/usr/sbin/ndc start''. Si a ne marche
  toujours pas, jetez un coup d'oeil au chapitre ``FAQ''. Si vous jetez
  un oeil  votre fichier de messages syslog (souvent appel
  /var/adm/messages, mais regardez galement dans le rpertoire /var/log
  ou dans le fichier syslog) tout en lanant named (faites tail -f
  /var/adm/messages), vous devriez voir quelque chose comme a :


  (les lignes se terminant par \ se continuent sur la ligne suivante)



  Feb 15 01:26:17 roke named[6091]: starting.  named 8.1.1 Sat Feb 14 \
    00:18:20 MET 1998 ^Ijanl@roke.uio.no:/var/tmp/bind-8.1.1/src/bin/named
  Feb 15 01:26:17 roke named[6091]: cache zone "" (IN) loaded (serial 0)
  Feb 15 01:26:17 roke named[6091]: master zone "0.0.127.in-addr.arpa" \
    (IN) loaded (serial 1)
  Feb 15 01:26:17 roke named[6091]: listening [127.0.0.1].53 (lo)
  Feb 15 01:26:17 roke named[6091]: listening [129.240.230.92].53 (ippp0)
  Feb 15 01:26:17 roke named[6091]: Forwarding source address is [0.0.0.0].1040
  Feb 15 01:26:17 roke named[6092]: Ready to answer queries.





  Si il y a un quelconque message d'erreur, named donnera le nom du
  fichier dans lequel se trouve l'erreur (soit named.conf, soit
  root.hints, j'espre :-). Tuez le processus named et re-vrifiez ce
  fichier.


  Il est maintenant temps de vrifier votre configuration. Lancez
  nslookup pour regarder le rsultat de votre petit travail.



       $ nslookup
       Default Server: localhost
       Address: 127.0.0.1

       >





  Si vous obtenez ce message, c'est que a marche. Nous l'esprons tous.
  Si vous obtenez quoi que ce soit d'autre, revenez en arrire et
  vrifiez tout. Chaque fois que vous modifiez le fichier named.conf, il
  vous faut relancer named avec la commande ndc restart.


  Maintenant, vous pouvez entrer une requte. Essayez de contacter une
  machine proche de vous. pat.uio.no est proche de moi,  l'Universit
  d'Oslo :



       > pat.uio.no
       Server: localhost
       Address: 127.0.0.1

       Name:    pat.uio.no
       Address: 129.240.2.50





  nslookup a demand  votre named de rechercher la machine pat.uio.no.
  Il a ensuite contact un des serveurs de noms mentionns dans
  root.cache et a demand le chemin  suivre. Il peut s'couler un
  certain temps avant que vous obteniez le rsultat puisqu'il se peut
  qu'il recherche tous les domaines lists dans /etc/resolv.conf.



  Si vous ressayez, vous obtiendrez ceci :



       > pat.uio.no
       Server: localhost
       Address: 127.0.0.1

       Non-authoritative answer :
       Name: pat.uio.no
       Address: 129.240.2.50





  Notez cette fois ci l'apparition de la ligne ``Non-authoritative
  answer :''. Elle veut dire que named n'a pas accd au rseau pour
  obtenir la rponse mais a trouv l'information dans son cache.
  Cependant, l'information cache _p_o_u_r_r_a_i_t ne plus tre  jour. C'est
  pourquoi vous tes inform de cette possibilit trs improbable par le
  message ``Non-authoritative answer:'' Quand nslookup rpond ceci la
  seconde fois qu'on lui demande un certain hte, c'est un signe certain
  que named cache bien les informations et que tout marche. Pour sortir
  de nslookup, utilisez la commande ``exit''.


  33..22..  LLee rreennddrree eennccoorree mmeeiilllleeuurr

  Dans les grands rseaux, bien administrs, des universits ou FAI
  (Fournisseur d'Accs a Internet), vous remarquerez peut-tre que les
  administrateurs rseau ont mis en place une hirarchie de serveurs DNS
  ce qui permet de soulager le rseau interne ainsi que le rseau vers
  l'extrieur. Il n'est pas facile de savoir si vous tes dans un rseau
  de ce type. Tout cela n'est pas trs important, mais en utilisant le
  serveur DNS de votre FAI comme ``forwarder'' vous pouvez rendre les
  rponses plus rapides et allger la charge de votre rseau. Avec un
  modem, la diffrence peut tre sensible.  Pour amliorer encore notre
  exemple, supposons que votre FAI aie deux serveurs de noms qu'il veux
  vous faire utiliser, ayant pour adresses IP 10.0.0.1 et 10.1.0.1.
  Alors, dans votre fichier named.conf, dans la section appele
  ``options'' insrez les lignes :


  ______________________________________________________________________
             forward first;
             forwarders {
                  10.0.0.1;
                  10.1.0.1;
              };
  ______________________________________________________________________




  Redmarrez votre serveur de noms et testez avec nslookup. Cela devrait
  marcher sans problmes.


  33..33..  FFlliicciittaattiioonnss !!

  Maintenant, vous savez comment configurer un named qui sert de cache.
  Servez-vous une bire, un verre de lait ou tout ce que vous voudrez
  pour fter l'vnement.


  44..  UUnn ddoommaaiinnee ssiimmppllee

  CCoommmmeenntt mmeettttrree eenn ppllaaccee vvoottrree pprroopprree ddoommaaiinnee


  44..11..  MMaaiiss aavvaanntt ttoouutt,, uunn bbrriinn ddee tthhoorriiee

  Avant d'entrer _v_r_a_i_m_e_n_t dans le vif du sujet, il va falloir que je
  fasse un brin de thorie avec quand mme un petit exemple sur le
  principe du service DNS. Et il faudra tout lire, car c'est pour votre
  bien. Vous devriez au moins survoler rapidement cette section. Arrtez
  le survol quand vous arrivez  l'endroit o j'explique le contenu du
  fichier named.conf.


  Le service DNS est un systme organis de manire hirarchique, sous
  forme d'arbre. La racine est dsigne par ``.'' et s'appelle ``la
  racine''. En dessous de . se trouvent un certain nombre de TLD (_T_o_p
  _L_e_v_e_l _D_o_m_a_i_n_s); les plus connus sont ORG, COM, EDU, NET et FR, mais il
  y en a beaucoup d'autres. Tout comme un arbre, il a une racine avec
  des branches qui en partent. Si vous avez des connaissances en
  informatique fondamentale, vous reconnatrez dans le DNS un arbre de
  recherche, avec des noeuds, des arrtes et des feuilles.


  Lorsque vous recherchez une machine, la question est pose
  rcursivement dans toute la hirarchie depuis la racine. Lorsque vous
  voulez trouver l'adresse IP de prep.ai.mit.edu, votre DNS doit trouver
  un serveur de noms pour le domaine edu. Votre DNS demande d'abord  un
  serveur de noms de . (il possde dj les adresses des serveurs pour
  ., elles sont dans le fichier root.hints), et le serveur pour .  donne
  une liste des serveurs d'edu.

  Voici un exemple :



       $ nslookup
       Default Server: localhost
       Address: 127.0.0.1




  Interrogeons un serveur situ  la racine.



       > server c.root-servers.net.
       Default Server: c.root-servers.net
       Address: 192.33.4.12




  Positionnons le type de requte (Query Type)  NS (Name Server
  records).



       > set q=ns





  Posons la question  propos de edu.



       > edu.




  Le . terminal est significatif, il indique  nslookup que nous
  interrogeons que edu se trouve juste sous . (et pas dans l'un de nos
  sous-domaines, ce qui acclre la recherche).



       edu     nameserver = A.ROOT-SERVERS.NET
       edu     nameserver = H.ROOT-SERVERS.NET
       edu     nameserver = B.ROOT-SERVERS.NET
       edu     nameserver = C.ROOT-SERVERS.NET
       edu     nameserver = D.ROOT-SERVERS.NET
       edu     nameserver = E.ROOT-SERVERS.NET
       edu     nameserver = I.ROOT-SERVERS.NET
       edu     nameserver = F.ROOT-SERVERS.NET
       edu     nameserver = G.ROOT-SERVERS.NET
       A.ROOT-SERVERS.NET      internet address = 198.41.0.4
       H.ROOT-SERVERS.NET      internet address = 128.63.2.53
       B.ROOT-SERVERS.NET      internet address = 128.9.0.107
       C.ROOT-SERVERS.NET      internet address = 192.33.4.12
       D.ROOT-SERVERS.NET      internet address = 128.8.10.90
       E.ROOT-SERVERS.NET      internet address = 192.203.230.10
       I.ROOT-SERVERS.NET      internet address = 192.36.148.17
       F.ROOT-SERVERS.NET      internet address = 192.5.5.241
       G.ROOT-SERVERS.NET      internet address = 192.112.36.4





  Nous apprenons ainsi que tous les serveurs ROOT-SERVERS.NET servent le
  domaine edu.; nous pouvons donc continuer en les interrogeant tous.
  Nous continuerons en interrogeant C. Maintenant, nous voulons savoir
  qui sert le niveau suivant du nom de domaine : mit.edu. :



       > mit.edu.
       Server:  c.root-servers.net
       Address:  192.33.4.12

       Non-authoritative answer:
       mit.edu nameserver = STRAWB.mit.edu
       mit.edu nameserver = W20NS.mit.edu
       mit.edu nameserver = BITSY.mit.edu

       Authoritative answers can be found from:
       STRAWB.mit.edu  internet address = 18.71.0.151
       W20NS.mit.edu   internet address = 18.70.0.160
       BITSY.mit.edu   internet address = 18.72.0.3




  strawb, w20ns et bitsy servent tous le domaine mit, prenons-en un au
  hasard et posons-lui la question au sujet d'un domaine encore plus
  prcis : ai.mit.edu :

       > server W20NS.mit.edu.




  On ne distingue pas majuscules et minuscules pour les noms de domaine,
  et comme j'utilise ma souris pour faire du copier-coller, vous lisez
  les choses dans ce document telles qu'elles apparaissent sur mon
  cran.



       Server:  W20NS.mit.edu
       Address:  18.70.0.160

       > ai.mit.edu.
       Server:  W20NS.mit.edu
       Address:  18.70.0.160

       Non-authoritative answer:
       ai.mit.edu      nameserver = ALPHA-BITS.AI.MIT.EDU
       ai.mit.edu      nameserver = GRAPE-NUTS.AI.MIT.EDU
       ai.mit.edu      nameserver = TRIX.AI.MIT.EDU
       ai.mit.edu      nameserver = MUESLI.AI.MIT.EDU
       ai.mit.edu      nameserver = LIFE.AI.MIT.EDU
       ai.mit.edu      nameserver = BEET-CHEX.AI.MIT.EDU
       ai.mit.edu      nameserver = MINI-WHEATS.AI.MIT.EDU
       ai.mit.edu      nameserver = COUNT-CHOCULA.AI.MIT.EDU
       ai.mit.edu      nameserver = MINTAKA.LCS.MIT.EDU

       Authoritative answers can be found from:
       AI.MIT.EDU      nameserver = ALPHA-BITS.AI.MIT.EDU
       AI.MIT.EDU      nameserver = GRAPE-NUTS.AI.MIT.EDU
       AI.MIT.EDU      nameserver = TRIX.AI.MIT.EDU
       AI.MIT.EDU      nameserver = MUESLI.AI.MIT.EDU
       AI.MIT.EDU      nameserver = LIFE.AI.MIT.EDU
       AI.MIT.EDU      nameserver = BEET-CHEX.AI.MIT.EDU
       AI.MIT.EDU      nameserver = MINI-WHEATS.AI.MIT.EDU
       AI.MIT.EDU      nameserver = COUNT-CHOCULA.AI.MIT.EDU
       AI.MIT.EDU      nameserver = MINTAKA.LCS.MIT.EDU
       ALPHA-BITS.AI.MIT.EDU   internet address = 128.52.32.5
       GRAPE-NUTS.AI.MIT.EDU   internet address = 128.52.36.4
       TRIX.AI.MIT.EDU internet address = 128.52.37.6
       MUESLI.AI.MIT.EDU       internet address = 128.52.39.7
       LIFE.AI.MIT.EDU internet address = 128.52.32.80
       BEET-CHEX.AI.MIT.EDU    internet address = 128.52.32.22
       MINI-WHEATS.AI.MIT.EDU  internet address = 128.52.54.11
       COUNT-CHOCULA.AI.MIT.EDU        internet address = 128.52.38.22
       MINTAKA.LCS.MIT.EDU     internet address = 18.26.0.36





  Ainsi, muesli.ai.mit.edu est un serveur de noms pour le domaine
  ai.mit.edu :



       > server MUESLI.AI.MIT.EDU
       Default Server:  MUESLI.AI.MIT.EDU
       Address:  128.52.39.7




  Changeons le type de requte. Nous avons russi  trouver le serveur
  de noms, nous allons maintenant demander tout ce que muesli sait sur
  le domaine prep.ai.mit.edu.



       > set q=any
       > prep.ai.mit.edu.
       Server:  MUESLI.AI.MIT.EDU
       Address:  128.52.39.7

       prep.ai.mit.edu CPU = dec/decstation-5000.25    OS = unix
       prep.ai.mit.edu
               inet address = 18.159.0.42, protocol = tcp
                 ftp  telnet  smtp  finger
       prep.ai.mit.edu preference = 1, mail exchanger = gnu-life.ai.mit.edu
       prep.ai.mit.edu internet address = 18.159.0.42
       ai.mit.edu      nameserver = beet-chex.ai.mit.edu
       ai.mit.edu      nameserver = alpha-bits.ai.mit.edu
       ai.mit.edu      nameserver = mini-wheats.ai.mit.edu
       ai.mit.edu      nameserver = trix.ai.mit.edu
       ai.mit.edu      nameserver = muesli.ai.mit.edu
       ai.mit.edu      nameserver = count-chocula.ai.mit.edu
       ai.mit.edu      nameserver = mintaka.lcs.mit.edu
       ai.mit.edu      nameserver = life.ai.mit.edu
       gnu-life.ai.mit.edu     internet address = 128.52.32.60
       beet-chex.ai.mit.edu    internet address = 128.52.32.22
       alpha-bits.ai.mit.edu   internet address = 128.52.32.5
       mini-wheats.ai.mit.edu  internet address = 128.52.54.11
       trix.ai.mit.edu internet address = 128.52.37.6
       muesli.ai.mit.edu       internet address = 128.52.39.7
       count-chocula.ai.mit.edu        internet address = 128.52.38.22
       mintaka.lcs.mit.edu     internet address = 18.26.0.36
       life.ai.mit.edu internet address = 128.52.32.80





  En commenant  partir de ., nous avons successivement trouv les
  serveurs de noms des diffrents niveaux du nom de domaine. Si vous
  aviez utilis votre propre serveur DNS  la place de tous ces autres
  serveurs, votre named aurait, bien sr, cach toutes ces informations
  et il n'aurait plus eu besoin de les redemander pendant un certain
  temps.


  Si l'on revient a l'analogie avec les arbres, chaque ``.'' dans le nom
  est un embranchement. Et chaque nom entre deux . est une branche de
  l'arbre.


  Grimpons ensemble dans l'arbre en prenant le nom que nous voulons
  (prep.ai.mit.edu). On part de la racine (.), on regarde ensuite dans
  quelle branche grimper, dans notre cas, edu. Ds qu'on l'a trouve, on
  y grimpe en passant par le serveur qui connat cette partie du nom.
  Ensuite, assis sur la branche edu, on cherche la branche mit (le nom
  combin est mit.edu), puis la branche ai.mit.edu. Maintenant, on est
  sur le bon serveur, au bon embranchement. La dernire partie est de
  trouver prep.ai.mit.edu, ce qui est trs simple. En informatique
  fondamentale, on appelle prep une _f_e_u_i_l_l_e de l'arbre.


  Un domaine dont on parle beaucoup moins, mais qui n'en est pas moins
  important, est in-addr.arpa. Ce domaine trouve sa place dans la
  hirarchie des noms de domaine comme un domaine ``normal''.  in-
  addr.arpa nous sert  obtenir le nom d'hte connaissant l'adresse IP
  d'une machine. Une chose trs importante ici est de bien remarquer que
  les adresses IP sont notes en sens inverse  l'intrieur du domaine
  in-addr.arpa. Si vous avez l'adresse d'une machine : 192.128.52.43,
  named procde exactement comme dans l'exemple de prep.ai.mit.edu : il
  trouve les serveurs pour in-addr.arpa., trouve les serveurs pour
  192.in-addr.arpa., trouve les serveurs pour 128.192.in-addr.arpa., et
  finalement trouve les serveurs pour 52.128.192.in-addr.arpa. . On
  obtient bien ainsi l'information lie  43.52.128.192.in-addr.arpa.
  Malin, n'est ce pas ?  (dites oui). En fait, la rsolution de noms
  inverse est assez difficile  admettre les premires annes.


   vrai dire, je vous ai menti. Le service DNS ne marche pas vraiment
  comme a. Mais ce que je vous ai dit est suffisamment proche de la
  ralit.


  44..22..  NNoottrree pprroopprree ddoommaaiinnee

  Maintenant, nous en sommes  dfinir notre propre domaine bien  nous.
  Nous allons crer le domaine linux.bogus et y dclarer quelques
  machines. C'est un nom de domaine totalement factice, afin d'tre sr
  de ne dranger personne dans le Vaste Monde.


  Encore une chose avant de commencer. Tous les caractres ne sont pas
  admis dans les noms de machines. On ne doit utiliser que les
  caractres de l'alphabet anglais (a-z), les nombres (0-9) et le tiret
  ``-''. Utilisez ces caractres, majuscules et minuscules sont
  confondues, donc pat.uio.no est identique  Pat.UiO.No.


  En fait, nous avons dj commenc  crer notre propre domaine avec
  cette ligne dans named.conf:


  ______________________________________________________________________
  zone "0.0.127.in-addr.arpa" {
          type master;
          file "pz/127.0.0";
  };
  ______________________________________________________________________




  Notez bien l'absence de ``.''  la fin des noms de domaine de ce
  fichier. Elle signifie que nous allons dfinir la zone 0.0.127.in-
  addr.arpa, que nous sommes son serveur principal et que tout est
  stock dans un fichier appel pz/127.0.0. On a dj vu ce fichier, il
  se prsente comme ceci :


  ______________________________________________________________________
  @               IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                                  1       ; Serial
                                  8H      ; Refresh
                                  2H      ; Retry
                                  1W      ; Expire
                                  1D)     ; Minimum TTL
                          NS      ns.linux.bogus.
  1                       PTR     localhost.
  ______________________________________________________________________


  Notez bien le ``.''  la fin de tous les noms de domaine complets de
  ce fichier, contrairement au fichier named.boot.  Certaines personnes
  aiment commencer chaque fichier dfinissant une zone par une directive
  $ORIGIN, mais en fait c'est superflu. L'origine (l'emplacement dans la
  hirarchie du service DNS) d'un fichier de zone est indique dans la
  zone section du fichier named.conf. Dans notre cas, c'est 0.0.127.in-
  addr.arpa.


  Ce ``fichier de zone'' (``zone file''), contient 3 ``resource
  records'' (RRs) : un SOA RR, un NS RR et un PTR RR. SOA est
  l'abrviation de ``Start Of Authority'' (Origine de l'Autorit). Le
  ``@'' est une notation spciale qui dsigne l'origine. Et comme la
  colonne ``domain'' de ce fichier donne 0.0.127.in-addr.arpa, la
  premire ligne signifie donc :



       0.0.127.IN-ADDR.ARPA. IN SOA ...





  NS est le ``resource records'' pour le serveur de noms (NS = Name
  Server), Il n'y a pas de @ au dbut de la ligne, il est implicite,
  puisque la ligne d'avant commence avec un ``@''. Alors, faites-vous
  une fleur en omettant ce caractre. Donc, la ligne NS peut aussi
  s'crire comme suit :



       0.0.127.in-addr.arpa.   IN      NS      ns.linux.bogus





  Elle dit au service DNS quelle machine est le serveur de noms pour le
  domaine 0.0.127.in-addr.arpa, c'est ns.linux.bogus. ns est le nom
  habituel des serveurs de noms, tout comme www. pour les serveurs Web,
  mais c'est simplement une habitude, on peut choisir n'importe quel
  nom.


  Et finalement le PTR dit que l'adresse 1 dans le sous rseau
  0.0.127.in-addr.arpa, donc 127.0.0.1 est appel localhost.


  Le champ SOA est le prambule de _t_o_u_s les fichiers de zone, et il doit
  y en avoir exactement un dans chaque fichier de zone. Ce champ SOA
  dcrit la zone, son origine (une machine appele ns.linux.bogus), qui
  est responsable de son contenu (hostmaster@linux.bogus, vous devriez
  mettre votre adresse email  cet endroit), de quelle version du
  fichier de zone il s'agit (serial : 1), et quelques autres paramtres
  pour le cache et les serveurs DNS secondaires. Quant aux champs
  restants (_r_e_f_r_e_s_h, _r_e_t_r_y, _e_x_p_i_r_e et _m_i_n_i_m_u_m) utilisez les valeurs
  donnes dans ce HOWTO et tout se passera certainement trs bien.


  Maintenant, relancez votre named (avec la commande ndc restart) et
  utilisez nslookup pour regarder le rsultat :




  $ nslookup

  Default Server:  localhost
  Address:  127.0.0.1

  > 127.0.0.1
  Server:  localhost
  Address:  127.0.0.1

  Name:    localhost
  Address:  127.0.0.1




  Tout va bien, on arrive  obtenir localhost  partir de 127.0.0.1.
  Maintenant, pour le sujet qui nous proccupe, le domaine linux.bogus,
  insrez une nouvelle zone dans le fichier named.conf :


  ______________________________________________________________________
  zone "linux.bogus" {
          notify no;
          type master;
          file "pz/linux.bogus";
  };
  ______________________________________________________________________




  Notez qu'encore une fois il n'y a pas de ``.''  la fin des noms de
  domaine dans le fichier named.conf.


  Dans le fichier de zone linux.bogus, nous allons mettre quelques
  donnes totalement factices :


  ______________________________________________________________________
  ;
  ; Zone file for linux.bogus
  ;
  ; The full zone file
  ;
  @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                          199802151       ; serial, todays date + todays serial #
                          8H              ; refresh, seconds
                          2H              ; retry, seconds
                          1W              ; expire, seconds
                          1D )            ; minimum, seconds
  ;
                  NS      ns              ; Inet Address of name server
                  MX      10 mail.linux.bogus     ; Primary Mail Exchanger
                  MX      20 mail.friend.bogus.   ; Secondary Mail Exchanger
  ;
  localhost       A       127.0.0.1
  ns              A       192.168.196.2
  mail            A       192.168.196.4
  ______________________________________________________________________




  Il y a deux choses  noter  propos du champ SOA. ns.linux.bogus _d_o_i_t
  _a_b_s_o_l_u_m_e_n_t tre une vraie machine possdant un champ A. Il n'est pas
  lgal d'avoir un champ CNAME pour la machine mentionne dans le champ
  SOA. Il n'est pas ncessaire que son nom soit ``ns'', ce peut tre
  tout autre nom valide. La deuxime chose  noter c'est que
  hostmaster.linux.bogus doit se lire comme hostmaster@linux.bogus. Ce
  doit tre un alias de mail, ou une vritable bote aux lettres
  lectronique, et la personne qui maintient le DNS doit la lire
  rgulirement. Tous les mails concernant l'administration du domaine
  seront envoys  cette adresse. Il n'est pas obligatoire que le nom
  soit ``hostmaster'', vous pouvez mettre votre adresse e-mail
  personnelle, mais il serait bon que l'adresse ``hostmaster''
  fonctionne aussi.


  Il y a un nouveau RR (Resource Record) dans ce fichier, c'est le MX,
  pour Mail eXchanger. Il indique aux systmes de gestion du courrier
  lectronique  quelle machine envoyer le mail adress 
  someone@linux.bogus, dans notre cas  mail.linux.bogus ou
  mail.friend.bogus. Le nombre devant chaque machine est sa priorit
  vis--vis du champ MX, le RR avec le numro le plus faible (10)
  correspond  la machine  laquelle le courrier doit tre adress en
  priorit. En cas d'chec, il peut tre adress  la machine qui a le
  numro de priorit immdiatement suprieur, c'est--dire
  mail.friend.bogus qui a une priorit de 20 dans notre cas.


  Relancez named en tapant ndc restart. Examinons le rsultat avec
  nslookup :



       $ nslookup
       > set q=any
       > linux.bogus
       Server:  localhost
       Address:  127.0.0.1

       linux.bogus
               origin = ns.linux.bogus
               mail addr = hostmaster.linux.bogus
               serial = 199802151
               refresh = 28800 (8 hours)
               retry   = 7200 (2 hours)
               expire  = 604800 (7 days)
               minimum ttl = 86400 (1 day)
       linux.bogus     nameserver = ns.linux.bogus
       linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus
       linux.bogus     preference = 20, mail exchanger = mail.friend.bogus
       linux.bogus     nameserver = ns.linux.bogus
       ns.linux.bogus  internet address = 192.168.196.2
       mail.linux.bogus        internet address = 192.168.196.4





  Un examen approfondi vous montrera qu'il y a un bug. En effet, la
  ligne



         linux.bogus preference = 10, mail exchanger = mail.linux.bogus.linux.bogus





  est entirement fausse. Il devrait y avoir



         linux.bogus preference = 10, mail exchanger = mail.linux.bogus





  J'ai fait cette erreur dlibrment, pour voir si vous suiviez :-) En
  regardant dans le fichier de zone, nous trouvons que dans la ligne



       @ MX 10 mail.linux.bogus ; Primary Mail Exchanger




  il manque un point. Ou il y a un ``linux.bogus'' de trop. Si, dans un
  fichier de zone, un nom de machine ne se termine pas par un point,
  l'origine est ajoute au nom de la machine. Ainsi, une des deux
  formes :


  ______________________________________________________________________
                  MX      10 mail.linux.bogus.    ; Primary Mail Exchanger
  ______________________________________________________________________



  ou


  ______________________________________________________________________
                  MX      10 mail                 ; Primary Mail Exchanger
  ______________________________________________________________________




  est correcte. Je prfre la deuxime forme parce qu'il y a moins de
  caractres  taper. Certains approuveront, d'autres non.  Dans un
  fichier de zone, le nom de domaine doit ou bien tre crit et termin
  par un point, ou bien ne pas tre inclus du tout. Dans le dernier cas,
  le nom de domaine par dfaut est l'origine.


  Il faut que j'insiste sur le point suivant : dans le fichier
  named.conf, il ne doit _p_a_s y avoir de ``.'' aprs les noms de
  domaines. Vous ne pouvez pas vous imaginer les ravages qui ont t
  causs pas des ``.'' en trop ou en moins.


  Cela tant dit, voici le nouveau fichier de zone, avec quelques
  informations supplmentaires :









  ______________________________________________________________________
  ;
  ; Zone file for linux.bogus
  ;
  ; The full zone file
  ;
  @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                          199802151       ; serial, todays date + todays serial #
                          8H              ; refresh, seconds
                          2H              ; retry, seconds
                          1W              ; expire, seconds
                          1D )            ; minimum, seconds
  ;
                  TXT     "Linux.Bogus, your DNS consultants"
                  NS      ns              ; Inet Address of name server
                  NS      ns.friend.bogus.
                  MX      10 mail         ; Primary Mail Exchanger
                  MX      20 mail.friend.bogus. ; Secondary Mail Exchanger

  localhost       A       127.0.0.1

  gw              A       192.168.196.1
                  HINFO   "Cisco" "IOS"
                  TXT     "The router"

  ns              A       192.168.196.2
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "Pentium" "Linux 2.0"
  www             CNAME   ns

  donald          A       192.168.196.3
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "i486"      "Linux 2.0"
                  TXT     "DEK"

  mail            A       192.168.196.4
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "386sx" "Linux 1.2"

  ftp             A       192.168.196.5
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "P6" "Linux 2.1.86"
  ______________________________________________________________________




  Il y a un certain nombre de nouveaux RR que nous allons passer en
  revue : HINFO (Host INFOrmation), qui est en deux parties, et c'est
  une bonne habitude  prendre que d'encadrer chacune de guillemets. La
  premire partie est la description matrielle ou le type de processeur
  de la machine tandis que la deuxime partie dcrit le logiciel utilis
  ou le systme d'exploitation de la machine. ns a pour processeur un
  Pentium et tourne sous Linux 2.0. Le champ CNAME (Canonical NAME) sert
   donner plusieurs noms  la mme machine. Par consquent, www est un
  alias de ns.


  L'utilisation des champs CNAME est assez controverse. Mais il est
  sage de suivre la rgle selon laquelle un champ MX, CNAME ou SOA ne
  doit _j_a_m_a_i_s se rfrer  un champ CNAME, toujours se rfrer  un
  champ A, il est donc prfrable de ne pas avoir :
  ______________________________________________________________________
  foobar          CNAME   www                     ; NON !
  ______________________________________________________________________



  En revanche, ceci est correct :


  ______________________________________________________________________
  foobar          CNAME   ns                      ; Oui !
  ______________________________________________________________________




  Il est aussi important de noter qu'un CNAME n'est pas un nom d'hte
  lgal pour une adresse de courrier lectronique.
  webmaster@www.linux.bogus est une adresse de mail illgale avec la
  configuration ci-dessus. Vous pouvez tre srs qu'il y a un certain
  nombre d'administrateurs systme dans le Vaste Monde qui sont trs 
  cheval sur cette rgle, mme si avec un CNAME a marche pour vous. Une
  faon de contourner le problme est d'utiliser des champs A (et
  peut-tre d'autres, comme un champ MX par exemple)  la place :


  ______________________________________________________________________
  www             A       192.168.196.2
  ______________________________________________________________________




  Un certain nombre de gourous-du-bind recommandent de ne _p_a_s utiliser
  de CNAME. Mais les discussions sur le pour et le contre sortent du
  cadre de ce HOWTO.


  Mais comme vous le voyez, ce HowTo ainsi que beaucoup de serveurs ne
  suivent pas cette rgle.


  Chargez la nouvelle base de donnes en lanant ndc reload, ce qui
  forcera named  relire ses fichiers de configuration.



       $ nslookup
       Default Server:  localhost
       Address:  127.0.0.1

       > ls -d linux.bogus





  Ceci veut dire que l'on souhaite que tous les champs soient affichs.








  [localhost]
  $ORIGIN linux.bogus.
  @                       1D IN SOA       ns hostmaster (
                                          199802151       ; serial
                                          8H              ; refresh
                                          2H              ; retry
                                          1W              ; expiry
                                          1D )            ; minimum

                          1D IN NS        ns
                          1D IN NS        ns.friend.bogus.
                          1D IN TXT       "Linux.Bogus, your DNS consultants"
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
  gw                      1D IN A         192.168.196.1
                          1D IN HINFO     "Cisco" "IOS"
                          1D IN TXT       "The router"
  mail                    1D IN A         192.168.196.4
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "386sx" "Linux 1.0.9"
  localhost               1D IN A         127.0.0.1
  www                     1D IN CNAME     ns
  donald                  1D IN A         192.168.196.3
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "i486" "Linux 1.2"
                          1D IN TXT       "DEK"
  ftp                     1D IN A         192.168.196.5
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "P6" "Linux 1.3.59"
  ns                      1D IN A         192.168.196.2
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "Pentium" "Linux 1.2"





  Tout va bien. Regardons ce qu'il dit pour www tout seul :



       > set q=any
       > www.linux.bogus.
       Server:  localhost
       Address:  127.0.0.1

       www.linux.bogus canonical name = ns.linux.bogus
       linux.bogus     nameserver = ns.linux.bogus
       linux.bogus     nameserver = ns.friend.bogus
       ns.linux.bogus  internet address = 192.168.196.2





  En d'autres termes, le vrai nom de www.linux.bogus est ns.linux.bogus,
  et vous avez en plus quelques informations  propos de ns, en fait,
  suffisamment pour vous y connecter si vous tiez un programme.


  Bon, on a fait la moiti du boulot.

  44..33..  LLaa zzoonnee iinnvveerrssee

  a y est, les programmes peuvent convertir les noms de linux.bogus en
  adresses auxquelles ils peuvent se connecter. Maintenant, on a besoin
  d'une zone inverse pour que l'on puisse retrouver le DNS  partir de
  l'adresse. Ce nom est utilis par diffrents types de serveurs (FTP,
  IRC, WWW et autres) pour dcider s'ils vont discuter avec vous ou non,
  et s'ils le font, quelle priorit ils vont vous donner. Pour un accs
  complet aux services sur Internet, la zone inverse est indispensable.


  Mettez a dans votre named.conf


  ______________________________________________________________________
  zone "196.168.192.in-addr.arpa" {
          notify no;
          type master;
          file "pz/192.168.196";
  };
  ______________________________________________________________________




  C'est exactement comme pour le 0.0.127.in-addr.arpa et le contenu est
  similaire :


  ______________________________________________________________________
  @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                          199802151 ; Serial, todays date + todays serial
                          8H      ; Refresh
                          2H      ; Retry
                          1W      ; Expire
                          1D)     ; Minimum TTL
                  NS      ns.linux.bogus.

  1               PTR     gw.linux.bogus.
  2               PTR     ns.linux.bogus.
  3               PTR     donald.linux.bogus.
  4               PTR     mail.linux.bogus.
  5               PTR     ftp.linux.bogus.
  ______________________________________________________________________




  Redmarrez votre named (ndc restart) et examinez votre travail avec
  nslookup :


  ______________________________________________________________________
  > 192.168.196.4
  Server:  localhost
  Address:  127.0.0.1

  Name:    mail.linux.bogus
  Address:  192.168.196.4
  ______________________________________________________________________




  On dirait que c'est bon, on va regarder en dtails pour s'en assurer :

  ______________________________________________________________________
  > ls -d 196.168.192.in-addr.arpa
  [localhost]
  $ORIGIN 196.168.192.in-addr.arpa.
  @                       1D IN SOA       ns.linux.bogus. hostmaster.linux.bogus. (
                                          199802151       ; serial
                                          8H              ; refresh
                                          2H              ; retry
                                          1W              ; expiry
                                          1D )            ; minimum

                          1D IN NS        ns.linux.bogus.
  1                       1D IN PTR       gw.linux.bogus.
  2                       1D IN PTR       ns.linux.bogus.
  3                       1D IN PTR       donald.linux.bogus.
  4                       1D IN PTR       mail.linux.bogus.
  5                       1D IN PTR       ftp.linux.bogus.
  @                       1D IN SOA       ns.linux.bogus. hostmaster.linux.bogus. (
                                          199802151       ; serial
                                          8H              ; refresh
                                          2H              ; retry
                                          1W              ; expiry
                                          1D )            ; minimum
  ______________________________________________________________________




  Pas mal ! Si ce que vous donne nslookup ne ressemble pas a a, allez a
  la pche aux messages d'erreur dans votre syslog. J'ai expliqu
  comment faire au tout dbut du chapitre.


  44..44..  PPrrccaauuttiioonnss dd''uussaaggee

  Je devrais maintenant faire quelques remarques. Les adresses IP
  utilises dans les exemples prcdents sont prises dans le bloc des
  ``rseaux privs'', c'est  dire des adresses qui ne doivent pas tre
  utilises publiquement sur Internet. Donc, il est sage de les avoir
  utilises dans un exemple d'un HowTo. La deuxime chose est la ligne
  notify no;. Elle demande  named de ne pas informer ses serveur
  secondaires (les esclaves) quand l'un de ses fichiers de zone a t
  mis  jour. Depuis Bind-8 named peut informer les autres serveurs
  lists dans ses champs NS dans le fichier zone, quand une zone est
  mise a jour. C'est pratique pour une utilisation normale, mais pour
  des expriences prives cette fonctionnalit doit tre mise hors
  service, on ne va quand mme pas polluer Internet avec nos
  expriences, non ?


  Bien sr, ce domaine est trs factice, tout comme le sont ses
  adresses. C'est peut-tre un peu droutant pour vous. Un vrai exemple
  tir d'un vrai domaine vous attend au grand chapitre suivant.


  44..55..  PPoouurrqquuooii eesstt--ccee qquuee lleess llooookkuupp iinnvveerrssss nnee mmaarrcchheenntt ppaass ??

  Il y a quelques trucs qui sont normalement vits avec les lookups qui
  arrivent souvent quand on met en place des zones inverss. Avant de
  continuer, vous avez besoin d'avoir des lookups qui marchent sur vos
  propres serveurs de noms. Si ce n'est pas le cas, revenez en arrire
  et rparez-le avant de continuer.


  Je parlerais des deux problmes de lookups inverss qui sont vu de
  l'extrieur de votre rseau :
  44..55..11..  LLaa zzoonnee iinnvveerrssee nn''eesstt ppaass ddllgguuee..

  Quand vous demandez  un fournisseur d'accs quelques adresses IP
  ainsi qu'un nom de domaine, le nom de domaine vous est normalement
  dlgu. La dlgation consiste en un champ NS qui vous aide a passer
  d'un serveur  l'autre comme je l'ai expliqu dans le brin de thorie
  qui prcde. Vous l'avez lu, n'est-ce pas ? Si votre zone inverse ne
  marche pas, retournez y et lisez-le. Maintenant.


  La zone inverse a elle aussi besoin d'tre dlgue. Si vous avez le
  rseau 192.168.196 avec le domaine linux.bogus de votre fournisseur,
  il devra mettre des champs NS pour votre zone inverse aussi bien que
  pour votre zone directe. Si vous remontez la chane  partir de in-
  addr.arpa vous trouverez un trou quelque part. Trs certainement au
  niveau de votre fournisseur. Aprs avoir trouv le trou dans la
  chane, contactez votre fournisseur et demandez-lui de corriger
  l'erreur.


  44..55..22..  VVoouuss aavveezz uunn ssoouuss--rrsseeaauu ssaannss ccllaassssee

  C'est un sujet plutt pointu, mais les sous rseaux sans classe sont
  trs rpandus de nos jours et vous en aurez trs certainement un si
  vous n'tes pas une entreprise assez grande.


  Un sous-rseau sans classe est ce qui sauve Internet de nos jours. Il
  y a quelques annes, il y avait vraiment beaucoup de discussions sur
  la rarfaction des adresses IP. Les personnes intelligentes de l'IETF
  (Internet Engineering Task Force, ceux qui maintiennent Internet en
  tat de marche) se sont penches sur cet pineux problme et ont
  trouv une solution. A un certain prix. Le prix est que vous aurez
  moins qu'un sous rseau de classe ``C'' et que certaines choses ne
  marcheront certainement plus. Allez voir Ask Mr DNS (c'est en anglais)
  pour plus d'explications.


  Vous l'avez lu ? Comme je ne vais pas l'expliquer, s'il vous plat,
  allez le lire.


  La premire partie du problme est que votre FAI doit comprendre la
  technique dcrite par _M_r _D_N_S. Tous les petits FAI ne le comprennent
  pas. S'ils n'ont pas bien compris, vous allez avoir  leur expliquer
  et  insister.  Mais assurez-vous de comprendre vous-mme en premier
  lieu ;-). Ils mettrons ensuite une jolie zone inverse sur leurs
  serveurs que vous pourrez examiner pour savoir si elle est correcte
  avec nslookup.


  La deuxime et dernire partie du problme est que vous devez en
  comprendre la technique. Si vous n'tes pas certain, revenez en
  arrire et relisez ce document.  Ensuite, vous pourrez mettre en place
  une zone inverse sans classe comme le dcrit _M_r _D_N_S.


  Il y a une autre difficult qui pointe son nez ici. Les vieux
  rsolveurs _n_e _s_e_r_o_n_t _p_a_s capable de suivre les champs CNAME dans la
  chane de rsolution et n'arriveront pas a rsoudre l'IP de votre
  machine. Cela peut entraner l'assignation d'une mauvaise classe, la
  non-rsolution ou quelque chose dans ce got-l. Si vous butez sur ce
  genre de problme, la seule solution (que je connaisse) est de
  demander  votre FAI d'insrer vos champs PTR dans ses fichiers de
  zone sans classe plutt que des champs CNAME.

  Certains FAI vous proposeront d'autre mthodes pour grer cela, comme
  des formulaires web o vous pourrez entrer vos zones inverses, ou
  d'autre systmes automatiss.


  55..  UUnn eexxeemmppllee ttiirr dd''uunn ddoommaaiinnee rreell

  OO nnoouuss aalllloonnss eennffiinn vvooiirr ddee _v_r_a_i_s ffiicchhiieerrss ddee zzoonnee


  Certains utilisateurs ont suggr que je mette un vrai exemple d'un
  domaine qui marche dans la ralit car mon explication sur la
  diffrence entre un vrai domaine et l'exemple bidon ci-dessus n'tait
  pas trs claire.


  J'utilise cet exemple avec la permission de David Bullock de LAND-5.
  Ces fichiers taient  jour le 24 Septembre 96, et ont t modifie
  pour tre utiliss avec les restrictions de bind 8 et quelques
  extensions de mon cru. Par consquent, ils peuvent donc diffrer de ce
  que vous pouvez trouver en questionnant les serveurs de nom de LAND-5
  aujourd'hui.


  Voici les sections pour les deux zones inverses ncessaires : le
  rseau 127.0.0, ainsi que le sous-rseau LAND-5 206.6.177. Et une
  ligne primary pour la forward zone land-5.com. Notez aussi qu'au lieu
  de mettre les fichiers dans le rpertoire pz comme dans ce HowTo, il
  les met dans le rpertoire zone.


  55..11..  //eettcc//nnaammeedd..ccoonnff ((oouu //vvaarr//nnaammeedd//nnaammeedd..ccoonnff))



  ______________________________________________________________________
  // Boot file for LAND-5 name server

  options {
          directory "/var/named";
  };

  zone "." {
          type hint;
          file "root.hints";
  };

  zone "0.0.127.in-addr.arpa" {
          type master;
          file "zone/127.0.0";
  };

  zone "land-5.com" {
          type master;
          file "zone/land-5.com";
  };

  zone "177.6.206.in-addr.arpa" {
          type master;
          file "zone/206.6.177";
  };
  ______________________________________________________________________




  Si vous mettez a dans votre named.conf pour jouer avec, PPAARR PPIITTII
  mettez aussi le ``notify no;'' dans les zones des deux land-5.com pour
  viter les accidents.


  55..22..  //vvaarr//nnaammeedd//rroooott..hhiinnttss

  Souvenez-vous que le contenu de ce fichier peut changer, et celui
  donn ici est assez vieux. Vous feriez mieux d'utiliser un fichier
  plus rcent, produit par le programme dig.


  ______________________________________________________________________
  ; <<>> DiG 8.1 <<>> @A.ROOT-SERVERS.NET.
  ; (1 server found)
  ;; res options: init recurs defnam dnsrch
  ;; got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10
  ;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
  ;; QUERY SECTION:
  ;;      ., type = NS, class = IN

  ;; ANSWER SECTION:
  .                     6D IN NS        G.ROOT-SERVERS.NET.
  .                     6D IN NS        J.ROOT-SERVERS.NET.
  .                     6D IN NS        K.ROOT-SERVERS.NET.
  .                     6D IN NS        L.ROOT-SERVERS.NET.
  .                     6D IN NS        M.ROOT-SERVERS.NET.
  .                     6D IN NS        A.ROOT-SERVERS.NET.
  .                     6D IN NS        H.ROOT-SERVERS.NET.
  .                     6D IN NS        B.ROOT-SERVERS.NET.
  .                     6D IN NS        C.ROOT-SERVERS.NET.
  .                     6D IN NS        D.ROOT-SERVERS.NET.
  .                     6D IN NS        E.ROOT-SERVERS.NET.
  .                     6D IN NS        I.ROOT-SERVERS.NET.
  .                     6D IN NS        F.ROOT-SERVERS.NET.

  ;; ADDITIONAL SECTION:
  G.ROOT-SERVERS.NET.     5w6d16h IN A    192.112.36.4
  J.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.10
  K.ROOT-SERVERS.NET.     5w6d16h IN A    193.0.14.129
  L.ROOT-SERVERS.NET.     5w6d16h IN A    198.32.64.12
  M.ROOT-SERVERS.NET.     5w6d16h IN A    202.12.27.33
  A.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.4
  H.ROOT-SERVERS.NET.     5w6d16h IN A    128.63.2.53
  B.ROOT-SERVERS.NET.     5w6d16h IN A    128.9.0.107
  C.ROOT-SERVERS.NET.     5w6d16h IN A    192.33.4.12
  D.ROOT-SERVERS.NET.     5w6d16h IN A    128.8.10.90
  E.ROOT-SERVERS.NET.     5w6d16h IN A    192.203.230.10
  I.ROOT-SERVERS.NET.     5w6d16h IN A    192.36.148.17
  F.ROOT-SERVERS.NET.     5w6d16h IN A    192.5.5.241

  ;; Total query time: 215 msec
  ;; FROM: roke.uio.no to SERVER: A.ROOT-SERVERS.NET.  198.41.0.4
  ;; WHEN: Sun Feb 15 01:22:51 1998
  ;; MSG SIZE  sent: 17  rcvd: 436
  ______________________________________________________________________




  55..33..  //vvaarr//nnaammeedd//zzoonnee//112277..00..00

  Nous y avons mis juste l'essentiel, le champ SOA obligatoire, et un
  champ qui tablit la correspondance entre 127.0.0.1 et localhost. Ils
  sont tous les deux indispensables. Rien d'autre ne doit figurer dans
  ce fichier. Il ne sera probablement jamais ncessaire de le mettre 
  jour,  moins que l'adresse du serveur de noms ou de hostmaster ne
  change.


  ______________________________________________________________________
  @               IN      SOA     land-5.com. root.land-5.com. (
                                  199609203       ; Serial
                                  28800   ; Refresh
                                  7200    ; Retry
                                  604800  ; Expire
                                  86400)  ; Minimum TTL
                          NS      land-5.com.

  1                       PTR     localhost.
  ______________________________________________________________________




  55..44..  //vvaarr//nnaammeedd//zzoonnee//llaanndd--55..ccoomm

  Nous trouvons ici le classique et obligatoire champ SOA ainsi que les
  champs NS. Nous pouvons voir qu'il y a un serveur de noms secondaire
  ns2.psi.net. C'est comme a que tout le monde devrait faire : _t_o_u_j_o_u_r_s
  avoir un serveur secondaire sur un site distant pour faire des
  sauvegardes. Nous voyons galement que le serveur primaire est land-5,
  qui assure tous les services, et que l'administrateur a utilis des
  CNAME pour faire a (il aurait pu utiliser des champs A).


  Comme vous pouvez voir d'aprs le champ SOA, le fichier de zone a son
  origine en land-5.com, la personne  contacter est root@land-5.com.
  hostmaster est une autre adresse souvent utilise pour la personne 
  contacter. Le numro de srie est au format obligatoire aaaammjj, avec
  le numro de srie dans la journe ajout  la fin; il s'agit
  certainement de la sixime version du fichier de zone pour la journe
  du 20 septembre 1996. N'oubliez-pas que le numro de srie doit
  _o_b_l_i_g_a_t_o_i_r_e_m_e_n_t augmenter avec le temps, ici il n'y a qu'un chiffre
  pour le numro de srie dans la journe, si bien qu'aprs 9
  modifications il faudra attendre le lendemain pour modifier le fichier
   nouveau. On peut aussi utiliser deux chiffres au lieu d'un seul.
























  ______________________________________________________________________
  @       IN      SOA     land-5.com. root.land-5.com. (
                          199609206       ; serial, todays date + todays serial #
                          8H              ; refresh, seconds
                          2H              ; retry, seconds
                          1W              ; expire, seconds
                          1D )            ; minimum, seconds
                  NS      land-5.com.
                  NS      ns2.psi.net.
                  MX      10 land-5.com.  ; Primary Mail Exchanger
                  TXT     "LAND-5 Corporation"

  localhost       A       127.0.0.1

  router          A       206.6.177.1

  land-5.com.     A       206.6.177.2
  ns              A       206.6.177.3
  www             A       207.159.141.192

  ftp             CNAME   land-5.com.
  mail            CNAME   land-5.com.
  news            CNAME   land-5.com.

  funn            A       206.6.177.2

  ;
  ;       Workstations
  ;
  ws-177200       A       206.6.177.200
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177201       A       206.6.177.201
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177202       A       206.6.177.202
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177203       A       206.6.177.203
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177204       A       206.6.177.204
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177205       A       206.6.177.205
                  MX      10 land-5.com.   ; Primary Mail Host
  ; {Ici 245 lignes ont t effaces}
  ws-177250       A       206.6.177.250
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177251       A       206.6.177.251
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177252       A       206.6.177.252
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177253       A       206.6.177.253
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177254       A       206.6.177.254
                  MX      10 land-5.com.   ; Primary Mail Host
  ______________________________________________________________________




  Si vous examinez le serveur de noms de land-5, vous allez voir que les
  noms sont de la forme ws__n_o_m_b_r_e. Depuis les dernires versions de bind
  4, named fait plus attention aux caractres placs dans les noms de
  domaines. Cela ne marcherait pas du tout avec bind-8, c'est pour a
  que j'ai remplac les ``_'' (soulign) par des ``-'' (tiret) pour
  l'exemple dans ce HowTo.



  Une autre chose qu'il faut noter est que les stations de travail n'ont
  pas de nom personnel, mais plutt un prfixe suivit des deux derniers
  morceaux de leur adresse IP. Utiliser une telle convention simplifie
  grandement la maintenance, mais c'est un peu impersonnel, et a peut
  agacer vos clients.


  Nous voyons aussi que funn.land-5.com est un alias pour land-5.com,
  mais en utilisant un enregistrement A, pas un CNAME. C'est une bonne
  chose comme on l'a not plus haut.


  55..55..  //vvaarr//nnaammeedd//zzoonnee//220066..66..117777

  Les commentaires se trouvent juste aprs le fichier.


  ______________________________________________________________________
  @               IN      SOA     land-5.com. root.land-5.com. (
                                  199609206       ; Serial
                                  28800   ; Refresh
                                  7200    ; Retry
                                  604800  ; Expire
                                  86400)  ; Minimum TTL
                          NS      land-5.com.
                          NS      ns2.psi.net.
  ;
  ;       Servers
  ;
  1       PTR     router.land-5.com.
  2       PTR     land-5.com.
  2       PTR     funn.land-5.com.
  ;
  ;       Workstations
  ;
  200     PTR     ws-177200.land-5.com.
  201     PTR     ws-177201.land-5.com.
  202     PTR     ws-177202.land-5.com.
  203     PTR     ws-177203.land-5.com.
  204     PTR     ws-177204.land-5.com.
  205     PTR     ws-177205.land-5.com.
  ; {Ici 245 lignes ont t effaces}
  250     PTR     ws-177250.land-5.com.
  251     PTR     ws-177251.land-5.com.
  252     PTR     ws-177252.land-5.com.
  253     PTR     ws-177253.land-5.com.
  254     PTR     ws-177254.land-5.com.
  ______________________________________________________________________




  La zone inverse est la partie de la configuration qui semble poser le
  plus de problmes. Elle est utilise pour trouver le nom d'hte d'une
  machine, connaissant son adresse IP. Exemple : vous tes un serveur
  IRC et vous acceptez des connexions provenant de clients IRC.
  Cependant, comme vous tes un serveur IRC norvgien, vous ne voulez
  accepter que les connexions venant de Norvge ou des autres pays
  scandinaves. Ainsi, lorsqu'un client se connecte chez vous, la
  bibliothque C peut vous dire quelle est l'adresse IP du client,
  puisque cette dernire se trouve dans tous les paquets qui traversent
  le rseau. Ensuite, vous pouvez appeler une fonction connue sous le
  nom de gethostbyaddr qui va rechercher le nom d'une machine
  connaissant son adresse IP. gethostbyaddr va poser la question  un
  serveur de noms, qui va alors faire une recherche de la machine dans
  le DNS. Supposons que la connexion du client se fasse depuis
  ws_177200.land-5.com. L'adresse IP que la bibliothque C fournit au
  serveur IRC est 206.6.177.200. Pour retrouver le nom de cette machine,
  il nous faut trouver 200.177.6.206.in-addr.arpa. Le serveur de noms va
  donc d'abord trouver les serveurs arpa., puis les serveurs in-
  addr.arpa., poursuivre la recherche inverse par 206, puis 6 et
  finalement trouver le serveur pour la zone 177.6.206.in-addr.arpa 
  LAND-5. C'est ce dernier qui lui dira que pour 200.177.6.206.in-
  addr.arpa nous avons un champ ``PTR ws_177200.land-5.com'', ce qui
  veut dire que le nom qui va avec 206.6.177.200 est
  ws_177200.land-5.com. Tout comme l'explication de la rsolution de
  prep.ai.mit.edu, ce scnario est un peu idalis.


  Revenons  l'exemple du serveur IRC. Le serveur n'accepte que les
  connexions venant des pays scandinaves, c'est--dire *.no, *.se, *.dk.
  Le nom ws_177200.land-5.com ne correspond videmment pas, et le
  serveur va donc refuser la connexion. Si il n'existait _p_a_s de
  rsolution inverse de 206.2.177.200 au travers de la zone in-
  addr.arpa, le serveur aurait t tout  fait incapable de trouver le
  nom, et aurait d se contenter de comparer 206.6.177.200  *.no, *.se
  et *.dk, dont aucun ne correspond.


  Certaines personnes vous diront que la rsolution de noms inverse
  n'est importante que pour les serveurs, ou pas importante du tout. Pas
  tant que a : beaucoup de serveurs ftp, news, irc ou mme certains
  http (Web) n'acceptent _p_a_s les connexions venant de machines dont ils
  ne peuvent retrouver le nom. C'est pourquoi la rsolution de noms
  inverse pour les machines est _o_b_l_i_g_a_t_o_i_r_e.



  66..  MMaaiinntteennaannccee

  GGaarrddeerr vvoottrree DDNNSS eenn ttaatt ddee mmaarrcchhee


  En plus des tches normales, il y a une tche de maintenance spciale
   effectuer sur les serveurs de nom. Il s'agit de garder le fichier
  root.hints  jour. La faon la plus simple de le faire est d'utiliser
  dig. Lancez d'abord dig sans argument, vous obtiendrez le fichier
  root.cache de votre propre serveur. Posez alors la mme question  un
  des serveurs de cette liste avec la commande dig @rootserver. Vous
  remarquerez que ce que vous obtenez ressemble normment  un fichier
  root.hints, avec quelques chiffres en plus. Ces chiffres
  supplmentaires sont inoffensifs. Sauvez-le dans un fichier (dig .
  @e.root-servers.net >root.hints.new) et remplacez l'ancien fichier
  root.hints avec.


  N'oubliez pas de relancer named aprs avoir remplac ce fichier.


  Al Longyear m'a envoy ce script, qui peut tre lanc automatiquement
  pour mettre  jour named.hints. Lancez-le automatiquement  partir de
  la crontab et vous pourrez oublier qu'il existe. Ce script suppose que
  l'alias de mail `hostmaster' existe. Il faudra sans doute modifier ce
  fichier pour qu'il fonctionne chez vous.








  ______________________________________________________________________
  #!/bin/sh
  #
  # Met a jours les informations du cache du serveur de noms chaque mois.
  # Ce script est lanc automatiquement par un cron.
  #
  # Original par Al Longyear
  # Mis a jour pour Bind 8 par Nicolai Langfeldt
  # Plusieurs erreurs dcouvertes par David A. Ranch
  # Test avec un ping suggr par Martin Foster
  #
  (
   echo "To: hostmaster <hostmaster>"
   echo "From: system <root>"
   echo "Subject: Mise a jour automatique du fichier root.hints"
   echo

   PATH=/sbin:/usr/sbin:/bin:/usr/bin:
   export PATH
   cd /var/named

   # Sommes nous connects ? Pingons un serveur de notre FAI
   case `ping -qnc some.machine.net` in
     *'100% packet loss'*)
          echo "PAS de connexion rseau. root.hints NON mis  jour"
          echo
          exit 0
          ;;
   esac

   dig @rs.internic.net . ns >root.hints.new 2>&1

   case `cat root.hints.new` in
     *NOERROR*)
          # Ca a march
          :;;
     *)
          echo "La mise a jour de root.hints a ECHOUE."
          echo "Voici la sortie de dig :"
          echo
          cat root.hints.new
          exit 0
          ;;
   esac

   echo "Le fichier root.hints a t mis a jour et contient les informations suivantes :"
   echo
   cat root.hints.new

   chown root.root root.hints.new
   chmod 444 root.hints.new
   rm -f root.hints.old
   mv root.hints root.hints.old
   mv root.hints.new root.hints
   ndc restart
   echo
   echo "Le serveur de noms a t redmarr, de cette manire, la mise a jour est complte."
   echo "L'ancien root.hints s'appelle maintenant /var/named/root.hints.old."
  ) 2>&1 | /usr/lib/sendmail -t
  exit 0
  ______________________________________________________________________





  Certains d'entre vous ont remarqus que le fichier root.hints est
  aussi disponible via ftp depuis l'Internic. S'il vous plat,
  n'utilisez pas le ftp pour mettre  jour le root.hints, la mthode ci
  dessus est bien meilleur du point de vue de la nettiquette et de
  l'Internic.


  77..  PPaasssseerr ddee llaa vveerrssiioonn 44  llaa vveerrssiioonn 88

  Cette section tait au dpart sur l'utilisation de bind-8 crite par
  David E. Smith (dave@bureau42.ml.org). Je l'ai dite pour reflter le
  nouveau nom de la section.


  Il n'y a pas grand chose  faire, sinon, utiliser named.conf au lieu
  du named.boot, or bind-8 est distribu avec un script perl pour
  convertir un named.boot en named.conf. Exemple de named.boot (vieux)
  pour un serveur qui ne sert que de cache :


  ______________________________________________________________________
  directory /var/named
  cache   .                                     root.hints
  primary 0.0.127.IN-ADDR.ARPA                    127.0.0.zone
  primary localhost                               localhost.zone
  ______________________________________________________________________




  Depuis la ligne de commande, et depuis le rpertoire
  bind8/src/bin/named (au cas o vous avez rcupr les sources; si vous
  avez eu un paquetage binaire, le script se balade certainement dans le
  coin), tapez :


  ______________________________________________________________________
  ./named-bootconf.pl < named.boot > named.conf
  ______________________________________________________________________



  qui cre un nouveau named.conf :























  ______________________________________________________________________
  // generated by named-bootconf.pl

  options {
          directory "/var/named";
  };

  zone "." {
          type hint;
          file "root.hints";
  };

  zone "0.0.127.IN-ADDR.ARPA" {
          type master;
          file "127.0.0.zone";
  };

  zone "localhost" {
          type master;
          file "localhost.zone";
  };
  ______________________________________________________________________




  a marche pour tout ce qui pouvait aller dans un named.boot, mais, il
  ne met pas toutes les nouveauts que bind-8 permet. Voici une version
  plus complte d'un named.conf qui fait la mme chose, mais d'une faon
  plus efficace :


  ______________________________________________________________________
  // Voici le fichier de configuration de named (pour BIND 8.1 et ultrieur).
  // Il devrait normalement tre install dans /etc/named.conf.
  // Le seul changement fait dans le named.conf d'origine (a part ce commentaire
  // :) est que la ligne directory a t dcommente, car j'ai dj les fichiers
  // de zone dans /var/named.

  options {
          directory "/var/named";
          datasize 20M;
  };

  zone "localhost" IN {
          type master;
          file "localhost.zone";
  };

  zone "0.0.127.in-addr.arpa" IN {
          type master;
          file "127.0.0.zone";
  };

  zone "." IN {
          type hint;
          file "root.hints";
  };
  ______________________________________________________________________




  Dans le rpertoire bind8/src/bin/named/test de la distribution de
  bind8, vous trouverez tout a, ainsi que des fichiers de zone que la
  majorit peuvent prendre et utiliser instantanment.
  Les formats des fichiers de zone et du root.hints sont les mmes, tout
  comme les commandes qui les mettent  jour.


  88..  QQuueessttiioonnss eett RRppoonnsseess

  Dans cette section, je passe en revue quelques-unes des questions les
  plus frquemment poses  propos du DNS et de ce HOWTO. Et je donne
  mme les rponses ;-) Merci de bien lire cette section avant de
  m'crire.


  1. Mon named me rclame un fichier named.boot


     Vous vous tes tromps de HowTo. allez voir l'ancienne version de
     ce HowTo, celle qui parle de bind 4,  www.math.uio.no/~janl/DNS/


  2. Question : Comment utiliser un DNS si l'on se trouve derrire un
     firewall ?


     Voici un indice : forward only;. Vous aurez probablement aussi
     besoin de mettre :


     ___________________________________________________________________
       query-source port 53;

     ___________________________________________________________________



  dans la partie ``options'' de votre named.conf comme l'exemple 3 le
  suggre ``serveur qui ne fait que du cache''.


  3. Question : Comment dire  un DNS qu'il doit faire une rotation
     entre un certain nombre d'adresses pour un service donn, par
     exemple si l'on veut obtenir quilibrer la charge de www.busy.com
     entre plusieurs machines ?


     Crez plusieurs champs AA pour www.busy.com et utilisez bind 4.9.3
     ou une version plus rcente, qui supporte les rponses  scrutation
     circulaire. Cela ne marchera _p_a_s avec des versions de bind
     antrieures.


  4. Je veux mettre en place un serveur DNS sur un Intranet (ferm).
     Comment faire ?


     Effacez rageusement le fichier root.hints et crez seulement les
     fichiers de zone. Cela veut aussi dire que vous n'aurez pas  crer
     des nouveaux fichiers hints tout le temps.


  5. Comment mettre en place un serveur secondaire ?


     Si le serveur primaire a pour adresse 127.0.0.1, mettez une ligne
     comme celle-ci dans le fichier named.conf du serveur secondaire :


     ___________________________________________________________________
       zone "linux.bogus" {
             type slave;
             file "sz/linux.bogus";
             masters { 127.0.0.1; };
       };

     ___________________________________________________________________




  Vous pouvez mettre plusieurs serveurs matres, ajoutez les sur la
  ligne masters en les sparant par un ``;'' (point-virgule)


  6. Je veux faire tourner bind lorsque je suis dconnect du rseau


     Il y a trois trucs a savoir :


    J'ai reu le mail suivant de Ian Clark <ic@deakin.edu.au>, o il
     explique comment il fait a :




       Ici, je fais tourner named sur la machine qui fait du "Masquerading". J'ai
       deux fichiers root.cache, un qui s'appelle root.cache.real et qui contient les
       vrais noms des serveurs root, et l'autre qui s'appelle root.cache.fake qui
       contient ceci~:

       --------------
       ; root.hints.fake
       ; Ce fichier ne contient pas d'informations
       --------------

       Quand je me dconnecte, je copie le fichier root.hints.fake vers root.hints et
       je relance named.

       Quand je me connecte, je copie root.hints.real et je relance named.

       Ces deux manoeuvres sont faites, respectivement,  partir de ip-down et ip-up.

       Lorsque je suis dconnect, named rajoute ceci au fichier messages aprs la
       premire requte concernant un nom de domaine qu'il ne connat pas~:

       Jan 28 20:10:11 hazchem named[10147]: No root nameserver for class IN

       Ce qui n'est pas trs gnant.

       a marche trs bien dans mon cas.  Je peux utiliser le serveur de noms pour
       les machines locales lorsque je suis dconnect du Net en vitant les dlais
       introduits par les timeout lis  la recherche des noms de domaine extrieurs.
       Et lorsque je suis connect au Net, les requtes concernant les noms de
       domaines extrieurs marchent normalement.





    J'ai aussi reu des informations sur la faon dont bind interagit
     avec NFS et le portmapper sur une machine qui est le plus souvent
     dconnecte de la part de Karl-Max Wanger :

       J'ai pris l'habitude d'utiliser named sur toutes mes machines qui sont
       seulement connectes  Internet de faons occasionnelles grce  un modem. Le
       serveur de noms n'agit qu'en tant que cache, il n'a aucune zone d'autorit et
       demande tout aux serveurs du fichier root.cache.  Comme d'habitude avec une
       Slackware, named est dmarr avant nfsd et mountd.

       Avec l'une de mes machines (un portable Libretto 30), j'ai eu le problme
       suivant~: de temps en temps, je pouvais monter ses disques depuis un autre
       systme connect sur mon LAN local, mais la plupart du temps, a ne marchait
       pas. Il se passait la mme chose que ce soit en utilisant PLIP, une carte
       Ethernet PCMCIA ou PPP avec une interface srie.

       Aprs quelques temps de rflexions et d'expriences, j'ai dcouvert que named
       empchait nfsd et mountd de s'enregistrer avec portmapper au dmarrage (Je
       dmarre ces dmons au boot d'habitude).  Le fait de lancer named aprs nfsd
       et mountd liminait ce problme compltement

       Comme il n'y a pas de dsavantages  modifier ainsi la squence de boot de
       cette faon, j'encourage tout le monde  en faire de mme pour viter des
       problmes potentiels.





    Enfin, il y a quelques informations sur le sujet chez Ask Mr DNS.
     C'est a propos de bind 4, vous aurez donc  l'adapter pour que cela
     fonctionne avec bind 8.



  7. O le serveur de noms qui fait que du cache stocke-t-il son cache ?
     Puis-je contrler la taille de ce cache ?


     Le cache est entirement stock en mmoire, il n'est _p_a_s crit sur
     le disque. Chaque fois que vous tuez named, le cache est perdu. Il
     n'y a _a_u_c_u_n moyen de contrler le cache. named gre le cache selon
     quelques rgles simples, et c'est tout. Vous ne pouvez pas
     contrler le cache ou sa taille en aucune manire. Si vous voulez
     vraiment le faire, vous pouvez le faire en bricolant le code de
     named. Mais ce n'est pas recommand.


  8. Est-ce que named sauvegarde le contenu du cache entre deux
     redmarrage ?  Puis-je le forcer  le faire ?


     Non, named ne sauve _p_a_s la contenu du cache lorsqu'il meurt. Cela
     signifie que le cache est reconstruit  partir de zro chaque fois
     que vous tuez puis relancez named. Il n'y a _a_u_c_u_n moyen de forcer
     named  sauvegarder le contenu du cache dans un fichier.  Si vous
     voulez vraiment le faire, vous pouvez le faire en bricolant le code
     de named. Mais, encore une fois, ce n'est pas recommand.


  9. Comment je fais pour obtenir un domaine ? Je veux mettre en place
     mon domaine appel (par exemple) linux-rulez.net. Comment puis-je
     me faire assigner ce domaine ?


     Contactez votre FAI. Ils seront en mesure de vous aider pour tout
     a. Notez toutefois que vous aurez certainement  payer quelque
     chose.


  99..  CCoommmmeenntt ddeevveenniirr uunn aaddmmiinniissttrraatteeuurr DDNNSS ddee hhaauutt vvooll

  DDooccuummeennttaattiioonn eett oouuttiillss


  La Vraie Documentation existe. En ligne et imprime. Il faut
  absolument la lire si vous voulez devenir un administrateur DNS du
  plus haut niveau.  Pour ce qui est de la documentation imprime, le
  livre standard est _D_N_S _a_n_d _B_I_N_D de C. Liu et P. Albitz chez O'Reilly &
  Associates, Sebastopol, CA, ISBN 0-937175-82-X. Je l'ai lu, c'est
  excellent, la deuxime dition est base sur bind 4, la troisime sur
  bind 8. Il y a aussi un chapitre sur le DNS dans _T_C_P_/_I_P _N_e_t_w_o_r_k
  _A_d_m_i_n_i_s_t_r_a_t_i_o_n, de Craig Hunt chez O'Reilly..., ISBN 0-937175-82-X. Un
  autre passage oblig pour une Bonne administration de DNS (ou Bonne
  n'importe quoi, d'ailleurs) est _Z_e_n _a_n_d _t_h_e _A_r_t _o_f _M_o_t_o_r_c_y_c_l_e
  _M_a_i_n_t_e_n_a_n_c_e by Robert M. Pirsig :-) Disponible sous la rfrence ISBN
  0688052304 entre autres.


  En ligne, vous trouverez des trucs sur DNS Resources Directory,
  www.isc.org/bind.html; Une FAQ, un manuel de rfrence (BOG; Bind
  Operations Guide) aussi bien que des papiers, des descriptions de
  protocoles et des trucs sur le service DNS (ces documents, ainsi que
  la majorit, sinon la totalit des RFC mentionnes ci-dessous font
  partie de la distribution de bind). Je n'ai pas lu la plupart de ces
  trucs-l, c'est pourquoi je ne suis pas un Grand Administrateur de
  DNS. Arnt Gulbrandsen,  l'inverse, a lu le BOG et n'en dit que du
  bien :-). Le newsgroup comp.protocols.tcp-ip.domains parle de DNS. En
  complment, il y a un certain nombre de RFC sur le DNS, les plus
  importantes sont certainement celles-ci :



     RRFFCC 22005522
        A. Gulbrandsen, P. Vixie, _A _D_N_S _R_R _f_o_r _s_p_e_c_i_f_y_i_n_g _t_h_e _l_o_c_a_t_i_o_n
        _o_f _s_e_r_v_i_c_e_s _(_D_N_S _S_R_V_), October 1996


     RRFFCC 11991188
        Y. Rekhter, R. Moskowitz, D. Karrenberg, G. de Groot, E. Lear,
        _A_d_d_r_e_s_s _A_l_l_o_c_a_t_i_o_n _f_o_r _P_r_i_v_a_t_e _I_n_t_e_r_n_e_t_s, 02/29/1996.


     RRFFCC 11991122
        D. Barr, _C_o_m_m_o_n _D_N_S _O_p_e_r_a_t_i_o_n_a_l _a_n_d _C_o_n_f_i_g_u_r_a_t_i_o_n _E_r_r_o_r_s,
        02/28/1996.


     RRFFCC 11991122 EErrrroorrss
        B. Barr _E_r_r_o_r_s _i_n _R_F_C _1_9_1_2, this is available at www.cis.ohio-
        state.edu/~barr/rfc1912-errors.html


     RRFFCC 11771133
        A. Romao, _T_o_o_l_s _f_o_r _D_N_S _d_e_b_u_g_g_i_n_g, 11/03/1994.


     RRFFCC 11771122
        C. Farrell, M. Schulze, S. Pleitner, D. Baldoni, _D_N_S _E_n_c_o_d_i_n_g _o_f
        _G_e_o_g_r_a_p_h_i_c_a_l _L_o_c_a_t_i_o_n, 11/01/1994.


     RRFFCC 11118833
        R. Ullmann, P. Mockapetris, L. Mamakos, C. Everhart, _N_e_w _D_N_S _R_R
        _D_e_f_i_n_i_t_i_o_n_s, 10/08/1990.

     RRFFCC 11003355
        P. Mockapetris, _D_o_m_a_i_n _n_a_m_e_s _- _i_m_p_l_e_m_e_n_t_a_t_i_o_n _a_n_d _s_p_e_c_i_f_i_c_a_t_i_o_n,
        11/01/1987.


     RRFFCC 11003344
        P. Mockapetris, _D_o_m_a_i_n _n_a_m_e_s _- _c_o_n_c_e_p_t_s _a_n_d _f_a_c_i_l_i_t_i_e_s,
        11/01/1987.


     RRFFCC 11003333
        M. Lottor, _D_o_m_a_i_n _a_d_m_i_n_i_s_t_r_a_t_o_r_s _o_p_e_r_a_t_i_o_n_s _g_u_i_d_e, 11/01/1987.


     RRFFCC 11003322
        M. Stahl, _D_o_m_a_i_n _a_d_m_i_n_i_s_t_r_a_t_o_r_s _g_u_i_d_e, 11/01/1987.


     RRFFCC 997744
        C. Partridge, _M_a_i_l _r_o_u_t_i_n_g _a_n_d _t_h_e _d_o_m_a_i_n _s_y_s_t_e_m, 01/01/1986.














































  From DOS/Windows to Linux HOWTO
  Par Guido Gonzato,  <REMOVE_MEguido@ibogfs.cineca.it>
  (enlevez REMOVE_ME) ; adaptation franaise : Mark Hoebeke,
  <mh@jouy.inra.fr>.
  v1.3.2, 22 Fvrier 1999

  Ce HOWTO est consacr  tous les (bientt ex-?) utilisateurs de DOS et
  Windows qui ont dcid de basculer vers Linux, le clone gratuit
  d'UNIX. L'objectif de ce document est d'aider le lecteur  transposer
  sa connaissance de DOS et Windows  l'environnement Linux, et gale
  ment de lui fournir des astuces sur la manire d'changer des fichiers
  et des ressources entre les deux systmes d'exploitation.
  ______________________________________________________________________

  Table des matires



















































  1. Introduction

     1.1 Est-ce bien Linux qu'il vous faut ?
     1.2 Oui, c'est bien Linux. Je veux en savoir plus.
        1.2.1 Concepts introductifs
        1.2.2 Obtenir de l'aide.
     1.3 Conventions

  2. Pour les impatients

  3.  la rencontre du bash

  4. Fichiers et Programmes

     4.1 Fichiers : notions prliminaires
     4.2 Liens symboliques
     4.3 Droits d'accs et proprit
     4.4 Fichiers : traduction des commandes
        4.4.1 Exemples
     4.5 Excution de programmes : le multi-tches et les sessions
     4.6 Excution de programmes sur des ordinateurs distants

  5. Utilisation des rpertoires

     5.1 Rpertoires : notions prliminaires
     5.2 Droits d'accs aux rpertoires
     5.3 Rpertoires: traduction de commandes
        5.3.1 Exemples

  6. Disquettes, disques durs et consorts

     6.1 Gestion des priphriques  la DOS
     6.2 Gestion des priphriques   la UNIX
     6.3 Les sauvegardes

  7. Et Windows alors ?

  8. Personnalisation du systme

     8.1 Fichiers d'initialisation du systme
     8.2 Fichiers d'initialisation de programmes

  9. Le rseau : concepts

  10. Un peu de programmation

     10.1 Les
     10.2 E-C-iez par vous-mme

  11. Le 1% restant

     11.1 Utilisation de tar et gzip
     11.2 Installation d'applications
     11.3 Astuces indispensables
     11.4 O trouver les applications
     11.5 Quelques trucs impossibles sous DOS
     11.6 Entranement  Unix sous DOS/Windows
     11.7 Les extensions courantes et les programmes correspondants
     11.8 Conversion de fichiers
     11.9 Suites bureautiques gratuites

  12. La fin, du moins pour l'instant

     12.1 Droits d'auteur
     12.2 Responsabilits

  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  EEsstt--ccee bbiieenn LLiinnuuxx qquu''iill vvoouuss ffaauutt ??


  Vous voulez basculer du monde DOS (cette dfinition incluant Windows)
  vers Linux ? Bonne ide : Linux est techniquement suprieur au DOS, 
  Windows 9x et mme  Windows NT. Mais prenez garde : cela ne vous sera
  peut-tre pas si utile que a. Voici les principales diffrences entre
  DOS/Windows et Linux :


    Windows peut faire tourner Microsoft Office et des tas de jeux ;
     est considr comme facile  installer et configurer ; est
     notoirement instable ; est peu performant et sujet  des plantages
     frquents.

    Linux peut faire tourner StarOffice, un flope de logiciels
     techniques mais moins de jeux ; peut tre difficile  installer et
      configurer ; est d'une stabilit  toute preuve ; offre des
     performances optimales et ne plante qu'extrmement rarement.

  C'est  vous de dcider ce dont vous avez besoin. En outre, Linux vous
  donne la puissance mais ncessite un temps d'apprentissage pour la
  matriser. Ainsi, si vous voulez utiliser avant tout des logiciels du
  commerce, ou si vous ne vous sentez pas d'attaque pour apprendre
  quelques nouveaux concepts et commandes, vous feriez mieux de regarder
  ailleurs. Soyez conscient que de nombreux dbutants abandonnent 
  cause des difficults rencontres au dmarrage.

  Des travaux sont en cours pour rendre Linux plus simple d'utilisation,
  mais _n_'_e_s_p__r_e_z _p_a_s _v_o_u_s _y _s_e_n_t_i_r _ _l_'_a_i_s_e _ _m_o_i_n_s _d_e _l_i_r_e _p_a_s _m_a_l _d_e
  _d_o_c_u_m_e_n_t_a_t_i_o_n _e_t _d_e _l_'_u_t_i_l_i_s_e_r _a_u _m_o_i_n_s _p_e_n_d_a_n_t _q_u_e_l_q_u_e_s _m_o_i_s. Linux
  ne vous donnera pas de rsultats immdiats. En dpit de ces
  avertissements, je suis confiant  100% que si vous tes le bon type
  d'utilisateur, vous trouverez en Linux votre Nirvana informatique. Au
  fait, Linux + DOS/Win peuvent coexister en toute harmonie sur la mme
  machine.

  Prrequis pour ce howto : je supposerai que


    vous connaissez les bases des commandes et des concepts du DOS ;

    Linux, et ventuellement le systme X Window (X11 en abrg), sont
     correctement installs sur votre PC ;

    votre interprteur de commandes (ou _s_h_e_l_l, l'quivalent de
     COMMAND.COM) est bash.

  Sauf indication contraire, toute l'information de ce document concerne
  ce vieux mchant DOS. On trouvera des informations  propos de Windows
  par-ci par-l, mais gardez  l'esprit que Windows et Linux sont
  totalement diffrents, contrairement au DOS qui est une espce de
  parent pauvre d'UNIX.

  Veuillez galement noter que ce document n'est ni une introduction
  exhaustive ni un guide de configuration !

  La version la plus rcente de ce document est disponible en diffrents
  formats  l'adresse  <ftp://sunsite.unc.edu:/pub/Linux/docs/howto>.

  11..22..  OOuuii,, cc''eesstt bbiieenn LLiinnuuxx.. JJee vveeuuxx eenn ssaavvooiirr pplluuss..


  Vous avez install Linux et les programmes dont vous avez besoin sur
  le PC. Vous vous tes cr un compte utilisateur (si ce n'est pas le
  cas, tapez adduser votre_nom _m_a_i_n_t_e_n_a_n_t _!) et Linux est en train de
  tourner. Vous venez d'entrer votre nom et votre mot de passe, et, 
  prsent, vous regardez l'cran en vous demandant : Et maintenant, que
  faire ?

  Ce n'est pas le moment de dsesprer. Vous tes sur le point de faire
  les mmes choses que celles que vous aviez l'habitude de faire avec
  DOS/Win, et beaucoup plus. Si vous tiez sous DOS/Win au lieu d'tre
  sous Linux, vous seriez en train de faire quelques-unes des tches
  suivantes :


    faire tourner des programmes et crer, copier, visualiser, effacer,
     imprimer et renommer des fichiers ;

    faire des CD, des MD, des RD et des DIR dans vos rpertoires ;

    formater des disquettes et copier des fichiers vers ou  partir de
     celles-ci ;

    personnaliser le systme ;

    surfer sur l'Internet ;

    crire des fichiers .BAT et des programmes dans votre langage
     prfr ;

    le 1% restant.

  Vous serez ravi de savoir que ces tches peuvent tre accomplies sous
  Linux de manire similaire au DOS. Sous DOS, l'utilisateur moyen
  n'utilise qu'une fraction de la bonne centaine de commandes
  disponibles : la mme chose, jusqu' un certain point, s'applique 
  Linux.


  11..22..11..  CCoonncceeppttss iinnttrroodduuccttiiffss


  La meilleure faon d'apprendre quelque chose de nouveau est de se
  jeter  l'eau. Il vous est chaudement recommand d'exprimenter et de
  jouer avec Linux :  moins de vous connecter en tant que root cela ne
  peut en aucun cas endommager le systme. Quelques points  noter :


    avant tout, comment quitter Linux en toute scurit ? Si vous tes
     devant un cran en mode texte, faites <CTRL-ALT-DEL>, attendez que
     le systme commence  redmarrer ;  ce moment-l, teignez le PC.
     Si vous travaillez sous X Windows, tapez <CTRL-ALT-BACKSPACE>
     d'abord, puis <CTRL-ALT-DEL>. Il ne faut _j_a_m_a_i_s teindre ou
     redmarrer le PC directement : cela pourrait endommager le systme
     de fichiers ;

    contrairement au DOS, Linux est pourvu d'origine de mcanismes de
     scurit. Des droits d'accs sont associs aux fichiers et aux
     rpertoires ; par consquent, l'utilisateur normal ne peut accder
      certains d'entre eux, cf. ``Droits d'accs et proprit''. 
     l'inverse, DOS et Windows vous permettront de rayer de la carte
     l'intgralit du contenu de votre disque dur ;


    il existe un utilisateur particulier appel root : c'est
     l'administrateur systme qui dispose du pouvoir de vie et de mort
     sur la machine. Si vous travaillez sur votre propre PC, c'est vous
     qui tes root. Travailler sous root est _d_a_n_g_e_r_e_u_x : toute erreur
     peut endommager srieusement voire dtruire le systme, comme avec
     DOS/Win. Ne travaillez pas sous root sauf en cas de ncessit
     absolue ;

    une grande part de la complexit de Linux provient du fait qu'il
     est configurable  l'extrme : tout paramtre et toute application
     peuvent virtuellement tre personnaliss grce  un ou plusieurs
     fichiers de configuration. Cette complexit est le prix  payer
     pour la puissance ;

    les redirections et les _p_i_p_e_s sont des capacits secondaires du
     DOS, mais ils sont beaucoup plus importants et plus puissants sous
     Linux. Des commandes simples peuvent tre mises bout  bout pour
     accomplir des tches complexes. Je vous encourage fortement 
     apprendre  vous en servir.



  11..22..22..  OObbtteenniirr ddee ll''aaiiddee..


  Il existe de nombreuses manires d'obtenir de l'aide avec Linux. Les
  plus importantes sont de :


    _l_i_r_e _l_a _d_o_c_u_m_e_n_t_a_t_i_o_n -- J'insiste. Bien que le HOWTO que vous
     lisez en ce moment puisse servir d'introduction  Linux, il y a
     plusieurs livres que vous devriez vraiment lire : le Linux
     Installation and Getting Started par Matt Welsh (
     <http://sunsite.unc.edu/mdw/LDP/gs/gs.html>), le Linux User Guide
     de Larry Greenfield ( <ftp://sunsite.unc.edu/pub/Linux/docs/linux-
     doc-project/users-guide>) , et la FAQ Linux (
     <http://sunsite.unc.edu/mdw/FAQ/Linux-FAQ.html>).  Vous devriez
     vous sentir coupable jusqu' ce que vous ayez lu au moins l'un
     d'entre eux.

    la documentation des paquetages installs sur votre machine se
     trouve souvent dans les sous-rpertoires de /usr/doc/ ;

    pour obtenir un peu d'aide sur les commandes internes du shell,
     tapez help ou mieux, man bash ou info bash ;

    pour avoir l'aide sur une commande, tapez man commande qui invoque
     la page du manuel (_m_a_n) relative  commande. D'autre part, vous
     pouvez taper info commande qui invoque la page d'informations
     (_i_n_f_o) traitant de commande.  Info est un systme de documentation
      base d'hypertexte, dont l'utilisation n'est peut-tre pas
     intuitive au dbut. Enfin, vous pouvez essayer apropos commande ou
     whatis commande. Pour toutes ces commandes, tapez q pour quitter.

    enfin, sur l'Internet : l'endroit appropri pour obtenir de l'aide
     est Usenet, par exemple dans  <news:comp.os.linux.setup>. S'il vous
     plat, ne m'envoyez pas de messages d'appel  l'aide car je suis
     quelque peu dbord.



  11..33..  CCoonnvveennttiioonnss


  Tout au long de ce document, les exemples figureront souvent au format
  suivant : <...> est un argument obligatoire, alors que [...] est
  optionnel.  Par exemple :



       $ tar -tf <fic.tar> [> fic-redir]




  fic.tar doit tre spcifi, mais la redirection vers fic_redir est
  optionnelle.

  LPM signifie Lisez les Pages du Manuel pour de plus amples
  informations. Je ne soulignerai jamais assez combien il est important
  de lire la documentation. DOSWin signifie DOS/Windows.

  Lorsque l'invite (_p_r_o_m_p_t) d'un exemple de commande est le symbole #,
  cette commande ne peut tre lance que par root.


  22..  PPoouurr lleess iimmppaattiieennttss


  Envie de vous y mettre tout de suite ? Examinez ce tableau :



       DOS                     Linux                   Notes
       ------------------------------------------------------------------------------

       ATTRIB (+-)attr fic    chmod <mode> fic       completement different
       BACKUP                 tar -Mcvf device dir/  idem
       CD repertoire\         cd repertoire/         presque la meme syntaxe
       COPY fic1 fic2         cp fic1 fic2           idem
       DEL fic                rm fic                 attention, pas de undelete
       DELTREE repertoire     rm -R repertoire/      idem
       DIR                    ls                     pas exactement la meme syntaxe
       DIR fic /S             find . -name fic       completement different
       EDIT fic               vi fic                 Je ne pense pas que vous aimerez
                              jstar fic              un peu comme 'edit' sous DOS
       EDLIN fic              ed fic                 n'y pensez meme pas
       FORMAT                 fdformat,
                              mount, umount          syntaxe assez differente
       HELP command           man command,           meme philosophie
                              info command
       MD repertoire          mkdir repertoire/      presque la meme syntaxe
       MORE < fic             less fic               bien mieux
       MOVE fic1 fic2         mv fic1 fic2           idem
       NUL                    /dev/null              idem
       PRINT fic              lpr fic                idem
       PRN                    /dev/lp0,
                              /dev/lp1               idem
       RD repertoire          rmdir repertoire/      presque la meme syntaxe
       REN fic1 fic2          mv fic1 fic2           ne marche pas pour plusieurs fichiers
       RESTORE                tar -Mxpvf device      syntaxe differente
       TYPE fic               less fic               beaucoup mieux
       WIN                    startx                 a mille lieues !




  S'il vous faut plus qu'un tableau de commandes, veuillez vous reporter
  aux sections suivantes.



  33..   llaa rreennccoonnttrree dduu bbaasshh



  Bonne nouvelle : avec Linux vous devez taper beaucoup moins de
  caractres  l'invite car l'interprteur de commandes bash tape 
  votre place autant que possible, et dispose de fonctionnalits
  d'dition de ligne du tonnerre. Pour commencer, la flche vers le haut
  rappelle les lignes de commandes prcdentes ; mais il y a plus.
  L'appui sur <TAB> complte les noms de fichiers et de rpertoires,
  ainsi, taper



       $ls /uTABloTABbTAB




  c'est comme taper


       $ ls /usr/local/bin




  S'il y a des ambiguts, comme lorsque vous tapez



       $ ls /uTABloTABiTAB




  bash s'arrte parce qu'il ne sait pas si vous voulez dire
  /usr/local/info ou /usr/local/include. Il faut fournir plus de
  caractres avant de taper <TAB>  nouveau.

  D'autres combinaisons utiles sont <ESC-BACKSPACE> qui efface un mot
  sur la gauche, et <ESC-D> qui en efface un sur la droite ; <ESC-F>
  dplace le curseur d'un mot vers la gauche ; <CTRL-A> l'amne au dbut
  de la ligne, <CTRL-E> vers la fin. La touche <ALT> est quivalente 
  la touche <ESC>.

  On s'arrte l pour le moment. Une fois habitu(e)  ces raccourcis,
  vous vous lasserez trs rapidement de l'invite du DOS...


  44..  FFiicchhiieerrss eett PPrrooggrraammmmeess




  44..11..  FFiicchhiieerrss :: nnoottiioonnss pprrlliimmiinnaaiirreess


  La structure des rpertoires et des fichiers sous Linux est trs
  similaire  celle de DOSWin. Les fichiers ont des noms qui doivent
  obir  certaines rgles, ils sont stocks dans des rpertoires,
  certains d'entre eux sont excutables et parmi ceux-ci, la plupart
  disposent d'options. De plus, il est possible d'utiliser les
  caractres _j_o_k_e_r, la redirection et les pipes. Seules quelques
  diffrences mineures existent :

    sous DOS, les noms de fichier sont au format appel 8.3 ; comme
     dans TROPCOUR.TXT. Linux peut faire mieux. Si vous avez install
     Linux en utilisant un systme de fichiers comme ext2 ou umsdos,
     vous avez le loisir d'utiliser des noms de fichier plus longs
     (jusqu' 255 caractres), et avec plus d'un point : par exemple,
     Ceci_est.un.TRES_long.nom.de.fichier. Veuillez noter que j'ai
     utilis aussi bien des majuscules que des minuscules : en fait...

    majuscules et minuscules dans les noms de fichier ou les commandes
     sont diffrencies. Par consquent, NOMFIC.tar.tgz et nomfic.tar.gz
     sont deux fichiers diffrents. De mme, ls est une commande mais LS
     est une erreur ;

    utilisateurs de Windows, faites attention en utilisant les noms de
     fichier longs sous Linux. Si un nom de fichier contient des espaces
     (ce qui n'est pas recommand mais nanmoins possible), vous devez
     l'entourer avec des guillemets  chaque fois que vous y faites
     rfrence. Par exemple :



       $ # la commande suivante cree un repertoire appele "Mes vieux fichiers"
       $ mkdir "Mes vieux fichiers"
       $ ls
       Mes vieux fichiers bin tmp





  De plus, l'usage de certains caractres est  viter : parmi eux, il y
  a !*$&.

    il n'existe pas d'extensions obligatoires comme .COM ou .EXE pour
     les programmes ou .BAT pour les fichiers de commandes. Les fichiers
     excutables sont suivis d'un astrisque * lorsque vous faites la
     commande ls -F. Par exemple :


       $ ls -F
       Je_suis_un_rep/   cindy.jpg    cjpg*   lettre_a_Joe    mon_1er_script*  vieux





  Les fichiers cjpg* et mon_1er_script* sont des excutables, autrement
  dit des programmes. Sous DOS, les copies de sauvegarde se terminent
  en .BAK, alors que sous Linux elles se terminent par une tilde ~. De
  plus, un fichier commenant par un point est considr comme tant
  cach. Exemple : le fichier .Je.suis.un.fichier.cache ne sera pas vis
  ible  la suite de la commande ls ;

    sous DOS, les options des commandes sont obtenues avec /option,
     Linux utilise -option ou --option. Exemple : dir /s devient ls -R.
     Remarquez que de nombreux programmes DOS, comme PKZIP ou ARJ
     utilisent les options dans le style d'UNIX.

   prsent, vous pouvez aborder la section ``Traduire les commandes DOS
  en Linux'', mais  votre place, je poursuivrais ici.


  44..22..  LLiieennss ssyymmbboolliiqquueess



  UNIX est pourvu d'un type de fichier sans quivalent sous DOS : le
  lien symbolique. On peut l'imaginer comme un pointeur sur un fichier
  ou un rpertoire, et on peut l'utiliser en lieu et place du fichier ou
  du rpertoire sur lequel il pointe ; cela ressemble aux raccourcis de
  Windows. Des exemples de liens symboliques sont /usr/X11, qui pointe
  sur /usr/X11R6; /dev/modem, qui pointe ou bien sur /dev/ttyS0 ou bien
  sur /dev/ttyS1.

  Pour fabriquer un lien symbolique :




       $ ln -s <fic_ou_rep> <nomdulien>




  Exemple :



       $ ln -s /usr/doc/g77/DOC g77manual.txt




  Il est alors possible de faire rfrence   g77manual.txt au lieu de
  /usr/doc/g77/DOC. Les liens apparaissent de la manire suivante dans
  l'affichage du contenu des rpertoires :



       $ ls -F
       g77manual.txt@
       $ ls -l
       (des choses et d'autres...)           g77manual.txt -> /usr/doc/g77/DOC






  44..33..  DDrrooiittss dd''aaccccss eett pprroopprriitt


  Sous DOS, les fichiers et les rpertoires disposent des attributs
  suivants : A (archive), H (cach : _h_i_d_d_e_n), R (lecture seule : _r_e_a_d_-
  _o_n_l_y) et S (systme). Seuls H et R ont un sens sous Linux : les
  fichiers cachs sont ceux qui commencent par un point, et pour ce qui
  est de l'attribut R, lisez ce qui suit.

  Sous UNIX un fichier possde des droits d'accs et un propritaire,
  qui,  son tour, fait partie d'un groupe. Regardez cet exemple :



       $ ls -l /bin/ls
       -rwxr-xr-x  1  root  bin  27281 Aug 15 1995 /bin/ls*




  Le premier champ contient les droits d'accs au fichier /bin/ls, qui
  appartient  root et au groupe bin. En laissant de ct le reste de
  l'information, souvenez-vous que la signification de -rwxr-xr-x, de
  gauche  droite, est :

  - est le type de fichier (- = fichier ordinaire, d = rpertoire :
  _d_i_r_e_c_t_o_r_y, l = lien etc.) ; rwx sont les droits d'accs pour le
  propritaire du fichier (lecture : _r_e_a_d, criture : _w_r_i_t_e, excution)
  ; r-x sont les droits d'accs pour le groupe auquel appartient le
  propritaire du fichier (lecture, excution) ; (je n'aborderai pas le
  concept de groupe, vous n'en avez pas besoin pour survivre, tant que
  vous tes dbutant ;-) r-x sont les droits d'accs pour tous les
  autres utilisateurs (lecture, excution).

  Le rpertoire /bin dispose lui aussi de droits d'accs : cf.  ``Droits
  d'accs aux rpertoires'' pour plus d'informations. C'est la raison
  pour laquelle vous ne pouvez pas effacer le fichier /bin/ls  moins
  d'tre root : vous n'avez pas les droits pour le faire. Pour changer
  les droits d'accs d'un fichier, la commande est :



       $ chmod <quiXperm> <fic>




  o qui peut tre u (utilisateur, ou propritaire), g (groupe) o
  (autres, _o_t_h_e_r), X vaut + ou -, et perm est  choisir parmi r
  (lecture, _r_e_a_d), w (criture, _w_r_i_t_e) ou x (excution). Les usages
  courants pour chmod sont les suivants :



       $ chmod +x fichier




  cela positionne le droit d'excution pour le fichier.



       $ chmod go-rw fichier




  cela enlve les droits de lecture et d'criture pour tous except le
  propritaire.



       $ chmod ugo+rwx fichier




  cela donne les droits de lecture, d'criture et d'excution  tout le
  monde.



       # chmod +s fichier





  cela fabrique un fichier de type setuid ou suid -- un fichier que
  tout un chacun peut excuter avec les privilges de son propritaire.
  Typiquement, vous rencontrerez des fichiers suid appartenant  root ;
  souvent, il s'agit de fichiers systme importants, comme le serveur X.

  Un moyen plus court de faire rfrence aux droits d'accs est
  d'utiliser les chiffres : rwxr-xr-x peut tre exprim comme 755
  (chaque lettre correspond  un bit : --- vaut 0, --x vaut 1, -w- vaut
  2, -wx vaut 3 etc.). Cela peut sembler difficile, mais avec un peu de
  pratique, vous comprendrez le concept. root, en tant que super-
  utilisateur, a la possibilit de changer les droits d'accs de
  quiconque. LPM.


  44..44..  FFiicchhiieerrss :: ttrraadduuccttiioonn ddeess ccoommmmaannddeess


   gauche, les commandes DOS,  droite, leurs correspondants Linux.



       ATTRIB:         chmod
       COPY:           cp
       DEL:            rm
       MOVE:           mv
       REN:            mv
       TYPE:           more, less, cat




  Les redirections et la tuyauterie :  < > >> |

  Les jokers : * ?

  nul:        /dev/null

  prn, lpt1:  /dev/lp0 ou /dev/lp1; lpr


  44..44..11..  EExxeemmpplleess





       DOS                                     Linux
       ---------------------------------------------------------------------

       C:\GUIDO>ATTRIB +R FIC.TXT             $ chmod 400 fic.txt
       C:\GUIDO>COPY JOE.TXT JOE.DOC           $ cp joe.txt joe.doc
       C:\GUIDO>COPY *.* TOTAL                $ cat * > total
       C:\GUIDO>COPY FRACTALS.DOC PRN         $ lpr fractals.doc
       C:\GUIDO>DEL TEMP                       $ rm temp
       C:\GUIDO>DEL *.BAK                     $ rm *
       C:\GUIDO>MOVE PAPIER.TXT TMP\         $ mv papier.txt tmp/
       C:\GUIDO>REN PAPIER.TXT PAPIER.ASC             $ mv papier.txt papier.asc
       C:\GUIDO>PRINT LETTRE.TXT              $ lpr lettre.txt
       C:\GUIDO>TYPE LETTRE.TXT               $ more lettre.txt
       C:\GUIDO>TYPE LETTRE.TXT               $ less lettre.txt
       C:\GUIDO>TYPE LETTRE.TXT > NUL         $ cat lettre.txt > /dev/null
               n/a                             $ more *.txt *.asc
               n/a                             $ cat section*.txt | less



  Notes:


    * est plus malin sous Linux : * dsigne tous les fichiers, sauf
     ceux qui sont cachs ; .* dsigne tous les fichiers cachs (mais
     galement le rpertoire courant . et son rpertoire parent .. :
     attention !) ; *.* ne dsigne que les fichiers qui contiennent, ou
     qui se terminent par un . ; p*r dsigne aussi bien papier que
     plier ; *c* dsigne aussi bien ici que pacha ;


    lors de l'utilisation de more, tapez <ESPACE> pour parcourir le
     fichier, et q pour quitter. less est plus intuitif et vous permet
     d'employer les flches ;

    UNDELETE n'existe pas, alors _p_e_n_s_e_z_-_y _ _d_e_u_x _f_o_i_s avant d'effacer
     quoi que ce soit ;

    en plus des < > >> du DOS, Linux dispose de 2> pour rediriger les
     messages d'erreur (stderr) ; de plus, 2>&1 redirige stderr vers
     stdout, alors que 1>&2 redirige stdout vers stderr ;

    Linux possde un autre joker : les []. Utilisation : [abc]* dsigne
     les fichiers commenant par a, b ou c ; *[I-N1-3] dsigne les
     fichiers se terminant par I, J, K, L, M, N, 1, 2, ou 3 ;

    lpr <fic> imprime un fichier en tche de fond. Pour vrifier l'tat
     de la file d'impressions, utilisez lpq ; pour retirer un fichier de
     la file, utilisez lprm ;


    il n'existe pas de RENAME identique  celui du DOS ; en fait, mv
     *.xxx *.yyy ne marchera pas. Un commande du type REN est disponible
      l'adresse  <ftp://sunsite.unc.edu/pub/Linux/utils/file>;

    utilisez cp -i et mv -i pour tre averti lorsqu'un fichier est sur
     le point d'tre cras.



  44..55..  EExxccuuttiioonn ddee pprrooggrraammmmeess :: llee mmuullttii--ttcchheess eett lleess sseessssiioonnss


  Pour lancer un programme, entrez son nom comme vous le feriez sous
  DOS. Si le rpertoire (cf. section ``Utilisation des rpertoires'') o
  se trouve le programme est inclus dans le PATH (cf. section ``Fichiers
  d'initialisation du systme''), le programme dmarrera. Une exception
  : contrairement au DOS, sous Linux, un programme situ dans le
  rpertoire courant ne s'excutera pas  moins que ce rpertoire ne
  soit inclus dans le PATH. _E_s_c_a_m_o_t_a_g_e (-- NdT. : En franais dans le
  texte.--) : si prog est votre programme, tapez ./prog.

  Voici  quoi ressemble une ligne de commande typique :



       $ commande [-o1 [-o2] ... [-on]] [arg1 [arg2] ... [argn]] [< entree] [> sortie]




  o -o1,...,-on sont les options de la commande et arg1,...,argn sont
  les arguments de la commande. Il est possible de spcifier plusieurs
  commandes sur une seule ligne :


       $ commande1 ; commande2 ; ... ; commanden




  C'est tout au sujet de l'excution des commandes, mais on peut
  facilement faire un pas de plus. L'une des principales motivations
  pour l'utilisation de Linux est qu'il s'agit d'un systme
  d'exploitation multi-tches -- il est capable de faire tourner
  plusieurs programmes (qu'on appellera des processus) en mme temps.
  Vous pouvez lancer des processus en arrire-plan et continuer 
  travailler dans la foule. De plus, Linux vous permet d'avoir
  plusieurs sessions : c'est comme si on travaillait sur plusieurs
  ordinateurs  la fois !



    Pour passer  la session 1...6 parmi les consoles virtuelles, tapez
     <ALT-F1> ... <ALT-F6>

    Pour dmarrer une nouvelle session dans la mme console virtuelle,
     sans quitter la session courante, tapez  su - <nomdelogin>. Par
     exemple :  su - root. Cela peut tre utile pour effectuer une tche
     que seul root peut accomplir, par exemple.

    Pour clore une session, tapez exit. S'il reste des jobs arrts
     (cf. plus loin) vous en serez averti.

    Pour lancer un processus en arrire-plan, ajoutez une perluette
     &  la fin de la ligne de commande :



       $ nomduprog [-options] [arguments] [< entree] [> sortie] &
       [1] 123





  Le shell associe un numro de job au processus (ex. : [1] ; cf. plus
  loin), ainsi qu'un PID (_P_r_o_c_e_s_s _I_d_e_n_t_i_f_i_c_a_t_i_o_n _N_u_m_b_e_r (-- numro
  d'identification du processus--) ) ; 123 dans notre exemple).

    Pour voir combien il y a de processus, tapez ps ax. Cela affichera
     la liste des processus qui tournent actuellement.

    Pour tuer (_t_e_r_m_i_n_a_t_e) un processus, tapez kill <PID>. Vous pouvez
     tre oblig de tuer un processus lorsque vous ne savez pas comment
     le quitter proprement...  moins d'tre root, il vous est
     impossible de tuer les processus d'autres personnes. Quelquefois,
     un processus ne pourra tre tu qu'en faisant kill -SIGKILL <PID>.

     De plus, le shell vous permet d'arrter ou de suspendre
     temporairement un processus, de l'envoyer en arrire-plan ou de le
     remettre au premier plan. Dans ce contexte, les processus sont
     appels jobs.

    Pour voir combien il y a de jobs, tapez jobs. Dans ce cas, les jobs
     sont identifis par leur numro de job, et non pas par leur PID.

    Pour arrter un processus qui tourne au premier plan, tapez <CTRL-
     C> (cela peut ne pas marcher).

    Pour suspendre un processus qui tourne au premier plan, tapez
     <CTRL-Z> (idem).
    Pour envoyer un processus suspendu en arrire-plan, tapez bg <%job>
     (il devient alors un job).

    Pour amener un job au premier plan, tapez fg <%job>. Pour ramener
     au premier plan le dernier job envoy en arrire-plan, il suffit de
     taper fg.

    Pour tuer un job, tapez kill <%job>, o <job>peut tre 1, 2, 3,...

   l'aide de ces commandes, vous pouvez formater un disque, compresser
  une flope de fichiers, compiler un programme, et dcompresser et
  archiver le tout, tout cela en mme temps, tout en gardant la main.
  Essayez-donc de faire cela avec Windows, rien que pour voir la
  diffrence de performance (si a ne plante pas, bien sr).


  44..66..  EExxccuuttiioonn ddee pprrooggrraammmmeess ssuurr ddeess oorrddiinnaatteeuurrss ddiissttaannttss


  Pour lancer un programme sur une machine distante dont le nom est
  machine.distante.edu, il suffit de faire :





       $ telnet machine.distante.edu




  Aprs vous tre connect, dmarrez votre programme prfr. Cela va
  sans dire, vous devez avoir un compte utilisateur sur la machine
  distante.

  Si vous disposez de X11, il vous est mme possible de faire tourner
  une application X sur une machine distante dont l'affichage se fera
  sur votre cran X. Soit machine.distante.edu la machine distante
  disposant de X, et machine.locale.linux votre machine Linux. Pour
  faire tourner  partir de machine.locale.linux une application X
  rsidant sur machine.distante.edu, il faut faire ce qui suit :


    dmarrez X11, lancez un mulateur de terminal comme xterm ou ses
     quivalents, et tapez :



       $ xhost +machine.distante.edu
       $ telnet machine.distante.edu





    aprs vous tre connect, tapez :



       remote:$ DISPLAY=machine.locale.linux:0.0
       remote:$ nomduprogramme &





  (au lieu de DISPLAY..., il se peut que vous ayez  taper setenv DIS
  PLAY  machine.locale.linux:0.0. Cela dpend du shell distant.)

  _E_t _v_o_i_l_a !  nomduprogramme va maintenant dmarrer sur
  machine.distante.edu et ses affichages se feront sur votre machine.
  Toutefois, il est inutile d'essayer de le faire par modem, ce serait
  trop lent pour tre utilisable. De plus il s'agit d'une mthode fruste
  et non scurise : veuillez vous reporter au Remote X Apps mini-
  HOWTO disponible  l'adresse
  <http://sunsite.unc.edu/LDP/HOWTO/mini/Remote-X-Apps>.


  55..  UUttiilliissaattiioonn ddeess rrppeerrttooiirreess



  55..11..  RRppeerrttooiirreess :: nnoottiioonnss pprrlliimmiinnaaiirreess


  Nous avons dj vu les diffrences entre les fichiers sous DOSWin et
  Linux. Pour ce qui est des rpertoires, sous DOSWin, le rpertoire
  racine est \, sous Linux c'est /. De mme, les rpertoires imbriqus
  sont spars par \ sous DOSWin, et par / sous Linux. Un exemple de
  chemin d'accs :



       DOS:     C:\ARTICLES\GEOLOGIE\MI_EOC.TEX
       Linux:   /home/guide/articles/geologie/mi_eocene.tex




  Comme d'habitude, .. est le rpertoire parent et . est le rpertoire
  courant. Rappelez-vous que le systme ne vous autorisera pas  faire
  des cd, rd ou des md n'importe o  votre convenance. Chaque
  utilisateur place ses affaires dans son propre rpertoire appel
  rpertoire d'accueil (_h_o_m_e _d_i_r_e_c_t_o_r_y), attribu par l'administrateur
  systme ; par exemple mon rpertoire d'accueil est /home/guido.


  55..22..  DDrrooiittss dd''aaccccss aauuxx rrppeerrttooiirreess


  Les rpertoires ont galement des droits d'accs. Ce que nous avons vu
  dans la section ``Droits d'accs et proprit'' (propritaire, groupe
  et autres), s'applique galement aux rpertoires.  Pour un rpertoire,
  rx signifie que vous pouvez vous rendre dans ce rpertoire  l'aide de
  cd, et w que vous pouvez effacer un fichier de ce rpertoire, ou le
  rpertoire lui-mme.

  Par exemple, pour empcher d'autres utilisateurs de venir fouiner dans
  /home/guido/text :



       $ chmod o-rwx /home/guido/text









  55..33..  RRppeerrttooiirreess:: ttrraadduuccttiioonn ddee ccoommmmaannddeess




       DIR:            ls, find, du
       CD:             cd, pwd
       MD:             mkdir
       RD:             rmdir
       DELTREE:        rm -rf
       MOVE:           mv





  55..33..11..  EExxeemmpplleess




       DOS                                     Linux
       ---------------------------------------------------------------------

       C:\GUIDO>DIR                            $ ls
       C:\GUIDO>DIR  FIC.TXT                   $ ls fic.txt
       C:\GUIDO>DIR *.H *.C                    $ ls *.h *.c
       C:\GUIDO>DIR/P                          $ ls | more
       C:\GUIDO>DIR/A                          $ ls -l
       C:\GUIDO>DIR *.TMP /S                   $ find / -name "*.tmp"
       C:\GUIDO>CD                             $ pwd
               inapplicable, cf. notes         $ cd
               idem                            $ cd
               idem                            $ cd  /temp
       C:\GUIDO>CD \AUTRES                     $ cd /autres
       C:\GUIDO>CD ..\TEMP\CORBEIL             $ cd ../temp/corbeille
       C:\GUIDO>MD PROGSNVX                    $ mkdir progsnvx
       C:\GUIDO>MOVE PROG ..                   $ mv prog ..
       C:\GUIDO>MD \PROGS\TURBO                $ mkdir /progs/turbo
       C:\GUIDO>DELTREE TEMP\CORBEIL           $ rm -rf temp/corbeille
       C:\GUIDO>RD PROGSNVX                    $ rmdir progsnvx
       C:\GUIDO>RD \PROGS\TURBO                $ rmdir /progs/turbo




  Notes :


    L'utilisation de rmdir ne peut se faire que sur des rpertoires
     vides. Pour effacer un rpertoire et tout son contenu, utilisez rm
     -rf ( vos risques et prils).

    Le caractre ~ est un raccourci pour le nom de votre rpertoire
     d'accueil. Les commandes cd ou cd vous emmneront dans votre
     rpertoire d'accueil, quel que soit l'endroit o vous tes ; la
     commande cd  /tmp/ vous emmnera dans
     /home/votre_rep_d_accueil/tmp.

    cd - dfait le dernier cd.






  66..  DDiissqquueetttteess,, ddiissqquueess dduurrss eett ccoonnssoorrttss


  Il existe deux manires de grer les priphriques sous Linux :  la
  manire du DOS, ou  celle d'UNIX. Faites votre choix.


  66..11..  GGeessttiioonn ddeess pprriipphhrriiqquueess  llaa DDOOSS


  La plupart des distributions Linux sont accompagnes de la suite
  Mtools, un ensemble de commandes parfaitement quivalentes  leurs
  correspondants DOS, mais commenant par un m : mformat, mdir, mdel,
  mmd, etc. Ils sont mme capables de conserver les noms de fichiers
  longs, mais pas les droits d'accs aux fichiers. En configurant
  Mtools, par l'dition d'un fichier appel /etc/mtools.conf (dont un
  exemple est fourni), vous pouvez galement accder  la partition
  DOS/Windows, aux lecteurs de CD--ROM et de Zip. Toutefois, pour
  formater une disquette, la commande format ne fait pas l'affaire. Il
  vous faudra pralablement excuter, en tant que root, la commande :
  fdformat /dev/fd0H1440

  Note : il ne vous est pas possible d'accder aux fichiers d'une
  disquette avec une commande de type less a:fic.txt! C'est
  l'inconvnient d'accder aux disques  la manire du DOS.


  66..22..  GGeessttiioonn ddeess pprriipphhrriiqquueess   llaa UUNNIIXX


  UNIX aborde la gestion des priphriques d'une manire totalement
  diffrente. Il n'existe pas de volumes comme A: ou C: ; un disque, que
  ce soit une disquette ou n'importe quoi d'autre, devient une partie du
  systme de fichiers local par une opration que l'on appelle le
  montage. Lorsque vous n'avez plus besoin du disque, avant de
  l'jecter il vous faut le dmonter.

  Le formatage physique d'un disque est une chose, y crer un systme de
  fichiers en est une autre. La commande DOS FORMAT A: fait les deux 
  la fois, mais Linux fournit des commandes spares. Pour formater une
  disquette, voyez ci-dessus ; pour y crer un systme de fichiers :



       # mkfs -t ext2 -c /dev/fd0H1440




  Vous pouvez utiliser dos, vfat (ce qui est conseill) ou d'autres
  formats  la place de ext2. Une fois le disque prpar, montez-le avec
  la commande :



       # mount -t ext2 /dev/fd0 /mnt




  en spcifiant le type adapt pour le systme de fichiers si vous
  n'utilisez pas ext2.  prsent, vous pouvez accder aux fichiers de la
  disquette  l'aide de /mnt au lieu de A: ou B:. Quelques exemples :



  DOS                                     Linux
  ---------------------------------------------------------------------

  C:\GUIDO>DIR A:                         $ ls /mnt
  C:\GUIDO>COPY A:*.*                     $ cp /mnt/* .
  C:\GUIDO>COPY *.ZIP A:                  $ cp *.zip /mnt
  C:\GUIDO>EDIT A:FIC.TXT                 $ jstar /mnt/fic.txt
  C:\GUIDO>A:                             $ cd /mnt
  A:> _                                   /mnt/$ _




  Lorsque vous avez termin, et avant d'jecter la disquette, vous _d_e_v_e_z
  la dmonter avec la commande :



       # umount /mnt




  Bien videmment, vous ne devez utiliser fdformat et mkfs qu'avec des
  disquettes non-formates, et non pas avec celles dj utilises. Si
  vous voulez utiliser le lecteur B:, faites rfrence  fd1H1440 et fd1
  au lieu de fd0H1440 et fd0 dans les exemples ci-dessus.

  Il va sans dire que ce qui s'applique aux disquettes s'applique
  galement  d'autres priphriques ; par exemple, vous pouvez avoir
  envie de monter un autre disque dur ou un lecteur de CD--ROM. Voici
  comment monter le CD--ROM :



       # mount -t iso9660 /dev/cdrom /mnt




  Ce qui prcde tait la manire officielle de monter les disques,
  mais il y a une astuce. Comme c'est assez pnible de passer root pour
  monter un disque ou un CD--ROM, chaque utilisateur peut tre autoris
   les monter de la faon suivante :

    sous root, faites ce qui suit :



       # mkdir /mnt/floppy ; mkdir /mnt/cdrom
       # chmod 777 /mnt/floppy /mnt/cd*
       # # assurez-vous que le peripherique correspondant au CD-ROM est correct
       # chmod 666 /dev/hdb ; chmod 666 /dev/fd*





    ajoutez les lignes suivantes  /etc/fstab :



       /dev/cdrom      /mnt/cdrom  iso9660 ro,user,noauto          0       0
       /dev/fd0        /mnt/floppy vfat    user,noauto             0       0


   prsent, pour monter un disquette DOS et un CD--ROM vous pouvez
  faire :



       $ mount /mnt/floppy
       $ mount /mnt/cdrom






  /mnt/floppy, et /mnt/cdrom sont  prsent accessibles  tous les
  utilisateurs. Souvenez-vous que d'autoriser tout le monde  monter des
  disques de cette manire est un trou de scurit bant, si cela vous
  proccupe.

  Deux commandes utiles sont df, qui donne des informations sur les
  systmes de fichiers monts, et du nomderepertoire qui renseigne sur
  l'espace disque utilis par le rpertoire.


  66..33..  LLeess ssaauuvveeggaarrddeess


  Il existe plusieurs paquetages pour vous aider, mais le moins que vous
  puissiez faire pour obtenir une sauvegarde sur plusieurs volumes est
  (sous root) :



       # tar -M -cvf /dev/fd0H1440 rep_a_sauvegarder/




  Assurez-vous d'avoir une disquette formate dans le lecteur, et un
  paquet d'autres sous la main.  Pour restaurer vos affaires, insrez la
  premire disquette dans le lecteur et faites :



       # tar -M -xpvf /dev/fd0H1440






  77..  EEtt WWiinnddoowwss aalloorrss ??


  Le systme X Window est l'quivalent de Windows.  l'oppos de
  Windows ou du Mac, X11 n'a pas t conu pour tre facile
  d'utilisation ni esthtique, mais uniquement pour munir les stations
  de travail sous UNIX de capacits graphiques (-- NdT. : Et surtout de
  la possibilit de dporter l'affichage sur d'autres machines au
  travers du rseau--) . Voici les principales diffrences :


    Alors que Windows adopte le mme _l_o_o_k _a_n_d _f_e_e_l partout dans le
     monde, ce n'est pas la cas pour X11 qui est beaucoup plus
     configurable. Son apparence gnrale est dfinie par un composant-
     cl appel le gestionnaire de fentres (_w_i_n_d_o_w _m_a_n_a_g_e_r) dont il
     existe une large gamme : fvwm, lmentaire mais agrable et peu
     gourmand en mmoire, fvwm2-95, Afterstep, WindowMaker,
     Enlightenment  et beaucoup d'autres. Ce gestionnaire est
     habituellement invoqu dans un fichier nomm .xinitrc.

    Votre gestionnaire peut tre configur de manire  ce que les
     fentres agissent comme dans, hum, Windows : vous cliquez dessus
     pour les faire venir au premier plan. Une autre possibilit est de
     l'amener au premier plan lorsque la souris se dplace dessus (la
     fentre obtient le focus). De plus, le placement des fentres sur
     l'cran peut tre automatique ou interactif : si, au lieu de votre
     programme, il apparat un cadre trange, cliquez avec le bouton
     gauche  l'endroit o vous voulez le faire apparatre.

    la plupart des fonctionnalits peuvent tre personnalises en
     ditant un ou plusieurs fichiers de configuration. Lisez la
     documentation de votre gestionnaire de fentres ; ces fichiers de
     configuration peuvent tre .fvwmrc, .fvwm2rc95, .steprc, etc. Un
     fichier de configuration type se trouve gnralement dans :
     /etc/X11/window-manager-name/system.window-manager-name;

    Les applications X11 sont crites  l'aide de bibliothques
     spciales (les widget sets) ; comme il en existe plusieurs, les
     applications ont des apparences diffrentes. Les plus lmentaires
     sont celles utilisant les widgets Athena (apparence 2--D; xdvi,
     xman, xcalc) ; d'autres utilisent Motif (netscape), d'autres encore
     utilisent Tcl/Tk, XForms, Qt, Gtk et en veux-tu en voil. Presque
     toutes ces bibliothques fournissent en gros le mme look & feel
     que Windows.

    Malheureusement, le mode d'interaction peut se rvler incohrent.
     En l'espce, lorsque vous slectionnez une ligne de texte  la
     souris et tapez <BACKSPACE>, vous vous attendez  ce que la ligne
     disparaisse, pas vrai ? Cela ne fonctionne pas avec les applis
     bases sur Athena, mais avec celles utilisant d'autres
     bibliothques de widgets.

    Le mode de fonctionnement des ascenseurs (_s_c_r_o_l_l_b_a_r_s) et le
     redimensionnement dpendent du gestionnaire de fentres et du
     widget set. Astuce : si les ascenseurs ne se comportent pas  votre
     got, essayez d'utiliser le bouton du milieu, ou les deux boutons
     en mme temps pour les dplacer.

    Les applications n'ont pas d'icne par dfaut, mais elles peuvent
     en avoir un certain nombre. La plupart des gestionnaires de
     fentres proposent un menu que l'on appelle en cliquant sur le fond
     de l'cran (_r_o_o_t _w_i_n_d_o_w) ; il va sans dire que ce menu peut tre
     personnalis. Pour changer l'apparence du fond de l'cran, utilisez
     xsetroot ou xloadimage.

    Le presse-papiers ne peut contenir que du texte, et se comporte
     trangement. Une fois un texte slectionn, il est dj copi dans
     le presse-papiers : dplacez vous ailleurs et cliquez sur le bouton
     du milieu pour le coller. Il existe une application xclipboard
     fournissant de multiples tampons pour le presse-papiers.

    Le glisser-dplacer est une option, et n'est disponible qu'avec les
     applications et/ou les gestionnaires de fentres qui l'intgrent.

  Pour conomiser la mmoire, il est prfrable d'utiliser des
  applications utilisant les mmes bibliothques, mais cela peut se
  rvler difficile  appliquer.

  Il existe des projets visant  doter X11 d'une apparence et d'un
  comportement aussi cohrents que Windows. Gnome,
  <http://www.gnome.org> et KDE,  <http://www.kde.org>, sont patants.
  Donnez-leur une chance : vous ne regretterez plus votre bureau
  Windows.


  88..  PPeerrssoonnnnaalliissaattiioonn dduu ssyyssttmmee



  88..11..  FFiicchhiieerrss dd''iinniittiiaalliissaattiioonn dduu ssyyssttmmee


  Sous DOS, deux fichiers importants sont AUTOEXEC.BAT et CONFIG.SYS,
  utiliss lors du dmarrage pour initialiser le systme, positionner
  quelques variables d'environnement comme PATH et FILES, et, le cas
  chant lancer un programme ou un fichier de commandes. Sous Linux, il
  y a une flope de fichiers d'initialisation, qu'il vaut mieux ne pas
  bidouiller pour certains d'entre eux  moins de savoir exactement ce
  que vous faites. Je vous dirai quels sont les plus importants de toute
  faon :



       FICHIERS                                NOTES

       /etc/inittab                            pas touche pour le moment !
       /etc/rc.d/*                             idem




  Si vous vous contentez de positionner le PATH et d'autres variables
  d'environnement, ou dsirez changer les messages de login, ou
  souhaitez lancer automatiquement un programme aprs vous tre
  connect, considrez les fichiers suivants :



       FICHIERS                                NOTES

       /etc/issue                              positionne le message de pre-connexion
       /etc/motd                               positionne le message de post-connexion
       /etc/profile                            positionne $PATH, d'autres variables etc.
       /etc/bashrc                             positionne alias et fonctions etc.
       /home/votre_home/.bashrc                positionne vos alias et fonctions
       /home/votre_home/.bash_profile   ou
       /home/votre_home/.profile               definit l'environnemement et lance vos programmes




  Si ce dernier fichier existe (remarquez que c'est un fichier cach),
  il sera lu aprs que vous vous soyez connect et les commandes qu'il
  contient seront excutes.

  Un exemple -- examinez ce fichier .bash_profile:












  ______________________________________________________________________
  # Je suis un commentaire
  echo Environnement:
  printenv | less   # equivalent de la commande SET sous DOS
  alias d='ls -l'   # pour comprendre facilement ce qu'est un alias
  alias up='cd ..'
  echo "Je vous rappelle que le chemin est "$PATH
  echo "Aujourd'hui nous sommes le `date`"  # utilise la sortie de la commande 'date'
  echo "Bonjour, "$LOGNAME
  # Ce qui suit est une "fonction" shell
  ctgz() # Affiche le contenu d'une archive .tar.gz.
  {
    for file in $*
    do
      gzip -dc ${file} | tar tf -
    done
  }
  # fin du .profile
  ______________________________________________________________________



  $PATH et $LOGNAME, vous l'aurez devin, sont des variables
  d'environnement. Il s'en trouve beaucoup d'autres avec lesquels on
  peut s'amuser ; LPM pour des applis comme less ou bash par exemple.

  Ajouter la ligne suivante  votre /etc/profile vous fournira
  approximativement un quivalent de PROMPT $P$G :



       export PS1="\w\\$ "





  88..22..  FFiicchhiieerrss dd''iinniittiiaalliissaattiioonn ddee pprrooggrraammmmeess


  Sous Linux, tout peut potentiellement tre personnalis pour convenir
   vos besoins. La plupart des programmes ont un ou plusieurs fichiers
  d'initialisation que vous pouvez triturer, souvent appels
  .nomdeprogrammerc et situs dans votre rpertoire d'accueil. Les
  premiers que vous aurez envie de modifier sont :


     .inputrc : utilis par bash pour dfinir les touches du clavier ;

     .xinitrc : utilis par  startx pour initaliser le systme X Window
     ;

     .fvwmrc : utilis par le gestionnaire de fentres fvwm ;

     .joerc, .jstarrc : utilis par l'diteur joe ;

     .jedrc : utilis par l'diteur jed ;

     .pinerc : utilis par l'outil de traitement de courrier
     lectronique pine ;

     .Xdefault : utilis par de nombreux programmes X Window.

  Pour tous ceux-ci et d'autres que vous rencontrerez tt ou tard, LPM.
  Au cas o, je vous signale l'existence du _C_o_n_f_i_g_u_r_a_t_i_o_n _H_O_W_T_O
  disponible  l'adresse   <http://sunsite.unc.edu/mdw/HOWTO/Config-
  HOWTO.html> .


  99..  LLee rrsseeaauu :: ccoonncceeppttss


  Non seulement la connexion au rseau par modem est disponible sous
  Linux, mais elle est galement plus stable et plus rapide. Ce dont il
  s'agit, c'est PPP, le protocole employ pour se connecter 
  l'Internet  l'aide de modems. Vous avez besoin d'un noyau intgrant
  le support PPP et d'un outil pour composer les numros et tablir la
  connexion.

  Pour rcuprer votre courrier chez votre fournisseur d'accs Internet
  (_F_A_I), vous aurez besoin d'un outil appel rcuprateur de mail
  utilisant le protocole POP ; lorsque le courrier est rcupr, tout se
  passera comme s'il avait t livr directement sur votre babasse
  Linux. Vous utiliserez ensuite un MUA (_M_a_i_l _U_s_e_r _A_g_e_n_t ou agent
  utilisateur de courrier) comme pine, mutt, elm ou l'un des nombreux
  autres pour grer votre courrier.

  Alors que sous Windows, le programme de composition de numros est
  invoqu automatiquement au lancement d'une application Internet, sous
  Linux, on procde dans l'autre sens : on compose d'abord le numro,
  puis on lance l'application. Un truc du nom de diald fournit le
  comportement habituel. L'installation et la configuration d'un rseau
  avec connexion par modem tait habituellement l'une des choses les
  plus difficiles  faire sous Linux, mais ce n'est plus le cas :
  veuillez vous reporter au Configuration HOWTO.

  Enfin, un mot du Voisinage rseau : il vous est possible de faire
  croire aux machines Windows du rseau local que votre station Linux
  est un serveur Windows NT/9x. La formule magique est Samba : il ne
  s'agit pas de la danse brsilienne endiable, mais d'une
  implmentation du protocole SMB pour Linux. Rendez-vous 
  <http://samba.anu.edu.au/samba>.


  1100..  UUnn ppeeuu ddee pprrooggrraammmmaattiioonn



  1100..11..  LLeess sshheellll--ssccrriippttss  :: ddeess ffiicchhiieerrss ..BBAATT ddooppss aauuxx aannaabboolliissaannttss


  Si vous utilisiez des fichiers .BAT pour crer des raccourcis pour de
  longues lignes de commandes (moi-mme j'en ai fait pas mal), vous
  pouvez atteindre ce but en insrant des lignes d'_a_l_i_a_s appropris (cf.
  l'exemple ci-dessus) dans le profile ou le .bash_profile. Mais si vos
  .BAT taient plus compliqus, alors vous adorerez le langage de _s_c_r_i_p_t
  que vous offre le _s_h_e_l_l : il est aussi puissant que ce bon vieux
  QBasic, si ce n'est plus. Il possde des variables, des structures
  comme while, for, case, if... then... else et des tas d'autres
  fonctionnalits : il peut tre une bonne alternative  un vrai
  langage de programmation.

  Pour crire un script -- l'quivalent d'un fichier .BAT sous DOS --
  tout ce que vous avez  faire c'est d'crire un fichier ASCII
  contenant les instructions, de le sauver, et de le rendre excutable 
  l'aide de la commande chmod +x <fichierscript>. Pour l'excuter, tapez
  son nom.

  Un mot d'avertissement. L'diteur du systme s'appelle vi, et, d'aprs
  mon exprience, la plupart des nouveaux utilisateurs le trouvent trs
  ardu. Je ne m'tendrai pas sur son utilisation, veuillez consulter le
  livre de Matt Welsh ou faire une recherche sur le Net. Je me
  contenterai de dire que :


    pour insrer du texte, tapez i puis votre texte ;

    pour effacer des caractres; tapez <ESC> puis x ;

    pour quitter vi sans enregistrer, tapez <ESC> puis :q! ;

    pour enregistrer et quitter, tapez <ESC> puis  :wq.

     Un bon diteur pour dbutants est joe : en le lanant avec la
     commande jstar, vous obtiendrez les mmes raccourcis-clavier que
     ceux de l'diteur de DOSWin. jed en mode WordStar ou IDE est mme
     mieux. Veuillez consulter la section ``O trouver les
     applications'' pour savoir o obtenir ces diteurs.

  L'criture de scripts sous bash est un sujet tellement vaste qu'il
  ncessite un livre en lui-mme, et je ne creuserai pas le sujet plus
  avant. Je me contenterai de vous donner un exemple de shell-script
  duquel vous pourrez extraire quelques rgles de base :


  ______________________________________________________________________
  #!/bin/sh
  # exemple.sh
  # Je suis un commentaire.
  # Ne changez pas la premiere ligne, elle doit se trouver a cet endroit.
  echo "Ce systeme est : `uname -a`" # utilise la sortie de la commande
  echo "Mon nom est $0" # variables predefinies
  echo "Vous m'avez transmis les $# parametres suivants : "$*
  echo "Le premier parametre est : "$1
  echo -n "Quel est votre nom ? " ; read votre_nom
  echo notez la difference : "salut $votre_nom" # citation avec "
  echo notez la difference : 'salut $votre_nom' # citation avec '
  REPS=0 ; FICS=0
  for fic in `ls .` ; do
    if [ -d ${fic} ] ; then # si fic est un repertoire
      REPS=`expr $REPS + 1`  # REPS = REPS + 1
    elif [ -f ${fic} ] ; then
      FICS=`expr $FICS + 1`
    fi
    case ${fic} in
      *.gif|*jpg) echo "${fic}: image" ;;
      *.txt|*.tex) echo "${fic}: fichier texte" ;;
      *.c|*.f|*.for) echo "${fic}: fichier source" ;;
      *) echo "${fic}: fichier generique" ;;
    esac
  done
  echo "il y a ${REPS} repertoires et ${FICS} fichiers"
  ls | grep "ZxY--!!!WKW"
  if [ $? != 0 ] ; then # code de retour de la derniere commande
    echo "ZxY--!!!WKW introuvable"
  fi
  echo "ca suffit... tapez 'man bash' pour en savoir plus."
  ______________________________________________________________________





  1100..22..  EE--CC--iieezz ppaarr vvoouuss--mmmmee




  Sous UNIX, le langage du systme est le C, que vous l'aimiez ou non.
  Des douzaines d'autres langages (Java, FORTRAN, Pascal, Lisp, Basic,
  Perl, awk...) sont galement disponibles.

  En partant du principe que vous connaissez le C, voici quelques lignes
  directrices pour ceux d'entre vous qui ont t trop gts par le Turbo
  C++ ou l'un de ses cousins sous DOS. Le compilateur C de Linux
  s'appelle gcc et n'est pourvu d'aucun des gadgets qui accompagnent en
  gnral ses quivalents DOS : pas de IDE (_I_n_t_e_g_r_a_t_e_d _D_e_v_e_l_o_p_m_e_n_t
  _E_n_v_i_r_o_n_m_e_n_t ou environnement de dveloppement intgr), ni d'aide en
  ligne ou de dbogueur intgr etc. Il s'agit juste d'un compilateur en
  ligne de commande brut de dcoffrage, trs puissant et efficace. Pour
  compiler votre hello.c de base, vous ferez :



       $ gcc hello.c




  ce qui crera un fichier excutable appel a.out. Pour donner un nom
  diffrent  l'excutable, faites :



       $ gcc -o hola hello.c




  Pour intgrer une bibliothque lors de l'dition de liens, ajoutez
  l'option -l<nomdebibli>. Par exemple, pour intgrer la bibliothque
  mathmatique :



       $ gcc -o progmath progmath.c -lm




  (L'option -l<nomdebibli> oblige gcc  intgrer la bibliothque
  /usr/lib/lib<nomdebibli>.so; ainsi, -lm intgre /usr/lib/libm.so).

  Jusque-l, tout va bien. Mais lorsque votre programme se compose de
  plusieurs fichiers source, vous aurez besoin de l'utilitaire make.
  Supposons que vous ayez crit un analyseur d'expresssions : son
  fichier source s'appelle parser.c et il inclut (par #include) deux
  fichiers d'en-tte, parser.h et xy.h. Ensuite, vous souhaitez utiliser
  les routines de parser.c dans un programme, disons calc.c, qui  son
  tour inclut parser.h. Quel bazar ! Que faut-il faire pour compiler
  calc.c ?

  Vous devrez crire un Makefile, c'est ainsi qu'on l'appelle, qui
  apprenne au compilateur quelles sont les dpendances entre fichiers
  source et fichiers objet. Dans notre exemple :









  ______________________________________________________________________
  # Voici Makefile, utilise pour compiler calc.c
  # Appuyez sur <TAB> aux endroits indiques !

  calc: calc.o parser.o
  <TAB>gcc -o calc calc.o parser.o -lm
  # calc depend de deux fichiers objet : calc.o et parser.o

  calc.o: calc.c parser.h
  <TAB>gcc -c calc.c
  # calc.o depend de deux fichiers source

  parser.o:  parser.c parser.h xy.h
  <TAB>gcc -c parser.c
  # parser.o depend de trois fichiers source

  # fin du Makefile.
  ______________________________________________________________________



  Enregistrez ce fichier sous le nom Makefile et faites make pour
  compiler votre programme ; une alternative est de l'enregistrer sous
  calc.mak et de taper make -f calc.mak, et, bien sr, LPM. Vous pouvez
  accder  quelques aides sur les fonctions C, qui se trouvent dans les
  pages du man,  la section 3, par exemple,



       $ man 3 printf




  Pour dboguer vos programmes, utilisez gdb. Faites info gdb pour
  apprendre  vous en servir.

  De nombreuses bibliothques sont disponibles ; les premires d'entre
  elles qui vous seront utiles sont ncurses (effets en mode texte), et
  svgalib (graphismes en mode console). Si vous vous sentez assez
  enhardi pour aborder la programmation X11 (ce n'est pas si difficile
  que cela), il existe des bibliothques qui transforment l'criture de
  programmes X11 en une promenade de sant. Regardez donc du ct de
  <http://www.xnet.com/ blatura/linapp6.html> en n'oubliant pas que Gtk
  devient un standard Linux.

  Beaucoup d'diteurs peuvent faire office d'IDE ; emacs et jed, par
  exemple, sont capables de mettre en vidence la syntaxe, faire de
  l'indentation automatique etc. Autrement, rapatriez le paquetage rhide
   partir de <ftp://sunsite.unc.edu:/pub/Linux/devel/debuggers/>.
  C'est un clone de l'IDE de Borland, et vous devriez l'apprcier.


  1111..  LLee 11%% rreessttaanntt


  En fait, il reste beaucoup plus que 1%...



  1111..11..  UUttiilliissaattiioonn ddee ttaarr eett ggzziipp


  Sous UNIX, il y a quelques applications trs rpandues pour
  l'archivage et la compression de fichiers. tar sert  fabriquer des
  archives -- comme PKZIP ou Winzip mais il ne fait qu'archiver, sans
  compression. Pour fabriquer une nouvelle archive :



       $ tar -cvf <nom_d_archive.tar> <fic> [fic...]




  Pour extraire des fichiers d'une archive :



       $ tar -xpvf <nom_d_archive.tar> [fic...]




  Pour examiner le contenu d'une archive :



       $ tar -tf <nom_d_archive.tar> | less




  Vous pouvez compresser les fichiers  l'aide de compress, mais il est
  obsolte et ne devrait plus tre utilis, ou gzip :



       $ compress <fic>
       $ gzip <fic>




  qui crent un fichier compress portant l'extension .Z (compress) ou
  .gz (gzip). Ces programmes ne peuvent compresser qu'un fichier  la
  fois. Pour dcompresser :



       $ compress -d <fic.Z>
       $ gzip -d <fic.gz>




  LPM.

  Il existe galement les utilitaires unarj, zip et unzip (compatibles
  avec PK??ZIP). Les fichiers portant l'extension .tar.gz ou .tgz
  (archivs avec tar, puis compresss avec gzip) sont aussi communs dans
  le mode UNIX que les fichiers .ZIP sous DOS. Voici comment examiner le
  contenu d'une archive au format .tar.gz :



       $ tar -ztf <fic.tar.gz> | less





  1111..22..  IInnssttaallllaattiioonn dd''aapppplliiccaattiioonnss


  Tout d'abord : l'installation de paquetages est le travail de root. La
  plupart des applications Linux sont distribues sous forme d'archives
  .tar.gz qui contiennent typiquement un rpertoire portant un nom
  appropri o se trouvent tous les fichiers et/ou sous-rpertoires. Un
  bonne habitude est d'installer ces paquetages  partir de /usr/local 
  l'aide de la commande :



       # tar -zxf <archive.tar.gz>




  puis de lire les fichiers README ou INSTALL. La plupart du temps,
  l'application est distribue sous forme de code source, que vous
  devrez compiler pour crer les binaires ; en gnral, en vous
  contentant de taper make puis make install. Si l'archive contient un
  script configure lancez celui-ci d'abord. Bien videmment, vous devez
  avoir les compilateurs gcc ou g++.

  D'autres archives doivent tre dballes  partir de / ; c'est
  notamment le cas pour les archives .tgz de Slackware. D'autres
  archives contiennent des fichiers mais pas de sous-rpertoires --
  attention  ne pas mettre le souk ! Il faut toujours examiner le
  contenu d'une archive avant de l'installer.

  Debian et Red Hat ont leurs propres formats d'archives, respectivement
  .deb et .rpm. Ce dernier bnficie d'une reconnaissance de plus en
  plus large ; pour installer un paquetage rpm, tapez :



       # rpm -i paquetage.rpm






  1111..33..  AAssttuucceess iinnddiissppeennssaabblleess


  LLee ddffiilleemmeenntt eenn aarrrriirree : l'appui sur <SHIFT + PAG UP> (la touche
  grise) vous permet de remonter en arrire de quelques pages, en
  fonction de la quantit de mmoire vido dont vous disposez.


  LLee nneettttooyyaaggee ddee ll''ccrraann : s'il vous arrive de faire more ou cat sur un
  fichier binaire, votre cran peut se retrouver rempli de caractres
  bizarres. Pour y remedier, tapez reset mme si vous n'y voyez plus
  rien, ou entrez cete squence de caractres : echo CTRL-V ESC c
  RETURN.

  LLee ccoollllaaggee ddee tteexxttee : dans la console, voyez plus loin ; sous X,
  cliquez et dplacez la souris en maintenant le bouton enfonc pour
  slectionner le texte dans une fentre xterm, puis cliquez avec le
  bouton central (ou les deux boutons  la fois si vous avez une souris
   deux boutons) pour coller. Il existe galement un xclipboard (--
  NdT. : Presse-papiers sous X.--) (qui ne marche qu'avec du texte,
  hlas) ; ne vous laissez pas perturber par son trs long temps de
  rponse.

  LL''uuttiilliissaattiioonn ddee llaa ssoouurriiss : si vous avez install gpm, un pilote de
  souris pour la console, alors vous pouvez cliquer et dplacer la
  souris sans relcher le bouton pour slectionner du texte, puis
  cliquer avec le bouton droit pour coller le texte slectionn. Cela
  marche d'une console virtuelle  l'autre.

  MMeessssaaggeess mmiiss ppaarr llee nnooyyaauu : examinez /var/adm/messages, ou
  /var/log/messages en tant root pour savoir ce que le noyau a  vous
  dire, y compris les messages de dmarrage. La commande dmesg est
  galement bien pratique.


  1111..44..  OO ttrroouuvveerr lleess aapppplliiccaattiioonnss


  Si vous vous demandez si vous pouvez ou non remplacer votre bonne
  vieille application DOS/Win par un quivalent Linux, je vous propose
  de parcourir les principaux entrepts de logiciels pour Linux :
  <ftp://sunsite.unc.edu/pub/Linux>,  <ftp://tsx-11.mit.edu/pub/linux>,
  et  <ftp://ftp.funet.fi/pub/Linux>.  D'autres endroits idaux pour
  commencer sont la Linux Applications and Utilities Page situe 
  <http://www.xnet.com/ blatura/linapps.shtml>, et la page officielle
  de Linux   <http://www.linux.org>.


  1111..55..  QQuueellqquueess ttrruuccss iimmppoossssiibblleess ssoouuss DDOOSS


  Linux peut faire tout un tas de choses qui taient pnibles,
  difficiles ou impossibles sous DOS/Win. Voici une petite liste qui
  devrait vous ouvrir l'apptit :


    at vous permet de lancer des programmes  des heures spcifiques ;

    awk est un langages simple mais nanmoins puissant pour manipuler
     des fichiers de donnes (mais pas seulement). Par exemple, si
     data.dat est votre fichier contenant des donnes sur plusieurs
     champs,



       $ awk '$2   "abc" {print $1, "\t", $4}' data.dat





  affiche tous les premiers et quatrimes champs de chaque ligne de
  data.dat dont le second champ contient abc.

    cron est utile pour effectuer des tches de manire priodique, 
     des dates et des heures spcifiques. Tapez man 5 crontab.

    file <nomdefichier> vous indique le type de nomdefichier (texte
     ASCII, excutable, archive, etc.) ;

    find (cf. galement la section ``Rpertoires : traduction de
     commandes'') est l'une des commandes les plus puissantes et les
     plus utiles. On l'utilise pour trouver des fichiers rpondant 
     certaines caractristiques, et pour effectuer des actions sur ceux-
     ci. L'utilisation de base de find est :




  $ find <repertoire> <expression>





  o  <expression> inclut les critres de recherche et les actions.
  Exemples :



       $ find . -type l -exec ls -l {} \;





  trouve tous les fichiers qui sont des liens symboliques et montrent ce
  sur quoi ils pointent ;



       $ find / -name "*.old" -ok rm {} \;





  trouve tous les fichiers correspondant au motif donn et les efface,
  aprs vous avoir demand confirmation ;



       $ find . -perm +111





  trouve tous les fichiers dont les droits d'accs sont 111 (excuta
  bles) ;



       $ find . -user root





  trouve tous les fichiers appartenant  root. Il y a plein d'autres
  possibilits -- LPM ;


    grep trouve des motifs de caractres dans des fichiers. Par
     exemple,



       $ grep -l "geologie" *.tex





  affiche tous les fichiers *.tex contenant le mot geologie. La
  variante zgrep marche avec les fichiers gzipps. LPM ;

    LLeess eexxpprreessssiioonnss rrgguulliirreess constituent un mcanisme complexe mais
     fichtrement puissant pour effectuer des oprations de recherche
     dans un texte. Par exemple, ^a[^a-m]X{4,}txt$ correspond aux lignes
     commenant par un a, suivi d'un autre caractre ne se trouvant
     pas dans l'intervalle a-m, suivi de de 4 ou plus X et finissant
     en txt. Les expressions rgulires sont utilises avec des
     diteurs avancs, less, et de nombreuses autres applications. man
     grep pour avoir une introduction ;

    script <fichier_script> envoie le contenu de l'cran dans le
     fichier fichier_script jusqu' ce que vous lanciez la commande
     exit. Utile pour le dbogage ;

    sudo autorise les utilisateurs  effectuer certaines tches de root
     (par ex. : le formatage et le montage des disques.  LPM) ;

    uname -a vous renvoie de l'info sur votre systme ;

    zcat et zless sont utiles pour parcourir et rediriger des fichiers
     gzipps sans les dcompresser. Par exemple :



       $ zless fictexte.gz
       $ zcat fictexte.gz | lpr





    les commandes suivantes tombent souvent  pic : bc, cal, chsh, cmp,
     cut, fmt, head, hexdump, nl, passwd, printf, sort, split, strings,
     tac, tail, tee, touch, uniq, w, wall, wc, whereis, write, xargs,
     znew. LPM.


  1111..66..  EEnnttrraanneemmeenntt  UUnniixx ssoouuss DDOOSS//WWiinnddoowwss


  Le croirez-vous ? Il existe de chouettes outils fournissant un
  environnement de type UNIX sous DOS/Windows. L'un d'entre eux est la
  suite Djgpp ( <http://www.delorie.com/djgpp>) pour DOS, alors que
  Cygnus  ( <http://www.cygnus.com>) est un portage plus complexe pour
  Win32. Les deux comprennent les mmes outils de dveloppement et
  utilitaires GNU que sous Linux ; vous n'aurez cependant ni la mme
  stabilit ni les mmes performances.

  Si vous voulez avoir un avant-got de Linux, essayez Djgpp.
  Tlchargez et installez les fichiers suivants (au moment de la
  rdaction de ce document, la version la plus rcente est la 2.02) :
  djdev202.zip, bnu281b.zip, bsh1147b.zip, fil316b.zip, find41b.zip,
  grep22b.zip, gwk303b.zip, lss332b.zip, shl112b.zip.. Les instructions
  pour l'installation sont fournies, et vous obtiendrez de l'aide sur
  <news:comp.os.msdos.djgpp>.

  En particulier, l'utilisation de bash sous DOSWin constitue une
  bouffe d'air frais. Pour le configurer correctement, ditez le
  fichier BOOT.BAT fourni pour l'adapter  votre configuration, mettez
  ensuite ces fichiers dans votre rpertoire d'accueil (dans la
  partition Windows) en remplacement de ceux qui sont fournis :




  # voici le  _bashrc

  LS_OPTIONS="-F -s --color=yes"
  alias cp='cp -i'
  alias d='ls -l'
  alias l=less
  alias ls="ls $LS_OPTIONS"
  alias mv='mv -i'
  alias rm='rm -i'
  alias u='cd ..'






       # voici le  _bprof
       if [ -f  /_bashrc ]; then
         .  /_bashrc
       fi
       PS1='\w\$ '
       PS2='> '
       CDPATH="$CDPATH: "
       # trucs pour less(1)
       LESS="-M-Q"                     # invite longue, silencieuse
       LESSEDIT="%E ?lt+%lt. %f"       # edition de la ligne superieure
       VISUAL="jed"                    # editeur
       LESSCHARSET=latin1              # visualisation des lettre accentuees
       export PS1 PS2 CDPATH LS_OPTIONS LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET





  1111..77..  LLeess eexxtteennssiioonnss ccoouurraanntteess eett lleess pprrooggrraammmmeess ccoorrrreessppoonnddaannttss


  Vous pouvez rencontrer d'innombrables extensions aux noms de fichiers.
  En excluant les plus exotiques (en l'occurrence les polices etc.),
  voici une liste de qui est qui :


    1 ... 8 : les pages du manuel (man). Lisez-les avec groff -Tascii
     -man <file.1>.

    arj : archive fabrique avec arj.

    dvi : fichier de sortie produit par TeX (cf. ci-dessous). xdvi
     permet de le visualiser et dvips le transforme en fichier
     Postscript .ps.

    gz : archive fabrique avec gzip.

    info : fichier info (espce d'alternative aux pages man). Rcuprez
     info.

    lsm : fichier Linux Software Map. Il s'agit d'un fichier ASCII
     ordinaire contenant la description d'un paquetage.

    ps : fichier PostScript. Pour le visualiser, ruprez gs et,
     optionnellement ghostview ou gv.

    rpm : paquetage Red Hat. Il est possible de l'installer sur
     n'importe quel systme  l'aide du gestionnaire de paquetages rpm.


    taz, tar.Z : archive fabrique avec tar et compresse avec
     compress.

    tgz, tar.gz : archive fabrique avec tar et compresse avec gzip.

    tex : fichier texte  fournir en entre  TeX, un puissant systme
     de composition de documents. Rcuprez le paquetage tex disponible
     pour de nombreuses distributions.

    texi : fichier texinfo, peut produire aussi bien des fichiers TeX
     et des fichiers info (cf. info). Rcuprez texinfo.

    xbm, xpm, xwd : fichiers graphiques.

    Z : archive fabrique avec compress.



  1111..88..  CCoonnvveerrssiioonn ddee ffiicchhiieerrss


  Si vous devez changer des fichiers entre DOS/Windows et Linux,
  mfiez-vous du problme des sauts de ligne. Sous DOS, chaque ligne
  se termine par CR/LF (plus prcisment, ASCII 13 + ASCII 10), alors
  que Linux se contente de LF. Si vous essayez d'diter un fichier DOS
  sous Linux, il est probable que chaque ligne se termine par un trange
  caractre M ; un texte Linux apparatra sous DOS comme une ligne
  unique extrmement longue et aucun paragraphe ne sera prsent. Il
  existe quelques outils, dos2unix et unix2dos, pour convertir les
  fichiers.

  Si vos fichiers texte contiennent des caractres accentus, assurez-
  vous qu'ils ont t saisis sous Windows (avec Notepad) et non sous DOS
  ; sinon tous les caractres accentus seront joyeusement mlangs.



  Pour convertir des fichiers Word ou WordPerfect vers des fichiers
  texte pur, le sujet est un peu plus dlicat mais c'est possible. Vous
  aurez besoin de l'un des outils qui se trouvent sur les sites CTAN ;
  l'un d'entre eux tant  <ftp://ftp.tex.ac.uk>. Rcuprez le paquetage
  word2x du rpertoire /pub/tex/tools/, ou essayez l'un des paquetages
  disponibles dans le rpertoire /pub/tex/support/. En particulier,
  word2x convertit les fichiers Word 6, alors que pour Word 7, vous
  aurez besoin de mswordview ( <http://www.csn.ul.ie/
  caolan/docs/MSWordView.html>)  qui les transforme en HTML.


  1111..99..  SSuuiitteess bbuurreeaauuttiiqquueess ggrraattuuiitteess


  Si la conversion de fichiers ne suffit pas, vous avez le choix de vous
  faire les dents sur un paquetage (gratuit !) du type Microsoft Office.

  La suite StarOffice est gratuite pour une utilisation personnelle.
  Elle est volumineuse, un peu lente, mais trs bonne quoi qu'il en soit
  : elle offre de nombreuses fonctionnalits absentes de Microsoft
  Office. Elle est galement capable de lire et d'crire des fichiers
  Word et Excel, bien que la conversion ne soit pas toujours parfaite.
  Page Web :  <http://www.stardivision.com>.

  Un autre paquetage de bonne qualit est Corel WordPerfect, dont une
  dition gratuite est disponible en tlchargement. Dois-je en dire
  plus ? Allez la rcuprer sur :  <http://www.corel.com>.


  1122..  LLaa ffiinn,, dduu mmooiinnss ppoouurr ll''iinnssttaanntt


  Flicitations !  prsent, vous avez quelques notions d'UNIX et tes
  prt pour commencer  travailler. Souvenez-vous que votre connaissance
  du systme est encore limite, et qu'il est prfrable d'avoir un peu
  plus de pratique de Linux pour l'utiliser confortablement. Mais si
  tout ce que vous aviez  faire tait de rcuprer un paquet
  d'applications pour commencer  travailler, ce que j'ai inclus dans ce
  document est suffisant.

  Je suis persuad qu'il vous plaira d'utiliser Linux et que vous
  continuerez votre apprentissage -- comme tout le monde. Je prends
  galement le pari que vous ne retournerez plus jamais sous DOSWin !
  J'espre avoir t comprhensible et avoir rendu service  mes 3 ou 4
  lecteurs.


  1122..11..  DDrrooiittss dd''aauutteeuurr


  Sauf mentionn explicitement, les documents Linux HOWTO sont la
  proprit de leurs auteurs respectifs. Les documents Linux HOWTO
  peuvent tre reproduits et distribus en totalit ou en partie, sur
  n'importe quel support physique ou lectronique,  condition que cette
  note concernant les droits d'auteur soit prsente sur toutes les
  copies. La redistribution commerciale est autorise et encourage ;
  cependant, l'auteur aimerait tre tenu inform de toute distribution
  de ce type.

  Toute traduction, tous travaux drivs ou toute compilation intgrant
  des documents Linux HOWTO doivent tre couverts par cette note
  concernant les droits d'auteur. En l'occurrence, vous n'avez pas le
  droit de produire un travail driv d'un HOWTO et d'imposer des
  restrictions supplmentaires  sa distribution. Des exceptions  ces
  rgles peuvent tre accordes sous certaines conditions ; veuillez
  contacter le coordinateur des Linux HOWTO  l'adresse indique ci-
  dessous.

  Bref, nous souhaitons promouvoir la dissmination de cette information
   travers le plus grand nombre possible de canaux. Nanmoins, nous
  voulons conserver les droits d'auteur des documents HOWTO, et
  aimerions tre tenus au courant de tout projet de redistribution des
  HOWTOs.

  Si vous avez des questions, veuillez contacter Tim Bynum, le
  coordinateur des Linux HOWTO, par courrier lectronique  l'adresse
  <linux-howto@sunsite.unc.edu> via email.



  1122..22..  RReessppoonnssaabbiilliittss


  Le From DOS/Windows to Linux HOWTO a t crit par Guido Gonzato,
  <REMOVE_MEguido@ibogfs.cineca.it>. Un grand merci  Matt Welsh,
  l'auteur de Linux Installation and Getting Started  Ian Jackson,
  l'auteur de Linux frequently asked questions with answers, 
  Guiseppe Zanetti, l'auteur de Linux  toutes les personnes qui m'ont
  envoy des suggestions par courrier lectronique, et des remerciements
  particuliers  Linux Thorvalds et GNU qui nous ont apport Linux.

  Ce document est fourni en l'tat. Je me suis efforc de le rdiger
  avec toute l'exactitude possible, mais l'utilisation que vous faites
  de l'information qu'il contient est  vos risques et prils. Je ne
  pourrai en aucun cas tre tenu pour responsable de dommages rsultant
  de l'utilisation de ce travail.

  Tout retour est le bienvenu. N'hsitez pas  me contacter pour toute
  question, suggestion, critique incendiaire etc.

  Profitez de la vie et de Linux,

  Guido   =8-)


























































  Le HOWTO dosemu
  Edite par Mike Deisher (deisher@dspsun.eas.asu.edu)
  v0.60pl3, 17 Avril 1995

  Ceci  est  la  traduction  francaise  (-- Traduction : Thomas Parmelan
  <tom@darshiva.efrei.fr> --) de la "Foire Aux Questions" (FAQ) /  docu-
  ment HOWTO pour dosemu. La version la plus a jour du document original
  est disponible dans dspsun.eas.asu.edu:/pub/dosemu.

  11..  IInnttrroodduuccttiioonn

  11..11..  QQuu''eesstt--ccee qquuee ddoosseemmuu?

  D'apres le manuel :  "dosemu  est  un  programme  utilisant  certaines
  fonctionnalites  du  noyau  Linux et du processeur 80386 afin de faire
  tourner MS-DOS dans une `boite DOS'. La boite DOS est une  combinaison
  d'astuces materielles et logicielles, et est capable :

  +o  de  virtualiser  toutes  les entrees/sorties et les instructions de
     controle du processeur

  +o  de supporter la taille de mot et les  modes  d'adressage  du  "mode
     reel" de la famille de processeurs iAPX86, tout en s'executant dans
     l'environnement du "mode protege"

  +o  de detourner et d'emuler tous les appels systeme du DOS et du  BIOS
     necessaires au bon fonctionnement, avec des performances correctes

  +o  de  simuler  l'environnement  materiel  que  les programmes DOS ont
     l'habitude de controler

  +o  de fournir des services MS-DOS a travers des  services  Linux;  par
     exemple,  dosemu  peut fournir un disque virtuel qui est en fait un
     repertoire Linux."

  11..22..  QQuueellllee eesstt llaa ddeerrnniieerree vveerrssiioonn ddee ddoosseemmuu et ou la trouver?

  La derniere version est dosemu 0.60. Elle est disponible par ftp sur :

               tsx-11.mit.edu:/pub/linux/ALPHA/dosemu/
               dspsun.eas.asu.edu:/pub/dosemu/

  Cependant, des pre-versions sont disponibles pour les developpeurs  et
  les alpha-testeurs sur :

               tsx-11.mit.edu:/pub/linux/ALPHA/dosemu/Development
               dspsun.eas.asu.edu:/pub/dosemu/Development/

  et ont des noms de la forme pre0.61.*.tgz. Ce code a l'avantage d'etre
  compatible avec les noyaux Linux les plus recents. Il inclut egalement
  de nouvelles fonctionnalites Il ne faut cependant pas oublier que ceci
  est du code ALPHA : il peut y avoir des bogues serieux et tres peu  de
  documentation pour les nouvelles fonctionnalites.

  11..33..  CCoommmmeenntt ssuuiivvrree llee ddeevveellooppppeemmeenntt??

  Si  vous  voulez  suivre  le  developpement de dosemu, souscrivez a la
  liste de distribution linux-msdos-digest. Pour  souscrire,  il  suffit
  d'envoyer  un mail a Majordomo@vger.rutgers.edu avec, dans le corps du
  message, la ligne suivante :

           subscribe linux-msdos-digest votre_nom@votre.adresse.email

  Si jamais vous desirez  vous  desabonner  de  la  liste,  vous  pouvez
  envoyer un mail a Majordomo@vger.rutgers.edu avec la commande suivante
  dans le corps de votre message :

           unsubscribe linux-msdos-digest votre_nom@votre.adresse.email

  11..44..  QQuueellllee eesstt llaa ddooccuummeennttaattiioonn ddiissppoonniibbllee ppoouurr ddoosseemmuu?

  Le manuel de dosemu (dosemu.texinfo) ecrit par Robert Sanders n'a  pas
  ete mis a jour depuis un certain temps, mais il reste encore une bonne
  source d'informations. Il est distribue avec dosemu.

  Le  DANG,  ou  "_d_o_s_e_m_u   Novice's   Altering   Guide_"_,   _e_x_p_l_i_q_u_e   _l_e
  _f_o_n_c_t_i_o_n_n_e_m_e_n_t  _i_n_t_e_r_n_e  _d_e  _d_o_s_e_m_u. Il est ecrit pour les aventureux,
  ceux qui veulent modifier eux-memes le source.  Il  est  maintenu  par
  Alistair  MacDonald  (am20@unix.york.ac.uk) et est poste regulierement
  dans la liste de distribution MSDOS de Linux Activists.

  La liste EMU (EMUsuccess.txt) est une liste de tous les programmes qui
  ont  ete  essayes avec succes sous dosemu.  Elle est postee de temps a
  autres  dans  la  liste  de  distribution.  La  derniere  version  est
  disponible par ftp dans dspsun.eas.asu.edu:/pub/dosemu.

  Et, bien sur, il y a le HOWTO dosemu. Mais vous le saviez deja, n'est-
  ce pas? Il est poste regulierement dans la liste de distribution MSDOS
  de  Linux  Activists.  La  version  la plus a jour est disponible dans
  dspsun.eas.asu.edu:/pub/dosemu.

  11..55..  CCoommmmeenntt ssoouummeettttrree ddeess ccoorrrreeccttiioonnss oouu aaddddiittiioonnss aa ccee HHOOWWTTOO??

  La  meilleure  methode  est d'editer le fichier dosemu-HOWTO-xx.x.sgml
  afin d'y incorporer les changements, de creer un  fichier  diff  comme
  ceci

                       diff fichier-original nouveau-fichier

  et  de  l'envoyer  a deisher@dspsun.eas.asu.edu. Ce n'est pas grave si
  vous ne connaissez pas SGML. Les changements et nouvelles informations
  seront  acceptees  sous  toutes les formes, creer un fichier diff rend
  simplement le travail plus facile au coordinateur. :-)

  [ Note : Cette version francaise n'est qu'une traduction  du  document
  original. Addresser les corrections et suggestions d'ordre technique a
  deisher@dspsun.eas.asu.edu;  signaler  les  erreurs  de  traduction  a
  Thomas.Parmelan@darshiva.efrei.fr. ]

  11..66..  UUnn ppeettiitt mmeessssaaggee ddee GGrreegg ......

  Sauf  mention contraire, les auteurs detiennent les copyrights sur les
  HOWTO Linux. Les HOWTO Linux, ou des extraits des HOWTO Linux, peuvent
  etre  reproduits  et  distribues, sur n'importe quel media physique ou
  electronique, tant que cette notice de copyright  reste  presente  sur
  toutes  les  copies.  La  redistribution  commerciale est autorisee et
  encouragee ; cependant, l'auteur desire etre mis au courant de  telles
  distributions.

  Toute  traduction,  synthese  ou  travail derive d'un HOWTO Linux doit
  etre couvert par cette notice de  copyright.   C'est-a-dire  que  vous
  pouvez  realiser  un travail derive d'un HOWTO Linux, mais que vous ne
  pouvez  pas  imposer   des   restrictions   supplementaires   sur   sa
  distribution. Des exceptions a cette regle peuvent etre accordees dans
  certains cas ; contacter le coordinateur des HOWTO Linux  a  l'adresse
  donnee plus bas.

  En  bref,  nous desirons promouvoir la circulation de ces informations
  autant que possible. Cependant,  nous  desirons  egalement  garder  le
  copyright   sur  ces  HOWTOs,  et  aimerions  etre  prevenus  de  leur
  redistribution.

  Si vous avez des questions, contactez Greg  Hankins,  le  coordinateur
  des  HOWTO LInux, a gregh@cc.gatech.edu.   (-- NDT: En ce qui concerne
  les traductions francaises, contacter Xavier  Cazin,  le  coordinateur
  francais, a xc@itp.fr.--)

  Voici le texte original du copyright, pour reference :

  Unless  otherwise  stated,  Linux  HOWTO  documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced  and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution  is  allowed  and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate  works  incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain  conditions;  please  contact  the  Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain  copyright
  on  the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Greg Hankins,  the  Linux  HOWTO
  coordinator, at gregh@cc.gatech.edu.

  22..  CCoommppiilleerr eett iinnssttaalllleerr ddoosseemmuu

  22..11..  OOuu ssoonntt lleess iinnssttrruuccttiioonnss dd''iinnssttaallllaattiioonn??

  Les  instructions  d'installation  sont  dans  le  fichier  QuickStart
  present dans la distribution.

  22..22..  LLeess 1100 EErrrreeuurrss SSttuuppiiddeess lleess pplluuss ccoouurraanntteess aa ll''iinnssttaallllaattiioonn

  (08/04/95)

  1. Oublier de lire le QuickStart Guide;

  2. Essayer de compiler avec un noyau posterieur au 1.1.45;

  3. Ne pas avoir les sources du bon noyau dans /usr/src/linux;

  4. Utiliser dosemu avec un noyau n'ayant pas le support pour les IPC;

  5. Compiler  avec  un  gcc  anterieur a 2.5.8 ou une libc anterieure a
     4.5.21;

  6. Oublier d'editer le fichier /etc/dosemu.conf;

  7. Oublier de lancer "FDISK /mbr" sur son hdimage;

  8. Lancer DOSEMU avec un acces partition lorsque ces  partitions  sont
     deja montees;

  9. Ne pas compiler dosemu avec suffisamment de privileges (root).

  10.
     Essayer  de  lancer  DOSEMU  sur le systeme multi-utilisateurs d'un
     fournisseur de connectivite IP.

  22..33..  CCoommmmeenntt ccrreeeerr uunn eexxeeccuuttaabbllee ssiimmppllee ((ppaass ddee lliibbrraaiirriiee)) ??

  Marty Leisner (leisner@sdsp.mc.xerox.com, 08/04/95

  Si  vous  voulez  un executable QMAGIC, il faut definir STATIC dans le
  Makefile; sinon il y aura une combinaison librairie/executable.

  22..44..  CCoommmmeenntt ccrreeeerr ddeess bbiinnaaiirreess EELLFF ??

  Marty Leisner (leisner@sdsp.mc.xerox.com, 08/04/95

  Pour creer un binaire ELF, definir ELF dans le Makefile.  Compiler  et
  installer la librairie slang separement. slang fonctionne tres bien en
  librairie ELF partagee.

  22..55..  CCoommmmeenntt ccoommppiilleerr ddoosseemmuu ssuurr uunnee mmaacchhiinnee aayyaanntt ppeeuu ddee mmeemmooiirree ??

  Marty Leisner (leisner@sdsp.mc.xerox.com, 08/04/95

  Si  vous  etes  a  court de place dans le swap, vous pouvez ajouter la
  ligne

           CFLAGS+=-fno-inline

  apres la definition de CFLAGS dans  dpmi/Makefile.  Attention  a  bien
  verifier  que  vous  avez active votre swap: j'ai deja experimente des
  plantages quand Linux manque de swap.

  22..66..  CCoommmmeenntt aacccceelleerreerr llaa ccoommppiillaattiioonn__??

  Marty Leisner (leisner@sdsp.mc.xerox.com, 08/04/95

  L'optimisation par defaut est -O2. Il suffit de  changer  le  Makefile
  afin  d'utiliser  -O  (compilation  un  peu  plus  rapide,  executable
  legerement plus petit).

  22..77..  CCoommmmeenntt ccoommppiilleerr ddee mmaanniieerree nnoonn--iinntteerraaccttiivvee__??

  En definissant do_DEBUG dans le Makefile, vous  aurez  -Wall  -g,  une
  compilation non-interactive et sans tex.

  22..88..  AAuuttrreess aassttuucceess ddee ccoommppiillaattiioonn ddee MMaarrttyy ......

  Il  faut  avoir  compile le noyau sur son propre systeme pour avoir la
  version courante. Sinon, il faut modifier  a  la  main  KERNEL_VERSION
  dans  le  Makefile racine. Le nombre est de la forme nmmmppp, ou n est
  le numero de version, mmm est le numero mineur de version, et  ppp  le
  numero  de patch.  Par exemple, le noyau 1.1.88 correspond a "1001088"
  et le noyau 1.2.1 a "1002001".

  Commencer toutes les compilations a partir du  repertoire  racine  des
  sources.  Dans ce repertoire, "make sous-repertoire" lancera make dans
  sous-repertoire. Chaque  repertoire  possede  les  cibles  habituelles
  clean  et  realclean.   clean  efface  les  fichiers objets, realclean
  efface  egalement  les  fichiers  de  dependance  et  quelques  autres
  fichiers.

  22..99..  FFaauutt--iill ccoommppiilleerr ddoosseemmuu ssoouuss ll''iiddeennttiittee ""rroooott""__??

  08/04/95

  Non. Il faut l'installer sous l'identite "root", cependant.

  Marty Leisner (leisner@sdsp.mc.xerox.com) ajoute_:

  Afin  d'acceder  aux ports E/S (y compris la console), dosemu a besoin
  de tourner avec l'identite "root". Lancer dosemu dans un xterm ou  une
  fenetre  X  et demander ensuite l'acces direct au materiel vous permet
  de tourner dosemu sous une identite utilisateur. Les  implications  de
  securite  / setuid seront etudiees dans les versions de developpement.

  22..1100..  LLee MMaakkeeffiillee eesstt ddaannss uunnee bboouuccllee iinnffiinniiee ......

  James B. MacLean (jmaclean@fox.nstn.ns.ca), 12/04/95

  Nous avons quelquefois remarque ceci,  generalement  lorsque  la  date
  d'un  fichier est importante. Quelques personnes resolvent le probleme
  en mettant a jour leur noyau,  d'autres  (dont  moi)  en  lancant  les
  commandes_:

               make realclean
               make most

  33..  CCoonnffiigguurraattiioonn dduu ddiissqquuee dduurr

  33..11..  CCoommmmeenntt ppuuiiss--jjee uuttiilliisseerr mmoonn ddiissqquuee dduurr aavveecc ddoosseemmuu?

  Tout  d'abord, montez votre partition DOS sur un repertoire Linux. Par
  exemple, on peut creer un repertoire tel que /dos sous Linux (mkdir -m
  755 /dos) et ajouter une ligne du type :

        /dev/hda1      /dos    msdos   umask=022

  a  /etc/fstab.  (Dans  cet exemple, le disque DOS est monte en lecture
  seule. Il est possible de le monter en lecture et ecriture en  rempla-
  cant  "022"  par  "000",  et en utilisant l'option -m 777 avec mkdir).
  Maintenant, mount /dos. Vous pouvez ensuite ajouter une ligne

        lredir d: linux\fs/dos

  au fichier AUTOEXEC.BAT de votre hdimage (voir plus  bas  les  commen-
  taires au sujet de LREDIR). Sur un systeme multi-utilisateurs, on peut
  utiliser :

        lredir d: linux\fs\${home}

  ou hhoommee est le nom d'une variable d'environnement contenant l'emplace-
  ment du repertoire dos (/dos dans cet exemple).

  ---------------------

  Tim  Bird  (Tim_R_Bird@Novell.COM) explique qu'il faut faire attention
  lorsque l'on  utilise  LREDIR  dans  l'autoexec.bat,  car  COMMAND.COM
  continue  a  lire  dans  l'autoexec.bat du disque redirige a partir de
  l'endroit ou il en etait reste dans l'autoexec.bat du disque physique.
  Pour  cette  raison,  il  est plus sur d'utiliser le meme autoexec.bat
  pour les deux disques.

  ---------------------

  Robert   D.   Warren   (rw11258@xx.acs.appstate.edu)   expliquait   le
  28/04/94 :

  Je boote a partir d'un fichier hdimage de moins d'1 Mo, et la derniere
  ligne de mon config.sys dans le hdimage est :

               install=c:\lredir.exe LINUX\FS\home/dos

  Ceci execute lredir juste avant de lancer l'interpreteur de commandes.
  J'ai  utilise  cela avec succes avec COMMAND.COM et 4DOS. Cela elimine
  le  probleme  de  l'offset  lie  a  l'utilisation   de   lredir   dans
  l'AUTOEXEC.BAT.

  33..22..   PPuuiiss--jjee  uuttiilliisseerr  uunn  ddiissqquuee  ccoommpprreessssee  aavveecc  ssttaacckkeerr//ddoouubbllee--
  ssppaaccee//ssuuppeerr--ssttoorree??

  Pour le moment, il n'est pas possible d'acceder aux disques compresses
  a partir des redirigeurs (lredir ou emufs). Cependant,  de  nombreuses
  personnes   ont   utilise   avec  succes  la  technique  consistant  a
  decommenter la ligne

        disk { wholedisk "dev/hda" } # 1ere partition du 1er disque

  du fichier de configuration de dosemu. D'autres utilisent la ligne

        disk { partition "dev/hda1" }

  Si votre partition DOS est  deja  montee  et  accessible  en  ecriture
  lorsque  vous  lancez dosemu avec l'acces partition ou l'acces disque,
  dosemu affiche un message d'avertissement et ne  se  lance  pas.  Ceci
  evite  DOS  et Linux d'ecrire independamment l'un de l'autre sur votre
  disque, et de rendre votre partition DOS inutilisable (tout  au  moins
  les fichiers qui y resident).

  ---------------------

  Si  LILO  est  installe,  la  procedure ci-dessus ne fonctionnera pas.
  Cependant...

  Thomas Mockridge (thomas@aztec.co.za) (8/5/94):

  Pour demarrer dosemu avec LILO et  Stacker  4.0  j'ai  procede  de  la
  maniere suivante...

  1. dd  le  MBR  vers un fichier (ou norton utility, etc., les premiers
     512 octets)

  2. Demarrer le DOS (le vrai), faire un fdisk /mbr, rendre la partition
     dos active avec fdisk.

  3. Copier le nouveau MBR vers un fichier.

  4. Remplacer le MBR original.

  5. Copier  le second MBR vers /var/lib/dosemu/partition.hda?  (suivant
     votre partition dos).

  6. Editer dosemu.conf

                       disk {partition "/dev/hda? ?"}

  7. Lancer dosemu et voila! Plus de LILO.

  ---------------------

  Holger   Schemel   (q99492@pbhrzx.uni-paderborn.de)   expliquait    le
  10/02/94 :

  Cela marche parfaitement sous dosemu avec MS-DOS 6.0. Si vous avez des
  problemes, il faut editer  le  fichier  DBLSPACE.INI  pour  mettre  la
  lettre d'unite de disque qui correspond a votre disque sous dosemu.

  ---------------------

  Darren J Moffat (moffatd@dcs.gla.ac.uk) expliquait le 27/03/94 :

  "...utilisez  6.2  si vous pouvez !! Assurez-vous d'avoir sous la main
  une disquette de boot avec LILO, car le  DOS  6.2  change  le  MBR  du
  disque de demarrage."

  44..  PPoorrttss sseerriieess,, ppaarraalllleelleess eett ssoouurriiss

  44..11..  OOuu ssoonntt lleess ppiillootteess ppoouurr lleess ssoouurriiss ((ccoommppaattiibblleess mmiiccrroossoofftt))??

  Tom Kimball (tk@pssparc2.oc.com) expliquait le 24/11/93 :

  De nombreuses personnes utilisent un autre pilote de souris.  En voici
  quelques uns qui semblent fonctionner correctement :

        oak.oakland.edu:/pub/msdos/mouse/mouse701.zip (mscmouse)
        oak.oakland.edu:/pub/msdos/mouse/gmous102.zip (gmouse)

  44..22..  PPoouurrqquuooii llee ppiilloottee ddee mmaa ssoouurriiss nnee ffoonnccttiioonnnnee--tt--iill ppaass??

  Mark Rejhon (mdrejhon@magi.com), 07/04/95

  Si le pilote de souris "plante" lorsque  vous  le  lancez  (cela  peut
  prendre  de  30  a 60 secondes), et si vous attendez plus d'une minute
  avant qu'il soit charge, essayer de preciser sur la ligne de  commande
  du pilote de souris, le port COM sur lequel votre souris est branchee.

  44..33..  PPoouurrqquuooii ddoosseemmuu rend-il COM4 inaccessible?

  Rob Janssen (rob@pe1chl.ampr.org) expliquait le 24/03/94 :

  D'apres jmorriso@bogomips.ee.ubc.ca, "dosemu rend encore  inaccessible
  le  port  COM4 (0x2e8, IRQ 5). 0x2e8 n'est pas liste dans ports{} dans
  la configuration. Je suis oblige de lancer setserial /dev/cua3  irq  5
  lorsque dosemu est termine."

  Ceci  est du au BIOS de la carte VGA. J'ai trouve cela en utilisant la
  trace des ports d'E/S et en regardant  a  quel  moment  COM4  devenait
  inutilisable.

  Commentez   la  ligne  allowvideoportaccess  on  dans  le  fichier  de
  configuration et tout devrait rentrer dans l'ordre. Si vous  avez  des
  problemes  video,  essayez  de selectionner plus precisement les ports
  autorises dans le fichier de configuration (par exemple, 40-43).

  44..44..  CCoommmmeenntt uuttiilliisseerr ddoosseemmuu et un shell a travers une liaison serie?

  John Taylor (taylor@pollux.cs.uga.edutt) expliquait le 25/05/94 :

  J'utilise Linux  1.1.13  et  j'aimerais  signaler  une  fonctionnalite
  interessante  qu'il  faudrait,  a mon avis, conserver. Avec la version
  52, il est possible d'utiliser  le  programme  screen.   A  partir  de
  screen,  on  peut  invoquer dos -D-a. Le point interessant est que les
  commandes de screen fonctionnent encore ! Ainsi avec CTRL-A C  il  est
  possible d'ajouter un autre shell unix, et de passer de l'un a l'autre
  (DOS / UNIX). Ceci permet d'utiliser facilement dosemu a  travers  une
  liaison serie.

  44..55..  CCoommmmeenntt ffaaiirree ffoonnccttiioonnnneerr lleess ppoorrttss ppaarraalllleelleess ??

  Dennis Flaherty (dennisf@flaherty.elk.miles.com, 02/03/95

  Le fichier dosemu.conf permet de rediriger les imprimantes vers lpr ou
  vers des fichiers. Si vous desirez un acces direct au port,  commentez
  ces lignes et ajoutez la ligne suivante:

           ports { 0x3b8 0x3b9 0x3ba 0x3bb 0x3bc 0x3bd 0x3be 0x3bf } # lpt0

  pour  le  port parallele correspond a la carte moniteur (LPT0), ou les
  lignes

           ports { 0x378 0x379 0x37a 0x37b 0x37c 0x37d 0x37e 0x37f } # lpt1
           ports { 0x278 0x279 0x27a 0x27b 0x27c 0x27d 0x27e 0x27f } # lpt2

  pour LPT1 et LPT1, respectivement.

  55..  MMuullttii--uuttiilliissaatteeuurrss eett sseessssiioonnss nnoonn--iinntteerraaccttiivveess

  55..11..  EEsstt--iill ppoossssiibbllee dd''uuttiilliisseerr ddoosseemmuu sur un systeme  multi-utilisa-
  teurs?

  Corey Sweeney (corey@amiganet.xnet.com) expliquait le 08/12/93 :

  Si plusieurs personnes doivent utiliser dosemu sur votre  machine,  il
  faut  changer  le  repertoire  de  votre  hdimage.   Dans  le  fichier
  /etc/dosemu.conf, remplacez hdimage par /var/lib/dosemu/hdimage. Ainsi
  les  utilisateurs  n'ont  pas  a se soucier de leur repertoire courant
  lorsqu'ils lancent dosemu, et il n'est  plus  necessaire  de  deplacer
  hdimage a chaque installation d'une nouvelle version.

  Si  vous  faites  cela  pour un dosemu multi-utilisateurs, positionnez
  /var/lib/dosemu/hdimage en lecture seule pour tout le monde, sauf pour
  l'administrateur de dosemu.

  Notez   qu'il   est   egalement   possible   d'utiliser   la  nouvelle
  fonctionnalite emufs.sys pour monter un  repertoire  public  et/ou  un
  repertoire  prive  (un  sous-repertoire  dans  le repertoire racine de
  chaque utilisateur).

  [Note  :  Les  utilisateurs  peuvent  aussi  creer   un   fichier   de
  configuration  personnel  ~/.dosrc  (meme format que /etc/dosemu.conf)
  pour executer leur propre version de dos.]

  55..22..   CCoommmmeenntt eexxeeccuutteerr ddeess ccoommmmaannddeess DDOOSS ddee mmaanniieerree nnoonn--iinntteerraaccttiivvee ??

  Dan Newcombe (newcombe@aa.csc.peachnet.edu) reporte (27/01/94) :

  Voici une idee (non testee) pour lancer une  commande  DOS  depuis  la
  ligne   de   commande  (ou  depuis  un  menu,  etc...)  sans  modifier
  l'emulateur actuel. [ Votre partition DOS est censee etre deja  montee
  sous Linux. ]

  Supposons  que  vous  vouliez  lancer wp60.exe avec le parametre "wp60
  d:\doc\paper.txt".  Il suffirait de lancer quelquechose comme  "dosrun
  wp60   d:\doc\paper.txt".   dosrun  serait  un  script  shell  qui  a)
  edite/modifie/recree le fichier autoexec.bat sur votre partition  DOS,
  et  b)  lance  simplement  dosemu  (par  exemple, "dos -C >/dev/null".
  L'etape a) consisterait a garder tout  ce  qui  est  normalement  dans
  votre autoexec.bat et a rajouter a la fin "wp60 d:\doc\paper.txt".

  Il  faudrait auparavant modifier le config.sys situe sur votre hdimage
  afin que dosemu utilise emufs pour acceder a la  partition  DOS  comme
  D:,  positionner COMPSEC=D:\ (Je pense. Je n'ai pas de manuel DOS sous
  la main), et shell=c:\command.com /p.

  Le  principe  est  le  suivant:  a  chaque  fois  que  vous   lancerez
  l'emulateur  DOS,  il  recreera  un  autoexec.bat  specifique  a cette
  session. Ce qui le  rend  specifique  est  cette  derniere  ligne  qui
  execute  le  programme  que vous voulez utiliser. Les modifications du
  hdimage sont necessaire pour indiquer a l'emulateur et au DOS que vous
  voulez  utiliser  et  booter  depuis  D:,  qui  sera  en fait la vraie
  partition DOS.

  Si vous n'utilisez pas hdimage et accedez au systeme de  fichiers  DOS
  directement  au  demarrage de dosemu, alors ceci fonctionnera, et vous
  n'avez pas a vous soucier de la partie concernant le hdimage.

  ---------------------

  Daniel T. Schwager (danny@dragon.s.bawue.de) rapporte (02/07/94) :

  Vous pouvez utiliser plusieurs dosemu.conf  (et  plusieurs  images  de
  boot avec plusieurs autoexec.bat) en lancant dosemu comme ceci :

       $ dos -F my_quicken_q_exe_dosemu.conf

  ---------------------

  Dietmar   Braun   (braun@math20.mathematik.uni-bielefeld.de)  rapporte
  (04/07/94) :

  Cela est facile si l'on  utilise  le  redirigeur  de  dosemu.  Il  est
  possible  de  rediriger  une  lettre  d'unite DOS vers un chemin linux
  donne par une variable d'environnement.

  Ainsi, j'ai un script shell appele "DOS" qui contient

   mkdir /tmp/dos.$$;
   DOSTMP=/tmp/dos.$$; export DOSTMP

  et   un   petit   truc   pour   faire   fonctionner   "echo    $*    >
  $DOSTMP/startup.bat"  (en fait, un petit programme C qui convertit '/'
  en '\', termine les lignes correctement pour DOS (CR/LF) et ajoute  ^Z
  a la fin du fichier), cree les fichiers de demarrage et les liens dans
  ce repertoire, et lance dosemu. Dans l'autoexec.bat,  l'unite  C:  est
  redirigee  depuis  le  hdimage vers ce repertoire temporaire, qui con-
  tient des liens pour $HOME et $PWD.

  Ainsi, si je veux voir mes fichiers reduits en 8.3 je tape "DOS  dir".
  Comme  cela,  j'ai un DOS multi-utilisateurs (je n'ai pas de partition
  DOS, et rediriger vers Linux preserve les permissions utilisateur)  et
  multi-taches  (les  sessions  dosemu sont completement independantes).
  J'ai fait cela un  jour  pour  utiliser  un  programme  DOS  pour  mon
  imprimante.  En  fait,  l'entree  df de mon printcap est un realite un
  programme DOS !

  66..  ddoosseemmuu and Netware

  66..11..  CCoommmmeenntt aacccceeddeerr aa NNeettwwaarree ddeeppuuiiss ddoosseemmuu?

  James B. MacLean (jmaclean@fox.nstn.ns.ca) expliquait le 28/11/94 :

  dosemu supporte maintenant pdipx (un pilote de paquets IPX) et pdether
  (qui  utilise  les  specifications  MLID  de Novell) pour acceder a un
  reseau Novell a travers  le  pilote  de  paquets  integre.  Ce  pilote
  utilise  l'interruption 0x60, et respecte les regles du pilote normal.
  Cela etant dit, n'essayez pas encore d'utiliser des outils TCP/IP DOS.
  Pour utiliser Netware, il faut :

  1. cd ./net

  2. cp libpacket.c.single libpacket.c

  3. cp pktnew.c.single pktnew.c

  4. recompiler dosemu

  5. lancer dosemu

  6. lancer  pdether comme explique dans sa documentation (pdipx est une
     autre possibilite)

  7. Lancer netx.

  8. Utiliser l'acces Netware :-)

     Si  vous  avez  besoin  d'un  acces  special  a  votre  NIC,  lisez
     attentivement  ce  qui  suit.  Par  defaut,  dosemu  ne  recoit pas
     d'interruptions du noyau. Ceci dit, j'ai un pilote (Silly Interrupt
     Generator),  a  compiler  dans  le  noyau,  que  dosemu ou d'autres
     programmes  peuvent  utiliser   pour   acceder   a   l'interruption
     correspondant a votre NIC. Je l'ai utilise avec dosemu pour acceder
     a un reseau Novell Lite lorsque le pilote  de  paquet  n'etait  pas
     disponible.

  Si   vous   etes  interesses,  envoyez-moi  un  courrier  electronique
  (jmaclean@fox.nstn.ns.ca) et je vous donnerai des explications.

  Vous voulez plusieurs acces a Novell depuis dosemu?

  1. Compiler la pre-version courante de dosemu

  2. Suivre les indications de ./v-net/dosnet.README

  3. Reprendre au point 5 ci-dessus.

  66..22..  NNeettwwaarree--HHOOWWTTOO

  Le  Netware-HOWTO  de  Lauri  Tischler  (ltischler@fipower.pp.fi)  est
  maintenant  un  document  a  part  entiere.  Il  est  inclus  dans  la
  distribution dosemu et est bien sur disponible sur les sites archivant
  les HOWTOs, par exemple http://sunsite.unc.edu/mdw/linux.html (-- NDT:
  Pour   nous   autres   francophones,   il   vaut   mieux   aller   sur
  http://www.loria.fr/linux/.--)

  77..  ddoosseemmuu et X-Window

  77..11..   EEsstt--iill ppoossssiibbllee dd''uuttiilliisseerr ddoosseemmuu sur une console tout en util-
  isant X?

  Ronald Schalk (R.Schalk@uci.kun.nl) expliquait le 17/01/94 :

  Oui, sans aucun probleme. Il suffit de se rappeler qu'il faut utiliser
  Ctrl-Alt-<Fn> pour acceder a une console virtuelle, et qu'il est alors
  possible  de lancer n'importe quelle application Linux (dosemu est une
  application Linux). J'ai quasiment  en  permanence  WP  5.1  dans  une
  session dos.

  [Note : Utiliser Ctrl-Alt-F7 pour revenir a X a partir de dosemu.]

  77..22..  EEsstt--iill ppoossssiibbllee dd''uuttiilliisseerr ddoosseemmuu dans une fenetre X ?

  Mark Rejhon (mdrejhon@magi.com), 08/04/95

  Si vous  avez  installe  X,  avez  compile  dosemu,  et  reussissez  a
  l'utiliser  en  dehors  de  X-Window,  il  devrait  suffire  de lancer
  directement "xdos" ou "dos -X" pour obtenir  une  fenetre  dosemu.  Si
  cela ne marche pas, verifier que :

  1. dosemu  a  ete  compile  avec  le  support  X  (X_SUPPORT=1 dans le
     Makefile) ;

  2. les fontes VGA ont ete installees. Il suffit de  lancer  le  script
     xinstallvgafont dans le repertoire source de dosemu :

               sh xinstallvgafont

  3. les codes claviers sont corrects. Dans un xterm, taper:

                xmodmap -e "keycode 22 = 0xff08"
                xmodmap -e "keycode 107 = 0xffff"

  Ces commandes corrigent les touches Backspace et Delete ;

  4. les  options  relatives  a  X ont ete configurees correctement dans
     /etc/dosemu.conf.

  Une autre methode est de lancer dosemu a l'interieur d'un color_xterm,
  mais  cela n'est pas recommande car la plupart des color_xterm ne sont
  pas capables de gerer correctement  toutes  les  ressources  complexes
  d'affichage  de  dosemu.  Cette  methode  ne necessite pas l'option de
  compilation X_SUPPORT. Si vous voulez vraiment faire comme ceci, voici
  les instructions:

  1. Installer      ansi_xterm.      Il      est      disponible     sur
     tsx-11.mit.edu:/pub/linux/ALPHA/dosemu/Development/ansi-xterm-R6.ta;r.gz

  2. Installer   les   fontes   VGA.  Il  suffit  de  lancer  le  script
     xinstallvgafont dans le repertoire source de dosemu :

               sh xinstallvgafont

  3. Configurer les codes clavier. Dans un xterm, taper:

                xmodmap -e "keycode 22 = 0xff08"
                xmodmap -e "keycode 107 = 0xffff"

  Ces commandes corrigent les touches Backspace et Delete ;

  4. Configuer les options de terminal dans /etc/dosemu.conf

  Marty Leisner (leisner@sdsp.mc.xerox.com), 31/03/95

  J'utilise xrdb pour utiliser les ressources suivantes :

       dosxterm*Font:          vga
       dosxterm*geometry:      80x25
       dosxterm*saveLines:     25

  ou bien je fais un alias dosxterm correspondant a

       xterm -fn vga -title dosxterm -geometry 80x25 -sl 25

  Pour utiliser la methode xrdb, il suffit de taper :

       xterm -name dosxterm

  77..33..  LL''eemmuullaattiioonn aannssii ffoonnccttiioonnnnee--tt--eellllee ccoorrrreecctteemmeenntt ??

  Marty Leisner (leisner@sdsp.mc.xerox.com), 31/03/95

  Oui. J'utilise nnansi.com sous X-Window. Les modes 25, 43 et 50 lignes
  fonctionnent correctement, bien que le mode 50 lignes soit difficile a
  lire sur un ecran 1024x768 (a moins d'utiliser des fontes plus petites
  ou  un  ecran  plus  grand).  Le mode 43 lignes retaille le xterm pour
  utiliser 43 lignes.

  88..  ddoosseemmuu eett MMSS--WWiinnddoowwss 33..11

  88..11..  EEsstt--iill ppoossssiibbllee ddee llaanncceerr MMSS--WWiinnddoowwss 33..11 ssoouuss ddoosseemmuu ??

  D'apres le fichier README :

       ****************************************************************
       *    ATTENTION !!!  ATTENTION !!!  ATTENTION!!!  ATTENTION !!! *
       *                                                              *
       *  Danger ! Ceci n'est pas completement supporte et de         *
       *  nombreux bogues connus sont presents ! La plupart des gros  *
       *  programmes ne fonctionneront sans doute pas !!!             *
       *                                                              *
       *  Soyez prets pour des plantages systeme si vous essayez !!!  *
       *                                                              *
       *    ATTENTION !!!  ATTENTION !!!  ATTENTION!!!  ATTENTION !!! *
       ****************************************************************

  Bon,  vous  etes  toujours la ? Bien. Il est possible de lancer WINOS2
  (la version modifiee de Windows 3.1 utilisee par  OS/2)  sous  dosemu.
  Felicitations a Lutz et Dong !

  De nombreux problemes sont connus. Windows est enclin aux plantages et
  peut vous faire perdre des donnees. Les gros programmes ne se chargent
  pas.  La  souris  risque  d'etre  tres  peu maniable, etc. En d'autres
  termes,  ceci  n'est  pas  pret  pour  une  utilisation  normale.   De
  nombreuses  cartes  graphiques posent probleme (vous pouvez obtenir un
  tres bel ecran blanc). Vos groupes de programmes peuvent  disparaitre.
  En un mot, c'est une horreur.

  D'un  autre  cote,  si  vous  mourrez  d'envie de voir le logo Windows
  s'afficher sous Linux et que vous avez lu attentivement tout ceci,  et
  que  vous  promettez de ne pas bombarder les developpeurs de dosemu de
  messages du type "MS Word 6.0 ne fonctionne pas !" ...

  1. Prendre les distributions sources de Linux et dosemu ;

  2. Decompresser la distribution dosemu ;

  3. Appliquer le patch dpmi/kernel.diff a vos sources du noyau ;

  4. Recompiler le noyau ;

  5. Compiler dosemu ;

  6. Se procurer WINOS2.ZIP sur tsx-11.mit.edu ;

  7. Decompresser  le  contenu  de  WINOS2.ZIP  dans  votre   repertoire
     WINDOWS/SYSTEM ;
  8. Redemarrer avec le nouveau noyau ;

  9. Lancer dosemu (apres avoir verifie que DPMI est "ON") ;

  10.
     Croiser les doigts.

  Bonne chance !

  _R_A_P_P_E_L_:  _C_E_C_I  _N_'_E_S_T  _P_A_S _R_E_C_O_M_M_A_N_D_E _! _N_O_U_S _N_E _V_O_U_S _C_O_N_S_E_I_L_L_O_N_S _P_A_S _D_E
  _F_A_I_R_E _C_E_C_I _!_!_!

  99..  VViiddeeoo eett ssoonn

  99..11..  PPeeuutt--oonn uuttiilliisseerr lleess jjeeuuxx 3322--bbiittss ssoouuss ddoosseemmuu ??

  Mark Rejhon (mdrejhon@magi.com), 08/04/95

  Avec les ameliorations concernant le DPMI qui ont ete integrees  a  la
  version  0.60,  il  est  maintenant possible de faire tourner quelques
  jeux 32 bits sous dosemu. Si le jeu est compatible avec OS/2, il  y  a
  de  fortes chances pour qu'il fonctionne sous dosemu (exemples de jeux
  32 bits : Descent, Dark Forces, Mortal Kombat 2, Rise  of  The  Triad,
  ont tous ete testes avec les versions recentes de dosemu).

  Avant  d'essayer  quoi que ce soit, il faut avoir configure le clavier
  en mode direct  (-- NDT: _r_a_w _m_o_d_e--) et autorise  les  graphiques  VGA
  dans   /etc/dosemu.conf.  Si  vous  avez  deja  reussi  a  lancer  des
  programmes graphiques sous dosemu, et que vous etes pret a prendre  le
  risque  d'un  plantage  systeme  (puisque  vous laissez dosemu acceder
  directement a la carte video, ce qui peut  laisser  celle-ci  dans  un
  etat  instable  dont  il  est  difficile de ressortir), alors allez-y,
  lancez votre jeu !

  Attention cependant, il faut desactiver le son du jeu. (Il faudra  que
  quelqu'un  programme  une emulation de carte son pour eviter cela). Le
  jeu sera peut-etre un peu lent, etant donne que Linux est multi-taches
  et  ne  possede  pas  de  timer  a haute frequence. Alors, le jeu peut
  fonctionner de 5 a 100 % de sa vitesse normale. En general, il  s'agit
  de  50  %  pour  les  versions  recentes  de  dosemu,  et cela devrait
  augmenter.

  Qui sait, cela pourrait meme fonctionner. N'hesiter pas a  envoyer  un
  message  au  coordinateur  de  EMUsuccess.txt  si votre jeu fonctionne
  correctement sous dosemu  !

  99..22..  EEnn qquuiittttaanntt ddoosseemmuu, j'obtiens  un  ecran  rempli  de  caracteres
  bizarres.

  08/04/95

  Le probleme est que la police de l'ecran texte VGA n'est  pas  sauvee.
  Procurez vous le kit svgalib. La version courante est dans

           sunsite.unc.edu:/pub/Linux/libs/graphics/svgalib125.tar.gz

  Ce kit est sans doute egalement disponible sous forme precompilee dans
  votre distribution Linux preferee (par exemple,  _S_l_a_c_k_w_a_r_e).  Utilisez
  savetextmode  pour  sauver  les  parametres  du  mode  courant vers un
  fichier dans /tmp avant de lancer dosemu. En sortant de dosemu, lancez
  textmode pour les restaurer.

  99..33..  CCoommmmeenntt uuttiilliisseerr ddoosseemmuu avec ma carte video Trident/Actix/etc?

  [L'ecran vacille, affiche le message du BIOS video, puis plus rien.]

  Andrew Tridgell (tridge@nimbus.anu.edu.au) expliquait le 29/01/94 :

  Avec les versions precedentes, j'ai decouvert que cela fonctionnait en
  utilisant :

        ports { 0x42 }

  mais  quelquefois,  ma  machine  se plantait pendant que le BIOS video
  s'executait dans dosemu. La raison est que l'on permet au BIOS VGA  de
  re-programmer l'horloge, ce qui interagit avec Linux.

  Cela  m'a conduit a implementer readonly et masking dans dosemu, et je
  crois qu'ils sont  toujours  dans  la  derniere  version.  Maintenant,
  j'utilise :

        ports { readonly 0x42 }

  et dosemu se lance plus lentement, mais plus surement.

  ---------------------

  Tim Shnaider (tims@kcbbs.gen.nz) expliquait aussi le 18/01/94 :

  L'une  des  solutions  pour  corriger  ce  probleme  est d'utiliser le
  programme GETROM afin de copier le BIOS  video  vers  un  fichier,  et
  d'editer  le  fichier de configuration dans le repertoire /etc/dosemu.
  Voici la ligne que j'utilise pour la video :

        video { vga console graphics chipset trident memsize 1024 vbios_file
        /etc/dosemu/vbios }

  ou vbios est le fichier genere par la commande

        getrom > vbios

  ---------------------

  Douglas Gleichman  (p86884@tcville.edsg.hac.com)  explique  (01/09/94)
  que (avec une ATI Graphics Ultra) :

  Pour dosemu 0.52 il faut ajouter cette ligne a dosemu.conf :

        ports { 0x1ce 0x1cf 0x238 0x23b 0x23c 0x23f 0x9ae8 0x9ae9 0x9aee 0x9aef }

  Le  programme  d'auto-test  de la carte indiquera une erreur, mais les
  programmes graphiques fonctionneront correctement.

  99..44..  PPoouurrqquuooii lleess pprrooggrraammmmeess lliivvrreess aavveecc mmaa ccaarrttee  ssoonn  nnee  ffoonnccttiioonn--
  nneenntt--iillss ppaass ssoouuss ddoosseemmuu?

  Hannu Savolainen (hsavolai@cs.Helsinki.FI) expliquait le 21/03/94 :

  dosemu et les programmes DOS s'executent sous le controle d'un systeme
  d'exploitation en mode protege. Cela signifie que la memoire n'est pas
  projetee de la maniere attendue par le programme. S'il reussit,  d'une
  maniere  ou d'une autre, a commencer un enregistrement base sur la DMA
  de la SB, le son enregistre n'arrive pas jusqu'a l'application. Il  ne
  fait  que  detruire  des  informations quelque part dans la memoire du
  systeme.

  James B. MacLean (jmaclean@fox.nstn.ns.ca) explique (19/06/94) :

  Desole de vous decevoir, mais a l'heure actuelle  dosemu  ne  supporte
  pas  directement les interceptions d'interruptions ou DMA generalement
  necessaires a l'utilisation d'une carte son sous dosemu :-(.

  Cela devrait cependant arriver dans un futur proche, cependant :-)

  1100..  AAuuttrreess mmaatteerriieellss

  1100..11..  CCoommmmeenntt ffaaiirree ffoonnccttiioonnnneerr mmoonn ppeerriipphheerriiqquuee xxxxxxxxxx aavveecc ddoosseemmuu?

  Corey Sweeney (corey@bbs.xnet.com) expliquait le 30/05/94 :

  Voici  un  compte  rendu  de mes tentatives pour faire fonctionner des
  peripheriques  avec  dosemu.   J'ai   reussi   a   faire   fonctionner
  correctement  mon systeme de courrier vocal, et mon scanner fonctionne
  a moitie. Voici ce qu'il faut faire :

  1. Regarder dans le manuel si la carte utilise des ports. Si oui,  les
     inclure   dans  la  ligne  "ports"  du  fichier  de  configuration.
     Attention au fait que, quelquefois, plusieurs ports  sont  utilises
     mais seul le premier est documente.

  2. Essayer.  Si  cela  ne marche pas, ou en l'absence de manuel (ou si
     celui-ci est aussi interessant  que  mon  manuel  AT&T  :),  lancer
     dosemu par "dos -D+i 2> /tmp/io.debug". Lancer les logiciels dedies
     au peripherique  utilise,  et  sortir  de  dosemu.   Regarder  dans
     /tmp/io.debug tous les numeros de ports.  Essayer de les ajouter au
     fichier de configuration et essayer a nouveau.

  3. Si cela ne marche toujours pas, le peripherique  utilise  peut-etre
     des  interruptions. Trouver l'interruption en question et installer
     le paquetage SIG.tgz (Silly  Interrupt  Generator)  disponible  sur
     tsx-11.mit.edu apres avoir lu les instructions.

  Et c'est tout...

  Question : Et si ma carte utilise le DMA?

  1111..  PPrroobblleemmeess eett ssoolluuttiioonnss

  1111..11..  ddoosseemmuu ss''eesstt ppllaannttee eett jjee nnee ppeeuuxx pplluuss rriieenn ttaappeerr

  Daniel Barlow(jo95004@sable.ox.ac.uk), 08/04/95

  Si  vous ne pouvez pas vous connecter depuis le reseau ou sur un autre
  terminal, il y  a  de  fortes  chances  pour  que  vous  soyez  oblige
  d'appuyer  sur  le  bouton  Reset.  Si  vous  reussisez tout de meme a
  obtenir un shell utilisable,  lancez  "kbd_mode  -a"  pour  sortir  le
  clavier  du mode direct, et/ou "stty sane" sur la console pour voir ce
  que vous tapez.

  Le plus simple est de se faire un script pour lancer dosemu, qui lance
  automatiquement  "kbd_mode  -a"  juste  apres  dosemu. Quand dosemu se
  plante, le script recupere la main et execute  la  commande  "kbd_mode
  -a".

  1111..22..  JJ''aaii mmiiss ddee ll''EEMMSS ddaannss ddoosseemmuu..ccoonnff, mais cela ne fait rien.

  Rob Janssen (rob@pe1chl.ampr.org) (11/07/94) :

  N'oubliez pasde charger ems.sys depuis le config.sys.

  1111..33..  CCoommmmeenntt mmee ddeebbaarraasssseerr ddee ttoouuss cceess mmeessssaaggeess ""ddiisskk cchhaannggee"?

  (11/08/94)

  Installez klogd.

        sunsite.unc.edu:/pub/Linux/system/Daemons/sysklogd1.2.tgz

  1111..44..  aapprreess eettrree rreevveennuu eenn mmooddee ccoonnssoollee??  PPoouurrqquuooii ddoosseemmuu refuse-t-il
  de se lancer une deuxieme fois

  Aldy Hernandez (aldy@sauron.cc.andrews.edu) (7/8/94) :

  Vous  devriez  desactiver le cache de votre carte video et/ou de votre
  BIOS.

  1111..55..  PPoouurrqquuooii ddoosseemmuu fonctionne-t-il dans un xterm mais pas  sur  la
  console?

  JyiJiin Luo (jjluo@casbah.acns.nwu.edu) expliquait le 19/04/94 :

  J'ai eu exactement le meme probleme. J'ai decouvert que tout le  cache
  de   la   memoire  video  devait  etre  invalide.  Maintenant,  dosemu
  fonctionne parfaitement.

  1111..66..  CCoommmmeenntt aacccceelleerreerr ddoosseemmuu?

  Dans certains cas, il peut etre  utile  de  jouer  avec  le  parametre
  HogThreshold dans dosemu.conf.

  Daniel Barlow(jo95004@sable.ox.ac.uk), 08/04/95

  HogThreshold  devrait etre positionne environ a la moitie du nombre de
  BogoMips donne au demarrage du syteme.

  1111..77..  MMoonn lleecctteeuurr ddee CCDD--RROOMM aa qquueellqquueeffooiiss ddeess pprroobblleemmeess ppoouurr  aacccceeddeerr
  aa cceerrttaaiinnss ffiicchhiieerrss ssoouuss ddoosseemmuu.

  Vinod G Kulkarni (vinod@cse.iitb.ernet.in) expliquait le 07/04/94 :

  Quand un CDROM  est  monte  depuis  Linux  et  utilise  depuis  dosemu
  (lecteur  redirige),  il peut y avoir quelques problemes. Le pilote de
  CDROM (iso9660) du noyau  tente  de  determiner  le  type  de  fichier
  (binaire  ou  texte).  S'il ne reussit pas, il essaye de determiner ce
  type en utilisant une methode heuristique. Cette methode  echoue  dans
  certains  cas, generalement quand un fichier texte est traite comme un
  fichier  binaire  (je  ne  sais  pas  si  c'est  un   bogue   ou   une
  fonctionnalite).

  Quoi  qu'il  en  soit,  il  en  resulte que la copie d'une tel fichier
  depuis le CDROM (depuis Linux lui-meme, et pas  necessairement  depuis
  dosemu)  genere un fichier cible generalement plus gros que le fichier
  source. (Des espaces sont ajoutes  avant  ^J,^M.)  C'est  pourquoi  un
  programme  tournant  sous  dosemu produit des messages d'erreurs ou se
  plante, ce qui peut etre pris, a  tort  ("t"),  pour  un  probleme  de
  dosemu.

  Rob Janssen (pe1chl@rabo.nl) (10/08/94) :

  La  solution  a  ce probleme est de desactiver la conversion. Utiliser
  l'option "-o conv=binary" a la commande mount pour  le  CDROM,  ou  la
  specifier dans /etc/fstab :

       /dev/cdrom /cdrom iso9660 conv=binary,ro

  Aucune modification du noyau n'est necessaire.

  1111..88..  CCoommmmeenntt oobbtteenniirr ddeess iinnffoorrmmaattiioonnss ddee ddeebboogguuaaggee??

  Daniel Barlow(jo95004@sable.ox.ac.uk), 08/04/95

  En  ce  qui  concerne  dosemu0.60,  les informations de deboguage sont
  stockes dans un fichier precise en argument sur la ligne de  commande.
  Utiliser  "dos  -D+a -o /tmp/debug" pour stocker tous les informations
  de deboguage dans /tmp/debug. Il ne devrait plus  y  avoir  besoin  de
  rediriger stderr.

  1111..99..   PPoouurrqquuooii  lleess  ccaarraacctteerreess  qquuee  jj''eennttrree  aauu  ccllaavviieerr  ssoonntt--iillss
  aaffffiicchheess ddddeeeeuuuuxxxx ffooiiss??

  Nick Holloway (alfie@dcs.warwick.ac.uk) expliquait le 22/02/94 :

  Apres  avoir  lance dos et apres avoir change quelques parametres avec
  stty,  j'avais  des  caracteres  en  double.  Je  peux  maintenant  en
  expliquer la raison !

  Cela  arrive  uniquement  lorsque  dos  est  lance sur la console avec
  istrip positionne. Je  pense  que  l'explication  est  que  les  codes
  clavier  bruts  sont  modifies  par  istrip,  de telle maniere que les
  evenement "relachement d'une touche" sont  vus  comme  des  evenements
  "appui sur une touche".

  Donc,  il  faut  que  istrip  ne soit pas positionne pour utiliser les
  codes claviers sur une console (ce ne serait pas une bonne  idee  pour
  les lignes tty).

  1122..  SSii vvoouuss vvoouulleezz ppaarrttiicciippeerr aauu pprroojjeett ddoosseemmuu

  1122..11..  QQuuii eesstt llee ccoooorrddiinnaatteeuurr ddee ddoosseemmuu?

  (3/18/94)

  dosemu  a  ete  concu d'apres le travail de Matthias Lautner et Robert
  Sanders.   James   B.   MacLean   (jmaclean@fox.nstn.ns.ca)   est   le
  coordinateur pour les prochaines versions de dosemu.

  1122..22..  HHiissttoorriiqquuee ddee ddoosseemmuu

      Version      Date                      Personne
      ---------------------------------------------------------------
      0.1          3 Septembre 1992          Matthias Lautner
      0.2          13 Septembre 1992         Matthias Lautner
      0.3          ???                       Matthias Lautner
      0.4          26 Novembre 1992          Matthias Lautner
      0.47         27 Janvier 1993           Robert Sanders
      0.47.7       5 Fevrier 1993            Robert Sanders
      0.48         16 Fevrier 1993           Robert Sanders
      0.48pl1      18 Fevrier 1993           Robert Sanders
      0.49         20 Mai 1993               Robert Sanders
      0.49pl2      18 Novembre 1993          James MacLean
      0.49pl3      30 Novembre 1993          James MacLean
      0.49pl3.3    3 Decembre 1993           James MacLean
      0.50         4 Mars 1994               James MacLean
      0.50pl1      18 Mars 1994              James MacLean
      0.52         16 Juin 1994              James MacLean
      0.60         9 Avril 1995              James MacLean

  1122..33..  JJ''aaiimmeerraaiiss ppaarrttiicciippeerr.. QQuuii ddooiiss--jjee ccoonnttaacctteerr??

  Le  projet  dosemu  est  un  travail  d'equipe.  Si  vous  souhaitez y
  participer, lisez le DPR (dosemu Project Registry). Il est  disponible
  par ftp dans dspsun.eas.asu.edu:/pub/dosemu.

  Le Howto sur les distributions de Linux
  Eric S. Raymond <esr@thyrsus.com>
  Traduction Jean-Albert Ferrez, <Jean-Albert.Ferrez@epfl.ch>
  v6.3, 8 Mai 1999

  Ce document vise  aider les nouveaux utilisateurs  choisir une dis
  tribution de Linux et les utilisateurs expriments  suivre l'tat du
  march de Linux. Il ne cherche pas  couvrir de manire exhaustive
  toutes les distributions pour toutes les plate-formes, mais vise par
  ticulirement les principales distributions en langue anglaise pour
  INTEL disponibles sur CD-ROM et accessibles aux nophytes.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Nouvelles versions de ce document
     1.2 Changements rcents
     1.3 Aperu du march Linux
     1.4 Recommandations de l'diteur

  2. Les distributions Linux

     2.1 Caldera OpenLinux
     2.2 La distribution Linux de Debian
     2.3 Linux Pro
     2.4 Red Hat Linux
     2.5 Trans-Ameritech Linuxware
     2.6 Slackware
     2.7 S.u.S.E.

  3. Soumissions  ce document

     3.1 Types de soumissions
     3.2 Comment soumettre une entre
     3.3 Instructions pour la soumission

  4. Aspects administratifs

     4.1 Conditions d'utilisations
     4.2 Remerciements


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Il n'existe pas une distribution unique de Linux, mais plusieurs,
  disponibles aussi bien par FTP anonyme que par correspondance sur CD-
  ROM.

  Le but de ce document est de prsenter brivement les distributions de
  Linux sur CD-ROM en langue anglaise et de fournir au lecteur des
  pointeurs vers de plus amples informations. Un Howto sur les
  distributions de Linux en langue allemande a eu t gr par Marco
  Budde mais semble avoir disparu.  Il n'y a pas  notre connaissance de
  distributions de Linux dans d'autres langues.

  L'information prsente ici n'est pas complte. Il existe d'autres
  distributions Linux que celles qui sont cites ici. De par la nature
  du logiciel libre, quiconque peut changer quelque chose dans son
  installation de Linux. En mettant ces changements  disposition des
  autres, il en fait d'une certaine manire "une distribution". Un
  document comme celui-ci doit donc imposer une certaine limite. J'ai
  choisi le critre : "disponible sur CD", ce qui ne constitue en aucun
  cas une dfinition d'une distribution de Linux. Il y a un grand nombre
  de petites distributions qui offrent des choses que les grandes n'ont
  pas, notamment la concision.

  L'information prsente ici n'est pas complte. Il existe d'autres
  distributions Linux que celles qui sont cites ici. Si vous tes
  associs  une distribution sur CD-ROM que nous ne citons pas,
  veuillez consulter  la section ``Soumissions  ce document'' vers la
  fin de ce document les instructions pour soumettre une information.
  C'est facile et ne devrait pas prendre plus de cinq minutes.

  Pour une liste plus complte de distributions (mais avec moins
  d'informations sur chacune d'elles), se rfrer  la Linux HQ
  Distributions List <http://www.linuxhq.com/dist-index.html>.

  DDnnggaattiioonn :: Nous n'offrons absolument _a_u_c_u_n_e garantie sur
  l'exactitude des informations, prix et dtails de commande donns dans
  ce document. Vrifiez la date de dernire modification d'une entre
  pour avoir une ide de son actualit, puis allez  la page web du
  vendeur pour des informations  jour. De plus, sauf avis contraire,
  Linux est fourni _S_A_N_S _A_U_C_U_N_E _G_A_R_A_N_T_I_E.

  Votre diteur essaye de s'en tenir aux faits dans la plupart de ce
  Howto, mais il a ses ides sur l'tat du march Linux. Si elles vous
  intressent, vous les trouverez  la section ``Recommandation de
  l'diteur''.

  DDiivvuullggaattiioonn :: Je (esr) n'ai aucun lien financier avec un quelconque
  vendeur Linux, ni n'ai accept de rmunration ou de condition de la
  part d'un vendeur en dehors d'un produit gratuit  l'essai (et un T-
  shirt de Red Hat).


  11..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Ce document est post une fois par mois sur le newsgroup
  comp.os.linux.answers . Il est archiv sur de nombreux sites FTP
  Linux, notamment metalab.unc.edu dans pub/Linux/docs/HOWTO.

  Vous trouverez galement la dernire version de ce Howto sur le web 
  l'adresse  <http://metalab.unc.edu/mdw/HOWTO/Distribution-HOWTO.html>.

  La traduction franaise est poste une fois par mois sur le newsgroup
  fr.comp.os.linux.annonces. Il est archiv entre autre sur ftp.lip6.fr
  dans /pub/linux/french/docs/HOWTO/. Il est galement disponible sur le
  web  l'adresse  <http://www.freenix.fr/linux/HOWTO/>.

  N'hsitez pas  transmettre toute question ou commentaire  propos de
  ce Howto  Eric S. Raymond, esr@snark.thyrsus.com. Veuillez ne _p_a_s me
  poser de questions gnrales  propos de Linux ni me demander de
  l'aide dans le choix d'une distribution  moins que vous ne soyez
  disposs  me payer au tarif habituel. Je n'ai pas le temps d'y
  rpondre, et j'ai mis tout ce que je sais sur le choix d'une
  distribution dans ce document.


  11..22..  CChhaannggeemmeennttss rrcceennttss

  Yggdrasil Plug-And-Play et Craftworks Linux ne semblent plus tre
  diponible  la vente, et on t otes de ce document. DOSLINUX a
  galement t omise  cause de sa nature particulire.




  11..33..  AAppeerruu dduu mmaarrcchh LLiinnuuxx

  Au dbut (disons, en 1993), une distribution Linux tait quelque chose
  que l'on tlchargeait d'Internet sur des disquettes. L'installation
  tait un processus laborieux et les frustrations rptes lies aux
  supports dfectueux taient la mesure.

  Ensuite vinrent les lecteurs de CD-ROM bon march et le CD-ROM, un
  mdia parfaitement adapt  l'expdition peu onreuse de gros volumes
  de logiciels de systmes d'exploitation. Toute une mini-industrie
  s'est cre autour des CD-ROM Linux commerciaux, et (puisque les
  vendeurs disposent de fonds pour le support et le marketing) ces CD-
  ROM dominent de plus en plus le monde Linux. Debian est dsormais la
  seule distribution non-commerciale d'une certaine importance, et mme
  elle semble tre propage dans une grande mesure par les CD-ROM
  d'talage.

  La plupart des distributions sur CD-ROM (y compris Slackware,
  Yggdrasil et Red Hat) sont toujours disponibles par FTP depuis les
  sites de leurs dveloppeurs. Mais si vous avez un lecteur de CD-ROM et
  quelques dollars, vous aurez un plus grand ventail de distributions
  et de supports pour effectuer votre choix (et vous recevrez
  probablement une documentation papier trs utile). Pour les dtails
  lis  l'installation proprement dite, consultez le Howto sur
  l'installation de Linux,
  <http://metalab.unc.edu/mdw/HOWTO/Installation-HOWTO.html>, en
  franais   <http://www.freenix.fr/linux/HOWTO/Installation-
  HOWTO.html>.

  Le prix de ces distributions de Linux pour processeurs Intel varie de
  $20  $50 (la diffrence peut tre tout  fait justifie).  Plusieurs
  vendeurs proposent des abonnements qui abaissent le cot par CD pour
  les mises  jour durant la priode concerne.

  Les prix sont assez bien corrls avec les caractristiques et les
  qualits (comme on peut s'y attendre dans un march  haute
  concurrence). Votre diteur vous recommande de payer quelques dollars
  de plus pour un CD-ROM d'un distributeur de premier ordre. Ils seront
  rentabiliss au travers de bien moins de rinstallations et problmes
  au fil du temps.

  Il est devenu plus facile de faire de bons choix. En 1995-96 le march
  de Linux a subi un profond changement. Un petit nombre de
  distributions commerciales ont merg en leaders alors que des autres,
  plus faibles, ont disparu ou stagnent. La cure a t encore pire
  parmi les distributions non-commerciales; en fait, il n'y a que Debian
  qui survive dans ce rle.

  Par consquent, l'ancienne structure en trois tiers compose des
  crateurs de distributions, des redistributeurs  valeur ajoute et
  des vendeurs de CD  la pelle qui dfinissait le march  quasiment
  disparu. Pour tre comptitive en 1997, une version de Linux - qu'elle
  soit commerciale ou non - se doit d'offrir un support digne de ce nom
  et doit se comporter en crateur majeur de distribution, mme si elle
  n'en est pas une. Donc, si vous faites attention  ce qu'une
  distribution ait t gele rcemment, vous ne risquez pas beaucoup de
  vous retrouver avec une distribution nulle.


  11..44..  RReeccoommmmaannddaattiioonnss ddee ll''ddiitteeuurr


  Ci-dessus les faits, ici mes opinions (pour ce qu'elles valent, et
  avec les prcautions d'usage des conseils gratuits). Rien ne
  remplacera votre propre valuation base sur votre exprience et les
  donnes de ce guide. Mes opinions sont ici davantage pour expliquer
  mes ventuelles tendances que pour vous guider.

  Des dbuts de l'industrie du CD-ROM Linux en 1993 jusqu'en automne
  1995, Yggdrasil tait le roi. Ils ont en fait fond le march puis
  tabli les standards pour les autres. J'ai utilis Yggdrasil et l'ai
  recommand par rapport aux System V commerciaux pour sa documentation
  suprieure, sa vaste collection d'applications et sa politique avise
  d'envoi d'exemplaires gratuits aux auteurs de logiciels libres et de
  support du logiciel libre par une partie du prix de chaque CD-ROM.
  Mais Yggdrasil n'a pas sorti de nouvelle version depuis 1995 et ils
  ont t dpasss par le march.

  J'utilise maintenant Red Hat Linux et en suis passablement satisfait.
  Leur technologie RPM leur donne  l'heure actuelle,  mon avis, une
  longueur d'avance technologique sur tous les autres vendeurs. Ils ont
  fait la plupart des bons choix aux bons moments et je les considre
  comme les leaders actuels du march.

  Si pour des motifs idologiques vous tenez  utiliser une distribution
  non-commerciale, il me semble que Debian soit le bon choix, la seule
  en tout cas qui garde une bonne quipe de support.

  Ces opinions ne doivent en aucun cas tre considres comme
  incontournables. Les diverses distributions Linux sont optimises en
  fonction de divers besoins, et les vtres peuvent trs bien tre mieux
  servis par une autre (en particulier si contrairement  moi vous tes
  plutt un utilisateur de DOS et cherchez une distribution prvue pour
  cohabiter avec).

  De plus, le status de l'industrie est trs volage. Au moment o vous
  lirez ces lignes, Red Hat ou Debian peuvent trs bien avoir coul,
  remplacs par de nouveaux venus aux dents longues.


  22..  LLeess ddiissttrriibbuuttiioonnss LLiinnuuxx

  Toutes ces distributions sont disponibles sur CD-ROM (certaines parmi
  les non-commerciales n'apparaissent que sur les CD-ROM des sites
  archives). La majeure partie est disponible gratuitement par le rseau
  (mais les commerciales ne vous donnent dans ce cas pas accs au
  support). Elles sont spcifiquement assembles et non pas simplement
  redistribues  partir d'une distribution existant sur le rseau.

  Elles sont listes par ordre alphabtique.


  22..11..  CCaallddeerraa OOppeennLLiinnuuxx


     DDiissttrriibbuutteeuurr ::
        Caldera, Inc.
        633 South 550 East
        Provo, Utah 84606

        Net : info@caldera.com
        WWW :  <http://www.caldera.com>
        FTP :  <ftp://ftp.caldera.com>
        Tel : (801)-377-7678
        Fax : (801)-377-8752


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        Caldera commercialise OpenLinux 1.2 sous la forme d'une famille
        de trois produits  : OpenLinux Lite, OpenLinux Base, et
        OpenLinux Standard.

        OpenLinux Lite est une version gratuite d'valuation d'OpenLinux
        (elle inclut une licence d'valuation de 90 jours du "Caldera
        integrated Desktop" - une licence complte est incluse dans les
        produits Base et Standard). OpenLinux Lite peut tre tlcharg
        depuis le site FTP de Caldera ou obtenu sur CD pour l'quivalent
        des frais d'expdition. Il est aussi prvu pour tre utilis par
        les diteurs de livres et de logiciels qui veulent offrir un
        Linux commercialement stable avec leurs produits.

        OpenLinux Base contient tout ce qui se trouve dans Lite et est
        un systme Linux complet, facile  installer, avec un bureau
        intgr, des clients et serveurs Internet et Intranet. OpenLinux
        Base inclut Netscape Navigator et une documentation complte.

        OpenLinux Standard inclut outre ce qui se trouve dans Base des
        produits commerciaux de haut niveau et de marque (tels que
        Netscape FastTrack Web Server, Netscape Navigator Gold Web
        browser and authoring tools, ADABAS D database, StarOffice
        productivity suite, Caldera OpenDOS, et NetWare client and
        administration tools).

        Les trois versions d'OpenLinux sont actuellement disponibles en
        version 1.2

        Avec Caldera OpenLinux, vous avez accs  un monde informatique
        nouveau et performant, mme la puissance d'une station de
        travail UNIX sur votre PC !  En utilisant un noyau Linux,
        OpenLinux vous offre une rapidit et une stabilit qui tiennent
        la comparaison avec des systmes cotant des miliers de dollars.
        OpenLinux vous offre aussi  :


       Un vritable multitche excutant plusieurs applications textes
        ou graphiques en mme temps, aucune application ne peut planter
        une autre, contrairement  d'autres systmes moins robustes.

       Le noyau Linux 2.0 offre un accs TCP/IP  Internet super
        rapide, ainsi que des pilotes de priphriques chargeables pour
        l'utilisation la plus efficace des ressources de votre systme.

       Une installation rapide et simple avec des menus et la dtection
        automatique de votre matriel rendent l'installation trs facile
        sur la plupart des systmes. Le Getting Started Guide (inclus)
        propose une marche  suivre illustre et des conseils de
        dpannage.

        Aucun autre systme Linux n'inclut un bureau intgr complet
        avec des outils de configuration et un diteur graphique. Ses
        possibilits de glisser-dposer sont dj configures avec des
        milliers d'icnes et de rglages. Le bureau offre un espace
        pratique o vous pouvez dposer vos programmes et fichiers de
        donnes favoris pour un accs immdiat. Le bureau vous offre  :


       Dmarrage des programmes par glisser-dposer des documents.

       Un diteur de textes graphique intgr.

       L'accs facile  un ensemble d'outils puissants de configuration
        du systme.

       Une barre d'icnes configurable, une disposition personnalise
        et la slection des prfrences.

       Un puissant gestionnaire de fichiers utilisant le glisser-
        dposer ou des botes de dialogues graphiques.
     CCoommmmaannddee ::
        Par email avec cl PGP, par tlphone, par fax ou par
        correspondance.  Dtails complets 
        <http://www.caldera.com/mpro/orinfo/orderinfo.html>.


     SSuuppppoorrtt ::
        Caldera est l'un des seul distributeurs Linux  offrir un
        support par E-mail et par tlphone. Les utilisateurs de
        OpenLinux Base (seulement E-mail) et Standard (tlphone et E-
        mail) ont un support complet. (Les utilisateurs de la version
        standard ont droit  5 appels gratuit durant les 30 premiers
        jours). Il n'y a pas de support pour la version Lite.

        OpenLinux Base et Standard comprennent une version complte de
        Caldera Desktop, avec une licence illimite. OpenLinux Lite
        comprend une version d'valuation du Desktop valable 90 jours.


     DDaattee ddee ddeerrnniirree mmooddiiffiiccaattiioonn ::
        mai 1998 (?)


     DDeerrnniirree mmooddiiffiiccaattiioonn ddee ll''eennttrree ::
        13 aot 1998


  22..22..  LLaa ddiissttrriibbuuttiioonn LLiinnuuxx ddee DDeebbiiaann


     DDiissttrriibbuutteeuurr ::
        Software in the Public Interest, Inc.  PO Box 1326
        Boston, Ma. 02117 USA


        Net : info@debian.org
        WWW :  <http://www.debian.org>
        FTP :  <ftp://ftp.debian.org/debian>


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        Debian Linux est le rsultat d'un effort volontaire de crer une
        distribution Linux non-commerciale de haute qualit. Debian
        Linux 2.0 est un systme d'exploitation compatible UNIX complet
        et oprationnel pour ordinateurs personnels. Le systme utilise
        des excutables ELF ainsi que la libc6 (contrairement aux
        versions prcdentes qui utilisaient la libc5).  Pour l'instant,
        Debian Linux est disponible pour l'architecture IBM PC
        (386/486/Pentium) et m68k, les versions pour Sparc et Alpha
        tant promises pour 2.1. Des versions pour ARM, PPC et
        UltraSparc sont en cours.

        Debian Linux est une distribution facile  mettre  jour qui
        comprend principalement des logiciels librement redistribuales
        provenant de divers sources et systmes. Le support des shadow
        passwords est disponible, bien qu'il doit tre considr comme
        exprimental dans la version 1.1. Des paquetages non libres
        peuvent galement tre obtenus, ce qui fait de Debian un systme
        complet.

        Les avantages de Debian Linux sont son volutivit,
        l'interdpendance bien tablie entre les paquetages et son mode
        de dveloppement ouvert. Elle est la seule distribution de Linux
        a tre dveloppe en coopration par plusieurs personnes via
        Internet, dans le mme esprit que Linux et d'autres systmes
        "open source". Plus de 400 personnes maintiennent  jour environ
        1500 paquetages et amliorent Debian Linux. Un systme
        sophistiqu de suivi de bogues permet aux utilisateurs de
        soumettre facilement bogues et problmes de scurit, qui sont
        rapidement pris en charge par la communaut Debian. Une nouvelle
        version du paquetage arrivera bientt sur les sites archives FTP
        connus.

        Debian Linux est une distribution trs dynamique. Des versions
        "instantanes" sont faites  peu prs tous les trois mois, les
        archives FTP sont mises  jour quotidiennement.

        Pour plus d'informations sur Debian Linux, veuillez consulter
        les fichiers   <ftp://ftp.debian.org/debian/doc/> ou visiter
        nos pages World Wide Web  <http://www.debian.org/>.

        Si vous tes intresss  rejoindre ce projet, vous tes invits
         vous abonner aux listes debian-user@lists.debian.org ou
        debian-devel@lists.debian.org en envoyant un mail  debian-user-
        request@lists.debian.org (resp. debian-devel-request) avec le
        mot "help" dans le sujet.


     AAccccss ppaarr IInntteerrnneett ::
        Debian Linux est disponible par FTP anonyme depuis
        <ftp://ftp.debian.org/debian/> ou sur un miroir plus proche. En
        France :  <ftp://ftp.lip6.fr/toto/>


     DDaattee ddee ddeerrnniirree mmooddiiffiiccaattiioonn ::
        24 juillet 1998 (2.0)


     DDeerrnniirree mmooddiiffiiccaattiioonn ddee ll''eennttrree ::
        13 aot 1998


  22..33..  LLiinnuuxx PPrroo


     DDiissttrriibbuutteeuurr ::
        WorkGroup Solutions, Inc.
        P.O. Box 460190
        Aurora, CO 80046-0190

        Tel : (303)-699-7470
        Fax : (303)-699-2793
        Net : info@wgs.com (commandes)
        FTP :  <ftp://ftp.wgs.com/pub2/wgs>


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        La charte du CD Linux Pro de WGS est diffrente des autres
        distributions sur le march. Nous nous efforons de faire
        pntrer Linux dans le march commercial. Tout ce que nous
        faisons vise  augmenter la taille de la comunaut Linux et 
        aider Linux  devenir LE seul vritable systme d'exploitation,
        et non pas un parmi d'autres.

        WGS Linux Pro consiste en notre principal CD Linux "Stable",
        pour lequel nous slectionnons ce que nous considrons comme
        tant la meilleure distribution disponible. Ensuite, nous
        procdons  des corrections de bogues et autres amliorations
        mineures. Ce CD contient souvent des logiciels qui n'en sont pas
         leur dernire version,  l'gide du principe selon lequel "le
        plus rcent n'est pas toujours le meilleur". En plus de cette
        approche, nous offrons un support technique ainsi que des
        contrats de maintenance. Pour cette raison, WGS Linux Pro est
        considre comme une distribution Linux primaire. En option,
        outre notre CD principal, nous offrons des CD supplmentaires
        avec tous les logiciels Linux les plus rcents (notemment des
        archives  jour des sites tsx-11, metalab et Red Hat).
        Pratiquement tout ce que vous pouvez trouver dans n'importe quel
        produit Linux se trouve sur ces CD supplmentaires. Nous
        compltons ces CD au fur et  mesure que de nouveaux logiciels
        sont disponibles. Mme avec tout cela, les prix de nos produits
        sont trs favorables si on les compare correctement avec
        d'autres distributions. En option (inclus avec Linux Pro+) nous
        offrons galement un manuel produit et imprim
        professionnellement contenant le projet de documentation Linux
        et mme plus !

        La version actuelle est la 4.0a, le noyau est le 1.2.13 et le
        2.0.x est sur le CD prt  tre install.


     AAccccss ppaarr IInntteerrnneett ::
        La liste des produits de WGS et les dernires informations 
        propos du CD-ROM se trouvent   <http://www.wgs.com>.


     CCoommmmaannddee ::
        WGS Linux Pro est disponible sur CD chez les vendeurs et
        distributeurs du monde entier, et bientt sur notre site FTP.

        Vous pouvez nous contacter par tlphone, fax, email ou nous
        crire pour acheter ou avoir plus d'information. Nous nous
        rjouissons de rpondre  vos questions. Nous acceptons American
        Express, Visa, Discover, et MasterCard.


     DDiivveerrss ::
        De plus amples informations sont disponibles sur notre site FTP.

        WGS publie par E-mail un magazine gratuit sur Linux et FlagShip
        auquel vous pouvez vous abonner sur une simple demande par E-
        mail.

        Nous avons galement  notre catalogue Motif, FlagShip, des
        livres, et d'autres produits rendant votre exprience de Linux
        plus complte et enrichissante. Venez nous voir !


     DDaattee ddee ddeerrnniirree mmooddiiffiiccaattiioonn ::
        1 octobre 1996.


     DDeerrnniirree mmooddiiffiiccaattiioonn ddee ll''eennttrree ::
        13 mars 1997


     CCoommmmeennttaaiirree ddee ll''ddiitteeuurr ::
        Ils qualifient leur distribution actuelle de "Red Hat 3.03
        plus".


  22..44..  RReedd HHaatt LLiinnuuxx


     DDiissttrriibbuutteeuurr ::
        Red Hat Software
        3201 Yorktown Rd, Suite 123 DeKalb Center
        Durham, NC 27713
        Tel : (800) 546-7274 or (919) 572-6500
        Fax : (919) 572-6726
        Net : redhat@redhat.com
        WWW :  <http://www.redhat.com>
        FTP :  <ftp://ftp.redhat.com>


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        Red Hat 6.0 est base sur le noyau 2.2 et est disponible pour
        les platformes Intel, Sparc et Alpha.

        Quatre inovations font de Red Hat la distribution Linux la plus
        facile  installer de tous les temps. Notre mode d'installation
        graphique vous emmne directement sous X pour la grande partie
        de l'installation. Notre script de cration de disquette de
        dmarrage en facilite la slection et sauvegarde votre
        configuration rseau ainsi que votre XF86Config  : vous n'avez
        plus besoin de reconfigurer TCP/IP ou X ! Notre programme
        d'installation par FTP vous permet de ne tlcharger que 3
        images de disquettes -- le reste est fait automatiquement ! Et
        finalement, l'installation inclut le support des priphriques
        PCMCIA -- l'installation de Red Hat sur votre portable est aussi
        facile que sur votre machine de bureau !

        Aprs avoir install Red Hat une fois, vous n'aurez plus jamais
        besoin de rinstaller Linux ! le nouveau systme de paquetages
        RPM est suffisamment sophistiqu pour vous permettre de passer 
        une nouvelle version de Red Hat sans devoir tout rinstaller :
        plus de partitionnement, de backup, de prise de tte.


     CCoommmmaannddee ::
        Disponible directement auprs de Red Hat Software et de la
        plupart des distributeurs de produits relatifs  Linux. Veuillez
        contacter Red Hat Software pour les conditions de commandes (il
        est possible de commander en ligne depuis le site web de Red
        Hat). Les prix indiqus sont de $49.95 pour la version Intel et
        de $99.95 pour les versions Sparc et Alpha.


     DDaattee ddee ddeerrnniirree mmooddiiffiiccaattiioonn ::
        10 mars 1999.


     DDeerrnniirree mmooddiiffiiccaattiioonn ddee ll''eennttrree ::
        7 juin 1999.


     CCoommmmeennttaaiirree ddee ll''ddiitteeuurr ::
        Le gros avantage de cette distribution, c'est RPM, le Red Hat
        Package Manager. Ce logiciel marque un net progrs; il permet
        d'installer et de ds-installer proprement des applications et
        des composants du systme, y compris le noyau et la base du
        systme elle-mme. RPM est dsormais utilis par la plupart des
        autres distributions mis  part Debian.


  22..55..  TTrraannss--AAmmeerriitteecchh LLiinnuuxxwwaarree


     DDiissttrriibbuutteeuurr ::
        Trans-Ameritech
        2342A Walsh Avenue
        Santa Clara, CA 95051

        Net : info@trans-am.com
        WWW : http://www.zoom.com/tae
        Tel : (408)-727-3883
        Fax : (408)-727-3882
        BBS : (408)-980-9840


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        Trans-Ameritech a publi 10 versions de Linux jusqu'au dbut
        1997. Trans-Ameritech a traditionellement dfini de nouveaux
        standards combinant simplicit d'utilisation et facilit
        d'installation, mme pour un utilisateur dbutant, avec sa ligne
        de CD-ROM LinuxWare. C'est un systme d'exploitation souple et
        facile  installer, destin aussi bien  ceux qui veulent
        apprendre Unix qu'aux techniciens, tudiants et utilisateurs
        domestiques.


       Les nouveaux utilisateurs apprcieront le programme de
        configuration prsent sur le CD, bas sur Windows.

       Pour minimiser les conflits matriels potentiels de nombreux
        noyaux sont fournis pour diverses configurations. Ils peuvent
        tre utiliss aussi bien pour l'installation qu'en exploitation
        normale.

       De nombreux documents sont fournis en ligne pour des rfrences
        rapides, notamment les textes du Linux Documentation Project
        dans les formats source, dvi et ps.

        De nombreuses applications sont fournies  :


       Un programme de configuration de X fonctionnant sous MS-Windows

       Des compilateurs C/C++, Pascal et Ada et un convertisseur pour
        le Fortran

       Le support rseau TCP/IP, avec UUCP, SLIP, CSLIP, PPP

       L'accs  Internet avec des binaires et des sources pour FTP,
        Telnet, News et E-mail

       De multiple terminaux et l'environnement X-Window

       Les versions GNU internationales du correcteur orthographique
        ispell

       Les applications de communication  : term, minicom, Seyon (sous
        X-Windows)

       Editeurs  : elvis (clone de vi), joe, jove, Emacs

       ghostscript, le clone de PostScript

       GNU Smalltalk orient objet et son interface pour X

       TCL/Tk (puissant langage de scripts avec une interface X  la
        Motif)

       Des programmes pour les ingnieurs lectriciens et les amateurs
        de HAM

       Les librairies et fichiers en-tte Interviews ainsi que les
        programmes doc (traitement de texte) et idraw (dessin)


       Mise en page  : TeX, LaTeX, xdvi, dvips, Metafont, groff

       Le traitement de texte multimdia Andrew

       L'envoi et la rception de FAX, avec un modem fax class 1 ou 2

       DOOM pour les amateurs de jeux

        Toutes les sources sont disponibles sur le CD-ROM. Les plus
        frquemment utilises sont dcompresses et peuvent tre
        utilises directement depuis le CD-ROM.

        Un systme de fichier Linux dcompress est disponible pour
        rfrence et conomie de place disque. Vous pouvez excuter des
        programmes directement depuis le CD-ROM. Il y a un gros
        rpertoire info pour les documents en ligne ainsi que les pages
        du manuel.

        Les sources dcompresses de FreeBSD et NetBSD sont fournies 
        titre de rfrence.

        Notre distribution est destine aux utilisateurs de Windows et
        DOS qui veulent une migration en douceur, plutt qu'aux experts
        UNIX.


     CCoommmmaannddee ::
        Les commandes par Email sont accepte  order@trans-am.com

        Le prix de la version actuelle de LinuxWare 2.5 est de $19.95

        Le prix d'un paquet comprenant LinuxWare 2.5, Supplement 5 et
        Supplement 4 (Ultimate LinuxWare Bundle) (en un envoi) est de
        $30

        Si vous commandez avec une carte de crdit (VISA, MC, AmEx,
        Discovery), veuillez indiquer le numro de la carte, la date
        d'expiration ainsi que votre adresse.

        Les frais d'emballage et de port aux USA pour un CD-ROM ou pour
        l'Ultimate LinuxWare Bundle s'lvent  $5 (first class US
        mail).

        Les frais de port pour l'envoi outre-mer sont de $8 pour un seul
        CD-ROM, et de $12 pour le bundle.

        Les rsidents de l'Etat de Californie doivent ajouter 7.75% de
        taxes.

        Un abonnement d'une anne (4 sorties) est disponible pour $80
        plus port et emballage (note : il y a 4 envois dans
        l'abonnement). Exemple  : abonnement aux USA  : $80 + $5x4 =
        $100; abonnement en Europe/Japon, etc.  : $80 + $8x4 = $112.


     DDiivveerrss ::
        Si vous avez d'autres questions, veuillez nous contacter par
        Email  : info@trans-am.com or order@trans-am.com.


     DDaattee ddee ddeerrnniirree mmooddiiffiiccaattiioonn ::
        Janvier 1997 (Supplement 5)


     DDeerrnniirree mmooddiiffiiccaattiioonn ddee ll''eennttrree ::
        13 aot 1998
  22..66..  SSllaacckkwwaarree


     DDiissttrriibbuutteeuurr ::
        Walnut Creek CDROM
        4041 Pike Lane, Suite D
        Concord, CA  94520

        Net : info@cdrom.com (information), order@cdrom.com (commandes),
        support@cdrom.com (support).


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        Slackware Linux se trouve sur ftp.cdrom.com. Nous publions le
        CDROM Slackware Linux officiel. Notre distribution est un jeu de
        4 disques, la version courante est Slackware 96, base sur le
        noyau 2.0.34.

        Slackware Linux est une distribution complte du systme
        d'exploitation Linux prvue pour des ordinateurs 386/486 avec un
        lecteur de disquette 3.5" et un lecteur de CD-ROM.


     AAccccss ppaarr IInntteerrnneett ::
        WWW :  <http://www.cdrom.com/titles/os/slack96.htm>
        FTP :  <ftp:ftp.cdrom.com/pub/linux/slackware>


     CCoommmmaannddee ::
        Le cot du set de CD-ROM de Walnut Creek est de $39.95.


     DDaattee ddee ddeerrnniirree mmooddiiffiiccaattiioonn ::
        juillet 1998 (3.5)


     DDeerrnniirree mmooddiiffiiccaattiioonn ddee ll''eennttrree ::
        13 aot 1998



  22..77..  SS..uu..SS..EE..


     DDiissttrriibbuutteeuurr ::
        S.u.S.E., Inc.
        458 Santa Clara Ave
        Oakland CA 94610 USA

        Net : info@suse.com
        WWW :  <http://www.suse.com>
        FTP :  <ftp://ftp.suse.com>
        Tel : +1-510-835-7873
        Fax : +1-510-835-7875


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        Linux S.u.S.E. offre aux utilisateurs de tous niveaux, du
        nophyte  l'expert, un accs facile et rapide aux mondes de
        Linux et d'Unix. Des ressources telles qu'une installation via
        des menus depuis le CD-ROM, une disquette de dmarrage
        modulaire, un livre de rfrence de 400 pages et un outil
        d'administration systme propre  S.u.S.E, YaST, permettent de
        mettre sur pied un systme Linux rapidement et de le maintenir
        au cours du temps.

        En outre S.u.S.E. offre une srie de serveurs X supportant les
        cartes les plus rcentes. Ces serveurs sont dvelopps en
        coopration avec l'quipe de XFree86 (tm). Vous trouverez plus
        de dtails  l'URL  <http://www.suse.de/XSuSE>.

        Nouveauts de S.u.S.E. Linux 5.3 :


       Noyau 2.0.35

       KDE 1.0

       Gimp 1.0

       SaX (outil de configuration avanc de XF86)

        Bref aperu des autres possibilits :


       Le systme Linux, plus de 875 packages logiciels parmi lesquels
        les sources compltes et un systme de fichier oprationnel, sur
        4 CD-ROMs

       Livre de rfrence de 400 pages

       Packages au format RPM; les packages TGZ peuvent tre installs

       Concept de boot compatible System V, respect du "file system
        standard"

       Utilitaire d'installation et d'administration, 'YaST' pour
        configurer le rseau, ISDN, e-mail, l'imprimante, le systme X
        Window

       Les serveurs X S.u.S.E. qui supportent les nouvelles cartes

       Administration des systmes de fichiers, utilisateurs et groupes

       Configuration automatique de plusieurs "window managers"

       Aide et documentation en ligne

       Mode dmo, depuis le CD-ROM ou une partition DOS


     CCoommmmaannddee ::
        Tlchargeable depuis  <ftp://ftp.suse.com/pub/SuSE-Linux>.
        Pour le CD-ROM avec support, par tlphone, WWW scuris, fax ou
        poste. Le prix est $49.95, ou $34.95 par version avec un
        abonnement. Version anglaise code LSUE520, version allemande
        code LSUD520.

        galement disponible : OSF Motif 2.1 pour $129.95 (prix pour la
        mise  jour pas encore fix), code LMEA210


     SSuuppppoorrtt ::
        60 jours de support d'installation gratuit sont compris avec
        chaque achat de Linux S.u.S.E.. Consulter la page web pour les
        conditions.


     DDaattee ddee ddeerrnniirree mmooddiiffiiccaattiioonn ::
        pas connue.


     DDeerrnniirree mmooddiiffiiccaattiioonn ddee ll''eennttrree ::
        13 aot 1998 (5.3)


  33..  SSoouummiissssiioonnss  ccee ddooccuummeenntt


  J'encourage tous ceux qui maintiennent une distribution Linux ou un
  service de vente par correspondance  soumettre les informations y
  relatives pour ce Howto. C'est facile, amusant et constitue une
  publicit gratuite. Ce document est distribu dans de nombreux
  endroits et archiv (voir la section suivante).


  33..11..  TTyyppeess ddee ssoouummiissssiioonnss

  Nous sommes intresss par des soumissions concernant  :


    Des distributions compltes de Linux, disponibles par FTP anonyme,
     UUCP ou par correspondance. Par 'distribution complte' on entend
     un ensemble pouvant tre utilis pour construire un systme Linux
     _e_x_-_n_i_h_i_l_o.

    Des composants ou des logiciels  part entire disponibles
     uniquement par correspondance. Si vos paquetages sont disponibles
     par FTP anonyme, les gens peuvent les trouver. Cette catgorie
     inclut notamment les logiciels commerciaux ports sous Linux tels
     que Motif.

    Tout autre produit _s_p__c_i_f_i_q_u_e _ _L_i_n_u_x disponible par
     correspondance, tel que livre et documentation, T-Shirts et autres.
     Mais attention  : notre intrt pour ces produits est marginal -
     ceci reste le Howto sur les distributions Linux, pas un catalogue
     de gadgets Linux djants. Ce que vous vendez devra tre (a) trs
     utile, (b) trs original ou (c) trs drle pour apparatre ici.

  Si le nombre de soumissions pour des services et composants le
  justifie, je crerai un Howto spar.


  33..22..  CCoommmmeenntt ssoouummeettttrree uunnee eennttrree

  Pour soumettre une entre dans ce Howto, envoyez un mail 
  esr@snark.thyrsus.com avec les informations suivantes. Ce format n'est
  pas trait automatiquement, chaque champ peut tre aussi long que
  ncessaire, mais j'aimerais garder chaque entre en de d'environ 50
  lignes.


     NNoomm ::
        _N_o_m _d_u _s_e_r_v_i_c_e _o_u _d_e _l_a _d_i_s_t_r_i_b_u_t_i_o_n_.


     DDiissttrriibbuutteeuurr ::
        _N_o_m _d_e _l_a _s_o_c_i__t__, _p_e_r_s_o_n_n_e_, _e_t_c_._._. _q_u_i _d_i_s_t_r_i_b_u_e_/_m_a_i_n_t_i_e_n_t _l_e
        _s_e_r_v_i_c_e _o_u _l_a _d_i_s_t_r_i_b_u_t_i_o_n_. _D_e_v_r_a_i_t _i_n_c_l_u_r_e _u_n_e _a_d_r_e_s_s_e _p_o_s_t_a_l_e_,
        _u_n_e _a_d_r_e_s_s_e _E_m_a_i_l_, _n_o_. _d_e _t__l__p_h_o_n_e_, _f_a_x _e_t _s_i _p_o_s_s_i_b_l_e _u_n_e
        _a_d_r_e_s_s_e _W_W_W_.


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        _D_e_s_c_r_i_p_t_i_o_n _d_e _l_a _d_i_s_t_r_i_b_u_t_i_o_n _o_u _d_u _s_e_r_v_i_c_e _q_u_e _v_o_u_s _o_f_f_r_e_z_.
        _S_'_i_l _s_'_a_g_i_t _d_'_u_n_e _d_i_s_t_r_i_b_u_t_i_o_n _l_o_g_i_c_i_e_l_l_e_, _i_n_d_i_q_u_e_z _q_u_e_l_s
        _p_r_o_g_r_a_m_m_e_s _(_e_t _q_u_e_l_l_e_s _v_e_r_s_i_o_n_s_) _s_o_n_t _i_n_c_l_u_s_, _u_n_e _d_e_s_c_r_i_p_t_i_o_n
        _g__n__r_a_l_e _d_e _l_'_i_n_s_t_a_l_l_a_t_i_o_n_, _d_'__v_e_n_t_u_e_l_s _p_r__-_r_e_q_u_i_s_, _e_t_c_._._.
     AAccccss ppaarr IInntteerrnneett ::
        _L_'_a_d_r_e_s_s_e _F_T_P _o_u _W_W_W _o_ _l_'_o_n _p_e_u_t _t_r_o_u_v_e_r _v_o_t_r_e _d_i_s_t_r_i_b_u_t_i_o_n _s_i
        _e_l_l_e _e_s_t _d_i_s_p_o_n_i_b_l_e _s_u_r _I_n_t_e_r_n_e_t_.


     CCoommmmaannddee ::
        _C_o_m_m_e_n_t _c_o_m_m_a_n_d_e_r _v_o_t_r_e _d_i_s_t_r_i_b_u_t_i_o_n _o_u _v_o_t_r_e _s_e_r_v_i_c_e_, _l_e _c_a_s
        __c_h__a_n_t_. _M_e_n_t_i_o_n_n_e_z _l_e _p_r_i_x_, _l_e_s _d__t_a_i_l_s _d_'_e_x_p__d_i_t_i_o_n_, _l_e_s
        _p_o_s_s_i_b_i_l_i_t__s _d_e _p_a_i_e_m_e_n_t_, _e_t_c_._._.


     SSuuppppoorrtt ::
        _I_n_f_o_r_m_a_t_i_o_n _s_u_r _l_e_s _p_o_s_s_i_b_i_l_i_t__s _e_t _l_e_s _c_o_n_d_i_t_i_o_n_s _d_u _s_u_p_p_o_r_t_.


     DDiivveerrss ::
        _T_o_u_t_e _a_u_t_r_e _i_n_f_o_r_m_a_t_i_o_n _p_e_r_t_i_n_e_n_t_e_.


     DDaattee ddee ddeerrnniirree mmooddiiffiiccaattiioonn ::
        _D_a_t_e _ _l_a_q_u_e_l_l_e _l_a _v_e_r_s_i_o_n _c_o_u_r_a_n_t_e _a __t_ _f_i_g__e_. _D_o_n_n_e_z
        __g_a_l_e_m_e_n_t _u_n_e _i_d__e _d_e _l_a _f_r__q_u_e_n_c_e _d_e_s _m_i_s_e_s _ _j_o_u_r_.


  33..33..  IInnssttrruuccttiioonnss ppoouurr llaa ssoouummiissssiioonn

  Veuillez soumettre des entres aussi courte que possible. Si vous avez
  besoin d'y mettre un grand volume d'informations, donnez une rfrence
   un site FTP ou une adresse o l'on pourra les trouver; ces entres
  sont seulement faites pour donner des rfrences o l'on pourra
  trouver plus d'informations sur votre service ou votre distribution.

  Si vous vendez plus d'un article (service ou distribution), utilisez
  des _e_n_t_r__e_s _s__p_a_r__e_s pour chacun.

  Je modifierai srement vos entres en partie si j'y trouve des
  informations sans importance, ou si l'entre est trop longue. Sinon le
  contenu devrait rester identique.

  Quand vous faites une soumission au Distribution-HOWTO, vous
  m'accordez implicitement la permission d'utiliser vos entres pour
  d'autres mattiels, tels que les livres du LDP, et les autres
  documents en ligne. Par exemple, une information issue du
  Distribution-HOWTO pourra faire partie d'un livre sur LINUX. Si vous
  ne dsirez pas que votre entre soit reprise dans un autre document,
  prcisez-le s'il vous plat.


  44..  AAssppeeccttss aaddmmiinniissttrraattiiffss


  44..11..  CCoonnddiittiioonnss dd''uuttiilliissaattiioonnss

  Ce document est copyright 1997 par Eric S. Raymond. Vous pouvez
  l'utiliser, le diffuser et le reproduire librement pour autant que
  vous  :


    Ne supprimiez ou modifiez pas cette notice de copyright.

    Ne supprimiez ou modifiez pas le numro de version et la date.

    Ne supprimiez ou modifiez pas le lien vers la version actuelle sur
     le Web.


    Marquiez clairement toute version condense ou altre comme telle.

  Ces restrictions visent  protger les lecteurs potentiels de versions
  dpasses ou dformes. Si vous pensez avoir un motif justifiant une
  exception, contactez-moi.


  44..22..  RReemmeerrcciieemmeennttss

  Ce document  t cre  l'origine par Bill Riemers. Matt Welsh en a
  maintenu la deuxime version. Erik Troan l'a ensuite maintenu jusqu'
  la version 3.0.

  En janvier 1995 Eric Raymond, ignorant l'existence de ce document,
  commena  dvelopper une FAQ similaire sous la forme du "PC-clone
  UNIX Software Buyer's Guide", qu'il a abandonn, et qui concernait
  principalement des UNIX System V et BSD.

  En mars 1995, Eric proposa  Erik de collaborer sur une version
  commune. Au dbut avril 1995, Erik alla travailler pour Red Hat
  Software et (voulant viter un conflit d'intrt) passa le document 
  Eric. Eric rassembla bon nombre de nouvelles informations et ajouta
  plusieurs nouveaux champs aux entres des distributions.

  Par consquent, ce document a t une sorte de collaboration en srie.
  Le "nous" ditorial signale des observations de tous les mainteneurs.
  "Je" est Eric, le mainteneur actuel.

  C'est avec plaisir que nous remercions tous les utilisateurs de Linux
  et tous les hackers d'Internet pour les informations et remarques
  qu'il nous ont fait parvenir.



































  Linux Ethernet-Howto
  par Paul Gortmaker Version franaise : Mathieu Arnold
  Version anglaise : v2.7, 5 mai 1999

  Ceci est l'_E_t_h_e_r_n_e_t_-_H_o_w_t_o, une compilation d'informations sur les
  priphriques Ethernet qui peuvent tre utiliss avec Linux, et la
  faon de les mettre en oeuvre. Notez que ce _H_o_w_t_o se limite  l'aspect
  matriel et pilotes de bas niveau des cartes Ethernet, et ne couvre
  pas la partie logicielle de choses comme ifconfig et route. Consultez
  le _N_e_t_w_o_r_k _H_o_w_t_o pour ce type d'informations.
  ______________________________________________________________________

  Table des matires





















































  1. Introduction

     1.1 Nouvelles versions de ce document
     1.2 Ethernet-Howto, mode d'emploi
     1.3 Au secours ! - Ca ne marche pas !

  2. Quelle carte dois-je acheter pour Linux ?

     2.1 Quels sont les pilotes stables, alors ?
     2.2 Cartes 8 bits contre cartes 16 bits
     2.3 Cartes 32 bits (VLB/EISA/PCI)
     2.4 Cartes et pilotes 100 M disponibles
     2.5 100VG contre 100BaseT
     2.6 Les types de cbles que votre carte peut accepter

  3. Foire Aux Questions (FAQ) - Les questions frquemment poses

     3.1 Les pilotes `Alpha' -- Comment les obtenir et comment s'en servir
     3.2 Utiliser plus d'une carte Ethernet par machine
     3.3 le
     3.4 Problmes avec les cartes NE1000 / NE2000 (et leurs clones)
     3.5 Problmes avec les cartes SMC Ultra/EtherEZ et WD80*3
     3.6 Problmes avec des cartes 3Com
     3.7 Les questions qui ne sont pas spcifiques  une carte.
        3.7.1 Linux et les cartes Ethernet ISA Plug and Play
        3.7.2 Carte Ethernet non dtecte au dmarrage.
        3.7.3 (TT
        3.7.4 Une machine PCI dtecte la carte mais la procdure de test du pilote choue.
        3.7.5 Des cartes ISA  mmoire partage ne fonctionnent pas dans une machine PCI (
        3.7.6 On dirait que ma carte envoie des donnes, mais elle ne reoit jamais rien.
        3.7.7 Asynchronous Transfer Mode (ATM)
        3.7.8 Support de l'Ethernet Gigabit
        3.7.9 FDDI
        3.7.10 Full Duplex
        3.7.11 Les machines SMP et les cartes Ethernet
        3.7.12 Cartes Ethernet pour Linux sur carte-mre PCI Alpha/AXP
        3.7.13 L'Ethernet et Linux sur les SUN/Sparc.
        3.7.14 L'Ethernet, Linux et les autres architectures.
        3.7.15 Relier deux 10 et 100 BaseT sans hub
        3.7.16 SIOCSIFxxx: No such device
        3.7.17 SIOCSFFLAGS: Try again
        3.7.18 Utilisation de `ifconfig' et message `Link UNSPEC with HW-addr of 00:00:00:00:00:00'
        3.7.19 Nombre faramineux d'erreurs en rception (RX Errors) et en transmission (TX Errors)
        3.7.20 Liens dans
        3.7.21 Linux et les ``trailers'' (amorces)
        3.7.22 Accs direct au priphrique Ethernet

  4. Trucs et astuces  propos des performances

     4.1 Concepts gnriques
     4.2 La vitesse des cartes et du bus ISA
     4.3 Modifier la fentre de rception TCP
     4.4 Augmenter les performances de NFS

  5. Informations spcifiques par distributeur/constructeur/modle

     5.1 3Com
        5.1.1 3c501
        5.1.2 EtherLink II, 3c503, 3c503/16
        5.1.3 EtherLink plus, 3c505
        5.1.4 EtherLink-16, 3c507
        5.1.5 EtherLink III, 3c509 / 3c509B
        5.1.6 3c515
        5.1.7 3c523
        5.1.8 3c527
        5.1.9 3c529
        5.1.10 3c562
        5.1.11 3c575
        5.1.12 3c579
        5.1.13 3c589 / 3c589B
        5.1.14 3c590 / 3c595
        5.1.15 3c592 / 3c597
        5.1.16 3c900 / 3c905 / 3c905B
        5.1.17 3c985
     5.2 Accton
        5.2.1 Accton MPX
        5.2.2 Accton EN1203, EN1207, EtherDuo-PCI
        5.2.3 Adaptateur Accton EN2209 pour port parallle (EtherPocket)
        5.2.4 Accton EN2212 PCMCIA
     5.3 Allied Telesyn/Telesis
        5.3.1 AT1500
        5.3.2 AT1700
        5.3.3 AT2450
        5.3.4 AT1500
        5.3.5 AT2540FX
     5.4 AMD / Advanced Micro Devices
        5.4.1 AMD LANCE (7990, 79C960/961/961A, PCnet-ISA)
        5.4.2 AMD 79C965 (PCnet-32)
        5.4.3 AMD 79C970/970A (PCnet-PCI)
        5.4.4 AMD 79C971 (PCnet-FAST)
        5.4.5 AMD 79C972 (PCnet-FAST+)
        5.4.6 AMD 79C974 (PCnet-SCSI)
     5.5 Ansel Communications
        5.5.1 AC3200 EISA
     5.6 Apricot
        5.6.1 Apricot Xen-II On Board Ethernet
     5.7 Arcnet
     5.8 AT&T
        5.8.1 AT&T T7231 (LanPACER+)
     5.9 Boca Research
        5.9.1 Boca BEN (ISA, VLB; PCI)
     5.10 Cabletron
        5.10.1 E10**, E10**-x, E20**, E20**-x
        5.10.2 E2100
        5.10.3 E22**
     5.11 Cogent
        5.11.1 EM100-ISA/EISA
        5.11.2 Cogent eMASTER+, EM100-PCI, EM400, EM960, EM964
     5.12 Compaq
        5.12.1 Compaq Deskpro / Compaq XL (Embedded AMD Chip)
        5.12.2 Compaq Nettelligent/NetFlex (Embedded ThunderLAN Chip)
     5.13 Danpex
        5.13.1 Danpex EN9400
     5.14 D-Link
        5.14.1 DE-100, DE-200, DE-220-T, DE-250
        5.14.2 DE-520
        5.14.3 DE-528
        5.14.4 DE-530
        5.14.5 DE-600
        5.14.6 DE-620
        5.14.7 DE-650
     5.15 DFI
        5.15.1 DFINET-300 et DFINET-400
     5.16 Digital / DEC
        5.16.1 DEPCA, DE100/1, DE200/1/2, DE210, DE422
        5.16.2 Digital EtherWorks 3 (DE203, DE204, DE205)
        5.16.3 DE425 EISA, DE434, DE435, DE500
        5.16.4 DEC 21040, 21041, 2114x, Tulip
     5.17 Farallon
        5.17.1 Etherwave de Farallon
     5.18 Fujitsu
        5.18.1 Fujitsu FMV-181/182/183/184
     5.19 Hewlett Packard
        5.19.1 27245A
        5.19.2 HP EtherTwist, PC Lan+ (27247, 27252A)
        5.19.3 HP-J2405A
        5.19.4 Carte Ethernet embarque de l'HP-Vectra
        5.19.5 Cartes HP 10/100 VG Any Lan (27248B, J2573, J2577, J2585, J970, J973)
        5.19.6 HP NetServer 10/100TX PCI (D5013A)
     5.20 IBM / International Business Machines
        5.20.1 IBM Thinkpad 300
        5.20.2 IBM Credit Card Adaptor for Ethernet - Adaptateur `Credit Card' pour Ethernet d'IBM
        5.20.3 IBM Token Ring
     5.21 Cartes Ethernet ICL
        5.21.1 ICL EtherTeam 16i/32
     5.22 Cartes Ethernet Intel
        5.22.1 Ether Express
        5.22.2 Ether Express PRO/10
        5.22.3 Ether Express PRO/10 PCI (EISA)
        5.22.4 Ether Express PRO 10/100B
     5.23 Kingston
     5.24 LinkSys
        5.24.1 Cartes LinkSys Etherfast 10/100.
        5.24.2 LinkSys Pocket Ethernet Adapter Plus (PEAEPP)
        5.24.3 Adaptateur LinkSys PCMCIA
     5.25 Microdyne
        5.25.1 Microdyne Exos 205T
     5.26 Mylex
        5.26.1 Mylex LNE390A, LNE390B
        5.26.2 Mylex LNP101
        5.26.3 Mylex LNP104
     5.27 Ethernet chez Novell : NExxxx et les clones associs.
        5.27.1 NE1000, NE2000
        5.27.2 NE2000-PCI (RealTek/Winbond/Compex)
        5.27.3 NE-10/100
        5.27.4 NE1500, NE2100
        5.27.5 NE/2 MCA
        5.27.6 NE3200
        5.27.7 NE3210
        5.27.8 NE5500
     5.28 Proteon
        5.28.1 Proteon P1370-EA
        5.28.2 Proteon P1670-EA
     5.29 Pure Data
        5.29.1 PDUC8028, PDI8023
     5.30 Racal-Interlan
        5.30.1 ES3210
        5.30.2 NI5010
        5.30.3 NI5210
        5.30.4 NI6510 (not EB)
        5.30.5 EtherBlaster (aka NI6510EB)
     5.31 RealTek
        5.31.1 RealTek RTL8002/8012 (AT-Lan-Tec) Pocket adaptor
        5.31.2 RealTek 8009
        5.31.3 RealTek 8019
        5.31.4 RealTek 8029
        5.31.5 RealTek 8129/8139
     5.32 Sager
        5.32.1 Sager NP943
     5.33 Schneider & Koch
        5.33.1 SK G16
     5.34 SEEQ
        5.34.1 SEEQ 8005
     5.35 SMC (Standard Microsystems Corp.)
        5.35.1 WD8003, SMC Elite
        5.35.2 WD8013, SMC Elite16
        5.35.3 SMC Elite Ultra
        5.35.4 SMC Elite Ultra32 EISA
        5.35.5 SMC EtherEZ (8416)
        5.35.6 SMC EtherPower PCI (8432)
        5.35.7 SMC EtherPower II PCI (9432)
        5.35.8 SMC 3008
        5.35.9 SMC 3016
        5.35.10 SMC-9000 / SMC 91c92/4
        5.35.11 SMC 91c100
     5.36 Texas Instruments
        5.36.1 ThunderLAN
     5.37 Thomas Conrad
        5.37.1 Thomas Conrad TC-5048
     5.38 VIA
        5.38.1 VIA 86C926 Amazon
        5.38.2 VIA 86C100A Rhine II (et 3043 Rhine I)
     5.39 Western Digital
     5.40 Winbond
        5.40.1 Winbond 89c840
        5.40.2 Winbond 89c940
     5.41 Xircom
        5.41.1 Xircom PE1, PE2, PE3-10B*
        5.41.2 Cartes Xircom PCMCIA
     5.42 Zenith
        5.42.1 Z-Note
     5.43 Znyx
        5.43.1 Znyx ZX342 (DEC 21040 based)
     5.44 Identifier une carte inconnue
        5.44.1 Identifier le contrleur d'interface rseau (Network Interface Controller, NIC)
        5.44.2 Identifier l'adresse Ethernet
        5.44.3 Quelques astuces pour essayer d'utiliser une carte inconnue
     5.45 Pilotes pour priphriques Non-Ethernet

  6. Cbles, Coaxial, Paire Torsade

     6.1 Ethernet fin (thinnet)
     6.2 Paire torsade
     6.3 Thick Ethernet - Le `gros' Ethernet

  7. Configuration logicielle et diagnostics de carte

     7.1 Programmes de configuration pour cartes Ethernet
        7.1.1 Cartes WD80x3
        7.1.2 Cartes Digital / DEC
        7.1.3 Cartes NE2000+ ou AT/LANTIC
        7.1.4 Cartes 3Com
     7.2 Programmes de diagnostic pour cartes Ethernet

  8. Informations Techniques

     8.1 Entres/Sorties programmes contre mmoire partage contre DMA
        8.1.1 Entres/Sorties (E/S) programmes (NE2000, 3c509, etc.)
        8.1.2 Mmoire partage (WD80x3, SMC-Ultra, 3c503, etc.)
        8.1.3 Accs Direct  la Mmoire (DMA) Esclave (normal) (p.ex. : aucune pour Linux !)
        8.1.4 DMA en Bus Master (p.ex. : LANCE, DEC 21040)
     8.2 criture d'un pilote de carte
     8.3 Inteface du pilote avec le noyau
        8.3.1 Dtection de la carte (Probe)
        8.3.2 Gestionnaire d'interruptions (Interrupt handler)
        8.3.3 Fonction de transmission (Transmit function)
        8.3.4 Fonction de rception (Receive function)
        8.3.5 Fonction d'ouverture (Open function)
        8.3.6 Fonction de fermeture (facultative) (Close function)
        8.3.7 Autres fonctions
     8.4 Informations techniques de 3Com
     8.5 Notes sur les cartes bases sur la puce PCnet / LANCE d'AMD
     8.6 Multicast et Mode `Promiscuous'
     8.7 Le filtre de paquets de Berkeley (Berkeley Packet Filter -- BPF)
  9. Faire du rseau avec un portable

     9.1 Utiliser SLIP (Serial Line IP, IP sur liaison srie)
     9.2 Support PCMCIA
     9.3 Carte Ethernet ISA dans la station d'accueil.
     9.4 Adaptateurs de poche et sur port parallle.

  10. Questions diverses.

     10.1 Passage des arguments Ethernet au noyau
        10.1.1 L'argument
        10.1.2 La commande
     10.2 Utilisation des pilotes Ethernet comme modules
     10.3 Documents associs
     10.4 Dsistement de responsabilit et Copyright
     10.5 Conclusion


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  L'_E_t_h_e_r_n_e_t_-_H_o_w_t_o indique quelles cartes vous devriez ou ne devriez pas
  acheter; comment les configurer, comment en utiliser plusieurs en mme
  temps et d'autres problmes et questions classiques.  Il contient des
  informations dtailles sur le niveau actuel du support pour toutes
  les cartes Ethernet parmi les plus courantes disponibles.

  Il _n_e couvre _p_a_s l'aspect logiciel des choses, tel qu'il est dcrit
  dans le _N_E_T_-_3_-_H_o_w_t_o. Notez aussi que les questions gnrales sur
  Ethernet, non lies spcifiquement  Linux, ne sont pas traites dans
  ce document (ou du moins ne le devraient pas l'tre).  Pour ce genre
  de questions, consultez l'excellent ensemble d'informations de la FAQ
  du groupe comp.dcom.lans.ethernet.  Vous pouvez l'obtenir par FTP
  depuis rtfm.mit.edu de la mme manire que vous obtenez les FAQs des
  autres forums.

  La prsente version couvre les noyaux de distribution jusqu' la
  version 2.2.7 incluse.

  L'_E_t_h_e_r_n_e_t_-_H_o_w_t_o est de :

       Paul Gortmaker, p_gortmaker@yahoo.com


  La principale source d'information pour la premire version, en ASCII
  pur de l'_E_t_h_e_r_n_e_t_-_H_o_w_t_o tait :

       Donald J. Becker, becker@cesdis.gsfc.nasa.gov


  que nous devons aussi remercier pour l'criture de la vaste majorit
  des pilotes de cartes Ethernet qui sont aujourd'hui disponibles pour
  Linux. Il est aussi l'auteur du serveur NFS originel. Merci Donald !

  Ce document est Copyright (c) 1993-1999 Paul Gortmaker, et 1998-1999
  Mathieu Arnold pour la version franaise. Consultez le dsistement de
  responsabilit (section ``Dsistement de         responsabilit et
  Copyright'') et les informations sur la copie  la fin de ce document
  pour avoir plus d'informations sur la redistribution de ce document
  ainsi que tout le tremblement habituel sur 'nous ne sommes pas
  responsables de ce que vous pouvez russir a casser...'.


  La version franaise est de :

  Mathieu Arnold, arn_mat@club-internet.fr.



  11..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document peuvent tre rapatries depuis :

       Sunsite HOWTO Archive <ftp://meta
       lab.unc.edu/pub/Linux/docs/HOWTO/>


  Ceci est l'emplacement officiel de ce document, il peut aussi tre
  rcupr depuis divers sites miroirs WWW/FTP de Linux.

  (NDT : En France, vous prfrerez utiliser le site suivant pour le
  document originel :

  Miroir de Sunsite <ftp://ftp.lip6.fr/pub/linux/sunsite/docs/HOWTO/>

  ou, mieux, la version franaise :

  Archive des HOWTO franais sur LIP6
  <ftp://ftp.lip6.fr/pub/linux/french/HOWTO/>

  Archive des         HOWTO franais chez Freenix
  <http://www.freenix.org/unix/linux/french/HOWTO/>)

  Des mises  jour seront ralises au fur et  mesure de l'arrive de
  nouvelles informations et/ou de nouveaux pilotes. Si la copie que vous
  tes en train de lire date de plus de 6 mois, alors, vous devriez
  aller vrifier qu'une nouvelle version n'est pas disponible.

  Ce document est consultable sous divers formats (postscript, dvi,
  ASCII, HTML...). Je recommanderai de consulter ce document sous sa
  forme HTML ( l'aide d'un navigateur WWW) ou sa forme Postscript/DVI.
  Ces deux formats contiennent des rfrences croises qui ne sont pas
  incluses dans le format texte ASCII.



  11..22..  EEtthheerrnneett--HHoowwttoo,, mmooddee dd''eemmppllooii

  Comme ce guide devient de plus en plus gros, vous n'avez certainement
  pas l'intention de passer la fin de votre aprs-midi  le lire en
  entier. Et la bonne nouvelle est que vous n'tes pas _o_b_l_i_g__(_e_) de le
  lire du tout. Les versions HTML, postscript et dvi possdent une table
  des matires qui vous permettra de trouver plus vite l'information que
  vous cherchez.

  Il y a des chances pour que vous lisiez ce document parce que vous
  n'arrivez pas  faire marcher le tout, et que vous ne savez pas quoi
  faire ou quoi vrifier. La prochaine section (``Au         secours -
  Ca ne marche pas~!'') est destine aux nophytes de Linux et vous
  indiquera la bonne direction.

  Typiquement, les mmes problmes et les mmes questions sont poss
  _s_a_n_s _a_r_r__t par des personnes diffrentes. Il y a des chances que votre
  problme ou votre question spcifique soit l'une de ces questions
  frquemment poses, et qu'elle trouve sa rponse dans la partie FAQ
  (NDT : Foire Aux Questions) de ce document.  (Voir ``La Foire Aux
  Questions''). Tout le monde devrait y jeter un coup d'oeil avant
  d'envoyer un message demandant de l'aide.

  Si vous n'avez pas encore de carte Ethernet, vous devriez commencer
  par en choisir une. (Voir ``Quelle carte dois-je         acheter...'')
  Si vous avez dj une carte Ethernet mais que vous n'tes pas sr(e)
  de pouvoir l'utiliser avec Linux, lisez donc la section qui contient
  les informations spcifiques  chaque constructeur, et  ses cartes.
  (Voir ``Informations Spcifiques...'')

  Si vous tes intress(e) par l'un des aspects techniques des pilotes
  de priphriques de Linux, allez donc consulter la
  section ``Informations Techniques'' qui contient ces informations.



  11..33..  AAuu sseeccoouurrss !! -- CCaa nnee mmaarrcchhee ppaass !!

  Bon, ne paniquez pas. Cette section va vous indiquer le chemin 
  suivre pour que les choses fonctionnent, mme si vous n'avez pas de
  connaissances pralables sur Linux ou le matriel Ethernet.

  La premire chose  faire est de trouver quel est le modle de votre
  carte, afin de pouvoir dterminer si Linux dispose d'un pilote pour
  cette carte-l. Des cartes diffrentes sont typiquement contrles de
  faon diffrente par l'ordinateur qui les accueille, et le pilote de
  priphrique de Linux (s'il en existe un) contient ces informations de
  contrle qui permettent  Linux d'utiliser la carte.

  Si vous n'avez pas de manuel ou de document de ce genre pour vous
  indiquer quel est le modle de la carte, vous pouvez alors essayer la
  mthode dcrite dans la section ``Identifier une         carte
  inconnue'', qui vous aidera sur les cartes mystrieuses.

  Maintenant que vous savez quel type de carte vous avez, lisez les
  dtails concernant celle-ci dans la section destine aux cartes
  (section ``Informations Spcifiques...''), qui liste par ordre
  alphabtique les constructeurs de carte, les numros de chaque carte,
  et prcise s'il existe un pilote pour Linux ou non. Si votre carte est
  indique comme `Non-supporte', vous pouvez pratiquement vous arrter
  ds maintenant. Si vous ne pouvez pas trouver votre carte dans la
  liste, vrifiez alors si le manuel de celle-ci ne l'indique pas comme
  `compatible' avec un autre type de carte connu. Par exemple, il existe
  des centaines, si ce n'est des milliers de cartes diffrentes qui ont
  t conues pour tre compatible avec le modle d'origine NE2000 de
  Novell.

  Supposons que vous avez trouv un pilote sous Linux pour votre carte,
  vous n'avez plus qu' le rcuprer et  l'utiliser. Ce _n_'_e_s_t _p_a_s parce
  que Linux possde un pilote pour votre carte que celui-ci est pour
  autant install dans tous les noyaux. (Le noyau est le coeur du
  systme d'exploitation qui est charg en premier au dmarrage et qui
  contient entre autres choses, les drivers de divers priphriques).
  Selon la distribution de Linux que vous utilisez, il peut n'y avoir
  que trs peu de noyaux tout prts, et tout un tas de pilotes sous la
  forme de modules spars, ou il peut y avoir tout un tas de noyaux,
  qui couvrent un grand nombre de combinaisons de pilotes prcompils.

  La majorit des distributions actuelles de linux sont livres avec
  beaucoup de petits modules qui sont les divers pilotes. Les modules
  requis sont gnralements chargs lors du dmarrage, ou  la demande
  pour pouvoir accder  un pripherique particulier. Vous aurez besoin
  d'attacher ce module au noyau aprs qu'il ait dmarr. Consultez les
  informations de votre distribution sur l'installation et l'utilisation
  des modules, ainsi que la section sur les modules du prsent document
  (section ``Utilisation des pilotes Ethernet comme         modules'').

  Si vous n'avez pas trouv de noyau prcompil avec votre pilote, ni de
  pilote sous la forme d'un module, il y a des chances pour que vous
  ayez une carte particulirement peu banale, et vous allez tre
  oblig(e) de construire votre propre noyau en incluant ce pilote. Une
  fois que Linux est install, construire un noyau personnalis n'est
  pas difficile du tout. Vous rpondez essentiellement oui ou non  ce
  que vous souhaitez que le noyau comprenne, et ensuite vous lui dites
  de le construire. Il existe un _K_e_r_n_e_l_-_H_o_w_T_o qui vous aidera dans cette
  opration.

  (NDT : et sa version franaise, accessible sur

  Traduction du Kernel-Howto
  <ftp://ftp.lip6.fr/pub/linux/french/HOWTO/Kernel-HOWTO>)

  Arriv  ce point, vous devriez tre parvenu d'une faon ou d'une
  autre  dmarrer un noyau avec votre pilote intgr, ou  charger ce
  pilote comme un module. A peu prs la moiti des problmes que les
  gens rencontrent est lie au fait que le pilote n'a pas t charg
  d'une manire ou de l'autre, donc vous devriez constater que tout
  fonctionne, maintenant.

  Si cela ne fonctionne toujours pas, il vous faut alors vrifier si le
  noyau a bel et bien dtect la carte. Pour ce faire, vous devez taper
  dmesg | more une fois logg, aprs que le systme a dmarr et que
  tous les modules ont t chargs. Cela vous permettra de consulter les
  messages que le noyau a fait dfiler sur l'cran durant le processus
  de dmarrage. Si la carte a t dtecte, vous devriez voir quelque
  part dans cette liste un message du pilote de votre carte commenant
  par eth0, et indiquant le nom du pilote et les paramtres matriels
  (rglage d'interruption (IRQ), de ports d'entre-sorties (E/S), etc.)
  pour lesquels la carte est rgle. (Note : lors du boot, le noyau de
  Linux donne la liste de toutes les cartes PCI, qu'il ait le pilote ou
  non - ne le confondez pas avec la dtection des pilotes qui intervient
  aprs !)

  Si vous ne voyez pas de message d'identification de ce type, alors le
  pilote n'a pas dtect votre carte, et c'est pour cela que cela ne
  fonctionne pas. Consultez la FAQ (section ``La Foire         Aux
  Questions'') pour savoir quoi faire si votre carte n'est pas dtecte.
  Si vous avez une carte compatible NE2000, vous y trouverez aussi des
  astuces spcifiques pour faire dtecter une NE2000.

  Si la carte a t dtecte, mais que le message de dtection indique
  une quelconque erreur, telle qu'un conflit de ressources, alors le
  pilote ne s'est probablement pas correctement initialis et la carte
  n'est toujours pas utilisable. La plupart des messages d'erreur de ce
  type sont eux aussi lists dans la FAQ, ainsi que leur solution.

  Si le message de dtection parat correct, vrifiez de nouveau les
  ressources indiques par le pilote en les comparant avec celles pour
  lesquelles la carte est physiquement configure (soit  l'aide de
  petits `cavaliers' noirs sur la carte, soit par un logiciel utilitaire
  fourni avec la carte par son constructeur).  Les ressources doivent
  correspondre exactement. Par exemple, si votre carte est configure
  (physiquement ou par logiciel) pour utiliser l'IRQ 15 et que le pilote
  indique IRQ 10 dans les messages de dmarrage, quelque chose ne va
  pas. La FAQ voque les cas les plus courants o un pilote ne dtecte
  pas correctement les informations de configuration de diverses cartes.

  A ce stade, vous tes arriv(e)  faire dtecter votre carte avec tous
  les paramtres corrects, et l'on peut esprer que tout fonctionne. Si
  ce n'est pas le cas, vous avez alors soit une erreur de configuration
  logicielle, soit une erreur de configuration matrielle. Une erreur de
  configuration logicielle serait de ne pas avoir configur la bonne
  adresse de rseau pour l'une des commandes ifconfig ou route (ou les
  deux !); la manire de procder est dcrite en dtail dans le
  _N_e_t_w_o_r_k _H_o_w_T_o et le `Guide de l'Administrateur Rseau' (`_N_e_t_w_o_r_k
  _A_d_m_i_n_i_s_t_r_a_t_o_r_'_s _G_u_i_d_e' (NAG) en anglais) qui se trouvent certainement
  tous les deux sur le CD-ROM d'installation.
  Une erreur de configuration matrielle se produit quand un type de
  conflit de ressources ou une mauvaise configuration (que le pilote n'a
  pas dtect au dmarrage) empche la carte de fonctionner
  correctement. Vous pouvez typiquement observer cela sous plusieurs
  formes diffrentes.  (1) Vous obtenez un message d'erreur lorsque
  ifconfig essaie d'ouvrir le priphrique pour l'utiliser, du genre
  ``SIOCSFFLAGS: Try again''.  (2) Le pilote indique des messages
  d'erreur sur eth0 (que vous pouvez voir avec dmesg | more) ou des
  incohrences tranges  chaque fois qu'il essaie d'envoyer ou de
  recevoir des donnes.  (3) Le fait de taper cat /proc/net/dev donne un
  nombre non nul dans l'une des colonnes errs, drop, fifo, frame ou
  carrier pour eth0. (4) Taper cat /proc/interrupts donne un nombre
  d'interruptions gal  zro pour la carte.  La plupart des erreurs de
  configuration matrielle typiques sont elles aussi abordes dans la
  FAQ.

  Eh bien, si vous tes parvenu  ce point et que cela ne marche
  toujours pas, lisez la section FAQ de ce document, voyez le paragraphe
  spcifique  votre carte dans la section ``Informations
  Spcifiques..'', _e_t _s_i _c_e_l_a _n_e _f_o_n_c_t_i_o_n_n_e _t_o_u_j_o_u_r_s _p_a_s alors vous
  pourrez recourir  un envoi de message dans un groupe de _n_e_w_s
  appropri pour demander de l'aide. Si vous devez poster un message,
  veuillez dtailler toute information intressante dans ce message,
  comme la marque de la carte, la version du noyau, les messages du
  pilote au dmarrage, le rsultat de cat /proc/net/dev, une description
  claire du problme, et bien entendu ce que vous avez dj essay en
  vue de faire fonctionner l'ensemble.

  Vous serez surpris de voir le nombre de personnes qui envoient des
  choses totalement inutiles comme ``Est-ce que quelqu'un peut m'aider ?
  Mon Ethernet ne fonctionne pas.'' et rien d'autre.  Les lecteurs des
  groupes de news ont tendance  ignorer des messages aussi idiots,
  alors qu'une description dtaille et instructive du problme pourra
  permettre  un `gourou-Linux' de rsoudre tout de suite votre
  problme.



  22..  QQuueellllee ccaarrttee ddooiiss--jjee aacchheetteerr ppoouurr LLiinnuuxx ??

  La rponse  cette question dpend fortement de ce que vous comptez
  faire avec votre connexion rseau, et du volume du trafic qui va y
  passer.

  Si vous vous attendez  ce qu'un seul utilisateur effectue
  occasionnellement une session FTP ou une connexion WWW, alors mme une
  vieille carte ISA 8 bits vous contentera probablement.

  Si vous avez l'intention de mettre en place un serveur, et que vous
  exigez que la charge processeur lie  la rception et  la
  transmission des donnes sur le rseau reste la plus basse possible,
  vous devrez certainement choisir une des cartes PCI, qui utilisent le
  bus-mastering, telles celles comportant la puce tulip (21xxx) de DEC,
  ou la puce PCnet-PCI d'AMD.

  Si vous vous trouvez au milieu de ces deux extrmes, alors n'importe
  quelle carte PCI bon march ou une carte ISA 16 bits possdant un
  pilote stable vous conviendra.


  22..11..  QQuueellss ssoonntt lleess ppiillootteess ssttaabblleess,, aalloorrss ??

  Parmi les cartes ISA 16 bits, les pilotes suivants sont trs au point,
  et vous ne devriez pas avoir de problmes si vous achetez une carte
  qui utilise ces pilotes :

  SMC-Ultra/EtherEZ, SMC-Elite (WD80x3), 3c509, Lance, NE2000.


  Cela ne signifie pas que tous les autres pilotes sont instables. Il se
  trouve juste que ceux-ci sont les plus anciens et les plus utiliss
  des pilotes Linux, ce qui en fait le choix le plus sr.

  Notez que certaines cartes-mres pas chres peuvent avoir des
  problmes avec le bus-mastering que les cartes ISA Lance utilisent, et
  que certains clones NE2000 bon march ont des difficults  tre
  dtects au dmarrage.

  Les pilotes PCI les plus couramment utiliss sous Linux sont
  probablement le 3Com Vortex/Boomerang (3c59x/3c9xx), le DEC tulip
  (21xxx), et l'EtherExpressPro 100 d'Intel. Les divers clones PCI-
  NE2000 sont galement trs courants, mais l'achat d'une telle carte ne
  peut se justifier que si le critre du prix est plus important que
  celui des performances.


  22..22..  CCaarrtteess 88 bbiittss ccoonnttrree ccaarrtteess 1166 bbiittss

  Vous ne pourrez certainement plus acheter une carte Ethernet ISA
  8 bits de nos jours, mais vous en trouverez encore beaucoup dans les
  annes  venir sur les marchs aux puces informatiques ou autres
  braderies, et ce  des prix vraiment trs bas. Cela les rend idales
  pour les systmes ``Ethernet--la-maison''. cette constatation est
  d'ailleurs aussi valable pour les cartes ISA 16 bits car les cartes
  PCI deviennent de plus en plus communes.

  La wd8003, la 3c503 et la ne1000 sont des cartes 8 bits qui donneront
  de bonnes performances pour une utilisation faible  modre.  La
  3c501 donnera des rsultats faibles, et ces reliques antdiluviennes
  (12 ans !) des beaux jours du XT sont  viter. (Envoyez les a Alan,
  il les collectionne...)

  Le canal de donnes 8 bits n'attnue pas trop les performances,
  puisque vous pouvez encore esprer obtenir 500  800 Ko/s en vitesse
  de transfert FTP pour une carte 8 bits wd8003 (sur un bus ISA rapide)
   partir d'un serveur rapide. Et si la plupart de votre trafic rseau
  est  destination de sites loigns, le goulot d'tranglement se
  situera ailleurs sur le chemin, la seule diffrence de vitesse que
  vous noterez se produisant lorsqu'il y a de l'activit sur votre
  rseau local.


  22..33..  CCaarrtteess 3322 bbiittss ((VVLLBB//EEIISSAA//PPCCII))

  Notez qu'un rseau  10 Mbps ne justifie pas l'utilisation d'une
  interface 32 bits.  Consultez ``E/S programmes         contre...'',
  qui explique pourquoi avoir une carte Ethernet 10 Mbit/s sur un bus
  ISA  8 MHz ne constitue vraiment pas un goulot d'tranglement. Mme
  si le fait que la carte Ethernet se trouve sur un bus rapide ne
  signifie pas que les transferts sont plus rapides, cela entranera
  souvent une charge processeur supplmentaire moins importante, ce qui
  est bon pour les systmes multi-utilisateurs.

  Bien sr, avec la dmocratisation des rseaux 100 Mbps, les cartes
  32 bits deviennent une obligation pour pouvoir tirer avantage de toute
  la bande passante. AMD propose les puces 32 bits PCnet-VLB et PCnet-
  PCI.  Consultez ``AMD PCnet-32'' pour plus d'informations sur la
  version 32 bits de la puce LANCE / PCnet-ISA.

  La puce tulip (21xxx) PCI de DEC est une autre option (voir ``DEC
  21040'') pour les utilisateurs de puissance. De nombreux fabricants
  proposent des cartes bases sur cette puce, et les prix de ces cartes
  ``sans-nom'' sont gnralement bas.

  Les cartes PCI `Vortex' et `Boomerang' de 3Com constituent aussi une
  autre option, et le prix reste correct si vous pouvez en obtenir une
  tant que leur proposition d'valuation dure. (voir ``3c590/3c595'')

  Les cartes EtherExpress Pro 10/100 PCI d'Intel sont aussi connues pour
  marcher plutt bien avec Linux. (voir ``EtherExpress'').

  Des fabricants de clones ont commenc  produire des clones PCI de
  NE2000, bass sur une puce RealTek ou une puce Winbond. Le pilote
  Linux NE2000 des noyaux 2.0.31 et suprieurs accepte ces cartes.
  Cependant vous ne bnficierez que de la vitesse plus leve du bus,
  puisque ces cartes utiliseront encore l'interface du pilote de la
  NE2000, qui commence  dater. Depuis la version 2.0.34 du noyau, un
  pilote specifique  ces cartes ne2k-pci.c est aussi disponible. Il
  devrait tre lgerement plus efficace que le pilote ISA ne.c


  22..44..  CCaarrtteess eett ppiillootteess 110000 MM ddiissppoonniibblleess

  La liste des matriels 100 M reconnus par Linux  l'heure actuelle est
  la suivante : les cartes bases sur la puce DEC 21140; les cartes
  3c595/3c90x Vortex; la EtherExpressPro10/100B; la PCnet-FAST; la SMC
  83c170 (epic100) et la HP 100VG ANY-LAN.

  Allez aussi jeter un coup d'oeil sur les pages des constructeurs des
  cartes, vous pouvez aussi aller sur l'une des adresse suivantes :



       Ethernet 100M <http://ces
       dis.gsfc.nasa.gov/linux/misc/100mbs.html>



       La page 100VG de Donald <http://ces
       dis.gsfc.nasa.gov/linux/drivers/100vg.html>



       La page Fast Ethernet de Dan Kegel <http://alumni.cal
       tech.edu/~dank/fe/>



  22..55..  110000VVGG ccoonnttrree 110000BBaasseeTT

  Le 100BaseT est beaucoup plus rpandu que le 100VG et la plaquette
  publicitaire suivante est extraite d'un vieux message dsesprement
  bourr d'informations post par Donald dans comp.os.linux; elle rsume
  bien la situation:

  ``Pour ceux qui ne seraient pas au courant, il y a deux normes
  Ethernet en comptition, le 100VG (aussi connu sous le nom de
  100baseVG ou encore 100VG-AnyLAN) et le 100baseT (qui, selon le type
  du cble, s'appelle 100bastTx, 100baseT4 ou 100baseFx).

  Le 100VG est arriv sur le march le premier, et je sentais qu'il
  tait mieux pens que le 100baseTx. J'tais persuad qu'il allait
  gagner, mais visiblement ce ne sera pas le cas. HP et al. ont fait
  plusieurs mauvais choix :

  1) Retarder la norme de manire  ce qu'ils puissent tre compatibles
  avec IBM et accepter les trames Token Ring. Cela `semblait une bonne
  ide  l'poque', puisque cela aurait permis aux installations Token
  Ring de se mettre  jour sans devoir faire admettre aux dcideurs
  qu'ils avaient fait une norme bourde en s'alliant avec la mauvaise
  technologie. Mais il n'y avait rien  gagner, parce que les deux types
  de trames ne peuvent pas coexister sur un rseau, parce que Token Ring
  est un monstre de complexit , et que IBM a quand mme adopt 100baseT
  pour finir.

  2) Ne produire que des cartes ISA et EISA. (Un modle PCI n'a t
  annonc que rcemment.) Le bus ISA est trop lent pour 100 M, et
  relativement peu de machines EISA existent. A l'poque VLB tait
  classique, rapide, et conomique, PCI restant un choix viable. Mais la
  sagesse des ``anciens'' disait que les serveurs continueraient
  d'utiliser le bus EISA hors de prix.

  3) Ne pas m'envoyer une documentation. Oui, cela a t la raison
  relle du dclin du 100VG :-). J'ai appel partout pour obtenir des
  infos de programmation, et tout ce que j'ai pu obtenir a t une
  brochure de quelques pages sur papier glac de AT&T dcrivant combien
  le jeu de puce Regatta tait merveilleux.''

  (NDT : ``La norme 100 BAS VG - any LAN propose par HP (...) ne
  reprend pas le principe du protocole Ethernet mais utilise le principe
  du _p_o_l_l_i_n_g. L'utilisation du mot Ethernet a donc ici plutt une
  vocation commerciale. Il faut changer les coupleurs dans les stations
  de travail. Toutefois, on conserve les principaux systmes de
  cblage.''  (Pierre Rolin, _i_n ``Rseaux haut dbit'', Herms, 1995).
  Fin 1997 plus personne ne parle de 100VG.

  La norme 100baseT4 utilise un cblage catgorie 3 et 4, 100baseTx un
  cblage catgorie 5, 100baseFx de la fibre optique.)



  22..66..

  LLeess ttyyppeess ddee ccbblleess qquuee vvoottrree ccaarrttee ppeeuutt aacccceepptteerr

  Si vous mettez en place un petit rseau ``personnel'', vous prfrerez
  certainement utiliser le ``thinnet'' ou cble Ethernet fin. C'est le
  modle avec les connecteurs BNC standards. Le cblage `thinnet', ou
  Ethernet fin (cble coaxial RG-58) avec les connecteur BNC (en mtal,
   enfoncer puis tourner pour verrouiller) est appel techniquement
  10Base2.

  La plupart des cartes Ethernet possdent aussi une version `Combo' qui
  ne cote que 60  150 francs de plus. (NDT : Amusant comme les carts
  de prix en dollars se convertissent en carts de prix en francs ! La
  version anglaise dit ``10  20 dollars de plus''. Ces carts de prix
  sont vrais fin 97.)

  Ces versions `Combo' possdent les deux interfaces paire torsade et
  Ethernet fin intgres, ce qui vous permet de changer d'avis plus
  tard.(NDT : `Combo' signigie mme souvent : interface RJ-45 (10baseT,
  paire torsade) + interface BNC (10base2, thinnet) + interface AUI
  (pour _t_r_a_n_s_c_e_i_v_e_r ou cble de descente (drop-cable) gros Ethernet).)

  Les cbles  paires torsades, avec les connecteurs RJ-45
  (rectangulaires un peu plus grande que les prises `tlphone') sont
  appels techniquement 10BaseT. Vous pourrez aussi entendre parler de
  UTP (Unshielded Twisted Pair, paire torsade non-crante ou non-
  blinde, NDT).

  Le vieil Ethernet `pais' (Thick Ethernet, sur cble coaxial de 10 mm)
  ne se trouve plus que dans les installations anciennes et est
  appel 10Base5. La prise en forme de D avec 15 broches prsente sur
  quelques cartes Ethernet (connecteur AUI) est utilise pour connecter
  de l'ethernet pais et des transceivers externes.

  Les grandes installations professionnelles utiliseront le plus souvent
  du 10BaseT au lieu de 10Base2. 10Base2 n'offre pas de moyen pour
  passer au 100 Mbit/s, quel que soit le nom qu'on leur donne.

  (NDT : Professionnellement parlant, en dehors de la fibre optique qui
  est encore hors de prix jusqu' la machine de l'utilisateur, les
  nouveaux cblages devraient tre raliss en ``Catgorie 5, classe
  D''. Ce type de cblage supporte non seulement 10BaseT, mais aussi
  100BaseT et les nouveaux dbits qui apparaissent.

  Pour la maison, vous choisirez entre Ethernet fin (simple et pas cher)
  et une connectique style RJ-45 (un peu moins simple, un peu plus cher,
  mais plus `propre' lectriquement parlant) selon vos envies et votre
  budget !

  Rfrez vous a ``Cables, Coax...'' pour plus de dtails sur les
  diffrents types de cables.


  33..

  FFooiirree AAuuxx QQuueessttiioonnss ((FFAAQQ)) -- LLeess qquueessttiioonnss ffrrqquueemmmmeenntt ppoosseess

  Voici quelques unes des questions les plus frquemment poses  propos
  de l'utilisation de Linux avec une connexion Ethernet. Certaines des
  questions les plus spcifiques sont tries `par ordre de
  constructeur'.  Il y a de fortes chances pour que la question que vous
  voulez poser l'ai dj t, et aie dj une rponse. Donc, si jamais
  vous ne trouvez pas la rponse ici, vous le trouverez certainement sur
  une archive de newsgroups comme : Dejanews <http://www.deja.com>.


  33..11..

  LLeess ppiillootteess ``AAllpphhaa'' ---- CCoommmmeenntt lleess oobbtteenniirr eett ccoommmmeenntt ss''eenn sseerrvviirr

  J'ai entendu dire qu'il y avait une version mise--jour ou un pilote
  prliminaire/alpha disponible pour ma carte. O puis-je l'obtenir ?

  Les plus rcents des `nouveaux' pilotes peuvent tre trouvs sur le
  site FTP de Donald : cesdis.gsfc.nasa.gov dans la partie /pub/linux/.
  Les choses y changent frquemment, donc jetez-y un coup d'oeil de
  temps  autre. Vous pourrez prfrer utiliser un navigateur WWW sur :

       La page Linux de Don <http://cesdis.gsfc.nasa.gov/linux/>


  pour localiser le pilote que vous cherchez. (Prenez garde aux naviga
  teurs WWW qui modifient le source sans rien dire en remplaant les
  tabulations par des espaces, etc. - si vous n'tes pas sr(e),
  utilisez ftp, ou au moins une URL FTP, pour le chargement.)

  Maintenant, s'il s'agit rellement d'un pilote alpha, voire pr-alpha,
  s'il vous plat considrez-le comme tel ! En d'autres termes, ne vous
  plaignez pas parce que vous n'arrivez pas  comprendre ce que vous
  devez en faire. Si vous ne savez pas comment l'installer, alors vous
  ne devriez certainement pas tre en train de le tester. De mme, s'il
  plante votre machine, ne vous plaignez pas. Au lieu de cela, envoyez-
  nous un rapport dtaill sur le problme, ou mme mieux, un patch !

  Notez que certains des pilotes exprimentaux ou alpha `utilisables'
  sont inclus dans l'arborescence standard du noyau. Lorsque vous
  excutez make config, l'une des premires choses qui vous sera
  demande est si vous souhaitez tre interrog(e) sur les pilotes en
  cours de dveloppement (``Prompt for development and/or incomplete
  code/drivers''). Vous devrez rpondre ``Y'' (pour `_Y_e_s', `Oui') 
  cette question si vous souhaitez tre interrog(e) sur l'inclusion
  d'un pilote alpha ou exprimental.


  33..22..  UUttiilliisseerr pplluuss dd''uunnee ccaarrttee EEtthheerrnneett ppaarr mmaacchhiinnee

  Que faut-il faire pour que Linux puisse grer deux cartes Ethernet ?

  La rponse  cette question est diffrente selon que les pilotes ont
  t compils directement dans le noyau ou en tant que modules.  De nos
  jours, la majorit des distributions utilisent des pilotes sous forme
  de modules. Ceci permet de ne pas avoir  fournir une tonne de noyaux
  chacun ayant un jeu de pilotes spcifique.  A la place, un petit noyau
  de base est utilis et les pilotes sont tous compils en modules, ces
  modules tant chargs  la demande ds que le systme est all assez
  loin dans son dmarrage pour accder aux modules (habituellement dans
  /lib/modules/).

  _A_v_e_c _l_e _p_i_l_o_t_e _c_h_a_r_g_ _e_n _m_o_d_u_l_e _: Dans le cas de pilotes PCI, le
  module dtectera normalement toutes les cartes de mme type d'un seul
  coup. Cependant, pour les cartes ISA, la dtection automatique n'est
  pas une opration qui marche  coup sr, et vous aurez trs
  certainement  fournir les adresses d'entre/sortie de base de la
  carte pour que le module sache o regarder. Ces informations sont
  places dans le fichier /etc/conf.modules.

  Par exemple, supposez qu'un utilisateur ait deux cartes ISA NE2000,
  une  Ox300 et l'autre  0x240, il aura les lignes suivantes dans son
  /etc/conf.modules :


          alias eth0 ne
          alias eth1 ne
          options ne io=0x240,0x300



  Explication : cela dit que si l'administrateur (ou le noyau) fait un
  modprobe eth0 ou un modprobe eth1, alors le pilote ne.o devra tre
  charg pour eth0 et eth1. De plus, quand le module se chargera, il le
  sera avec comme options io=0x240,0x300. Ainsi, le pilote saura o
  aller chercher les cartes. Notez que le 0x est important, des trucs
  comme 300h couramment utiliss dans le monde DOS ne marcheront pas. Le
  fait d'inverser 0x240 et 0x300 aura pour effet d'inverser physiquement
  eth0 et eth1.

  La majorit des pilotes ISA peuvent prendre plusieurs valeurs
  d'entre/sortie spares par des virgules comme dans cet exemple pour
  prendre en charge plusieurs cartes. Cependant, certains pilotes (plus
  anciens ?), tels que le module 3c501.o sont pour l'instant incapables
  de grer plus d'une carte par chargement du module. Dans ce cas, vous
  pouvez charger le module deux fois pour avoir les deux cartes
  dtectes. Votre /etc/conf.modules ressemblerait alors  :


          alias eth0 3c501
          alias eth1 3c501
          options eth0 -o 3c501-0 io=0x280 irq=5
          options eth1 -o 3c501-1 io=0x300 irq=7



  Dans cet exemple, l'option -o a t utilise pour donner  chaque
  instance du module un nom unique, puisqu'il n'est pas possible d'avoir
  deux modules ayant le mme nom. L'option irq= a galement t
  utilise, pour indiquer l'interruption materielle de la carte. (Cette
  mthode peut aussi tre utilise pour les modules qui grent les
  listes d'adresses d'entre/sortie, bien qu'elle soit moins efficace,
  car on se retrouve avec le module charg deux fois alors que cela
  n'est pas ncessaire.)

  Pour finir, voici un exemple avec une carte 3c503  0x350 et une SMC
  Elite16 (wd8013)  0x280. Vous auriez :


          alias eth0 wd
          alias eth1 3c503
          options wd io=0x280
          options 3c503 io=0x350



  Pour les cartes PCI, vous avez juste besoin des lignes alias pour
  associer les interface ethN aux pilotes correspondants, puisque les
  adresses d'entre/sortie des cartes PCI sont automatiquement
  dtectes.

  Les modules disponibles sont gnralements situs dans le rpertoire
  /lib/modules/`uname -r`/net o la commande uname -r retourne la
  version du noyau (ex : 2.0.34). Vous pouvez aller y faire un tour pour
  voir ceux qui sont faits pour votre carte. Puis, lorsque vous aurez
  les bons paramtres dans votre /etc/conf.modules, il ne vous reste
  plus qu' tester avec la commande :


          modprobe ethN
          dmesg | tail



  O N est le numro de l'interface que vous testez.

  _A_v_e_c _l_e _p_i_l_o_t_e _c_o_m_p_i_l_ _d_a_n_s _l_e _n_o_y_a_u _: Si vous avez le pilote compil
  dans le noyau, alors, voici tout ce qu'il faut savoir pour utiliser
  plusieurs cartes Ethernet. Toutefois, notez que pour le moment,
  seulement _u_n_e carte Ethernet est dtecte automatiquement par dfaut.
  Cela contribue  viter des blocages possibles au moment du dmarrage,
  causs par la dtection de cartes `sensibles'.

  (Note : Depuis les derniers noyaux 2.1, la dtection des priphriques
  a t dcoupe en deux parties, celle qui est sre, et celle qui ne
  l'est pas . Par consquent, tout ce qui est sr (ex : PCI et EISA)
  sera dtect de manire automatique. Les systmes avec plus d'une
  carte dont une sur un port ISA ncessiteront toujours la procdure
  suivante.)

  Vous pouvez activer la dtection automatique de la deuxime (et de la
  troisime, et de...) carte de deux faons diffrentes.

  La mthode la plus simple consiste  passer des arguments au noyau au
  moment du dmarrage, ce qui est gnralement fait par LILO. La
  dtection de la deuxime carte peut tre obtenue en utilisant un
  argument de dmarrage aussi simple que ether=0,0,eth1. Dans ce cas,
  eth0 et eth1 seront affects dans l'ordre dans lequel les cartes
  seront trouves dans cet ordre au dmarrage. Par contre, si vous
  souhaitez que la carte sur le port 0x300 soit eth0 et que la carte sur
  le port 0x280 soit eth1, vous pourrez utiliser



  LILO: linux ether=5,0x300,eth0 ether=15,0x280,eth1


  La commande ether= accepte plus d'informations que le numro d'IRQ +
  le port d'E/S + le nom qui sont montrs ci-dessus. Veuillez
  consulter ``Passage des arguments Ethernet...'' pour la syntaxe
  complte, les paramtres spcifiques  chaque carte, et des astuces
  pour LILO.

  Ces arguments de dmarrage peuvent tre rendus permanents afin de ne
  pas devoir les r-entrer  chaque fois. Consultez la documentation sur
  l'option de configuration `append' de LILO.

  La seconde mthode (non recommande) est d'diter le fichier Space.c
  et de remplacer la valeur 0xffe0 pour l'adresse d'entre-sortie par un
  zro. La valeur 0xffe0 indique au noyau qu'il ne doit pas essayer de
  dtecter ce priphrique -- la remplacer par un zro autorisera
  l'auto-dtection du priphrique.

  Notez que si vous avez l'intention d'utiliser Linux sur une machine
  qui servira de passerelle entre deux rseaux, vous devrez recompiler
  un noyau avec l'option ``IP forwarding''. Mais gnralement un vieil
  AT/286 avec quelque chose comme le logiciel `kbridge' est une
  meilleure solution.

  Si vous consultez ce document tout en _s_u_r_f_a_n_t sur le rseau, vous
  pourrez jeter un coup d'oeil  un _m_i_n_i_-_H_O_W_T_O que Donald a sur son site
  WWW. Consultez :


       Plusieurs Cartes Ethernet <http://ces
       dis.gsfc.nasa.gov/linux/misc/multicard.html>.



  33..33..  llee eetthheerr==  nn''aa rriieenn cchhaanngg.. PPoouurrqquuooii ??

  Comme il a t dit prcdemment, la commande ether= ne marche _q_u_e pour
  les pilotes qui ont t compils dans le noyau. Maintenant, la
  majorit des distributions utilisent les pilotes dans leur forme
  modulaire, ce qui fait que la commande ether= n'est plus gure
  utilise. (Certaines vieilles documentations ont peut-tre encore 
  tre mises  jour pour reflter ce changement.) Si vous voulez passer
  des options  un pilote modulaire vous _d_e_v_e_z faire les changements
  dans le fichier /etc/conf.modules.

  Si vous utilisez un pilote compil dans le noyau et avez ajout la
  ligne ether=  votre fichier de configuration LILO, notez qu'il ne
  sera pris en compte que lorsque vous relancerez lilo pour mettre 
  jour les informations.



  33..44..

  PPrroobbllmmeess aavveecc lleess ccaarrtteess NNEE11000000 // NNEE22000000 ((eett lleeuurrss cclloonneess))

  PPrroobbllmmee :: Une carte PCI clone NE2000 n'est pas dtecte au dmarrage
  avec un noyau 2.0.x.

  RRaaiissoonn :: Le pilote ne.c jusqu' la version 2.0.30 ne connat que le
  numro d'identification PCI des cartes clones bases sur la puce 8029
  de RealTek. Comme depuis beaucoup d'autres ont eux aussi fait des
  cartes PCI clones NE2000, avec des numro d'identification PCI
  diffrents, le pilote ne les dtecte pas.

  SSoolluuttiioonn :: La solution la plus simple est de mettre  jour votre noyau
  pour une version 2.0.31 (ou plus rcente). Cette dernire connat les
  identificateurs de prs de cinq puces NE2000 PCI diffrentes, et les
  dtectera automatiquement au dmarrage ou lors du chargement en
  module. Si vous passez  la version 2.0.34 (ou plus rcente) du noyau,
  vous aurez un pilote spcifique aux cartes NE2000 PCI, qui est un peu
  plus lger et plus rapide que le pilote ISA/PCI.

  PPrroobbllmmee :: Ma carte PCI clone NE2000 est indique comme tant une
  NE1000 (une carte 8 bits !) au dmarrage ou lorsque je charge le
  module ne.o sous 2.0.x, et par consquent la carte ne fonctionne pas.

  RRaaiissoonn :: Certains clones PCI n'implmentent pas l'accs de largeur un
  octet (et par consquent ne sont donc pas rellement compatibles
  NE2000  100%). Cela entrane que la procdure de dtection pense
  qu'il s'agit de cartes NE1000.

  SSoolluuttiioonn :: Vous devez passer  la version 2.0.31 (ou une version plus
  rcente) comme dit ci-dessus. Le pilote vrifie maintenant si ce bug
  matriel est l.

  PPrroobbllmmee :: Ma carte NE2000 PCI a des performances affreuses, mme en
  rduisant la taille de la fentre comme il est dcrit dans la section
  sur les trucs pour les performances.

  RRaaiissoonn :: Les spcifications de la puce 8390 originelle, conue et
  vendue il y a plus de dix ans, notaient qu'une opration de lecture
  (depuis la puce) tait ncessaire avant chaque opration d'criture
  pour avoir une scurit maximale. Le pilote possde la fonctionnalit
  pour le faire mais cela a t dsactiv par dfaut depuis l'poque des
  versions 1.2 du noyau. Un utilisateur a indiqu que le fait de
  ractiver cette `contre-fonctionnalit' avait aid  amliorer les
  performances sur une carte PCI clone de NE2000 bon march.

  SSoolluuttiioonn :: Puisque cela n'a t rapport comme solution que par une
  seule personne, ne vous chauffez pas trop. Pour r-activer le
  correctif de `lecture avant criture', il suffit d'diter le fichier
  du pilote dans linux/drivers/net/, d'enlever les commentaires qui
  entourent la ligne contenant NE_RW_BUGFIX puis de reconstruire le
  noyau ou le module selon le cas. Merci d'envoyer un courrier dcrivant
  la diffrence de performance et le type de carte / de puce que vous
  avez, si cela vous a aid. (la mme chose peut tre effectue sur le
  fichier ne2k-pci.c galement).

  PPrroobbllmmee :: Le pilote ne2k-pci.c donne un message d'erreur ressemblant
  a timeout waiting for Tx RDC avec une carte NE2000 PCI et ne marche
  pas.

  RRaaiissoonn :: Votre carte et/ou le lien vers le bus PCI ne sait pas grer
  les optimisations d'E/S du pilote.

  SSoolluuttiioonn :: Tout d'abord, vrifiez les rglages de votre BIOS pour voir
  si vous avez un rglage de timing du bus PCI trop agressif pour des
  oprations stables. Sinon, vous pouvez utiliser le pilote ISA/PCI ne.c
  (ou commenter la ligne #define USE_LONGIO du ne2k-pci.c), ce qui vous
  permettrait d'utiliser la carte.

  PPrroobbllmmee :: Ma carte ISA Plug and Play NE2000 (telle que la RealTek
  8019) n'est pas dtecte.

  RRaaiissoonn :: A l'origine, les spcifications de NE2000 (et par consquent
  le pilote linux NE2000) ne supportent pas le PnP.

  SSoolluuttiioonn :: Utilisez la disquette de configuration DOS qui est fournie
  avec la carte pour dsactiver le PnP, et pour rgler les adresses
  d'entre/sortie et l'IRQ. Ajoutez une ligne au /etc/conf.modules telle
  options ne io=0xNNN ou 0xNNN est l'adresse d'entre/sortie en
  hexadecimal. (Ceci suppose l'utilisation des modules, si tel n'est pas
  le cas, utilisez une commande telle ether=0,0xNNN,eth0 lors du boot).
  Vous aurez peut tre aussi a configurer cette irq dans le BIOS pour
  qu'elle ne soit pas affecte  une carte PnP. D'un autre ct, si vous
  devez laisser le PnP pour rester compatible avec un autre systme
  d'exploitation, allez regarder le paquetage _i_s_a_p_n_p_t_o_o_l_s. Essayez man
  isapnp pour voir si il n'est pas dj install sur votre systme. S'il
  ne l'est pas, allez jeter un coup d'oeil  l'URL :

  ISA PNP          Tools <http://www.roestock.demon.co.uk/isapnptools/>

  PPrroobbllmmee :: Le pilote NE*000 indique `not found (no reset ack)' (carte
  non trouve, pas d'acquittement de la rinitialisation) pendant la
  procdure de dtection au dmarrage.

  RRaaiissoonn :: Cela est li au changement prcdent. Aprs la vrification
  initiale qu'une 8390 se trouve  l'adresse d'E/S teste, la
  rinitialisation est effectue. Quand la carte a termin sa
  rinitialisation, elle est suppose envoyer un acquittement indiquant
  que la rinitialisation s'est acheve. Votre carte ne l'a pas fait, et
  le pilote estime donc qu'aucune carte NE n'est prsente.

  SSoolluuttiioonn :: Vous pouvez indiquer au pilote que vous possdez une
  _m_a_u_v_a_i_s_e _c_a_r_t_e (_b_a_d _c_a_r_d) en utilisant une valeur hxadcimale 0xbad
  au moment du dmarrage pour le paramtre mem_end (qui n'est
  normalement pas utilis). Vous _d_e_v_e_z aussi fournir une adresse de base
  non nulle pour les ports d'E/S de la carte quand vous utilisez la
  valeur 0xbad. Par exemple, une carte qui se trouve  0x340 et qui
  n'acquitte pas la rinitialisation utilisera quelque chose comme :


       LILO: linux ether=0,0x340,0,0xbad,eth0


  Cela permettra  la procdure de dtection de la carte de continuer,
  mme si votre carte n'acquitte pas la rinitialisation. Si vous
  utilisez le pilote comme un module, vous pouvez alors fournir l'option
  bad=0xbad exactement comme vous indiquez l'adresse d'E/S

  PPrroobbllmmee :: Ma carte NE*000 bloque la machine au premier accs rseau.

  RRaaiissoonn :: Ce problme a t rapport pour des noyaux aussi vieux que le
  1.1.57 jusqu'aux noyaux actuels. Il apparat tre confin  un petit
  nombre de cartes clones configurables par logiciel. Il apparat que
  ces cartes s'attendent  tre initialises d'une manire spciale.

  SSoolluuttiioonn :: De nombreuses personnes ont indiqu que le fait d'excuter
  le programme DOS de configuration fourni avec la carte et/ou le pilote
  DOS fourni avec la carte avant de redmarrer  chaud (i.e. en
  utilisant loadlin ou le `salut-aux-trois-doigts' (Ctrl-Alt-Suppr,
  NDT)) pour lancer Linux permet  la carte de fonctionner. Ceci
  indiquerait que ces cartes doivent tre initialises d'une faon
  particulire, lgrement diffrente de ce que le pilote Linux actuel
  ralise.

  PPrroobbllmmee :: Ma carte Ethernet NE*000  l'adresse 0x360 n'est pas
  dtecte.

  RRaaiissoonn :: Votre carte NE2000 a une largeur d'espace d'adressage d'E/S
  de 0x20, ce qui lui fait atteindre la zone utilise par le port
  parallle  l'adresse 0x378. D'autres priphriques pourraient se
  trouver  cet endroit-l, comme le contrleur du deuxime lecteur de
  disquette (s'il y en a un)  l'adresse 0x370 et le contrleur IDE
  secondaire aux adresses 0x376--0x377. Si le(s) port(s) sont dj
  enregistrs par un autre pilote, le noyau ne laissera pas s'excuter
  la dtection.

  SSoolluuttiioonn :: Vous pouvez soit dplacer votre carte vers une adresse
  d'E/S comme 0x280, 0x340, 0x320, ou compiler votre noyau sans l'option
  pour l'imprimante parallle.

  PPrroobbllmmee :: Le rseau `disparat'  chaque fois que j'imprime quelque
  chose (NE2000).

  RRaaiissoonn :: Mme problme que prcdemment, mais vous avez un vieux noyau
  qui ne vrifie pas les chevauchements de zones d'adressage d'E/S.
  Utilisez la mme solution que ci-dessus, et profitez-en pour rcuprer
  un nouveau noyau, tant qu' faire.

  PPrroobbllmmee :: NE*000 ethercard probe at 0xNNN: 00 00 C5 ... not found.
  (invalid signature yy zz) (carte Ethernet NE*000 teste  l'adresse
  0xNNN: 00 00 C5 ... non trouve, signature yy zz non valide)

  RRaaiissoonn :: Avant tout, avez-vous une carte NE1000 ou NE2000  l'adresse
  0xNNN ? Si oui, est-ce que l'adresse matrielle indique ressemble 
  une adresse valide ? Si oui, alors vous avez un clone NE*000 bas de
  gamme. Tous les clones NE*000 sont supposs avoir la valeur 0x57 dans
  les octets 14 et 15 de leur SA (Station Address) PROM. La vtre n'a
  pas ces valeurs -- elle a `yy zz'  la place.

  SSoolluuttiioonn :: Il existe deux moyens de contourner ce problme.

  Le plus simple est d'utiliser une valeur 0xbad pour le paramtre
  mem_end comme indiqu ci-dessus pour le problme du non-acquittement
  de la rinitialisation. Cela vitera la vrification de la signature,
  pour autant qu'un port d'E/S non nul soit fourni en mme temps. De
  cette faon, aucune recompilation du noyau n'est ncessaire.

  La seconde mthode (pour les hackers) ncessite de changer le pilote
  lui-mme, puis de recompiler votre noyau (ou le module). Le pilote
  (/usr/src/linux/drivers/net/ne.c) comporte une petite "Galerie des
  horreurs" aux environs de la ligne 42. Cette liste est utilise pour
  dtecter les clones bas de gamme. Par exemple, la carte DFS utilise
  `DFI' dans les trois premiers octets de la PROM, au lieu d'utiliser
  0x57 aux octets 14 et 15, tels qu'ils sont supposs tre.

  PPrroobbllmmee :: La machine se bloque pendant le dmarrage aprs le
  message `8390...' ou le message `WD....'. Le fait d'enlever la carte
  NE2000 rsoud le problme.

  SSoolluuttiioonn :: Changez votre adresse d'E/S de base pour une valeur comme
  0x340.  Autre solution, vous pouvez utiliser l'argument de dmarrage
  ``reserve='' en conjonction avec l'argument ``ether='' pour protger
  la carte des procdures de dtection des autres pilotes de
  priphriques.

  RRaaiissoonn :: Votre clone NE2000 n'est pas un assez bon clone. Une carte
  NE2000 est un puits sans fond qui attirera tout pilote qui tenterait
  une dtection dans son espace d'adressage. Le fait de changer la carte
  NE2000 vers une adresse moins populaire l'cartera du chemin des
  autres procdures de dtection automatique, permettant  votre machine
  de dmarrer.

  PPrroobbllmmee :: La machine se bloque pendant la dtection du SCSI au
  dmarrage.

  RRaaiissoonn :: C'est le mme problme que prcdemment; changez l'adresse
  d'E/S de la carte Ethernet, ou utilisez les arguments de dmarrage
  reserve et ether.


  PPrroobbllmmee :: La machine se bloque pendant la dtection de la carte son
  au dmarrage.

  RRaaiissoonn :: Non, en fait c'est pendant la dtection silencieuse du SCSI,
  et c'est le mme problme que ci-dessus.

  PPrroobbllmmee :: Ma carte NE2000 n'est pas dtecte au dmarrage. Il n'y a
  aucun message pendant le dmarrage.

  SSoolluuttiioonn :: Il n'existe pas de `solution magique' parce qu'il existe
  tout un tas de raisons pour qu'elle ne soit pas dtecte. La liste
  suivante devrait vous aider  parcourir les problmes possibles.

  1) Construisez un nouveau noyau ne contenant que les pilotes de
  priphrique dont vous avez besoin. Vrifiez que vous tes rellement
  en train de dmarrer le noyau tout frais. Oublier de lancer lilo, etc.
  peut amener  dmarrer l'ancien. (Regardez de prs la date et l'heure
  de compilation indique au dmarrage.) Cela peut paratre idiot, mais
  nous l'avons tous fait un jour. Assurez-vous que le pilote est bien
  inclus dans le nouveau noyau, en consultant le fichier System.map  la
  recherche de noms comme ne_probe.

  2) Consultez attentivement les messages au dmarrage. Est-ce qu'ils
  mentionnent une tentative de dtection d'une NE2000 comme `NE*000
  probe at 0xNNN: not found (bla bla)' ou est-ce que la dtection se
  contente d'chouer sans rien dire ? Cela fait une grosse diffrence.
  Utilisez dmesg|more pour relire les messages de dmarrage aprs vous
  tre logg, ou tapez Majuscule+PageUp (page prcdente) pour faire
  dfiler l'cran vers le haut aprs que le dmarrage soit termin et
  que le prompt de login soit apparu.

  3) Aprs le dmarrage, faites un cat /proc/ioports et vrifiez que
  tout l'espace d'E/S que la carte demandera est vacant. Si vous avez
  0x300 comme adresse de base, alors le pilote NE2000 demandera la plage
  d'adresse 0x300-0x31f. Si un autre pilote de priphrique a enregistr
  ne serait-ce qu'un port  n'importe quel endroit dans cet intervalle,
  la procdure de dtection ne pourra pas s'effectuer  cette adresse et
  continuera sans rien dire jusqu' la prochaine adresse teste. Un cas
  classique est que le pilote lp (imprimante) rserve 0x378 ou que le
  second canal IDE rserve 0x376 ce qui empche le pilote ne de tester
  la plage 0x360-0x380.

  4) Mme chose que prcdemment avec cat /proc/interrupts.  Assurez-
  vous qu'aucun autre priphrique n'a enregistr l'interruption que
  vous avez fixe pour la carte Ethernet. Dans ce cas, la dtection
  s'effectuera, et le pilote Ethernet se plaindra vigoureusement au
  dmarrage de ne pas tre capable d'obtenir la ligne d'IRQ dsire.

  5) Si vous schez encore sur l'chec silencieux du pilote, ditez-le
  et ajoutez quelques printk()  la procdure de dtection. Par exemple,
  avec une NE2000 vous pouvez ajouter/enlever des lignes (marques
  respectivement par un '+' ou un '-') dans linux/drivers/net/ne.c
  comme :

  ______________________________________________________________________
      int reg0 = inb_p(ioaddr);

  +    printk("NE2k probe - now checking %x\n",ioaddr);
  -    if (reg0 == 0xFF)
  +    if (reg0 == 0xFF) {
  +       printk("NE2k probe - got 0xFF (vacant I/O port)\n");
          return ENODEV;
  +    }
  ______________________________________________________________________


  Le noyau mettra alors des messages pour chaque port qu'il vrifie, et
  vous verrez alors si l'adresse de votre carte a t teste ou non.

  6) Vous pouvez aussi rcuprer le programme de diagnostic pour NE2000
  sur le site FTP de Don (indiqu dans le _H_o_w_t_o) et regarder s'il est
  capable de dtecter votre carte aprs que vous avez dmarr Linux.
  Utilisez l'option `-p 0xNNN' pour lui dire o regarder pour la carte.
  (La valeur par dfaut est 0x300 et il ne va pas regarder ailleurs, 
  la diffrence de la procdure de dtection au dmarrage.)

  Le rsultat, s'il trouve une carte, ressemblera  :

  ______________________________________________________________________
  Checking the ethercard at 0x300.
    Register 0x0d (0x30d) is 00
    Passed initial NE2000 probe, value 00.
  8390 registers: 0a 00 00 00 63 00 00 00 01 00 30 01 00 00 00 00
  SA PROM  0: 00 00 00 00 c0 c0 b0 b0 05 05 65 65 05 05 20 20
  SA PROM 0x10: 00 00 07 07 0d 0d 01 01 14 14 02 02 57 57 57 57

          NE2000 found at 0x300, using start page 0x40 and end page 0x80.
  ______________________________________________________________________



  Vos valeurs de registres et de PROM seront probablement diffrentes.
  Notez que toutes les valeurs de la PROM sont doubles pour une carte
  16 bits, et que l'adresse Ethernet (00:00:c0:b0:05:65) apparat dans
  la premire ligne, et que la signature avec le double 0x57 apparat 
  la fin de la PROM.

  Le rsultat, s'il n'y a aucune carte installe en 0x300, ressemblera
   :

  ______________________________________________________________________
  Checking the ethercard at 0x300.
    Register 0x0d (0x30d) is ff
    Failed initial NE2000 probe, value ff.
  8390 registers: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  SA PROM        0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  SA PROM 0x10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

   Invalid signature found, wordlength 2.
  ______________________________________________________________________



  Les valeurs 0xff apparaissent parce que c'est la valeur qui est
  retourne lorsque l'on lit un port d'E/S vacant. Si vous avez un autre
  matriel dans la zone qui est teste, vous pourrez voir des valeurs
  diffrentes de 0xff aussi.

  7) Essayez de dmarrer Linux  chaud depuis une disquette de dmarrage
  DOS (via loadlin) aprs avoir excut le pilote DOS fourni ou le
  programme de configuration de la carte. Il se peut qu'il excute
  quelques tours de passe-passe supplmentaires (c'est--dire
  non standards) pour initialiser la carte.

  8) Essayez le pilote en mode paquet (packet driver) ne2000.com de Russ
  Nelson pour voir s'il peut au moins voir votre carte -- si ce n'est
  pas le cas, alors les choses vont vraiment mal.

  Exemple :

       A:> ne2000 0x60 10 0x300

  Les arguments sont : le vecteur d'interruption logiciel, l'IRQ
  matrielle, et le port d'E/S. Vous pouvez obtenir ce programme de
  n'importe quelle archive msdos dans le fichier pktdrv11.zip -- la
  version actuelle peut avoir un numro plus rcent que 11.



  33..55..

  PPrroobbllmmeess aavveecc lleess ccaarrtteess SSMMCC UUllttrraa//EEtthheerrEEZZ eett WWDD8800**33

  PPrroobbllmmee :: Vous obtenez des messages semblables  :

          eth0: bogus packet size: 65531, status=0xff, nxpg=0xff



  RRaaiissoonn :: Il y a un problme de mmoire partage.

  SSoolluuttiioonn :: Les machines PCI qui n'ont pas t configures pour
  traduire les priphriques ISA en mmoire constituent la source la
  plus courante pour ce problme. De fait vous lisez la mmoire vive du
  PC (toutes les valeurs 0xff que donne le message) au lieu de la
  mmoire vive de la carte, qui elle contient les donnes du paquet
  reu.

  D'autres problmes courants qui eux sont faciles  rgler sont des
  conflits de carte, le fait d'avoir activ le cache ou la mmoire morte
  plus vite que 8 MHz. Il existe aussi un nombre tonnant de pannes de
  la mmoire sur les cartes Ethernet, donc utilisez le programme de
  diagnostic si vous en avez un pour votre carte Ethernet.

  PPrroobbllmmee :: Une carte EtherEZ de SMC ne fonctionne pas en mode de
  mmoire non-partage (PIO).

  RRaaiissoonn :: Les versions les plus anciennes du pilote Ultra ne pouvaient
  utiliser la carte que dans le mode de travail  mmoire partage.

  SSoolluuttiioonn :: Le pilote de la version 2.0 (et suprieures) sait aussi
  utiliser le mode d'E/S programmes (PIO). Mettez votre noyau  jour
  vers une version 2.0 ou plus rcente.

  PPrroobbllmmee :: Une vieille wd8003 et/ou une wd8013 configurable par
  cavaliers ont toujours la mauvaise IRQ.

  RRaaiissoonn :: Les vieilles cartes wd8003 et les clones wd8013 configurables
  par cavaliers ne possdent pas l'EEPROM que le pilote sait lire pour y
  trouver le paramtrage de l'IRQ. Si le pilote ne sait pas lire l'IRQ,
  il essaie de dterminer automatiquement l'IRQ. Et si la procdure de
  dtection automatique retourne zro, le pilote se contente d'affecter
  l'IRQ 5 pour une carte 8 bits ou l'IRQ 10 pour une carte 16 bits.

  SSoolluuttiioonn :: Evitez le code de dtection automatique de l'IRQ, et
  indiquez au noyau la valeur d'IRQ que vous avez configure sur la
  carte avec les cavaliers en la lui passant comme argument dans votre
  fichier de configuration de modules (ou au dmarrage si vous l'avez
  compil dans le noyau).

  PPrroobbllmmee :: Une carte SMC Ultra est dtecte comme tant une wd8013,
  mais l'IRQ et l'adresse de base de la mmoire partage sont fausses.

  RRaaiissoonn :: La carte Ultra ressemble beaucoup  une wd8013, et si le
  pilote Ultra n'est pas prsent dans le noyau, le pilote wd peut
  identifier l'Ultra comme tant une wd8013. Le test de dtection de
  l'Ultra vient avant celui de la wd, donc ceci ne devrait normalement
  pas se produire.  L'Ultra stocke l'IRQ et l'adresse de base dans son
  EEPROM de faon diffrente  celle d'une wd8013, d'o les valeurs
  errones indiques par le pilote.

  SSoolluuttiioonn :: Recompilez le noyau en n'intgrant que les pilotes dont
  vous avez besoin. Si vous avez un mlange de cartes wd et Ultra dans
  une machine, et que vous utilisez les modules, chargez le module ultra
  en premier.


  33..66..  PPrroobbllmmeess aavveecc ddeess ccaarrtteess 33CCoomm

  PPrroobbllmmee :: La 3c503 prend l'IRQ N, mais celle-ci est requise par un
  autre priphrique qui a besoin de l'IRQ N (par exemple un pilote de
  CD-ROM, un modem, etc.). Est-ce que cela peut tre rpar sans devoir
  le compiler dans le noyau ?

  SSoolluuttiioonn :: Le pilote 3c503 recherche une ligne d'IRQ libre dans
  l'ordre {5, 9/2, 3, 4}, et il devrait prendre une ligne qui n'a pas
  t utilise. Le pilote effectue ce choix lorsque la carte est
  configure (ifconfig).

  Si vous utilisez un pilote en module, vous pouvez vous servir des
  paramtres du module afin de choisir diverses choses, y compris la
  valeur d'IRQ.

  Ce qui suit slectionne l'IRQ 9, adresse de base 0x300, <une valeur
  ignore>, et le port if_port numro 1 (le transceiver externe).

       io=0x300 irq=9 xcvr=1


  Autrement, si le pilote est compil dans le noyau, vous pouvez choisir
  les mmes valeurs en passant des paramtres _v_i_a LILO.

       LILO: linux ether=9,0x300,0,1,eth0


  Ce qui suit slectionne l'IRQ 3, dtecte l'adresse de base, <une
  valeur ignore>, et le port par dfaut (if_port) numro 0 (le
  transceiver interne).

       LILO: linux ether=3,0,0,0,eth0


  PPrroobbllmmee :: 3c503: configured interrupt X invalid, will use autoIRQ.
  (3c503: l'interruption X configure est invalide, dtection
  automatique de l'IRQ)

  RRaaiissoonn :: La 3c503 ne peut utiliser que l'une des IRQ 5, 2/9, 3 ou 4
  (ce sont les seules lignes d'IRQ qui sont connectes  la carte). Si
  vous passez en argument au noyau une valeur d'IRQ qui n'est pas dans
  cet ensemble, vous obtiendrez le message ci-dessus. Normalement, il
  n'est pas ncessaire de spcifier une valeur d'interruption pour la
  3c503. Elle passera en dtection automatique lorsqu'elle sera
  configure (par ifconfig), et elle prendra l'une des IRQ 5, 2/9,
  3 ou 4.

  SSoolluuttiioonn :: Utilisez l'une des IRQ valides donnes ci-dessus, ou
  autorisez la dtection automatique en ne prcisant aucune ligne d'IRQ.

  PPrroobbllmmee :: Le pilote 3c503 fourni n'utilise pas le port AUI (gros
  Ethernet).  Comment faire pour le choisir au lieu du port Ethernet fin
  par dfaut ?

  SSoolluuttiioonn :: Le port AUI peut tre slectionn au dmarrage pour les
  pilotes compils dans le noyau, et lors de l'insertion du module pour
  les pilotes modulaires. La slection est ralise par le bit de poids
  le plus faible de la variable dev->rmem_start qui n'est actuellement
  pas utilise, donc un paramtre de dmarrage comme :

       LILO: linux ether=0,0,0,1,eth0


  devrait fonctionner pour les pilotes compils dans le noyau.

  Pour spcifier le port AUI lorsque vous chargez un module, ajoutez
  simplement xcvr=1  la ligne d'options du module avec vos valeurs de
  port d'E/S et d'IRQ.



  33..77..  LLeess qquueessttiioonnss qquuii nnee ssoonntt ppaass ssppcciiffiiqquueess  uunnee ccaarrttee..




  33..77..11..  LLiinnuuxx eett lleess ccaarrtteess EEtthheerrnneett IISSAA PPlluugg aanndd PPllaayy

  Pour de meilleurs rsultats (et au moins, rien qui empire) il est
  recommand que vous utilisiez le petit programme qui a t livr avec
  la carte pour dsactiver le mcanisme PnP, et rgler la carte pour
  utiliser une IRQ et une adresse d'E/S fixe. Assurez-vous que l'adresse
  d'E/S que vous allez utiliser est teste lors du boot, ou si vous
  utilisez des modules, donnez les adresses avec une option io= dans
  votre /etc/conf.modules. Vous aurez certainement aussi  entrer dans
  le BIOS et  marquer l'IRQ en question comme utilise par une carte
  ISA, et non disponible pour le PnP (si votre ordinateur  cette
  option).

  Notez que vous n'avez pas besoin d'installer le DOS pour lancer la
  configuration. Vous n'aurez besoin que d'une disquette de boot DOS et
  de lancer le programme depuis la disquette fournie. Vous pouvez aussi
  tlcharger OpenDOS ou FreeDOS gratuitement.

  Si vous avez besoin d'avoir le PnP activ pour rester compatible avec
  un autre systme d'exploitation, alors, vous aurez  utiliser le
  paquetage isapnptools avec Linux pour configurer la carte  chaque
  boot. Vous aurez quand mme  vous assurer que l'adresse d'E/S est
  teste par le pilote au dmarrage, ou fourni comme option io=.



  33..77..22..  CCaarrttee EEtthheerrnneett nnoonn ddtteeccttee aauu ddmmaarrrraaggee..

  La raison habituelle de cet tat de fait est que les gens utilisent un
  noyau qui ne contient pas le code pour leur carte  eux. Pour un noyau
  modulaire, cela signifie gnralement que le chargement du module
  ncessaire n'a pas t demand, ou qu'une adresse d'E/S a besoin
  d'tre spcifie comme option du module.

  Si vous utilisez un noyau bas sur les modules, comme ceux installs
  par la plupart des distributions Linux, essayez alors d'utiliser
  l'utilitaire de configuration de la distribution pour slectionner le
  module destin  votre carte. Pour les cartes ISA, c'est une bonne
  ide que de dterminer l'adresse d'E/S de la carte et de l'ajouter
  comme option (p. ex. io=0x340) si l'utilitaire de configuration vous
  le demande. S'il n'y a pas d'utilitaire de configuration, vous devrez
  alors ajouter le nom exact du module (et ses options) au fichier
  /etc/conf.modules -- lisez man modprobe pour plus de dtails.

  Si vous utilisez un noyau prcompil qui provient d'une distribution
  Linux, vrifiez dans la documentation quel noyau vous avez install,
  et s'il a t construit en incluant le code pour votre carte  vous.
  Si ce n'est pas le cas, vous pouvez soit essayer d'en obtenir un qui
  contient le code pour votre carte, soit construire votre propre noyau.

  C'est en gnral une bonne chose que de construire votre propre noyau,
  ne contenant que les pilotes dont vous avez besoin, car cela diminue
  considrablement la taille du noyau (prservant d'autant votre
  prcieuse mmoire vive pour les applications !) et cela rduit le
  nombre de procdure de dtection de priphriques qui peuvent dranger
  le matriel un peu sensible. Construire un nouveau noyau n'est pas
  aussi compliqu que cela peut paratre. Vous devez juste rpondre oui
  ou non  toute une srie de questions sur les pilotes que vous voulez,
  et le systme fait le reste.

  La seconde raison essentielle est qu'un autre priphrique utilise une
  partie de l'espace d'adressage d'entre-sortie dont votre carte a
  besoin. La plupart des cartes ont une zone d'adressage qui mesure
  16 ou 32 bits de largeur. Si votre carte est positionne en 0x300 et
  qu'elle prend 32 octets, alors le pilote demandera la plage d'adresses
  0x300-0x31f. Si un autre pilote de priphrique a enregistr ne
  serait-ce qu'un port d'entre-sortie, o que ce soit dans cet
  intervalle, la procdure de dtection n'aura pas lieu  cette adresse
  et le pilote continuera sans rien dire  l'adresse suivante  tester.
  Donc, aprs le dmarrage, faites un cat /proc/ioports et vrifiez que
  tout l'espace d'adressage d'entre-sortie que la carte demandera est
  bien disponible.

  Autre problme : votre carte est configure pour une adresse d'entre-
  sortie qui n'est pas teste par dfaut. La liste des adresses testes
  pour chaque carte est disponible juste aprs les commentaires de dbut
  dans chaque fichier source. Mme si la configuration d'E/S de votre
  carte n'est pas dans la liste des adresses testes, vous pouvez
  l'indiquer au dmarrage (pour les pilotes compils dans le noyeau en
  utilisant la commande ether= comme il est dcrit dans ``Passage des
  arguments Ethernet...''. Les pilotes modulaires peuvent utiliser
  l'option io= dans le fichier /etc/conf.modules afin de spcifier une
  adresse qui n'est pas teste par dfaut.



  33..77..33..  iiffccoonnffiigg  iinnddiiqquuee llaa mmaauuvvaaiissee aaddrreessssee dd''EE//SS ppoouurr llaa ccaarrttee..

  Non, ce n'est pas vrai. C'est vous qui l'interprtez de manire
  errone. Ce n'est _p_a_s une erreur, et les nombres indiqus sont
  corrects. Ce qu'il se passe, c'est que certaines cartes  base de 8390
  (wd80x3, smc-ultra, etc.) sont telles que la puce 8390 se trouve
  dcale par rapport au premier port d'E/S affect. Il s'agit de la
  valeur stocke dans dev->base_addr, qui est celle que ifconfig
  indique. Si vous souhaitez voir l'intervalle complet d'adresses de
  ports que votre carte utilise, vous devriez essayer cat /proc/ioports
  qui vous donnera le nombre que vous attendez.


  33..77..44..  cchhoouuee..  UUnnee mmaacchhiinnee PPCCII ddtteeccttee llaa ccaarrttee mmaaiiss llaa pprrooccdduurree ddee
  tteesstt dduu ppiilloottee

  Certains BIOS PCI peuvent ne pas activer toutes les cartes PCI lors de
  l'allumage de la machine, spcialement si l'option `PNP OS' du BIOS
  est active. Cette contre-fonctionnalit est destine  supporter la
  version actuelle de Windows qui utilise encore des pilotes en mode
  rel. Vous pouvez soit inhiber cette option, soit essayer de mettre 
  jour votre pilote pour une version qui comprend le code capable
  d'activer une carte dsactive.



  33..77..55..  PPCCII (( 00xxffffffff )) DDeess ccaarrtteess IISSAA  mmmmooiirree ppaarrttaaggee nnee ffoonnccttiioonn
  nneenntt ppaass ddaannss uunnee mmaacchhiinnee

  Ce problme se rvle habituellement sous la forme d'une srie de
  valeurs 0xffff en lecture. Aucune carte  mmoire partage de quelque
  type que ce soit ne fonctionnera dans une machine PCI  moins que vous
  n'ayez configur correctement le BIOS PCI (PCI ROM BIOS/CMOS SETUP ou
  quelque chose comme a). Vous devez le configurer pour permettre
  l'accs  la mmoire partage depuis le bus ISA pour la zone
  d'adresses que votre carte essaie d'utiliser. Si vous n'arrivez pas 
  dterminer quels paramtres sont concerns, interrogez votre revendeur
  ou votre gourou informatique local. Dans un BIOS AMI (American
  Megatrends Inc.), il existe en gnral une section ``Plug and Play''
  o se trouveront sans doute des paramtres ``ISA Shared Memory Size''
  (taille de la mmoire partage ISA) et ``ISA Shared Memory Base''
  (adresse de base de la mmoire partage ISA). Pour des cartes comme
  la wd8013 et la SMC Ultra, changez la taille de sa valeur par dfaut
  (`Disabled', dsactiv)  une valeur de 16 Ko, et changez l'adresse de
  base en prenant l'adresse de base de mmoire partage qui correspond 
  votre carte.


  33..77..66..  rriieenn..  OOnn ddiirraaiitt qquuee mmaa ccaarrttee eennvvooiiee ddeess ddoonnnneess,, mmaaiiss eellllee nnee
  rreeooiitt jjaammaaiiss

  Faites un cat /proc/interrupts. Le nombre total d'interruptions
  gnres par la carte vous sera donn. S'il est  zro et qu'il
  n'augmente pas lorsque vous essayez d'utiliser la carte, alors, il y a
  trs certainement un conflit d'interruptions entre la carte et un
  autre priphrique install (que le pilote de l'autre soit charg ou
  non). La seule solution est de changer l'IRQ de l'un des deux
  priphriques pour une autre IRQ non utilise.



  33..77..77..  AAssyynncchhrroonnoouuss TTrraannssffeerr MMooddee ((AATTMM))

  Werner Almesberger s'est proccup de la disponibilit d'ATM pour
  Linux.  Il a travaill avec la carte ENI155p d'Efficient Networks
  (Efficient Networks <http://www.efficient.com/>) et la carte ZN1221 de
  Zeitnet (Zeitnet <http://www.zeitnet.com/>).

  Werner dit que le pilote de la ENI155p est relativement stable, tandis
  que celui de la ZN1221 n'est actuellement pas termin.

  Consultez les dernires informations et les mises  jour  l'URL
  suivante :

       Linux et ATM <http://lrcwww.epfl.ch/linux-atm/>



  33..77..88..  SSuuppppoorrtt ddee ll''EEtthheerrnneett GGiiggaabbiitt

  O en est le support Ethernet Gigabit pour Linux ?

  Il y a pour le moment au moins deux supports. Un pilote pour
  l'adaptateur Ethernet Gigabit G-NIC PCI de Packet Engines est
  disponible dans les versions 2.0 et 2.2 du noyau. Pour plus de
  dtails, d'information, et les mises  jour du pilote, consultez :


       http://cesdis.gsfc.nasa.gov/linux/drivers/yellowfin.html



  Le pilote acenic.c disponible dans les noyaux 2.2 peut tre utilis
  pour la carte Ethernet Gigabit Alteon AceNIC et d'autres cartes bases
  sur le chipset Tigon comme la 3Com 3c985. Le pilote devrait aussi
  fonctionner avec la NetGear GA620, mais cela n'a pas encore t
  vrifi.



  33..77..99..  FFDDDDII

  Qu'en est-il de FDDI sous Linux ?

  Cela fonctionne. Larry Stefani a crit un pilote pour la version 2.0
  du noyau pour les cartes DEFEA (FDDI EISA) et DEFPA (FDDI PCI) de DEC
  (Digital Equipment Corporation). Il a t inclus dans la
  version 2.0.24 du noyau. Nanmoins, ce sont les seules cartes qui
  fonctionnent sous Linux actuellement.



  33..77..1100..  FFuullll DDuupplleexx

  Est-ce que le mode Full Duplex me donnera 20 Mbit/s ? Est-ce que Linux
  sait faire du Full Duplex ?

  Cameron Spitzer crit ce qui suit  propos des cartes Full Duplex
  10Base-T :

  ``Si vous connectez une carte Full Duplex  un hub (NDT : un switch)
  Full Duplex, et que votre systme est suffisamment rapide et ne fait
  pas grand-chose d'autre, il pourra maintenir le lien occup dans les
  deux directions.

  Le Full Duplex 10Base-2 ou 10Base-5 (coaxial fin et gros coaxial) ne
  peut pas exister. Le mode Full Duplex fontionne en inhibant la
  dtection des collisions dans l'adaptateur rseau. C'est pour cela que
  vous ne pouvez pas le faire avec un coax : le rseau ne fonctionnerait
  pas si c'tait le cas.

  Par contre, 10Base-T (l'interface RJ-45) utilise des (paires de) fils
  spares pour l'mission et la rception, donc il est possible de
  travailler dans les deux sens en mme temps. Le (hub) switch s'occupe
  du problme des collisions. La vitesse de signalisation reste 
  10 Mbit/s.''

  Donc, comme vous pouvez voir, vous ne serez encore capable de recevoir
  ou de transmettre qu' 10 Mbit/s; n'attendez donc pas une
  multiplication par deux des performances. Quant  savoir si cela est
  possible ou non, cela dpend de la carte et peut-tre du pilote.
  Certaines cartes pratiquent l'auto-ngociation, d'autres auront besoin
  de l'aide du pilote, et d'autres auront besoin que l'utilisateur
  choisisse une option dans la configuration sur EEPROM de la carte. De
  toute faon, seule une utilisation srieuse/lourde montrera une
  diffrence entre les deux modes.



  33..77..1111..  LLeess mmaacchhiinneess SSMMPP eett lleess ccaarrtteess EEtthheerrnneett

  Si vous avez dpens un peu d'argent en plus pour avoir une machine
  multiprocesseur (MP), alors, vous devriez aussi vous payer une bonne
  carte Ethernet. Pour les versions 2.0, cela n'tait pas vraiment une
  obligation, mais avec l'avnement des 2.2, cela est devenu ncessaire.
  La majorit des vieilles cartes (ex : ISA, PIO et avec accs partag 
  la mmoire) n'ont pas t conues en pensant aux machines
  multiprocesseurs. Par consquent, il vous faudra acheter une carte de
  facture rcente, et vous assurer que le pilote a t mis a jour pour
  grer les oprations multiprocesseurs. (Le plus important, c'est le
  "de facture rcente" - les PCI-NE2000 sont juste des trucs vieux de
  plus de 10 ans sur un bus rcent.) Chercher spin_lock dans les sources
  d'un pilote donne une bonne indication sur le fait que le pilote a t
  prvu pour marcher sur les machines multiprocesseurs. Pour plus de
  dtails sur pourquoi vous devez prendre une bonne carte pour le MP (et
  ce qui se passera si vous ne le faites pas) se trouve ci dessous :

  Dans la version 2.0 des noyaux, seul un processeur tait autoris a
  passer en `mode noyau' (ex : changer des donnes dans le noyau, ou
  accder aux priphriques), quelque soit le moment. Donc, du point de
  vue de la carte (et du pilote associ) il n'y avait aucune diffrence
  avec le fonctionnement en monoprocesseur (UP) et tout continuait 
  marcher comme si de rien n'tait. (C'tait la faon la plus simple de
  faire du multiprocesseur avec Linux  ce moment-l. De cette manire,
  vous savez qu'il n'est pas possible que deux processeurs essayent de
  changer la mme chose au mme moment !)

  L'inconvnient de n'autoriser qu'un seul processeur  tre en mode
  noyau au mme moment tait que vous n'aviez de vraies performances MP
  que si les programmes faisaient surtout du calcul sans accder  la
  machine. Si les programmes faisaient beaucoup d'oprations d'entres
  sorties (E/S), comme par exemple lire ou crire sur un disque ou 
  travers un rseau, alors, tous les processeurs sauf un taient en
  attente d'une opration d'E/S pendant que le seul processeur en mode
  noyau essayait de faire plaisir  tout le monde  la fois. Le noyau
  devient le goulot d'tranglement et comme un seul processeur est
  autoris  excuter le noyau, les performances d'une machine MP se
  rduisaient rapidement  celles d'une machine UP.

  Comme cela est clairement loin de l'idal (spcialement pour les
  serveurs de fichiers, les serveurs WWW, les routeurs, etc...) les
  versions 2.2 des noyaux ont largement amlior tout ce qui touche aux
  verrouillages - et par consquent, plus d'un processeur peut tre en
  mode noyau  un instant donn. A la place d'un norme verrou autour du
  noyau dans sa globalit, il y a beaucoup plus de verrous plus petits
  qui empchent les donnes critiques d'tres manipules par plus d'un
  processeur  la fois - ex : un processeur peut s'occuper du rseau
  alors qu'un autre peut crire sur un disque au mme moment.

  Ok, avec tout cela en tte, voici deux petits problmes : Des verrous
  plus localiss signifient qu'il peut y avoir un processeur essayant
  d'envoyer les donnes via le pilote ethernet pendant qu'un autre
  processeur essaye d'accder  la carte pour autre chose (par exemple
  pour rcuprer les statistiques pour cat /proc/net/dev). Et hop - les
  statistiques ont t envoyes par la carte et vous avez rcupr les
  donnes  envoyer pour les statistiques. Eh oui, la carte a bien t
  embte de recevoir plusieurs demandes  la fois, et il y a de fortes
  chance que cela ait plant la machine du mme coup.

  Par consquent, le pilote qui marchait pour les machines UP n'est
  dsormais plus vraiment utilisable - on doit y ajouter des verrous qui
  contrlent l'accs  la carte pour que les 3 actions de recevoir,
  mettre et manipuler les donnes puissent tre utilises  divers
  degrs d'opration. Le truc qui peut faire peur est qu'un pilote qui
  n'a pas t mis a jour pour fonctionner de manire stable en MP
  marchera trs probablement si le rseau n'est pas charg, mais fera
  planter la machine ou fera de drles de choses lorsque deux (ou
  plus !) processeurs essaieront de faire plus d'une de ces oprations
  au mme moment.

  Les pilotes ethernet grant le MP requireront (au minimum) un
  verrouillage englobant tout le pilote pour qu'il fonctionne sur le
  principe de `chacun son tour'. Avec ce mcanisme mis en place, les
  choses seront mises en files d'attente et le matriel sera utilis de
  la mme manire qu'en mode UP, et par consquent, devrait tre stable.
  Le cot ngatif est que un verrouillage englobant le pilote ethernet a
  presque d'aussi mauvaises performances qu'un verrou global sur le
  noyau (mais a une chelle plus rduite) - c'est  dire que vous ne
  pouvez avoir qu'un seul processeur travaillant avec la carte  la
  fois. [Note technique : L'impact sur les performances peut aussi
  inclure l'augmentation des temps de latence sur les interruptions si
  les verrous qui ont besoin d'tre ajouts sont du type irqsave et
  qu'ils sont tenus ferms pour un long moment.]

  Il existe deux voies d'amlioration possibles  partir de cette
  situation.  Vous pouvez essayer de minimiser le temps entre le moment
  o le verrou est ferm et quand il est relch et/ou vous pouvez
  trouver une manire plus fine, avec plus de verrous (ex : un verrou
  global sur le pilote ne serait pas ncessaire si quelques verrous
  protgeant quelques registres/rglages critiques suffisent).

  Toutefois, pour les vieilles cartes dbiles qui n'ont pas t conues
  dans l'esprit du MP, aucune de ces amliorations n'est possible.  Le
  pire est que ces pauvres cartes requirent que le processeur dplace
  les donnes de la carte vers la mmoire de l'ordinateur, donc, dans le
  pire des cas le verrou sera ferm pour toute la dure que chaque
  paquet de 1,5 Ko mettra  transiter  travers le bus ISA.

  Les cartes plus rcentes dplacent leurs donnes de et vers la mmoire
  sans avoir recours au processeur. Ceci est une grande amlioration car
  le verrouillage ne dure que le court instant o le processeur dit  la
  carte o dans la mmoire prendre/mettre les donnes. Les cartes de
  facture rcente ne sont d'ailleurs pas faites pour avoir un verrou
  global autour du pilote.


  33..77..1122..  CCaarrtteess EEtthheerrnneett ppoouurr LLiinnuuxx ssuurr ccaarrttee--mmrree PPCCII AAllpphhaa//AAXXPP

  En ce qui concerne les versions 2.0, seules les cartes 3C509, depca,
  de4x5, lance32, et tous les pilotes pour 8390 (wd, smc-ultra, ne,
  3c503, etc.) ont t rendus `indpendants de l'architecture' de faon
   pouvoir fonctionner sur les systmes bass sur les processeurs Alpha
  de DEC. D'autres pilotes PCI mis  jour sont disponibles sur la page
  WWW de Donald marcheront certainement, puisqu'ils ont t crs pour
  tre indpendants de l'architecture.

  Notez que les changements  faire pour que le pilote ne soit pas
  dpendant de l'architecture ne sont pas aussi compliqus que cela peut
  paratre. Vous n'avez besoin que de :

  - multiplier toutes les valeurs relatives  des jiffies par HZ/100
  pour prendre en compte la valeur diffrente de HZ utilise par
  l'Alpha. (c'est--dire que timeout=2; devient timeout=2*HZ/100;)

  - remplacer tout drfrencement de pointeur en mmoire d'E/S (640k 
  1Mo) par les appels readb() writeb() readl() writel() appropris,
  comme le montre cet exemple :

  ______________________________________________________________________
  -       int *mem_base = (int *)dev->mem_start;
  -       mem_base[0] = 0xba5eba5e;
  +       unsigned long mem_base = dev->mem_start;
  +       writel(0xba5eba5e, mem_base);
  ______________________________________________________________________



  - remplacer tous les appels  memcpy() qui ont des adresses mmoire
  sur la plage d'E/S comme source ou comme destination par un appel
   memcpy_fromio() ou  memcpy_toio() selon le cas.
  Vous trouverez plus de dtails sur la manire de grer les accs
  mmoire d'une faon indpendante de l'architecture dans le fichier
  linux/Documentation/IO-mapping.txt qui est prsent dans les noyaux
  rcents.


  33..77..1133..  LL''EEtthheerrnneett eett LLiinnuuxx ssuurr lleess SSUUNN//SSppaarrcc..

  Pour les dernires informations  propos des Sparc, essayez donc l'URL
  suivante :

  Linux Sparc <http://www.geog.ubc.ca/sparc>

  Notez que quelques adaptateurs ethernet pour Sparc rcuprent leurs
  adresses MAC depuis l'ordinateur hte, et que par consquent, vous
  pourriez vous retrouver avec plusieurs interfaces ayant toutes les
  mmes adresses MAC. Si vous devez mettre plusieurs interfaces sur la
  mme machine, alors, vous aurez  utiliser l'option hw de ifconfig
  pour assigner une unique adresse MAC.

  Les problmes de portage des pilotes PCI vers la plate-forme Sparc
  sont les mmes que pour la plate-forme AXP. En plus, il y aura
  certainement des problmes d'ordre des octets, le Sparc tant grand
  boutiste alors que les AXP et ix86 sont petits boutistes.



  33..77..1144..  LL''EEtthheerrnneett,, LLiinnuuxx eett lleess aauuttrreess aarrcchhiitteeccttuurreess..

  Il y a beaucoup d'autres plate formes sur lesquelles Linux tourne,
  comme les Atari/Amiga (m68k). Tout comme dans le cas des Sparc, le
  mieux est de vrifier sur la page principale du port pour savoir ce
  qui est support. (Des pointeurs seraient bienvenus - envoyez les !)



  33..77..1155..  RReelliieerr ddeeuuxx 1100 eett 110000 BBaasseeTT ssaannss hhuubb

  Est-ce que je peux relier deux systmes bass sur du
  10/100BaseT (RJ45) sans utiliser de hub ?

  Vous pouvez relier facilement deux machines, mais pas plus que cela,
  sans botier supplmentaire. Consultez la section ``Paire torsade''
  qui explique comment faire.

  Par contre, non, vous n'arriverez pas  bricoler un hub en croisant
  quelques fils et autres trucs du genre. Il est pratiquement impossible
  de gnrer correctement le signal de collision sans refaire un hub.


  33..77..1166..  SSIIOOCCSSIIFFxxxxxx:: NNoo ssuucchh ddeevviiccee

  J'obtiens un nombre impressionnant de messages `SIOCSIFxxx: No such
  device' au dmarrage, suivis par un `SIOCADDRT: Network is
  unreachable'. Qu'est-ce qui ne va pas ?

  Votre priphrique Ethernet n'a pas t dtect pendant le dmarrage /
  lors de l'insertion du module, et lorsque ifconfig et route sont
  excuts, ils n'ont aucun priphrique avec lequel travailler.
  Utilisez dmesg | more pour consulter les messages du dmarrage et
  regardez s'il y a un (ou des) message(s)  propos de la dtection de
  carte Ethernet.




  33..77..1177..  SSIIOOCCSSFFFFLLAAGGSS:: TTrryy aaggaaiinn

  J'obtiens `SIOCSFFLAGS: Try again' lorsque j'excute ifconfig --
  Euh.. ?

  Un autre priphrique a pris l'IRQ que votre carte Ethernet essaie
  d'utiliser, ce qui fait que la carte ne peut pas utiliser l'IRQ. Vous
  n'avez pas ncessairement besoin de redmarrer pour rsoudre ce
  problme, car certains priphriques ne prennent les IRQ que
  lorsqu'ils en ont besoin, et les rendent quand ils ont fini. C'est le
  cas par exemple des cartes son, des ports srie, du pilote du lecteur
  de disquette, etc. Vous pouvez taper cat /proc/interrupts pour voir
  quelles interruptions sont actuellement _e_n _c_o_u_r_s _d_'_u_t_i_l_i_s_a_t_i_o_n. La
  plupart des pilotes de carte Ethernet sous Linux ne prennent l'IRQ que
  lorsqu'ils sont ouverts via `ifconfig'. Si vous russissez  faire en
  sorte que l'autre priphrique `relche' la ligne d'IRQ, alors vous
  serez capable de ressayer (_T_r_y _a_g_a_i_n en anglais) avec ifconfig.


  33..77..1188..  0000::0000::0000::0000::0000::0000'' UUttiilliissaattiioonn ddee ``iiffccoonnffiigg'' eett mmeessssaaggee ``LLiinnkk
  UUNNSSPPEECC wwiitthh HHWW--aaddddrr ooff

  Lorsque j'utilise ifconfig sans argument, il indique Link UNPSEC (au
  lieu de `Ethernet 10Mbs') et il dit aussi que mon adresse physique est
   zro.

  C'est parce que les gens utilisent une version du programme `ifconfig'
  plus rcente que leur version de noyau. Cette nouvelle version de
  `ifconfig' est incapable de fournir ces informations quand elle est
  utilise en conjonction avec un noyau plus ancien. Vous pouvez soit
  mettre votre noyau  jour, soit prendre une version plus ancienne
  d'ifconfig, ou simplement ignorer le problme. Le noyau connat votre
  adresse physique, donc le fait que ifconfig ne puisse pas la lire
  n'est pas vraiment important.

  Vous pourrez aussi obtenir des informations tranges si le programme
  ifconfig que vous utilisez est beaucoup plus vieux que votre noyau.


  33..77..1199..  ((TTXX EErrrroorrss)) NNoommbbrree ffaarraammiinneeuuxx dd''eerrrreeuurrss eenn rrcceeppttiioonn ((RRXX
  EErrrroorrss)) eett eenn ttrraannssmmiissssiioonn

  Quand j'excute ifconfig sans argument, il indique que j'ai un nombre
  faramineux d'erreurs  la fois dans les paquets reus et dans les
  paquets transmis. Pourtant tout semble fonctionner correctement --
  Est-ce que je me trompe ?

  Regardez de nouveau. ifconfig indique : RX packets _g_r_o_s _n_o_m_b_r_e BBLLAANNCC
  errors 0 BBLLAANNCC dropped 0 BBLLAANNCC overrun 0. Mme chose pour la colonne
  avec TX. Les grands nombres que vous voyez sont donc le nombre total
  de paquets que votre machine a reus et transmis. Si vous trouvez
  encore que c'est source de confusion, essayez de taper cat
  /proc/net/dev  la place.


  33..77..2200..  LLiieennss ddaannss //ddeevv//  ppoouurr ccaarrtteess EEtthheerrnneett

  J'ai /dev/eth0 qui est un lien vers /dev/xxx. Est-ce que c'est bon ?

  Contrairement  ce que vous avez entendu dire, les fichiers dans
  /dev/* ne sont pas utiliss. Vous pouvez dtruire tous les /dev/wd0,
  /dev/ne0 et ce qui y ressemble.




  33..77..2211..  LLiinnuuxx eett lleess ````ttrraaiilleerrss'''' ((aammoorrcceess))

  Dois-je dsactiver les ``trailers'' quand je `ifconfig'ure ma carte
  Ethernet ?

  Vous ne pouvez pas dsactiver les ``trailers'', et vous ne devriez pas
  en avoir envie. Les ``trailers'' sont une astuce de programmation pour
  viter des copies de donnes dans les couches rseau. L'ide tait
  d'utiliser un en-tte simpliste de taille fixe `H', de mettre les
  informations de l'entte de taille variable  la fin du paquet, et
  d'allouer tous les paquets `H' octets avant le dbut d'une page. Alors
  qu'il s'agissait d'une bonne ide, en pratique cela n'a pas trs bien
  fonctionn.

  Si quelqu'un suggre l'utilisation de `-trailers', notez bien que
  c'est l'quivalent du sang de chvres sacrifies. Cela ne rsoudra pas
  le problme, mais si le problme se rsoud tout seul, quelqu'un pourra
  invoquer des connaissances approfondies en magie.


  33..77..2222..  AAccccss ddiirreecctt aauu pprriipphhrriiqquuee EEtthheerrnneett

  Comment puis-je avoir accs directement au priphrique Ethernet sous
  Linux, sans avoir  passer par TCP/IP et ses copains ?


  ______________________________________________________________________
          int s=socket(AF_INET,SOCK_PACKET,htons(ETH_P_ALL));
  ______________________________________________________________________



  Ceci vous donne une socket qui peut recevoir tous les types de
  protocoles. Utilisez l'appel recvfrom() sur cette socket, cela
  remplira la structure sockaddr avec le type de priphrique dans le
  champ sa_family et le nom du priphrique dans le tableau sa_data. Je
  ne sais pas qui a invent SOCK_PACKET pour Linux (cela fait une
  ternit qu'il est l), mais c'est du beau travail. Vous pouvez
  l'utiliser pour envoyer des choses directement en utilisant l'appel
  sendto().

  Bien entendu, vous devez tre root pour pouvoir faire l'ensemble de
  ces oprations.



  44..  TTrruuccss eett aassttuucceess  pprrooppooss ddeess ppeerrffoorrmmaanncceess

  Voici quelques `trucs' que vous pouvez utiliser si vous souffrez d'un
  faible taux de transfert sur Ethernet, ou pour gagner encore un peu de
  vitesse sur ces fameux transferts FTP.

  Le programme ttcp.c est un bon test pour mesurer la vitesse de
  transfert brute. Un autre truc classique est de faire un ftp> get
  mon_gros_fichier /dev/null o mon_gros_fichier fait plus d'un Mo et
  rside dans le cache disque de la machine qui transmet.  (Faites le
  `get' au moins deux fois, car la premire fois ce cache sera vide.)
  Vous avez besoin que le fichier soit dans le cache car il faut viter
  que le temps d'accs au fichier influe sur votre mesure. C'est pour la
  mme raison que vous envoyez les donnes qui arrivent vers /dev/null
  plutt que vers le disque.





  44..11..  CCoonncceeppttss ggnnrriiqquueess

  Mme une carte 8 bits est capable de recevoir des paquets qui se
  suivent (_b_a_c_k_-_t_o_-_b_a_c_k _p_a_q_u_e_t_s en anglais) sans aucun problme. Les
  difficults apparaissent quand l'ordinateur n'enlve pas suffisamment
  rapidement de la carte les paquets reus pour faire de la place pour
  d'autres paquets entrants. Si l'ordinateur ne supprime pas rapidement
  les paquets dj reus de la mmoire de la carte , celle-ci n'aura pas
  assez de place pour mettre les nouveaux paquets.

  Dans ce cas, soit la carte dtruit le nouveau paquet, soit elle
  rcrit sur un paquet dj reu. Les deux solutions interrompent
  brutalement le flux du trafic, ncessitent des re-transmissions et
  peuvent srieusement dgrader les performances d'un facteur qui va
  jusqu' 5 !

  Les cartes qui possdent plus de mmoire sont capables de conserver
  plus de paquets, et peuvent donc supporter de gros pics de paquets
  successifs sans dtruire de paquets. Par consquent cela signifie que
  la carte n'exige pas de l'ordinateur un temps de latence aussi faible
  pour enlever les paquets sans avoir  en dtruire.

  La plupart des cartes 8 bits ont un tampon de 8 Ko, et la plupart des
  cartes 16 bits ont un tampon de 16 Ko. La plupart des pilotes sous
  Linux rserveront 3 Ko de ce tampon (pour deux tampons de
  transmission), laissant 5 Ko d'espace de rception pour une carte
  8 bits. Cela ne laisse de la place que pour 3 paquets Ethernet de
  pleine taille (1500 octets).


  44..22..  LLaa vviitteessssee ddeess ccaarrtteess eett dduu bbuuss IISSAA

  Comme indiqu prcdemment, si les paquets sont enlevs de la carte
  suffisamment rapidement, le problme de destruction ou de surcharge
  n'apparat pas mme si la taille mmoire du tampon de rception est
  petite. Le facteur qui dtermine la rapidit avec laquelle les paquets
  sont enlevs de la carte pour tre placs dans la mmoire de
  l'ordinateur est la vitesse du chemin que devront suivre les donnes
  entre les deux -- c'est--dire la vitesse du bus ISA. (Si le
  processeur est un 386sx-16 poussif, cela jouera aussi un rle.)

  La vitesse d'horloge recommande pour un bus ISA est de 8 MHz, mais de
  nombreuses cartes-mres et de nombreux priphriques peuvent tre
  utiliss  des frquences plus leves. La vitesse d'horloge du bus
  ISA peut en gnral tre modifie dans la configuration CMOS, en
  choisissant le rapport entre la frquence du processeur et celle de la
  carte-mre. Certaines cartes-mres n'auront pas cette option, et vous
  serez coincs avec la valeur par dfaut.

  Par exemple, voici quelques vitesses de rception mesures par le
  programme TTCP sur un 486  40 MHz, avec une carte 8 bits WD8003EP,
  pour des vitesses diffrentes du bus ISA.


          Vitesse du bus ISA (MHz)        TTCP - rception (Ko/s)
          ------------------------        -----------------------
          6.7                             740
          13.4                            970
          20.0                            1030
          26.7                            1075



  Vous auriez du mal  faire mieux que 1075 Ko/s avec _n_'_i_m_p_o_r_t_e _q_u_e_l_l_e
  carte Ethernet 10 Mo/s, en utilisant TCP/IP. Nanmoins ne vous
  attendez pas  ce que tous les systmes puissent travailler  des
  vitesses de bus ISA rapides. La plupart des systmes ne fonctionneront
  pas correctement  des vitesses au-dessus de 13 MHz. (De mme,
  certains systmes PCI fixent la vitesse du bus ISA  8 MHz, afin que
  l'utilisateur final n'ait pas la possibilit de pouvoir l'augmenter.)

  En plus de vitesses de transferts suprieures, vous profiterez aussi
  en gnral d'une rduction de l'utilisation du processeur due  la
  dure plus courte des cycles mmoires et d'E/S. (Notez que les disques
  durs et les cartes vido situes sur le bus ISA afficheront aussi de
  meilleures performances avec une vitesse du bus ISA plus leve.)

  Soyez sr de sauvegarder toutes vos donnes avant de faire des
  expriences avec des vitesses du bus ISA au-dessus de 8 MHz, et de
  tester attentivement que tous les priphriques ISA fonctionnent
  correctement aprs toute augmentation de vitesse.


  44..33..  MMooddiiffiieerr llaa ffeennttrree ddee rrcceeppttiioonn TTCCPP

  Une fois encore, les cartes qui possdent peu de mmoire et un trajet
  des donnes entre la carte et la mmoire de l'ordinateur plutt lent
  provoquent des problmes. La fentre de rception TCP est rgle par
  dfaut  32 Ko, ce qui signifie qu'un ordinateur rapide situ sur le
  mme sous-rseau que vous pourra vous inonder de 32 Ko de donnes sans
  s'arrter pour regarder si vous en avez reu le moindre morceau.

  Les versions rcentes de la commande route donnent la possibilit de
  rgler la largeur de cette fentre  la vole. En gnral, cette
  fentre ne doit tre rduite que pour le rseau local, puisque les
  ordinateurs qui sont  quelques routeurs ou passerelles de distance
  ont suffisamment de `tampons' intermdiaires pour ne pas poser de
  problme. Un exemple d'utilisation est :

  ______________________________________________________________________
          route add <comme_d_habitude> ... window <largeur_de_fenetre>
  ______________________________________________________________________


  o largeur_de_fenetre est la largeur de la fentre que vous voulez
  utiliser (en octets). Une carte 8 bits 3c503 sur un bus ISA fonction
  nant  une vitesse de 8 MHz ou moins tournera correctement avec une
  fentre d'environ 4 Ko. Une fentre trop large causera des surcharges
  et des pertes de paquets, et une diminution drastique du dbit Ether
  net. Vous pouvez vrifier les conditions de travail de la carte en
  faisant un cat /proc/net/dev qui affichera si des pertes de paquets ou
  des surcharges sont apparues.


  44..44..  AAuuggmmeenntteerr lleess ppeerrffoorrmmaanncceess ddee NNFFSS

  Des personnes ont remarqu que l'utilisation de cartes 8 bits sur des
  clients NFS donne des performances moins bonnes que celles attendues,
  en utilisant une taille de paquet NFS de 8Ko (celle donne  l'origine
  par Sun).

  La raison possible de tout cela pourrait tre la diffrence entre la
  taille des tampons des cartes 8 bits et celle des cartes 16 bits. La
  taille maximale d'un paquet Ethernet est d'environ 1500 octets.
  Maintenant que nous faisons du NFS, des paquets NFS de 8 Ko vont
  arriver sous la forme de 6 paquets de taille maximale  la queue-leu-
  leu. Ni les cartes 8 bits ni les cartes 16 bits n'ont de problme 
  recevoir ces paquets les uns derrire les autres. Le problme se
  produit parce que la machine n'enlve pas les paquets  temps de la
  carte, et que le tampon dborde. Le fait que les cartes 8 bits
  ncessitent un cycle du bus ISA supplmentaire pour chaque transfert
  n'aide pas beaucoup, par ailleurs. Ce que vous _p_o_u_v_e_z faire si vous
  avez une carte 8bits est soit de diminuer la taille de transfert NFS 
  2 Ko (voire 1 Ko), soit d'essayer d'augmenter la vitesse du bus ISA
  afin que les tampons de la carte soient vids plus rapidement. J'ai
  trouv qu'une vieille carte WD8003E  8 MHz (sans autre charge
  systme) peut soutenir une rception de taille importante avec une
  taille NFS de 2 Ko, mais pas  4 Ko, auquel cas les performances
  taient dgrades d'un facteur trois.

  D'un autre cot, si l'option par dfaut est d'utiliser des blocs de
  1 Ko, et que vous avez au moins une carte ISA 16 bits, vous aurez
  certainement de meilleures performances en passant a 4 Ko (ou mme
  8 Ko).



  55..

  IInnffoorrmmaattiioonnss ssppcciiffiiqquueess ppaarr ddiissttrriibbuutteeuurr//ccoonnssttrruucctteeuurr//mmooddllee

  Ce qui suit est une liste de nombreuses cartes, ranges par ordre
  alphabtique de distributeur, puis par identifiant de produit. A ct
  de chaque identifiant de produit, vous verrez soit `support', soit
  `partiellement support', soit `non support'.

  `Support' signifie qu'un pilote existe pour cette carte, que de
  nombreuses personnes en sont contentes et qu'il semble fiable.

  `Partiellement support' signifie qu'un pilote existe, mais que l'une
  au moins des conditions suivantes est vraie : (1) Le pilote et/ou le
  matriel comportent des erreurs, ce qui peut engendrer de pitres
  performances, des checs de connexion ou mme des crashs. (2) Le
  pilote est rcent ou la carte est trs peu connue, et par consquent
  celui-ci a t peu utilis/test et son auteur a eu trs peu de
  retours quant  son fonctionnement. Il est vident que la
  situation (2) est prfrable  la situation (1), et la description de
  la carte et du pilote devrait montrer clairement laquelle est la
  bonne. Dans un cas comme dans l'autre, vous devrez certainement
  rpondre 'Y'  la question ``Prompt for development and/or incomplete
  code/drivers?'' (``Demander confirmation pour pour les pilotes en
  cours de dveloppement ou incomplets ?'')  lorsque vous lancerez make
  config.

  `Non support' signifie qu'il n'existe pas de pilote disponible 
  l'heure actuelle pour cette carte. Cela peut tre d  un manque
  d'intrt pour un matriel qui est rare ou peu commun, ou au fait que
  les distributeurs n'en fournissent pas la documentation ncessaire
  pour l'criture du pilote.

  Notez que la diffrence entre `support' et `partiellement support'
  est plutt subjective, et qu'elle est base sur les retours
  d'informations fournis par les utilisateurs, observs dans les groupes
  de news et les listes de diffusion. (Aprs tout, il est impossible 
  une personne de tester tous les pilotes avec toutes les cartes pour
  chaque version du noyau !!!)  Soyez donc prvenus que telle carte
  indique comme `partiellement supporte' pourra fonctionner
  impeccablement pour vous (ce qui est bien), alors que telle autre
  indique comme `supporte' vous donnera des problmes sans fin (ce qui
  n'est pas aussi bien).

  Aprs le statut, le nom du pilote donn dans le noyau de Linux est
  indiqu. Ceci sera aussi le nom du module tel qu'il apparait  la
  ligne alias eth0 pilote dans votre fichier de configuration
  /etc/conf.modules.



  55..11..  33CCoomm

  Si vous n'tes pas sr de ce qu'est votre carte, mais que vous pensez
  qu'il s'agit d'une 3Com, vous pourrez certainement le dterminer 
  partir du numro d'assemblage. 3Com dispose d'un document `Identifying
  3Com Adapters By Assembly Number' (Identifier les adaptateurs 3Com par
  leur numro d'assemblage, rfrence 24500002) qui devrait trs
  certainement claircir les choses. Consultez ``Informations techniques
  de 3Com'' pour plus d'informations sur la faon d'obtenir de 3Com des
  documents techniques.

  Notez aussi que vous pouvez ventuellement consulter le site FTP de
  3Com qui recle diverses gteries : ftp.3Com.com.

  Pour ceux qui consultent ce document sur le WWW, vous pouvez aussi
  essayer leur site WWW (www.3com.com).


  55..11..11..  33cc550011

  Statut : Partiellement support, Nom du pilote : 3c501

  Cette carte 8 bits datant de l'ge de pierre, trop tape du ciboulot
  pour tre utilise.  Evitez-la comme la peste. N'achetez pas cette
  carte, mme pour faire une blague. Ses performances sont atroces, et
  elle a de nombreuses dficiences.

  Pour ceux qui ne seraient pas encore convaincus, la 3C501 ne sait
  faire qu'une chose  la fois -- pendant que vous enlevez un paquet du
  tampon (qui ne peut en contenir qu'un seul), elle ne peut pas en
  recevoir un autre, pas plus qu'elle ne peut en recevoir un pendant le
  chargement d'un paquet  transmettre. C'tait parfait pour un rseau
  entre deux ordinateurs  base de 8088 o le traitement de chaque
  paquet et la rponse prenaient des dizaines de millisecondes, mais les
  rseaux modernes envoient des paquets les uns  la suite des autres
  pour pratiquement chaque transaction.

  Les IRQ automatiques fonctionnent, le DMA n'est pas utilis, la
  dtection automatique ne teste que 0x280 et 0x300, et le niveau de
  dbogage est indiqu dans le troisime argument pass au dmarrage.

  Encore une fois, l'utilisation d'une 3C501 est _f_o_r_t_e_m_e_n_t
  _d__c_o_n_s_e_i_l_l__e ! Encore plus avec un noyau IP `multicast', puisque vous
  allez aboutir  un arrt pendant que vous coutez _c_h_a_c_u_n des paquets
  `multicast'. Lisez les commentaires au dbut du code source pour plus
  de dtails.


  55..11..22..  EEtthheerrLLiinnkk IIII,, 33cc550033,, 33cc550033//1166

  Statut : Support, Nom du pilote : 3c503 (+8390)

  La 3c503 ne possde pas de mmoire reprogrammable pour stocker sa
  configuration (un ``EEPROM setup'') ; un programme de diagnostic et de
  configuration n'est donc pas ncessaire avant d'utiliser la carte sous
  Linux. L'adresse de mmoire partage de la 3c503 est fixe en
  utilisant des cavaliers qui sont partags avec l'adresse de la mmoire
  programmable de dmarrage (``boot PROM''). Cela a tendance  semer la
  confusion chez les personnes habitues aux autres cartes ISA, sur
  lesquelles on laisse toujours le cavalier sur la position `dsactive'
  (_d_i_s_a_b_l_e en anglais)  moins d'avoir une PROM de dmarrage.

  Ces cartes devraient tre aussi rapide que les cartes WD80x3 qui
  utilisent le mme bus, mais il apparat qu'elles sont lgrement plus
  lentes. Ces cartes Ethernet  mmoire partage ont aussi un mode 
  Entres/Sorties programmes qui n'utilise pas les possibilits de la
  8390 (leurs ingnieurs ont trouv trop de bogues !). Le pilote 3c503
  de Linux sait aussi travailler avec la 3c503 en mode d'E/S
  programmes, mais c'est plus lent et moins sr que le mode  mmoire
  partage. De plus, le mode d'E/S programmes n'est pas aussi bien
  test lors des mises  jour des pilotes. Vous ne devriez pas utiliser
  le mode d'E/S programmes  moins d'en avoir besoin pour la
  compatibilit avec le DOS.

  La ligne d'IRQ de la 3c503 est fixe par logiciel, sans l'aide d'une
  EEPROM. A la diffrence des pilotes sous DOS, le pilote Linux est
  capable de choisir automatiquement l'IRQ : il utilise la premire
  ligne d'interruption disponible parmi {5,2/9,3,4}, en choisissant 
  chaque fois que la carte est ifconfigure. (Les anciennes versions du
  pilote slectionnaient l'IRQ au moment du dmarrage). L'appel ioctl()
  dans `ifconfig' retournera EAGAIN si aucune ligne d'IRQ n'est
  disponible  ce moment-l.

  Des problmes classiques que les gens ont avec la 3c503 sont abords
  dans ``Problmes avec...''.

  Si vous avez l'intention d'utiliser ce pilote sous la forme d'un
  module chargeable, vous devriez probablement consulter ``Utiliser les
  pilotes Ethernet comme modules'' pour des informations spcifiques aux
  modules.

  Notez que certains vieux 386 sans disques ont des 3c503 sur la carte
  mre (faites par 3Com, mais vendues sous un autre nom, tel que `Bull')
  l'identificateur n'est pas celui des cartes 3Com, et elles ne seront
  donc pas dtectes. Pour plus de dtails, rfrez-vous au paquetage
  Etherboot, dont vous aurez besoin pour dmarrer ces PC sans disques.


  55..11..33..  EEtthheerrLLiinnkk pplluuss,, 33cc550055

  Statut : Partiellement support, Nom du pilote : 3c505

  Il s'agit d'un pilote qui avait t crit par Craig Southeren
  geoffw@extro.ucc.su.oz.au. Ces cartes utilisent la puce i82586 d'Intel
  et sont assez peu rpandues. Le pilote est inclus dans le noyau
  standard, mais il est class comme pilote `alpha'. Consultez ``Pilotes
  alpha'' pour des informations importantes  propos de l'utilisation de
  pilotes Ethernet en phase de test `alpha' sous Linux.

  Vous devriez aussi lire le fichier
  /usr/src/linux/drivers/net/README.3c505 si vous comptez utiliser une
  de ces cartes. Il contient diverses options que vous pouvez activer ou
  dsactiver.


  55..11..44..  EEtthheerrLLiinnkk--1166,, 33cc550077

  Statut : Partiellement support, Nom du pilote : 3c507

  Cette carte utilise l'une des puces Intel, et le dveloppement du
  pilote est fortement li  celui du pilote de la carte Ether Express
  d'Intel.  Le pilote est inclus dans la distribution standard du noyau,
  mais en tant que pilote `alpha'.

  Consultez ``Pilotes alpha'' pour des informations importantes
  concernant l'utilisation de pilotes en phase de test `alpha' sous
  Linux.





  55..11..55..  EEtthheerrLLiinnkk IIIIII,, 33cc550099 // 33cc550099BB

  Statut : Support, Nom du pilote : 3c509

  Cette carte est plutt bon march et possde de bonnes performances
  pour une conception ISA qui ne soit pas `bus-master'. Le revers de la
  mdaille est que la 3c509 originelle ncessitait des temps de latence
  vraiment trs faibles en rponse aux interruptions. La 3c509B ne
  souffre pas du mme problme, car elle possde un tampon mmoire plus
  important (voir ci-dessous). Ces cartes utilisent des transferts en
  mode d'Entres/Sorties programmes (PIO), de la mme faon qu'une
  carte ne2000, et par consquent une carte  mmoire partage comme la
  wd8013 sera plus efficace en comparaison.

  La 3c509 d'origine avait un petit tampon mmoire pour les paquets
  (4 Ko au total, 2 en rception et 2 en transmission), ce qui poussait
  le pilote  liminer un paquet si les interruptions taient masques
  trop longtemps. Pour minimiser ce problme, vous pouvez essayer de
  d-masquer les interruptions pendant les transferts sur disques IDE
  (consultez man hdparm) et / ou augmenter la vitesse de votre bus ISA
  de faon  ce que les transferts IDE se terminent plus tt.

  Le modle plus rcent, la 3c509B, possde 8 Ko de mmoire, et le
  tampon peut tre partag en 4/4, 5/3 ou 6/2 en rception/transmission.
  Ce paramtre est chang  l'aide de l'utilitaire de configuration sous
  DOS, et est stock dans la mmoire EEPROM. Cela devrait liminer le
  problme prcdent avec la 3c509 originelle.

  Les utilisateurs de 3c509B devraient utiliser soit l'utilitaire DOS
  fourni afin de dsactiver le `_p_l_u_g _a_n_d _p_l_a_y', _e_t de dterminer le
  support de sortie dont ils ont besoin. Le pilote Linux _n_'_e_s_t _p_a_s
  capable aujourd'hui d'utiliser la fonctionnalit de dtection
  automatique du support physique, donc vous _d_e_v_e_z slectionner 10Base-T
  ou 10Base-2 ou AUI.  Notez que pour arrter totalement le PnP, vous
  devrez faire un 3C5X9CFG /PNP:DISABLE et ensuite, teindre et rallumer
  la machine pour que cela prenne effet.

  Certaines personnes ont pos des questions sur les paramtres ``Server
  or Workstation'' (serveur ou station de travail) et ``Highest Modem
  Speed'' (plus haute vitesse de modem) qui sont prsents dans
  l'utilitaire de configuration du DOS. Donald crit que ``Ce ne sont
  que des orientations fournies au pilotes, et le pilote Linux n'utilise
  pas ces paramtres ; il optimise toujours pour un taux de transfert
  important plutt que pour un temps de latence faible (`Server'). Un
  temps de latence faible tait un critre critique pour le vieux
  trafic, non-fentr, de IPX. Afin de rduire le temps de latence, le
  pilote sous DOS de la 3c509 inhibe les interruptions de certaines
  oprations, bloquant les interruptions du port srie. D'o la
  ncessit du paramtre `modem speed' (vitesse du modem). Le pilote
  Linux vite la ncessit de dsactiver les interruptions sur de
  longues priodes en ne travaillant que sur des paquets complets, par
  exemple en ne commenant pas  transmettre un paquet avant qu'il n'ait
  t compltement transfr sur la carte.''

  Notez que la procdure de dtection de la carte ISA utilise une
  mthode diffrente de la plupart des autres cartes. A la base, vous
  demandez aux cartes de rpondre en envoyant des donnes sur un port
  ID_PORT (port 0x100 jusqu' 0x1ff par intervalle de 0x10).  Cette
  mthode de dtection signifie qu'une carte donne sera toujours
  dtecte en premier dans une configuration comportant plusieurs cartes
  ISA 3c509. La carte avec la plus petite adresse Ethernet physique sera
  _t_o_u_j_o_u_r_s eth0. Cela ne devrait gner personne,  l'exception de ceux
  qui souhaitent assigner une adresse physique sur 6 octets  une
  interface donne. Si vous avez plusieurs cartes 3c509, il vaut mieux
  ajouter des commandes ether=0,0,ethN sans prciser le port d'E/S
  (c'est--dire en utilisant E/S=zro) et autoriser la procdure de
  dtection  faire le tri pour dterminer quelle carte est la premire.
  Utiliser une valeur d'E/S non nulle va faire que toutes les cartes ne
  seront pas dtectes : donc, ne le faites pas.

  Si cela vous gne vraiment, jetez un coup d'oeil au tout dernier
  pilote de Donald, car cela vous permettra d'utiliser une valeur
  0x3c509 dans le champ (inutilis) de l'adresse mmoire pour obliger la
  dtection  russir.


  55..11..66..  33cc551155

  Statut : Support, Nom du pilote : 3c515

  Il s'agit de l'offre 100 Mb/s de 3Com en ISA, nom de code
  ``_C_o_r_k_S_c_r_e_w'' (tire-bouchon, en anglais). Un pilote assez jeune pour
  ces cartes venant de Donald est inclus dans la version 2.2 du noyau.
  Pour les dernires informations, vous auriez certainement intrt  le
  chercher dans la page sur les ``Vortex'' :


       Vortex <http://cesdis.gsfc.nasa.gov/linux/drivers/vor
       tex.html>



  55..11..77..  33cc552233

  Statut : Partiellement support, Nom du pilote : 3c523

  Cette carte pour bus MCA utilise la puce i82586, et Chris Beauregard a
  modifi le pilote ni52 pour qu'il fonctionne avec ces cartes. Le
  pilote correspondant peut tre trouv dans l'arborescence des sources
  des noyaux 2.2.

  Plus de dtails sont fournis sur la page MCA pour Linux 
  http://glycerine.cetmm.uni.edu/mca/


  55..11..88..  33cc552277

  Statut : Non support

  Eh oui, encore une autre carte MCA. Eh non, pas beaucoup d'intrt
  pour celle-ci. Vous aurez plus de chance avec la 3c529 si vous tes
  coinc(e) avec le MCA.


  55..11..99..  33cc552299

  Statut : Partiellement support, Nom du pilote : 3c509

  Cette carte utilise en fait le mme jeu de puces que la 3c509. De
  fait, Donald a plac des points d'entre dans le pilote de la 3c509
  pour vrifier l'existence de cartes MCA aprs la dtection des cartes
  EISA, et avant celle des cartes ISA, longtemps avant que le MCA soit
  support par le noyau. Le code de dtection MCA est inclus dans le
  pilote livr avec le noyau 2.2.

  On peut trouver plus de dtails sur la page MCA pour Linux  l'adresse
  http://glycerine.cetmm.uni.edu/mca/.





  55..11..1100..  33cc556622

  Statut : Support, Nom du pilote : 3c589 (distribu sparment)

  Cette carte PCMCIA est la combinaison d'une carte Ethernet 3c589B et
  d'un modem. Le modem est vu comme un modem standard par l'utilisateur
  final. La seule difficult est d'arriver  faire en sorte que les deux
  pilotes Linux partagent la mme interruption. Il y a une srie de
  nouveaux registres et un peu de support de partage d'interruptions
  matrielles. Vous aurez besoin d'utiliser un noyau 2.0 ou plus rcent,
  qui comporte ce qu'il faut pour le partage d'interruptions.


  Merci de nouveau  Cameron pour l'obtention d'un exemplaire d'essai et
  l'envoi d'une documentation  David Hinds. Consultez le paquetage
  PCMCIA de David pour plus d'informations.

  Consultez ``PCMCIA'' pour en savoir plus sur les jeux de puces PCMCIA,
  les activateurs de sockets, etc.


  55..11..1111..  33cc557755

  Statut : Inconnu

  Un pilote pour cette carte PCMCIA est en cours de dveloppement et
  l'on peut esprer qu'il sera inclus dans le paquetage PCMCIA de David
  dans le futur. Le mieux est de regarder dans le paquetage PCMCIA pour
  voir ce qui s'y passe.



  55..11..1122..  33cc557799

  Statut : Support, Nom du pilote : 3c509

  La version EISA de la 509. La version EISA actuelle utilise la mme
  puce de largeur 16 bits plutt qu'une interface 32 bits, et les
  performances ne sont donc pas poustouflantes. Le code de dtection
  EISA a t ajout dans 3c509.c pour la version 0.99pl14. Assurez-vous
  que la carte est configure pour le mode d'adressage EISA. Lisez la
  section prcdente sur la 3c509 pour des informations sur le pilote.



  55..11..1133..  33cc558899 // 33cc558899BB

  Statut : Partiellement support, Nom du pilote : 3c589

  Beaucoup de monde utilise cette carte PCMCIA depuis dj un bon bout
  de temps. Notez qu'elle n'est pas incluse ( l'heure actuelle) dans
  l'arborescence par dfaut du noyau. Le "B" dans le nom signifie la
  mme chose ici que dans le cas de la 3c509.

  Les pilotes sont disponibles sur le site ftp de Donald, et dans le
  paquetage PCMCIA de David Hinds. Vous aurez aussi besoin d'avoir un
  chipset PCMCIA support. Allez faire un tour dans le ``Support
  PCMCIA'' pour plus d'informations sur les pilotes, les chipsets
  supports, les activateurs de sockets, etc.



  55..11..1144..  33cc559900 // 33cc559955

  Statut : Support, Nom du pilote : 3c59x

  Ces cartes ``Vortex'' sont destines aux machines  bus PCI, la 3c590
  constituant l'offre  10 Mb/s de 3Com et la 3c595 celle  100 Mb/S.
  Notez aussi que vous pouvez utiliser la 595 comme une 590
  (c'est--dire en mode 10 Mb/s). Le pilote est inclus dans les sources
  du noyau 2.0, mais est aussi continuellement mis  jour. Si vous
  rencontrez des problmes avec le pilote des noyaux 2.0, vous pouvez
  obtenir un pilote  jour  partir de l'URL suivante :


       Vortex <http://cesdis.gsfc.nasa.gov/linux/drivers/vor
       tex.html>


  Notez qu'il existe en fait deux cartes 3c590, des modles des premiers
  temps ayant 32 Ko de mmoire, et des plus rcents qui n'en ont que 8 .
  Il y a des chances pour que vous ne puissiez plus acheter une 3c59x
  neuve, car elles ont t remplaces par les 3c90x. Si vous achetez une
  carte d'occasion, essayez d'obtenir la version 32 Ko. Les cartes 3c595
  ont 64 Ko, car vous ne pouvez pas faire grand-chose avec seulement
  8 Ko de mmoire vive  100 Mb/s !

  Grand merci  Cameron Spitzer et Terry Murphy de 3Com pour l'envoi de
  cartes et de documentation  Donald afin qu'il puisse crire le
  pilote.

  Donald a mis en place une liste de diffusion pour le support du pilote
  Vortex. Pour vous abonner  la liste, vous n'avez qu' faire :

  echo subscribe | /bin/mail linux-vortex-request@cesdis.gsfc.nasa.gov



  55..11..1155..  33cc559922 // 33cc559977

  Statut : Support, Nom du pilote : 3c59x

  Ce sont les versions EISA des sries 3c59x. La 3c592/3c597 (aussi
  connue sous le nom de Demon) devrait fonctionner avec le pilote Vortex
  prsent au paragraphe prcdent.


  55..11..1166..  33cc990000 // 33cc990055 // 33cc990055BB

  Statut : Support, Nom du pilote : 3c59x

  Ces cartes (aussi connues sous le nom de `Boomerang', ou encore
  EtherLink III XL) ont t mises sur le march pour remplacer les
  cartes 3c590/3c595.

  Le support pour la version  base de Cyclone 'B' a rcemment t
  ajout. Pour utiliser cette carte avec les anciens noyaux 2.0, vous
  devez obtenir le pilote 3c59x.c mis  jour sur le site de Donald :

       Vortex <http://cesdis.gsfc.nasa.gov/linux/drivers/vor
       tex.html>


  Si vous avez un doute, allez faire un tour sur la page WWW ci-dessus.
  Donald a mis en place une liste de diffusion sur les annonces
  concernant le support du pilote Vortex, entre autres.  Pour vous
  abonner  la liste, il suffit de faire :

  echo subscribe | /bin/mail linux-vortex-request@cesdis.gsfc.nasa.gov



  55..11..1177..  33cc998855

  Statut : Support, Nom du pilote : acenic

  Ce pilote, par Jes Sorensen, est disponible dans les noyaux 2.2. Il
  supporte plusieurs autres modles de cartes Gigabit en plus du modle
  3Com.



  55..22..  AAccccttoonn



  55..22..11..  AAccccttoonn MMPPXX

  Statut : Support, Nom du pilote : ne (+8390)

  Ne vous laissez pas avoir par le nom. Cette carte est tout de mme
  suppose tre une compatible NE2000, et devrait par consquent
  fonctionner avec le pilote du mme nom.



  55..22..22..  AAccccttoonn EENN11220033,, EENN11220077,, EEtthheerrDDuuoo--PPCCII

  Statut : Support, Nom du pilote : de4x5, tulip

  Une autre implmentation de la puce PCI 21040 de DEC. La carte EN1207
  comporte le 21140, mais a aussi un connecteur 10Base-2, ce qui s'est
  rvl source de problmes pour certaines personnes en terme de
  slection de ce support. Par contre, l'utilisation de la carte avec du
  10Base-T et du 100Base-T a fonctionn pour certaines autres. Donc,
  comme pour tous les achats, vous devez d'abord essayer et vous assurer
  que vous pourrez retourner la carte si elle ne fonctionne pas pour
  vous.

  Consultez ``DEC 21040'' pour plus d'informations sur ces cartes, et la
  situation actuelle du pilote.


  55..22..33..  AAddaappttaatteeuurr AAccccttoonn EENN22220099 ppoouurr ppoorrtt ppaarraallllllee ((EEtthheerrPPoocckkeett))

  Statut : Partiellement support, Nom du pilote : ?

  Un pilote pour ces adaptateurs sur port parallle est disponible mais
  ne fait pas encore partie des sources des noyaux 2.0 ou 2.1. Vous
  pouvez obtenir ce pilote sur :

       http://www.unix-ag.uni-siegen.de/~nils/accton_linux.html




  55..22..44..  AAccccttoonn EENN22221122 PPCCMMCCIIAA

  Statut : Partiellement support, Nom du pilote : ?

  David Hinds a commenc  travailler sur un pilote pour cette carte, et
  vous devriez de consulter la dernire version de son paquetage PCMCIA
  pour savoir o il en est.





  55..33..  AAlllliieedd TTeelleessyynn//TTeelleessiiss



  55..33..11..  AATT11550000

  Statut : Support, Nom du pilote : lance

  Il s'agit d'une srie de cartes Ethernet peu chres qui utilisent la
  version 79C960 de la puce LANCE d'AMD. Ce sont des cartes utilisant le
  le contrle du bus, et elles figurent donc parmi les cartes Ethernet
  ISA les plus rapides.

  La slection du DMA et des informations sur la numrotation de la puce
  se trouvent dans ``AMD LANCE''.

  Plus d'informations techniques sur les cartes Ethernet bases sur
  l'AMD LANCE sont disponibles dans ``Notes sur         l'AMD...''.


  55..33..22..  AATT11770000

  Statut : Support, Nom du pilote : at1700

  Notez que pour accder  ce pilote lors du make config vous devez
  encore rpondre `Y'  la question ``Prompt for development and/or
  incomplete code/drivers?'' au tout dbut. C'est simplement d au
  manque de retour d'informations sur la stabilit du pilote, tant
  donn qu'il s'agit d'une carte relativement rare. Si vous avez des
  problmes avec le pilote qui est livr avec le noyau, vous serez peut
  etre interess par celui qui est disponible  : http://www.cc.hit-
  u.ac.jp/nagoya/at1700/

  Les cartes Ethernet Allied Telesis des sries AT1700 sont bases sur
  la MB86965 de Fujitsu. Cette puce utilise une interface  E/S
  programmes, et une paire de tampons de transmission  taille fixe.
  Cela permet d'envoyer des petits groupes de paquets les uns  la suite
  des autres, avec une courte pause pendant le changement de tampon.

  Une fonctionnalit unique est la possibilit de piloter du cble STP
  (Shielded Twisted Pair, paire torsade blinde) 150 ohms couramment
  install pour le Token Ring, en plus du cble 100 ohms UTP (Unshielded
  Twisted Pair, paire torsade non-blinde) de 10BaseT. Une version
  fibre optique de la carte (AT1700FT) existe galement.

  La puce Fujitsu utilise sur l'AT1700 a un dfaut de conception : elle
  ne peut tre remise compltement  zro qu'en effectuant un cycle
  d'allumage de la machine. Le fait d'appuyer sur le bouton de
  redmarrage (`Reset') ne rinitialise pas l'interface du bus. Cela ne
  serait pas gnant, si la carte ne pouvait tre dtecte qu'aprs
  qu'elle ait t rcemment rinitialise. Le moyen de contourner le
  problme est d'teindre puis de rallumer la machine si le noyau a un
  problme pour dtecter l'AT1700.

  Certaines sries de production de l'AT1700 ont un autre problme :
  elles sont conues pour utiliser de faon permanente le canal DMA 5.
  Cela n'est pas document, il n'existe aucun cavalier pour dsactiver
  cette "fonctionnalit", et aucun pilote n'ose utiliser la possibilit
  de DMA  cause de problmes de compatibilit. Aucun pilote de
  priphrique ne sera crit pour utiliser la DMA si le fait d'installer
  une seconde carte dans la machine casse les deux cartes, et le seul
  moyen de dsactiver le DMA est d'utiliser un couteau.

  Certaines sries de l'AT1700 ont un autre problme : Elles sont
  bloques sur le canal DMA 5. Cela n'est pas document, et il n'y a pas
  de cavaliers pour dsactiver cette "fonctionnalit", et aucun pilote
  n'ose utiliser le DMA a cause des problmes de compatibilit. Aucun
  pilote ne sera crit pour utiliser le DMA a cause car le fait
  d'installer une deuxime carte empcherais les DEUX de marcher, et le
  seul moyen de dsactiver le DMA, c'est avec un couteau.



  55..33..33..  AATT22445500

  Statut : Support, Nom du pilote : pcnet32

  La version PCI de l'AT1500, qui ne souffre pas des problmes de la
  carte PCI 79c970 de Boca. La slection du DMA et des informations sur
  la numrotation de la puce se trouvent dans ``AMD         LANCE''.

  Plus d'informations techniques sur les cartes Ethernet bases sur
  l'AMD LANCE sont disponibles dans ``Notes sur         l'AMD...''.



  55..33..44..  AATT11550000

  Statut : Partiellement support, Nom du pilote : rtl8139

  Cette carte utilise la puce Realtek 8139, rfrez vous  la section
  ``Realtek 8139''



  55..33..55..  AATT22554400FFXX

  Statut : Partiellement support, Nom du pilote : eepro100

  Cette carte utilise une puce i82557, et par consquent,
  pourrait / devrait fonctionner avec le pilote de la carte eepro100. Si
  vous l'essayez, envoyez-nous quelques renseignements complmentaires
  pour que cette section s'toffe un peu.


  55..44..  AAMMDD // AAddvvaanncceedd MMiiccrroo DDeevviicceess

  Carl Ching d'AMD a eu la gentillesse de fournir une description trs
  dtaille de tous les produits Ethernet d'AMD cits, ce qui a permis
  de clarifier cette section.


  55..44..11..  AAMMDD LLAANNCCEE ((77999900,, 7799CC996600//996611//996611AA,, PPCCnneett--IISSAA))

  Statut : Support, Nom du pilote : lance

  Il n'existe en fait aucune carte Ethernet AMD. Vous tes certainement
  en train de lire ce paragraphe parce que les seules marques que vous
  ayez pu trouver sur votre carte disent `AMD' et le numro ci-dessus.
  La 7990 est la puce `LANCE' d'origine, mais la plupart des documents
  (y compris celui-ci) se rfrent  toutes ces puces similaires sous la
  dnomination de puces `LANCE' (...incorrectement, devrais-je ajouter).

  Les numros ci-dessus se rfrent aux puces d'AMD qui sont le coeur de
  nombreuses cartes Ethernet. Par exemple, l'AT1500 d'Allied Telesis
  (voir ``AT1500''), et la NE1500/2100 (voir ``NE1500'') utilisent ces
  puces.

  La 7990/79c90 a t remplace depuis bien longtemps par des versions
  plus rcentes. La 79C960 (aussi connue sous le nom de PCnet-ISA)
  contient pour l'essentiel la base de la 79c90, avec tout le support
  matriel complmentaire requis, ce qui permet de monter une solution
  Ethernet en une seule puce. La 79c961 (PCnet-ISA+) est une version
  ``Plug and Play'', sans cavaliers, de la 960. La dernire puce des
  sries ISA est la 79c961A (PCnet-ISA II), qui ajoute des capacits de
  _f_u_l_l _d_u_p_l_e_x. Toutes les cartes comportant une de ces puces devraient
  fonctionner avec le pilote lance.c,  l'exception de trs vieilles
  cartes qui utilisent la 7990 d'origine avec une configuration 
  mmoire partage. Ces cartes anciennes peuvent tre repres par
  l'absence de cavaliers pour le choix d'un canal DMA.

  Parmi les problmes classiques, on rencontre le message `busmaster
  arbitration failure'. Celui-ci s'affiche quand le pilote LANCE ne peut
  pas obtenir un accs au bus aprs qu'un temps raisonnable se soit
  coul (50 micro-secondes). Cela indique habituellement que
  l'implmentation de la matrise de bus DMA de la carte-mre est
  incorrecte, ou qu'un autre priphrique monopolise le bus, ou qu'il y
  a un conflit de canal DMA. Si votre programme de configuration du BIOS
  possde la `GAT option' (GAT pour Guaranteed Access Time, temps
  d'accs garanti), essayez de modifier ce paramtre pour voir si cela
  va mieux.

  Notez aussi que le pilote ne cherche une carte valide qu' ces
  adresses : 0x300, 0x320, 0x340, 0x360, et qu'une adresse fournie par
  un argument de dmarrage ether= est ignore sans qu'il en soit fait
  mention (cela sera corrig), donc assurez-vous que votre carte est
  configure pour l'une des adresses d'E/S ci-dessus, pour l'instant.

  Le pilote fonctionnera encore correctement, mme si plus de 16 Mo de
  mmoire sont installs, car des tampons-relais en mmoire basse sont
  utiliss au besoin (c'est--dire que toute donne situe au-del de la
  limite des 16 Mo est copie dans un tampon en-dessous de la limite
  avant d'tre remis  la carte pour transmission).

  Le canal DMA peut tre configur avec les bits (inutiliss en dehors
  de a) de la valeur de dev->mem_start (aussi connue comme PARAM_1
  (voir ``PARAM_1''). S'il n'est pas fix, il est test en activant
  chaque canal DMA tour  tour et en regardant si l'initialisation
  russit.

  La carte HP-J2405A est une exception : avec cette carte, il est facile
  de lire les valeurs stockes en EEPROM pour l'IRQ et le DMA.

  Voir ``Notes on AMD...'' pour plus d'informations sur ces puces.



  55..44..22..  AAMMDD 7799CC996655 ((PPCCnneett--3322))

  Statut : Support, Nom du pilote : pcnet32

  Il s'agit de la PCnet-32 -- une version 32 bits,  contrle de bus, de
  la puce LANCE originelle pour les systmes VLB (Vesa Local Bus) et 
  bus local. Bien que ces puces puissent tre utilise avec le pilote
  lance.c standard, une version 32 bits (pcnet32.c) est aussi
  disponible, laquelle n'a pas  se proccuper des limitations  16 Mo
  lies au bus ISA.


  55..44..33..  AAMMDD 7799CC997700//997700AA ((PPCCnneett--PPCCII))

  Statut : Support, Nom du pilote : pcnet32

  Il s'agit de la PCnet-PCI -- similaire  la PCnet-32, mais conue pour
  des systmes bass sur le bus PCI. De nouveau, consultez les
  informations ci-dessus sur la PCnet-32. Cela signifie que vous devez
  construire un noyau comportant le support du BIOS PCI. La 970A ajoute
  le support du mode _f_u_l_l _d_u_p_l_e_x ainsi que d'autres fonctionnalits par
  rapport  la conception d'origine de la 970.

  Notez que l'implmentation de Boca pour la 79C970 ne fonctionne pas
  sur les machines Pentium rapides. Il s'agit d'un problme matriel,
  puisqu'il affecte aussi les utilisateurs DOS. Consultez la section sur
  Boca pour plus de dtails.


  55..44..44..  AAMMDD 7799CC997711 ((PPCCnneett--FFAASSTT))

  Statut : Support, Nom du pilote : pcnet32

  Il s'agit de la puce 100 Mbits d'AMD pour les systmes PCI, qui
  comporte elle aussi le mode _f_u_l_l _d_u_p_l_e_x. Elle a t introduite en juin
  1996 sur le march.


  55..44..55..  AAMMDD 7799CC997722 ((PPCCnneett--FFAASSTT++))

  Statut : Inconnu, Nom du pilote : pcnet32

  Devrait marcher exactement comme la '971, mais reste  confirmer quand
  mme.


  55..44..66..  AAMMDD 7799CC997744 ((PPCCnneett--SSCCSSII))

  Statut : Support, Nom du pilote : pcnet32

  Il s'agit de la PCnet-SCSI -- qui  la base est traite comme une 970
  du point de vue Ethernet. Consultez aussi les informations ci-dessus.
  Ne demandez pas si la partie SCSI de la puce est supporte -- il
  s'agit de l'_E_t_h_e_r_n_e_t_-_H_O_W_T_O, pas du _S_C_S_I_-_H_O_W_T_O.


  55..55..  AAnnsseell CCoommmmuunniiccaattiioonnss



  55..55..11..  AACC33220000 EEIISSAA

  Statut : Partiellement support, Nom du pilote : ac3200

  Notez que pour accder  ce pilote lors du make config vous devez
  encore rpondre `Y'  la question ``Prompt for development and/or
  incomplete code/drivers?'' au tout dbut. C'est simplement d au
  manque de retour d'informations sur la stabilit du pilote, tant
  donn qu'il s'agit d'une carte relativement rare.

  Ce pilote est inclus dans le noyau actuel comme tant en phase de test
  `alpha'. Il est bas sur la classique puce NS8390 utilise dans les
  cartes NE2000 et WD80x3. Veuillez consulter ``Pilotes
  `alpha''' dans le prsent document pour des informations importantes
  concernant les pilotes `alpha'.

  Si vous l'utilisez, veuillez informer l'un d'entre nous de la faon
  dont les choses fonctionnent, car nous avons eu peu de retour
  d'informations, mme si le pilote est dans le noyau depuis la version
  1.1.25.

  Si vous avez l'intention d'utiliser ce pilote comme module chargeable,
  vous devriez lire ``Utilisation des pilotes         Ethernet comme
  modules'' pour des informations spcifiques aux modules.



  55..66..  AApprriiccoott



  55..66..11..  AApprriiccoott XXeenn--IIII OOnn BBooaarrdd EEtthheerrnneett

  Statut : Support, Nom du pilote : apricot

  Cette carte Ethernet sur carte-mre utilise une puce i82596  contrle
  du bus. Elle ne peut se trouver qu' l'adresse d'E/S 0x300. En
  consultant le source du pilote, il apparat que l'IRQ est
  matriellement fixe  10.

  Les premires versions du pilote avaient une tendance  croire que
  tout ce qui vivait en 0x300 tait un adaptateur rseau Apricot.
  Depuis, l'adresse matrielle est teste afin d'viter ces dtections
  errones.


  55..77..  AArrccnneett

  Statut : Support, Nom du pilote : arcnet (arc-rimi, com90xx,
  com20020)

  Avec le cot vraiment trs bas et les meilleures performances
  d'Ethernet, il est probable que la plupart des endroits disposant d'un
  rseau vont se dbarrasser de leur matriel Arcnet pour rien, ce qui
  amnera un grand nombre de systmes personnels  utiliser Arcnet.

  Un avantage d'Arcnet est que toutes les cartes ont des interfaces
  identiques, donc un seul pilote fonctionnera pour tout le monde. Il
  comporte aussi une gestion intgre des erreurs, et est donc suppos
  ne jamais perdre un paquet. (Chouette pour le trafic UDP !)

  Le pilote Arcnet d'Avery Pennarun est dans le noyau par dfaut depuis
  la version 1.1.80. Le pilote Arcnet utilise `arc0' comme nom au lieu
  de l'`eth0' habituel pour les priphriques Ethernet.

  Vous pouvez envoyer rapports de bogues et comptes-rendus victorieux
  concernant Arcnet  :

  apenwarr@foxnet.net

  Le noyau standard comporte des fichiers d'information pour la
  configuration des cavaliers et des aides plus gnrales.

  Le pilote est galement cens fonctionner avec les cartes ARCnet
  100 Mb/s !


  55..88..  AATT&&TT

  Notez que le StarLAN d'AT&T est une technologie orpheline, comme le
  LattisNet de SynOptics, et qu'elle ne peut pas tre utilise dans un
  environnement 10Base-T standard, sans un hub qui `parle' les deux
  protocoles.


  55..88..11..  AATT&&TT TT77223311 ((LLaannPPAACCEERR++))

  Statut : Non support

  Ces cartes StarLAN utilisent une interface similaire  la puce i82586.
  A une poque, Matthijs Melchior (matthijs.n.melchior@att.com) jouait
  avec le pilote de la 3c507, et avait presque quelque chose
  d'utilisable qui fonctionnait. Nous n'en avons pas entendu parler
  beaucoup depuis lors.


  55..99..  BBooccaa RReesseeaarrcchh

  Oui, ils font autre chose que des cartes sries multi-ports. :-)


  55..99..11..  BBooccaa BBEENN ((IISSAA,, VVLLBB;; PPCCII))

  Statut : Support, Nom du pilote : pcnet32, lance

  Ces cartes sont bases sur les puces PCnet d'AMD. Les acheteurs
  exigeants doivent tre prvenus que de nombreux utilisateurs ont eu
  des problmes sans fin avec ces cartes VLB/PCI. Les propritaires de
  systmes Pentium rapides ont t tout particulirement touchs. Notez
  qu'il ne s'agit pas d'un problme de pilote, puisqu'il touche aussi
  les utilisateurs de DOS/Windows/NT. Le numro du support technique de
  Boca est le 1 (407) 241-8088,

  (NDT : Ce numro est bien entendu aux tats-Unis.)

  et vous pouvez aussi les joindre  75300.2672@compuserve.com. Les
  anciennes cartes ISA ne semblent pas souffrir des mmes maux.

  Donald a ralis un test comparatif entre les cartes PCI Boca et une
  implmentation similaire d'Allied Telsyn avec la puce PCnet/PCI, qui
  montrait que le problme se situe dans l'implmentation faite par Boca
  de la puce PCnet/PCI. On peut consulter les rsultats de ce test sur
  le serveur WWW de Don :

       Linux @ CESDIS <http://cesdis.gsfc.nasa.gov/linux/>


  Boca offre une `rparation - garantie' aux propritaires affects par
  ce problme qui entrane l'ajout d'un des condensateurs manquants,
  mais il semble que cette correction ne fonctionne pas  100 % pour la
  plupart des gens, bien que cela en aide quelques uns.

  Si vous pensez _e_n_c_o_r_e acheter une de ces cartes, alors essayez au
  moins d'obtenir une clause de retour inconditionnel sous 7 jours, pour
  que vous puissiez la rendre si elle ne fonctionne pas correctement sur
  votre systme.

  Des informations plus gnrales sur les puces AMD se trouvent
  dans ``AMD LANCE''.

  Plus d'informations techniques sur les cartes Ethernet bases sur
  l'AMD LANCE sont disponibles dans ``Notes sur         l'AMD...''.


  55..1100..  CCaabblleettrroonn

  Donald crit : ``Oui, encore une autre de ces socits qui ne donnera
  pas ses informations pour programmer. Ils ont attendu des mois avant
  de confirmer qu'en fait toutes leurs informations taient
  propritaires, gaspillant dlibrment mon temps. vitez leurs cartes
  comme la peste si vous le pouvez.  Notez aussi que certaines personnes
  ont appel Cabletron, et se sont entendues dire des choses comme `un
  certain D. Becker travaille sur un pilote pour Linux' -- laissant
  entendre que je travaillais pour eux.  Ce N'est PAS le cas.''


  Apparemment, Cabletron a chang sa politique  propos des informations
  sur la programmation (tout comme Xircom) depuis que Donald a fait ce
  commentaire il y a quelques annes. Envoyez un e-mail 
  support@ctron.com si vous voulez vrifier ce point prcis, ou demander
  des informations techniques. Toutefois,  l'heure actuelle, il y a
  trs peu de demandes pour des pilotes mis  jour pour les cartes E20xx
  et E21xx.


  55..1100..11..  EE1100****,, EE1100****--xx,, EE2200****,, EE2200****--xx

  Statut : Partiellement support, Nom du pilote : ne (+8390)

  Il s'agit de presque-clones de NEx000 qui fonctionnent avec les
  pilotes NEx000 standard d'aprs les informations qui nous sont
  revenues, grce  un test spcial-Cabletron dans la procdure de
  dtection. S'il y a le moindre problme, il ne sera trs certainement
  pas rsolu, car les informations de programmation ne sont pas
  disponibles.



  55..1100..22..  EE22110000

  Statut : Partiellement support, Nom du pilote : e2100 (+8390)

  Un fois de plus, on ne peut pas faire grand-chose quand les
  informations de programmation sont propritaires. La E2100 bnficie
  d'une conception lamentable. Ds qu'elle mappe sa mmoire partage
  pendant un transfert de paquet, elle le fait en utilisant _t_o_u_t_e _l_a
  _z_o_n_e _d_e _1_2_8 _K_o !  Cela signifie que vous _n_e _p_o_u_v_e_z _p_a_s, sur cette
  zone, utiliser de faon scurise un autre priphrique  mmoire
  partage gr par interruption, y compris une autre E2100. Cela
  fonctionnera la plupart du temps, mais de temps  autre cela vous
  sautera  la figure.  (Oui, on pourrait viter ce problme en inhibant
  les interruptions pendant le transfert des paquets, mais dans ce cas-
  l on perdra pratiquement  coup sr des tops d'horloge). De plus, si
  vous programmez incorrectement la carte, ou que vous arrtez la
  machine juste au mauvais moment, mme le bouton de `reset' ne la
  rendra pas  la vie. Vous _d_e_v_r_e_z teindre la machine et _a_t_t_e_n_d_r_e
  qu'elle se repose pendant 30 secondes.

  La slection du support physique est automatique, mais vous pouvez
  outrepasser cette fonctionnalit en utilisant les bits de poids
  faibles du paramtre dev->mem_end. Consultez ``PARAM_2''. Les
  utilisateurs des modules peuvent spcifier une valeur xcvr=N comme
  option dans le fichier /etc/conf.modules.

  Ne prenez pas non plus la E2100 pour un clone de NE2100. L'E2100
  repose sur une DP8390 de National Semiconductor  mmoire partage, 
  peu prs similaire  une WD8013 avec des lsions crbrales, tandis
  que la NE2100 (et la NE1500) utilise une conception base sur la puce
   contrle du bus LANCE d'AMD.

  Vous trouverez un pilote pour la E2100 dans le noyau standard.
  Toutefois, au vu de l'indisponibilit des informations de
  programmation, n'attendez pas des corrections de bogues. N'en utilisez
  pas  moins d'en avoir une sur les bras.

  Si vous avez l'intention d'utiliser ce pilote sous la forme d'un
  module chargeable, vous devriez probablement consulter ``Utiliser les
  pilotes Ethernet comme modules'' pour des informations spcifiques aux
  modules.


  55..1100..33..  EE2222****

  Statut : Partiellement support, Nom du pilote : lance

  Si l'on en croit les informations trouves dans un bulletin technique
  de Cabletron, ces cartes utilisent le jeu de puces standard PC-net
  d'AMD (section ``AMD PC-Net'') et devraient fonctionner avec le pilote
  gnrique lance.



  55..1111..  CCooggeenntt

  Voici o et comment les joindre :

          Cogent Data Technologies, Inc.
          175 West Street, P.O. Box 926
          Friday Harbour, WA 98250, USA.

          Cogent Sales              (service commercial)
          15375 S.E. 30th Place, Suite 310
          Bellevue, WA 98007, USA.

          Technical Support:        (support technique)
          Phone (360) 378-2929 between 8am and 5pm PST
                           (Tlphone entre 8h et 17h, heure de la cte
                            Pacifique)
          Fax (360) 378-2882
          Compuserve GO COGENT
          Bulletin Board Service (360) 378-5405
          Internet: support@cogentdata.com




  55..1111..11..  EEMM110000--IISSAA//EEIISSAA

  Statut : Partiellement support, Nom du pilote : smc9194

  Ces cartes utilisent la puce SMC 91c100 et devraient fonctionner avec
  le pilote SMC 91c92, mais cela reste  vrifier.


  55..1111..22..  CCooggeenntt eeMMAASSTTEERR++,, EEMM110000--PPCCII,, EEMM440000,, EEMM996600,, EEMM996644

  Statut : Support, Nom du pilote : de4x5, tulip

  Il s'agit encore une fois d'une implmentation de la 21040 de DEC,
  dont on peut esprer qu'elle fonctionne correctement avec le pilote
  21040 classique.

  L'EM400 et l'EM964 sont des cartes  quatre ports qui utilisent un
  pont DEC 21050 et quatre puces 21040.

  Consultez ``DEC 21040'' pour plus d'information sur ces cartes, et
  l'tat d'avancement actuel du pilote.


  55..1122..  CCoommppaaqq

  Compaq n'est pas vraiment dans le domaine de la conception et de la
  fabrication de cartes Ethernet, mais beaucoup de leurs systmes
  comportent des contrleurs Ethernet intgrs  la carte-mre.


  55..1122..11..  CCoommppaaqq DDeesskkpprroo // CCoommppaaqq XXLL ((EEmmbbeeddddeedd AAMMDD CChhiipp))

  Statut : Support, Nom du pilote : pcnet32


  Des machines comme celles de la srie XL ont une puce PCI 79c97x d'AMD
  sur la carte-mre qui peut tre utilise avec le pilote LANCE
  standard. Mais avant de pouvoir l'utiliser, vous devez faire quelques
  manipulations pour que le BIOS PCI se trouve  une place o Linux peut
  le voir. Frank Maas a t suffisamment sympa pour nous fournir les
  dtails :

  ``Le problme avec cette machine Compaq est que le point d'entre du
  bus PCI est charg en mmoire haute,  un endroit o le noyau Linux ne
  pourra pas (n'ira pas) le chercher. Rsultat : la carte n'est jamais
  dtecte ni utilisable (en passant : la souris ne fonctionnera pas non
  plus). La manire de contourner le problme (telle qu'elle est dcrite
  en dtail dans http://www-c724.uibk.ac.at/XL/) est de charger MS-DOS,
  de lancer un petit pilote que Compaq a crit puis de charger le noyau
  Linux en utilisant LOADLIN. Ok, je vous laisse le temps de dire
  'beurk', mais pour l'instant c'est la seule solution qui fonctionne
  que je connaisse. Le petit pilote se contente de dplacer le
  rpertoire PCI  un endroit o il est normalement stock (et o Linux
  peut le trouver).''

  Des informations plus gnrales sur les puces AMD se trouvent
  dans ``AMD LANCE''.



  55..1122..22..  CCoommppaaqq NNeetttteelllliiggeenntt//NNeettFFlleexx ((EEmmbbeeddddeedd TThhuunnddeerrLLAANN CChhiipp))

  Statut : Support, Nom du pilote : tlan

  Ces systmes utilisent une puce Texas Instrument ThunderLAN, pour plus
  d'informations, rfrez vous  la section ``ThunderLAN''.



  55..1133..  DDaannppeexx



  55..1133..11..  DDaannppeexx EENN99440000

  Statut : Support, Nom du pilote : de4x5, tulip

  Encore une autre carte base sur la puce 21040 de DEC, dont on sait
  qu'elle fonctionne correctement, et  un prix relativement modr.

  Consultez ``DEC 21040'' pour plus d'information sur ces cartes, et
  l'tat d'avancement actuel du pilote.



  55..1144..  DD--LLiinnkk



  55..1144..11..  DDEE--110000,, DDEE--220000,, DDEE--222200--TT,, DDEE--225500


  Statut : Support, Nom du pilote : ne (+8390)

  Certaines des premires cartes D-Link ne possdaient pas la signature
  0x57 en PROM, mais le pilote ne2000 en a connaissance. Pour les cartes
  configurables par logiciel, vous pouvez obtenir le programme de ad hoc
  sur www.dlink.com. Les cartes DE2** taient celles les plus
  frquemment indiques comme possdant des erreurs de correspondance
  sur des fausses adresses de transfert avec les premires versions de
  Linux. Notez qu'il existe aussi des cartes chez Digital (DEC, Digital
  Equipment Corporation) nommes DE100 et DE200, mais la similitude
  s'arrte l.


  55..1144..22..  DDEE--552200

  Statut : Support, Nom du pilote : pcnet32

  Il s'agit d'une carte PCI qui utilise la version PCI de la puce LANCE
  d'AMD. Des informations sur la slection DMA et la numrotation des
  puces se trouvent dans ``AMD LANCE''.

  Des informations plus techniques sur les cartes Ethernet bases sur la
  puce LANCE d'AMD sont disponibles dans ``Notes         sur l'AMD...''.


  55..1144..33..  DDEE--552288

  Statut : Support, Nom du pilote : ne, ne2k-pci (+8390)

  On dirait que D-Link a aussi commenc  fabriquer des clones de
  NE2000.



  55..1144..44..  DDEE--553300

  Statut : Support, Nom du pilote : de4x5, tulip

  Il s'agit d'une implmentation gnrique de la puce PCI 21040 de DEC,
  dont on sait qu'elle fonctionne avec le pilote gnrique 21040
  `tulip'.

  Consultez ``DEC 21040'' pour plus d'information sur ces cartes, et
  l'tat d'avancement actuel du pilote.


  55..1144..55..  DDEE--660000

  Statut : Support, Nom du pilote : de600

  Les utilisateurs de portables et autres personnes qui souhaitent un
  moyen rapide de mettre leur ordinateur sur Ethernet pourront tre
  intresss par ceci. Le pilote est inclus dans l'arborescence du noyau
  par dfaut. Bjorn Ekwall bj0rn@blox.se a crit le pilote.  Attendez-
  vous  des taux de transfert de 180 Ko/s par le port parallle. Vous
  devriez lire le fichier README.DLINK dans l'arborescence du noyau.

  (NDT : Ce fichier est bien entendu en anglais.)

  Notez que le nom de priphrique que vous passez  ifconfig est
  _m_a_i_n_t_e_n_a_n_t eth0 et non pas celui prcdemment utilis, dl0.

  Si votre port parallle _n_e se trouve _p_a_s  l'adresse standard 0x378,
  il vous faudra recompiler le noyau. Bjorn crit : ``Puisque le pilote
  de la DE-620 essaie de supprimer la moindre microseconde dans les
  boucles, j'ai dfini l'IRQ et l'adresse du port comme des constantes
  plutt que comme des variables. Cela donne une vitesse utilisable,
  mais cela signifie aussi que vous ne pouvez pas changer ces valeurs
  depuis par exemple lilo ; vous _devez_ recompiler...''  Notez aussi
  que certains portables implmentent le port parallle interne 
  l'adresse 0x3bc, ce qui est l'endroit o les ports parallles
  taient/sont sur les cartes monochromes.



  55..1144..66..  DDEE--662200

  Statut : Support, Nom du pilote : de620

  Mme chose que pour la DE-600, avec seulement deux formats de sortie.
  Bjorn a crit un pilote pour ce modle, pour les versions 1.1 et
  suprieures du noyau. Consultez les informations ci-dessus  propos de
  la DE-600.


  55..1144..77..  DDEE--665500

  Statut : Partiellement support, Nom du pilote : de650 ?

  Des gens utilisent cette carte PCMCIA depuis quelque temps dj avec
  leur portable. Il s'agit d'une conception simple base sur le 8390,
  qui ressemble beaucoup  une NE2000. La carte PCMCIA `LinkSys' et
  l'IC-Card Ethernet sont, de plus, supposes tre des clones de DE-650.
  Notez qu' l'heure actuelle, ce pilote _n_e fait _p_a_s partie du noyau
  standard, et que vous devrez donc appliquer quelques patches.

  Consultez ``Support du PCMCIA'' dans ce document, et si vous le
  pouvez, jetez un coup d'oeil  :

       La page PCMCIA de Don <http://ces
       dis.gsfc.nasa.gov/linux/pcmcia.html>



  55..1155..  DDFFII



  55..1155..11..  DDFFIINNEETT--330000 eett DDFFIINNEETT--440000

  Statut : Support, Nom du pilote : ne (+8390)

  Ces cartes sont maintenant dtectes (depuis la version 0.99pl15)
  grce  Eberhard Moenkeberg (emoenke@gwdg.de) qui a not qu'elles
  utilisent `DFI' dans les trois premiers octets de la PROM,  la place
  de 0x57 dans les octets 14 et 15, ce que font toutes les autres cartes
  NE1000 et NE2000. (La 300 est un semblant de clone 8 bits de la
  NE1000, et la 400 est un semblant de clone NE2000.)



  55..1166..  DDiiggiittaall // DDEECC



  55..1166..11..  DDEEPPCCAA,, DDEE110000//11,, DDEE220000//11//22,, DDEE221100,, DDEE442222

  Statut : Support, Nom du pilote : depca

  De la documentation incluse dans le fichier source depca.c comprend
  des informations sur la faon d'utiliser plus d'une de ces cartes dans
  une machine. Notez que la DE422 est une carte EISA. Ces cartes sont
  toutes bases sur la puce LANCE d'AMD. Consultez ``AMD LANCE'' pour
  plus d'informations. Au maximum, deux des cartes ISA peuvent tre
  utilises, parce que leurs adresses d'E/S de base ne peuvent tre
  fixes qu' 0x300 ou 0x200. Si vous avez l'intention de le faire,
  veuillez lire les notes dans le fichier source du pilote, depca.c,
  dans l'arborescence du noyau standard.

  Ce pilote fonctionnera aussi sur les machines  processeur Alpha, et
  il comprend diffrents ioctl() avec lesquels l'utilisateur peut
  s'amuser.


  55..1166..22..  DDiiggiittaall EEtthheerrWWoorrkkss 33 ((DDEE220033,, DDEE220044,, DDEE220055))

  Statut : Support, Nom du pilote : ewrk3

  Ces cartes utilisent une puce propritaire de DEC, par opposition  la
  puce LANCE utilise dans les cartes antrieures comme la DE200. Ces
  cartes peuvent fonctionner en mmoire partage ou en E/S programmes,
  bien que vous ayez un gain de performance de 50 % en utilisant le mode
  PIO (E/S programmes). La taille de la mmoire partage peut tre
  rgle  2 Ko, 32 Ko, ou 64 Ko, mais seules les valeurs 2 et 32 ont
  t testes avec ce pilote. David dit que les performances sont
  virtuellement les mmes entre le mode 2 Ko et le mode 32 Ko. Plus
  d'informations (y compris l'utilisation du pilote comme module
  chargeable) figurent en tte du fichier source du pilote, ewrk3.c,
  ainsi que dans le fichier README.ewrk3. Ces deux fichiers se trouvent
  dans la distribution standard du noyau. Ce pilote supporte les CPU
  alpha tout comme le depca.c.

  Le pilote standard a un certain nombre d'appels ioctl() intressants
  qui peuvent tre utiliss pour lire ou effacer les statistiques sur
  les paquets, lire/crire l'EEPROM, changer l'adresse matrielle, et
  d'autres choses du mme genre. Les bidouilleurs pourront lire le code
  source pour plus d'information  ce sujet.

  David a aussi crit un utilitaire de configuration pour cette carte
  (outre les lignes du programme DOS NICSETUP.EXE) ainsi que d'autres
  outils. Vous pouvez les trouver sur la majorit des sites Linux dans
  le rpertoire /pub/Linux/system/Network/management -- cherchez un
  fichier ewrk3tools-X.XX.tar.gz.

  (NDT : Le lecteur franais aura bien entendu tout intrt  utiliser
  un site miroir, plus rapide. Par exemple :

  ftp://ftp.lip6.fr/pub/linux/sunsite/system/Network/management)


  55..1166..33..  DDEE442255 EEIISSAA,, DDEE443344,, DDEE443355,, DDEE550000

  Statut : Support, Nom du pilote : de4x5, tulip

  Ces cartes sont bases sur la puce 21040 mentionne plus bas.  La
  DE500 utilise les puces 21140 pour fournir des connexions Ethernet
  10/100Mb/s. Lisez la section sur la 21040 ci-dessous pour plus
  d'informations.  Il existe aussi quelques option de compilation qui
  permettent aux cartes non conues par DEC de fonctionner avec ce
  pilote. Jetez un coup d'oeil  README.de4x5 pour les dtails.

  Toutes les cartes Digital raliseront la dtection automatique du
  mdia ( l'exception, temporaire, de la DE500  cause d'un problme de
  brevet).

  Ce pilote est aussi prt  fonctionner avec les processeurs Alpha et
  accepte d'tre charg comme module. Les utilisateurs peuvent accder
  aux fonctionnalits internes du pilotes par des appels ioctl() -- voir
  l'outil ewrk3 et les sources de4x5.c pour des informations sur la
  faon de procder.


  55..1166..44..  DDEECC 2211004400,, 2211004411,, 22111144xx,, TTuulliipp

  Statut : Support, Nom du pilote : de4x5, tulip


  La 21040 de DEC est une solution Ethernet en une seule puce  contrle
  propose par Digital, similaire  la PCnet d'AMD. La 21040 est
  spcifiquement conue pour l'architecture  bus PCI. Les nouvelles
  cartes PCI EtherPower de SMC l'utilisent.

  Vous avez le choix entre _d_e_u_x pilotes pour les cartes bases sur cette
  puce. Vous pouvez utiliser le pilote de la DE425 dont nous avons parl
  plus haut, et le pilote gnrique `tulip' pour 21040.

  AAtttteennttiioonn :: Mme si votre carte est base sur cette puce, _l_e_s _p_i_l_o_t_e_s
  _p_e_u_v_e_n_t _n_e _p_a_s _f_o_n_c_t_i_o_n_n_e_r _p_o_u_r _v_o_u_s. David C. Davies crit : ``Il n'y
  aucune garantie que SOIT tulip.c SOIT de4x5.c feront fonctionner une
  autre carte base sur le DC2114x que celles pour lesquelles ils ont
  t crit. POURQUOI ??  demandez-vous. Parce qu'il existe un registre,
  le Registre multi-usages (General Purpose Register, CSR12) qui, primo,
  dans la DC21140A est programmable par chaque fabricant et ils le font
  tous d'une faon diffrente, et, secundo, dans la DC21142/3 est
  maintenant un registre de contrle SIA (faon DC21041). La seule
  petite lueur d'espoir est que nous puissions dcoder la SROM pour
  aider  la configuration du pilote. Et encore, ce n'est pas une
  solution garantie puisque chez certains constructeurs (par exemple la
  carte 9332 de SMC) on ne suit pas le format de programmation SROM
  recommand par Digital Semiconductor.''

  En termes non-techniques, cela signifie que si vous n'tes pas sr(e)
  qu'une carte inconnue avec une puce DC2114x fonctionnera avec le(s)
  pilote(s) Linux, alors vous devez vous assurer que vous pourrez rendre
  la carte  votre revendeur _a_v_a_n_t de l'avoir paye.

  La puce 21041 mise  jour, se trouve aussi  la place de la 21040 sur
  la plupart des cartes rcentes EtherPower de SMC. La 21140 est
  destine au support du 100Base-? et fonctionne avec les pilotes Linux
  de la puce 21040. Pour utiliser le pilote de4x5 de David avec des
  cartes non conues par DEC, lisez le fichier README.de4x5 pour les
  dtails.

  Donald a utilis des cartes EtherPower-10/100 de SMC pour dvelopper
  le pilote `tulip'. Notez que le pilote qui se trouve dans
  l'arborescence du noyau  l'heure actuelle n'est pas la version la
  plus  jour. Si vous avez des problmes avec ce pilote, vous devriez
  rcuprer la dernire version sur le site FTP/WWW de Donald.

       Pilote Tulip <http://ces
       dis.gsfc.nasa.gov/linux/drivers/tulip.html>


  L'URL ci-dessus contient aussi une liste (non exhaustive) de
  diffrents cartes/constructeurs qui utilisent la puce 21040.

  Notez galement que le pilote tulip est encore considr comme un
  pilote _a_l_p_h_a (voir ``Pilotes alpha'') actuellement, et qu'il doit donc
  tre trait comme tel. Pour l'utiliser, vous devrez diter
  arch/i386/config.in et enlever les commentaires qui entourent la ligne
  sur le support CONFIG_DEC_ELCP.

  Donald a mme cr une liste de diffusion pour les annonces sur le
  support du pilote tulip, etc. Pour vous y abonner, il vous suffit de
  taper :

  echo subscribe | /bin/mail linux-tulip-request@cesdis.gsfc.nasa.gov


  55..1177..  FFaarraalllloonn

  Farallon vend des adaptateurs et des transceivers EtherWave. Ce
  priphrique permet de mettre en srie plusieurs priphriques
  10baseT.


  55..1177..11..  EEtthheerrwwaavvee ddee FFaarraalllloonn

  Statut : Support, Nom du pilote : 3c509

  On rapporte qu'il s'agit d'un clone de 3c509 qui inclut le transceiver
  EtherWave. Des gens les ont utiliss avec succs sous Linux avec la
  version actuelle du pilote 3c509. C'est bien trop cher pour une
  utilisation gnralise, mais c'est une bonne option pour des cas
  particuliers.   Les prix chez Hublet dmarrent  125 dollars (environ
  750 francs), et l'EtherWave ajoute entre 75 et 100 dollars (450  600
  francs) au prix de la carte -- c'est bien si vous avez tir un cble
  trop court, mais pas si vous avez deux rseaux qui tombent trop
  courts.


  55..1188..  FFuujjiittssuu

  Contrairement  de nombreux fabricants de puces, Fujitsu a aussi
  fabriqu et vendu des cartes rseau bases sur les leurs.


  55..1188..11..  FFuujjiittssuu FFMMVV--118811//118822//118833//118844

  Statut : Support, Nom du pilote : fmv18x

  Si on en croit le pilote, ces cartes sont faites dans la ligne de
  l'implmentation de la Fujitsu MB86965, ce qui les rend trs
  similaires aux cartes Allied Telesis AT1700.


  55..1199..  HHeewwlleetttt PPaacckkaarrdd

  Les cartes 272** utilisent des E/S programmes, similaires aux cartes
  NE*000, mais le port de transferts de donnes peut tre `teint' quand
  vous n'y accdez pas, ce qui vite les problmes avec les pilotes qui
  ralisent une dtection automatique.

  Merci  Glenn Talbott d'avoir aid  claircir la confusion qui
  rgnait dans cette section en ce qui concerne les numros de version
  des matriels HP.


  55..1199..11..  2277224455AA

  Statut : Support, Nom du pilote : hp (+8390)

  Carte 8 bits 10BaseT base sur le 8390, non recommande pour toutes
  les raisons des 8 bits. Elle a t repense il y a quelques annes
  pour augmenter l'intgration, ce qui a caus des changements dans les
  dures d'initialisation, qui affectent les programmes de test, mais
  pas les pilotes rseau. (La nouvelle carte n'est pas `prte' aussi
  vite que l'ancienne aprs tre entre ou sortie du mode en boucle
  locale (_l_o_o_p_b_a_c_k)).

  Si vous avez l'intention d'utiliser ce pilote sous la forme d'un
  module chargeable, vous devriez probablement consulter ``Utiliser les
  pilotes Ethernet comme modules'' pour des informations spcifiques aux
  modules.





  55..1199..22..  HHPP EEtthheerrTTwwiisstt,, PPCC LLaann++ ((2277224477,, 2277225522AA))

  Statut : Support, Nom du pilote : hp+ (+8390)

  La HP PC Lan+ est diffrente de la carte HP PC Lan standard. Ce pilote
  a t ajout  la liste des pilotes du noyau standard pendant le cycle
  de dveloppement des version 1.1.x. Il peut tre utilis soit en mode
  PIO (E/S programmes) comme une ne2000, ou en mode mmoire partage
  comme une wd8013.

  La 47B est une carte 16 bits 10BaseT avec AUI  base de 8390, et la
  52A est une carte 16 bits ThinLAN avec AUI  base de 8390. Ces cartes
  comportent 32 Ko de mmoire vive embarque pour le tampon de
  rception/transmission des paquets au lieu des 16 Ko habituels, et
  elles offrent toutes les deux une fonction de dtection automatique du
  connecteur rseau.

  Si vous avez l'intention d'utiliser ce pilote sous la forme d'un
  module chargeable, vous devriez probablement consulter ``Utiliser les
  pilotes Ethernet comme modules'' pour des informations spcifiques aux
  modules.


  55..1199..33..  HHPP--JJ22440055AA

  Statut : Support, Nom du pilote : lance

  Ces cartes sont meilleur march, et lgrement plus rapides que la
  27247/27252A, mais il leur manque certaines fonctionnalits, comme la
  connectivit AUI ou ThinLAN (10Base2), et un support pour PROM de
  dmarrage (boot PROM). C'est une conception plutt gnrique de la
  LANCE, mais une dcision mineure de conception la rend incompatible
  avec un pilote gnrique `NE2100'. Un support spcial pour cette carte
  (y compris la lecture du canal DMA sur la carte) est inclus grce aux
  informations fournies par Glenn Talbott de chez HP.

  Plus d'informations techniques sur les cartes base sur la puce AMD se
  trouvent dans ``Notes sur AMD...''.


  55..1199..44..  CCaarrttee EEtthheerrnneett eemmbbaarrqquuee ddee ll''HHPP--VVeeccttrraa

  Statut : Support, Nom du pilote : lance

  L'HP-Vectra possde une puce PCnet d'AMD sur sa carte-mre. La
  slection du DMA et des informations sur la numrotation de la puce se
  trouvent dans ``AMD LANCE''.

  Plus d'informations techniques sur les cartes bases sur la puce AMD
  se trouvent dans ``Notes sur AMD...''.


  55..1199..55..  CCaarrtteess HHPP 1100//110000 VVGG AAnnyy LLaann ((2277224488BB,, JJ22557733,, JJ22557777,, JJ22558855,,
  JJ997700,, JJ997733))

  Statut : Support, Nom du pilote : hp100

  Ce pilote supporte aussi certains produits Complex VG. Comme ce pilote
  supporte les cartes ISA, EISA et PCI, il se trouve dans la section des
  cartes ISA quand vous faites un make config dans les sources du noyau.


  55..1199..66..  HHPP NNeettSSeerrvveerr 1100//110000TTXX PPCCII ((DD55001133AA))

  Statut : Support, Nom du pilote : eepro100

  Apparemment, ces cartes sont juste des cartes Intel EtherExpress Pro
  10/100B card dont on a chang la marque. Allez voir la section sur
  Intel pour plus de dtails.


  55..2200..  IIBBMM // IInntteerrnnaattiioonnaall BBuussiinneessss MMaacchhiinneess



  55..2200..11..  IIBBMM TThhiinnkkppaadd 330000

  Statut : Support, Nom du pilote : znet

  Celui-ci est compatible avec le Z-note de Znith, bas sur une puce
  Intel. Voir ``Z-note''.

  Ce site est suppos avoir une base de donnes exhaustive de choses
  utiles pour les versions rcentes du Thinkpad. Je ne l'ai pas vrifi
  moi-mme.


       Thinkpad-info <http://peipa.essex.ac.uk/html/linux-
       thinkpad.html>


  Pour ceux d'entre vous qui n'ont pas de navigateur WWW  porte de la
  main, essayez peipa.essex.ac.uk:/pub/tp750/.


  55..2200..22..  EEtthheerrnneett dd''IIBBMM IIBBMM CCrreeddiitt CCaarrdd AAddaappttoorr ffoorr EEtthheerrnneett -- AAddaappttaa
  tteeuurr ``CCrreeddiitt CCaarrdd'' ppoouurr

  Statut : Partiellement support, Nom du pilote : ? (distribu
  sparment)

  Des personnes utilisent aussi cette carte PCMCIA avec Linux. Comme
  dj not, vous aurez besoin d'un jeu de puces PCMCIA support par
  Linux sur votre portable, et vous devrez mettre  jour le support
  PCMCIA dans le noyau standard.

  Consultez ``Support PCMCIA'' dans ce document, et si vous le pouvez
  jetez un coup d'oeil  :


       La page PCMCIA de Donald <http://ces
       dis.gsfc.nasa.gov/linux/pcmcia.html>



  55..2200..33..  IIBBMM TTookkeenn RRiinngg

  Statut : Partiellement support, Nom du pilote : ibmtr

  Le support de Token Ring ncessite plus que la simple criture d'un
  pilote, il faut aussi crire les routines de routage source pour Token
  Ring. C'est le routage par la source qui sera le plus long  crire.

  Peter De Schrijver a pass du temps sur Token Ring rcemment, et a
  travaill avec des cartes Token Ring ISA et MCA d'IBM.

  Le code Token Ring actuel a t inclus dans les premiers noyaux des
  sries 1.3.x.

  Peter dit qu'il a t test  l'origine avec une carte Token Ring MCA
  16/4 Megabit, mais qu'il devrait fonctionner avec d'autres cartes
  bases sur Tropic.
  55..2211..  CCaarrtteess EEtthheerrnneett IICCLL



  55..2211..11..  IICCLL EEtthheerrTTeeaamm 1166ii//3322

  Statut : Support, Nom du pilote : eth16i

  Mika Kuoppala (miku@pupu.elt.icl.fi) a crit ce pilote, qui a t
  inclus dans les premiers noyaux 1.3.4x. Cette carte utilise la puce
  MB86965 de Fujitsu qui est aussi utilise dans les cartes AT1700.


  55..2222..  CCaarrtteess EEtthheerrnneett IInntteell

  Note : les noms de certaines cartes Intel sont ambigus au possible et
  prtent  confusion . Si vous avez un doute, vrifiez le numro sur la
  puce principale de la carte i8xxxx, ou, pour les cartes PCI, utilisez
  les informations disponibles dans le repertoire /proc et ensuite,
  comparez-les aux numros lists ici.


  55..2222..11..  EEtthheerr EExxpprreessss

  Statut : Support, Nom du pilote : eexpress

  Cette carte utilise l'Intel i82586. Les premires versions de ce
  pilote (dans les noyaux 1.2) taient classes en cours de test
  `alpha', parce qu'elles ne fonctionnaient pas correctement pour la
  plupart des gens. Le pilote des versions 2.0 du noyau semble
  fonctionner bien mieux pour ceux qui l'ont essay. Toutefois, les
  sources le donnent comme tant toujours exprimental, et pose pas mal
  de probleme sur les machines rapides.

  Les commentaires au dbut du fichier source donnent la liste de
  certains des problmes (et solutions) associs  ces cartes.Il a t
  rapport que la bidouille de ralentissement qui consiste  remplacer
  tous les outb par des outb_p dans le pilote a permis d'viter des
  blocages pour au moins une personne.


  55..2222..22..  EEtthheerr EExxpprreessss PPRROO//1100

  Statut : Support, Nom du pilote : eepro

  Bao Chau Ha a crit un pilote pour ces cartes, qui a t inclus dans
  les premiers noyaux 1.3.x. Il peut aussi fonctionner avec certains des
  systmes Ethernet intgrs de Compaq, bass sur la puce i82595.


  55..2222..33..  EEtthheerr EExxpprreessss PPRROO//1100 PPCCII ((EEIISSAA))

  Statut : Partiellement support, Nom du pilote : ? (distribu
  sparement)

  John Stalba (stalba@ultranet.com) a crit un pilote pour la version
  PCI. Ces cartes utilisent la puce d'interface PCI PLX9036 avec la puce
  contrleur-rseau i82596 d'Intel. Si votre carte comporte la i82557,
  alors vous _n_'_a_v_e_z _p_a_s cette carte, mais au contraire la version dont
  il est question ci-dessous, qui ncessite par consquent le pilote
  EEPro100 plutt que celui-ci.

  Vous pouvez obtenir le pilote `alpha' pour les cartes PCI PRO/10,
  ainsi que les instructions pour l'utiliser,  :


       Pilote EEPro10 <http://www.ultra
       net.com/~stalba/eep10pci.html>


  Si vous avez la carte EISA, vous devrez certainement bidouiller un peu
  le pilote pour prendre en compte les diffrents mcanismes de
  dtection (PCI ou EISA) qui sont utiliss dans chaque cas.


  55..2222..44..  EEtthheerr EExxpprreessss PPRROO 1100//110000BB

  Statut : Support, Nom du pilote : eepro100

  Notez que ce pilote _n_e fonctionnera _p_a_s avec les cartes 100A qui sont
  plus anciennes. Les numros de puces que gre le pilote sont
  i82557/i82558.

  Pour les mises  jour du pilote et / ou des informations, consultez :


       Page de l'EEPro-100B <http://ces
       dis.gsfc.nasa.gov/linux/drivers/eepro100.html>


  Pour vous inscrire  la liste de diffusion relative  ce pilote, tapez
  la commande suivante :


       echo subscribe | /bin/mail linux-eepro100-request@ces
       dis.gsfc.nasa.gov


  Apparemment Donald a t oblig de signer un accord de confidentialit
  qui tablit qu'il pouvait en fait communiquer le code-source du
  pilote !  Comment prendre une telle preuve de btise de la part
  d'Intel ?


  55..2233..  KKiinnggssttoonn

  Kingston fait plusieurs cartes, incluant des cartes  base de NE2000+,
  AMD PCnet, et DEC tulip. La majorit des cartes devrait marcher avec
  leurs pilotes respectifs. Voyez Kingston Web Page
  <http://www.kingston.com> pour plus de dtails.

  Il parat que la carte  base de KNE40 DEC 21041 tulip fonctionne trs
  bien avec le pilote tulip gnrique



  55..2244..  LLiinnkkSSyyss

  LinkSys produit tout un tas de clones de NE2000, certains tant de
  simple cartes ISA, d'autres des cartes ISA `plug and play' et mme des
  clones de NE2000 PCI bass sur l'un des jeux de puces NE2000-PCI
  supports. Il existe tout simplement trop de modles pour pouvoir tous
  les citer ici.

  LinkSys aime bien Linux, ils ont une page WWW de support spcifique,
  et Linux est imprim sur les botes de certains de leurs produits.
  Consultez :


       http://www.linksys.com/support/solution/nos/linux.htm


  55..2244..11..  CCaarrtteess LLiinnkkSSyyss EEtthheerrffaasstt 1100//110000..

  Statut : Support, Nom du pilote : tulip

  Notez que ces cartes ont connu quelques `rvisions' (c--d diffrents
  chipsets utiliss) mais toutes avaient le mme nom. La premire
  utilisait le chipset DEC. La seconde, le contrleur rseau Lite-On
  PNIC 82c168 PCI, et le support pour celle-ci a t inclus dans le
  pilote tulip standard (depuis la version 0.83). Plus d'informations
  sur PNIC  :


       http://cesdis.gsfc.nasa.gov/linux/drivers/pnic.html


  Pour plus d'informations sur les diffrentes versions de ces cartes,
  rfrez vous au site de LinkSys mentionn ci-dessus.


  55..2244..22..  LLiinnkkSSyyss PPoocckkeett EEtthheerrnneett AAddaapptteerr PPlluuss ((PPEEAAEEPPPP))

  Statut : Support, Nom du pilote : de620

  On suppose qu'il s'agit d'un clone du DE-620, et il parat que cela
  fonctionne bien avec ce pilote. Consultez ``DE-620'' pour plus
  d'information.


  55..2244..33..  AAddaappttaatteeuurr LLiinnkkSSyyss PPCCMMCCIIAA

  Statut : Support, Nom du pilote : de650 (?)

  On suppose qu'il s'agit d'un DE-650 "recarross" avec une tiquette
  diffrente.  Consultez ``DE-650'' pour plus d'information.


  55..2255..  MMiiccrrooddyynnee



  55..2255..11..  MMiiccrrooddyynnee EExxooss 220055TT

  Statut : Partiellement support, Nom du pilote : ?

  Une autre carte base sur l'i82586. Dirk Niggemann dirk-n@dircon.co.uk
  a crit un pilote qu'il classe dans la catgorie ``pr-alpha'' et dont
  il aimerait bien que les gens le testent. Ecrivez-lui pour plus de
  dtails.


  55..2266..  MMyylleexx

  Mylex peut tre joint aux numros suivants, au cas o quelqu'un aurait
  envie de leur demander quelque chose.


          MYLEX CORPORATION, Fremont Ventes: 800-77-MYLEX, (510) 796-6100 FAX:
          (510) 745-8016.



  Ils ont aussi un site WWW: Site WWW de Mylex <http://www.mylex.com>




  55..2266..11..  MMyylleexx LLNNEE339900AA,, LLNNEE339900BB

  Statut : support, Nom du pilote : lne390 (+8390)

  Ces cartes EISA plutt anciennes utilisent une implmentation 
  mmoire partage similaire aux wd80x3. Un pilote pour ces cartes est
  disponible dans les noyaux 2.2. Assurez vous de bien spcifier une
  zone de mmoire infrieure a 1 Mo ou alors, suprieure  la taille
  totale de la RAM de votre ordinateur.


  55..2266..22..  MMyylleexx LLNNPP110011

  Statut : Support, Nom du pilote : de4x5, tulip

  Il s'agit d'une carte PCI base sur la puce 21040 de DEC. On peut
  slectionner les ports 10BaseT, 10Base2 ou 10Base5 (AUI). La carte
  LNP101 a t teste et elle fonctionne avec le pilote 21040 gnrique.

  Consultez la section sur la puce 21040 (``DEC         21040'') pour
  plus d'information.


  55..2266..33..  MMyylleexx LLNNPP110044

  Statut : Partiellement support, Nom du pilote : de4x5, tulip

  La LNP104 utilise la puce 21050 de DEC pour fournir _q_u_a_t_r_e ports
  10BaseT indpendants. Elle devrait fonctionner avec les pilotes 21040
  rcents qui savent partager les IRQ, mais personne  ce jour n'a
  indiqu l'avoir essaye (autant que je sache).


  55..2277..  EEtthheerrnneett cchheezz NNoovveellll :: NNEExxxxxxxx eett lleess cclloonneess aassssoocciiss..

  Le prfixe `NE' vient de `Novell Ethernet'. Novell a suivi la
  conception la moins chre dcrite dans les documentations de National
  Semiconductor, et a vendu les droits de fabrication  Eagle (s'en est
  dbarrass ?), juste pour pouvoir mettre sur le march des cartes
  Ethernet  prix raisonnables. (La maintenant omniprsente carte
  NE2000).


  55..2277..11..  NNEE11000000,, NNEE22000000

  Statut : Support, Nom du pilote : ne (+8390)

  ``NE2000'' est maintenant un nom gnrique pour une conception
  minimaliste base sur la puce 8390 de National Semiconductor. Ces
  cartes utilisent des E/S programmes plutt que la mmoire partage,
  ce qui amne une installation plus facile mais des performances
  lgrement moins bonnes et quelques problmes. Certains des problmes
  qui peuvent survenir avec les cartes NE2000 sont cits  ``Problmes
  avec...''.

  Quelques clones de NE2000 utilisent la puce `AT/LANTic' 83905 de
  National Semiconductor, qui offre un mode  mmoire partage similaire
   celui de la wd8013 et une configuration logicielle via une EEPROM.
  Le mode  mmoire partage engendrera moins de charge processeur (et
  sera donc plus efficace) que le mode  E/S programmes.

  En gnral ce n'est pas une bonne ide de placer un clone de NE2000 
  l'adresse d'E/S 0x300 parce que pratiquement _t_o_u_s les pilotes de
  priphriques testent cette adresse au dmarrage. Certains clones de
  NE2000 bas de gamme acceptent difficilement d'tre titills au mauvais
  endroit, et ils rpondront en bloquant votre machine.  L'adresse 0x320
  est galement une mauvaise ide car les pilotes SCSI testent 0x330.

  Donald a crit un programme de diagnostic pour NE2000 (ne2k.c) qui
  fonctionne pour toutes les cartes NE2000. Consultez ``Programmes de
  diagnostic'' pour plus d'information.

  Si vous avez l'intention d'utiliser ce pilote sous la forme d'un
  module chargeable, vous devriez probablement consulter ``Utiliser les
  pilotes Ethernet comme modules'' pour des informations spcifiques aux
  modules.


  55..2277..22..  NNEE22000000--PPCCII ((RReeaallTTeekk//WWiinnbboonndd//CCoommppeexx))

  Statut : Support, Nom du pilote : ne, ne2k-pci (+8390)

  Oui, croyez-le ou non, des gens fabriquent des cartes PCI bases sur
  la vieille interface de la NE2000, conue il y a plus de dix ans.
  Actuellement, presque toutes ces cartes sont bases sur la puce 8029
  de RealTek ou la puce 89c940 de Winbond. Les cartes Compex, KTI, VIA
  et Netvin utilisent apparemment aussi ces puces, mais possdent un une
  signature PCI diffrente.

  Le dernier noyau Linux 2.0 est capable de dtecter automatiquement
  toutes ces cartes et de les utiliser. (Si vous utilisez un noyau
  version 2.0.34 ou plus ancien, vous devriez le mettre  jour pour vous
  assurer que votre carte sera dtecte). Il y a dornavant deux pilotes
  que vous pouvez utiliser, le pilote ISA/PCI originel ne.c et le pilote
  PCI plus rcent ne2k-pci.c.

  Pour utiliser le pilote original, vous devez rpondre `Y'  l'option
  `Other ISA cards' (`Autres cartes ISA ?') lorsque vous excutez make
  config car en fait vous utilisez le mme pilote NE2000 que celui des
  cartes ISA. (Cela devrait accrditer l'ide que ces cartes ne sont en
  aucune faon aussi intelligentes que, disons, une carte  base de
  PCNet-PCI ou DEC 21040...).

  Le rcent pilote PCI diffre de la version ISA/PCI par le fait que le
  support pour les cartes 8 bits NE1000 a t supprim et que les
  donnes transitent de/vers la carte en de plus gros paquets, sans les
  pauses que les vieilles ISA NE2000 ncessitaient pour oprer de faon
  fiable. Il en rsulte un pilote lgrement plus petit, et lgrement
  plus efficace, mais ne vous emballez pas trop vite, les diffrences ne
  seront pas clatantes en utilisation normale. (Si vous voulez beaucoup
  d'efficacit avec peu de charge CPU, alors une NE2000 PCI est un trs
  mauvais choix).  Des mises  jour ainsi que plus d'informations sont
  disponibles  :


       http://cesdis.gsfc.nasa.gov/linux/drivers/ne2k-pci.html


  Si vous avez une carte PCI NE2000 qui _n_'_e_s_t _p_a_s dtecte par le
  dernier pilote, veuillez contacter le responsable du pilote NE2000 qui
  est indiqu dans /usr/src/linux/MAINTAINERS, en lui joignant les
  sorties d'un cat /proc/pci et de dmesg afin que le support pour votre
  carte puisse tre ajout dans le pilote.

  Notez aussi que pas mal de fabricants de cartes sont connus pour
  mettre un autocollant `Compatible NE2000' sur les botes de leurs
  produits mme si c'est totalement diffrent (ex : PCNet-PCI ou RealTek
  8139). En cas de doute, regardez la puce principale et comparez avec
  ce qui est crit ici.



  55..2277..33..  NNEE--1100//110000

  Statut : Non support

  Il s'agit de cartes ISA 100Mb/s bases sur les puces DP83800 et
  DP83840 de National Semiconductor. Il n'y a actuellement aucun support
  logiciel, et personne n'a indiqu qu'il travaillait  un pilote.
  Apparemment, la documentation de ces puces n'est pas disponible, 
  part un bien pauvre PDF insuffisant pour crer un pilote.


  55..2277..44..  NNEE11550000,, NNEE22110000

  Statut : Support, Nom du pilote : lance

  Ces cartes utilisent la puce 7990 LANCE originelle d'AMD et sont
  supportes grce au pilote Linux lance. Les clones de NE2100 plus
  rcents reposent sur la puce mise  jour PCnet/ISA d'AMD.

  Des versions plus anciennes du pilote lance avaient des problmes pour
  obtenir la ligne d'IRQ via l'affectation automatique d'IRQ des
  cartes 7990 originelles de Novell/Eagle. Heureusement cela est
  maintenant rsolu. Si ce n'est pas le cas, spcifiez l'IRQ via LILO,
  et indiquez-nous si cela pose encore des problmes.

  La slection du DMA et des informations sur la numrotation de la puce
  se trouvent dans ``AMD LANCE''.

  Des informations plus techniques sur les cartes Ethernet bases sur
  l'AMD LANCE sont disponibles dans ``Notes sur         l'AMD...''.


  55..2277..55..  NNEE//22 MMCCAA

  Statut : Partiellement support, Nom du pilote : ne2

  Quelques cartes NE2000 MCA ont t fabriques par diverses socits.
  Ce pilote, disponible dans les noyaux 2.2 dtectera les cartes
  suivantes : Novell Ethernet Adapter NE/2, Compex ENET-16 MC/P, et
  l'Ethernet Adapter AE/2 de chez Arco.


  55..2277..66..  NNEE33220000

  Statut : Non support

  Cette vieille carte EISA utilise un 80186  8 MHz en compagnie d'un
  i82586. Personne ne travaille  un support et de toute faon, il n'y a
  ni documentation sur la carte, ni de vraie demande pour un pilote.


  55..2277..77..  NNEE33221100

  Statut : Support, Nom du pilote : ne3210 (+8390)

  Cette carte EISA est compltement diffrente de la NE3200, car elle
  utilise une puce National Semiconductor 8390. Le pilote se trouve dans
  les noyaux 2.2. Assurez vous d'avoir rgl la mmoire partage en
  dessous de 1 Mo, ou au dessus de la plus grande adresse de mmoire
  physique qui est installe sur la machine.


  55..2277..88..  NNEE55550000

  Statut : Support, Nom du pilote : pcnet32

  Ce sont juste des cartes bases sur la puce PCnet-PCI ('970A) d'AMD.
  Plus d'informations sur les cartes  base de LANCE/PCnet se trouvent
  dans ``AMD LANCE''.


  55..2288..  PPrrootteeoonn



  55..2288..11..  PPrrootteeoonn PP11337700--EEAA

  Statut : Support, Nom du pilote : ne (+8390)

  Il s'agit apparemment d'un clone de NE2000, et il fonctionne
  correctement avec Linux.


  55..2288..22..  PPrrootteeoonn PP11667700--EEAA

  Statut : Support, Nom du pilote : de4x5, tulip

  Encore une autre carte PCI base sur la puce Tulip de DEC. On rapporte
  qu'elle fonctionne correctement avec Linux.

  Consultez la section sur la puce 21040 (``DEC         21040'') pour
  plus d'informations sur le pilote.


  55..2299..  PPuurree DDaattaa



  55..2299..11..  PPDDUUCC88002288,, PPDDII88002233

  Statut : Support, Nom du pilote : wd (+8390)

  Les sries PDUC8028 et PDI8023 de cartes PureData semblent fonctionner
  correctement, grce au code de dtection spcial qu'a fourni Mike
  Jagdis jaggy@purplet.demon.co.uk. Le support pour ces cartes est
  intgr dans le pilote Western Digital (WD).


  55..3300..  RRaaccaall--IInntteerrllaann

  On peut joindre Racal-Interlan via le WWW  www.interlan.com. Je crois
  qu'ils taient connus sous le nom de MiCom-Interlan  une poque.


  55..3300..11..  EESS33221100

  Statut : Partiellement support, Nom du pilote : es3210

  Il s'agit d'une carte EISA  mmoire partage base sur le 8390. Un
  pilote exprimental pour les versions 2.2 du noyau est disponible.  On
  indique qu'il fonctionne correctement, mais la dtection de l'IRQ EISA
  et de l'adresse de mmoire partage parat ne pas fonctionner avec (au
  moins) les premires rvisions de ces cartes. (Ce problme n'est pas
  spcifique  Linux d'ailleurs). Dans ce cas, vous devez les fournir au
  pilote ; par exemple, pour une carte utilisant l'IRQ 5 et la mmoire
  partage en 0xd0000. Avec un pilote modulaire, ajoutez options es3210
  irq=5 mem=0xd0000  votre fichier /etc/conf.modules.  Si le pilote est
  intgr au noyau, donnez lui ether=5,0,0xd0000,eth0 au boot.
  L'adresse de base d'E/S est dtecte automatiquement et une valeur de
  zro doit donc tre utilise.


  55..3300..22..  NNII55001100

  Statut : Partiellement support, Nom du pilote : ni5110

  Le pilote pour ces vieilles cartes 8 bits MiCom-Interlan tait
  disponible sparment, mais on le trouve maintenant en tant que pilote
  exprimental dans les noyaux 2.2.


  55..3300..33..  NNII55221100

  Statut : Partiellement support, Nom du pilote : ni52

  Cette carte utilise aussi les puces Intel et Michael Hipp a crit un
  pilote pour elle. Il est inclus dans le noyau standard en tant que
  pilote en phase `alpha'. Michael aimerait recevoir des informations
  des utilisateurs qui possdent cette carte.  Consultez ``Les pilotes
  `Alpha''' pour des informations importantes sur l'utilisation des
  pilotes Ethernet en phase de test `alpha' avec Linux.


  55..3300..44..  NNII66551100 ((nnoott EEBB))

  Statut : Partiellement support, Nom du pilote : ni65

  Il existe galement un pilote pour la NI6510 (base sur la puce
  LANCE), et il a aussi t crit par Michael Hipp. L aussi, il s'agit
  d'un pilote `alpha'. Pour une raison inconnue, cette carte n'est pas
  compatible avec le pilote LANCE gnrique. Consultez ``Les pilotes
  `Alpha''' pour des informations importantes sur l'utilisation des
  pilotes Ethernet en phase de test `alpha' avec Linux.


  55..3300..55..  EEtthheerrBBllaasstteerr ((aakkaa NNII66551100EEBB))

  Statut : Support, Nom du pilote : lance

  Depuis le noyau 1.3.23, le pilote LANCE gnrique comprend un test
  supplmentaire pour la signature 0x52, 0x44 spcifique de la NI6510EB.
  D'autres ont indiqu que cette signature n'est pas la mme pour toutes
  les cartes NI6510EB, ce qui peut amener le pilote lance  ne pas
  dtecter votre carte. Si cela vous arrive, vous pouvez changer la
  procdure de dtection (aux environs de la ligne 322 de lance.c) pour
  qu'elle printk() (affiche) quelles sont les valeurs pour votre carte,
  puis utiliser ces valeurs  la place du 0x52, 0x44 donn par dfaut.

  Les cartes devraient probablement tre places en mode `hautes
  performances' et non pas dans le mode compatible-NI6510 lorsque l'on
  utilise le pilote lance.


  55..3311..  RReeaallTTeekk



  55..3311..11..  RReeaallTTeekk RRTTLL88000022//88001122 ((AATT--LLaann--TTeecc)) PPoocckkeett aaddaappttoorr

  Statut : Support, Nom du pilote : atp

  Il s'agit d'un adaptateur de poche gnrique, peu cher, dvelopp en
  OEM, vendu par AT-Lan-Tec, et (sans doute) par un certain nombre
  d'autres fournisseurs. Un pilote est inclus dans le noyau standard.
  Une quantit substantielle d'information est contenue dans le fichier
  source du pilote, atp.c.


  Notez que dans les premires versions de ce pilote, le nom de
  priphrique que vous passiez  ifconfig _n_'__t_a_i_t _p_a_s eth0 mais atp0.


  55..3311..22..  RReeaallTTeekk 88000099

  Statut : Support, Nom du pilote : ne (+8390)

  C'est un clone de NE2000 ISA, et il fonctionne trs bien avec le
  pilote NE2000 Linux. Le programme rset8009.exe peut tre obtenu depuis
  le site WWW de RealTek's http://www.realtek.com.tw - ou via ftp depuis
  le mme site.


  55..3311..33..  RReeaallTTeekk 88001199


  Statut : Support, Nom du pilote : ne (+8390)

  Celle-ci est la version "Plug and Pray" de la prcdente. Utilisez
  l'utilitaire DOS pour dsactiver le PnP et activez la configuration
  logicielle. Attribuez une IRQ et des adresses d'E/S raisonnables, et
  tout devrait aller pour le mieux. (Si vous utilisez les modules,
  n'oubliez pas d'ajouter une option io=0xNNN au fichier
  /etc/conf.modules. Le programme rset8009.exe peut tre obtenu depuis
  le site WWW de RealTek's http://www.realtek.com.tw -- ou via ftp
  depuis le mme site.


  55..3311..44..  RReeaallTTeekk 88002299

  Statut : Support, Nom du pilote : ne2k-pci

  Il s'agit d'une implmentation PCI sur une seule puce d'un clone de
  NE2000. Diffrents fournisseurs vendent maintenant des cartes
  comportant cette puce. Consultez ``NE2000 PCI'' pour des informations
  sur l'utilisation d'une de ces cartes. Notez qu'il s'agit d'un design
  de plus de dix ans coll sur un bus PCI, et ce ne sera pas vraiment
  meilleur que pour le pendant ISA.


  55..3311..55..  RReeaallTTeekk 88112299//88113399

  Statut : Partiellement support, Nom du pilote : rtl8139

  Encore une autre solution Ethernet PCI sur une puce unique de RealTek.
  Un pilote pour les cartes bases sur elle devrait tre inclus dans la
  version 2.0.34 du noyau Linux. Pour plus d'informations, consultez :


       http://cesdis.gsfc.nasa.gov/linux/drivers/rtl8139.html



  55..3322..  SSaaggeerr



  55..3322..11..  SSaaggeerr NNPP994433

  Statut : Partiellement support, Nom du pilote : 3c501

  Il s'agit juste d'un clone de 3c501, avec un prfixe de S.A. PROM
  diffrent. Je pense qu'elle est aussi cliniquement morte que la vraie
  3c501, en passant.  Le pilote vrifie la prsence de l'identificateur
  de la NP943 et la traite comme une 3c501 par la suite.
  Consultez ``3Com 3c501'' pour toutes les bonnes raisons qui font que
  vous ne devriez vraiment pas avoir ne serait-ce que l'intention
  d'utiliser une de ces cartes.


  55..3333..  SScchhnneeiiddeerr && KKoocchh



  55..3333..11..  SSKK GG1166

  Statut : Support, Nom du pilote : sk_g16

  Ce pilote, crit par PJD Weichmann et SWS Bern, a t inclus dans les
  noyaux des versions 1.1. Il se trouve que la SK G16 est semblable  la
  NI6510, en ce sens qu'elle est base sur la premire dition de la
  puce LANCE (la 7990). Une fois de plus, cette carte semble ne pas
  fonctionner avec le pilote LANCE gnrique.


  55..3344..  SSEEEEQQ



  55..3344..11..  SSEEEEQQ 88000055

  Statut : Support, Nom du pilote : seeq8005

  Ce pilote qui est l'oeuvre de Hamish Coleman a t inclus dans les
  premiers noyaux 1.3.x. Peu d'informations sur la carte figurent dans
  le pilote, et donc pas grand chose  en dire ici. Si vous avez une
  question, vous aurez probablement tout intrt  envoyer un message 
  hamish@zot.apana.org.au.


  55..3355..  SSMMCC ((SSttaannddaarrdd MMiiccrroossyysstteemmss CCoorrpp..))

  La division Ethernet de Western Digital a t achete par SMC il y a
  bien longtemps lorsque les wd8003 et wd8013 tais les produits phares.
  Depuis lors, SMC a continu de faire des cartes ISA bases sur le 8390
  (Elite16, Ultra, EtherZ) et a aussi toff son catalogue de quelques
  produits PCI.

  Voici comment contacter SMC :

  SMC / Standard Microsystems Corp., 80 Arkay Drive, Hauppage, New York,
  11788, USA.  Support technique par tlphone : 800-992-4762 (USA) ou
  800-433-5345 (Canada) ou 516-435-6250 (Autres pays).  Demandes de
  documentation : 800-SMC-4-YOU (USA) ou 800-833-4-SMC (Canada) ou
  516-435-6255 (Autres pays).  Support technique par E-mail :
  techsupt@ccmail.west.smc.com.  Site FTP  : ftp.smc.com.  Site Web :
  SMC <http://www.smc.com>.


  55..3355..11..  WWDD88000033,, SSMMCC EElliittee

  Statut : Support, Nom du pilote : wd (+8390)

  Ce sont les versions 8 bits de la carte. La 8003 8 bits est lgrement
  moins chre, mais ne vaut ces conomies que pour une utilisation
  lgre. Notez que certaines des cartes sans EEPROM (des clones avec
  des cavaliers, ou de vieilles _v_i_e_i_l_l_e_s vieilles cartes wd8003) n'ont
  aucun moyen d'indiquer la ligne d'IRQ qu'elles utilisent. Dans ce cas,
  l'affectation automatique d'IRQ est utilise, et si cela choue, le
  pilote utilise l'IRQ 5 sans rien dire. Vous pouvez obtenir les
  disquettes d'installation/de paramtrage de SMC sur leur site FTP.
  Notez que certains des plus rcents programmes 'SuperDisk' de SMC ne
  russiront pas  dtecter les vraies vieilles cartes sans EEPROM. Le
  fichier SMCDSK46.EXE semble tre un bon choix passe-partout.  Notez
  aussi que les rglages des cavaliers pour toutes leurs cartes se
  trouvent dans un fichier texte dans l'archive sus-mentionne. La
  dernire (meilleure ?) version peut tre obtenue depuis ftp.smc.com.

  Comme ces cartes sont fondamentalement les mmes que leurs homologues
  16 bits (WD8013 / SMC Elite16), vous devriez consulter la section
  suivante pour en savoir plus.


  55..3355..22..  WWDD88001133,, SSMMCC EElliittee1166

  Statut : Support, Nom du pilote : wd (+8390)

  Au fil des ans, la conception a ajout plus de registres et une
  EEPROM. (Les premires cartes wd8003 sont apparues il y a environ dix
  ans !) Les clones portent en gnral un nom en `8013', et se passent
  habituellement d'EEPROM au profit de cavaliers. Les cartes SMC dernier
  modle auront la puce SMC 83c690 au lieu de la DP8390 de National
  Semiconductor que l'on trouvait sur les premires. Les cartes conues
  pour utiliser la mmoire partage sont un peu plus rapides que celles
  qui reposent sur les E/S programmes (PIO), spcialement avec des
  paquets de taille importante. Plus important, du point de vue du
  pilote, cela permet d'viter quelques bogues du mode PIO du 8390, de
  garantir un accs sr au tampon de paquets sur un systme multi-
  thread, et de ne plus avoir un registre de donnes PIO qui bloque
  votre machine pendant les procdures de dtection aprs un redmarrage
   chaud.

  Les cartes sans EEPROM qui ne peuvent pas lire l'IRQ slectionne
  essaieront l'affectation automatique d'IRQ (auto-IRQ), et si cela
  choue, affecteront sans rien dire l'IRQ 10. (Les versions 8 bits
  affecteront l'IRQ 5).

  Pour les cartes qui n'ont pas une quantit de mmoire embarque
  standard, la taille de la mmoire peut tre spcifie au moment du
  dmarrage (ou dans le fichier /etc/conf.modules si vous utilisez les
  modules). La taille mmoire standard est de 8 Ko pour une carte 8 bits
  et de 16 Ko pour une carte 16 bits. Par exemple, les antdiluviennes
  WD8003EBT peuvent tre configures par cavaliers pour utiliser 32 Ko.
  Pour avoir un accs complet  cette mmoire, vous aurez recours 
  quelque chose comme (pour une adresse d'E/S de base de 0x280 et
  l'IRQ 9) :


  ______________________________________________________________________
          LILO: linux ether=9,0x280,0xd0000,0xd8000,eth0
  ______________________________________________________________________



  Consultez aussi ``Les problmes des 8013'' pour certains des problmes
  les plus classiques et les questions qui reviennent le plus
  frquemment.

  Si vous avez l'intention d'utiliser ce pilote sous la forme d'un
  module chargeable, vous devriez probablement consulter ``Utiliser les
  pilotes Ethernet comme modules'' pour des informations spcifiques aux
  modules.





  55..3355..33..  SSMMCC EElliittee UUllttrraa

  Statut : Support, Nom du pilote : smc-ultra (+8390)

  Cette carte Ethernet est base sur la 83c790 de SMC, qui comporte
  quelques nouveauts par rapport  la 83c690. Bien qu'elle possde un
  mode similaire aux anciennes cartes Ethernet SMC, elle n'est pas
  entirement compatible avec les vieux pilotes WD80*3. Nanmoins, dans
  ce mode le pilote partage la plupart de son code avec les autres
  pilotes 8390, tout en tant lgrement plus rapide qu'un clone de
  WD8013.

  Puisqu'une partie de l'Ultra _r_e_s_s_e_m_b_l_e  une 8013, sa procdure de
  dtection est cense en trouver une avant que celle de la wd8013 n'ait
  une chance de l'identifier par erreur.

  Donald a mentionn qu'il est possible d'crire un pilote spar pour
  le mode `Altego' de l'Ultra, qui permet d'enchaner les transmissions
  au cot d'une utilisation inefficace des tampons de rception, mais
  cela n'arrivera probablement jamais.

  Utilisateurs d'adaptateurs SCSI dots du contrle de bus, prenez
  note : dans le manuel qui accompagne Interactive UNIX, il est
  mentionn qu'une bogue dans la SMC Ultra cause des corruptions de
  donnes avec des disques SCSI utiliss derrire un adaptateur
  aha-154X. Cela touche certainement aussi des cartes compatibles
  aha-154X, comme les BusLogic, et les adaptateurs SCSI AMI-FastDisk.

  SMC a reconnu que le problme se produit avec Interactive, et des
  anciens pilotes Windows NT. Il s'agit d'un conflit matriel avec des
  rvisions antrieures de la carte qui peut tre contourn dans la
  conception du pilote. Le pilote actuel de l'Ultra vous protge contre
  ce problme en n'activant la mmoire partage que lors des transferts
  de donnes avec la carte. Assurez-vous que votre version de noyau soit
  au moins la 1.1.84, ou que celle du pilote indique au dmarrage est
  au moins smc-ultra.c:v1.12, sinon vous tes vulnrable  ce problme.

  Si vous avez l'intention d'utiliser ce pilote sous la forme d'un
  module chargeable, vous devriez probablement consulter ``Utiliser les
  pilotes Ethernet comme modules'' pour des informations spcifiques aux
  modules.


  55..3355..44..  SSMMCC EElliittee UUllttrraa3322 EEIISSAA

  Statut : Support, Nom du pilote : smc-ultra32 (+8390)

  Cette carte EISA partage nombre de points communs avec son pendant
  ISA. Un pilote qui fonctionne (et qui est stable) est inclus dans les
  versions 2.0 et 2.2 du noyau. Les remerciements vont  Leonard Zubkoff
  pour l'achat de quelques unes de ces cartes afin que le support Linux
  pour celles-ci puisse tre ralis.


  55..3355..55..  SSMMCC EEtthheerrEEZZ ((88441166))

  Statut : Support, Nom du pilote : smc-ultra (+8390)

  Cette carte utilise la puce 83c795 de SMC et supporte la spcification
  Plug 'n Play. Elle comporte aussi un mode compatible _S_M_C _U_l_t_r_a qui lui
  permet d'tre utilise avec le pilote Ultra de Linux. Pour de
  meilleurs rsultats, utilisez le programme provenant de chez SMC et
  permettant de dsactiver le PnP et de la configurer pour le mode 
  mmoire partage. Consultez les informations ci-dessus pour des notes
  sur le pilote Ultra.

  Pour les noyaux 1.2, la carte devait tre configure pour oprer en
  mmoire partage. Nanmoins, les noyaux 2.0 peuvent utiliser la carte
  dans ce mode ou en E/S programmes. Celui-l sera lgrement plus
  rapide, et requerra moins de ressources processeur, par ailleurs.


  55..3355..66..  SSMMCC EEtthheerrPPoowweerr PPCCII ((88443322))

  Statut : Support, Nom du pilote : de4x5, tulip

  NB : L'EtherPower II est une carte totalement diffrente. Voir plus
  bas !

  Ces cartes sont une implmentation de base de la puce 21040 de DEC,
  c'est--dire une grosse puce et quelques transceivers. Donald a
  utilis une de ces cartes pour son dveloppement du pilote gnrique
  21040 (aussi connu sous le nom de tulip.c). Merci de nouveau  Duke
  Kamstra, d'avoir fourni une carte sur laquelle raliser le
  dveloppement.

  Certaines des dernires rvisions de cette carte utilisent la rcente
  puce 21041 de DEC, ce qui peut causer des problmes avec des versions
  anciennes du pilote tulip. Si vous avez des problmes, assurez-vous
  d'utiliser la dernire version du pilote, qui peut ne pas encore se
  trouver dans l'arborescence actuelle du noyau.

  Consultez ``DEC 21040'' pour plus de dtails sur l'utilisation d'une
  de ces cartes, et l'tat d'avancement actuel du pilote.

  Apparemment, la toute dernire rvision de la carte, l'EtherPower-II,
  utilise la puce 9432. Il n'est pas certain pour l'instant que celle-ci
  fonctionnera avec le pilote actuel. Comme d'habitude, si vous n'tes
  pas sr, vrifiez que vous pourrez rendre la carte si elle ne
  fonctionne pas avec le pilote Linux _a_v_a_n_t de payer.


  55..3355..77..  SSMMCC EEtthheerrPPoowweerr IIII PPCCII ((99443322))

  Statut : Partiellement support, Nom du pilote : epic100

  Ces cartes, bases sur la puce 83c170 de SMC, sont compltement
  diffrentes des cartes bases sur la Tulip. Un nouveau pilote est
  inclus dans les noyau 2.0 et 2.2 pour les supporter. Pour plus de
  dtails, consultez :

  http://cesdis.gsfc.nasa.gov/linux/drivers/epic100.html


  55..3355..88..  SSMMCC 33000088

  Statut : Non support

  Ces cartes 8 bits sont bases sur la puce MB86950 de Fujitsu, qui est
  une ancienne version de la MB86965 utilise dans le pilote Linux de
  l'at1700. Russ dit que vous devriez probablement pouvoir bidouiller un
  pilote en regardant le code de at1700.c et son pilote DOS en mode
  paquet pour la carte Tiara (tiara.asm). Ces cartes ne sont pas trs
  rpandues.


  55..3355..99..  SSMMCC 33001166

  Statut : Non support

  Il s'agit de cartes 16 bits  E/S mappes,  puce 8390, trs
  similaires  une carte NE2000 gnrique. Si vous pouvez obtenir les
  spcifications chez SMC, alors raliser un portage du pilote NE2000
  sera certainement relativement facile. Ces cartes ne sont pas trs
  rpandues.


  55..3355..1100..  SSMMCC--99000000 // SSMMCC 9911cc9922//44

  Statut : Support, Nom du pilote : smc9194

  La SMC9000 est une carte VLB base sur la puce 91c92. La 91c92
  apparat aussi sur un petit nombre de cartes d'autres marques, mais
  est plutt peu commune. Erik Stahlman (erik@vt.edu) a crit ce pilote
  qui se trouve dans les noyaux 2.0, mais pas dans les 1.2 plus anciens.
  Vous devriez pouvoir l'intgrer  une arborescence de noyau 1.2 avec
  un minimum de difficults.


  55..3355..1111..  SSMMCC 9911cc110000


  Statut : Partiellement support, Nom du pilote : smc9194

  Le pilote SMC 91c92 est suppos fonctionner pour les cartes bases sur
  cette puce 100Base-T, mais  l'heure actuelle cela n'a pas t
  vrifi.


  55..3366..  TTeexxaass IInnssttrruummeennttss



  55..3366..11..  TThhuunnddeerrLLAANN

  Statut : Support, Nom du pilote : tlan

  Ce pilote supporte beaucoup de cartes ethernet intgres aux
  ordinateurs Compaq, incluant les familles NetFlex et Netelligent. Il
  supporte aussi les produits Olicom 2183, 2185, 2325 et 2326.


  55..3377..  TThhoommaass CCoonnrraadd



  55..3377..11..  TThhoommaass CCoonnrraadd TTCC--55004488

  Encore une autre carte PCI base sur la puce 21040 de DEC.

  Consultez la section sur la puce 21040 (``DEC         21040'') pour
  plus d'informations.


  55..3388..  VVIIAA

  Vous ne verrez probablement jamais une carte VIA, car VIA fabrique
  plusieurs puces rseau qui sont ensuite utilises par d'autres dans la
  construction de leurs cartes ethernet. Ils ont un site WWW  :


       http://www.via.com.tw/






  55..3388..11..  VVIIAA 8866CC992266 AAmmaazzoonn

  Statut : Support, Nom du pilote : ne, ne2k-pci (+8390)

  Ce contrleur est l'offre NE2000 PCI de VIA. Vous avez le choix entre
  le pilote ISA/PCI ne.c ou le pilote PCI ne2k-pci.c. Rfrez vous  la
  section NE2000 PCI pour plus de dtails.


  55..3388..22..  VVIIAA 8866CC110000AA RRhhiinnee IIII ((eett 33004433 RRhhiinnee II))

  Statut : Support, Nom du pilote : via-rhine

  Ce pilote relativement rcent se trouve dans les noyaux 2.0 et 2.2.
  Cette puce est une amlioration de la NE2000 86C926 dans la mesure o
  elle gre les transferts par contrle de bus, mais du fait de
  l'obligation d'aligner les tampons sur 32 bits, les gains sont
  limits. Pour plus de dtails, et les mises  jour, rfrez vous  :

  http://cesdis.gsfc.nasa.gov/linux/drivers/via-rhine.html



  55..3399..  WWeesstteerrnn DDiiggiittaall

  Rfrez vous  la section ``SMC'' pour plus d'informations sur les
  cartes SMC. (SMC a rachet la section cartes rseau de Western Digital
  il y a bien longtemps).


  55..4400..  WWiinnbboonndd

  Winbond ne fabrique, ni ne vend de cartes au grand public -- au lieu
  de cela, ils font des puces pour cartes rseau tout en un, les vendent
   d'autres entreprises, qui les collent sur une carte PCI, ajoutent
  leur nom et ensuite, les revendent.


  55..4400..11..  WWiinnbboonndd 8899cc884400

  Statut : Partiellement Support, Nom du pilote : winbond-840

  Ce pilote n'est pas actuellement distribu avec le noyau, car il est
  en phase de test. Il est disponible  :

  http://cesdis.gsfc.nasa.gov/linux/drivers/test/winbond-840.c


  55..4400..22..  WWiinnbboonndd 8899cc994400

  Statut : Support, Nom du pilote : ne, ne2k-pci (+8390)

  Cette puce est l'une des deux que l'on retrouve souvent sur les cartes
  NE2000 PCI de bas de gamme vendues par beaucoup de fabriquants. Notez
  que c'est toujours une ide vieille de plus de 10 ans colle sur un
  bus PCI. Les performances ne seront pas meilleures que pour
  l'quivalent ISA.


  55..4411..  XXiirrccoomm

  Depuis des temps immmoriaux, Xircom refusait de dvoiler les
  informations ncessaires  l'criture d'un pilote,  moins que vous ne
  vous livriez  eux corps et me. Apparemment, suffisamment
  d'utilisateurs de Linux les ont harcel pour obtenir du support pour
  un pilote (ils prtendent supporter tous les systmes d'exploitation
  rseau populaires...), ce qui les a amens  changer de politique afin
  de permettre la diffusion de la documentation, sans avoir  signer un
  accord de confidentialit. Certains ont dit qu'ils allaient distribuer
  les sources du pilote SCO, alors que d'autres ont dit qu'ils ne
  fournissaient plus de documentation sur les produits `obsoltes',
  comme les premiers modles PE. Si vous tes intresss et que vous
  voulez vrifier par vous mme, vous pouvez joindre Xircom au
  1-800-874-7875, 1-800-438-4526 ou au +1-818-878-7600.

  (NDT : les deux premiers numros sont des numros verts aux tats-Unis
  et ne sont pas accessibles depuis l'tranger. Le dernier est un numro
  international).


  55..4411..11..  XXiirrccoomm PPEE11,, PPEE22,, PPEE33--1100BB**

  Statut : Non support.

  Ce n'est pas pour vous rconforter, mais si vous avez l'un de ces
  adaptateurs sur port parallle, vous pourrez peut-tre l'utiliser sous
  l'mulateur DOS avec les pilotes DOS fournis par Xircom. Vous devrez
  autoriser l'accs de DOSEMU au port parallle, et certainement jouer
  avec SIG (le gnrateur d'interruptions stupides de DOSEMU, en anglais
  _S_i_l_l_y _I_n_t_e_r_r_u_p_t _G_e_n_e_r_a_t_o_r).


  55..4411..22..  CCaarrtteess XXiirrccoomm PPCCMMCCIIAA

  Statut : Partiellement Support, Nom du pilote : ????

  Les pilotes de certaines cartes Xircom PCMCIA sont disponibles dans le
  paquetage PCMCIA de David Hinds. Vrifiez l-bas pour de plus amples
  informations.


  55..4422..  ZZeenniitthh



  55..4422..11..  ZZ--NNoottee

  Statut : Support, Nom du pilote : znet

  L'adaptateur rseau intgr au Z-Note est bas sur la puce i82593
  d'Intel, et utilise _d_e_u_x canaux DMA. Un pilote (alpha ?), est
  disponible dans la version courante du noyau. Comme tous les
  adaptateurs de poche ou portables, il se trouve dans la section
  `Pocket and portable adaptors' lorsque vous excutez make config.
  Notez aussi que l'IBM ThinkPad 300 est compatible avec le Z-Note.


  55..4433..  ZZnnyyxx



  55..4433..11..  ZZnnyyxx ZZXX334422 ((DDEECC 2211004400 bbaasseedd))

  Statut : Support, Nom du pilote : de4x5, tulip

  Vous avez le choix entre _d_e_u_x pilotes pour les cartes bases sur cette
  puce. D'une part le pilote DE425 crit par David, d'autre part le
  pilote 21040 gnrique crit par Donald.

  Notez que depuis la version 1.1.91, David a ajout une option de
  compilation qui permet aux cartes non-Digital (comme les cartes Znyx)
  de fonctionner avec ce pilote. Jetez un coup d'oeil au fichier
  README.de4x5 pour les dtails.

  Consultez ``DEC 21040'' pour plus d'informations sur ces cartes, et la
  situation actuelle du pilote.



  55..4444..  IIddeennttiiffiieerr uunnee ccaarrttee iinnccoonnnnuuee

  OK, l'ami du voisin du cousin de votre oncle a un frre qui a trouv
  une vieille carte Ethernet ISA dans le botier de l'AT qui servait de
  cage pour le hamster de son fils. D'une manire ou d'une autre vous
  avez fini par vous retrouver avec cette carte et vous voudriez essayer
  de l'utiliser avec Linux, mais personne n'a le commencement du dbut
  d'une ide de ce qu'elle est et il n'y a aucune documentation.

  Tout d'abord, cherchez n'importe quel numro de modle vident qui
  pourrait fournir un indice. Un numro de modle qui contient 2000 sera
  certainement un clone de NE2000. Une carte avec 8003 ou 8013 crit
  quelque part dessus sera une carte WD80x3 de Western/Digital ou une
  SMC Elite, ou un clone de l'une d'elles.


  55..4444..11..  CCoonnttrroolllleerr,, NNIICC)) IIddeennttiiffiieerr llee ccoonnttrrlleeuurr dd''iinntteerrffaaccee rrsseeaauu
  ((NNeettwwoorrkk IInntteerrffaaccee

  Cherchez la plus grosse puce sur la carte. Ce sera le contrleur
  rseau (NIC) lui-mme, et la plupart peuvent tre identifis par leur
  rfrence. Si vous savez quel NIC se trouve sur la carte, ce qui suit
  devrait vous aider  deviner de laquelle il s'agit.

  Encore  l'heure actuelle, le NIC le plus courant est la puce DP8390
  de National Semiconductor, alias NS32490, alias DP83901, alias
  DP83902, alias DP83905, alias DP83907. Et il ne s'agit que de celles
  fabriques par National Semiconductor ! D'autres socits comme
  Winbond et UMC produisent des clones de DP8390 et DP83905, comme la
  89c904 de Winbond (un clone de DP83905) et la 9090 d'UMC. Si la carte
  a quelque chose qui s'approche d'un 8390, il y a des chances pour
  qu'il s'agisse d'un clone de NE1000 ou de NE2000. Parmi les cartes
  bases sur le 8390, arrivent en deuxime position les wd80x3 (de
  Western/Digital) et ses clones.  Des cartes avec un DP83905 peuvent
  tre configures pour tre une NE2000 _o_u une wd8013. Les versions les
  plus rcentes des wd80x3 de base et des SMC Elite possdent un 83c690
  en lieu et place du DP8390 d'origine.  Les cartes SMC Ultra ont un
  83c790, et utilisent un pilote lgrement diffrent de celui des
  cartes wd80x3. Les cartes EtherEZ de SMC ont un 83c795, et utilisent
  le mme pilote que la SMC Ultra. Toutes les cartes BNC bases sur un
  genre de 8390 ou l'un de ses clones auront gnralement un 8392 (ou un
  83c692, ou un ???392) en botier DIP 16 broches tout prs du
  connecteur BNC.

  L'Intel i82586 est un autre NIC courant que l'on trouve sur des cartes
  plus anciennes. Parmi celles qui en comportent un, citons la 3c505, la
  3c507, la 3c523, l'EtherExpress-ISA d'Intel, l'Exos-205T de Microdyne,
  et la NI5210 de Racal-Interlan.

  Le NIC d'origine de la carte LANCE d'AMD tait numrot AM7990, et les
  rvisions plus rcentes incluent le 79c960, le 79c961, le 79c965, le
  79c970, et le 79c974. La plupart des cartes ayant l'une de ces puces
  fonctionnera avec le pilote LANCE de Linux,  l'exception des vieilles
  cartes NI6510 de Racal-Interlan qui possdent leur propre pilote.

  Les cartes PCI plus rcentes et qui comportent un NIC de DEC rfrenc
  21040, 21041, 21140, ou un numro approchant, devraient tre capables
  d'utiliser le pilote `tulip' ou le `de4x5' de Linux.

  D'autres cartes PCI qui comportent une grosse puce marque RTL8029,
  89C940 ou 86C926 sont des clones de NE2000, et le pilote `ne' des
  versions 2.0 et suprieures du noyau Linux devrait automatiquement les
  dtecter au dmarrage.


  55..4444..22..  IIddeennttiiffiieerr ll''aaddrreessssee EEtthheerrnneett

  Chaque carte Ethernet possde sa propre adresse sur six octets qui lui
  est unique et propre. Les trois premiers octets de cette adresse
  Ethernet sont les mmes pour chaque carte construite par un
  constructeur donn.  Par exemple, toutes les adresses des cartes de
  SMC commencent par 00:00:c0. Les trois derniers octets sont affects
  par le constructeur de faon unique  chaque carte individuelle au fur
  et  mesure de leur fabrication.

  Si votre carte comporte un autocollant qui donne tous les six octets
  de son adresse, vous pouvez identifier le constructeur  partir des
  trois premiers. Toutefois, il est plus courant de ne trouver que les
  trois derniers octets, imprims sur un autocollant attach  une PROM
  monte sur la carte, ce qui ne vous indique rien du tout.

  Vous pouvez dterminer quel constructeur possde quelles adresses 
  partir de la RFC-1340. Apparemment il existe galement une liste plus
   jour qui est disponible  divers endroits. Essayez de faire une
  recherche WWW ou FTP sur EtherNet-codes ou Ethernet-codes et vous
  trouverez quelque chose.


  55..4444..33..  QQuueellqquueess aassttuucceess ppoouurr eessssaayyeerr dd''uuttiilliisseerr uunnee ccaarrttee iinnccoonnnnuuee

  Si vous n'tes toujours pas sr(e) de quelle carte il s'agit, mais que
  vous avez un peu rduit le champ des possibilits, alors vous pouvez
  construire un noyau en y incluant tout un tas de pilotes, et voir si
  l'un d'entre eux dtecte automatiquement la carte lors du dmarrage.

  Si le noyau ne dtecte pas la carte, il se peut que la carte ne soit
  pas configure  l'une des adresses que le pilote teste lorsqu'il en
  recherche une. Dans ce cas, vous pourriez essayer de rcuprer
  scanport.tar.gz sur votre site FTP Linux prfr, et voir s'il peut
  trouver l'adresse pour laquelle votre carte est configure. Ce
  programme parcourt l'espace d'adressage d'entre/sortie de 0x100 
  0x3ff en cherchant des priphriques qui ne sont pas dj enregistrs
  dans /proc/ioports.  S'il en trouve un qui soit inconnu et qui dmarre
   une adresse donne, vous pouvez alors explicitement diriger les
  procdures de dtection Ethernet vers cette adresse en utilisant un
  argument de dmarrage ether=.

  Si vous arrivez  faire en sorte que la carte soit dtecte, vous
  pouvez alors deviner la fonction des cavaliers inconnus en les
  modifiant un par un et en regardant  quelle adresse d'E/S de base et
   quelle IRQ la carte est dtecte. Les paramtres d'IRQ peuvent aussi
  habituellement tre dtermins en suivants les traces au dos de la
  carte jusqu' l'endroit o les cavaliers sont souds. En comptant les
  `doigts d'or' sur la face arrire, depuis l'extrmit de la carte o
  se situe la plaque mtallique qui se fixe au coffret du PC,  vous avez
  les IRQ 9, 7, 6, 5, 4, 3, 10, 11, 12, 15, et 14 sur les `doigts' 4,
  21, 22, 23, 24, 25, 34, 35, 36, 37, et 38 respectivement. Les cartes
  huit bits ne comportent que les doigts 1  31.

  Les cavaliers qui paraissent ne servir  rien ont gnralement pour
  fonction de slectionner l'adresse mmoire d'une ROM de dmarrage
  (boot ROM) optionnelle. D'autres situs prs des connecteurs BNC,
  RJ-45 ou AUI servent gnralement  slectionner le support physique
  de sortie. Ceux-ci se situent typiquement prs des `botes noires' qui
  contiennent les convertisseurs de tension, marques YCL, Valor, ou
  Fil-Mag.

  Une collection intressante de configurations de cavaliers pour
  diverses cartes se trouve  l'URL suivante :


       Paramtrage des cartes Ethernet
       <http://www.slug.org.au/NIC/>



  55..4455..  PPiillootteess ppoouurr pprriipphhrriiqquueess NNoonn--EEtthheerrnneett

  Quelques autres pilotes existent dans les sources Linux qui se
  prsentent _c_o_m_m_e un priphrique Ethernet vis--vis des programmes
  rseaux, bien qu'ils ne soient pas rellement Ethernet. Les voici
  brivement prsents pour tre complet.

  dummy.c - Le but de ce pilote est de fournir un priphrique pour
  dsigner une route qui le traverse, mais sans transmettre rellement
  de paquets.

  eql.c - Load Equalizer (galiseur de charge), qui regroupe plusieurs
  priphriques esclaves (gnralement des modems) et rpartit la charge
  en transmission entre eux tout en ne prsentant qu'un seul
  priphrique aux programmes rseau.

  ibmtr.c - IBM Token Ring (anneau  jeton), qui n'est pas rellement de
  l'Ethernet. L'anneau  `jeter' ncessite du routage par la source et
  autres trucs dgotants.

  loopback.c - Loopback (boucle locale), par lequel passent tous les
  paquets mis par votre machine  destination de votre machine.
  Essentiellement, il se contente de sortir les paquets de la file
  d'attente d'mission et de les placer dans la file d'attente de
  rception.

  pi2.c - Interface Ottawa Amateur Radio Club PI et PI2.

  plip.c - Parallel Line Internet Protocol (PLIP, IP sur port
  parallle), qui permet  deux ordinateurs de s'envoyer des paquets
  l'un  l'autre via leurs ports parallles, en mode point--point.

  ppp.c - Point-to-Point Protocol (RFC1331), destin  la transmission
  de datagrammes multi-protocoles sur un lien point--point (de nouveau,
  en gnral des modems).

  (NDT : C'est le mode de connexion le plus couramment employ par les
  fournisseurs d'accs Internet. Consultez le _P_P_P_-_H_o_w_t_o.)

  slip.c - Serial Line Internet Protocol (SLIP, IP sur port srie), qui
  permet  deux ordinateurs de s'envoyer des paquets l'un  l'autre via
  leurs ports srie (gnralement via des modems), en mode
  point--point.

  tunnel.c - Fournit un tunnel IP (dit aussi `IP over IP', `IP sur IP',
  NDT)  travers lequel vous pouvez envoyer du trafic rseau de faon
  transparente entre sous-rseaux.

  (NDT : Pratique pour grer certains problmes dlicats de politique de
  routage, par exemple.)

  wavelan.c - Un transceiver radio semblable  de l'Ethernet, contrl
  par le coprocesseur 82586 d'Intel qui est utilis sur d'autres cartes
  Ethernet comme l'Intel EtherExpress.

  66..  CCbblleess,, CCooaaxxiiaall,, PPaaiirree TToorrssaaddee

  Si vous dmarrez un rseau  partir de rien, vous aurez a choisir
  entre l'Ethernet fin (du cble RG-58 co-axial avec des connecteurs
  BNC) ou le 10BaseT (des cbles  paire torsade avec des connecteurs
  RJ-45 rectangulaires). Quant au `gros' Ethernet (thick Ethernet), du
  cble RG-5 avec des connecteurs N, tomb en dsutude, on ne le
  rencontre pratiquement plus.

  Rfrez vous  ``Type de cable...'' pour une introduction sur les
  cbles. Notez aussi que la Foire Aux Questions (FAQ) du groupe
  _c_o_m_p_._d_c_o_m_._l_a_n_s_._e_t_h_e_r_n_e_t contient un tas d'informations utiles sur les
  cbles et tout ce genre de choses. Jetez un coup d'oeil  :


       Usenet FAQs <ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/>


  pour la FAQ de ce groupe de news.

  (NDT : Le lecteur francophone utilisera bien entendu un site miroir
  comme URL sur ibp  complter.. <ftp://ftp.lip6.fr/faq/...> ou tout
  site quivalent proche de chez lui).


  66..11..  EEtthheerrnneett ffiinn ((tthhiinnnneett))

  Le cable Ethernet fin n'est pas cher. Si vous fabriquez vos cbles
  vous-mme, le cble RG58A  me monobrin est  $0.27/m et le cble
  multibrins RG58AU est  3,40F/m. (NDT : Le prix du RG58A est en dollar
  car je n'ai pas pu trouver de prix pour ce type de cble en France !)
  Les connecteurs BNC  baonnette sont  moins de deux dollars chacun.
  (NDT : A sertir, environ 10 francs pices,  souder un peu plus cher
  mais vous n'avez pas besoin d'un outil spcial).

  Les autres pices diverses sont tout aussi bon march.

  Il est important que vous terminiez chaque extrmit du cble avec un
  `bouchon' de 50 ohms (NDT : bouchon ou terminateur..), donc prvoyez
  70 francs pour une paire. Il est aussi vital que votre cble ne
  comporte pas de `patte qui pend' -- les connecteurs en `T' doivent
  tre raccords directement aux cartes Ethernet, sans cble entre le
  `T' et la carte.


  Il y a quelques inconvnients  utiliser l'Ethernet fin. Le premier
  est qu'il est limit a 10 Mbps -- pour 100 Mbps, il faut de la paire
  torsade. Le second point noir est que si vous avez un grand nombre de
  machines raccordes entre elles, il suffit qu'un imbcile coupe le
  rseau en dbranchant un des cbles qui se trouvent sur les cts de
  son `T', et tout le rseau se retrouve par terre parce qu'il voit une
  impdance infinie (circuit ouvert) au lieu de la terminaison  50 ohms
  qui est ncessaire. Notez que vous pouvez enlever la pice en forme de
  `T' de la carte Ethernet elle-mme sans tuer tout le sous-rseau, pour
  autant que vous n'enleviez pas les cbles du `T' lui-mme. Bien
  entendu cela perturbera la machine d'o vous venez d'enlever le `T'.
  8-) Et notez aussi que si vous crez un petit rseau constitu de
  seulement deux machines, vous devez _q_u_a_n_d _m__m_e mettre en place les `T'
  et les bouchons de 50 ohms. -- vous _n_e _p_o_u_v_e_z _p_a_s juste cbler les
  deux machines entre elles !

  NDT : Notez aussi que vous ne devez pas crer une boucle avec le cble
  non plus, en reliant toutes les machines entre elles et en reliant la
  dernire machine avec la premire. La prsence d'un bouchon de 50 ohms
   _c_h_a_q_u_e extrmit du cble (et il ne doit y avoir que deux extrmits
  8-) ) est indispensable pour qu'Ethernet fonctionne correctement. (Fin
  de la note)


  Il existe aussi des systmes de cblage rigolos qui _f_o_n_t _c_o_m_m_e _s_i un
  seul fil arrivait  la carte, mais en fait les deux longueurs de cble
  reposant cte--cte, recouvertes par une protection extrieure, ce
  qui donne au fil une section de forme ovale. A l'extrmit de cette
  boucle est insr un connecteur BNC sur lequel se connecte votre
  carte. Vous avez donc l'quivalent d'un aller-retour de cble et d'un
  `T' BNC, mais avec ce type de cblage, il est impossible pour
  l'utilisateur d'enlever un cble d'un seul ct du `T' et donc de
  perturber le rseau.

  (NDT : C'est une bonne ide, mais la ralisation du cblage entre les
  prises de raccordement est dlicate, et le moindre dfaut amplifie
  rapidement les problmes de l'Ethernet fin.  )




  66..22..  PPaaiirree ttoorrssaaddee

  Les rseaux  paire torsade ncessitent des hubs actifs, dont les
  prix dmarrent aux environ de 300 francs, et le prix du cble brut
  peut tre en fait suprieur  celui du Thinnet. Vous devriez ignorer
  ceux qui disent que vous pouvez utiliser votre cblage tlphonique
  existant, car il est rare de trouver une installation o c'est le cas.

  (NdT : Ca c'est du pessimisme avr. J'ai dj fait pire. :])


  D'un autre ct, les prix des hubs sont en chute libre, toutes les
  propositions Ethernet 100 Mbps utilisent la paire torsade, et la
  plupart des installations professionnelles neuves utilisent la paire
  torsade.

  (NDT : Euh, c'est peut-tre aussi parce qu'avec un cblage banalis on
  peut faire de la voix (entendez : du tlphone), de la donne
  (entendez : du rseau), et de la vido, sur le mme cble, ce qui
  cote quand mme moins cher que trois cblages diffrents !)

  De plus, Russ Nelson ajoute que `Les nouvelles installations devraient
  utiliser du cblage Catgorie 5. Toute autre chose est une perte de
  temps de votre installateur, car le 100Base-ce-que-vous-voulez
  ncessitera du Cat. 5.'

  (NDT : Pour tre prcis, c'est du Catgorie 5, Classe D qu'il faut
  exiger. Un pour le type de cble, un pour la plage de frquence. :))

  Si vous n'avez que deux machines  raccorder, il est possible d'viter
  l'utilisation d'un hub, en croisant les paires missions et rception
  (1-2 et 3-6).

  Si vous tenez le connecteur RJ-45 face  vous (comme si vous alliez le
  brancher dans votre bouche) avec le petit clip de fixation vers le
  haut, alors les broches sont numrotes de 1  8 de la gauche vers la
  droite. L'utilisation des broches est la suivante :









          Numro de broche        Utilisation
          ----------              ----------
          1                       Sortie des Donnes (+)
          2                       Sortie des Donnes (-)
          3                       Entre des Donnes (+)
          4                       Rserv pour le tlphone
          5                       Rserv pour le tlphone
          6                       Entre des Donnes (-)
          7                       Rserv pour le tlphone
          8                       Rserv pour le tlphone



  Si vous souhaitez fabriquer un cble, ce qui suit devrait vous fournir
  tous les dtails voulus. Les paires de signaux diffrentiels doivent
  se trouver sur la mme paire torsade afin d'obtenir l'impdance et
  les pertes minimales requises d'un cble UTP. Si vous consultez la
  table ci-dessus, vous constatez que 1+2 et 3+6 sont les ensembles de
  paires de signaux diffrentiels. Pas 1+3 et 2+6 !!!!!!  A 10 MHz, avec
  des distances courtes, vous chapperez *peut-tre* aux consquences de
  telles erreurs, si c'est vraiment sur une courte distance. Mais n'y
  pensez mme pas  100 MHz.

  Pour un cordon de brassage normal, avec les extrmits `A' et `B',
  vous avez besoin d'un raccordement `droit', broche par broche,
  l'entre et la sortie utilisant chacune une paire de fils (pour des
  problmes d'impdance). Cela signifie donc que le 1 de A va au 1 de B,
  que le 2 de A va au 2 de B, que le 3 de A va au 3 de B et que le 6 de
  A va au 6 de B. Les fils qui joignent 1A-1B et 2A-2B doivent tre sur
  la mme paire torsade. De mme, les fils qui joignent 3A-3B et 6A-6B
  doivent tre sur une autre paire torsade.

  Maintenant, si vous n'avez pas de hub, mais que vous voulez fabriquer
  un `cble null' (ou cble crois, NDT), ce que vous souhaitez faire
  est que l'entre de `A' devienne la sortie de `B', et que la sortie de
  `A' devienne l'entre de `B', sans changer la polarit. Cela signifie
  donc raccorder 1A  3B (sortie+ de A vers entre+ de B) et 2A  6B
  (sortie- de A vers entre- de B). Ces deux fils doivent tre sur une
  paire torsade. Ils transportent ce que la carte/le connecteur `A'
  considre comme la sortie, et ce qui est vu comme l'entre par la
  carte/le connecteur `B'. Puis raccordez 3A  1B (entre+ de A sur
  sortie+ de B) et 6A  2B (entre- de A sur sortie- de B). Ces deux-l
  aussi doivent tre sur une paire torsade. Ils transportent ce que la
  carte/le connecteur `A' considre comme son entre, et ce que la
  carte/le connecteur `B' considre comme sa sortie.

  Donc, si vous considrez un cordon de brassage normal, enlevez l'une
  de ses extrmits, changez les emplacements des paires de rception
  et d'mission dans le nouveau connecteur, sertissez-le, et vous avez
  un cble `null' (enfin, crois, quoi ! NDT). Rien de bien compliqu.
  Vous voulez juste que le signal transmis par une carte soit envoy sur
  le rcepteur de la seconde, et vice versa.

  Notez qu'avant que 10BaseT soit ratifi en tant que norme, il existait
  d'autres formats de rseau qui utilisaient des connecteurs RJ-45, avec
  le mme principe de cblage que ci-dessus. Des exemples sont le
  LattisNet de SynOptics et le StarLAN d'AT&T. Dans certains cas (comme
  les premires cartes 3C503) vous pouvez positionner des cavaliers pour
  que la carte puisse dialoguer avec des hubs de diffrents types, mais
  dans la plupart des cas les cartes conues pour ces anciens types de
  rseaux ne fonctionneront pas avec un hub/un rseau 10BaseT standard.
  (Notez que si les cartes ont aussi un port AUI, il n'y a aucune raison
  que vous ne puissiez pas l'utiliser, combin avec un transceiver AUI /
  10BaseT).


  66..33..  TThhiicckk EEtthheerrnneett -- LLee ``ggrrooss'' EEtthheerrnneett

  Le `Thick ethernet' est pratiquement obsolte, et n'est gnralement
  utilis que pour rester compatible avec une implmentation existante.
  Vous pouvez outrepasser les rgles et connecter des brins courts
  d'Ethernet fin (ThinNet 10Base2) et pais (ThickNet 10Base5) ensemble
  avec un connecteur passif N-vers-BNC  15 francs, et c'est souvent la
  meilleure solution pour tendre un rseau ThickNet existant. Une
  solution correcte (mais plus chre) est d'utiliser un rpteur dans ce
  cas.

  77..  CCoonnffiigguurraattiioonn llooggiicciieellllee eett ddiiaaggnnoossttiiccss ddee ccaarrttee

  Dans la plupart des cas, si la configuration est faite par logiciel,
  et stocke dans une EEPROM, vous devrez dmarrer DOS, et utiliser le
  programme DOS fourni par le constructeur pour configurer l'IRQ, les
  ports d'E/S, l'adresse mmoire et autres choses sur la carte. Du
  reste, on peut esprer que c'est quelque chose que vous ne
  configurerez qu'une seule fois. Si vous ne disposez pas du logiciel
  DOS pour votre carte, essayez de chercher sur le site WWW du
  constructeur de votre carte. Si vous ne connaissez pas le nom du site,
  tentez de le deviner, par exemple `www.mon-constructeur.com' o `mon-
  constructeur' est le nom du fabricant de la carte. Cela fonctionne
  pour SMC, 3Com, et plein _p_l_e_i_n d'autres fabricants.

  On trouve certaines cartes pour lesquelles des versions Linux des
  utilitaires de configuration existent, et elles sont listes ici.
  Donald a crit quelques petits programmes de diagnostic qui
  fonctionnent sous Linux. La plupart d'entre eux sont le rsultat
  d'outils de dbogage qu'il a crs pendant l'criture des divers
  pilotes. Ne vous attendez pas  des interfaces rigolotes avec des
  menus. Vous aurez besoin de lire le code-source pour utiliser la
  plupart d'entre eux. Mme si votre carte n'a pas de programme de
  configuration correspondant, vous pouvez encore obtenir un peu
  d'information juste en tapant cat /proc/net/dev --  condition que
  votre carte ait t au moins dtecte au dmarrage.

  Dans tous les cas, vous devrez excuter la plupart de ces programmes
  en tant que root (pour permettre l'accs aux ports d'E/S) et vous
  devrez certainement dsactiver la carte rseau avant en tapant
  ifconfig eth0 down en premier.


  77..11..  PPrrooggrraammmmeess ddee ccoonnffiigguurraattiioonn ppoouurr ccaarrtteess EEtthheerrnneett



  77..11..11..  CCaarrtteess WWDD8800xx33

  Pour ceux d'entre vous qui ont des cartes wd80x3, il existe le
  programme wdsetup qui peut tre trouv dans wdsetup-0.6a.tar.gz sur
  les sites FTP linux. il n'est pas activement maintenu, et n'a pas t
  mis  jour depuis dj pas mal de temps. S'il fonctionne correctement
  pour vous, c'est parfait, sinon, utilisez la version DOS que vous
  devriez avoir obtenue avec votre carte. Si vous n'avez pas la version
  DOS, vous serez heureux d'apprendre que les disquettes de
  configuration et les pilotes SMC sont disponibles sur le site FTP de
  SMC.

  Bien entendu, vous _d_e_v_e_z avoir une carte avec EEPROM pour utiliser cet
  utilitaire. Les vieilles, _v_i_e_i_l_l_e_s cartes wd8003, et certains clones
  de wd8013 utilisent  la place des cavaliers pour configurer la carte.




  77..11..22..  CCaarrtteess DDiiggiittaall // DDEECC

  La carte EtherWorks 3 de Digital peut tre configure d'une faon
  similaire au programme DOS NICSETUP.EXE. David C. Davies l'a crit,
  ainsi que certains autres outils pour l'EtherWorks 3, en conjonction
  avec le pilote. Regardez sur metalab.unc.edu dans le rpertoire
  /pub/linux/system/Network/management un fichier qui s'appelle
  ewrk3tools-X.XX.tar.gz.

  (NDT : Le lecteur franais aura tout intrt  utiliser un site FTP
  plus proche, comme par exemple :
  ftp://ftp.lip6.fr/pub/linux/sunsite/system/Network/management)


  77..11..33..  CCaarrtteess NNEE22000000++ oouu AATT//LLAANNTTIICC

  Certaines implmentations de la puce DP83905 de National Semiconductor
  (comme l'AT/LANTIC et la NE2000+) peuvent tre configures par
  logiciel. (Notez que ces cartes peuvent aussi muler une carte
  wd8013 !)  Vous pouvez rcuprer le fichier
  /pub/linux/setup/atlantic.c sur le serveur FTP de Donald,
  cesdis.gsfc.nasa.gov, pour configurer cette carte. De plus, les
  programmes de configuration pour les cartes DP83905 de Kingston
  semblent fonctionner avec toutes les cartes, car ils ne vrifient pas
  une adresse spcifique au constructeur avant de vous autoriser  les
  utiliser. Suivez l'URL que voici :


       Logiciel Kingston <http://www.kingston.com/down
       load/etherx/etherx.htm>


  et rcuprez 20XX12.EXE et INFOSET.EXE.

  Soyez attentif en configurant des cartes NE2000+, car vous pouvez leur
  fournir des valeurs de paramtrage errones qui causeront des
  problmes. Un exemple classique est d'activer accidentellement la ROM
  de dmarrage dans l'EEPROM (mme si aucune ROM n'est installe) et de
  fournir une valeur qui entre en conflit avec la carte VGA. Le rsultat
  est un ordinateur qui se contente de vous envoyer des `bip' quand vous
  l'allumez et o rien n'apparat  l'cran.

  Vous pouvez typiquement vous sortir de ce mauvais pas en faisant ce
  qui suit :

  Enlevez la carte de la machine, redmarrez et entrez dans la
  configuration CMOS. Changez le paramtre `Display Adapter' (carte
  vido) en `Not Installed' (pas de carte vido) et changez le disque de
  dmarrage par dfaut (`Default Boot Drive' ou `Boot Sequence', NDT) en
  `A:' (votre lecteur de disquette). Changez aussi le paramtre `Wait
  for F1 if any Error' (attendre un appui sur F1 en cas d'erreur) en
  `Disabled' (dsactiv). De cette faon, l'ordinateur devrait dmarrer
  sans intervention de l'utilisateur. Maintenant crez une disquette DOS
  de dmarrage (`format a: /s /u') et copiez le programme default.exe de
  l'archive 20XX12.EXE sur cette disquette. Puis tapez echo default >
  a:autoexec.bat afin que le programme qui remet la carte  des valeurs
  par dfaut cohrentes soit excut automatiquement quand vous dmarrez
  sur cette disquette.  Eteignez la machine, rinstallez la carte
  ne2000+, insrez votre nouvelle disquette de dmarrage, et rallumez la
  machine. Elle devrait certainement vous bipper de nouveau  la figure,
  mais vous devriez voir la lumire du lecteur de disquette s'allumer
  pendant qu'elle dmarre  partir de la disquette. Attendez une minute
  ou deux que le lecteur de disquette s'arrte, indiquant ainsi que la
  machine a fini d'excuter le programme default.exe, puis teignez
  votre ordinateur. Lorsque vous le rallumez, vous pouvez esprer avoir
  un cran qui fonctionne de nouveau, ce qui vous permet de remettre les
  paramtres CMOS  leurs anciennes valeurs, et de changer de nouveau
  les paramtres de l'EEPROM de la carte pour les valeurs que vous
  voulez.

  Notez que si vous n'avez pas de DOS sous la main, vous pouvez utiliser
  la mthode ci-dessus avec un disque de dmarrage Linux qui excute
  automatiquement le programme atlantic de Donald (avec les bonnes
  options sur la ligne de commande) au lieu d'une disquette de dmarrage
  DOS qui excute automatiquement le programme default.exe.


  77..11..44..  CCaarrtteess 33CCoomm

  La famille des cartes Etherlink III de 3Com (c'est--dire les 3c5x9)
  peut tre configure en utilisant un autre utilitaire de configuration
  de Donald. Vous pouvez obtenir le fichier
  /pub/linux/setup/3c5x9setup.c sur le serveur FTP de Donald,
  cesdis.gsfc.nasa.gov, afin de configurer ces cartes. (Notez que
  l'utilitaire de configuration DOS 3c5x9B peut comprendre plus
  d'options se rapportant aux nouvelles sries ``B'' de la famille
  Etherlink III).



  77..22..  PPrrooggrraammmmeess ddee ddiiaaggnnoossttiicc ppoouurr ccaarrtteess EEtthheerrnneett

  Tous les programmes de diagnostic que Donald a crit peuvent tre
  obtenus  partir de cette URL.


       Diagnostics pour cartes Ethernet <ftp://ces
       dis.gsfc.nasa.gov/pub/linux/diag/index.html>


  Allied Telesis AT1700 -- cherchez le fichier /pub/linux/diag/at1700.c
  sur cesdis.gsfc.nasa.gov.

  Cabletron E21XX -- cherchez le fichier /pub/linux/diag/e21.c sur
  cesdis.gsfc.nasa.gov.

  HP PCLAN+ -- cherchez le fichier /pub/linux/diag/hp+.c sur
  cesdis.gsfc.nasa.gov.

  Intel EtherExpress -- cherchez le fichier /pub/linux/diag/eexpress.c
  sur cesdis.gsfc.nasa.gov.

  Cartes NE2000 -- cherchez le fichier /pub/linux/diag/ne2k.c sur
  cesdis.gsfc.nasa.gov. Il existe aussi une version PCI pour les clones
  NE2000-PCI qui sont maintenant classiques.

  Adaptateur de poche RealTek (ATP) -- cherchez le fichier
  /pub/linux/diag/atp-diag.c sur cesdis.gsfc.nasa.gov.

  Toutes les autres cartes -- essayez de taper cat /proc/net/dev et
  dmesg pour savoir quelles informations utiles le noyau possde sur la
  carte en question.



  88..  IInnffoorrmmaattiioonnss TTeecchhnniiqquueess

  Pour ceux d'entre vous qui souhaitent comprendre comment marche la
  carte, ou jouer avec les pilotes actuels, ou mme essayer de faire
  leur propre pilote pour une carte qui n'est actuellement pas
  supporte, ces informations peuvent se rvler utiles. Si vous
  n'entrez pas dans cette catgorie de personne, vous devriez peut-tre
  sauter cette section.


  88..11..

  EEnnttrreess//SSoorrttiieess pprrooggrraammmmeess ccoonnttrree mmmmooiirree ppaarrttaaggee ccoonnttrree DDMMAA

  Si vous savez dj envoyer et recevoir des paquets les uns derrire
  les autres, vous ne pouvez tout simplement pas mettre plus de bits sur
  le fil. Toutes les cartes Ethernet modernes peuvent recevoir des
  paquets les uns  la suite des autres. Les pilotes Linux DP8390
  (wd80x3, SMC-ULTRA, 3c503, ne2000, etc) s'approchent trs prs de
  l'envoi de paquets les uns derrire les autres (cela dpendra du temps
  de latence d'interruption courant), et la 3c509 ou l'AT1500 n'ont
  absolument aucun problme pour mettre des paquets les uns derrire
  les autres.

  Le bus ISA peut faire du 5,3 Mo/s (42 Mbit/s), ce qui semble plus que
  ncessaire pour l'ethernet a 10 Mbps. En cas d'utilisations de cartes
  100 Mbps, il est clair que vous aurez  utiliser un bus plus rapide
  pour utiliser toute la bande passante.


  88..11..11..  EEnnttrreess//SSoorrttiieess ((EE//SS)) pprrooggrraammmmeess ((NNEE22000000,, 33cc550099,, eettcc..))

  PPoouurr :: N'utilise aucune ressource systme contrainte, juste quelques
  registres d'E/S, et n'a pas de limite  16 M.

  CCoonnttrree :: Gnralement le taux de transfert le plus faible, le
  processeur attend tout le temps, et un accs entrelac (_i_n_t_e_r_l_e_a_v_e_d en
  anglais) aux paquets est habituellement difficile voire impossible.


  88..11..22..  MMmmooiirree ppaarrttaaggee ((WWDD8800xx33,, SSMMCC--UUllttrraa,, 33cc550033,, eettcc..))

  PPoouurr :: Simple, plus rapide que les E/S programmes, permet l'accs
  alatoire aux paquets. Les pilotes Linux calculent la somme de
  contrle (_c_h_e_c_k_s_u_m en anglais) des paquets IP entrants lorsqu'ils sont
  copis depuis la carte, ce qui entrane une rduction supplmentaire
  de la charge du processeur par rapport  une carte quivalente en E/S
  programmes.

  CCoonnttrree :: Utilise beaucoup d'espace mmoire (c'est important pour les
  utilisateur sous DOS, cela n'a pratiquement pas d'importance sous
  Linux), et charge encore le processeur.


  88..11..33..  LLiinnuuxx !!))  AAccccss DDiirreecctt  llaa MMmmooiirree ((DDMMAA)) EEssccllaavvee ((nnoorrmmaall))
  ((pp..eexx.. :: aauuccuunnee ppoouurr

  PPoouurr :: Libre le processeur pendant le transfert rel des donnes.

  CCoonnttrree :: La vrification des conditions aux limites de blocs,
  l'allocation de tampons (_b_u_f_f_e_r_s en anglais) contigus, et la
  programmation des registres DMA en font la plus lente de toutes les
  techniques. Elle utilise en plus un canal DMA (une ressource rare !)
  et ncessite des tampons aligns en mmoire basse.


  88..11..44..  DDMMAA eenn BBuuss MMaasstteerr ((pp..eexx.. :: LLAANNCCEE,, DDEECC 2211004400))

  PPoouurr :: Libre le processeur pendant le transfert des donnes, peut
  lier des tampons entre eux, peut ncessiter peu voire pas de perte de
  temps processeur sur le bus ISA. La majorit des pilotes bus-mastering
  pour linux utilisent un schma 'copybreak' o les gros paquets sont
  directements placs dans les tampons rseau du noyau par la carte, les
  petits paquets tant copis par le CPU qui est plus rapide pour ce
  type de traitements.

  CCoonnttrree :: (seulement pour les cartes ISA) Ncessite des tampons en
  mmoire basse et un canal DMA pour les cartes. Tout Matre de Bus aura
  des problmes avec les autres Matres de Bus qui sont des goinfres,
  comme certaines cartes SCSI primitives. Quelques jeux de puces pour
  cartes-mres mal penss ont des problmes avec les matres de bus. Et
  une raison pour n'avoir _a_u_c_u_n type de priphrique DMA est d'utiliser
  un processeur 486 conu pour tre insr (ou mont) en lieu et place
  d'un 386: ces processeurs doivent vider leur cache  chaque cycle DMA.
  (Ceci inclus les Cx486DLC, Ti486DLC, Cx486SLC, Ti486SLC, etc.)



  88..22..  ccrriittuurree dd''uunn ppiilloottee ddee ccaarrttee

  La seule chose indispensable pour utiliser une carte Ethernet sous
  Linux est le pilote appropri. Pour que cela soit possible, il est
  essentiel que le constructeur diffuse les informations techniques
  ncessaires  la programmation de ce pilote  destination du public
  sans que vous (ou quelqu'un d'autre) ne soyez oblig de leur vendre
  votre me. Une bonne indication des chances d'obtenir de la
  documentation (ou, si vous ne programmez pas, des chances que
  quelqu'un d'autre puisse crire ce pilote dont vous avez vraiment,
  vraiment besoin) est la disponibilit du pilote en mode paquet de
  Crynwr (ex Clarkson). Russ Nelson dirige cette opration, et il a t
  d'un grand service par son aide au cours du dveloppement de certains
  pilotes pour Linux. Vous pouvez essayer cette URL pour consulter le
  programme de Russ :


       Pilote en mode paquet de Russ Nelson
       <http://www.crynwr.com/crynwr/home.html>


  Une fois la documentation obtenue, vous pouvez crire un pilote pour
  votre carte et l'utiliser sous Linux (du moins en thorie).  Rappelez-
  vous nanmoins que certains matriels anciens qui ont t crs pour
  des machines XT ne fonctionneront pas bien dans un environnement
  multitches comme Linux. Leur utilisation entranera des problmes
  importants si votre rseau est raisonnablement charg.

  La plupart des cartes possdent des pilotes pour des interfaces MS-DOS
  comme NDIS ou ODI, mais ceux-ci sont inutiles pour Linux. De
  nombreuses personnes ont suggr de les intgrer directement ou de
  raliser une traduction automatique, mais c'est quasiment impossible.
  Les pilotes MS-DOS s'attendent  travailler en mode 16 bits et 
  utiliser des `interruptions logicielles', deux notions incompatibles
  avec le noyau Linux. Cette incompatibilit est en fait un avantage,
  puisque certains pilotes pour Linux sont considrablement meilleurs
  que leur quivalent MS-DOS. Par exemple, la srie des pilotes `8390'
  utilise des zones tampon de transmissions en ping-pong, qui commencent
  seulement  apparatre dans le monde MS-DOS.

  (`Des zones tampon de transmissions en ping-pong' signifie que l'on
  utilise au moins deux zones de la taille maximale d'un paquet pour
  transmettre les paquets. L'une des zones est charge pendant que la
  carte est en train de transmettre l'autre. Le deuxime paquet est
  alors transmis ds que le premier est parti, etc. De cette manire, la
  plupart des cartes sont capables d'envoyer des paquets  la dos  dos
  sur le cble).

  Bon. Vous avez donc dcid d'crire un pilote pour la carte Ethernet
  Machin, puisque vous avez les informations ncessaires  sa
  programmation, et que personne d'autre ne l'a encore fait (... ce sont
  les deux conditions principales ;-) ). Vous devriez commencer avec le
  squelette du pilote rseau qui est fourni avec la distribution source
  du noyau Linux. Il se trouve dans le fichier
  /usr/src/linux/drivers/net/skeleton.c dans tous les noyaux rcents.
  Jetez aussi un coup d'oeil sur le `Kernel Hackers Guide'  l'URL
  suivante :


       KHG <http://www.redhat.com:8080/HyperNews/get/khg.html>



  88..33..  IInntteeffaaccee dduu ppiilloottee aavveecc llee nnooyyaauu

  Voici quelques notes sur les fonctions que vous devrez crire si vous
  crez un nouveau pilote. Lisez-les en gardant sous la main le
  squelette de pilote dcrit ci-dessus : cela simplifiera les choses.


  88..33..11..  DDtteeccttiioonn ddee llaa ccaarrttee ((PPrroobbee))

  Appele au dmarrage pour vrifier l'existence de la carte. Meilleure
  si elle peut vrifier en douceur en lisant la mmoire etc. Peut aussi
  lire les ports d'E/S. Ecrire au dmarrage sur les ports d'E/S pour
  dtecter la carte n'est _p_a_s _b_i_e_n parce que cela risque de tuer un
  autre priphrique. Certaines parties de l'initialisation du
  priphrique sont habituellement faites  ce niveau (allouer l'espace
  d'E/S, les IRQ, remplir les champs de dev->???, etc.)  Vous avez
  besoin de savoir  quels ports d'E/S et  quelles zones mmoire la
  carte peut tre configure, comment autoriser l'utilisation de mmoire
  partage (si besoin), comment slectionner et mettre en oeuvre la
  gnration d'interruptions, etc.


  88..33..22..  GGeessttiioonnnnaaiirree dd''iinntteerrrruuppttiioonnss ((IInntteerrrruupptt hhaannddlleerr))

  Appel par le noyau quand la carte dclenche une interruption. A la
  responsabilit de dterminer pourquoi la carte a dclench
  l'interruption, et d'agir en consquence. Les conditions habituelles
  d'interruption sont l'arrive de donnes, la fin d'une transmission,
  l'indication de conditions d'erreur. Vous avez besoin de connatre les
  bits d'informations lis  une interruption afin de pouvoir agir en
  consquence.



  88..33..33..  FFoonnccttiioonn ddee ttrraannssmmiissssiioonn ((TTrraannssmmiitt ffuunnccttiioonn))

  Est lie  dev->hard_start_xmit() et est appele par le noyau quand ce
  dernier dsire envoyer des donnes par l'intermdiaire du
  priphrique. Envoie les donnes sur la carte et dclenche la
  transmission. Vous avez besoin de savoir comment empaqueter les
  donnes et comment les faire parvenir sur la carte (copie en mmoire
  partage, transfert sur les ports d'E/S, DMA ?) et au bon endroit sur
  la carte.  Puis vous devez savoir comment dire  la carte d'envoyer
  les donnes sur le cble, et (ventuellement) mettre une interruption
  quand ce sera fini. Quand le priphrique ne peut plus accepter de
  paquets supplmentaires, il doit armer le drapeau dev->tbusy. Quand de
  la place est devenue disponible, en gnral au cours d'une
  interruption de fin de transmission, dev->tbusy doit tre dsarm et
  les niveaux suprieurs doivent tre informs en utilisant
  mark_bh(INET_BH).




  88..33..44..  FFoonnccttiioonn ddee rrcceeppttiioonn ((RReecceeiivvee ffuunnccttiioonn))

  Appele par le gestionnaire d'interruptions du noyau quand la carte
  indique que des donnes sont disponibles. Rcupre les donnes de la
  carte, les empaquette dans un sk_buff et informe le noyau de la
  prsence des donnes en effectuant un netif_rx(sk_buff). Vouz devez
  savoir comment mettre en oeuvre le dclenchement d'interruptions  la
  rception de donnes, comment vrifier les bits d'informations
  correspondant  la rception, et comment rcuprer les donnes depuis
  la carte (l encore, par mmoire partage, ports d'E/S, DMA, etc.)


  88..33..55..  FFoonnccttiioonn dd''oouuvveerrttuurree ((OOppeenn ffuunnccttiioonn))

  Est lie  dev->open. Est appele par les couches rseau quand
  quelqu'un fait ifconfig eth0 up - cela doit mettre le priphrique en
  route et l'autoriser  recevoir et transmettre des donnes. Toute
  incantation spciale lie  l'initialisation et qui n'aurait pas t
  ralise dans la squence de dtection (autoriser la gnration d'IRQ,
  etc.) trouvera sa place ici.



  88..33..66..  FFoonnccttiioonn ddee ffeerrmmeettuurree ((ffaaccuullttaattiivvee)) ((CClloossee ffuunnccttiioonn))

  Met la carte dans un tat propre quand quelqu'un effectue ifconfig
  eth0 down. Doit librer les IRQ et les canaux DMA si le matriel le
  permet, et teindre tout ce qui pourrait conomiser de l'nergie
  (comme le transmetteur).


  88..33..77..  AAuuttrreess ffoonnccttiioonnss

  Des lments comme une fonction de rinitialisation, afin que, si les
  choses se dgradent, le pilote puisse essayer de rinitialiser la
  carte en dernier recours. Gnralement fait quand une transmission
  dpasse son temps maximal ou quelque chose du genre. Ou encore une
  fonction pour lire les registres qui contiennent les statistiques sur
  la carte, si elle en comporte.


  88..44..  IInnffoorrmmaattiioonnss tteecchhnniiqquueess ddee 33CCoomm

  Si vous tes intress(e) par l'criture de pilotes pour les cartes
  3Com, vous pouvez obtenir de la documentation technique de 3Com.
  Cameron a t suffisamment gentil pour nous dire comment y parvenir :

  Les adaptateurs Ethernet de 3Com sont documents pour les auteurs de
  pilotes dans nos `Rfrences Techniques' (Technical References, TRs).
  Ces manuels dcrivent les interfaces du programmeur avec la carte,
  mais elles ne parlent pas des diagnostics, des programmes
  d'installation, etc., que l'utilisateur final peut voir.

  Le dpartement marketing de la Division Adaptateurs Rseaux (Network
  Adapter Division) est responsable de la diffusion des TRs. Pour que ce
  programme reste efficace, nous le centralisons dans une entit appele
  `CardFacts'. C'est est un systme tlphonique automatis. Vous
  l'appelez avec un tlphone  frquences vocales et il vous envoie des
  choses par tlcopie. Pour obtenir un TR, appelez CardFacts au
  408-727-7021.

  (NDT : Cela ne fonctionne qu'aux Etats-Unis.)  Demandez le formulaire
  de commande du dveloppeur (Developer's Order Form), le document
  numro 9070. Ayez votre numro de fax sous la main lorsque vous
  appelez. Compltez le formulaire de commande et envoyez-le par
  tlcopie au 408-764-5004. Les manuels sont expdis par le service
  J+2 de Federal Express.

  Il y a des gens ici qui pensent que nous sommes trop libraux avec les
  manuels, et qui cherchent des preuves que le systme est trop onreux,
  ou prend trop de temps et d'effort. Jusqu' prsent, les clients de
  3Com ont t trs bien sur ce point, et il n'y a pas de problme avec
  le niveau de demandes que nous avons obtenu. Nous avons besoin que
  votre coopration et votre retenue se maintiennent pour continuer
  ainsi.


  88..55..

  NNootteess ssuurr lleess ccaarrtteess bbaasseess ssuurr llaa ppuuccee PPCCnneett // LLAANNCCEE dd''AAMMDD

  La puce LANCE (Local Area Network Controller for Ethernet, Contrleur
  de Rseau Local pour Ethernet) d'AMD constituait l'offre initiale, et
  a depuis t remplace par la puce `PCnet-ISA', aussi connue en tant
  que 79C960. Notez que le nom `LANCE' est rest, et certaines personnes
  se rfrent  la nouvelle puce en utilisant l'ancien nom. Dave Roberts
  de la Division des Produits Rseaux (Network Products Division) d'AMD
  a eu l'amabilit de nous fournir les informations suivantes concernant
  cette puce :

  `Fonctionnellement, elle est quivalente  une NE1500. Le jeu de
  registres est identique  celui de la vieille LANCE avec les additions
  de l'architecture 1500/2100. Les vieux pilotes 1500/2500
  fonctionneront avec la PCnet-ISA. L'architecture NE1500 et NE2100 est
  la mme  la base. Initialement Novell l'a appel la 2100, mais
  ensuite a essay de distinguer entre cartes coax et 10Base-T. Tout ce
  qui tait purement 10Base-T devait tre numrot dans la srie 1500.
  C'est la seule diffrence.

  De nombreuses socits offrent des produits bass sur la PCnet-ISA, y
  compris HP, Racal-Datacom, Allied Telesis, Boca Research, Kingston
  Technology, etc. Les cartes sont  la base les mmes, except que
  certains constructeurs ont ajout des fonctionnalits `sans-cavaliers'
  (`jumperless') qui permettent  la carte d'tre configure par
  logiciel. La plupart n'en ont pas. AMD offre un paquetage de
  conception standard pour une carte qui utilise la PCnet-ISA et de
  nombreux fabricants utilisent notre conception sans changement. Cela
  signifie que n'importe qui souhaitant crire des pilotes pour la
  plupart des cartes bases sur la puce PCnet-ISA peut se contenter
  d'obtenir la documentation technique auprs d'AMD. Appelez notre
  centre de distribution documentaire au (800)222-9323 et demandez la
  documentation de l'Am79C960, PCnet-ISA. Elle est gratuite.

  Un moyen rapide pour savoir si la carte est une carte `gnrique' est
  simplement de la regarder. Si elle l'est, elle doit juste comporter
  une grosse puce, un quartz, une petite PROM d'adresse IEEE,
  ventuellement un support pour une ROM de dmarrage, et un connecteur
  (1, 2 ou 3, selon les options de mdia offertes). Notez que s'il
  s'agit d'une carte coax, elle comportera aussi quelques composants
  pour le transceiver, mais ils devraient tre prs du connecteur et
  loigns de la PCnet-ISA.'

  Une note pour les bidouilleurs potentiels de cartes est que
  diffrentes implmentations de la LANCE effectuent le `redmarrage' de
  diffrentes faons. Certaines reprennent o elles s'taient arrtes
  dans l'anneau, et d'autres dmarrent directement au dbut de l'anneau,
  comme si elles venaient d'tre initialises.





  88..66..  MMuullttiiccaasstt eett MMooddee ``PPrroommiissccuuoouuss''

  Une des autres choses sur lesquels Donald a travaill est
  l'implmentation des points d'entre pour le multicast et le mode
  `promiscuous'. Tous les pilotes ISA _p_u_b_l_i__s (c'est--dire ppaass les
  pilotes au stade `alpha') supportent aujourd'hui le mode promiscuous.

  Donald crit : Je commencerai par parler du mode `promiscuous', qui
  est conceptuellement facile  implmenter. Pour la plupart des
  matriels, vous n'avez qu' positionner un bit de registre, et 
  partir de ce moment-l vous obtenez tous les paquets qui passent sur
  le fil. Bon, ce n'est pas vraiment aussi simple que cela ; pour
  certains matriels, vous devez arrter la carte (en perdant
  potentiellement quelques paquets), la reconfigurer, puis la ractiver.
  Ok, a c'est facile, donc je passe  quelque chose qui n'est pas aussi
  vident : le _m_u_l_t_i_c_a_s_t. On peut le raliser de deux faons :


  1. Utiliser le mode promiscuous, et un filtre de paquets comme celui
     de Berkeley (Berkeley packet filter, BPF). Le BPF est un langage 
     pile de comparaison de modles (pattern matching stack), avec
     lequel vous crivez un programme qui extrait les adresses qui vous
     intressent. Son avantage est qu'il est trs gnral et
     programmable. Son inconvnient est qu'il n'existe pas de moyen
     gnral pour le noyau d'viter d'avoir  mettre en route le mode
     promiscuous et de passer chaque paquet qui circule sur le fil 
     travers tous les filtres de paquets qui se sont enregistrs.
     Consultez ``Le Berkeley Packet Filter'' pour plus d'informations.

  2. Utiliser le filtre multicast que la plupart des puces Ethernet
     possdent.

  Je crois que je devrais donner une liste de ce que quelques cartes ou
  puces Ethernet fournissent :



          Puce/carte  Promiscuous  Filtre Multicast
          -----------------------------------------
          Seeq8001/3c501  Oui     Filtre binaire (1)
          3Com/3c509      Oui     Filtre binaire (1)
          8390            Oui     Hashage  six bits Autodin II (2) (3)
          LANCE           Oui     Hashage  six bits Autodin II (2) (3)
          i82586          Oui     Hashage  six bits Autodin II cach (2) (4)




  1. Ces cartes prtendent avoir un filtre, mais il s'agit d'un simple
     oui/non `accepte tous les paquets multicast', ou `n'accepte aucun
     paquet multicast'.

  2. AUTODIN II est le polynme standard de contrle Ethernet (somme de
     contrle/checksum CRC). Dans ce principe, les adresses multicast
     sont hashes et recherches dans une table de hashage. Si le bit
     correspondant est activ, ce paquet est accept. Les paquets
     Ethernet sont conus de telle faon que la partie matrielle pour
     raliser ceci est triviale -- vous mmorisez juste (habituellement)
     six bits du circuit CRC (qui est ncessaire de toute faon pour la
     vrification d'erreur) aprs les six premiers octets (l'adresse de
     destination), et vous les utilisez comme index dans la table de
     hashage (six bits -- une table de 64-bits).

  3. Ces puces utilisent le hashage  six bits, et ncessitent que la
     table soit calcule et charge par l'hte. Cela signifie que le
     noyau doit comprendre le code pour le CRC.
  4. Le 82586 utilise le hashage  six bits de faon interne, mais il
     calcule la table de hashage lui-mme  partir d'une liste
     d'adresses multicast  accepter.

  Notez qu'aucune de ces puces ne ralise un filtrage parfait, et nous
  avons encore besoin d'un module de niveau intermdiaire pour raliser
  le filtrage final. Notez aussi que dans chaque cas nous devons
  conserver une liste complte des adresses multicast acceptes pour
  recalculer la table de hashage quand elle change.


  88..77..

  LLee ffiillttrree ddee ppaaqquueettss ddee BBeerrkkeelleeyy ((BBeerrkkeelleeyy PPaacckkeett FFiilltteerr ---- BBPPFF))

  L'ide gnrale des dveloppeurs est que la fonctionnalit du BPF ne
  doit pas tre fournie par le noyau, mais doit se trouver dans une
  bibliothque de compatibilit (dont on espre qu'elle servira peu).

  Pour ceux qui ne seraient pas au courant : BPF (le Berkeley Packet
  Filter) est un mcanisme destin  spcifier aux couches rseau du
  noyau quels paquets vous intressent. Il est implment sous la forme
  d'un interprteur d'un langage  pile spcialis construit dans un
  niveau bas du code rseau. Une application passe un programme crit
  dans ce langage au noyau, et le noyau excute le programme sur chaque
  paquet entrant. Si le noyau possde plusieurs applications BPF, chaque
  programme est excut sur chaque paquet.

  Le problme est qu'il est difficile de dduire quel type de paquet
  intresse rellement l'application  partir du programme de filtrage,
  donc la solution est de toujours excuter le filtre. Imaginez un
  programme qui enregistre un programme BPF pour extraire un flux de
  donnes de faible dbit envoy  une adresse multicast. La plupart des
  cartes Ethernet possdent un filtre d'adresses multicast implment
  sous la forme d'une table de hashage  64 entres qui ignore la
  plupart des paquets multicast non souhaits, donc les capacits
  existent pour faire de cette opration une opration peu coteuse en
  ressources. Mais avec le BPF, le noyau doit passer l'interface en mode
  promiscuous, recevoir ttoouuss les paquets, et les passer  travers ce
  filtre. D'ailleurs, c'est un travail qu'il est trs difficile de
  comptabiliser dans le processus qui a demand les paquets.


  99..  FFaaiirree dduu rrsseeaauu aavveecc uunn ppoorrttaabbllee

  Il existe plusieurs faons de mettre votre portable en rseau. Vous
  pouvez utiliser le code SLIP (et tourner aux vitesses d'une liaison
  srie). Vous pouvez employer un portable avec un slot PCMCIA intgr,
  ou bien avec une station d'accueil et y mettre une carte Ethernet ISA.
  Vous pouvez encore utiliser un adaptateur Ethernet sur port parallle.


  99..11..  UUttiilliisseerr SSLLIIPP ((SSeerriiaall LLiinnee IIPP,, IIPP ssuurr lliiaaiissoonn ssrriiee))

  C'est la solution la moins chre, mais de loin la plus difficile. En
  plus, vous n'obtiendrez pas des taux de transfert trs levs. Comme
  SLIP n'est pas vraiment li aux cartes Ethernet, nous n'en parlerons
  pas plus ici. Consultez le _N_E_T_-_2 _H_o_w_t_o.


  99..22..  SSuuppppoorrtt PPCCMMCCIIAA

  Essayez de dterminer exactement de quel matriel vous disposez
  (c'est--dire le fabricant de la carte, celui du contrleur de puces
  PCMCIA) puis demandez sur la liste LAPTOPS. En tout tat de cause, ne
  vous attendez pas  ce que les choses soient trs simples.  Attendez-
  vous  chercher et  tourner un peu en rond,  patcher les noyaux,
  etc. Peut-tre qu'un jour vous serez capable de taper `make
  config' 8-).

  A l'heure actuelle, les deux jeux de puces PCMCIA qui sont utilisables
  avec Linux sont le TCIC/2 de Databook et l'i82365 d'Intel.

  Il existe un certain nombre de programmes sur tsx-11.mit.edu dans le
  rpertoire /pub/linux/packages/laptops/ qui pourront se rvler
  utiles.

  (NDT : Bien entendu, le lecteur franais se rapportera  l'un des
  miroirs de tsx-11, comme par exemple
  ftp://ftp.lip6.fr/pub/linux/tsx-11/packages/laptops/.)

  Cela va des pilotes pour cartes Ethernet PCMCIA aux programmes qui
  communiquent avec la puce du contrleur PCMCIA. Notez que ces pilotes
  sont en gnral lis  une puce PCMCIA spcifique (c'est--dire la
  82365 d'Intel ou la TCIC/2).

  Pour les cartes compatibles NE2000, certaines personnes ont russi
  juste en configurant la carte sous DOS, puis en dmarrant Linux depuis
  l'invite de commande DOS via loadlin.

  Les choses voluent pour les utilisateurs de Linux qui souhaitent un
  support PCMCIA, car des progrs substantiels ont t raliss. Le
  dernier paquetage de David Hinds, qui en est l'un des artisans, se
  trouve sur


       PCMCIA Package <ftp://cb-iris.stanford.edu/pub/pcmcia>


  Cherchez un fichier comme pcmcia-cs-X.Y.Z.tgz o X.Y.Z est le dernier
  numro de version. Vous devriez aussi pouvoir le trouver sur le site
  FTP tsx-11.mit.edu (ou son miroir le plus proche, NDT).

  Notez que le logiciel d'accs PCMCIA de Donald fonctionne en tant que
  processus utilisateur, alors que David Hinds propose une solution au
  niveau du noyau. Vous serez certainement mieux servi(e) par le
  paquetage de David car il est plus couramment employ, et en constant
  dveloppement.


  99..33..  CCaarrttee EEtthheerrnneett IISSAA ddaannss llaa ssttaattiioonn dd''aaccccuueeiill..

  Les stations d'accueil (_d_o_c_k_i_n_g _s_t_a_t_i_o_n_s en anglais, ou encore _d_o_c_k,
  NDT) cotent typiqement environ 1500 francs et fournissent deux slots
  ISA standard, deux ports srie et un port parallle. La plupart
  d'entre elles sont alimentes par les batteries du portable, et
  quelques unes permettent d'en ajouter dans la station mme, pour peu
  que vous utilisiez des cartes ISA courtes.  Ainsi, vous pouvez
  utiliser une carte rseau conomique et profiter des performances
  d'Ethernet  pleine vitesse.


  99..44..  AAddaappttaatteeuurrss ddee ppoocchhee eett ssuurr ppoorrtt ppaarraallllllee..

  Les adaptateurs Ethernet `de poche' peuvent aussi rpondre  vos
  besoins. Notez que la vitesse de transfert ne sera pas aussi
  importante que a (peut-tre 200 Ko/s en pointe ?)  cause des
  limitations du port parallle.

  La plupart d'entre eux vont vous entraver avec une alimentation qui
  ressemble a un gros pav. Vous pourrez parfois vous passer du pav des
  adaptateurs en achetant ou en fabriquant un cble qui prend
  l'alimentation sur le port clavier du portable (voir ``alimentation du
  clavier'').

  Consultez ``DE-600 / DE-620'' et ``RealTek'' pour deux adaptateurs de
  poche utilisables sous Linux.


  1100..  QQuueessttiioonnss ddiivveerrsseess..

  Tout ce qui se rapporte  Ethernet et qui ne rentrait pas ailleurs se
  retrouve ici. Ce n'est peut-tre pas significatif, ni intressant pour
  tout le monde, mais de totue faon, c'est l.


  1100..11..  PPaassssaaggee ddeess aarrgguummeennttss EEtthheerrnneett aauu nnooyyaauu

  Voici deux commandes gnriques du noyau qui peuvent tre passes au
  noyau au moment du dmarrage (ether et reserve). Vous pouvez le faire
  avec LILO, loadlin, ou tout autre utilitaire de dmarrage qui accepte
  des arguments optionnels.

  Par exemple, si la commande tait `blabla' et qu'elle attende trois
  arguments (disons 123, 456 et 789), alors, avec LILO, vous pourriez
  taper au dmarrage :

  LILO: linux blabla=123,456,789

  Pour plus d'informations, ainsi qu'une liste complte, sur les
  arguments de dmarrage, veuillez consulter le


       BootPrompt-HOWTO <http://metalab.unc.edu/mdw/HOWTO/Boot
       Prompt-HOWTO.html>



  1100..11..11..  LL''aarrgguummeenntt eetthheerr

  La commande ether= est utilise en conjonction avec le pilote compil
  dans le noyau. Le ether= n'aura _a_b_s_o_l_u_m_e_n_t _a_u_c_u_n _e_f_f_e_t sur un pilote
  modulaire. Sous sa forme la plus gnrique, elle ressemble  quelque
  chose comme :


       ether=IRQ,ADR_DE_BASE,PARAM_1,PARAM_2,NOM


  Tous les arguments sont optionnels. Le premier argument non-numrique
  est considr comme le NOM.

  IIRRQQ:: Evident. Une valeur d'IRQ de `0' (habituellement la valeur par
  dfaut) signifie affectation automatique de l'IRQ. C'est un accident
  de l'Histoire que le paramtre d'IRQ soit en premier plutt que
  l'adresse de base -- cela sera corrig lorsque quelque chose d'autre
  changera.

  AADDRR__DDEE__BBAASSEE:: Evident aussi. Une valeur de `0' (habituellement la
  valeur par dfaut) signifie de tester une liste d'adresses spcifiques
   ce type de carte pour essayer de dtecter une carte Ethernet.

  PPAARRAAMM__11:: Utilis  l'origine comme une valeur qui passe outre
  l'adresse de dpart de la zone mmoire pour une carte Ethernet 
  mmoire partage, comme la WD80*3. Certains pilotes utilisent les
  quatre bits de poids faible de cette valeur pour fixer le niveau de
  message de dbogage. 0 -- dfaut, 1-7 -- niveaux 1  7 (7 tant le
  niveau le plus bavard), 8 -- niveau 0 (pas de messages). Le pilote
  LANCE utilise les quatre bits de poids faible de cette valeur pour
  slectionner le canal DMA. Sinon il utilise l'affectation automatique
  du DMA.

  PPAARRAAMM__22:: Le pilote 3c503 l'utilise pour choisir entre le transceiver
  interne et le transceiver externe. 0 -- dfaut/interne, 1 -- AUI
  externe. Les cartes E21XX de Cabletron utilisent les quatre bits de
  poids faible de PARAM_2 pour choisir le support physique. Sinon il est
  dtect automatiquement.

  NNOOMM:: Slectionne le priphrique rseau auquel les valeurs se
  rfrent. Le noyau standard utilise les noms `eth0', `eth1', `eth2' et
  `eth3' pour les cartes Ethernet attaches au bus, et `atp0' pour
  l'adaptateur `de poche' sur port parallle. Le pilote ARCnet utilise
  le nom `arc0'. Le comportement par dfaut est de tester une seule
  carte Ethernet pour `eth0'. Vous ne pouvez activer plusieurs cartes
  qu'en fixant de faon explicite leur adresse de base avec les
  paramtres de LILO. Le noyau 1.0 considrait les cartes Ethernet
  bases sur la puce LANCE comme un cas spcial. Les arguments de LILO
  taient ignors, et les cartes LANCE recevaient toujours des noms
  `eth<n>' en commenant  `eth0'. Les cartes supplmentaires, non-
  LANCE, devaient tre affectes  `eth<n+1>', et le test habituel de
  `eth0' devait alors tre dsactiv avec quelque chose comme
  `ether=0,-1,eth0'. (Oui, c'est bogu.)


  1100..11..22..  LLaa ccoommmmaannddee rreesseerrvvee

  Cette autre commande LILO est utilise exactement comme la commande
  `ether=' ci-dessus, c'est--dire que l'on ajoute son nom aux options
  spcifies dans lilo.conf :


       reserve=IO-base,extent{,IO-base,extent...}


  Sur certaines machines, il peut tre ncessaire d'empcher les pilotes
  de priphrique de tester des priphriques (auto-dtection) dans une
  zone spcifique. Cela peut tre le cas  cause d'un matriel mal conu
  qui _f_i_g_e le dmarrage (comme certaines cartes Ethernet), qui est
  identifi par erreur, dont l'tat a t chang par une procdure de
  dtection prcdente, ou plus encore d'un matriel que vous ne
  souhaitez pas voir initialis par le noyau.

  L'argument de dmarrage reserve rpond  cette attente en spcifiant
  une rgion de port d'E/S qui ne doit pas tre teste. Cette rgion est
  rserve dans la table d'enregistrement des ports du noyau comme si un
  priphrique avait dj t trouv dans cette rgion. Notez que ce
  mcanisme ne devrait pas tre ncessaire sur toutes les machines.
  C'est seulement lorsqu'il y a un problme ou un cas spcial que son
  utilisation peut se rvler ncessaire.

  Les ports d'E/S dans la zone spcifie sont protgs contre les
  procdures de dtection de priphriques. Nous avons montr que cela
  est ncessaire lorsqu'un pilote se bloque sur une carte NE2000, ou
  identifie de faon errone un autre priphrique comme tant le sien.
  Un pilote de priphrique correct ne devrait pas tester une zone
  rserve,  moins qu'un autre argument de dmarrage ne spcifie
  explicitement qu'il doive le faire sur cette zone. Cela implique que
  reserve sera le plus souvent utilis avec un autre argument de
  dmarrage. Donc si vous spcifiez une zone de reserve pour protger un
  priphrique donn, vous devez gnralement spcifier explicitement
  une dtection pour ce priphrique. La plupart des pilotes ignorent la
  table d'enregistrement des ports si on leur fournit une adresse
  explicite.

  Par exemple, la ligne de dmarrage

       LILO: linux  reserve=0x300,32  ether=0,0x300,eth0


  oblige tous les priphriques  l'exception des pilotes Ethernet  ne
  pas tester la plage 0x300-0x31f.

  Comme d'habitude avec les spcificateurs de dmarrage, il existe une
  limite de 11 paramtres, donc vous ne pouvez spcifier que 5 zones
  rserves par mot-cl reserve. Plusieurs spcificateurs reserve
  fonctionneront si vous avez une requte inhabituellement complique.


  1100..22..  UUttiilliissaattiioonn ddeess ppiillootteess EEtthheerrnneett ccoommmmee mmoodduulleess

  La majorit des distributions disponibles ont des noyaux avec trs peu
  de pilotes intgrs. Les pilotes sont fournis comme modules
  chargeables dynamiquement. Ces pilotes modulaires sont normalement
  chargs par l'administrateur via la commande modprobe(8) dans certains
  cas, ils sont automatiquement chargs par le noyau via kerneld (pour
  les 2.0) ou kmod (pour les 2.1) qui eux-mmes font appel  modprobe.

  Votre distribution offre peut tre de jolis outils graphiques pour
  configurer les modules ethernet. Si possible, essayez de les utiliser
  avant tout. La description qui suit explique ce qui se cache derrire
  ces jolis petits programmes et ce que'ils changent.

  Les informations qui dterminent quels modules doivent tre utiliss
  et les options qui leur sont associes sont en principe stockes dans
  le fichier /etc/conf.modules. Les deux options qui y ont le plus
  d'intert (pour les cartes ethernet) sont alias et options.  La
  commande modprobe consulte ce fichier pour obtenir des informations
  sur les modules.

  Les modules utiliss sont normalement stocks dans un rpertoire nomm
  /lib/modules/`uname -r`/net o la commande uname -r retourne la
  version du noyau (ex : 2.0.34). Vous pouvez aller y faire un tour pour
  savoir quels modules correspondent  votre carte.

  La premire chose  mettre dans votre /etc/conf.modules est une ligne
  indiquant  modprobe o se trouve le pilote  utiliser avec eth0 (et
  eth1, ...), ceci grce  un alias. Par exemple, si vous avez une carte
  ISA SMC EtherEZ qui utilise le module smc-ultra.o, vous aurez besoin
  de crer un alias entre ce pilote et eth0 en ajoutant cette ligne :


          alias eth0 smc-ultra



  Vous pourrez aussi avoir  ajouter une ligne d'options indiquant
  lesquelles doivent tre utilises avec tel module (ou alias de
  module). Continuons l'exemple ci-dessus : avec la ligne alias seule,
  le noyau vous prviendrait (cf. dmesg) que l'autodtection des cartes
  ISA n'est _p_a_s une bonne ide.  Pour supprimer cet avertissement, il
  suffirait d'ajouter une ligne donnant au module l'adresse d'E/S de
  votre carte, dans ce cas, l'adresse hexadcimale 0x280.


          options smc-ultra io=0x280



  La plupart des modules ISA acceptent des arguments comme io=0x340 et
  irq=12 sur la ligne de commande d'insmod. Il est _R_E_Q_U_I_S ou du moins
  _F_O_R_T_E_M_E_N_T _R_E_C_O_M_M_A_N_D_ que vous fournissiez ces paramtres pour viter
  la dtection automatique de la carte. A la diffrence des
  priphriques PCI et EISA, il n'existe pas de moyen vraiment sr de
  raliser une dtection automatique de la majorit des priphriques
  ISA, et cela doit donc tre vit quand on utilise les pilotes sous la
  forme de modules chargeables.

  Une liste de toutes les options acceptes par chaque module se trouve
  dans le fichier :

  /usr/src/linux/Documentation/networking/net-modules.txt

  Vous avez intrt  le lire pour trouver les options  utiliser pour
  votre carte. Notez que quelques modules permettent les listes
  d'options spares par des virgules, ils sont capables de grer
  plusieurs cartes depuis un seul module, par exemple les cartes  base
  de 8390, ainsi que le pilote PLIP.


  ______________________________________________________________________
          option 3c503 io=0x280,0x300,0x330,0x350 xcvr=0,1,0,1
  ______________________________________________________________________



  La commande ci-dessus permet  un seul et mme module de contrler
  quatre cartes 3c503, les cartes 2 et 4 utilisant le transceiver
  externe. Ne mettez pas d'espace autour des '=' ou des virgules.

  Notez aussi que les modules utiliss ne peuvent tre supprims de la
  mmoire. Cela signifie que vous aurez  faire un ifconfig eth0 down
  (arrter la carte ethernet) avant de pouvoir les supprimer.

  La commande lsmod vous dira quels sont les modules qui sont chargs,
  s'ils sont utiliss, et rmmod les supprimera.


  1100..33..  DDooccuummeennttss aassssoocciiss

  La plupart des informations que vous trouvez dans ce document
  proviennent de messages sauvegards des groupes de comp.os.linux.*, ce
  qui montre qu'il s'agit d'une vraie source d'informations. D'autres
  renseignements trs utiles proviennent de tout un tas de petits
  fichiers de Donald lui-mme.

  Bien entendu, si vous configurez une carte Ethernet, vous voudrez
  configurer les logiciels que vous allez utiliser, et vous lirez pour
  cela le _H_o_w_t_o _N_E_T_-_3. Ou encore, si vous vous sentez pousser des ailes
  de ``hacker'', vous pourrez toujours grapiller des informations
  supplmentaires directement dans les fichiers sources des pilotes. Ils
  comportent en gnral un paragraphe ou deux dcrivant les points
  importants, avant que le code ne dmarre...

  Pour ceux d'entre vous qui recherchent des informations qui ne sont
  pas spcifiques  Linux (comme : qu'est-ce que 10BaseT, qu'est-ce
  qu'AUI, que fait un hub, etc.) je vous recommande fortement d'utiliser
  le groupe de news comp.dcom.lans.ethernet et/ou
  _c_o_m_p_._s_y_s_._i_b_m_._p_c_._h_a_r_d_w_a_r_e_._n_e_t_w_o_r_k_i_n_g. Les archives de news tels que
  deja.com sont aussi une source intarissable de rponses. Vous pouvez
  aussi rcuprer les FAQ de ces groupes de news sur par exemple :


       Les FAQ de Usenet <ftp://ftp.lip6.fr/pub/doc/faq/usenet-by-
       hierarchy/>


  Vous pouvez aussi consulter la `Page d'accueil d'Ethernet' pour ainsi
  dire, qui se trouve  l'URL suivante :

       La page d'accueil d'Ethernet
       <http://wwwhost.ots.utexas.edu/ethernet/ethernet-home.html>



  1100..44..  DDssiisstteemmeenntt ddee rreessppoonnssaabbiilliitt eett CCooppyyrriigghhtt

  Ce document _n_'_e_s_t _p_a_s la bible. Toutefois, il s'agit certainement de
  la source d'informations la plus  jour que vous pourrez trouver.
  Personne n'est responsable de ce qui arrive  votre matriel hormis
  vous-mme. Si votre carte Ethernet ou tout autre partie matrielle de
  votre ordinateur part en fume (...bien que ce soit pratiquement
  impossible !) nous n'en prenons aucune responsabilit. LES AUTEURS NE
  SONT RESPONSABLES D'AUCUN DOMMAGE ENCOURU CONSCUTIF A DES ACTIONS
  EFFECTUES EN SE BASANT SUR LES INFORMATIONS COMPRISES DANS CE
  DOCUMENT.

  Ce document est Copyright (c) 1993-1997 by Paul Gortmaker. Il est
  permis de faire et de distribuer des copies compltes de ce manuel 
  condition que la notice de copyright et que cette notice de permission
  soient prserves dans toutes les copies.

  Il est permis de copier et de distribuer des versions modifies de ce
  document sous les mmes conditions que la copie complte,  condition
  que cette notice de copyright soit incluse exactement telle qu'elle
  l'est dans l'original, et que le travail driv rsultant, dans son
  intgralit, soit distribu sous les termes d'une notice de permission
  identique  celle-ci.

  Il est permis de copier et de distribuer des traductions de ce
  document dans d'autres langues, sous les mmes conditions que ci-
  dessus pour les versions modifies.

  Si vous avez l'intention d'intgrer ce document dans un travail
  destin  la publication, contactez-moi (par courrier lectronique)
  afin de pouvoir obtenir les informations les plus  jour possible. Par
  le pass, des versions dpasses de documents _L_i_n_u_x _H_O_W_T_O ont t
  publies, causant aux dveloppeurs le prjudice ind d'tre
  empoisonns par des questions dont les rponses figuraient dj dans
  les versions  jour.



  En accord avec cette notice, la version originale (en anglais) telle
  qu'elle apparat dans l'_E_t_h_e_r_n_e_t_-_H_O_W_T_O est fournie ici :

  This document is _n_o_t gospel. However, it is probably the most up to
  date info that you will be able to find. Nobody is responsible for
  what happens to your hardware but yourself. If your ethercard or any
  other hardware goes up in smoke (...nearly impossible!)  we take no
  responsibility. ie. THE AUTHORS ARE NOT RESPONSIBLE FOR ANY DAMAGES
  INCURRED DUE TO ACTIONS TAKEN BASED ON THE INFORMATION INCLUDED IN
  THIS DOCUMENT.

  This document is Copyright (c) 1993-1997 by Paul Gortmaker. Permission
  is granted to make and distribute verbatim copies of this manual
  provided the copyright notice and this permission notice are preserved
  on all copies.

  Permission is granted to copy and distribute modified versions of this
  document under the conditions for verbatim copying, provided that this
  copyright notice is included exactly as in the original, and that the
  entire resulting derived work is distributed under the terms of a
  permission notice identical to this one.

  Permission is granted to copy and distribute translations of this
  document into another language, under the above conditions for
  modified versions.

  A hint to people considering doing a translation.  First, translate
  the SGML source (available via FTP from the HowTo main site) so that
  you can then generate other output formats.  Be sure to keep a copy of
  the original English SGML source that you translated from! When an
  updated HowTo is released, get the new SGML source for that version,
  and then a simple diff -u old.sgml new.sgml will show you exactly what
  has changed so that you can easily incorporate those changes into your
  translated SMGL source without having to re-read or re-translate
  everything.

  If you are intending to incorporate this document into a published
  work, please make contact (via e-mail) so that you can be supplied
  with the most up to date information available. In the past, out of
  date versions of the Linux HowTo documents have been published, which
  caused the developers undue grief from being plagued with questions
  that were already answered in the up to date versions.


  Ce document fait partie des _H_O_W_T_O _L_i_n_u_x traduits en franais.  Vous
  pouvez trouver une liste  jour de ces documents  l'adresse
  <http://www.freenix.org/unix/linux/HOWTO/Liste-des-HOWTO.html>

  Les _H_O_W_T_O _L_i_n_u_x font partie du _L_i_n_u_x _D_o_c_u_m_e_n_t_a_t_i_o_n _P_r_o_j_e_c_t (LDP). Si
  vous souhaitez participer au LDP ou  sa traduction en franais, vous
  pouvez consulter <http://www.freenix.org/unix/linux/HOWTO/Liste-des-
  HOWTO.html> ou contacter Eric Dumas, dumas@linux.eu.org.


  Cette version franaise a t ralise par Mathieu Arnold
  <arn_mat@club-internet.fr>, Stphane Alnet <alnet@u-picardie.fr> tait
  l'ancien traducteur. Elle est Copyright (c) 1997-1998, Mathieu Arnold,
  selon les termes de la notice ci-dessus.


  Si vous constatez des erreurs _d_a_n_s _l_a _t_r_a_d_u_c_t_i_o_n en franais, merci
  d'en informer le traducteur. Vos remarques seront prises en compte
  pour la prochaine version de la traduction.


  1100..55..  CCoonncclluussiioonn


  Si vous avez trouv une faute de frappe naurme, ou des informations
  dpasses dans ce document, merci d'envoyer un courrier lectronique.
  Il est norme, et il est facile de rater certaines choses.  Si vous
  avez envoy un courrier  propos d'une modification, et qu'elle n'a
  pas t incluse dans la version suivante, n'hsitez pas  la
  r-envoyer, car elle a pu se perdre dans le flot habituel de SPAM et
  de prospectus que je reois.

  Merci !

  Paul Gortmaker, p_gortmaker@yahoo.com







  Adaptation franaise Bernard Choppy, choppy@imaginet.fr
  7 dcembre 1999 Le HOWTO du pare-feu et des serveurs man
  dataires
  Mark Grennan mark@grenna.com
  v0.67, 26 septembre 1999 -

  Ce document est destin  enseigner les bases des systmes pare-feux
  ainsi que pour donner quelques dtails sur la configuration d'un pare-
  feu aussi bien filtrant que serveur mandataire avec un PC sous Linux.
  Une version HTML de la version originale en anglais de ce document est
  disponible  http://www.grennan.com/Firewall-HOWTO.html.
  ______________________________________________________________________

  Table des matires




















































  1. Introduction

     1.1 Ractions
     1.2 Avertissement
     1.3 Droit d'auteur
     1.4 Les raisons qui me poussent  crire ceci
     1.5 Autres sources d'information

  2. Comprendre les pare-feux

     2.1 Politiques de scurit
     2.2 Types de pare-feux
        2.2.1 Pare-feux filtrants
     2.3 Serveurs mandataires
        2.3.1 Mandataire SOCKS

  3. Architecture de pare-feu

  4. Configurer le pare-feu filtrant Linux

     4.1 Matriel ncessaire
     4.2 Logiciel ncessaire
        4.2.1 Pare-feu filtrant
        4.2.2 Serveur mandataire

  5. Prparer le systme Linux

     5.1 Compiler le noyau
     5.2 Configurer deux cartes rseau
     5.3 Configurer les adresses rseau
     5.4 Tester votre rseau
     5.5 Scuriser le pare-feu

  6. Configuration du filtrage IP (IPFWADM)

  7. Configuration du filtrage IP (IPchains)

  8. Rendre le tout plus simple

  9. Installer un mandataire Squid transparent

  10. Installer le serveur mandataire TIS

     10.1 Trouver le logiciel
     10.2 Compilation du FWTK TIS
     10.3 Installation du FWTK TIS
     10.4 Configuration du FWTK TIS
        10.4.1 Le fichier netperm-table
        10.4.2 Le fichier /etc/services

  11. Le serveur mandataire SOCKS

     11.1 Installation du serveur mandataire
     11.2 Configuration du serveur mandataire
        11.2.1 Le fichier d'accs
        11.2.2 Le fichier de routage
        11.2.3 DNS depuis l'arrire d'un pare-feu
     11.3 Travailler avec un serveur mandataire
        11.3.1 Unix
        11.3.2 MS Windows avec Trumpet Winsock
     11.4 Faire fonctionner le serveur mandataire avec les paquets UDP
     11.5 Inconvnients des serveurs mandataire

  12. Configurations avances

     12.1 Un grand rseau avec scurit renforce
        12.1.1 La configuration du rseau
        12.1.2 La configuration du bastion

  13. Simplifier l'administration

  14. Outrepasser un pare-feu mandataire



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  David Rudder drig@execpc.com.  est l'auteur de la version d'origine de
  ce Firewall-HOWTO, il y a de si nombreux mois, et je voudrais encore
  le remercier pour m'avoir autoris  mettre son travail  jour.

  Les pare-feux sont devenus trs populaires en tant que "nec plus
  ultra" de la scurit sur Internet.  Comme de nombreuses choses dont
  la renomme grandit, une certaine incomprhension s'y est jointe.  Ce
  HOWTO prsente les bases de la dfinition d'un pare-feu et la manire
  d'en configurer un.

  J'utilise un noyau 2.2.15 et RedHat 6.0 pour dvelopper ce howto,
  ainsi les exemples ci-dessous sont fonds sur cette distribution.  Si
  vous trouvez des diffrences dans votre distribution, envoyez-moi un
  courriel et je mettrai  jour ce howto.

  NdT : Diverses traductions ont t proposes pour le terme _f_i_r_e_w_a_l_l,
  dont pare-feu, coupe-feu, mur anti-feu, etc.  Le traducteur a adopt
  "pare-feu", qui semble actuellement le terme le plus couramment admis.


  11..11..  RRaaccttiioonnss

  Toute raction est la bienvenue.  SSIIGGNNAALLEEZZ TTOOUUTTEE IINNEEXXAACCTTIITTUUDDEE DDAANNSS CCEETT
  AARRTTIICCLLEE SS''IILL VVOOUUSS PPLLAAIITT !!  Je suis humain, et donc sujet aux erreurs.
  Si vous trouvez une correction, envoyez-la moi.  Je tenterai de
  rpondre  tout courriel, mais je suis trs occup, donc ne m'en
  veuillez pas si je ne le fais pas.

  _M_o_n _a_d_r_e_s_s_e _c_o_u_r_r_i_e_l _e_s_t _: _m_a_r_k_@_g_r_e_n_n_a_n_._c_o_m_.


  11..22..  AAvveerrttiisssseemmeenntt

  JJEE NNEE SSUUIISS RREESSPPOONNSSAABBLLEE DD''AAUUCCUUNN DDOOMMMMAAGGEE RREESSUULLTTAANNTT DD''AACCTTIIOONNSS FFOONNDDEEEESS SSUURR
  LLEE PPRREESSEENNTT DDOOCCUUMMEENNTT..  Ce document est conu comme une introduction au
  fonctionnement des pare-feux et des serveurs mandataires.  Je ne suis,
  ni ne prtends tre un expert s scurit. ;-) Je suis simplement un
  individu qui a trop lu et qui apprcie les ordinateurs plus que ce
  n'est le cas pour beaucoup.  Considrez que j'cris ceci pour
  familiariser les gens avec ce sujet, et que je ne suis pas prt 
  perdre ma jeunesse dans l'exactitude de ce qui s'y trouve.

  NdT : Pour sa part, le traducteur met les mmes rserves que celles
  de l'auteur.


  11..33..  DDrrooiitt dd''aauutteeuurr

  Sauf mention contraire, les documents Linux HOWTO sont la proprit de
  leurs auteurs respectifs.  Les documents Linux HOWTO peuvent tre
  reproduits et distribus en totalit ou en partie, sur tout support
  physique ou lectronique, tant que cette notice de droit d'auteur est
  prsente sur chaque copie.  La redistribution commerciale est
  autorise et encourage ; nammoins, l'auteur souhaite tre inform de
  toute distribution de ce genre.

  Toute traduction, travail driv, ou agrgat incorporant tout ou
  partie d'un ou plusieurs documents Linux HOWTO doit tre couvert par
  ce mme droit d'auteur.  Ce qui veut dire que vous ne pouvez produire
  un travail driv d'un HOWTO et imposer des restrictions
  supplmentaires concernant sa distribution.  Des exceptions  ces
  rgles peuvent tre dlivres sous certaines conditions ; contactez le
  coordinateur des Linux HOWTO.

  En bref, nous souhaitons promouvoir la dissmination de cette
  information  travers autant de canaux que possible.  Nammoins, nous
  souhaitons conserver un droit d'auteur sur les documents HOWTO, et
  tre aviss de tout plan de distribution les concernant.

  Si vous avez des questions, veuillez me contacter (_c_f_. _s_u_p_r_a).

  NdT : Le traducteur (Bernard Choppy) se met aussi  disposition, soit
  pour rpondre directement, dans la mesure de ses faibles moyens, 
  toute question, soit pour transmettre et traduire, entre l'auteur et
  l'interlocuteur francophone.  Son adresse est : choppy@imaginet.fr


  11..44..  LLeess rraaiissoonnss qquuii mmee ppoouusssseenntt  ccrriirree cceeccii

  Il y a quelques annes, alors que je travaillais pour l'tat de
  l'Oklahoma en tant qu'"administrateur Internet", il me fut demand de
  "mettre l'tat sur Internet", sans m'allouer de budget (note : il
  n'existait pas de titre de ce genre  l'poque. J'tais juste le type
  qui faisait tout le travail).  La meilleure manire de faire en sorte
  que cela puisse arriver tait d'utiliser le plus possible de logiciel
  libre et de matriel de rcupration.  Linux et un tas de vieux 486
  taient tout ce que j'avais pour travailler.

  Les pare-feux du commerce sont hors de prix et la documentation sur
  leur fonctionnement est considre quasiment comme secret-dfense.
  J'ai dcouvert que la cration d'un pare-feu de mon cru tait  peu
  prs impossible.

  Dans mon travail suivant, il m'a t demand de mettre en place un
  pare-feu.  Linux venait d'intgrer le code correspondant.   nouveau
  sans budget, j'ai commenc  monter un pare-feu avec Linux.  Six mois
  plus tard, mon pare-feu tait en place et ce document mis  jour.



  11..55..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn


    The Linux Networking Overview HOWTO ;

    The Ethernet HOWTO ;

    IPchains Firewalling made Easy! ;

    Linux Network Address Translation ;

    The Net-3 HOWTO ;

    The NET-PPP HOWTO ;

    TCP/IP Network Administrator's Guide aux ditions    O'Reilly and
     Associates ;


    The Documentation for the TIS Firewall Toolkit .

  Ces sites web sont des sources d'informations sur le sujet de la
  scurit en gnral.


    _S_e_c_u_r_e _L_i_n_u_x_.

  Il s'agit de mon propre site de scurit sur lequel j'ai rassembl des
  livres blancs, de la documentation et des programmes concourant  la
  scurisation de systmes Unix.

  [ D'autres URL viendront ici ]


  22..  CCoommpprreennddrree lleess ppaarree--ffeeuuxx

  Un pare-feu est une structure destine  empcher un feu de la
  traverser.  Dans un immeuble, il s'agit d'un mur qui divise
  compltement des parties de celui-ci.  Dans une voiture, un pare-feu
  est une pice mtallique qui spare le moteur du compartiment
  passagers.

  Les pare-feux Internet sont conus pour isoler votre rseau local
  priv des flammes de l'Internet, ou de protger la puret des membres
  de votre rseau local en leur interdisant l'accs aux tentations
  dmoniaques de l'Internet. ;-)

  Le premier pare-feu informatique tait une machine Unix sans routage
  avec deux connexions  deux rseaux diffrents.  Une carte rseau
  tait connecte  Internet et l'autre au rseau priv.

  Pour atteindre Internet depuis le rseau priv, il fallait se loger
  sur le pare-feu (Unix).  Ensuite, on utilisait les ressources de ce
  systme pour accder  Internet.  Par exemple, on pouvait utiliser X-
  Window pour lancer le navigateur Netscape sur le pare-feu et en avoir
  l'affichage sur sa station de travail.  Si le navigateur tourne sur le
  pare-feu, il a accs aux deux rseaux.

  Cette sorte de hte  double rseau (un systme  deux connexions
  rseau) est bien si l'on peut faire confiance  TOUS les utilisateurs.
  On peut configurer simplement un systme Linux et y crer un compte
  pour tout utilisateur souhaitant un accs  Internet.  Avec cette
  configuration, le seul ordinateur du rseau priv qui connaisse
  quelque chose du monde extrieur est le pare-feu proprement dit.
  Personne ne peut tlcharger directement sur un poste de travail
  personnelle  il faut d'abord tlcharger un fichier sur le pare-feu,
  puis transfrer celui-ci du pare-feu au poste de travail.

  NOTE IMPORTANTE : 99% des intrusions commencent par l'obtention d'un
  accs utilisateur sur le systme attaqu.  Pour cette raison, je ne
  recommande pas ce type de pare-feu.  De plus, il est aussi extrmement
  limit.



  22..11..  PPoolliittiiqquueess ddee ssccuurriitt

  Il ne faut pas croire qu'un pare-feu soit la panace.  Il faut _t_o_u_t
  _d_'_a_b_o_r_d _d__f_i_n_i_r _u_n_e _p_o_l_i_t_i_q_u_e _d_e _s__c_u_r_i_t_.

  Les pare-feux sont utiliss dans deux buts :


  1. pour maintenir des gens (intrus, vandales...) dehors ;

  2. pour maintenir des gens (employs, enfants...) dedans.

  Lorsque j'ai commenc  travailler sur les pare-feux, j'ai t surpris
  d'apprendre que l'entreprise pour laquelle je travaillais cherchait
  plus  "espionner" ses propres employs qu' maintenir les intrus hors
  de ses rseaux.

  Au moins dans mon tat (l'Oklahoma), les employeurs ont le droit de
  surveiller les appels tlphoniques et l'activit Internet  condition
  d'informer pralablement les employs de cette surveillance (NdT : la
  lgislation franaise est identique de ce point de vue).

  Big Brother n'est pas le gouvernement.  Big Brother est le Big
  Businness.

  Ne me mjugez pas : les gens sont au travail pour travailler, non pour
  jouer.  Et il me semble que l'thique du travail est en train de
  s'roder.  Nanmoins, j'ai aussi observ que certains types de
  directions se trouvent aussi les principaux transgresseurs des rgles
  qu'ils ont eux-mmes dictes.  J'ai vu des vacataires rprimands car
  ils avaient utilis Internet pour chercher le trajet de bus pour venir
  au travail alos que le mme directeur passait des heures au travail 
  chercher de bons restaurants et botes de nuit pour y trouver des
  clients potentiels.

  Mon correctif de ce genre d'abus est de publier les traces du pare-feu
  sur une page web accessible  tout un chacun.

  Le travail dans la scurit peut tre difficile.  Si vous tes
  gestionnaire de pare-feux, surveillez vos arrires.


  22..22..  TTyyppeess ddee ppaarree--ffeeuuxx

  Il y a deux types de pare-feux :


  1. pare-feux IP ou filtrants - ils bloquent tout le trafic sauf celui
     slectionn ;

  2. serveurs mandataires (parfois appels bastions) - ils ralisent les
     connexions rseau pour vous.


  22..22..11..  PPaarree--ffeeuuxx ffiillttrraannttss

  Le filtrage de paquets est le type de pare-feu inclus dans le noyau
  Linux.


  Un pare-feu filtrant fonctionne au niveau du rseau.  Les donnes ne
  sont autorises  quitter le systme que si les rgles du pare-feu le
  permettent.  Lorsque les paquets arrivent, ils sont filtrs en
  fonction de leurs type, origine, destination et port qui sont dcrits
  dans chacun de ceux-ci.

  De nombreux routeurs comportent un certain nombre de services de type
  pare-feu.  Les pare-feux filtrants peuvent tre penss comme des types
  particuliers de routeurs.  Pour cette raison, il faut une profonde
  comprhension de la structure des paquets IP pour travailler avec l'un
  d'eux.

  Puisque trs peu de donnes sont analyses et traces, les pare-feux
  filtrants consomment peu de temps processeur et crent moins de
  latence sur un rseau.

  Les pare-feux filtrants ne fournissent pas de contrle par mot de
  passe.  Un utilisateur ne peut s'identifier en tant que tel.  La seule
  identit connue pour un utilisateur est l'adresse IP de son poste de
  travail.  Cela peut tre un problme lorsqu'on souhaite utiliser DHCP
  (assignation dynamique d'adresses IP).  En effet, les rgles tant
  fondes sur les adresses IP, il faut ajuster celles-ci  chaque fois
  que de nouvelles adresses sont assignes.  Je ne sais pas comment
  automatiser ce processus.

  Les pare-feux filtrants sont plus transparents pour les utilisateurs.
  Ceux-ci n'ont en effet pas  configurer des rgles dans leurs
  applications pour utiliser Internet.  Ce n'est pas vrai avec la
  plupart des serveurs mandataires.


  22..33..  SSeerrvveeuurrss mmaannddaattaaiirreess

  Le meilleur exemple du fonctionnement de ceux-ci est celui d'une
  personne se connectant  un systme puis, depuis celui-ci, au reste du
  monde.  C'est seulement avec un serveur mandataire que ce processus
  est automatique.  Lorsque vous vous connectez  l'extrieur, le
  logiciel client vous connecte en fait d'abord au serveur mandataire.
  Le serveur mandataire se connecte alors au serveur que vous cherchez 
  atteindre (l'extrieur) et vous renvoie les donnes reues.  NdT : en
  franais, on utilise souvent le terme "bastion" pour dsigner un
  serveur mandataire situ entre le rseau local interne et l'extrieur.
  Dans le prsent document, on utilisera plutt le terme bastion pour
  dsigner la machine qui porte le serveur mandataire.

  Puisque les serveurs mandataires grent toutes les communications, ils
  peuvent enregistrer tout ce qu'ils font (donc ce que vous faites).
  Pour les mandataires HTTP (web), cela comprend les URL que vous
  demandez.  Pour les mandataires FTP, cela inclut chaque fichier
  tlcharg.  Ils peuvent mme expurger les mots "inappropris" des
  sites que vous visitez ou analyser la prsence de virus.

  Les serveurs mandataires d'applications peuvent authentifier des
  utilisateurs.  Avant qu'une connexion soit ralise vers l'extrieur,
  le serveur peut demander  l'utilisateur de se connecter
  pralablement.  Pour un utilisateur web, cela fonctionnera comme si
  chaque site requrait une connexion.


  22..33..11..  MMaannddaattaaiirree SSOOCCKKSS

  Un mandataire SOCKS ressemble beaucoup  un vieux central tlphonique
   fiches.  Il interconnecte simplement une machine interne  une autre
  externe.

  De nombreux serveurs SOCKS fonctionnent uniquement avec les connexions
  de type TCP.  De mme, comme les pare-feux filtrants, il ne permettent
  pas l'authentification d'utilisateurs.  En revanche, ils peuvent
  enregistrer la destination de la connexion de chaque utilisateur.


  33..  AArrcchhiitteeccttuurree ddee ppaarree--ffeeuu

  Il existe de nombreuses manires de structurer un rseau pour protger
  des systmes  l'aide d'un pare-feu.

  Si l'on dispose de connexions ddies  Internet par un routeur, on
  peut connecter directement celui-ci au systme pare-feu.  Au
  contraire, on peut passer par un hub pour permettre un accs complet
  aux serveurs  l'extrieur du pare-feu.


  On peut configurer un certain nombre de rgles de filtrage matrielles
  dans le routeur.  Nanmoins, ce routeur peut tre la proprit d'un
  FAI (fournisseur d'accs Internet), auquel cas on ne dispose pas du
  contrle de celui-ci.  Il faut demander au FAI d'y inclure des filtres
  (NdT : et avoir pleine confiance dans son FAI !).


                    _________           __________
     _/\__/\_      | Routeur |         |          |          ___________
    |        |     | sans    |  (DMZ)  | Systeme  |  (LAN)  | Postes de |
   / Internet \----| filtre  |--(HUB)--| pare-feu |--(HUB)--|  travail  |
   \_  _  _  _/    |_________|    |    |__________|         |___________|
     \/ \/ \/                     |
                             (Serveur pour)
                             (l'exterieur)



  On peut aussi utiliser un service commut comme une ligne RNIS.  Dans
  ce cas on peut utiliser une troisime carte rseau pour crer une DMZ
  (De-Militarized Zone, ou "zone dmilitarise") filtre.  Cela donne un
  contrle total sur les services Internet et maintient la sparation
  avec le rseau local normal.


                              __________
                _/\__/\_      |          |          ___________
               |        |     | Systeme  |  (LAN)  | Postes de |
              / Internet \----| pare-feu |--(HUB)--|  travail  |
              \_  _  _  _/    |__________|         |___________|
                \/ \/ \/           |
                                 (DMZ)
                                 (HUB)



  Si l'on ne fournit pas soi-mme des services Internet mais que l'on
  souhaite surveiller o vont les utilisateurs, on voudra utiliser un
  serveur mandataire (bastion).  Cela peut tre intrgr dans le pare-
  feu.


                               __________
                _/\__/\_      | Systeme  |          ___________
               |        |     | pare-feu/|  (LAN)  | Postes de |
              / Internet \----| bastion  |--(HUB)--|  travail  |
              \_  _  _  _/    |__________|         |___________|
                \/ \/ \/



  On peut aussi placer le serveur mandataire sur le rseau local.  Dans
  ce cas, les rgles du pare-feu ne doivent autoriser que le bastion 
  se connecter  Internet pour les services que celui-ci fournit.  Ainsi
  les utilisateurs ne peuvent accder  Internet que par le mandataire.











                              __________
               _/\__/\_      |          |          ___________
              |        |     | Systeme  |  (LAN)  | Postes de |
             / Internet \----| pare-feu |--(HUB)--|  travail  |
             \_  _  _  _/    |__________|    |    |___________|
               \/ \/ \/                      |     ____________
                                             |    |  Serveur   |
                                             +----| mandataire |
                                                  |____________|



  Si l'on souhaite raliser un service comme ceux de Yahoo! ou peut-tre
  SlashDot, on peut souhaiter raliser une architecture redondante de
  routeurs et pare-feux (_c_f_. High Availability HOWTO).

  En utilisant une technique de DNS  jeton tournant ou  l'aide de
  serveurs d'application  quilibrage de charge, on peut crer un
  service  100% de disponibilit.


     _/\__/\_                                      _/\__/\__/\
    |        |                                    |           |
   / FAI No 1 \______                  (WAN)_____/ Partenaires \
   \_  _  _  _/      |                 (HUB)     \_  _  _  _  _/
     \/ \/ \/        |                ___|____     \/ \/ \/ \/
                   __|____           |_______ |
     _/\__/\_     |______ |         |        ||          ______
    |        |   |       ||  (DMZ)  |Systeme ||  (LAN)  |      |
   / FAI No 2 \--|Routeur||--(HUB)--|pare-feu||--(HUB)--|Postes|
   \_  _  _  _/  |_______|     |    |________|     |    |______|
     \/ \/ \/                  |         |         |     ______
                           (Serveur)  (Serveur)    |    |Manda-|
                          (exterieur) (commun)     +----|taire |
                                                        |______|



  Il est facile de voir corrompre son rseau local.  Il faut conserver
  le contrle de chaque connexion.  Il suffit d'un utilisateur avec un
  modem pour compromettre tout un rseau local.


  44..  CCoonnffiigguurreerr llee ppaarree--ffeeuu ffiillttrraanntt LLiinnuuxx

  44..11..  MMaattrriieell nncceessssaaiirree

  Les pare-feux filtrants ne ncessitent pas de matriel haut de gamme.
  Ils ne sont pas grand'chose de plus que de simples routeurs.

  Tout ce qu'il faut est :


  1. un 486-DX66 avec 16 Mo de mmoire vive ;

  2. un disque dur de 200 Mo (500 Mo sont tout de mme recommands) ;

  3. des connexions rseau (cartes Ethernet, ports srie, connexions
     sans fil ?) ;

  4. un moniteur et un clavier.

  Avec certains systmes, on peut mme liminer le moniteur et le
  clavier en utilisant une console sur port srie.


  Si l'on a besoin d'un serveur mandataire qui doive grer un fort
  trafic, il faut prendre le systme le plus puissant qui soit possible.
  En effet, pour chaque utilisateur qui se connectera par le bastion, il
  se crera un nouveau processus.  Si l'on a 50 utilisateurs simultans
  ou plus, je pense qu'il faut :


  1. un Pentium II avec 64 Mo de mmoire vive ;

  2. un disque dur de 2 Go pour contenir toutes les traces ;

  3. deux connexions rseau  ;

  4. un moniteur et un clavier.

  Les connexions rseau peuvent tre de n'importe quel type (cartes NIC,
  RNIS ou mme des modems).


  44..22..  LLooggiicciieell nncceessssaaiirree

  44..22..11..  PPaarree--ffeeuu ffiillttrraanntt

  Pour crer un pare-feu filtrant, aucun logiciel spcifique n'est
  ncessaire.  Linux suffit.

  Si l'on utilise un _TRES_ vieux noyau Linux (1.0.x ou plus ancien), il
  faut une copie de ipfwadm (NdT : il faut surtout passer  un noyau
  plus rcent, car ces noyaux sont obsoltes, et risquent de plus de
  contenir des points faibles dont il sera difficile de retrouver
  trace).

  Si l'on utilise un noyau 2.1.102 ou plus rcent, il faut utiliser un
  ipchaining comme par exemple celui dvelopp par
  http://www.rustcorp.com/linux/ipchains/.


  44..22..22..  SSeerrvveeuurr mmaannddaattaaiirree


  Si l'on veut configurer un serveur mandataire, il faut l'un des
  paquetages suivants :


    Squid ;

    la bote  outils TIS Firewall (FWTK) ;

    SOCKS.


  Squid est un beau paquetage et fonctionne avec la fonctionnalit de
  Linux de mandataire transparent.  Je vais dcrire comment configurer
  ce serveur.

   l'heure o j'cris ces lignes, Network Associates et Trusted
  Information System's (TIS) ont fusionn.  Il faut donc continuer 
  consulter leurs sites web pour toute information sur les
  modifications.  Dans l'intervalle, la bote  outils TIS est toujours
  disponible sur : http://www.tis.com/research/software/.

  Trusted Information System fournit une collection de programmes conue
  pour faciliter la gestion de pare-feux.  Avec cette bote  outils, on
  configure un daemon pour chaque service (web, telnet, etc.) qui sera
  utilis.

  55..  PPrrppaarreerr llee ssyyssttmmee LLiinnuuxx

  55..11..  CCoommppiilleerr llee nnooyyaauu

  Commencez avec une installation minimale propre de votre distribution
  Linux.  Moins vous installez de logiciels, moins votre systme aura de
  trous de scurit, portes drobes et/ou bogues susceptibles d'induire
  des problmes de scurit dans votre systme.

  Prenez un noyau stable.  J'utilise le noyau Linux 2.2.9 ou plus pour
  mon systme.  La documentation est donc fonde sur ces paramtres.

  Vous devez recompiler le noyau Linux avec les options appropries.  Si
  vous n'avez jamais recompil de noyau, je vous renvoie au Kernel
  HOWTO,  l'Ethernet HOWTO et au NET-3 HOWTO.

  Voici les paramtres rseau que je sais correspondre  quelque chose
  qui fonctionne.  J'en ai signal quelques-uns avec un "?".  Si l'on
  souhaite utiliser cette fonctionnalit, il faut aussi l'activer.

  J'utilise "make menuconfig" pour diter ma configuration de noyau.


      <*> Packet socket
      [ ] Kernel/User netlink socket
      [*] Network firewalls
      [ ] Socket Filtering
      <*> Unix domain sockets
      [*] TCP/IP networking
      [ ] IP: multicasting
      [*] IP: advanced router
      [ ] IP: kernel level autoconfiguration
      [*] IP: firewalling
      [?] IP: always defragment (required for masquerading)
      [?] IP: transparent proxy support
      [?] IP: masquerading
      --- Protocol-specific masquerading support will be built as modules.
      [?] IP: ICMP masquerading
      --- Protocol-specific masquerading support will be built as modules.
      [ ] IP: masquerading special modules support
      [*] IP: optimize as router not host
      < > IP: tunneling
      < > IP: GRE tunnels over IP
      [?] IP: aliasing support
      [*] IP: TCP syncookie support (not enabled per default)
      --- (it is safe to leave these untouched)
      < > IP: Reverse ARP
      [*] IP: Allow large windows (not recommended if <16Mb of memory)
      < > The IPv6 protocol (EXPERIMENTAL)
      ---
      < > The IPX protocol
      < > Appletalk DDP
      < > CCITT X.25 Packet Layer (EXPERIMENTAL)
      < > LAPB Data Link Driver (EXPERIMENTAL)
      [ ] Bridging (EXPERIMENTAL)
      [ ] 802.2 LLC (EXPERIMENTAL)
      < > Acorn Econet/AUN protocols (EXPERIMENTAL)
      < > WAN router
      [ ] Fast switching (read help!)
      [ ] Forwarding between high speed interfaces
      [ ] PU is too slow to handle full bandwidth
      QoS and/or fair queueing  --->




  Aprs avoir ralis toute la configuration qu'il vous faut vous devez
  recompiler, rinstaller le noyau et rebouter.

  J'utilise la commande :


  make dep;make clean;make bzlilo;make modules;make modules_install;init 6



  pour accomplir tout cela en une tape.


  55..22..  CCoonnffiigguurreerr ddeeuuxx ccaarrtteess rrsseeaauu

  Si vous avez deux cartes rseau dans votre ordinateur, vous devrez
  trs certainement ajouter un paramtre "append" dans votre fichier
  /etc/lilo.conf pour dcrire les IRQ et adresses des deux cartes.  Le
  mien se prsente ainsi :


  append="ether=12,0x300,eth0 ether=15,0x340,eth1"




  55..33..  CCoonnffiigguurreerr lleess aaddrreesssseess rrsseeaauu

  Nous arrivons  la partie amusante de notre configuration.  Je ne vais
  pas entrer trs profondment dans les dtails de mise en place d'un
  rseau local.  Pour rsoudre vos problmes  ce niveau, vous pouvez
  vous reporter au Networking-HOWTO.

  Votre but est de fournir deux connexions rseau  votre systme pare-
  feu filtrant : l'une est Internet (ct dangereux) et l'autre est le
  rseau local (ct scuris).

  Dans tous les cas, vous devez prendre quelques dcisions :


  1. utiliserez-vous des adresses IP relles ou non pour votre rseau
     local ?

  2. votre FAI vous assigne-t'il une adresse IP ou utilisez-vous des
     adresses IP statiques ?

  Puisque nous ne souhaitons pas laisser InterNet accder au rseau
  priv, il n'est pas ncessaire d'utiliser des adresses "relles".  On
  peut toujours choisir des adresse arbitraires pour un reau priv,
  mais ce n'est pas recommand : au cas o des donnes seraient routes
  en-dehors de celui-ci, elles pourraient arriver sur un autre systme.

  Un certain nombre de plages d'adresses Internet ont t laisses de
  ct pour les rseaux privs.  Parmi celles-ci, nous utiliserons
  celles de 192.168.2.xxx pour nos exemples.

  Il vous faudra utiliser le masquage IP (IP masquerading) pour
  permettre  cela de fonctionner.  Dans ce mode de fonctionnement, le
  pare-feu transmet les paquets en les traduisant en adresses IP
  "relles" pour leur permettre de voyager sur Internet.

  L'utilisation de ces adresses IP non routables rend le rseau priv
  plus sr, car les routeurs Internet ne transmettront pas les paquets
  porteurs de ces adresses.


  Il peut tre judicieux maintenant de lire le IP Masquerading HOWTO.


              199.1.2.10   __________    192.168.2.1
        _  __  _        \ |          | /           ___________
       | \/  \/ |        \| Systeme  |/           | Postes de |
      / InterNet \--------| pare-feu |------------|  travail  |
      \_/\_/\_/\_/        |__________|            |___________|



  Vous devez assigner l'adresse IP "relle"  la carte rseau du ct
  Internet.  Cette adresse peut vous tre assigne de manire permanente
  (comme adresse IP statique) ou  chaque connexion par le processus
  PPP.

  Vous assignez vos numros IP internes, comme 192.168.2.1 pour la carte
  Ethernet du reau local.  Il s'agira de votre adresse de passerelle.
  Vous pouvez assigner une adresse de la plage 192.168.2.xxx  toutes
  les autres machines du rseau protg (soit 192.168.2.2 
  192.168.2.254).

  J'utilise Linux RedHat.  Pour configurer le rseau lors du dmarrage,
  j'ai ajout un fichier "ifcfg-eth1" dans le rpertoire
  /etc/sysconfig/network-scripts.  On peut aussi trouver des fichiers
  ifcfg-ppp0 ou ifcfg-tr0 dans ce rpertoire.  Ces fichiers "ifcfg-"
  sont utiliss par RedHat pour configurer et activer les priphriques
  rseau lors du dmarrage.  Leur nom est fonction du type de connexion.

  Voici l'allure du fichier ifcfg-eth1 (deuxime carte Ethernet) de
  notre exemple :


          DEVICE=eth1
          IPADDR=192.168.2.1
          NETMASK=255.255.255.0
          NETWORK=192.168.2.0
          BROADCAST=192.168.2.255
          GATEWAY=199.1.2.10
          ONBOOT=yes



  Si vous utilisez une connexion commute, vous devrez consulter les
  fichiers ifcfg-ppp0 et chat-ppp0 qui contrlent votre connexion PPP.

  Ce fichier ifcfg peut avoir l'allure suivante :



















      DEVICE="ppp0"
      ONBOOT="yes"
      USERCTL="no"
      MODEMPORT="dev/modem"
      LINESPEED="115200"
      PERSIST="yes"
      DEFABORT="yes"
      DEBUG="yes"
      INITSTRING="ATZ"
      DEFROUTE="yes"
      HARDFLOWCTL="yes"
      ESCAPECHARS="no"
      PPPOPTIONS=""
      PAPNAME="LoginID"
      REMIP=""
      NETMASK=""
      IPADDR=""
      MRU=""
      MTU=""
      DISCONNECTTIMEOUT=""
      RETRYTIMEOUT="5"
      BOOTPROTO="none"




  55..44..  TTeesstteerr vvoottrree rrsseeaauu

  Commencer en utilisant les commandes ifconfig et route.  Si vous avez
  deux cartes rseau, votre ifconfig doit ressembler  :


          #ifconfig
          lo      Link encap:Local Loopback
                  inet addr:127.0.0.0  Bcast:127.255.255.255  Mask:255.0.0.0
                  UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
                  RX packets:1620 errors:0 dropped:0 overruns:0
                  TX packets:1620 errors:0 dropped:0 overruns:0

          eth0    Link encap:10Mbps Ethernet  HWaddr 00:00:09:85:AC:55
                  inet addr:199.1.2.10 Bcast:199.1.2.255  Mask:255.255.255.0
                  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                  RX packets:0 errors:0 dropped:0 overruns:0
                  TX packets:0 errors:0 dropped:0 overruns:0
                  Interrupt:12 Base address:0x310

          eth1    Link encap:10Mbps Ethernet  HWaddr 00:00:09:80:1E:D7
                  inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
                  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                  RX packets:0 errors:0 dropped:0 overruns:0
                  TX packets:0 errors:0 dropped:0 overruns:0
                  Interrupt:15 Base address:0x350



  et votre table de routage :


          #route -n
          Kernel routing table
          Destination  Gateway      Genmask        Flags MSS   Window Use Iface
          199.1.2.0    *            255.255.255.0  U     1500  0       15 eth0
          192.168.2.0  *            255.255.255.0  U     1500  0        0 eth1
          127.0.0.0    *            255.0.0.0      U     3584  0        2 lo
          default      199.1.2.10   *              UG    1500  0       72 eth0

  Note : 199.1.2.0 est l'adresse du ct Internet du pare-feu et
  192.168.2.0 celle du ct priv (rseau local).

  Vous devez commencer par vous assurer que chaque ordinateur de votre
  rseau local puisse atteindre l'adresse de votre pare-feu (192.168.2.2
  dans cet exemple) par ping.  Dans le cas contraire, replongez-vous
  dans le NET-3 HOWTO et retravaillez un peu votre rseau.

  Ensuite, essayez d'atteindre un systme Internet depuis le pare-feu.
  J'utilise personnellement l'adresse www.internic.net pour mes tests.
  Si cela ne fonctionne pas, essayez un serveur de votre FAI.  Si cela
  ne fonctionne toujours pas, il y a un problme quelque part dans la
  configuration de votre connexion Internet.  Vous devriez pouvoir
  atteindre n'importe quel point d'Internet depuis votre pare-feu.
  Essayez de vrifier la configuration de votre passerelle par dfaut.
  Si vous utilisez une connexion commute, recontrlez votre nom
  d'utilisateur et votre mot de passe.  Replongez--vous dans le NET-3
  HOWTO et essayez encore.

  Maintenant, essayez d'atteindre l'adresse extrieure du pare-feu
  (199.1.2.10 dans notre exemple) depuis une machine du rseau local.
  Cela ne doit pas fonctionner.  Dans le cas contraire, le masquage IP
  ou la transmission IP sont activs ou vous avez dj une sorte de
  filtrage de paquet positionne.  Dsactivez-les et ressayez.  Vous
  devez savoir si le filtrage est en place.

  Pour les noyaux postrieurs au 2.1.102, vous pouvez utiliser la
  commande :


      echo "0" > /proc/sys/net/ipv4/ip_forward



  Si, en revanche, vous utilisez un noyau plus ancien (pourquoi ?), vous
  devrez recompiler celui-ci en dsactivant la transmission IP (IP
  forwarding, mais mettez plutt votre noyau  jour).

  Essayez  nouveau d'atteindre l'adresse extrieure du pare-feu
  (199.1.2.10 dans notre exemple) depuis une machine du rseau local.
  Cela ne doit pas fonctionner.

  Maintenant, activez la transmission IP et/ou le masquage IP.  Vous
  devez tre  mme d'atteindre n'importe quel point d'Internet depuis
  n'importe quelle machine de votre rseau local.


      echo "0" > /proc/sys/net/ipv4/ip_forward



  Note importante : Si vous utilisez des adresses IP "relles" sur votre
  rseau local (et non 192.168.xxx.yyy) et que vous ne puissisez
  atteindre Internet, mais que vous puissiez atteindre le ct extrieur
  de votre pare-feu, vrifiez que votre FAI route correctement les
  paquets depuis l'adresse de votre rseau priv.

  Un test de ce problme est de connatre quelqu'un d'autre sur Internet
  (un ami utilisant un fournisseur local, par exemple) et de lui
  demander d'effectuer un traceroute vers votre rseau.  Si la trace
  s'arrte sur le routeur de votre fournisseur, c'est qu'il ne transmet
  pas votre trafic.

  a fonctionne ? Bien.  La partie la plus difficile est faite. :-)


  55..55..  SSccuurriisseerr llee ppaarree--ffeeuu

  Le pare-feu n'est d'aucune utilit s'il reste largement ouvert aux
  attaques.  Un "mchant" pourrait obtenir l'accs au pare-feu et le
  modifier pour ses desseins personnels.  Vous devez dsactiver tous les
  services inutiliss.


  Regardez dans votre fichier /etc/inetd.conf.  Ce fichier contrle
  inetd qu'on appelle aussi "super-serveur".  Il contrle un tas de
  daemons serveurs et les excute  la demande,  partir des paquets qui
  arrivent sur un port "bien connu" (well known port).

  Vous devez dsactiver echo, discard, daytime, chargen, ftp, gopher,
  shell, login, exec, talk, ntalk, pop-2, pop-3, netstat, systat, tftp,
  bootp,  finger, cfinger, time, swat ainsi que linuxconfig si vous en
  possdez un.

  Pour dsactiver un service, placez simplement un "#" (dize) devant.
  Ensuite, envoyez un signal SIG-HUP au processus inetd, selon la
  syntaxe suivante :


  kill -HUP <pid>



  o "pid" est le numro du processus inetd.  Cela force inetd  relire
  son fichier de configuration (inetd.conf) et  se relancer sans
  arrter votre systme.

  Testez le rsultat par telnet sur le port 15 (netstat) du pare-feu.
  Si vous obtenez une rponse de netstat, c'est que vous n'avez pas
  arrt ces services correctement.


  telnet localhost 15



  Vous pouvez aussi crer le fichier /etc/nologin.  Placez-y quelques
  mots (comme "CONNEXION STOPPEE").  Lorsque ce fichier existe, login
  n'autorise pas de connexion d'utilisateur.  Ceux-ci verront simplement
  le contenu de ce fichier et leur connexion sera refuse.  Seul root
  peut alors se loger.

  Vous pouvez encore diter le fichier /etc/securetty.  Si l'utilisateur
  est root, la connexion doit s'effectuer depuis l'un des priphriques
  indiqus dans /etc/securetty.  Les checs seront tracs par la
  facilit syslog.  Avec ces deux contrles actifs, la seule manire de
  se connecter sur le pare-feu est de se prsenter comme root sur la
  console.


  66..  CCoonnffiigguurraattiioonn dduu ffiillttrraaggee IIPP ((IIPPFFWWAADDMM))

  Si vous utilisez un noyau 2.1.102 ou suprieur, passez directement 
  la section suivante sur IPCHAINS.

  Dans les anciens noyaux, la transmission IP est active par dfaut.
  Pour cette raison, votre rseau doit commencer par refuser l'accs 
  tout et vider toutes les rgles de transmission (ipfw) en place depuis
  le dernier lancement.  Le fragment de script suivant doit se trouver
  dans votre script de lancement rseau (en gnral,
  /etc/rc.d/init.d/network) :

          #
          # configuration de la transmission IP et
          # de la trace
          #
          #   Transmission
          #
          # Par defaut INTERDIRE tous les services
          ipfwadm -F -p deny
          # Vider toutes les regles de trace
          ipfwadm -F -f
          ipfwadm -I -f
          ipfwadm -O -f



  Maintenant, nous avons un pare-feu absolu.  Rien ne peut passer au
  travers.

  Maintenant, on peut crer le fichier /etc/rc.d/rc.firewall.  Ce script
  doit autoriser le passage des trafics courrier, web et DNS. ;-)














































  #!/bin/sh
  #
  # rc.firewall
  #
  # Lancement de la bibliotheque de fonctions
  . /etc/rc.d/init.d/functions

  # Lecture de la configuration
  . /etc/sysconfig/network

  # On controle que le reseau soit actif
  if [ $NETWORKING = "no" ]
  then
          exit 0
  fi
  case "$1" in
    start)
    echo -n "Lancement des services du pare-feu : "
    # Autorise le courriel a arriver au serveur
    /sbin/ipfwadm -F -a accept -b -P tcp -S 0.0.0.0/0 1024:65535 -D 192.1.2.10 25
    # Autorise les connexions aux serveurs courriel externes
    /sbin/ipfwadm -F -a accept -b -P tcp -S 192.1.2.10 25 -D 0.0.0.0/0 1024:65535
    # Autorise les connexions a notre serveur web
    /sbin/ipfwadm -F -a accept -b -P tcp -S 0.0.0.0/0 1024:65535 -D 192.1.2.11 80
    # Autorise les connexions aux serveurs web externes
    /sbin/ipfwadm -F -a accept -b -P tcp -S 192.1.2.* 80 -D 0.0.0.0/0 1024:65535
    # Autorise le trafic DNS
    /sbin/ipfwadm -F -a accept -b -P udp -S 0.0.0.0/0 53 -D 192.1.2.0/24
    ;;
    stop)
    echo -n "Arret des services du pare-feu : "
    ipfwadm -F -p deny
    ;;
    status)
    echo -n "Montrez-vous les statistiques du pare-feu ?"
    ;;
    restart|reload)
          $0 stop
          $0 start
          ;;
    *)
          echo "Usage: firewall {start|stop|status|restart|reload}"
          exit 1
  esac




  Note : Dans cet exemple, nous avons un serveur courriel (SMTP) qui
  tourne sur 192.1.2.10 qui doit tre capable d'envoyer et recevoir des
  paquets sur le port 25.  Le serveur web tourne sur 192.1.2.11.  Nous
  autorisons quiconque sur le rseau local  accder aux serveurs web
  externes ainsi qu'aux serveurs DNS.

  Cet exemple n'est pas parfaitement scuris.  Puisque le port 80 n'est
  pas obligatoirement utilis comme port web, un intrus rus pourrait
  utiliser celui-ci pour crer un rseau priv virtuel (VPN : virtual
  private network) au-travers du pare-feu.  Pour contourner cela, il
  faut configurer un mandataire web, et n'autoriser que celui-ci 
  traverser le pare-feu.  Les utilisateurs du rseau local devront alors
  passer par le mandataire pour atteindre les serveurs web extrieurs.

  On peut aussi s'intresser  la surveillance du trafic qui passe au-
  travers du pare-feu.  Le script qui suit compte chaque paquet.  On
  peut ajouter une ou deux lignes pour compter les paquets qui vont vers
  un systme particulier.
    # Flush the current accounting rules
    ipfwadm -A -f
    # Accounting
    /sbin/ipfwadm -A -f
    /sbin/ipfwadm -A out -i -S 192.1.2.0/24 -D 0.0.0.0/0
    /sbin/ipfwadm -A out -i -S 0.0.0.0/0 -D 192.1.2.0/24
    /sbin/ipfwadm -A in -i -S 192.1.2.0/24 -D 0.0.0.0/0
    /sbin/ipfwadm -A in -i -S 0.0.0.0/0 -D 192.1.2.0/24



  Si tout ce que vous cherchez est un pare-feu filtrant, vous pouvez
  vous arrter ici.  Testez-le et amusez-vous bien :-)


  77..  CCoonnffiigguurraattiioonn dduu ffiillttrraaggee IIPP ((IIPPcchhaaiinnss))

  Les ipchains Linux sont une rcriture du code pare-feu IPv4 de Linux
  (en grande partie inspir de BSD) ainsi que de ipfwadm qui tait lui-
  mme une rcriture du ipfw de BSD, je crois.  Il est indispensable
  d'administrer les filtres de paquets IP dans les noyaux Linux versions
  2.1.102 et au-del.

  L'ancien code ne gre pas les fragments, a des compteurs sur 32 bits
  (sur Intel en tout cas), ne permet aucune autre spcification de
  protocole que TCP, UDP ou ICMP, ne peut raliser de vastes
  modifications de manire atomique, ne peut spcifier de rgles
  inverses, a quelques dfauts et peut se rvler dur  administrer (ce
  qui le rend vulnrable aux erreurs d'utilisation).  Ou du moins c'est
  ce qu'en dit l'auteur.

  Je ne vais pas entrer en dtail sur la manire de contrler un pare-
  feu IPchains, car il existe un _BON !!_ HOWTO qui en parle sur
  http://www.rustcorp.com/linux/ipchains/HOWTO.html.  Je finirais juste
  par le recopier ici.  En voici les bases.

  On travaille avec les chanes par noms.  Il existe au dbut trois
  chanes prdfinies input, output et forward, qu'il est impossible de
  supprimer.  On peut crer des chanes personnelles.  Des rgles
  peuvent ensuite tre ajoutes et supprimes de ces ensembles de
  rgles.

  Les oprations ncessaires pour travailler sur les chanes sont les
  suivantes :


  1. cration d'une nouvelle chane (-N) ;

  2. suppression d'une chane vide (-X) ;

  3. modification de la spcification pour une chane prdfinie (-P)

  4. liste des rgles d'une chane (-F) ;

  5. remise  zro des compteurs de paquets et d'octets de toutes les
     rgles d'une chane (-Z).

  Il existe diffrentes mthodes pour manipuler les rgles  l'intrieur
  des chanes :


  1. ajout d'une nouvelle rgle dans une chane (-A) ;

  2. insertion d'une nouvelle rgle  une position donne d'une chane
     (-I) ;

  3. remplacement d'une rgle  une position donne d'une chane (-R) ;

  4. suppression d'une rgle  une position donne d'une chane (-D) ;

  5. suppression de la premire rgle correspondante dans une chane
     (-D).

  Il existe quelques oprations pour le masquage qui se trouvent dans
  ipchains dans l'attente d'un bon emplacement pour les placer :


  1. liste des connexions actuellement masques (-M -L) ;

  2. positionnement du temps d'expiration du masquage (-M -S).

  Il y a quelques dtails de chronologie qui interviennent dans la
  modification des rgles de pare-feu.  Si l'on n'est pas suffisamment
  prudent, il est possible de laisser passer quelques paquets pendant la
  mise en place des modifications.  Une approche simpliste est la
  suivante :


       # ipchains -I input 1 -j DENY
       # ipchains -I output 1 -j DENY
       # ipchains -I forward 1 -j DENY



  ... ralisation des modification ...


       # ipchains -D input 1
       # ipchains -D output 1
       # ipchains -D forward 1
       #



  Cela interdit tout passage de paquet durant les modifications.

  Voici une copie des rgles de pare-feu qui prcdent dans IPChains :

























  #!/bin/sh
  #
  # rc.firewall
  #
  ## Tout vider et repartir du debut
    /sbin/ipchains -F input
    /sbin/ipchains -F output
    /sbin/ipchains -F forward

  ## Redirection pour le mandatement transparent de HTTP
    #$IPCHAINS  -A input -p tcp -s 192.1.2.0/24 -d 0/0 80 -j REDIRECT 8080

  ## Creation de nos propres chaines
    /sbin/ipchains -N ma-chaine
    # On autorise le courriel entrant vers le serveur
    /sbin/ipchains -A ma-chaine -s 0.0.0.0/0 smtp -d 192.1.2.10 1024:-j ACCEPT
    # On autorise les connexions courriel vers l'extrieur
    /sbin/ipchains -A ma-chaine -s 192.1.2.10 -d 0.0.0.0/0 smtp -j ACCEPT
    # On autorise les connexions web entrantes vers le serveur
    /sbin/ipchains -A ma-chaine -s 0.0.0.0/0 www -d 192.1.2.11 1024: -j ACCEPT
    # On autorise les connexions web vers l'extrieur
    /sbin/ipchains -A ma-chaine -s 192.1.2.0/24 1024: -d 0.0.0.0/0 www -j ACCEPT
    # On autorise le trafic DNS
    /sbin/ipchains -A ma-chaine -p UDP -s 0.0.0.0/0 dns -d 192.1.2.0/24 -j ACCEPT

  ## Si on utilise le masquage
    # On ne masque pas le trafic interne
    /sbin/ipchains -A forward -s 192.1.2.0/24 -d 192.1.2.0/24 -j ACCEPT
    # On ne masque pas l'interface externe directe
    /sbin/ipchains -A forward -s 199.1.2.0/24 -d 0/0 -j ACCEPT
    # On masque tout paquet interne qui sort
    /sbin/ipchains -A forward -s 192.1.2.0/24 -d 0/0 -j MASQ

  ## On interdit tout le reste
    /sbin/ipchains -P my-chains input DENY



  Il ne faut pas s'arrter l.  Ce n'est pas un pare-feu trs puissant
  et je suis sr qu'il y a d'autres services que vous souhaiteriez
  fournir.   nouveau, lisez le IPCHAINS-HOWTO.


  88..  RReennddrree llee ttoouutt pplluuss ssiimmppllee

  Il existe des interfaces graphiques ou fondes sur le web dveloppes
  pour fonctionner avec les rgles de filtrage Linux.  Un certain nombre
  d'entreprises ont mme cr des pare-feux commerciaux fonds sur Linux
  en le plaant dans leur propre machine avec leur propre code de
  management (joli).

  gfcc (GTK+ Firewall Control Center) est une application GTK+ capable
  de contrler les principes et rgles de filtrage de Linux, fonde sur
  le paquetage ipchains.  Rendez-vous sur
  http://megaman.ypsilonia.net/kfirewall/.

  FCT est un outil HTML de configuration de pare-feu.  Il permet la
  gnration automatique de scripts de commandes de filtrage IP
  (ipfwadm) sur un pare-feu pour des interfaces multiples et tout
  service internet http://www.fen.baynet.de/~ft114/FCT/firewall.htm


  99..  IInnssttaalllleerr uunn mmaannddaattaaiirree SSqquuiidd ttrraannssppaarreenntt

  Le mandataire squid est disponible sur http://squid.nlanr.net/.

  Les dveloppeurs de squid fournissent des paquetages aux formats
  RedHat et Debian.  Si vous le pouvez, il vaut mieux utiliser l'un
  d'entre eux.


  1100..  IInnssttaalllleerr llee sseerrvveeuurr mmaannddaattaaiirree TTIISS

  1100..11..  TTrroouuvveerr llee llooggiicciieell

  Le TIS fwtk est disponible  http://www.tis.com/research/software/.

  NNee ccoommmmeetttteezz ppaass ll''eerrrreeuurr qquuee jj''aaii ccoommmmiissee :: lorsque vous tlchargez
  les fichiers de TIS, LISEZ LES README.  Le TIS fwtk est verrouill
  dans un rpertoire cach sur leur serveur.

  TIS impose que vous lisiez leur accord 

  http://www.tis.com/research/software/fwtk_readme.html, puis que vous
  eennvvooyyiieezz uunn ccoouurrrriieell  ffwwttkk--rreeqquueesstt@@ttiissllaabbss..ccoomm avec le seul mot
  aacccceepptteedd dans le corps du message pour connatre le nom de ce
  rpertoire cach.  Aucun sujet n'est ncessaire pour ce message.  Leur
  systme vous enverra en retour le nom du rpertoire par courriel
  (valaple 12 heures) pour charger le source.

  A l'instant o j'cris, la version  jour du FWTK est 2.1.


  1100..22..  CCoommppiillaattiioonn dduu FFWWTTKK TTIISS

  La version 2.1 du FWTK se compile beaucoup plus facilement que les
  prcdentes.

  EXPLIQUER ICI !!!

  Maintenant, lancez mmaakkee.


  1100..33..  IInnssttaallllaattiioonn dduu FFWWTTKK TTIISS

  Lancez mmaakkee iinnssttaallll.

  Le rpertoire d'installation par dfaut est /usr/local/etc.  Il est
  possible de changer cela (ce que je n'ai pas fait) vers un rpertoire
  plus sr.  J'ai choisi de changer l'accs  ce rpertoire pour le mode
  "0700".

  Tout ce qu'il reste  faire maintenant est de configurer le pare-feu.


  1100..44..  CCoonnffiigguurraattiioonn dduu FFWWTTKK TTIISS

  Maintenant, le plaisir commence vraiment.  Nous devons enseigner au
  systme  appeler ces nouveaux services et crer les tables pour les
  contrler.

  Je ne suis pas en train de r-crire le manuel de TIS fwtk ici.  Je
  vais montrer les paramtres que j'ai fait fonctionner et expliquer les
  problmes que j'ai rencontrs et comment je les ai contourns.

  Trois fichiers dfinissent ces contrles :




    /etc/services : indique au systme sur quel port se trouve un
     service ;
    /etc/inetd.conf : indique  inetd le programme  lancer lorsque
     quelqu'un appelle un port de service ;

    /usr/local/etc/netperm-table : indique aux services fwtk  qui
     autoriser ou interdire l'accs au service.

  Pour faire fonctionner fwtk, vous devez diter ces fichiers de bas en
  haut.  Editer le fichier des services sans que les fichiers inetd.conf
  ou netperm-table soient corrects peut rendre votre systme
  inaccessible.


  1100..44..11..  LLee ffiicchhiieerr nneettppeerrmm--ttaabbllee

  Ce fichier contrle qui a accs aux services de TIS FWTK.  Vous devez
  penser au trafic qui passe par le pare-feu depuis les deux cts.  Les
  gens de l'extrieur de votre rseau doivent s'identifier avant
  d'obtenir l'accs, mais ceux de l'intrieur doivent tre autoriss
  simplement  passer au-travers.

  Afin que les gens puissent s'identifier, le pare-feu utilise un
  programme appel aauutthhssrrvv pour maintenir une base des noms et mots de
  passe.  La section authentification de netperm-table contrle
  l'emplacement et l'accs  la base.

  J'ai eu quelques difficults  fermer l'accs  ce service.  Notez que
  la ligne permit-hosts que je montre utilise un "*" pour donner l'accs
   tout le monde.  Le paramtrage correct de cette ligne est : authsrv:
  permit-hosts localhost, si vous arrivez  la faire fonctionner.


          #
          # Table de configuration du mandataire
          #
          # Regles d'authentification client et serveur
          authsrv:        database /usr/local/etc/fw-authdb
          authsrv:        permit-hosts *
          authsrv:        badsleep 1200
          authsrv:        nobogus true
          # Applications client utilisant le serveur d'authentification
          *:              authserver 127.0.0.1 114



  Pour initialiser la base, passez root et lancez ..//aauutthhssrrvv dans le
  rpertoire /var/local/etc pour crer l'enregistrement de l'utilisateur
  d'administration.

  La documentation de FWTK indique la manire d'ajouter des utilisateurs
  et des groupes.

  Voici un exemple de session :














          #
          # authsrv
          authsrv# list
          authsrv# adduser admin "Auth DB admin"
          ok - user added initially disabled
          authsrv# ena admin
          enabled
          authsrv# proto admin pass
          changed
          authsrv# pass admin "plugh"
          Password changed.
          authsrv# superwiz admin
          set wizard
          authsrv# list
          Report for users in database
          user   group  longname           ok?    proto   last
          ------ ------ ------------------ -----  ------  -----
          admin         Auth DB admin      ena    passw   never
          authsrv# display admin
          Report for user admin (Auth DB admin)
          Authentication protocol: password
          Flags: WIZARD
          authsrv# ^D
          EOT
          #



  Les contrles de la passerelle telnet (tn-gw) vont de soi et sont la
  premire chose que vous deviez configurer.

  Dans mon exemple, j'autorise une machine du rseau priv  passer sans
  s'authentifier (permit-hosts 19961.2.* -passok).  En revanche, tout
  autre utilisateur doit entrer ses nom et mot de passe pour utiliser le
  mandataire (permit-hosts * -auth).

  J'autorise aussi un autre systme (192.1.2.202)  accder au pare-feu
  directement sans passer du tout par celui-ci.  Les deux lignes
  inetacl-in.telnetd font cela.  J'expliquerai plus loin comment ces
  lignes sont utilises.

  Le timeout de telnet doit rester court :


          # regles de passerelle telnet :
          tn-gw:          denial-msg      /usr/local/etc/tn-deny.txt
          tn-gw:          welcome-msg     /usr/local/etc/tn-welcome.txt
          tn-gw:          help-msg        /usr/local/etc/tn-help.txt
          tn-gw:          timeout 90
          tn-gw:          permit-hosts 192.1.2.* -passok -xok
          tn-gw:          permit-hosts * -auth
          # Seul l'administrateur peut telneter directement le pare-feu
          # sur le port 24
          netacl-in.telnetd: permit-hosts 192.1.2.202 -exec /usr/sbin/in.telnetd



  Les commandes "r-" fonctionnent de la mme manire que telnet :








          # regles de passerelle rlogin :
          rlogin-gw:      denial-msg      /usr/local/etc/rlogin-deny.txt
          rlogin-gw:      welcome-msg     /usr/local/etc/rlogin-welcome.txt
          rlogin-gw:      help-msg        /usr/local/etc/rlogin-help.txt
          rlogin-gw:      timeout 90
          rlogin-gw:      permit-hosts 192.1.2.* -passok -xok
          rlogin-gw:      permit-hosts * -auth -xok
          # Seul l'administrateur peut telneter directement le pare-feu
          # sur le port
          netacl-rlogind: permit-hosts 192.1.2.202 -exec /usr/libexec/rlogind -a



  Personne ne devrait avoir accs directement au pare-feu, et cela
  inclut FTP, donc ne placez pas de serveur FTP sur votre pare-feu.

   nouveau, la ligne permit-hosts autorise quiconque depuis le rseau
  protg  accder librement  InterNet et tous les autres utilisateurs
  doivent s'authentifier.  J'ai ajout la trace de chaque fichier envoy
  et reu dans mes contrles (-log { retr stor }).

  Le timeout FTP contrle le temps mis  fermer une mauvaise connexion,
  ainsi que le temps d'inactivit maximal d'une session ouverte :


          # regles de passerelle ftp :
          ftp-gw:         denial-msg      /usr/local/etc/ftp-deny.txt
          ftp-gw:         welcome-msg     /usr/local/etc/ftp-welcome.txt
          ftp-gw:         help-msg        /usr/local/etc/ftp-help.txt
          ftp-gw:         timeout 300
          ftp-gw:         permit-hosts 192.1.2.* -log { retr stor }
          ftp-gw:         permit-hosts * -authall -log { retr stor }



  Le web, gopher et le ftp fond sur un butineur sont contrls par le
  http-gw.  Les deux premires lignes crent un rpertoire pour stocker
  les documents ftp et web lorsqu'ils passent au-travers du pare-feu.
  Je rends root propritaire de ces fichiers et je les place dans un
  rpertoire accessible seulement par root.

  La connexion web doit tre maintenue courte.  Elle contrle le temps
  durant lequel un utilisateur attendra lors d'une mauvaise connexion :


          # regles de passerelle www et gopher :
          http-gw:        userid          root
          http-gw:        directory       /jail
          http-gw:        timeout 90
          http-gw:        default-httpd   www.afs.net
          http-gw:        hosts           192.1.2.* -log { read write ftp }
          http-gw:        deny-hosts      *



  Le ssl-gw est juste une passerelle "gruyre".  Faites-y attention.
  Dans cet exemple, j'autorise quiconque depuis le rseau protg  se
  connecter en-dehors du rseau sauf les adresses 127.0.0.* et
  192.1.1.*, puis seulement sur les ports 443  563.  Ces derniers sont
  les ports SSL connus :






          # Regles de passerelle SSL :
          ssl-gw:  timeout 300
          ssl-gw:  hosts   192.1.2.* -dest { !127.0.0.* !192.1.1.* *:443:563 }
          ssl-gw:  deny-hosts *



  Voici un exemple d'utilisation de plug-gw pour autoriser des
  connexions  un serveur de nouvelles.  Dans cet exemple j'autorise
  quiconque depuis le rseau protg  se connecter seulement  un
  systme et seulement sur son port de nouvelles.

  La seconde ligne permet au serveur de renvoyer ses donnes au rseau
  protg.

  Puisque de nombreux clients s'attendent  rester connects pendant que
  l'utilisateur lit les nouvelles, le timeout pour un serveur de
  nouvelles doit tre long :



          # passerelle plug-in pour les nouvelles :
          plug-gw: timeout 3600
          plug-gw: port nntp 192.1.2.* -plug-to 199.5.175.22 -port nntp
          plug-gw: port nntp 199.5.175.22 -plug-to 192.1.2.* -port nntp



  La passerelle finger est simple.  Quiconque depuis le rseau protg
  doit se connecter d'abord, puis nous l'autorisons  utiliser le
  programme finger du pare-feu.  Tout autre reoit simplement un
  message :


          # Autorise le service finger :
          netacl-fingerd: permit-hosts 192.1.2.* -exec /usr/libexec/fingerd
          netacl-fingerd: permit-hosts * -exec /bin/cat /usr/local/etc/finger.txt



  Je n'ai pas configur les services courriel ni X-Window, donc je
  n'inclus pas les exemples.  Si quelqu'un dispose d'un exemple qui
  fonctionne, qu'il me l'envoie par courriel.


  1100..44..22..  LLee ffiicchhiieerr //eettcc//sseerrvviicceess

  C'est l que tout commence.  Lorsqu'un client se connecte sur le pare-
  feu, il le fait sur un port connu (infrieur  1024).  Par exemple,
  telnet se connecte sur le port 23.  Le daemon inetd dtecte cette
  connexion et cherche le nom du service dans le fichier /etc/services.
  Ensuite, il lance le programme assign au nom dans le fichier
  /etc/inetd.conf.

  Certains des services que nous crons ne sont pas normalement dans le
  fichier /etc/services.  Vous pouvez assigner  certains d'entre eux le
  port que vous souhaitez.  Par exemple, j'ai assign le port telnet de
  l'administrateur (telnet-a) sur le port 24.  Pous pouvez l'assigner au
  port 2323 si vous voulez.  Pour que l'administrateur (VOUS) se
  connecte directement sur le pare-feu, il doit utiliser telnet sur le
  port 24 et non 23 et si vous paramtrez votre netperm-table comme je
  l'ai fait, vous serez seulement capable de faire cela depuis un
  systme situ  l'intrieur du rseau protg.



          telnet-a   24/tcp
          ftp-gw     21/tcp          # ce nom est modifie
          auth       113/tcp  ident  # Verification utilisateur
          ssl-gw     443/tcp





  1111..  LLee sseerrvveeuurr mmaannddaattaaiirree SSOOCCKKSS

  1111..11..  IInnssttaallllaattiioonn dduu sseerrvveeuurr mmaannddaattaaiirree

  Le serveur mandataire SOCKS est disponible sur :
  http://www.socks.nec.com/.

  Dcompressez et "d-tarez" les fichiers dans un rpertoire de votre
  systme, et suivez les instructions pour le confectionner.  J'ai eu
  quelques problmes pour le raliser.  Vrifiez que vos Makefiles
  soient corrects.

  Une chose importante est que le serveur mandataire doit tre ajout
  dans /etc/inetd.conf.  Vous devez ajouter une ligne :


          socks  stream  tcp  nowait  nobody  /usr/local/etc/sockd  sockd



  pour indiquer au serveur de s'excuter sur demande.


  1111..22..  CCoonnffiigguurraattiioonn dduu sseerrvveeuurr mmaannddaattaaiirree

  Le programme de connexion ncessite deux fichiers de configuration
  distincts : l'un pour indiquer les accs autoriss, l'autre pour
  rediriger les requtes vers le serveur mandataire appropri.  Le
  fichier d'autorisations d'accs doit se trouver sur le serveur.  Le
  fichier de routage peut tre plac sur n'importe quelle machine Unix.
  Les ordinateurs DOS et, je pense, les Macintosh font leur propre
  routage.


  1111..22..11..  LLee ffiicchhiieerr dd''aaccccss

  Avec socks4.2 bta, le fichier d'accs s'appelle "sockd.conf".  Il
  doit contenir deux lignes : une ligne d'autorisations et une ligne
  d'interdictions.  Chaque ligne prsente trois champs :


    l'identificateur (permit ou deny) ;

    l'adresse IP ;

    le modificateur d'adresse.

  L'identificateur est soit permit, soit deny.  Vous devez avoir aussi
  bien une ligne permit qu'une ligne deny.

  L'adresse IP contient une adresse  quatre octets en notation
  classique IP, soit, par exemple, 192.168.2.0.

  Le masque de modification d'adresse est aussi une adresse  quatre
  octets en notation classique IP, et fonctionne comme un masque rseau.
  Reprsentez-vous ce nombre sur 32 bits.  Si un bit est  1, le bit
  correspondant de l'adresse qu'il contrle doit concorder avec le bit
  correspondant du champ de l'adresse IP.

  Par exemple, une ligne :


          permit 192.168.2.23 255.255.255.255



  autorisera seulement l'adresse dont chaque bit correspond 
  192.168.2.23, donc seulement 192.168.2.23.

  Tandis que la ligne :


          permit 192.168.2.0 255.255.255.0



  autorisera toute adresse du groupe 192.168.2.0  192.168.2.255, soit
  tout le domaine de la classe C.

  Il ne faut pas spcifier la ligne :


          permit 192.168.2.0 0.0.0.0



  qui autoriserait toute adresse, sans distinction.

  Aisni, autorisez toute adresse que vous souhaitez, puis interdisez le
  reste.  Pour autoriser quiconque dans le domaine 192.168.2.xxx, les
  lignes :


          permit 192.168.2.0 255.255.255.0
          deny 0.0.0.0 0.0.0.0



  fonctionneront trs bien.  Notez le premier "0.0.0.0" dans la ligne
  "deny".  Avec un modificateur de 0.0.0.0, le champ adresse IP n'a
  aucune importance.  Tous les champs  0 reprsentent la norme, car
  c'est facile  crire.

  On peut utiliser plusieurs lignes de chaque type.

  Des utilisateurs spcifiques peuvent aussi se voir accorder ou refuser
  l'accs.  Cela est ralis par l'authentification d'identit.  Tous
  les systmes ne supportent pas le systme ident, y compris Trumpet
  Winsock, donc nous n'irons pas plus loin en ce qui concerne cela.  La
  documentation de socks est tout  fait adquate sur ce sujet.


  1111..22..22..  LLee ffiicchhiieerr ddee rroouuttaaggee

  Le fichier de routage de socks est btement nomm "socks.conf".  Je
  dis "btement", car il est si proche du nom du fichier d'accs qu'il
  est ais de les confondre.

  Le fichier de routage sert  indiquer aux clients de socks quand il
  est ncessaire de l'utiliser et quand ce n'est pas le cas.  Par
  exemple, dans notre rseau, 192.168.2.3 ne ncessite pas l'usage de
  socks pour communiquer avec le pare-feu 192.168.2.1.  Il a une
  connection directe Ethernet.  Il dfinit 127.0.0.1, le port de
  bouclage, automatiquement.  Evidemment, il n'est  pas ncessaire
  d'utiliser socks pour vous parler  vous-mme.

  Il y a trois entres :


    deny ;

    direct ;

    sockd.

  L'entre "deny" indique  socks quand rejeter une requte.  Cette
  entre a les trois mmes champs que ceux de sockd.conf :
  identificateur, adresse et modificateur.  Gnralement, puisqu'il est
  aussi manipul par sockd.file, le fichier d'accs, le champ
  modificateur est positionn  0.0.0.0.  Si vous voulez vous interdire
  tout appel vers l'extrieur, vous pouvez le raliser ici.

  L'entre "direct" indique pour quelles adresses ne pas utiliser socks.
  Il s'agit des adresses pouvant tre atteintes sans le serveur
  mandataire.  A nouveau, nous avons les trois champs identificateur,
  adresse et modificateur.

  Dans notre exemple, nous aurions :


          direct 192.168.2.0 255.255.255.0



  donnant ainsi l'accs direct pour toute machine de notre rseau
  protg.

  L'entre "sockd" indique  l'ordinateur l'emplacement du dmon serveur
  de socks.

  La syntaxe est la suivante :


          sockd @=<liste de serveurs> <adresse IP> <modificateur>



  Notez l'entre @=.  Elle vous permet de configurer les adresses IP de
  plusieurs serveurs mandataires.  Dans notre exemple, nous utilisons un
  seul serveur mandataire, mais vous pouvez en avoir plusieurs pour
  permettre un plus grand trafic et pour assurer une tolrance aux
  pannes.

  Les champs adresse IP et modificateur fonctionnent exactement comme
  dans les autres exemples.  Vous spcifiez ainsi o va quelle adresse.


  1111..22..33..  DDNNSS ddeeppuuiiss ll''aarrrriirree dd''uunn ppaarree--ffeeuu

  Configurer un service de noms de domaines depuis l'arrire d'un pare-
  feu est une tche relativement simple.  En gros, il vous faut
  configurer le DNS sur la machine pare-feu.  Ensuite, indiquez  chaque
  machine derire le pare-feu d'utiliser celui-ci.


  1111..33..  TTrraavvaaiilllleerr aavveecc uunn sseerrvveeuurr mmaannddaattaaiirree



  1111..33..11..  UUnniixx

  Pour faire fonctionner vos applications avec un serveur mandataire,
  celles-ci doivent tre "SOCK-ifies".  Il vous faudra deux telnet
  diffrents : un pour la communication directe, et un autre pour celle
  avec le serveur mandataire.  Le paquetage socks contient des
  indications pour SOCK-ifier un programme, ainsi qu'un certain nombre
  de programmes pr-SOCK-ifis.  Si vous utilisez la version SOCK-ifie
  pour aller  un emplacement direct, socks basculera automatiquement
  sur la version directe pour vous.  Pour cette raison, il nous faut
  renommer tous les programmes sur notre rseau protg et les remplacer
  par leur version SOCK-ifie.  "finger" devient "finger.orig", "telnet"
  devient "telnet.orig", etc.  Vous devez indiquer chacun d'eux  socks
   l'aide du fichier include/socks.

  Certains programmes traitent le routage et la SOCK-ification eux-
  mmes.  Netscape est l'un d'entre eux.  Vous pouvez utiliser un
  serveur mandataire sous Netscape en donnant l'adresse du serveur
  (192.168.2.1 dans le cas qui nous intresse) dans le champ SOCKs sous
  Proxies.  Chaque application ncessite au moins un petit coup d'oeil,
  quelle que soit son attitude vis--vis d'un serveur mandataire.


  1111..33..22..  MMSS WWiinnddoowwss aavveecc TTrruummppeett WWiinnssoocckk

  Trumpet Winsock contient des fonctionnalits de serveur mandataire
  incluses.  Dans le menu "setup", donnez l'adresse IP du serveur, ainsi
  que celles de tous les ordinateurs directement accessibles.  Trumpet
  se dbrouillera alors avec tous les paquets sortants.  NdT : Trumpet
  Winsock est une couche IP destine  MS-Windows 3.  Depuis la version
  3.11 de Windows, Microsoft fournit une couche IP dont les
  fonctionnalits sont trs diffrentes.


  1111..44..  FFaaiirree ffoonnccttiioonnnneerr llee sseerrvveeuurr mmaannddaattaaiirree aavveecc lleess ppaaqquueettss UUDDPP

  Le paquetage SOCKS fonctionne seulement avec les paquets TCP, pas avec
  les UDP.  Cela le rend quelque peu moins utile.  De nombreux
  programmes trs utiles, comme talk et Archie, utilisent UDP.  Il
  existe un paquetage prvu pour tre utilis comme serveur mandataire
  pour les paquets UDP appel UDPrelay, de Tom Fitzgerald fitz@wang.com.
  Malheureusement,  l'heure o ces lignes sont crites, il n'est pas
  compatible avec Linux.


  1111..55..  IInnccoonnvvnniieennttss ddeess sseerrvveeuurrss mmaannddaattaaiirree

  Le serveur mandataire est, avant tout, un systme de scurit.  Son
  utilisation pour augmenter le nombre d'accs Internet avec un nombre
  limit d'adresses aura de nombreux inconvnients.  Un serveur
  mandataire autorisera un plus grand accs de l'intrieur du rseau
  protg vers l'extrieur, mais laissera l'intrieur totalement
  inaccessible de l'extrieur.  Ce qui implique aucun serveur, aucune
  connexion talk ni Archie, ni courriel direct vers les ordinateurs de
  l'intrieur.  Ces inconvnients peuvent sembler lgers, mais regardez-
  les sous l'angle suivant :

    Vous avez laiss un document en cours sur votre ordinateur 
     l'intrieur du rseau protg.  Vous tes  la maison, et dcidez
     que vous voulez retravailler celui-ci.  Vous ne le pouvez pas.
     Vous ne pouvez atteindre votre ordinateur, car il est derrire le
     pare-feu.  Vous essayez de vous loger d'abord sur le pare-feu, mais
     comme tout le monde a accs au serveur mandataire, personne ne vous
     a cr de compte dessus.


    Votre fille va  l'universit.  Vous souhaitez lui envoyer un
     courriel.  Vous avez diffrents choses de caractre priv 
     discuter, et prfreriez recevoir directement votre courrier sur
     votre machine.  Vous avez pleine confiance dans votre
     administrateur rseau, mais, malgr tout, il s'agit de courrier
     priv.

    L'impossibilit d'utiliser les paquets UDP reprsente un gros
     inconvnient avec les serveurs mandataire.  Je pense que les
     fonctionnalits UDP arriveront sous peu.

  FTP cause un autre problme avec les serveurs mandataire : Lorsque FTP
  rcupre une liste de fichiers, le serveur ouvre une socket sur la
  machine client pour lui envoyer les informations.  Un serveur
  mandataire ne permettra pas cela, donc FTP en particulier ne
  fonctionne pas.

  De plus, les serveurs mandataires sont lents.  A cause de la
  dgradation du rapport information/protocole, n'importe quel autre
  moyen d'obtenir cet accs sera plus rapide.

  En rsum, si vous avez les adresses IP ncessaires, et que la
  scurit ne soit pas un impratif pour vous, n'utilisez ni un pare-feu
  ni un serveur mandataire.  Si vous n'avez pas suffisamment d'adresses
  IP, mais que, de mme, la scurit n'est pas fondamentale, vous pouvez
  jeter un coup d'oeil aux mulateurs IP, comme Term, Slirp ou TIA.
  Term est disponible sur ftp://sunsite.unc.edu, Slirp est disponible
  sur ftp://blitzen.canberra.edu.au/pub/slirp et TIA est disponible sur
  marketplace.com.  Ces paquetages iront plus vite, permettront de
  meilleures connexions, et fourniront un accs suprieur  l'intrieur
  du rseau depuis InterNet.  Les serveurs mandataires sont utiles pour
  ce genre de rseaux qui comportent de nombreuses machines qui se
  connectent au vol  InterNet, avec une configuration et peu de travail
  ensuite.


  1122..  CCoonnffiigguurraattiioonnss aavvaanncceess

  Je voudrais aborder une configuration particulire avant de refermer
  ce document.  Celle que j'ai souligne prcdemment suffira
  probablement pour de nombreux cas.  Nammoins, je pense que la
  situation suivante montrera une configuration plus avance qui
  claircira certains points d'ombre.  S'il vous reste des questions
  aprs ce que je viens de dcrire, ou simplement que l'adaptabilit des
  serveurs mandataires et des pare-feux vous intresse, lisez encore.


  1122..11..  UUnn ggrraanndd rrsseeaauu aavveecc ssccuurriitt rreennffoorrccee

  Disons, par exemple, que vous tes le gourou de la secte de la 23me
  Cabale de la Discorde de Milwaukee.  Vous souhaitez mettre votre site
  en rseau.  Vous avez cinquante ordinateurs et un sous-rseau de
  trente-deux adresses IP (sur cinq bits).  Vous avez diffrents niveaux
  d'accs parce que vous dites  vos disciples diffrentes choses en
  fonction de leur niveau.  C'est pourquoi vous devez protger certaines
  parties du rseau du reste.

  (NdT : Le traducteur a conserv la 23me Cabale de la Discorde de
  Milwaukee, issue du texte initial, contrairement  ce que contiennent
  les nouvelles versions (millisha : version militarise) qui serait
  moins explicite du principe pour un public francophone).

  Les niveaux sont les suivants :

  1. Le niveau extrieur.  C'est celui qui est montr  tout un chacun.
     En gros, c'est l'histoire et les ragots sur Eris, la divinit de la
     Discorde, et tout le reste du dogme ;

  2. Sage.  C'est le niveau des gens qui ont pass le niveau extrieur.
     C'est l que vous leur dites que la discorde et la structure ne
     font qu'un, et qu'Eris est aussi le Dieu tout-puissant ;

  3. Adepte.  C'est l que se trouve le plan rel.  Dans ce niveau sont
     stockes toutes les informations sur la manire dont la secte des
     Discordiens prendra le pouvoir sur le monde,  l'aide d'un plan
     dviationniste, mais humoristique, impliquant PetitMou, HAL, R2D2,
     Nounours et cinq cents cristaux, tous marqus "80585,9999999997"
     par erreur.


  1122..11..11..  LLaa ccoonnffiigguurraattiioonn dduu rrsseeaauu

  Les numros IP sont arrangs ainsi :


    l'adresse 192.168.2.255 est l'adresse de diffusion, et n'est pas
     disponible ;

    23 des 32 adresses IP sont alloues  23 machines qui seront
     accessibles depuis InterNet ;

    Une adresse IP supplmentaire va  une machine Linux sur ce
     rseau ;

    Une autre va  une autre machine Linux de ce rseau ;

    2 numros IP vont au routeur ;

    4 sont laisses libres, mais recoivent les noms de domaine paul,
     ringo, george et john, juste pour compliquer un peu les choses ;

    Les rseaux protgs ont tous deux des adresses 192.168.2.xxx.

  Puis, deux rseaux spars sont construits, chacun dans une pice
  diffrente.  Ils sont routs par Ethernet infrarouge pour les rendre
  compltement invisibles de la pice extrieure.  Par chance,
  l'Ethernet infrarouge fonctionne tout  fait comme l'Ethernet normal,
  donc il nous suffit de les considrer comme normaux.

  Ces rseaux sont connects chacun  sa machine Linux avec une adresse
  IP supplmentaire.

  Un serveur de fichiers relie les deux rseaux protgs.  C'est parce
  que les plans pour prendre le pouvoir sur le monde prennent en compte
  certains des sages les plus levs.  Le serveur de fichiers a les
  adresses 192.168.2.17 pour le rseau des sages et 192.168.2.23 pour le
  rseau des adeptes.  Il doit avoir des adresses IP diffrentes, car il
  doit avoir deux cartes Ethernet diffrentes.  La transmission IP y est
  dsactive.

  La transmission IP est aussi dsactive sur les deux machines Linux.
  Le routeur ne transmettra pas les paquets destins  192.168.2.xxx
  sauf si on lui demande explicitement de le faire, donc InterNet ne
  pourra pas entrer.  La raison de la dsactivation de la transmission
  IP ici est d'empcher les paquets du rseau des sages d'atteindre le
  rseau des adeptes, et vice versa.

  Le serveur NFS peut aussi tre configur pour prsenter diffrents
  fichiers aux diffrents rseaux.  Cela peut devenir pratique, et assez
  astucieux d'utiliser les liens symboliques pour partager les fichiers
  communs.  Cette configuration associe  une autre carte Ethernet peut
  ainsi permettre l'usage d'un seul serveur de fichiers pour les trois
  rseaux.


  1122..11..22..  LLaa ccoonnffiigguurraattiioonn dduu bbaassttiioonn

  Maintenant, puisque les trois niveaux doivent tre capables de piloter
  le rseau pour leurs propres besoins dviationnistes, tous les trois
  ont besoin d'un accs InterNet.  Le rseau extrieur est connect
  directement  celui-ci, donc nous n'avons pas  nous proccuper d'un
  serveur mandataire ici.  Les rseaux des sages et des adeptes sont
  derrire des pare-feux, il est donc ncessaire de leur configurer des
  serveurs mandataires.

  Les deux rseaux seront configurs de manire similaire.  Tous deux
  ont les mmes adresses IP assignes.  Je vais ajouter quelques
  paramtres, afin de rendre les choses encore plus intressantes :


  1. Personne ne peut utiliser le serveur de fichiers pour l'accs
     Internet.  Cela exposerait le serveur de fichiers aux virus et
     autres choses dsagrables, et il est trs important, donc il est
     derrire les limites ;

  2. Nous ne voulons pas donner aux sages l'accs au web.  Il sont
     encore en entranement, et cette puissance de recherche
     d'informations peut se rvler dangereuse.

  Ainsi, le fichier sockd.conf de la machine Linux des sages contiendra
  cette ligne :


          deny 192.168.2.17 255.255.255.255



  Et sur la machine des adeptes :


          deny 192.168.2.23 255.255.255.255



  Et la machine Linux des sages contiendra cette ligne :


          deny 0.0.0.0 0.0.0.0 eq 80



  Cela indique l'interdiction d'accs pour toutes les machines tentant
  d'accder au port 80, le port http.  Cela laisse l'accs  tous les
  autres services, et interdit juste l'accs Web.

  Ensuite, les deux fichiers auront :


          permit 192.168.2.0 255.255.255.0



  pour permettre  tous les ordinateurs du rseau 192.168.2.xxx
  d'utiliser ce serveur mandataire sauf pour ceux  qui cela a dj t
  interdit (i.e. le serveur de fichiers et l'accs Web pour le rseau
  des sages).


  Le fichier sockd.conf du rseau des sages aura l'allure suivante :


          deny 192.168.2.17 255.255.255.255
          deny 0.0.0.0 0.0.0.0 eq 80
          permit 192.168.2.0 255.255.255.0



  et le fichier des adeptes aura celle-ci :

          deny 192.168.2.23 255.255.255.255
          permit 192.168.2.0 255.255.255.0



  Cela doit tout configurer correctement.  Chaque rseau est isol comme
  il faut, avec le niveau d'interaction appropri.  Chacun peut tre
  heureux.  Maintenant, prenez le pouvoir sur le monde !


  1133..  SSiimmpplliiffiieerr ll''aaddmmiinniissttrraattiioonn

  Un certain nombre de paquetages peuvent rendre l'administration de
  votre pare-feu plus simple :


    Webmin http://www.webmin.com/.

  [ Lister les URL ICI ]


  1144..  OOuuttrreeppaasssseerr uunn ppaarree--ffeeuu mmaannddaattaaiirree

  Juste pour vous gcher la journe et vous maintenir dans l'esprit de
  scurit, je vais dcrire combien il est facile d'outrepasser un pare-
  feu mandataire.

  Imaginons que vous ayez ralis tout ce qui se trouve dans le prsent
  document et que vous disposiez d'un rseau et d'un serveur trs
  scuriss.  Vous disposez d'une zone dmilitarise, personne ne peut
  entrer dans votre rseau et vous tracez chaque connexion ralise vers
  le monde extrieur.  Vous obligez tous vos utilisateurs  passer par
  un mandataire et le seul service que vous autorisiez directement vers
  l'extrieur est le DNS (port 53).

  Un port, c'est tout ce qu'il faut pour rendre un pare-feu inutile.
  Voici comment cela se passe :

  Commencez par configurer une machine Linux quelque part en-dehors de
  votre rseau.  Un bon choix pourrait tre une machine personnelle
  connecte  Internet par un modem-cble.

  Demandez trois adresses IP  votre FAI.  De nombreuses entreprises en
  fournissent jusqu' trois.

  Sur cette machine, vous devez installer la partie client d'un rseau
  priv virtuel (VPN).  Cherchez sur http://sunsite.auc.dk/vpnd/.

  Maintenant, configurez le ct serveur du VPN sur une autre machine
  Linux.  Connectez ce serveur  son client par le port 53.  Activez le
  routage et la transmission IP et placez une adresse IP inutilise
  (obtenue de votre FAI) sur son port rseau local.

  Finalement, sur un poste du rseau priv, changez la passerelle par
  dfaut afin qu'elle pointe sur le serveur du VPN et ajoutez la
  troisime adresse IP sur son port rseau local.

  Maintenant, depuis ce poste, vous pouvez aller n'importe o.  La seule
  chose que l'administrateur voie est une recherche DNS particulirement
  longue.

  Maintenant, prenez le pouvoir sur le monde !



























































  Framebuffer HOWTO
  Alex Buell,  <mailto:alex.buell@tahallah.demon.co.uk>,
  traduit par Franois Romieu,  <romieu@ensta.fr>
  v1.2, 22 Juillet 1999

  Ce document dcrit l'emploi des priphriques d'accs  la mmoire
  vido avec diverses configurations matrielles munies de Linux. La
  gestion de plusieurs crans est galement traite.
  ______________________________________________________________________

  Table des matires























































  1. Contributions

  2. Qu'est-ce qu'un tampon de mmoire vido ?

  3. Quels avantages prsente le tampon de mmoire vido ?

  4. Utilisation du tampon de mmoire vido sur architecture Intel

     4.1 Vesafb, qus acco ?
     4.2 Comment faire fonctionner le gestionnaire vesafb ?

  5. De quels modes VESA puis-je me servir ?

     5.1 Utilisation des cartes graphiques Matrox
     5.2 Utilisation des cartes graphiques Permedia.
     5.3 Utilisation des cartes graphiques ATI
     5.4 Quelles cartes graphiques se conforment aux spcifications VESA 2.0 ?
     5.5 Vesafb est-il modularisable ?
     5.6 Comment puis-je modifier le curseur ?

  6. Le pilote de mmoire vido sur les Atari m68k

     6.1 Quels sont les modes disponibles sur les machines Atari m68k ?
     6.2 Sous-options supplmentaires sur les machines Atari m68k
     6.3 Sous-option "internal" sur les machines Atari m68k
     6.4 Sous-option "external" sur les machines Atari m68k

  7. Le pilote de mmoire vido avec les Amiga

     7.1 Quels sont les modes disponibles sur les machines Amiga ?
     7.2 Sous options supplmentaires sur les machines Amiga m68k
     7.3 Cartes d'extension graphiques gres sur Amiga

  8. Le pilote de mmoire vido sur les Macintosh m68k

  9. Le pilote de mmoire vido sur les PowerPC

  10. Le pilote de mmoire vido sur les Alpha

     10.1 Modes disponibles
     10.2 Cartes graphiques gres par le pilote de mmoire vido

  11. Le pilote de mmoire vido sur les SPARC

     11.1 Cartes graphiques gres par le pilote de mmoire vido
     11.2 Configuration du gestionnaire de mmoire vido

  12. Le pilote de mmoire vido sur les MIPS

  13. Le pilote de mmoire vido sur les ARM

     13.1 Netwinders
     13.2 Archimedes Acorn
     13.3 Autres architectures  base d'ARM (SA 7110s et variantes)

  14. Gestion de la mmoire vido avec plusieurs crans

     14.1 Introduction
     14.2 Retour
     14.3 Contributions
     14.4 Avertissements
     14.5 Proprit du document
     14.6 Matriel support
     14.7 Logiciels commerciaux
     14.8 Logiciels ncessaires
     14.9 Mise en route
        14.9.1 Dplacement d'une console
        14.9.2 "fbset" et le paramtrage du second moniteur
        14.9.3 X et le gestionnaire de mmoire vido
        14.9.4 Excution du serveur X sur le second moniteur
     14.10 Rsum
     14.11 Remarques et problmes
        14.11.1 Fonctionnement avec xdm
        14.11.2 L'utilitaire x2x
        14.11.3 Autres commandes utiles
        14.11.4 Annexe A. Script cvtmode.m pour Octave
        14.11.5 Annexe B.  Script "cvtfile" en Shell Bourne

  15. Gestion des fontes

  16. Commutation de mode

     16.1 X11 et vesafb ?

  17. Conversion des Modelines en paramtres d'affichage du pilote de mmoire vido

  18. Davantage d'informations ?



  ______________________________________________________________________

  11..  CCoonnttrriibbuuttiioonnss

  Merci aux personnes dont les noms suivent pour avoir aid 
  l'amlioration du HOWTO Framebuffer.


    Jeff Noxon jeff@planetfall.com

    Francis Devereux f.devereux@cs.ucl.ac.uk

    Andreas Ehliar ehliar@futurniture.se

    Martin McCarthy marty@ehabitat.demon.co.uk

    Simon Kenyon simon@koala.ie

    David Ford david@kalifornia.com

    Chris Black cblack@cmpteam4.unil.ch

    N Becker nbecker@fred.net

    Bob Tracy rct@gherkin.sa.wlk.com

    Marius Hjelle marius.hjelle@roman.uib.no

    James Cassidy jcassidy@misc.dyn.ml.org

    Andreas U. Trottmann andreas.trottmann@werft22.com

    Lech Szychowski lech7@lech.pse.pl

    Aaron Tiensivu tiensivu@pilot.msu.edu

    Jan-Frode Myklebust pour ses informations sur les cartes Permedia
     janfrode@ii.uib.no

    Et les autres, trop nombreux pour tous figurer ici. Un grand merci
      eux.

     Un grand merci  Rick Niles frederick.a.niles@gsfc.nasa.gov qui a
     accept que son Mini-HOWTO Multi-Head soit inclus dans ce HOWTO.
     Merci aux personnes suivantes pour avoir compil les versions
     libc5/glibc2 du gestionnaire XF86_FBdev pour X11 sur les
     architectures Intel :

    Brion Vibber brion@pobox.com

    Gerd Knorr kraxel@cs.tu-berlin.de

  bien sr l'auteur du code :

    Martin Schaller - auteur du concept originel de priphrique
     d'accs  la mmoire vido.

    Roman Hodek Roman.Hodek@informatik.uni-erlangen.de

    Andreas Schwab schwab@issan.informatik.uni-dortmund.de

    Guenther Kelleter

    Geert Uytterhoeven Geert.Uytterhoeven@cs.kuleuven.ac.be

    Roman Zippel roman@sodom.obdg.de

    Pavel Machek pavel@atrey.karlin.mff.cuni.cz

    Gerd Knorr kraxel@cs.tu-berlin.de

    Miguel de Icaza miguel@nuclecu.unam.mx

    David Carter carter@compsci.bristol.ac.uk

    William Rucklidge wjr@cs.cornell.edu

    Jes Sorensen jds@kom.auc.dk

    Sigurdur Asgeirsson

    Jeffrey Kuskin jsk@mojave.stanford.edu

    Michal Rehacek michal.rehacek@st.mff.cuni.edu

    Peter Zaitcev zaitcev@lab.ipmce.su

    David S. Miller davem@dm.cobaltmicro.com

    Dave Redman djhr@tadpole.co.uk

    Jay Estabrook

    Martin Mares mj@ucw.cz

    Dan Jacobowitz dan@debian.org

    Emmanuel Marty core@ggi-project.org

    Eddie C. Dost ecd@skynet.be

    Jakub Jelinek jj@ultra.linux.cz

    Phil Blundell philb@gnu.org

    S'il y en a d'autres, qu'ils se manifestent et ils seront cits.
     :o)

  22..  QQuu''eesstt--ccee qquu''uunn ttaammppoonn ddee mmmmooiirree vviiddoo ??

  Un tampon de mmoire vido dfinit une abstraction logicielle d'accs
  aux priphriques vido. Il correspond  la mmoire d'affichage de
  certains contrleurs graphiques et propose une interface unifie aux
  logiciels qui n'ont alors plus  se soucier des dtails de bas niveau
  relatifs au matriel [Extrait du fichier framebuffer.txt crit par
  Geert Uytterhoeven's. Se reporter aux sources du noyau].


  33..  QQuueellss aavvaannttaaggeess pprrsseennttee llee ttaammppoonn ddee mmmmooiirree vviiddoo ??


  Le logo de linux au dmarrage !  Plus srieusement, on dispose d'une
  interface indpendante de l'architecture matrielle. Les gestionnaires
  de console des machines de type Intel sont rests radicalement
  diffrents de ceux des autre plate-formes jusqu' une phase de
  dveloppement avance des noyaux 2.1.x. Avec l'introduction dans le
  noyau 2.1.109 de cette interface, les choses se sont amliores : la
  gestion des consoles sur PC s'est uniformise, les consoles en mode
  graphique affichant le logo du pingouin ont fait leur apparition et le
  code s'est propag aux autres types de machines. Notez que les noyaux
  2.0.x ne disposent pas du gestionnaire d'accs  la mmoire vido.
  Peut-tre quelqu'un finira-t-il par intgrer le code des versions
  2.1.x dans ces noyaux. Le portage version 0.9.x pour les machines m68k
  fai exception car il intgre le pilote.  _A_v_e_c _l_a _d_i_s_p_o_n_i_b_i_l_i_t_ _d_e_s
  _n_o_y_a_u_x _2_._2_._x_, _l_e _g_e_s_t_i_o_n_n_a_i_r_e _d_e _m__m_o_i_r_e _v_i_d__o _s_'_a_v__r_e _s_t_a_b_l_e _e_t
  _r_o_b_u_s_t_e_. _V_o_u_s _d_e_v_r_i_e_z _l_'_u_t_i_l_i_s_e_r _s_i _v_o_t_r_e _c_a_r_t_e _v_i_d__o _l_e _s_u_p_p_o_r_t_e _e_t
  _s_i _v_o_u_s _e_m_p_l_o_y_e_z _u_n _n_o_y_a_u _2_._2_._x_. _L_a _q_u_e_s_t_i_o_n _n_e _s_e _p_o_s_e _p_a_s _s_i _v_o_u_s
  _t_r_a_v_a_i_l_l_e_z _a_v_e_c _u_n _2_._0_._x_, _d_u _m_o_i_n_s _s_u_r _u_n _P_C_.


    0.9.x (m68k) - introduction du gestionnaire. Notez que les versions
     0.9.x quivalent d'un point de vue fonctionnel  la version 1.0.9
     sur architecture Intel avec les amliorations des 1.2.x.

    2.1.107 - apparition du gestionnaire de mmoire vido sur PC ainsi
     que des nouveaux pilotes pour les consoles. Le dfilement en
     arrire n'est pas encore disponible.

    2.1.113 - ajout du dfilement en arrire au pilote vgacon.

    2.1.116 - ajout du dfilement en arrire au pilote vesafb.

    2.2.x - matroxfb et atyfb (cartes graphiques Matrox et ATI
     respectivement).

  Le gestionnaire de mmoire vido offre des possibilits intressantes
  si on prcise quelques options au noyau lors du dmarrage. Certaines
  sont spcifiques  un type de carte donn.

    video=xxx:off - dsactive l'auto-dtection d'un pilote

    video=map:octal-number - associe des consoles virtuelles ( VC ) 
     un gestionnaire de mmoire vido

    video=map:01 VC0 est associe  FB0, VC1  FB1, VC2  FB0, VC3 
     FB1...

    video=map:0132 VC0 est associe  FB0, VC1  FB1, VC2  FB3, VC4 
     FB2, VC5  FB0...

  La dtection des gestionnaires de mmoire vido a lieu dans un ordre
  fix au niveau du noyau. Vous pouvez l'altrer grce  l'option
  video=xxx qui permet de forcer la dtection de certains priphriques
  avant les autres.
  44..  UUttiilliissaattiioonn dduu ttaammppoonn ddee mmmmooiirree vviiddoo ssuurr aarrcchhiitteeccttuurree IInntteell

  44..11..  VVeessaaffbb,, qquuss aaccccoo ??

  Vesafb est un gestionnaire de mmoire vido sur compatible PC ddi
  aux cartes cartes graphiques conformes aux spcifications VESA 2.0.
  Son fonctionnement est li de prs aux gestionnaires de mmoire vido
  gnriques du noyau.

  Vesafb permet le recours aux modes graphiques sur PC pour
  l'utilisation des consoles textes en point par point. Vesafb autorise
  galement l'affichage d'un logo et c'est vraisemblablement ce pour
  quoi vous voulez vous en servir :o)

  On ne peut malheureusement pas utiliser vesafb avec des cartes VESA
  1.2.  En effet, ces cartes n'utilisent pas un adressage linaire. Par
  ce terme, on entend que tous les octets de la mmoire vido sont
  accessibles  un instant donn. Historiquement, les anciennes cartes
  vido ne rendaient la mmoire graphique disponible qu'au travers d'une
  fentre de 64 ko qui correspondait  la taille de la plus grande zone
  de mmoire contige grable directement par le microprocesseur (d'o
  les limitations des cartes CGA/EGA).  Quelqu'un crira peut-tre un
  gestionnaire de priphriques vesafb12 pour ce type de cartes, mais il
  consommera une mmoire par ailleurs prcieuse pour le noyau et a
  restera de toute faon un sale bricolage. :o(

  Il existe cependant un moyen dtourn d'accder aux fonctionnalits
  VESA 2.0 sur une carte VESA 1.2. Peut-tre pouvez vous charger depuis
  le DOS un programme de type TSR qui, utilis conjointement avec
  loadlin, aidera  configurer la carte pour les modes graphiques
  voulus. Cela ne marchera pas toujours. Ainsi, certaines cartes de chez
  Cirrus Logic, telles les VLB 54xx, se retrouvent  une position en
  mmoire (par exemple entre 15 et 16 Mo) qui en interdit l'utilisation
  sur les systmes munis de plus de 32 Mo de mmoire.  Rien de
  rdhibitoire si on dispose d'un BIOS permettant de ne pas affecter de
  mmoire entre 15 et 16 Mo ("Memory Hole") mais il m'a sembl
  comprendre que Linux n'aime pas a. Si l'exprience vous tente, vous
  pouvez essayer UNIVBE (disponible sur l'Internet).

  Vous pouvez aussi essayer divers patches noyaux. Il en existe
  notamment pour les anciennes cartes S3 telles la S3 Trio ou la Virge
  qui se conforment  la norme VESA 1.2. Les patches sont disponibles
  via :
  <ftp://ccssu.crimea.ua/pub/linux/kernel/v2.2/unofficial/s3new.diff.gz>.


  44..22..  CCoommmmeenntt ffaaiirree ffoonnccttiioonnnneerr llee ggeessttiioonnnnaaiirree vveessaaffbb ??

  Il vous faudra recompiler le noyau. <!- autant que ce soit clair.
  G.A.--> A supposer que vous utilisiez menuconfig, vous devrez passer
  par les tapes suivantes :

  Dans le menu "Console drivers" :

    VGA Text Console

    Video Selection Support

    Support for frame buffer devices (experimental)

    VESA VGA Graphic console

    Advanced Low Level Drivers

    Choisissez les gestionnaires Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp
     et 32bpp
    VGA character/attributes support

  Si votre processeur (de type x86) supporte le MTRR, activez le. Il
  permet d'acclrer les copies entre la mmoire systme et la carte
  graphique. Vous pouvez naturellement le mettre en marche une fois la
  console oprationnelle.  _I_M_P_O_R_T_A_N_T _: _p_o_u_r _l_e_s _n_o_y_a_u_x _2_._1_._x_, _a_c_t_i_v_e_z _l_e
  _c_h_o_i_x _d_e_s _f_o_n_c_t_i_o_n_n_a_l_i_t__s _e_x_p__r_i_m_e_n_t_a_l_e_s _v_i_a _l_e _m_e_n_u _`_`_C_o_d_e _M_a_t_u_r_i_t_y
  _L_e_v_e_l_'_'_. _C_e_c_i _e_s_t _i_n_u_t_i_l_e _p_o_u_r _l_e_s _n_o_y_a_u_x _2_._2_._x_.

    Prompt for development and/or incomplete code/drivers

  Le support des composants VGA (en mode texte) - vgafb - appartenait 
  la liste ci-dessus mais il en a t supprim en raison de son
  obsolescence. Il disparatra sous peu. Slectionnez plutt "VGA Text
  Console".

  Vrifiez bien que le support "Mac variable bpp packed pixel" n'est pas
  activ.  [En 2.1.111/112, il semblerait qu'il le soit si "Advanced Low
  Level Drivers" l'est. Ce n'est plus le cas en 2.1.113] Les fontes
  peuvent galement tre stockes en mmoire mais rien n'y oblige et
  l'emploi de setfont du paquetage kbd-0.99 reste possible pour charger
  les fontes adquates (reportez vous  la section relative aux fontes).

  Assurez vous que rien n'est modularis. [J'ai des doutes quant aux
  possibilits de modularisation de l'ensemble - corrections bienvenues]

  Vous devrez ensuite crer les priphriques associs au gestionnaire
  de mmoire vido dans le rpertoire /dev. Pour le premier, il vous
  suffit de taper

  ______________________________________________________________________
  # mknod /dev/fb0 c 29 0
  ______________________________________________________________________


  Les suivants doivent tre multiples de 32, soit, pour /dev/fb1 :

  ______________________________________________________________________
  # mknod /dev/fb1 c 29 32
  ______________________________________________________________________


  et ainsi de suite jusqu'au huitime si vous le souhaitez :

  ______________________________________________________________________
  # mknod /dev/fb7 c 29 224
  ______________________________________________________________________


  Recompilez votre noyau, modifiez l'/etc/lilo.conf de faon  ajouter
  le paramtre VGA=ASK, lancez lilo. Ceci vous permettra de choisir le
  mode graphique que vous voulez.

  Voici mon lilo.conf personnel :

  # LILO configuration file
  boot = /dev/hda3
  delay = 30
  prompt
  vga = ASK # L'utilisateur devra entrer le mode
  image = /vmlinuz
    root = /dev/hda3
    label = Linux
    read-only # Les systemes de fichiers autres que UMSDOS doivent etre montes
              # en lecture seule pour la phase de verification

  Redmarrez le noyau et essayez comme test d'entrer 0301 au prompt VGA.
  Vous devriez vous retrouver en 640x480 sur 256 couleurs avec un
  dlicieux petit logo de ping^H^H^H^Hmanchot.

  A l'invite LILO, vous DEVEZ fournir un chiffre sous la forme d'un
  ``0'' suivi de 3 digits sans ``x'' hexadcimal. Si LILO fournit
  directement l'argument au noyau, ceci n'est pas ncessaire.

  Une fois que tout marche convenablement, vous pouvez explorer les
  diffrents modes (voir plus bas) et une fois choisi celui qui vous
  convient, il sera temps de le fixer via le paramtre ``VGA=x'' du
  fichier de configuration de lilo. La table plus bas vous fournira le
  nombre correspondant au mode. Par exemple, pour du 1280x1024 en 256
  couleurs, vous emploierez ``VGA=0x307'' et relancerez lilo. Le reste
  se trouve dans les HOWTO relatifs  lilo et  loadlin.

  _N_O_T_E _! vesafb n'active pas automatiquement le dfilement vers
  l'arrire.  Vous devez le prciser au noyau : video=vesa:ypan ou
  video=vesa:ywrap.  Les deux font la mme chose mais de faon un peu
  diffrente. ywrap est bien plus rapide qu'ypan mais risque de ne pas
  fonctionner sur des cartes VESA 2.0 ne respectant pas tout  fait les
  spcifications. L'option n'est disponible qu' partir du noyau
  2.1.116. Les noyaux prcdents ne permettent pas le dfilement vers
  l'arrire.


  55..  DDee qquueellss mmooddeess VVEESSAA ppuuiiss--jjee mmee sseerrvviirr ??

  Cela dpend de votre carte graphique,  en particulier de la quantit
  de mmoire dont elle dispose. A vous de voir quels sont les modes qui
  fonctionnent le mieux.

  La table suivante fournit les numros des modes que vous pouvez passer
   l'invite VGA (en fait les indices se sont vus ajouter 0x200 afin de
  s'y retrouver plus facilement dans la table).


  <!-- la table d'origine est decalee d'une colonne : en fait les modes
  0x300 et 0x301 representent le meme: 640x480, 8 bits-->
  Couleurs |   640x480   800x600 1024x768 1280x1024 1600x1200
  ---------+-------------------------------------------------
   4 bits  |       ?      0x302      ?        ?         ?
   8 bits  |0x300/0x301   0x303    0x305    0x307     0x31C
  15 bits  |      0x310   0x313    0x316    0x319     0x31D
  16 bits  |      0x311   0x314    0x317    0x31A     0x31E
  24 bits  |      0x312   0x315    0x318    0x31B     0x31F
  32 bits  |       ?        ?        ?        ?         ?


  8 bits = 256 couleurs, 15 bits = 32768 couleurs, 16 bits = 65536
  couleurs, 24 bits = 16,8 millions de couleurs, 32 bits : la mme chose
  qu'en 24 bits mais les 8 bits restant peuvent servir  diverses fins
  et l'ensemble s'adapte parfaitement aux bus 32 bits PCI/VLB/EISA.  Les
  modes supplmentaires sont  la discrtion du fabricant puisque la
  spcification VESA 2.0 s'arrte au mode 0x31f. Il vous faudra srement
  ttonner pour les trouver.


  55..11..  UUttiilliissaattiioonn ddeess ccaarrtteess ggrraapphhiiqquueess MMaattrrooxx

  Si vous disposez d'une carte Matrox, vous emploierez le pilote
  matroxfb au lieu de vesafb. Matroxfb gre les Mystique Millenium I, II
  ainsi que les G100 et G200. Il permet aussi d'avoir plusieurs cartes
  dans la mme machine.  La configuration d'une carte Matrox passe par
  les tapes suivantes :

  Mise  jour du BIOS Matrox que vous trouverez 
  <http://www.matrox.com/mgaweb/drivers/ftp_bios.htm>. Attention, vous
  aurez besoin du DOS pour procder  la mise  jour.

  Allez dans le menu ``Code Maturity Level'' et activez l'option
  suivante :

    Prompt for development and/or incomplete code/drivers

     [Ceci peut changer dans les futurs noyaux. Le HOWTO sera alors
     modifi]

  Dans le menu ``Console Drivers'', slectionnez :

    VGA Text Console

    Video Selection Support

    Support for frame buffer devices (experimental)

    Matrox Acceleration

    Suivant votre type de carte :

    Millennium I/II support

    Mystique support

    G100/G200 support

    Pour employer plusieurs cartes Matrox simultanment, activez
     l'option ``Multihead support''.

    Advanced Low Level Drivers

    Choisissez les pilotes Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp et
     ``32bpp packed pixel''.

  Recompilez votre noyau et modifiez le fichier /etc/lilo.conf.
  Inspirez vous du mien, vous irez plus vite.

  # Fichier de configuration de LILO
  boot = /dev/hda3
  delay = 30
  prompt
  vga = 792  # Ncessaire pour une rinitialisation dans un tat normal
  # Linux bootable partition config begins
  image = /vmlinuz
    append = "video=matrox:vesa:440" # On bascule sur le pilote Matroxfb
    root = /dev/hda3
    label = Linux
    read-only # Non-UMSDOS filesystems should be mounted read-only for checking



  Vous devrez ensuite crer les priphriques associs au gestionnaire
  de mmoire vido dans le rpertoire /dev. Pour le premier, il vous
  suffit de taper :

  ______________________________________________________________________
  # mknod /dev/fb0 c 29 0
  ______________________________________________________________________


  Les suivants doivent tre multiples de 32, soit, pour /dev/fb1 :

  ______________________________________________________________________
  # mknod /dev/fb1 c 29 32
  ______________________________________________________________________


  et ainsi de suite jusqu'au huitime si vous le souhaitez :

  ______________________________________________________________________
  # mknod /dev/fb7 c 29 224
  ______________________________________________________________________


  C'est tout ! Si l'un d'entre vous se sert simultanment de plusieurs
  cartes, qu'il me contacte aussi vite que possible afin que je docu
  mente davantage.


  55..22..  UUttiilliissaattiioonn ddeess ccaarrtteess ggrraapphhiiqquueess PPeerrmmeeddiiaa..

  Les cartes de type Permedia ne sont pas supportes par le pilote
  vesafb.  Heureusement, il existe un gestionnaire de mmoire vido
  spcifique aux cartes Permedia. En supposant que vous employez
  menuconfig pour paramtrer le noyau avant une compilation, excutez
  les instructions suivantes :

  Allez dans le menu ``Code Maturity Level'' et activez l'option
  suivante :

    Prompt for development and/or incomplete code/drivers

     [Ceci peut changer dans les futurs noyaux. Le HOWTO sera alors
     modifi]

  Dans le menu ``Console Drivers'', slectionnez :

    VGA Text Console

    Video Selection Support

    Support for frame buffer devices (experimental)

    Permedia2 support (experimental)

    Generic Permedia2 PCI board support

    Advanced Low Level Drivers

    Choisissez les pilotes Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp et
     ``32bpp packed pixel''.

    Si vous souhaitez incorporer les fontes, activez les options
     suivantes :

    Compiled-in fonts

    Sparc console 12x22 font

  Recompilez votre noyau et modifiez le fichier /etc/lilo.conf.
  Inspirez vous du mien pour aller plus vite.







  # Fichier de configuration de LILO
  boot = /dev/hda3
  delay = 30
  prompt
  vga = 792  # Ncessaire pour une rinitialisation dans un tat normal
  # Linux bootable partition config begins
  image = /vmlinuz
    append = "video=pm2fb:mode:1024x768-75,font:SUN12x22,ypan" # then switch to pm2fb
    root = /dev/hda3
    label = Linux
    read-only # Non-UMSDOS filesystems should be mounted read-only for checking



  La ligne ``pm2fb:mode:1024x768-75,font:SUN12x22,ypan'' indique que le
  pilote oprera dans une rsolution de 1024 par 768  75Hz avec les
  fontes SUN 12 par 22 (si vous les avez incluses). Ypan autorise le
  dfilement vers l'arrire.  Vous pouvez employer un autre mode.

  Vous devrez ensuite crer les priphriques associs au gestionnaire
  de mmoire vido dans le rpertoire /dev. Pour le premier, il vous
  suffit de taper

  ______________________________________________________________________
  # mknod /dev/fb0 c 29 0
  ______________________________________________________________________


  Les suivants doivent tre multiples de 32, soit, pour /dev/fb1 :

  ______________________________________________________________________
  # mknod /dev/fb1 c 29 32
  ______________________________________________________________________


  et ainsi de suite jusqu'au huitime si vous le souhaitez :

  ______________________________________________________________________
  # mknod /dev/fb7 c 29 224
  ______________________________________________________________________



  Pour davantage de renseignements concernant les fonctionnalits du
  pilote Permedia, consultez
  <http://www.cs.unibo.it/~nardinoc/pm2fb/index.html>.

  video=pm2fb:[option[,option[,option...]]]

  o vous disposez des options suivantes :

    off pour dsactiver le pilote.

    mode:resolution pour fixer la rsolution. Les modes proviennent du
     fichier fb.modes.ATI contenu dans le paquetage logiciel pbset de
     Geert Uytterhoeven. Tous les modes sont en 8 bits par pixel. Voici
     ceux disponibles :

    640x480-(60,72,75,90,100)

    800x600-(56,60,70,72,75,90,100)

    1024x768-(60,70,72,75,90,100,illo) illo=80KHz 100Hz

    1152x864-(60,70,75,80)

    1280x1024-(60,70,74,75)

    1600x1200-(60,66,76)

    Par dfaut, la console fonctionne en 640 par 480  60 Hz.

    font:fontname pour fixer la fonte. Par exemple : font:SUN12x22.

    ypan offre une taille virtuelle dans le sens vertical aussi
     importante que la mmoire vido l'autorise.

    oldmem ne servira qu'aux propritaires d'une CybervisionPPC.
     Ajoutez cette option si votre carte est munie de SGRAM Fujitsu, ce
     qui est le cas des CyberVisionPPC antrieures au 30/12/1999.

    virtual (transitoire) est  employer si le noyau fixe lui-mme les
     adresses d'accs sur les bus PCI.


  55..33..  UUttiilliissaattiioonn ddeess ccaarrtteess ggrraapphhiiqquueess AATTII

  Remarque : les informations qui suivent ne viennent pas de moi vu que
  je ne dispose pas d'une carte ATI pour les vrifier. Si je me trompe,
  n'hsitez pas  me corriger,  m'insulter ou  m'envoyer votre carte !
  8-)

  Les cartes ATI sont plus ou moins bien gres par le pilote vesafb
  selon leur qualit intrinsque. Heureusement, il existe un
  gestionnaire de mmoire vido spcifique aux cartes ATI. En supposant
  que vous employez menuconfig pour paramtrer le noyau avant une
  compilation, excutez les instructions suivantes :

  Allez dans le menu ``Code Maturity Level'' et activez l'option
  suivante :

    Prompt for development and/or incomplete code/drivers

     [ceci peut changer dans les futurs noyaux. Ce HOWTO sera alors
     modifi]

  Dans le menu ``Console Drivers'', slectionnez :

    VGA Text Console

    Video Selection Support

    Support for frame buffer devices (experimental)

    ATI Mach64 display support

    Advanced Low Level Drivers

    Choisissez les pilotes Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp et
     ``32bpp packed pixel''.

    Si vous souhaitez incorporer les fontes, activez les options
     suivantes :

    Compiled-in fonts

    Sparc console 12x22 font

  Recompilez votre noyau et modifiez le fichier /etc/lilo.conf.
  Inspirez vous du mien, ce sera le plus rapide.


  # Fichier de configuration de LILO
  boot = /dev/hda3
  delay = 30
  prompt
  vga = 792  # Ncessaire pour une rinitialisation dans un tat normal
  # Linux bootable partition config begins
  image = /vmlinuz
    append = "video=atyfb:1024x768,font:SUN12x22"
    root = /dev/hda3
    label = Linux
    read-only # Non-UMSDOS filesystems should be mounted read-only for checking



  La ligne ``atyfb:mode:1024x768,font:SUN12x22'' indique que le pilote
  oprera dans une rsolution de 1024 par 768.

  Vous devrez ensuite crer les priphriques associs au gestionnaire
  de mmoire vido dans le rpertoire /dev. Pour le premier, il vous
  suffit de taper :

  ______________________________________________________________________
  # mknod /dev/fb0 c 29 0
  ______________________________________________________________________


  Les suivants doivent tre multiples de 32, soit, pour /dev/fb1 :

  ______________________________________________________________________
  # mknod /dev/fb1 c 29 32
  ______________________________________________________________________


  et ainsi de suite jusqu'au huitime si vous le souhaitez :

  ______________________________________________________________________
  # mknod /dev/fb7 c 29 224
  ______________________________________________________________________



  video=atyfb:[option[,option[,option...]]]

  o vous disposez des options suivantes :

    font:STRING pour fixer la fonte. Par exemple : font:SUN12x22

    noblink dsactive l'extinction de l'cran

    noaccel dsactive les routines d'acclration

    vram:ULONG prcise au pilote atyfb la quantit de mmoire vido
     disponible

    pll:ULONG ?

    mclk:ULONG ?

    vmode:ULONG ?

    cmode:ULONG - fixe le nombre de bits par pixel : 0, 8, 15, 16, 24
     ou 32




  55..44..  QQuueelllleess ccaarrtteess ggrraapphhiiqquueess ssee ccoonnffoorrmmeenntt aauuxx ssppcciiffiiccaattiioonnss VVEESSAA
  22..00 ??

  Voici une liste de cartes qui fonctionnent avec vesafb:

    ATI PCI VideoExpression 2MB (au maximum 1280 par 1024 en 8bit)

    ATI PCI All-in-Wonder

    Matrox Millennium PCI - BIOS v3.0

    Matrox Millennium II PCI - BIOS v1.5

    Matrox Millennium II AGP - BIOS v1.4

    Matrox Millennium G200 AGP - BIOS v1.3

    Matrox Mystique & Mystique 220 PCI - BIOS v1.8

    Matrox Mystique G200 AGP - BIOS v1.3

    Matrox Productiva G100 AGP - BIOS v1.4

    Toutes les cartes  base de Riva 128

    Diamond Viper V330 PCI 4MB

    Genoa Phantom 3D/S3 ViRGE/DX

    Hercules Stingray 128/3D avec une sortie pour la tlvision

    Hercules Stingray 128/3D sans sortie pour la tlvision - une mise
      jour du BIOS est ncessaire (contactez support@hercules.com)

    SiS 6326 PCI/AGP 4MB

    STB Lightspeed 128 ( base de Nvida Riva 128) PCI

    STB Velocity 128 ( base de Nvida Riva 128) PCI

    Jaton Video-58P ET6000 PCI 2MB-4MB (au maximum 1600 par 1200 en
     8bit)

  Une liste de cartes mres incluant un jeu de composants graphiques :

    Trident Cyber9397

    SiS 5598

  Les cartes qui ne fonctionnent pas :

    TBA


  55..55..  VVeessaaffbb eesstt--iill mmoodduullaarriissaabbllee ??


  A ma connaissance, Vesafb ne peut pas tre modularis. Les
  dveloppeurs de vesafb s'y attleront peut-tre un jour. De toute
  faon, si le pilote est modularis, vous ne disposerez d'aucun
  affichage  l'cran tant que le module vesafb n'aura pas t modprob.
  Il vaut srement mieux le laisser dans le noyau, des fois que le
  dmarrage se passe mal.



  55..66..  CCoommmmeenntt ppuuiiss--jjee mmooddiiffiieerr llee ccuurrsseeuurr ??

  [Tir du fichier VGA-softcursor.txt - merci  Martin Mares !]

  Linux offre une certaine latitude pour modifier l'allure du curseur.
  En principe, vous pouvez fixer la taille de celui-ci et, par la mme
  occasion, contourner quelques problmes matriels de cartes Trident
  dfectueuses (cf. #define TRIDENT_GLITCH dans le fichier
  drivers/char/vga.c). Si vous activez l'option de gnration logicielle
  du curseur ("Software generated cursor"), des nouveauts se
  prsentent : un curseur rouge, un qui intervertisse la couleur de
  premier plan et celle du fond, une mise en relief du caractre actif
  qui laisse le curseur matriel visible ou non. Je n'ai srement pas
  pens  tout.

  On contrle l'allure du curseur via la squence d'chappement

  <ESC>[?1;2;3c


  dcrire  prsent. Les paramtres absents prennent la valeur 0.

  Le premier paramtre correspond  la taille du curseur (0=dfaut,
  1=transparent, 2=soulign, ..., 8=caractre plein). Ajoutez 16 pour
  rendre actif le curseur logiciel, 32 si la couleur de fond doit tre
  systmatiquement change, 64 pour que les couleurs de premier plan et
  de fond soient distinctes.  La graisse est ignore pour les deux
  derniers attributs.

  Le second paramtre indique quels sont les bits d'attributs  changer
  (un simple ou exclusif). Sur un cran VGA standard, les quatre bits de
  poids fort prcisent le fond et les quatre de poids faible le premier
  plan. Dans chaque quartet, les trois bits de poids faible donnent la
  couleur et celui de poids fort active la mise en relief (ou active le
  clignotement suivant la configuration de la carte VGA).

  Le troisime paramtre correspond aux valeurs que doivent prendre les
  bits que l'on souhaite modifier. Le positionnement d'un bit a lieu
  avant son masquage ; on force donc  0 un bit en l'activant  la fois
  dans le masque de slection et dans celui de positionnement.

  Un curseur qui souligne et clignote : echo -e '\033[?2c' Un bloc qui
  clignote :                echo -e '\033[?6c' Un bloc rouge qui ne
  clignote pas :   echo -e '\033[?17;0;64c'


  66..  LLee ppiilloottee ddee mmmmooiirree vviiddoo ssuurr lleess AAttaarrii mm6688kk

  Cette partie dcrit les options offertes par le pilote de mmoire
  vido sur les machines Atari m68k.


  66..11..  QQuueellss ssoonntt lleess mmooddeess ddiissppoonniibblleess ssuurr lleess mmaacchhiinneess AAttaarrii mm6688kk ??


  Couleurs   320x200  320x480  640x200  640x400  640x480  896x608  1280x960
  ---------+---------------------------------------------------------------
   1 bit   |                            sthigh   vga2     falh2    tthigh
   2 bits  |                   stmid             vga4
   4 bits  | stlow                             ttmid/vga16 falh16
   8 bits  |          ttlow                      vga256



  ttlow, ttmid et tthigh sont seulement employs sur les modles TT
  tandis que vga2, vga4, vga15, vga256, falh3 et falh16 ne servent que
  sur le Falcon.  Lorsqu'une option video=xxx est donne au noyau, en
  l'absence toute sous-option, le noyau teste les modes vido dans
  l'ordre suivant jusqu' ce qu'il en trouve un adapt au matriel :

    ttmid

    tthigh

    vga16

    sthigh

    stmid

     Vous pouvez prciser le mode  employer pour viter l'auto-
     dtection.  Par exemple, video=vga16 procure un cran en 640 par
     480 avec une profondeur de 4 bits.


  66..22..  SSoouuss--ooppttiioonnss ssuuppppllmmeennttaaiirreess ssuurr lleess mmaacchhiinneess AAttaarrii mm6688kk

  Options supplmentaires disponibles avec le paramtre video=xxx :

    inverse - inversion des couleur de fond et de premier plan.
     Normalement le fond est noir ; cette option le rend blanc.

    font - fonte  employer en mode texte. Les fontes suivantes sont
     actuellement disponibles : VGA8x8, VGA8x16, PEARL8x8.  La fonte
     VGA8x8 est utilise par dfaut si la dimension verticale de l'cran
     est infrieure  400 pixels sans quoi la fonte VGA8x16 est
     employe.

    internal - trs intressant. Se reporter  la section suivante.

    external - idem.

    monitorcap - description des modes multisync disponibles.  PROSCRIT
     pour les moniteurs  frquence fixe.


  66..33..  SSoouuss--ooppttiioonn ""iinntteerrnnaall"" ssuurr lleess mmaacchhiinneess AAttaarrii mm6688kk

  Syntaxe : internal:(xres);(yres)[;(xres_max);(yres_max);(offset)]

  L'option indique les fonctionnalits ajoutes par certains
  priphriques vido tels les modes d'OverScan. (xres) et (yres)
  fournissent les dimensions tendues de l'cran.  Si vos modes
  d'OverScan ncessitent une bordure noire, vous devrez expliciter les
  trois derniers arguments de la sous-option internal:.  (xres_max)
  correspond  la plus grande dimension de ligne accepte par le
  matriel tandis que (yres_max) donne le nombre maximal de lignes et
  (offset) le dcalage en octets entre la partie visible de la mmoire
  vido et son emplacement physique.

  Les matriel vido tendu requiert souvent une activation qui fait
  appel aux options "switches=*". [L'auteur apprcierait de recevoir des
  informations supplmentaires  ce sujet. La documentation m68k du
  noyau manque de clart sur ce sujet et l'auteur ne possde pas
  d'Atari ! Des exemples seront galement les bienvenus.]


  66..44..  SSoouuss--ooppttiioonn ""eexxtteerrnnaall"" ssuurr lleess mmaacchhiinneess AAttaarrii mm6688kk

  Syntaxe :
  external:(xres);(yres);(depth);(org);(scrmem)[;(scrlen)[;(vgabase)[;(colw)[;(coltype)[;(xres_virtual)]]]]]

  On rentre dans le compliqu. Le prsent document essaye d'tre aussi
  clair que possible mais l'auteur n'a rien contre une relecture afin
  d'tre sr qu'il n'a rien loos^H^Hup.

  Cette sous-option indique que vous disposez de priphriques vido
  externes (vraisemblablement une carte vido) et indique comment Linux
  doit l'employer.  Normalement, le noyau se limite  ce qu'il peut
  apprendre des priphriques vido internes. Vous devez donc lui
  fournir tous les paramtres ncessaires afin qu'il soit en mesure de
  grer des priphriques externes. Il y a deux limitations : vous
  basculerez dans le mode adquat avant l'initialisation et une fois
  celle-ci effectue, vous ne pourrez pas changer de mode.

  Les trois premiers paramtres sont vidents. Ils correspondent aux
  dimensions de la zone d'affichage : hauteur et largeur en pixel
  suivies de la profondeur.  Le paramtre de profondeur servant
  d'exposant au nombre 2 donne le nombre de couleurs. Par exemple, pour
  un affichage en 256 couleurs, vous prciserez un paramtre de 8. Le
  paramtre dpend de l'adaptateur graphique externe bien que vous soyez
  de toute faon limit par le matriel.

  Vous devez ensuite dcrire au noyau l'organisation de la mmoire vido
  via le paramtre (org).

    n - plans disposs normalement, les uns  la suite des autres.

    i - plans entrelacs, c'est  dire 16 bits du premier plan, puis du
     suivant etc. Seuls les modes vido natifs d'Atari utilisent a et
     aucune carte vido ne le gre.

    p - pixels regroups. Les bits constitutifs des diffrents plans
     d'un mme pixel se suivent. Ce mode est le plus courant en 256
     couleurs.

    t - couleurs vraies. Il s'agit du mode prcdent en l'absence de
     toute table de correspondance des couleurs. Ces modes sont
     gnralement sur 24 bits et procurent quelque 16,8 millions de
     couleurs.

  _A _c_o_t_ _d_e __a, le paramtre (org) a une signification bien diffrente
  pour les modes monochromes.

    n - couleurs usuelles, c'est  dire 0 pour le blanc et 1 pour le
     noir ;

    i - couleurs inverses, c'est  dire 0 pour le noir et 1 pour le
     blanc.

  L'lment suivant ayant trait au priphrique vido fixe l'adresse de
  base de la mmoire vido. Il est donn par le paramtre (scrmem) sous
  forme hexadcimale (prfix par 0x). Vous devriez trouver cette
  information dans la documentation fournie avec le priphrique.

  Le paramtre suivant, (scrlen), fournit au noyau la taille de la zone
  de mmoire vido. S'il est absent, il est calcul  partir des valeurs
  de (xres), (yres) et (depth). En bref, il ne sert  rien de prciser
  une valeur. Si vous donnez  sa suite le paramtre (vgabase), laissez
  le champ vide en rentrant deux point-virgules. Autrement, oubliez le.

  Le paramtre (vgabase) est optionnel. En son absence, le noyau ne
  pourra lire ni crire le moindre des registres de couleur du
  priphrique et il vous faudra donc installer les couleurs appropries
  avant le dmarrage de Linux.  Si la carte est compatible VGA, vous
  pouvez donner au noyau l'adresse o se trouvent les registres vido de
  faon  ce qu'il modifie lui-mme les tables des couleurs. Vous
  trouverez cette information dans la documentation fournie avec le
  priphrique. Afin d'tre _c_l_a_i_r, (vgabase) est une adresse de _b_a_s_e,
  donc aligne sur un multiple de 4k. Pour l'accs en lecture ou en
  criture aux registres, le noyau utilise une plage d'adresses
  comprises entre (vgabase) + 0x3c7 et  (vgabase) + 0x3c9. La valeur est
  donne en hexadcimal et doit tre prfixe par 0x (tout comme
  (scrmem)).

  (colw) ne sert que si (vgabase) est spcifi. Il donne au noyau la
  taille des registres de couleur, c'est  dire le nombre de bits par
  couleur (rouge/verte/bleue). La valeur par dfaut est de 6 bits mais
  il est courant d'en spcifier 8.

  (coltype) s'emploie en conjonction avec (vgabase). Il prcise aux
  noyau le type des registres de la carte graphique. Actuellement, deux
  modles sont grs : vga et mv300. Par dfaut, vga est employ.

  (xres_virtual) n'est ncessaire qu'avec les cartes ProMST/ET4000 pour
  lesquelles la longueur physique des lignes diffre de leur taille
  visible.  Avec une ProMST, on donnera la valeur 2048 tandis que pour
  l'ET4000 cela dpendra de l'initialisation de la carte vido.


  77..  LLee ppiilloottee ddee mmmmooiirree vviiddoo aavveecc lleess AAmmiiggaa


  Cette partie dcrit les options offertes sur les Amiga, options
  voisines de celles de l'Atari m68k.


  77..11..  QQuueellss ssoonntt lleess mmooddeess ddiissppoonniibblleess ssuurr lleess mmaacchhiinneess AAmmiiggaa ??

  a dpend du composant employ dans votre Amiga. Il y en a
  essentiellement trois : OCS, ECS et AGA. Tous on recours au pilote de
  mmoire vido.

    Modes NTSC

    ntsc - 640x200

    ntsc-lace - 640x400

    PAL modes

    pal - 640x256

    pal-lace - 640x512

    Modes ECS - 2 bits de couleur avec les composants ECS, 8 bits avec
     les composants AGA

    multiscan - 640x480

    multiscan-lace - 640x960

    euro36 - 640x200

    euro36-lace - 640x400

    euro72 - 640x400

    euro72-lace - 640x800

    super72 - 800x300

    super72-lace - 800x600

    dblntsc - 640x200

    dblpal - 640x256

    dblntsc-ff - 640x400

    dblntsc-lace - 640x800

    dblpal-ff - 640x512

    dblpal-lace - 640x1024

    Modes VGA - 2 bits de couleur avec les composants ECS, 8 bits avec
     les composants AGA

    vga - 640x480

    vga70 - 640x400


  77..22..  SSoouuss ooppttiioonnss ssuuppppllmmeennttaaiirreess ssuurr lleess mmaacchhiinneess AAmmiiggaa mm6688kk

  Elles sont voisines de celles de l'Atari m68k :

    depth - prcise le nombre de bits par pixel.

    inverse - mme chose que sur les Atari.

    font - mme chose que sur les Atari, mais la fonte PEARL8x8
     remplace la fonte VGA8x8 si la largeur de la zone d'affichage est
     infrieure  400 pixels.

    monitorcap - description des modes multisync disponibles. PROSCRIT
     pour les moniteurs  frquence fixe.


  77..33..  CCaarrtteess dd''eexxtteennssiioonn ggrraapphhiiqquueess ggrreess ssuurr AAmmiiggaa


    Phase5 CyberVision 64 (composant S3 Trio64)

    Phase5 CyverVision 64-3D (composant S3 ViRGE)

    MacroSystems RetinaZ3 (composant NCR 77C32BLT)

    Helfrich Piccolo, SD64, GVP ECS Spectrum, Village Tronic Picasso
     IIII+ and IV/ (Cirrus Logic GD542x/543x)


  88..  LLee ppiilloottee ddee mmmmooiirree vviiddoo ssuurr lleess MMaacciinnttoosshh mm6688kk

  La version courante du gestionnaire de mmoire vido ne gre que les
  modes choisis sous MacOS avant l'initialisation de Linux ainsi que les
  modes couleur en 1, 2, 4 et 8 bits.

  Le pilote gre les options de la forme :

  video=macfb:<font>:<inverse>


  Les fontes  VGA8x8, VGA8x16, 6x11, etc... sont disponibles. L'option
  inverse permet bien sr d'inverser la vido.




  99..  LLee ppiilloottee ddee mmmmooiirree vviiddoo ssuurr lleess PPoowweerrPPCC

  L'auteur aimerait recevoir des informations relatives au gestionnaire
  de mmoire vido sur ces machines.


  1100..  LLee ppiilloottee ddee mmmmooiirree vviiddoo ssuurr lleess AAllpphhaa

  1100..11..  MMooddeess ddiissppoonniibblleess


  Pour l'instant il n'y a que la carte PCI TGA. Elle offre un mode de 80
  lignes par 30 colonnes en 640x480 avec une profondeur de 8, 24 ou 32
  bits.


  1100..22..  CCaarrtteess ggrraapphhiiqquueess ggrreess ppaarr llee ppiilloottee ddee mmmmooiirree vviiddoo

  La carte graphique suivante a t teste avec succs :

    DEC TGA PCI (DEC21030) - 640x480  8 bits ou versions 24/32 bits


  1111..  LLee ppiilloottee ddee mmmmooiirree vviiddoo ssuurr lleess SSPPAARRCC

  1111..11..  CCaarrtteess ggrraapphhiiqquueess ggrreess ppaarr llee ppiilloottee ddee mmmmooiirree vviiddoo


    MG1/MG2 - version SBus ou intgre (Sun3) - au maximum 1600x1280
     monochrome (BWtwo)

    CGthree - semblable aux MG1/MG2 mais offrant la couleur -
     rsolution maximale ?

    GX - SBus - au maximum 1152x900 en 8bits (CGsix)

    TurboGX - SBus - au maximum 1152x900 en 8 bits (CGsix)

    SX - SS10/SS20 - au maximum 1280x1024 en 24 bits - (CGfourteen)

    ZX(TZX) - SBus - carte acclratrice 3D 24 bits - rsolution
     maximale ?  (Leo)

    TCX - AFX - Sparc 4 - au maximum 1280x1024 en 8 bits

    TCX(S24) - AFX - Sparc 5 - au maximum 1152x900 en 24 bits

    Creator - SBus - au maximum 1280x1024 en 24 bits (FFB)

    Creator3D - SBus - au maximum 1920x1200 en 24 bits (FFB)

    ATI Mach64 - carte acclratrice 8/24 bits pour Sparc64 sur bus PCI

  Une option de la PROM permet l'envoi des caractres d'affichage 
  l'cran ou sur une console srie.  Jetez un oeil  la FAQ du Frame
  Buffer sur Sparc : <http://c3-a.snvl1.sfba.home.com/Framebuffer.html>.


  1111..22..  CCoonnffiigguurraattiioonn dduu ggeessttiioonnnnaaiirree ddee mmmmooiirree vviiddoo


  Pendant la configuration du noyau (make config ou autre), il vous faut
  choisir entre promcon ou fbcon. La compilation des deux est possible
  mais il faudra spcifier au noyau le pilote  employer. Par dfaut,
  fbcon est essay en premier au dmarrage. Si promcon n'a pas t
  slectionn, dummycon est activ pendant l'initialisation. Une fois
  les bus initialiss, si fbcon est compil, le noyau recherche les
  priphriques prcdents et se sert de fbcon. En l'absence de
  gestionnaires de mmoire vido, le noyau a recours  promcon.

  Voici les options du noyau :

  video=sbus:options


  options inclut les lments suivants, spars par une virgule :

                  nomargins       marge nulle;
                  margins=12x24   marge de 12 par 24 (calcul par dfaut en
                  fonction de la rsolution);
                  off             inhibition de la dtection des pilotes de
                  mmoire vido SBus/UPA;
                  font=SUN12x22   emploi d'une fonte particulire.



  Au dmarrage, un paramtrage de la forme

   video=sbus:nomargins,font=SUN12x22


  en mode texte, rapide, avec une rsolution de 96 par 40 qui ressemble
   une console Solaris avec la couleur et les terminaux virtuels en
  plus comme sur les compatibles PC.

  Pour que l'affichage se fasse avec la fonte SUN12x22, vous devez
  l'activer durant la configuration du noyau (dsactivez l'option
  fontwidth != 8).  Le pilote de mmoire vido acclr gre n'importe
  quelle fonte dont la largeur est comprise entre 1 et 16 pixels tandis
  que le pilote de base ne gre que les fontes larges de 4, 8, 12 ou 16
  pixels.  Un paquetage rcent des consoletools est recommand.


  1122..  LLee ppiilloottee ddee mmmmooiirree vviiddoo ssuurr lleess MMIIPPSS


  Il n'est pas besoin de modifier quoi que ce soit avec ce type de
  machines.  Tout est gr automatiquement. En particulier, les Indys
  sont cbls de faon  offrir une console 160x64. Une rcriture du
  code de gestion de la console pour les Indys tant en cours, on
  gardera un oeil sur cette section.


  1133..  LLee ppiilloottee ddee mmmmooiirree vviiddoo ssuurr lleess AARRMM



  1133..11..  NNeettwwiinnddeerrss

  Pour les Netwinders (qui reposent sur le processeur RISC ARM SA110 au
  charme si dlicieusement british), il existe deux versions du
  gestionnaire de mmoire vido pour les Cyber2000 : un pour les noyaux
  2.0.x, l'autre pour les 2.2.y.  Tant l'activation que l'emploi du
  pilote sont assez naturels avec les deux branches du noyau. Nanmoins,
  en 2.0.x, la rsolution et la profondeur sont codes en dur (beuh...).
  Heureusement, la version 2.2.x est plus souple, du moins le sera une
  fois les pilotes davantage stabiliss. Le mieux que vous puissiez
  faire afin que tout fonctionne reste encore de lire la documentation
  fournie avec la portion ARM des sources du noyau.  Les Netwinders
  intgrent un composant VGA mais il ne s'est malheureusement jusqu'ici
  trouv personne pour porter vgafb. [Je m'y attlerais si quelqu'un me
  fournissait un Netwinder avec lequel jouer]
  1133..22..  AArrcchhiimmeeddeess AAccoorrnn

  Les Acorns offrent un pilote de mmoire vido depuis les temps anciens
  des noyaux 1.9.x. Cependant, le gestionnaire Acornfb des noyaux 2.2.x
  est compltement nouveau puisque l'interface d'accs  la mmoire
  vido a t modifie au cours du dveloppement des noyaux 2.1.x (qui
  devinrent naturellement les 2.2.x). Comme prcdemment, il n'est gure
  difficile d'activer le pilote et de configurer la profondeur et la
  rsolution.


  1133..33..  AAuuttrreess aarrcchhiitteeccttuurreess  bbaassee dd''AARRMM ((SSAA 77111100ss eett vvaarriiaanntteess))

  A ma surprise, mme le Psion 5 et le Geofox disposent d'un pilote de
  mmoire vido ! On m'a dit que le manchot passait d'ailleurs plutt
  bien. S'il vous plat, donnez moi un Psion 5 !


  1144..  GGeessttiioonn ddee llaa mmmmooiirree vviiddoo aavveecc pplluussiieeuurrss ccrraannss

  Cette partie du document a t fournie gracieusement par Frederick A.
  Niles qui conserve tous ses droits sur les informations donnes.


  1144..11..  IInnttrroodduuccttiioonn

  Les quelques pages qui suivent sont censes permettre une premire
  prise en main des configurations  deux crans sous Linux. Bien que le
  processus se droule naturellement, les occasions de se tromper ne
  manquent pas.

  Je me suis focalis sur la mise en place d'un serveur X sur un second
  moniteur. L'intrt en est que l'on croise de temps  autre des
  personnes se dbarrassant de vieux moniteurs de 19 ou 20 pouces 
  frquence fixe car ils ne peuvent plus s'en servir. On peut ainsi
  dmarrer avec un petit moniteur multisync et disposer de X sur un
  moniteur de grandes dimensions.

  Comme il s'agit d'un domaine en plein dveloppement, l'information
  volue rapidement. Le contenu de ce document pourrait trs bien tre
  dpass, voire compltement faux, lorsque vous le lirez.

  ** ATTENTION ** Ce texte a t rdig avant la sortie de la version
  4.0 de XFree86 qui devrait modifier pas mal de choses. Essayez
  d'obtenir une nouvelle version de ce document si elle existe.


  1144..22..  RReettoouurr

  Le retour de la part des utilisateurs sera plus que certainement le
  bienvenu.  Sans vos remarques et vos questions, ce document
  n'existerait pas. N'hsitez donc pas  me contacter  l'adresse
  suivante : Frederick.A.Niles@gsfc.nasa.gov.


  1144..33..  CCoonnttrriibbuuttiioonnss

  Les personnes suivantes ont particip  l'laboration de ce
  Mini-HOWTO :

    Petr Vandrovec vandrove@vc.cvut.cz

    Andreas Ehliar ehliar@lysator.liu.se (x2x)

    Marco Bizzarri m.bizzarri@icube.it (multiple X servers)

  1144..44..  AAvveerrttiisssseemmeennttss

  L'auteur de ce document dgage toute responsabilit quant  son
  contenu.  Vous employez les notions, exemples et tout ce qui figure
  ici  vos risques et prils. S'agissant d'une nouvelle version de ce
  document, des informations errones ou inadquates peuvent trs bien
  entraner la dgradation de votre matriel. Faites y attention et,
  bien que ce soit hautement improbable, je me dcharge de toute
  responsabilit  cet gard.


  1144..55..  PPrroopprriitt dduu ddooccuummeenntt

  Copyright (c) 1999 Frederick Niles

  La distribution de ce document doit se conformer aux termes de la
  licence LDP tels que dfinis  l'adresse :
  <http://sunsite.unc.edu/LDP/COPYRIGHT.html>.



  1144..66..  MMaattrriieell ssuuppppoorrtt

  La plupart des cartes vido supposent qu'elles assument seules cette
  fonction au sein du systme. Elles occupent donc en permanence
  l'espace d'adressage de l'adaptateur graphique primaire. Il existe
  quelques exceptions :

    les cartes Matrox : Matrox Millennium, Matrox Millennium II, Matrox
     Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox
     Mystique G200, Matrox Millennium G200, Matrox Marvel G200.

    MDA : il s'agit essentiellement des cartes graphiques monochromes
     Hercules. videmment, on ne dispose que du mode texte.

     Remarque : seul le second adaptateur graphique doit figurer dans la
     liste prcdente.


  1144..77..  LLooggiicciieellss ccoommmmeerrcciiaauuxx

  Ce Mini-HOWTO traite avant tout de logiciel libre. Certains serveurs X
  commerciaux sont nanmoins capables de grer plusieurs moniteurs tels
  le serveur Metro-X de Metro Link (www.metrolink.com) et Accelerated-X
  de Xi Graphics (www.xig.com).


  1144..88..  LLooggiicciieellss nncceessssaaiirreess

  Les patches et programmes suivants sont ncessaires :

    "fbset", examinez :  <http://www.cs.kuleuven.ac.be/~geert/bin/>
     (remarque : ce programme est fourni avec la RedHat 6.0)

    patches du noyau pour la configuration  deux crans "fbaddon" des
     cartes Matrox. Examinez :
     <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>

    "con2fb", examinez :  <ftp://platan.vc.cvut.cz/pub/linux/matrox-
     latest/>

    serveur X11 XF86_FBDev employant le gestionnaire de mmoire vido.
     Disponible en standard avec la version 3.3.1 de la XFree86.



  1144..99..  MMiissee eenn rroouuttee

  Commencez par patcher votre version du noyau avec le patche "fbaddon".
  Ensuite, vous configurerez le noyau et activerez la gestion de la
  mmoire vido. Si vous disposez de cartes Matrox, incluez le pilote
  d'acclration unifi Matrox. Excluez le gestionnaire de mmoire vido
  VESA. Activez bien sr la gestion de plusieurs adaptateurs, recompilez
  le noyau et rinitialisez le systme.

  A prsent, installez l'utilitaire "fbset" et lisez attentivement la
  documentation relative  son paramtrage. La mise en place d'un
  fichier "/etc/fb.modes" est vivement recommande une fois que vous
  vous serez dcid sur une configuration. Le paquetage fbset comprend
  un script Perl de conversion du fichier XF86Config en paramtres pour
  fb.modes. Vous trouverez mon script en shell Bourne dans les annexes A
  et B.

  Vous devez vous mettre au point sur l'emploi du pilote de mmoire
  vido avec un seul adaptateur et bien identifier tout ce qui n'a rien
   voir avec la gestion de plusieurs. Vous vous pargnerez ainsi pas
  mal de noeuds au cerveau.  Je me focalise surtout sur la mise en place
  de X au niveau du second moniteur vu que la plupart des autres
  oprations de configuration en forment un sous-ensemble.


  1144..99..11..  DDppllaacceemmeenntt dd''uunnee ccoonnssoollee

  Compilez le programme "con2fb". Lanc sans arguments, il fournit le
  message suivant : "usage: con2fb fbdev console".  Une commande telle
  que "con2fb /dev/fb1 /dev/tty6" attacherait la console virtuelle
  numro 6 au second gestionnaire de mmoire vido. Ctrl-Alt-F6 vous
  basculera dans cette console qui s'affichera sur le second moniteur.


  1144..99..22..  ""ffbbsseett"" eett llee ppaarraammttrraaggee dduu sseeccoonndd mmoonniitteeuurr

  La mise en place des paramtres "fbset" doit se cantonner au moniteur
  avec lequel "fbset" est employ. Faites donc attention  bien employer
  l'option "-fb" avec le second moniteur. Plus prcisment, si vous ne
  voulez rien faire d'autre qu'accorder la rsolution verticale
  virtuelle avec la rsolution verticale relle : "fbset -fb /dev/fb1
  -vyres 600" (par exemple).  L'affichage en mode texte en est
  srieusement ralenti mais sans cela X reste vraiment hideux.


  1144..99..33..  XX eett llee ggeessttiioonnnnaaiirree ddee mmmmooiirree vviiddoo

  Le fichier framebuffer.txt explique bien mieux que je ne puis le faire
  mais voici les deux points essentiels :

    vrifiez que le lien "X" pointe bien vers "XF86_FBDev",

    ajoutez une section Monitor  votre fichier XF86Config pour le
     gestionnaire de mmoire vido.

     Par exemple :










     # Serveur X s'appuyant sur le gestionnaire de mmoire vido.

     Section "Screen"
         Driver      "fbdev"
         Device      "Millennium"
         Monitor     "NEC MultiSync 5FGp"
         Subsection "Display"
             Depth       8
             Modes       "default"
             ViewPort    0 0
         EndSubsection
         Subsection "Display"
             Depth       16
             Modes       "default"
             ViewPort    0 0
         EndSubsection
         Subsection "Display"
             Depth       24
             Modes       "default"
             ViewPort    0 0
         EndSubsection
         Subsection "Display"
             Depth       32
             Modes       "default"
             ViewPort    0 0
         EndSubsection
     EndSection



  Restreignez vous aux modes "default" car je ne pense pas qu'il y en
  ait d'autres qui fonctionnent avec le pilote de mmoire vido Matrox.


  1144..99..44..  EExxccuuttiioonn dduu sseerrvveeuurr XX ssuurr llee sseeccoonndd mmoonniitteeuurr

  Positionnez la variable d'environnement FRAMEBUFFER sur le second
  priphrique de mmoire vido : "export FRAMEBUFFER=/dev/fb1" ou :
  "setenv FRAMEBUFFER /dev/fb1" X doit tre lanc avec des paramtres
  lui spcifiant  la fois la profondeur souhaite au niveau des
  couleurs et un numro correspondant  la console virtuelle employe.
  Par exemple : "startx -- :0 -bpp 16 vt06".  Le serveur X en 16 bits
  par pixel d'identifiant ":0" est attach  la console virtuelle numro
  6. Utilisez ":1" au lancement d'un autre serveur X en le liant  une
  console dpendant de l'autre gestionnaire de mmoire vido et vous
  disposerez de deux serveurs X fonctionnant simultanment.


  1144..1100..  RRssuumm

  Les tapes de mise en place d'un serveur X sur un second moniteur
  peuvent tre ainsi rsumes :

    se procurer le patch du noyau, fbset et con2fb ;

    appliquer le patch, configurer le noyau, recompiler et
     rinitialiser ;

    ajouter une section XF86_FBDev au fichier XF86Config et fixer le
     lien de X.

     A chaque redmarrage :

    crer une console : "con2fb /dev/fb1 /dev/tty6" ;


    paramtrer : "fbset -fb /dev/fb1 1280x1024" ;

    positionner la variable FRAMEBUFFER : "export
     FRAMEBUFFER=/dev/fb1" ;

    lancer X : "startx -- -bpp 16 vt06".

     Un alias de shell permet d'automatiser ces tches. Un script ne
     conviendrait pas puisqu'on a besoin de dterminer le numro de la
     console courante. Voici mon alias (en C-shell) :

     alias startxfb = "
     setenv FRAMEBUFFER /dev/fb\!*;  # l'argument passe a l'alias est recupere
     con2fb $FRAMEBUFFER /dev/$tty;  # positionne le pilote sur la console courante
     fbset -fb $FRAMEBUFFER 1280x1024@62;  # Cf /etc/fb.modes
     startx -- :\!* -bpp 16 vt0`echo $tty | cut -dy f 2`' # execution de X
     "



  Ces lignes correspondent au contenu de mon .cshrc aux commentaires
  prs mais ils aident, avec les sauts de ligne,  en faciliter la
  lecture. Je fournis le numro du pilote de mmoire vido comme
  argument  l'alias.

  Si quelqu'un me fournit un quivalent pour bash, je l'inclurai ici.
  La commande tty vous fournira le nom de la console courante.


  1144..1111..  RReemmaarrqquueess eett pprroobbllmmeess


    fbset et startx _D_O_I_V_E_N_T tre invoqus depuis une mme console qui
     sera contrle par le pilote de mmoire vido. L'automatisation au
     moyen de scripts en est diminue d'autant.

    la version 4.0 de XFree86 grera correctement les adaptateurs
     multiples mais la 3.3.1 en est encore incapable. Vous pouvez
     cependant disposer de deux serveurs avec la 3.3.1 et passer de l'un
      l'autre avec x2x.

    Le pilote de mmoire vido non-actif conserve la dernire image
     sans la mettre  jour.

    L'cran qui n'est pas slectionn ne conserve pas toujours son tat
     durant ses priodes d'inactivit (mais en gnral il le fait).
     Geert Uytterhoeven, qui assure l'volution du pilote de mmoire
     vido, et Linus Torvalds sont en dsaccord sur les changements pour
     la gestion des adaptateurs multiples lis aux consoles (i.e.
     fbaddon) et ceux ci pourraient trs bien ne jamais se retrouver
     dans l'arborescence officielle du noyau (cette information a une
     forte composante de type bruit de couloir).

    Si vous excutez X de n'importe o, votre machine peut se retrouver
     dans un tat passablement dgrad qui mlange les vnements de la
     souris et ceux du clavier.

    Le fichier framebuffer.txt dans l'arborescence du noyau mentionne
     la possibilit de modifier les paramtres Modeline du XF86Config
     alors que X fonctionne. Le gestionnaire de mmoire vido Matrox
     semble obliger le serveur X  tous les ignorer. On ne dispose donc
     que d'un paramtrage, celui qui est employ lors du basculement
     depuis le mode texte.

    XF86_FBDev ne dispose pas d'acclration. Des patches pour les
     cartes Matrox existent : <http://www.in-
     berlin.de/User/kraxel/xfree86/>


  1144..1111..11..  FFoonnccttiioonnnneemmeenntt aavveecc xxddmm

  Je n'ai pas encore trouv comment passer au niveau 5 dans une
  configuration  deux adaptateurs avec un serveur sur le second
  moniteur ou sur les deux.  Bien que l'ajout d'une ligne au fichier
  Xservers de xdm/gdm soit ais, la contrainte de dmarrer le serveur X
  depuis la console gre par le pilote de mmoire vido interdit cette
  solution. Si quelqu'un a une ide, qu'il m'en fasse part afin que je
  puisse l'ajouter.


  1144..1111..22..  LL''uuttiilliittaaiirree xx22xx

  x2x vous permet de passer d'un serveur X  l'autre lorsque vous
  atteignez le bord d'un cran. Aux dernires nouvelles, ce programme se
  trouvait  l'adresse suivante :
  <http://ftp.digital.com/pub/DEC/SRC/x2x/>.  La distribution Debian en
  propose un paquetage. Je n'ai pas eu l'occasion de l'essayer mais
  plusieurs utilisateurs ont fait part d'expriences russies.


  1144..1111..33..  AAuuttrreess ccoommmmaannddeess uuttiilleess

  Il est bon de garder prsente  l'esprit l'existence de certaines
  commandes quand on dispose de plusieurs adaptateurs (surtout quand on
  crit des scripts).

    "chvt" permet de passer d'une console virtuelle (VT)  une autre.

    "openvt" excute un programme dans une console diffrente.

    "tty" renvoie le nom de la console courante.


  1144..1111..44..  AAnnnneexxee AA.. SSccrriipptt ccvvttmmooddee..mm ppoouurr OOccttaavvee

  Notez le positionnement de bpp.


























  ______________________________________________________________________
  #!/usr/bin/octave -q
  bpp = 16;
  DCF = sscanf(argv(1,:), "%f");
  HR  = sscanf(argv(2,:), "%f");
  SH1 = sscanf(argv(3,:), "%f");
  SH2 = sscanf(argv(4,:), "%f");
  HFL = sscanf(argv(5,:), "%f");
  VR  = sscanf(argv(6,:), "%f");
  SV1 = sscanf(argv(7,:), "%f");
  SV2 = sscanf(argv(8,:), "%f");
  VFL = sscanf(argv(9,:), "%f");
  pixclock = 1000000 / DCF;
  left_margin = HFL - SH2;
  right_margin = SH1 - HR;
  hsync_len = SH2 - SH1;

  # 3) vertical timings:
  upper_margin = VFL - SV2;
  lower_margin = SV1 - VR;
  vsync_len = SV2 - SV1;

  RR = DCF / (HFL * VFL) *1e6;
  HSF = DCF / HFL * 1e3;

  printf("mode \"%dx%d\"\n",HR,VR);
  printf("   # D: %3.2f MHz, H: %3.2f kHz, V: %2.2f Hz\n", DCF, HSF, RR);
  printf("   geometry %d %d %d %d %d\n", HR, VR, HR, VR, bpp);
  printf("   timings %d %d %d %d %d %d %d\n", ...
                                   pixclock, left_margin, right_margin, ...
                                   upper_margin, lower_margin, ...
                                   hsync_len, vsync_len);
  printf("endmode\n");
  ______________________________________________________________________




  1144..1111..55..  AAnnnneexxee BB..  SSccrriipptt ""ccvvttffiillee"" eenn SShheellll BBoouurrnnee

  Le script Octave "cvtmode" est utilis.

  ______________________________________________________________________
  #!/bin/sh

  # Shell script to convert XF86Config file to fb.modes file.
  # Uses octave script cvtmode.m

  if [ -z $1 ]; then
    FILE=/etc/X11/XF86Config
  else
    FILE=$1
  fi

  i=1
  LEN=`grep Modeline $FILE | wc -l`
  while expr $i \< $LEN > /dev/null ;
  do
    CURLINE=`grep Modeline $FILE | cut -d'"' -f 3-20 | head -$i | tail -1 `
    ./cvtmode.m $CURLINE
    echo " "
    i=`expr $i + 1`
  done
  ______________________________________________________________________


  1155..  GGeessttiioonn ddeess ffoonntteess

  Afin de pouvoir modifier les fontes, vous devez installer kbd-0.99. Le
  logiciel est disponible via
  <ftp://ftp.win.tue.nl/pub/linux/utils/kbd>.

  Le tl-chargement et l'installation de kbd-0.99 rside en ce que vous
  pourrez charger les fontes internationales (dont l'Euro) dans votre
  console.  Je trouve trs chic *en franais dans le texte* d'avoir
  trois symboles sur mon clavier : le dollar, la livre et l'Euro.


  1166..  CCoommmmuuttaattiioonn ddee mmooddee

  Pour changer de mode (640x480, 800x800, etc.), vous avez besoin de
  fbset (fbset-19990118.tar.gz pour l'instant) :
  <http://www.cs.kuleuven.ac.be/~geert/bin/fbset-19990118.tar.gz>.  Le
  logiciel est fourni avec une documentation complte sur son emploi.


  1166..11..  XX1111 eett vveessaaffbb ??

  Si votre version de XFree86 est antrieure  la 3.3.3.1, il est urgent
  de procder  une mise  jour. Cette version comprend le pilote FBDev
  X pour les gestionnaires de mmoire vido. Autrement, vous pouvez
  compiler votre propre pilote FBDev pour des versions de XFree telles
  la 3.3.2 ou la 3.3.3.

  Allez sur  <http://www.xfree86.org> et tl-chargez les dernires
  sources du serveur X. [NdT : le recours  un miroir comme
  <ftp://ftp.lip6.fr/pub/X11> sera peut-tre plus rapide]


    Dcompactez les sources.

    ditez le fichier xc/config/cf/xf86site.def, et dcommentez le
     #define relatif  XF68FBDevServer.

    Dcommentez _t_o_u_t_e_s les rfrences  FB_VISUAL_STATIC_DIRECTCOLOR.
     Elles ne servent plus  rien. Si vous partez des sources de XFree86
     3.3.3.1, sautez cette tape (la rfrence a t supprime).

    ditez xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c et
     changez K_RAW en K_MEDIUMRAW.

  Recompilez le pilote. Ne vous souciez pas des rfrences ayant trait 
  m68k : les architectures Intel sont supportes. Recompilez le tout. a
  va prendre un moment compte tenu de la taille des sources.

  Si vous manquez de temps, les sites suivants proposent des versions
  pr-compiles. Notez que ces sites n'ont rien d'officiel et que vous
  utiliserez leurs binaires  vos risques et prils.

  Pour une version libc5 : <http://user.cs.tu-
  berlin.de/~kraxel/linux/XF68_FBDev.gz>.  Pour une version glibc2 :
  <http://user.cs.tu-berlin.de/~kraxel/linux/XF68_FBDev.libc6.gz>,
  <http://pobox.com/~brion/linux/fbxserver.html>.

  On signale qu'X11 ne fonctionne pas avec certaines cartes graphiques
  lorsque le gestionnaire vesafb est actif. Si vous tes dans ce cas,
  essayez le nouveau pilote XF86_FBdev pour X11.

  Utilis conjointement  vesafb, ce pilote peut permettre l'emploi de
  X11  des rsolutions autrement inaccessibles au pilote X11 usuel
  (cartes MGA G200 par exemple).

  XF86_FBdev requiert la configuration suivante du fichier XF86Config :

  Section "Screen"
          Driver          "FBDev"
          Device          "Primary Card"
          Monitor         "Primary Monitor"
          SubSection      "Display"
                  Modes           "default"
          EndSubSection
  EndSection



  Vous devrez galement positionner XkbDisable dans la section Keyboard
  ou bien excuter XF86_FBDev avec l'option '-kb' afin de grer
  correctement votre clavier. Sans XkbDisable, il vous faudra inclure
  les lignes suivantes dans votre .Xmodmap pour prciser les effets des
  touches. Le mme rsultat s'obtient en ditant son xkb si on le
  dsire.  _X_F_r_e_e_8_6 _3_._3_._3_._1 _n_e _p_r__s_e_n_t_e _p_l_u_s _c_e _d__f_a_u_t_. _I_l _e_s_t _d_o_n_c
  _v_i_v_e_m_e_n_t _c_o_n_s_e_i_l_l_ _d_'_e_f_f_e_c_t_u_e_r _u_n_e _m_i_s_e _ _j_o_u_r _v_e_r_s _c_e_t_t_e _v_e_r_s_i_o_n _q_u_i
  _d_e _p_l_u_s _c_o_r_r_i_g_e _d_'_a_u_t_r_e_s _b_u_g_s _e_t _i_n_c_l_u_t _F_B_D_e_v _p_a_r_m_i _l_e_s _s_e_r_v_e_u_r_s_.


  ! Keycode settings required
  keycode 104 = KP_Enter
  keycode 105 = Control_R
  keycode 106 = KP_Divide
  keycode 108 = Alt_R Meta_R
  keycode 110 = Home
  keycode 111 = Up
  keycode 112 = Prior
  keycode 113 = Left
  keycode 114 = Right
  keycode 115 = End
  keycode 116 = Down
  keycode 117 = Next
  keycode 118 = Insert
  keycode 119 = Delete



  Certaines adaptations seront srement ncessaires (copier les codes du
  gestionnaire X11 utilis et positionner le nom du pilote sur FBDev)
  mais c'est en substance ce qu'il vous faudra faire pour que le pilote
  vesafb de X11 fonctionne.  Les problmes lis  X11 devraient tre
  rsolus dans les prochaines versions en ce qui concerne les cartes
  vido supportes.


  1177..  vviiddoo CCoonnvveerrssiioonn ddeess MMooddeelliinneess eenn ppaarraammttrreess dd''aaffffiicchhaaggee dduu
  ppiilloottee ddee mmmmooiirree

  Rien n'est plus simple si XFree86 (X11) est install sur votre machine
  et que vous pouvez vous en servir normalement.

  Le pilote de mmoire vido requiert les champs suivants :

    pixclock - horloge pixel en picosecondes

    left_margin - dure entre la synchro et la zone affiche

    right_margin - dure entre la zone affiche et la synchro

    upper_margin - dure entre la synchro et la zone affiche


    lower_margin - dure entre la zone affiche et la synchro

    hsync_len - longueur de la synchro horizontale

    vsync_len - longueur de la synchro verticale


  Une ligne "Modeline:" XFree86 comprend les champs suivants :

  Modeline  "1280x1024" DCF HR SH1 SH2 HFL VR SV1 SV2 VFL




  Quelques calculs sont ncessaires pour la conversion. A titre
  d'exemple voici la conversion de valeurs extraites de mon XF86Config.

  Modeline  "1280x1024" 110.00 1280 1328 1512 1712 1024 1025 1028 1054




  Tout d'abord le paramtre pixclock. XFree86 l'exprime en MHz et le
  pilote de mmoire vido en picosecondes (pourquoi? mystre). On divise
  donc un million par DCF soit : 1,000,000 / 110.0 = 9090.9091


  Pour les dures horizontales :

    left_margin = HFL - SH2

    right_margin = SH1 - HR

    hsync_len = SH2 - SH1


  Soit, dans notre exemple :

    left_margin = 1712 - 1512 = 200

    right_margin = 1328 - 1280 = 48

    hsync_len = 1512 - 1328 = 184


  Enfin les dures verticales :

    upper_margin = VFL - SV2

    lower_margin = SV1 - VR

    vsync_len = SV2 - SV1


  Soit :

    upper_margin = 1054 - 1028 = 26

    lower_margin = 1025 - 1024 = 1

    vsync_len = 1028 - 1025 = 3


  Les valeurs obtenues sont passes au gestionnaire de mmoire vido.
  Dans le cas du pilote matroxfb :

  video=matrox:xres:<>,yres:<>,depth:<>,left:<>,right:<>,hslen:<>,upper:<>,lower:<>,vslen:<>



  J'ai donc insr la ligne suivante dans mon /etc/lilo.conf :

  append = "video=matrox:xres:1280,yres:1024,depth:32,left:200,right:48,hslen:184,upper:26,lower:0,vslen:3"




  Notez que le pixclock n'est pas employ ici. Il n'est ncessaire que
  si celui par dfaut ne vous convient pas. Il se fixe de la mme faon
  ainsi qu'il a t auparavant expliqu dans ce document.


  1188..  DDaavvaannttaaggee dd''iinnffoorrmmaattiioonnss ??

  Que ceux qui sont intresss aillent faire un tour du cot de
  <http://www.csoft.net/~systems/jim/fb.html> pour des informations
  relatives  la programmation du pilote.

  La traduction originale de ce document en franais se trouve 
  l'adresse suivante :
  <http://www.freenix.org/unix/linux/HOWTO/mini/Vesafb.html>.









































  Le French-HOWTO : Linux & la langue franaise
  crit par Guylhem Aznar, guylhem  oeil.qc.ca
  v2.1 ; Juillet 1998

  Copyright () 1997, 1998 Guylhem Aznar.  Librement distribuable et
  modifiable selon les termes du LDP
  ______________________________________________________________________

  Table des matires

























































  1. Prsentation

     1.1 Introduction
     1.2 Les franais ne sont pas les seuls francophones !
     1.3 Attention

  2. Les problmes

     2.1 Prsentation
     2.2 Solutions
     2.3 Aide

  3. Le vocabulaire : petit lexique

     3.1 8 bits
     3.2 Table de clavier
     3.3 Home, End, Page Up et Page Down
     3.4 Touches mortes
     3.5 Backspace , Delete
     3.6 Police de caractres
     3.7 Unicode, iso-8859, latin
     3.8 UTC, GMT

  4. Rglage du clavier sous Linux

     4.1 Introduction
     4.2 O trouver ces fichiers
     4.3 Attention au stty !
     4.4 Faire de ces modifications les dfaut au dmarrage
     4.5 Vieilles versions

  5. Rglage du clavier sous XFree

     5.1 Introduction
     5.2 Conseils
     5.3 Est-ce ncessaire ?
     5.4 french ou fr ?
     5.5 Table de correspondances
     5.6 Faire de ces modification les dfaut au lancement de X
     5.7 O trouver ces fichiers
     5.8 Autre mthodes

  6. Rglage du clavier pour les applications en mode texte

     6.1 Tout d'abord
     6.2 Appeler la police
     6.3 Une police, des polices...
     6.4 Les messages en franais
     6.5 Les variables
     6.6 Les caractres 8 bits dans les programmes utilisant readline tels bash ou ncftp...
     6.7 zsh
     6.8 tcsh
     6.9 Pour tous les shells
     6.10 L'heure
     6.11 vi
     6.12 Emacs
     6.13 less
     6.14 ls
     6.15 flex
     6.16 elm
     6.17 col
     6.18 rlogin
     6.19 joe
     6.20 TeX et LaTeX
     6.21 Manuel
     6.22 Correcteur orthographique ispell
     6.23 Les claviers 105 touches
     6.24 PGP
     6.25 Impression en mode ascii
     6.26 unicode/latin/cp... je n'ai pas compris ce dernier paragraphe !
     6.27 ncurses
        6.27.1 Introduction
        6.27.2 Les accents
     6.28 Divers

  7. Rglage du clavier pour les applications X

     7.1 Les xterminaux (xterm, nxterm, rxvt...)
     7.2 Les applications Motif
     7.3 Le manuel
     7.4 NumLock
     7.5 XDM

  8. Remerciements

  9. Fichiers inclus dans ce HOWTO



  ______________________________________________________________________

  11..  PPrrsseennttaattiioonn



  11..11..  IInnttrroodduuccttiioonn


  Ce document a t crit pour aider  configurer un ordinateur dot du
  systme d'exploitation Linux pour des utilisateurs francophones ; il y
  est expliqu par exemple comment configurer priphriques et
  applications afin de prendre en compte les particularits et les
  spcificits de notre langue...

  Toutefois, ce document ne traite pas de l'installation du systme
  d'exploitation Linux ; il est implicitement suppos que vous avez
  correctement install une distribution de Linux (RedHat, Debian ou
  Slackware, cette liste n'tant pas exhaustive) et que vous vous
  apprtez maintenant  mieux la configurer ; veuillez donc vous rfrer
   d'autres HOWTOs pour l'installation.

  N'tant pas l'unique auteur de ce document, les personnes m'ayant
  donnes des conseils  rajouter sont explicitement cites.

  Les adresses lectroniques de ces contribueurs ont t volontairement
  modifies en remplaant les a enrouls par des  afin d'viter les
  publipostages trs gnants.


  11..22..  LLeess ffrraannaaiiss nnee ssoonntt ppaass lleess sseeuullss ffrraannccoopphhoonneess !!


  Pour chaque manipulation dpendant du pays concern, quatres versions
  sont donc proposes : une canadienne franaise, une belge wallone, une
  franaise et une suisse romande.  Le Grand Duch du Luxembourg
  utilisant les conventions franaises, j'invite les lecteurs
  luxembourgeois  se reporter aux exemples franais !

  Toutefois seuls les fichiers destins aux franais (table de clavier
  en mode console, X...) sont inclus, puisque la majorit des lecteurs
  seront certainement franais et que seuls ces fichiers prsentent des
  amliorations par rapport aux dfauts.
  Envoyez-moi donc vos fichiers belges, canadiens, luxembourgeois ou
  suisses ; ils seront inclus avec plaisir s'ils se montrent plus utiles
  que ceux proposs par dfaut !


  11..33..  AAtttteennttiioonn


  Nat Makarevitch nous recommande :

  ROOT : certaines manipulations recommandes par ce document ne peuvent
  tre effectues que sous un compte privilgi (root) ; la plus grande
  prudence est alors de rigueur car toute action inadquate peut mettre
  en pril le contenu des disques.  Sauvegarder les fichiers existants,
  par exemple en les copiant en *.old, avant de les modifier ou
  remplacer.

  CHERCHER : le paquetage GNU nomm "find" offre un programme appel
  locate, grce auquel l'utilisateur peut retrouver le nom complet
  (chemin de rpertoires) d'un fichier dont il ne connait que le nom.

  Certaines distributions Linux fournissent cela en /usr/lib/locate.
  Lancer, en tant que root, /usr/lib/locate/updatedb : cela invoque un
  find / sur les disques monts et place les noms de tous les fichiers
  (sous forme hash) dans /usr/lib/locate/find.codes alors que locate
  permet ensuite de localiser l'un d'eux :



       (guylhem@barberouge:guylhem)# locate noms_des_fichiers__retrouver





  22..  LLeess pprroobbllmmeess



  22..11..  PPrrsseennttaattiioonn


  Le problme de tout utilisateur non-amricain lors de l'installation
  de Linux est de lui faire comprendre que, justement, il n'est pas
  amricain !

  Cela a des consquences sur :


    les caractres spciaux que l'on utilise, accentus (   ) ou
     bien ligaturs (  , voire e dans l'o qui vient  peine
     d'apparatre sous Linux en mode console ; j'espre bientt
     prsenter ici une solution simple pour en disposer sous X aussi !)

    la correspondance entre la srigraphie des cabochons (touches) sur
     lesquels vous appuyez et les codes que Linux renvoie, celui-ci
     supposant un clavier QWERTY amricain par dfaut

    le format de page pris en charge par les programmes que vous
     utilisez pour imprimer, diffrent entre les tats-Unis (14 x 8,5
     pouces pour du papier dit lgal) et l'Europe (29,7 x 21 cm pour des
     feuilles a4)

    le format des dates et de l'heure


    le format de la monnaie

    la langue utilise pour les messages d'erreur



  22..22..  SSoolluuttiioonnss


  Tout tant prconfigur pour un anglophone nord-amricain -bien que
  ceux-ci ne reprsentent pas la majorit de la population mondiale- ,
  il faut donc se faire reconnatre comme une exception par les
  diffrents programmes, par des options ou des variables  exporter
  voire dans les pires des cas une modification du code source suivie
  d'une recompilation.

  Heureusement, l'esprit de Linux rend le systme trs ouvert  des
  modifications de toute sorte et comme vous allez le dcouvrir au fil
  de ce document, il est assez simple d'obtenir un rsultat trs
  correct.


  22..33..  AAiiddee


  Pour le moment, le futur de l'internationalisation de Linux porte sur
  la traduction des messages d'erreur, des programmes (comme le KDE),
  des pages de manuel et de la documentation, alors si vous vous sentez
  l'me d'un traducteur, n'hsitez pas  contacter l'quipe de
  traduction des HOWTOs ; pour cel, adressez-vous  ric Dumas (dumas 
  freenix.fr ou dumas  linux.eu.org) .


  33..  LLee vvooccaabbuullaaiirree :: ppeettiitt lleexxiiqquuee


  Tout d'abord, un mot sur le vocabulaire employ :


  33..11..  88 bbiittss


  Des caractres sont dits 8 bits s'ils contiennent par exemple des
  accents ou des signes spciaux (comme paragraphe), non inclus dans le
  standard ASCII 7 bits (sans accents ni caractres spciaux) qui
  correspond aux 127 premiers caractres des 256.


  33..22..  TTaabbllee ddee ccllaavviieerr


  Une table de clavier est un fichier permettant de faire correspondre
  l'empreinte physique des cabochons (touches) du clavier au rsultat
  obtenu sur l'cran de l'ordinateur.


  33..33..  HHoommee,, EEnndd,, PPaaggee UUpp eett PPaaggee DDoowwnn


  Les touches Home, End, Page Up et Page Down (dont les noms
  varient selon les claviers) sont les touches permettant respectivement
  d'aller en dbut/fin de ligne et de monter/descendre d'une page.

  Par exemple, pour que les touches Home et End fonctionnent dans le
  shell bash (voir plus bas), on peut mettre dans un fichier .inputrc
  les lignes suivantes:
             "\e[1~" : beginning-of-line
             "\e[4~" : end-of-line




  D'autre part, on sait que les codes affectes a ces touches sont
  respectivement 102 et 107 pour Home et End en mode terminal.

  Le code est issu du clavier : lorsqu'on presse la touche, il le
  renvoit  la table de clavier qui, lorsqu'elle le reoit, se dit :
  tient, c'est la touche End qu'on a press, donc le renvoie la chane
  associe, en l'occurence pour End \e[4  

  Lorsque bash ou un autre programme reoit cette chane... il ne la
  connat pas !  Donc il faut lui dire dans le .inputrc que \e[4 
  signifie aller  la fin de la ligne.


  33..44..  TToouucchheess mmoorrtteess


  Les touches mortes sont des touches qui ne produisent pas de
  caractres en elles-mmes, mais qui modifient la faon dont la frappe
  suivante va tre interprte (par exemple, le trma ou l'accent
  circonflexe sont en gnral des touches mortes.)

  Une touche morte est une touche qui doit donc tre suivie d'un espace
  pour obtenir l'accent seul, ou dans le cas o elle est suivie d'une
  voyelle y positionne un accent, par exemple :



       ^ e donne 




  Les touches mortes sont :

    pour les claviers belges et franais, l'accent aigu (en AltGr de 1
     pour les franais et en AltGr de  pour les belges), l'accent grave
     (en AltGr de 7 pour les franais & en AltGr de carr/cube pour les
     belges), le trma et l'accent circonflexe (tous deux  ct du P)

    pour les canadiens, les accent graves, circonflexes, les trmas et
     la cdille

    pour les suisses, les accent aigus, graves, circonflexes, les
     trmas et la tilde


  33..55..  BBaacckkssppaaccee ,, DDeelleettee



    BackSpace Touche place en haut  droite du pav principal, au
     dessus d' Entre, au cabochon marqu d'une flche vers la gauche.

    Delete Touche du pav curseur au cabochon marqu Suppr ou Del,
      gauche de Fin.  Le pav numrique offre une touche au marquage
     identique et  effet identique lorsque Verr Num _N_u_m_L_o_c_k _e_s_t
     _d_e_s_a_c_t_i_v_.

  Ces deux touches correspondent chacune  un de ces codes :

    BS Caractre ASCII 0x08, ou control-h.

    DEL Caractre ASCII 0x7F, ou control-?

    ^D Caractre ASCII 0x04, ou control-d.

  Ceci dans le but d'effacer  gauche du curseur avec Backspace, 
  droite du curseur avec Delete.


  33..66..  PPoolliiccee ddee ccaarraaccttrreess


  Une police de caractres est une correspondance entre des codes
  informatiques ou nombres hexadcimaux et des caractres
  (alphanumriques...) affichables par l'ordinateur.

  Cette correspondance se nomme norme ou standard (comme l'unicode,
  l'iso-8859 latin, le cp ...).

  Par exemple, dans le standard ASCII tendu par l'iso-8859-1, le nombre
  hexadcimal eb correspond  .

  La police de caractre est la somme des reprsentations graphiques des
  caractres d'un standard.


  33..77..  UUnniiccooddee,, iissoo--88885599,, llaattiinn


  L'unicode est l'un de ces standard, destin  terme  remplacer les
  diffrentes volutions de l'ASCII.

  L'ASCII codait ses caratres sur 7bits, rendant donc impossible
  d'incorporer des caractres accentus  la norme dja prsente.

  Les normes iso-8859 latin et cp (pour les plus connues) vinrent
  pallier  cette dficience en encodant les caractres sur 8bits.  Mais
  plusieurs de ces normes taient ncessaire du fait de l'impossibilit
  de faire tenir les caractres de toutes les langues du monde sur
  8bits.  La norme iso-8859-1 latin1, la plus utilise, se destine par
  exemple au langues d'europe de l'ouest, du nord, d'amrique, la norme
  iso-8859-2 latin2 est prvue pour l'europe de l'est...

  L'unicode offre l'avantage de proposer les caractres ncessaires 
  toutes les langues du monde, mais reste encore peu utilis ou
  implment.

  En effet, il est impossible de l'utiliser en pratique sous linux-
  console, la mmoire exige de la carte vido ne permettant pas de
  stocker tous les caractres de l'unicode, et sous X la gestion
  actuelle des polices rendrait son utilisation trop inconfortable.

  Attendos un peu que les polices True Type se rpendent sous X, grace
  a des outils comme freetype, xfstt (...).

  Actuellement, la nouvelle norme europenne iso-8859-15 latin9 souvent
  abbrge en latin0 est cense permettre la transition vers l'unicode
  en apportant  l'ancien iso-8859-1 latin1 les caractres qu'il
  manquait actuellement.

  Cet HOWTO sera mis  jour sous peu pour vous permettre de transiter
  vers le latin0 en toute srnit, pour utiliser l'EURO par exemple.



  33..88..  UUTTCC,, GGMMTT


  Nous n'utilise pas les mmes normes horaires que les ango-amricains !

  La France se trouve en zone MET (heure moyenne europenne) GMT+1 ; la
  zone MET DST correspond  l'heure d't active GMT+2.

  Voici donc une petite explication de la diffrence entre GMT et UTC
  par Edgar Bonet Orozco :

  GMT est l'heure solaire moyenne de Greenwich. L'heure est compte 
  partir de midi et est donc dcale de 12 h  par rapport au temps
  universel. GMT est base sur la rotation de la Terre, ce n'est donc
  pas un temps rgulier. En effet, la vitesse de rotation de la Terre
  subit des variations faibles mais assez cahotiques, en plus elle
  diminue sur le long terme.

  UTC (temps universel coordonn) est compt  partir de minuit
  (toujours par rapport au mridien zro). Il est bas sur des talons
  atomiques, mais des secondes intercalaires sont ajoutes
  occasionnellement pour faire en sorte qu'il ne s'carte jamais de plus
  de une seconde de l'heure solaire moyenne. Tu auras plus de prcisions
  sur la dtermination de UTC dans http://opdaf1.obspm.fr/, et en
  particulier dans http://opdaf1.obspm.fr/www/lexique.html.

  C'est le temps UTC qui sert de rfrence aux diffrentes heures
  lgales.  L'acronyme GMT est employ 99% du temps pour dsigner UTC,
  mais c'est une erreur (ou un abus de langage).

  Enfin, il existe l'heure astronomique, aussi compte sur des talons
  atomiques mais dcale de 4 minutes par jour de l'heure terrestre car
  se basant sur la position de la terre dans l'espace par rapport aux
  toiles.


  44..  RRggllaaggee dduu ccllaavviieerr ssoouuss LLiinnuuxx



  44..11..  IInnttrroodduuccttiioonn


  Il existe deux programmes pour configurer votre clavier : un pour la
  console : loadkeys et un pour XFree : xkbd.

  Pour installer un clavier franais sous Linux, tapez selon que vous
  soyez respectivement Franais, Canadien Franais, Belge Wallon ou
  Suisse Romand :



       loadkeys french.map
       loadkeys cf.map
       loadkeys be-latin1.map
       loadkeys sf-latin1.map





  44..22..  OO ttrroouuvveerr cceess ffiicchhiieerrss


  french.map est inclu dans ce HOWTO (au chapitre Fichiers inclus) et
  tous les autres fichiers se trouvent d'ordinaire dans le rpertoire
  /usr/lib/kbd/keytables ou dans /usr/share/keytables avec les
  distributions debian.

  Pour l'installer, vous pouvez donc le recopier ou plus simplement le
  tlcharger par ftp.

  Tapez donc :



       ftp ftp.linux.france.com
       cd pub/
       cd french
       get french.map
       exit
       su root -c "cp french.map /usr/lib/kbd/keytables/"





  44..33..  AAtttteennttiioonn aauu ssttttyy !!


  Avec french.map et french (pour X window : cf. chapitre Rgler le
  clavier pour X window), N'UTILISEZ PLUS :



       stty erase ^H




  ou



       stty erase ^?




  stty erase ne sert en effet qu' tablir une correspondance entre le
  code que renvoie une touche et la fonction erase (effacer le
  caractre).

  Les tables ici fournies fonctionnent correctement et ne ncessitent
  donc pas de stty erase qui risquerait surtout de perturber leur bon
  fonctionnement !

  Supprimez-donc ces lignes de vos fichier d'initialisation de
  l'interprteur de commandes ( shell ), comme .bashrc, .bash_profile
  ou .tcshrc .


  44..44..  FFaaiirree ddee cceess mmooddiiffiiccaattiioonnss lleess ddffaauutt aauu ddmmaarrrraaggee


  D'habitude, loadkeys est excut par des scripts au dmarrage ; par
  exemple dans /etc/rc.d/init.d/keytable ou /etc/rc.d/rc.local,
  init.d/keytable ou rc.keymap.

  La commande :


       find /etc/rc.d -type f | xargs grep loadkeys




  vous fournira sur le nom exact du fichier lanant loadkeys ; il vous
  suffit alors de l'diter pour que vos modifications soient dsormais
  prise en en compte  chaque dmarrage.

  Les distributions RedHat constituent une exception : la table de
  clavier par dfaut tant dfinie dans /etc/sysconfig/keyboard.

  Remplacer donc dans le fichier propre  votre distribution la table de
  clavier en question par french.map.


  44..55..  VViieeiilllleess vveerrssiioonnss


  Si vous rencontrez les messages d'erreur suivants :



       (guylhem@barberouge:guylhem)$ loadkeys french
       Loading /usr/lib/kbd/keytables/french.map
       unknown keysym 'dead_cedilla'
       /usr/lib/kbd/keytables/french.map:67: parse error
       syntax error in map file
       key bindings not changed
       (guylhem@barberouge:guylhem)$ loadkeys french




  Cel signifie que votre version de kbd (dont le programme loadkeys
  dpend) est trop vieille : il faut vous procurer une version plus
  rcente du programme.

  Il existait et existe encore des versions des tables de clavier pour
  ceux ne voulant ni touches mortes ni accents, mais celles-ci tombent
  actuellement en dsutude puisque la grande majorit des programmes
  prennent dsormais en charge ces fameuses touches mortes et les
  caractres accentus.

  De plus, les tables fournies avec ce HOWTO permettent de se servir des
  touches mortes ou de s'en passer si un programme les refuse, les deux
  cas ayant t prvus.


  55..  RRggllaaggee dduu ccllaavviieerr ssoouuss XXFFrreeee



  55..11..  IInnttrroodduuccttiioonn


  xmodmap servait  changer les tables de clavier sous XFree, un
  fichier de configuration d'ordinaire nomm
  /usr/X11/lib/X11/xinit/.Xmodmap tant pris en charge grce  votre
  .xinitrc ( lire !).

  Pour convertir une table console correcte, on utilisait mk_modmap
  (livr avec l'archive 'kbd' et gnralement install en
  /usr/lib/kbd/keytables)


  Les utilisateurs dsirant personnaliser leur table xmodmap employaient
  le programme xkeycaps.

  XFree 2.1 et les version ultrieures reconnaissent la disposition des
  touches du clavier gre par loadkeys, cela rendant thoriquement
  xmodmap inutile.

  Mais la gestion de la touche COMPOSE assure par XFree 3.1 laissait
  un peu  dsirer, la table hrite de loadkeys ne servant gure.

  Il fallait donc continuer  employer xmodmap, l'utilitaire logiciel
  standard permettant d'obliger le serveur X  associer les vnements
  souris/clavier  des caracres.

  Sous XFree version 3.2 et postrieures, xkb rendit xmodmap
  dfinitivement obsolete.

  Mais ne voil-t-il pas les rumeurs qui voulaient que les prochaines
  versions de XFree (3.3.1) ne supporte plus les touches mortes se sont
  confirmes !!!

  Dans la distribution X11 du X Consortium (donc XFree86, qui en est
  directement issu), il n'existe plus de mcanisme gnral de gestion
  des touches mortes, ou des solutions approximatives obligeant 
  supprimer (aussi) xkb !

  Quelle histoire complique !

  De ce fait, elles ne fonctionnents que pour les clients X
  internationaliss, c'est--dire qui grent eux-mmes les problmes
  lis aux mthodes d'entre de donnes des diffrentes langues
  nationales.

  Ceci est trs gnant lorsqu'on veut pouvoir saisir du texte comportant
  des lettres accentues, alors que le client utilis n'est pas
  internationalis !

  Thomas Quinot (Thomas.Quinot  cuivre.fdn.fr) vous propose donc sa
  libX11 modifie, qui gre les touches mortes de manire transparente
  pour tous les clients.

  Elle permet galement de traiter les squences composes inconnues
  comme des paires de caractres, par example :

  ~ + / = ~/

  Pour l'utiliser :

    Rcuprez libX11-XF3.3.1.tar.gz ;

    Extrayez le fichier libX11.so.6.1 ;

    Placez-le dans /usr/X11R6/lib/ ;

    Excutez ldconfig ;

    Dsactivez l'extension XKB en utilisant l'option XkbDisable dans la
     section Keyboard de votre XF86Config.


  55..22..  CCoonnsseeiillss


  Personellement, je vous recommande de ne pas toucher  la libX11 mais
  d'utiliser les alternatives du fichier french en attendant un autre
  changement de la politique du X11 Consortium envers les touches mortes
  ou en rajoutant les options d'internationalisation au code source de
  vos programmes.

  Actuellement, si vous n'avez pas de rpertoire
  /usr/X11R6/lib/X11/xkb/symbols/ , procurez-vous donc une version plus
  rcente de X window !


  55..33..  EEsstt--ccee nncceessssaaiirree ??


  Sans xkb, XFree se rabattra par dfaut sur votre configuration de
  clavier pour Linux (avec loadkeys).  Toutefois, la translation n'est
  pas parfaite et je vous recommanderais plutt d'viter cette option,
  aussi bien que l'ancien gestionnaire de clavier Xmodmap.

  Il se peut aussi que sans aucune commande pour xkb, XFree vous
  considre comme utilisateur d'un clavier anglo-amricain !

  Il convient donc d'utiliser fr ou french avec xkb ; toutefois ce
  dernier permet d'utiliser de multiples amliorations pour disposer du
  plus de confort possible (gage de confort : je l'utilise actuellement
  :-) ).


  55..44..  ffrreenncchh oouu ffrr ??


  Je vous conseille de choisir french que je maintient  jour, plus
  rcent que fr et plus adapt car maintenu par un francophone :-)

  De plus, il bnficie de nombreuses amliorations pour pallier au
  dficiences de nombreux programmes.

  Par exemple, certains programmes en Motif comme Netscape (tm) ne
  savent pas encore grer les touches mortes ... donc impossible de
  taper par exemple des  ou des  sur les claviers belges et franais,
  puisque la touche morte accent circonflexe est le seul moyen
  d'obtenir ces caractres !

  french rpond  ce problme en proposant une solution de
  remplacement : AltGr (voyelle) permet d'obtenir la voyelle avec un
  accent grave, AltGr+Shift (voyelle) permet d'obtenir la voyelle avec
  un trma !


  55..55..  TTaabbllee ddee ccoorrrreessppoonnddaanncceess



    AltGr (voyelle) : voyelle accent grave

    AltGr + Shift (voyelle) : voyelle trma

    AltGr (touche au dessous de la voyelle) : voyelle majuscule accent
     grave

    AltGr + Shift (touche au dessous de la voyelle) : voyelle majuscule
     trma

    AltGr + Shift (minuscule accentue) : majuscule accentue

  Par exemple :



    AltGr (e) : 

    AltGr + Shift () : 

  L'astuce marche aussi pour le c cdille :


    AltGr + Shift () : 

  Donc mme dans les pires conditions (si aucune touche morte ne
  fonctionne), on peut quand mme accder  toutes les voyelles
  accentues, majuscules et minuscules !

  Vous y trouverez en plus les guillemets franais ( ), les symboles
  employs en physique (, , delta, phi ...), des signes de monnaies
  (yen, cent) ou de copyright ((TM), ) ainsi que des lettres d'autres
  langues (,  ...).

  Tous ces signes s'obtiennent grce  AltGr (lettre), par exemple AltGr
  (b) donne , AltGr (r) donne (TM), AltGr (y) donne yen...

  Pour ce qui est du choix entre les deux...  vous de voir !

  Un conseil : essayez l'un puis l'autre.


  55..66..  FFaaiirree ddee cceess mmooddiiffiiccaattiioonn lleess ddffaauutt aauu llaanncceemmeenntt ddee XX


  Pour XFree, votre fichier XF86Config doit contenir une section
  Keyboard :



       Section "Keyboard"
       Protocol        "Standard"
       AutoRepeat      500 30
       LeftAlt         Meta
       RightAlt        ModeShift               # Important pour Alt-gr, mais dans les
                                               # versions rcentes de XFree,
                                               # AltGr et RightAlt sont synonymes.
       ScrollLock      Compose                 # Pour faire des caractres spciaux.
                                               # Utiliser sinon une des 3 touches des
                                               # nouveaux claviers 105 touches...

       RightCtl        Control                 # Garder la touche normale


       XkbKeycodes     "xfree86"       #
       XkbTypes        "default"       #
       XkbCompat       "default"       #
       XkbSymbols      "french(pc102)" #
       XkbGeometry     "pc(pc102)"     #  Tout est ncessaire pour xkb
       XkbModel        "pc102"         #
       XkbLayout       "french"        #
       XkbRules        "xfree86"       #
       # Remplacer french par ca ou be ou fr_CH
       EndSection




  Pour cette partie Xkb, certains prfrent :



  XkbKeymap "xfree86(french)"
  XkbKeycodes  "xfree86"
  XkbSymbols   "en_US(pc101)+french"
  XkbGeometry  "pc(pc101)"





  55..77..  OO ttrroouuvveerr cceess ffiicchhiieerrss


  french est inclu dans ce HOWTO (au chapitre Fichiers inclus) et tous
  les autres fichiers se trouvent d'ordinaire dans le rpertoire
  /usr/X11R6/lib/X11/xkb/symbols/.

  Pour l'installer, vous pouvez donc le recopier ou plus simplement le
  tlcharger par ftp.

  Tapez donc :


       ftp ftp.linux.france.com
       cd pub/
       cd french
       get french
       exit
       su root -c "cp french /usr/X11R6/lib/X11/xkb/symbols/"




  Mettre french dans /usr/X11R6/lib/X11/xkb/symbols/french et 
  french.map dans /usr/lib/kbd/keytables/french.map ou
  /usr/share/keytables/french.map.


  55..88..  AAuuttrree mmtthhooddeess


  Une autre mthode pour obtenir des caratres 8 bits :

  Dans /usr/X11R6/lib/X11/locale/iso8859-1/Compose se trouve une table
  de correspondance entre deux caractres et un rsultat ; les deux
  caractres sont mlangs lors de l'appui sur la touche Compose : par
  exemple;


       <Touche COMPOSE> e ^




  a toutes les chances de vous donner 

  Pour utiliser la touche Compose, vous devez l'affecter  une touche !

  Le paramtrage prconis, rgl dans XF86Config, la fait correspondre
   la touche Arrt Dfil par la commande :

  ScrollLock   Compose

  dans la section keyboard.

  ditez sinon votre table de clavier et remplacez par exemple :

               key <TLDE> {    [       twosuperior,    threesuperior   ]       };




  par :


               key <TLDE> {            [       twosuperior,    threesuperior   ],
                                               [       Compose                         ]       };




  Si vous avez par exemple un clavier belge ou franais, dsormais
  appuyer sur la touche (carr/cube) vous donnera normalement (carr) en
  minuscules, (cube) en majuscules et en AltGr la fameuse fonction
  Compose ; vous pouvez bien sur dcider d'attribuer Compose  une autre
  touche ; je vous recommande toutefois d'utiliser ScrollLock, bien
  moins utilise que les autres touches.

  NB : La touche carr/cube), peu utilise, est par dfaut assigne aux
  guillemets franais carr et cube restant accessible respectivement en
  AltGr et AltGr + Shift ainsi que par l'accent circonflexe suivi du
  chiffre.

  Pour modifier ce comportement par dfaut, il vous suffit avant
  d'utiliser les fichiers de configuration pour XFree et linux en mode
  console de reprer la ligne mise en commentaire au dbut du fichier et
  de supprimer ce commentaire !


  66..  RRggllaaggee dduu ccllaavviieerr ppoouurr lleess aapppplliiccaattiioonnss eenn mmooddee tteexxttee



  66..11..  TToouutt dd''aabboorrdd


  Le huitime bit doit survivre  l'entre du noyau, assurez-vous-en
  donc avec :

  stty cs8 -istrip -parenb

  Ensuite, il convient de s'assurer que l'application est apte 
  supporter les caractres 8 bits : par exemple, ispell n'est pas
  compil pour des caractres 8 bits par dfaut : il faut le recompiler
  sans l'option :

  -NO8BIT


  66..22..  AAppppeelleerr llaa ppoolliiccee


  Charger une police de caractres adaptes :

  setfont /usr/lib/kbd/consolefonts/xxx-NNN


    xxx repsente le type de police ; il doit s'agir d'une iso01/lat1
     ou iso15/lat0 pour les francophones sinon il n'y a plus de
     caractres tendus (voyelles accentus, symboles de ponctuation
     comme paragraphe... )


    NNN reprsente la taille individuelle de chaque caractre ; 08 est
     presque illisible mais 16 est un peu gros...  rgler selon les
     gots de chacun.


  66..33..  UUnnee ppoolliiccee,, ddeess ppoolliicceess......


  De nous jours, une nouvelle norme latin0 (iso-8859-15) vient
  d'apparatre, destine  remplacer l'ensemble des polices europennes
  par une seule.

  Son but est voisin de l'unicode, mais elle  l'avantage d'tre plus
  lgre que celui-ci et d'tre applicable tout de suite.

  Elle apporte notamment des caractres qui manquaient beaucoup pour les
  franais et les finlandais :


    e dans l'o en majuscule et minuscule pour les franais, par
     exemple pour les mots oeuf, coeur, boeuf, oeil ...

    s chapeau invers en majuscule et minuscule pour les finlandais

    z chapeau invers en majuscule et minuscule pour les finlandais

    l'EURO pour tous les pays europens

  Cette nouvelle norme, iso-8859-15 latin9 aussi connue sous le nom
  gnrique latin0, reste cependant encore trs peu rpendue par rapport
   la norme actuelle iso-8859-1 latin1.

  Pour l'utiliser, vous devez tlcharger les fichiers correspondants
  sur par ftp.

  Tapez donc :


       ftp ftp.linux.france.com
       cd pub/
       cd french
       get latin0.tgz
       exit




  Vous trouverez dans l'archive latin0.tgz :


    des polices .psf  mettre dans /usr/lib/kbd/consolefonts/, que l'on
     peut essayer avec setfont

    des polices .pcf  mettre dans /usr/X11R6/lib/X11/fonts/misc/, que
     l'on peut utiliser en tapant sous root :



       cd /usr/X11R6/lib/X11/fonts/misc/
       mkfontdir
       xset +fp /usr/X11R6/lib/X11/fonts/misc/





  Puis en choissant dans xfontsel les polices d'encdng (encodage) 15 
  utiliser avec ses diverses applications.

    de nouvelles tables de clavier pour linux-console et X supportant
     les nouveaux caractres latin9

  En attendant, ric Dubreuil (ericdub  club-internet.fr) nous
  conseille la police lat1u-16.psf, permettant d'avoir tous les
  caractres accentues sans pour autant enlaidir mc, un gestionnaire de
  fichier trs populaire mais trs sensible  la police utilise !

  Une alternative est l'unicode, mais les programmes l'utilisant sont
  encore trop peu nombreux pour qu'elle soit valable.

  Citons quand mme yuedit et le projet 9 (9term, 9wm...) qui
  utilisent l'unicode sous X, avec plus ou moins de succs.

  En revanche, sous linux-console, tout programme peut utiliser
  l'unicode.

  Mais, hlas!, aussi grande que soit la mmoire des cartes vidos
  actuelles, elle ne peut charger l'intgralit des caractres d'une
  police unicode.

  Il existe donc des jeux de caractres limits mais bien utiles pour
  les langues baltiques, asiatiques, est-africaines...

  Essayez par exemple ce fichier unicode-lance pour passer en mode
  unicode:



       #!/bin/sh
       echo -e '\033%8'
       kbd_mode -u
       loadkeys french-unicode.map
       setfont lat1u-16.psf -m null




  et ce fichier latin-retourne pour revenir en mode latin normal:



       #!/bin/sh
       echo -e '\033%@'
       kbd_mode -a
       loadkeys french.map
       setfont lat1u-16.psf -m null





  66..44..  LLeess mmeessssaaggeess eenn ffrraannaaiiss


  Linux en 'version franaise' existe... mais ne semble pas facile 
  obtenir.

  La librairie locale(7) utilise par la librairie C se sert de
  variables d'environnement pour dfinir les prfrences linguistiques
  et nationales


    LC_COLLATE  quivalence de caractres pour les comparaisons.  (ex:
      peut tre quivalent  ae)

    LC_CTYPE    caractres affichables

    LC_MONETARY monnaie utilise

    LC_MESSAGES langue des messages

    LC_TIME     format de la date

    LC_ALL      valeur par dfaut des variables prcedentes

    LANG        surpasse les variables prcdentes.

  Les valeurs utilisables pour le franais sont:


    fr franais gnrique

    fr_FR franais de France

    fr_BE franais de Belgique

    fr_CH franais de Suisse

    fr_LU franais du Luxembourg

    fr_CA franais du Canada

  Par exemple, si la monnaie vous importe peu, vous pouvez indiquer



          export LANG=fr




  Les donnes correspondantes aux prfrences se trouvent gnralement
  dans /usr/share/locale. S'ils manquent, vous pouvez rcuperer leur
  source sur ftp://dkuug.dk/i18n/WG15-collection

  Pour se faire SON linux en franais il faut en pratique disposer des
  sources de la libc et d'un minimum de comptences (langage C).

  Voici donc, pour la bonne bouche, quelques renseignements collects...

  Laurent Chemla nous pilote :  Si j'ai suivi, il y a deux trucs qui
  font la meme chose, d'ou embrouille, les locales et un truc appel
  nls.

  Les locales, sous Linux, a va par dfaut dans /usr/lib/locale, et a
  contient de quoi prciser entre autres le format des nombres
  (LC_NUMERIC), les retours des fonctions ctype (isalpha etc)
  (LC_CTYPE), le format des sommes d'argent (LC_MONETARY), le format des
  dates (LC_TIME) et encore d'autres dtails. Sur certains Unix, il y a
  aussi LC_MESSAGES, qui contient les messages de l'OS dans la langue
  choisie par la variable d'environnement LC_MESSAGES. Pas sous Linux.
  Sous Linux, c'est nls qui fait a, et de fait, nls gre un fichier qui
  est dans /etc/locale/.  (NDG : De nos jours, ils se trouvent plutt
  dans /usr/lib/locale) D'o l'embrouille. Ils auraient mis a dans
  /usr/lib/nls, comme tout le monde, a aurait evite la confusion. Mais
  bon.


  Donc, si l'on veut se tenir  jour d'nls, il suffit d'aller dans les
  sources de libc/nls, faire 'make french' et copier libc.dat dans
  /etc/locale/C/libc.dat et toc, tous les messages sont en francais. Y
  compris ceux des programmes qui n'utilisent pas setlocale(): c'est
  perror() qui fait le boulot (du moins je suppose).

  Si l'on veut en plus que les programmes qui utilisent setlocale()
  utilisent nos rgles franaises, l il faut aller dans les sources de
  libc/locale et dans chacun des sous-rpertoires jeter un oeil sur le
  fichier exemple, le modifier pour le franais (c'est des tout petits
  fichiers), et faire 'make', avant de copier le rsultat dans
  /usr/lib/local/fr/ et de faire un 'export LC_ALL=fr'.  

  Autre astuce pour mnager les vieux logiciels :

  cd /usr/lib ln -s /usr/share/locale

  Nat Makarvitch rapelle  juste titre que site FTP du LIP6 offre de
  nombreux documents et fichiers utiles, en particulier :


    Les pages de manuel en franais (archive man-fr-*) adaptes par C.
     Blaess. Il suffit d'extraire le contenu de l'archive dans le
     rpertoire /usr/man/fr.

    Une intressante documentation technique : locale.fr (P. D'Cruze,
     adapte par . Dumas)

  Pour en apprendre davantage lire la page de manuel de locale
  (bibliothque de pages de manuel 5 ou 7).


  66..55..  LLeess vvaarriiaabblleess


  Ces variables doivent tre exportes  chaque login : mettez les donc
  dans .bashrc et .bash_profile, .tcshrc ou /etc/profile :



       # pour tcsh, utiliser setenv au lieu de export, par exemple setenv LANG fr

       # Les locales
       LC_CTYPE=ISO-8859-1
       LANGUAGE=fr
       LC_MESSAGES=fr
       LC_ALL=fr
       LANG=fr
       LESSCHARSET=latin1
       export LC_CTYPE LANGUAGE LC_MESSAGES LC_ALL LANG LESSCHARSET

       # Les raccourcis : sans ll ou d, impossible de voir les fichiers comprenant des
       # caractres 8 bits ...
       alias q="cd .."
       alias ll="ls --color=auto -a -N -l"
       alias d="ls --color=auto -a -N"
       alias indent="indent -kr"
       alias netscape="export LC_ALL=en_EN ; netscape $* ; LC_ALL=fr_FR"

       # Au cas o del/backspace ne fonctionne pas, essayez l'un des deux :
       #stty erase ^?
       #stty erase ^H




  N'oubliez pas : tous les fichiers ici cits dont le nom commence par
  . doivent se trouver dans votre rpertoire maison !


  66..66..  LLeess ccaarraaccttrreess 88 bbiittss ddaannss lleess pprrooggrraammmmeess uuttiilliissaanntt rreeaaddlliinnee
  tteellss bbaasshh oouu nnccffttpp......


  Readline est une librairie de saisie de caractres avec historique et
  completion ; elle est utilise par de nombreux programmes (bash,
  ncftp, gnuplot...).

  Par dfaut, le 8 me bit sert  coder la touche Meta.

  Elle est utilise pour coder certaines commandes mais la touche Escape
  (ou Echap) peut la remplacer.

  Si vous souhaitez voir et saisir des accents avec les applications
  complies avec readline, comme bash pour les versions suprieures 
  1.13, ajoutez ceci dans votre fichier $INPUTRC (par dfaut ~/.inputrc)
  :



       # Permettre de rentrer & recevoir des caractres accentus
       set meta-flag on
       set convert-meta off
       set input-meta on
       set output-meta on

       # Pas de bip audible mais visible
       # set bell-style visible

       # Pour faire marcher Home, End, Delete, Esc + Delete & Esc + Backspace
       "\e[1~":beginning-of-line
       "\e[3~":delete-char
       "\e[4~":end-of-line
       "\e\C-h": backward-kill-word
       "\e\e[3~": kill-word




  Cel vous permettra d'effacer des caractres vers l'avant avec Delete
  et vers l'arrire avec Backspace, ceci n'tant pas prvu sur les
  tables de clavier par dfaut mimant le comportement d'un clavier de
  console VT100 .

  Les deux dernires options vous permettront d'utiliser Home et End
  pour aller au dbut et  la fin de la ligne en cours d'dition.

  Pour pouvoir employer une touche il suffit d'obtenir son code et
  l'associer  une fonction grce  ce fichier ; pour obtenir le code
  d'une touche invoquer cat puis appuyer sur la touche : son code
  apparat.

  Le code physique :



        ^[





  correspond  la squence d'chappement.

  Par exemple, si le code de Home est ^[[7  il suffit d'ajouter une
  ligne



       "\e[7~": beginning-of-line




  au .inputrc.

  Plus de documentation est disponible sur la page de manuel de bash,
  section READLINE.

  On peut aussi, grce  la variable d'environnement INPUTRC, utiliser
  un fichier commun  tous les utilisateurs.

  Enfin, je vous recommande d'utiliser ce fichier .bashrc ( placer dans
  votre rpertoire maison) :












































  # ~/.bashrc : execut par bash(1) pour les shells lancs aprs le login.

  # Le path
  PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/local/bin"

  # Le prompt
  PS1="(\u@\h:\W)$ "

  # L'utilisateur
  ENV=$HOME/.bashrc
  USERNAME="votre nom"

  # Les locales
  _CTYPE=ISO-8859-1
  LANGUAGE=fr
  LC_MESSAGES=fr
  LC_ALL=fr
  LANG=fr
  LESSCHARSET=latin1
  export LC_CTYPE LANGUAGE LC_MESSAGES LC_ALL LANG LESSCHARSET

  # Les raccourcis
  alias q="cd .."
  alias ll="ls --color=auto -a -N -l"
  alias d="ls --color=auto -a -N"
  alias indent="indent -kr"
  alias elm-box="elm -f ~/Mail/Inbox"
  alias ftp=ncftp
  alias tin=rtin
  alias netscape="export LC_ALL=en_EN ; netscape $* ; LC_ALL=fr_FR"

  # Au cas o del/backspace ne fonctionne pas, essayez l'un des deux :
  #stty erase
  #stty erase ^H

  # Refuser le talk & le write
  #mesg n

  # Permettre les coredumps
  #ulimit -c nombre_max_de_Ko

  #Fixer le masque de creation de fichiers
  #umask 022




  Le fichier .bash_profile execut par bash(1) lors les logins, y est
  strictement identique mais peut, si vous le voulez, prsenter des
  diffrences pour afficher par exemple une citation en laant le
  programme fortune.


  66..77..  zzsshh

  Celui-ci se contente d'un stty pass8.


  66..88..  ttccsshh


  Pour tcsh, placer, dans le fichier /etc/csh.login (ou dans les
  fichiers .tcshrc des utilisateurs concerns) les variables indiques
  plus haut en remplaant export par setenv:


       setenv LC_CTYPE=ISO-8859-1
       setenv LANGUAGE=fr
       setenv LC_MESSAGES=fr
       setenv LC_ALL=fr
       setenv LANG=fr
       setenv LESSCHARSET=latin1





  66..99..  PPoouurr ttoouuss lleess sshheellllss


  Remplacer 'iso_8859_1' par 'iso-8859-1' si cela ne fonctionne pas,
  voire french.iso88591.fr_FR (ou fr_BR, fr_CA, fr_CH, fr_LU ...)

   propos de LANG, Pablo Saratxaga signale qu'il vaut mieux viter
  fr_FR : Par ailleurs je conseille un simple "fr" plutt que fr_FR
  etc.  Certains programmes n'aiment pas trop (ils ne passent pas
  vraiment par la resolution de locales mais lisent LANG
  directemment...)

  Si nls est install, les routines correspondantes sont utilises,
  sinon tcsh agit en iso_8859_1, quelle que soit les valeurs donnes 
  LANG et LC_CTYPE : cf. la section NATIVE LANGUAGE SYSTEM de tcsh(1).

  Selon le Danish-HOWTO, utiliser :



       (guylhem@barberouge:tcsh)# setenv LC_CTYPE ISO-8859-1
       (guylhem@barberouge:tcsh)# stty pass8





  66..1100..  LL''hheeuurree


  Rien n'est plus facile que de laisser  Linux le soin de passer de
  l'heure d't  l'heure d'hiver et rciproquement...

  a) D'abord, quelle heure est-il :-) ?

  Aprs avoir regard sur la pendule la plus proche de vous, tapez :

  clock

  puis

  date

  La premire heure est celle du bios, la seconde celle calcule par
  Linux  partir de /etc/zoneconfig.

  Pour peu que vous ayez install timezone, votre machine peut jongler
  aisment entre les diffrents fuseaux horaires... ce que les DOS ou
  Windows ne permettent pas !

  b) L'heure du choix !

  De l, deux possibilites : soit vous dcidez de laisser l'heure
  systme  l'heure locale (peu pratique, except si vous hbergez aussi
  sur votre disque dur ces systmes d'exploitation peu volu, ne
  sachant mme pas exploiter les fuseaux horaires), soit vous passez 
  l'heure de Greenwich, Linux se chargeant de l'adapter  votre fuseau
  horaire.

  Dans ce cas, les grands voyages  l'tranger avec un portable tout
  neuf quip de Linux se feront en toute simplicit : le dernier
  pargraphe vous expliquera comment changer de fuseau horaire
  facilement...

  c) Le rglage

  Pour procder, regardez d'abord si l'heure systme retourne par clock
  est l'heure locale ou l'heure de Greenwich (vous avez bien regard une
  pendule comme je vous le conseille plus haut, n'est-ce pas ?).

  Si clock vous retourne l'heure locale, il va falloir jongler un peu
  avec les fuseaux horaires, sinon passez directement  l'tape rglage
  du fuseau.


    Pour les franais, belges wallons et suisses romands :

  Vous tes normalement dans une zone horaire MET (Medium European Time,
  soit GMT+1).

  La zone MET DST correspond elle  l'heure d't active (GMT + 2).

  Selon les dcisions futures de la cour europenne, l'heure d't
  (daylight savings) risque d'tre abandonn...  ce qui compliquera
  cette explication !


    Pour les canadiens franais :

  Vous tes dans une zone horaire GMT-4 si vous habitez autour de
  Montral .

  Pour les autres provinces, consulter un dictionnaire !

  Premirement, effacez le fichier /etc/localtime ou
  /usr/lib/zoneinfo/localtime (l'emplacement varie selon les
  distributions ; si vous avez les deux fichiers, effacez /etc/localtime
  : l'autre fichier doit certainement tre un lien vers /etc/localtime).

  Ds lors, clock et date doivent vous retourner la mme heure...



    Pour les canadiens franais : utilisez GMT+4


    Pour les franais, belges wallons et suisses romands :

  Si vous lisez ce document en t, le dcalage de l'heure locale par
  rapport  l'heure de Greenwich est de deux heures, on va donc mettre
  temporairement le fuseau en GMT-2, soit vous lisez ce document en
  hiver et il convient de remplacer tous les 2 par des 1 dans les
  exemples suivants...

  GMT-2 ?!!? Alors que le fuseau est GMT+2 ?

  Ceci va vous retourner l'heure de Greenwich dont on a besoin pour
  rgler le systme : tapez :

  ln -sf /usr/lib/zoneinfo/Etc/GMT-2 /etc/zoneconfig

  clock

  date

  L'heure calcule correspond donc  l'heure de Greenwich, l'heure
  systme  l'heure locale... soit l'inverse de ce que l'on veut.

  Un simple : clock -w

  Va alors mettre l'heure du systme en heure de Greenwich, utilisant
  pour cel l'heure locale inverse volontairement avec l'heure systme.

  d) Rgler le fuseau horaire :

  Tapez alors : ln -sf /usr/lib/zoneinfo/Europe/Votre-ville
  /etc/zoneconfig

  Et voil ! Le systme est  l'heure de Greenwich, la conversion vers
  le fuseau horaire local et l'heure d't se faisant automatiquement.

  Si vous habitez hors Europe, procdez de mme en remplaant les -2
  par X, X reprsentant l'oppos de votre dcalage horaire (par
  exemple -4 au Qubec, donc X=+4...)

  e) Modifier le fuseau horaire :

  Si vous partez  l'tranger, il est alors simple de modifier l'heure
  locale de votre portable : par exemple si vous partez pour Moscou :

  ln -sf /usr/lib/zoneinfo/Europe/Moscow /etc/zoneconfig

  Trs simple et trs utile : plus besoin de se souvenir du dcalage
  horaire (plus ou moins X heures) puisque Linux se charge dsormais de
  tout !


  66..1111..  vvii


  Normalement, aucune modification n'est ncessaire  part l'utilisation
  de loadkyes (dtaille plus haut).

  Ce fichier .vimrc pourrait toutefois vous tre utile si vous utilisez
  vim au lieu d'elvis :






















  " Les guillemets anglais " signifient mis en commentaire

  " viter un avertissement version incorrecte :
  version 4.0

  " Police  utiliser sous X11 :
  "set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1

  " Fixer la csure automatique de la ligne  N caractres :
  set tw=79

  " Indentation (pour les programmeurs) :
  " set cindent

  " Rglages souris :
  "set mouse=a

  " Ligne
  set nowrapscan

  " Montrer les correspondances :
  set showmatch

  " Montrer le mode
  set showmode

  " Indentation intelligente (pour les programmeurs) :
  " set uc=0

  " Faire fonctionner backspace :
  set t_kD=^?

  " Doit se trouver aprs
  map ^H X

  " Faire fonctionner delete  :
  map \e[3~ x

  " Cacher la souris lorsqu'on tape :
  set mousehide

  " Faire voir les correspondances lors de recherches :
  " set hlsearch

  " Colorer  l'intrieur des commentaires en C :
  let c_comment_strings=1

  " Couleur pour xiterm, rxvt, nxterm, color-xterm :
  if has("terminfo")
      set t_Co=8
      set t_Sf=\e[3%p1%dm
      set t_Sb=\e[4%p1%dm
   else
      set t_Co=8
      set t_Sf=\e[3%dm
      set t_Sb=\e[4%dm
  endif

  " Coloration syntaxique :
  if ett_Co > 1
     syntax on
  endif

  " Autoriser l'dition de fichiers gzipps

  augroup gzip
    " Supprimer toutes les autocommandes
    au!
    autocmd BufReadPre,FileReadPre        *.gz set bin
    autocmd BufReadPost,FileReadPost      *.gz '[,']!gunzip
    autocmd BufReadPost,FileReadPost      *.gz set nobin
    autocmd BufReadPost,FileReadPost      *.gz execute ":doautocmd BufReadPost " .  expand("%:r")

    autocmd BufWritePost,FileWritePost    *.gz !mv <afile> <afile>:r
    autocmd BufWritePost,FileWritePost    *.gz !gzip <afile>:r

    autocmd FileAppendPre                 *.gz !gunzip <afile>
    autocmd FileAppendPre                 *.gz !mv <afile>:r <afile>
    autocmd FileAppendPost                *.gz !mv <afile> <afile>:r
    autocmd FileAppendPost                *.gz !gzip <afile>:r
  augroup END





  66..1122..  EEmmaaccss


  Voici un fichier de configuration de base pour employer les accents.
  XEmacs les accepte lui par dfaut sans broncher :-)









































    ;;
    ;; Fichier .emacs: initialisation d'emacs
    ;; Tir du Guide du Rootard
    ;;

    (display-time)                     ;; Pour avoir l'heure dans la barre d'tat
    (setq display-time-24hr-format t)  ;; Format 24 heures

    ;; Nouveaux modes
    (autoload 'c++-mode   "cplus-md" "C++ Editing Mode" t)
    (autoload 'perl-mode   "perl-mode" "Perl Editing Mode" t)
    (autoload 'c-mode "c-mode" "C Editing Mode" t)
    ; mieux vaudrait utiliser le "cc-mode"

    (autoload 'jargon-mode "jargon" "Jargon Mode" t)

    ;; Auto-Mode Settings : positionne le mode selon l'extension
    (setq auto-mode-alist
    (append '(("\.c$"  . c-mode)    ;; utilise le mode C++ mme pour C
    ("\.h$"  . c-mode)
    ("\.C$"  . c++-mode)
    ("\.H$"  . c++-mode)
    ("\.cc$" . c++-mode)
    ("\.C$"  . c++-mode)
    ("\.pl$" . perl-mode)           ;; Perl
    ("/tmp/snd\.[0-9]*" . text-mode);; Text (pour le mail)
    ("[Rr][Ee][0-9]*" . text-mode)
    ("\.ada$"  . ada-mode)          ;; Ada
    ("\.spec$"  . ada-mode)
    ("\.body$"  . ada-mode)
    ("makefile$" . makefile-mode)  ;; Makefile
    ("Makefile$" . makefile-mode)
    ("Imakefile$" . makefile-mode))
    auto-mode-alist))

    ; Remapes varies a mettre ici
    (global-set-key "\eg" 'goto-line)       ;; ESC G = Aller  une ligne

    (put 'eval-expression 'disabled nil)

    ;; Accents...
    (standard-display-european 1)
    (load-library "iso-syntax")
    (set-input-mode (car (current-input-mode))
                  (nth 1 (current-input-mode))
                  0)

    ;; Sous X-Window, texte en couleurs (C/C++/Shell/Makefile,etc)
    (cond (window-system
    (setq hilit-mode-enable-list  '(not text-mode)
    hilit-background-mode   'light
    hilit-inhibit-hooks     nil
    hilit-inhibit-rebinding nil)
    (require 'hilit19)
    ))
    (if (not (equal window-system ""))
    (global-set-key "\C-?" 'delete-char))
    ))




  Le Keyboard-HOWTO conseille quand  lui :



            (standard-display-european t)
            (set-input-mode nil nil 1)
            (require 'iso-syntax)
            (load-library "iso-insert.el")
            (define-key global-map [?\C-.] 8859-1-map)




  Nat Makarvitch suggre d'utiliser une version au moins gale  19.27,
  modifier le fichier global (commun  tous les utilisateurs)
  /usr/lib/emacs/site-lisp/site-start.el ou le ./emacs de chaque
  utilisateur concern pour y ajouter :



               (standard-display-european t)
               (set-input-mode (car (current-input-mode))
                 (nth 1 (current-input-mode))
                 0)
               (global-set-key [delete]   'delete-char)
               (global-set-key [home]     'beginning-of-line)
               (global-set-key [end]      'end-of-line)
               (global-set-key [prior]    'scroll-down)
               (global-set-key [next]     'scroll-up)
               (global-set-key [C-right]  'forward-word)
               (global-set-key [C-left]   'backward-word)
               (global-set-key [C-prior]  'beginning-of-buffer)
               (global-set-key [C-next]   'end-of-buffer)
               (global-set-key "\033[A"  'previous-line)
               (global-set-key "\033[B"  'next-line)
               (global-set-key "\033[C"  'forward-char)
               (global-set-key "\033[D"  'backward-char)
               (global-set-key "\033[H"  'beginning-of-line)
               (global-set-key "\033[Y"  'end-of-line)
               (global-set-key "\033[1~" 'beginning-of-line)
               (global-set-key "\033[2~" 'overwrite-mode)
               ;; le delete-char peut correspondre  \004 ou  \033[3~
               (global-set-key "\033[3~" 'delete-char)
               (global-set-key "\033[4~" 'end-of-line)
               (global-set-key "\033[5~" 'scroll-down)
               (global-set-key "\033[6~" 'scroll-up)




  Pour les autres versions :


    19.19 :



               (standard-display-european 1)
               (set-input-mode (car (current-input-mode))
                 (nth 1 (current-input-mode))
                 0)





  Lire  ce propos le fichier emacs.info.

    19.22 :

               (load-library "iso-transl")
               (standard-display-european t)





    Autres :



               (standard-display-european 1)
               (load-library "iso-transl")




  Le mode ispell d'emacs a un certain nombre de dictionaires prdfinis
  qui ne sont pas forcement ceux qui sont en place sur le systme.

  Si vous constatez des problmes, vous devez redfinir la liste ispell-
  dictionary-alist des dictionnaires.

  Cette liste contient :

    le nom du dictionnaire

    la liste des caractres composant un mot

    la lise oppose des caractres ne composant pas un mot

    les caractres de liaison  l'interieur des mots ("-", "'"...)

    vrai ou faux si ces caractres peuvent tre prsents en plusieurs
     exemplaire dans le mot

    une liste d'arguments pour ispell

    le mode d'ispell (tex, nroff..)

  Par exemple, dans le fichier .emacs :



       (setq ispell-dictionary-alist
        '((nil  ; francais.aff
         "[A-Za-z--]" "[^A-Za-z--]"
         "[---']" nil ("-n") "~nroff")
        ("english"  ; rosbif
         "[A-Za-z]" "[^A-Za-z]" "[---']" nil ("-B") nil)
        ("american" ; yankee
         "[A-Za-z]" "[^A-Za-z]" "[---']" nil nil nil)
        ("francais" ; franais
         "[A-Za-z--]" "[^A-Za-z--]"
         "[---']" nil ("-n") "~nroff")
        ("francais-TeX" ; franais
         "[A-Za-z--\\]" "[^A-Za-z--\\]"
         "[---'^`\"]" t nil "~tex")
        ("espanol" ; espa~nol.aff
         "[A-Za-z]" "[^A-Za-z]"
         "[---'^`\"]" t nil "~nroff")
        ("dansk" ; danois et norvgien
         "[A-Za-z]" "[^A-Za-z]"
         "[---'^`\"]" t nil "~nroff")
        ))

  Le dictionnaire "francais-TeX" est un lien symbolique sur "francais"
  qui permet d'ajouter une entre pour les accents  la TeX (ex: \'e).

  Si vous utilisez X11, vous voudrez peut-tre reconstruire les menus et
  il vous faudra recharger une partie de lisp/loaddefs.el dans votre
  .emacs :



       (setq ispell-menu-map nil)

         (if ispell-menu-map-needed
         (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist)))
           name)
           ;; Can put in defvar when external defines are removed.
           (setq ispell-menu-map (make-sparse-keymap "Spell"))
           (while dicts
         (setq name (car (car dicts))
           dicts (cdr dicts))
         (if (stringp name)
         (define-key ispell-menu-map (vector (intern name))
           (cons (concat "Select " (capitalize name))
         (list 'lambda () '(interactive)
           (list 'ispell-change-dictionary name))))))))

         (if ispell-menu-map-needed
         (progn
           ;; Define commands in opposite order you want them to appear in menu.
           (define-key ispell-menu-map [ispell-change-dictionary]
         '("Change Dictionary" . ispell-change-dictionary))
           (define-key ispell-menu-map [ispell-kill-ispell]
         '("Kill Process" . ispell-kill-ispell))
           (define-key ispell-menu-map [ispell-pdict-save]
         '("Save Dictionary" . (lambda () (interactive) (ispell-pdict-save t))))
           (define-key ispell-menu-map [ispell-complete-word]
         '("Complete Word" . ispell-complete-word))
           (define-key ispell-menu-map [ispell-complete-word-interior-frag]
         '("Complete Word Frag" . ispell-complete-word-interior-frag))
           (define-key ispell-menu-map [ispell-continue]
         '("Continue Check" . ispell-continue))
           (define-key ispell-menu-map [ispell-region]
         '("Check Region" . ispell-region))
           (define-key ispell-menu-map [ispell-word]
         '("Check Word" . ispell-word))
           (define-key ispell-menu-map [ispell-buffer]
         '("Check Buffer" . ispell-buffer))
           (define-key ispell-menu-map [ispell-message]
         '("Check Message" . ispell-message))
           (define-key ispell-menu-map [ispell-help]
         '("Help" . (lambda () (interactive) (describe-function 'ispell-help))))
           (put 'ispell-region 'menu-enable 'mark-active)))

         (fset 'ispell-menu-map (symbol-value 'ispell-menu-map))





  66..1133..  lleessss


  /etc/profile ou les fichiers de dmarrage du shell (comme .bashrc et
  .bash_profile dans votre rpertoire maison) doivent contenir :



  export LESSCHARSET=latin1




  Comme fichier .lessrc je vous recommande :



       \e[B    forw-line
       \e[A    back-line
       \e[6~   forw-scroll
       \e[5~   back-scroll
       \e[1~   goto-line
       \e[4~   goto-end
       \e[C    next-file
       \e[D    prev-file
       \eOA    back-line
       \eOB    forw-line




  Pour rentrer un Esc (parfois nomm chap) taper \e ou, sous vi,
  mettez vous en mode insertion avec i puis tapez ctrl+v et enfin esc.

  Ce fichier permet d'utiliser les touches Home, End,, PagerUp &
  PageDown.

  Pour s'en servir, taper :



       lesskey -o .less .lessrc




  N'oubliez pas de mettre le fichier .less dans votre rpertoire maison
  : il permet d'employer les touches flches, Page_up, Page_down, Home
  et End.

  Ne pas ngliger la page de manuel de less car il peut tre intressant
  de changer la valeur de sa variable d'environnement de configuration
  ("LESS").

  J'utilise : '-C -M -i -x2'


  66..1144..  llss


  Utilisez les options :



       -N --color=auto




  ou, plus simplement, dfinissez dans les fichiers de dmarrage de
  votre shell les alias suivants permettant de voir les fichiers dont le
  nom comprend des caractres 8 bits :


       alias ll="ls --color=auto -N -l -a"
       alias d="ls --color=auto -N"




  Un simple d remplacera le classique ls, en y ajoutant la couleur,
  alors que ll vous offrira une liste complte de tous les fichiers
  prsents dans le rpertoire, avec leurs attributs, leurs tailles...

  Pablo Saratxaga conseille d'utiliser --color=auto car --color=yes
  fera avoir des codes escape ansi mme lorsqu'on redirige vers un pipe
  un fichier o que le terminal ne supporte pas la couleur... ce n'est
  pas ce qu'on voudrait.


  66..1155..  fflleexx


  Donnez l'option :



       -8




  si l'analyseur gnr doit accepter les entrees 8-bits (bien sur qu'il
  doit le faire !).


  66..1166..  eellmm


  Rajoutez ces trois lignes dans votre .elm/elmrc :



         charset = iso-8859-1
         displaycharset = iso-8859-1
         textencoding = 8bit





  66..1177..  ccooll


  Assurez-vous :

  1) qu'il a t corrig et fasse un



       setlocale(LC_CTYPE,"");




  2) de dfinir




  LC_CTYPE=ISO-8859-1




  dans l'environment.


  66..1188..  rrllooggiinn


  Utilisez l'option :



       -8





  66..1199..  jjooee


  Utiliser ftp://sunsite.unc.edu:/pub/Linux/apps/editors/joe-2.8.tar.gz
  ou plus rcent qui devraient fonctionner aprs dition du fichier de
  configuration : placer l'option -asis dans /usr/lib/joerc en premire
  colonne.


  66..2200..  TTeeXX eett LLaaTTeeXX


  Le plus simple consiste  employer GuTemberg, une distribution de
  LaTeX avec tous les dfauts rgls pour des francophones par des
  francophones !

  Mais si vous prfrez une version standard non modifie, il suffit
  d'ajouter au dbut de chaque fichier :


    Pour LaTeX:



       \documentstyle[isolatin]{article}





    Pour LaTeX2e:



       \documentclass[12pt,a4paper]{letter}
       \usepackage{isolatin1}
       \usepackage[french]{babel}
       \usepackage{t1enc}





  ou alors :

       \usepackage[latin1]{inputenc}
       \usepackage[T1]{fontenc}




  Au cas o votre distribution soit trop vieille pour l'inclure,
  isolatin.sty est disponible sparment sur :
   ftp.vlsivie.tuwien.ac.at/pub/8bit

  Pour gs et xdvi, il faut utiliser des options speciales (sur ma
  machine, ce sont des alias). En effet, ils sont souvent configurs
  pour un papier de taille anglo-saxonne.

  Ces options sont les suivantes :

  gs -sPAPERSIZE=a4 xdvi -paper a4 ghostview -a4

  Pour que dvips convertisse les documents dans un format papier a4, il
  faut specifier dans le fichier config.ps (le chemin varie en  fonction
  des versions de LaTeX) : /usr/lib/texmf/dvips/config.ps ou .dvipsrc

  @ a4 210mm 297mm @+ ! %%DocumentPaperSizes: a4 @+ %%PaperSize: a4 @+
  %%BeginPaperSize: a4 @+ a4

  Sinon ajoutez  votre .Xresources :



       XDvi.paper:             a4
       Ghostview.pageMedia:    A4





  66..2211..  MMaannuueell


  Tout d'abord, il faut vous procurer les pages de manuel Linux
  traduites en franais sur ftp.lip6.fr/pub/linux

  Si vous utilisez une distribution RedHat ou Debian, celles-ci sont
  prsentes sur le cdrom : il suffit de les slectionner lors de
  l'installation.

  De l, deux possibilites :


    soit vous ne voulez que des manuels en franais, auquel cas il faut
     faire un :



       export MANPATH=/usr/man/fr_FR





  NB: fr_FR se remplace par fr_BE, fr_CA, fr_CH ou fr_LU selon le pays
  concern.

    soit vous prfrez par dfaut des manuels en franais et si la page
     n'existe pas, vous vous rabattez vers l'anglais, il suffir alors de
     taper :
       export LANG=fr




  man ira chercher dans le MANPATH des pages en LANG par dfaut et
  se rabattra sinon sur des pages en anglais.


  66..2222..  CCoorrrreecctteeuurr oorrtthhooggrraapphhiiqquuee iissppeellll


  Vous pouvez vous le procurer sur son site original HYDRO-QUBEC :
  ftp.ireq-robot.hydro.qc.ca:/pub/ispell/francais-IREQ-1.3.tar.gz

  ou sur : ftp.lip6.fr/pub/ispell/francais

  Un fichier LISEZMOI explique pas  pas et en franais l'installation.


  66..2233..  LLeess ccllaavviieerrss 110055 ttoouucchheess


  Aussi appels claviers Microsoft (tm), ils ont trois touches de plus
  que les claviers normaux.

  Comment s'en servir ?

  En mode console, diter french.map et dcommenter les lignes en
  parlant !

  De mme pour french (pour Xwindow).


  66..2244..  PPGGPP



  Tout d'abord, un avertissement : ce paragraphe n'est destin qu'aux
  francophones ne vivant pas en France, mme malgr les modifications
  rcentes de la loi !

  En effet, en France, en Iran, en Irak et dans quelques autres pays
  totalitaires, l'utilisation de logiciels de cryptographie est
  considre comme usage d'armes de guerre, ce qui est punissable par la
  loi !

  Donc sautez ce paragraphe si votre lgislation locale ne permet pas
  d'utiliser des logiciels de cryptographie.

  Premirement, il faut se procurer pgp-international ( cause de
  problmes de patentes et de lgislation sur l'export d'armes de
  guerre, il existe pgp-us et pgp-international, ce dernire tant dot
  d'un algorythme encore plus puissant) sur :
  ftp://ftp.ifi.uio.no/pub/pgp/

  Ensuite, mettre dans votre rpertoire maison, dans un sous rpertoire
  .pgp les fichiers :








  config.txt
  language.idx
  pgpdoc1.txt
  pgpdoc2.txt
  language.txt
  fr.hlp
  en.hlp
  pgp.hlp




  Enfin, diter le fichier .pgp/config.txt pour y rajouter :



       Language = fr
       CharSet = latin1




  Lisez ensuite .pgp/fr.hlp pour apprendre  vous servir de pgp !


  66..2255..  IImmpprreessssiioonn eenn mmooddee aasscciiii


  Pierre-Charles David (pcdavid  club-internet.fr) vous donne ce truc :

  Pour l'impression de texte simple, beaucoup d'imprimantes attendent
  des lettres en codage IBM (celui utilis par MS-DOS).

  Si le fichier est cod en latin1, on doit utiliser 'recode
  latin1:ibmpc' ( placer dans les filtres lpr de /etc/ par exemple),
  sous peine de voir imprimer des 'alpha'  la place de '', et autres
  choses du mme genre.

  Il existe d'autres utilisation au programme recode : ibmpc:lat1 ou
  lat1:ibmpc (de ou vers MS-DOS) ou applemac pour Macintosh (tm).


  66..2266..  uunniiccooddee//llaattiinn//ccpp...... jjee nn''aaii ppaass ccoommpprriiss ccee ddeerrnniieerr ppaarraaggrraapphhee !!


  Voici donc plus d'explications grce  Pablo Sartxaga (srtxg 
  chanae.alphanet.ch) dans un message explicant la diffrence
  unicode/latin/cp :


















   DB>   quand on lance "setfont" sans argument
   DB>   il semble qu'on obtienne le meme effet que setfont -u none

  Normal et logique.

   DB>   --> en un mot la table de conversion "unicode" est desactivee
   DB>       ce qui transforme le "e accent aigu (dec 130)" en "thta (dec 233)"

  Non. Il ne transforme rien du tout, il affiche tout simplemment sans
  *aucune* transformation au contraire,  toi de t'assurer que la fonte
  que tu charges possdes les glyphes  la bonne place par rapport au codage
  de caractres que tu utilsies (iso-8859-1).

  Autremment dit si ta fonte n'est pas iso-8859-1 tu dois dire  setfont de
  faire des mappings; en particulier s ic'est une fonte qui utilise l'encodage
  DOS cp437 tu fais "setfont -u cp437 nomdelafonte". Moi par exemple j'aime
  beaucoup la fonte t.fnt de la Slackware, et j'ai donc quelque part
  dans /etc/rc.d/* une ligne "setfont -u cp437 t.fnt"

  Ou alors tu modifies la fonte (il y a un soft qui fait cela avec
  interface svgalib, et un autre qui permet de crer des images an ascii-art,
  un fichier par caractre (256 fichiers donc), il te suffit alors de jongler
  avec les fichiers pour les changer de place et rgnerer la fonte).
  Note cependant que le codage cp437 n'inclus pas tous les caractres de
  iso-8859-1, notamment manquent quasi toutes les majuscules accentues, et
  les lettres  necessaires en portguais. Tu peux toujours modifier la fonte
  pour crer ces caractres manquants.

   DB>   sur ma slackware 3.2, a aucun moment setfont n'apparait dans les scripts
   DB>   de demarrage ni dans les ~/profiles et autres ~/.bashrc

  Donc c'est la fonte dans la ROM de la carte video qui est utilise.

   DB>   et pourtant cette
   DB>   conversion est effectuee correctement puisque j'ai les accents a l'ecran.

  Je suppose que le kernel presupose ( juste titre) que la fonte en ROM video
  est au codage cp437.

   DB>        une fois que je lance "setfont -u none" je perds donc les accents.

  Normal, car ds lors que tu charges une fonte t uest suppose savoir ce que
  tu veux (au contraire de la fonte en ROM o tu n'as pas le choix).
  Autrefois (du temps des 1.2.* et avant) le dfaut de setfont tait cp437
  (et il n'utilsiait pas encore des tables unicode, mais on pouvait
  switcher par \e(B et \e(K entre codage cp437 et iso (on peut toujours
  d'ailleurs)), mais maintenant le dfaut est "straight to font", pas de
  conversion.

   DB>            j'en conclue que linuX utilise la police residente par defaut de
   DB>            la carte EGA/VGA

   DB>        [Q] --> comment retrouver cette police ?

  il y a un programme (don't j'ai oubli malheureusement le nom) qui est
  assez populaire auprs des possesseurs de certaines cartes graphiques chez
  qui le switch X11 -> console bousille les fontes; il permet de faire un dump
  sur un fichier; il faudrait donc que tu le lances avant de modifier la
  fonte avec setfont. Le paquetage s'appelle quelque chose comme SVGATextMode
  ou quelque chose d'approchant.

   DB>     [Q] --> quelle table appeler pour la remapper et ravoir les accents ?

  setfont -u cp437 fontedos

  ou sinon, si tu ne veux pas lancer setfont et tu veux donc garder la fonte
  de la carte graphique; essaye un "echo -e \033(B" (l'ennuyant c'est que tu
  dois le faire dans chaque console)

   DB>                 (en general setfont -u def.uni (par exemple) renvoie une
   DB>                  erreur : PIO_UNIMAPCLR: Invalid argument et je reste
   DB>                  en caracteres "graphiques")

  Ah ? Chez moi a marche; quels kernel et kbd as-tu ?

  Sinon je te conseille "cp437" plutt que "def", ils font _presque_ la mme
  chose, mais "cp437" est visuellement plus agreable car il remplace les
  caractres non prsents dans la fonte par les lettres non accentues si c'est
  des lettres, C pour  et R pour  et par un carr blanc pour le reste, ce qui
  permtes de garder le formatage et la lecture agreables; "def" lui ne mets
  totu simplement rien pour les caractres manquants, si bien que tu te
  trouves avec des trous, ce qui est l'horreur si tu dites un texte par
  exemple avec vi, puisque le curseur est affich plusieurs caractres
   gauche  cause des caractres de largeur nulle :)

  Essaye aussi la fonte "t.fnt", elle est assez jolie, totue en rondeurs, je la
  trouve rposante, et quand je dois utiliser un PC avec les fontes style
  courier par dfaut je trouve a trs agressif je me demande comment ils
  peuvent travailler avec :)




  Lire aussi les articles de news : "FAQ - les accents franais et
  Usenet" de F.  Yergeau dans groupes fr.usenet.reponses et
  fr.usenet.8bits "ISO 8859-1 National Character Set FAQ" de mike 
  vlsivie.tuwien.ac.at dans comp.answers .


  66..2277..  nnccuurrsseess


  Rappellons que ncurses est un librairie C qui permet de manipuler
  facilement l'affichage en mode console texte : fentrage, lignes de
  saisie, dition de formulaires, couleurs, caractres ALT ascii semi-
  graphique ibm, comme sous dos...


  66..2277..11..  IInnttrroodduuccttiioonn


  Pour les programmes utilisant curses (comme lynx) David Sibley dit:

  La version standard de curses utilise le huitime  bit  pour la vido
  inversee  (voir  le  flag  _STANDOUT  dfini dans
  /usr/include/curses.h).  Cependant, ncurses semble  fonctionner en
  8-bits et affiche le iso-latin-8859-1 correctement.


  66..2277..22..  LLeess aacccceennttss


  Alors Denis BRAUSSEN (PostOffice  mail.dotcom.fr) rpond  cette
  question :

  Pourquoi en utilisant ncurses 4.2 je n'arrive pas  saisir les
  accents franais dans les formulaires ?

  Remarque: les distrib LinuX sont livres en gnral avec la version
  1.9.9e de ncurses, or il se trouve que la librairie form de cette
  version est BUGGE (problmes de rafraichissement des fentres).

  Ne pas utiliser la 1.9.9e donc si on veut travailler avec 'form' : ce
  bug est d'ailleurs clairement nonc sur le site de nucurses, et je
  m'tonne que ce soit justement cette version qui soit encore livre
  sur la plupart des distributions (RedHat 4.2, 5.0, 5.1, SlackWare 3.2,
  Debian 1.9) en tout cas.

  Symptme : la fonction  wgetch() de ncurses renvoie les codes suivants
  :


    je tape '' et wgetch retourne  meta-i    code 233 (decimal)

    "  "   '' "    "        "     meta-h    code 234 (decimal)

    etc

  C'est normal avec les polices iso-8859-1 !

  Il faut installer les "locale" (ben oui, allez savoir pourquoi, sur la
  slackware 3.2 elles ne sont pas installes !).

  Note: les 'locales' sont des fichiers qui vont modifier le
  comportement de certains programmes pour qu'ils s'adaptent aux
  spcificits culturelles du pays .


    rcupererer :

    pour la libc5 la collection de locales POSIX :
     ftp://ftp.lip6.fr/pub/linux/GCC/WG15-collection.linux.tar.gz

    pour la libc6, elle est dans l'ajout localedata :
     ftp://ftp.lip6.fr/pub/gnu/glibc-localedata-2.0.6.tar.gz

    copier dans le rpertoire /usr/share/locale les fichiers fr_FR et
     en_DK (qui est inclus dans fr_FR)

    crer le rpertoire /usr/share/i18n/charmap et copier le fichier
     ISO_8859-1:1987

    faire man localedef et lancer la commande :



                 localedef -f ISO_8859-1:1987 -i fr_FR fr





  Ceci crera l'entre fr dans /usr/share/locale soit :



               /usr/share/locale/fr





  Ce rpertoire devrait maintenant contenir les fichiers





           LC_COLLATE
           LC_CTYPE
           LC_MESSAGES
           LC_MONETARY
           LC_NUMERIC
           LC_TIME





    lire le fichier locale.fr que l'on peut trouver sur le serveur
     ftp.lip6.fr (chercher sous doc, linux...) et dont la traduction
     franaise a t faite par ric DUMAS (hlas ce doc ne traite
     principalement que de LC_MESSAGES.  quand la suite ric ? ;-) )

    complter ventuellement l'intitialisation des variables du shell
     comme dcrit dans la section sur bash ou tcsh

    dans un programme, utilisez la fonction  setlocale() (man
     setlocale.3) pour fixer les paramtres locaux CAR le noyau linux
     initialise toujours cette fonction avec l'argument une locale C
     (POSIX) donc sans accents !



                 setlocale(LC_CTYPE,"fr_FR");





    Hop !! On a nos accents dans ncurses, le plus simplement du monde.


  66..2288..  DDiivveerrss


  Pour les programmes utilisant groff (comme man), utilisez le avec :



       -Tlatin1




  au lieu de :



       -Tascii




  Les vieilles versions de man utilisent aussi col, et le point suivant
  s'applique aussi.

  Une belle discussion sur le thme de l'ISO-8859-1 et sur comment
  manipuler les caractres 8-bits est disponible sur
   ftp://grasp.insa-lyon.fr/pub/faq/fr/accents

  Pour perl, si tout d'un coup aprs une mise  jour il raconte :


       (guylhem@barberouge:guylhem)$ perl
       perl: warning: Setting locale failed for the categories:
               LC_CTYPE LC_COLLATE
       perl: warning: Please check that your locale settings:
               LC_ALL = "fr_FR",
               LC_CTYPE = "ISO-8859-1",
               LC_COLLATE = (unset),
               LANG = "fr"
           are supported and installed on your system.
       perl: warning: Falling back to the "C" locale.
       (guylhem@barberouge:guylhem)$




  Essayez cette solution de Thomas Parmelan (Thomas.Parmelan  efrei.fr)
  :

  En libc6 le format des fichiers binaires de dfinition des locales a
  (encore) chang : il faut les rgnrer  partir des sources
  (WG15collection.tar.tz sur ftp.lip6.fr:/pub/linux/GCC par exemple) et
  des programmes "locale" et "localedef" qui sont fournis dans les
  sources de la libc.

  Sinon tu peux galement essayer ceci (c'est comme cela que a
  fonctionne chez moi en libc-5.4.x) : 



            unset LANG
            unset LC_CTYPE
            unset LC_COLLATE
            export LC_ALL=fr_FR.ISO-8859-1





  77..  RRggllaaggee dduu ccllaavviieerr ppoouurr lleess aapppplliiccaattiioonnss XX

  77..11..  LLeess xxtteerrmmiinnaauuxx ((xxtteerrmm,, nnxxtteerrmm,, rrxxvvtt......))


  Les faire fonctionner avec toutes les touches standard du clavier 102
  touches relve du miracle, quant aux accents, seule une recompilation
  vous permettra de les utiliser !

  Pour xterm, essayez de mettre dans votre .Xdefaults :



       XTerm*eightBitInput: true
       XTerm*eightBitOutput: true
       *customization: -color
       XTerm*VT100*Translations: #override\n\
       XTerm*pointerColor: red
       None<Key>Begin: string(0x1b) string("[1~")\n\
       None<Key>End: string(0x1b) string("[4~")\n\
       None<Key>Prior: scroll-back(1,halfpage)\n\
       None<Key>Next: scroll-forw(1,halfpage)\n\
       Shift<Key>Prior: scroll-back(1,page)\n\
       Shift<Key>Next: scroll-forw(1,page)




  Pablo Saratxaga conseille de rajouter dans .inputrc :



       # pour rxvt
       "\e[7~":beginning-of-line
       "\e[8~":end-of-line
       # pour xterm
       "\e[H": beginning-of-line
       "\e[F": end-of-line




  Benjamin Dauvergne pour sa part ajoute cela au  /.Xdefaults pour
  bnficer d'un xterm au menu des fontes francis :



       XTerm*fontMenu*fontdefault*Label:      Default
       XTerm*VT100*font:              9x15
       XTerm*fontMenu*font1*Label:    Illisible
       XTerm*VT100*font1:             nil2
       XTerm*fontMenu*font2*Label:    Minuscule
       XTerm*VT100*font2:             5x7
       XTerm*fontMenu*font3*Label:    Petit
       XTerm*VT100*font3:             6x10
       XTerm*fontMenu*font4*Label:    Normal
       XTerm*VT100*font4:             fixed
       XTerm*fontMenu*font5*Label:    Moyen
       XTerm*VT100*font5:             7x13
       XTerm*fontMenu*font6*Label:    Tres grand
       XTerm*VT100*font6:             10x20




  Mais ces deux solutions ne vous garantissent pas de rsoudre tous les
  problmes de rxvt et de xterm ...

  Pour les rsoudre sans crer de fichiers dans /usr/X11R6/lib/X11/app-
  defaults, je tiens sinon  votre disposition un xiterm, un terminal X
  supportant *TOUTES* les touches des claviers standard, avec Home, End,
  Page_up (...) et mme le pav numrique, fonctionnant comme en mode
  console, i.e.  Shift-Page_up permettant de faire dfiler une page,
  voire mieux : le pav numrique reconnaissant enfin la diffrence
  entre Verr. Num allum et Verr. Num teint.

  X international terminal (xiterm pour les intimes) est bien sur sous
  GPL et mis  jour pour suivre paralllement l'volution de rxvt.

  Sur par exemple http://www.linux-france.com/prj/xiterm ou sur
  ftp://sunsite.unc.edu/pub vous trouverez donc xiterm, qui remplace
  votre xterm classique en y apportant la couleurs, les accents et les
  touches tendues.

  Pour l'installer, compilez-le, devenez root et tapez :









  rm /usr/X11R6/bin/xterm
  rm /usr/X11R6/lib/X11/app-defaults/xterm
  rm /usr/X11R6/lib/X11/app-defaults/rxvt
  rm /usr/X11R6/lib/X11/app-defaults/Xterm
  rm /usr/X11R6/lib/X11/app-defaults/XTerm
  rm /usr/X11R6/lib/X11/app-defaults/Rxvt
  rm /usr/X11R6/lib/X11/app-defaults/RXvt
  cp xiterm /usr/local/bin

  ln -sf /usr/local/bin/xiterm /usr/X11R6/bin/xterm
  ln -sf /usr/local/bin/xiterm /usr/X11R6/bin/rxvt





  77..22..  LLeess aapppplliiccaattiioonnss MMoottiiff


  L, je n'ai malheureusement aucun remde miracle !

  Utilisez les possibilits du fichier french au lieu des touches mortes
  (AltGr (voyelle) : voyelle accent circonflexe... ) !


  77..33..  LLee mmaannuueell


  Pablo Saratxaga tient  votre disposition un xman modifi pour qu'il
  supporte la variable LANG et puisse afficher les pages en d'autres
  langues qu'anglais.

  Il est disponible sur :

  ftp.lip6.fr:/pub/linux/distributions/redhat-
  contrib/SRPMS/xman-3.1.6-3.src.rpm
  ftp.lip6.fr:/pub/linux/distributions/redhat-
  contrib/i386/xman-3.1.6-3.i386.rpm 


  77..44..  NNuummLLoocckk


  Frdric Petit nous dit que j'ai dcouvert que si l'on met
  ServerNumLock dans la section keyboard de XF86Config, a marche trs
  bien; pour mes propres besoins, j'ai comment cette ligne et j'ai mis
  sur la ligne en-dessous Xleds 2, comme a, sous X11, je suis
  automatiquement en mode NumLock pour le pad numrique et la led
  correspondante est allume ...


  77..55..  XXDDMM


  Frdric Petit nous conseille d'utiliser ce /etc/X11/xdm/Xresources
  afin de ne rencontrer aucun problme avec nos touches spciales
  (Home, End ...) sous X.









  xlogin*login.translations: #override\
        Ctrl<Key>R: abort-display() \n\
        <Key>BackSpace: delete-previous-character() \n\
        <Key>Home: move-to-begining() \n\
        <Key>Delete: delete-character() \n\
        <Key>End: move-to-end() \n\
        <Key>Left: move-backward-character() \n\
        <Key>Return: set-session-argument() finish-field() \n\
        <Key>Right: move-forward-character()





  88..  RReemmeerrcciieemmeennttss


  Ce document ne serait pas ce qu'il est sans l'aide de Nat Makarvitch
  (nat  nataa.fr.eu.org) qui l'a relu et m'a aid  le modifier de
  nombreuses fois.

  Ce document est un hybride nait des French HOWTO 1 et Francophones-
  HOWTO qui a rassembl toutes leurs informations en un seul HOWTO
  destin  la communaut linux francophone.

  La section Configurer les applications en mode texte s'inspire pour
  sa part des paragraphes sur emacs, zsh, tcsh, flex, less, rlogin, joe,
  col et TeX du Guide du Rootard (le second HOWTO  destin  la
  communaut linux francophone

  Rappelons que les sites officiels du Guide du Rootard sont :

  http://www.freenix.fr/linux/Guide

  et

  ftp.lip6.fr:/pub/linux/french/docs/

  Remercions enfin par ordre alphabtique ces contribueurs :

  Jean-Michel Antoine
  Michel Billaud
  Stephane Bortzmeyer
  Rmy Card
  Xavier Cazin
  Laurent Chemla
  Ren Cougnenc
  Bruno Cornec
  Yann Dirson
  ric Dubreuil
  ric Dumas
  Pierre Ficheux
  Laurent Frigault
  Frederic Lepied
  Stephane Marzloff
  Marc Merlin
  Thomas Parmelan
  Thomas Quinot
  David Robert
  Olivier Robert
  Benjamin Ryzman
  Pablo Saratxaga
  Julien Simon
  J.M. Vansteene


  Surtout, si je vous oublie, signalez-le moi !  De mme si vous ne
  voulez plus figurer dans cette liste...

  Envoyez moi vos suggestions et modifications (guylhem  oeil.qc.ca),
  je me ferai un plaisir de les intgrer dans les prochaines versions !

  Signalez-moi aussi les erreurs : cet HOWTO est en perptuel
  changement, avec des nouveauts incluses  chaque version ; des
  erreurs peuvent facilement s'y glisser !


  99..  FFiicchhiieerrss iinncclluuss ddaannss ccee HHOOWWTTOO


  Comme signal plus haut, cette section ne contient que french (pour X
  window) et french.map (pour linux-console).

  Voici french (pour X11,  placer dans /usr/X11R6/lib/X11/xkb/symbols)
  :















































  // French keyboard description, (c) Guylhem Aznar, July 1997
  // Released under GNU GENERAL PUBLIC LICENSE Version 2
  // If you haven't received it, this license is available at :
  // Free Software Foundation, Inc.  675 Mass Ave, Cambridge, MA 02139, USA

  partial hidden alphanumeric_keys modifier_keys
  xkb_symbols "basic" {

  // Description *TOTALE* d'un clavier franais, sans le comparer  un
  // clavier amricain par dfaut : on y gagne plus de flexibilit, ce
  // modle devient plus personalisable ...

  // Les touches , , ,  & , prsentes en mode minuscule (i.e. sans shift)
  // ne sont pas disponibles en mode majuscule car elles sont respectivement
  // remplaces par 2, 7, 9, 0 & % .
  // Pour obtenir les majuscules accentues , , ,  & , vous pouvez soit
  // utiliser AltGr + Shift (minuscule accentue), soit utiliser les accent
  // dits "morts", i.e. fonctionnant comme l'accent circonflexe & le trma .
  // Sont disponibles :  AltGr (1) : accent aig, AltGr (7) : accent grave,
  // AltGr (^) : cdille ; pour s'en servir, procder comme avec l'accent
  // circonflexe & le trma : ex : AltGr (1) + e :  ; AltGr (1) + e :  ...
  // La tilde (~) n'tant pas employe sur des lettres en franais, elle reste
  // en AltGr (2) une touche normale .
  // Une tilde "morte" (avec la cdille "morte") est toutefois disponibles sur la
  // touche accent circonflexe & trma en AltGr + Shift .

  // Au cas o les dead_keys ne fonctionnent pas (certains programmes les
  // refusent), vous pouvez toujours utiliser pour obtenir les voyelles  accent
  // circonflexe &  trma :
  // AltGr (voyelle) : voyelle-minuscule  accent circonflexe
  // AltGr + Shift (voyelle) : voyelle-minuscule  trma
  // AltGr (en dessous de la voyelle) : voyelle-majuscule  accent circonflexe
  // AltGr + Shift (en dessous de la voyelle) : voyelle majuscule  trma

  // Plusieurs lettres trangres, utilises comme signes mathmatiques ou
  // physiques, abbrviations (...) ont t rajoutes en AltGr :
  // T->Phi;, r->(TM), y->yen, c-> et , f->seora, m->seor,
  // g->`, h->', ->, x-> s->, z->, w->Delta;, b->

  // La correspondance essaye de se faire la plus naturelle possible, en mettant
  // ces touches l o l'on s'attend le plus de les trouver ...
  // mais elle est loin d'tre parfaite :^)

  // Modifiez donc  loisir tous ces AltGr, et si vous pensez avoir trouv la
  // configuration ultime permettant d'accder en mieux  toutes ces touches,
  // mailez moi !
  // Vtre arrangement, s'il est vraiement plus pratique, sera inclu dans la
  // prochaine version de la carte de correspondance du clavier !

      name[Group1]= "French";
      key <ESC>   {       [          Escape                       ]       };

  // Deux possibilites pour cette touche "au carr" () :
  // * un mode mathmatique o elle renvoie "au carr" en mode normal, "au cube"
  // si elle est Shifte et "puissance 1" en Alt-gr (pour parler par exemple de
  // m.s- ...)
  // Toutefois, accent circonflexe suivi de 1, 2, 3, -, renvoyant respectivement
  // , ,  et -, cette touche est inutile !

  // * un mode littraire est donc propos par dfault, pour disposer des
  // guillemets franais  &  ; le  et le  restant disponibles
  // respectivement en AltGr et AltGr + Shift .

  //   key <TLDE> {       [     twosuperior,   threesuperior      ],
  //                      [     onesuperior                       ]       };

      key <TLDE>  {       [   guillemotleft,  guillemotright      ],
                          [     twosuperior,   threesuperior      ]       };

      key <AE01>  {       [       ampersand,               1      ],
                          [      dead_acute                       ]       };
      key <AE02>  {       [          eacute,               2      ],
                          [      asciitilde,          Eacute      ]       };
      key <AE03>  {       [        quotedbl,               3      ],
                          [      numbersign                       ]       };
      key <AE04>  {       [      apostrophe,               4      ],
                          [       braceleft                       ]       };
      key <AE05>  {       [       parenleft,               5      ],
                          [     bracketleft                       ]       };
      key <AE06>  {       [           minus,               6      ],
                          [             bar                       ]       };
      key <AE07>  {       [          egrave,               7      ],
                          [      dead_grave,          Egrave      ]       };
      key <AE08>  {       [      underscore,               8      ],
                          [       backslash                       ]       };
      key <AE09>  {       [        ccedilla,               9      ],
                          [     asciicircum,        Ccedilla      ]       };
      key <AE10>  {       [          agrave,               0      ],
                          [              at,          Agrave      ]       };
      key <AE11>  {       [      parenright,          degree      ],
                          [    bracketright                       ]       };
      key <AE12>  {       [           equal,            plus      ],
                          [      braceright                       ]       };
      key <BKSP>  {       [       BackSpace                       ]       };
      key  <TAB>  {       [             Tab,    ISO_Left_Tab      ]       };
      key <AD01>  {       [               a,               A      ],
                          [     acircumflex,      adiaeresis      ]       };
      key <AD02>  {       [               z,               Z      ],
                          [           aring,           Aring      ]       };
      key <AD03>  {       [               e,               E      ],
                          [     ecircumflex,      ediaeresis      ]       };
      key <AD04>  {       [               r,               R      ],
                          [      registered                       ]       };
      key <AD05>  {       [               t,               T      ],
                          [           thorn,           THORN      ]       };
      key <AD06>  {       [               y,               Y      ],
                          [             yen                       ]       };
      key <AD07>  {       [               u,               U      ],
                          [     ucircumflex,      udiaeresis      ]       };
      key <AD08>  {       [               i,               I      ],
                          [     icircumflex,      idiaeresis      ]       };
      key <AD09>  {       [               o,               O      ],
                          [     ocircumflex,      odiaeresis      ]       };
      key <AD10>  {       [               p,               P      ],
                          [       paragraph                       ]       };
      key <AD11>  {       [ dead_circumflex,  dead_diaeresis      ],
                          [    dead_cedilla,      dead_tilde      ]       };
      key <AD12>  {       [          dollar,        sterling      ],
                          [        currency                       ]       };
      key <RTRN>  {       [          Return                       ]       };
      key <AC01>  {       [               q,               Q      ],
                          [     Acircumflex,      Adiaeresis      ]       };
      key <AC02>  {       [               s,               S      ],
                          [          oslash,        Ooblique      ]       };
      key <AC03>  {       [               d,               D      ],
                          [     Ecircumflex,      Ediaeresis      ]       };
      key <AC04>  {       [               f,               F      ],
                          [     ordfeminine                       ]       };
      key <AC05>  {       [               g,               G      ],
                          [       quoteleft                       ]       };
      key <AC06>  {       [               h,               H      ],
                          [      quoteright                       ]       };
      key <AC07>  {       [               j,               J      ],
                          [     Ucircumflex,      Udiaeresis      ]       };
      key <AC08>  {       [               k,               K      ],
                          [     Icircumflex,      Idiaeresis      ]       };
      key <AC09>  {       [               l,               L      ],
                          [     Ocircumflex,      Odiaeresis      ]       };
      key <AC10>  {       [               m,               M      ],
                          [       masculine                       ]       };
      key <AC11>  {       [          ugrave,         percent      ],
                          [       plusminus,          Ugrave      ]       };
      key <BKSL>  {       [        asterisk,              mu      ],
                          [     Greek_OMEGA                       ]       };
      key <LFSH>  {       [          Shift_L                      ]       };
      key <LSGT>  {       [           less,          greater      ],
                          [             bar                       ]       };
      key <AB01>  {       [               w,               W      ],
                          [             eth,             ETH      ]       };
      key <AB02>  {       [               x,               X      ],
                          [              ae,              AE      ]       };
      key <AB03>  {       [               c,               C      ],
                          [            cent                       ]       };
      key <AB04>  {       [               v,               V      ],
                          [       copyright                       ]       };
      key <AB05>  {       [               b,               B      ],
                          [          ssharp                       ]       };
      key <AB06>  {       [               n,               N      ],
                          [         notsign                       ]       };
      key <AB07>  {       [           comma,        question      ],
                          [    questiondown                       ]       };
      key <AB08>  {       [       semicolon,          period      ],
                          [        multiply                       ]       };
      key <AB09>  {       [           colon,           slash      ],
                          [        division                       ]       };
      key <AB10>  {       [          exclam,         section      ],
                          [      exclamdown                       ]       };
      key <RTSH>  {       [         Shift_R                       ]       };

      key <LCTL>  {       [       Control_L                       ]       };
  //    key <LALT>        {       [           Alt_L,          Meta_L      ]       };
      key <SPCE>  {       [           space                       ]       };
  //    key <RALT>        {       [           Alt_R,          Meta_R      ]       };
      key <RCTL>  {       [       Control_R                       ]       };

      key <FK01> {        [        F1             ]       };
      key <FK02> {        [        F2             ]       };
      key <FK03> {        [        F3             ]       };
      key <FK04> {        [        F4             ]       };
      key <FK05> {        [        F5             ]       };
      key <FK06> {        [        F6             ]       };
      key <FK07> {        [        F7             ]       };
      key <FK08> {        [        F8             ]       };
      key <FK09> {        [        F9             ]       };
      key <FK10> {        [        F10            ]       };
      key <FK11> {        [        F11            ]       };
      key <FK12> {        [        F12            ]       };

      key <PRSC> { type= "PC_SYSRQ", symbols[Group1]= [ Print, Execute ] };
      key <SCLK> {  [  Scroll_Lock        ]       };
      key <PAUS> { type= "PC_BREAK", symbols[Group1]= [ Pause, Break ] };
      key  <INS> {  [  Insert             ]       };
      key <HOME> {        [  Home                 ]       };
      key <PGUP> {        [  Prior                ]       };
      key <DELE> { [ Delete               ]                       };
      key  <END> {        [  End                  ]       };
      key <PGDN> {        [  Next                 ]       };

      key   <UP> {        [  Up                   ]       };
      key <LEFT> {        [  Left                 ]       };
      key <DOWN> {        [  Down                 ]       };
      key <RGHT> {        [  Right                ]       };

      key <NMLK> {        [  Num_Lock, Pointer_EnableKeys         ]       };
      key <KPDV> {        [  KP_Divide            ]       };
      key <KPMU> {        [  KP_Multiply          ]       };
      key <KPSU> {        [  KP_Subtract          ]       };

      key  <KP7> {        [  KP_Home,     KP_7    ]       };
      key  <KP8> {        [  KP_Up,       KP_8    ]       };
      key  <KP9> {        [  KP_Prior,    KP_9    ]       };
      key <KPAD> {        [       KP_Add          ]       };

      key  <KP4> {        [  KP_Left,     KP_4    ]       };
      key  <KP5> {        [  KP_Begin,    KP_5    ]       };
      key  <KP6> {        [  KP_Right,    KP_6    ]       };

      key  <KP1> {        [  KP_End,      KP_1    ]       };
      key  <KP2> {        [  KP_Down,     KP_2    ]       };
      key  <KP3> {        [  KP_Next,     KP_3    ]       };
      key <KPEN> {        [       KP_Enter        ]       };

      key  <KP0> {        [  KP_Insert,   KP_0    ]       };
      key <KPDL> {  [  KP_Delete, KP_Decimal ]    };

      modifier_map Shift  { Shift_L       };
      modifier_map Lock   { Caps_Lock     };
      modifier_map Control{ Control_L     };
  //    modifier_map Mod1   { Alt_L, Alt_R, Meta_L, Meta_R };
  //    modifier_map Mod2   { Num_Lock };
      modifier_map Mod3   { Mode_switch   };
  //    modifier_map Mod4   { Meta_L, Meta_R };
  //    modifier_map Mod5   { Scroll_Lock };
  };

  // Touches supplmentaires sur un clavier "Windows95"

  // / (carr/cube) par dfaut puisqu'on a mis les guillemets franais !
  //    key <LWIN> {        [      twosuperior, threesuperior        ],
  //                        [      onesuperior                       ]  };
  //    key <RWIN> {        [      Mode_switch       ]       };
  //    key <MENU> {        [      Multi_key         ]       };


  xkb_symbols "pc101" {
      key <RALT> { [ Mode_switch,  Multi_key ] };
      modifier_map Mod3 { Mode_switch };
  };

  default
  xkb_symbols "pc102" {
      key <RALT> { [ Mode_switch,  Multi_key ] };
      modifier_map Mod3 { Mode_switch };
  };

  xkb_symbols "pc104" {
      key <RALT> { [ Mode_switch ] };
      key <LWIN> { [ Meta_L ] };
      key <RWIN> { [ Multi_key ] };
      key <MENU> { [ Menu ] };
      modifier_map Mod3 { Mode_switch };
  };

  xkb_symbols "pc105" {
      key <RALT> { [ Mode_switch ] };
      key <RWIN> { [ Multi_key ] };
      modifier_map Mod3 { Mode_switch };
  };

  partial alphanumeric_keys
  xkb_symbols "nodeadkeys" {
      include "french(basic)"
      key <AE12> {        [           equal,            plus      ]       };
      key <AD11> {        [     asciicircum,       diaeresis      ]       };
      key <AD12> {        [          dollar,        sterling      ]       };
      key <AB07> {        [           comma,        question      ]       };
  };




  Et enfin voici french.map ( placer dans /usr/lib/kbd/keytables ou
  /usr/share/keytables) :















































  # French keyboard description :
  #
  # Copyright (c) July 1997 Guylhem Aznar <guylhem  oeil.qc.ca>
  # Copyright (c) August 1997 Pierre-Charles David <pcdavid  club-internet.fr>
  #  Ajout : Linefeed, Meta_Control_backslash, Control_backslash, Meta_backslash
  #
  #      This program is free software; you can redistribute it and/or
  #    modify it under the terms of the GNU General Public License version
  #            2 as published by the Free Software Foundation.
  #
  #      This program is distributed in the hope that it will be useful,
  #      but WITHOUT ANY WARRANTY; without even the implied warranty of
  #       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  #               GNU General Public License for more details.
  #
  #      You should have received a copy of the GNU General Public License
  #         along with this program; if not, write to the Free Software
  #          Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
  # Les dfinitions de alt & control (keycode) ne sont qu'optionelles ; n'ont
  # donc t redfinis alt (nombre) et atl + shift (nombre) pour inverser le
  # comportement par dfaut : touche = signe ; touche + shift = nombre, or ici
  # alt touche = Meta_nombre ; alt + shift touche = Meta_signe
  #
  # Shift (pav numrique) pour taper de l'hxadcimal !
  # control alt suppr : rebooter
  # control altgr suppr : arrter
  #
  # ajouter pour ces deux fonction les lignes suivantes  /etc/inittab :
  # ca:12345:ctrlaltdel:/sbin/shutdown -t1 -r now
  # kb:12345:kbrequest:/sbin/halt

  keycode   0 =

  keycode   1 = Escape

  keycode   2 = ampersand        one              dead_acute
          alt     keycode 2 = Meta_one
          alt     shift   keycode 2 = Meta_ampersand

  keycode   3 = eacute           two              tilde            Eacute
          alt     keycode 3 = Meta_two
          alt     shift   keycode 3 = Meta_asciitilde

  keycode   4 = quotedbl         three            numbersign
          alt     keycode 4 = Meta_three
          alt     shift   keycode 4 = Meta_quotedbl

  keycode   5 = apostrophe       four             braceleft
          alt     keycode 5 = Meta_four
          alt     shift   keycode 5 = Meta_apostrophe

  keycode   6 = parenleft        five             bracketleft
          alt     keycode 6 = Meta_five
          alt     shift   keycode 6 = Meta_parenleft

  keycode   7 = minus            six              bar              hyphen
          alt     keycode 7 = Meta_six
          alt     shift   keycode 7 = Meta_minus

  keycode   8 = egrave           seven            dead_grave       Egrave
          alt     keycode 8 = Meta_seven
          alt     shift   keycode  8 = Meta_grave

  keycode   9 = underscore       eight            backslash        macron
          alt     keycode 9 = Meta_eight
          alt     shift   keycode 9 = Meta_underscore

  keycode  10 = ccedilla         nine             circumflex       Ccedilla
          alt     keycode 10 = Meta_nine
          alt     shift   keycode 10 = Meta_asciicircum

  keycode  11 = agrave           zero             at               Agrave
          alt     keycode 11 = Meta_zero
          alt     shift   keycode 11 = Meta_at

  keycode  12 = parenright       degree           bracketright
          alt     keycode 12 = Meta_parenright
          alt     shift   keycode  12 = Meta_bracketright

  keycode  13 = equal            plus             braceright
          alt     keycode 13 = Meta_equal
          alt     shift   keycode  13 = Meta_plus

  keycode  14 = Delete           Remove
          alt     control keycode 14 = Boot
          altgr   control keycode 14 = KeyboardSignal

  keycode  15 = Tab

  keycode  16 = a                A                acircumflex     adiaeresis

  keycode  17 = z                Z                aring           Aring

  keycode  18 = e                E                ecircumflex     ediaeresis

  keycode  19 = r                R                registered

  keycode  20 = t                T                thorn           THORN

  keycode  21 = y                Y                yen

  keycode  22 = u                U                ucircumflex     udiaeresis

  keycode  23 = i                I                icircumflex     idiaeresis

  keycode  24 = o                O                ocircumflex     odiaeresis

  keycode  25 = p                P                paragraph

  keycode  26 = dead_circumflex  dead_diaeresis   dead_cedilla    dead_tilde

  keycode  27 = dollar           pound            currency

  keycode  28 = Return
          alt     keycode  28 = 0x080d
          altgr   keycode  26 = Linefeed

  keycode  29 = Control

  keycode  30 = q                Q                Acircumflex     Adiaeresis

  keycode  31 = s                S                oslash          Oslash

  keycode  32 = d                D                Ecircumflex     Ediaeresis

  keycode  33 = f                F                ordfeminine

  keycode  34 = g                G                acute

  keycode  35 = h                H                periodcentered

  keycode  36 = j                J                Ucircumflex     Udiaeresis

  keycode  37 = k                K                Icircumflex     Idiaeresis

  keycode  38 = l                L                Ocircumflex     Odiaeresis

  keycode  39 = m                M                masculine

  keycode  40 = ugrave           percent         plusminus        Ugrave
          alt     keycode 40 = Meta_semicolon

  # Mode math
  #keycode  41 = twosuperior      threesuperior   onesuperior     periodcentered
  # Mode littraire + math
  keycode  41 = guillemotleft    guillemotright   twosuperior     threesuperior

  keycode  42 = Shift

  keycode  43 = asterisk         mu               onehalf

  keycode  44 = w                W                +eth            +ETH

  keycode  45 = x                X                +ae             +AE

  keycode  46 = c                C                cent

  keycode  47 = v                V                copyright

  keycode  48 = b                B                ssharp

  keycode  49 = n                N                notsign

  keycode  50 = comma            question        questiondown

  keycode  51 = semicolon        period          multiply

  keycode  52 = colon            slash           division

  keycode  53 = exclam           section         exclamdown

  keycode  54 = Shift

  keycode  55 = KP_Multiply      Hex_A           Hex_D

  keycode  56 = Alt

  keycode  57 = space
          control keycode  57 = nul
          alt     keycode  57 = Meta_space
          altgr   keycode  57 = nobreakspace

  # Trs utile pour tous ceux ne disposant pas de leurs deux mains
  keycode  58 =  CapsShift
  # Caps_Lock
  # ou au choix CapsShift ou Caps_On !
          shift   keycode  58 = Shift_Lock
          control keycode  58 = Control_Lock
          alt     keycode  58 = Alt_Lock
          altgr   keycode  58 = AltGr_Lock

  keycode  59 = F1               F11              Console_13
          alt     keycode  59 = Console_1
          control alt     keycode  59 = Console_1

  keycode  60 = F2               F12              Console_14
          alt     keycode  60 = Console_2
          control alt     keycode  60 = Console_2

  keycode  61 = F3               F13              Console_15
          alt     keycode  61 = Console_3
          control alt     keycode  61 = Console_3

  keycode  62 = F4               F14              Console_16
          alt     keycode  62 = Console_4
          control alt     keycode  62 = Console_4

  keycode  63 = F5               F15              Console_17
          alt     keycode  63 = Console_5
          control alt     keycode  63 = Console_5

  keycode  64 = F6               F16              Console_18
          alt     keycode  64 = Console_6
          control alt     keycode  64 = Console_6

  keycode  65 = F7               F17              Console_19
          alt     keycode  65 = Console_7
          control alt     keycode  65 = Console_7

  keycode  66 = F8               F18              Console_20
          alt     keycode  66 = Console_8
          control alt     keycode  66 = Console_8

  keycode  67 = F9               F19              Console_21
          alt     keycode  67 = Console_9
          control alt     keycode  67 = Console_9

  keycode  68 = F10              F20              Console_22
          alt     keycode  68 = Console_10
          control alt     keycode  68 = Console_10

  keycode  69 = Num_Lock         Bare_Num_Lock

  keycode  70 = Scroll_Lock      Show_Memory      Show_Registers  Show_State

  keycode  71 = KP_7             Hex_7
          alt     keycode  71 = Ascii_7

  keycode  72 = KP_8             Hex_8
          alt     keycode  72 = Ascii_8

  keycode  73 = KP_9             Hex_9
          alt     keycode  73 = Ascii_9

  keycode  74 = KP_Subtract      Hex_B            Hex_E
          alt     keycode  74 = minus

  keycode  75 = KP_4             Hex_4
          alt     keycode  75 = Ascii_4

  keycode  76 = KP_5             Hex_5
          alt     keycode  76 = Ascii_5

  keycode  77 = KP_6             Hex_6
          alt     keycode  77 = Ascii_6

  keycode  78 = KP_Add           Hex_C            Hex_F
          alt     keycode  78 = plus

  keycode  79 = KP_1             Hex_1
          alt     keycode  79 = Ascii_1

  keycode  80 = KP_2             Hex_2
          alt     keycode  80 = Ascii_2

  keycode  81 = KP_3             Hex_3
          alt     keycode  81 = Ascii_3

  keycode  82 = KP_0             Hex_0
          alt     keycode  82 = Ascii_0

  keycode  83 = KP_Period         KP_Comma
          altgr   control keycode  83 = KeyboardSignal
          control alt     keycode  83 = Boot

  # SysReq = Alt+Print Screen = 84
  keycode  84 = Last_Console

  keycode  85 =

  keycode  86 = less             greater          bar             brokenbar

  keycode  87 = F11              F11              Console_23
          alt     keycode  87 = Console_11
          control alt     keycode  87 = Console_11

  keycode  88 = F12              F12              Console_24
          alt     keycode  88 = Console_12
          control alt     keycode  88 = Console_12

  keycode  89 =

  keycode  90 =

  keycode  91 =

  keycode  92 =

  keycode  93 =

  keycode  94 =

  keycode  95 =

  keycode  96 = KP_Enter

  keycode  97 = Control

  keycode  98 = KP_Divide

  # Print Screen
  keycode  99 = Control_backslash
          control keycode  99 = Control_backslash
          alt     keycode  99 = Control_backslash

  keycode 100 = AltGr
          alt     keycode 100 = Compose

  # Ctrl+Pause = Break = 101
  keycode 101 = Break

  keycode 102 = Home

  keycode 103 = Up

  keycode 104 = PageUp
          shift   keycode 104 = Scroll_Backward

  keycode 105 = Left
          alt     keycode 105 = Decr_Console

  keycode 106 = Right
          alt     keycode 106 = Incr_Console

  keycode 107 = End

  keycode 108 = Down
          alt     keycode 108 = Last_Console

  # PageDown == Next
  keycode 109 = PageDown
          shift   keycode 109 = Scroll_Forward

  keycode 110 = Insert

  keycode 111 = BackSpace       BackSpace      SAK
          alt     keycode 111 = Meta_backslash
          control keycode 111 = Control_backslash

  keycode 112 = Macro

  keycode 113 = F13

  keycode 114 = F14

  keycode 115 = Help

  keycode 116 = Do

  keycode 117 = F17

  keycode 118 = KP_MinPlus

  keycode 119 = Pause

  keycode 120 =

  keycode 121 =

  keycode 122 =

  keycode 123 =

  keycode 124 =

  # Fentre gauche = Alt puisque d'habitude c'est la position d'Alt !
  keycode 125 = Alt

  # Fentre droite = AltGr puisque d'habitude c'est la position d'AltGr !
  keycode 126 = AltGr

  # Menu = compose (mlanger des signes et des lettres ex : (compose) ' e = 
  keycode 127 = Compose

  string F1 = "\033[[A"
  string F2 = "\033[[B"
  string F3 = "\033[[C"
  string F4 = "\033[[D"
  string F5 = "\033[[E"
  string F6 = "\033[17~"
  string F7 = "\033[18~"
  string F8 = "\033[19~"
  string F9 = "\033[20~"
  string F10 = "\033[21~"
  string F11 = "\033[23~"
  string F12 = "\033[24~"
  string F13 = "\033[25~"
  string F14 = "\033[26~"
  string F15 = "\033[28~"
  string F16 = "\033[29~"
  string F17 = "\033[31~"
  string F18 = "\033[32~"
  string F19 = "\033[33~"
  string F20 = "\033[34~"
  string F21 = ""
  string F22 = ""
  string F23 = ""
  string F24 = ""
  string F25 = ""
  string F26 = ""
  string Home = "\033[1~"
  string Insert = "\033[2~"
  string Remove = "\033[3~"
  string End = "\033[4~"
  string PageUp = "\033[5~"
  string PageDown = "\033[6~"
  string Macro = "\033[M"
  string Pause = "\033[P"

  compose '`' 'A' to ''
  compose '`' 'a' to ''
  compose '\'' 'A' to ''
  compose '\'' 'a' to ''
  compose '^' 'A' to ''
  compose '^' 'a' to ''
  compose '~' 'A' to ''
  compose '~' 'a' to ''
  compose '"' 'A' to ''
  compose '"' 'a' to ''
  compose 'O' 'A' to ''
  compose 'o' 'a' to ''
  compose '0' 'A' to ''
  compose '0' 'a' to ''
  compose 'A' 'A' to ''
  compose 'a' 'a' to ''
  compose 'A' 'E' to ''
  compose 'a' 'e' to ''
  compose ',' 'C' to ''
  compose ',' 'c' to ''
  compose '`' 'E' to ''
  compose '`' 'e' to ''
  compose '\'' 'E' to ''
  compose '\'' 'e' to ''
  compose '^' 'E' to ''
  compose '^' 'e' to ''
  compose '"' 'E' to ''
  compose '"' 'e' to ''
  compose '`' 'I' to ''
  compose '`' 'i' to ''
  compose '\'' 'I' to ''
  compose '\'' 'i' to ''
  compose '^' 'I' to ''
  compose '^' 'i' to ''
  compose '"' 'I' to ''
  compose '"' 'i' to ''
  compose '-' 'D' to ''
  compose '-' 'd' to ''
  compose '~' 'N' to ''
  compose '~' 'n' to ''
  compose '`' 'O' to ''
  compose '`' 'o' to ''
  compose '\'' 'O' to ''
  compose '\'' 'o' to ''
  compose '^' 'O' to ''
  compose '^' 'o' to ''
  compose '~' 'O' to ''
  compose '~' 'o' to ''
  compose '"' 'O' to ''
  compose '"' 'o' to ''
  compose '/' 'O' to ''
  compose '/' 'o' to ''
  compose '`' 'U' to ''
  compose '`' 'u' to ''
  compose '\'' 'U' to ''
  compose '\'' 'u' to ''
  compose '^' 'U' to ''
  compose '^' 'u' to ''
  compose '"' 'U' to ''
  compose '"' 'u' to ''
  compose '\'' 'Y' to ''
  compose '\'' 'y' to ''
  compose 'T' 'H' to ''
  compose 't' 'h' to ''
  compose 's' 's' to ''
  compose 's' 'z' to ''
  compose 'i' 'j' to ''
  compose '<' '<' to ''
  compose '>' '>' to ''
  # si quelqu'un veut bien y inclure des compose pour les autres caractres
  # latin1 comme le copyright, le yen (...) qu'il me les envoie !





































  De la mise sous tension  la ligne de commande de Bash
  Greg O'Keefe, gcokeefe@postoffice.utas.edu.au
  v0.7, April 2000

  Voici une description rapide de ce qui se passe dans un systme Linux,
  depuis l'instant o vous mettez celui-ci sous tension, jusqu'au moment
  o vous vous loguez et obtenez la ligne de commande de bash (NDT :
  Bourne Again SHell). Ce document est organis "par lots" pour
  faciliter la tche des gens qui veulent mettre en place un systme 
  partir du code source. Comprendre cela vous sera trs utile lorsque
  vous aurez besoin de rsoudre des problmes ou de configurer votre
  systme (version franaise par Dominique van den Broeck, Mai 2000,
  dvandenbroeck@free.fr <mailto:dvandenbroeck@free.fr>).
  ______________________________________________________________________

  Table des matires


















































  1. Introduction

  2. Partie matrielle (Hardware)

     2.1 Configuration
     2.2 Exercices
     2.3 Plus d'informations.

  3. Lilo

     3.1 Configuration
     3.2 Exercices
     3.3 Plus d'informations

  4. Le noyau Linux

     4.1 Configuration
     4.2 Exercices
     4.3 Plus d'informations

  5. La bibliothque C de GNU

     5.1 Configuration
     5.2 Exercices
     5.3 Plus d'informations

  6. Init

     6.1 Configuration
     6.2 Exercices
     6.3 Plus d'informations.

  7. Le systme de fichiers (filesystem)

     7.1 Configuration
     7.2 Exercices
     7.3 Plus d'informations

  8. Dmons noyau

     8.1 Configuration
     8.2 Exercices
     8.3 Plus d'informations

  9. Le journal systme (System Logger)

     9.1 Configuration
     9.2 Exercices
     9.3 Plus d'informations

  10. Getty et Login

     10.1 Configuration
     10.2 Exercices

  11. Bash

     11.1 Configuration
     11.2 Exercices
     11.3 Plus d'informations

  12. Les commandes

  13. Construire un systme Linux minimum  partir des sources.

     13.1 Ce qu'il vous faut
     13.2 Le systme de fichier (Filesystem)
     13.3 MAKEDEV
     13.4 Le noyau (kernel)
     13.5 Lilo
     13.6 Glibc
     13.7 SysVinit
     13.8 Ncurses
     13.9 Bash
     13.10 Util-linux (getty et login)
     13.11 Sh-utils
     13.12 Vers l'utilisabilit
     13.13 Astuces diverses
     13.14 Plus d'informations

  14. Conclusion

  15. Section administrative

     15.1 Copyright
     15.2 Page principale
     15.3 Retours
     15.4 Rfrences et remerciements.
     15.5 Historique des changements
        15.5.1 0.6 -> 0.7
        15.5.2 0.5 -> 0.6
     15.6 A faire (TODO)


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Je trouve frustrant qu'il se passe dans ma machine Linux des choses
  que je ne comprends pas. Si, comme moi, vous souhaitez vraiment
  comprendre votre systme plutt que simplement savoir comment
  l'utiliser, ce document devrait tre un bon point de dpart. Ce genre
  de "connaissance de fond" est aussi requis si vous voulez devenir un
  as de la rsolution de problmes sous Linux.


  Je pars du principe que vous avez une machine Linux en tat de marche,
  et que vous matrisez les bases d'Unix et de l'architecture matrielle
  des PC.  Si ce n'est pas le cas, The Unix and Internet Fundamentals
  HOWTO <http://www.linuxdoc.org/HOWTO/Unix-and-Internet-Fundamentals-
  HOWTO.html> ("Les notions fondamentales d'Unix et Internet", miroirs
  franais en VO <http://www.linuxfr.org/LDP/HOWTO/Unix-and-Internet-
  Fundamentals-HOWTO.html> et VF
  <http://www.freenix.org/unix/linux/HOWTO/Unix-Internet-Fundamentals-
  HOWTO.html>) est un excellent endroit pour dbuter.  C'est un site
  concis, lisible, et qui couvre toutes les bases.


  Le sujet principal de ce document est la faon dont Linux dmarre.
  Mais il se veut galement tre une ressource d'apprentissage plus
  large.  J'ai inclus des exercices dans chaque section. Si vous en
  faites vraiment quelques uns, vous apprendrez bien plus qu'en vous
  contentant de lire ce document.


  Il y a aussi des liens vers du code source  tlcharger, car j'espre
  que certains lecteurs s'attaqueront au meilleur exercice
  d'apprentissage de Linux que je connaisse : construire un systme 
  partir du code source.  Giambattista Vico, un philosophe italien
  (1668-1744) disait ``verum ipsum factum'' ce qui signifie "la
  comprhension dcoule de l'exprience" (NDT : Traduction libre). Merci
   Alex (voir ``Remerciements'') pour cette citation.
  Si vous souhaitez vous "la rouler vous-mme", je vous conseille
  d'aller voir Linux From Scratch HOWTO
  <http://www.linuxfromscratch.org> (LFS soit "Linux depuis zro").  LFS
  fournit des instructions dtailles pour btir un systme complet et
  exploitable  partir du code source. Sur le site web de LFS, vous
  trouverez aussi une mailing-list (liste de diffusion)  disposition
  des personnes qui construisent de tels systmes. Ce que j'ai inclus
  dans ce document, ce sont des instructions pour construire un systme
  "jouet", (voir ``Btir un systme Linux minimal  partir des
  sources'') purement pour l'exercice.


  Les lots (NDT : "packages" en anglais et repris ci-aprs) sont
  prsents dans l'ordre o ils apparaissent dans le processus de
  dmarrage du systme.  Cela signifie que si vous installez les
  packages dans cet ordre vous pouvez redmarrer aprs chaque
  installation, et voir  chaque fois le systme se rapprocher petit 
  petit de l'tat o il vous donnera la ligne de commande.  Il y a une
  notion de progression rassurante dans cela.


  Je vous recommande de commencer par lire le texte principal de chaque
  section, en ignorant les exercices et rfrences, puis de dcider du
  point jusqu'auquel vous souhaitez comprendre votre systme. Reprenez
  alors depuis le dbut, en faisant les exercices et en relisant en
  dtail.




  22..  PPaarrttiiee mmaattrriieellllee ((HHaarrddwwaarree))

  Lorsque vous allumez votre ordinateur, celui-ci se teste lui-mme pour
  s'assurer que tous ses composants sont en tat de marche. Cela
  s'appelle le ``Power On Self Test'' (POST ou Auto-Test  l'Allumage).
  Ensuite, un programme nomm Bootstrap loader (Chargeur de boot), situ
  dans le BIOS en ROM, recherche un secteur de boot, ou secteur
  d'amorce. Un secteur d'amorce est le premier secteur d'un disque et
  contient un petit programme capable de charger un systme
  d'exploitation. Les secteurs d'amorce sont marqus par un ``nombre
  magique'' (valeur fixe caractristique) 0xAA55 = 43603  l'octet 0x1FE
  = 510. Ce sont les deux derniers octets du secteur.  C'est de cette
  faon que l'lectronique peut dterminer s'il s'agit d'un secteur
  d'amorce ou pas.


  Le bootstrap loader a une liste d'endroits o chercher un secteur
  d'amorce.  Ma vieille machine regarde d'abord sur le lecteur de
  disquette, puis sur le disque dur. Les machines modernes peuvent aussi
  rechercher un secteur d'amorce sur un CD-ROM. S'il trouve un secteur
  amorable ("bootable"), il le charge en mmoire et passe ainsi le
  contrle au programme qui charge le systme d'exploitation en mmoire.
  Sur un systme Linux typique, ce programme sera la premire tape du
  chargeur de LILO. Il existe malgr tout plusieurs manires diffrentes
  de faire dmarrer ("booter") votre systme.  Voir le _G_u_i_d_e _d_e
  _l_'_u_t_i_l_i_s_a_t_e_u_r _d_e _L_I_L_O pour plus de dtails.  Voir la section ``LILO''
  pour l'URL.


  Evidement, il y a bien plus  dire sur ce que fait le hardware du PC.
  Mais ce n'est pas l'objet de ce document. Lisez un des nombreux livres
  traitant de l'architecture matrielle du PC.




  22..11..  CCoonnffiigguurraattiioonn

  La machine stocke des informations sur son propre tat dans son CMOS.
  Cela inclut la RAM et les types de disques installs dans le systme.
  Le BIOS de la machine contient un programme, Setup, qui vous permet de
  modifier ces informations. Pour savoir comment y accder, regardez
  attentivement les messages qui apparaissent sur votre cran lorsque
  vous mettez votre machine sous tension. Sur ma machine, il faut
  appuyer sur la touche DEL (Suppr) avant qu'elle ne commence  charger
  le systme d'exploitation.


  22..22..  EExxeerrcciicceess

  Une bonne faon d'en apprendre plus sur le hardware d'un PC est de
  monter une machine  partir de composants d'occasion. Prenez au moins
  un 386 pour pouvoir y installer Linux facilement. Cela ne vous cotera
  pas trs cher. Posez la question autour de vous, quelqu'un pourrait
  bien vous donner une partie des pices qu'il vous faut.


  Allez voir Unios <http://learning.taslug.org.au/resources>, (Ils
  avaient une page sur  <http://www.unios.org>, mais elle a disparu) et
  tlchargez, compilez et fabriquez votre disquette bootable.  Ce n'est
  qu'un programme bootable affichant ``Hello World!'', contenant  peine
  plus de 100 lignes d'assembleur. Il serait intressant de voir  le
  convertir en un format exploitable par l'assembleur GNU as.


  Ouvrez l'image de la disquette bootable pour unios avec un diteur
  hexadcimal. Cette image fait 512 octets de long. Exactement la
  longueur d'un secteur. Trouvez-y le nombre magique 0xAA55. Faites la
  mme chose pour une disquette bootable de votre propre ordinateur.

  Vous pouvez utiliser la commande dd pour la copier dans un fichier :
  dd if=/dev/fd0 of=boot.sector.  Faites _t_r__s attention  paramtrer if
  (fichier source) et of (fichier destination) comme il faut !

  Essayez d'en extraire le code source du chargeur de LILO.


  22..33..  PPlluuss dd''iinnffoorrmmaattiioonnss..


    Les notions fondamentales d'Unix et d'Internet
     <http://www.linuxdoc.org/HOWTO/Unix-and-Internet-Fundamentals-
     HOWTO.html>, par Eric S. Raymond, miroirs franais en VO
     <http://www.linuxfr.org/LDP/HOWTO/Unix-and-Internet-Fundamentals-
     HOWTO.html> et VF <http://www.freenix.org/unix/linux/HOWTO/Unix-
     Internet-Fundamentals-HOWTO.html>, et particulirement la section
     3, _Q_u_e _s_e _p_a_s_s_e_-_t_-_i_l _l_o_r_s_q_u_e _v_o_u_s _a_l_l_u_m_e_z _u_n _o_r_d_i_n_a_t_e_u_r _?

    Le premier chapitre du _G_u_i_d_e _d_e _l_'_u_t_i_l_i_s_a_t_e_u_r _d_e _L_I_L_O donne une
     excellente explication des partitions de disques sur PC et de
     l'amorage (booting). Voir la section ``LILO'' pour l'URL.

    Le NOUVEAU _P_e_t_e_r _N_o_r_t_o_n _P_r_o_g_r_a_m_m_e_r_'_s _G_u_i_d_e _t_o _t_h_e _I_B_M _P_C _& _P_S_/_2
     (Guide Peter Norton du programmeur pour l'IBM PC et PS/2), par
     Peter Norton et Richard Wilton, Microsoft Press, 1988.  Il existe
     un nouveau livre Norton, qui a l'air bien, mais que je ne peux
     m'offrir pour le moment.

    Un des nombreux ouvrages disponibles sur la manire de faire
     voluer (upgrader) son PC.


  33..  LLiilloo

  Lorsque l'ordinateur charge le secteur d'amorce d'un systme sous
  Linux normal, ce qu'il charge est en fait un partie de LILO, appele
  "first stage boot loader" (chargeur de boot de premier niveau). Il
  s'agit d'un mini programme dont la seule tche est de charger et
  d'excuter le ``second stage boot loader'' (chargeur de boot de
  deuxime niveau).


  Le "second stage loader" vous donne une invite de commande (s'il a t
  install de cette manire) et charge le systme d'exploitation de
  votre choix.


  Lorsque votre systme est mont et en tat de marche, et que vous
  excutez lilo, ce que vous excutez en ralit est le ``map
  installer''.  Celui-ci lit le fichier de configuration /etc/lilo.conf
  et crit le chargeur de boot sur le disque dur, avec les informations
  concernant les systmes d'exploitation qu'il peut charger.


  Il y a de nombreuses manires de rendre votre systme bootable. Celle
  que je viens de dcrire est la manire la plus vidente et
  ``normale'', au moins pour une machine dont le systme d'exploitation
  principal est Linux.  Le Guide de l'Utilisateur Lilo explique
  plusieurs exemples de ``boot concepts''.  Cela vaut la peine de les
  lire, et d'en essayer quelques uns.


  33..11..  CCoonnffiigguurraattiioonn

  Le fichier de configuration de Lilo est /etc/lilo.conf. Il existe une
  page de manuel (man page)  son sujet : tapez man lilo.conf dans un
  shell pour l'afficher. La principale caractristique de lilo.conf est
  qu'il existe une entre pour chaque chose que Lilo doit booter. Pour
  une entre Linux, cela inclut l'endroit o se trouve le kernel, et la
  partition  monter  la racine du systme de fichier (``filesystem'').
  Pour les autres systmes, la principale information est la partition
  sur laquelle booter.


  33..22..  EExxeerrcciicceess

  _D_A_N_G_E_R : soyez prudent avec ces exercices. Il est assez facile de
  faire une erreur quelque part et de bloquer votre "master boot record"
  (NDT : ou MBR, premier secteur du disque dur, contient le bootloader
  et la table des partitions) et de rendre ainsi votre systme
  inutilisable. Assurez-vous que vous avez une disquette de rparation
  qui fonctionne, et que vous savez comment vous en servir pour remettre
  les choses en tat. Voir plus bas un lien vers tomsrtbt, la disquette
  de rparation que j'utilise et recommande.  La meilleure des
  prcautions est d'utiliser une machine qui ne contienne pas de donnes
  sensibles.


  Installez Lilo sur une disquette. Peu importe s'il n'y a rien d'autre
  sur la disquette que le kernel - vous obtiendrez un "kernel panic"
  quand le kernel sera prt a charger init, mais au moins vous saurez
  que Lilo fonctionne.


  Si vous le souhaitez, vous pouvez essayer de voir jusqu' quel point
  vous pouvez faire tenir un systme sur une disquette. C'est srement
  la deuxime meilleure activit pour apprendre Linux.  Voir le Bootdisk
  HOWTO (url plus bas), et tomsrtbt (url plus bas) pour avoir des
  pistes.


  Configurez Lilo afin qu'il lance unios (voir section ``exercices
  hardware'' pour une URL). Comme dfi supplmentaire, voyez si vous
  pouvez le faire sur une disquette.


  Faites une boucle de boots. Configurez le Lilo du Master Boot Record
  pour qu'il boote le Lilo du secteur de boot d'une des partitions
  principales, puis configurez ce Lilo pour qu'il relance celui du MBR.
  Ou alors utilisez le MBR et vos quatre partitions principales pour
  faire une boucle en cinq points ! Marrant !


  33..33..  PPlluuss dd''iinnffoorrmmaattiioonnss



    La page de man de Lilo

    Le package Lilo (voir ``downloads'') contient le ``LILO User's
     Guide'' lilo-u-21.ps.gz (ou plus rcent).  Il se peut que vous ayez
     quand mme dj ce document.  Regardez dans /usr/doc/lilo ou
     approch.  La version postscript est meilleure que la version en
     texte brut, car elle contient des diagrammes et des tables.

    tomsrtbt <http://www.toms.net/rb> La disquette unique linux la plus
     cool ! Constitue une excellente disquette de secours.

    Bootdisk-HOWTO <http://www.linuxdoc.org/HOWTO/Bootdisk-HOWTO/>
     ("HOWTO Disquette-de-boot", miroirs franais en VO
     <http://www.linuxfr.org/LDP/HOWTO/Bootdisk-HOWTO> et VF
     <http://www.freenix.org/unix/linux/HOWTO/Bootdisk-HOWTO.html>.





  44..  LLee nnooyyaauu LLiinnuuxx


  Le noyau (kernel) fait vraiment beaucoup de choses. Je pense qu'une
  bonne manire de rsumer tout cela est de dire qu'il fait faire au
  hardware ce que les programmes veulent, proprement et efficacement.


  Le processeur ne peut excuter qu'une seule instruction  la fois,
  mais Linux semble faire tourner beaucoup de choses simultanment. Le
  noyau accomplit cela en sautant de tche en tche trs rapidement. Il
  fait le meilleur usage possible du processeur en gardant trace des
  processus qui sont prts  tre excuts et de ceux qui attendent
  quelque chose comme un enregistrement en provenance d'un disque, ou
  une saisie clavier quelquonque. Cette tche du noyau est appele
  "scheduling" (planification).


  Si un programme ne fait rien, alors il n'a pas besoin d'tre en RAM.
  Mme un programme qui fait quelque chose peut avoir certaines parties
  inactives, qui donc n'ont pas besoin d'tre en RAM. L'espace
  adressable est divis en pages. Le noyau garde une trace des pages les
  plus utilises. Les pages qui ne sont pas autant utilises peuvent
  tre dplaces dans la partition d'change (swap). Lorsqu'une page est
   nouveau sollicite, une autre page inutilise est retire de
  l'espace adressable pour lui faire de la place.  Cela s'appelle la
  gestion de la mmoire virtuelle.
  Si vous avez un jour compil votre propre noyau, vous avez remarqu
  qu'il y a un grand nombre d'options pour des priphriques
  spcifiques. Le noyau contient beaucoup de code spcifique pour
  converser avec l'lectronique de tout type, et les prsente d'une
  faon propre et uniforme aux programmes applicatifs.


  Le noyau prend aussi en charge la gestion des fichiers, les
  communications interprocessus, et beaucoup du travail concernant le
  rseau.


  Une fois le noyau charg, la premire chose qu'il fait est de
  rechercher un programme appel init et l'excuter.


  44..11..  CCoonnffiigguurraattiioonn

  La majorit de la configuration du noyau est effectue quand vous le
  construisez, en utilisant make menuconfig, ou make xconfig dans le
  rpertoire /usr/src/linux/ (ou l ou se trouvent les sources de votre
  noyau Linux). Vous pouvez rinitialiser le mode vido par dfaut, la
  racine du systme de fichiers, le priphrique de swap et la taille du
  disque virtuel (RAM disk) en utilisant rdev. Ces paramtres ainsi que
  d'autres peuvent aussi tre passs au noyau depuis Lilo. Vous pouvez
  indiquer  Lilo les paramtres  passer au noyau soit dans lilo.conf,
  soit  l'invite (prompt) de Lilo.  Par exemple, si vous souhaitiez
  utiliser hda3 comme racine du systme de fichiers plutt que hda2,
  vous pourriez taper :


          LILO: linux root=/dev/hda3




  Si vous mettez en place un systme  partir de ses sources, vous
  pouvez vous simplifier la vie en crant un noyau "monolithique",
  c'est--dire sans module. Vous n'aurez donc pas  copier ceux-ci sur
  le systme cible.


  NOTE : Le fichier System.map est utilis par le logger (le journal
  systme, qui enregistre les messages de service) du noyau pour
  dterminer les noms des modules gnrant des messages. Le programme
  top utilise galement ces informations. Lorsque vous copiez le noyau
  vers un systme cible, copiez aussi System.map.


  44..22..  EExxeerrcciicceess

  Rflchissez  ceci : /dev/hda3 est un type de fichier spcial qui
  dcrit une partition d'un disque dur. Mais il vit sur le systme de
  fichiers comme tous les autres fichiers. Le noyau veut savoir quelle
  partition monter  la racine - donc il n'a pas encore de systme de
  fichiers.  Alors comme peut-il lire /dev/hda3 pour trouver la
  partition  monter ?


  Si vous ne l'avez pas encore fait, compilez votre noyau. Lisez l'aide
  (Help) pour chaque option.


  Essayez de voir jusqu' quel point vous pouvez rduire la taille de
  votre noyau avant qu'il ne cesse de fonctionner. Vous pouvez apprendre
  beaucoup en cartant les parties qui ne sont pas ncessaires.
  Lisez ``The Linux Kernel'' (URL plus bas) et ce faisant, trouvez les
  parties du source auxquelles il se rfre. Le livre (au moment o
  j'cris ces lignes) se rfre au noyau version 2.0.33, qui devient
  franchement dpass.  Il pourrait tre plus facile de suivre si vous
  tlchargiez cette ancienne version et y lisiez le source. Il est trs
  excitant de trouver des morceaux de code C appels ``process'' et
  ``page''.


  Programmez ! Faites des essais ! Voyez si vous pouvez faire cracher au
  noyau des messages supplmentaires ou quelque chose du mme genre.



  44..33..  PPlluuss dd''iinnffoorrmmaattiioonnss


    /usr/src/linux/README et le contenu de
     /usr/src/linux/Documentation/ (Ces emplacements peuvent varier sur
     votre systme)

    Le Kernel-HOWTO
     <http://mirror.aarnet.edu.au/linux/LDP/HOWTO/Kernel-HOWTO.html>
     (miroirs franais en VO <http://www.linuxfr.org/LDP/HOWTO/Kernel-
     HOWTO.html> et VF <http://www.freenix.org/unix/linux/HOWTO/Kernel-
     HOWTO.html>).


    L'aide disponible quand vous configurez un noyau en utilisant make
     menuconfig ou make xconfig

    The Linux Kernel (et autres guides du LDP)
     <http://mirror.aarnet.edu.au/linux/LDP/LDP/> (miroir franais en VO
     <http://www.linuxfr.org/LDP/LDP>)

    Tlchargement des sources voir ``tlchargements''



  55..  LLaa bbiibblliiootthhqquuee CC ddee GGNNUU

  L'tape suivante qui se produit au dmarrage de votre ordinateur est
  le chargement d'init et son excution. Cependant, init, comme la
  plupart des programmes, utilise des fonctions issues de bibliothques.


  Vous avez peut-tre dj vu un exemple de programme C comme celui-ci :



          main() {
                  printf("Hello World!\n");
          }



  Le programme ne dfinit nullement printf, alors d'o vient-il ?  Il
  provient des bibliothques C standard ("standard C libraries"), sur un
  systme GNU/Linux, glibc. Si vous les compilez sous Visual C++, alors
  il provient d'une implmentation Microsoft de ces mmes fonctions
  standard.  Il existe des milliers de ces fonctions standard, pour les
  mathmatiques (math), la gestion des chanes de caractres (string),
  l'heure et la date, l'allocation de mmoire et ainsi de suite. Tout,
  dans Unix (y compris Linux) est soit crit en C, soit tente de le
  simuler, de sorte que tous les programmes utilisent ces fonctions.

  Si vous jetez un oeil dans /lib sur votre systme Linux, vous verrez
  un grand nombre de fichiers appels libquelquechose.so ou
  libquelquechose.a etc. Ce sont les bibliothques de ces fonctions.
  Glibc est simplement l'implmentation GNU de ces fonctions.


  Les programmes peuvent utiliser ces fonctions de deux manires. si
  vous "linkez" (NDT : "ditez les liens", opration qui consiste 
  tablir les relations avec les diffrents objets sollicits par le
  programme, puis  crer l'excutable) _s_t_a_t_i_q_u_e_m_e_n_t, ces fonctions
  seront copies  l'intrieur de l'excutable gnr. C'est  a que
  servent les bibliothques libquelquechose.a. Si vous linkez votre
  programme _d_y_n_a_m_i_q_u_e_m_e_n_t (effectu par dfaut), lorsque le programme
  aura besoin du code d'une bibliothque, il ira l'extraire directement
  du fichier libquelquechose.so


  La commande ldd vous apporte une aide prcieuse lorsque vous cherchez
   retrouver les bibliothques utilises par un programme particulier.
  Par exemple, voici les bibliothques utilises par bash:



          [greg@Curry power2bash]$ ldd /bin/bash
                  libtermcap.so.2 => /lib/libtermcap.so.2 (0x40019000)
                  libc.so.6 => /lib/libc.so.6 (0x4001d000)
                  /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)




  55..11..  CCoonnffiigguurraattiioonn

  Certaines fonctions, dans leur bibliothque, dpendent du lieu o vous
  vous trouvez. Par exemple, en franais, on crit les dates sous la
  forme dd/mm/yy, mais les amricains les crivent mm/dd/yy. Il existe
  un programme livr avec glibc appel localdef qui vous donne la
  possibilit de dfinir cela.


  55..22..  EExxeerrcciicceess

  Utilisez ldd pour dterminer les bibliothques qu'utilise votre
  application prfre.


  Utilisez ldd pour dterminer les bibliothques utilises par init.


  Crez une bibliothque gadget, avec seulement une ou deux fonctions
  dedans.  On utilise le programme ar pour les crer. La page de manuel
  d'ar pourrait tre un bon point de dpart pour commencer  enquter
  sur la manire dont cette opration est effectue. Ecrivez, compilez,
  et linkez un programme utilisant cette bibliothque.



  55..33..  PPlluuss dd''iinnffoorrmmaattiioonnss


    Code source, voir la section ``tlchargements''





  66..  IInniitt

  Je ne parlerai que du style d'initialisation ``System V'' que les
  systmes Linux utilisent le plus souvent. Il existe des alternatives.
  En fait, vous pouvez mettre n'importe quel programme dans /sbin/init,
  que le noyau excutera lorsqu'il aura fini de se charger.


  Le travail d'init est de faire en sorte que tout se lance comme il
  faut. Il vrifie que les systmes de fichier sont en bon tat et les
  monte. Il dmarre les dmons (``daemons'') qui enregistrent les
  messages systme, grent le rseau, distribuent les pages web,
  coutent les signaux de la souris, etc. Init dmarre aussi les
  processus getty qui vous donnent l'invite de login sur vos terminaux
  virtuels.


  Il y a un processus compliqu concernant le changement de niveau
  d'excution ("run-levels"), mais je vais sauter tout a, et ne parler
  que du dmarrage du systme.


  Init lit le fichier /etc/inittab, qui lui dit quoi faire.
  Typiquement, la premire chose demande est l'excution d'un script
  d'initialisation. Le programme qui excute (ou interprte) ce script
  est bash, le mme programme qui vous donne la ligne de commande.  Sur
  les systmes Debian, le script d'initialisation est /etc/init.d/rcS,
  sur Red Hat, /etc/rc.d/rc.sysinit.  C'est l que les systmes de
  fichiers sont vrifis puis monts, l'horloge mise  l'heure, le
  fichier ou la partition d'change (swap) activs, les noms de machines
  dfinis, etc.



  Ensuite, un autre script est invoqu pour nous placer dans le niveau
  d'excution par dfaut. Cela implique simplement le dmarrage d'un
  ensemble de sous-systmes. Il existe un ensemble de sous-rpertoires
  /etc/rc.d/rc0.d, /etc/rc.d/rc1.d, ..., /etc/rc.d/rc6.d sous Red Hat,
  ou /etc/rc0.d, /etc/rc1.d, ..., /etc/rc6.d sous Debian, correspondant
  aux run-levels. Si nous entrons dans le niveau d'excution 3 sur un
  systme Debian, le script excute tous les scripts de /etc/rc3.d
  commenant par `S' (pour Start). Ces scripts sont en ralit des liens
  vers un autre rpertoire appel gnralement init.d.


  Donc, le script de notre niveau d'excution est appel par init, et
  recherche dans un rpertoire des scripts dont le nom dbute par la
  lettre `S'. Il se peut qu'il tombe sur S10syslog en premier. Les
  chiffres indiquent au script du niveau l'ordre dans lequel il doit les
  lancer. En l'occurence, S10syslog est lanc en premier parce qu'il n'y
  pas de script commenant par S00 ... S09. Mais S10syslog est en fait
  un lien vers /etc/init.d/syslog qui est un script charg du dmarrage
  et de l'arrt du system logger (enregistreur de messages systmes).
  Parce que le lien commence par un `S', le script du run-level sait
  qu'il doit excuter le script syslog avec le paramtre "start". Il y a
  aussi des liens dont le nom dbute par `K' (pour Kill), qui spcifient
  ce qu'il faut arrter, et dans quel ordre, lorsque l'on entre dans le
  niveau d'excution.



  Pour changer ce que le sous-systme lance par dfaut, vous devez
  configurer ces liens dans le rpertoire rcN.d, ou N est le niveau
  d'excution par dfaut dfini dans votre fichier inittab.


  La dernire chose importante qu'effectue init est de dmarrer les
  gettys [NdRel :en pratique, souvent des mingettys)].  Ceux-ci sont
  ressuscits (``respawned''), ce qui signifie qu'ils sont
  automatiquement relancs par init s'ils viennent  se terminer. La
  plupart des distributions fournissent six terminaux virtuels.  Il se
  peut que vous souhaitiez en enlever pour conomiser de la mmoire, ou
  en ajouter pour pouvoir lancer beaucoup de choses  la fois, et passer
  rapidement de l'un  l'autre. Vous pourriez aussi avoir besoin de
  lancer un getty vers un terminal texte ou vers un modem. Vous devez
  alors diter inittab.



  66..11..  CCoonnffiigguurraattiioonn

  /etc/inittab, qui est le fichier de configuration au sommet de la
  "hirarchie" des fichiers de configuration.


  Les rpertoires rcN.d, o N = 0, 1,..., 6 dtermine les sous-systmes
   lancer.


  Quelque part dans les scripts invoqus par init, se trouve la commande
  mount -a.  Cela signifie : "Monte tous les systmes de fichiers censs
  tre monts".  Le fichier /etc/fstab dfinit ce qui est cens tre
  mont. Si vous souhaitez changer ce qui est mont par dfaut au
  dmarrage, c'est le fichier que vous devez modifier. Il existe une
  page de manuel pour fstab.


  66..22..  EExxeerrcciicceess


  Trouvez le rpertoire rcN.d du niveau d'excution par dfaut de votre
  systme puis faites un ls -l pour voir les fichiers points par les
  liens.


  Changez le nombre de gettys tournant sur votre systme.


  Retirez tous les sous-systmes dont vous n'avez pas besoin de votre
  niveau d'excution par dfaut.


  Essayez de dterminer le minimum ncessaire pour dmarrer.


  Fabriquez une disquette avec Lilo, un noyau et un programme statique
  affichant "Bonjour tout le monde !" nomm /sbin/init, puis regardez-la
  dmarrer et dire bonjour.


  Regardez attentivement votre systme dmarrer, et notez les vnements
  signals. Ou imprimez une section de votre journal systme
  /var/log/messages  partir du moment o votre systme a dmarr.
  Ensuite, en partant d'inittab, explorez tous les scripts et essayez de
  voir quel code fait quoi. Vous pouvez galement ajouter des messages,
  comme


          echo "Hello, moi c'est rc.sysinit"



  C'est aussi un bon exercice pour apprendre le langage de script de
  Bash, certains scripts tant assez compliqus. Ayez un bon guide de
  bash  porte de main (NDT : "man bash" devrait suffire, faute de
  mieux).


  66..33..  PPlluuss dd''iinnffoorrmmaattiioonnss..


    Voir ``tlchargements'' pour tlcharger le code source.

    Il y a des pages de manuel pour les fichiers inittab et fstab.
     Tapez (par exemple) man inittab dans un shell pour l'afficher.

    Le Guide de L'Administrateur Systme Linux contient une section
     <http://mirror.aarnet.edu.au/linux/LDP/LDP/> intressante
     concernant init (miroir franais en VO
     <http://www.linuxfr.org/LDP/LDP>).



  77..  LLee ssyyssttmmee ddee ffiicchhiieerrss ((ffiilleessyysstteemm))

  Dans cette section, j'emploierai l'expression ``systme de fichiers''
  pour deux notions diffrentes.  Il y a les systmes de fichiers
  installs sur des partitions de disque ou d'autres priphriques, et
  il y a le systme de fichier (NdRel : la hirarchie)  tel qu'il vous
  est prsent par un systme Linux en tat de marche. Sous Linux, vous
  "montez" le systme de fichiers d'un disque sur le systme de fichiers
  du systme.


  Dans la section prcdente, j'ai mentionn le fait que des scripts
  d'initialisation vrifiaient et montaient les systmes de fichiers.
  Les commandes qui effectuent ces oprations sont respectivement fsck
  et mount.


  Un disque dur n'est qu'un grand espace dans lequel vous pouvez crire
  des zros et des uns. Un systme de fichiers impose une structure 
  tout cela, et le prsente sous la forme de fichiers,  l'intrieur de
  sous-rpertoires,  l'intrieur de rpertoires... Chaque fichier est
  rpresent par un inode, indiquant le fichier dont il s'agit, la date
  de sa cration, et o trouver son contenu. Les rpertoires sont aussi
  reprsents par des inodes, mais ceux-ci indiquent o trouver les
  inodes des fichiers que les reprtoires contiennent. Si le systme
  veut lire /home/greg/bigboobs.jpeg, il commence par lire l'inode du
  rpertoire racine / dans le ``superblock'', puis trouve l'inode du
  rpertoire home dans le contenu de /, puis trouve l'inode du
  rpertoire greg dans le contenu de home, et enfin l'inode de
  bigboobs.jpeg qui lui dira quel bloc du disque il faut lire.



  Si nous ajoutons des donnes  la fin d'un fichier, il peut arriver
  que les donnes soient crites avant que l'inode ne soit mis  jour
  (indiquant que le nouveau bloc appartient dsormais au fichier), ou
  vice-versa. Si le courant est coup  cet instant prcis, le systme
  de fichiers sera "cass".  C'est ce genre de chose que fsck essaie de
  dtecter et de rparer.


  La commande mount prend le systme de fichiers d'un priphrique, et
  l'ajoute  la hirarchie de fichiers de votre systme. En gnral le
  noyau monte son systme de fichiers racine en lecture seule (read-
  only).  La commande mount est ensuite utilise pour le remonter en
  lecture-criture (read-write) aprs que fsck ait vrifi que tout soit
  en ordre.


  Linux prend aussi en charge d'autres types de systmes de fichiers :
  msdos, vfat, minix, etc. Les dtails d'un systme de fichiers
  spcifique sont masqus par le Systme de Fichier Virtuel (Virtual
  File System ou VFS) qui est une couche d'abstraction. Je ne rentrerai
  pas dans ces dtails. Il existe une discussion sur ce sujet dans ``Le
  Kernel Linux'' (voir la section ``Le Noyau Linux'' pour l'URL)


  77..11..  CCoonnffiigguurraattiioonn

  Il existe des paramtres  la commande mke2fs, charge de la cration
  d'un systme de fichiers de type ext2. Ils contrlent la taille des
  blocs, le nombre d'inodes, etc. Voir la man page de mke2fs pour plus
  de dtails.


  Ce qui doit tre mont sur votre systme de fichiers est contrl par
  le fichier /etc/fstab, qui a lui aussi sa page de manuel.


  77..22..  EExxeerrcciicceess

  Fabriquez un tout petit systme de fichiers, et visualisez-le avec un
  diteur hexadcimal. Identifiez les inodes, les superblocs, et le
  contenu des fichiers.


  Je crois qu'il existe des outils qui vous donnent une vue graphique
  d'un systme de fichiers. Trouvez-en un, essayez-le, et envoyez moi
  l'url par email avec vos apprciations !


  Explorez le code du systme de fichiers ext2 dans le noyau.


  77..33..  PPlluuss dd''iinnffoorrmmaattiioonnss


    Le chapitre 9 du livre ``Le noyau linux'' du LDP donne une
     excellente description des systmes de fichiers. Vous pouvez le
     trouver sur le site LDP : miroir franais
     <http://www.linuxfr.org/LDP/LDP/> ou australien
     <http://mirror.aarnet.edu.au/linux/LDP/LDP/>).

    La commande mount fait partie du package util-linux, il y a un lien
     vers celui-ci dans ``tlchargements''.

    Les pages de manuel de mount, fstab, fsck et mke2fs

    La home page des EXT2 File System Utilities ext2fsprogs
     <http://web.mit.edu/tytso/www/linux/e2fsprogs.html> et son miroir
     australien ext2fsprogs
     <ftp://mirror.aarnet.edu.au/pub/linux/metalab/system/filesystems/ext2/>.
     On y trouve aussi une vue d'ensemble d'Ext2fs, bien qu'elle ne soit
     plus  jour, et moins lisible que le chapitre 9 du ``Noyau Linux''

     Unix File System Standard
     <ftp://tsx-11.mit.edu/pub/linux/docs/linux-standards/fsstnd/> Un
     autre lien <http://www.pathname.com/fhs/> vers le standard des
     systmes de fichiers d'Unix.  Ce document dcrit o doit se trouver
     quoi, dans un systme Unix, et pourquoi. Il indique aussi le
     minimum ncessaire  placer dans /bin, /sbin, etc. C'est une bonne
     rfrence si votre objectif est un systme minimal mais complet.




  88..  DDmmoonnss nnooyyaauu

  Malheureusement, cette section contient plus de questions et de
  conjectures que de faits. Peut-tre pouvez-vous apporter votre
  pierre ?


  Si vous saisissez la commande ps aux, vous verrez quelque chose
  ressemblant  ce qui suit :



  USER       PID %CPU %MEM  SIZE   RSS TTY STAT START   TIME COMMAND
  root         1  0.1  8.0  1284   536   ? S    07:37   0:04 init [2]
  root         2  0.0  0.0     0     0   ? SW   07:37   0:00 (kflushd)
  root         3  0.0  0.0     0     0   ? SW   07:37   0:00 (kupdate)
  root         4  0.0  0.0     0     0   ? SW   07:37   0:00 (kpiod)
  root         5  0.0  0.0     0     0   ? SW   07:37   0:00 (kswapd)
  root        52  0.0 10.7  1552   716   ? S    07:38   0:01 syslogd -m 0
  root        54  0.0  7.1  1276   480   ? S    07:38   0:00 klogd
  root        56  0.3 17.3  2232  1156   1 S    07:38   0:13 -bash
  root        57  0.0  7.1  1272   480   2 S    07:38   0:01 /sbin/agetty 38400 tt
  root        64  0.1  7.2  1272   484  S1 S    08:16   0:01 /sbin/agetty -L ttyS1
  root        70  0.0 10.6  1472   708   1 R   Sep 11   0:01 ps aux




  C'est une liste de processus en cours d'excution sur le systme.
  Remarquez que init est le processus numro un. Les processus 2, 3,4 et
  5 sont kflushd, kupdate, kpiod et kswapd. Il y a quand mme quelque
  chose d'trange : dans les deux colonnes de la taille virtuelle de
  stockage (SIZE) et la taille relle de stockage (Real Storage Size,
  RSS), ces processus renvoient zro. Comment un processus peut-il ne
  pas utiliser de mmoire ?  En ralit, ces processus font partie du
  noyau. Le noyau, lui, n'apparat pas du tout sur la liste des
  processus, et vous ne pouvez dfinir la mmoire utilise qu'en
  soustrayant la mmoire disponible du total install sur votre systme.
  Les parenthses autour du nom de commande pourraient signifier qu'il
  s'agit d'un processus noyau (?)


  kswapd dplace des parties d'un programme non utilises  un instant
  donn de l'espace de stockage rel (c'est--dire la RAM) vers l'espace
  de swap (c'est--dire le disque dur). kflushd crit les donnes des
  buffers vers le disque. Ceci permet aux choses d'aller plus vite. Ce
  que les programmes crivent peut tre conserv en mmoire, dans un
  buffer, puis crit sur le disque par morceaux plus larges et de faon
  plus efficace (NDT : principe du cache). Je ne sais pas  quoi servent
  kupdate et kpiod.


  C'est ici que finissent mes connaissances. Que font ces deux derniers
  dmons ? Pourquoi les dmons noyau ont-ils des numros de processus
  explicites plutt que d'tre simplement des bouts de code anonymes ?
  Est-ce qu'init les lance effectivement, ou tournent-ils dj lorsque
  init apparat ?


  J'ai mis dans /sbin/init un script pour monter /proc et faire un ps
  aux. Le processus 1 tait le script lui-mme, et les processus 2, 3, 4
  et 5 taient les dmons noyau, juste au dessous du vrai init. Le noyau
  les a forcment mis l, car ce n'est srement pas mon script qui l'a
  fait.


  Les hypothses suivantes viennent de David Leadbeater :


  Ces processus semblent s'occuper des accs disque, ils semblent tre
  lancs par le noyau, mais aprs avoir lanc le processus init. Il
  semble qu'en tant lancs comme des processus noyau plutt que comme
  des processus spars, ils soient protgs et ne peuvent tre tus
  (kill -9 ne les arrte pas), je ne sais pas vraiment pourquoi ils sont
  lancs en tant que threads spars. Il semble y avoir un rapport avec
  les accs disque.


  _k_f_l_u_s_h_d _e_t _k_u_p_d_a_t_e Ces deux processus sont dmarrs pour vider les
  buffers "sales" (c'est--dire modifis) vers le disque. kflushd est
  lanc quand les buffers sont pleins et kupdate se lance priodiquement
  (5 secondes ?) pour synchroniser les disques avec les buffers en
  mmoire.


  _k_p_i_o_d _e_t _k_s_w_a_p_d Ils ont pour tche l'exportation de pages (sections)
  de mmoire vers le fichier d'change de faon  ce que la mmoire
  principale ne soit jamais remplie, ils ressemblent  kflushd et
  kupdate dans le sens o l'un est lanc en cas de besoin (kpiod) et
  l'autre (kswapd) est lanc priodiquement ( intervalles d'une
  seconde).


  _A_u_t_r_e_s _d__m_o_n_s _d_u _n_o_y_a_u

  Sur une installation par dfaut de RedHat 6, kupdate a disparu mais
  udpate tourne en tant que dmon dans l'espace utilisateur, et il
  semble qu'il ait besoin d'tre lanc. Il y a galement un autre dmon,
  mdrecoveryd, qui lui semble d'occuper du RAID. En regardant dans les
  sources du noyau, il semble que certains pilotes SCSI lancent eux
  aussi des processus spars.


  Je ne connais toujours pas la signification des parenthses, mais
  elles semblent apparatre quand la RSS d'un processus est  zro, ce
  qui signifie qu'il n'utilise pas de mmoire (?).


  (fin de citation, merci David)



  88..11..  CCoonnffiigguurraattiioonn

  Je n'ai pas connaissance d'une configuration de ces dmons noyau.


  88..22..  EExxeerrcciicceess

  Trouvez  quoi servent ces processus, comment ils fonctionnent, et
  crivez une nouvelle section `Dmons Noyau'' pour ce document, et
  envoyez-la moi !





  88..33..  PPlluuss dd''iinnffoorrmmaattiioonnss

  ``Le Kernel Linux'' du Projet de Documentation Linux (LDP).  (voir
  section ``Le noyau Linux'' pour l'url), et les sources du noyau, c'est
  tout ce que je vois pour le moment.



  99..  LLee jjoouurrnnaall ssyyssttmmee ((SSyysstteemm LLooggggeerr))

  Init dmarre les dmons syslogd et klogd. Ils crivent les messages 
  consigner dans le journal. Les messages du noyau sont pris en main par
  klogd, alors que syslogd gre les messages des autres processus. Le
  fichier journal principal est /var/log/messages.  C'est un bon endroit
  o aller voir quand quelque chose tourne mal dans votre systme. Vous
  y trouverez souvent de prcieux indices.



  99..11..  CCoonnffiigguurraattiioonn

  Le fichier /etc/syslog.conf indique au logger o mettre quels
  messages. Les messages sont identifis par le service dont ils
  proviennent, et leur niveau de priorit. Ce fichier de configuration
  est constitu de lignes indiquant que les messages du service x avec
  une priorit y vont vers z, o z est un fichier, un terminal, une
  imprimante, une machine distante, ou autre chose encore.


  NOTE : Syslog a besoin que le fichier /etc/services existe.  Ce
  fichier alloue des ports (NDT : Ports des protocoles TCP et UDP).  Je
  ne sais pas vraiment si syslog a besoin d'un port rserv pour faire
  de l'enregistrement de messages  distance, ou si mme
  l'enregistrement local se fait  travers un port, ou mme s'il se
  contente d'utiliser /etc/services pour convertir les noms de services
  indiqus dans /etc/syslog.conf en numros de port.


  99..22..  EExxeerrcciicceess

  Jetez un oeil  votre journal systme. Prenez un message que vous ne
  comprenez pas, et essayez de trouver ce qu'il signifie.


  Redirigez tous les messages du journal vers un terminal.  (Revenez 
  la normale une fois que c'est fait).



  99..33..  PPlluuss dd''iinnffoorrmmaattiioonnss

  Le miroir
  <http://mirror.aarnet.edu.au/pub/linux/metalab/system/daemons/>
  australien de sysklogd.




  1100..  GGeettttyy eett LLooggiinn

  Getty est le programme qui vous permet de vous connecter  travers un
  priphrique srie, comme une console virtuelle, un terminal en mode
  texte, ou un modem. Il affiche l'invite de login. Une fois que vous
  avez saisi votre nom d'utilisateur, getty le transmet  login, qui
  vous demande un mot de passe, le vrifie, puis vous donne le shell.

  Il existe plusieurs getty disponibles. Certaines distributions, comme
  Red Hat, en utilisent un trs petit appel mingetty et qui ne gre que
  les terminaux virtuels.


  Le programme login fait partie du package util-linux, qui contient
  aussi un getty nomm agetty, qui fonctionne bien.  Ce package contient
  galement mkswap, fdisk, passwd, kill, setterm, mount, swapon, rdev,
  renice, more et bien d'autres.


  1100..11..  CCoonnffiigguurraattiioonn

  Le message qui apparat en haut de votre cran avec l'invite de login
  provient du fichier /etc/issue. Les getty sont en gnral dmarrs
  depuis /etc/inittab. Login recherche les dtails spcifiques 
  l'utilisateur dans /etc/passwd, et si vous avez le shadowing (une
  protection des mots de passe), dans /etc/shadow.


  1100..22..  EExxeerrcciicceess

  Crez un fichier /etc/passwd  la main. Les mots de passe peuvent tre
  nuls, puis changs avec le programme passwd une fois connect.  Voir
  la page de manuel de ce fichier. Utilisez man 5 passwd pour obtenir la
  page de manuel du fichier plutt que celle du programme.




  1111..  BBaasshh

  Si vous donnez  login une combinaison valide de nom d'utilisateur et
  de mot de passe, il ira regarder dans /etc/passwd pour savoir quel
  shell vous donner. La plupart du temps, dans un systme Linux, ce sera
  bash. Le travail de bash consiste  lire vos commandes et voir ce sur
  quoi elles agissent. C'est  la fois une interface utilisateur, et
  l'interprteur d'un langage de programmation.


  Dans son rle d'interface, il lit vos commandes, et les excute lui-
  mme si ces commandes sont ``internes'', comme cd, ou bien trouve et
  excute un programme s'il s'agit de commandes ``externes'' comme cp ou
  startx. Bash propose galement plusieurs options fort sympathiques
  comme un historique des commandes, ou le compltement automatique des
  noms de fichiers (avec la touche de tabulation).


  Nous avons dj vu bash  l'action dans son rle de langage de
  programmation. Les scripts qu'init lance pour dmarrer le systme sont
  gnralement des scripts shell, et sont excuts par bash.  Avoir un
  langage de programmation propre, paralllement aux utilitaires
  systmes disponibles depuis la ligne de commande forme une combinaison
  trs puissante, si vous savez ce que vous faites. Par exemple
  ("squence frime" !)  j'ai eu besoin l'autre jour d'appliquer une pile
  entire de correctifs (patches)  un rpertoire de codes source. J'ai
  t capable de le faire en une seule commande, la suivante :


  for f in /home/greg/sh-utils-1.16*.patch; do patch -p0 < $f; done;




  Ceci recherche tous les fichiers de mon rpertoire personnel dont les
  noms commencent par sh-utils-1.16 et finissent par .patch, puis
  affecte un par un ces noms  la variable f et excute les commandes
  invoques entre do et done. Il y avait en l'occurence 11 correctifs,
  mais il aurait pu aussi bien y en avoir 3000.


  1111..11..  CCoonnffiigguurraattiioonn

  Le fichier /etc/profile agit sur le comportement de bash au niveau du
  systme entier. Ce que vous mettez dans ce fichier affectera toute
  personne qui utilise bash sur votre systme. Cela sert par exemple 
  ajouter des rpertoires dans la variable PATH, ou  dfinir celui de
  la variable MAIL.


  Le comportement par dfaut du clavier laisse souvent  dsirer. En
  fait, c'est readline qui contrle cela. Readline est un package
  distinct qui prend en main les interfaces de ligne de commande, en
  fournissant l'historique des commandes, et le compltement automatique
  de noms de fichiers (NDT : Touche TAB sous Bash), tout comme les
  facilits volues d'dition de ligne. Il est compil dans bash. Par
  dfaut, Readline est configur  l'aide du fichier .inputrc, dans
  votre rpertoire personnel. La variable INPUTRC peut tre utilise
  pour outrepasser les rgles de ce fichier pour le bash. Par exemple,
  dans Red Hat 6, INPUTRC reoit la valeur /etc/inputrc dans le fichier
  /etc/profile. Cela signifie que les touches Retour Arrire
  (Backspace), Suppr (Delete), Dbut (Home) et Fin (End) fonctionnent
  correctement et pour tout le monde.


  Une fois que bash a lu le fichier de configuration gnral, commun au
  systme entier, il recherche votre fichier de configuration personnel.
  Il teste l'existence des fichiers .bash_profile, .bash_login et
  .profile dans votre rpertoire personnel. Il lance le premier qu'il
  trouve. Si vous voulez modifier le comportement de bash  votre gard,
  sans le changer pour les autres, faites-le ici. Par exemple, de
  nombreuses applications utilisent les variables d'environnement pour
  contrler leur fonctionnement. J'ai une variable EDITOR contenant la
  valeur vi pour pouvoir utiliser vi sous Midnight Commander (un
  excellent gestionnaire de fichier orient console) au lieu de son
  diteur propre.



  1111..22..  EExxeerrcciicceess

  Les bases de bash sont faciles  apprendre. Mais ne vous y limitez
  pas : on peut aller incroyablement loin avec. Prenez l'habitude de
  rechercher de meilleures faons de faire les choses.


  Lisez des scripts shell, analysez les choses que vous ne comprenez
  pas.


  1111..33..  PPlluuss dd''iinnffoorrmmaattiioonnss


    Tlchargement du code source, voir ``tlchargements''

    Il existe un ``Manuel de Rfrence de Bash'' avec, clair, mais
     assez lourd.

    Il existe un livre O'Reilly sur le Bash, je ne sais pas s'il est
     vraiment bon.


    Je ne connais pas de tutoriel bash gratuit et  jour. Si vous en
     connaissez un, merci de m'envoyer l'URL.



  1122..  LLeess ccoommmmaannddeess

  Vous effectuez la plupart des choses sous bash en saisissant des
  commandes comme cp. La majorit de ces commandes sont des petits
  programmes, bien que quelques unes, comme cd soient intgres au
  shell.


  Les commandes viennent de packages, la plupart de la Free Software
  Foundation (projet GNU). Plutt que de dresser ici la liste des
  packages, je prfre vous renvoyer vers le Linux From Scratch HOWTO
  <http://www.linuxfromscratch.org>.  Il contient une liste complte et
   jour de tous les packages allant dans un systme Linux, aussi bien
  que des indications pour les construire.



  1133..  CCoonnssttrruuiirree uunn ssyyssttmmee LLiinnuuxx mmiinniimmuumm  ppaarrttiirr ddeess ssoouurrcceess..

  Nous nous sommes concentrs jusqu'ici sur ce que les packages font. Je
  vais vous donner ici tout les indices que je peux pour fabriquer un
  systme Linux de base  partir des sources. Si vous voulez monter un
  vrai systme pour du vrai travail, lisez le Linux From Scratch HOWTO
  <http://www.linuxfromscratch.org>.


  Il est possible d'obtenir une ligne de commande bash sans installer
  tout ce que je mentionne ici. Ce que je dcris est un systme de base,
  sans embche, qui peut tre mont facilement.



  1133..11..  CCee qquu''iill vvoouuss ffaauutt

  Nous installerons une distribution de Linux comme Red Hat sur une
  partition, et l'utiliserons pour construire un nouveau systme Linux
  sur une autre partition. Je nommerai par la suite ``cible'' le systme
  que nous construisons, et ``source'' le systme que nous utilisons
  pour construire le systme cible ( ne pas confondre avec _c_o_d_e _s_o_u_r_c_e
  que nous utiliserons aussi).


  Vous allez donc avoir besoin d'une machine avec deux partitions libres
  dessus. Si vous le pouvez, utilisez une machine qui ne contienne rien
  d'important. Vous pouvez utiliser un systme Linux dj existant comme
  systme source, mais je le dconseille. Si vous oubliez un des
  paramtres des commandes que nous allons saisir, vous pourriez
  accidentellement rinstaller des choses sur votre systme source. Cela
  peut mener  des incompatibilits, et des conflits.


  Les anciennes architectures PC, pour la plupart 486 et plus ancien,
  ont une limitation ennuyeuse de leur Bios. Il ne peuvent lire les
  disques durs pass les 512 premiers mgaoctets. Ce n'est pas vraiment
  un problme pour Linux, qui gre lui-mme les disques une fois lanc.
  Mais pour que Linux soit charg sur ces vieilles machines, le noyau
  doit rsider quelque part en dessous de 512 mgaoctets. Si vous
  utilisez une de ces machines, vous devez crer une partition distincte
  en dessous de 512 Mo,  monter sur /boot pour toute partition au
  dessus de la limite des 512 Mo.

  La dernire fois que je l'ai fait, j'ai utilis Red Hat 6.1 comme
  systme source. J'ai install le systme de base plus


    cpp

    egcs

    egcs-c++

    patch

    make

    dev86

    ncurses-devel

    glibc-devel

    kernel-headers


  J'ai aussi install X-window et Mozilla (NDT : Netscape) pour pouvoir
  lire les documentations facilement, mais ce n'est pas ncessaire. A la
  fin de mon travail, cela avait pris environ 350M d'espace disque (Cela
  semble un peu lev, je me demande pourquoi).


  Le systme cible achev prenait 650M, mais comprenait tout le code
  source et les fichiers intermdiaires. Si l'espace est limit, je vous
  conseille de faire un make clean aprs la construction de chaque
  package. Cela dit, c'est une source d'ennuis et d'hsitation.


  Enfin, vous allez avoir besoin du code source du systme que vous
  allez construire. Il y a les ``packages'' dont nous avons parl dans
  ce document.  On peut les obtenir depuis un CD, ou par l'Internet. Je
  donnerai les URL pour les sites amricains et miroirs australiens.




    MAKEDEV USA <ftp://tsx-11.mit.edu/pub/linux/sources/sbin> Autre
     site aux USA <ftp://sunsite.unc.edu/pub/Linux/system/admin>

    Lilo USA <ftp://lrcftp.epfl.ch/pub/linux/local/lilo/>, Australie
     <ftp://mirror.aarnet.edu.au/pub/linux/metalab/system/boot/lilo/>.

    Noyau Linux Utilisez un des miroirs lists sur home page
     <http://www.kernel.org> plutt que USA
     <ftp://ftp.kernel.org/pub/linux/kernel> car ils sont toujours en
     surcharge.  Australie
     <ftp://kernel.mirror.aarnet.edu.au/pub/linux/kernel/>

    GNU libc La bibliothque elle-mme, ainsi que les add-on
     linuxthreads sont sur USA <ftp://ftp.gnu.org/pub/gnu/glibc>
     Australie <ftp://mirror.aarnet.edu.au/pub/gnu/glibc>

    Add-ons  la libc GNU Vous aurez aussi besoin des linuxthreads et
     des add-on libcrypt.  Si libcrypt est absente  cause des lois
     amricaines sur l'exportation, vous pouvez la rcuprer sur
     libcrypt <ftp://ftp.gwdg.de/pub/linux/glibc> les add-ons
     linuxthreads sont au mme endroit que libc proprement dite.


    GNU ncurses USA <ftp://ftp.gnu.org/gnu/ncurses> Australie
     <ftp://mirror.aarnet.edu.au/pub/gnu/ncurses>

    SysVinit USA <ftp://sunsite.unc.edu/pub/Linux/system/daemons/init>
     Australie
     <ftp://mirror.aarnet.edu.au/pub/linux/metalab/system/daemons/init>

    GNU Bash USA <ftp://ftp.gnu.org/gnu/bash> Australie
     <ftp://mirror.aarnet.edu.au/pub/gnu/bash>

    GNU sh-utils USA <ftp://ftp.gnu.org/gnu/sh-utils> Australie
     <ftp://mirror.aarnet.edu.au/pub/gnu/sh-utils>

    util-linux Ailleurs <ftp://ftp.win.tue.nl/pub/linux/utils/util-
     linux/> Australie
     <ftp://mirror.aarnet.edu.au/pub/linux/metalab/system/misc> Ce
     package contient agetty et login.


  Pour rsumer, il vous faut :

    Une machine avec deux partitions distinctes d'environ 400M et 700M
     respectivement, bien que vous puissiez srement vous en tirer avec
     un espace plus restreint.

    Une distribution de Linux (un CD de Red Hat par exemple), et de
     quoi l'installer (un lecteur de CD par exemple).

    Les archives (tarballs : fichier contenant plusieurs autres
     fichiers concatns en un seul, puis compress ou non ensuite) du
     code source, listes ci-dessus.


  Je pars du principe que vous pouvez installer le systme source vous-
  mme, sans aide de ma part. A partir de maintenant, je considre que
  c'est fait.


  Les premiers pas de ce projet consistent  faire dmarrer le noyau, et
  le laisser `paniquer' (panic) car il ne peut trouver le programme
  init.  Cela signifie que nous allons devoir installer un noyau, et
  installer Lilo.  Pour que Lilo fonctionne quand mme correctement,
  nous avons besoin d'installer les fichiers spciaux dans le /dev du
  systme cible.  Lilo en a besoin pour effectuer les accs bas niveau
  au disque, ncessaire pour crire le secteur d'amorce. MAKEDEV est le
  script qui cre ces fichiers spciaux (Vous pourriez bien sr les
  recopier depuis le systme source, mais ce serait tricher !). Mais
  d'abord, il nous faut un systme de fichiers pour les mettre dedans.



  1133..22..  LLee ssyyssttmmee ddee ffiicchhiieerr ((FFiilleessyysstteemm))

  Notre nouveau systme a besoin d'un systme de fichiers pour vivre.
  Donc, il nous faut tout d'abord crer ce systme de fichiers en
  utilisant mke2fs. Ensuite il faut le monter quelque part. Je vous
  suggre /mnt/target (comme `cible'). Dans ce qui va suivre, je
  considre que votre systme se trouve  cet endroit. Vous pouvez
  gagner un peu de temps en ajoutant une entre dans /etc/fstab de faon
   ce que le montage de votre systme destination soit automatique
  lorsque votre systme source dmarre.


  Lorsque nous dmarrerons le systme cible, ce qui se trouve dans
  /mnt/target se trouvera alors dans / ( la racine).

  Nous avons besoin d'une structure de sous-rpertoires sur la cible.
  Jetez un oeil au Standard de la Hirarchie des Fichiers (File
  Hierarchy Standard, voir section ``Systme de Fichiers'').  pour
  trouver vous mme ce qu'elle devrait tre, ou faites simplement un cd
  vers l'endroit o la cible est monte et tapez aveuglment :



          mkdir bin boot dev etc home lib mnt root sbin tmp usr var
          cd var; mkdir lock log run spool
          cd ../usr; mkdir bin include lib local sbin share src
          cd share/; mkdir man; cd man
          mkdir man1 man2 man3 ... man9



  Comme le FHS et la plupart des packages se contredisent en ce qui
  concerne l'endroit o les man pages doivent se trouver, nous avons
  besoin d'un lien symbolique :



          cd ..; ln -s share/man man




  1133..33..  MMAAKKEEDDEEVV

  Nous mettrons le code source dans le rpertoire /usr/src cible.  Aussi
  si votre systme de fichiers cible est mont par exemple sur
  /mnt/target, et que vos archives sont dans /root, il faudra faire :



          cd /mnt/target/usr/src
          tar -xzvf /root/MAKEDEV-2.5.tar.gz




  Ne vous comportez pas en amateur fini et pensez  copier vos archives
   l'endroit o vous allez les dcompresser ;-)


  En principe, lorsque vous installez un logiciel, vous l'installez sur
  le systme en fonctionnement. En l'occurence, ce n'est pas notre
  intention, nous souhaitons l'installer comme si /mnt/target tait le
  systme de fichiers racine.  Les diffrents packages ont diffrentes
  manires de vous le laisser faire.  Pour MAKEDEV, vous devez faire


          ROOT=/mnt/target
          make install




  Vous devez rechercher ces options dans les fichiers README et INSTALL
  ou faire un ./configure --help.


  Explorez le Makefile de MAKEDEV pour voir l'usage qu'il fait de la
  variable ROOT, que nous avons dfinie dans cette commande. Ensuite
  jetez un oeil  la page de manuel en faisant un man ./MAKEDEV.man pour
  voir comment il fonctionne. Vous dcouvrirez que la mthode utilise
  pour ces fichiers spciaux consiste  faire un cd /mnt/target/dev puis
  un ./MAKEDEV generic. Faites un ls pour dcouvrir tous les merveilleux
  fichiers spciaux qu'il a crs pour vous !


  1133..44..  LLee nnooyyaauu ((kkeerrnneell))

  Ensuite, nous devons fabriquer un noyau. Je considre que vous l'avez
  dj fait, aussi serai-je bref. Il est plus facile d'installer Lilo si
  le noyau cens tre mont est dj l. Retournez dans le rpertoire
  /usr/src de la cible, et dcompressez-y les sources du noyau linux.
  Entrez dans l'arborescence des sources (cd linux) et configurez le
  noyau, en utilisant votre mthode prfre, comme par exemple make
  menuconfig.  Vous vous faciliterez grandement la vie si vous
  configurez un noyau sans module. Si vous configurez des modules, vous
  devrez diter Makefile, trouver INSTALL_MOD_PATH, et lui affecter la
  valeur /mnt/target.


  Vous pouvez maintenant taper make dep, make bzImage, et si vous avez
  configur des modules : make modules, make modules_install. Copiez le
  noyau arch/i386/boot/bzImage et le plan systme System.map vers le
  rpertoire de boot de la cible /mnt/target/boot, et nous seront prts
   installer Lilo.


  1133..55..  LLiilloo

  Lilo est livr avec un trs beau script nomm QuickInst.  Dcompressez
  les sources de Lilo dans le rpertoire des sources du systme cible,
  lancez ce script par la commande ROOT=/mnt/target ./QuickInst. Il vous
  posera plusieurs questions concernant la manire dont vous souhaitez
  que Lilo soit install.


  Souvenez-vous, comme nous avons affect  la variable ROOT la
  partition cible, vos noms de fichiers s'y rapportent. Donc, lorsqu'il
  vous demandera le nom du noyau  lancer par dfaut, rpondez
  /boot/bzImage, _p_a_s /mnt/target/boot/bzImage.  J'ai trouv un bug
  mineur dans le script, qui lui fait dire :



          ./QuickInst: /boot/bzImage: no such file



  Mais si vous vous contentez de l'ignorer, cela passe quand mme.


  Comment doit-on s'y prendre pour expliquer  QuickInst o installer le
  secteur de boot ? Quand nous redmarrons, nous voulons avoir le choix
  de dmarrer le systme source ou le systme cible, ou encore n'importe
  quel autre systme prsent sur la machine. Et nous souhaitons que
  l'instance de Lilo que nous mettons en place maintenant lance le noyau
  de notre nouveau systme. Comment est-ce que l'on ralise ces deux
  choses ? Ecartons-nous un moment du sujet et tudions la faon dont
  Lilo dmarre DOS sur un systme Linux en dual-boot. Le fichier
  lilo.conf d'un tel systme doit srement ressembler  .







  prompt
  timeout = 50
  default = linux

  image = /boot/bzImage
          label  = linux
          root   = /dev/hda1
          read-only

  other = /dev/hda2
          label = dos





  Si la machine est configure de cette faon, alors le Master Boot
  Record (MBR) est lu et charg par le Bios, et lance le bootloader de
  Lilo, qui affiche une invite de commande. Si vous tapez dos dans cette
  invite, Lilo chargera le secteur de boot depuis hda2, qui lancera DOS.


  Ce que nous allons faire est exactement la mme chose, mis  part que
  le secteur d'amorce d'hda2 va tre un autre secteur d'amorce Lilo -
  celui-l mme que QuickInst va installer. Donc le Lilo de la
  distribution de linux chargera le Lilo que nous avons construit, qui
  chargera le noyau que nous avons bti.  Vous verrez alors deux invites
  de commande Lilo au redmarrage.


  Pour raccourcir une longue histoire, lorsque QuickInst vous demande o
  placer le secteur de boot, indiquez-lui l'endroit o se trouve votre
  systme de fichiers cible, par exemple /dev/hda2.


  Maintenant modifiez le fichier lilo.conf de votre systme source, de
  faon  ce qu'il ait une ligne ressemblant :



  other = /dev/hda2
          label = target



  Lancez Lilo, et nous devrions tre capables de faire notre premier
  dmarrage sur le systme cible.


  1133..66..  GGlliibbcc

  L'tape suivante consiste  installer init, mais comme la plupart des
  programmes qui tournent sous Linux, init utilise des fonctions issues
  de la bibliothque C GNU, glibc. Aussi l'installerons-nous en premier.


  Glibc est un package trs gros et trs compliqu. Il faut 90 heures
  pour le btir sur mon vieux 386sx/16 avec 8M RAM. Mais cela ne prend
  que 33 minutes sur mon Celeron 433 avec 64M. Je pense que la quantit
  de mmoire est le principal critre dans notre cas. Si vous n'avez que
  8Mo de RAM (ou - j'en tremble - encore moins !), prparez vous  une
  trs longue compilation.


  La documentation d'installation de glibc recommande une construction
  dans un rpertoire distinct. Cela vous permet de recommencer
  facilement, en supprimant simplement ce rpertoire. Cela vous permet
  aussi d'conomiser 265Mo d'espace disque.


  Dcompressez l'archive glibc-2.1.3.tar.gz (ou n'importe quelle autre
  version) dans /mnt/target/usr/src comme d'habitude. A prsent, nous
  devons dcompresser les ``add-on'' dans le rpertoire de la glibc.
  Donc, faites un cd glibc-2.1.3, puis dcompressez  cet endroit les
  archives glibc-crypt-2.1.3.tar.gz et glibc-linuxthreads-2.1.3.tar.gz.


  Maintenant, nous pouvons crer le rpertoire de construction,
  configurer, btir et installer glibc. Voici les commandes que j'ai
  utilises, mais relisez vous-mme la documentation et assurez-vous de
  faire ce qui est le plus appropri dans votre environnement.
  Toutefois, avant de faire tout cela, vous voudrez sans doute connatre
  l'espace disque qu'il vous reste par un df. Vous pouvez en faire un
  autre aprs avoir bti et install glibc pour en dduire son volume.



          cd ..
          mkdir glibc-build
          ../glibc-2.1.3/configure --enable-add-ons --prefix=/usr
          make
          make install_root=/mnt/target install




  Remarquez que nous avons ici encore une autre faon de dire au package
  l'endroit o s'installer.


  1133..77..  SSyyssVViinniitt

  Btir et installer les binaires de SysVinit est assez direct.  Je me
  contenterai d'tre paresseux et de vous donner les commandes, en
  considrant que vous avez dcompress son code source, et que vous
  tes entr dans son rpertoire.



   cd src
   make
   ROOT=/mnt/target make install




  Il existe aussi beaucoup de scripts associs  init. Il y a des
  scripts d'exemple fournis dans le package de SysVinit, qui
  fonctionnent bien. Mais vous devez les installer manuellement. Ils
  sont organiss dans une hirarchie sous debian/etc dans l'arborescence
  du code source de SysVinit. Vous pouvez recopier toute cette
  hirarchie dans le rpertoire etc du systme cible, avec une commande
  du style cd ../debian/etc; cp -r * /mnt/target/etc.  Evidement, vous
  explorerez ces scripts avant de tous les recopier.


  Tout est dsormais en place pour permettre au noyau cible de lancer
  init au redmarrage. Le problme, cette fois, viendra des scripts qui
  ne pourront tre excuts car bash ne sera pas l pour les
  interprter. init tentera galement de lancer des getty, qui sont
  inexistants eux aussi. Rebootez maintenant, et assurez-vous que tout
  le reste fonctionne correctement.
  1133..88..  NNccuurrsseess

  L'tape suivante consiste  mettre Bash en place, mais bash a besoin
  de ncurses, aussi devons-nous installer celui-ci en premier. Ncurses
  remplace termcap dans la manire de grer les crans texte, mais
  apporte galement une compatibilit ascendante en prenant en charge
  les appels termcap. Dans l'objectif d'avoir un systme moderne, simple
  et propre, je pense que le mieux est de dsactiver l'ancienne mthode
  termcap. Vous pourriez par la suite rencontrer des problmes avec des
  applications utilisant termcap, mais au moins vous connatrez les
  lments qui l'utilisent. Si vous en avez besoin, vous pouvez
  recompiler ncurses avec prise en charge de termcap.


  Les commandes que j'ai utilises sont :



          ./configure --prefix=/usr --with-install-prefix=/mnt/target --with-shared --disable-termcap
          make
          make install




  1133..99..  BBaasshh

  Il m'a fallu beaucoup de lecture, de rflexion, de tests, et d'erreurs
  pour que Bash s'installe l o je pensais qu'il devait aller. Les
  options de configuration que j'ai utilises sont :



   ./configure --prefix=/mnt/target/usr/local --exec-prefix=/mnt/target --with-curses




  Une fois que vous avez bti et install Bash, vous devez crer un lien
  symbolique comme ceci : cd /mnt/target/bin; ln -s bash sh.  Cela est
  d au fait que les scripts dbutent gnralement par une ligne comme
  celle-ci :



  #!/bin/sh




  Si vous n'avez ce lien symbolique, les scripts ne fonctionneront pas,
  car ils chercheront /bin/sh et non /bin/bash.


  Vous pouvez redmarrer  ce point si vous le souhaitez. Vous devriez
  remarquer que les scripts peuvent maintenant s'excuter, bien que vous
  ne puissiez vous loguer, car il n'y pas encore de programmes getty ou
  login.


  1133..1100..  UUttiill--lliinnuuxx ((ggeettttyy eett llooggiinn))

  Le package util-linux contient agetty et login. Nous avons besoin des
  deux pour nous loguer et obtenir la ligne de commande de bash.  Aprs
  l'avoir install, faites un lien symbolique depuis agetty vers getty
  de le rpertoire /sbin du systme cible.  getty est un des programmes
  censs se trouver sur tous les systmes de type Unix, donc faire un
  lien est une meilleure ide que de modifier inittab pour qu'il lance
  agetty.


  Il me reste un problme avec la compilation d'util-linux. Le package
  contient galement le programme more, et je n'ai pas t capable de
  persuader le processus make de placer le lien more sur la bibliothque
  de ncurses 5 du systme cible, plutt que sur ncurses 4 du systme
  source. Je regarderai cela de plus prs.


  Vous aurez aussi besoin d'un fichier /etc/passwd sur le systme cible.
  C'est l'endroit o le programme login ira vrifier votre
  accrditation. Comme il ne s'agit que d'un systme gadget  ce niveau,
  vous pouvez vous permettre des choses scandaleuses, comme ne dfinir
  que l'utilisateur root, sans mot de passe ! Mettez le simplement dans
  le fichier /etc/passwd du systme cible.




  root::0:0:root:/root:/bin/bash




  Les champs sont spars par des deux-points, correspondent, de gauche
   droite,  l'user id (nom de login), au mot de passe (crypt), au
  numro d'utilisateur, au numro de groupe, au nom de l'utlisateur, 
  son rpertoire personnel, et  son shell par dfaut.


  1133..1111..  SShh--uuttiillss

  Le dernier package dont nous ayons besoin est sh-utils GNU.  Le seul
  programme ncessaire  ce niveau est stty, qui est utilis dans
  /etc/init.d/rc, lui-mme utilis pour changer de niveau d'excution et
  entrer dans le niveau initial. En fait, je possde et ai utilis un
  package qui ne contient que stty mais je ne peux me souvenir d'o il
  vient. Il vaut mieux utiliser le package GNU, car il contient d'autres
  choses dont vous aurez besoin si vous voulez les ajouter au systme
  pour le rendre vraiment utilisable.


  Eh bien a y est. Vous devriez maintenant avoir un systme qui doit
  dmarrer et vous donner l'invite de login. Saisissez-y ``root'', et
  vous devriez avoir le shell. Vous ne pourrez pas faire grand chose
  avec, il n'y a mme pas de commande ls pour voir votre travail. Tapez
  deux fois la touche tab pour voir les commandes disponibles. C'est la
  chose la plus intressante que j'ai trouve  faire avec.


  1133..1122..  VVeerrss ll''uuttiilliissaabbiilliitt

  Il semblerait que nous ayons l un systme plutt inutilisable. Mais
  en ralit, nous ne sommes pas trs loin de pouvoir commencer 
  travailler avec. L'une des premires choses  faire est de rendre le
  systme de fichiers racine accessible et lecture et criture. Il y a
  un script issu du package, dans /etc/init.d/mountall.sh qui s'occupe
  de cela, et effectue un mount -a pour monter automatiquement tout ce
  qui est spcifi dans le fichier /etc/fstab. Mettez un lien symbolique
  du genre S05mountall vers lui dans le rpertoire etc/rc2.d du systme
  cible.


  Il se peut que ce script utilise des commandes que vous n'avez pas
  encore installes. Si c'est le cas, trouvez le package qui contient
  ces commandes et installez-le. Voyez la section ``Random Tips'' pour
  avoir des indications sur la marche  suivre pour trouver ces
  packages.


  Regardez les autres scripts dans /etc/init.d. La plupart d'entre-eux
  doit tre incluse dans tout systme srieux. Ajoutez-les un  un, et
  assurez-vous que tout se lance en douceur avant d'en ajouter d'autres.


  Lisez le Standard de la Hirarchie des Fichiers (voir section
  ``Systme de Fichiers'').  Il contient une liste de commandes qui
  devraient tre dans /bin et /sbin. Assurez-vous que toutes ces
  commandes sont installes sur votre systme.  Mieux encore, trouvez la
  documentation Posix qui spcifie tout cela.


  A partir de maintenant, il n'est plus question que d'ajouter de plus
  en plus de packages, jusqu' ce que tout ce que vous souhaitez avoir
  se trouve sur votre systme. Installez les outils de construction
  comme make et gcc le plus tt possible. Une fois que cela est fait,
  vous pouvez utiliser votre systme cible pour se construire lui-mme,
  ce qui est bien moins compliqu.


  1133..1133..  AAssttuucceess ddiivveerrsseess

  Si vous avez une commande appele thingy sur un systme Linux avec
  RPM, et souhaitez avoir des indications sur l'endroit o trouver les
  sources, vous pouvez utiliser la commande :


          rpm -qif `which thingy`



  Et si vous avez un CD de sources Red Hat, vous pouvez installer le
  code source avec


          rpm -i /mnt/cdrom/SRPMS/ce.qu.il.vient.de.dire-1.2.srpm




  Ceci mettra l'archive, avec les patches Redhats ventuels dans
  /usr/src/redhat/SOURCES.


  1133..1144..  PPlluuss dd''iinnffoorrmmaattiioonnss


    Il existe un mini-howto sur la manire de construire les logiciels
      partir de leurs sources, le Software Building mini-HOWTO
     <http://www.linuxdoc.org/HOWTO/Software-Building-HOWTO.html>
     (miroir franais en VO <http://linuxfr.org/LDP/HOWTO/Software-
     Building-HOWTO.html >).



    Il existe aussi un HOWTO sur la manire de construire un systme
     Linux depuis zro. Il met l'accent sur la construction d'un systme
     rellement utilisable, plutt que pour le simple exercice.  The
     Linux From Scratch HOWTO <http://www.linuxfromscratch.org>
  1144..  CCoonncclluussiioonn

  L'un des meilleurs cts de Linux,  mon humble avis, est que vous
  pouvez entrer dedans et voir rellement comment il fonctionne.
  J'espre que vous apprcierez cela autant que moi. Et j'espre que ces
  quelques notes vous y auront aid.


  1155..  SSeeccttiioonn aaddmmiinniissttrraattiivvee

  1155..11..  CCooppyyrriigghhtt

  Ce document est copyright (c) 1999, 2000 Greg O'Keefe. Vous tes libre
  de l'utiliser, le copier, le distribuer ou le modifier, sans
  obligation, selon les termes de la Licence Publique Gnrale (GPL :
  GNU General Public Licence <http://www.gnu.org/copyleft/gpl.html>).
  Merci de conserver les rfrences  l'auteur si vous utilisez tout ou
  partie de ce document dans un autre.


  1155..22..  PPaaggee pprriinncciippaallee

  Les mises  jour de ce document voluent sur From Powerup To Bash
  Prompt <http://learning.taslug.org.au/power2bash>.




  1155..33..  RReettoouurrss

  J'aimerais recevoir vos commentaires, critiques et suggestions.
  Veuillez s'il vous plat me les envoyer  Greg O'Keefe
  <mailto:gcokeefe@postoffice.utas.edu.au>



  1155..44..  RRffrreenncceess eett rreemmeerrcciieemmeennttss..

  Les noms de produits cits sont marques dposes de leur propritaires
  respectifs, et considrs par cette note comme reconnus comme tels.


  Il y a quelques personnes que je voudrais remercier, pour m'avoir aid
   raliser tout ceci.



     TToouutt lleess aabboonnnnss ddee llaa lliissttee ddee ddiissccuussssiioonn lleeaarrnniinngg@@TTaassLLUUGG
        Merci pour avoir lu tous mes mails et pos des questions
        intressantes.  Vous pouvez rejoindre cette liste en envoyant un
        message  majordomo <mailto:majordomo@taslug.org.au> avec la
        phrase

                subscribe learning


     dans le corps du message.



     MMiicchhaaeell EEmmeerryy
        Pour m'avoir rappel Unios.

     TTiimm LLiittttllee
        Pour de bonnes indications concernant /etc/passwd

     ssPPaaKKrr ddaannss ##lliinnuuxx ssuurr eeffnneett
        Qui a souponn l'utilisation de /etc/services par syslog, et
        m'a fait connatre la phrase ``rolling your own'' ("roulez-la
        vous-mme") pour  dcrire la construction d'un systme  partir
        des sources.

     AAlleexx AAiittkkiinn
        Pour avoir port Vico et son ``verum ipsum factum'' (La
        comprhension dcoule de l'exprience)  mon attention.

     DDeennnniiss SSccootttt
        Pour avoir corrig mon arithmtique en hexadcimal.

     jjdddd
        Pour avoir mis en vidence quelques erreurs typographiques.

     DDaavviidd LLeeaaddbbeeaatteerr
        Pour avoir contribu aux ``prgrinations'' dans les dmons
        noyau.


  1155..55..  HHiissttoorriiqquuee ddeess cchhaannggeemmeennttss

  1155..55..11..  00..66 -->> 00..77


    L'accent est plus port sur l'explication, et moins sur la faon de
     monter un systme, ces informations ayant t regroupes dans une
     section distincte, et le systme une fois construit a t revu  la
     baisse, voir directement la documentation de Gerard Beekmans
     ``Linux From Scratch'' pour construire un systme srieux.

    Ajout de quelques hypothses de la part de David Leadbeater

    Correction de deux URL, ajout d'un lien vers le tlchargement
     d'unios sur learning.taslug.org.au/resources

    Test et correction d'url.

    Grand nettoyage et rcriture gnrale.


  1155..55..22..  00..55 -->> 00..66


    Ajout de l'historique des changements

    Ajout de quelques ``todos'' (``A faire'').


  1155..66..  AA ffaaiirree ((TTOODDOO))


    expliquer les modules noyau, depmod, modprobe, insmod et tout (il
     faut d'abord que je trouve moi-mme).

    mentionner le systme de fichiers /proc. Exercices potentiels.

    convertir en documentation sgml

    ajouter plus d'exercices, peut-tre une section entire d'exercices
     plus pousss, comme crer un systme de fichiers minimal fichier
     par fichier  partir de l'installation d'une distribution.



  ftape-HOWTO
  Kai Harrekilde-Petersen, khp@login.dkuug.dk
  Derniere mise a jour 17 juillet 1994 pour ftape-1.13b

  Ce  HOWTO  presente l'essentiel de ce qu'il faut faire et ne pas faire
  pour utiliser avec succes le pilote ("driver") ftape  sous  Linux.  Le
  pilote  ftape  gere  uniquement  les  lecteurs  compatibles aux normes
  QIC-80 et QIC-40. Ces lecteurs de bandes se connectent  au  controleur
  du lecteur de disquettes (par exemple a la place d'un second lecteur).
  En revanche, il ne gere ppaass les lecteurs de bandes SCSI ou QIC-02,  ni
  les lecteurs de type DAT qui se connectent en general (toujours?) a un
  controleur SCSI.  Ceci n'est qu'un des differents  HOWTOs  disponibles
  pour  Linux.  Vous  pouvez  obtenir  la serie complete a partir de The
  Linux Documentation home page <http://sunsite.unc.edu/mdw/linux.hmtl>.
  Ce  HOWTO a ete traduit de l'anglais par Loic PRYLLI, lprylli@lip.ens-
  lyon.fr, derniere mise a jour 2 septembre 1994.

  11..  DDrrooiittss ddee ddiiffffuussiioonn

  Ceci constitue le `Frequently Asked Questions'  (FAQ)  /  HOWTO  guide
  pour  l'interface  ftape  (ftape-HOWTO),  Copyright  (C) 1993,1994 Kai
  Harrekilde-Petersen.

  CCooppyyrriigghhtt ::

  Ce document peut etre librement  diffuse  eenn  eennttiieerr,  sous  n'importe
  quelle forme et gratuitement. Une diffusion partielle est autorisee, a
  condition de conserver le message de copyright, et d'inclure une  note
  precisant  que  ce  n'est  pas  la  version  integrale et indiquant ou
  obtenir le guide complet. Sous les memes conditions, ce document  peut
  etre  inclus dans une distribution commerciale, sans accord prealable.
  L'auteur aimerait cependant etre informe d'un tel usage.

  Ce HOWTO peut etre traduit dans n'importe quel  langage,  a  condition
  que  la  notice  de  copyright  et  les  reserves d'utilisation soient
  preservees intactes, et  qu'une  note  stipulant  le  traducteur  soit
  ajoutee.

  RReesseerrvveess ppoouurr ll''uuttiilliissaattiioonn ::

  Bien  que  des  efforts  aient  ete faits pour fournir une information
  aussi correcte et a jour que possible, il est possible que l'usage des
  informations  de  ce  document puisse conduire a une perte de donnees.
  AUCUNE GARANTIE n'est fournie en ce qui concerne l'information fournie
  par  ce  guide,  et l'auteur ne peut pas etre tenu pour responsable de
  quelque consequence  que  ce  soit  pour  tout  dommage  resultant  de
  l'utilisation de ce guide.

  22..  PPrreelliimmiinnaaiirreess

  22..11..  LLaa vveerrssiioonn llaa pplluuss rreecceennttee ddee ffttaappee -- eett oouu ll''oobbtteenniirr

  A  l'ecriture  de ce guide, ftape-1.13b est la version plus recente du
  pilote ftape, et peut etre rapatriee a partir des sites suivants :

           tsx-11.mit.edu   [18.172.1.2]: /pub/linux/ALPHA/QIC-80/
           sunsite.unc.edu [152.2.22.81]: /pub/Linux/kernel/tapes/
           ftp.funet.fi  [128.214.248.6]: /pub/OS/Linux/BETA/QIC-80/

  Vous  devez  obtenir  les  fichiers  suivants  :   ftape-1.13b.tar.gz,
  ftape-1.13b.lsm  et  modules.tar.gz.   Le  fichier  ftape-1.13b est le
  pilote proprement dit, le fichier  le  cadre  du  projet  LSM,  et  le
  fichier  modules  contient  un  ensemble  d'utilitaires  permettant de
  charger des pilotes  dynamiquement.   Note  :  si  vous  possedez  une
  version   ancienne   des   modules,   par   exemple   les  utilitaires
  modutils-0.99.14.tar.gz   ou   modutils-0.99.15.tar.gz,   vous   allez
  probablement avoir besoin de vous mettre a jour.

  22..22..  DDeevveellooppppeemmeenntt dduu ppiilloottee ffttaappee

  Si  vous  voulez suivre le developpement du pilote ftape, envisagez de
  souscrire a la rubrique TAPE sur la liste  de  distribution  (mailing-
  list) Linux-activists. Pour ce faire, envoyez un courrier electronique
  (e-mail) a <linux-activists-request@niksula.hut.fi>, en mettant sur la
  premiere  ligne  (ou  dans l'en-tete) `X-Mn-Admin: join tape'. Si vous
  envoyez un message vide (ou si le systeme automatique  de  reponse  ne
  peut  interpreter  votre  message), vous recevrez un guide sur comment
  ecrire une requete.

  Pour diffuser un courrier technique sur cette liste, ecrivez a <linux-
  activists@niksula.hut.fi>,  et n'oubliez pas que la premiere ligne (ou
  une ligne d'en-tete) doit contenir `X-Mn-Key: TAPE'.

  22..33..  LLeecctteeuurrss ssuuppppoorrtteess

  Tous les lecteurs qui sont a  la  fois  compatibles  QIC-117  et  soit
  QIC-40,  soit  QIC-80  doivent fonctionner avec le pilote ftape.  Pour
  l'instant, les lecteurs suivants ont ete utilises avec succes :

  +o  Colorado DJ-10 / DJ-20 (Jumbo 120 / Jumbo 250)

  +o  Archive 5580i / XL9250i

  +o  Insight 80Mb

  +o  Conner C250MQ

  +o  Wangtek 3080F

  +o  Iomega 250 (seulement un fichier par bande, malheureusement)

  +o  Escom / Archive (Hornet) 31250Q

  +o  Summit SE 150 / SE 250

  +o  Mountain FS8000

  +o  Colorado FC-10 High-Speed Controller

  La gestion du controleur FC-10 a ete integre dans le  pilote  ftape  a
  partir  de  la version 1.12. Vous pouvez vous referer aux fichiers (en
  anglais) RELEASE-NOTES et Makefile dans  la  distribution  ftape  pour
  avoir plus de precisions.

  Quelques  lecteurs  de  bande  (Iomega)  mettent  a  tort l'indicateur
  `nouvelle-cartouche-chargee'  (new-cartridge-loaded)  a  l'etat  actif
  chaque fois que le fichier de peripherique est ouvert. Ces lecteurs ne
  fonctionneront pas correctement avec les marques de fichiers  du  fait
  qu'apres chaque fichier on se retrouve au debut de la bande.

  NOTE : Si jamais vous possedez un lecteur qui fonctionne correctement,
  et qui n'est pas liste ci-dessus, envoyez s'il vous plait un  courrier
  au responsable de ce guide (khp@login.dkuug.dk).

  22..44..  LLeecctteeuurrss NNOONN--ggeerreess

  +o  Tous  les  lecteurs  qui  se  connectent via le port parallele (par
     exemple : Colorado Trakker)

  +o  Controleur a haute-vitesse. (par exemple : Colorado TC-15 & FC-20)

  +o  Irwin AX250L / Accutrak 250. (pas un lecteur QIC-80)

  +o  IBM Internal Tape Backup Unit (identique au lecteur Irwin AX250L)

  +o  COREtape light

  De maniere generale, AUCUN lecteur se  connectant  au  port  parallele
  n'est  gere,  en  effet  ces  lecteurs  utilisent plusieurs interfaces
  proprietaires differentes, qui sont tres eloignes du standard QIC-117.

  Le  controleur  Colorado  TC-15  (et ses sosies) ne sont pas geres par
  l'interface ftape. Le Colorado FC-10 est le seul controleur  qui  peut
  etre  utilise.  Le  support  pour  celui-ci  a  ete integre dans ftape
  version 1.12.

  Le Irwin AX250L (et l'unite de sauvegarde interne IBM)  ne  fonctionne
  pas  avec ftape. En effet, ils utilisent bien le standard QIC-117 mais
  pas  le  standard  QIC-80  (ils  utilisent  a  la  place   le   format
  proprietaire   servoe   (Rhomat)   de   Irwin).  L'auteur  n'a  aucune
  information sur le format Rhomat, ni ou l'on peut la trouver.  Desole.

  Le    COREtape    light   ne   fonctionne   pas   (encore).   Quelques
  caracteristiques sont connues sur ce lecteur, mais on n'a  pas  encore
  reussi a lui faire accepter les donnees d'initialisation. Il n'est pas
  sur qu'on arrive un jour a le faire marcher avec ftape.

  22..55..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn ddee ll''iinntteerrffaaccee ffttaappee

  Un guide d'installation est fourni  dans  la  distribution  ftape  (le
  fichier Install-guide en anglais), lisez-le s'il vous plait.

  22..66..  OOuu oobbtteenniirr lleess ssoouurrcceess dduu nnooyyaauu ((kkeerrnneell)) ??

  Vous  pouvez  obtenir les sources du noyau a l'endroit ou vous avez eu
  les sources de ftape. Ces sources  sont  disponibles  dans  les  sites
  suivants (et n'importe quelle site miroir).

           tsx-11.mit.edu [18.172.1.2]: /pub/linux/sources/system/
           sunsite.unc.edu [152.2.22.81]: /pub/Linux/kernel/
           ftp.funet.fi [128.214.248.6]: /pub/OS/Linux/PEOPLE/Linus

  Vous trouverez un certain nombre de sous-repertoires, dont deux nommes
  respectivement v1.0 et v1.1. Ils  contiennent  (bien  evidemment)  les
  versions  v1.0  et v1.1 du noyau. Il est suggere de choisir la version
  1.1.< ... >.

  22..77..  PPeeuutt--oonn ffoorrmmaatteerr ddeess bbaannddeess ssoouuss LLiinnuuxx ??

  Pour le moment, non ! Cela est a  l'etude,  mais  mieux  vaut  ne  pas
  attendre que ce soit termine. En attendant, vous allez devoir utiliser
  MessyDos (arghhh !)  ou acheter des bandes preformatees. Cependant, la
  presence  de  secteurs  defectueux  n'est  _P_A_S  verifiee sur certaines
  bandes preformatees. Par securite, si le pilote  ftape  rencontre  une
  bande sans blocs defectueux, un message d'avertissement sera emis.

  22..88..  QQuueellss pprrooggrraammmmeess ddee ffoorrmmaattaaggee ppeeuutt--oonn uuttiilliisseerr ssoouuss DDOOSS??

  Les suivants ont ete utilises avec succes :

  +o  logiciels de Colorado Memory System (tape.exe)

  +o  Connor Backup Basics v1.1 et toutes les versions Windows.

  +o  Norton Backup

  +o  QICstream version 2

  Les programmes suivants  sont connus pour etre plus ou moins bogues.

  +o  CONNER Backup Basics  1.0

  +o  CP Backup (fonctionne OK mis a part un gaspillage de place)

  En fait, la plupart des  logiciels  sous  DOS  devraient  marcher.  Le
  Conner  Backup  Basics  v1.0 a un parametre errone (quelqu'un a du mal
  lire les specifications QIC-80 !), ce qui est corrige dans la  version
  1.1.  Dennis  T. Flaherty (dennisf@denix.elk.miles.com) a rapporte que
  les proprietaires d'un  Conner  C250MQ  peuvent  obtenir  la  nouvelle
  version  1.1  en  appelant  au  1-800-230-5638  (aux  Etats-unis) pour
  demander une mise a jour  (en  echange  du  prix  correspondant  a  la
  disquette).  Signalons que les versions pour Windows fonctionnent tres
  bien.

  On peut utiliser Central Point Backup, mais il gaspille  de  la  place
  quand il rencontre un point defectueux sur la bande.

  NOTE  :  Si vous utilisez un logiciel de formatage sous DOS, qui n'est
  pas mentionne ci-dessus,  priere  d'ecrire  au  responsable  du  guide
  (khp@login.dkuug.dk) de maniere a rajouter l'information pertinente.

  33..  SSaauuvveeggaarrddee eett RReessttaauurraattiioonn

  33..11..  SSttoocckkeerr uunnee aarrcchhiivvee ssuurr uunnee bbaannddee

  Les programmes classiques que vous pouvez utiliser sont `tar', `dd' et
  `cpio'.  Vous devrez aussi utiliser `mt' pour  exploiter  completement
  le potentiel de vos bandes et de l'interface ftape. Pour commencer, il
  est recommande de choisir `tar', qui permet d'archiver un ensemble  de
  repertoires  et  de  recuperer  de  maniere  isolee des fichiers d'une
  sauvegarde precedente. Il paraitrait que cpio cree des  archives  plus
  compactes,  et soit plus souple que tar, mais l'auteur n'a pas essaye.
  Pour effectuer par exemple, une sauvegarde des sources de votre  noyau
  en  utilisant  tar,  vous  devez  faire  (en supposant que les sources
  soient dans /usr/src/linux) :

               cd /usr/src
               tar cf /dev/ftape linux

  Dans ce cas, les fichiers ne seront pas  compresses,  mais  l'ecriture
  sur la bande en sera plus continue. Si vous voulez cette fois utiliser
  la compression (et que vous possedez tar 1.11.2), il suffit  d'inclure
  le drapeau(*) -z, par exemple : `tar czf /dev/ftape linux'

  Pour  plus d'informations sur l'utilisation de tar, dd et mt, regardez
  dans les pages de references (man pages) et dans les fichiers  texinfo
  qui sont fournis avec les distributions correspondantes.

  (*)  tar  suppose que le premier argument se constitue d'options, donc
  le `-' n'est pas vraiment necessaire, autrement dit les deux commandes
  suivantes  sont  identiques  :  `tar  xzf  /dev/ftape'  et  `tar  -xzf
  /dev/ftape'

  33..22..  RReessttaauurreerr uunnee aarrcchhiivvee

  Maintenant, restaurons la sauvegarde des sources  du  noyau  que  nous
  venons  de  faire  dans  la  section  ``'' ci-dessus.  Pour cela tapez
  simplement :

               tar xf /dev/ftape

  Si lors de la sauvegarde  vous  avez  utilise  la  compression,  tapez
  plutot :

               tar xzf /dev/ftape

  Lorsque  vous  utilisez la compression, gzip va se plaindre de donnees
  superflues a la fin de l'archive  (et  cela  va  produire  un  message
  `broken pipe'). Ceci peut etre ignore sans probleme.

  Pour  les autres programmes utilitaires, lisez le manuel correspondant
  s'il vous plait.

  33..33..  TTeesstteerr uunnee aarrcchhiivvee

  tar a une option (-d) qui permet de  detecter  les  differences  entre
  deux  archives.  Pour  tester  votre  sauvegarde des sources du noyau,
  tapez

               tar df /dev/ftape

  Si vous n'avez  pas  la  page  de  manuel  de  tar,  vous  n'etes  pas
  (forcement) perdu. tar possede une aide en ligne : essayez `tar --help
  2>&1 | more'

  33..44..  CCoommmmeenntt ssttoocckkeerr pplluuss dd''uunn ffiicchhiieerr ttaarr sur une bande

  Pour stocker plus d'un fichier tar sur une bande, vous devez  utiliser
  l'utilitaire mt. Vous l'avez surement deja, si vous possedez l'une des
  distributions de Linux, par exemple Slackware ou Debian.

  tar genere une seule archive sur la  bande  et  ne  sait  pas  comment
  naviguer  entre  plusieurs archives sur une meme bande, il se contente
  de faire des lectures ou des ecritures sur le fichier de peripherique.
  mt  est dedie aux manipulations de bande, embobiner ou rembobiner pour
  se positionner sur une archive specifique, mais ne sait  pas  lire  ou
  ecrire  des donnees sur la bande. Comme vous l'avez sans doute devine,
  c'est  l'association  de  tar  et   mt   qui   permet   d'obtenir   la
  fonctionnalite desiree.

  En  utilisant  le fichier special nrft[0-3] (nftape), vous pouvez vous
  servir de `mt' pour positionner la  bande  a  la  place  desiree  (par
  exemple  `mt  -f /dev/nftape fsf 2' pour embobiner jusqu'a passer deux
  ``marques de fichiers'', autrement dit sauter deux fichiers  tar),  et
  ensuite de tar pour lire ou ecrire les donnees appropriees.

  33..55..  AAjjoouutteerr ddeess ffiicchhiieerrss aa uunnee aarrcchhiivvee

  "Est-il  possible d'etendre une archive (un fichier tar), c'est a dire
  sauvegarder une archive, puis plus tard, de lui rajouter des fichiers"

  La  reponse est NON. La documentation de tar vous dira d'utiliser `tar
  -Ar', mais ca ne fonctionnera pas a cause  de  limitations  du  pilote
  ftape actuel.

  33..66..  MMoonntteerr//ddeemmoonntteerr ((MMoouunntt//uunnmmoouunnttiinngg)) ddeess bbaannddeess..

  Dans  la  mesure  ou  une  bande  ne  contient  pas  un  ``systeme  de
  fichiers'', il n'y a aucune raison pour a vouloir monter/demonter  une
  bande  pour  restaurer  le contenu de la bande, vous l'inserez dans le
  lecteur et executez  la  commande  `tar'  (ou  la  commande  que  vous
  utilisez d'habitude pour acceder au lecteur).

  "Y a t-il une commande explicite de (de)montage de la bande ?"

  Aucune.   Le peripherique (device) /dev/ftape est de type `caractere',
  et ne peut donc etre  applique  a  la  commande  [u]mount.  Seuls  les
  peripheriques de type `bloc' le peuvent.

  44..  QQuueessttiioonnss ffrreeqquueemmmmeenntt ppoosseeeess

  44..11..  PPeeuutt--oonn eecchhaannggeerr ddeess bbaannddeess aavveecc uunn uuttiilliissaatteeuurr ddee DDOOSS??

  Ce n'est pas possible pour l'instant.  Ce  probleme  _e_s_t  cependant  a
  l'etude.  Les logiciels DOS se conforment aux specifications QIC-80 en
  ce qui concerne la disposition du systemes de fichiers DOS, et ce doit
  etre  a  priori facile d'ecrire un programme capable de lire le format
  DOS. En fait, creer une interface utilisateur agreable est surement un
  probleme plus complique.

  44..22..  CCoommmmeenntt ffaaiirree ``........'' aavveecc ttaarr?

  Ces  questions  concernent le programme tar : lisez s'il vous plait la
  page de manuel (man page) et la page info correspondante. Si  vous  ne
  les possedez pas, essayez `tar --help --> --2>&1 | more'.

  Si  votre version de tar est v1.11.1 ou anterieure, considerez la mise
  a jour a v1.11.2. Cette  version  peut  appeler  GNU  zip  directement
  (autrement  dit  :  elle  supporte l'option de compression -z) et a de
  plus une aide integree  elaboree.  D'autre  part,  elle  compile  sans
  probleme pour Linux.

  44..33..  LLeess ttrraannssffeerrttss ddee DDMMAA ffttaappee donnent lieu a des erreurs ECC.

  Malheureusement il y a quelques cartes graphiques SVGA qui ne decodent
  pas correctement leurs adresses. Ceci se produit typiquement quand les
  zones tampons de ftape sont dans la region  0x1a0000  a  0x1c0000.  Il
  arrive  alors  que  les  cycles d'ecriture DMA soient fausses et qu'un
  octet ecrit sur deux ait une valeur fausse (0xff). Ces  problemes  ont
  ete  rapportes  avec a la fois des cartes SVGA et des cartes ethernet.
  Nous connaissons au moins une carte (deficiente?) ATI  16bit  VGA  qui
  cause ce probleme.

  La  solution la plus simple est de mettre la carte dans un emplacement
  8bit (ce n'est souvent pas suffisant pour  reconfigurer  la  carte  en
  8bit).  Deplacer la zone tampon ftape n'est qu'une solution partielle,
  a priori toutes les zones tampons DMA  utilisees  dans  Linux  peuvent
  avoir  ce  probleme ! Mettons nous bien d'accord : ce comportement n'a
  rien a voir avec le pilote ftape.

  44..44..  iinnssmmoodd indique que la version du noyau est erronee

  Le programme insmod verifie que la version du  noyau  courant  est  la
  meme  que celle memorisee dans le pilote ftape lors de la compilation.
  C'est une chaine de caracteres dans kernel-version.h, (par  exemple  :
  char  kernel_version[] = "1.0.4";) qui est extraite du noyau au moment
  ou vous executez `make dep'.  Si vous avez cette erreur  lorsque  vous
  essayer  d'inserer  le  pilote  ftape,  supprimer  le fichier `kernel-
  version.h' (dans la distribution ftape), tapez `make  dep  ;  make'  a
  nouveau  pour  recompiler et vous devez alors avoir une version a jour
  de kernel-version.h.  Souvenez-vous  que  cette  operation  doit  etre
  renouvelee  chaque  fois  que  vous passez a une version differente du
  noyau.

  44..55..  LLee nnooyyaauu 11..11..00 nnee ccoommppiillee pplluuss aavveecc  ll''ooppttiioonn  ddee  ssuuppppoorrtt  ppoouurr
  ffttaappee..

  (Bien que ce probleme ne soit pas ete reporte frequemment, je le  cite
  quand meme au cas ou !)

  Cela  vient  d'une  erreur typographique (et d'un hacker (programmeur)
  qui n'utilisait pas ftape lui-meme de sorte qu'il ne  lui  est  jamais
  arrive  de  tester  le  code  qu'il ecrivait). Cela a ete corrige dans
  patch1.gz qui peut etre trouve sur les sites ftp usuels.)

  44..66..  ttaarr/mt/cpio/dd ?  Ou sont les executables/sources/man-pages pour

  Tous  ces  outils  sont developpes dans le cadre du projet GNU, et les
  sources (ainsi que les pages de  manuel)  peuvent  etre  recuperees  a
  partir de pratiquement n'importe quel site ftp dans le monde entier (y
  compris ftp.funet.fi, tsx-11.mit.edu, et sunsite.unc.edu).  Dans  tous
  les  cas  on  peut  les  recuperer  a  partir  du  site officiel GNU :
  prep.ai.mit.edu [18.71.0.38]:/pub/gnu.  Les versions les plus recentes
  (au 26 mars 94) sont :

               cpio:   2.3 (cpio-2.3.tar.gz
               dd:     3.9 (fileutils-3.9.tar.gz)
               mt:     2.3 (cpio-2.3.tar.gz)
               tar:    1.11.2 (tar-1.11.2.tar.gz)
               gzip:   1.2.4 (gzip-1.2.4.tar.gz)

  Ils  compilent tous sans modifications sur Linux v1.0.4 / libc v4.5.19
  / gcc v2.5.8 (Le programme rmt necessite  quelques  adaptations,  mais
  n'est pas indispensable puisqu'il est seulement utilise pour acceder a
  distance a un lecteur de bande).

  55..  DDeebboogguueerr llee ppiilloottee ffttaappee

  55..11..  bboogguuee ??  LLee nnooyyaauu//ffttaappee ssee ppllaannttee lloorrssqquuee jjee ffaaiiss  ``......'' --  eesstt--
  ccee uunn

  Non, c'est une caracteristique voulue  ;-)

  Plus serieusement, un logiciel fiable ne doit pas  se  planter.  C'est
  particulierement  vrai  pour  le  noyau  qui  ne peut pas ou plutot ne
  ddeevvrraaiitt pas planter. Si le  noyau  se  plante  lorsque  vous  utilisez
  ftape, et que vous pouvez montrer que c'est le pilote ftape qui en est
  responsable, alors considerez cela comme  une  erreur  importante  qui
  Doit  Etre  Corrigee.  Ecrivez  les  details  de  votre  situation aux
  responsables du developpement (voir section ``'' ci-dessous).

  55..22..  qquuee ddooiitt--oonn ffaaiirree ??  ffttaappee nn''aarrrreettee ppaass ddee ddiirree ``......  nneeww  ttaappee''
  ((nnoouuvveellllee bbaannddee)),,

  [Note : cette methode ne  marche  plus;  l'auteur  ne  sait  pas  pour
  l'instant remedier a cette situation]

  Pour  arreter cela, faites (de memoire) : loggez vous en tant que root
  et faites `rmmod ftape'. ftape doit faire quelques `rates',  donner  a
  peu pres trois `segmentations fault', et expirer definitivement.

  Observez  le temoin (LED) de votre lecteur de disquettes (vous en avez
  bien un, n'est ce pas?). Si il reste  allume  de  maniere  permanente,
  vous  avez mis dans le mauvais sens le cable du lecteur de disquettes.
  Verifiez le cable entre le controleur,  le  lecteur  de  bande  _e_t  le
  lecteur  de  disquettes.  En  general,  l'un  (ou  plusieurs) d'un des
  connecteurs a ete mis dans le mauvais sens (dessus dessous), de  sorte
  que   l'emplacement  1  (broche  1)  d'une  extremite  se  connecte  a
  l'emplacement 34 (broche 34) de l'autre cote de  la  connexion.  (Tous
  les  emplacements  pairs  sont  mis  a la terre, donc votre lecteur de
  disquettes devrait aussi etre inutilisable). Ne  vous  inquietez  pas;
  cela ne peut pas abimer votre materiel.

  55..33..  -- CCoommmmeenntt ssoouummeettttrree uunn rraappppoorrtt ??  OOKK iill yy aa bbeell eett bbiieenn uunn bboogguuee
  ........ eeuuhhhh........ uunnee ccaarraacctteerriissttiiqquuee

  Premierement,  assurez-vous  que  le  probleme  est reproductible. Les
  erreurs  aleatoires  sont  tres  embetantes,  du  fait  qu'elles  sont
  impossibles a isoler :-/ Voila une liste rapide a verifier/reporter :

  +o  La  version  du  noyau, et les mises a jour appliquees (patches), y
     compris celles de ftape.

  +o  la version de ftape.

  +o  Le modele et le fabriquant du lecteur de bande.

  +o  Ce que vous avez fait pour declencher le probleme.

  +o  Un fichier de traces (log) de l'execution avec un niveau de tracage
     egal a 7.

  +o  Quelles anomalies se sont produites sur votre systeme.

  +o  Ne  supprimez  pas  le  noyau et le fichier ftape.o . Nous voudrons
     peut-etre essayer quelques  modifications  ou  executer  des  tests
     differents sur votre systeme.

  Augmenter  le  niveau de tracage jusqu'a 7 (juste en-dessous du niveau
  maximum) et executer la commande fautive  de  nouveau.  Recuperer  les
  donnees  de  tracage  a partir du `journal' du noyau ou de /proc/kmsg,
  cela dependant d'ou vous abritez vos messages d'erreur.  N'essayez pas
  de  `filtrer'  les traces obtenues. Vous pourriez considerer certaines
  choses superflues alors qu'elles sont essentielles pour  retrouver  le
  bogue.  Decrivez  exactement  ce  que  vous avez fait, et ce qui s'est
  passe sur votre systeme.  En  effet,  il  est  possible  que  nous  ne
  puissions  pas reproduire l'erreur parce que nous utilisons un lecteur
  different ou une autre version du noyau.

  55..44..  CCoommmmeenntt cchhaannggeerr llee nniivveeaauu ddee ttrraaccaaggee ??

  Il y a deux manieres de le faire : soit vous pouvez changer le  niveau
  de  tracage  par defaut (la variable `tracing' dans le fichier `ftape-
  rw.c') et recompiler, soit tapez

               mt /dev/ftape fsr <tracing-level>

  L'utilisation de la commande `fsr' avec mt est _u_n_e _s_o_r_t_e _d_e _b_i_d_o_u_i_l_l_e,
  et est destinee a disparaitre.

  55..55..   ddee  mmeessssaaggee  ssuuppeerrfflluuss ...... ppoouurrqquuooii ??  LLoorrss ddee ll''uuttiilliissaattiioonn ddee
  //ddeevv//nnffttaappee, il y a beaucoup

  Cela vient d'un probleme `historique', avant la version 0.9.10. De nos
  jours, les peripheriques `non-rembobinants' fonctionnent correctement.
  Si votre version est ancienne, il est vivement recommande de se mettre
  a jour avec la version 1.13b.

  66..  AAiiddee aauu ddeevveellooppppeemmeenntt ddee ffttaappee..

  66..11..   ppuuiiss--jjee  aaiiddeerr  lleess  ddeevveellooppppeeuurrss..   JJ''AADDOORREE tout simplement ce
  pilote ftape, comment

  Vous pouvez aider les developpeurs de ftape en repondant aux questions
  des  utilisateurs sur les `newsgroups'. Il y a beaucoup d'utilisateurs
  debutants, qui ont juste besoin  d'une  reponse  tres  simple  a  leur
  question,  par exemple `Ou puis-je trouver le ftape-HOWTO'. En general
  postez s'il vous plait votre reponse directement sur  le  `newsgroup',
  de maniere a en faire profiter d'autres utilisateurs.

  C'est  la  meilleure  maniere d'apporter votre contribution, avec bien
  sur  le  fait  de  tester  le  pilote  et  d'ecrire  des  rapports  de
  disfonctionnements precis.

  66..22..  QQuuii ddooiiss--jjee ccoonnttaacctteerr??  JJee vvoouuddrraaiiss aaiiddeerr aa ddeevveellooppppeerr ``......''

  Vous  trouverez  une  liste  des developpeurs ci-dessous. Si quelqu'un
  travaille deja sur un projet similaire ou identique,  contactez  cette
  personne  directement.  Si au contraire, vous avez un programme ou des
  ajouts    sur    lesquels    personne    ne    travaille,    contactez
  <khp@login.dkuug.dk>  (et  _N_O_N  Bas,  du  fait  qu'il est surcharge de
  travail et a peu de temps pour repondre aux questions.

     PPrrooggrraammmmee ddee ffoorrmmaattaaggee :: ((ppaass eennccoorree ccoommmmeennccee))
        Kai Harrekilde-Petersen, khp@login.dkuug.dk

        Cesare Mastroianni, cece@dist.dist.unige.it

     llee ppiilloottee ffttaappee pprroopprreemmeenntt ddiitt ::
        Bas Laarhoven, bas@vimec.nl

     EECCCC ccooddee :: ((nnee vvoouuss jjooiiggnneezz ppaass aa nnoouuss,, nnoouuss ssoommmmeess ddeejjaa aasssseezz nnoomm--
        bbrreeuuxx))
        Kai Harrekilde-Petersen, khp@login.dkuug.dk

        Bas Laarhoven, bas@vimec.nl

        David Mosberger-Tang, davidm@cs.arizona.edu

        Ning Mosberger-Tang, tn@cs.arizona.edu

     ffttaappee--HHOOWWTTOO ::
        Kai  Harrekilde-Petersen, khp@login.dkuug.dk version francaise :
        lprylli@lip.ens-lyon.fr

     ffoorrmmaatt llooggiiqquuee QQIICC--8800 ((lleeccttuurree//eeccrriittuurree aauu ffoorrmmaatt DDOOSS)) ::
        Guido Muench, odiug@pool.Informatik.RWTH-Aachen.de

        Kai Harrekilde-Petersen, khp@login.dkuug.dk

  GCC HOWTO pour Linux
  par Daniel Barlow <dan@detached.demon.co.uk>
  v1.17, 28 fevrier 1996

  (Adaptation  francaise  par  Eric  Dumas  <dumas@freenix.fr>,  8 Avril
  1996).  Ce document presente la maniere de configurer  le  compilateur
  GNU  C  et  les bibliotheques de developpement sous Linux. Il donne un
  apercu de la compilation, de l'edition de liens, de l'execution et  du
  debogage  de programmes sous Linux. Bon nombre de passages de ce docu-
  ment sont empruntes a la FAQ GCC redigee par  Mitch  D'Souza's  et  au
  HowTo  ELF.  Ceci est la premiere version publique (en depit du numero
  de version : en fait, ca vient de RCS). N'hesitez  pas  a  me  joindre
  pour toute remarque.

  11..  PPrreelliimmiinnaaiirreess

  11..11..

  EELLFF eett aa..oouutt

  Le   developpement  de  Linux  est  actuellement  dans  une  phase  de
  transition.  En resume, il existe deux formats de binaires  que  Linux
  reconnait  et execute, et cela depend de la maniere dont votre systeme
  est configure : vous pouvez avoir les deux, l'un ou l'autre. En lisant
  ce  document,  vous  pourrez  savoir  quels binaires votre systeme est
  capable de gerer.

  Comment le savoir ? Utilisez  la  commande  file  (par  exemple,  file
  /bin/bash).  Pour  un  programme  ELF, cette commande va vous repondre
  quelque chose dans lequel se trouve le  mot  ELF.  Dans  le  cas  d'un
  programme  en a.out, il vous indiquera quelque chose comme Linux/i386.

  Les differences entre ELF et a.out sont detaillees plus tard  dans  ce
  document.  ELF  est  le nouveau format et il est considere comme etant
  meilleur.

  11..22..

  DDuu ccoottee dduu ccooppyyrriigghhtt

  Le copyright et autres informations legales peuvent etre trouves a  la
  _f_i_n  de ce document, avec les avertissements conventionnels concernant
  la maniere de poser des questions sur Usenet  pour  eviter  d'avoir  a
  reveler  votre ignorance du langage C en annoncant des bogues qui n'en
  sont pas, etc.

  11..33..  TTyyppooggrraapphhiiee

  Si vous lisez ce document au format Postscript,  dvi,  ou  HTML,  vous
  pouvez  voir quelques difference entre les styles d'ecriture alors que
  les gens qui consultent ce document au format  texte  pur  ne  verront
  aucune  difference.  En  particulier, les noms de fichiers, le nom des
  commandes, les messages donnes par les programmes et les codes sources
  seront  ecrits avec le style suivant : style d'ecriture, alors que les
  noms de variables entre autres choses seront en _i_t_a_l_i_q_u_e.

  Vous aurez egalement un index. Avec les formats dvi ou postscript, les
  chiffres  dans  l'index  correspondent  au numeros de paragraphes.  Au
  format HTML, il s'agit d'une numerotation sequentielle pour  que  vous
  puissiez  cliquer  dessus.  Avec  le  format texte, ce ne sont que des
  nombres. Il vous est donc conseille de prendre un autre format que  le
  format texte !

  L'interpreteur  de  commande (_s_h_e_l_l) utilise dans les exemples sera la
  Bourne shell (plutot que le  C-Shell).  Les  utilisateurs  du  C-Shell
  utiliseront plutot :

       % setenv soif JD

  la ou j'ai ecrit

       $ soif=JD; export soif

  Si  l'invite  (_p_r_o_m_p_t dans la langue de Shakespeare) est  # plutot que
  $, la commande ne fonctionnera que si elle  est  executee  au  nom  de
  Root.  Bien  sur,  je  decline  toute responsabilite de ce qui peut se
  produire sur votre systeme lors de l'execution de ces exemples.  Bonne
  chance :-)

  22..  OOuu rreeccuuppeerreerr ddee llaa ddooccuummeennttaattiioonn eett lleess pprrooggrraammmmeess ??

  22..11..  CCee ddooccuummeenntt

  Ce  document  fait  partie de la serie des HOWTO pour Linux, et il est
  donc disponible ainsi que ces collegues  dans  les  repertoires  HowTo
  pour Linux, comme sur  <http://sunsite.unc.edu/pub/linux/docs/HOWTO/>.
  La    version    HTML    peut    egalement    etre    consultee    sur
  <http://ftp.linux.org.uk/~barlow/howto/gcc-howto.html>.

  Note  du  traducteur  :  vous pouvez obtenir tous les HowTos en langue
  anglaise  et  francaise  sur   ftp.ibp.fr:/pub/linux.   Les   versions
  francaises se trouvent dans le repertoire /pub/linux/french/HOWTO.

  22..22..

  AAuuttrreess ddooccuummeennttaattiioonn

  La  documentation officielle pour gcc se trouve dans les sources de la
  distribution (voir plus bas) sous la forme de fichiers texinfo  et  de
  fichiers  .info.  Si  vous possedez une connexion rapide, un CD-ROM ou
  une certaine patience, vous pouvez  desarchiver  la  documentation  et
  l'installer dans le repertoire /usr/info.  Sinon, vous pouvez toujours
  les                 trouver                 sur                 tsx-11
  <ftp://tsx-11.mit.edu:/pub/linux/packages/GCC/>,  mais  ce  n'est  pas
  necessairement toujours la derniere version.

  Il existe deux sources de documentation pour la libc. La libc GNU  est
  fournie avec des fichiers info qui decrivent assez precisement la libc
  Linux sauf pour la partie des entrees-sorties.  Vous pouvez  egalement
  trouver   sur   sunsite   <ftp://sunsite.unc.edu/pub/Linux/docs/>  des
  documents ecrits pour Linux ainsi  que  la  description  de  certaines
  appels systemes (section 2) et certaines fonctions de la libc (section
  3).
  Note du traducteur : un bemol concernant cette partie... La libc Linux
  n'est  pas  GNU  et  tend  a etre relativement differente sur certains
  points.

  22..33..  GGCCCC

  Il existe deux types de reponses

  (a) La distribution officielle de GCC pour Linux  peut  toujours  etre
  recuperee   sous   la   forme   de   binaires   (deja   compilee)  sur
  <ftp://tsx-11.mit.edu:/pub/linux/packages/GCC/>.   Vous   pouvez    la
  trouver           sur           le           miroir           francais
  <ftp://ftp.ibp.fr:/pub/linux/packages/GCC/>.  A l'heure ou j'ecris ces
  lignes, la derniere version est gcc 2.7.2 (gcc-2.7.2.bin.tar.gz).

  (b)  La  derniere  distribution des sources de GCC de la _F_r_e_e _S_o_f_t_w_a_r_e
  _F_o_u_n_d_a_t_i_o_n      peut-etre      recuperee      sur      prep.ai.mit.edu
  <ftp://prep.ai.mit.edu/pub/gnu/>             ou             ftp.ibp.fr
  <ftp://ftp.ibp.fr/pub/gnu/>.  Ce n'est pas toujours  la  meme  version
  que  celle presentee ci-dessus.  Les mainteneurs de GCC pour Linux ont
  rendu la compilation de GCC  plus  facile  grace  a  l'utilisation  du
  script   configure   qui   effectue  la  configuration  d'une  maniere
  automatique.              Regardez             dans             tsx-11
  <ftp://tsx-11.mit.edu:/pub/linux/packages/GCC/>      ou     ftp.ibp.fr
  <ftp://ftp.ibp.fr:/pub/linux/packages/GCC/> pour recuperer d'eventuels
  patches.

  Quelle que soit la complexite de votre programme, vous aurez egalement
  besoin de la _l_i_b_c.

  22..44..

  LLeess ffiicchhiieerrss dd''eenn--tteettee eett llaa bbiibblliiootthheeqquuee CC

  Ce que vous allez trouver dans ce paragraphe depend

  +o  de votre systeme (ELF ou a.out) ;

  +o  du type de binaire que vous desirez generer.

     Si vous etes en train de mettre a jour votre libc 4 en libc 5, vous
     devriez consulter le ELF HowTo qui se trouve au meme endroit que ce
     document.

  Les       libc        sont        disponibles        sur        tsx-11
  <ftp://tsx-11.mit.edu:/pub/linux/packages/GCC/>      ou     ftp.ibp.fr
  <ftp://ftp.ibp.fr:/pub/linux/packages/GCC/>. Voici une description des
  fichiers situes dans ce repertoire :

     lliibbcc--55..22..1188..bbiinn..ttaarr..ggzz
        ---  bibliotheques dynamiques et statiques ELF plus les fichiers
        d'en-tete  pour   la   bibliotheque   C   et   la   bibliotheque
        mathematique.

     lliibbcc--55..22..1188..ttaarr..ggzz
        ---  Code  source  pour  la  bibliotheque ci-dessus.  Vous aurez
        egalement besoin du paquetage  .bin.  pour  avoir  les  fichiers
        d'en-tete.  Si  vous  hesitez  entre  compiler la bibliotheque C
        vous-meme et utiliser les binaires, la bonne reponse est dans la
        majorite des cas est d'utiliser les binaires. Toutefois, si vous
        desirer utiliser NYS (NdT : NYS != NIS)  ou  bien  les  mots  de
        passe _s_h_a_d_o_w, vous devrez recompiler la libc par vous-meme.

     lliibbcc--44..77..55..bbiinn..ttaarr..ggzz
        ---  bibliotheques dynamiques et statiques a.out pour la version
        4.7.5 de la libc.  Cette bibliotheque a ete concue pour  pouvoir
        coexister  avec le paquetage de la libc 5 decrit ci-dessus, mais
        c'est  uniquement  necessaire  si  vous  desirez   utiliser   ou
        developper des programmes au format a.out.

  22..55..

  OOuuttiillss aassssoocciieess ((aass,, lldd,, aarr,, ssttrriinnggss,, eettcc..))

  Ces  outils  se  trouvent  comme  les bibliotheques dans le repertoire
  tsx-11 <ftp://tsx-11.mit.edu:/pub/linux/packages/GCC/>, et  ftp.ibp.fr
  <ftp://ftp.ibp.fr:/pub/linux/packages/GCC/>.   La version actuelle est
  binutils-2.6.0.2.bin.tar.gz.

  Il est utile de remarquer que ces outils  ne  sont  disponibles  qu'au
  format  ELF, que la libc actuelle est ELF et que la libc a.out ne pose
  pas de probleme  lorsqu'elle  est  utilisee  avec  la  libc  ELF.   Le
  developpement de la libc est relativement rapide et a moins que n'ayez
  de bonnes raisons pour utiliser le format a.out, vous etes  encourages
  a suivre le mouvement.

  33..  IInnssttaallllaattiioonn eett ccoonnffiigguurraattiioonn ddee GGCCCC

  33..11..

  LLeess vveerrssiioonnss ddee GGCCCC

  Vous  pouvez  savoir quelle est la version de GCC que vous possedez en
  tapant gcc -v lors de l'invite. C'est egalement  une  bonne  technique
  pour savoir si votre configuration est ELF ou a.out.  Sur mon systeme,
  cela donne ceci :

       $ gcc -v
       Reading specs from /usr/lib/gcc-lib/i486-zorglub-linux/2.7.2/specs
       gcc version 2.7.2

  Les mots-clefs a remarquer

  +o  i486.  Cela vous indique que la version de gcc que vous utilisez  a
     ete compilee pour etre utilisee sur un processeur 486 --- mais vous
     pouvez avoir un autre processeur comme un 386 ou un Pentium  (586).
     Tous   ces  processeurs  peuvent  executer  le  code  compile  avec
     n'importe quel processeur. La seule difference reside dans le  fait
     que  le  code  486 rajoute  un peu de code a certains endroits pour
     aller plus vite sur un 486.  Cela  n'a  pas  d'effet  nefaste  cote
     performance  sur  un 386 mais cela rend les executables un peu plus
     importants.
  +o  zorglub.   Ce  n'est  pas  reellement  important,  et   il   s'agit
     generalement  d'un commentaire (comme slackware or debian) ou meme,
     cela peut-etre vide (lorsque vous  avez  comme  nom  de  repertoire
     i486-linux).   Si  vous  construisez  votre propre gcc, vous pouvez
     fixer ce parametre selon vos desirs, comme je l'ai fait.  :-)

  +o  linux.  Cela peut etre a la place linuxelf ou linuxaout et en fait,
     la signification varie en fonction de la version que vous possedez.

  +o  linux signifie ELF si la version est 2.7.0  ou  superieure,  sinon,
     c'est du a.out.

  +o  linuxaout signifie a.out.  Cela a ete introduit comme cible lorsque
     le format des binaires a change  de  a.out  vers  ELF  dans  LLiinnuuxx.
     Normalement,  vous  ne verrez plus de linuxaout avec une version de
     gcc superieure a 2.7.0.

  +o  linuxelf est depasse. Il s'agit generalement de gcc  version  2.6.3
     configure pour generer des executables ELF. Notez que gcc 2.6.3 est
     connu pour generer de nombreuses erreurs lorsqu'il produit du  code
     ELF --- une mise a jour est tres fortement recommandee.

  +o  2.7.2 est le numero de la version de GCC.

  Donc,  en  resume,  nous  possedons  gcc 2.7.2 qui genere du code ELF.
  _Q_u_e_l_l_e _s_u_r_p_r_i_s_e (NdT: En francais dans le texte) !

  33..22..  AA qquueell eennddrrooiitt ss''iinnssttaallllee GGCCCC ??

  Si vous avez installe gcc sans regarder, ou bien si vous l'avez  eu  a
  partir  d'une distribution, vous pouvez avoir envie de savoir ou il se
  trouve dans votre arborescence. Les mots clefs permettant cela sont

  +o  /usr/lib/gcc-lib/_m_a_c_h_i_n_e_-_c_i_b_l_e/_v_e_r_s_i_o_n/ (et  ses  sous-repertoires)
     est  generalement  l'endroit  ou  se  trouve  le  plus  souvent  le
     compilateur.   Ceci  inclut  les  executables  qui   realisent   la
     compilation  ainsi que certaines bibliotheques et quelques fichiers
     d'en-tete.

  +o  /usr/bin/gcc est le lanceur du compilateur ---  c'est  en  fait  le
     programme  que  vous  lancez.   Il peut etre utilise avec plusieurs
     versions  de  gcc  lorsque  vous  possedez  plusieurs   repertoires
     installes  (voir  plus  bas).  Pour  trouver  la version par defaut
     utilisee, lancez gcc -v.  Pour  forcer  l'utilisation  d'une  autre
     version, lancez gcc -V _v_e_r_s_i_o_n. Par exemple,

       # gcc -v
       Reading specs from /usr/lib/gcc-lib/i486-zorglub-linux/2.7.2/specs
       gcc version 2.7.2
       # gcc -V 2.6.3 -v
       Reading specs from /usr/lib/gcc-lib/i486-zorglub-linux/2.6.3/specs
       gcc driver version 2.7.2 executing gcc version 2.6.3

  +o  /usr/_m_a_c_h_i_n_e_-_c_i_b_l_e/(bin|lib|include)/.    Si   vous  avez  installe
     plusieurs cibles possibles (par exemple a.out et elf,  ou  bien  un
     compilateur  croise, les bibliotheques, les binutils (as, ld, etc.)
     et les fichiers d'en-tete  pour les cibles differente de celle  par
     defaut  peuvent  etre  trouves  a cet endroit.  Meme si vous n'avez
     qu'une seule version  de  gcc  installee,  vous  devriez  toutefois
     trouver  a  cet  endroit un certain nombre de fichiers. Si ce n'est
     pas la cas, regardez dans /usr/(bin|lib|include).

  +o  /lib/,  /usr/lib  et  autres  sont   les   repertoires   pour   les
     bibliotheques  pour le systeme initial. Vous aurez egalement besoin
     du programme  /lib/cpp  pour  un  grand  nombre  d'applications  (X
     l'utilise   beaucoup)   ---   soit  vous  le  copiez  a  partir  de
     /usr/lib/gcc-lib/_m_a_c_h_i_n_e_-_c_i_b_l_e/_v_e_r_s_i_o_n/, soit vous faites   pointer
     un lien symbolique dessus.

  33..33..

  OOuu ssee ttrroouuvveenntt lleess ffiicchhiieerrss dd''eenn--tteettee ??

  Si l'on excepte les fichier fichiers d'en-tete que vous installez dans
  le repertoire /usr/local/include,  il y  a  en  fait  trois  types  de
  fichiers d'en-tete :

  +o  La   grande   majorite  des  fichiers  situes  dans  le  repertoire
     /usr/include/ et dans ses sous-repertoires proviennent du paquetage
     de la libc dont s'occupe H.J. Lu. Je dis bien la "grande  majorite"
     car  vous  pouvez  avoir  egalement  certains  fichiers   provenant
     d'autres  sources  (par  exemple  des bibliotheques curses et dbm),
     ceci est d'autant plus vrai si vous possedez une distribution de la
     libc  recente  (ou  les  bibliotheques  curses  et  dbm ne sont pas
     integrees).

  +o  Les repertoires /usr/include/linux et  /usr/include/asm  (pour  les
     fichiers   <linux/*.h>   et   <asm/*.h>)  doivent  etre  des  liens
     symboliques   vers   les   repertoires    linux/include/linux    et
     linux/include/asm  situes  dans  les  sources du noyau. Vous devrez
     installer ces sources si vous  desirez  pouvoir  developper  :  ces
     sources ne sont pas utilises uniquement pour compiler le noyau.

     Il est probable que vous ayez besoin de lancer la commande suivante
     make config dans le repertoire des sources du noyau apres les avoir
     installes.  Beaucoup  de  fichiers  ont besoin du fichier d'en-tete
     <linux/autoconf.h> qui n'existe pas sans cette commande. Il  est  a
     noter  que  dans certaines versions du noyau, le repertoire asm est
     en fait un lien symbolique qui n'est cree  qu'avec  l'execution  de
     make config.

     Donc,  si  vous  installez  les sources du noyau dans le repertoire
     /usr/src/linux, il suffit de faire :

       $ cd /usr/src/linux
       $ su
       # make config
       [repondez aux questions. A moins que vous ne recompiliez votre
       noyau, les reponses importent peu]
       # cd /usr/include
       # ln -s ../src/linux/include/linux .
       # ln -s ../src/linux/include/asm .

  +o  Les  fichiers  tels   que   <float.h>,   <limits.h>,   <varargs.h>,
     <stdarg.h>  et  <stddef.h>  changent  en  fonction de la version du
     compilateur,  et  peuvent   etre   trouves   dans   le   repertoire
     /usr/lib/gcc-lib/i486-box-linux/2.7.2/include/   pour   la  version
     2.7.2.

  33..44..  CCoonnssttrruuiirree uunn ccoommppiillaatteeuurr ccrrooiissee

  33..44..11..  LLiinnuuxx ccoommmmee ppllaattee--ffoorrmmee ddee ddeessttiinnaattiioonn

  Nous  supposons  que  vous  avez  recupere  les  sources  de  gcc,  et
  normalement, il vous suffit de suivre les instructions donnees dans le
  fichier INSTALL situe dans les sources de gcc. Ensuite, il  suffit  de
  lancer  configure  --target=i486-linux  --host=XXX  sur une plateforme
  XXX, puit un make devrait compiler gcc correctement. Il  est  a  noter
  que  vous  aurez besoin des fichiers d'en-tete de Linux, ainsi que les
  sources de l'assembleur et du l'editeur  de  liens  croises  que  vous
  pouvez  trouver sur  <ftp://tsx-11.mit.edu/pub/linux/packages/GCC/> ou
  <ftp://ftp.ibp.fr/pub/linux/GCC/>.

  33..44..22..  LLiinnuuxx ccoommmmee ppllaattee--ffoorrmmee oorriiggiinnee eett MMSSDDOOSS ccoommmmee ddeessttiinnaattiioonn

  Arggg.  Apparemment, cela est possible en utilisant le paquetage " emx
  "       ou       l'extension       "       go       ".        Regardez
  <ftp://sunsite.unc.edu/pub/Linux/devel/msdos>         pour        plus
  d'informations.

  Je n'ai pas teste cela et je ne pense pas le faire !

  44..  PPoorrttaaggee eett ccoommppiillaattiioonn

  44..11..

  SSyymmbboolleess ddeeffiinniiss aauuttoommaattiiqquueemmeenntt

  Vous pouvez trouver  quels  symboles  votre  version  de  gcc  definit
  automatiquement  en  le  lancant  avec  l'option -v.  Par exemple cela
  donne ca chez moi :

       $ echo 'main(){printf("Bonjour !\n");}' | gcc -E -v -
       Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.7.2/specs
       gcc version 2.7.2
        /usr/lib/gcc-lib/i486-box-linux/2.7.2/cpp -lang-c -v -undef
       -D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ELF__ -Dunix -Di386 -Dlinux
       -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386
       -D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386)
       -Amachine(i386) -D__i486__ -

  Si vous ecrivez du code qui utilise des  specificites  Linux,  il  est
  souhaitable d'implementer le code non portable de la maniere suivante

       #ifdef __linux__
       /* ... code linux ... */
       #endif /* linux */

  Utilisez __linux__ pour cela, et _p_a_s linux.  Bien que cette macro soit
  definie, ce n'est pas une specification POSIX.

  44..22..  OOppttiioonnss ddee ccoommppiillaattiioonn

  La documentation des options de compilation se trouve dans  les  pages
  _i_n_f_o  de  gcc  (sous  Emacs, utilisez C-h i puis selectionnez l'option
  `gcc').   Votre  distribution  peut   ne   pas   avoir   installe   la
  documentation  ou bien vous pouvez en avoir une ancienne. Dans ce cas,
  la meilleure chose a faire est de recuperer les sources de gcc  depuis
  <ftp://prep.ai.mit.edu/pub/gnu>  ou l'un des ses nombreux miroirs dont
  <ftp://ftp.ibp.fr/pub/gnu>.

  La page de manuel gcc (gcc.1) est en principe, completement  depassee.
  Cela vous met en garde si vous desirez la consulter.

  44..22..11..

  OOppttiioonnss ddee ccoommppiillaattiioonn

  gcc peut realiser un certain nombre d'optimisations sur le code genere
  en ajoutant l'option -O_n a la ligne de commandes, ou _n est un chiffre.
  La  valeur de _n, et son effet exact, depend de la version de gcc, mais
  s'echelonne normalement entre 0 (aucune optimisation) et 2 (un certain
  nombre) ou 3 (toutes les optimisations possibles).

  En  interne,  gcc  interprete  les  options telles que -f et -m.  Vous
  pouvez voir exactement ce qu'effectue le niveau specifie dans l'option
  -O  en  lancant  gcc avec l'option -v et l'option (non documentee) -Q.
  Par exemple, l'option -O2, effectue les operations  suivantes  sur  ma
  machine :

       enabled: -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks
       -fexpensive-optimizations
                -fthread-jumps -fpeephole -fforce-mem -ffunction-cse -finline
                -fcaller-saves -fpcc-struct-return -frerun-cse-after-loop
                -fcommon -fgnu-linker -m80387 -mhard-float -mno-soft-float
                -mno-386 -m486 -mieee-fp -mfp-ret-in-387

  Utiliser un niveau d'optimisation superieur a celui que le compilateur
  supporte (par exemple -O6) aura le meme effet qu'utiliser le plus haut
  niveau  gere.  Distribuer  du code ou la compilation est configuree de
  cette maniere est une tres mauvaise idee -- si d'autres  optimisations
  sont   incorporees   dans  de  versions  futures,  vous  (ou  d'autres
  utilisateurs) pouvez vous apercevoir que cela ne compile plus, ou bien
  que le code genere ne fait pas les actions desirees.

  Les  utilisateurs  de  gcc  2.7.0 a 2.7.2 devraient noter qu'il y a un
  bogue dans l'option -O2. Plus precisement, la  _s_t_r_e_n_g_t_h  _r_e_d_u_c_t_i_o_n  ne
  fonctionne  pas.  Un patch a ete implemente pour resoudre ce probleme,
  mais vous devez alors recompiler  gcc.  Sinon,  vous  devrez  toujours
  compiler avec l'option -fno-strength-reduce.

  44..22..11..11..  SSppeecciiffiiccaattiioonn dduu pprroocceesssseeuurr

  Il  existe  d'autres  options  -m qui ne sont pas positionnees lors de
  l'utilisation de -O mais qui sont neanmoins utiles dans certains  cas.
  C'est  le  cas pour les options -m386 et -m486, qui indiquent a gcc de
  generer un code plus ou moins optimise pour l'un ou  l'autre  type  de
  processeur. Le code continuera a fonctionner sur les deux processeurs.
  Bien que le code pour 486 soit plus  important,  il  ne  ralentit  pas
  l'execution du programme sur 386.

  Il  n'existe  pas actuellement de -mpentium ou -m586.  Linus a suggere
  l'utilisation  des  options  -m486   -malign-loops=2   -malign-jumps=2
  -malign-functions=2,  pour  exploiter les optimisations du 486 tout en
  perdant de la place due aux problemes d'alignements (dont  le  Pentium
  n'a que faire).  Michael Meissner (de Cygnus) nous dit :

       "  Mon  avis  est que l'option  -mno-strength-reduce  permet
       d'obtenir un code plus rapide sur un x86 (nota : je ne parle
       pas du bogue _s_t_r_e_n_g_t_h _r_e_d_u_c_t_i_o_n, qui est un autre probleme).
       Cela s'explique en raison du peu de registres dont disposent
       ces processeurs (et la methode de GCC qui consiste a grouper
       les  registres  dans  l'ordre  inverse  au  lieu  d'utiliser
       d'autres  registres  n'arrange rien).  La _s_t_r_e_n_g_t_h _r_e_d_u_c_t_i_o_n
       consiste en fait a rajouter des registres pour remplacer les
       multiplications  par  des  additions.  Je suspecte egalement
       -fcaller-saves de ne pas arranger la situation. "

       Une autre idee est que -fomit-frame-pointer n'est pas  obli-
       gatoirement  une bonne idee.  D'un cote, cela peut signifier
       qu'un autre registre est  disponible  pour  une  allocation.
       D'un  autre  cote,  vue  la maniere dont les processeurs x86
       codent leur jeu d'instruction, cela peut  signifier  que  la
       pile  des  adresses  relatives  prend  plus de place que les
       adresses de fenetres relatives, ce qui signifie en clair que
       moins de cache est disponible pour l'execution du processus.
       Il faut preciser que l'option -fomit-frame-pointer, signifie
       que  le  compilateur doit constamment ajuster le pointeur de
       pile apres les appels, alors qu'avec une  fenetre,  il  peut
       laisser plusieurs appels dans la pile.

  Le mot final sur le sujet provient de Linus :

       Remarquez  que si vous voulez des performances maximales, ne
       me croyez pas : testez ! Il existe  tellement  d'options  de
       gcc,  et il est possible que cela ne soit une reelle optimi-
       sation que pour vous.

  44..22..22..

  IInntteerrnnaall ccoommppiilleerr eerrrroorr:: cccc11 ggoott ffaattaall ssiiggnnaall 1111

  Signal  11  correspond  au  signal  SIGSEGV,  ou   bien   _s_e_g_m_e_n_t_a_t_i_o_n
  _v_i_o_l_a_t_i_o_n.  Normalement,  cela signifie que le programme s'est melange
  les pointeurs et a essaye d'ecrire la ou il n'en a pas le droit. Donc,
  cela pourrait etre un bug de gcc.

  Toutefois,  gcc est un logiciel assez teste et assez remarquable de ce
  cote.  Il utilise un grand nombre de structures de donnees  complexes,
  et  un  nombre  impressionnant  de pointeurs. En resume, c'est le plus
  pointilleux des testeurs de memoire existants. Si vous _n_'_a_r_r_i_v_e_z _p_a_s _a
  _r_e_p_r_o_d_u_i_r_e  _l_e  _b_o_g_u_e  ---  si  cela  ne  s'arrete pas au meme endroit
  lorsque vous retentez la compilation --- c'est plutot un probleme avec
  votre  machine  (processeur,  memoire,  carte  mere  ou  bien  cache).
  NN''aannnnoonncceezz ppaass la decouverte d'un nouveau bogue  si  votre  ordinateur
  traverse  tous les tests du BIOS, ou s'il fonctionne correctement sous
  Windows ou autre : ces tests ne valent rien. Il en va de  meme  si  le
  noyau  s'arrete  lors  du `make zImage' !  `make zImage' doit compiler
  plus de 200 fichiers, et il en faut bien moins pour  arriver  a  faire
  echouer une compilation.

  Si  vous  arrivez  a reproduire le bogue et (mieux encore) a ecrire un
  petit programme qui permet de mettre en evidence cette  erreur,  alors
  vous  pouvez  envoyer le code soit a la FSF, soit dans la liste linux-
  gcc.   Consultez  la  documentation  de  gcc  pour  plus  de   details
  concernant les informations necessaires.

  44..33..  PPoorrttaabbiilliittee

  Cette  phrase  a ete dite un jour : si quelque chose n'a pas ete porte
  vers Linux alors ce n'est pas important de l'avoir :-).

  Plus serieusement, en general seules quelques  modifications  mineures
  sont necessaires car Linux repond a 100% aux specifications POSIX.  Il
  est generalement sympathique d'envoyer a  l'auteur  du  programme  les
  modifications  effectuees  pour que le programme fonctionne sur Linux,
  pour que lors d'une future version, un  `make'  suffise  pour  generer
  l'executable.

  44..33..11..  <<ssggttttyy..hh>>) Specificites BSD (notamment bsd_ioctl, daemon et

  Vous  pouvez compiler votre programme avec l'option -I/usr/include/bsd
  et faire l'edition de liens avec -lbsd (en ajoutant -I/usr/include/bsd
  a  la  ligne  CFLAGS  et  -lbsd  a la ligne LDFLAGS dans votre fichier
  Makefile).  Il  est   egalement   necessaire   de   ne   ppaass   ajouter
  -D__USE_BSD_SIGNAL si vous voulez que les signaux BSD fonctionnent car
  vous les avez inclus automatiquement avec la ligne  -I/usr/include/bsd
  et en incluant le fichier d'en-tete <signal.h>.

  44..33..22..

  SSiiggnnaauuxx _m_a_n_q_u_a_n_t_s ((SSIIGGBBUUSS, SIGEMT, SIGIOT, SIGTRAP, SIGSYS, etc.)

  Linux respecte les specifications POSIX. Ces  signaux  n'en  font  pas
  partie  (cf.  ISO/IEC  9945-1:1990  - IEEE Std 1003.1-1990, paragraphe
  B.3.3.1.1) :

       " Les signaux SIGBUS, SIGEMT, SIGIOT, SIGTRAP, et SIGSYS ont
       ete  omis  de  la  norme  POSIX.1  car leur comportement est
       dependant de l'implementation et donc ne peut etre  reperto-
       rie  d'une maniere satisfaisante.  Certaines implementations
  peuvent fournir ces signaux  mais  doivent  documenter  leur
  effet "

  La maniere la plus elegante de regler ce probleme est de redefinir ces
  signaux a SIGUNUSED.  La maniere _n_o_r_m_a_l_e de proceder est d'entourer le
  code avec les #ifdef appropries :

       #ifdef SIGSYS
       /* ... code utilisant les signaux non posix  .... */
       #endif

  44..33..33..

  CCooddee KK && RR

  GCC est un compilateur ANSI, or il existe beaucoup de code qui ne soit
  pas ANSI.

  Il n'y a pas grand chose a faire, sauf rajouter l'option  -traditional
  lors   de   la   compilation.   Il  effectue  certaines  verifications
  supplementaires. Consultez les pages info gcc.

  Notez que l'option -traditional a pour  unique  effet  de  changer  la
  forme  du  langage  accepte par gcc. Par exemple, elle active l'option
  -fwritable-strings, qui deplace toutes les chaines de caracteres  vers
  l'espace  de donnees (depuis l'espace de texte, ou elle ne peuvent pas
  etre modifiees). Ceci augmente la taille de la memoire occupee par  le
  programme.

  44..33..44..  lleess pprroottoottyyppeess dduu ccooddee

  LLeess ssyymmbboolleess dduu pprreepprroocceesssseeuurr pprroodduuiisseenntt uunn ccoonnfflliitt aavveecc

  Un des problemes frequents  se  produit  lorsque  certaines  fonctions
  standards  sont  definies  comme macros dans les fichiers d'en-tete de
  Linux  et  le  preprocesseur  refusera  de  traiter   des   prototypes
  identiques. Par exemple, cela peut arriver avec atoi() et atol().

  44..33..55..

  sspprriinnttff(())

  Parfois,  soyez prudent lorsque vous effectuez un portage a partir des
  sources  de  programmes  fonctionnant  sous  SunOs,  surtout  avec  la
  fonction sprintf(string, fmt, ...) car elle renvoie un pointeur sur la
  chaine de caracteres alors que Linux (suivant la norme ANSI)  retourne
  le nombre de caracteres recopies dans la chaine de caracteres.

  44..33..66..

  ffccnnttll et ses copains.  Ou se trouve la definition de FD_* et compagnie
  ?

  Dans  <sys/time.h>.   Si vous utilisez fcntl vous voudrez probablement
  inclure <unistd.h> egalement, pour avoir le prototype de la  fonction.

  D'une  maniere  generale, la page de manuel pour une fonction donne la
  liste des fichiers d'en-tete a inclure.

  44..33..77..  ccoommmmeenncceenntt ddaannss uunn eettaatt dd''aatttteennttee aaccttiivvee

  LLee ttiimmeeoouutt ddee sseelleecctt(()). Les programmes

  A une certaine epoque, le parametre timeout de  la  fonction  select()
  etait  utilise  en  lecture  seule.   C'est pourquoi la page de manuel
  comporte une mise en garde :

       select()  devrait  retourner  normalement  le  temps  ecoule
       depuis  le timeout initial, s'il s'est declenche, en modifi-
       ant la valeur pointee par le parametre time. Cela sera peut-
       etre  implemente  dans  les versions ulterieures du systeme.
       Donc, il n'est pas vraiment prudent de supposer que les don-
       nees  pointees  ne  seront  pas  modifiees lors de l'appel a
       select().

  Mais tout arrive avec  le  temps  !  Lors  d'un  retour  de  select(),
  l'argument   timeout  recevra  le  temps  ecoule  depuis  la  derniere
  reception de donnees. Si aucune donnee n'est arrivee, la  valeur  sera
  nulle, et les futurs appels a cette fonction utilisant le meme timeout
  auront pour resultat un retour immediat.

  Pour resoudre le probleme, il suffit de mettre la valeur timeout  dans
  la structure a chaque appel de select().  Le code initial etait

             struct timeval timeout;
             timeout.tv_sec = 1;
             timeout.tv_usec = 0;
             while (some_condition)
                   select(n,readfds,writefds,exceptfds,&timeout);

  et doit devenir :

             struct timeval timeout;
             while (some_condition)
             {
                   timeout.tv_sec = 1;
                   timeout.tv_usec = 0;
                   select(n,readfds,writefds,exceptfds,&timeout);
             }

  Certaines  versions  de  Mosaic  etaient connues a une certaine epoque
  pour avoir ce probleme.

  La  vitesse  de  rotation  du  globe   terrestre   etait   inversement
  proportionnelle a la vitesse de transfert des donnees !
  44..33..88..

  AAppppeellss ssyysstteemmeess iinntteerrrroommppuuss

  44..33..88..11..  SSyymmppttoommeess ::

  Lorsqu'un  processus  est  arrete  avec un Ctrl-Z et relance - ou bien
  lorsqu'un autre signal est declenche dans une situation  differente  :
  par exemple avec un Ctrl-C, la terminaison d'un processus, etc, on dit
  qu'il y a " interruption d'un appel systeme " ,  ou  bien  "  write  :
  erreur inconnue " ou des trucs de ce genre.

  44..33..88..22..  PPrroobblleemmeess ::

  Les  systemes  POSIX  verifient  les signaux plus souvent que d'autres
  Unix plus anciens. Linux peux lancer les gestionnaires de signaux :

  +o  d'une maniere asynchrone (sur un top d'horloge)

  +o  lors d'un retour de n'importe quel appel systeme

  +o  pendant  l'execution  des  appels  systemes  suivants  :  select(),
     pause(),   connect(),  accept(),  read()  sur  des  terminaux,  des
     sockets, des pipes ou des fichiers situes dans /proc,  write()  sur
     des  terminaux,  des  sockets, des pipes ou des imprimantes, open()
     sur  des  FIFOs,  des  lignes  PTYs  ou  series,  ioctl()  sur  des
     terminaux, fcntl() avec la commande F_SETLKW, wait4(), syslog(), et
     toute operation d'ordre TCP ou NFS.

  Sur d'autres systemes d'exploitation, il est possible que vous ayez  a
  inclure  dans  cette categorie les appels systemes suivants : creat(),
  close(),  getmsg(),  putmsg(),  msgrcv(),  msgsnd(),  recv(),  send(),
  wait(), waitpid(), wait3(), tcdrain(), sigpause(), semop().

  Si  un  signal  (que  le  programme  desire traiter) est lance pendant
  l'execution d'un appel systeme, le gestionnaire est lance. Lorsque  le
  gestionnaire du signal se termine, l'appel systeme detecte qu'il a ete
  interrompu et se termine avec la valeur  -1  et  errno  =  EINTR.   Le
  programme n'est pas forcement au courant de ce qui s'est passe et donc
  s'arrete.

  Vous pouvez choisir deux solutions pour resoudre ce probleme.

  (1)Dans tout gestionnaire de signaux que vous mettez en place, ajoutez
  l'option SA_RESTART au niveau de _s_i_g_a_c_t_i_o_n. Par exemple, modifiez

         signal (signal_id, mon_gestionnaire_de_signaux);

  en

    signal (signal_id, mon_gestionnaire_de_signaux);
    {
          struct sigaction sa;
          sigaction (signal_id, (struct sigaction *)0, &sa);
  #ifdef SA_RESTART
          sa.sa_flags |= SA_RESTART;
  #endif
  #ifdef SA_INTERRUPT
          sa.sa_flags &= ~ SA_INTERRUPT;
  #endif
          sigaction (signal_id, &sa, (struct sigaction *)0);
    }

  Notez  que  lors  de  certains  appels  systemes  vous  devrez souvent
  regarder si errno n'a pas ete positionnee a EINTR par vous meme  comme
  avec read(), write(), ioctl(), select(), pause() et connect().

  (2) A la recherche de EINTR :

  Voici deux exemples avec read() et ioctl(),

  Voici le code original utilisant read()

       int result;
       while (len > 0)
       {
         result = read(fd,buffer,len);
         if (result < 0)
               break;
         buffer += result;
         len -= result;
       }

  et le nouveau code

       int result;
       while (len > 0)
       {
         result = read(fd,buffer,len);
         if (result < 0)
         {
               if (errno != EINTR)
                       break;
         }
         else
         {
               buffer += result;
               len -= result;
         }
       }

  Voici un code utilisant  ioctl()

       int result;
       result = ioctl(fd,cmd,addr);

  et cela devient

       int result;
       do
       {
          result = ioctl(fd,cmd,addr);
       }
       while ((result == -1) && (errno == EINTR));

  Il  faut remarquer que dans certaines versions d'Unix de type BSD on a
  l'habitude  de  relancer   l'appel   systeme.   Pour   recuperer   les
  interruptions  d'appels  systemes,  vous  devez  utiliser  les options
  SV_INTERRUPT ou SA_INTERRUPT.

  44..33..99..  "" sseeggmmeennttaattiioonn ffaauulltt "" dd''uunnee mmaanniieerree aalleeaattooiirree))

  LLeess cchhaaiinneess eett lleeuurrss aacccceess eenn eeccrriittuurreess ((oouu lleess pprrooggrraammmmeess qquuii  pprroovvoo--
  qquueenntt ddeess

  GCC a une vue optimiste  en  ce  qui  concerne  ses  utilisateurs,  en
  croyant  qu'ils  respectent le fait qu'une chaine dite constante l'est
  reellement. Donc, il les range  dans la zone _t_e_x_t_e_(_c_o_d_e_) du programme,
  ou  elles  peuvent  etre  chargees puis dechargees a partir de l'image
  binaire de l'executable situee sur disque (ce qui evite  d'occuper  de
  l'espace  disque).  Donc, toute tentative d'ecriture dans cette chaine
  provoque un " segmentation fault ".

  Cela peut poser certains problemes avec d'anciens codes,  par  exemple
  ceux  qui  utilisent  la  fonction  mktemp() avec une chaine constante
  comme argument.  mktemp() essaye d'ecrire dans  la  chaine  passee  en
  argument.

  Pour resoudre ce probleme,

  1. compilez  avec  l'option  -fwritable-strings pour indiquer a gcc de
     mettre les chaines constantes dans l'espace de donnees

  2. reecrire les differentes parties du code pour  allouer  une  chaine
     non  constante  puis  effectuer  un strcpy des donnees dedans avant
     d'effectuer l'appel.

  44..33..1100..

  PPoouurrqquuooii ll''aappppeell aa eexxeeccll(()) echoue ?

  Tout simplement parce que vous l'utilisez  mal.  Le  premier  argument
  d'execl est le programme que vous desirez executer. Le second et ainsi
  de suite sont en fait le elements du tableau argv  que  vous  appelez.
  Souvenez-vous  que  argv[0]  est  traditionnellement  fixe  meme si un
  programme est lance sans argument. Vous devriez donc ecrire :

  execl("/bin/ls","ls",NULL);

  et pas

       execl("/bin/ls", NULL);

  Lancer le programme  sans  argument  est  considere  comme  etant  une
  demande   d'affichage   des   bibliotheques  dynamiques  associees  au
  programme, si vous utilisez le  format  a.out.  ELF  fonctionne  d'une
  maniere differente.

  (Si  vous desirez ces informations, il existe des outils plus simples;
  consultez la section sur le chargement dynamique, ou la page de manuel
  de ldd).

  55..  DDeebboogguueerr eett ooppttiimmiisseerr

  55..11..

  EEttuuddee pprreevveennttiivvee dduu ccooddee ((lliinntt))

  Il   n'existe  pas  de  lint  qui  soit  reellement  utilisable,  tout
  simplement  parce  que  la  grande  majorite  des  developpeurs   sont
  satisfaits  des  messages  d'avertissement de gcc. Il est probable que
  l'option la plus utile  est  l'option  -Wall  ---  qui  a  pour  effet
  d'afficher tous les avertissements possibles.

  Il  existe  une  version  du domaine public du programme lint que vous
  pouvez       trouver       a        l'adresse        suivante        :
  <ftp://larch.lcs.mit.edu/pub/Larch/lclint>.  Je ne sais pas ce qu'elle
  vaut.

  55..22..

  DDeebboogguueerr

  55..22..11..

  CCoommmmeenntt rreennddrree ddeebbooggaabbllee uunn pprrooggrraammmmee ??

  Vous devez compiler et effectuer l'edition de liens avec l'option  -g,
  et  sans  l'option  -fomit-frame-pointer.   En  fait,  vous  ne  devez
  compiler que les modules que vous avez besoin de deboguer.

  Si vous possedez un systeme a.out, les bibliotheques  dynamiques  sont
  compilees  avec  l'option  -fomit-frame-pointer,  que  gcc ne peut pas
  gerer. Lorsque vous compilez avec l'option -g, alors par  defaut  vous
  effectuez  une edition de liens statique, ce qui permet de resoudre le
  probleme.

  Si l'editeur de liens echoue avec un message disant qu'il n'arrive pas
  a  trouver  la  bibliotheque libg.a, c'est que vous ne possedez pas la
  bibliotheque /usr/lib/libg.a,  qui  est  la  bibliotheque  C  standard
  permettant  le  debogage.  Cette  bibliotheque  est  fournie  dans  le
  paquetage des binaires de la libc., ou (dans les  nouvelles  versions)
  vous  aurez besoin de recuperer le source et de le compiler vous-meme.
  Vous n'avez pas reellement besoin de cela en fait, vous  pouvez  faire
  un lien logique vers /usr/lib/libc.a

  55..22..11..11..

  CCoommmmeenntt rreedduuiirree llaa ttaaiillllee ddeess eexxeeccuuttaabblleess ??

  Bon  nombre  de  produits GNU sont fournis pour compiler avec l'option
  -g, ce qui genere des executables d'une  taille  tres  importante  (et
  souvent  l'edition  de  liens  s'effectue d'une maniere statique).  Ce
  n'est pas une idee lumineuse...

  Si le programme possede le script configure genere par autoconf,  vous
  pouvez  modifier  les options de debogage en effectuant un vous pouvez
  aller modifier le Makefile. Bien sur, si vous utilisez le format  ELF,
  l'edition  de  liens  sera  effectuee  de  maniere dynamique meme avec
  l'option  -g.  Dans  ce  cas,  vous  pouvez  effectuer  un  strip  sur
  l'executable.

  55..22..22..

  PPrrooggrraammmmeess ddiissppoonniibblleess

  Beaucoup  de gens utilisent ggddbb, que vous pouvez recuperer sur le site
  prep.ai.mit.edu  <ftp://prep.ai.mit.edu/pub/gnu>,   sous   une   forme
  binaire  sur  tsx-11  <ftp://tsx-11.mit.edu/pub/linux/packages/GCC> ou
  sur sunsite.  xxxxggddbb est une surcouche X de gdb (c.a.d. que  vous  avez
  besoin de gdb pour utiliser xxgdb). Les sources peuvent etre recuperes
  sur  <ftp://ftp.x.org/contrib/xxgdb-1.08.tar.gz>

  Il existe egalement le debogueur UUPPSS qui a ete porte par Rick Sladkey.
  Il fonctionne sous X egalement, mais a la difference d'xxgdb, ce n'est
  qu'une surcouche X pour un debogueur en  mode  en  texte.  Il  possede
  certaines  caracteristiques  tres  interessantes  et  si vous utilisez
  beaucoup ce genre d'outils, vous  l'essayerez  surement.  Les  patches
  ainsi  que  des versions precompilees pour Linux peuvent etre trouvees
  sur <ftp://sunsite.unc.edu/pub/Linux/devel/debuggers/>, et les sources
  peuvent                etre                recuperes               sur
  <ftp://ftp.x.org/contrib/ups-2.45.2.tar.Z>.

  Un autre outil que vous pouvez  trouver  utile  pour  deboguer  est  "
  ssttrraaccee  " , qui affiche les appels systemes que le processus lance. Il
  possede  d'autres  caracteristiques  telles  que  donner  les  chemins
  d'acces ou ont ete compiles les binaires, donner les temps passes dans
  chacun des appels systemes, et il vous permet egalement  de  connaitre
  les  resultats des appels. La derniere version de strace (actuellement
  la version 3.0.8) peut etre trouvee sur  <ftp://ftp.std.com/pub/jrs/>.

  55..22..33..  PPrrooggrraammmmeess eenn ttaacchhee ddee ffoonndd ((ddeemmoonn))

  Les  demons  lancent  typiquement  un  fork()  des  leur  lancement et
  terminent donc le pere.  Cela  fait  une  session  de  deboguage  tres
  courte.

  La  maniere  la  plus  simple  de resoudre ce probleme est de poser un
  point d'arret sur fork, et lorsque le programme  s'arrete,  forcer  le
  retour a 0.

       (gdb) list
       1       #include <stdio.h>
       2
       3       main()
       4       {
       5         if(fork()==0) printf("child\n");
       6         else printf("parent\n");
       7       }
       (gdb) break fork
       Breakpoint 1 at 0x80003b8
       (gdb) run
       Starting program: /home/dan/src/hello/./fork
       Breakpoint 1 at 0x400177c4

       Breakpoint 1, 0x400177c4 in fork ()
       (gdb) return 0
       Make selected stack frame return now? (y or n) y
       #0  0x80004a8 in main ()
           at fork.c:5
       5         if(fork()==0) printf("child\n");
       (gdb) next
       Single stepping until exit from function fork,
       which has no line number information.
       child
       7       }

  55..22..44..  FFiicchhiieerrss ccoorree

  Lorsque  Linux  se  lance,  il  n'est  generalement pas configure pour
  produire des fichiers core. Si vous les  voulez  vous  devez  utiliser
  votre shell pour ca en faisant sous csh (ou tcsh) :

       % limit core unlimited

  avec sh, bash, zsh, pdksh, utilisez

       $ ulimit -c unlimited

  Si  vous  voulez  pousser  le  vice  a  nommer votre fichier core (par
  exemple si vous utilisez un debogueur bogue... ce qui est  un  comble)
  vous   pouvez  simplement  modifier  le  noyau.  Editez  les  fichiers
  fs/binfmt_aout.c et fs/binfmt_elf.c (dans les  nouveaux  noyaux,  vous
  devrez chercher ailleurs) :

          memcpy(corefile,"core.",5);
  #if 0
          memcpy(corefile+5,current->comm,sizeof(current->comm));
  #else
          corefile[4] = '\0';
  #endif

  et changez les 0 par des 1.

  55..33..  CCaarraacctteerriissttiiqquueess dduu pprrooggrraammmmee

  Il  est possible d'examiner un peu le programme pour savoir quels sont
  les appels de fonctions qui sont effectues le plus souvent ou bien qui
  prennent  du  temps.  C'est  une  bonne maniere d'optimiser le code en
  determinant la ou l'on passe le plus de temps.   Vous  devez  compiler
  tous  les  objets  avec l'option -p, et pour mettre en forme la sortie
  ecran, vous aurez besoin du programme gprof (situe dans les binutils).
  Consultez les pages de manuel gprof pour plus de details.

  66..  EEddiittiioonn ddee lliieennss

  Entre  les  deux  formats  de  binaires  incompatibles,  bibliotheques
  statiques et dynamiques, on peut  comparer  l'operation  d'edition  de
  lien  en  fait  a un jeu ou l'on se demanderait qu'est-ce qui se passe
  lorsque je lance le programme  ?  Cette  section  n'est  pas  vraiment
  simple...

  Pour  dissiper  la  confusion qui regne, nous allons nous baser sur ce
  qui se passe lors  d'execution  d'un  programme,  avec  le  chargement
  dynamique.  Vous verrez egalement la description de l'edition de liens
  dynamiques, mais plus tard. Cette section est dediee  a  l'edition  de
  liens qui intervient a la fin de la compilation.

  66..11..  BBiibblliiootthheeqquueess ppaarrttaaggeeeess ccoonnttrree bbiibblliiootthheeqquueess ssttaattiiqquueess

  La derniere phase de  construction  d'un  programme  est  de  realiser
  l'edition  de  liens, ce qui consiste a assembler tous les morceaux du
  programme et de chercher ceux  qui  sont  manquants.  Bien  evidement,
  beaucoup de programmes realisent les memes operations comme ouvrir des
  fichiers  par  exemple,  et  ces  pieces  qui   realisent   ce   genre
  d'operations sont fournies sous la forme de bibliotheques. Sous Linux,
  ces bibliotheques peuvent etre  trouvees  dans  les  repertoires  /lib
  et/usr/lib/ entre autres.

  Lorsque  vous  utilisez  une bibliotheque statique, l'editeur de liens
  cherche le code dont votre programme a besoin et en effectue une copie
  dans  le  programme physique genere. Pour les bibliotheques partagees,
  c'est le contraire : l'editeur de liens laisse du  code  qui  lors  du
  lancement  du  programme  chargera automatiquement la bibliotheque. Il
  est evident que ces bibliotheques permettent d'obtenir  un  executable
  plus  petit; elles permettent egalement d'utiliser moins de memoire et
  moins de place disque. Linux effectue par defaut une edition de  liens
  dynamique  s'il  peut  trouver  les bibliotheques de ce type sinon, il
  effectue une edition de liens statique. Si vous obtenez  des  binaires
  statiques  alors  que  vous  les  voulez  dynamiques  verifiez que les
  bibliotheques existent (*.sa pour le format a.out,  et  *.so  pour  le
  format  ELF) et que vous possedez les droits suffisants pour y acceder
  (lecture).

  Sous Linux, les bibliotheques statiques ont pour nom  libnom.a,  alors
  que  les  bibliotheques  dynamiques  sont appelees libnnom.so.x.y.z ou
  x.y.z represente le numero de version.  Les  bibliotheques  dynamiques
  ont  souvent  des liens logiques qui pointent dessus, et qui sont tres
  importants. Normalement, les bibliotheques standards sont livrees sous
  la double forme dynamique et statique.

  Vous  pouvez savoir de quelles bibliotheques dynamiques un programme a
  besoin en utilisant la commande ldd (_L_i_s_t _D_y_n_a_m_i_c _D_e_p_e_n_d_e_n_c_i_e_s)

       $ ldd /usr/bin/lynx
               libncurses.so.1 => /usr/lib/libncurses.so.1.9.6
               libc.so.5 => /lib/libc.so.5.2.18

  Cela indique sur mon systeme que l'outil lynx (outil WWW) a besoin des
  bibliotheques   dynamiques   libc.so.5   (la  bibliotheque  C)  et  de
  libncurses.so.1 (necessaire pour le  controle  du  terminal).   Si  un
  programme  ne  possede  pas  de dependances, ldd indiquera `_s_t_a_t_i_c_a_l_l_y
  _l_i_n_k_e_d' (edition de liens statique).

  66..22..

  AA llaa rreecchheerrcchhee ddeess ffoonnccttiioonnss...... oouu ddaannss qquueellllee bbiibblliiootthheeqquuee ssee  ttrroouuvvee
  llaa ffoonnccttiioonn ssiinn(()) ?')

  nm _n_o_m_d_e_b_i_b_l_i_o_t_h_e_q_u_e vous donne tous les symboles references  dans  la
  bibliotheque.  Cela  fonctionne  que  cela  soit  du  code statique ou
  dynamique.  Supposez que vous vouliez savoir ou se trouve  definie  la
  fonction tcgetattr() :

       $ nm libncurses.so.1 |grep tcget
                U tcgetattr

  La  lettre  U  vous  indique  que  c'est indefini (_U_n_d_e_f_i_n_e_d) --- cela
  indique que la bibliotheque ncurses l'utilise mais ne la definit  pas.
  Vous pouvez egalement faire :

       $ nm libc.so.5 | grep tcget
       00010fe8 T __tcgetattr
       00010fe8 W tcgetattr
       00068718 T tcgetpgrp

  La  lettre `W' indique que le symbole est defini mais de telle maniere
  qu'il peut etre surcharge par une autre definition de la fonction dans
  une autre bibliotheque (W pour _w_e_a_k : faible).  Une definition normale
  est marquee par la lettre `T' (comme pour tcgetpgrp).

  La reponse a la question situee dans le titre est libm.(so|a).  Toutes
  les  fonctions  definies  dans  le  fichier  d'en-tete  <math.h>  sont
  implementees  dans  la  bibliotheque  mathematique  donc  vous  devrez
  effectuer l'edition de liens grace a -lm.

  66..33..  TTrroouuvveerr lleess ffiicchhiieerrss

  Supposons  que  vous  ayez  le  message d'erreur suivant de la part de
  l'editeur de liens :

  ld: Output file requires shared library `libfoo.so.1`

  La strategie de recherche de fichiers de ld ou de ses copains  differe
  de  la  version  utilisee,  mais vous pouvez etre sur que les fichiers
  situes dans le repertoire /usr/lib seront trouves. Si vous desirez que
  des  fichiers  situes  a  un  endroit different soient trouves, il est
  preferable d'ajouter l'option -L a gcc ou ld.

  Si cela ne vous aide pas clairement, verifiez que  vous  avez  le  bon
  fichier  a  l'endroit  specifie.  Pour  un  systeme  a.out,  effectuer
  l'edition  de  liens  avec  -ltruc  implique  que  ld  recherche   les
  bibliotheques    libtruc.sa  (bibliotheques  partagees),  et  si  elle
  n'existe pas, il recherche libtruc.a (statique).  Pour le format  ELF,
  il  cherche libtruc.so puis libtruc.a.  libtruc.so est generalement un
  lien symbolique vers libtruc.so.x.

  66..44..  CCoommppiilleerr vvoottrree pprroopprree bbiibblliiootthheeqquuee

  66..44..11..  NNuummeerroo ddee llaa vveerrssiioonn

  Comme tout programme, les bibliotheques ont tendance a avoir  quelques
  bogues   qui   sont   corriges  au  fur  et  a  mesure.  De  nouvelles
  fonctionnalites sont ajoutees et qui peuvent changer l'effet de celles
  qui  existent  ou  bien  certaines anciennes peuvent etres supprimees.
  Cela peut etre un probleme pour les programmes qui les utilisent.

  Donc,  nous  introduisons  la  notion  de  numero  de  version.   Nous
  repertorions  les modifications effectuees dans la bibliotheques comme
  etant soit mineures soit majeures. Cela signifie  qu'une  modification
  mineure  ne  peut  pas  modifier  le fonctionnement d'un programme (en
  bref, il continue a fonctionner comme avant). Vous  pouvez  identifier
  le  numero  de  la version de la bibliotheque en regardant son nom (en
  fait c'est un mensonge pour les bibliotheques ELF... mais continuez  a
  faire comme si !) : libtruc.so.1.2 a pour version majeure 1 et mineure
  2.  Le numero de version mineur peut etre plus ou moins eleve  ---  la
  bibliotheque  C  met un numero de patch, ce qui produit un nom tel que
  libc.so.5.2.18, et c'est egalement courant d'y trouver des lettres  ou
  des blancs soulignes ou tout autre caractere ASCII affichable.

  Une  des  principales  differences  entre  les formats ELF et a.out se
  trouve dans la maniere de construire la bibliotheque  partagee.   Nous
  traiterons  les  bibliotheques  partagees  en  premier  car c'est plus
  simple.

  66..44..22..

  EELLFF,, qquu''eesstt--ccee qquuee cc''eesstt ??

  ELF (_E_x_e_c_u_t_a_b_l_e _a_n_d _L_i_n_k_i_n_g _F_o_r_m_a_t) est format de binaire initialement
  concu  et developpe par USL (_U_N_I_X _S_y_s_t_e_m _L_a_b_o_r_a_t_o_r_i_e_s) et utilise dans
  les  systemes  Solaris  et  System  R4.  En  raison  de  sa   facilite
  d'utilisation  par  rapport  a  l'ancien format dit a.out qu'utilisait
  Linux, les developpeurs de GCC et de  la  bibliotheque  C  ont  decide
  l'annee  derniere  de basculer tout le systeme sous le format ELF. ELF
  est desormais le format binaire standard sous Linux.

  66..44..22..11..  EELLFF,, llee rreettoouurr !!

  Ce paragraphe provient du groupe '/news-archives/comp.sys.sun.misc'.

       ELF (_E_x_e_c_u_t_a_b_l_e _L_i_n_k_i_n_g _F_o_r_m_a_t) est le  "  nouveau  et  plus
       performant  " format de fichier introduit dans SVR4. ELF est
       beaucoup plus puissant que le sacro-saint format COFF,  dans
       le  sens  ou  il  est  extensible. ELF voit un fichier objet
       comme une longue liste de sections (plutot qu'un tableau  de
       taille  fixe  d'elements).  Ces sections, a la difference de
       COFF ne se trouvent pas a un endroit constant et ne sont pas
       dans  un  ordre  particulier,  etc. Les utilisateurs peuvent
       ajouter une nouvelle section  a  ces  fichiers  objets  s'il
       desirent  y mettre de nouvelles donnees. ELS possede un for-
       mat de debogage plus puissant appele DWARF  (_D_e_b_u_g_g_i_n_g  _W_i_t_h
       _A_t_t_r_i_b_u_t_e  _R_e_c_o_r_d  _F_o_r_m_a_t) - par encore entierement gere par
       Linux (mais on y travaille !).  Une liste chainee de " DWARF
       DIEs " (ou _D_e_b_u_g_g_i_n_g _I_n_f_o_r_m_a_t_i_o_n _E_n_t_r_i_e_s - NdT... le lecteur
       aura surement note le jeu de mot assez noir : dwarf =  nain;
       dies  =  morts)  forment la section _._d_e_b_u_g dans ELF. Au lieu
       d'avoir une liste de petits  enregistrements   d'information
       de  taille  fixes,  les  DWARF  DIEs  contiennent chacun une
       longue liste complexe d'attributs et  sont  ecrits  sous  la
       forme  d'un arbre de donnees.  Les DIEs peuvent contenir une
       plus grande quantite d'information que la section _._d_e_b_u_g  du
       format  COFF  ne le pouvait (un peu comme les graphes d'her-
       itages du C++).

       Les fichiers ELF sont accessibles grace  a  la  bibliotheque
       d'acces  de  SVR4 (Solaris 2.0 peut-etre ?), qui fournit une
       interface simple et rapide aux parties  les  plus  complexes
       d'ELF.  Une  des aubaines que permet la bibliotheque d'acces
       ELF est que vous n'avez jamais besoin de connaitre les mean-
       dres  du  format  ELF.  Pour  acceder  a un fichier Unix, on
       utilise un Elf  *,  retourne  par  un  appel  a  elf_open().
       Ensuite,  vous  effectuez  des  appels  a  elf_foobar() pour
       obtenir les differents composants au lieu d'avoir a triturer
       le  fichier  physique  sur  le  disque  (chose  que beaucoup
       d'utilisateurs de COFF ont fait...).

  Les arguments pour ou contre ELF, et les problemes lies a  la  mise  a
  jour  d'un systeme a.out vers un systeme ELF sont decrits dans le ELF-
  HOWTO et je ne veux pas effectuer de copier coller ici (NdT: ce  HowTo
  est  egalement  traduit  en  francais).   Ce  HowTo  se trouve au meme
  endroit que les autres.

  66..44..22..22..  LLeess bbiibblliiootthheeqquuee ppaarrttaaggeeeess EELLFF

  Pour construire libtruc.so comme une bibliotheque dynamique, il suffit
  de suivre les etapes suivantes :

       $ gcc -fPIC -c *.c
       $ gcc -shared -Wl,-soname,libtruc.so.1 -o libtruc.so.1.0 *.o
       $ ln -s libtruc.so.1.0 libtruc.so.1
       $ ln -s libtruc.so.1 libtruc.so
       $ LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH

  Cela  va generer une bibliotheque partagee appelee libtruc.so.1.0, les
  liens  appropries  pour  ld  (libtruc.so)  et  le  chargeur  dynamique
  (libtruc.so.1)  pour  le  trouver.   Pour  tester,  nous  ajoutons  le
  repertoire actuel a la variable d'environnement LD_LIBRARY_PATH.

  Lorsque vous etes satisfait et que la  bibliotheque  fonctionne,  vous
  n'avez   plus  qu'a  la  deplacer  dans  le  repertoire  par  exemple,
  /usr/local/lib, et  de  recreer  les  liens  appropries.  Le  lien  de
  libtruc.so.1  sur  libtruc.so.1.0 est enregistre par ldconfig, qui sur
  bon nombre de systemes est lance lors du processus d'amorcage. Le lien
  libfoo.so  doit  etre  mis  a jour a la main. Si vous faites attention
  lors de la mise a jour de la bibliotheque la chose la  plus  simple  a
  realiser  est  de  creer  le  lien  libfoo.so -> libfoo.so.1, pour que
  ldconfig conserve les liens actuels. Si vous ne faites pas cela,  vous
  aurez  des problemes plus tard. Ne me dites pas que l'on ne vous a pas
  prevenu !

       $ /bin/su
       # cp libtruc.so.1.0 /usr/local/lib
       # /sbin/ldconfig
       # ( cd /usr/local/lib ; ln -s libtruc.so.1 libtruc.so )

  66..44..22..33..

  LLeess nnuummeerrooss ddee vveerrssiioonn,, lleess nnoommss eett lleess lliieennss

  Chaque bibliotheque possede un nom propre (_s_o_n_a_m_e).  Lorsque l'editeur
  de  liens  en trouve un qui correspond a un nom cherche, il enregistre
  le nom de la bibliotheque dans le code binaire au lieu d'y  mettre  le
  nom  du  fichier  de la bibliotheque. Lors de l'execution, le chargeur
  dynamique va alors chercher un fichier ayant pour nom le nom propre de
  la  bibliotheque,  et  pas  le  nom du fichier de la bibliotheque. Par
  exemple, une bibliotheque ayant pour nom libtruc.so peut  avoir  comme
  nom  propre  libbar.so,  et  tous  les programmes lies avec vont alors
  chercher libbar.so lors de leur execution.

  Cela semble etre une nuance un peu pointilleuse mais c'est la clef  de
  la  comprehension  de la coexistence de plusieurs versions differentes
  de la meme bibliotheque sur le meme systeme.  On a pour habitude  sous
  Linux d'appeler une bibliotheque libtruc.so.1.2 par exemple, et de lui
  donner comme nom  propre  libtruc.so.1.   Si  cette  bibliotheque  est
  rajoutee  dans  un repertoire standard (par exemple dans /usr/lib), le
  programme ldconfig va creer un lien symbolique entre  libtruc.so.1  ->
  libtruc.so.1.2  pour  que  l'image  appropriee  soit  trouvee  lors de
  l'execution.  Vous  aurez  egalement  besoin  d'un   lien   symbolique
  libtruc.so  ->  libtruc.so.1  pour que ld trouve le nom propre lors de
  l'edition de liens.
  Donc, lorsque vous corrigez des erreurs dans la bibliotheque  ou  bien
  lorsque  vous  ajoutez  de  nouvelles  fonctions  (en fait, pour toute
  modification  qui  n'affecte  pas  l'execution  des  programmes   deja
  existants),  vous  reconstruisez  la  bibliotheque,  conservez  le nom
  propre tel qu'il etait et changez le  nom  du  fichier.  Lorsque  vous
  effectuez  des  modifications  que peuvent modifier le deroulement des
  programmes existants,  vous  pouvez  tout  simplement  incrementer  le
  nombre  situe  dans le nom propre --- dans ce cas, appelez la nouvelle
  version de la bibliotheque libtruc.so.2.0,  et  donnez-lui  comme  nom
  propre  libtruc.so.2.  Maintenant, faites pointer le lien de libfoo.so
  vers la nouvelle version et tout est bien dans le meilleur des  mondes
  !

  Il  est  utile  de  remarquer que vous n'etes pas oblige de nommer les
  bibliotheques de cette maniere, mais c'est une bonne convention.   Elf
  vous  donne une certaine liberte pour nommer des bibliotheques tant et
  si bien que cela peut perturber certains utilisateurs,  mais  cela  ne
  veut pas dire que vous etes oblige de le faire.

  Resume : supposons que choisissiez d'adopter la methode traditionnelle
  avec les mises a jour majeures qui peuvent  ne  pas  etre  compatibles
  avec  les  versions  precedentes  et  les mises a jour mineures qui ne
  posent pas ce probleme. Il suffit de creer la  bibliotheque  de  cette
  maniere :

       gcc -shared -Wl,-soname,libtruc.so.majeur -o libtruc.so.majeur.mineur

  et tout devrait etre parfait !

  66..44..33..  aa..oouutt..  LLee bboonn vviieeuuxx ffoorrmmaatt

  La  facilite  de  construire  des bibliotheque partagees est la raison
  principale de passer a ELF. Ceci dit,  il  est  toujours  possible  de
  creer  des  bibliotheques  dynamiques  au  format  a.out. Recuperez le
  fichier                                                        archive
  <ftp://tsx-11.mit.edu/pub/linux/packages/GCC/src/tools-2.17.tar.gz> et
  lisez les 20 pages de documentation que vous  trouverez  dedans  apres
  l'avoir  desarchive.  Je n'aime pas avoir l'air d'etre aussi partisan,
  mais il est clair que je n'ai jamais aime ce format :-).

  66..44..33..11..

  ZZMMAAGGIICC ccoonnttrree QQMMAAGGIICC

  QMAGIC est le format des executables qui ressemble un  peu  aux  vieux
  binaires  a.out  (egalement  connu  comme  ZMAGIC), mais qui laisse la
  premiere page libre. Cela permet  plus  facilement  de  recuperer  les
  adresses  non  affectees  (comme NULL) dans l'intervalle 0-4096 (NdT :
  Linux utilise des pages de 4Ko).

  Les editeurs de liens desuets ne gerent que le format ZMAGIC, ceux  un
  peu moins rustiques gerent les deux, et les plus recents uniquement le
  QMAGIC. Cela importe peu car le noyau gere les deux types.

  La commande file est capable d'identifier si un programme est de  type
  QMAGIC.

  66..44..33..22..  GGeessttiioonn ddeess ffiicchhiieerrss

  Une  bibliotheque  dynamique a.out (DLL) est composee de deux fichiers
  et d'un lien symbolique. Supposons que l'on  utilise  la  bibliotheque
  _t_r_u_c,   les   fichiers   seraient   les   suivants   :  libtruc.sa  et
  libtruc.so.1.2; et le lien symbolique aurait pour nom libtruc.so.1  et
  pointerait sur le dernier des fichiers. Mais a quoi servent-ils ?

  Lors  de  la  compilation, ld cherche libtruc.sa.  C'est le fichier de
  description de la  bibliotheque  :  il  contient  toutes  les  donnees
  exportees  et  les  pointeurs  vers  les  fonctions  necessaires  pour
  l'edition de liens.

  Lors de  l'execution,  le  chargeur  dynamique  cherche  libtruc.so.1.
  C'est  un  lien  symbolique  plutot  qu'un  reel  fichier pour que les
  bibliotheques puissent etre mise  a  jour  sans  avoir  a  casser  les
  applications  qui  utilisent  la  bibliotheque.  Apres la mise a jour,
  disons que l'on est passe a la version libfoo.so.1.3, le lancement  de
  ldconfig  va  positionner le lien. Comme cette operation est atomique,
  aucune application fonctionnant n'aura de probleme.

  Les bibliotheques DLL (Je sais que c'est une tautologie... mais pardon
  !)   semblent  etre  tres souvent plus importantes que leur equivalent
  statique. En fait, c'est qu'elles  reservent  de  la  place  pour  les
  extensions  ulterieures sous la simple forme de trous qui sont fait de
  telle maniere qu'ils n'occupent pas de place  disque  (NdT  :  un  peu
  comme  les  fichiers  core).  Toutefois,  un  simple  appel  a cp ou a
  makehole les remplira...  Vous pouvez effectuer une operation de strip
  apres  la  construction  de la bibliotheque, comme les adresses sont a
  des endroits  fixes.   NNee  ffaaiitteess  ppaass  llaa  mmeemmee  ooppeerraattiioonn  aavveecc  lleess
  bbiibblliiootthheeqquueess EELLFF !!

  66..44..33..33..  "" lliibbcc--lliittee "" ??

  Une  "  libc-lite  "  (contraction  de _l_i_b_c et _l_i_t_t_l_e) est une version
  epuree et reduite de la bibliotheque libc construite de telle  maniere
  qu'elle  puisse tenir sur une disquette avec un certain nombre d'outil
  Unix.   Elle  n'inclut  pas  curses,  dbm,  termcap,  ...   Si   votre
  /lib/libc.so.4  est liee avec une bibliotheque de ce genre il est tres
  fortement conseille de la remplacer avec une version complete.

  66..44..44..  EEddiittiioonn ddee lliieennss :: pprroobblleemmee ccoouurraannttss

  Envoyez-les moi !

      DDeess pprrooggrraammmmeess ssttaattiiqquueess lloorrssqquuee vvoouuss lleess vvoouulleezz
        partages"

        Verifiez que vous avez les bons liens pour que ld puisse trouver
        les  bibliotheques  partagees.  Pour  ELF  cela  veut  dire  que
        libtruc.so est un lien symbolique sur son image, pour  a.out  un
        fichier  libtruc.sa.   Beaucoup  de personnes ont eu ce probleme
        apres etre passes des outils ELF 2.5 a  2.6  (binutils)  ---  la
        derniere  version  effectue une recherche plus intelligente pour
        les bibliotheques dynamiques et donc ils n'avaient pas cree tous
        les  liens symboliques necessaires.  Cette caracteristique avait
        ete supprimee pour des raisons de  compatibilite  avec  d'autres
        architectures  et  parce  qu'assez  souvent cela ne marchait pas
        bien. En bref, cela posait plus de problemes qu'autre chose.

      LLee pprrooggrraammmmee ``mmkkiimmaaggee'' nn''aarrrriivvee ppaass aa ttrroouuvveerr lliibbggcccc

        Comme  libc.so.4.5.x  et  suivantes,  libgcc   n'est   pas   une
        bibliotheque  partagee.  Vous devez remplacer les `-lgcc' sur la
        ligne  de  commande  par  `gcc  -print-libgcc-file-name`  (entre
        quotes)

        Egalement,    detruisez    tous   les   fichiers   situes   dans
        /usr/lib/libgcc*.  C'est important.

      LLee mmeessssaaggee ____NNEEEEDDSS__SSHHRRLLIIBB__lliibbcc__44 mmuullttiippllyy ddeeffiinneedd
        Sont une consequence du meme probleme.

      LLee mmeessssaaggee ````AAsssseerrttiioonn ffaaiilluurree'''' aappppaarraaiitt lloorrssqquuee vvoouuss
        rreeccoonnssttrruuiisseezz uunnee
        DLL"  Ce  message  enigmatique  signifie  qu'un element de votre
        table _j_u_m_p a depasse la  table  car  trop  peu  de  place  etait
        reservee  dans  le  fichier jump.vars file.  Vous pouvez trouver
        le(s) coupable(s) en lancant la commande getsize fournie dans le
        paquetage  tools-2.17.tar.gz.  La seule solution est de passer a
        une nouvelle version majeure, meme  si  elle  sera  incompatible
        avec les precedentes.

      lldd:: oouuttppuutt ffiillee nneeeeddss sshhaarreedd lliibbrraarryy lliibbcc..ssoo..44
        Cela  arrive  lorsque vous effectuez l'edition de liens avec des
        bibliotheques differentes de la libc (comme les bibliotheques X)
        et que vous utilisez l'option -g sans utiliser l'option -static.

        Les fichiers  .sa  pour  les  bibliotheques  dynamiques  ont  un
        symbole  non  resolu  _NEEDS_SHRLIB_libc_4  qui  est defini dans
        libc.sa.  Or, lorsque vous utilisez -g vous faites l'edition  de
        liens  avec  libg.a  ou  libc.a  et donc ce symbole n'est jamais
        defini.

        Donc,  pour  resoudre  le  probleme,  ajoutez  l'option  -static
        lorsque  vous  compilez  avec  l'option -g, ou n'utilisez pas -g
        lors de l'edition de liens !

  77..  CChhaarrggeemmeenntt ddyynnaammiiqquuee

  _C_e _p_a_r_a_g_r_a_p_h_e _e_s_t _e_n _f_a_i_t _u_n _p_e_u _c_o_u_r_t  _:  _i_l  _s_e_r_a  _e_t_e_n_d_u  _d_a_n_s  _u_n_e
  _v_e_r_s_i_o_n _u_l_t_e_r_i_e_u_r_e _d_e_s _q_u_e _j_'_a_u_r_a_i _r_e_c_u_p_e_r_e _l_e _H_o_w_T_o _E_L_F

  77..11..  CCoonncceeppttss

  Linux  possede  des  bibliotheques dynamiques, comme on vous le repete
  depuis le debut de ce  document  !  Or,  il  existe  un  systeme  pour
  reporter  le  travail  d'association  des noms des symboles et de leur
  adresse dans la bibliotheque, qui est  normalement  effectue  lors  de
  l'edition de liens en l'effectuant lors du chargement du programme.

  77..22..  MMeessssaaggeess dd''eerrrreeuurr

  Envoyez  moi  vos  erreurs  !   Je  n'en fait pas grand chose sauf les
  inserer dans ce paragraphe...

      ccaann''tt llooaadd lliibbrraarryy:: //lliibb//lliibbxxxxxx..ssoo,, IInnccoommppaattiibbllee vveerrssiioonn
        (seulement a.out) Cela signifie que vous n'avez pas  la  version
        correcte  de  la bibliotheque (numero dit majeur). Non, il n'est
        pas possible d'effectuer un lien symbolique sur la  bibliotheque
        que  vous  possedez : si vous avez de la chance, vous obtiendrez
        un _s_e_g_m_e_n_t_a_t_i_o_n  _f_a_u_l_t.   Recuperez  la  nouvelle  version.   Un
        message  un peu equivalent existe egalement sur les systemes ELF
        :

          ftp: can't load library 'libreadline.so.2'

     wwaarrnniinngg uussiinngg iinnccoommppaattiibbllee lliibbrraarryy vveerrssiioonn xxxxxx
        (seulement a.out) Vous avez un numero de version de bibliotheque
        (mineur)  inferieur  a la version avec laquelle a ete compile le
        programme.  Le programme fonctionnera surement. Une mise a  jour
        est toutefois conseillee.

  77..33..

  CCoonnttrroolleerr ll''ooppeerraattiioonn ddee cchhaarrggeemmeenntt ddyynnaammiiqquuee

  Il   existe  certaines  variables  d'environnements  que  le  chargeur
  dynamique utilise. Beaucoup  sont  exploitees  par  le  programme  ldd
  lorsqu'il    s'agit    de   particularites   de   l'environnement   de
  l'utilisateur, ce qui peuvent etre positionnees pour lancer  ldd  avec
  des  options  particulieres.  Voici  une  description  des differentes
  variables d'environnement que vous pouvez rencontrer :

  +o  LD_BIND_NOW --- normalement, les fonctions ne  sont  pas  cherchees
     dans  les  bibliotheques  avant  leur  appel. En positionnant cette
     option, vous verifiez que toutes les fonctions employees dans votre
     programmes  se  trouvent  bien  dans  la  bibliotheque  lors de son
     chargement, ce qui ralentit le lancement du programme. C'est  utile
     lorsque   vous   voulez   tester   que  l'edition  de  liens  s'est
     parfaitement deroulee et que tous les symboles sont bien  associes.

  +o  LD_PRELOAD peut etre defini avec un nom de fichier qui contient des
     fonctions surchargeant des fonctions deja existantes.  Par exemple,
     si  vous  testez  une  strategie  d'allocation memoire, et que vous
     voulez remplacer le malloc de la bibliotheque C par le votre  situe
     dans un module ayant pour nom malloc.o, il vous suffit de faire :

       $ export LD_PRELOAD=malloc.o
       $ test_mon_malloc

  LD_ELF_PRELOAD  et LD_AOUT_PRELOAD sont similaires, mais leur utilisa-
  tion  est  specifique  au  type  de  binaire  utilise.  Si  LD__T_y_p_e_B_i_-
  _n_a_i_r_e_PRELOAD  et  LD_PRELOAD sont positionnes, celui correspondant le
  mieux a la machine est utilise.

  +o  LD_LIBRARY_PATH contient une liste  de  repertoires  contenant  les
     bibliotheques  dynamiques.  Cela n'affecte pas l'edition de liens :
     cela n'a qu'un effet lors de l'execution. Il faut noter qu'elle est
     desactivee pour des programmes qui s'executent avec un setuid ou un
     setgid.  Enfin, LD_ELF_LIBRARY_PATH et LD_AOUT_LIBRARY_PATH peuvent
     etre  utilises  pour  orienter  le  mode de compilation du binaire.
     LD_LIBRARY_PATH ne  devrait  pas  etre  necessaire  en  principe  :
     ajoutez   les  repertoires  dans  le  fichier  /etc/ld.so.conf/  et
     relancez ldconfig.

  +o  LD_NOWARN s'applique au format a.out uniquement.   Lorsqu'elle  est
     positionnee  (c.a.d si elle existe par exemple avec LD_NOWARN=true;
     export LD_NOWARN) cela arrete le chargeur du programme meme sur des
     avertissements     insignifiants    (tels    que    des    messages
     d'incompatibilites de numeros mineurs de version).

  +o  LD_WARN s'applique a ELF uniquement.  Lorsqu'elle est  positionnee,
     on transforme le message habituellement fatal _C_a_n_'_t _f_i_n_d _l_i_b_r_a_r_y en
     un avertissement. Ce n'est pas positionne  par  defaut  mais  c'est
     important pour un programme comme ldd.

  +o  LD_TRACE_LOADED_OBJECTS  s'applique  a ELF uniquement, et permet de
     simuler l'execution des programmes comme s'ils l'etaient par ldd :

       $ LD_TRACE_LOADED_OBJECTS=true /usr/bin/lynx
               libncurses.so.1 => /usr/lib/libncurses.so.1.9.6
               libc.so.5 => /lib/libc.so.5.2.18

  77..44..

  EEccrriirree ddeess pprrooggrraammmmeess eenn uuttiilliissaanntt llee cchhaarrggeemmeenntt ddyynnaammiiqquuee

  Cela  ressemble  enormement au systeme de chargement dynamique utilise
  sous Solaris 2.x. Ce systeme est decrit d'une maniere precise dans  le
  document expliquant la programmation avec ELF ecrit par H J Lu et dans
  la page de manuel dlopen(3), qui se trouve dans  le  paquetage  ld.so.
  Voici un exemple simple : pensez a faire l'edition de liens avec -ldl

       #include <dlfcn.h>
       #include <stdio.h>

       main()
       {
         void *libc;
         void (*printf_call)();

         if(libc=dlopen("/lib/libc.so.5",RTLD_LAZY))
         {
           printf_call = dlsym(libc,"printf");
           (*printf_call)("Bonjour ! Ha ben ca marche pil poil sous Linux !\n");
         }

       }

  88..  CCoonnttaacctteerr lleess ddeevveellooppppeeuurrss

  88..11..

  AAnnnnoonncceerr ddeess bboogguueess

  Commencez  par  mettre en doute le probleme. Est-ce specifique a Linux
  ou bien cela arrive avec gcc mais sur d'autres plates-formes ?  Est-ce
  specifique a la version du noyau ? A la version de la bibliotheque C ?
  Est-ce que ce probleme disparait lorsque vous effectuez une edition de
  liens  statique  ?  Pouvez-vous produire un code tres court mettant en
  evidence le probleme ?

  Apres avoir repondu apres ces quelques  questions,  vous  saurez  quel
  programme  est  a  l'origine du probleme. Pour un probleme direct avec
  GCC, le mieux est de consulter le fichier d'information livre  avec  :
  la  procedure pour rapporter un bogue y est detaille. Pour un probleme
  avec ld.so, la bibliotheque C ou  mathematique,  envoyez  un  courrier
  electronique  a  linux-gcc@vger.rutgers.edu.   Si  possible, donnez un
  court exemple mettant en evidence  le  probleme  ainsi  qu'une  courte
  description indiquant ce que le programme aurait normalement du faire,
  et ce qu'il fait en realite.

  88..22..  PPaarrttiicciippeerr aauu ddeevveellooppppeemmeenntt

  Si  vous  desirez  participer  au  developpement  de  GCC  ou  de   la
  bibliotheque C, la premiere chose a faire est de rejoindre la liste de
  diffusion  linux-gcc@vger.rutgers.edu.   Si  vous  desirez  uniquement
  savoir   de  quoi  ca  parle,  il  existe  des  archives  a  l'adresse
  <http://homer.ncm.com/linux-gcc/>.  Tout depend de ce que vous desirez
  faire ou apporter a ce projet !

  99..  DDiivveerrss

  99..11..  CCee ddooccuummeenntt

  Ce  HowTo  est  base  sur  la  FAQ de Mitchum DSouza's. Bon nombre des
  informations en proviennent. D'une maniere generale, il  est  frequent
  de  dire  une  phrase  du genre " je n'ai pas tout teste et donc ne me
  blamez pas si vous cassez votre  disque,  votre  systeme  ou  si  vous
  rompez avec votre epouse ".

  Le  nom  des  contributeurs  a  ce  document  sont  donnes  par  ordre
  alphabetique : Andrew Tefft, Axel Boldt, Bill Metzenthen, Bruce Evans,
  Bruno  Haible,  Daniel  Barlow,  Daniel  Quinlan,  David  Engel,  Dirk
  Hohndel, Eric Youngdale, Fergus Henderson, H.J. Lu, Jens Schweikhardt,
  Kai  Petzke,  Michael  Meissner,  Mitchum  DSouza,  Olaf  Flebbe, Paul
  Gortmaker, Rik Faith, Steven S. Dick, Tuomas  J  Lukka,  et  bien  sur
  Linus  Torvalds,  sans  qui  ce genre d'exercice aurait ete difficile,
  voir impossible :-)

  Ne soyez pas offense si votre nom n'apparait pas dans la liste et  que
  vous  ayez  contribue a ce document (sous la forme d'un HowTo ou d'une
  FAQ).   Envoyez-moi  un  courrier  electronique  et  j'effectuerai  la
  correction.

  99..22..  TTrraadduuccttiioonn

  A l'heure ou j'ecris ces lignes, je ne connais pas de traduction de ce
  document. Si vous en realisez une, s'il vous plait dites-le  moi.   Je
  suis  disponible pour toute aide concernant l'explication du texte, je
  serai tres content d'y repondre.

  Note du traducteur : CCooccoorriiccoo !! La version francaise est  la  premiere
  traduction de ce document.

  99..33..  CCoonnttaaccttss

  Tout  contact  est le bienvenu. Envoyez-moi un courrier electronique a
  l'adresse suivante : dan@detached.demon.co.uk.  Ma clef  publique  PGP
  (ID     5F263625)     est     disponible    sur    mes    pages    WWW
  <http://ftp.linux.org.uk/~barlow/>,   Si   vous    souhaitez    rendre
  confidentiel certains messages.

  99..44..  CCooppyyrriigghhtt

  Toutes les remarques appartiennent a leurs auteurs respectifs.

  Ce    document    est    copyrighte    (C)    1996    Daniel    Barlow
  <dan@detached.demon.co.uk>. Il peut etre  reproduit  et  distribue  en
  partie  ou  entierement, sur tout support physique ou electronique, du
  moment  ou  ce  copyright  se  trouve  sur  toute   les   copies.   La
  redistribution  commerciale  est  autorisee  et  encouragee. Toutefois
  l'auteur de ce document doit etre  mis  au  courant  de  ce  genre  de
  distributions.

  Toute  traduction,  adaptation,  ou bien tout travail incorporant tout
  document HowTo Linux doit posseder ce  copyright.  De  cette  maniere,
  vous  ne  pouvez  pas  imposer  de restriction a la distribution de ce
  document.  Des exceptions peuvent etre eventuellement  accordees  sous
  certaines  conditions  : contactez le coordinateur des HowTo's Linux a
  l'adresse donnee ci-dessous.

  En resume, nous souhaitons voir diffuser l'information de  la  maniere
  la  plus large qui soit. Toutefois, nous souhaitons garder la maitrise
  de  ces  documents  et  nous  aimerions  etre  consultes  avant  toute
  diffusion des HowTo's.

  Si  vous  avez  des  questions, vous pouvez contacter Greg Hankins, le
  coordinateur des HowTo Linux HOWTO a l'adresse electronique suivante :
  gregh@sunsite.unc.edu

  1100..  IInnddeexx

  Les entrees de cet index sont triees dans l'ordre alphabetique.

  +o  -fwritable-strings ``39'', ``56''

  +o  /lib/cpp ``16''

  +o  a.out ``1''

  +o  ar ``10''

  +o  as ``8''

  +o  <asm/*.h> ``19''

  +o  atoi() ``40''

  +o  atol() ``41''

  +o  executables trop gros ``63'', ``65'', ``77''

  +o  chewing gum ``3''

  +o  cos() ``68''

  +o  deboguer ``59''

  +o  divers ``72''

  +o  dlopen() ``82''

  +o  dlsym() ``83''

  +o  documentation ``4''

  +o  EINTR ``52''

  +o  elf ``0'', ``71''

  +o  execl() ``57''

  +o  fcntl ``47''

  +o  FD_CLR ``44''

  +o  FD_ISSET ``45''

  +o  FD_SET ``43''

  +o  FD_ZERO ``46''

  +o  fichier ``2''

  +o  <float.h> ``20''

  +o  gcc ``6''

  +o  gcc -fomit-frame-pointer ``61''

  +o  gcc -g ``60''

  +o  gcc -v ``14''

  +o  gcc, bogues ``15'', ``28'', ``29'', ``84''

  +o  gcc, options de compilation ``13'', ``25'', ``26''

  +o  gdb ``64''

  +o  fichiers d'en-tete ``17''

  +o  appels systemes interrompus ``51''

  +o  ld ``9''

  +o  LD_* : variables d'environnement ``80''

  +o  ldd ``81''

  +o  libc ``7''

  +o  libg.a ``62''

  +o  libgcc ``79''

  +o  <limits.h> ``21''

  +o  lint ``58''

  +o  <linux/*.h> ``18''

  +o  <math.h> ``70''

  +o  maths ``69''

  +o  mktemp() ``55''

  +o  numero de version ``12'', ``74''

  +o  optimisation ``27''

  +o  pages de manuel ``5''

  +o  QMAGIC ``76''

  +o  segmentation fault ``30'', ``54''

  +o  segmentation fault, in GCC ``33''

  +o  select() ``50''

  +o  SIGBUS ``34''

  +o  SIGEMT ``35''

  +o  SIGIOT ``36''

  +o  SIGSEGV ``31'', ``53''

  +o  SIGSEGV, in gcc ``32''

  +o  SIGSYS ``38''

  +o  SIGTRAP ``37''

  +o  sin() ``67''

  +o  soname ``73''

  +o  sprintf() ``42''

  +o  binaires linkes statiquement ``66'', ``78''

  +o  <stdarg.h> ``23''

  +o  <stddef.h> ``24''

  +o  strings ``11''

  +o  <sys/time.h> ``48''

  +o  <unistd.h> ``49''

  +o  <varargs.h> ``22''

  +o  ZMAGIC ``75''

  HOWTO Glibc 2
  Eric Green, ejg3@cornell.edu
  v1.5, 8 fvrier 1998

  de la version franaise par  Graud Canet, canet@labri.u-bordeaux.fr)
  Le HOWTO Glibc 2 couvre l'installation et l'utilisation de la bib
  liothque C GNU version 2 (libc 6) sur les systmes Linux.
  ______________________________________________________________________

  Table des matires
























































  1. Introduction

     1.1 Note du traducteur
     1.2  propos de glibc 2
     1.3  propos de ce document
     1.4 Changements rcents dans ce document

  2. Choix de la mthode d'installation

  3. Obtenir la bibliothque

  4. Installation comme bibliothque de test

     4.1 Compilation et installation
        4.1.1 lments requis
        4.1.2 Extraction des sources
        4.1.3 Configuration
        4.1.4 Compilation et installation
     4.2 Mise  jour du chargeur de liens dynamique
     4.3 Configuration pour gcc
     4.4 Mise  jour des liens des fichiers d'en-tte
     4.5 Test de l'installation

  5. Installation comme bibliothque C principale

     5.1 Construction de la bibliothque  partir des sources
        5.1.1 lments requis
        5.1.2 Extraction des sources
        5.1.3 Configuration
        5.1.4 Compilation
     5.2 Prparation  l'installation
     5.3 Installation  partir du paquetage binaire
     5.4 Installation  partir des sources
     5.5 Mise  jour des specs gcc
     5.6 Test de l'installation

  6. Compilation avec la libc non principale

     6.1 Avertissement concernant l'utilisation de libcs non principales
     6.2 Compilation des programmes avec une glibc de test
     6.3 Compilation des programmes avec libc 5 quand glibc est la bibliothque principale

  7. Compilation des programmes C++

     7.1 Installation de libg++ pour une installation glibc de test
     7.2 Installation de libg++ pour une installation glibc principale
     7.3 Compilation de programmes C++ avec la libc non principale

  8. Indiquer les bogues

  9. Fichiers specs d'exemple

  10. Divers

     10.1 Informations supplmentaires
        10.1.1 Pages Web
        10.1.2 Groupes de news
        10.1.3 Listes de distribution
     10.2 Remerciements
     10.3 Retour d'informations
     10.4 Copyright


  ______________________________________________________________________


  11..  IInnttrroodduuccttiioonn



  11..11..  NNoottee dduu ttrraadduucctteeuurr


  Ce document  a t  traduit  et maintenu jusqu'  la  version 1.4 par
  Olivier Tharan, dont je ne fais que reprendre modestement le travail.

  Le document est  truff  de signes  "cabalistiques"  comme des dise
  et   des pourcent,   dont    la    reprsentation    en     SGML   est
  respectivement &num; et &percnt; ;  le source LaTeX gnr par les
  outils  de conversion SGML introduit le  signe antislash devant ces
  signes et reste dans la  version PostScript de ce document.  Les
  donnes d'exemple sont donc errones, mais vous pouvez vous rapporter
   la version HTML du document qui n'a pas ces erreurs. La version
  d'origine connait les mmes problmes.


  11..22..   pprrooppooss ddee gglliibbcc 22


  Glibc 2 est la toute dernire version de la bibliothque C du GNU.
  Elle fonctionne pour l'instant sans modifications sur les systmes GNU
  Hurd, et les systmes Linux sur architectures i386, m68k et alpha. Les
  adaptations pour Linux PowerPC, MIPS, Sparc, Sparc 64 et ARM seront
  dans la version 2.1.  l'avenir, d'autres architectures et systmes
  d'exploitation seront supports.

  Sur Linux, glibc 2 est utilise comme libc avec un numro majeur de
  version gal  6, le successeur de la libc 5 pour Linux. Elle est
  destine par les dveloppeurs de la libc Linux  remplacer en fin de
  compte la libc 5.  l'heure de la version 2.0.6, on considre que
  glibc est de qualit suffisante pour tre utilise en production. La
  version 2.1 ( venir dans un futur proche) sera prte pour une
  utilisation normale avec l'ajout de plus de portages et de
  possibilits.

  Il y a trois extensions disponibles en option sur la glibc 2 :


     CCrryypptt
        Le paquetage UFC-crypt pour le cryptage des donnes. Il est
        disponible sparment  cause de restrictions  l'exportation.

     LLiinnuuxxTThhrreeaaddss
        Une mise en oeuvre de l'interface Posix 1003.1c "pthread".

     LLooccaallee ddaattaa
        Contient les donnes ncessaires  la construction des fichiers
        de donnes locale pour utiliser les possibilits
        d'internationalisation de la glibc.

  Les extensions crypt et LinuxThreads sont fortement recommandes... Ne
  pas les utiliser risque de les rendre incompatibles avec les
  bibliothques d'autres systmes. (Si vous ne voulez pas les utiliser,
  vous devez ajouter l'option --disable-sanity-checks quand vous lancez
  configure.)


  11..33..   pprrooppooss ddee ccee ddooccuummeenntt


  Ce HOWTO couvre l'installation de la bibliothque glibc 2 sur un
  systme Linux existant. Il est fait pour les utilisateurs de systmes
   base de processeurs Intel qui utilisent pour l'instant la libc 5,
  mais les utilisateurs d'autres systmes et de bibliothques similaires
  (comme la glibc 1) devraient pouvoir utiliser ces informations en
  substituant les noms de fichiers et d'architecture adquats aux
  endroits appropris.

  La copie la plus rcente de ce HOWTO fait partie du Linux
  Documentation Project <http://sunsite.unc.edu/LDP>, ou bien vous en
  trouverez une version 
  <http://www.imaxx.net/~thrytis/glibc/Glibc2-HOWTO.html>.


  11..44..  CChhaannggeemmeennttss rrcceennttss ddaannss ccee ddooccuummeenntt


  Diffrences entre la version 1.5 et 1.4 :


    Indexage ajout par Ed Bailey.

    Changement de mon adresse lectronique.

  Diffrences entre la version 1.4 et 1.3 :


    Chang l'tat courant d'exprimental  production.

    Mis  jour la liste des portages en dveloppement.

    Mis  jour la dernire version en 2.0.6.


  22..  CChhooiixx ddee llaa mmtthhooddee dd''iinnssttaallllaattiioonn


  Il y a plusieurs manires d'installer glibc. Vous pouvez installer les
  bibliothques   pour  les    tester,  en  continuant   d'utiliser  les
  bibliothques existantes par dfaut, tout en vous permettant d'essayer
  les nouvelles bibliothques  par l'utilisation d'options diffrentes 
  la   compilation de votre programme.  L'installation  de cette manire
  facilite aussi la dsinstallation  de glibc dans le  futur (cependant,
  tout programme  li avec  la glibc  ne fonctionnera  plus une fois que
  vous aurez enlev les bibliothques). L'utilisation de glibc comme une
  bibliothque de test demande  que  vous compiliez les  bibliothques 
  partir des   sources.  Il  n'y  a pas  de  distribution   binaire pour
  l'installation de cette  manire. Cette installation  est dcrite dans
  la       section    ``installation comme bibliothque de test''.

  L'autre manire  de   l'installer,   dcrite dans ce     document, est
  d'utiliser  glibc  comme bibliothque  principale.  Tous les  nouveaux
  programmes que vous compilerez sur   votre systme utiliseront  glibc,
  bien que  vous puissiez toujours lier des  programmes   vos anciennes
  bibliothques par des options de compilation diffrentes. Vous pouvez,
  soit installer les bibliothques   partir de binaires,  soit compiler
  la  bibliothque vous-mme.    Si vous  voulez  changer les    options
  d'optimisation   ou de configuration,  ou  utiliser  une extension qui
  n'est  pas distribue  en  paquetage binaire,  vous devrez obtenir  la
  distribution  de sources    et  compiler  vous-mme.  Cette  procdure
  d'installation est dcrite dans  la section ``installation comme
  bibliothque C principale''.

  Frodo Looijaard dcrit encore une autre  manire d'installer glibc. Sa
  mthode implique l'installation de glibc comme bibliothque secondaire
  et la mise en place d'un compilateur crois (_c_r_o_s_s_-_c_o_m_p_i_l_e_r) pour
  compiler  en   utilisant  glibc.  Pour   cette   mthode, la procdure
  d'installation est plus   complique que  l'installation en tant   que
  bibliothque de  test  dcrite dans  ce   document, mais facilite   la
  compilation  et l'dition   de  liens avec glibc.    Cette mthode est
  dcrite            dans       son            document
  Installer  glibc-2 sur Linux <http://huizen.dds.nl/~frodol/glibc/> (en
  anglais).

  Si vous utilisez en  ce moment un systme Debian  1.3 et ne voulez pas
  le mettre    jour en installant la   version instable de Debian  pour
  utiliser             glibc,                    le
  HOWTO libc5 vers libc6 Debian
  <http://www.gate.net/~storm/FAQ/libc5-libc6-Mini-HOWTO.html> dcrit la
  manire d'utiliser les paquetages Debian pour mettre votre systme 
  jour.

  Si vous installez glibc 2 sur un  systme important, vous voudrez sans
  doute utiliser l'installation de test. Mme  s'il n'y a pas de bogues,
  certains programmes devront tre modifis avant compilation  cause de
  changements dans les prototypes de fonctions et les types de donnes.



  33..  OObbtteenniirr llaa bbiibblliiootthhqquuee


  La glibc 2 contient le paquetage glibc et trois paquetages
  supplmentaires optionnels, LinuxThreads, Locale et Crypt. Vous pouvez
  trouver les sources 


    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.6.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-linuxthreads-2.0.6.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-localedata-2.0.6.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.6.tar.gz>

  Il vous faudra  peu prs 150 Mo d'espace disque pour la compilation
  complte et l'installation. L'installation binaire de base du
  paquetage de la bibliothque prend aux alentours de 50 Mo.

  Les paquetages binaires pour la version 2.0.6 ne sont pas disponibles.
  Les paquetages binaires pour la version 2.0.4 sont disponibles pour
  i386 et m68k, et la version 2.0.1 pour les alpha, vous les trouverez 


    Intel x86:

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.4.bin.i386.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.4.bin.i386.tar.gz>

    Alpha:

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.1.bin.alpha-linux.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.1.bin.alpha-
     linux.tar.gz>

    m68k:

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.4-m68k-linux.bin.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.4-m68k-
     linux.bin.tar.gz>

  Il y a des restrictions  l'exportation de l'extension crypt. Les
  utilisateurs non-ressortissants des tats-Unis devraient l'obtenir 
  <ftp://ftp.ifi.uio.no/pub/gnu>.

  Si vous utilisez une distribution Red Hat, vous pouvez obtenir les
  RPMs pour la glibc 2   <ftp://ftp.redhat.com/pub/redhat/>. La glibc 2
  est la bibliothque C principale de la nouvelle distribution Red Hat
  5.0.

  Si vous utilisez une distribution Debian, vous pouvez obtenir les
  paquetages pour glibc 2 
  <ftp://ftp.debian.org/debian/dists/unstable/main/>. Les fichiers sont
  nomms libc6. Glibc 2 fait maintenant partie du paquetage de base de
  la version hamm de Debian, et sera la libc principale quand Debian 2.0
  sortira.



  44..  IInnssttaallllaattiioonn ccoommmmee bbiibblliiootthhqquuee ddee tteesstt


  Cette section couvre l'installation de glibc 2 comme bibliothque de
  test. Tout ce que vous compilerez sera li  vos bibliothques
  existantes sauf si vous donnez des paramtres supplmentaires pour les
  lier aux nouvelles bibliothques. Il semble que les chemins d'accs
  soient compils dans un certain nombre de fichiers, et vous devrez
  probablement installer la bibliothque  partir des sources.


  44..11..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn



  44..11..11..  llmmeennttss rreeqquuiiss



     peu pres 150 Mo d'espace disque libre

    GNU make 3.75

    gcc >= 2.7.2 (ou mieux, 2.7.2.1)

    binutils 2.8.1 (pour les alpha vous devez utiliser une mise  jour
     temporaire ou _s_n_a_p_s_h_o_t)

    bash 2.0

    autoconf 2.12 (si vous changez configure.in)

    texinfo 3.11

  Sur un i586  133 MHz avec 64 Mo de RAM, il faut environ trois heures
  pour compiler les bibliothques compltes avec les extensions. Sur un
  i686  200 MHz charg, il faut environ une demi-heure.


  44..11..22..  EExxttrraaccttiioonn ddeess ssoouurrcceess


  Vous devez extraire les sources des archives pour pouvoir les
  compiler. La meilleure faon de procder est de faire ainsi :




   tar xzf glibc-2.0.6.tar.gz
   cd glibc-2.0.6
   tar xzf ../glibc-linuxthreads-2.0.6.tar.gz
   tar xzf ../glibc-crypt-2.0.6.tar.gz
   tar xzf ../glibc-localedata-2.0.6.tar.gz





  Ceci mettra les rpertoires linuxthreads, crypt et localedate dans le
  rpertoire glibc-2.0.6 o configure pourra trouver ces extensions.


  44..11..33..  CCoonnffiigguurraattiioonn


  Dans le rpertoire glibc-2.0.6, crez un rpertoire appel compile, et
  dplacez-vous dedans.  Tout  le travail  doit   tre effectu dans  ce
  rpertoire,  ce qui simplifiera le  nettoyage  (les dveloppeurs ne se
  sont pas trs occups de rendre 'make clean' parfait pour l'instant).



        mkdir compile
        cd compile





  Lancez ../configure. Pour utiliser les paquetages d'extension, vous
  devez les spcifier avec --enable-add-ons, comme --enable-add-
  ons=linuxthreads,crypt,localedata. Vous devez aussi choisir un
  rpertoire de destination pour l'installation. /usr/i486-linuxglibc2
  est un bon choix. La ligne de commande de configure pour ceci serait :



        ../configure --enable-add-ons=linuxthreads,crypt,localedata --prefix=/usr/i486-linuxglibc2






  44..11..44..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn


  Pour compiler et vrifier, lancez :



        make
        make check





  Si le 'make check' russit, installez la bibliothque :





   make install






  44..22..  MMiissee  jjoouurr dduu cchhaarrggeeuurr ddee lliieennss ddyynnaammiiqquuee



  1. Crez un lien  partir du nouvel ld.so vers /lib/ld-linux.so.2 :


        ln -s /usr/i486-linuxglibc2/lib/ld-linux.so.2 /lib/ld-linux.so.2






  C'est la seule bibliothque dont l'emplacement est fix une fois qu'un
  programme est li, et l'utilisation d'un lien dans /lib facilitera le
  passage  glibc en tant que bibliothque C principale quand la version
  stable sortira.

  2. ditez /etc/ld.so.conf. Vous devez ajouter le chemin vers le
     rpertoire lib dans lequel se trouvent les nouvelles bibliothques
      la fin du fichier, qui sera <prfixe>/lib, comme
     /usr/i486-linuxglibc2/lib dans l'exemple ci-dessus. Aprs avoir
     modifi /etc/ld.so.conf, lancez



        ldconfig -v






  44..33..  CCoonnffiigguurraattiioonn ppoouurr ggcccc


  La dernire tape de l'installation est la mise  jour de
  /usr/lib/gcc-lib pour que gcc sache comment utiliser les nouvelles
  bibliothques. D'abord vous devez dupliquer la configuration
  existante. Pour savoir quelle est la configuration en cours, utilisez
  l'option -v de gcc :



        % gcc -v
        Reading specs from /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2/specs
        gcc version 2.7.2.2





  Dans ce cas, i486-unknown-linux est le systme, et 2.7.2.2 est la
  version. Vous devez copier /usr/lib/gcc-lib/<systme> vers le nouveau
  rpertoire systme de test :



   cd /usr/lib/gcc-lib/
   cp -r i486-unknown-linux i486-linuxglibc2





  Allez dans le nouveau rpertoire systme de test et dans le rpertoire
  version



        cd /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2





  et ditez le fichier specs se trouvant dans ce rpertoire. Dans ce
  fichier, changez /lib/ld-linux.so.1 en /lib/ld-linux.so.2. Vous devrez
  aussi enlever toutes les expressions %{...:-lgmon} du fichier, puisque
  glibc n'utilise pas la bibliothque gmon pour les optimisations. Vous
  trouverez un fichier specs d'exemple dans la section ``Fichiers specs
  d'exemple''.


  44..44..  MMiissee  jjoouurr ddeess lliieennss ddeess ffiicchhiieerrss dd''eenn--ttttee


  Vous devez crer des liens dans votre nouveau rpertoire d'en-ttes
  vers d'autres rpertoires d'en-ttes :



        cd /usr/i486-linuxglibc2/include
        ln -s /usr/src/linux/include/linux
        ln -s /usr/src/linux/include/asm
        ln -s /usr/X11R6/include/X11





  Vous avez peut-tre d'autres bibliothques comme ncurses qui
  ncessitent d'avoir leurs fichiers d'en-ttes dans ce rpertoire. Vous
  devriez copier ou faire un lien vers ces fichiers depuis /usr/include.
  (Certaines bibliothques auront besoin d'tre recompiles avec glibc2
  pour pouvoir fonctionner avec glibc2. Dans ces cas, compilez
  simplement et installez les paquetages dans /usr/i486-linuxglibc2.)


  44..55..  TTeesstt ddee ll''iinnssttaallllaattiioonn


  Pour tester l'installation, crez le programme suivant dans un fichier
  appel glibc.c :










   #include <stdio.h>

   main()
   {
       printf("hello world!\n");
   }





  et compilez-le avec les options "-b <rpertoire d'installation>
  -nostdinc -I<rpertoire d'installation>/include -I/usr/lib/gcc-
  lib/<nouveau systme>/<version de gcc>/include" :



        % gcc -b i486-linuxglibc2 -nostdinc -I/usr/i486-linuxglibc2/include -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include glibc.c -o glibc





  Utilisez ldd pour vrifier que le programme a t li avec glibc2, et
  non avec votre ancienne libc :



        % ldd glibc
        libc.so.6 => /usr/i486-linuxglibc2/lib/libc-2.0.6.so (0x4000d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)





  S'il compile, que les liens sont effectus et qu'il gnre "hello
  world!" quand vous le lancez, l'installation a fonctionn.



  55..  IInnssttaallllaattiioonn ccoommmmee bbiibblliiootthhqquuee CC pprriinncciippaallee


  Cette section couvre l'installation de glibc2 comme bibliothque C
  principale. Tous les nouveaux programmes que vous compilerez seront
  lis avec cette bibliothque, sauf si vous utilisez des options de
  compilation spciales pour le lier avec une autre version.

  Si  vous utilisez Redhat ou Debian  et avez charg  les fichier rpm ou
  deb  adquats, voyez    les  instructions  d'installation   Redhat  ou
  Debian. Vous pouvez alors sauter cette section.



  55..11..  CCoonnssttrruuccttiioonn ddee llaa bbiibblliiootthhqquuee  ppaarrttiirr ddeess ssoouurrcceess


  Cette section explique comment compiler glibc 2 et ses extensions 
  partir des sources. Vous devez compiler la bibliothque si vous voulez
  changer les options d'optimisation ou de configuration ou utiliser un
  paquetage pour lequel vous n'avez pas de binaire.




  55..11..11..  llmmeennttss rreeqquuiiss



    Environ 150 Mo d'espace disque libre

    GNU make 3.75

    gcc >= 2.7.2 (ou mieux, 2.7.2.1)

    binutils 2.8.1 (pour les alpha vous aurez besoin d'une version
     'snapshot')

    bash 2.0

    autoconf 2.12 (si vous changez configure.in)

    texinfo 3.11

  Sur un i586  133 MHz avec 64 Mo de RAM, il faut environ trois heures
  pour compiler toutes les bibliothques avec les extensions. Sur un
  i686  200 MHz charg, il faut environ une demi-heure.



  55..11..22..  EExxttrraaccttiioonn ddeess ssoouurrcceess


  Vous devez extraire les sources des archives pour compiler. La
  meilleure faon de le faire est ainsi :



        tar xzf glibc-2.0.6.tar.gz
        cd glibc-2.0.6
        tar xzf ../glibc-linuxthreads-2.0.6.tar.gz
        tar xzf ../glibc-crypt-2.0.6.tar.gz
        tar xzf ../glibc-localedata-2.0.6.tar.gz





  Ceci mettra les rpertoires linuxthreads, crypt et localedata dans le
  rpertoire glibc-2.0.6 o configure pourra trouver ces extensions.


  55..11..33..  CCoonnffiigguurraattiioonn


  Dans   le rpertoire glibc-2.0.6,  crez  un rpertoire nomm compile,
  et  allez   dedans.  Tout  le  travail   sera fait   dans  ce
  rpertoire, ce qui simplifiera le   nettoyage (les dveloppeurs ne  se
  sont pas vraiment souci du 'make clean' pour l'instant).



       mkdir compile
       cd compile




  Lancez ../configure. Pour utiliser les paquetages supplmentaires,
  vous devez les spcifier avec --enable-add-ons, comme --enable-add-
  ons=linuxthreads,crypt,localedata. Vous devrez aussi srement
  spcifier les chemins o elle sera installe. Pour coller aux
  distributions Linux normales, spcifiez --prefix=/usr. (Quand on
  spcifie le prfixe /usr sur un systme Linux, configure sait ajuster
  les autres chemins pour placer libc.so et d'autres bibliothques
  importantes dans /lib.) La ligne de commande complte de configure
  serait :



        ../configure --enable-add-ons=linuxthreads,crypt,localedata --prefix=/usr





  55..11..44..  CCoommppiillaattiioonn


  Pour compiler et vrifier, lancez :



        make
        make check







  55..22..  PPrrppaarraattiioonn  ll''iinnssttaallllaattiioonn


  Vous devez maintenant dplacer certains fichiers pour vous prparer 
  l'arrive de la nouvelle bibliothque, que vous l'installiez  partir
  des sources ou de binaires. Tous les nouveaux programmes compils
  seront lis  glibc, mais les vieux programmes qui ne sont pas lis en
  statique dpendront encore de libc 5, et vous ne pouvez donc pas
  craser l'ancienne version.


  1. Crez un nouveau rpertoire pour y mettre les anciens fichiers :


        mkdir -p /usr/i486-linuxlibc5/lib






  2. Les vieux fichiers d'en-tte doivent tre vacus de /usr/include :


        mv /usr/include /usr/i486-linuxlibc5/include






  3. Crez un nouveau rpertoire d'en-ttes et activez les liens vers
     d'autres en-ttes :


   mkdir /usr/include

   ln -s /usr/src/linux/include/linux /usr/include/linux
   ln -s /usr/src/linux/include/asm /usr/include/asm
   ln -s /usr/X11R6/include/X11 /usr/include/X11
   ln -s /usr/lib/g++-include /usr/include/g++






  Les liens devront tre ajusts au besoin selon votre distribution.
  Rien que la Slackware installe les en-ttes g++ dans
  /usr/local/g++-include, alors que Debian met les en-ttes dans
  /usr/include/g++, et fait un lien de /usr/lib/g++-include vers
  /usr/include/g++. Dans d'autres cas, vous voudrez srement dplacer le
  rpertoire d'en-ttes g++ d'origine  son ancien emplacement
  /usr/include.

  4. Remettre des fichiers d'en-ttes et des liens supplmentaires.
     Certaines bibliothques non standards comme ncurses installent des
     fichiers dans /usr/include ou installent un lien vers leur
     rpertoire d'en-tte dans /usr/include. Ces fichiers et liens
     doivent tre remis en place pour pouvoir utiliser les bibliothques
     supplmentaires correctement.

  5. Ajoutez le nouveau rpertoire de bibliothque (comme
     /usr/i486-linuxlibc5/lib) _e_n _h_a_u_t de votre fichier /etc/ld.so.conf.
     Vous devriez avoir ld.so-1.8.8 ou mieux install pour viter
     d'avoir des messages bizarres une fois que glibc sera installe.

  6. Dplacez ou copiez toutes les anciennes bibliothques C dans le
     nouveau rpertoire.



        mv /usr/lib/libbsd.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libc.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libgmon.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libm.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libmcheck.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libc.so /usr/i486-linuxlibc5/lib
        mv /usr/lib/libm.so /usr/i486-linuxlibc5/lib
        cp /lib/libm.so.5.* /usr/i486-linuxlibc5/lib
        cp /lib/libc.so.5.* /usr/i486-linuxlibc5/lib






  libm.so.5 et libc.so.5 doivent tre copies et non dplaces si /usr
  est une partition diffrente de /, parce qu'elles sont ncessaires aux
  programmes utiliss pour dmarrer Linux et doivent tre situes sur la
  partition racine.

  7. Dplacez les fichiers /usr/lib/*.o dans le nouveau rpertoire.








   mv /usr/lib/crt1.o /usr/i486-linuxlibc5/lib
   mv /usr/lib/crti.o /usr/i486-linuxlibc5/lib
   mv /usr/lib/crtn.o /usr/i486-linuxlibc5/lib
   mv /usr/lib/gcrt1.o /usr/i486-linuxlibc5/lib






  8. Mettez  jour votre cache de bibliothque aprs avoir dplac vos
     bibliothques.



        ldconfig -v






  55..33..  IInnssttaallllaattiioonn  ppaarrttiirr dduu ppaaqquueettaaggee bbiinnaaiirree


  Si vous installez glibc  partir de binaires prcompils, vous devez :



        cd /
        gzip -dc glibc-2.0.bin.i386.tar.gz | tar tvvf -
        gzip -dc glibc-crypt-2.0.bin.i386.tar.gz | tar tvvf -
        ldconfig -v





  Si vous avez une architecure ou une version diffrente, substituez les
  noms de fichiers adquats.


  55..44..  IInnssttaallllaattiioonn  ppaarrttiirr ddeess ssoouurrcceess


  Pour installer la bibliothque  partir des sources, lancez :



        make install
        ldconfig -v






  55..55..  MMiissee  jjoouurr ddeess ssppeeccss ggcccc


  L'tape finale de l'installation ( la fois pour les installations
  binaires et sources) est de mettre  jour le fichier specs de gcc pour
  que vous puissiez lier vos programmes proprement. Pour dterminer quel
  fichier specs est utilis par gcc, lancez :


        % gcc -v
        reading specs from /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2/specs
        gcc version 2.7.2.2





  Dans ce cas, i486-unknown-linux est le systme, et 2.7.2.2 est la
  version. Vous devez copier /usr/lib/gcc-lib/<systme> dans l'ancien
  rpertoire systme :



        cd /usr/lib/gcc-lib/
        cp -r i486-unknown-linux i486-linuxlibc5





  Allez dans le rpertoire d'origine et dans le rpertoire de version



        cd /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2





  et ditez le fichier specs que vous y trouverez. Dans ce fichier,
  changez /lib/ld-linux.so.1 en /lib/ld-linux.so.2. Vous devrez aussi
  enlever toutes les expressions %{...:-lgmon} de ce fichier, puisque
  glibc n'utilise pas la bibliothque gmon pour les optimisations. Un
  fichier specs d'exemple se trouve dans la section ``fichiers specs
  d'exemple''.



  55..66..  TTeesstt ddee ll''iinnssttaallllaattiioonn


  Pour tester l'installation, crez le programme suivant dans un fichier
  appel glibc.c :



        #include <stdio.h>

        main()
        {
            printf("hello world!\n");
        }





  et compilez le programme.



        % gcc glibc.c -o glibc


  Utilisez ldd pour vrifier que le programme a t li avec glibc2, et
  non avec votre ancienne libc :



        % ldd glibc
        libc.so.6 => /lib/libc.so.6 (0x4000e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)





  Si a compile et que a gnre "hello world!" quand vous le lancez,
  l'installation est russie.



  66..  CCoommppiillaattiioonn aavveecc llaa lliibbcc nnoonn pprriinncciippaallee


  Il y  a des fois o vous  voudrez utiliser une bibliothque diffrente
  pour compiler vos programmes. Cette section explique comment faire, en
  utilisant les noms de  rpertoires et d'installation utiliss dans les
  exemples des deux  sections prcdentes. Souvenez-vous  de changer les
  noms pour coller  votre configuration.



  66..11..  AAvveerrttiisssseemmeenntt ccoonncceerrnnaanntt ll''uuttiilliissaattiioonn ddee lliibbccss nnoonn pprriinncciippaalleess


  Avant de compiler un programme utilis dans le processus de dmarrage,
  rappelez-vous que   si  le programme est  li  dynamiquement,   et est
  utilis avant  que  les partitions non-racines  soient montes, toutes
  les  bibliothques lies doivent    tre sur la partition racine.   En
  suivant  la procdure d'installation   de la  section prcdente  pour
  installer glibc comme bibliothque C principale, la vieille libc reste
  dans  /lib,  qui sera sur  votre  partition racine. Ceci veut dire
  que   tous  vos programmes    fonctionneront   encore lors    du
  dmarrage.    Cependant,  si  /usr   est  sur   une partition
  diffrente et que vous installez glibc comme bibliothque de test dans
  /usr/i486-linuxglibc2, tous les  nouveaux programmes que vous
  compilerez  avec  glibc ne fonctionneront pas   tant  que la partition
  /usr ne sera pas monte.


  66..22..  CCoommppiillaattiioonn ddeess pprrooggrraammmmeess aavveecc uunnee gglliibbcc ddee tteesstt


  Pour compiler un programme avec glibc en installation de test, vous
  devez mettre  zro les chemins d'en-tte pour qu'ils pointent vers
  les en-ttes glibc. En spcifiant "-nostdinc", vous annulerez les
  chemins normaux, et "-I/usr/i486-linuxglibc2/include" pointera vers
  les enttes de glibc. Vous devrez aussi spcifier les en-ttes gcc,
  que l'on trouve dans /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include
  (en supposant que vous ayez install la bibliothque de test dans
  i486-linuxglibc2 avec gcc version 2.7.2.2).

  Pour lier un programme  une glibc de test, vous devez spcifier la
  configuration gcc. Vous le faites avec l'option "-b i486-linuxglibc2".

  Pour la plupart des programmes, vous pouvez spcifier ces nouvelles
  options en les ajoutant aux options de makefile $CFLAGS et $LDFLAGS :


        CFLAGS = -nostdinc -I/usr/i486-linuxglibc2/include -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include -b i486-linuxglibc2
        LDFLAGS = -b i486-linuxglibc2





  Si vous utilisez un script configure, dfinissez les variables shell
  $CFLAGS et $LDFLAGS (en utilisant env/setenv pour csh/tcsh ou
  set/export pour sh/bash/etc) avant de lancer configure. Les makefiles
  gnrs par celui-ci devraient contenir les variables $CFLAGS et
  $LDFLAGS correctes. Tous les scripts configure ne tiendront pas compte
  des variables, et par consquent vous devriez vrifier aprs avoir
  lanc configure et diter les makefiles  la main si ncessaire.

  Si les programmes que vous compilez n'appellent que gcc (et pas cpp ou
  les binutils directement), vous pouvez utiliser le script suivant pour
  conomiser la spcification des options  chaque fois :



        #!/bin/bash
        /usr/bin/gcc -b i486-linuxglibc2 -nostdinc \
                     -I/usr/i486-linuxglibc2/include \
                     -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include "$@"





  Vous pourrez alors utiliser ce script  la place de "gcc" pour
  compiler.


  66..33..  CCoommppiillaattiioonn ddeess pprrooggrraammmmeess aavveecc lliibbcc 55 qquuaanndd gglliibbcc eesstt llaa bbiibb
  lliiootthhqquuee pprriinncciippaallee


  Pour compiler un programme avec vos anciennes bibliothques quand vous
  avez install glibc comme bibliothque principale, vous devez mettre 
  zro les chemins d'en-ttes vers les anciennes en-ttes. En spcifiant
  "-nostdinc", vous annulerez les chemins normaux et
  "-I/usr/i486-linuxlibc5/include" pointera vers les en-ttes libc 5.
  Vous devez aussi indiquer "-I/usr/lib/gcc-
  lib/i486-linuxlibc5/2.7.2.2/include" pour inclure les en-ttes
  spcifiques  gcc. Rappelez-vous d'ajuster ces chemins selon la
  manire dont vous avez nomm les nouveaux rpertoires et selon votre
  version de gcc.

  Pour lier un programme  votre ancienne libc, vous devez spcifier la
  configuration de gcc. Vous le faites en utilisant l'option "-b
  i486-linuxlibc5".

  Pour la plupart des programmes, vous pouvez indiquer ces nouvelles
  options en les ajoutant aux options de makefile $CFLAGS et $LDFLAGS :



        CFLAGS = -nostdinc -I/usr/i486-linuxlibc5/include -I/usr/lib/gcc-lib/i486-linuxlibc5/2.7.2.2/include -b i486-linuxlibc5
        LDFLAGS = -b i486-linuxlibc5






  Si vous utilisez un script configure, dfinissez les variables shell
  $CFLAGS et $LDFLAGS (en utilisant env/setenv pour csh/tcsh, ou
  set/export pour sh/bash/etc) avant de lancer configure. Les makefiles
  gnrs par celui-ci devraient contenir les variables $CFLAGS et
  $LDFLAGS corrects. Tous les scripts configure ne verront pas les
  variables, et vous devriez donc vrifier aprs avoir lanc configure
  et diter les makefiles si ncessaire.

  Si les programmes que vous compilez n'appellent que gcc (et pas cpp ou
  binutils directement), vous pouvez utiliser le script suivant pour
  viter de devoir indiquer toutes les options  chaque fois :



        #!/bin/bash
        /usr/bin/gcc -b i486-linuxlibc5 -nostdinc \
                     -I/usr/i486-linuxlibc5/include \
                     -I/usr/lib/gcc-lib/i486-linuxlibc5/2.7.2.2/include "$@"





  Vous pouvez alors utiliser ce script  la place de "gcc" pour la
  compilation.



  77..  CCoommppiillaattiioonn ddeess pprrooggrraammmmeess CC++++


  Libg++ utilise des parties de la bibliothque mathmatique, elle est
  donc lie  libm. Puisque votre bibliothque libg++ existante aura t
  compile avec votre ancienne bibliothque, vous devrez recompiler
  libg++ avec glibc ou obtenir une copie binaire. Les dernires sources
  de libg++, en mme temps qu'un binaire li  glibc (pour x86) se
  trouvent   <ftp://ftp.yggdrasil.com/private/hjl/>.



  77..11..  IInnssttaallllaattiioonn ddee lliibbgg++++ ppoouurr uunnee iinnssttaallllaattiioonn gglliibbcc ddee tteesstt


  Si vous avez install glibc comme bibliothque de test, vous devez
  installer les fichiers dans le rpertoire dans lequel vous avez
  install glibc (comme /usr/i486-linuxglibc2 pour l'exemple des
  sections prcdentes). Si vous installez  partir du paquetage binaire
  (ce que je recommanderais, puisque je n'ai jamais eu de chance pour
  compiler libg++ de cette manire), vous devez extraire les fichiers
  dans un rpertoire temporaire et dplacer tous les fichiers usr/lib/
  dans le rpertoire <rpertoire install>/lib/, les fichiers
  usr/include/ dans le rpertoire <rpertoire install>/include/
  (rappelez-vous d'effacer le lien include/g++ avant !), et les fichiers
  usr/bin/ dans le rpertoire <rpertoire install>/bin/.


  77..22..  IInnssttaallllaattiioonn ddee lliibbgg++++ ppoouurr uunnee iinnssttaallllaattiioonn gglliibbcc pprriinncciippaallee


  Si vous avez install glibc comme bibliothque principale, vous devez
  d'abord dplacer vos anciens fichiers libg++ dans l'ancien rpertoire
  libc si vous voulez encore pouvoir compiler des programmes g++ avec
  votre ancienne libc. La meilleure faon de procder est probablement
  d'installer une nouvelle copie de libg++ compile avec libc 5 comme
  dans la section prcdente, et ensuite d'installer la version glibc
  normalement.
  77..33..  CCoommppiillaattiioonn ddee pprrooggrraammmmeess CC++++ aavveecc llaa lliibbcc nnoonn pprriinncciippaallee


  Si vous essayez de compiler un programme C++ avec une libc non
  principale, vous devrez inclure le rpertoire d'en-ttes g++, qui dans
  les exemples ci-dessus serait /usr/i486-linuxglibc2/include/g++ pour
  une installation glibc de test ou /usr/i486-linuxlibc5/include/g++
  pour une installation glibc principale. On peut faire cela en gnral
  en ajoutant  la variable $CXXFLAGS :



        CXXFLAGS = -nostdinc -I/usr/i486-linuxglibc2/include -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include -I/usr/i486-linuxlibc5/include/g++ -b i486-linuxglibc2







  88..  IInnddiiqquueerr lleess bboogguueess


  Si vous pensez que la bibliothque est vrole, veuillez d'abord lire
  la FAQ. Il se peut que d'autres personnes aient eu ce problme et
  qu'il y ait une solution simple. Vous devriez aussi regarder la partie
  "Outils recommands pour l'installation de la bibliothque C de GNU"
  dans le fichier INSTALL puisque certains bogues proviennent des outils
  et non de glibc.

  Une  fois que  vous  avez trouv   un bug, assurez-vous   que c'en est
  vraiment un.  Une bonne manire  de le  faire  est  de regarder si  la
  bibliothque C  GNU se   comporte de  la   mme manire  qu'une  autre
  bibliothque  C.  S'il en   est ainsi, vous  vous  tes  tromp et les
  bibliothques ont raison (mais pas forcment).  Dans le cas contraire,
  l'une des bibliothques a probablement tort.

  Ensuite, dirigez-vous vers  <http://www-gnats.gnu.org:8080/cgi-
  bin/wwwgnats.pl>, et parcourez la base de donnes des bugs. Vrifiez
  bien que le problme n'a pas dj t indiqu. Vous devriez aussi
  jeter un coup d'oeil au fichier BUGS (ditribu avec glibc) pour
  prendre connaissance des bugs connus.

  Une fois que vous tes sr d'avoir trouv un bug, essayez de le
  rduire au plus petit test pratique qui reproduit le problme. Dans le
  cas d'une bibliothque C, vous ne devrez probablement en tre rduit
  qu' un appel de fonction de la bibliothque, si possible. Ceci ne
  devrait pas tre trop difficile.

  L'tape finale une fois que vous avez un exemple simple de test est
  d'indiquer le bug. En indiquant un bug, envoyez votre exemple de test,
  les rsultats que vous avez obtenus, ce que vous pensez tre le
  problme (si vous avez pens  quelque chose), le type de votre
  systme, les versions de la bibliothque C GNU, du compilateur GNU CC
  et des GNU binutils que vous utilisez. Ajoutez aussi les fichiers
  config.status et config.mak crs en lanant configure ; ils seront
  dans le rpertoire qui tait le rpertoire courant quand vous avez
  lanc configure.

  Vous devez envoyer tous les rapports de bug pour la bibliothque C GNU
  en utilisant le script shell glibcbug livr avec la libc GNU 
  <bugs@gnu.org> (l'ancienne adresse  <bugs@gnu.ai.mit.edu> fonctionne
  encore), ou par l'intermdiaire de l'interface Web de GNATS 
  <http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl>.


  Les suggestions et les questions doivent tre envoyes  la liste de
  distribution   <bugs-glibc@prep.ai.mit.edu>. Si vous ne lisez pas le
  groupe de gnews gnu.bug.glibc, vous pouvez vous abonner  la liste en
  demandant   <bug-glibc-request@prep.ai.mit.edu>.

  Veuillez s'il vous plait ne pas envoyer de rapport de bug concernant
  la bibliothque C GNU  <bug-gcc@prep.ai.mit.edu>. Cette liste
  s'occupe des rapports de bug de GNU CC. GNU CC et la bibliothque C
  GNU sont des entits distinctes maintenues par des personnes
  diffrentes.



  99..  FFiicchhiieerrss ssppeeccss dd''eexxeemmppllee


  Voici ci-inclus un fichier d'exemple specs pour glibc 2 que gcc
  utilise pour la compilation et la liaison dynamique. On devrait le
  trouver dans le rpertoire /usr/lib/gcc-lib/<nouveau
  rpertoire>/<version gcc>. Si vous utilisez un systme x86, vous
  pouvez copier exactement cette section dans le fichier.













































   *asm:
   %{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}

   *asm_final:
   %{pipe:-}

   *cpp:
   %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}

   *cc1:
   %{profile:-p}

   *cc1plus:


   *endfile:
   %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s

   *link:
   -m elf_i386 %{shared:-shared}   %{!shared:     %{!ibcs:       %{!static:       %{rdynamic:-export-dynamic}     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}}  %{static:-static}}}

   *lib:
   %{!shared: %{pthread:-lpthread}        %{profile:-lc_p} %{!profile: -lc}}

   *libgcc:
   -lgcc

   *startfile:
   %{!shared:      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s}                  %{!p:%{profile:gcrt1.o%s}                         %{!profile:crt1.o%s}}}}    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}

   *switches_need_spaces:


   *signed_char:
   %{funsigned-char:-D__CHAR_UNSIGNED__}

   *predefines:
   -D__ELF__ -Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)

   *cross_compile:
   0

   *multilib:
   . ;






  1100..  DDiivveerrss



  1100..11..  IInnffoorrmmaattiioonnss ssuuppppllmmeennttaaiirreess



  1100..11..11..  PPaaggeess WWeebb



    Page d'accueil de la bibliothque C GNU chez FSF
     <http://www.gnu.org/software/libc/libc.html>


    Utilisation de GNU Libc 2 avec Linux
     <http://www.imaxx.net/~thrytis/glibc/>

    Installer glibc-2 sur Linux <http://huizen.dds.nl/~frodol/glibc/>

    HOWTO libc5 vers libc6 Debian
     <http://www.gate.net/~storm/FAQ/libc5-libc6-Mini-HOWTO.html>


  1100..11..22..  GGrroouuppeess ddee nneewwss



    comp.os.linux.development.system

    comp.os.linux.development.apps

    linux.dev.kernel

    gnu.bugs.glibc


  1100..11..33..  LLiisstteess ddee ddiissttrriibbuuttiioonn



     LLiissttee ddee ddiissccuussssiioonn GGlliibbcc 22 LLiinnuuxx..
        Cette liste est destine  la discussion entre les utilisateurs
        Linux qui ont install glibc2, la nouvelle bibliothque C. Les
        sujets peuvent comprendre des problmes de compatibilit et des
        questions sur la compilation de code dans un environnement
        Linux/glibc. Pour s'abonner, envoyer un courrier 
        Majordomo@ricardo.ecn.wfu.edu
        <mailto:Majordomo@ricardo.ecn.wfu.edu> avec dans le corps
        "subscribe glibc-linux <votre adresse email>".


  1100..22..  RReemmeerrcciieemmeennttss


  J'ai vol une bonne partie de ces informations sur la page web de GNU
  Libc <http://www.gnu.org/software/libc/libc.html> et de l'annonce de
  glibc 2 par Ulrich Drepper <drepper@gnu.ai.mit.edu> et ses
  commentaires. Andreas Jaeger <aj@arthur.rhein-neckar.de> a aliment
  une partie de la section sur l'indication des bugs.

  Les personnes suivantes ont fourni des informations et un retour sur
  ce document :


    Allex <allex@ms2.accmail.com.tw>

    Mark Brown <M.A.Brown-4@sms.ed.ac.uk>

    Ulrich Drepper <drepper@gnu.ai.mit.edu>

    Scott K. Ellis <ellis@valueweb.net>

    Aron Griffis <agriffis@coat.com>

    Andreas Jaeger <aj@arthur.rhein-neckar.de>

    Frodo Looijaard <frodol@dds.nl>

    Ryan McGuire <rmcguire@freenet.columbus.oh.us>

    Shaya Potter <spotter@capaccess.org>

    Les Schaffer <godzilla@futuris.net>

    Andy Sewell <puck@pookhill.demon.co.uk>

    Gary Shea <shea@gtsdesign.com>

    Stephane <sr@adb.fr>

    Jan Vandenbos <jan@imaxx.net>

  Les traductions de ce document sont faites par :


    chinois : Allex <allex@ms2.accmail.com.tw>

    franais : Graud Canet<canet@labri.u-bordeaux.fr>

    japonais : Kazuyuki Okamoto <ikko-@pacific.rim.or.jp>


  1100..33..  RReettoouurr dd''iinnffoorrmmaattiioonnss


  En plus d'crire ce HOWTO, maintenir la page glibc 2 pour Linux
  <http://www.imaxx.net/~thrytis/glibc>, et l'utiliser sur ma machine,
  je n'ai rien  voir avec le projet glibc. Je suis loin d'tre un
  expert dans ce domaine, bien que j'essaie de rsoudre les problmes
  qu'on m'envoie par courrier lectronique. J'apprcie tout retour,
  correction ou suggestion que vous pourriez me faire. Veuillez les
  envoyer  ejg3@cornell.edu <mailto:ejg3@cornell.edu>.


  1100..44..  CCooppyyrriigghhtt


  Copyright (c) 1997 par Eric Green. Ce document peut tre distribu
  sous les termes de la licence LDP.



























  HOWTO HOWTO
  Mark F. Komarinski (markk@cgipc.com)
  Adaptation franaise par Nicolas Duboc (duboc@essi.fr)
  $Id: HOWTO-HOWTO.sgml, v1.4, 17 Mars 2000 markk Exp $

  Explique les outils, les procdures, et donne des conseils aux auteurs
  de HOWTO.
  ______________________________________________________________________

  Table des matires
























































  1. Introduction

     1.1 Historique
     1.2 Nouvelles versions
     1.3 Commentaires
        1.3.1 Historique des versions
     1.4 Copyrights
     1.5 Contributions et remerciements

  2. Informations gnrales sur le LDP et SGML

     2.1 Le LDP
     2.2 SGML
        2.2.1 Pourquoi SGML au lieu de HTML ou d'autres formats ?
     2.3 Les outils
        2.3.1 sgmltools
        2.3.2 TeX
        2.3.3 LyX
        2.3.4 Emacs (PSGML)
        2.3.5 WordPerfect 2000
        2.3.6 DocBook : L'ultime guide

  3. Dmarrer avec DocBook

     3.1 Pour les nouveaux auteurs
     3.2 Les listes de discussion
     3.3 Tlcharger et installer les outils
        3.3.1 sgmltools
     3.4 Ecrire du SGML  la main

  4. Dmarrer avec LinuxDoc

     4.1 Pour les nouveaux auteurs
     4.2 Les listes de discussion
     4.3 Tlcharger et installer les outils
        4.3.1 sgmltools
     4.4 Ecrire du SGML  la main
        4.4.1 Dbut du document
        4.4.2 Les informations de l'entte
        4.4.3 Les sections
        4.4.4 Les paragraphes
        4.4.5 Texte avanc
        4.4.6 Les listes
        4.4.7 Texte verbatim
        4.4.8 Les URL
        4.4.9 Les rfrences
        4.4.10 Les caractres spciaux
     4.5 Ecrire du SGML avec d'autres outils
        4.5.1 LyX
        4.5.2 Emacs
        4.5.3 Les autres outils SGML
     4.6 Les bases de CVS
     4.7 Obtenir un compte CVS
     4.8 Autres informations sur CVS
        4.8.1 Accs CVS anonyme
        4.8.2 Fichiers CVS via le web
        4.8.3 Accs graphique  CVS
     4.9 CVS et la mise  jour des fichiers

  5. Distribuer votre documentation

     5.1 Avant la distribution
     5.2 Notions de copyright et de licence
     5.3 Soumission au LDP Une fois que votre document a t relu et que vous avez pris en compte les commentaires des relecteurs, vous pouvez soumettre votre texte au LDP. Envoyez un e-mail 

  6. Conseils de style
  7. FAQ  propos du LDP

     7.1 Je dsire aider le LDP. Comment puis-je le faire ?
     7.2 Je voudrais publier un ensemble de documents du LDP dans un livre. Comment est protg le contenu du LDP ?
     7.3 J'ai trouv une erreur dans un document du LDP. Puis-je le corriger ?


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  HHiissttoorriiqquuee

  Ce document a t commenc le 26 aot 1999 par Mark F. Komarinski
  (markk@cgipc.com) aprs deux jours de frustration pour faire marcher
  les outils. Si ne serait ce qu'un auteur du LDP (NdT: "Linux
  Documentation Project", Projet de Documentation Linux) trouve de
  l'aide dans ce document, j'aurai atteint mon objectif.


  11..22..  NNoouuvveelllleess vveerrssiioonnss

  La version la plus rcente de ce document peut tre trouve sur ma
  page personnelle http://www.cgipc.com/~markk/ au format SGML. D'autres
  versions peuvent tre trouves dans diffrents formats sur le site du
  LDP http://www.linuxdoc.org/.


  11..33..  CCoommmmeennttaaiirreess

  Les commentaires  propos de ce HOWTO peuvent tre envoys  l'auteur
  (markk@cgipc.com).



  11..33..11..  HHiissttoorriiqquuee ddeess vveerrssiioonnss

  v1.4 (17 Mars 2000)


    Ajout des commentaires de Gregory Leblanc (GLeblanc@cu-
     portland.edu)  propos des soumissions au LDP et sur psgml sous
     Emacs. Merci !


  11..44..  CCooppyyrriigghhttss

  (c) 1999-2000 Mark F. Komarinski

  Ce manuel peut tre reproduit en totalit ou en partie, sans frais,
  sous rserve des restrictions suivantes :

    Cette note de copyright et de permission doit tre prserve dans
     toutes copies partielles ou totales.

    Toutes traductions ou travaux drivs doivent tre approuvs par
     l'auteur en le prvenant avant leur distribution.

    Si vous distribuez une partie de ce travail, les instructions pour
     obtenir la version complte devront galement tre fournies.

    De courts extraits peuvent tre reproduits, sans ces notes de
     permissions, dans  le cadre d'exposs et de citations si les
     rfrences sont correctement cites.


  Des exceptions  ces rgles peuvent tre tolres pour un but ducatif
  : contactez l'auteur et demandez lui. Ces restrictions sont l pour
  nous protger en tant qu'auteurs, et non pour vous restreindre en tant
  que lecteurs ou enseignants. Tous les codes sources apparaissant dans
  ce document sont protgs par la Licence Publique Gnrale GNU,
  disponible par FTP anonyme depuis le site d'archive GNU.


  11..55..  CCoonnttrriibbuuttiioonnss eett rreemmeerrcciieemmeennttss

  Merci  tous ceux qui ont donn leurs commentaires lorsque j'crivais
  ceci. Cela inclut Deb Richardson et Daniel Barlow et les autres
  membres de la liste de diffusion ldp-discuss.


  J'ai tir quelques sections du Howto Index (disponible sur tous les
  sites du LDP) et de la documentation de sgmltools. Vous trouverez les
  rfrences  sgmltools et le LDP ailleurs dans ce document.


  Les sections sur l'accs rseau  CVS ont t partiellement crites
  par Serek (ser@serek.arch.pwr.wroc.pl).
  Les sections sur DocBook ont t en partie crites par Jorge Godoy
  (godoy@conectiva.com.br <mailto:godoy@conectiva.com.br>). Un grand
  merci  tous les deux pour leur aide.


  22..  IInnffoorrmmaattiioonnss ggnnrraalleess ssuurr llee LLDDPP eett SSGGMMLL

  22..11..  LLee LLDDPP

  Le Projet de Documentation de Linux (LDP) a t commenc pour fournir
  aux nouveaux utilisateurs un moyen d'obtenir rapidement des
  informations sur un sujet particulier. Il ne contient pas seulement
  une srie de livres sur l'administration systme, le rseau ou la
  programmation, mais galement un grand nombre de petits travaux sur
  des sujets plus individuels, crits par ceux qui les ont utiliss. Si
  vous voulez savoir comment imprimer, vous trouverez le Printing HOWTO.
  Si vous voulez mettre en place un rseau, rcuprez le Ethernet HOWTO;
  etc.


  Au dpart, la plupart de ces documents taient au format texte ou
  HTML. Avec le temps, il fallait trouver un meilleur moyen de grer ces
  travaux. Celui-ci permettrai de les lire depuis une page web, depuis
  un fichier texte sur un CD-ROM, ou encore depuis votre organiseur de
  poche.  La solution s'est avrer tre SGML.


  22..22..  SSGGMMLL

  Le "Standard Generalized Markup Language" (SGML) est un langage qui
  est bas sur le balisage du texte. De ce point de vue, il est
  similaire  HTML, mais toutes les similitudes s'arrtent l. La force
  de SGML est que contrairement  la philosophie WYSIWYG (What You See
  Is What You Get, NdT: Ce que vous voyez est ce que vous obtenez), vous
  ne dfinissez pas la couleur, la taille de la police, ou d'autres
  paramtres de formatage. A la place, vous dfinissez des lments
  (paragraphes, sections, listes numrotes) et laissez l'interprte
  SGML et le programme final s'occuper du placement, des couleurs, des
  polices, et tout le reste. HTML fait la mme chose, puisqu'il est en
  fait une subdivision de SGML.


  Il y a en fait deux parties qui constituent SGML. La premire est la
  Structure, qui est appele la DTD, ou encore Dfinition du Type du
  Document. La DTD dfinie les relations entre les diffrents lments
  d'un texte. La DTD LinuxDoc, utilise pour crer ce document, en est
  un exemple. La DTD fournit un style et une apparence  tous les
  documents crs qui l'utilisent. La seconde est le Contenu, qui est
  trait par l'interprteur SGML et qui est ventuellement vu par
  l'utilisateur. Ce paragraphe est un contenu, comme pourrait l'tre une
  image, une table, une liste numrote ou autre chose. Le contenu est
  entour de balises pour sparer les diffrents lments.


  Dans quelques temps, le Projet de Documentation Linux passera de
  LinuxDoc  DocBook, dj utilise par d'autres auteurs, donnant ainsi
  au LDP un style plus consistent de documents SGML. Quand cela
  arrivera, nous vous tiendront informs par l'intermdiaire de ce HOWTO
  ou des listes de diffusion. La diffrence la plus importante rside
  dans le fait que DocBook utilise des balises pour les diffrents types
  de contenus (comme les commandes, les noms de fichiers, de
  rpertoires, etc.)  alors que LinuxDoc utilise des balises bases sur
  l'apparence que devrait prendre le texte (vous pouvez utiliser un type
  "insistant" ou machine  crire).


  22..22..11..  PPoouurrqquuooii SSGGMMLL aauu lliieeuu ddee HHTTMMLL oouu dd''aauuttrreess ffoorrmmaattss ??

  SGML fournit d'autres outils que ceux de mise en forme. Vous pouvez
  crer des index, des tables des matires ou des liens internes ou
  externes automatiquement. Le paquetage sgmltools vous permet aussi
  d'exporter (j'applerai a gnrer  partir de maintenant) vos
  documents SGML vers LaTeX, info, du texte, HTML ou RTF. Vous pouvez
  alors crer d'autres types de fichiers  (DOC, PostScript, etc.) 
  partir de ces formats de base. Des programmes comme LyX (mon diteur
  WYSIWYM prfr) vous permettent d'crire au format TeX, d'exporter au
  format SGML et de gnrer ce que vous voulez depuis SGML.


  En fin de compte, SGML s'intresse plus au fonctionnement des lments
  plutt qu' leur apparence. Une diffrence de taille, en tout cas une
  qui vous permettra d'crire plus vite, puisque vous n'avez plus  vous
  souciez de la justification des paragraphes, des types et tailles des
  polices, etc.


  22..33..  LLeess oouuttiillss

  Dans cette section, je vais survoler les outils dont vous aurez besoin
  ou voudrez utiliser pour crer votre propre documentation LDP. Je vais
  les dcrire ici, et mieux les explorer plus tard, en mme temps que
  leur procdure d'installation. Si vous utilisez d'autres outils pour
  crire des manuels du LDP, faites le moi savoir, j'ajouterai un
  descriptif ici.


  22..33..11..  ssggmmllttoooollss

  Requis


  Le paquetage sgmltools contient les outils SGML ncessaires pour
  gnrer les formats dont on a dj parl. Il inclut galement la DTD
  LinuxDoc, indispensable aux documents LDP. Pour crer des documents
  SGML, c'est tout ce dont vous avez besoin. Si vous voulez convertir au
  format TeX, vous aurez aussi besoin de ce dernier. Le paquetage
  sgmltools est disponible soit dans votre distribution, soit via
  http://www.sgmltools.org/. Notez que vous aurez besoin de la version
  1.0.9 pour utiliser LinuxDoc. Toute autre version utilise DocBook.

  22..33..22..  TTeeXX

  Optionnel


  TeX est le langage de balisage de texte favori pour beaucoup, dont les
  personnes du monde mathmatique. Je me rappelle d'examens de maths qui
  taient en fait cris avec TeX. C'est aussi un des premiers langages 
  balises qui est encore utilis (les autres tant les formats *roff
  utiliss pour les pages de manuels). En fait, TeX partage une grande
  partie de ses concepts avec SGML. Nanmoins, TeX gnre ses fichiers
  au format DVI (indpendant du priphrique de sortie) qui peut alors
  tre converti en un autre format. Malheureusement, le format DVI ne
  peut pas tre facilement converti en autre chose que des langages
  d'impression (PostScript, PCL), le rendant difficile  traduire en
  HTML. TeX est disponible dans toutes les distributions Linux en tant
  que LaTeX ou TeTex. Vous pourrez utiliser l'un des deux.


  22..33..33..  LLyyXX

  Optionnel


  Le programme LyX est un diteur de texte graphique WYSIWYM (What You
  See Is What You Mean -- NdT : Ce que vous voyez est ce que vous
  pensez) et constitue un lien entre les applications graphiques et les
  rgles de SGML quelque fois compliques. En fait, LyX est utilis pour
  crire des documents TeX, et la plupart dans rgles TeX sont prsentes
  dans LyX. Par exemple, puisque les sections sont numrotes
  automatiquement, vous ne pouvez pas insrer d'espace facilement. Ce
  serait contraire  la philosophie de TeX. De mme, SGML ignore souvent
  ces espaces. Le programme LyX supporte la DTD LinuxDoc et fournit un
  document de base pour vous permettre d'crire (ou d'diter) votre
  documentation LDP comme vous en avez l'habitude, sans devoir utiliser
  vi et vous souvenir quelles sont les balises pour crer une liste 
  items. Vous trouverez LyX  l'adresse http://www.lyx.org/.


  Pour ceux qui utilisent KDE, il existe un portage de LyX bas sur les
  librairies Qt. Vous trouverez plus d'informations  l'adresse
  http://www.devel.lyx.org/~ettrich/klyx.html
  <http://www.devel.lyx.org/~ettrich/klyx.html>.


  22..33..44..  EEmmaaccss ((PPSSGGMMLL))

  Optionnel


  Il existe un mode Emacs pour crire des documents SGML ou XML. Vous
  trouverez plus d'informations 
  http://www.lysator.liu.se/projects/about_psgml.html


  22..33..55..  WWoorrddPPeerrffeecctt 22000000

  Optionnel


  La dernire version de WordPerfect 2000 supportera les modes SGML. Je
  ne sais pas encore si cel concerne aussi LinuxDoc, ou juste DocBook.
  Si vous tes un beta-testeur de WP2000 et si vous pouvez me dire comme
  il marche, je serais heureux d'inclure vos notes.


  22..33..66..  DDooccBBooookk :: LL''uullttiimmee gguuiiddee

  Optionnel (mais recommand)


  Ce livre est dit par O'Reilly depuis Octobre 1999 et c'est une bonne
  rfrence pour DocBook. Je n'ai pas trouv qu'il soit trs pratique,
  et la plupart des "gloires"est pour XML, mais les balises DocBook 3.1
  sont toutes listes dans un format concit. Vous pourrez le trouver
  chez votre vendeurs favori, ou le retrouver en intgralit sur le site
  http://www.docbook.org <http://www.docbook.org/>.


  33..  DDmmaarrrreerr aavveecc DDooccBBooookk

  Cette section couvre les nouvelles mthodes pour crire de la
  documentation pour le LDP, en utilisant la DTD DocBook 3.1. Nous
  verrons comment rcuprer, installer et utiliser les outils, ainsi
  qu'une introduction aux balises DocBook. Etant donn qu'il y a prs de
  300 balises DocBook, nous ne les verront pas toutes ici. Les lecteurs
  vraiment intresss pourront se tourner vers http//www.docbook.org
  <http://www.docbook.org/> pour plus d'informations.


  33..11..  PPoouurr lleess nnoouuvveeaauuxx aauutteeuurrss

  Si vous tes un nouvel auteur au sein du LDP, et que vous voulez
  prendre en main un HOWTO (ou un Mini-HOWTO) non maintenu ou en crire
  un vous mme, contactez le coordinateur du LDP  l'adresse linux-
  howto@metalab.unc.edu. Cela lui permet de savoir qui travaille sur
  quel document. Tous les HOWTO envoys devront tre au format SGML
  (bass sur la DTD LinuxDoc ou DocBook). Les mini-HOWTO pourront tre
  aux formats SGML ou HTML, mais seuls les documents SGML seront inclus
  dans les versions imprimes des HOWTO. Si vous crivez un Mini-HOWTO,
  en SGML, il sera plus facile de le convertir dans les autres formats,
  permettant  plus de monde de profiter de votre travail.


  33..22..  LLeess lliisstteess ddee ddiissccuussssiioonn

  Il y a quelques listes de discussion auxquelles vous pouvez vous
  abonner pour prendre part au fonctionnement du LDP. La premire est
  ldp-discuss@lists.linuxdoc.org, qui est le principal lieu de
  discussion du LDP. Pour s'abonner, il suffit d'envoyer un message avec
  "subscribe" dans le champ du sujet  l'adresse mailto:ldp-discuss-
  request@lists.linuxdoc.org <mailto:ldp-discuss-
  request@lists.linuxdoc.org>. Pour se dsabonner, mme adresse avec
  "unsubscribe" dans le champ sujet du message.


  33..33..  TTllcchhaarrggeerr eett iinnssttaalllleerr lleess oouuttiillss

  33..33..11..  ssggmmllttoooollss

  Contrairement aux versions prcdentes, vous aurez besoin de la
  version 2.x de sgmltools pour utiliser DocBook. Puisque tous les
  programmes de base ont chang, vous devrez aussi oublier les
  programmes du type sgml2xxx (dsol). Puisque toutes les principales
  distributions arrivent avec sgmltools 1.x, vous devrez supprimer le
  paquetage sgmltools 1.x et installer une version 2.0 ou une version
  CVS.


  Pour obtenir le source de la dernire version CVS, vous pouvez
  utiliser les commandes suivantes :

  CVSROOT=:pserver:cvs@cvs.sgmltools.org:/home/cvs
  export CVSROOT
  cvs login
  cvs -z6 get sgmltools




  Le mot de passe CVS est 'cvs'.


  Une fois tlcharg, vous avez juste  faire ./compile, make, et make
  install pour installer sgmltools.


  Pour les systmes RedHat (utilisant RPM) vous pouvez utiliser la
  commande rpmfind pour obtenir le dernier paquetage sgmltools. Le
  programme rpmfind est disponible sur http://www.rpmfind.net/
  <http://www.rpmfind.net/>. Assurez-vous que vous avez recupr
  sgmltools et non sgml-tools, car ce dernier est sgml-tools 1.0.9.


  Pour les systmes Debian, apt-get rcuprera le bon paquetage pour
  vous :


  # apt-get install sgmltools




  Comme pour les systmes RedHat, il faut rcuprer sgmltools et non
  sgml-tools.


  33..44..  EEccrriirree dduu SSGGMMLL  llaa mmaaiinn

  Puisque ceci est largement trait dans d'autres ouvrages, les
  personnes intresses pourront se rferrer 
  http://metalab.unc.edu/godoy/using-docbook/using-docbook.html
  <http://metalab.unc.edu/godoy/using-docbook/using-docbook.html> pour
  plus d'informations sur savoir comment produire du SGML  la main avec
  votre diteur de texte favori.


  44..  DDmmaarrrreerr aavveecc LLiinnuuxxDDoocc

  Cette section dcrit comme tre au point pour crire vos propres
  documents LDP. Rcuprer et configurer les outils, prendre contact
  avec le LDP en gnral, et partager vos connaissances avec tous les
  utilisateurs de Linux.


  44..11..  PPoouurr lleess nnoouuvveeaauuxx aauutteeuurrss

  Si vous tes un nouvel auteur au sein du LDP, et que vous voulez
  prendre en main un HOWTO (ou un Mini-HOWTO) non maintenu ou en crire
  un vous mme, contactez le coordinateur du LDP  l'adresse ldp-
  discuss@lists.linuxdoc.org. Cela lui permet de savoir qui travaille
  sur quel document. Tous les HOWTO envoys devront tre au format SGML
  (bass sur la DTD LinuxDoc ou DocBook). Les mini-HOWTO pourront tre
  aux formats SGML ou HTML, mais seuls les documents SGML seront inclus
  dans les versions imprimes des HOWTO.



  44..22..  LLeess lliisstteess ddee ddiissccuussssiioonn

  Il y a quelques listes de discussion auxquelles vous pouvez vous
  abonner pour prendre part au fonctionnement du LDP. La premire est
  ldp-discuss@lists.linuxdoc.org, qui est le principal lieu de
  discussion du LDP. Pour s'abonner, il suffit d'envoyer un message avec
  "subscribe" dans le champ du sujet  l'adresse mailto:ldp-discuss-
  request@lists.linuxdoc.org <mailto:ldp-discuss-
  request@lists.linuxdoc.org>. Pour se dsabonner, mme adresse avec
  "unsubscribe" dans le champ sujet du message.


  44..33..  TTllcchhaarrggeerr eett iinnssttaalllleerr lleess oouuttiillss

  44..33..11..  ssggmmllttoooollss

  Rcuprez le paquetage sgmltools depuis http://www.sgmltools.org/, ou
  directement depuis votre distribution. Les fichiers de sgmltools.org
  sont le code source de l'application, vous devrez donc les compiler
  pour votre machine. Utiliser un paquetage pr-compil pour votre
  distribution est plus facile, puisque vous n'aurez pas  le compiler
  et viterez les problmes de compilation (sauf si vous tes un
  programmeur).


  Les outils sgmltools sont inclus dans la distribution RedHat. Si ce
  n'est pas le cas, vous pouvez le tlcharger depuis le site ftp de
  RedHat ou un des sites miroirs.


  Si vous utilisez une Debian, sgmltools est galement inclus en
  standard. Dans le cas contraire, vous pourrez utiliser apt-get pour
  tlcharger et installer le paquetage  votre place :



  # apt-get install sgml-tools




  Pour plus d'informations sur le paquetage Debian, regarder  l'adresse
  http://www.debian.org/Packages/stable/text/sgml-tools.html


  Pour la compilation des sources, la marche  suivre est :



  # tar -zxvf sgmltools-x.x.x.tar.gz
  # cd sgmltools-x.x.x
  # ./configure
  # make
  # make install




  Remplacez sgmltools-x.x.x par la version du paquetage que vous
  utilisez. A la date o j'cris ces lignes, la version qui supporte
  LinuxDoc est la 1.0.9, et celle qui supporte DocBook est 2.0.2. Ces
  deux versions sont disponibles sur le site web dj vu ci-dessus.


  Une fois les outils installs, vous avez plusieurs commandes 
  disposition.
  sgmlcheck file.sgml - Vrifie la syntaxe du document

  sgml2html file.sgml - Convertit un fichier SGML en HTML. Le fichier
  file.html contiendra la table des matires, les fichiers file-x.html
  contiendront les sections numrotes x.

  sgml2rtf file.sgml - Convertit un fichier SGML en deux fichiers Rich
  Text Format (RTF). Le fichier file.rtf contiendra la table des
  matires et file-0.rtf contiendra toutes les sections.


  sgml2txt file.sgml - Convertit un fichier SGML en texte ASCII. La
  table des matires et les sections sont toutes dans le fichier
  file.txt.


  sgml2info file.sgml - Blah SGML blah INFO, utilis par la commande
  info. Tout est contenu dans file.info.


  sgml2latex file.sgml - Blah SGML blah TeX.


  sgml2lyx file.sgml - SGML converti pour l'diteur graphique LyX.
  Intressant si vous avez gnr un fichier SGML et voulez le convertir
  pour l'utiliser avec LyX.


  44..44..  EEccrriirree dduu SSGGMMLL  llaa mmaaiinn

  Tout comme le HTML, vous pourrez crire du SGML  la main, une fois
  que vous connatrez toutes les balises dont vous aurez besoin. Vous
  trouverez ici une description pour la plupart des balises, avec des
  exemples d'utilisations. Le code source SGML de ce document,
  disponible sur le site web vu dans la section ``Introduction'', est un
  bon exemple pour dmarrer l'apprentissage. J'essairai de donner les
  indications sur les interprtations des balises dans les diffrents
  formats de conversion.


  44..44..11..  DDbbuutt dduu ddooccuummeenntt

  Pour commencer un nouveau document, crez un nouveau fichier avec
  votre diteur ASCII favori et commencez comme a :



  <!doctype linuxdoc system>




  Cela prcise le type de document (LinuxDoc dans notre cas) que
  l'interprte SGML utilisera pour la conversion vers les autres
  formats. Cette balise ne gnre aucun texte en elle mme.


  Ensuite vous devez entourez le reste de votre travail entre <article>
  et </article>. Cela indique le dbut du contenu (ou de l'article,
  eh?). Si vous connaissez HTML, ces balises sont quivalentes aux
  balises <html> et </html>





  44..44..22..  LLeess iinnffoorrmmaattiioonnss ddee ll''eennttttee

  La premire partie du document devrait inclure des informations
  gnrales  propos du contenu. Elle est similaire aux premires pages
  d'un livre qui contiennent le titre de l'ouvrage, l'auteur, la date de
  publication, la table des matires, etc.


  Le titre est indiqu entre les balises <title> et </title>. De mme on
  utilise <date> et </date> pour la date.


  Les deux sections qui restent sont les balises <abstract> et
  </abstract> qui donnent un rsum du document, et la balise <toc> qui
  indique l'emplacement de la table des matires. Celle ci est
  automatiquement gnre par l'interprte SGML. Nous reviendrons sur
  les sections plus tard.


  Maintenant,  quoi tout cela ressemble-t-il ? En regardant le dbut du
  code source de ce document, vous trouverez : (NdT : voir la version
  originale)



  <!doctype linuxdoc system>

  <!-- LinuxDoc file was created by LyX 1.0 (C) 1995-1999 by <markk> Tue Dec 14 16:17:42 1999
   -->

   <article>
   <title>HOWTO HOWTO
   </title>
   <author>Mark F. Komarinski &lt;markk@cgipc.com&gt;
   </author>
   <date>v1.1, 14 dcembre 1999
   </date>
   <abstract>List the tools, procedures, and hints to get HOWTO authors up to speed
   and writing.
   </abstract>
   <toc>




  Cette partie du document est utilise pour crer la page principale
  que vous voyez une fois convertie au format RTF ou HTML.


  44..44..33..  LLeess sseeccttiioonnss

  Pour gnrer la table des matires, il vous faut de quoi la
  construire. Les sections de SGML sont ce que les chapitres sont aux
  publications traditionnelles. Il peut y avoir plusieures sections, et
  chaque section peut avoir des sous-sections, qui peuvent elles aussi
  avoir des sous-sections etc.


  Dmarrer la rdaction de vos documents par les sections est une bonne
  ide puisque cela permet de dresser la liste des sujets que vous
  voulez traiter. Vous pouvez alors subdiviser ces sections principales
  en d'autres de plus en plus petites, jusqu' ce que vous obteniez
  l'information pure que vous pourrez crire en quelques paragraphes.
  J'ai moi mme commenc ce document en utilisant cette mthode.


  Les sections fait partie des quelques balises qui n'ont pas besoin
  d'tre fermes. Ainsi, il n'y a pas de balise </sect>. Vous n'avez pas
  besoin non plus de vous occuper de la numrotation des sections.
  L'interprte SGML s'en chargera lors de la gnration vers d'autres
  formats.


  Les sections sont amorces par la balise <sect>. Chaque nouvelle
  section commence par <sect>. La premire est numrote 1.


  Les sous-sections (comme 1.1) se crent par la balise <sect1>. Elles
  commencent aussi  1.


  Les sous-sous-sections (1.1.1) se crent par la balise <sect2> et
  commencent aussi  1.


  Quand l'interprte SGML arrive  la balise <toc>, il parcourt le reste
  du document et construit la table des matires  partir des balises
  des sections qu'il rencontre. Les sections sont numrotes et listes
  dans la table des matires et, bien sr, utilises dans le reste du
  document. Les sous-sous-sections (1.1.1) n'apparaissent pas dans la
  table des matires, mais sont mises en valeur dans le texte si c'est
  possible.


  44..44..44..  LLeess ppaarraaggrraapphheess

  L'criture de paragraphes est la mme qu'en HTML. Utilisez une balise
  <p> pour indiquer une nouvelle ligne, et commencez  crire. SGML
  ignore les espaces tout comme les tabulations, les espaces multiples
  et les sauts de lignes. Quand SGML rencontre une balise <p>, il
  commence un nouveau paragraphe. Un document SGML correct devrait
  contenir les balises </p> pour finir les paragraphes.


  44..44..55..  TTeexxttee aavvaanncc

  Vous aurez besoin de diffrenci des parties de texte par rapport 
  d'autres. Soit le mettre en valeur, soit pour donner un nom de
  commande. Le premier de ces deux cas se rsout par les balises <em> et
  </em>. Quant au style machine  crire, on utilise les balises <tt> et
  </tt>.


  44..44..66..  LLeess lliisstteess

  Il existe deux types de listes sous SGML. La premire est la liste
  numrote, o chaque item de la liste est numrot (comme les
  sections), en commenant  1.



  1. Voici la premire entre de la liste numrote.

  2. Voici la seconde.

  3. Et la troisime.


  Le code pour cette liste est le suivant :



  <enum>
   <item>Voici la premire entre de la liste numrote.
   <item>Voici la seconde.
   <item>Et la troisime.
  </enum>




  La balise <enum> indique que les entres qui la suivent doivent tre
  numrotes.


  L'autre type de liste est la liste  items simple, o chaque entre 
  une toile, un cercle, ou un point, ou tout autre symbole pour
  indiquer chaque item.



    Voici la premire entre de la liste  items.

    Voici la seconde.

    Et la troisime.


  Le code de la liste ressemble  a en SGML :



  <itemize>
   <item>Voici la premire entre de la liste  items.
   <item>Voici la seconde.
   <item>Et la troisime.
  </itemize>




  Comme vous le voyez, la balise <item> est la mme pour les listes
  numrotes et les listes  items.


  Une troisime forme de liste est la liste de dfinition. Elle comporte
  un terme  dfinir, et la phrase de dfinition.



     LLDDPP
        Le Projet de Documentation Linux

     SSGGMMLL
        Standard Generalized Markup Language


  Le code qui permet de crer cette liste est :


  <descript>
   <tag>LDP</tag>Le Projet de Documentation Linux
   <tag>SGML</tag>Standart Generalized Markup Language
  </descript>




  Ce n'est pas tout  fait la mme syntaxe que pour les listes  items
  et numrotes, mais la liste est aussi entoure par des balises
  (<descrip> et </descrip>) et chaque item qui est un mot  dfinir est
  entour par <tag> et </tag>. Le reste de la ligne est alors considr
  comme la dfinition de ce dernier.


  44..44..77..  TTeexxttee vveerrbbaattiimm

  De temps en temps, on a besoin d'afficher du texte comme on l'crit.
  Pour cela, vous pouvez utiliser les balises <verb> et </verb> pour
  entourer du texte qui doit apparatre tel quel. Les espaces, les
  retours  la ligne, et tout autre caractre spcial sont prservs
  jusqu` la balise </verb>.



  Ceci est du texte verbatim.

  Et voici un autre texte verbatim.




  44..44..88..  LLeess UURRLL

  SGML fournit de quoi utiliser des URL (Universal Resource Locators ,
  NdT: sortes de pointeurs vers des ressources extrieures) de tous
  types. Cela ne sera utilis que par les versions HTML, mais d'autres
  formats pourrait galement y avoir recours.  La meilleure utilisation
  en sera faite pas HTML, mais d'autres formats, tels que PDF, pourront
  aussi en tirer avantages.


  Les URL n'ont pas de balise de terminaison, mais toutes les
  informations sont contenues dans la balise <url> elle-mme. Voici un
  URL qui pointe vers la page du LDP : http://www.linuxdoc.org/. Et
  voici le code pour le crer :



  <url url="http://www.linuxdoc.org/"
  name="http://www.linuxdoc.org/">




  La partie url="http://www.linuxdoc.org/" donne la destination du
  pointeur, et la partie name="http://www.linuxdoc.org/" indique au
  navigateur ce qu'il doit afficher en ralit. Dans ce cas, les deux
  parties sont identiques, mais on pourrait crer une balise url qui
  ressemblerai  a :



  <url url="http://www.linuxdoc.org/"
  name="LDP">




  Ce qui affichera ceci dans le texte : LDP. Toutefois, un bon principe
  consiste  dupliquer l'URL dans la partie name. La raison est que si
  vous utilisez un format du type texte ou RTF, ces balises n'auront pas
  de significations. Le lecteur ne connatra pas l'URL  utiliser.

  44..44..99..  LLeess rrffrreenncceess

  Alors que les URL sont adapts pour faire rfrence aux ressources
  externes  votre document, ce n'est pas le cas pour les rfrences au
  sein du texte lui-mme. Pour cela, les balises <label> et <ref> sont
  prfrables. La balise <label> indique un endroit dans le document
  auquel vous voudrez faire rfrence ailleurs dans le texte, comme un
  signet. La cration du <label> est simple. Insrez la ligne suivante 
  l'endroit voulu :



  <label> id="introduction">




  Vous avez alors cr un point dans le texte auquel vous pourrez vous
  rfrer en tant que "introduction". En effet, cette balise est
  utilise dans le document SGML que vous lisez. Quand vous voulez
  pointer vers cet endroit (comme ``ici''), vous insrez le code SGML
  suivant :



  <ref id="introduction" name="ici">




  et SGML insrera le mot "ici" dans le texte qui sera un lien vers la
  section indique par le label "introduction".


  L'autre utilisation des rfrences est l'indexation. Puisque les
  documents du LDP sont souvent publis sur papier sous forme d'un grand
  nombre de documents, les rfrences servent  gnrer un index qui
  apparatra  la fin du livre, bas sur les mots et les sujets.


  44..44..1100..  LLeess ccaarraaccttrreess ssppcciiaauuxx

  Tout comme pour HTML, vous devrez interdire l'interprtation de
  certains caractres non alphanumriques pour viter que SGML les voit
  comme du code. Voici une liste des codes utiliss. Vous en trouverez
  d'avantage dans le Guide de l'utilisateur de sgmltools  l'adresse
  http://www.sgmltools.org/guide/guide.html



    Utilisez &amp; pour le et commercial

    Utilisez &lt; pour le caractre infrieur  (<)

    Utilisez &gt; pour le caractre suprieur  (>)

    Utilisez &etago; pour un infrieur  suivi d'une barre oblique (</)

    Utilisez &dollar; pour le signe dollar ($)

    Utilisez &num; pour un dise (#)

    Utilisez &percnt; pour le pourcent (%)

    Utilisez &tilde; pour un tilde (~)

    Utilisez " et " pour les apostrophes, ou utilisez &dquot; pour "

    Utilisez &shy; pour un trait d'union (c'est  dire une indication
     o le mot peut tre coup pour la justification)


  44..55..  EEccrriirree dduu SSGGMMLL aavveecc dd''aauuttrreess oouuttiillss

  44..55..11..  LLyyXX

  Je vais encore chanter les louanges pour LyX. Je favorise cette
  application car je l'apprcie vraiment. Il donne la possibilit
  d'crire en SGML avec la facilit d'un traitement de texte standard.
  Ce n'est pas un programme WYSIWYG, mais plutt une application WYSIWYM
  (What You See Is What You Mean, NdT: Ce que vous voyez est ce que vous
  pensez), puisque ce que vous voyez n'est pas forcement ce que vous
  obtiendrez une fois que l'interprteur SGML aura fait son travail.


  Pour crer un document LinuxDoc avec LyX, tlchargez et installez
  l'application. Assurez-vous d'avoir dj install TeX et sgmltools
  (voir ``Tlcharger et installer les outils'' pour plus d'informations
   ce propos). Ensuite, lancez LyX et slectionnez "file->new from
  template...". Cliquez sur "Templates" et slectionnez
  linuxdoctemplate.lyx et vous obtiendrez un document de base, avec tous
  les en-ttes d'information qu'un document du LDP se doit d'avoir.
  Modifiez les donnes selon vos besoins (c'est  dire complter les
  champs Titre, Auteur, Date, Abstract, etc.) en commencez la rdaction
  de votre document. Le menu dans le coin en haut  gauche vous permet
  de slectionner le type du texte (standard, liste numres ou 
  items, sections). Le point d'exclamation est utilis pour mettre le
  texte en valeur, et vous pouvez soit cliquer dessus et commencer 
  taper le texte, soit slectionner du texte et cliquer dessus pour
  mettre en valeur du texte dj crit. D'autres spcificits de SGML
  peuvent tre trouves dans le menu Insertion. Vous pouvez insrer des
  URL, des rfrences, des entres d'index, et d'autres types de
  donnes. Une fois votre document termin, vous pouvez le sauvegarder
  au format LyX, et l'exporter au format LinuxDoc et obtenir ainsi un
  fichier avec l'extension .sgml. sgmlcheck peut alors vrifier ce
  fichier, qui est prt  tre converti vers d'autres formats.


  44..55..22..  EEmmaaccss

  Emacs dispose d'un mode spcial pour crire en SGML appel psgml. Ceux
  qui ont une exprience de ce mode sont invits  donner des
  informations  l'auteur par courrier lectronique. psgml est un module
  majeure pour Emacs conu pour diter des documents SGML et XML. Il
  permet une coloration syntaxique et un joli affichage qui font
  ressortir les balises SGML, il fournit une mthode dnsertion des
  balises sans les taper  la main, et est capable de valider la syntaxe
  de votre document lors de sa rdaction. Pour les utilisateurs d'Emacs,
  c'est un excellent outil. Je pense qu'il permet une plus grande
  versatilit que tout autre diteur de code SGML. Il fonctionne aussi
  bien avec DocBook, LinuxDoc et d'autres DTD. La documentation psgml
  est disponible  http://www.lysator.liu.se/~lenst/about_psgml/
  <http://www.lysator.liu.se/~lenst/about_psgml/>.


  44..55..33..  LLeess aauuttrreess oouuttiillss SSGGMMLL

  S'il y a d'autres outils permettant d'utiliser la DTD LinuxDoc pour
  gnrer des documents du LDP, faites le moi savoir.



  44..66..  LLeess bbaasseess ddee CCVVSS

  Le LDP est en train de mettre un place un accs CVS pour les auteurs.
  Il y a, en effet, de bonnes raisons d'utiliser CVS :



  1. CVS gre une sauvegarde des documents. Si vous passer un document 
     un autre auteur, il peut rcuprer le document depuis CVS et
     continuer  travailler dessus. Si vous avez besoin de revenir sur
     une ancienne version, vous pouvez aussi la rcuprer.


  2. C'est formidable si plusieurs auteurs travaillent sur le mme
     document. Vous pouvez demander  CVS de vous indiquez qu'elles
     modifications ont tes faites pendant que vous travailliez sur le
     document, et directement intgrer ces changements.

  3. CVS garde un rapport des modifications du document. Ce rapport peut
     tre plac automatiquement dans le fichier si vous utilisez
     certaines balises qui seront analyses avant l'interprteur SGML.

  4. Il peut servir, grce  un programme,  mettre  jour le site web
     du LDP automatiquement, ds qu'un document a t termin et reu.
     Ce n'est pas encore en place, mais a ne va pas tarder.


  Si CVS est quelque chose de nouveau pour vous, voici quelques pages
  web qui pourront vous aider :



  1. http://www.sourcegear.com/CVS/Docs/blandy
     <http://www.sourcegear.com/CVS/Docs/blandy>

  2. https://wroclaw.art.pl/~ser/docs/cvs.html
     <https://wroclaw.art.pl/~ser/docs/cvs.html>


  44..77..  OObbtteenniirr uunn ccoommppttee CCVVSS

  D'abord, il vous faudra obtenir un compte dans le repository CVS du
  LDP (NdT: lieu de stockage et de dpt des documents pour CVS).  C'est
  souvent le rpertoire racine qui est utilis par CVS, o chaque projet
  (HOWTO, Mini-HOWTO, ...) dispose d'un sous-rpertoire.


  Vous devrez crer un mot de passe crypt et un identifiant
  d'utilisateur pour votre compte. Ce mot de passe vous permet d'envoyer
  un mot de passe crypt au groupe CVS sans qu'ils aient besoin de
  connatre votre mot de passe. Vous pouvez le faire par les commandes
  suivantes, depuis un shell bash (ou sh) :



  $ echo votre_mot_de_passe | perl -e "print crypt(<>, join




  (NdT: je conseille un

  ; echo



  depuis un shell et que la rponse ne semble pas s'afficher)


  Envoyez la sortie de cette commande avec l'identifiant d'utilisateur 
  cvsadmin@cvslist.linuxdoc.org <mailto:cvsadmin@cvslist.linuxdoc.org>.
  Votre CVSROOT unique sera crer et vous recevrez un e-mail avec la
  rponse.


  Quand vous obtiendrez la rponse, connectez vous sur votre CVSROOT et
  vrifiez que tout est configur correctement :



  $ export CVSROOT=:pserver:your_userid@cvs.linuxdoc.org:/cvsroot
  $ cvs -d $CVSROOT login




  (Remplacez CVSROOT par ce qui vous a t indiqu dans la rponse.)


  On vous demandera votre mot de passe, et vous aurez accs au
  repository CVS en mode lecture-criture. Une fois que vous aurez
  utilis login et obtenu accs au systme, votre mot de passe est
  stock dans .cvsroot et vous n'aurez plus besoin d'utiliser cvs login.
  Positionner CVSROOT correctement et c'est parti.


  Vous pouvez obtenir le repository linuxdoc en entier avec cette
  commande :


  $cvs get linuxdoc




  Ou vous pouvez obtenir le fichier source SGML de votre propre document
  par :


  $ cvs get linuxdoc/src/VOTRE-HOWTO.sgml
  $ cvs get linuxdoc/minisrc/VOTREDOC.sgml




  Une liste des changements est galement disponible. C'est un e-mail
  envoy  chaque changement dans le repository. Remarquez que cel peut
  devenir une liste  trs grand dbit. Vous pouvez vous y abonner en
  envoyant un e-mail vide  commits-subscribe@cvslist.linuxdoc.org. Vous
  pouvez annuler votre abonnement en envoyant un e-mail vide  commits-
  unsubscribe@cvslist.linuxdoc.org .


  44..88..  AAuuttrreess iinnffoorrmmaattiioonnss ssuurr CCVVSS

  44..88..11..  AAccccss CCVVSS aannoonnyymmee

  L'accs CVS anonyme (en lecture seule) est disponible par :




  $ cvs -d :pserver:cvs@anoncvs.linuxdoc.org:/cvsroot login




  Utilisez "cvs" comme mot de passe. Vous pouvez alors accder aux
  modules linuxdoc comme dcrit ci-dessus. Notez que les changement
  apparaissent sur le site cvs anonyme environ une demi-heure aprs le
  site principal.


  44..88..22..  FFiicchhiieerrss CCVVSS vviiaa llee wweebb

  Vous pouvez accder au repository CVS par le web  l'adresse
  http://cvsweb.linuxdoc.org/index.cgi/linuxdoc
  <http://cvsweb.linuxdoc.org/index.cgi/linuxdoc>.


  44..88..33..  AAccccss ggrraapphhiiqquuee  CCVVSS

  Il existe des interfaces graphiques pour CVS, et vous en trouverz une
  liste sur le site http://freshmeat.net/appindex/
  <http://freshmeat.net/appindex/>. Cherchez CVS.


  44..99..  CCVVSS eett llaa mmiissee  jjoouurr ddeess ffiicchhiieerrss

  CVS reconnait une balise spciale que vous pouvez utiliser pour
  insrer la date et la version automatiquement dans votre document.
  C'est la balise $Id$. En mettant cette balise dans la section <date>
  (par exemple), elle sera modifie  chaque changement du document,
  permettant une incrmentation automatique de la version.


  Quand vous voulez copier votre fichier modifi sur le serveur CVS,
  utilisez la commande cvs ci -m "commentaires" YOUR-HOWTO.sgml. Le
  paramtre -m "commentaires" n'est pas obligatoire, mais si vous ne le
  mettez pas, vous serez ammen dans votre diteur (certainement vi, ou
  l'diteur indiqu par la variable d'environnement EDITOR) et devrez
  taper un commentaire  propos des changements. Si vous dcidez
  d'utiliser un diteur plutt que de spcifier le commentaire sur la
  ligne de commande, il se peut qu'il faille quelques (plus de 5)
  secondes pour finir ce qu'il y avait  faire et effectuer la mise 
  jour.


  Vous pouvez suivre toutes les discussions  propos de CVS sur la liste
  ldp-discuss. Pour l'instant, les soumissions LDP doivent toujours tre
  envoyes  ldp-submit.


  55..  DDiissttrriibbuueerr vvoottrree ddooccuummeennttaattiioonn

  55..11..  AAvvaanntt llaa ddiissttrriibbuuttiioonn

  Avant de distribuer votre prose  des millions de lecteurs potentiels,
  il y a quelques petites choses  faire.


  D'abord, vrifiez le bon franais de votre texte. La plupart des
  outils que vous utiliserez pour crire en SGML (Emacs, LyX, et les
  autres diteurs de texte) disposent de modules de vrification de
  l'orthographe. Si ce n'est pas le cas, il y a toujours ISPELL,
  disponible dans toutes les distributions. Utilisez aussi sgmlchek pour
  vrifier la cohrence de vos balises SGML.

  Deuximement, faites relire votre document par quelqu'un d'autre que
  vous pour obtenir des commentaires et d'ventuelles corrections. La
  documentation publie par le LDP a besoin d'tre la plus correcte
  possible, car des millions d'utilisateurs de Linux peuvent avoir
  besoin de la lire. Si vous faites partie d'une liste de discussion
  parlant du sujet trait, demandez aux autres intervenants de vous
  aider.


  Troisimement, crez un site web o vous pourrez distribuer vos
  ralisations. Ce n'est pas indispensable, mais trs utile pour
  retrouver la source originale du document.


  55..22..  NNoottiioonnss ddee ccooppyyrriigghhtt eett ddee lliicceennccee

  Pour qu'un document soit accept par le LDP, il doit utilis une
  licence qui en autorise une distribution et une publication libre. En
  tant qu'auteur, vous pourrez conserver le copyright et ajouter
  d'autres restrictions (par exemple, vous devez approuver toutes
  traductions ou travaux drivs). Une version simple d'une licence est
  disponible  l'adresse http://www.linuxdoc.org/COPYRIGHT.html. Si vous
  choisissez d'utiliser ce copyright, placez le dans votre code source
  dans une section intitule "Copyright et licence" o quelque chose
  dans ce genre. Incluez galement une clause de proprit (puisque vous
  en serez le propritaire). Si vous tes un nouveau responsable d'un
  HOWTO qui existait dj, vous devez inclure les clauses de copyright
  de(s) l'ancien(s) auteur(s) et la priode o ils ont maintenu le
  document,  moins qu'ils aient distribu leur document dans le Domaine
  Publique quand ils en ont arrt la maintenance.


  55..33..  UUnnee ffooiiss qquuee vvoottrree ddooccuummeenntt aa tt rreelluu eett qquuee vvoouuss aavveezz pprriiss eenn
  ccoommppttee lleess ccoommmmeennttaaiirreess ddeess rreelleecctteeuurrss,, vvoouuss ppoouuvveezz ssoouummeettttrree vvoottrree
  tteexxttee aauu LLDDPP.. EEnnvvooyyeezz uunn ee--mmaaiill llddpp--ssuubbmmiitt@@lliissttss..lliinnuuxxddoocc..oorrgg..
  IInnddiiqquueezz llee nnoomm dduu HHOOWWTTOO ddaannss llee ssuujjeett dduu mmaaiill,, eett ddccrriivveezz lleess
  cchhaannggeemmeennttss qquuee vvoouuss aavveezz ffaaiitt ((rrccrriittuurree mmaajjeeuurree oouu ccoorrrreeccttiioonnss ddee
  ffaauutteess dd''oorrtthhooggrraapphhee ......)) ddaannss llee ccoorrppss dduu mmeessssaaggee,, eenn yy jjooiiggnnaanntt
  vvoottrree ddooccuummeenntt.. CCeell ppeerrmmeett aauuxx mmaaiinntteenneeuurrss ddee ffaaiirree lleeuurr ttrraavvaaiill pplluuss
  rraappiiddeemmeenntt,, eett ddee nnee ppaass aavvooiirr  ttrroopp aatttteennddrree aavvaanntt qquuee vvoottrree HHOOWWTTOO
  nnee ssooiitt ddiissppoonniibbllee ssuurr llee ssiittee wweebb dduu LLDDPP..  SSii vvoouuss nn''aavveezz ppaass ddee
  rrppoonnssee ddaannss lleess 77 jjoouurrss ssuuiivvaanntt,, rreennvvooyyeezz uunn mmaaiill ppoouurr ssaavvooiirr ssii
  vvoottrree HHOOWWTTOO  bbiieenn tt ttrraaiitt..  SSoouummiissssiioonn aauu LLDDPP

  66..  CCoonnsseeiillss ddee ssttyyllee

  Ceci n'est pas un guide complet sur comment crire une bonne
  documentation (pour l'instant), mais considrez le comme une liste
  rapide de conseils pour vous aider tout au long de la rdaction.



    Etre clair. Tout le monde doit comprendre de quoi vous parl.

    Utiliser des exemples quand c'est possible. Cela aide  comprendre
     de quoi vous parl.

    Etre organis. Ne pas sauter  des sujets sans lien dans une mme
     section.


  Vous pourrez obtenir beaucoup d'autres conseils sur le style du LDP 
  l'adresse http://www.linuxdoc.org/HOWTO/LDP-Style-Guide.html.



  77..  FFAAQQ  pprrooppooss dduu LLDDPP

  77..11..  JJee ddssiirree aaiiddeerr llee LLDDPP.. CCoommmmeenntt ppuuiiss--jjee llee ffaaiirree ??

  La faon la plus simple, c'est de trouver un sujet et d'en faire un
  document. Regardez galement la liste des HOWTO non maintenus et voyez
  s'il n'y en a pas un que vous pourriez continuer.


  77..22..  lliivvrree.. CCoommmmeenntt eesstt pprroottgg llee ccoonntteennuu dduu LLDDPP ??  JJee vvoouuddrraaiiss ppuubb
  lliieerr uunn eennsseemmbbllee ddee ddooccuummeennttss dduu LLDDPP ddaannss uunn

  Rfrez vous  la page http://www.linuxdoc.org/COPYRIGHT.html.


  77..33..  ccoorrrriiggeerr ??  JJ''aaii ttrroouuvv uunnee eerrrreeuurr ddaannss uunn ddooccuummeenntt dduu LLDDPP..
  PPuuiiss--jjee llee

  Contactez l'auteur du document, o le coordinateur et informez le du
  problme en lui donnant une ventuelle correction.














































Voir Liste-des-HOWTO

  HOWTO Compatibilit Linux <-> Matriel
  Patrick Reijnen, <antispam.iharware_howto@antispam.reij
  nen.nl.com (enlevez "antispam")>
  v99.3, 28 Septembre 1999

  Ce document donne une liste de la plupart des matriels compatibles
  avec Linux et vous aide  rechercher les pilotes ncessaires.
  Traduction : Jacques Chion <Jacques.Chion@wanadoo.fr>.  Merci  Chris
  tian Gillot et Denis Arnaud pour leurs corrections pertinentes.
  ______________________________________________________________________

  Table des matires






















































  1. Introduction

     1.1 Message de bienvenue
     1.2 Copyrights
     1.3 Architectures systmes

  2. Micro-ordinateurs/cartes mres/BIOS

     2.1 Systmes spcifiques/cartes mres/BIOS
     2.2 Non-supports

  3. Portables

     3.1 Portables spcifiques
     3.2 PCMCIA

  4. Processeurs/Coprocesseurs (CPU/FPU)

  5. Mmoire

  6. Cartes graphiques

     6.1 Cartes graphiques Diamond
     6.2 SVGALIB (graphiques pour console)
     6.3 XFree86 3.3.2
        6.3.1 Acclres
        6.3.2 Non acclres
        6.3.3 Monochrome
        6.3.4 Pilotes alphas et betas
     6.4 Serveurs S.u.S.E.
     6.5 Serveurs X commerciaux
        6.5.1 Xi Graphics, Inc
        6.5.2 Metro-X 4.3.0

  7. Contrleurs (de disques dur)

     7.1 Pilotes alphas et betas

  8. Contrleurs (de disques durs RAID)

  9. Contrleurs (SCSI)

     9.1 Supports
     9.2 Pilotes alphas et betas
     9.3 Non supports

  10. Contrleurs (d'E/S)

  11. Contrleurs (multiports)

     11.1 Cartes non-intelligentes
        11.1.1 Supportes
     11.2 Les cartes intelligentes
        11.2.1 Supportes
        11.2.2 Pilotes alphas et betas

  12. Extensions rseaux

     12.1 Supportes
        12.1.1 Cartes rseaux (Ethernet)
        12.1.2 RNIS (ISDN)
        12.1.3 Relais de trames
        12.1.4 Sans fil
        12.1.5 X25
        12.1.6 Adaptateurs de poche et de portables
        12.1.7 Sans connecteurs (slot)
        12.1.8 ARCnet
        12.1.9 TokenRing
        12.1.10 FDDI
        12.1.11 Radio-amateur (AX.25)
        12.1.12 Cartes PCMCIA
     12.2 Pilotes alphas et betas
        12.2.1 Cartes rseaux (Ethernet)
        12.2.2 RNIS (ISDN)
        12.2.3 ATM
        12.2.4 Relais de trame
        12.2.5 Sans fil
     12.3 Non supportes

  13. Cartes son

     13.1 Supportes
     13.2 Pilotes alphas et betas
     13.3 Non supportes

  14. Disques durs

     14.1 Non supports

  15. Lecteurs de bandes

     15.1 Supports
     15.2 Pilotes alphas et betas
     15.3 Non supports

  16. Lecteurs de cdroms

     16.1 Supports
     16.2 Autres
     16.3 Remarques

  17. Graveurs de CD

  18. Lecteurs extractibles

  19. Souris

     19.1 Supportes
     19.2 Pilotes alphas et betas
     19.3 Remarques

  20. Modems

  21. Imprimantes et tables traante

     21.1 Ghostscript
        21.1.1 Imprimantes supportes par Ghostscript 5.1
        21.1.2 Pilotes alphas et Betas

  22. Scanners

     22.1 Supports
     22.2 Pilotes alphas et betas
     22.3 Non supports

  23. Autres matriels

     23.1 Radio-Amateur
     23.2 Moniteurs VESA avec Protocole d'conomie d'nergie (DPMS)
     23.3 crans tactiles
     23.4 Terminaux sur port srie
     23.5 Les manches  balai (joystick)
     23.6 Cartes d'acquisition vido / Capture d'images / Tuner TV
     23.7 Camra digitale
        23.7.1 Supports
        23.7.2 Non supports
     23.8 Onduleurs
     23.9 Cartes multifonctions
     23.10 Acquisition de donnes
     23.11 Interfaces horloge chien de garde (Watchdog timers interfaces)
     23.12 Divers

  24. Sources d'informations

  25. Remerciements

  26. Annexe A. Cartes S3  supportes par XFree86 3.3.x.

  27. Annexe B. Cartes PCMCIA supportes

     27.1 Cartes rseaux (Ethernet)
     27.2 Adaptateurs Fast Ethernet (10/100baseT)
     27.3 Adaptateurs Token Ring
     27.4 Adaptateurs rseaux sans fils
     27.5 RNIS (ISDN)
     27.6 Modems et cartes sries
     27.7 Cartes mmoire
     27.8 Adaptateurs SCSI
     27.9 Adaptateurs ATA/IDE cdrom
     27.10 Cartes multi-fonctions
     27.11 Lecteurs de cartes ATA/IDE
     27.12 Cartes interface IDE/ATA
     27.13 Cartes port parallle
     27.14 Cartes diverses
     27.15 En cours ...
     27.16 Non supports

  28. Annexe C. Dispositifs supports sur le port parallle

     28.1 Carte rseaux (Ethernet)
     28.2 Disques durs
     28.3 Lecteurs de bandes
     28.4 Lecteurs de cdroms
     28.5 Disques extractibles
     28.6 Adaptateurs IDE
     28.7 Adaptateurs SCSI
     28.8 Camra digitale
     28.9 Cartes port parallle PCMCIA

  29. Annexe D. Dispositifs Plug and Play

  30. Annexe E. Matriel incompatible avec Linux

  31. Glossaire



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  NNBB:: USB n'est pas encore support par Linux. (NdT : commence 
  apparatre avec les noyaux 2.3.x, mais non recommand pour ceux qui
  ont des problmes cardiaques ...)




  11..11..  MMeessssaaggee ddee bbiieennvveennuuee

  Bienvenue sur cet HOWTO. Ce document donne la liste de la plupart des
  matriels compatibles avec Linux (sauf les ordinateurs avec composants
  intgrs), ainsi en lisant ce document vous pourrez choisir les
  composants de votre ordinateur Linux personnel. tant donn que la
  liste des composants supports par Linux crot rapidement, ce document
  ne sera jamais complet. Donc, si des composants ne sont pas mentionns
  dans ce document, la seule raison est que j'ignore s'ils sont
  supports. Je n'ai simplement pas trouv de support concernant ce
  composant et/ou personne ne m'a apport d'informations le concernant.

  Les paragraphes intituls  Les pilotes alphas et betas  donnent la
  liste des matriels avec des pilotes alphas ou betas dans diffrentes
  conditions d'utilisation.  Enfin, notez que certains pilotes
  n'existent que dans des noyaux au stade alpha.  Aussi, si vous voyez
  quelque chose de compatible, mais qui n'est pas dans votre version de
  noyau Linux, mettez-le  niveau.

  Certains priphriques sont supports avec des modules qui ne sont
  disponibles que sous forme binaire ; vitez-les autant que possible.
  Les modules binaires sont compils pour UNE VERSION DU NOYAU DONNE.
  Le code source de ces modules n'est pas disponible. Cela peut vous
  empcher de mettre  niveau ou de maintenir votre systme.
  Linus Torvalds a dit :  J'autorise l'utilisation de modules binaires,
  mais je veux que les gens sachent qu'ils ne sont compatibles _qu'avec_
  la version du noyau avec laquelle ils furent compils .
  Voir  <http://www.kt.opensrc.org/kt19990211_5.html#10> pour avoir des
  informations sur la disponibilit des codes source concernant les
  composants.  La dernire version de ce document se trouve sur le site
  <http://users.bart.nl/~patrickr/hardware-howto/Hardware-HOWTO.html>,
  sunsite et tous les sites miroirs habituels. Les traductions de ce
  document, ainsi que celles des autres HOWTO se trouvent sur les sites
  <http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations> et
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations>.

  (NDT : Le site de rfrence franais est
  <ftp://ftp.lip6.fr/pub/linux/french>)


  Si vous avez connaissance d'(in)compatibilits qui ne sont pas
  mentionnes ici, dites-le moi. Envoyez-moi un courrier.

  Toujours besoin d'aide aprs avoir lu ce document ? Consultez le site
   Contruisez votre propre PC   l'adresse
  <http://www.verinet.com/pc/>.

  Vous voulez un systme prconfigur avec Linux ? Jetez un oeil sur le
  site  <http://www.linuxresources.com/web/>.

  11..22..  CCooppyyrriigghhttss

  Copyright 1997, 1998, 1999 Patrick Reijnen

  Cet HOWTO est une documentation libre de droits ; vous pouvez la
  rediffuser et/ou la modifier sous les termes de la GNU General Public
  License telle qu'elle est publie par la Free Software Foundation ;
  soit la version 2 de la licence, ou (suivant vos dsirs) toute version
  ultrieure.

  Ce document est diffus en esprant qu'il sera utile, mais sans aucune
  garantie ; mme sans la garantie implicite de pouvoir tre
  commercialis ou d'adquation pour un usage spcifique. Voir la
  General Public License pour plus de dtails. Vous pouvez obtenir une
  copie de cette dernire en crivant  la Free Software Foundation,
  Inc., 675 Mass. Av., Cambridge, MA 02139, USA.  Si vous utilisez cet
  HOWTO, ou tout autre dans une distribution commerciale, ce serait
  sympathique d'en envoyer un exemplaire  titre gracieux aux auteurs.


  11..33..  AArrcchhiitteeccttuurreess ssyyssttmmeess

  Ce document ne traite que des systmes Intel, pour les autres vrifiez
  sur :

    ARM Linux
     <http://www.arm.uk.linux.org/>

    Linux/68k
     <http://www.clark.net/pub/lawrencc/linux/index.html>

    Linux/8086 (le sous-ensemble de noyau linux insrable)
     <http://www.linux.org.uk/ELKS-Home/index.html>

    Linux/Alpha
     <http://www.azstarnet.com/~axplinux/>

    Linux/MIPS
     <http://www.linux.sgi.com>

    Linux/PowerPC
     <http://www.linuxppc.org/>

    Linux pour Acorn
     <http://www.ph.kcl.ac.uk/~amb/linux.html>

    Linux pour PowerMac
     <http://ftp.sunet.se/pub/os/Linux/mklinux/mkarchive/info/index.html>


  22..  MMiiccrroo--oorrddiinnaatteeuurrss//ccaarrtteess mmrreess//BBIIOOSS

  Les bus ISA, VLB, EISA et PCI sont tous supports.



  22..11..  SSyyssttmmeess ssppcciiffiiqquueess//ccaarrtteess mmrreess//BBIIOOSS


    Les systmes IBM PS/2 MCA Sont supports depuis la version 2.0.7 du
     noyau, mais uniquement avec les distributions stables de ce
     dernier. Pour obtenir des informations, vous pouvez regarder la
     page d'accueil de Micro Channel Linux (
     <http://www.dgmicro.com/defaut.htm>). Des logiciels pour les
     sytmes MCA se trouvent sur le site
     <http://www.dgmicro.com/linuxmca>.  De plus des informations sur le
     sous-systme MCA SCSI peuvent tre trouves sur le site
     <http://www.uni-mainz.de/~langm000/linux.html>.

    La carte mre EFA E5TX-AT pose problme, mais celui-ci est
     rsoluble avec la distribution RedHat Linux 5.0 et probablement
     avec d'autres versions. Il ramore spontanment lors de la
     dtection du matriel. Pour le rsoudre, passez  la version 1.01
     du BIOS. La mise  jour du BIOS se trouve sur <
     http://www.efacorp.com/download/Motherboard/e5tx101.exe>.

    La carte mre Edom MP080 ncessite un flash du BIOS pour pouvoir
     travailler avec Linux. Sans ce flashage Linux ramorcera durant
     l'examen du matriel. Pour le flash du BIOS, voir
     <http://www.edom.com/tech/tech.htm> et
     <http://www.edom.com/download>.

    La carte-mre Zida 6MLX avec la puce PII Intel LX est indique
     comme tant oprationnelle avec Linux uniquement si on supprime le
     cache PII dans le BIOS. Une mise  jour du BIOS ne rsout pas ce
     problme. Les symptmes sont un ramorage alatoire pendant ou
     juste aprs l'amorce du systme.

     Beaucoup de cartes PCI provoquent un certain nombre de messages
     d'erreurs lors de la dtection des dispositifs PCI au moment du
     dmarrage. La procdure indique le message suivant:

         Warning : Unknown PCI device (8086:7100). Please read include/linux/pci.h


  Il vous est recommand de consulter le fichier pci.h. Il y est men
  tionn ce qui suit :

  PROCDURE RELATIVE AUX NOUVEAUX DISPOSITIFS PCI
  Nous essayons de collecter des informations sur les nouveaux dispositifs PCI
  en utilisant la procdure standard d'identification PCI. Si des messages
  d'avertissement apparaissent lors de l'amorage du systme,
  merci de mentionner :
      -/proc/pci
      -une description exacte de votre matriel. Essayez de trouver quel
  dispositif n'est pas reconnu. Cela peut tre un circuit de votre carte-mre,
  la passerelle PCI-CPU ou PCI-ISA.
      -si vous pouvez trouver les informations exactes dans la notice de votre
  matriel, essayez de trouver les rfrences du circuit se trouvant sur la carte.
      -envoyez le tout  linux-pcisupport@cao-vlsi.ibp.fr, et j'ajouterai
  votre dispositif dans la liste ds que possible.

            AVANT d'envoyer un courrier, merci de vrifier les dernires
  distributions linux afin d'tre sr qu'il n'a pas t rcemment ajout.

            Merci
                Frederic Potter



  Normalement, votre carte-mre et vos dispositifs PCI inconnus
  devraient fonctionner correctement.



  22..22..  NNoonn--ssuuppppoorrttss


    Supermicro P5MMA avec BIOS versions 1.36, 1.37 et 1.4. Linux ne
     dmarre pas avec ces cartes mres. Une nouvelle (beta) version du
     BIOS, compatible avec Linux est disponible sur le site
     <ftp.supermicro.com/mma9051.zip>.

    Supermicro P5MMA98. Linux ne dmarre pas sur cette carte-mre. Une
     nouvelle (beta) version du BIOS compatible avec Linux se trouve sur
     <ftp.supermicro.com/a98905.zip>.

    La carte mre ExpertColor TX531 V1.0 de DataExpert Corp. avec la
     puce ACER M1531 (Date: 9729, TS6) et ACER M1543 (Date: 9732 TS6)
     semble donner des erreurs de segmentation de manire alatoire, des
     oops noyau ainsi que des blocages avec le noyau lors d'une
     utilisation intensive et d'un accs au lecteur de bandes. Le
     problme semble provenir du bus PCI, et plus prcisment de la puce
     ACER.




  33..  PPoorrttaabblleess

  Pour avoir plus d'informations concernant Linux et les portables, le
  site suivant est un bon point de dpart.

    Page d'accueil Linux et portables
     <http://www.cs.utexas.edu/users/kharker/linux-laptop/>

  D'autres informations relatives aux portables peuvent tre trouves
  sur les sites suivants :


    Avanced Power Management
     <ftp://ftp.cs.unc.edu/pub/users/faith/linux/>

    tat de la batterie des ordinateurs portables
     <ftp://metalab.unc.edu/pub/Linux/system/power/>

    Curseur non-clignotant
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/console/noblink-1.7.tar.gz>

    Autres informations gnrales
     <ftp://tsx-11.mit.edu/pub/linux/packages/laptops/>


  33..11..  PPoorrttaabblleess ssppcciiffiiqquueess


    Compaq Concerto (pilot par crayon)
     <http://www.cs.nmsu.edu/~pfeiffer/>

    Compaq Contura Aero
     <http://domen.uninett.no/~hta/linux/aero-faq.html>

    IBM ThinkPad
     <http://peipa.essex.ac.uk/tp-linux/tp-linux.html>

    IBM Thinkpad 770 (srie des)
     <http://resources.inw.com/linux/thinkpad770>

    NEC Versa M et P
     <http://www.santafe.edu:80/~nelson/versa-linux/>

    Tadpole P1000
     <http://www.tadpole.com/support-trdi/plans/linux.html>

    Tadpole P1000 (un autre)

    TI TravelMate 4000M
     <ftp://ftp.biomath.jussieu.fr/pub/linux/TM4000M-mini-HOWTO.txt.Z>

    TI TravelMate 5100

    Toshiba Satellite Pro 400CDT
     <http://terra.mpikg-teltow.mpg.de/~burger/T400CDT-Linux.html>


  33..22..  PPCCMMCCIIAA


    PCMCIA
     <http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html>

  Les pilotes PCMCIA supportent les contrleurs PCMCIA usuels, comme les
  circuits Databool TCIC/2, Intel i82365SL, Cirrus PD67xx et Vadem
  VG-468. Le contrleur Motorola 6AHC05GA, utilis dans certains
  portables Hyundai, n'est pas support.  Voir l'annexe B pour la liste
  des cartes PCMCIA supportes.



  44..  PPrroocceesssseeuurrss//CCoopprroocceesssseeuurrss ((CCPPUU//FFPPUU))

  Intel/AMD/Cyrix 386SX/DX/SL/DXL/SLC, 486SX/DX/SL/SX2/DX2/DX4 sont
  supports.  Intel Pentium, Pentium Pro et Pentium II, Pentium III
  (normal ou versions Xeon) ainsi que le Celeron fonctionnent aussi. AMD
  K5 et K6 vont bien, bien que les versions anciennes de K6 doivent tre
  vites car elles sont bogues. Dsactiver le "cache interne" dans le
  BIOS peut tre un chappatoire.  AMD K6-2 et K6-3 fonctionnent
  galement. Quelques K6-2 300 Mhz de premire gnration ont des
  problmes avec les puces systme. Le Cyrix 6x86 fonctionne sans
  problme.

  Les processeurs IDT Winchip C6-PSME2006A sont galement supports (
  <http://www.winchip.com>).

  Linux possde une mulation FPU si vous n'avez pas de coprocesseur
  arithmtique.  Le support SMP (processeurs multiples) est inclus 
  partir du 1.3.31. Consultez les pages du projet Linux/SMP pour les
  dtails et les mises  jour.

    Projet Linux/SMP
     <http://www.linux.org.uk/SMP/title.html>

  Les effets multimdias inclus dans le Cyrix MediaGX ne sont pas
  supports.

  Quelques AMD 486DX de premire gnration peuvent se bloquer dans
  certaines situations. Tous les processeurs rcents devraient convenir,
  et pouvoir changer les vieux CPU ne devrait pas poser de problmes.

  La srie des coprocesseurs ULSI possde un bogue dans les instructions
  FSAVE et FRSTOR provoquant des problmes avec tous les systmes
  oprant en mode protg.  Cela peut aussi tre le cas pour quelques
  vieux IIT et Cyrix.

  Il y a des problmes concernant le  TLB flushing  des circuits UMC
  U5S. Ils sont rsolus dans les nouveaux noyaux.


    activer le cache sur les processeurs Cyrix
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/CxPatch030.tar.z>

    logiciel Cyrix de contrle de cache
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/linux.cxpatch>

    rglages du registre du CPU Cyrix 5x86
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cx5x86mod_1.0c.tgz>


  55..  MMmmooiirree

  Toutes les mmoires telles que DRAM, EDO et SDRAM peuvent tre
  utilises avec Linux. Il y a une seule chose  laquelle vous devez
  faire attention : normalement le noyau ne supporte pas plus de 64 Mo
  de mmoire. Lorsque vous ajoutez plus de 64 Mo de mmoire, vous devez
  ajouter la ligne suivante  votre fichier de configuration LILO :


     append="mem=<nombre de Mo>M"


  Ainsi lorsque vous avez 96 Mo de mmoire, cela devient


    append="mem=96M"



  Ne tapez pas un nombre suprieur  celui que vous avez rellement.
  Cela peut produire des plantages imprvisibles.


  66..  CCaarrtteess ggrraapphhiiqquueess

  Linux peut travailler avec toutes les cartes graphiques en mode texte,
  les cartes VGA qui ne sont pas cites ci-dessous devant pouvoir tre
  utilises avec des pilotes VGA monochromes ou standards.

  Si vous voulez acheter une carte vido conomique pour tourner sous X,
  gardez  l'esprit que les cartes acclres (ATI Mach,ET4000/W32p, S3)
  sont _b_e_a_u_c_o_u_p plus rapides que les cartes partiellement ou non
  acclres (Cirrus, WD).

   32 bpp  signifie, en ralit, 24 niveaux de bits aligns sur les
  limites de 32 bits. Cela ne signifie _p_a_s que les cartes peuvent donner
  32 niveaux de bits, c'est toujours 24 bits (soit 16 777 216 couleurs).
  Les modes en 24 bits compacts ne sont pas supports dans XFree86, ds
  lors les cartes pouvant travailler en mode couleur 24 bits sur
  d'autres systmes peuvent ne pas en tre capables sous X. Parmi ces
  cartes on trouve les Mach32, Cirrus 542x, ET4000, S3 801/805/868/968
  et d'autres.

  Le support pour les cartes AGP (Accelerated Graphics Port) progresse
  rapidement.  La plupart des serveurs X (ceux disponibles librement, et
  les versions commerciales) ont plus ou moins un support de l'AGP.


  66..11..  CCaarrtteess ggrraapphhiiqquueess DDiiaammoonndd

  La plupart des cartes Diamond rcentes _s_o_n_t supportes par la version
  actuelle de XFree86.  Les vieilles cartes Diamond ne sont pas
  supportes par XFree86, mais il existe des moyens pour les faire
  marcher. Diamond coopre maintenant activement avec le projet XFree86.


  66..22..  SSVVGGAALLIIBB ((ggrraapphhiiqquueess ppoouurr ccoonnssoollee))


    VGA

    EGA

    ARK Logic ARK1000PV/2000PV

    ATI VGA Wonder

    ATI Mach32

    Cirrus 542x, 543x

    OAK OTI-037/67/77/87

    S3 (support limit)

    Trident TVGA8900/9000


    Tseng ET3000/ET4000/W32


  66..33..  XXFFrreeee8866 33..33..22



  66..33..11..  AAccccllrreess


    ARK Logic ARK1000PV/VL, ARK2000PV/MT

    ATI Mach8

    ATI Mach32 (16 bpp support avec les cartes avec RAMDAC ATI68875,
     AT&T20C49x, BT481 et avec 2 Mo de ram vido)

    ATI Mach64 (16/32 bpp support pour avec RAMDAC ATI68860, ATI68875,
     CH8398, STG1702, STG1703, AT&T20C408, 3D Rage II, interne, IBM
     RGB514)

    Chips & Technologies 64200, 64300, 65520, 65525, 65530, 65535,
     65540, 65545, 65546, 65548, 65550, 65554

    Cirrus Logic 5420, 542x/5430 (16 bpp), 5434 (16/32 bpp), 5436,
     544x, 546x, 5480, 62x5, 754x

    Diamond Viper 330

    Gemini P1 (puce ET 6000)

    IBM 8514/A

    IBM XGA-I, XGA-II

    IIT AGX-010/014/015/016 (16 bpp)

    Matrox MGA2064W (Millennium)

    Matrox MGA1064SG (Mystique)

    Number Nine Imagine I128

    Oak OTI-087

    S3 732 (Trio32), 764 (Trio64), Trio64V+, 801, 805, 864, 866, 868,
     86C325 (ViRGE), 86C375 (ViRGE/DX), 86C385 (ViRGE/GX), 86C988
     (ViRGE/VX), 911, 924, 928, 964, 968

    voir l'annexe A pour la liste des cartes S3 supportes

    SiS 86c201, 86c202, 86c205

    Trident 9440, 96xx, Cyber938x

    Tseng ET4000/W32/W32i/W32p, ET6000

    Weitek P9000 (16/32 bpp)

    Diamond Viper VLB/PCI

    Orchid P9000

    Western Digital WD90C24/24A/24A2/31/33


  66..33..22..  NNoonn aaccccllrreess


    Alliance AP6422, AT24

    sries ATI VGA Wonder

    Avance Logic AL2101/2228/2301/2302/2308/2401

    Cirrus Logic 6420/6440, 7555

    Compaq AVGA

    DEC 21030

    Genoa GVGA

    MCGA (320x200)

    MX MX68000/MX68010

    NCR 77C22, 77C22E, 77C22E+

    NVidia NV1

    Oak OTI-037C, OTI-067, OTI-077

    RealTek RTG3106

    SGS Thomson STG2000

    Trident 8800CS, 8200LX, 8900x, 9000, 9000i, 9100B, 9200CXr,
     9320LCD, 9400CXi, 9420, 9420DGi, 9430DGi

    Tseng ET3000, ET4000AX

    VGA (standard VGA, 4 bit, lente)

    Video 7 / Headland Technologies HT216-32

    Western Digital/Paradise PVGA1, WD90C00/10/11/30


  66..33..33..  MMoonnoocchhrroommee


    Hercules mono

    Hyundai HGC-1280

    Sigma LaserView PLUS

    VGA mono


  66..33..44..  PPiillootteess aallpphhaass eett bbeettaass


    EGA (ancien, depuis environ 1992)
     <ftp://ftp.funet.fi/pub/Linux/BETA/Xega/>


  66..44..  SSeerrvveeuurrss SS..uu..SS..EE..



  S.u.S.E. labore un ensemble de serveurs X bass sur le code de
  XFree-86. Ces serveurs X supportent les nouvelles cartes graphiques et
  sont des versions sans bogues pour les serveurs X XFree86. S.u.S.E.
  labore ces serveurs X en collaboration avec XFree86 Project, Inc.
  Ceux-ci seront dans la prochaine version de XFree86. On peut les
  trouver sur le site <http://www.suse.de./index.html>.  l'heure
  actuelle les serveurs X de S.u.S.E. sont disponibles pour les cartes
  suivantes:


    Serveur XSuSE Elsa Gloria

    ELSA GLoria L, GLoria L/MX, Gloria S

    Cartes vido avec le circuit Alliance Semiconductor AT3D (et aussi
     AT25)

    Hercules Stingray 128 3D

    XSuSE NVidia X-Server (avec support PCI et AGP, puce NV1 et
     Riva128)

    ASUS 3Dexplorer

    Diamond Viper 330

    ELSA VICTORY Erazor

    STB Velocity 128

    XSuSE Matrox. Support pour Mystique, Millennium, Millennium II et
     Millennium II AGP

    XSuSE Trident. Support pour le 9685 (y compris ClearTV) et le
     dernier circuit Cyber.

    XSuSE Tseng. W32, W32i ET6100 et support ET6300.


  66..55..  SSeerrvveeuurrss XX ccoommmmeerrcciiaauuxx

  Des serveurs X commerciaux fournissent des supports pour les cartes
  non supportes par XFree86, et peuvent avoir de meilleures
  performances que des cartes supportes par XFree86.  En gnral, ils
  admettent beaucoup plus de cartes que XFree86, aussi je ne citerai que
  les cartes non supportes par XFree86. Contactez directement les
  vendeurs, ou lisez le  Commercial-HOWTO  pour plus d'informations.


  66..55..11..  XXii GGrraapphhiiccss,, IInncc


  Xi Graphics, Inc.  <http://ww.xig.com> (jadis connu sous le nom de X
  Inside, Inc) commercialise trois serveurs X (les cartes supportes
  sont listes par fabricant) :


    Accelerated-X Display Server

    3Dlabs

    300SX

    500TX Glint


    500MX Glint

    Permedia 4MB/8MB

    Permedia II 4MB/8MB

    Actix

    GE32plus 1MB/2MB

    GE32ultra 2MB

    GraphicsENGINE 64 1MB/2MB

    ProSTAR 64 1MB/2MB

    Alliance

    ProMotion-3210 1MB/2MB

    ProMotion-6410 1MB/2MB

    ProMotion-6422 1MB/2MB

    ARK Logic

    ARK1000PV 1MB/2MB

    ARK1000VL 1MB/2MB

    ARK2000PV 1MB/2MB

    AST

    Manhattan 5090P (GD5424) 512KB

    ATI

    3D Xpression 1MB/2MB

    3D Pro Turbo PC2TV 4MB/8MB

    3D Pro Turbo PC2TV 6144

    3D Xpression+ PC2TV 2MB/4MB

    3D Xpression+ 2MB/4MB

    ALL-IN-WONDER 4MB/8MB

    ALL-IN-WONDER PRO 4MB/8MB

    Graphics Ultra (Mach8) 1MB

    Graphics Pro Turbo (Mach64/VRAM) 2MB/4MB

    Graphics Pro Turbo 1600 (Mach64/VRAM) 2MB/4MB

    Graphics Ultra Plus (Mach32) 2MB

    8514/Ultra (Mach8) 1MB

    Graphics Ultra Pro (Mach32) 1MB2MB

    Graphics Vantage (Mach8) 1MB

    VGA Wonder Plus 512KB

    VGA Wonder XL 1MB

    Video Xpression 1MB

    XPERT@Play 4MB/6MB/8MB

    XPERT@Work 4MB/6Mb/8MB

    Video Xpression 2MB

    WinBoost (Mach64/DRAM) 2MB

    WinTurbo (Mach64/VRAM) 2MB

    Graphics Wonder (Mach32) 1MB

    Graphics Xpression 1MB/2MB

    Rage II (SGRAM) 2MB/4MB/8MB

    Rage II+ (SGRAM) 2MB/4MB/8MB

    Rage Pro 2MB/4MB/8MB

    Avance Logic

    ALG2101 1MB

    ALG2228 1MB/2MB

    ALG2301 1MB/2MB

    Boca

    Voyager 1MB/2MB

    Vortek-VL 1MB/2MB

    Colorgraphic

    Dual Lightning 2MB

    Pro Lightning Accelerator 2MB

    Quad Pro Lightning Accelerator 2MB

    Twin Turbo Accelerator 1MB/2MB

    Chips & Technology

    64300 1MB/2MB

    64310 1MB/2MB

    65510 512KB

    65520 1MB

    65530 1MB

    65535 1MB

    65540 1MB

    65545 1MB

    65550 2MB

    82C450 512KB

    82C451 256KB

    82C452 512KB

    82C453 1MB

    82C480 1MB/2MB

    82C481 1MB/2MB

    Cirrus Logic

    GD5402 512KB

    GD5420 1MB

    GD5422 1MB

    GD5424 1MB

    GD5426 1MB/2MB

    GD5428 1MB/2MB

    GD5429 1MB/2MB

    GD5430 1MB/2MB

    GD5434 1MB/2MB

    GD5436 1MB/2MB

    GD5440 1MB/2MB

    GD5446 1MB/2MB

    GD5462 2MB/4MB PCI and AGP

    GD5464 2MB/4MB PCI and AGP

    GD5465 2MB/4MB PCI and AGP

    GD54M30 1MB/2MB

    GD54M40 1MB/2MB

    Compaq

    ProLiant Series 512KB

    ProSignia Series 512KB

    QVision 1024 1MB

    QVision 1280 1MB/2MB

    QVision 2000+ 2MB

    QVision 2000 2MB

    DEC

    DECpc XL 590 (GD5428) 512KB

    Dell

    466/M & 466/ME (S3 805) 1MB

    OnBoard ET4000 1MB

    DGX (JAWS) 2MB

    OptiPlex XMT 590 (Vision864) 2MB

    Diamond

    Fire GL 1000 Pro 4MB/8MB

    Fire GL 1000 4MB/8Mb

    Stealth 3D 2000 2MB/4MB

    Stealth 3D 3000XL 2MB/4MB

    Stealth 64 Graphics 2001 1MB/2MB

    Stealth 64 Graphics 2121XL 1MB/2MB

    Stealth 64 Graphics 2201XL 2MB

    SpeedStar 1MB

    SpeedStar 64 Graphics 2000 1MB/2MB

    SpeedStar 24 1MB

    SpeedStar 24X 1MB

    SpeedStar 64 1MB/2MB

    SpeedStar Hicolor 1MB

    SpeedStar PCI 1MB

    SpeedStar Pro 1MB

    SpeedStar Pro SE 1MB/2MB

    Stealth 1MB

    Stealth 24 1MB

    Stealth 32 1MB/2MB

    Stealth 64 VRAM 2MB/4MB

    Stealth 64 DRAM 1MB/2MB

    Stealth 64 Video VRAM (175MHz) 2MB/4MB

    Stealth 64 Video DRAM 1MB/2MB

    Stealth 64 Video VRAM (220MHz) 2MB/4MB

    Stealth Hicolor 1MB

    Stealth Pro 1MB/2MB

    Stealth SE 1MB/2MB

    Stealth 64 Video 2001TV 2MB

    Stealth 64 Video 2121 1MB/2MB

    Stealth 64 Video 2121TV 1MB/2MB

    Stealth 64 Video 2201 2MB

    Stealth 64 Video 2201TV 2MB

    Stealth 64 Video 3200 2MB

    Stealth 64 Video 3240 2MB/4MB

    Stealth 64 Video 3400 4MB

    Viper 1MB/2MB

    Viper Pro 2MB

    Viper Pro Video 2MB/4MB

    Viper SE 2MB/4MB

    ELSA

    VICTORY 3D 2MB/4MB

    WINNER 1000 1MB/2MB

    WINNER 1000AVI 1MB/2MB

    WINNER 1000ISA 1MB/2MB

    WINNER 1000PRO 1MB/2MB

    WINNER 1000TRIO 1MB/2MB

    WINNER 1000TRIO/V 1MB/2MB

    WINNER 100VL 1MB

    WINNER 2000 2MB/4MB

    WINNER 2000AVI 2MB/4MB

    WINNER 2000AVI/3D 2MB/4MB

    WINNER 2000PRO 2MB/4MB

    WINNER 2000PRO/X 2MB/4MB/8MB

    WINNER 3000-L 4MB

    WINNER 3000-M 2MB

    WINNER 3000-S 2MB

    WINNER 1024 1MB

    WINNER 1280, TLC34075 Palette 2MB

    WINNER 1280, TLC34076 Palette 2MB

    Gloria-XL

    Gloria-MX

    Gloria-L

    Synergy

    Everex

    ViewPoint 64P 1MB/2MB

    VGA Trio 64P 1MB/2MB

    Gateway

    Mach64 Accelerator (Mach64/VRAM) 2MB

    Genoa

    5400 512KB

    8500/8500VL 1MB

    Phantom 32i 8900 2MB

    Phantom 64 2MB

    Hercules

    Dynamite 1MB

    Dynamite Pro 1MB/2MB

    Dynamite Power 2MB

    Dynamite 3D / GL

    Graphite 1MB

    Stingray 64 1MB/2MB

    Stingray Pro 1MB/2MB

    Stringray 1MB

    Terminator 3D 2MB/4MB

    Terminator 64/Video 2MB

    Graphite Terminator Pro 2MB/4MB

    HP

    NetServer LF/LC/LE (TVGA9000i) 512KB

    Vectra VL2 (GD5428) 1MB

    Vectra XM2i (Vision864) 1MB/2MB

    Vectra XU (Vision864) 1MB/2MB

    IBM

    8514/A 1MB

    PC 300 Series (GD5430) 1MB

    PC 300 Series (Vision864) 1MB/2MB

    PC 700 Series (Vision864) 1MB/2MB

    PS/ValuePoint Performance Series (Vision864) 1MB/2MB

    VC550 1MB

    VGA 256KB

    XGA-NI 1MB

    XGA 1MB

    IIT

    AGX014 1MB

    AGX015 1MB/2MB

    Integral

    FlashPoint 1MB/2MB

    Leadtek

    WinFast L2300 4MB/8MB

    Matrox

    Comet 2MB

    Marvel II 2MB

    Impression (MGA-IMP/3/A/H, MGA-IMP/3/V/H, MGA-IMP/3/M/H) 3MB

    Impression Lite (MGA-IMP+/LTE/P) 2MB

    Impression Plus Lite (MGA-IMP+/LTE/V) 2MB

    Millennium (MGA-MIL) 2MB/4MB/8MB

    Millennium 220 (MGA-MIL) 2MB/4MB/8MB

    Millennium PowerDoc (WRAM) 2MB/4MB/8MB

    Millennium II (WRAM) 2MB/4MB/8MB PCI and AGP

    Mystique (MGA-MYS) 2MB/4MB

    Mystique 220

    Matrox (con.t)

    Impression Plus (MGA-IMP+/P, MGA-IMP+/A) 2MB/4MB

    Impression Plus 220 (MGA-IMP+/P/H, MGA-IMP+/A/H) 2MB/4MB

    Impression Pro (MGA-PRO/4.5/V) 4.5MB

    Ultima Plus (MGA-PCI/2+, MGA-VLB/2+) 2MB/4MB

    Ultima (MGA-ULT/2/A, MGA-PCI/2, MGA-VLB/2) 2MB

    Ultima (MGA-ULT/2/A/H, MGA-ULT_2/M/H) 2MB

    Ultima Plus 200 (MGA-PCI/4/200, MGA-VLB/4/200) 4MB

    MaxVision

    VideoMax 2000 2MB/4MB

    Metheus

    Premier 801 1MB

    Premier 928-1M 1MB

    Premier 928-2M 2MB

    Premier 928-4M 4MB

    Micronics

    Mpower 4 Plus (Mach64) 1MB

    MIRO

    miroCRYSTAL 10AD 1MB

    miroCRYSTAL 12SD 1MB

    miroCRYSTAL 12SD 2MB

    miroCRYSTAL 20PV 2MB

    miroCRYSTAL 20SD 2MB

    miroCRYSTAL 20SV 2MB

    miroCRYSTAL 22SD 2MB

    miroCRYSTAL 40SV 4MB

    miroCRYSTAL VR2000 2MB/4MB

    miroMAGIC 40PV 4MB

    miroMAGIC plus 2MB

    miroVIDEO 12PD 1MB/2MB

    miroVIDEO 20SD 2MB

    miroVIDEO 20SV 2MB

    miroVIDEO 20TD 2MB

    miroVIDEO 22SD 2MB

    miroVIDEO 40SV 4MB

    NEC

    Versa P Series 1MB

    Nth Graphics

    Engine/150 2MB

    Engine/250 2MB

    Number Nine

    GXE Level 10, AT&T 20C491 Palette 1MB

    GXE Level 10, Bt485 or AT&T20C505 Palette 1MB

    GXE Level 11 2MB

    GXE Level 12 3MB

    GXE Level 14 4MB

    GXE Level 16 4MB

    GXE64 1MB/2MB

    GXE64pro 2MB/4Mb

    GXE64pro (-1600) 2MB/4MB

    Imagine 128 2MB

    Image 128 (-1280) 4MB

    Image 128 Series 2 (DRAM) 2MB/4Mb

    Image 128 Pro (-1600) 4MB/8MB

    Image 128 Series 2 (VRAM) 2MB/4MB/8MB

    Image 128 Series III (Revolution 3D) (WRAM) 8MB/16MB PCI and AGP

    Revolution 3D "Ticket to Ride" (WRAM) 8MB/16MB PCI and AGP

    9FX Motion331 1MB/2MB

    9FX Motion531 1MB/2MB

    9FX Motion771 2MB/4MB

    9FX Reality332 2MB

    9FX Reality772 2MB/4MB

    9FX Reality 334 PCI and AGP

    9FX Vision330 1MB/2MB

    Oak Technology

    OTI-067 512KB

    OTI-077 1MB

    OTI-087 1MB

    OTI-107 1MB/2MB

    OTI-111 1MB/2MB

    Orchid

    Farenheit 1280 Plus, ATT20C491 Palette 1MB

    Farenheit 1280 1MB

    Farenheit 1280 Plus, SC15025 Palette 1MB

    Farenheit ProVideo 64 2MB/4MB

    Farenheit Video 3D 2MB

    Kelvin 64 1MB/2MB

    Kelvin Video64 1MB/2MB

    P9000 2MB

    Packard Bell

    Series 5000 Motherboard 1MB

    Paradise

    8514/A 1MB

    Accelerator 24 1MB

    Accelerator Value card 1MB

    Bahamas 64 1MB/2MB

    Bali 32 1MB/2MB

    VGA 1024 512KB

    VGA Professional 512KB

    Pixelworks

    WhrilWIN WL1280 (110MHz) 2MB

    WhrilWIN WL1280 (135MHz) 2MB

    WhirlWIN WW1280 (110MHz) 2MB

    WhirlWIN WW1280 (135MHz) 2MB

    WhrilWIN WW1600 1MB

    Radius

    XGA-2 1MB

    Reveal

    VC200 1MB

    VC300 1MB

    VC700 1MB

    S3

    ViRGE 2MB/4MB

    ViRGE/DX  2MB/4MB

    ViRGE/GX  2MB/4MB

    ViRGE/GX /2 2MB/4MB

    ViRGE/VX  2MB/4MB

    Trio32 1MB/2MB

    Trio64 1MB/2MB

    Trio64V+ 1MB/2MB

    Trio64V2/DX 1MB/2MB

    Trio64V2/GX 1MB/2MB

    801 1MB/2MB

    805 1MB/2MB

    Vision864 1MB/2MB

    Vision866 1MB/2MB

    Vision868 1MB/2MB

    911 1MB

    924 1MB

    928 1MB

    928 2MB/4MB

    Sierra

    Falcon/64 1MB/2MB

    Sigma

    Legend 1MB

    SPEA/V7

    Mercury P64 2MB

    Storm Pro 4MB

    ShowTime Plus 2MB

    STB

    Evolution VGA 1MB

    Horizon Plus 1MB

    Horizon VGA 1MB

    Horizon 64 1MB/2MB

    Horizon 64 Video 1MB/2MB

    Horizon Video 1MB

    LightSpeed 2MB

    LightSpeed 128 2MB

    Nitro 3D 2MB/4MB

    Nitro 64 1MB/2MB

    Nitro 64 Video 1MB/2MB

    PowerGraph VL-24 1MB

    PowerGraph X-24 1MB

    PowerGraph 64 3D 2MB

    PowerGraph 64 1MB/2MB

    PowerGraph 64 Video 1MB/2MB

    PowerGraph Pro 2MB

    Velocity 3D 4MB

    Velocity 64V 2MB/4MB

    Toshiba

    T4900CT 1MB

    Trident

    TGUI9400CXi 1MB/2MB

    TGUI9420DGi 1MB/2MB

    TGUI9440 1MB/2MB

    TGUI9660 1MB/2MB

    TGUI9680 1MB/2MB

    TVGA8900B 1MB

    TVGA8900C 1MB

    TVGA8900CL 1MB

    TVGA8900D 1MB

    TVGA9000 512KB

    TVGA9000i 512KB

    TVGA9200CXr 1MB/2MB

    Tseng Labs

    ET3000 512KB

    ET4000 1MB

    ET6000 2MB/4MB

    VGA/16 (ISA) 1MB

    VGA/16 (VLB) 1MB/2MB

    VGA/32 1MB/2MB

    ET4000/W32 1MB

    ET4000/W32i 1MB/2MB

    ET4000/W32p 1MB/2MB

    VLSI

    VL82C975 (AT&T RAMDAC) 2MB

    VL82C975 (BrookTree RAMDAC) 2MB

    VL82C976 (Internal RAMDAC) 2MB

    Western Digital

    WD90C00 512KB

    WD90C11 512KB

    WD90C24 1MB

    WD90C26 512KB

    WD90C30 1MB

    WD90C31 1MB

    WD90C33 1MB

    WD9510-AT 1MB

    Weitek

    P9100 2MB

    P9000 2MB

    W5186 1MB

    W5286 1MB


    Serveur X Accelerated-X pour portables

    Broadax

    NP8700 (Cyber 9385)

    Chips & Technology

    65510 512KB

    65520 1MB

    65530 1MB

    65535 1MB

    65540 1MB

    65545 1MB


    65554 2MB/4MB

    65555 2MB

    Cirrus Logic

    GD7541 1MB/2MB

    GD7543 1MB/2MB

    GD7548 2MB

    Compaq

    LTE 5400 (Cirrus Logic CL5478)

    Presario 1090ES (NM 2093)

    Dell

    Latitude XPi 896 (NeoMagic 2070)

    Latitude XPi (NM 2070)

    Latitude XPi CD 1MB (NM 2090)

    Latitude LM (NM 2160)

    Latitude CP (NM 2160)

    Inspiron 3000 (NM 2160)

    Digital (DEC)

    HiNote VP (NeoMagic 2090)

    Fujitsu

    Lifebook 435DX (NeoMagic 2093)

    Gateway 2000

    Solo 2300 (NeoMagic 2160)

    Solo 2300 SE (NM 2160)

    Solo 9100 (C&T 65554)

    Solo 9100XL (C&T 65555)

    Hewlett Packard

    OmniBook 800 (NM 2093)

    Hitachi

    Notebook E133T (NeoMagic 2070)

    IBM

    VGA 256KB

    Thinkpad 380D (NeoMagic 2090)*

    Thinkpad 385ED (NeoMagic 2090)*

    Thinkpad 560E (Cyber 9382)

    Thinkpad 760XD (Cyber 9385)

    Thinkpad 770 (Cyber 9397)

    Micron

    TransPort XKE (NeoMagic 2160)

    Millenia Transport (Cirrus Logic GD7548)

    NEC

    Versa P Series 1MB

    Versa 6230 2MB (NeoMagic 2160)

    NeoMagic

    MagicGraph128 / NM2070 896

    MagicGraph128 / NM2070

    MagicGraph128V / NM2090

    MagicGraph128V+ / NM2097

    MagicGraph128ZV / NM2093

    MagicGraph128XD / NM2160

    Sony

    VAIO PCG-505 (NeoMagic 2097)

    Toshiba

    T4900CT 1MB

    Tecra 740CDT (C&T 65554)

    Trident

    Cyber 9397

    Cyber 9385

    Cyber 9382

    Twinhead

    Slimnote 9166TH (Cyber 9385)

     * De nombreux clients de XiG ont confirm le support.

    Multi-head Accelerated-X Display Server



  66..55..22..  MMeettrroo--XX 44..33..00

  Metro Link <sales@metrolink.com>.

  Cartes supportes:

    ATI 3D RAGE (3D RAGE)

    ATI 3D RAGE II (3D RAGE II)

    ATI ALL-IN-WONDER PRO AGP (3D RAGE PRO)

    ATI ALL-IN-WONDER PRO PCI (3D RAGE PRO)

    ATI Graphics Pro Turbo (Mach64)

    ATI Graphics Ultra (Mach8)

    ATI Graphics Xpression (Mach64)

    ATI Mach32 (Mach32)

    ATI Mach64 (Mach64)

    ATI VGA STEREO-F/X (ATI 28800)

    ATI Winturbo PCI (Mach64)

    ATI XPERT@Play (3D RAGE PRO)

    ATI XPERT@Play AGP (3D RAGE PRO)

    ATI XPERT@Work (3D RAGE PRO)

    ATI XPERT@Work AGP (3D RAGE PRO)

    Diamond Fire GL 1000Pro (PERMEDIA 2)

    Diamond SpeedStar 24X (Western Digital 90C31)

    Diamond SpeedStar Pro SE (Cirrus 5430)

    Diamond Stealth 24 (S3 801)

    Diamond Stealth 32 (ET4000/W32p)

    Diamond Stealth 3D 2000 (S3 ViRGE)

    Diamond Stealth 64 (S3 964, Bt485KPJ135)

    Diamond Stealth 64 DRAM (S3 Trio64)

    Diamond Stealth 64 DRAM (SDAC) (S3 864, S3 SDAC)

    Diamond Stealth 64 Graphics 2000 Series (S3 864, S3 SDAC)

    Diamond Stealth 64 Graphics 2200 (S3 Trio64)

    Diamond Stealth 64 VRAM (S3 968, IBM RGB526CF22)

    Diamond Stealth 64 Video 3000 Series (S3 968, TI 3026-175)

    Diamond Stealth 64 Video VRAM (S3 968, TI 3026-175)

    Diamond Stealth Video (SDAC) (S3 868, S3 SDAC)

    Diamond Stealth Video 2000 Series (S3 868, S3 SDAC)

    Diamond Viper (110 MHz RAMDAC) (P9000)

    Diamond Viper (135 MHz RAMDAC) (P9000)

    ELSA GLoria Synergy (PERMEDIA 2)

    ELSA Victory 3D (S3 ViRGE)

    ELSA WINNER 2000 Office AGP (PERMEDIA 2)

    ELSA Winner 1000 TRIO/V (S3 Trio64V+)

    ELSA Winner 2000 AVI (S3 968, TI 3026-175)

    ELSA Winner 2000 PRO/X-2, -4 (S3 968, TI 3026-220)

    ELSA Winner 2000 PRO/X-8 (S3 968, IBM RGB528CF25)

    EPS Apex L-200 (C&T 65550)

    ATI 28800

    Alliance ProMotion

    Ark 2000

    Avance Logic 22xx/23xx/24xx

    Chips & Technologies

    Cirrus 5420

    Cirrus 5422/5424

    Cirrus 5426/5428

    Cirrus 5429

    Cirrus 5430

    Cirrus 5434

    Cirrus 5436

    Cirrus 5446

    Cirrus 5462

    Cirrus 5462/5465

    Cirrus 5480

    Cirrus 62x5

    Cirrus 6410/6412/6420/6440

    Cirrus 754x

    ET3000

    ET4000/W32P

    ET4000AX

    ET6000

    Mach32

    Mach64

    Mach8

    P9000

    PERMEDIA 2

    S3 864/868/924/928/964

    S3 968

    S3 Trio64

    S3 Trio64V+

    S3 ViRGE

    S3 ViRGE/GX/DX

    SiS 86c201/86c202/86c205

    Trident (TGUI9440)

    Trident (TGUI96xx)

    Trident8900

    VGA

    Western Digital SVGA

    Genoa Phantom 64 (S3 Trio64V+)

    Genoa WindowsVGA 8500VL (Cirrus 5426)

    Hercules Dynamite 128/Video (ET6000)

    Hercules Dynamite 3D/GL (PERMEDIA 2)

    Hercules Dynamite 3D/GL AGP (PERMEDIA 2)

    Hercules Stingray (Avance Logic 2301)

    Hercules Stingray 128/3D (Alliance ProMotion AT3D)

    Hercules Stingray 64 (Ark 2000)

    Hercules Terminator 3D (S3 ViRGE/DX)

    IBM VGA

    Matrox Marvel (ET4000)

    Matrox Marvel II (ET4000)

    Matrox Millennium (MGA Storm)

    Matrox Millennium II AGP (MGA 2164, TI 3026-250)

    Matrox Millennium II PCI (220 MHz) (MGA 2164, TI 3026-220)

    Matrox Millennium II PCI (250 MHz) (MGA 2164, TI 3026-250)

    Matrox Mystique (MGA 1064)

    Matrox Mystique 220 (MGA 1164)

    Number Nine GXE64 (S3 864)

    Number Nine Imagine 128 (Imagine 128)

    Number Nine Imagine 128 Series 2 (Imagine 128 Series 2)

    Number Nine Motion 531 (S3 868)

    Number Nine Motion 771 (S3 968)

    Number Nine Revolution 3D (Ticket to Ride)

    Number Nine Vision 330 (S3 Trio64)

    Orchid Kelvin 64 (Cirrus 5434)

    SPEA Mirage Video (S3 Trio64V+)

    STB NITRO 3D (S3 ViRGE/GX)

    STB/Symmetric GLyder MAX-2 (PERMEDIA 2)

    Sigma Designs VGA Legend (ET4000)

    Tech Source Raptor (Imagine 128 Series 2)

    Trident 64-Bit Providia 9685

    Trident 8900 (Trident 8900)

    Trident 9440 (TGUI9440-2)

    V PCI-53 (Cirrus 5434)

  77..  CCoonnttrrlleeuurrss ((ddee ddiissqquueess dduurr))

  Linux fonctionne avec les contrleurs standards IDE, MFM et RLL. Quand
  on utilise des contrleurs MFM/RLL, il est important d'utiliser ext2fs
  avec l'option de vrification des blocs dfectueux si l'on formate le
  disque.

  Les interfaces EIDE sont supportes. On peut aller jusqu' deux
  interfaces IDE avec quatre disques durs et/ou lecteurs de cdroms.
  Linux dtecte les interfaces EIDE suivantes:


    CMD-640 (Support pour les interfaces bogues dans les noyaux 2.2)

    DTC 2278D

    FGI/Holtek HT-6560B VLB (Support pour l'interface secondaire dans
     les noyaux 2.2)

    RZ1000a (Support pour les interfaces bogues dans les noyaux 2.2)

    Triton I (82371FB) (avec busmaster DMA)

    Triton II (82371SB) (avec busmaster DMA)

  Les contrleurs ESDI mulant l'interface ST-506 (MFM/RLL/IDE) sont
  aussi supports. Le commentaire prcdent concernant la vrification
  des blocs dfectueux s'applique ici aussi.

  Les contrleurs 8 bits XT marchent galement.


  Le dmarrage IDE/ATAPI est fourni avec le pr-patch-2.0.31-3.


  77..11..  PPiillootteess aallpphhaass eett bbeettaass


    Interfaces UMC 8672 (au stade exprimental dans les noyaux 2.2)

    Carte interface cache Promise DC4030VL (support exprimental dans
     les noyaux 2.2)


  88..  CCoonnttrrlleeuurrss ((ddee ddiissqquueess dduurrss RRAAIIDD))


    Contrleur cache IDE PCI Tekram D690CD (avec miroitement et cache
     RAID niveau 1)

    Contrleur de miroitement de disque IDE DupliDisk ARCO Inc.
     Support des disques ATA, IDE, E-IDE et UDMA. Les contrleurs
     disponibles peuvent tre insrs dans les connecteurs ISA et PCI,
     et de manire directe dans les contrleurs IDE. De plus, des units
     de montage 3,5 pouces et 5,25 pouces sont disponibles, ce qui
     permet de les monter dans les baies de disque adquates.  Plus
     d'informations sur le site  <http://www.arcoide.com>. Soyez
     certains de possder au moins la version 3.00 du logiciel intgr.

    Contrleurs RAID Mylex
     Plus d'informations sur le site
     <http://www.dandelion.com/Linux/DAC960.html>


  99..  CCoonnttrrlleeuurrss ((SSCCSSII))

  Il est important d'envisager l'utilisation d'un contrleur SCSI avec
  soin.  Beaucoup de contrleurs conomiques ISA SCSI ont t conus
  pour piloter des cdroms plutt qu'autre chose. De tels contrleurs ne
  sont pas meilleurs qu'un IDE.  Regarder le SCSI-HOWTO et jetez un coup
  d'oeil sur ses performances avant d'en acheter un.


  99..11..  SSuuppppoorrttss


    AMI Fast Disk (VVLLBB//EEIISSAA (compatible avec BusLogic)

    Adaptec AVA-1502E (IISSAA//VVLLBB) (AIC-6360) (_A_H_A_1_5_2_0)

    Adaptec AVA-1505/1515 (IISSAA) (compatible avec Adaptec 152x)

    Adapatec AVA-1825 (VVLLBB) (compatible avec AHA-152x)
     Cette carte possde des sorties SCSI, EIDE et disquette qui
     fonctionnent trs bien.

    Adaptec AHA-1510/152x (IISSAA//VVLLBB) (AIC-6260/6360)

    Adaptec AHA-154x (IISSAA) (tous modles)

    Adaptec AHA-174x (EEIISSAA) (en mode amlior (enhanced mode))

    Adaptec AHA-274x/274xT (EEIISSAA) (AIC-7771). La 274xT est supporte
     depuis la srie des noyaux 2.1.x (_A_H_A_2_7_4_0

    Adaptec AHA-284x (VVLLBB) (AIC-7770) (_A_H_A_2_7_4_0)


    Adaptec AHA-2910B (PPCCII) (depuis les noyaux 2.1.x)

    Adaptec AHA-2920 (PPCCII). Utilisez le pilote Future Domain. On doit
     donner des paramtres  LILO lors de l'utilisation de disques durs.

    Adaptec AHA-2920C (PPCCII)

    Adaptec AHA-2930/U/U2 (PPCCII)

    Adaptec AHA-2940/U/W/AU/UW/U2W/U2/U2B/U2BOEM (PPCCII) (AIC-7861,
     AIC-7871, AIC-7844, AIC-7881, AIC-7884). Quelques-unes ne sont
     supportes que depuis les noyaux 2.1.x (_A_H_A_2_7_4_0)

    Adaptec AHA-2944D/WD/UD/UWD (PPCCII). Quelques-unes ne sont supportes
     que depuis les noyaux 2.1.x (_A_H_A_2_7_4_0)

    Adaptec AHA-2950U2/U2B/U2W

    Adaptec AHA-3940/U/W/UW (PPCCII) (AIC-7872, AIC-7882) (depuis le
     1.3.6). Certaines ne sont supportes que depuis les noyaux 2.1.x

    Adaptec AHA-3950U2B/U2D

    Adaptec AHA-3985U/W/UW (PPCCII) (AIC-7873, AIC-7883). Certaines ne
     sont supportes que depuis les noyaux 2.1.x

    Adaptec contrleurs PPCCII pour AIC-7850, AIC-7855, AIC-7860

    Adaptec cartes contrleurs AIC-777x (EEIISSAA), AIC-785x, AIC-786x,
     AIC-787x (PPCCII), AIC-788x (PPCCII), AIC-789x, AIC-3860. AIC-786x et
     AIC-789x sont supportes depuis les noyaux 2.1.x

    AdvanSys ABP510/5150 Bus-Master (IISSAA)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP5140 Bus-Master (IISSAA) PnP
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP5142 Bus-Master (IISSAA) PnP avec lecteur de disquettes
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP920 Bus-Master (PPCCII)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP930/U Bus-Master (PPCCII//UUllttrraa>>)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP960/U Bus-Master (PPCCII//UULLTTRRAA) MAC/PC
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP542 Bus-Master (IISSAA) avec contrleur de disquette (un
     seul canal)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP742 Bus-Master (EEIISSAA) (un seul canal)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP842 Bus-Master (VVLL) (un seul canal)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP940/U Bus-Master (PPCCII//UUllttrraa) (un seul canal)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP970/U Bus-Master (PPCCII//UUllttrraa) MAC/PC (un seul canal)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP752 Dual Channel Bus-Master (EEIISSAA) (deux canaux)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP852 Dual Channel Bus-Master (VVLL) (deux canaux)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP950 Dual Channel Bus-Master (PPCCII) (deux canaux)
     <http://advansys.com/support/software/os/linux.htm>

    Always IN2000

    AMD AM53C974

    BusLogic FlashPoint LT/DL/LW/DW (BT-930(R), BT-920, BT-932(R),
     BT-950(R), BT-952(R))
     <http://www.dandelion.com/Linux/>

    Compaq Smart Array 2

    DPT PM2001, PM2012A (EATA-PIO)

    DPT Smartcache/SmartRAID Plus, III, IV (IISSAA//EEIISSAA//PPCCII)
     Voyez  <http://www.uni-mainz.de/~neuffer/scsi/dpt/>
     Dans cette catgorie on trouve PM2011, PM2021, PM2041, PM3021,
     PM2012B, PM2022, PM2122, PM2322, PM2042, PM3122, PM3222, PM3322,
     PM2024, PM2124, PM2044, PM2144, PM3224, PM3334

    DTC 3180/3280

    DTC 329x (EEIISSAA) (compatible avec Adaptec 154x)

    Future Domain TMC-16x0, TMC-3260 (PPCCII)

    Future Domain TMC-8xx, TMC-950

    Future Domain TMC-1800, TMC-18C50, TMC-18C30, TMC-36C70

    ICP-Vortex (contrleurs d'ensemble RAID PCI-SCSI (beaucoup de
     niveaux RAID sont supports)
     Des rectificatifs pour Linux 1.2.13 et 2.0.29 sont disponibles sur
     <ftp://icp-vortex.com/download/linux/>. Les contrleurs GDT6111RP,
     GDT6117RP, GDT6127RP, GDT6511RP, GDT6521RP, GDT6517RP, GDT6527RP,
     GDT6537RP et GDT6557RP sont supports. Vous pouvez galement
     utiliser les rectificatifs du pre-patch-2.0.31-4 au pre-
     patch-2.0.31-9.

    ICP-Vortex contrleurs EISA-SCSI (beaucoup de niveaux RAID sont
     supports).
     Des rectificatifs pour Linux 1.2.13 et 2.0.29 sont disponibles sur
     le site <ftp://icp-vortex.com/download/linux/>.  Les contrleurs
     GDT3000B, GDT3000A, GDT3010A, GDT3020A et GDT3050A sont supports.
     Vous pouvez galement utiliser les rectificatifs du pre-
     patch-2.0.31-4 au pre-patch-2.0.31-9.

    Iomega PPA3: adaptateur bus hte SCSI sur port parallle inclus
     dans le lecteur ZIP

    Initio Corp. INI-9090U INI-9100, INI-9100W/A/UW, INI-9200U/UW,
     INI-9400U/UW, INI-9520U/UW, INI-A100U2W

    Initio Corp. INIC-950

    Mylex (anciennement BusLogic) Sries W (PPCCII) (BT-948, BT-958,
     BT-958D)


    Mylex (anciennement BusLogic) Sries C (IISSAA//EEIISSAA//VVLLBB//PPCCII) (BT-946C,
     BT-956C, BT-956CD, BT-445, BT-747C, BT-757C, BT-757CD, BT-545C,
     BT-540CF)

    Mylex (anciennement Buslogic) Sries S (IISSAA//EEIISSAA//VVLLBB) (BT-445S,
     BT-747S, BT-747D, BT-757S, BT-757D, BT-545S, BT-542D, BT-742A,
     BT-542B)

    Mylex (anciennement BusLogic) Sries A (IISSAA//EEIISSAA) (BT-742A,
     BT-542B)

    DPT PM2001, PM2012A (EATA-PIO)

    DPT Smartcache/SmartRAID Modles Plus, III, IV (IISSAA//EEIISSAA//PPCCIIii)
     Allez voir sur le site  <http://www.uni-
     mainz.de/~neuffer/scsi/dpt/>(EATA-DMA)
     Les cartes de cette famille sont: PM2011, PM2021, PM2041, PM3021,
     PM2012B, PM2022, PM2122, PM2322, PM2042, PM3122, PM3222, PM3332,
     PM2024, PM2124, PM2044, PM2144, PM3224, PM3334

    DTC 3180/3280

    DTC 329x (EEIISSAA) (compatible Adaptec 154x)

    Future Domain TMC-16x0, TMC-3260 (PCI)

    Future Domain TMC-8xx, TMC-950

    Future Domain TMC-1800, TMC-18C50, TMC-18C30, TMC-36C70

    Contrleurs d'ensemble de disques PCI-SCSI ICP-Vortex (beaucoup de
     niveaux RAID supports)
     Les rectificatifs pour Linux 1.2.13 et 2.0.29 sont disponibles sur
     le site <ftp://icp-vortex.com/download/linux/>. Les contrleurs
     GDT6111RP, GTD6121RP, GDT6117RP, GTD6127RP, GDT6511RP, GDT6521RP,
     GDT6517RP, GDT6527RP, GDT6537RP et GDT6557RP sont supports. Vous
     pouvez galement utiliser du pre-patch-2.0.31-4 jusqu'au pre-
     patch-2.0.31-9.

    Contrleurs EISA-SCSI ICP-Vortex (beaucoup de niveaux RAID
     supports)
     Des rectificatifs pour Linux 1.2.13 et 2.0.29 sont disponibles sur
     <ftp://icp-vortex.com/download/linux/>. Les contrleurs GDT3000B,
     GDT3000A, GDT3010A, GDT3020A et GDT3050A sont supports. Vous
     pouvez galement utiliser du pre-patch-2.0.31-4 jusqu'au 2.0.31-9.

    Adaptateur bus hte SCSI pour port parallle Iomega PPA3 incorpor
     dans le lecteur ZIP

    Media Vision Pro Audio Spectrum 16 SCSI (IISSAA)

    Cartes d'origine NCR 5380

    NCR 53C400 (Trantor T130B) (utilise le support d'origine SCSI NCR
     5380)

    NCR 53C406a (Acculogic ISApport / Media Vision Premium 3D SCSI)

    NCR 53C7x0 (Le 53C710 n'est support que dans la version PCI)

    NCR 53C810(A), 53C815, 53C820, 53C825(A), 53C860, 53C875, 53C895
     (le 53C895 n'est support que "sur le papier")

    Qlogic / Control Concepts SCSI/IDE (FAS408) (IISSAA//VVLLBB)


    Qlogic FASXXX/FASXX (famille des circuits) (IISSAA//VVLLBB)

    Qlogic IQ-PCI, IQ-PCI-10, IQ-PCI-D (PPCCII) (circuit ISP1020)

    Quantum ISA-200S, ISA-250MG

    Seagate ST-01/ST-02 (IISSAA)

    SIIG Ultrawide SCSI Pro (circuit Initio). Les pilotes de
     priphrique et les rectificatifs  appliquer au noyau sont sur le
     site  <http://www.initio.com/suse.htm>

    SoundBlaster 16 SCSI-2 (compatible Adaptec 152x) (IISSAA)

    Tekram DC-390, DC-390W/U/F

    Trantor T128/T128F/T228 (IISSAA)

    UltraStor 14F (IISSAA), 24F (EEIISSAA), 34F (VVLLBB)

    Western Digital WD7000 SCSI


  99..22..  PPiillootteess aallpphhaass eett bbeettaass


    AM79C974 (PPCCII) (Compaq, HP, Zeos onboard SCSI)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/AM53C974-0.3.tgz>

    Adaptec ACB-40xx SCSI-MFM/RLL bridgeboard
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/adaptec-40XX.tar.gz>

    Always Technologies AL-500
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/al500-0.2.tar.gz>

    Iomega PC2/2B
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/iomega_pc2-1.1.x.tar.gz>

    Ricoh GSI-8
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/gsi8.tar.gz>


  99..33..  NNoonn ssuuppppoorrttss


    Adaptec AHA 2940UW Pro

    Adaptec AAA-13x Adaptateurs RAID

    Adaptec AAA-113x cartes port RAID

    Adaptec AIC-7810

    NCR circuit 53C710 (IISSAA) (vieux circuit, dpass, mais toujours
     utilis dans quelques modles Compaq)

    Cartes DTC non compatibles avec Adaptec (327x, 328x)


  1100..  CCoonnttrrlleeuurrss ((dd''EE//SS))

  Toutes cartes mixtes standards srie/parallle/joystick/IDE.  Linux
  supporte les UART 8250, 16450, 16550 et 16550A. Les cartes qui
  supportent des IRQ non-standards (IRQ >9) peuvent tre utilises.


  Voir la Note d'Application "AN-493" (National Semiconductor) crite
  par Martin S.  Michael (NdT: Voir en francais le site :
  <http://www.national.com/an/AN/AN-493.pdf>. Merci  Julien Vayssire).
  Le paragraphe 5.0 dcrit en dtail les diffrences entre le NS16550 et
  le NS16550A. Brivement, le NS16550 possde des bogues dans les
  circuits FIFO qui ont t corrigs dans le NS16550A (et ceux qui
  suivent). Heureusement, il y a eu trs peu de NS16550 produits par
  National, et il y a longtemps ; ils sont donc trs rares. Beaucoup de
  "16550" sur les cartes modernes viennent de fabricants de circuits
  compatibles, ceux-ci n'ayant pas utilis le suffixe "A" de National.
  De plus, quelques cartes multiports utilisent des 16552 ou 16554, ou
  bien d'autres circuits multiports ou multifonctions de National ou
  autres fabricants.  En conclusion, ne vous en faites pas, sauf si vous
  rencontrez une vieux circuit "NS16550" (sans A), auquel cas traitez-le
  comme un 16450 sans FIFO plutt que comme un 16550A.  - Zhahai Stewart
  <zstewart@hisys.com>


  1111..  CCoonnttrrlleeuurrss ((mmuullttiippoorrttss))

  1111..11..  CCaarrtteess nnoonn--iinntteelllliiggeenntteess

  1111..11..11..  SSuuppppoorrtteess


    AST FourPort et imitations (4 ports)

    Accent Async-4 (4 ports)

    Arnet Multiport-8 (8 ports)

    Bell Technologies HUB6 (6 ports)

    Boca BB-1004, 1008 (4, 8 ports) - sans DTR, DSR, ni CD

    Boca BB-2016 (16 ports)

    Boca IO/AT66 (6 ports)

    Boca IO 2by4 (4 srie/ 2 parallle, utilise 5 IRQs)

    Computone ValuePort (4, 6, 8 ports) (Compatible avec AST FourPort)

    DigiBoard PC/X, PX/Xem, PCI/Xem, EISA/Xem, PCI/Xr (4, 8, 16 ports)

    Comtroll Hostess 550 (4, 8 ports)

    PC-COMM 4-port (4 ports)

    SIIG I/O Expander 4S (4 ports, utilise 4 IRQs)

    STB 4-COM (4 ports)

    Twincom ACI/550

    Usenet Serial Board IIa (4 ports)

  Les cartes non-intelligentes existent gnralement sous deux
  varits : l'une emploie des adresses de port standards et utilise 4
  IRQs, et l'autre, compatible avec AST FourPort, utilise un bloc
  d'adresses slectionnable et seulement une IRQ. (Les adresses et les
  IRQ sont slectionns  l'aide de setserial). Si vous en achetez une,
  vrifiez les normes auxquelles elle se conforme, en sachant qu'il n'y
  a pas de relation avec le prix.


  1111..22..  LLeess ccaarrtteess iinntteelllliiggeenntteess

  1111..22..11..  SSuuppppoorrtteess


    Computone Intelliport II (4/8/16 ports)
     <ftp://ftp.computone.com/pub/bbs/beta/ip2linux-1.0.2.tar.gz>

    Cyclades Cyclom-Y (base sur RISC, 8-32 ports) (IISSAA//PPCCII)
     <http://www.cyclades.com/>

    Cyclades-Z (high-end, 16-64 ports) (PPCCII)
     <http://www.cyclades.com/>

    DigiBoard PC/Xe (IISSAA), PC/Xi (EEIISSAA) et PC/Xeve
     <ftp://ftp.digibd.com/drivers/linux/>

    Cartes sries Equinox SST Intelligent
     <http://www.equinox.com>

    Hayes ESP, versions 1, 2 et 8 ports
     Inclus dans le noyau depuis la version 2.1.15. Le pilote peut tre
     trouv sur le site  <http://www.nyx.net/~arobinso>

    Stallion EasyIO (IISSAA) / EasyConnection 8/32 (IISSAA//MMCCAA) /
     EasyConnection 8/64 (PPCCII)
     Pour les rglages des interrupteurs DIP et les fichiers de
     configuration consultez le site  <http://www.stallion.com>

    Stallion EasyConnection 8/64 (IISSAA//EEIISSAA / ONboard (IISSAA//EEIISSAA//MMCCAA) /
     Brumby / Stallion (IISSAA)
     Le dernier pilote peut tre trouv sur
     <ftp://ftp.stallion.com/drivers/ata5/Linux/v544.tar.gz>


  1111..22..22..  PPiillootteess aallpphhaass eett bbeettaass


    Comtrol RocketPort (8/16/32 ports)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/serial/comtrol-1.04.tar.gz>
     (noyaux 1.2.x). On peut trouver un pilote sur le site
     <http://ftp.leidenuniv.nl/linux/tsx-11/packages/comtrol/>

    DigiBoard COM/Xi
     Contactez Simon Park (si@wimpol.demon.co.uk) ou Mark Hatle
     (fray@krypton.mankato.msus.edu). NB : Les deux adresses semblent ne
     plus exister.

    DigiBoard PC/Xe (ISA) et PC/Xi (EISA)
     <ftp://ftp.digibd.com/drivers/linux/>

    Moxa C102, C104, C168, C218 (8 ports), C320 (8/16/24/32 et
     possiblit d'avoir plus) et enfin C320T
     <ftp://ftp.moxa.com.tw/drivers/linux/>

    RISCom/8

    Specialix SIO/XIO (modulaire, de 4  32 ports)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/serial/sidrv.taz>

    Specialix IO8+
     Contactez devices@BitWizard.nl




  1122..  EExxtteennssiioonnss rrsseeaauuxx

  Les cartes rseaux (Ethernet) sont trs diverses quant  leurs
  performances. En gnral, les plus rcentes sont les meilleures.
  Quelques trs vieilles cartes comme la 3c501 sont utiles uniquement
  parce que l'on peut les trouver  la casse pour pas cher.  Faites
  attention aux imitations, toutes ne sont pas trs bonnes et une
  mauvaise carte peut souvent provoquer des blocages intempestifs sous
  Linux.  Lisez Ethernet-HOWTO,  <http://metalab.unc.edu/LDP/HOWTO>,
  pour une description dtaille des diffrentes cartes.


  1122..11..  SSuuppppoorrtteess

  1122..11..11..  CCaarrtteess rrsseeaauuxx ((EEtthheerrnneett))

  Pour les cartes rseaux possdant la famille de circuits DEC DC21x4x,
  le pilote  Tulip  est disponible. Pour plus d'informations sur ce
  pilote, voir le site
  <http://cesdis.gsfc.nasa.gov/linux/drivers/tulip.html>.


    3Com 3c501 -   fuir comme la peste  (pilote 3c501)

    3Com 3c503 (pilote 3c503), 3c505 (pilote 3c503), 3c507 (pilote
     3c507), 3c509/3c509B (IISSAA) / 3c579 (EEIISSAA)

    3Com Etherlink III Vortex Ethercards (3c590, 3c592, 3c595, 3c597)
     (PCI), 3Com Etherlink XL Boomerang Ethercards (3c900, 3c905) (PPCCII)
     et Cyclone Ethercards (3c905B, 3c980) (pilotes 3c59x) et 3Com Fast
     Etherlink Ethercard (3c515) (IISSAA) (pilotes 3c515)
     Les nouvelles versions de ce pilote sont disponibles sur
     <http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html>
     vitez la carte 3c900 lorsque c'est possible, car le pilote ne
     fonctionne pas bien avec cette carte.

    3Com 3ccfe575 Cyclone Cardbus (pilotes 3c59x)

    3Com 3c575 srie des Cardbus  (pilote 3c59x) (TOUT PCMCIA ?)

    AMD LANCE (79C960) / PCnet-ISA/PCI (AT1500, HP J2405A,
     NE1500/NE2100)

    AT&T GIS WaveLAN

    Allied Telesis AT1700

    Allied Telesis LA100PCI-T

    Allied Telesyn AT2400T/BT (module "ne")

    Ansel Communications AC3200 (EEIISSAA)

    Apricot Xen-II / 82596

    Cabletron E21xx

    Cogent EM110

    Crystal Lan CS8920, Cs8900
     <http://www.cirrus.com/private/drivers/ethernet/edrivers.html>

    Danpex EN-9400

    DEC DE425 (EISA) / DE434/DE435 (PPCCII) / DE450/DE500 (pilote DE4x5)

    DEC DE450/DE500-XA (dc21x4x) (Pilote Tulip)

    DEC DEPCA and EtherWORKS

    DEC EtherWORKS 3 (DE203, DE204, DE205)

    DEC QSilver's (Pilote Tulip)

    Digi International RightSwitch

    DLink DE-220P, DE-528CT, DE-530+, DFE-500TX, DFE-530TX
     Plus d'informations sur le site  <http://www.dlink.ca/linux.html>

    Fujitsu FMV-181/182/183/184

    HP PCLAN (sries 27245 et 27xxx)

    HP PCLAN PLUS (27247B and 27252A)

    HP 10/100VG PCLAN (J2577, J2573, 27248B, J2585) (IISSAA//EEIISSAA//PPCCII)
     Plus d'informations sur le site
     <http://cesdis1.gsfc.nasa.gov:80/linux/drivers/100vg.html>

    ICL EtherTeam 16i / 32 (EEIISSAA)

    Intel EtherExpress

    Intel EtherExpress Pro

    KTI ET16/P-D2, ET16/P-DC ISA (marche sans cavaliers et avec les
     options de configuration matrielle)

    Macromate MN-220P (PnP ou mode NE2000)

    NCR WaveLan

    NE2000/NE1000 (mfiez-vous des imitations)

    Netgear FA-310TX (puce Tulip)

    New Media Ethernet

    PureData PDUC8028, PDI8023

    SEEQ 8005

    SMC Ultra / EtherEZ (IISSAA)

    srie SMC 9000

    SMC PCI EtherPower 10/100 (Pilote Tulip)

    SMC EtherPower II (pilote epic100.c)

    Sun-LANCE adaptateurs (noyaux 2.2 et au-del)

    Sun-Intel adaptateurs (noyaux 2.2 et au-del)

    Schneider & Koch G16

    Western Digital WD80x3

    Adaptateur intgr Zenith Z-Note / IBM ThinkPad 300

    Znyx 312 etherarray (pilote Tulip)

  1122..11..22..  RRNNIISS ((IISSDDNN))


    Linux ISDN WWW page
     Cette page semble avoir disparu ?

    Les outils ISDN4Linux (NdT: ISDN pour Linux) sont disponibles sur
     le site  <ftp://ftp.franken.de/pub/isdn4linux/v2.0>


    3Com Sonix Arpeggio
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/network/sonix.tgz>

    Adaptateur PC ASUSCOM Network Inc.ISDNLink 128k

    AVM A1 (Hisax)

    AVM B1 (avmb1)

    Combinet EVERYWARE 1000 ISDN
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/network/combinet1000isdn-1.02.tar.gz>

    Compaq ISDN S0 (IISSAA) (HiSax)

    Creatix PnP S0 (HiSax)

    Dr. Neuhaus Niccy PnP/PCI (HiSax)

    Dynalink IS64PH (HiSax)

    Eicon.Diehl Diva 2.0 (IISSAA//PPCCII) (interface S0 et U interface, pas de
     version PRO) (HiSax)

    Eicon.Diehl Diva Piccola (HiSax)

    Elsa Microlink PCC-16, PCF, PCF-Pro, PCC-8 (HiSax)

    ELSA QuickStep 1000/1000PCI/3000 (HiSax)

    cartes bases sur la HFC-2BS0 (HiSax)

    IBM Active 2000 (IISSAA) (act2000)

    cartes ICN ISDN (icn)

    Ith Kommunikationstechnik GmbH MIC 16 (ISA) (HiSax)

    ITK ix1-micro Rev.2 (HiSax)

    Octal PCBIT (pcbit)

    Carte Sedlbauer Speed (HiSax)

    TelesSO-8/SO-16.0/SO-16.3/SO-16.3c/SO-16.4 et compatibles (HiSax)

    Traverse Technologie NETjet PCI S0 (HiSax)

    USR Sportster internal TA (HiSax)

     Les cartes RNIS mulant les modems standards ou les adaptateurs
     rseaux (Ethernet) usuels n'ont pas besoin de pilotes spciaux pour
     fonctionner.




  1122..11..33..  RReellaaiiss ddee ttrraammeess


    Adaptateurs synchrones Emerging Technologies Inc (
     <http://www.etinc.com>)

    ET/5025 (1 port, 8-bit IISSAA)

    ET/5025-16 (2 ports, 16-bit IISSAA)

    ET/5025-25 (2 ports, 16-bit IISSAA)

    ET5025pq (4 ports, PPCCII)


  1122..11..44..  SSaannss ffiill


    ZCOM WL2420 ISA
     On peut trouver des informations sur les produits sur le site
     <http://www.zcom.com.tw>. Les fichiers des pilotes pour le noyau
     sont disponibles sur le site
     <www.boerde.de/~matthias/airnet/zcom_v12>


  1122..11..55..  XX2255


    Adaptateurs synchrones Emerging Technologies Inc (
     <http://www.etinc.com>)

    ET/5025 (1 port, 8-bit IISSAA)

    ET/5025-16 (2 ports, 16-bit IISSAA)

    ET/5025-25 (2 ports, 16-bit IISSAA)

    ET/5025pq (4 ports, PPCCII)


  1122..11..66..  AAddaappttaatteeuurrss ddee ppoocchhee eett ddee ppoorrttaabblleess


    Pour plus d'informations sur Linux et l'utilisation du port
     parallle, voyez la page d'accueil  <http://www.torque.net/linux-
     pp.html> ou <http://www.torque.net/parport/>. Voyez en Annexe C une
     liste complte des dispositifs supports sur le port parallle
     (sauf les imprimantes).


  1122..11..77..  SSaannss ccoonnnneecctteeuurrss ((sslloott))


    SLIP/CSLIP/PPP (port srie)

    EQL (quilibrage de charge ligne srie)

    PLIP (port parallle) - avec un  cble null-modem  ou un cble
     bidirectionnel


  1122..11..88..  AARRCCnneett


    fonctionne avec toutes les cartes ARCnet

  1122..11..99..  TTookkeennRRiinngg

  Jetez un coup d'oeil sur le site Token Ring  l'adresse
  <hhtp://www.linuxtr.net>


    3Com 3C619/B/C Tokenlink 16/4 (ibmtr)

    3Com 3C319 Velocity ISA (ibmtr)

    IBM PCI adaptateur token ring

    adaptateur IBM Wake sur Lan TR

    IBM 16/4 TR PCI adaptateur 2, adaptateur 2 Wake sur Lan, adaptateur
     2 Wake sur Lan Special

    IBM High Speedd 100/16/4 token ring

    IBM ISA 16/4, MCA 16/4 (ibmtr)

    Cartes puce IBM Tropic

    Olicom RapidFire 3139, 3140, 3141, 3540
     <http://www.olicom.com>

    Olicom OC-3136, OC-3137, OC-3138, OC-3129
     <http://www.olicom.com>

    Madge Smart 100/16/4 PCI, 16/4 PCI Mk3, 16/4 PCI Mk2
     <http://www.madge.com>

    Madge Presto PCI, 16/4 CardBus
     <http://www.madge.com>

    Syskonnect TR4/16(+) SK-4190 ISA, SK-4590 PCI, SK-4591 PCI (sktr)

  1122..11..1100..  FFDDDDII


    DEC DEFEA (EEIISSAA) / DEFPA (PPCCII) (noyau 2.0.24 et au-del)


  1122..11..1111..  RRaaddiioo--aammaatteeuurr ((AAXX..2255))


    Gracilis PackeTwin

    Ottawa PI/PI2

    La plupart des cartes HDLC  base de 8530


  1122..11..1122..  CCaarrtteess PPCCMMCCIIAA


    Voir l'annexe B pour une liste complte ou bien les pages du site
     de David Hinds
     <http://hyper.standford.edu/HyperNews/get/pcmcia/home.html>


  1122..22..  PPiillootteess aallpphhaass eett bbeettaass




  1122..22..11..  CCaarrtteess rrsseeaauuxx ((EEtthheerrnneett))


    Racal-Interlan NI5210 (circuit Ethernet i82586). Support amlior 
     partir des noyaux 2.2.

    Racal-Interlan NI6510 (circuit Lance am7990). Le dmarrage avec le
     noyau 1.3.66 avec plus de 16 Mo de RAM est support.

    Carte Racal-Interlan PCI (circuit rseau AMD PC 93c970) ??


  1122..22..22..  RRNNIISS ((IISSDDNN))


    SpellCaster's Datacomute/BRI, Telecomute/BRI (IISSAA) (sc)


  1122..22..33..  AATTMM


    adaptateur 155 Mbps Efficient Networks ENI155P-MF (PPCCII)
     <http://lrcwww.epfl.ch/linux-atm/>


  1122..22..44..  RReellaaiiss ddee ttrraammee


    Carte relais de trames Sangoma S502 56K
     <ftp://ftp.sovereign.org/pub/wan/fr/>


  1122..22..55..  SSaannss ffiill


    Proxim RangeLan2 7100 (ISA) / 630x (OEM mmiinnii--IISSAA)
     <http://www.komacke.com/distribution.html>


  1122..33..  NNoonn ssuuppppoorrtteess


    3Com 3C359 Velocity XL PCI

    3Com 3C339 Velocity PCI

    IBM PCI LANStreamer, MCA LANStreamer token ring

    Intel TokenExpress PRO, TokenExpress 16/4

    Cartes Token Ring Sysconnect / Schneider & Koch (toutes)


  1133..  CCaarrtteess ssoonn

  Vous trouverez des informations sur les pilotes et les cartes sons sur
  le site  <http://www.opensound.com/ossfree> ou sur le site
  <http://www.opensound.com/oss.html>.

  1133..11..  SSuuppppoorrtteess


    4Front Technology Virtual Mixer (comprend SoftOSS)

    4Front Technology Virtual Synth (SoftOSS)

    6850 UART MIDI

    A-Plus Sound of Music (OPL3-SA)

    A-Trend Harmony 3Ds751 (PPCCII)

    AcerMagic S23

    Adlib FM synthesizer card

    Adlib MSC 16 PnP (CS4235)

    AMD Interwave reference card

    ARC Probook

    Audio Excell DSP16

    Avance Logic ALS-007, cartes  base de puces.
     Le code ncessaire pour ces puces est intgr dans le pilote Sound
     Blaster 16.  On doit utiliser isapnptools pour la configuration.

    AW32 Pro (R2.2-W2)

    AW35 (CS4237)

    AW37 Pro (CS4235)

    Aztech Sound Galaxy NX Pro, NX Pro 16, WaveRider 32+

    Aztech Washington

    BTC Mozart Sound System

    BTC-1831 Sound Card (Opti 1688)

    Bravo Sound Card (Opti 82C930)

    Bull PowerPc builtin audio

    CDR4235-6/-8

    CS32-3DI

    Compaq Deskpro XL integrated Business Audio

    Creative EMU8000 add on (PnP)

    Creative Phone Blaster 28.8/33.6

    Creative Sound Blaster 1.0 to 2.0

    Creative Sound Blaster Pro

    Creative Sound Blaster 16

    Creative Sound Blaster 16 ASP

    Creative Sound Blaster 16 PnP (du type-1 jusqu'au type-10)

    Creative Sound Blaster 16 Vibra

    Creative Sound Blaster 2.x

    Creative Sound Blaster 32/AWE

    Creative Sound Blaster 32/AWE PnP (du type-1 jusqu'au type-10)

    Creative Sound Blaster AWE64 (du type-1 jusqu'au type-7)

    Creative Sound Blaster AWE64 Gold (type-1 et type-2)

    Creative Sound Blaster PCI64/128

    Creative Sound Blaster AWE64/Gold et 16/32/AWE PnP, ces cartes
     doivent tre actives avec isapnptools

    Creative ViBRA16C/CL/S (type-1 and type-2) PnP

    Creative ViBRA16X PnP (uniquement half duplex)

    CrystaLake Crystal Clear Series 100

    Crystal Audio (CS4235)

    Crystal CRD4236B-1E

    Crystal CRD4237B-5/-8

    Crystal CSC0B35 (CS4236B)

    Crystal CX4237B-SIDE

    Crystal Onboard PnP Audio (CS4235)

    Dell Latidude builtin audio

    Diamond Crystal MM PC/104

    Digital AXP builtin audio

    ECHO-PSS  (Orchid SoundWave32, Cardinal DSP16)

    ESS 1868, 1869 (type-1 et type-2), 1878, 1879, 1968 PnP  AudioDrive

    Ensoniq AudioPCI (ES1371)

    Ensoniq AudioPCI / SoundBlaster PCI (ES1370)

    Ensoniq Soundscape Elite

    Ensoniq Soundscape PnP (model 1 and 2)

    Ensoniq Soundscape S-2000

    Ensoniq Soundscape VIVO, VIVO90

    Ensoniq ActionNote 880 C/CX

    Carte son Gallant ( base SC-6000 et SC-66000)

    Generic AD1815, carte son base sur AD1816 (PnP)

    Carte son base sur Generic CMI8330 (PnP)

    Carte son ou carte mre base sur Generic Crystal CS4232 (non PnP)

    Generic Crystal CS4232 de Acer (mode PnP)

    Generic Crystal CS4232 type-1  type-3 (mode PnP)


    Generic Crystal CS4235 type-1

    Generic Crystal CS4236 (type-1  type-3)

    Carte son ou carte mre base sur Generic Crystal CS4236 (non PnP)

    Generic Crystal CS4236A (type-1 et type-2), CS4236B

    Carte son ou carte mre base sur Generic Crystal CS4237 (non PnP)

    Generic Crystal CS4237B (type-1 et type-2)

    Carte son ou carte mre base sur Generic Crystal CS4238 (non PnP)

    Carte son ou carte mre base sur Generic ESS ES688, ES1688,
     ES1788, ES1868, ES1869, ES1887, ES1888

    Carte son base sur Generic Jazz16

    Generic MAD16 (OPTi 82C928), MAD16 Pro, MAD16 Pro (duplex) (OPTi
     82C929)

    Generic Mozart (circuit OAK OTI-601)

    Carte son base sur Generic OPTi 82C924, 82C925 (PnP)

    Generic OPTi 82C924 (mode non PnP). Utilisez le pilote MSS et les
     outils isapnp

    Generic OPTi 82C930

    Generic OPTi 82C931
     Voir le site  <http://spoke.nols.com/~drees/opti931.html>

    Carte son base sur Generic Soundscape

    Generic Windows Sound System compatible

    Carte son base sur Generic Yamaha OPL3-SA1 (YMF701)

    Carte son base sur Generic Yamaha OPL3-SA2 (type-1, type-3,
     type-4)

    Carte son base sur Generic Yamaha OPL3-SA3

    Carte son base sur Generic Yamaha OPL3-SA2 (type-1, type-3,
     type-4)

    Carte son base sur Generic Yamaha OPL3-SA3

    Generic Yamaha OPL3-SAx (YMF715/YMF719) non-PnP

    Gravis Ultrasound

    Gravis Ultrasound Extreme

    carte fille Gravis Ultrasound chantillonage 16-bit

    Gravis Ultrasound MAX

    Gravis Ultrasound ACE

    Gravis Ultrasound PnP (with RAM), PnP Pro

    HP OmniBook 2100 (CS4236)

    Home Studio 64 (uniquement audio analogique)

    IBM Audio Feature (CS423x)

    Logitech SoundMan Games (SBPro, support stro 44kHz)

    Logitech SoundMan Wave (Jazz16/OPL4)

    Logitech SoundMan 16 (compatible PAS-16)

    Carte audio MED3201

    Maxi Sound 32 PnP (uniquement audio analogique)

    Maxi Sound 64 Dynamic 3D (uniquement audio analogique)

    Media Sound SW/32 (mode non PnP)

    MediaTriX AudioTriX Pro, 3D XG

    Media Vision Premium 3D (Jazz16)

    Media Vision Pro Sonic 16 (Jazz)

    Media Vision Pro Audio Spectrum 16 (PAS-16)

    Media Vision Pro Audio Studio 16

    Media Vision Thunderboard

    Carte Microsoft Windows Sound System  (AD1848)

    MiroSound PCM!-pro

    MultiWave AudioWave Green 16

    Music Quest MIDI connector card (MCC)

    Adaptateur MIDI Music Quest MQX-16, MQX-16S

    Adaptateur MIDI Music Quest MQX-32, MQX-32M MIDI

    Carte MIDI Music Quest PC MIDI

    NEC Harmony

    Orchid SoundDrive 16EZ

    Pine PT201

    Primax SoundStorm FM 16, SoundStorm Wave

    Pro Audio Spectrum 16, Studio 16

    RME Digi32, Digi32 Pro, Digi32/8

    Reveal SC300

    Reveal WaveExtreme Pro (avec RAM)

    Adaptateur Roland MPU IPC-T MIDI

    S3 SonicVibes

    Shark Mako

    Sharp PC8800

    Shuttle Sound System 48

    Spacewalker HOT-255 PCI 3D (PPCCII)

    TerraTec Maestro 32/96

    Terratec EWS64XL (uniquement audio)

    Terratec Sound System Base 1 (AD1816)

    Terratec Sound System Base 64 (AD1816)

    Tomato Sound System (OPTi 82C930)

    Trust Sound Expert De Luxe Wave 32

    Turtle Beach Classic/Tahiti/Monterey

    Turtle Beach Maui

    Turtle Beach Monte Carlo 928, Monte Carlo 929

    Turtle Beach Pinnacle/Fiji

    Turtle Beach Tropez, Tropez Plus (uniquement audio)

    Turtle Beach Daytona (uniquement audio)

    Wearnes Classic 16

    Yamaha Sound Edge SW20-PC

    Zefiro Acoustics ZA2 (NON RECOMMANDE)

    Zenith Z-Player


    Le support d'AWE32/64 a dmarr dans la srie des noyaux 2.1.x
     (voir le mini-HOWTO Soundblaster AWE de Marcus Brinkmann pour les
     dtails d'installation).

    MPU-401 MIDI en mode intelligent (ne pas les configurer 
     l'aveuglette)

    MPU IPC-T

    MQX-32M

    UART MIDI MPU-401 seulement sur port muet (ne pas configurer 
     l'aveuglette)

    Synthtiseurs FM Yamaha (OPL2, OPL3, OPL3-SAx (depuis les noyaux
     2.1.x) et OPL4

  OSS supporte toutes les cartes filles MIDI y compris les Wave Blaster,
  TB Rio et Yamaha DB50XG. La seule contrainte est que la carte  hte 
  soit supporte par OSS. Notez que seule la carte  hte  doit tre
  configure  l'aide de soundconf. La carte fille deviendra
  automatiquement accessible via le port MIDI de la carte  hte .

  1133..22..  PPiillootteess aallpphhaass eett bbeettaass



    Dispositif audio loopback 4Front Tech. Waveloop

    Acer FX-3D (base sur AD1816)

    Carte AVM Apex Pro (base sur AD1816)

    Aztech SC-16 3D (AD1816 based)

    Creative Sound Blaster Vibra16x

    Creative Sound Blaster Live! et Live! Value Edition
     Creative Labs a un pilote beta pour cette carte. Cela marche avec
     les noyaux 2.0.36 et 2.2.5 (et fort vraisemblablement avec les
     noyaux plus rcents de ces sries). On peut tlcharger ces pilotes
     dans le rpertoire des logiciels sur le site
     <http://www.creativelabs.com>

    Highscreen Sound-Boostar 32 Wave 3D (base sur AD1816)

    Highscreen Sound-Boostar 16 (base sur AD1816)

    HP Kayak (base sur AD1816)

    IBM MWave

    Newcom SC-16 3D (base sur AD1816)

    Aztech AZT1008, AZT2320, AZT3000

    haut-parleur du PC / DAC sur port parallle
     <ftp://ftp.informatik.hu-berlin.de/pub/os/linux/hu-sound/>

    Circuit Rockwell WaveArtist

    Sonorus STUDI/O

    SY-1816 (bas sur AD1816)

    Terratec Base 1, Base 64 (bas sur AD1816)

    Terratec EWS64S (bas sur AD1816)

    Turtle Beach MultiSound/Tahiti/Monterey
     <ftp://ftp.cs.colorado.edu/users/mccreary/archive/tbeach/multisound/>

  Pour les cartes qui sont bases sur le circuit AD1816, il est
  ncessaire d'utiliser isapnptools pour la configuration.

  1133..33..  NNoonn ssuuppppoorrtteess


    A-Trend Harmony 3DS724 (PPCCII)

    Actech PCI 388-A3D

    Adaptec AME-1570

    Aureal Vortex (PPCCII)

    Cardinal DSP 16

    Pilotes de bas niveau Contributed

    Crystal CS4614 (PPCCII)


    Cyrix MediaGX builtin audio

    Diamond Monster Sound MX300

    Diamond Sonic Impact

    Dream 94PnP Home Studio

    EON Bach SP901 (A3D)

    ESS (PPCCII)

    ESS Maestro-1 (PPCCII), Maestro-2 (PPCCII)

    ESS Solo-1 (PPCCII)

    Echo Personal Sound System

    Carte son base dur Generic ALS007, ALS100

    Orchid NuSound 3D

    Orchid SoundWave 32

    Paradise DSP-16

    Quicknet Internet LineJACK

    Terratec XLerate (A3D)

    Turtle Beach Montego

    Turtle Beach TBS-2000

    Videologic SonicStorm

    Wearnes Beethoven ADSP-16

    Western Digital Paradise DSP-16

    Yamaha YMF724 (PPCCII)

  Le circuit ASP des SoundBlaster 16 n'est pas support.  Les
  particularits de l'AWE32 (MIDI, effets spciaux) ne sont pas
  supportes.

  Nathan Laredo <laredo@gnu.ai.mit.edu> veut bien mettre au point des
  pilotes pour AWE32 si vous lui envoyez une carte gratuite. Il peut en
  faire de mme pour toute carte, si vous lui en envoyez une  titre
  d'chantillon.

  Les SoundBlasters 16 avec le DSP 4.11 et 4.12 ont un dfaut qui induit
  des notes continues quand on les utilise avec une carte Waveblaster ou
  une autre interface MIDI.  Il n'existe pas de remde connu.


  1144..  DDiissqquueess dduurrss

  Tous les disques durs conviennent si leur contrleur est support.

  Selon le SCSI-HOWTO, tous les dispositifs SCSI  accs direct avec une
  taille de bloc de 256, 512 ou 1024 octets conviennent. Des tailles de
  bloc diffrentes ne conviennent pas. (Notez que ceci peut souvent tre
  rsolu en changeant les tailles de bloc et/ou de secteur avec la
  commande MODE SELECT SCSI).

  Les lecteurs EIDE fonctionnent sans problme avec les nouveaux noyaux.
  La partition d'amorce doit rsider dans les 1024 premiers cylindres,
  en raison des limitations du BIOS PC.

  Certains Conner CFP1060S ont des problmes avec Linux et ext2fs.  Les
  symptmes sont des erreurs d'inode durant e2fsck avec endommagement du
  systme de fichiers.  Conner a publi la solution de ce problme,
  contactez Conner au 1800-4CONNER (US) ou au +44-1294-315333 (Europe).
  Ayez  porte de main la version du microcode (mentionne sur
  l'tiquette, 9WA1.6x) lorsque vous les contactez.

  On rapporte que beaucoup de disques IDE Maxtor et Western Digital ne
  coexistent pas trs bien avec des disques d'autres fabricants sur la
  mme nappe IDE.  Habituellement l'un des disques ne marche pas. La
  solution est de les mettre sur des nappes IDE diffrentes.

  Certains disques Micropolis posent des problmes avec des cartes
  Adaptec et BusLogic, contactez les fabricants pour avoir des circuits
  mis  jour si vous suspectez des problmes.


    Pilote pour unit multiple (RAID-0, RAID-1)
     <ftp://sweet-smoke.ufr-info-p7.ibp.fr/public/Linux/>


  1144..11..  NNoonn ssuuppppoorrttss

  Les disques durs suivants sont mentionns comme non supports par
  Linux. Voyez le rapport de bogue disponible.


    NEC D3817, D3825, D3827, D3847
      Ces disques ne sont pas tout  fait conformes SCSI-2 selon les
     valeurs rapportes dans Mode Sense Page 3. Suivant Mode Sense Page
     3 tous les disques NEC D38x7 donnent leur taille de secteur gale 
     zro. Les disques NEC sont les premiers types de disques que j'ai
     jamais rencontrs qui dclarent leur taille de secteur comme tant
     nulle. Malheureusement, ce n'est pas modifiable et il n'y a pas
     moyen de mettre  jour le microprogramme sur les disques D38x7 en
     vue de corriger ce problme.  On mentionne des problmes avec les
     D3825 et D3827 (les deux version 0407). La version 0410 de ces deux
     disques durs devrait rsoudre ce problme.


  1155..  LLeecctteeuurrss ddee bbaannddeess

  1155..11..  SSuuppppoorrttss


    Lecteur de bandes SCSI
     (Selon le SCSI-HOWTO) Les lecteurs utilisant des blocs de longueur
     fixe ou variable, plus petites que la longueur du tampon (rgle 
     32k dans les sources distribues) sont admis. Thoriquement tous
     les lecteurs fonctionnent (Envoyez un courrier si vous avez
     connaissance de lecteurs incompatibles).

    Seagate Sidewinder 50 AIT (sur contrleur RAID ICP 6527)

    QIC-02

    Iomaga Ditto interne (ftape 3.04c et plus rcents)





  1155..22..  PPiillootteess aallpphhaass eett bbeettaass


    Lecteurs QIC-117, QIC-40/80, QIC-3010/3020 (QIC-WIDE).  La plupart
     des lecteurs utilisant le contrleur de disquette devraient
     marcher.  Plusieurs contrleurs spcialiss (Colorado FC-10/FC-20,
     Mountain Mach-2, Iomega Tape Controller II) sont aussi supports.
     <ftp://metalab.unc.edu/pub/Linux/kernel/tapes>

    Lecteurs de bandes ATAPI
     Pour ceux-ci, un pilote alpha (ide-tape.c) est disponible dans le
     noyau. Les lecteurs de bandes ATAPI supports sont:

    Seagate TapeStor 800

    Lecteur de bandes Conner CTMA 4000 IDE ATAPI Streaming


  1155..33..  NNoonn ssuuppppoorrttss


    Cartes contrleurs Emerald et Tecmar QIC-02 - Chris Ulrich
     <insom@math0ucr.edu>

    Lecteurs se connectant sur le port parallle  (ex : Colorado
     Trakker)

    Quelques contrleurs grande vitesse (Colorado TC-15 / FC-20)

    Irwin AX250L/Accutrak 250 (pas le QIC-80)

    IBM Internal Tape Backup Unit (pas le QIC-80)

    COREtape Light


  1166..  LLeecctteeuurrss ddee ccddrroommss

  Pour plus d'informations sur les pilotes cdroms voyez le CDROM-HOWTO
  sur le site  <http://metalab.unc.edu/LDP/HOWTO>.


  1166..11..  SSuuppppoorrttss


  Pilotes cdrom usuels

    Lecteurs de cdroms SCSI
     (D'aprs le CD-ROM-HOWTO) Tous les cdroms SCSI avec une taille de
     bloc de 512 ou 2048 octets fonctionnent sous Linux ; c'est donc le
     cas de la grande majorit des cdroms du march.

    Lecteurs de cdroms EIDE (ATAPI) (IDECD)
     La plupart des lecteurs double, quadruple et sextuple vitesse sont
     supports, parmi lesquels :

    Mitsumi FX400

    Nec-260

    Sony 55E

  Pilotes cdroms propritaires

    Aztech CDA268-01A, Orchid CDS-3110, Okano/Wearnes CDD-110, Conrad
     TXC, CyCDROM CR520ie/CR540ie/CR940ie (AZTCD)
    Creative Labs CD-200(F) (SBPCD)

    Funai E2550UA/MK4015 (SBPCD)

    GoldStar R420 (GSCD)

    IBM External ISA (SBPCD)

    Kotobuki (SBPCD)

    Lasermate CR328A (OPTCD)

    LMS Philips CM 206 (CM206)

    Longshine LCS-7260 (SBPCD)

    Matsushita/Panasonic CR-521/522/523/562/563 (SBPCD)

    pilote port parallle MicroSolutions Backpack (BPCD)

    Mitsumi CR DC LU05S (MCD/MCDX)

    Mitsumi FX001D/F (MCD/MCDX)

    Optics Storage Dolphin 8000AT (OPTCD)

    Sanyo CDR-H94A (SJCD)

    Sony CDU31A/CDU33A (CDU31A)

    Sony CDU-510/CDU-515 (SOMYCD535)

    Sony CDU-535/CDU-531 (SONYCD535)

    Teac CD-55A SuperQuad (SBPCD)


  1166..22..  AAuuttrreess


    LMS/Philips CM 205/225/202
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cdrom/lmscd.4.tar.gz>

    NEC CDR-35D (ancien)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cdrom/linux-
     neccdr35d.patch>

    Sony SCSI multisession CD-XA
     <ftp://tsx-11.mit.edu/pub/linux/patches/sony-multi-0.00.tar.gz>

    Pilote port parallle
     <http://www.torque.net/linux-pp.html>



  1166..33..  RReemmaarrqquueess


  Tous les lecteurs de cdroms travaillent de manire quivalente pour
  lire des donnes. Par contre, il peut y avoir diffrents problmes de
  compatibilit avec les utilitaires de lecture des cds audio (surtout
  avec certains lecteurs NEC). Ainsi, certains pilotes alphas n'ont pas
  encore de support audio.

  D'anciens lecteurs simple vitesse NEC peuvent avoir des problmes avec
  les nouveaux contrleurs SCSI.
  Le PhotoCD (XA) est support. Le logiciel hpcdtoppm de Hadmut Danisch
  convertit les fichiers PhotoCD au format portable pixmap. On peut
  obtenir ce logiciel sur le site
  <ftp://ftp.gwdg.de/pub/linux/hpcdtoppm> ou dans les utilitaires PBM.

  La lecture des CD video est galement possible dans la srie des
  noyaux 2.1.3x et au-del.  Un correctif est disponible pour le noyau
  2.0.30.  Enfin, la plupart des changeurs de CD-ROM sont supports.


  1177..  GGrraavveeuurrss ddee CCDD


   l'heure actuelle, beaucoup de graveurs de cds sont supports sous
  linux.  Pour en obtenir une liste  jour, vrifiez le mini-HOWTO CD-
  Writing sur le site <http://metalab.unc.edu/LDP/HOWTO/CD-Writing-
  HOWTO.html>, ou <http://www.shop.de/cgi-bin/wini/lsc.pl> ou bien
  <http://www.guug.de:8080/cgi-bin/winni/lsc.pl>. Cdwrite (
  <ftp://metalab.unc.edu/pub/Linux/utils/disk-management/>) et cdrecord
  (
  <http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
  peuvent servir pour graver des cds. Le paquetage X-CD-Roast pour Linux
  est une interface graphique (IG) pour utiliser les graveurs de cds. On
  le trouve  l'adresse <ftp://metalab.unc.edu/pub/Linux/utils/disk-
  management/xcdroast-0.96d.tar.gz>.


    Grundig CDR 100 IPW

    HP CD-Writer+ 7100

    HP SureStore 4020i

    HP SureStore 6020es/i

    JVC XR-W2010

    Kodak PCD 225

    Mitsubishi CDRW-226

    Mitsumi CR-2600TE

    Olympus CDS 620E

    Philips CDD-521/10,522,2000,2600/3610

    Pinnacle Micro RCD-5020/5040

    Plextor CDR PX-24CS

    Ricoh MP 1420C

    Ricoh MP 6200S/6201S

    Sanyo CRD-R24S

    Smart and Friendly Internal 2006 Plus 2.05

    Sony CDU 920S/924/926S

    Taiyo Yuden EW-50

    TEAC CD-R50S


    WPI(Wearnes) CDR-632P

    WPI(Wearnes) CDRW-622

    Yamaha CDR-100

    Yamaha CDR-200/200t/200tx

    Yamaha CDR-400t/400tx


  1188..  LLeecctteeuurrss eexxttrraaccttiibblleess

  Tous les lecteurs SCSI devraient marcher si leur contrleur est
  support, y compris les lecteurs optiques (MO), WORM, floptical,
  Bernouilli, Zip, SyQuest, PD et autres.

    Panasonic MO (combinaison d'un lecteur cdrom et d'un disque optique
     extractible). Vous devez rgler un commutateur lors de la
     configuration du noyau pour que les deux systmes fonctionnent en
     mme temps.

    Lecteurs Zip sur port parallle
     <ftp://gear.torque.net/pub/>

    Avatar Shark-250 port parallle
     <http://www.torque.net/parport/>

     Les lecteurs extractibles fonctionnent comme des lecteurs de
     disquettes, tapez seulement fdisk/mkfs et montez les disques. Linux
     fournit des systmes de verrouillage si votre lecteur le supporte.
     On peut utiliser aussi mtools si les disques sont au format MSDOS.

  Les lecteurs CD-R requirent un logiciel adapt pour fonctionner. Voir
  le Mini-HOWTO adquat.


  Linux supporte les disques ayant 512 et 1024 octets par secteurs. A
  partir du noyau 2.1.32 Linux supporte aussi 2048 octets par secteur.
  Un rectificatif pour le noyau 2.0.30 est disponible sur
  <http://liniere.gen.u-tokyo.ac.jp/2048.html>.  Le support pour 2048
  octets/secteur est ncessaire pour

    Lecteur de disques magnto-optique Fujitsu M2513.

     Les lecteurs internes Zip IDE/ATAPI, les disques optiques et les PD
     sont supports  partir du pre-patch-2.0.31-3.

    Disque optique LS-120

    PD-CD


  1199..  SSoouurriiss

  1199..11..  SSuuppppoorrtteess


    Souris srie Microsoft

    Souris srie Mouse Systems

    Souris srie Logitech Mouseman

    Souris srie Logitech

    ATI XL Inport busmouse

    C&T 82C710 (QuickPort) (Toshiba, TI Travelmate)

    Microsoft busmouse

    Logitech busmouse

    Souris PS/2 (priphrique auxiliaire)


  1199..22..  PPiillootteess aallpphhaass eett bbeettaass


    Sejin J-mouse
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/console/jmouse.1.1.70-jmouse.tar.gz>

    MultiMouse - utilise plusieurs dispositifs souris comme une souris
     unique
     <ftp://metalab.unc.edu/pub/Linux/system/misc/MultiMouse-1.0.tgz>

    Microsoft Intellimouse



  1199..33..  RReemmaarrqquueess

  Les systmes comme Alps Glidepoint marchent galement, tant qu'ils
  sont compatibles avec un autre protocole pour souris.

  Les nouvelles souris Logitech (sauf la Mouseman) utilisent le
  protocole Microsoft pour faire travailler les trois boutons (bien que
  les souris Microsoft n'aient que deux boutons, le protocole en
  autorise trois).

  Le port souris sur les cartes ATI Graphics Ultra et Ultra Pro utilise
  le protocole Logitech (Voir le Busmouse-HOWTO pour les dtails).


  2200..  MMooddeemmss

  Tous les modems internes ou externes connects au port srie. Hlas,
  quelques fabricants ont labors des modems ne fonctionnant qu'avec
  Windows 95. Voir l'annexe E pour la liste des matriels incompatibles
  avec Linux. De plus, beaucoup de modems ne peuvent tre mis  jour
  qu'avec flashage sous Windows95/NT. Ces modems ne peuvent tre mis 
  jour sous Linux.

  Un petit nombre de modems fonctionnent avec un logiciel sous DOS qui
  charge le programme de contrle  la mise en route. On peut les
  utiliser en chargeant le programme sous DOS et en faisant un reset 
  chaud. De tels modems sont  viter, puisque vous ne serez pas capable
  de les utiliser si vous avez un ordinateur autre qu'un PC dans
  l'avenir.

  Les modems PCMCIA devraient fonctionner avec les pilotes PCMCIA.

  Les modems fax ont besoin d'un logiciel appropri pour travailler.
  Aussi soyez certains que la partie fax du modem supporte les classes 2
  ou 2.0. En gnral, il semble avr que, pour tout logiciel de fax
  sous unix, la classe 1.0 ne soit pas disponible.

  Le logiciel Linux efax fait exception  cela, il supporte les modems
  Classe 1 et Classe 2. Il peut y avoir parfois quelques problmes
  techniques (mineurs) avec les modems Classe 1. Si vous avez le choix,
  prenez un modem Classe 2.
    Digicom Connection 96+/14.4+ - Programme de chargement du code DSP
     <ftp://metalab.unc.edu/pub/Linux/apps/serialcomm/smdl-
     linux.1.02.tar.gz>

    Motorola ModemSURFR 56k interne. Ajoutez quelques lignes 
     rc.serial pour prendre en compte les ports et IRQ s'ils ne sont pas
     standards.

    sries ZyXEL U-1496 - ZyXEL 1.4, programme de contrle
     modem/fax/parole
     <http://www.pe1chl.demon.nl/ZyXEL/ZyXEL-1.6.tar.gz>

    Srie ZyXEL Elite 2864 - programme de contrle fax/modem/voix
     <http://www.pe1chl.demon.nl/ZyXEL-1.6.tar.gz>

    ZyXEL Omni TA 128 -programme de contrle modem/fax/voix
     <http://www.pe1chl.demon.nl/ZyXEL-1.6.tar.gz>

  Les cartes multimodems sont galement supportes sous Linux.

    Carte multimodem Moreton Bay RAStel
     voyez  <http://www.moreton.com.au/linux.htm> pour obtenir les
     pilotes Linux.

  Le modem suivant est mentionn comme n'tant pas pas support

    Aztech MDP3858 56.6 (PCI)


  2211..  IImmpprriimmaanntteess eett ttaabblleess ttrraaaannttee

  Toutes les imprimantes et toutes les tables traante connectes au
  port parallle ou au port srie devraient fonctionner. Malheureusement
  certains fabricants fournissent des imprimantes ne fonctionnant
  qu'avec Windows 95.  Voir l'annexe E pour les matriels incompatibles
  avec Linux.

    Sries HP LaserJet 4 - free-lj4, programme de contrle des modes
     d'impression
     <ftp://metalab.unc.edu/pub/Linux/system/printing/free-
     lj4-1.1p1.tar.gz>

    Interface port parallle BiTronics
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/misc/bt-
     ALPHA-0.0.1.module.patch.gz>

    Epson Stylus Color 850. utilisez l'un des filtres
     'stylus800-filter', 'stylus_color_360dpi-filter' ou
     'stylus_color_720dpi-filter'.


  2211..11..  GGhhoossttssccrriipptt

  Beaucoup de programmes Linux produisent des fichiers PostScript.
  Certaines imprimantes non PostScript peuvent muler PostScript Niveau
  2 en utilisant Ghostscript.

    Ghostscript
     <ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/>


  2211..11..11..  IImmpprriimmaanntteess ssuuppppoorrtteess ppaarr GGhhoossttssccrriipptt 55..11


    Apple Imagewriter

    Imprimante matricielle Apple

    Apple StyleWriter 2x00 (_b_j_c_6_0_0)

    Brother HL-660 (_l_j_e_t_4)

    C. Itoh M8510

    Canon BubbleJet BJ10e, BJ20 (_b_j_1_0_e)

    Canon BubbleJet BJ100, BJ200, BJ-210 (NB uniquement), BJ-240 (NB
     uniquement), BJC-250 (NB uniquement), BJC-70 (NB uniquement)
     (_b_j_2_0_0)

    Canon BubbleJet BJC-600, BJC-610, BJC-4000, BJC-4100 (NB
     uniquement), BJC-4200, BJC-4300, BJC-4400, BJC-4550, BJC-210,
     BJC-450, MultiPASS C2500, BJC-240, BJC-70 (_b_j_c_6_0_0)

    Canon BubbleJet BJC-800, BJC-7000 (_b_j_c_8_0_0)

    Canon Bubblejet BJC-610 (_u_n_i_p_r_i_n_t)

    Canon LBP-8II, LIPS III

    DEC LA50/70/75/75plus

    DEC LN03, LJ250 (_d_e_c_l_2_5_0)

    Epson 9 pin, 24 pin, sries LQ, AP3250

    Epson Stylus Color/Color II/400/500/500/800 (_s_t_c_o_l_o_r)

    Epson Stylus Color/Color II/500/600/800/1520 (_u_n_i_p_r_i_n_t)

    Fujitsu 3400,2400,1200

    HP 2563B

    HP DesignJet 650C

    HP DeskJet, DeskJet Plus (_d_e_s_k_j_e_t)

    HP DeskJet 500, DeskJet Portable (_d_j_e_t_5_0_0)

    HP DeskJet 400/500C/540C/690C/693C (cdj500)

    HP Deskjet 500C (_c_d_e_s_k_j_e_t)

    HP Deskjet 550C (_u_n_i_p_r_i_n_t)

    Hp Deskjet 400/500C/520C/540C/690C/693C (_c_d_j_5_0_0)

    HP DeskJet
     550C/560C/600/660C/660Cse/682C/683C/693C/694C/695C/850/870Cse
     (_c_d_j_5_5_0)

    HP DeskJet 850/855/870Cse/870Cxi/890C/672C/680/1100C (_c_d_j_8_5_0)

    HP DeskJet 500C/510/520/5540C/693C imprimante Noir et Blanc
     uniquement (_c_d_j_m_o_n_o)

    HP DeskJet 600 (_l_j_4_d_i_t_h)

    HP DeskJet 600/870Cse, LaserJet 5/5L/6L (_l_j_e_t_4)


    HP Deskjet 600/1200C/1600C (_p_j_x_l_3_0_0)

    HP DeskJet 500/500C/510/520/540/550C/560C/850C/855C et autres
     imprimantes PCL3
     <ftp://ftp.pdb.sni.de/pub/utilities/misc/hpdj-2.1.tar.gz>

    HP Deskjet 710, 720, 820 et 1000
     <http://www.httptech.com/ppa>

    HP Paintjet (_p_j_t_e_s_t)

    HP Paintjet XL (_p_j_x_l_t_e_s_t)

    HP Paintjet XL300 (_p_j_x_l_3_0_0)

    HP LaserJet/Plus/II/III/4/5/6

    IBM 3853 Jetprinter couleur

    IBM Proprinter

    Imagen ImPress

    Lexmark Optra E+ (_l_j_e_t_4)

    Mitsubishi CP50 couleur

    NEC P6/P6+/P60

    NEC Pinwriter P2X (_u_n_i_p_r_i_n_t)

    NEC SuperScript 860 (_l_j_e_t_p_l_u_s)

    Oki OL410ex LED (_l_j_e_t_4)

    Okidata MicroLine 182

    Ricoh 4081/6000 (_r_4_0_8_1)

    SPARCprinter

    StarJet 48 imprimante  jet d'encre

    Tektronix 4693d couleur 2/4/8 bits

    Tektronix 4695/4696 table traante  jet d'encre

    Xerox XES printers (2700, 3700, 4045, etc.)


  2211..11..22..  PPiillootteess aallpphhaass eett BBeettaass


    Epson Stylus Color 440


  2222..  SSccaannnneerrss

  Pour le support des scanners, il existe le paquetage SANE (Scanner
  Access Now Easy : L'accs au scanner est maintenant facile). Des
  informations peuvent tre trouves sur le site
  <http://www.mostang.com/sane/>. On peut le tlcharger  partir du
  site  <ftp://ftp.mostang.com/sane/>. Il s'agit d'une interface scanner
  universelle. Ce paquetage est livr complet avec documentation et
  plusieurs outils de travail en amont et en aval.
  Pour plus d'informations sur les scanners  main, voyez
  <http://www./willamowius.de/scanner.html>.  Beaucoup de scanners ont
  galement leurs propres logiciels incluant les pilotes.


  2222..11..  SSuuppppoorrttss


    A4 Tech AC 4096 / AS 8000P (_a_4_s_c_a_n)
     <ftp://ftp.informatik.hu-
     berlin.de/pub/local/linux/a4scan/a4scan.tgz>

    Adara Image Star I
     ??? <http://fb4-1112.uni-muenster.de/ffwd/>
     ??? <ftp://fb4-1112.uni-muenster.de/pub/ffwd/mtekscan-0.2.tar.gz>

    Conrad Personal Scanner 64, P105 (scanners  main) (_s_c_a_n_-_d_r_i_v_e_r)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

    Epson GT-5500 (_S_A_N_E _e_p_s_o_n)

    Epson GT-6000
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/ppic0.5.tar.gz>

    Escom Image Scanner 256 (_S_A_N_E _u_m_a_x)

    Scanners Fujitsu SCSI-2
     contact Dr. G.W. Wettstein <greg%wind.UUCP@plains.nodak.edu>

    Genius ColorPage-SP2
     ??? <http://fb4-1112.uni-muenster.de/ffwd/>
     ??? <ftp://fb4-1112.uni-muenster.de/pub/ffwd/mtekscan-0.2.tar.gz>

    Genius GS-B105G, scanner  main (_g_s_1_0_5
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs105-0.0.1.tar.gz>

    Scanners  main Genius GeniScan GS-4500, GS-4500A (_g_s_4_5_0_0)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs4500-2.0.tar.gz>

    Scanner  main HighScreen Greyscan 256 (uniquement Noir et Blanc)
     (_g_s_4_5_0_0)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs4500-2.0.tar.gz>

    Sries HP ScanJet II SCSI
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/hpscanpbm-0.3a.tar.gz>

    HP ScanJet IIc, IIcx, IIp, 3c, 4c, 4p, 5p, 5pse, plus
     <http://www.tummy.com/xvscan/>

    Linotype Hell Jade, Jade2 (_S_A_N_E _u_m_a_x)

    Logitech Scanman+, Scanman 32, Scanman 256 (scanner  main)
     (_l_o_g_i_s_c)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/logiscan-0.0.4.tar.gz>

    Microtek ScanMaker E3, E6, II, IIXE, III et modles 35t
     ??? <http://fb4-1112.uni-muenster.de/ffwd/>
     ??? <ftp://fb4-1112.uni-muenster.de/pub/ffwd/mtekscan-0.2.tar.gz>
     Les scanners E3 et E6 sont galement supports, voir le site
     <http://www.tummy.com/xvscan/>

    Scanner  main Mustek M105 (_s_c_a_n_-_d_r_i_v_e_r)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>


    Mustek HT800 Turbo, Matador 105, Matador 256 (scanners  main)
     (_s_c_a_n_-_d_r_i_v_e_r)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

    Mustek Paragon 6000CX
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/muscan-2.0.6.taz>

    Scanner Nikon Coolscan SCSI film 35mm
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/coolscan-0.2.tgz>

    Nikon AX-210 (_S_A_N_E _u_m_a_x)

    Pearl 256 (scanner  main) (_s_c_a_n_-_d_r_i_v_e_r)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

    Polaroid DMC (_S_A_N_E _d_m_c)

    Bobis/Highscreen Scanboostar Premium (_S_A_N_E _u_m_a_x)

    Scanners UMAX SCSI
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/umax-0.5.5.tar.gz>

    UMAX Vista S6, S6E, T630, Supervista S-12 (_S_A_N_E _u_m_a_x)

    UMAX S-6E, S-6EG, S-12, S-12G (_S_A_N_E _u_m_a_x)

    UMAX Astra 600S, 610S, 1200S, 1220S (_S_A_N_E _u_m_a_x)

    UMAX UC 630, 840, 1200S, 1200SE (_S_A_N_E _u_m_a_x)

    UMAX UG 80, 630 (_S_A_N_E _u_m_a_x)

    UMAX PSD, Gemini D-16 (_S_A_N_E _u_m_a_x)

     NNOOTTEE :: Les pilotes Mustek ne fonctionnent qu'avec les cartes
     interfaces GI1904. Eric Chang eric.chang@chrysalis.org a cr un
     rectificatif pour l'utilisation avec les cartes interface IF960.


  2222..22..  PPiillootteess aallpphhaass eett bbeettaass


    Abaton Scan 300/S (_S_A_N_E _a_b_a_t_o_n)

    Abaton Scan 300/GS (_S_A_N_E _a_b_a_t_o_n)

    Agfa Focus, Focus II (_S_A_N_E _a_g_f_a_f_o_c_u_s)

    Agfa Focus Color, Focus Color Plus (_S_A_N_E _a_g_f_a_f_o_c_u_s)

    Agfa Focus Lineart (_S_A_N_E _a_g_f_a_f_o_c_u_s)

    Agfa Arcus II (_S_A_N_E _m_i_c_r_o_t_e_k)

    Agfa StudioScan II, IIsi (_S_A_N_E _m_i_c_r_o_t_e_k)

    Agfa SnapScan 300, 310, 600 (_S_A_N_E _s_n_a_p_s_c_a_n)

    Apple Scanner, OneScanner, ColorOneScanner (_S_A_N_E _a_p_p_l_e)

    Artec/Ultima AT3, AT6, AT12 (_S_A_N_E _a_r_t_e_c)

    Artec A6000C+ (_S_A_N_E _a_r_t_e_c)

    Canon CanoScan 300, CanoScan 600, CanoScan 2700F (_S_A_N_E _c_a_n_o_n)

    Genius Colorpage-Vivid+
     Infos sur le site
     <http://thor.prohosting.com/~chordig/Primax/index.html>. On peut
     galment y trouver un pilote.

    Genius GS-4000, ScanMate/32, ScanMate/GS (scanners  main)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs4500-2.0.tar.gz>

    HP ScanJet IIc, IIp, IIcx, 3c, 4c, 3p, 4p, 5p, 6100c, 6200c (_S_A_N_E
     _h_p)

    HP PhotoSmart PhotoScanner (_S_A_N_E _h_p)

    Kodak DC210 (_S_A_N_E _d_c_2_1_0)

    Kodak DC20, DC25 (_S_A_N_E _d_c_2_5)

    Microtek Scanmaker E2, E3, E6, II, IIG, IIHR, IISP, III, 35t+,
     600Z(S), 600G(S) (_S_A_N_E _m_i_c_r_o_t_e_k)

    Microtek ScanMaker E3plus, 330, 630, 636, X6 (_S_A_N_E _m_i_c_r_o_t_e_k_2)

    Microtek Phantom 636 (_S_A_N_E _m_i_c_r_o_t_e_k_2)

    Mustek MFC-600S, MFC-600CD, MFC-800S (_S_A_N_E _m_u_s_t_e_k)

    Mustek MFS-6000CX, MFS-6000SP, MFS-8000SP, MFS-1200SP, MFS-12000CX
     (_S_A_N_E _m_u_s_t_e_k)

    Mustek SE-6000SP, SE-12000SP (_S_A_N_E _m_u_s_t_e_k)

    Mustek HT500, M800 (scanners  main) (_s_c_a_n_-_d_r_i_v_e_r)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

    Nework Scanny MM100
     Infos sur le site
     <http://thor.prohosting.com/~chordig/Primax/index.html>. On peut
     galement y trouver un pilote.

    Nikon LS-20, LS-30, LS-1000 (_S_A_N_E _C_o_o_l_s_c_a_n)

    Plustek OpticPro 4830P, OpticPro 4831P, OpticPro 9630P/PL, OpticPro
     600P, OpticPro FBIII, OpticPro FBIV, (_S_A_N_E _p_l_u_s_t_e_k)
     Le pilote sane peut tre trouv sur le site
     <http://www.efn.org/~rick/plustek/>

    Primax Colorado Direct 300, Colorado Direct 600/30bit, Storm
     Totalscan
     On trouve des informations sur le site
     <http://thor.prohosting.com/~chrordig/Primax/index.html>. On peut
     galement y trouver un pilote.

    Siemens S9036 (_S_A_N_E _a_g_f_a_f_o_c_u_s)

    Tamarack Artiscan 6000C, 8000C, 12000C (_S_A_N_E _t_a_m_a_r_a_c_k)

    UMAX Vista-S8, UC-1260, Mirage IIse, PL-II (_S_A_N_E _u_m_a_x)

    Vobis HighScan (_S_A_N_E _m_i_c_r_o_t_e_k_2)

    Voelkner Personal Scanner 64 (scanner  main) (_s_c_a_n_-_d_r_i_v_e_r)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>
    Vuego 310S (_S_A_N_E _s_n_a_p_s_c_a_n)


  2222..33..  NNoonn ssuuppppoorrttss


    Scanners Acer. Acer ne fournit aucune information pour pouvoir
     programmerles pilotes.

    Escom 256 (primax Lector Premier 256) (scanner  main)

    Genius ScanMate/256, ScanMate/Color, EasyScan (scanners  main)

    Mustek CG 8000 (scanner  main)

    Primax Colorado Direct 9600, Colorado 1200P, Colorado USB 19200
     Infos sur le site
     <http://thor.prohosting.com/~chrordig/Primax/index.html>

    Trust Ami Scan (scanner  main)

    UMAX (scanners parallle)


  2233..  AAuuttrreess mmaattrriieellss

  2233..11..  RRaaddiioo--AAmmaatteeuurr

  Les cartes suivantes sont supportes:

    TNC KISS

    Carte Ottawa PI

    Carte Gracilis PacketTwin

    Autres cartes bases sur Z8530 SCC

    Modems Baycom sur ports parallles et sries

    Cartes Soundblaster

    Cartes son bases sur le circuit Crystal


  2233..22..  MMoonniitteeuurrss VVEESSAA aavveecc PPrroottooccoollee dd''ccoonnoommiiee dd''nneerrggiiee ((DDPPMMSS))

  Le support pour conomie d'nergie est inclus dans le noyau Linux.
  Utilisez simplement setterm pour le rendre actif lorsque vous tes en
  mode console, et xset lorsque vous tes sous X.

  2233..33..  ccrraannss ttaaccttiilleess

  Le serveur X Metro-X supporte les contrleurs d'crans tactiles
  suivants :

    cran tactile srie Carrol Touch
     <http://www.carrolltouch.com>

    EloGraphics

    Lucas Deeco

    MicroTouch


  2233..44..  TTeerrmmiinnaauuxx ssuurr ppoorrtt ssrriiee

  Les vieux terminaux peuvent facilement tre utiliss avec Linux en les
  connectant  l'un des ports srie de votre systme. Au minimum les
  terminaux suivants sont supports:

    VT52

    VT100

    VT220

    VT320

    VT420


  2233..55..  LLeess mmaanncchheess  bbaallaaii ((jjooyyssttiicckk))

  Le support des manches  balai se trouve dans les dernires
  distributions de XFree86 (3.3.x) et dans les noyaux 2.1.xx et 2.2.xx.
  Pour les versions plus anciennes, les liens ci-dessous peuvent tre
  utiles.

    Pilote de manches  balai
     Pour information, allez voir le site
     <http://atrey.karlin.mff.cuni.cz/~vojtech/joystick>. Une archive
     FTP se trouve sur le site
     <ftp://atrey.kerlin.mff.cuni.ce/pub/linux/joystick>.

  Les manches  balai actuellement supports sont :

    Les manches  balai Amiga sur Amiga

    Les compatibles CH Flightstick Pro avec deux chapeaux et deux
     boutons

    Les interfaces manche  balai port parallle DirectPad Pro parallel
     ( <http://www.ziplabel.com/dpadpro/index.html>)

    FP Gaming Assasin 3D (
     <http://www.fpgaming.com/portfolio/assn3d.html>)

    Manettes de jeu (gamepads) avec 6 et 8 boutons

    Genius Flight2000 Digital F-23 (
     <http://www.genius.kye.de/english/product/game.html>)

    Gravis Blackhawk Digital (
     <http://www.gravis.com/products/js_blackhawkdigital.html>)

    Gravis GamePad Pro (
     <http://www.gravis.com/products/gp_gamepadpro.html>)

    Gamepad Gravis Xterminator (
     <http://www.gravis.com/products/xterminator.html>)

    Logitech CyberMan 2 ( <http://www.cyberman2.de>)

    Logitech ThunderPad Digital (
     <http://www.logitech.ch/Game+Controllers/ThunderPadDigital.html>)

    Logitech WingMan Extreme Digital (
     <http://www.logitech.ch/Game+Controllers/WingManExtremeDigital.html>)


    MadCatz Panther ( <http://www.fpgaming.com/portfolio/panther.html>)

    MadCatz Panther XL (
     <http://www.fpgaming.com/portfolio/panthxl.html>)

    Microsoft SideWinder 3D Pro (
     <http://www.eu.microsoft.com/products/hardware/sidewinder/3Dpro/default.htm>)

    Microsoft SideWinder Force Feedback Pro (
     <http://www.eu.microsoft.com/products/hardware/sidewinder/force-
     feedback/default.htm>)

    Microsoft SideWinder GamePad (
     <http://www.eu.microsoft.com/products/hardware/sidewinder/gamepad/default.htm>)

    Microsoft SideWinder Precision Pro
     <http://www.eu.microsoft.com/products/hardware/sidewinder/precision-
     pro/default.htm>)

    Manches  balai multisystmes (Atari, Amiga, Commodore, Amstrad)

    Manches  balai multisystmes utilisant l'interface 0.8.0.2 hw

    Manettes de jeu Nintendo Entertainment System (et clone - SVI,
     Pegasus ...)

    Carte jeu PDPI Lightning L4 ( <http://www.pdpi.net>)

    Manettes de jeu Sega Genesis (MegaDrive)

    Manette de jeu Sega Master System

    Manette de jeu Sega Saturn

    Interfaces manche  balai port parallle SNESKey

    Manette de jeu Sony PlayStation

    Manches  balai standards avec 2, 3 ou 4 axes, et jusqu' 4 boutons

    Manette de jeu Super Nintendo Entertainment System

    Compatibles ThrustMaster FCS avec chapeau additionnel

    ThrustMaster Millenium 3D Inceptor (
     <http://www.thrustmaster.com/products/millennium.htm>)

    ThrustMaster Rage 3D (
     <http://www.thrustmaster.com/products/rage3d.htm>)

    Interface manche  balai port parallle TurboGraFX (
     <http://www2.burg-halle.de/~schwenke/parport.html>)


  2233..66..  CCaarrtteess dd''aaccqquuiissiittiioonn vviiddoo // CCaappttuurree dd''iimmaaggeess // TTuunneerr TTVV

  Un certain nombre de logiciels sont disponibles pour le support des
  tuners TV.  Ce sont:

    BTTV  <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

    Xawtv

    Xtvscreen


  Toutes les cartes avec Bt848/Bt848a/Bt849/Bt878/Bt879 et une entre
  normale Composite/S-VHS sont supportes. Support Tltexte et
  Intercast (uniquement PAL) avec dcodage d'chantillons VBI inclus
  dans le logiciel.


    Dispositif E/S Adlink 7200 Digital
     <ftp://metalab.unc.edu/pub/Linux/science/lab/adl7200-0.60.tar.gz>

    Dispositif E/S Adlink 7300A Digital
     <ftp://ftp.systemy.it/pub/develop/adl7300-0.04.tar.gz>

    Kit CMOS de video-confrence. La capture video possde un circuit
     Bt849.  Livr avec une camra CCD

    Data Translation DT2803

    Capteur d'images Data Translation DT 2851
     <ftp://metalab.unc.edu/pub/Linux/apps/video/dt2851-2.01.tar.gz>

    Data Translation 3155
     <http://krusty.eecs.umich.edu/people/ncowan/linux/welcome.html>

    Diamond DTV2000 (bas sur la carte Bt848)

    Dipix XPG1000/FPG/PPMAPA (bas sur TI C40 DSP). La plupart des
     cartes ajoutes sont supportes.
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html> ou
     <http://www.atlantek.com.au/USERS/wes/linux/frame.html>. On peut
     trouver le pilote sur le site
     <ftp://ftp.atlantek.com.au/pub/ldipix>

    Epix SVM

    Sries de cartes de capture d'images Epix Silicon Video MUX
     <http://www.ssc.com/lj/issue13/npc13c.html>

    FAST Screen Machine II
     <ftp://metalab.unc.edu/pub/Linux/apps/video/ScreenMachineII.2.0.tgz>

    Hauppage Wincast TV PCI (bas sur le Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

    Imaging Technology ITI/IC-PCI
     <ftp://ftp.gom-online.de/pub/IC-PCI/icpci-0.3.2.tar.gz>

    ImageNation Cortex I
     <ftp://metalab.unc.edu/pub/Linux/apps/video/cortex.drv.1.1.tgz>

    ImageNation CX100
     <ftp://metalab.unc.edu/pub/Linux/apps/video/cxdrv-0.86.tar.gz>

    ImageNation PX500
     <ftp://ftp.systemy.it/pub/develop>

    ImageNation PXC200
     <ftp://ftp.systemy.it/pub/develop>

    Imaging Technology Inc. Carte de capture d'image IC-PCI
     <ftp://gandalf.expmech.ing.tu-bs.de/pub/driver/icpci-0.2.0.tar.gz>

    Matrix Vision MV-Delta
     <http://www.matrix-vision.de/>

    Matrox Meteor
     <ftp://metalab.unc.edu/pub/Linux/apps/video/meteor-1.4a.tgz>
    Matrox PIP-1024
     <http://www.powerup.com.au/~sobeyp/pip_tar.gz>

    MaxiTV/PCI (base sur le ZR36120)
     <ftp://metalab.unc.edu/pub/Linux/kernel/misc-
     cards/zr36120-971127.tgz>

    Miro PCTV (base sur la Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

    MuTech MV1000 PCI
     <ftp://metalab.unc.edu/pub/Linux/apps/video/mv1000drv-0.33.tgz>

    MuTech MV200
     <http://www.powerup.com.au/~sobeyp/mu_tar.gz>

    Philips PCA10TV (n'est plus produite)
     <ftp://ftp.il.ft.hse.nl/pub/tv1000/pctv1000.02.tgz>

    Pinnacle PCTV (bas sur Bt848)

    Pro Movie Studio
     <ftp://metalab.unc.edu/pub/Linux/apps/video/PMS-grabber.3.0.tgz>

    Carte pour capture vido Quanta WinVision B&W
     <ftp://metalab.unc.edu/pub/Linux/apps/video/fgrabber-1.0.tgz>

    Quickcam
     <ftp://metalab.unc.edu/pub/Linux/apps/video/qcam-0.7c-5.tar.gz>

    Nomadic Technologies Sensus 700
     <http://www.robots.com/> pour des informations quelconques. Hlas,
     Nomadic Technologies a retir la page qui concernait le Sensus 700.

    Smart Video Recoder III (base sur la Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

    Tuner tlvision STB TV PCI ( base de Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

    Tekram C210 (base sur ZR36120)
     <ftp://metalab.unc.edu/pub/Linux/kernel/misc-
     cards/zr36120-971127.tgz>

    Video Blaster, Rombo Media Pro+
     <ftp://metalab.unc.edu/pub/Linux/apps/video/vid_src-0.7.tgz>

    cartes TV VT1500
     <ftp://metalab.unc.edu/pub/Linux/apps/video/vt1500-1.0.9.tar.gz>


  2233..77..  CCaammrraa ddiiggiittaallee

  Actuellement il existe cinq logiciels utilisables en association avec
  des camras digitales.

    Camediaplay ( <http://www.itojun.org/itojun.html>)
     Vous pouvez le tlcharger sur le site
     <ftp://ftp.itojun.org/pub/digicam/C-400L/unix/>

    Photopc ( <http://www.average.org/digicam/>)
     Vous pouvez le tlcharger sur le site
     <ftp://ftp.average.org/pub/photopc/>

    Qvplay ( <http://www.asahi-net.or.jp/~XG2K-HYS/index-e.html>)
     Vous pouvez le tlcharger sur le site  <http://www.asahi-
     net.or.jp/~XG2K-HYS/qvplay-0.93.tar.gz>

    JCAM, une application Java qui permet aux possesseurs de camra
     digitale de pouvoir accder et de tlcharger des images  partir
     q'une grande varit de camras digitales usuelles (adresse :
     url="http://www.jcam.com">)
     On peut la tlcharger sur le site
     <http://www.jcam.com/jcam/download.shtml>

    gPhoto ( <http://www.gphoto.com>)
     On peut le tlcharger sur le site
     <http://www.gphoto.com/download.php3>

  On peut adjoindre  Photopc une interface graphique Tk. Celle-ci se
  trouve sur le site
  <http://www.mediacity.com/~pwhite/Phototk/phototk.html>.  On peut
  galement adjoindre une interface graphiqeTk  Qvplay, que l'on peut
  trouver sur le site
  <http://www.bekkoame.or.jp/~tormato/pub/qvplaytk-0.73c.tar.gz>


  2233..77..11..  SSuuppppoorrttss


    Ensemble de camras Agfa ePhoto (_p_h_o_t_o_p_c_, _c_a_m_e_d_i_a_p_l_a_y_, _J_C_A_M)
     <http://www.agfahome.com/ephoto/>

    Apple QuickTake 200 (_J_C_A_M)

    Casio QV10, QV-10A, QV-11, QV-30, QV-70, QV-100, QV-200, QV-300,
     QV-700, QV-770 (_q_v_p_l_a_y)
     <http://www.casio.com/digitalimaging/digital-
     results.cfm?ObjectGroup_ID=171>

    Casio QV-10A, QV-11, QV-30, QV-70, QV-100, QV-300, QV-700, QV-770
     (_J_C_A_M)

    Chinon ES-1000 (mme matriel, protocole et format d'image que
     Kodak DC20)(_J_C_A_M)
     <http://www.planet-interkom.de/oliver.hartmann/dc20secr.htm>

    Epson "Colorio Photo" CP-100 (PhotoPC) (_p_h_o_t_o_p_c_, _c_a_m_e_d_i_a_p_l_a_y)
     <http://www.epson.com/cam_scan/>

    Epson "Colorio Photo" CP-200 (PhotoPC 500) (_p_h_o_t_o_p_c_, _c_a_m_e_d_i_a_p_l_a_y_,
     _J_C_A_M)
     <http://www.epson.com/cam_scan/>

    Epson "Colorio Photo" CP-200 (PhotoPC 550) (_J_C_A_M)

    Epson "Colorio Photo" CP-500 (PhotoPC 600) (_p_h_o_t_o_p_c_, _c_a_m_e_d_i_a_p_l_a_y_,
     _J_C_A_M)
     <http://www.epson.com/cam_scan/>

    Epson "Colorio Photo" CP-500 (PhotoPC 700) (_J_C_A_M)

    Epson PhotoPC 550 (photopc, camediaplay)
     <http://www.epson.com/cam_scan/>

    Fuji DS-7, DX-5 (DS-10), DX-7 (DS-20), DX-9 (DS-30), DS-300, MX-700
     (_J_C_A_M)

    HP Photo Smart Digital Camera (Certains disent qu'elle est
     supporte et d'autres disent qu'elle ne l'est pas !!??)


    Kodak DC-20, DC-25, DC-200/210 (_J_C_A_M)
     <http://www.planet-interkom.de/oliver.hartmann/dc20secr.htm>

    Olympus C-300L, C-320L, C-420L, C-800L, C-840L, C-1000L, C-1400L
     (_J_C_A_M)
     <http://www.olympusamerica.com/digital/dhome.html>

    Olympus "Camedia" C-400L (D-200L) (_p_h_o_t_o_p_c_, _c_a_m_e_d_i_a_p_l_a_y_, _J_C_A_M)
     <http://www.olympusamerica.com/digital/dhome.html>

    Olympus "Camedia" C-820L (D-320L) (_p_h_o_t_o_p_c_, _c_a_m_e_d_i_a_p_l_a_y_, _J_C_A_M)
     <http://www.olympusamerica.com/digital/dhome.html>

    Olympus C2000Z (_p_h_o_t_o_c_d)

    Sanyo VPC-G200/G200EX (_p_h_o_t_o_p_c_, _c_a_m_e_d_i_a_p_l_a_y)
     <http://www.sanyo.co.jp/AV/CEmedia_e/products/digicam/digicam.html>

    Sanyo DSC-V1 (VPC-G200E) (_p_h_o_t_o_p_c_, _c_a_m_e_d_i_a_p_l_a_y)
     <http://www.sanyo.co.jp/AV/CEmedia_e/products/digicam/digicam.html>

    Sanyo DSC-X1 (VPC-X300) (_J_C_A_M)

    Sanyo DSC-X300 (_p_h_o_t_o_p_c_, _c_a_m_e_d_i_a_p_l_a_y)
     <http://www.sanyo.co.jp/AV/CEmedia_e/products/digicam/digicam.html>

    Nikon Coolpix 600/900 (Coolpix 600 non test) (_p_h_o_t_o_p_c)
     <http://www.nikonusa.com/products/products.taf?id=128> et
     <http://www.nikonusa.com/products/products.taf?id=129>

    Sierra Imaging SD640 (_p_h_o_t_o_p_c)
     <http://www.sierraimaging.com/support/supchimgex.html>

    Toshiba PDR-2 (_p_h_o_t_o_p_c: pas certain)
     <http://www.toshiba.com/taisisd/dsc/indexj.htm>


  2233..77..22..  NNoonn ssuuppppoorrttss


    Casio QV-120, QV-5000SX, QV-7000SX

    Kodak DC40, DC50, DC120



  2233..88..  OOnndduulleeuurrss

  D'autres onduleurs sont supports, voir le UPS-HOWTO.


    APC SmartUPS
     <http://www.dyer.vanderbilt.edu/server/apcupsd>

    APC-BackUPS 400/600, APC-SmartUPS SU700/1400RM
     <http://www.dyer.vanderbilt.edu/server/apcupsd>

    Fenton PowerPal
     <ftp://megatec.com.tw/Rups2/UNIX/v3.0.1> pour tlchargement et
     manuels. Des informations sur la Toile peuvent tre trouves sur le
     site  <http://www.fentonups.com/index2.htm>

    Fenton Tele-UPS
     <ftp://megatec.com.tw/Rups2/UNIX/v3.0.1> pour tlchargement et
     manuels. Des informations sur la Toile se trouvent sur le site
     <http://www.fentonups.com/index2.htm>
    Fenton PowerOn
     <ftp://megatec.com.tw/Rups2/UNIX/v3.0.1> pour tlchargement et
     manuels. Des informations sur le Web se trouvent sur
     <http://www.fentonups.com/index2.htm>

    Onduleurs avec contrle via le port RS-232 (genpower package)
     <ftp://metalab.unc.edu/pub/Linux/system/ups/genpower-1.0.1.tgz>

    Onduleurs MGE
     <http://www.mgeups.com/download/softlib.htm> et
     <http://www.mgeups.com/download/software/linux/upsp.tgz>

    Un dmon pour arrter et mettre en route des ordinateurs connects
      un onduleur. Il dtecte le rseau et permet les modes serveur et
     client.
     <ftp://metalab.unc.edu/pub/Linux/system/ups/powerd-2.0.tar.gz>


  2233..99..  CCaarrtteess mmuullttiiffoonnccttiioonnss



    Carte interface Pro Audio Spectrum 16 SCSI/Son



  2233..1100..  AAccqquuiissiittiioonn ddee ddoonnnneess

  Le site Linux Lab Project recueille des pilotes pour les systmes
  d'acquisition de donnes et gre galement des listes de courriers en
  rapport avec ce sujet.  Je n'ai aucune exprience dans ce domaine,
  aussi, allez voir le site pour plus de dtails.


    Linux Lab Project
     <http://www.llp.fu-berlin.de/>


    CED 1401

    DBCC CAMAC

    Cartes IEEE-488 (GPIB, HPIB)

    Keithley DAS-1200

    National Instruments AT-MIO-16F / Lab-PC+


    Carte Analog Devices RTI-800/815 ADC/DAC
     Contactez Paul Gortmaker <gpg109@anu.edu.au>


  2233..1111..  IInntteerrffaacceess hhoorrllooggee cchhiieenn ddee ggaarrddee ((WWaattcchhddoogg ttiimmeerrss iinntteerrffaacceess))


    Carte chien de garde PC Berkshire Products PC(ISA cards rev. A and
     C)
     Voyez  <ftp://ftp.bitgate.com/pub/bitgate/pcwd> pour le programme.
     Un pilote est incorpor dans les noyaux rcents. Pour plus
     d'informations, voir le site  <http://www.berkprod.com/wdog.htm>

    ICS WDT500-P
     <http://www.indcompsrc.com/products/data/html/wdt500-p.html>


    ICS WDT501-P (avec et sans mesureur de vitesse de ventilateur)
     <http://www.indcompsrc.com/products/data/html/wdt500-p.html>

    Carte de base pour horloge chien de garde (ISA) Outsource
     Engineering & Manufacturing Inc.
     On trouve des informations sur le site
     <http://www.ctec.net/basicwdt>. pilotes de priphriques tournant
     actuellement avec les noyaux 2.0.29, 2.0.33 et 2.0.36.


  2233..1122..  DDiivveerrss


    Mattel Powerglove

    Carte radio FM AIMS Labs RadioTrack
     <ftp://metalab.unc.edu./pub/Linux/apps/sound/radio/radiotrack-1.1.tgz>

    Carte radio FM Reveal
     <ftp://magoo.uwsuper.edu/docs/radio-html>

    Cartes Vidotexte
     <ftp://metalab.unc.edu/pub/Linux/apps/video/videoteXt-0.6.tar.gz>


  2244..  SSoouurrcceess dd''iinnffoorrmmaattiioonnss


    Archive FAQ matriel de Cameron Spitzer (??)
     <ftp://ftp.rahul.net/pub/cameron/PC-info/>

    Guide des vendeurs de micro-ordinateurs
     <http://guide.sbanetweb.com/>

    Informations sur l'optimisation des systmes
     <http://www.dfw.net/~sdw/>


  2255..  RReemmeerrcciieemmeennttss

  Merci  tous les auteurs et  ceux qui ont contribu aux autres HOWTO,
  beaucoup de choses leur ayant t empruntes sans vergogne.  Merci 
  FRiC, Zane Healy et  Ed Carp, les premiers auteurs de cette liste.
  Merci  tous les autres qui ont envoy des mises  jour et des
  corrections.  Remerciements particuliers  Eric Boerner et Lilo (la
  personne, pas le programme) pour les vrifications.  Enfin merci  Don
  Quinlan pour la conversion en SGML.


  2266..  AAnnnneexxee AA.. CCaarrtteess SS33  ssuuppppoorrtteess ppaarr XXFFrreeee8866 33..33..xx..
















  CHIPSET|RAMDAC            |HORLOGE  |BPP|CARTE

  801/805|AT&T 20C490       |         | 16| Actix GE 32 / 32+ 2Mb
         |                  |         |   | Orchid Fahrenheit 1280(+)
  801/805|AT&T 20C490       |ICD2061A | 16| STB PowerGraph X.24
  801/805|                  |         |   | Del S3 805
         |                  |         |   | Miro Crystal 8S
         |                  |         |   | Orchid Fahrenheit VA
         |                  |         |   | VL-41
  805    |S3 GENDAC         |         | 16| Miro 10SD VLB/PCI
         |                  |         |   | SPEA Mirage VLB
  801/805|SS2410            |ICD2061A |  8| Diamond Stealth 24 VLB/ISA
  801/805|AT&T 20C490       |Ch8391   | 16| JAX 8231/8241, SPEA Mirage
  801/805|S3 GENDAC         |         |   | Miro Crystal 10SD
  805i   |                  |         |   | Actix GE 32i
         |                  |         |   | ELSA Winner 1000 ISA
  928    |AT&T 20C490       |         | 16| Actix Ultra
  928    |Sierra SC15025    |ICD2061A | 32| ELSA Winner 1000 ISA/VLB/EISA
  928    |Bt485             |ICD2061A | 32| STB Pegasus VL
  928    |Bt485             |SC11412  | 16| SPEA(/V7) Mercury VLB
  928    |Bt485             |ICD2061A | 32| #9 GXE Level 10/11/12
  928    |Ti3020            |ICD2061A | 32| #9 GXE Level 14/16
  928    |                  |         |   | 928Movie
         |                  |         |   | Diamond Stealth Pro
         |                  |         |   | ELSA Winner 1000TwinBus
         |                  |         |   | ELSA Winner 1000VL
         |                  |         |   | ELSA Winner 2000
         |                  |         |   | Miro Crystal 16S
  864    |                  |ICD2061A |   | Miro Crystal 20SD (BIOS 2.xx)
  864    |AT&T 20C498       |ICS2494  | 32| Miro (Crystal) 20SD (BIOS 1.xx)
  864    |AT&T 20C498/      |ICD2061A/| 32| ELSA Winner 1000 PRO VLB/PCI
  864    |STG1700           |ICS9161  |   | MIRO 20SD (BIOS 2.x)
         |                  |         |   | ELAS Winner 1000 PRO
  864    |STG1700           |ICD2061A | 32| Actix GE 64 VLB
  864    |AT&T 20C498/      |ICS2595  | 16| SPEA(/V7) Mirage P64 DRAM (BIOS 3.x)
         |AT&T 21C498       |         |   |
  864    |S3 86C716 SDAC    |         | 32| ELSA Winner 1000 PRO
         |                  |         |   | Miro 20SD (BIOS 3.x)
         |                  |         |   | SPEA Mirage P64 DRAM (BIOS 4.x)
         |                  |         |   | Diamond Stealth 64 DRAM
         |                  |         |   | Genoa Phantom 64i
         |                  |         |   | Miro Crystal 20SD VLB (BIOS 3.xx)
  864    |ICS5342           |ICS5342  | 32| Diamond Stealth 64 DRAM (some)
  864    |SDAC              |         |   | Diamond Stealth 64 Graphics 2001
  864    |AT&T 20C498-13    |ICD2061A | 32| #9 GXE64 PCI
  864    |                  |         |   | ASUS Video Magic PCI V864
         |                  |         |   | VidTech FastMax P20
  964    |                  |         |   | ELSA Winner 2000 PRO-2,4
         |                  |         |   | spider Tarantula 64
  964    |AT&T 20C505       |ICD2061A | 32| Miro Crystal 20SV PCI/40SV
  964    |Bt485             |ICD2061A | 32| Diamond Stealth 64
  964    |Bt9485            |ICS9161A | 32| SPEA Mercury 64
  964    |Ti3020            |ICD2061A |  8| ELSA Winner 2000 PRO PCI
  964    |Ti3025            |Ti3025   | 32| #9 GXE64 Pro VLB/PCI
         |                  |         |   | Miro Crystal 40SV
  964    |IBM RGB           |         | 32| Hercules Graphite Terminator 64
  868    |S3 86C716 SDAC    |         | 32| ELSA Winner 1000AVI
         |                  |         |   | Miro Crystal 20SD PCI
  868    |AT&T 29C409       |         |   | ELSA Winner 1000AVI
  868    |                  |         |   | Diamond Stealth Video DRAM
         |                  |         |   | Diamond Stealth 64 Video 2120/2200
         |                  |         |   | ELSA Winner 1000PRO/X
         |                  |         |   | #9 FX Motion 531
         |                  |         |   | VideoLogic GrafixStar 500
  968    |                  |         |   | Diamond Stealth 64 Video 3200
         |                  |         |   | ELSA Gloria-4/8
         |                  |         |   | ELSA Winner 2000AVI
         |                  |         |   | ELSA Winner 2000PRO/X-2/X-4/X-8
         |                  |         |   | Genoa VideoBlitz III AV
         |                  |         |   | Hercules Graphite Terminator Pro 64
         |                  |         |   | LeadTek WinFast S430
         |                  |         |   | LeadTek WinFast S510
         |                  |         |   | Miro Crystal 80SV
         |                  |         |   | Miro Crystal 20SV
         |                  |         |   | #9 FX Motion 771
         |                  |         |   | VideoLogic GrafixStar 700
         |                  |         |   | WinFast S430/S510
  968    |TVP3026           |         | 32| ELSA Winner 2000PRO/X
         |                  |         |   | Diamond Stealth 64 Video VRAM
  968    |IBM RGB           |         | 32| Genoa VideoBlitz III AVI
         |                  |         |   | Hercules Terminator Pro 64
         |                  |         |   | STB Velocity 64 Video
         |                  |         |   | #9 FX Motion 771
         |                  |         |   | Diamond Stealth 64 Video 3240/3400
  968    |TI RAMDAC         |         |   | Diamond Stealth 64 Video 3240/3400
  732    |(Trio32)          |         | 32| Diamond Stealth 64 DRAM SE
         |                  |         |   | (all Trio32 based cards)
  764    |(Trio64)          |         | 32| SPEA Mirage P64 (BIOS 5.x)
         |                  |         |   | Diamond Stealth 64 DRAM
         |                  |         |   | Diamond Stealth 64 Graphics 2xx0
         |                  |         |   | #9 FX Vision 330
         |                  |         |   | STB PowerGraph 64
         |                  |         |   | (all Trio64 based cards)
         |(Trio64V+)        |         |   | DSV3326
         |                  |         |   | Diamond Stealth 64 Video 2001
         |                  |         |   | DataExpert DSV3365
         |                  |         |   | ExpertColor DSV3365
         |                  |         |   | MAXColor S3 Trio64V+
         |                  |         |   | ELSA Winner 1000TRIO/V
         |                  |         |   | Hercules Terminator 64/Video
         |                  |         |   | #9 FX Motion 331
         |                  |         |   | STB Powergraph 64 Video
         |                  |         |   | VideoLogic GrafixStar 400
         |(Trio64V2)        |         |   | ELSA Winner 1000/T2D
         |(ViRGE)           |         |   | Canopus Co. Power Window 3DV
         |                  |         |   | DSV3325
         |                  |         |   | DataExpert DSV3325
         |                  |         |   | Diamond Multimedia Stealth 3D 2000
         |                  |         |   | Diamond Multimedia Stealth 3D 2000 PRO
         |                  |         |   | Diamond Stealth 3D 2000
         |                  |         |   | Diamond Stealth 3D 2000 PRO
         |                  |         |   | Diamond Stealth 3D 3000
         |                  |         |   | ELSA Victory 3D
         |                  |         |   | ELSA Victory 3DX
         |                  |         |   | ELSA Winner 3000-S
         |                  |         |   | Expertcolor DSV3325
         |                  |         |   | Hercules Terminator 64/3D
         |                  |         |   | LeadTek WinFast 3D S600
         |                  |         |   | MELCO WGP-VG4S
         |                  |         |   | #9 FX Motion 332
         |                  |         |   | Orchid Tech. Fahrenheit Video 3D
         |                  |         |   | STB systems Powergraph 3D
         |                  |         |   | WinFast 3D S600
         |(ViRGE/DX)        |         |   | Hercules Terminator 3D/DX
         |(ViRGE/GX)        |         |   | STB Nitro 3D
         |(ViRGE/VX)        |         |   | ELSA Winner 2000AVI/3D
         |                  |         |   | ELSA Winner 3000
         |                  |         |   | ELSA Winner 3000-L-42/-M-22
         |                  |         |   | MELCO WGP-VX8
         |                  |         |   | STB Systems Velocity 3D
  911/924|                  |         |   | Diamond Stealth VRAM
  924    |SC1148 DAC        |         |   |
  NNBB :: avec les composants ViRGE/VX,GX,GX2 vous devez utiliser XFree86
  3.3.1 ou une version plus rcente. Utilisez le serveur XF86_SVGA.


  2277..  AAnnnneexxee BB.. CCaarrtteess PPCCMMCCIIAA ssuuppppoorrtteess


  Ces cartes sont supportes par le paquetage de David Hinds, et cette
  liste provient de son site (
  <http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html>).


  Les cartes CardBus sont listes  la fin de chaque section.  l'heure
  actuelle, tous les pilotes de cartes CardBus doivent tre considrs
  comme exprimentaux.  Attention, certaines cartes sont 16 bits et les
  numros de version CardBus se ressemblent beaucoup. Si le numro de
  version n'est pas mentionn explicitement comme support dans ce
  document, alors ne vous attendez pas  ce qu'elle fonctionne.


  2277..11..  CCaarrtteess rrsseeaauuxx ((EEtthheerrnneett))


    Les cartes SMC, Megahertz et Ositech utilisent le pilote
     smc91c92_cs

    Les cartes 3Com et Farallon utilisent le pilote 3c589_cs

    Les cartes Fujitsu, TDK, RATOC, CONTEC, Eagle et Nextcom utilisent
     le pilote fmvj18x_cs

     Toutes les autres cartes utilisent le pilote pcnet_cs. Les autres
     cartes compatibles NE2000 qui ne sont pas dans la liste peuvent
     aussi utiliser le pilote pcnet_cs.



    3Com 3c589, 3c589B, 3c589C, 3c589D (3c589_cs)

    3Com Megahertz 3CCE589E, 3CXE589D, 3CXE589EC (3c589_cs)

    Accton EN2212, EN2216 EtherCard (pcnet_cs)

    Accton SOHO BASIC EN220 (pcnet_cs)

    Addtron Ethernet (pcnet_cs)

    AIBrain EPCM-T (pcnet_cs)

    Allied Telesis CentreCOM CE6001, LA-PCM, LA-PCM V2 (pcnet_cs)

    AmbiCom AMB8002, AMB8002T (pcnet_cs)

    AnyCom ECO Ethernet (pcnet_cs)

    Apollo RE450CT (pcnet_cs)

    Argosy EN210 (pcnet_cs)

    Asante FriendlyNet (pcnet_cs) (Les nouvelles cartes ne semblent pas
     fonctionner !!!)

    AST 1082 Ethernet (pcnet_cs)

    Billionton LNT-10TB, LNT-10TN (pcnet_cs)

    Califormia Access LAN Adapter

    CeLAN EPCMCIA (pcnet_cs)

    CNet CN30BC, CN40BC Ethernet (pcnet_cs)

    Compaq Ethernet Adapter (xirc2ps_cs)

    Compex/ReadyLINK Ethernet Combo (pcnet_cs)

    Compex Linkport Ethernet (pcnet_cs)

    COMPU-SHACK BASEline Ethernet (pcnet_cs)

    Connectware LANdingGear Adapter (pcnet_cs)

    Corega Ether PCC-T, PCM-T (pcnet_cs)

    CyQ've ELA-010 10baseT (pcnet_cs)

    CONTEC C-NET(PC)C (fmvj18x_cs)

    Danpex EN-6200P2 Ethernet (pcnet_cs)

    Datatrek NetCard (pcnet_cs)

    Dayna Communications CommuniCard E (pcnet_cs)

    Digital DEPCM-AA, PCP78-AC Ethernet (pcnet_cs)

    Digital EtherWORKS Turbo Ethernet (pcnet_cs)

    D-Link DE-650, DE-660 (pcnet_cs)

    DynaLink L10C Ethernet (pcnet_cs)

    Eagle NE200 Ethernet (fmvj18x_cs)

    Edimax Technology Ethernet Combo (pcnet_cs)

    EFA InfoExpress 205, 207 Combo (pcnet_cs)

    Eiger Labs EPX-ET10T2 Combo (pcnet_cs)

    Eiger Labs EPX-10BT, EPX-ET 10BT EPX-ET 10TZ (fmvj18x_cs)

    ELECOM Laneed LD-CDWA, LD-CDX, LD-CDNIA, LD-CDY, LD-CDF (pcnet_cs)

    EP-210 Ethernet (pcnet_cs)

    Epson Ethernet (pcnet_cs)

    EtherPRIME Ethernet (pcnet_cs)

    Explorer NE-10000 Ethernet (pcnet_cs)

    EZLink 4109 Ethernet (pcnet_cs)

    Farallon Etherwave, EtherMac (3c589_cs)

    Fiberline FL-4680 (pcnet_cs)

    Fujitsu FMV-J181, FMV-J182, FMV-J182A, FMV-J183 (fmvj18x_cs)

    Fujitsu Towa LA501, FMV-1080, FM50N-183 (fmvj18x_cs)

    Gateway 2000 Ethernet (pcnet_cs)

    Genius ME3000II Ethernet (pcnet_cs)

    Grey Cell Ethernet (pcnet_cs)

    GVC NIC-2000P Ethernet Combo (pcnet_cs)

    Hitachi HT-4840-11 EtherCard (fmvj18x_cs)

    Hypertec HyperNet (pcnet_cs)

    IBM CreditCard Ethernet Adapter (pcnet_cs)

    IC-Card Ethernet (pcnet_cs)

    Infotel IN650ct Ethernet (pcnet_cs)

    I-O Data PCLA/T, PCLA/TE (pcnet_cs)

    Katron PE-520 Ethernet (pcnet_cs)

    KingMax Technology EN10-T2 Ethernet (pcnet_cs)

    Kingston KNE-PCM/M, KNE-PC2, KNE-PC2T (pcnet_cs)

    KTI PE-520 Plus (pcnet_cs)

    LANEED LD-CDW Ethernet (pcnet_cs)

    LanPro EP4000A (pcnet_cs)

    Lantech Ethernet (pcnet_cs)

    Level One EPC-0100TB (pcnet_cs)

    Linksys EtherCard (pcnet_cs)

    Logitec LPM-LN10T, LPM-LN10BA, LPM-LN20T Ethernet (pcnet_cs)

    Longshine ShineNet LCS-8534TB Ethernet (pcnet_cs)

    Macnica ME-1 Ethernet (pcnet_cs)

    Maxtech PCN2000 Ethernet (pcnet_cs)

    Megahertz XJ10BT, XJ10BC, CC10BT Ethernet (smc91c92_cs)

    Melco LPC-TJ, LPC-TS, LPC-T, LPC2-T (pcnet_cs)

    Microdyne NE4200 Ethernet (pcnet_cs)

    Midori LANNER LT-PCMT (pcnet_cs)

    Micronet Etherfast Adapter (pcnet_cs)

    NDC Instant-Link (pcnet_cs)

    Network General ``Sniffer'' (pcnet_cs)

    New Media EtherLAN (nmclan_cs)

    New Media LanSurfer (pcnet_cs)

    New Media LiveWire (NOT the LiveWire+) (nmclan_cs)

    New Media BASICS Ethernet (smc91c92_cs)

    NextCom NC5310 (fmvj18x_cs)

    Novell/National NE4100 InfoMover (pcnet_cs)

    Ositech Four of Diamonds (smc91c92_cs)

    OvisLink Ethernet (pcnet_cs)

    Panasonic CF-VEL211P-B (pcnet_cs)

    Planet SmartCom 2000, 3500, ENW-3501-T, ENW-3502-T (pcnet_cs)

    Pretec Ethernet (pcnet_cs)

    PreMax PE-200 Ethernet (pcnet_cs)

    Proteon Ethernet (pcnet_cs)

    Ratoc REX-9822, REX-5588A/W, REX-R280 (fmvj18x_cs)

    Relia RE2408T Ethernet (pcnet_cs)

    Reliasys 2400A Ethernet (pcnet_cs)

    RPTI EP400, EP401 Ethernet (pcnet_cs)

    SCM Ethernet (pcnet_cs)

    Sky Link Express (pcnet_cs)

    SMC 8020BT EtherEZ (not the EliteCard) (smc91c92_cs)

    SMC 8022 EZCard-10 (pcnet_cs)

    Socket Communications EA LAN Adapter (pcnet_cs)

    Socket Communications LPE Low Power Ethernet (pcnet_cs)

    SOHOware Ethernet (pcnet_cs)

    SuperSocket RE450T (pcnet_cs)

    Surecom Ethernet (pcnet_cs)

    SVEC PN605C (pcnet_cs)

    TDK LAC-CD02x, LAK-CD021, LAK-CD022A, LAK-CD021AX, LAK-CD021BX
     (fmvj18x_cs)

    Thomas-Conrad Ethernet (pcnet_cs)

    Trust Ethernet Combo (pcnet_cs)

    UNEX NexNIC MA010 (pcnet_cs)

    Volktek NPL-402CT Ethernet (pcnet_cs)

    Xircom CreditCard CE2 (xirc2ps_cs)


  2277..22..  AAddaappttaatteeuurrss FFaasstt EEtthheerrnneett ((1100//110000bbaasseeTT))

  Les pilotes epic_cb et tulip_cb sont exprimentaux et ncessitent un
  noyau 2.2.x ou plus rcent.
    3Com 3c574TX, 3CCFE574BT (3c574_cs)

    3Com 3c575TX, 3CCFE575BT, 3CXFE575BT CardBus (3c575_cb, problmes
     de performance)

    Abocom LinkMate FE1000 (pcnet_cs)

    Accton Fast EtherCard-16 (xirc2ps_cs)

    Accton EN2220 CardBus (tulip_cb)

    Allied Telesyn AT-2800 (tulip_cb)

    AmbiCom AMB8100 (tulip_cb)

    AnyCom ECO Ethernet 10/100 (pcnet_cs)

    Apollo Fast Ethernet (pcnet_cs)

    Argosy EN220 (smc91c92_cs)

    Compaq Netelligent 10/100 (xirc2ps_cs)

    Compex Linkport TX (tulip_cb)

    COMPU-SHACK FASTline 10/100 (pcnet_cs)

    Corega FastEther PCC-TX (pcnet_cs)

    D-Link DFE-650 (pcnet_cs)

    D-Link DFE-660TX (tulip_cb)

    Dynalink L100C (smc91c92_cs)

    EXP ThinLan 100 (pcnet_cs)

    Fiberline Fast Ethernet (pcnet_cs)

    Hamlet FE1000 10/100 (pcnet_cs)

    Intel EtherExpress PRO/100 (xirc2ps_cs, 16-bit PAS 32-bit)

    IO DATA PCET/TX (pcnet_cs)

    Kingston KNE-CB4TX (tulip_cb)

    KTI KF-C16 (pcnet_cs)

    Laneed LD-10/100CD (pcnet_cs)

    Lantech FastNet/TX (smc91c92_cs)

    LevelOne FPC-0100TX (pcnet_cs)

    LevelOne FPC-0101TX 10/100Mbps CardBus (tulip_cb)

    Linksys PCMPC100 EtherFast 10/100 (pcnet_cs)

    Linksys PCMPC200 EtherFast CardBus (tulip_cb)

    Logitec LPM-LN100TX (pcnet_cs)

    Melco LPC2-TX (pcnet_cs)


    Melco/SMC LPC-TX (smc91c92_cs)

    Microcom TravelCard 10/100 (pcnet_cs)

    Micronet EtherFast Adapter (pcnet_cs)

    NetGear FA410TXC (pcnet_cs)

    Ositech Seven of Diamonds (smc91c92_cs)

    Ositech Seven of Spades CardBus (epic_cb)

    Planet FNW-3600T (pcnet_cs)

    SMC EZ CardBus 10/100 Ethernet (tulip_cb)

    SVEC FD606 10/100 Ethernet (tulip_cb)

    TDK NetworkFlyer LAK-CB100X, LAK-CB100AX CardBus (tulip_cb)

    Toshiba IPC5008A, Advanced Network 10/100 (xirc2ps_cs)

    UMAX Technologies UMAX250 (tulip_cb)

    WiseCom WC-PC400 (smc91c92_cs)

    Xircom CBEII-10/100 (tulip_cb)

    Xircom CreditCard CE3 (xirc2ps_cs, new cards may not work !!)


  2277..33..  AAddaappttaatteeuurrss TTookkeenn RRiinngg

  Vous devez avoir au moins le noyau 1.3.72


    3Com 3c389 TokenLink Velocity (ibmtr_cs)

    3Com 3c689 TokenLink III (ibmtr_cs)

    Adaptateur Token-ring IBM (ibmtr_cs)

    IBM Turbo 16/4 Token Ring (ibmtr_cs)


  2277..44..  AAddaappttaatteeuurrss rrsseeaauuxx ssaannss ffiillss


    Aironet PC4500, PC4800 (airco_cs) (Ben Reed reed@almaden.ibm.com)

    AT&T GIS / NCR Lucent WaveLAN version 2.0 (wavelan_cs)

    DEC RoamAbout/DS (wavelan_cs)

    Harris PRISM/AM79C930 IEEE 802.11 wireless LAN
     <http://www.absoval.com/linux-wlan> (Mark Mathews mark@absoval.com)

    Lucent WaveLAN/IEEE (wavelan2_cs) (Lucent Technologies
     betasupport@wavelan.com)

    Raylink Wireless Network
     <http://world.std.com/~corey/raylink.html> (Corey Thomas
     corey@world.std.com)

    WaveLAN/IEEE  <http://www.fasta.fh-dortmund.de/users/andy/wvlan>
     (Andreas Neuhaus andy@fasta.fh-dortmund.de)
    Xircom CreditCard NetWave (netwave_cs)


  2277..55..  RRNNIISS ((IISSDDNN))


    Elsa MicroLink (elsa_cs) (Klaus Lichtenwalder
     Klaus.Lichtenwalder@WebForum.DE)

    MPS ISLINEnote mpsuni_cs) (Detlef Glaschick glaschick@mps-
     software.de)

    Sedlbauer Speed Star ISDN (sedl_cs) (Marcus Niemann niemann@www-
     bib.fh-bielefeld.de)

    Teles (teles_cs) (Christof Petig ea0141@uni-wuppertal.de)



  2277..66..  MMooddeemmss eett ccaarrtteess ssrriieess

  Thoriquement toutes les cartes modems, les cartes ayant un seul port
  srie, et les modems cellulaires numriques devraient fonctionner. De
  mme, les modems RNIS qui mulent un UART standard sont supports.


    Advantech COMpad-32/85 dual serial (serial_cs)

    Argosy dual serial (serial_cs)

    Black Box I114A RS-422/485 (serial_cs)

    National Instruments PCMCIA-232, PCMCIA-232/2, PCMCIA-232/4
     (serial_cs)

    National Instruments PCMCIA-485, PCMCIA-485/2 (serial_cs)

    Omega Engineering QSP-100 (serial_cs)

    Quatech, IOTech dual RS-232 cards (serial_cs)

    Quatech quad RS-232 card (serial_cs)

    Socket Communications dual RS-232 card (serial_cs)

    Trimble Mobile GPS (serial_cs)


  2277..77..  CCaarrtteess mmmmooiirree

  Toutes les cartes SRAM devraient fonctionner. Les cartes flash non
  supportes sont lisibles mais non inscriptibles.


    Epson 2MB SRAM (memory_cs)

    IBM 8MB Flash

    Intel Sries 2, Sries 2+ et Sries Value 100 Flash (memory_cs)

    Maxtor MobileMax 16MB Flash (memory_cs)

    New Media SRAM

    RATOC Smartmedia Adapter (memry_cs)

    TDK Flash Memory SFM20W/C 20MB (memory_cs)


  2277..88..  AAddaappttaatteeuurrss SSCCSSII

  Soyez attentifs. Beaucoup de vendeurs, et en particulier les vendeurs
  de cdroms, semblent changer de circuits de contrle quand il leur
  plat. En gnral, ils utilisent un code produit diffrent, mais pas
  toujours : les vieilles cartes New Media Bus Toaster (qui sont
  supportes) ne sont pas facilement distinguables des actuelles cartes
  Bus Toaster (non supportes).


    Adaptec APA-1450A, APA-1460, APA-1460A/B/C/D SlimSCSI (aha152x_cs)

    Adaptec SlimSCSI 1480 Cardbus (apa1480_cd, exprimental, ncessite
     le noyau 2.2.2 ou plus)

    Adaptateur Digital SCSI II

    Eiger Labs SCSI (qlogic_cs)

    Epson SC200 (qlogic_cs)

    Future Domain SCSI2GO (fdomain_cs)

    IBM SCSI (fdomain_cs)

    Cartes Iomega ZIP et JAZ (PPA3) (aha152x_cs)

    IO-DATA PCSC-II, PCSC-II-L

    IO-DATA CDG-PX44/PCSC CD-ROM

    Logitec LPM-SCSI2

    Logitec LCD-601 CD-ROM

    MACNICA mPS110, mPS110-LP SCSI (qlogic_cs)

    Melco IFC-SC2, IFC-DC

    Midori CN-SC43 (qlogic_cs)

    NEC PC-9801N-J03R (qlogic_cs)

    New Media Bus Toaster SCSI (cartes plus anciennes uniquement)
     (aha152x_cs)

    New Media Toast 'n Jam (SCSI uniquement) (aha152x_cs)

    Noteworthy Bus Toaster SCSI (aha152x_cs)

    Panasonic KXL-D740, KXL-DN740A, KXL-DN740A-NB 4X CD-ROM

    Pioneer PCP-PR1W, PCP-PR2W CD-ROM

    Qlogic FastSCSI (qlogic_cs)

    Raven CD-Note 4X (qlogic_cs)

    RATOC REX-9530 SCSI-2 (qlogic_cs)

    Simple Technologies SCSI (fdomain_cs)


    Sony CD-ROM Discman PRD-250

    Taxan ICD-400PN

    Toshiba NWB0107ABK, SCSC200B, SCSC200B (qlogic_cs)


  2277..99..  AAddaappttaatteeuurrss AATTAA//IIDDEE ccddrroomm

  Vous devez avoir au moins le noyau 1.3.72



    Argosy EIDE CD-ROM (ide_cs)

    Caravelle CD-36N (ide_cs)

    CNF CARDport CD-ROM (ide_cs)

    Creative Technology CD-ROM (ide_cs)

    Digital Mobile Media CD-ROM (ide_cs)

    EXP CD940 CD-ROM (ide_cs, certaines marchent, d'autres pas)

    EXP Traveler 620 CD-ROM (ide_cs)

    H45 Technologies Quick 2x CD-ROM (ide_cs)

    H45 Technologies QuickCD 16X (ide_cs)

    IBM Max 20X CD-ROM (ide_cs)

    IO DATA CDP-TX4/PCIDE, CDP-TX6/PCIDE, CDV-HDN6/PCIDE (ide_cs)

    IO DATA CDP-TX10/PCIDE, CDP-FX24/CBIDE, MOP-230/PCIDE (ide_cs)

    IO DATA HDP-1G/PCIDE, HDP-1.6G/PCIDE (ide_cs)

    Microtech International MicroCD (ide_cs)

    Microtech Mii Zip 100 (ide_cs)

    NOVAC NV-CD410 (ide_cs)

    Sony PCGA-CD5 CD-ROM (ide_cs)

    TEAC IDE Card/II (ide_cs)


  2277..1100..  CCaarrtteess mmuullttii--ffoonnccttiioonnss

  Vous devez avoir au moins le noyau 1.3.73


    3Com 3c562, 3c562B/C/D, 3c563B/C/D (3c589_cs)

    3Com Megahertz 3CCEM556, 3CXEM556, 3CCEM556B (3c589_cs)

    3Com Megahertz 3CCFEM556 (3c574_cs)

    3Com 3CCFEM656B (3c575_cb, ethernet uniquement !!)

    Accton UE2218 (pcnet_cs)


    ActionTex ComNet 33.6 (pcnet_cs)

    AnyCom Fast Ethernet + 56K Combo (pcnet_cs)

    Asus combo (pcnet_cs)

    Billionton LM5LT-10B (pcnet_cs)

    Compaq Microcom CPQ550 Modem + 10/100 LAN (xirc2ps_cs)

    Dayna Communicard (pcnet_cs)

    D-Link DME336T, DMF560TX (pcnet_cs)

    Gateway Telepath Combo (smc91c92_cs)

    Grey Cell GCS3400 (pcnet_cs)

    GVC LAN modem (pcnet_cs)

    IBM Home and Away, Home and Away 28.8 (pcnet_cs)

    IO DATA PCEM-336T (pcnet_cs)

    Intel EtherExpress PRO/100 LAN/Modem (xirc2ps_cs)

    Linksys LANmodem 28.8 (PCMLM28), 33.6 (PCMLM336) (pcnet_cs)

    Linksys EtherFast LANmodem 56K (PCMLM56) (pcnet_cs)

    Megahertz/U.S. Robotics EM1144, EM3288, EM3336 (smc91c92_cs)

    Motorola Mariner (smc91c92_cs)

    Motorola Marquis (3c589_cs)

    Ositech Jack of Diamonds, Jack of Hearts (smc91c92_cs)

    Ositech Jack of Spades CardBus (epic_cb, exprimental, ncessite le
     noyau 2.2.x ou plus)

    PREMAX LAN modem (pcnet_cs)

    Psion V.34 Gold Card (pcnet_cs)

    Psion Gold Card Netglobal 56K+10Mb (pcnet_cs)

    Rover ComboCard 33.6 (pcnet_cs)

    TDK 3000/3400/5670 (pcnet_cs)

    Telecom Device SuperSocket LM336 (pcnet_cs)

    Xircom CreditCard CEM28, CEM33, CEM56 (xirc2ps_cs)

    Xircom RealPort REM10BT, REM56G-100 (xirc2ps_cs)

    Xircom RBEM56G-100BTX, CBEM56G-100BTX (tulip_cb, exprimental,
     ncessite le noyau 2.2.x ou plus)


  2277..1111..  LLeecctteeuurrss ddee ccaarrtteess AATTAA//IIDDEE

  Ces lecteurs de cartes sont supports  partir du noyau 1.3.72. Les
  cartes Flash-ATA et les cartes rotating-media sont supportes. Les
  trs vieux disques Western Digital 40MB ne sont pas supports car ils
  ne sont pas conformes aux spcifications PCMCIA ATA.


  2277..1122..  CCaarrtteess iinntteerrffaaccee IIDDEE//AATTAA


    Archos Zip100 MiniDrive (ide_cs)

    Microtech International XpressDock (ide_cs)

    DataStor Technology PCMCIA ATA/ATAPI Card (ide_cs)

    Creo DNBoy (ide_cs)

    GREYSTONE DD-25 (ide_cs)

    Shining Technology CitiDISK 250PE (ide_cs)

    Sicon Periperal Micro Mate (ide_cs)

  2277..1133..  CCaarrtteess ppoorrtt ppaarraallllllee

  Voir l'annexe concernant les systmes port parallle supports


  2277..1144..  CCaarrtteess ddiivveerrsseess


    GemPlus GPR400 Smart Card Reader
     <http://www.linuxnet.com/smartcard/code.html> (Wolf Geldmacher
     wgeldmacher@paus.ch)

    IBM Smart Capture (iscc_cs) (Koji Okamura oka@ec.kyushu-u.ac.jp)

    IBM Etherjet (cs89x0_cs) (Danilo Beuche danili@cs.uni-magdeburg.de)

    National Instruments DAQcard700
     <ftp://ftp.rtlinux.org/pub/rtlinux/sources/DAQCard700/> (Oleg
     Subbotin)

    Netwave AirSurfer Plus (asplus_cs)
     <http://ipoint.vlsi.uiuc.edu/wireless/asplus.html> (Jay Moorman
     jrmoorma@uiuc.edu)

    New Media Bus Toaster SCSI (new version) (sym53c500_cs) (Tim Corner
     tcorner@via.at)

    New Media BASICS SCSI (sym53c500_cs) (Tim Corner tcorner@via.at)

    Nokia/InTalk ST-500A  <http://www.absoval.com/linux-wlan> (Mark
     Mathews mark@absoval.com)

    Proxim RangeLAN2 and Symphony wireless LAN cards
     <http://www.komacke.com/distribution.html> (Dave Koberstein
     davek@komacke.com)

    RATOC REX-9590 (iscc_cs) (Koji Okamura oka@nanotsu.kobe-u.ac.jp)

    Samsung MagicWave SWL-1000N  <http://www.absoval.com/linux-wlan>
     (Mark Mathews mark@absoval.com)

    Silicom SPE Ethernet, SEM EtherModem, SES EtherSerial
     <http://www.silicom.co.il/linux.htm>

    SIMA TECH SCSI9000 (sym53c500_cs) (Tim Corner tcorner@via.at)

    SST 5136-DN-PC DeviceNet Interface (ss5136_cs)
     <http://www.gnofn.org/~marksu/dn5136man.html> (Mark Sutton
     Mark.Sutton@laitram.com)

    Trimble Mobile GPS (utilise le pilote srie/modem)

    Y-E Data FlashBuster floppy drive adapter (floppy_cs) (David
     Bateman dbateman@eng.uts.edu.au)

    Zoom Telephonics ZoomAir 4000  <http://www.absoval.com/linux-wlan>
     (Mark Mathews mark@absoval.com)


  2277..1155..  EEnn ccoouurrss ......

  Des gens travaillent sur les cartes suivantes:

    Roland SCP-55 MIDI (Toshiaki Nakatsu ir9k-nkt@asahi.net.or.jp)

    CyberRom CD-ROM (David Rowntree rowntree@dircon.co.uk)

    IO DATA PCSC-II (Katayama Nobuhiro kata-n@po.iijnet.or.jp)

    Macnica mPS-1x0 (Katayama Nobuhiro kata-n@po.iijnet.or.jp)

    Proxim RangeLAN/2
     <http://students.ou.edu/D/James.R.Duchek-1/rangelan2.html> (Jim
     Duchek jimducheck@primary.net)

    TView Preso (Brenden Tuck friar@zendragon.com)


  2277..1166..  NNoonn ssuuppppoorrttss


    Adaptec/Trantor APA-460 SlimSCSI

    Eiger Labs SCSI w/FCC ID 436..

    New Media .WAVjammer et toutes les autres cartes son

    New Media LiveWire+

    Nikon CoolPix100

    Panasonic KXL-D720, KXL-D745, KXL-D783

    SMC 8016 EliteCard

    Cartes ethernet/modem Xircom CE II

    Carte ethernet CE-10BT



  2288..  AAnnnneexxee CC.. DDiissppoossiittiiffss ssuuppppoorrttss ssuurr llee ppoorrtt ppaarraallllllee


  De plus en plus, le port parallle est utilis pour y connecter
  d'autres appareils que les imprimantes. Pour supporter ce port
  parallle, des pilotes de priphriques sont mis au point afin que ces
  appareils puissent fonctionner.  Cette annexe prsente les appareils
  pour lesquels un support parallle a t crit.

  Soyons clair : les imprimantes ne font pas partie de cette annexe car
  elles ne sont pas supportes par des projets de support sur port
  parallle.

  Allez galement vrifier les pages suivantes pour avoir plus
  d'informations sur le support du port parallle sous Linux
  <http://www.torque.net/parport>. Vous y trouverez :

    Des dispositifs IDE pour port parallle (paride,
     <http://www.torque.net/parport/paride.html>)

    Un support pour dispositifs SCSI sur port parallle (parscsi,
     <http://www.torque.net/parport/parscsi.html>)


  2288..11..  CCaarrttee rrsseeaauuxx ((EEtthheerrnneett))


    Adaptateur Accton EtherPocket

    Adaptateur ethernet AT-Lan-Tec/RealTek sur port parallle

    Adaptateur ethernet D-Link DE600/DE620 sur port parallle


  2288..22..  DDiissqquueess dduurrss



    H45 Quick HD

    Disques KingByte IDE/ATAPI

    Disque dur portable KT Technologies PHd

    Disques durs MicroSolutions

    SyQuest EZ-135

    SyQuest EZ-230

    SyQuest SparQ

    Disque dur externe ValueStor


  2288..33..  LLeecctteeuurrss ddee bbaannddeess



    Lecteur de bandes Hewlett-Packard Colorado Tracker 250 (sauf le
     T1000e)

    Lecteur de bandes Hewlett-Packard HP Colorado 5GB

    Lecteur de bandes Iomega Ditto

    Lecteurs de bandes MicroSolutions backpack 8000t, 8000td


  2288..44..  LLeecctteeuurrss ddee ccddrroommss



    Freecom Power CD

    Freecom Traveller CD-ROM

    H45 Quick CD

    Hewlett-Packard HP 7100e/7200e CD-R

    KingByte IDE/ATAPI CD-ROMs

    MicroSolutions CD-ROM. Les modles 163550 et ultrieurs sont
     supports par le pilote paride. Pour les modles 160550 et 162550,
     des pilotes spars existent.

    Disque MicroSolutions PD/CD

    SyQuest SyJet


  2288..55..  DDiissqquueess eexxttrraaccttiibblleess



    Avatar Shark 250

    Imation Superdisk

    Disques Iomega ZIP, ZIP Plus


  2288..66..  AAddaappttaatteeuurrss IIDDEE



    Produits Arista ParaDrive

    Disques DataStor Commuter

    Produits Fidelity International Technologies TransDisk

    Freecom IQ Cable Parallel

    Adaptateur IDE port parallle Shuttle Technology EPAT/EPEZ

    Adaptateur IDE port parallle Shuttle Technology EPIA


  2288..77..  AAddaappttaatteeuurrss SSCCSSII



    Cble adaptateur Adaptec APA-348 mini-SCSI plus
     Pilote de priphrique sur le site
     <http://www.torque.net/parpart/parscsi.html>

    Cble adaptateur Adaptec APA-358 mini-SCSI EPP
     Pilote de priphrique disponible sur le site
     <http://www.torque.net/parpart/parscsi.html>

    Adaptateur SCSI port parallle Shuttle Technology EPSA-2
     Pilote de priphrique disponible sur le site
     <http://www.torque.net/parpart/parscsi.html>

    Adaptateur SCSI port parallle Shuttle Technology EPST
     Pilote de priphrique disponible sur
     <http://www.torque.net/parpart/parscsi.html>




  2288..88..  CCaammrraa ddiiggiittaallee



    Connectix QuickCam


  2288..99..  CCaarrtteess ppoorrtt ppaarraallllllee PPCCMMCCIIAA

  Le pilote parport_cs ncessite le noyau 2.2.x ou +.


    Quatech SPP-100

    IOtech DBK35, WBK20A


  2299..  AAnnnneexxee DD.. DDiissppoossiittiiffss PPlluugg aanndd PPllaayy

  Pour les gens qui ont du mal  travailler avec des dispositifs Plug
  and Play, les utilitaires ISA PnP crits par Peter Fox sont
  disponibles. Extrait du fichier README :


  Ces logiciels permettent aux dispositifs Plug and Play d'tre configurables
  sur une machine Linux.
  Ce logiciel convient pour tous les systmes, qu'ils contiennent ou non un BIOS PnP.


  Les commandes ont t prises dans la spcification Plug and Play ISA
  Version 1.0a.  Pour plus d'informations sur les utilitaires ISA PnP,
  voyez le site de Peter Fox:  <http://www.roestock.demon.co.uk/isap
  nptools/>.  Faites-moi connatre quel matriel (non support sous
  Linux) on pourrait faire marcher grce  ces utilitaires. Ce matriel
  sera mentionn dans cette annexe.

  3300..  AAnnnneexxee EE.. MMaattrriieell iinnccoommppaattiibbllee aavveecc LLiinnuuxx

  Certains fabricants de matriel ont cr des priphriques qui ne sont
  compatibles qu'avec MS-Dos et Windows 95/98. Ceux-ci semblent n'muler
  que la partie normalement disponible des priphriques  l'aide de
  paquetages logiciels vendus en mme temps. Leurs spcifications ne
  sont pas donnes et il est pratiquement impossible d'crire des
  pilotes pour ces dispositifs. Ci-dessous une liste de priphriques
  connus comme tant incompatibles avec Linux.

  Autrement dit, il est judicieux d'viter les matriels o il est
  spcifi des choses comme  ncessite Windows 95  ou bien 
  uniquement pour Windows .



    Imprimantes

    Brother HL-820

    Canon LBP-465

    Les imprimantes HP Desjet 710, 720, 820 et 1000 (bien que
     spcifies seulement pour Windows) sont supportes sous Linux.
     Voyez <http://www.httptech.com/ppa>. Faites attention: le support
     n'en est qu'au dbut de son dveloppement.

    Lexmark 1000


    Lexmark 3200. Sous windows cette imprimante possde un pilote
     d'mulation pour HP500 et HP500C. Sous Linux cette imprimante ne
     fonctionne qu'en utilisant ces pilotes.

    Lexmark 5000

    Lexmark CJ5000 (ColorJet)

    OkiData OkiPage 4w

    Sharp JX-9210

    Modems

    Les cartes PCMCIA 3Com 3CXM356/3CCM356, 3CCM356/3CCm656

    AOpen FM56-P et FM56-H

    Le winmodem AT&T/Lucent

    Modem interne Boca Research 28.8 (modle MV34AI)

    Modem interne Boca Research 33.6 (modle MV34) (Joe Harjung a
     russi en configurant le modem sous Win95 puis en redmarrant sous
     Linux avec le modem toujours en activit. Filippo utilise ce modem
     directement sous Linux sans problmes et sans redmarrage  partir
     de Windows. J'ai vraiment besoin de plus d'informations sur ces
     modems Boca Research.)
     Le modem Boca Research 33.6 (modle M336I) est mentionn comme
     fonctionnant sous Linux. La seule chose  faire est de dsactiver
     le Plug and Play. Voici les spcifications du modem:

    Trois autocollants avec "MC2920A-3.3", "E6030D 4035-01" et "1721
     8011 A"

    Circuits se trouvant sur la carte

    Cirrus Logic CL-MD3450D-SC-B

    Cirrus Logic MD1724-11VC-D

    Datatronic VLM301-1??

    Omron G5V-1 (2 d'entr'elles)

    AST (?) M628032-20E1

    Cirrus Logic CL-MD4450C-SC-A

    Abracon 23-040-20

    deux places vides pour des circuits additionnels, l'un d'entr'eux
     devant tre un Cirrus Logic CL-MD1724D

    4 jumpers pour la slection du port COM

    10 jumpers pour la slection de l'IRQ

    d'autres jumpers  fonction inconnue

    Compaq 192 PCMCIA modem/serial card

    HP Fastmodem D4810B

    Carte IBM Mwave ("Dolphin"). Cette carte est une combinaison pour
     le son, le modem, le fax, le contrle vocal et la dicte. Le
     programme remplace une partie de la fonctionnalit du matriel et
     ds lors ce programme doit tre charg pour que tout fonctionne.

    Modem Multiwave Innovation CommWave V.34 (
     <http://www.multiwave.com/>)

    Carte PCMCIA Megahertz XJ/CC2560

    Carte PCMCIA modem/srie New Media Winsurfer

    Rockwell SoftK56

    Srie des modems US Robotics Winmodem

    Modem Zoltrix 33.6 Win HSP Voice/Speaker Phone

    Zoltrix Phantom 56K, modle FM-HSP56PCI, circuit PCTel (PPCCII

  3311..  GGlloossssaaiirree


     AAGGPP
        Accelerated Graphics Port (Port Graphique Acclr). Un
        mcanisme d'interconnexion de bus conu pour amliorer les
        performances des applications graphiques 3D. AGP est un bus
        ddi pour les changes entre le sous-systme graphique et le
        circuit logique.
        <http://www.euro.dell.com/intl/euro/r+d/r+dnews/vectors/vect_2-1/v2-1_agp.htm>

     AATTAAPPII
        AT Attachment Packet Interface (AT Interface de Liaison par
        Paquets). Un nouveau protocole de contrle des dispositifs de
        mmoire de masse, similaire aux protocoles SCSI. Il est
        construit  partir de l'interface ATA (AT Attachment), le nom
        ANSI officiel pour l'interface IDE dveloppe pour les disques
        durs. ATAPI est habituellement utilis pour les disques durs,
        les cdroms, les bandes et d'autres dispositifs.

     AATTMM
        Asynchronous Transfer Mode (Mode de Transfert Asynchrone)

     CCDDDDAA
        Compact Disk Digital Audio. Capacit des graveurs de cdroms pour
        lire des pistes audio.

     DDMMAA
        Direct Memory Access (Accs  la Mmoire Direct)

     EEGGAA
        Enhanced Graphics Adapter (Adaptateur Graphique Amlior)

     EEIIDDEE
        Enhanced IDE (IDE amlior)

     EEIISSAA
        Extended Industry System Architecture (Architecture Systme
        Industriel tendu)

     FFDDDDII
        Fiber Distributed Data Interface (rseau local  haute vitesse)

     IIDDEE
        Integrated Drive Electronics (lectronique de Pilote Intgre).
        Chaque pilote a son contrleur intgr.


     IISSAA
        Industry System Architecture (Architecture de Systme
        Industriel)

     IISSDDNN
        Integrated Services Digital Network (Rseau Numrique 
        Intgration de Services : RNIS)

     MMCCAA
        MicroChannel Architecture (Architecture MicroChannel)

     MMFFMM
        Modified Frequency Modulation (Modulation de Frquence Modifie)

     MMMMXX
        Multimedia extensions. Ajout  la nouvelle gnration de
        processeurs Intel Pentium. Donne une meilleure qualit audio et
        vido.

     PPCCII
        Peripheral Component Interconnect (Interconnexion de Composants
        Priphriques). Bus 32 bits conu par Intel. On peut trouver des
        informations sur le site  <http://www.pcsig.com> et sur le site
        <http://infoserver.ee.siue.edu/~jbutter/EE580_1.html>.

     RRAAIIDD
        Redudant Arrays of Inexpensive Disks (Assemblage Redondant de
        Disques conomiques). L'ide de base de RAID est de combiner
        plusieurs petits disques durs conomiques en un assemblage de
        faon  obtenir des performances suprieures  celles d'un
        disque de grande capacit et onreux. Il existe cinq types
        d'architectures, de RAID-1  RAID-5. Un assemblage de disques
        non-redondant est rfrenc comme RAID-0. Certains systmes RAID
        peuvent combiner plusieurs formats.
        <http://www.uni-mainz.de/~neuffer/scsi/what_is_raid.html>

     PPPPAA
        Printing Performance Architecture (Architecture de Performance
        d'Impression). Protocole dvelopp par Hewlett Packard pour la
        srie des imprimantes DeskJet. Dans le principe, le protocole
        dplace le traitement des donnes de bas niveau vers
        l'ordinateur hte plutt que vers l'imprimante.  Ceci permet
        d'avoir une imprimante  bas cot, ayant peu de mmoire, peu de
        puissance de calcul et un pilote de priphrique souple
        d'utilisation. Cependant cela se paye au dtriment de la
        compatibilit. La dcision de HP fut de dvelopper des pilotes
        uniquement pour Windows 95, pour cette imprimante.

     RRLLLL
        Run Length Limited (Longueur de Course Limite)

     SSCCSSII
        Small Computer Systems Interface (Interface Systmes Petits
        Ordinateurs). Une interface standard conue pour tous les
        priphriques d'un ordinateur. Cela rend possible l'utilisation
        d'un seul adaptateur pour tous les priphriques.
        <http://www.uni-mainz.de/~neufer/scsi/what_is_scsi.html>

     SSVVGGAA
        Super Video Graphics Adapter

     UUAARRTT
        Universal Asynchronous Receiver Transmitter
        (transmetteur/rcepteur asynchrone universel)


     UUSSBB
        Universal Serial Bus (Bus Srie Universel). Pas encore support
        sous Linux (NdT: en cours dans les noyaux 2.3.xx)

     VVGGAA
        Video Graphics Adapter (Adaptateur Graphique Vido)

     VVLLBB
        VESA Local Bus. Utilis dans quelques PC 486

     WWOORRMM
        Write Once Read Many (crit Une seule fois, Lit Plusieurs fois)






















































  Linux IPCHAINS-HOWTO
  Paul Russell, ipchains@rustcorp.com
  Version franaise par Arnaud Launay, asl@launay.org
  v1.0.7, 12 mars 1999

  Ce document dcrit l'obtention, l'installation et la configuration du
  logiciel amlior de chanes pare-feu IP pour Linux, et donne quelques
  ides sur l'utilisation que vous pouvez en faire.
  ______________________________________________________________________

  Table des matires























































  1. Introduction

     1.1 Qu'est ce que c'est ?
     1.2 Pourquoi ?
     1.3 Comment ?
     1.4 O ?

  2. Bases du filtrage de paquets

     2.1 Qu'est ce que c'est ?
     2.2 Pourquoi ?
     2.3 Comment ?
        2.3.1 Un noyau avec le filtrage de paquets
        2.3.2 ipchains
        2.3.3 Rendre les rgles permanentes

  3. Je suis troubl ! Routage, camouflage, redirection de ports, ipautofw...

     3.1 Le guide du camouflage en 3 lignes par Rusty
     3.2 Publicit gratuite : le zle de WatchGuard
     3.3 Configurations classiques de type pare-feu
        3.3.1 Rseaux privs : caches traditionnels
        3.3.2 Rseaux privs : caches transparents
        3.3.3 Rseaux privs : camouflage
        3.3.4 Rseaux publics
        3.3.5 Services internes limits
     3.4 Pour plus d'informations sur le camouflage

  4. Chanes de protection IP

     4.1 Comment les paquets traversent les filtres
        4.1.1 Utiliser ipchains
        4.1.2 Oprations sur une rgle simple
        4.1.3 Spcifications du filtrage
           4.1.3.1 Spcifier les adresses IP source et destination
           4.1.3.2 Spcifier l'inversion
           4.1.3.3 Spcifier le protocole
              4.1.3.3.1 Spcifier les ports UDP et TCP
              4.1.3.3.2 Spcifier les types et codes ICMP
           4.1.3.4 Spcifier une interface
           4.1.3.5 Spcifier uniquement des paquets TCP SYN
           4.1.3.6 Utiliser les fragments
        4.1.4 Effets de bord du filtrage
           4.1.4.1 Spcifier une destination
           4.1.4.2 Enregistrement des paquets
           4.1.4.3 Manipuler le type de service
           4.1.4.4 Marquage d'un paquet
           4.1.4.5 Oprations sur une chane entire
           4.1.4.6 Crer une nouvelle chane
           4.1.4.7 Supprimer une chane
           4.1.4.8 Vider une chane
           4.1.4.9 Afficher une chane
           4.1.4.10 Remise  zro des compteurs
           4.1.4.11 Choisir une police
        4.1.5 Oprations sur le camouflage
        4.1.6 Vrifier un paquet
        4.1.7 Voir ce qui arrive avec des rgles multiples prcises en une seule fois
     4.2 Exemples utiles
        4.2.1 Utiliser ipchains-save
        4.2.2 Utiliser ipchains-restore

  5. Divers

     5.1 Comment organiser vos rgles pare-feu
     5.2 Ce qu'il ne faut pas filtrer
        5.2.1 Les paquets ICMP
        5.2.2 Connexions TCP au DNS (serveur de nom)
        5.2.3 Cauchemars du FTP
     5.3 Filtrer le ping de la mort (Ping of Death)
     5.4 Filtrer teardrop et bonk
     5.5 Filtrer les bombes  fragments
     5.6 Changer les rgles pare-feu
     5.7 Comment mettre en place la protection contre l'IP spoof ?
     5.8 Projets avancs
        5.8.1 SPF : Stateful Packet Filtering
        5.8.2 Modification des donnes ftp par Michael Hasenstein
     5.9 Extensions futures

  6. Problmes classiques

     6.1 ipchains -L est gel !
     6.2 Le camouflage/redirection ne fonctionne pas !
     6.3 -j REDIR ne marche pas !
     6.4 Les interfaces joker ne fonctionnent pas !
     6.5 TOS ne fonctionne pas !
     6.6 ipautofw et ipportfw ne fonctionnent pas !
     6.7 XosView ne marche pas !
     6.8 Erreur de segmentation avec -j REDIRECT !
     6.9 Je ne peux pas modifier les temps d'attente du camouflage !
     6.10 Je veux firewaller IPX !

  7. Un exemple srieux

     7.1 L'arrangement
     7.2 Buts
     7.3 Avant le filtrage des paquets
     7.4 Filtrage de paquets pour les paquets traversants
        7.4.1 Configurer les sauts de la chane de transmission
        7.4.2 Dfinir la chane icmp-acc
        7.4.3 Bon (interne) vers ZDM (serveurs)
        7.4.4 Mauvais (extrieur) vers ZDM (serveurs)
        7.4.5 Bon (intrieur) vers Mauvais (extrieur).
        7.4.6 ZDM vers Bon (intrieur)
        7.4.7 ZDM vers Mauvais (extrieur)
        7.4.8 Mauvais (extrieur) vers Bon (intrieur)
        7.4.9 Filtrage de paquets pour la machine Linux elle-mme
           7.4.9.1 Interface Mauvais (extrieur)
           7.4.9.2 Interface ZDM
           7.4.9.3 Interface Bon (intrieur)
     7.5 Finalement

  8. Annexe : diffrences entre ipchains et ipfwadm

     8.1 Guide de rfrence rapide
     8.2 Exemples de commandes ipfwadm traduites

  9. Annexe : utiliser le script ipfwadm-wrapper

  10. Annexe : remerciements



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ceci est le Linux IPCHAINS-HOWTO ; voyez la section ``O ?'' pour le
  site principal, qui dtient la dernire version.  Vous devriez
  galement lire le Linux NET-3-HOWTO. Les howtos IP-Masquerading, PPP-
  HOWTO, l'Ethernet-HOWTO et le Firewall HOWTO peuvent aussi tre
  intressants  lire (une fois de plus, la FAQ de alt.fan.bigfoot peut
  l'tre aussi).
  Si le filtrage des paquets vous semble dpass, lisez la section
  ``Pourquoi ?'', la section ``Comment ?'', et lisez les titres de la
  section ``Chanes de protection IP''.


  Si vous vous adaptez en partant d'ipfwadm, lisez la section
  ``Introduction'', la section ``Comment ?'', et les annexes des
  sections ``Diffrences entre ipchains et ipfwadm'' et ``Utiliser le
  script `ipfwadm-wrapper'''.


  11..11..  QQuu''eesstt ccee qquuee cc''eesstt ??

  Le Linux ipchains est une rcriture du code de firewalling de l'IPv4
  de Linux (qui avait t principalement emprunt  BSD) et une
  rcriture d'ipfwadm, lui mme rcriture d'ipfw de BSD, je crois. Il
  est ncessaire pour administrer le filtrage des paquets IP dans les
  noyaux Linux  partir de la version 2.1.102.


  11..22..  PPoouurrqquuooii ??

  L'ancien code de firewalling de Linux ne pouvait grer les fragments,
  utilisait des compteurs 32 bits (au moins sur Intel), ne permettait
  pas la spcification de protocoles autres que TCP, UDP ou ICMP, ne
  pouvait faire de grands changements atomiquement, ne permettait pas la
  spcification de rgles inverses, avait quelques bizarreries, et
  pouvait tre une catastrophe  grer (le rendant propice aux erreurs
  des utilisateurs).


  11..33..  CCoommmmeenntt ??

  Actuellement le code se trouve dans le noyau principal  partir du
  2.1.102.  Pour la srie des noyaux 2.0, vous devrez rcuprer une
  correction pour le noyau sur une page web. Si votre noyau 2.0 est plus
  rcent que la correction rcupre, la correction ancienne devrait
  fonctionner ; cette partie des noyaux 2.0 est relativement stable (la
  correction pour le noyau 2.0.34 fonctionne bien sur le noyau 2.0.35).
  Cependant, le correctif 2.0 est incompatible avec les correctifs pour
  l'ipportfw et l'ipautofw, je recommande donc de ne pas l'appliquer, 
  moins que vous n'ayez rellement besoin de l'une des fonctionnalits
  offertes par ipchains.


  11..44..  OO ??

  La page officielle est la Page des chanes de filtrage IP de Linux
  <http://www.rustcorp.com/linux/ipchains>.


  Il y a une liste de diffusion pour les rapports d'erreurs, les
  discussions, le dveloppement et l'utilisation. Vous pouvez rejoindre
  la liste de diffusion en envoyant un message contenant le mot
  ``subscribe''  ipchains-request de rustcorp.com. Pour crire  la
  liste utilisez `ipchains'  la place de `ipchains-request'.


  22..  BBaasseess dduu ffiillttrraaggee ddee ppaaqquueettss

  22..11..  QQuu''eesstt ccee qquuee cc''eesstt ??

  Tout le trafic circulant dans un rseau est envoy sous la forme de
  ppaaqquueettss. Par exemple, pour charger ce paquetage (disons qu'il fait
  50k) vous avez d recevoir plus ou moins 36 paquets de 1460 octets
  chacun (pour prendre des valeurs au hasard).
  Le dbut de chaque paquet prcise o celui-ci va, d'o il vient, le
  type du paquet, et divers autres dtails administratifs. Le dbut de
  chaque paquet est appel l'eennttttee. Le reste du paquet, contenant les
  donnes  transmettre, est couramment appel le ccoorrppss.


  Quelques protocoles, comme le TTCCPP, qui est utilis pour le trafic web,
  mail et les connexions  distance, utilisent le concept de `connexion'
  -- avant que le moindre paquet de donnes ne soit envoy, divers
  paquets de configuration (avec des enttes spciales) sont changs en
  disant `je veux me connecter', `OK' et `Merci'. Ensuite les paquets
  normaux sont changs.


  Un filtre de paquet est un logiciel qui regarde l'_e_n_t__t_e des paquets
  lorsque ceux-ci passent, et dcide du destin du paquet entier. Il peut
  dcider de le rreeffuusseerr (le supprimer comme s'il n'avait jamais t
  reu), de l'aacccceepptteerr (le laisser circuler) ou de le rreejjeetteerr (effet
  identique au refus, mais il est prcis  la source que le paquet n'a
  pas t accept).


  Sous Linux, le filtrage des paquets est inclus dans le noyau, et il y
  a diverses choses que nous pouvons faire avec les paquets, mais le
  principe gnral (regarder les enttes et dcider du destin du paquet)
  est toujours prsent.


  22..22..  PPoouurrqquuooii ??

  Contrle. Scurit. Vigilance.



     CCoonnttrrllee ::
        Lorsque vous utilisez un ordinateur sous Linux pour connecter
        votre rseau interne  un autre rseau (disons, l'Internet) vous
        aurez l'opportunit de permettre certains types de trafics, et
        d'interdire les autres. Par exemple, l'entte d'un paquet
        contient l'adresse de destination du paquet, et vous pouvez
        ainsi viter que des paquets aillent vers un certain endroit du
        rseau extrieur. Comme autre exemple, j'utilise Netscape pour
        accder aux archives de Dilbert. Il y a des publicits provenant
        de doubleclick.net sur la page, et Netscape perd du temps en les
        chargeant gentiment. Dire au filtre des paquets de ne pas
        autoriser la circulation de paquets provenant ou allant vers
        doubleclick.net rsoud le problme (il y a cependant de
        meilleurs moyens pour y parvenir).


     SSccuurriitt ::
        Lorsque votre machine Linux est le seul rempart entre le chaos
        de l'Internet et votre rseau propre et bien ordonn, il est
        utile de savoir que vous pouvez restreindre ce qui vient sonner
         votre porte. Par exemple, vous pouvez autoriser tout ce qui
        sort de votre rseau, mais vous pouvez vous inquiter du fort
        connu 'Ping of Death' pouvant provenir d'intrus extrieurs.
        Comme autre exemple, vous pouvez interdire aux personnes
        extrieures de se connecter en telnet sur votre machine Linux,
        mme si tous vos comptes ont des mots de passe ; peut-tre
        dsirerez-vous (comme la plupart des gens) tre un simple
        observateur sur l'Internet, et non un serveur (de bonne volont
        ou non) -- simplement en ne laissant personne se connecter, le
        filtrage de paquets rejetant tous les paquets entrants utiliss
        pour crer des connexions.

     VViiggiillaannccee ::
        Parfois, une machine mal configure du rseau local dcidera
        d'envoyer des paquets au monde extrieur. Il est sympathique de
        pouvoir spcifier au filtre de paquets de vous informer si
        quelque chose d'anormal se produit ; vous pourrez ventuellement
        y faire quelque chose, ou bien laisser libre cours  la simple
        curiosit.


  22..33..  CCoommmmeenntt ??

  22..33..11..  UUnn nnooyyaauu aavveecc llee ffiillttrraaggee ddee ppaaqquueettss

  Vous aurez besoin d'un noyau disposant du nouveau code de chanes de
  protection IP. Vous pouvez savoir si le noyau que vous utilisez
  actuellement en dispose en cherchant le fichier
  `/proc/net/ip_fwchains'. Si ce fichier existe, alors c'est tout bon.


  Sinon, vous devez crer un noyau contenant le code de chanes de
  protection IP.  Tout d'abord, rcuprez les sources du noyau que vous
  dsirez. Si vous avez un noyau dont le numro est suprieur ou gal 
  2.1.102, vous n'aurez pas besoin de le corriger (il se trouve dj
  inclus dans le noyau). Autrement, appliquez le correctif que vous
  trouverez sur la page web liste plus haut, et utilisez la
  configuration dtaille ci-dessous. Si vous ne savez pas comment le
  faire, ne paniquez pas -- lisez le Kernel-HOWTO.



  Les options de configuration que vous devez utiliser pour les _n_o_y_a_u_x
  _d_e _s__r_i_e _2_._0 sont :


  ______________________________________________________________________
          CONFIG_EXPERIMENTAL=y
          CONFIG_FIREWALL=y
          CONFIG_IP_FIREWALL=y
          CONFIG_IP_FIREWALL_CHAINS=y
  ______________________________________________________________________



  Pour les sries de _n_o_y_a_u_x _2_._1 ou _2_._2 :

  ______________________________________________________________________
          CONFIG_FIREWALL=y
          CONFIG_IP_FIREWALL=y
  ______________________________________________________________________




  L'outil ipchains parle au noyau et lui dit quels paquets filtrer.  
  moins que vous ne soyez un programmeur, ou un curieux invtr, c'est
  ainsi que vous contrlerez le filtrage des paquets.


  22..33..22..  iippcchhaaiinnss

  L'outil ipchains insre et efface des rgles dans la section de
  filtrage de paquets du noyau. Ce qui signifie que quoi que vous
  configuriez, tout sera perdu lors d'un redmarrage ; voyez la section
  ``Rendre les rgles permanentes'' pour savoir comment s'assurer que
  les rgles seront restaures au prochain lancement de Linux.

  ipchains remplace ipfwadm, qui tait utilis par l'ancien code pare-
  feu. Il y a un ensemble de scripts utiles disponibles sur le site ftp
  d'ipchains :

  ftp://ftp.rustcorp.com/ipchains/ipchains-scripts-1.1.2.tar.gz
  <ftp://ftp.rustcorp.com/ipchains/ipchains-scripts-1.1.2.tar.gz>

  Cette archive contient un script shell appell ipfwadm-wrapper qui
  vous autorisera  utiliser le filtrage de paquets comme avant. Vous ne
  devriez probablement pas utiliser ce script  moins que vous ne
  souhaitiez un moyen rapide de mettre  jour un systme utilisant
  ipfwadm (ce script est plus lent, ne vrifie pas les arguments, etc.).
  Dans ce cas, vous n'avez pas non plus besoin de ce howto.

  Voyez l'annexe ``Diffrences entre ipchains et ipfwadm'' et l'annexe
  ``Utiliser le script `ipfwadm-wrapper''' pour des dtails
  supplmentaires concernant ipfwadm.


  22..33..33..  RReennddrree lleess rrgglleess ppeerrmmaanneenntteess

  Votre configuration actuelle de pare-feu est sauve dans le noyau, et
  sera ainsi perdue lors d'un redmarrage. Je vous recommande d'utiliser
  les scripts `ipchains-save' et `ipchains-restore' pour rendre vos
  rgles permanentes. Pour ce faire, configurez vos rgles, puis
  utilisez (en tant que super-utilisateur) :



       # ipchains-save > /etc/ipchains.rules
       #




  Crez un script comme le suivant :






























  #! /bin/sh
  # Script to control packet filtering.

  # If no rules, do nothing.
  [ -f /etc/ipchains.rules ] || exit 0

  case "$1" in
      start)
          echo -n "Turning on packet filtering:"
          /sbin/ipchains-restore < /etc/ipchains.rules || exit 1
          echo 1 > /proc/sys/net/ipv4/ip_forward
          echo "."
          ;;
      stop)
          echo -n "Turning off packet filtering:"
          echo 0 > /proc/sys/net/ipv4/ip_forward
          /sbin/ipchains -X
          /sbin/ipchains -F
          /sbin/ipchains -P input ACCEPT
          /sbin/ipchains -P output ACCEPT
          /sbin/ipchains -P forward ACCEPT
          echo "."
          ;;
      *)
          echo "Usage: /etc/init.d/packetfilter {start|stop}"
          exit 1
          ;;
  esac

  exit 0




  Assurez vous que ceci est lanc suffisamment tt dans la procdure de
  lancement. Dans mon cas (Debian 2.1), j'ai cr un lien symbolique
  appell `S39packetfilter' dans le rpertoire `/etc/rcS.d' (il sera
  ainsi lanc avant S40network).


  33..  JJee ssuuiiss ttrroouubbll !! RRoouuttaaggee,, ccaammoouuffllaaggee,, rreeddiirreeccttiioonn ddee ppoorrttss,,
  iippaauuttooffww......

  Ce HOWTO a pour sujet le filtrage de paquets. Ce filtrage permet la
  prise de dcision concernant le destin d'un paquet : s'il est autoris
   passer ou non. Cependant, Linux tant le joujou pour bidouilleurs
  qu'il est, vous voudriez probablement en savoir un peu plus.


  Un des problmes est que le mme outil ("ipchains") est utilis pour
  contrler  la fois le camouflage et le cache transparent, alors que
  ce sont des notions spares du filtrage de paquets (l'implmentation
  actuelle de Linux les brouille tous les trois de faon inhabituelle,
  laissant l'impression qu'ils sont trs proches).


  Le camouflage et le cachage sont recouverts par des HOWTOs spars, et
  les possibilits de redirection automatique et de redirection de ports
  sont contrles par des outils spars, mais puisque de nombreuses
  personnes continuent  me harceler  leur propos, je vais ajouter un
  ensemble de scnarios classiques en indiquant les moments o chacun
  doit tre utilis. Les mrites de la scurit de chacun de ces
  scnarios ne seront nanmoins pas discuts ici.



  33..11..  LLee gguuiiddee dduu ccaammoouuffllaaggee eenn 33 lliiggnneess ppaarr RRuussttyy

  Ces lignes prsument que votre interface eexxtteerrnnee est appelle "ppp0".
  Utilisez ifconfig pour le vrifier, et ajustez selon votre got.



       # ipchains -P forward DENY
       # ipchains -A forward -i ppp0 -j MASQ
       # echo 1 > /proc/sys/net/ipv4/ip_forward





  33..22..  PPuubblliicciitt ggrraattuuiittee :: llee zzllee ddee WWaattcchhGGuuaarrdd

  Vous pouvez acheter des pare-feu tout faits. Un excellent est le
  FireBox de WatchGuard. C'est excellent parce que je l'apprcie, parce
  qu'il est scuris, bas sur Linux, et parce qu'ils financent la
  maintenance d'ipchains ainsi que du nouveau code pare-feu (prvu pour
  le 2.3). En bref, WatchGuard me paye  manger lorsque je travaille
  pour vous. Donc, je vous prierai de prendre leur travail en compte.

  http://www.watchguard.com <http://www.watchguard.com>



  33..33..  CCoonnffiigguurraattiioonnss ccllaassssiiqquueess ddee ttyyppee ppaarree--ffeeuu

  Vous tes petiteboite.com. Vous avez un rseau interne, et une
  connexion intermittente (PPP) simple  l'Internet
  (firewall.petiteboite.com a pour IP 1.2.3.4). Vous tes en Ethernet
  sur votre rseau local, et votre machine personnelle s'appelle
  "mamachine".


  Cette section illustrera les diffrents arrangements classiques. Lisez
  attentivement, car ils sont tous subtilement diffrents.


  33..33..11..  RRsseeaauuxx pprriivvss :: ccaacchheess ttrraaddiittiioonnnneellss

  Dans ce scnario, les paquets venant d'un rseau priv ne traversent
  jamais l'Internet, et vice versa. Les adresses IP du rseau priv
  doivent tre assignes en utilisant les adresses prives rserves par
  la RFC 1597 (cd 10.*.*.*, 172.16.*.* ou 192.168.*.*).


  La seule mthode pour que les choses soient connects  l'Internet est
  en se connectant au pare-feu, qui est la seule machine sur les deux
  rseaux qui sont connects plus loin. Vous lancez un programme (sur le
  pare-feu) appell un proxy pour ce faire (il y a des proxy (caches)
  pour le FTP, l'accs web, telnet, RealAudio, les News Usenet et autres
  services). Voyez le Firewall HOWTO.


  Tous les services auxquels vous voulez que l'Internet puisse avoir
  accs doivent tre sur le pare-feu (mais voyez ``Services internes
  limits'' plus bas).


  Exemple : autoriser l'accs web d'un rseau priv vers l'Internet.

  1. On a assign les adresses 192.168.1.* au rseau priv, avec
     mamachine tant 192.168.1.100, et l'interface Ethernet du pare-feu
     tant assigne  192.168.1.1.

  2. Un cache web (comme "squid") est install et configur sur le pare-
     feu, disons tournant sur le port 8080.

  3. Netscape sur le rseau priv est configur pour utiliser le pare-
     feu port 8080 comme cache.

  4. Le DNS n'a pas besoin d'tre configur sur le rseau priv.

  5. Le DNS doit tre configur sur le pare-feu.

  6. Le rseau priv n'a pas besoin de disposer de route par dfaut
     (passerelle).


  Netscape sur mamachine lit http://slashdot.org.

  1. Netscape se connecte sur le port 8080 du pare-feu, en utilisant le
     port 1050 de mamachine. Il demande la page web de
     "http://slashdot.org".

  2. Le cache recherche le nom "slashdot.org", et obtient
     207.218.152.131. Il ouvre alors une connexion sur cette adresse IP
     (en utilisant le port 1025 de l'interface externe du pare-feu), et
     demande la page au serveur web (port 80).

  3. En recevant la page web par sa connexion au serveur web, le pare-
     feu copie les donnes vers la connexion de Netscape.

  4. Netscape affiche la page.

  C'est--dire que du point de vue de slashdot.org, la connexion est
  ralise par 1.2.3.4 (interface PPP du pare-feu), port 1025, vers
  207.218.152.131 (slashdot.org) port 80. Du point de vue de mamachine,
  la connexion est faite de 192.168.1.100 (mamachine) port 1050, vers
  192.168.1.1 (interface Ethernet du pare-feu), port 8080.


  33..33..22..  RRsseeaauuxx pprriivvss :: ccaacchheess ttrraannssppaarreennttss

  Dans ce scnario, les paquets venant du rseau priv ne traversent
  jamais l'Internet, et vice versa. Les adresses IP du rseau priv
  doivent tre assignes en utilisant les adresses prives rserves par
  la RFC 1597 (cd 10.*.*.*, 172.16.*.* ou 192.168.*.*).


  La seule mthode pour que les choses soient connectes  l'Internet
  est en se connectant au pare-feu, qui est la seule machine sur les
  deux rseaux, qui sont connects plus loin. Vous lancez un programme
  (sur le pare-feu) appell un cache transparent pour ce faire ; le
  noyau envoie les paquets sortants au cache transparent au lieu de les
  envoyer plus loin (cd qu'il rend btard le routage).


  Le cachage transparent signifie que les clients n'ont pas besoin de
  savoir qu'il y a un proxy dans l'histoire.


  Tous les services que l'Internet peut utiliser doivent tre sur le
  pare-feu (mais voyez ``Services internes limits'' plus bas).


  Exemple : autoriser l'accs web du rseau priv vers l'Internet.


  1. On a assign les adresses 192.168.1.* au rseau priv, avec
     mamachine tant 192.168.1.100, et l'interface Ethernet du pare-feu
     tant assigne  192.168.1.1.

  2. Un proxy web transparent (je prsume qu'il existe des correctifs
     pour squid lui permettant d'oprer de cette faon, sinon, essayez
     "transproxy") est install et configur sur le pare-feu, disons
     tournant sur le port 8080.

  3. On dit au noyau de rediriger les connexions sur le port 80 du
     proxy, en utilisant ipchains.

  4. Netscape, sur le rseau priv, est configur pour se connecter
     directement.

  5. Le DNS doit tre configur sur le rseau priv (cd que vous devez
     faire tourner un serveur DNS de la mme manire que le proxy sur le
     pare-feu).

  6. La route par dfaut (passerelle) doit tre configur sur le rseau
     priv, pour envoyer les paquets au pare-feu.


  Netscape sur mamachine lit http://slashdot.org.

  1. Netscape recherche le nom "slashdot.org", et obtient
     207.218.152.131. Il ouvre alors une connexion vers cette adresse
     IP, en utilisant le port local 1050, et demande la page au serveur
     web (port 80).

  2. Comme les paquets venant de mamachine (port 1050) et allant sur
     slashdot.org (port 80) passent par le pare-feu, ils sont redirigs
     sur le proxy transparent en attente sur le port 8080. Le cache
     transparent ouvre alors une connexion (en utilisant le port local
     1025) vers 207.218.152.131 port 80 (vers lequel les paquets de
     dpart allaient).

  3. Alors que le cache reoit la page web par sa connexion avec le
     serveur web, il copie les donnes vers la connexion avec Netscape.

  4. Netscape affiche la page.

  C'est  dire que du point de vue de slashdot.org, la connexion est
  ralise par 1.2.3.4 (interface PPP du pare-feu) port 1025 vers
  207.218.152.131 (slashdot.org) port 80. Du point de vue de mamachine,
  la connexion est faite  partir de 192.168.1.100 (mamachine) port
  1050, vers 207.218.152.131(slashdot.org) port 80, mais il parle en
  fait au proxy transparent.


  33..33..33..  RRsseeaauuxx pprriivvss :: ccaammoouuffllaaggee

  Dans ce scnario, les paquets venant du rseau priv ne traversent
  jamais l'Internet sans traitement spcial, et vice versa. Les adresses
  IP du rseau priv doivent tre assignes en utilisant les adresses
  prives rserves par la RFC 1597 (cd 10.*.*.*, 172.16.*.* ou
  192.168.*.*).


  Au lieu d'utiliser un cache, nous utilisons une spcificit spciale
  du noyau nomme "camouflage" (masquerading). Le camouflage rcrit les
  paquets lorsqu'ils passent par le pare-feu, ce qui fait qu'ils
  semblent toujours venir du pare-feu lui-mme. Il rcrit ensuite les
  rponses afin qu'elles semblent venir du destinataire originel.


  Le camouflage dispose de modules spars afin de grer les protocoles
  "tranges", comme FTP, RealAudio, Quake, etc. Pour les protocoles
  vraiment difficiles  grer, la spcificit de "redirection
  automatique" (auto forwarding) peut en grer quelques-uns en
  configurant automatiquement la redirection de ports pour un ensemble
  donn de ports : voyez "ipportfw" (noyaux 2.0) ou "ipmasqadm" (noyaux
  2.1 et suprieurs).


  Tous les services auxquels vous voulez que l'Internet puisse avoir
  accs doivent tre sur le pare-feu (mais voyez ``Services internes
  limits'' plus bas).


  Exemple : autoriser l'accs web du rseau priv sur l'Internet.

  1. On a assign les adresses 192.168.1.* au rseau priv, avec
     mamachine tant 192.168.1.100, et l'interface Ethernet du pare-feu
     tant assigne  192.168.1.1.

  2. Le pare-feu est configur pour camoufler tous les paquets venant du
     rseau priv et allant sur le port 80 d'un hte sur Internet.

  3. Netscape est configur pour se connecter directement.

  4. Le DNS doit tre configur correctement sur le rseau priv.

  5. Le pare-feu doit tre la route par dfaut (passerelle) du rseau
     priv.

  Netscape sur mamachine lit http://slashdot.org.

  1. Netscape recherche le nom "slashdot.org", et obtient
     207.218.152.131. Il ouvre alors une connexion vers cette adresse
     IP, en utilisant le port local 1050, et demande la page au serveur
     web (port 80).

  2. Comme les paquets venant de mamachine (port 1050) et allant sur
     slashdot.org (port 80) passent par le pare-feu, ils sont rcrits
     pour venir de l'interface PPP du pare-feu, port 65000. Le pare-feu
     a une adresse Internet valide (1.2.3.4), donc les paquets venant de
     slashdot.org sont routs correctement.

  3. Lorsque les paquets venant de slashdot.org (port 80) sur
     firewall.petiteboite.com (port 65000) arrivent, ils sont rcrits
     pour aller sur mamachine, port 1050. La vritable magie du
     camouflage se trouve ici : il se souvient des paquets sortants
     rcrits afin de pouvoir rcrire les paquets entrants qui en sont
     la rponse.

  4. Netscape affiche la page.

  C'est  dire que du point de vue de slashdot.org, la connexion est
  ralise de 1.2.3.4 (interface PPP du pare-feu), port 65000 vers
  207.218.152.131 (slashdot.org) port 80. Du point de vue de mamachine,
  la connexion est faite entre 192.168.1.100 (mamachine) port 1050, et
  207.218.152.131 (slashdot.org) port 80.


  33..33..44..  RRsseeaauuxx ppuubblliiccss

  Dans ce scnario, votre rseau personnel fait partie de l'Internet :
  les paquets peuvent passer sans avoir  changer de rseau. Les
  adresses IP du rseau interne doivent tre assignes en utilisant un
  bloc d'adresses IP, de manire  ce que le reste du rseau sache
  comment vous envoyer des paquets.  Ceci implique une connexion
  permanente.


  Dans ce rle, le filtrage de paquets est utilis pour restreindre les
  paquets qui peuvent tre redirigs entre votre rseau et le reste de
  l'Internet, cd pour restreindre le reste de l'Internet  accder
  uniquement au serveur web qui se trouve en interne.


  Exemple : autoriser l'accs web du rseau priv vers l'Internet.

  1. Votre rseau interne dispose du bloc d'adresses IP que vous avez
     enregistr, disons 1.2.3.*.

  2. Le pare-feu est configur pour autoriser tout le trafic.

  3. Netscape est configur pour se connecter directement.

  4. Le DNS doit tre configur correctement sur votre rseau.

  5. Le pare-feu doit tre la route par dfaut (passerelle) pour le
     rseau priv.

  Netscape sur mamachine lit http://slashdot.org.

  1. Netscape recherche le nom "slashdot.org", et obtient
     207.218.152.131. Il ouvre alors une connexion vers cette adresse
     IP, en utilisant le port local 1050, et demande la page au serveur
     web, port 80.

  2. Les paquets passent par votre pare-feu, comme ils passent par
     d'autres routeurs entre vous et slashdot.org.

  3. Netscape affiche la page.

  C'est  dire qu'il n'y a qu'une seule connexion :  partir de
  1.2.3.100 (mamachine) port 1050, vers 207.218.152.131 (slashdot.org)
  port 80.


  33..33..55..  SSeerrvviicceess iinntteerrnneess lliimmiittss

  Il y a quelques trucs que vous pouvez utiliser pour autoriser
  l'Internet  accder  vos services internes, plutt que de faire
  tourner vos services internes sur le pare-feu. Ils fonctionneront soit
  avec un proxy, soit avec une approche type camouflage pour les
  connexions externes.


  L'approche la plus simple est de faire tourner un "redirecteur", qui
  est un cache de pauvre, attendant une connexion sur un port donn, et
  ouvrant une connexion sur un hte et un port interne fix, et copiant
  les donnes entre les deux connexions. Un exemple de ceci est le
  programme "redir". Du point de vue de l'Internet, la connexion est
  faite sur votre pare-feu. Du point de vue de votre serveur interne, la
  connexion est faite par l'interface interne du pare-feu sur le
  serveur.


  Une autre approche (qui ncessite un noyau 2.0 corrig pour ipportfw,
  ou un noyau 2.1 ou suprieur) est d'utiliser la redirection des ports
  du noyau. Il effectue le mme travail que "redir" d'une manire
  diffrente : le noyau rcrit les paquets lorsqu'ils passent, en
  changeant leur adresse de destination et le port pour les faire
  pointer sur un port et un hte interne.  Du point de vue de
  l'Internet, la connexion est faite sur votre pare-feu. Du point de vue
  de votre serveur interne, une connexion directe est ralise entre
  l'hte Internet et votre serveur.


  33..44..  PPoouurr pplluuss dd''iinnffoorrmmaattiioonnss ssuurr llee ccaammoouuffllaaggee

  David Ranch a crit un excellent howto tout neuf sur le camouflage,
  qui en grande partie recouvre ce howto. Vous pouvez le trouver sur
  http://www.ecst.csuchico.edu/~dranch/LINUX/index-LINUX.html
  <http://www.ecst.csuchico.edu/~dranch/LINUX/index-LINUX.html>


  J'espre pouvoir bientt le trouver hberg sous les auspices du LDP
  (Linux Documentation Project), sur http://www.metalab.unc.edu/LDP
  <http://www.metalab.unc.edu/LDP>.


  La page officielle du camouflage se trouve sur http://ipmasq.cjb.net
  <http://ipmasq.cjb.net>.


  44..  CChhaanneess ddee pprrootteeccttiioonn IIPP

  Cette section dcrit tout ce que vous avez rellement besoin de savoir
  pour construire un filtre de paquets adapt  vos besoins.


  44..11..  CCoommmmeenntt lleess ppaaqquueettss ttrraavveerrsseenntt lleess ffiillttrreess

  Le noyau commence avec trois listes de rgles : ces listes sont
  appelles cchhaanneess ddee pprrootteeccttiioonn ou juste cchhaanneess. Ces trois chanes
  sont appelles iinnppuutt (entre), oouuttppuutt (sortie) et ffoorrwwaarrdd
  (transmission). Lorsqu'un paquet arrive (disons, par une carte
  Ethernet), le noyau utilise la chane input pour dcider de son
  destin.  S'il survit  ce passage, alors le noyau dcide o envoyer le
  paquet par la suite (ceci est appel rroouuttaaggee). S'il est destin  une
  autre machine, il consulte alors la chane de transmission. Enfin,
  juste avant que le paquet ne ressorte, le noyau consulte la chane de
  sortie.


  Une chane est une vrification de rrgglleess. Chaque rgle dit `si
  l'entte de ce paquet ressemble  ceci, alors voil quoi faire de ce
  paquet'. Si la rgle ne vrifie pas le paquet, alors la rgle suivante
  dans la chane est consulte. Enfin, s'il n'y a plus de rgles 
  consulter, alors le noyau regarde la chane ppoolliiccee pour dcider ce
  qu'il doit faire.  Dans un systme orient scurit, cette police dit
  gnralement au noyau de rejeter ou de refuser le paquet.


  Pour les fans de l'art ASCII, ceci montre le chemin complet d'un
  paquet arrivant  une machine.














          -----------------------------------------------------------------------------
          |           ACCEPTER/                               interface lo |
          v           REDIRIGER                 _________                  |
  --> S --> V --> ______ --> D --> ~~~~~~~~ -->| Chane  |----> _______ -->
      o     a    |chane|    e    {Dcision}   |transfert|     |Chane |ACCEPTER
      m     l    |entre|    m    {Routage }   |_________| --->|sortie |
      m     i    |______|    a     ~~~~~~~~         |      | ->|_______|
      e     d       |        s        |             |      | |     |
      |     i       |        q        |            NON/    | |     |
      |     t       v        u        v           REJET    | |     v
      |           NON/      e    Processus                | |    NON/
      |     |     REJET      r      Local                  | |   REJET
      |     v                |        ---------------------- |
      v    NON               \ ------------------------------/
     NON



  Voici une description point par point de chaque partie :


     SSoommmmee ((cchheecckkssuumm)) ::
        C'est un test vrifiant si le paquet n'a pas t corrompu d'une
        manire ou d'une autre. S'il l'a t, il est refus.


     VVaalliiddiitt ((ssaanniittyy)) ::
        Il y a en fait un de ces tests sanitaires avant chaque chane de
        protection, mais les chanes d'entre sont les plus importantes.
        Quelques paquets malforms peuvent rendre confus le code de
        vrification des rgles, et ceux-ci sont refuss ici (un message
        est envoy au syslog si ceci arrive).


     CChhaannee dd''eennttrree ((iinnppuutt cchhaaiinn)) ::
        C'est la premire chane de protection qui teste le paquet. Si
        le verdict de la chane n'est ni DENY ni REJECT, le paquet
        continue son chemin.


     DDeemmaassqquueerraaddee ::
        Si le paquet est une rponse  un paquet prcdemment masqu, il
        est dmasqu, et envoy directement  la chane de sortie.  Si
        vous n'utilisez pas le masquage IP, vous pouvez mentalement
        supprimer ceci du diagramme.


     DDcciissiioonn rroouuttaaggee ((RRoouuttiinngg ddeecciissiioonn)) ::
        Le champ de destination est examin par le code de routage, pour
        dcider si le paquet doit aller vers un processus local (voir
        processus local plus bas) ou transmis  une machine distante
        (voyez les chanes de renvoi plus bas).


     PPrroocceessssuuss llooccaall ((LLooccaall pprroocceessss)) ::
        Un processus tournant sur la machine peut recevoir des paquets
        aprs l'tape de dcision de routage, et peut envoyer des
        paquets (qui passent par l'tape de dcision de routage, puis
        traversent la chane de sortie).


     IInntteerrffaaccee lloo ::
        Si les paquets venant d'un processus local sont destins  un
        autre processus local, alors ils passeront par la chane de
        sortie en utilisant l'interface lo, puis reviendront par la
        chane d'entre en utilisant la mme interface. L'interface lo
        est gnralement nomme interface loopback.


     llooccaall ::
        Si le paquet n'a pas t cr par un processus local, alors la
        chane de transmission est vrifie, sinon le paquet se dirige
        vers la chane de sortie.


     ffoorrwwaarrdd cchhaaiinn ::
        Cette chane est traverse par tout paquet qui tente de passer
        par cette machine vers une autre.


     oouuttppuutt cchhaaiinn ::
        Cette chane est traverse par tous les paquets juste avant
        qu'ils ne soient envoys  l'extrieur.


  44..11..11..  UUttiilliisseerr iippcchhaaiinnss

  Tout d'abord, vrifiez que vous avez la version d'ipchains  laquelle
  se rfre ce document :



       $ ipchains --version
       ipchains 1.3.9, 17-Mar-1999





  Notez que je recommande l'utilisation du 1.3.4 (qui ne dispose pas des
  options longues comme `--sport'), ou du 1.3.8 et suivants ; ils sont
  en effet trs stables.


  ipchains dispose d'une page de manuel plutt bien dtaille (man
  ipchains), et si vous avez besoin de plus de dtails en particulier,
  vous pouvez consulter l'interface de programmation (man 4 ipfw), ou le
  fichier net/ipv4/ip_fw.c dans les sources des noyaux 2.1.x, qui est
  (bien videmment) la rfrence.


  Il y a galement une carte de rfrence rapide par Scott Bronson dans
  le paquetage source, aux formats PostScript (TM) a4 et US letter.


  Il y a plusieurs choses diffrentes que vous pouvez faire avec
  ipchains. Tout d'abord les oprations servant  grer les chanes
  entires. Vous commencez avec trois chanes intgres input, output et
  forward que vous ne pouvez effacer.


  1. Crer une nouvelle chane (-N) ;

  2. Supprimer une chane vide (-X) ;

  3. Changer la police d'une chane intgre (-P) ;

  4. Lister les rgles d'une chane (-L) ;

  5. Supprimer les rgles d'une chane (-F) ;


  6. Mettre  zro les compteurs de paquets et d'octets sur toutes les
     rgles d'une chane (-Z).

  Il y a plusieurs moyens pour manipuler les rgles  l'intrieur d'une
  chane :


  1. Ajouter une nouvelle rgle  une chane (-A) ;

  2. Insrer une nouvelle rgle  une position quelconque de la chane
     (-I) ;

  3. Remplacer une rgle  une position quelconque de la chane (-R) ;

  4. Supprimer une rgle  une position quelconque de la chane (-D) ;

  5. Supprimer la premire rgle vrifie dans la chane (-D).

  Il y a quelques oprations pour le masquage, qui se trouvent dans
  ipchains dans l'attente d'un bon endroit pour les mettre :


  1. Lister les connexions masques actuelles (-M -L) ;

  2. Configurer les valeurs de timeout (-M -S) (mais voyez id="no-
     timeout" name="Je ne peux pas modifier les temps d'attente du
     camouflage !">).

  La fonction finale (et peut-tre la plus utile) vous permet de
  vrifier ce qui arriverait  un paquet donn s'il avait  traverser
  une chane donne.


  44..11..22..  OOpprraattiioonnss ssuurr uunnee rrggllee ssiimmppllee

  Ceci est le B.A.-Ba d'ipchains ; manipuler des rgles. Plus
  gnralement, vous utiliserez probablement les commandes d'ajout (-A)
  et de suppression (-D). Les autres (-I pour l'insertion et -R pour le
  remplacement) sont des simples extensions de ces concepts.


  Chaque rgle spficie un ensemble de conditions que le paquet doit
  suivre, et ce qu'il faut faire s'il les suit (une "destination"). Par
  exemple, vous pouvez vouloir refuser tous les paquets ICMP venant de
  l'adresse IP 127.0.0.1.  Donc, dans ce cas nos conditions sont que le
  protocole doit tre ICMP et que l'adresse source doit tre 127.0.0.1.
  Notre destination est "DENY" (rejet).


  127.0.0.1 est l'interface "loopback", que vous avez mme si vous
  n'avez de connexion rseau relle. Vous pouvez utiliser le programme
  "ping" pour gnrer de tels paquets (il envoie simplement un paquet
  ICMP de type 8 (requte d'cho)  qui tous les htes coopratifs
  doivent obligeamment rpondre avec un paquet ICMP de type 0 (rponse 
  un cho)). Ceci le rend utile pour les tests.











  # ping -c 1 127.0.0.1
  PING 127.0.0.1 (127.0.0.1): 56 data bytes
  64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.2 ms

  --- 127.0.0.1 ping statistics ---
  1 packets transmitted, 1 packets received, 0% packet loss
  round-trip min/avg/max = 0.2/0.2/0.2 ms
  # ipchains -A input -s 127.0.0.1 -p icmp -j DENY
  # ping -c 1 127.0.0.1
  PING 127.0.0.1 (127.0.0.1): 56 data bytes

  --- 127.0.0.1 ping statistics ---
  1 packets transmitted, 0 packets received, 100% packet loss
  #




  Vous pouvez voir ici que le premier ping russit (le "-c 1" dit  ping
  de n'envoyer qu'un seul paquet).


  Puis nous ajoutons (-A)  la chane d'entre ("input"), une rgle
  spcifiant que tous les paquets provenant de 127.0.0.1 ("-s
  127.0.0.1") avec le protocole ICMP ("-p ICMP") doivent tre refuss
  ("-j DENY").


  Ensuite nous testons notre rgle, en utilisant le second ping. Il y
  aura une pause avant que le programme ne se termine, attendant une
  rponse qui ne viendra jamais.


  Nous pouvons supprimer la rgle avec l'un des deux moyens. Tout
  d'abord, puisque nous savons que c'est la seule rgle de la chane
  d'entre, nous pouvons utiliser une suppression numrote, comme
  dans :


               # ipchains -D input 1
               #




  Pour supprimer la rgle numro 1 de la chane d'entre.


  La deuxime possibilit est de copier la commande -A, mais en
  remplaant le -A par -D. C'est utile lorsque vous avez une chane
  complexe de rgles et que vous ne voulez pas avoir  les compter afin
  de savoir que c'est la rgle 37 que vous voulez supprimer. Dans ce
  cas, nous pouvons utiliser :


               # ipchains -D input -s 127.0.0.1 -p icmp -j DENY
               #




  La syntaxe de -D doit avoir exactement les mmes options que la com
  mande -A (ou -I ou -R). S'il y a des rgles multiples identiques dans
  la mme chane, seule la premire sera supprime.


  44..11..33..  SSppcciiffiiccaattiioonnss dduu ffiillttrraaggee

  Nous avons vu l'utilisation de "-p" pour spcifier le protocole, et de
  "-s" pour spcifier l'adresse souce, mais il y a d'autres options que
  nous pouvons utiliser pour spcifier les caractristiques des paquets.
  Ce qui suit en est une description exhaustive.


  44..11..33..11..  SSppcciiffiieerr lleess aaddrreesssseess IIPP ssoouurrccee eett ddeessttiinnaattiioonn

  Les adresses IP source (-s) et destination (-d) peuvent tre
  spcifies de quatre faons diffrentes. La faon la plus classique
  est d'utiliser le nom complet, comme "localhost" ou "www.linuxhq.com".
  La deuxime mthode est de spcifier l'adresse IP, comme "127.0.0.1".


  Les deux autres mthodes permettent la spcification d'un groupe
  d'adresses IP, comme "199.95.207.0/24" ou
  "199.95.207.0/255.255.255.0".  Toutes deux spcifient toutes les
  adresses IP de 192.95.207.0  192.95.207.255, incluse ; les chiffres
  suivant le "/" indiquent quelles parties de l'adresse IP sont
  significatives. "/32" ou "/255.255.255.255" sont les dfauts
  (vrifient toutes les adresses IP). Pour ne spcifier aucune adresse
  IP, "/0" peut tre utilis, par exemple :


               # ipchains -A input -s 0/0 -j DENY
               #




  Ceci est rarement utilis, car l'effet produit par cette ligne de
  commande est le mme que celui obtenu en ne spcifiant pas l'option
  "-s".


  44..11..33..22..  SSppcciiffiieerr ll''iinnvveerrssiioonn

  De nombreuses options, incluant les options "-s" et "-d" peuvent avoir
  leurs propres arguments prcds par "!" (prononc "non") pour ne
  vrifier que les adresses n'tant PAS quivalentes  celles donnes.
  Par exemple, "-s !  localhost" vrifiera tout paquet ne provenant PAS
  de localhost.


  44..11..33..33..  SSppcciiffiieerr llee pprroottooccoollee

  Le protocole peut tre spcifi en utilisant l'option "-p". Le
  protocole peut tre soit un nombre (si vous connaissez les valeurs
  numriques des protocoles pour IP), soit le nom des cas spciaux
  parmis "TCP", "UDP" ou "ICMP". La casse n'est pas prise en compte,
  donc "tcp" fonctionne aussi bien que "TCP".


  Le nom du protocole peut tre prfix par un "!", pour l'inverser,
  comme dans "-p ! TCP".


  44..11..33..33..11..  SSppcciiffiieerr lleess ppoorrttss UUDDPP eett TTCCPP

  Pour les cas spciaux o un protocole TCP ou UDP est spcifi, il peut
  y avoir un argument supplmentaire indiquant le port TCP ou UDP, ou un
  intervalle (inclusif) de ports (mais voyez ``Utiliser les fragments''
  plus bas). Un intervalle est reprsent en utilisant le caractre ":",
  par exemple "6000:6010", qui couvre 11 ports, du 6000 au 6010, de
  manire inclusive. Si la borne infrieure est omise, alors elle se met
  par dfaut  0. Si la borne suprieure est omise, elle est considre
  par dfaut comme tant 65535. Ainsi, pour spcifier les connexions TCP
  venant des ports infrieurs  1024, la syntaxe pourrait tre "-p TCP
  -s 0.0.0.0/0 :1023". Les numros de ports peuvent tre spcifis par
  leur nom, par exemple "www".


  Notez que la spcification du port peut tre prcde par un "!", qui
  l'inverse. Ainsi, pour spcifier tous les paquets TCP, SAUF un paquet
  WWW, vous pourriez spcifier

  -p TCP -d 0.0.0.0/0 ! www



  Il est important de raliser que spcifier


  -p TCP -d ! 192.168.1.1 www



  est trs diffrent de

  -p TCP -d 192.168.1.1 ! www



  La premire ligne spcifie tout paquet TCP dirig vers le port WWW de
  n'importe quelle machine sauf 192.168.1.1. La seconde spcifie toute
  connexion TCP vers tout port de 192.168.1.1 sauf le port WWW.


  Enfin, le cas suivant spcifie tout, sauf le port WWW et la machine
  192.168.1.1 :

  -p TCP -d ! 192.168.1.1 ! www




  44..11..33..33..22..  SSppcciiffiieerr lleess ttyyppeess eett ccooddeess IICCMMPP

  ICMP permet aussi un argument optionnel, mais comme l'ICMP ne dispose
  pas de ports (ICMP a un ttyyppee et un ccooddee), ils ont une signification
  diffrente.


  Vous pouvez les spcifier par les noms ICMP (utilisez ipchains -h icmp
  pour lister les noms disponibles) aprs l'option "-s", ou en tant que
  type et code ICMP numrique, o le type suit l'option "-s" et le code
  suit l'option "-d".


  Les noms ICMP sont relativement longs : vous avez uniquement besoin de
  suffisamment de lettres pour rendre chaque nom distinct des autres.


  Voici un petit rsum de quelques-uns des paquets ICMP les plus
  communs :





  Numro  Nom                     Utilis par

  0       echo-reply              ping
  3       destination-unreachable Tout trafic TCP/UDP
  5       redirect                Routage, si pas de dmon de routage
  8       echo-request            ping
  11      time-exceeded           traceroute




  Notez que les noms ICMP ne peuvent tre prcds de "!" pour le
  moment.


  NE PAS, SURTOUT NE PAS bloquer tous les paquets ICMP de type 3 ! (voir
  ``Paquets ICMP'' plus bas).


  44..11..33..44..  SSppcciiffiieerr uunnee iinntteerrffaaccee

  L'option "-i" spcifie le nom d'une iinntteerrffaaccee  vrifier. Une
  interface est le priphrique physique d'o vient le paquet, ou bien
  par o sort ce paquet. Vous pouvez utiliser la commande ifconfig pour
  lister les interfaces qui sont "up" (cd en fonctionnement).


  L'interface pour les paquets entrants (ie. les paquets traversant la
  chane d'entre) est considre comme tant l'interface d'o les
  paquets proviennent. Logiquement, l'interface des paquets sortants
  (les paquets traversant la chane de sortie) est l'interface o ils
  vont. L'interface pour les paquets traversant la chane de
  retransmission est galement l'interface par laquelle ils sortiront ;
  une dcision plutt arbitraire  mon sens.


  Il est parfaitement autoris de spcifier une interface qui n'existe
  pas au moment de la spcification ; la rgle ne vrifiera rien jusqu'
  ce que l'interface soit mise en place. Ceci est extrmement utile pour
  les connexions ppp intermittentes (habituellement les interfaces du
  type ppp0) et autres.


  En tant que cas spcial, un nom d'interface se finissant par un "+"
  vrifiera toutes les interfaces (qu'elles existent  ce moment ou non)
  qui commencent par cette chane. Par exemple, pour spcifier une rgle
  qui vrifiera toutes les interfaces PPP, l'option -i ppp+ pourrait
  tre utilise.


  Le nom d'interface peut tre prcd par un "!" pour vrifier un
  paquet qui ne vrifie PAS l'(les) interface(s) spcifie(s).


  44..11..33..55..  SSppcciiffiieerr uunniiqquueemmeenntt ddeess ppaaqquueettss TTCCPP SSYYNN

  Il est parfois utile d'autoriser des connexions TCP dans une
  direction, mais pas dans l'autre. Par exemple, vous pouvez vouloir
  autoriser les connexions vers un serveur WWW externe, mais pas les
  connexions venant de ce serveur.


  L'approche nave serait de bloquer les paquets TCP venant du serveur.
  Malheureusement, les connexions TCP utilisent des paquets circulant
  dans les deux sens pour fonctionner.

  La solution est de bloquer uniquement les paquets utiliss pour la
  demande d'une connexion. Ces paquets sont nomms paquets SSYYNN (ok,
  techniquement ce sont des paquets avec le drapeau SYN mis, et les
  drapeaux FIN et ACK supprims, mais nous les appellerons des paquets
  SYN). En interdisant seulement ces paquets, nous pouvons stopper toute
  demande de connexion dans l'oeuf.


  L'option "-y" est utilise pour cel : elle est valide seulement pour
  les rgles qui spcifient TCP comme leur protocole. Par exemple, pour
  spcifier une demande de connexion TCP venant de 192.168.1.1 :

  -p TCP -s 192.168.1.1 -y




  Une fois de plus, ce drapeau peut tre invers en le faisant prcder
  par un "!", qui vrifie tout paquet autre que ceux d'initialisation de
  connexion.


  44..11..33..66..  UUttiilliisseerr lleess ffrraaggmmeennttss

  Parfois, un paquet est trop large pour rentrer dans le cble en une
  seule fois. Lorsque ceci arrive, le paquet est divis en ffrraaggmmeennttss, et
  envoy en plusieurs paquets. Le receveur rassemble les fragments pour
  reconstruire le paquet en entier.


  Le problme avec les fragments se situe dans certaines des
  spcifications listes ci-dessus (en particulier, le port source, le
  port de destination, le type et le code ICMP, ou le drapeau TCP SYN),
  qui demandent au noyau de jeter un regard sur le dbut du paquet, qui
  est contenu seulement dans le premier fragment.


  Si votre machine est la seule connexion vers un rseau extrieur, vous
  pouvez demander  votre noyau Linux de rassembler tous les fragments
  qui passent par lui, en compilant le noyau avec l'option IP: always
  defragment mise  "Y". Ceci vite proprement la plupart des problmes.


  D'autre part, il est important de comprendre comment les fragments
  sont traits par les rgles de filtrage. Toute rgle de filtrage qui
  demande des informations dont nous ne disposons pas ne vrifiera _r_i_e_n.
  Ceci signifie que le premier fragment est trait comme tout autre
  paquet. Le deuxime fragment et les suivants ne le seront pas. Ainsi,
  une rgle -p TCP -s 192.168.1.1 www (spcifiant un port source de
  "www" ne vrifiera jamais un fragment (autre que le premier fragment).
  La rgle oppose -p TCP -s 192.168.1.1 ! www ne fonctionnera pas non
  plus.


  Cependant, vous pouvez spcifier une rgle spciale pour le deuxime
  fragment et les suivants, en utilisant l'option "-f". videmment, il
  est illgal de spcifier un port TCP ou UDP, un type ou un code ICMP,
  ou un drapeau TCP SYN dans une rgle de fragment.


  Il est galement autoris de spcifier une rgle qui ne s'applique _p_a_s
  au deuxime fragment et aux suivants, en plaant un "!" avant le "-f".


  Habituellement, il est considr comme sr de laisser passer le
  deuxime fragment et les suivants, puisque le filtrage s'effectuera
  sur le premier fragment, et prviendra donc le rassemblage sur la
  machine cible. Cependant, des bogues, connus, permettent de crasher
  des machines en envoyant de simples fragments.  vous de voir.


   noter pour les gourous rseau : les paquets malforms (TCP, UDP et
  paquets ICMP trop courts pour que le code pare-feu puisse lire les
  ports ou les types et codes ICMP) sont galement traits comme des
  fragments. Seuls les fragments TCP dbutant en position 8 sont
  supprims explicitement par le code pare-feu (un message doit
  apparatre dans le syslog si cel arrive).


  Par exemple, la rgle suivante supprimera tout fragment allant sur
  192.168.1.1 :




       # ipchains -A output -f -d 192.168.1.1 -j DENY
       #





  44..11..44..  EEffffeettss ddee bboorrdd dduu ffiillttrraaggee

  OK, maintenant nous connaissons tous les moyens pour vrifier un
  paquet en utilisant une rgle. Si un paquet vrifie une rgle, les
  choses suivantes arrivent :


  1. Le compteur d'octets de cette rgle est augment de la taille de ce
     paquet (entte et autres) ;

  2. Le compteur de paquets de cette rgle est incrment ;

  3. Si la rgle le demande, le paquet est enregistr ;

  4. Si la rgle le demande, le champ "Type Of Service" du paquet est
     modifi ;

  5. Si la rgle le demande, le paquet est marqu (sauf dans la srie
     des noyaux 2.0) ;

  6. La destination de la rgle est examine afin de dcider ce que nous
     ferons ensuite du paquet.


  Pour la diversit, je dtaillerai ceux-ci en ordre d'importance.


  44..11..44..11..  SSppcciiffiieerr uunnee ddeessttiinnaattiioonn

  Une ddeessttiinnaattiioonn dit au noyau ce qu'il doit faire d'un paquet qui
  vrifie une rgle. ipchains utilise "-j" (penser  "jump-to") pour la
  spcification de la destination. Le nom de la cible doit comporter
  moins de 8 caractres, et la casse intervient : "RETOUR" et "retour"
  sont totalement diffrents.


  Le cas le plus simple est lorsqu'il n'y a pas de destination
  spcifie. Ce type de rgle (souvent appelle rgle de "comptage") est
  utile pour simplement compter un certain type de paquet. Que cette
  rgle soit vrifie ou non, le noyau examine simplement la rgle
  suivante dans la chane. Par exemple, pour compter le nombre de
  paquets venant de 192.168.1.1, nous pouvons faire ceci :


       # ipchains -A input -s 192.168.1.1
       #





  (En utilisant "ipchains -L -v" nous pouvons voir les compteurs de
  paquets et d'octets associs  chaque rgle).


  Il y a six destinations spciales. Les trois premires, ACCEPT, REJECT
  et DENY sont relativement simples. ACCEPT autorise le passage du
  paquet. DENY supprime le paquet comme s'il n'avait jamais t reu.
  REJECT supprime le paquet, mais (si ce n'est pas un paquet ICMP)
  gnre une rponse ICMP vers la source pour lui dire que la
  destination n'est pas accessible.


  La suivante, MASQ dit au noyau de camoufler le paquet. Pour que ceci
  fonctionne, votre noyau doit tre compil avec le camouflage IP
  intgr. Pour les dtails sur ceci, voyez le Masquerading-HOWTO et
  l'annexe ``Diffrences entre ipchains et ipfwadm''. Cette destination
  est valide uniquement pour les paquets qui traversent la chane
  forward.


  L'autre destination majeure spciale est REDIRECT qui demande au noyau
  d'envoyer un paquet vers un port local au lieu de l o il tait
  destin. Ceci peut tre spcifi uniquement pour les rgles spcifiant
  TCP ou UDP en tant que protocole. Optionnellement, un port (nom ou
  numro) peut tre spcifi aprs "-j REDIRECT" qui redirigera la
  paquet vers ce port particulier, mme si celui-ci tait dirig vers un
  autre port. Cette destination est valide uniquement pour les paquets
  traversant la chane input.


  La dernire destination spciale est la RETURN qui est identique  une
  terminaison immdiate de la chane (voir ``Choisir une police'' plus
  bas).


  Toute autre destination indique une chane dfinie par l'utilisateur
  (dcrite dans ``Oprations sur une chane entire'' plus bas). Le
  paquet traversera tout d'abord les rgles de cette chane. Si cette
  chane ne dcide pas du destin du paquet, lorsque la traverse de
  cette chane sera acheve, la traverse reprendra sur la rgle
  suivante de la chane courante.


  Il est temps de faire encore un peu d'art ASCII. Considrons deux
  (tranges) chanes : input (la chane intgre) et Test (une chane
  dfinie par l'utilisateur).









                `input'                          `Test'
          -----------------------------    -----------------------------
          | Rgle1: -p ICMP -j REJECT |    | Rgle1: -s 192.168.1.1    |
          |---------------------------|    |---------------------------|
          | Rgle2: -p TCP -j Test    |    | Rgle2: -d 192.168.1.1    |
          |---------------------------|    -----------------------------
          | Rgle3: -p UDP -j DENY    |
          -----------------------------




  Considrons un paquet TCP venant de 192.168.1.1, allant vers 1.2.3.4.
  Il pntre dans la chane input, et est test par la Rgle1 - pas de
  correspondance. La Rgle2 correspond, et sa destination est Test, donc
  la rgle suivante  examiner est le dbut de Test. La Rgle1 de Test
  correspond, mais ne spcifie pas de destination, donc la rgle
  suivante est examine (Rgle2). Elle ne correspond pas, nous avons
  donc atteint la fin de la chane.  Nous retournons alors  la chane
  input, dont nous avons juste examin la Rgle2, et nous examinons
  alors la Rgle3, qui ne correspond pas non plus.


  Le chemin suivi par le paquet est donc le suivant :

                                  v    __________________________
           `entre'               |   /    `Test'                v
          ------------------------|--/    -----------------------|----
          | Rgle1                | /|    | Rgle1               |   |
          |-----------------------|/-|    |----------------------|---|
          | Rgle2                /  |    | Rgle2               |   |
          |--------------------------|    -----------------------v----
          | Rgle3                /--+---------------------------/
          ------------------------|---
                                  v




  Voyez la section ``Comment organiser vos rgles pare-feu'' pour les
  moyens d'utiliser efficacement les chanes dfinies par l'utilisateur.


  44..11..44..22..  EEnnrreeggiissttrreemmeenntt ddeess ppaaqquueettss

  C'est un effet de bord que la vrification d'une rgle peut avoir ;
  vous pouvez enregistrer les paquets vrifis en utilisant l'option
  "-l". Vous n'aurez gnralement pas besoin de ceci pour les paquets
  habituels, mais ce peut tre une option trs utile si vous dsirez
  tre tenu au courant des vnements exceptionnels.


  Le noyau enregistre cette information de la manire suivante :



       Packet log: input DENY eth0 PROTO=17 192.168.2.1:53 192.168.1.1:1025
         L=34 S=0x00 I=18 F=0x0000 T=254




  Ce message d'information est prvu pour tre concis, et contient des
  informations techniques qui ne sont utiles qu'aux gourous rseau, mais
  qui peuvent nanmoins tre intressantes pour le commun des mortels.
  Il se dcompose de la faon suivante :
  1. `input' est la chane qui contenait la rgle correspondant au
     paquet, et qui a caus l'apparition du message.

  2. `DENY' est ce que la rgle a dit au paquet de faire. Si ceci est un
     `-' alors la rgle n'a pas du tout affect le paquet (une rgle de
     comptage).

  3. `eth0' est le nom de l'interface. Puisque ceci tait la chane
     d'entre, cel signifie que le paquet vient de `eth0'.

  4. `PROTO=17' signifie que le paquet tait de protocole 17. Une liste
     des numros de protocoles est donne dans `/etc/protocols'. Les
     plus communs sont 1 (ICMP), 6 (TCP) et 17 (UDP).

  5. `192.168.2.1' signifie que l'adresse IP source du paquet tait
     192.168.2.1.

  6. `:53' signifie que le port source tait le port 53. En regardant
     dans `/etc/services' on voit que ceci est le port `domain' (cd que
     c'est probablement une rponse DNS). Pour UDP et TCP, ce numro est
     le port source.  Pour ICMP, c'est le type ICMP. Pour les autres, ce
     sera 65535.

  7. `192.168.1.1' est l'adresse IP de destination.

  8. `:1025' signifie que le port de destination tait 1025. Pour UDP et
     TCP, ce numro est le port de destination. Pour ICMP, il s'agit du
     code ICMP.  Pour les autres, ce sera 65535.

  9. `L=34' signifie que le paquet avait une longueur totale de 34
     octets.

  10.
     `S=0x00' est le champ "Type Of Service" (divisez par 4 pour obtenir
     le Type of Service utilis par ipchains).

  11.
     `I=18' est l'identificateur de l'IP.

  12.
     `F=0x0000' est l'offset du fragment 16 bits, avec les options. Une
     valeur dbutant par `0x4' ou `0x5' signifie que le bit "Don't
     Fragment" (ne pas fragmenter) est mis. `0x2' ou `0x3' signifie que
     le bit "More Fragments" (des fragments suivent) est mis ; attendez
     vous  recevoir plus de fragments aprs. Le reste du nombre est le
     dcalage de ce fragment, divis par 8.

  13.
     `T=254' est la dure de vie du paquet. On soustrait 1  cette
     valeur  chaque saut (hop), et on dbute gnralement  15 ou 255.

  14.
     `(#5)' il peut y avoir un numro entre parenthses sur les noyaux
     les plus rcents (peut-tre aprs le 2.2.9). Il s'agit du numro de
     la rgle qui a caus l'enregistrement du paquet.


  Sur les systmes Linux standards, la sortie du noyau est capture par
  klogd (dmon d'information du noyau) qui le repasse  syslogd (dmon
  d'information du systme). Le fichier `/etc/syslog.conf' contrle le
  comportement de syslogd, en spcifiant une destination pour chaque
  "partie" (dans notre cas, la partie est le "noyau") et un "niveau"
  (pour ipchains, le niveau utilis est "info").



  Par exemple, mon /etc/syslog.conf (Debian) contient deux lignes qui
  vrifient `kern.info' :



       kern.*                          -/var/log/kern.log
       *.=info;*.=notice;*.=warn;\
               auth,authpriv.none;\
               cron,daemon.none;\
               mail,news.none          -/var/log/messages




  Ceci signifie que les messages sont dupliqus dans `/var/log/kern.log'
  et `/var/log/messages'. Pour plus de dtails, voyez `man syslog.conf'.


  44..11..44..33..  MMaanniippuulleerr llee ttyyppee ddee sseerrvviiccee

  Il y a quatre bits utiliss par eux-mmes dans l'entte IP, appels
  les bits de TTyyppee ooff SSeerrvviiccee (TOS). Ceux-ci ont pour effet de modifier
  la manire dont les paquets sont traits : les quatres bits sont
  "Minimum Delay", "Maximum Throughput", "Maximum Reliability" et
  "Minimum Cost". Un seul de ces bits est autoris  tre plac. Rob van
  Nieuwkerk, l'auteur du code de gestion du TOS, les dcrit comme suit :


       Tout spcialement, le "Minimum Delay" est important pour
       moi. Je le mets pour les paquets "interactifs" dans mon rou
       teur principal (Linux). Je suis derrire une connexion modem
       33,6k. Linux rend les paquets prioritaires en 3 queues. De
       cette faon, j'obtiens des performances interactives accept
       ables tout en faisant de gros transferts de fichiers en mme
       temps. (Cel pourrait mme tre encore mieux s'il n'y avait
       pas de grosse queue dans le pilote srie, mais le temps de
       latence est maintenu en dessous des 1,5 secondes pour
       l'instant).



  Note : bien entendu, vous n'avez aucun contrle sur les paquets
  arrivants ; vous pouvez seulement contrler la priorit des paquets
  qui quittent votre machine.  Pour ngocier les priorits de chaque
  ct, un protocole comme RSVP (dont je ne connais rien) doit tre
  utilis.


  L'utilisation la plus commune est de placer les connexions telnet et
  contrle du ftp en "Minimum Delay" et les donnes FTP en "Maximum
  Throughput". Ceci peut tre fait de la manire suivante :



       ipchains -A output -p tcp -d 0.0.0.0/0 telnet -t 0x01 0x10
       ipchains -A output -p tcp -d 0.0.0.0/0 ftp -t 0x01 0x10
       ipchains -A output -p tcp -s 0.0.0.0/0 ftp-data -t 0x01 0x08





  L'option "-t" prend deux paramtres supplmentaires, tous les deux en
  hexadcimal. Ceci permet un contrle complexe des bits du TOS : le
  premier masque est AND avec le TOS actuel du paquet, et ensuite le
  deuxime masque est XOR avec lui. Si cel est trop confus, utilisez
  simplement le tableau suivant :



       Nom du TOS              Valeur          Utilisations typiques

       Minimum Delay           0x01 0x10       ftp, telnet
       Maximum Throughput      0x01 0x08       ftp-data
       Maximum Reliability     0x01 0x04       snmp
       Minimum Cost            0x01 0x02       nntp




  Andi Kleen revient sur ce point pour ce qui suit (modrment dit
  pour la postrit) :

       Peut-tre serait-il utile d'ajouter une rfrence au
       paramte txqueuelen de ifconfig dans la discussion sur les
       bits TOS. La longueur par dfaut de la queue d'un
       priphrique est rgle pour les cartes ethernet, sur les
       modems elle est trop longue et rend le fonctionnement de la
       planification 3 bandes (qui place la queue en fonction du
       TOS) sous-optimal. C'est donc une bonne ide de le config
       urer avec une valeur comprise entre 4 et 10 sur un modem ou
       un lien RNIS b simple : sur les priphriques rapide une
       queue plus longue est ncessaire. C'est un problme des 2.0
       et 2.1, mais dans le 2.1 c'est une option de ifconfig (dans
       les nettools rcents), alors que dans le 2.0 il ncessite
       une modification des sources des pilotes du priphrique
       pour le changer.


  Ainsi, pour voir les bnfices maximum des changements de TOS pour les
  liaisons modem PPP, ajoutez un `ifconfig $1 txqueuelen' dans votre
  script /etc/ppp/ip-up. Le nombre  utiliser dpend de la vitesse du
  modem et de la taille du tampon du modem ; voici  nouveau les ides
  d'Andi :


       La meilleure valeur pour une configuration donne ncessite
       de l'exprimentation. Si les queues sont trop courtes sur le
       routeur, alors les paquets sauteront. Bien sr, on peut tou
       jours gagner mme sans changer le TOS, c'est juste que le
       changement du TOS aide  gagner les bnfices sur les pro
       grammes non coopratifs (mais tous les programmes Linux
       standards sont coopratifs).



  44..11..44..44..  MMaarrqquuaaggee dd''uunn ppaaqquueett

  Ceci permet des interactions complexes et puissantes avec la nouvelle
  implmentation de Quality of Service d'Alexey Kuznetsov, ainsi que de
  la redirection base sur le marquage dans la dernire srie de noyaux
  2.1. Des dtails supplmentaires vont arriver puisque nous l'avons
  dans la main. Cette option est toutefois ignore dans la srie des
  noyaux 2.0.


  44..11..44..55..  OOpprraattiioonnss ssuurr uunnee cchhaannee eennttiirree

  Une des options les plus utiles d'ipchains est la possibilit de
  regrouper des rgles dans des chanes. Vous pouvez appeller les
  chanes de la manire qui vous plat, tant que les noms ne sont pas
  ceux des chanes intgres (input, output et forward) ou des
  destinations ((MASQ, REDIRECT, ACCEPT, DENY, REJECT ou RETURN). Je
  suggre d'viter compltement les noms en majuscules, car je pourrais
  les utiliser pour des extensions futures. Le nom de la chane ne doit
  pas dpasser 8 caractres.


  44..11..44..66..  CCrreerr uunnee nnoouuvveellllee cchhaannee

  Crons une nouvelle chane. tant un type imaginatif, je l'appellerai
  test.



       # ipchains -N test
       #





  C'est aussi simple. Maintenant vous pouvez y rajouter des rgles,
  comme dtaill ci-dessus.


  44..11..44..77..  SSuupppprriimmeerr uunnee cchhaannee

  La suppression d'une chane est tout aussi simple.



       # ipchains -X test
       #




  Pourquoi "-X" ? Eh bien, toutes les bonnes lettres taient dj
  prises.


  Il y a quelques restrictions  la suppression des chanes : elles
  doivent tre vides (voir ``Vider une chane'' plus bas) et elles ne
  doivent pas tre la destination d'une quelconque rgle. Vous ne pouvez
  pas supprimer les chanes intgres.


  44..11..44..88..  VViiddeerr uunnee cchhaannee

  Il y a un moyen simple de vider toutes les rgles d'une chane, en
  utilisant la commande "-F".



       # ipchains -F forward
       #





  Si vous ne spcifiez pas de chane, alors _t_o_u_t_e_s les chanes seront
  vides.




  44..11..44..99..  AAffffiicchheerr uunnee cchhaannee

  Vous pouvez afficher toutes les rgles d'une chane en utilisant la
  commande "-L".



       # ipchains -L input
       Chain input (refcnt = 1): (policy ACCEPT)
       target     prot opt    source                destination           ports
       ACCEPT     icmp -----  anywhere              anywhere              any
       # ipchains -L test
       Chain test (refcnt = 0):
       target     prot opt    source                destination           ports
       DENY       icmp -----  localnet/24           anywhere              any
       #





  La "refcnt" liste pour test est le nombre de rgles qui ont test
  comme destination. Ceci doit tre gal  zro (et la chane doit tre
  vide) avant que cette chane ne puisse tre supprime.


  Si le nom de la chane est omis, toutes les chanes sont listes, mme
  les chanes vides.


  Il y a trois options qui peuvent accompagner "-L". L'option "-n"
  (numrique) est trs utile et empche ipchains d'essayer de vrifier
  les adresses IP, ce qui (si vous utilisez DNS comme la plupart des
  gens) causera de longs dlais si votre DNS n'est pas configur
  proprement, ou si vous filtrez les requtes DNS. Ceci affichera
  galement les ports par leur numro plutt que par leur nom.


  L'option "-v" vous montrera tous les dtails des rgles, comme les
  compteurs de paquets et d'octets, les masques de TOS, l'interface, et
  les marques de paquets. Autrement, ces valeurs seront omises. Par
  exemple :



       # ipchains -v -L input
       Chain input (refcnt = 1): (policy ACCEPT)
        pkts bytes target prot opt   tosa tosx ifname  mark  source    destination  ports
          10   840 ACCEPT icmp ----- 0xFF 0x00 lo            anywhere  anywhere     any





  Notez que les compteurs de paquets et d'octets sont affichs en
  utilisant les suffixes "K", "M" ou "G" pour 1000, 1.000.000 et
  1.000.000.000, respectivement. En utilisant galement l'option "-x"
  (dveloppe les nombres), ipchains affichera les nombres en entier,
  quelque soit leur taille.


  44..11..44..1100..  RReemmiissee  zzrroo ddeess ccoommpptteeuurrss

  Il est parfois utile de pouvoir remettre  zro les compteurs. Ceci
  peut tre fait par l'option "-Z" (compteurs  Zro). Par exemple :

       # ipchains -v -L input
       Chain input (refcnt = 1): (policy ACCEPT)
        pkts bytes target prot opt   tosa tosx ifname  mark  source    destination  ports
          10   840 ACCEPT icmp ----- 0xFF 0x00 lo            anywhere  anywhere     any
       # ipchains -Z input
       # ipchains -v -L input
       Chain input (refcnt = 1): (policy ACCEPT)
        pkts bytes target prot opt   tosa tosx ifname  mark  source      destination   ports
           0     0 ACCEPT icmp ----- 0xFF 0x00 lo            anywhere    anywhere      any
       #





  Le problme de cette approche est que parfois vous voudrez connatre
  les valeurs du compteur tout de suite aprs la remise  zro. Dans
  l'exemple ci-dessus, quelques paquets peuvent passer entre les
  commandes "-L" et "-Z".  Pour cette raison, vous pouvez utiliser le
  "-L" et le "-Z" _e_n_s_e_m_b_l_e, pour remettre  zro les compteurs tout en
  les lisant. Malheureusement, si vous fates ceci, vous ne pouvez
  oprer sur une seule chane : vous devrez lister et remettre  zro
  toutes les chanes en une seule fois.



       # ipchains -L -v -Z
       Chain input (policy ACCEPT):
        pkts bytes target prot opt   tosa tosx ifname  mark  source      destination   ports
          10   840 ACCEPT icmp ----- 0xFF 0x00 lo            anywhere    anywhere      any

       Chain forward (refcnt = 1): (policy ACCEPT)
       Chain output (refcnt = 1): (policy ACCEPT)
       Chain test (refcnt = 0):
           0     0 DENY   icmp ----- 0xFF 0x00  ppp0         localnet/24 anywhere      any
       # ipchains -L -v
       Chain input (policy ACCEPT):
        pkts bytes target prot opt   tosa tosx ifname  mark  source      destination   ports
          10   840 ACCEPT icmp ----- 0xFF 0x00 lo            anywhere    anywhere      any

       Chain forward (refcnt = 1): (policy ACCEPT)
       Chain output (refcnt = 1): (policy ACCEPT)
       Chain test (refcnt = 0):
           0     0 DENY   icmp ----- 0xFF 0x00 ppp0          localnet/24 anywhere     any
       #





  44..11..44..1111..  CChhooiissiirr uunnee ppoolliiccee

  Nous avons dissert sur ce qui se passe lorsqu'un paquet atteint la
  fin de la chane intgre, lorsque nous avons discut sur la manire
  dont un paquet parcourait les chanes dans ``Spcifier une
  destination'' plus haut. Dans ce cas, la ppoolliiccee de la chane dtermine
  le destin du paquet. Seules les chanes intgres (input, output et
  forward) ont des polices, car si un paquet atteint la fin d'une chane
  dfinie par l'utilisateur, le paquet revient sur la chane prcdente.


  La police peut tre une des quatre premires destinations spciales :
  ACCEPT, DENY, REJECT ou MASQ. MASQ est la seule destination valide
  pour la chane "forward".


  Il est galement important de noter qu'une destination RETURN dans une
  rgle de l'une des chanes intgres est utile pour expliciter la
  destination de la chane lorsqu'un paquet correspond  la rgle.


  44..11..55..  OOpprraattiioonnss ssuurr llee ccaammoouuffllaaggee

  Il y a plusieurs paramtres que vous pouvez modifier pour le
  camouflage IP.  Ils sont intgrs avec ipchains car il n'est pas
  vident d'crire un outil spar pour eux (bien que ceci devrait
  changer).


  La commande du camouflage IP est "-M", et peut tre combine avec "-L"
  pour lister les connexions actuellement camoufles, ou avec "-S" pour
  configurer les paramtres du camouflage.


  La commande "-L" peut tre accompagne par "-n" (montre des nombres 
  la place des noms de machines et de ports) ou "-v" (affiche les deltas
  dans les squences de nombres pour la connexion camoufle, au cas o
  vous vous demanderiez).


  La commande "-S" doit tre suivie par trois valeurs de fin d'attente,
  toutes en secondes : pour les sessions TCP, pour les sessions TCP
  prcdes d'un paquet FIN, et pour les paquets UDP. Si vous ne voulez
  pas changer l'une de ces valeurs, donnez-lui simplement une valeur de
  "0".


  Les valeurs par dfaut sont listes dans
  "/usr/src/linux/include/net/ip_masq.h", actuellement 15 minutes, 2
  minutes et 5 minutes, respectivement.


  La valeur change le plus souvent est la premire, pour le FTP (voir
  ``Cauchemars du FTP'' plus bas).


  Notez que les problmes avec la mise en place de temps de fin
  d'attente sont lists dans ``Je n'arrive pas  configurer mes temps
  d'attente !''.


  44..11..66..  VVrriiffiieerr uunn ppaaqquueett

  Parfois, vous voulez savoir ce qui arrive lorsqu'un certain paquet
  entre dans votre machine, par exemple pour dboguer votre chane pare-
  feu.  ipchains dispose de la commande "-C" pour autoriser cel, en
  utilisant exactement les mmes routines que celles que le noyau
  utilise pour vrifier les vrais paquets.


  Vous spcifiez sur quelle chane le paquet doit tre test en mettant
  son nom aprs l'argument "-C". Mme si le noyau commence toujours par
  traverser les chanes input, output ou forward, vous tes autoris 
  commencer en traversant n'importe quelle chane pour tester.


  Les dtails du "paquet" sont spcifis en utilisant la mme syntaxe
  que celle utilise pour spcifier les rgles pare-feu. En particulier,
  un protocole ("-p"), une adresse source ("-s"), une adresse de
  destination ("-d") et une interface ("-i") sont ncessaires. Si le
  protocole est TCP ou UDP, alors une source unique et une destination
  unique doivent tre spcifies, et un type et un code ICMP doivent
  tre spcifis pour le protocole ICMP ( moins que l'option "-f" soit
  spcifie pour indiquer une rgle de fragment, auquel cas ces options
  sont illgales).


  Si le protocole est TCP (et que l'option "-f" n'est pas spcifie),
  l'option "-y' doit tre explicite, afin d'indiquer que le paquet test
  doit tre configur avec le bit SYN.


  Voici un exemple de test d'un paquet TCP SYN venant de 192.168.1.1,
  port 60000, et allant sur 192.168.1.2, port www, arrivant de
  l'interface eth0 et entrant dans la chane "input" (il s'agit d'une
  initialisation classique d'une connexion WWW) :



       # ipchains -C input -p tcp -y -i eth0 -s 192.168.1.1 60000 -d 192.168.1.2 www
       packet accepted
       #





  44..11..77..  VVooiirr ccee qquuii aarrrriivvee aavveecc ddeess rrgglleess mmuullttiipplleess pprrcciisseess eenn uunnee
  sseeuullee ffooiiss

  Parfois, une simple ligne de commande peut affecter de multiples
  rgles. Ceci se fait par deux mthodes. Premirement, si vous
  spcifiez un nom de machine qui correspond (en utilisant DNS)  de
  multiples adresses IP, ipchains agira comme si vous aviez tap de
  multiples commandes avec chaque combinaison d'adresses.


  Ainsi, si le nom de machine "www.foo.com" correspond  trois adresses
  IP, et si le nom de machine "www.bar.com" correspond  deux adresses
  IP, alors la commande "ipchains -A input -j reject -s www.bar.com -d
  www.foo.com" ajoutera six rgles  la chane input.


  L'autre mthode pour avoir ipchains ralisant de multiples actions est
  d'utiliser l'option bidirectionnelle ("-b"). Cette option fait agir
  ipchains comme si vous aviez tap la commande deux fois, la deuxime
  fois avec les arguments "-s" et "-d" inverss. Ainsi, pour viter la
  transmission soit de, soit vers 192.168.1.1, vous pourriez utiliser la
  commande :



       # ipchains -b -A forward -j reject -s 192.168.1.1
       #





  Personnellement, je n'aime pas beaucoup l'option "-b" ; si vous
  prfrez la convivialit, voyez ``Utiliser ipchains-save'' plus bas.


  L'option -b peut tre utilise avec les commandes insrer ("-I"),
  supprimer ("-D") (mais pas avec la variation qui prend un numro de
  rgle), ajouter ("-A") et vrifier ("-C").


  Une autre option utile est "-v" (bruyant) qui imprime exactement ce
  que ipchains fait avec vos commandes. Ceci est utile si vous traitez
  avec des commandes qui peuvent affecter de multiples rgles. Par
  exemple, nous devons ici vrifier le comportement de fragments entre
  192.168.1.1 et 192.168.1.2.



       # ipchains -v -b -C input -p tcp -f -s 192.168.1.1 -d 192.168.1.2 -i lo
         tcp opt   ---f- tos 0xFF 0x00  via lo    192.168.1.1  -> 192.168.1.2    * ->   *
       packet accepted
         tcp opt   ---f- tos 0xFF 0x00  via lo    192.168.1.2  -> 192.168.1.1    * ->   *
       packet accepted
       #





  44..22..  EExxeemmpplleess uuttiilleess

  J'ai une connexion intermittente en PPP (-i ppp0). Je rcupre les
  news (-p TCP -s news.virtual.net.au nntp) et le courrier (-p TCP -s
  mail.virtual.net.au pop-3)  chaque fois que je me connecte. J'utilise
  la mthode ftp de Debian pour mettre ma machine  jour rgulirement
  (-p TCP -y -s ftp.debian.org.au ftp-data). Je visionne le web au
  travers du proxy de mon FAI (Fournisseur d'Accs Internet) lorsque je
  suis en ligne (-p TCP -d proxy.virtual.net.au 8080), mais je dteste
  les publicits de doubleclick.net des Archives de Dilbert (-p TCP -y
  -d 199.95.207.0/24 et -p TCP -y -d 199.95.208.0/24).


  J'autorise les gens  essayer le ftp sur ma machine lorsque je suis en
  ligne (-p TCP -d $LOCALIP ftp), mais je n'autorise personne de
  l'extrieur  prtendre avoir une adresse IP sur mon rseau interne
  (-s 192.168.1.0/24). Ceci est communment appel IP spoofing, et il y
  a un meilleur moyen de se protger dans les noyaux 2.1.x et suivants :
  voir ``Comment mettre en place la protection contre l'IP spoof ?''.


  Cette configuration est relativement simple, car il n'y a pour
  l'instant aucune autre machine sur mon rseau interne.


  Je ne veux pas que des processus locaux (ie. Netscape, lynx, etc.) se
  connectent  doubleclick.net :



       # ipchains -A output -d 199.95.207.0/24 -j REJECT
       # ipchains -A output -d 199.95.208.0/24 -j REJECT
       #





  Maintenant je dsire changer les priorits des divers paquets sortants
  (il n'y a pas vraiment d'intrt  le faire pour les paquets
  entrants). Puisqu'il y a un certain nombre de ces rgles, il y a
  intrt  les mettre ensemble dans une seule chane, nomme ppp-out.





  # ipchains -N ppp-out
  # ipchains -A output -i ppp0 -j ppp-out
  #





  Dlai minimal pour le trafic web et telnet :



       # ipchains -A ppp-out -p TCP -d proxy.virtual.net.au 8080 -t 0x01 0x10
       # ipchains -A ppp-out -p TCP -d 0.0.0.0 telnet -t 0x01 0x10
       #





  Cot faible pour les donnes ftp, nntp et pop-3 :



       # ipchains -A ppp-out -p TCP -d 0.0.0.0/0 ftp-data -t 0x01 0x02
       # ipchains -A ppp-out -p TCP -d 0.0.0.0/0 nntp -t 0x01 0x02
       # ipchains -A ppp-out -p TCP -d 0.0.0.0/0 pop-3 -t 0x01 0x02
       #





  Il y a quelques restrictions sur les paquets venant de l'interface
  ppp0 ; crons une chane nomme "ppp-in" :



       # ipchains -N ppp-in
       # ipchains -A input -i ppp0 -j ppp-in
       #





  Maintenant, aucun des paquets venant de ppp0 ne doit prtendre avoir
  une adresse source de la forme 192.168.1.*, donc nous les enregistrons
  et les interdisons :



       # ipchains -A ppp-in -s 192.168.1.0/24 -l -j DENY
       #





  J'autorise l'entre des paquets UDP pour le DNS (je fais tourner un
  serveur de nom cache qui renvoie toutes les demandes sur 203.29.16.1,
  donc je m'attend  des rponses DNS venant uniquement de l), l'entre
  du ftp, et le retour des donnes ftp (ftp-data) uniquement (ce qui
  doit tre uniquement entre un port strictement suprieur  1023, et
  pas sur les ports X11 autour de 6000).

       # ipchains -A ppp-in -p UDP -s 203.29.16.1 -d $LOCALIP dns -j ACCEPT
       # ipchains -A ppp-in -p TCP -s 0.0.0.0/0 ftp-data -d $LOCALIP 1024:5999 -j ACCEPT
       # ipchains -A ppp-in -p TCP -s 0.0.0.0/0 ftp-data -d $LOCALIP 6010: -j ACCEPT
       # ipchains -A ppp-in -p TCP -d $LOCALIP ftp -j ACCEPT
       #





  Enfin, les paquets local vers local sont OK :



       # ipchains -A input -i lo -j ACCEPT
       #





  Maintenant, ma police par dfaut sur la chane input est DENY, ce qui
  fait que tout le reste disparat :



       # ipchains -P input DENY
       #





  NOTE : Je ne configurerais pas mes chanes dans cet ordre, car des
  paquets pourraient passer durant la configuration. Le moyen le plus
  sr est gnralement de configurer la police  DENY tout d'abord, et
  ensuite d'insrer les rgles. Bien sr, si vos rgles ont besoin
  d'effectuer des demandes DNS pour rsoudre des noms de machines, vous
  pourriez avoir des problmes.


  44..22..11..  UUttiilliisseerr iippcchhaaiinnss--ssaavvee

  Configurer des chanes pare-feu de la manire exacte dont vous le
  voulez, et se rappeller ensuite des commandes que vous avez utilis
  pour le faire la fois suivante est insupportable.


  Donc, ipchains-save est un script qui lit votre configuration actuelle
  des chanes et la sauve dans un fichier. Pour le moment, je
  conserverais le suspens en ce qui concerne l'utilit de ipchains-
  restore.


  ipchains-save peut sauver une chane seule, ou toutes les chanes (si
  aucun nom de chane n'a t spcifi). La seule option actuellement
  autorise est le "-v" qui affiche les rgles (vers stderr)
  lorsqu'elles sont sauves. La police de la chane est aussi sauve
  pour les chanes input, output et forward.







  # ipchains-save > my_firewall
  Saving `input'.
  Saving `output'.
  Saving `forward'.
  Saving `ppp-in'.
  Saving `ppp-out'.
  #





  44..22..22..  UUttiilliisseerr iippcchhaaiinnss--rreessttoorree

  ipchains-restore remet les chanes que vous avez sauv avec ipchains-
  save. Il peut prendre deux options : "-v" qui dcrit chaque rgle
  lorsqu'elle est ajoute, et "-f" qui force le nettoyage des chanes
  dfinies par l'utilisateur si elles existent, comme dcrit plus bas.


  Si une chane dfinie par l'utilisateur est trouve  l'entre,
  ipchains-restore vrifie que cette chane existe dj. Si elle existe,
  alors vous serez interrog pour savoir si la chane doit tre nettoye
  (suppression de toutes les rgles) ou si la restauration de la chane
  doit tre saute. Si vous spcifiez "-f" sur la ligne de commande,
  vous ne serez pas interrog ; la chane sera nettoye.


  Par exemple :



       # ipchains-restore < my_firewall
       Restoring `input'.
       Restoring `output'.
       Restoring `forward'.
       Restoring `ppp-in'.
       Chain `ppp-in' already exists. Skip or flush? [S/f]? s
       Skipping `ppp-in'.
       Restoring `ppp-out'.
       Chain `ppp-out' already exists. Skip or flush? [S/f]? f
       Flushing `ppp-out'.
       #





  55..  DDiivveerrss

  Cette section contient toutes les informations et les questions
  frquemment poses que je ne pouvais faire entrer dans la structure
  ci-dessus.


  55..11..  CCoommmmeenntt oorrggaanniisseerr vvooss rrgglleess ppaarree--ffeeuu

  Cette question ncessite un peu de rflexion. Vous pouvez tenter de
  les organiser pour optimiser la vitesse (minimiser le nombre de
  vrifications de rgles pour la plupart des paquets) ou pour augmenter
  la maniabilit.


  Si vous avez une connexion intermittente, disons une connexion PPP,
  vous pouvez configurer la premire rgle de la chane d'entre pour
  tre `-i ppp0 -j DENY' au lancement, puis avoir quelque chose comme
  ceci dans votre script ip-up :



       # Re-cre la chane "ppp-in"
       ipchains-restore -f < ppp-in.firewall

       # Remplace la rgle DENY par un saut vers la chane se chargeant du ppp
       ipchains -R input 1 -i ppp0 -j ppp-in





  Votre script ip-down pourrait ressembler  a :



       ipchains -R input 1 -i ppp0 -j DENY






  55..22..  CCee qquu''iill nnee ffaauutt ppaass ffiillttrreerr

  Il y a un certain nombre de choses auxquelles vous devez faire
  attention avant de commencer  filtrer quelque chose que vous n'auriez
  pas voulu filtrer.


  55..22..11..  LLeess ppaaqquueettss IICCMMPP

  Les paquets ICMP sont utiliss (entre autres choses) pour indiquer des
  problmes aux autres protocoles (comme TCP et UDP). Les paquets
  "destination-unreachable" (destination non accessible) en particulier.
  Le bloquage de ces paquets signifie que vous n'obtiendrez jamais les
  erreurs "Host unreachable" ou "No route to host" ; toute connexion
  attendra une rponse qui ne viendra jamais. C'est irritant, mais
  rarement fatal.


  Un problme plus inquitant est le rle des paquets ICMP dans la
  dcouverte MTU. Toutes les bonnes implmentations de TCP (y compris
  celle de Linux) utilisent la recherche MTU pour tenter de trouver quel
  est le plus grand paquet qui peut atteindre une destination sans tre
  fragment (la fragmentation diminue les performances, principalement
  lorsque des fragments occasionnels sont perdus). La recherche MTU
  fonctionne en envoyant des paquets avec le bit "Don't Fragment" mis,
  et en envoyant ensuite des paquets plus petits s'il reoit un paquet
  ICMP indiquant "Fragmentation needed but DF set" (`fragmentation-
  needed'). C'est un paquet de type "destination-unreachable", et s'il
  n'est jamais reu, l'hte local ne rduira pas le MTU, et les
  performances seront abyssales ou inexistantes.


  Notez qu'il est commun de bloquer tous les messages ICMP de
  redirection (type 5) ; ils peuvent tre utiliss pour manipuler le
  routage (bien que les piles IP bien conues disposent de gardes-fou),
  et sont donc souvent considrs comme quelques peu risqus.





  55..22..22..  CCoonnnneexxiioonnss TTCCPP aauu DDNNSS ((sseerrvveeuurr ddee nnoomm))

  Si vous tentez de bloquer toutes les connexions TCP sortantes,
  rappellez vous que le DNS n'utilise pas toujours UDP ; si la rponse
  du serveur dpasse les 512 octets, le client utilise une connexion TCP
  (allant toujours sur le port numro 53) pour obtenir les donnes.


  Ceci peut tre un pige car le DNS fonctionnera "en gros" si vous
  interdisez de tels transferts TCP ; vous pouvez exprimenter des
  dlais longs et tranges, et d'autres problmes lis au DNS si vous le
  faites.


  Si les demandes de votre DNS sont toujours diriges vers les mmes
  sources externes (soit directement en utilisant la ligne nameserver
  dans /etc/resolv.conf ou en utilisant un serveur de noms cache en mode
  de redirection), alors vous n'aurez besoin d'autoriser que les
  connexions du port domain sur ce serveur de nom  partir du port local
  domain (si vous utilisez un serveur de nom cache) ou d'un port lev
  (> 1023) si vous utilisez /etc/resolv.conf.


  55..22..33..  CCaauucchheemmaarrss dduu FFTTPP

  L'autre problme classique du filtrage de paquets est celui pos par
  le FTP.  Le FTP a deux mmooddeess ; le mode traditionnel est appel mmooddee
  aaccttiiff et le plus rcent est appel mmooddee ppaassssiiff. Les navigateurs web
  utilisent souvent le mode passif par dfaut, mais les programmes de
  ftp en ligne de commmande utilisent en gnral par dfaut le mode
  actif.


  En mode actif, lorsque l'hte distant dsire envoyer un fichier (ou
  mme les rsultats d'une commande ls ou dir), il essaye d'ouvrir une
  connexion TCP sur la machine locale. Cel signifie que vous ne pouvez
  filtrez ces connexions TCP sans supprimer le FTP actif.


  Si vous avez comme option l'utilisation du mode passif, alors tout va
  bien ; le mode passif fait passer les connexions de donnes du client
  au serveur, mme pour les donnes arrivantes. Autrement, il est
  recommend de n'autoriser que les connexions TCP vers les ports
  suprieurs  1024 et de les interdire entre 6000 et 6010 (6000 est
  utilis par X-Windows).


  55..33..  FFiillttrreerr llee ppiinngg ddee llaa mmoorrtt ((PPiinngg ooff DDeeaatthh))

  Les machines Linux sont maintenant immunises du fameux PPiinngg ooff DDeeaatthh,
  qui implique l'envoi de paquets ICMP illgalement grands qui font
  dborder les buffers de la pile TCP du rcepteur et causent de gros
  dgts.


  Si vous voulez protger des machines qui peuvent tre vulnrables, vos
  pouvez simplement bloquer les fragments ICMP. Les paquets ICMP normaux
  ne sont pas assez gros pour ncessiter la fragmentation, et vous ne
  casserez rien  part les gros pings. J'ai entendu parler (non
  confirm) de rapports comme quoi quelques systmes ont seulement
  besoin du dernier fragment d'un paquet ICMP dform pour les
  corrompre, donc bloquer seulement le premier fragment n'est pas
  recommand.



  Mme si tous les programmes exploitant cette erreur que j'ai vu
  utilisent l'ICMP, il n'y a pas de raisons qu'un fragment TCP ou UDP
  (ou d'un protocole inconnu) ne puisse tre utilis pour cette attaque,
  donc le bloquage des fragments ICMP est seulement une solution
  temporaire.


  55..44..  FFiillttrreerr tteeaarrddrroopp eett bboonnkk

  Teardrop et Bonk sont deux attaques (principalement contre les
  machines sous Microsoft Windows NT) qui reposent sur des fragments
  superposs. Avoir votre routeur Linux dfragmenter, ou interdisant
  tous les fragments vers vos machines vulnrables sont d'autres
  options.


  55..55..  FFiillttrreerr lleess bboommbbeess  ffrraaggmmeennttss

  Quelques piles TCP moins fiables sont connues pour avoir des problmes
   grer de larges ensembles de fragments de paquets lorsqu'elles ne
  reoivent pas tous les fragments. Linux n'a pas ce problme. Vous
  pouvez filtrer les fragments (ce qui peut casser les utilisations
  lgitimes) ou compiler votre noyau avec l'option "IP: always
  defragment" mise sur "Y" (seulement si votre machine Linux est la
  seule route possible pour ces paquets).


  55..66..  CChhaannggeerr lleess rrgglleess ppaarree--ffeeuu

  Il y a quelques problmes de temps qui sont impliqus dans la
  modification des rgles pare-feu. Si vous n'y faites pas attention,
  vous pouvez laisser entrer des paquets lorsque vous avez fait la
  moiti de vos changements. Une approche simpliste serait de faire la
  suite :



       # ipchains -I input 1 -j DENY
       # ipchains -I output 1 -j DENY
       # ipchains -I forward 1 -j DENY

       ... Mise en place des changements ...

       # ipchains -D input 1
       # ipchains -D output 1
       # ipchains -D forward 1
       #




  Ceci supprime tous les paquets pour la dure des changements.


  Si vos changements sont restreints  une chane simple, vous pouvez
  crer une nouvelle chane avec les nouvelles rgles, et ensuite
  remplacer ("-R") la rgle qui pointait sur la vieille chane par une
  qui pointe sur la nouvelle chane ; ensuite, vous pouvez supprimer la
  vieille chane. Le remplacement se fera  vitesse atomique.


  55..77..  CCoommmmeenntt mmeettttrree eenn ppllaaccee llaa pprrootteeccttiioonn ccoonnttrree ll''IIPP ssppooooff ??

  L'IP spoofing est une technique dans laquelle un hte envoie des
  paquets qui prtendent venir d'un autre hte. Puisque le filtrage des
  paquets prend ses dcisions sur la base de cette adresse source, l'IP
  spoofing est utilis pour abuser les filtres de paquets. Elle est
  galement utilise pour cacher l'identit d'un attaquant utilisant les
  techniques SYN, Teardrop, Ping of Death et autres drivs (ne vous
  inquitez si vous ne savez pas ce que c'est).


  Le meilleur moyen de se protger de l'IP spoofing est la vrification
  de l'adresse source, et il est ralis par le code de routage, et non
  par le pare-feu et autres.
  Cherchez un fichier nomm /proc/sys/net/ipv4/conf/all/rp_filter.  S'il
  existe, alors l'activation de la vrification de l'adresse source 
  chaque lancement est la bonne solution pour vous. Pour se faire,
  insrez les lignes suivantes quelque part dans vos scripts
  d'initialisation, avant l'initialisation des interfaces rseau :



       # This is the best method: turn on Source Address Verification and get
       # spoof protection on all current and future interfaces.
       if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
         echo -n "Setting up IP spoofing protection..."
         for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
             echo 1 > $f
         done
         echo "done."
       else
         echo PROBLEMS SETTING UP IP SPOOFING PROTECTION.  BE WORRIED.
         echo "CONTROL-D will exit from this shell and continue system startup."
         echo
         # Start a single user shell on the console
         /sbin/sulogin $CONSOLE
       fi





  Si vous ne pouvez faire ceci, vous pouvez insrer manuellement les
  rgles pour protger chaque interface. Ceci ncessite la connaissance
  de chaque interface.  La srie des noyaux 2.1 et suprieurs rejette
  automatiquement les paquets qui prtendent venir des adresses 127.*
  (rserves pour l'interface de loopback, lo).


  Par exemple, disons que vous avez trois interfaces, eth0, eth1 et
  ppp0. Nous pouvons utiliser ifconfig pour nous donner les adresses et
  les masques de rseau de chaque interface. Disons que eth0 est
  rattache  un rseau 192.168.1.0 avec le masque de sous-rseau
  255.255.255.0, eth1 est raccorde  un rseau 10.0.0.0 avec le masque
  de sous-rseau 255.0.0.0, et ppp0 connecte  l'Internet (o toutes
  les adresses sauf les adresses IP prives rserves sont autorises),
  nous insrerions les rgles suivantes :



       # ipchains -A input -i eth0 -s ! 192.168.1.0/255.255.255.0 -j DENY
       # ipchains -A input -i ! eth0 -s 192.168.1.0/255.255.255.0 -j DENY
       # ipchains -A input -i eth1 -s ! 10.0.0.0/255.0.0.0 -j DENY
       # ipchains -A input -i ! eth1 -s 10.0.0.0/255.0.0.0 -j DENY
       #






  Cette approche n'est pas aussi bonne que l'approche par vrification
  de l'adresse source, parce que si votre rseau change, vous devrez
  changer vos rgles pare-feu pour tre  jour.


  Si vous utilisez un noyau de srie 2.0, vous pouvez galement vouloir
  protger l'interface loopback, en utilisant une rgle telle que :



       # ipchains -A input -i ! lo -s 127.0.0.0/255.0.0.0 -j DENY
       #





  55..88..  PPrroojjeettss aavvaannccss

  Il y a une bibliothque dans l'espace utilisateur que j'ai crit et
  qui est inclue avec la distribution source, nomme "libfw". Elle
  utilise la capacit de IP Chains 1.3 et suivants pour copier un paquet
  vers l'espace utilisateur (via l'option du noyau IP_FIREWALL_NETLINK).


  La valeur "mark" peut tre utilise pour spcifier les paramtres de
  Qualit de Service pour les paquets, ou pour spcifier comment les
  paquets doivent tre renvoys. Je ne l'ai cependant jamais utilise,
  mais si vous voulez crire sur ce sujet, contactez moi.


  Des choses comme le ssttaatteeffuull iinnssppeeccttiioonn (je prfre le terme "pare-feu
  dynamique") peuvent tre implmentes dans l'espace utilisateur en
  utilisant cette bibliothque. D'autres ides gniales peuvent tre le
  contrle des paquets sur une base "par utilisateur" en faisant une
  demande sur un dmon rsidant dans l'espace utilisateur. Ceci devrait
  tre relativement simple.


  55..88..11..  SSPPFF :: SSttaatteeffuull PPaacckkeett FFiilltteerriinngg

  ftp://ftp.interlinx.bc.ca/pub/spf <ftp://ftp.interlinx.bc.ca/pub/spf>
  est le site du projet SPF de Brian Murrell, qui permet le suivi de
  connexion dans l'espace utilisateur. Ceci ajoute une dose
  significative de scurit pour les sites  faible bande passante.


  Il y a peu de documentation pour le moment, mais voici un message que
  Brian a envoy  la liste de diffusion en rpondant  quelques
  questions :
















  > Je prsume qu'il fait exactement ce que je veux~: installer une rgle de
  > "retour" temporaire pour laisser entrer des paquets en rponse  une
  > requte extrieure.

  Yup, c'est exactement ce  quoi il sert. Plus il comprendra de protocoles,
  plus il obtiendra de rgles de retour exactes. Pour l'instant il supporte
  (de mmoire, excusez les erreurs ou les omissions) le FTP ( la fois actif et
  passif, intrieur et extrieur), un peu de RealAudio, de traceroute, d'ICMP et
  d'un ICQ basique (transmission des serveurs ICQ, connexions TCP directes, mais
  hlas la seconde connexion directe TCP pour des trucs comme le transfert de
  fichiers, etc., ne sont pas encore prsentes)

  > S'agit-il d'un remplaant pour ipchains ou d'un ajout~?

  C'est un ajout. Pensez  ipchains comme tant le moteur pour autoriser et
  empcher les paquets de traverser une machine Linux. SPF est le pilote, grant
  et surveillant constamment le traffic et disant  ipchains comment changer ses
  polices pour reflter les changements dans les schmas du traffic.





  55..88..22..  MMooddiiffiiccaattiioonn ddeess ddoonnnneess ffttpp ppaarr MMiicchhaaeell HHaasseennsstteeiinn

  Michael Hasenstein de SuSE a cod un correctif pour le noyau qui
  ajoute le suivi des connexions ftp  ipchains. Celui-ci peut tre
  trouv sur http://www.csn.tu-chemnitz.de/~mha/patch.ftp-data-2.gz
  <http://www.csn.tu-chemnitz.de/~mha/patch.ftp-data-2.gz>


  55..99..  EExxtteennssiioonnss ffuuttuurreess

  Les codes de pare-feu et de NAT sont en cours de remise  jour pour le
  2.3. Les plans et les discussions sont disponibles sur l'archive de
  netdev, et sur la liste ipchains-dev. Ces extensions doivent nettoyer
  de nombreux problmes d'utilisation (rellement, la mise en place du
  pare-feu et le camouflage ne devrait pas tre _a_u_s_s_i _d_u_r, et devrait
  autoriser une croissance pour un pare-feu beaucoup plus flexible).


  66..  PPrroobbllmmeess ccllaassssiiqquueess

  66..11..  iippcchhaaiinnss --LL eesstt ggeell !!

  Vous bloquez probablement les demandes DNS ; il finira probablement
  par stopper. Essayez d'utiliser l'option "-n" (numrique) d'ipchains,
  qui supprimera la recherche des noms.


  66..22..  LLee ccaammoouuffllaaggee//rreeddiirreeccttiioonn nnee ffoonnccttiioonnnnee ppaass !!

  Vrifiez si la redirection de paquets est active (dans les noyaux
  rcent, elle est dsactive par dfaut ce qui signifie que les paquets
  ne tentent jamais de traverser la chane "forward"). Vous pouvez
  changer ce dfaut (en tant que super-utilisateur) en tapant



       # echo 1 > /proc/sys/net/ipv4/ip_forward
       #





  Si ceci marche pour vous, vous pouvez le mettre quelque part dans vos
  scripts de lancement, de manire  ce que la redirection soit active
   chaque fois ; vous devrez toutefois configurer votre pare-feu avant
  le lancement de cette commande, autrement il peut y avoir passage de
  paquets.


  66..33..  --jj RREEDDIIRR nnee mmaarrcchhee ppaass !!

  Vous devez autoriser la retransmission des paquets (voir plus haut)
  pour que celle-ci fonctionne ; sinon le code de routage supprime le
  paquet. Ainsi, si vous utilisez juste la redirection sans avoir de
  transmission, vous devez y faire attention.


  Notez que REDIR (dans la chane d'entre) n'affecte pas les connexions
  d'un processus local.



  66..44..  LLeess iinntteerrffaacceess jjookkeerr nnee ffoonnccttiioonnnneenntt ppaass !!

  Il y avait une erreur dans les versions 2.1.102 et 2.1.103 du noyau
  (et dans quelques anciens correctifs que j'avais sorti) qui faisait
  planter les commandes ipchains utilisant une interface joker (comme -i
  ppp+).


  Cette erreur a t corrige dans les noyaux rcents, et dans le
  correctif 2.0.34 du site web. Vous pouvez aussi le corriger  la main
  dans les sources du noyau en changeant la ligne 63 de
  include/linux/ip_fw.h :



       #define IP_FW_F_MASK    0x002F  /* All possible flag bits mask   */





  Ceci doit en fait tre "0x003F". Corrigez et recompilez le noyau.


  66..55..  TTOOSS nnee ffoonnccttiioonnnnee ppaass !!

  C'est de ma faute : la configuration du champ Type of Service ne
  change pas le Type of Service dans les noyaux 2.1.102  2.1.111. Ce
  problme a t corrig dans le 2.1.112.


  66..66..  iippaauuttooffww eett iippppoorrttffww nnee ffoonnccttiioonnnneenntt ppaass !!

  Pour les 2.0.x, c'est vrai ; je n'ai pas le temps de crer et de
  maintenir un correctif de taille gigantesque pour ipchains et
  ipautofw/ipportfw.


  Pour les 2.1.x, rcuprez ipmasqadm de Juan Ciarlante sur

  <url url="http://juanjox.linuxhq.com/"
          name="http://juanjox.linuxhq.com/">


  et utilisez-le exactement de la manire dont vous auriez utilis
  ipautofw ou ipportfw,  part qu' la place de ipportfw vous devez
  taper ipmasqadm portfw, et  la place de ipautofw vous devez taper
  ipmasqadm autofw.


  66..77..  XXoossVViieeww nnee mmaarrcchhee ppaass !!

  Mettez  jour  la version 1.6.0 ou suprieure, qui ne ncessite pas
  de rgle pare-feu pour les noyaux 2.1.x. Il semblerait tre  nouveau
  cass dans le 1.6.1 ; veuillez voir l'auteur (ce n'est pas de ma
  faute !).


  66..88..  EErrrreeuurr ddee sseeggmmeennttaattiioonn aavveecc --jj RREEDDIIRREECCTT !!

  C'tait une erreur dans ipchains version 1.3.3. Veuillez mettre 
  jour.



  66..99..  JJee nnee ppeeuuxx ppaass mmooddiiffiieerr lleess tteemmppss dd''aatttteennttee dduu ccaammoouuffllaaggee !!

  C'est vrai (pour les noyaux 2.1.x) jusqu'au et incluant le 2.1.112.
  Ceci est pour le moment vigoureusement traqu, et au moment o vous
  lirez ce document il se pourrait que ce soit rsolu. Ma page web
  contiendra un correctif lorsqu'il sera disponible.


  66..1100..  JJee vveeuuxx ffiirreewwaalllleerr IIPPXX !!

  Ainsi qu'un certain nombre d'autres personnes, il semble. Mon code
  couvre seulement IP, malheureusement. Du bon ct, tout est l pour
  pouvoir firewaller IPX ! Vous devrez juste crire le code ; je vous
  aiderai joyeusement l o ce sera possible.


  77..  UUnn eexxeemmppllee ssrriieeuuxx

  Cet exemple est extrait du tutorial donn par Michael Neuling et moi-
  mme en mars 1999 lors du LinuxWorld ; ce n'est pas le seul moyen de
  rgler le problme donn, mais c'est probablement le plus simple.
  J'espre que vous le jugerez informatif.


  77..11..  LL''aarrrraannggeemmeenntt


    Un rseau interne camoufl (sous divers systmes d'exploitation),
     que nous appellerons "BON" ;

    des serveurs exposs dans un rseau spar (nomm "ZDM" pour Zone
     Dmilitarise) ;

    une connexion PPP  l'Internet (nomm "MAUVAIS").













     Rseau externe (MAUVAIS)
             |
             |
         ppp0|
      ---------------
      | 192.84.219.1|             Rseau des serveurs (ZDM)
      |             |eth0
      |             |----------------------------------------------
      |             |192.84.219.250 |             |              |
      |             |               |             |              |
      |192.168.1.250|               |             |              |
      ---------------          --------       -------        -------
             | eth1            | SMTP |       | DNS |        | WWW |
             |                 --------       -------        -------
             |              192.84.219.128  192.84.219.129  192.84.218.130
             |
     Rseau Interne (BON)





  77..22..  BBuuttss

  Sur la machine filtrant les paquets :

     PPIINNGG ttoouutt rrsseeaauu
        Trs utile si la machine est hors-service.

     TTRRAACCEERROOUUTTEE ttoouutt rrsseeaauu
        Une fois de plus, utile pour les diagnostics.

     AAccccss aauu DDNNSS
        Pour rendre ping et DNS plus utile.


   l'intrieur de la Zone Dmilitarise :


  Serveur mail

    SMTP vers l'extrieur

    Accepte le SMTP de l'intrieur et de l'extrieur

    Accepte le POP3 de l'intrieur

  Serveur de nom

    Envoi de requtes DNS vers l'extrieur

    Accepte les requtes DNS de l'intrieur, l'extrieur, et du filtre
     de paquets

  Serveur web

    Accepte les requtes HTTP de l'intrieur et de l'extrieur

    Accs rsync de l'intrieur


  En interne :

     AAuuttoorriissee WWWWWW,, ffttpp,, ttrraacceerroouuttee eett sssshh vveerrss ll''eexxttrriieeuurr
        Ce sont des services standards  autoriser : on autorise parfois
        les machines internes  tout faire, mais ici nous serons plus
        restrictifs.

     AAuuttoorriissee llee SSMMTTPP vveerrss llee sseerrvveeuurr mmaaiill
        Bien entendu, nous voulons qu'il leur soit possible d'envoyer du
        courrier vers l'extrieur.

     AAuuttoorriissee llee PPOOPP33 vveerrss llee sseerrvveeuurr mmaaiill
        C'est ainsi qu'ils lisent leur courrier.

     AAuuttoorriissee lleess rreeqquutteess DDNNSS vveerrss llee sseerrvveeuurr ddee nnoomm
        Ils doivent pouvoir rechercher des noms externes pour le web, le
        ftp, traceroute ou ssh.

     AAuuttoorriissee rrssyynncc vveerrss llee sseerrvveeuurr wweebb
        C'est ainsi qu'ils synchronisent le serveur web externe avec
        l'interne.

     AAuuttoorriissee lleess rreeqquutteess WWWWWW vveerrss llee sseerrvveeuurr wweebb
        Bien entendu, nous voulons qu'ils puissent se connecteur au
        serveur web externe.

     AAuuttoorriissee llee ppiinngg vveerrss llee ffiillttrree ddee ppaaqquueettss
        Il est courtois de l'autoriser ; ils peuvent ainsi tester si le
        pare-feu est coup (ainsi nous ne serons pas tenus responsables
        si un site extrieur est coup).


  77..33..  AAvvaanntt llee ffiillttrraaggee ddeess ppaaqquueettss


    Protection anti-spoofing


     Puisque nous n'avons pas de routage asymtrique, nous pouvons
     simplement mettre en marche l'anti-spoofing pour toutes les
     interfaces.




       # for f in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 1 > $f; done
       #





    Mettre en place des rgles de filtrage en interdiction (DENY)
     totale :


     Nous autorisons tout de mme le traffic local, mais nous
     interdisons tout le reste.




       # ipchains -A input -i ! lo -j DENY
       # ipchains -A output -i ! lo -j DENY
       # ipchains -A forward -j DENY
       #





    Configurer les interfaces


     Ceci est gnralement ralis par les scripts de lancement. Fates
     bien attention  ce que les rgles ci-dessus soient insres avant
     que les interfaces ne soient configures, afin de prvenir le
     passage de paquets avant l'insertion des rgles.


    Insertion des modules de camouflage par protocole

     Nous devons insrer le module de camouflage du FTP, ainsi le ftp
     passif et actif fonctionnera `uniquement' du rseau interne.




       # insmod ip_masq_ftp
       #





  77..44..  FFiillttrraaggee ddee ppaaqquueettss ppoouurr lleess ppaaqquueettss ttrraavveerrssaannttss

  Avec le camouflage, il vaut mieux filtrer la chane de retransmission.


  Cassez la chane de retransmission en plusieurs chanes utilisateurs
  dpendant des interfaces sources/destination ; ceci ramne le problme
   des problmes plus grables.



       ipchains -N bon-zdm
       ipchains -N mauvais-zdm
       ipchains -N bon-mauvais
       ipchains -N zdm-bon
       ipchains -N zdm-mauvais
       ipchains -N mauvais-bon




  ACCEPTer les codes standards d'erreur ICMP est un fait classique, nous
  lui crons donc une chane.



       ipchains -N icmp-acc





  77..44..11..  CCoonnffiigguurreerr lleess ssaauuttss ddee llaa cchhaannee ddee ttrraannssmmiissssiioonn

  Malheureusement, nous connaissons seulement (dans la chane de
  transmission) quelle est l'interface externe. Ainsi, pour se
  reprsenter de quelle interface vient le paquet, nous utilisons
  l'adresse source (l'anti-spoofing vite les problmes lis aux
  adresses).



  Notez que nous enregistrons tout ce qui ne vrifie aucune de ces
  rgles (cependant, ceci ne devrait jamais arriver).



       ipchains -A forward -s 192.168.1.0/24 -i eth0 -j bon-zdm
       ipchains -A forward -s 192.168.1.0/24 -i ppp0 -j bon-mauvais
       ipchains -A forward -s 192.84.219.0/24 -i ppp0 -j zdm-mauvais
       ipchains -A forward -s 192.84.219.0/24 -i eth1 -j zdm-bon
       ipchains -A forward -i eth0 -j mauvais-zdm
       ipchains -A forward -i eth1 -j mauvais-bon
       ipchains -A forward -j DENY -l





  77..44..22..  DDffiinniirr llaa cchhaannee iiccmmpp--aacccc

  Les paquets correspondant  l'une des erreurs ICMP sont accepts,
  sinon le contrle les rendra  la chane appellante.




       ipchains -A icmp-acc -p icmp --icmp-type destination-unreachable -j ACCEPT
       ipchains -A icmp-acc -p icmp --icmp-type source-quench -j ACCEPT
       ipchains -A icmp-acc -p icmp --icmp-type time-exceeded -j ACCEPT
       ipchains -A icmp-acc -p icmp --icmp-type parameter-problem -j ACCEPT





  77..44..33..  BBoonn ((iinntteerrnnee)) vveerrss ZZDDMM ((sseerrvveeuurrss))

  Restrictions internes :

    Autorise WWW, ftp, traceroute, ssh vers l'extrieur

    AAuuttoorriissee llee SSMMTTPP vveerrss llee sseerrvveeuurr mmaaiill

    AAuuttoorriissee llee PPOOPP33 vveerrss llee sseerrvveeuurr mmaaiill

    AAuuttoorriissee lleess rreeqquutteess DDNNSS vveerrss llee sseerrvveeuurr ddee nnoomm

    AAuuttoorriissee llee rrssyynncc vveerrss llee sseerrvveeuurr wweebb

    AAuuttoorriissee llee WWWWWW vveerrss llee sseerrvveeuurr wweebb

    Autorise le ping vers le filtre de paquets

  On pourrait utiliser le camouflage du rseau interne vers la ZDM, mais
  ici nous ne le ferons pas. Puisque personne du rseau interne ne
  devrait tenter de choses dmoniaques, nous enregistrons les paquets
  qui sont interdits.










  ipchains -A bon-zdm -p tcp -d 192.84.219.128 smtp -j ACCEPT
  ipchains -A bon-zdm -p tcp -d 192.84.219.128 pop-3 -j ACCEPT
  ipchains -A bon-zdm -p udp -d 192.84.219.129 domain -j ACCEPT
  ipchains -A bon-zdm -p tcp -d 192.84.219.129 domain -j ACCEPT
  ipchains -A bon-zdm -p tcp -d 192.84.218.130 www -j ACCEPT
  ipchains -A bon-zdm -p tcp -d 192.84.218.130 rsync -j ACCEPT
  ipchains -A bon-zdm -p icmp -j icmp-acc
  ipchains -A bon-zdm -j DENY -l





  77..44..44..  MMaauuvvaaiiss ((eexxttrriieeuurr)) vveerrss ZZDDMM ((sseerrvveeuurrss))


    Restrictions de la ZDM :

    Serveur mail :

    SSMMTTPP vveerrss ll''eexxttrriieeuurr

    AAcccceeppttee llee SSMMTTPP vveennaanntt de l'intrieur et eexxttrriieeuurr

    Accepte le POP3 de l'intrieur

    Serveur de noms :

    EEnnvvooii ddee rreeqquutteess DDNNSS vveerrss ll''eexxttrriieeuurr

    AAcccceeppttee llee DDNNSS vveennaanntt de l'intrieur, eexxttrriieeuurr et du filtre de
     paquets

    Serveur web :

    AAcccceeppttee lleess rreeqquutteess HHTTTTPP vveennaanntt ddee l'intrieur et de ll''eexxttrriieeuurr

    Accs rsync de l'intrieur


    Les trucs  autoriser du rseau extrieur vers la ZDM

    N'enregistre pas les violations, elles peuvent arriver.




       ipchains -A mauvais-zdm -p tcp -d 192.84.219.128 smtp -j ACCEPT
       ipchains -A mauvais-zdm -p udp -d 192.84.219.129 domain -j ACCEPT
       ipchains -A mauvais-zdm -p tcp -d 192.84.219.129 domain -j ACCEPT
       ipchains -A mauvais-zdm -p tcp -d 192.84.218.130 www -j ACCEPT
       ipchains -A mauvais-zdm -p icmp -j icmp-acc
       ipchains -A mauvais-zdm -j DENY





  77..44..55..  BBoonn ((iinnttrriieeuurr)) vveerrss MMaauuvvaaiiss ((eexxttrriieeuurr))..


    Restrictions internes :

    AAuuttoorriissee llee WWWWWW,, ffttpp,, ttrraacceerroouuttee,, sssshh vveerrss ll''eexxttrriieeuurr


    Autorise SMTP vers le serveur mail

    Autorise POP-3 vers le serveur mail

    Autorise DNS vers le serveur de nom

    Autorise rsync vers le serveur web

    Autorise WWW vers le serveur web

    Autorise ping vers le filtre de paquets

    Un grand nombre de gens autorisent tout venant de l'intrieur vers
     les rseaux extrieurs, puis ajoutent des restrictions. Nous sommes
     fascistes.

    Enregistre les violations.

    Le ftp passif est gr par le module de camouflage.



       ipchains -A bon-mauvais -p tcp --dport www -j MASQ
       ipchains -A bon-mauvais -p tcp --dport ssh -j MASQ
       ipchains -A bon-mauvais -p udp --dport 33434:33500 -j MASQ
       ipchains -A bon-mauvais -p tcp --dport ftp --j MASQ
       ipchains -A bon-mauvais -p icmp --icmp-type ping -j MASQ
       ipchains -A bon-mauvais -j REJECT -l





  77..44..66..  ZZDDMM vveerrss BBoonn ((iinnttrriieeuurr))



    Restrictions internes :

    Autorise WWW, ftp, traceroute, ssh vers l'extrieur

    AAuuttoorriissee SSMMTTPP vveerrss llee sseerrvveeuurr mmaaiill

    AAuuttoorriissee PPOOPP33 vveerrss llee sseerrvveeuurr mmaaiill

    AAuuttoorriissee DDNNSS vveerrss llee sseerrvveeuurr ddee nnoommss

    AAuuttoorriissee rrssyynncc vveerrss llee sseerrvveeuurr wweebb

    AAuuttoorriissee WWWWWW vveerrss llee sseerrvveeuurr wweebb

    Autorise ping vers le filtre de paquets


    Si nous camouflions le rseau intrieur de la ZDM, nous refuserions
     simplement les paquets venant d'un autre moyen. Tel quel, il
     autorise uniquement les paquets qui peuvent provenir d'une
     connexion pr-tablie.








  ipchains -A zdm-bon -p tcp ! -y -s 192.84.219.128 smtp -j ACCEPT
  ipchains -A zdm-bon -p udp -s 192.84.219.129 domain -j ACCEPT
  ipchains -A zdm-bon -p tcp ! -y -s 192.84.219.129 domain -j ACCEPT
  ipchains -A zdm-bon -p tcp ! -y -s 192.84.218.130 www -j ACCEPT
  ipchains -A zdm-bon -p tcp ! -y -s 192.84.218.130 rsync -j ACCEPT
  ipchains -A zdm-bon -p icmp -j icmp-acc
  ipchains -A zdm-mauvais -j DENY -l





  77..44..77..  ZZDDMM vveerrss MMaauuvvaaiiss ((eexxttrriieeuurr))



    Restrictions de la ZDM :

    Serveur mail

    SSMMTTPP vveerrss ll''eexxttrriieeuurr

    AAcccceeppttee SSMMTTPP vveennaanntt ddee l'intrieur et de ll''eexxttrriieeuurr

    Accepte POP3 venant de l'intrieur


    Serveur de noms

    EEnnvvooii ddee rreeqquutteess DDNNSS vveerrss ll''eexxttrriieeuurr

    AAcccceeppttee llee DDNNSS ddee l'intrieur, ll''eexxttrriieeuurr et du filtre de paquets


    Serveur web

    AAcccceeppttee HHTTTTPP vveennaanntt ddee l'intrieur et de ll''eexxttrriieeuurr

    Accs rsync de l'intrieur


  


       ipchains -A zdm-mauvais -p tcp -s 192.84.219.128 smtp -j ACCEPT
       ipchains -A zdm-mauvais -p udp -s 192.84.219.129 domain -j ACCEPT
       ipchains -A zdm-mauvais -p tcp -s 192.84.219.129 domain -j ACCEPT
       ipchains -A zdm-mauvais -p tcp ! -y -s 192.84.218.130 www -j ACCEPT
       ipchains -A zdm-mauvais -p icmp -j icmp-acc
       ipchains -A zdm-mauvais -j DENY -l





  77..44..88..  MMaauuvvaaiiss ((eexxttrriieeuurr)) vveerrss BBoonn ((iinnttrriieeuurr))



    Nous n'autorisons rien (de non camoufl)  passer du rseau
     extrieur vers le rseau intrieur.


       ipchains -A mauvais-bon -j REJECT


  77..44..99..  FFiillttrraaggee ddee ppaaqquueettss ppoouurr llaa mmaacchhiinnee LLiinnuuxx eellllee--mmmmee



    Si nous dsirons utiliser le filtrage de paquets sur les paquets
     arrivant sur la machine elle-mme, nous devons filtrer la chane
     d'entre.  Nous crons une chane pour chaque interface de
     destination :


       ipchains -N mauvais-if
       ipchains -N zdm-if
       ipchains -N bon-if





    Crons les sauts vers elles :



       ipchains -A input -d 192.84.219.1 -j mauvais-if
       ipchains -A input -d 192.84.219.250 -j zdm-if
       ipchains -A input -d 192.168.1.250 -j bon-if





  77..44..99..11..  IInntteerrffaaccee MMaauuvvaaiiss ((eexxttrriieeuurr))



    Machine de filtrage des paquets :

    PPIINNGG ttoouuss lleess rrsseeaauuxx

    TTRRAACCEERROOUUTTEE ttoouuss lleess rrsseeaauuxx

    Accs DNS


    L'interface extrieure reoit aussi des rponses aux paquets
     camoufls, les erreurs ICMP leur correspondant et les rponses
     PING.



       ipchains -A mauvais-if -i ! ppp0 -j DENY -l
       ipchains -A mauvais-if -p TCP --dport 61000:65096 -j ACCEPT
       ipchains -A mauvais-if -p UDP --dport 61000:65096 -j ACCEPT
       ipchains -A mauvais-if -p ICMP --icmp-type pong -j ACCEPT
       ipchains -A mauvais-if -j icmp-acc
       ipchains -A mauvais-if -j DENY





  77..44..99..22..  IInntteerrffaaccee ZZDDMM



    Restrictions du filtre de paquets :

    PPIINNGG ttoouuss lleess rrsseeaauuxx

    TTRRAACCEERROOUUTTEE ttoouuss lleess rrsseeaauuxx

    AAccccss DDNNSS


    L'interface ZDM reoit les rponses DNS, ping et les erreurs ICMP



       ipchains -A zdm-if -i ! eth0 -j DENY
       ipchains -A zdm-if -p TCP ! -y -s 192.84.219.129 53 -j ACCEPT
       ipchains -A zdm-if -p UDP -s 192.84.219.129 53 -j ACCEPT
       ipchains -A zdm-if -p ICMP --icmp-type pong -j ACCEPT
       ipchains -A zdm-if -j icmp-acc
       ipchains -A zdm-if -j DENY -l





  77..44..99..33..  IInntteerrffaaccee BBoonn ((iinnttrriieeuurr))



    Restrictions du filtre de paquets

    PPIINNGG ttoouuss lleess rrsseeaauuxx

    TTRRAACCEERROOUUTTEE ttoouuss lleess rrsseeaauuxx

    AAccccss DDNNSS


    Restrictions intrieures :

    Autorise WWW, ftp, traceroute, ssh vers l'extrieur

    Autorise SMTP vers le serveur mail

    Autorise POP3 vers le serveur mail

    Autorise DNS vers le serveur de noms

    Autorise rsync vers le serveur web

    Autorise WWW vers le serveur web

    AAuuttoorriissee ppiinngg vveerrss llee ffiillttrree ddee ppaaqquueettss


    L'interface intrieure reoit les pings, les rponses ping et les
     erreurs ICMP.



       ipchains -A bon-if -i ! eth1 -j DENY
       ipchains -A bon-if -p ICMP --icmp-type ping -j ACCEPT
       ipchains -A bon-if -p ICMP --icmp-type pong -j ACCEPT
       ipchains -A bon-if -j icmp-acc
       ipchains -A bon-if -j DENY -l




  77..55..  FFiinnaalleemmeenntt


    Supprime les rgles de bloquage :


       ipchains -D input 1
       ipchains -D forward 1
       ipchains -D output 1





  88..  AAnnnneexxee :: ddiiffffrreenncceess eennttrree iippcchhaaiinnss eett iippffwwaaddmm

  Quelques-uns de ces changements sont le rsultat de changements du
  noyau, et quelques autres sont un rsultat des diffrences entre
  ipchains et ipfwadm.



  1. De nombreux arguments ont t modifis : les majuscules indiquent
     dornavant une commande, et les minuscules indiquent une option.

  2. Les chanes arbitraires sont supportes, ainsi mme les chanes
     intgres ont des noms complets plutt que des options (cd,
     "input"  la place de "-I").

  3. L'option "-k" a saut : utilisez "! -y".

  4. L'option "-b" insre/ajoute/supprime actuellement deux rgles,
     plutt qu'une rgle "bidirectionnelle" simple.

  5. L'option "-b" peut tre passe  "-C" pour effectuer deux
     vrifications (une dans chaque direction).

  6. L'option "-x" de "-l" a t remplace par "-v".

  7. Les ports sources et destinations multiples ne sont plus supports.
     Heureusement, la possibilit d'employer un intervalle de port aura
     le mme effet.

  8. Les interfaces peuvent seulement tre spcifies par leur nom (pas
     par leurs adresses). L'ancienne smantique a t silencieusement
     change dans la srie des noyaux 2.1, de toute manire.

  9. Les fragments sont examins, mais pas automatiquement autoriss.

  10.
     On s'est dbarrass des chanes de comptage explicites.

  11.
     On peut crire des rgles qui porteront uniquement sur certains
     protocoles IP.

  12.
     L'ancien comportement de vrification de SYN et ACK (qui tait
     auparavant ignor pour les paquets non TCP) a chang ; l'option SYN
     n'est plus valide pour les rgles non spcifiques au TCP.

  13.
     Les compteurs sont maintenant de 64 bits sur les machines 32 bits,
     et non plus 32 bits.


  14.
     L'inversion des options est dornavant supporte.

  15.
     Les codes ICMP sont maintenant supports.

  16.
     Les interfaces joker sont maintenant supportes.

  17.
     Les manipulations de TOS sont maintenant vrifies : l'ancien code
     du noyau les stoppait silencieusement pour vous en manipulant
     (illgalement) le bit TOS "Must Be Zero" ; ipchains retourne
     maintenant une erreur si vous essayez, de mme que pour d'autres
     cas illgaux.


  88..11..  GGuuiiddee ddee rrffrreennccee rraappiiddee

  [ Dans l'ensemble, les arguments des commandes sont en MAJUSCULES, et
  les options des arguments sont en minuscules ]


  Une chose  noter, le camouflage est spcifi par "-j MASQ" ; ceci est
  compltement diffrent de "-j ACCEPT", et n'est pas trait comme un
  effet de bord, au contraire d'ipfwadm.








































  ===========================================================================
  | ipfwadm      | ipchains              | Notes
  ---------------------------------------------------------------------------
  | -A [both]    | -N acct               | Cre une chane "acct"
  |              |& -I 1 input -j acct   | ayant des paquets entrants et
  |              |& -I 1 output -j acct  | sortants qui la traversent.
  |              |& acct                 |
  ---------------------------------------------------------------------------
  | -A in        | input                 | Une rgle sans destination
  ---------------------------------------------------------------------------
  | -A out       | output                | Une rgle sans destination
  ---------------------------------------------------------------------------
  | -F           | forward               | Utilise a comme [chane].
  ---------------------------------------------------------------------------
  | -I           | input                 | Utilise a comme [chane].
  ---------------------------------------------------------------------------
  | -O           | output                | Utilise a comme [chane].
  ---------------------------------------------------------------------------
  | -M -l        | -M -L                 |
  ---------------------------------------------------------------------------
  | -M -s        | -M -S                 |
  ---------------------------------------------------------------------------
  | -a policy    | -A [chain] -j POLICY  | (voir -r et -m).
  ---------------------------------------------------------------------------
  | -d policy    | -D [chain] -j POLICY  | (voir -r et -m).
  ---------------------------------------------------------------------------
  | -i policy    | -I 1 [chain] -j POLICY| (voir -r et -m).
  ---------------------------------------------------------------------------
  | -l           | -L                    |
  ---------------------------------------------------------------------------
  | -z           | -Z                    |
  ---------------------------------------------------------------------------
  | -f           | -F                    |
  ---------------------------------------------------------------------------
  | -p           | -P                    |
  ---------------------------------------------------------------------------
  | -c           | -C                    |
  ---------------------------------------------------------------------------
  | -P           | -p                    |
  ---------------------------------------------------------------------------
  | -S           | -s                    | Prend seulement un port ou un
  |              |                       | intervalle, pas de multiples.
  ---------------------------------------------------------------------------
  | -D           | -d                    | Prend seulement un port ou un
  |              |                       | intervalle, pas de multiples.
  ---------------------------------------------------------------------------
  | -V           | <none>                | Utilise -i [nom].
  ---------------------------------------------------------------------------
  | -W           | -i                    |
  ---------------------------------------------------------------------------
  | -b           | -b                    | Dornavant cre deux rgles.
  ---------------------------------------------------------------------------
  | -e           | -v                    |
  ---------------------------------------------------------------------------
  | -k           | ! -y                  | Ne fonctionne pas  moins que
  |              |                       | -p tcp ne soit galement spcifi.
  ---------------------------------------------------------------------------
  | -m           | -j MASQ               |
  ---------------------------------------------------------------------------
  | -n           | -n                    |
  ---------------------------------------------------------------------------
  | -o           | -l                    |
  ---------------------------------------------------------------------------
  | -r [redirpt] | -j REDIRECT [redirpt] |
  ---------------------------------------------------------------------------
  | -t           | -t                    |
  ---------------------------------------------------------------------------
  | -v           | -v                    |
  ---------------------------------------------------------------------------
  | -x           | -x                    |
  ---------------------------------------------------------------------------
  | -y           | -y                    | Ne fonctionne pas  moins que
  |              |                       | -p tcp ne soit galement spcifi.
  ---------------------------------------------------------------------------




  88..22..  EExxeemmpplleess ddee ccoommmmaannddeess iippffwwaaddmm ttrraadduuiitteess

  Ancienne commande : ipfwadm -F -p deny

  Nouvelle commande : ipchains -P forward DENY


  Ancienne commande : ipfwadm -F -a m -S 192.168.0.0/24 -D 0.0.0.0/0

  Nouvelle commande : ipchains -A forward -j MASQ -s 192.168.0.0/24 -d
  0.0.0.0/0


  Ancienne commande : ipfwadm -I -a accept -V 10.1.2.1 -S 10.0.0.0/8 -D
  0.0.0.0/0

  Nouvelle commande : ipchains -A input -j ACCEPT -i eth0 -s 10.0.0.0/8
  -d 0.0.0.0/0

  (Notez qu'il n'y a pas d'quivalent pour la spcification des
  interfaces par leur adresse : utilisez le nom de l'interface. Sur
  cette machine, 10.1.2.1 correspond  eth0).


  99..  AAnnnneexxee :: uuttiilliisseerr llee ssccrriipptt iippffwwaaddmm--wwrraappppeerr

  Le script shell ipfwadm-wrapper doit tre un remplacement d'ipfwadm
  pour la compatibilit descendante avec ipfwadm 2.3a.


  La seule option qu'il ne peut vraiment pas supporter est l'option
  "-V".  Lorsqu'elle est utilise, un avertissement est affich. Si
  l'option "-W" est galement utilise, l'option "-V" est ignore.
  Autrement, le script essaye de trouver le nom de l'interface associe
   cette adresse, en utilisant ifconfig. Si a ne marche pas (comme
  pour une interface dsactive), alors il sortira avec un message
  d'erreur.


  Cet avertissement peut tre supprim soit en changeant le "-V" pour un
  "-W", ou en dirigeant la sortie standard du script vers /dev/null.


  Si vous trouvez des erreurs dans ce script, ou une modification entre
  les effets du vrai ipfwadm et de ce script, _v_e_u_i_l_l_e_z me rapporter le
  problme : envoyez un courrier  ipchains@rustcorp.com avec le sujet
  "BUG-REPORT". Veuillez lister la version d'ipfwadm (ipfwadm -h), votre
  version d'ipchains (ipchains --version), la version du script
  d'emballage (ipfwadm-wrapper --version). Envoyez moi galement la
  sortie de ipchains-save. Merci d'avance.


  Le mlange d'ipchains avec le script ipfwadm-wrapper se fait  votre
  propre pril.
  1100..  AAnnnneexxee :: rreemmeerrcciieemmeennttss

  Un grand merci  Michael Neuling, qui a crit la pr-version du code
  d'IP chains en travaillant pour moi. Des excuses publiques pour avoir
  rejet son ide de cache des rsultats, qu'Alan Cox a propos plus
  tard et que j'ai finalement commenc  implmenter, ayant vu l'erreur
  de mon ct.


  Merci  Alan Cox pour son support technique par email 24h/24, et pour
  ses encouragements.


  Merci  tous les auteurs du code d'ipfw et d'ipfwadm, spcialement Jos
  Vos.  Rester aux chevilles des gants et tout a... Ceci s'applique
  galement  Linux Torvalds et  tous les bricoleurs du noyau et de
  l'espace utilisateur.


  Merci aux beta testeurs, chasseurs d'erreurs diligents, surtout Jordan
  Mendelson, Shaw Carruthers, Kevin Moule, Dr. Liviu Daia, Helmut Adams,
  Franck Sicard, Kevin Littlejohn, Matt Kemner, John D. Hardin, Alexey
  Kuznetsov, Leos Bitto, Jim Kunzman, Gerard Gerritsen, Serge Sivkov,
  Andrew Burgess, Steve Schmidtke, Richard Offer, Bernhard Weisshuhn,
  Larry Auton, Ambrose Li, Pavel Krauz, Steve Chadsey, Francesco
  Potorti` et Alain Knaff.








































  Linux IPX-HOWTO
  Kevin Thorpe, kevin@pricetrak.com
  Version Franaise par Grgory Lajon glajon@mail.dotcom.fr
  v2.3, 06 Mai 1998

  Ce document tente de dcrire comment obtenir, installer et configurer
  diffrents outils existant pour le systme d'exploitation Linux util
  isant le support du protocole IPX du noyau.
  ______________________________________________________________________

  Table des matires























































  1. Introduction

     1.1 Changements par rapport  la version prcdente
     1.2 Introduction

  2. Responsabilit vis  vis de ce document

  3. Documentation sur le mme sujet

     3.1 Nouvelles versions de ce document
     3.2 Votre avis
     3.3 Liste de diffusion

  4. Quelques termes utiliss dans ce document

  5. Une brve discussion sur la topologie des rseaux IPX

  6. Les fichiers relatifs  IPX dans le rpertoire

  7. Les outils IPX de Greg Page

     7.1 Les outils IPX en dtails

  8. Configurer votre machine Linux comme routeur IPX

     8.1 Dois-je utiliser un rseau interne ?

  9. Configurer votre machine Linux en client NCP

     9.1  Comment rcuprer
     9.2  Compiler
     9.3 Compiler
     9.4 Configurer et utiliser

  10. Configurer votre machine Linux en serveur NCP

     10.1 L'ensemble
        10.1.1 Possibilits offertes par
        10.1.2 Obtenir
        10.1.3 Compiler l'ensemble
     10.2 L'ensemble
        10.2.1 Possibilits offertes par
        10.2.2 Rcuprer
        10.2.3 Compiler et installer
        10.2.4 Configurer et utiliser

  11. Configurer votre machine Linux en client d'impression Novell

  12. Configurer votre machine Linux en serveur d'impression Novell

     12.1 Prrequis
     12.2 Configuration

  13. Un aperu des commandes utilisateur et d'administration de

     13.1 Commandes utilisateur
     13.2 Outils d'administration

  14. Configurer PPP pour le support d'IPX

     14.1 Configurer un serveur IPX/PPP
        14.1.1 Premire tape
        14.1.2 Conception
        14.1.3 Configurer
        14.1.4 Tester la configuration du serveur
     14.2 Configurer un client IPX/PPP
        14.2.1 Configurer
        14.2.2 Tester le client IPX/PPP

  15. Tunnel IPX sur IP

     15.1 Rcuprer
     15.2 Compiler
     15.3 Configurer
     15.4 Tester et utiliser

  16. Support commercial IPX pour Linux

     16.1 Caldera's Network Desktop

  17. Foire Aux Questions

  18.  Copyright

  19. Remerciements



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ceci est l'IPX-HOWTO. Il est conseill de lire le NET-3-HOWTO de Linux
  en parallle avec ce document.


  11..11..  CChhaannggeemmeennttss ppaarr rraappppoorrtt  llaa vveerrssiioonn pprrccddeennttee

  Changement d'auteur:
  Un grand merci  Terry Dawson pour avoir transmis ce document et
  flicitations pour tre devenu papa.
  Ajouts :
  beaucoup de questions droutantes sur la liste de diffusion.
  Corrections, mises  jour :
  La nouvelle version de ncpfs supporte maintenant les logins NDS. C'est
  en beta test et peut tre interdit dans votre pays  cause de
  l'utilisation de technologies brevetes.  Ajout du support des droits
  d'accs dans mars_nwe. Toujours en beta test.


  11..22..  IInnttrroodduuccttiioonn

  Compar aux autres systmes d'exploitation de la famille Un*x, le
  noyau de Linux possde une toute nouvelle implmentation de la partie
  rseau.  Cette nouvelle approche de dveloppement des logiciels rseau
  du noyau ont permis  Linux de pouvoir supporter des protocoles autres
  que TCP/IP. Le protocole IPX fait partie de ceux-l.

  Le noyau de Linux supporte le protocole IPX seulement. Il ne prend pas
  encore en compte les protocoles tels que IPX/RIP, SAP ou NCP. Ces
  derniers sont grs par d'autres logiciels comme nous le verrons plus
  loin dans ce document.

  La gestion du protocole IPX a t initialement dveloppe par Alan Cox
  <alan@lxorguk.ukuu.org.uk>, puis a t amlior par Greg Page
  <greg@caldera.com>.






  22..  RReessppoonnssaabbiilliitt vviiss  vviiss ddee ccee ddooccuummeenntt

  Je ne sais et ne peux connatre tout ce qu'il y a  savoir sur la
  partie logiciel rseau de Linux. Je vous prie donc d'accepter le fait
  qu'il puisse y avoir des erreurs dans ce document et d'tre vigilant.
  Je vous conseille de lire tout fichier README inclus dans chacun des
  logiciels dont il sera question dans ce document pour de plus amples
  informations. Je tenterai de mon ct de conserver ce document  jour
  et sans erreurs autant que possible.  Les versions des logiciels sont
  les versions disponibles au moment o ce document a t crit.

  En aucun cas les auteurs des logiciels cits dans ce document ou moi-
  mme n'offrons de protection contre ce que vous faites. Si vous
  utilisez ce logiciel, mme de la faon dcrite dans ce document, et
  que cela cause des problmes sur votre rseau, alors vous seul en
  endosserez la responsabilit.  J'ai inclus cet avertissement parce que
  la mise en oeuvre et la configuration d'un rseau IPX n'est pas
  toujours aise et que cela peut engendrer d'indsirables interactions
  avec les autres routeurs ou serveurs de fichiers si vous ne faites pas
  attention. J'ai galement inclus cet avertissement parce qu'une
  personne suffisamment malchanceuse pour avoir appris cette leon de la
  manire douloureuse me l'a demand.

  NdT : Le traducteur, qui n'est pas un spcialiste des rseaux
  Netware(tm), met les mmes rserves que l'auteur.




  33..  DDooccuummeennttaattiioonn ssuurr llee mmmmee ssuujjeett

  Ce document prsume que vous savez compiler un noyau Linux avec les
  options rseau appropries et que vous savez vous servir des outils de
  configuration de base des rseaux comme ifconfig et route. Si ce n'est
  pas le cas, je vous conseille de lire le NET-3-HOWTO
  <NET-3-HOWTO.html> lorsque le prsent document y fait rfrence.

  Les autres documents HOWTO de Linux qui pourraient vous tre utiles
  sont :

  L'Ethernet-HOWTO <Ethernet-HOWTO.html> qui dcrit en dtail la manire
  de configurer un port Ethernet pour Linux.

  Le PPP-HOWTO <PPP-HOWTO.html> puisque la gestion d'IPX est implmente
   partir de la version 2.2.0d de PPP pour Linux.



  33..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Si votre copie de ce document date de plus de deux mois, je vous
  recommande fortement d'obtenir une version plus rcente. Les supports
  rseau pour Linux changent trs rapidement avec de nouvelles fonctions
  et amliorations, en consquence de quoi ce document change lui aussi
  frquemment. La dernire version de ce document est disponible en
  version anglaise par le biais d'un ftp anonyme sur :

  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/IPX-HOWTO> ou :
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/IPX-
  HOWTO{-html.tar,ps,dvi}.gz>



  ou


  sur le serveur du Linux Documentation Project
  <http://metalab.unc.edu/LDP/linux.html>  la page : IPX-HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/IPX-HOWTO.html> ou sinon auprs de
  l'auteur, <kevin@pricetrak.com>.  Il peut aussi tre post dans les
  forums de discussion comp.os.linux.networking, comp.os.linux.answers
  et news.answers de temps  autre.

  NdT : La version franaise initialement traduite par Jean-Christophe
  Arnu est disponible de la mme manire :

  lip6 <ftp://ftp.lip6.fr/pub/Linux/french/docs/HOWTO/IPX-HOWTO.gz>


  33..22..  VVoottrree aavviiss

  Envoyez-moi tout commentaire, amliorations ou suggestions :
  <kevin@pricetrak.com>. Si j'obtiens des retours d'informations
  rapidement je pourrai amliorer ou corriger ce document dans les plus
  brefs dlais. Si vous rencontrez un quelconque problme avec ce
  document, veuillez m'en faire part directement par courrier
  lectronique car je peux rater des informations postes dans les
  forums de discussion.


  33..33..  LLiissttee ddee ddiiffffuussiioonn

  Il existe une liste dans laquelle on discute des diffrents logiciels
  IPX pour Linux dcrits dans ce document. Vous pouvez vous y abonner en
  envoyant un courrier  <listserv@sh.cvut.cz> avec add linware dans le
  corps du message. Vous envoyez vos contributions par courrier 
  <linware@sh.cvut.cz>. Je consulte rgulirement cette liste.

  Cette liste est archive sur le site www.kin.vslib.cz
  <http://www.kin.vslib.cz/hypermail/linware/>



  44..  QQuueellqquueess tteerrmmeess uuttiilliissss ddaannss ccee ddooccuummeenntt

  Vous rencontrerez souvent au cours de ce document les termes client et
  serveur. Ce sont des termes spcifiques dont la dfinition est bien
  connue mais j'ai un peu gnralis leur dfinition :

     cclliieenntt
        C'est la machine ou le programme qui initie une action ou une
        connexion dans le but de pouvoir utiliser des services ou des
        donnes.


     sseerrvveeuurr
        C'est la machine ou le programme qui accepte des connexions
        d'une ou plusieurs machines distantes et qui leur fournit un
        service ou des donnes.

  Ces dfinitions ne sont pas trs compltes, mais elles permettent de
  distinguer les participants des protocoles de bout en bout tels que
  _P_P_P et _S_L_I_P qui n'ont pas rellement de client et de serveur.

  Vous lirez aussi les termes suivants :

     BBiinnddeerryy
        La _b_i_n_d_e_r_y est une base de donnes spcialise qui stocke sur un
        serveur de fichiers Novell des informations concernant la
        configuration du rseau. Les clients Netware peuvent interroger
        la _b_i_n_d_e_r_y pour obtenir de l'information sur les services
        disponibles, sur le routage et sur les utilisateurs.
     TTyyppee ddee TTrraammee ((FFrraammee ttyyppee))
        dcrit le protocole utilis pour transporter les paquets de
        donnes IPX (et IP)  travers vos segments Ethernet.  On en
        rencontre couramment quatre :

        EEtthheerrnneett__IIII
           C'est une version raffine du standard Ethernet original DIX.
           Novell s'est vu attribuer un identifiant de protocole
           (protocol id) formel. Cela signifie que IPX et IP peuvent
           coexister joyeusement dans un environnement Ethernet_II.  Ce
           type de trame est gnralement utilis dans les
           environnements Novell et c'est un bon choix.

        880022..33
           C'est un protocole IEEE dfinissant un mcanisme  dtection
           de porteuse et accs multiple avec dtection des collisions
           (Carrier Sense Multiple Access with Collision Detection
           (CSMA/CD)). Il est bas sur le standard Ethernet original
           DIX, avec une importante modification. Le champ de type
           (protocol id) a t transform en champ de longueur  la
           place. C'est pour cette raison que l'on ne devrait pas
           utiliser IPX avec ce type de trame.  IEEE 802.3 a t conu
           pour transporter des trames IEEE 802.2 sseeuulleemmeenntt, mais il
           existe des implmentations qui l'utilisent pour transporter
           des trames IPX directement et cela fonctionne quand mme.
           Evitez-le  moins de vouloir vous connecter  un rseau dj
           configur pour l'utiliser.

        880022..22
           C'est un protocole IEEE qui dfinit un ensemble de procdures
           de contrle de la couche liaison logique. Il fournit une
           faon simple de faire coexister plusieurs protocoles mais
           reste limit dans ce sens. Novell utilise un SAP (Service
           Address Point, quivalent d'un identifiant de protocole) non
           officiel. Mais comme tout le monde fait pareil, cela n'a
           encore jamais pos de problmes.

        SSNNAAPP
           SNAP est le protocole d'accs au sous-rseau (Sub Network
           Access Protocol). Ce protocole est implment au-dessus de
           802.3 et 802.2. Il tend les capacits multiprotocole de
           802.2 et prsente une certaine compatibilit avec les trames
           Ethernet et Ethernet_II existantes.

     IIPPXX
        Internet Packet eXchange est un protocole utilis par la socit
        Novell fournissant un support d'interconnexion pour leur produit
        NetWare(tm). IPX a une fonction similaire au protocole IP
        utilis par la communaut TCP/IP.


     AAddrreessssee IIPPXX dd''uunn rrsseeaauu ((IIPPXX nneettwwoorrkk aaddddrreessss))
        Il s'agit d'un nombre qui identifie de manire unique un rseau
        IPX particulier. La notation courante de cette adresse est
        exprime en hexadcimal. On peut donner comme exemple :
        0x23a91002


     RRsseeaauu IIPPXX iinntteerrnnee ((IIPPXX IInntteerrnnaall nneettwwoorrkk))
        C'est un rseau IPX virtuel. Il est virtuel car il ne correspond
         aucun rseau physique. Il est utilis pour fournir un moyen
        unique d'identifier et d'adresser une machine IPX.  Cette
        adresse est code de la mme manire qu'une adresse IPX de
        rseau. En gnral, ce n'est utile que pour les machines IPX qui
        sont physiquement connectes  plusieurs rseaux IPX comme les
        serveurs de fichiers.
     RRIIPP
        Routing Information Protocol est un protocole utilis pour
        informer automatiquement  les diffrents ordinateurs prsents
        sur un rseau IPX des diffrentes routes qui lui sont
        applicables. Il est fonctionnellement identique au RIP utilis
        au sein de la communaut TCP/IP.


     NNCCPP
        Netware Core Protocol est un protocole de systme de fichiers
        rseau cr par la socit Novell pour leur produit NetWare(tm).
        On peut comparer les fonctionnalits de NCP  NFS utilis par la
        communaut TCP/IP.


     SSAAPP
        Service Advertisement Protocol est un protocole cr par la
        socit Novell. Il est utilis pour avertir des services fournis
        sur le rseau dans un environnement NetWare(tm).


     AAddrreessssee PPhhyyssiiqquuee ((hhaarrddwwaarree aaddddrreessss))
        C'est un nombre qui identifie de manire unique une machine sur
        un rseau physique au niveau de la couche media (couche MAC).
        L'adresse Ethernet en est un exemple.  Une adresse Ethernet est
        gnralement code par six valeurs hexadcimales spares par
        deux points : ex. 00:60:8C:C3:3C:0F.


     rroouuttee
        La _r_o_u_t_e est le chemin emprunt par les paquets de donnes au
        travers d'un rseau pour atteindre leur destination.


  55..  UUnnee bbrrvvee ddiissccuussssiioonn ssuurr llaa ttooppoollooggiiee ddeess rrsseeaauuxx IIPPXX

  C'est une explication trs simplifie pour les personnes qui
  dcouvrent IPX.  Les grands rseaux mettront probablement  mal
  beaucoup des rgles expliques ici. Dans les rseaux IPX complexes,
  l'administrateur devrait toujours tre consult.

  Les rseaux IPX s'appuient sur un procd de _r__s_e_a_u_x numrots,  la
  diffrence de IP qui insiste plus sur les adresses d'_i_n_t_e_r_f_a_c_e. Un
  rseau est un ensemble d'quipements connects  un mme segment de
  rseau local (LAN) et _u_t_i_l_i_s_a_n_t _l_e _m__m_e _t_y_p_e _d_e _t_r_a_m_e.  Des types de
  trame diffrents sur le mme segment de rseau local sont traits
  comme des rseaux spars.

  Chaque rseau doit recevoir un numro qui soit unique au travers de
  toute l'interconnexion de rseaux (internetwork). Ceci est
  habituellement ralis par un serveur Netware(tm), mais peut
  facilement tre ralis par Linux. Les clients IPX recoivent ce numro
  du serveur lors de leur dmarrage, ils ont juste besoin de connatre
  le type de trame correct.

  Le routage entre les rseaux est habituellement ralis en mettant
  deux cartes rseaux dans un serveur. Ce serveur fait tourner le
  protocole RIP qui maintient une table de routage pour l'interconnexion
  de rseaux. Priodiquement, cette table de routage est change entre
  les serveurs. En peu de temps, chaque serveur

  Si vous souhaitez uniquement utiliser les services d'un serveur
  NetWare existant, vous pouvez utiliser ipx_configure (section 7.1)
  pour dfinir automatiquement les interfaces en utilisant des requtes
  de "broadcast" pour rechercher un serveur. Si cela choue ou que vous
  voulez fournir des services IPX, vous devrez dfinir les interfaces
  manuellement en utilisant ipx_interface ou mars_nwe.



  66..  LLeess ffiicchhiieerrss rreellaattiiffss  IIPPXX ddaannss llee rrppeerrttooiirree //pprroocc

  Il existe un certain nombre de fichiers relatifs au support d'IPX par
  Linux dans le rpertoire /proc :


     //pprroocc//nneett//iippxx__iinntteerrffaaccee
        Ce fichier contient des informations au sujet des interfaces IPX
        configures sur votre machine. Elles peuvent avoir t
        configures manuellement par commande ou automatiquement
        dtectes et configures.


     //pprroocc//nneett//iippxx__rroouuttee
        Ce fichier contient une liste de routes existantes dans la table
        de routage IPX. Ces routes peuvent avoir t ajoutes  la main
        par l'intermdiaire de commandes ou automatiquement par le dmon
        de routage IPX.


     //pprroocc//nneett//iippxx
        Ce fichier contient la liste des sockets IPX qui sont ouverts
        sur la machine au moment de l'dition du fichier.


  77..  LLeess oouuttiillss IIPPXX ddee GGrreegg PPaaggee

  Greg Page <greg@caldera.com> de la socit Caldera Incorporated a
  crit un ensemble d'outils de configuration pour IPX et a amlior le
  support IPX du noyau Linux.

  Les amliorations du noyau permettent de configurer un systme Linux
  comme pont ou routeur IPX parfaitement fonctionnel. Le support d'IPX
  amlior a dj t incorpor dans le corps du noyau de distribution.
  Vous en tes donc certainement quip.

  Ces outils de configuration  vous permettent de paramtrer vos
  priphriques rseau pour le support d'IPX et de mettre en place le
  routage pour ce protocole. D'autres fonctionnalits sont aussi
  incluses dans ce paquetage.  Ces outils sont disponibles sur
  metalab.unc.edu
  <ftp://metalab.unc.edu/pub/Linux/system/filesystems/ncpfs/ipx.tgz>.

  NdT : les lecteurs connects en France pourront utiliser un site
  miroir comme ftp.lip6.fr <ftp://ftp.lip6.fr/>


  77..11..  LLeess oouuttiillss IIPPXX eenn ddttaaiillss


     iippxx__iinntteerrffaaccee
        Cette commande est utilise pour ajouter, enlever ou contrler
        manuellement des proprits d'IPX sur un priphrique rseau
        donn. Ce dernier est souvent un priphrique Ethernet comme
        eth0.  Au moins une interface IPX doit tre dclare comme
        interface _p_r_i_m_a_i_r_e par le paramtre -p suivi du nom de
        l'interface. Par exemple, l'attribution des capacits IPX au
        priphrique eth0, en tant que premire interface utilisant le
        type de trame IEEE 802.2 et l'adresse rseau 39ab0222 se fera
        ainsi :


                     # ipx_interface add -p eth0 802.2 0x39ab0222





     Si le type de trame diffre des serveurs NetWare(tm) sur ce rseau,
     ils vous ignoreront dlibrement. Si le type de trame est correct,
     mais que le numro de rseau diffre, ils vous ignoreront encore,
     mais afficheront des messages sur la console du serveur
     Netware(tm). Ce dernier cas vous promet d'avoir des problmes avec
     votre administrateur NetWare et peut perturber les clients NetWare
     en cours d'utilisation.


     Si vous obtenez une erreur en faisant tourner ce programme et que
     vous n'avez pas encore configur TCP/IP, alors vous allez devoir
     dmarrer manuellement l'interface eth0 en utilisant la commande :


                          # ifconfig eth0 up






     iippxx__ccoonnffiigguurree
        Cette commande permet ou interdit la configuration automatique
        de l'interface et la mise en oeuvre de l'interface primaire.

        --auto_interface
           vous permet de dcider si de nouveaux priphriques rseau
           doivent tre automatiquement configurs comme des
           priphriques IPX ou pas.

        --auto_primary
           vous accorde le droit de dcider si les logiciels IPX doivent
           slectionner une interface primaire ou non. Des problmes ont
           t reports sur l'utilisation de ceci avec des clients
           Windows 95 sur le rseau.

        Par exemple si l'on dsire une configuration automatique des
        interfaces et une mise en oeuvre automatique de l'interface pri
        maire on utilisera la ligne suivante


                  # ipx_configure --auto_interface=on --auto_primary=on





     iippxx__iinntteerrnnaall__nneett
        Cette commande permet de mettre en place, de configurer ou
        retirer une adresse de rseau interne. Cette adresse de rseau
        interne est optionnelle, mais lorsqu'elle est configure elle
        est toujours considre comme interface primaire. Pour
        configurer une adresse rseau IPX ayant le numro ab000000 sur
        le noeud IPX 1 vous devez utiliser:


          # ipx_internal_net add 0xab000000 1



     iippxx__rroouuttee
        Cette commande permet de modifier manuellement la table de
        routage IPX. On peut prendre comme exemple l'ajout d'une route
        vers le rseau IPX 39ab0222 via un routeur ayant le numro de
        noeud 00608CC33C0F sur le rseau IPX 39ab0108 :


          # ipx_route add 0x39ab0222 0x39ab0108 0x00608CC33C0F





  88..  CCoonnffiigguurreerr vvoottrree mmaacchhiinnee LLiinnuuxx ccoommmmee rroouutteeuurr IIPPXX

  Si vous avez un certain nombre de segments IPX que vous souhaitez
  interconnecter, vous aurez besoin d'un routeur. Dans l'environnement
  Novell, la propagation d'au moins deux types d'informations est
  absolument primordiale sur le rseau : d'un ct, les informations de
  routage sur le rseau qui sont propages en utilisant le RIP Novell,
  de l'autre ct, les informations d'avertissement du systme qui sont
  vhicules par le SAP Novell. Tout routeur doit pouvoir traiter et
  comprendre ces deux types de protocoles pour tre utilis dans toutes
  les situations.

  Linux possde un support pour ces deux protocoles et peut donc tre
  aisment configur pour raliser un routeur IPX compltement
  compatible Novell.

  Le support IPX du noyau de Linux gre rellement le routage des
  paquets entre les interfaces, mais il le fait selon les rgles donnes
  dans une table de routage. Linux ncessite un programme implmentant
  les protocoles RIP et SAP de Novell afin que la table de routage soit
  correctement construite et maintenue priodiquement, pour qu'elle
  reflte bien les changements d'tat du rseau.

  Volker Lendecke <lendecke@namu01.gwdg.de> a dvelopp un dmon de
  routage _i_p_x_r_i_d qui fera tout a pour vous.  Le paquetage _m_a_r_s___n_w_e
  mentionn plus loin inclut un autre dmon de routage.


  Vous pouvez trouver _i_p_x_r_i_d  sur : metalab.unc.edu
  <ftp://metalab.unc.edu/pub/Linux/system/filesystems/ncpfs/ipxripd-0.7.tgz>

  ou directement chez Volker :

  ftp.gwdg.de <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/ipxripd-0.7.tgz>


  Configurer une machine Linux en routeur IPX est une opration trs
  linaire. Procdez comme suit :

  1. Construisez le noyau avec les supports d'IPX, d'Ethernet et le
     systme de fichiers /proc

  2. Procurez-vous, compilez et installez le dmon _i_p_x_d.

  3. Redmarrez la machine avec son nouveau noyau et assurez-vous que
     chacune des cartes Ethernet ont t correctement dtectes et qu'il
     n'y a pas de conflits matriels.

  4. Mettez en place le protocole IPX sur chacune des interfaces en
     utilisant la commande ipx_interface dcrite ci-dessus.

  5. Lancez le dmon _i_p_x_d.

     En considrant le simple rseau suivant :


     IPX Addr: 0x01000000  802.2
    |--------------------------|
                  |
                  \_________________________
                                            \         Routeur Linux
     IPX Addr: 0x02000000  802.2             \
    |--------------------------|              \   eth0/-----------\
                  |                            \--====|           |
                  \_________________________          | IPX route |
                                            \     eth1|  Table    |
     IPX Addr: 0x03000000  etherII           \----====|    ^      |
    |--------------------------|                      |    |      |
                  |                               eth2|  IPXd     |
                  \______________________________/====|           |
                                                      |  SAPd     |
     IPX Addr: 0x04000000  etherII                eth3|           |
    |--------------------------|                 /====|           |
                  |                              |    \___________/
                  \______________________________/



  La configuration pour le rseau ci-dessus ressemblera  :


              # ipx_interface add eth0 802.2 0x0100000000
              # ipx_interface add eth1 802.2 0x0200000000
              # ipx_interface add eth2 etherii 0x0300000000
              # ipx_interface add eth3 etherii 0x0400000000
              # ipxd




  Vous devrez attendre un petit moment pour vrifier le fichier
  /proc/net/ipx_route (cat /proc/net/ipx_route). Vous devriez retrouver
  les routes IPX inhrentes  votre configuration du systme et toutes
  les configurations apprises par le contact avec les autres routeurs
  sur le rseau le cas chant.


  88..11..  DDooiiss--jjee uuttiilliisseerr uunn rrsseeaauu iinntteerrnnee ??

  Novell a une fonctionnalit appele rseau interne, qui est utilise
  pour simplifier le routage lorsqu'une machine est connecte  plus
  d'un priphrique rseau. C'est utile dans le cas d'un serveur de
  fichiers connect  plusieurs rseaux, en ce sens qu'une seule route
  doit tre utilise pour atteindre le serveur, quel que soit le rseau
   partir duquel on opre.


  Dans le cas d'une configuration o vous ne fates pas tourner un
  serveur de fichiers mais seulement un routeur IPX, il n'est pas simple
  de rpondre.  Des tmoignages rapportent que l'utilisation de IPX/PPP
  marche "mieux" si vous utilisez galement un rseau interne.


  Dans tous les cas, c'est facile  faire, mais cela peut ncessiter de
  recompiler le noyau. Lorsque vous en tes au make config du noyau,
  vous devez rpondre Oui (y)  la question Full internal IPX network
  comme suit :


             ...
             ...
             Full internal IPX network (CONFIG_IPX_INTERN) [N/y/?] y
             ...
             ...




  Pour configurer le rseau interne, utilisez la commande
  _i_p_x___i_n_t_e_r_n_a_l___n_e_t dj dcrite dans la section outils IPX.  La
  principale prcaution  prendre est de s'assurer que l'adresse IPX
  rseau que vous choisissez est unique sur votre rseau et qu'aucune
  autre machine ou rseau ne l'utilise.


  99..  CCoonnffiigguurreerr vvoottrree mmaacchhiinnee LLiinnuuxx eenn cclliieenntt NNCCPP


  Si vous tes un utilisateur d'un rseau htrogne o les protocoles
  IP et IPX sont utiliss, il est probable que vous ayez  un moment ou
   un autre, besoin d'accder  partir de votre machine Linux,  des
  donnes stockes sur un serveur de fichier Novell de ce rseau. Novell
  a longtemps propos un ensemble logiciel NFS pour leurs serveurs de
  fichiers qui permettaient cet accs. Cependant si le site auquel vous
  tes connect est petit, le nombre de personnes ncessitant cet type
  d'accs ne justifie peut-tre pas l'achat de ces outils logiciels
  commerciaux.

  Volker Lendecke <lendecke@namu01.gwdg.de> a crit un module du systme
  de fichiers du noyau Linux supportant un sous-ensemble limit du
  protocole Novell NCP qui permet de monter une partition Novell dans
  votre systme de fichiers Linux sans avoir recours  quelque produit
  additionnel sur votre serveur de fichiers.

  Volker a appel cet ensemble _n_c_p_f_s. Ce dernier a t ralis  partir
  des informations tires principalement du livre
  "Netzwerkprogrammierung in C" de Manfred Hill et Ralf Zessin (de plus
  amples informations sont donnes dans le fichier README contenu dans
  l'ensemble _n_c_p_f_s).

  Ce logiciel permet  Linux d'muler une station de travail Novell
  normale pour ce qui concerne la partie fichiers. Un petit utilitaire
  d'impression est galement inclus pour vous permettre d'imprimer dans
  les queues d'impression Novell (ceci est document plus loin dans la
  section client d'impression). Le paquetage _n_c_p_f_s fonctionne avec les
  serveurs de fichier Novell version 3.x et suprieurs, il ne fonctionne
  pas avec les serveurs de fichier Novell version 2.x . Le client _n_c_p_f_s
  ne fonctionne qu'avec les produits rellement compatibles Novell, mais
  malheureusement, certains produits qui se disent compatibles ne le
  sont pas suffisamment. Pour utiliser _n_c_p_f_s avec Novell 4.x, il est
  prfrable d'utiliser le serveur Novell en mode d'emulation de
  _b_i_n_d_e_r_y. Le support de la NDS est un ajout trs rcent de _n_c_p_f_s et est
  toujours en version bta. De plus son utilisation peut tre interdite
  dans votre pays en raison de l'inclusion de technologie soumise 
  brevet.



  99..11..  CCoommmmeenntt rrccuupprreerr nnccppffss

  L'ensemble _n_c_p_f_s a t dvelopp afin d'tre compil avec les noyaux
  de Linux version 1.2.13 ou plus rcents que 1.3.71 (ce qui inclut
  2.x.x). Si vous n'utilisez pas un de ces noyaux vous devrez vous en
  procurer et l'utiliser.  Le Kernel-HOWTO <kernel-HOWTO.html> dcrit
  comment faire cela en dtail.
  Vous pouvez vous procurer l'ensemble _n_c_p_f_s par ftp anonyme sur le site
  de Volker, ftp.gwdg.de <ftp://ftp.gwdg.de/pub/ncpfs/>, sur
  metalab.unc.edu
  <ftp://metalab.unc.edu/pub/Linux/system/Filesystems/ncpfs> ou sur un
  site miroir. La version  jour au moment o j'cris ces lignes est
  ncpfs-2.0.11.tgz ou ncpfs-2.2.0.tgz pour le support de la NDS.


  99..22..  CCoommppiilleerr nnccppffss  ppoouurr lleess nnooyyaauuxx 11..22..1133


     CCoommppiilleerr uunn nnooyyaauu LLiinnuuxx aavveecc lleess ssuuppppoorrttss dd''EEtthheerrnneett eett IIPPXX
        La premire chose que vous ayez  faire est de vrifier que
        votre noyau a t compil avec l'option IPX. Dans la version
        1.2.13 du noyau, vous vous assurerez que la rponse  la
        question 'The IPX Protocol' est Y (yes) comme illustr :

                 ...
                 ...
                Assume subnets are local (CONFIG_INET_SNARL) [y]
                Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n]
                The IPX protocol (CONFIG_IPX) [n] y
                *
                * SCSI support
                 ...
                 ...


     Vous devez aussi vrifier que vous avez inclus le gestionnaire
     appropri pour votre carte Ethernet. Si vous ne savez pas comment
     procder, je vous conseille de lire l'Ethernet-HOWTO Ethernet-HOWTO
     <Ethernet-HOWTO.html>.


     Vous pourrez alors procder  la compilation. Je vous rappelle que
     le lancement de _l_i_l_o pour installer le nouveau noyau est
     obligatoire une fois la compilation termine.


     DDccoommpprreesssseerr lleess pprrooggrraammmmeess _n_c_p_f_s

                # cd /usr/src
                # tar xvfz ncpfs-2.0.11.tgz
                # cd ncpfs



     VVrriiffiieerr llee MMaakkeeffiillee
        Si vous avez l'intention d'utiliser _k_e_r_n_e_l_d pour charger
        automatiquement le module noyau _n_c_p_f_s, alors vous devez
        dcommenter la ligne du Makefile qui fait rfrence  KERNELD.
        Si vous n'tes pas certain de comprendre tout ce que cela
        signifie, vous devriez lire le Kernel-HOWTO <Kernel-HOWTO.html>
        pour vous familiariser avec la configuration des modules noyau.


     CCoommppiilleerr lleess oouuttiillss _n_c_p_f_s
        Le logiciel doit se compiler proprement sans qu'une
        configuration ne soit ncessaire :

                # make





     CCooppiieerr lleess oouuttiillss IIPPXX  uunn eennddrrooiitt uuttiillee ddee vvoottrree aarrbboorreesscceennccee
        Aprs cette compilation, vous trouverez tous les outils dont
        vous aurez besoin dans le rpertoire ncpfs/bin.  Vous pouvez
        utiliser



                   # make install




     pour installer les outils dans le choix de rpertoires de Volker.
     Si votre systme est bas sur ELF, alors vous devrez taper ldconfig
     -v pour vous assurer que la bibliothque partage est accessible.


     CCooppiieerr llee mmoodduullee _n_p_f_s_._o  uunn eennddrrooiitt aapppprroopprrii ssii nncceessssaaiirree..
        Aprs la compilation d'un noyau 1.2.x, vous trouverez aussi dans
        le rpertoire ncpfs/bin le fichier ncpfs.o Il s'agit du module
        _n_c_p_f_s du noyau. Je vous conseille de copier ce fichier  un
        endroit utile. Par exemple sur ma distribution _D_e_b_i_a_n de Linux,
        je l'ai copi dans le rpertoire /lib/modules/1.2.13/fs et j'ai
        ajout ncpfs dans le fichier /etc/modules de manire  ce qu'il
        soit automatiquement charg lors du dmarrage de Linux. Si vous
        utilisez d'autres distributions, vous devrez trouver o les
        modules sont gnralement placs et copier le fichier ncpfs.o 
        cet endroit, ou sinon, copiez-le dans le rpertoire /etc.
        Utilisez la commande suivante afin de charger le module en
        mmoire manuellement :

                # insmod ncpfs.o





  99..33..  CCoommppiilleerr nnccppffss  ppoouurr ddeess nnooyyaauuxx 11..33..7711++++//22..00..**

  Pour la dernire version de _n_c_p_f_s, vous devez utiliser un noyau 1.3.71
  ou suprieur, ce qui inclut les noyaux 2.0.* .

  Le code noyau de _n_c_p_f_s a t inclus dans la distribution noyau
  standard, ainsi vous n'aurez qu' rpondre oui (Y)  la question
  suivante lors de la configuration de la compilation :


       Networking options  --->
           ...
           ...
           <*> The IPX protocol
           ...
       Filesystems  --->
           ...
           ...
           <*> NCP filesystem support (to mount NetWare volumes)
           ...





  Vous devez suivre les instructions pour la compilation des noyaux
  1.2.*  afin de crer les outils IPX, mais il n'y aura pas de module 
  installer.

  99..44..  CCoonnffiigguurreerr eett uuttiilliisseerr nnccppffss


     CCoonnffiigguurreerr lleess llooggiicciieellss ddee rrsseeaauu IIPPXX
        Deux moyens sont possibles pour configurer ceux-ci. Vous pouvez
        tout faire manuellement ou vous pouvez laisser le logiciel
        dterminer lui-mme ses paramtres en utilisant

                # ipx_configure --auto_interface=on --auto_primary=on


     Cela devrait fonctionner dans la plupart des situations, mais si ce
     n'est pas votre cas, lisez la section "les outils IPX" situe plus
     loin dans ce document pour configurer manuellement les logiciels.
     Des problmes ont t rapports concernant cette utilisation au
     sein de rseaux contenant des clients Windows95.


     TTeesstteerr llaa ccoonnffiigguurraattiioonn
        Maintenant que votre rseau IPX est configur, vous devriez tre
        capable d'excuter la commande _s_l_i_s_t qui vous renverra la liste
        de tous les serveurs de fichiers Novell de votre rseau :


                # slist


     Si la commande slist affiche un message du type : ncp_connect:
     Invalid argument, cela signifie que votre noyau ne supporte pas
     IPX. Vrifiez que vous avez dmarr votre ordinateur avec le noyau
     appropri.  Au dmarrage du systme, vous devriez voir des messages
     concernant "IPX" et "ncpfs".  Si la commande _s_l_i_s_t ne renvoie pas
     la liste de tous les serveurs de fichiers, vous devrez utiliser la
     mthode de configuration manuelle.


     MMoonntteerr uunn vvoolluummee oouu uunn sseerrvveeuurr NNoovveellll((ttmm))
        Si votre logiciel rseau IPX fonctionne correctement, vous
        devriez pouvoir monter un volume du serveur de fichiers dans
        votre systme de fichiers Linux.  La commande _n_c_p_m_o_u_n_t est
        utilise  ces fins et ncessite que vous spcifiez au moins les
        informations suivantes :

        1. le nom du serveur de fichiers ;

        2. (ventuellement) le rpertoire du serveur de fichier  monter
           ;

        3. l'identifiant de login du serveur de fichiers. Dans le cas o
           il a un mot de passe, vous devrez aussi le donner  cette
           commande ;

        4. le point de montage, c'est--dire l'endroit o vous voulez
           que le systme de fichiers du serveur Novell soit mont dans
           votre systme de fichiers.  Ce doit tre un rpertoire dj
           existant.

        De la mme manire, il existe une commande _n_c_p_u_m_o_u_n_t pour dmon
        ter un systme de fichiers NCP mont. Le systme de fichiers NCP
        sera dmont proprement si vous teignez votre machine normale
        ment. Vous n'avez donc pas  vous tracasser pour _n_c_p_u_m_o_u_n_ter
        manuellement vos systmes de fichiers avant un halt ou un shut
        down.

        Par exemple si l'on veut monter le serveur de fichiers ACCT_FS01
        sous l'identifiant guest qui ne possde pas de mot de passe,
        dans le rpertoire /mnt/Accounts, la commande devrait ressembler
         :

             # ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n


     Notez que l'utilisation de l'option -n indique qu'aucun mot de
     passe n'est ncessaire pour se loguer. Le mme login avec le mot de
     passe secret ressemblera  :

          # ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -P secret


     Si vous ne spcifiez ni l'option -n ni l'option -P, le systme vous
     demandera un mot de passe.



     VVrriiffiieerr llee mmoonnttaaggee
        Si le montage est russi, vous pourrez accder  tous les
        volumes auxquels l'utilisateur que vous avez spcifi a accs.
        Cet accs se fait de manire transparente comme si le volume se
        trouvait directement dans le rpertoire spcifi lors du
        montage.  Vous devez tre capable de naviguer au travers des
        rpertoires de ce volume et d'y trouver des fichiers.  Vous
        pouvez galement utiliser l'option -V pour monter un seul
        volume.

        NCP ne fournit pas d'identificateur d'utilisateur (uid) ni
        d'identificateur de groupe (gid) pour les fichiers. Tous les
        fichiers auront les permissions donnes au rpertoire de
        montage, restreints par les droits de permissions sur le serveur
        Novell. Gardez ce point  l'esprit lorsque vous partagerez des
        montages avec des utilisateurs Linux.



     CCoonnffiigguurreerr llee mmoonnttaaggee aauuttoommaattiiqquuee ddeess vvoolluummeess nnccpp
        Si vous avez besoin de monter de manire permanente vos
        partitions ncp, vous aurez  mettre les commandes de
        configuration ci-dessus dans vos fichiers _r_c de manire  ce que
        le montage soit opr  chaque dmarrage de Linux.  Si votre
        distribution ne fournit pas dj un moyen de configurer IPX
        comme le propose Debian, alors je vous recommande de les placer
        dans le fichier /etc/rc.local si vous en avez un.  Vous devrez
        utiliser un script du type suivant :



                    #
                    # Dmarrer le systme de fichiers NCP
                    /sbin/insmod /lib/modules/1.2.13/fs/ncpfs.o

                    # Configurer le reseau IPX
                    ipx_configure --auto_interface=on --auto_primary=on

                    # Accder au volume rserv  l'utilisateur guest sur le serveur de fichiers
                    ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n






     Il existe un autre moyen de configurer les montages NCP. Cela se
     fait au moyen du fichier $HOME/.nwclient. Ce fichier contient les
     informations spcifiques  l'utilisateur qui seront appliques sur
     des montages NCP rguliers. Vous pourrez ainsi les monter sans
     avoir  spcifier tous les paramtres  chaque fois.

     Le format de ce fichier est assez simple :


               # Le premier paramtre est le 'serveur prfr'
               # utilis mme si vous ne spcifiez pas de serveur lors du
               # lancement du script.
               #
               # L'utilisateur TERRY se loguant sur le serveur de fichiers DOCS_FS01
               # avec le mot de passe 'password'
               DOCS_FS01/TERRY password
               #
               # Login Guest sur le serveur de fichiers ACCT_FS01 sans mot de passe.
               ACCT_FS01/GUEST -




     Vous pourrez, par la suite,  utiliser :



                    $ ncpmount /home/terry/docs




     afin de monter la partition DOCS_FS1 avec le login TERRY sous le
     rpertoire /home/terry/docs.  Vous remarquerez que cette commande a
     t choisie car aucun serveur de fichiers n'a t spcifi dans la
     commande de montage. Si la commande suivante avait t utilise :


                    $ ncpmount -S ACCT_FS01 /home/terry/docs




     vous seriez entr sur le serveur de fichiers ACCT_FS01 avec le
     compte GUEST.

     NNoottee :: Pour que ce mcanisme fonctionne, il faut que la permission
     de $HOME/.nwclient soit de 0600, vous devrez utiliser la commande
     suivante :


                     $ chmod 0600 $HOME/.nwclient





     Si des utilisateurs non-root ont la permission d'utiliser ce
     mcanisme, la commande _n_c_p_m_o_u_n_t doit utiliser un Set Userid Root,
     vous aurez donc  donner ces permissions :


                  # chmod 4755 ncpmount





     TTeesstteerr ll''uuttiilliittaaiirree nnsseenndd
        _n_s_e_n_d est un utilitaire pour envoyer des messages  des
        utilisateurs Novell qui est galement inclus dans le paquetage.
        Il s'utilise de la manire suivante :


                  # nsend pierre coucou ici




     qui va envoyer le message "coucou ici"  un utilisateur "pierre"
     dj logu sur votre serveur de fichiers "primaire" (le premier qui
     apparat dans votre fichier .nwclient). Vous pouvez spcifier un
     autre serveur de fichiers avec la mme syntaxe que la commande
     _n_c_p_u_m_o_u_n_t.



  1100..  CCoonnffiigguurreerr vvoottrree mmaacchhiinnee LLiinnuuxx eenn sseerrvveeuurr NNCCPP

  Il existe deux paquetages permettant  Linux de fournir les fonctions
  d'un serveur de fichiers Novell. Tous deux permettent de partager des
  fichiers de la machine Linux entre les utilisateurs utilisant un
  client Novell Netware. Les utilisateurs peuvent attacher et utiliser
  des systmes de fichiers Novell comme des volumes locaux  leurs
  machines juste comme s'ils provenaient d'un serveur de fichiers
  Novell. Je vous propose d'essayer les deux paquetages afin de voir
  celui qui correspond le mieux  vos besoins.



  1100..11..  LL''eennsseemmbbllee mmaarrss__nnwwee

  Martin Stover <mstover@freeway.de> a dvelopp _m_a_r_s___n_w_e pour permettre
   Linux de fournir des services fichiers et impression pour des
  clients NetWare.

  _m_a_r_s___n_w_e signifie "Martin Stover's Netware Emulator".


  1100..11..11..  PPoossssiibbiilliittss ooffffeerrtteess ppaarr mmaarrss__nnwwee

  _m_a_r_s___n_w_e fournit un sous-ensemble de la spcification Novell NCP pour
  les services fichiers, pour les connexions aux disques et aussi pour
  les services d'impressions. Il est probable qu'il contient des bogues
  mais beaucoup de personnes l'utilisent et le nombre de bogues diminue
  avec les nouvelles versions.


  1100..11..22..  OObbtteenniirr mmaarrss__nnwwee

  Vous pouvez rcuprer _m_a_r_s___n_w_e sur le serveur ftp.gwdg.de
  <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/>.  ou sur metalab.unc.edu
  <ftp://metalab.unc.edu/pub/linux/filesystems/ncpfs/>.
  La version  jour lors de l'criture de ce document est :
  mars_nwe-0.99.pl10.tgz.


  1100..11..33..  CCoommppiilleerr ll''eennsseemmbbllee mmaarrss__nnwwee


     CCoommppiilleerr uunn nnooyyaauu LLiinnuuxx ssuuppppoorrttaanntt EEtthheerrnneett eett IIPPXX..
        Dans la version 1.2.13 du noyau, vous devrez juste vrifier que
        vous avez rpondu oui (Y)  'The IPX Protocol' et non (N) 
        'Full internal IPX network' comme illustr :
         ...
         ...
        The IPX protocol (CONFIG_IPX) [n] y
         ...
         ...
        Full internal IPX network (CONFIG_IPX_INTERN) [N/y/?] n
         ...
         ...


     Pour les noyaux plus rcents, un procd similaire est utilis lors
     de la construction du noyau. La question pose peut lgrement
     changer.


     Assurez-vous aussi d'un choix appropri pour votre carte Ethernet.
     Si vous ne savez pas comment procder, vous devriez lire
     l'Ethernet-HOWTO, Ethernet-HOWTO <Ethernet-HOWTO.html>.


     Vous pouvez maintenant procder  la compilation de votre noyau.
     Une fois cette tape finie, n'oubliez pas de lancer _l_i_l_o afin
     d'installer le nouveau noyau.


     DDccoommpprreesssseerr llee ppaaqquueettaaggee _m_a_r_s___n_w_e..


                    # cd /usr/src
                    # tar xvfz mars_nwe-0.99.pl10.tgz





     CCoommppiilleerr _m_a_r_s___n_w_e..
        Cette opration est trs simple.  La premire tape consiste
        simplement  lancer make, cela va vous crer un fichier
        config.h. Ensuite, vous devez regarder et modifier le fichier
        config.h si ncessaire. Cela vous permet de configurer des
        choses comme le rpertoire d'installation ou le nombre maximum
        de sessions et de volumes que le serveur pourra supporter. Les
        lignes importantes  regarder sont :

        FILENAME_NW_INI       l'emplacement des fichiers d'initialisation
        PATHNAME_PROGS        l'emplacement du programme excutable
        PATHNAME_BINDERY      l'endroit o iront les fichiers de la 'bindery'
        PATHNAME_PIDFILES     le rpertoire o les fichiers PID seront crits
        MAX_CONNECTIONS       le nombre maxi de connexions simultanes autorises
        MAX_NW_VOLS           le nombre maxi de volumes supports par mars_nwe
        MAX_FILE_HANDLES_CONN le nombre maxi de fichiers ouverts par connexion
        WITH_NAME_SPACE_CALLS si vous voulez supporter les clients ncpfs
        INTERNAL_RIP_SAP      si vous voulez que mars_nwe fasse le routage rip/sap
        SHADOW_PWD            selon que vous utilisez les 'shadow passwords' ou non


     Les options par dfaut devraient vous convenir mais vrifiez quand
     mme.

     Une fois ceci termin tapez :


                    # make
                    # make install


     Ces commandes compileront les diffrents serveurs et les
     installeront dans un rpertoire appropri. Le script d'installation
     installe aussi le fichier de configuration /etc/nwserv.conf.


     CCoonnffiigguurraattiioonn dduu sseerrvveeuurr..
        Celle-ci est simple. Il faut diter le fichier/etc/nwserv.conf.
        Le format de ce fichier peut vous sembler assez nigmatique au
        premier abord, mais il est en fait bel et bien ordonn. Chaque
        ligne de ce fichier correspond  un point de configuration.
        Chacune de ces lignes est dlimite par le caractre espace et
        dbute par un nombre qui indique le contenu de la ligne. Tous
        les caractres prcds du caractre '#' sont considrs comme
        tant un commentaire et de ce fait sont ignors. Martin fournit
        un fichier d'exemple de configuration dans son paquetage,
        cependant, je vous donne ce que je considre comme tant une
        version simplifie de ce fichier, et ce, afin que vous puissiez
        mieux le comprendre.
















































          # VOLUMES (max. 5)
          # Seul le volume SYS est obligatoire. Le rpertoire contenant le volume
          # SYS doit contenir les rpertoires : LOGIN, PUBLIC, SYSTEM, MAIL.
          # l'option 'i' ignore la casse (majuscules/minuscules)
          # l'option 'k' convertit toutes les requtes de nom de fichier en
          # minuscules
          # l'option 'm' indique que le volume est amovible (cdrom par ex.)
          # l'option 'r' positionne le volume en lecture seule
          # l'option 'o' indique le volume est un systme de fichiers mont unique
          # l'option 'P' permet aux commandes d'tre utilises comme des fichiers
          # l'option 'O' permet l'utilisation de l'espace de noms (namespace) OS/2
          # l'option 'N' permet l'utilisation de l'espace de noms (namespace) NFS
          #
          # Par dfaut les noms de fichiers sont en majuscules.
          # Syntaxe :
          #    1 <Nom du volume> <Chemin du volume>   <Options>

          1   SYS         /home/netware/SYS/                 # SYS
          1   DATA        /home/netware/DATA/   k            # DATA
          1   CDROM       /cdrom                kmr          # CDROM

          # NOM DU SERVEUR
          # Si cette option n'est pas mise le nom du serveur Linux sera converti
          # en majuscule et utilis
          # Syntaxe :
          #    2 <Nom du serveur>

          2   LINUX_FS01

          # ADRESSE DE RESEAU INTERNE
          # l'adresse de rseau interne est une fonctionnalit qui simplifie
          # le routage IPX pour les machines relies  plusieurs rseaux IPX.
          # Syntaxe :
          #    3 <adresse interne du rseau> [<Numro de noeud>]
          # ou
          #    3 auto
          # si vous utilisez 'auto' alors l'adresse IP de la machine sera
          # utilise. NOTE : cela peut tre dangereux, assurez-vous de prendre
          # un nombre unique sur votre rseau. Les adresses sont codes en
          # hexadcimal sur 4 octets (le prfixe 0x est obligatoire).
          3 0x49a01010 1

          # PERIPHERIQUES RESEAU
          # Cette option configure votre rseau IPX. Si votre rseau IPX est dj
          # configur, vous n'en aurez pas besoin.
          # Syntaxe
          #    4 <Numro de reseau IPX> <Nom de priphrique> <Type de trame> [<ticks>]
          #                         Types de trames : ethernet_ii, 802.2, 802.3, SNAP

          4  0x39a01010  eth0  802.3  1

          # SAUVEGARDE DES ROUTES IPX APRES EXTINCTION DU SERVEUR.
          # Syntaxe :
          #    5 <drapeau>
          #       0 = ne pas sauver les routes, 1 = sauver les routes.

          5 0

          # VERSION DE NETWARE
          # Syntaxe :
          #    6 <version>
          #      0 = 2.15, 1 = 3.11

          6 1

          # GESTION DES MOTS DE PASSE
          # les clients DOS de Novell supportent une fonctionnalit qui chiffre
          # votre mot de passe (mdp) lorsque vous le changez. Vous pouvez
          # configurer votre serveur mars pour supporter cette fonctionnalit.
          # Syntaxe :
          #    7 <drapeau>
          # avec <drapeau> =
          #    0 force chiffrage du mdp (les clients ne peuvent pas changer de mdp).
          #    1 force chiffrage du mdp, permet les changements de mdp non chiffrs.
          #    7 permet les mdp non chiffrs mais pas les mdp nuls.
          #    8 permet les mdp non chiffrs ainsi que les mdp nuls.
          #    9 seulement les mdp non chiffrs (ne marche pas avec OS/2).

          7 1

          # DROITS MINIMUM EN FONCTION DES GID ET UID
          # Les permissions qui sont appliques lors de connexions sans login
          # Ces permissions seront utilises pour les fichiers
          # de votre serveur primaire.
          # Syntaxe :
          #    10 <gid>
          #    11 <uid>
          #    <gid> <uid> sont ceux donns dans /etc/passwd et /etc/group

          10  200
          11  201

          # MOT DE PASSE DU SUPERVISEUR
          # Doit etre enlev aprs le premier dmarrage du serveur. Le serveur
          # cryptera cette information dans le fichier de bindery aprs son
          # lancement. Vous devriez viter d'utiliser le compte 'root' et en choisir
          # un autre pour administrer le serveur mars.
          #
          # Cette entre est lue et chiffre dans le fichier de bindery du serveur,
          # elle n'a donc besoin d'tre prsente que la premire fois que vous
          # dmarrez le serveur, pour s'assurer que le mot de passe ne soit pas vol
          # Syntaxe :
          #    12 <Login du superviseur> <Nom d'utilisateur UNIX> [<mot de passe>]

          12  SUPERVISOR  terry  secret

          # COMPTES DES UTILISATEURS
          # Permet d'associer les comptes NETWARE aux comptes UNIX. Les mots de
          # passe sont en option.
          # Syntaxe :
          #    13 <Login utilisateur> <Nom d'utilisateur UNIX> [<mot de passe>]

          13  MARTIN martin
          13  TERRY  terry

          # ADMINISTRATION SYSTEME PARESSEUSE
          # Si vous avez beaucoup d'utilisateurs et ne pouvez/voulez utiliser
          # le champ 13 pour chaque utilisateur, vous pouvez faire correspondre
          # automatiquement les logins mars_nwe aux logins des utilisateurs Linux
          # MAIS il n'y a pour le moment aucun moyen d'utiliser les mots de passe
          # des comptes Linux si bien que tous les utilisateurs configurs de cette
          # faon devront utiliser le mot de passe fourni ici.
          # Je vous dconseille de l'utiliser  moins que la scurit ne fasse pas
          # partie de vos proccupations.
          # Syntaxe :
          #    15 <drapeau> <mot de passe commun>
          # avec <drapeau> :
          #    0  - ne configure aucun utilisateur automatiquement.
          #    1  - configure automatiquement les utilisateurs non encore configurs.
          #    99 - configure automatiquement tous les utilisateurs.

          15 0 duzzenmatta
          # VERIFICATION SIMPLE
          # mars_nwe s'assurera automatiquement que certains rpertoires existent
          # si vous positionnez ce drapeau.
          # Syntaxe :
          #    16 <drapeau>
          # avec <drapeau>  0 pour non, ne fait rien et 1 pour oui, vrifie.

          16 0

          # QUEUES D'IMPRESSION
          # Permet d'associer des imprimantes Netware  des imprimantes UNIX. Les
          # rpertoires de files d'impression doivent tre cres manuellement
          # avant de tenter toute impression.
          # Syntaxe :
          #    21 <Nom de queue> <rpertoire de queue> <commande d'impression UNIX>

          21  EPSON  SYS:/PRINT/EPSON lpr -h
          21  LASER  SYS:/PRINT/LASER lpr -Plaser

          # DRAPEAUX DE DEBOGAGE
          # normalement, ils ne sont pas ncessaires, mais ils peuvent tre utiles
          # pour la rsolution de problmes.
          # Syntaxe :
          #    <lment de dbogage> <drapeau de debogage>
          #
          #    100 = IPX KERNEL
          #    101 = NWSERV
          #    102 = NCPSERV
          #    103 = NWCONN
          #    104 = dmarrage NWCLIENT
          #    105 = NWBIND
          #    106 = NWROUTED
          #                 0 = supprime le dbogage, 1 = active le dbogage

          100 0
          101 0
          102 0
          103 0
          104 0
          105 0
          106 0

          # LANCER LE SERVEUR NETWARE EN TACHE DE FOND ET UTILISER UN FICHIER DE LOG
          # Syntaxe :
          #    200 <drapeau>
          #        0 = Lance NWSERV en avant-plan et pas de fichier de log
          #        1 = Lance NWSERV en tche de fond et utiliser le fichier de log

          200  1

          # NOM DU FICHIER DE LOG
          # Syntaxe :
          #    201 <Fichier de log>

          201  /tmp/nw.log

          # AJOUT/ECRASEMENT DU FICHIER DE LOG
          # Syntaxe :
          #    202 <drapeau>
          #        0 = ajouter dans le fichier de log existant
          #        1 = craser le fichier de log existant

          202  1

          # EXTINCTION DU SERVEUR
          # Ce point modifie le dlai entre l'affichage d'extinction du serveur et
          # l'extinction relle du serveur
          # Syntaxe :
          #    210 <temps>
          #        en secondes (par dfaut 10)

          210  10

          # INTERVALLE ENTRE LES DIFFUSIONS DE ROUTAGE
          # la dure en secondes entre les diffusions (broadcast) de serveurs
          # Syntaxe :
          #    211 <temps>
          #        en secondes (par dfaut : 60)

          211 60

          # INTERVALLE ENTRE LES LOGS DE ROUTAGE
          # configure le nombre de diffusions aprs lesquelles les informations
          # de routage sont crites dans les fichiers de log.
          # Syntaxe :
          #    300 <nombre>

          300 5

          # FICHIER DE LOG DE ROUTAGE
          # configure le nom du fichier de log des informations de routage
          # Syntaxe :
          #    301 <nom de fichier>

          301 /tmp/nw.route

          # AJOUT/ECRASEMENT DU FICHIER DE LOG DE ROUTAGE
          # configure si vous voulez ajouter les nouveaux logs  la fin du
          # fichier existant ou bien le recrire.
          # Syntaxe :
          #    302 <drapeau>
          #    avec <drapeau>  0 pour l'ajout et  1 pour cration/crasement

          302 1

          # MINUTAGE DU CHIEN DE GARDE (watchdog)
          # Configure les intervalles de temps entre les messages de garde pour
          # s'assurer que le rseau est toujours vivant.
          # Syntaxe :
          #    310 <valeur>
          # avec <valeur> =
          #      0  - toujours envoyer des messages de garde.
          #      <0 - ne jamais envoyer de message de garde.
          #      >0 - envoyer des messages quand le trafic rseau chute en dessous
          #           de 'n' ticks.

          310 7

          # FICHIER DE STATIONS
          # configure le nom du fichier qui dtermine les machines pour lesquelles
          # ce serveur de fichiers sera le serveur primaire.
          # La syntaxe de ce fichier est dcrite dans le rpertoire 'examples'
          # du code source.
          # Syntaxe :
          #    400 <nom de fichier>

          400 /etc/nwserv.stations

          # OBTENTION DU SERVEUR DE FICHIERS LE PLUS PROCHE
          # Configure la manire dont sont geres les requtes SAP 'obtention
          # du serveur le plus proche' (Get Nearest Fileserver).
          # Syntaxe :
          #    401 <drapeau>
          # avec <drapeau> =
          #      0 : dsactive cette requte
          #      1 : le fichier de stations liste les stations  exclure
          #      2 : le fichier de stations liste les station  inclure

          401 2





     DDmmaarrrreerr llee sseerrvveeuurr
        Si vous avez configur le serveur de telle sorte que d'autres
        programmes configurent le rseau et/ou fournissent les fonctions
        de routage, alors vous devez lancer ces programmes avant de
        dmarrer le serveur.  Si vous avez configur le serveur pour
        qu'il configure vos interfaces et fournisse des services de
        routage, alors pour dmarrer le serveur, il n'y a qu' taper :




                  # nwserv





     TTeesstteerr llee sseerrvveeuurr
        Pour tester le serveur vous devrez tout d'abord essayer de vous
        connecter et entrer par login grce  un client Netware sur
        votre rseau. Vous pouvez alors faire un CAPTURE  partir de
        votre client et essayer d'imprimer. Si ces deux actions sont
        couronnes de succs, votre serveur fonctionne.


  1100..22..  LL''eennsseemmbbllee llwwaarreedd

  Ales Dryak <A.Dryak@sh.cvut.cz> a dvelopp _l_w_a_r_e_d pour permettre 
  Linux de fonctionner comme un serveur de fichiers bas sur NCP.

  _L_w_a_r_e_d est l'abrviation de _L_i_n_W_a_r_e _D_a_e_m_o_n.


  1100..22..11..  PPoossssiibbiilliittss ooffffeerrtteess ppaarr llwwaarreedd

  Le serveur _l_w_a_r_e_d est capable de fournir un sous-ensemble de services
  d'un serveur Novell NCP. Le systme de messageries a t inclus mais
  il ne fournit pas de facilits d'impression. De plus il ne fonctionne
  pas bien avec des clients pour Windows 95 ou Windows NT. Ce serveur
  s'appuie sur des programmes extrieurs pour construire et maintenir le
  routage IPX et les tables SAP. Le mauvais comportement d'un client
  peut causer le "plantage" du serveur. Il est aussi important de savoir
  que la retranscription des noms de fichiers (minuscules/majuscules)
  n'a pas non plus t incluse.

  Ce serveur fonctionne avec les shells Netware NETX et VLM.


  1100..22..22..  RRccuupprreerr llwwaarreedd

  Le paquetage _l_w_a_r_e_d peut tre construit pour n'importe quel noyau
  suprieur   la version 1.2.0, je vous recommande d'utiliser la
  version 1.2.13 pour laquelle aucun patch sur le noyau n'est
  ncessaire. Certaines fonctionnalits ont chang avec la version 1.3.*
  du noyau, ce qui signifie que des patchs sont ncessaires pour ces
  versions afin de faire fonctionner ce serveur de manire correcte. Des
  patchs appropris sont inclus pour les nouvelles versions de noyau,
  ainsi si vous devez absolument utiliser un de ces noyaux, vous serez
  toujours en mesure de faire fonctionner _l_w_a_r_e_d correctement.

  On trouve _l_w_a_r_e_d sur klokan.sh.cvut.cz
  <ftp://klokan.sh.cvut.cz/pub/linux/linware/>, Metalab
  <ftp://metalab.unc.edu/pub/Linux/system/Network/daemons>, ou sur un
  site miroir. La version  jour lors de l'criture de ce document tait
  : lwared-0.95.tar.gz


  1100..22..33..  CCoommppiilleerr eett iinnssttaalllleerr llwwaarreedd


     DDccoommpprreesssseerr ll''eennsseemmbbllee _l_w_a_r_e_d
        Ce qui devrait ressembler  :

        # cd /usr/src
        # tar xvpfz lwared-0.95.tar.gz




     CCoommppiilleerr llee nnooyyaauu aavveecc llee ssuuppppoorrtt EEtthheerrnneett eett IIPPXX
        Si vous utilisez un noyau alpha 1.3.* vous devriez essayer
        d'utiliser la version 1.3.17 ou une plus rcente car les patchs
        fournis ont t faits pour celles-l. Les noyaux 1.3.* plus
        anciens que 1.3.17 ncessiteront d'tre modifis  la main pour
        pouvoir installer lwared ( _q_u_e_l_q_u_e_s _i_n_d_i_c_a_t_i_o_n_s _s_u_r _l_a _m_a_n_i__r_e
        _d_'_o_p__r_e_r _c_e _g_e_n_r_e _d_e _m_o_d_i_f_i_c_a_t_i_o_n_s _s_o_n_t _d_o_n_n__e_s _d_a_n_s _l_e _f_i_c_h_i_e_r
        INSTALL du paquetage). Pour installer les patchs pour la version
        1.3.17 du noyau ou plus rcent, vous devrez essayer la commande
        suivante :


                # make patch



     La chose suivante que vous devrez faire aprs avoir appliqu le
     patch, le cas chant, sera de vrifier que votre noyau a bien t
     compil avec le support IPX actif. Dans la version 1.2.13, vous
     n'aurez qu' rpondre oui (Y)  la question


           ...
           ...
          Assume subnets are local (CONFIG_INET_SNARL) [y]
          Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n]
          The IPX protocol (CONFIG_IPX) [n] y
          *
          * SCSI support
           ...
           ...



     Pour les noyaux plus rcents, la question peut varier un peu, mais
     le procd reste fondamentalement le mme.

     Vous devrez galement vous assurer du choix appropri du pilote de
     votre carte Ethernet. Si vous ne savez pas comment procder, je
     vous conseille vivement de vous reporter  Ethernet-HOWTO
     <Ethernet-HOWTO.html>.
     Vous pouvez maintenant procder  la compilation de votre noyau.
     N'oubliez pas de lancer _l_i_l_o une fois la compilation finie, pour
     que le nouveau noyau soit correctement install.


     CCoommppiilleerr eett iinnssttaalllleerr _l_w_a_r_e_d
        Pour compiler _l_w_a_r_e_d vous devez en premier lieu vrifier et
        diter si ncessaire le fichier server/config.h. Ce fichier
        contient les lments ncessaires pour piloter votre serveur et
        dterminer son comportement lorsqu'il fonctionnera. Le fichier
        par dfaut est raisonnablement bien crit mais vous pourrez tout
        de mme vrifier si les rpertoires de fichiers de log et le
        fichier de configuration conviennent  votre systme.

                # make depend
                # make
                # make install



     Le 'make depend' se plaint de ne pas trouver le fichier float.h sur
     mon systme mais cela semble fonctionner tout de mme. J'ai aussi
     dcouvert que lors des compilations avec gcc 2.6.3, il fallait
     modifier la ligne :


          #include <net/route.h>


     en

          #include <net/if_route.h>



     dans le fichier lib/ipxkern.c. Ceci tant d au fait que le fichier
     change parfois de nom.


     Le 'make install' tentera d'installer le serveur et les dmons de
     routage dans le rpertoire /usr/sbin, le programme _l_w_p_a_s_s_w_d dans le
     rpertoire /usr/bin, les programmes utilitaires IPX seront copis
     dans le rpertoire /sbin et les pages de manuel dans la structure
     de rpertoire /usr/man. Si un de ces endroits ne correspond pas 
     votre systme, vous devrez diter et modifier les fichiers Makefile
     correspondants.


  1100..22..44..  CCoonnffiigguurreerr eett uuttiilliisseerr llwwaarreedd

  Voici la partie la plus amusante !


     CCoonnffiigguurreerr llee rrsseeaauu IIPPXX
        La premire chose  faire est de configurer vos cartes Ethernet
        pour qu'elles puissent supporter les rseaux IPX connects 
        votre serveur. Vous devez connatre les adresses des rseaux IPX
        pour chacun des segments du rseau, quel priphrique Ethernet
        (eth0, eth1, etc.) est en relation avec quel segment, quel type
        de trame est utilis pour chacun des segments (802.3, EtherII,
        etc.) et quelle adresse de rseau interne votre serveur doit
        utiliser (ce qui est vraiment ncessaire si votre serveur doit
        fournir des services sur plusieurs segments). Par exemple, une
        configuration plausible d'un serveur tant sur deux segments IPX
        ayant pour adresse rseau 23a91300 et 23a91301 et ayant une
        adresse de rseau interne bdefaced ressemblera  :
                # ipx_internal_net add BDEFACED 1
                # ipx_interface add eth0 802.3 23a91300
                # ipx_interface add eth1 etherii 23a91301





     DDmmaarrrreerr lleess ddmmoonnss ddee rroouuttaaggee
        Le logiciel du noyau permet de faire du renvoi de paquet IPX
        comme il le fait pour les paquets IP, cependant le noyau
        requiert un programme additionnel pour grer la mise  jour des
        tables de routage. Dans le cas d'IPX, deux dmons sont
        ncessaires et tous deux sont fournis avec _l_w_a_r_e_d : _i_p_x_r_i_p_d gre
        l'information de routage IPX et _i_p_x_s_a_p_d gre les informations
        SAP. Pour faire dmarrer les dmons vous n'aurez qu' spcifier
        l'endroit o vous voulez qu'ils crivent les messages de log :

                   # ipxripd /var/adm/ipxrip
                   # ipxsapd /var/adm/ipxsap





     CCoonnffiigguurreerr llee sseerrvveeuurr _l_w_a_r_e_d
        Deux fichiers sont  configurer manuellement pour que les
        utilisateurs puissent se loguer sur votre serveur. Il s'agit de
        :



        /etc/lwpasswd
           Il s'agit du fichier dans lequel les informations sur les
           comptes utilisateurs de LinWare sont gardes. Le programme
           _l_w_p_a_s_s_w_d permet de le maintenir  jour. Dans sa forme la plus
           simple, le fichier /etc/lwpasswd ressemble  :


                       ales:
                       terryd:
                       guest:


        Son format est une simple liste de noms de login suivis du car
        actre ':' puis de la version encrypte du mot de passe de
        login. Il faut cependant noter deux choses importantes : si les
        mots de passe ne sont pas chiffrs cela signifie qu'il n'y a pas
        de mot de passe. D'autre part, les utilisateurs de _L_i_n_W_a_r_e
        doivent avoir un compte Linux, c'est--dire que chaque utilisa
        teur de _L_i_n_W_a_r_e prsent dans /etc/lwpasswd doit aussi tre
        prsent dans /etc/passwd. Seul l'utilisateur root peut changer
        le mot de passe d'un autre utilisateur _L_i_n_W_a_r_e. Si vous tes
        logu en tant root, vous pourrez par exemple taper la commande
        suivante pour changer le mot de passe d'un utilisateur :


                # lwpasswd rodg
                Changing password for RODG
                Enter new password:
                Re-type new password:
                Password changed.




        /etc/lwvtab
           Il s'agit des tables des volumes LinWare o sont stockes les
           informations sur les rpertoires  partager entre les
           utilisateurs de  LinWare (ce fichier comporte des similitudes
           avec le fichier /etc/exports pour NFS). Un exemple simple de
           son format est :


                      SYS             /lwfs/sys
                      DATA            /lwfs/data
                      HOME            /home


        Ce format est simple : nom du volume puis le rpertoire Linux 
        exporter spars par le caractre espace. Vous devez avoir, aauu
        mmooiinnss, une entre dans ce fichier pour le volume SYS afin que le
        serveur puisse dmarrer. Si vous voulez que vos utilisateurs DOS
        puissent accder  votre serveur LinWare  comme serveur pri
        maire, vous devrez installer une arborescence de volume SYS
        standard sous le rpertoire que vous exportez comme volume SYS.
        Les fichiers devant tre prsents dans ces rpertoires sont ceux
        de Novell et sont soumis  leurs copyrights. Vous devez avoir
        une licence pour les utiliser. Si vos utilisateurs utilisent un
        serveur de fichiers Novell comme serveur primaire, vous n'aurez
        pas besoin du volume SYS.



     DDmmaarrrreerr llee sseerrvveeuurr _l_w_a_r_e_d


                 # lwared


     Plutt simple n'est-ce pas ? Mais il reste une question.  Quel est
     le nom du serveur de fichiers ? Si vous avez dmarr le serveur
     LinWare  de la faon expose ci-dessus, son nom sera celui retourn
     par la commande _h_o_s_t_n_a_m_e de Linux (le nom d'hte). Si vous voulez
     un autre nom, il suffit de le spcifier dans la ligne de lancement
     de lwared comme ci-dessous par exemple :


              # lwared -nlinux00


     Ici le nom du serveur LinWare sera linux00.


     TTeesstteerr llee sseerrvveeuurr _l_w_a_r_e_d
        La premire chose  faire est de vrifier que votre serveur
        LinWare apparat bien dans une _s_l_i_s_t d'un client DOS sur votre
        rseau. Le programme _s_l_i_s_t est stock dans le volume SYS d'un
        serveur de fichier Novell donc il vous faudra raliser cette
        opration  partir d'une machine dj logue sur un serveur. Si
        a ne marche pas, vrifiez que _i_p_x_s_a_p_d et _l_w_a_r_e_d tournent en
        mme temps sur la machine Linux. Si la slist est bonne vous
        pouvez essayer de connecter et de mapper un volume :

                 C:> attach linux00/ales
                 ...
                 ...
                 C:> map l:=linux00/data:
                 C:> l:



     Vous devriez maintenant tre en mesure d'utiliser le nouveau volume
     comme tout autre volume Novell. Les permissions des fichiers sont
     bases sur celles donnes par le serveur _L_i_n_u_x en fonction de votre
     compte utilisateur.



  1111..  CCoonnffiigguurreerr vvoottrree mmaacchhiinnee LLiinnuuxx eenn cclliieenntt dd''iimmpprreessssiioonn NNoovveellll


  Le paquetage _n_c_p_f_s inclut deux petits utilitaires qui vous permettent
  d'imprimer depuis votre machine Linux sur une imprimante relie  un
  serveur d'impression Novell.  La commande _n_p_r_i_n_t vous permet
  d'imprimer un fichier vers une queue d'impression NetWare. La commande
  _p_q_l_i_s_t liste les queues d'impression disponibles sur un serveur
  NetWare.


  Pour obtenir et installer ces commandes, vous n'avez qu' suivre les
  instructions relatives au client NCP dcrites prcdemment.


  Ces deux commandes ncessitent que vous fournissiez le nom
  d'utilisateur et le mot de passe. Vous devriez normalement penser 
  crire des scripts pour simplifier les tches d'impression.


  Exemple :


       # pqlist -S ACCT_FS01 -U guest -n
       # nprint -S ACCT_FS01 -q LASER -U guest -n filename.txt




  La syntaxe concernant le login est similaire  celle de la commande
  _n_c_p_m_o_u_n_t. Les exemples ci-dessus font l'hypothse qu'un serveur de
  fichiers ACCT_FS01 a un compte guest sans mot de passe, qu'une queue
  d'impression appele LASER existe et que guest a le droit d'imprimer
  dessus.

  Sur mes machines Linux, j'ai un court script en shell pour chaque
  imprimante Novell.  Il peut alors tre utilis comme un filtre
  d'impression afin de pouvoir imprimer en utilisant le spooler Linux
  standard.


  1122..  CCoonnffiigguurreerr vvoottrree mmaacchhiinnee LLiinnuuxx eenn sseerrvveeuurr dd''iimmpprreessssiioonn NNoovveellll

  Un programme permettant  votre machine Linux d'agir comme serveur
  d'impression sur un rseau NetWare est inclus dans le paquetage _n_c_p_f_s.
  Pour l'installer et le compiler, se reporter  la section 'client
  NetWare' au-dessus. Il y a galement un autre support dans le
  paquetage _m_a_r_s___n_w_e.



  1122..11..  PPrrrreeqquuiiss

  La configuration est relativement simple mais vous devez avoir une
  imprimante compltement configure et fonctionnant sous Linux. Cette
  partie est couverte dans le Printing-HOWTO <Printing-HOWTO.html> en
  dtail.


  1122..22..  CCoonnffiigguurraattiioonn

  Une fois que vous avez une configuration imprimante qui fonctionne et
  que vous avez compil et install l'utilitaire _p_s_e_r_v_e_r, vous devez
  ajouter des commandes dans vos fichiers rc.

  La commande exacte  utiliser va dpendre de ce que vous voulez
  exactement qu'il fasse, mais dans sa faon la plus simple, quelque
  chose comme cela devrait fonctionner :



       # pserver -S ACCT_01 -U LASER -P secret -q LASERJET




  Cet exemple demande  l'utilitaire _p_s_e_r_v_e_r de se loguer sur le serveur
  ACCT_O1 avec le nom LASER et le mot de passe secret et de rcuprer
  les travaux d'impression dans la queue LASERJET. Lorsqu'un nouveau
  travail d'impression est reu, la commande d'impression par dfaut de
  _l_p_r sera utilise pour fournir ce travail d'impression au dmon
  d'impression Linux.  La queue d'impression doit tre dj dfinie sur
  le serveur de fichiers et le nom d'utilisateur doit avoir les
  privilges du serveur pour la queue.


  Vous auriez pu, si vous aviez voulu, utiliser une autre commande Linux
  pour accepter et imprimer les travaux d'impressions. l'argument -c
  vous permet de spcifier la commande exacte  utiliser. Par exemple :



       # pserver -S ACCT_01 -U LASER -P secret -q LASERJET -c "lpr -Plaserjet"




  fera exactement la mme chose que l'exemple prcdent sauf qu'il
  enverra le travail d'impression  la configuration _p_r_i_n_t_c_a_p laserjet
  au lieu de celle par dfaut.


  1133..  nnccppffss UUnn aappeerruu ddeess ccoommmmaannddeess uuttiilliissaatteeuurr eett dd''aaddmmiinniissttrraattiioonn ddee

  Les dernires versions du paquetage _n_c_p_f_s de Volker incluent toute une
  srie de commandes d'utilisation et d'administration que vous pourriez
  avoir envie d'utiliser. Ces outils sont compils et installs dans le
  processus d'installation de _n_c_p_f_s. Si vous ne l'avez pas encore fait,
  suivez les instructions fournies dans la section sur le client Novell
  au-dessus pour les compiler et les installer.


  L'information dtaille est disponible dans les pages de _m_a_n fournies,
  mais voici un bref rsum des commandes.


  1133..11..  CCoommmmaannddeess uuttiilliissaatteeuurr


     nnccooppyy
        Network Copy (copie rseau) - permet de copier efficacement des
        fichiers en utilisant une fonction NetWare plutt que de copier
         travers le rseau.


     nnpprriinntt
        Network Print (impression rseau) - permet d'imprimer un fichier
        vers une queue d'impression Netware situe sur un serveur
        Netware.

     nnsseenndd
        Network Send (envoi rseau) - permet d'envoyer des messages 
        d'autres utilisateurs connects  un serveur NetWare.

     nnwwbboollss
        List Bindery Objects (liste les objets de la bindery) - permet
        de lister le contenu de la bindery d'un serveur NetWare.

     nnwwbboopprrooppss
        List properties of a Bindery Object (liste les proprits d'un
        objet de la bindery) - permet de voir les proprits d'un objet
        de la bindery

     nnwwbbppsseett
        Set Bindery Property (Configure des proprits de bindery) -
        permet de configurer les proprits d'un objet de la bindery
        NetWare.

     nnwwbbppvvaalluueess
        Print Netware Bindery Objects Property Contents (affiche le
        contenu proprit des Objets de la Bindery) - permet d'afficher
        le contenu d'une proprit d'une bindery Netware.

     nnwwffssiinnffoo
        Fileserver Information (information sur le serveur de fichiers)
        - affiche un rsum d'informations sur un serveur Netware.

     nnwwppaasssswwdd
        NetWare Password (mot de passe NetWare) - permet de changer le
        mot de passe d'un utilisateur NetWare.

     nnwwrriigghhttss
        NetWare Rights (permissions NetWare) - affiche les droits
        associs  un fichier ou rpertoire particulier.

     nnwwuusseerrlliisstt
        User List (liste d'utilisateurs) - liste les utilisateurs
        actuellement logus sur un serveur de fichiers NetWare.

     ppqqlliisstt
        Print Queue List (Liste de queue d'impression) - affiche le
        contenu d'une queue d'impression NetWare.

     sslliisstt
        Server List (liste de serveurs) - affiche une liste de serveurs
        de fichiers NetWare connus.


  1133..22..  OOuuttiillss dd''aaddmmiinniissttrraattiioonn


     nnwwbbooccrreeaattee
        Create a Bindery Object (crer un objet de la bindery) - permet
        de crer un objet de la bindery.

     nnwwbboorrmm
        Remove Bindery Object (enlever un objet de la bindery) - permet
        d'effacer un objet de la bindery.

     nnwwbbppaadddd
        Add Bindery Property (ajouter une proprit  la bindery) -
        permet de positionner la valeur d'une proprit existante d'un
        objet d'une bindery Netware.

     nnwwbbppccrreeaattee
        Create Bindery Property (crer une proprit de bindery) -
        permet de crer une nouvelle proprit pour un objet dj
        existant dans une bindery NetWare.

     nnwwbbpprrmm
        Remove Bindery Property (enlever une proprit de bindery) -
        permet d'enlever une proprit sur un objet d'une bindery
        NetWare.

     nnwwggrraanntt
        Grant Trustee Rights (attribuer les droits d'accs) - permet
        d'assigner les droits d'accs  un rpertoire sur un serveur de
        fichiers NetWare.

     nnwwrreevvookkee
        Revoke Trustee Rights (retirer les droits d'accs) - permet de
        retirer les droits d'accs  un rpertoire sur un serveur de
        fichiers NetWare.


  1144..  CCoonnffiigguurreerr PPPPPP ppoouurr llee ssuuppppoorrtt dd''IIPPXX

  Les nouvelles versions du dmon PPP _p_p_p_d pour Linux permettent de
  transporter des paquets IPX  travers une liaison srie PPP. Il faut
  au moins la version ppp-2.2.0d du dmon. Voir le PPP-HOWTO <PPP-
  HOWTO.html> pour savoir o le trouver. Lorsque vous compilez _p_p_p_d,
  assurez-vous d'activer le support IPX en ajoutant les deux lignes
  suivantes au fichier /usr/src/linux/pppd-2.2.0f/pppd/Makefile.linux


       IPX_CHANGE = 1
       USE_MS_DNS = 1




  Le IPX_CHANGE est ce qui active le support d'IPX dans PPP. La
  dfinition de USE_MS_DNS permet aux machines Microsoft Windows 95 de
  faire de la recherche de nom (name lookup).


  Le vrai truc pour arriver  le faire marcher, c'est de savoir le
  configurer.


  Il y a plein de faons de faire mais je ne dcrirai que les deux sur
  lesquelles j'ai reu des informations. Je n'ai encore jamais essay,
  donc considrez cette section comme exprimentale et si vous arrivez 
  faire marcher quelque chose, faites-le moi savoir s'il vous plait.


  1144..11..  CCoonnffiigguurreerr uunn sseerrvveeuurr IIPPXX//PPPPPP

  La premire chose  faire est de configurer votre machine Linux en
  serveur IP/PPP. Pas de panique ! Ce n'est pas difficile. De nouveau,
  suivez les instructions dans le PPP-HOWTO <PPP-HOWTO.html> et a
  devrait aller. Une fois que vous avez fait ceci, il y a quelques
  modifications pour faire fonctionner IPX avec la mme configuration.




  1144..11..11..  PPrreemmiirree ttaappee

  Une des premires choses  faire est de configurer votre machine Linux
  en routeur IPX de la faon dcrite plus haut dans ce document. Vous
  n'avez pas besoin d'utiliser la commande _i_p_x_-_r_o_u_t_e pour l'interface
  PPP car _p_p_p_d les configure pour vous comme il le fait pour IP.
  Lorsque le dmon _i_p_x_d tourne, il dtecte automatiquement toute
  nouvelle interface IPX et propage les routes pour elle. Ainsi, vos
  machines connectes en dialup seront vues par les autres machines
  automatiquement lors de la connexion.


  1144..11..22..  CCoonncceeppttiioonn

  Lorsque l'on tourne en tant que serveur, c'est normalement de sa
  responsabilit d'assigner des adresses rseau  chacune des liaisons
  PPP lorsqu'elles sont tablies. Ceci est un point important, chaque
  liaison PPP sera un rseau IPX et aura une adresse rseau IPX unique.
  Cela signifie que vous devez dcider comment vous allez allouer les
  adresses et quelles adresses utiliser.  Une convention simple est
  d'allouer une adresse rseau IPX  chaque priphrique srie qui
  supporte IPX/PPP. Vous pourriez allouer une adresse rseau IPX base
  sur le login de l'utilisateur connect, mais je ne vois pas de raison
  particulire de faire ainsi.

  Je vais supposer pour la suite que vous avez choisi la premire
  convention et qu'il y a deux priphriques rseau (modems) que nous
  utiliserons.  Les adresses utilises dans cet exemple sont :



       Periph. Adresse reseau IPX
       ------- -------------------
       ttyS0   0xABCDEF00
       ttyS1   0xABCDEF01





  1144..11..33..  CCoonnffiigguurreerr ppppppdd

  Configurez votre fichier /etc/ppp/options.ttyS0 comme suit :


       ipx-network 0xABCDEF00
       ipx-node 2:0
       ipxcp-accept-remote




  et votre fichier /etc/ppp/options.ttyS1 :


       ipx-network 0xABCDEF01
       ipx-node 3:0
       ipxcp-accept-remote






  Cela va demander  _p_p_p_d d'allouer l'adresse rseau IPX approprie au
  lien lorsque la liaison est tablie. Le numro de noeud local sera
  positionn  2 ou 3 et le noeud distant pourra l'craser avec le
  numro de noeud qu'il pense tre le bon. Notez que toutes les adresses
  sont en hexadcimal et que 0x est obligatoire au dbut de l'adresse
  rseau mais pas ncessaire au dbut de l'adresse de noeud.


  Il y a d'autres endroits o l'on aurait pu stocker cette information.
  Si vous avez seulement un modem pour les appels entrants, alors une
  entre aurait pu tre ajoute au fichier /etc/ppp/options. Cette
  information aurait galement pu tre passe sur la ligne de commande
  de _p_p_p_d.


  1144..11..44..  TTeesstteerr llaa ccoonnffiigguurraattiioonn dduu sseerrvveeuurr

  Pour tester la configuration, vous aurez besoin d'un client
  fonctionnant correctement. Quand l'utilisateur appelle, se logue et
  que _p_p_p_d dmarre, celui-ci va attribuer l'adresse rseau, avertir le
  client du numro de noeud du serveur et ngocier le numro de noeud du
  client.  Lorsque ceci est termin et aprs que _i_p_x_d a dtect la
  nouvelle interface, le client doit pouvoir tablir des connexions IPX
  avec des htes distants.


  1144..22..  CCoonnffiigguurreerr uunn cclliieenntt IIPPXX//PPPPPP

  Dans une configuration client, le fait de configurer ou non votre
  machine Linux en routeur IPX dpend de votre volont d'agir en routeur
  IPX sur le rseau local de la machine. Si vous avez une machine isole
  qui se connecte  un serveur IPX/PPP alors vous n'avez pas besoin
  d'utiliser _i_p_x_d. En revanche, si vous avez un rseau local et
  souhaitez que toutes les machines du rseau puissent utiliser la route
  IPX/PPP alors vous devez configurer et faire tourner _i_p_x_d comme
  dcrit.  Cette configuration est plus simple car vous n'avez qu'un
  seul priphrique srie  configurer.


  1144..22..11..  CCoonnffiigguurreerr ppppppdd

  La configuration la plus simple est celle qui permet au serveur de
  fournir toute l'information sur la configuration du rseau IPX. Cette
  configuration serait compatible avec la configuration du serveur
  dcrite au-dessus.


  Vous avez  nouveau besoin d'ajouter des options dans votre fichier
  /etc/ppp/options :



       ipxcp-accept-network
       ipxcp-accept-remote
       ipxcp-accept-local




  Les options indiquent  _p_p_p_d d'agir de manire compltement passive et
  d'accepter tous les dtails de configuration fournis par le serveur.
  Vous pouvez fournir ici des valeurs par dfaut pour les serveurs qui
  ne fournissent pas ces dtails en ajoutant des lignes ipx-network et
  ipx-node similaires  la configuration du serveur.




  1144..22..22..  TTeesstteerr llee cclliieenntt IIPPXX//PPPPPP

  Pour tester le client, vous avez besoin d'un serveur  appeler connu
  pour fonctionner correctement. Une fois que vous avez appel et que
  _p_p_p_d a dmarr, vous devriez voir les dtails de votre configuration
  IPX sur votre priphrique ppp0 lorsque vous utilisez la commande
  _i_f_c_o_n_f_i_g. Vous devriez galement tre capable d'utiliser _n_c_p_m_o_u_n_t.


  Je ne sais pas si vous devrez ajouter les routes IPX manuellement pour
  atteindre des serveurs distants ou non. Il semblerait que oui. Si
  quelqu'un qui a cette configuration pouvait me le dire, je lui en
  serais reconnaissant.



  1155..  TTuunnnneell IIPPXX ssuurr IIPP

  Beaucoup d'entre vous doivent tre dans la situation o deux rseaux
  locaux IPX sont spars par une simple connexion IP. Comment pourra-t-
  on dans ce cas jouer un deathmatch  DOOM pour DOS dans cette
  situation, demanderiez-vous ? Andreas Godzinap <ag@agsc.han.de> a une
  rponse pour vous avec _i_p_x_t_u_n_n_e_l.

  _i_p_x_t_u_n_n_e_l fournit une sorte de pont pour IPX en permettant  des
  paquets IPX d'tre encapsuls dans des paquets de donnes TCP/IP de
  manire  ce qu'ils soient transports par une connexion TCP/IP. Ce
  programme attend l'arrive de paquets IPX et lors de leur arrive, il
  les enferme dans un paquet de donnes TCP/IP et le route vers
  l'adresse IP distante que vous aurez spcifie. Pour que cela
  fonctionne, la machine qui reoit le paquet de donnes encapsul doit,
  elle aussi, faire tourner une version identique d'_i_p_x_t_u_n_n_e_l.


  1155..11..  RRccuupprreerr iippxxttuunnnneell

  Vous pouvez obtenir _i_p_x_t_u_n_n_e_l sur Metalab
  <ftp://metalab.unc.edu/pub/Linux/system/network/daemons> ou sur un
  site miroir.


  1155..22..  CCoommppiilleerr iippxxttuunnnneell

  _i_p_x_t_u_n_n_e_l se compile proprement chez moi en utilisant les commandes :



              # cd /usr/src
              # tar xvfz .../ipxtunnel.tgz
              # cd ipxtunnel
              # make








  1155..33..  CCoonnffiigguurreerr iippxxttuunnnneell

  La configuration d'_i_p_x_t_u_n_n_e_l est aise. Admettons que la machine de
  vos amis soit gau.somewhere.com et que votre machine soit appele
  gim.sw.edu. _i_p_x_t_u_n_n_e_l utilise un fichier de configuration appel
  /etc/ipxtunnel.conf. Ce fichier vous permet de spcifier le port UDP
  par dfaut  utiliser pour la connexion TCP/IP par laquelle les
  donnes encapsules seront envoyes ainsi que l'interface locale o
  ipxtunnel doit couter et dlivrer les paquets IPX.

  Un simple fichier de configuration ressemblera  :


              #
              # /etc/ipxtunnel.conf pour gim.sw.edu
              #
              # Le port UDP  utiliser                (par dfaut 7666)
              port 7777
              #
              # Le nom de la machine distante o les paquets IPX doivent tre envoys
              remote gau.somewhere.com
              #
              # Les interfaces IPX locales  couter (par dfaut eth0)
              interface eth0
              interface eth1




  videmment l'autre machine aura un fichier de configuration similaire
  spcifiant votre machine comme hte distant (remote).


  1155..44..  TTeesstteerr eett uuttiilliisseerr iippxxttuunnnneell


  _i_p_x_t_u_n_n_e_l se comporte ccoommmmee un pont IPX, ainsi les rseaux IPX 
  chaque extrmit de la liaison TCP/IP doivent probablement tre les
  mmes.  Andreas n'a jamais test _i_p_x_t_u_n_n_e_l dans un environnement qui
  utilise rellement les serveurs de fichiers Novell, donc si vous
  l'essayez dans un tel environnement, donnez-en le rsultat  Andreas
  pour qu'il sache si a marche ou pas.

  Si _i_p_x_t_u_n_n_e_l fonctionne, vous devriez tre en mesure de lancer DOOM
  sur les machines  chaque bout de la connexion utilise en mode IPX et
  vous devriez vous voir l'un l'autre.

  Andreas n'a test ce logiciel que sur de bonnes lignes rapides et ne
  garantit pas sa performance si votre liaison est  faible vitesse. Une
  fois de plus, dites-lui ce qui marche et ne marche pas.


  1166..  SSuuppppoorrtt ccoommmmeerrcciiaall IIPPXX ppoouurr LLiinnuuxx


  1166..11..  CCaallddeerraa''ss NNeettwwoorrkk DDeesskkttoopp


  Caldera Inc. commercialise une distribution Linux possdant de
  nombreuses fonctions et amliorations. Elle inclut un support
  totalement fonctionnel d'un client Novell Netware. La distribution de
  base est la respecte Red Hat Linux et Caldera y a ajout son "Network
  Desktop". Le support Netware inclut un client Novell Netware possdant
  toutes les fonctionnalits requises, bties sur une technologie
  licencie par Novell Corporation. Ce client fournit un accs total 
  des serveurs de fichiers Novell 3.x et 4.5 et inclut des
  fonctionnalits comme le "Netware Directoy Service" (NDS) et
  l'encryptage RSA.

  Vous pourrez obtenir plus d'informations et de dtails sur le serveur
  web Caldera Inc <http://www.caldera.com/>.


  Si vous travaillez dans un environnement Netware 4.x et/ou NDS, alors
  le client Netware de Caldera est la seule solution disponible.

  Si vous devez mettre en oeuvre une solution Novell pour Linux critique
  de manire professionnelle, vous devriez regarder le produit de
  Caldera de prs.


  1177..  FFooiirree AAuuxx QQuueessttiioonnss


     OO ppuuiiss--jjee ttrroouuvveerr ddeess llooggiicciieellss IIPPXX ppoouurr LLiinnuuxx ffoouurrnniiss aavveecc uunn
        ssuuppppoorrtt
        commercial ?"  _C_a_l_d_e_r_a _C_o_r_p_. offre un client Netware 3.x et 4.x
        compltement support avec une licence complte. Pour de plus
        amples informations, consultez le site web de Caldera Inc
        <http://www.caldera.com/>.

     EEsstt--ccee qquuee lleess llooggiicciieellss IIPPXX ffoonnccttiioonnnneenntt aavveecc AArrccnneett//TTookkeenn
        RRiinngg//eettcc.. ??
        Les logiciels IPX pour Linux fonctionnent avec les interfaces
        Arcnet et Token Ring. Je n'ai encore entendu personne essayer
        avec AX.25 . La configuration se passe de la mme manire que
        pour l'Ethernet, sauf que vous devrez remplacer approprie
        lorsque ncessaire.

     CCoommmmeenntt eesstt--ccee qquuee jjee ccoonnffiigguurree pplluuss dd''uunnee iinntteerrffaaccee IIPPXX ??
        Si vous avez plus d'une interface dans votre machine, vous devez
        utiliser la commande _i_p_x___i_n_t_e_r_f_a_c_e pour configurer manuellement
        chacune d'entre elles. Vous ne devez pas utiliser la
        configuration "plug'n'play".

     CCoommmmeenntt eesstt--ccee qquuee jjee cchhooiissiiss lleess aaddrreesssseess IIPPXX ??
        Les rseaux IPX sont similaires mais non identiques aux rseaux
        IP.  Une diffrence majeure est la faon dont les adresses sont
        utilises. IPX n'utilise pas le concept de sous-rseau. Le lien
        entre les adresses rseau et les rseaux est diffrent. Les
        rgles sont relativement simples.

       Chaque adresse de rseau IPX doit tre unique sur un rseau 
        grande chelle (WAN).  Ceci inclut les adresses de rseau
        internes. Beaucoup d'organisations utilisant IPX sur des rseaux
         grande chelle ont une politique d'adressage que vous devriez
        suivre.

       Chaque adresse d'hte sur un rseau particulier doit tre
        unique. Cela signifie que tous les htes sur chaque rseau IPX
        doivent avoir une adresse assigne unique.  Dans le cas d'un
        rseau Ethernet, ce n'est pas difficile, car les cartes ont
        chacune une adresse unique. Dans le cas d'IPX/PPP, cela signifie
        que vous devez vous assurer d'allouer une adresse unique pour
        tous les htes du rseau, quel que soit le bout de la (des)
        liaison(s) auquel ils sont connects. Les adresses des htes
        n'ont pas besoin d'tre uniques  travers un WAN car l'adresse
        du rseau est combine  l'adresse de l'hte pour identifier
        l'hte de manire unique.

     QQuueellss ssoonntt lleess ttyyppeess ddee ttrraammee qquuee jjee ddeevvrraaiiss uuttiilliisseerr??
        Il y a plusieurs types de trames au-dessus desquelles vous
        pouvez faire fonctionner IPX. Les plus utilises sont dcrites
        dans la section 'termes utiliss dans ce document' (sous
        l'entre 'type de trame').

        Si vous installez votre machine sur un rseau existant, alors
        vous devrez utiliser ce qui est dj utilis pour vous permettre
        de communiquer avec les autres machines du rseau. En revanche,
        si vous installez un rseau tout neuf, il y a toute une varit
        de protocoles pour transporter votre trafic IPX que vous pouvez
        utiliser. Si vous installez un rseau tout neuf et que vous
        envisagez d'y faire passer de l'IPX et de l'IP, je vous
        recommande des trames de type Ethernet_II.

     MMeess mmaacchhiinneess WWiinnddoowwss9955 bbrroouuiilllleenntt llaa ddtteeccttiioonn aauuttoommaattiiqquuee dduu ttyyppee
        ddee mmeess ttrraammeess..
        Apparement, ils y arrivent, ouais. Je pourrais faire des
        commentaires pas gentils, mais  la place, je vous suggrerais
        de configurer manuellement le type de trames plutt que
        d'utiliser la configuration automatique. C'est probablement la
        meilleure faon en tout cas.

     PPoouurrqquuooii eesstt--ccee qquuee jj''oobbttiieennss llee mmeessssaaggee ''iinnvvaalliidd aarrgguummeenntt'' qquuaanndd
        jjee ccoonnffiigguurree
        IPX ?"  Vous n'avez probablement pas un noyau qui supporte IPX.
        Soit vous recompilez votre noyau pour qu'il le fasse, soit vous
        vrifiez que vous avez bien utilis lilo pour installer et
        utiliser le nouveau noyau.

     PPoouurrqquuooii eesstt--ccee qquuee jj''oobbttiieennss llee mmeessssaaggee ''ppaacckkaaggee nnoott iinnssttaalllleedd''
        qquuaanndd jjee
        configure IPX ?"  Vous n'avez probablement pas un noyau qui
        supporte IPX. Soit vous recompilez votre noyau pour qu'il le
        fasse, soit vous vrifiez que vous avez bien utilis lilo pour
        installer et utiliser le nouveau noyau.

     PPoouurrqquuooii eesstt--ccee qquuee _p_p_p_d mm''eennvvooiiee llee mmeessssaaggee ''IIPPXX ssuuppppoorrtt
        not in kernel' ?"  Vous avez probablement compil IPX comme un
        module et vous ne vous tes pas assur qu'il tait charg avant
        de dmarrer _p_p_p_d.

     CCoommmmeenntt eexxppoorrtteerr eenn NNFFSS uunn ssyyssttmmee ddee ffiicchhiieerrss NNCCPP mmoonntt ??
        Pour utiliser NFS pour exporter un systme de fichiers NCP, vous
        devez le monter en utilisant l'option -v de _n_c_p_m_o_u_n_t. Cette
        option permet de monter un seul volume d'un serveur de fichiers
        au lieu de les monter tous. Lorsque vous fates ainsi, le dmon
        NFS vous permet d'exporter ce systme de fichiers de la manire
        habituelle.

     PPoouurrqquuooii eesstt--ccee qquuee sslliisstt nnee mmaarrcchhee ppaass qquuaanndd jj''aaii uunn rrsseeaauu
        iinntteerrnnee
        avec _m_a_r_s___n_w_e ?"  Vous devez avoir la requte 'get nearest
        server' active. L'entre 401 dans /etc/nwserv.conf doit tre 0,
         moins que vous ayez une raison pour ne pas rpondre  ces
        requtes. Si vous voulez simplement que _s_l_i_s_t fonctionne et ne
        pas rpondre  chaque requte 'get nearest server', ajoutez
        votre rseau interne et numro de noeud dans
        /etc/nwserv.stations et positionnez l'entre 401 de
        /etc/nwserv.conf  2.

     EEsstt--ccee qquuee llee ppaaqquueettaaggee nnccppffss ffoonnccttiioonnnnee aavveecc mmaarrss__nnwwee ??
        Les codes de Martin et Volkers commencent lentement  converger.
        Les versions rcentes de _m_a_r_s___n_w_e ont une option pour lui
        permettre de marcher avec _n_c_p_f_s. Vous devez activer
        WITH_NAME_SPACE_CALLS dans le fichier config.h de _m_a_r_s___n_w_e.


  1188..  CCooppyyrriigghhtt


  L'IPX-HOWTO est soumis au Copyright (c) 1995 Terry Dawson.

  Cette documentation est libre, vous pouvez la redistribuer et/ou la
  modifier selon les termes de la Licence Publique Gnrale GNU publie
  par la Free Software Foundation (version 2 ou bien toute autre version
  ultrieure choisie par vous).

  Cette documentation est distribue car potentiellement utile, mais
  SSAANNSS AAUUCCUUNNEE GGAARRAANNTTIIEE, ni explicite ni implicite, y compris les
  garanties de ccoommmmeerrcciiaalliissaattiioonn ou dd''aaddaappttaattiioonn ddaannss uunn bbuutt ssppcciiffiiqquuee.
  Reportez-vous  la Licence Publique Gnrale GNU pour plus de dtails.

  Vous pouvez obtenir une copie de la Licence Publique Gnrale GNU en
  crivant  la Free Software Foundation <http://www.fsf.org>, Inc., 675
  Mass Ave, Cambridge, MA 02139, tats-Unis.

  Les marques dposes sont proprits de leurs propritaires
  respectifs.




  1199..  RReemmeerrcciieemmeennttss

  Terry Dawson <terry@perf.no.itg.telstra.com.au> pour le document
  initial.

  David E. Storey <dave@tamos.gmu.edu> et Volker Lendecke
  <lendecke@namu01.gwdg.de> qui m'ont assist grandement en me
  fournissant des informations pour ce document.  Gilbert Callaghan
  <gilbert@pokey.inviso.com>, David Higgins <dave@infra.com> et Chad
  Robinson <chadr@brtgate.brttech.com> pour leur contribution sur la
  configuration de IPX/PPP.  Bennie Venter <bjv@Gil-galad.paradigm-
  sa.com> pour les informations utiles sur les types de trames.
  Christopher Wall <vergil@idir.net> pour ses suggestions utiles afin
  d'amliorer la lecture et l'agencement de ce document.  Axel Boldt
  <boldt@math.ucsb.edu> pour ses suggestions utiles et le retour
  d'informations.  Erik D. Olson <eriko@wrq.com> pour son retour
  d'informations utile et ses informations pour la configuration de PPP
  pour IPX.  Brian King <root@brian.library.dal.ca> pour sa contribution
   une question de la section FAQ


  "NetWare" est une marque dpose de Novell Corporation
  <http://www.novell.com/>.

  "Caldera" est une marque dpose de Caldera Corporation
  <http://www.caldera.com/>.




    Kevin Thorpe

  <kevin@pricetrak.com>















  Linux IR HOWTO
  Werner Heuser, < wehe@snafu.de >
  Arnold < arn_mat@club-internet.fr >
  v2.4, 9 Fvrier 1999

  Une introduction  Linux et aux priphriques infrarouges, et comment
  utiliser les logiciels fournis par le projet Linux/IrDA. Ce paquetage
  utilise utilise le standard IrDA(TM). IrDA(TM) est un standard indus
  triel utilis pour les communications infrarouges sans fils, et la
  majorit des ordinateurs portables construits aprs janvier 1996 sont
  quips de transmetteurs infrarouges compatibles IrDA. Les ports
  infrarouges permettent de communiquer avec des imprimantes, modems,
  fax, LAN et d'autres portables. La vitesse de transmission va de
  2400bps  4Mbps. La pile Linux/IrDA supporte IrLAP, IrLMP, IrIAS,
  IrIAP, IrLPT, IrCOMM, IrOBEX, et IrLAN. De nombreux protocoles sont
  implments en tant que clients et serveurs. Les connections multiples
  via IrLAPsont aussi supportes, via plusieurs priphriques IrDA en
  mme temps. Le projet Linux/IrDA  dmarr  la fin de l'anne 1997 et
  son statut est toujours exprimental, alors, n'esprez pas que tout
  marchera du premier coup. D'aprs ce que je sais, Linux/IrDA est la
  _seule_ implmentation libre disponible actuellement. Le contrle 
  distance (Remote Control : RC) via infrarouge n'est pas le but de ce
  projet, malgr tout, ce sujet est trait partiellement dans ce HOWTO.
  ______________________________________________________________________

  Table des matires








































  1. Introduction

  2. Prrequis

  3. Noyau

     3.1 Configuration gnrale
     3.2 Paramtres spcifiques  IrDA
        3.2.1 IrDA subsystem support
           3.2.1.1 Protocole IrDA
           3.2.1.2 Options du protocole IrDA
           3.2.1.3 IrDA compressors
        3.2.2 Pilotes de priphriques infrarouges
           3.2.2.1 IrTTY (utilise le pilote srie)
           3.2.2.2 Support des dongles
           3.2.2.3 Support de FIR

  4. Utilitaires Linux/IrDA

  5. Configuration

     5.1 Configuration gnrale
     5.2 IrManager
     5.3 Pilotes de bas niveau
        5.3.1 SIR
        5.3.2 Connexion des dongles - Adaptateurs infrarouges sur port srie.
        5.3.3 Connexion des dongles - Adaptateur infrarouge pour carte mre
        5.3.4 Infrarouge rapide (FIR = Fast InfraRed)

  6. Protocoles et connexions spcifiques

     6.1 Connexion imprimante - IrLPT
     6.2 Connexion LAN - IrLAN
     6.3 Connexion Palm III - IrOBEX
     6.4 Connexion avec un tlphone cellulaire.
     6.5 Connexion avec un appareil photo numrique
     6.6 Window$95 et Linux/IrDA
     6.7 Connexion de Linux  Linux
        6.7.1 Mthodes de connexions
        6.7.2 Compression
     6.8 Instances multiples

  7. Matriel support par Linux/IrDA

     7.1 Rcuprer des informations  propos des ports infrarouges des portables
        7.1.1 SIR
        7.1.2 FIR
     7.2 Aperu du matriel support

  8. Interface graphique

  9. conomie d'nergie

  10. Rsolution des problmes, liste de diffusions

     10.1 Informations gnrales
     10.2 Technique de rsolution des problmes

  11. Bugs connus

  12. FAQ

  13. Contrle  distance via infrarouge

     13.1 Ressources
     13.2 Commande a distance IR - IrDA
  14. Infrarouge et protection des yeux.

  15. Crdits

  16. Historique des versions

  17. Copyright et dngation



  ______________________________________________________________________


  11..  IInnttrroodduuccttiioonn


  _B_e_t_t_e_r _r_e_d_, _t_h_a_n _d_e_a_d_. _- _U_n_k_n_o_w_n _A_u_t_h_o_r_E_s_s

  Depuis 2.1.131 et 2.2.0, Linux/IrDA fait partie du noyau. Notez
  toutefois que le statut de ce projet est toujours exprimental. Si
  vous avez besoin d'informations  propos du support Linux/IrDA pour
  les noyaux 2.0.x, allez voir l'ancienne version de ce howto disponible
   http://www.snafu.de/~wehe/index_li.html. Mais d'aprs ce que je
  sais, ce paquetage n'est plus maintenu.

  Les compagnies et les dveloppeurs qui aimeraient participer  ce
  projet devraient contacter le projet Linux/IrDA 
  http://www.cs.uit.no/~dagb/irda ou moi  < wehe@snafu.de >.

  Maintenant, un peu d'histoire. Le projet dmarra  la fin de l'anne
  1997 avec le nom Linux/IrDA. A cause de problmes dus au fait que le
  nom IrDA est une marque dpose par l'Infrared Data Association IrDA
  http://www.irda.org/, le nom a t chang en Linux/IR. A la fin de
  l'anne 1998, les relations entre nous et eux devinrent meilleures, et
  le nom redevint Linux/IrDA.

  Ce document est bas sur la partie "Comment l'utiliser" du site
  Linux/IrDA http://www.cs.uit.no/~dagb/irda/howto.html. J'ai aussi
  inclus des informations provenant de l'quipe Linux/IrDA, de la liste
  de diffusion, ainsi que d'autres sources.

  Ce document fait partie du LINUX DOCUMENTATION PROJECT
  http://metalab.unc.edu/LDP.

  La dernire version de ce document est disponible 
  http://www.snafu.de/~wehe/index_li.html (version anglaise) et
  http://www.freenix.org/unix/linux/HOWTO/IR-HOWTO.html (version
  franaise)

  J'ai essay de vrifier toutes les informations, mais je n'ai pas tout
  le matriel infrarouge ncessaire, alors, si cela ne marche pas pour
  vous, ne m'accusez pas.

  Si vous avez des commentaires ou des questions, n'hsitez pas  me
  contacter. Je sais que ce document n'est ni fini ni parfait, mais
  j'espre qu'il vous sera utile.

  <Werner Heuser>


  22..  PPrrrreeqquuiiss



    BIOS

     - Assurez vous que le port infrarouge est bien activ dans le BIOS,
     et vrifiez quelle interruption et quel port il utilise.


    Puce contrleur infrarouge


     - Assurez vous que votre port infrarouge soit bien dtect par
     Linux. Pour plus de dtails, rfrez vous  la section "Aperu du
     matriel support" ci dessous.


    modutils


     - Assurez vous que vous avez bien modutils 2.1.x (insmod
     --version). J'utilise la version 2.1.121.


    Librairies partages


     - La librairie libc.so.5 et le chargeur ld-linux.so.1 doivent tre
     disponibles.


     - Mais glibc2 aka libc6 devrait aussi marcher.


     - Je ne suis pas sr que vous ayez besoin de la librairie zlib si
     vous utilisez la compression de donnes.


    Interfaces graphiques :


     Il y a actuellement deux interfaces graphiques pour Linux/IrDA qui
     sont en dveloppement :


    GNOBEX, une application GNOME dveloppe par Dag Brattli
     http://www.cs.uit.no/~dagb/irda/irda.html avec le support du
     glisser/dposer depuis le gestionnaire de fichier GNOME (gmc). Il
     indique aussi la progression du transfert en cours et donne de bons
     messages d'erreurs quand quelque chose tourne mal. L'interface
     graphique n'est pas termine pour autant, mais si vous voulez la
     tester, vous aurez besoin du module Perl-GTK+.

    KDE, une application KDE dveloppe par Thomas Davis. Allez faire
     un tour sur sa page http://www.jps.net/tadavis/irda.

     Pour vous autres lecteurs - voici votre chance de contribuer ! Ces
     deux interfaces graphiques ncessitent des icnes. Toutes les
     icnes doivent :
     a) Avoir une taille fixe (je pense que 48x48 pixels semble tre la
     taille commune).
     b) Grosse & petite (les petites sont pour tre dockes).
     c) 16 couleurs.
     d) Libres de tous droits.
     e) SVP, ne copiez pas des icnes microsoft !
     Contactez les dveloppeurs.


    Scurit


     - TTrrss iimmppoorrttaanntt, vous devez faire un sync sur vos disques !!!
     Vous aurez peut tre  rebooter votre machine. N'avez vous pas lu
     le dsistement de responsabilit ?




    Divers


     - Autres programmes utiles : APSFILTER, EZ-Magic, MagicFilter ou
     quelque chose de similaire pour configurer les imprimantes.


  33..  NNooyyaauu

  S'il vous plat, lisez le Kernel-HOWTO
  <http://www.freenix.org/unix/linux/HOWTO/Kernel-HOWTO.html> pour
  trouver plus d'informations sur la compilation. Vous trouverez les
  sources de Linux/IrDA dans :

  /usr/src/linux/net/irda (protocoles)

  /usr/src/linux/drivers/net/irda (pilotes de priphriques)

  /usr/src/linux/include/net/irda (fichiers d'en-ttes)



  33..11..  CCoonnffiigguurraattiioonn ggnnrraallee

  - Assurez vous que vous utilisez bien les sources du noyau _n_o_y_a_u
  _2_._2_._x. Si vous n'tes pas sr de la version de votre noyau, essayez
  uname -r.

  - Rcuprez le dernier patch du projet Linux/IrDA
  http://www.cs.uit.no/~dagb/irda/snapshots/. Mettez le dans /usr/src ou
   l'endroit o vous avez les sources de votre noyau, et appliquez
  quelque chose ressemblant  (remplacez le nom du patch
  patch-2_2.0-irdaXXX  par le nom du fichier que vous avez) :



       cd /usr/src
       tar xvzf patch-2_2.0-irdaXXX.tar.gz
       cd linux
       patch -p1 -l < ./patch-2_2.0-irdaXXX





  - Le support pour le code exprimental doit tre activ
  (CONFIG_EXPERIMENTAL).

  - Activez sysctl dans le "General Setup" (CONFIG_SYSCTL).

  - Vous devriez avoir _p_r_o_c _f_i_l_e _s_y_s_t_e_m _s_u_p_p_o_r_t (CONFIG_PROC_FS).

  - De mme _s_e_r_i_a_l _s_u_p_p_o_r_t pour les fonctionnalits SIR (CONFIG_SERIAL).

  - Je ne suis pas certain qu'il y ait besoin d'y avoir le _p_r_i_n_t_e_r
  _s_u_p_p_o_r_t pour utiliser une imprimante avec Linux/IrDA (CONFIG_PRINTER).
  Mais je suppose que cette fonctionnalit n'est pas ncessaire


  - Le _N_e_t_w_o_r_k_i_n_g _s_u_p_p_o_r_t doit tre activ (CONFIG_NET).

  - Assurez vous que vous avez le _m_o_d_u_l_e _s_u_p_p_o_r_t (CONFIG_MODULES) dans
  votre noyau ! Testez en faisant lsmod.

  - De mme le support de kerneld (CONFIG_KERNELD) est recommand. Mais
  kmod (CONFIG_KMOD) marche aussi. Une noyau monolithique semble aussi
  marcher.

  - Matt Francis a crit : "J'ai remarqu que certains modules ont
  besoin non seulement du support pour les modules, mais aussi du _m_i_s_c
  _u_s_e_r _d_e_v_i_c_e _s_u_p_p_o_r_t." (CONFIG_UMISC).

  Si vous avez juste appliqu le patch Linux/IrDA, vous ne devriez pas
  avoir  faire un make clean, alors, cela devrait aller un peu plus
  vite. Je vous suggre de faire un truc dans ce style :



       make dep && make all && make modules && make install && make modules_install




  Si vous avez des erreurs vraiment bizarres, alors, essayez de
  recompiler aprs un make clean.


  33..22..  PPaarraammttrreess ssppcciiffiiqquueess  IIrrDDAA

  Voici ce que j'ai suggr pour
  ../linux-2.2.x/Documentation/Configure.help, des morceaux viennent de
  Dag Brattli et Andreas Butz :


  33..22..11..  IIrrDDAA ssuubbssyysstteemm ssuuppppoorrtt

  CONFIG_IRDA

  IrDA(TM) est un protocole industriel standardis pour les
  communications infrarouges sans fils. Les ports infrarouges vous
  permettent de communiquer avec des imprimantes, modems, fax, rseaux
  et ordinateurs portables. La vitesse de transmission varie de 2400bps
   4Mbps. Pour utiliser ces fonctionnalits, vous aurez besoin du
  paquetage irda_utils fournis par le projet Linux/IrDA (). Pour de plus
  amples informations, vous pouvez trouver le IR-HOWTO  . Pour
  l'instant, il est conseill de compiler le support IrDA en tant que
  module uniquement (Rfrez vous  Documentation/modules.txt). Notez
  que le support Linux/IrDA est toujours exprimental.


  33..22..11..11..  PPrroottooccoollee IIrrDDAA


    Protocole IrLAN

     CONFIG_IRLAN

     Compile le pilote IrDA rseau. Utilisez ``ifconfig eth0 <IP-
     NUMBER>'' pour le configurer. - Rpondez juste Y.


    Support des clients IrLAN

     CONFIG_IRLAN_CLIENT

     Si vous connectez des priphriques infrarouges via IrLAN, l'un
     doit tre serveur et l'autre client. Vous pouvez utiliser les deux
     en mme temps. Le premier  se connecter sera le client.  -
     Rpondez juste Y.
     derniers patch incluent le support peer-to-peer  la place.


    Support pour le serveur IrLAN

     CONFIG_IRLAN_SERVER

     Si vous connectez des priphriques infrarouges via IrLAN, l'un
     doit tre serveur et l'autre client. Vous pouvez utiliser les deux
     en mme temps. Le premier a se connecter sera le client.  -
     Rpondez juste Y.
     derniers patch incluent le support peer-to-peer  la place.


    Protocole IrOBEX

     CONFIG_IROBEX

     IrOBEX est un protocole pour changer des objets (fichiers, cartes
     de visite, etc.)  travers une connexion infrarouge. Vous pouvez
     l'utiliser pour changer des fichiers entre Linux et un PALM III.
     IrOBEX peut aussi tre utilis entre deux machines Linux, entre une
     machine Linux et une machine Windows95, etc. - Rpondez juste Y.


    Protocole IrCOMM

     CONFIG_IRCOMM

     Via IrCOMM, il est possible de communiquer avec des tlphones
     cellulaires, etc. Pour utiliser ce service, vous aurez  crer un
     priphrique avec ``mknod /dev/irnine c 60 64'', il marche comme
     /dev/ttySx. - Rpondez juste Y.
     : les nombres majeurs et mineurs ne sont toujours pas officiels.
     Pour les dernires amliorations, (IrSocket est en chemin !), allez
     faire un tour sur la page de Takahide Higuchi .
     IrCOMM semble faire planter le noyau assez facilement, alors, vous
     devriez probablement attendre le prochain patch.


    Support des clients IrLPT

     CONFIG_IRLPT_CLIENT

     Dites Y ici si vous voulez le support pour le protocole client
     IrLPT. Si vous voulez le compiler en tant que module, dites M ici
     et lisez Documentation/modules.txt. Le protocole client IrLPT peut
     tre utilis pour imprimer des documents sur des imprimantes
     compatibles IrDA telle la HP-5MP, ou sur un adaptateur IrLPT tel le
     ACTiSYS IR-100M. - Rpondez juste Y.


    Support du serveur IrLPT

     CONFIG_IRLPT_SERVER

     Dites Y ici si vous voulez compiler le support pour le protocole
     serveur IrLPT. Si vous voulez le compiler en tant que module, dites
     M ici et lisez Documentation/modules.txt. Le protocole serveur
     IrLPT rends possible l'utilisation d'une machine Linux en tant
     qu'imprimante infrarouge pour d'autres portables. Alors, si votre
     machine Linux a une imprimante, d'autres portables pourront
     l'utiliser via la liaison infrarouge. - Rpondez juste Y.



  33..22..11..22..  OOppttiioonnss dduu pprroottooccoollee IIrrDDAA

  CONFIG_IRDA_OPTIONS

  Vous avez la possibilit de dfinir certaines options du protocole
  IrDA

    Cache last

     LSAP CONFIG_IRDA_CACHE_LAST_LSAP

     Dites Y ici si vous voulez que IrLMP cache le dernier LSAP utilis.
     Ceci est intressant puisque la majorit des trames seront
     envoyes/reues via la mme connexion. L'activation de cette option
     vous fera gagner une recherche dans un tableau  chaque trame
     transmise. Si vous tes indcis, dites Y.


    FAST RRs

     CONFIG_IRDA_FAST_RR

     Utilisez cette option si vous voulez envoyer les trames RR (Receive
     Ready) plus vite lorsque la queue est vide. Cela vous donnera de
     biens meilleurs temps de rponse, mais consommera plus de
     puissance,  cause des rebonds des trames RR.


    Recycle RRs

     CONFIG_IRDA_RECYCLE_RR

     Lorsque le protocole IrLAP fonctionne normalement, il envoie
     beaucoup de petites trames RR (Receive Ready)  travers la liaison
     (tout du moins, lorsqu'il n'a rien d'autre  faire). Rpondre Y ici
     demandera  IrLAP de recycler ces trames, vitant par l mme plein
     de alloc_skb et de kfree_skb. Pour raliser cela, il va juste
     garder une trame ce qui est suffisant dans la majorit des cas.


    Debug information

     CONFIG_IRDA_DEBUG

     Dites Y ici si vous voulez que IrDA donne des informations de
     dbogage  votre syslog. Vous pouvez changer le niveau de dbogage
     dans /proc/sys/net/irda/debug.
     plus simple de dnicher les bogues).


  33..22..11..33..  IIrrDDAA ccoommpprreessssoorrss

  CONFIG_IRDA_COMPRESSION

  Vous pouvez utiliser les mthodes de compression BZIP2 et BSD. Cela ne
  fait pas partie du standard IrDA. Cela permettra  deux machines Linux
  de compresser leur trafic. Cela devrait tre compatible avec les
  autres priphriques IrDA, mais les communications ne seront alors pas
  compresses.



    Deflate compression (experimental)

     CONFIG_IRDA_DEFLATE

     Dites Y ici si vous voulez compiler le support pour le protocole de
     compression Deflate. Si vous voulez le compiler en tant que module,
     dites M et rfrez vous  Documentation/modules.txt. La compression
     deflate (GZIP) est exactement la mme que celle utilise par le
     protocole PPP. Activer cette option crera un module nomm
     irda_deflate.o.


    BZIP2 compression

     CONFIG_IRDA_BZIP2

     Pas d'aide disponible.


    BSD compression

     CONFIG_IRDA_BSD

     Pas d'aide disponible.



  33..22..22..  PPiillootteess ddee pprriipphhrriiqquueess iinnffrraarroouuggeess

  Trois types de pilotes sont disponibles : srie, dongle et FIR. Ils
  apparatrons dans /proc/net/dev (irda0) aprs initialisation.



  33..22..22..11..  IIrrTTTTYY ((uuttiilliissee llee ppiilloottee ssrriiee))

  La majorit des puces IrDA supportent StandardInfraRed (SIR), qui
  marche jusqu' 115200 bps et mmule un port srie (UART 16550A). Sur
  beaucoup de portables, ce port est dtect par le pilote srie du
  noyau, rfrez vous a ``dmesg''. IrTTY connecte les services
  Linux/IrDA  ce port. - Vous devriez dire Y ici.


    Support du dongle srie

     CONFIG_IRTTY_SIR

     Dites Y ici si vous voulez compiler le support pour la IrTTY line
     discipline.  Si vous voulez le compiler en tant que module, dites M
     et rfrez vous  Documentation/modules.txt. IrTTY rends possible
     l'utilisation du pilote srie de Linux pour tous les ports IrDA qui
     sont compatibles 16550. La majorit des puces le sont, par
     consquent, vous devriez aussi dire Y  cette option. L'utilisation
     de IrTTY limitera toutefois la vitesse de connexion  115200 bps
     (mode IrDA SIR). Si vous n'tes pas sr, dites Y.


  33..22..22..22..  SSuuppppoorrtt ddeess ddoonngglleess

  CONFIG_DONGLE

  Pour l'instant 4 dongles (adaptateurs infrarouges pour port srie)
  sont supports. Le dongle est un priphrique infrarouge qui se
  connecte au port srie, si vous n'avez pas de port infrarouge intgr
   votre machine. Si vous utilisez un dongle sur un ordinateur
  portable, vous aurez certainement  dsactiver le support IrDA dans le
  BIOS.


    Dongle ESI JetEye PC

     CONFIG_ESI_DONGLE

     Dites Y ici pour compiler le support pour les dongles Extended
     Systems JetEye PC. Si vous voulez le compiler en tant que module,
     dites M et rfrez vous  Documentation/modules.txt. Ce dongle se
     branche sur un port srie 9 broches, et ne peut tre utilis que
     par IrTTY. Pour activer le support pour le dongle ESI, vous aurez 
     insrer ``irattach -d esi'' dans le script /etc/irda/drivers.


    Dongle ACTiSYS IR-220L and IR220L+

     CONFIG_ACTISYS_DONGLE

     Dites Y ici pour compiler le support pour les dongles ACTiSYS
     IR-220L et IR220L+. Si vous voulez le compiler en tant que module,
     dites M et rfrez vous  Documentation/modules.txt. Ce dongle se
     branche sur un port srie 9 broches, et ne peut tre utilis que
     par IrTTY. Pour activer le support pour les dongles ACTiSYS, vous
     aurez  insrer ``irattach -d esi'' ou ``irattach -d actisys_plus''
     dans le script /etc/irda/drivers.


    Dongle Tekram IrMate 210B

     CONFIG_TEKRAM_DONGLE

     Dites Y ici pour compiler le support pour le dongle Tekram IrMate
     210B. Si vous voulez le compiler en tant que module, dites M et
     rfrez vous  Documentation/modules.txt. Ce dongle se branche sur
     un port srie 9 broches, et ne peut tre utilis que par IrTTY.
     Pour activer le support pour les dongles Tekram, vous aurez 
     insrer ``irattach -d tekram'' dans le script /etc/irda/drivers.


    Dongle GirBIL

     CONFIG_GIRBIL_DONGLE

     Dites Y ici pour compiler le support pour le dongle Greenwich
     Instruments GirBIL. Si vous voulez le compiler en tant que module,
     dites M et rfrez vous  Documentation/modules.txt. Ce dongle se
     branche sur un port srie 9 broches, et ne peut tre utilis que
     par IrTTY. Pour activer le support pour les dongles Greenwich, vous
     aurez  insrer ``irattach -d girbil'' dans le script
     /etc/irda/drivers.



  33..22..22..33..  SSuuppppoorrtt ddee FFIIRR

  FastInfraredSupport (FIR) (support de l'infrarouge rapide) ncessite
  un contrleur spcial, qui supporte jusqu' 4Mbps. Dites juste "Y"


    NSC PC87108

     CONFIG_NSC_FIR

     La puce FIR NationalSemiConductor NSC PC87108 (utilise par exemple
     dans l'IBM Thinkpad 560X et le dongle ACTiSYS IR2000). La puce FIR
     NSC PC87338 FIR est probablement aussi supporte. Le pilote
     supporte les vitesses SIR, MIR et FIR (4Mbps). - Dites juste Y.


    Winbond W83977AF (IR)

     CONFIG_WINBOND_FIR

     La puce FIR Winbond W83977AF (IR) (utilise par exemple dans le
     Corel Netwinder PC).  Le pilote supporte les vitesses SIR, MIR et
     FIR (4Mbps). - Dites juste Y.


    Sharp UIRCC

     CONFIG_SHARP_FIR

     Dites Y ici pour compiler le support pour le chipset Sharp UIRCC
     IrDA. Si vous voulez le compiler en tant que module, dites M et
     rfrez vous  Documentation/modules.txt. Ce chipset est utilis
     dans les portables Toshiba de la gamme Tecra.





  44..  UUttiilliittaaiirreess LLiinnuuxx//IIrrDDAA



    Utilisez la dernire version des irda-utils disponible 
     http://www.cs.uit.no/~dagb/irda/irda-utils/.

    Dtarez le paquetage en faisait tar xvzf irda-utils<VERSION>. Je
     vous recommande de le mettre dans /usr/src.

    Faites un make depend.

    Faites un make clean (ce n'est pas ncessaire si vous compilez le
     paquetage pour la premire fois).

    Faites un make all pour compiler tous les excutables.

    Faites un make install, cela installe irattach et irmanager au bon
     endroit, et installe quelques fichiers de configuration dans
     /etc/irda.

  Une recommandation de Bjoern Hansson <Bjorn.Hansson@signal.uu.se> : Si
  make depend choue sur stdef.h et stdarg.h ajoutez juste
  -I/usr/lib/gcc-lib/i586-linux/egcs-2.90.29/include/ ou le chemin
  adquate avec votre configuration  la ligne SYS_INCLUDES du fichier
  Makefile.



  55..  CCoonnffiigguurraattiioonn



  55..11..  CCoonnffiigguurraattiioonn ggnnrraallee



    Tout d'abord vous devriez mettre vos priphriques infrarouges 
     porte l'un de l'autre. Bien que le service Linux/IrDA dtecte peut
     tre automatiquement les nouveaux priphriques, j'ai bonne
     exprience de la configuration quand les priphriques sont 
     porte l'un de l'autre.

    Gardez vos priphriques infrarouges ensembles, dans un espace d'un
     mtre maximum et dans un angle de 30 degrs. Ils doivent tre en
     vis  vis. Si cela n'est pas possible, utilisez un miroir (un CD de
     M$ non utilis fera l'affaire).

    Ajoutez les lignes suivantes  votre /etc/conf.modules :



       alias tty-ldisc-11 irtty          #
       alias char-major-60 ircomm_tty    # Si vous voulez le support IrCOMM





  Je ne suis plus tout  fait sr de ces paramtres. Il y a des informa
  tions contradictoires sur les page de Dag Brattli et sur la liste. Ces
  paramtres taient utiliss avec les anciens paquetages Linux/IrDA,
  ces paramtres ont certainement changs dans les versions 2.2.x des
  noyaux.

    Allez faire un tour dans /etc/irda. ces fichiers sont similaires 
     ceux dans /etc/pcmcia. Editez /etc/irda/drivers pour que cela soit
     en accord avec votre configuration. La majorit des gens
     utiliseront irattach depuis ce fichier. les fichiers sont :



       Makefile
       network*
       network.redhat*
       serial
       drivers
       network.opts
       obex
       printer





    Lancez un depmod -a.


  55..22..  IIrrMMaannaaggeerr

  Dag Brattli a crit : _I_r_M_a_n_a_g_e_r [...]. est un dmon utilisateur qui
  s'inspire et qui est assez similaire  _c_a_r_d_m_g_r utilis pour contrler
  les cartes PCMCIA.

  _I_r_M_a_n_a_g_e_r recevra les vnements qui proviennent de l'espace noyau de
  la pile du protocole.  Quand _I_r_M_a_n_a_g_e_r reoit un vnement, il peut
  excuter des commandes shell ou des scripts, par consquent, j'ai
  ajout le rpertoire /etc/irda pour contenir ces scripts. [...]

  Par exemple, si IrLMP dcouvre un priphrique qui peut fournir un
  service IrLAN, et qu'aucun client IrLAN ne s'est enregistr, alors,
  IrLMP enverra un vnement  IrManager et lui fera faire un "modprobe"
  sur le module requis. [...]

  Lorsque les clients (applications utilisateurs) sont prts  effectuer
  la configuration des paramtres de communication et de l'utilisateur,
  ils peuvent galement contacter IrManager, de faon  ce qu'il excute
  le bon script. Par exemple, IrLAN enverra un vnement
  EVENT_IRLAN_START quand le canal de donnes sera prt pour changer
  des trames ethernet. Quand IrManager reoit cet vnement, il excute
  /etc/irda/network start <devname> pour configurer l'interface rseau.
  Ce script network est d'ailleurs le mme que celui utilis par le code
  PCMCIA, et vu que j'utilise sa variante RedHat, il finira par excuter
  /sbin/ifup <devname>.

  Par consquent, en utilisant l'IrManager, j'ai "juste"  faire cela
  quand je dmarre la pile :



       irattach /dev/ttyS2 &
       irmanager -d 1           # -d 1 signifie : dmarre la reconnaissance automatique




  et quand mon portable dcouvre le fournisseur IrLAN (un HP Netbeamer
  dans mon cas) il demandera  _I_r_M_a_n_a_g_e_r de charger le module
  irlan_client. Quand la connexion est tablie et prte, il demandera
  l'excution de /etc/irda/network start eth0. Si la connexion est
  perdue, il lui demandera de supprimer l'interface en lanant
  /etc/irda/network stop eth0.[...]

  C'est tout ce que vous avez  faire si vous utiliser une RedHat. Si
  vous utilisez une distribution qui n'a pas /sbin/ifup, alors, vous
  devriez copier /etc/pcmcia/network.opts vers /etc/irda/network.opts ou
  configurer le fichier vous mme.

  Si vous voulez utiliser le serveur IrLAN, vous aurez quand mme 
  faire un modprobe irlan_server avant de lancer irmanager ssaannss -d 1.

  Et tout comme le cardmgr, vous aurez (et si vous le voulez) un bip
  quand la connexion est tablie et prte et quand elle est dconnecte
  !!!

  J'espre que nous pourrons ajouter de tels scripts pour tous les
  autres services/clients qui ont besoin d'une configuration dans
  l'espace utilisateur. Cela serait super d'avoir un script
  /etc/irda/printer pour configurer les imprimantes compatibles IrDA(TM)
  de telle sorte que si vous entrez dans le champ d'une telle
  imprimante, IrManager charge le module irlpt_client et configure aussi
  ce qui doit l'tre pour utiliser cette imprimante.

  J'espre aussi que nous pourrons utiliser le fichier de configuration
  pour configurer les ports et les pilotes IrDA(TM). Quelque chose dans
  le style :



       Device Drivers
         module "irtty" script="irattach /dev/ttyS2"
         module "smc_ircc" irq=11 port=0x34f




  de telle sorte que IrManager soit capable de charger et dmarrer tout
  a quand il est excut. De cette faon, il serait juste de lancer
  IrManager depuis /etc/rc.d/init.d/irda et le reste sera plug & play.
  Il ne serait plus ncessaire de dmarrer manuellement les programmes
  et de configurer les priphriques. Pour l'instant, lorsque irmanager
  reoit les vnements suivants, il fera :
  EVENT_IRLAN_START, dmarre et configure le priphrique avec
  /sbin/ifup <dev>

  EVENT_IRLAN_STOP, ferme l'interface avec /sbin/ifdown <dev>

  cela peut bien sur tre chang simplement par l'utilisateur, si ce
  n'est pas la faon qu'il a de le faire.


  55..33..  PPiillootteess ddee bbaass nniivveeaauu

  Il y a trois sortes de pilotes de bas niveau : SIR, dongle et FIR. Si
  le bon pilote est trouv par le noyau, vous aurez un message
  ressemblant  :



       IrDA irda_device irda0 registered.





  55..33..11..  SSIIRR



    Essayez de trouver quel port srie est utilis par le priphrique
     infrarouge. Vous pouvez le faire en regardant ce que donne dmesg.
     Si le support srie est sous forme de module vous pouvez faire un
     insmod serial. Cherchez une entre telle :



       Serial driver version 4.25 with no serial options enabled
       ttyS00 at 0x03f8 (irq = 4) is a 16550A     #Permier port srie /dev/ttyS0
       ttyS01 at 0x3000 (irq = 10) is a 16550A    #ex. port IR
       ttyS02 at 0x0300 (irq = 3) is a 16550A     #ex. port modem PCMCIA





  Si ce n'est pas le cas, soit vous n'avez pas activ le support
  infrarouge dans le BIOS ou votre priphrique infrarouge n'est pas
  dtect par le noyau. Pour l'instant, je ne connais que deux portables
  qui ont ce comportement, le HP OmniBook 800 et les Toshiba Libretto.
  Je ne suis pas certain du rle que joue le PnP dans la dtection du
  port IR. Si vous n'tes pas sr, essayez et donnez moi le rsultat.

    Dans certaines situations, vous aurez peut tre  faire un
     setserial /dev/ttyS<0-2> port 0xNNNN irq M pour donner les bonnes
     valeurs  votre port infrarouge srie, surtout si le port srie est
     sur une ligne srie spare. Normalement, il n'est pas ncessaire
     de modifier ces valeurs ! Pour plus d'informations, rfrez vous 
     la FAQ ci dessous.

    Si vous n'utilisez pas kerneld ou kmod insrez le module irda avec
     modprobe irda.

    Faites un lsmod. Les modules irda et irtty devraient apparatre.

    Un coup d'oeil dans /var/log/messages devrait vous afficher "Serial
     connection established" maintenant.


    Tapez irmanager -d1, cela lancera les programmes ncessaires, tels
     irattach.

    Donnez  irattach un peu de temps (ex: sept secondes), pour
     dtecter les autres priphriques infrarouges. Ensuite, regardez ce
     que vous affiche le noyau dans /var/log/messages. Cela devrait
     ressembler aux lignes suivantes (j'ai supprim quelques lignes qui
     n'taient pas en relation avec Linux/IrDA) :



       Jan  2 12:57:26 japh kernel: ttyS00 at 0x03f8 (irq = 4) is a 16550A
       Jan  2 12:57:26 japh kernel: ttyS02 at 0x03e8 (irq = 4) is a 16550A
       Jan  2 12:57:26 japh kernel: Linux Support for the IrDA (tm) protocols (Dag Brattli)
       Jan  2 12:59:09 japh syslog: executing: 'echo 1 > /proc/sys/net/irda/discovery'
       Jan  2 12:59:09 japh syslog: Setting discovery to 1 exited with status 1
       Jan  2 12:59:09 japh syslog: + 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
       Jan  2 12:59:09 japh syslog: + 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
       Jan  2 12:59:09 japh syslog: Serial connection established.
       Jan  2 12:59:09 japh kernel: IrDA irda_device irda0 registered.
       Jan  2 13:01:22 japh syslog: executing: './drivers start '
       Jan  2 13:01:22 japh syslog: Serial connection established.
       Jan  2 13:01:42 japh syslogd: Printing partial message
       Jan  2 13:01:42 japh 0.1 Fri Jul 25 11:45:26 1997 Dag Brattli
       Jan  2 13:02:49 japh kernel: IrDA Discovered: japh
       Jan  2 13:02:49 japh kernel:     Services: Computer





  55..33..22..  CCoonnnneexxiioonn ddeess ddoonngglleess -- AAddaappttaatteeuurrss iinnffrraarroouuggeess ssuurr ppoorrtt
  ssrriiee..

  Les dongles supports actuellement sont le Extended Systems Inc.
  ESI-9680 JetEye, le Tekram IRmate 210B, le ACTiSYS IR220L et 2\20L+,
  le Greenwich GIrBIL.


  Dag Brattli a crit (modifi par wh) : "Pour utiliser un dongle, vous
  aurez  faire un truc comme :



       modprobe tekram         # ou esi ou actisys
       irmanager -d 1          #
       irattach -d tekram      # ou -d esi ou -d actisys




  Comme vous pouvez le voir, vous avez toujours  utiliser l'option -d
  avec irattach vu qu'il est possible d'avoir deux ports sries
  utilisant deux dongles diffrents au mme moment (le tty que vous liez
  doit savoir  quel dongle il a  faire). Donc, si vous avez deux
  dongles et deux ports sries, vous aurez  faire un truc comme cela :



       modprobe tekram
       modprobe esi
       irattach /dev/ttyS0 -d esi &
       irattach /dev/ttyS1 -d tekram &



  PS : Je n'essaierais pas de mettre les deux dongles l'un en face de
  l'autre, car je ne sais pas trop quelle serait la raction de la
  pile :-)

  Comme je n'ai pas de nouveaux dongles ACTiSYS 220L+ sous la main, je
  ne peut pas les tester. Et comme ces nouveaux dongles supportent une
  vitesse supplmentaire (28400bps), vous devez spcifier le dongle
  diffremment avec irattach de telle sorte que le noyau sache quel
  dongle vous utilisez (et quel QoS peut tre utilis) :



       irattach /dev/ttyS0 -d actisys     # pour le dongle 220L
       irattach /dev/ttyS0 -d actisys+    # pour le dongle 220L+




  L'implmentation actuelle du support des dongles n'a aucun tat
  prcis, il n'est donc pas possible d'utiliser les deux dongles ACTiSYS
  (220L et 220L+ en mme temps (connect  deux ports sries) pour
  l'instant. Si vous avez besoin de le faire, envoyez moi un e-mail (Dag
  Brattli) et j'y songerais peut tre !"

  Note : Quand j'ai essay d'utiliser un modem infrarouge (Swissmod
  56Ki, construit par Telelink AG) connect  mon portable (l'IrDA n'y
  marche qu'avec Windows 95 du  un matriel non standard) j'ai du
  dsactiver le support infrarouge depuis le BIOS pour le faire
  marcher !



  55..33..33..  CCoonnnneexxiioonn ddeess ddoonngglleess -- AAddaappttaatteeuurr iinnffrraarroouuggee ppoouurr ccaarrttee mmrree

  Le support pour le dongle ACTiSYS IR2000 a t implment dans un
  fichier appel px87108 que vous pouvez soit compiler dans le noyau,
  soit en tant que module :



       irmanager -d 1
       modprobe pc87108




  ou insrez modprobe pc87108 dans le fichier /etc/irda/drivers (je
  pense).


  55..33..44..  IInnffrraarroouuggee rraappiiddee ((FFIIRR == FFaasstt IInnffrraaRReedd))

  Le standard IrDA(TM) reconnat _t_r_o_i_s vitesses diffrentes :




  1. SIR = IrDA standard (Standard IrDA), jusqu' 115kbps IrDA,

  2. MIR = IrDA  vitesse moyenne (Medium Speed IrDA),

  3. FIR = IrDA rapide (Fast IrDA) (4Mbps),

  4. VFIR = IrDA trs rapide (Very Fast IrDA) (16Mbps), semble devenir
     le standard futur

     Jusqu' 115,200 bps, beaucoup de contrleurs infrarouges
     fonctionnent comme un port srie. Jusqu' 4Mbps, ils marchent dans
     le mode "FIR". Actuellement, seuls deux contrleurs sont supports
     : NationalSemiConductor NSC PC87108 (utilis dans les IBM Thinkpad
     560X) et la puce Winbond W83977AF (utilis dans le PC Corel
     Netwinder). Vous pouvez lancer le service FIR en chargeant le
     modules appropri. Linux/IrDA se chargera de dtecter vos
     priphriques  ce moment l.



  66..  PPrroottooccoolleess eett ccoonnnneexxiioonnss ssppcciiffiiqquueess


  66..11..  CCoonnnneexxiioonn iimmpprriimmaannttee -- IIrrLLPPTT

  IrLPT est en phase de dveloppement active en ce moment. La partie
  cliente devrait marcher, mais le serveur pourrait planter.


    Supprimer toutes les impressions en attente avec lprm "*".

    Si vous n'utilisez pas kerneld faites un modprobe irtty.

    Faites un modprobe irlpt_client.

    Vrifiez que le module est bien charg avec lsmod. Il devrait y
     avoir irda, irtty et irlpt_client

    cat /proc/misc vous donne le _n_u_m__r_o _m_i_n_e_u_r du priphrique. C'est
     le premier chiffre sur la ligne avec irlpt0.

    faites un su pour devenir root, et faites un mknod /dev/irlpt0 c 10
     <numro mineur>. Note : quelque chose comme ./MAKEDEV irlpt0 n'est
     toujours pas possible, mais un load_misc irlpt marche, bien que je
     ne puisse pas le confirmer.

    Essayez d'crire un petit fichier vers /dev/irlpt0 en cat FILE
     >/dev/irlpt0 (ne pensez pas au format, c'est juste un test). Pour
     moi, a n'a pas toujours march, mais je n'ai jamais compris
     pourquoi.

    La meilleure faon est de changer votre /etc/printcap pour utiliser
     plutt /dev/irlpt0 ou mme  la place de /dev/lp1. Rfrez vous au
     Printing-HOWTO pour plus de dtails.

    Pour imprimer plus facilement, utilisez un logiciel d'impression
     tel APSFILTER, MagicFilter EZ-Magic (avec la RedHat il devrait
     aussi y avoir une interface graphique pour cette chose l). Faites
     toujours une copie de /etc/printcap avant :-).

    Exemple pour APSFILTER avec une imprimante HP 6P (non postscript,
     HP 6MP est postscript). Les deux questions utiles sont :


     "Avez vous une interface (s)srie ou (p)parallle ?" Rponse "p"


     "Quelle est le nom du priphrique pour votre imprimante parallle
     ?" Rponse "/dev/irlpt0"




    Redmarrez le dmon d'impression avec kill -HUP <PID de lpd>. Si
     vous utilisez un autre dmon d'impression, utilisez la commande
     approprie.

    Regardez si l'indicateur de connexion de votre imprimante montre
     des signes d'activit, par exemple, sur les HP 6P/6MP le petit
     voyant vert au dessus du port infrarouge s'allume (en bas  gauche,
     prs du bac  papier).

    Je n'ai jamais russi  imprimer des documents de plus d'environ 10
     pages jusqu' prsent. Mais cela dpend peut tre de la mmoire de
     mon systme (16Mo). Mais il semble qu'il y ait un problme logiciel
     aussi, Thomas Davis a crit : "Je ... limiterais IrLPT pour qu'il
     ne prenne pas trop de mmoire lors de l'impression d'un gros
     fichier.".


  Takahide Higuchi a rapport : "J'ai test IrCOMM avec une imprimante
  (Canon BJC-80v) ayant un port IrDA et le protocole IrCOMM (pas IrLPT).
  J'ai pu imprimer de petits textes, mais il se peut que cela cause
  facilement un blocage total lorsque j' essaye d'imprimer un fichier
  postscript avec gs.".


  Sur la page de Thomas Davis http://www.jps.net/tadavis/irda, on peut
  lire que pour utiliser le serveur IrLPT, il faut :



       /sbin/insmod irlpt_server
       /sbin/mknod /dev/irlptd c 10 `grep irlptd /proc/misc|cut -f 1`




  A ce moment l, le serveur IrLPT est prt  recevoir des fichiers 
  imprimer. Maintenant, tout ce dont vous avez besoin est un script :



       #!/bin/sh
       #
       while (true)
       do
       cat /dev/irlptd | lpr
       done






  66..22..  CCoonnnneexxiioonn LLAANN -- IIrrLLAANN



    Vous pouvez connecter votre ordinateur sous Linux en utilisant
     IrLAN avec un autre priphrique, par exemple, une autre machine
     Linux avec IrLAN, un HP NetBeamer ou une machine Windows9* avec une
     interface infrarouge.

    Dag Brattli a crit : "Si vous voulez utiliser IrLAN, vous devez
     faire un modprobe irlan_client avant ifup eth0. J'ai du supprimer
     toute la partie request_module() car cela ncessite un contexte non
     disponible dans le noyau.".

    Lancez ifconfig eth0 up <addresse_ip> netmask <masque_sous_rseau>
     pour le configurer avec une adresse IP et d'autres paramtres. Si
     le protocole est toujours en mmoire, vous pourrez commencer 
     communiquer. Il est possible d'utiliser l'outil netcfg de la RedHat
     pour le faire, cela rend les choses plus faciles. La prochaine
     fois, vous aurez juste  faire un /sbin/ifup eth0.

    Testez l'interface rseau en la pingant. Pour plus de dtails,
     rfrez vous au _N_E_T_3_-_H_O_W_T_O.

    N'oubliez pas d'ajouter une route, ex : route add default gw
     <ip_passerelle> ou route add -host <cible> dev eth0.

    Pingez une autre IP, pour tester la connexion.

    Pour des raisons de test, je recommande de n'utiliser qu'un seul
     portable et une seule interface infrarouge dans la mme pice. Si
     il y a des problmes, regardez quels sont les diffrents modes
     possibles pour l'interface infrarouge. Testez les...

  Pour une carte ou un dongle ACTiSYS FIR, vous aurez  faire :



       irmanager -d1
       /sbin/modprobe pc87108  # Supprimer irattach de /etc/irda/drivers, ou
                               # substituer irattach par modprobe !




  Sur la machine 1 :



       modprobe irlan_client # Pas vraiment ncessaire, vu que irmanager devrait le faire !




  Sur la machine 2 (si vous n'avez pas un point d'accs)



       modprobe irlan_server





  Ne compilez pas irlan_server dans le noyau, car il n'aime pas a du
  tout pour l'instant ! Vous devriez avoir configur
  /etc/sysconfig/network-scripts/ircfg-eth0 avec le bon rseau si vous
  utilisez deux machines. Si vous avez un point d'accs, alors, le
  paramtrage par dfaut devrait tre bon.


  Remarquez que dans le dernier patch (2.2.0-irda1), irlan_client
  devrait appeler le priphrique irlan0 par dfaut, mais il est
  possible de modifier ce comportement en donnant eth=1 comme option 
  irlan_client (modprobe irlan_client eth=1 ou options irlan_client
  eth=1 dans /etc/conf.modules).


  La prochaine version d'IrLAN ne sera qu'un seul module, alors, vous
  n'aurez pas  penser au fait qu'il vous faut le client et/ou le
  serveur d'install.

  Il est possible de faire un ifconfig irlan0 -broadcast pour empcher
  l'AP de vous submerger avec des trames de broadcast ! Cela peut tre
  un problme si vous tes connects  un segment ethernet trs large.
  Le seul problme sera que votre machine aura  dmarrer toutes les
  communications, et donc, ne pourra pas marcher en tant que serveur
  (bon, vous devriez pouvoir trouver une machine fixe qui pourrait
  rpondre aux requtes ARP  votre place).



  66..33..  CCoonnnneexxiioonn PPaallmm IIIIII -- IIrrOOBBEEXX

  La partie IrOBEX semble tre en constant dveloppement. Par
  consquent, les applications changent aussi. Par consquent, je ne
  peux pas vous donner des informations exactes. Allez voir la page de
  Dag Brattli  http://www.cdpubs.com/hhsys/archives/66/10brattl.pdf.


  Le script /etc/irda est vraiment juste bon pour configurer les
  priphriques, en faisant le bon mknod pour /dev/irobex etc, pas pour
  dmarrer des applications.


    Palm III -> Linux


     1) Terminal 1> irattach /dev/ttyS<x>


     2) Terminal 2> load_misc irobex


     3) Terminal 3> Dmarrez irobex_app depuis le rpertoire irobex. Je
     suppose que irobex_app ne marche plus maintenant. Maintenant, vous
     devez utiliser le programme gtk/irobex ! Vous avez besoin que la
     librairie gtk soit installe pour pouvoir utiliser ce programme.
     Une interface graphique devrait tre dveloppe par quelqu'un. Le
     programme  utiliser devrait tre irobex_receive.


     4) Rcuprez quelque chose depuis votre Palm III.


     5) Si tout va bien, vous pouvez aller voir le fichier qui vient
     d'arriver dans le rpertoire depuis lequel a t lanc irobex_app
     (ou /tmp pour irobex_receive). Le nom de ce fichier dpendra de
     l'objet que vous avez transfr.




    Linux -> Palm III

     Cela devrait tre possible, mais je n'ai pas d'informations pour
     l'instant.


    PPP

     Rui Oliveira a crit : "Grce au dernier patch IrCOMM (050998) de
     Takahide Higuchi, j'ai russi  synchroniser et  tablir une
     connexion PPP entre mon Palm III et ma machine Linux. J'utilise
     IRLink (provenant de IsComplete) pour rediriger le port srie vers
     un port IR. La communication avec pilot-xfer marche sans aucun
     problme. Bien que j'aie russi  tablir une connexion PPP, je
     n'arrive toujours pas  rcuprer des emails et  naviguer sur le
     Web. Cela est probablement du  des timeouts de connexion. Je suis
     en train d'essayer de rsoudre ce problme.". Rfrez vous au _P_P_P_-
     _H_O_W_T_O pour de plus amples informations sur le PPP.


    IrCOMM

     Jon Howell a crit : "Je pensais essayer IrCOMM, car le Palm III
     peut tre configur pour rerouter les infos du port srie vers le
     port IR (en utilisant IrLink de IS/Complete, disponible sur
     www.palmcentral.com), et ensuite, vous pouvez lancer un programme
     terminal (tel "PalmTelnet" en mode srie)  travers IrDA. Je peux
     seulement supposer qu'il utilise le protocole IrCOMM. J'ai test
     cette configuration entre deux Palm Pilots, mais l, je ne peux pas
     savoir quel protocole est utilis.

     Je n'ai pas russi  trouver une application au code IrCOMM. Je
     vois sur la page d'avancement qu'il y a un "support client (devrait
     commencer  tre utilisable)" mais je ne trouve aucune
     documentation sur comment l'utiliser.".



  66..44..  CCoonnnneexxiioonn aavveecc uunn ttllpphhoonnee cceelllluullaaiirree..

  D'aprs ce que je sais, quelques tlphones utilisent le standard
  IrCOMM, ex: Ericsson SH888 et NOKIA 8110. Benny Amorsen a crit :
  "J'ai utilis minicom avec le SH888, et j'ai russi  tablir une
  connexion (CONNECT 9600...). Je n'ai pas russi  lui faire faire quoi
  que ce soit d'autre aprs la connexion, et raccrocher en arrtant la
  porteuse ne marche pas. +++ J'ai bien travaill, maintenant, il sait
  raccrocher. Je dois dire que le SH888 n'est pas loin de marcher trs
  bien avec Linux/IrDA, et devrait mme marcher avec les noyaux 2.0.x.
  Je n'utilise que les noyaux 2.1.".

  Il se peut que d'autres tlphones utilisent le standard IrOBEX, allez
  faire un tour dans la section Palm III pour apprendre  faire une
  connexion.

  Carlos Vidal a crit : "Corrigez moi si j'ai tout faux, mais il me
  semble que les tlphones NOKIA ne contiennent pas de modem matriel,
  mais quelque chose assez similaire aux WinModems pour les PC. Car 
  chaque fois que NOKIA crit un truc  propos de communication via
  modem, ils utilisent le mme nom de "Modem Windows logiciel" (ou
  quelque chose de similaire). Ce qui est actuellement confirm par le
  fait qu'il faut utiliser les logiciels NOKIA pour Windows (nomms :
  NOKIA Cellular Data Suite).

  Joonas Lehtinen a crit : "Cela est vrai pour les modles 61xx. Les
  modles 8810, 9000(i) et 9110 devraient marcher (ils ont un modem
  intgr). Mon N9000 marche avec IrCOMM et Linux de la faon suivante :

  Pour dmarrer une session de communication avec /dev/irnine, par
  exemple, faites :



       dip -t
       > port irnine
       > term




  Vous utiliserez peut tre cu  la place de dip. Il y a aussi du
  travail de fait avec l'Ericsson GF768 et le modem IR DI 27.
  Benny Amorsen a crit : Le SH888 mule le port IrDA quand vous vous
  connectez via un cble srie, alors que beaucoup penseraient que c'est
  une chose plutt obscure comme cela l'est pour moi. Mais c'est la
  seule manire de le faire fonctionner avec Windows, bien que je n'ai
  jamais russi  le faire marcher avec Windows.


  66..55..  CCoonnnneexxiioonn aavveecc uunn aappppaarreeiill pphhoottoo nnuummrriiqquuee

  Markus Schill a crit : "Heureusement qu'il y a d'autre personnes qui
  sont intresses  faire fonctionner l'adaptateur IR SONY DSC-F1 sous
  Linux. Jusqu' maintenant, je n'ai fait que jouer avec les logiciels
  de la suite Linux/IrDA et l'adaptateur srie qui est fournit avec
  l'appareil photo. Voici o cela en est. J'utilise un noyau 2.0.33 et
  les derniers Linux/IrDA... Si je fait :



       insmod irda
       insmod irtty
       irattach /dev/cua0




  L'adaptateur commence  discuter avec l'appareil photo.
  /var/log/messages dit que le SONY-DSC-F1 a t trouv, mais qu'aucun
  service n'a t dmarr. (notez que ce comportement ne s'applique peut
  tre pas aux noyaux 2.2.x).

  Il y a deux programmes pour Linux qui sont disponibles et qui peuvent
  tre utiliss avec l'appareil photo avec le cble : (1) chotplay et
  (2) stillgrab. Ils prennent tous les deux un tty comme ligne de
  commande, par consquent, je suppose qu'ils devraient marcher si la
  couche irtty et la pile de protocole fonctionnent correctement... Je
  n'ai pas jet de coup d'oeil au code Linux/IrDA pour l'instant ! Je ne
  suis pas certain de comprendre la pile, mais irtty ne devrait-il pas
  faire en sorte que cela ressemble  un vrai tty ? Quel service devrait
  tre dmarr ? "

  Dag Brattli a crit : "Je ne suis pas certain de savoir quel protocole
  l'appareil photo utilise, mais il est possible qu'il implmente les
  spcifications du protocole IrDA(TM) transfert d'images par infrarouge
  (Infrared Transfer Picture IrTran-P). Allez jeter un coup d'oeil 
  http://www.irda.org/standards/pubs/IrTran-P_10.pdf, vous verrez que le
  protocole est implment par dessus IrCOMM (pas IrTTY !). IrTTY est
  quelque chose que nous utilisons juste pour communiquer avec le pilote
  srie de Linux. "


  66..66..  WWiinnddooww$$9955 eett LLiinnuuxx//IIrrDDAA

  Introduction

  Pourquoi cette section ? Malheureusement, les utilisateurs de Linux ne
  sont pas toujours capable de savoir tout sur leur configuration
  matrielle. Quelquefois, il est possible de trouver ces informations
  depuis Window$95.

  O commencer ? Sur http://www.microsoft.com/windows95/info/irda.htm
  vous trouverez un support pour "Infrared Transfer 2.0". C'est une
  archive auto extractible (W95IR.EXE) qui fait 331Ko.

  Avec certaines machines telles le HP Omnibook 800, il est ncessaire
  d'utiliser les spcifications du fabricant (pour cet Omnibook, cela se
  trouve sur votre CD de secours).
  Les fichiers les plus intressants pour trouver des dtails sur la
  configuration sont les ..\windows\inf\*.inf et les gestionnaires de
  priphriques.

  D'aprs ce que je sais, Window$NT ne supporte pas IrDA(TM). Et pour
  Windows98, je n'ai pas encore entendu parler de support IrDA(TM) pour
  l'instant.

  Il y a aussi quelques priphriques non M$ disponibles. Notez
  toutefois que certains utilisent des protocoles infrarouges
  propritaires :


    CounterPoint: QuickBeam 1.15

    LapLink 7.5

    CarbonCopy 32 4.0

    pc ANYWHERE 7.5

    Puma Technology: TRANXIT pro 4.0


  Connexion entre Linux/IrDA et Window$95 IrDA(TM)

  Je pense qu'il y a trois faons de connecter Linux/IrDA et Window$95 :

  Une _c_o_n_n_e_x_i_o_n _r__s_e_a_u entre les deux PC. Si vous avez mis en place
  _I_n_f_r_a_r_e_d _T_r_a_n_s_f_e_r _2_._0, vous devriez trouver une interface rseau
  IrDA(TM) dans la liste des interfaces rseaux. Mais je n'ai pas encore
  russi  faire une connexion.

  Il est certainement aussi possible d'utiliser le _p_r_o_t_o_c_o_l_e _I_r_O_B_E_X.
  Mais je ne sais pas quel logiciel utiliser et o le trouver. Je
  pensais que les logiciels ncessaires viendraient avec le Palm III,
  mais il s'avre que ce n'est pas le cas.

  Takahide Higuchi <thiguchi@pluto.dti.ne.jp> a fournit le _s_u_p_p_o_r_t
  _I_r_C_O_M_M. Depuis sa page http://www.pluto.dti.ne.jp/~thiguchi/irda/ j'ai
  rcupr la description suivante (que j'ai lgrement modifie) :
  "Avec IrCOMM, il est possible d'envoyer et de recevoir de petits
  messages entre une machine Linux et un programme de terminal sur un
  portable sous Win95 ! Ajoutez cette ligne  votre /etc/conf.modules :



       alias char-major-60 ircomm_tty




  Ensuite, crez un fichier de priphrique mknod /dev/irnine c 60 64.
  Maintenant, les services Linux/IrDA peuvent tre dmarrs avec
  irattach /dev/ttyS? &. /dev/irnine peut tre utilis comme port srie.
  Les modules ircomm et ircomm_tty seront chargs automatiquement par
  kerneld/kmod quand un programme utilise /dev/irnine. NOTE : Je pense
  que le programme "setserial" ne devrait pas tre utilis sur
  /dev/irnine. Quelques petits trucs :


    Pour autoriser les login via IrCOMM, utilisez cela en tant que
     root : Premirement, activez IrDA et IrCOMM, Ensuite, ditez
     /etc/inittab et ajoutez une ligne comme celle l :


  T1:23:respawn:/sbin/getty -L -w irnine 38400 vt100





  Et faites ceci en tant que root : init q. Et init commencera  atten
  dre les connexions IrCOMM. Vous verrez apparatre votre prompt de
  login prfr depuis un mulateur de terminal depuis Win95 !

    Si vous essayez pppd, pensez  utiliser l'option -crtscts pour
     dsactiver le contrle de flux. J'ai implment une petite
     mulation de contrle de flux, mais cela n'a pas t test.

    Maintenant, mon patch montre quel fonctionnalits sont ncessaires
      l'autre interface infrarouge. Des messages de ce style seront
     crits dans le syslog :


     Sep 4 10:01:02 monolith kernel: parse_control:instruction(0x12)
     Sep 4 10:01:02 monolith kernel: data:03



    Je voudrais spcialement connatre les messages donns par SH888
     (ou tout autre type de priphriques sauf les PC sous windows 95).
     Donc, s'il vous plat envoyez moi vos syslog gnrs durant les
     connexions IrCOMM ! Si vous avez une copie des spcifications
     IrCOMM crites par IrDA(TM), rfrez vous aux pages 34 ou 38, et
     vous comprendrez ce que ces messages signifient."


  66..77..  CCoonnnneexxiioonn ddee LLiinnuuxx  LLiinnuuxx


  66..77..11..  MMtthhooddeess ddee ccoonnnneexxiioonnss

  Il devrait y avoir _t_r_o_i_s faons de connecter deux machines Linux via
  Linux/IrDA.


    Dag Brattli a crit  propos du _s_u_p_p_o_r_t _I_r_O_B_E_X : "Le lecteur averti
     se demandera ce qui peut empcher de transfrer des fichiers d'une
     machine Linux  une autre machine Linux. Et bien, rien !! (mais je
     n'ai pas encore essay ;-)). Cela signifie que nous avons
     maintenant une manire "simple" de transfrer des fichiers entre
     deux portables Linux. Je pense que cela devrait tre la
     "fonctionnalit qui tue" que nous attendions tous !" Essayez de
     faire load_misc irobex des deux cots, et ensuite, essayer
     iroabex_app get sur l'une des deux machines et irobex put <file>
     sur l'autre.".

    Via une connexion _r__s_e_a_u _L_i_n_u_x_/_I_r_D_A. Je suppose que vous aurez 
     charger le module irlan_client sur l'une des machines et le module
     irlan_server sur l'autre.

    Avec le support _I_r_C_O_M_M, c'est  dire via une liaison srie, ce qui
     signifierait minicom, pppd, etc.


  66..77..22..  CCoommpprreessssiioonn

  Notez que cette fonctionnalit est toujours vraiment exprimentale !
  Dag Brattli a crit : "Je voulais juste vous dire que je viens juste
  d'ajouter de la COMPRESSION  IrLAP ! Comme vous le savez peut tre,
  cela ne fait pas partie du standard IrDA(TM), mais Linux peut ngocier
  avec son voisin et savoir si il est capable de compresser les donnes.
  Donc, si vous discutez avec une machine Win95, Palm III ou quoi que ce
  soit d'autre, vous n'aurez pas de compression !!! C'est une
  fonctionnalit propre  Linux d'autant que je sache ! Le standard
  IrDA(TM) dit que les priphriques doivent ignorer les champs inconnus
  dans les en-ttes de ngociations, donc, nous sommes toujours
  compatibles avec le standard IrDA(TM) (j'ai juste emprunt une valeur
  non utilise dans les en-ttes).

  Si vous voulez essayer d'utiliser la compression (Linux <-> Linux)
  vous aurez  insrer le module irda_deflate quelques temps avant de
  faire la connexion. Personnellement, je le fait avant irattach.

  Le standard de compression que j'ai ajout est le format deflate
  utilis par la librairie zlib qui est dcrit par les RFC (Request for
  Comments) 1950  1952 dans les fichiers
  ftp://ds.internic.net/rfc/rfc1950.txt (_f_o_r_m_a_t _z_l_i_b), rfc1951.txt
  (_f_o_r_m_a_t _d_e_f_l_a_t_e) et rfc1952.txt (_f_o_r_m_a_t _g_z_i_p).

  L'interface de compression est similaire  celle qu'utilise PPP, par
  consquent vous pouvez ajouter autant de compresseurs diffrents. Pour
  l'instant, seul GZIP est support, mais la compression BSD sera
  ajoute plus tard."



  66..88..  IInnssttaanncceess mmuullttiipplleess

  Dag Brattli a crit : "La couche IrLAP a t amliore de telle sorte
  qu'elle autorise plusieurs instances (de cette faon, je peux utiliser
  mon port infrarouge pour IrLAN et communiquer avec mon Pilot via un
  dongle IrDA en mme temps)... Comment faire pour avoir plusieurs
  connexions Linux/IrDA ? Et bien, facile, lancez tout simplement
  irattach autant de fois que vous avez de ports... procdez comme il
  suit : "



       irattach /dev/ttyS0 &    (mon dongle ESI)
       irattach /dev/ttyS2 &    (mon port IrDA intgr)

       insmod irlan_client
       insmod irobex






  77..  MMaattrriieell ssuuppppoorrtt ppaarr LLiinnuuxx//IIrrDDAA


  77..11..  RRccuupprreerr ddeess iinnffoorrmmaattiioonnss  pprrooppooss ddeess ppoorrttss iinnffrraarroouuggeess ddeess
  ppoorrttaabblleess

  Pour faire marcher le port IrDA de votre portable avec Linux/IrDA vous
  pouvez utiliser StandardInfraRed (SIR) ou FastInfraRed (FIR).


  77..11..11..  SSIIRR

  Jusqu' 115.200 bps, le port infrarouge mule un port srie tel l'UART
  16550A. Ceci sera dtect par le pilote srie du noyau au boot ou
  lorsque vous chargerez le module serial. Si le support infrarouge est
  activ dans le BIOS, pour la majorit des portables, vous aurez un
  message du noyau dans le style :
       Serial driver version 4.25 with no serial options enabled
       ttyS00 at 0x03f8 (irq = 4) is a 16550A     #Premier port srie/dev/ttyS0
       ttyS01 at 0x3000 (irq = 10) is a 16550A    #ex port infrarouge
       ttyS02 at 0x0300 (irq = 3) is a 16550A     #ex port modem PCMCIA





  77..11..22..  FFIIRR

  Si vous voulez utiliser jusqu' 4 Mbps, votre machine doit tre
  quipe d'une puce FIR spcifique. Vous aurez besoin d'un pilote
  Linux/IrDA spcial pour cette puce. Par consquent, il est ncessaire
  de savoir exactement quelle puce vous avez. Vous pouvez trouver ces
  informations de diffrentes manires :


  1. Lisez les spcifications de votre machine, mais bon, il est trs
     rare que vous y trouviez suffisamment d'informations.

  2. Faites un cat /proc/pci, mais bon, les informations PCI sont
     souvent incompltes. Vous trouverez les dernires informations 
     propos des priphriques PCI et des numros de fabricants sur la
     page de Craig Hart http://members.hyperlink.net.au/~chart . Depuis
     les noyaux 2.1.82, vous pouvez utiliser lspci fourni avec les pci-
     utils. Les fichiers correspondants pour les noyaux 2.2.x sont dans
     /proc/bus/pci.

  3. Si vous avez install les logiciels Linux/IrDA, chargez le module
     FIR et regardez ce que donne dmesg, pour savoir si votre FIR est
     dtecte ou pas.

  4. Bien que je ne les utilise pas encore dans ce but, les outils
     isapnp devraient tre utiles.

  5. Une autre manire de trouver, explique par Thomas Davis : "Foncez
     sur le site FTP (du fabriquant), trouvez les pilotes FIR, et ils
     ont (pour la puce SMC) :



       -rw-rw-r--   1 ratbert  ratbert       743 Apr  3  1997 smcirlap.inf
       -rw-rw-r--   1 ratbert  ratbert     17021 Mar 24  1997 smcirlap.vxd
       -rw-rw-r--   1 ratbert  ratbert      1903 Jul 18  1997 smcser.inf
       -rw-rw-r--   1 ratbert  ratbert     31350 Jun  7  1997 smcser.vxd





  Si vous avez un doute, regardez toujours les fichiers .inf/.vxd de
  Win95; Win95 n'est livr avec aauuccuunn pilotes FIR (ils viennent tous
  d'ailleurs, pour la plupart de Counterpoint, qui a t absorb par
  ESI)."

  6. Utilisez l'utilitaire DOS CTPCI330.EXE fourni au format ZIP par le
     magazine informatique allemand CT  http://www.heise.de . Les
     informations fournies par ce programme sont parfois plus
     intressantes que celles des programmes Linux.

  7. Il y a aussi un petit utilitaire DOS fait par SMC appel
     "FindChip". Le paquetage fournit aussi un utilitaire "FirSetup" qui
     est suppos pouvoir tout rgler  part l'adresse de la puce.
     Rfrez vous 
     http://www.smsc.com/ftppub/chips/appnote/ir_utils.zip.
     Attention : Ce paquetage n'est pas fait pour l'utilisateur final,
     et certains de ces utilitaires peuvent faire trs mal. La seule
     documentation est au format M$ Word. Les utilisateurs de Linux
     pourront le lire avec catdoc, disponible 
     http://www.fe.msk.ru/~vitus/catdoc/ .

  8. Utilisez le gestionnaire de priphrique de Window$95/98/NT.

  9. Vous pouvez aussi vous rfrer  la section suivante.


  77..22..  AAppeerruu dduu mmaattrriieell ssuuppppoorrtt

  Il y a quelques pages qui parlent des priphriques infrarouges
  supports par Linux sur le WWW :


    Le Linux/IrDA Project - rapport de matriel 
     http://www.cs.uit.no/~dagb/irda/hardware.html

    Takahide Higuchi 
     http://www.pluto.dti.ne.jp/~thiguchi/ir/product.html. Cette page
     est en japonais.

    J'ai aussi mis en place un rapport du matriel 
     http://www.snafu.de/~wehe/index_li.html. Cette liste contient aussi
     des informations se rapportant aux priphriques qui supportent
     l'infrarouge et qui ne sont pas mentionns ici (souris,
     imprimantes, tlcommandes, transmetteurs, etc.).


     Pour que cette liste soit la plus complte possible, il est
     ncessaire de collecter le plus d'informations possible  propos
     des diffrents priphriques infrarouges. Vous m'aiderez beaucoup
     en m'envoyant un court email contenant le nom exact du priphrique
     et quel type de contrleur infrarouge est utilis.


     Tenez moi aussi au courant sur la faon dont Linux/IrDA a march,
     sur quel tty, port, interruption a a march, et le priphrique
     infrarouge correspondant (imprimante, tlphone cellulaire) que
     vous utilisez.


     Vous pouvez aussi aider en donnant des dtails technologiques 
     propos de certains priphriques infrarouges, ce qui est ncessaire
     pour dvelopper un priphrique correspondant pour Linux.





  88..  IInntteerrffaaccee ggrraapphhiiqquuee

  Si vous voulez essayer une jolie interface graphique, vous pouvez
  essayer ircp.pl. Vous aurez besoin du module Perl-GTK+ (
  http://www.gnome.org) pour le faire marcher. Cette interface graphique
  est loin d'tre finie, alors, n'esprez pas trop :-)


  99..  ccoonnoommiiee dd''nneerrggiiee

  Dans les spcifications de mon HP Ominbook 800, il est recommand
  d'teindre le port infrarouge si il n'est pas utilis parce qu'il peut
  consommer jusqu' 10 % de la batterie.

  Si ncessaire, vous pouvez aussi essayer de dsactiver la
  fonctionnalit Fast RRs dans la section IrDA du noyau. Cette option
  vous donnera de bien meilleurs temps d'attente, mais consommera bien
  plus de puissance.



  1100..  RRssoolluuttiioonn ddeess pprroobbllmmeess,, lliissttee ddee ddiiffffuussiioonnss


  1100..11..  IInnffoorrmmaattiioonnss ggnnrraalleess

  Si vous rencontrez des problmes, essayez ce qui suit :


    Lisez la FAQ ci dessous.

    Allez faire un tour dans /var/log/messages et/ou /var/log/kern.

    Tapez dmesg.

    Allez voir les diffrents fichiers dans /proc/irda.

    Allez faire un tour sur les _a_r_c_h_i_v_e_s _d_e _l_a _l_i_s_t_e _d_e _d_i_f_f_u_s_i_o_n 
     http://www.ita.chalmers.se/~svinto/hypermail/irda/, pour savoir si
     votre problme est dj recens.

    Posez votre question sur la _l_i_s_t_e _d_e _d_i_f_f_u_s_i_o_n _L_i_n_u_x_/_I_r_D_A. Pour
     vous abonner  la liste, envoyez un email  linux-irda-
     request@list.uit.no avec "subscribe" (s'inscrire) dans le corps du
     message. Utilisez l'adresse linux-irda@list.uit.no pour poster un
     message. Vous tes le bienvenu sur cette liste pour poser des
     questions, rpondre aux questions, faire des rapports de bugs,
     envoyer des patchs, faire des suggestions et des commentaires. Pour
     viter le spam, la liste est dornavant modre, par consquent, il
     se peut qu'un certain temps se passe avant que votre message soit
     distribu aux autres membres de la liste.



  1100..22..  TTeecchhnniiqquuee ddee rrssoolluuttiioonn ddeess pprroobbllmmeess

  Bien que je ne soit pas franchement un hacker, j'ai rcupr quelques
  erreurs possibles et quelques bugs de la suite Linux/IrDA.


    Vous pouvez rgler le niveau de debug dans /proc/sys/net/irda/debug
      1, 2, 3 ou 4.

    Utilisez les fichiers dans /proc/sys/net/irda pour essayer
     diffrents paramtres comme echo 0 > /proc/sys/net/irda/discovery.


     Les diffrents fichiers prsents dans /proc/*/irda sont :



       root@duckman:~# ls /proc/sys/net/irda/* /proc/net/irda/*
       /proc/net/irda/discovery        /proc/net/irda/irlmp            /proc/sys/net/irda/devname
       /proc/net/irda/irda_device      /proc/net/irda/irttp            /proc/sys/net/irda/discovery
       /proc/net/irda/irias            /proc/sys/net/irda/compression
       /proc/net/irda/irlap            /proc/sys/net/irda/debug




    Il est aussi possible de dbogger le code. Mais je ne sais pas le
     faire. Si vous voulez utiliser le code de dbogage SKB, vous pouvez
     diter irda.h et changer /include/linux/skbuff.h (rfrez vous 
     l'historique des rvisions du code datant du 2/10/98).

    Pour les problmes avec le module irda, un module provenant du
     _p_a_q_u_e_t_a_g_e _d_e _m_o_d_u_l_e_s kdstat pourra tre utile. Mais je n'ai pas t
     en mesure de l'essayer.

    "Vous pouvez dornavant changer le nombre de paquets de dcouverte
     utiliss (1, 6, 8 ou 16) et le timeout entre deux missions (2-8 *
     10 ms) depuis /proc/sys/net/irda. Faites des tests si vous avez des
     problmes  faire reconnatre votre priphrique. Mon Palm III
     semble prfrer 16 discovery_slots et 8 (*10 ms) pour
     slot_timeout."  ... "Le minimum absolu pour une dcouverte du
     IR-610 semble tre 9."

    Si l'un d'entre vous rcupre un Oops du noyau, alors envoyez le
     dans le programme ../linux/scripts/ksymoops/ksymoops, pour que nous
     puissions trouver d'o vient le problme. Copiez juste l'Oops
     depuis votre syslog et coller le dans un fichier, ensuite, lancez
     ksymoops <fichier>.

    Dag Brattli a crit : "J'ai dcouvert que la carte son cs4232 me
     faisait plusieurs centaines d'interruptions par secondes ! Je l'ai
     supprim du noyau, et la machine est approximativement 4 fois plus
     rapide !


     Linux/IrDA peut rencontrer des problmes si vous excutez le
     serveur esound (esd) sur votre machine. Aucune de mes deux
     machines, un portable P166 et un PPro 200, ne peut excuter
     Linux/IrDA quand esd est lanc. La raison est que esd fait faire
     plus de 300 interruptions par seconde  la carte son, ce qui fait
     que le pilote srie perd des donnes quand il en reoit. Cela est
     du au fait que le pilote srie utilise maintenant des interruptions
     lentes dans le noyau 2.2 (tout utilise des interruptions lentes
     dans le 2.2), par consquent le gestionnaire d'interruptions
     s'affole un peu.  La bonne chose  propos des interruptions lentes
     est que les paquets sont dlivrs de manire plus rapide, puisque
     vous n'avez pas  attendre le tick suivant. La seule exception pour
     cela est le pilote pc87108 qui marche toujours bien car il utilise
     le DMA et ne fera que deux interruptions par paquets.




  1111..  BBuuggss ccoonnnnuuss

  Si vous trouvez un bug, s'il vous plat, envoyez un rapport  la
  liste, incluant la sortie de dmesg, la version du noyau, et le
  matriel que vous utilisez. Merci !

  Quelques fois, IrCOMM n'arrive pas  se connecter (spcialement quand
  les deux priphriques se dcouvrent mutuellement. Vous pouvez
  dsactiver la dcouverte avec echo 0 >/proc/sys/net/irda/discovery).

  Un caractre CR (retour  la ligne) ne peut pas tre transfr entre
  deux machines Linux via IrCOMM avec cat file >/dev/irnine et cat
  /dev/irnine. Cela fait des drles de choses et bloque votre machine
  Linux.

  La compilation du pilote pc87108 dans le noyau le fait planter au
  boot. Solution temporaire : le compiler en tant que module.


  IrOBEX peut dtruire des donnes en rception. Ce bug est certainement
  dans la partie utilisateur de IrOBEX.



  1122..  FFAAQQ



    Q1 - Question : Je ne sais pas du tout quels sont les ports
     utiliss et les irq. Que faire ?

    Rponse :


     Premirement : Rglages matriels


     - 1  Allez regarder les spcifications de votre matriel. Si ce
     n'est pas disponible, rfrez vous  la page de support de votre
     constructeur, ou contactez son support technique. Vous pourrez peut
     tre trouver les informations dans les aperus du matriel
     mentionn plus haut.


     - 2  Utilisez un BIOS  jour. D'habitude sur la page du support
     technique de votre fabricant.


     - 3  Essayez de faire setserial /dev/ttyS? -g -a | egrep 16550A.
     L'un des priphriques mentionns est probablement celui que vous
     cherchez. D'habitude, c'est le deuxime, mais ce n'est pas toujours
     le cas.


     - 4  Note : Ce qui semble tre un UART est physiquement un
     contrleur IrDA, Pour mon HP Omnibook 800, c'est le contrleur VLSI
     VL82C147 PCI - IrDA. Ces contrleurs semblent pouvoir se connecter
     jusqu' 115 200 bps comme les UART 16550A. Mais c'est souvent
     difficile de trouver la bonne configuration.


     Deuximement : Comment donner au noyau les paramtres ncessaires
     pour votre matriel ?


     - 4  cat /proc/ioports pour voir quels ports sont dj utiliss.


     - 5  cat /proc/interrupts pour voir quelles interruptions sont dj
     prises.


     - 6  Librez les ports et interruptions pour le priphrique IR,
     par exemple : arrtez le service PCMCIA ou incluez cette ligne dans
     /etc/sysconfig/pcmcia : PCIC_OPTS="irq_list=3,4,5,7,9,10,12,14,15"


     - 7  Maintenant, essayez de deviner quel port et quelle
     interruption est utilise. Utilisez un setserial /dev/ttySx irq M
     port 0xNNNN pour le dire au noyau. Si il y a plusieurs
     possibilits, essayez les toutes (Note : comme il est dit dans le
     _S_e_r_i_a_l_-_H_O_W_T_O, vous ne devriez pas essayer les interruptions 0, 1,
     6, 8, 13 et 14).


     - 8  Si vous avez russi, envoyez les paramtres utiles  l'auteur,
     car il aimerait bien les inclure dans son aperu du matriel.


     - 9  Bonne chance.


     Il sera peut tre aussi ncessaire d'affiner les rglages du port
     srie infrarouge avec setserial, ex : setserial /dev/ttyS0 spd_vhi
     (vitesse 115200).


    Q2 - Question : irattach se fige, mais reconnait mon imprimante.
     /var/log/messages montre que irattach a trouv mon HP LaserJet 6P.

    Rponse : Le "figement" est normal pour irattach. Tout marche bien
     si vous voyez l'imprimante dans les logs. Le "figement" signifie
     que irattach est en attente de connexion entrante. Si vous le tuez
     avec un <CTRL C> irattach plante et /dev/ttySx ne marche plus du
     tout. Le problme est dans le module irda, et pas dans le programme
     irattach. La seule chose  faire est de rebooter ! La prochaine
     fois mettez irattach en tche de fond en utilisant irattach &.
     Stoppez le si ncessaire avec un killall irattach. Recommandation
     d'Andreas Butz : "D'aprs ce que je sais, <CTRL Z> devrait marcher
     aussi, mais je ne l'ai pas test dans ce cas prcis. Normalement,
     cela a exactement le mme effet que de rajouter un &  la commande.

    Q3 - Question : Je reois un message dans le style "tcsetattr
     read/write error" dans /var/log/messages.

    Rponse : Probablement caus par un mauvais /dev/ttyS*, une
     mauvaise interruption ou un mauvais port.

    Q4 - Question : tout semble marcher car j'ai les bons messages.
     Mais a ne marche toujours pas.

    Rponse : Placez les priphriques  une distance de moins de 0.5
     mtre (1.5 pied). Vrifiez qu'une seule application utilise le port
     infrarouge. Vrifiez que les deux interfaces utilisent le mme
     protocole comme IrOBEX ou IrCOMM.

    Q5 - Question : J'ai tlcharg la dernire version des pilotes, et
     a a trs bien compil sous Linux 2.0.33 sur mon IBM Thinkpad 560E.
     En l'absence d'autre machine IrDA pour le tester, est-ce qu'il est
     possible d'affirmer qu'une fois que le module a t insr et que
     syslog rapporte "irattach: Serial connection established.", que
     l'IR marche vraiment, et se mettra-t-il  rpondre quand il aura
     une autre machine pour discuter ?

    Rponse de Dag Brattli : Dsol, cela signifie juste que irattach a
     fait son boulot, qui est juste de dmarrer irda-tty. Peut tre que
     le message aurait du tre diffrent, mais comme je l'ai dit, il
     signifie que la connexion srie entre la puce irda et le pilote
     irda est tablie.


     Note : le support des noyaux 2.0 s'arrte. Vous tes vivement
     encourags  passer aux versions 2.2 et  utiliser les derniers
     patchs IrDA disponibles 
     http://www.cs.uit.no/~dagb/irda/snapshots/.


    Q6 - Question : Au dmarrage modprobe -a vrifie
     /lib/modules/<uname -r>/net/irda.o et donne le message : "IrLAP;
     Missing IrTTY /IrLMP Error no IrLAP connection" (dans
     /var/log/messages et sur la console).
    Rponse de Werner Heuser : Truc pour les systme style SYSTEM V :
     Mettez un script par exemple "ir_rmmod" contenant :



       #!/bin/sh
       echo "$0 : remove irda module"
       rmmod irport.o
       rmmod irtty.o
       rmmod irda.o





  dans le processus de dmarrage (/etc/init.d et un lien symbolique par
  exemple "S100ir_rmmod" dans /etc/rc3.d vers "ir_rmmod"). (Vrifiez le
  chemin vers "sh"). pour les systmes style BSD, essayez l'approche
  correspondante.



    Q7 - Question de Ho Chin Keong : Y a-t-il une autre manire de
     faire communiquer deux machines sans crer un rseau entre les
     deux ?

    Rponse de Dag Brattli : Oui et non ! L'un des standards IrDA,
     IrCOMM permet d'muler un cble srie entre deux machines, donc,
     vous pouvez utiliser n'importe quel programme crit pour les ports
     srie (terminaux, PPP, slip, etc.). Cela n'est, par ailleurs, pas
     encore implment dans Linux/IrDA. Le support IrLPT (imprimante)
     utilise un sous ensemble de IrCOMM, donc des morceaux
     fonctionnent !

    Q8 - Question de Ho Chin Keong : Si je bloque dlibrment le
     faisceau infrarouge pendant plus de 10 secondes, la connexion ne
     peut tre rtablie. Je dois tuer irattach et redmarrer toute la
     procdure pour crer la connexion infrarouge. La connexion peut
     toutefois tre maintenue, si la coupure dure moins de 10 secondes.
     Est ce que cela fait partie de l'implmentation, ou est-ce un bug ?
     Y a-t-il un moyen d'augmenter cette limite de 10 secondes  plus,
     voir mme  l'infini ?

    Rponse de Thomas Davis : Cela semble tre un bug dans la partie
     principale du code de IrLAP/IrLMP. Il semble que la notification de
     remise  zro/dconnexion ne remonte pas jusqu'en haut de la pile.
     On peut remarquer quand IrLPT se fige dans le mode query quand vous
     essayez de discuter avec une imprimante, et se
     dconnecte/interrompt quand il tablit la connexion. (et
     maintenant, cela arrive aussi dans la partie IrLAN)

    Q9 - Pierre-Guillaume Raverdy a demand : Dois-je mettre  jour mon
     Palm Pilot, et mettre le systme 3.0.2 ?

    Rponse de Dag Brattli : Il n'est pas ncessaire de mettre  jour
     votre Pilot, mais cela ne peut pas faire de mal. C'est par contre
     ncessaire si vous voulez utiliser la librairie IrCOMM de
     IsComplete.

    Q10 - Pierre-Guillaume Raverdy a demand : De plus, un exemple
     simple de code source (spcialement du cot du Palm Pilot) serait
     trs pratique.

    Rponse de Dag Brattli : Rcuprez le Pilot SDK de Palm.
     Dcompressez le fichier examples.zip et regardez le programme
     beamer.
    Q11 - Kai Poehlmann a crit : J'ai un tlphone GSM Ericsson SH 888
     et une machine Linux sans port irda. J'ai entendu dire qu'il tait
     possible de discuter avec le protocole IrDA du tlphone en
     utilisant un cble srie... :-/ Est-il maintenant possible
     d'utiliser ce tlphone avec Linux/IrDA et un cble srie ?

    Rponse de Matthias Lemke : Oui, c'est possible. J'ai essay il y a
     6 semaines. Mais j'ai eu le mme problme qu'avec juste l'IrDA. Je
     peux me connecter au tlphone, le remettre  zro avec ATZ, mais
     aprs ATDT, plus rien ne se passe, que ce soit avec ou sans le
     cble. Mais je pense que vous devriez ressayer avec la dernire
     version de Linux/IrDA.

    Q12 - Jonah Peskin a crit : Est ce que quelqu'un a russi 
     augmenter les capacits d'un metteur IrDA ? J'utilise un portable
     Dell Inspiron 7000, et il semble que son rayon d'mission soit
     d'environ 1 mtre. Je sais que cela rentre dans les spcifications
     de l'IrDA, mais y a-t-il des portables ou des priphriques qui
     permettent de faire plus d'un mtre ? Pourquoi ne pas prendre un
     cble d'un mtre ?

    Rponse de tzeruch@ceddec.com : Parce qu'une connexion manuelle (
     part le rceptacle pour le Palm) est difficile et prend du temps et
     cre souvent des problmes (accder  l'arrire de mon ordinateur
     de bureau ncessite quelques contorsions).


     Le problme principal est qu'il est ncessaire de rendre le
     rcepteur plus sensible. Dans les bases de la physique on apprend
     la loi du carr inverse : L'intensit diminue proportionnellement
     au carr de la distance, donc, passer d'un mtre  5 demande 25
     fois plus de puissance (et la surcharge courant sur un ordinateur
     portable), ou 25 fois plus sensible (et la distance dynamique - il
     doit toujours tre possible de recevoir  10 centimtres). Et si
     vous voulez le faire de l'autre ct, il ne doit pas tre
     simplement 25 fois plus sensible, il doit pouvoir discerner le
     faible faisceau infrarouge des nons, conomiseurs d'crans et
     autres ombres en mouvement...


     Quelqu'un a essay avec une mise  jour du Palm III :
     http://home.t-online.de/home/PSPilot/ppppiii.htm




  1133..  CCoonnttrrllee  ddiissttaannccee vviiaa iinnffrraarroouuggee


  1133..11..  RReessssoouurrcceess

  La prise de contrle  distance par infrarouge n'est pas le but du
  projet Linux/IrDA mais est incluse dans ce HowTo pour couvrir de
  manire exhaustive "Linux et l'infrarouge". J'ai trouv _t_r_o_i_s _p_r_o_j_e_t_s
  qui oeuvraient dans cette direction. Vous pouvez trouver des liens
  vers des informations plus rcentes  http://
  www.snafu.de/~wehe/index_li.html.


    LIRC LInux Remote Control

     LIRC est un paquetage qui supporte la rception et l'mission de
     signaux infrarouges des protocoles de contrle  distance IR les
     plus courants. Il contient un pilote pour les priphriques
     connects aux ports sries, un dmon qui dcode et encode les
     signaux IR en utilisant ce pilote, un dmon de souris qui traduit
     les signaux IR en mouvements de souris et quelques programmes
     utilisateurs qui vous permettent de contrler votre ordinateur avec
     une tlcommande. Takahide Higuchi a crit  propos de LIRC :
     "C'est gnial, et j'ai l'impression que c'est un projet trs
     complet, mais j'ai aussi l'impression que quasiment aucun des
     priphriques du march n'est support (vous aurez besoin d'un fer
      souder et de circuits spciaux... un peu dur pour le nophyte).
     Je suppose que LIRC deviendra plus populaire si le support
     infrarouge est implment dans les pilotes FastIR et qu'une API
     commune (par exemple un IrSocket brut et des ioctls communs) est
     disponible !". Vous trouverez LIRC  http://www.thp.uni-
     koeln.de/~rjkm/lirc/.


    Tlcommande infrarouge srie

     Voici un priphrique simple et bon march qui peut tre connect 
     tout port srie pour contrler presque tous les appareils qui
     possdent une tlcommande IR. Il a t conu et fabriqu sur une
     carte d'extension  sertir et est  prsent disponible sous forme
     d'une carte ISA. Vous trouverez de plus amples informations 
     http://www.armory.com/~spcecdt/remote/remote.html.


    Outils infrarouges pour le COREL Netwinder PC

     Ryan Shillington a crit quelques outils pour contrler le COREL
     NetWinder par infrarouge, par exemple :


     Serveur pour l'administration Corel Palm. Il ncessite simplement
     d'avoir le port infrarouge install et en tat de marche. Avec lui,
     vous pouvez changer l'adresse IP, l'adresse de la passerelle,
     configurer eth1, etc. Vous pouvez aussi lancer quelques commandes
     simples ET vrifier la temprature, mmoire, charge de la machine.


     Client pour l'administration Corel Palm. Vous pouvez aussi lancer
     quelques commandes simples ET vrifier la temprature, mmoire,
     charge de la machine.


     Un pilote IR trs simple. Il ne supporte pas IrDA (seulement des
     transferts non fiables). Il ne cherche que des signaux venant de
     tlcommandes (et claviers, etc.). Il bloque et passe les donnes
     d'une faon trs diffrente.


     Vous trouverez tout ceci  http://www.netwinder.org/~ryansh/





  1133..22..  CCoommmmaannddee aa ddiissttaannccee IIRR -- IIrrDDAA

  Deux des projets dcrits plus haut utilisent une sorte de dongle fait
   la main pour la commande  distance. Il y a aussi une description
  sur comment construire un dongle IrDA vous mme dans l'ELEKTOR
  allemand de mai 1997 p28. Peut tre que quelqu'un pourrait transformer
  ces dongles en un seul.

  Pour une discussion sur les relations entre les tlcommandes IR et
  IrDA, j'ai fait une compilation de la liste Linux/IrDA (raccourcie et
  modifie par wh) :

  Ryan Shillington a crit : "Les tlcommandes IR et ASK-IR sont trs
  diffrentes de FIR, MIR ou SIR.

  Les tlcommandes IR et ASK-IR ont des vitesses trs basses et des
  frquences trs basses (mais de longues portes). Elles oprent 
  environ 2400bps.

  SIR opre  des vitesses suprieures, et est vou  des transmissions
  longues portes o vous avez besoin que plus d'un ou deux caractres
  passent dans la liaison (pas comme les tlcommandes).

  MIR est lgrement plus rapide (mais a moins de porte), mais sa
  vitesse peut monter jusqu' 1.15Mbps et FIR (ou les priphriques
  doivent presque se toucher) a un dbit de 4Mbps. La porte est
  inversement proportionelle  la vitesse de transmission.

  Je travaille sur des pilotes pour les tlcommandes infrarouges, mais
  vous devriez dj le savoir si votre matriel IR le supporte. Cherchez
  des protocoles tels NEC, RC-5 ou RC-0 (ce sont les plus communs).

  Vous pouvez utiliser SIR pour recevoir des signaux de tlcommandes.
  Rglez bien votre dbit au plus bas et les donnes commenceront 
  affluer. MAIS d'aprs mon exprience, ce ne sont pas les BONNES
  donnes. Ce n'est pas analys de la bonne faon, et par consquent,
  vous ne pouvez ni calculer la somme de contrle ni la vrifier avec
  son complment.

  J'ai russi  rcuprer des donnes (en utilisant SIR) avec des
  tlcommandes. On m'a dit que SIR lisait les donnes venant d'une
  tlcommande diffremment en fonction de la temprature (malgr tout,
  je n'en ai jamais fait l'exprience)."

  Lichen Wang <lwang1@ix.netcom.com> a crit en rponse : "Le truc que
  l'on appelle ASKIR dans tant de portables n'est pas fait pour les
  tlcommandes infrarouges. ASKIR est fait pour le Sharp Wizard, les
  PDA Zauaus et quelques portables Sharp. Sharp avait cr cela bien
  avant l'arrive d'IrDA et le supporte toujours pour maintenir une
  compatibilit. Le Newton d'Apple avait aussi cette capacit l  un
  moment.

  Brivement, ASKIR utilise un format de transmission asynchrone  9.6
  Kbps (19.2 et 38.4 Kbps sont aussi possibles) avec 8 bits de donnes,
  1 bit d'arrt et une parit impaire. Le bit de dmarrage ainsi que
  tous les bits 0 sont transmis comme une onde carre de 500 KHz (sous
  porteuse DASK). Le bit "arrt" ainsi que tous les bits 1 sont
  reprsents par l'absence de transmission.

  Comme vous pouvez le constater, c'est totalement incompatible avec les
  tlcommandes IR.

  [..]

  Vrai. Non seulement il est possible d'utiliser le matriel SIR pour
  _r_e_c_e_v_o_i_r, mais vous pouvez aussi transmettre. Bien entendu, il y a
  quelques limitations.

  La majorit des tlcommandes utilisent une sous porteuse  38KHz. 3
  fois 38 a fait 114, trs proche de 115.2. Il est donc possible de
  rgler l'UART pour oprer  115.2 Kbps, 7 bits de donnes, 1 bit
  d'arrt et pas de parit - soit 9 bits. Tous les 3 cycles de la sous
  porteuse  38 KHz peuvent tre _r_e__u_s ou __m_i_s en tant qu'un octet Ox5B.

  Il y a quelques limitations physiques en plus du fait que la sous
  porteuse doive tre de 38KHz. Le _r__c_e_p_t_e_u_r SIR n'est pas aussi
  sensible au 38KHz que la tlcommande. Le _t_r_a_n_s_m_e_t_t_e_u_r SIR a un cycle
  d'utilisation beaucoup plus faible, et par consquent, ne peut mettre
  une trop forte sous porteuse.

  La tlcommande encode le signal de contrle en ajoutant un patron
  spcifique  la sous porteuse. Maintenant que vous pouvez __m_e_t_t_r_e et
  _r_e_c_e_v_o_i_r la sous porteuse, tout ce qu'il reste  faire, c'est de tout
  synchroniser.

  Pour __m_e_t_t_r_e, il est ncessaire de savoir combien d'octets de 0x5B
  conscutifs il sera ncessaire d'envoyer pour chaque coup de sous
  porteuse, et combien de temps rester silencieux pendant les missions.

  Pour _r_e_c_e_v_o_i_r, il sera ncessaire de savoir combien d'octets 0x5B vous
  recevez conscutivement, et quelle est la dure entre les trous
  d'octets conscutifs.

  [..]

  Mon exprience avec les distances de transmissions IrDA de SIR, MIR et
  FIR sont lgrement diffrentes de ce que Ryan a dit.

  [..]

  SIR, MIR et FIR devraient toujours marcher de 0  100 cm, mais dans la
  pratique :

  (a) Certains priphriques ont des problmes avec les _L_O_N_G_U_E_S
  distances.

  Lorsque cela est possible, placez les priphriques  moins de 50 cm
  l'un de l'autre. Les priphriques ayant peu de puissance, comme les
  pagers et les tlphones cellulaires, etc. auront peut tre des
  distances encore plus petites bien qu'ils utilisent SIR  la place de
  MIR ou FIR.

  (b) Certains priphriques ont des problmes avec les _C_O_U_R_T_E_S
  distances.

  Placez les deux priphriques  au moins quelques centimtres l'un de
  l'autre. Les mettre plus prs peut causer des problmes.

  Il est un peu intuitif de rapprocher les deux priphriques lorsque la
  connexion n'est pas bien stable. Mais cela va  l'encontre de toute
  intuition que trop prs n'est pas bon non plus. La raison est que
  l'intensit lumineuse  1 cm est 10 000 fois plus forte qu' 100 cm. A
  0.5 cm, 40 000 fois, etc. Les constructeurs de rcepteur IR ont du mal
   grer cette distance dynamique. Nous avons tous du mal  lire avec
  une lampe de 10 W, imaginez comment a serait avec une lampe de
  100 000 W !

  [..]

  La couche physique IrDA est totalement incompatible avec la modulation
  DASK utilise dans les tlcommandes IR. Par consquent, il n'est pas
  possible d'utiliser la mme fonction de contrle avec FIR et les
  tlcommandes. Toutefois, presque tous les contrleurs FIR incluent
  des fonctions additionnelles pour supporter les tlcommandes IR.
  National, SMC, et Winbond (pour ne citer que ceux l) ont tous de
  telles puces.

  Les transmetteurs IR pour FIR et les tlcommandes sont trs
  semblables. J'ai essay avec un transmetteur FIR standard. Il est
  capable d'atteindre 10 mtres dans un but de tlcommande. Par
  consquent, il est aussi performant que les transmetteurs inclus dans
  les tlcommandes.


  Les rcepteurs IR pour FIR et les tlcommandes sont par contre assez
  diffrents. Un rcepteur FIR peut recevoir un signal de tlcommande,
  mais ceci seulement  1 mtre alors que les rcepteurs intgrs dans
  les tlcommandes atteignent 10 mtres.

  J'ai un adaptateur ISA avec une puce National qui supporte aussi bien
  FIR que les tlcommandes. J'ai aussi des dongles IR qui incluent les
  deux types de rcepteurs (ainsi qu'un transmetteur pour les deux
  modes). Je n'ai pour l'instant trouv aucun logiciel supportant les
  fonctions de tlcommandes. J'ai fait mes propres expriences sous DOS
  (je ne peux pas encore installer Linux). Quelqu'un est intress ? "

  Benny Amorsen a crit : "J'ai un portable qui est suppos supporter
  ASKIR. Le mode du port infrarouge peut tre chang en ASKIR dans le
  BIOS. Avoir  rebooter pour changer le mode dans le BIOS le rend
  inutile, donc, quelqu'un pourrait essayer de trouver un moyen de le
  changer  la vole. "

  Dag Brattli a crit : "Il devrait tre possible d'utiliser IrControl
  (auparavant IrBus) pour utiliser les tlcommandes compatibles IrDA.
  Je ne connais aucune tlcommande utilisant le standard IrControl,
  mais il devrait en exister quelques unes (quelqu'un en sait plus ?).
  Vous devriez aller jeter un coup d'oeil au site IrDA
  (http://www.irda.org) et rcuprer le standard de la couche physique
  (qui inclue IrControl je pense).

  IrDA "Normal" (en utilisant IrLAP) n'est ppaass une bonne chose pour
  l'utilisation avec les tlcommandes  cause de la trop grande
  diffrence de nature (et il ne supporte que le 9600 bps pour les
  travaux hors connexions). La raison de cette limite de porte est la
  protection des yeux qu'ils disent (mais je ne sais pas pourquoi CIR
  marche mieux en utilisant la mme puissance). J'ai par ailleurs vu des
  portables connects avec 4  5 mtres entre eux (mais je ne pense pas
  qu'une grande vitesse de connexion soit possible).

  La majorit des chipset IrDA marchent en mode CIR, et il est assez
  facile de modifier les pilotes pour qu'ils parlent CIR. Takahide
  Higuchi a commenc  regarder IrSockets et il serait assez bien si il
  tait possible d'ouvrir une socket Ir(DA) brute qui permettrait
  d'envoyer et de recevoir des paquets CIR. Ensuite, toutes les
  applications CIR pourraient rester dans l'espace utilisateur.

  Je sais que CIR intresse Corel dans le but de contrler le NetWinder
  (et ils ont en ce moment du code qui marche). Allez jeter un coup
  d'oeil  http://www.slashdot.org/articles/98/12/05/0916216.shtml ou
  http://www.netwinder.org/~ryansh.


  1144..  IInnffrraarroouuggee eett pprrootteeccttiioonn ddeess yyeeuuxx..

  Cette section reprend quelques ides et penses qui ont t changes
  sur la liste Linux/IrDA. Rien ici n'est fond sur des connaissances
  mdicales, par consquent toute personne qui aurait des informations
  plus compltes et plus sures est encourage  contribuer  ce HowTo.


  Les spcifications d'IrDA disent que la porte des priphriques IrDA
  a t limite  1 mtre dans le but de protger les yeux des
  utilisateurs. Une autre explication possible serait que la
  consommation ainsi que la pollution IR soient aussi la cause de cette
  limitation. En principe, il devrait y avoir un danger pour l'oeil, car
  les IR ne sont pas dtects par l'oeil, et donc, la pupille ne se
  ferme pas pour protger la rtine des sources IR fortes. C'est la mme
  situation avec les UV, qui causent un aveuglement nbuleux, mais
  contrairement aux UV, les IR contiennent beaucoup moins de puissance
  destructrice  cause de leurs longueurs d'ondes plus grandes.
  Les seuls restrictions lgales et conseils mdicaux que nous ayons pu
  trouver sur le web taient les missions infrarouges des lampes 
  bronzer ou dans les processus de soudage. Cela suggre que la lumire
  IR mise par les priphriques IrDA serait sans aucun danger, vu que
  mme le pic de puissance des plus puissantes LED IR est d'environ
  300mW, ce qui n'est rien compar aux lampes a chauffer  usage mdical
  qui peuvent monter jusqu' 500W. Pour celles ci, il est ncessaire de
  porter des lunettes protectrices, alors, il se peut que regarder en
  face 1 000 LED IR en une seule fois ait le mme effet. Les effets de
  la lumire IR sont majoritairement la chaleur, pas une altration ou
  une destruction des structures cellulaires comme le font les UV.
  Toutefois, dans les spcifications du HP OmniBook 800, Hewlett-Packard
  recommande de ne pas regarder directement dans les LED IR.


  Comme je l'ai dit plus haut, cette discussion n'est base que sur des
  prsomptions et des dductions faites sur les donnes trouves dans
  les spcifications des LED IR et des lampes chauffantes. Si quelqu'un
  a des connaissances mdicales  partager, faites le !!!


  1155..  CCrrddiittss

  Merci   :



    Dag Brattli - au coeur de Linux/IrDA

    Thomas Davis - au coeur de Linux/IrDA

    Takahide Higuchi - au coeur de Linux/IrDA

    Ralf Zabka

    Benny Amorsen

    Lichen Wang

    Ryan Shillington

    Richard Titmuss

    Fons Botman

    Rui Oliveira

    Jon Howell

    Carlos Vidal

    Joonas Lehtinen

    Markus Schill

    Bjoern Hansson

    Pawel Machek

    Ho Chin Keong

    Bjoern Mork

    Andreas Butz


    Tang Ning

    Les membres de la liste Linux/IrDA.

    Les crivains d'autres HowTo qui m'ont donn tout plein
     d'inspiration.

    Les dveloppeurs des SGML-Tools qui m'ont permis d'crire ce HowTo.

  Dsol, je n'ai pas commenc  faire les crdits quand j'ai dmarr ce
  HowTo, j'ai certainement oubli quelqu'un.


  1166..  HHiissttoorriiqquuee ddeess vveerrssiioonnss


    v0.1  v0.4a, 19 mars 1998 au 4 aot 1998, brouillons, non inclus
     dans le LDP.

    v1.0, 14 aot 1998, ajout au LDP.

    v1.1, 18 aot 1998, ajout des informations  propos du patch IrCOMM
     de Takahide Higuchi, changements mineurs.

    v1.2, 24 aot 1998, mise  jour pour les pilotes linux-
     irda-1998-08-20, ajout de la section FIR et de cette section,
     changements mineurs.

    v1.3, 27 septembre 1998, ajout des sections sur les instances
     multiples, tlphones cellulaires, appareils photo numriques,
     connexion Linux  Linux, le superbe CVS, conomie d'nergie,
     quelques changements dans la configuration systme gnrale,
     changements dans l'aperu du matriel, changements mineurs.

    v1.4, 11 octobre 1998, meilleure description du support IrCOMM,
     changement de la section sur les dongles, changements dans la
     section Palm III, changements mineurs.

    v1.5, 12 octobre 1998, changements mineurs.

    v1.6, 26 octobre 1998, ajout de la section  propos de IrManager,
     mis  jour pour les pilotes linux-irda-1998-10-21, changements dans
     la section dongle, changements mineurs.

    v1.7, 1 novembre 1998, ajout de la section contrle  distance,
     changements dans la section dongles, changements mineurs.

    v2.0, 9 janvier 1999, rcriture quasi complte et un rarrangement
     en accord avec la nouvelle structure de Linux/Ir qui est maintenant
     inclus dans le noyau depuis la version 2.1.131, ajout des
     informations  propos du support BIOS dans la section dongle, ajout
     de la section outils de configuration et suppressions de la section
     CVS.

    v2.1, 13 janvier 1999, changements mineurs.

    v2.2, 26 janvier 1999, changement du nom du projet de Linux/IR en
     Linux/IrDA, extension de la section rsolution des problmes,
     changement dans l'ordre du chapitre des bugs connus, suppression de
     quelques coquilles.

    v2.3, 4 fvrier 1999, ajout de la section Infrarouge et protection
     des yeux crite par Andreas Butz, correcteur d'orthographe...,
     remaniements dans la section paramtrage du noyau, ajout de
     quelques informations par Andreas Butz, changements mineurs.

    v2.4, 9 fvrier 1999, changement des informations sur comment
     appliquer un patch.



  1177..  CCooppyyrriigghhtt eett ddnnggaattiioonn

  Copyright  1998, 1999 par Werner Heuser (et  1999 par Mathieu Arnold
  pour la traduction franaise). Ce document peut tre distribu sous
  les termes de la licence du LDP 
  http://metalab.unc.edu/LDP/COPYRIGHT.html.

  Les informations contenues dans ce document sont exactes d'aprs ce
  que je sais, mais il y a toujours une chance pour que j'aie commis
  quelques erreurs, donc, ne suivez pas toutes les manipulations trop
  aveuglment, spcialement si cela vous semble faux. Rien ici ne
  devrait pouvoir causer de dommages  votre ordinateur, mais juste au
  cas o, les auteurs ne sont responsables d'aucun dommage encouru du
  fait d'actions effectues en se basant sur les informations comprises
  dans ce document.














































  ISP-Hookup-HOWTO
  Par Egil Kvaleberg, egilk@sn.no.
  v1.26, 5 Mars 1998

  Ce document dcrit la faon d'utiliser Linux pour se connecter  un
  fournisseur d'accs Internet au moyen d'une connexion TCP/IP par
  modem.  Il explique la procdure d'appel tlphonique et d'tablisse
  ment du protocole IP, ainsi que la faon de grer le courrier lec
  tronique et les forums de discussion USENET.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Copyright
     1.2 Limites de responsabilit
     1.3 Traductions
     1.4 Nouvelles versions de ce document
     1.5 Critiques

  2. Comment se connecter au reste du monde ?

     2.1 La configuration de base

  3. Comment

  4. Comment envoyer et recevoir du

  5. Les News

     5.1 Comment configurer un lecteur de News online ?
     5.2 Comment configurer un lecteur de News offline ?
     5.3 Comment installer C News?
     5.4 Comment configurer Leafnode?

  6. Comment automatiser la procdure de connexion ?

  7. Pour finir

     7.1 Y a t'il d'autres choses que je devrais savoir ?

  8. Informations spcifiques aux F.A.I.

     8.1 Comment en savoir plus ?
     8.2 Remerciements


  ______________________________________________________________________


  11..  IInnttrroodduuccttiioonn

  Ce document est fait pour rpondre aux questions des clients des
  F.A.I.  (Fournisseurs d'Accs Internet) concernant la faon de
  configurer et d'utiliser Linux.

  Afin d'aider ceux qui veulent connecter leurs machines Linux  un
  F.A.I. pour la premire fois, ce document essaie de couvrir la plupart
  des situations possibles. Ceci provoque, invitablement, plusieurs
  recoupements avec les autres HowTo Linux et livres du Linux
  Development Project (L.D.P.).  Pour mieux apprhender les dtails, il
  est conseill de se rfrer  ces documents.


  La plupart des documentations existantes s'adressent  des
  utilisateurs ayant une certaine exprience, et les utilisateurs
  dbutants ont souvent des problmes pour en extraire les informations
  intressantes.

  Pour simplifier, les exemples de ce document supposeront ce qui suit :



    Nom d'utilisateur : dirk

    Mot de passe: SuperSecret

    Fournisseur d'accs Internet : acme.xz

    Serveur de mail : mail.acme.xz

    Serveur de news : news.acme.xz

    Serveur de noms : 193.212.1.0

    Numro de tlphone : 12345678

  La machine de dirk s'appelle roderick.

  Toutes les informations ci-dessus doivent naturellement tre
  remplaces par celles concernant le F.A.I. que vous utilisez. La
  plupart du temps, un minimum de modifications doivent tre apportes
  pour les utilisateurs ayant plusieurs F.A.I. Informez-moi des
  problmes que vous rencontrez sur ce point.


  11..11..  CCooppyyrriigghhtt

  Copyright (c) 1996,1997,1998 par Egil Kvaleberg. Ce document peut tre
  distribu sous les termes de la licence LDP disponible 

  http://sunsite.unc.edu/LDP/COPYRIGHT.html


  11..22..  LLiimmiitteess ddee rreessppoonnssaabbiilliitt

   Aucune responsabilit quant au contenu de ces documents ne peut tre
  accepte. Vous utilisez les concepts, exemples et autres contenus 
  vos propres risques.

  L'une des nombreuses configurations possibles sera dcrite. Dans le
  monde Linux, il y a gnralement plusieurs faons de faire les choses.
  Les paragraphes contenant des conseils sont reprs par AALLTT :: Notez
  aussi que les rfrences FTP changent souvent lgrement
  lorsqu'apparaissent de nouvelles versions des programmes.

  Pour autant que je sache, seuls seront dcrits les programmes qui
  peuvent tre utiliss ou valus dans un but personnel. La plupart de
  ces programmes seront disponibles avec leurs sources sous une licence
  GNU-like.


  11..33..  TTrraadduuccttiioonnss

  Ce document a t traduit dans les langues suivantes :

  Allemand, par Cristoph Seibert :

  http://tech.appl-opt.physik.uni-essen.de/LinuX/german-howto/DE-ISP-
  Verbindung-HOWTO.html
  Coren, par Kidong Lee :

  http://www.postech.ac.kr/~cessi/howto/ISP-Hookup/ISP-Hookup-HOWTO.html

  Franais, par ric Jacoboni :

  http://www.minet.net/linux/HOWTO-fr/ISP-Hookup-HOWTO.html

  Polonais, par Piotr Pogorzelski : UURRLL TTBBAA

  Norgien :

  http://www.kvaleberg.com/no-linux.html


  11..44..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document seront rgulirement postes
  dans _c_o_m_p_._o_s_._l_i_n_u_x_._a_n_s_w_e_r_s.  Elles seront aussi mises sur les
  diffrents sites FTP qui archivent le L.D.P. Parmi ceux-ci :

  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO

  De plus, vous pourrez gnralement trouver ce document sur la page du
  Linux Development Project WWW  :

  http://sunsite.unc.edu/LDP/

  La dernire version de ce document sera disponible sous divers formats
   :

  ftp://ftp.sol.no/user/egilk/ISP-Hookup-HOWTO.txt

  ftp://ftp.sol.no/user/egilk/ISP-Hookup-HOWTO.ps.gz

  ftp://ftp.sol.no/user/egilk/ISP-Hookup-HOWTO.tar.gz

  http://www.kvaleberg.com/ISP-Hookup-HOWTO.html


  11..55..  CCrriittiiqquueess

  Tous commentaires, erreurs constates, informations supplmentaires et
  critiques de toutes sortes doivent tre envoyes  :

  egil@kvaleberg.no

  http://www.kvaleberg.com/

  Tous commentaires concernant la traduction, les ventuelles fautes
  commises par le traducteur doivent tre envoyes  :

  jaco@mail.dotcom.fr



  22..  CCoommmmeenntt ssee ccoonnnneecctteerr aauu rreessttee dduu mmoonnddee ??

  Je suppose que les composants logiciels rseau essentiels de votre
  distribution Linux ont t installs, et qu'il a t dcid quel sera
  le port srie utilis par

  En gnral, la configuration par dfaut permet uniquement un accs
  direct  /dev/modem sous le compte root.


  Pour se connecter directement  un F.A.I, et pour exprimenter les
  squences de connexion, on peut utiliser le programme minicom,
  relativement simple  utiliser.


  22..11..  LLaa ccoonnffiigguurraattiioonn ddee bbaassee

  La configuration de la machine pour son utilisation sur le rseau doit
  se faire sous le compte root.  Avant d'aller plus loin, il faut
  vrifier que le fichier ligne suivante :




       ALL: ALL





  Normalement, on veut s'autoriser soi-mme, il faut donc ajouter la
  ligne suivante au fichier /etc/hosts.allow :




       ALL: LOCAL





  Ou, si on veut insister :



        ALL: 127.0.0.1




  Pour tout ce qui suit, on suppose des connexions via PPP au moyen
  d'une adresse IP dynamique.  Si on fait partie des privilgis ayant
  une adresse fixe, il y aura quelques diffrences  prendre en compte.


  Il est pratique d'avoir un nom pour sa machine, un nom que
  l'utilisateur IP peut choisir comme il, ou elle, le dsire.  Pour
  cela, il faut mettre ce nom dans



       roderick




  L'tape suivante consiste  dclarer le serveur de noms dans



       search .
       nameserver 193.212.1.0



  Le serveur de noms soit tre spcifi par une adresse IP numrique qui
  dpend du F.A.I. On peut avoir jusqu' trois serveurs de noms
  diffrents, chacun sur une ligne diffrente, ils seront appels dans
  l'ordre o ils sont lists.

  Si l'on veut pouvoir utiliser des noms comme unemachine pour rsumer
  le nom complet unemachine.acme.xz, on doit remplacer la premire ligne
  par :



       search acme.xz





  Un minimum de configuration sera aussi ncessaire dans /etc/hosts. La
  plupart des utilisateurs seront ainsi capable de grer :



       127.0.0.1      localhost
       0.0.0.0        roderick




  Ceux possdant une adresse IP fixe remplaceront videmment 0.0.0.0 par
  celle-ci...

  De plus, le minimum que doit contenir le fichier /etc/networks est :



       loopback        127.0.0.0
       localnet         0.0.0.0





  On doit aussi configurer son domaine de courrier lectronique dans


       acme.xz




  Le nom d'utilisateur et le mot de passe ncessaires pour se connecter
  au F.A.I. doivent tre spcifis dans /etc/ppp/pap-secrets



       dirk * SuperSecret




  Dans le cas o le F.A.I. utilise CHAP au lieu de PAP, le nom de
  fichier est /etc/ppp/chap-secrets.

  Enfin, les points fondamentaux concernant la procdure de connexion
  elle-mme doivent tre prciss avant que PPP soit dmarr. Ceci est
  fait dans
       TIMEOUT 5
       "" ATZ
       OK ATDT12345678
       ABORT "NO CARRIER"
       ABORT BUSY
       ABORT "NO DIALTONE"
       ABORT WAITING
       TIMEOUT 45
       CONNECT ""
       TIMEOUT 5
       "name:" ppp





  Ces lignes peuvent tre peaufines pour les cas particuliers. Le
  numro de tlphone dans la troisime ligne doit, bien sr, tre celui
  du fournisseur d'accs. Certains peuvent remplacer la chane
  d'initialisation ATZ du modem par une autre, plus adapte au modem
  qu'ils utilisent. La dernire ligne spcifie que l'on attend un prompt
  se terminant par name:, et que la rponse doit tre ppp. D'autres
  systmes peuvent avoir d'autres procdures de connexion.

  Pour rellement lancer une connexion, le protocole PPP peut tre
  initialis en lanant la commande suivante :



       exec pppd connect \
            'chat -v -f /etc/ppp/chatscript' \
             -detach crtscts modem defaultroute \
             user dirk \
             /dev/modem 38400





  Normalement, on doit tre en ligne, et le rester jusqu' ce que le
  programme soit dtruit en tapant ctrl-C.  concernant la connexion
  seront ajouts aux fichiers diagnostics du systme.  Pour les lire, il
  suffit de faire :



       tail /var/adm/messages






       dmesg





  Aussi longtemps que la connexion PPP fonctionne, on a accs  Internet
  et on peut utiliser des programmes comme ftp, ncftp, rlogin, telnet,
  finger etc.  Tous ces programmes font partie du paquetage rseau.

  De plus amples informations sur  PPP sont disponibles dans :


  /usr/lib/ppp/README.linux

  /usr/lib/ppp/README.linux-chat

  Enfin, un mot sur la scurit. Le fichier /etc/inetd.conf numre tous
  les services que notre machine offrira au monde extrieur. Avec le
  fichier /etc/hosts.deny que l'on a cr plus haut, aucun accs
  extrieur n'est permis. Pour ceux qui en ont besoin, les accs doivent
  tre explicitement permis au moyen du fichier /etc/hosts.allow. Les
  transactions locales peuvent tre permises par la ligne suivante :



       ALL: LOCAL




  Voir aussi man 5 hosts_access.

  Une dernire remarque mineure : une certaine confusion existe sur les
  noms des protocoles POP. Une dfinition dans le fichier prs tout
  est :



       pop2      109/tcp   pop-2          # PostOffice V.2
       pop3      110/tcp   pop-3 pop      # PostOffice V.3




  AALLTT :: A la place de on peut utiliser le programme souple : mais pas en
  mme temps que

  AALLTT :: Les privilgis ayant une connexion TCP/IP permanente, par
  exemple par un rseau Ethernet, peuvent sans problme tout ignorer sur
  PPP et se concentrer sur la configuration de leur carte rseau.

  AALLTT :: Certains peuvent ne pas avoir la possibilit d'utiliser PPP,
  mais peuvent utiliser SLIP  la place. Ce dernier protocole est
  support de la mme faon que PPP. Une autre possibilit est
  d'utiliser UUCP. D'autres peuvent changer du courrier et des news au
  moyen de SOUP. Une description de ce dernier cas est donn dans :

  ftp://ftp.sol.no/user/bjorn/Linux-offline.tgz

  Le programme TERM est aussi envisageable. Pour l'utiliser, voir _T_e_r_m_-
  _H_O_W_T_O.


  33..  CCoommmmeenntt ssuurrffeerr  ??

  Si l'on considre que le mode texte est ce qu'il y a de mieux, on peut
  utiliser le navigateur web Lynx, que l'on trouvera  l'adresse
  suivante :

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-
  systems/lynx-2.3.bin2.tar.gz

  Si on travaille sous X Window, on peut aussi utiliser l'un des
  nombreux navigateurs graphiques. Chimera se trouve  l'adresse
  suivante :

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-
  systems/chimera-1.65.bin.ELF.tar.gz
  http://www.unlv.edu/chimera/

  Mosaic :

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-
  systems/Mosaic-2.7b1-aout.tgz

  ftp://ftp.NCSA.uiuc.edu/Web/Mosaic/Unix/binaries/2.6

  Netscape (aka. Mozilla) :

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-systems/netscape-
  v11b3.tar.gz

  ftp://ftp.cs.uit.no/pub/www/netscape

  Ces navigateurs sont toujours disponibles dans de nouvelles et
  _p_a_s_s_i_o_n_n_a_n_t_e_s versions.

  L'utilisation et l'valuation de ces programmes sont sujets 
  certaines conditions. Respectez-les.


  44..  CCoommmmeenntt eennvvooyyeerr eett rreecceevvooiirr dduuccoouurrrriieerr lleeccttrroonniiqquuee ??

  D'abord, il faut s'assurer que install.  Sendmail trie le courrier
  interne et  destination de l'extrieur et conserve ce dernier
  jusqu'au moment o il peut l'envoyer.

  Sendmail est bas sur une configuration que l'on trouve dans convenant
  aux utilisateurs de F.A.I. se trouve dans :

  ftp://ftp.sol.no/user/egilk/sendmail.cf

  Celui-ci utilise postal mais peut tre facilement modifi pour
  utiliser deliver.

  Il est, bien sr, ncessaire d'avoir une adresse de domaine ooffffiicciieellllee
  pour le courrier extrieur. Cette information est donne dans



       # who I masquerade as (null for no masquerading)
       DMacme.xz





  Ceci suppose que l'on ait le mme nom d'utilisateur local que pour son
  F.A.I. S'il est diffrent, prcisez le nom complet  la place :



       DMdick@acme.xz




  Sendmail est maintenant configur pour envoyer ddiirreecctteemmeenntt au
  destinataire. Pour viter de longues connexions rptitives dans les
  cas o la connexion du destinataire est lente et irrgulire, il est
  gnralement pratique d'utiliser un F.A.I. comme moyen de stockage.
  Ceci doit tre prcis par une spcification DS :


       # "Smart" relay host (may be null)
       DSmail.acme.xz




  Attention : sendmail est quelque peu sensible  la prsence de
  caractres de tabulation dans utiliser l'diteur caractres de
  tabulation sont laisss inchangs.

  La rception de courrier est souvent ralise par le protocole POP3
  qui peut tre dmarr  chaque fois que la connexion est tablie. On
  peut tester a par le script suivant :



       sendmail -q
       popclient -3 -v mail.acme.xz -u dirk -p "SuperSecret" \
              -k -o /usr/spool/mail/dirk





  Ce script peut tre lanc aprs que la connexion PPP ait t tablie.
  Attention : ce script est uniquement pour tester, il faut donc
  s'assurer que la bote  lettres locale n'est pas modifie pendant
  l'excution du script. L'option -k indique que le courrier doit tre
  llaaiissss dans la botre  lettre du F.A.I. et que l'on rcupre
  seulement une copie du courrier. Bien sr, une fois que l'on sait que
  la configuration fonctionne, on enlve cette option.

  Attention : le mot de passe apparatra sur la ligne de commande. Notez
  aussi que popclient est obsolte et que vous devriez utiliser

  Une version plus scurise et amliore de ce script peut tre
  rcupre  l'adresse suivante :

  ftp://ftp.sol.no/user/egilk/pop-script.tar.gz

  Cette version du script ncessite l'installation de procmail, mais
  c'est un travail que l'on ne regrettera jamais de toutes faons. La
  plupart des distributions l'incluent, sinon, vous pouvez essayer :

  ftp://sunsite.unc.edu/pub/Linux/system/Mail/mailhandlers/procmail-3.10-2.tar.gz

  Procmail est un outil simple et souple qui peut trier le courrier
  entrant selon un grand nombre de critres. Il est aussi capable de
  grer des tches automatiques comme les messages d'absences et autres.

  Il faut noter que lorsqu'on utilise procmail directement comme ci-
  dessus, la situation est quelque peu diffrente de celle dcrite dans
  la documentation de ce programme. Le fichier .forward nn''eesstt ppaass
  ncessaire, et l'on n'a pas besoin non plus de fichier .procmailrc. Ce
  dernier est uniquement requis si on veut trier le courrier.

  Une interface utilisateur pour la lecture et l'envoi de courrier peut
  tre trouve dans des programmes comme pine ou

  AALLTT :: Fetchmail est maintenant une alternative trs amliore de
  popclient. La dernire version est disponible  :

  ftp://ftp.ccil.org/pub/esr/fetchmail/fetchmail-3.3.tar.gz

  AALLTT :: S'il n'est pas rellement ncessaire d'avoir le dmon sendmail
  activ, on peut mettre en commentaires le dmarrage de sendmail, comme
  cela est gnralement fait dans /etc/rc.d/rc.M (ceci peut varier selon
  les distributions) afin de rduire l'utilisation des ressources et
  d'autres problmes potentiels.

  AALLTT :: A la place de sendmail on peut utiliser le programme description
  de celui-ci (et de bien d'autres choses voques ici) dans le _G_u_i_d_e _d_e
  _l_'_a_d_m_i_n_i_s_t_r_a_t_i_o_n _r__s_e_a_u _s_o_u_s _L_i_n_u_x.

  AALLTT :: Il existe aussi un ensemble de macros m4 pour raliser un
  convenir  une simple installation aussi bien que pour modifier une
  configuration existante.

  AALLTT :: Il y a encore d'autres possibilits plus simples mais moins
  souples pour grer le courrier. Par exemple, le programme Pine peut
  fonctionner de manire autonome s'il est configur correctement. On
  peut aussi utiliser certains explorateurs Web.

  AALLTT :: Utilis comme gestionnaire de courrier et de news, le module
  Gnus d'Emacs a de nombreux fans. De plus amples informations se
  trouvent  :

  http://www.ifi.uio.no/~larsi/

  AALLTT :: Une alternative  popclient est pop-perl5, disponible  :

  ftp://sunsite.unc.edu/pub/Linux/System/Mail/pop-perl5-1.1.tar.gz


  55..  LLeess NNeewwss

  55..11..  CCoommmmeenntt ccoonnffiigguurreerr uunn lleecctteeuurr ddee NNeewwss oonnlliinnee ??

  news oonnlliinnee.  Il y a beaucoup de programmes disponibles pour cela,
  deux possibilits simples tant

  Pour commencer  lire les news, la seule chose ncessaire pour la
  configuration est, dans la plupart des cas, de configurer NNTPSERVER
  (gnralement une fois pour toutes dans le fichier .profile) :




       export NNTPSERVER=news.acme.xz




  Pour avoir une adresse _F_r_o_m correcte dans les envois, certains
  programmes ncessitent __v_e_n_t_u_e_l_l_e_m_e_n_t :




       export NNTP_INEWS_DOMAIN=acme.xz






  55..22..  CCoommmmeenntt ccoonnffiigguurreerr uunn lleecctteeuurr ddee NNeewwss oofffflliinnee ??

  offline, rduire la note de tlphone et avoir une plus grande
  souplesse, on peut mettre en place un serveur local de News. Ceci
  ncessite un peu de configuration ainsi que de l'espace sur le disque.
  Aprs l'installation, les choses fonctionneront plus ou moins d'elles-
  mmes. Un peu d'attention sera ncessaire de temps en temps.

  Deux solutions diffrentes seront dcrites.


  55..33..  CCoommmmeenntt iinnssttaalllleerr CC NNeewwss??

  Cette solution est base sur le serveur de News CC NNeewwss et sur le
  protocole NNTP.  C News tait prvu,  l'origine, pour un autre type
  de configuration, mais est suffisamment souple pour grer aussi notre
  situation. On peut aussi utiliser le serveur de News IINNNN plus rcent
  mais aussi plus gourmand en ressources. Quel que soit le choix, il
  faut veiller a nnee ppaass installer les deux : ils cohabitent
  difficilement.

  Il est crucial d'effectuer les travaux de maintenance des News sous le
  compte news. De plus, tous les fichiers de configuration doivent tre
  placs dans le rpertoire /usr/lib/news. Une faon de faire, lorsqu'on
  est sous le compte root, est de taper su news; cd.

  Les fichiers les plus importants de la configuration sont :



     news actifs. Il est mis  jour par la commande addgroup, par
     exemple : addgroup comp.os.linux.networking y.

     ce que l'on veut mettre dans le champ _O_r_g_a_n_i_z_a_t_i_o_n_: des en-ttes.
     Dans notre cas :



       Dirk Gently's Holistic Detective Agency






     contenir : acme.xz.

     site dans le thread Path:.  Dans une configuration telle qu'elle
     est dcrite ici, o l'on utilise le programme newsx, ce nom ne
     quittera jamais la machine, on peut donc y mettre ce que l'on veut
     pourvu que l'on soit sr qu'il est unique. Dans notre cas roderick.

    Le fichier distribution des News. On supposera que, dans notre cas,
     le F.A.I. ajoute acme.xz  Path et que c'est la seule source de
     News que l'on ait. L'exemple donn fait que l'on accepte tout ce
     qui arrive, et que l'on poste seulement sur acme.xz ce qui n'a pas
     t vu avant et qui est post au dpart sur notre propre site.
     Dans cette configuration simplifie, on suppose que tous les
     groupes viennent du mme endroit.  ./all prcise la distribution,
     et ddooiitt tre inclus.  La lettre F indique que les articles de news
     sortants seront regroups dans un fichier.



       ME:all/all::
       acme/acme.xz:all,!junk/all:FL:






    Un sous-rpertoire pour les News sortantes doit tre cr. Ici :



       mkdir /var/spool/news/out.going/acme






     les groupes modrs, bien que cette tche puisse tre
     habituellement laisse au F.A.I.

  C News ncessite un peu de maintenance journalire, mais ceci peut
  tre spcifi une fois pour toute en utilisant la commande crontab -e
  configuration possible qui peut tre ajuste selon les besoins :




       # maintenance des lots entrants et sortants
       10,40 * * * * /usr/lib/newsbin/input/newsrun

       # expiration des C News, une fois par jour
       30 0  * * * /usr/lib/newsbin/expire/doexpire

       # surveillance et rapports si ncessaire
       00 2  * * sat /usr/lib/newsbin/maint/addmissing
       40 3  * * * /usr/lib/newsbin/maint/newswatch
       50 3  * * * /usr/lib/newsbin/maint/newsdaily




  sortants toutes les demi-heures, les articles lorsqu'ils sont prims
  chaque nuit  00:30 et les trois dernires commandes ralisent
  diffrentes tches d'administration et de correction d'erreur.

  On doit aussi s'assurer que tout est correct lorsqu'on dmarre la
  machine. En tant qu'utilisateur root, il faut ajouter la ligne
  suivante dans /etc/rc.d/rc.local :


       su news -c /usr/lib/newsbin/maint/newsboot




  Les News peuvent tre rcupres en utilisant le programme newsx NNTP.
  Ce programme peut tre trouv  l'adresse suivante :

  ftp://sunsite.unc.edu/pub/Linux/system/news/transport/newsx-0.9.tar.gz
  Ou :

  ftp://ftp.sol.no/user/egilk/newsx-0.9.tar.gz

  La configuration de newsx est trs simple. Son installation est
  classique :


       make
       su
       make install
       exit

  Avec cette configuration, tout ce que l'on a  faire est de crer les
  groupes que l'on veut lire en utilisant la commande addgroup.

  Pour rcuprer les articles, l'utilisateur >news lance les commandes
  suivantes (en supposant une connexion PPP ou similaire tablie) :


       newsrun
       newsx acme news.acme.xz
       newsrun





  L'option -d permet un affichage continu  l'cran. La documentation de
  newsx donne toutes les informations ncessaires.

  newsx s'occupe aussi de poster les articles sortants.

  Pour contrler la suppression des articles prims, on a besoin d'un
  fichier explist. Les commentaires de cet exemple devraient expliquer
  ce que l'on cherche  faire :


       # maintenu dans l'historique 14 jours, rien ne dure plus de 120 jours
       /expired/                          x    14      -
       /bounds/                           x    0-1-120 -

       # on garde a pendant 2 mois
       comp.sources,comp.os.linux.all     x    60      -

       # les dchets sont vite supprims
       junk,control                       x    2       -

       # dfaut:  14 jours, pas  d'archivage
       all                                x    14      -




  AALLTT :: Pour les petits serveurs de News, on n'a pas souvent besoin du
  contrle newgroup. Le trafic est nnoorrmmee compar  son utilit
  possible. Le point essentiel est que les articles soient supprims et
  que les groupes puissent tre crs automatiquement. Pour tre sr que
  les messages de contrle contenant newgroup ne brouillent pas les
  choses, un fichier nomm ce que l'on autorise :


       comp.os.linux  tale@uunet.com yv
       all            any            nq




  Dans cet exemple, tous les groupes sous comp.os.linux seront cres
  (y), et l'utilisateur news en sera averti (v).  Tout le reste sera
  silencieusement (q) ignor (n).  La dernire ligne suffit si l'on veut
  crer tous les groupes manuellement.

  AALLTT :: Une alternative  newsx est suck.





  55..44..  CCoommmmeenntt ccoonnffiigguurreerr LLeeaaffnnooddee??

  Une tout autre solution consiste  installer le paquetage intgr
  ncessaires  un serveur de News personnel et est facile  configurer.
  Il est disponible  :

  http://www.troll.no/freebies/leafnode.html

  Comme pour C News, tous les travaux de maintenance doivent absolument
  tre faits par l'utilisateur news.

  Le rpertoire de base de leafnode est /usr/lib/leafnode.  Pour
  l'installer, faire :


       cd /usr/lib/leafnode
       tar -xzvf leafnode-0.8.tgz
       cd leafnode-0.8
       make
       su
       make install




  Notez que, dans ce qui suit, le prfixe /usr/local/sbin devra tre
  remplac par /usr/sbin si vous avez install leafnode  partir d'un
  paquetage.

  Toujours sous le compte root, on change la ligne qui contrle NNTP
  dans le fichier /etc/inetd.conf :


       nntp  stream  tcp  nowait  news  /usr/sbin/tcpd /usr/local/sbin/leafnode




  Puis, on l'active par :


       killall -HUP inetd




  On retourne sous le compte news en tapant exit. Dans change la ligne
  qui dclare le serveur NNTP.  Dans notre cas :


       server = news.acme.xz




  Leafnode se recherchera lui-mme en ajoutant la commande suivante par
  crontab -e comme utilisateur news :


       # expiration de Leafnode, une fois par jour
       0 4 * * * /usr/local/sbin/texpire





  L'change de News est aussi ralis sous le compte news par la
  commande suivante (PPP est sens fonctionner) :


       /usr/local/sbin/fetch





  Les utilisateurs voulant lire les news doivent alors utiliser la
  recette dcrite dans _C_o_m_m_e_n_t _c_o_n_f_i_g_u_r_e_r _u_n _l_e_c_t_e_u_r _d_e _N_e_w_s _o_n_-_l_i_n_e _?,
  en la configurant pour la machine locale, i.e :


       export NNTPSERVER=localhost




  C'est tout ce qu'il y a  faire. Le premier fetch transfrera une
  liste des groupes de news disponibles. Leafnode s'occupera alors des
  groupes que les utilisateurs dsirent et s'adaptera la pprroocchhaaiinnee ffooiiss
  qu'il est activ.

  Notez que leafnode semble ne pas fonctionner dans les cas o une
  autorisation NNTP est ncessaire.

  AALLTT :: Une alternative  leafnode est nntpcache, disponible  :

  ftp://ftp.suburbia.net/pub/nntpcache/nntpcache.tgz

  AALLTT :: Une autre possibilit est d'utiliser le lecteur de news
  pullslrn-pull. Le lecteur de news doit avoir t compil avec l'option
  spool.


  66..  CCoommmmeenntt aauuttoommaattiisseerr llaa pprrooccdduurree ddee ccoonnnneexxiioonn ??

  La gestion automatise des news et du courrier est simple  raliser
  sous Linux.

  Tout d'abord, on doit crer un script /usr/lib/ppp/ppp-on qui dmarre
  la connexion au F.A.I. Souvent, ce fichier contient simplement la
  ligne suivante :


       /usr/sbin/pppd




  Les prcisions supplmentaires sont faites dans


       connect "/usr/lib/ppp/chat -v -f /etc/ppp/chatscript"
       crtscts
       modem
       defaultroute
       asyncmap 00000000
       user dirk
       /dev/modem 38400




  Pour terminer une connexion, on utilise la version fournie de

  Aprs avoir test le fonctionnement de ces deux scripts, on doit
  crire ceux qui ralisent les diffrentes tches. Le script pour
  rcuprer le courrier a t dcrit plus haut et on suppose qu'il se
  trouve dans /home/dirk/pop.

  Un script pour l'envoi de courrier peut tre cr dans /root/mail :


       #! /bin/sh
       #
       # change de courrier
       # timeout de 10 minutes :
       TIMEOUT=600
       DT=10

       # lancer sendmail :
       sendmail -q &

       # rcuprer le courrier :
       su dirk -c /home/dirk/pop

       # attendre que sendmail se termine :
       t=0
       while ! mailq | grep -q "Mail queue is empty"; do
           t=$[$t+$DT]
           if [ $t -gt $TIMEOUT ] ; then
            echo "sendmail -q timeout ($TIMEOUT).."
            exit 1
           fi
           sleep $DT
       done

       exit 0




  Le script pour envoyer des News peut tre cr dans
  /usr/lib/news/news :


       #!/bin/sh
       #
       # change des news
       # doit tre lanc par l'utilisateur news :
       cd /usr/lib/news

       # mettre  jour le lot de sortie (C News) :
       /usr/lib/newsbin/input/newsrun < /dev/null

       # change des news :
       /usr/lib/newsbin/newsx acme news.acme.xz

       # vidage du lot entrant :
       /usr/lib/newsbin/input/newsrun < /dev/null




  Un script pour rassembler tout cela reste  crire dans
  /root/news+mail:



  #!/bin/sh
  #
  # change de courrier et de news
  # doit tre lanc par root
  #
  if ! /usr/lib/ppp/ppp-on; then
      exit 1
  fi
  trap "/usr/lib/ppp/ppp-off" 1 2 3 15

  # change de news+mail :
  /root/mail &
  su news -c  news/news
  wait

  # dconnexion...
  /usr/lib/ppp/ppp-off

  # mise  jour du lot entrant (C News) :
  su news -c /usr/lib/newsbin/input/newsrun < /dev/null &

  exit 0




  Il est trs facile d'tendre tout ceci afin de n'tablir une connexion
  que si du courrier ou des news sortants sont prsents.  On appellera
  ce script rappellera que le nom du spool de news sortant doit tre
  modifi pour que cela fonctionne :


       #!/bin/sh
       #
       # change de news et courrier, seulement s'il y a des news ou du courrier sortant.
       # (C News spool)
       if [ -s /var/spool/news/out.going/acme/togo ] ||
           ! ( mailq | grep -q "Mail queue is empty"); then
            /root/news+mail
       fi




  La seule chose restant  faire est de dire le moment o tout cela doit
  se passer. Pour cela, on utilise la commande -e sous le compte root.
  On suppose que l'on veut toujours changer les news et le courrier  7
  heures du matin, puis toutes les 4 heures s'il y a des news et du mail
  sortant :


       00 7           * * *     /root/news+mail
       00 11,15,19,23 * * *     /root/news+mail.cond




  Il faut s'assurer que chaque partie fonctionne correctement avant de
  les intgrer ensemble. On peut ajouter plusieurs autres tches par la
  suite, comme le rglage de l'horloge (en utilisant ntpdate), et la
  mise  jour automatique (miroir) des fichiers WWW er FTP locaux par
  rapport  ceux du F.A.I (en utilisant make et ftp).

  AALLTT :: Selon les prfrences, il est aussi possible de renverser le
  processus. Chaque fois qu'une connexion PPP est tablie, le script
  ajouter tout ce qui est ncessaire pour dmarrer l'change de courrier
  et des news. Voir man pppd pour plus de dtails.

  AALLTT :: On peut aussi se connecter en PPP  chaque fois qu'un trafic
  rseau est dtect.  C'est, dans bien des cas, la solution la plus
  lgante mais elle est tributaire d'une bonne configuration pour
  viter l'tablissement de connexions frquentes et coteuses.  Plus
  d'information peut tre trouve  :

  http://www.dna.lth.se/ erics/diald.html

  L'utilitaire diald est disponible  :

  ftp://sunsite.unc.edu/pub/Linux/system/Network/serial/diald-0.16.tar.gz

  Au mme endroit, on trouvera aussi d'autres variations sur les
  connexions PPP.


  77..  PPoouurr ffiinniirr

  77..11..  YY aa tt''iill dd''aauuttrreess cchhoosseess qquuee jjee ddeevvrraaiiss ssaavvooiirr ??



    Les diffrents messages d'erreurs du systme seront normalement
     envoys en courrier interne. Pour s'assurer qu'ils pourront tre
     lus, on doit crer un fichier commande newaliases  chaque fois
     qu'on change ce fichier. Un exemple qui devrait couvrir la plupart
     des ventualits est :



       PostMaster: root
       ftp: root
       news: root
       usenet: root
       FaxMaster: root
       fax: root
       WebMaster: root
       MAILER.DAEMON: root







    Un grand nombre de programmes pour Linux peuvent tre trouvs sur
     encombr. Cependant, il y a de nombreux miroirs et chaque fois
     qu'une rfrence  ftp://sunsite.unc.edu/pub/Linux/.. est faite, on
     doit essayer d'utiliser un miroir proche de chez soi, par exemple,
     ftp://ftp.lip6.fr/pub/linux/sunsite/...

    Pour ceux qui viennent du monde Yarn, une conversion vers les
     rpertoires standards est possible en utilisant le programme
     yarn2mf disponible  :

  ftp://ftp.sol.no/user/egilk/yarn2mf.zip


  88..  IInnffoorrmmaattiioonnss ssppcciiffiiqquueess aauuxx FF..AA..II..

  Des informations plus spcifiques  certains F.A.I. sont disponibles 
  partir de plusieurs sources :


  DDmmoonn IInntteerrnneett

  ftp://ftp.demon.co.uk/pub/unix/linux/Demon/slack3.0.help.tgz

  NNeettccoomm

  http://www.netcom.com/bin/webtech/NetCruiser/Operating_Systems/Linux/linux.cfg.html

  PPoowweerrTTeecchh,, TTeelleennoorr OOnnlliinnee,, TTeelliiaa

  http://www.kvaleberg.com/no-isp.html

  SSttaannffoorrdd

  http://www-leland.stanford.edu/ wkn/Linux/network/network.html

  MMCCII

  http://www.kvaleberg.com/linux-mci.html

  SSIISSCCOOMM

  http://www.siscom.net/support/linux_setup.htm

  AAOOLL ce n'est pas possible car AOL utilise un protocole propritaire.

  Si vous pouvez donner une information spcifique  un F.A.I qui n'est
  pas liste ici, merci de le signaler.


  88..11..  CCoommmmeenntt eenn ssaavvooiirr pplluuss ??

  Le livre du Linux Documentation Project, intitul Linux Network
  Administrator's Guide (NdT : traduit en franais sous le titre
  Administration rseau sous Linux) et crit par Olaf Kirch est
  obligatoire pour celui qui veut configurer et maintenir tout ce qui
  touche  TCP/IP et  Internet.

  ftp://sunsite.unc.edu/pub/Linux/docs/linux-doc-project/network-
  guide/nag-1.0.ascii.tar.gz

  La documentation fournie avec chaque paquetage donne normalement
  toutes les informations ncessaires, en tout cas, un survol. Les man-
  pages sont toujours le premier endroit pour chercher une information.
  Par exemple, on peut essayer :


        man pppd




  On peut aussi trouver de la documentation sur certains programmes dans
  l'arborescence soit pas toujours bien structure.

  Les HOWTOS suivants sont particulirement pertinents :



    IInnssttaallllaattiioonn--HHOOWWTTOO donne toutes les bases.

    NNEETT--22--HHOOWWTTOO est une description trs minutieuse de l'installation
     et de la configuration du code NET.  La plupart de ces oprations
     doit srement avoir dj t faite si on utilise une distribution
     Linux standard (par ex. Slackware, Red Hat, Debian).  Mais
     plusieurs sections sur la configuration et les problmes rencontrs
     valent vraiment la peine d'tre lues.

    MMaaiill--HHOOWWTTOO explique comment configurer les diffrents outils. Comme
     prcdemment, la plupart de ces rglages auront dj t faits lors
     de l'installation d'une distribution Linux standard.

    NNeewwss--HHOOWWTTOO concerne la mise en place d'un spool de News classique.

    TTiinnyy--NNeewwss couvre encore une autre possibilit pour rcuprer les
     News.

    PPPPPP--HHOOWWTTOO est une bonne description des problmes que que l'on peut
     rencontrer lorsqu'on met en place une connexion PPP.

    SSeerriiaall--HHOOWWTTOO contient tout ce que l'on doit savoir sur la
     configuration des ports srie.

    MMaaiill--QQuueeuuee explique comment configurer _s_e_n_d_m_a_i_l pour toujours
     mettre en attente le courrier distant tout en dlivrant le courrier
     local en mme temps.

     Red Hat a une liste de diffusion spcialise pour PPP ; pour en
     faire partie, envoyez un message 

  redhat-ppp-list-request avec le champ sujet suivant :


       subscribe





  88..22..  RReemmeerrcciieemmeennttss

  Toutes ces informations viennent de nombreuses sources. Merci aux
  personnes suivantes qui ont particip directement, ou indirectement :





























  Adam Holt <holt@graphics.lcs.mit.edu>
  Arne Coucheron <arneco@oslonett.no>
  Arne Riiber <riiber@oslonett.no>
  Arnt Gulbrandsen <agulbra@troll.no>
  Bjorn Steensrud <bjornst@powertech.no>
  Gisle Hannemyr <gisle@a.sn.no>
  Hans Amund Rosbach <haro@sesam.dnv.no>
  Hans Peter Verne <hpv@ulrik.uio.no>
  Harald T Alvestrand <Harald.T.Alvestrand@uninett.no>
  Harald Terkelsen  <Harald.Terkelsen@adm.hioslo.no>
  Haavard Engum <hobbes@interlink.no>
  James Youngman <JYoungman@vggas.com>
  Johan S. Seland <johanss@sn.no>
  John Phillips <john@linux.demon.co.uk>
  Jorn Lokoy <jorn@oslonett.no>
  Kenneth Tjostheim <kenneth.tjostheim@asplanviak.no>
  Kjell M. Myksvoll <kjell.myksvoll@fou.telenor.no>
  Kjetil T. Homme <kjetilho@math.uio.no>
  Michael Meissner <meissner@cygnus.com>
  N J Bailey <N.J.Bailey@leeds.ac.uk>
  Nicolai Langfeldt <janl@math.uio.no>
  Ove Ruben R Olsen <Ove.R.Olsen@ub.uib.no>
  R. Bardarson <ronb@powernet.net>
  Steinar Fremme <steinar@fremme.no>
  Sverre H. Huseby <sverrehu@ifi.uio.no>
  Trond Eivind Glomsrod <teg@stud.imf.unit.no>
  Tommy Larsen <tommy@mix.hive.no>
  Yves Bellefeuille <yan@storm.ca>






































  Le Linux Installation HOWTO
  par Eric S. Raymond
  v4.13, 30 Aot 1998

  Ce document dcrit comment obtenir et installer Linux. C'est le pre
  mier document qu'un nouvel utilisateur de Linux devrait lire pour
  dbuter.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 But de ce document
     1.2 Autres sources d'informations
     1.3 Nouvelles versions de ce document
     1.4 Ractions et corrections

  2. Dernires modifications

  3. L'option la plus simple  achetez, ne construisez pas

  4. Avant de commencer

     4.1 Matriel ncessaire
     4.2 Espace disque ncessaire et coexistence
     4.3 Choisir une distribution Linux

  5. Prsentation de l'installation

     5.1 tapes fondamentales de l'installation
     5.2 Parties fondamentales d'un kit d'installation

  6. L'installation en dtails

     6.1 Se prparer pour l'installation
     6.2 Crer les disquettes de  boot  et de  root 
     6.3 Repartitionner les disques DOS/Windows
     6.4 Crer des partitions pour Linux
        6.4.1 Partitions : les bases
        6.4.2 Taille des partitions
     6.5 Dmarrer la disquette d'installation
     6.6 Utiliser la disquette root
        6.6.1 Choisir une installation EGA ou X
        6.6.2 Utiliser
        6.6.3 tapes suivantes
     6.7 Installer les paquetages
     6.8 Aprs l'installation des paquetages
        6.8.1 LILO, le LInux LOader
        6.8.2 Crer une disquette de dmarrage (option)
        6.8.3 Configurations systme diverses

  7. Dmarrer votre nouveau systme

  8. Aprs votre premier dmarrage

     8.1 Dbut de l'administration systme
     8.2 Configuration personnalise de LILO

  9. Administrivia

     9.1 Conditions d'utilisations
     9.2 Remerciements


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  BBuutt ddee ccee ddooccuummeenntt

  Linux est une implantation librement diffusable d'Unix pour des
  ordinateurs personnels courants ( l'origine dvelopp sur des 386s,
  il est maintenant adapt aux architectures 486, 586, Pentium, PowerPC,
  Sun Sparc et DEC Alpha). Il supporte un grand nombre de programmes,
  parmi lesquels X-Window et Emacs, les rseaux TCP/IP (dont SLIP), et
  de nombreuses applications.

  Ce document suppose que vous ayez entendu parler de Linux, que vous
  connaissez son existence, et que vous voulez maintenant le faire
  tourner. S'il s'intresse  la version Intel qui est la plus courante,
  mais la plupart de ce qui y est dit s'applique aussi aux versions
  PowerPC, Sparc, et Alpha.


  11..22..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonnss

  Si vous n'avez encore jamais entendu parler de Linux, plusieurs
  sources d'informations de base existent. Le meilleur endroit pour les
  trouver est la page d'accueil du Linux Documentation Project 
  l'adresse <http://sunsite.unc.edu/LDP/linux.html>.  Vous pourrez y
  trouver la dernire version mise  jour de ce document  l'adresse
  <http://sunsite.unc.edu/LDP/HOWTO/Installation-HOWTO.html>

  Vous commencerez probablement vos recherches par les informations
  gnrales sur Linux ; la Page d'informations
  <http://sunsite.unc.edu/LDP/HOWTO/INFO-SHEET.html> et la META-FAQ
  <http://sunsite.unc.edu/LDP/HOWTO/META-FAQ.html> Linux.  Le document 
  Linux Frequently Asked Questions  (FAQ) contient un grand nombre de
  questions (et de rponses !)  courantes sur Linux -- c'est un  devoir
  de lecture  pour les nouveaux utilisateurs.

  Vous pouvez obtenir de l'aide pour les problmes courants dans les
  forums USENET comp.os.linux.help et comp.os.linux.announce. Pour ceux
  qui prefrent le franais, les groupes fr.comp.os.linux,
  fr.comp.os.linux.moderated et fr.comp.os.linux.annonces sont trs
  actifs.

  Le  Linux Documentation Project  crit un ensemble de manuels et de
  livres sur Linux, tous librement diffusables sur le rseau et
  disponibles  partir de la page d'accueil du LDP.

  Le livre  _L_i_n_u_x _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _G_e_t_t_i_n_g _S_t_a_r_t_e_d  est un guide
  complet dcrivant comment obtenir et installer Linux, et comment
  l'utiliser une fois qu'il est install. Il contient un didacticiel
  complet sur le lancement et l'utilisation du systme, et beaucoup plus
  d'informations que vous ne pourrez en trouver ici. Vous pouvez le
  consulter, ou tlcharger une copie, sur la page d'accueil du LDP.

  Cet ouvrage a t traduit en franais, comme la majeure partie des
  documents du LDP. Le site de rfrence pour toutes ces traductions est
  ftp.lip6.fr/pub/linux/french.

  Enfin, il existe un Guide to x86  Bootstrapping
  <http://www.paranoia.com/~vax/boot.html> assez technique. Ce document
  est orient vers NetBSD plutt que vers Linux, mais il contient des
  informations utiles sur la configuration des disques et des
  gestionnaires de boot pour les configurations multi-OS.

  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  De nouvelles versions du "Linux Installation HOWTO" sont postes
  priodiquement dans <tt>comp.os.linux.help</tt>,  et news.answers
  <news:answers>.  Elles sont aussi tlcharges sur les diffrents
  sites WWW et FTP Linux, dont la page d'accueil du LDP.

  Vous pouvez consulter la dernire version sur le web  l'adresse
  <http://sunsite.unc.edu/LDP/HOWTO/Installation-HOWTO.html>.

  (NDT : La version franaise de se document est poste dans
  <fr.comp.os.linux.annonces> tous les mois, ainsi que les autres
  adaptations franaises des HOWTOS...)


  11..44..  RRaaccttiioonnss eett ccoorrrreeccttiioonnss

  Si vous avez des questions ou des commentaires concernant ce document,
  n'hsitez pas  contacter Eric S. Raymond,  esr@thyrsus.com. Je
  recevrai avec plaisir toute suggestion ou critique.  Si vous trouvez
  une erreur dans ce document, merci de me la signaler afin que je
  puisse la corriger dans la prochaine version.

  _N_e _m_'_e_n_v_o_y_e_z _p_a_s de questions  propos des problmes de matriels
  rencontrs lors de l'installation.  Consultez le  _L_i_n_u_x _I_n_s_t_a_l_l_a_t_i_o_n
  _a_n_d _G_e_t_t_i_n_g _S_t_a_r_t_e_d , votre revendeur, ou le forum Linux
  comp.os.linux.setup.  Ce HOWTO se veut un guide rapide et indolore
  pour une installation _n_o_r_m_a_l_e -- un autre HOWTO sur les problmes de
  matriel et leurs diagnostics est en prparation.


  Tout ce qui concerne la traduction franaise : fautes d'orthographe,
  erreurs de traduction, est d  Eric Jacoboni <jaco@mail.dotcom.fr>.
  La traduction originale de ce document a t faite par Ren Cougnenc.
  .

  22..  DDeerrnniirreess mmooddiiffiiccaattiioonnss


    Ajout de  Achetez, ne construisez pas .


  33..  LL''ooppttiioonn llaa pplluuss ssiimmppllee  aacchheetteezz,, nnee ccoonnssttrruuiisseezz ppaass

  Linux est maintenant suffisamment mature pour qu'il y ait des
  intgrateurs de systmes qui assembleront pour vous une station de
  travail, installeront et configureront Linux dessus et feront des
  tests intensifs avant de vous la livrer. Si vous disposez de plus
  d'argent que de temps, ou si vous avez des exigences de performance et
  de fiabilit rigoureuses, ces intgrateurs offrent un service valable
  en garantissant que vous n'aurez pas un matriel qui sera mort deux
  jours aprs son dballage.

  Il existe plusieurs socits de ce type (et je les numrerai ici au
  fur et  mesure que j'en apprendrai plus sur elles). Le seul
  quipement de ce type que je connaisse personnellement est VA Research
  <http://www.varesearch.com>. Ces bonnes gens construisent des stations
  de travail Linux haut de gamme et de trs bonne qualit, avec un joli
  logo de Tux le pingouin sur leur face avant. Ils sont intimement lis
   la communaut Linux (le Projet Debian <http://www.debian.org> est
  sur une machine de leur arrire salle, Linus possde une de leurs
  machines, et ils envoient mme des subsides  votre humble serviteur 
  l'occasion).

  Pour ceux qui n'ont pas un tel budget, le reste de ce HOWTO explique
  comment installer soi-mme Linux.
  44..  AAvvaanntt ddee ccoommmmeenncceerr

  Avant de pouvoir installer Linux, vous devez tre sr que votre
  machine soit capable de le supporter, puis vous devrez choisir une
  distribution Linux. La Linux Pre-installation checklist
  <http://members.tripod.com/~algolog/lnxchk.htm> vous aidera 
  organiser vos donnes de configuration avant de commencer.


  44..11..  MMaattrriieell nncceessssaaiirree

  Quel type de systme est ncessaire pour faire tourner Linux ?  Bonne
  question, la liste des matriels reconnus par le systme change
  frquemment. Le  _L_i_n_u_x _H_a_r_d_w_a_r_e_-_H_O_W_T_O ,
  <http://sunsite.unc.edu/LDP/HOWTO/Hardware-HOWTO.html>, donne une
  liste plus ou moins complte des matriels reconnus par Linux. La 
  _L_i_n_u_x _I_N_F_O_-_S_H_E_E_T ,  <http://sunsite.unc.edu/LDP/HOWTO/INFO-
  SHEET.html>, en donne une autre.

  Pour les versions Intel, une configuration matrielle similaire 
  celle qui suit est ncessaire :

  N'importe quel processeur 80386, 80486, Pentium ou Pentium II
  convient. Les clones Non-Intel des 80386 et au dessus fonctionneront
  gnralement. Vous n'avez pas besoin de coprocesseur arithmtique bien
  qu'il est agrable d'en avoir un.

  Les architectures de bus ISA, EISA, VESA Local Bus et PCI sont
  reconnues. L'architecture de bus MCA (propre aux machines IBM PS/2)
  est reconnue dans les noyaux de dveloppement les plus rcents
  (2.1.x), mais peut ne pas tre disponible tout de suite. Tout CPU, du
  386SX au P-6 convient. Un coprocesseur arithmtique n'est pas
  ncessaire mais il est prfrable d'en avoir un.

  Au moins 4 Mo de mmoire sont ncessaires. En thorie, Linux pourrait
  se suffire de 2 Mo, mais la plupart des installations et des
  programmes ncessitent 4 Mo. Plus vous aurez de mmoire, et plus vous
  serez heureux. Je vous conseille 8 ou 16 Mo si vous avez l'intention
  d'utiliser X-Window.

  videmment, vous avez besoin d'un disque dur et d'un contrleur disque
  au standard AT. Tous les disques et contrleurs MFM, RLL et IDE
  devraient fonctionner.  De nombreux disques et contrleurs SCSI sont
  aussi reconnus ; le  _L_i_n_u_x _S_C_S_I_-_H_O_W_T_O  contient plus d'informations
  sur le matriel SCSI. Si vous achetez un nouveau systme pour faire
  tourner Linux, le faible surcot du SCSI est drisoire face 
  l'amlioration des performances et de la fiabilit qu'il apporte.

  Vous avez besoin d'un lecteur de disquettes 3.5".  Bien que les
  disquettes 5.25" soient reconnues par Linux, elles sont si obsoltes
  que vous ne devez pas compter trouver des images disques qui tiendront
  dessus.  (Un Linux minimal peut, en fait, tourner sur une seule
  disquette, mais cela n'est utile que pour l'installation et certaines
  tches de maintenance)

  Vous avez aussi besoin d'une carte vido et d'un cran MDA, Hercules,
  CGA, EGA, VGA, ou Super VGA.  En gnral, si votre carte et votre
  cran video fonctionnent sous MS-DOS, ils devraient fonctionner sous
  Linux.  Cependant, si vous voulez faire tourner X-Window, d'autres
  restrictions s'appliquent sur les matriels vido reconnus. Le  _L_i_n_u_x
  _X_F_r_e_e_8_6_-_H_O_W_T_O 
  <http://sunsite.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>, contient plus
  d'informations sur l'excution de X et sur ses besoins.

  Un lecteur de CD-ROM est ncessaire. S'il est ATAPI, SCSI, ou vrai
  IDE, vous ne devriez pas avoir de problme pour le faire fonctionner
  (mais faites attention aux lecteurs bon march annonant une interface
   IDE  qui n'en n'est pas une vraie). Si votre CD-ROM utilise une
  carte d'interface propritaire, il se peut que le noyau d'installation
  que vous avez lanc  partir de la disquette ne le reconnaisse pas --
  et un CD-ROM inaccessible peut empcher l'installation. De plus, les
  CD-ROMs relis au port parallle ne fonctionnent pas du tout. Si vous
  avez un doute, lisez le  _L_i_n_u_x _C_D_-_R_O_M _H_O_W_T_O ,
  <http://sunsite.unc.edu/LDP/HOWTO/CDROM-HOWTO.html> pour une liste et
  des dtails des matriels reconnus.

  Les cartes sans jumper, appeles  Plug'n'Play , peuvent poser
  problme. Leur support est en cours de dveloppement, mais encore
  absent du noyau 2.0.25. Heureusement, ce n'est un problme que pour
  les cartes son ou Ethernet.

  Si vous travaillez sur une machine utilisant l'un des processeurs 68k
  de Motorola (ordinateurs Amiga, Atari, ou VMEbus), lisez la FAQ
  Linux/m68K sur <http://www.clark.net/pub/lawrencc/linux/faq/faq.html>
  pour des informations sur les configurations minimales requises et la
  situation actuelle du portage. Actuellement, la FAQ dit que Linux m68k
  est aussi stable et utilisable que les versions Intel.


  44..22..  EEssppaaccee ddiissqquuee nncceessssaaiirree eett ccooeexxiisstteennccee

  Vous avez besoin d'espace libre sur votre disque pour y mettre Linux.
  La taille de cet espace dpend de la quantit de programmes que vous
  comptez installer. La plupart des installations demandent quelque
  chose de l'ordre de 200  500 Mo, ce qui inclut l'espace pour les
  programmes, l'espace de swap (utilis comme mmoire virtuelle sur
  votre machine), l'espace disponible pour les utilisateurs, etc.

  Il est possible de faire tourner un systme Linux minimal dans 80 Mo,
  voire moins (c'tait le cas lorsque les distributions Linux taient
  moins importantes), tout comme il est possible d'utiliser 500 Mo, ou
  bien plus, pour tous vos programmes Linux. La place utilise dpend en
  grande partie du nombre de programmes que vous installez et de
  l'espace de travail dont vous avez besoin. Nous reviendrons sur ce
  point plus tard.

  Linux peut coexister sur votre disque dur avec d'autres systmes
  d'exploitation, comme MS-DOS, Microsoft Windows, ou OS/2. (En fait,
  vous pouvez mme accder aux fichiers MS-DOS, voire excuter certains
  programmes MS-DOS,  partir de Linux.) En d'autres termes, lorsque
  vous partitionnez votre disque pour Linux, MS-DOS ou OS/2 sont dans
  leurs propres partitions, et Linux dans la sienne. Nous dtaillerons
  ce mcanisme de  dual-boot  plus loin.

  Vous n'avez PAS besoin d'tre sous MS-DOS, OS/2, ou un autre systme
  d'exploitation pour utiliser Linux.  Linux est un systme
  d'exploitation compltement diffrent et autonome ; il n'a pas besoin
  d'autre OS pour son installation et son utilisation.

  Pour rsumer, la configuration minimale pour Linux n'est pas beaucoup
  plus importante que celle ncessaire  la plupart des systmes MS-DOS
  ou Windows 3.1 actuels (et c'est moins que le minimum pour Windows 95
  !). Si vous possdez un 386, ou un 486, avec au moins 4 Mo de RAM,
  vous serez heureux sous Linux.  Linux ne demande pas un norme espace
  disque ou mmoire, ni un processeur ultra rapide. Matt Welsh, le
  crateur de ce HOWTO, utilisait Linux sur un 386  16 MHz (la machine
  la plus lente que l'on peut possder), avec 4 Mo de RAM, et en tait
  trs content. Plus vous voudrez faire de choses, plus vous aurez
  besoin de mmoire et d'un processeur plus rapide. D'aprs mon
  exprience, un 486 avec 16 Mo de RAM, et tournant sous Linux, est plus
  performant que certains modles de stations de travail d'un prix bien
  plus lev.
  44..33..  CChhooiissiirr uunnee ddiissttrriibbuuttiioonn LLiinnuuxx

  Avant d'installer Linux, vous devez choisir une des  distributions 
  Linux disponibles. Il n'y a pas de distribution standard unique -- il
  en y a beaucoup. Chaque distribution a sa propre documentation et sa
  propre procdure d'installation.

  Les distributions Linux sont disponibles par FTP anonyme et par
  correspondance sur disquettes, bandes ou CD-ROMs. Le  _L_i_n_u_x
  _D_i_s_t_r_i_b_u_t_i_o_n _H_O_W_T_O   <http://sunsite.unc.edu/LDP/HOWTO/Distribution-
  HOWTO.html>, dcrit les nombreuses distributions disponibles par FTP
  ou par correspondance.

  Lorsque ce HOWTO fut crit pour la premire fois, dans un pass
  lointain (1992 - 1993), la plupart des gens rcupraient Linux en
  utilisant des chemins tortueux. Cela impliquait de longs
  tlchargements  partir d'Internet ou d'un BBS sur leur machines DOS,
  suivis d'une procdure labore permettant de transfrer ce qui avait
  t rcupr sur de multiples disquettes. Une de ces disquettes tait
  alors boote et utilise pour l'installation de l'autre douzaine.
  Avec de la chance (et sans erreurs sur les supports), l'installation
  se finissait plusieurs heures plus tard par un Linux en tat de
  marche. Ou peut-tre pas.

  Bien que cette faon de procder reste encore possible (vous pouvez
  tlcharger une des nombreuses distributions  partir de
  <http://sunsite.unc.edu/pub/Linux/distributions/INDEX.html>), il
  existe des mthodes beaucoup moins fatiguantes. La plus facile
  consiste  acheter l'une des excellentes distributions commerciales de
  Linux sur CD-ROMs comme Red Hat, Craftworks, Linux Pro, ou WGS. Elles
  sont gnralement vendues moins de 50 $ dans des librairies ou des
  boutiques d'Informatique et vous conomiseront plusieurs heures
  d'nervement.

  Vous pouvez aussi achetez des CD-ROMs  compilation  comme l'ensemble
  Linux Developer's Resource d'InfoMagic.  Ceux-ci contiennent
  gnralement plusieurs distributions et un contenu rcent des sites
  les plus importants de Linux, comme sunsite ou tsx-11.

  Dans la suite de ce HOWTO, nous dcrirons les tapes d'une
  installation  partir d'un CD-ROM  compilation , ou de l'un des
  Linux commerciaux n'incluant pas de manuel d'installation imprim. Si
  votre Linux contient un manuel, certaines informations de ce HOWTO
  peuvent vous tre utiles, mais il est prfrable de consulter le
  manuel pour les instructions d'installation dtailles.


  55..  PPrrsseennttaattiioonn ddee ll''iinnssttaallllaattiioonn



  55..11..  ttaappeess ffoonnddaammeennttaalleess ddee ll''iinnssttaallllaattiioonn

  Le plan de l'installation de Linux est simple :


  1. Rcuprez les informations sur la configuration de votre matriel.

  2. Crez les disquettes d'installation.

  3. Si vous voulez disposer d'un systme  dual-boot  (Linux et DOS ou
     Windows  la fois) rarrangez (repartitionnez) votre disque pour
     faire de la place  Linux.

  4. Dmarrez un mini-Linux d'installation  partir des disquettes afin
     d'accder au CD-ROM.
  5. Prparez les systmes de fichiers Linux.  (si vous n'avez pas
     modifi la table des partitions du disque, vous le ferez  cette
     tape.)

  6. Installez un Linux de base  partir du CD-ROM.

  7. Dmarrez Linux  partir du CD-ROM.

  8. (Optionnel) Installez d'autres paquetages  partir du CD-ROM.


  55..22..  PPaarrttiieess ffoonnddaammeennttaalleess dd''uunn kkiitt dd''iinnssttaallllaattiioonn

  Voici les parties fondamentales d'une distribution installable :


  1. Les fichiers README et FAQ. Ceux-ci se trouvent habituellement dans
     le rpertoire racine de votre CD-ROM et peuvent tre lus ds que le
     disque a t mont sous Linux. (En fonction de la faon dont le CD-
     ROM a t fait, ils peuvent mme tre visibles sous DOS/Windows.)
     Il est souhaitable de lire ces fichiers ds que vous pourrez y
     accder afin d'tre tenu au courant des changements et des mises 
     jour importantes.

  2. Plusieurs images de  bootdisk  (souvent dans un sous-rpertoire).
     L'une de celles-ci est le fichier que vous copierez sur une
     disquette afin de crer la disquette de boot. Vous choisirez uunnee de
     ces images en fonction du type de matriel dont vous disposez sur
     votre systme.

  Le problme est que certains pilotes de matriel entrent bizarrement
  en conflit les uns avec les autres et, au lieu d'essayer de dceler
  les problmes de matriel sur votre systme, il est plus facile
  d'utiliser une disquette image de boot qui ne lancera que les pilotes
  ncessaires. (Ceci aura, en plus, l'avantage de rduire votre noyau.)


    Une image de  rootdisk  (ou peut-tre deux). C'est un fichier que
     vous copierez sur une disquette pour crer la, ou les, disquette(s)
     d'installation. De nos jours, la (les) disquette(s)  root  est
     (sont) gnralement indpendante(s) du matriel ; elle(s)
     suppose(nt) un cran couleur EGA ou mieux.

    Une disquette image de dpannage. C'est une disquette contenant un
     noyau de base et des outils pour rparer les dgats au cas o
     quelque chose n'irait pas avec le noyau ou si le dmarrage se
     bloquait sur votre disque dur.

    RAWRITE.EXE. C'est un programme MS-DOS permettant d'crire le
     contenu d'un fichier (comme l'image de boot ou de rootdisk)
     directement sur une disquette, sans se soucier du formatage.

  Vous n'avez besoin de RAWRITE.EXE que si vous prvoyez de crer vos
  disquettes  boot  et  root   partir d'un systme MS-DOS. Si vous
  avez accs  une station de travail UNIX disposant d'un lecteur de
  disquettes, vous pouvez vous en servir pour crer les disquettes en
  utilisant la commande  dd, ou un script fourni par le vendeur. Lisez
  la page de man sur dd(1) et demandez de l'aide aux gourous UNIX de
  votre entourage.


    Le CD-ROM lui-mme.  Le but de la disquette  boot  est de
     prparer votre machine au chargement des disquettes  root  ou
     d'installation, qui ne sont elles-mmes que des moyens pour
     prparer votre disque dur et copier dessus des parties du CD-ROM.

  66..  LL''iinnssttaallllaattiioonn eenn ddttaaiillss

  66..11..  SSee pprrppaarreerr ppoouurr ll''iinnssttaallllaattiioonn

  Linux utilise les composants d'un PC plus efficacement que MS-DOS,
  Windows ou NT, et est donc moins tolrant vis  vis des matriels mal
  configurs. Il y a un minimum de choses  faire avant de commencer
  pour diminuer les risques d'tre arrt par ce genre de problmes.

  D'abord, rcuprez toutes les documentations que vous possdez sur
  votre matriel -- carte mre, carte vido, cran, modem, etc. -- et
  gardez-les  porte de main.

  Puis, rassemblez les informations dtailles sur votre configuration
  matrielle. Une faon de raliser cela facilement, si vous disposez de
  MS-DOS 5.0 ou suprieur, est d'imprimer un rapport en utilisant
  l'utilitaire de diagnostic  msd.exe  de Microsoft (vous pouvez
  ignorer les parties concernant les programmes rsidents, la carte
  mmoire, les chanes d'environnement et la version du systme). Entre
  autres choses, ceci vous garantit une information complte et correcte
  sur votre carte graphique et le type de votre souris, ce qui sera
  utile lors de la configuration de X.

  Enfin, vrifiez votre machine pour les problmes de configuration avec
  du matriel reconnu qui pourrait causer un bloquage irrcuprable
  pendant l'installation de Linux.


    Un systme DOS/Windows peut utiliser un (des) disque(s) dur(s) et
     un CD-ROM IDE mme si les jumpers matre/esclave ne sont pas
     correctement positionns sur ces disques. Linux ne fonctionne pas
     ainsi.  En cas de doute, vrifiez vos jumpers matre/esclave !

    Est-ce que l'un de vos priphriques ne possde ni jumper, ni
     mmoire de configuration non volatile ? Si c'est le cas, vous
     pouvez avoir besoin d'une initialisation au dmarrage via un
     utilitaire MS-DOS pour dmarrer, et il peut tre difficilement
     accessible par Linux. Les CD-ROMs, les cartes sons, les cartes
     Ethernet et les lecteurs de bande de bas de gamme peuvent avoir ce
     problme. Vous pourrez peut-tre contourner le problme au moyen de
     paramtres donns  l'invite du dmarrage ; lisez le  _L_i_n_u_x _B_o_o_t
     _P_r_o_m_p_t _H_O_W_T_O ,  <http://sunsite.unc.edu/LDP/HOWTO/BootPrompt-
     HOWTO.html> pour les dtails.

    Certains systmes d'exploitation permettent  une souris de type
     bus de partager une IRQ avec d'autres dispositifs. Linux ne le
     permet pas ; en fait, ce genre de choses peut entraner le bloquage
     de votre machine. Si vous utilisez une souris de type bus, lisez le
      _L_i_n_u_x _B_u_s _M_o_u_s_e _H_O_W_T_O ,
     <http://sunsite.unc.edu/LDP/HOWTO/Busmouse-HOWTO.html>, pour les
     dtails.

  Si possible, rcuprez le numro de tlphone d'un utilisateur Linux
  expriment que vous pourrez appeler en cas d'urgence. Neuf fois sur
  dix vous n'en n'aurez pas besoin, mais c'est rassurant de l'avoir.

  valuez le temps ncessaire  l'installation. Il sera d' peu prs une
  heure sur un systme vierge ou converti en tout Linux, ou jusqu'
  trois heures pour un systme  dual-boot  (ceux-ci ont un taux de
  mauvais dmarrage et de plantage bien plus lev).


  66..22..  CCrreerr lleess ddiissqquueetttteess ddee  bboooott  eett ddee  rroooott 

  Votre CD-ROM Linux peut contenir des aides  l'installation qui vous
  guideront de faon interactive pendant le processus de cration des
  disquettes de  boot , de  root  et de rcupration.  Ce peut tre
  un programme d'installation MS-DOS (comme le programme redhat.exe de
  Red Hat), un script Unix, ou les deux.

  Si vous avez un tel programme et que vous pouvez l'utiliser, lisez le
  reste de cette section seulement pour information. Lancez le programme
  pour raliser l'installation -- ses auteurs connaissent certainement
  mieux les spcificits de la distribution que moi, et vous viterez de
  nombreuses tapes manuelles sujettes aux erreurs.

  Des informations plus dtailles sur la faon de raliser les
  disquettes de  boot  et de  root  se trouvent dans le  _L_i_n_u_x
  _B_o_o_t_d_i_s_k _H_O_W_T_O  (  <http://sunsite.unc.edu/LDP/HOWTO/Bootdisk-
  HOWTO.html>).

  Votre premire tape sera de choisir une image de disquette de  boot
   convenant  votre matriel.  Si vous devez le faire manuellement,
  vous consterez gnralement que soit (a) les images de  boot  sur
  votre CD-ROM portent un nom qui vous aidera  trouver celle qui
  convient, soit (b) il y a un fichier index dcrivant chaque image.

  Puis, vous devrez crer des disquettes  partir de l'image  boot 
  que vous avez choisie, et  partir des images  root  et  rescue .
  C'est l que le programme MS-DOS RAWRITE.EXE entre en jeu.

  Ensuite, vous devrez avoir deux ou trois disquettes _h_a_u_t_e _d_e_n_s_i_t_
  formates MS-DOS.  (Elles doivent tre du mme type ; si le lecteur de
  disquettes sur lequel vous dmarrez est un lecteur 3.5", vos
  disquettes doivent toutes tre des disquettes haute densit de 3.5".)
  Vous utiliserez RAWRITE.EXE pour copier les images de  boot  et de 
  root  sur les disquettes.

  Appelez-le sans paramtre, de la faon suivante :


       C:\> RAWRITE


  Rpondez aux questions concernant le nom du fichier  copier et la
  disquette de destination (A:, par exemple). RAWRITE copiera le
  fichier, bloc par bloc, directement sur la disquette. Utilisez aussi
  RAWRITE pour l'image de la disquette  root  (COLOR144, par exemple).
  Quand c'est fait, vous avez deux disquettes : l'une est la disquette 
  boot , l'autre la disquette  root . Ces deux disquettes ne sont
  plus lisibles par MS-DOS (dans un certain sens, ce sont des disquettes
   formates Linux ).

  Vous pouvez utiliser les commandes dd(1) sur un systme UNIX pour
  faire la mme chose.  (Pour cela, vous aurez besoin d'une station de
  travail UNIX disposant d'un lecteur de disquettes, bien sr.) Par
  exemple, sur une station de travail Sun, avec un lecteur de disquette
  pilot par _/_d_e_v_/_r_f_d_0, vous pouvez utiliser la commande :



       $ dd if=bare of=/dev/rfd0 obs=18k




  Sur certaines stations de travail (celles de Sun, par exemple), vous
  devrez fournir en paramtre la bonne taille de bloc de sortie (le
  paramtre  obs ) ou la commande chouera. Si vous rencontrez des
  problmes, la page du manuel sur dd(1) peut s'avrer instructive.


  Assurez-vous d'utiliser des disquettes neuves et sans erreur. Les
  disquettes ne doivent pas avoir de blocs dfectueux.

  Vous n'avez pas besoin de faire tourner Linux ou MS-DOS pour installer
  Linux. Cependant, cela facilite la cration des disquettes de  boot 
  et de  root   partir de votre CD-ROM. Si vous n'avez pas de systme
  d'exploitation install sur votre machine, vous pouvez utiliser le
  Linux ou le MS-DOS de quelqu'un d'autre juste pour crer les
  disquettes, et installer  partir de l.


  66..33..  RReeppaarrttiittiioonnnneerr lleess ddiissqquueess DDOOSS//WWiinnddoowwss

  Sur beaucoup de systmes, le disque dur est dj consacr  des
  partitions MS-DOS, OS/2, etc. Vous devez modifier la taille de ces
  partitions pour faire de la place  Linux. Si vous comptez avoir un
  systme  dual boot , il vous est vivement conseill de lire un, ou
  plusieurs, des mini-HOWTOs suivants qui dcrivent certaines
  configurations  dual boot . (NdT : Les traductions franaises de ces
  documents se trouvent sur
  <http://www.lip6.fr/pub/linux/french/docs>.)


    Le DOS-Win95-OS2-Linux mini-HOWTO,
     <http://sunsite.unc.edu/LDP/HOWTO/mini/Linux+DOS+Win95+OS2.html>.

    Le Linux+Win95 mini-HOWTO,
     <http://sunsite.unc.edu/LDP/HOWTO/mini/Linux+Win95.html>

    Le Linux+NT mini-HOWTO,
     <http://sunsite.unc.edu/LDP/HOWTO/mini/Linux+NT-Loader.html>

  Mme s'ils ne sont pas directement applicables  votre systme, ils
  vous aideront  comprendre tout ce qui est mis en jeu.

  RREEMMAARRQQUUEE :: Certains Linux peuvent s'installer DANS un rpertoire de
  votre partition MS-DOS. (Ce qui n'est pas la mme chose qu'installer
  Linux  PARTIR d'une partition MS-DOS). Vous utiliserez alors le
  systme de fichiers  UMSDOS  qui vous permet de traiter un
  rpertoire de votre partition MS-DOS comme un systme de fichiers
  Linux. Vous n'aurez donc pas besoin de repartitionner votre disque
  dur.

  Je ne recommande cette mthode que dans le cas o votre disque a dj
  quatre partitions (c'est le maximum pour DOS) et qu'un repartionnement
  serait problmatique (il ralentirait Linux  cause du surcot engendr
  par la traduction des noms de fichiers). Une autre raison d'utiliser
  UMSDOS est que cela permet d'essayer Linux avant de repartitionner.
  Cependant, dans la majeure partie des cas, vous devrez repartitionner
  votre disque comme cela est dcrit ici. Si vous avez l'intention
  d'utiliser UMSDOS, vous devrez vous dbrouiller par vous-mme -- ce
  type d'installation n'est pas dcrit ici. A partir de maintenant, nous
  considrons que vous n'utilisez pas UMSDOS, et que vous devez
  repartitionner votre disque dur.

  Une _p_a_r_t_i_t_i_o_n est simplement une section du disque dur, rserve pour
  un systme d'exploitation particulier.  Si vous n'avez que MS-DOS
  install, votre disque dur n'a probablement qu'une seule partition qui
  lui est entirement consacre.  Pour utiliser Linux, il faut
  repartitionner le disque afin d'avoir une partition pour MS-DOS, et
  une (ou plusieurs) pour Linux.

  Il y a trois types de partitions : _p_r_i_m_a_i_r_e, __t_e_n_d_u_e, et _l_o_g_i_q_u_e.
  Sans entrer dans les dtails, les partitions primaires correspondent
  aux quatre partitions principales de votre disque. Cependant, si vous
  dsirez avoir plus de quatre partitions par disque, vous devez crer
  une partition tendue qui peut contenir plusieurs partitions logiques.
  On ne stocke pas les donnes directement sur une partition tendue --
  celle-ci ne sert qu' contenir les partitions logiques. Les donnes ne
  sont stockes que sur des partitions primaires ou logiques.

  Autrement dit, la plupart des gens n'utilisent que des partitions
  primaires. Cependant, si vous avez besoin de plus de quatre partitions
  sur un disque, vous devrez crer une partition tendue. Les partitions
  logiques seront ensuite cres dans la partition tendue et vous aurez
  alors plus de quatre partitions par disque.

  Notez aussi que vous pouvez facilement installer Linux sur le second
  disque de votre machine (D: sous MS-DOS). Il suffit de prciser le nom
  du priphrique appropri lors de la cration des partitions Linux.
  Ceci est dcrit en dtail plus loin.

  Revenons au repartitionnement du disque. Le problme avec le
  changement de taille des partitions est qu'il n'y a pas de moyen
  (facile) de le faire sans dtruire les donnes stockes dans ces
  partitions. Par consquent, vous devrez effectuer une sauvegarde
  complte de votre systme avant de repartitionner. Pour changer la
  taille d'une partition, on dtruit simplement la(les) partition(s), et
  on les recre avec des tailles infrieures.

  RREEMMAARRQQUUEE:: FIPS est un programme MS-DOS permettant de repartitionner un
  disque sans dtruire les donnes.  Allez voir la page
  <http://sunsite.unc.edu/pub/Linux/system/install>. Avec FIPS, un
  optimiseur disque (comme Norton Speed Disk), et un peu de chance, vous
  devriez pouvoir changer la taille de vos partitions MS-DOS sans perdre
  les donnes qui s'y trouvent. Il est quand mme recommand d'effectuer
  une sauvegarde totale avant de tenter cette opration.

  Si vous n'utilisez pas FIPS, la mthode classique pour modifier les
  partitions est d'utiliser le programme FDISK. Par exemple, supposons
  que vous ayez un disque dur de 80 Mo entirement ddi  MS-DOS. Vous
  voulez le couper en deux -- 40 Mo pour MS-DOS et 40 Mo pour Linux.
  Pour ce faire, lancez FDISK sous MS-DOS, dtruisez la partition MS-DOS
  de 80 Mo, et recrez une partition MS-DOS de 40 Mo  la place. Vous
  pouvez alors formater la nouvelle partition et rinstaller vos
  programmes MS-DOS  partir des sauvegardes. 40 Mo sur le disque sont
  inoccups. Plus tard, vous crerez des partitions Linux sur cette
  portion inutilise du disque.

  En rsum, pour modifier la taille de vos partitions MS-DOS avec
  FDISK, vous devez :

  1. Faire une sauvegarde complte de votre systme.

  2. Crer une disquette systme MS-DOS avec une commande comme :

       FORMAT /S A:


  3. Copier les fichiers FDISK.EXE et FORMAT.COM sur cette disquette,
     ainsi que tous les autres utilitaires dont vous pourriez avoir
     besoin. (Par exemple, ceux permettant de restaurer la sauvegarde).

  4. Redmarrer votre ordinateur  partir de cette disquette.

  5. Lancer FDISK, en lui prcisant ventuellement le disque  modifier
     (C: ou D:, par exemple).

  6. Utiliser les options du menu de FDISK afin de dtruire les
     partitions dont vous voulez changer la taille.  CCeettttee oopprraattiioonn
     ddttrruuiirraa ttoouutteess lleess ddoonnnneess ddee cceess ppaarrttiittiioonnss...

  7. Utiliser les options du menu de FDISK pour recrer ces partitions
     avec des tailles infrieures.

  8. Quitter FDISK et reformater les nouvelles partitions avec la
     commande FORMAT.

  9. Restaurez les fichiers originaux  partir de la sauvegarde.

  Notez que le FDISK de MS-DOS vous permettra de crer un  disque DOS
  logique . Un disque DOS logique est simplement une partition logique
  sur votre disque dur. Vous pouvez installer Linux sur une partition
  logique, mais ne la crez pas avec le programme FDISK de MS-DOS.
  Ainsi, si vous utilisez actuellement un disque DOS logique, et que
  vous voulez installer Linux  sa place, vous devez dtruire le disque
  logique avec le FDISK de MS-DOS, et (plus tard) crer une partition
  logique pour Linux  sa place.

  Le mcanisme utilis par OS/2 et d'autres systmes d'exploitation est
  similaire. Lisez la documentation de ces systmes pour obtenir les
  dtails.


  66..44..  CCrreerr ddeess ppaarrttiittiioonnss ppoouurr LLiinnuuxx

  Aprs avoir repartitionn votre disque, vous devez crer des
  partitions pour Linux. Avant d'expliquer comment faire, nous allons
  parler des partitions et des systmes de fichiers sous Linux.


  66..44..11..  PPaarrttiittiioonnss :: lleess bbaasseess

  Linux demande au moins une partition, pour le _s_y_s_t__m_e _d_e _f_i_c_h_i_e_r
  _r_a_c_i_n_e qui contiendra le noyau Linux.

  Vous pouvez vous reprsenter un _s_y_s_t__m_e _d_e _f_i_c_h_i_e_r_s comme une
  partition formate pour Linux.  Les systmes de fichiers servent 
  stocker les fichiers. Chaque systme doit avoir au moins un systme de
  fichiers racine. Cependant, de nombreux utilisateurs prfrent
  utiliser plusieurs systmes de fichiers -- un pour chaque partie
  importante de l'arborescence des rpertoires. Par exemple, vous pouvez
  crer un systme de fichiers spar pour y stocker tous les fichiers
  se trouvant sous le rpertoire _/_u_s_r.  (Notez que sur les systmes
  UNIX, ce sont les  /  qui dlimitent les rpertoires et non les '\'
  comme sous MS-DOS). En ce cas, vous aurez un systme de fichiers
  racine et un systme de fichiers _/_u_s_r.

  Chaque systme de fichiers ncessite sa propre partition. Par
  consquent, si vous utilisez les systmes de fichiers racine et _/_u_s_r,
  vous devrez crer deux partitions Linux.

  De plus, beaucoup d'utilisateurs crent une _p_a_r_t_i_t_i_o_n _d_e _s_w_a_p,
  utilise pour la mmoire virtuelle.  Si vous avez, disons, 4 Mo de
  mmoire installs sur votre machine, et une partition de swap de 10
  Mo, pour Linux vous aurez 14 Mo de mmoire virtuelle.

  Lorsqu'il utilise l'espace de swap, Linux dplace les pages mmoire
  inutilises pour les mettre sur le disque, ce qui permet d'excuter
  plus d'applications en mme temps sur votre systme. Cependant, ce
  dplacement est lent, et ne peut remplacer la mmoire physique relle.
  Les applications qui ncessitent beaucoup de mmoire (comme X-Window)
  utilisent souvent un espace de swap lorsqu'il n'ont pas assez de
  mmoire physique.

  Presque tous les utilisateurs de Linux emploient une partition de
  swap. Si vous avez 4 Mo de mmoire voire moins, une partition de swap
  est ncessaire pour installer Linux. De toutes faons, il est
  fortement recommand d'avoir une partition de swap, sauf si vous
  disposez de beaucoup de RAM physique.

  La taille de votre partition de swap dpend de vos besoins en mmoire
  virtuelle. On conseille souvent d'avoir au moins 16 Mo de mmoire
  virtuelle : par consquent, si vous avez 8 Mo de RAM physique, vous
  crerez une partition de swap de 8 Mo. Notez que les partitions de
  swap ne peuvent dpasser 128 Mo. Si vous avez besoin de plus de 128 Mo
  de swap, vous devrez donc crer plusieurs partitions de swap, et vous
  pouvez en avoir jusqu' 16 en tout.

  Vous trouverez plus d'informations sur la thorie de la configuration
  de l'espace de swap et sur le partitionnement des disques dans le
  _L_i_n_u_x _P_a_r_t_i_t_i_o_n _m_i_n_i_-_H_O_W_T_O (
  <http://sunsite.unc.edu/LDP/HOWTO/mini/Partition.html>).

  RReemmaarrqquuee :: Il est possible, bien qu'un peu dlicat, de partager les
  partitions de swap entre Linux et Windows 95 sur un systme  dual
  boot . Pour les dtails, consultez le _L_i_n_u_x _S_w_a_p _S_p_a_c_e _M_i_n_i_-_H_O_W_T_O,
  <http://sunsite.unc.edu/LDP/HOWTO/unmaintained/Swap-Space>.

  RReemmaarrqquuee ##11 :: Si vous avez un disque EIDE avec une partition dpassant
  504 Mo, votre BIOS peut ne pas vous permettre de dmarrer un systme
  Linux qui y serait install. Par consquent, mettez votre partition
  racine sous ces 504 Mo. Il ne devrait pas y avoir de problmes avec
  les disques SCSI qui ont gnralement leur propre BIOS disque.  Pour
  les dtails techniques, consultez le _L_a_r_g_e _D_i_s_k _M_i_n_i_-_H_O_W_T_O,
  <http://sunsite.unc.edu/LDP/HOWTO/mini/Large-Disk.html>.

  RReemmaarrqquuee ##22 :: Vous mlangez les disques IDE et SCSI ?  Alors
  attention. Votre BIOS ne vous permettra peut-tre pas de dmarrer
  directement  partir d'un disque SCSI.


  66..44..22..  TTaaiillllee ddeess ppaarrttiittiioonnss

  A ct de vos partitions racine et de swap, vous crerez une ou
  plusieurs partitions pour y mettre vos programmes et les rpertoires
  d'accueil des utilisateurs.

  Bien, qu'en thorie, vous puissiez tout faire marcher avec une seule
  grosse partition, presque personne ne le fait. Disposer de plusieurs
  partitions a de nombreux avantages :


    souvent, cela diminue le temps ncessaire aux vrifications des
     systmes de fichiers qui sont effectues au dmarrage ;

    les fichiers ne peuvent grandir au del des frontires de
     partitions. En consquence, vous pouvez utiliser ces frontires de
     partition comme des protections contre les programmes (comme les
     news Usenet) qui voudraient consommer d'normes quantits de
     disque, afin de les empcher de surpeupler l'espace disque
     ncessaire  votre noyau et au reste de vos applications ;

    si jamais vous avez un problme sur votre disque, formater et
     rcuprer une seule partition est une opration moins pnible que
     d'avoir  tout refaire en partant de zro.

  Sur les disques actuels, une bonne configuration de base consiste en
  une petite partition racine (moins de 80 Mo), une partition _/_u_s_r
  moyenne (environ jusqu' 300 Mo) pour contenir les logiciels systmes,
  et une partition _/_h_o_m_e occupant le reste de l'espace disque disponible
  pour les rpertoires utilisateurs.


  Vous pouvez faire des choses plus labores. Par exemple, si vous
  savez que vous allez utiliser les forums Usenet, vous pouvez leur
  attribuer une partition qui leur sera ddie afin de contrler leur
  occupation disque maximale, ou crer une partition _/_v_a_r regroupant les
  fichiers du courrier, des news, et les fichiers temporaires. Mais, 
  l'heure des disques de trs grandes capacits et trs peu chers, ces
  complications semblent de moins en moins ncessaires pour les
  premires installations Linux. Pour votre premier essai, surtout,
  restez simple.


  66..55..  DDmmaarrrreerr llaa ddiissqquueettttee dd''iinnssttaallllaattiioonn

  La premire tape consiste  lancer la disquette de boot que vous avez
  cre. Normalement, tout devrait se passer sans problme ; le prompt
  de dmarrage du noyau devrait se terminer automatiquement aprs 10
  secondes. Normalement, c'est ainsi que vous dmarrerez  partir d'un
  disque IDE.

  En donnant certaines options  la suite du nom du noyau, vous pouvez
  prciser diffrents paramtres matriels, comme l'IRQ et l'adresse de
  votre contrleur SCSI, ou la gomtrie du disque, avant de lancer le
  noyau Linux. Ce sera peut-tre ncessaire si Linux ne dtecte pas
  votre contrleur SCSI ou la gomtrie de votre disque, par exemple.

  Notamment, de nombreux contrleurs SCSI ncessitent de spcifier
  l'adresse du port et l'IRQ au moment du dmarrage. De mme, les
  machines PS/1, ThinkPad, et ValuePoint d'IBM ne mmorisent pas la
  gomtrie des disques dans la CMOS, et vous devrez alors la spcifier
  au dmarrage. (Plus tard, vous saurez configurer votre systme afin
  qu'il fournisse lui-mme ces paramtres.)

  Faites attention aux messages qui s'affichent lors du dmarrage du
  systme. Ils numreront et dcriront le matriel que votre
  installation Linux a dtect. Notamment, si vous avez un contrleur
  SCSI, vous devriez voir une liste des htes SCSI dtects. Si vous
  voyez le message



       SCSI: 0 hosts




  Cela veut dire que votre contrleur SCSI n'a pas t reconnu, et que
  vous devez vous poser la question de savoir comment informer le noyau
  de son emplacement.

  Le systme affichera aussi des informations sur les partitions et les
  priphriques dtects. Si l'une de ces informations n'est pas
  correcte, ou manque, vous devrez provoquer une dtection du matriel.

  Si tout va bien et que votre matriel semble avoir t reconnu, vous
  pouvez passer  la section suivante,  Utiliser la disquette root .

  Pour forcer la dtection de votre matriel, vous devez entrer les
  paramtres corrects au prompt du dmarrage en utilisant la syntaxe
  suivante :



       linux <paramtres...>



  Un bon nombre de paramtres sont disponibles ; nous donnons ci-dessous
  la liste des plus courants. Les disquettes de boot Linux rcentes vous
  permettront, le plus souvent, de consulter un cran d'aide dcrivant
  ceux-ci avant de dmarrer.


    _h_d_=_c_y_l_i_n_d_r_e_s_,_t__t_e_s_,_s_e_c_t_e_u_r_s Prcise la gomtrie du disque dur.
     Ncessaire pour des machines comme le PS/1, ValuePoint, et ThinkPad
     d'IBM.  Par exemple, si votre disque dur a 683 cylindres, 16 ttes
     et 32 secteurs par piste, entrez :



       linux hd=683,16,32





    _t_m_c_8_x_x_=_m_e_m_a_d_d_r_,_i_r_q Prcise l'adresse et l'IRQ pour les contrleurs
     SCSI TMC-8xx de Future Domain. Par exemple :



       linux tmc8xx=0xca000,5





  Notez que le prfixe _0_x doit tre utilis pour les valeurs exprimes
  en hexadcimal.  Ceci est vrai pour toutes les options suivantes.

    _s_t_0_x_=_m_e_m_a_d_d_r_,_i_r_q Prcise l'adresse et l'IRQ pour les contrleurs
     STO2 de Seagate.

    _t_1_2_8_=_m_e_m_a_d_d_r_,_i_r_q Prcise l'adresse et l'IRQ pour les contrleurs
     T128B de Trantor.

    _n_c_r_5_3_8_0_=_p_o_r_t_,_i_r_q_,_d_m_a Prcise le port, l'IRQ, et le canal DMA pour
     les contleurs NCR5380 gnriques.

    _a_h_a_1_5_2_x_=_p_o_r_t_,_i_r_q_,_s_c_s_i___i_d_,_1 Prcise le port, l'IRQ et
     l'identificateur SCSI pour les contrleurs AIC-6260. Ceci
     s'applique aux contrleurs Adaptec 1510, 152x, et Soundblaster-
     SCSI.

  Si vous avez des questions sur ces options de dmarrage, lisez le _S_C_S_I
  _H_O_W_T_O, disponible sur tous les sites archives FTP Linux (NdT : Une
  version franaise se trouve, comme pour tous les autres HOWTOs
  traduits, sur <ftp://ftp.lip6.fr/pub/linux/french>). Ce document
  explique la compatibilit Linux et le SCSI bien plus en dtail.


  66..66..  UUttiilliisseerr llaa ddiissqquueettttee rroooott

  Aprs le dmarrage de la disquette de boot, vous serez invit 
  insrer la ou les disquettes root. tez la disquette de boot du
  lecteur, insrez la disquette root, puis tapez _E_n_t_r__e pour continuer.
  ventuellement, une deuxime disquette root vous sera demande.

  Ce qui se passe, en fait, c'est que la disquette boot fournit un mini-
  systme d'exploitation qui (parce que le disque dur n'est pas prpar)
  utilise une partie de la RAM comme un disque virtuel (appel, assez
  logiquement, un  ramdisk ).

  Les disquettes root chargent sur le ramdisk un petit nombre de
  fichiers et d'outils d'installation que vous utiliserez pour prparer
  votre disque dur et installer Linux dessus  partir de votre CD-ROM.


  66..66..11..  CChhooiissiirr uunnee iinnssttaallllaattiioonn EEGGAA oouu XX

  Cette tape ralise, les anciens Linux (dont la Slackware) lanaient
  un shell et vous demandaient d'entrer manuellement les commandes
  d'installation dans un ordre dtermin. Ceci est encore possible, mais
  les versions plus rcentes dmarrent en lanant un programme
  d'installation fentr qui vous guide de faon interactive  travers
  ces tapes en vous fournissant un maximum d'aide.

  Vous aurez srement la possibilit de configurer X, ainsi le programme
  d'installation pourra tre graphique. Si vous choisissez cette faon
  de faire, le programme d'installation vous questionnera sur votre
  souris et votre type d'cran avant de commencer l'installation
  proprement dite. Lorsque l'installation de Linux aura t ralise,
  cette configuration sera sauvegarde. Vous pourrez affiner le
  fonctionnement de votre cran plus tard, par consquent, lors de cette
  tape, vous pouvez commencer avec un mode SVGA 640x480 de base.

  X n'est pas ncessaire pour l'installation, mais (en supposant que
  l'on sache configurer la souris et l'cran), beaucoup de gens trouvent
  l'interface graphique plus facile  utiliser. De toutes faons, vous
  serez amens  installer X, donc le faire ds le dbut est une chose
  plutt sense.

  Suivez simplement les indications du programme. Elles vous guideront 
  travers les tapes ncessaires  la prparation du disque,  la
  cration des comptes utilisateurs et  l'installation des paquetages 
  partir du CD-ROM.

  Dans les sections suivantes, nous dcrirons quelques parties pineuses
  de l'installation comme si vous les ralisiez  la main. Ceci devrait
  vous aider  comprendre ce que fait le programme d'installation, et
  pourquoi.


  66..66..22..  UUttiilliisseerr ffddiisskk  eett ccffddiisskk

  Votre premire tape d'installation, une fois que la disquette root
  Linux a t lance, sera de crer ou d'diter les tables de partitions
  de vos disques. Mme si vous avez dj utilis FDISK pour configurer
  vos partitions, vous devez revenir  la table des partitions et
  rajouter des informations spcifiques  Linux.

  Pour crer ou diter des partitions Linux, nous utiliserons la version
  Linux du programme fdisk, ou sa version oriente cran cfdisk.

  En gnral, le programme d'installation recherchera une table des
  partitions dj existante et proposera de lancer fdisk ou cfdisk sur
  elle pour vous. Des deux programmes, cfdisk est vraiment le plus
  facile  utiliser, mais ses versions actuelles sont aussi moins
  tolrantes vis  vis d'une table de partitions inexistante ou mal
  faite.

  Par consquent, vous pouvez (surtout si vous faites une installation
  sur du matriel vierge) devoir commencer avec fdisk afin de vous
  placer dans une situation que cfdisk saura grer.  Essayez de lancer
  cfdisk ; s'il y a des problmes, lancez fdisk.  (Une bonne faon de
  procder, si vous crez un systme tout Linux et que cfdisk provoque
  des erreurs, est d'utiliser fdisk pour dtruire toutes les partitions
  existantes et de relancer cfdisk pour diter la table vide.)

  Quelques remarques sur fdisk et cfdisk : les deux programmes prennent
  en paramtre le nom du disque sur lequel vous souhaitez crer les
  partitions Linux. Les noms des pilotes de disques durs sont :


    _/_d_e_v_/_h_d_a Premier disque IDE

    _/_d_e_v_/_h_d_b Second disque IDE

    _/_d_e_v_/_s_d_a Premier disque SCSI

    _/_d_e_v_/_s_d_b Second disque SCSI

  Par exemple, pour crer des partitions Linux sur le premier disque dur
  SCSI de votre systme, utilisez la commande (votre programme
  d'installation peut la gnrer  partir d'un choix du menu) :


       cfdisk /dev/sda


  Si vous utilisez fdisk ou cfdisk sans paramtre, _/_d_e_v_/_h_d_a est pris par
  dfaut.

  Pour crer des partitions Linux sur le second disque de votre systme,
  spcifiez simplement soit _/_d_e_v_/_h_d_b (pour un disque IDE), soit _/_d_e_v_/_s_d_b
  (pour un disque SCSI) au moment de lancer fdisk.

  Vos partitions Linux n'ont pas besoin d'tre toutes sur le mme
  disque. Par exemple, vous pouvez crer la partition du systme de
  fichier racine sur _/_d_e_v_/_h_d_a et votre partition de swap sur _/_d_e_v_/_h_d_b.
  Pour ce faire, lancez simplement fdisk ou cfdisk une seule fois pour
  chaque disque.

  Sous Linux, les partitions ont un nom bas sur le disque auquel elles
  appartiennent. Par exemple, la premire partition du disque _/_d_e_v_/_h_d_a
  s'appelle _/_d_e_v_/_h_d_a_1, la seconde _/_d_e_v_/_h_d_a_2, et ainsi de suite. Si vous
  avez des partitions logiques, elles sont numrotes en partant de
  _/_d_e_v_/_h_d_a_5, _/_d_e_v_/_h_d_a_6 etc.

  RREEMMAARRQQUUEE :: Il est prfrable de ne pas crer, ou dtruire, des
  partitions d'autres systmes d'exploitation que Linux avec les
  programmes fdisk ou cfdisk de Linux. Autrement dit, ne crez pas ou ne
  supprimez pas des partitions MS-DOS avec cette version de fdisk ;
  utilisez plutt la version MS-DOS de FDISK. Si vous essayez de crer
  une partition MS-DOS avec le fdisk de Linux, il y a de grandes chances
  pour que MS-DOS ne reconnaisse pas cette partition et ne se lance pas
  correctement.

  Voici un exemple d'utilisation de fdisk. Nous avons une unique
  partition MS-DOS occupant 61693 blocs sur le disque, le reste est
  disponible pour Linux. Sous Linux, un bloc fait 1024 octets, par
  consquent 61693 blocs reprsentent  peu prs 61 Mo. Nous ne crerons
  que deux partitions dans cet exemple : une pour le swap et une pour la
  racine.  Vous tendrez probablement cette configuration  quatre
  partitions en ligne selon les recommandations suivantes : une pour le
  swap, une pour le systme de fichiers racine, une pour les logiciels
  systmes et une pour la zone des rpertoires des utilisateurs.

  D'abord, nous utilisons la commande  p  pour afficher la table de
  partition courante. Comme on peut le constater, _/_d_e_v_/_h_d_a_1 (la premire
  partition de _/_d_e_v_/_h_d_a) est une partition DOS de 61693 blocs.




  Command (m for help):   p
  Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
  Units = cylinders of 608 * 512 bytes

       Device Boot  Begin   Start     End  Blocks   Id  System
    /dev/hda1   *       1       1     203   61693    6  DOS 16-bit >=32M

  Command (m for help):




  Puis, nous utilisons la commande  n  pour crer une nouvelle
  partition. La partition racine Linux aura une taille de 80 Mo.



       Command (m for help):  n
       Command action
           e   extended
           p   primary partition (1-4)
       p




  On nous donne alors le choix entre la cration d'une partition tendue
  ou primaire. Dans la plupart des cas, on utilisera des partitions
  primaires,  moins que l'on ait besoin de plus de quatre partitions
  sur un mme disque. Voir la section sur le repartitionnement, ci-
  dessous, pour plus d'informations.



       Partition number (1-4): 2
       First cylinder (204-683):  204
       Last cylinder or +size or +sizeM or +sizeK (204-683): +80M




  Le premier cylindre doit tre le premier cylindre libre APRS la fin
  de la partition prcdente..  Dans notre cas, _/_d_e_v_/_h_d_a_1 se termine sur
  le cylindre 203, nous dmarrerons donc la nouvelle partition au
  cylindre 204.

  Comme on peut le constater, si l'on utilise la notation  +80M ,
  celle-ci spcifie une partition de 80 Mo. De mme, la notation  +80K
   spcifierait une partition de 80 Ko, et  +80  une partition qui ne
  ferait que 80 octets.



       Warning: Linux cannot currently use 33090 sectors of this partition




  Si vous voyez cet avertissement, vous pouvez l'ignorer. Il provient
  d'une ancienne restriction qui limitait les systmes de fichiers Linux
   64 Mo. Cependant, avec les nouveaux types de systmes de fichiers,
  ce n'est plus le cas... Les partitions peuvent aller jusqu' 4 To.

  Puis, nous creons notre partition de swap de 10 Mo, _/_d_e_v_/_h_d_a_3.


       Command (m for help): n
       Command action
           e   extended
           p   primary partition (1-4)
       p

       Partition number (1-4): 3
       First cylinder (474-683):  474
       Last cylinder or +size or +sizeM or +sizeK (474-683):  +10M




   nouveau, nous affichons le contenu de la table de partition.
  Assurez-vous de noter ces informations, notamment la taille de chaque
  partition en blocs. Vous aurez besoin de celles-ci plus tard.



       Command (m for help): p
       Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
       Units = cylinders of 608 * 512 bytes

            Device Boot  Begin   Start     End  Blocks   Id  System
         /dev/hda1   *       1       1     203   61693    6  DOS 16-bit >=32M
         /dev/hda2         204     204     473   82080   83  Linux native
         /dev/hda3         474     474     507   10336   83  Linux native




  Notez que la partition de swap Linux (ici, _/_d_e_v_/_h_d_a_3) a le type 
  Linux native . On doit changer ce type en  Linux swap  afin que le
  programme d'installation la reconnaisse comme partition de swap. Pour
  ce faire, on utilise la commande  t  de fdisk :



       Command (m for help): t
       Partition number (1-4): 3
       Hex code (type L to list codes): 82




  Si vous utilisez  L  pour obtenir la liste des types, vous verrez
  que 82 est le type qui correspond au swap Linux.

  Pour quitter fdisk et sauvegarder les changements dans la table de
  partition, on utilise la commande  w . Pour quitter fdisk SANS
  sauvegarder les changements, on utilise la commande  q .

  Aprs avoir quitt fdisk, le systme peut vous demander de relancer le
  systme afin d'tre sr que les modifications soient prises en compte.
  En gnral, on n'a pas besoin de redmarrer aprs avoir utilis fdisk
  -- les versions rcentes de fdisk et cfdisk sont suffisamment volues
  pour mettre  jour les partitions sans redmarrer.


  66..66..33..  ttaappeess ssuuiivvaanntteess

  Aprs avoir dit les tables de partitions, le programme
  d'installation devrait les consulter et vous proposer d'activer la
  partition de swap. Rpondez oui.


  (Attention, il se peut que, sur un systme  dual boot , l'une des
  partitions non Linux apparaisse comme une partition de swap)

  Puis, le programme vous demandera d'associer des noms de systmes de
  fichiers Linux (comme _/_, _/_u_s_r_, _/_v_a_r_, _/_t_m_p_, _/_h_o_m_e_, _/_h_o_m_e_2, etc.) 
  chacune des partitions non swap que vous dsirez utiliser.

  Il existe une seule rgle pour cela. Il doit y avoir un systme de
  fichiers racine, appel _/, et on doit pouvoir dmarrer dessus.  Vous
  pouvez appeler vos autres partitions Linux comme vous voulez, mais
  certaines conventions concernant leurs noms vous simplifieront
  probablement la vie plus tard.

  Plus haut, je recommandais une configuration base sur trois
  partitions comprenant une petite racine, une partition systme moyenne
  et une grosse partition utilisateur. Traditionnellement, elles doivent
  s'appeler _/_, _/_u_s_r, et _/_h_o_m_e.  Le nom peu intuitif  _/_u_s_r  vient des
  temps o les systmes Unix (beaucoup plus petits) mlangaient les
  logiciels systmes et les rpertoires utilisateurs sur une seule
  partition non racine.  Le fonctionnement de certains logiciels dpend
  de son existence.

  Si vous avez plus d'une zone pour les rpertoires des utilisateurs, la
  convention veut qu'on les nomme _/_h_o_m_e_, _/_h_o_m_e_2_, _/_h_o_m_e_3, etc.  Ceci peut
  arriver lorsque l'on a deux disques physiques. Sur mon systme, par
  exemple, la configuration est la suivante :



       Filesystem         1024-blocks  Used Available Capacity Mounted on
       /dev/sda1              30719   22337     6796     77%   /
       /dev/sda3             595663  327608   237284     58%   /usr
       /dev/sda4            1371370    1174  1299336      0%   /home
       /dev/sdb1            1000949  643108   306130     68%   /home2




  En ralit, le second disque (sdb1) n'est pas entirement ddi 
  _/_h_o_m_e_2 ; les partitions de swap sur sda et sdb ne sont pas montres
  dans cette liste. Vous pouvez constater que _/_h_o_m_e est l'importante
  zone libre sur sda et _/_h_o_m_e_2 la zone utilisateurs sur sdb.

  Si vous voulez crer une partition pour les fichiers spool,
  temporaires, de courriers, et des news, appelez-la _/_v_a_r. Sinon, faites
  un _/_u_s_r_/_v_a_r et crez un lien symbolique nomm _/_v_a_r pointant dessus (le
  programme d'installation peut vous proposer de le faire).


  66..77..  IInnssttaalllleerr lleess ppaaqquueettaaggeess

  Lorsque vos partitions ont t prpares, le reste de l'installation
  est presque automatique. Votre programme d'installation (qu'il soit
  EGA ou X) vous guidera  travers une srie de menus qui vous
  permettront de spcifier le CD-ROM  partir duquel vous installez, les
  partitions  utiliser, etc.

  Nous n'allons pas dcrire ici la plupart des spcificits de cette
  tape de l'installation. C'est une des parties qui varie le plus entre
  les distributions Linux (gnralement, les distributeurs y rivalisent
  entre eux pour valoriser leur produit), mais c'est aussi la plus
  simple. Les programmes d'installation sont plutt bien auto-documents
  et avec de bons crans d'aide.



  66..88..  AApprrss ll''iinnssttaallllaattiioonn ddeess ppaaqquueettaaggeess

  Lorsque l'installation est finie, et que tout s'est bien pass, le
  programme d'installation vous proposera plusieurs options pour
  configurer votre systme avant son premier dmarrage  partir du
  disque dur.


  66..88..11..  LLIILLOO,, llee LLIInnuuxx LLOOaaddeerr

  LILO (qui signifie LInux LOader) est un programme vous permettant de
  lancer Linux (ainsi que d'autres systmes d'exploitation comme MS-DOS)
   partir de votre disque dur.

  On peut vous donner la possibilit d'installer LILO sur votre disque
  dur. A moins que vous n'utilisiez OS/2, rpondez  oui . OS/2 a des
  besoins particuliers, voir ``Custom LILO Configuration'' ci-dessous.

  Installer LILO comme chargeur principal vite d'avoir besoin d'une
  disquette de dmarrage ; au lieu de cela,  chaque dmarrage, vous
  pouvez indiquer  LILO quel systme lancer.


  66..88..22..  CCrreerr uunnee ddiissqquueettttee ddee ddmmaarrrraaggee ((ooppttiioonn))

  Il est possible que l'on vous propose de crer une  disquette de
  dmarrage standard , que vous pourrez utiliser pour lancer votre
  systme Linux nouvellement install. (Il s'agit d'une ancienne
  mthode, plutt peu pratique, qui suppose que vous dmarrez
  normalement sur DOS et que vous utilisez une disquette de dmarrage
  pour lancer Linux.)

  Pour la crer, vous aurez besoin d'une disquette haute-densit,
  formate MS-DOS et vierge. Insrez celle-ci lorsqu'on vous le demande
  et la disquette de dmarrage sera gnre. (Ce n'est pas la mme chose
  qu'une disquette de dmarrage d'installation, et vous ne pouvez
  remplacer l'une par l'autre !)


  66..88..33..  CCoonnffiigguurraattiioonnss ssyyssttmmee ddiivveerrsseess

  La procdure qui suit l'installation peut aussi vous conduire 
  travers diffrents menus vous permettant de configurer votre systme.
  Ceci comprend la spcification de votre modem et de votre souris,
  ainsi que votre zone horaire. Laissez-vous guider par les options du
  menu.

  Elle peut aussi vous demander de crer des comptes utilisateurs ou de
  donner un mot de passe pour le compte root (administrateur). Ce n'est
  pas compliqu et vous n'avez qu' suivre les instructions affiches 
  l'cran.


  77..  DDmmaarrrreerr vvoottrree nnoouuvveeaauu ssyyssttmmee

  Si tout se passe comme prvu, vous devriez pouvoir dmarrer Linux 
  partir du disque dur en utilisant LILO.  Sinon, vous devriez pouvoir
  lancer votre disquette de dmarrage Linux (pas la disquette de
  dmarrage originale, mais celle cre aprs l'installation des
  paquetages). Aprs le dmarrage, loggez vous sous le login _r_o_o_t. Bravo
  !  Vous avez votre systme Linux personnel.

  Si vous dmarrez en utilisant LILO, essayez de presser les touches
  _s_h_i_f_t ou _c_o_n_t_r__l_e pendant le dmarrage. Ceci vous prsentera une
  invite de dmarrage ; pressez la touche _t_a_b pour avoir la liste des
  options. De cette faon, vous pourrez lancer Linux, MS-DOS, ou
  n'importe quel systme directement  partir de LILO.


  88..  AApprrss vvoottrree pprreemmiieerr ddmmaarrrraaggee

  Vous devriez maintenant voir l'invite de login de Linux. Flicitations
  !


  88..11..  DDbbuutt ddee ll''aaddmmiinniissttrraattiioonn ssyyssttmmee

  Selon les phases d'installation, vous pouvez maintenant tre amens 
  crer des comptes, changer le nom de votre machine, ou (re)configurer
  X. Il y a beaucoup d'autres choses que vous pouvez mettre en place et
  configurer, par exemple les dispositifs de sauvegarde, les liaisons
  SLIP/PPP vers un fournisseur d'accs Internet, etc.

  Un bon livre sur l'administration des systmes UNIX devrait vous y
  aider. Je suggre _E_s_s_e_n_t_i_a_l _S_y_s_t_e_m_s _A_d_m_i_n_i_s_t_r_a_t_i_o_n, dit par O'Reilly
  and Associates (NDT: disponible en franais sous le titre  _L_e_s _b_a_s_e_s
  _d_e _l_'_a_d_m_i_n_i_s_t_r_a_t_i_o_n _s_y_s_t__m_e ).  Vous devriez aussi lire les divers
  autres HOWTOs Linux, comme le _N_E_T_-_3_-_H_O_W_T_O et _P_r_i_n_t_i_n_g_-_H_O_W_T_O (NDT :
  disponibles en franais, comme la majeure partie des autres HOWTOS ,
  sur ftp.lip6.fr/pub/linux), pour obtenir des informations sur les
  autres tches de configuration.


  88..22..  CCoonnffiigguurraattiioonn ppeerrssoonnnnaalliissee ddee LLIILLOO

  LILO est un chargeur de boot pouvant tre utilis pour choisir soit
  Linux, soit MS-DOS ou un autre systme d'exploitation au dmarrage. Il
  y a de grandes chances pour que votre distribution ait automatiquement
  configur LILO pour vous lors de l'installation ( moins que vous
  n'utilisiez OS/2, c'est ce que vous devriez avoir fait). Si c'est le
  cas vous pouvez sauter le reste de cette section.

  Si vous avez install LILO comme chargeur de boot _p_r_i_n_c_i_p_a_l, celui-ci
  prendra en charge la premire tape du processus de dmarrage pour
  tous les systmes d'exploitation prsents sur votre disque. Ceci
  fonctionne bien si MS-DOS est le seul autre systme d'exploitation
  install. Cependant, vous pouvez aussi utiliser OS/2, qui a son propre
  gestionnaire de dmarrage. En ce cas, le gestionnaire de dmarrage
  d'OS/2 doit tre le chargeur de boot principal et vous n'utiliserez
  LILO (comme chargeur de boot _s_e_c_o_n_d_a_i_r_e) que pour lancer Linux.

  Remarque importante pour ceux qui utilisent des systmes EIDE : 
  cause d'une limitation du BIOS, vos secteurs de boot doivent se
  trouver sur l'un des deux premiers disques physiques, ceci quel que
  soit le systme d'exploitation. Sinon, LILO s'arrtera aprs avoir
  affich  LI , d'o que vous le lanciez.

  Si vous devez configurer LILO manuellement, il faudra diter le
  fichier _/_e_t_c_/_l_i_l_o_._c_o_n_f. Nous prsentons ci-dessous un exemple de
  fichier de configuration LILO, o la partition racine de Linux se
  trouve sur _/_d_e_v_/_h_d_a_2, et o MS-DOS est install sur _/_d_e_v_/_h_d_b_1 (second
  disque dur).










  # Indique  LILO qu'il doit s'installer comme chargeur principal sur /dev/hda.
  boot = /dev/hda
  # Image de dmarrage  installer ; vous n'avez probablement pas  la changer
  install = /boot/boot.b

  # Enchainement pour le dmarrage de Linux.
  image = /vmlinuz       # Le noyau est dans /vmlinuz
    label = linux        # on lui donne le nom "linux"
    root = /dev/hda2     # on utilise /dev/hda2 comme systme de fichiers racine
    vga = ask            # Demande pour le mode VGA
    append = "aha152x=0x340,11,7,1"  # Ajoutez ceci aux options de dmarrage,
                                     # pour dtecter le contrleur SCSI

  # Enchainement pour le dmarrage de MS-DOS
  other = /dev/hdb1      # La partition MS-DOS
    label = msdos        # on lui donne le nom "msdos"
    table = /dev/hdb     # Table de partition pour le second disque




  Aprs avoir dit _/_e_t_c_/_l_i_l_o_._c_o_n_f, lancez la commande /sbin/lilo sous
  le compte _r_o_o_t. Ceci installera LILO sur votre disque.  Notez que vous
  devez relancer /sbin/lilo  chaque recompilation de votre noyau afin
  de faire correctement pointer le chargeur de boot sur le nouveau noyau
  (vous n'avez pas besoin de vous soucier de cela pour le moment, mais
  rappelez-vous en).

  Remarquez comment l'option _a_p_p_e_n_d est utilise dans _/_e_t_c_/_l_i_l_o_._c_o_n_f
  pour spcifier les paramtres de dmarrage comme nous l'avons fait
  lorsque nous avons dmarr  partir de la disquette de boot.

  Vous pouvez maintenant relancer votre systme  partir du disque dur.
  Par dfaut, LILO lancera le premier systme d'exploitation prsent
  dans la liste du fichier de configuration : Linux dans notre cas. Afin
  de disposer d'un menu de dmarrage vous permettant de choisir un autre
  systme d'exploitation, maintenez les touches _s_h_i_f_t ou _c_t_r_l enfonces
  pendant que le systme dmarre ; vous devriez voir le message suivant
  (ou quivalent) :

       Boot:


  Entrez alors le nom du systme d'exploitation que vous voulez lancer
  (donn par la ligne _l_a_b_e_l du fichier de configuration ; ici, soit
  _l_i_n_u_x soit _m_s_d_o_s), ou pressez _t_a_b pour en avoir la liste.

  (NtT : Attention,  ce moment votre clavier est encore en QWERTY !)

  Supposons maintenant que vous utilisiez LILO comme chargeur de boot
  secondaire ; si vous voulez lancer Linux  partir du gestionnaire de
  dmarrage d'OS/2, par exemple. Afin de dmarrer une partition Linux 
  partir du gestionnaire de dmarrage d'OS/2, malheureusement, vous
  devez crer la partition en utilisant le FDISK d'OS/2 (pas celui de
  Linux), et formater celle-ci en type FAT ou HPFS pour qu'OS/2 la
  reconnaisse. (Merci IBM...)

  Afin que LILO lance Linux  partir du gestionnaire de dmarrage
  d'OS/2, installez LILO sur votre systme de fichiers racine
  (_/_d_e_v_/_h_d_a_2, dans l'exemple). En ce cas, le fichier de configuration
  devrait ressembler  ceci :





  boot = /dev/hda2
  install = /boot/boot.b
  compact

  image = /vmlinuz
    label = linux
    root = /dev/hda2
    vga = ask




  Notez le changement dans la ligne _b_o_o_t . Aprs avoir lanc /sbin/lilo
  vous devriez pouvoir ajouter la partition Linux au gestionnaire de
  dmarrage. Ce mcanisme devrait fonctionner pour les chargeurs de boot
  d'autres systmes d'exploitation.


  99..  AAddmmiinniissttrriivviiaa


  99..11..  CCoonnddiittiioonnss dd''uuttiilliissaattiioonnss

  Ce document est copyright 1998 par Eric S. Raymond. Vous pouvez
  l'utiliser, le distribuer et le reproduire librement  condition de :


    ne pas omettre ou modifier cette note de copyright ;

    ne pas omettre ou modifier le numro de version et la date ;

    ne pas omettre ou modifier le pointeur du document sur la version
     WWW actuelle ;

    clairement indiquer les versions rsumes ou modifies comme
     telles.

  Ces restrictions sont destines  protger les lecteurs potentiels
  contre des versions obsoltes ou mutiles. Si vous pensez avoir une
  bonne raison qui pourrait justifier une exception, demandez-le moi.


  99..22..  RReemmeerrcciieemmeennttss

  Merci  Matt D. Welsh, qui est  l'origine de ce HOWTO. J'ai t
  beaucoup des contenus spcifiques  la distribution Slackware et
  recentr le reste de ce document sur une installation CD-ROM, mais une
  part importante de son contenu est toujours de lui.

  La version 4.1 a t susbtanciellement amliore par les suggestions
  de David Shao <dshao@best.com>.















  Java CGI HOWTO
  David H. Silber dhs@orbits.com.
  v0.4, 18 Novembre 1996.

  Ce  document  vous  explique  comment  convaincre  votre  serveur  WWW
  d'utiliser des programmes de CGI ecrits en Java, et montre l'emploi de
  Java  dans  l'ecriture  de  programmes  de  CGI. Bien que les HOWTO se
  restreignent en principe au systeme Linux, celui-ci est independant de
  la  version d'Unix utilisee. _T_r_a_d_u_c_t_i_o_n _: _X_a_v_i_e_r _C_a_z_i_n_, _l_e _2_7 _n_o_v_e_m_b_r_e
  _1_9_9_7.

  11..

  IInnttrroodduuccttiioonn

  Par construction du language, les variables d'environnement du systeme
  ne  sont pas facilement accessibles au programmeur Java. Par ailleurs,
  le JDK (Java Development Kit)  rend  impossible  l'invocation  directe
  d'un  programme, ce qui ne facilite pas le traitement standard par CGI
  des formulaires HTML. On peut contourner ces limitations de  plusieurs
  facons.   Vous   saurez  comment  j'ai  implemente  l'une  d'elles  en
  poursuivant votre lecture.

  11..11..

  PPrree--rreeqquuiiss

  Je considere que vous etes familiarise avec les  principes  qui  sous-
  tendent  HTML et CGI, et que vous possedez un minimum de connaissances
  de votre serveur HTTP. La programmation Java ne  devra  pas  non  plus
  vous  etre  etrangere,  a defaut de quoi ce qui va suivre ne vous sera
  pas tres parlant.

  11..22..

  CCee ddooccuummeenntt

  http://www.orbits.com/software/Java_CGI.html  est  l'adresse  ou  vous
  etes sur de trouver la derniere version de ce document.

  11..33..

  LLee ppaacckkaaggee lluuii--mmeemmee

  L'archive  ftp://ftp.orbits.com/pub/software/java_cgi-0.4.tgz contient
  la derniere version du package decrit ici. Vous y trouverez  egalement
  le source SGML de ce document (en anglais bien sur).

  La  distribution  du  package suit les recommandations de la LGPL (GNU
  Library General Public License). Ce document peut etre distribue selon
  les termes gouvernant le copyright des Linux HOWTO.

  Merci      de      bien     vouloir     mentionner     le     document
  http://www.orbits.com/software/Java_CGI.html  si  vous   utilisez   ce
  logiciel.  Vous permettrez ainsi a d'autres d'acceder aux classes Java
  CGI.

  11..44..

  PPuubblliicciittee ggrraattuuiittee

  Ce document a ete mis au point avec la bienveillance de SStteellllaarr OOrrbbiittss
  TTeecchhnnoollooggyy  SSeerrvviicceess. Si vous voulez savoir ce que nous faisons, allez
  voir a http://www.orbits.com/.

  22..

  CCoonnffiigguurraattiioonn ddee vvoottrree sseerrvveeuurr ((aavveecc eexxpplliiccaattiioonnss))

  Cette section vous conduira a travers l'installation  de  mon  package
  _J_a_v_a  _C_G_I,  et  sera  agrementee  d'explications  genereuses  qui vous
  permettront  de  mesurer  les  consequences  de  vos  actes.  Si  vous
  souhaitez  simplement  installer  les programmes, sans vous soucier du
  pourquoi  et   du   comment,   sautez   directement   a   la   section
  ``Configuration du serveur (version courte)''.

  22..11..

  CCoonnttrraaiinntteess llooggiicciieelllleess eett mmaatteerriieelllleess

  Ce  logiciel  devrait fonctionner sur n'importe quel systeme a la Unix
  sur lequel se trouvent au moins installes le JDK et  un  serveur  Web.
  J'utilise pour ma part un _L_i_n_u_x _D_e_b_i_a_n sur lequel tourne le demon HTTP
  _a_p_a_c_h_e. Si cela ne fonctionne pas sur  votre  installation,  n'hesitez
  pas a me contacter a dhs@orbits.com.

  Malheureusement,   l'interpreteur   Java  n'est  pas  particulierement
  econome en memoire ; si vous devez utiliser souvent des programmes  de
  CGI  en Java, quelques megaoctets de RAM supplementaires ne seront pas
  de trop.

  22..22..

  JJaavvaa CCGGII

  Le logiciel que j'ai ecrit s'appelle _J_a_v_a _C_G_I (Note: au cas ou vous ne
  l'auriez  pas encore remarque (NdT)). Vous pouvez le recuperer par ftp
  anonyme                          a                           l'adresse
  ftp://www.orbits.com/pub/software/java_cgi-0.4.tgz.    (Le  numero  de
  version peut avoir change.)

  22..33..

  DDeeppllooiieemmeenntt ddeess ssoouurrcceess

  Choisissez un  repertoire  ou  vous  pourrez  tranquillement  deployer
  l'archive   du   package.   Je  suggere  generalement  /usr/local/src.
  Desarchivez ensuite a l'aide de la commande (Note :  les  "lignuxeurs"
  prefereront  sans  doute  le  plus  elegant  tar xzvf java_cgi-0.4.tgz
  (NdT).) :

        gzip -dc java_cgi-0.4.tgz | tar -xvf -

  Cela aura pour effet de creer un repertoire de nom java_cgi-0.4.  Vous
  y trouverez les fichiers auxquels nous feront reference dans la suite.
  (Si le numero de version a change, suivez  les  instructions  qui  s'y
  trouvent a partir de maintenant).

  22..44..

  CChheemmiinnss llooccaauuxx

  Vous  allez  devoir  decider  de  l'endroit  ou vous souhaitez que les
  programmes Java CGI resident. La plupart du temps, vous aurez  interet
  a  les  placer  dans un repertoire parallele au repertoire cgi-bin. La
  configuration de mon serveur _a_p_a_c_h_e indiquait  /var/web/cgi-bin  comme
  repertoire cgi-bin par defaut. J'ai donc place mes programmes Java CGI
  dans le repertoire /var/web/javacgi. Il n'est pas conseille de  placer
  ces  programmes  dans  l'un  des repertoires references par CLASSPATH.
  Editez le Makefile pour refleter la configuration de votre systeme. En
  tant qu'utilisateur root, lancez make install. Cela aura pour effet de
  compiler vos programmes Java, modifier le script java.cgi  pour  qu'il
  s'adapte  a votre systeme, et installer les programmes au bon endroit.
  Si  vous  souhaitez  egalement  disposer  d'une  version  HTML  de  ce
  document, et d'un document test en HTML, lancez plutot make all.

  22..55..

  TTeesstt ddee vvoottrree iinnssttaallllaattiioonn

  Les      documents     javacgitest.html,     javaemailtest.html     et
  javahtmltest.html devraient maintenant etre installes.  Si  vous  avez
  choisi  make all, ils se trouveront dans le repertoire specifie par la
  variable WEBDIR du Makefile. Dans le cas contraire, vous pouvez lancer
  make   test   pour   les  creer  a  partir  de  javacgitest.html-dist,
  javaemailtest.html-dist et javahtmltest.html-dist.

  Apres  vous  etre  assure  que  votre  installation  s'etait  deroulee
  correctement,  vous  pouvez  supprimer  les  fichiers  CGI_Test.class,
  Email_Test.class et HTML_Test.class de votre repertoire JAVACGI, ainsi
  que javacgitest.html, javaemailtest.html et javahtmltest.html de votre
  repertoire  WEBDIR.  Ils  montrent   les   informations   utilisateurs
  auxquelles le serveur est normalement seul a avoir acces.

  33..

  CCoonnffiigguurraattiioonn dduu sseerrvveeuurr ((vveerrssiioonn ccoouurrttee))

  +o  Recuperez     le     package     _J_a_v_a     _C_G_I     a    partir    de
     ftp://www.orbits.com/pub/software/java_cgi-0.4.tgz.  (Le numero  de
     version peut avoir change.)

  +o  Deployez la distribution a l'aide de la commande

            gzip -dc java_cgi-0.4.tgz | tar -xvf -

  (Si  le  numero  de  version de la distribution a change, utilisez les
  instructions qui s'y trouvent a partir de maintenant.)

  +o  Editez le Makefile que vous trouverez dans  le  nouveau  repertoire
     java_cgi-0.4  pour qu'il reflete la configuration de votre systeme.

  +o  En tant que root, lancez make install.  Cela  aura  pour  effet  de
     compiler  les  programmes  Java, prendre en compte les informations
     propres a votre systeme, et installer les divers fichiers.

     Si vous souhaitez disposer d'une version HTML de ce document, ainsi
     que d'un document test en HTML, lancez plutot make all.

  +o  Vous devriez maintenant etre pare.

  44..

  EExxeeccuuttiioonn dd''uunn pprrooggrraammmmee JJaavvaa CCGGII

  44..11..

  DDiiffffiiccuulltteess dd''eexxeeccuuttiioonn ddee pprrooggrraammmmeess JJaavvaa aavveecc llee mmooddeellee CCGGII

  L'execution d'un programme Java depuis un serveur Web pose deux  types
  de problemes majeurs :

  44..11..11..

  LLeess pprrooggrraammmmeess JJaavvaa nnee ss''eexxeeccuutteenntt ppaass ccoommmmee ddeess bbiinnaaiirreess oorrddiinnaaiirreess

  Il faut lancer l'interpreteur Java et fournir la classe principale (le
  programme  a  executer) sur la ligne de commande. Les formulaires HTML
  ne permettent pas d'envoyer  directement  une  ligne  de  commande  au
  serveur Web.

  44..11..22..

  JJaavvaa nn''aacccceeddee ppaass _a _p_r_i_o_r_i aauuxx vvaarriiaabblleess dd''eennvviirroonnnneemmeenntt

  Toutes les variables d'environnement requises par  le  programme  Java
  doivent  lui  etre  passees  explicitement. Il n'existe pas de methode
  similaire a la fonction getenv() de CC .

  44..22..

  SSoolluuttiioonnss pprrooppoosseeeess

  Pour contourner ces obstacles, j'ai ecrit une script shell de CGI, qui
  fournit les informations necessaires a l'interpreteur Java.

  44..22..11..

  LLee ssccrriipptt jjaavvaa..ccggii

  Ce  script  de shell se charge de l'interaction entre le demon HTTP et
  le programme Java CGI que vous souhaitez utiliser. Il extrait  le  nom
  du  programme  que vous souhaitez lancer a partir des donnees fournies
  par le serveur. Il recupere ensuite toutes les valeurs d'environnement
  dans un fichier temporaire. Enfin, il lance l'interpreteur Java en lui
  passant le nom du fichier contenant les informations  d'environnement,
  ainsi que le nom du programme a executer.

  Le  script  java.cgi  a  ete configure et installe selon les procedure
  decrites a la section ``Decide On Your Local Path Policies''.

  44..22..22..

  IInnvvooccaattiioonn ddee jjaavvaa..ccggii ddeeppuuiiss uunn ffoorrmmuullaaiirree HHTTMMLL

  Mes formulaires qui  utilisent  les  programmes  Java  CGI  specifient
  l'action a effectuer de la facon suivante :

   <form action="/cgi-bin/java.cgi/CGI_Test" method="POST">

  /cgi-bin/  est  votre repertoire local d'executables CGI, java.cgi est
  l'interface permettant de lancer les programmes Java, et CGI_Test  est
  un exemple de programme Java a executer.

  55..

  UUttiilliissaattiioonn ddeess ccllaasssseess JJaavvaa CCGGII

  Trois  classes  principales  sont pour l'instant supportees : ``CGI'',
  ``Email'' et ``HTML''. Je pense y  ajouter  des  classes  capables  de
  gerer  des  entrees  et  des sorties formatees en MIME (respectivement
  MIMEin & MIMEout).

  Quelques classes de test et de support sont  egalement  disponibles  :
  ``CGI_Test'',  ``Email_Test''  et  ``HTML_Test''  doivent permettre de
  tester votre installation. Elles peuvent  aussi  servir  de  point  de
  depart  a  vos propres programmes Java bases sur cette bibliotheque de
  classes. La classe ``Text'' est une superclasse des classes  Email  et
  HTML.

  55..11..

  CCGGII

  55..11..11..

  SSyynnttaaxxee

  public class CGI

  55..11..22..

  DDeessccrriippttiioonn

  La   classe   CGI   detient  les  "informations  SGI"  :  les  valeurs
  d'environnement initialisees par le serveur Web ainsi que le nom et la
  valeur  issus  du  formulaire  quand l'action ssuubbmmiitt est selectionnee.
  Toutes  les  informations  sont  stockees  dans  un  objet  de  classe
  Properties.

  Cette classe se trouve dans le package "Orbits.net".

  55..11..33..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         CGI()         //  Constructeur.
         getNames()    //  Recupere la liste de noms.
         getValue()    //  Recupere la valeur a partir du nom.

  ______________________________________________________________________

  55..11..44..

  VVooiirr aauussssii

  CGI_Test.

  55..11..55..

  CCGGII(())

     FFiinnaalliittee
        Construit un objet contenant les donnees CGI disponibles.

     SSyynnttaaxxee
        public CGI()

     DDeessccrriippttiioonn
        Lorsqu'un  objet  CGI est construit, toutes les informations CGI
        disponibles sont recuperees et stockees dans le nouvel objet.

  55..11..66..

  ggeettNNaammeess(())

     FFiinnaalliittee
        Dresse la liste des noms definis par le formulaire.

     SSyynnttaaxxee
        public Enumeration getNames ()

     DDeessccrriippttiioonn
        Fournit la liste complete des noms  pour  lesquels  des  valeurs
        correspondantes ont ete definies.

     RReettoouurrnnee
        Une Enumeration de tous les noms definis.

  55..11..77..

  ggeettVVaalluuee(())

     FFiinnaalliittee
        Recupere la vvaalleeuurr associee au nnoomm specifie.

     SSyynnttaaxxee
        public String getValue ( String nom )

     DDeessccrriippttiioonn
        Cette  methode  fournit  la correspondance entre les noms et les
        valeurs envoyees depuis un formulaire HTML.

     PPaarraammeettrree

        nnoomm
           La cle par laquelle les valeurs sont choisies.

     RReettoouurrnnee
        Une String contenant la valeur.

  55..22..

  CCGGII__TTeesstt

  Cette classe fournit a la fois un exemple d'utilisation de  la  classe
  CGI, et un programme de test, qu'on pourra utiliser pour confirmer que
  le package _J_a_v_a _C_G_I fonctionne correctement.
  55..22..11..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         main()      //   main() du programme

  ______________________________________________________________________

  55..22..22..

  VVooiirr aauussssii

  CGI.

  55..22..33..

  mmaaiinn(())

     FFiinnaalliittee
        Fournit une methode main().

     SSyynnttaaxxee
        public static void main( String argv[] )

     DDeessccrriippttiioonn
        Il s'agit du point d'entree d'un programme CGI qui ne fait  rien
        a part retourner la liste des couples nom/valeur.

     PPaarraammeettrree
        "

        aarrggvv
           Arguments  passes  au  programme par le script java.cgi.  Non
           utilise pour l'instant.

  55..33..

  EEmmaaiill

  55..33..11..

  SSyynnttaaxxee

  public class Email extends Text

  55..33..22..

  DDeessccrriippttiioonn

  Les messages sont construits au moyen des methodes add*() de la classe
  Text et les methodes specifiques au courrier electronique fournies par
  cette classe.  Une  fois  compose,  le  message  est  envoye  vers  sa
  destination finale.

  Cette classe se trouve dans le package "Orbits.net".

  55..33..33..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         Email()      //  Constructeur
         send()       //  Envoie le message e-mail
         sendTo()     //  Ajoute une destination au message
         subject()    //  Initialise le champ Subject: du message

  ______________________________________________________________________

  55..33..44..

  VVooiirr aauussssii

  Email_Test, Text.

  55..33..55..

  EEmmaaiill(())

     FFiinnaalliittee
        Construit un objet qui contiendra un message electronique.

     SSyynnttaaxxee
        public Email()

     DDeessccrriippttiioonn
        Cree un message vide qui sera rempli par les methodes Email.

     VVooiirr aauussssii
        Text.

  55..33..66..

  sseenndd(())

     FFiinnaalliittee
        Envoie le message e-mail.

     SSyynnttaaxxee
        public void send ()

     DDeessccrriippttiioonn
        Formatage  et envoi du message. Si aucune adresse de destination
        n'a ete precisee, ne fait rien.

  55..33..77..

  sseennddTToo(())

     FFiinnaalliittee
        Ajoute une destination pour ce message.

     SSyynnttaaxxee
        public String sendTo ( String adresse )

     DDeessccrriippttiioonn
        Ajoute adresse a la liste des destinations pour  cette  methode.
        Il   n'existe   pas  de  limite  _a  _p_r_i_o_r_i  pour  le  nombre  de
        destinations d'un message e-mail. Je suis sur qu'avec une  liste
        assez grande, on peut depasser la taille acceptable pour le _M_a_i_l
        _T_r_a_n_s_p_o_r_t _A_g_e_n_t, voire la memoire disponible sur votre  systeme.

     PPaarraammeettrree

        aaddrreessssee
           Une destination a laquelle envoyer ce message.

  55..33..88..

  ssuubbjjeecctt(())

     FFiinnaalliittee
        Initialise le sujet du message.

     SSyynnttaaxxee
        public void subject ( String sujet )

     DDeessccrriippttiioonn
        Cette  methode remplit le champ Subject: du message. Si elle est
        appelee  plusieurs  fois,  le  sujet  utilise  sera  le  dernier
        demande.

     PPaarraammeettrree

        ssuujjeett
           Le texte du champ Subject: du message.

  55..44..

  EEmmaaiill__TTeesstt

  Cette  classe  fournit a la fois un exemple d'utilisation de la classe
  Email et un programme de test qu'on pourra utiliser pour s'assurer que
  le package _J_a_v_a _C_G_I fonctionne correctement.

  55..44..11..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         main()      //  main() du programme

  ______________________________________________________________________

  55..44..22..

  VVooiirr aauussssii

  Email.

  55..44..33..

  mmaaiinn(())

     FFiinnaalliittee
        Fournit une methode main().

     SSyynnttaaxxee
        public static void main( String argv[] )

     DDeessccrriippttiioonn
        Il  s'agit du point d'entree d'un programme CGI qui retourne une
        liste des  couples  nom/valeur  disponibles.  Cette  liste  sera
        egalement  envoyee a l'adresse specifiee dans la variable Email.

     PPaarraammeettrree

        aarrggvv
           Arguments passes au programme par  le  script  java.cgi.  Non
           utilise pour l'instant.

  55..55..

  HHTTMMLL

  55..55..11..

  SSyynnttaaxxee

  public class HTML extends Text

  55..55..22..

  DDeessccrriippttiioonn

  Les messages sont crees a l'aide des methodes add*() de la classe Text
  et des methodes specifique au HTML ajoutees par cette classe. Une fois
  termine, le message est envoye.

  Aucun  test  n'est  effectue  pour  l'instant  pour  s'asurer  que les
  methodes de construction de liste sont utilisees dans  le  bon  ordre.
  C'est  donc  au  programmeur  de  faire  attention  a ne pas violer la
  syntaxe HTML.

  Cette  classe se trouve dans le package "Orbits.net".

  55..55..33..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         HTML()                  //  Constructeur.
         author()                //  Initialise le nom de l'auteur du document.
         definitionList()        //  Cree une liste de definitions.
         definitionListTerm()    //  Ajoute un terme a la liste de definitions.
         endList()               //  Termine une liste.
         listItem()              //  Ajoute une entree a une liste.
         send()                  //  Envoie le message HTML.
         title()                 //  Initialise le titre du document.

  ______________________________________________________________________

  55..55..44..

  VVooiirr aauussssii

  HTML_Test, Text.

  55..55..55..

  HHTTMMLL(())

     FFiinnaalliittee
        Construit un objet qui contiendra un message HTML.

     SSyynnttaaxxee
        public HTML()

     DDeessccrriippttiioonn
        Cree un message vide qui sera rempli par les methodes HTML.

     VVooiirr aauussssii
        Text.

  55..55..66..

  aauutthhoorr(())

     FFiinnaalliittee
        Initialise le nom de l'auteur du document.

     SSyynnttaaxxee
        public void author ( String auteur )

     DDeessccrriippttiioonn
        Donne au document un nom d'auteur ayant pour valeur author.

     PPaarraammeettrree

        aauutteeuurr
           Texte a utiliser en tant que nom d'auteur du message.

     VVooiirr aauussssii
        title().

  55..55..77..

  ddeeffiinniittiioonnLLiisstt(())

     FFiinnaalliittee
        Cree une liste de definitions.

     SSyynnttaaxxee
        public void definitionList ()

     DDeessccrriippttiioonn
        Initialise une liste de definition. Une _l_i_s_t_e _d_e _d_e_f_i_n_i_t_i_o_n_s est
        une  liste  specialisee telle que chaque entree de la liste soit
        un _t_e_r_m_e suivi du _t_e_x_t_e correspondant  a  la  definition  de  ce
        terme.  La  creation d'une liste de definitions doit etre suivie
        par celle d'au moins un couple terme/texte, et d'un appel  a  la
        methode  endList().   _N_o_t_o_n_s  _q_u_e_, _p_o_u_r _l_e _m_o_m_e_n_t_, _l_e_s _l_i_s_t_e_s _n_e
        _p_e_u_v_e_n_t _p_a_s _e_t_r_e _i_m_b_r_i_q_u_e_e_s_.

     VVooiirr aauussssii
        definitionListTerm(), endList(), listItem().

  55..55..88..

  ddeeffiinniittiioonnLLiissttTTeerrmm(())

     FFiinnaalliittee
        Ajoute un terme a la liste de definitions.

     SSyynnttaaxxee
        public void definitionListTerm ()

     DDeessccrriippttiioonn
        Ajoute un terme a la liste de definitions. Le texte  definissant
        le  partie  terme  de  l'entree  courante de la liste devra etre
        insere dans le message apres l'appel de cette methode, et  avant
        qu'une methode listItem correspondante soit appelee.

     VVooiirr aauussssii
        definitionList(), listItem().

  55..55..99..

  eennddLLiisstt(())

     FFiinnaalliittee
        Termine une liste.

     SSyynnttaaxxee
        public void endList ()

     DDeessccrriippttiioonn
        Cette  methode  permet  de clore une liste.  _N_o_t_o_n_s _q_u_e_, _p_o_u_r _l_e
        _m_o_m_e_n_t_, _l_e_s _l_i_s_t_e_s _n_e _p_e_u_v_e_n_t _p_a_s _e_t_r_e _i_m_b_r_i_q_u_e_e_s_.

     VVooiirr aauussssii
        definitionList().

  55..55..1100..

  lliissttIItteemm(())

     FFiinnaalliittee
        Ajoute une entree a une liste.

     SSyynnttaaxxee
        public void listItem ()

        public void listItem ( String article )

        public boolean listItem ( String terme, String article )

     DDeessccrriippttiioonn
        Ajoute une  entree  a  une  liste.  Si  la  premiere  forme  est
        utilisee,  le  texte  de  l'article  de liste courant devra etre
        ajoute au message apres l'appel de cette methode, et avant  tout
        autre  appel  a  des  methodes  de  liste.  Dans  la deuxieme et
        troisieme forme, le texte article est passe comme parametre a la
        methode,  au  lieu  (ou  en  plus)  d'etre ajoute au message. La
        troisieme forme est specifique  aux  listes  de  definitions  et
        fournit  a  la  fois  le  terme  et la definition de l'entree de
        liste.

     PPaarraammeettrreess

        aarrttiiccllee
           Le texte de cette entree de liste de definitions.

        tteerrmmee
           Le texte de la partie terme  de  cette  entree  de  liste  de
           definitions.

     VVooiirr aauussssii
        definitionList(), definitionListTerm(), endList().

  55..55..1111..

  sseenndd(())

     FFiinnaalliittee
        Envoie le message HTML.

     SSyynnttaaxxee
        public void send ()

     DDeessccrriippttiioonn
        Envoie le message HTML.

  55..55..1122..

  ttiittllee(())

     FFiinnaalliittee
        Donne une valeur au titre du document.

     SSyynnttaaxxee
        public void title ( String titre )

     DDeessccrriippttiioonn
        Initialise le texte du titre du document.

     PPaarraammeettrree

        ttiittrree
           Le texte du titre de ce message.

     VVooiirr aauussssii
        author().

  55..66..

  HHTTMMLL__TTeesstt

  Cette  classe  offre  a  la fois un exemple d'utilisation de la classe
  HTML et un programme de test qui peu servir a s'assurer que le package
  _J_a_v_a _C_G_I fonctionne correctement.

  55..66..11..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         main()      //  main() du programme.

  ______________________________________________________________________

  55..66..22..

  VVooiirr aauussssii

  HTML.

  55..66..33..

  mmaaiinn(())

     FFiinnaalliittee
        Fournit une methode main().

     SSyynnttaaxxee
        public static void main( String argv[] )

     DDeessccrriippttiioonn
        Il  s'agit  du point d'entree pour un programme CGI qui retourne
        une liste des couples  nom/valeur  d'un  document  HTML,  chaque
        couple etant un element d'une liste de definitions.

     PPaarraammeettrree

        aarrggvv
           Arguments  passes  au  programme  par  le script java.cgi Non
           utilise pour l'instant.

  55..77..

  TTeexxtt

  55..77..11..

  SSyynnttaaxxee

  public abstract class Text

  55..77..22..

  DDeessccrriippttiioonn

  Cette classe est  la  superclasse  des  classes  Email  et  HTML.  Les
  messages  sont  construits a l'aide des methodes de cette classe, puis
  completes et formates grace aux methodes des sous-classes.

  Cette classe se trouve dans le package "Orbits.text".

  55..77..33..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         Text()            //  Constructeur.
         add()             //  Ajoute du texte a cet objet.
         addLineBreak()    //  Ajoute une rupture de ligne.
         addParagraph()    //  Ajoute une rupture de paragraphe.

  ______________________________________________________________________

  55..77..44..

  VVooiirr aauussssii

  Email, HTML.

  55..77..55..

  aadddd(())

     FFiinnaalliittee
        Ajoute du texte a cet article

     SSyynnttaaxxee
        public void add ( char ajout )

        public void add ( String ajout )

        public void add ( StringBuffer ajout )

     DDeessccrriippttiioonn
        Ajoute le texte ajout a la suite du contenu de cet article.

     PPaarraammeettrree

        aajjoouutt
           Texte a ajouter.

     VVooiirr aauussssii
        addLineBreak(), addParagraph().

  55..77..66..

  aaddddLLiinneeBBrreeaakk(())

     FFiinnaalliittee
        Force une rupture de ligne a cet endroit dans le texte.

     SSyynnttaaxxee
        public void addLineBreak ()

     DDeessccrriippttiioonn
        Insere une rupture de ligne dans le texte, a l'endroit du  point
        courant.

     VVooiirr aauussssii
        add(), addParagraph().

  55..77..77..

  aaddddPPaarraaggrraapphh(())

     FFiinnaalliittee
        Debute un nouveau paragraphe.

     SSyynnttaaxxee
        public void add ()

     DDeessccrriippttiioonn
        Debute un  nouveau paragraphe a ce point du flot textuel.

     VVooiirr aauussssii
        add(), addLineBreak().

  66..

  AAmmeelliioorraattiioonnss pprreevvuueess

  +o  Ajouter a la classe Email :

     EEmmaaiill(( iinntt ccaappaacciittee ))
        Quand on connait a l'avance l'espace a alloue au message.

     sseennddTToo(( SSttrriinngg  aaddrreessssee ))
        Ajoute  une  liste  de  destinations  principales (champ To:) au
        message e-mail.

     sseennddCCcc(( SSttrriinngg aaddrreessssee ))
        Ajoute une destination au champ Cc: (Carbon-Copy) du message  e-
        mail.

     sseennddCCcc(( SSttrriinngg  aaddddrreessss ))
        Ajoute  une  liste de destinations au champ Cc: (Carbon-Copy) du
        message e-mail.

     sseennddBBcccc(( SSttrriinngg aaddrreessssee ))
        Ajoute une destination au  champ  Bcc:  (Blind  Carbon-Copy)  du
        message e-mail.

     sseennddBBcccc(( SSttrriinngg  aaddrreessssee ))
        Ajoute  une  liste  de destinations au champ Bcc: (Blind Carbon-
        Copy) du message e-mail.

  +o  Ajouter a la classe HTML :

     HHTTMMLL(( iinntt ccaappaacciittee ))
        Quand on connait a l'avance l'espace a alloue au message.

     ppuubblliicc vvooiidd uunnoorrddeerreeddLLiisstt(())
        Demarre une liste non ordonnee.

     ppuubblliicc vvooiidd oorrddeerreeddLLiisstt(())
        Demarre une liste ordonnee.

     ppuubblliicc vvooiidd ddiirreeccttoorryyLLiisstt(())
        Demarre une liste de repertoires.

     ppuubblliicc vvooiidd mmeennuuLLiisstt(())
        Demarre une liste de menu.

     vvooiidd aanncchhoorr(( SSttrriinngg aanncchhoorrNNaammee ))
        Specifie une ancre.

     vvooiidd lliinnkk(( SSttrriinngg uurrll,, SSttrriinngg tteexxtt ))
        Specifie un lien.

     vvooiidd aapppplleett(( SSttrriinngg uurrll,, SSttrriinngg aallttTTeexxtt ))
        Specifie un lien applet.

  +o  Autoriser l'imbrication des listes HTML.

  +o  Ajouter du code de gestion d'erreur pour s'assurer que le formatage
     des listes HTML s'effectue dans le bon ordre.

  +o  L'emplacement  du  fichier  des  informations d'environnement devra
     etre configurable a partir du Makefile.

  +o  Eliminer les couples nom/valeur  vides  qui  apparaissent  dans  la
     liste  quand  la  methode  GET  est  utilisee pour le transfert des
     donnees.

  +o  Reflechir     a     un     moyen     d'implementer      l'interface
     java.util.Enumeration  avec CGI pour fournir des noms de variables.

  +o  Ajouter une classe Test,  qui  permettrait  d'utiliser  toutes  les
     methodes de ce package.

  +o  Documenter  la  maniere  dont  CGI_Test, Email_Test et HTML_Test se
     referent  mutuellement  pour   fournir   des   tests   incrementaux
     facilitant le debogage.

  +o  Documenter   la   maniere   dont   Test   se  sert  de  toutes  les
     fonctionnalites presentes dans le package.

  77..

  MMooddiiffiiccaattiioonnss

  77..11..

  MMooddiiffiiccaattiioonnss eennttrree lleess vveerrssiioonnss 00..33 eett 00..44

  +o  Developpement  de  la  classe  HTML  pour  qu'elle  fournisse   des
     fonctionnalites minimales.

  +o  Ecriture de la classe HTML_Test et de javahtmltest.html-dist.

  +o  Ajout des methodes HTML gerant les listes de definitions.

  77..22..

  MMooddiiffiiccaattiioonnss eennttrree lleess vveerrssiioonnss 00..22 eett 00..33

  +o  Ajout  des classes Text et Email. HTML a ete egalement ajoute, sans
     qu'il soit vraiment utilisable.

  +o  Placement des diverses  classes  dans  des  packages.  Les  classes
     principales  se  trouvent  dans  Orbits.net.*, la classe de support
     Text se trouve dans Orbits.text.Text.

  +o  CGItest devient CGI_Test.

  +o  Ajout de la classe Email_Test.

  77..33..

  MMooddiiffiiccaattiioonnss eennttrree lleess vveerrssiioonnss 00..11 eett 00..22

  +o  Les  variables  d'environnement  sont  placees  dans   un   fichier
     temporaire,  au  lieu  d'etre  passees a l'interpreteur Java sur la
     ligne de commande. La classe CGI et le script java.cgi durent  etre
     modifies.

  +o  Le  document  javacgitest.html  devient  partie  integrante  de  la
     distribution.

  +o  Les  fichiers  texte  qui  sont   modifies   par   make   lors   de
     l'installation sont fournis avec des noms termines par _-_d_i_s_t.

  Le HOWTO du noyau Linux (Kernel HOWTO)
  par Brian Ward, ward@blah.tu-graz.ac.at
  Version 1.0, 5 juin 1999

  (5 juillet 1999. Adaptation franaise par Eric Dumas dumas@freenix.fr
  jusqu' la version 0.80, Christophe Deleuze christophe.deleuze@lip6.fr
   partir de la version 1.0).  Il s'agit d'un guide dtaill sur la
  configuration du noyau, sa compilation et ses mises  jour pour les
  plates-formes x86.
  ______________________________________________________________________

  Table des matires






















































  1. Introduction

     1.1 Lisez ceci en premier (enfin bon, c'est un conseil) !
     1.2 Un mot sur le style

  2. Quelques questions... avec leurs rponses

     2.1 Mais quel est le rle du noyau ?
     2.2 Pourquoi voudrais-je mettre  jour mon noyau ?
     2.3 Quel genre de matriel supportent les nouveaux noyaux ?
     2.4 Quelle version de gcc ou de libc utiliser ?
     2.5 Que sont les modules chargeables (loadable modules) ?
     2.6 De combien d'espace disque ai-je besoin ?
     2.7 Combien de temps a prend ?

  3. Comment configurer le noyau ?

     3.1 Rcuprer les sources
     3.2 Installer les sources
     3.3 Configurer le noyau
        3.3.1 Kernel math emulation (Precessor type and features)
        3.3.2 Enhanced (MFM/RLL) disk and IDE disk/cdrom support (Block Devices)
        3.3.3 Networking support (General Setup)
        3.3.4 System V IPC (General Setup)
        3.3.5 Processor family (Processor type and features)
        3.3.6 SCSI support
        3.3.7 Network device support
        3.3.8 Filesystems
           3.3.8.1 Mais je ne sais pas de quels systmes de fichiers j'ai besoin !
        3.3.9 Character devices
        3.3.10 Sound
        3.3.11 Autres options de configuration
        3.3.12 Kernel hacking
     3.4 Garon, la suite ! (Le Makefile)

  4. Compiler le noyau

     4.1 Nettoyer et chercher les dpendances
     4.2 La compilation
     4.3 Les autres options du
     4.4 Installer le noyau

  5. Mettre  jour le noyau

     5.1 Appliquer un patch
     5.2 Si quelque chose ne fonctionne pas
     5.3 Comment se dbarasser des fichiers .orig ?
     5.4 Autres patches

  6. Paquetages supplmentaires

     6.1 kbd
     6.2 util-linux
     6.3 hdparm
     6.4 gpm

  7. Quelques piges

     7.1 make clean
     7.2 Noyaux normes ou lents
     7.3 Le port parallle ne fonctionne pas/mon imprimante ne fonctionne pas
     7.4 Le noyau ne compile pas
     7.5 La nouvelle version du noyau ne boote plus !
     7.6 Vous avez oubli de lancer LILO, ou le systme ne boote plus du tout
     7.7 Il me dit
     7.8 Je n'arrive pas  faire marcher mon CD-ROM IDE/ATAPI
     7.9 Le noyau me dit des insanits  propos de requtes obsoltes !
     7.10 Le Firewall ne fonctionne pas dans la version 1.2.0
     7.11 Ce n'est pas une image noyau compresse !
     7.12 Problmes avec la console aprs mise  jour  la version 1.3.x
     7.13 Le noyau ne semble pas pouvoir compiler aprs une mise  jour
     7.14 Augmenter les limites

  8. Note concernant la mise  jour pour les noyaux 2.0.x, 2.2.x

  9. Modules

     9.1 Installer les utilitaires pour grer les modules
     9.2 Modules distribus avec le noyau

  10. Trucs et astuces

     10.1 Rediriger la sortie standard des commandes make ou patch
     10.2 Installations diverses du noyau
     10.3 Mises  jour des noyaux

  11. D'autres HOWTO qui peuvent tre utiles

  12. Divers

     12.1 Auteur
     12.2 Reste  faire
     12.3 Contributions
     12.4 Copyright, traduction, licence et autres


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Faut-il que vous lisiez ce document ? Oui, si vous avez les symptmes
  suivants :


    "Arg ! Cette archive TrucBidule-46.5.6 ncessite la version du
     noyau 2.8.193 et je n'ai que la version 1.0.9 ! "

    Il y a un pilote de priphrique dont vous avez besoin dans l'un
     des nouveaux noyaux.

    Vous n'avez aucune ide de la manire dont il faut s'y prendre pour
     recompiler le noyau.

    "Est-ce que ce truc dans le fichier _R_E_A_D_M_E dcrit toute la marche 
     suivre ?"

    Vous avez essay, a ne marche pas !

    Vous devez donner un conseil  une personne qui a certains
     problmes.


  11..11..  LLiisseezz cceeccii eenn pprreemmiieerr ((eennffiinn bboonn,, cc''eesstt uunn ccoonnsseeiill)) !!


  Certains exemples prsents dans ce document prsupposent que vous
  possdez les programmes GNU tar, find et xargs.  Ils sont assez
  standards, et ne devraient pas vous poser trop de problmes.  On
  suppose galement que vous connaissez la structure de votre disque
  (partitions). Si vous ne le savez pas, il est impratif que vous
  gardiez une copie sur papier du rsultat de l'excution de la commande
  mount (ou bien une copie du fichier /etc/fstab, si vous savez le
  lire).  Cette information est importante, et ne change pas  moins que
  vous ne repartitionniez votre disque, en ajoutiez un nouveau,
  rinstalliez votre systme, ou quelque chose de similaire.

  La dernire version stable du noyau au moment o j'cris ces mots est
  la 2.2.9, ce qui signifie que les rfrences et les exemples donns
  correspondent  cette version. Mme si j'ai essay de faire en sorte
  que ce document soit aussi indpendant que possible des versions, le
  noyau est en perptuel dveloppement, donc si vous rcuprez une
  nouvelle version, il risque d'y avoir quelques diffrences. Cela ne
  devrait pas poser trop de problmes mais risque de semer un peu la
  confusion.

  Il existe deux versions des sources du noyau : une version dite
  "stable" et une version de dveloppement. Les version stables ont des
  numros de version pairs : 1.2.x, 2.0.x sont des versions stables...
  tout comme la 2.2.x. Ces noyaux sont considrs comme tant les plus
  stables et sans erreurs. Les noyaux de dveloppement (1.3.x, 2.1.x,
  etc) sont des noyaux de test, pour les dveloppeurs, les testeurs...
  mais ces noyaux peuvent tre trs bogus. Vous tes prvenus.


  11..22..  UUnn mmoott ssuurr llee ssttyyllee


  Un texte qui ressemble  celui-ci est soit un message qui apparat sur
  votre cran, soit un fichier, soit quelque chose qui peut tre
  directement saisi, comme une commande ou des options pour une commande
  (si vous possdez une version texte de ce document, il n'y a pas de
  diffrence).



  22..  QQuueellqquueess qquueessttiioonnss...... aavveecc lleeuurrss rrppoonnsseess



  22..11..  MMaaiiss qquueell eesstt llee rrllee dduu nnooyyaauu ??


  Le noyau Unix joue le rle d'intermdiaire entre vos programmes et
  votre matriel.  Premirement, il gre la mmoire pour tous les
  programmes en cours d'excution (processus), et s'assure qu'ils
  occupent tous une part quitable (ou non) du temps processeur.  En
  plus, il fournit une interface (simple  utiliser) aux programmes pour
  communiquer avec votre matriel (appels systme).

  Bien sr c'est un petit peu plus compliqu que a, mais ces fonctions
  de bases sont les plus importantes  connatre.


  22..22..  PPoouurrqquuooii vvoouuddrraaiiss--jjee mmeettttrree  jjoouurr mmoonn nnooyyaauu ??


  Les nouveaux noyaux offrent plus de facilit pour communiquer avec
  plus de matriels (c'est--dire qu'ils grent plus de
  priphriques...), ils peuvent avoir une meilleure gestion des
  processus, tourner plus rapidement que les anciennes versions, tre
  plus stables et ils corrigent les erreurs stupides des versions
  prcdentes.  Beaucoup de gens mettent  jour leurs noyaux car ils
  veulent avoir les nouveaux pilotes de priphriques et les corrections
  d'erreurs.



  22..33..  QQuueell ggeennrree ddee mmaattrriieell ssuuppppoorrtteenntt lleess nnoouuvveeaauuxx nnooyyaauuxx ??


  Jetez un coup d'oeil sur le Hardware-HOWTO. Vous pouvez aussi regarder
  le fichier "config.in" dans les sources de LLiinnuuxx, ou juste essayer
  "make config", ce qui vous permet de voir tous les matriels supports
  par le noyau standard, mais pas tout ce que LLiinnuuxx supporte. En effet,
  beaucoup de priphriques assez utiles (tels les priphriques PCMCIA,
  et quelques lecteurs de cartouches) sont des modules chargeables
  maintenus et distribus sparment.


  22..44..  QQuueellllee vveerrssiioonn ddee ggcccc oouu ddee lliibbcc uuttiilliisseerr ??


  Linus recommande une version de gcc dans le fichier README fourni avec
  le code source.  Si vous ne possdez pas cette version, la
  documentation dans la version recommande de gcc devrait vous indiquer
  si vous avez besoin de mettre  jour votre libc.  Ce n'est pas une
  opration complique, mais il est important de suivre les
  instructions.


  22..55..  QQuuee ssoonntt lleess mmoodduulleess cchhaarrggeeaabblleess ((llooaaddaabbllee mmoodduulleess)) ??


  Ce sont des parties du noyau (pilotes de priphriques gnralement)
  qui ne sont pas compiles dans celui-ci. On peut les compiler
  sparment, les insrer et les retirer du noyau  n'importe quel
  moment. En raison de cette souplesse, c'est devenu la mthode prfre
  pour coder certaines fonctionnalits du noyau.  Bon nombre de pilotes
  de priphriques tels que PCMCIA et les gestionnaires de cartouches
  QIC-80/40 sont des modules chargeables.


  22..66..  DDee ccoommbbiieenn dd''eessppaaccee ddiissqquuee aaii--jjee bbeessooiinn ??


  Cela dpend de la configuration de votre systme. Tout d'abord, le
  code source compress de LLiinnuuxx fait presque 16 Mo pour la version
  2.2.9.  Vous voulez gnralement le garder dans un coin aprs l'avoir
  dcompress. Dcompress et compil avec une configuration moyenne, il
  occupe 67 Mo de plus.


  22..77..  CCoommbbiieenn ddee tteemmppss aa pprreenndd ??


  Sur les machines rcentes la compilation demande beaucoup beaucoup
  moins de temps que sur les anciennes. Un AMD K6-2/300 avec un disque
  rapide peut compiler un noyau 2.2.x en  peu prs quatre minutes. Avec
  de vieux Pentium, 486 ou 386 soyez prts  patienter, ventuellement
  des heures, jours...

  Si cela vous pose problme et que vous avez accs  une machine
  rapide, vous pouvez compiler sur celle-ci (fournissez les bons
  paramtres, assurez-vous que vos utilitaires sont  jour, etc.) et
  transfrer l'image du noyau sur la machine lente.



  33..  CCoommmmeenntt ccoonnffiigguurreerr llee nnooyyaauu ??




  33..11..  RRccuupprreerr lleess ssoouurrcceess


  Vous pouvez rcuprer les sources via ftp depuis ftp.kernel.org dans
  le rpertoire /pub/linux/kernel/vx.y, o x.y est la version (par ex.
  2.2). Comme expliqu plus haut les versions se terminant par un
  chiffre impair sont les versions de dveloppement et peuvent tre
  instables. Le fichier est typiquement linux-x.y.z.tar.gz, o x.y.z est
  le numro de version. Une version avec suffixe en .bz2 (compress avec
  bzip2) est aussi gnralement disponible (la compression bzip2 est
  plus performante donc le transfert sera plus rapide).

  Il vaut mieux utiliser ftp.xx.kernel.org o xx est votre code de pays,
  par exemple ftp.fr.kernel.org pour la France, ftp.be.kernel.org pour
  la Belgique.


  33..22..  IInnssttaalllleerr lleess ssoouurrcceess


  Faites un su (super utilisateur) ou bien loggez-vous en tant que
  "root", et allez dans le rpertoire /usr/src.  Si vous avez dj
  install les sources du noyau, il y aura dj un rpertoire appel
  "linux", contenant l'ensemble des sources du noyau.  Si vous avez de
  la place disque et que vous voulez jouer la carte scurit, il est
  prfrable de conserver ce rpertoire intact.  Un systme assez
  pratique consiste  renommer votre rpertoire en fonction du numro de
  la version. La commande "uname -r" vous indiquera le numro de la
  version du noyau actuellement en fonction.

  Par exemple, si "uname -r" donne "1.0.9," vous pourrez dplacer votre
  rpertoire (avec mv) "linux" en "linux-1.0.9".  Si vous tes du genre
  tmraire, dtruisez le rpertoire. Dans tous les cas, soyez sr qu'il
  n'y ait aucun rpertoire "linux" dans /usr/src avant de dcompresser
  et d'installer les sources.

  Dans /usr/src, installez les sources en faisant "tar zxpvf linux-
  x.y.z.tar.gz" (si vous avez uniquement un fichier .tar, sans de .gz 
  la fin,"tar xpvf linux.x.y.z.tar" marchera sans problme).  Vous
  verrez la liste des fichiers se drouler sous vos yeux.  Lorsque c'est
  termin, il y aura un nouveau rpertoire "linux".  Allez dans lliinnuuxx et
  jetez un coup d'oeil au fichier README.  Il y a une section
  "INSTALLING the kernel".  Suivez les instructions lorsque ncessaire -
  prenez garde  ce que les liens soient en place et que les fichiers .o
  soient dtruits, etc.

  Si votre fichier est en .bz2, il vous faudra utiliser le programme
  bzip2 (voir  <http://www.muraroa.demon.co.uk/>). Faites:


       bz2cat linux-x.y.z.tar.bz2 | tar xvf -




  33..33..  CCoonnffiigguurreerr llee nnooyyaauu


  Note : il s'agit d'une rptition, clarification de la section
  correspondante dans le fichier README de Linus.

  La commande "make config" lance un script qui va vous poser un certain
  nombre de questions. Il a besoin de bash, donc vrifiez que vous
  possdez bien /bin/bash, /bin/sh, ou $BASH.


  Il existe un certain nombre de possibilits autres que make config et
  il est possible que vous les trouviez plus simples  utiliser. Pour
  ceux qui utilisent X, vous pouvez essayer make xconfig si vous avez au
  pralable install Tk (_c_l_i_c_k_-_o_-_r_a_m_a - Nat).  make menuconfig est
  destin  ceux qui ont install (n)curses et qui prfrent utiliser un
  menu en mode texte.  Ces interfaces ont un avantage : si vous vous
  trompez lors de la configuration, vous pouvez facilement corriger
  l'erreur sans devoir tout relancer.

  Avec make menuconfig et make xconfig les options de configuration
  apparatront hirarchises.

  Vous tes alors prt  rpondre aux questions, la plupart du temps par
  "y" ou par "n". Les pilotes de priphriques acceptent aussi
  gnralement "m", pour "module". Le pilote sera compil non pas
  directement dans le noyau mais en tant que module chargeable. Une
  interprtation plus amusante est que le "m" est pour "maybe"
  (peut-tre). Certaines options non critiques ou videntes ne seront
  pas dcrites ici. Consultez le paragraphe "Autres options de
  configuration" pour une courte descriptions de quelques options non
  dtailles ici. Avec make menuconfig vous pouvez utiliser la barre
  d'espace.

   partir des versions 2.0.x, une option "?" est prsente : elle permet
  d'obtenir une aide pour l'option dsire qui correspond srement aux
  informations les plus  jour. Voici une liste dcrivant brivement les
  options les plus importantes avec leur place dans la hirarchie (NdT :
  et la traduction de l'intitul).


  33..33..11..  KKeerrnneell mmaatthh eemmuullaattiioonn ((PPrreecceessssoorr ttyyppee aanndd ffeeaattuurreess))


  _(__m_u_l_a_t_i_o_n _d_u _c_o_p_r_o_c_e_s_s_e_u_r _A_r_i_t_h_m__t_i_q_u_e_) Si vous ne possdez pas de
  coprocesseur arithmtique (autrement dit, vous ne disposez que d'un
  386 ou d'un 486SX), rpondez "y".  Si vous en avez un et que vous
  rpondez "y", ce n'est pas grave : le coprocesseur sera utilis et
  l'mulation ignore. Pour toute machine pas trop vieille, la rponse
  sera non.


  33..33..22..  EEnnhhaanncceedd ((MMFFMM//RRLLLL)) ddiisskk aanndd IIDDEE ddiisskk//ccddrroomm ssuuppppoorrtt ((BBlloocckk
  DDeevviicceess))


  _(_G_e_s_t_i_o_n _a_m__l_i_o_r__e _d_e_s _d_i_s_q_u_e_s _d_u_r_s_) Vous devez  peu prs toujours
  rpondre oui  cette question. Cela signifie que le  noyau pourra
  grer les disques standards des PC comme IDE, que bon nombre de gens
  possdent. Ceci n'inclut pas les disques SCSI : ils sont
  slectionnables plus tard dans la configuration.

  Une question porte sur les gestionnaires de priphriques "old disk-
  only" et "new IDE". Vous devez choisir l'un des deux.  La principale
  diffrence est que le vieux gestionnaire de priphrique ne supporte
  qu'au plus deux disques sur une seule interface. Le nouveau
  gestionnaire gre une deuxime interface IDE et les disques CD-ROM
  IDE/ATAPI , et il est plus gros de 4 ko que l'ancien. Il est suppos
  "amlior" ce qui signifie qu' part avoir un nombre diffrent de
  bogues il peut amliorer les performances de votre disque, notamment
  si vous possdez du matriel rcent (comme de l'EIDE).


  33..33..33..  NNeettwwoorrkkiinngg ssuuppppoorrtt ((GGeenneerraall SSeettuupp))



  _(_G_e_s_t_i_o_n _d_u _R__s_e_a_u_) En principe, vous ne devriez rpondre "y" que si
  votre machine se trouve sur un rseau tel qu'Internet ou si vous
  voulez utiliser SLIP, PPP, term, etc. pour communiquer avec un accs
  Internet externe.  Toutefois, bon nombre de paquetages (tels que le
  systme X Window) ont besoin de ce support rseau mme si votre
  machine n'y est pas relie ; dans ce cas, rpondez "y".  Plus tard, on
  vous demandera si vous voulez avoir le support TCP/IP. De mme,
  rpondez "y",  moins que vous ne soyez sr de ce que vous faites.


  33..33..44..  SSyysstteemm VV IIPPCC ((GGeenneerraall SSeettuupp))



  L'une des meilleures dfinition des IPC (communication inter-
  processus) se trouve dans le glossaire du livre de Perl. Ces
  mcanismes sont utiliss par certains dveloppeurs Perl et quelques
  autres paquetages (comme par exemple DOOM), donc ce n'est pas vraiment
  une bonne ide de rpondre "n"  cette question  moins que vous ne
  sachiez exactement ce que vous faites.


  33..33..55..  PPrroocceessssoorr ffaammiillyy ((PPrroocceessssoorr ttyyppee aanndd ffeeaattuurreess))


  _(_F_a_m_i_l_l_e _d_e _p_r_o_c_e_s_s_e_u_r_) Dans les anciens noyaux, il s'agissait de
  l'option Use -m486 flag for 486-specific optimizations.

  Cette option slectionnait certaines optimisations pour un type de
  processeur, le noyau fonctionnant normalement avec les autres
  processeurs. Le noyau gnr avait toutefois une taille lgrement
  suprieure. Dans les nouveaux noyaux, cette diffrence de taille n'est
  plus d'actualit donc vous pouvez indiquer le processeur que vous
  allez utiliser avec le nouveau noyau. Un noyau "386" fonctionnera avec
  toutes les machines.


  33..33..66..  SSCCSSII ssuuppppoorrtt


   _(_G_e_s_t_i_o_n _S_C_S_I_) Si vous avez au moins un priphrique SCSI, rpondez
  "y".  On vous demandera alors de plus amples renseignements sur la
  gestion des CD-ROM, des disques, et quel type de contrleur SCSI vous
  possdez. Consultez le SCSI-HOWTO pour plus de dtails.


  33..33..77..  NNeettwwoorrkk ddeevviiccee ssuuppppoorrtt


  _(_G_e_s_t_i_o_n _d_e _p__r_i_p_h__r_i_q_u_e_s _r__s_e_a_u_) Si vous avez une carte rseau, ou si
  vous voulez utiliser SLIP, PPP, ou un adaptateur sur port parallle,
  rpondez "y".  Le script de configuration vous demandera alors quel
  type de carte vous possdez et quels protocoles vous voulez inclure.


  33..33..88..  FFiilleessyysstteemmss


  _(_S_y_s_t__m_e_s _d_e _f_i_c_h_i_e_r_s_) On vous demandera quels types de systmes de
  fichiers vous souhaitez grer :

  Standard (minix) - Les distributions rcentes ne crent pas de
  systmes de fichiers de type minix, et bon nombre de personnes ne s'en
  servent pas, mais cela peut tre malgr tout une bonne ide de le
  configurer. Quelques programmes de "sauvetage de disques" l'utilisent,
  et encore aujourd'hui, un bon nombre de disquettes risquent d'avoir ce
  systme de fichiers, car il est assez pratique pour les disquettes.

  Second extended - C'est le systme de fichiers standard de Linux. Vous
  en aurez trs certainement besoin, donc "y".  (NdT : et puis c'est un
  Franais qui l'a fait alors... !)

  msdos - Si vous voulez utiliser les partitions de votre disque MS-DOS,
  ou monter des disquettes au format MS-DOS, rpondez "y".

  Des systmes de fichiers originaires d'autres systmes d'exploitation
  sont galement disponibles.

  /proc - Un des systmes de fichiers les plus puissants (ide
  effrontment chipe aux Laboratoires Bell, je pense). a n'a rien 
  voir avec vos partitions disques, mais c'est une interface sous forme
  de systme de fichiers avec le noyau et les processus. Un grand nombre
  d'outils de visualisation de processus (comme "ps") l'utilisent. Si
  vous l'avez install, essayez "cat /proc/meminfo" ou "cat
  /proc/devices".  Quelques shells (comme rc) utilisent /proc/self/fd
  (connu comme /dev/fd sur d'autres systmes) pour les entres/sorties.
  Vous devriez rpondre "y"  ceci : de nombreux programmes Linux
  standards en ont besoin.

  NFS - Si vous tes en rseau et que vous voulez utiliser des volumes
  prsents sur d'autres machines, rpondez "y".

  ISO9660 - Format rencontr sur la plupart des CD-ROM. Si vous possdez
  un CD-ROM et que vous comptez vous en servir sous Linux, rpondez "y".


  33..33..88..11..  MMaaiiss jjee nnee ssaaiiss ppaass ddee qquueellss ssyyssttmmeess ddee ffiicchhiieerrss jj''aaii
  bbeessooiinn !!


  Bon, tapez "mount", cela va vous afficher un truc comme a :



               blah# mount
               /dev/hda1 on / type ext2 (defaults)
               /dev/hda3 on /usr type ext2 (defaults)
               none on /proc type proc (defaults)
               /dev/fd0 on /mnt type msdos (defaults)




  Observez chacune des lignes. Le mot  ct de "type" est le type du
  systme de fichiers. Dans cet exemple, mes partitions / et /usr sont
  du type ext2fs, j'utilise /proc, et il y a une disquette monte avec
  le systme de fichiers MS-DOS (beuurrrk !).

  Essayez "cat /proc/filesystems" si vous avez /proc. Cela vous donnera
  la liste des systmes de fichiers que votre noyau gre.

  Le support de systmes de fichiers rarement utiliss et qui ne sont
  pas absolument ncessaires peut augmenter la taille du noyau. Voir la
  section sur les modules chargeables pour rsoudre ce problme, ainsi
  que la section sur les piges.


  33..33..99..  CChhaarraacctteerr ddeevviicceess


  _(_P__r_i_p_h__r_i_q_u_e_s _c_a_r_a_c_t__r_e_) Vous trouverez ici les pilotes pour grer
  votre imprimante parallle, souris bus, souris PS/2 (beaucoup de
  portables utilisent une souris constructeur de type PS/2), quelques
  lecteurs de bande et d'autres priphriques de type "caractre".
  Rpondez en consquence.

  Note : "gpm" est un programme qui vous permet d'utiliser la souris 
  l'extrieur de X Window pour effectuer des oprations de copier-coller
  entre les consoles virtuelles. C'est assez utile si vous avez une
  souris srie, car cela coexiste bien avec X Window, mais vous devrez
  faire quelques trucs pour que cela fonctionne avec les autres.


  33..33..1100..  SSoouunndd


  _(_S_o_n_) Si vous tenez  entendre biff aboyer, rpondez "y", puis donnez
  au programme de configuration tout ce qu'il veut savoir sur votre
  carte son.  propos : lorsqu'il vous demande si vous voulez installer
  la version entire du pilote, vous pouvez rpondre `n' et donc
  conomiser de la mmoire en insrant uniquement les caractristiques
  dont vous avez besoin.

  Si vous vous intressez de prs au support des cartes son, jetez un
  oeil sur les pilotes libres   <http://www.linux.org.uk/OSS/> et au
  Open Sound System (commercial)   <http://www.opensound.com/>.


  33..33..1111..  AAuuttrreess ooppttiioonnss ddee ccoonnffiigguurraattiioonn


  Toutes les options de configuration ne sont pas dtailles dans ce
  document car elles changent trop souvent ou bien sont vraiment
  videntes (par exemple, le support de la carte 3Com 3C509 permet la
  compilation du pilote de cette carte). L'aide en ligne fournit une
  liste assez complte de ces options (plus une manire de les insrer
  dans le script Configure) mise  jour par Axel Boldt
  (boldt@math.ucsb.edu). La liste est dans le fichier
  Documentation/Configure.help des sources du noyau depuis la version
  2.0.


  33..33..1122..  KKeerrnneell hhaacckkiinngg


  Extrait du README de Linus :

  La configuration "kernel hacking" provoque gnralement un noyau plus
  gros ou plus lent (ou les deux), et peut mme rendre le noyau moins
  stable en configurant quelques routines pour essayer de chercher les
  dfauts du code, pour trouver les problmes du noyau (kmalloc()).
  Donc, vous devrez rpondre "n"  cette question si vous crez un noyau
  pour un systme sr.


  33..44..  GGaarroonn,, llaa ssuuiittee !! ((LLee MMaakkeeffiillee))


  Quand la configuration est termine, un message vous indique que le
  noyau est configur, et qu'il faut "regarder le Makefile gnral pour
  des configurations supplmentaires", etc.

  Donc, jetez un coup d'oeil au Makefile. Vous ne changerez probablement
  rien, mais a ne peut pas vous faire de mal ! Vous pourrez galement
  changer les options avec la commande "rdev" quand le noyau sera prt.
  Si vous ne comprenez rien  ce fichier, passez  la suite.


  44..  CCoommppiilleerr llee nnooyyaauu



  44..11..  NNeettttooyyeerr eett cchheerrcchheerr lleess ddppeennddaanncceess


  Lorsque le script de configuration va se terminer, il vous demandera
  de faire un "make dep" et (peut-tre) "make clean". "make dep" assure
  que toutes les dpendances, comme les fichiers d'en-ttes (include)
  sont en place, et ne prend pas trop de temps  moins que vous n'ayez
  une machine trs lente. Pour les anciennes versions, lorsque c'est
  termin faites un "make clean".  Cela dtruit tous les fichiers objets
  et d'autres fichiers que les anciennes versions laissent trainer.
  _N_'_o_u_b_l_i_e_z _p_a_s cette tape avant de recompiler un noyau.


  44..22..  LLaa ccoommppiillaattiioonn


  Aprs avoir cherch les dpendances et nettoy l'arborescence, vous
  pouvez lancer la compilation par "make bzImage" ou "make bzdisk"
  (c'est cette partie qui prend du temps).  "make bzImage" va compiler
  le noyau, et crer le fichier "bzImage" dans le rpertoire
  arch/i386/boot qui correspond au nouveau noyau compress.  "make
  bzdisk" fait la mme chose, mais copie le noyau sur une disquette que
  vous aurez insre dans le lecteur "A:".

  "bzdisk" est assez commode pour tester de nouveaux noyaux ; s'il ne
  fonctionne pas, enlevez juste la disquette et relancez la machine avec
  votre ancien noyau. C'est galement une mthode pratique si vous avez
  dtruit accidentellement votre noyau (ou quelque chose de ce genre).
  Vous pouvez galement vous en servir pour installer de nouveaux
  systmes, en copiant directement le contenu d'un disque sur un autre
  ("tout a ? ouah !").

  Tous les noyaux assez rcents sont compresss, comme l'indique le "bz"
  au dbut des noms. Un noyau compress est automatiquement dcompact
  lors de l'excution.

  Pour les noyaux plus anciens, bzImage n'existait pas et on utilisait
  zImage. Cette possibilit est toujours disponible mais vue la taille
  des noyaux rcents il est  peu prs obligatoire d'utiliser bzImage
  car l'ancienne mthode ne peut grer que des noyaux de taille limite.


  44..33..  LLeess aauuttrreess ooppttiioonnss dduu""mmaakkee""


  "make mrproper" est un "make clean" plus puissant. Cela est parfois
  ncessaire, vous devriez le faire  chaque patch. Il efface galement
  votre fichier de configuration donc il faudra ventuellement en faire
  une copie avant (.config).

  "make oldconfig" essaiera de configurer le noyau  partir d'un vieux
  fichier de configation, il choisira toutes les options de "make
  config" pour vous. Si c'est la premire fois que vous compilez un
  noyau ou si vous n'avez pas un ancien fichier de configuration
  n'utilisez pas ceci, vous devrez sans doute changer la configuration
  par dfaut.

  Regardez la section sur les modules  propos du "make modules".




  44..44..  IInnssttaalllleerr llee nnooyyaauu


  Une fois que vous avez un nouveau noyau qui semble fonctionner comme
  vous le voulez, il est grand temps de l'installer. La plupart des gens
  utilisent LILO (LInux LOader).  "make zlilo" installera votre noyau,
  lancera LILO, et laissera votre machine prte  rebooter, mais
  SEULEMENT si lilo est configur de la manire suivante : le noyau
  s'appelle /vmlinuz, lilo se trouve dans /sbin, et votre fichier de
  configuration pour LILO (/etc/lilo.conf) correspond  ces donnes.

  Sinon, vous devrez utiliser LILO directement.  C'est un produit assez
  facile  installer, mais dont le fichier de configuration peut tre
  droutant. Regardez le fichier de configuration (/etc/lilo/config pour
  les versions les plus anciennes, /etc/lilo.conf pour les rcentes), et
  regardez son contenu.  Le fichier de configuration doit ressembler 
  ceci :


      image = /vmlinux
          label = Linux
          root = /dev/hda1
          ...



  La ligne "image =" sert  indiquer le nom du noyau utilis.  Beaucoup
  de gens utilisent /vmlinuz.  "label" servira  indiquer  LILO sur
  quel noyau ou sur quel systme d'exploitation vous allez booter (nom
  logique), et "root" est la partition racine de ce systme
  d'expoitation.  Faites une sauvegarde de votre vieux noyau (quel que
  soit son nom), et copiez le nouveau noyau (bzImage)  sa place : "cp
  bzImage /vmlinuz" si vous utilisez "/vmlinuz", puis relancez lilo. Sur
  les systmes rcents, vous pouvez simplement lancer "lilo", mais sur
  de plus anciens, vous devez faire un /etc/lilo/install ou
  /etc/lilo/lilo -C /etc/lilo/config.

  Si vous dsirez en savoir plus sur la configuration de LILO, ou si
  vous voulez avoir LILO, rcuprez la dernire version sur votre site
  FTP favori et suivez les instructions.

  Pour booter sur l'un de vos anciens noyaux situs sur votre disque dur
  (une autre mthode de secours quand le noyau plante), copiez les
  lignes suivantes "image = xxx"  la fin du fichier de configuration
  LILO, et changez "image = xxx" par "image = yyy", o "yyy" est le
  chemin complet du noyau de secours. Puis changez "label = zzz" en
  "label = linux-sauvegarde" et relancez lilo.  Si elle n'y est pas,
  vous devrez rajouter une ligne dans le fichier de configuration
  indiquant "delay=x", o x est le temps en dixime de secondes qui
  indique  LILO le temps qu'il doit attendre avant d'amorcer la
  machine.  Vous pouvez l'interrompre (avec la touche shift par
  exemple), et taper le label de l'image du noyau de sauvegarde (au cas
  o un problme se produit).



  55..  MMeettttrree  jjoouurr llee nnooyyaauu



  55..11..  AApppplliiqquueerr uunn ppaattcchh


  Les nouvelles versions du noyau sont distribues sous la forme de
  patches.  Par exemple, si vous possdez la version 1.1.45, et que vous
  remarquez qu'il existe un "patch46.gz", cela signifie que vous pouvez
  passer  la version 1.1.46 en appliquant ce patch. Vous devriez faire
  avant une sauvegarde de votre arborescence des sources du noyau ("make
  clean" puis "cd /usr/src; tar zcf old-tree.tar.gz linux" va produire
  une archive compresse).

  Poursuivons avec cet exemple et supposons que vous ayez mis le fichier
  "patch46.gz" dans /usr/src. Allez dans /usr/src et faites un "zcat
  patch46.gz | patch -p0" (ou "patch -p0 < patch46" si le patch n'est
  pas compress).  Vous verrez alors une liste de messages vous
  indiquant les essais de modifications. Cela marche ou pas (en principe
  oui !).  Gnralement, cela va trop vite pour lire, et on ne sait pas
  trop si a a march. Vous pouvez utiliser l'option -s de patch qui lui
  indique qu'il ne doit afficher que les erreurs (vous n'avez pas grand
  chose  faire des "hh, mon ordinateur est en train de faire quelque
  chose...!").  Pour vrifier que tout s'est pass sans encombre, allez
  dans /usr/src/linux et cherchez les fichiers ayant pour extension
  .rej. Quelques versions de patch (vieilles versions) utilisent # pour
  les fichiers rejets. Vous pouvez utiliser "find" pour les trouver :

          find .  -name '*.rej' -print


  vous en donnera la liste avec le chemin pour y accder.

  Si tout a march, faites un "make clean", "config," et "dep" comme
  dcrit dans les sections 3 et 4.

  La commande patch possde quelques options.  Comme indiqu ci-dessus,
  patch -s supprime tous les messages sauf les erreurs. Si vous stockez
  les sources de votre noyau dans un autre rpertoire que
  /usr/src/linux, un patch -p1 dans ce rpertoire fera les choses
  proprement. Les autres options sont bien documentes dans les pages de
  manuel.


  55..22..  SSii qquueellqquuee cchhoossee nnee ffoonnccttiioonnnnee ppaass


  (Note : cette section traite plutt des noyaux assez anciens)

  Le problme le plus frquent qui se prsentait tait lorsqu'un patch
  modifiait le fichier "config.in" et que vous aviez chang les options
  pour mieux coller  votre machine.  En principe, a ne devrait plus
  trop se produire, mais avec les anciennes versions... Pour rsoudre ce
  problme, jetez un coup d'oeil au fichier config.in.rej et regardez
  son contenu.  Le changement sera indiqu par "+" et "-" au dbut d'une
  ligne. Regardez ces lignes et retenez si elles sont marques "y" ou
  "n". Maintenant, ditez config.in, et changez les "y" en "n" et les
  "n" en "y" lorsque cela est ncessaire. Faites un

          patch -p0 < config.in.rej


  et si cela fonctionne ("no fails"), alors vous pouvez continuer avec
  la configuration et la compilation. Le fichier config.in.rej restera,
  mais vous pouvez le dtruire.

  Si vous avez d'autres problmes, vous avez peut-tre install un patch
  dfectueux.  Si la commande patch indique "previously applied patch
  detected: Assume -R?", vous tes probablement en train d'appliquer un
  patch dj appliqu.  Si vous rpondez "y", cela risque de dtruire
  votre source et il vous faudra rcuprer un source complet (vous
  auriez peut-tre d commencer par l).

  Pour revenir en arrire (dpatcher), faites un "patch -R" sur le patch
  original.
  La meilleure chose  faire lorsqu'un patch dtruit tout est de
  repartir d'un noyau initial tout neuf ! (par exemple,  partir du
  fichier linux-x.y.z.tar.gz).


  55..33..  CCoommmmeenntt ssee ddbbaarraasssseerr ddeess ffiicchhiieerrss ..oorriigg ??



  Aprs avoir appliqu quelques patches, les fichiers .orig vont
  commencer  s'empiler. Par exemple, j'en tais  la version 1.1.51 et
  la dernire fois que j'avais fait le mnage, c'tait avec la version
  1.1.48 (je crois...). Dtruire les fichiers .orig a permis de
  rcuprer plus d'un demi Mga octets.

          find .  -name '*.orig' -exec rm -f {} ';'


  fera cela pour vous. Quelques versions de patch qui utilisent # pour
  les rejets utilisent un tilde  la place de .orig.

  Il y a d'autres manires (meilleures ?) pour se dbarrasser des
  fichiers .orig en utilisant le programme GNU xargs :

          find .  -name '*.orig' | xargs rm


  ou la mthode sre mais un peu plus verbeuse :

          find . -name '*.orig' -print0 | xargs --null rm --




  55..44..  AAuuttrreess ppaattcchheess


  Il y a d'autres patches (je les appellerai "non-standards") que ceux
  distribus par Linus. Si vous les appliquez, les patches Linus
  risquent de ne plus marcher correctement et vous serez oblig soit de
  les enlever, soit d'adapter les patches. C'est gnralement un travail
  assez pnible pour les novices, aussi revenir aux anciennes sources
  avant d'appliquer les patches de LLiinnuuxx semble tre une bonne solution.
  Aprs, vous pouvez regarder si les patches non standards fonctionnent.
  S'ils ne fonctionnent pas, vous pouvez revenir  l'ancienne version,
  ou essayer de modifier le patch pour le faire fonctionner, ou encore
  attendre qu'un nouveau patch arrive.

  Vous entendrez probablement parler de ces patches non standards.
  J'utilisais le patch "noblink" car j'ai horreur des curseurs qui
  clignotent (ce patch est (ou bien tait) mis  jour frquemment pour
  les nouveaux noyaux). Les pilotes de priphriques tant de plus
  dvelopps sous la forme de modules chargeables, le nombre de patches
  "non standards" dcrot.



  66..  PPaaqquueettaaggeess ssuuppppllmmeennttaaiirreess


  Votre noyau Linux a bon nombre de caractristiques qui ne sont pas
  expliques dans le noyau lui-mme ; elles sont typiquement utilises
  par des paquetages externes.  Une liste des plus utiles est donne
  ici.


  66..11..  kkbbdd


  La console de Linux possde de nombreuses caractristiques. Elle peut
  changer les polices de caractres, remapper le clavier, permuter les
  modes vidos (dans les noyaux les plus rcents), etc. Le package kbd
  possde des programmes qui permettent  l'utilisateur de faire tout
  cela, plus une tonne de fontes et de types de claviers. (NdT : fr.map
  pour le clavier franais). Il est disponible sur les mmes sites qui
  proposent les sources du noyau.


  66..22..  uuttiill--lliinnuuxx


  Rik Faith (faith@cs.unc.edu) a rassembl une grande quantit d'outils
  Linux dans le paquetage util-linux. Ils est dsormais maintenu par
  Andries Brouwer (util-linux@math.uio.no). Disponible via ftp anonyme
  sur sunsite.unc.edu dans /pub/Linux/system/misc, il contient des
  programmes tels que setterm, rdev, et ctrlaltdel, qui concernent le
  noyau. Comme le dit Rik, _n_'_i_n_s_t_a_l_l_e_z _p_a_s _s_a_n_s _r__f_l__c_h_i_r, vous n'avez
  pas besoin de tout installer dans la distribution, et cela pourrait
  vous causer de graves ennuis.


  66..33..  hhddppaarrmm


  Comme beaucoup de paquetages, c'tait au dpart un patch pour le noyau
  et un ensemble de programmes. Le patch a t intgr dans le noyau
  standard et les programmes pour optimiser et jouer avec vos disques
  sont distribus sparment.


  66..44..  ggppmm



  gpm est un gestionnaire de souris. Ce programme vous permet
  d'effectuer du couper-coller en mode texte entre les consoles
  virtuelles ainsi que d'autres oprations avec un grand nombre de types
  de souris.



  77..  QQuueellqquueess ppiiggeess



  77..11..  mmaakkee cclleeaann


  Si votre noyau a un comportement surnaturel (a m'est arriv !), il y
  a des chances pour que vous ayez oubli de faire un "make clean".  Les
  symptmes peuvent tre un plantage de votre systme, des problmes
  d'entres-sorties tranges, une chute des performances, des reboot
  alatoires... Vrifiez que vous avez galement fait un make dep.


  77..22..  NNooyyaauuxx nnoorrmmeess oouu lleennttss


  Si votre noyau consomme beaucoup de mmoire, ou s'il est rellement
  gros, ou bien s'il faut une ternit pour le compiler mme lorsque
  vous utilisez votre nouveau 986DX6/440, c'est que vous avez configur
  un tas de choses (pilotes de priphriques, systmes de fichiers) dont
  vous n'avez pas besoin.  Si vous ne les utilisez pas, ne les
  configurez pas car cela prend beaucoup de place en mmoire.  Le
  symptme le plus visible est l'augmentation sensible du fonctionnement
  du swap. Si votre disque fait beaucoup de bruit, et qu'il ne s'agit
  pas d'un de ces vieux disques Fujitsu Eagles qui font le bruit d'un
  avion lors de son atterrissage lorsque vous l'teignez, jetez un coup
  d'oeil  votre configuration.

  Vous pouvez calculer la taille mmoire que le noyau utilise en prenant
  la mmoire totale de votre machine et en soustrayant la valeur de la
  mmoire totale ("total mem") dans  /proc/meminfo ou bien avec la
  commande "free".


  77..33..  ppaass LLee ppoorrtt ppaarraallllllee nnee ffoonnccttiioonnnnee ppaass//mmoonn iimmpprriimmaannttee nnee ffoonncc
  ttiioonnnnee


  Les options de configuration pour les PC sont : premirement, dans la
  catgorie "General Setup" slectionnez "Parallel port support" et "PC-
  style hardware". Puis dans "Character devices", slectionnez "Parallel
  printer support".

  Il y a ensuite le problme des noms de priphrique des imprimantes
  qui ont chang dans Linux 2.2. Si vous aviez une imprimante lp1 avec
  votre noyau prcdent, elle s'appelle probablement lp0 maintenant.
  Utilisez "dmesg" ou cherchez dans les logs dans /var/log pour le
  vrifier.


  77..44..  LLee nnooyyaauu nnee ccoommppiillee ppaass


  Si cela ne compile pas, alors un patch a probablement chou, ou bien
  vous possdez des sources corrompus. Votre version de gcc peut
  galement ne pas tre correcte, ou bien endommage (par exemple les
  fichiers d'include peuvent tre faux). Soyez sr que les liens que
  Linus dcrit dans le fichier README sont corrects. En gnral, si un
  noyau standard ne compile pas, c'est qu'un truc ne tourne pas rond
  dans le systme, et il est plus que probable que certains outils
  doivent tre reinstalls.

  Dans des cas relativement rares, gcc peut chouer en raison de
  problmes de matriel. Le message d'erreur ressemble  un truc assez
  mystrieux "xxx exited with signal 15".  Je n'en n'aurais probablement
  pas parl si cela ne m'tait arriv une fois.  J'avais un cache
  mmoire dfectueux et le compilateur fonctionnait de manire plutt
  alatoire. Essayez dans un premier temps de reinstaller gcc si vous
  avez des problmes. Si votre noyau compile trs bien avec les caches
  externes vids ou une mmoire rduite, alors vous pourrez commencer 
  souponner votre matriel.

  Certaines personnes ont tendance  ne pas aimer que je mette en doute
  leur matriel. Je n'invente rien. Il existe une FAQ ddie  ce sujet
  :  <http://www.bitwizard.nl/sig11/> (NdT : traduite en franais 
  <http://www.linux-france.org/article/sig11-fr/sig11-fr.html>).


  77..55..  LLaa nnoouuvveellllee vveerrssiioonn dduu nnooyyaauu nnee bboooottee pplluuss !!


  Soit LILO ne fonctionne pas, soit il n'est pas configur correctement.
  Une fois, un problme dans le fichier de configuration m'a pos pas
  mal de soucis : j'avais mis "boot = /dev/hda1"  la place de "boot =
  /dev/hda" (ce genre d'erreurs n'est pas facile  trouver, mais une
  fois que vous avez un fichier de configuration qui fonctionne, il n'y
  a pas de raison d'y toucher).


  77..66..  ttoouutt VVoouuss aavveezz oouubbllii ddee llaanncceerr LLIILLOO,, oouu llee ssyyssttmmee nnee bboooottee
  pplluuss dduu


  Argh ! La meilleure chose  faire est de booter  partir d'une
  disquette et de prparer une nouvelle disquette de boot ("make zdisk"
  fait cela trs bien).  Vous avez besoin de savoir o votre partition
  racine (/) se trouve et quel est son type (ext2fs, minix, etc). Dans
  l'exemple ci-dessous, vous aurez galement besoin de connatre la
  partition des sources du noyau (/usr/src/linux), et o elle est
  monte.

  Dans cet exemple,la racine / est /dev/hda1, la partition qui supporte
  /usr/src/linux est /dev/hda3, normalement monte sur /usr. Toutes les
  deux ont un systme de fichiers de type ext2fs. L'image du noyau se
  trouve dans /usr/src/linux/arch/i386/boot/ et elle s'appelle bzImage.

  L'ide est que s'il existe un noyau bzImage qui fonctionne il est
  possible de l'utiliser pour la nouvelle disquette.  Une autre
  possibilit qui peut tre meilleure ou pas est prsente aprs cet
  exemple (cela dpend de la faon dont vous avez plant votre systme).

  Commencez par booter  partir d'une disquette d'installation
  (boot/root) ou d'une disquette de secours et montez la partition o se
  trouve le noyau en tat de marche :


          mkdir /mnt
          mount -t ext2 /dev/hda3 /mnt



  Si mkdir vous annonce que le rpertoire existe, ignorez le message.
  Maintenant, allez dans le rpertoire o se trouve le noyau en tat de
  marche.  Notez que

  /mnt + /usr/src/linux/arch/i386/boot - /usr = /mnt/src/linux/arch/i386/boot


  Insrez une disquette formate dans le lecteur "A:" (vrifiez qu'il ne
  s'agit pas de la disquette boot ou root !), faites une copie de
  l'image sur le disque et configurez votre partition racine :


  cd /mnt/src/linux/arch/i386/boot
  dd if=bzImage of=/dev/fd0
  rdev /dev/fd0 /dev/hda1



  Allez  la racine /, et dmontez la partition /usr :

  cd /
  umount /mnt



  Maintenant, vous devriez tre capable de rebooter votre systme
  normalement  partir de cette disquette. N'oubliez pas de lancer lilo
  (ou ce que vous aviez oubli) avant de rebooter !

  Comme mentionn ci-dessus, il y a une autre manire trs pratique.
  S'il se trouve que vous avez un noyau oprationnel dans / (/vmlinuz
  par exemple), on peut s'en servir. Supposons que vous remplissiez les
  conditions ci-dessus, et que votre noyau s'appelle /vmlinuz, faites
  comme ci-dessus en changeant /dev/hda3 en /dev/hda1 (la partition /),
  /mnt/src/linux en /mnt, et if=bzImage en if=vmlinuz.  La petite note
  expliquant comment aller dans /mnt/src/linux peut tre oublie.

  Utiliser LILO avec de gros disques (avec un nombre de cyclindres
  suprieur  1024) peut poser des problmes. Consultez le mini-Howto
  LILO ou la documentation.


  77..77..  IIll mmee ddiitt""wwaarrnniinngg:: bbddfflluusshh nnoott rruunnnniinngg""


  Cela peut tre un problme assez grave. Avec les noyaux ayant une
  version suprieure  1.0 (aux alentours du 20 avril 1994), le
  programme "update" qui vide priodiquement les tampons disque a t
  remplac par "bdflush". Rcuprez les sources de "bdflush" (vous
  pouvez les rcuprer l o vous avez trouv votre noyau), et compilez-
  le (il vaut mieux fonctionner avec un ancien noyau pendant la
  compilation et pendant l'installation). Il s'installera tout seul
  comme "update" et le nouveau noyau devrait ensuite fonctionner
  correctement.


  77..88..  JJee nn''aarrrriivvee ppaass  ffaaiirree mmaarrcchheerr mmoonn CCDD--RROOMM IIDDEE//AATTAAPPII


  Aussi trange que cela puisse paratre, beaucoup de gens n'arrivent
  pas  faire fonctionner leurs disques ATAPI, tout simplement parce
  qu'il y a un bon nombre de problmes potentiels.

  Si votre CD-ROM est le seul disque d'une interface IDE particulire il
  doit tre configur en "matre (master)" ou "seul (single)". C'est
  l'erreur la plus frquemment rencontre.

  Creative Labs (par exemple) a mis des interfaces IDE sur ses cartes
  sons.  Toutefois, cela pose un problme pour les gens qui ont dj
  deux interfaces IDE sur leur carte mre (IRQ15 gnralement). Une
  pratique commune est de faire de l'interface soundblaster un troisime
  port IDE (IRQ11 je pense).

  Cela pose un problme avec Linux car les versions 1.2.x ne supportent
  pas une troisime interface IDE (cela est gr avec les versions 1.3.x
  mais ce sont des versions de dveloppement, et la troisime interface
  n'est pas dtecte automatiquement). Pour rsoudre ce problme, vous
  avez plusieurs possibilits.

  Si avez dj un deuxime port IDE, il y a des chances pour que vous ne
  l'utilisiez pas ou qu'il n'ait pas deux priphriques connects.
  Dsactivez l'interface ATAPI de la carte son (vous conomisez un IRQ)
  et connectez le disque sur votre seconde interface.

  Si vous n'avez pas une seconde interface, mettez interface IDE (pas la
  partie son) de la carte son sur l'IRQ 15. Cela devrait fonctionner.


  77..99..  LLee nnooyyaauu mmee ddiitt ddeess iinnssaanniittss  pprrooppooss ddee rreeqquutteess oobbssoolltteess !!


  Rcuprez des versions rcentes du progamme route et de tous les
  autres programmes manipulant les routes : /usr/include/linux/route.h
  (qui est en fait un fichier dans /usr/src/linux) a chang.



  77..1100..  LLee FFiirreewwaallll nnee ffoonnccttiioonnnnee ppaass ddaannss llaa vveerrssiioonn 11..22..00


  Passez  la version 1.2.1.


  77..1111..  CCee nn''eesstt ppaass uunnee iimmaaggee nnooyyaauu ccoommpprreessssee !!


  N'utilisez pas le fichier vmlinux cr dans /usr/src/linux comme image
  de boot mais [..]/arch/i386/boot/bzImage.


  77..1122..  PPrroobbllmmeess aavveecc llaa ccoonnssoollee aapprrss mmiissee  jjoouurr  llaa vveerrssiioonn 11..33..xx


  Changez le mot dumb en linux dans l'entre console du fichier
  /etc/termcap. Il faudra peut-tre aussi ajouter une entre terminfo.


  77..1133..  LLee nnooyyaauu nnee sseemmbbllee ppaass ppoouuvvooiirr ccoommppiilleerr aapprrss uunnee mmiissee  jjoouurr


  Le source du noyau contient un certain nombre de fichiers d'en-ttes
  (les fichiers se terminant par .h) qui se trouvent dans le rpertoire
  /usr/include.  Ils sont rfrencs ainsi (o xyzzy.h doit tre dans
  /usr/include/linux) :

      #include <linux/xyzzy.h>


  Normalement, il y a un lien appel linux dans /usr/include sur le
  rpertoire include/linux de la racine des sources du noyau
  (/usr/src/linux/include/linux dans un systme standard).  Si ce lien
  n'existe pas, ou bien pointe au mauvais endroit, bon nombre de pro
  grammes ne compileront pas. Si vous dcidez que les sources du noyau
  prennent trop de place sur votre disque et que vous les dtruisez,
  cela sera un problme. Un autre problme qui peut arriver, c'est avec
  les permissions d'accs aux fichiers. Si votre root a un umask qui
  n'autorise pas les autres utilisateurs  voir ses fichiers par dfaut,
  et que vous dsarchiviez les sources du noyau sans l'option p (con
  serve le mode), les utilisateurs ne pourront pas utiliser le compila
  teur C. Vous pouvez alors utiliser la commande chmod pour rsoudre le
  problme mais il est probablement plus facile de rinstaller les
  fichiers include.  Vous pouvez procder de la mme manire que lors de
  l'installation des sources au dbut, en ajoutant un argument pour
  n'extraire que les includes :

      blah# tar zxvpf linux.x.y.z.tar.gz linux/include


  Notez que "make config" va recrer le lien /usr/src/linux s'il
  n'existe pas.


  77..1144..  AAuuggmmeenntteerr lleess lliimmiitteess


  Ces quelques _e_x_e_m_p_l_e_s de commandes peuvent tre assez utiles  ceux
  qui se demandent comment augmenter certaines limites logicielles
  imposes par le noyau :

   echo 4096 > /proc/sys/kernel/file-max
   echo 12288 > /proc/sys/kernel/inode-max
   echo 300 400 500 > /proc/sys/vm/freepages

  88..  NNoottee ccoonncceerrnnaanntt llaa mmiissee  jjoouurr ppoouurr lleess nnooyyaauuxx 22..00..xx,, 22..22..xx


  Les noyaux 2.0.x et 2.2.x ont introduit pas mal de modifications dans
  l'installation du noyau. Le fichier Documentation/Changes situ dans
  l'arborescence des sources 2.0.x contient des informations que vous
  devez connatre lorsque vous effectuez la mise  jour de votre
  systme. Il est fort probable que vous deviez mettre  jour plusieurs
  paquetages tels que gcc, libc et SysVInit ainsi que quelques fichiers
  systmes. Mais ne paniquez pas !



  99..  MMoodduulleess


  Les modules chargeables du noyau peuvent faire conomiser de la
  mmoire et faciliter la configuration. L'utilisation des modules s'est
  accrue jusqu' inclure les systmes de fichiers, les pilotes de cartes
  ethernet, de lecteurs de cartouches, d'imprimantes, etc.


  99..11..  IInnssttaalllleerr lleess uuttiilliittaaiirreess ppoouurr ggrreerr lleess mmoodduulleess


  Ces utilitaires sont disponibles sur n'importe quel site o vous avez
  rcupr les sources du noyau : modutils-x.y.z.tar.gz; choisissez la
  dernire version x.y.z qui est gale ou infrieure  votre version du
  noyau.  Installez-le avec `tar zxvf modutils-x.y.z.tar.gz', cd dans le
  rpertoire cr (modutils-x.y.z), regardez le fichier README, et
  suivez les instructions d'installation (qui sont en gnral trs
  simples, du genre, faites make install).  Vous devriez avoir
  maintenant les programmes insmod, rmmod, ksyms, lsmod, genksyms,
  modprobe, et depmod dans /sbin. Vous pouvez les tester avec le pilote
  exemple "hw" dans insmod ; regardez le fichier INSTALL dans ce sous-
  rpertoire pour les dtails.

  insmod insre un module dans le noyau en cours d'excution.  Les
  modules ont gnralement une extension .o.  Le pilote exemple est
  appel drv_hello.o, donc, pour l'insrer, insmod drv_hello.o'. Pour
  voir les modules que le noyau utilise actuellement, lancer lsmod.  Il
  devrait alors afficher :

  blah# lsmod
  Module:        #pages:  Used by:
  drv_hello          1


  `drv_hello' est le nom du module, il utilise une page mmoire (4ko),
  et aucun autre module du noyau ne dpend actuellement de lui. Pour le
  retirer, lancez `rmmod drv_hello'. Notez que rmmod prend comme argu
  ment _l_e _n_o_m _d_u _m_o_d_u_l_e_, (celui donn par lsmod) pas un nom de fichier.
  Les autres programmes de gestion des modules sont documents (pages de
  manuel).


  99..22..  MMoodduulleess ddiissttrriibbuuss aavveecc llee nnooyyaauu


  Avec la version 2.0.30, presque tout est disponible sous forme de
  modules chargeables. Pour les utiliser, soyez sr que vous ne les
  insrez pas dans la configuration du noyau. Pour cela, ne rpondez pas
  y pendant le `make config'.

  Compilez un nouveau noyau et bootez avec. Puis, cd dans /usr/src/linux
   nouveau, et faites un `make modules'.  Cela va compiler tous les
  modules que vous n'avez pas spcifis dans le noyau et installer les
  liens dans /usr/src/linux/modules.  Vous pouvez alors les utiliser
  depuis ce rpertoire ou faire `make modules_install' qui les
  installera dans /lib/modules/x.y.z, ou x.y.z est le numro de version
  du noyau.

  Cela peut tre particulirement utile pour les systmes de fichiers.
  Vous n'utilisez peut-tre pas frquemment les systmes de fichiers
  minix ou msdos. Par exemple, si je rencontre une disquette msdos
  (beuh), je devrai faire un insmod /usr/src/linux/modules/msdos.o, puis
  rmmod msdos lorsque j'aurai termin, Cette faon de procder conomise
  prs de 50 ko de RAM dans l'utilisation du noyau.  Remarque sur le
  systme de fichiers minix : il est trs fortement conseill de
  _t_o_u_j_o_u_r_s le configurer directement dans le noyau pour l'utilisation en
  disques de secours.



  1100..  TTrruuccss eett aassttuucceess



  1100..11..  RReeddiirriiggeerr llaa ssoorrttiiee ssttaannddaarrdd ddeess ccoommmmaannddeess mmaakkee oouu ppaattcchh


  Si vous voulez voir ce que font les commandes "make" ou "patch", vous
  pouvez rediriger les messages. Regardez d'abord quel shell vous
  utilisez.  "grep root /etc/passwd" et cherchez quelque chose comme
  "/bin/csh".

  Si vous utilisez sh ou bash,

          (commande) 2>&1 | tee  (Fichier de sortie)


  placera une copie de la sortie dans le fichier (Fichier de sortie).

  Pour csh ou tcsh, la syntaxe est :

  (commande) |& tee (Fichier de sortie).



  Pour rc (note : vous n'utilisez probablement pas rc) c'est :

          (commande) > [2=1]| tee (Fichier de sortie).




  1100..22..  IInnssttaallllaattiioonnss ddiivveerrsseess dduu nnooyyaauu


  En plus des disquettes, d'autres mthodes existent pour tester un
  nouveau noyau sans dtruire les prcdents.  la diffrence d'autres
  systmes Unix, LILO est capable de booter sur un noyau situ n'importe
  o sur le disque (si vous avez un gros disque (500 Mo ou plus) lisez
  la documentation de LILO car cela risque de poser quelques problmes).
  Donc, ajoutez cela :

      image = /usr/src/linux/arch/i386/boot/bzImage
      label = nouveau_noyau




   la fin de votre fichier de configuration LILO, vous pouvez alors
  choisir de booter sur le nouveau noyau sans avoir  dtruire l'ancien
  /vmlinuz (aprs avoir lanc lilo, bien sr).  La manire la plus
  simple d'indiquer  LILO qu'il doit booter sur un nouveau noyau est de
  presser la touche shift au boot (lorsqu'il vous indique LILO) ce qui
  vous donne un prompt.   ce moment, tapez `nouveau_noyau' pour qu'il
  boote sur le nouveau noyau.

  Si vous dsirez conserver plusieurs sources du noyau (cela peut
  prendre _b_e_a_u_c_o_u_p de place ; faites attention), la manire la plus
  simple est de le nommer : /usr/src/linux-x.y.z, ou x.y.z est la
  version du noyau.  Vous pouvez alors choisir le source  utiliser en
  faisant un lien symbolique ; par exemple, `ln -sf linux-1.2.2
  /usr/src/linux' indiquera la version 1.2.2 comme version courante.
  Avant de crer ce type de lien symbolique, soyez certain que le
  dernier argument de ln n'est pas un rpertoire existant.  Le rsultat
  ne serait pas celui que vous espriez.


  1100..33..  MMiisseess  jjoouurr ddeess nnooyyaauuxx


  Russell Nelson (nelson@crynwr.com) fait des rsums des changements
  dans les nouvelles versions du noyau. Ils sont courts et vous devriez
  les regarder avant de raliser la mise  jour. Ils sont disponibles
  par ftp anonyme  ftp.emlist.com dans pub/kchanges ou via WEB
  <http://www.crynwr.com/kchanges>.



  1111..  DD''aauuttrreess HHOOWWTTOO qquuii ppeeuuvveenntt ttrree uuttiilleess



    Sound-HOWTO : cartes sons et utilitaires

    SCSI-HOWTO : tout sur les contrleurs et priphriques SCSI

    NET-2-HOWTO : rseaux

    PPP-HOWTO : rseau avec PPP

    PCMCIA-HOWTO :  propos des pilotes pour votre portable

    ELF-HOWTO : ELF : qu'est-ce que c'est, installation, etc

    Hardware-HOWTO : survol du matriel support

    Module mini-HOWTO : plus de dtails sur les modules du noyau

    Kerneld mini-HOWTO : ddi  kerneld

    BogoMips mini-HOWTO : pour information



  1122..  DDiivveerrss



  1122..11..  AAuutteeuurr


  L'auteur du Kernel-HOWTO Linux est Brian Ward (bri@cs.uchicago.edu).
  S'il vous plat, envoyez-moi des commentaires, corrections, rajouts.
  Les corrections sont en particulier trs importantes.
  Vous pouvez jeter un coup d'oeil  ma page web ici
  <http://www.math.psu.edu/bri/> ou l <http://blah.math.tu-
  graz.ac.at/~bri/>.

  Bien que j'essaye d'tre attentif  mon courrier, rappelez-vous que
  j'en ai _b_e_a_u_c_o_u_p tous les jours, donc a peut prendre un petit peu de
  temps pour vous rpondre. Si le mail est une question, essayez d'tre
  le plus clair et dtaill possible. Si vous m'crivez  propos de
  matriel qui ne fonctionne pas (ou quelques chose du genre), j'ai
  besoin de savoir quelle est votre configuration matrielle. Si vous
  reportez une erreur, ne vous limitez pas  "J'ai essay ceci et a n'a
  pas march", j'ai besoin de savoir quelle tait l'erreur, et quelles
  versions du noyau, de gcc et de la libc vous utilisez. Me donner le
  nom de la distribution n'est pas suffisant. Ne craignez pas de poser
  des questions simples, si vous ne demandez pas vous n'aurez pas de
  rponse ! Merci  tous ceux qui m'ont envoy des commentaires.

  Si votre question ne concerne pas le noyau ou est crite dans un
  langage que je ne comprends pas, il se peut que je ne rponde pas.

  Si vous m'crivez et que vous n'obtenez aucune rponse dans un temps
  raisonable (trois semaines ou plus), il y a des chances que j'ai
  accidentellement dtruit votre message (dsol). Rssayez.

  J'ai beaucoup de mail sur des problmes et questions de matriel. Ce
  n'est pas un problme mais merci de noter que que je ne suis pas
  familier avec tout le matriel du monde. J'utilise des processeurs
  AMD, des controlleurs SCSI Adaptec et Symbios et des disques SCSI IBM.

  La version 0.1 de ce document a t crite le 3 octobre 1994. Il est
  disponible aux formats SGML, PostScript, TeX, roff et texte.


  1122..22..  RReessttee  ffaaiirree


  Le paragraphe "Trucs et astuces" est un peu court. J'espre l'toffer
  avec les suggestions venant d'autres personnes.  De mme pour "Autres
  paquetages". Des informations supplmentaires pour le
  dbogage/sauvetage lors de crash seraient les bienvenues.


  1122..33..  CCoonnttrriibbuuttiioonnss


  Une petite partie du README de Linus (cf. option kernel hacking ) est
  incluse.  (Merci, Linus !)

    uc@brian.lunetix.de (Ulrich Callmeier) : patch -s et xargs.

    quinlan@yggdrasil.com (Daniel Quinlan) : corrections et complments
     dans un bon nombre de paragraphes.

    nat@nataa.frmug.eu.org (Nat Makarvitch) : mrproper, tar -p, et
     plein d'autres choses

    boldt@math.ucsb.edu (Axel Boldt) : a rassembl les descriptions des
     options de configuration du noyau et m'a fourni la liste

    lembark@wrkhors.psyber.com (Steve Lembark) : suggestion pour le
     boot multiple.

    kbriggs@earwax.pd.uwa.edu.au (Keith Briggs) : quelques corrections
     et suggestions


    rmcguire@freenet.columbus.oh.us (Ryan McGuire): ajouts au niveau
     des options de compilation

    Eric.Dumas@freenix.fr (Eric Dumas) : traduction franaise

    simazaki@ab11.yamanashi.ac.jp (Yasutada Shimazaki): traduction
     japonaise

    jjamor@lml.ls.fi.upm.es (Juan Jose Amor Iglesias): traduction
     espagnole

    mva@sbbs.se (Martin Wahlen) : traduction sudoise

    jzp1218@stud.u-szeged.hu (Zoltan Vamosi) : traduction hongroise

    bart@mat.uni.torun.pl (Bartosz Maruszewski) : traduction polonaise

    donahue@tiber.nist.gov (Michael J Donahue) : typos, gagnant de la
     "comptition du pain en tranches"

    rms@gnu.ai.mit.edu (Richard Stallman) : notice de
     distribution/concept de documentation libre

    dak@Pool.Informatik.RWTH-Aachen.DE (David Kastrup) : NFS

    esr@snark.thyrsus.com (Eric Raymond) : quelques trucs et astuces

  Tous ceux qui m'ont envoy des mails avec des questions et des
  problmes ont galement t d'une aide prcieuse.


  1122..44..  CCooppyyrriigghhtt,, ttrraadduuccttiioonn,, lliicceennccee eett aauuttrreess


  Copyright  Brian Ward, 1994-1999.

  Version franaise Copyright  Eric Dumas, 1995-1997 dumas@freenix.fr
   Christophe Deleuze, 1999

  Permission is granted to make and distribute copies of this manual
  provided the copyright notice and this permission notice are preserved
  on all copies.

  Permission is granted to copy and distribute modified versions of this
  manual under the conditions for verbatim copying, provided that the
  derived work is distributed under the terms of a permission notice
  identical to this one. Translations fall under the category of
  ``modified versions.''

  _(_V_o_u_s _a_v_e_z _l_e _d_r_o_i_t _d_e _f_a_i_r_e _e_t _d_e _d_i_s_t_r_i_b_u_e_r _d_e_s _c_o_p_i_e_s _d_e _c_e
  _d_o_c_u_m_e_n_t _ _c_o_n_d_i_t_i_o_n _q_u_e _l_'_a_v_i_s _d_e _c_o_p_y_r_i_g_h_t _e_t _c_e_t _a_v_i_s _d_e _p_e_r_m_i_s_s_i_o_n
  _s_o_i_e_n_t _p_r__s_e_r_v__s _s_u_r _t_o_u_t_e_s _l_e_s _c_o_p_i_e_s_. _V_o_u_s _p_o_u_v_e_z _c_o_p_i_e_r _e_t
  _d_i_s_t_r_i_b_u_e_r _d_e_s _v_e_r_s_i_o_n_s _m_o_d_i_f_i__e_s _s_o_u_s _l_e_s _m__m_e_s _c_o_n_d_i_t_i_o_n_s _p_o_u_r_v_u _q_u_e
  _l_e _t_r_a_v_a_i_l _d__r_i_v_ _s_o_i_t _d_i_s_t_r_i_b_u_ _s_o_u_s _u_n _a_v_i_s _d_e _p_e_r_m_i_s_s_i_o_n _i_d_e_n_t_i_q_u_e
  _ _c_e_l_u_i_-_c_i_. _L_e_s _t_r_a_d_u_c_t_i_o_n_s _s_o_n_t _d_e_s _"_v_e_r_s_i_o_n_s _m_o_d_i_f_i__e_s_"_)_.

  Garantie : aucune.

  Cette version franaise peut tre trouve sur ftp.lip6.fr  dans le
  rpertoire /pub/linux/french/HOWTO.

  La distribution commerciale est autorise et encourage ; toutefois il
  est fortement recommand de contacter l'auteur avant la
  redistribution, dans l'intrt de la mise  jour des donnes (vous
  pourriez aussi m'envoyer un exemplaire de ce que vous faites). Idem
  pour les versions traduites, contactez le traducteur. Il est conseill
  aux traducteurs de contacter l'auteur avant de commencer la
  traduction. La version imprime est bien plus belle. Recyclez.
































































  The Linux Keyboard HOWTO
  Andries Brouwer, aeb@cwi.nl
  v2.1, 8 Novembre 1995 - version francaise Bruno Viaris

  Ce  document  traite  de l'utilisation du clavier, de la console et de
  caracteres non ASCII sous Linux.

  11..  PPrrooggrraammmmeess uuttiilleess

  Les paquetages suivants contiennent des programmes en rapport avec  le
  clavier ou la console.

  kbd-0.90.tar.gz  contient  loadkeys,  dumpkeys,  showkey, setmetamode,
  setleds,  setfont,  showfont,  mapscrn,  kbd_mode,  chvt,  resizecons,
  disalloc, getkeycodes, setkeycodes.

  util-linux-2.5 contient setterm, kbdrate.

  shellutils-1.8 (ou stty.tar.gz) contient stty.

  open-1.1.tgz contient open. (Voir aussi dynamic-vc-1.1.tar.gz.)

  SVGATextMode-0.9.tar.gz contient SVGATextMode.

  La distribution standard de X contient xmodmap, xset, kbd_mode.  (Voir
  aussi X386keybd(1).)

  22..  LLee ccllaavviieerr -- ggeenneerraalliitteess

  Quand on appuie sur une  touche,  le  controleur  clavier  envoie  des
  scancodes   au   pilote  clavier  du  noyau.  Certains  claviers  sont
  programmables, mais en general les scancodes  sont  fixes.   Quand  le
  pilote  clavier est en _m_o_d_e _s_c_a_n_c_o_d_e (dit aussi _m_o_d_e _r_a_w), le noyau se
  contente de transmettre les codes tels quels a l'application, c'est ce
  qui  se  passe  sous  X.  Sinon  le flux de scancodes est decompose en
  keycodes correspondant a l'appui ou au relachement d'une  touche.  (Le
  simple   fait  d'appuyer  sur  une  touche  peut  produire  jusqu'a  6
  scancodes, reduits ici en un seul keycode.) Si le pilote  clavier  est
  en _m_o_d_e _k_e_y_c_o_d_e (ou _m_o_d_e _m_e_d_i_u_m_r_a_w), l'application recoit les keycodes
  (ce mode est utilise, par exemple, par showkey).  Sinon, les  keycodes
  sont  traduits  d'apres une table (keymap), ensuite, soit un caractere
  (ou un chaine)  est  envoye  a  l'application,  soit  une  action  est
  declenchee.  (Exemple: si on appuie et relache la touche q, le clavier
  envoie les scancodes 0x1E et 0x9E, ce qui est converti en keycodes  30
  et  158,  puis en la valeur 113, qui est le code ASCII ou Latin-1 de q
  (avec un clavier Azerty et une  keymap  adaptee).   Si  on  appuie  et
  relache  la  touche  Suppr,  le clavier envoie les scancodes 0xE0 0x53
  0xE0 0xD3, convertis en keycodes 111 et 239, ce qui  donne  finalement
  la  sequence  ESC [ 3 ~. Ctrl-Alt-Suppr est une combinaison de touches
  qui declenche une action.)

  La conversion de scancodes exotiques en keycodes peut etre  programmee
  avec  l'utilitaire setkeycodes, mais peu de gens ont besoin.  La table
  de traduction des keycodes en caracteres, chaines ou actions, i.e.  la
  keymap,  se  manipule  grace  a  loadkeys.  Pour plus de details, voir
  getkeycodes(8), setkeycodes(8), dumpkeys(1), loadkeys(1).

  Dans ce paragraphe, le terme `envoye a l'application' signifie en fait
  `transmis  au  pilote  du terminal'. Le texte est ensuite traite de la
  meme facon que s'il venait  d'une  ligne  serie.  Les  details  de  ce
  traitement sont ajustes par le programme stty.

  33..  LLaa ccoonnssoollee -- ggeenneerraalliitteess

  A  l'inverse,  quand  on  envoie  des  caracteres  a  la  console, ils
  subissent un traitement standard (regle par stty), puis  sont  envoyes
  au  pilote  de  la console.  Le pilote de la console emule un terminal
  VT100, et scrute les donnees recues  pour  intercepter  les  sequences
  escape (du genre deplacement du curseur, effacement de l'ecran, etc.).
  Les autres octets sont, apres une eventuelle conversion par  la  table
  de  conversion  de  la console, ecrits dans la memoire video. La carte
  video affiche ces caracters en utilisant une police  stockee  dans  sa
  memoire.  On  peut  changer  cette  police en utilisant setfont, et la
  table de conversion de la console peut  etre  modifiee  avec  mapscrn.
  Pour plus de details, voir plus bas.

  44..  RReeiinniittiiaalliisseerr llee tteerrmmiinnaall

  L'ecran  est  plein  de cochonneries, tout ce qu'on tape apparait sous
  forme de petits dessins. Que faire ?

  De nombreux programmes retracent l'ecran quand on tape ^L, ce qui peut
  etre  utile  en  cas  de  modem  bruite  ou de messages intempestifs a
  l'ecran. La commande clear efface l'ecran.

  La commande reset reinitialise le pilote de la console. Elle est  bien
  utile  quand  l'ecran  est  plein  de  ces jolis caracteres graphiques
  illisibles, ou quand l'affichage est reduit a la  ligne  du  bas.   Si
  vous  ne  disposez pas de cette commande, ou si elle fait autre chose,
  voici le remede: mettez ces deux lignes  dans  un  fichier  executable
  reset quelque part dans votre PATH:

       #!/bin/sh
       echo -e \\033c

  ce qui envoie la sequence ESC c a la console.  Si vous avez charge une
  police bizarre et que vous voulez revenir a la police par defaut,

       % setfont

  fera l'affaire (a condition que la police par defaut soit a sa place).
  Sur  de vieux terminaux, l'utilisation de tabs peut demander un delai,
  executer alors

       % stty tab3

  (voir stty(1)). Pour changer de mode  video,  utiliser  resizecons  ou
  SVGATextMode.   Ceci  regle  generalement  la  partie affichage.  Cote
  clavier, il peut y avoir encore pas mal de problemes. Si  X,  DOOM  ou
  tout autre programme travaillant en mode raw (ou mediumraw) se plante,
  le clavier peut rester dans ce mode et il est alors  difficile  d'exe-
  cuter  la  moindre  commande.  (Voir "Comment sortir du mode raw" plus
  loin.)

  44..11..  KKeeyybbooaarrdd hhaarrddwwaarree rreesseett

  Le probleme peut parfois se situer a un niveau encore plus bas.  Il  y
  a  au moins deux niveaux (le clavier et le controleur clavier) ou l'on
  peut envoyer la commande "desactiver le clavier" au materiel.  De plus
  les  claviers  ont  souvent  trois  tables de scancodes utilisables au
  choix.

  Je n'ai cependant jamais entendu parler de cas ou  cela  ait  pose  un
  probleme.

  Certains  claviers  ont  une  fonction de reprogrammation des touches.
  Stormy Henderson (stormy@Ghost.Net) ecrit:

       `Si votre clavier a ete accidentellement  reprogramme,  vous
       pouvez (avec un clavier Gateway AnyKey) appuyer sur control-
       alt-suspend_macro pour remettre les choses en place.'

  55..  DDeelleettee eett BBaacckkssppaaccee

  55..11..  CCoommmmeenntt cchhooiissiirr llee ccaarraacctteerree aa uuttiilliisseerr ppoouurr eeffffaacceerr llee  ddeerrnniieerr
  ccaarraacctteerree ttaappee

       % stty erase ^?

  Si le caractere est efface, mais d'une maniere bizarre, c'est que  les
  parametres du terminal sont mauvais. Si echoprt est active, les carac-
  teres effaces s'affichent entre \ et /.  Si echoe est  desactive,  les
  caracteres  ne  sont  plus effaces a l'ecran, mais leur effacement est
  signale  par   l'affichage   du   caractere   d'effacement,   exemple:
  Libux###nux (avec # comme caractere d'effacement).

  On  utilisera  donc generalement stty echoe -echoprt. La commande stty
  sane activera ces parametres et bien d'autres.  La  commande  stty  -a
  affiche  les  parametres  actuels. Pourquoi ces parametres ne sont pas
  actives par defaut ? Il suffit d'utiliser le bon getty.

  Il est a noter que beaucoup de programmes (comme bash, emacs etc.) ont
  leur   propres  assignations  de  touches  (definis  dans  ~/.inputrc,
  ~/.emacs, etc.) et  ne  tiennent  pas  compte  de  ces  parametres  de
  terminal.

  55..11..11..  ``GGeettttyy ccoommpprreennaaiitt bbiieenn DDEELL eett BBSS,, mmaaiiss pplluuss mmaaiinntteennaanntt ??''

  Jadis,  la  console  traduisait   DEL   (\177)   en   BS   Espace   BS
  (\010\040\010).

  Les DEL sont desormais ignores (comme le devrait toute emulation vt100
  fidele). Choisissez un meilleur getty, i.e.,  qui  n'affiche  pas  les
  DEL.

  55..11..22..   ``LLooggiinn  nnee  ffaaiitt  ppaass llaa mmeemmee cchhoossee aauu pprreemmiieerr eett aauu ddeeuuxxiieemmee
  eessssaaii??''

  Au  premier  essai,  on  parle  a  getty,  au  deuxieme  a login, deux
  programmes distincts qui peuvent se comporter differemment.

  55..22..  CCoommmmeenntt ddiirree aa LLiinnuuxx qquueell ccooddee ggeenneerreerr aa ll''aappppuuii ssuurr uunnee ttoouucchhee

  Quand  on  utilise  la  console, ou plus precisement, quand le clavier
  n'est pas en mode (medium)raw, il faut utiliser:

       % loadkeys monclavier.map

  Sous X, utiliser:

       % xmodmap monclavier.xmap

  Remarque: depuis XFree86-2.1, X initialise son clavier a partir de  la
  configuration  du clavier de la console. Bien que les deux systemes ne
  soient pas 100% compatibles, cette technique rend generalement l'util-
  isation de xmodmap superflue.

  Si, par exemple, si vous voulez que la touche Backspace genere le code
  BackSpace (^H), au lieu du code par defaut (Delete), faites:

       % loadkeys
       keycode 14 = BackSpace
       %

  55..22..11..  ``PPoouurrqquuooii llaa ttoouucchhee BBaacckkSSppaaccee  nnee  ggeenneerree  ppaass  BBaacckkSSppaaccee  ppaarr
  ddeeffaauutt ??''

  (i) Parce que les terminaux VT100 ont une touche Delete au  dessus  de
  la touche Entree.

  (ii) Parce que Linus en a decide ainsi.

  55..33..  CCoommmmeenntt ddiirree aa XX dd''eecchhaannggeerr DDeelleettee eett BBaacckkssppaaccee

       % xmodmap -e "keysym BackSpace = Delete" -e "keysym Delete = BackSpace"

  Ou, si vous voulez juste que Backspace genere le code BackSpace:
       % xmodmap -e "keycode 22 = BackSpace"

  Ou, si vous voulez juste que Delete genere le code Delete:

       % xmodmap -e "keycode 107 = Delete"

  (mais generalement c'est deja la disposition par defaut).

  55..44..   CCoommmmeenntt  ddiirree  aa  eemmaaccss ccee qquu''iill ddooiitt ffaaiirree ddeess ccooddeess DDeelleettee eett
  BBaacckkssppaaccee

  Mettez dans votre .emacs les lignes:

         (global-set-key "\?" 'delete-backward-char)
         (global-set-key "\C-h" 'help-command)

  Bien  sur,  vous pouvez associer d'autres commandes a d'autres touches
  de la meme maniere.

  55..55..  CCoommmmeenntt ddiirree aa eemmaaccss ddee ppeerrmmuutteerr DDeelleettee eett BBaacckkssppaaccee

  Mettez dans votre .emacs les lignes:

         (setq keyboard-translate-table (make-string 128 0))
         (let ((i 0))
         (while (< i 128)
             (aset keyboard-translate-table i i)
             (setq i (1+ i))))
         (aset keyboard-translate-table ?\b ?\^?)
         (aset keyboard-translate-table ?\^? ?\b)

  55..66..  CCoommmmeenntt ddiirree aa kkeerrmmiitt dd''eecchhaannggeerr DDeelleettee eett BBaacckkssppaaccee

  Mettez dans votre .kermrc les lignes:

         set key \127 \8
         set key \8 \127

  55..77..  CCoommmmeenntt rreegglleerr xxtteerrmm sseelloonn vvooss mmooddeess ddee tteerrmmiinnaall pprreeffeerreess

  Normalement  xterm  herite  des  modes  de  terminal  du processus qui
  l'appelle.  Pour xdm, les caracteres erase et kill sont # et @,  comme
  sur  les  bons  vieux  Unix  Version 6.  Si ca ne vous plait pas, vous
  pouvez mettre

         XTerm*ttymodes: erase ^? kill ^U intr ^C quit ^\ eof ^D susp ^Z start ^Q stop ^S eol ^@

  dans /usr/lib/X11/app-defaults/XTerm ou dans $HOME/.Xresources, a con-
  dition d'executer la commande

         xrdb $HOME/.Xresources

  dans votre $HOME/.xinitrc.

  55..88..  CCoommmmeenntt ddiirree aa xxmmoossaaiicc qquuee llaa ttoouucchhee BBaacckkssppaaccee ggeenneerree uunnee DDEELL

  Mettre

         *XmText.translations: #override\n\
                <Key>osfDelete: delete-previous-character()
         *XmTextField.translations: #override\n\
                 <Key>osfDelete: delete-previous-character()

  dans votre $HOME/.Xresources devrait faire l'affaire.

  Cependant, la FAQ de netscape dit:

          Pourquoi ma touche Backspace ne marche pas dans les boites texte ?
          Par defaut, Linux et XFree86 ont leur touches Backspace et Delete
          mal configurees. Tous les programmes Motif (y compris Netscape
          Navigator) auront les memes problemes.

          Les specifications Motif disent que Backspace doit effacer le
          caractere precedent et Delete le caractere suivant. Par defaut sous
          Linux et XFree86 Backspace et Delete generent le code DEL.

          Le probleme peut etre resolu en utilisant un programme tel que
          xmodmap, xkeycaps, ou loadkeys pour que la touche Backspace
          genere le code BackSpace au lieu de Delete.

          Une autre solution consiste a avoir un fichier .motifbind;
          voir la page de manuel de VirtualBindings(3).

          Note: n'utilisez pas les ressources *XmText.translations ou
          *XmTextField.translations pour essayer de resoudre ce probleme.
          Si vous le faites, vous annulez toutes les autres programmations
          de touches dans les boites textes de Netscape Navigator.

  55..99..  EEtt lleess ffiicchhiieerr tteerrmmccaapp eett tteerrmmiinnffoo??

  Les gens qui ont des problemes avec backspace  ont  tendance  a  aller
  voir  dans  leur  fichier  termcap  (ou terminfo), et effectivement la
  ressource kb (ou kbs) decrit le code genere par la  touche  Backspace.
  Cependant  peu  de  programmes  utilisent  ces  bases  de donnees pour
  rechercher le code envoye par backspace, donc, a moins de n'avoir  des
  problemes  qu'avec  certains  programmes,  il faut en general chercher
  ailleurs.  Cela dit, il vaut mieux de toute facon avoir un termcap (ou
  terminfo) correct. Voir aussi "La variable TERM" plus loin.

  66..  LLeess ttaabblleess ddee ccaarraacctteerreess ddee llaa ccoonnssoollee

  Le  noyau  a quatre tables de conversion des octets en symboles ecran:
  a) Latin1 ->  PC,   b)  VT100  graphique  ->  PC,  c)  PC  ->  PC,  d)
  utilisateur.

  Il y a deux tables de caracteres, appelees G0 et G1, dont l'une est la
  table courante. (Initialement G0.)  Taper ^N fait passer  a  la  table
  G1, ^O a la table G0.

  Ces  variables  G0  et  G1  pointent  sur  des tables de conversion et
  peuvent etres changees par l'utilisateur. Initialement, elles pointent
  respectivement sur les tables a) et b).  Les sequences ESC ( B , ESC (
  0 , ESC ( U et ESC ( K font respectivement pointer G0 sur  les  tables
  de conversion a), b), c) et d).  Les sequences ESC ) B , ESC ) 0 , ESC
  ) U et ESC ) K font  respectivement  pointer  G0  sur  les  tables  de
  conversion a), b), c) et d).

  La  sequence ESC c provoque une reinitialisation complete du terminal,
  ce qui peut etre necessaire si l'ecran est tout brouille. La  commande
  echo  ^V^O, souvent conseillee, ne fera que rappeler la table G0, mais
  rien  ne  garantit  que  G0  pointe  sur  la  table   a).    Certaines
  distributions  ont  un  programme reset(1) qui fait juste un echo ^[c.
  Si votre termcap pour  la  console  est  correcte  (et  a  une  entree
  :rs=\Ec:), alors vous pouvez utiliser setterm -reset.

  La  table  de  conversion  d)  peut  etre  definie par mapscrn(8).  Le
  resultat est que si un symbole c est affiche, c'est  le  symbole  s  =
  map[c]  qui  est mis dans la memoire video.  L'image du caractere s se
  trouve dans la memoire de la carte video et peut  etre  modifiee  avec
  setfont(8).

  77..  CChhaannggeerr ddee ccoonnssoollee

  Par  defaut,  le changement de console se fait par Alt-Fn ou Ctrl-Alt-
  Fn.  Sous X (ou les versions recentes de dosemu), seule la combinaison
  Ctrl-Alt-Fn marche.

  XFree86  1.3  ne  sait  pas  que  la  touche Alt est enfoncee quand on
  rappelle la fenetre X. Il faut donc  relacher  Alt  avant  de  pouvoir
  rechanger  de  console.   Pourtant,  ca  pourrait  marcher:  le  noyau
  memorise toujours l'etat appuye/relache des touches. (Autant que faire
  se  peut:  certains clavier n'emettent pas de scancode quand on appuie
  dessus (ex: les touches PFn d'un FOCUS 9000) ou quand on  les  relache
  (ex: la touche Pause de la plupart des claviers).)

  XFree86 1.3 sauve les polices chargees sur la carte video quand il est
  demarre, et les restaure lors d'un  changement  de  console.  Donc  le
  resultat  d'un  setfont  sur  une  console virtuelle est annule par un
  aller retour dans la fenetre X.  L'utilisation de setfont sous X donne
  des resultats bizarres...

  Le  changement  de  console  par  programme  est  possible  grace a la
  commande chvt.

  77..11..  CChhaannggeerr llee nnoommbbrree ddee CCoonnssoolleess VViirrttuueelllleess

  Cette question est toujours posee de temps en temps, mais  la  reponse
  est:  il  y en a deja suffisament.  Depuis la version 1.1.54 du noyau,
  il y a entre 1 et 63 consoles virtuelles.  Une  nouvelle  console  est
  creee des qu'elle est ouverte.  Elle peut etre supprimee avec disalloc
  (mais il faut que plus aucun processus ne lui soit associe).

  Pour les vieux noyaux, changer la ligne

       #define NR_CONSOLES     8

  dans include/linux/tty.h (ne pas depasser 63), et recompiler.  Il  est
  possible  que  vous  ayez  a  creer le peripherique correspondant avec
  MAKEDEV ou mknod ttyN c 4 N ou N est le numero du terminal.   Si  vous
  voulez  avoir des getty sur ces nouvelles consoles, ajoutez des lignes
  dans /etc/inittab.

  Quand les consoles sont allouees dynamiquement,  il  est  generalement
  plus  simple  de  n'avoir  qu'un ou deux getty. D'autres consoles sont
  ouvertes par open -l -s bash. Les consoles inutilisees (sans processus
  associe) sont desallouees par disalloc.

  Si  vous  disposez de spawn_login (inclus dans kbd-0.90.tar.gz) et que
  vous mettez

               loadkeys << EOF
               alt keycode 103 = Spawn_Console
               EOF
               spawn_login &

  dans /etc/rc.local, taper Alt-FlecheHaute creera  (et  affichera)  une
  nouvelle console avec un login. Voir aussi open-1.3.tgz.

  Vous  ne  pouvez  vous  loger sous "root" que sur les terminaux listes
  dans /etc/securetty.

  88..  CCttrrll--AAlltt--DDeell eett aauuttrreess ccoommbbiinnaaiissoonnss ssppeecciiaalleess

  88..11..  CCttrrll--AAlltt--DDeell ((BBoooott))

  Quand on  appuie  sur  Ctrl-Alt-Del  (ou  toute  autre  combinaison  a
  laquelle  loadkeys  associe  le keycode Boot), soit la machine reboote
  immediatement (sans sync), soit le signal SIGINT est envoye a init (ce
  qui  est  le  comportement  par defaut, changeable par l'appel systeme
  reboot(), voir ctrlaltdel(8)).  Certains init changent le  defaut.  Ce
  qui  se  produit quand init recoit SIGINT depend de la version du init
  utilisee  et  est  souvent  determine  par  le  ligne  pf  du  fichier
  /etc/inittab  (on  peut  dans ce cas lancer n'importe quel programme).
  Dans les versions actuelles du noyau Ctrl-AltGr-Del n'est plus assigne
  par defaut a Boot.

  88..22..  AAuuttrreess ccoommbbiinnaaiissoonnss

  Combinaisons par defaut avant utilisation de loadkeys, donc en qwerty.

  Nom du keycode  Combinaison
  -------------------------------
  Show_Memory     Shift-Scrollock
  Show_Registers  AltGr-ScrollLock
  Show_State      Ctrl-ScrollLock
  Console_n       Alt-Fn and Ctrl-Alt-Fn  (1 <= n <= 12)
  Console_{n+12}  AltGr-Fn                (1 <= n <= 12)
  Incr_Console    Alt-FlecheDroite
  Decr_Console    Alt-FlecheGauche
  Last_Console    Alt[Gr]-ImprEcran
  Scroll_Backward Shift-PgPrec
  Scroll_Forward  Shift-PgSuiv
  Compose         Ctrl-.          (Ctrl-: sur clavier azerty)
  Caps_On         <pas defini>    (Par defaut CapsLock est un va-et-vient,
  Caps_Shift      <pas defini>    ces Keycodes servent a recreer le desagreable
                                  comportement MS-Keyb Fr)

  88..33..  CCoommbbiinnaaiissoonnss ssoouuss XX

  Ctrl-Alt-Fn             Affiche la console virtuelle n
  Ctrl-Alt-KP+            Resolution suivante
  Ctrl-Alt-KP-            Resolution precedente
  Ctrl-Alt-Backspace      Tue le serveur X

  Sur certaines cartes-meres, Ctrl-Alt-KP- et  Ctrl-Alt-KP+  emulent  le
  bouton Turbo. Ces sequences produisent les scancodes 1d 38 4a ca b8 9d
  et 1d 38 4e ce b8 9d, et toutes deux changent la vitesse de Turbo  (>=
  25MHz) a non-Turbo (8 or 12 MHz) et vice-versa.  (souvent ce comporte-
  ment peut etre desactive par un cavalier sur la carte-mere.)

  Perry F Nguyen (pfnguyen@netcom22.netcom.com) ecrit:

       Les BIOS AMI permettent de bloquer le clavier  et  de  faire
       clignoter les LEDs quand on appuie sur Ctrl-Alt-Backspace et
       qu'un mot de passe BIOS est defini, et  ce  jusqu'a  ce  que
       celui-ci soit tape.

  88..44..  CCoommbbiinnaaiissoonnss ssoouuss DDoosseemmuu

  Ctrl-Alt-Fn     Rappelle la console n (versions >0.50; avant Alt-Fn)
  Ctrl-Alt-PgDn   Tue dosemu (quand le calvier est en mode RAW)
  (et bien d'autres, voir la documentation de dosemu)

  88..55..  CCoommppoossiittiioonn ddee ssyymmbboolleess

  Un symbole peut etre construit en utilisant plusieurs frappes.

  +o  En  mode  Ascii,  taper  un  code  Ascii  en  decimal  sur  le pave
     numerique, tout en maintenant la touche Alt  enfoncee,  produit  le
     caractere  en  question  quand on relache Alt. (En mode Unicode, il
     faut taper le code hexadecimal a 4 chiffres du symbole)

  +o  L'appui sur un accent mort puis sur une lettre produit cette lettre
     accentuee  (si  possible,  sinon l'accent suivi de la lettre).  Les
     touche  mortes  sont  definissables  par  l'utilisateur  (grace   a
     loadkeys(1)). Il y a cinq possibilites:

     accent                  keycode mort            keycode normal
     ------------------------------------------------------
     accent grave            dead_grave              grave
     accent aigu             dead_acute              apostrophe
     accent circonflexe      dead_circumflex         asciicircum
     tilde                   dead_tilde              asciitilde
     trema                   dead_diaeresis          diaeresis

  Par  defaut  aucune  touche  du  clavier n'est morte.  Le resultat est
  celui de Compose + accent + lettre (et  est  donc  redefinissable,  cf
  plus bas).

       NDT:  pour  des francophones utilisant un clavier Azerty, il
       vaut  generalement  mieux  se  contenter  de  definir  comme
       touches mortes l'accent circonflexe et le trema de la touche
       a droite du `P'.  Il  est  sinon  fastidieux  voire  parfois
       impossible  (en  particulier  sous  X) de taper les symboles
       tilde et apostrophe, bien utiles sous Unix.  Or  les  tables
       standard pour clavier Latin-1 activent en general toutes les
       touches mortes possibles. Il faut donc pour ressusciter  ces
       touches,  remplacer  le  keycode  mort par le keycode normal
       dans la table chargee au demarrage par loadkeys.

  +o  Compose suivi de deux symboles produit une  combinaison  des  deux.
     Cette  combinaison  est  redefinissable.  Il  y  a  a  ce  jour  68
     combinaisons par defaut qui peuvent etre affichees par  dumpkeys  |
     grep compose.

  +o  Depuis  la  version  1.3.33  du  noyau, il est possible d'avoir des
     touches "collantes" (plus ou moins comme Escape)  grace  aux  codes
     SControl et SAlt. Par exemple, on peut taper ^C par Scontrol puis C
     et Ctrl-Alt-BackSpace  par SControl puis SAlt puis BackSpace.

  Il est a noter qu'il existe au moins trois mecanismes  de  composition
  distincts:

  1. Le pilote clavier de Linux, configure par loadkeys.

  2. Le mecanisme de X - voir X386keybd(1), ou XFree86kbd(1).
     Sous X11R6 : editer /usr/X11R6/lib/X11/locale/iso8859-1/Compose.

  3. Le mecanisme d'emacs, active en chargeant iso-insert.el.

     Pour X, l'ordre des deux symboles n'a pas d'importance: Compose-,-c
     et Compose-c-, donnent tous deux un c-cedille; pour Linux et emacs,
     seule  la  premiere combinaison est correcte. Les combinaisons de X
     sont fixes, celles de Linux et  emacs  sont  reconfigurables.   Les
     trois listes par defaut sont assez similaires, mais il y a quelques
     differences.

  99..  DDiivveerrsseess pprroopprriieetteess ddee llaa ccoonnssoollee

  Voir loadkeys(1), setleds(1), setmetamode(1) pour  les  codes  generes
  par  les diverses touches et l'utilisation des leds quand on n'est pas
  sous X. Sous X, voir xmodmap(1).

  Voir  setterm(1),  kbdrate(8)  pour  les  proprietes  telles  que  les
  couleurs de l'ecriture et du fond, l'economiseur d'ecran et la vitesse
  de repetition des touches quand on n'est pas sous  X.   Sous  X,  voir
  xset(1), qui s'occupe aussi du clic des touches et du volume des bips.

  Le fichier /etc/termcap definit les sequences escape utilisees par  de
  nombreux programmes utilisant la console (ou tout autre terminal). Une
  version  plus  moderne  se  trouve   dans   /usr/lib/terminfo.   (voir
  terminfo(5).  Les  fichiers  terminfo  sont  crees  par le compilateur
  terminfo /usr/lib/terminfo/tic, voir tic(1).)

  (Sur ma machine) /dev/console est lien symbolique sur /dev/tty0, et le
  noyau  considere  /dev/tty0  comme un synonyme de la console virtuelle
  courante.  XFree86 1.3 change le proprietaire de /dev/tty0, mais ne le
  restaure  qu'a  la  sortie.  Or  dumpkeys  risque de ne pas marcher si
  quelqu'un d'autre est  proprietaire  de  /dev/console;  dans  ce  cas,
  lancer X et en sortir peut arranger les choses.

  1100..  CCoommmmeenntt ssoorrttiirr dduu mmooddee RRAAWW

  Si  un  programme  utilisant  le mode K_RAW du clavier se termine sans
  remettre le calvier en mode K_XLATE, alors il est  tres  difficile  de
  faire  quoi que ce soit - meme  Ctrl-Alt-Del. Cependant il est parfois
  possible d'eviter  d'appuyer  sur  Reset  (et  meme  souhaitable:  vos
  utilisateurs risquent de ne pas apprecier qu'on leur tue leur Nethack,
  et surtout il est possible d'endommager le systeme de fichiers).   Les
  solutions  simples  consistent a se loger a partir d'un autre terminal
  ou une autre machine et faire  kbd_mode  -a.   La  procedure  suivante
  suppose  que  X ne tourne pas, que l'ecran est en mode texte, que vous
  etes a un prompt shell, que Ctrl-C est le caractere d'interruption  et
  que vous n'avez pas un clavier trop exotique (i.e. la touche `=' est 2
  touches a droite de `0').

  1ere etape: Lancer X.  Appuyez sur la combinaison  2-F12-=  :  appuyez
  sur  2  puis  F12  (sans  lacher  2)  et  puis = (sans lacher les deux
  autres), le tout assez  rapidement!  Ca  lance  X.   (Explication:  si
  l'appui  sur  une  touche  produit le keycode K, alors son relachement
  produit K+128. Votre shell risque de na pas apprecier ces  caracteres,
  donc  on  evite  de les lui envoyer en ne lachant pas les touches. `2'
  produit un ^C qui annule tout ce qui a ete tape avant. F12 produit  un
  X  et `=' le code entree. Et tout ca vite fait avant que la repetition
  des touches ne commence...)

  Votre ecran est alors probablement gris, puisqu'aucun .xinitrc n'a ete
  specifie.  Cependant  Ctrl-Alt-Fn  marche,  et vous pouvez appeler une
  autre console. (Ctrl-Alt-Backspace  marche  aussi,  mais  ca  restaure
  l'etat initial du clavier qui justement n'est pas bon.)

  2eme  etape:  Programmer  le  changement  de  mode  du  clavier.  (Par
  exemple, avec sleep 5; kbd_mode -a.)

  3eme etape: Quitter X.   Alt-Fx  (souvent  Alt-F7)  retourne  sous  X,
  ensuite  Ctrl-Alt-Backspace  tue  X.  Dans  les  5 secondes le clavier
  redevient utilisable.

  Si vous voulez vous preparer pour cette occasion, faites de  \215A\301
  (3  symboles)  un  alias de kbd_mode -a.  Desormais, l'appui sur F7 en
  mode RAW remettra tout en ordre.

  1111..  LLaa vvaarriiaabbllee TTEERRMM

  De nombreux programmes utilisent  la  variable  TERM  et  la  base  de
  donnees /etc/termcap ou /usr/lib/terminfo/* pour trouver quelle chaine
  de commande efface l'ecran, deplace le curseur, etc., et parfois  pour
  savoir  quelle  chaine  est  envoyee  par  la touche backspace, ou les
  touches de fonction, etc. Cette variable est d'abord  definie  par  le
  noyau (pour la console). Generalement elle est redefinie par getty, en
  utilisant  /etc/ttytype  ou  l'argument  specifie  dans  /etc/inittab.
  Parfois elle est encore changee par /etc/profile.

  Les anciens systemes utilisent TERM=console ou TERM=con80x25. Les plus
  recents (avec ncurses  1.8.6)  utilisent  la  valeur  plus  specifique
  TERM=linux  ou  TERM=linux-80x25.  Cependant, les vieilles versions de
  setterm cherchent une valeur du type TERM=con* et ne marchent donc pas
  avec TERM=linux.

  Depuis la version 1.3.2 du noyau, la valeur par defaut est TERM=linux.

  Si votre termcap n'a pas d'entree `linux', il suffit d'ajouter l'alias
  linux dans la description de `console':

               console|con80x25|linux:\

  et de copier (ou faire un lien symbolique) /usr/lib/terminfo/c/console
  en /usr/lib/terminfo/l/linux.

  1111..11..  TTeerrmmiinnffoo

  Il manque, dans le fichier terminfo de la console  linux  fourni  avec
  ncurses   1.8.6,   la   ligne:   kich1=\E[2~,  necessaire  a  certains
  programmes.  Editez ce fichier et compilez-le avec tic.

  1122..  CCoommmmeenntt ffaaiirree ppoouurr qquuee dd''aauuttrreess pprrooggrraammmmeess aacccceepptteenntt  lleess  ccaarraacc--
  tteerreess nnoonn--AASSCCIIII

  C'etait  jadis  un   veritable   calvaire.   Il   fallait   convaincre
  individuellement chaque programme de travailler en 8 bits.  Les choses
  ne sont pas encore ideales, mais recemment de nombreux utilitaires GNU
  ont   appris   a  reconnaitre  les  variables  LC_CTYPE=iso_8859_1  ou
  LC_CTYPE=iso-8859-1.  Essayez d'abord ca,  et  si  ca  ne  suffit  pas
  essayez les trucs ci-dessous.

  Tout  d'abord,  le huitieme bit doit survivre au processus d'entree du
  noyau, assurez-vous-en donc avec stty cs8 -istrip -parenb.

  A. Pour emacs, mettez les lignes

          (standard-display-european t)
          (set-input-mode nil nil 1)
          (require 'iso-syntax)

  et peut-etre aussi

               (load-library "iso-insert.el")
               (define-key global-map [?\C-.] 8859-1-map)

  dans votre $HOME/.emacs.  (Cette derniere ligne marche dans un  xterm,
  en utilisant emacs -nw, mais il faut alors mettre

               XTerm*VT100.Translations:       #override\n\
               Ctrl <KeyPress> . : string("\0308")

  dans  votre  .Xresources.)  NDT: fichiers pour clavier Qwerty, a veri-
  fier pour azerty.

  B. Pour less, mettez LESSCHARSET=latin1 dans l'environment.

  C. Pour ls, mettez l'option -N. (A priori en faisant un alias.)

  D. Pour bash (version 1.13.*), mettez

               set meta-flag on
               set convert-meta off

  et, selon le Danish-HOWTO,

               set output-meta on

  dans votre $HOME/.inputrc.

  E. Pour tcsh, definissez les variables:

               setenv LANG     fr_FR   (ou fr_CA, fr_CH, fr_BE...)
               setenv LC_CTYPE iso_8859_1

  Si nls est installe,  les  routines  correspondantes  sont  utilisees.
  Sinon  tcsh  agit en iso_8859_1, quelle que soit les valeurs donnees a
  LANG et LC_CTYPE. voir la section NATIVE LANGUAGE SYSTEM  de  tcsh(1).
  (d'apres le Danish-HOWTO: setenv LC_CTYPE ISO-8859-1; stty pass8)

  F.  Pour  flex, donnez l'option -8 si l'analyseur genere doit accepter
  les entrees 8-bits. (Bien sur qu'il doit le faire !)

  G. Pour elm,  mettez  displaycharset  a  ISO-8859-1.   (Danish  HOWTO:
  LANG=C et LC_CTYPE=ISO-8859-1)

  H. Pour les programmes utilisant curses (comme lynx) David Sibley dit:

       La version standard de curses utilise le huitieme  bit  pour
       la  video  inversee  (voir  le  flag  _STANDOUT  defini dans
       /usr/include/curses.h).  Cependant ncurses semble  fonction-
       ner en 8-bits et affiche le iso-latin-8859-1 correctement.

  I.  Pour  les  programmes  utilisant  groff  (comme  man), utilisez le
  -Tlatin1 au lieu de -Tascii. Les vieilles versions  de  man  utilisent
  aussi col, et le point suivant s'applique aussi.

  J.  Pout  col,  assurez-vous  1)  qu'il  a  ete  corrige  et  fait  un
  setlocale(LC_CTYPE,""); et  2)  de  definir  LC_CTYPE=ISO-8859-1  dans
  l'environment.

  K. Pour rlogin, utilisez l'option -8.

  L.                              Pour                              joe,
  sunsite.unc.edu:/pub/Linux/apps/editors/joe-1.0.8-linux.tar.gz devrait
  marcher apres edition du fichier de configuration. J'ai aussi lu: joe:
  mettez l'option -asis dans /usr/lib/joerc en premiere colonne.

  M. Pour LaTeX: \documentstyle[isolatin]{article}.
  Pour    LaTeX2e:    \documentclass{article}\usepackage{isolatin}    ou
  isolatin.sty est disponible a
   <ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit>.

  Une  belle  discussion  sur  le  theme  de l'ISO-8859-1 et sur comment
  manipuler les caracteres 8-bits est disponible dans
   <ftp://grasp.insa-lyon.fr/pub/faq/fr/accents>  (en  francais).    Une
  autre, en anglais, peut etre trouvee a
   <ftp://rtfm.mit.edu/pub/usenet-by-group/comp.answers/character-
  sets/iso-8859-1-faq>.           Encore          une          autre(?):
  <ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/FAQ-ISO-8859-1>.

  1133..  QQuuee ffaaiitt eexxaacctteemmeenntt XXFFrreeee8866--22..11 aa ll''iinniittiiaalliissaattiioonn ddee ssaa  kkeeyymmaapp??

  Depuis  la  version 2.1, XFree86 initialise sa keymap d'apres celle de
  Linux, dans les limites du possible. Linux a 16  entrees  par  touches
  (une pour chaque combinaison de Shift, AltGr, Ctrl, Alt; en fait il en
  a meme 256), alors que X n'en a que 4 (une pour chaque combinaison  de
  Shift et Mod), il y a donc forcement des informations perdues.

  D'abord  X  lit  le  fichier Xconfig, ou il trouve les correspondances
  entre les touches Control, Alt et ScrollLock avec les  codes  X  Meta,
  ModeShift,  Compose,  ModeLock  et  ScrollLock - voir X386keybd(1), ou
  XFree86kbd(1).

  Par defaut, c'est la colonne  LeftAlt  qui  sert  pour  Mod,  sauf  si
  CtlDroit  est  defini comme ModeShift ou ModeLock, dans ce cas ce sont
  les entrees RightCtl qui servent pour Mod. (Sauf si AltGr  est  defini
  comme  Mod  dans  Xconfig,  auquel  cas  c'est la colonne RightAlt qui
  sert.)  Ceci determine comment les 4 entrees de XFree86 sont  choisies
  parmi  les  16  de  Linux.  Notons que par defaut Linux ne fait pas la
  difference  entre  les  deux  touche  Control  ou  Shift.  X  fait  la
  dufference.
  Les   touches   "action"   Show_Memory,   Show_State,  Show_Registers,
  Last_Console, Console_n, Scroll_Backward, Scroll_Forward,  Caps_On  et
  Boot  sont  ignorees,  de  meme  pour  les  touches  mortes,  NumLock,
  ScrollLock et Alt+code-ASCII.

  Ensuite,  les  definitions  de  Xconfig  sont  utilisees.  (Donc   une
  definition  de  Compose  dans  Xconfig  annulera celle trouvee dans la
  keymap du noyau.)

  Que deviennent les chaines associees aux touches des fonctions ? Rien,
  ce  concept  n'existe pas sous X. (Mais il est possible de definir des
  chaines associees aux touches de fonction dans xterm - mais  elles  ne
  doivent pas etre interceptees par le gestionnaire de fenetres.)

  Je  ne  sais  pas  comment  convaincre xterm qu'il devrait utiliser la
  keymap de X quand Alt est enfonce. Il semble qu'il ne  reagisse  qu'en
  fonction de sa ressource eightBitInput, et selon qu'elle est a vrai ou
  faux, soit il met a 1 le huitieme bit, soit  il  genere  un  caractere
  escape  devant  le  caractere  (comme  le  fait setmetamode(1) pour la
  console).

  1144..  TToouucchheess eett ccllaavviieerrss ppaarrttiiccuulliieerrss

  Les deux touches ImprEcran/Syst et Pause/Attn sont speciales car elles
  ont  deux  keycodes:  la  premiere produit le keycode 84 quand Alt est
  enfonce et 99 sinon; la seconde 101 si Ctrl est  enfonce,  119  sinon.
  (Il est donc inutile d'assigner des fonctions a Alt-Keycode99 ou Ctrl-
  Keycode119.)

  Si votre clavier a des touches etranges qui  ne  generent  aucun  code
  sous   Linux   (ou   generent  des  messages  du  genre  "unrecognized
  scancode"),  vous  pouvez,  a  partir  du   noyau   1.1.63,   utiliser
  setkeycodes(1) pour dire au noyau quel keycode assigner a ces touches.
  (Leur  utilisation  sous  X  sera  cependant  impossible.)   Une  fois
  qu'elles ont un keycode grace a setkeycodes, on peut leur associer une
  fonction avec loadkeys.

  1155..  EExxeemmpplleess dd''uuttiilliissaattiioonn ddee llooaaddkkeeyyss aanndd xxmmooddmmaapp

  Permuter ScrollLock et Control (en  suposant  que  vous  utilisez  les
  keymaps 0-15; verifiez avec dumpkeys | head -1)

         % loadkeys
         keymaps 0-15
         keycode 58 = Control
         keycode 29 = Caps_Lock
         %

  Les permuter sous X seulement:

         % xmodmap .xmodmaprc

  ou .xmodmaprc contient les lignes

    remove Lock = Caps_Lock
    remove Control =  Control_L
    keysym  Control_L  =  Caps_Lock
    keysym  Caps_Lock  = Control_L
    add Lock = Caps_Lock
    add Control = Control_L

  Qu'en  est-il de la numerotation des touches? Backspace a le numero 14
  sous Linux et 22 sous X... En fait, la numerotation est plus ou  moins
  arbitraire.  Le numero sous Linux peut etre visualise avec showkey(1),
  et le numero sous X avec xev(1). Souvent le numero sous  X  est  8  de
  plus que le numero sous Linux.

  1155..11..  ``JJee nnee ppeeuuxx ttaappeerr qquu''aavveecc uunn sseeuull ddooiiggtt''

  Les  touches  Shift,  Ctrl  et Alt peuvent-elles etre des commutateurs
  stables ?  Oui, en faisant:

       % loadkeys
       keycode 29 = Control_Lock
       keycode 42 = Shift_Lock
       keycode 56 = Alt_Lock
       %

  les Control, Shift et Alt de gauche deviennent stables.  Les numeros a
  utiliser  sont donnes par showkey (et sont generalement 29 et 97 (Con-
  trol), 42 et 54 (Shift), 56 et 100 (Alt)) et les  fonctions  possibles
  sont Control_Lock, Shift_Lock, Alt_Lock, ALtGr_Lock.

  Et le touches `collantes'?  Il n'y a pas encore eu de nouvelle version
  du paquetage kbd depuis leur introduction dans  le  noyau  1.3.33,  il
  faut donc utiliser leurs codes hexa, par example:

       % loadkeys
       keymaps 0-15
       keycode 54 = 0x0c00
       keycode 97 = 0x0c02
       keycode 100 = 0x0c03
       %

  rend les Shift, Ctrl et Alt de droite collantes.

  1166..  CChhaannggeerr llee mmooddee vviiddeeoo

  Pour  autant  que  je  sache,  il  y  a  6 manieres de changer de mode
  resolution:

  1. A la compilation: changer la ligne

          SVGA_MODE=      -DSVGA_MODE=NORMAL_VGA

  dans /usr/src/linux/Makefile.

  1A. Apres la compilation: utiliser rdev -v - une  affreuse  magouille,
  mais bon, ca marche.

  2. Au demarrage: mettre vga=ask dans le fichier de config de lilo, qui
  demandera au boot le  mode  voulu.  Une  fois  decide,  remplacer  par
  vga=LePlusJoliMode.

  3.  En  cours  de route: A. Utiliser la commande resizecons. (C'est un
  programme tres primitif utilisant  l'ioctl  VT_RESIZE.)   B.  Utiliser
  SVGATextMode. (C'est une version moins primitive)

  4.  Pas  "sur  la  console": Sous dosemu, ou avec svgalib etc. on peut
  changer le mode video de la carte ecran  sans  que  le  pilote  de  la
  console s'en apercoive. C'est parfois utile pour configurer resizecons
  ou SVGATextMode:sous dosemu se mettre dans le mode video voulu grace a
  un  programme  DOS  utilisant  ce  mode,  puis dans une autre console,
  recuperer les parametres de ce mode. Il ne reste  plus  qu'a  utiliser
  ces  donnees pour l'initialisation de resizecons et SVGATextMode. Dans
  certains cas la carte video se retrouve dans un mode inutilisable,  le
  moyen  le  plus  simple  pour  se  sortir  de la est de lancer dosemu,
  laisser le BIOS mettre un mode video correct, puis tuer  dosemu  (avec
  kill -9).

  1166..11..  IInnssttrruuccttiioonnss ppoouurr ll''uuttiilliissaattiioonn ddee rreessiizzeeccoonnss

  Recuperer svgalib et compiler le programme restoretextmode.  Booter la
  machine dans tous les modes video possibles (en mettant  vga=ask  dans
  le  fichier  config  de lilo), et sauvegarder les registres video dans
  des fichiers CxL (C=Colonnes, L=Lignes), par  exemple  80x25,  132x44,
  etc.   Placer  ces  fichiers  dans /usr/lib/kbd/videomodes.  Desormais
  resizecons 132x44  changera  le  mode  video  (et  enverra  le  signal
  SIGWINCH  a  tous  les  processus  qui  ont  besoin  de  savoir que la
  resolution a change, et chargera une nouvelle police si necessaire).

  A present, resizecons ne change de mode que s'il y a assez de  memoire
  pour contenir a la fois l'ancienne et la nouvelle console.

  1177..  CChhaannggeerr llaa vviitteessssee ddee rreeppeettiittiioonn dduu ccllaavviieerr

  Au  demarrage,  le  noyau  met  la  vitesse  de repetition a sa valeur
  maximale. Pour la plupart des claviers  c'est  raisonnable,  mais  sur
  certains  il  devient quasiment impossible d'effleurer une touche sans
  avoir trois fois le meme caractere. Dans ce cas utiliser le  programme
  kbdrate(8)  pour  changer  la vitesse de repetition ou si ca ne suffit
  pas supprimer la section:

  ______________________________________________________________________
       ! set the keyboard repeat rate to the max

           mov     ax,#0x0305
           xor     bx,bx           ! clear bx
           int     0x16
  ______________________________________________________________________

  de /usr/src/linux/[arch/i386/]boot/setup.S.

  1188..  EEccoonnoommiisseeuurr dd''eeccrraann

  setterm -blank _n_n regle le delai d'extinction de l'ecran a  _n_n minutes
  d'inactivite. (Avec _n_n = 0, l'economiseur d'ecran est desactive.)

  L'option s de xset(1) regle les parametres de l'economiseur d'ecran de
  X.

  Les   modes   d'economie   d'energie   du   moniteur   peuvent    etre
  actives/desactives  par  le  programme  setvesablank  donne  dans  les
  commentaires          au          debut           du           fichier
  /usr/src/linux/drivers/char/vesa_blank.c.

  1199..  QQuueellqquueess pprroopprriieetteess dduu VVTT110000 -- mmooddee aapppplliiccaattiioonn

  : Parfois les touches de curseur produisent des codes bizarres?

  Quand  le  terminal  est  en  mode application, les touches de curseur
  produisent les codes Esc O x et sinon Esc [ x, avec x =  A,B,C  ou  D.
  Certains  programmes  mettent le termnial en mode application et si on
  les tue avec un kill -9, ou s'il se plantent, le terminal restera dans
  ce mode.

          % echo -e '\033c'

  reinitialise les proprietes du terminal courant.  Si on veut passer en
  mode application:

          % echo -e '\033[?1h'

  et si on veut en sortir:

          % echo -e '\033[?1l'

  2200..  IInnccoommppaattiibbiilliittee mmaatteerriieellllee

  Quelques personnes ont note des pertes de caracteres tapes  lors  d'un
  acces disquette. Il semblerait que ce soit un probleme avec les cartes
  meres Uni-486WB. (SVP envoyez moi un mail pour confirmer [Oui, j'ai le
  meme  probleme], infirmer [Non, tout va bien avec ma carte Uni-486WB],
  ou modifier [Ma machine Xyzzy a le meme probleme].)

  Certaines personnes ont  eu  des  blocages  aleatoires  du  clavier  -
  parfois associes a une activite disque dur ou une autre entree/sortie.

  ulf@rio70.bln.sni.de (Ulf Tietz) ecrit:

       `J'avais ce genre de problemes quand ma carte mere avait des
       reglages  trop  rapides. En remettant les delais (CLK, wait-
       states, etc.) a des valeurs plus raisonnables, tout est ren-
       tre dans l'ordre.'

  bhogan@crl.com (Bill Hogan) ecrit:

       `Si  vous avez un BIOS AMI, vous pouvez essayer de mettre le
       parametre Gate A20 emulation sur 'chipset' (si cette  option
       existe). Quand cette option etait sur n'importe quoi d'autre
       ('fast', 'both', 'disabled') j'avais souvent des blocages du
       clavier.'

  --------------------------------------------------------------------

  Additions et corrections sont les bienvenues.

  Andries Brouwer - aeb@cwi.nl

  (Bruno Viaris - Viaris@Yoko.ENS-Cachan.Fr pour la traduction)

  RedHat Linux KickStart HOWTO
  Martin Hamilton <martinh@gnu.org>
  Traduction: Laurent Martin <l_martin@worldnet.fr>
  v0.1, 28 septembre 1998

  Ce HOWTO dcrit brivement comment utiliser le systme _K_i_c_k_S_t_a_r_t de
  RedHat pour rapidement installer un grand nombre de systmes Linux
  identiques. Pour les utilisateurs expriments, on dcrit comment mod
  ifier la procdure d'installation de KickStart pour l'adapter  ses
  propres besoins et donne quelques indications pour crer des paque
  tages RPM.
  ______________________________________________________________________

  Table des matires


  1. Copyright

  2. Page sur la Toile

  3. Introduction

  4. Prrequis

  5. Prparation d'une disquette d'amorage

  6. Configuration de BOOTP/DHCP et NFS

  7. Le fichier de configuration de KickStart

     7.1 Information systme
     7.2 Paquetages  installer
     7.3 Commandes shell aprs l'installation

  8. L'installation

  9. Montage des disquettes d'amorage et supplmentaire

  10. Modifier l'installateur RedHat

  11. Crer vos propres RPM

  12. FAQ/Liste de voeux

  13. Crdits

  14. Annexe



  ______________________________________________________________________

  11..  CCooppyyrriigghhtt

  Copyright (c) 1998 Martin Hamilton, tous droits de reproduction
  rservs. Ce document est un  document libre . Vous pouvez le
  modifier ou le redistribuer si vous respectez les termes de la version
  2 ou ultrieure de la GNU General Public License
  <http://www.gnu.org/copyleft/gpl.html>



  22..  PPaaggee ssuurr llaa TTooiillee

  Si vous avez obtenu ce document dans le rpertoire HOWTO d'un site
  Linux ou sur un CD-ROM, vous pouvez vrifier la page KickStart HOWTO
  <http://wwwcache.ja.net/dev/kickstart/>

  pour voir s'il n'y a pas une nouvelle version de disponible.



  33..  IInnttrroodduuccttiioonn

  La version 5 de Linux RedHat est livre avec un utilitaire peu connu
  (et jusqu' aujourd'hui quasiment pas document) appel _K_i_c_k_S_t_a_r_t. Il
  vous permet d'automatiser (presque) toute l'installation d'une
  distribution Linux RedHat et notamment:


    la slection de la langue;

    la configuration rseau et la slection des sources de la
     distribution;

    la slection du clavier;

    l'installation de l'utilitaire de dmarrage (ex: lilo);

    le partitionnement du disque et la cration du systme de fichiers;

    la slection de la souris;

    la configuration du serveur X-Window;

    la slection de la zone gographique;

    la slection du mot de passe de l'utilisateur _r_o_o_t;

    la slection des paquetages  installer.


  Les utilisateurs perspicaces d'une distribution RedHat auront
  probablement ralis qu'il s'agit des principales tapes de
  l'installation manuelle d'une distribution RedHat. KickStart vous
  permet d'automatiser le processus d'installation en plaant les
  informations que vous rentreriez normalement au clavier dans un
  fichier de configuration.


  _M_a_i_s _a_t_t_e_n_d_e_z_, _i_l _y _a _m_i_e_u_x_!


  Une fois le processus d'installation achev, KickStart vous permet de
  spcifier une liste de commandes shell que vous souhaitez voir
  excutes. Cela signifie que vous pouvez automatiquement installer des
  logiciels locaux qui ne font pas partie de la distribution RedHat (et
  oui, il existe bien d'autres logiciels libres que ceux fournis avec la
  distribution RedHat! Certains ne peuvent, pour des raisons lgales,
  tre distribus par RedHat, par exemple: les systmes de cryptage ssh
  et PGP) et procder aux derniers rglages ncessaires pour rendre
  votre nouveau systme d'exploitation parfaitement oprationnel.



  44..  PPrrrreeqquuiiss

  Il y a deux manires d'utiliser KickStart. La premire est de copier
  le fichier de configuration de KickStart sur une disquette d'amorage
  RedHat. La seconde est d'utiliser une disquette d'amorage classique
  et de rcuprer ce fichier de configuration via le rseau.

  Dans les deux cas, vous aurez besoin:


  1. de machines utilisant un processeur Intel (i386) - KickStart ne
     semble marcher que sur ces machines au moment o j'cris ces
     lignes;

  2. du fichier de configuration de KickStart - nous en reparlerons dans
     la prochaine section;

  3. d'une disquette d'amorage RedHat - de prfrence celle du
     rpertoire _u_p_d_a_t_e_s, pour profiter des dernires mises  jour et
     corrections des gestionnaires de priphrique;

  4. des entres DNS pour les adresses IP que vous allez utiliser -
     optionnel, mais cela vitera que le processus d'installation ne
     vous demande sans cesse le domaine de votre machine;


  Si vous souhaitez rcuprer le fichier de configuration via le rseau,
  vous aurez galement besoin:


  1. d'un serveur BOOTP/DHCP pour le rseau sur lequel seront installes
     vos machines. Certains serveurs alloueront automatiquement les
     nouvelles adresses dans une plage donne (par exemple: le serveur
     BOOTP CMU <ftp://ftp.ntplx.net/pub/networking/bootp/> avec les
     extensions d'adressage dynamique).

  2. d'un serveur NFS sur la mme machine que le serveur BOOTP avec une
     copie de la distribution RedHat monte dessus et le fichier de
     configuration de KickStart dans un rpertoire _/_k_i_c_k_s_t_a_r_t export
     par NFS.


  Il doit tre possible de se passer du serveur BOOTP - cela est
  implicite dans la documentation de KickStart. Mais je n'ai pas essay
  moi-mme. De mme, il doit tre possible de procder  l'installation
  depuis un CD-ROM plutt que depuis un serveur NFS. Si vous essayez
  l'une de ces deux possibilits, faites moi savoir comment vous avez
  procder pour que je puisse l'indiquer dans ce document.


  Notez qu'il n'est pas absolument indispensable que le serveur NFS
  contienne la distribution RedHat et le fichier de configuration
  KickStart, cela rend juste les choses un petit peu plus simples de
  tout avoir  un seul endroit.



  55..  PPrrppaarraattiioonn dd''uunnee ddiissqquueettttee dd''aammoorraaggee

  Tout ce que vous avez  faire est de copier le fichier de
  configuration de KickStart sur la disquette d'amoage RedHat sous le
  nom _k_s_._c_f_g:



         mcopy ks.cfg a:







  La disquette est particulirement remplie, et vous pourriez avoir
  besoin de dtruire certains fichiers pour faire de la place. J'ai
  russi  mettre mon fichier de configuration sur la disquette en
  supprimant tous les fichiers de messages qu'affiche normalement
  SYSLINUX:



         mdel a:\*.msg





  Vous pouvez galement diter le fichier de configuration de SYSLINUX:
  _s_y_s_l_i_n_u_x_._c_f_g. Il est situ  la racine de la disquette d'amorage. Le
  fichier _s_y_s_l_i_n_u_x_._c_f_g suivant permet de passer immdiatement en mode
  KickStart lorsque la machine dmarre:



         default ks
         prompt 0
         label ks
           kernel vmlinuz
           append ks=floppy initrd=initrd.img






  66..  CCoonnffiigguurraattiioonn ddee BBOOOOTTPP//DDHHCCPP eett NNFFSS

  Si vous vous demandez ce que peuvent bien tre ces BOOTP et DHCP, une
  description dtaille est disponible sur le site DHCP
  <http://www.dhcp.org/>. NFS est document en dtail dans le NFS HOWTO.

  Dans la configuration NFS + BOOTP/DHCP que nous considrons, le
  fichier de configuration de KickStart doit tre montable par NFS par
  la machine que l'on installe  partir de _/_k_i_c_k_s_t_a_r_t_/_I_P_A_D_D_R_-_k_i_c_k_s_t_a_r_t
  sur le serveur BOOTP/DHCP, o _I_P_A_D_D_R est l'adresse IP de la nouvelle
  machine. Par exemple _/_k_i_c_k_s_t_a_r_t_/_1_9_8_._1_6_8_._2_5_4_._2_5_4_-_k_i_c_k_s_t_a_r_t pour la
  machine _1_9_8_._1_6_8_._2_5_4_._2_5_4.

  En thorie, il doit tre possible de modifier cet emplacement en
  renvoyant le paramtre bf (_b_o_o_t _f_i_l_e) dans la rponse du serveur
  BOOTP/DHCP. Il doit mme tre possible d'avoir ces fichiers monts par
  NFS  partir d'une autre machine.

  Pour exporter par NFS certains rpertoires  partir d'une machine
  Linux existante, crez le fichier _/_e_t_c_/_e_x_p_o_r_t_s avec un contenu
  ressemblant :



       /kickstart *.swedish-chef.org(ro,no_root_squash)
       /mnt/cdrom *.swedish-chef.org(ro,no_root_squash)




  Notez que si vous n'avez pas enregistrer les adresses IP que vous
  allez utiliser dans le DNS, le serveur NFS ou le portmapper RPC risque
  de vous rejeter. Vous pouvez probablement vous en sortir en indiquant
  les paires adresse IP/masque rseau dans les fichiers de
  configuration:



       /kickstart 198.168.254.0/255.255.255.0(ro,no_root_squash)





  et dans _/_e_t_c_/_h_o_s_t_s_._a_l_l_o_w:




       ALL: 194.82.103.0/255.255.255.0: ALLOW





  Soyez conscient que si vous indiquez le mot de passe de _r_o_o_t dans le
  fichier de configuration de KickStart ou exportez par NFS des
  rpertoires contenant des informations sensibles, vous devrez prendre
  soin de rendre ces informations accessibles  aussi peu de personnes
  que possible. Cela peut tre fait en restreignant les permissions des
  rpertoires exports, par exemple en indiquant un hte ou un sous-
  rseau particulier plutt qu'un domaine entier.

  La plupart des serveurs NFS requirent que vous indiquiez  mountd et
  nfsd (sur certaines versions d'Unix, ils sont prcds du prfixe
  rpc.) que le fichier _/_e_t_c_/_e_x_p_o_r_t_s a t modifi - habituellement en
  envoyant un SIGHUP. Il existe souvent un programme ou un script appel
  exportfs qui fera cela pour vous, par exemple:



       # exportfs -a





  Si NFS ne fonctionne pas lorsque votre machine dmarre, les
  rpertoires pourront ne pas tre exports automatiquement. Essayez de
  redmarrer la machine ou lancer les programmes suivants sous _r_o_o_t:



       # portmap
       # rpc.nfsd
       # rpc.mountd





  Comme mentionn prcdemment, sur certains systme le prfixe rpc.
  n'est pas utilis. Dans les distributions Unix les plus rcentes, ces
  programmes se trouvent dans le rpertoire _/_u_s_r_/_s_b_i_n qui peut ne pas
  encore tre dans votre variable PATH. Le programme portmap est parfois
  appel rpcbind, sous Solaris par exemple.

  Si vous utilisez le serveur BOOTP CMU avec DHCP et les extensions
  d'adressage dynamique voqu plus haut, une entre du fichier
  _/_e_t_c_/_b_o_o_t_p_t_a_b (_/_e_t_c_/_b_o_o_t_p_t_a_b est l'emplacement normal du fichier de
  configuration de BOOTP/DHCP) devrait ressembler  cela:



         .dynamic-1:ip=198.168.254.128:T254=0x30:T250="ds=198.168.254.2:
         dn=swedish-chef.org:sm=255.255.255.0:gw=198.168.254.1:
         dl=0xFFFFFFFF":





  (passages  la ligne pour plus de clart)

  Cette ligne indique que les nouvelles machines se verront affecter
  dynamiquement une adresse commenant  _1_9_8_._1_6_8_._2_5_4_._1_2_8 et continuant
  pour les 48 adresses (la valeur hxadcimale _3_0) suivantes. Chaque
  client recevra en retour la valeur de _T_2_5_0. Dans notre exemple, cela
  donne:


    le serveur DNS (ds)  _1_9_8_._1_6_8_._2_5_4_._2;

    le nom de domaine (dn)  _s_w_e_d_i_s_h_-_c_h_e_f_._o_r_g;

    le masque du sous-rseau  (sm)  _2_5_5_._2_5_5_._2_5_5_._0;

    la passerelle par dfaut (gw)  _1_9_8_._1_6_8_._2_5_4_._1;

    la dure de vie  (dl) (combien de temps l'adresse sera valide) 
      pour toujours .


  Il semble qu'un grand nombre de versions de ce serveur ne grent pas
  l'adressage dynamique. Pour celles-ci, vous devrez numrer les
  adresses physiques (typiquement MAC Ethernet) de chacune des machines
   installer dans _/_e_t_c_/_b_o_o_p_t_a_b. Ces entres devraient ressembler 
  quelque chose comme:



       bork.swedish-chef.org:\
         ip=198.168.254.128:\
         ha=0000E8188E56:\
         ds=198.168.254.2:\
         dn=swedish-chef.org:\
         sm=255.255.255.0:\
         gw=198.168.254.1:\
         dl=0xFFFFFFFF":




  Notez que le paramtre ha correspond  l'adresse physique de la
  machine  installer.


  77..  LLee ffiicchhiieerr ddee ccoonnffiigguurraattiioonn ddee KKiicckkSSttaarrtt

  Le fichier de configuration se compose de trois sections principales:


  1. informations sur le systme, partionnement des disques et
     configuration rseau;


  2. paquetages RedHat  installer;

  3. commandes shells  excuter aprs l'installation.

  Il existe d'autres possibilits que nous n'aborderons pas ici mais qui
  ppoouurrrraaiieenntt marcher. Pour de plus amples informations, regardez
  l'exmple de fichier de configuration de KickStart dans
  _m_i_s_c_/_s_r_c_/_i_n_s_t_a_l_l_/_k_s_._s_a_m_p et le fichier _d_o_c_/_R_E_A_D_M_E_._k_s dans le
  rpertoire _i_3_8_6 d'une distribution RedHat sur votre CD-ROM ou sur un
  site miroir de RedHat.



  77..11..  IInnffoorrmmaattiioonn ssyyssttmmee

  Les commandes que j'ai utilises sont:



     llaanngg
        Configuration de la langue, pour l'anglais:


          lang en




     nneettwwoorrkk
        Configuration du rseau, pour utiliser BOOTP/DHCP:


          network --bootp




     nnffss
        serveur NFS et rpertoire  partir duquel l'installation doit
        avoir lieu:


          nfs --server chicken.swedish-chef.org /mnt/cdrom




     pour utiliser le serveur NFS _c_h_i_c_k_e_n_._s_w_e_d_i_s_h_-_c_h_e_f_._o_r_g et essayer de
     monter la distribution RedHat  partir du rpertoire _/_m_n_t_/_c_d_r_o_m.

     kkeeyybbooaarrdd
        Slection du type de clavier, pour un clavier anglais:


          keyboard uk




     zzeerroommbbrr
        Efface le secteur d'amorage du disque (MBR) - enlve tous les
        programmes de lancement pouvant s'y trouver.

     cclleeaarrppaarrtt
        Efface les partitions existantes, pour supprimer toutes les
        partitions disque avant l'installation:
          clearpart -all




     ppaarrtt
        Partionne le disque, pour crer un systme de fichier de 500Mo:


          part / --size 500




     iinnssttaallll
        Effectue une nouvelle installation de RedHat.

     mmoouussee
        Dfinit la souris utilise, pour une souris PS/2 ou compatible:


          mouse ps/2




     ttiimmeezzoonnee
        Dfinit le fuseau horaire, pour l'heure anglaise:


          timezone --utc Europe/London




     rroooottppww
        Dfinit le mot de passe initial de _r_o_o_t, bas sur un mot de
        passe dj crypt:


          rootpw --iscrypted XaacoeGPmf/A.




     lliilloo
        Installe le programme LILO, pour l'installer dans le secteur
        d'amorage du disque (MBR):


          lilo --location mbr




     %%ppaacckkaaggeess
        Paquetages  installer - voir ci-aprs.

     %%ppoosstt
        Commandes shells  lancer aprs l'installation - voir ci-aprs.

  Notez que le rpertoire dans lequel KickStart va chercher la
  distribution RedHat doit contenir un sous-rpertoire _R_e_d_H_a_t qui
  contient la distribution RedHat pour la plate-forme considre. Dans
  notre exemple, nous devrions avoir quelque chose comme:

       /mnt/cdrom/RedHat
       /mnt/cdrom/RedHat/base
       /mnt/cdrom/RedHat/contents
       /mnt/cdrom/RedHat/i386
       /mnt/cdrom/RedHat/instimage
       /mnt/cdrom/RedHat/RPMS
       /mnt/cdrom/RPM-PGP-KEY





  Si vous souhaitez crer vos propres mots de passe crypts, il vous
  suffit d'utiliser Perl:



       % perl -e 'print crypt("schmurrdegurr", "Xa") . "\n";'p





  Autres options que je n'ai pas testes:


     ccddrroomm
        Installe  partir d'un CD-ROM plut que du rseau.

     ddeevviiccee
        Dclare explicitement les dtails d'un priphrique, par
        exemple:


          device ethernet 3c509 --opts "io=0x330, irq=7"




     D'autres valeurs de device sont possibles dont scsi pour les
     contrleurs SCSI et cdrom pour les gestionnaires de CD-ROM pro
     pritaires.

     uuppggrraaddee
        Met  jour une installation existante au lieu d'en installer une
        nouvelle.

     xxccoonnffiigg
        Configure le serveur X-Window, la carte graphique et le
        moniteur, par exemple:


          xconfig --server "Mach64" --monitor "tatung cm14uhe"




  Je n'ai pas beaucoup creus cette dernire option car je ne prvois
  pas d'utiliser X sur les machines installes avec KickStart. Si vous
  le faites, tenez moi au courant.

  Voici  quoi ressemble maintenant la premire partie du fichier de
  configuration de KickStart:



  lang en
  network --bootp
  nfs --server chicken.swedish-chef.org /mnt/cdrom
  keyboard uk
  zerombr yes
  clearpart --all
  part / --size 500
  part swap --size 120
  install
  mouse ps/2
  timezone --utc Europe/London
  rootpw --iscrypted XaacoeGPmf/A.
  lilo --location mbr







  77..22..  PPaaqquueettaaggeess  iinnssttaalllleerr

  La partie du fichier de configuration de KickStart consacre aux
  paquetages dbute par une ligne avec la directive %packages.  Elle est
  suivie par l'un des deux types de spcifications de paquetage: des
  paquetages peuvent tre installs individuellement en donnant le nom
  de leur RPM (sans la version ni la plate-forme), des groupes de
  paquetages peuvent tre installs en donnant le nom de leur groupe.

  Voici un exemple de la section des paquetages d'un fichier de
  configuration de KickStart:



       %packages
       @ Base
       netkit-base
       bind-utils
       ncftp
       rdate
       tcp_wrappers
       traceroute
       cmu-snmp





  Bien,  quoi correspondent ces groupes? Il y a un grand nombre de
  groupes dfinis par dfaut dans un fichier nomm _b_a_s_e_/_c_o_m_p_s dans le
  rpertoire racine de la distribution RedHat. Voici ceux que l'on
  pouvait y trouver au moment o j'cris ces lignes:


    Base;

    Gestionnaire d'imprimante;

    Systme X-Window;

    Outils Mail/WWW/News;

    Connexion DOS/Windows;

    Gestionnaires de fichiers;

    Manipulation graphique;

    Jeux sous X-Window;

    Jeux en mode console;

    Gestionnaires multimdia sous X-Window;

    Console Multimedia;

    Serveur d'impression;

    Station en rseau;

    Station en _d_i_a_l_-_u_p;

    Serveur de news;

    Serveur NFS;

    Connection SMB (Samba) ;

    Connexion IPX/Netware(tm);

    Serveur FTP anonyme/Gopher;

    Serveur Web;

    Serveur de noms DNS;

    Serveur Postgres (SQL);

    Gestion de rseau;

    TeX;

    Emacs;

    Emacs avec X-Window;

    Dveloppement en C;

    Bibliothques de dveloppement;

    Dveloppement en C++ ;

    Development sous X-Window;

    Documentation supplmentaire.


  Vous noterez qu'ils correspondent aux diffrentes configurations qui
  vous sont proposes lors de l'installation manuelle. Notez galement
  que certains paquetages sont prsents dans plusieurs groupes, sans que
  cela pose de problme lors de l'installation. L'entre d'un groupe
  dans la liste _c_o_m_p_s ressemble  quelque chose comme:










  0 Extra Documentation
  sag
  lpg
  howto
  faq
  man-pages
  end





  Il semble que les groupes dont le nom est prcd d'un _1 fasse partie
  de l'installation par dfaut. Il semble donc possible de pousser un
  peu plus loin la personnalisation du processus d'installation en
  crant ses propres groupes ou en redfinissant les groupes existant.
  Gardez moi au courant si vous essayez de le faire.


  77..33..  CCoommmmaannddeess sshheellll aapprrss ll''iinnssttaallllaattiioonn

  C'est probablement la fonctionnalit la plus intressante et en tous
  cas celle qui n'a pas d'quivalent direct dans le processus
  d'installation manuel. Ce que nous pouvons faire ici est de dfinir un
  ensemble de commandes de niveau shell qui seront excutes une fois
  l'installation termine (partitionnement du disque, installation des
  paquetages, etc.)


  Cette section dbute par la directive %post dans le fichier de
  configuration de KickStart.  Vous pouvez ensuite utiliser tous les
  utilitaires qui viennent d'tre installs sur votre nouvelle machine
  Linux, par exemple:



       %post
       ln -s /etc/rc.d/init.d /etc/init.d
       ln -s /etc/rc.d/rc.local /etc/rc.local
       ln -s /usr/bin/md5sum /usr/bin/md5
       ln -s /usr/bin/perl /usr/local/bin/perl
       chmod ug-s /bin/linuxconf
       mkdir /var/tmp/tmp
       perl -spi -e 's!image=/boot/vmlinuz-.*!image=/boot/vmlinuz!' /etc/lilo.conf
       rm /etc/rc.d/rc*.d/*sendmail





  Vous pouvez galement rediriger les flux standards:



       cat <<EOF >>/etc/passwd
       squid:*:102:3500:Squid Proxy:/usr/squid:/bin/bash
       EOF

       cat <<EOF >>/etc/group
       cache:x:3500:
       EOF





  Modifier les scripts de lancement:



       cat <<EOF >>/etc/rc.local
       echo 8192 > /proc/sys/kernel/file-max
       echo 32768 > /proc/sys/kernel/inode-max

       [ -x /usr/sbin/sshd ] && /usr/sbin/sshd
       [ -x /usr/sbin/cfd ] && /usr/sbin/cfd

       EOF





  Dfinir les entre de _c_r_o_n_t_a_b:



       cat <<EOF >/tmp/crontab.root
       # Keep the time up to date
       0,15,30,45 * * * * /usr/sbin/ntpdate -s eggtimer 2>&1 >/dev/null
       # Recycle Exim log files
       1 0 * * * /usr/exim/bin/exicyclog
       # Flush the Exim queue
       0,15,30,45 * * * * /usr/exim/bin/exim -q
       EOF

       crontab /tmp/crontab.root
       rm /tmp/crontab.root





  Et mme installer d'autres RPM que vous avez crs:



       rpm -i ftp://chicken.swedish-chef.org/rpms/squid.rpm
       rpm -i ftp://chicken.swedish-chef.org/rpms/ssh.rpm
       rpm -i ftp://chicken.swedish-chef.org/rpms/exim.rpm
       rpm -i ftp://chicken.swedish-chef.org/rpms/cfengine.rpm
       rpm -i ftp://chicken.swedish-chef.org/rpms/linux.rpm

       ssh-keygen -b 1024 -f /etc/ssh_host_key -N ""
       depmod -a






  88..  LL''iinnssttaallllaattiioonn

  Dmarrer la machine  installer  partir de la disquette d'amorage
  RedHat comme d'habitude, mais au lieu de presser ENTRE  l'invite du
  programme SYSLINUX, tapez linux ks.


  Si vous avez de la chance, c'est tout ce que vous aurez  faire!



  Si vous avez modifi la disquette d'amorage comme mentionn plus
  haut, vous n'avez mme pas besoin de vous proccuper de ce qui suit
  :-)


  Comme nous ne faisons qu'automatiser les diffrentes tapes du
  processus d'installation RedHat, une bote de dialogue peut apparatre
  au cas o KickStart n'arrive pas  dterminer ce qu'il doit faire. Le
  cas le plus probable est qu'il ne dtecte pas automatiquement votre
  carte rseau, il vous demandera alors de lui fournir son IRQ et son
  adresse mmoire d'entre/sortie.


  99..  MMoonnttaaggee ddeess ddiissqquueetttteess dd''aammoorraaggee eett ssuuppppllmmeennttaaiirree

  La disquette d'amorage RedHat boot.img est au format MS-DOS et
  utilise le programme SYSLINUX pour se lancer. La disquette
  supplmentaire supp.img est au format Linux ext2. Si votre noyau
  intgre la gestion des priphriques _l_o_o_p_b_a_c_k, vous pouvez monter ces
  deux fichiers dans votre systme de fichiers:



       # mkdir -p /mnt/boot /mnt/supp
       # mount -o loop -t msdos boot.img /mnt/boot
       # mount -o loop supp.img /mnt/supp





  Vous devriez maintenant tre capable de voir et de manipuler les
  fichiers des disquettes d'amorage et supplmentaire respectivement
  sous _/_m_n_t_/_b_o_o_t et _/_m_n_t_/_s_u_p_p. Ouf!  Notez que d'anciennes versions de
  mount peuvent ne pas tre capables de grer l'option -o loop. Dans ce
  cas, vous devrez utiliser losetup pour configurer le priphrique
  _l_o_o_p_b_a_c_k pour chacun des fichiers:



       # losetup /dev/loop0 boot.img
       # mount -t msdos /dev/loop0 /mnt/boot






  Vous aurez peut-tre galement besoin d'utiliser explicitement
  l'option -t ext2 lorsque vous monterez la disquette supplmentaire.
  Cependant, les personnes ayant une distribution Linux rcente ne
  devraient pas avoir  se soucier de cela.


  Bien sr, si vous ne voulez pas prendre de risque , vous pouvez
  utiliser les vritables disquettes plutt que leurs images. Si votre
  temps est prcieux, vous prfrerez probablement utiliser les
  priphriques _l_o_o_p_b_a_c_k car vous pourrez alors utiliser des images des
  disquettes plutt que de supporter les temps d'attente lis  la
  lecture de vritables disquettes.






  1100..  MMooddiiffiieerr ll''iinnssttaallllaatteeuurr RReeddHHaatt

  Si vous voulez modifier la procdure d'installation elle-mme, son
  code source se trouve sur le CD-ROM RedHat ou sur le site miroir
  RedHat le plus proche dans le rpertoire _m_i_s_c_/_s_r_c_/_i_n_s_t_a_l_l  partir du
  rpertoire racine _i_3_8_6.


  Si vous examinez la disquette d'amorage RedHat, vous verrez qu'en
  plus du noyau _v_m_l_i_n_u_z, il y a un gros fichier _i_n_i_t_r_d_._i_m_g:



       -rwxr-xr-x   1 root     root          559 May 11 15:48 boot.msg
       -rwxr-xr-x   1 root     root          668 May 11 15:48 expert.msg
       -rwxr-xr-x   1 root     root          986 May 11 15:48 general.msg
       -rwxr-xr-x   1 root     root       968842 May 11 15:48 initrd.img
       -rwxr-xr-x   1 root     root         1120 May 11 15:48 kickit.msg
       -r-xr-xr-x   1 root     root         5352 May 11 15:48 ldlinux.sys
       -rwxr-xr-x   1 root     root          875 May 11 15:48 param.msg
       -rwxr-xr-x   1 root     root         1239 May 11 15:48 rescue.msg
       -rwxr-xr-x   1 root     root          402 May 11 15:48 syslinux.cfg
       -rwxr-xr-x   1 root     root       444602 May 11 15:48 vmlinuz





  Vous l'aurez devin, il s'agit d'un autre sytme de fichiers au format
  ext2 enregistr comme un fichier - mais avec un truc en plus. Il est
  compress! Vous pouvez le dcompresser et le monter:



       # gzip -dc /mnt/boot/initrd.img >/tmp/initrd.ext2
       # mkdir /mnt/initrd
       # mount -o loop /tmp/initrd.ext2 /mnt/initrd






  La partie probablement la plus importante de ce systme de fichiers
  est sa collection de modules chargeables par le noyau qui sont sur la
  disquette d'amorage. Si vous souhaitez intgrer la nouvelle version
  d'un gestionnaire, vous devrez soit remplacer _v_m_l_i_n_u_z par un nouveau
  noyau dans lequel ce gestionnaire sera li statiquement, soit
  remplacer ce gestionnaire dans la collection de modules. Que dire
  d'autre sinon que vous pouvez supprimer certains modules pour faire de
  la place sur la disquette!

  La collection de modules est le fichier _m_o_d_u_l_e_s_/_m_o_d_u_l_e_s_._c_g_z.  Devinez-
  vous de quoi il s'agit? Et bien croyez le ou non, c'est une archive
  cpio compresse! Voici comment l'utiliser:



       # gzip -dc /mnt/initrd/modules/modules.cgz >/tmp/modules.cpio
       # cpio -itv <modules.cpio >modules.listing
       # mkdir modules
       # cpio -idumv <../modules.cpio




  Je ne crois pas qu'il existe actuellement sous Linux une faon
  d'accder de manire transparente aux systmes de fichiers compresss
  (en tous cas avec les distributions les plus courantes). Faites le moi
  savoir si vous avez des informations l-dessus!


  Si vous modifier quelque chose, rappelez vous:


  1. utilisez cpio pour recrer l'archive. La faon de procder est
     laisse en exercice au lecteur ...

  2. utilisez gzip pour compresser cette archive;

  3. copiez la dans _/_m_n_t_/_i_n_i_t_r_d, ou dans tout autre endroit o vous avez
     plac l'archive _i_n_i_t_r_d_._i_m_g dcompresse;

  4. dmontez _/_m_n_t_/_i_n_i_t_r_d (ou comme vous l'avez appel);

  5. compressez le nouvel _i_n_i_t_r_d_._i_m_g avec gzip;

  6. copiez l'archive sur la disquette d'amorage: _/_m_n_t_/_b_o_o_t_/_i_n_i_t_r_d_._i_m_g
     dans notre exemple;

  7. dmonter la disquette d'amorage: _/_m_n_t_/_b_o_o_t.


  Vous pouvez maintenant crer de nouvelles disquettes d'amorage avec:



       # cat boot.img >/dev/fd0







  1111..  CCrreerr vvooss pprroopprreess RRPPMM

  Le format des paquetages RPM est dj abondamment document, notamment
  dans le livre _M_a_x_i_m_u_m _R_P_M d'Ed Bailey que vous pouvez tlcharger
  depuis le site RPM <http://www.rpm.org/> ou trouver dans toutes les
  bonnes librairies! Cette section prsente quelques trucs pour les gens
  presss.


  Les paquetages RPM sont construits  partir d'un fichier de
  spcification. Il consiste (de la mme manire que le fichier de
  configuration de KickStart) d'un ensemble d'tapes  accomplir pour
  construire le paquetage - on suppose que vous avez  le construire 
  partir des sources, potentiellement pour plusieurs plates-formes, et
  avez besoin d'y appliquer des corrections avant la compilation. Une
  fois construit et install, un fichier RPM sera cr  partir des
  fichiers et des rpertoires que vous avez spcifis comme tant
  associs au paquetage. Il est important de noter que RPM n'a aucune
  ide des fichiers et rpertoires lis  un paquetage donn - vous
  devez le lui dire.


  Voici un exemple de spcification pour une version personnalise du du
  serveur Cache WWW  Squid <http://squid.nlanr.net/>:



  Summary: Squid Web Cache server
  Name: squid
  Version: 1.NOVM.22
  Release: 1
  Copyright: GPL/Harvest
  Group: Networking/Daemons
  Source: squid-1.NOVM.22-src.tar.gz
  Patch: retry-1.NOVM.20.patch
  %description
  Juste une premire tentative d'empaquetage d'un serveur Squid pour
  l'installer facilement sur notre serveur RedHat Linux

  %prep
  %setup
  %build
  configure --prefix=/usr/squid
  perl -spi -e 's!#( -DALLOW_HOSTNAME_UNDERSCORES)!$1!' src/Makefile
  make

  %install
  make install

  %files
  /usr/squid






  Voici comment construire ce RPM:



       % mkdir -p SOURCES BUILD SRPMS RPMS/i386
       % cp ~/squid-1.NOVM.22-src.tar.gz SOURCES
       % cp ~/retry-1.NOVM.20.patch SOURCES
       % rpm -ba squid-1.NOVM.22+retry-1.spec






  Cela va crer automatiquement un sous-rpertoire dans le rpertoire
  _B_U_I_L_D dans lequel il va dballer le code source et lui appliquer les
  corrections (de nombreuses options concernant les corrections sont
  disponibles, voir le livre pour plus de dtails). RPM va maintenant
  automatiquement construire le paquetage en lanant configure suivi de
  make, l'installer avec make install et prendre une ``photo'' des
  fichiers situs dans _/_u_s_r_/_s_q_u_i_d. C'est cette dernire qui va
  constituer le binaire RPM du logiciel Squid.


  Notez que l'on peut insrer des commandes shell au cours des phases de
  dcompression, construction et d'installation, par exemple des appels
  en perl pour modifier des paramtres de compilation.


  Le fichier RPM final sera plac dans le rpertoire _R_P_M_S dans le sous-
  rpertoire de la plate-forme correspondante _i_3_8_6. Dans notre exemple,
  il s'appelera _s_q_u_i_d_-_1_._N_O_V_M_._2_2_-_1_._i_3_8_6_._r_p_m. Notez que le nom du fichier
  est cr en collant les valeurs de certains des paramtres du fichier
  de spcification: Name, Version et Release suivi de la plate-forme,
  _i_3_8_6 dans ce cas. Gardez cela en mmoire lorsque vous crerez des RPM
  afin d'viter de leur donner des noms exagrment longs.
  Il est galement intressant de savoir que l'on peut contruire des RPM
  sans avoir  reconstruire tout le paquetage, par exemple:



       Summary: Linux 2.0.35 kernel + filehandle patch + serial console patch
       Name: linux
       Version: 2.0.35+filehandle+serial_console
       Release: 1
       Copyright: GPL
       Group: Base/Kernel
       Source: linux-2.0.35+filehandle+serial_console.tar.gz
       %description
       C'est juste une premire tentative de crer un paquetage du noyau
       Linux avec ses corrections pour l'installation de notre serveur RedHat
       Linux.

       %prep
       echo

       %setup
       echo

       %build
       echo

       %install
       echo

       %post
       /sbin/lilo

       %files
       /lib/modules/2.0.35
       /boot/vmlinuz






  Dans ce cas, nous crons simplement un RPM compos du fichier
  _/_b_o_o_t_/_v_m_l_i_n_u_z et du contenu du rpertoire _/_l_i_b_/_m_o_d_u_l_e_s_/_2_._0_._3_5, et
  excutons _/_s_b_i_n_/_l_i_l_o aprs que le paquetage a t install sur une
  nouvelle machine.  Si vous connaissez une meilleure faon d'crire le
  fichier de spcification, faites le moi savoir.



  1122..  FFAAQQ//LLiissttee ddee vvooeeuuxx

  QQ:: Peut-on appliquer automatiquement toutes les corrections de RPM? Et
  comment?


  RR11::Copiez les RPMs que vous voulez installer dans le rpertoire RPMS 
  partir duquel l'installation aura lieu, supprimez les anciens RPMs et
  mettez  jour le fichier _/_R_e_d_H_a_t_/_b_a_s_e_/_h_d_l_i_s_t avec le dtail des
  nouveaux RPMs. Voir ci-dessous un script d'Eric Doutreleau qui fait
  cela pour vous. Si vous le faites vous-mme, souvenez-vous de lancer
  _g_e_n_h_d_l_i_s_t aprs!


  RR22::Essayer ce script Perl: patchup
  <http://wwwcache.ja.net/dev/patchup/>. Il compare les RPMs que votre
  systme a install avec ceux prsents dans un rpertoire donn et
  fournit une liste de  ceux qu'il pense vous devriez mettre  jour. Il
  peut mme les installer pour vous si vous lui faites confiance.


  RR33::rpm2hml est une version bien plus puissante (12Mo de C contre une
  page de Perl!) de R2.


  QQ:: Un unique fichier de configuration sur le serveur d'installation
  pour tous les clients, peut-tre une solution de repli aprs avoir
  essay _I_P_A_D_D_R_-_k_i_c_k_s_t_a_r_t?

  RR:: ?


  QQ::Plus de souplesse lorsque les chose vont mal - par exemple demander
  un chemin alternatif si la distribution ne se trouve pas sur le CD-
  ROM.

  RR:: ?


  QQ:: Exclusion explicite de paquetages - par exemple touts sauf
  _s_e_n_d_m_a_i_l.

  RR:: ?


  QQ::Choisir quels services sont lancs automatiquement au dmarrage par
  les scripts dans _/_e_t_c_/_r_c_._d_/.


  RR:: L'utilitaire _c_h_k_c_o_n_f_i_g vous permet de configurer les services qui
  doivent tre lancs au dmarrage. Vous pouvez l'utiliser parmi les
  scripts lancs aprs l'installation par exemple pour lancer _y_p_b_i_n_d
  dans les _r_u_n_l_e_v_e_l 3, 4 et 5:



       chkconfig --level 345 ypbind on





  et il va lancer ypbind sur le niveau 345.

  QQ:: Quand les commandes shell de la section %post s'excutent, envoyer
  leur sortie vers une autre console plut que d'crire sur l'cran
  principal. _C_e_l_a _p_e_u_t_-_i_l __t_r_e _f_a_i_t _d_a_n_s _l_a _s_e_c_t_i_o_n _d_e_s _c_o_m_m_a_n_d_e_s _s_h_e_l_l
  _e_n _u_t_i_l_i_s_a_n_t open?.

  RR:: Pas de problme! Il suffit de faire quelque chose comme:



         exec >/dev/tty5





  QQ:: Le code de cration de systme de fichiers vrifie-t-il existence
  de blocs dfectueux?


  RR:: Si vous passez sur la console sur laquelle les sorties de la
  cration du systme de fichiers sont affiches, vous ne verrez aucune
  mention indiquant que le test `read-only' a t effectu.


  1133..  CCrrddiittss

  Remerciements  Eric Doutreleau pour ses informations sur _c_h_k_c_o_n_f_i_g,
  l'adaptation du fichier de configuration de SYSLINUX et pour son
  script Perl d'actualisation des RPM.


  1144..  AAnnnneexxee

  Voici le script d'Eric pour ajouter les RPM actualiss dans les
  rpertoires de la distribution RedHat:


















































  #!/usr/bin/perl
  #
  $redhatdir="/cdrom/i386";
  $rpmdir="/cdrom/i386/RedHat/RPMS/";
  $updatedir="/cdrom/updates/";
  @OTHERDIR=($updatedir);
  foreach $dir (@OTHERDIR)
    {
      print "update for $dir\n";
      system(" find $dir -name \"*.rpm\" -exec cp {} $rpmdir \\; ");
    }
  chdir($contribdir) || die "peux pas aller dans $contribdir $!\n";
  system("chmod -R 755 $redhatdir");
  chdir($rpmdir) || die "problem to go in $rpmdir $!\n";
  #
  # remove the old file
  #
  opendir(DIR,'.');
  @package=grep(/\.rpm$/,readdir(DIR));
  foreach $file (@package)
    {
      $file =~ /(.*)\-([\d+|\.]+\w*)\-(\d+)\.[i386|noarch].*/;
      $nom=$1;
      $version=$2;
      $buildvers=$3;
      if ($NOM{$nom})
        {
          $version2=$VERSION{$nom};
          $buildver2=$BUILDVERS{$nom};
          $file2=$FILE{$nom};
          $nom2=$NOM{$nom};
          if ( $version2 gt $version )
            {
              print "$file2 is newer than $file\n";
              unlink($file);
            }
          else
            {
              if ( $version2 lt $version )
                {
                  print "$file is newer than $file2\n";
                  unlink($file2);
                  $VERSION{$nom}=$version;
                  $BUILDVERS{$nom}=$buildvers;
                  $FILE{$nom}=$file;
                  $NOM{$nom}=$nom;
                }
              else
                {
                  # print "$file2 $file same version version\n";
                  if ( $buildver2 > $buildvers )
                    {
                      print "$file2 : $buildver2 est mieux que $file : $buildvers\n";
                      unlink($file);
                    }
                  else
                    {
                      print "$file2 : $buildver2 is older than $file : $buildvers\n";
                      unlink($file2);
                      $VERSION{$nom}=$version;
                      $BUILDVERS{$nom}=$buildvers;
                      $FILE{$nom}=$file;
                      $NOM{$nom}=$nom;
                    }
                }
            }
        }
      else
        {
          $VERSION{$nom}=$version;
          $BUILDVERS{$nom}=$buildvers;
          $FILE{$nom}=$file;
          $NOM{$nom}=$nom;
        }
    }

  # we do the hard thing here
  #
  system("$redhatdir/misc/src/install/genhdlist $redhatdir");





















































  Kiosk HOWTO
  Gene Wilburn, ITS Dept, Royal Ontario Museum
  <genew@rom.on.ca>
  v1.0, October 1999

  Ce document se veut un guide pour la mise en place d'une borne inter
  active de type www utilisant Linux, X11R6, Fvwm2, Navigator 4.X et une
  boule de pointage. Il met en relief les mthodes employes pour la
  galerie sur la biodiversit au Royal Ontario Museum  Toronto.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Droits de proprit, licence et conditions d'usage
     1.2 Remerciements

  2. Survol de l'installation

  3. Mise en place d'un environnement de type borne

     3.1 FVWM2
        3.1.1 /etc/X11/fvwm2/system.fvwm2rc
     3.2 Netscape Navigator
     3.3 Recouvrement de Navigator
        3.3.1 Cration des masques
     3.4 /root/kiosk.xinitrc
     3.5 /root/xkiosk

  4. Initialisation de la borne

     4.1 Modification du fichier /etc/inittab
     4.2 Script /etc/rc.d/rc.4/S99xkiosk
     4.3 Dmarrage normal de la console

  5. Considrations diverses

     5.1 conomiseurs d'cran
        5.1.1 /.xscreensaver
     5.2 Fichiers de son
     5.3 Billes de pointage
     5.4 Cration et mise au point des pages HTML pour les bornes

  6. Projets

     6.1 Bornes distantes
     6.2 crans tactiles
     6.3 Claviers
     6.4 Collaboration


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Les bornes d'affichage d'informations rendent service dans les
  bibliothques, les expositions, les muses, les tablissements
  d'enseignement, les bureaux d'accueil municipaux, les points
  d'informations, les confrences, les galeries marchandes, les
  aroports, bref, tout endroit o l'on dsire un accs facile 
  l'information. Les bornes sont gnralement munies d'crans tactiles
  ou de dispositifs de pointage de type boule pour que les gens puissent
  accder  un contenu attractif et tenu  jour.

  Les bornes peuvent tre cres de diffrentes faons, depuis des
  solutions onreuses  base de logiciel propritaire jusqu'aux systmes
  open source reposant sur le format HTML. Une approche de type butineur
  est particulirement intressante en raison de son caractre
  multimdia intrinsque. Le format HTML marie le texte, le graphisme,
  le son et tous les mdias en flux dans un format portable.

  Linux fournit une plate-forme souple pour le dploiement de bornes.
  L'installation de Linux est conomique et offre de nombreuses
  possibilits, qu'il s'agisse de stations sans disque ou de serveurs
  www coupls  des bases de donnes. L'adaptabilit du systme
  d'exploitation sous-jacent permet de grer  distance, que ce soit par
  le tlphone ou par un autre lien rseau, une borne Linux correctement
  configure.

  Ce HOWTO prsente une mthode d'installation de Linux en tant que
  borne interactive autonome qui utilise Netscape Navigator 4.X et Fvwm2
  sur un systme Red Hat 6.x. Il est issu de l'exprience de cration
  d'un systme de ce type que j'ai mis en place dans la _g_a_l_e_r_i_e _s_u_r _l_a
  _b_i_o_d_i_v_e_r_s_i_t_ au Royal Ontario Museum ( <http://www.rom.on.ca>) 
  Toronto au Canada. La borne  laquelle ce document fait rfrence
  inclut une boule de pointage plutt qu'un cran tactile plus onreux.
  Il existe bien d'autres faons de crer une borne Linux mais celle-ci
  s'est avre fiable pour nous et peut servir de point de dpart  vos
  propres projets.


  11..11..  DDrrooiittss ddee pprroopprriitt,, lliicceennccee eett ccoonnddiittiioonnss dd''uussaaggee

  Copyright (c) 1999 par Gene Wilburn.

  La distribution de ce document doit se conformer aux termes de la
  licence LDP tels que dfinis  l'adresse :
  sunsite.unc.edu/LDP/COPYRIGHT.html.



  11..22..  RReemmeerrcciieemmeennttss

  Notre borne Linux s'inspire fortement des travaux effectus par la
  ville de Charlotte en Caroline du Nord pour son site www municipal
  _C_h_a_r_l_o_t_t_e_'_s _W_e_b (cf <http://www.charweb.org/webinfo/kiosk/>).  Le
  projet de borne de Charlotte qui repose sur un cran tactile a t mis
  en place en 1996  partir d'une distribution Slackware, de Fvwm et de
  Netscape Navigator 2.X. Les webmestres de Charlotte ont ralis une
  borne trs pratique et ont publi le dtail de leur installation sur
  le site. Ce HOWTO constitue d'une certaine faon une mise  jour de
  leur travail, modifiant certains points pour travailler avec une Red
  Hat 6.X, Fvwm2, Netscape Navigator 4.X et un dispositif de pointage
  sur mesure.

  J'ai collabor avec Debra Luneau (debral@rom.on.ca), administrateur
  web du Royal Ontario Museum,  la mise au point des canevas sous
  Netscape.  Les exemples fournis sur notre site sont le fruit de son
  travail. Nous les utilisons tels quels dans la galerie sur la
  biodiversit.

  La section sur la biodiversit de l'Ontario de la version ROM du site
  a t cre par Hopscotch Interactive (www.hopscotch.ca).
  L'application originelle sous forme de fichiers de base de donnes 
  plat a t convertie en un systme utilisant MySQL par Gord Howells
  (gordonh@rom.on.ca), concepteur et dveloppeur de la base de donne
  ROM.  Une version hors-borne de ce modle rduit de site est
  consultable  l'adresse  <http://www.rom.on.ca/ontario/>.


  22..  SSuurrvvooll ddee ll''iinnssttaallllaattiioonn

  L'installation de Linux en tant que borne est semblable  celle d'une
  station de travail graphique  quelques dtails prs. S'il s'agit d'un
  poste autonome, il doit dmarrer directement en mode borne. De plus,
  l'environnement de navigation doit tre modifi pour dsactiver les
  crans de dialogue standard et supprimer les parties du butineur qui
  conduiraient  des interactions inopportunes (cf. la barre de
  navigation de Netscape).

  En principe, un site web sur borne interactive doit se suffire  lui-
  mme. Les utilisateurs se dplacent au sein du site au moyen d'un
  dispositif de pointage. Il peut s'agir d'un cran tactile, d'une boule
  ou d'une souris. La robustesse des souris mises  disposition du
  public est problmatique.

  Une borne Linux peut tre directement connecte  un site-mre via un
  rseau local ou une liaison PPP et rcuprer les pages  la demande.
  Elle peut galement contenir l'intgralit du site web et excuter
  elle-mme Apache et les scripts CGI associs.


  33..  MMiissee eenn ppllaaccee dd''uunn eennvviirroonnnneemmeenntt ddee ttyyppee bboorrnnee



  33..11..  FFVVWWMM22

  FVWM2 (FVWM, version 2 -- www.fvwm.org) fournit un gestionnaire de
  fentres pour X souple, fiable et lger qui s'avre trs pratique 
  configurer pour un environnement de borne. On modifiera certaines
  options par dfaut dans le system.fvwm2rc tels les crans virtuels,
  les barres de menu, les menus de sortie, etc. pour ne conserver qu'un
  cadre FVWM minimal. La borne tant autonome, la modification des
  prfrences globales ne gnera en rien.

  On profite galement des proprits d'objets positionnables pour
  mettre en place des bitmaps X Window (fichiers xpm) qui vont recouvrir
  les parties de Netscape auxquelles vous souhaitez interdire l'accs.

  Le fichier  modifier se trouve en /etc/X11/fvwm2/system.fvwm2rc (du
  moins si vous avez install une distribution Red Hat). Vous devrez
  partir  la recherche des sections dcrites ci-dessous dans ce
  fichier.


  33..11..11..  //eettcc//XX1111//ffvvwwmm22//ssyysstteemm..ffvvwwmm22rrcc

  Dans le fichier /etc/X11/fvwm2/system.fvwm2rc changez :



       DeskTopSize 2X2




  en



       DeskTopSize 1X1




  Les bureaux virtuels disparaissent.

  Dans la section Default Styles, changez ensuite :



       Style "*"           BorderWidth 7, HandleWidth 7




  en



       Style "*"           BorderWidth 0, HandleWidth 0, notitle, nohandles




  La plupart des contrles usuels des fentres sont dsactivs.

  Ajoutez les deux lignes suivantes  la section Default Styles :



       Style "xdaliclock"  StaysOnTop
       Style "sxpm"        StaysOnTop




  La section Default Styles devrait prendre l'allure suivante :



       # default Styles:
       #Style "*"           BorderWidth 7, HandleWidth 7
       Style "*"           BorderWidth 0, HandleWidth 0, notitle, nohandles
       Style "*"           Icon unknown1.xpm, Color lightgrey/dimgrey
       Style "*"           MWMFunctions, MWMDecor, HintOverride
       Style "*"           DecorateTransient, NoPPosition
       Style "*"           IconBox 0 -10 -280 -1
       Style "*"           FocusFollowsMouse
       Style "*"           RandomPlacement, SmartPlacement
       Style "xdaliclock"  StaysOnTop
       Style "sxpm"        StaysOnTop




  Vous pouvez recouvrir certaines parties de Netscape Navigator avec les
  programmes xdaliclock et sxpm. La formule magique rside dans
  l'attribut ``StaysOnTop''.

  Cherchez ensuite les quatre lignes suivantes et commentez-les :



       #AddToFunc InitFunction         "I" Module FvwmButtons
       #+                      "I" exec xsetroot -mod 2 2 -fg \#554055 -bg \#705070

       #AddToFunc RestartFunction "I" Module FvwmButtons
       #+                      "I" exec xsetroot -mod 2 2 -fg \#554055 -bg \#705070


  La mise en commentaire limine l'excuteur de tches de Fvwm2, en
  accord avec le souhait d'un environnement aussi simple que possible.


  33..22..  NNeettssccaappee NNaavviiggaattoorr

  Netscape Navigator est un meilleur choix pour une borne interactive
  que Netscape Communicator. Il est plus simple, il y a moins d'objets 
  cacher.

  Sous Windows(R) de Microsoft(TM), Netscape Navigator offre un mode de
  fonctionnement de type borne qui limine la plupart des options de
  contrle mais il n'existe  notre connaissance aucune possibilit de
  ce genre pour la version Unix  l'instant o nous crivons ces lignes.

  La version Unix peut cependant tre invoque avec un argument
  -geometry qui nous permet de toujours l'afficher en plein cran. Cela
  fait partie de notre stratgie pour une borne reposant sur Netscape.

   vous de dcider de la rsolution de la borne. Pour des moniteurs de
  19  20 pouces, 640x480 nous parat trop gros, 1024x768 trop petit et
  800x600 correct pour le public (vous en jugerez peut-tre
  diffremment). Une fois la rsolution fixe, vous tes prt 
  configurer Navigator. Par la suite, nous travaillerons en 800 par 600.
   vous de procder aux ajustements ncessaires si votre rsolution
  diffre.

  _N_o_t_e_: Navigator sera excut par root pendant le dmarrage.  Il faut
  donc procder  toutes les oprations depuis le compte root dans le
  rpertoire /root/.netscape.

  Excutez Netscape et cliquez sur le menu Edit, Preferences.  Dans la
  rubrique Appearance, activez ``Show Toolbar as Text Only''.  Dans
  Appearance, Fonts, rglez la taille des polices fixed- et variable-
  width  au moins 14pt sans quoi la zone d'affichage sera trop petite
  pour une lecture agrable.

  Entrez dans Preferences, Navigator l'URL de la page d'accueil de votre
  borne. Si vous utilisez Apache ou un autre serveur web en local,
  http://localhost/ donne accs au sommet de l'arborescence. Vous pouvez
  complter afin de dmarrer plus profondment.

  Sauvegardez ces choix puis cliquez sur View dans la barre de menu de
  Navigator. Dsactivez Personal Toolbar et Location Bar.

  L'interface ressemble nettement plus  celle d'une borne, non ?  Vos
  choix seront sauvegards  la sortie de Navigator.


  33..33..  RReeccoouuvvrreemmeenntt ddee NNaavviiggaattoorr

  Examinez de prs votre cran Navigator et vous remarquerez quatre
  zones qui doivent tre recouvertes et protges des slection  la
  souris ou  la boule :


  1. la barre de menu en haut ;

  2. le slectionneur sur le ct gauche de la barre de navigation ;

  3. tout ce qui figure  droite de Home dans la barre de navigation ;

  4. le contrle de scurit dans le coin infrieur gauche de Navigator.

  Voici un schma des zones  masquer :

       +---------------------------------------+
       |            # 1 Toolbar                |
       +--+------------+-----------------------+
       |#2|            |  #3 Navbar            |
       +--+            +-----------------------+
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       +--------+                              |
       |#4 Key  |                              |
       +---------------------------------------+




  Pour les zones suprieures (#1-3), on aura recours  trois images.
  Pour le contrle de scurit (#4), on emploiera xdaliclock.


  33..33..11..  CCrraattiioonn ddeess mmaassqquueess

  L'approche la plus facile pour les zones #1-3 consiste  rcuprer une
  copie d'cran de Navigator en 800 par 600 et  dcouper les parties
  adquates. Je me suis servi de GIMP.

  Vous pouvez reprendre le graphisme d'origine, changer les couleurs ou
  mettre votre propre logo. Sauvegardez les images en tant que :


  1. topbar.xpm

  2. navleft.xpm

  3. navright.xpm

  Le systme X Window utilise xpm comme format natif. Servez-vous du
  programme _s_x_p_m pour les placer sur l'cran.

  La mise au point des masques avec le nombre exact de pixels au bon
  endroit ncessitera plusieurs essais. Afin de vous aider, les fichiers
  xpm que nous avons crs et nos fichiers de configuration sont
  disponibles sur le site suivant :
  <http://www.rom.on.ca/kiosk/HOWTO/>.  Tlcharger nos fichiers et vous
  en servir comme point de dpart sera srement le plus simple.


  33..44..  //rroooott//kkiioosskk..xxiinniittrrcc

  De mme que vous creriez normalement un fichier .xinitrc pour votre
  usage personnel, vous devez mettre en place un fichier
  d'initialisation de session X pour votre application. Le script
  suivant offre diffrentes fonctionnalits :


    initialisation de l'conomiseur d'cran (optionnel) ;

    placement d'un bitmap sur la barre de menu de Navigator
     (topnav.xpm) ;

    placement d'un bitmap sur l'activateur de barre de navigation
     (navleft.xpm) ;

    placement d'un bitmap sur le reste de la barre de navigation
     (navright.xpm) ;

    placement d'un xdaliclock sur la clef de scurit de Navigator
     (adapt  une rsolution 800 par 600) ;

    dmarrage de Netscape et boucle de vrification de sa prsence pour
     l'excuter  nouveau s'il disparat ;

  Il s'agit du fichier principal de fonctionnement de la borne.


  ______________________________________________________________________
  #!/bin/sh
  # kiosk.xinitrc -- Script d'initialisation de session X (borne interactive)

  # Demarrage de l'economiseur d'ecran
  /usr/X11R6/bin/xscreensaver-command -exit
  /usr/X11R6/bin/xscreensaver &

  # Recouvrement de Navigator (#1)
  sxpm /root/navtop.xpm &

  # Recouvrement des petites zones dans le selecteur de la barre d'outils (#2)
  sxpm -g +0+23 /root/navleft.xpm &

  # Recouvrement de la zone a gauche du bouton Home (#3) ####### ce n'est pas a _droite_ du bouton Home ? #####
  sxpm -g +275+23 /root/navright.xpm &

  # xdaliclock sur le cadenas de securite (#4)
  /usr/X11R6/bin/xdaliclock -g 38x20+0+578 -font fixed -noseconds \
  -bg gray -fg black &

  sleep 2

  # Demarrage de fvwm2
  fvwm2 &

  # Redemarrage de Netscape s'il s'arrete
  while true ; do
          if [ -f /.netscape/lock] ; then
                  rm /.netscape/lock
          fi
          /usr/bin/netscape -geometry 800x600
  done

  # On ne passera jamais ici
  ______________________________________________________________________




  33..55..  //rroooott//xxkkiioosskk

  Vous pouvez  prsent tester la configuration de votre borne. Puisque
  vous allez le faire  rptition, ainsi que depuis un script
  d'initialisation, crez le script /root/xkiosk suivant :






  ______________________________________________________________________
  /usr/X11R6/bin/xinit /root/kiosk.xinitrc -- /usr/X11R6/bin/X \
  -xf86config /root/kiosk.XF86Config bc
  ______________________________________________________________________



  N'oubliez pas le chmod ug+x.


  44..  IInniittiiaalliissaattiioonn ddee llaa bboorrnnee

  Dans des conditions normales (en tant que borne donc), Linux devrait
  dmarrer directement en mode borne. En cas de coupure de courant, de
  redmarrage accidentel ou planifi, vous devez donc configurer le
  systme pour qu'il en soit ainsi.

  Nous avons choisi le niveau de fonctionnement 4, d'habitude inutilis,
  pour notre borne. Voici les modifications apportes au fichier
  /etc/inittab :


  44..11..  MMooddiiffiiccaattiioonn dduu ffiicchhiieerr //eettcc//iinniittttaabb


  ______________________________________________________________________
  # Default runlevel. The runlevels used by RHS are:
  #   0 - halt (Do NOT set initdefault to this)
  #   1 - Single user mode
  #   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
  #   3 - Full multiuser mode
  #   4 - Kiosk mode
  #   5 - X11
  #   6 - reboot (Do NOT set initdefault to this)
  #
  id:4:initdefault:
  ______________________________________________________________________




  44..22..  SSccrriipptt //eettcc//rrcc..dd//rrcc..44//SS9999xxkkiioosskk

  Afin de dmarrer la borne aprs tout le reste -- dans notre cas Apache
  et MySQL --, crez un fichier /etc/rc.d/rc.4/S99xkiosk :





















  ______________________________________________________________________
  #!/bin/bash
  #
  # S99xkiosk   Initialization de la borne en runlevel 4
  #
  # Author:           Gene Wilburn <genew@rom.on.ca>
  #

  # Affichage d'un message dans la console
  echo "Starting up the X Window Kiosk ... "

  if [ -f /.netscape/lock] ; then
     rm /.netscape/lock
  fi

  # Enregistrement de l'activite de X
  echo %%%%%%%%%%%%%Reboot%%%%%%%%%% >> /var/log/xlog
  /root/xkiosk

  # On ne devrait se retrouver ici qu'apres un Ctrl-Backspace
  /sbin/shutdown -r now

  # Fini
  ______________________________________________________________________



  Une fois ce fichier cr (et chmodifi) et inittab modifi, Linux
  dmarrera directement en mode borne. Telnet et ftp sont dsactivs. On
  installe ssh pour la maintenance de la borne  distance avec ssh et
  scp.


  44..33..  DDmmaarrrraaggee nnoorrmmaall ddee llaa ccoonnssoollee

  On souhaite parfois, notamment lors des tests, disposer d'une console
  o travailler comme en niveau d'init 3. Pour ce faire, appuyez sur
  CCttrrll--BBaacckkssppaaccee afin de redmarrer le systme. Lorsque l'invite LILO:
  apparat, tapez :



       LILO: linux init 3




  et enregistrez-vous comme d'habitude.


  55..  CCoonnssiiddrraattiioonnss ddiivveerrsseess



  55..11..  ccoonnoommiisseeuurrss dd''ccrraann

  Selon le dploiement prvu de la borne, on ne dsire pas
  ncessairement que l'conomiseur affiche toutes ses images disponibles
  par dfaut. Pour la galerie sur la biodiversit, nous ne voulions que
  les images fractales animes qui voquaient les sciences de la vie.

  Aprs un test de plusieurs conomiseurs, nous avons dcid d'utiliser
  deux thmes alatoirement : _c_o_r_a_l et _f_o_r_e_s_t.

  On restreint xscreensaver avec un fichier .xscreensaver dans le
  systme de fichier racine (/) qui contient les directives suivantes :
  55..11..11..  //..xxssccrreeeennssaavveerr


  ______________________________________________________________________
  programs: \
          coral -root \n\
          forest -root \n
  ______________________________________________________________________





  55..22..  FFiicchhiieerrss ddee ssoonn

  Notre borne est munie d'une carte Sound Blaster AWE64 et de haut
  parleurs.  Nous avons choisi cette carte pour son bon fonctionnement
  sous Linux.

  La base de donnes MySQL qui pilote la galerie sur la biodiversit
  contient une collection de fichiers-sons que le visiteur peut couter.
  Parmi ceux-ci figure un quiz des chants d'oiseaux. Netscape sous Linux
  reste primaire sur une borne interactive pour certains aspects
  multimdias par rapport  ce dont on dispose avec Windows ou sur un
  Mac.

  Pour activer le son, nous avons dploy un plugin Netscape crit par
  Caolan McNamara (
  <http://skynet.csn.ul.ie/~caolan/docs/XSwallow.html>) nomm Xswallow.
  Tous les plugins son que nous avons tests ouvrent une page web
  distincte lorsque le fichier est jou ( moins que le fichier-son ne
  soit incorpor). Parmi tous les candidats, Xswallow fonctionne le
  mieux et dispose de la page d'affichage la plus propre.

  Bien que la prsence d'une page supplmentaire manque d'lgance, nous
  avons dcid que la stabilit de Linux valait largement quelques clics
  pour retourner  la page prcdente.

  Autre problme : lorsqu'un son est demand, la page d'Xswallow affiche
  ``Click to Abort Swallow of type audio/basic''. En cas de clic, on se
  retrouve avec une page blanche. J'ai lgrement modifi le code source
  du fichier UnixShell.c d'origine :



       char *text2 = "Click to Abort Swallow";




  est devenu



       char *text2 = "Click BACK Button to return from playing file";




  La phrase ``of type audio/basic'' est due  Netscape et non 
  Xswallow.

  Aprs recompilation, j'ai ajout le plugin  Netscape.

  Un dernier mot concernant les fichiers-sons : nous avons reu 
  l'origine un mlange de fichiers .au et .wav. L'exprience a plaid en
  faveur des .au en terme de stabilit et nous avons converti tous les
  fichiers  ce format.


  55..33..  BBiilllleess ddee ppooiinnttaaggee

  Ne disposant pas d'un budget suffisant pour l'achat d'crans tactiles,
  nous avons retenu une boule de pointage pour l'orientation dans la
  borne (pas de clavier). Notre collgue Andy Rauer du Ontario Science
  Center  Toronto nous a donn des informations sur l'emploi de
  composants industriels disponibles chez Happ Controls Inc., Elk Grove
  Village, Illinois  <http://www.happcontrols.com/> (check under their
  Interactives#######  traduire, non ? #### section).
  #######

  Nous avions besoin de dsactiver l'action de l'quivalent du bouton
  droit de la souris qui dclenche l'apparition de fentres de dialogue
  avec Netscape Navigator.

  En construisant notre propre dispositif, nous avons t capables
  d'effectuer exactement les connexions voulues : un contrle avec deux
  boutons quivalents au clic gauche. Les boutons se trouvent des deux
  cts du dispositif et sont adapts aussi bien aux gauchers qu'aux
  droitiers. Les personnes charges de la conception des bornes ont
  inclus nos lments tels quels.

  Pour notre borne, nous avons choisi les composants suivants (qui sont
  capables de rsister aux termites) :


    une boule de 2 fois 1/4 de pouce Atari (rouge) ;

    un kit d'interfaage IBM (compatible avec le protocole souris srie
     Microsoft) ;

    des boutons poussoirs lumineux (rouges).

  Nous avons achet un botier Hammond Manufacturing en plastique (cat
  no. 1591ABK) chez un revendeur d'lectronique local pour hberger
  l'ensemble.

  En prvision de bornes supplmentaires et de dfaillances, nous avons
  command quatre ensembles supplmentaires.


  55..44..  CCrraattiioonn eett mmiissee aauu ppooiinntt ddeess ppaaggeess HHTTMMLL ppoouurr lleess bboorrnneess

  Dans le meilleur des mondes possibles (?), vous partiriez de zro pour
  raliser les pages HTML de votre borne. En gardant  l'esprit que la
  consultation d'une borne interactive diffre de celle de pages sur le
  web depuis une station individuelle, les indications suivantes vous
  donneront quelques points de repre :


    les passages textuels doivent rester courts et employer de grandes
     polices ;

    vitez les crans qui ncessitent un ascenseur ;

    mettez des images colores de grande taille sur chaque page ;

    rendez disponibles des balises de navigation entre les pages
     lorsque c'est possible ;

    interdisez-vous le clavier : tout se fait en cliquant ;

    limitez-vous  des chantillons sonores de courte dure, inclus si
     possible dans la page ;

    le style doit tre concis et nergique, vous disserterez ailleurs.

  Malheureusement, vous hriterez parfois de pages conues dans une
  optique davantage web que borne. Dans ce cas, une reprise complte des
  pages risque de consommer trop de temps. Lors du dveloppement de
  pages web, suivez les instructions suivantes :


    tez tous les HREF externes, notamment les MAILTO ;

    supprimez l'inutile, les logos, etc. des pages ;

    vrifiez la taille des polices et augmentez-la au besoin ;

    liminez les gifs anims sans rapport direct avec la page en cours
     de consultation ;

    liminez purement et simplement les gifs anims ;

    simplifiez l'organisation de chaque page ;

    jetez un oeil du ct des SSI pour faciliter l'orientation ou
     fournir un cadre uniforme aux pages.



  66..  PPrroojjeettss

  Nos tentatives prcdentes  base d'ordinateurs sous Windows(R)
  n'avaient pas t satisfaisantes. Les units se rvlaient instables
  et se bloquaient frquemment. L'utilisation de Linux a permis
  l'mergence d'une borne fiable et robuste dans un environnement ouvert
  au public et nous a incit  entrevoir d'autres possibilits.


  66..11..  BBoorrnneess ddiissttaanntteess

  Parmi les objectifs futurs, figure le dploiement de bornes  travers
  Toronto. Les gens pourraient consulter des informations sur le site
  et, nous l'esprons, tre suffisamment intresss pour aller
  finalement consulter le site ROM lui-mme. Nous envisageons des lieux
  tels les conventions, les expositions, les galeries commerciales, ou
  tout vnement particulier. Nous songeons aussi  des sites plus
  loigns comme les bibliothques publiques.

  Pour ce projet, nous pensons avoir recours  des systmes Linux munis
  de modems qui contacteraient le site-mre pour mettre  jour
  quotidiennement les fichiers et qui pourraient tre appels pour des
  oprations de maintenance.


  66..22..  ccrraannss ttaaccttiilleess

  Quand le prix de cette technique aura diminu, nous souhaitons essayer
  des crans plats pour les bornes. L'emploi d'crans plats et de pc de
  petite taille devrait permettre la mise en oeuvre de bornes trs
  discrtes.


  66..33..  CCllaavviieerrss

  Nous serons srement amens  dployer des bornes munies de claviers.
  Un nouveau dfi en matire d'inhibition de combinaisons de touches !
  Si quelqu'un souhaite apporter une contribution  ce sujet ou  tout
  autre aspect du Kiosk-HOWTO, qu'il m'envoie un courrier lectronique 
  genew@rom.on.ca ou  njo@interlog.com.


  66..44..  CCoollllaabboorraattiioonn

  Toute collaboration avec d'autres dveloppeurs de bornes pour tendre
  le Kiosk-HOWTO sera la bienvenue. Comme on dit avec Perl : ``Il existe
  plusieurs faons de faire.''

























































	Ce rpertoire contient les versions franaises des HOWTO,
issus du projet de documentation Linux (LDP).

        Les sites primaires de diffusion de ces traductions sont :
	- ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/fr
        - ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO
        - http://www.freenix.org/linux/HOWTO/

Contact :
	traduc@Traduc.Org : liste de discussion regroupant les 
		traducteurs et relecteurs. Il est possible de s'y 
		inscrire auprs de Majordomo@Traduc.Org.

        Pour tout renseignement, consultez le document Liste-des-HOWTO,
http://www.freenix.org/unix/linux/HOWTO/Liste-des-HOWTO.html.


		Eric Dumas, dumas@Linux.EU.Org - dumas@freenix.org.


  HOWTO - Disques de grande capacit
  Andries Brouwer, aeb@cwi.nl,
  v2.2m, 15 fvrier 2000

  Tout sur la gomtrie des disques durs et la limite des 1024 cylin
  dres.

  11..  EEnnoonncc dduu pprroobbllmmee

  Supposons que vous ayez un disque dur de plus de 1024 cylindres.
  Supposons galement que vous ayez un systme d'exploitation qui
  utilise l'ancienne interface INT13, d'Entre/Sortie sur disques.  Dans
  ce cas, vous avez un problme, parce que cette interface utilise un
  champ de 10 bits pour coder les cylindres sur lesquels sont effectues
  les Entres/Sorties, de telle manire que les cylindres 1024 et au-
  del sont inaccessibles.

  Heureusement, Linux ne se sert pas du BIOS, donc il n'y a pas de
  problme.

  Sauf peut-tre pour deux choses :

  (1) Quand vous dmarrez votre systme, Linux ne fonctionne pas encore
  et ne peut donc pas vous prserver des problmes lis au BIOS.  Cela a
  certaines consquences pour LILO et d'autres programmes d'amorage du
  mme acabit.

  (2) Il est ncessaire que tous les systmes d'exploitation qui se
  partagent un mme disque dur se mettent d'accord sur la position
  physique de chaque partition. En d'autres termes, si vous utilisez
  Linux et disons, DOS sur un seul disque dur, alors les deux se doivent
  d'interprter la table des partitions de la mme manire. Cela a
  quelques consquences pour le noyau de Linux et pour fdisk.

  Vous trouverez ci-dessous une description assez pousse de tous les
  dtails importants. Prenez en compte le fait que j'utilise comme
  rfrence un noyau dans sa version 2.0.8. D'autres versions pourront
  donc prsenter quelques diffrences.



  22..  RRssuumm

  Vous avez un nouveau disque de grande capacit. Que faire ? Bon, du
  ct logiciel il faut utiliser fdisk (ou mieux, cfdisk), pour crer
  les partitions, ensuite mke2fs pour crer un systme de fichiers, et
  enfin mount pour faire le lien entre ce nouveau systme de fichiers et
  l'arborescence dj existante.

  _I_l _y _a _u_n _a_n _j_'_a_u_r_a_i_s _p_u __c_r_i_r_e _: Il n'est pas ncessaire de lire ce
  HOWTO  partir du moment o, de nos jours, il n'y a _p_a_s de problme
  avec les disques de grande capacit. La grande majorit des problmes
  constats est due au fait que les gens pensent qu'il peut y avoir un
  problme, et installent un gestionnaire de disques durs, ou passent en
  mode expert dans fdisk, ou encore spcifient explicitement une
  gomtrie de disque  LILO ou sur la ligne de commande du noyau.

  Cependant, les domaines dans lesquels interviennent typiquement les
  problmes sont :

    un matriel ancestral ;

    plusieurs systmes d'exploitation sur le mme disque dur ;

    le dmarrage.

  _E_n _c_e _m_o_m_e_n_t _l_a _s_i_t_u_a_t_i_o_n _e_s_t _e_n_c_o_r_e _p_i_r_e_.  Peut-tre que les noyaux
  2.3.21 et suivants seront bons,  nouveau, pour tous les disques durs.

  Conseil :

  Pour les disques durs SCSI de grande capacit : Linux les a trs tt
  supports. Il n'y a rien  faire.

  Pour les disques durs IDE de grande capacit (au-del de 8,4 Go) :
  procurez-vous un noyau stable rcent (2.0.34 ou plus). Normalement,
  tout doit se passer correctement, surtout si vous avez eu la sagesse
  de ne pas dire au BIOS de faire des conversions du type LBA ou
  assimil.

  Pour des disques durs IDE de capacit vraiment importante (au-del de
  33,8 Go) : reportez-vous  la section ``Problmes de l'IDE avec des
  disques durs de 34 Go et plus'' ci-dessous.

  Si LILO reste suspendu au dmarrage, il faut essayer de spcifier
  ``linear'' dans le fichier de configuration /etc/lilo.conf.  (Et si
  vous aviez vraiment linear, essayez sans.)

  Il y a des problmes de gomtrie qui peuvent tre rsolus en passant
  explicitement une gomtrie au noyau/LILO/fdisk.

  Si vous avez un vieux fdisk et qu'il vous met des messages d'erreur du
  type ```overlapping partitions''' : ignorez-les ou vrifiez en
  utilisant cfdisk qui est vraiment bien.

  Si vous pensez que quelque chose cloche dans la taille de votre disque
  dur, assurez-vous que vous n'tes pas en train de confondre ``units''
  binaires et dcimales, et sachez que l'espace libre rapport par df
  pour un disque vide est infrieur de quelques centimes  la taille de
  la partition, ce  cause d'un en-tte de gestion.

  Maintenant, si vous pensez qu'il y a tout de mme des problmes, ou
  simplement si vous tes curieux, lisez la suite.


  33..  UUnniittss eett ttaaiilllleess

  Un kilo-octet (Ko) est gal  1000 octets (NdT : un octet se dit byte
  en anglais, et est abrg avec un `B' en majuscule. A ne pas confondre
  avec un bit, qui se dit bit et qui est abrg avec un `b' en
  minuscule !).  Un Mga-octet (Mo) est gal  1000 Ko.  Un Giga-octet
  (Go) est gal  1000 Mo.  Un Tra-octet (To) est gal  1000 Go.  Cela
  est la norme dans le Systme International
  <http://physics.nist.gov/cuu/Units/prefixes.html> (SI).

  Cependant, il y a des personnes qui utilisent la conversion
  1Mo=1024000 octets et parlent de disquettes de 1,44Mo, et des
  personnes qui pensent que 1Mo=1048576 octets.  L, je me reporte au
  nouveau standard <http://physics.nist.gov/cuu/Units/binary.html>, et
  j'cris Ki, Mi, Gi, Ti pour les units binaires, de telle sorte que
  les disquettes ont une taille de 1440 Kio (1,47 Mo, 1,41 Mio), 1 Mio
  est gal  1048576 octets (1,05 Mo), 1 Gio reprsente 1073741824
  octets (1,07 Go) et 1 Tio vaut 1099511627776 octets (1,1 To).

  D'une manire assez normale, les constructeurs de disques durs suivent
  la norme SI et utilisent des units dcimales. Cependant, les messages
  de dmarrage de Linux et quelques programmes de type fdisk utilisent
  les symboles MB et GB (Mo et Go en franais) pour les units binaires,
  ou binaires-dcimales mlanges. Donc, avant que vous ne pensiez que
  votre disque est plus petit que ce qu'on vous avait promis lors de son
  achat, calculez sa vraie taille en units dcimales (ou simplement en
  octets).
  En ce qui concerne la terminologie et les abrviations des units
  binaires, Knuth <http://www-cs-staff.stanford.edu/~knuth/> propose une
  alternative <http://www-cs-staff.stanford.edu/~knuth/news.html> qui
  est d'utiliser KKo, MMo, GGo, TTo, PPo, EEo, ZZo, YYo, et de les
  dnommer _g_r_a_n_d _k_i_l_o _o_c_t_e_t, _g_r_a_n_d _m__g_a _o_c_t_e_t, ... _g_r_a_n_d _y_o_t_a _o_c_t_e_t.  Il
  crit : `Remarquez que le fait de doubler la lettre a une connotation
   la fois binaire et d'amplitude.' C'est une bonne proposition
  -- `grand giga octet' sonne mieux que `gibi octet'.  Cependant, pour
  le sujet qui est le ntre, la seule chose importante est de mettre
  l'accent sur le fait qu'un mga octet contient prcisment 1000000
  octets, et qu'il est ncessaire d'employer d'autres termes ou d'autres
  abrvations si vous voulez dsigner autre chose.


  33..11..  TTaaiillllee dd''uunn sseecctteeuurr

  Dans le cadre de ce texte, un secteur a une taille de 512 octets.
  Cela est pratiquement toujours vrai, mais certains disques Magnto-
  Optiques par exemple, utilisent une taille de secteur gale  2048
  octets, et toutes les capacits donnes ci-dessous doivent tre
  multiplies par quatre. (Si vous utilisez fdisk sur de tels disques,
  assurez-vous d'avoir une version 2.9i ou suprieure, et passez-lui
  l'option `-b 2048'.)


  33..22..  TTaaiillllee dd''uunn ddiissqquuee

  Un disque avec C cylindres, H ttes (NdT : tte se dit head en
  anglais, d'o l'abrviation ;-)) et S secteurs par piste possde en
  tout C*H*S secteurs, et peut stocker C*H*S*512 octets.  Par exemple,
  si sur un disque dur il est crit C/H/S=4092/16/63, alors celui-ci a
  4092*16*63=4124736 secteurs, et peut contenir 4124736*512=2111864832
  octets (2,11 Go).  Il y a une convention dans l'industrie qui consiste
   donner C/H/S=16383/16/63 pour les disques durs de plus de 8,4 Go, et
  donc la taille du disque ne peut plus tre dduite des valeurs C/H/S
  rapportes par ce dernier.


  44..  AAccccss  uunn ddiissqquuee dduurr

  Si on veut lire ou crire quelque chose  partir de, ou sur un disque
  dur, il faut spcifier une position sur ce disque, en donnant par
  exemple un numro de secteur ou de bloc.  Si le disque dur est de type
  SCSI, alors ce numro de secteur va directement au moteur de commande
  SCSI et est compris par le disque.  Si le disque dur est de type IDE
  et qu'il utilise le mode LBA, alors il se passe exactement la mme
  chose. Mais si le disque dur est vieux, RLL, MFM ou IDE avant
  l'apparition du LBA, alors l'lectronique qui lui est attache attend
  un triplet (cylindre, tte, secteur) pour dsigner l'endroit voulu.

  La correspondance entre la numrotation linaire et cette notation
  tridimensionnelle est la suivante : pour un disque dur avec C
  cylindres, H ttes et S secteurs/pistes, la position (c,h,s) en 3D, ou
  la notation CHS, est la mme que la position c*H*S + h*S + (s-1) en
  notation linaire ou bien LBA.  (Le -1 est d au fait que
  traditionnellement les secteurs sont numrots  partir de 1 et non 0,
  dans cette notation 3D.)

  En consquence, pour permettre des accs  un trs vieux disque non-
  SCSI, nous devons connatre sa _g__o_m__t_r_i_e, c'est--dire les valeurs de
  C, H et S.





  44..11..  AAccccss ddiissqquueess dduu BBIIOOSS eett llaa lliimmiittee ddeess 11002244 ccyylliinnddrreess

  Linux ne se sert pas du BIOS, mais d'autres systmes d'exploitation le
  font. Le BIOS, qui existait avant le temps du LBA, offre avec INT13
  des routines d'Entre/Sortie disque qui prennent (c,h,s) comme
  arguments.  (Plus prcisment : AH slectionne la fonction  excuter,
  CH correspond aux 8 bits de poids faible du numro de cylindre, CL a
  dans ses bits 7-6 les deux bits de poids fort de ce mme numro et
  dans ses bits 5-0 le numro du secteur, DH est le numro de la tte,
  et DL est le numro du lecteur (80h ou 81h). Cela explique en partie
  l'agencement de la table des partitions.)

  Donc, nous obtenons un CHS cod sur trois octets, avec 10 bits pour le
  numro du cylindre, 8 bits pour le numro de tte, et 6 bits pour le
  numro de secteur sur la piste (numrot de 1  63). Il s'ensuit que
  le numro de cylindre peut prendre des valeurs allant de 0  1023 et
  que le BIOS ne peut pas adresser plus de 1024 cylindres.

  Les logiciels DOS et Windows n'ont pas volu quand furent introduits
  les disques IDE avec le support LBA, et ont toujours eu besoin du
  soutien d'une gomtrie pour grer les disques durs, mme quand cela
  n'a plus t ncessaire pour effectuer des Entres/Sorties, mais
  uniquement pour converser avec le BIOS. Cela signifie bien sr que
  Linux a besoin du support de la gomtrie du disque dur quand il est
  ncessaire de communiquer avec le BIOS ou avec d'autres systmes
  d'exploitation, mme sur des disques durs modernes.

  Cet tat de choses a dur pendant  peu prs quatre ans. Ont alors
  commenc  apparatre sur le march des disques durs qui ne pouvaient
  plus tre adresss avec les fonctions INT13 ( cause du fait que
  10+8+6=24 bits pour (c,h,s) ne peuvent pas adresser plus de 8,5 Go),
  et une nouvelle interface BIOS a t cre : les dnommes Fonctions
  INT13 Etendues, o DS:SI pointe sur un paquet reprsentant l'adressage
  du disque sur 16 octets, qui contient un nombre absolu de blocs
  commenant par 8 octets.

  Tout doucement, le monde Microsoft semble aller vers une utilisation
  de ces Fonctions INT13 Etendues. Probablement, dans quelques annes,
  plus aucun systme moderne plac dans un ordinateur moderne n'aura
  besoin du concept de `gomtrie de disque dur'.


  44..22..  HHiissttooiirree dduu BBIIOOSS eett ddeess lliimmiitteess ddee ll''IIDDEE


     SSppcciiffiiccaattiioonn AATTAA ((ppoouurr lleess ddiissqquueess dduurrss IIDDEE)) -- llaa lliimmiittee ddeess 113377
        GGoo
        Au plus 65536 cylindres (numrots de 0  65535), 16 ttes
        (numrotes de 0  15), 255 secteurs par piste (numrots de 1 
        255), pour une capacit totale maximale de 267386880 secteurs
        (de 512 octets chacun), ce qui fait 136902082560 octets
        (137 Go). Ce n'est pas encore un problme (en 1999), mais a le
        deviendra dans quelques annes.


     BBIIOOSS IInntt 1133 -- llaa lliimmiittee ddeess 88,,55 GGoo
        Au plus 1024 cylindres (numrots de 0  1023), 256 ttes
        (numrotes de 0  255), 63 secteurs par piste (numrots de 1 
        63) pour une capacit totale maximale de 8455716864 octets (8,5
        Go). De nos jours, cela est une srieuse limitation. Cela
        signifie que DOS ne peut utiliser les actuels disques de grande
        capacit.


     LLaa lliimmiittee ddeess 552288 MMoo
        Si les mmes valeurs c,h,s sont utilises pour les appels aux
        fonctions Int13 du BIOS et pour les oprations d'Entres/Sorties
        du disque dur, alors les deux limitations s'ajoutent, et l'on ne
        peut utiliser au plus que 1024 cylindres, 16 ttes, 63 secteurs
        par piste, ce qui donne une capacit totale maximale de
        528482304 octets (528 Mo), l'abominable limite des 504 Mio pour
        DOS avec un vieux BIOS.  Cela a commenc  poser des problmes
        aux alentours de 1993, et les gens ont eu recours  toutes
        sortes de bidouillages, aussi bien au niveau matriel (LBA),
        qu'au niveau du microprogramme (NdT : le `firmware') (les
        conversions du BIOS), ou qu'au niveau logiciel (les
        gestionnaires de disques durs).  Le concept de `conversion' a
        t invent (1994) : un BIOS pouvait utiliser une gomtrie
        quand il s'adressait au lecteur, et une autre gomtrie, fausse
        celle-l, quand il parlait  DOS, et faire des conversions de
        l'une  l'autre.


     LLaa lliimmiittee ddeess 22,,11 GGoo ((aavvrriill 11999966))
        Quelques vieux BIOS n'utilisent qu'un champ de 12 bits en RAM
        CMOS pour donner le nombre de cylindres. De ce fait, ce nombre
        peut tre au plus gal  4095, et l'on ne peut accder qu'
        4095*16*63*512=2113413120 octets. Le fait d'avoir un disque dur
        de plus grande capacit se traduirait par un plantage au moment
        du dmarrage. Cela a pour effet de rendre les disques avec une
        gomtrie de 4092/16/63 assez populaires. Et encore de nos
        jours, beaucoup de gros disques durs ont un cavalier qui permet
        de faire croire qu'ils ont une gomtrie de 4092/16/63.  Vous
        pouvez galement jeter un coup d'oeil  la page plus de 2 Go
        <http://www.firmware.com/support/bios/over2gb.htm>.


     LLaa lliimmiittee ddeess 33,,22 GGoo
        Il y avait un bug dans la gestion des BIOS Phoenix 4.03 et 4.04
        qui bloquait le systme lors de la configuration du CMOS pour
        des disques durs ayant une capacit suprieure  3277 Mo. Jetez
        un oeil  la page plus de 3 Go
        <http://www.firmware.com/support/bios/over3gb.htm>.


     LLaa lliimmiittee ddeess 44,,22 GGoo ((ffvvrriieerr 11999977))
        Une conversion simple du BIOS (ECHS = CHS Etendu, parfois appel
        `Large disk support' ou simplement `Large') fonctionne en
        doublant le nombre de ttes et en divisant par deux le nombre de
        cylindres montrs au DOS, de manire rpte, jusqu' ce que le
        nombre de cylindres soit au plus gal  1024.  Maintenant, DOS
        et Windows 95 ne peuvent pas supporter 256 ttes de lecture, et
        donc, dans le cas frquent o le disque dit avoir 16 ttes, cela
        signifie que cette moulinette ne fonctionne que jusqu' une
        taille de 8192*16*63*512=4227858432 octets (avec une fausse
        gomtrie de 1024 cylindres, 128 ttes et 63 secteurs par
        piste). Remarquez que ECHS ne modifie pas le nombre de secteurs
        par piste, donc si ce n'est pas 63, la limite sera encore plus
        basse. Voyez la page plus de 4 Go
        <http://www.firmware.com/support/bios/over4gb.htm>.


     LLaa lliimmiittee ddeess 77,,99 GGoo
        Des BIOS un peu plus malins que les autres vitent le problme
        prcdent en ajustant d'abord le nombre de ttes  15 (`revised
        ECHS'), de faon qu'une fausse gomtrie comportant 240 ttes
        soit obtenue, valable jusqu' une taille de
        1024*240*63*512=7927234560 octets.


     LLaa lliimmiittee ddeess 88,,44 GGoo

        En dfinitive, si le BIOS fait tout ce qu'il peut pour russir
        la conversion, et utilise 255 ttes et 63 secteurs par piste
        (`assisted LBA' ou simplement `LBA') il peut atteindre
        1024*255*63*512=8422686720 octets, soit lgrement moins que la
        prcdente limite de 8,5 Go, cela parce que les gomtries avec
        256 ttes doivent tre vites. (Cette conversion utilisera pour
        le nombre de ttes la premire valeur H, prise dans la suite 16,
        32, 64, 128, 255, pour laquelle la capacit totale du disque dur
        tient dans 1024*H*63*512, et calcule alors le nombre de
        cylindres C comme tant gal  la capacit totale divise par
        (H*63*512).)


     LLaa lliimmiittee ddeess 3333,,88 GGoo ((AAoott 11999999))

        Le prochain obstacle se prsente avec une taille de 33,8 Go.  Le
        problme est qu'avec les 16 ttes et les 63 secteurs/piste par
        dfaut, a donne un nombre de cylindres suprieur  65535, qui
        ne rentre pas dans un short.  La plupart des BIOS existants ne
        peuvent pas grer de tels disques. (Jetez un oeil, par exemple 
        Asus upgrades
        <http://www.asus.com/Products/Motherboard/bios_slot1.html> pour
        une nouvelle image  flasher qui fonctionne.)  Les noyaux Linux
        plus anciens que le 2.2.14 / 2.3.21 ont besoin d'un patch.
        Voyez ``les problmes poss par les disques durs IDE de 34 Go et
        plus'' ci-dessous.

  Pour une autre discussion sur ce sujet, vous pouvez consulter la page
  Breaking the Barriers
  <http://www.maxtor.com/technology/q&a/30004.html>, et pour encore plus
  de dtails, IDE Hard Drive Capacity Barriers
  <http://www.maxtor.com/technology/whitepapers/63001.html>.

  Les disques durs de plus de 8,4 Go sont supposs donner leur gomtrie
  comme tant 16383/16/63. Cela signifie en fait que la `gomtrie' est
  obsolte, et qu'elle ne peut plus servir  calculer la taille totale
  d'un disque dur.



  55..  DDmmaarrrraaggee

  Quand le systme est mis en route, le BIOS lit le secteur 0 (connu
  sous le nom de MBR : le "Master Boot Record", la donne principale
  d'amorage) du premier disque dur (ou de la disquette, ou du cd-rom),
  et saute au code trouv  cet endroit -- en gnral un chargeur
  d'amorce. Les petits chargeurs trouvs  cet endroit n'ont, par
  principe, pas leur propre gestionnaire de disques durs, et utilisent
  plutt les services du BIOS. Cela signifie qu'un noyau Linux ne peut
  tre charg que s'il est entirement situ dans les 1024 premiers
  cylindres du disque.

  Ce problme est rsolu de manire trs simple : assurez-vous que le
  noyau (et peut-tre d'autres fichiers utiliss pendant la phase de
  dmarrage, comme les fichiers `map' de LILO) soit situ sur une
  partition qui est comprise toute entire dans les 1024 premiers
  cylindres d'un disque dur auquel le BIOS peut accder -- il est
  probable qu'il s'agisse du premier ou du second disque.

  Ainsi, crez une petite partition, disons d'une taille de 10 Mo, de
  telle manire qu'il y ait de la place pour une poigne de noyaux, en
  vous assurant qu'elle soit contenue entirement dans les 1024 premiers
  cylindres du premier ou du second disque dur. Montez-le en tant que
  rpertoire /boot ; ainsi, LILO pourra y mettre ses propres fichiers.


  55..11..  LLIILLOO eett ll''ooppttiioonn ``lliinneeaarr''

  Un autre point est que le programme d'amorage et le BIOS doivent tre
  d'accord sur la gomtrie du disque dur. LILO demande la gomtrie au
  noyau, mais de plus en plus d'auteurs de gestionnaires de disques durs
  suivent la mauvaise habitude qui consiste  dduire une gomtrie 
  partir de la table de partitions, plutt que de dire  LILO ce que le
  BIOS va utiliser. Donc, la gomtrie fournie par le noyau est souvent
  inutile.  Dans de tels cas on peut faciliter la tche  LILO en lui
  passant l'option linear.  Il en rsulte que LILO n'a pas besoin
  d'informations sur la gomtrie au moment d'installer le programme
  d'amorage (il stocke des adresses linaires dans des cartes :
  fichiers `map') mais fait la conversion des adresses linaires au
  moment du dmarrage.  Pourquoi cela n'est-il pas le comportement par
  dfaut ? En fait, il y a un inconvnient : avec l'option `linear',
  LILO ne connat plus les numros de cylindres, et par consquent ne
  peut plus vous avertir quand une partie du noyau a t enregistre au-
  del de la limite du cylindre 1024, et vous pouvez vous retrouver avec
  un systme qui ne dmarre plus.


  55..22..  UUnn bbuugg ddee LLIILLOO

  Avec les versions de LILO antrieures  la 2.1 il y a un autre
  dsavantage : la conversion des adresses effectue au dmarrage
  comporte un bug.  Quand c*H est suprieur ou gal  65536, le calcul
  provoque un dpassement de capacit.  Pour H suprieur  64 cela donne
   c une limite encore plus stricte que le bien connu c < 1024 ; par
  exemple, avec H=255 et un vieux LILO, on doit avoir c < 258
  (c=cylindre o rside l'image du noyau, H=nombre de ttes du disque).


  55..33..  11002244 ccyylliinnddrreess ccee nn''eesstt ppaass 11002244 ccyylliinnddrreess

  Tim Williams a crit : "J'avais ma partition Linux en dessous des 1024
  premiers cylindres, et a ne dmarrait quand mme pas. Au dbut quand
  je l'ai dplace en dessous de 1 Go, les choses fonctionnaient."
  Comment cela est-il possible ? En fait, c'tait un disque dur SCSI
  avec un contrleur AHA2940UW qui utilise soit H=64, S=32 (c'est  dire
  des cylindres de 1 Mio = 1,05 Mo), soit H=255, S=63 (c'est  dire des
  cylindres de 8,2 Mo), en fonction des options du micro-code du disque
  dur, et du BIOS. Il ne fait aucun doute que le BIOS se basait sur le
  premier groupe de valeurs, c'est pourquoi la limite des 1024 cylindres
  tait trouve  1 Gio, alors que Linux utilisait la seconde mthode et
  LILO estimait que la limite tait  8,4 Go.


  66..  GGoommttrriiee dduu ddiissqquuee dduurr,, ppaarrttiittiioonnss eett ``oovveerrllaapp''

  Si vous avez plusieurs systmes d'exploitation sur vos disques durs,
  alors chacun utilise une ou plusieurs partitions. Un dsaccord sur la
  localisation de ces partitions peut avoir des consquences
  catastrophiques.


  Le MBR contient une _t_a_b_l_e _d_e_s _p_a_r_t_i_t_i_o_n_s qui dcrit o se situent les
  partitions (primaires). Il y a 4 entres  la table, pour 4 partitions
  primaires, et chacune ressemble  :








  struct partition {
          char active;    /* 0x80 : on peut dmarrer avec, 0 : on ne peut pas */
          char begin[3];  /* CHS pour le premier secteur */
          char type;
          char end[3];    /* CHS pour le dernier secteur */
          int start;      /* numro de secteur sur 32 bits (en commenant  0) */
          int length;     /* nombre de secteurs sur 32 bits */
  };




  (avec CHS qui signifie Cylinder/Head/Sector).

  Cette information est redondante : la position de la partition est
  donne  la fois par les champs begin et end cods sur 24 bits, et par
  les champs start et length cods sur 32 bits.

  Linux ne se sert que des champs start et length, et ne peut de ce fait
  que prendre en compte des partitions qui ne comportent pas plus de
  2^32 secteurs, c'est--dire, des partitions d'au plus 2 Tio. Cette
  capacit est soixante fois plus grande que celle des disques durs que
  l'on peut trouver de nos jours, alors peut-tre que cela sera
  suffisant pour, environ, les sept prochaines annes.  (Donc, les
  partitions peuvent tre trs grandes, mais il y a une srieuse
  restriction avec le systme de fichiers ext2 quand il est utilis sur
  des machines avec des entiers cods sur 32 bits : la taille maximale
  d'un fichier est limite  2 Gio.)

  DOS utilise les champs begin et end, et se sert des appels INT13 du
  BIOS pour accder aux disques durs ; il ne peut grer de ce fait que
  des disques dont la taille ne dpasse pas 8,4 Go, mme avec un BIOS
  qui fait des conversions. (La taille des partitions ne peut pas
  excder 2,1 Go  cause des restrictions du systme de fichiers FAT16.)
  La mme chose est valable pour Windows 3.11, WfWG et Windows NT 3.*.

  Windows 95 intgre la gestion des interfaces INT13 Etendues, et
  utilise des types de partition spciaux (c, e, f  la place de b, 6,
  5) pour indiquer que l'on doit accder  la partition de cette
  manire.  Quand ces types de partition sont utiliss, les champs begin
  et end contiennent des informations factices (1023/255/63).  Windows
  95 OSR2 introduit le systme de fichier FAT32 (types de partition b ou
  c), qui permet d'avoir des partitions d'au plus 2 Tio.

  Qu'est-ce que c'est que ce message insens que vous rapporte fdisk au
  sujet de partitions qui se chevauchent : `overlapping', quand pourtant
  tout est en ordre ?  En fait, il y a quelque chose de
  `problmatique' : si vous voyez les champs begin et end de telles
  partitions, comme DOS le fait, il y a chevauchement. (Et cela ne peut
  pas tre corrig, parce que ces champs ne peuvent pas stocker des
  numros de cylindre plus grands que 1024 : il y aura toujours
  `chevauchement' ds que vous aurez plus de 1024 cylindres.)
  Cependant, si vous voyez les champs start et length, comme les voit
  Linux, et galement Windows 95 dans le cas de partitions types c, e
  ou f, alors tout apparat comme tant en ordre.  Donc, ne tenez pas
  compte de ces avertissements quand cfdisk ne se plaint pas et que vous
  avez un disque dur avec uniquement Linux dessus. Soyez prudents quand
  le disque dur est partag avec DOS. Servez-vous des commandes cfdisk
  -Ps /dev/hdx et cfdisk -Pt /dev/hdx pour voir la table des partitions
  du disque /dev/hdx.






  77..  CCoonnvveerrssiioonn eett GGeessttiioonnnnaaiirreess ddee DDiissqquueess DDuurrss

  La gomtrie des disques durs (avec ttes, cylindres et pistes) est
  une notion qui date de l'ge de MFM et RLL. En ces temps l cela
  correspondait  une ralit physique. Aujourd'hui, avec l'IDE ou le
  SCSI, plus personne n'est intress par les `vritables' valeurs de la
  gomtrie d'un disque dur.  En effet, le nombre de secteurs par piste
  est variable -- il y en a plus pour les pistes proches du bord
  extrieur du disque -- donc il n'y a pas de `bon' nombre de secteurs
  par piste.  Pratiquement  l'oppos : la commande IDE, INITIALIZE
  DRIVE PARAMETERS (91h) est utilise pour renseigner le disque dur sur
  le nombre de ttes et de secteurs par piste qu'il est sens avoir  ce
  moment prcis.  Il est assez normal de voir un gros disque dur rcent
  qui n'a que 2 ttes, rapporter qu'il en a 15 ou 16 au BIOS, pendant
  que le BIOS peut  son tour dire au logiciel qui va s'en servir qu'il
  en a 255.

  Pour l'utilisateur, le mieux est de voir le disque dur comme un
  tableau linaire de secteurs numrots 0, 1, ..., et de laisser le
  micro-code trouver o, sur le disque dur, est situ tel ou tel
  secteur. Cette numrotation linaire est appele LBA.

  Donc,  prsent, la vision conceptuelle est la suivante : DOS, ou quel
  que soit le programme d'amorage, converse avec le BIOS en se servant
  de la notation (c,h,s). Le BIOS convertit (c,h,s) en notation LBA en
  utilisant la gomtrie factice dont l'utilisateur se sert. Si le
  disque dur accepte le LBA, alors cette valeur est utilise pour les
  Entres/Sorties sur le disque. Autrement, elle est  nouveau convertie
  en (c',h',s') en utilisant la gomtrie dont le disque se sert cette
  fois-l, et qui est utilise pour les Entres/Sorties.

  Remarquez qu'il y a une lgre confusion dans l'utilisation de
  l'expression `LBA' : en tant que terme dcrivant les possibilits d'un
  disque dur, cela signifie `Linear Block Adressing' -- Adressage de
  blocs de manire linaire -- (par opposition  un adressage CHS). En
  tant que terme de configuration du BIOS, il dcrit la mthode de
  conversion parfois appele `Assisted LBA' -- voir plus haut : ```La
  limite des 8,4 Go'''.

  Un comportement  peu prs identique apparat quand le micro-code ne
  parle pas le LBA, mais que le BIOS connat la conversion. (Dans la
  configuration il est souvent mentionn `Large'.) Donc, le BIOS va
  prsenter une gomtrie (C,H,S) au systme d'exploitation, et va
  utiliser (C',H',S') quand il parlera au contrleur du disque dur.
  Habituellement, S = S', C = C'/N et H = H'*N, o N est la plus petite
  puissance de deux qui garantisse C' <= 1024 (ainsi un minimum d'espace
  disque est perdu au moment de l'arrondi dans C' = C/N).  Encore une
  fois, cela permet un accs  8,4 Go maximum (7,8 Gio).

  (La troisime option de configuration est `Normal', pour laquelle
  aucune conversion n'est effectue.)

  Si un BIOS ne connat pas `Large' ou `LBA', alors il existe quelque
  part une solution logicielle. Les gestionnaires de disques durs comme
  OnTrack ou EZ-Drive remplacent les routines de gestion de disque du
  BIOS par les leurs.  Cela est souvent ralis en faisant rsider le
  code du gestionnaire de disque dans le MBR et les secteurs suivants
  (OnTrack nomme ce code DDO : Dynamic Drive Overlay - recouvrement
  dynamique de disque), comme a, il est charg avant n'importe quel
  autre systme d'exploitation. C'est pourquoi on peut avoir des
  problmes en dmarrant depuis une disquette quand un gestionnaire de
  disque dur a t install.

  Le rsultat est plus ou moins le mme avec un BIOS qui fait des
  conversions - mais particulirement, c'est quand on utilise plusieurs
  systmes d'exploitation sur le mme disque dur que ces gestionnaires
  peuvent poser beaucoup de problmes.

  Depuis sa version 1.3.14, Linux supporte le gestionnaire de disque dur
  OnTrack.  EZ-Drive quant  lui est support depuis la version 1.3.29.
  Quelques dtails supplmentaires sont donns dans ce qui suit.



  88..  CCoonnvveerrssiioonnss dduu nnooyyaauu ppoouurr lleess ddiissqquueess dduurrss IIDDEE

  Si le noyau de Linux dtecte la prsence d'un gestionnaire de disque
  sur un disque dur IDE, il va essayer de recartographier le disque de
  la mme manire que l'aurait fait le gestionnaire de disque, comme a
  Linux voit le mme partitionnement pour, par exemple, DOS avec OnTrack
  ou EZ-Drive.  Cependant, AUCUNE recartographie n'est effectue quand
  une gomtrie a t passe en ligne de commande -- donc une option de
  la ligne de commande comme `hd=_c_y_l_s,_t__t_e_s,_s_e_c_s' peut trs bien briser
  la compatibilit avec un gestionnaire de disque.

  Si vous tes touch par ce problme et que vous connassez quelqu'un
  qui peut compiler pour vous un nouveau noyau, trouvez le fichier
  linux/drivers/block/ide.c et supprimez, dans la routine
  ide_xlate_1024(), le test if (drive->forced_geom) { ...; return 0; }.

  La nouvelle cartographie est obtenue en essayant les valeurs 4, 8, 16,
  32, 64, 128, 255 pour le nombre de ttes (H*C reste constant) jusqu'
  ce que C <= 1024 ou que H = 255.

  Ci-dessous les dtails -- les titres des sous-sections sont les
  messages qui apparaissent dans les diffrents messages de dmarrage.
  Ici et partout ailleurs dans ce texte, les types des partitions sont
  donns en hexadcimal.



  88..11..  EEZZDD

  EZ-Drive est dtect par le fait que le type de la premire partition
  primaire est 55. La gomtrie est recartographie comme dcrit ci-
  dessus, et la table des partitions du secteur 0 est supprime --  la
  place, la table des partitions est celle lue sur le secteur 1. Le
  nombre de blocs du disque n'est pas chang, mais les critures sur le
  secteur 0 sont rediriges vers le secteur 1. Ce comportement peut tre
  modifi en recompilant le noyau avec  #define FAKE_FDISK_FOR_EZDRIVE
  0  dans ide.c.


  88..22..  DDMM66 :: DDDDOO

  OnTrack DiskManager (sur le premier disque dur) est dtect grce au
  type 54 de la premire partition primaire. La gomtrie est
  recartographie comme dcrit ci-dessus et la totalit du disque est
  dcale de 63 secteurs (comme a, l'ancien secteur 63 devient le
  numro 0). Ensuite un nouveau MBR (avec une table des partitions) est
  lu depuis le nouveau secteur 0. Bien sr ce dcalage a pour but de
  librer de la place pour le DD0 -- c'est pourquoi il n'y a pas de
  dcalage sur les autres disques durs.


  88..33..  DDMM66 :: AAUUXX

  OnTrack DiskManager (sur les autres disques durs) est dtect grce au
  type 51 ou 53 de la premire partition primaire. La gomtrie est
  recartographie comme dcrit ci-dessus.


  88..44..  DDMM66 :: MMBBRR

  Une version plus ancienne de OnTrack DiskManager n'est pas dtecte
  grce au type de partition, mais par signature. (Un test est effectu
  pour savoir si la valeur de dcalage trouve dans les octets 2 et 3 du
  MBR n'est pas suprieure  430, et si le short trouv  cette valeur
  de dcalage est gal  0x55AA et qu'il est suivi par un octet impair.)
  Une fois encore, la gomtrie est recartographie comme dcrit ci-
  dessus.


  88..55..  PPTTBBLL

  Finalement, il y a un test qui tente de dduire une conversion 
  partir des valeurs start et end de la partition primaire : si
  n'importe quelle partition a comme secteurs de dbut et de fin
  respectivement 1 et 63, et comme dernier numro de tte 31, 63, 127 ou
  254, alors,  partir du moment o il est habituel de terminer des
  partitions sur une limite de secteur, et qui plus est depuis que
  l'interface IDE utilise au plus 16 ttes, il est suppos qu'une
  conversion du BIOS est active, et la geomtrie est recartographie
  pour utiliser respectivement 32, 64, 128 ou 255 ttes.  Cependant, le
  disque n'est pas recartographi quand la vision actuelle de la
  gomtrie a dj 63 secteurs par piste et au moins autant de ttes
  (cela signifie sans doute qu'il a dj t recartographi).


  99..  CCoonnssqquueenncceess

  Qu'est-ce que tout cela signifie ? Pour les utilisateurs de Linux
  seulement une chose : qu'ils doivent s'assurer que LILO et fdisk
  utilisent la bonne gomtrie, o `bonne' pour fdisk est dfinie comme
  la gomtrie utilise par les autres systmes d'exploitation sur le
  mme disque dur, et pour LILO comme la gomtrie qui va permettre des
  changes valides avec le BIOS au moment du dmarrage. (En gnral les
  deux vont de pair.)

  Comment fdisk connat-il la gomtrie ?  Il demande au noyau en
  utilisant l'ioctl HDIO_GETGEO.  Mais l'utilisateur peut passer outre
  cela en prcisant la gomtrie de manire interactive, ou sur la ligne
  de commande.

  Comment LILO connat-il la gomtrie ?  Il demande au noyau en
  utilisant l'ioctl HDIO_GETGEO.  Mais l'utilisateur peut passer outre
  cela en utilisant l'option `disk=' dans le fichier /etc/lilo.conf
  (voyez la page de manuel lilo.conf(5)).  On peut galement passer
  l'option linear  LILO, il va alors stocker des adresses LBA  la
  place des CHS dans son fichier `map', et retrouvera la gomtrie 
  utiliser au moment du dmarrage (en utilisant la fonction 8 de INT13
  pour connatre la gomtrie du disque dur).

  Comment le noyau sait-il rpondre ?  Eh bien, en tout premier lieu,
  l'utilisateur doit avoir spcifi de manire explicite, soit  la main
  soit par l'intermdiaire du chargeur d'amorce, la gomtrie avec la
  commande en ligne du noyau `hda=_c_y_l_s,_t__t_e_s,_s_e_c_s' (voyez la page de
  manuel bootparam(7)).  Par exemple, vous pouvez demander  LILO de
  fournir une telle option en ajoutant une ligne `append =
  "hda=_c_y_l_s,_t__t_e_s,_s_e_c_s"' dans le fichier /etc/lilo.conf (voyez la page
  de manuel de lilo.conf(5)).  Sinon, le noyau devra deviner,
  probablement en se servant des valeurs obtenues  partir du BIOS ou du
  matriel lui-mme.

  Il est possible (depuis Linux 2.1.79) de changer l'ide qu'a le noyau
  de la gomtrie en utilisant le systme de fichiers /proc.  Par
  exemple :

  # sfdisk -g /dev/hdc
  /dev/hdc: 4441 cylinders, 255 heads, 63 sectors/track
  # cd /proc/ide/ide1/hdc
  # echo bios_cyl:17418 bios_head:128 bios_sect:32 > settings
  # sfdisk -g /dev/hdc
  /dev/hdc: 17418 cylinders, 128 heads, 32 sectors/track
  #





  99..11..  CCaallccuull ddeess ppaarraammttrreess ddee LLIILLOO

  Parfois il est utile de forcer une certaine gomtrie en ajoutant
  `hda=_c_y_l_s,_t__t_e_s,_s_e_c_s'  la ligne de commande du noyau. On voudra
  pratiquement toujours _s_e_c_s=63, et le but recherch en ajoutant cela
  est de spcifier _t__t_e_s. (Des valeurs raisonnables de nos jours sont
  _t__t_e_s=16 et _t__t_e_s=255.)  Que devra-t-on mettre pour _c_y_l_s ? Prcisment
  le nombre qui donnera la bonne capacit totale de C*H*S secteurs.  Par
  exemple, pour un disque dur avec 71346240 secteurs (36529274880
  octets) on calculera C comme tant 71346240/(255*63)=4441 (par exemple
  en utilisant le programme bc), et on donnera le paramtre de dmarrage
  hdc=4441,255,63.  Comment connat-on la capacit totale exacte ? Par
  exemple,


       # hdparm -g /dev/hdc | grep sectors
        geometry     = 4441/255/63, sectors = 71346240, start = 0
       # hdparm -i /dev/hdc | grep LBAsects
        CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=71346240




  donne deux manires de trouver le nombre total de secteurs 71346240.
  Le message du noyau


       # dmesg | grep hdc
       ...
       hdc: Maxtor 93652U8, 34837MB w/2048kB Cache, CHS=70780/16/63
        hdc: [PTBL] [4441/255/63] hdc1 hdc2 hdc3! hdc4 < hdc5 > ...




  nous donne (au moins) 34837*2048=71346176 et (au moins)
  70780*16*63=71346240 secteurs.  Dans ce cas c'est la seconde valeur
  qui apparat comme correcte, mais en gnral les deux peuvent tre
  arrondies  des valeurs infrieures.  C'est une bonne faon d'approx
  imer la taille du disque dur quand hdparm n'est pas disponible.  Ne
  donnez jamais une valeur trop grande  cyls !  Dans le cas de disques
  durs SCSI, le nombre prcis de secteurs est donn dans les messages de
  dmarrage du noyau :


       SCSI device sda: hdwr sector= 512 bytes. Sectors= 17755792 [8669 MB] [8.7 GB]




  (et Mo, Go sont arrondis, pas arrondis  la valeur infrieure, et
  `binaires').


  1100..  DDttaaiillss


  1100..11..  DDttaaiillss ddee ll''IIDDEE -- lleess sseepptt ggoommttrriieess

  Le gestionnaire IDE a cinq sources d'information concernant la
  gomtrie. La premire (G_user) est celle donne par l'utilisateur sur
  la ligne de commande.  La deuxime (G_bios) est la `BIOS Fixed Disk
  Parameter Table' -- table des paramtres de disque fixe du BIOS --
  (pour le premier et second disque dur seulement) qui est lue au
  dmarrage du systme, avant le passage au mode 32 bits. Les troisime
  (G_phys) et quatrime (G_log) sont donnes par le contrleur IDE en
  rponse  la commande IDENTIFY -- ce sont les gomtries `physique' et
  `logique du moment'.

  D'un autre ct, le gestionnaire a besoin de deux valeurs pour la
  gomtrie : d'abord G_fdisk, donne par un ioctl HDIO_GETGEO, et
  ensuite G_used, qui est effectivement utilise pour les
  Entres/Sorties. G_fdisk et G_used sont toutes deux initialises avec
  la valeur de G_user si elle est fournie, avec G_bios quand le CMOS dit
  que cette valeur est prsente, et avec G_phys autrement. Si G_log
  semble vraisemblable, alors G_used est positionne  cette valeur.
  Sinon, si G_used n'est pas vraisemblable et que G_phys semble l'tre,
  alors G_used prend la valeur de G_phys. Ici, `vraisemblable' signifie
  que le nombre de ttes est compris dans l'intervalle 1-16.

  En d'autres termes : la ligne de commande prend le pas sur le BIOS et
  va dterminer ce que va voir fdisk, mais si elle donne une gomtrie
  convertie (avec plus de 16 ttes), alors pour les Entres/Sorties
  qu'effectuera le noyau elle sera elle-mme remplace par les valeurs
  que fournira la commande IDENTIFY.

  Remarquez que G_bios est assez peu fiable : pour des systmes qui
  dmarrent depuis un priphrique SCSI, les premier et second disques
  durs peuvent trs bien tre SCSI ; et la gomtrie que le BIOS aura
  donn pour sda sera utilise par le noyau pour hda.  Du reste, les
  disques durs qui ne sont pas dclars dans la configuration du BIOS ne
  sont pas vus par ce dernier. Cela signifie que, par exemple, dans un
  systme uniquement IDE o hdb n'est pas dclar dans la configuration,
  les gomtries rapportes par le BIOS pour les premier et second
  disques vont tre appliques  hda et hdc.


  1100..22..  DDttaaiillss ppoouurr llee SSCCSSII

  La situation pour le SCSI est lgrement diffrente, puisque les
  commandes SCSI utilisent dj les numros de blocks logiques, donc une
  `gomtrie' est compltement hors de propos pour les vritables
  Entres/Sorties.  Cependant, le format de la table des partitions est
  toujours le mme, donc fdisk ne fait pas la diffrence entre des
  disques IDE et SCSI.  Comme on peut le voir  partir de la description
  dtaille ci-dessus, chaque gestionnaire de disques s'invente une
  gomtrie diffrente. Un gros foutoir en fait.

  Si vous n'utilisez pas DOS ou un quivalent, alors vitez toute
  configuration qui met en jeu des conversions tendues, et utilisez
  simplement 64 ttes, 32 secteurs par piste (cela a pour effet de
  donner une valeur tout  fait sympathique et commode de 1 Mio par
  cylindre), si possible, comme a il n'y aura pas de problme quand
  vous dplacerez le disque dur d'un contrleur  un autre. Certains
  gestionnaires de disque SCSI (aha152x, pas16, ppa, qlogicfas,
  qlogicisp) sont si sensibles au sujet de la compatibilit avec le DOS
  qu'ils ne permettront pas  un systme uniquement Linux d'utiliser
  plus de 8 Gio. C'est un bug.


  Quelle est la vraie gomtrie ?  La rponse la plus facile est qu'elle
  n'existe pas.  Et si elle existait, vous ne voudriez pas la connatre,
  et  coup sr JAMAIS, AU GRAND JAMAIS ne devrez en dire quoi que ce
  soit  fdisk ou  LILO ou au noyau.  C'est uniquement une histoire
  entre le contrleur SCSI et le disque dur.  Laissez-moi le redire :
  seules les personnes stupides donnent  fdisk,  LILO ou au noyau la
  vritable gomtrie d'un disque SCSI.

  Mais si vous tes curieux et que vous insistez, vous devez demander au
  disque dur lui-mme. Il y a l'importante commande READ CAPACITY qui
  donnera la capacit complte du disque dur, et il y a la commande MODE
  SENSE, qui, dans la Rigid Disk Drive Geometry Page (page 04) donne le
  nombre de cylindres et de ttes (c'est une donne qui ne peut pas tre
  change), et dans la Format Page (page 03) donne le nombre d'octets
  par secteur, et de secteurs par piste. Ce dernier nombre est
  typiquement dpendant du rang, et le nombre de secteurs par piste
  varie -- les pistes extrieures ont plus de secteurs que les pistes
  intrieures. Le programme Linux scsiinfo donnera cette information. Il
  y a de nombreux dtails et complications, et il est clair que personne
  (probablement mme pas le systme d'exploitation) ne dsire utiliser
  cette information. Du reste, tant que nous ne nous intressons qu'
  fdisk et  LILO, on a typiquement des rponses du style
  C/H/S=4476/27/171 -- valeurs qui ne peuvent pas tre utilises par
  fdisk parce que la table des partitions ne rserve que 10,8 et 6 bits
  pour respectivement C/H/S.

  Mais alors, d'o le HDIO_GETGEO du noyau tire-t-il ses informations ?
  Eh bien, soit du contrleur SCSI, soit en faisant une supposition
  claire.  Certains gestionnaires de disque semblent croire que nous
  voulons connatre la `ralit', mais bien sr nous ne voulons savoir
  que ce que FDISK de DOS ou de OS/2 (ou AFDISK de Adaptec, etc.)
  utiliseront.

  Remarquez que le fdisk de linux a besoin des nombres H et S de ttes
  et de secteurs par piste pour convertir les nombres de secteurs LBA en
  adresses c/h/s, mais le nombre de cylindres C ne joue aucun rle.
  Quelques gestionnaires de disque utilisent (C,H,S) = (1023,255,63)
  pour signaler que la capacit du disque dur est d'au moins 1023*255*63
  secteurs. Ce n'est pas de chance, puisqu'ils ne rvlent pas la vraie
  taille, et limiteront les utilisateurs de la plupart des versions de
  fdisk  n'avoir accs qu' environ 8 Gio de leur disque - une srieuse
  limitation de nos jours.

  Dans le texte ci-dessous, M reprsente la capacit totale du disque
  dur, et C, H, S, le nombres de cylindres, de ttes et de secteurs par
  piste.  Il suffit de donner H, S si l'on voit C comme tant dfini par
  M / (H*S).

  Par dfaut, H=64 et S=32.


     aahhaa11774400,, ddttcc,, gg__NNCCRR55338800,, tt112288,, wwdd77000000 ::
        H=64, S=32.


     aahhaa115522xx,, ppaass1166,, ppppaa,, qqllooggiiccffaass,, qqllooggiicciisspp ::
        H=64, S=32  moins que C ne soit suprieur  1024, auquel cas
        H=255, S=63, C = min(1023, M/(H*S)).  (Ainsi C est tronqu, et
        H*S*C n'est pas une approximation de la capacit M du disque
        dur. Cela va drouter la plupart des versions de fdisk.) Le code
        de ppa.c utilise M+1  la place de M et dit qu' cause d'un bug
        dans sd.c, M est plus petit de 1.


     aaddvvaannssyyss ::
        H=64 et S=32  moins que C ne soit suprieur  1024 ou que,
        encore mieux, l'option du BIOS `> 1 GB' ait t active, auquel
        cas H=255 et S=63.


     aahhaa11554422 ::
        Demande au contrleur lequel des deux schmas de conversion est
        utilis, et se sert soit de H=255, S=63, soit de H=64, S=32.
        Dans le dernier cas, il y a un message au dmarrage qui dit
        "aha1542.c: Using extended bios translation" ("aha1542.c:
        Utilisation du mode de conversion tendu du bios")


     aaiicc77xxxxxx ::
        H=64 et S=32  moins que C ne soit suprieur  1024 ou que,
        mieux encore, le paramtre de dmarrage "extended" ait t
        pass, ou que le bit `extended' ait t positionn dans la
        SEEPROM ou dans le BIOS, auquel cas H=255, S=63.  Dans Linux
        2.0.36 ce mode de conversion tendu devrait toujours tre
        automatiquement utilis si il n'y a pas de SEEPROM, mais dans
        Linux 2.2.6, si le mme cas se prsente, le mode de conversion
        tendu est utilis seulement si l'utilisateur le demande au
        travers du paramtre de dmarrage (de ce fait, quand une SEEPROM
        est trouve, le paramtre de dmarrage est ignor).  Cela
        signifie qu'une configuration qui fonctionne en 2.0.36 peut ne
        pas dmarrer avec un noyau 2.2.6 (LILO ncessite alors le mot-
        cl `linear', ou le noyau a besoin du paramtre
        `aic7xxx=extended' au dmarrage).


     bbuussllooggiicc ::
        H=64 et S=32  moins que C ne soit suprieur  1024, ou que,
        encore mieux, le mode de conversion tendu ait t autoris au
        niveau du contrleur, auquel cas si M < 2^22 alors H=128, S=32 ;
        sinon H=255, S=63. Cependant, aprs avoir fait ce choix pour
        (C,H,S), la table des partitions est lue, et si pour l'une des
        trois possibilits (H,S) = (64,32), (128,32), (255,63) la valeur
        endH=H-1 est vue quelque part, alors cette paire est utilise,
        et le message "Adopting Geometry from Partition Table"
        ("Adoption de la gomtrie lue dans la table des partitions")
        est affich au dmarrage.


     ffddoommaaiinn ::
        Il trouve l'information sur la gomtrie dans la Table des
        Paramtres des Disques du BIOS (BIOS Drive Parameter Table), ou
        lit la table des partitions et utilise H=endH+1, S=endS pour la
        premire partition,  condition qu'elle ne soit pas vide, ou
        utilise H=64, S=32 pour M < 2^21 (1 Gio), H=128, S=63 pout M <
        63*2^17 (3.9 Gio) et H=255, S=63 dans les autres cas.


     iinn22000000 ::
        Il utilise le premier couple (H,S) = (64,32), (64,63), (128,63),
        (255,63) qui rendra C < 1024. Dans le dernier cas, C est ramen
         la valeur 1023.


     sseeaaggaattee ::
        Il lit C,H,S depuis le disque dur. (Horreur !) Si C ou S sont
        trop grands, alors il fixe S=17, H=2 et double la valeur de H
        tant que C <= 1024. Cela signifie que H sera mis  0 si M >
        128*1024*17 (1.1 Gio). C'est un bug.


     uullttrraassttoorr eett uu1144__3344ff ::
        Un de ces trois couples de rfrence est utilis ((H,S) =
        (16,63), (64,32), (64,63)) en fonction du mode de cartographie
        du contrleur.


  Si le gestionnaire ne prcise pas la gomtrie, nous retombons dans un
  mode de supposition guid par la table des partitions, ou par la
  capacit totale du disque dur.

  Regardez la table des partitions. Puisque par convention les
  partitions se terminent  la limite d'un cylindre, nous pouvons, tant
  donn que end = (endC,endH,endS) pour n'importe quelle partition,
  simplement fixer H = endH+1 et  S = endS. (Il est rappel que le
  dcompte des secteurs commence  1.)  Plus prcisment, voil ce qui
  est fait : s'il existe une partition non vide, prendre la partition
  avec le plus grand begin. Pour cette partition, regarder endH+1,
  calcul  la fois en additionnant start et length, et en supposant le
  fait que cette partition se termine  la limite d'un cylindre. Si les
  deux valeurs concordent, ou si endC = 1023 et start+length est un
  multiple entier de (endH+1)*endS, alors accepter le fait que cette
  partition se termine effectivement sur la frontire d'un cylindre, et
  fixer H = endH+1 et S = endS.  Si cela choue, soit parce qu'il n'y a
  pas de partition, soit parce qu'elles ont des tailles bizarres, il
  faut uniquement se fier  la capacit totale M du disque dur.
  Algorithme : fixer H = M/(62*1024) (arrondi au chiffre suprieur), S =
  M/(1024*H) (arrondi au chiffre suprieur), C = M/(H*S) (arrondi au
  chiffre infrieur).  Cela a pour effet de gnrer un triplet (C,H,S)
  avec C gal  1024 au plus, et S gal  62 au plus.


  1111..  LLiimmiittee ddee LLiinnuuxx ppoouurr ll''IIDDEE  88 GGiioo

  Le gestionnaire IDE de Linux obtient la gomtrie et la capacit d'un
  disque (et beaucoup d'autres choses) en utilisant une requette ATA
  IDENTIFY. Rcemment encore le gestionnaire ne croyait pas en la valeur
  retourne pour lba_capacity si elle tait plus de 10% suprieure  la
  capacit calcule par C*H*S.  Cependant, par suite d'un accord entre
  les industriels, les disques IDE de grande capacit donnent les
  valeurs C=16383, H=16 et S=63, pour un total de 16514064 secteurs
  (7.8 Go) indpendamment de leur taille relle, mais donnent cette
  taille relle dans lba_capacity.

  Les noyaux rcents de Linux (2.0.34, 2.1.90) savent cela et agissent
  en consquence. Si vous avez un noyau Linux plus ancien et que vous ne
  voulez pas passer  une version plus rcente, et que cedit noyau ne
  voit que 8 Gio d'un bien plus gros disque dur, alors essayez de
  remplacer la routine lba_capacity_is_ok dans
  /usr/src/linux/drivers/block/ide.c par quelque chose du genre


       static int lba_capacity_is_ok (struct hd_driveid *id) {
               id->cyls = id->lba_capacity / (id->heads * id->sectors);
               return 1;
       }




  Pour une modification plus sre, voyez le noyau 2.1.90.


  1111..11..  CCoommpplliiccaattiioonnss dduu BBIIOOSS

  Comme nous venons de le dire, les gros disques durs donnent la
  gomtrie C=16383, H=16, S=63 indpendamment de leur vraie taille,
  alors que cette dernire est visible par la valeur de LBAcapacity.
  Certains BIOS ne savent pas cela, et convertissent ce 16383/16/63 en
  quelque chose qui a moins de cylindres et plus de ttes, par exemple
  1024/255/63 ou 1027/255/63. Donc, le noyau ne doit pas seulement
  reconnatre la gomtrie particulire 16383/16/63, mais galement
  toutes ses versions mutiles par le BIOS.  Depuis le noyau 2.2.2 cela
  est fait correctement (en prenant la vision du BIOS de H et S, et en
  calculant C = capacit/(H*S)).  En gnral, ce problme est rsolu en
  mettant le disque en mode Normal dans la configuration du BIOS (ou,
  encore mieux,  None, ne le dclarant pas du tout au BIOS). Si cela
  est impossible parce que vous devez dmarrer  partir de ce disque
  dur, ou l'utiliser avec DOS/Windows, et que vous n'envisagez pas un
  passage au noyau 2.2.2 ou mieux, utilisez les paramtres de dmarrage
  du noyau.

  Si un BIOS rapporte 16320/16/63, c'est en gnral pour pouvoir aboutir
   1024/255/63 aprs conversion.

  Il y a ici, un autre problme.  Si le disque dur a t partitionn en
  utilisant une conversion de gomtrie, alors le noyau peut, au moment
  du dmarrage, voir cette gomtrie qui est utilise dans la table des
  partitions, et rapporter hda: [PTBL] [1027/255/63].  Ce n'est pas bon
  parce que maintenant le disque dur n'est que de 8,4 Go.  Cela a t
  corrig dans le noyau 2.3.21.  Encore un fois, les paramtres de
  dmarrage du noyau seront utiles.


  1111..22..  DDeess ccaavvaalliieerrss ppoouurr sslleeccttiioonnnneerr llee nnoommbbrree ddee tttteess

  Beaucoup de disques durs ont des cavaliers qui vous permettent de
  choisir entre des gomtries  15 ou  16 ttes. Le rglage par dfaut
  vous donnera une gomtrie  16 ttes. Parfois, les deux gomtries
  adressent le mme nombre de secteurs, parfois la version  15 ttes
  est plus petite.  Vous devez avoir une bonne raison pour changer cette
  valeur : Petri Kaukasoina a crit : `Un disque dur IBM Deskstar 16 GP
  de 10.1 Go (modle IBM-DTTA-351010) avait ses cavaliers positionns
  pour prsenter 16 ttes par dfaut mais ce vieux PC (avec un AMI BIOS)
  ne dmarrait pas et j'ai eu  modifier les cavaliers pour le faire
  passer en 15 ttes. hdparm -i donne RawCHS=16383/15/63 et
  LBAsects=19807200. J'utilise 20960/15/63 pour avoir la capacit
  totale.'  La gomtrie 16383/15/63 n'est pas encore reconnue par le
  noyau, donc il est ncessaire de donner explicitement ces paramtres
  au dmarrage.  La gomtrie 16383/15/63 n'est pas encore reconnue par
  le noyau, donc des paramtres de dmarrage explicites sont ici
  ncessaires.  Pour le positionnement des cavaliers voyez
  http://www.storage.ibm.com/techsup/hddtech/hddtech.htm
  <http://www.storage.ibm.com/techsup/hddtech/hddtech.htm>.


  1111..33..  DDeess ccaavvaalliieerrss ppoouurr lliimmiitteerr llaa ccaappaacciitt ttoottaallee

  De nombreux disques durs ont des cavaliers qui vous permettent de
  faire apparatre leur taille infrieure  leur valeur relle.  C'est
  une btise que de le faire, et probablement aucun utilisateur de Linux
  ne voudra utiliser cette fonctionnalit, mais certains BIOS plantent
  avec de gros disques. En gnral la solution consiste  conserver le
  disque entirement en dehors du contrle du BIOS. Cela n'est faisable
  que si ce disque dur n'est pas votre disque de dmarrage.


  La premiere limite srieuse fut celle des 4096 cylindres (soit, avec
  16 ttes et 63 secteurs par piste, 2,11 Go).  Par exemple un disque
  dur Fujitsu MPB3032ATU de 3,24 Go a une gomtrie par dfaut de
  6704/15/63, mais ses cavaliers peuvent tre positionns pour qu'elle
  apparaisse comme tant 4092/16/63. Le disque rapportera une capacit
  LBA de 4124736 secteurs, et de ce fait le systme d'exploitation ne
  pourra pas deviner qu'il est en ralit plus grand.  Dans un tel cas
  (avec un BIOS qui plante s'il sait que le disque dur est en ralit si
  grand, et donc avec lequel les cavaliers sont ncessaires) on aura
  besoin de paramtres de dmarrage pour donner  Linux la taille du
  disque.

  C'est pas de chance. La plupart des disques durs ont des cavaliers qui
  peuvent tre positionns pour qu'ils apparaissent comme tant des 2 Go
  et pour qu'ils rapportent une gomtrie tronque comme 4092/16/63 ou
  4096/16/63, mais qui leur permettent toujours de rapporter une
  capacit LBA complte. De tels disques durs fonctionneront bien, et
  utiliseront l'intgralit de leur capacit sous Linux, que les
  cavaliers aient t positionns ou pas.


  Une limite plus rcente est celle des ``33,8 Go''.  Les noyaux Linux
  plus anciens que le 2.3.21 ncessitent l'application d'un patch pour
  tre capable de s'en sortir avec des disques durs IDE d'une taille
  plus importante que celle-l.  Certains disques durs plus gros que a
  ont des cavaliers qui peuvent les faire apparatre comme ayant une
  capacit de 33,8 Go.  Par exemple, l'IBM Deskstar 37,5 Go
  (DPTA-353750) avec 73261440 secteurs (ce qui correspond  72680/16/63,
  ou  4560/255/63) a un cavalier qui peut tre positionn de telle
  manire que le disque dur apparat avec une taille de 33,8 Go, et donc
  rapporte une gomtrie de 16383/16/63 comme n'importe quel gros disque
  dur, mais avec une capacit LBA de 66055248 (correspondant 
  65531/16/63, ou  4111/255/63).  Malheureusement le cavalier semble
  tre trop efficace -- il ne se contente pas d'influencer ce que le
  disque rapporte au systme, mais il modifie galement les
  entres/sorties : Pert Soucek explique que pour ce disque en
  particulier, les paramtres de dmarrage ne sont pas utiles -- avec le
  cavalier positionn, tout accs aux secteurs 66055248 et suprieurs se
  solde par une erreur d'entre/sortie.  Donc, sur une carte-mre avec
  un BIOS Award 4.51PG on ne peut pas  la fois utiliser ce disque comme
  disque de dmarrage et  pleine capacit.

  Vous pouvez galement regarder la page sur la limite de 33,8 Go du
  BIOS <http://www.storage.ibm.com/techsup/hddtech/bios338gb.htm>.



  1122..  LLiimmiittee ddee LLiinnuuxx  6655553355 ccyylliinnddrreess

  L'ioctl HDIO_GETGEO retourne le nombre de cylindres dans un short.
  Cela signifie que si vous avez plus de 65535 cylindres, le nombre est
  tronqu, et (pour une configuration SCSI typique avec 1 Mio de
  cylindres) un disque de 80 Gio peut apparatre comme ne faisant que
  16 Gio. Une fois que le problme a t dtect, il est facile de
  l'viter.


  1122..11..  PPrroobbllmmeess ddee ll''IIDDEE aavveecc ddeess ddiissqquueess dduurrss ddee 3344 GGoo eett pplluuss

  Des units d'une taille suprieure  33,8 Go ne fonctionneront pas
  avec les noyaux antrieurs au 2.3.21. Les dtails sont les suivants.
  Supposez que vous ayez achet un tout nouveau disque dur IBM-
  DPTA-373420 qui offre une capacit de 66835440 secteurs (34,2 Go). Les
  noyaux plus anciens que le 2.3.21 vous diront que la taille est de
  769*16*63 = 775152 secteurs (0,4 Go), ce qui est quelque peu tonnant.
  Et le fait de donner les paramtres hdc=4160,255,63 au dmarrage
  n'aide en rien -- ils sont tout simplement ignors.  Que se
  passe-t-il ? La routine idedisk_setup() retrouve la gomtrie
  rapporte par le disque dur (qui est 16383/16/63) et crase ce que
  l'utilisateur avait demand sur la ligne de commande, de telle manire
  que les donnes de l'utilisateur ne sont utilises que pour la
  gomtrie du BIOS. La routine current_capacity() ou idedisk_capacity()
  recalcule le nombre de cylindres comme tant 66835440/(16*63)=66305
  mais comme il est stock dans un short, il devient 769. Comme
  lba_capacity_is_ok() a dtruit id->cyls, tous les appels se solderont
  par un chec, et la capacit du disque deviendra 769*16*63.  Un patch
  est disponible pour de nombreux noyaux.  Un patch pour le 2.0.38 peut
  tre trouv  ftp.kernel.org
  <ftp://ftp.us.kernel.org/pub/linux/kernel/people/aeb/>.  Un patch pour
  le 2.2.12 peut tre trouv  www.uwsg.indiana.edu
  <http://www.uwsg.indiana.edu/hypermail/linux/kernel/9910.2/0636.html>
  (il se peut qu'il faille le modifier un peu pour se dbarasser des
  tags html).  Les noyaux 2.2.14 supportent ces disques durs.  Dans la
  srie 2.3.* des noyaux, le support pour ces disques existe depuis le
  2.3.21.  Il est galement possible de rsoudre ce problme avec une
  mthode matrielle en ``positionnant des cavaliers'' pour limiter la
  taille  33,8 Go.  Dans la plupart des cas, une ``mise  jour du
  BIOS'' sera ncessaire pour pouvoir dmarrer depuis ce disque dur.


  1133..  PPaarrttiittiioonnss tteenndduueess eett ppaarrttiittiioonnss llooggiiqquueess

  ``Ci-dessus'', nous avons vu la structure du MBR (secteur 0) : code du
  programme d'amorage suivi par 4 entres de la table des partitions de
  16 octets chacune, suivies par une signature AA55. Les entres de la
  table des partitions de type 5 ou F ou 85 (en hexadcimal) ont une
  signification particulire : elles dcrivent les partitions __t_e_n_d_u_e_s :
  espaces qui seront ultrieurement fractionns en partitions _l_o_g_i_q_u_e_s.
  (Donc, une partition tendue n'est qu'une bote, et ne peut pas tre
  utilise par elle-mme ; on utilise alors les partitions logiques
  qu'elle contient.)  Ce n'est que la position du premier secteur de la
  partition tendue qui est important. Ce premier secteur contient une
  table des partitions avec quatre entres : une est une partition
  logique, une est une partition tendue et deux sont inutilises. De
  cette manire, on obtient une chane de secteurs de table des
  partitions, disperss sur le disque dur, o le premier dcrit trois
  partitions primaires et la partition tendue, et chaque secteur de
  table des partitions qui suit dcrit une partition logique et la
  position du prochain secteur de table des partitions.

  Il est important de comprendre cela : quand les gens font des btises
  en partitionnant leur disque, ils veulent savoir : `est-ce que mes
  donnes sont toujours l ?' Et la rponse est gnralement : `oui'.
  Mais si des partitions logiques ont t cres, alors les secteurs de
  table des partitions les dcrivant sont crits au dbut des ces
  partitions logiques, et les donnes qui taient initialement  ces
  emplacements sont perdues.

  Le programme sfdisk montre la chane complte. Par exemple,





















  # sfdisk -l -x /dev/hda

  Disk /dev/hda: 16 heads, 63 sectors, 33483 cylinders
  Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

     Device Boot Start     End   #cyls   #blocks   Id  System
  /dev/hda1          0+    101     102-    51376+  83  Linux
  /dev/hda2        102    2133    2032   1024128   83  Linux
  /dev/hda3       2134   33482   31349  15799896    5  Extended
  /dev/hda4          0       -       0         0    0  Empty

  /dev/hda5       2134+   6197    4064-  2048224+  83  Linux
      -           6198   10261    4064   2048256    5  Extended
      -           2134    2133       0         0    0  Empty
      -           2134    2133       0         0    0  Empty

  /dev/hda6       6198+  10261    4064-  2048224+  83  Linux
      -          10262   16357    6096   3072384    5  Extended
      -           6198    6197       0         0    0  Empty
      -           6198    6197       0         0    0  Empty
  ...
  /dev/hda10     30581+  33482    2902-  1462576+  83  Linux
      -          30581   30580       0         0    0  Empty
      -          30581   30580       0         0    0  Empty
      -          30581   30580       0         0    0  Empty

  #




  Il est possible de construire une mauvaise table des partitions.
  Beaucoup de noyaux entrent dans une boucle s'il y a des partitions
  tendues qui pointent sur elles-mmes ou sur une partition place
  avant dans la chane. Il est possible d'avoir deux partitions tendues
  dans un de ces secteurs de table des partitions, de sorte que la
  chane de la table de partitions se divise. (Cela peut arriver par
  exemple avec un fdisk qui ne reconnat pas les partitions types 5, F
  ou 85 comme tendues, et qui cre une 5  la suite d'une F.) Des
  programmes de type fdisk non standards peuvent provoquer de telles
  situations, et quelques manipulations sont ncessaires pour les
  rparer.  Le noyau de Linux acceptera une division au niveau le plus
  extrieur. Ainsi, vous pouvez avoir deux chanes de partitions
  logiques. C'est parfois utile -- par exemple, on peut utiliser pour
  l'une le type 5 afin qu'elle soit vue par DOS, et pour l'autre le type
  85, invisible pour DOS, ainsi DOS FDISK ne plantera pas  cause d'une
  partition logique au-del du cylindre 1024.  En gnral il faut sfdisk
  pour crer une telle configuration.


  1144..  RRssoolluuttiioonn ddeess pprroobbllmmeess

  Beaucoup de personnes pensent qu'elles ont des problmes, alors qu'en
  ralit rien ne cloche. Elles peuvent galement penser que leurs
  problmes sont dus  la gomtrie du disque, alors que cela n'a rien 
  voir. Tout ce que nous avons vu ci-dessus peut vous avoir paru
  compliqu, mais matriser le domaine de la gomtrie des disques durs
  est trs facile : ne faites rien du tout, et tout ira bien ; ou
  peut-tre faudra-t-il donner  LILO le mot-cl `linear' s'il ne
  dpasse pas le stade LI au dmarrage. Regardez bien les messages de
  dmarrage du noyau, et souvenez-vous que plus vous tripoterez les
  gomtries (en spcifiant le nombre de ttes et de cylindres  LILO et
   fdisk, et en les passant comme argument au noyau), moins cela aura
  de chances de fonctionner.  En gros, les valeurs par dfaut sont les
  bonnes.

  Et souvenez-vous : la gomtrie des disques durs n'est utilise nulle
  part dans Linux, donc les problmes que vous pouvez avoir en vous
  servant de Linux ne sont pas dus  a. En fait, la gomtrie des
  disques durs n'est utilise que par LILO et par fdisk. Donc, si LILO
  ne parvient pas  charger le noyau, ce peut tre un problme de
  gomtrie. Si d'autres systmes d'exploitation ne comprennent pas la
  table des partitions, ce peut tre un problme de gomtrie. Rien
  d'autre. En particulier, si mount ne semble pas vouloir fonctionner,
  ne vous posez jamais de question sur la gomtrie -- le problme est
  ailleurs.


  1144..11..  PPrroobbllmmee :: LLaa ggoommttrriiee ddee mmoonn ddiissqquuee dduurr IIDDEE eesstt ffaauussssee qquuaanndd
  jjee ddmmaarrrree ddeeppuuiiss dduu SSCCSSII..

  Il est assez possible qu'un disque dur obtienne une mauvaise
  gomtrie. Le noyau de Linux questionne le BIOS au sujet de hd0 et hd1
  (les disques du BIOS numrots 80H et 81H) et suppose que ces donnes
  sont pour hda et hdb.  Mais, sur un systme qui dmarre depuis du
  SCSI, les deux premiers disques peuvent trs bien tre des disques
  durs SCSI, et de ce fait il peut arriver que le cinquime disque, qui
  est hda, c'est--dire le premier disque IDE, se voie assigner une
  gomtrie appartenant  sda. Cela est facilement rsolu en donnant, au
  dmarrage ou dans le fichier /etc/lilo.conf, les paramtres pour hda
  `hda=C,H,S' avec les valeurs appropries pour C, H et S.



  1144..22..  FFaauuxx pprroobbllmmee :: ddeess ddiissqquueess iiddeennttiiqquueess oonntt ddeess ggoommttrriieess
  ddiiffffrreenntteess ??

  `Je possde deux disques durs IBM identiques de 10 Go. Cependant,
  fdisk donne des tailles diffrentes pour les deux. Voyez :


       # fdisk -l /dev/hdb
       Disk /dev/hdb: 255 heads, 63 sectors, 1232 cylinders
       Units = cylinders of 16065 * 512 bytes

          Device Boot  Start      End   Blocks   Id  System
       /dev/hdb1           1     1232  9896008+  83  Linux native
       # fdisk -l /dev/hdd
       Disk /dev/hdd: 16 heads, 63 sectors, 19650 cylinders
       Units = cylinders of 1008 * 512 bytes

          Device Boot  Start      End   Blocks   Id  System
       /dev/hdd1           1    19650  9903568+  83  Linux native




  Comment cela est-il possible ?

  Que se passe-t-il ici ? Eh bien, avant tout ces disques sont
  rellement de 10 Giga : hdb a comme taille 255*63*1232*512 =
  10133544960, et hdd a pour taille 16*63*19650*512 = 10141286400, donc
  tout va bien, et le noyau voit les deux comme des 10 Go.  Pourquoi y
  a-t-il cette diffrence de taille ? C'est parce que le noyau obtient
  ses donnes du BIOS pour les deux premiers disques IDE, et le BIOS a
  recartographi hdb pour qu'il ait 255 ttes (et 16*19650/255=1232
  cylindres). L'arondi infrieur cote ici au moins 8 Mo.

  Si vous voulez recartographier hdd de la mme manire, donnez au noyau
  l'option de dmarrage `hdd=1232,255,63'.


  1144..33..  FFaauuxx pprroobbllmmee :: ffddiisskk  vvooiitt bbeeaauuccoouupp pplluuss dd''eessppaaccee qquuee ddff ??

  fdisk vous donnera le nombre de blocs qu'il y a sur le disque dur. Si
  vous avez cr un systme de fichiers sur le disque, disons avec
  mke2fs, alors ce systme de fichiers a besoin d'un peu de place pour
  sa comptabilit -- typiquement quelque chose comme 4% de la taille du
  systme de fichier, un peu plus si vous demandez beaucoup d'inodes 
  mke2fs. Par exemple :


       # sfdisk -s /dev/hda9
       4095976
       # mke2fs -i 1024 /dev/hda9
       mke2fs 1.12, 9-Jul-98 for EXT2 FS 0.5b, 95/08/09
       ...
       204798 blocks (5.00%) reserved for the super user
       ...
       # mount /dev/hda9 /quelque/part
       # df /quelque/part
       Filesystem         1024-blocks  Used Available Capacity Mounted on
       /dev/hda9            3574475      13  3369664      0%   /mnt
       # df -i /quelque/part
       Filesystem           Inodes   IUsed   IFree  %IUsed Mounted on
       /dev/hda9            4096000      11 4095989     0%  /mnt
       #




  Nous avons une partition de 4095976 blocs, crez sur cette dernire un
  systme de fichiers ext2, montez-la quelque part, et remarquez qu'elle
  n'a que 3574475 blocs -- 521501 blocs (12%) ont t perdus en inodes
  et autres pour de la comptabilit. Remarquez que la diffrence entre
  le total de 3574475 blocs et les 3369664 disponibles pour l'utilisa
  teur est gale aux 13 blocs utiliss plus les 204798 blocs rservs 
  root. Cette dernire valeur peut tre change  l'aide de tune2fs. Ce
  `-i 1024' n'est raisonnable que dans le cadre d'un spoule de forums
  d'utilisateurs ou quelque chose du mme style, avec normment de
  petits fichiers. Par dfaut on mettrait :


       # mke2fs /dev/hda9
       # mount /dev/hda9 /quelque/part
       # df /quelque/part
       Filesystem         1024-blocks  Used Available Capacity Mounted on
       /dev/hda9            3958475      13  3753664      0%   /mnt
       # df -i /quelque/part
       Filesystem           Inodes   IUsed   IFree  %IUsed Mounted on
       /dev/hda9            1024000      11 1023989     0%  /mnt
       #




  A prsent, seulement 137501 blocs (3,3%) sont utiliss pour les
  inodes, comme cela, nous disposons de 384 Mo de plus qu'avant.
  (Apparemment, chaque inode occupe 128 octets.) D'un autre ct, ce
  systme de fichiers peut avoir au plus 1024000 fichiers (plus
  qu'assez), contre 4096000 (trop) auparavant.







  LinuxDoc+Emacs+Ispell-HOWTO
  Auteur : Philippe MARTIN (feloy@wanadoo.fr)

  v0.5, 28 Avril 1998

  Ce  document s'adresse aux traducteurs et redacteurs de HOWTO Linux ou
  de toute autre documentation du  Projet  de  Documentation  Linux.  Il
  donne  a  ces  derniers  des trucs et astuces pour l'utilisation entre
  autre d'Emacs et d'Ispell.

  11..

  PPrreeaammbbuullee

  11..11..

  CCooppyyrriigghhtt

  Copyright Philippe Martin 1998
  Vous  pouvez  redistribuer  et/ou  modifier  ce  document  selon   les
  conditions  de la GNU General Public Licence, version 2 ou ulterieure.

  11..22..

  RReemmeerrcciieemmeennttss

  Je remercie tout particulierement Sebastien Blondeel pour m'avoir pose
  tant  de  questions  si  pertinentes  sur  la  configuration  d'Emacs,
  questions qui m'ont permises de concretiser mes connaissances  sur  le
  sujet et de vous en faire part.

  11..33..

  RReemmaarrqquueess

  N'hesitez pas a me faire parvenir toute remarque et/ou critique sur ce
  document, je  les  examinerai  afin  de  faire  evoluer  au  mieux  ce
  document.
  N'hesitez  pas  non  plus  a me poser des questions relatives au sujet
  traite dans cet HOWTO, j'y repondrai avec un interet tout particulier.

  11..44..

  VVeerrssiioonnss

  Ce document traite des versions suivantes :

  +o  Sgml-tools version 0.99,

  +o  Emacs version 19.34,

  +o  Ispell version 3.1,

  +o  Toutes  les  bibliotheques  Emacs auxquelles je fais reference sont
     celles distribuees avec la version d'Emacs precitee, sauf  iso-sgml
     distribuee avec XEmacs et psgml distribuee seule.

  22..

  IInnttrroodduuccttiioonn

  22..11..

  LLee llaannggaaggee SSGGMMLL

  Le  langage SSGGMMLL (_S_t_a_n_d_a_r_d _G_e_n_e_r_a_l_i_z_e_d _M_a_r_k_u_p _L_a_n_g_u_a_g_e) est un langage
  qui permet de definir des types de documents.

  On peut par exemple definir grace a lui un type de document _r_e_c_e_t_t_e _d_e
  _c_u_i_s_i_n_e, qui precisera qu'il faudra y inclure une premiere partie avec
  les differents ingredients, puis une deuxieme  avec  les  accessoires,
  une  troisieme  donnant  la  facon de faire votre gateau pas a pas, et
  enfin une belle photo qui montre le resultat final.

  Cette definition d'un type de document est appele DDTTDD  (_D_o_c_u_m_e_n_t  _T_y_p_e
  _D_e_f_i_n_i_t_i_o_n).  Elle  ne  permet  pas de definir quelle sera l'allure du
  document final, mais seulement ce qu'il contiendra ou pourra contenir.

  Pour  reprendre  l'exemple  precedent, je suis sur qu'en lisant l'idee
  que je me fais d'une recette de cuisine, vous avez reconnu celles  que
  vous  ou  votre  cuistot  attitre utilisez. Et pourtant, elles ont une
  allure completement differente : les miennes  ont  une  photo  qui  se
  trouve  en  haut  a gauche du placard de la salle de bain, et la liste
  des ingredients se trouve entre les bouteilles de lait et  de  gaz  au
  fond du jardin. Et les votres ?

  Grace  a  cette  definition  type, quelqu'un peut ecrire son document,
  sans tenir compte de la forme qu'il aura quand il arrivera devant  les
  yeux du lecteur.

  22..22..

  LLaa ddeeffiinniittiioonn dduu ttyyppee LLiinnuuxxDDoocc

  Ce  type  permet  d'ecrire,  vous  l'aviez  devine,  des  documents se
  reportant a Linux.

  Ces documents sont en general construits ainsi : ils commencent par un
  titre  suivi  de l'auteur, de la date de diffusion et de la version de
  ce document.  Suit  juste  apres  un  court  paragraphe  qui  explique
  brievement  ce  que  contient  ce document (ce qui evite d'attendre de
  l'avoir fini pour se rendre compte que ce n'est pas  du  tout  ce  que
  l'on  recherchait)  puis  une  table  des  matieres qui montre plus en
  detail son contenu et permet aux plus presses d'aller voir directement
  ce qu'ils cherchent.

  Et  vient  ensuite  une  suite de chapitres, sections, paragraphes. Au
  milieu de ces paragraphes, on peut inserer des morceaux de  programme,
  ou  changer  de police de caracteres pour faire ressortir un mot ou un
  passage, ou encore y inserer des listes, faire reference a  une  autre
  partie du document, et d'autres choses encore.

  Pour ecrire un tel document, il suffit alors de preciser au bon moment
  le titre, l'auteur, la date  et  la  version  du  document,  puis  les
  chapitres  et  sections, dire quand il faut inserer une liste et quels
  en sont les elements, et ainsi de suite.

  22..33..

  LLeess SSGGMMLL--TToooollss

  Les  SSGGMMLL--TToooollss  permettent,  a  partir  de  cette  specification   du
  document,  d'obtenir  le  document  final  dans  le  format  que  vous
  preferez. Si vous voulez l'ajouter a votre  bibliotheque  personnelle,
  ce  sera  surement  du _P_o_s_t_S_c_r_i_p_t, si vous voulez le faire partager au
  reste de la planete a travers le Web,  pourquoi pas  du  _H_T_M_L,  ou  si
  vous  craquez  et  voulez  le  lire sous Windows, vous pouvez toujours
  l'avoir en _R_T_F pour pouvoir le lire sous  n'importe  quel  editeur  de
  texte.  Ou  peut-etre  sous  chacun  de  ces formats, si vous avez des
  humeurs changeantes.

  La distribution SGML-Tools peut etre recuperee via FTP anonyme dans le
  repertoire ftp://ftp.lip6.fr/pub/sgml-tools/

  33..

  VVoottrree pprreemmiieerr ddooccuummeenntt

  33..11..

  DDeeppuuiiss uunn ddooccuummeenntt aauu ffoorrmmaatt tteexxttee

  Si vous possedez un document au format texte que vous desirez formater
  en SGML pour ensuite le transformer en divers formats, voici la marche
  a suivre :

  1. Ajoutez au tout debut du fichier les lignes suivantes :

             <!doctype linuxdoc system>
             <article>
             <title>le titre ici</title>
             <author>
             le nom de l'auteur, son email
             </author>
             <date>
             la version et la date du document
             </date>

  2. S'il  y  a au tout debut du document un court paragraphe qui decrit
     brievement le contenu de ce document, encadrez ce  paragraphe  avec
     les balises <abstract> et </abstract>.

  3. Ajoutez   juste   a   la   suite   la   balise  <toc>,  qui  insere
     automatiquement la table des matieres.

  4. Au debut de chaque nouveau chapitre, remplacez la  ligne  contenant
     le numero et le titre du chapitre par :

            <sect>le titre du chapitre

  et rajoutez la balise </sect> a la fin du chapitre.

  NNoottee  ::  Il n'est pas necessaire d'indiquer le numero du chapitre, car
  ils sont numerotes automatiquement.

  5. Faites la meme chose pour les sections, en remplacant le numero  et
     le  titre  par  <sect1>  et  en  rajoutant  </sect1> a la fin de la
     section.

  6. Il est possible de creer des sous-sections jusqu'au niveau 4  (avec
     <sect4> et </sect4>) en operant de la meme maniere.

  7. A chaque debut de paragraphe, ajoutez la balise <p>.

  8. Si  vous  desirez  mettre  en  valeur  certains  mots  ou certaines
     phrases, entourez-les des balises <it> et </it> (_i_t_a_l_i_q_u_e), ou <bf>
     et  </bf>  (ggrraass), ou encore <tt> et </tt> (caracteres de machine a
     ecrire d'antan).

  9. Lorsqu'une  liste  apparait  dans  le  texte,  comme  celle-ci  par
     exemple :

             Voici une liste :

             - d'une ligne,
             - ah non, deux,
             - tiens, trois,
             - c'est tout.

             de quatre lignes !

  il faut la remplacer par :

          Voici une liste :
         <itemize>
         <item>d'une ligne,
         <item>ah non, deux,
         <item>tiens, trois,
         <item>c'est tout.
          </itemize>
          de quatre lignes !

  10.
     Lorsqu'un  bloc  represente une partie de programme, ou autre chose
     que l'on veut faire ressortir :

            <verb>
             10 REM Tiens qu'est-ce que c'est ?
             20 REM Je croyais que ca n'existait plus !
             30 PRINT "Je suis de retour ";
             40 PRINT "pour sauver le monde."
             50 INPUT "Des mains de qui d'apres toi ?",M$
             60 IF M$="Bill" THEN PRINT "Tu es un sage":GOTO AUPARADIS
             70 ELSE PRINT "Tu n'as rien compris...":GOTO AUPAYSDUDOLLAR
             </verb>

  11.
     Arrive a ce point, vous avez deja bien avance  votre  formatage  en
     SGML. Vous pourrez, si vous voulez affiner votre document, jeter un
     oeil sur le guide d'utilisation des SSGGMMLL--TToooollss, qui decrit plus  en
     detail le type de document LLiinnuuxxDDoocc.

  44..

  CCoonnffiigguurreerr EEmmaaccss

  44..11..

  LLeess ccaarraacctteerreess aacccceennttuueess

  Si  vous  desirez  ecrire  des documents en francais ou dans une autre
  langue europeenne, vous aurez besoin de  caracteres  accentues.  Voici
  comment configurer Emacs pour qu'il accepte ces caracteres.

  44..11..11..

  LL''aaffffiicchhaaggee ddeess ccaarraacctteerreess 88 bbiittss

  Pour  qu'Emacs  soit capable d'afficher des caracteres 8 bits, ajoutez
  les lignes suivantes a votre .emacs :

         (standard-display-european 1)
         (load-library "iso-syntax")

  Si vous utilisez Emacs sur un terminal qui ne supporte pas l'affichage
  des  caracteres 8 bits, vous pouvez utiliser la bibliotheque iso-ascii
  ((load-library  "iso-ascii")),  qui  permet  a  Emacs  d'afficher  les
  caracteres 8 bits d'une facon approchee.

  44..11..22..

  LLaa ssaaiissiiee ddeess ccaarraacctteerreess aacccceennttuueess

  Si  votre  clavier  permet  de  taper  les caracteres accentues, aucun
  probleme ne devrait se poser. En revanche,  s'il  ne  le  permet  pas,
  voici quelques moyens d'y remedier :

  44..11..22..11..

  LLaa bbiibblliiootthheeqquuee iissoo--aacccc

  La   bibliotheque  iso-acc  d'Emacs  permet  d'entrer  des  caracteres
  accentues malgre que l'on ait un clavier qui ne le permette  a  priori
  pas.

  Pour utiliser cette bibliotheque, ajoutez la ligne suivante a votre

          (load-library "iso-acc")

  Puis,  une  fois  avoir  relance  Emacs  et ouvert le fichier que vous
  voulez editer, tapez Meta-x iso-accents-mode.

  Vous pouvez alors entrer un caractere ee en tapant '' puis e. De maniere
  generale,  on  peut  entrer  un  caractere  accentue en tapant d'abord
  l'accent, puis  la  lettre  a  accentuer  (aussi  bien  minuscule  que
  majuscule). Voici les differents accents utilisables :

  ` : Un accent grave

  ^ : Un accent circonflexe

  " : Un trema

  ~  : Un tilde au dessus de la lettre, une cedille lorsqu'il precede un
  c, et d'autres encore (voir fichier iso-acc.el),

  / : Pour barrer une lettre, ...

  Si vous avez besoin d'entrer un de  ces  caracteres  et  non  pas  une
  lettre accentuee, tapez un espace a la suite de l'accent. Par exemple,
  pour taper _l_'_e_l_e_p_h_a_n_t, tapez l ' _<_s_p_c_> ' e l ' e ...

  Vous pouvez trouver l'ensemble des combinaisons dans le  fichier  iso-
  acc.el.

  44..11..22..22..

  LLaa ttoouucchhee _<_M_e_t_a_>

  Il  est  possible  avec  certains  terminaux  de saisir des caracteres
  accentues grace a la touche _<_M_e_t_a_> (ou _<_A_l_t_>). Par exemple, la  frappe
  de _<_M_e_t_a_>-i permet d'entrer le caractere ee.

  Mais  Emacs  prevoit  la touche _<_M_e_t_a_> pour d'autres utilisations.  Il
  faut donc taper la sequence CCttrrll--qq (commande quoted-insert)  avant  de
  taper _<_M_e_t_a_>-i.

  Cette  commande  permet  aussi d'entrer un caractere selon son code en
  octal. Tapez CCttrrll--qq suivi du code  en  octal  du  caractere  que  vous
  desirez entrer.

  44..11..33..

  AAffffiicchheerr lleess ccaarraacctteerreess SSGGMMLL eenn 88 bbiittss

  En  SGML,  les  caracteres  accentues  peuvent  etre tapes grace a des
  macros. Par exemple, le caractere ee s'ecrit &&eeaaccuuttee;;. En general,  les
  applications  qui lisent du SGML arrivent a lire les caracteres 8 bits
  et il n'est donc pas necessaire d'utiliser ces  macros.  Mais  il  est
  possible  que certaines ne le puissent pas. En sachant qu'il existe un
  moyen facile de remedier a ca, ce serait dommage  de  faire  "planter"
  ces dernieres applications.

  En effet, la bibliotheque iso-sgml vous permet d'entrer sous Emacs des
  caracteres accentues,  comme  d'habitude,  mais  lorsqu'il  enregistre
  votre  fichier,  il  transforme  tous  ces  caracteres 8 bits par leur
  equivalent SGML.

  Il est donc tres facile, grace a  cette  bibliotheque,  de  saisir  et
  relire  votre document sous Emacs, et vous etes sur que votre document
  ne sera pas rejete  par  une  application  qui  ne  comprend  pas  les
  caracteres 8 bits.

  Pour  utiliser  cette bibliotheque, il suffit de rajouter ces lignes a
  votre

         (setq sgml-mode-hook
         '(lambda () "Defauts pour le mode SGML."
         (load-library "iso-sgml")))

  44..22..

  LLee mmooddee SSGGMMLL

  Lorsque vous ouvrez un fichier avec une extension ..ssggmmll,  Emacs  lance
  normalement  le  mmooddee  ssggmmll.  S'il ne le fait pas, vous pouvez soit le
  faire   manuellement   avec   Meta-x   sgml-mode,   soit   le   lancer
  automatiquement en rajoutant ces lignes a votre .emacs :

        (setq auto-mode-alist
        (append '(("\.sgml$"  . sgml-mode))
                  auto-mode-alist))

  Ce mode permet par exemple de choisir comment inserer les caracteres 8
  bits.  En  utilisant  Meta-x  sgml-name-8bit-mode  (ou  dans  le  menu
  _S_G_M_L_/_T_o_g_g_l_e  _8  _b_i_t  _i_n_s_e_r_t_i_o_n),  vous  pouvez  choisir  d'inserer les
  caracteres 8 bits soit tels quels, soit sous leur forme SGML, c'est-a-
  dire sous la forme &&......;;.

  Il  permet  aussi de cacher ou non les balises SGML, avec Meta-x sgml-
  tags-invisible ou le menu _S_G_M_L_/_T_o_g_g_l_e _T_a_g _V_i_s_i_b_i_l_i_t_y.

  44..33..

  LLee mmooddee PPSSGGMMLL

  Le mode PSGML donne de grandes facilites  pour  editer  des  documents
  SGML sous Emacs.

  La documentation psgml-linuxdoc explique comment installer et utiliser
  ce mode conjointement avec _L_i_n_u_x_D_o_c.

  44..44..

  DDiivveerrss

  44..44..11..

  LLee mmooddee aauuttoo--ffiillll

  En mode normal, lorsque vous tapez un paragraphe et que  vous  arrivez
  en  bout  de  ligne,  vous devez vous-meme utiliser la touche _<_E_n_t_r_e_e_>
  pour revenir a la ligne, ou bien  votre  ligne  continue  indefiniment
  tout  le  long du paragraphe. Il en resulte, si vous utilisez _<_E_n_t_r_e_e_>
  pour revenir a la ligne, un paragraphe dont les fins de lignes ne sont
  pas alignees, et en general ces lignes rallongent ou raccourcissent au
  fur et a mesure. De meme si  vous  laissez  des  lignes  depasser  une
  longueur  raisonnable,  vous  ne  pourrez  pas  les voir sous certains
  editeurs.

  Le mode aauuttoo--ffiillll permet d'automatiser cette tache ingrate  :  lorsque
  vous  depassez une certaine colonne (la 70e par defaut), il vous place
  automatiquement a la ligne suivante.

  Voici comment utiliser ce mode, et fixer la largeur de  vos  lignes  a
  80 :

         (setq sgml-mode-hook
         '(lambda () "Defauts pour le mode SGML."
         (auto-fill-mode)
         (setq fill-column 80)))

  55..

  IIssppeellll

  Si  vous  desirez verifier l'orthographe de votre document directement
  depuis Emacs, vous pouvez utiliser la distribution IIssppeellll et son  mode
  associe sous Emacs.

  55..11..

  CCoonnffiigguurraattiioonn iinniittiiaallee

  Tout  d'abord,  ajoutez  ces  lignes  a  votre  .emacs pour configurer
  Emacs :

        (autoload 'ispell-word "ispell"
           "Check the spelling of word in buffer." t)
        (global-set-key "\e$" 'ispell-word)
        (autoload 'ispell-region "ispell"
           "Check the spelling of region." t)
        (autoload 'ispell-buffer "ispell"
           "Check the spelling of buffer." t)
        (autoload 'ispell-complete-word "ispell"
           "Look up current word in dictionary and try to complete it." t)
        (autoload 'ispell-change-dictionary "ispell"
           "Change ispell dictionary." t)
        (autoload 'ispell-message "ispell"
           "Check spelling of mail message or news post.")
        (autoload 'ispell-minor-mode "ispell"
           "Toggle mode to automatically spell check words as they are typed in.")

  55..22..

  LLee cchhooiixx ddee vvooss ddiiccttiioonnnnaaiirreess ppaarr ddeeffaauutt

  Vous pouvez configurer  Emacs  pour  qu'a  l'ouverture  d'un  fichier,
  celui-ci  choisisse automatiquement quels dictionnaires utiliser. Vous
  pouvez en  effet  utiliser  plusieurs  dictionnaires.  Le  premier  et
  surement  le  plus  important est le dictionnaire principal, distribue
  avec Ispell. Vous avez le choix entre plusieurs langues.  Le  deuxieme
  est  votre  dictionnaire  personnel, celui ou Ispell ajoutera les mots
  qu'il n'aura pas trouve dans le premier dictionnaire mais que vous lui
  aurez indique de garder.

  Voici les lignes a inserer a votre .emacs si vous desirez utiliser par
  defaut le dictionnaire francais distribue avec Ispell, et placer votre
  dictionnaire  personnel  dans un fichier .ispell-dico-perso dans votre
  repertoire racine.

         (setq sgml-mode-hook
        '(lambda () "Defauts pour le mode SGML."
        (setq ispell-personal-dictionary "~/.ispell-dico-perso")
        (ispell-change-dictionary "francais")
         ))

  55..33..

  CChhooiixx ddeess ddiiccttiioonnnnaaiirreess ppoouurr uunn cceerrttaaiinn ffiicchhiieerr

  Un petit probleme se pose si vous ne verifiez pas toujours des  textes
  dans  la  meme  langue.  Et  si  vous  traduisez des documents, il est
  probable que vous passiez d'une langue a l'autre assez souvent.

  Je ne connais pas de moyen en Lisp de choisir,  soit  automatiquement,
  soit en un _c_l_i_c_k de souris, les dictionnaires principaux et personnels
  associes a la langue utilisee dans le fichier en cours.  (Si  vous  en
  connaissez un, faites-moi signe !)

  Mais  il  est  possible  d'indiquer  quels  dictionnaires  vous voulez
  utiliser pour ce fichier (et seulement celui-la).  Il  suffit  de  les
  rajouter  en  commentaire,  a la fin du fichier, pour qu'Ispell puisse
  les lire en lancant une verification :

        <!-- Local IspellDict: english -->
        <!-- Local IspellPersDict: ~/emacs/.ispell-english -->

  Si vous avez defini dans votre .emacs que vos dictionnaires par defaut
  seront  francais, vous pouvez alors ajouter ces lignes a chaque fin de
  fichier dont le texte est en anglais.

  55..44..

  VVeerriiffiieerr vvoottrree ddooccuummeenntt

  Pour  lancer  la  verification  de  votre  document  en   integralite,
  utilisez,  depuis  n'importe  ou  dans  votre  document Meta-x ispell-
  buffer. Vous pouvez  aussi  lancer  la  verification  sur  une  region
  seulement du document :

  +o  Indiquez le debut de la region avec Ctrl-Spc (mark-set-command),

  +o  Placez-vous a la fin de la region a verifier,

  +o  tapez Meta-x ispell-region.

  Emacs lance alors Ispell. Si ce dernier trouve un mot qu'il ne connait
  pas, il vous indique ce mot  (normalement  en  surbrillance)  et  vous
  demande de presser une touche :

  +o  ssppcc accepte ce mot, uniquement pour cette fois,

  +o  ii accepte ce mot et l'insere dans votre dictionnaire personnel,

  +o  aa accepte ce mot pour cette session,

  +o  AA   accepte   ce  mot  pour  ce  fichier,  en  l'inserant  dans  le
     dictionnaire local au fichier,

  +o  rr permet de corriger le mot mal orthographie,

  +o  RR  permet  de  corriger  toutes  les   occurrences   du   mot   mal
     orthographie,

  +o  xx  arrete  la  verification,  et  replace  le curseur a sa position
     initiale,

  +o  XX arrete la verification en laissant le  curseur  sur  le  mot  mal
     orthographie,  vous  permettant  de  modifier  votre fichier ; vous
     pouvez continuer la verification en tapant Meta-x ispell-continue,

  +o  ?? affiche une aide en ligne.

  Si Ispell trouve un ou plusieurs mots ressemblant  a  celui  qu'il  ne
  connait  pas,  il  vous  les  indique  dans une petite fenetre, chacun
  precede d'un chiffre. Il suffit de presser un  de  ces  chiffres  pour
  corriger le mot mal orthographie par le mot correspondant.

  55..55..

  DDiiccttiioonnnnaaiirree ppeerrssoonnnneell ccoonnttrree ddiiccttiioonnnnaaiirree llooccaall aauu ffiicchhiieerr

  La touche ii permet d'inserer un mot dans  le  dictionnaire  personnel,
  alors  que  la  touche  AA permet d'inserer un mot dans le dictionnaire
  local au fichier.

  Le dictionnaire local au fichier est une suite de mots  inseres  a  la
  fin du fichier, sous forme de commentaires, et qui est relu par Ispell
  chaque fois que vous le lancez sur ce fichier. Cela permet  d'accepter
  certains  mots,  valables dans ce fichier, mais qui ne le seraient pas
  dans d'autres.

  A mon avis, il est  preferable  que  le  dictionnaire  personnel  soit
  reserve aux mots que le dictionnaire principal ne connait pas mais qui
  font vraiment partie de la langue  (comme  les  mots  composes),  plus
  certains  mots  n'appartenant  pas  a  la  langue  ou noms propres qui
  reviennent dans un grand  nombre  de  fichiers  (comme  _L_i_n_u_x)  et  ne
  ressemblant  pas trop a un mot du dictionnaire principal : l'ajout par
  exemple de certains noms et prenoms de personnes dans le  dictionnaire
  personnel peut etre dangereux, car ils ressemblent parfois a un mot de
  la langue (imaginez qu'il ne trouve pas de fautes  dans  la  phrase  :
  `_T_e_d _e_n _e_s_t _l_'_e_f_f_e_t _a_u _p_h_i_l _d_u _t_e_m_p_s_._' !).

  55..66..

  LLaa vveerriiffiiccaattiioonn ``aa llaa vvoolleeee''

  Ispell  peut  aussi verifier l'orthographe au fur et a mesure que vous
  tapez votre document. Il faut utiliser pour cela le mode iissppeellll--mmiinnoorr--
  mmooddee.  Lorsque vous desirez lancer ou arreter ce mode de verification,
  tapez Meta-x ispell-minor-mode. Ispell vous envoie alors un _b_i_p chaque
  fois que vous tapez un mot qu'il ne connait pas.

  Si  ces  _b_i_p  a repetition vous ennuient (ou si votre voisin de palier
  dort !), vous pouvez les remplacer par un flash de l'ecran, en  tapant
  Meta-x set-variable RET visible-bell RET t RET. Ou ajoutez cette ligne
  a votre .emacs pour faire taire Emacs a tout jamais :

         (setq visible-bell t)

  55..77..

  SSaauutt ddee rreeggiioonnss

  Il est possible de ne pas verifier votre document en  integralite,  en
  sautant  quelques  regions  bien  specifiques.  En effet, vous voudrez
  surement ne pas verifier l'orthographe de vos balises SGML. Pour cela,
  ajoutez la ligne suivante a votre .emacs :

        (setq ispell-skip-sgml t)

  Une  version Beta du 20 Mars 98  du fichier ispell.el est disponible a
  l'adresse    http://kdstevens.com/~stevens/ispell-page.html.     Cette
  version  etend  les  regions  SGML  a  sauter.  En  effet,  la version
  d'ispell.el fournie avec Emacs permet seulement  de  sauter  les  tags
  SGML, de la forme <<tttt>> ou <<//tttt>>.

  Cette version Beta permet de sauter egalement les regions entre :

  +o  <author> et la fin de la ligne,

  +o  < et / (pour les tags SGML de la forme <<eemm//......//,

  +o  <code> et </code>,

  +o  <verb> et </verb>,

  +o  <tt> et </tt>.

  66..

  PPoouurr aalllleerr pplluuss llooiinn

  66..11..

  IInnsseerrttiioonn aauuttoommaattiiqquuee dd''uunnee eenntteettee

  Sous Emacs, il est possible d'_a_c_c_r_o_c_h_e_r des actions a chaque evenement
  (ouverture d'un fichier, sauvegarde, lancement d'un mode, etc).

  La bibliotheque aauuttooiinnsseerrtt utilise cette fonctionnalite : lorsque vous
  ouvrez un nouveau fichier sous Emacs, cette bibliotheque insere, selon
  le type de ce fichier, une entete _s_t_a_n_d_a_r_d.

  Dans notre cas, cette entete _s_t_a_n_d_a_r_d pourrait bien etre la partie qui
  declare le type de document (LinuxDoc), le titre, l'auteur et la date.

  Je vais decrire ici deux facons d'inserer une telle entete.   Soit  en
  inserant  un  fichier  que  vous  aurez  prealablement  ecrit, soit en
  lancant une routine ecrite en eelliisspp.

  66..11..11..

  ppaarr ll''iinnsseerrttiioonn dd''uunn ffiicchhiieerr

  Il faut tout d'abord preciser a Emacs  d'executer  la  commande  auto-
  insert   a   l'ouverture  d'un  fichier,  puis  lire  la  bibliotheque
  aauuttooiinnsseerrtt qui declare la  liste  auto-insert-alist  qu'il  nous  faut
  modifier,  cette  derniere  definissant  pour  chaque  type de fichier
  l'entete a inserer. Le fichier a inserer doit par  defaut  se  trouver
  dans  le  repertoire  ~/insert/,  mais il est possible de redefinir la
  variable auto-insert-directory si l'on veut le placer ailleurs.

  Voici les lignes a rajouter a votre .emacs  pour  inserer  le  fichier
  ~/emacs/sgml-insert.sgml a l'ouverture d'un nouveau fichier SGML :

        (add-hook 'find-file-hooks 'auto-insert)
        (load-library "autoinsert")
        (setq auto-insert-directory "~/emacs/")
        (setq auto-insert-alist
              (append '((sgml-mode .  "sgml-insert.sgml"))
                      auto-insert-alist))

  Vous  pouvez  alors  ecrire  dans  le fichier ~/emacs/sgml-insert.sgml
  votre entete personnalisee, puis relancer Emacs et ouvrir  un  fichier
  toto.sgml.  Emacs devrait alors vous demander de confirmer l'insertion
  automatique, et dans l'affirmative inserer votre entete.

  66..11..22..

  ppaarr ll''eexxeeccuuttiioonn dd''uunnee rroouuttiinnee

  Cela fonctionne un peu comme precedemment, mais au  lieu  de  preciser
  dans  la  variable  auto-insert-alist  un  fichier  a inserer, il faut
  preciser une fonction a executer. Voici comment proceder, en supposant
  que  l'on ecrive cette fonction dans un fichier ~/emacs/sgml-header.el
  (inutile d'encombrer votre .emacs avec  cette  fonction  qui  peut  se
  reveler assez longue) :

        (add-hook 'find-file-hooks 'auto-insert)
        (load-library "autoinsert")
        (add-to-list 'load-path "~/emacs")
        (load-library "sgml-header")
        (setq auto-insert-alist
              (append '(((sgml-mode .  "SGML Mode") . insert-sgml-header))
                      auto-insert-alist))

  Vous  pourrez  trouver  en  ``appendice'' un exemple de cette fonction
  insert-sgml-header.

  GG..

  UUnnee ffoonnccttiioonn iinnsseerrtt--ssggmmll--hheeaaddeerr

  Cette  fonction  permet   a   l'utilisateur   d'inserer   une   entete
  personnalisee  pour  un document du Projet de Documentation Linux dans
  un fichier. Elle peut soit etre appelee automatiquement  lorsque  l'on
  ouvre  un  nouveau  fichier  SGML, soit etre appelee explicitement par
  l'utilisateur.

  Cette fonction demande a  l'utilisateur,  a  travers  le  _m_i_n_i_-_b_u_f_f_e_r,
  divers renseignements, certains necessaires, d'autres facultatifs.

  Tout  d'abord  le  titre.  Si  l'utilisateur  n'entre  aucun titre, la
  fonction retourne immediatement, et rien n'est insere.  Vient  ensuite
  la  date, l'auteur, son email et sa home page (ces deux derniers etant
  facultatifs).

  Il demande ensuite le nom du traducteur. S'il n'y a pas de  traducteur
  pour  ce  document, il suffit de presser _E_n_t_r_e_e, et les renseignements
  sur le traducteur ne seront pas demandes. Dans le  cas  contraire,  la
  fonction  demande  l'email  et  la  home  page  du  traducteur  (aussi
  facultatifs).

  Cette fonction affiche alors dans  le  buffer  courant  votre  entete,
  comportant bien sur tous les renseignements que vous avez cites mis en
  forme, mais aussi les balises necessaires au paragraphe d'introduction
  et  au  premier  chapitre,  puis  place le curseur a l'endroit ou vous
  pourrez saisir le paragraphe d'introduction.

  (defun insert-sgml-header ()
    "Insere l'entete d'un document LinuxDoc"
    (interactive)
    (let (titre auteur email home traducteur email-traducteur home-traducteur date
                point-debut)
      (setq titre (read-from-minibuffer "Titre : "))
      (if (> (length titre) 0)
          (progn
            (setq date (read-from-minibuffer "Date : ")
                  auteur (read-from-minibuffer "Auteur : ")
                  email (read-from-minibuffer "Email auteur : ")
                  home (read-from-minibuffer "Home page auteur : http://")
                  traducteur (read-from-minibuffer "Traducteur : "))
            (insert "<!doctype linuxdoc system>\n<article>\n<title>")
            (insert titre)
            (insert "</title>\n<author>\nAuteur : ") (insert auteur) (insert "<newline>\n")
            (if (> (length email) 0)
                (progn
                  (insert "<htmlurl url=\"mailto:")
                  (insert email) (insert "\" name=\"") (insert email)
                  (insert "\"><newline>\n")))
            (if (> (length home) 0)
                (progn
                  (insert "<htmlurl url=\"http://")
                  (insert home) (insert "\" name=\"") (insert home)
                  (insert "\">\n<newline>")))
            (if (> (length traducteur) 0)
                (progn
                  (setq email-traducteur (read-from-minibuffer "Email traducteur : ")
                        home-traducteur (read-from-minibuffer "Home page traducteur : http://"))
                  (insert "Traducteur : ")
                  (insert traducteur)
                  (insert "<newline>\n")
                  (if (> (length email-traducteur) 0)
                      (progn
                        (insert "<htmlurl url=\"mailto:")
                        (insert email-traducteur) (insert "\" name=\"")
                        (insert email-traducteur)
                        (insert "\"><newline>\n")))
                  (if (> (length home-traducteur) 0)
                      (progn
                        (insert "<htmlurl url=\"http://")
                        (insert home-traducteur) (insert "\" name=\"")
                        (insert home-traducteur)
                        (insert "\"><newline>\n")))))
            (insert "</author>\n<date>\n")
            (insert date)
            (insert "\n</date>\n\n<abstract>\n")
            (setq point-debut (point))
            (insert "\n</abstract>\n<toc>\n\n<sect>\n<p>\n\n\n</sect>\n\n</article>\n")
            (goto-char point-debut)
            ))))

  Liste des HowTo en langue franaise
  ric Dumas, dumas@Linux.EU.Org, dumas@Traduc.Org
  Version 4.3, 4 Juillet 2000

  11..  CCooppyyrriigghhtt


  Le document "Liste-des-HOWTO" est copyright  1996-2000 ric Dumas.
  Les HOWTO Linux peuvent tre reproduits et distribus, en totalit ou
  en partie, sur tous mdia physique ou lectronique dans la mesure o
  ce copyright est prserv dans chacun des exemplaires produits.  La
  distribution commerciale en est autorise et encourage.  L'auteur
  _a_p_p_r__c_i_e_r_a_i_t toutefois qu'on lui notifie individuellement ce genre de
  distribution.

  Le prsent copyright couvre les traductions, compilations et autres
  travaux drivs des HOWTOs Linux.  C'est--dire qu'il est dfendu
  d'imposer des restrictions de diffusion allant au del du prsent
  copyright  des ouvrages inspirs de ou incorporant des passages de
  HOWTOs Linux.  Sous certaines conditions, des exceptions  ces regles
  seront tolres.  Pour plus d'informations, contacter l'auteur de ce
  document, qui est galement le coordinateur des traductions
  franaises,  l'adresse  <mailto:dumas@Linux.EU.Org>.

  Pour toute question plus gnrale, merci de contacter le coordinateur
  des HOWTO, Tim Bynum,  l'adresse lectronique
  <mailto:tjbynum@wallybox.cei.net>.

  En bref, nous souhaitons une diffusion aussi large que possible  ces
  informations. Nammoins, nous entendons garder la proprit
  intellectuelle (copyright) des HOWTOs, et _a_p_p_r__c_i_e_r_i_o_n_s tre informs
  de leur redistribution.


  22..  BBuutt ddee ccee ddooccuummeenntt


  Ce document contient la liste de tous les HowTos en langue anglaise.
  Pour chacun d'entre eux, vous trouverez le nom du document, le ou les
  auteurs, le numro de la version actuelle. Si le document a t
  traduit, vous y trouverez le nom du traducteur, la dernire version
  traduite et l'tat de la traduction.

  Vous trouverez galement le titre de la version franaise : dans
  certains cas, le titre est lgrement diffrent, une courte
  description du document ainsi que l'URL o vous pouvez trouver la
  version HTML en ligne du document. Si vous consultez ce document sous
  forme HTML, il vous suffit de cliquer sur le lien pour atteindre
  directement le document dsir.

  Le champ "commentaire" peut avoir les lments suivants :

    vide : le HowTo n'est pas  l'heure actuelle traduit ou en cours de
     traduction. Si vous souhaitez en faire une version franaise,
     envoyez-moi un courrier lectronique, et n'oubliez pas de vous
     abonner  la liste des traducteurs :

     ___________________________________________________________________
     % mail Majordomo@Traduc.Org
     subscribe traduc
     ___________________________________________________________________



  IIll eesstt ttrrss iimmppoorrttaanntt qquuee vvoouuss aappppaarrtteenniieezz  cceettttee lliissttee !!

  Ensuite, pour envoyer un message dans la liste, il suffit de poster un
  courrier lectronique  l'adresse traduc@Traduc.Org.

    EENN CCOOUURRSS : le document est en cours de traduction ;

    AA JJOOUURR : la version franaise est parfaitement  jour ;

    NNEE PPAASS TTRRAADDUUIIRREE : ce document prsente relativement peu d'intrt 
     tre traduit, mais si vous avez du temps  perdre, n'hsitez pas !

  Ce document sera actualis le plus souvent possible, gnralement
  aprs que j'envoie certaines nouvelles traductions, et lorsque je suis
  en mesure de le faire.


  33..  OOuuttiillss ppoouurr rraalliisseerr llaa ttrraadduuccttiioonn



  33..11..  PPrrooggrraammmmeess


  Les HowTos sont crits en SGML, un langage de description
  particulirement simple  utiliser. Vous avez besoin pour "compiler"
  un HowTo du paquetage sgml. La version que j'utilise pour gnrer vos
  documents est la version SGML 1.0.9.

  TToouutt ddooccuummeenntt qquuii nnee ccoommppiillee ppaass aavveecc cceettttee vveerrssiioonn sseerraa rreeffuuss..

  Vous pourrez trouver cet outil sur le site
  <http://www.sgmltools.org>. Les options utilises pour la gnration
  des documents sont :

  -l fr -p a4 -c latin



  Si vous ne connaissez pas le SGML, consultez le document
  <http://www.sgmltools.org/guide/guide.html>.

  Pour ce qui est des outils, le mieux est d'installer le paquetage
  TeTeX (fournit avec les distributions), ainsi que les paquetages
  nroff/groff.  Concernant TeTeX, il n'est pas ncessaire d'installer le
  paquetage franais (c'tait le cas avec l'ancienne version).

  Pour terminer, si les HowTos sont directement en SGML, certains mini
  sont au format texte. Il est ncessaire que la version franaise soit
  au format SGML.

  Toute la documentation concernant cet outil peut tre trouve sur le
  site  <http://www.sgmltools.org/>.  Tous les renseignements concernant
  le LDP (_L_i_n_u_x _D_o_c_u_m_e_n_t_a_t_i_o_n _P_r_o_j_e_c_t) peuvent tre trouvs sur le site
  <http://www.linuxdoc.org/>.


  33..22..  DDiiccttiioonnnnaaiirreess


  Du ct des dictionnaires, signalons celui maintenu par Arnaud Launay
  que l'on peut trouver sur le site
  <http://howtos.launay.org/Dico.html>.  Il existe galement d'autres
  guides, dont celui de Roland Trique :  <http://www.linux-
  france.org/prj/jargonf>, ainsi qu'un dictionnaire de termes
  informations <http://www.olf.gouv.qc.ca/service/pages/internet2.html>.


  44..  CCooppyyrriigghhtt TTyyppee


  Chaque HOWTO en version anglaise est diffus avec un copyright de ce
  type. Avant de faire un copier coller, vrifiez que le texte qui suit
  correspond !

  Pensez  utiliser la version sgml de ce document... cela vous vitera
  d'avoir  recoder certains caractres, ainsi qu' mettre le nom rel
  de l'auteur du document.


  44..11..  CCooppyyrriigghhtt


  Ce HOWTO est  Marcel Dugenou, 1994-1999.

  Sauf indication contraire, les droits d'auteur des HOWTO Linux sont
  dtenus par leurs auteurs respectifs. Les HOWTO Linux peuvent tre
  reproduits et distribus, en totalit ou en partie, sur tout mdia
  physique ou lectronique dans la mesure o ce copyright est prserv
  dans chaque copie. La distribution commerciale en est autorise et
  encourage. L'auteur apprcierait toutefois qu'on lui notifie
  individuellement ce genre de distribution.

  Le prsent copyright doit couvrir toute traduction, compilation et
  autre travail driv des HOWTO Linux. C'est--dire qu'il est interdit
  d'imposer des restrictions de diffusion allant au del du prsent
  copyright  des ouvrages inspirs, ou incorporant des passages, de
  HOWTO Linux. Sous certaines conditions, des exceptions  ces rgles
  seront tolres : contactez le coordinateur des HOWTO  l'adresse
  donne ci-dessous.

  Pour rsumer, nous souhaitons une diffusion aussi large que possible
  de ces informations. Nanmoins, nous entendons garder la proprit
  intellectuelle (copyright) des HOWTO, et apprcierions d'tre informs
  de leur redistribution.

  Pour toute question plus gnrale, merci de contacter le coordinateur
  des HOWTO, Tim Bynum,  l'adresse lectronique
  tjbynum@wallybox.cei.net.


  44..22..  DDnnggaattiioonn


  Vous utilisez les informations contenues dans ce document  vos
  propres risques. Nous dclinons toute responsabilit quant  son
  contenu.  L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entirement  vos propres risques.

  Tous les droits sont dtenus par leurs propritaires respectifs, sauf
  mention contraire explicite. L'utilisation d'un terme dans ce document
  ne constitue pas une limitation  sa validit en tant que marque.

  Le fait de citer un produit ou une marque particulire ne constitue
  pas un endossement.

  Il est fortement conseill d'effectuer une sauvegarde de votre systme
  avant une installation importante ainsi qu' intervalles rguliers.


  55..  RReelleeccttuurree



  Il est prfrable qu'un document traduit soit relu par d'autres
  personnes. S'il vous plait, ne postez pas le document dans la liste de
  discussion.

  Sbastien Blondeel ainsi qu'Olivier Tharan se sont occups pendant un
  certain temps de centraliser les documents pour la relecture, qu'ils
  en soient ici remerci !

  Guillaume Allegre ( <mailto:Guillaume.Allegre@imag.fr>) s'occupe
  dsormais de coordoner les relectures avant de me les envoyer. Pour
  faire effectuer la relecture de vos documents, la marche  suivre est
  particulirement simple :


  1. le traducteur ayant termin son oeuvre fait une annonce sur la
     liste traduc comme quoi le document est disponible pour la
     relecture ;

  2. Le traducteur envoie son document  l'adresse relecture@traduc.org
     <relecture@traduc.org> ;

  3. Si vous souhaitez relire, envoyez un mail dans la liste traduc ou 
     relecture. Vous recevrez par retour de courrier le document ;

  4. Lorsque le relecteur a termin, envoyer un mail  relecture, et
     mettre en copie les auteurs avec les notes et corrections ;

  5. Un dlai de 15 jours semble raisonnable, dlai au del duquel le
     document sera considr comme bon  diffuser.

  La mthode d'envoi des documents par mail reste la priorit (c'est un
  moyen utilis par tout le monde). Toutefois, afin de voir si un
  document est en cours de relecture et par qui, il y a une page Web
  <http://www.traduc.org/relecture/> dcrivant tout ceci.

  Les documents en relecture et les notes des relecteurs seront
  conservspour faire une sauvegarde.

  Pour l'envoi des fichiers, il est prfrable de les gziper (ou bziper)
  et de les uuencoder avant de les mettre en attachement. Le sujet du
  mail contiendra [HOWTO] nom_du_document-HOWTO ou [MINI-HOWTO]
  nom_du_document (cf les notes concernant l'``envoi des HowTo
  traduits'').


  66..  EEnnvvooii ddeess HHoowwTToo ttrraadduuiittss


  Une fois la traduction termine et relue, merci de faire parvenir le
  document uunniiqquueemmeenntt aauu ffoorrmmaatt ssggmmll (compress avec gzip ou bzip2) 
  l'adresse lectronique : howto@Traduc.Org. Vous pouvez soit inclure le
  fichier uuencod, soit sous la forme d'un attachement MIME, 
  condition de respecter la norme courante.

  Le titre du courrier lectronique devra tre sous l'une des deux
  formes suivantes : [HOWTO] titre-HowTo ou [MINI-HOWTO] titre-
  MiniHowto.  Vous pouvez bien videment inclure un message personnel au
  dbut du courrier.

  Tout envoi de HowTo recevra un message de confirmation dans les trois
  semaines maximum.

  Une fois le document reu et trait, il sera diffus et accessible au
  public rapidement sur les sites suivants :


    <ftp://ftp.traduc.org/pub/HOWTO/FR>;

    <ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO> ;

    <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/fr> ;

    <http://www.freenix.org/unix/linux/HOWTO>.

     ainsi que leurs nombreux miroirs.


  77..  LLDDPP


  Les documents Howto font partir du LDP (Linux Documentation Project).
  N'hsitez pas  consulter le site WEB du LDP <http://www.linuxdoc.org>
  pour de plus amples renseignements.

  Le groupe franais n'est pas le seul. Voici la liste des traductions
  effectues :

    Allemand (de)

    Chinois (zh)

    Croate (hr)

    Espagnol (es)

    Franais (fr)

    Grec (el)

    Indonsien (id)

    Italien (it)

    Japonais (ja)

    Koren (Ko)

    Polonais (pl)

    Slovne (sl)

    Sudois (sv)

    Turc (tr)

  Vous pouvez accder aux diffrentes traduction en consultant le site
  <http://www.linuxdoc.org/vlist.html>.


  88..  AAnnnnoonncceess


  Lors des diffusions de traductions, des annonces seront effectues :

    nouveaux HowTos  traduire ou  mettre  jour (liste traduc) ;

    nouveaux HowTos traduits (liste traduc, groupe
     fr.comp.os.linux.annonces).

  De plus, un message sera envoy de faon automatique une fois tous les
  quinze jours dans la liste de discussion. Il contient la liste des
  documents disponibles et ceux en cours de traduction.
  99..  CCoonnttrriibbuutteeuurrss  ccee ddooccuummeenntt



    Sbastien Blondeel Sebastien.Blondeel@ens.fr ;

    Rmy Card, Remy.Card@linux.org ;

    Xavier Cazin, xavier@ora.com ;

    Arnaud Launay, asl@launay.org ;

    Olivier Tharan, olive@minet.net.


  1100..  AAuuttrreess pprroojjeettss ddee ttrraadduuccttiioonn



    Linux Gazette :  <http://lg.kernelfr.org/> ;

    Pages de manuel :  <http://www.linux-
     kheops.com/doc/manfr/index.htm> ;


  1111..  HHoowwTToo




  1111..11..  33DDffxx--HHOOWWTTOO



    Auteur(s) : Bernd Kreimeier, bk@gamers.org

    Titre-Fr : HOWTO 3Dfx pour Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/3Dfx-HOWTO.html>

    Description : comment utiliser les cartes graphiques acclratrices
     3Dfx

    Version : v1.16, 6 February 1998

    Traducteur : Franois Romieu, romieu@ensta.fr

    Version traduite : v1.16, 6 Fvrier 1998

    Commentaire : A JOUR


  1111..22..  44mmbb--LLaappttooppss--HHOOWWTTOO



    Auteur(s) : Bruce Richardson, brichardson@lineone.net

    Titre-Fr :

    URL-Fr :

    Description : Comment installer Linux sur un portable avec 4mo.

    Version : 25 March 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1111..33..  AAcccceessss--HHOOWWTTOO



    Auteur(s) : Michael De La Rue,  access-howto@ed.ac.uk

    Titre-Fr : "L'accs  Linux"

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Access-
     HOWTO.html>

    Description : comment utiliser les technologies adaptives avec
     Linux

    Version : v2.11, 28 March 1997

    Traducteur : Olivier THARAN, olive@minet.net

    Version traduite : v2.11, 28 mars 1997

    Commentaire : A JOUR



  1111..44..  AAddvv--RRoouuttiinngg--HHOOWWTTOO



    Auteur(s) :  bert hubert, ahu@ds9a.nl, Gregory Maxwell,
     greg@linuxpower.cx, Martijn van Oosterhout,
     kleptog@cupid.suninternet.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.1.0

    Traducteur : yannick.quenechdu@idealx.com>

    Version traduite :

    Commentaire : EN COURS


  1111..55..  AAII--AAlliiffee--HHOOWWTTOO



    Auteur(s) : John A. Eikenberry

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.4, 23 June 2000

    Traducteur : Emmanuel Pierre, epierre@nef.esiea.fr

    Version traduite :

    Commentaire : EN COURS


  1111..66..  AAllpphhaa--HHOOWWTTOO



    Auteur(s) : David Mosberger, davidm@azstarnet.com

    Titre-Fr : "Brve introduction aux systmes et processeurs Alpha"

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Alpha-
     HOWTO.html>

    Description : prsentation des systmes et des processeurs Alpha

    Version : V0.11, 6 June 1997

    Traducteur : Miodrag Vallat, miodrag@ifrance.com

    Version traduite : V0.11, 6 Juin 1997

    Commentaire : A JOUR



  1111..77..  AAsssseemmbbllyy--HHOOWWTTOO



    Auteur(s) : Konstantin Boldyshev, konst@voshod.com

    Titre-Fr : "Assembly HOWTO"

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Assembly-
     HOWTO.html>

    Description : informations concernant la programmation en
     assembleur x86

    Version :  v0.5j, June 14, 2000

    Traducteur : Franois-Ren Rideau (fare@tunes.org)

    Version traduite : v0.4l, 16 Novembre 1997

    Commentaire : EN COURS



  1111..88..  AAssttrroonnoommyy--HHOOWWTTOO



    Auteur(s) : Elwood Downey and John Huggins howto@astronomy.net

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  1.6, 2000/05/03 22:01:25

    Traducteur : Thierry Bezecourt, thbz@thbz.cx

    Version traduite :

    Commentaire : EN COURS



  1111..99..  AAXX2255--HHOOWWTTOO



    Auteur(s) : Terry Dawson, VK2KTJ, terry@perf.no.itg.telecom.com.au

    Titre-Fr :

    URL-Fr :

    Description : comment configurer le rseau AX25 (protocole radio)

    Version : v1.5, 17 October 1997

    Traducteur : Francois Romieu, romieu@ensta.fr

    Version traduite : v1.5, 17 Octobre 1997

    Commentaire : A JOUR


  1111..1100..  BBaasshh--PPrroogg--IInnttrroo--HHOOWWTTOO



    Auteur(s) : Mike G, mikkey@dynamo.com.ar

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.07, 22 June 2000

    Traducteur : Mortimer Hubin, mortimer.hubin@polymtl.ca

    Version traduite :

    Commentaire : EN COURS


  1111..1111..  BBaasshh--PPrroommpptt--HHOOWWTTOO



    Auteur(s) : Giles Orr, giles@interlog.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.76 31 December 1999

    Traducteur : Laurent Martin, l_martin@worldnet.fr

    Version traduite :

    Commentaire : EN COURS


  1111..1122..  BBeellggiiaann--HHOOWWTTOO



    Auteur(s) : Dag Wiers, dag@mind.be

    Titre-Fr : Belgian HOWTO<

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Belgian-
     HOWTO.html>

    Description : HOWTO destin aux utilisateurs belges

    Version : v1.0.24, 29 February 2000

    Traducteur : Dany Vanderroost, danyv@euronet.be

    Version traduite : v1.0.22, 17 Fvrier 2000

    Commentaire : A JOUR


  1111..1133..  BBeenncchhmmaarrkkiinngg--HHOOWWTTOO



    Auteur(s) : Andr D. Balsa, andrewbalsa@usa.net

    Titre-Fr : Benchmarking-HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Benchmarking-
     HOWTO.html>

    Description : comment valuer les performances de systmes Linux

    Version :  v0.12, 15 August 1997

    Traducteur : Steve Freeland, sfreel@cs.mcgill.CA

    Version traduite : v0.12, 15 Aot 1997

    Commentaire : A JOUR



  1111..1144..  BBeeoowwuullff--HHOOWWTTOO



    Auteur(s) : Jacek Radajewski, Douglas Eadline

    Titre-Fr : Beowulf HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Beowulf-
     HOWTO.html>


    Description : introduction  l'architecture Beowulf Supercomputeur.

    Version :  v1.1.1, 22 November 1998

    Traducteur : Emmanuel Pierre, epierre@nef.esiea.fr

    Version traduite : v1.1.1, 22 Novembre 1998

    Commentaire : A JOUR



  1111..1155..  BBoooottddiisskk--HHOOWWTTOO



    Auteur(s) : Tom Fawcett, fawcett@nynexst.com Graham Chapman,
     grahamc@zeta.org.au

    Titre-Fr : Disquettes d'amorce Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Boot-disk-
     HOWTO.html>

    Description : comment crer des disquettes d'amorage et racine

    Version : v4.0, April 2000

    Traducteur :  Frank Pavageau, pavageau@imaginet.fr

    Version traduite : 3.5, Juillet 1999

    Commentaire : EN COURS


  1111..1166..  BBoooottPPrroommpptt--HHOOWWTTOO



    Auteur(s) : Paul Gortmaker, gpg109@rsphy1.anu.edu.au

    Titre-Fr : BootPrompt-Howto

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/BootPrompt-
     HOWTO.html>

    Description : contient la liste des arguments utilisable lors de
     l'amorage de Linux et prsente les diffrents programmes
     d'amorages utilisables.

    Version : v1.2, May 15, 1999

    Traducteur : Laurent Renaud, laurent.renaud@worldnet.fr

    Version traduite : v1.14, 1er Fvrier 1998

    Commentaire : EN COURS



  1111..1177..  BBuussmmoouussee--HHOOWWTTOO



    Auteur(s) : Chris Bagwell, cbagwell@sprynet.com

    Titre-Fr : Linux Busmouse Howto

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Busmouse-
     HOWTO.html>

    Description : informations sur la compatibilit des souris sries

    Version : v2.0, 14 Feb 2000

    Traducteur : Philippe Gaucher, gaucher@easynet.fr

    Version traduite : v2.0, 14 fvrier 2000

    Commentaire : A JOUR



  1111..1188..  CC++++PPrrooggrraammmmiinngg--HHOOWWTTOO



    Auteur(s) : Al Dev, alavoor@yahoo.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v10.0, 02 June 2000

    Traducteur : Benoit Sibaud, benoit.sibaud@rd.francetelecom.fr

    Version traduite :

    Commentaire : EN COURS



  1111..1199..  CC--CC++++BBeeaauuttiiffiieerr--HHOOWWTTOO



    Auteur(s) : Al Dev, alavoor@yahoo.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v3.0, 21 April 2000

    Traducteur : Robert JACOLIN, rjacolin@yahoo.fr

    Version traduite :

    Commentaire : EN COURS



  1111..2200..  CCaabbllee--MMooddeemm--HHOOWWTTOO




    Auteur(s) : Vladimir Vuksan, vuksan@veus.hr

    Titre-Fr : Le Modem Cble

    URL-Fr :

    Version : v4.15 April 24, 2000

    Traducteur : (A REPRENDRE) Thierry Le Quau, celeborn@club-
     internet.fr

    Version traduite : v4.1, 20 Mai 1999

    Commentaire :


  1111..2211..  CCDD--WWrriittiinngg--HHOOWWTTOO



    Auteur(s) : Winfried Trmper, winni@xpilot.org

    Titre-Fr : HOWTO Graveur de CDs

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/CD-Writing-
     HOWTO.html>

    Description : comment graver des CD

    Version : v2.9.1, 05 May 2000

    Traducteur : Olivier Palliere, Olivier.Palliere@univ-savoie.fr

    Version traduite : v2.4.1, 16 December 1997

    Commentaire : EN COURS



  1111..2222..  CCDDRROOMM--HHOOWWTTOO



    Auteur(s) : Jeff Tranter, tranter@pobox.com

    Titre-Fr : Comment utiliser un lecteur de CD-ROM sous Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/CDROM-
     HOWTO.html>

    Description : informations sur la compatibilit des lecteurs de CD-
     ROM avec Linux

    Version : v1.14, 24 March 1999

    Traducteur : Bruno Cornec, bruno@victoria.frmug.org

    Version traduite : v1.14, 24 Mars 1999

    Commentaire : A JOUR






  1111..2233..  CChhiinneessee--HHOOWWTTOO



    Auteur(s) : Hong Zhang, hongz@seas.ucla.edu

    Titre-Fr : Le HOWTO chinois

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Chinese-
     HOWTO.html>

    Description : comment configurer Linux pour utiliser le jeu de
     caractres chinois

    Version : v1.04, 2 June 1998

    Traducteur :

    Version traduite : v0.1, 2 Avril 1997

    Commentaire : NE PAS TRADUIRE



  1111..2244..  CChhrroooott--BBIINNDD--HHOOWWTTOO



    Auteur(s) : Scott Wunsch, scott@wunsch.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.1, 24 June 2000

    Traducteur :

    Version traduite :

    Commentaire :



  1111..2255..  CCoommmmeerrcciiaall--HHOOWWTTOO



    Auteur(s) : poet@linuxports.com

    Titre-Fr : Linux Commercial HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Commercial-
     HOWTO.html>

    Description : liste des logiciels commerciaux pour Linux.

    Version : v5.38, 7 March 1999

    Traducteur : Bernard Choppy, choppy@imaginet.fr

    Version traduite : v5.38, 7 mars 1999


    Commentaire : A JOUR



  1111..2266..  CCoonnffiigg--HHOOWWTTOO



    Auteur(s) : Guido Gonzato, guido@ibogfs.cineca.it

    Titre-Fr : Configuration HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Configuration-
     HOWTO.html>

    Description : comment bien configurer et paramtrer en fonction de
     vos besoins votre systme Linux

    Version : v1.3.7, 6 September 1999

    Traducteur : Jean Michel Georger, Jean-
     Michel.Georger@leon.bde.espci.fr

    Version traduite : v1.2.2, 10 avril 1998

    Commentaire : EN COURS


  1111..2277..  CCoonnssuullttaannttss--HHOOWWTTOO



    Auteur(s) : Mr. Poet, poet@linuxports.com

    Titre-Fr :

    URL-Fr :

    Description : liste de consultants Linux

    Version : v9.46, 12 September 1999

    Traducteur : Olivier Le Monnier, olivier.le_monnier@tice.ac-caen.fr

    Version traduite :

    Commentaire : EN COURS


  1111..2288..  CCVVSS--RRCCSS--HHOOWWTTOO



    Auteur(s) : Al Dev (Alavoor Vasudevan), alavoor@yahoo.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v9.0, 04 June 2000

    Traducteur : Alexandre Devaure, adevaure@mail.dotcom.fr


    Version traduite :

    Commentaire : EN COURS


  1111..2299..  CCyyrriilllliicc--HHOOWWTTOO



    Auteur(s) : Alexander L. Belikoff, abel@bfr.co.il

    Titre-Fr :

    URL-Fr :

    Description : comment configurer Linux pour utiliser le jeu de
     caractres cyrilique

    Version : v4.0, 23 January 1998

    Traducteur : Jean-Christophe Fargette, jcfarget@club-internet.fr

    Version traduite :

    Commentaire : EN COURS


  1111..3300..  DDaanniisshh--HHOOWWTTOO



    Auteur(s) : Niels Kristian Bech Jensen, nkbj@sslug.dk

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v2.6, 9 March 2000

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE



  1111..3311..  DDiiaalldd--HHOOWWTTOO



    Auteur(s) : Harish Pillay, h.pillay@ieee.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v1.03, April 17, 2000

    Traducteur : Xavier Serpaggi, xavier.serpaggi@libertysurf.fr


    Version traduite : 1996

    Commentaire : EN COURS


  1111..3322..  DDiisskklleessss--HHOOWWTTOO


    Auteur(s) : Robert, Nemkin buci@math.klte.hu

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v9.0, 21 April 2000

    Traducteur : Sebastien.Blondeel@lifl.fr

    Version traduite : v0.0.3 12 Sep 1996

    Commentaire : EN COURS


  1111..3333..  DDiisskklleessss--rroooott--NNFFSS--HHOOWWTTOO



    Auteur(s) : Hans de Goedem hans@highrise.nl

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.0 30 March 1999

    Traducteur : Herve Laurent, rvlauren@club-internet.fr

    Version traduite :

    Commentaire : EN COURS



  1111..3344..  DDiissttrriibbuuttiioonn--HHOOWWTTOO



    Auteur(s) : Eric S. Raymond, esr@snark.thyrsus.com

    Titre-Fr : Howto sur les distributions de Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Distribution-
     HOWTO.html>

    Description : une liste des distributions Linux

    Version : v6.9, 8 June 2000

    Traducteur :

    Version traduite :   v6.3, 8 Mai 1999

    Commentaire :


  1111..3355..  DDNNSS--HHOOWWTTOO



    Auteur(s) : Nicolai Langfeldt, janl@math.uio.no

    Titre-Fr : DNS HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/DNS-HOWTO.html>

    Description : comment configurer le DNS

    Version :  v2.2, 11 February 1999

    Traducteur : Mathieu ARNOLD, arn_mat@club-internet.fr

    Version traduite : Version 2.2, du 11 fvrier 1999

    Commentaire : A JOUR



  1111..3366..  DDOOSS--WWiinn--ttoo--LLiinnuuxx--HHOOWWTTOO



    Auteur(s) : Guido Gonzato, guido@ibogfs.df.unibo.it

    Titre-Fr : De DOS  Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/DOS-Win-to-
     Linux-HOWTO.html>

    Description : comment passer du DOS  Linux

    Version : v1.3.2, 22 February 1999

    Traducteur : Mark Hoebeke,  mh@ebene.jouy,inra.fr

    Version traduite : v1.3.2, 22 Fvrier 1999

    Commentaire : A JOUR


  1111..3377..  DDOOSSEEMMUU--HHOOWWTTOO



    Auteur(s) : Mike Deisher, deisher@dspsun.eas.asu.edu mis  jour par
     Uwe Bonnes, bon@elektron.ikp.physik.th-darmstadt.de

    Titre-Fr : Le HOWTO dosemu

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/DOSEMU-
     HOWTO.html>

    Description :  propos de l'mulateur MS-DOS pour Linux

    Version :  dosemu-0.98.8, 24 April 1999

    Traducteur : David Sagnol, David.Sagnol@sophia.inria.fr


    Version traduite : v0.64.4, 15 March 1997

    Commentaire : EN COURS



  1111..3388..  DDVVDD--PPllaayyiinngg--HHOOWWTTOO



    Auteur(s) : Nathan Rowlan, nkr@helo.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v0.1.8 5 June 2000

    Traducteur : Jol Sagnes, joels69@club-internet.fr

    Version traduite :

    Commentaire : EN COURS



  1111..3399..  EEccoollooggyy--HHOOWWTTOO



    Auteur(s) : Werner Heuser, wehe@snafu.de, Wade W. Hampton,
     whampton@staffnet.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.6, 01 March 2000

    Traducteur : Aurelien Letort, totor@citeweb.net

    Version traduite :

    Commentaire : EN COURS


  1111..4400..  EEmmaaccss--BBeeggiinnnneerr--HHOOWWTTOO



    Auteur(s) : Jeremy D. Zawodny, jzawodn@wcnet.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.7, 14 October 1999

    Traducteur : Le Roy David, llewellyn@free.fr

    Version traduite :

    Commentaire : EN COURS


  1111..4411..  EEmmaaccssppeeaakk--HHOOWWTTOO



    Auteur(s) : Jim Van Zandt, jrv@vanzandt.mv.com

    Titre-Fr :

    URL-Fr :

    Description : comment utiliser emacspeak avec Linux

    Version : v.1.6, 10 April 1999

    Traducteur : Mamoun Alissali, alissali@lium.univ-lemans.fr

    Version traduite :

    Commentaire : EN COURS


  1111..4422..  EEnntteerrpprriissee--JJaavvaa--ffoorr--LLiinnuuxx--HHOOWWTTOO



    Auteur(s) : Gary Meyer gary@meyer.net

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v 0.1, January 1999

    Traducteur :

    Version traduite :

    Commentaire :


  1111..4433..  EEssppeerraannttoo--HHOOWWTTOO



    Auteur(s) : Wolfram Diestel, wolfram@steloj.de

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.30, August 1999

    Traducteur :

    Version traduite :


    Commentaire : NE PAS TRADUIRE


  1111..4444..  EEtthheerrnneett--HHOOWWTTOO



    Auteur(s) : Paul Gortmaker, Paul.Gortmaker@anu.edu.au

    Titre-Fr : Linux Ethernet-Howto

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Ethernet-
     HOWTO.html>

    Description : informations sur les compatibilits des cartes
     Ethernet avec Linux

    Version : v2.7, 5 May 1999

    Traducteur : Mathieu Arnold, arn_mat@club-internet.fr

    Version traduite : v2.7, 5 mai 1999

    Commentaire : A JOUR


  1111..4455..  FFiilleessyysstteemmss--HHOOWWTTOO



    Auteur(s) : Martin Hinner, mhi@penguin.cz

    Titre-Fr :

    URL-Fr :

    Description :

    Version : Version 0.7.4, 17 March 2000

    Traducteur : Ludovic Danigo, ludovic.danigo@worldonline.fr

    Version traduite :

    Commentaire : EN COURS



  1111..4466..  FFiinnnniisshh--HHOOWWTTOO



    Auteur(s) : Pekka Taipale, pjt@iki.fi

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.1f, 14 February 1996

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE



  1111..4477..  FFiirreewwaallll--HHOOWWTTOO



    Auteur(s) : Mark Grennan, markg@netplus.net

    Titre-Fr : Le HOWTO du Firewalling et des serveurs Proxy

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Firewall-
     HOWTO.html>

    Description : comment mettre en place un firewall

    Version : v0.80, Feb. 26, 2000

    Traducteur : Bernard Choppy, choppy@imaginet.fr

    Version traduite :  v0.67, 26 septembre 1999

    Commentaire : EN COURS


  1111..4488..  FFoonntt--HHOOWWTTOO



    Auteur(s) : Donovan Rebbechi,       elflord@panix.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : ????????

    Traducteur : Alexandre Gilardoni, alexandre.gilardoni@wanadoo.fr

    Version traduite :

    Commentaire : EN COURS



  1111..4499..  FFrraammeebbuuffffeerr--HHOOWWTTOO



    Auteur(s) : Alex Buell, alex.buell@tahallah.demon.co.uk

    Titre-Fr : Frambebuffer

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Framebuffer-
     HOWTO.html>

    Description : Ce document dcrit l'emploi des priphriques d'accs
      la mmoire vido avec diverses configurations matrielles munies
     de Linux.

    Version : v1.1, 22 July 1999


    Traducteur : Franois Romieu, romieu@ensta.fr

    Version traduite : v1.2, 22 Juillet 1999

    Commentaire : A JOUR


  1111..5500..  FFrraannccoopphhoonneess--HHOOWWTTOO



    Auteur(s) : Guylhem Aznar, guylhem@oeil.qc.ca

    Titre-Fr : Le French-HOWTO : Linux et la langue franaise

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/French-
     HOWTO.html>

    Description : comment configurer Linux pour utiliser les caractres
     francophones

    Version : v3.2 ; Dcembre 1999

    Traducteur : Guylhem Aznar, guylhem@oeil.qc.ca

    Version traduite : v3.2 ; Dcembre 1999

    Commentaire : A JOUR


  1111..5511..  FFrroomm--PPoowweerrUUpp--TToo--BBaasshh--PPrroommpptt--HHOOWWTTOO



    Auteur(s) :Greg O'Keefe, gcokeefe@postoffice.utas.edu.au

    Titre-Fr : De la mise sous tension  la ligne de commande de Bash

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/From-PowerUp-To-
     Bash-Prompt-HOWTO.html>

    Description : De la mise sous tension  la ligne de commande de
     Bash

    Version : v0.7, April 2000

    Traducteur : Dominique van den Broeck, obsidian@citeweb.net

    Version traduite : v0.7, Avril 2000

    Commentaire : A JOUR


  1111..5522..  FFttaappee--HHOOWWTTOO



    Auteur(s) : Claus-Justus Heine, heine@math1.rwth-aachen.de

    Titre-Fr : Ftape-HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Ftape-
     HOWTO.html>

    Description : compatibilit entre les lecteurs ftape et Linux

    Version : v3.0, August 1998

    Traducteur : Eric Festinger, eric@midix.frmug.org

    Version traduite : 17 juillet 1994 pour ftape-1.13b (Sept. 1994)

    Commentaire : EN COURS


  1111..5533..  GGCCCC--HHOOWWTTOO



    Auteur(s) : Daniel Barlow, dan@detached.demon.co.uk

    Titre-Fr :  GCC-HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/GCC-HOWTO.html>

    Description : configuration de gcc et des bibliothques de
     dveloppement

    Version : May 1999

    Traducteur : A REPRENDRE Eric.Dumas@Linux.EU.Org

    Version traduite : v1.17, 28 fvrier 1996

    Commentaire :


  1111..5544..  GGeerrmmaann--HHOOWWTTOO



    Auteur(s) : Winfried Trmper, winni@xpilot.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.6, 19 March 1997

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE



  1111..5555..  GGlliibbcc22--HHOOWWTTOO



    Auteur(s) : Eric Green, ejg3@cornell.edu

    Titre-Fr : HOWTO Glibc 2

    URL-Fr :
     <http://www.freenix.org/unix/linux/HOWTO/Glibc2-HOWTO.html>

    Description : comment installer et migrer vers la bibliothque
     Glibc2
    Version : v1.6, 22 June 1998

    Traducteur : Robert JACOLIN, rjacolin@yahoo.fr

    Version traduite : v1.5, 8 fvrier 1998

    Commentaire : EN COURS




  1111..5566..  HHaarrddwwaarree--HHOOWWTTOO



    Titre-Fr : HOWTO Compatibilit Linux - Matriel

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Hardware-
     HOWTO.html>

    Description : donne une liste de priphriques et matriel qui sont
     connus pour fonctionner avec Linux

    Auteur(s) : Patrick Reijnen, patrickr@bart.nl

    Version : v99.3, 28 September 1999

    Traducteur : Jacques Chion, Jacques.Chion@wanadoo.fr

    Version traduite : v99.3, 28 Septembre 1999

    Commentaire : A JOUR



  1111..5577..  HHeebbrreeww--HHOOWWTTOO



    Auteur(s) : Yair G. Rajwan, yair@hobbes.jct.ac.il

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.4, 12 September 1995

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE


  1111..5588..  HHeelllleenniicc--HHOOWWTTOO



    Auteur(s) : Fotis Georgatos, gef@hellug.gr

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.991127, 27 November 1999

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE



  1111..5599..  HHOOWWTTOO--HHOOWWTTOO



    Auteur(s) : Mark F. Komarinski, markk@cgipc.com

    Titre-Fr : HOWTO-HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/HOWTO-
     HOWTO.html>

    Description : Explique les outils, les procdures, et donne des
     conseils aux auteurs de HOWTO.

    Version : v1.85, May 29, 2000

    Traducteur : Nicolas Duboc, duboc@essi.fr

    Version traduite : v1.4, 17 Mars

    Commentaire :  EN COURS



  1111..6600..  HHOOWWTTOO--IINNDDEEXX



    Auteur(s) : Guylhem Aznar, guylhem@oeil.qc.ca

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v3.7, May 2000

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE



  1111..6611..  HHPP--HHOOWWTTOO



    Auteur(s) : Bruno.Cornec@medasys-digital-systems.fr

    Titre-Fr :

    URL-Fr :

    Description :

    Version :

    Traducteur : Bruno.Cornec@medasys-digital-systems.fr

    Version traduite :

    Commentaire : EN COURS



  1111..6622..  IInnggrreessIIII--HHOOWWTTOO



    Auteur(s) : Pal Domokos, pal.domokos@usa.ne

    Titre-Fr :

    URL-Fr :

    Description :

    Version : V1.1, 20 June, 2000

    Traducteur :

    Version traduite :

    Commentaire :



  1111..6633..  IInnssttaallllaattiioonn--HHOOWWTTOO



    Auteur(s) : Eric S. Raymond, esr@snark.thyrsus.com

    Titre-Fr : Le Linux Installation HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Installation-
     HOWTO.html>

    Description : comment obtenir et installer Linux

    Version : v4.23, 26 May 2000

    Traducteur : Eric Jacoboni, jaco@mail.dotcom.fr

    Version traduite : v4.13, 30 Aot 1998

    Commentaire : EN COURS


  1111..6644..  IInnttrraanneett--SSeerrvveerr--HHOOWWTTOO



    Auteur(s) : Pramod Karnad, karnad@indiamail.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v2.11, 7 August 1997

    Traducteur : Sameh Ghane, ghane@fiifo.u-psud.fr

    Version traduite :

    Commentaire : EN COURS


  1111..6655..  IIPP--MMaassqquueerraaddee--HHOOWWTTOO



    Auteur(s) : David Ranch, dranch@trinnet.net, Ambrose Au,
     ambrose@writeme.com

    Titre-Fr : Linux IP Masquerade HOWTO

    URL-Fr :

    Description :

    Version :   v1.85, May 29, 2000

    Traducteur : Mathieu Arnold, arn_mat@club-internet.fr

    Version traduite : v1.50, 7 Fvrier 1999

    Commentaire : EN COURS


  1111..6666..  IIPPCCHHAAIINNSS--HHOOWWTTOO



    Auteur(s) : Paul Russell Paul.Russell@rustcorp.com.au

    Titre-Fr : IPCHAINS-Howto

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/IPCHAINS-
     HOWTO.html>

    Description : Gestion des nouvelles rgles pare-feu.

    Version : v1.0.7, 12 March 1999

    Traducteur : Arnaud Launay, asl@launay.org

    Version traduite : v1.0.7, 12 mars 1999

    Commentaire : A JOUR


  1111..6677..  IIPPXX--HHOOWWTTOO



    Auteur(s) :Terry Dawson, terry@perf.no.itg.telecom.com.au

    Titre-Fr : Linux IPX-HOWTO Version Franaise


    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/IPX-HOWTO.html>

    Description : comment installer et configurer un rseau IPX

    Version : v2.3, 06 May 1998

    Traducteur : Gregory Lajon, glajon@mail.dotcom.fr

    Version traduite :  v2.3, 06 Mai 1998

    Commentaire : A JOUR



  1111..6688..  IIRR--HHOOWWTTOO



    Auteur(s) : Werner Heuser, wehe@snafu.de

    Titre-Fr : Linux IR HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/IR-HOWTO.html>

    Description : introduction  Linux et aux priphriques infrarouges

    Version : v2.8, 20 September 1999

    Traducteur : Mathieu Arnold, arn_mat@club-internet.fr

    Version traduite : v2.4, 9 Fvrier 1999

    Commentaire : EN COURS


  1111..6699..  IISSPP--HHooookkuupp--HHOOWWTTOO



    Auteur(s) : Egil Kvaleberg, egilk@sn.no

    Titre-Fr : ISP-Hookup-HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/ISP-Hookup-
     HOWTO.html>

    Description : conseils pour la connexion  Internet avec Linux

    Version : v1.26, 5 March 1998

    Traducteur : Eric Jacoboni, jaco@mail.dotcom.fr

    Version traduite : v1.24, 14 Fvrier 1997

    Commentaire : A JOUR



  1111..7700..  IISSPP--SSeettuupp--RReeddHHaatt--HHOOWWTTOO



    Auteur(s) : Anton Chuvakin, anton@chuvakin.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.0.1 4 April 2000

    Traducteur :

    Version traduite :

    Commentaire :



  1111..7711..  IIttaalliiaann--HHOOWWTTOO



    Auteur(s) : Marco ``Gaio'' Gaiarin, gaio@dei.unipd.it

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.2.0, 3 November 1998

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE



  1111..7722..  JJaavvaa--CCGGII--HHOOWWTTOO



    Auteur(s) : David H. Silber, dhs@orbits.com

    Titre-Fr : Java CGI HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Java-CGI-
     HOWTO.html>

    Description : comment activer des scripts CGI utilisant Java

    Version : v0.5, 1 December 1998

    Traducteur : Xavier Cazin, xavier@ora.com

    Version traduite : v0.4, 18 Novembre 1996

    Commentaire : EN COURS


  1111..7733..  JJaavvaaSSttaattiioonn--HHOOWWTTOO



    Auteur(s) : Robert S. Dubinski

    Titre-Fr :

    URL-Fr :

    Description :

    Version : 2000-Jun-16

    Traducteur :

    Version traduite :

    Commentaire :


  1111..7744..  JJaazz--DDrriivvee--HHOOWWTTOO



    Auteur(s) : Herbert S. DaSilva

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.8, 12 January 2000

    Traducteur : Carine Bournez, cbournez@if.insa-lyon.fr

    Version traduite :

    Commentaire : EN COURS



  1111..7755..  KKeerrnneell--HHOOWWTTOO



    Auteur(s) : Brian Ward, bri@blah.math.tu-graz.ac.at

    Titre-Fr : Le HOWTO du noyau de Linux (Kernel HOWTO)

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Kernel-
     HOWTO.html>

    Description : mettre  jour et compiler le noyau Linux

    Version :  v1.0, 5 June 1999

    Traducteur : Christophe Deleuze, Christophe.Deleuze@lip6.fr

    Version traduite : Version 1.0, 5 juin 1999

    Commentaire : A JOUR



  1111..7766..  KKeeyybbooaarrdd--aanndd--CCoonnssoollee--HHOOWWTTOO



    Auteur(s) : Andries Brouwer, aeb@cwi.nl

    Titre-Fr : Linux Keyboard HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/MGR-HOWTO.html>

    Description : informations sur le clavier, la console et les
     caractres non ASCII

    Version : v2.8, 25 February 1998

    Traducteur : Laurent Cheylus cheylus@cc.ec-lyon.fr

    Version traduite : v2.1, 8 Novembre 1995

    Commentaire : EN COURS



  1111..7777..  KKiicckkSSttaarrtt--HHOOWWTTOO



    Auteur(s) : Martin Hamilton, martinh@gnu.org

    Titre-Fr : RedHat Linux KickStart HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/KickStart-
     HOWTO.html>

    Description :

    Version :  v0.2, 11 January 1999

    Traducteur : Laurent Martin, l_martin@worldnet.fr

    Version traduite : v0.1, 28 septembre 1998

    Commentaire : EN COURS



  1111..7788..  KKiioosskk--HHOOWWTTOO



    Auteur(s) : Gene Wilburn, genew@rom.on.ca

    Titre-Fr :

    URL-Fr : <http://www.freenix.org/unix/linux/HOWTO/Kiosk-HOWTO.html>

    Description : Ce document se veut un guide pour la mise en place
     d'une borne interactive de type www utilisant Linux, X11R6, Fvwm2,
     Navigator 4.X et uneboule de pointage.

    Version : v1.0, Octobre 1999

    Traducteur :  Francois Romieu, romieu@ensta.fr

    Version traduite : v1.0, Octobre 1999

    Commentaire : A JOUR



  1111..7799..  KKooddaakk--DDiiggiittaallccaamm--HHOOWWTTOO



    Auteur(s) : David M. Burley, khemicals@stampede.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.0.7, 20 February 2000

    Traducteur :

    Version traduite :

    Commentaire :



  1111..8800..  LLaappttoopp--HHOOWWTTOO



    Auteur(s) : Werner Heuser, wehe@snafu.de

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v2.2, 2 December 1999

    Traducteur : Mathieu Arnold, arn_mat@club-internet.fr

    Version traduite :

    Commentaire : EN COURS


  1111..8811..  LLaarrggee--DDiisskk--HHOOWWTTOO


    Auteur(s) : Andries Brouwer, aeb@cwi.nl

    Titre-Fr : Disques de grande capacits

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Large-Disk-
     HOWTO.html>

    Description : HOWTO - Disques de grande capacit

    Version : v2.2m, 15 February 2000

    Traducteur : Xavier SERPAGGI, xavier.serpaggi@libertysrf.fr

    Version traduite : v2.2m, 15 fvrier 2000

    Commentaire : A JOUR


  1111..8822..  LLDDAAPP--HHOOWWTTOO



    Auteur(s) : Luiz Ernesto Pinheiro Malere, malere@yahoo.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.01, 15 February 2000

    Traducteur :  Francois Petillon, fanch@netra.uic.asso.fr

    Version traduite :

    Commentaire : EN COURS



  1111..8833..  LLiinnuuxx--FFrroomm--SSccrraattcchh--HHOOWWTTOO



    Auteur(s) : Gerard Beekmans

    Titre-Fr :

    URL-Fr :

    Description :

    Version : Version 2.2, April 3rd, 2000

    Traducteur : Aurelien Dumez, aurelien.dumez@wanadoo.fr

    Version traduite :

    Commentaire : EN COURS



  1111..8844..  LLiinnuuxxDDoocc++EEmmaaccss++IIssppeellll--HHOOWWTTOO



    Auteur(s) : Philippe MARTIN, feloy@wanadoo.fr

    Titre-Fr :

    URL-Fr :

    Description : assistance sur l'criture et la traduction de HowTo

    Version : v0.5, 28 April 1998

    Traducteur :  Philippe MARTIN, feloy@wanadoo.fr

    Version traduite : V0.5, 28 Avril 1998

    Commentaire : A JOUR



  1111..8855..  LLooooppbbaacckk--EEnnccrryypptteedd--FFiilleessyysstteemm--HHOOWWTTOO



    Auteur(s) : Ryan T. Rhea, zzrhear@pobox.winthrop.edu

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.1, 29 November 1999

    Traducteur : Samuel Tribehou, samuel-tribehou@mail.cpod.fr

    Version traduite :

    Commentaire : EN COURS


  1111..8866..  LLVVMM--HHOOWWTTOO



    Auteur(s) :  Richard Allen ra@ra.is

    Titre-Fr :

    URL-Fr :

    Description :

    Version : Version 0.0.2

    Traducteur : ric Cano, cano@cern.ch

    Version traduite :

    Commentaire : EN COURS


  1111..8877..  MMaaiill--AAddmmiinniissttrraattoorr--HHOOWWTTOO



    Auteur(s) : Guylhem Aznar, guylhem@oeil.qc.ca

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v3.1, July 1999

    Traducteur : Dimitri Ara, dimitri.ara@wanadoo.fr

    Version traduite :

    Commentaire : EN COURS


  1111..8888..  MMaaiill--UUsseerr--HHOOWWTTOO



    Auteur(s) : Eric S. Raymond, esr@thyrsus.com

    Titre-Fr : Linux et le Courrier Electronique - HOWTO


    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Mail-HOWTO.html>

    Description : Informations sur les serveurs de courrier
     lectronique et leurs clients

    Version : v2.2, January 1999

    Traducteur : Frederic Gacquer, Frederic.Gacquer@univ-orleans.fr

    Version traduite : v2.0, Janvier 1998

    Commentaire : EN COURS


  1111..8899..  MMaajjoorrddoommoo--MMaajjoorrCCooooll--HHOOWWTTOO



    Auteur(s) : John Archie, johnarchie@emeraldis.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.0, 10 November 1999

    Traducteur : JC, jcornavi@club-internet.fr

    Version traduite :

    Commentaire : EN COURS


  1111..9900..  MMGGRR--HHOOWWTTOO



    Auteur(s) : Vincent Broman

    Titre-Fr : Le systme MGR Window

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/MGR-HOWTO.html>

    Description : informations sur les cartes MGR sous Linux

    Version : 30 May 1996

    Traducteur : ?????????

    Version traduite : 30 Mai 1996

    Commentaire : A JOUR



  1111..9911..  MMIILLOO--HHOOWWTTOO



    Auteur(s) : David A. Rusling, david.rusling@reo.mts.dec.com

    Titre-Fr : Utilisation de MILO (Alpha Miniloader Howto)


    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/MILO-HOWTO.html>

    Description : fonctionnement du Miniloader, initialisation et
     dmarrage de Linux sous Alpha.

    Version :  v0.84, 6th December 1996

    Traducteur : Miodrag Vallat, miodrag@ifrance.com

    Version traduite : v0.84, 6 Dcembre 1996

    Commentaire : A JOUR



  1111..9922..  MMIIPPSS--HHOOWWTTOO



    Auteur(s) : Ralf Bchle, ralf@gnu.org

    Titre-Fr : MIPS HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/MIPS-HOWTO.html>

    Description : Ce MANUEL dcrit le portage MIPS du systme
     d'exploitation Linux, des problmes courants et de leur solutions
     ainsi que de certaines  possibilits (voire plus).

    Version :   v0.1, 31 March 1999

    Traducteur : Robert JACOLIN, rjacolin@yahoo.fr

    Version traduite : V 0.1, 13 mars 1998

    Commentaire : A JOUR



  1111..9933..  MMooddeemm--HHOOWWTTOO



    Auteur(s) :  David S.Lawyer, bf347@lafn.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v0.07, 28 November 1999

    Traducteur : Guillaume Valadon, doug@multimania.com

    Version traduite :

    Commentaire : EN COURS



  1111..9944..  MMPP33--HHOOWWTTOO




    Auteur(s) : Philip Kerr, phil@websentric.com

    Titre-Fr : Linux MP3 HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/MP3-HOWTO.html>

    Description : Ce document dcrit le matriel, les logiciels et les
     procdures   suivre pour crer et couter des fichiers son MP3
     sous Linux.

    Version : v1.40, April 2000

    Traducteur : Arnaud Gomes-do-Vale, arnaud@carrosse.frmug.org

    Version traduite : v1.10, Septembre 1999

    Commentaire : EN COURS



  1111..9955..  MMuullttii--DDiisskk--HHOOWWTTOO



    Auteur(s) :  Stein Gjoen, sgjoen@nyx.net

    Titre-Fr : Les systmes multi-disques

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Multi-Disk-
     HOWTO.html>

    Description :

    Version :  v0.23d, 7 November 1999

    Traducteur : Patrick.Loiseleur@lri.fr

    Version traduite : v0.19b, 10 septembre 1998

    Commentaire : EN COURS



  1111..9966..  MMuullttiiccaasstt--HHOOWWTTOO



    Auteur(s) : Juan-Mariano de Goyeneche, jmseyas@dit.upm.es

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v1.0, 20 March 1998

    Traducteur : Jean Charles Delepine, delepine@u-picardie.fr

    Version traduite :

    Commentaire : EN COURS




  1111..9977..  MMuullttiiOOSS--HHOOWWTTOO



    Auteur(s) : Robert W. Schultz

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v0.4, 17 Feb 2000

    Traducteur : Alexis MOREAU, alexis.moreau@oreka.com

    Version traduite :

    Commentaire : EN COURS




  1111..9988..  MMuutttt--GGnnuuPPGG--PPGGPP--HHOOWWTTOO



    Auteur(s) : Andrs Seco and J.Horacio M.G.

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v1.2, February 2000

    Traducteur : Christophe pernod, christophe.pernod@francetelecom.fr

    Version traduite :

    Commentaire : EN COURS



  1111..9999..  NNCC--HHOOWWTTOO



    Auteur(s) : Kris Buytaert, Kris.Buytaert@advalvas.be

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v0.99p18, 26 December 1999

    Traducteur :

    Version traduite :

    Commentaire :


  1111..110000..  NNCCDD--HHOOWWTTOO



    Auteur(s) : Kris Buytaert, Kris.Buytaert@advalvas.be

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.99p15, Sept 1999

    Traducteur :

    Version traduite :

    Commentaire :



  1111..110011..  NNEETT33--44HHOOWWTTOO



    Auteur(s) : poet@linuxports.com

    Titre-Fr : Linux NET4-HOWTO, Rseau sous Linux.

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/NET-HOWTO.html>

    Description : comment configurer un rseau TCP/IP sous Linux

    Version : v1.6.5, March 22, 2000

    Traducteur : Jacques.Chion@wanadoo.fr

    Version traduite : v1.6.2, Dcembre 1999

    Commentaire : EN COURS



  1111..110022..  NNeettwwoorrkkiinngg--OOvveerrvviieeww--HHOOWWTTOO


    Auteur(s) : Daniel Lopez Ridruejo, ridruejo@rawbyte.com

    Titre-Fr : Possibilits rseau de Linux HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Networking-
     Overview-HOWTO.html>

    Description :

    Version : v0.31, 17 September 1999

    Traducteur : Mathieu ARNOLD, arn_mat@club-internet.fr

    Version traduite : v0.2, 10 Juillet 1998

    Commentaire : EN COURS



  1111..110033..  NNFFSS--HHOOWWTTOO


    Auteur(s) : Nicolai Langfeldt, janl@math.uio.no

    Titre-Fr : Linux NFS HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/NFS-HOWTO.html>

    Description : comment configurer clients et serveurs NFS sous Linux

    Version : v1.0, 1 October 1999

    Traducteur : Christophe Deleuze, deleuze@rp.lip6.fr

    Version traduite : v1.0, 1er octobre 1999

    Commentaire : A JOUR


  1111..110044..  NNIISS--HHOOWWTTOO



    Auteur(s) : Thorsten Kukuk, kukuk@vt.uni-paderborn.de

    Titre-Fr : Le Linux NIS(YP)/NYS/NIS+ HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/NIS-HOWTO.html>

    Description : informations sur l'utilisation de NIS/YP sur des
     systmes Linux

    Version :  v1.0, 9 March 1999

    Traducteur : Frdric Veynachter, frederic.veynachter@hol.fr

    Version traduite : Version 0.12, 12 Juin 1998

    Commentaire : EN COURS


  1111..110055..  OOnnlliinnee--TTrroouubblleesshhoooottiinngg--HHOOWWTTOO



    Auteur(s) : Howard Mann, howardm@xmission.com

    Titre-Fr : Online-Troubleshooting-HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Online-
     Troubleshooting-HOWTO.html>

    Description : Ce document dirigera les utilisateurs de Linux vers
     les ressources disponibles sur Internet, qui constitue un vaste
     rservoir d'informations utiles dans la rsolution des problmes
     sous Linux.

    Version : v0.5, 18 September 1999

    Traducteur : Benoit Sibaud, sibaud@poste.isima.fr

    Version traduite : v0.5, 18 Septembre 1999

    Commentaire : A JOUR

  1111..110066..  OOppttiiccaall--DDiisskk--HHOOWWTTOO



    Auteur(s) : Skip Rye, abr@preferred.com

    Titre-Fr : Linux - Optical Disk HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Optical-Disk-
     HOWTO.html>

    Description : Ce document dcrit l'installation et la configuration
     des lecteurs de disques optiques sous Linux.

    Version : v1.6, 11 December 1998

    Traducteur : Romieu Franois, romieu@ensta.fr

    Version traduite : v1.6, 11 Dcembre 1998

    Commentaire : A JOUR


  1111..110077..  OOrraaccllee--77--HHOOWWTTOO



    Auteur(s) : Paul Haigh, paul@nailed.demon.co.uk

    Titre-Fr : Oracle Database HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Oracle-
     HOWTO.html>

    Description : guide pour installer et configurer le Serveur de Base
     de Donnes Oracle sur un systme Linux

    Version :  v1.2, 04 August 1998

    Traducteur : Stephane LEE CHIP HING, slee@ile-maurice.com

    Version traduite : v1.2, 04 aot 1998

    Commentaire : A JOUR



  1111..110088..  OOrraaccllee88--HHOOWWTTOO



    Auteur(s) : Stephen Darlington,stephen@zx81.org.uk

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  1.14 2000/06/19

    Traducteur :

    Version traduite :


    Commentaire :



  1111..110099..  PPaallmmOOSS--HHOOWWTTOO



    Auteur(s) : David H. Silber pilot@orbits.com

    Titre-Fr : Bureau Palm OS

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/PalmOS-
     HOWTO.html>

    Description : comment utiliser votre appareil sous Palm OS avec
     votre systme Linux.

    Version : v1.1.1, 28 February 1999

    Traducteur : Frank Pavageau, pavageau@imaginet.fr

    Version traduite : v1.0.0, 20 septembre 1998

    Commentaire : EN COURS


  1111..111100..  PPaarraalllleell--PPrroocceessssiinngg--HHOOWWTTOO



    Auteur(s) : Hank Dietz, pplinux@ecn.purdue.edu

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v980105, 5 January 1998

    Traducteur : Christophe Pernod, christophe.pernod@francetelecom.fr

    Version traduite :

    Commentaire : EN COURS


  1111..111111..  PPCCII--HHOOWWTTOO



    Auteur(s) : Michael Will, Michael.Will@student.uni-tuebingen.de

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.6g, 30 March 1997

    Traducteur : Mathieu Arnold, arn_mat@club-internet.fr

    Version traduite : version 0.5h, 15 Novembre 1995

    Commentaire : EN COURS


  1111..111122..  PPCCMMCCIIAA--HHOOWWTTOO



    Auteur(s) : David Hinds, dhinds@pcmcia.sourceforge.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v2.46, 1 December 1999

    Traducteur : Olivier BALUAIS, Olivier.BALUAIS@hmgpc117.hmg.inpg.fr

    Version traduite :

    Commentaire : EN COURS



  1111..111133..  PPLLIIPP--IInnssttaallll--HHOOWWTTOO



    Auteur(s) : Gilles Lamiral, lamiral@mail.dotcom.fr

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.22, 16 June 2000

    Traducteur : Jolle Cornavin, jcornavi@club-internet.fr

    Version traduite :

    Commentaire : EN COURS



  1111..111144..  pphhhhttttppdd--HHOOWWTTOO



    Auteur(s) : Zach Brown

    Titre-Fr :

    URL-Fr :

    Description :

    Version : ???

    Traducteur :

    Version traduite :


    Commentaire :



  1111..111155..  PPHHPP--HHOOWWTTOO



    Auteur(s) :  Al Dev,  alavoor@yahoo.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v5.0, 14 May 2000

    Traducteur : Emmanuel Seyman, seyman@efrei.fr

    Version traduite :

    Commentaire : EN COURS



  1111..111166..  PPLLIIPP--IInnssttaallll--HHOOWWTTOO



    Auteur(s) : Gilles Lamiral, lamiral@mail.dotcom.fr

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.15, 26 November 1999

    Traducteur :

    Version traduite :

    Commentaire :



  1111..111177..  PPlluugg--aanndd--PPllaayy--HHOOWWTTOO



    Auteur(s) : David S.Lawyer, bf347@lafn.org

    Titre-Fr : HOWTO Linux Plug-and-Play

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Plug-and-Play-
     HOWTO.html>

    Description : Aide  l'utilisation et  la comprhension des
     priphriques Plug-and-Play.

    Version : v0.11, May 2000

    Traducteur : Albert-Paul Bouillot, apb@club-internet.fr

    Version traduite : v0.08, 28 Novembre 1999

    Commentaire : EN COURS



  1111..111188..  PPoolliisshh--HHOOWWTTOO



    Auteur(s) : Sergiusz Pawlowicz, ser@arch.pwr.wroc.pl

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v2.1, 8 February 1999

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE



  1111..111199..  PPoorrttuugguueessee--HHOOWWTTOO



    Auteur(s) : Carlos Augusto Moreira dos Santos,
     casantos@cpmet.ufpel.tche.br

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v3.2, 24 May 1999

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE



  1111..112200..  PPoossttggrreeSSQQLL--HHOOWWTTOO



    Auteur(s) : Al Dev (Alavoor Vasudevan), aldev@hotmail.com

    Titre-Fr : Database-SQL-RDBMS HOW-TO pour Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Database-
     HOWTO.html>

    Description : comment configurer PostgreSQL comme serveur de base
     de donnes


    Version : v26.0, 24 June 2000

    Traducteur : Albert-Paul Bouillot, apb@club-internet.fr

    Version traduite :  v13.0,23 Octobre 1999

    Commentaire : EN COURS


  1111..112211..  PPPPPP--HHOOWWTTOO



    Auteur(s) : Robert Hart, hartr@hedland.edu.au

    Titre-Fr : Linux PPP Howto

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/PPP-HOWTO.html>

    Description : Informations sur l'utilisation de PPP sous Linux

    Version : v3.0, 31 March 1997

    Traducteur : Ren Cougnenc, Antoine Levavasseur, levavass@efrei.fr

    Version traduite : v3.0, 31 March 1997

    Commentaire : A JOUR


  1111..112222..  PPrriinnttiinngg--HHOOWWTTOO



    Auteur(s) : Grant Taylor, gtaylor+pht@picante.com

    Titre-Fr : Printing-HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Printing-
     HOWTO.html>

    Description : comment utiliser les programmes d'impressions sous
     Linux

    Version : Version 4.5, Feb 2000

    Traducteur :  Jean-Michel VANSTEENE, Jean-Michel.Vansteene@bull.net

    Version traduite :  v3.14, 23 Septembre 1997, traduction 12
     Novembre 1997

    Commentaire : EN COURS


  1111..112233..  PPrriinnttiinngg--UUssaaggee--HHOOWWTTOO



    Auteur(s) : Mark Komarinski, markk@auratek.com

    Titre-Fr : Le Linux Printing Usage HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Printing-Usage-
     HOWTO.html>


    Description : Comment utiliser le systme d'impression pour
     diffrents type de fichiers

    Version : v1.2.2, 6 February 1998

    Traducteur : Pierre Tane, tanep@bigfoot.com

    Version traduite : v1.2.2, 6 fvrier 1998

    Commentaire : A JOUR


  1111..112244..  PPrroocceessss--MMoonniittoorr--HHOOWWTTOO



    Auteur(s) : Al Dev, alavoor@yahoo.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v5.0, 21 April 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1111..112255..  PPrrooggrraamm--LLiibbrraarryy--HHOOWWTTOO



    Auteur(s) : David A. Wheeler

    Titre-Fr :

    URL-Fr :

    Description :

    Version : version 0.60, 27 April 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1111..112266..  PPssiioonn--HHOOWWTTOO



    Auteur(s) : Hans Kugler, der.hans@LuftHans.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.0.6, Nov 1999

    Traducteur :

    Version traduite :

    Commentaire :



  1111..112277..  QQmmaaiill--VVMMaaiillMMggrr--CCoouurriieerr--iimmaapp--HHOOWWTTOO



    Auteur(s) : Dan Kuykendall, dan@kuykendall.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.4, 23 April 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1111..112288..  QQuuaakkee--HHOOWWTTOO



    Auteur(s) : Bob Zimbinski (bobz@mr.net) , Brett A. Thomas, Mike
     Hallock (mikeh@medina.net)

    Titre-Fr : Linux Quake HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Quake-
     HOWTO.html>

    Description :

    Version : v1.0.1.14, 30 August 1998

    Traducteur : Eric Maisonobe, viret@nat.fr

    Version traduite : v1.0.1.14, 30 Aot 1998

    Commentaire : A JOUR


  1111..112299..  RReeaaddiinngg--LLiisstt--HHOOWWTTOO



    Auteur(s) : Eric S. Raymond, esr@thyrsus.com

    Titre-Fr : Une Bibliographie Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Reading-List-
     HOWTO.html>


    Description : livres intressants concernant Linux

    Version : v1.11, 23 March 2000

    Traducteur : Christophe Pernod, christophe.pernod@francetelecom.fr

    Version traduite : 1.2, 29 Novembre 1997

    Commentaire : EN COURS


  1111..113300..  RReeddHHaatt--CCDD--HHOOWWTTOO



    Auteur(s) : Morten Kjeldgaard, mok@imsb.au.dk et Peter von der Ah,
     pahe+rhcd@daimi.au.dk

    Titre-Fr :

    URL-Fr :

    Description :

    Version : 2000/03/02 16:28:37, Revision: 1.34

    Traducteur : Thierry Danis, danis@sagem.fr

    Version traduite :v.00, 9 septembre 1998

    Commentaire : EN COURS


  1111..113311..  RRoooott--RRAAIIDD--HHOOWWTTOO



    Auteur(s) : Michael A. Robinton, michael@bzs.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.12, May 2, 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1111..113322..  RRPPMM--HHOOWWTTOO



    Auteur(s) : Donnie Barnes, djb@redhat.com

    Titre-Fr : RPM HOWTO

    URL-Fr :  <http://www.freenix.org/HOWTO/RPM-HOWTO.html>

    Description :

    Version : V3.0 3 November 1999

    Traducteur : Eric Festinger, eric@midix.frmug.org

    Version traduite : v2.0, 8 Avril 1997

    Commentaire : EN COURS


  1111..113333..  SSCCSSII--PPrrooggrraammmmiinngg--HHOOWWTTOO



    Auteur(s) : Heiko Eifeldt, heiko@colossus.escape.de

    Titre-Fr : Le HOWTO Linux de la programmation SCSI

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/SCSI-
     Programming-HOWTO.html>

    Description : informations sur la programmation de l'interface SCSI
     gnrique Linux

    Version : v1.5, 7 May 1996

    Traducteur : Thierry Danis, danis@sagem.fr

    Version traduite : v1.5, 7 Juin 1996

    Commentaire : A JOUR


  1111..113344..  SSeeccuurree--PPrrooggrraammss--HHOOWWTTOO



    Auteur(s) : David A. Wheeler, dwheeler@dwheeler.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : Version 2.20, 22 July 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1111..113355..  SSeeccuurriinngg--DDoommaaiinn--HHOOWWTTOO



    Auteur(s) : Christopher Neufeld, neufeld@physics.utoronto.ca

    Titre-Fr :

    URL-Fr :

    Description :


    Version : version 0.5. 1999/12/23

    Traducteur :

    Version traduite :

    Commentaire :


  1111..113366..  SSeeccuurriittyy--HHOOWWTTOO



    Auteur(s) : Kevin Fenzi, kevin@scrye.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.1.1, 17 March 2000

    Traducteur : Sbastien TRICAUD, nos21@club-internet.fr

    Version traduite :

    Commentaire : EN COURS


  1111..113377..  SSeerrbbiiaann--HHOOWWTTOO



    Auteur(s) : Zoltan Csala,   zolika@sezampro.PRVO-SKLONI-OVO.yu

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.0, November 1998

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE


  1111..113388..  SSeerriiaall--HHOOWWTTOO



    Auteur(s) : David S.Lawyer, bf347@lafn.org

    Titre-Fr :

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Serial-
     HOWTO.html>

    Description :

    Version : v2.07 May 2000

    Traducteur : Eric Festinger, eric@midix.frmug.org

    Version traduite : v1.11, 15 Novembre 1997

    Commentaire : EN COURS


  1111..113399..  SSeerriiaall--PPrrooggrraammmmiinngg--HHOOWWTTOO



    Auteur(s) : Peter H. Baumann, Peter.Baumann@dlr.de

    Titre-Fr : Le Linux Serial Programming HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Serial-
     Programming-HOWTO.html>

    Description : comment dvelopper avec les ports sries

    Version : v1.0, 22 January 1998

    Traducteur : Romuald KOCHER, romuald.kocher@dial.oleane.com

    Version traduite : v1.0, 22 janvier 1998

    Commentaire : A JOUR


  1111..114400..  SShhaaddooww--PPaasssswwoorrdd--HHOOWWTTOO



    Auteur(s) : Michael H. Jackson, mhjack@tscnet.com

    Titre-Fr : Linux Shadow Password HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Shadow-Password-
     HOWTO.html>

    Description : comment obtenir, installer et configurer les mots de
     passe shadow

    Version : v1.3, 3 April 1996

    Traducteur : Igor.Genibel@emi.u-bordeaux.fr

    Version traduite : v1.3, 3 Avril 1996

    Commentaire :  A JOUR



  1111..114411..  SSlloovveenniiaann--HHOOWWTTOO



    Auteur(s): Primoz Peterlin, primoz.peterlin@biofiz.mf.uni-lj.si

    Titre-Fr :

    URL-Fr :

    Description :


    Version : v2.9, 15 February 1999

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE



  1111..114422..  SSMMBB--HHOOWWTTOO



    Auteur(s) : David Wood, dwood@plugged.net.au

    Titre-Fr : SMB HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/SMB-HOWTO.html>

    Description : comment utiliser le protocole Session Message Block

    Version : v1.3, 20 April 2000

    Traducteur : Mathieu ARNOLD, arn_mat@club-internet.fr

    Version traduite : v1.0, 10 Aot 1996

    Commentaire : EN COURS


  1111..114433..  SSMMPP--HHOOWWTTOO



    Auteur(s) : David Mentr, David.Mentre@irisa.fr

    Titre-Fr : Linux SMP HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/SMP-HOWTO.html>

    Description :  passe en revu les principaux problmes lis la
     configuration SMP sous Linux.

    Version : v1.9, 13 January 2000

    Traducteur : Ludovic Danigo, Ludovic.Danigo@wanadoo.fr

    Version traduite : v1.9, 13 janvier 2000

    Commentaire : A JOUR


  1111..114444..  SSooffttwwaarree--BBuuiillddiinngg--HHOOWWTTOO


    Auteur(s) : Mendel Leo Cooper, thegrendel@theriver.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version :   v1.91, 27 July 1999

    Traducteur : Arnaud Abailly, abailly@nordnet.fr

    Version traduite :

    Commentaire : EN COURS


  1111..114455..  SSooffttwwaarree--RRAAIIDD--00..44xx--HHOOWWTTOO


    Auteur(s) : Linas Vepstas, linas@linas.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.54, 21 November 1998

    Traducteur : Francois romieu, romieu@nic.fr

    Version traduite :

    Commentaire : EN COURS


  1111..114466..  SSooffttwwaarree--RRAAIIDD--HHOOWWTTOO


    Auteur(s) : Jakob OEstergaard, jakob@ostenfeld.dk

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v. 0.90.7 19th of January 2000

    Traducteur : Francois romieu, romieu@nic.fr

    Version traduite :

    Commentaire : EN COURS


  1111..114477..  SSooffttwwaarree--RReelleeaassee--PPrraaccttiiccee--HHOOWWTTOO



    Auteur(s) : Eric S. Raymond, esr@thyrsus.com

    Titre-Fr : HOWTO sur la publication de logiciels

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Software-
     Release-Practice-HOWTO.html>

    Description :

    Version : 2.3, 1 June 2000

    Traducteur : Thierry Bezecourt , thbzcrt@worldnet.fr

    Version traduite : 2.0, 18 septembre 1999

    Commentaire : EN COURS


  1111..114488..  SSoouunndd--HHOOWWTTOO



    Auteur(s) : Jeff Tranter, jeff_tranter@pobox.com

    Titre-Fr : Le Linux Sound-HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Sound-
     HOWTO.html>

    Description : matriel et programmes pour Linux

    Version : v1.20, 24 March 1999

    Traducteur : Gael Duval, gael@linuxmandrake.com

    Version traduite : v1.19, 23 janvier 1998

    Commentaire : EN COURS


  1111..114499..  SSoouunndd--PPllaayyiinngg--HHOOWWTTOO



    Auteur(s) : Yoo C. Chung, wacko@laplace.snu.ac.kr

    Titre-Fr : Linux Sound Playing HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Sound-Playing-
     HOWTO.html>

    Description : comment jouer diffrents types de format de fichiers
     sous Linux

    Version : v1.6, 11 August 1998

    Traducteur : Guillaume Bertucat, guillaume@ibpc.fr, Raphael Gurlie,
     raphael@ibpc.fr

    Version traduite : v1.6, 11 Aot 1998

    Commentaire : A JOUR


  1111..115500..  SSppaanniisshh--HHOOWWTTOO



    Auteur(s) : Gonzalo.Garcia-Agullo@jrc.es

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v0.1, 20 August 1996

    Traducteur :


    Version traduite :

    Commentaire : NE PAS TRADUIRE



  1111..115511..  SSRRMM--HHOOWWTTOO



    Auteur(s) : David Mosberger, davidm@azstarnet.com

    Titre-Fr : SRM Firmware Howto

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/SRM-HOWTO.html>

    Description : comment amorcer un Alpha sous Linux en utilisant SRM

    Version :  v0.6.1, 5 March 2000

    Traducteur : Nicolas Jadot, njadot@etu.info.unicaen.fr

    Version traduite : v0.5, 17 August 1996

    Commentaire : EN COURS


  1111..115522..  TTccllTTkk--HHOOWWTTOO



    Auteur(s) : Luca Rossetti, lukaros@tin.it

    Titre-Fr : HOWTO Tcl et Tk sous Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/TclTk-
     HOWTO.html>

    Description : ce document dcrit l'approche de Linux  Tcl, un
     langage de script.

    Version : v0.2, 07 November 1998

    Traducteur  : Carine Bournez, cbournez@if.insa-lyon.fr

    Version traduite : v0.2, 07 Novembre 1998

    Commentaire : A JOUR


  1111..115533..  TTeeTTeeXX--HHOOWWTTOO



    Auteur(s) : Robert Kiesling, Robert_A._Kiesling@macline.com

    Titre-Fr : Le Howto TeTeX

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/TeTeX-
     HOWTO.html>

    Description : comment installer et utiliser TeTeX

    Version : v3.7, 9 November 1998


    Traducteur : Mark HOEBEKE, mh@ebene.jouy.inra.fr

    Version traduite : v3.7, 9 Novembre 1998

    Commentaire : A JOUR


  1111..115544..  TTeexxtt--TTeerrmmiinnaall--HHOOWWTTOO



    Auteur(s) : David S. Lawyer, bf347@lafn.org

    Titre-Fr : HOWTO Text-Terminal

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Text-Terminal-
     HOWTO.html>

    Description :

    Version : v1.12, May 2000

    Traducteur : Julien Garnault, judge@club-internet.fr

    Version traduite : v1.06, Juin 1999

    Commentaire : EN COURS


  1111..115555..  TThhaaii--HHOOWWTTOO



    Auteur(s) : Poonlap Veeratanabutr, poon-v@fedu.uec.ac.jp

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.4, 4 August 1998

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE


  1111..115566..  TThhiinncclliieenntt--HHOOWWTTOO



    Auteur(s) : Stephen Noble stephen7@bigfoot.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : 30th November 1999

    Traducteur :

    Version traduite :

    Commentaire :


  1111..115577..  TTiippss--HHOOWWTTOO



    Auteur(s) : Paul Anderson, paul@geeky1.ebtech.net

    Titre-Fr : Astuces Linux HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Tips-HOWTO.html>

    Description :

    Version : v3.6, June, 1998

    Traducteur : Arnaud Gomes-do-Vale, gomesdv@mail.dotcom.fr

    Version traduite : v3.6, Juin 1998

    Commentaire : A JOUR


  1111..115588..  TTuurrkkiisshh--HHOOWWTTOO



    Auteur(s) : Grkem etin, gorkem@gelecek.com.tr

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.0, 21 September 1999

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE


  1111..115599..  UUMMSSDDOOSS--HHOOWWTTOO



    Auteur(s) : Jacques Gelinas, jacques@solucorp.qc.ca

    Titre-Fr : UMSDOS HOW-TO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/UMSDOS-
     HOWTO.html>

    Description : comment installer et utiliser le systme de fichiers
     UMSDOS

    Version : v1.1, 13 November 1995

    Traducteur : Guillaume Deschamps, Guillaume.Deschamps@enst-
     bretagne.fr

    Version traduite : v1.1, 13 November 1995

    Commentaire : A JOUR


  1111..116600..  UUnniiccooddee--HHOOWWTTOO



    Auteur(s) : Bruno Haible, haible@clisp.cons.org

    Titre-Fr : HOWTO Unicode

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Unicode-
     HOWTO.html>

    Description : comment configurer votre systme Linux pour qu'il
     utilise l'encodage de texte UTF-8.

    Version : v0.12, 19 October 1999

    Traducteur : Samuel Tribehou, samuel_tribehou@mail.cpod.fr

    Version traduite : v 0.12, 19 Octobre 1999

    Commentaire : A JOUR


  1111..116611..  UUnniixx--IInntteerrnneett--FFuunnddaammeennttaallss--HHOOWWTTOO



    Auteur(s) : Eric S. Raymond, esr@thyrsus.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.6, 6 March 2000

    Traducteur : Philippe Malinge, pmal@easynet.fr

    Version traduite : v1.1, 3 Dcembre 1998

    Commentaire : EN COURS


  1111..116622..  UUPPSS--HHOOWWTTOO


    Auteur(s) : Harvey J. Stein, hjstein@math.huji.ac.il Berger
     Financial Research, Ltd.

    Titre-Fr : Le HOWTO des onduleurs (UPS)

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/UPS-HOWTO.html>

    Description : informations sur l'utilisation des onduleurs

    Version : v2.42, 18 November 1997

    Traducteur : Bernard Choppy, choppy@imaginet.fr


    Version traduite : v2.42, 18 Novembre 1997

    Commentaire : A JOUR



  1111..116633..  UUsseerr--GGrroouupp--HHOOWWTTOO


    Auteur(s) : Kendall Grant Clark, kclark@cmpu.net

    Titre-Fr : Groupes d'Utilisateurs Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/User-Group-
     HOWTO.html>

    Description : Astuces sur la fondation, l'entretien et le
     dveloppement d'un Groupe d'Utilisateurs Linux

    Version : v1.6.2, 24 April 1998

    Traducteur : Arnaud Launay, asl@launay.org

    Version traduite : v1.6.2, 24 Avril 1998

    Commentaire : A JOUR


  1111..116644..  UUUUCCPP--HHOOWWTTOO


    Auteur(s) : Guylhem Aznar, guylhem@danmark.linux.eu.org

    Titre-Fr : Le Linux UUCP HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/UUCP-HOWTO.html>

    Description : informations sur la configuration d'UUCP

    Version : v2.0, 6 February 1998

    Traducteur : Guylhem Aznar, guylhem@danmark.linux.eu.org

    Version traduite : v1.5, 29 Novembre 1995

    Commentaire : EN COURS



  1111..116655..  VVAARR--HHOOWWTTOO


    Auteur(s) : Mr. Poet, poet@linuxports.com

    Titre-Fr : VAR HOWTO pour Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/VAR-HOWTO.html>

    Description : liste de socits participant au projet Linux

    Version : v2.84, 22 August 1999

    Traducteur : Jean-Christophe Fargette, jcfarget@club-internet.fr

    Version traduite : v2.84, 7 mars 1999

    Commentaire :  EN COURS


  1111..116666..  VViimm--HHOOWWTTOO


    Auteur(s) : Al Dev (Alavoor Vasudevan), alavoor@yahoo.com

    Titre-Fr : HOWTO de l'diteur Vim (Vi amlior, avec coloration
     syntaxique)

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Vim-HOWTO.html>

    Description : Ce document est un guide pour configurer trs
     rapidement l'diteur Vim sur les systmes Linux ou Unix.

    Version : v11.0, 25 April 2000

    Traducteur : Arnaud Launay, asl@launay.org

    Version traduite : v1.0, 14 Octobre 1999

    Commentaire : EN COURS


  1111..116677..  VViirrttuuaall--SSeerrvviicceess--HHOOWWTTOO


    Auteur(s) : Brian Ackerman, brian@nycrc.net

    Titre-Fr :

    URL-Fr :

    Description :

    Version : 2.1, 15 August 1998

    Traducteur : Julien Garnault, judge@club-internet.fr

    Version traduite : v2.1, 15 Aout 1998

    Commentaire : A JOUR


  1111..116688..  VVMMaaiillMMggrr--HHOOWWTTOO


    Auteur(s) : Bruce Guenter bruceg@em.ca, Dan Kuykendall
     dan@kuykendall.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.1, 23 April 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1111..116699..  VVMMEE--HHOOWWTTOO


    Auteur(s) : John Huggins and Michael Wyrick, vmelinux@va.net

    Titre-Fr :

    URL-Fr :

    Description :

    Version :   0.8a, 30 July 1998

    Traducteur : Eric Cano, Eric.Cano@cern.ch

    Version traduite :

    Commentaire : EN COURS


  1111..117700..  VVMMSS--ttoo--LLiinnuuxx


    Auteur(s) : Guido Gonzato, guido@ibogfs.df.unibo.it

    Titre-Fr : HOWTO Comment migrer de VMS  Linux

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/VMS-HOWTO.html>

    Description : comment basculer de VMS  Linux?

    Version :  v1.1.3, 17 September 1999

    Traducteur : Dimitri Ara, dimitri.ara@wanadoo.fr

    Version traduite : v1.1.3, 17 Septembre 1999

    Commentaire : A JOUR


  1111..117711..  VVPPNN--HHOOWWTTOO


    Auteur(s) : Matthew D. Wilson, matthew@shinythings.com

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v 1.0, Dec 1999

    Traducteur :

    Version traduite :

    Commentaire :


  1111..117722..  VVPPNN--MMaassqquueerraaddee--HHOOWWTTOO


    Auteur(s) : John D. Hardin, jhardin@wolfenet.com


    Titre-Fr :

    URL-Fr :

    Description :

    Version :  v2.2, 9 September 1999

    Traducteur : Yann Hirou, hirou@linuxfr.org

    Version traduite :

    Commentaire : EN COURS


  1111..117733..  WWaaccoomm--TTaabblleett--HHOOWWTTOO


    Auteur(s) : Stefan Runkel, runkel@runkeledv.de

    Titre-Fr :

    URL-Fr :

    Description :

    Version :  Version 1.0.6 of Mar 28, 2000

    Traducteur : Aurelia Girod, agirod@voila.fr

    Version traduite :

    Commentaire : EN COURS


  1111..117744..  WWeeaarraabbllee--HHOOWWTTOO


    Auteur(s) :  Lionel, trollhunter Bouchpan-Lerust-Juery,
     trollhunter@linuxfr.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v0.0.7 March 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1111..117755..  WWWWWW--HHOOWWTTOO


    Auteur(s) : Wayne Leister, n3mtr@qis.net

    Titre-Fr : HOWTO WEB

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/WWW-HOWTO.html>


    Description : Comment configurer des clients et serveurs web

    Version : v0.85, 21 August 1999

    Traducteur : Arnaud Launay,  asl@launay.org

    Version traduite : v0.82, 19 Novemver 1997

    Commentaire : EN COURS


  1111..117766..  WWWWWW--mmSSQQLL--HHOOWWTTOO


    Auteur(s) : Oliver Corff, corff@zedat.fu-berlin.de

    Titre-Fr : Serveur Web de Base de Donnes mSQL / perl HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/WWW-mSQL-
     HOWTO.html>

    Description : comment configurer un serveur Web et une base de
     donne avec msql

    Version : v 0.1, 17 September 1997

    Traducteur : Nicolas Caillaud, Nicolas.Caillaud@mail.dotcom.fr

    Version traduite : v0.1, 17 Septembre 1997

    Commentaire : A JOUR


  1111..117777..  XXFFrreeee8866--HHOOWWTTOO


    Auteur(s) : Eric S. Raymond, esr@thyrsus.com

    Titre-Fr :  Le HOWTO d'XFree86 sous Linux

    URL-Fr :
     <http://www.freenix.org/unix/linux/HOWTO/XFree86-HOWTO.html>

    Description : comment rcuprer, installer et configurer XFree86
     3.2 (X11R6)

    Version : v6.1, 21 April 2000

    Traducteur : Pierre Vassellerie, Pierre.Vassellerie@obspm.fr

    Version traduite : v5.2f1, 12 Novembre 1997

    Commentaire : EN COURS


  1111..117788..  XXFFrreeee8866--TToouucchh--SSccrreeeenn--HHOOWWTTOO


    Auteur(s) :  Christoph Baumann, cgb@debian.org

    Titre-Fr :

    URL-Fr :

    Description :

    Version : Dec 10, 1999

    Traducteur :

    Version traduite :

    Commentaire :


  1111..117799..  XXFFrreeee8866--VViiddeeoo--TTiimmiinnggss--HHOOWWTTOO


    Auteur(s) : Eric S. Raymond, esr@thyrsus.com

    Titre-Fr : XFree86 Video Timings HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/XFree86-Video-
     Timings-HOWTO.html>

    Description :

    Version : Version 4.4, 13 Mar 2000

    Traducteur : Guillaume Allegre, Guillaume.Allegre@imag.fr

    Version traduite : Version 4.4, 13 mars 2000

    Commentaire : A JOUR


  1111..118800..  XXWWiinnddooww--UUsseerr--HHOOWWTTOO


    Auteur(s) : Ray Brigleb, ray@croftj.net

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v2.0, 1 September 1999

    Traducteur : Fred Albrecht, fred@DotCom.FR

    Version traduite :

    Commentaire : EN COURS


  1111..118811..  XXiinneerraammaa--HHOOWWTTOO


    Auteur(s) : Dennis Baker drbaker@softhome.net

    Titre-Fr :

    URL-Fr :

    Description :

    Version : v1.0, May 2, 2000

    Traducteur :


    Version traduite :

    Commentaire :


  1122..  HHoowwTToo nnoonn mmaaiinntteennuuss




  1122..11..  MMoodduullee--HHOOWWTTOO



    Auteur(s) : Lauri Tischler, ltischler@efore.fi

    Titre-Fr : Linux Module-HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Module-
     HOWTO.html>

    Description : comment installer et configurer les modules

    Version : v1.1, 20 October 1996

    Traducteur : Eric.Dumas@Linux.EU.Org

    Version traduite : v1.1, 20 October 1996

    Commentaire : A JOUR



  1122..22..  NNeewwss--HHOOWWTTOO



    Auteur(s) : Vince Skahan, vince@halcyon.com

    Titre-Fr : News-Howto

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/News-HOWTO.html>

    Description :

    Version : v1.4, 29 November 1995

    Traducteur : Arnaud Launay, asl@launay.org

    Version traduite : v0.3, 4 January 1998

    Commentaire : A JOUR



  1122..33..  SSCCSSII--HHOOWWTTOO



    Auteur(s) : Drew Eckhardt, drew@PoohSticks.ORG

    Titre-Fr : SCSI-HOWTO

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/SCSI-HOWTO.html>


    Description : informations sur les compatilits des gestionnaires
     de priphriques SCSI avec Linux

    Version : v2.30, 30 August 1996

    Traducteur : Thierry Danis, danis@sagem.fr

    Version traduite : Version 2.30, 30 Aot 1996

    Commentaire : A JOUR


  1122..44..  TTeerrmm--HHOOWWTTOO



    Auteur(s) : Patrick Reijnen, patrickr@bart.nl

    Titre-Fr :

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Term-HOWTO.html>

    Description :

    Version : v1.2, 15 July 1995

    Traducteur : Arnaud Ruch, ruch@labri.u-bordeaux.fr

    Version traduite : v1.1

    Commentaire :


  1133..  MMiinnii--HHoowwTToo




  1133..11..  33--BBuuttttoonn--MMoouussee


    Auteur(s) : Geoff Short, geoff@kipper.york.ac.uk

    Titre-Fr : Souris 3 boutons

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/mini/3-Button-
     Mouse.html>

    Description : Comment configurer une souris pour utiliser 3 boutons

    Version : v1.33 31 May 1998

    Traducteur : Arnaud Launay, asl@launay.org

    Version traduite : v1.33, 31 Mai 1998

    Commentaire :  A JOUR


  1133..22..  AADDSSLL


    Auteur(s) : David Fannin, dfannin@dnai.com

    Titre-Fr :

    Version :v0.92, 10 April 1999

    Traducteur : Sylvain Mielot, mielot@multimania.com

    Version traduite :

    Commentaire : EN COURS


  1133..33..  AADDSSMM--BBaacckkuupp


    Auteur(s) :Thomas Knig, Thomas.Koenig@ciw.uni-karlsruhe.de

    Titre-Fr :

    Version : 1997/01/15

    Traducteur : Franois Romieu, romieu@ensta.fr

    Version traduite : v, 15 Janvier 1997

    Commentaire : A JOUR


  1133..44..  AAddvvooccaaccyy



    Auteur(s) : Paul L. Rogers, Paul.L.Rogers@li.org

    Titre-Fr :

    Version : v0.5c, 3 May 2000

    Traducteur : nat@nataa.fr.eu.org

    Version traduite : v0.5fr, 8 Mai 1998

    Commentaire : A JOUR



  1133..55..  AAllssaa--ssoouunndd



    Auteur(s) : Valentijn Sessink, valentyn@alsa-project.org

    Titre-Fr : Alsa-sound-mini-HOWTO

    Version :  v2.0-pre1, 12 November 1999

    Traducteur :  Miodrag Vallat, miodrag@ifrance.com

    Version traduite : v 1.7, 29 Juillet 1999

    Commentaire : EN COURS



  1133..66..  AAppaacchhee++SSSSLL++PPHHPP++ffpp




    Auteur(s) : Marcus Faure, marcus@faure.de

    Titre-Fr :

    Version : v1.1, July 1998

    Traducteur : Francois Romieu, romieu@ensta.fr

    Version traduite : v1.1, Juillet 1998

    Commentaire : A JOUR


  1133..77..  AAppaacchhee--mmooddss



    Auteur(s) : Ray Van Dolson, rayvd@firetail.org

    Titre-Fr :

    Version : v0.91, 5 April 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1133..88..  AAuuttoommoouunntt



    Auteur(s) : don@sabotage.org

    Titre-Fr :

    Version :  v0.4, 17 April 1999

    Traducteur : Mathieu ARNOLD, arn_mat@club-internet.fr

    Version traduite : v0.2, 7 Septembre 1998

    Commentaire : EN COURS


  1133..99..  BBaacckkuupp--WWiitthh--MMSSDDOOSS



    Auteur(s) :Christopher Neufeld, neufeld@physics.utoronto.ca

    Titre-Fr :

    Version : Aug 5, 1997

    Traducteur : Odile Binassy, obenassy@magic.fr

    Version traduite :

    Commentaire : EN COURS




  1133..1100..  BBaatttteerryy--PPoowweerreedd



    Auteur(s) : Hanno Mueller, hanno@lava.de

    Titre-Fr : Battery Powered Linux Mini-HOWTO

    Version : Oct 21, 1997

    Traducteur : Philippe Gaucher, gaucher@easynet.fr

    Version traduite : 21 dcembre 1997

    Commentaire : A JOUR


  1133..1111..  BBooccaa



    Auteur(s) : David H Dennis david@amazing.cinenet.net

    Titre-Fr :

    Version : 1 August 1997

    Traducteur :

    Version traduite :

    Commentaire :


  1133..1122..  BBooggooMMiippss



    Auteur(s) : Wim C.A. van Dorst, baron@clifton.hobby.nl

    Titre-Fr :

    Version : 2000-02-06

    Traducteur :  Antoine Levavasseur, levavass@efrei.fr

    Version traduite : v0, 8 fvrier 1999

    Commentaire : EN COURS


  1133..1133..  BBoooott++RRoooott++RRaaiidd++LLIILLOO



    Auteur(s) : Michael Robinton, Michael@BizSystems.com

    Titre-Fr :

    Version : v1.03, May 4, 2000

    Traducteur :

    Version traduite :


    Commentaire :


  1133..1144..  BBrriiddggee++FFiirreewwaallll++DDSSLL



    Auteur(s) : Derek Ney  derek@hipgraphics.com

    Titre-Fr :

    Version : Mar 24, 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1133..1155..  BBrriiddggee++FFiirreewwaallll



    Auteur(s) : Peter Breuer ptb@it.uc3m.es

    Titre-Fr :

    Version : Dec. 19 1997

    Traducteur : Bernard Choppy, choppy@imaginet.fr

    Version traduite : 19 Dcembre 1997

    Commentaire : A JOUR


  1133..1166..  BBrriiddggee



    Auteur(s) : Chris Cole, chris@polymer.uakron.edu

    Titre-Fr :

    Version : v1.11, 7 September 1998

    Traducteur : Michel Billaud, billaud@labri.u-bordeaux.fr

    Version traduite :  v1.11, 7 Septembre 1998

    Commentaire : A JOUR



  1133..1177..  BBTTTTVV



    Auteur(s) : Eric Sandeen, eric_sandeen@bigfoot.com

    Titre-Fr : Le Mini-HOWTO BTTV

    Version : v0.3, February 2000


    Traducteur : Ludovic Danigo, ludovic.danigo@worldonline.fr

    Version traduite : v0.3, Fvrier 2000

    Commentaire : A JOUR


  1133..1188..  BBzziipp22



    Auteur(s) : David Fetter, david@fetter.org

    Titre-Fr : Bzip2

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/mini/Bzip2.html>

    Description : Comment utiliser le nouveau programme de compression
     Bzip2

    Version : v2.00, 22 August 1999

    Traducteur : Arnaud Launay, asl@launay.org

    Version traduite : v2.0, 22 aot 1999

    Commentaire :  A JOUR


  1133..1199..  ccaallll--bbaacckk



    Auteur(s) : Pawel Skonecki, stona@fizyka.umcs.lublin.pl

    Titre-Fr :

    Version : v1.1a, June 2000

    Traducteur : Sylvain Amrani, traduc@amrani.com.fr

    Version traduite :

    Commentaire : EN COURS


  1133..2200..  CCiippee++MMaassqq



    Auteur(s) : Anthony Ciaravalo, acj@home.com

    Titre-Fr :

    Version : v1.2, 21 April 1999

    Traducteur : Bruno Ducrot, ducrot@echo.fr

    Version traduite :

    Commentaire : EN COURS





  1133..2211..  CClloocckk



    Auteur(s) : rbean@execpc.com

    Titre-Fr :

    Version : v2, July 1999

    Traducteur : Frederic Gacquer, Frederic.Gacquer@univ-orleans.fr

    Version traduite : Dec. 1996

    Commentaire : EN COURS


  1133..2222..  CCooffffeeee



    Auteur(s) : Georgatos Photis, gef@ceid.upatras.gr

    Titre-Fr :

    Version : v0.5, 15-01-1998

    Traducteur :  Raphael GURLIE, raphael@ibpc.fr

    Version traduite :

    Commentaire : EN COURS


  1133..2233..  CCoommmmeerrcciiaall--PPoorrtt--AAddvvooccaaccyy



    Auteur(s) : Doug Loss dloss@seul.org

    Titre-Fr :

    Version : v0.1, 29 December 1999

    Traducteur :

    Version traduite :

    Commentaire :


  1133..2244..  CCyyrruuss--IIMMAAPP



    Auteur(s) : Kevin Mitchell, kevin@iserv.net

    Titre-Fr :

    Version : v0.9 21.01.98

    Traducteur : Frederic.Gacquer, Frederic.Gacquer@univ-orleans.fr

    Version traduite : v0.9 21.01.98


    Commentaire : A JOUR


  1133..2255..  DDHHCCPP



    Auteur(s) : Vladimir Vuksan, vuksan@veus.hr

    Titre-Fr :

    Version : v4.6, 27 September 1999

    Traducteur :  Arnaud Gomes-do-Vale, gomesdv@mail.dotcom.fr

    Version traduite : v4.6, 27 Septembre 1999

    Commentaire : A JOUR


  1133..2266..  DDiivveerrtt--SSoocckkeettss



    Auteur(s) : Ilia Baldine, ibaldin@anr.mcnc.org

    Titre-Fr :

    Version :  v1.1, 27 February 2000

    Traducteur :  Cyril PERRIN, cyril.perrin@inrialpes.fr

    Version traduite :

    Commentaire : EN COURS


  1133..2277..  DDoommaaiinn



    Auteur(s) : Christopher Neufeld, neufeld@physics.utoronto.ca

    Titre-Fr :

    Version :  0.10. 2000-02-29.

    Traducteur :

    Version traduite :

    Commentaire :


  1133..2288..  DDPPTT--HHaarrddwwaarree--RRAAIIDD


    Auteur(s) : Ram Samudrala, me@ram.org

    Titre-Fr :

    Version : v1.4, 9 April 1999

    Traducteur : Nicolas Jadot , njadot@etu.info.unicaen.fr


    Version traduite : 1.1, 15 Dcembre 97

    Commentaire : EN COURS


  1133..2299..  EExxtt22ffss--UUnnddeelleettiioonn



    Auteur(s) : Aaron Crane, aaronc@pobox.com

    Titre-Fr :

    Version : v1.3, 2 February 1999

    Traducteur : Miodrag Vallat, miodrag@ifrance.com

    Version traduite : v1.3, 2 Fvrier 1999

    Commentaire : A JOUR


  1133..3300..  FFaaxx--SSeerrvveerr



    Auteur(s) : Erez Strauss, erez@newplaces.com

    Titre-Fr :

    Version : v1.0, 8 November 1997

    Traducteur : Frederic Gacquer, Frederic.Gacquer@univ-orleans.fr

    Version traduite : Version v1.0, 8 Novembre 1997

    Commentaire : A JOUR


  1133..3311..  FFDDUU



    Auteur(s) : Doug Holland, meldroc@frii.com

    Titre-Fr :

    Version : v1.0, 23 November 1999

    Traducteur :

    Version traduite :

    Commentaire :


  1133..3322..  FFiirreewwaallll--PPiieerrcciinngg



    Auteur(s) : Franois Ren Rideau, fare@tunes.org

    Titre-Fr :

    Version : v0.3b, 27 November 1998

    Traducteur : Franois Ren Rideau, fare@tunes.org

    Version traduite :

    Commentaire : EN COURS


  1133..3333..  FFTTPP



    Auteur(s) : Doug Holland, meldroc@frii.com

    Titre-Fr :

    Version : v1.0, 23 November 1999

    Traducteur :

    Version traduite :

    Commentaire :


  1133..3344..  GGIISS--GGRRAASSSS



    Auteur(s) : David A. Hastings, dah@ngdc.noaa.gov

    Titre-Fr :

    Version : Version 1.0: 13 November 1997

    Traducteur : Guillaume Allgre, Guillaume.Allegre@imag.fr

    Version traduite :

    Commentaire : EN COURS


  1133..3355..  GGTTEEKK--BBBBSS--555500



    Auteur(s) : Wajihuddin Ahmed, wahmed@sdnpk.undp.org

    Titre-Fr :

    Version : v1.1, 20 August 1997

    Traducteur :

    Version traduite :

    Commentaire :


  1133..3366..  HHaannddsspprriinngg--VViissoorr



    Auteur(s) :  Ryan VanderBijl

    Titre-Fr :

    Version : v0.3, April 7, 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1133..3377..  HHaarrdd--DDiisskk--UUppggrraaddee



    Auteur(s) : Yves Bellefeuille, yan@ottawa.com, hinsen@cnrs-
     orleans.fr

    Titre-Fr :

    Version : v2.11, 13 April 2000

    Traducteur : Eric Cano, Eric.Cano@cern.ch

    Version traduite : Version 1.0, 31 janvier 1998

    Commentaire :


  1133..3388..  HHoommee--NNeettwwoorrkk



    Auteur(s) :  Paul Ramsey

    Titre-Fr :

    Version : June 22, 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1133..3399..  IInnssttaallll--FFrroomm--ZZIIPP


    Auteur(s) : Kevin Snively, k.snively@seaslug.org

    Titre-Fr :

    Version : v01.04, 29 April 1998

    Traducteur : Thierry Le Queau, celeborn@club-internet.fr

    Version traduite : v01.02, 27 Janvier 1998

    Commentaire : EN COURS


  1133..4400..  IInnttkkeeyybb



    Auteur(s) : Juraj Sipos, xvudpapc@savba.sk

    Titre-Fr :

    Version : 4/22/2000

    Traducteur :

    Version traduite :

    Commentaire :


  1133..4411..  IIOO--PPoorrtt--PPrrooggrraammmmiinngg


    Auteur(s) : Riku Saikkonen, Riku.Saikkonen@hut.fi

    Titre-Fr :

    Version : Dec 28 1997

    Traducteur : Jean-Francois PREVOST, jeff@cybercable.tm.fr

    Version traduite : 26 Dec 1995

    Commentaire : EN COURS


  1133..4422..  IIPP--AAlliiaass



    Auteur(s) : Harish Pillay, h.pillay@ieee.org

    Titre-Fr :

    Version : January 13th 1997.

    Traducteur :  Laurent Caillat-Vallet caillat@univ-lyon1.fr

    Version traduite : 13 Janvier 1997

    Commentaire : A JOUR


  1133..4433..  IIPP--SSuubbnneettwwoorrkkiinngg



    Auteur(s) : Robert Hart, hartr@interweft.com.au

    Titre-Fr :

    Version : v1.0, 31 March 1997

    Traducteur : Laurent Caillat-Vallet caillat@univ-lyon1.fr

    Version traduite : v1.0, 31 Mars 1997

    Commentaire : A JOUR


  1133..4444..  IIPPMMaassqquueerraaddiinngg++NNaappsstteerr




    Auteur(s) : John E. Danner

    Titre-Fr :

    Version : v1.6, 11 April 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1133..4455..  IISSPP--CCoonnnneeccttiivviittyy



    Auteur(s) : Michael Strates, mstrates@croftj.net

    Titre-Fr :

    Version : v2.0, 6 November 1997

    Traducteur : Eric Jacoboni, jaco@mail.dotcom.fr

    Version traduite : v2.0, 6 Novembre 1997

    Commentaire : A JOUR


  1133..4466..  KKeerrnneelldd


    Auteur(s) : Henrik Storner, storner@osiris.ping.dk

    Titre-Fr :

    Version : v2.0 22 May 2000

    Traducteur : Alexandre Devaure, adevaure@mail.dotcom.fr

    Version traduite : Version 1.7 19 juillet 1997

    Commentaire : EN COURS


  1133..4477..  LLBBXX


    Auteur(s) : Paul D. Smith, psmith@BayNetworks.com

    Titre-Fr :

    Version : v1.04, 11 Dec 1997

    Traducteur : Xavier Glattard, Xavier.Glattard@dresdner-bank.de

    Version traduite : v1.04, Dcembre 1997

    Commentaire : A JOUR


  1133..4488..  LLeeaasseedd--LLiinnee



    Auteur(s) : Rob van der Putten, rob@sput.dsl.nl

    Titre-Fr :

    Version : v1.7, 29 October 1999

    Traducteur : Eddy CAPPEAU, cappeau@dil.univ-mrs.fr

    Version traduite : v2.0, 20 April 2000

    Commentaire : EN COURS


  1133..4499..  LLIILLOO


    Auteur(s) : Cameron Spitzer, cls@truffula.sj.ca.us, Alessandro
     Rubini,rubini@linux.it

    Titre-Fr :

    Version : v2.02, 16 August 1998

    Traducteur : Mathieu ARNOLD, arn_mat@club-internet.fr

    Version traduite : v2.02, 16 August 1998

    Commentaire : A JOUR



  1133..5500..  LLiinnuuxx++DDOOSS++WWiinn9955++OOSS22


    Auteur(s) : Mike Harlan, r3mdh@raex.com

    Titre-Fr : Linux-DOS-Win95-OS2 mini-HOWTO

    Version : v1.3.1, 11 November 1997

    Traducteur : Sylvain Mielot, mielot@multimania.com

    Version traduite : v1.3.1, 11 November 1997

    Commentaire : A JOUR


  1133..5511..  LLiinnuuxx++FFrreeeeBBSSDD


    Auteur(s) : Niels Kristian Bech Jensen, nkbj@image.dk

    Titre-Fr : Le mini-HOWTO Linux+FreeBSD

    Version : v1.10, 15 January 1999

    Traducteur : Christophe Deleuze, deleuze@rp.lip6.fr

    Version traduite : v1.10, 15 janvier 1999

    Commentaire : A JOUR





  1133..5522..  LLiinnuuxx++NNTT--LLooaaddeerr


    Auteur(s) : Bernd Reichert, brt@swissplace.ch

    Titre-Fr :

    Version : v1.11, 2 September 1997

    Traducteur :

    Version traduite : v1.11, 2 September 1997

    Commentaire : A JOUR


  1133..5533..  LLiinnuuxx++SSoollaarriiss


    Auteur(s) :  Max Berger, max.berger@xslt.de

    Titre-Fr :

    Version : v0.8

    Traducteur :

    Version traduite :

    Commentaire :


  1133..5544..  LLiinnuuxx++WWiinn9955


    Auteur(s) : Jonathan Katz,   jkatz@in.net

    Titre-Fr :

    Version : October 26, 1996

    Traducteur : Sebastien Blondeel, Sebastien.Blondeel@lifl.fr

    Version traduite : 26 Oct 1996

    Commentaire : A JOUR


  1133..5555..  LLiinnuuxx--MMooddeemm--SShhaarriinngg


    Auteur(s) : Friedemann Baitinger, baiti@toplink.net

    Titre-Fr : Linux-Modem-Sharing mini-HOWTO

    Version : v1.02, 2 November 1997

    Traducteur : Arnaud Gomes-do-Vale, arnaud@carrosse.frmug.org

    Version traduite : Version 1.01, 2 novembre 1997

    Commentaire :  A JOUR




  1133..5566..  LLooaaddlliinn++WWiinn9955


    Auteur(s) : Chris Fischer, protek@brigadoon.com

    Titre-Fr :

    Version : v1.4.6, 13 March 1999

    Traducteur : ric Maisonobe, viret@nat.fr

    Version traduite : v1.4.3, 9 Novembre 1998

    Commentaire : EN COURS


  1133..5577..  LLooooppbbaacckk--RRoooott--FFSS


    Auteur(s) : Andrew M. Bishop, amb@gedanken.demon.co.uk

    Titre-Fr :

    Version : v1.1, 24 September 1999

    Traducteur : Eric Cano, Eric.Cano@cern.ch

    Version traduite : v1.0.0, 12 juin 1998

    Commentaire :


  1133..5588..  MMaacc--TTeerrmmiinnaall


    Auteur(s) : Robert Kiesling, kiesling@terracom.net

    Titre-Fr :

    Version : v1.4, 9 November 1997

    Traducteur : (A PRENDRE) Olivier Tharan, olive@minet.net

    Version traduite : v1.4, 9 novembre 1997

    Commentaire : A JOUR


  1133..5599..  MMaaiill--QQuueeuuee


    Auteur(s) : Leif Erlingsson, leif@lege.com et Jan P Tietze,
     jptietze@mail.hh.provi.de

    Titre-Fr :

    Version : v2.02, 03 September 1997, sendmail 8.8.7

    Traducteur : (A REPRENDRE) Philippe Gaucher, gaucher@easynet.fr

    Version traduite :

    Commentaire :



  1133..6600..  MMaaiill22NNeewwss


    Auteur(s) : Robert Hart, iweft@ipax.com.au

    Titre-Fr :

    Version : v2.0, 1 July 1999

    Traducteur : Franck Lesage, Franck.Lesage@pulp.eu.Org

    Version traduite : v1.0, 4 novembre 1996

    Commentaire : EN COURS



  1133..6611..  MMaann--PPaaggee


    Auteur(s) : Jens Schweikhardt, schweikh@noc.dfn.de

    Titre-Fr : Man page HOWTO

    Version :  January 2000

    Traducteur : Alexandre DEVAURE, adevaure@mail.dotcom.fr

    Version traduite : Mars 1998

    Commentaire : EN COURS


  1133..6622..  MMoodduulleess


    Auteur(s) : rhw@bigfoot.com

    Titre-Fr :

    Version : ???

    Traducteur : Frederic Gacquer, Frederic.Gacquer@univ-orleans.fr

    Version traduite :

    Commentaire : A JOUR


  1133..6633..  MMuullttiibboooott--wwiitthh--LLIILLOO


    Auteur(s) : Renzo Zanelli, rzanelli@southeast.net

    Titre-Fr :

    Version : v1.0, 26 March 1998

    Traducteur : Maxime Baudin, mbaudin@club-internet.fr

    Version traduite :

    Commentaire : EN COURS



  1133..6644..  NNCCDD--XX--TTeerrmmiinnaall


    Auteur(s) : Ian Hodge, ihodge@nortel.ca

    Titre-Fr :

    Version : v1.09, March 27, 2000

    Traducteur : Michel Billaud, Michel.Billaud@labri.u-bordeaux.fr

    Version traduite : v1.07, 30 Novembre 1999

    Commentaire : EN COURS


  1133..6655..  NNeettrroomm--NNooddee


    Auteur(s) : Karl Larsen,  k5di@yahoo.com

    Titre-Fr :

    Version : v1.10, 19 October 1998

    Traducteur :

    Version traduite :

    Commentaire :


  1133..6666..  NNeettssccaappee++PPrrooxxyy


    Auteur(s) : Sarma Seetamraju, sarma@usa.net

    Titre-Fr :

    Version : August 1997

    Traducteur : Laurent Cheylus, Laurent.Cheylus@ecl1997.ec-lyon.fr

    Version traduite :

    Commentaire : EN COURS


  1133..6677..  NNeettssttaattiioonn


    Auteur(s) : Kris Buytaert, Kris.Buytaert@advalvas.be

    Titre-Fr :

    Version : v0.98p14, 22 February 1998

    Traducteur :

    Version traduite :

    Commentaire :




  1133..6688..  NNeewwss--LLeeaaffssiittee


    Auteur(s) : Florian Kuehnert, sutok@gmx.de

    Titre-Fr : News Leafsite mini-HOWTO

    Version : v0.3, 4 January 1998

    Traducteur : Philippe Gaucher, gaucher@easynet.fr

    Version traduite : v0.3, 4 Janvier 1998

    Commentaire : A JOUR


  1133..6699..  NNFFSS--RRoooott--CClliieenntt


    Auteur(s) : Ofer Maor, ofer@hadar.co.il

    Titre-Fr : NFS-Root-Client Mini-Howto

    Version : V4.1, 02 February 1999

    Traducteur :  Antoine Levavasseur, levavass@efrei.fr

    Version traduite : Version 4.1, le 02 Fvrier 1999

    Commentaire : A JOUR


  1133..7700..  NNFFSS--RRoooott


    Auteur(s) : Andreas Kostyrka, andreas@ag.or.at

    Titre-Fr :

    Version : V8, 8 August 1997

    Traducteur : Eric.Dumas@Linux.EU.Org

    Version traduite : V8, 8 Aot 1997

    Commentaire : A JOUR



  1133..7711..  OOfffflliinnee--MMaaiilliinngg


    Auteur : Gunther Voet, gunther.voet@ibm.net

    Titre-Fr : Mthode de messagerie off-line pour Linux (Adresses e-
     mail off-line avec un compte)

    Version : v1.3.3, 4 June 1998

    Traducteur : Thierry Le Queau, celeborn@club-internet.fr

    Version traduite : v1.3.2, 7 February 1998

    Commentaire : EN COURS


  1133..7722..  PPaarrttiittiioonn--RReessccuuee


    Auteur(s) : Jean-Daniel Dodin

    Titre-Fr :

    Version : Jan 2000

    Traducteur : Charlotte Bonay, cha@multimania.com

    Version traduite : v1.1, 22 Octobre 1997

    Commentaire : EN COURS


  1133..7733..  PPaarrttiittiioonn


    Auteur(s) : Kristian Koehntopp, kris@koehntopp.de

    Titre-Fr :

    Version : version 3.0, 1 May 2000

    Traducteur : Guillaume Bertucat, guillaume@ibpc.fr, Raphael Gurlie,
     raphael@ibpc.fr

    Version traduite : v 2.4, le 03 mars 1998

    Commentaire : EN COURS


  1133..7744..  PPaatthh


    Auteur(s) : Esa Turtiainen, etu@dna.fi

    Titre-Fr :

    Version : v0.4, 15 November 1997

    Traducteur : Mathieu Lafon, Mathieu.Lafon@insalien.org

    Version traduite : Version 0.4, 15 Novembre 1997

    Commentaire : A JOUR


  1133..7755..  PPLLIIPP


    Auteur(s) : Andrea Controzzi, controzz@cli.di.unipi.it

    Titre-Fr : PLIP

    Version :  v2.1, 12 March 1998

    Traducteur : Thierry Hamon, thierry.hamon@lipn.univ-paris13.fr

    Version traduite : v2.1, 12 mars 1998

    Commentaire : A JOUR



  1133..7766..  PPrree--IInnssttaallllaattiioonn--CChheecckklliisstt


    Auteur(s) : S. Parthasarathy, algolog@hd1.vsnl.net.in

    Titre-Fr :

    Version : Ver. 2.6 of 1999-12-19

    Traducteur : Stphane Marchau, smarchau@sortilege.fr.eu.org

    Version traduite : Ver. 1.5 - 17 Dec. 1997

    Commentaire : EN COURS


  1133..7777..  PPrroocceessss--AAccccoouunnttiinngg


    Auteur(s) : bertie@scn.org

    Titre-Fr :

    Version : Fri Aug 8 09:25:58 HKT 1997

    Traducteur : Miodrag Vallat, miodrag@ifrance.com

    Version traduite : 8 Aot 1997

    Commentaire : A JOUR


  1133..7788..  PPrrooggrraammmmiinngg--LLaanngguuaaggeess


    Auteur(s) : Risto S. Varanka, risto.varanka@helsinki.fi

    Titre-Fr :

    Version : v, 6 January 2000

    Traducteur : Stephane Camberlin, urnammu@free.fr

    Version traduite :

    Commentaire : EN COURS


  1133..7799..  PPrrooxxyy--AARRPP--SSuubbnneett


    Auteur(s) : Bob Edwards, Robert.Edwards@anu.edu.au

    Titre-Fr : ProxyARP Subnetting HOWTO

    Version : August 1997

    Traducteur : Michel Billaud, billaud@labri.u-bordeaux.fr

    Version traduite : Aot 1997

    Commentaire : A JOUR




  1133..8800..  PPuubblliicc--WWeebb--BBrroowwsseerr


    Auteur(s) : Donald B. Marti Jr., dmarti@best.com

    Titre-Fr :

    Version : v0.3, 5 January 1998

    Traducteur : F.X. Martin, yt@mail.dotcom.fr

    Version traduite : v0.3, 5 Janvier 1998

    Commentaire : A JOUR


  1133..8811..  QQmmaaiill++MMHH


    Auteur(s) : Christopher Richardson, rdn@tara.n.eunet.de

    Titre-Fr :

    Version : v1.4, 5 March 1998

    Traducteur : Digo D'OLIVEIRA GRANJA, mortadel@imaginet.fr

    Version traduite : v1.4, 5 Mars 1998

    Commentaire : A JOUR


  1133..8822..  QQuuoottaa


    Auteur(s) :Albert M.C. Tam, bertie@scn.org

    Titre-Fr :

    Version : Fri Aug 8 09:45:05 HKT 1997_

    Traducteur : Antoine Levavasseur, levavass@efrei.fr

    Version traduite : Version du 08 Aot 1997

    Commentaire : A JOUR


  1133..8833..  RRCCSS


    Auteur(s) : Robert Kiesling, kiesling@terracom.net

    Titre-Fr :

    Version : 1.4 1997/08/14

    Traducteur : Jean-Albert Ferrez, ferrez@dma.epfl.ch

    Version traduite : V1.4 1997/08/14

    Commentaire : A JOUR




  1133..8844..  RReemmoottee--BBoooott


    Auteur(s) : Marc Vuilleumier Stckelberg et Sandro Viale

    Titre-Fr :

    Version :  v3.19, February 1999

    Traducteur : Christophe Microtel, christophe@wanadoo.fr

    Version traduite :

    Commentaire : EN COURS


  1133..8855..  RReemmoottee--XX--AAppppss


    Auteur(s) : Vincent Zweije, zweije@xs4all.nl

    Titre-Fr :

    Version :  v  0.6.1, 19 November 1999

    Traducteur : Albert-Paul Bouillot, apb@club-internet.fr

    Version traduite : V 0.6.1, 19 Novembre 1999

    Commentaire : A JOUR


  1133..8866..  RRPPMM++SSllaacckkwwaarree


    Auteur(s) : Dave Whitinger, dave@whitinger.net

    Titre-Fr :

    Version : v1.3, 13 April 1998

    Traducteur : Francois Jeanmougin, jeanmougin@igbmc.u-strasbg.fr

    Version traduite : v1.0, 29 Aot 1997

    Commentaire : EN COURS


  1133..8877..  SSaavviinngg--SSppaaccee



    Auteur(s) : Guido Gonzato,  guido@ibogeo.df.unibo.it

    Titre-Fr :

    Version :  v1.0.1, 7 April 1999

    Traducteur : Sbastien DELILLE, sdelille@auxicad.fr

    Version traduite :

    Commentaire : EN COURS



  1133..8888..  SSeeccuurree--PPOOPP++SSSSHH



    Auteur(s) : Manish Singh, yosh@gimp.org

    Titre-Fr :

    Version :  v1.0, 30 September 1998

    Traducteur :

    Version traduite :

    Commentaire :


  1133..8899..  SSeennddmmaaiill++UUUUCCPP



    Auteur(s) : Jamal Hadi Salim jamal@glcom.com

    Titre-Fr :

    Version :  6 May 1998

    Traducteur : Franck Lesage, lesage@pulp.eu.org

    Version traduite : 25 octobre 1997

    Commentaire : EN COURS


  1133..9900..  SSeennddmmaaiill--AAddddrreessss--RReewwrriittee



    Auteur(s) : Thomas Roessler, roessler@guug.de

    Titre-Fr :

    Version :  v0.0, 6 May 1998

    Traducteur : Francois Romieu, romieu@ensta.fr

    Version traduite : v0.0, 6 Mai 1998

    Commentaire : A JOUR


  1133..9911..  SSLLIIPP--PPPPPP--EEmmuullaattoorr


    Auteur(s) : Irish, irish@eskimo.com

    Titre-Fr :

    Version : v3.0, 8/7/97

    Traducteur :

    Version traduite :

    Commentaire :

  1133..9922..  SSmmaallll--MMeemmoorryy



    Auteur(s) : TODD BURGESS,  TBURGESS@UOGUELPH.CA

    Titre-Fr :

    Version : V0.1

    Traducteur : Sebastien Blondeel, Sebastien.Blondeel@lifl.f

    Version traduite : v0.1, dernire mise  jour le 21 mars 1998.

    Commentaire : A JOUR


  1133..9933..  SSoouunnddbbllaasstteerr--AAWWEE


    Auteur(s) : Marcus Brinkmann, Marcus.Brinkmann@ruhr-uni-bochum.de
     item>Titre-Fr : Soundblaster AWE

    URL-Fr :
     <http://www.freenix.org/unix/linux/HOWTO/mini/Soundblaster-
     AWE.html>

    Description : Comment installer et configurer les cartes
     Soundblaster AWE

    Version : v1.2, 11 January 1998

    Traducteur : Arnaud Launay, asl@launay.org

    Version traduite : v1.2, 11 Janvier 1998

    Commentaire : A JOUR


  1133..9944..  SSttaarrOOffffiiccee


    Auteur(s) : Matthew Borowski, mkb@emails.com

    Titre-Fr :

    Version : v1.1, 28 November 1999

    Traducteur : Robert JACOLIN, rjacolin@yahoo.fr

    Version traduite : Version 0.8fr8

    Commentaire : EN COURS


  1133..9955..  SSwwaapp--SSppaaccee


    Auteur(s) : Rahul U. Joshi, jurahul@hotmail.com

    Titre-Fr :

    Version : v1.41, 9 December 1999

    Traducteur :

    Version traduite :

    Commentaire :


  1133..9966..  TTeerrmm--FFiirreewwaallll


    Auteur(s) : Barak Pearlmutter, barak.pearlmutter@alumni.cs.cmu.edu

    Titre-Fr :

    Version : v, 15 July 1996

    Traducteur : Eric.Dumas@Linux.EU.Org

    Version traduite : 22 Mai 1996

    Commentaire :



  1133..9977..  TTkkRRaatt



    Auteur(s) : Dave Whitinger, dave@whitinger.net

    Titre-Fr :

    Version : v1.2, 15 September 1999

    Traducteur : Philippe Martin, feloy@wanadoo.fr

    Version traduite : v1.1, 2 Fvrier 1998

    Commentaire : EN COURS


  1133..9988..  TTookkeenn--RRiinngg


    Auteur(s) : Mike Eckhoff (meckhoff@zaphod.wayne.esu1.k12.ne.us)

    Titre-Fr :

    Version : Rev 4.1 1/7/98

    Traducteur : David Le Roy, arianrod@club-internet.fr

    Version traduite : Version 3, 5 Juillet 1995

    Commentaire : EN COURS



  1133..9999..  TTrraannssppaarreennttPPrrooxxyy


    Auteur(s) : Daniel Kiracofe

    Titre-Fr :

    Version : v1.0, 01 April 2000


    Traducteur :

    Version traduite :

    Commentaire :



  1133..110000..  TTTT--DDeebbiiaann


    Auteur(s) : Bear Giles, bgiles@coyotesong.com

    Titre-Fr :

    Version : v0.3, 10 January 2000

    Traducteur :

    Version traduite :

    Commentaire :



  1133..110011..  UUllttrraa--DDMMAA


    Auteur(s) : Brion Vibber, brion@pobox.com

    Titre-Fr :

    Version : v3.0, 9 November 1999

    Traducteur : Maxime Baudin, mbaudin@club-internet.fr

    Version traduite : v2.0, 7 Aot 1998

    Commentaire : EN COURS


  1133..110022..  UUppddaattee


    Auteur(s) : Kjetil Bakkeskaug, Kjell Sundby and Stein Gjoen,
     sgjoen@nyx.net

    Titre-Fr : Comment se tenir inform

    Version :  v0.22, 19 September 1999

    Traducteur : Jean-Albert FERREZ, ferrez@dma.epfl.ch

    Version traduite : v0.22, 19 Septembre 1999

    Commentaire : A JOUR


  1133..110033..  UUppggrraaddee


    Auteur(s) : Greg Louis, glouis@dynamicro.on.ca

    Titre-Fr : Mettez  jour votre distribution Linux


    Version : v1.11, 6 June 1996

    Traducteur : Benoit Sibaud, sibaud@poste.isima.fr

    Version traduite : v1.11, 6 Juin 199

    Commentaire : A JOUR


  1133..110044..  VVAAIIOO++LLiinnuuxx


    Auteur(s) : Hideki Saito hideki@chatlink.com

    Titre-Fr : Linux sur Sony VAIO mini-HOWTO

    Version : v1.1, 16 September 1998

    Traducteur : Nicolas Duboc, duboc@essi.fr

    Version traduite : v1.1, 16 septembre 1998

    Commentaire : A JOUR



  1133..110055..  VViissuuaall--BBeellll


    Auteur(s) : Alessandro Rubini, rubini@linux.it

    Titre-Fr :

    Version : v2.2, 11 November 1997

    Traducteur : Jean-Albert Ferrez, ferrez@dma.epfl.ch

    Version traduite : v2.2, 11 Novembre 1997

    Commentaire : A JOUR


  1133..110066..  VVPPNN


    Auteur(s) : Arpad Magosanyi, mag@bunuel.tii.matav.hu

    Titre-Fr :

    Version :  v0.2,7 Aug1997

    Traducteur : Nicolas PRIGENT, prigentn@cicrp.jussieu.fr

    Version traduite :

    Commentaire : EN COURS


  1133..110077..  WWaaccoomm--UUSSBB--mmiinnii--HHOOWWTTOO


    Auteur(s) : Arnaud Claden

    Titre-Fr :


    Version :  01 June 2000

    Traducteur :

    Version traduite :

    Commentaire :


  1133..110088..  WWoorrddPPeerrffeecctt


    Auteur(s) : Wade Hampton (tasi029@tmn.com)

    Titre-Fr : Mini manuel de WordPerfect

    Version :  2.0 August 13, 1997

    Traducteur : Robert JACOLIN, rjacolin@yahoo.fr

    Version traduite : V2.0, 13 aot 1997

    Commentaire : A JOUR


  1133..110099..  XX--BBiigg--CCuurrssoorr


    Auteur(s) : Joerg Schneider, schneid@ira.uka.de

    Titre-Fr :

    Version : V2, August 11 1997

    Traducteur :

    Version traduite :

    Commentaire :


  1133..111100..  XXFFrreeee8866--XXIInnssiiddee


    Auteur(s) : Marco Melgazzi, marco@techie.com

    Titre-Fr :

    Version : version 1.3 / 1997 September

    Traducteur : Sebastien.Blondeel, Sebastien.Blondeel@lifl.fr

    Version traduite : version 1.3 / septembre 1997

    Commentaire : A JOUR


  1133..111111..  XXtteerrmm--TTiittllee


    Auteur(s) : Ric Lister, ric@giccs.georgetown.edu

    Titre-Fr :Comment changer le titre d'un xterm

    Version :  v2.0, 27 October 1999

    Traducteur : Jean-Albert FERREZ, ferrez@dma.epfl.ch

    Version traduite : 22.11.1999, v2.0

    Commentaire : A JOUR


  1133..111122..  ZZIIPP--DDrriivvee


    Auteur(s) : Kyle Dansie, dansie@ibm.net

    Titre-Fr :

    Version : v2.4, 10 January 1999

    Traducteur : Albert-Paul Bouillo, apb@club-internet.fr

    Version traduite : v2.4, 10 Janvier 1999

    Commentaire : A JOUR



  1133..111133..  ZZIIPP--IInnssttaallll


    Auteur(s) : John Wiggins, jwiggins@comp.uark.edu

    Titre-Fr :

    Version : v0.7, 26 January 1998

    Traducteur : Francois Jeanmougin, jeanmougin@igbmc.u-strasbg.fr

    Version traduite : v0.7, 26 Janvier 1998

    Commentaire : A JOUR


  1144..  MMiinnii--HHoowwTToo nnoonn mmaaiinntteennuuss



  1144..11..  CCoolloouurr--llss



    Auteur(s) : Ravn Andersen, ravn@dit.ou.dk

    Titre-Fr :

    Version : v1.4, 7 August 1997

    Traducteur : Pierre  Vassellerie, Pierre.Vassellerie@obspm.fr

    Version traduite : v1.0f2, 14 Octobre 1995

    Commentaire : EN COURS


  1144..22..  CCoommeeaauu--CC++++




    Auteur(s) : tjbynum@metalab.unc.edu

    Titre-Fr :

    Version : 6 January 1998

    Traducteur :

    Version traduite :

    Commentaire :


  1144..33..  DDiiaall--OOnn--DDeemmaanndd



    Auteur(s) : tjbynum@metalab.unc.edu

    Titre-Fr :

    Version : 6 January 1998

    Traducteur :

    Version traduite :

    Commentaire :


  1144..44..  DDiipp++SSLLiiRRPP++CCSSLLIIPP


    Auteur(s) :Zenon Fortuna, zenon@netcom.com

    Titre-Fr :

    Version : 1.0

    Traducteur :

    Version traduite :

    Commentaire :


  1144..55..  DDyynnaammiicc--IIPP--HHaacckkss



    Auteur(s) : Michael Driscoll, fenris@lightspeed.net

    Titre-Fr :

    Version : v2.1.3

    Traducteur : Mathieu ARNOLD, arn_mat@club-internet.fr

    Version traduite : V 2.1.3, 25 Mai 1997

    Commentaire : A JOUR





  1144..66..  GGrraavviiss--UUllttrraaSSoouunndd


    Auteur(s) : Nicolai Langfeldt, janl@math.uio.no

    Titre-Fr :

    Version : Version 0.2.2; 14/9/1997

    Traducteur : David.Sagnol@sophia.inria.fr

    Version traduite :

    Commentaire : EN COURS


  1144..77..  GGUUII--DDeevveellooppmmeenntt



    Auteur(s) :Philip Markwalder, pgmarkwa@stud.ee.ethz.ch

    Titre-Fr :

    Version :

    Traducteur : Loic Vigneras, Loic@europe.tgs.com

    Version traduite :

    Commentaire : EN COURS


  1144..88..  HHTTMMLL--VVaalliiddaattiioonn


    Auteur(s) : Keith M. Corbett, kmc@specialform.com

    Titre-Fr :

    Version : v0.2, 29 October 1995

    Traducteur : Thierry Bezecourt , thbzcrt@worldnet.fr

    Version traduite : v0.2, 29 Octobre 1995

    Commentaire : A JOUR


  1144..99..  JJaazz--DDrriivvee



    Auteur(s) : bwillmot@cnct.com

    Titre-Fr :

    Version :  6 January 1998

    Traducteur :

    Version traduite :

    Commentaire :


  1144..1100..  JJEE



    Auteur(s) : Hironobu ABE, hironobu@ap.isl.melco.co.jp et Yasu Hiro
     YAMAZAKI, hiro@ice3.ori.u-tokyo.ac.jp

    Titre-Fr :

    Version : April 20 1995

    Traducteur :

    Version traduite :

    Commentaire : NE PAS TRADUIRE


  1144..1111..  LLiinnuuxx++DDOOSS++WWiinn9955


    Auteur(s) : Alan L. Wendt, alan@ez0.ezlink.com

    Titre-Fr :

    Version : v1.0, 10 September 1996

    Traducteur : Sylvain Mielot, mielot@multimania.com

    Version traduite :

    Commentaire : EN COURS


  1144..1122..  LLiinnuuxx++OOSS22++DDOOSS


    Auteur(s) : Hamish Moffatt, moffatt@yallara.cs.rmit.edu.au.

    Titre-Fr :

    Version :  version 0.2. May 20, 1996

    Traducteur :

    Version traduite :

    Commentaire :


  1144..1133..  LLiinnuuxx++WWiinnNNTT


    Auteur(s) : Bill Wohler, wohler@uluru.worldtalk.com

    Titre-Fr :

    Version : v1.1, 19 February 1997

    Traducteur : Digo D'OLIVEIRA GRANJA, mortadel@free.fr

    Version traduite :

    Commentaire : EN COURS


  1144..1144..  MMIIDDII++SSBB


    Auteur(s) : tjbynum@metalab.unc.edu

    Titre-Fr :

    Version : 6 January 1998

    Traducteur :

    Version traduite :

    Commentaire :


  1144..1155..  OOnnlliinnee--SSuuppppoorrtt


    Auteur(s) :

    Titre-Fr :

    Version :

    Traducteur :

    Version traduite :

    Commentaire :


  1144..1166..  PPaaggeerr


    Auteur(s) : Chris Snell chris@unm.dorm.net

    Titre-Fr :

    Version : 29 August 1997

    Traducteur :

    Version traduite :

    Commentaire :


  1144..1177..  PPPPPP--oovveerr--IISSDDNN


    Auteur(s) :rmarc@netcom.com

    Titre-Fr :

    Version : Sat, 13 Apr 1996 20:15:17

    Traducteur : Julien Garnault, judge@club-internet.fr

    Version traduite :

    Commentaire : EN COURS




  1144..1188..  PPPPPP--oovveerr--mmiinniiccoomm


    Auteur(s) : Winfried Trmper winni@xpilot.org

    Titre-Fr : PPP-par-minicom

    URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/mini>

    Description : comment utiliser minicom pour lancer PPP

    Version : 0.0 09 December 1996

    Traducteur : feloy, feloy@wanadoo.fr

    Version traduite : v0.0  09 Dcembre 1996

    Commentaire : A JOUR


  1144..1199..  PPrriinntt22WWiinn


    Auteur(s) : Harish Pillay (h.pillay@ieee.org)

    Titre-Fr :

    Version : June 7th 1996

    Traducteur : Marie-Agnes Pauchet-Le Hericy

    Version traduite :

    Commentaire : EN COURS


  1144..2200..  PPrrooxxyy--AARRPP


    Auteur(s) : Al Longyear, longyear@netcom.com

    Titre-Fr :

    Version : December 5, 1994

    Traducteur : Eric.Dumas@Linux.EU.Org

    Version traduite : December 5, 1994

    Commentaire : A JOUR



  1144..2211..  SSLLIIPP++pprrooxxyyAARRPP


    Auteur(s) : Dave Kennedy, davek@Muscle.Net

    Titre-Fr :

    Version :  1.3 1996/11/20

    Traducteur : Nicolas Lejeune, nl@freenix.org

    Version traduite : v1.2 04/02/1994

    Commentaire :


  1144..2222..  SSoouunnddbbllaasstteerr--1166


    Auteur(s) : Eric Z. Ayers, Eric.Ayers@compgen.com

    Titre-Fr :

    Version : v1.0, 14 January 1997

    Traducteur : Thierry Le Queau, celeborn@club-internet.fr

    Version traduite : 1.0, Janvier 1997

    Commentaire : A JOUR


  1144..2233..  SSwwaapp--SSppaaccee


    Auteur(s) : H. Peter Anvin, hpa@yggdrasil.com

    Titre-Fr :

    Version :  v 1.3, 19 Jun 1995

    Traducteur : Pierre Tane, tanep@bigfoot.com

    Version traduite : v 1.3, 19 Juin 1995

    Commentaire : A JOUR


  1144..2244..  TTiinnyy--NNeewwss


    Auteur(s) : Kent Lewis (Kenneth M. Lewis, Jr.)

    Titre-Fr :

    Version : May 25, 1995

    Traducteur :

    Version traduite :

    Commentaire :


  1144..2255..  VViirrttuuaall--WWeebb


    Auteur(s) :Dan Pancamo, pancamo@infocom.net

    Titre-Fr :

    Version : v1.0, 24 November 1995  Copyright 1995

    Traducteur :

    Version traduite :

    Commentaire :

  1144..2266..  WWiinn9955++WWiinn++LLiinnuuxx


    Auteur(s) : Robert Goodwin, Robert.Goodwin@mcc.ac.uk

    Titre-Fr :

    Version : August 1996

    Traducteur : Olivier Tharan, olive@minet.net

    Version traduite : Aot 96

    Commentaire : A JOUR



  1144..2277..  XXtteerrmmiinnaall


    Auteur(s) : Scot W. Stevenson, scot@catzen.gun.de

    Titre-Fr :

    Version : Version 1.0 BETA (July 1995)

    Traducteur : Pierre Vassellerie, Pierre.Vassellerie@obspm.fr

    Version traduite : Version 1.0f BETA (11 Novembre 1996)

    Commentaire : A JOUR



































  Le systeme MGR Window
  Vincent Broman
  Edition 30 Mai 1996

  11..  CCeett HHOOWWTTOO

              Copyright Vincent Broman 1995
           Vous pouvez effectuer et distribuer
           des copies selon les conditions de la GNU General Public License.

  11..11..  AArrcchhiivvaaggee

  Cet   HOWTO  est  archive  sur  ftp://archimedes.nosc.mil/pub/Mgr/MGR-
  HOWTO.sgml,               et               egalement               sur
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/MGR-HOWTO.      Dans    les
  repertoires adjacents  peuvent  apparaitre  des  fichiers  de  formats
  differents tels que MGR-HOWTO.txt.

  11..22..  AAuutthheennttiiffiiccaattiioonn

  Les  copies  de  la  distribution  MGR  dues  a  Broman  doivent  etre
  accompagnees des fichiers de signature PGP,  signees  "Vincent  Broman
  <broman@nosc.mil>".

  11..33..  CCrreeddiittss ppoouurr cceett HHOOWWTTOO

  Bien  que Vincent Broman ait ete l'initiateur de cet HOWTO, la plupart
  des informations et des  textes  furent  obtenus  a  partir  de  FAQs,
  READMEs,  etc.  ecrits  par Stephen Uhler, Michael Haardt, et d'autres
  personnes ayant "l'esprit Reseau".   Corrections  et  suggestions  par
  Email a broman@nosc.mil.

  Uhler  fut  l'architecte  principal  de MMGGRR -- voir Remerciements plus
  loin.

  22..  QQuu''eesstt--ccee qquuee MMGGRR ??

  22..11..  FFoonnccttiioonn

  MMGGRR(ManaGeR) est un systeme de fenetres  graphiques.  MMGGRR  fournit  un
  gestionnaire integre de fenetres et un emulateur de terminal graphique
  sur des systemes bitmaps couleurs et monochromes.  MMGGRR est controlable
  par des menus pop-up actives par souris, par action du clavier, et par
  des sequences d'echappement ecrites par  un  client  sur  des  pseudo-
  terminaux.

  MMGGRR  fournit  a chaque client une fenetre avec : fonctions de controle
  terminal en style termcap, primitives graphiques telles que dessins de
  lignes  et  de  cercles  ;  amenagements  pour  manipuler les bitmaps,
  fontes,  icones  et  menus  pop-up  ;  commandes  pour  redessiner  et
  repositionner  les  fenetres  ;  et  un systeme de passage de messages
  permettant  aux  programmes-client  d'etablir   des   rendez-vous   et
  d'echanger des messages. Les programmes client peuvent demander a etre
  informes lorsqu'un changement dans le systeme intervient,  tel  qu'une
  fenetre  redessinee,  un clic de souris, ou un message envoye a partir
  d'un autre programme client. Ces changements sont appeles  evenements.
  MMGGRR  notifie un evenement a un programme client en envoyant une chaine
  ASCII  dans  un  format  specifie  par  le   programme   client.   Des
  applications  existantes  peuvent  etre integrees dans l'environnement
  sans etre modifiees : MMGGRR imite des actions sur le clavier en  reponse
  a des selections du menu utilisateur ou d'autres evenements.

  22..22..  CCoonnddiittiioonnss rreeqquuiisseess

  MMGGRR tourne couramment sur Linux, FreeBSD, stations Sun 3/4 avec SunOS,
  et  Coherent.  Certaines  versions  anciennes  de  MMGGRR  tournent   sur
  Macintosh,  Atari ST MiNT, Xenix, 386-Minix, DEC 3100, et 3b1 Unix-pc.
  De nombreux petits systemes industriels en temps reel sous OS9 et Lynx
  utilisent  en  Europe  (une  autre  variante  de) Mgr comme interface.
  L'interface de programmation est implementee en C et Elisp,  cependant
  des   supports  clients  dans  d'autres  langages  ne  posent  pas  de
  difficultes.

  MMGGRR requiert beaucoup moins de ressources que X, ou  meme  gcc.   Bien
  sur  il n'a pas le repertoire de programmes, les bibliotheques de haut
  niveau de X ou MS-Windows, mais il est elegant et abordable.

  On a dit que MMGGRR est a X ce que Unix est a Multics.

  22..33..  QQuueelllleess ssoonntt lleess ddiiffffeerreenncceess eennttrree MMGGRR,, XX1111 eett 88..55 ??

  MMGGRR consiste en un serveur avec un  gestionnaire  de  fenetres  et  un
  emulateur  de terminal, et des clients qui tournent dans cet emulateur
  en l'utilisant pour communiquer avec le  serveur.  Il  n'y  a  pas  de
  multiplexage de ressources.

  X11  est constitue d'un serveur et de clients, qui sont habituellement
  connectes au serveur via un socket. Ce qui est visible a l'utilisateur
  tels  qu'emulateurs  de terminal, gestionnaires de fenetres, etc., est
  realise en utilisant les clients.

  8.5, le systeme de fenetre Plan 9, est un multiplexeur de ressources ;
  tout  processus  tournant dans une fenetre peut acceder a /dev/bitblt,
  /dev/mouse et /dev/kbd sous son propre nom.  Ceux-ci sont  multiplexes
  a  /dev/bitblt,  /dev/mouse et /dev/kbd de 8.5.  Cette approche permet
  de faire fonctionner 8.5 dans une  fenetre  8.5,  de  conception  tres
  soignee.  De plus 8.5 dispose d'un gestionnaire de fenetres integre et
  un emulateur de terminal.

  33..  IInnssttaalllleerr MMGGRR

  On      peut      charger      la      derniere      version       sur
  archimedesbugs.nosc.mil/pub/Mgr/69     et     sous    Mosaic    depuis
  http://archimedes.nosc.mil/Mgr/69.   On  peut  le  trouver  aussi  sur
  ftp://sunsite.unc.edu/pub/Linux/apps/MGR et ses miroirs.  Les versions
  anciennes de Haardt peuvent se trouver sur tsx-11.mit.edu et peut-etre
  ailleurs.  Des  versions Pre-Linux de MMGGRR de Uhler et d'autres ont ete
  trouvees sur bellcore.com/pub/mgr, mais je  pense  qu'elles  n'y  sont
  plus.   J'ai  conserve une copie de tout ce que j'ai vu concernant MGR
  sur l'Internet, et je n'ai pas connaissance qu'il n'y ait quoi que  ce
  soit d'important qui puisse manquer dans cette distribution Linux/Sun.
  Il y a eu un tas de versions et de mises en circulation de  MMGGRR,  mais
  la  version  *Linux* actuelle est 0.69. Cette version devrait passer a
  1.0 quand un code VGA-256 stable pour Linux apparaitra (pour plusieurs
  types  de  cartes  video).  Les  numeros de version RCS sont passes de
  Bellcore 4.3 jusqu'a 4.13 a ce jour.

  Pour construire cette distribution de MMGGRR il  faut  m4  (GNU  ou  tout
  autre  admettant  l'option  -D),  make  (GNU,  ou tout autre admettant
  include) et *roff pour les docs. Et enfin sh, awk  et  install  POSIX.
  Les distributions binaires n'ont pas toujours assemblees aussi faut-il
  un compilateur C ANSI, du style gcc.

  Une installation sous Linux requiert au moins une version  0.99.10  ou
  ulterieure  (1.2.13  est  ce  que  j'utilise a l'heure actuelle) , une
  carte graphique HGC, EGA, VGA ou SVGA et une souris de type  :  serial
  Microsoft,  serial  MouseSystems 3 et 5 bytes, serial MMSeries, serial
  Logitech, PS/2, ou une souris bus. Avec  Buckey  (Meta)  hot  keys  en
  service, meme un systeme ne possedant pas de souris peut effectuer pas
  mal de travail utile sous  MGR.   Le  mode  graphique  monochrome  VGA
  640x480  est  supporte,  tout  comme  le  640x350  et le 640x200. Pour
  tourner en 800x600, ou d'autres modes que votre BIOS peut  initialiser
  et  qui  n'ont  pas  besoin  de bank-switching, vous aurez besoin d'un
  petit  programme  (src/vgamisc/regs.exe)  sous  DOS  pour   lire   les
  registres  VGA  quand  ce  mode  est installe puis d'ecrire un fichier
  header que vous placerez dans le repertoire  src/libbitblit/linux,  de
  telle  sorte  qu'il  puisse  etre  appele  par  le  fichier vga.c. Des
  exemples sont fournis, mais creez quand meme le votre. Quelques cartes
  VGA  peuvent utiliser des fenetres de 128k ; celles-ci peuvent tourner
  avec de plus hautes resolutions.

  Le code Linux-colorport  peut  aussi  tourner  dans  le  mode  couleur
  standard  VGA  320*200*256 sans difficultes, car il n'y a pas de bank-
  switching necessaire. Si vous reflechissez  au  peu  que  representent
  64000  pixels,  vous  comprendrez  que ce mode couleur est tout a fait
  limite. Un code lent, mais simple, a ete ajoute dans la version  0.65,
  et il travaille avec une carte Tseng ET4000 dans les modes 640x480x256
  et 800x600x256. Le code S3 ne marche pas encore dans  les  resolutions
  super-VGA. Pour utiliser des nouvelles cartes super-VGA il faut ecrire
  une fonction pour changer de bloc de memoire et etre sur que  le  mode
  ecran  souhaite peut etre initialise a partir d'un vidage de registre,
  eventuellement en le peaufinant a la main. Les serveurs  couleur  sous
  Linux  deforment  generalement  les  fontes  ecrans, d'ou la necessite
  d'utiliser  restorefont   comme  dans  runx.  Si   quelqu'un   pouvait
  recuperer  le  code  d'initialisation  VGA de X, cela ferait de MGR un
  systeme possedant plus de couleurs.

  Suns avec SunOS 4.1.2+ et les tampons  de  trame  bwtwo,  cgthree,  ou
  cgsix  sont acceptes. Leurs vitesses de manipulation des couleurs sont
  correctes.  Les systemes  Coherent   doivent  se  referer  au  fichier
  README.Coh  de la distribution source.  Porter le tout dernier MMGGRR sur
  un autre systeme analogue a POSIX qui possede select, des  pty  et  un
  acces  direct  a  un  tampon de trame bitmap devrait etre immediat, en
  implementant simplement la bibliotheque libbitblit basee sur  le  code
  sunmono ou colorport.

  Si  vous  voulez  tout  installer,  vous aurez besoin de 7 MB d'espace
  disque pour les  binaires,  les  fonts,  les  explications,  etc.  Les
  sources  font  environ  4,5  MB  plus  les  fichiers  objets durant la
  compilation.

  Normalement, /usr/mgr doit etre le repertoire ou  bien  il  doit  etre
  linke au repertoire ou vous installerez les accessoires MMGGRR.  Tapez

       cd /usr/mgr; tar xvfz la_ou_vous_le_mettez/mgrusr-0.69.tgz

  et eventuellement
       cd /usr/mgr; tar xvfz la_ou_vous_voulez/morefonts-0.69.tgz

  pour  decompacter.  Les  sources  peuvent etre mises n'importe ou, par
  exemple tapez

       cd /usr/src/local/mgr; tar xvfz la_ou_vous_voulez/mgrsrc-0.69.tgz

  pour decompacter les sources a partir de archimedes.nosc.mil.

  L'arborescence source  peut  etre  compilee  a  partir  d'un  Makefile
  principal  qui  fait appel lui-meme a des Makefile secondaires, chacun
  "incluant" un "Configfile" au niveau  superieur.   Le  Configfile  est
  cree a l'aide d'un script interactif nomme Configure, qui vous pose un
  certain  nombre  de  questions,  puis  utilise  m4  avec  un   fichier
  Configfile.m4.  Ensuite vous tapez quelque chose comme ceci :

       chdir /usr/src/local/mgr
       sh ./Configure
       make first
       make depend
       make install
       make clean

  Il  est  prudent, avant de taper make, de jeter un coup d'oeil dans le
  fichier Configfile genere par le script Configure, pour verifier  s'il
  n'y  a  pas  d'anomalie.   Au  pire m4 s'interrompt, creant un fichier
  Configfile  tout  petit.   Si  cela  arrive,  essayez  une  copie   de
  Configfile.sun   ou   Configfile.lx.  Tout  peut  etre  effectue  dans
  n'importe quel repertoire avec un Makefile a partir du moment  ou  les
  bibliotheques  ont  ete  compilees  et  installees.   Le  serveur, les
  bibliotheques et quelques clients sont  implementes  avec  lint,  mais
  plusieurs  clients  utilisent  le  code C K&R ce qui engendre beaucoup
  d'avertissements  pendant  la  compilation.   Plusieurs   flags   dans
  MGRFLAGS  peuvent  etre  ajoutes  ou  retranches pour changer quelques
  options du serveur, a savoir :

     --DDWWHHOO
        fichier utmp poubelle pour que "who" puisse travailler

     --DDVVII
        code pour faire bouger le curseur sous vi avec la souris

     --DDDDEEBBUUGG
        permet la mise au point en selectionnant l'option -d

     --DDFFAASSTTMMOOUUSSEE
        XOR le temps d'acces de la souris

     --DDBBUUCCKKEEYY
        permet les commandes serveur par le clavier sans souris

     --DDPPRRIIOORRIITTYY
        pour planifier la priorite des fenetres au lieu  de  fonctionner
        par  requetes  circulaires  ; la fenetre active obtient une plus
        grande priorite.

     --DDCCUUTT
        pour faire du couper/coller entre fenetres

     --DDMMGGRR__AALLIIGGNN
        force   l'alignement   des   fenetres    pour    un    scrolling
        rapide(monochrome)

     --DDKKIILLLL
        supprime les fenetres en cas d'erreurs i/o sur un tty

     --DDSSHHRRIINNKK
        pour utiliser seulement une partie de l'ecran ($MGRSIZE dans les
        variables d'environnement)

     --DDNNOOSSTTAACCKK
        interdit l'empilement d'evenements

     --DDBBEELLLL
        actionne le bip

     --DDKKBBDD
        lit les donnees mgr a partir du clavier sun, au lieu  de  stdin.
        Cela  autorise  la  redirection  des  messages  console vers une
        fenetre.

     --DDFFRRAACCCCHHAARR
        mouvement de caractere fractionnel pour fontes proportionnelles

     --DDXXMMEENNUU
        menu etendu (experimental)

     --DDMMOOVVIIEE
        extension  pour  faire  un  film  qui  enregistre   toutes   les
        operations  dans  un fichier en vue de les rejouer plus tard (ne
        marche pas bien sous Linux).

     --DDEEMMUUMMIIDDMMSSBBUUTT
        Pour simuler le 3eme bouton d'une souris

  Mefiez-vous : certaines combinaisons n'ont pas ete essayees  sur  tous
  les  systemes.   La  macro BITBLITFLAGS doit contenir -DBANKED si vous
  voulez essayer le super VGA couleur.

  Le code C pour les variables statiques du serveur contenant les icones
  et  les  fontes  est  genere  a  l'aide  d'un  traducteur a partir des
  fichiers icones et fontes.

  Tous les clients ne sont pas compiles et installes  par  les  fichiers
  Makefile.   Les  fichiers clients trouves dans src/clients qui ont des
  noms en majuscule ou bien  non  compiles  par  les  fichiers  Makefile
  fournis,   peuvent   donner   des   problemes   de  compilation  et/ou
  d'utilisation ; il peut etre interessant de les examiner.

  Plusieurs pilotes d'ecran  du  repertoire  libbitblit  ont  plutot  un
  interet historique. Mieux vaut les faire disparaitre.

  Verifiez  que  votre  fichier /etc/termcap et/ou terminfo contient des
  entrees pour les terminaux MMGGRR, comme ceux que  l'on  trouve  dans  le
  repertoire  misc.   Si  vos logiciels prennent en compte $TERMCAP dans
  l'environnement, ceci n'est pas necessaire,  tant  que  vous  utilisez
  set_termcap dans chaque fenetre.

  Il  est  preferable  de  travailler  avec MMGGRR avec setuid root, car il
  utilise ptys et write dans le fichier utmp.   Cela  permet  au  client
  gestionnaire  d'icones  de mieux travailler et d'avoir une plus grande
  surete  quant  a  l'enchainement  des  evenements.   Sur  Linux,   les
  permissions  root sont necessaires pour faire fonctionner les systemes
  ecran. Autrement vous decidez de lui faire confiance.

  Avec les versions aux alentours de 0.62 il y a des problemes avec  Sun
  quand  on utilise csh comme shell par defaut : les programmes semblent
  tourner sur un processus different que le processus de premier plan du
  pty  de  la  fenetre, en contradiction avec les pages de manuel et les
  specifications posix.  Rien de tel avec bash, sh, ou rc. Vous avez une
  idee ?

  44..  UUttiilliisseerr MMGGRR

  Le  seul  fichier  _i_n_d_i_s_p_e_n_s_a_b_l_e  sous MMGGRR est le serveur lui-meme. Il
  vous donnera les  fenetres  emulateur  de  terminal  avec  les  shells
  correspondants,  mais  pas  de jolies horloges, de fontes superbes, de
  graphiques  marrants,  etc...   Suivant  les   options,   le   serveur
  monochrome  a  besoin de 200K de RAM plus un espace dynamique pour les
  fenetres, bitmaps, etc...

  Si /usr/mgr/bin est  dans  votre  PATH,  tapez  seulement  "mgr"  pour
  demarrer.   Apres avoir profite de l'ecran de demarrage anime, frappez
  une touche  quelconque.   Quand  le  fond  hachure  apparait  avec  un
  pointeur  de  souris, appuyez sur le bouton gauche de la souris, allez
  sur "new window" dans le  menu  puis  relachez.   Faites  promener  la
  souris  pour  selectionner  l'endroit  ou  vous  voulez qu'une fenetre
  apparaisse. Celle-ci aura votre shell par defaut.  Maintenez le bouton
  gauche  de  la  souris enfonce dans une fenetre existante pour voir un
  autre menu qui vous  permettra  de  realiser  des  choses  dans  cette
  fenetre.  Cliquer  avec  le  bouton  gauche  sur une fenetre obscurcie
  l'amenera au premier plan.  Le menu que vous aviez  vu  sur  l'arriere
  plan  inclut  la  commande  `quit'.  Pour ceux qui ont une souris avec
  deux boutons, il suffit d'appuyer sur les deux  boutons  simultanement
  pour  simuler  le  troisieme.   Le  sous-menu  quit  comprend l'option
  "really quit", une option d'attente qui doit etre  utilisee  seulement
  si  vous  utilisez un shell offrant l'edition de la ligne de commande,
  et un economiseur d'ecran avec un verrouillage  qui  attend  que  vous
  tapiez un mot de passe lorsque vous revenez sur votre machine.

  En essayant MMGGRR, si vous :

     nnee ppoouuvveezz ttrroouuvveerr ll''eeccrraann
        soyez  sur d'avoir une entree /dev pour votre video, par ex. sur
        Sun /dev/bwtwo0. Si ce n'est pas le cas, en tant que root  allez
        dans  /dev, et tapez "MAKEDEV bwttwo0".  Sinon, vous devez faire
        -S/dev/bwtwo0  ou  (sous  Linux)   -S640x480  comme  option   de
        commande  en demarrant mgr. Sous Linux, soyez egalement surs que
        /usr/mgr/bin/mgr a ete installe suid root.

     nnee ttrroouuvveezz ppaass llaa ssoouurriiss
        assurez-vous   que   /dev/mouse   existe,   habituellement   lie
        symboliquement  au  nom reel de votre souris. Si vous n'avez pas
        la  permission  d'ecrire  dans   /dev,   quelque   chose   comme
        -m/dev/cua0  peut  etre  donne  comme  option  en demarrant mgr.
        Soyez egalement surs d'avoir mis  le  bon  protocole  souris  en
        configurant mgr.  La souris peut s'appeler Microsoft, meme si ce
        n'est pas son vrai nom.

     nnee ppoouuvveezz oobbtteenniirr uunn ppttyy
        assurez-vous que tous les  /dev/[tp]ty[pq]?  sont  propriete  de
        root, mode 666, que tous les programmes references avec l'option
        "shell" dans le fichier .mgrc (si il y en a)  existent  et  sont
        executables.

     nn''aavveezz rriieenn dd''aauuttrree qquuee llaa ffoonnttee ppaarr ddeeffaauutt
        assurez-vous  que  MMGGRR  cherche  bien  au  bon  endroit pour les
        fontes.  Verifiez le fichier Configfile  dans  les  sources,  ou
        bien  regardez  si  une  option  comme -f/usr/mgr/font resoud le
        probleme.

     eetteess ccoommpplleetteemmeenntt bbllooqquuee ((mmeemmee llee ppooiinntteeuurr ssoouurriiss nnee bboouuggee ppaass))
        logez vous sur votre machine a partir  d'un  autre  terminal  et
        tuez le processus mgr. Un ctrl-Q  fera quitter MMGGRR si le clavier
        fonctionne encore.

  44..11..  AApppplliiccaattiioonnss nnoonn lliieeeess aa MMGGRR

  Toute application orientee tty peut tourner sous une fenetre MGR  sans
  problemes.   Les  applications  orientees  ecran  utilisant termcap ou
  curses peuvent obtenir le nombre exact de lignes  et  de  colonnes  en
  utilisant  shape(1)  pour  redimensionner  la  fenetre ou en utilisant
  set_termcap(1) pour obtenir le termcap adequat.

  44..22..  AApppplliiccaattiioonnss ((cclliieennttss)) MMGGRR ddiissttrriibbuueeeess aavveecc llee sseerrvveeuurr

     bbddffttoommggrr
        convertit des fontes BDF en fontes MGR

     bbrroowwssee
        un browser d'icones

     bbuurryy
        enterre la fenetre

     cc__mmeennuu
        pour regarder les erreurs de compilation sous C a l'aide de vi

     cclloocckk
        horloge digitale

     cclloocckk22
        horloge analogique

     cclloossee
        ferme la fenetre et l'iconifie

     ccoolloorr
        pour les couleurs d'arriere et d'avant-plan  du  texte  dans  la
        fenetre

     ccuurrssoorr
        change l'aspect du curseur texte

     ccuutt
        couper/coller du texte de la fenetre vers une memoire tampon

     ccyyccllee
        affiche une sequence d'icones
     ddmmggrr
        previsualisateur ditroff a l'etat brut

     ffaaddee
        fait passer d'une scene a une autre dans un film

     ffoonntt
        passe a une autre fonte dans la fenetre

     ggrrooppbbmm
        un pilote groff PBM utilisant les fontes Hershey

     hhppmmggrr
        emulateur de terminal hp 2621

     iiccoo
        anime un isocaedre ou un autre polyedre

     iiccoonnmmaaiill
        annonce l'arrivee de courrier

     iiccoonnmmssggss
        annonce l'arrivee d'un message

     iiffyy
        iconifie et desiconifie les fenetres

     llooaaddffoonntt
        charge une fonte a partir du systeme de fichiers

     mmaazzee
        jeu de labyrinthe

     mmcclloocckk
        horloge comique

     mmeennuu
        cree ou choisit un menu pop-up

     mmggrr
        Gestionnaire de fenetres et serveur Bellcore

     mmggrrbbdd
        jeu boulder-dash

     mmggrrbbiiffff
        surveille la boite aux lettres et annonce le courrier

     mmggrrllooaadd
        graphique indiquant la charge du systeme

     mmggrrlloocckk
        verrouille la console

     mmggrrllooggiinn
        controleur graphique de login

     mmggrrmmaagg
        loupe sur une partie de l'ecran, avec option de sauvegarde

     mmggrrmmaaiill
        annonce l'arrivee de courrier

     mmggrrmmooddee
        ajuste ou annule les modes de fenetre

     mmggrrmmssggss
        annonce l'arrivee de messages

     mmggrrpplloott
        filtre graphique Unix "plot"

     mmggrrsscclloocckk
        sablier

     mmggrrsshhoowwffoonntt
        parcourt les fontes mgr

     mmggrrsskkeettcchh
        programme de schemas et dessins

     mmggrrvviieeww
        visualise des images bitmap

     mmlleessss
        demarre  less/more  dans  une fenetre separee, avec un menu pour
        less  wtag/mnew/demarrer  n'importe  quel  programme  dans   une
        fenetre separee independante.

     mmvvii
        demarre vi dans une fenetre separee, avec souris

     oocclloossee
        ferme une fenetre (ancien)

     oommggrrmmaaiill
        annonce l'arrivee de courrier (ancien)

     ppbbmmrraawwttoommggrr,,ppggmmrraawwttoommggrr,,ppppmmrraawwttoommggrr
        convertit des bitmats PBM,PGM,PPM brutes en format bitmap mgr

     ppbbmmssttrreeaamm
        fractionne une sequence de bitmaps

     ppbbmmttoopprrtt
        impression a partir de PBM

     ppggss
        un patch ghostscript et interface, un visualisateur PS

     ppiilloott
        balaye des bitmaps et visualise des images

     rreesseettwwiinn
        fait le menage dans une fenetre si le client se plante

     rroottaattee
        rotation d'un bitmap de 90 degres.

     ssccrreeeenndduummpp
        sauvegarde un ecran graphique dans un fichier bitmap

     sseett__ccoonnssoollee
        redirige les messages  console vers une fenetre

     sseett__tteerrmmccaapp
        ajuste une valeur TERMCAP appropriee

     sseettnnaammee
        nomme une fenetre, pour les messages et pour l'iconifier

     sshhaappee
        redimensionne une fenetre

     ssqquuaarree
        transforme une fenetre en carre

     ssqquueeeezzee
        compresse un bitmap mgr

     ssttaarrttuupp
        fournit  un  fichier  de  demarrage  pour  la  disposition de la
        fenetre courante

     tteexxmmggrr
        pour previsualiser un fichier TeX dvi

     tteexxtt22ffoonntt,, ffoonntt22tteexxtt
        conversion entre formats fonte mgr et un texte dump

     uunnssqquueeeezzee
        pour decompresser un bitmap mgr

     vvggaaffoonntt22mmggrr,,mmggrrffoonntt22vvggaa
        conversion de format de fontes mgr et VGA

     wwiinnddooww__pprriinntt
        imprime l'image d'une fenetre

     zzoooomm
        editeur d'icones

     bboouunnccee,, ggrraavv,, hhiillbbeerrtt,, mmggrreeyyeess,, ssttrriinnggaarrtt,, wwaallkk
        demos graphiques

  44..33..  AApppplliiccaattiioonnss MMGGRR ddiissttrriibbuueeeess sseeppaarreemmeenntt,, ccff ffiicchhiieerr ""SSUUPPPPOORRTT""

     ccaallccttooooll
        calculatrice

     cchheessss
        interface pour /usr/games/chess

     ggnnuu eemmaaccss
        editeur avec souris lisp/term/mgr.el et aide menu

     ggnnuupplloott
        traceur de donnees scientifiques universel

     mmeettaaffoonntt
        creation et conception de fontes

     oorriiggaammii
        editeur de dossier

     ppbbmmpplluuss
        conversions et manipulations de format portable bitmap

     ppllpplloott
        traceur de donnees scientifiques superbe

  Le  support Emacs dans misc/mgr.el et misc/mailcap comprend un support
  MIME tres utile, via Rmail et metamail.  Un afficheur d'image de  dif-
  ferents  types  pourrait etre fabrique a partir d'un pilote et de fil-
  tres netPBM, mais je n'ai pas pris le temps de le faire.
  55..  PPrrooggrraammmmaattiioonn ppoouurr MMGGRR

  Le manuel des programmeurs MMGGRR, l'interface des  applications  langage
  C,   se  trouvent  dans  le  repertoire  doc  sous  forme  de  fichier
  exploitable par troff/nroff.  Il  traite  de  concepts  generaux,  des
  appels    fonction/macro   controlant   le   serveur,   d'un   exemple
  d'application, avec index et glossaire.  Porter le code client utilise
  avec les anciennes versions de MGR demande le remplacement de

           #include <mgr/mgr.h>

  par

           #include <term.h>
           #include <dump.h>

  et  des  clients  utilisant  les vieux B_XOR, B_CLEAR, etc. au lieu de
  BIT_XOR, BIT_CLR et autres peuvent etre adaptes en ecrivant :

           #define OLDMGRBITOPS
           #include <mgr/mgr.h>

  Compiler le code client demande en general des options telles que :

           -I/usr/mgr/include   -L/usr/mgr/lib -lmgr

  Vous pouvez obtenir un apercu de l'interactivite des fonctions serveur
  MMGGRR en lisant et essayant le pilote de terminal mgr.el pour GNU Emacs,
  qui met en oeuvre la bibliotheque interface MMGGRR en Elisp.   L'habitude
  qui  consiste  a  s'enquerir  de l'etat du serveur a pour risque de se
  casser la figure si le client attend en meme temps un grand volume  de
  notification d'evenements. Ce probleme arrive lorsque une notification
  d'evenement (asynchrone) survient quand  une  reponse  a  une  demande
  (synchrone)  etait  attendue.  Si  cela  arrive  dans la pratique (non
  habituel) alors les fonctions de demande d'etat MMGGRR doivent etre inte-
  grees avec votre boucle de manipulation d'evenement.

  La seule fonction manquante pour les dessins dans le protocole MMGGRR est
  celle de remplissage de surfaces autres que les rectangles. Il y a  un
  nouveau  code  pour  manipuler la carte des couleurs globale, et aussi
  pour l'allocation et la delivrance des indices de couleur  appartenant
  a  chaque  fenetre.   Si  vous  voulez  fouiller  dans  les  progammes
  serveurs,  vous  trouverez  le  pilote  de  souris  dans  mouse.*   et
  mouse_get,  les abominables choses concernant l'interface clavier dans
  kbd.c, et l'interface video dans les repertoires src/libbitblit/*.  La
  procedure  principale,  plutot l'initialisation, et la boucle d'entree
  de niveau  superieur  sont  dans  mgr.c,  enfin  l'interpretation  des
  sequences d'echappement dans put_window.c.

  66..  DDooccuummeennttaattiioonn ssuupppplleemmeennttaaiirree

  Le  manuel  du programmeur est indispensable pour les idees generales.
  La plupart  des  clients  sont  fournis  avec  une  documentation  man
  installee dans /usr/mgr/man/man1 ou /man6.

  D'autres  documentations  utiles  sont bitblit.3, font.5, et bitmap.5.
  Il y a une ambiguite dans les documentations pour distinguer le format
  des  bitmaps  internes trouves dans votre tampon de trame et le format
  des bitmaps externes  trouves  dans  des  fichiers,  par  exemple  les
  icones.

  La  documentation  mgr.1  traite des options de commande en ligne, des
  commandes dans le fichier .mgrc, de la souris et des  interactions  du
  menu  avec le serveur, et enfin des raccourcis clavier disponibles sur
  sur  les  systemes  qui  en  possedent.    Beaucoup   de   fontes   de
  /usr/mgr/font/*  sont  decrites dans les fichiers /usr/mgr/font/*.txt,
  par exemple /usr/mgr/font/FONTDIR.txt donne la description des  fontes
  de  style X pour celles obtenues dans le format .bdf.  La fin des noms
  de fontes (WxH)  s'interprete  comme  suit  :  W  est  la  largeur  du
  caractere en decimal H est la hauteur en pixels.

  77..  RReemmeerrcciieemmeennttss

  Stephen  Uhler,  avec  d'autres  travaillant  chez  Bellcore,  fut  le
  concepteur initial de MMGGRR, des lors Bellcore a des droits d'auteur sur
  la plupart des codes et des documentations de MMGGRR, dans les conditions
  suivantes :

  Vous avez la permission de copier et d'utiliser ce programme,
  MAIS
  * vous ne pouvez le vendre
  * cette note concernant les droits de copie doit accompagner les copies
  * mentionner Bellcore quand c'est necessaire

  Une vue de la notice de copyright apparait dans le titre de demarrage.

  Autres remerciements :

  +o  Stephen Hawley pour ses merveilleuses icones.

  +o  Tommy Frandsen pour la bibliotheque VGA linux.

  +o  Tom Heller pour sa bibliotheque.

  +o  Andrew Haylett pour le code du pilote de souris.

  +o  Dan McCrackin pour ses patches gasblit -> linux.

  +o  Dave  Gymer,  dgymer@gdcarc.co.uk,  pour  la  correction de l'effet
     Startrek.

  +o  Alex Liu pour la premiere version de Linux de MMGGRR.

  +o  Lars Aronsson (aronsson@lysator.liu.se) pour  les  fontes  tex2  et
     ISO8859.

  +o  Harry             Pulley             (hcpiv@grumpy.cis.uoguelph.ca,
     hcpiv@snowhite.cis.uoguelph.ca) pour l'acces Coherent.

  +o  Vance Petree & Grant Edwards &  Udo  Munk  pour  leur  travail  sur
     Hercules.
  +o  Udo  Munk  pour son travail sur l'initialisation et la selection de
     la souris serie.

  +o  Norman Bartek, Hal Snyder de Mark Williams Co. pour leur  aide  sur
     quelques bugs et les pilotes de peripherique Coherent.

  +o  Grand  merci  a  Zeyd  Ben  Halim  pour  des tas de patches utiles,
     specialement pour adapter les systemes de selection.

  +o  Bradley Bosch (brad@lachman.com) pour des tas de patches depuis  le
     port  acces  3b1,  qui  corrige  des bugs et permet d'installer des
     accessoires nouveaux et attractifs.

  +o  Andrew Morton (applix@runxtsa.runx.oz.au) qui ecrivit le premier le
     code        cut-word.

  +o  Kapil  Paranjape  (kapil@motive.math.tifr.res.in)  pour  le support
     EGA.

  +o  Michael  Haardt  pour  les  corrections  du  support   MOVIE,   les
     corrections de bugs, la separation du code libbitblit en pilotes de
     sortie, l'extension de libmgr, la compression origami du code.

  +o  Yossi Gil pour de nombreuses fontes.

  +o  Carsten Emde, carsten@thlmak.pr.net.ch, pour mphoon.

  +o  Vincent Broman pour l'emulation du 3eme bouton  de  la  souris,  le
     support  cgsix  Sun,  l'acces  a  la  table  des  couleurs  VGA, et
     l'integration du code sunport de l'arrangement en  couches  Haardt,
     le   rassemblement   des   fontes,  l'economiseur  d'ecran,  et  la
     maintenance continue.

  +o  Kenneth  Almquist,  ka@socrates.hr.att.com,  pour  les   salutaires
     reports de bogues.

  +o  Tim  Pierce,  twpierce@midway.uchicago.edu,  pour  le  portage vers
     FreeBSD 2.0R avec la carte VGA Trident.

     Toutes les fontes bitmap de toutes  les  sources  sont  du  domaine
     public  aux  USA.  Les  fontes 583 a largeur fixe fournies avec MMGGRR
     furent obtenues par Uhler, dans la distribution X,  Yossi  Gil,  et
     autre  part.  Les fontes vectorielles Hershey et le code necessaire
     sont probablement librement redistribuables.

  Utilisation de MILO (Alpha Miniloader Howto)
  David A. Rusling, david.rusling@reo.mts.dec.com
  v0.84, 6 Dcembre 1996

  Ce document expose le fonctionnement du Miniloader, un programme pour
  les machines Alpha qui sert  initialiser le systme et dmarrer
  Linux. Le "Alpha Linux Miniloader" (pour tre exact) est galement
  dnomm MILO.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Droits d'auteurs (Copyright)
     1.2 Nouvelles versions de ce document

  2. Qu'est-ce que MILO ?

  3. Images prcompiles de MILO

  4. Comment compiler MILO ?

  5. Comment charger MILO ?

     5.1 Chargement de MILO depuis la console ARC pour Windows NT
     5.2 Dmarrage de MILO depuis l'AlphaBIOS Windows NT
     5.3 Dmarrage de MILO depuis le Debug Monitor des cartes d'valuation
     5.4 Chargement de MILO depuis une disquette de dmarrage failsafe
     5.5 Dmarrage de MILO  partir de la mmoire Flash
     5.6 Dmarrage de MILO par le biais de la console SRM
     5.7 Informations spcifiques  certains systmes
        5.7.1 AXPpci33 (Noname)
        5.7.2 AlphaPC64 (Cabriolet)
        5.7.3 EB 66+
        5.7.4 EB 64+ / Aspen Alpine
        5.7.5 Universal Desktop Box (Multia)
        5.7.6 EB 164
        5.7.7 PC164
        5.7.8 XL266
        5.7.9 Platform2000

  6. L'interface utilisateur de MILO

     6.1 La commande help
     6.2 Dmarrage de Linux
     6.3 Redmarrage de Linux
     6.4 La commande ''bootopt''

  7. Excution du gestionnaire de mmoire flash

     7.1 La commande ''help''
     7.2 La commande ''list''
     7.3 La commande ''program''
     7.4 La commande ''environment''
     7.5 La commande ''bootopt''
     7.6 La commande ''quit''

  8. Restrictions

  9. Dpannage

  10. Remerciements


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce document expose le fonctionnement du logiciel MILO (Miniloader)
  pour Alpha AXP. Ce logiciel de console a pour fonction d'initialiser
  le systme Alpha AXP, de charger et dmarrer Linux et, pour finir, il
  met un PALcode  disposition de Linux.


  11..11..  DDrrooiittss dd''aauutteeuurrss ((CCooppyyrriigghhtt))

  Ce document a t ralis en 1995, 1996, 1997 par David A Rusling. (c)
  Copyright 1995, 1996, 1997.

  Document traduit de l'anglais en 1997 par Frdric Aime
  (fred@castor.unice.fr) et "Les ditions du Soleil" (c) Copyright "Les
  ditions du Soleil" 1997. Maintenance de la version SGML par Miodrag
  Vallat (miodrag@multimania.com).


  CCooppyyrriigghhtt.. Comme il en est de tous les documents HOWTO pour Linux,
  cette documentation peut tre reproduite, distribue intgralement ou
  en partie seulement sur n'importe quel mdia, physique ou
  lectronique, du moment que cet avertissement sur les droits d'auteur
  est prsent sur toutes les copies. L'utilisation commerciale est
  autorise et encourage ; cependant l'auteur est _d__s_i_r_e_u_x d'tre
  averti de ces utilisations. Vous pouvez traduire ce document dans
  n'importe quelle langue  partir du moment o cette note ainsi que la
  dcharge de responsabilit  sont conserves intacte et qu'une notice
  prsentant le traducteur y figure.


  DDcchhaarrggee ddee rreessppoonnssaabbiilliitt.. Bien qu'ayant essay d'inclure les
  informations les plus prcises et correctes  ma disposition, je ne
  peux garantir que l'utilisation faite de ce document n'aboutisse pas 
  des pertes de donnes ou de matriels. Je n'apporte ABSOLUMENT AUCUNE
  GARANTIE quant aux informations contenues dans ce document ; de ce
  fait je ne pourrais tre tenu, en aucun cas, pour responsable des
  consquences de son utilisation.


  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  La dernire version de ce document est disponible  l'adresse
  suivante : <ftp://gatekeeper.dec.com/pub/Digital/Linux-
  Alpha/Miniloader/docs> et David Mosberger-Tang a eu l'amabilit de
  l'inclure sous la forme d'une page Web sur l'excellent site Linux pour
  Alpha : <http://www.azstarnet.com/axplinux>.


  22..  QQuu''eesstt--ccee qquuee MMIILLOO ??

  Sur machines Intel, le BIOS configure le systme et ensuite charge,
  depuis le secteur d'amorage d'un disque DOS, une image  excuter.
  Cela est en quelque sorte la fonction principale de MILO sur un
  systme Alpha. Il existe toutefois un certain nombre de diffrences
  entre BIOS et MILO, notamment le fait que MILO intgre certains
  pilotes de priphriques Linux inchangs. MILO est un logiciel appel
  FirmWare,  l'inverse de LILO qui dpend du logiciel FirmWare BIOS
  responsable de son chargement et de son excution en mmoire centrale.
  Les principales fonctions de MILO sont :


  1. PALcode ;

  2. Initialisation du gestionnaire de mmoire. (construction des tables
     de pages et mise en service de l'adressage virtuel) ;

  3. Logiciel d'affichage (Code d'mulation BIOS et TGA (21030)) ;

  4. Une partie du noyau Linux. Incluant, par exemple, un gestionnaire
     d'interruption qui fait office de noyau Linux ;

  5. Gestionnaires de priphriques en mode bloc (par exemple le pilote
     de disquettes) ;

  6. Un support des systmes de fichiers (ext2, MS-DOS et ISO9660) ;

  7. Un logiciel d'interface utilisateur (MILO) ;

  8. Une interface avec le noyau (configure le HWRPB et la cartographie
     de la mmoire spcifiques  linux) ;

  9. Configuration de la NVRAM (mmoire non volatile) pour la gestion de
     variables d'environnement.


  Les paragraphes suivants dcrivent ces fonctionnalits plus en dtail.


  Le PALcode peut tre peru comme une minuscule couche logicielle qui
  prpare le processeur Alpha en vue de l'utilisation d'un systme
  d'exploitation spcifique. Il fonctionne dans un mode spcial du
  processeur (PALmode) qui a certaines limitations mais utilise les
  instructions standard des processeurs Alpha,  plus cinq instructions
  supplmentaires. De cette manire le processeur Alpha peut excuter
  une grande diversit de systmes d'exploitation tels que Windows NT,
  OpenVMS, Digital Unix et bien sr Linux. Le PALcode que MILO utilise
  (et in extenso Linux lui-mme) est, comme le reste de MILO un
  freeware. Il est inspir d'un exemple de PALcode pour Digital Unix que
  Digital fournissait avec ses premires cartes d'valuation. Les
  diffrences entre les PALcode sont dues  des diffrences qui existent
  dans la cartographie de la mmoire, dans la gestion des interruptions
  entre les diffrentes versions du processeur Alpha (par exemple le
  21066 possde une cartographie des entres-sorties diffrente de
  l'association du 21064 avec les contrleurs E/S de la famille 2107x,
  en effet le 21066 intgre un quivalent de ce contrleur sur son
  support).


  Pour que MILO fonctionne correctement il lui faut savoir quelle est la
  quantit de mmoire disponible,  quel endroit Linux peut
  ventuellement tre charg en mmoire, et il doit, de plus, tre
  capable d'allouer temporairement de la mmoire pour les pilotes de
  priphriques Linux. Le code contient une cartographie de la mmoire
  qui comporte des espaces disponibles pour une allocation de pages
  mmoire permanentes ou temporaires. Lorsqu'il dmarre, MILO se
  dcompresse  l'emplacement mmoire adquat. Lorsqu'il transfre le
  contrle au noyau Linux, il rserve un espace pour une instance
  compresse de lui-mme, pour le PALcode (indispensable au
  fonctionnement du noyau) ainsi que quelques structures de donnes.
  Cela laisse la quasi-totalit de la mmoire centrale libre pour Linux.


  L'opration finale du gestionnaire mmoire est de configurer et
  d'activer l'adressage virtuel afin que les structures de donnes
  attendues par Linux soient  leur place en mmoire virtuelle.


  MILO contient du code d'initialisation de l'affichage qui prpare le
  systme graphique  l'utilisation de Linux.  Il dtectera et utilisera
  un adaptateur VGA s'il est prsent, sinon il essaiera d'utiliser le
  pilote TGA (21030). S'il y a chec de cette initialisation, MILO
  considrera qu'il n'y a aucun priphrique graphique sur le systme.
  L'mulation BIOS incluse dans MILO est en fait celle de Digital qui
  est capable de supporter la plupart, voire la totalit, des cartes
  graphiques disponibles.


  Les pilotes de priphriques de Linux rsident dans le noyau dont ils
  attendent un certain nombre de services. Certains de ces services sont
  directement fournis par le code du noyau Linux inclus dans MILO.  Par
  exemple la gestion des interruptions est ralise par un ensemble de
  fonctions similaires  celles du vrai noyau Linux.


  La fonctionnalit la plus puissante de MILO est de permettre
  l'inclusion de n'importe quel pilote Linux sans apporter de
  modifications.  Cela lui offre la possibilit d'tre compatible avec
  n'importe quel priphrique compatible avec Linux. MILO contient, en
  standard, tous les pilotes de priphriques en mode bloc du noyau
  Linux.


  MILO charge le noyau Linux depuis un vrai systme de fichiers plutt
  que depuis un secteur d'amorage ou d'autres emplacements tranges. Il
  supporte les systmes de fichiers MSDOS, EXT2 et ISO9660. Les fichiers
  GZIPps sont galement reconnus et recommands, en particulier lors
  d'un chargement  partir d'une disquette qui reste un support
  relativement lent. MILO les reconnat grce  leur suffixe _._g_z.


  Un gestionnaire de clavier rudimentaire est inclus dans MILO si bien
  qu'avec un pilote de priphrique vido d'une simplicit gale il
  dispose d'une interface utilisateur simple.  Cette interface permet de
  lister les systmes de fichiers disponibles par le biais de pilotes de
  priphriques configurs, de dmarrer Linux ou des utilitaires de
  mises  jour de la mmoire flash, de dfinir des variables
  d'environnement agissant sur le dmarrage du systme. Comme avec LILO
  vous pouvez transmettre des arguments au noyau.


  MILO doit renseigner le noyau Linux sur la nature du matriel sous-
  jacent (type de carte mre, quantit de mmoire RAM totale et quantit
  libre). Il effectue cela en utilisant les informations contenues dans
  le HWRPB.  Celles-ci sont disposes aux emplacements appropris en
  mmoire virtuelle juste avant que le contrle du systme ne soit
  transfr au noyau Linux.


  33..  IImmaaggeess pprrccoommppiilleess ddee MMIILLOO

  Si vous envisagez d'utiliser Linux sur un systme Alpha standard, un
  ensemble d'images prcompiles "standard" est  votre disposition.
  Celles-ci ainsi que leurs sources et bien d'autres choses
  intressantes sont disponibles  l'adresse suivante :
  <ftp://gatekeeper.dec.com/pub/Digital/Linux-Alpha/Miniloader>.


  Le sous-rpertoire images contient un rpertoire par type de systme
  standard (ex : AlphaPC64) adoptant les conventions de nomenclatures
  suivantes :


  1. MILO - Image de MILO, celle-ci peut tre dmarre de diverses
     manires ;

  2. fmu.gz - Utilitaire de gestion de la mmoire flash ;

  3. MILO.dd - Image d'une disquette bootable de MILO, pouvant tre
     reproduite grce  rawrite.exe sous DOS ou dd sous Linux.


  Le sous-rpertoire test-images contient un ensemble d'images
  exprimentales sous la mme forme que les prcdentes. Bien
  qu'exprimentales, ces images tendent  contenir les dernires
  fonctionnalits.


  44..  CCoommmmeenntt ccoommppiilleerr MMIILLOO ??

  La compilation de MILO s'effectue de manire indpendante du noyau.
  tant donn qu'il requiert des parties du noyau pour fonctionner, vous
  devrez, en premier lieu, configurer un noyau qui corresponde au
  systme auquel MILO est destin. Cela correspond  attribuer le mme
  numro de version  MILO que celui du noyau utilis pour le
  construire. Ainsi MILO-2.0.25.tar.gz sera compil  l'aide de
  linux-2.0.25.tar.gz. MILO peut tre compil correctement avec une
  version plus rcente du noyau, mais avec celle-ci ce ne sera pas le
  cas. tant donn que les librairies dynamiques sont compltement
  fonctionnelles, il existe deux versions des sources de MILO. Pour
  effectuer la compilation de MILO dans sa version ELF vous devez
  premirement extraire les sources standard puis appliquer un patch 
  ces dernires, correspondant au numro de version du patch ELF. Je
  considrerai, dans la suite de ce document, que les sources et les
  fichiers objets du noyau sont situs dans le rpertoire
  /usr/src/linux, et que le noyau a t correctement compil  l'aide de
  la commande make boot.


  Pour compiler MILO, allez dans le rpertoire contenant les sources de
  MILO et faites appel  la commande make de la manire suivante :


       $ make KSRC=/usr/src/linux config





  De mme que pour la compilation du noyau, le systme vous posera un
  certain nombre de questions.



       Echo output to the serial port (MINI_SERIAL_ECHO) [y]





  Il est utile d'utiliser le port srie comme redirection de la fonction
  du noyau printk ; celle-ci est effectue vers le port /dev/ttyS0. Si
  vous pouvez (et souhaitez) le faire, entrez 'y', sinon COM1 comme
  cho.





       Use Digital's BIOS emulation code (not free) \
                          (MINI_DIGITAL_BIOS_EMU) [y]

  Ce code est inclus en tant que bibliothque de fonctions dont la
  distribution est gratuite si elle est utilise sur une machine  base
  de processeur Alpha. Les sources n'en sont pas disponibles. Si vous
  rpondez 'n', l'mulation BIOS quivalente freeware sera compile.
  Sachez que vous ne pouvez pas encore choisir le systme de Digital
  utilisant le systme ELF (la bibliothque n'est pas encore prte).
  Vous devrez donc rpondre 'n'  cette question.



       Build PALcode from sources (Warning this is dangerous) \
                          (MINI_BUILD_PALCODE_FROM_SOURCES) [n]





  Vous ne devrez utiliser cette option que si vous avez chang les
  sources du PALcode ; dans tous les autres cas, utilisez la version
  standard prcompile du PALcode fourni avec MILO.


  Tout est dsormais prt, vous pouvez lancer la compilation :


       $ make KSRC=/usr/src/linux





  Lorsque la compilation s'est acheve avec succs, l'image de MILO est
  crite dans le fichier milo. Il y a un grand nombre de fichiers
  appels milo.*, ceux-ci devront tre ignors.


  55..  CCoommmmeenntt cchhaarrggeerr MMIILLOO ??

  La manire la plus courante et la plus simple pour charger MILO est de
  le faire  partir de la console ARC. Cependant il est possible de
  raliser cette opration de diverses manires :

    une disquette bootable dite failsafe ;

    firmware ARC pour Windows NT ;

    Windows NT AlphaBlOS ;

    Console SRM de Digital ;

    un Debug Monitor existant sur les cartes d'valuations de Digital,

    flash/ROM.


  55..11..  CChhaarrggeemmeenntt ddee MMIILLOO ddeeppuuiiss llaa ccoonnssoollee AARRCC ppoouurr WWiinnddoowwss NNTT

  La plupart, sinon la totalit, des systmes  base d'Alpha AXP
  intgrent le firmware ARC pour Windows NT et cela est la mthode
  recommande pour dmarrer MILO et de surcrot Linux. Une fois que vous
  disposez de ce firmware et de la version adquate de MILO, la mthode
  est compltement gnrique.


  Le firmware ARC pour Windows NT offre un environnement dans lequel les
  programmes peuvent demander  celui-ci d'effectuer des oprations. Le
  programme OSLoader de Windows NT ralise exactement cela. Linload.exe
  est comparable mais beaucoup plus simple, il fait juste ce qui est
  ncessaire au chargement et  l'excution de MILO. Il charge le
  fichier image adquat en mmoire  l'adresse 0x00000000 puis il
  excute les deux instructions swap-PAL puis PALcall  cette adresse.
  MILO, comme Linux, utilise un PALcode diffrent de celui utilis par
  Windows NT, cela expliquant pourquoi l'instruction swap est
  ncessaire.  MILO se reloge lui-mme  l'adresse 0x200000 puis
  poursuit la rinitialisation du PALcode  cette nouvelle adresse.


  Avant d'ajouter des options de dmarrage pour Linux, vous devrez
  copier linload.exe et MILO  un endroit que la console ARC pourra
  lire.  Dans l'exemple suivant on suppose que le dmarrage s'effectue 
  partir d'une disquette au format DOS.


  1. Choisissez "Supplementary menu..."

  2. Au "Supplementary menu" choisissez "Set up the system..."

  3. Au "Setup menu" choisissez "Manage boot selection menu..."

  4. Dans "Boot selections menu" choisissez "Add a boot selection"

  5. Choisissez "Floppy Disk 0"

  6. Entrez "linload.exe" dans la rubrique OSLOADER

  7. Rpondez "yes"  la question suivante (qui stipule que linload.exe
     est au mme endroit que le systme d'exploitation ; pour la console
     ARC, MILO est vu comme un systme d'exploitation  part entire)

  8. Entrez '\' ensuite (stipulant que la racine du systme est la
     racine de notre disquette)

  9. Entrez le nom de ce choix de dmarrage (Linux par exemple !)

  10.
     Rpondez 'No'  la question 'Initialize debugger at boot time ?'

  11.
     Vous vous retrouvez maintenant dans la section "Boot selections
     menu" : choisissez "Change a boot selection option" et slectionnez
     le nom que vous avez choisi ci-dessus dans le but de l'diter.

  12.
     Avec les flches, slectionnez "OSLOADFILENAME" puis saisissez le
     nom de l'image MILO que vous souhaitez utiliser. Par exemple
     noname.arc ou milo suivi de Entre.

  13.
     Retournez  la section "Boot Selections menu"  l'aide de la touche
     Esc

  14.
     Tapez la touche Esc de nouveau et choisissez "Supplementary menu,
     and save changes"

  15.
     Retournez au "Boot menu" et vous pouvez alors essayer de dmarrer
     MILO.


  Aprs avoir ralis cela, vous devriez avoir un 'boot selection' de la
  forme :
       LOADIDENTIFIER=Linux
       SYSTEMPARTITION=multi(0)disk(0)fdisk(0)
       OSLOADER=multi(0)disk(0)fdisk(0)\linload.exe
       OSLOADPARTITION=multi(0)disk(0)fdisk(0)
       OSLOADFILENAME=\noname.arc
       OSLOADOPTIONS=





  Vous pouvez dsormais dmarrer MILO (puis Linux). Vous pouvez aussi
  charger linload.exe et MILO depuis un systme de fichiers que Windows
  NT comprend. Par exemple NTFS ou DOS sur un disque dur.


  Le contenu de la variable OSLOADOPTIONS est pass  MILO qui
  l'interprte comme une commande. Donc, pour dmarrer Linux sans
  attente, il faudra fournir une valeur du type :



       boot sda2:vmlinux.gz root=/dev/sda2





  Reportez-vous  la section ``L'interface utilisateur de MILO'' pour de
  plus amples renseignements sur les commandes disponibles.


  Une autre mthode de dmarrage de MILO via la console ARC (bien que
  tortueuse) est d'appeler MILO fwupdate.exe puis de choisir l'option
  'Upgrade Firmware'.


  55..22..  DDmmaarrrraaggee ddee MMIILLOO ddeeppuuiiss ll''AAllpphhaaBBIIOOSS WWiinnddoowwss NNTT

  Avec l'apparition des machines de la srie XLT, Digital a chang la
  console ARC pour ses systmes Windows NT et l'a remplace par
  l'AlphaBIOS. Cette nouvelle console offre l'avantage d'une plus grande
  convivialit. Ce changement d'interface implique un changement de
  procdure de configuration pour ceux qui souhaitent dmarrer Linux
  pour Alpha dans ce contexte.

  La premire chose  faire est d'installer la dernire version de
  l'AlphaBIOS sur votre systme. Celle-ci est disponible  l'adresse
  suivante : <http://www.windows.digital.com/support/sysoft.htp>.

  Tlchargez le fichier ZIP, dcompactez-le et installez-le comme suit
  :

  1. Copiez le fichier sur une disquette DOS ;

  2. Allumez l'ordinateur et insrez la disquette. Lors de l'affichage
     des premires informations  l'cran, enfoncez la touche F2 pour
     entrer dans le setup ;

  3. Choisissez "Upgrade AlphaBIOS" ;

  4. Suivez les instructions.

  Une fois que l'AlphaBIOS est mis  jour, vous pouvez dmarrer votre
  machine comme suit :

  1. Crez une disquette DOS contenant les fichiers linload.exe et
     milo ;

  2. Allumez le systme et entrez dans le setup ;

  3. Choisissez "Utilities->OS Selection Setup" ;

  4. Appuyez sur INSERT pour ajouter une nouvelle entre ;

  5. Pour "Boot Name" entrez un nom de votre choix (ici Linux) puis
     pressez Tab pour changer de champ ;

  6. Avec les flches, choisissez 'A:' pour la variable "Boot File is",
     passez au champ suivant ;

  7. Entrez "linload.exe".  Deux fois TAB ;

  8. Entrez "\" pour la variable "OS Path load file" ;

  9. Pressez ENTREE pour valider.

   ce moment l'AlphaBIOS devrait afficher une bote de dialogue
  angoissante indiquant : "Warning: Operating System Selection not
  valid!".  Ne tenez pas compte de cette erreur (cela ne pose de
  problme qu' NT), pressez Entre pour valider.

  1. Pressez F10 puis Entre pour valider ces changements ;

  2. Pressez Esc jusqu' arriver  l'cran d'accueil ;

  3. Choisissez,  l'aide des flches, l'entre que vous venez de
     saisir, pressez Entre pour lancer MILO.

  Si la premire partition de votre disque dur est un systme de
  fichiers DOS de petite taille destin au dmarrage (ainsi que la
  procdure d'installation le recommande), lorsque Linux sera install,
  vous devrez y copier linload.exe et MILO. Au dmarrage suivant, vous
  devrez configurer votre firmware de telle sorte qu'il aille chercher
  ces programmes  l'emplacement voulu. Pour ce faire je vous recommande
  d'utiliser la dmarche suivante :

  1. Entrez dans le setup (F2  l'cran de dmarrage) ;

  2. Choisissez "Utilities->OS Selection setup" ;

  3. Slectionnez l'entre correspondant  Linux, puis pressez F6 pour
     la modifier ;

  4. Placez le curseur sur l'entre correspondant  la partie
     priphrique de la ligne "Boot File" (device pour les versions en
     Anglais).  Avec les flches, choisissez la partition sur laquelle
     rsident linload.exe et MILO. Appuyez sur Entre pour valider.

  5. Si vous souhaitez que votre systme dmarre automatiquement aprs
     le chargement de MILO positionnez-vous ( l'aide de la touche TAB)
     sur la variable "OS Options" puis spcifiez ici quelle est la ligne
     de commande  fournir  MILO, par exemple : "boot sda2:vmlinux.gz".
     Pressez Entre pour valider ;

  6. Utilisez la touche F10 pour sauvegarder les modifications.

  Cela fait que l'utilisation de Linux sur une plate-forme utilisant
  AlphaBIOS devient quasiment identique  celles utilisant la console
  ARC.


  55..33..  dd''vvaalluuaattiioonn DDmmaarrrraaggee ddee MMIILLOO ddeeppuuiiss llee DDeebbuugg MMoonniittoorr ddeess
  ccaarrtteess

  Les cartes d'valuation (et souvent les cartes conues  partir de
  leur exemple) proposent un logiciel appel "debug monitor". Reportez-
  vous  la documentation de votre systme avant d'envisager cette
  possibilit. Les systmes suivants _p_r_o_p_o_s_e_n_t cette fonctionnalit :

    AlphaPC64 (Section ``AlphaPC64 (Cabriolet)'')

    EB64+ (Section ``EB 64+'')

    EB66+ (Section ``EB 66+'')

    EB164 (Section ``EB 164'')

    PC164 (Section ``PC164'')


  Sachez avant toute chose que, sur certaines anciennes versions, ce
  logiciel n'inclut pas de gestionnaire cran / clavier. Vous devrez
  donc vous prparer  connecter un terminal srie  votre systme. Son
  interface est trs simple et une commande d'aide (help) documente une
  grande quantit de commandes. Les plus intressantes de ces commandes
  incluent les mots boot et load.


  Le debug monitor peut charger une image  partir du rseau (netboot)
  ou d'une disquette (flboot). Dans tous les cas, l'image doit tre
  charge  l'adresse 0x200000 (utilisez la commande bootadr 200000).


  Si l'image se trouve sur une disquette (notez que le seul format de
  disquette reconnu est DOS) vous devrez utiliser la commande suivante :



       AlphaPC64> flboot <MILO-image-name>





  55..44..  CChhaarrggeemmeenntt ddee MMIILLOO ddeeppuuiiss uunnee ddiissqquueettttee ddee ddmmaarrrraaggee ffaaiillssaaffee

  D'aprs les informations _d_o_n_t _j_e _d_i_s_p_o_s_e, seul l'AXPpci33 propose la
  reconnaissance de secteur d'amorage de type failsafe floppy (Section
  ``AXPpci33 (Noname)'').


  Si vous ne disposez pas d'une image MILO standard prcompile, vous
  devrez confectionner une disquette au format SRM. Une fois MILO
  compil, vous devrez excuter les instructions suivantes sous Digital
  Unix :



       fddisk -fmt /dev/rfd0a
       cat mboot bootm > /dev/rfd0a
       disklabel -rw rfd0a lrx231 mboot bootm






  Ou bien les commandes suivantes sous Linux :



       cat mboot bootm > /dev/fd0





  Si vous disposez d'une image MILO prcompile vous pourrez construire
  la disquette de la manire suivante :



       dd if=MILO.dd of=/dev/fd0





  55..55..  DDmmaarrrraaggee ddee MMIILLOO  ppaarrttiirr ddee llaa mmmmooiirree FFllaasshh

  Il existe certains systmes qui permettent d'intgrer MILO directement
  dans la PROM Flash, permettant ainsi le dmarrage direct de Linux
  (sans avoir  utiliser de console du type ARC) :

    AlphaPC64 (Section ``AlphaPC64 (Cabriolet)'')

    EB64+ (Section ``EB 64+'')

    EB66+ (Section ``EB 66+'')

    EB164 (Section ``EB 164'')

    PC164 (Section ``PC164'')


  55..66..  DDmmaarrrraaggee ddee MMIILLOO ppaarr llee bbiiaaiiss ddee llaa ccoonnssoollee SSRRMM

  La console SRM (abrviation de System Reference Manual) ne reconnat
  aucun systme de fichiers ni mme aucune partition disque. Elle
  s'attend tout simplement  trouver le logiciel d'amorage  une
  position physique dmarrant  un emplacement donn (il s'agit d'un
  offset ou position relative). L'information dcrivant ce logiciel
  d'amorage (sa taille et sa position relative) est dcrite dans le
  premier bloc de 512 octets du disque. Pour charger MILO depuis la SRM
  vous devez gnrer cette structure de donnes en bonne et due forme
  sur un support que la console peut atteindre. Cela explique
  l'existence des fichiers mboot et bootm.


  Pour charger MILO depuis un priphrique de dmarrage, compilez mboot
  et bootm puis crivez-les sur disque  l'aide de la commande
  suivante :



       $ cat mboot bootm > /dev/fd0





  ou bien tlchargez une image approprie de MILO  partir d'un site
  Web, puis utilisez soit RAWRITE.EXE soit dd pour l'inscrire sur
  disque.


  Cela fait, vous pouvez envisager de dmarrer MILO depuis la console
  SRM, puis d'utiliser une de ses nombreuses commandes pour dmarrer.
  Par exemple, pour dmarrer depuis une disquette, vous devrez effectuer
  l'opration suivante :



       >>>boot dva0
       (boot dva0.0.0.0.1 -flags 0)
       block 0 of dva0.0.0.0.1 is a valid boot block
       reading 621 blocks from dva0.0.0.0.1
       bootstrap code read in
       base = 112000, image-start = 0, image-bytes 4da00
       initializing HWRPB at 2000
       initializing page table at 104000
        initializing machine state
       setting affinity to the primary CPU
       jumping to bootstrap code
       MILO Stub: V1.1
       Unzipping MILO into position
       Allocating memory for unzip
       ####...





  Les systmes suivants sont compatibles avec la console SRM :

    Noname (Section ``AXPpci33 (Noname)'')

    AlphaPC64 (Section ``AlphaPC64 (Cabriolet)'')

    EB164 (Section ``EB 164'')

    PC164 (Section ``PC164'')


  55..77..  IInnffoorrmmaattiioonnss ssppcciiffiiqquueess  cceerrttaaiinnss ssyyssttmmeess

  55..77..11..  AAXXPPppccii3333 ((NNoonnaammee))

  La carte Noname est capable de charger MILO depuis une console ARC ou
  SRM ou depuis une disquette failsafe. Un utilitaire de gestion de la
  mmoire PROM flash, excutable depuis MILO permet de copier ce dernier
  en mmoire flash. En revanche, nous tenons  vous avertir que cette
  manipulation est trs prilleuse car la Noname ne comportant que 256
  Ko de mmoire flash, elle ne peut contenir qu'une image en PROM. Si
  l'image que vous copiez en flash est corrompue, votre systme ne
  dmarrera plus.


  La mthode de dmarrage des cartes Noname est contrle par les
  jumpers J29 et J28. Ils sont disposs comme suit :









  Numro de broche   4
       J29       2 x x x 6
                 1 x x x 5

       J28       2 x x x 6
                 1 x x x 5
                     3





  Les deux options de configuration qui nous intressent sont sur J28,
  dont les plots 1-3, qui dmarrent la console depuis la flash et J29,
  dont les plots 1-3 permettent de dmarrer la console depuis une
  disquette. La seconde option est celle dont vous avez besoin pour
  dmarrer MILO la premire fois.  Une fois que les jumpers auront t
  configurs pour l'utilisation d'une disquette de dmarrage, insrez la
  disquette contenant MILO en version bootable dans le lecteur puis
  relancez l'ordinateur. En l'espace de quelques secondes (aprs
  l'extinction de la lumire du lecteur), vous devrez constater que
  l'cran passe du noir au blanc et y lire les informations relatives 
  l'excution de MILO.  Si les aspects techniques vous intressent,
  sachez que la carte Noname charge le contenu de la disquette 
  l'adresse 0x104000 et les images provenant de la mmoire flash en
  0x100000. Pour cette raison, MILO intgre son PALcode  l'adresse
  0x200000. Lors de son dmarrage, il se reloge lui-mme  l'adresse
  correcte.


  55..77..22..  AAllpphhaaPPCC6644 ((CCaabbrriioolleett))

  L'AlphaPC64 est dot, en standard, du Firmware Windows NT (Section
  ``Chargement de MILO depuis la console ARC pour Windows NT''), de la
  console SRM (Section ``Dmarrage de MILO par le biais de la console
  SRM'') et du Debug Monitor (Section ``Dmarrage de MILO depuis le
  debug monitor des cartes d'valuation'').  Ces images sont en flash et
  il reste de la place dans cette mmoire pour ajouter l'image de MILO
  de manire  pouvoir dmarrer MILO directement depuis la PROM. Un
  utilitaire de gestion de la mmoire flash est disponible sous MILO,
  ainsi il est possible d'intgrer MILO  la mmoire flash lorsque
  celui-ci s'excute (Section ``Excution du gestionnaire de mmoire
  flash'').  Ce procd accepte l'utilisation de variables
  d'environnement MILO.


  Il est possible de choisir parmi les options de dmarrage (ARC, SRM,
  MILO) en utilisant une combinaison de jumpers et de dfinir des
  options de dmarrage qui seront sauvegardes dans la NVRAM de
  l'horloge TOY ("CMOS").

  Il s'agit du jumper J2 ; les bits 6 et 7 ont la fonction suivante :

    SP Bit 6 doit toujours tre ouvert (pas de jumper) ; dans le cas
     contraire le mini-debugger sera excut.

    SP Bit 7 ferm : Excuter l'image dfinie dans la NVRAM

    SP Bit 7 ouvert : Excuter la premire image.


  Donc, si le SP Bit 7 est ouvert, le Debug Monitor sera excut car il
  est toujours positionn en premire place dans la PROM. Et si le SP
  Bit 7 est ferm, l'image excute sera celle dfinie dans l'horloge
  systme (TOY). L'ARC, le Debug Monitor et MILO acceptent cette
  option ; il faut, cependant, tre trs prudent lors de son
  utilisation. Par exemple, vous ne pouvez pas dfinir d'option qui vous
  permettra de dmarrer MILO au dmarrage suivant : lors de
  l'utilisation de la console ARC, cette dernire vous permet de passer
  en mode Debug Monitor ou ARC lors du dmarrage, mais elle ne permet
  pas de passer en mode MILO.


  Pour inclure MILO dans la mmoire flash via le Debug Monitor, vous
  aurez besoin d'une image adquate (dite flashable).  La commande de
  compilation est : make MILO.rom, mais vous pouvez aussi construire une
  image rom  l'aide de l'outil makerom du Debug Monitor.


  > makerom -v -i7 -1200000 MILO -o mini.flash




  (tapez makerom pour comprendre ce que signifient les paramtres, '7'
  reprsente un identificateur d'image flash utilis par la SROM et
  -l200000 indique l'adresse de chargement de cette image).


  Pour charger cette image en mmoire, utilisez une des commandes
  flload, netload, ...  l'adresse 0x200000, puis insrez l'image en
  mmoire flash de la manire suivante :



       AlphaPC64> flash 200000 8





  200000 est l'adresse de chargement et 8 est le numro du segment de
  mmoire  utiliser.  Il y a 16 segments de 64 Ko (soit 512 Ko) dans la
  SROM. (Le Debug Monitor est au segment 0 et l'ARC au segment 4).


  Dfinissez l'image que la SROM va excuter au dmarrage en donnant une
  valeur  la variable TOY bootopt :



       AlphaPC64> bootopt 131




  (131 indique la 3me image, 129 la 1re image, 130 la 2me, etc...)


  teignez la machine, mettez le jumper 7 en place et redmarrez la
  machine. Vous devrez alors pouvoir observer MILO s'excuter.
  Flicitations ! Vous pouvez remonter la machine (enfin !). Si ce n'est
  pas le cas, conservez le tournevis pour plus tard, et enlevez 
  nouveau le jumper 7 pour redmarrer en mode Debug Monitor, reprenez
  les tapes les unes  la suite des autres, mthodiquement, en prenant
  garde de ne rien oublier.


  55..77..33..  EEBB 6666++

  La carte EB66+, comme toutes les cartes d'valuation de Digital,
  contient le Debug Monitor, et de ce fait celui-ci va nous permettre de
  charger MILO. Souvent (mais pas toujours), les cartes drives des
  cartes d'valuation possdent ce logiciel. Habituellement, ces cartes
  contiennent la console ARC. Un utilitaire de gestion de la mmoire
  flash est disponible sous MILO, ainsi il est possible d'intgrer MILO
   la mmoire flash lorsque celui-ci s'excute (Section ``Excution du
  gestionnaire de mmoire flash''). Ce systme accepte les variables
  d'environnement MILO.


  Ces cartes disposent de plusieurs images en mmoire flash contrles
  par jumper. Les deux bancs de jumpers sont J18 et J16 et se situent au
  centre bas de la carte (considrant que le processeur Alpha se situe
  en haut de la carte). Vous pouvez choisir l'option de dmarrage par
  ces jumpers (et MILO lorsqu'il est charg) ainsi qu'une variable
  d'environnement sauvegarde dans la mmoire non volatile (NVRAM TOY).


  jumper 7-8 Ferm signifie qu'il faut utiliser l'image dsigne par la
  variable bootopt, lorsqu'il est ouvert le Debug Monitor est excut.


  Pour le reste de la configuration, reportez vous au paragraphe
  prcdent traitant de l'AlphaPC64 (Section ``AlphaPC64 (Cabriolet)'').


  55..77..44..  EEBB 6644++ // AAssppeenn AAllppiinnee

  Cette carte est trs similaire  l'AlphaPC64 except qu'elle ne
  contient pas de mmoire flash utilisable par MILO. Cette carte possde
  deux ROMS, l'une contenant l'ARC, l'autre contenant le Debug Monitor.


  L'Aspen Alpine, quant  elle, ne contient qu'une ROM o est grave la
  console ARC.


  55..77..55..  UUnniivveerrssaall DDeesskkttoopp BBooxx ((MMuullttiiaa))

  C'est une station ultra compacte  base d'AXP 21066 qui intgre un
  sous-systme graphique TGA (21030). De plus il n'y a de place que pour
  une carte graphique PCI demi-hauteur. Elle utilise la console ARC
  (Windows NT) et il est donc recommand de l'utiliser pour le dmarrage
  de MILO (Section ``Chargement de MILO depuis la console ARC pour
  Windows NT'').


  55..77..66..  EEBB 116644

  La carte EB164, comme toutes les cartes d'valuation de Digital,
  contient le Debug Monitor, et de ce fait celui-ci va nous permettre de
  charger MILO. Souvent (mais pas toujours) les cartes drives des
  cartes d'valuation possdent ce logiciel. Habituellement, ces cartes
  contiennent la console ARC. Un utilitaire de gestion de la mmoire
  flash est disponible sous MILO, ainsi il est possible d'intgrer MILO
   la mmoire flash lorsque celui-ci s'excute (Section ``Excution du
  gestionnaire de mmoire flash''). Ce systme accepte les variables
  d'environnement MILO. La console SRM est, de plus, disponible (Section
  ``Dmarrage de MILO par le biais de la console SRM'').


  Ces cartes disposent de plusieurs images en mmoire flash contrles
  par jumper. Le banc de deux jumpers s'appelle J1 et se situe en bas 
  gauche de la carte (considrant que le processeur Alpha se situe en
  haut de la carte). Vous pouvez choisir l'option de dmarrage par ces
  jumpers (et MILO lorsqu'il est charg) ainsi qu'une variable
  d'environnement sauvegarde dans la mmoire non volatile (NVRAM TOY).
  jumper SP-11 de J1 ferm signifie qu'il faut utiliser l'image dsigne
  par la variable bootopt ; lorsqu'il est ouvert le Debug Monitor est
  excut.


  Pour le reste de la configuration, reportez-vous au paragraphe
  prcdent traitant de l'AlphaPC64 (Section ``AlphaPC64 (Cabriolet)'').


  55..77..77..  PPCC116644

  La carte PC164, comme toutes les cartes d'valuation de Digital,
  contient le Debug Monitor, et de ce fait celui-ci va nous permettre de
  charger MILO. Souvent (mais pas toujours) les cartes drives des
  cartes d'valuation possdent ce logiciel. Habituellement, ces cartes
  contiennent la console ARC. Un utilitaire de gestion de la mmoire
  flash est disponible sous MILO, ainsi il est possible d'intgrer MILO
   la mmoire flash lorsque celui-ci s'excute (Section ``Excution du
  gestionnaire de mmoire flash''). Ce systme accepte les variables
  d'environnement MILO. La console SRM est, de plus, disponible (Section
  ``Dmarrage de MILO par le biais de la console SRM'').


  Ces cartes disposent de plusieurs images en mmoire flash contrles
  par jumpers. Le banc principal de jumpers s'appelle J30, il contient
  les jumpers de configuration. Le jumper CF6 ferm signifie que le
  systme dmarrera le Debug Monitor, il est par dfaut ouvert.


  Pour le reste de la configuration, reportez-vous au paragraphe
  prcdent traitant de l'AlphaPC64(Section ``AlphaPC64 (Cabriolet)'').


  55..77..88..  XXLL226666

  Le XL266 est un des systmes connus sous le nom d'Avanti. Il possde
  une carte fille sur laquelle rsident le processeur Alpha et le cache
  qui se connecte  la carte mre. Cette carte remplace une carte fille
  Pentium quivalente.


  Certains de ces systmes sont vendus avec la console SRM, mais
  certains autres ne sont livrs qu'avec la console ARC (Section
  ``Chargement de MILO depuis la console ARC pour Windows NT'').


  Voici une liste compatible avec cette srie :

    AlphaStation 400 (Avanti),

    AlphaStation 250,

    AlphaStation 200 (Mustang),

    XL. Il en existe deux modles, XL266 et XL233 qui ne diffrent que
     par la vitesse du processeur et la taille de la mmoire cache.


  NNoottee :: Le systme que j'utilise pour dvelopper et tester MILO est un
  XL266 ; de ce fait, c'est le seul sur lequel je peux garantir un
  fonctionnement correct. Cela dit les autres systmes sont,
  techniquement, quivalents. Ils possdent les mmes chipsets et les
  mmes mcanismes d'interruptions.



  55..77..99..  PPllaattffoorrmm22000000

  Il s'agit d'un systme  base de processeur 21066  233 Mhz.


  66..  LL''iinntteerrffaaccee uuttiilliissaatteeuurr ddee MMIILLOO

  Aprs avoir correctement install MILO (Abrv. de MIniLOader) vous
  devrez obtenir l'invite de commande de MILO. Il y a une interface de
  commandes trs simple que vous pouvez utiliser dans le but de dmarrer
  une image Linux particulire. Utilisez la commande help pour obtenir
  une description sommaire des commandes.


  66..11..  LLaa ccoommmmaannddee hheellpp

  Probablement la commande la plus utile de MILO.




       MILO> help
       MILO command summary:
       ls [-t fs] [dev:[dir]]
                               - List files in directory on device
       boot [-t fs] [dev:file] [boot string]
                               - Boot Linux from the specified device and file
       run [-t fs] dev:file
                               - Run the standalone program dev:file
       show                    - Display all known devices and file systems
       set VAR VALUE           - Set the variable VAR to the specified VALUE
       unset VAR               - Delete the specified variable
       reset                   - Delete all variables
       print                   - Display current variable settings
       help [var]              - Print this help text

       Devices are specified as: fd0, hda1, hda2, sda1...
       Use the '-t filesystem-name' option if you want to use
       anything but the default filesystem ('ext2').
       Use the 'show' command to show known devices and filesystems.
       Type 'help var' for a list of variables.





  NNoottee :: la commande bootopt n'apparat que pour les systmes AlphaPC64
  (et quivalents).


  PPrriipphhrriiqquueess.. Jusqu' ce que vous utilisiez une commande qui
  ncessite l'utilisation d'un des priphriques, aucune initialisation
  n'est ralise sur ces derniers. La premire commande show, ls, boot
  ou run provoquera l'initialisation des priphriques. Les pilotes de
  priphriques portent exactement les mmes noms que ceux de Linux.
  Donc le premier disque IDE sera appel hda et la premire partition
  sera hda1. Utilisez la commande show pour obtenir une liste des
  priphriques disponibles.


  SSyyssttmmeess ddee ffiicchhiieerrss.. MILO est compatible avec trois diffrents types
  de systmes de fichiers : MSDOS, EXT2 et ISO9660.  partir du moment
  o un priphrique est disponible pour lui, MILO est  mme de charger
  et d'excuter n'importe quelle image disponible. Le systme de
  fichiers par dfaut est EXT2. Toutes les commandes utilisant les
  systmes de fichiers permettent d'en prciser le type par le biais de
  l'option -t filesystem. Donc si vous souhaitez obtenir une liste du
  contenu d'un CDROM il suffit d'entrer la commande :



       MILO> ls -t iso9660 scd0:





  VVaarriiaabblleess.. MILO contient quelques variables qui aident au processus de
  dmarrage. Si vous dmarrez  partir de la console ARC, MILO utilisera
  les variables d'environnement dfinies par ce firmware. Pour certains
  systmes (tels que l'AlphaPC64), MILO dispose de son propre jeu de
  variables qui ne changent pas d'un dmarrage  l'autre. Ces variables
  sont :



       MILO> help var
       Variables that MILO cares about:
         MEMORY_SIZE           - System memory size in megabytes
         BOOT_DEV              - Specifies the default boot device
         BOOT_FILE             - Specifies the default boot file
         BOOT_STRING           - Specifies the boot string to pass to the kernel
         SCSIn_HOSTID          - Specifies the host id of the n-th SCSI controller.
         PCI_LATENCY           - Specifies the PCI master device latency
         AUTOBOOT              - If set, MILO attempts to boot on powerup
                                 and enters command loop only on failure.
         AUTOBOOT_TIMEOUT      - Seconds to wait before auto-booting on powerup.





  _A_T_T_E_N_T_I_O_N  l'utilisation de la variable AUTOBOOT sans dfinir de
  valeur dlai (AUTOBOOT_TIMEOUT) car MILO dmarrera aprs avoir attendu
  0 seconde. Ce n'est peut-tre pas ce que vous souhaitez.


  PCI_LATENCY reprsente le nombre de cycles PCI qu'un priphrique
  fonctionnant en bus master se rserve lorsqu'il acquiert le contrle
  du bus. La valeur par dfaut est de 32 et la maximum de 255. Dfinir
  une valeur leve revient  dire que chaque fois qu'un priphrique
  prend le contrle du bus PCI, il transfrera plus de donnes.
  Cependant cela signifie aussi qu'un priphrique devra attendre plus
  longtemps pour obtenir le contrle du bus.


  66..22..  DDmmaarrrraaggee ddee LLiinnuuxx

  La commande boot charge et dmarre un noyau Linux  partir d'un
  priphrique. Vous aurez besoin d'avoir un disque contenant ce noyau
  (SCSI, IDE, disquette dans un format reconnu par MILO). Ces images
  peuvent tre compresses  l'aide de gzip ; les premires versions de
  MILO reconnaissaient ces fichiers  l'aide de leur extension '.gz',
  tandis que les plus rcentes font appel  la signature du fichier.


  Il est important de retenir que la version de MILO ne ncessite pas de
  correspondance avec celle du noyau Linux que vous souhaitez charger.
  Vous dmarrez Linux avec la commande suivante :



  MILO> boot [-t file-system] device-name:file-name \
             [[boot-option] [boot-option]...]





  device-name reprsente le nom du priphrique que vous souhaitez
  utiliser, file-name le nom de fichier de l'image  charger en mmoire.
  Tous les arguments spcifis par la suite sont directement transmis au
  programme excut (ici le noyau Linux).


  Si vous installez Linux Red Hat pour Alpha vous devrez spcifier un
  priphrique racine (root device) et autres options :



       MILO> boot fd0:vmlinux.gz root=/dev/fd0 load_ramdisk=1





  MILO contient automatiquement les priphriques en mode bloc
  configurs dans vmlinux. J'ai test le pilote de disquette, de disque
  IDE ainsi qu'un certain nombre de pilotes SCSI (par exemple le
  NCR810), et ceux-ci fonctionnent bien. Il est de mme important
  d'attribuer un ID SCSI raisonnable  votre contrleur SCSI. Par dfaut
  MILO l'initialisera  la valeur maximale (7) qui, en principe, devrait
  fonctionner correctement. Nanmoins, si vous le souhaitez, vous pouvez
  spcifier l'ID SCSI de votre N-ime contrleur SCSI en dfinissant la
  variable SCSI_n_HOSTID ; par exemple pour prciser que l'ID SCSI du
  contrleur numro 0 est 7 utilisez la commande suivante :



       setenv SCSI0_HOSTID 7





  66..33..  RReeddmmaarrrraaggee ddee LLiinnuuxx

  Vous pouvez vouloir redmarrer Linux  l'aide de la commande shutdown
  -r now. Dans ce cas, le noyau Linux repasse le contrle  MILO (par
  une instruction HALT CallPAL entrypoint). MILO laisse une version de
  lui-mme compresse en mmoire pour cette seule raison et dtecte que
  le systme est redmarr par le biais du HWRPB (Hardware Restart
  Parameter Block). Dans ce cas vous pouvez  edmarrer  l'aide de la
  mme commande qui vous a servi au dmarrage prcdent. Il y a un dlai
  de 30 secondes qui vous permet d'interrompre ce processus et de
  dmarrer n'importe quel autre noyau de n'importe quelle autre manire.


  66..44..  LLaa ccoommmmaannddee ''''bboooottoopptt''''

  Pour les systmes utilisant la mmoire flash comme les AlphaPC64,
  EB164 et EB66+, il existe diffrentes options de dmarrage. Celles-ci
  sont modifiables  l'aide de la commande bootopt. Cette commande a un
  unique argument : il s'agit d'un nombre dcimal qui reprsente le type
  d'image  excuter au prochain redmarrage de la machine (Allumage /
  Extinction ou Reset).


  La valeur 00 active le Debug Monitor, 11 active la console ARC.


  Ce chiffre correspond en fait  la N-ime image prsente dans la PROM.
  Afin d'indiquer que l'action  effectuer est le dmarrage, il faut
  ajouter 128  ce chiffre pour obtenir la valeur  transmettre 
  bootopt. Vous aurez donc la commande suivante (sachant que MILO est la
  3me image en PROM) :



       MILO> bootopt 131




  Note : Soyez trs vigilant avec cette commande, une bonne rgle est de
  ne jamais utiliser la valeur 0 (Debug Monitor), mais utilisez plutt
  le systme des jumpers pour obtenir ce rsultat.


  77..  EExxccuuttiioonn dduu ggeessttiioonnnnaaiirree ddee mmmmooiirree ffllaasshh

  La commande run est utilise pour excuter le gestionnaire de mmoire
  flash. Avant de dmarrer, vous devrez disposer d'un priphrique
  accessible par MILO contenant le programme updateflash. Celui-ci
  (comme vmlinux) peut tre compress avec gzip. Vous devez excuter ce
  programme  l'aide de la commande suivante :



       MILO> run fd0:fmu.gz





  Une fois charg et initialis, le gestionnaire de mmoire flash vous
  donnera quelques informations concernant le priphrique flash, et
  vous proposera une invite de commandes.  nouveau la commande help est
  salvatrice.



       Linux MILO Flash Management Utility V1.0
       Flash device is an Intel 28f008SA
       16 segments, each of 0x10000 (65536) bytes
       Scanning Flash blocks for usage
       Block 12 contains the environment variables
       FMU>





  Notez que sur les systmes qui permettent la sauvegarde de variables
  d'environnement et qui disposent de plus d'un bloc de mmoire flash
  (par exemple l'AlphaPC64), le gestionnaire de mmoire flash cherchera
  un bloc disponible pour la sauvegarde des variables d'environnement de
  MILO. Si un tel bloc existe, le gestionnaire de mmoire flash vous
  indiquera son emplacement. Dans le cas contraire, vous devrez utiliser
  la commande environment pour dfinir un bloc et l'initialiser. Dans
  l'exemple ci-dessus le bloc numro 12 de la mmoire flash renferme les
  variables d'environnement de MILO.


  77..11..  LLaa ccoommmmaannddee ''''hheellpp''''



       FMU> help
       FMU command summary:

       list            - List the contents of flash
       program         - program an image into flash
       quit            - Quit
       environment     - Set which block should contain the environment variables
       bootopt num     - Select firmware type to use on next power up
       help            - Print this help text
       FMU>




  _N_o_t_e _: les commandes environment et bootopt ne sont disponibles que
  sur les systmes EB66+, EB164, PC164 et AlphaPC64 (ainsi que leur
  clones).


  77..22..  LLaa ccoommmmaannddee ''''lliisstt''''

  La commande ''list'' affiche les informations sur l'utilisation de la
  mmoire flash. Pour les systmes disposant de plus d'un bloc, l'usage
  de chaque bloc est affich.



       FMU> list
       Flash blocks:  0:DBM  1:DBM  2:DBM  3:WNT  4:WNT  5:WNT  6:WNT  7:WNT  8:MILO
               9:MILO 10:MILO 11:MILO 12:MILO 13:U 14:U 15:WNT
       Listing flash Images
         Flash image starting at block 0:
           Firmware Id: 0 (Alpha Evaluation Board Debug Monitor)
           Image size is 191248 bytes (3 blocks)
           Executing at 0x300000
         Flash image starting at block 3:
           Firmware Id: 1 (Windows NT ARC)
           Image size is 277664 bytes (5 blocks)
           Executing at 0x300000
         Flash image starting at block 8:
           Firmware Id: 7 (MILO/Linux)
           Image size is 217896 bytes (4 blocks)
           Executing at 0x200000
       FMU>





  77..33..  LLaa ccoommmmaannddee ''''pprrooggrraamm''''

  Le gestionnaire de mmoire flash contient une copie compresse d'une
  image flash de MILO. Cette commande vous permet de sauvegarder cette
  image dans la PROM. La commande vous permet de revenir en arrire,
  mais avant de l'utiliser vous devriez utiliser la commande list pour
  dfinir o il faut mettre MILO. Si MILO est dj dans la mmoire
  flash, le gestionnaire de mmoire flash vous demandera si vous
  souhaitez remplacer la version actuellement en PROM.




  FMU> program
  Image is:
      Firmware Id: 7 (MILO/Linux)
      Image size is 217896 bytes (4 blocks)
      Executing at 0x200000
  Found existing image at block 8
  Overwrite existing image? (N/y)? y
  Do you really want to do this (y/N)? y
  Deleting blocks ready to program: 8 9 10 11
  Programming image into flash
  Scanning Flash blocks for usage
  FMU>





  _!_!_! _I_M_P_O_R_T_A_N_T _!_!_! Attendez que cela soit fini avant d'teindre votre
  ordinateur.


  _!_!_! _I_M_P_O_R_T_A_N_T _!_!_! Je n'insisterai jamais assez sur le fait que vous
  devez tre extrmement prudent lorsque vous effectuez ce genre de
  manipulation. Une trs bonne rgle  respecter est de ne jamais
  effacer le Debug Monitor.


  77..44..  LLaa ccoommmmaannddee ''''eennvviirroonnmmeenntt''''

  Cette commande dtermine quel est le bloc qui recevra les variables
  d'environnement.


  77..55..  LLaa ccoommmmaannddee ''''bboooottoopptt''''

  Il s'agit de la mme commande que celle de MILO (Section ``La commande
  ''bootopt'''').


  77..66..  LLaa ccoommmmaannddee ''''qquuiitt''''

  Cette commande n'a que peu de sens, car la seule manire possible pour
  se retrouver sous MILO est de redmarrer le systme.


  88..  RReessttrriiccttiioonnss

  Malheureusement la perfection n'tant pas de ce monde, il existe des
  restrictions auxquelles il faut se plier.


  MILO n'est pas conu pour charger d'autres systmes d'exploitation que
  Linux, cependant il peut charger et excuter des images dont
  l'excution est possible au mme emplacement mmoire que Linux (c'est
   dire : 0xFFFFFC0000310000). C'est ce qui permet au gestionnaire de
  mmoire flash de fonctionner.


  Les sources du PALcode contenues dans miniboot/palcode/_t_o_t_o sont
  correctes, mais ce PALcode est problmatique lorsqu'il est compil
  avec la dernire version de gas.  Problme qui n'existe pas avec
  l'ancien excutable gas fourni avec les cartes d'valuation. J'essaie
  actuellement de trouver quelqu'un capable de rsoudre ce problme.
  Pour l'instant, j'ai fourni un PALcode prcompil pour les cartes
  supportant MILO et David Mosberger-Tang a une version de gas corrige
  sur son site ftp.
  99..  DDppaannnnaaggee

  Voici un ensemble de problmes courants que certaines personnes ont
  rencontrs ; vous trouverez, ensuite, leur solution.


  LLeeccttuurree ddee ddiissqquueess DDOOSS ddeeppuuiiss llee DDeebbuugg MMoonniittoorr..

  Quelques versions du Debug Monitor (pr-version 2.0) ont un problme
  avec le gestionnaire DOS gnr  partir de Linux. Ce problme se
  manifeste de la manire suivante : le Debug Monitor semble lire
  correctement les premiers secteurs de la disquette, puis affiche, en
  boucle, le message "Bad Sectors".  Cela vient apparemment du fait
  qu'il existe une diffrence entre le systme de fichiers DOS tel que
  l'attend le Debug Monitor et l'implmentation de DOSFS sous Linux.
  Afin de rsoudre ce problme, utilisez un PC sous DOS pour
  confectionner la disquette (et non pas Linux). Par exemple, si le
  chargement du fichier MILO.cab ne fonctionne pas, effectuez les
  oprations suivantes sur une machine DOS :



       copy a:MILO.cab c:
       copy c:MILO.cab a:
       del c:MILO.cab





  Et ressayez de dmarrer depuis cette disquette. Cela devrait rsoudre
  le problme.


  MMiilloo aaffffiicchhee uunnee ssrriiee ddee O> eett nn''aacccceeppttee ppaass ddee ccoommmmaannddeess..  Ceci
  arrive quand MILO a t compil pour utiliser COM1 comme console
  secondaire. Dans ce cas, MILO reproduit l'affichage sur COM1 et
  accepte des saisies depuis ce dernier. C'est excellent pour dboguer,
  mais pas tant que a si vous avez un priphrique autre qu'un terminal
  srie connect.  Si cela arrive, dconnectez le priphrique attach
  au port COM1 ou mettez-le hors tension jusqu' ce que le noyau Linux
  ait dmarr.  ce stade tout devrait fonctionner correctement.


  MMIILLOO ssee ppllaaiinntt ddee ccee qquuee ll''iimmaaggee dduu nnooyyaauu ppoossssddee uunn mmaauuvvaaiiss

  Les anciennes versions de MILO ne sont pas compatibles avec les
  fichiers objets de type ELF. Cela pourrait tre la source de vos
  ennuis. Si c'tait le cas, passez  la version la plus rcente que
  vous pourrez trouver. Toutes les versions  partir de la 2.0.20 sont
  compatibles avec les objets ELF. D'autre part il se pourrait que
  l'image de MILO soit corrompue, ou qu'il faille ajouter l'extension
  '.gz' au nom du fichier noyau.


  MMIILLOO aaffffiicchhee ""......ttuurrnniinngg oonn vviirrttuuaall aaddddrreessssiinngg aanndd jjuummppiinngg ttoo tthhee
  LLiinnuuxx KKeerrnneell"" ppuuiiss rriieenn nnee ssee ppaassssee..

  Une des causes possibles est que l'image du noyau est configure de
  manire incorrecte ou qu'elle a t produite pour un autre type de
  machine Alpha. Une autre possibilit est que la carte vido est une
  TGA (ZLXp) et que le noyau est configur pour utiliser le VGA (ou
  l'inverse). Il est utile de compiler le noyau pour qu'il affiche sa
  console sur COM1 (echo console) et donc de pouvoir, dans ce cas,
  connecter un terminal srie ou alors d'essayer le noyau qui tait
  livr avec votre distribution Linux.
  MMIILLOO nnee rreeccoonnnnaatt ppaass lleess pprriipphhrriiqquueess SSCCSSII..

  L'image standard de MILO comporte autant de pilotes de priphriques
  qu'il en existe de stables pour Alpha (au moment de la rdaction de ce
  manuel il contient les pilotes pour : NCR810, QLOGIC ISP, Buslogic et
  Adaptec 294x/394x). Si votre carte n'est pas supporte c'est peut-tre
  que le pilote n'est pas encore suffisamment stable sur plate-forme
  Alpha. Vous pouvez obtenir la liste des priphriques SCSI supports
  par une image MILO avec la commande show.


  1100..  RReemmeerrcciieemmeennttss

  Je souhaiterais remercier :

    Eric Rasmussen et Eilleen Samberg, les auteurs du PALcode ;

    Jim Paradis pour le pilote clavier, l'interface originelle de MILO
     et son travail sur AlphaBIOS ;

    Jay Estabrook pour son aide et ses dbogages ;

    David Mosberger-Tang pour la version freeware de l'mulateur BIOS
     et son appui et ses encouragements ;

    Le dernier, et pas des moindres, Linus Torvalds pour le code du
     timer et celui du noyau.


  Beaucoup de choses restent  faire sous MILO ; s'il y a quelque chose
  que vous souhaitez faire ou ajouter vous-mme, faites-le moi savoir :
  david.rusling@reo.mts.dec.com <mailto:david.rusling@reo.mts.dec.com>,
  afin de ne pas dvelopper deux fois la mme chose.


  Pour finir, un grand merci  Digital pour le dveloppement d'un si
  merveilleux processeur (et pour le salaire qu'ils me versent afin de
  le faire).




























  Linux MP3 HOWTO
  Philip Kerr phil@websentric.com, traduction Arnaud Gomes-do-
  Vale arnaud@carrosse.frmug.org
  v1.10, Septembre 1999

  Ce document dcrit le matriel, les logiciels et les procdures 
  suivre pour crer et couter des fichiers son _M_P_3 sous Linux.
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Copyright

  3. O trouver ce document

  4. Remerciements

     4.1 Dngation

  5. Matriel ncessaire et influence sur les performances

  6. Logiciels ncessaires

  7. Configuration du systme

     7.1 Configuration pour la capture d'une source analogique
     7.2 Configuration pour l'extraction de son depuis un CD
     7.3 Configuration additionnelle

  8. Encodage depuis une source audio

  9. Encodage depuis un lecteur de CD-ROM

  10. Lire des MP3

  11. Retours



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce document dcrit le matriel, les logiciels et les procdures 
  suivre pour crer et couter des fichiers son _M_P_3 sous Linux.


  22..  CCooppyyrriigghhtt

  Ce HOWTO est  Philip Kerr, 1999.

  Sauf indication contraire, les droits d'auteur des HOWTO Linux sont
  dtenus par leurs auteurs respectifs. Les HOWTO Linux peuvent tre
  reproduits et distribus, en totalit ou en partie, sur tout mdia
  physique ou lectronique dans la mesure o ce copyright est prserv
  dans chaque copie. La distribution commerciale en est autorise et
  encourage. L'auteur apprcierait toutefois qu'on lui notifie
  individuellement ce genre de distribution.

  Le prsent copyright doit couvrir toute traduction, compilation et
  autre travail driv des HOWTO Linux. C'est--dire qu'il est interdit
  d'imposer des restrictions de diffusion allant au del du prsent
  copyright  des ouvrages inspirs, ou incorporant des passages, de
  HOWTO Linux. Sous certaines conditions, des exceptions  ces rgles
  seront tolres : contactez le coordinateur des HOWTO  l'adresse
  donne ci-dessous.

  Pour rsumer, nous souhaitons une diffusion aussi large que possible
  de ces informations. Nanmoins, nous entendons garder la proprit
  intellectuelle (copyright) des HOWTO, et apprcierions d'tre informs
  de leur redistribution.

  Pour toute question plus gnrale, merci de contacter le coordinateur
  des HOWTO, Tim Bynum,  l'adresse lectronique linux-
  howto@metalab.unc.edu.


  33..  OO ttrroouuvveerr ccee ddooccuummeenntt

  La dernire version officielle de ce document se trouve sur le site du
  Linux Documentation Project  <http://metalab.unc.edu/LDP/>. La
  dernire version franaise se trouve 
  <http://www.freenix.org/linux/HOWTO/>.


  44..  RReemmeerrcciieemmeennttss

  Lors de l'criture de ce document, je me suis largement inspir du
  _S_o_u_n_d_-_H_O_W_T_O de Jeff Tranter et du _S_o_u_n_d_-_P_l_a_y_i_n_g_-_H_O_W_T_O de Yoo C. Chung.

  Merci galement aux autres auteurs de HOWTO, au travail desquels je me
  rfre:

    _L_i_n_u_x _S_y_s_t_e_m _A_d_m_i_n_i_s_t_r_a_t_o_r_s _G_u_i_d_e de Lars Wirzenius

    _L_i_n_u_x _N_e_t_w_o_r_k _A_d_m_i_n_i_s_t_r_a_t_o_r_s _G_u_i_d_e d'Olaf Kirch

    _M_u_l_t_i _D_i_s_k _S_y_s_t_e_m _T_u_n_i_n_g _H_O_W_T_O de Stein Gjoen


  44..11..  DDnnggaattiioonn

  Vous utilisez les informations contenues dans ce document  vos
  propres risques. Nous dclinons toute responsabilit quant  son
  contenu.  L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entirement  vos propres risques.

  Tous les droits sont dtenus par leurs propritaires respectifs, sauf
  mention contraire explicite. L'utilisation d'un terme dans ce document
  ne constitue pas une limitation  sa validit en tant que marque.

  Le fait de citer un produit ou une marque particulire ne constitue
  pas une adhsion.

  Il est fortement conseill d'effectuer une sauvegarde de votre systme
  avant une installation importante ainsi qu' intervalles rguliers.


  55..  MMaattrriieell nncceessssaaiirree eett iinnfflluueennccee ssuurr lleess ppeerrffoorrmmaanncceess

  Le traitement de son numrique est une tche qui demande beaucoup de
  ressources, notamment en termes de puissance de calcul et
  d'entres/sorties. Je recommande fortement une machine de type Pentium
  au minimum.

  Si vous voulez produire des MP3  partir d'une source analogique, une
  carte son PCI donnera les meilleurs rsultats. La diffrence de
  performance entre les E/S d'une carte ISA et celles d'une carte PCI
  sont importantes (environ 132 Mbps pour du PCI, d'aprs le _P_C_I_-_H_O_W_T_O).
  Naturellement, meilleur est le rapport signal/bruit de la carte,
  meilleur est le MP3 produit. J'ai utilis une Soundblaster PCI128, et
  je suis rcemment pass  une Soundblaster Live Value. Les deux cartes
  ont de bonnes performances, mais la Live a un rapport signal/bruit
  sensiblement meilleur, assez bon pour un usage semi-professionnel.
  Souvenez-vous de la vieille maxime du traitement de donnes: si vous
  partez de dchets, vous obtiendrez des dchets.

  Lorsque vous enregistrez du son directement sur un disque dur
  (enregistrement d2d, direct-to-disk), les performances du disque et de
  son interface sont primordiales. Si vous utilisez un systme bas sur
  de l'IDE, le mode 4 ou l'UDMA sont prferables, dans la mesure o ils
  ont un dbit presque acceptable.

  La solution idale reste un systme  base de SCSI, dont les disques
  et les interfaces ont un bien meilleur dbit, de 5 Mo/s pour le SCSI-1
   80 Mo/s pour le SCSI ultra-wide. L'IDE peut aller jusqu' des
  vitesses variant de 8,3 Mo/s  33 Mo/s pour l'Ultra-ATA, mais il
  s'agit de crtes, les dbits moyens seront plus faibles. Si vous
  pouvez trouver ou vous offrir un disque SCSI AV, allez-y. Les disques
  AV ont des ttes de lecture/criture optimises pour les transferts
  continus de donnes; les autres disques SCSI et IDE ne peuvent
  normalement soutenir un transfert de donnes car leurs ttes chauffent
  trop !

  Naturellement, un disque quip de cache donnera des rsultats plus
  homognes, vu que le cache peut servir de tampon lorsque les ttes se
  dplacent ou ne peuvent pas soutenir le dbit.

  Si votre disque n'est pas  la hauteur, vos enregistrements seront
  parsems de coupures et d'erreurs lorsque le disque n'arrivera pas 
  enregistrer le signal. Si vous enregistrez des vnements uniques,
  comme des concerts, investissez dans un bon systme disque SCSI.

  Une charge systme leve peut aussi causer des coupures dans des
  enregistrements d2d. Des tches de fond peuvent momentanment occuper
  le systme. Il vaut mieux rduire les services au minimum vital,
  particulirement les services rseau. Pour plus d'informations 
  propos des services rseau et des scripts de dmarrage, reportez-vous
  au _S_A_G et au _N_A_G.

  La pagination de la mmoire virtuelle peut aussi provoquer des
  erreurs, donc mettez le plus de mmoire physique possible. Je
  recommande au moins 32 Mo, mais vous pouvez avoir besoin de plus.

  Pour ceux qui veulent tirer le maximum de leur systme, optimiser le
  noyau ne fera probablement pas de mal.

  Alors que le matriel ci-dessus vous donnera un systme acceptable
  pour encoder des donnes sonores, ne ngligez pas l'emploi de matriel
  plus ancien et moins performant si c'est tout ce  quoi vous avez
  accs.

  La configuration d'un systme bas de gamme pour donner de bons
  rsultats sera un dfi intressant pour un administrateur systme, et
  le rsultat sera probablement une machine Linux plus heureuse.

  Un autre point important est la connectique. Des cbles et des
  connecteurs bon march et de mauvaise qualit donneront un
  enregistrement de mauvaise qualit. Si votre carte le permet, utilisez
  des connecteurs phono (RCA). Des contacts plaqus or aideront aussi 
  obtenir un son de bonne qualit. Enfin, sparez bien les cbles audio
  des cbles transmettant d'autres donnes pour viter les risques
  d'interfrences.


  Mais n'oubliez pas, une fortune dpense en cbles sera perdue si le
  reste du systme n'est pas optimis.

  Pour encoder des MP3 depuis un CD-ROM, la vitesse et le type du
  lecteur dterminent le temps ncessaire  l'extraction des
  informations. Un lecteur simple vitesse est probablement trop lent
  sauf pour les plus patients.

  Votre lecteur de CD-ROM doit tre connect  votre carte son, ou bien
  au moyen du connecteur interne, ou bien en branchant la sortie casque
  du lecteur sur l'entre ligne de la carte son.

  Pour des informations dtailles sur la configuration des cartes son,
  lisez le _S_o_u_n_d_-_H_O_W_T_O.


  66..  LLooggiicciieellss nncceessssaaiirreess

  La conversion de son en MP3 se fait normalement en deux tapes.
  D'abord, le son est enregistr au format WAV, puis le WAV est converti
  en MP3. Le support du son que vous voulez encoder, CD ou
  enregistrement direct, dterminera les logiciels ncessaires  la
  production du fichier WAV.

  Si vous voulez enregistrer depuis une source sonore, vous aurez besoin
  d'un programme pour lire les donnes sur l'entre de votre carte son
  et les sauvegarder au format WAV. Voici quelques logiciels utiles.

  _W_a_v_r_e_c

  Wavrec fait partie du paquetage Wavplay, qui peut tre tlcharg
  sur :

  <ftp://metalab.unc.edu/pub/Linux/apps/sound/players/>

  Pour convertir des CD audio au format WAV (extraction de CD) :

  _C_D_D_A_2_W_A_V

  <http://metalab.unc.edu/pub/Linux/apps/sound/cdrom/>

  _C_d_p_a_r_a_n_o_i_a

  <http://www.xiph.org/>

  Pour convertir les fichiers WAV au format MP3 :

  _B_l_a_d_e_'_s _M_P_3 _E_n_c_o_d_e_r

  <http://bladeenc.cjb.net>

  Pour lire les MP3, il vout faut un lecteur :

  _X_m_m_s _(_a_n_c_i_e_n_n_e_m_e_n_t _X_1_1_A_m_p_)

  <http://www.xmms.org>

  _X_a_u_d_i_o

  <http://www.xaudio.com>

  Vous aurez peut-tre galement besoin d'un mixeur ; Xmixer, inclus
  dans la plupart des distributions, fonctionne bien.



  77..  CCoonnffiigguurraattiioonn dduu ssyyssttmmee

  Cette section dcrit les bases de la configuration de Linux en vue de
  l'enregistrement de son depuis une source analogique ou un CD audio.

  J'ai pris comme base mon systme Intel sous Red Hat 5.2, mais cette
  section devrait tre raisonnablement indpendante de la distribution
  utilise. Je traiterai prochainement de la plate-forme Sparc. Si ce
  HOWTO vous est utile avec d'autres types de matriel, merci de me
  contacter.

  Naturellement, une carte son en tat de marche est un pr-requis
  raisonnable. Pour cela, je vous invite  lire l'excellent _L_i_n_u_x _S_o_u_n_d
  _H_O_W_T_O de Jeff Tranter et le _L_i_n_u_x _S_o_u_n_d _P_l_a_y_i_n_g _H_O_W_T_O de Yoo C. Chung.
  Ces deux HOWTO dcrivent l'art et la manire de configurer le son sous
  Linux beaucoup mieux que je ne saurais le faire.


  77..11..  CCoonnffiigguurraattiioonn ppoouurr llaa ccaappttuurree dd''uunnee ssoouurrccee aannaallooggiiqquuee

  Pour commencer, configurez votre quipement audio. Il existe de
  multiples faons d'amener le son jusqu' votre machine Linux. Voici
  les plus communes :

  Sortie ligne vers entre ligne. La plupart des appareils audio ont une
  sortie ligne. Le niveau ligne est un standard prcisant la tension et
  l'intensit du courant mis par l'appareil. Si je me souviens bien,
  l'intensit est de 500 mA pour les quipements domestiques et semi-pro
  et 750 mA pour les quipements pro. Je suppose que la plupart des
  cartes son utilisent le standard  500 mA, mais certaines cartes pro
  rcentes peuvent utiliser l'autre. La diffrence ne devrait pas tre
  trop importante si vous n'enregistrez pas  un volume trs important.

  La sortie ligne est gnralement utilise pour connecter des
  quipements hi-fi  un amplificateur, donc les tuners radio et les
  platines cassette, CD, DAT, Mini-Disc et autres devraient pouvoir se
  brancher sans problme. Les tourne-disques peuvent tre plus
  embtants; voir ci-dessous pour en savoir plus.

  Vous pouvez aussi capturer du son depuis un magntoscope. La plupart
  des magntoscopes ont une sortie ligne, ou vous pouvez obtenir un
  signal au niveau ligne depuis une prise pritel si votre magntoscope
  en est quip.

  Sortie d'amplificateur vers entre ligne, sortie ligne vers entre
  cassette sur l'amplificateur. Essentiellement, vous remplacez la
  platine cassette relie  votre ampli hi-fi par votre systme Linux.
  Le lien entre la sortie ligne et l'entre de l'ampli permet de
  contrler le niveau de l'enregistrement.

  Micro sur entre micro. Le courant gnr par un microphone est
  beaucoup plus faible que le niveau ligne. Si vous branchez votre micro
  sur votre entre ligne, vous n'enregistrerez probablement jamais rien.

  _A_t_t_e_n_t_i_o_n, l'inverse, brancher la sortie ligne d'un appareil sur
  l'entre micro, peut endommager votre carte son !

  Tourne-disques sur entre micro. Hlas, je ne dispose pas
  d'informations  ce sujet pour le moment. Si je me souviens bien, le
  tourne-disques devrait tre branch sur l'entre micro, vu qu'il
  utilise un mcanisme similaire et des courants comparables.

  Les claviers et synths doivent tre branchs sur l'entre ligne, et
  les guitares sur l'entre ligne via une bote de direct (DI box,
  utilise pour convertir le signal au niveau ligne).

  Avant de brancher quoi que ce soit sur votre carte son, assurez-vous
  que le volume est regl au minimum et que les ventuels micros ne sont
  pas tourns vers les haut-parleurs.


  77..22..  CCoonnffiigguurraattiioonn ppoouurr ll''eexxttrraaccttiioonn ddee ssoonn ddeeppuuiiss uunn CCDD

  Configurer votre systme Linux pour extraire le son d'un CD avec votre
  lecteur de CD-ROM est relativement simple.

  Si vous pouvez couter un CD audio avec votre lecteur branch sur
  votre carte son, il y a des chances que vous puissiez l'enregistrer.


  77..33..  CCoonnffiigguurraattiioonn aaddddiittiioonnnneellllee

  Logez-vous normalement sur votre systme, puis utilisez un programme
  mixeur pour regler des niveau d'enregistrement assez forts pour avoir
  un son dcent, mais pas trop pour viter la distorsion. Normalement,
  j'value a  l'oreille ; aprs quelques temps, vous connatrez le
  meilleur niveau pour votre systme.

  Je recommande ou bien d'arrter tous les services non indispensables,
  ou bien de passer en mode utilisateur seul, en particulier si vous
  enregistrez depuis une source extrieure. Cela assure que seuls un
  nombre minimum de services fonctionnent, et donc que les erreurs
  d'enregistrement sont rduites au minimum.

  J'ai rserv un disque SCSI  l'enregistrement du son. J'y ferai
  rfrence comme /mnt/mp3. J'ai fait cela principalement pour le gain
  de performances apport par un disque SCSI. De plus, enregistrer sur
  un disque spar, dont vous savez que la tte ne va pas tout  coup se
  dplacer  l'autre bout du disque pendant que vous tes en train
  d'enregistrer, est une Bonne Chose. :-)

  Pour les dtails de la configuration d'un systme Linux avec plusieurs
  disques, la lecture du _M_u_l_t_i_-_D_i_s_k_-_H_O_W_T_O de Stein Gjoen peut tre
  utile.


  88..  EEnnccooddaaggee ddeeppuuiiss uunnee ssoouurrccee aauuddiioo

  Premirement, assurez-vous que vous avez suffisamment de place sur
  votre disque dur. Pour un enregistrement de qualit CD (44,1 kHz,
  16 bits, stro), une minute prend prs de 5 Mo.

  En gnral, j'enregistre avec une qualit DAT, 48 kHz, 16 bits,
  stro.

  Avec wavrec, j'utilise la syntaxe suivante:



       /usr/local/bin/wavrec -t 60 -s 48000 -S /mnt/mp3/temp.wav




  La premire partie est le chemin d'accs explicite de wavrec. le -t 60
  prcise la dure de l'enregistrement en secondes. l'option -s 48000
  donne la frquence d'chantillonnage en bits/s (la frquence du DAT
  est 48000, celle du CD, 44100). La dernire option indique le fichier
  de sortie.

  Pour voir la liste complte des options, lancez wavrec -help ou lisez
  le manuel.
  Ceci va produire un fichier WAV. Ensuite, vous allez devoir l'encoder
  au format MP3. Utilisez bladeenc avec la ligne de commande suivante.


       /usr/local/bin/bladeenc _[_f_i_c_h_i_e_r _s_o_u_r_c_e_] _[_f_i_c_h_i_e_r _d_e_s_t_i_n_a_t_i_o_n_] -br
       256000


  L'option -br prcise la frquence. En l'occurrence, je l'ai regle au
  maximum: 256 kbits/s. Le chemin d'accs de bladeenc peut aussi tre
  diffrent sur votre systme de celui de mon exemple.

  Pour voir la liste des options, lancez bladeenc -help. En fait, il
  s'agit d'une option invalide, mais cela va afficher la liste des
  options.


  99..  EEnnccooddaaggee ddeeppuuiiss uunn lleecctteeuurr ddee CCDD--RROOMM

  L encore, vrifiez que vous avez suffisamment de place sur votre
  disque dur.

  J'ai crit un petit script Perl pour extraire et encoder des pistes
  d'un CD.



       ______________________________________________________________________
       #!/usr/bin/perl

       if ($ARGV[0] ne "") {

       $count = 1;

       do {

       $cdcap = system("cdparanoia", $count, "/mnt/mp3/tmp/cdda.wav");
       $track = "$ARGV[1]/track".$count.".mp3";
       $benc = system("bladeenc  /tmp/cdda.wav $track -br 256000");
       $count++;

       }
       until $count > $ARGV[0];
       exit;
       }

       else {
       print "Usage cdriper [nombre de pistes] [rpertoire cible]\n\n";
       }
       ______________________________________________________________________




  La ligne intressante est



       $cdcap = system("cdparanoia", $count, "/mnt/mp3/tmp/cdda.wav");




  Cette ligne appelle l'extracteur de CD audio, cdparanoia, qui
  convertit les donnes brutes extraites d'un CD en fichier WAV.

  Les options sont $count (le nombre de pistes  extraire), puis le
  chemin d'accs des fichiers WAV produits. Dans mon exemple, il d'agit
  d'un rpertoire tmp sur mon disque rserv aux MP3.

  Les fichiers WAV sont ensuite convertis en MP3 avec bladeenc.

  J'ai crit ce script pour extraire tout un CD sans devoir extraire et
  encoder chaque piste sparment, et sans utiliser le traitement par
  lots de cdparanoia, qui extrait tout le disque, ce qui peut occuper
  jusqu' 600 Mo.

  Remarquez que ce script est trs simple et ne s'embarrasse pas de
  dtails comme la rcupration d'erreurs. Vous tes libre de
  l'amliorer. :-)


  1100..  LLiirree ddeess MMPP33

  Maintenant, vous devriez avoir quelques fichiers MP3 prts  lire.

  Les deux lecteurs MP3 les plus apprcis sous Linux sont Xaudio et
  xmms (anciennement x11amp). J'ai donn des liens vers leurs sites web
  dans la section ``Logiciels ncessaires''.

  Pour l'criture de ce HOWTO, je me suis appuy sur Xaudio,
  principalement parce qu'il est utilisable avec ou sans X.

  Ce logiciel est un partagiciel. Il s'agit en fait d'un ensemble de
  programmes, dont les plus intressants pour nous sont xaudio et
  mxaudio.

  Aprs l'avoir install sur votre systme, vous avez le choix entre
  utiliser la version en ligne de commande xaudio ou la version X
  mxaudio.

  L'interface de mxaudio est agrable et simple  utiliser.

  La liste des options de xaudio peut tre obtenue avec l'option -help
  (xaudio -h). Pour lire un fichier, utilisez xaudio fichier.mp3. Pour
  lire le contenu d'un rpertoire, xaudio *.mp3.

  Les deux programmes sont accompagns de fichiers README.


  1111..  RReettoouurrss

  De nouveaux matriels et logiciels sortent sans cesse. Si vous
  utilisez des versions plus rcentes du matriel et/ou des logiciels
  dcrits dans ce HOWTO, ou si vous pouvez ajouter quoi que ce soit,
  envoyez-moi vos informations  phil@websentric.com pour que je les
  rajoute  la prochaine version.

  Bons MP3 !













  Le HOWTO sur le Courrier Electronique
  Guylhem Aznar guylhem at danmark.linux.eu.org v2.0 (Adapta
  tion franaise par Gacquer Frdric gacquer at neuronnex
  ion.fr) 15 juin 1998 V 0.9 (Puis relu par ...)
  Janvier 1998

  Ce document dcrit l'installation, la maintenance et l'utilisation du
  courrier lectronique sous linux. Ce document vous sera utile si vous
  envisagez de communiquer localement ou vers des sites distants via le
  courrier lectronique. Vous n'aurez vraisemblablement *pas* besoin de
  lire ce document si vous n'changez pas de courriel avec d'autres
  utilisateurs, sur votre systme ou avec d'autres sites.
  ______________________________________________________________________

  Table des matires



















































  1. Introduction, copyright et avertissement (Disclaimer)

     1.1 Le courrier lectronique et le courrier non sollicit (spamming)
     1.2 Objectif
     1.3 Nouvelles versions
     1.4 Vos impressions
     1.5 Copyright
     1.6 Garantie limite

  2. Autres sources d'information

     2.1 USENET
     2.2 Les listes de diffusion
     2.3 Les autres documents de LDP.
     2.4 Livres

  3. Configuration requise

     3.1 Matriel
     3.2 Logiciels

  4. Smail v3.1

     4.1 Configurer smail
     4.2 Le fichier
     4.3 Le fichier
     4.4 Le fichier
     4.5 Le fichier
     4.6 Le fichier
     4.7 Le rpertoire
     4.8 D'autres bons exemples
     4.9 Relancer inetd
     4.10 Smail et smtp

  5. Sendmail+IDA

     5.1 Installation du source
     5.2 Le fichier
     5.3 Dfinir un agent de courriel local
     5.4 Les tables dbm de sendmail+IDA
     5.5 Bon quelles entres sont vraiment ncessaires ?
     5.6 Sendmail 8.x
     5.7 Un fichier mc d'exemple pour la 8.7.x
     5.8 Les .... de Sendmail v8
     5.9 Les agents distributeurs locaux

  6. Le courriel POP

     6.1 Historique
     6.2 Rcuprer son courrier
     6.3 Envoyer du courrier
     6.4 Lire son courriel
     6.5 Tests
     6.6 Utilisation

  7. Les "agents utilisateurs" de Courriel

     7.1 Elm
     7.2 Mailx
     7.3 D'autres agents utilisateurs

  8. Remerciements




  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn,, ccooppyyrriigghhtt eett aavveerrttiisssseemmeenntt ((DDiissccllaaiimmeerr))



  11..11..  LLee ccoouurrrriieerr lleeccttrroonniiqquuee eett llee ccoouurrrriieerr nnoonn ssoolllliicciitt ((ssppaammmmiinngg))


  Premirement, convertir tous les "at" dans les courrier lectroniques
  par des "@".

  C'est plus simple pour les humains, mais pas pour les automates
  indexant le web pour spammer; De plus c'est suffisant pour empcher
  les gnreux collaborateurs d'tre spamms !


  11..22..  OObbjjeeccttiiff


  Le but de ce document est de rpondre  quelques questions et
  commentaires et correspond  la dfinition de la "Foire Aux
  Questions", sur les logiciels de courriel sous Linux en gnral, et la
  version des distributions Linux Debian et Redhat en particulier.


  11..33..  NNoouuvveelllleess vveerrssiioonnss

  Les nouvelles versions de ce document seront rgulirement postes sur
  comp.os.linux.announce, comp.answers et mail.answers. Ils seront
  ajouts dans plusieurs sites ftp anonymes qui archivent en particulier
  ces documents, notamment sunsite.unc.edu:/pub/Linux/docs/HOWTO.

  De plus, vous pourrez en gnral trouver ce document  la page
  d'accueil de Linux WorldWideWeb 
  <http://sunsite.unc.edu/mdw/linux.html>.


  11..44..  VVooss iimmpprreessssiioonnss

  Vos impressions, par courriel, concernant ce document m'intressent,
  qu'elles soient positives ou ngatives. Prcisment, contactez moi si
  vous trouvez des erreurs ou d'videntes omissions.

  Je lis, mais ne rponds pas forcment,  tous les courriels que je
  reois. Les demandes d'amlioration seront examines et prises en
  compte selon la formule du temps disponible, l'intret de la demande
  et ma pression artrielle du jour :-)

  Les remarques dsobligeantes, courriels incendiaires (flames) iront
  gentimment dans /dev/null donc pas de problme.

  Les remarques concernant le format en cours doivent tre adresses au
  coordinateur du HOWTO : Greg Hankins (gregh at sunsite.unc.edu).


  11..55..  CCooppyyrriigghhtt

  Le HOWTO du Mail est sous copyright (c) 1998 Guylhem Aznar. Il est
  distribu sous la licence de copyright LDP. Pour toutes questions,
  veuillez contacter Guylhem Aznar, le coordinateur du Linux HOWTO, 
  gregh at sunsite.unc.edu.




  11..66..  GGaarraannttiiee lliimmiittee

  Bien sr, je dsavoue tout responsabilit pour le contenu de ce
  document.  L'utilisation des concepts, exemples, et/ou autre contenu
  de ce document est entirement  votre risque.


  22..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn


  22..11..  UUSSEENNEETT

  Il n'y a rien de "particulier" pour configurer et utiliser les
  logiciels de courrier sous linux (plus maintenant). Donc, vous n'aurez
  certainement *PAS*  poster des questions relatives au courrier
  lectronique dans le forum de discussion gnrique comp.os.linux.*.

  Ne postez pas dans la hirarchie de comp.os.linux sauf si c'est
  rellement li  linux, comme par exemple : "Avec quelles options ont
  t compil le sendmail de la Debian 1.2 ?" ou "Le smail de la Redhat
  5.0 se plante quand je l'excute".

  Laisser moi le redire.

  Dornavant il n'y a virtuellement aucune raison de poster quoi que ce
  soit, de relatif au courriel, dans la hirarchie comp.os.linux. Il
  existe des forums de discussion dans la hirarchie comp.mail.* qui
  rpondront  *TOUTES* vos questions.

  SI VOUS POSTEZ DES QUESTIONS QUI NE SONT PAS SPECIFIQUES A LINUX DANS
  COMP.OS.LINUX.*, VOUS CHERCHEZ DE L'AIDE AU MAUVAIS ENDROIT. LES
  EXPERTS DU MEL SE NICHENT DANS LES ENDROITS INDIQUES CI-DESSUS ET EN
  GENERAL N'UTILISENT PAS LINUX.

  POSTER DES QUESTIONS NON RELATIVES A LINUX DANS LA HIERARCHIE LINUX
  GACHE VOTRE TEMPS ET CELUI DES AUTRES ET ALLONGE FREQUEMENT LE DELAI
  DE REPONSE A VOTRE QUESTION.

  LES BONS ENDROITS sont :

    comp.mail.elm           Le logiciel de courrier lectronique ELM.

    comp.mail.mh            Le logiciel Rand Message Handling.

    comp.mail.mime          Multipurpose Internet Mail Extensions.

    comp.mail.misc          Discussions gnrales  propos du courrier
     lectronique.

    comp.mail.multi-media   Le courrier lectronique multimdia.

    comp.mail.mush          Le Mail User's Shell (MUSH).

    comp.mail.sendmail      L'agent sendmail de BSD.

    comp.mail.smail         L'agent de courrier lectronique smail.

    comp.mail.uucp          Le courrier lectronique dans un
     environnement uucp.


  22..22..  LLeess lliisstteess ddee ddiiffffuussiioonn

  Il existe plusieurs listes de diffusion sendmail, smail et qmail.


  Vous trouverez les adresses dans /usr/doc/celuiquevousavezchoisi.


  22..33..  LLeess aauuttrreess ddooccuummeennttss ddee LLDDPP..

  Il y a plusieurs lments essentiels fournis dans les autres documents
  HOWTO de linux et du projet DOC de linux.

  En particulier, vous pouvez jetez un oeil  :

    Sur votre propre systme dans /usr/doc/smail ou /usr/doc/sendmail
     :-)

    Le Guide d'Administration Rseau de Linux.

    Le HOWTO Communication Srie

    Le HOWTO Ethernet

    Le HOWTO UUCP si vous tes aliment via UUCP.


  22..44..  LLiivvrreess

  Ce qui suit est une liste non exhaustive qui pourra vous aider :

    "Managing UUCP and USENET" de O'Reilly and Associates est selon moi
     le meilleur ouvrage disponible pour rsoudre les programmes et les
     protocoles impliqus dans un site USENET.

    "Unix Communications" de 'The Waite Group' contient bonne une
     description de tous les lments (et plus) et comment ils
     s'imbriquent.

    "Sendmail" de O'Reilly and Associates semble tre la rfrence la
     plus complte sur Sendmail-v8 et sendmail+IDA. C'est un
     incontournable pour quiconque souhaite comprendre sendmail sans
     perdre son calme. Il existe en version franaise sous le titre
     "Sendmail seconde dition" (NDT).

    "The Internet Complete Reference" d'Osborne est livre de rfrence
     dtaill qui explique les services varis disponible sur Internet
     et est une excellent source d'information sur les forums de
     discussion, le courrier lectronique et divers autres ressources
     Internet.

    "The Linux Networking Administrators' Guide" d'Olaf Kirch du Projet
     de Documentation Linux (LDP) est disponible sur le net. Il est
     publi (au moins) par O'Reilly et SSC. Existe en version franaise
     sous le titre "Guide d'administration rseau sous linux" (NDT).



  33..  CCoonnffiigguurraattiioonn rreeqquuiissee

  33..11..  MMaattrriieell

  Il n'y a pas de configuration matrielle spcifique pour le courriel
  sous Linux.

  Vous aurez besoin d'un quelconque logiciel de 'transport' pour vous
  connecter  des systmes distants, c'est--dire soit TCP/IP, soit
  uucp.

  Cela peut signifier aussi que vous aurez besoin d'un modem ou d'une
  carte ethernet, suivant votre installation.
  Dans la plupart des cas, vous pourrez souhaiter le modem le plus
  rapide possible, soit aujourd'hui 57600 bps. En gnral, vous voudrez
  une UART 16550 sur votre carte srie ou implmente dans votre modem
  pour grer les vitesses suprieures  9600 baud.

  Si vous ne voyez ce que signifie cette dernire phrase, veuillez
  consultez le groupe comp.dcom.modems ou les diffrentes excellentes
  FAQ (Foire Aux Questions) sur les modems et les communications sries.
  Ainsi que les courriels posts sur USENET.

  33..22..  LLooggiicciieellss

  Bon, le problme est l. Que pouvons nous faire avec les logiciels de
  courrier lectronique ?

    Nombre de sites

     Alimenter  plus de 100 sites avec des options compliques pour les
     noms de domaines ? Prendre sendmail !

     Alimenter  moins de 100 sites sans avoir  trop jouer avec les
     noms de domaines ?  Prendre smail !

    Scurit

     Alimenter  plus ou moins 100 sites mais avec une scurit leve ?
     Prendre qmail !

     Alimenter moins de 100 sites mais avec un niveau normal de scurit
     ? Prendre smail !

    Diffrentes manires de recevoir du courrier lectronique

  Alimenter et tre aliment par UUCP ou FIDO (via ifmail) ? Alimenter
  ou tre aliment par POP et le SMTP internet ? Prendre smail !

  Bien sr, vous tes libre de choisir n'importe quel logiciel de
  courrier lectronique, les informations que vous trouverez ici ne sont
  l que pour vous aidez dans votre choix. Sendmail est parfait pour
  beaucoup de sites avec des options compliques, qmail est parfait pour
  une scurit leve ; l'intermdiaire entre sendmail et qmail est
  smail, le meilleur compromis. Si vous savez ce que vous faites,
  choisissez sendmail (et vous ne devriez pas lire un HOWTO !) ; sinon
  Je recommende en gnral smail.

  44..  SSmmaaiill vv33..11

  Smail3.1 semble un standard de fait comme agent de transport pour des
  sites n'utilisant que uucp, ainsi que pour quelques sites smtp. Il est
  facile  configurer, compile sans avoir  patcher les sources et il
  est assez sr.

  44..11..  CCoonnffiigguurreerr ssmmaaiill

  Installez les binaires smail  partir de votre distribution (je vous
  recommande cette faon) ou rcuprez les sources de smail et compilez
  le. Si vous compilez smail  partir des sources, vous devrez avoir ce
  qui suit dans votre fichier os/linux pour que 'sed' vous donne des
  scripts qui fonctionnent correctement.


       CASE_NO_NEWLINES=true




  Une fois configur, le fichier config ira certainement dans /etc/smail
  (mais votre configuration peut tre diffrente si vous utilisez
  d'anciennes distributions) ; Editons les !


  44..22..  LLee ffiicchhiieerr ccoonnffiigg




              # From
              smart_path=polux
              smart_transport=uux

              # To
              hostname=danmark
              domains=linux.eu.org

              visible_name=danmark.linux.eu.org
              uucp_name=danmark.linux.eu.org

              # max_message_size=512k
              # auth_domains=foo.bar
              # more_hostnames=barberouge:barberouge.polux.freenix.fr




  Bon, tout d'abord, qui vous alimente ? "polux" m'alimente via uucp
  (c'est--dire par transport uux); naturellement vous aurez besoin de
  changer ce fichier selon votre propre organisation. Par exemple,
  "bargw.bar.foobar.com" pourrait vous alimenter via "smtp", dans ce cas
  vous n'avez pas besoin de fichier de transport et pouvez dfinir
  "-transport_file" pour indiquer que vous n'en avez pas besoin.

  Vous pouvez aussi utiliser "postmaster_address = votrenom", cacher la
  topologie du rseau pour les adresses sortantes (si vous tes une
  passerelle) en utilisant "visible_name", positionner quelle adresse
  d'alias pourra aussi tre utilise pour le courriel que vous recevez,
  en utilisant "more_hostnames".

  Lire la documentation smail pour plus de dtails ou les exemples dans
  /usr/doc/smail/examplespour voir si l'un d'eux correspond  votre
  situation.


  44..33..  LLee ffiicchhiieerr ddiirreeccttoorrss



















    # aliasinclude - dveloppe les adresses ":include:filename" produite par les fichiers
    # alias.
    # Cette entre et la suivante sont du rchauff. Les raisons
    # d'un changement significatif sont mineures. Leur unique raison est
    # de reconnaitre et de dvelopper les adresses de la forme :
    #       :include:pathname
    # qui peuvent apparaitre dans les fichiers alias ou les fichiers de listes de
    # diffusions/faire suivre (produite par toute directive dont le pilote (driver)
    # est forwardfile).
    aliasinclude:
            driver = aliasinclude,          # utiliser ce pilote pour le cas spcial
            nobody;                         # associer l'utilisateur nobody avec les adresses
                                            #  si violation de permissions moyenne (???)
                                            # sont rencontres
            copysecure,                     # prendre les permissions du directeur alias
            copyowners,                     # prendre le droit propritaire du directeur alias

    # forwardinclude - dveloppe les adresses ":include:filename" produites
    # par les fichiers forward
    forwardinclude:
            driver = forwardinclude,        # utiliser ce pilote pour cas spcial
            nobody;
            copysecure,                     # prendre les permissions du directeur forwarding
            copyowners,                     # prendre le droit propritaire du directeur
                                            #  forwarding

    # aliases - cherche  dvelopper les alias stocks dans la base de donne
    # C'est le fichier aliases standard. Il est utilis pour les affaires courantes,
    # comme mapper root, postmaster, MAILER-DAEMON et uucp aux administrateurs de site,
    # crer quelques petits systmes de dveloppement d'alias, ou autres. Dans
    # cette configuration de site, le fichier aliases est utilis principalement
    # pour des informations d'aliases/forwarding lis aux machines. Les informations gnrales
    # pour faire suivre le courrier doivent tre mises dans la base de donne "forward".
    aliases:
            driver=aliasfile,               # directeur d'alias gnraliste
            -nobody,                        # toutes les adresses sont associs  nobody
                                            # par dfaut, donc mettre l'option
                                            # n'est pas trs utile.
            sender_okay,                    # ne pas enlever l'expditeur lors des
                                            # dveloppements d'adresses.
            owner=owner-$user;              # les problmes vont  une adresse propritaire
            file=/etc/aliases,
            modemask=002,                   # l'accs en criture ne doit pas tre autoris  tous
            optional,                       # ignore si le fichier n'existe pas
            proto=lsearch,                  # fichier ASCII non tri.

    # forward - chercher  dvelopper selon le contenu de la base forwarding
    # C'est la base de forwarding utilisateur pour un grand sous-domaine.
    # Les entres sont gardes ici pour les utilisateurs en cours ou pass,
    # pour faire suivre leur courrier  leur machine prfre. La base forward
    # est installe sur la couche rseau TCP/IP lors des changements, pour
    # garder le rseau consistent.
    #forward:
    #       driver = aliasfile,             # Directeur d'alias gnraliste
    #       -nobody,                        # toutes les adresses sont associs  nobody
    #                                       # par dfaut, donc mettre l'option
    #                                       # n'est pas trs utile.
    #       owner = real-$user;             # les problmes vont  une adresse propritaire
    #
    #       file = /etc/forward,
    #       modemask = 002,
    #       proto = dbm,                    # Utiliser la librairie dbm(3X) pour les accs.

    # dotforward - dveloppe les fichiers .forward dans les rpertoires personnels
    #  des utilisateurs.
    # Pour les utilisateurs qui ont une entre dans la base "forward", un fichier
    # .forward n'est utilis que sur la machine personnelle, comme identifie
    # dans la base forward. Si c'est utilis, c'est trait comme une liste d'adresse
    # indiquant  qui doit tre envoy les courriels, plutt (ou en plus) qu'
    # l'utilisateur rfrenc dans l'adresse locale.
    dotforward:
            driver = forwardfile,           # le directeur gnraliste forwarding
            owner = postmaster, nobody, sender_okay;

            file = ~/.forward,              # Le fichier .forward dans le rpertoire personnel
            checkowner,                     # l'utilisateur peut tre propritaire de ce fichier
            owners = root,                  # ou bien root
            modemask = 002,                 # Ne doit pas tre accessible  tous en criture
            caution = daemon:root,          # ne rien excuter en tant que root ou daemon
            # tre trs attentif aux accs  distance des rpertoires utilisateurs (?)
            unsecure = "~uucp:/tmp:/usr/tmp:/var/tmp"

    # forwardto - dveloppe le "Forward to " dans les fichiers botes aux lettres utilisateur
    # Cela mule le mchanisme du suivi de courrier V6/V7/System-V qui utilise
    # une ligne des adresses forward au dbut des fichiers boites aux lettres (BAL) utilisateur
    # avec comme prfixe la chane "Forward to "
    forwardto:
            driver = forwardfile,
            owner = postmaster, nobody, sender_okay;

            file = /var/spool/mail/${lc:user},      # pointe sur la BAL utilisateur
            forwardto,                      # autorise la fonction "Forward to "
            checkowner,                     # l'utilisateur peut tre propritaire de ce fichier
            owners = root,                  # ou root
            modemask = 0002,                # sous System V, le groupe mail  la permission crire
            caution = daemon:root           # ne rien excuter sous root ou daemon

    # user - apparie un utilisateur sur l'hte local et dlivre le courrier
    # dans leur bote aux lettres (BAL).
    user:   driver = user;                  # pilote pour apparier les utilisateur
            transport = local               # le transport local va dans les BALs

    # real_user - apparie les utilisateurs prfixs avec la chane "real-"
    # Trs utile pour permettre  une adresse de dlivrer expllicitement dans
    # une BAL utilisateur. Par exemple, les erreurs dans le dveloppement d'un fichier
    #.forward pourra tre dlivrer ici, ou des boucles de suivi de courrier entre
    # plusieurs machines peuvent tre rsolues en utilisant une adresse real-utilisateur.
    # Aussi, les utilisateurs ui souhaite utiliser le courriel comme moyen de transfert de
    # donnes vers une machine qui n'est pas leur machine personnelle peuvent envoyer un
    # courriel  real-nom-de-login@hte-distant.
    real_user:
            driver = user;
            transport = local,
            prefix = "real-"                # par exemple, apparie real-root

    # lists - dveloppe les listes de diffusion stockes dans le rpertoire list
    # Les listes de diffusions peuvent tre cres simplement en crant un fichier
    # dans le rpertoire /etc/smail/lists.
    lists:  driver = forwardfile,
            caution,                        # transmet toutes les adresses avec prcaution
            nobody,                         # puis associe l'utilisateur nobody
            owner = owner-$user;            # Les sites system V peuvent vouloir utiliser
                                            # o-$user, puisque owner-$user peut tre
                                            # trop long pour un fichier de 14 caractres.
            file = lists/${lc:user}         # Les listes sont sous $smail_lib_dir

    # owners - dveloppe les listes de diffusion stockes dans le rpertoire list owner.
    # Les listes de diffusion listes propritaires peuvent tre simplement cres en
    # crant un fichier dans le rpertoire /etc/smail/lists/propritaire. Les listes de
    # diffusion propritaires sont envoyes localement, les erreurs gnres s'arrangent
    # avec la liste de diffusion du mme nom. Pour crer une liste propritaire pour une
    # liste de diffusion,  crer un fichier avec le nom de la liste dans
    # /etc/smail/lists/propritaire. Cela va crer une adresse de liste de nom
    # propritaire-nom_de_liste, comme utilise par le directeur "lists" plus haut.
    owners: driver = forwardfile,
            caution,                        # transmet toutes les adresses avec prcaution
            nobody,                         # puis associe l'utilisateur nobody
            owner = postmaster;             # Les sites system V peuvent vouloir utiliser
                                            # o-$user, puisque owner-$user peut tre
                                            # trop long pour un fichier de 14 caractres.
            prefix = "owner-",
            file = lists/owner/${lc:user}   # Les listes sont sous $smail_lib_dir

    # request - dveloppe les listes de diffusions stockes dans un rpertoire de liste
    # de requte. Les listes de diffusion listes de requte peuvent tre cres simplement
    # en crant un fichier dans le rpertoire /etc/smail/lists/request. Les adresses requte
    # sont utilises typiquement comme adresse standard pour les interrogations  propos
    # d'une liste de diffusion. Par exemple, les requtes pour s'abonner ou se dsabonner
    # d'une liste seront gnralement envoyes  "list-request", qui devra tre configure
    # pour faire suivre le courrier  la ou les personnes appropries.
    request: driver = forwardfile,
            caution,                        # transmet toutes les adresses avec prcaution
            nobody,                         # puis associe l'utilisateur nobody
            owner = postmaster;             # Les sites system V peuvent vouloir utiliser
                                            # o-$user, puisque owner-$user peut tre
                                            # trop long pour un fichier de 14 caractres.
            suffix = "-request",
            file = lists/request/${lc:user} # les listes sont sous $smail_lib_dir





  44..44..  LLee ffiicchhiieerr ffiiddooppaatthhss

  Crez un tel fichier seulement si vous utilisez ifmail et FIDO.


  44..55..  LLee ffiicchhiieerr rroouutteerrss





























  # forces - forcer certains chemins d'accs
    # L'existence de cette base de donne est un moyen de coder en dur les chemins des
    # diverses machines ou domaines. Utilis pour crer des distorsions temporaires
    # des autres bases de donnes de routage (?). Pour changer la base, diter le
    # fichier maps/force.path puis faire un "make" dans le sous-rpertoire maps/
    forces:
            driver = pathalias,             # route au fichier de recherche de chemins
            method = /etc/smail/maps/table; # Les parties transports sont dans ce fichier
            file = forcepaths,              # fichier d'information contenant le forage de
                                            #  chemins
            proto = lsearch,                # utilise le fichier de chemin tri
            optional,
            reopen                          # ferme quand pas utilis

    uucp_neighbors:
            driver=uuname,                  # utilise un programme renvoyant les voisins
            transport=uux;
            cmd="/usr/bin/uuname -a",       # spcifiquement, utilise le programme uuname
    #        domain=uucp                    # enlve le suffixe ".uucp"

    # smart_host - un directeur spcifique particulier d'hte intelligent
    # Si l'attribut smart_path du fichier de configuration est dfini comme
    # chemin entre l'hte local et l'hte distant, alors les noms d'htes
    # qui ne seraient pas reconnus sinon seront envoyes au ?. L'attribut
    # du fichier de configuration smart_transport peut tre utilis pour
    # indiquer un transport diffrent.
    # Si l'attribut smart_path n'est pas spcifi, ce routeur (?) est ignor.
    smart_host:
            driver = smarthost,             # Pilote du cas spcial (?)
            transport = uux                 # Par dfaut livre via UUCP
    #       path=phreak

    # ifmail - pour envoyer des courriels  fidonet et vice versa.
    ifmail:
            driver=pathalias,
            transport=ifmail;
            file=fidopaths,
            proto=lsearch




  Vous ne devez include la partie ifmail que si vous l'utilisez pour les
  courriels FIDO.  A noter, vous pouvez aussi changer le mode de
  transport de "uux" (c'est--dire UUCP) pour, par exemple, "smtp" ou
  mme coder en dur les chemins vers diffrentes machines ou domaines
  dans /etc/smail/maps/table.


  44..66..  LLee ffiicchhiieerr ttrraannssppoorrttss
















    # local - dlivre le courriel aux utilisateurs locaux
    # Indique  smail d'ajouter directement dans les fichiers BAL dans le rpertoire
    # /var/spool/mail
    #local: driver = appendfile,            # ajoute le message  un fichier
    #       -return_path,                   # ajoute le champ  Return-Path:
    #       local,                          # utiliser la forme locale pour la livraison
    #       from,                           # Ajoute la ligne d'enveloppe From_
    #       unix_from_hack;                 # insre > avant From dans le corps
    #
    #       file = /var/spool/mail/${lc:user},      # Utiliser cet emplacement pour Linux
    #                                               # A noter, le spool courriel doit tre 1777
    #       file = ~/mailfile,       # Utiliser cet emplacement pour une scurit accrue
    #       group = mail,            # groupe pour tre propritaire des fichiers pour System V
    #       mode = 0660,             # sous System V, le groupe mail doit pouvoir accder
    #       suffix = "\n",           # ajouter un code nouvelle ligne supplmentaire
    #       append_as_user,

    # Cela permet  chaque utilisateur d'avoir un fichier ~/.procmailrc pour contr^oler
    # le filtrage du courriel et sauver le courriel des listes de diffusions dans des BAL
    # spares s'ils le souhaitent
    local:  +inet,
            -uucp,
            driver = pipe,                  # ajoute un message  un fichier
            return_path,                    # inclue un champ Return-Path:
            local,                          # utilise la forme locale pour la livraison
            from,                           # Ajoute la ligne d'enveloppe From_
            unix_from_hack;                 # insre > avant From dans le corps

            cmd = "/usr/bin/procmail",      # utilise procmail pour dlivrer le courrier local
            parent_env,                     # environment info from parent addr
            pipe_as_user,                   # utilise le user-id associ avec l'adresse
            umask = 0022,                   # umask pour le processus fils
    #       -ignore_status,                 # On devrait croire au code de retour
    #       -ignore_write_errors,           # ressayer si un tube est cass

    # pipe - dlivre le courriel  des commandes shells.
    # Cela est utilis implicitement quand smail rencontre des adresses commenant
    # avec un caractre barre verticale, comme "|/usr/lib/news/recnews talk.bizarre".
    # La barre verticale est enleve de l'adresse avant d'tre transmise au transport.
    #pipe:  driver = pipe,                  # tuber le message  un autre programme
    #       return_path, local, from, unix_from_hack;
    #
    #       cmd = "/bin/sh -c $user",       # envoyer l'adresse au Bourne Shell
    #       parent_env,                     # les info d'environnement de l'adresse parent
    #       pipe_as_user,                   # utilise le user-id associ avec l'adresse
    #       umask = 0022,                   # umask pour le processus fils
    #       -log_output,                    # ne pas enregistrer stdout/stderr dans les logs
    #       ignore_status,                  # le code de retour peux tre faux, l'ignorer
    #       ignore_write_errors,            # ignorer les tubes casses.

    # file - dlivrer le courrier dans des fichiers
    # Utilis implicitement lorsque smail rencontre des adresses qui commencent
    # par un slash (/) ou un caractre unique, comme  "/usr/info/list_messages"
    # ou peut tre "~/Mail/inbox".
    #file:  driver = appendfile,
    #       return_path, local, from, unix_from_hack;
    #
    #       file = $user,                   # le fichier est pris dans l'adresse
    #       append_as_user,                 # utilise le user-id associ avec l'adresse
    #       expand_user,                    # dveloppe ~ et $ dans l'adresse
    #       check_path,
    #       suffix = "\n",
    #       mode = 0644
    # uux - deliver to the rmail program on a remote UUCP site
    #
    # Dans une transaction UUCP on peut dlivrer  l'hte distant jusqu'
    # cinq adresses destinataires
    uux:    driver = pipe,
            -uucp,
            inet,
    #       uucp,                           # utilise la forme d'adresse style UUCP
            from,                           # fourni une ligne d'enveloppe From_
            max_addrs = 5,                  # au plus 5 adresses par invocation
            max_chars = 200;                # au plus 200 caractres d'adresses
    # le drapeau -r la livraison immdiate, des parenthses autour de la variable
    # $user emp^eche l'interprtation des caractres spciaux par uux
            cmd = "/usr/bin/uux - -r -g$grade $host!rmail $((${strip:user})$)",
    #        cmd="/usr/bin/uux - $host!rmail $(($user)$)",
            ignore_write_errors,            # ignore les tubes casss.
            umask = 0022,
    #       pipe_as_sender,

    # uux_one_addr - dlivre le courrier par UUCP  un hte distant qui ne peut
    #                prendre qu'une adresse  la fois.
    # Cela est souvent ncessaire quand on livre le courrier  un site qui
    # tourne sous une version non modifie de 4.1BSD.
    uux_one_addr:
            driver = pipe,
            uucp,                           # utilise le style UUCP pour les formes d'adressage
            from;                           # fourni une ligne d'enveloppe From_
    # le drapeau -r empche une livraison immdiate
            cmd = "/usr/bin/uux - -r -g$grade $host!rmail (${strip:user})",
            umask = 0022,
            pipe_as_sender

    queueonly:
            driver = pipe;                  # envoi de message  un tube
            cmd = "/usr/lib/sendmail -Q -f $sender -bm $user",
                                            # utilise getmail pour les livraisons locales
            user=root,                      # excute getmail sous "root"
            group=mail,                     # excute getmail sous "mail"
            parent_env,                     # Les infos d'environement de l'adresse parent
            -pipe_as_user,                  # utiliser le user-id associ avec l'adresse
            umask = 0007,                   # umask du processus fils

    # pour delivrer un message. Le transport smtp est inclue seulement si
    # le rseau BSD existe.
    # L'attribut uucp peut tre positionn pour le transfert dans une zone uucp.
    # L'attribut inet doit tre positionn pour les transferts vers l'internet.
    # NOTE: c'est presque optimal, un backend ??? devrait exister qui prendrait en charge
    #       plusieurs messages par connection.
    # AUSSI: il peut tre ncessaire de restreindre max_addrs  100, puisqu'il
    #  s'agit de la limite infrieure dont a besoin l'implmentation SMTP pour
    # prendre en charge un message.

    smtp:   driver=tcpsmtp,
            inet,                           # si UUCP_ZONE n'est pas dfini
    #       uucp,                           # si UUCP_ZONE est dfini
            -max_addrs, -max_chars;         # pas de limite sur le nombre d'adresses

            short_timeout=5m,               # le timeout pour les oprations courtes
            long_timeout=2h,                # le timeout pour les oprations SMTP plus longues
            service=smtp,                   # se connecter  ce port de service
    # Pour l'utilisation internet : ne pas commenter les 4 lignes qui suivent
           use_bind,                       # rsoud les enregistrements MX et A multiple A
           defnames,                       # utiliser la recherche de domaine standard
           defer_no_connect,               # essayer  nouveau si le serveur est tomb
           local_mx_okay,                  # vite un MX vers l'hte local

    ifmail:
            from,received,max_addrs=5,max_chars=200,
            driver=pipe;
            pipe_as_sender,
            cmd="/usr/local/bin/ifmail -x9 -r$host $((${strip:user})$)"




  Vous ne devez inclure la partie ifmail que si vous l'utilisez pour les
  courriels FIDO. A part cela, vous ne devriez pas avoir besoin d'diter
  quoi que ce soit dans ce fichier dfinissant les agents de transport
  (comme uux, smtp ...) vous pouvez les utiliser comme paramtres dans
  l'autre fichier config.

  A noter que j'ai comment quelques parties, comme les "pipes" ou
  "file", pour amliorer la scurit.


  44..77..  LLee rrppeerrttooiirree mmaappss//

  Il contient les fichiers map et tables :

  Commenons par le fichier map



              #N      foo.bar foo2.bar2
              #S      AT 486/RedHat Linux 1.2.13
              #O      organization
              #C      contact
              #E      administration (email)
              #T      phone
              #P      address
              #R
              #U      hosts connected via uucp
              #W      created/edited by
              #
              hname polux

              hname linux.eu.org

              hname = polux
              hname = polux.linux.eu.org




  Encore une fois, ditez ce fichier pour correspondre  votre
  organisation (je suis aliment par polux.linux.eu.org).

  Maintenant le fichier table



              *       uux




  Vous pouvez dfinir diffrent transport pour diffrents chemins, par
  exemple "smtp" pour vos machines dans votre rseau local, "uux"
  (c'est--dire uucp) pour le reste du monde ou vice-versa (j'utilise
  uucp pour tous courriers lectroniques sortant, et donc j'utilise "*"
  !).




  44..88..  DD''aauuttrreess bboonnss eexxeemmpplleess

  Les fichiers prcdents sont ceux que j'utilise actuellement pour mon
  site, vous ne devriez rencontrer aucun problme en les utilisant comme
  exemples/bases pour vos propres fichiers.

  Les fichiers ci-dessous sont seulement fournis en tant que bons
  exemples pour configurer smail de diffrentes faons.


























































  #ident "@(#) transports,v 1.2 1990/10/24 05:20:46 tron Exp"

    # Voir smail(5) pour une description complte du contenu de ce fichier

    # local - dlivre le courrier aux utilisateurs nouveaux
    #
    # Indiquer  smail d'ajouter directement aux fichiers BAL utilisateur dans le
    # rpertoire /usr/mail.
    local:  driver = appendfile,            # ajouter le message au fichier
            return_path,                    # inclue le champ Return-Path: field
            local,                          # utiliser les formes locales pour la livraison
            from,                           # fourni une ligne enveloppe From_
            unix_from_hack;                 # insre > avant From dans le corps

            file = /usr/mail/${lc:user},    # utiliser cet emplacement pour System V
            group = mail,                   # groupe propritaire de fichier pour System V
            mode = 0660,                    # sous System V, le groupe mail a accs
            suffix = "\n",                  # ajoute  nouveau un retour chariot supplmentaire
            append_as_user,

    # pipe - dlivre du courrier  des commandes shell
    #
    # Ceci est utilis implicitement lorsque smail rencontre des adresses qui
    # commencent par une barre verticale, comme "|/usr/lib/news/recnews talk.bizarre".
    # La barre verticale est enleve de l'adresse avant d'tre donne au
    # transport

    pipe:   driver = pipe,                  # tube le message  un autre programme
            return_path, local, from, unix_from_hack;

            cmd = "/bin/sh -c $user",       # envoi l'adresse au Bourne Shell
            parent_env,                     # info d'environement de l'adresse parent
            pipe_as_user,                   # utilise le user-id associ avec l'adresse
            umask = 0022,                   # umask du processus fils
            -log_output,                    # ne pas enregistrer stdout/stderr
            ignore_status,                  # le code de retour n'est pas fiable, l'ignorer
            ignore_write_errors,            # ignorer les tubes casss

    # file - dlivre du courrier dans des fichiers
    #
    # Ceci est utilis implicitement quand smail rencontre des adresses qui commencent
    # avec un caractre slach ou tilde, comme "/usr/info/list_messages" ou aussi
    # "~/Mail/inbox".
    file:   driver = appendfile,
            return_path, local, from, unix_from_hack;

            file = $user,                   # le nom de fichier est pris dans l'adresse
            append_as_user,                 # le user-id associ avec l'adresse
            expand_user,                    # dveloppe ~ et $ dans l'adresse
            suffix = "\n",
            mode = 0644

    # uux - dlivre au programme rmail pour un site UUCP distant
    #
    # Dans une transaction UUCP on peut dlivrer  l'hte distant jusqu'
    # cinq adresses destinataires
    uux:    driver = pipe,
            uucp,                           # utilise le style UUCP comme forme d'adressage
            from,                           # fourni une ligne d'enveloppe From_
            max_addrs = 5,                  # au plus 5 adresse par invocation
            max_chars = 200;                # au plus 200 caractres pour l'adresse

            # le drapeau -r empeche une livraison immdiat, les parenthses autour
            # de la variable $user empeche l'interprtation des caractres spciaux par uux.
            cmd = "/usr/bin/uux - -r -g$grade $host!rmail $((${strip:user})$)",
            umask = 0022,
            pipe_as_sender
    # uux_one_addr - dlivre le courrier  travers UUCP  un hote distant qui prends
    # une adresse  la fois
    #
    # Cela est souvent ncessaire lorsque l'on dlivre du courrier  un site utilisant
    # une version non modifie de 4.1BSD.
    uux_one_addr:
            driver = pipe,
            uucp,                           # utilise le style  UUCP comme forme d'adressage
            from;                           # fourni une ligne d'enveloppe From_

            # le drapeau -r empeche la livraison immdiate
            cmd = "/usr/bin/uux - -r -g$grade $host!rmail (${strip:user})",
            umask = 0022, pipe_as_sender

    # demand - dlivre  un programme rmail distant, polling on demand
    demand: driver = pipe,
            uucp, from, max_addrs = 5, max_chars = 200;

            # sans le drapeau -r, essaye de contacter le site distant immdaitement
            cmd = "/usr/bin/uux - -g$grade $host!rmail $(($user)$)",
            umask = 0022, pipe_as_sender

    # uusmtp - dlivre  un programme rsmtp vers un site UUCP distant
    #
    # Deliver utilise un protocole de lot de commandes simple vers la machine distante
    # Cela permet d'utiliser beaucoup plus d'adresses arbitraires.
    # lve les limites sur les adresses destinataires par invocation de uux.
    uusmtp: driver = pipe,
            bsmtp,                          # envoi des lots de commande SMTP
            -max_addrs,                     # il n'y a pas de limite sur le nombre
            -max_chars;                     # et la taille totale des adresses destinataires

      # mettre -r pour que la livraison ne soit pas immdiate, les adresses destinataires
      # sont stockes dans les donnes envoyes  l'entre standard de smtp.
            cmd = "/usr/bin/uux - -r -g$grade $host!rsmtp",
            umask = 0022, pipe_as_sender

    # demand_uusmtp - dlivre  un programme rsmtp distant, polling on demand
    demand_uusmtp:
            driver = pipe,
            bsmtp, -max_addrs, -max_chars;

            # sans le drapeau -r, essaye de contacter le site distant immdiatement
            cmd = "/usr/bin/uux - -g$grade $host!rsmtp",
            umask = 0022, pipe_as_sender

    # smtp - dlivre le courrier en utilisant SMTP sur TCP/IP
    #
    # Se connecter  un hote distant en utilisant TCP/IP et initie une conversation SMTP
    # pour delivrer un message. Le transport smtp est inclue seulement si le rseau BSD existe.


    # NOTE: il peut etre ncessaire de restreindre max_addrs  100, puisque c'est la limite
    #       infrieure requise pour SMTP pour prendre en charge un message.
    smtp:   driver = smtp,
            -max_addrs,
            -max_chars

    #ident "@(#) table,v 1.2 1990/10/24 05:20:31 tron Exp"

    # Ce fichier indique les transports utiliss pour livrer le courrier
    #  des hotes spcifiques  partir de bargw.

    #host           transport
    #--------       ---------
    curdsgw         demand_uusmtp   # deliver utilisant le SMTP par lots
    oldbsd          uux_one_addr    # Les sites 4.1BSD ne peuvent prendre plus d'une adresse
    sun             demand          # appelle sun lorsqu'il y a du courrier  envoyer
    *               uux             # pour tous les autres, poll at intervals





  44..99..  RReellaanncceerr iinneettdd

  Pour excuter smail en tant que dmon smtp, ajoutez une des lignes
  suivantes dans /etc/inetd.conf:



        smtp stream tcp nowait  root  /usr/bin/smtpd smtpd




  ou :


       smtp stream tcp nowait  root  /usr/sbin/tcpd  /usr/sbin/in.smtpd




  Le courrier lectronique sortant est envoy automatiquement, quand
  vous utilisez elm.


  44..1100..  SSmmaaiill eett ssmmttpp

  Gnralement, les fournisseurs d'accs (ISP) utilisent smtp, par
  consquent vous ne devriez pas avoir de problme pour envoyer vos
  courriels. Si votre ligne internet est hors service lors de l'envoi de
  courriel, dans ce cas les courriels rsident dans
  /var/spool/smail/input. Lorsque la ligne est  nouveau oprationnelle,
  runq est dmarr et envoi les courriels en attente.  Toutefois, la
  rception de courriel est le problme puisque votre fournisseur
  d'accs a plusieurs clients  grer, et pas seulement vous !

  Habituellement, vous pouvez rcuprer vos courriels via le protocole
  POP, voir la section POP ci-dessous.


  55..  SSeennddmmaaiill++IIDDAA

  Pour les sites d'importance, sendmail vaut la peine d'tre choisi, en
  raison de son incroyable facilit d'utilisation, mais vous devez vous
  dcider entre sendmail+IDA et sendmail 8.x :

    Si vous utilisez un noyau ancien (1.0) : sendmail+IDA

    Si vous utilisez un noyau pas si ancien (1.2) : sendmail+IDA et
     dition du code source.

    Pour un noyau rcent (2.0), le choix sera sendmail 8.x

  Rappelez-vous, les dbutants en linux ou les personnes concernes par
  la scurit/facilit de la configuration devraient plutt essayer
  d'utiliser smail ou qmail, qui sont plus facile  utiliser et plus
  sr.

  55..11..  IInnssttaallllaattiioonn dduu ssoouurrccee


  

     cd / ; tar -zxvf sendmail5.67b+IDA1.5.tpz



    cd vers /usr/local/lib/mail/CF et copier le fichier sample.m4 vers
     "votre_nom_d'hte.m4".

     Editez la rpartition de hostname, aliases, smarthost et en
     rpartir la bonne dans votre site. Le fichier par dfaut est pour
     un site n'utilisant qu'uucp qui a des enttes de domaine et qui
     communique avec l'hte intelligent (Smart host) .  Puis faire "make
     votre_nom-d'hte.cf" et mettre le fichier rsultant dans
     /etc/sendmail.cf.


    Si vous n'utilisez que uucp, vous n'avez *AUCUN* besoin de crer
     une des tables mentionnes dans le fichier README.linux.

     Vous n'aurez qu' faire un touch des fichiers pour que le Makefile
     fonctionne. Editez simplement le fichier .m4, make sendmail.cf et
     vous pouvez le tester.


    Si vous n'utilisez que uucp et que vous communiquez avec des sites
     en plus de votre "smart-host", vous aurez  ajouter des entres
     uucpxtable pour chacun (ou leur envoyer un courriel passera par
     l'hte intelligent) et excuter dbm sur le fichier uucpxtable ainsi
     modifi.

    Si vous utilisez la distribution binaire 5.67a originale de Rich
     Braun, vous aurez  geler la configuration si vous changez votre
     fichier .cf avec "/usr/lib/sendmail -bz" pour que les changements
     soient pris en compte.

  Vous devrez aussi mettre  jour votre version en au moins la 5.67b
  puisqu'il y a un vilain trou de scurit dans la 5.67a et les
  prcdentes. Une autre amlioration est que si mail.debug est indiqu
  et que vous utilisez syslogd, votre courriel entrant et sortant sera
  trac. Voir le fichier /etc/syslog.conf pour les dtails.

  Les sources de sendmail+IDA se trouvent sur  <vixen.cso.uiuc.edu> ;
  Ils ne ncessitent aucun patch pour fonctionner sous linux si vous
  tes sous quelque chose comme le noyau 1.00.

  Si vous avez un noyau > 1.1.50, vous aurez le plaisir d'appliquer la
  plupart des patch linux qui sont maintenant dans les sources vanilla.
  (Je vous *avez* dit que ce sendmail tait seulement pour les noyaux
  anciens :-)

  Il est particulirement vident de savoir o cela doit tre fait :
  taper simplement make et lorsque cela plante, aller  la ligne dans le
  source et commenter le code Linux  cet endroit.

  Si vous avez l'intention d'utiliser sendmail+IDA, je vous recommande
  fortement de prendre la version sendmail5.67b+IDA1.5 puisque tous les
  patch Linux sont maintenant dans les sources vanilla et plusieurs
  trous de scurit qui ETAIENT (!!!) dans les anciennes versions que
  vous auriez rcupres ou compiles avant le premier dcembre 1993 ont
  t combls.


  Aujourd'hui  le noyau est le 2.0, vous devriez utiliser sendmail 8.x
  au lieu de sendmail+IDA, mais je vous avez dj dit de choisir plutt
  sendmail 8.x :-)


  55..22..  LLee ffiicchhiieerr sseennddmmaaiill..mm44

  Sendmail+IDA requiert de crer le fichier sendmail.m4 plutt que
  d'diter directement le fichier sendmail.cf. Le bon cot des choses
  est qu'il est plus simple de mettre en place des configurations  de
  courrier lectronique qui sont particulirement difficile (pour ne pas
  dire impossible  la plupart des gens de le mettre en place
  correctement) avec smail ou le traditionnel sendmail.

  Le fichier sendmail.m4 qui correspond aux exemples ci-dessus de smail
  ressemble  :


















































      dnl #------------------ SAMPLE SENDMAIL.M4 FILE ------------------
      dnl #
      dnl # (la chaine 'dnl' est l'quivalent m4 pour commenter une ligne)
      dnl #
      dnl # En gnral on ne cherche pas  outrepasser le chemin compil en dur de LIBDIR
      dnl #define(LIBDIR,/usr/local/lib/mail)dnl    # o tous les fcihiers support vont
      define(LOCAL_MAILER_DEF, mailers.linux)dnl    # mailer pour la livraison locale
      define(POSTMASTERBOUNCE)dnl                   # postmaster rcupre les courriers rebonds
      define(PSEUDODOMAINS, BITNET UUCP)dnl         # ne pas utiliser le DNS sur eux
      dnl #
      dnl #-------------------------------------------------------------
      dnl #
      dnl # les noms par lesquels nous sommes connus
      define(PSEUDONYMS, myhostname.subdomain.domain myhostname.UUCP)
      dnl #
      dnl # notre nom primaire
      define(HOSTNAME, myhostname.subdomain.domain)
      dnl #
      dnl # notre nom uucp
      define(UUCPNAME, myhostname)dnl
      dnl #
      dnl #-------------------------------------------------------------
      dnl #
      define(UUCPNODES, |uuname|sort|uniq)dnl       # notre voisin uucp
      define(BANGIMPLIESUUCP)dnl                    # s'assurer que le courriel uucp
      define(BANGONLYUUCP)dnl                       #  est trait correctement
      define(RELAY_HOST, my_uucp_neighbor)dnl       # notre hte relais intelligent
      define(RELAY_MAILER, UUCP-A)dnl               # nous atteignons moria via uucp
      dnl #
      dnl #--------------------------------------------------------------------
      dnl #
      dnl # les diffrentes tables de recherche dbm
      dnl #
      define(ALIASES, LIBDIR/aliases)dnl            # alias systmes
      define(DOMAINTABLE, LIBDIR/domaintable)dnl    # mettre le domaine aux htes
      define(PATHTABLE, LIBDIR/pathtable)dnl        # chemins base de donnes
      define(GENERICFROM, LIBDIR/generics)dnl       # adresses From gnriques
      define(MAILERTABLE, LIBDIR/mailertable)dnl    # mailers par hte ou domaine
      define(UUCPXTABLE, LIBDIR/uucpxtable)dnl      # chemins vers les htes que nous fournissons
      define(UUCPRELAYS, LIBDIR/uucprelays)dnl      # chemins court-circuits
      dnl #
      dnl #--------------------------------------------------------------------
      dnl #
      dnl # inclue le code 'rel' qui fait tout fonctionner
      dnl # (fourni avec le code source)
      dnl #
      include(Sendmail.mc)dnl                         # ENTREE REQUISE !
      dnl #
      dnl #------------ END OF SAMPLE SENDMAIL.M4 FILE -------





  55..33..  DDffiinniirr uunn aaggeenntt ddee ccoouurrrriieell llooccaall

  A la diffrence de la plupart des distributions Unix, Linux n'a pas
  par dfaut un agent pour dlivrer le courriel local. Dornavent,
  deliver ou procmail est gnralement install, ainsi aucune difficult
  ne sera ajoute  cette installation dj suffisemment complexe.Je
  vous conseille d'utiliser les programmes deliver ou procmail
  couremment disponible, qui peuvent tre des progiciels optionnels sur
  quelques distributions linux.

  Afin d'y arriver, vous devez dfinir LOCAL_MAILER_DEF dans le fichier
  sendmail.m4 dont le contenu ressemble  :
           # -- /usr/local/lib/mail/mailers.linux --
           #     (local mailers for use on Linux )
           Mlocal, P=/usr/bin/deliver, F=SlsmFDMP, S=10, R=25/10, A=deliver $u
           Mprog,  P=/bin/sh,       F=lsDFMeuP,   S=10, R=10, A=sh -c $u




  Il y a aussi une dfinition par dfaut pour deliver dans le fichier
  Sendmail.mc qui sera inclue dans le fichier sendmail.cf.  Pour
  l'indiquer, vous n'utiliserez pas le fichier mailers.linux mais
  dfinirez plutt ce qui suit dans le fichier sendmail.m4:


            dnl --- (in sendmail.m4) ---
            define(LOCAL_MAILER_DEF, DELIVER)dnl       # mailer for local delivery




  Malheureusement, sendmail.mc suppose que deliver est install dans
  /bin, ce qui n'est pas le cas dans la Slackware1.1.1 (qui l'installe
  dans /usr/bin). Dans ce cas vous aurez soit  le tromper avec un lien
  ou recompiler deliver  partir des sources pour qu'il rside dans
  /bin. Veuillez noter que procmail est en gnral meilleur que deliver,
  par exemple pour le filtrage de courriel.


  55..44..  LLeess ttaabblleess ddbbmm ddee sseennddmmaaiill++IIDDAA

  Mettre en place un comportement particulier, pour les sites ou les
  domaines, est effectu  travers un nombre de tables dbm optionnelles
  plutt que d'diter le fichier sendmail.cf directement.

  Consultez l'dition Juillet 1994 du Linux Journal (si vous pouvez
  encore le trouver ! :-), pour les documentations dans les sources, ou
  le chapitre sur sendmail dans la dernire version du Guide
  d'Administration Rseau du Projet de Documentation Linux (LDP) qui
  sera disponible vraiment-bientt-maintenant pour plus de dtails.


    mailertable - dfini les comportements particuliers pour les sites
     distants ou les domaines.

    uucpxtable - force uucp  dlivrer le courriel aux htes qui sont
     au format DNS

    pathtable - dfini les chemins BANG ??? UUCP pour les sites
     distants ou les domaines.

    uucprelays - court circuite le chemin pathalias vers les htes
     distants connus

    genericfrom - converti les adresses internes en adresses gnriques
     visible pour le monde extrieur.

    xaliases - converti les adresses gnriques en/ partir d'adresses
     internes valides.

    decnetxtable - converti les adresses RFC-822 en adresses style
     DECnet.





  55..55..  BBoonn qquueelllleess eennttrreess ssoonntt vvrraaiimmeenntt nncceessssaaiirreess ??

  Lorsque vous n'utilisez aucune des tables optionnelles dbm, sendmail
  dlivre le courrier via le RELAY_HOST et RELAY_MAILER dfinis dans le
  fichier sendmail.m4 utilis pour gnrer sendmail.cf. Il est ais de
  passer outre ce comportement  travers des entres dans domaintable ou
  uucpxtable.

  Un site gnrique sur Internet et utilisant le Service de Noms de
  Domaines (DNS), ou un site n'utilisant qu'UUCP et transmets tous les
  courriels via UUCP  travers un smart RELAY_HOST, n'aura probablement
  pas besoin d'entres spcifiques du tout.

  De fait, tous les systmes devraient utiliser les macros DEFAULT_HOST
  et PSEUDONYMS, qui dfinissent le nom canonique et l'alias du site par
  lequel il se fait connaitre.

  Si tout ce que vous avez est un hte relais et un agent relais de
  courrier, vous n'avez pas  prendre les options par dfaut puisque
  cela marche automagiquement. Les htes UUCP auront certainement besoin
  de mettre leur nom officiel UUCP dans UUCPNAME.

  Ils auront probablement aussi besoin d'utiliser RELAY_MAILER et
  RELAY_HOST qui permettent le routage smart-host (?)  travers un
  relais de courriel.

  Le logiciel de transport (l'agent transporteur) de courriel  utiliser
  est indiqu dans RELAY_MAILER et devrait habituellement tre UUCP-A
  pour les sites UUCP. Si votre site n'a que SMTP et utilise le 'Service
  de Nom de Domaine' (DNS), vous voudrez changer RELAY_MAILER.

  Si votre site utilise SLIP, vous pourriez choisir la manire simple et
  juste transmettre tous vos courriel sortant vers votre fournisseur
  d'accs et le laisser s'en occuper.  Ainsi vous devrez dfinir votre
  domaine dans ISOLATED_DOMAINS et VALIDATION_DOMAINS, vous devrez
  dfinir votre fournisseur d'accs dans RELAY_HOST et RELAY_MAILER 
  TCP. Bien sr, vous voulez demander la permission avant de monter un
  systme comme relais gnral.


  55..66..  SSeennddmmaaiill 88..xx

  Le Sendmail 8.7.x de Berkeley a t la dernire version majeure depuis
  sendmail5.  Il incorpore un merveilleux support interne (?) pour
  compiler sous linux : faire simplement "make linux" et tout
  fonctionne.

  Vous serez probablement mieux servi en rcuprant une des nombreuses
  distributions binaires de l'habituel site d'archives Linux plutt que
  de vous battre avec des choses comme les dbm de Berkeley.

  Il y a une distibution sympa de sendmail 8.6.12 de Jason Haar - j.haar
  at lazerjem.demon.co.uk sur sunsite.unc.edu 
  /pub/Linux/system/Mail/delivery/sendmail-8.6.12-bin.tgz qui incorpore
  la documentation et une description rapide sur comment l'utiliser avec
  sendmail v8 pour les configurations courantes.

  Le plus important avec sendmail v8 c'est que vous devez configurer au
  moins le minimum pour que cela fonctionne ; ce qui suit est un exemple
  qui devrait au moins vous en rapprocher.


  55..77..  UUnn ffiicchhiieerr mmcc dd''eexxeemmppllee ppoouurr llaa 88..77..xx

  De mme que sendmail+IDA, sendmail v8 utilise m4 pour compiler un
  fichier de configuration en un sendmail.cf complet utilisable par
  sendmail. Ce qui suit est mon fichier courant pour mon site (ppp vers
  internet pour le courriel sortant, uucp pour le courriel entrant).



                dnl divert(-1)
                 #---------------------------------------------------------------------
                 #
                 # Fichier .mc pour un hte linux qui est configur comme suit:
                 #
                 #       - connect  Internet pour le courrier sortant (ici ppp)
                 #       - connect via UUCP pour le mail entrant
                 #       - entte avec domaine
                 #       - pas d'agent de transport de mail local (utilise plutot 'deliver')
                 #       - pas de DNS lanc donc ne pas canoniser ce qui sort via DNS
                 #       - all non-local outbound mail goes to the RELAY_HOST over smtp
                 #       -
                 #      (nous utilisons ppp et laissons notre fournisseur d'accs faire le travail)
                 #
                 #                                       vds 3/31/95
                 #
                 #---------------------------------------------------------------------
                 include(`../m4/cf.m4')
                 VERSIONID(`linux nodns relays to slip service provider smarthost')dnl
                 Cwmyhostname.myprimary.domain myhostname.UUCP localhost
                 OSTYPE(linux)
                 FEATURE(nodns)dnl
                 FEATURE(always_add_domain)dnl
                 FEATURE(redirect)
                 FEATURE(nocanonify)
                 dnl MAILER(local)dnl
                 MAILER(smtp)dnl
                 MAILER(uucp)dnl
                 define(`RELAY_HOST', smtp:my.relay.host.domain)
                 define(`SMART_HOST', smtp:my.relay.host.domain)
                 define(`UUCP_RELAY', smtp:my.relay.host.domain)
                 define(`LOCAL_MAILER_PATH', `/bin/deliver')
                 define(`LOCAL_MAILER_ARGS', `deliver $u')





  55..88..  LLeess ........ ddee SSeennddmmaaiill vv88

  Je suppose qu'il y a quelques diffrences pour les 'bigots IDA' parmi
  nous.



  Au lieu de 'runq', taper 'sendmail -q' pour traiter la file d'attente
  !




  55..99..  LLeess aaggeennttss ddiissttrriibbuutteeuurrss llooccaauuxx

  A la diffrence de la plupart des systmes d'exploitation, Linux
  n'avait pas de courriel intgr : vous deviez avoir un programme pour
  distribuer le courrier local, comme "lmail", "procmail" ou "deliver".

  Toutefois, toutes les distributions rcentes inclues un distributeur
  local !


  La documentation sur l'utilisation aussi bien pour la distribution
  locale est dans la rvision binaire de sendmail5.67b+IDA1.5 (sur
  sunsite) cite plus haut.


  66..  LLee ccoouurrrriieell PPOOPP

  Cette section concerne aussi IMAP, pas trs diffrent de POP.


  66..11..  HHiissttoorriiqquuee

  Sur un rseau de station de travail, le courriel a toujours t un
  problme :


    Soit vous utilisez ""user@computer.foo.com" avec des soucis lorsque
     "computer" est hors service, faire connaitre votre rseau aux
     personnes extrieures,  avoir diffrentes adresses pour une
     personne passant  une autre machine, ...

    Soit vous installez un centre de tri (mail hub), "mailhost.foo.com"
     avec des rgles de rcritures, ainsi tous les utilisateurs
     semblent faire leur envoi de la mme adresse, mme s'ils sont sur
     des ordinateurs diffrents.

  Mais dans ce cas, comment l'utilisateur peut-il lire son courrier ?
  Utiliser rsh avec elm ?  :-) Cela surchargerai notre centre de tri
  (mail hub) ! Une mthode tait retransmettre (forwarding) ou UUCP,
  smtp, etc. mais c'est trop compliqu.

  Alors vint POP/IMAP, chacun avec des problmes de scurit au dbut,
  (maintenant rsolus en utilisant ssh sur les nouvelles versions) :


  66..22..  RRccuupprreerr ssoonn ccoouurrrriieerr

  Ici se trouve un des principaux dsavantages de POP : le mot de passe
  est envoy en texte clair sur le rseau, et quelques agents
  utilisateurs ne connaissent simplement pas POP : vous devez utiliser
  un lecteur de courrier connaissant POP, comme Pine, Emacs, Netscape,
  Mutt ...

  Les problmes de mot de passe peuvent tre rsolus en crant un
  "cannal" crypt que POP utilisera ou en utilisant les extensions de
  APOP ou RPOP. Le problme du lecteur de courriel peut tre resolu soit
  en changeant d'agent utilisateur (mozilla est prt pour POP, de mme
  Emacs ou Pine) ou en utilisant un "rcuprateur de courriel" POP
  associ  un agent distributeur local.

  gwpop (a Good Way to POP, une bonne faon de faire du POP) vaut le
  coup puisqu'il cre un "cannal" crypt et dpose le courrier
  directement dans le "spool". Toutefois, il repose sur Perl ...

  Je peux aussi recommander fetchmail, qui est activement support.

  Sinon vous pouvez utilisez un des nombreux client pop disponibles pour
  linux, par exemple si votre compte est paul et votre mot de passe
  AssezSecret, vous excuterez :



            $ popclient -3 -v mail.acme.net -u paul -p "AssezSecret" -k -o MEL-INTERNET-PAUL



  (voir les pages du manuel pour la signification exacte des diffrentes
  options ci-dessus !)


  66..33..  EEnnvvooyyeerr dduu ccoouurrrriieerr

  Pour cela, vous devez utiliser un logiciel de courrier connaissant
  SMTP, comme qmail, sendmail, smail ou mozilla (celui l fait tout :
  lecteur de mail, rcupration par POP, envois par smtp !)

  Se rfrer  l'une des sections prddentes pour installer et
  configurer celui que vous prfrez le plus. Alors, vous serez au stade
  du "Test", essayez d'envoyer quelques courriers  un compte local sur
  le centre de tri (mail hub).


  66..44..  LLiirree ssoonn ccoouurrrriieell

  Si votre programme ne fait pas tout lui mme, vous pouvez installer
  elm, pgp, mush, pine ...beaucoup de bons programmes sont disponible
  gratuitement pour les plateformes linux !


  66..55..  TTeessttss

  Pour vrifier que votre serveur de courriel a pop, essayez :



            $ telnet mailhost 110





  Si cela fonctionne, vous aurez quelque chose comme "OK Pop server
  (...)  starting" : tapez "quit" !


  Pour installer un "cannal" crypt ssh, testez tout d'abord votre
  serveur de courriel en tapant :



            $ ssh mailhost date





  Si vous avez la date, cela devrait tre bon. Remarquez que ssh ne
  demandera pas de mot de passe, donc vous devez  crer un fichier
  ".shosts" sur le serveur de mail, contenant le nom du client. Pour
  tester la redirection du port ssh (que gwpop utilise), tapez :



              $ ssh -n -f -L 12314:localhost:110 mailhost sleep 30




  puis



         $ telnet localhost 12314





  Alors vous aurez bon espoir de voir la bannire du centre de tri pop.
  Si vous n'utilisez pas ssh, n'oubliez pas de mettre en commentaire
  $ssh dans le script gwpop. Pour vrifier si procmail est en cours,
  essayez "procmail -v".


  66..66..  UUttiilliissaattiioonn

  Maintenant vous pouvez diter le script Perl de gwpop pour vrifier
  que tout va bien, puis excuter gwpop :



              $ gwpop -v votre-nom-utilisateur
              POP password on mailhost: votre-mot-de-passe-secret




  Si les "messages d'erreurs" de gwpop sont normaux, le courriel du
  centre de tri (mail hub) sera tlcharg vers votre machine locale 
  l'endroit indiqu  gwpop. (S'il vous plait testez avec quelques
  Courriels !).

  Vous pouvez aussi utilisez gwpop comme dmon :



             $ gwpop -d $HOME/tmp votre-nom-utilisateur





  Les messages de gwpop sont envoys  syslog et gwpop s'excute sans
  fin ; un signal "HUP" obligera gwpop  chercher vos Courriels.

  Vous pourrez trouvez les logiciels de POP mentionns ici :

    <ftp://ftp.pasteur.fr/pub/Network/gwpop>

    <ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail>

    <http://www.cs.hut.fi/ssh/>


  77..  LLeess ""aaggeennttss uuttiilliissaatteeuurrss"" ddee CCoouurrrriieell

  Cettes section contiens les informations relatives aux "agents
  utilisateurs", c'est--dire les logiciels que l'utilisateur voit et
  utilise. Ces logiciels reposent sur les "agents transporteurs"
  mentionns plus haut. Beaucoup d'autre "Agents Utilisateurs" de
  Courriel sont disponibles maintenant (pine, mush ...) mais je n'ai pas
  trouv d'information dedans concernant linux. Me dire SVP si j'ai
  oubli quelque chose !





  77..11..  EEllmm

  Elm se compile, s'installe et s'excute sans faute sous linux. Pour
  plus d'informations, voir les sources d'elm et les instructions
  d'installation. Elm et les filtres doivent avoir les permissions 2755
  (groupe mail) avec les permissions 775 et le groupe mail pour
  /var/spool/mail.

  Si vous utilisez une distribution binaire, vous devrez crer un
  fichier /usr/local/lib/elm/elm.rc pour outrepasser les informations
  prcompiles de hostname et de domain :


    remplacer "sousdomaine.domaine" avec votre nom de domaine

    "monnomdhte" avec le nom canonique du nom d'hte



                 #---------- /usr/local/lib/elm/elm.rc ------------------
                 #
                 # Nom d'hte non qualifi
                 hostname = monnomdhte
                 #
                 # domaine local
                 hostdomain = sousdomaine.domaine
                 #
                 # Nom d'hte entirement qualifi
                 hostfullname = monnomdhte.sousdomaine.domaine
                 #
                 #--------------------------------------------------------




  Une chose dont vous voudriez avoir conscience est que si vous utilisez
  Elm compil avec l'option MIME, vous aurez besoin de metamail install
  et dans votre chemin ou alors Elm ne sera pas capable de lire le
  courrier MIME reu. Metamail est disponible  <thumper.bellcore.com>
  et bien sr via "archie".

  Dans la catgorie "trop beau pour tre vrai", il y a une distribution,
  Elm-2.4.24, avec "PGP intgr". Pour l'essayer, rcuprer le fichier
  <ftp://ftp.viewlogic.com/pub/elm-2.4pl24pgp3.tar.gz>, qui est
  l'elm2.4.24 avec l'option PGP ajoute. Vous le configurez et le
  compilez de la mme manire que l'Elm normal, ce qui veut dire que
  vous devrez ajouter les patchs mentionns plus haut.  Pour ce que cela
  vaut, je l'utilise ici et l'apprcie beaucoup. Bien sr, il doit y
  avoir des versions disponibles plus rcentes , y compris elm-ME+.

  Bien que cet lment ne soit pas spcifique  linux, il est nanmoins
  peru (de faon errone) comme un bug pnible d'Elm. Nous avons tous
  entendu parler d'Elm qui, de temps en temps, choue avec un message
  indiquant  qu'il est incapable d'allouer un nombre important d'octets
  avec malloc(). La solution pour contourner ce problme est d'enlever
  les alias de Courriel post-gnrs (aliases.dir et aliases.pag).

  CE N'EST PAS UN BUG DANS ELM, c'est une erreur dans la configuration
  d'Elm de l'endroit o a t rcupr la distribution binaire.


  Elm a un format amlior et non compatible d'aliases ; vous devez vous
  assurez que le chemin qu'utilise Elm pour aliases est diffrent de
  celui que sendmail/smail utilise. Vu le nombre de remarques sur ce
  problme, il est vident qu'au moins une distribution majeure 'dans la
  rue' a t mal configure (de scot at catzen.gun.de (Scot W.
  Stevenson) ).

  Le progiciel metamail courant requiert csh pour quelques uns de ses
  scripts. Csh manquant (ou tcsh) causera des erreurs intressantes ...


  77..22..  MMaaiillxx

  Epargnez vous des ennuis : aller simplement chercher le kit mailx de
  la Slackware 2.1.0 ou suprieure, qui a la bonne implmentation de
  mailx5.5. Si vous voulez partir des sources, mailx v5.5 se compile
  sans avoir  patcher sous linux, si vous avez "pmake" install. Si
  quelqu'un l'utilise encore, je l'engage fermement  enlever les trucs
  anciens d'"edmail" de la SLS1.00 et la remplacer par mailx.


  77..33..  DD''aauuttrreess aaggeennttss uuttiilliissaatteeuurrss

  Ce qui suit est connu pour fonctionner sous linux. Consulter "archie"
  pour connaitre la faon de les trouver ...

    Pine      - de l'Universit de Washington

    Metamail  - autorise l'utilisation MIME

    mh        - une autre faon de grer le Courriel

    deliver   - fichier/gestion des Courriels bas sur des rgles

    procmail  - fichier/gestion des Courriels bas sur des rgles

    Majordomo - gre les listes de diffusion

    Mserv     - permet les fichiers par Courriel


  88..  RReemmeerrcciieemmeennttss

  Les personnes qui suivent m'ont aid au rassemblement de l'information
  et des expriences qui ont permis la ralisation de ce document :

  Steve Robbins, Ian Kluft, Rich Braun, Ian Jackson, Syd Weinstein, Ralf
  Sauther, Martin White, Matt Welsh, Ralph Sims, Phil Hughes, Scot
  Stevenson, Neil Parker, Stephane Bortzmayer et en particulier de
  grands merci  Vince Shankan pour sa participation importante.

  Si j'oublie quelqu'un, toutes mes excuses : simplement Courrielez moi
  !


















  Modems-HOWTO
  Jean Michel VANSTEENE <vanstee@worldnet.net>
  13 Fevrier 1996

  Le  modem  est devenu  aujourd'hui un produit a  la mode. Que ce  soit
  pour l'acces a   Internet  ou  pour  se connecter   chez   un  partic-
  ulier qui laisse benevolement sa machine disponible, il faut un modem.
  Or, cet appareil, d'apparence  fort  simple,  cache  des  choses  tres
  sophistiquees  et son  emploi   peut engendrer bien  des soucis.  J'ai
  constate d'ailleurs  que bon nombre d'utilisateurs   se  posaient  des
  questions  a son propos. (Et ceux qui ne s'en posent pas ont   parfois
  des   problemes   qu'ils seraient    aptes  a resoudre par   eux-meme,
  s'ils   connaissaient   un    peu    son fonctionnement.)  Ce document
  n'est  ni un HOWTO ni  une   FAQ, ce qui    est  a  priori  inhabituel
  pour  un   document  Linux.   J'ai  longuement  reflechi  avant de  me
  lancer dans  cette aventure.  Parmi  mes priorites, la premiere a  ete
  d'etre  clair et de ne pas tomber dans le genre cours magistral...  Le
  but de ce document  est en fait   d'eclaircir un peu des  notions _d_o_n_t
  _o_n   _a   _e_n_t_e_n_d_u   _p_a_r_l_e_r  :  bande  passante,    bits/seconde,  baud,
  modulation,        interface       serie,        connexions          a
  vingt-huit-huit  ...   Apres  avoir   lu  ce document, de  deux choses
  l'une :  soit vous vous dites  _c_'_e_s_t  _i_m_b_i_t_a_b_l_e, et la   vous   sautez
  sur  votre  courrier-e  prefere pour m'engueu... me le dire, soit vous
  pensez  que ca vous  a apporte quelque-chose et la,  vous  sautez  sur
  votre  courrier-e...  pour  me   le dire. En tout  cas, toute remarque
  sera la bienvenue, comme d'habitude.

  11..  IInnttrroodduuccttiioonn

  La communication a   toujours ete, est  et sera   toujours un  echange
  de  signaux   entre  un  emetteur  et un recepteur.  Afin d'avoir  les
  idees claires sur   ce que  nous allons  aborder,  decomposons     les
  differentes    etapes  de       la communication.  Le  meilleur modele
  que nous allons    prendre  est  l'homme  qui  l'utilise  depuis  fort
  longtemps.

  PPrreemmiieerree  eettaappee : prenons un homme, bien rase de preference, propre et
  pret  a se rendre   au travail. Justement  il a un  mot a dire a    sa
  femme avant de partir. C'est l'information a transmettre.

  DDeeuuxxiieemmee  eettaappee  :  comment la  transmettre.  Si elle est  la, il crie
  (bon, il  parle), sinon il  ecrit le message sur un  bout  de  papier.
  Notre  homme  est donc capable (voyez-vous ca, il est  a peine 7h30 du
  matin !)   de coder son  information en fonction de la maniere dont il
  transmet son message.

  Pour    communiquer,  nous  utilisons    des  elements  de  base  dont
  l'ensemble forme l'alphabet.  Une  succession de ces elements  definit
  un  vocabulaire.  En  fait  il s'agit ni plus  ni moins que d'un code,
  complexe  certes,   mais   comprehensible    par  tous    ceux     qui
  l'adoptent.   Moins  il est  ambigu, plus il  est precis. (Vous pouvez
  essayer  de  donner   trois  sens  differents   a  cette  phrase  pour
  comprendre   que  notre   langue     est  parfois  ambigue : il    est
  enormement    bete  .)     Pour     s'exprimer,    il    est   ensuite
  capable     de      decouper     une      suite      de mots (elements
  continus)        en            phonemes (elements   discontinus),  que
  le recepteur    saura reassembler.

  En  informatique,  l'information  de  base est bbiinnaaiirree, donc codee sur
  deux valeurs logiques  que l'on note  habituellement 0   et  1.  C'est
  le  code  sans  doute le plus elementaire qui soit. Aussi il existe un
  certain nombre de codes intermediaires. Nous citerons par  exemple  le
  code ASCII, permettant de coder les lettres et chiffres.

  TTrrooiissiieemmee   eettaappee  :  sa   femme decouvre   le message  (ou l'entend).
  Elle est  capable de le  reconstituer.   Les  lettres  (respectivement
  les  phonemes)     forment  des  mots   qui  forment   des phrases qui
  forment le message. Ouf ! On y est.

  11..11..  RReessuummoonnss uunn ppeeuu

  DDeeccoouuppaaggee hhoorriizzoonnttaall.  La communication n'est possible que s'il existe
  un  code  commun. A tout niveau il faut s'assurer non seulement que le
  code employe  a  un  sens,   mais  en  plus   qu'il  a  le  meme  pour
  l'emetteur et   le    recepteur.  On  parle   alors  de _p_r_o_t_o_c_o_l_e.  Au
  niveau le plus   bas,  un  signal  est  utilise  comme  un  moyen   de
  communication.   Il  transporte  en   effet un message  sous une forme
  particuliere appele _c_o_d_a_g_e ou _m_o_d_u_l_a_t_i_o_n.   Un  signal  a  une  nature
  physique et un modele mathematique.  Nous nous etendrons davantage sur
  sa  nature  que  sur  le  modele  qui,  bien   qu'interessant,    nous
  amenerait  trop loin.  Le signal s'appuie sur un support.

  DDeeccoouuppaaggee        vveerrttiiccaall.        De   l'idee     au    code employe :
  plusieurs niveaux de traitement  sont  utilises  pour  transformer  un
  message  complexe  en  elements plus simples aptes a   etre  vehicules
  et  compris   par une entite homologue.

  Or s'il y a un signal, il faut forcement un support  de  transmission,
  permettant  de le  vehiculer d'un  point   a un autre.    Nous verrons
  cela  un  peu  plus  loin.  Celui  qui  nous  interesse  concerne  les
  transmissions telephoniques.

  Voici    donc  jetees les bases   de   la communication.  Nous  allons
  maintenant eclaircir un  peu  tout cela dans les  differentes  parties
  qui  vont  suivre. La  premiere etape consiste a consolider les  bases
  sur  les  signaux,   ensuite  nous  verrons   leur transmission.

  22..  UUnn ppeeuu ddee tthheeoorriiee dduu ssiiggnnaall......

  La  voix est un  bon exemple  de  signal permettant de  vehiculer  une
  information.   Ce     signal  est caracterise  par  sa bbaannddee ppaassssaannttee,
  c'est-a-dire  le   domaine  de   frequences  sur  lequel  elle    peut
  s'etendre.    En    general  cette   bande  est continue  et  comprise
  entre  30  et 15000   Hz.  Ce   signal  est  de type sinusoidal.

  Sans entrer  dans  des  details mathematiques,  disons   qu'un  signal
  est       compose   d'une   frequence     principale et d'harmoniques.
  Il  est   possible   d'en  donner   une   representation  mathematique
  grace   aux   series  de   Fourier, mais  nous n'irons  pas plus loin.
  Disons  simplement que ce signal est appele signal "analogique", parce
  qu'il peut prendre n'importe quelle valeur de facon    continue  entre
  deux  instants :   le   signal   est "module".

  22..11..  LLeess ssuuppppoorrttss ddee ttrraannssmmiissssiioonn

  Un   signal quel  qu'il   soit,  n'a d'interet  que  s'il   peut  etre
  transporte.    Il   faut   savoir qu'un systeme  de transmission n'est
  jamais en mesure  d'emettre des signaux  sans  leur  faire   subir  de
  deformations   :    selon    leur  nature,  on  parle  de  distorsion,
  d'affaiblissement, de diaphonie ...  Comme nous le verrons plus  loin,
  les  lignes telephoniques ne font   pas exception a cette regle.

  Chaque  type de support est caracterise  entre autres par son aptitude
  a  transmettre  un  signal  plus  ou  moins  fidelement.  De  nombreux
  supports      sont    utilises     en     transmission    de donnees :
  les  supports  avec  guide  physique  (cables, fibres,   ...)  et  les
  supports   sans    guide  physique  (ondes  radio,  ondes lumineuses).
  Pour donner  une    idee, de la   qualite   des supports,  disons  que
  les cables electriques  a paires torsadees sont  les    moins fiables,
  suivis  par   les  cables  coaxiaux.   Les  fibres   optiques  offrent
  actuellement  le meilleur compromis fiabilite/performance.

  33..  LLeess tteelleeccoommmmuunniiccaattiioonnss aannaallooggiiqquueess eett nnuummeerriiqquueess

  33..11..  LLeess tteelleeccoommmmuunniiccaattiioonnss aannaallooggiiqquueess

  C'est   un  mode  de   communication  utilise  depuis  tres  longtemps
  notamment  dans  la technologie  telephonique. Il   s'agit   en  effet
  d'une  activite   beaucoup   moins consommatrice de   ressources, tant
  financieres    que      technologiques    que      la     transmission
  numerique.  On n'est   pas  tout a fait  pret   a pouvoir s'en passer.

  33..22..  LLee ssiiggnnaall tteelleepphhoonniiqquuee

  A    l'origine,    le telephone   a  ete concu pour  transmettre    la
  voix.   Malheureusement,  il  n'est  pas possible,  etant   donne   le
  support    utilise,   de vehiculer le   signal  complet,  c'est-a-dire
  l'ensemble    des  frequences   le   constituant.    Le  domaine    de
  frequences  (on  parle  de  largeur  de         bande)   que   peuvent
  transmettre       les      lignes   telephoniques  est  officiellement
  compris entre 300  et   3400  hertz  (--  Les     _c_o_d_e_c_s     (codeurs-
  decodeurs)     modernes  utilises   dans  les   centraux telephoniques
  actuels ont une bande passante de l'ordre de 200   a  3700  Hz  et  la
  qualite   des  lignes    des   abonnes   s'en    trouve   generalement
  amelioree.--) .   On  applique   donc    au   signal    de  depart  un
  _f_i_l_t_r_e     _p_a_s_s_e_-_b_a_n_d_e   qui     restreint   l'espace    de  frequence
  attribue a la    transmission  du   signal  sur  cette  liaison.  Ceci
  correspond  heureusement a 90% de nettete de la voix.

  Selon  le principe bien  admis que tout traitement a  un cout, le plus
  simple et le moins couteux en telecommunications  est  de  transmettre
  le signal  avec le moins  de  transformations possible.  C'est bien ce
  qui se passe pour  la voix par telephone. Les  seules  transformations
  sont d'ordre analogique comme l'amplification par exemple.

  33..33..  LLeess tteelleeccoommmmuunniiccaattiioonnss nnuummeerriiqquueess

  Nous           avons          deja         evoque precedemment que  le
  fonctionnement de nos  chers ordinateurs etait   fonde  sur  la  seule
  information binaire. Celle-ci est representee,  des  lors qu'il s'agit
  de la visualiser (oscilloscope) ou  de la transporter,  par un  signal
  rectangulaire a deux niveaux.

  Pour  transporter un  tel signal, le plus simple  et le moins  couteux
  consiste a lui faire  subir le moins  de traitement possible,  voire a
  le  transporter tel quel.   On   imagine aisement que pour transmettre
  ce  signal sur un  support,  il   suffise  de   definir  deux  signaux
  electriques representant les niveaux logiques 0 et 1.  De  plus     ce
  type     de        transmission     offre       des       performances
  considerablement     superieures   a    la    transmission analogique,
  ceci pour deux raisons.

  La   premiere est un faible  taux  d'erreurs.  En effet,  alors  qu'en
  transmission  numerique,  les signaux sont  transmis avec des tensions
  d'amplitude variable, en transmission numerique le nombre  de  niveaux
  est   limite.   Les   signaux  parasites s'infiltrant  dans un  signal
  analogique    sont   donc    tres   difficiles    a   supprimer     et
  engendrent   des    erreurs.      En transmission  numerique,      les
  defauts    sont    plus      facilement    reperables      et      les
  equipements  regenerent   plus      facilement   un signal parasite ou
  affaibli.

  La deuxieme  raison tient au  fait  que l'on sait mieux   traiter  une
  information    numerique.   Ainsi,  en   utilisant  les   methodes  de
  multiplexage,  de  compression, l'acheminement  des  donnees  se  fait
  beaucoup  plus  rapidement.  De     plus  le  cout  du  materiel    de
  traitement diminue considerablement.

  33..44..  AAlloorrss ppoouurrqquuooii ll''aannaallooggiiqquuee ??

  Cette  question est   bien  entendu la premiere    que l'on  se   pose
  maintenant.       La   reponse    tient      en   quelques     mots  :
  essentiellement    pour  des   raisons  financieres.    Lorsque    les
  ordinateurs    sont      organises   en    petits    groupes   fermes,
  l'infrastructure a    mettre en  place   pour les  relier   est   bien
  sur   numerique.  Mais des  lors  que les communications s'etablissent
  sur    de    grandes    distances,     elles     doivent    empreinter
  l'infrastructure  existante,  qui est  analogique. L'evolution se fait
  lentement  vers  le   tout  numerique,   Numeris  en  est    l'exemple
  prometteur.

  33..55..  DDee ll''aannaallooggiiqquuee aauu nnuummeerriiqquuee eett rreecciipprrooqquueemmeenntt

  Puisqu'il  faut   s'adapter  a   un  monde   fait  de    numerique  et
  d'analogique,   il faut savoir   passer   de l'un  a   l'autre.  C'est
  essentiellement  ce  qui  va   se  passer  avec  les  modems.  Faisons
  d'abord   un  point  rapide  sur  les  methodes  de  conversion  entre
  l'analogique et le numerique.

  33..55..11..  DDee ll''aannaallooggiiqquuee aauu nnuummeerriiqquuee

  L'information  de depart est  representee par un signal qui, si  on le
  transforme en tensions  electriques,  peut  prendre  une  infinite  de
  valeurs  (dans  un   intervalle  fini,  heureusement  !)   entre  deux
  instants.  Pour le  transcrire  dans un  monde fait d'un nombre limite
  de  niveaux  significatifs,  il   faut  le  coder. Un des principes de
  codage   les   plus   simples   consiste  a    prelever  a  intervalle
  regulier    la  valeur  de   la    tension,  puis de    la representer
  en          binaire   sur  7    ou      8      bits.   Le  prelevement
  est        usuellement         appele  _e_c_h_a_n_t_i_l_l_o_n_n_a_g_e et la frequence
  d'echantillonnage correspond   au   nombre  d'echantillons    preleves
  par  seconde.     Un     codeur-decodeur         preleve    en general
  8000 echantillons par seconde.

  33..55..22..  DDuu nnuummeerriiqquuee aa ll''aannaallooggiiqquuee

  A  l'inverse,   la  transformation d'une   information  numerique   en
  analogique  consiste  a moduler un signal de base en fonction de cette
  information. C'est le role du modulateur-demodulateur (modem).

  Considerons maintenant ce signal de   base.  S'agissant  d'un   signal
  analogique,  c'est   donc  une   sinusoide   dont  la  frequence  peut
  varier, dans  le   cas qui  nous interesse,   de 1000  a  2000  hertz.
  C'est  la porteuse. La modulation  de ce signal va consister ensuite a
  en  faire    varier    un  ou  plusieurs  parametres  :     la  pphhaassee,
  ll''aammpplliittuuddee ou la ffrreeqquueennccee.

  La   modulation  d'amplitude  consiste  a modifier  l'amplitude  de la
  porteuse, selon   l'information binaire a transmettre.    Par  exemple
  une valeur de l'amplitude est attribuee au 0 et une autre au 1.

  La modulation de frequence correspond a la meme notion, mais ici   les
  deux  valeurs   sont  representees   par  des frequences  differentes.

  Enfin,  la  modulation de  phase, consiste a faire  varier la phase de
  la porteuse, de 45, 135, 225 ou 315 degres par exemple.

  La  rraappiiddiittee   ddee   mmoodduullaattiioonn  caracterise  la  vitesse a    laquelle
  ces    changements     s'effectuent.      C'est     la caracteristique
  essentielle  qui permet  de definir la  bande passante.

  Arretons-nous la un instant  pour evoquer  maintenant  la  notion   de
  debit.   Il  est  en effet facile  d'imaginer pouvoir faire varier  un
  signal a  volonte,  mais  ce serait  ne  pas tenir compte de certaines
  caracteristiques   physiques   des   supports  qui  nous  contraignent
  fortement.

  33..66..  DDeess bbiittss eett ddeess ddeebbiittss

  Une des valeurs caracteristique des supports  de transmission  est  le
  debit   maximum  qu'ils  peuvent  supporter.   Comment  s'empecher  de
  comparer   un support  a  une   route.     Le  nombre   maximum     de
  vehicules   qu'une  autoroute est capable  de  supporter par heure est
  tres         superieur     a     celui     d'une route  departementale
  (meme   si      vous n'aimez   pas les    routes departementales, mais
  ceci est une autre histoire ...).

  En ce qui concerne les  supports de transmission, leur  debit  maximum
  est directement lie a la largeur de la bande passante.  Chose promise,
  chose  due, pas trop  de  mathematiques ici.  Mais  il  est impossible
  de  ne   pas   parler   de   deux    valeurs fondamentales  qui   vont
  permettre de  comprendre ce qui se passe  avec les modems : ce sont le
  ddeebbiitt bbiinnaaiirree mmaaxxiimmuumm et la ccaappaacciittee ddee ttrraannssmmiissssiioonn mmaaxxiimmaallee.
  33..66..11..  LLee ddeebbiitt bbiinnaaiirree mmaaxxiimmuumm

  Sur un canal  de  transmission  dont  la  bande   passante est  B,  il
  est  montre       qu'un    signal        peut     etre     entierement
  reconstitue a l'arrivee, si on  le transmet en prenant 2B echantillons
  par seconde.  Le debit maximum s'ecrit alors :

               Dmax = 2B

  Si,  de  plus,  le  signal  peut  prendre   plus   de   deux   valeurs
  significatives, la formule se generalise en :

               Dmax = 2B log  V
                            2

  ou   VV correspond   au   nombre de   niveaux significatifs  (ou etats)
  que peut prendre  le signal : c'est sa vvaalleennccee. Par exemple,  V=4   si
  le  signal peut   prendre les  valeurs   +10 volts, +5 volts, -5 volts
  et -10 volts.

  Ceci    pour  vous  montrer     qu'en   theorie,   sur   une     ligne
  telephonique  dont  la  bande   passante est de 3000   hertz, le debit
  maximum est de 6000 bits/s avec deux niveaux significatifs (un pour le
  0,  un  pour    le  1), 12000  bits/s  avec quatre niveaux,  etc.   Le
  debit maximum est theoriquement infini.

  33..66..22..  LLaa ccaappaacciittee ddee ttrraannssmmiissssiioonn mmaaxxiimmaallee

  Un  des  inconvenients supplementaires des   supports est   le  bbrruuiitt.
  Or  la quantite de bruit  presente sur une ligne s'exprime par rapport
  a  la  puissance  utile  du  signal  transmis  :  c'est  le    rraappppoorrtt
  ssiiggnnaall//bbrruuiitt.   Plus   ce    rapport   est  grand, meilleure   est  la
  qualite.    La   capacite   de  transmission  maximale     est     une
  fonction      de     ce   rapport.     Pour  une   ligne telephonique,
  cette  capacite  maximale atteint  30000 bits/s.  Cela  signifie  bien
  que sur ces  lignes oonn nnee ppeeuutt ttrraannssmmeettttrree aa pplluuss  ddee 3300000000 bbiittss//ss (--
  C'est bien une capacite maximale physique,    a   ne  pas    confondre
  avec   des   debits  logiques  apres compression  de donnees.--) quels
  que soient la valence et  la frequence du signal.   C'est une   limite
  au debit binaire maximum.

  44..  LLee mmooddeemm

  Le   role du  modem  est  d'adapter   les signaux  rectangulaires   de
  donnees, que le reseau  telephonique  ne  peut  pas  transmettre  tels
  quels, en signaux transmissibles par ce reseau.

  Il a en fait deux fonctions :

  +o   un   role d'aaddaappttaattiioonn dduu   ssiiggnnaall aux  lignes du  reseau utilise,
     c'est-a-dire        de  modulation      et      de demodulation ;

  +o   un role de ddiiaalloogguuee avec l'equipement informatique auquel  il  est
     relie.

  Il  tient  donc  exactement  le meme role fonctionnel qu'une couche de
  communication  (TCP,  par  exemple).    Il   possede   une   iinntteerrffaaccee
  permettant  un  dialogue  avec un utilisateur se  trouvant a un niveau
  superieur.   Ici  il  s'agit d'une   interface  physique  (y   compris
  electrique).  Il  communique avec  une  entite paire (un  autre modem)
  selon un pprroottooccoollee.

  La structure interne d'un modem est decrite ci-dessous :

  +-----+      +--------+         +-------------+       +----------------+
  |  J  +----->| codeur +-------> |  modulateur +------>|                |
  |  O  |      +--------+         +-------------+       |                |
  |  N  |                                               |                |
  |  C  |                                               | transformateur |
  |  T  |                                               |                |
  |  I  |                                               |     ligne      |
  |  O  |      +----------+       +--------------+      |                |
  |  N  |<-----+ decodeur |<------+ demodulateur |<-----|                |
  +-----+      +----------+       +--------------+      +----------------+

  Les parametres caracterisant un modem sont :

  +o   le _d_e_b_i_t _d_'_i_n_f_o_r_m_a_t_i_o_n en bits/s ;

  +o   le _m_o_d_e _d_e _t_r_a_n_s_m_i_s_s_i_o_n : synchrone ou asynchrone ;

  +o    le  _s_u_p_p_o_r_t  _d_e   _t_r_a_n_s_m_i_s_s_i_o_n  _u_t_i_l_i_s_e   :   reseau   ou   ligne
     specialisee ;

  +o   le _m_o_d_e _d_e _c_o_u_p_l_a_g_e a  la ligne : electrique ou acoustique.

  Nous  aborderons  assez rapidement l'ensemble de ces parametres, selon
  l'utilisation que nous aurons a en faire.  La notion de debit  devrait
  maintenant etre assimilee.

  Penchons-nous   rapidement   sur  les  modes    et  les  supports   de
  transmission utilises.  Voyons   ensuite   plus     precisement     le
  role  d'adaptation du signal du modem, puis le dialogue qui met en jeu
  la jonction et la ligne.

  Commencons par definir un vocabulaire commun.

  44..11..  VVooccaabbuullaaiirree

  Un   aavviiss   est  une    recommandation   edictee  par  l'U.I.T  (Union
  Internationale       des      Telecommunications),        organisation
  intergouvernementale competente en telecommunications.  Les  avis  ont
  valeur de norme au sein de l'Europe, puisque les organismes de Telecom
  nationaux  ont   encore      le   monopole.  Les recommandations  sont
  issues      de  travaux   de      diverses   commissions  d'etudes  et
  sont adoptees lors    des   assemblees pleinieres  (delai de   l'ordre
  de  neuf mois,  etant donne l'evolution  rapide des technologies).  La
  section ``Etat  actuel  de la normalisation'' decrit   les  differents
  avis actuellement en vigueur.

  Dans     sa      normalisation,     l'U.I.T     definit   l'equipement
  informatique  comme   un   EETTTTDD  (_E_q_u_i_p_e_m_e_n_t  _T_e_r_m_i_n_a_l   _d_e _T_r_a_i_t_e_m_e_n_t
  _d_e  _D_o_n_n_e_e_s)  et      le  modem comme  un   EETTCCDD (_E_q_u_i_p_e_m_e_n_t  _T_e_r_m_i_n_a_l
  _d_e _C_i_r_c_u_i_t  _d_e _D_o_n_n_e_e_s).  La connexion  d'un equipement   informatique
  a    un   modem,   par exemple,     est realisee   par l'intermediaire
  d'une jjoonnccttiioonn ou iinntteerrffaaccee.

  On     appelle   half-duplex  (bidirectionnel  a   l'alternat),    une
  transmission   s'effectuant  dans un seul sens   a la fois. On appelle
  full duplex (bidirectionnel   simultane), une   transmission   pouvant
  s'effectuer   dans les deux sens    en meme temps.  Ces  transmissions
  peuvent avoir lieu indifferemment sur liaison 2 ou 4 fils.

  44..22..  LLee mmooddee ddee ttrraannssmmiissssiioonn

  Une  transmission de  donnee   est toujours liee  au   facteur  temps.
  Dans  les    transmissions   en   serie   qui  constituent la majorite
  des transmissions, l'emetteur et le recepteur doivent  travailler    a
  la  meme cadence.      Dans  le mode ssyynncchhrroonnee, ils sont cales sur  le
  meme rythme grace a des signaux d'horloge  emis avant la transmission.
  Dans   le   mode        aassyynncchhrroonnee,     l'horloge      du    recepteur
  n'est declenchee puis arretee que sur reception de bits de debut et de
  fin.   On  les  appelle  bits  de ssttaarrtt et de ssttoopp.  Ce mode, bien que
  moins  performant,  est  le  plus  utilise  actuellement   dans    les
  communications a travers  le  reseau public.

  44..33..  LLee ssuuppppoorrtt ddee ttrraannssmmiissssiioonn oouu lliiggnnee

  Un modem est utilisable principalement sur deux types de supports : le
  rreesseeaauu           ccoommmmuuttee     ou       la       lliiggnnee ssppeecciiaalliisseeee.  Sur
  chaque   type    de   support,  les    liaisons peuvent etre a deux ou
  quatre fils.

  Dans  le   cas qui  nous interesse,  le  modem est   relie  au  reseau
  telephonique    commute   et  la  liaison  est  a   deux  fils.   Nous
  l'utilisons soit  en half duplex,  soit en full duplex   selon  l'avis
  (voir definition  de  ce mot au paragraphe ``Vocabulaire''.

  A  ce   propos,  reflechissons un  peu sur l'utilisation qui est faite
  actuellement  du     Reseau       Telephonique Commute  (appele  aussi
  RTC).   Nous l'utilisons bien souvent en full  duplex sur liaison deux
  fils  (avis V.32 ou V.34).  Lorsqu'on  utilise  des  lignes  a  quatre
  fils,  il est facile d'imaginer que l'on consacre deux fils a   chaque
  sens   de   transmission.   Pour    chaque    sens,  considerant   les
  vitesses  de  modulations maximales  possibles,  on concoit qu'il faut
  combiner  plusieurs   types de modulations   pour obtenir  des  debits
  maintenant courants de l'ordre de 28800 bits/s.

  Or le RTC n'utilise  que ddeeuuxx fils.    Pour travailler en  full-duplex
  a des debits relativement   faibles (en   fait   jusqu'a  l'avis   V22
  bis),   il   etait possible de   partager   la  bande de frequence  en
  deux moities, une pour    chaque  sens.   Avec  les  debits   employes
  actuellement ce   n'est plus possible.  Pour travailler en full-duplex
  a d'importants debits, il  est  fait  appel    a   des     algorithmes
  complexes     dits  "de  suppression d'echo" (proche    et  lointain).
  Imaginez  le   travail  a realiser :    chaque  modem    recoit    les
  donnees  envoyees  par  le  distant  melangees  a ses propres donnees.
  Le      tout est   encore     pollue    par   de l'echo  !    Et  pour
  compliquer  le  tout, tout ceci varie dans le temps, et bien sur d'une
  communication a l'autre.

  Vous  comprendrez donc qu'avec  une  telle utilisation   du  RTC,  les
  modems  soient  continuellement soumis a  rude epreuve pour ce qui est
  de    la  correction,   ceci   pouvant    conduire   a   des    debits
  variables selon le moment.

  44..44..  LL''aaddaappttaattiioonn dduu ssiiggnnaall

  Nous  avons  vu aux  sections precedentes ce qu'etaient une modulation
  et un debit. Rassemblons maintenant un peu toutes  ces  idees.    Bien
  souvent,  c'est   sur   ce  point delicat que  les esprits se perdent.
  Nous avons vu que la rapidite de modulation  est  une  caracteristique
  essentielle   de la bande  passante.  Plus cette rapidite  est grande,
  plus    la  bande  passante   demandee  est  large.   Sur  le   reseau
  telephonique, la bande maximale officielle est  de 3100 hertz  (300  a
  3400  Hz). Dans  les centraux telephoniques modernes, elle va  jusqu'a
  3500 Hz.

  Pour   bien   comprendre   le  mecanisme de  l'adaptation   du signal,
  imaginez  maintenant que  nous  disposions  d'un  appareil  electrique
  capable d'emettre quatre niveaux de tensions possibles.

  Les donnees a transmettre sont  quant a elles toujours presentees sous
  forme  d'un  flot ininterrompu (ou  presque) d'informations  binaires.

  L'idee  serait  de regrouper  les bits deux par deux  et de les  faire
  passer par  ce dispositif, afin d'obtenir  en  sortie  le   niveau  de
  tension  correspondant.  Un tel  signal en sortie  est dit de  vvaalleennccee
  4.  Plus generalement,  la    valence  d'un  signal    est  le  nombre
  d'etats   qu'il   peut prendre.  Cette   transformation du  signal est
  appelee ccooddaaggee.

  Afin  d'adapter  ce  signal   de   sortie   au  support,     il   faut
  maintenant   le  moduler, par exemple en  choisissant  d'effectuer une
  modulation de  phase.  Etant   donnee  sa  valence,     nous     avons
  besoin    de   quatre decalages de phase.

  A  chaque   fois  que  ddeeuuxx   bits   se  presentent,  il est  possible
  d'effectuer  uunnee    modulation.  A  l'autre   bout,  l'equipement  est
  capable  de     regenerer   deux  bits.  Le     debit (en bbiittss//ss)  est
  donc   bien   double de  la    vitesse   de  modulation  (exprimee  en
  bbaauuddss).

  44..44..11..  EExxeemmppllee

  Vous  configurez  un  modem a 4800  bits par  seconde (V.27 ter).  Que
  va-t-il  se   passer    ?    Selon   cette  norme,    le    modem   va
  realiser   une modulation de phase differentielle octovalente.  Il  va
  donc  regrouper les  bits    par  trois  (ttrriibbiittss)   pour  moduler  le
  signal.   La  vitesse de modulation est donc de 1600 bauds et le debit
  de 4800 bits/seconde.   Pour   obtenir un debit   de 9600   bits   par
  seconde, il faudra combiner  un autre type de  modulation.  La section
  ``Debits   et      modulations''       presente    l'essentiel     des
  modulations utilisees dans  les differentes normes actuelles.

  44..44..22..  RReessuummee

  L'adaptation du signal peut se faire de trois manieres :

  +o   par une simple modulation appropriee ;

  +o   par un codage puis une modulation ;

  +o    par  un  simple  codage.  Ce  type  d'adaptation est present dans
     certains modems dits "bande de base" qui  transmettent  directement
     ce  code  sur  la  ligne.   Ce  ne sont pas ceux que nous utilisons
     couramment.

  La  rapidite de modulation s'exprime  en  bbaauuddss.  Elle  correspond  au
  nombre  de  changements d'etats du signal  par seconde sur la ligne de
  transmission.   Une  rapidite de _b  bauds ne  correspond pas forcement
  a  _b  bits/s  sur   la   ligne.   Une  configuration  binaire  (un  ou
  plusieurs bits selon  la  valence) correspond a  un etat du signal.

  44..55..  LLee ddiiaalloogguuee

  Interessons-nous   maintenant   au    dialogue    entre   l'equipement
  informatique  et la   jonction.

  44..55..11..  LLaa jjoonnccttiioonn sseerriiee

  La jonction  specifie les caracteristiques mecaniques, electriques  et
  fonctionnelles  des signaux.   Bien   entendu   ces  jonctions    sont
  normalisees     (voir  plus loin     les  tableaux recapitulatifs  sur
  l'etat  actuel   de   la   normalisation)  et   celle    qui      nous
  interesse    plus  particulierement   est referencee sous  le nom V.24
  par l'U.I.T, sensiblement equivalente     de   la      norme   RS-232C
  definie    par l'E.I.A (-- Electronic Industries Association.--)

  Voici  une  description  des  signaux   de  l'interface  V.24 les plus
  couramment utilises :

  +------+-----------+-----------+--------+------+--------------------------------+
  | Code | No broche | No broche | RS-232 | V.24 |        Signification           |
  |      | ISO  2110 |   DB 9    |        |      |                                |
  +------+-----------+-----------+--------+------+--------------------------------+
  | 101  |     1     |           |  PG    | TP   |  Terre de protection           |
  |      |           |           |        |      |                                |
  | 102  |     7     |    5      |  SG    | TS   |  Terre de signalisation        |
  +------+-----------+-----------+--------+------+--------------------------------+
  | 103  |     2     |    3      |  TD    | ED   |  Emission de donnees           |
  |      |           |           |        |      |                                |
  | 104  |     3     |    2      |  RD    | RD   |  Reception de donnees          |
  +------+-----------+-----------+--------+------+--------------------------------+
  | 105  |     4     |    7      |  RTS   | DPE  |  Demande pour emettre          |
  |      |           |           |        |      |                                |
  | 106  |     5     |    8      |  CTS   | PAE  |  Pret a emettre                |
  |      |           |           |        |      |                                |
  | 107  |     6     |    6      |  DSR   | PDP  |  Poste de donnees pret         |
  |      |           |           |        |      |                                |
  | 108  |    20     |    4      |  DTR   | TDP  |  Terminal de donnees pret      |
  |      |           |           |        |      |                                |
  | 109  |     8     |    1      |  DCD   | DS   |  Detection du signal de ligne  |
  +------+-----------+-----------+--------+------+--------------------------------+
  | 125  |    22     |    9      |  RI    | IA   |  Indicateur d'appel            |
  +------+-----------+-----------+--------+------+--------------------------------+

  Brochage des prises cote soudures :

             +-----------+          +---------------------------------------+
             | 5 4 3 2 1 |          | 13 12 11 10 9  8  7  6  5  4  3  2  1 |
             \  9 8 7 6  /          \  25 24 23 22 21 20 19 18 17 16 15 14  /
              `---------'            `-------------------------------------'
                 DB 9                              ISO IS 2110

  44..55..22..  LLee ddiiaalloogguuee pprroopprreemmeenntt ddiitt

  Prenons  deux  postes   de  travail  equipes   d'un  modem  chacun  et
  souhaitant communiquer.

  Nous  passerons   rapidement sur le fait  que les  equipements doivent
  etre relies  a la masse. Ceci  est  realise  grace   au  circuit  101.
  D'autre    part,  il   est  necessaire   de  definir  une reference de
  signalisation : c'est le role du circuit 102.

  Des  sa  mise sous  tension, l'ETTD  presente  un etat logique "1" sur
  le   circuit   108  : _T_e_r_m_i_n_a_l  _d_e  _D_o_n_n_e_e_s _P_r_e_t  (DTR).  Des  la mise
  sous  tension de l'ETCD, celui-ci presente  l'etat  _P_o_s_t_e  _d_e  _D_o_n_n_e_e_s
  _P_r_e_t  (DSR) correspondant a un etat   logique "1" sur le circuit  107,
  assurant ainsi que le modem est sous tension et connecte a la ligne.

  L'ETTD  ayant des donnees  a emettre, demande a emettre.   Il presente
  sur    la   jonction   l'information _D_e_m_a_n_d_e _P_o_u_r _E_m_e_t_t_r_e (RTS) sur le
  circuit 105.  Ceci valide le modulateur de l'ETCD qui emet  alors  une
  porteuse.
  Du   cote  appele,  l'ETCD   detecte la presence de la porteuse sur la
  ligne de transmission et  le signale a l'ETTD sur le  circuit   109  :
  _D_e_t_e_c_t_i_o_n  _d_e  _s_i_g_n_a_l (porteuse).  Les circuits 107  et    108  auront
  ete   initialises  au prealable comme ci-dessus.

  L'ETTD ayant signale son  intention  d'emettre  sur  le   circuit  105
  recoit   en  reponse  peu   de   temps apres  le signal _P_r_e_t _A _E_m_e_t_t_r_e
  (CTS) sur le circuit 106.

  Les donnees peuvent ensuite circuler via les circuits 103 et 104.

  44..55..33..  LLee ccoonnttrroollee ddee fflluuxx

  Lorsqu'un   emetteur emet de facon systematique plus de   donnees  que
  le  recepteur  ne peut en accepter, il se pose alors   un probleme qui
  ne   peut  etre resolu que grace au mecanisme de _c_o_n_t_r_o_l_e _d_e _f_l_u_x.

  Le controle de flux peut etre de differents types :

     llooggiicciieell
        Le modem  insere des caracteres   de controles dans  le flot  de
        donnees   circulant  entre l'ETCD et l'ETTD :  XXOOFFFF pour arreter
        l'envoi et XXOONN pour le reprendre.

     mmaatteerriieell
        Generalement appele CCRRTTSSCCTTSS,  il  met  en  oeuvre  l'emploi  des
        circuits  105   (RTS) et 106  (CTS).  Ce symbole  est en fait le
        nom donne       a la  constante     du     fichier   d'inclusion
        _t_e_r_m_i_o_s_._h.

  Le   fonctionnement   du  controle   de  flux   materiel   pendant  la
  transmission peut se resumer ainsi :

  Avant d'emettre,  le terminal doit lever  son signal RTS  (Request  To
  Send).    A   partir  de ce moment,  le   modem,  s'il  est  en mesure
  d'emettre,  leve  le signal CTS  (Clear  To Send). Lorsque  le  buffer
  du  modem  est    plein,   le   modem   descend   CTS.  Il le  remonte
  ensuite.  Dans l'autre sens de transmission,   lorsque  le  buffer  du
  terminal est plein, le terminal descend RTS.

  44..66..  LLaa ccoonnnneexxiioonn aauu rreesseeaauu tteelleepphhoonniiqquuee ccoommmmuuttee

  Maintenant,  plusieurs   questions se posent, et   j'imagine que parmi
  celles que vous vous posez il y a :

  +o   et sous Linux, le fonctionnement est-il identique ?

  +o   a   quel  moment   le   numero   du    correspondant a   t-il  ete
     compose ?

  +o   mon modem est configure en reception/emission, comment ca marche ?

  +o  etc.

  Nous allons maintenant tenter de repondre.

  Eclaircissons un peu  les choses.   Le dialogue  que  nous  venons  de
  voir  concerne  le  dialogue _t_h_e_o_r_i_q_u_e ETTD-ETCD  et ETCD-ETTD sans se
  soucier  d'eventuelles  contraintes  pouvant   provenir   du   systeme
  d'exploitation.   Il  est toujours vrai.  Neanmoins,  il ne suffit pas
  forcement pour  qu'une communication soit  etablie, notamment  via  le
  RTC.   Nous  allons  etudier  ce   fonctionnement  point  par point en
  prenant un bon systeme d'exploitation  (LLiinnuuxx,  mais  ce  n'est  qu'un
  exemple),   un     bon      port   serie    et   du   courage.    Vous
  continuez ?

  Tout d'abord, nous avons vu qu'une communication  commencait  toujours
  par  le   premier  echange DTR/DSR,   ou si vous preferez 108/107.  La
  montee  du circuit 108 est realisee  sous Linux   a   l'ouverture   du
  port  serie  (ex.    fopen ("/dev/ttyS0", ...)).   Cela se  voit  tres
  bien  sur un  modem externe, le voyant TR est allume.  La  reponse  du
  modem  par  le  circuit  107   est   un   peu   differente.   Dans  la
  section   ``Le  dialogue   proprement  dit'',  pour  des   raisons  de
  simplicite,   nous supposions que   le modem repondait  sur le circuit
  107    apres     un   delai   tres      bref,  c'est-a-dire      qu'il
  etait      instantanement connecte a la ligne.

  Cette  reponse  est   maintenant  conditionnee par  la connexion a  la
  ligne    via le    reseau telephonique commute.

  44..66..11..  IInniittiiaalliissaattiioonn dduu mmooddeemm

  En  general,  c'est juste   apres l'ouverture  du port  serie  que  le
  modem est  initialise.  Cela se fait grace aux commandes   AT que nous
  ne   detaillerons pas.  Simplement, ces commandes sont envoyees     au
  modem  (par   l'intermediaire   du  circuit  103)  (ex.   write sur le
  _d_e_s_c_r_i_p_t_e_u_r  _d_e _f_i_c_h_i_e_r du peripherique)   et     interpretees     par
  lui, lorsque :

  +o   le circuit 108 est ferme (etat "1") ;

  +o   le modem est en mode commande.

  44..66..22..  EEttaabblliisssseemmeenntt ddee llaa ccoonnnneexxiioonn

  L'une     des  commandes  d'initialisation     permet  la  composition
  d'un numero.   Le  modem decroche  (eh  oui,  ce  terme  barbare  veut
  dire  que  suite a la fermeture du relais, le central local envoie une
  tonalite a  la frequence  de 440 Hz :-)) puis compose le numero.

  Sur  l'equipement  distant,   le circuit   108 est   egalement  monte.
  Le   modem  appele  detecte l'appel.  Le signal d'indication   d'appel
  (circuit 125)  est   utilise en interne  pour memoriser  l'appel,   le
  modem   realisant  donc  lui-meme  la  connexion  a  la  ligne.  Cette
  memorisation est maintenue  par DTR (jusqu'a deconnexion).

  A  ce  moment  precis,  le   modem  appele  repond   en  validant  son
  modulateur qui emet la porteuse.

  Le  modem  appelant,   en   etat  de   decrochage  et  attendant    la
  porteuse,    met      son    emetteur      en       service.     Apres
  negociation,   le circuit  109  (DCD)  est alors valide.    Du cote de
  l'appele,  le circuit 109 est  egalement valide.  La prise de  contact
  est   terminee.   Les  circuits  107 (DSR) des deux  modems sont alors
  montes en reponse a DTR (asservissement des circuits 107-109).

  44..66..33..  RReeppoonnssee aauuttoommaattiiqquuee oouu mmaannuueellllee

  Du cote de l'appele, il est  possible  de  mettre  le  modem  en  mode
  reponse   automatique.   Il  repond alors  tout   seul a l'appel apres
  quelques sonneries. Le registre  S0  des  modems  est     generalement
  reserve   a   la configuration de ce mode.

  Lorsque    ce   registre  contient  la valeur   0,  (ATS0=0), le modem
  est en reponse manuelle. Sous Linux,  c'est   assez  souvent  l'option
  choisie,  et  c'est le  logiciel (notamment _g_e_t_t_y)  qui  gere l'appel.
  En effet   les   gestionnaires,     de   _t_t_y   tels      que     _g_e_t_t_y
  preferent  prendre en  charge la connexion : ce n'est pas au  modem  a
  repondre    a un  appel  mais   a _g_e_t_t_y  lui  meme.  Lorsque le  modem
  recoit  un appel, il emet simplement  le  message RRIINNGG  (bien sur,  si
  le mode verbeux est bien  configure : ATE1).  Sur ce, _g_e_t_t_y envoie  la
  commande ATA qui valide le mode reponse et la porteuse.

  Enfin,   a   la fermeture  du  port,  les  signaux 108/107 repassent a
  l'etat 00.

  Voici a titre d'information l'organigramme d'un appel :

                       +---------------------------------------+
                       | Detection de l'invitation a numeroter |
                       +---------------------------------------+
                                           |
                             +--------------------------+
                             |       Numerotation       |
                             +--------------------------+
                                           |
                          +---------------------------------+
                          | Emission de la tonalite d'appel |
                          +---------------------------------+
                                           |
                             +--------------------------+
           +------- NON -----|   Detection de tonalite  |- OUI
           |                 +--------------------------+    |
           |                    |                            |
           |         +--------------+            +--------------------------+
           |         |   Occupe     |            |     Retour d'appel       |
           |         +--------------+            +--------------------------+
           |           |                                     |
           |           |                         +--------------------------+
           +------------------------- NON -------| Detection arret tonalite |
           |           |                         +--------------------------+
           |           |                                     |
           |           |                      +-------------------------------+
           |           |    +-------- NON ----| Detection tonalite de reponse |
           |           |    |                 +-------------------------------+
           |           |    |                                |
           |           |    |                   +--------------------------+
           |           |    |            +-NON--| Prise de contact aboutie |
           |           |    |            |      +--------------------------+
           |           |    | NO         |                   |
   TIMEOUT |     BUSY  |    | ANSWER     | TIMEOUT           | CONNECT
      +--------------------------+   +-------------+  +--------------------------+
      |    Appel infructueux     |   | Deconnexion |  | Transmission de donnees  |
      +--------------------------+   +-------------+  +--------------------------+

  44..66..44..  DDeeccoonnnneexxiioonn

  Plusieurs methodes permettent de mettre fin a un appel :

  +o  MMooddee  ccoommmmaannddee.. Mettre  le modem en   mode commande et  envoyer  la
     chaine +++ATH ;

  +o  PPeerrttee ddee  ppoorrtteeuussee.. L'une   des causes est  la  deconnexion normale
     de l'autre modem ;

  +o  OOuuvveerrttuurree  dduu  cciirrccuuiitt  110088  (DTR).  C'est    la  methode  la  plus
     couramment employee.

  55..  EEttaatt aaccttuueell ddee llaa nnoorrmmaalliissaattiioonn

  Voici un tableau resumant l'etat actuel de la normalisation concernant
  les classes de debits supportes.

       +----------+--------------------------------------------+
       |   Avis   |              Signification                 |
       +----------+--------------------------------------------+
       | V.21     | Utilisation sur RTC a 300 bits/s           |
       |          |                                            |
       | V.22     | Utilisation a 1200 bits/s sur RTC 2 fils   |
       |          | full duplex                                |
       | V.22 bis | idem a 2400 bits/s                         |
       |          |                                            |
       | V.23     | Utilisation a 600 ou 1200 bits/s sur RTC   |
       |          | ou 1200/75 bits/s                          |
       |          |                                            |
       | V.25 et  | Composition automatique du numero et/ou    |
       | V.25 bis | reponse automatique a un appel sur RTC     |
       |          |                                            |
       | V.26     | Utilisation a 2400 bits/s sur LS(*) 4 fils |
       |          |                                            |
       | V.26 bis | Modem 2400 bits/s (1200 en repli) sur RTC  |
       |          |                                            |
       | V.27     | Modem 4800 bits/s pour LS                  |
       |          |                                            |
       | V.27 bis | Modem 4800 bits/s (2400 en repli) pour     |
       |          | donnees synchrones                         |
       |          |                                            |
       | V.27 ter | Modem 4800 bits/s (2400 en repli) meme     |
       |          | modulation mais pour le RTC                |
       |          |                                            |
       | V.29     | Modem 9600 bits/s pour LS                  |
       |          |                                            |
       | V.32     | 9600 bits/s (4800 en repli) duplex 2 fils  |
       |          | sur RTC                                    |
       |          |                                            |
       | V.32 bis | 14400 bits/s                               |
       |          |                                            |
       | V.34     | 28800 bits/s sur RTC                       |
       |          |                                            |
       | V.42     | Correction d'erreurs LAP-M et MNP4         |
       |          |                                            |
       | V.42 bis | Correction d'erreurs +                     |
       |          | compression de donnees  MNP5               |
       |          |                                            |
       | V.54     | Normalise les boucles de tests             |
       +----------+--------------------------------------------+

       * LS = Ligne Specialisee

  55..11..  AA pprrooppooss dduu VV..4422 bbiiss

  Un  tout petit  mot a  propos de  la norme V.42  bis  qui   permet  la
  compression  de   donnees.   L'algorithme utilise un   dictionnaire de
  chaines de caracteres. Lorsqu'une  chaine  apparait,  un   _t_o_k_e_n   est
  transmis  qui   n'est   autre   que l'index de    cette chaine dans le
  dictionnaire. La longueur maximale d'une chaine ainsi  que  la  taille
  maximale  du dictionnaire sont  negociees au debut  de la   connexion.
  La norme  V.42 bis  autorise une longueur de  chaine  comprise entre 6
  et   250  caracteres.   La  taille minimale du dictionnaire est de 512
  entrees (soit 9 bits  pour  coder  le   rang  d'un  entree).  Le  taux
  maximal de compression dans ce cas est de :

  250 * 8 : 9 = 222.2

  soit  un  taux  de   222:1.  Un  bon taux de  compression est plus une
  affaire de taille memoire et d'efficacite en fonction  des  donnees  a
  coder qu'une affaire de puissance de processeur.

  55..22..  DDeebbiittss eett mmoodduullaattiioonnss

       Merci   a  Christian    'naddy'   Weisgerber  de   son  aide
       pour  la redaction de cette partie.

  Voici  rassembles  dans  les  tableaux  suivants  les  debits  et  les
  modulations  correspondantes   utilises  dans les  principales  normes
  pour liaisons telephoniques a 2 fils.  Les  _n_o_r_m_e_s  qui  ne  sont  pas
  citees  ci-apres  sont    peu  utilisees  voire   oubliees aujourd'hui
  (liaisons  a  4 fils, V.32 terbo, Bell xxx, V.FC, ZyXEL,  HST,  PEP...
  certaines n'etant d'ailleurs pas de veritables normes).

  +------------------------------------------------------------------------+
  | Avis             b/s             bauds        modulation     remarques |
  +------------------------------------------------------------------------+
  | V.21             300             300            FSK                    |
  |                                                                        |
  | V.22            1200             600            DPSK                   |
  |                                                                        |
  | V.22bis         2400             600            QAM                    |
  |                                                                        |
  | V.23            1200            1200            FSK                    |
  |                  600             600            FSK                    |
  |                   75              75            FSK             [1]    |
  |                                                                        |
  | V.32            9600            2400            QAM+TCM                |
  |                 9600            2400            QAM                    |
  |                 4800            2400            QAM                    |
  |                                                                        |
  | V.32bis        14400            2400            QAM+TCM                |
  |                12000            2400            QAM+TCM                |
  |                 9600            2400            QAM+TCM                |
  |                 7200            2400            QAM+TCM                |
  |                 4800            2400            QAM                    |
  |                                                                        |
  | V.34            (voir tableau suivant)                                 |
  |                                                                        |
  | V.27ter         4800            1600            DPSK                   |
  |                 2400            1200            DPSK                   |
  |                                                                        |
  | V.29            9600            2400            QAM                    |
  |                 7200            2400            QAM                    |
  |                 4800            2400            QAM             [2]    |
  |                                                                        |
  | V.17           14400            2400            QAM+TCM                |
  |                12000            2400            QAM+TCM                |
  |                 9600            2400            QAM+TCM                |
  |                 7200            2400            QAM+TCM                |
  +------------------------------------------------------------------------+

  [1] Bande de retour.
  [2] Pas utilise pour fax.

  V.21, V.22, V.22bis, V.32, V.32bis, V.34 sont "full duplex".
  V.27ter, V.29, V.17 sont "half duplex" et utilises pour fax.
  V.23 est "half duplex" et asymetrique.

  Les modulations:

  FSK :  Frequency Shift Keying           (modulation de frequence)
  DPSK : Differential Phase Shift Keying  (modulation de phase differentielle)
  QAM :  Quadrature Amplitude Modulation  (modulation d'amplitude en quadrature)
  TCM :  Trellis Coded Modulation         (modulation codee en treillis)

  Dans  le cas de l'avis V.34, les choses  se compliquent un peu.  Cette
  norme a des vitesses  de modulation obligatoires   (2400,  3000,  3200
  bauds)  et  des  vitesses  facultatives  (2743, 2800, 3429 bauds).  La
  modulation est toujours de  type  QAM    (modulation   d'amplitude  en
  quadrature)   avec    une  des  trois  methodes  TCM   choisie  par le
  recepteur.   Les  combinaisons suivantes sont possibles :

  +-------------------------------------------------------------+
  |         2400    2743    2800    3000    3200    3429  bauds |
  |  b/s                                                        |
  +-------------------------------------------------------------+
  |  2400     x                                                 |
  |  4800     x       x       x       x       x       x         |
  |  7200     x       x       x       x       x       x         |
  |  9600     x       x       x       x       x       x         |
  | 12000     x       x       x       x       x       x         |
  | 14400     x       x       x       x       x       x         |
  | 16800     x       x       x       x       x       x         |
  | 19200     x       x       x       x       x       x         |
  | 21600     x       x       x       x       x       x         |
  | 24000             x       x       x       x       x         |
  | 26400                             x       x       x         |
  | 28800                                     x       x         |
  +-------------------------------------------------------------+

  66..  FFooiirree AAuuxx QQuueessttiioonnss

     CCoommmmeenntt ppuuiiss--jjee cchhaannggeerr  ffaacciilleemmeenntt  uunn ppaarraammeettrree ddee   mmoonn ppoorrtt
        serie  ?"   La  meilleure  facon  de  le   faire,   aussi   bien
        manuellement   que   dans   un   script  est  de   rediriger  le
        peripherique sur l'entree standard de _s_t_t_y. Exemple :

                  stty crtscts < /dev/ttyS0

     activera le   controle de flux   materiel   sur   le  premier  port
     serie utilise en entree.

                  stty -a < /dev/cua0

     affichera    tous    les   parametres    du   premier    port serie
     utilise en sortie.

     PPoouurrqquuooii ffaauutt--iill ccoonnffiigguurreerr CCRRTTSSCCTTSS ssuurr llee ppoorrtt sseerriiee ??
        Pour gerer le controle de  flux  materiel.   Ce  n'est  pas  une
        obligation,  c'est  une  garantie que l'echange de donnees entre
        ETTD et ETCD se  fera dans les  meilleures conditions.  Il  faut
        bien entendu que  votre modem puisse    le faire.  Contrairement
        a   une idee  recue, si vous  mettez l'option  CRTSCTS  dans  le
        fichier  /etc/gettydefs,  il  n'est  pas necessaire  d'effectuer
        en plus  un stty  crtscts </dev/porta la fois  dans  la   partie
        _i_n_i_t_i_a_l_e  et  _f_i_n_a_l_e de gettydefs.  Notez qu'il s'agit bien d'un
        controle  de   flux  local,  et  en  aucun  cas  il    ne   faut
        s'inquieter de  ce  que fait  le correspondant dans  ce domaine.

     JJee  rreemmaarrqquuee  qquuee  aaggeettttyy mmooddiiffiiee lleess ddrrooiittss dduu ffiicchhiieerr //ddeevv//ttttyySS00,,
        bizarre  non ?"  Ca  peut  effectivement paraitre  bizarre.   Il
        s'agit  en   fait   de  l'etablissement        d'une     _s_e_s_s_i_o_n
        d'utilisation       du  peripherique.  Celui-ci  prend alors les
        droits du "chef" de session (_s_e_s_s_i_o_n  _l_e_a_d_e_r)  qui  se   protege
        ainsi des utilisations du meme tty par d'autres processus.

     AAuurraaiiss--jjee aacccceess aa mmoonn tteelleepphhoonnee ??
        Cette  question  a  ete reellement posee.  Si vous n'avez qu'une
        ligne telephonique, la reponse est non.  De plus, en  decrochant
        le  combine  telephonique,  vous   pertuberez la    ligne et  le
        modem  risque  fort  de   diminuer le debit (pour le remonter si
        tout va bien ensuite).

     LLoorrssqquuee  jjee mmee ccoonnnneeccttee cchheezz mmoonn  ffoouurrnniisssseeuurr,, ccoommmmeenntt  mmoonn aaddrreessssee
        IIPP
        est generee ?"  Cette question montre a l'evidence une confusion
        entre  toutes  les  notions  reseaux. Bien qu'elle ait ete posee
        suite a un probleme relatifs aux modems, la reponse  ne  devrait
        theoriquement        pas       se        trouver    dans      ce
        document.  Neanmoins,  le  chapitre  suivant  rappelle  quelques
        principes   de   base  des  empilements  protocolaires  afin  de
        clarifier un peu tout cela.

  77..  UUnn mmoott ssuurr lleess eemmppiilleemmeennttss pprroottooccoollaaiirreess ccoouurraammmmeenntt uuttiilliisseess

  Un  tel  titre pourrait  faire croire a une erreur  de mise en page ou
  de _c_o_p_i_e_r_-_c_o_l_l_e_r etant  donne  le sujet du  document. En fait, il n'en
  est rien.

  La connexion d'une machine a  un fournisseur d'acces a Internet met en
  jeu un ensemble de protocoles de communications  :  TCP,  UDP,     IP,
  SLIP,     PPP,     etc.     De   nombreux   utilisateurs    souhaitent
  realiser ce type   de connexion depuis   chez eux, via  un  modem   et
  rencontrent parfois quelques problemes de configuration.

  Il  est  evident   qu'il  est a la  fois difficile et inutile  de tout
  connaitre de ces protocoles.  Il faut vraiment  _e_t_r_e  _d_u  _m_e_t_i_e_r  pour
  bien  les  connaitre,  et  encore ! Cependant il semble raisonnable de
  penser  que la mise  en oeuvre de  telles connexions, sous  Linux  par
  exemple,  ne  peut se faire  dans de bonnes conditions sans un minimum
  de    connaissances      sur   l'architecture     de     communication
  utilisee.

  La lecture  du   forum _f_r_._c_o_m_p_._o_s_._l_i_n_u_x montre   parfois  une certaine
  confusion  dans toutes  les  fonctions   mises  en   oeuvre    et  qui
  engendrent inevitablement de mauvais parametrages.

  Les   quelques  schemas   qui suivent  donnent  une  idee de  la facon
  dont tous ces   _e_n_g_r_e_n_a_g_e_s  sont places pour   que "ca tourne" !

  77..11..  TTCCPP//UUDDPP//IIPP

  Ces sigles  sont tres frequemment utilises aujourd'hui et pour cause :
  ces  empilements de couches de  communications tendent a se repandre a
  vive allure.  C'est a l'origine un ensemble de  protocoles  developpes
  dans   le  cadre du projet ARPANET, cree par ARPA (aujourd'hui DARPA),
  l'agence pour les projets  de     recherche  avancee   du    Ministere
  de   la Defense des Etats-Unis.

  +o    TCP (--   Transmission     Control Protocol  --) est   une entite
     de   niveau  Transport   chargee  de  vehiculer   des  donnees   de
     maniere  fiable  entre  deux machines souhaitant dialoguer ;

  +o    UDP  (--   User  Datagram  Protocol--) est  une entite  de niveau
     Transport  chargee  de  vehiculer des  donnees entre deux  machines
     souhaitant dialoguer ;

  +o    IP  (--   Internet  Protocol--)  est une entite  de niveau Reseau
     chargee de  vehiculer des  donnees entre deux noeuds d'un reseau.

  77..22..  PPPPPP//SSLLIIPP

  PPP (-- Point-to-Point Protocol--) et  SLIP (--  Serial  Line    IP--)
  proposent   une    methode  d'encapsulation    des datagrammes  IP sur
  des liaisons   point a  point, par   exemple  les  lignes  asynchrones
  serie.   En  quelques   mots,  disons  que  SLIP est un protocole tres
  simple,  assez  ancien,  datant d'une  epoque ou  certains   problemes
  n'etaient   pas  aussi  importants  qu'aujourd'hui  :       adressage,
  identification   reciproque, detection    et    correction  d'erreurs,
  compression  (extrait   du RFC-1055).  PPP est  quant  a lui  beaucoup
  plus  complet et  c'est pourquoi il est generalement prefere  par  les
  connaisseurs.      Il    offre     toutes     ces     caracteristiques
  regroupees en trois sous-ensembles :

  +o   une methode d'encapsulation de type  HDLC sur circuit  commute  ou
     permanent, synchrone ou asynchrone ;

  +o    un  protocole LCP (Link  Control Protocol)  permettant d'etablir,
     de configurer et de tester une connexion ;

  +o    une    famille   de   protocoles   NCP        (Network    Control
     Protocols)      pour   l'etablissement   et  la  configuration  des
     protocoles reseaux.

  Pour  obtenir   de  plus  amples  renseignements,   vous  pouvez  vous
  reporter  aux  documents   concernant    ces   protocoles :   RRFFCC--11005555
  (SLIP), RRFFCC--11117711 et RRFFCC--11117722 (PPP) et le PPPPPP--HHOOWWTTOO.

  77..33..  MMiissee eenn ooeeuuvvrree

  +----------------+-------+ +--------+ +--------+ +------+ +-----+
  |  Applications  |  FTP  | | TELNET | |  SMTP  | | TFTP | | ... |
  +----------------+---+---+ +---+----+ +--------+ +--+---+ +-----+
                       |         |      |             |
  +----------------+---+---------+------++------------+-----+
  | Transport      |         TCP         |        UDP       |
  +----------------+---------------------+------------------+
  | Reseau         |                                        |
  |                |                    IP                  |
  |                |      _____         _____     ______    |
  | (interfaces)   |     / eth \       / ppp \   / slip \   |
  +----------------+-----------------^---------+------------+
  | Liaison        |       LLC       |   PPP   |   SLIP     |
  |                |       MAC       |         |            |
  +----------------+-------++--------+--------+-+-----------+
                           ||                 | |
  +----------------+-------++--------+--------+-+-----------+
  | Interfaces     |      LAN        |       V.24           | Fonctionnelle
  |                |  (non decrit)   |       V.28           | Electrique
  |                |                 |  ISO.2110 (25 br)    | Physique
  +----------------+-------++--------+--------+-+----------------+
                           ||                 | |
                Ethernet  +--+              +-+-+-+  Modem
                ==========|  |=====         |\     \-------
                Fddi      +--+              \ \_____\     /
                                             \|_0_0_|    ---------

  La mise en oeuvre de  tels protocoles se fait  toujours de bas en haut
  (des  couches  basses aux couches  hautes) puisque la demande  se fait
  de haut en bas. Prenons un exemple :

  Supposons  que  vous   souhaitiez faire   un  _f_t_p  de  chez vous   sur
  _f_t_p_._s_a_m_a_c_h_i_n_e_._f_r.    L'application     _f_t_p    demande a  TCP d'etablir
  une  connexion.  Pour   qu'elle  puisse  s'etablir,   PPP  doit   deja
  fonctionner. Pour que PPP fonctionne, le modem doit etre en ligne :

  +o    premiere    etape  :       etablissement      d'une communication
     entre  deux modems.  Cette  etape est supposee connue, maintenant ;

  +o     deuxieme     etape  :  mise   en      route   de     PPP,   avec
     eventuellement authentification ;

  +o    troisieme   etape  :   configuration      de    l'interface    IP
     correspondante.     Il   s'agit    en   general,   sous   Linux, de
     l'interface _p_p_p_0.   Une   adresse    IP   pouvant  provenir    soit
     d'une  configuration   locale,   soit   de   votre fournisseur, est
     affectee a l'interface.    Dans   ce  dernier   cas,  celui-ci   la
     fournit  lors de l'initialisation PPP.   Dans  les deux  cas, c'est
     le  demon PPP qui configure l'adresse de l'interface ;

  +o   quatrieme  etape  :   etablissement   d'une  connexion  TCP,  puis
     initialisation  de  _f_t_p.  A partir de la, si tout s'est bien passe,
     vous pouvez transferer vos fichiers.

  Vous pouvez    maintenant     imaginer   le     deroulement      d'une
  deconnexion.

  77..44..  LLeess ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn

  77..44..11..  LLeess aapppplliiccaattiioonnss

  Vous  comprendrez  qu'il  est  difficile de decrire  ici l'emplacement
  des  fichiers de configuration  des  applications.   Prenez   soin  de
  lire   les   fichiers    README    ou       INSTALL     et  d'executer
  l'installation correctement.

  77..44..22..  LLeess ccoouucchheess ddee ccoommmmuunniiccaattiioonn :: TTCCPP//UUDDPP//IIPP

  Pour  une  configuration  standard   de  votre  machine,   vous  devez
  compiler  le noyau avec les options "reseau" suivantes :

       Networking support              y

       Network firewalls               n
       Network aliasing                n
       TCP/IP networking               y

       IP: forwarding/gatewaying       n
       IP: multicasting                n
       IP: accounting                  n
       IP: PC/TCP compatibility mode   n
       IP: Reverse ARP                 n
       IP: Disable Path MTU Discovery
               (normally enabled)      n
       IP: Disable NAGLE algorithm
               (normally enabled)      n
       IP: Drop source routed frames   y
       IP: Allow large windows
               (not recommended
               if <16Mb of memory)     n

       The IPX protocol                n

  Le fichier _r_e_s_o_l_v_._c_o_n_f doit contenir :

       domain <domaine de votre fournisseur>
       nameserver <adresse IP du serveur de nom de votre fournisseur>

  88..  LLee MMiinniitteell

  Bien  que ce merveilleux appareil commence  a prendre de l'age, il est
  difficile de  ne pas en parler  un peu, notamment  en raison  de   ses
  specificites.  Pourquoi ne pas envisager  en effet de faire un serveur
  Minitel chez vous ou tout simplement  de  l'utiliser  comme  terminal.
  Nous  nous    contenterons ici  d'en donner quelques  caracteristiques
  interessantes dans le cadre d'une utilisation avec Linux.
  Les STUM 1B (-- Specifications  Techniques  d'Utilisation  du  Minitel
  1B.--)  decrivent         l'ensemble         des  caracteristiques des
  divers modules du Minitel 1B :

  +o  l'ecran ;

  +o  le clavier ;

  +o  le modem ;

  +o  la prise peri-informatique. (-- A ce   propos,  je  tiens  a  votre
     disposition    un   schema  electronique  d'un   montage permettant
     l'adaptation RS232-Minitel.  Il met en  oeuvre  le  circuit  MAX232
     permettant une parfaite adaptation des tensions.--)

  88..11..  LL''eeccrraann

  Le   minitel  1B  est  capable    d'afficher   24 lignes   de   40  ou
  80 caracteres et 8 couleurs (ou niveaux de gris).

  Le mode 40  colonnes correspond   au  standard _V_i_d_e_o_t_e_x, le mode    80
  colonnes    au   standard    _t_e_l_e_-_i_n_f_o_r_m_a_t_i_q_u_e.     C'est  en  general
  celui-ci que  l'on       utilisera s'il sert       de  terminal.   Les
  sequences  de  touches  permettant de  passer d'un mode a l'autre sont
  indiquees dans le  tableau suivant dans lequel on retrouvera egalement
  quelques sequences utiles :

       +-------------+----------------------------------+
       |   Touches   |          Signification           |
       +-------------+----------------------------------+
       | <Fcnt T> A  | Mode tele-informatique americain |
       |             | (pas d'accents)                  |
       | <Fcnt T> F  | Mode tele-informatique francais  |
       |             | accents (codage particulier)     |
       | <Fcnt T> V  | Mode Videotex                    |
       +-------------+----------------------------------+
       | <Fcnt T> E  | Valide/invalide l'echo local     |
       |             |                                  |
       | <Fcnt E> P  | Mode page (retour haut de page   |
       |             | en fin d'ecran)                  |
       | <Fcnt E> R  | Mode rouleau (par defaut)        |
       |             |                                  |
       | <Fcnt C> M  | Verouillage minuscules (defaut   |
       |             | en mode tele-informatique)       |
       +-------------+----------------------------------+

  88..22..  LLee ccllaavviieerr

  Il s'agit d'un  clavier _A_Z_E_R_T_Y permettant  la saisie de la plupart des
  caracteres courants pour un  terminal.  Il est notamment  possible  de
  verouiller   les   minuscules     grace  a   la   sequence <Fcnt C> M.
  A noter une   correspondance,  dans  le   mode  tele-informatique,  de
  certaines touches :

       +-------------+-----------------------------------+
       |   Touches   | Correspondance terminal classique |
       +-------------+-----------------------------------+
       | Sommaire    |   PF1                             |
       |             |                                   |
       | Annulation  |   PF2                             |
       |             |                                   |
       | Retour      |   PF3                             |
       |             |                                   |
       | Repetition  |   PF4                             |
       |             |                                   |
       | Envoi       |   Enter (Entree)                  |
       +-------------+-----------------------------------+

  La    touche   _E_n_t_r_e_e   correspond egalement a  la sequence de touches
  <Ctrl J>

  88..33..  LLee mmooddeemm

  Le modem du minitel  permet des debits  de 300 a 4800 ou  9600  bits/s
  (--   Tous  les   modeles  de   minitel  n'autorisent  pas   tous  ces
  debits.--) .  Il  est associe a un coupleur travaillant sur 7 bits  de
  donnees,  un  bit  de parite paire, un bit   de   _s_t_a_r_t   et  un   bit
  de   _s_t_o_p,   soit   10  bits par caractere.  Le tableau suivant  donne
  les  sequences  de  touches  permettant de  configurer   le    modem a
  ces    differents debits.

       +-------------+--------------+
       |   Touches   |    Debit     |
       +-------------+--------------+
       | <Fcnt P> 3  |  300 bits/s  |
       |             |              |
       | <Fcnt P> 1  | 1200 bits/s  |
       |             |              |
       | <Fcnt P> 4  | 4800 bits/s  |
       |             |              |
       | <Fcnt P> 9  | 9600 bits/s  |
       +-------------+--------------+

  En  standard  V.23, il  est possible  de   _r_e_t_o_u_r_n_e_r le modem (vitesse
  emission-reception)     avec      la          sequence <Fcnt M> R.

  88..44..  UUttiilliissaattiioonn dduu MMiinniitteell ccoommmmee ssiimmppllee tteerrmmiinnaall

  D'apres  les  conseils  avises de  _P_i_e_r_r_e _F_i_c_h_e_u_x, voici un exemple de
  configuration permettant de connecter un Minitel :

  88..44..11..  CCoonnffiigguurraattiioonn ddee ggeettttyy

  Une methode simple consiste  a compiler un _g_e_t_t_y un  peu  particulier.
  Les       sources      se      trouvent       dans    le     paquetage
  ggeettttyy__ppss--22..00..77hh,   en  general  disponible par  _f_t_p (ftp.ibp.fr)  sous
  //ppuubb//lliinnuuxx//ttssxx--1111//ssoouurrcceess//ssbbiinn.

  Il s'agit ensuite de modifier le fichier _t_u_n_e_._h comme suit :

       #ifdef V23
       #define DEF_CFL  (CS7|PARENB)                   /* Pour connexion V.23 */
       #else
       #define DEF_CFL  (CS8)                  /* default word-len/parity */
       #endif /* V23 */

  Puis  de   compiler  l'ensemble avec  l'option  -DV23 vous donnant  un
  fichier executable  _u_u_g_e_t_t_y que  vous  pourrez  renommer  _u_u_g_e_t_t_y___v_2_3.
  Ensuite,  il       faut    ajouter  quelques  entrees       au fichier
  _/_e_t_c_/_g_e_t_t_y_d_e_f_s :

       #
       # Pour la connexion V.23
       #
       9600v23# B9600 CS7 PARENB -PARODD CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S login: #4800v23

       4800v23# B4800 CS7 PARENB -PARODD CLOCAL # B4800 SANE -ISTRIP CLOCAL #@S login: #2400v23

       2400v23# B2400 CS7 PARENB -PARODD CLOCAL # B2400 SANE -ISTRIP CLOCAL #@S login: #1200v23

       1200v23# B1200 CS7 PARENB -PARODD CLOCAL # B1200 SANE -ISTRIP CLOCAL #@S login: #1200v23

  Enfin, vous   modifiez  le fichier   _i_n_i_t_t_a_b   de   facon  a  demarrer
  _u_u_g_e_t_t_y___v_2_3 comme dans l'exemple ci-dessous :

       d4:45:respawn:/sbin/uugetty_v23 ttyS1 9600v23

  Une    solution    differente    consisterait  a   seulement  modifier
  _/_e_t_c_/_g_e_t_t_y_d_e_f_s.   La methode precedente    ne  fait,  finalement,  que
  redefinir l'option   SANE qui ne comporte  pas moins de 16 parametres,
  en modifiant  l'un d'eux : DEF_CFL.   Il  est     possible     de   la
  redefinir   par    configuration   en la remplacant par l'ensemble des
  parametres,  sauf CS8 que   l'on  remplacera    par       CS7  PARENB.
  Les         entrees        de _/_e_t_c_/_g_e_t_t_y_d_e_f_s    sont  a       modifier
  comme l'exemple ci-apres :

  #
  # Pour la connexion V.23
  #
  9600v23# B9600 CS7 PARENB -PARODD CLOCAL # B9600 ISTRIP CS7 PARENB -PARODD (*)
   CLOCAL BRKINT IGNPAR ICRNL IXON IXANY OPOST ONLCR CREAD HUPCL ISIG ICANON (*)
   ECHO ECHOE ECHOK #@S login: #4800v23

  (*) a continuer sur la meme ligne

  [reste du ficher]

  Bien que cela puisse  paraitre lourd,  il  est  preferable  d'utiliser
  cette  methode.   On   a  trop tendance a recompiler des  sources pour
  les  adapter  a    trente-six  situations  alors  qu'ils   fournissent
  generalement   un  niveau  de  configurabilite extremement  complet et
  puissant.   C'est  le   cas   ici.  Les  sources  de  _g_e_t_t_y  prevoient
  d'analyser tous ces parametres, et cela fonctionne parfaitement.

  88..55..  UUttiilliissaattiioonn dduu MMiinniitteell ppoouurr uunn aacccceess ddiissttaanntt

  Deux cas peuvent se presenter :

  +o    soit  vous   souhaitez   dedier    votre ligne aux   seuls  acces
     Minitel,  auquel  cas    il    est   souhaitable   d'envisager   de
     configurer  votre  systeme  comme  ci-dessus.   Il  faut simplement
     modifier   le   fichier  _/_e_t_c_/_g_e_t_t_y_d_e_f_s  en   remplacant   l'option
     CLOCAL  par   CRTSCTS  dans   la       premiere   partie   (options
     initiales)    et    par  CRTSCTS  HUPCL  dans  le  partie  suivante
     (options finales) ;

  +o   soit vous  souhaitez seulement _p_o_u_v_o_i_r  utiliser le  Minitel comme
     terminal     distant,        sans     que      ce       soit     un
     acces  dedie.   Dans  ce   cas  il  n'y   a rien  a faire sur votre
     systeme   (rien   de plus   que   la     configuration   que   vous
     avez  deja   du    mettre en  place :   getty,  gettydefs, inittab,
     ...).   Sur le  Minitel,  il sera   preferable  de   le  configurer
     en           mode       tele-informatique (<Fcnt T> F).

  99..  UUnn mmooddeemm ppaarrttiiccuulliieerr:: llee ccaabbllee nnuullll--mmooddeemm

  Un  cable _n_u_l_l_-_m_o_d_e_m est tout simplement un cable inverseur permettant
  de    relier         ensemble   deux   ETTD   sans     passer      par
  l'intermediaire      de  deux ETCD.   Il   est  conforme aux normes du
  C.C.I.T.T., c'est a dire qu'il simule  les  differents  signaux.   Son
  seul     inconvenient     est     que   la   liaison    ainsi realisee
  ne peut depasser 250 metres.

  Voici le schema du cable a realiser :

  +------+-------+---------------------------------+------+-------+
  | Code | V.24  |     Cablage (No de broche)      | Code | V.24  |
  +------+-------+---------------------------------+------+-------+
  | 101  |  TP   |    1 o-------------------o 1    | 101  |  TP   |
  |      |       |                                 |      |       |
  | 102  |  TS   |    7 o-------------------o 7    | 102  |  TS   |
  |      |       |                                 |      |       |
  | 103  |  ED   |    2 o-------------------o 3    | 104  |  RD   |
  |      |       |                                 |      |       |
  | 104  |  RD   |    3 o-------------------o 2    | 103  |  ED   |
  |      |       |                                 |      |       |
  | 105  |  DPE  |    4 o-|               |-o 4    | 105  |  DPE  |
  |      |       |        |               |        |      |       |
  | 106  |  PAE  |    5 o-|               |-o 5    | 106  |  PAE  |
  |      |       |        \        ,------'        |      |       |
  |      |       |         -------(---------o 8    | 109  |  DS   |
  | 109  |  DS   |    8 o---------'                |      |       |
  |      |       |                                 |      |       |
  | 107  |  PDP  |    6 o------------------o 20    | 108  |  TDP  |
  |      |       |                                 |      |       |
  | 108  |  TDP  |   20 o------------------o 6     | 107  |  PDP  |
  |      |       |                                 |      |       |
  +------+-------+---------------------------------+------+-------+

  1100..  CChhooiixx dd''uunn mmooddeemm

  Si vous etes sur le  point d'investir dans un modem,  il y a au  moins
  trois facteurs determinants pour vous :

     LLee ccoouutt
        Ce   facteur  est  generalement   le plus important.  Vous  vous
        etes  certainement fixe  une     somme que  vous   ne    pourrez
        depasser  que    dans  des limites raisonnables   (moins  de 500
        francs   environ)    et          moyennant      un       service
        supplementaire     non negligeable. On trouve a l'heure actuelle
        d'excellents modems dans une gamme de prix de l'ordre de 1000 FF
        a 2000 FF.

     LLee ddeebbiitt
        La   reponse   pourrait    etre    vague   :   tout  depend   de
        l'utilisation. En fait, il semble que la plupart d'entre vous se
        connectera  a  Internet et la plupart des fournisseurs proposent
        desormais des acces a   28800   bits/s.  Il  semble  raisonnable
        d'investir  dans    un  tel    modem, d'autant  plus    que leur
        cout  est  rarement superieur    a    2000 FF.     Vous   pouvez
        d'ailleurs  esperer  gagner  un  peu sur les temps de connexions
        lors de transferts de fichiers ou de navigation "WEB".

     LLee ttyyppee ddee mmooddeemm :: iinntteerrnnee oouu eexxtteerrnnee
        Pour repondre rapidement, on pourrait  dire que le modem interne
        a,  en   France,  tous  les   defauts.    Hors  de  France, il a
        beaucoup de defauts. C'est un  avis,  il  vaut ce   qu'il  vaut,
        mais  il  semble partage par bon nombre d'utilisateurs :

  +o    le   premier  defaut  est  qu'il  est   interne et   occupe  donc
     un emplacement sur  le _b_u_s. En  externe  le  modem   est   de  plus
     facilement transportable d'un PC a un autre, par exemple ;

  +o    le  deuxieme est que notre operateur national demande a ce  qu'un
     numero   soit  "brule"   lorsqu'un  appel  echoue  plusieurs  fois.
     Une  fois le numero brule, le    modem   refuse de  le    composer.
     La  seule   solution  est  alors d'eteindre   le   modem    et   de
     recommencer.     Au      fait,    comment  eteignez-vous  un  modem
     interne ?

  +o   le troisieme est plutot lie au confort.   La  plupart  des  modems
     externes  possedent    en   effet  des   voyants   indiquant l'etat
     de  la  connexion.  Il   est  agreable   de   constater  rapidement
     que    la    connexion   est   perdue  ou   que  le  transfert  est
     perturbe.

  Le  seul inconvenient du  modem   externe est qu'il  occupe  un   port
  serie. De  plus il vaut mieux  posseder  un port serie rapide  de type
  16550A (les  16550  sont  bogues).  Notez  cependant  que  les   ports
  serie  de type   8250   (les  anciens) supportent   des debits pouvant
  aller jusqu'a 57600   bits/s.  Contrairement a  ce que l'on dit,   ils
  ne  sont  pas  si   mauvais   que  cela.  Qui est deja    monte      a
  des   debits superieurs ?

  1111..  QQuueellqquueess cchhiiffffrreess

  Beaucoup  d'utilisateurs   se posent des  questions   sur   ce  qu'ils
  peuvent  attendre  de leur  modem et du cout  des communications. Bien
  souvent, la facture surprend tous les deux mois.

  1111..11..  DDeebbiitt rreeeell

  Un petit tableau vaut  mieux  qu'un  long  discours,   voici  quelques
  valeurs  de  debits  reels.  Evidemment,   il  n'est pas tenu   compte
  des problemes  de   lignes,   de   disponibilite  des    serveurs  qui
  reduisent  parfois    les taux de  transfert effectifs.   De plus, les
  valeurs sont indiquees  sans  compression  logicielle.  En   cas    de
  compression, il faudra multiplier les  valeurs par au   plus 2, ce qui
  est deja optimiste.

  Il  faut   savoir  qu'en  transmission   asynchrone 8    bits,   etant
  donnes   les   bits de ssttaarrtt et  de  ssttoopp,  le rendement est d'environ
  80%.

       +---------------+--------------+-------------------+
       | Debit affiche |  Debit reel  |  Ko/s  | Mo/heure |
       +---------------+--------------+--------+----------+
       |   9600 b/s    |   7680 b/s   |  0,96  |   3,4    |
       |               |              |        |          |
       |  14400 b/s    |  11520 b/s   |  1,44  |   5,2    |
       |               |              |        |          |
       |  19200 b/s    |  15360 b/s   |  1,92  |   6,9    |
       |               |              |        |          |
       |  21600 b/s    |  17280 b/s   |  2,16  |   7,8    |
       |               |              |        |          |
       |  26400 b/s    |  21120 b/s   |  2,64  |   9,5    |
       |               |              |        |          |
       |  28800 b/s    |  23040 b/s   |  2,88  |  10,4    |
       +---------------+--------------+--------+----------+

  1111..22..  CCoouuttss ddee ccoonnnneexxiioonn

  Le meilleur  indicateur  pour ce genre   de calcul est  bien   entendu
  France   Telecom.    Essayons    ici  de  degager    quelques   grands
  chiffres.   Les  prix  sont  indiquees    pour  un  appel   a Paris :

       +---------------+---------------------------------+
       |               |  Prix / heure de connexion      |
       +---------------+---------------------------------+
       | Appel de :    | Tarif plein |   50%   |   65%   |
       +---------------+-----------------------+---------+
       |     Paris     |   14,84 F   |  7,42 F |  5,20 F |
       |               |             |         |         |
       |  Proche       |   22,26 F   | 11,13 F |  7,79 F |
       |  Banlieue     |             |         |         |
       |               |             |         |         |
       |  Province     |  127,20 F   | 63,60 F | 44,52 F |
       +---------------+---------------------------------+

  Prix de l'unite Telecom : 0,742 FF.

  1122..  EEnnvviissaaggeerr dd''eeccrriirree ddeess aapppplliiccaattiioonnss

  Vous   avez   surement      plein    d'idees            d'applications
  interessantes,   mais    envisager  de  controler   une jonction serie
  vous fait peur ? Voici quelques petites indications.

  1122..11..  EEtt ssii cc''eettaaiitt ssiimmppllee ??

  Sous  Unix, donc sous  Linux,  les seuls  objets manipules   lors  des
  entrees/sorties  sont les _f_i_c_h_i_e_r_s.   (Tiens, au fait, on aurait peut-
  etre du commencer par la ! Bon, vous le saviez deja, ce n'est  pas  un
  cours  Unix).  La jonction serie n'echappe  pas a  cette   regle et le
  pilote vous la presente  ainsi. Ici, il s'agit d'un  (ou  plutot  deux
  comme  on le verra  plus loin) fichier particulier, bien  sur, puisque
  se cache derriere un  pilote (_d_r_i_v_e_r)  en   mode  caractere,  mais  la
  facon  de     realiser  les   entrees   sorties est    la meme : ooppeenn,,
  rreeaadd,,    wwrriittee,, iiooccttll,, cclloossee.   Il y   a quand meme  quelques  petites
  choses a savoir.

  Le pilote serie  s'est enregistre,  a l'initialisation du noyau, comme
  un _t_t_y.  Il  est donc gere comme  un  tty  classique.      Il  apporte
  bien   entendu quelques  caracteristiques supplementaires  que    nous
  verrons    rapidement   dans    la  section  concernant   la  commande
  _i_o_c_t_l.  Toujours   est-il  que si vous  savez gerer  un _t_t_y sous  Unix
  (commande _s_t_t_y), vous saurez sans probleme gerer ce pilote.

  1122..11..11..  ooppeenn,, cclloossee

  La   methode  d'ouverture  et  de   fermeture   d'un  port  serie  est
  classique.   Neanmoins  un  mecanisme  particulier se   cache derriere
  la primitive  ooppeenn  qui est rapidement  decrit a la  section  ``Appels
  entrants (Dial-in) et appels sortants (Call-out) sous Linux''.

  1122..11..22..  rreeaadd,, wwrriittee

  Rien a signaler de particulier.

  1122..11..33..  iiooccttll

  Le  controle  de   tout   systeme   d'entree/sortie  se   fait avec la
  commande systeme _i_o_c_t_l. Elle est souvent masquee par des commandes  de
  haut  niveau  (setserial,   stty, modemstat,  ...), mais elle est leur
  moteur.

  Selon     que vous souhaitez    vous   adresser  aux   fonctionnalites
  classiques d'un _t_t_y   ou aux fonctions specialisees   du pilote serie,
  vous  utiliserez  deux   sous-ensembles   de   commandes  differentes.
  Vous  les  retrouverez   dans  le  fichier  a inclure _l_i_n_u_x_/_t_e_r_m_i_o_s_._h.
  Decrivons-les      rapidement       (on deborde un tout petit  peu  du
  sujet :-)) :

     TTCCGGEETTSS -- TTCCSSEETTSS
        et   quelques  derives  avec WAIT,  FLUSH... Elles permettent de
        recuperer (resp. positionner) les attributs  standard  _t_t_y  dans
        une structure _t_e_r_m_i_o_s (voir le fichier _l_i_n_u_x_/_t_e_r_m_i_o_s_._h)

     TTIIOOCCSSTTTTYY -- TTIIOOCCNNOOTTTTYY
        permettent     de   definir   (resp.   annuler)    une   session
        d'utilisation du _t_t_y. Ceci est visible car, entre autres choses,
        une   consequence  est  le  changement  des  droits  du  fichier
        correspondant

          Avant:
                  crw-rw-rw-   1 root     tty        4,  64 Nov 26 20:47 ttyS0
          Apres:
                  crw--w--w-   1 root     root       4,  64 Nov 26 20:49 ttyS0

     TTCCFFLLSSHH eett ccoommppaaggnniiee
        positionnement d'indicateurs (voir la commande stty)

     TTIIOOCCGGSSEERRIIAALL -- TTIIOOCCSSSSEERRIIAALL
        permettent de recuperer (resp.   positionner)  les  informations
        generales   dans   une    (resp.   a  partir  d'une)   structure
        _s_e_r_i_a_l___s_t_r_u_c_t (voir le fichier _l_i_n_u_x_/_s_e_r_i_a_l_._h) : le type de port
        serie,  la  ligne,  le port, l'irq le port utilise... ni plus ni
        moins ce que fait _s_e_t_s_e_r_i_a_l.

     TTIIOOCCMMGGEETT -- TTIIOOCCMMSSEETT
        permettent de recuperer (resp.   positionner)  les  informations
        plus  specifiques  a    la  jonction proprement  dite  (dans  un
        entier,   sous  forme   de   bits      positionnes   selon   que
        l'indicateur correspondant est vrai ou faux) :

       +-------------------------------------------------------------------------------------------+
       |   //     DSR      RNG       CAR        CTS        //   //    RTS            DTR         //|
       |  //   (Data Set  (Ring)  (Carrier)  (Clear To    //   //   (Request   (Data Terminal   // |
       | //      Ready)                        Send)     //   //     To Send)      Ready)      //  |
       +------+----------+-------+----------+-----------+----+----+-----------+---------------+----+
        31   9     8         7        6          5        4    3        2          1            0

  1122..22..   AAppppeellss  eennttrraannttss  ((DDiiaall--iinn)) eett aappppeellss ssoorrttaannttss ((CCaallll--oouutt)) ssoouuss
  LLiinnuuxx

  1122..22..11..  IInnttrroodduuccttiioonn

  Le  pilote   serie du  noyau  de  Linux  propose  de   gerer  un  meme
  port  serie a la  fois pour les appels entrants et pour   les   appels
  sortants    exploitant   ainsi   pleinement      leur  caracteristique
  bi-directionnelle.    Il    offre  donc     a l'utilisateur deux types
  de fichiers :

  +o   /dev/ttyS<n> :      sont     generalement utilises en entree ;

  +o   /dev/cua<n> :    sont       generalement utilises en sortie.

  1122..22..22..  GGeessttiioonn

  Chaque port serie est  enregistre deux fois  aupres du  gerant  _t_t_y  :
  une  fois   en  mode  _e_n_t_r_e_e  (ttyS, majeur 4) et  une  fois en   mode
  _s_o_r_t_i_e (cua,   majeur 5).   Voyons    rapidement   comment  le  pilote
  gere ensuite les "deux" ports :

  +o   les ports series  /dev/cua sont geres en mode _n_o_n_-_b_l_o_q_u_a_n_t.   Leur
     ouverture   n'est   possible     que   si   la    ligne   /dev/ttyS
     correspondante  n'est    pas   ouverte   et   active   (sinon errno
     retourne EBUSY) ;

  +o   les ports series /dev/ttyS sont geres en mode  bloquant  ou   non-
     bloquant,   c'est  donc   un peu  plus  complique.  Si l'indicateur
     CLOCAL  est   positionne,    l'ouverture   en   mode  bbllooqquuaanntt  est
     effective   si  la  ligne   /dev/cua   est  libre.  Si l'indicateur
     CLOCAL n'est pas  positionne,   elle  est  effective  si  les  deux
     conditions suivantes sont reunies :

  +o   la   ligne est  libre      (le /dev/cua correspondant    n'est pas
     utilise),

  +o   la porteuse (circuit 109) a ete detectee.

     Dans ce mode et pendant que   l'ouverture  est  bloquee,  la  ligne
     n'est  pas    occupee,  ce qui signifie    qu'une  application peut
     toujours effectuer  un  appel  sortant.  Si   le    port  est    en
     cours   de fermeture, l'ouverture echoue  (EAGAIN).

     L'ouverture  en  mode non-bloquant, quant a elle,  est effective si
     le port    n'est   pas   deja  ouvert   et     actif  (sinon  errno
     retourne   EBUSY) (--     Les  applications  utilisent     de  plus
     le mecanisme des fichiers de  verrouillage  garantissant  l'unicite
     d'utilisation de la ressource.--)

  C'est   le mode qu'utilisent  beaucoup  d'applications comme _g_e_t_t_y qui
  souhaitent  dans un premier temps  initialiser la ligne  (pour  eviter
  des       instabilites           liees           aux        connexions
  precedentes)       voire       ensuite         pour        initialiser
  l'equipement (modem).   Elles ne s'interessent qu'au fait que la ligne
  soit occupee, en fermeture ou libre.  Si  celle-ci  n'est  pas  libre,
  l'application  se termine  et le mecanisme du _r_e_s_p_a_w_n se charge de les
  relancer.

  Pour la  gestion de la  connexion proprement dite, l'application _g_e_t_t_y
  (pour  prendre  un  exemple  courant)  ouvre  la   ligne, soit en mode
  bloquant si vous laissez   le  modem  en  reponse  automatique,   soit
  en  mode  non-bloquant  si  vous  souhaitez qu'elle gere activement la
  connexion.  Elle est alors en attente bloquante en lecture (sur _r_e_a_d).

  1133..  QQuueellqquueess aapppplliiccaattiioonnss iinntteerreessssaanntteess

  1133..11..  UUnn nnuummeerrootteeuurr

  Cette  idee    va  faire plaisir  a _X_a_v_i_e_r _C_A_Z_I_N : c'est la sienne. Le
  mieux est de le laisser parler :

       En fait,  je trouverais tres  utile  de cliquer  sur un bou-
       ton   pour  appeler une personne retrouvee dans  une base de
       donnees   par  exemple.   Surtout  si  elle  se  trouve    a
       l'etranger  (minimum  12 chiffres depuis ici).  Donc, ce que
       j'aimerais,  ce sont les renseignements necessaires au  pro-
       grammeur pour pouvoir  construire  un frontal qui demande au
       modem de composer le   numero choisi,  puis  affiche un mes-
       sage   (si    le   poste    n'est   pas occupe)   du   style
       "Le telephone   sonne,  prenez  le  combine".   Ces  petites
       choses  toutes simples demandent  de comprendre ce  que sig-
       nifie  prendre la ligne et la relacher, pour un modem.

  Excellent  exercice.   Alors  avec  tout    ce  que   l'on   vient  de
  dire, au travail :-).  En laissant de cote la partie base de  donnees,
  l'algorithme  a  utiliser  correspond  a _l_'_o_r_g_a_n_i_g_r_a_m_m_e    _d_'_u_n  _a_p_p_e_l
  donne      a   titre d'information au chapitre ``Le modem'', auquel il
  faut rajouter :

  +o  au     prealable,           ouvrir      le        port        serie
     (/dev/cua<n>),   le   configurer.  Le    mieux   est   de   prendre
     exemple sur ce que fait _g_e_t_t_y ;
  +o  envoyer    ensuite     les    commandes    AT      d'initialisation
     puis   de  numerotation (utiliser la fonction chat()) qui fait ceci
     tres bien ;

  +o  enfin se mettre en  lecture  sur  le  port  afin  de  detecter  les
     messages  emis   par  le  modem. Le seul   probleme  ici est  qu'il
     sera difficile    d'attendre   certains  d'entre-eux   (NO  ANSWER,
     TIMEOUT)  etant  donne   qu'il  faut  prevenir l'utilisateur  qu'il
     peut decrocher.

  Par contre les   messages NO DIALTONE (modem  pas  branche),  et  BUSY
  sont    fort  interessants  et  permettent   d'informer  l'utilisateur
  immediatement.

  1133..22..  mmooddeemmssttaatt eett ccoommppaaggnniiee

  Vous  trouverez sur les   _s_e_r_v_e_u_r_s   _f_t_p  habituels  quelques   petits
  programmes  permettant  d'afficher l'etat de la jonction. Vous pourrez
  vous   interesser  particulierement  a  la  facon  de  recuperer   les
  informations (plutot que sur l'interface utilisateur qui est l'exemple
  meme de ce qu'il ne faut pas faire).

       /pub/linux/sunsite/system/Serial/modem-stats-1.0.tar.gz
       /pub/linux/sunsite/system/Serial/statserial-1.1.tar.gz
       /pub/linux/sunsite/system/Serial/modemstat-0.2.tgz

  Un bon point pour statserial  aussi simple que bien presente, en  mode
  texte.

  1133..33..  UUnn ddeetteecctteeuurr ddee ssiiggnnaall 110099 ((CCDD))

  Lu dans _c_o_m_p_._o_s_._l_i_n_u_x_._d_e_v_e_l_o_p_m_e_n_t_._a_p_p_s cette demande

       Existe-t-il  un  utilitaire   que    je    pourrais utiliser
       dans      un  _s_h_e_l_l_-_s_c_r_i_p_t    et   retournant  une   valeur,
       disons  1,  si le  signal _D_e_t_e_c_t_i_o_n _d_e _p_o_r_t_e_u_s_e est monte et
       0 sinon ?

  Le message ne   dit pas quel en  serait   l'usage  mais  peu   importe
  c'est un excellent exemple d'utilitaire assez facile a realiser. Voici
  d'ailleurs un exemple de code source possible :

  ______________________________________________________________________
  ------------------------- debut de carrier.c -------------------------
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <sys/ioctl.h>
  #include <termios.h>
  #include <unistd.h>
  #include <fcntl.h>
  #include <string.h>
  #include <stdlib.h>
  #include <errno.h>
  #include <stdio.h>

  main(int argc, char *argv[])
  {
    char *whoami, *device;
    int fd;
    int modem_bits;

    whoami = (whoami = strrchr(argv[0], '/')) ? whoami + 1 : argv[0];

    if (argc != 2) {
      fprintf(stderr, "Usage: %s device-file\n", whoami);
      return(EXIT_FAILURE);
    }

    device = argv[1];

    if ((fd = open(device, O_RDONLY | O_NDELAY)) < 0) {
      fprintf(stderr, "%s: error opening \"%s\": %s\n", whoami, device,
              strerror(errno));
      return(EXIT_FAILURE);
    }

    if (ioctl(fd, TIOCMGET, & modem_bits) < 0) {
      fprintf(stderr, "%s: error getting modem line statuses for \"%s\": %s\n",
              whoami, device, strerror(errno));
      return(EXIT_FAILURE);
    }

    if (modem_bits & TIOCM_CAR) {
      printf("1\n");
      return(EXIT_SUCCESS);
    }

    printf("0\n");
    return(EXIT_FAILURE);
  }
  ------------------------- fin de carrier.c -------------------------
  ______________________________________________________________________

  On pourra  ensuite   l'utiliser   dans   un  _s_h_e_l_l   de   la   maniere
  suivante :

  ______________________________________________________________________
  if [ `carrier /dev/modem` -eq 1 ]; then
          ... choses a faire si la porteuse est detectee ...
  else
          ... choses a faire s'il n'y a pas de porteuse ...
  fi
  ______________________________________________________________________

  1144..  RReemmeerrcciieemmeennttss

  Ce  document  n'aurait  vu le  jour sans  un   certain nombre de  gens
  fort sympathiques et plein  de  bonnes  idees   appartenant   pour  la
  plupart a la mailing list de traduction :

  Rene  COUGNENC,\  Xavier  CAZIN,\  Bernard CHOPPY,\ Francois AUDIBERT\
  Eric DUMAS,\ Pierre FICHEUX, \ Herve MIGNOT, \ Pierre  VASSELLERIE,  \
  Jacques LAVIGNOTTE, \ et tous les autres.

  HOWTO: Les systmes multi-disques
  Stein Gjoen, sgjoen (at) nyx.net
  Traduit en franais par Patrick Loiseleur loisel (at) lri.fr
  v0.19b, 10 septembre 1998

  Ce document explique comment utiliser au mieux plusieurs disques et
  partitions avec Linux. Bien qu'une partie de ce texte soit spcifique
   Linux, il peut aussi d'appliquer  d'autres systmes d'exploitation
  multi-tches, tant donne l'approche gnrale adopte ici.
  ______________________________________________________________________

  Table des matires






















































  1. Introduction

     1.1 Copyright
     1.2 Avertissement
     1.3 Nouveauts
     1.4 Remerciements

  2. Organisation de ce document

     2.1 Structure logique
     2.2 Structure du document
     2.3 Plan de lecture

  3. Technologies de disques durs

     3.1 Disque
     3.2 Gomtrie
     3.3 Mdia
        3.3.1 Disques magntiques
        3.3.2 Disques optiques
        3.3.3 Disques  tats solides
     3.4 Interfaces
        3.4.1 MFM et RLL
        3.4.2 ESDI
        3.4.3 IDE et ATA
        3.4.4 EIDE, Fast-ATA et ATA-2
        3.4.5 Ultra-ATA (ou Ultra-DMA)
        3.4.6 ATAPI
        3.4.7 SCSI
     3.5 Cbles et nappes
     3.6 Adaptateurs
     3.7 Systmes multi-canaux
     3.8 Systmes multi-cartes
     3.9 Comparatif de vitesse
        3.9.1 Contrleurs
        3.9.2 Types de bus
     3.10 Jeux de tests (Benchmarks)
     3.11 Comparaisons
     3.12 Perspectives
     3.13 Recommandations

  4. Considrations diverses

     4.1 Usage des systmes de fichiers
        4.1.1 Swap
        4.1.2 Stockage temporaire(
        4.1.3 Queues (
        4.1.4 Rpertoires utilisateurs (
        4.1.5 Excutables (
        4.1.6 Librairies (
        4.1.7 Racine (
        4.1.8 DOS, etc.
     4.2 Explication des termes
        4.2.1 Vitesse
        4.2.2 Fiabilit
        4.2.3 Fichiers
     4.3 Technologies
        4.3.1 RAID
        4.3.2 AFS, Veritas et autres systmes de gestion de volume
        4.3.3 Le patch
        4.3.4 Considrations gnrales sur les systmes de fichiers.
        4.3.5 Systmes de fichiers des cdroms
        4.3.6 Compression
        4.3.7 Autres systmes de fichiers
        4.3.8 Position physique des pistes
        4.3.9 Vitesse des disques
  5. Autres systmes d'exploitation.

     5.1 MS-DOS
     5.2 Windows
     5.3 OS/2
     5.4 NT
     5.5 Sun OS
        5.5.1 Sun OS 4
        5.5.2 Sun OS 5 (i.e. Solaris)

  6. Clusters

  7. Points de montage

  8. Placement des partitions, des rpertoires et des fichiers

     8.1 Choisir les partitions
     8.2 Rpartir les partitions entre les disques.
     8.3 Trier les partitions et les disques
     8.4 Optimisation
        8.4.1 En tenant compte de spcificit des disques
        8.4.2 Utilisation du paralllisme
     8.5 Besoins et usage
     8.6 Serveurs
        8.6.1 Rpertoires personnels des utilisateurs
        8.6.2 Serveur FTP anonyme
        8.6.3 La toile (WWW)
        8.6.4 Courrier lectronique
        8.6.5 News
        8.6.6 Autres
     8.7 Piges
     8.8 Compromis

  9. Implmentation

     9.1 Disques et Partitions
     9.2 Partitionnement
     9.3 Disques Multiples (
     9.4 Formatage
     9.5 Montage

  10. Maintenance

     10.1 Sauvegarde
     10.2 Dfragmentation
     10.3 Effacement
     10.4 Mises  jour

  11. Utilisation avance

     11.1 Paramtres du disque dur
     11.2 Paramtres du systme de fichiers
     11.3 Synchronisation des axes

  12. Pour plus d'information

     12.1 Forums
     12.2 Mailing lists
     12.3 HOWTO
     12.4 Mini-HOWTO
     12.5 Documentation locale
     12.6 Pages WWW
     12.7 Moteurs de recherche

  13. Comment obtenir de l'aide

  14. Remarques en guise de conclusion

     14.1 En prparation
     14.2 Demande d'information
     14.3 Suggestions pour participer  un projet.

  15. Questions / Rponses

  16. Bric--brac

     16.1 Combiner le
     16.2 Disques de
     16.3 Faut-il avoir ou non une partition de swap ?
     16.4 Points de montage et
     16.5 SCSI: numros et noms symboliques
     16.6 Consommation et Chaleur
     16.7 Dejanews
     16.8 Structure de la hirarchie des fichiers
     16.9 Numrotation des pistes et optimisation

  17. Appendice A: Partitionnement: points de montage et liens symboliques

  18. Appendice B: Partitionnement: emplacement des partitions

  19. Appendice C: Partitionnement: numrotation

  20. Appendice D: Exemple 1: serveur gnraliste

     20.1 Points de montage et liens
     20.2 emplacement des partitions
     20.3 Numrotation

  21. Appendice E: Exemple 2: serveur en milieu universitaire

  22. Appendice F: Exemple 3: SPARC Solaris

  23. Appendice G: Exemple 4: Serveur avec 4 disques

  24. Appendice H: Exemple 5: Avec 2 disques

  25. Appendice I: Exemple 6: Avec un seul disque



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Cette version a pour nom de code _T_h_e _n_e_w_e_r _G_e_n_e_r_a_t_i_o_n

  De nouveaux noms de code apparatront  mesure des changements pour
  indiquer l'tat du document.


  J'ai crit ce document principalement parce que j'ai hrit de trois
  vieux disques SCSI pour mettre en place mon systme Linux et je
  voulais savoir comment utiliser au mieux les capacits de paralllisme
  d'un systme SCSI. Et puis j'ai entendu dire qu'il y avait un prix
  pour les gens qui crivent des documents...

  Ce HOWTO est  lire en parallle avec le Linux Filesystem Structure
  Standard (FSSTND): en aucun cas il ne le remplace mais il explique o
  mettre physiquement les rpertoires dtaills dans le FSSTND en terme
  de disques, partitions, types, RAID, file system (fs), taille physique
  et autres. Cela aussi bien pour une machine Linux personnelle que pour
  un gros serveur Internet.
  La suite du FSSTND s'appelle Filesystem Hierarchy Standard (FHS) et
  couvre plus que Linux. FHS 2.0 est sorti mais certains dtails restent
   prciser et il faudra un certain temps avant que ce nouveau standard
  ait un impact sur les nouvelles distributions. Le FHS n'est encore
  utilis dans aucune distribution, mais Debian a annonc son intention
  de s'y conformer  partir de la version 2.1.

  (NdT: le FSSTND a t traduit en franais et est disponible 
  l'adresse suivante:  <http://www.freenix.fr/linux/fsstnd-fr/> et la
  traduction du FHS 2.0 est dans  <ftp://lirftp.insa-
  rouen.fr/pub/linux/french/docs/> )


  Il est galement conseill de lire le Guide d'Installation de Linux et
  si vous utilisez un PC, ce qui doit encore tre le cas de la majorit,
  vous pouvez trouver des informations plus prcises dans les FAQs du
  forum comp.sys.ibm.pc.hardware.

  C'est aussi une exprience pour moi d'crire ce HOWTO et j'espre
  qu'il voluera pour devenir plus dtaill et peut-tre mme plus
  correct.

  Avant tout quelques rappels lgaux. L'actualit a montr combien c'est
  important.


  11..11..  CCooppyyrriigghhtt


  Copyright 1998 Stein Gjoen.

  Linux est une marque dpose appartenant  Linus Torvalds.

  Toutes les marques et logos cites dans ce document sont dposes par
  leurs propritaires respectifs.

  Sauf indication contraire, les HOWTOs Linux sont sous le copyright de
  leur(s) auteur(s). Les HOWTOs Linux peuvent tre reproduits et
  distribus intgralement ou en partie, sur un support physique ou
  lectronique, pourvu que cette notice de Copyright figure sur chacune
  de copies. La distribution dans un cadre commercial est autorise et
  mme encourage; cependant, l'auteur apprcierait d'tre inform de
  l'existence de telles distributions.

  Toute traduction, modification ou incorporation de ce document 
  d'autres doit tre soumise  la notice de Copyright ci-dessus.
  C'est--dire qu'il est interdit de restreindre les conditions de
  distribution ni de ce document ni de tout document qui serait bas
  dessus ou l'utiliserait. Des exceptions  cette rgle peuvent tre
  consenties: consulter le coordinateur des HOWTOs Linux  l'adresse ci-
  dessous.

  Pour toutes questions contacter le coordinateur des HOWTOs Linux, Greg
  Hankins,  l'adresse lectronique linux-howto@sunsite.unc.edu.


  11..22..  AAvveerrttiisssseemmeenntt


  Je dcline toute responsabilit au sujet du contenu de ce HOWTO.
  Utilisez les concepts, les exemples et les trucs  vos risques et
  prils.

  Les marques cites dans ce document sont dposes par leurs
  propritaires respectifs.

  Enfin, vous tes expressment invits  faire une sauvegarde de tout
  votre systme avant tout grand changement et  intervalles rguliers.


  11..33..  NNoouuvveeaauuttss


  Ce HOWTO a maintenant un index et utilise les SGMLtools 1.0.5. Il ne
  sera donc pas format correctement avec une version antrieure.

  La nouveaut la plus rcente est la section sur le formatage d'un
  disque unique, tant donn que les disques de 8 Go deviennent
  abordables. On donne aussi des exemples de configuration RAID
  avances. Les gens s'intressent de plus en plus au VFAT32 et il y a
  des additions concernant ce systme de fichiers.

  Le FHS 2.0 est sorti mais aucune distribution ne s'y conforme: lorsque
  cela arrivera, ce HOWTO changera un peu. Pour l'instant il suit le
  FSSNTD.

  A propos de ce HOWTO justement, j'ai enlev le prfixe "mini" qui
  commenait  devenir comique vu sa taille. En fait ce document est si
  gros que j'ai d inclure un plan de lecture comme certains lecteurs me
  l'ont demand.

  Un ajout rcent est la section sur la meilleure manire d'obtenir de
  l'aide face  un problme que vous n'arrivez pas  rsoudre, ainsi que
  d'autres suggestions pour la maintenance. Cette section migrera
  bientt vers un autre HOWTO.

  A cause des quantits de Spams j'ai d truquer toutes les adresses
  lectroniques de ce document pour chapper aux robots des spammeurs
  qui scannent Internet  la recherche d'adresses  rajouter dans leurs
  listes. Pour m'crire il faut remplacer les  (at)  par le symbole @

  Un certain nombre de pointeurs vers des mailing lists ont t ajouts.

  Depuis la version 0.14 il y a eu trop de changements pour les numrer
  ici. J'ai reu beaucoup de remarques et un patch important de kris
  (at) koentopp.de qui ajoutait de nombreux dtails. En fait ce document
  a grandi au-del de mes prvisions.

  Je suis aussi pass en Debian 1.3 et j'ai remplac les valeurs
  d'espace disque de ma vielle Slackware en consquence. J'utiliserai la
  Debian comme base pour les discussions et les exemples, mais ce HOWTO
  s'applique aussi bien  d'autres distributions ou  d'autres systmes
  d'exploitation. Au moment o j'cris la Debian 2.0 est sortie en
  version bta et elle sera utilise pour les versions futures de ce
  document.

  Les nouveaux systmes de fichiers, journaliss,  hritage, ou
  optimiss pour fichiers  taille variable (comme les fichiers de log)
  bnficient d'un nouvel intrt dans les forums de comp.os.linux.
  Restez  l'coute pour les mises  jour. Le vieux programme de
  dfragmentation pour ext2fs est en cure de rajeunissement et il y a
  toujours du travail sur la compression.

  La dernire version (en anglais) de de ce document peut tre connue
  avec la commande finger <finger:sgjoen@nox.nyx.net> sur mon compte
  Nyx.

  On la trouve aussi sur ma page Web: The Multi Disk System Tuning HOWTO
  Homepage <http://www.nyx.net/~sgjoen/disk.html>.

  La dernire version traduite en franais est sur Freenix
  <http://www.freenix.org/>.
  Ce HOWTO est disponible en plusieurs formats: SGML, HTML, PostScript
  ou texte simple.

  La traduction franaise que vous lisez est due  Patrick Loiseleur
  (courrier: loisel (at) lri.fr) et c'est  lui qu'il faut envoyer
  commentaires, remarques sur la traduction elle-mme.


  11..44..  RReemmeerrcciieemmeennttss

  J'ai le plaisir de remercier les personnes suivantes qui ont contribu
   ce HOWTO:




       ronnej (at ) ucs.orst.edu
       cm (at) kukuruz.ping.at
       armbru (at) pond.sub.org
       R.P.Blake (at) open.ac.uk
       neuffer (at) goofy.zdv.Uni-Mainz.de
       sjmudd (at) redestb.es
       nat (at) nataa.fr.eu.org
       sundbyk (at) horten.geco-prakla.slb.com
       gjoen (at) sn.no
       mike (at) i-Connect.Net
       roth (at) uiuc.edu
       phall (at) ilap.com
       szaka (at) mirror.cc.u-szeged.hu
       CMckeon (at) swcp.com
       kris (at) koentopp.de
       edick (at) idcomm.com
       pot (at) fly.cnuce.cnr.it
       earl (at) sbox.tu-graz.ac.at
       ebacon (at) oanet.com
       vax (at) linkdead.paranoia.com
       tschenk (at) theoffice.net
       pjfarley (at) dorsai.org
       jean (at) stat.ubc.ca
       johnf (at) whitsunday.net.au





  Des remerciements spciaux vont  nakano (at) apm.seikei.ac.jp pour
  avoir fait la traduction japonaise <http://jf.linux.or.jp/JF/JF-
  ftp/other-formats/Disk-HOWTO/html/Disk-HOWTO.html>, contribu au
  document et donn un exemple de serveur en milieu acadmique qui est
  inclus  la fin de ce document.

  Si j'ai oubli quelqu'un, faites-le moi savoir.  Ils ne sont pas si
  nombreux, donc lisez attentivement ce document, contribuez  son
  laboration et rejoignez l'lite !

  Un nouveaut dans ce document est un appendice avec quelques tables
  que vous pouvez remplir pour simplifier l'laboration.

  Tous commentaires et suggestions (en anglais !)  peuvent tres envoys
   mon adresse: sgjoen@nyx.net.

  Et maintenant, allons-y !




  22..  OOrrggaanniissaattiioonn ddee ccee ddooccuummeenntt

  Les HOWTOS sont plus des documents pdagogiques que des manuels de
  rfrence. On prsentera donc les choses plutt comme des des
  problmes  rsoudre et leurs solutions que comme un cours sur la
  structure des disques durs. Cependant une introduction sur la manire
  dont un disque dur fonctionne est indispensable.


  22..11..  SSttrruuccttuurree llooggiiqquuee

  Elle est base sur un empilement de couches avec au sommet le systme
  de fichiers tel que les applications l'utilisent et tout en bas la
  couche physique.



               _____________________________________________________________
               |__     Fichiers, rpertoires   ( /usr /tmp etc)          __|
               |__     Systme de fichiers     (ext2fs, vfat etc)        __|
               |__     Gestion du volume       (AFS)                     __|
               |__     RAID, concatnation     (md)                      __|
               |__     Pilote de priphrique  (SCSI, IDE etc)           __|
               |__     Contrleur              (chipset, carte)          __|
               |__     Connection              (cable, rseau)           __|
               |__     Disque                  (magntique, optique etc) __|
               -------------------------------------------------------------




  Dans le diagramme ci-dessus la gestion de volume, le mode RAID et la
  concatnation sont optionnels. Les trois derniers niveaux sont
  matriels et les autres logiciels. Chaque niveau sera amplement
  dtaill ci-dessous.


  22..22..  SSttrruuccttuurree dduu ddooccuummeenntt

  La plupart des utilisateurs partent avec un certain matriel et ont
  des une certaine ide de ce qu'ils veulent faire et de la taille de
  leur systme. Ce sera mon plan: nous parlerons d'abord du matriel,
  puis des contraintes de mise en place et je dtaillerai ma faon de
  faire. Elle a bien march chez moi aussi bien que pour des serveurs
  rseau au travail ou en milieu acadmique comme me l'a rapport mon
  collgue japonais.

  Enfin je donnerai certaines tables de valeurs destines  vous guider
  dans la mise en place de votre machine. Comme je l'ai dj dit, tous
  les commentaires sont les bienvenus.


  22..33..  PPllaann ddee lleeccttuurree

  Bien que n'tant pas le plus gros ce HOWTO est dj bien gros et on
  m'a demand un plan de lecture pour permettre de le lire en diagonale.
  CHoisissez selon votre niveau:


     EExxppeerrtt
        Si vous connaissez bien Linux et les technologies des disques
        durs, consultez seulement les tables en appendice.
        Eventuellement vous pouvez lire les Questions/Rponses et le
        chapitre ``Bric  Brac''


     EExxpprriimmeenntt
        Si vous connaissez bien les ordinateurs allez directement au
        chapitre ``technologies'' et poursuivez.


     DDbbuuttaanntt
        Dsol. Vous devrez tout lire. En plus je vous recommande les
        autres HOWTOs concernant les disques.



  33..  TTeecchhnnoollooggiieess ddee ddiissqquueess dduurrss

  Une discussion trs complte sur les technologies des disques durs
  pour compatibles PC se trouve : The Enhanced IDE/Fast-ATA FAQ
  <http://thef-nym.sci.kun.nl/~pieterh/storage.html> Elle est aussi
  rgulirement poste dans les forums Usenet.  On ne prsentera ici que
  ce qui est indispensable  la comprhension de la suite.


  33..11..  DDiissqquuee

  C'est l'appareil o vos donnes sont physiquement enregistres, et
  bien que le systme d'exploitation peut les rendre similaires 
  l'usage, il en existe des types trs diffrents. On ne parlera pas des
  disquettes, sauf dans une prochaine version si beaucoup de monde le
  rclame.


  33..22..  GGoommttrriiee

  Un disque dur est constitu d'un ou plusieurs plateaux tournants qui
  contiennent des donnes lues et crites par des capteurs.  Les
  capteurs sont fixes les uns par rapport aux autres et les transferts
  de donnes ont donc lieu en mme temps sur tout les plateaux, ce qui
  dfinit un cylindre de pistes. Le disque est aussi divis en secteurs.

  On spcifie la gomtrie d'un disque avec trois nombres: le nombre de
  Cylindres, de Ttes et de Secteurs. En anglais CHS pour cylinders,
  heads, and sectors.

  Il y un certain nombre de conversions entre:

    le CHS physique

    le CHS logique que le disque dclare au BIOS

    le CHS logique utilis par le systme d'exploitation

  En pratique c'est une source de confusion importante.  Voir le _L_a_r_g_e
  _D_i_s_k _m_i_n_i_-_H_O_W_T_O


  33..33..  MMddiiaa

  La technologie du mdium employ dtermine des paramtres importants
  comme le taux de lecture/criture, le temps moyen d'accs, la capacit
  et le fait d'tre en lecture seule ou non.


  33..33..11..  DDiissqquueess mmaaggnnttiiqquueess

  C'est le mdium le plus courant pour la mmoire de masse.
  Habituellement c'est la technologie la plus rapide et elle est en
  lecture/criture.  Le plateau tourne avec une vitesse angulaire
  constante (CAV) avec une densit physique des secteurs variable. Le
  nombre de bits par unit de longueur reste constant tandis que le
  nombre de secteurs logiques par piste varie.

  Des valeurs typiques de vitesse angulaire sont 4500 et 5400 tr/min,
  mais on trouve aussi 7200 et des disques  10000 tr/min ont fait
  rcemment leur apparition sur le march. Le temps d'accs est
  d'environ 10 ms et les taux de transferts entre 4 et 40 Mo/s.  Il faut
  se rappeler que les disques les plus rapides sont aussi ceux qui
  consomment le plus d'lectricit et chauffent le plus. Voir ``Chaleur
  et Consommation d'nergie''  ce sujet.

  Notez bien qu'il y a plusieurs types de transferts qui sont mesurs
  avec des units diffrentes. Le premier est le taux de transfert du
  plateau vers la mmoire cache du disque, mesur en Mbit/s, qui vaut
  entre 50 et 250 Mb/s. Le second est entre le cache et l'adaptateur, il
  est mesur en Moctets/s et vaut entre 3 et 40 Mo/s. (rappel: un octet
  = 1 B = 8 bits = 8 b)


  33..33..22..  DDiissqquueess ooppttiiqquueess

  Des disques optiques en lecture/criture existent mais ils sont lents
  et peu rpandus. Ils taient utiliss dans les machines NeXT mais trs
  critiqus pour leur faible vitesse. Celle-ci est due  la nature
  thermique du changement de phase qui matrialise l'enregistrement de
  donnes. Mme avec des lasers assez puissants, les changements de
  phase sont plus lents qu'avec un champ magntique.

  Les cdroms aussi sont de technologie optique, mais comme leur nom
  (ROM = Read Only Memory) l'indique, ils sont en lecture seule. Leur
  capacit est d'environ 650 Mo, et le dbit peut atteindre 1,5 Mo/s.
  Les donnes sont sur une seule piste en spirale, on ne peut donc pas
  vraiment parler de gomtrie pour ces disques. La densit des donnes
  est constante donc le lecteur utilise une vitesse linaire constante
  (CLV). Le temps d'accs est aussi plus lent, environ 100 ms, en partie
   cause de la piste en spirale. Les lecteurs rcents utilisent des
  vitesses angulaires constantes (CAV)  certains endroits du disque:
  cette technologie mixte CAV/CLV augmente le dbit et rduit le temps
  d'accs car il y a moins besoin d'acclrer et de ralentir la vitesse
  angulaire (pour garder une vitesse linaire constante).

  Un nouveau type de disque semblable au cdrom (le DVD) permettra
  jusqu' 18 Go de stockage.


  33..33..33..  DDiissqquueess  ttaattss ssoolliiddeess

  Cette technologie rcente est surtout utilise dans les portables et
  les systmes embarqus. Ne contenant aucune partie mobiles ils sont
  trs rapides pour le taux de transfert comme pour le temps d'accs.
  Le type le plus courant est la mmoire vive "flashable" (flash-RAM)
  mais d'autre types de mmoire vive sont aussi utiliss. Il y a
  quelques annes de grands espoirs se sont ports sur la mmoire 
  bulles magntiques mais elle s'est avre chre et pas pratique.

  En gnral les disques de mmoire vive sont une mauvaise ide: mieux
  vaut mettre beaucoup de mmoire sur la carte mre et laisser le
  systme d'exploitation la diviser en fichiers, cache, zone de
  programmes et de donnes. Les disques de mmoire vive sont utiles
  seulement pour des usages trs spcifiques, comme des systmes temps
  rel avec des dlais trs courts.

  La mmoire flash est aujourd'hui disponible par dizaines de Mo et on
  pourrait tre tent de l'utiliser pour un stockage temporaire rapide
  des donnes. Mais il y a un os: on ne peut crire sur de la mmoire
  flash qu'un nombre assez limit de fois. Mettre swap, /tmp ou /var/tmp
  sur un priphrique de ce genre rduirait drastiquement sa dure de
  vie. En revanche il peut tre intressant d'utiliser de la mmoire
  flash pour des donnes lues souvent et crites peu souvent.

  Pour augmenter la dure de vie il faudra des pilotes spciaux qui
  minimisent le nombre de fois o on doit effacer un bloc mmoire.

  Cet exemple montre bien l'intrt qu'il y a  sparer l'arborescence
  des fichiers entre plusieurs priphriques.

  Les lecteurs  tat solide n'ont pas d'adressage pas
  cylindre/tte/secteur mais cette gomtrie est simule par le pilote:
  ainsi de l'extrieur ils se comportent exactement comme un disque dur.


  33..44..  IInntteerrffaacceess

  Il y a une plthore d'interfaces dans une gamme de prix trs tendue.
  La plupart des cartes-mres comprennent une interface IDE ou mieux, la
  puce Triton d'Intel sur bus PCI qui est trs rpandue aujourd'hui.
  Beaucoup de cartes-mres ont aussi une puce d'interface SCSI fabrique
  par Symbios (nouveau nom de NCR) et directement connecte au bus PCI.
  Vrifiez ce que vous avec et ce que le BIOS de voter carte-mre
  supporte.


  33..44..11..  MMFFMM eett RRLLLL

  Il fut un temps o c'tait la technologie incontournable, un temps o
  20 Mo c'tait le bout du Monde. Ces interfaces dinausoresques sont
  d'un lenteur comique compar  ce qui se fait aujourd'hui. Linux les
  supporte mais vous seriez bien avis de vous demander ce que vous
  voulez mettre dessus. On peut bien sr penser qu'une partition de
  secours avec un DOS potable dessus est toujours utile.


  33..44..22..  EESSDDII

  En fait, ESDI est une adaptation de l'interface SMD, trs utilise sur
  les "gros" ordinateurs, avec le cblage de l'interface ST506, plus
  pratique que les 60 + 26 broches du connecteur SMD. L'interface ST506
  tait trs nulle et dpendait compltement du contrleur et du
  processeur pour faire les calculs de tte/cylindre/secteur et garder
  une trace de la position de la tte, etc. L'interface ST506 exigeait
  du contrleur qu'il gre de faon dtaille les paramtres physique du
  lecteur et le formatage des pistes, bit par bit. Ce genre d'interface
  a vcu 10 ans si on compte les variantes MFM, RLL, ERLL et ARLL. ESDI,
  d'un autre ct, tait "intelligente": le contrleur avait souvent
  trois ou quatre puces pour un seul disque, et il y avait un langage de
  haut niveau pour formater une piste, rechercher et transfrer des
  donnes. ESDI permettait d'utiliser une densit d'enregistrement
  variable, ou beaucoup d'autres choses. Bien que pas mal de techniques
  de ESDI aient t incorpores  IDE, c'est SCSI qui a progressivement
  dtrn ESDI.


  33..44..33..  IIDDEE eett AATTAA

  Avec les progrs de la miniaturisation, les contrleurs, autrefois sur
  une carte ISA, ont t intgrs au disque et IDE (Integrated Drive
  Electronics) tait n. C'tait simple, pas cher et assez rapide, si
  bien que les concepteurs du BIOS ont fix une de ces limitations
  arbitraires dont l'informatique est pleine. Avec 16 ttes et 1024
  secteurs, la capacit fut limite  504 Mo. Dans la plus pure
  tradition de l'industrie informatique, cette limitation a t ensuite
  contourne par des bidouilles infmes dans le BIOS. En clair, vous
  devez lire trs attentivement la documentation de votre BIOS pour
  savoir de quand il date et quelle taille de disque il autorise.
  Heureusement avec Linux vous pouvez spcifier directement au noyau
  (donc sans avoir besoin de passer par le BIOS) les paramtres (CHS) du
  disque. La documentation de Lilo et de Loadlin dtaille comment le
  faire. IDE est synonyme d'ATA, AT Attachements. IDE utilise un
  programmes d'entres-sorties (_P_I_O_-_m_o_d_e) trs gourmand en temps de
  calcul qui monopolise le processeur principal. Le taux de transfert
  optimal (thorique) est de 8,3 Mo/s. IDE ne permet pas l'accs direct
   la mmoire (DMA)


  33..44..44..  EEIIDDEE,, FFaasstt--AATTAA eett AATTAA--22

  Ces trois termes sont  peu prs quivalents. fast-ATA et ATA-2 sont
  synonymes, mais EIDE comprend ATAPI. ATA-2 est ce qu'il y a de mieux
  actuellement, car plus rapide et autorisant l'accs direct  la
  mmoire (DMA). Le taux de transfert maximal est 16,6 Mo/s.


  33..44..55..  UUllttrraa--AATTAA ((oouu UUllttrraa--DDMMAA))

  Ce nouveau mode DMA est  peu prs deux fois plus rapide que l'EIDE
  PIO-Mode 4. Deux disques avec et sans l'Ultra-DMA peuvent tre mis sur
  la mme nappe sans pnalit pour le plus rapide. L'interface Ultra-DMA
  est compatible au plus bas niveau (au niveau lectrique) au Fast-ATA,
  y compris pour la longueur minimale des nappes.


  33..44..66..  AATTAAPPII

  ATAPI signifie _A_T_A _P_a_c_k_e_t _I_n_t_e_r_f_a_c_e et a t conu mettre des cdroms
  sur une interface IDE. Comme l'IDE, il est simple et pas cher.


  33..44..77..  SSCCSSII

  SCSI signifie _S_m_a_l_l _C_o_m_p_u_t_e_r _S_y_s_t_e_m _I_n_t_e_r_f_a_c_e et c'est une interface
  gnrique qu'on peut utiliser pour brancher des disques, des plateaux
  de disques, des imprimantes, des scanners, des graveurs de cdroms,
  ...  Le nom est mal choisi dans la mesure o c'est utilis dans les PC
  haut de gamme et les stations. Elle convient aux environnements multi-
  tche.

  L'interface standard a 8 bits de large et peut grer 8 priphriques.
  L'interface _w_i_d_e_-_S_C_S_I a 16 bits de large (elle est donc deux fois plus
  rapide  la mme frquence) et peut grer 16 priphriques. La carte
  SCSI est toujours compte comme un priphrique, habituellement avec
  le numro 7 (les autres tant numrots de 0  6). Le SCSI 32 bits
  existe aussi mais il demande en gnral un ensemble de cbles doubles.

  L'ancien standard faisait 5 Mo/s et le nouveau (_f_a_s_t_-_S_C_S_I) 10 Mo/s.
  L'_u_l_t_r_a_-_S_C_S_I, connu aussi sous le nom de _f_a_s_t _2_0, ralise 20 Mo/s sur
  un bus 8 bits. Des voltages plus bas (LVD, pour _L_o_w _V_o_l_t_a_g_e
  _D_i_f_f_e_r_e_n_t_i_a_l) permettent d'atteindre de plus grandes vitesses et
  d'utiliser des cbles plus longs.

  Le SCSI est plus rapide, mais plus cher que l'(E)IDE. On ne saurait
  assez insister sur l'importance de la terminaison et la qualit des
  cbles. Les disques SCSI sont aussi en gnral de meilleure qualit
  que les disques IDE. Souvent on peut les brancher et les dbrancher "
  chaud" (sans couper l'alimentation), ce qui est surtout utile si on a
  plusieurs ordinateurs (pour pouvoir transporter les disques d'un
  ordinateur  un autre).


  Parmi les documents  consulter sur le SCSI, le SCSI-HOWTO et la Foire
  Aux Questions (FAQ) SCSI sont vivement recommands.

  Un autre avantage du SCSI est qu'on peut connecter facilement des
  lecteurs de DAT pour sauvegarder des donnes, ainsi que certaines
  imprimantes ou scanners. Il est mme possible de l'utiliser comme un
  rseau ultra-rapide entre ordinateurs qui partagent des priphrique
  SCSI. C'est cependant non-trivial en particulier pour assurer la
  cohrence de la mmoire tampon des deux cartes SCSI.


  33..55..  CCbblleess eett nnaappppeess


  Ce n'est pas un cours de hardware mais certaines informations sur les
  cbles sont ncessaires. Cette pice si simple de l'quipement est
  souvent la cause de bien des problmes. Aux vitesses actuelles il faut
  tenir compte de son impdance, et sans un minimum de prcautions on
  risque des dysfonctionnement ou bien la panne complte. Certains
  adaptateurs SCSI sont plus sensibles que d'autres  la qualit des
  cbles.

  Les cbles blinds sont bien sr meilleurs (ils sont protgs des
  interfrences lectromagntiques) mais beaucoup plus chers.  Avec un
  peu d'habilet vous obtiendrez de bon rsultats sur un cble non
  blind.


    Pour le Fast-ATA et l'Ultra-ATA, la longueur maximale de la nappe
     est 45 cm. Les nappes des deux ports IDE sont souvent connectes,
     donc elle comptent pour _u_n _s_e_u_l cble. Dans tous les cas les nappes
     IDE doivent tre aussi courtes que possible. Si vous avez des
     plantages incomprhensibles ou des changements spontans de
     donnes, examinez votre cblage. Essayer un mode PIO moins lev
     (entre 1 et 4) ou dconnectez la seconde nappe si le problme
     persiste.

    Utilisez le moins de cble possible, mais n'oubliez pas la
     sparation de 30cm minimum entre deux priphriques ultra SCSI.

    vitez les empilements entre la nappe et le disque, branchez la
     prise de la nappe directement sur le disque.

    Utilisez la bonne terminaison pour les priphriques SCSI et  la
     bonne position, c'est--dire aux deux extrmits de la chane SCSI.
     Souvenez-vous que l'adaptateur peut avoir une auto-terminaison:
     dans ce cas, il suffit de vrifier que l'autre extrmit est bien
     termine.

    Ne mlangez pas les cbles blinds et non blinds, n'enroulez pas
     les cbles autour du mtal, vitez de placer les cbles trop prs
     des parties mtalliques. Cela peut crer des diffrences
     d'impdance qui  leur tour entranent la rflexion des signaux et
     augmentent le bruit sur le cble. Avec des contrleurs multi-canaux
     le problme se pose de faon plus aigu encore. On peut essayer de
     mettre du plastique autour des cbles pour viter une trop grande
     proximit avec les lments mtalliques.


  33..66..  AAddaappttaatteeuurrss

  C'est l'autre extrmit de l'interface du disque, la partie connecte
   un bus de la carte-mre. La vitesse du bus doit tre assez leve
  pour ne pas tre une limitation par rapport  celle du disque.  Mettre
  une range de disques RAID-0 sur une carde ISA serait du gchis (car
  le bus ISA est trop lent). La plupart des machines actuelles ont un
  bus PCI 32 bits avec un dbit de 132 Mo/s: dans un proche futur au
  moins, la vitesse du bus ne sera pas un facteur limitant sur ces
  machines.

  Comme l'lectronique a migr vers l'intrieur des disques, ce qui
  reste et qui constitue l'interface E(IDE) est ridiculement petit:
  souvent c'est intgr au contrleur du bus PCI. Un adaptateur SCSI est
  plus complexe et comprend souvent un petit processeur: il est donc
  plus cher et n'est pas inclus dans le contrleur PCI.  En
  contrepartie, il dcharge le processeur de certains calculs lors des
  accs disque.

  Certains adaptateurs SCSI comportent mme une mmoire cache et de
  l'intelligence pour anticiper les dcisions du systme d'exploitation.
  Mais le rsultat dpend fortement du systme d'exploitation utilis.
  Linux a de son ct tant d'optimisations que le gain est souvent assez
  faible.

  Mike Neuffer, qui a crit les pilotes pour les contrleurs DPT, assure
  que ces contrleurs sont assez intelligents pour obtenir d'excellentes
  perfomances pourvu qu'ils aient suffisament de mmoire cache, et que
  les gens qui n'ont pas obtenu de gain de perfomances significatif avec
  des contrleurs plus labors n'utilisent pas assez bien le
  contrleur.


  33..77..  SSyyssttmmeess mmuullttii--ccaannaauuxx

  Pour augmenter les performances globales il faut identifier les
  facteurs limitants et les liminer. Dans certains cas, avec un grand
  nombre de disques connects, il est intressant d'avoir plusieurs
  contrleurs travaillant en parallle, aussi bien pour le SCSI que pour
  l'IDE (les cartes mres ont souvent deux canaux IDE). Bien sr Linux
  sait en tirer profit.

  Certains contrleurs RAID offrent 2 ou 3 canaux et c'est intressant
  de rpartir la mmoire de masse entre plusieurs canaux. Autrement dit,
  avec deux disques SCSI que vous voulez RAID-er et un contrleur  deux
  canaux, placez un disque sur chaque canal.


  33..88..  SSyyssttmmeess mmuullttii--ccaarrtteess

  On peut avoir du SCSI et du IDE sur la mme machine, mais aussi
  plusieurs contrleurs SCSI. Vrifiez dans le SCSI-HOWTO quels
  contrleurs vous pouvez combiner. Sans doute vous devrez indiquer au
  noyau qu'il doit juste dtecter un contrleur au dmarrage (l'autre
  contrleur sera dtect et utilis plus tard). Voyez la documentation
  de Lilo et du SCSI pour plus de dtails.

  Les systmes  plusieurs contrleurs peuvent offrir un gain de vitesse
  apprciable si on configure bien les disques, spcialement en mode
  RAID0. Pour bien parallliser les disques et les contrleurs, ajoutez
  les disques dans le bon ordre pour le driver md. Si le contrleur 1
  est connect aux disques  sda et sdb et le contrleur 2 aux disques
  sdc et sdd, ajoutez les disques dans l'ordre sda - sdc - sdb - sdd,
  ainsi une lecture ou criture concernant plus d'un cluster se
  rpartira le plus souvent sur 2 contrleurs.

  La mme mthode s'applique aux disques IDE. La plupart des cartes-
  mres ont 4 ports IDE:


    hda matre primaire


    hdb esclave primaire

    hdc matre secondaire

    hdd esclave secondaire

  avec les deux disques primaires sur la mme nappe, et les deux disques
  secondaires sur l'autre nappe. Il faut donc les concatner dans
  l'ordre hda - hdc - hdb - hdd afin de parallliser au maximum selon
  les deux canaux.


  33..99..  CCoommppaarraattiiff ddee vviitteessssee

  Les tables suivantes donnent des vitesses indicatives (rappel: il
  s'agit de vitesses _t_h__o_r_i_q_u_e_s maximales).


  33..99..11..  CCoonnttrrlleeuurrss



       IDE             :       8.3 - 16.7
       Ultra-ATA       :       33

       SCSI            :
                               Largeur du bus (bits)

       Vitesse du Bus (MHz)    |        8      16      32
       --------------------------------------------------
        5                      |        5      10      20
       10  (fast)              |       10      20      40
       20  (fast-20 / ultra)   |       20      40      80
       40  (fast-40 / ultra-2) |       40      80      --
       --------------------------------------------------






  33..99..22..  TTyyppeess ddee bbuuss




       ISA             :       8-12
       EISA            :       33
       VESA            :       40    (Parfois pouss  50)

       PCI
                               Largeur de bus (bits)

       Vitesse du Bus (MHz)    |       32      64
       --------------------------------------------------
       33                      |       132     264
       66                      |       264     528
       --------------------------------------------------








  33..1100..  JJeeuuxx ddee tteessttss ((BBeenncchhmmaarrkkss))

  C'est un sujet trs, trs dlicat et je ne m'engagerai que trs
  prudemment sur ce terrain min. Il est trs difficile de faire des
  tests comparables et significatifs.  Mais que a ne dcourage pas ceux
  qui voudront essayer ...

  On peut utiliser les benchmarks pour un diagnostic du systme, pour
  voir s'il est aussi rapide qu'il le devrait tant donn ses
  composantes. Ainsi en passant d'un systme de fichiers tout simple au
  RAID, vous attendrez une acclration significative, donc une perte de
  performances vous informera que quelque chose dco^H^H^H^H ne va pas.

  N'essayez pas de bricoler votre propre jeu de test, utilisez plutt
  iozone et bonnie, et lisez la documentation trs attentivement. Plus
  d'info dans la prochaine version du HOWTO.


  33..1111..  CCoommppaarraaiissoonnss

  Le SCSI offre de meilleures performances que l'EIDE, mais cela se
  paye. La terminaison est plus complexe mais rajouter un disque n'est
  pas trs difficile. Avoir plus de 4 (plus de 2 dans certains cas)
  disques IDE peut tre compliqu, alors que le wide-SCSI supporte
  jusqu' 15 disques par adaptateur (plus encore pour les contrleurs
  multi-canaux).

  Vous avez besoin d'un IRQ par contrleur SCSI, chaque contrleur
  pouvant grer jusqu' 15 disques. En revanche, vous avez besoin d'un
  IRQ par disque IDE, ce qui peut gnrer des conflits.

  RLL et MFM sont trop vieux, lents et malpratiques pour tre d'un
  utilit quelconque.


  33..1122..  PPeerrssppeeccttiivveess


  Le SCSI-3 est en prparation. Des disques plus rapides sont annoncs,
  et rcemment un spcification monstre  80 Mo/s sur un bus de 16 bits
  a t propose.

  Certains constructeurs ont annonc des matriels SCSI-3 mais c'est
  prmatur car le standard n'est pas encore publi. Le point de
  saturation du bus PCI se rapproche. Actuellement la limite du bus PCI
  64 bits  33 MHz est 256 Mo/s, mais les futurs bus  66 MHz grimperont
   528 Mo/s.

  Une autre tendance est que l'espace disque est de plus en plus grand.
  On peut actuellement mettre 55 Go sur un seul disque, mais c'est
  encore assez cher. Le meilleur rapport espace/prix se situe autour de
  8 Go  et augmente continment. L'introduction du DVD aura un grand
  impact dans un futur proche, avec 20 Go sur un seul disque on peut
  envisager mme l'image intgrale des plus grands sites FTP. La seule
  chose certaine est que mme si les disques ne sont pas mieux, ils
  seront plus gros.

  Note: J'avais crit dans ce HOWTO que la vitesse maximale des cdroms
  tait 20x  cause de problmes de stabilit mcanique, mais peu aprs
  le premier cdrom 24x tait disponible ...  actuellement vous pouvez
  acheter un 40x et sans aucun doute des vitesses suprieures seront
  atteintes.




  33..1133..  RReeccoommmmaannddaattiioonnss

  A mon avis EIDE ou Utra-DMA est mieux pour commencer sur une machine
  personnelle, spcialement si vous utilisez MS-DOS. Si vous voulez
  tendre votre systme plus tard ou l'utiliser comme serveur, il est
  fortement recommand d'utiliser des disques SCSI. Actuellement le
  wide-SCSI est lgrement plus cher. Le SCSI standard a un bon rapport
  qualit-prix. Il existe un bus SCSI diffrentiel qui permet une plus
  grande longueur de cble, mais il est tellement plus cher qu'on ne
  doit pas le recommander aux utilisateurs normaux.

  En plus des disques vous pouvez ajouter des scanners et des
  imprimantes sur un bus SCSI.

  Gardez  l'esprit que toute extension de votre systme augmente la
  consommation d'lectricit, et assurez-vous que l'alimentation et le
  refroidissement restent suffisants. Beaucoup de disques SCSI ont une
  option de dmarrage en squence adapt aux grands systmes. Voir aussi
  ``Chaleur et Consommation''



  44..  CCoonnssiiddrraattiioonnss ddiivveerrsseess

  Avec le PC familial, un utilisateur rcemment converti  Linux
  cherchera surtout  obtenir les meilleures performances pour un
  matriel donn. Quelqu'un qui achte une machine pour un usage
  spcifique (comme un fournisseur d'accs  Internet) cherche au
  contraire  se procurer le matriel en fonction de ses besoins. Ce
  HOWTO couvre les deux situations.

  De manire gnrale, le mieux est d'avoir autant de disques que
  possible, mais on ne peut pas en rajouter indfiniment et le cot est
  aussi un facteur. A taille totale gale, plus il y a de partitions et
  de disques, plus la maintenance est complique.


  44..11..  UUssaaggee ddeess ssyyssttmmeess ddee ffiicchhiieerrss

  Les diffrentes parties du FSSTND n'ont pas les mmes exigences en
  terme de vitesse, de taille et de fiabilit. Casser la racine / est
  pnible mais peut tre facilement rpar, casser /var/spool/mail c'est
  une autre histoire. Voici un bref rsum des principales parties d'un
  systme de fichiers. Notez que c'est indicatif, qu'on peut trs bien
  avoir des binaires dans /etc ou /lib et des librairies dans bin, etc.


  44..11..11..  SSwwaapp

  (ndT: le swap est une partie du disque utilise pour prolonger la
  mmoire vive de la machine. Il se comporte donc exactement comme de la
  mmoire vive supplmentaire, mais en 1000 fois plus lent)

     VViitteessssee
        Maximum! Si toutefois vous dpendez trop du swap, achetez plus
        de mmoire vive. Attention au fait que sur la plupart des cartes
        mres le cache ne marchera pas au-del de 128 Mo.


     TTaaiillllee
        Entre 1 fois et 2 fois celle de la mmoire vive.  4 Mo + 4 Mo
        (mmoire + swap) suffisent pour un systme minimaliste et 16 Mo
        + 40 Mo permettent d'tre  l'aise.

        Attention  prendre en compte le type d'applications que vous
        utilisez. Pour faire du calcul formel ou du ray-traycing il se
        peut que 128 Mo de mmoire et autant de swap soient ncessaires.

        Autre raison de ne pas lsiner sur la taille du swap: certains
        programmes ne librent pas compltement la mmoire qu'ils ont
        alloue, causant ce qu'on appelle des fuites de mmoire. La
        mmoire n'est pas libre, mme quand le programme s'arrte.
        Lorsque la mmoire vive et le swap sont pleins, il n'y a plus
        qu' redmarrer. Heureusement ce genre de programmes est peu
        frquent, mais avoir beaucoup de swap vous donne de la marge.

        Certains programmes bloquent leurs pages en mmoire vive (on ne
        peut donc pas les swapper). Ce peut tre pour des raisons de
        scurit ou de performance (par exemple pour un systme temps
        rel). Bien sr de tels programmes, en occupant de la mmoire
        qui ne peut tre swappe, font que le systme commence 
        utiliser le swap plus tt que prvu.

        Le manuel de mkswap (man 8 mkswap) explique que chaque partition
        de swap ne doit pas excder 128 Mo sur une machine 32-bit et
        256Mo sur une machine 64-bit.


     FFiiaabbiilliitt
        Moyenne. En cas de problme vous le savez assez vite et vous
        pouvez perdre le travail en cours. Vous sauvegardez souvent,
        n'est-ce pas ?


     NNoottee 11
        Linux permet de btir un swap  cheval sur plusieurs disques.
        Taper man 8 swapon pour les dtails. Cepandant, un swap rparti
        sur plusieurs disques est souvent plus lent.

        L'entre dans le fichier /etc/fstab doit ressembler :


          /dev/sda1       swap            swap    pri=1           0       0
          /dev/sdc1       swap            swap    pri=1           0       0




     Le fichier fstab est _t_r__s sensible au formatage utilis, donc lisez
     attentivement la page de man et ne copie-pestez pas les lignes
     prcdentes.


     NNoottee 22
        Certains utilisent un disque de mmoire vive (RAM disk) comme
        mmoire swap. Mais comme l'usage du swap est d'augmenter la
        mmoire vive et qu'un RAM disk diminue la quantit de mmoire
        vive disponible (en particulier pour le cache disque), cette
        solution est  proscrire.


     NNoottee 22bbiiss
        Il y a une exception: sur un certain nombre de cartes-mres mal
        conues, le cache externe ne peut pas cacher toute la mmoire
        vive qui peut tre adresse. Ces cartes-mres peuvent supporter
        128 Mo, mais seuls les premiers 64 Mo bnficieront du cache.
        Dans ces conditions, les performances seront amliores si on
        utilise les 64 Mo restants comme un RAMdisk pour le swap ou le
        stockage temporaire.



  44..11..22..  SSttoocckkaaggee tteemmppoorraaiirree(( //ttmmpp  aanndd //vvaarr//ttmmpp ))


     VViitteessssee
        Trs leve. Sur un disque ou une partition spare, cela
        rduira la fragmentation, mais de toute faon ext2fs fragmente
        trs peu.


     TTaaiillllee
        Difficile  dire. A la maison quelques Mo suffisent mais sur un
        serveur, certains utilisateurs y stockent leurs fichiers de
        manire  chapper aux quotas et au contrle, et cette partition
        peut grandir dmesurment.  Disons donc: entre 8 et 32 Mo  la
        maison, 128 Mo pour un petit serveur et jusqu' 500 Mo (la
        machine utilis par l'auteur sert 1100 utilisateurs avec un
        rpertoire /tmp de 300 Mo). Gardez un oeil sur ces rpertoires,
        pour les fichiers cachs ou bien trop vieux. Attendez-vous un de
        ces jours  devoir retailler vos partitions  cause d'un /tmp
        trop petit.


     FFiiaabbiilliitt
        Faible. Souvent les programmes vitent de planter et produisent
        le bon message d'erreur quand ces rpertoires sont pleins ou
        provoquent une erreur. Des erreurs de fichiers alatoires sont
        bien srs plus srieuses, mais c'est le cas pour toutes les
        partitions !


     FFiicchhiieerrss
        Princicipalement de petits fichiers  dure de vie assez courte.
        Les programmes bien crits effacent leurs fichiers dans /tmp
        mais si une erreur survient  ce moment-l ils ne plantent pas,
        donc de "vieux" fichiers peuvent traner dans /tmp. Avec la
        plupart des distributions, on a la possibilit d'effacer tout le
        contenu de /tmp au dmarrage.


     NNoottee 11
        Dans le FSSTND il y a une note sur la possibilit de mettre /tmp
        dans un disque de mmoire vive.  Cependant, pour les mmes
        raisons que pour le swap, ce n'est pas recommand.  Comme a a
        dj t dit, n'utilisez pas de flash RAM pour ces rpertoires.
        Gardez en tte que les fichiers de /tmp sont effacs au
        redmarrage, avec certaines distributions.


     NNoottee 22
        Dans les vieux systmes on trouve un rpertoire /usr/tmp mais on
        recommande de ne pas l'utiliser. Pour les vieux programmes, on
        en a fait un lien symbolique vers les autres aires de stockage
        temporaire.


  44..11..33..  QQuueeuueess (( //vvaarr//ssppooooll//nneewwss  aanndd //vvaarr//ssppooooll//mmaaiill ))


     VViitteessssee
        Eleve, surtout pour les gros serveurs de news. Pour les queues
        d'impression: lente. Pour les news on peut envisager du RAID0.


     TTaaiillllee
        Pour les seveurs de news et de mail: dpend des besoins. Pour un
        seul utilisateur quelques Mo suffisent, si on ne part pas en
        vacances en tant abonn  10 mailing lists ... (La machine que
        j'utilise au travail a 100 Mo pour /var/spool tout entier)


     FFiiaabbiilliitt
        Mail: trs haute, news: moyenne, queue d'impression: basse. Si
        votre mail est trs important (mais n'est-ce pas le cas ?)
        songez  une solution RAID.


     FFiicchhiieerrss
        D'habitude un grand nombre de fichiers de quelques Ko, mais les
        fichiers d'une queue d'impression peuvent tre assez gros.


     NNoottee
        Certaines documentations des news suggrent de mettre tous les
        fichiers .overview dans un disque diffrent de celui des news.
        Voir les FAQs pour plus d'informations. La taille de ces
        fichiers est entre 3 et 10 pourcents du total.


  44..11..44..  RRppeerrttooiirreess uuttiilliissaatteeuurrss (( //hhoommee ))


     VViitteessssee
        Moyenne. Certains programmes (comme les client des news) font de
        frquentes mises  jour dans les rpertoires des utilisateurs,
        ce qui peut avoir une importance s'il y a beaucoup
        d'utilisateurs. Pour les petits systmes la vitesse n'est pas
        critique.


     TTaaiillllee
        A vous de voir ! Avec certains fournisseurs on paie selon la
        place disque, donc c'est une question de gros sous. De grands
        systmes comme nyx.net <http://www.nyx.net/> (service Internet
        gratuit avec le mail, les news et la Toile) marchent bien avec
        une taille suggre de 100 Ko par utilisateur et 300 Ko au grand
        maximum. Les fournisseurs commerciaux offrent autour de 5 Mo par
        utilisateur.

        Si vous crivez des livres ou si vous programmez, les besoins
        augmentent vite.


     FFiiaabbiilliitt
        Variable. Perdre /home sur un systme personnel est ennuyeux,
        mais recevoir 2000 coups de fils d'utilisateurs qui se plaignent
        que leur rpertoire a disparu est plus qu'ennuyeux. Pour
        certains c'est vital. Vous faites des sauvegardes rgulires,
        n'est-ce pas ?


     FFiicchhiieerrss
        A vous de voir. Le minimum des fichiers de dmarrage de chaque
        utilisateur est une douzaine de fichiers pour environ 5 Ko.


     NNoottee 11
        Vous pouvez envisager le RAID pour la vitesse ou la fiabilit.
        Si vous voulez une vitesse et une fiabilit extrme, vous
        devriez envisager une autre solution logicielle et matrielle
        (serveurs haut-de-gamme, systme avec tolrance aux pannes,
        etc).

     NNoottee 22
        Les brouteurs Web utilisent souvent un cache local qui peut
        prendre beaucoup de place et provoquer beaucoup d'activit
        disque. Il y a plusieurs moyens d'viter cela, voir
        ``Rpertoires Utilisateurs'' et ``WWW''.


     NNoottee 33
        La tendance naturelle des utilisateurs est d'utiliser au maximum
        l'espace disque qu'on leur alloue. Le systme de Quotas Linux
        permet de limiter le nombre de blocs et d'inodes qu'un seul
        utilisateur peut allouer par systme de fichiers. Voir le Linux
        Quota mini-HOWTO <http://www.freenix.fr/linux/HOWTO>



  44..11..55..

  EExxccuuttaabblleess (( //uussrr//bbiinn  eett //uussrr//llooccaall//bbiinn ))


     VViitteessssee
        Lente. La vitesse de chargement d'un binaire n'est pas critique,
        j'en veux pour tmoin les bonnes performances des systmes
        "live" sur un CDROM.


     TTaaiillllee
        200 Mo devraient suffire. Un serveur  usages multiples devrait
        peut-tre rserver 500 Mo pour anticiper la croissance.


     FFiiaabbiilliitt
        Basse. Les binaires essentiels sont en gnral dans /bin et
        /sbin. Si l'on perd tous les binaires, c'est pnible car il faut
        tout rinstaller, mais pas dramatique.


     FFiicchhiieerrss
        La plupart entre 10 et 100 Ko. Certains assez gros (emacs ...)


  44..11..66..  LLiibbrraaiirriieess (( //uussrr//lliibb  aanndd //uussrr//llooccaall//lliibb ))


     VViitteessssee
        Moyenne. On trouve l plein de choses, des fontes comme des
        librairies dynamiques. Souvent les fichiers sont chargs en
        entier et donc une vitesse suffisante est ncessaire.


     TTaaiillllee
        Variable. C'est l par exemple que les traitement de texte
        stockent leurs dizaines de mgas de fontes et d'exemples.  Le
        peu de personnes qui m'ont contact m'ont parl de 70 Mo, mais
        une installation Debian 1.2 complte peut prendre plus de 250
        Mo. Parmi les plus gros consommateurs de place disque: GCC,
        Emacs, TeX/LaTeX, X11 et perl.


     FFiiaabbiilliitt
        Basse. Comme pour les excutables.


     FFiicchhiieerrss
        Assez gros avec un odre de grandeur de 1 Mo.
     NNoottee
        Pour des raisons historiques certains programmes (comme GCC dans
        /usr/lib/gcc/lib) stockent des excutables dans les rpertoires
        de librairies.


  44..11..77..  RRaacciinnee (( // ))


     VViitteessssee
        Assez lent: il n'y a l que le minimum, et la plupart des
        programmes ne sont lancs qu'au dmarrage.


     TTaaiillllee
        Assez petit. Cepandant c'est une bonne ide de garder quelques
        fichiers et utilits de dpannage et plusieurs versions du
        noyau. 20 Mo devraient suffire.


     FFiiaabbiilliitt
        Eleve. Une panne de la racine peut tre relativement coteuse
        en temps et en cheveux arrachs. Avec de la pratique vous
        pourrez faire cela en un heure, mais si vous avez l'habitude de
        ce genre de choses c'est que quelque chose ne va pas.

        Naturellement, vous avez une disquette de secours ? Et vous
        l'avez mise  jour rgulirement ? Il y a des disquettes toutes
        faites et des utilitaires de cration de disquette de secours. Y
        passer un peu de temps peut vous pargner de devenit un expert
        en rparation de la partition racine.


     NNoottee 11
        Si vous avez plein de disques, pourquoi ne pas mettre une
        partition de boot de secours sur un disque physiquement
        diffrent de celui sur lequel vous dmarrez habituellement ? Le
        peu d'espace que a vous cotera sera amplement compens par le
        temps gagn en cas de panne.


     NNoottee 22
        Pour la simplicit comme pour le dpannage, il n'est pas
        recommand de mettre la partition racine sur un systme RAID
        niveau 0.  Si vous utilisez RAID pour votre partition racine, il
        faut mettre l'option md pour votre noyau de secours.


     NNoottee 33
        Pour dmarrer avec Lilo il est important que les fichiers
        essentiels au dmarrage rsident entirement dans les 1023
        premiers cylindres. Ce qui comprend le noyau et les fichiers du
        rpertoire /boot.


  44..11..88..  << DDOOSS,, eettcc..

  Au risque de paratre hrtique j'ai inclus ce paragraphe au sujet
  duquel beaucoup ont des raction vives.  Malheureusement pas mal de
  disques sont livrs avec des outils d'installation et de maintenance
  bas sur ces systmes et il faut en tenir compte.


     VViitteessssee
        Trs lente. Les systmes en question ne sont pas rputs pour
        leur vitesse donc il y a peu d'intrt  utiliser des disques
        dernier cri. Le multitche ou le multithread ne sont pas
        disponibles, donc les possibilits des disques SCSI ne sont pas
        pleinement exploites. Un vieux disque IDE devrait faire
        l'affaire. Notons que Windows 95 et NT supportent le multi-
        tches et devraient donc mieux profiter des caractristiques du
        SCSI.


     TTaaiillllee
        La compagnie qui produit ces systmes n'est pas rpute pour
        crire des programmes petits et optimiss, attendez-vous  y
        consacrer plusieurs dizaines de Mo. Avec une vieille version de
        DOS ou Windows a peut tenir dans 50 Mo.


     FFiiaabbiilliitt
        Ha-ha. Comme une chane a la force de son maillon le plus
        faible, vous pouvez utiliser un vieux disque. Comme l'OS est
        plus facilement susceptible de s'auto-dtruire que le disque,
        vous apprendrez sans doute ici l'importance des sauvegardes de
        secours.

        Dit autrement: "Votre mission, allez-vous l'accepter, est de
        garder cette partition en tat de servir. Cette mise en garde
        s'auto-dtruira dans 10 secondes ..."

        On m'a demand rcemment de justifier mes prises de positions
        dans ce paragraphe. D'abord je m'excuse mais je n'appelle pas
        DOS et Windows des systmes d'exploitation. Ensuite il y a des
        implications lgales  prendre en considration. Je ne donnerai
        au lecteur que quelques mots-cls: DOS 4.0, DOS 6.x et divers
        utilitaires de compression disque dont le nom devrait rester
        secret.


  44..22..  EExxpplliiccaattiioonn ddeess tteerrmmeess

  Bien sr le plus rapide est le mieux mais souvent le joyeux
  installateur de Linux a plusieurs disques de vitesse et de qualit
  variable. Bien sr ce document pour rester utile  tous doit tre
  gnral et ne saurait envisager tous les cas particuliers. Mme ainsi
  il y a quelques dtails  retenir:


  44..22..11..  VViitteessssee

  C'est un mlange de plusieurs termes: charge du processeur principal,
  temps de mise en place du transfert, temps d'accs et taux de
  transfert. Il n'y a pas d'optimum fix mais souvent le prix est le
  facteur dterminant. La charge processeur varie uniquement pour les
  disques IDE (car c'est le processeur principal qui pilote le disque),
  et pour les SCSI elle est toujours assez faible. Le temps d'accs est
  assez petit, quelques millisecondes. Il intervient assez peu si on
  utilise la queue des commandes SCSI, on peut alors lancer d'autres
  commandes pendant que les premires attendent leur rponse et le bus
  est occup tout le temps au mieux. Dans le cas des serveurs de news,
  qui ont un grand nombre de petits fichiers, le temps d'accs peut tre
  avoir plus d'influence sur la vitesse globale.

  Les deux principaux paramtres sont:


     TTeemmppss dd''aaccccss
        le temps moyen pris par la tte de lecture pour aller d'une
        position  une autre au hasard. Ce paramtre a plus d'importance
        s'il y a beaucoup de petits fichiers.  Il y a aussi un petit
        dlai avant que le secteur dsir tourne et se retrouve en face
        de la tte. Ce dlai est proportionnel  la vitesse angulaire.
        Des valeurs courantes de vitesse angulaire sont 4500, 5400 et
        7200 tours/min. Les disques tournant plus vite sont donc plus
        rapides, mais ils cotent plus chers, sont parfois bruyants et
        gnrent de la chaleur, paramtre qui compte si vous avez toute
        une range de disques. Avec les tous rcents disques  10000
        tours/min les besoins de refroidissement sont encore plus grands
        et des schmas d'aration minimale sont donns.


     TTaauuxx ddee ttrraannssffeerrtt
        En Mo/s.  paramtre est plus important si on a peu de grands
        fichiers. A densit gale, la vitesse de transfert est
        proportionnelle  la vitesse angulaire.

  Il est important de lire les spcifications des disques trs
  attentivement, et de noter que le taux de transfert maximum est donn
  comme le taux de transfert entre la mmoire cache du disque et la
  mmoire principale, et _p_a_s comme le taux de transfert moyen entre le
  disque et la mmoire principale.  Voir aussi ``Consommation et
  Chaleur''.


  44..22..22..  FFiiaabbiilliitt

  Bien sr personne ne voudrait d'un disque pas trs fiable. On ferait
  mieux de considrer les vieux disques comme non fiables. Pour le RAID
  il est suggr d'utiliser un ensemble de disques diffrents de telle
  sorte que les pannes simultanes soient moins probables.

  Autant que je sache, je n'ai connu qu'un cas d'un systme de fichiers
  totalement foutu, mais dans ce cas un matriel instable semblait la
  cause des problmes.

  Les disques ne sont pas chers de nos jours et les gens sous-estiment
  toujours la valeur du contenu de leurs disques durs. Si vous avez
  besoin de matriel fiable, remplacez vos vieux disques et gardez des
  roues de secours. Un disque peut marcher plus ou moins en continu
  pendant des annes, mais ce qui tue un disque c'est souvent en fin de
  compte les variations de tension.


  44..22..33..  FFiicchhiieerrss

  La taille moyenne des fichiers est importante pour dcider les bons
  paramtres du disque. Avec beaucoup de petits fichiers c'est le temps
  d'accs qui compte, et avec peu de gros fichiers c'est plutt le taux
  de transfert. La queue des commandes SCSI est trs bien adapte  la
  gestion de beaucoup de petits fichiers, tandis que pour le taux de
  transfert EIDE et SCSI sont  peu prs quivalents.


  44..33..  TTeecchhnnoollooggiieess

  Quelles sont les technologies disponibles et qu'est-ce que leur choix
  implique en terme de vitesse, fiabilit, consommation, flexibilit,
  facilit d'usage et complexit ?


  44..33..11..  RRAAIIDD

  C'est une mthode pour augmenter la fiabilit ou la vitesse ou les
  deux en utilisant plusieurs disques en parallle. Ainsi les temps
  d'accs et taux de transferts sont diminus. Avec des miroirs et des
  vrifications (checksums) on peut amliorer la fiabilit.  Ils sont un
  bon choix pour de gros serveurs mais pour un PC autant tuer une mouche
  au pistolet laser. Voir les documents et FAQs sur ce sujet.

  Avec Linux on peut utiliser un systme RAID soit logiciel (le module
  md du noyau) soit matriel avec un contrleur support, qu'il soit
  PCI-SCSI ou SCSI-SCSI. Une solution matrielle est plus rapide, mais
  bien sr plus chre.

  Les contrleurs SCSI-SCSI sont d'habitude raliss comme un ensemble
  de disques et un contrleur, communiquant entre eux par un second bus
  SCSI et qui se connectent au bus SCSI. De l'extrieur, l'ensemble se
  comporte comme un seul disque SCSI. Mais cette connexion au bus SCSI
  peut tre un facteur limitant pour les performances.  Un avantage
  significatif de ce genre de matriel est pour les gens qui ont de
  grands ensembles de disques durs: comme le nombre d'entres SCSI dans
  le rpertoire /dev est limit, cette solution permet d'utiliser
  plusieurs disques avec un seul fichier de priphrique.

  Les contrleurs PCI-SCSI, comme leur nom l'indique, sont connects au
  bus PCI qui est plus rapide qu'un bus SCSI. Ces contrleurs ont besoin
  de drivers spciaux mais ils offrent du coup la possibilit de
  configurer le RAID  travers le rseau, ce qui simplifie
  l'administration.

  Actuellement seules quelques familles de cartes PCI-SCSI sont
  supportes par Linux.



     DDPPTT
        Les plus anciens et les plus matures sont les contrleurs de DPT
        <http://www.dpt.com> parmi lesquels le SmartCache I/III/IV et le
        SmartRAID I/III/IV.  Ces contrleurs sont supports par le
        pilote EATA-DMA du noyau standard. Cette socit a aussi une
        page d'information <http://www.dpt.com> qui dcrit certains
        aspects des technologies RAID et SCSI en plus de l'information
        sur leurs produits.

        On peut consulter les page de l'auteur des pilotes pour
        contrleurs DPT sur SCSI <http://www.uni-mainz.de/~neuffer/scsi>
        et sur DPT <http://www.uni-mainz.de/~neuffer/scsi/dpt>.

        Ces contrleurs ne sont pas les plus rapides mais leur fiabilit
        n'est plus  prouver.


     IICCPP--VVoorrtteexx
        Trs rcemment des contrleurs de ICP-Vortex <http://www.icp-
        vortex.com> offrant jusqu' 5 canaux indpendants et un matriel
        trs rapide bas sur la puce i960. Le pilote a t crit par le
        fabricant lui-mme, qui prouve ainsi qu'il soutient Linux.


     DDAACC--996600
        Encore en bta-version. Plus d'information dans un futur proche.

  Les contrleurs SCSI-SCSI sont de petits ordinateurs, souvent avec une
  quantit apprciable de mmoire vive. Ils se prsentent du point de
  vue extrieur comme un disque norme, rapide et fiable. Ils n'ont donc
  pas besoin de pilote particulier (en plus de celui de la carte SCSI
  principale). Certains de ces contrleurs ont une option pour parler 
  plusieurs adresses simultanment. D'habitude ils sont configurs grce
   une interface ou  un mulateur de terminal vt100 connect  leur
  interface srie.


  Rcemment j'ai appris que Syred faisait aussi des contrleurs SCSI-
  SCSI supports par Linux. Je n'ai pas plus d'information mais on peut
  regarder sur leur site: www.syred.com <http://www.syred.com>

  Je ne donne ici qu'un rapide aperu du RAID qui a beaucoup de niveaux
  et de variantes. Le lecteur intress est invit  consulter la FAQ
  RAID.


    Le mode RAID _0 n'est pas redondant du tout mais offre le plus de
     vitesse. Les donnes sont rparties sur plusieurs disques et les
     oprations de lecture/criture se font en parallle. D'un autre
     ct, si un disque a une panne tout est fichu. Ai-je dj mentionn
     les sauvegardes ?

    Le mode RAID _1. C'est la mthode la plus primitive pour obtenir de
     la redondance: les donnes sont copies sur chaque disque. C'est
     bien sr un immense gchis mais on a un grand avantage: un temps
     moyen d'accs trs court. En effet les ordre de lecture sont
     envoys  tous les disques et c'est le premier  rpondre qui
     gagne. Le taux de transfert n'est pas significativement plus lev
     qu'avec un seul disque, mais en lisant une piste diffrente sur
     chaque disque on peut parfois gagner du temps.

     Si vous n'avez que 2 disques c'est la seule faon d'avoir de la
     redondance.

    Les modes RAID _2 et _4 ne sont pas trs courants et on n'en parlera
     pas ici.

    Le mode RAID _3 utilise plusieurs disques (au moins 2) pour mettre
     des donnes rparties comme en RAID 0. Il utilise aussi des disques
     redondants pour stocker le OU exclusif des donnes des disques de
     donnes. Si le disque redondant tombe en panne, le systme peut
     continuer  fonctionner sans problme. Si c'est un disque de
     donnes qui crashe, le systme peut rcuprer les donnes  partir
     des disques redondants et des autres. Une panne double met le
     systme hors-service.

     Le mode RAID 3 ne fait du sens qu'avec au moins 2 disques de
     donnes et un pour la redondance. Il n'y a pas de limite thorique,
     mais la probabilit de panne augmente avec le nombre de disques. La
     limite habituelle est de 5  7 disques.

     Comme toutes les oprations d'criture doivent tre rpercutes sur
     le disque redondant, la vitesse globale en criture d'un ensemble
     RAID 3 est celle de son disque redondant. La vitesse en lecture est
     celle d'un systme RAID 0 ayant autant de disques que le RAID 3 a
     de disques non redondants. La vitesse chute svrement lorsque
     l'ensemble doit restaurer les donnes depuis le disque redondant.

    Le mode RAID _5 est comme le RAID 3, mis a part que l'information
     redondante est rpartie sur l'ensemble des disques. a augmente la
     vitesse en criture, puisque la charge est rpartie.

  Il y a aussi des modes hybrides bass sur le RAID 0 ou 1, et un autre
  niveau. Beaucoup de combinaisons sont possibles mais certaines sont
  assez complexes.

  Le RAID _0_/_1 combine la rpartition et la duplication, ce qui donne de
  trs bons taux de transfert et temps d'accs moyen. Le revers de la
  mdaille est que a requiert beaucoup de disques et que c'est
  complexe.

  Le RAID _1_/_5 combine la redondance faon RAID 5 et le court temps
  d'accs du RAID 1. La redondance est amliore par rapport au RAID 0/1
  mais la consommation de disques est significative. Il faudra au moins
  6 disques pour mettre en place une telle solution, et peut-tre
  plusieurs canaux ou contrleurs SCSI.


  44..33..22..  AAFFSS,, VVeerriittaass eett aauuttrreess ssyyssttmmeess ddee ggeessttiioonn ddee vvoolluummee

  Avoir de nombreux disques et partitions constitue un avantage pour la
  taille, la vitesse et la fiabilit mais il y a un hic: Si la partition
  /tmp est pleine vous tes bien embt mme s'il y a de la place dans
  la partition pour les news, car il n'est pas vident de retransfrer
  les quotas d'une partition  l'autre. Les systmes de gestion de
  volume font prcisment ce travail. Les plus connus sont AFS et
  Veritas. Ils offrent aussi d'autres fonctions comme un journal des
  oprations disque. Veritas n'est pas disponible pour Linux, et il
  n'est pas certain qu'il puissent vendre des modules du noyau sans
  publier le code source, il est donc juste mentionn pour information.
  Pour voir comment ces systmes fonctionnent vous pouvez consulter le
  site de veritas <http://www.veritas.com>.

  Derek Atkins, du MIT, a port AFS pour Linux et mis en place la Linux
  AFS mailing List <mailto:linux-afs@mit.edu> qui est ouverte au public.
  Pour s'abonner  cett mailing-list il faut envoyer un mail  linux-
  afs-request@mit.edu <mailto:linux-afs-request@mit.edu> et si on trouve
  un bug linux-afs-bugs@mit.edu <mailto:linux-afs-bugs@mit.edu>.

  Attention: comme AFS utilise du cryptage il est restreint d'usage dans
  certains pays (ndT: la France par exemple). AFS est maintenant vendu
  par Transarc et ils ont mis en place un site Web. Voir le site de
  Transarc <http://www.transarc.com> pour des informations gnrales et
  une FAQ.

  Il y a aussi des dveloppements bass sur la dernire version libre
  d'AFS.

  La gestion de volume est pour l'instant un des gros manques de Linux.
  Un projet a dmarr au sujet d'un systme de partitions virtuelles qui
  ralisera la plupart des fonctions de gestion de volume qu'on trouve
  dans le systme AIX d'IBM.


  44..33..33..  LLee ppaattcchh mmdd  ppoouurr llee nnooyyaauu LLiinnuuxx

  Il y a un projet de la part des dveloppeurs du noyau, md, qui fait
  partie de la distribution du noyau depuis la version 1.3.69. md offre
  diverses fonctions telles que le RAID mais il est envore en phase de
  dveloppement. Les gens qui l'ont utilis parlent d'un succs mitig
  voire d'un crash total. Bref, soyez prudents.

  Actuellement md permet le mode linaire et le RAID niveau 0,1,4 et 5:
  le plus stable doit tre le RAID niveau 0 et 1, le reste est encore en
  dveloppement. Il est aussi possible d'empiler les niveaux, par
  exemple de constituer un RAID 1 avec deux paires de disques, chaque
  paire tant un montage RAID 0.

  Il faut bien prvoir quels disques on combine de manire  faire
  tourner tous les disques en parallle, ce qui augmente les
  performances. Pour plus de dtails se reporter  la documentation de
  md.


  44..33..44..  CCoonnssiiddrraattiioonnss ggnnrraalleess ssuurr lleess ssyyssttmmeess ddee ffiicchhiieerrss..

  Dans le monde Linux ext2fs s'est impos comme le systme de fichiers 
  tout faire.  Mais pour certains usages spcifiques, d'autres systmes
  de fichiers sont prfrables. Pour les serveurs de news un systme
  avec journal (log file systems) est un choix naturel. C'est l'objet de
  vives controverses et il n'y a que peu de choix actuellement, mais on
  avance dans ce domaine. Les systmes de fichiers avec journal ont
  l'avantage d'une vrification rapide. Un serveur de mail dans la
  classe 100 Go pourrait souffrir d'une vrification de systmes de
  fichiers (avec fsck) prenant plusieurs jours au redmarrage.

  Le systme de fichiers de Minix est le plus ancien, trs peu utilis
  actuellement. Le systme Xiafs tait un candidat srieux pour devenir
  le standard de Linux mais il n'a pas vcu.

  Adam Richter d'Yggdrasil a post rcemment un message au sujet d'un
  systme de fichiers avec journal et compression, mais c'est encore en
  dveloppement. Une version qui ne marche pas est disponible sur le
  serveur ftp d'Yggdrasil <ftp://ftp.yggdrasil.com/private/adam> avec
  des versions patches du noyau. Peut-tre que a sera prochainement
  inclus dans la distribution officielle du noyau.

  Le 23 juillet 1997, Hans Reiser <mailto:reiser (at) RICOCHET.NET> a
  publi les sources d'un systme de fichiers bas sur la notion
  d'arbre, reiserfs <http://idiom.com/~beverly/reiserfs.html>.  Ce
  systme a des fonctionnalits trs intressantes et il est plus rapide
  que ext2fs, mais il est encore exprimental et pas facile  intgrer
  dans le noyau. on peut attendre d'importants dveloppements dans le
  futur. Ce projet se distingue du systme de fichiers avec journal
  moyen car Hans a dj du code qui tourne.

  Dans le systme ext2fs existant, on pourrait ajouter de nouvelles
  fonctions comme les listes de contrle d'accs (ACL, Access Control
  List), l encore dans un proche futur.

  Il existe aussi un systme de fichiers avec cryptage, mais un fois
  encore vrifiez qu'il est lgal dans votre pays (ndT: rappel: en
  France c'est illgal pour le moment).

  Les systmes de fichiers sont un champ de recherches acadmiques et
  industrielles important, recherches dont les rsultats sont souvent
  accessibles gratuitement (ndT: Il n'y a que les clients d'Apple ou
  Microsoft qui utilisent des technologies vieilles de 10 ans ...).
  Linux tant souvent la plate-forme de dveloppement de tels
  prototypes, on peut s'attendre a des amliorations et des innovations
  continuelles.


  44..33..55..  SSyyssttmmeess ddee ffiicchhiieerrss ddeess ccddrroommss

  Il y a un certain nombre de systmes de fichiers disponibles pour les
  cdroms. Le plus ancien est le format _H_i_g_h _S_i_e_r_r_a, nomm ainsi
  d'aprs l'htel o les accords furent signs par les partenaires
  industriels. C'tait l'anctre de l'_I_S_O _9_6_6_0, qui est support par
  Linux (ndT: ce fut le nivellement par le bas: noms de fichiers de 8+3
  caractres, majuscules/minuscules confondues, etc). Plus tard une
  extension _R_o_c_k _R_i_d_g_e fut propose, ajoutant les noms de fichiers longs
  et les droits d'accs entre autres.

  Le systme de fichiers iso9660 de Linux supporte aussi bien le vieux
  High Sierra que les extensions Rock Ridge.

  Cepandant, une fois de plus Microsoft a dcid de choisir une de ces
  technologies comme nouveau "standard". Leur dernier bb s'appelle
  _J_o_l_i_e_t et offre des possibilits d'internationaliation.  Ce format est
  accept par le noyau Linux depuis la version 2.0.34. Vous devez
  activer NLS pour l'utiliser.

  H. Peter Anvin (hpa (at) transmeta.com) a rcemment post ces lignes:

       Actually, Joliet is a city outside Chicago; best known for being the
       site of the prison where Elwood was locked up in the movie "Blues
       Brothers."  Rock Ridge (the UNIX extensions to ISO 9660) is named
       after the (fictional) town in the movie "Blazing Saddles."






       En fait, Joliet est une cit pas loin de Chicago, surtout clbre pour
       sa prison o Elwood tait enferm dans le film "Blues Brothers". Rock
       Ridge (l'extension UNIX de l'ISO 9660) fut baptis d'aprs la ville
       imaginaire du film "Blazing Saddles."




  En fait c'tait Jake qui tait enferm. Oups !


  44..33..66..  CCoommpprreessssiioonn

  Faut-il compresser son disque ou ses fichiers ? Voil une question
  prement dbattue, surtout si on prend en compte le danger de perte de
  fichiers. Il y a pourtant plusieurs options pour les administrateurs
  aventureux: modules ou patchs du noyau, librairies. La plupart de ces
  solutions ont de limitations, comme par exemple d'tre en lecture
  seule. Seules quelques rfrences sont donnes ici;  vous de vous
  tenir au courant des dernires mises  jour.


    DouBle offre la compression de fichiers avec certaines limitations.

    Zlibc ajoute  la compression au vol des fichiers quand on les
     charge, de faon transparente.

    Il y a beaucoup de modules qui permettent de lire des fichiers
     compresss ou des partitions natives de plusieurs systmes
     d'exploitation, mais la plupart sont en lecture seule.

    dmsdos (actuellement en version 0.9.1.2) offre la plupart des
     options de compression de DOS et Windows. Il n'a pas encore tout
     mais de nouvelle fontionnalits sont rgulirement ajoutes.

    e2compr tend ext2fs avec des fonctions de compression. Il est pour
     le moment en phase de test donc utilisable seulement pour des
     hackers du noyau. Voir la page de e2compr
     <http://netspace.net.au/~reiter/e2compr.html> pour plus
     d'information. J'ai eu des rapports selon lesquels c'est assez
     stable et rapide.


  44..33..77..  AAuuttrreess ssyyssttmmeess ddee ffiicchhiieerrss

  Il y a le systme de fichiers userfs qui permet un systme de fichiers
  bas sur FTP, et a entre autres des possibilit de compression. docfs
  est bas sur ce systme de fichiers.

  Avec les ajouts rcents au noyau, on peut mettre un systme de
  fichiers complet dans un seul fichier (appel _l_o_o_p_b_a_c_k _d_e_v_i_c_e). On
  peut utiliser a pour concevoir et tester de nouveaux systmes de
  fichiers.

  Notez que cela n'a rien a voir avec le _n_e_t_w_o_r_k _l_o_o_p_b_a_c_k _d_e_v_i_c_e.

  Il y a aussi un certain nombre de systmes de fichiers au stade
  exprimental qui ne sont pas voqus ici.


  44..33..88..  PPoossiittiioonn pphhyyssiiqquuee ddeess ppiisstteess

  Avec les disques petits et lents, certain systmes de fichiers
  utilisaient au mieux les caractristiques physiques lors du placement
  des donnes stockes. Cependant, l'augmentation de la vitesse et
  l'apparition de contrleurs intgrs avec mmoire cache ont rduit
  l'effet de ces optimisations.

  Nanmoins, on peut toujours gagner un peu avec ce genre
  d'optimisations. Comme chacun le sait, Linux va un jour _d_o_m_i_n_e_r _l_e
  _m_o_n_d_e, mais pour que ce jour arrive plus vite il nous faut employer
  toutes les ressources.

  La plupart des disques tournent  vitesse angulaire constante mais
  utilisent une densit des donnes  peu prs constante sur toutes les
  pistes. On a donc un taux de transfert bien plus lev sur le bord que
  sur l'intrieur du disque. Mais il y a aussi le fait que le temps
  d'accs moyen aux donnes sockes sur le centre du disque est plus
  court que pour les donnes stockes au centre ou  l'extrieur.

  Mais les disques rcents utilisent une gomtrie "logique" diffrente
  de la gomtrie physique, le disque lui-mme effectuant la conversion.
  Trouver le "milieu" du disque est plus difficile dans ces conditions.

  Dans la plupart des cas la piste 0 est la plus  l'extrieur mais
  c'est une convention et pas une norme.



     LLeess ppiisstteess iinnttrriieeuurreess
        sont plus lentes pour le taux de transfert comme pour le temps
        d'accs.

        Elles sont plus adaptes  des partitions telles que DOS, la
        racine ou la queue d'impression, qui ne demandent pas de vitesse
        lve.


     LLeess ppiisstteess dduu mmiilliieeuu
        sont en moyenne plus rapides que les pistes intrieures pour le
        taux de transfert comme pour le temps d'accs.  Elles sont bien
        adaptes pour des partitions comme swap, /tmp et /var/tmp.


     LLeess ppiisstteess eexxttrriieeuurreess
        ont le taux de transfert le plus rapide mais un temps d'accs
        moyen aussi faible que les pistes intrieures. C'est l qu'on
        pourra mettre de gros fichiers comme des librairies.

  Le temps d'accs moyen peut tre rduit en plaant au centre les
  pistes les plus frquemment demandes. Cela peut tre fait avec fdisk
  en dcoupant un partition dans les pistes du milieu.  Ou bien, avec un
  disque vide au dpart, on peut copier un fichier bidon avec dd de la
  taille de la moiti du disque environ; on cre ensuite les fichiers
  qui ont besoin d'un accs rapide et on efface le fichier bidon.

  Le dernier cas sert surtout pour les queues d'impression: on met le
  rpertoire vide de dpart au milieu du disque, ce qui rduira aussi la
  fragmentation.

  Avec les systmes RAID on peut aussi placer des fichiers au centre,
  mais le calcul est plus compliqu: voir la documentation sur RAID.  On
  peut gagner jusqu' 50 pourcents.


  44..33..99..  VViitteessssee ddeess ddiissqquueess


  Le systme mcanique est souvent le mme dans des disques IDE ou SCSI.
  Les contraintes mcaniques sont aujourd'hui un facteur limitant mme
  si les progrs continuent. Il y a deux paramtres principaux,
  habituellement nots en millisecondes (ms):


     MMoobbiilliitt ddee llaa ttttee
        La vitesse  laquelle la tte de lecture-criture peut aller
        d'une piste  une autre, aussi appel temps d'accs. Si vous
        calculez la double intgrale (la moyenne) de la distance sur
        tous les points de dpart et tous les points d'arrive
        possibles, vous trouverez que c'est quivalent  1/3 de
        l'ensemble des pistes.


     VViitteessssee ddee rroottaattiioonn
        Elle dtermine le temps ncessaire pour se placer dans le bon
        secteur, temps appel latence.

  Quelques valeurs typiques de temps mouvement de la tte:



                                Type de disque


       Temps d'accs (ms)      | Rapide Moyen Vieux
       ---------------------------------------------
       Pistes voisines             <1     2     8
       En moyenne                  10    15    30
       Au pire                     10    30    70




  On voit que les disques dernier cri ont des temps d'accs  peine
  meilleurs que les disques moyens, mais que les vieux disques sont
  significativement moins bons.




       Vitesse de rotation (tr/min)  |  3600 | 4500 | 4800 | 5400 | 7200 | 10000
       ---------------------------------------------------------------------------
       Latence (ms)                  |    17 |   13 | 12.5 | 11.1 |  8.3 |   6.0




  Comme la latence est le temps moyen pour atteindre un autre secteur,
  la formule est assez simple:



       latence (ms) = 60000 / vitesse (tr/min)





  Ce tableau montre lui aussi que la vitesse des disques progresse moins
  qu'auparavant. En revanche, la consommation d'lectricit,
  l'chauffement et le bruit augmentent beaucoup.


  55..  AAuuttrreess ssyyssttmmeess dd''eexxppllooiittaattiioonn..

  Beaucoup de Linuxiens ont plusieurs systmes d'exploitation, ce qui
  est parfois ncessaire ne serait-ce que pour certains programmes de
  configuration du matriel qui ne tournent que sous DOS ou Windows,
  pour ne pas les nommer. D'o l'intrt de cette courte section.


  55..11..  MMSS--DDOOSS

  Laissons l le dbat pour savoir si c'est ou non un systme
  d'exploitation. Ce qui est sr est que la gestion du disque par MSDOS
  est trs basique. On peut avoir de grandes difficults avec les gros
  disques, consulter le _L_a_r_g_e _D_r_i_v_e_s _m_i_n_i_-_H_O_W_T_O  ce sujet. Il est donc
  plus sage de placer la partition MSDOS au dbut du disque (sur les
  numros de pistes les moins levs).

  tant conu pour de petits disque le systme de fichier de MSDOS (_F_A_T)
  alloue des blocs normes sur les grands disques. Il cre aussi pas mal
  de fragmentation, ce qui ralentit le temps moyen d'accs comme le taux
  de transfert.

  Une solution est d'utiliser le programme de dfragmentation mais il
  est fortement conseill de faire un sauvegarde des donnes et de
  vrifier le disque (avec chkdsk ou scansidk pour les DOS plus rcents)
  avant de dfragmenter.

  Mais comme toujours il y a un os, et ici l'os s'appelle _f_i_c_h_i_e_r_s
  _c_a_c_h__s. Certains vendeurs les utilisent pour se protger leurs
  logiciels. Or un fichier cach ne peut tre chang d'endroit sur le
  disque, mme s'il garde la mme place dans l'arborescence des
  rpertoires. En consquence les programmes de dfragmentation ne
  dplacent pas les fichiers cachs, ce qui rduit les effets de la
  dfragmentation.

  tant mono-tche, mono-utilisateur, mono-tout, il n'y a aucun gain de
  vitesse  utiliser plusieurs disques sous MSDOS, a moins que vous
  utilisiez un contrleur disque qui fait du RAID au niveau matriel.

  Les vieilles commandes join et subst pour grer plusieurs disques
  demandaient beaucoup de travail pour un rsultat nul. Elles n'existent
  plus dans les versions rcentes.

  Bref, il n'y a pas grand chose  faire pour acclrer la gestion
  disque de DOS. Sauf ceci: beaucoup de programmes ont besoin d'un
  espace de stockage temporaire rapide et ceux qui sont bien crits
  utilisent la variable d'environnement TEMPDIR ou TMPDIR pour savoir o
  crer ces fichiers. Vous pouvez faire pointer cette variable vers un
  autre disque en ditant le fichier autoexec.bat:


  ______________________________________________________________________
  SET TMPDIR=E:/TMP
  ______________________________________________________________________



  En plus du gain de vitesse, ceci rduira sans doute la fragmentation.

  Le programme fdisk de MSDOS a du mal parfois a effacer des partitions
  primaires. On peut utiliser  la place le programme fdisk qui vient
  avec Linux.


  N'oubliez pas qu'il existe d'autres alternatives  MS-DOS, la plus
  connue tant DR-DOS <http://www.caldera/dos/> de Caldera
  <http://www.caldera/>.  C'est un descendant direct de DR-DOS de
  Digital Research.  Il a beaucoup de fonctions qui manquent  MS-DOS,
  comme le multi-tche.

  Une autre alternative, libre, est Free DOS <http://www.freedos.org/>
  qui est un projet en dveloppement. Un certain nombre d'utilitaires
  sont aussi disponibles.


  55..22..  WWiinnddoowwss

  La plupart des points ci-dessus s'appliquent, mis  part que Windows95
  a une meilleure gestion des disques, notamment SCSI.

  Pour lire les noms longs vous devrez utiliser le systme de fichiers
  vfat (plutt que dos) pour monter ces partitions.

  Le nouveau systme de fichiers FAT32 a t introduit  partir de la
  version OSR2. Il convient mieux aux grands disques. Il n'est encore
  support que par peu de programmes, mme par NT 4.0 ou les utilitaires
  Norton-machin truc. Le noyau Linux supporte le format FAT32 et aussi
  le format de cdroms Joliet depuis la version 2.0.35.

  La fragmentation est encore un problme. On peut limiter les dgts en
  faisant une dframentation avant et aprs tout gros changement (comme
  l'installation d'un programme). Enlever les fichiers inutiles et vider
  la poubelle rduit encore la fragmentation.

  Windows utilise aussi un disque pour le swap, et le rediriger peut
  apporter des gains de performance. Il y a plusieurs mini-HOWTOS qui
  expliquent comment partager le swap entre plusieurs systmes
  d'exploitation.

  Trs rcemment quelqu'un a commenc un projet pour que Win95
  reconnaisse le systme de fichiers ext2fs. Voir cette page Web
  <http://www.globalxs.nl/home/p/pvs/> pour plus de dtails.

  Mettre la variable d'environnement TEMPDIR est toujours utile mais
  tous les programmes ne l'utilisent pas. Utilisez sysedit pour diter
  le fichier autoexec comme indiqu plus haut.

  Beaucoup de fichiers temporaires sont placs dans /windows/temp et
  changer cela est plus difficile.  On peut utiliser regedit  cette
  fin, mais on risque de mettre le systme dans un tat incohrent; et
  un Windows en panne est encore moins utile qu'un Windows vivant. Une
  erreur dans la base des registres peut ncessiter la r-installation
  complte de Windows.

  De toute faon, beaucoup de programmes ont leurs propres endroits pour
  mettre leurs fichiers temporaires, il y en a donc un peu partout sur
  votre disque.

  Mettre le swap sur une partition spare est une meilleure ide, et
  c'est plus facile  faire. Gardez  l'esprit que la partition swap ne
  peut tre utilise  rien d'autre, mme s'il y a de la place libre.


  55..33..  OOSS//22

  La seule chose  mentionner ici est qu'on peut ajouter un systme de
  fichiers de manire  pouvoir lire les partitions ext2fs depuis OS/2.
  55..44..  NNTT

  Voil un systme plus srieux qui proposent la plupart des fonctions
  dont les noms exotiques composent la publicit informatique.

  Voici un bug report par acahalan at cs.uml.edu: (traduction d'un
  extrait de message dans les News)

  Le DiskManager de NT a un bug srieux qui peut corrompre un disque
  ayant plus d'une partition tendue. Microsoft a mis un fix sur le site
  knowledge base <http://www.microsoft.com/kb/>

  (Cela concerne les Linuxiens, car ils ont des souvent des partitions
  tendues)


  55..55..  SSuunn OOSS

  Il y a un peu de confusion entre Sun OS et Solaris. Solaris n'est que
  Sun OS 5 avec Openwindows et quelques extras. Tapez uname -a pour
  connatre votre version. Parmi les raisons de cette confusion il y a
  que Sun utilisait un OS de la famille BSD, avec des morceaux de code
  d'un peu partout et du code propritaire. Ainsi jusqu' Sun OS 4.x.y.
  Puis par une dcision stratgique ils ont choisi Unix, System V,
  Release 4 officiel (SVR4) et Sun OS 5 est n. Ils ont aussi chang de
  marketing, en vendant d'autres produits en _b_u_n_d_l_e avec Sun OS sous le
  nom de Solaris, actuellement en version 2.6.


  55..55..11..  SSuunn OOSS 44

  Sun OS est familier  beaucoup de Linuxiens. La dernire version est
  4.1.4 plus un certain nombre de patches. Notez cependant que leur
  hirarchie de fichiers est organise diffremment du FSSTND. Taper man
  hier pour un bref topo sur la hirarchie de fichiers.


  55..55..22..  SSuunn OOSS 55 ((ii..ee.. SSoollaarriiss))

  Il y a une procdure d'installation base sur Openwindows, qui vous
  aide  partitionner et formater les disques avant d'installer le
  systme  partir du cdrom. Cette procdure plante lamentablement si
  votre installation est trop exotique, et comme elle cherche 
  installer tout un systme  partir d'un cdrom elle plantera mais pas
  avant un certain nombre de minutes. C'est l'exprience que j'en ai eu.
  Pour contourner le problme nous avons tout install sur une partition
  et ensuite nous avons dplac les rpertoires aux bons endroits.

  Les valeurs par dfaut sont bonnes pour la plupart des choses, sauf
  peut-tre pour le swap. Alors que les manuels officiels recommandent
  d'avoir plusieurs partitions pour le swap, pas dfaut une seule
  partition est utilise. Il est conseill de changer cela ds que
  possible.

  Sun OS 5 possde aussi un systme de fichiers conu pour les fichiers
  temporaires, tmpfs. C'est un genre de RAM disk, et comme les RAM disks
  le contenu en est perdu quand le courant est coup. Si la mmoire vive
  manque des parties du pseudo-disques seront dplacs vers la mmoire
  tampon, il est donc possible d'avoir des fichiers temporaires dans la
  partition de swap. Linux n'a pas de systme de fichiers de ce genre:
  on en avait parl mais les opinions taient partages. J'aimerais
  d'ailleurs avoir des commentaires  ce sujet.

  Jusqu'ici, le seul commentaire tait: non !! Sous Solaris 2.0, crer
  de trop gros fichiers temporaires dans /tmp peut causer une panne dy
  noyau (_k_e_r_n_e_l _p_a_n_i_c) pour cause de manque de mmoire tampon (ndT: Ce
  n'est qu'un des milliers de bugs de Solaris 2.0).  Le pire est que
  cette panne complte peut arriver avec des programmes utilisateurs
  (donc pas seulement avec des programmes en mode noyau) et  moins de
  savoir contourner le problme le mieux est de ne pas utiliser tmpfs.

  Voir aussi ``Combiner le swap et /tmp''.

  Pour la culture: il y un film appel Solaris, un film de science
  fiction trs long, trs lent et totalement incomprhensible ...


  66..  CClluusstteerrss

  Je vais brivement voquer ici les manires de connecter des machines
  ensemble, mais c'est un sujet si vaste qu'il pourrait faire l'objet
  d'un HOWTO. Comme en plus c'est hors-sujet dans ce HOWTO, si vous
  voulez contactez-moi et prenez cette partie pour en faire un document
  spar.

  Aujourd'hui les ordinateurs sont obsoltes au bout d'un temps trs
  court. Du vieux matriel peut pourtant se rvler trs utile sous
  Linux. Utiliser un vieux pc commer serveur rseau a, en plus de la
  valeur pratique, un certain intrt ducatif. Je ne parlerai ici que
  de ce qui concerne les disques.

  Plusieurs formes de partage (clustering) sont possibles aujourd'hui,
  depuis la rpartition automatique de la charge entre plusieurs
  machines jusqu' des matriels exotiques comme le SCI (Scalable
  Coherent Interface) qui permet de combiner plusieurs machines en une
  seule. Il y a eu aussi du partage sur de plus grosses machines, ainsi
  le VAXcluster en son temps. L'usage habituel du clustering est le
  partage des ressources comme les disques durs, les imprimantes, les
  teminaux mais de faon  ce que les ressources soit disponibles 
  galit pour tous les noeuds du rseau.

  Il n'y a pas de bonne dfinition du clustering (ndT: ni de bonne
  traduction ...) mais ici ce mot signifie que plusieurs machines d'un
  reseau combinent leurs ressources pour servir les utilisateurs.

  Linux permet certaines formes de partage mais pour le dbutant je
  dcrirai juste un rseau local simple. C'est une bonne manire de
  profiter de vieux matriel qui serait inutilisable dans a.

  La meilleure faon d'utiliser une vieille machine est d'en faire un
  serveur de rseau. Dans ce cas, le facteur limitant est plutt la
  bande passante du rseau que la vitesse du serveur. A la maison vous
  pouvez dplacer les fonctions suivantes sur un vieux PC devenu
  serveur:


    Les news

    Le courrier lectronique

    Les proxies Web

    Un serveur d'impression

    Un serveur de modem (PPP, SLIP, FAX, Voice mail)

  Vous pouvez aussi monter par NFS des disques du serveur. Lisez le
  FSSNTD pour savoir quels rpertoires ne doivent pas tre exports. On
  exportera /usr et /var/spool, peut-tre aussi /usr/local mais sans
  doute pas /var/spool/lpd.


  La plupart du temps mme de vieux disques offrent des performances
  suffisantes. Cependant, si vous avez un usage intensif des disques du
  serveur et un rseau  haut dbit, vous aurez sans doute besoin de
  disques rapides. C'est le cas pour un outil de recherche dans un site
  Web ou pour une base de donnes.

  Un tel rseau (un _t_o_a_s_t_e_r _n_e_t_w_o_r_k comme on l'appelle) peut tre une
  trs bonne faon d'apprendre l'administration systme. Il y a des
  HOWTOs sur le sujet mais vous devez garder en tte les choses
  suivantes:


    Ne choisissez pas les numros IP n'importe comment. Configurez
     votre rseau local avec les adresses IP rserves  l'usage priv,
     et utilisez votre serveur de rseau comme un routeur qui grera le
     masquage des adresses IP.

    Si vous configurez le routeur comme un pare-feu (firewall) il se
     peut que vous soyez incapable d'accder  vos propres donnes
     depuis l'extrieur. Cela dpend de la configuration du pare-feu.

  Le rseau _n_y_x est un exemple de cluster. Il est constitu de:

     nnyyxx
        est l'une des deux machines sur lesquelles les utilisateurs se
        loguent et assure aussi certaines fonctions rseau

     nnooxx
        (ou nyx10) est la machine principale pour utilisateurs et aussi
        un serveur de courrier lectronique.

     nnoocc
        est un serveur pour les news. La queue des news est accessible
        par un montage NFS pour nyx et nox.

     aarraacchhnnee
        (ou www) est le serveur Web. Les pages Web sont crites sur nox
         travers un montage NFS

  Il y a des projets de clustering assez avancs, notamment:

    le projet Beowulf
     <http://cesdis.gsfc.nasa.gov/linux/beowulf/beowulf.html>

    le projet GAMMA (Genoa Active Message Machine)
     <http://www.disi.unige.it/project/gamma/>


  Le partage high-tech demande une interconnection high-tech, et SCI est
  une des solutions. Plus d'information sur la page Web de Dolphin
  Interconnect Solutions <http://www.dolphinics.no/> ou de scizzl
  <http://www.scizzl.com/>.


  77..  PPooiinnttss ddee mmoonnttaaggee

  Il est important de ne pas scinder la hirarchie des rpertoires au
  mauvais endroits. Cette section dpend fortement du FSSTND et sans
  doute changera compltement quand le FHS sera utilise dans une
  distribution Linux.

  Voici donc un liste des rpertoires que vous _p_o_u_v_e_z (et non que vous
  _d_e_v_e_z) mettre sur une partition spare. Pour indiquer combien il est
  opportun de placer tel rpertoire sur une partition spare, un
  chelle de 0  5 est adopte:

       0= viter absolument
       1=eventullement
        ...
       4=utile
       5=recommand






       /
       |
       +-bin       0
       +-boot      0
       +-dev       0
       +-etc       0
       +-home      5
       +-lib       0
       +-mnt       0
       +-proc      0
       +-root      0
       +-sbin      0
       +-tmp       5
       +-usr       5
       | \
       | +-X11R6     3
       | +-bin       3
       | +-lib       4
       | +-local     4
       | | \
       | | +bin        2
       | | +lib        4
       | +-src       3
       |
       +-var       5
         \
         +-adm       0
         +-lib       2
         +-lock      1
         +-log       1
         +-preserve  1
         +-run       1
         +-spool     4
         | \
         | +-mail      3
         | +-mqueue    3
         | +-news      5
         | +-smail     3
         | +-uucp      3
         +-tmp       5





  La situation bien sr peut varier, par exemple sur une machine  la
  maison il n'est pas trs utile de scinder le rpertoire /var/spool
  mais pour un fournisseur d'accs  Internet c'est indispensable. Le
  mot-cl ici est _l_'_u_s_a_g_e.

  _Q_U_E_S_T_I_O_N _! Pourquoi /etc ne doit jamais tre mis sur une partition
  spare ? Rponse: le montage est fait d'aprs les instructions du
  fichier /etc/fstab, donc si /etc n'est pas sur la partition racine, et
  que cette partition n'est pas monte, aucun montage ne peut tre
  effectu ...  c'est comme d'avoir claqu la porte en laissant la cl 
  l'intrieur.


  88..  PPllaacceemmeenntt ddeess ppaarrttiittiioonnss,, ddeess rrppeerrttooiirreess eett ddeess ffiicchhiieerrss

  Nous en savons maintenant assez pour parler de placement.  J'ai mis ma
  mthode au point aprs avoir essay toutes les combinaisons possibles
  sur mes 3 vieux disques SCSI.

  Les tables donnes en appendice servent  simplifier le processus.
  Elles vous aideront  optimiser votre systme mais aussi  le dpanner
  ventuellement. Quelques exemples sont donns.


  88..11..  CChhooiissiirr lleess ppaarrttiittiioonnss

  Rflchissez  vos besoins et posez sur le papier une liste de toutes
  les parties de votre systme de fichiers que vous voulez mettre sur
  une partition spare. Notez la taille de chacune et triez-les par
  vitesse dcroissante.

  La table du chapitre ``Appendice A'' est utile pour choisir quels
  rpertoires mettre dans quelles partitions.  Elle est trie par ordre
  logique, avec des blancs pour vos notes personnelles et des remarques
  sur les points de montage. Elle n'est PAS trie par vitesse
  dcroissante, mais les besoins en vitesse sont indiqus par des petits
  ronds ('o').

  Si vous voulez utiliser du RAID notez avec quels disques vous voulez
  le faire et quelles partitions seront en RAID. Notez que les
  diffrents modes RAID offrent une vitesse et une fiabilit variable.
  Pour simplifier, on suppose dans la suite qu'on a un ensemble de
  disques SCSI identiques et pas de RAID.


  88..22..  RRppaarrttiirr lleess ppaarrttiittiioonnss eennttrree lleess ddiissqquueess..

  Il faut maintenant dterminer sur quelles disques physiques seront
  places les partitions choisies ci-dessus. Voici un algorithme pour
  optimiser le paralllisme et l'utilisation du bus. Dans notre exemple
  les partitions  placer sont 123456789, 9 est celle qui a besoin de la
  plus grande vitesse et 1 est la plus lente. On les rpartit comme
  suit:



               A : 9 4 3
               B : 8 5 2
               C : 7 6 1




  Cela fait une "moyenne des vitesses"  peu prs gale sur chaque
  disque.

  Utiliser la table de l'appendice B pour dterminer quels disques
  utiliser pour quelles partitions afin de profiter au maximum du
  paralllisme.

  Notez la vitesse de chacun de vos disques dans la bonne colonne.
  ventuellement, permutez les rpertoires, les partitions et les
  disques jusqu' tre content du rsultat.



  88..33..  TTrriieerr lleess ppaarrttiittiioonnss eett lleess ddiissqquueess

  L'tape suivante est de slectionner les numros de partition pour
  chaque disque.

  Utilisez la table du chapitre ``appendice C'' pour slectionner les
  numros de partitions  l'intrieur de chaque disque. Remplissez avec
  ces valeurs les tables des Appendices A et B.  Ces tables vous
  serviront lorsque vous installerez votre systme (tape de
  partitionnement avec fdisk ou cfdisk)


  88..44..  OOppttiimmiissaattiioonn

  Des considrations spcifiques  un matriel ou  un type
  d'utilisation peuvent intervenir. Par exemple si le disque C est
  beaucoup plus lent que les deux autres il vaudra mieux adopter la
  rpartition suivante:



               A : 9 6 5
               B : 8 7 4
               C : 3 2 1





  88..44..11..  EEnn tteennaanntt ccoommppttee ddee ssppcciiffiicciitt ddeess ddiissqquueess

  Des disques de vitesse globale comparable peuvent s'avrer plus ou
  adapts  un usage ou  un autre. Comme on l'a dj dit, les binaires,
  qui sont nombreux et petits, sont bien  leur place dans un disque de
  temps d'accs moyen faible et qui gre une queue des requtes. Les
  librairies et autres gros fichiers profiteront davantage d'un disque
  ayant un bon taux de transfert, ce que les disques IDE offrent pour
  pas cher.


  88..44..22..  UUttiilliissaattiioonn dduu ppaarraalllllliissmmee

  On peut viter la surcharge du disque en pensant aux tches. Par
  exemple si vous excutez un programme de /usr/local/bin il y a des
  chances que vous accderez aussi  /usr/local/lib; placer ces deux
  rpertoires sur des disques physiquement diffrents permet de diminuer
  le temps de recherche et autorise les oprations en parallle ou
  l'utilisation du cache. Des gains de performance surprenants peuvent
  tre obtenus ainsi. Identifiez les tches communes, les partitions
  qu'elles utilisent et gardez ces partitions sur des disques
  physiquement diffrents.

  Voici quelques exemples:



     LLeess aapppplliiccaattiioonn bbuurreeaauuttiiqquueess
        comme les traitements de texte ou les tableurs sont des exemples
        typiques de logiciels peu gourmands en temps CPU comme en accs
        disque (une fois lancs).  Cepandant, ces logiciels ont souvent
        des fonctions de sauvegarde automatique qui crent du traffic
        dans les rpertoires personnels des utilisateurs. Avoir les
        rpertoires personnels sur plusieurs disques rpartira la
        charge.


     LLeess lleecctteeuurrss ddee NNeewwss
        ont aussi des fonctions de sauvegarde automatique, et les
        fournisseurs d'accs  Internet ont intrt  sparer les
        rpertoires utilisateurs entre plusieurs disques.

        Les queues des serveurs de News (/var/spool/news) sont connues
        pour leurs grand nombre de rpertoires et de fichiers. La perte
        d'une telle partition n'est pas grave dans la plupart des cas,
        donc le RAID 0 lui convient parfaitement. Avec beaucoup de
        petits disques le systme pourra supporter un grand nombre de
        requtes par seconde. On peut mme mettre les news et les
        fichiers .overview sur des disques spars: voir les FAQs sur
        les serveurs INN  ce sujet.

        Voir aussi la page Web ddie  l'optimisation des serveurs INN
        <http://www.spinne.com/usenet/inn-perf.html>


     LLeess bbaasseess ddee ddoonnnneess
        sont gourmandes en terme d'accs disques comme de temps de
        calcul. Cela dpend beaucoup de l'application envisage. On peut
        envisager le RAID pour avoir  la fois performance et fiabilit.


     LLee ccoouurrrriieerr lleeccttrroonniiqquuee
        met en jeu les rpertoires des utilisateurs comme les queues de
        courrier arriv/ envoyer.  Si possible garder les rpertoires
        des utilisateurs et les queues sur des disques diffrents. Pour
        un serveur de courrier on peut envisager de mettre les queues de
        courrier reu et  envoyer sur des disques diffrents.

        Perdre du courrier est extrmement gnant, si vous tes un
        fournisseur d'accs ou un routeur. Envisager le RAID et faire
        des sauvegardes frquentes.


     LLee ddvveellooppppeemmeenntt ddee llooggiicciieellss
        peut demander un grand nombre de rpertoires pour les binaires,
        les librairies, les fichiers d'en-tte, les sources et
        l'archive. Sparer autant que possible tous ces rpertoires. Sur
        des petits systmes vous pouvez placer /usr/src et l'archive sur
        le mme disque que les rpertoires personnels.


     SSuurrffeerr ssuurr llee NNeett
        est  la mode. Les butineurs ont souvent un cache local qui peut
        grossir pas mal. Comme le cache est utilis pour recharger des
        pages ou retourner  la page prcdents, la vitesse compte.
        Cepandant, si vous tes connects  un bon serveur de proxy les
        utilisateurs n'ont plus besoin de cache individuel.  Voir aussi
        ``Les rpertoires personnels des utilisateurs'' et ``Le Web''.



  88..55..  BBeessooiinnss eett uussaaggee

  Lorque vous achetez une bote de 10 cdroms avec une distribution
  Linux et le contenu de gros sites FTP, il peut tre tentant de vouloir
  installer autant de choses que vos disques le peuvent. Cependant, vous
  ne tarderez pas  trouver que a vous laisse bien peu de place pour
  voluer. Voil pourquoi je soulignerai quelques points importants.



     TTeesstteerr
        Linux est simple et vous n'avez mme pas besoin d'un disque dur
        pour cela. Il sufit d'une disquette de dmarrage comme celles
        fournies avec les distributions. Si vos priphrique ne sont pas
        supports, n'oubliez pas qu'il y a souvent plusieurs versions de
        disquette de dmarrage pour les priphriques exotiques qui
        peuvent vous dpanner jusqu' la compilation d'un noyau
        personnalis.


     AApppprreennddrree
        comment marche un systme d'exploitation est trs facile avec
        Linux:  c'est un systme qui vient avec les sources et une
        abondante documentation. Un disque de 50 Mo suffit pour avoir un
        shell et les utilitaires les plus  courants.


     SSii aa ddeevviieenntt uunn hhoobbbbyy
        des programmes plus nombreux sont ncessaires, mais 500 Mo sur
        un seul disque devraient suffire pour les binaires, les sources
        et la documentation.


     PPoouurr uunn uussaaggee pprrooffeessssiioonnnneell
        ou amateur srieux, il faut encore plus de place, des queues
        pour le courrier lectronique et les nouvelles, etc. Sparer les
        fichiers entre plusieurs disques peut tre bnfique. La place
        requise est plus difficile  estimer, mais 2  4 Go devraient
        tre plus que suffisants, mme pour un petit serveur.


     LLeess sseerrvveeuurrss
        vont du simple serveur de courrier lectronique au gros serveur
        pour un fournisseur d'accs  Internet. Compter 2 Go pour le
        systme de base, ajouter ensuite de la place (et probablement
        des disques) pour chaque service propos. Le cot est ici le
        facteur limitant mais si on veut justifier le S de Service il
        faut bien dpenser un peu. J'admets que tous les fournisseurs
        d'accs ne le font pas.



  88..66..  SSeerrvveeuurrss

  Dans les appendices on trouvera les valeurs  employer pour un serveur
  dpartemental (de 10  100 utilisateurs). Dans cette section on
  parlera des grands serveurs. De manire gnrale n'ayez pas peur
  d'employer le RAID, pas seulement parce qu'il est rapide et fiable
  mais aussi parce qu'il est un peu plus facile de faire grandir un
  systme RAID. Ce qui est mentionn ici s'ajoute aux remarques
  prcdentes.

  Le plus souvent les gros serveurs ne sont pas apparus comme a, mais
  ils ont grandi progressivement. Dans la plupart des cas c'est une
  bonne ide de rserver un ou plusieurs disque SCSI pour chaque tche.
  Cela permet de rcuprer efficacement les donnes si le serveur est
  hors d'usage. Notez que transporter un disque d'une machine  une
  autre n'est pas si simple, en particulier pour les disques IDE.  Et
  les tours de disques SCSI ont besoin d'une initialisation correcte
  pour reconstruire les donnes, donc vous devez garder une copie papier
  de votre fichier /etc/fstab comme des numros de srie des disques
  SCSI.


  88..66..11..  RRppeerrttooiirreess ppeerrssoonnnneellss ddeess uuttiilliissaatteeuurrss

  Faites une estimation du nombre de disques requis, si c'est plus que 2
  je recommande fortement le RAID. Si vous ne l'utilisez pas, vous
  pouvez utiliser un algorithme de hachage simple pour rpartir la
  charge entre les disques. Par exemple vous pouvez utiliser les deux
  premires lettres du nom de login, ainsi jbloggs est mis sur
  /u/j/b/jbloggs o /u/j est un lien symbolique vers un disque physique.


  88..66..22..  SSeerrvveeuurr FFTTPP aannoonnyymmee

  C'est un quipement essentiel si vous attachez de l'importance  la
  notion de service. Les bons serveurs sont bien maintenus, documents,
   jour, et trs populaires o qu'ils soient dans le monde. Le serveur
  ftp.funet.fi <ftp://ftp.funet.fi> (ndT: et en France ftp.lip6.fr
  <ftp://ftp.lip6.fr/>) est un exemple de "gros serveur FTP".

  En gnral c'est plutt la bande passante du rseau que la vitesse du
  processeur qui compte. La taille varie beaucoup. Je crois que
  l'archive de ftp.cdrom.com <ftp://ftp.cdrom.com> est une machine *BSD
  avec 50 Go de disque. La mmoire vive est importante aussi: 256 Mo
  pour un gros serveur mais de plus petits peuvent se contenter de 64
  Mo.


  88..66..33..  LLaa ttooiillee ((WWWWWW))

  Pour beaucoup c'est la principale raison d'aller sur l'Internet. En
  plus de consommer de la bande passante, cette activit gnre des
  besoins en cache disque. Garder le cache sur un disque rapide,  part
  peut tre intressant. Avoir un serveur de proxy est encore mieux.
  Cela peut rduire la taille du cache pour chaque utilisateur et
  acclrer le service en diminuant la bande passante utilise.

  Un serveur de cache a besoin d'un ensemble de disques rapides, le
  RAID0 est idal dans ce cas car la fiabilit n'est pas primordiale.  2
  Go devraient suffire. Ne pas oublier d'adapter la dure de vie des
  pages dans le cache  la capacit disque et aux besoins. On peut
  adapter la dure de vie selon les serveurs, voir: Harvest, Squid
  <http://www.nlanr.net/Squid> ou le serveur de Netscape
  <http://www.netscape.com> pour plus de dtails.


  88..66..44..  CCoouurrrriieerr lleeccttrroonniiqquuee

  La plupart des machines manipulent, peu ou prou, du courrier
  lectronique. Cependant, les grands serveurs de courrier forment une
  catgorie  part. C'est une tche trs exigeante et mme un gros
  serveur dot de disques rapides et d'une bonne connexion au rseau
  peut se rvler lent  l'usage. A la diffrence des news qui sont
  rparties sur plusieurs serveurs, le courrier lectronique est
  centralis. La scurit est donc bien plus importante. Pour un gros
  serveur envisagez une solution RAID redondante (RAID4 ou RAID5).


  88..66..55..  NNeewwss

  C'est une tche qui demande de grands volumes, mais cela dpend
  beaucoup du nombre de forums o vous souscrivez. Sur Nyx il y a en a
  17 Go. Les plus grands groupes sont sans doute dans la hirarchie
  alt.binary.*, vous pouvez sans doute assurer un bon service avec 12 Go
  si vous ns vous abonnez pas  ces groupes. Certains que je ne nommerai
  pas pensent que 2 Go suffisent pour prtendre assurer un "Service
  d'Accs  Internet". Dans ce cas les news expirent si vite que le mot
  de "service" se justifie peu. Un vrai serveur de news signifie un
  trafic de plusieurs Go par jour, et ce nombre ne cesse de crotre.



  88..66..66..  AAuuttrreess

  Il y a plein de services disponibles sur Internet, mme si la plupart
  ont t jet aux oubliettes par la Toile. Cependant, des services
  comme _a_r_c_h_i_e, _g_o_p_h_e_r et _w_a_i_s existent encore et restent des outils
  apprciables.


  88..77..  PPiiggeess

  Les dangers de tout scinder entre des partitions distinctes sont
  mentionns dans la section sur la gestion de volume. Mais on m'a
  demand d'insister sur ce point: quand une partition est pleine, elle
  ne peut plus grandir, mme s'il y a de la place sur les autres
  partitions.

  En particulier, il faut veiller  la croissance explosive de la queue
  des News (/var/spool/news). Pour les machines multi-utilisateurs avec
  des quotas gardez un oeil sur /tmp et /var/tmp car certains
  utilisateurs stockent leurs fichiers l, recherchez seulement les noms
  de fichiers termins par gif ou jpeg ...

  Il n'y a aucun avantage  tirer d'un seul disque scind en plusieurs
  partitions, si ce n'est que a rend la surveillance des fichiers (avec
  la commande 'df') plus facile et que a permet de mettre les
  partitions rapides sur le milieu (physique) du disque.  Mais a
  n'apporte rien en terme d'accs en parallle  plusieurs partitions


  88..88..  CCoommpprroommiiss

  Une manire d'viter le pige mentionn ci-dessus est de ne mettre que
  les partitions dont la taille est peu susceptible de varier comme le
  swap, /tmp et /var/tmp et de regrouper les autres dans les partitions
  restantes au moyen de liens symboliques.

  Exemple: Soit un disque lent (slowdisk), et un disque rapide
  (fastdisk), et une collection de fichiers. Nous mettons swap et tmp
  sur fastdisk; /home et la racine sur slowdisk. Et nous avons encore
  les rpertoires (fictifs) /a/slow, /a/fast, /b/slow and /b/fast 
  placer sur les deux partitions /mnt.slowdisk et /mnt.fastdisk faites
  avec l'espace restant sur chaque disque.

  Mettre /a ou /b directement sur l'une des deux partitions donnera les
  mmes proprits  tous les sous-rpertoires de chacun de ces
  rpertoires, et nous voulons l'viter. Tailler 4 partitions pour ces 4
  rpertoires ferait perdre de la flexibilit, nous l'viterons aussi.
  La bonne solution est de faire de ces 4 rpertoires des liens
  symboliques vers les bons rpertoires de chacun des disques. Ainsi:



       /a/fast lien symbolique vers /mnt.fastdisk/a.fast
       /a/slow lien symbolique vers /mnt.slowdisk/a.slow
       /b/fast lien symbolique vers /mnt.fastdisk/b.fast
       /b/slow lien symbolique vers /mnt.slowdisk/b.slow




  Et nous avons tous les rpertoires rapides sur le disque rapide sans
  avoir  faire une partition pour chacun d'entre eux.

  Le dsavantage est que c'est relativement compliqu et qu'il faut
  prvoir tous les points de montage, liens symboliques et partitions
  avant d'installer le systme.
  99..  IImmppllmmeennttaattiioonn

  Les distributions rcentes ont des outils qui vous guideront pour le
  partitionnement et le formatage des disques, et gnreront un fichier
  /etc/fstab automatiquement. Mais pour y faire des modifications par la
  suite, vous devez comprendre les mcanismes que a met en jeu.


  99..11..  DDiissqquueess eett PPaarrttiittiioonnss

  Avec DOS ou autre vous trouvez toutes les partitions avec des noms
  comme C: D:, sans diffrenciation pour les disques IDE, SCSI, rseau,
  etc. Dans le monde de Linux c'est diffrent. Au dmarrage vous verrez
  un message comme:

  ______________________________________________________________________
  Dec  6 23:45:18 demos kernel: Partition check:
  Dec  6 23:45:18 demos kernel:  sda: sda1
  Dec  6 23:45:18 demos kernel:  hda: hda1 hda2
  ______________________________________________________________________



  Les disques SCSI se nomment sda, sdb, sdc etc, et les disques (E)IDE
  se nomment hda, hdb, hdc etc.  Il y a aussi des noms standards pour
  tous les priphriques (souris, clavier, disquette, etc), voir
  /dev/MAKEDEV et /usr/src/linux/Documentation/devices.txt.

  Les partitions sont notes par des numros sur chaque disque, hda1,
  hda2, etc. Sur les disques SCSI il peut y avoir jusqu' 15 partitions,
  et sur les disques EIDE drives jusqu' 63 partitions. Ces deux limites
  sont bien au-del de ce qui est utile.

  Ces partitions sont montes selon les indication du fichier /etc/fstab
  pour que les fichiers qu'elles contiennent soient accessibles.


  99..22..  PPaarrttiittiioonnnneemmeenntt

  D'abord vous devez partitionner chaque disque. Sous Linux il y a deux
  mthodes, fdisk et cfdisk (plus convivial) (ndT: il y a aussi d'autres
  outils avec les distributions RedHat ou SuSE).  Ces programmes sont
  complexes, lisez les pages de manuel _t_r__s _a_t_t_e_n_t_i_v_e_m_e_n_t. Sous DOS il y
  a d'autres possibilits, comme fdisk ou fips. Ce dernier a l'avantage
  qu'il peut partitionner un disque sans ncessairement craser toutes
  les donnes. Avant de lancer fips vous devez dfragmenter votre
  disque. Si vous utilisez FAT32 vous pouvez utiliser la dernire
  version de fips ( partir de 15c).

  Il faudra d'abord dfragmenter. Cela mettra toutes les donnes au
  dbut du disque, et l'espace vide restant peut tre utilis pour
  tailler de nouvelles partitions.

  De toute faon, il est indispensable de faire une sauvegarde complte
  de toutes vos donnes importantes avant de partitionner.

  Il y a trois types de partitions, primaire, tendue and logique. On ne
  peut dmarrer que sur une partition primaire, et le nombre de
  partitions primaires est limit  4. Si vous avez besoin de plus de
  partitions, vous devez dfinir des partitions tendues, qui
  contiendront de partitions logiques.

  Chaque partition a un numro qui indique quel systme de fichiers elle
  utilise, pour Linux les seuls types  connaitre sont swap et ext2fs.


  Pour plus d'informations, consuler le fichier README qui vient avec
  fdisk ou le _P_a_r_t_i_t_i_o_n_i_n_g _H_O_W_T_O.

  RedHat a un utilitaire interactif appel _D_i_s_k _D_r_u_i_d qui est est
  suppos tre une alternative plus conviviale  fdisk et automatiser
  d'autres tches. Cependant cet outil n'est pas tout  fait mature:
  s'il ne fait pas ce que vous voulez, utilisez plutt fdisk ou cfdisk.


  99..33..  DDiissqquueess MMuullttiipplleess (( mmdd ))

  Assurez-vous que vous avez la documentation la plus rcente sur cette
  fonctionnalit du noyau. Ce n'est pas encore stable, vous voil
  prvenu.

  En bref cela consiste  rassembler des partitions en de nouveaux
  priphriques md0, md1 etc. en utilisant mdadd, puis  les activer
  avec mdrun. Cela peut tre automatis avec le fichier /etc/mdtab.

  On peut ensuite considrer md0, md1 comme n'importe quel disque. Il y
  a maintenant un HOWTO sur le RAID avec md auquel je vous renvoie pour
  les dtails.


  99..44..  FFoorrmmaattaaggee

  Aprs le partitionnement vient le formatage, c'est--dire l'criture
  des structures de donnes qui permettront de dcrire les attributs et
  la position des fichiers. Si c'est la premire fois que vous formatez
  il est recommand d'utiliser l'option "verify" ou "check for bad
  blocks". A strictement parler, c'est inutile, mais cela peut rsoudre
  des problmes comme la terminaison (pour le SCSI). Voir la
  documentation de mkfs pour les dtails.

  Linux est compatible avec un nombre impressionnant de systmes de
  fichiers. Faire man fs pour la liste complte. Notez que votre noyau
  doit avoir le pilote adquat pour pouvoir accder  un systme de
  fichiers. Lors de l'tape de configuration du noyau (make menuconfig
  ou make xconfig) vous avez de l'aide en ligne pour chaque systme de
  fichiers et vous pouvez choisir de l'inclure dans le noyau ou d'en
  faire un module.

  Notez que certaines disquettes de sauvetage ont besoin des systmes de
  fichiers minix, msdos et ext2fs compils dans le noyau.

  Les partitions de swap (change) doivent aussi tres formates,
  utilisez mkswap pour a.


  99..55..  MMoonnttaaggee

  Les donnes d'une partitions ne sont pas visibles avant d'tres
  montes dans un endroit de l'arborescence appel point de montage de
  la partition. Cela est fait  la main avec le programme mount ou bien
  automatiquement durant le dmarrage. La liste des partitions avec leur
  point de montage est dans le fichier /etc/fstab. Lisez le manuel de
  mount et faites trs attention aux tabulations dans le fichier
  /etc/fstab (elles ne sont pas quivalentes  des espaces).


  1100..  MMaaiinntteennaannccee

  C'est le travail de l'ingnieur systme de garder un oeil sur les
  disques et les partitions. Si une partition est pleine, le systme
  aura des dysfonctionnements, quelle que soit la place libre sur les
  autres partitions.
  Pour voir la liste des partitions actuellement montes, avec le point
  de montage et le pourcentage de place libre, taper df.  Cela doit tre
  fait rgulirement, par exemple avec une crontab.

  Les partitions de swap peuvent tre surveilles avec les outils de
  statistique de la mmoire comme free, procinfo ou top.

  Surveiller l'usage des disques est plus dlicat mais c'est important
  pour les performances. Il faut viter que le mme disque soit
  sollicit tout le temps quand d'autres sont inactifs.

  Il est important quand on installe un logiciel de savoir prcisment
  o vont les fichiers. Ainsi, pour des raisons historiques, GCC qui met
  des excutables dans les rpertoires de librairie. On peut aussi
  mentionner X11 dont la structure est trs complexe.

  Lorsque votre systme est au bord de l'asphyxie il est temps de faire
  la chasse aux fichiers temporaires, fichiers de log, fichiers core et
  autres. Un bon usage de ulimit dans les paramtres globaux du shell
  peut vous aider  viter d'avoir des fichiers core un peu partout.


  1100..11..  SSaauuvveeggaarrddee

  Le lecteur attentif aura remarqu les allusions rpts  l'utilit
  des sauvegardes. Les films d'horreur sont nombreux o l'on parle
  d'accidents et de ce qui est arriv aux personnes responsables quand
  la sauvegarde s'est avre inutilisable, voire inexistante. Il est en
  gnral plus simple d'investir dans des moyens de sauvegarde dcents
  que de se trouver une seconde identit ...

  Il y a de nombreuses possibilits, et un mini-HOWTO ( Backup-With-
  MSDOS ) dtaille tout ce que vous devez savoir, en plus d'informations
  spcifiques  MSDOS.

  En plus de faire des sauvegardes, vous devez vous assurer que vous
  pouvez retrouver les donnes. Les donnes crites ne sont pas toujours
  correctes, et de nombreux administrateurs systmes ont un jour
  commenc  restaurer le systme aprs un accident, joyeux  la pense
  que tout marchait, lorsqu'ils dcouvrirent avec horreur que les
  sauvegardes n'taient pas utilisables. Soyez prudents.


  1100..22..  DDffrraaggmmeennttaattiioonn

  Cela varie beaucoup selon le systme de fichiers. Certains souffrent
  d'une dfragmentation rapide et presque paralysante. Heureusement ce
  n'est pas le cas de ext2fs et c'est pourquoi on a trs peu parl des
  outils de dfragmentation. En fait, il en existe, mais il est rare
  qu'on en aie mme le besoin.

  Si vous voulez le faire pour une raison ou pour une autre, le moyen
  simple et rapide est de faire une sauvegarde puis une rcupration. Si
  cela ne concerne qu'une petite partie des fichiers, pas exemple les
  rpertoires utilisateurs, vous pouvez le tar-er dans une zone
  temporaire sur une autre partition, _v__r_i_f_i_e_r l'archive, effacer
  l'orignial et le d-tar-er.


  1100..33..  EEffffaacceemmeenntt

  Le plus souvent le manque de place est rsolu par l'effacement des
  fichiers inutiles qui s'accumulent. Les programmes qui ne terminent
  pas normalement laissent toutes sortes de trucs traner aux endroits
  les plus bizarres. Normalement un fichier appel _c_o_r_e est cr en cas
  de plantage d'un programme. Il ne sert qu' deboguer, donc vous pouvez
  l'effacer si vous ne comptez pas dboguer. Ces fichiers peuvent se
  trouver n'importe o dont il est recommand de les chercher de faon
  globale. (ndT: find / -name core devrait marcher)

  L'arrt prmatur des programmes laisse aussi des fichiers temporaires
  dans des rpertoires comme /tmp ou /var/tmp, fichiers qui auraient t
  effacs si le programme avait termin normalement. Ces rpertoires
  sont en gnral nettoys au dmarrage, mais si vous ne redmarrez
  jamais ils peuvent finir par tre plein de vieux trucs. N'effacez pas
  les fichiers aveuglment. Des utilitaires comme find et file peuvent
  vous servir  localiser les fichiers plus vieux que telle date et 
  connatre le type d'un fichier.

  Beaucoup de choses sont archivs lorsque le systme fonctionne, en
  particulier dans le rpertoire /var/log. Les messages du noyau sont
  mis dans /var/log/messages qui a une certaine tendance  grossir avec
  le temps. Il peut tre bon d'avoir une petite archive de ce fichier
  pour pouvoir le comparer avec les messages du noyau si le systme
  commence  se comporter bizarrement.

  Si le courrier ou les news ne fonctionnent pas correctement, c'est
  peut-tre d  une croissance excessive de /var/spool/mail et
  /var/spool/news. Faites attention aux fichiers dont le nom commence
  par ".", il ne sont pas affichs par ls -l, c'est pourquoi on
  recommande d'utiliser plutt ls -Al.

  Le dpassement de capacit des rpertoires utilisateurs est une
  question dlicate. De vritables guerres ont dj eu lieu entre
  utilisateurs et administrateurs  ce sujet. Le tact, la diplomatie et
  un budget gnreux pour de nouveaux disques sont les solutions. En
  utilisant le mot-du-jour, un petit message dans le fichier /etc/motd
  qui est affich chaque fois qu'un utilisateur se loggue, on peut
  sensibiliser les utilisateurs. Mettre les bonnes valeurs par dfaut
  pour empcher les fichiers core d'tre produits pargne bien du
  travail.

  Certaines personnes essayent de cacher les fichiers, en utilisant le
  fait que les fichiers dont le nom commence par un point ne sont pas
  visibles pour la comande ls. Un exemple classique est ...  qui n'est
  donc pas vu par ls et passe inaperu  ct de . et .. si on fait ls
  -al. La solution est de faire ls -Al qui affiche tous les fichiers
  sauf . et ..


  1100..44..  MMiisseess  jjoouurr

  Quelle que soit la taille de vos disque, ce sera un jour trop petit.
  Actuellement ce sont les disques de 6.4 Go qui offrent le meilleur
  rapport place/prix.

  Avec des disques IDE vous aurez peut-tre  enlever un vieux disque,
  le nombre total tant limit  2 ou 4. Avec le SCSI vous pouvez avoir
  jusqu' 7 disques en 8-bit et 15 en 16-bit (wide SCSI) par canal. Mais
  certains adaptateurs ont plusieurs canaux et qu'on peut mettre
  plusieurs adaptateurs. Mon point de vue est qu'avec le SCSI on est
  plus content sur le long terme.

  Et maintenant la question bateau, que faire de ce nouveau disque ?
  Souvent c'est pour tendre les queues qu'on a d tendre, donc la
  solution simple est de monter les nouveaux disques dans /var/spool.
  D'un autre ct les nouveaux disques tant plus rapides, c'est
  peut-tre l'occasion de revoir tout en profondeur.

  Si la mise  jour est rendue indispensable par le manque de place dans
  /usr ou /var elle est un peu plus complexe. Vous pouvez envisager la
  rinstallation complte de la toute dernire version de votre
  distribution prfre. Dans ce cas faites trs attention  ne pas
  craser vos rglages essentiels. Les fichiers de configuration sont
  pour la plupart dans le rpertoire /etc. Procder avec soin, avec une
  sauvegarde rcente et des disquettes de sauvetage qui marchent. Une
  autre possibilit que la rinstallation est de simplement copier le
  vieux rpertoire vers le nouveau, qui est mont sur un point de
  montage provisoire. Puis diter le fichier /etc/fstab pour que le
  chemin du rpertoire pointe vers la nouveau, et redmarrez. Si le
  dmarrage choue, vous pouvez redmarrer avec une disquette de
  secours, diter  nouveau /etc/fstab et ressayer.

  Tant qu'il n'y aura pas de logiciel de gestion de volume pour Linux a
  restera  la fois complexe et dangereux. Ne soyez pas surpris si vous
  dcouvrez que vous devez restaurer le systme d'aprs une sauvegarde.

  Le Tips-HOWTO donne l'exemple suivant pour dplacer toute une
  structure de rpertoire:

  ______________________________________________________________________
  (cd /source/directory; tar cf - . ) | (cd /dest/directory; tar xvfp -)
  ______________________________________________________________________



  a marchera sur la plupart des systmes Unix. Attention aux
  rpertoires dont la structure arborescente est trop profonde, elle
  peut faire chouer un tar autre que GNU tar.

  Si vous avez accs  GNU cp (c'est toujours le cas sous Linux) vous
  pouvez aussi bien utiliser


  ______________________________________________________________________
  cp -av /source/directory /dest/directory
  ______________________________________________________________________



  GNU cp sait se dbrouiller avec les liens symboliques, les FIFO et les
  fichiers de priphriques et les copier correctement.

  Rappelez-vous que ce n'est jamais une bonne ide de transfrer /dev ou
  /proc


  1111..  UUttiilliissaattiioonn aavvaannccee

  Linux et ses cousins offrent de nombreuses possibilits pour une
  destruction rapide et efficace du systme. Ce document n'y fait pas
  exception. Avec le savoir vient le pouvoir et donc le danger, et les
  paragraphes qui suivent prsentent des sujets plus sotriques qui ne
  devraient pas tre abords avant d'avoir lu et compris la
  documentation et les piges. Vous devriez faire une sauvegarde, et
  essayer au moins une fois d'craser et de restaurer compltement votre
  systme. Sinon vous ne serez pas le premier  avoir une superbe
  sauvegarde et rien pour la rinstaller (ou, encore plus gnant, des
  fichiers essentiels manquent sur la bande).

  Les techniques dcrites ici sont rarement utiles mais servent  des
  installations particulires. Pensez srieusement  ce que vous voulez
  faire avant d'aller plus loin.





  1111..11..  PPaarraammttrreess dduu ddiissqquuee dduurr

  Les paramtres physiques du disque dur peuvent tre changs avec
  l'utilitaire hdparms. Le paramtre le plus intressant est sans doute
  _r_e_a_d_-_a_h_e_a_d qui dtermine combien de bits on doit lire d'avance en
  lecture squentielle.

  Ce qui fait le plus de sens est de slectionner la longueur moyenne
  des fichiers. Mais cette moyenne pour tout un disque physique peut
  tre non significative. Probablement cela n'est utile que sur les
  disques spcialiss dans les news ou le courrier lectronique des
  grands serveurs.

  Pour des raisons de scurit les valeurs par dfaut de hdparm sont
  plutt conservateurs. L'inconvnient est que vous pouvez avoir des
  interruptions qui se perdent si vous avez des IRQ  grande frquence
  comme lorsqu'on utilise le port srie et un disque IDE en mme temps,
  les IRQ du disque vont masquer les autres. Ce qui entrane des
  performances tout sauf optimales lors du tlchargement sur Internet.
  Slectionner hdparm -u1 device enlvera ce masquage et mme amliorera
  vos performances, ou bien endommagera les donnes du disque. A essayer
  avec prudence et avec des sauvegardes rcentes.


  1111..22..  PPaarraammttrreess dduu ssyyssttmmee ddee ffiicchhiieerrss

  La plupart des systmes de fichiers viennent avec un utilitaire de
  configuration: ainsi tune2fs pour ext2fs.  On peut jouer avec
  plusieurs paramtres, mais le plus utile est peut-tre la taille qu'on
  peut rserver.  Cela peut vous aider  avoir plus d'espace utile sur
  vos disques. En revanche vous aurez moins de place pour rparer le
  systme s'il crashe.


  1111..33..  SSyynncchhrroonniissaattiioonn ddeess aaxxeess

  Cela ne devrait pas tre dangereux en soi, mis  part que les dtails
  exacts des connections ne sont pas bien connus pour beaucoup de
  disques. La thorie est simple: garder une diffrence de phase fixe
  entre les diffrents disques d'un ensemble RAID. Cela diminue le temps
  d'attente pour que la bonne piste soit en position pour la tte de
  lecture/criture.  En pratique , avec de grands tampons pour la
  lecture d'avance, le gain est ngligeable.

  La synchronisation des axes ne doit pas tre utilise dans un ensemble
  RAID0 ou RAID 0/1 car on perdrait le bnfice d'avoir les ttes de
  lectures sur des emplacements diffrents.


  1122..  PPoouurr pplluuss dd''iinnffoorrmmaattiioonn

  Il y a pas mal d'information disponible pour ceux qui mettent en place
  un grand systme, par exemple les fournisseurs d'accs  Internet.
  Les FAQs des forums suivants sont utiles:


  1122..11..  FFoorruummss

  Parmi les plus intressants:

    Storage <news:comp.arch.storage>.

    PC storage <news:comp.sys.ibm.pc.hardware.storage>.

    AFS <news:alt.filesystems.afs>.

    SCSI <news:comp.periphs.scsi>.

    Linux setup <news:comp.os.linux.setup>.

    Linux (francophone) <news:fr.comp.os.linux>.

  La plupart des forums ont leur propre FAQ destine  rpondre aux
  questions les plus courantes, comme le nom de Foire Aux Questions
  l'indique. Si vous ne les trouvez pas dans la queue des news vous
  pouvez aller directement  l'archive FTP des principales FAQs
  <ftp://rtfm.mit.edu>.  La version hypertexte se trouve  l'archive
  HTTP des principales FAQs <http://www.cis.ohio-
  state.edu/hypertext/faq/usenet/FAQ-List.html>.

  Certaines FAQs ont leur propre site, en particulier

    la FAQ SCSI <http://www.paranoia.com/~filipg/HTML/LINK/F_SCSI.html>
     et

    la FAQ de comp.arch.storage
     <http://alumni.caltech.edu/~rdv/comp_arch_storage/FAQ-1.html>.


  1122..22..  MMaaiilliinngg lliissttss

  Ce moyen de communication destin aux dveloppeurs a un bon rapport
  signal/bruit. Repensez-y  deux fois avant de poser des questions sur
  les mailing-lists car le bruit ralentit l'effort de dveloppement.
  Parmi les listes qui nous concernent, linux-raid, linux-scsi et linux-
  ext2fs. La plupart des mailing lists intressantes sont sur le serveur
  vger.rutgers.edu, mais il est vraiment surcharg, essayez plutt un
  mirroir. Il y a un miroir de quelques listes sur le site de Redhat
  <http://www.redhat.com>.  La plupart des listes sont aussi accessibles
  sur le site Linux HeadQuarters <http://www.linuxhq.com/lnxlists>, et
  le reste de la toile est une mine d'or pour les informations.

  Si vous voulez en savoir plus sur les listes existantes vous pouvez
  envoyer un message au serveur de listes de vger.rutgers.edu
  <mailto:majordomo@vger.rutgers.edu> donc le corps contiendra le seul
  mot "lists".  Si vous voulez savoir comment marche une mailing list
  envoyez un message avec le seul mot help  la mme adresse.  A cause
  du succs de ce serveur il est possible que la rponse prenne un
  certain temps.

  Il y a aussi un certain nombre de serveurs majordomo intressants,
  comme la liste des pilotes EATA <mailto:linux-eata@mail.uni-mainz.de>
  et la liste des entres/sorties intelligentes <mailto:linux-
  i2o@dpt.com>.

  Les mailing lists voluent rapidement mais un certain nombre de listes
  intressantes sont sur la page du Linux Documentation Project
  <http://sunsite.unc.edu/LDP>.


  1122..33..  HHOOWWTTOO

  Ce sont les premires sources d'information gnrale, mais on y trouve
  aussi la solution  bien des problmes spcifiques.  Les HOWTOs
  apparents  celui-ci sont Bootdisk, Installation,  SCSI et UMSDOS.
  le site principal en anglais est l'archive du LDP sur sunsite
  <http://sunsite.unc.edu/LDP>.  Le mirroir en France (qui contient
  aussi la traduction des HOWTOs en franais) est Freenix
  <http://www.freeenix.fr>.

  Il y a un nouveau HOWTO qui parle de la mise en place d'un systme
  RAID DPT, voir the DPT RAID HOWTO homepage
  <http://www.ram.org/computing/linux/dpt_raid.html>.


  1122..44..  MMiinnii--HHOOWWTTOO

  Parmi ceux qui nous concernent: Backup-With-MSDOS, Diskless, LILO,
  Linux+DOS+Win95+OS2, Linux+OS2+DOS, Linux+Win95, NFS-Root,
  Win95+Win+Linux, ZIP Drive.

  On les trouve aux mmes endroits que les HOWTOs.

  Le vieux Linux Large IDE mini-HOWTO est obsolte, lisez plutt
  /usr/src/linux/drivers/block/README.ide ou
  /usr/src/linux/Documentation/ide.txt (ces fichiers font partie de la
  documentation des sources du noyau).


  1122..55..  DDooccuummeennttaattiioonn llooccaallee

  Le plupart des distributions Linux ont un rpertoire de documentation
  <file:///usr/doc> o l'on trouve souvent un sous-rpertoire un sous-
  rpertoire pour les HOWTOs <file:///usr/doc/HOWTO>

  Les fichiers de configuration mentionns plus haut sont dans le
  rpertoire /etc <file:///etc>. En particulier /etc/fstab
  <file:///etc/fstab> pour les points de montage et mdtab
  <file:///etc/mdtab> qui est utilis pour la configuration du RAID.

  La documentation des sources de linux <file:///usr/src/linux> est bien
  sr la source ultime d'information.  Pas seulement avec les
  commentaires qui sont dans le code mais aussi avec le rpertoire de
  documentation <file:///usr/src/linux/Documentation>.  Si vous vous
  posez une question au sujet du noyau vous devez d'abord chercher l.

  Les fichiers o sont stocks les messages du noyau
  <file:///var/log/messages> permettent de savoir ce qui se passe, en
  particulier si les messages ont dfil trop vite au dmarrage. Avec la
  commande tail -f /var/log/messages dans une fentre ou un cran
  spar, vous aurez une information toujours  jour sur ce qui se passe
  dans votre systme.

  Vous pouvez aussi utiliser le systme de fichiers /proc <file:///proc>
  qui donne de l'info en temps rel sur le systme.  Utiliser cat plutt
  que more pour voir ces fichiers car leur longueur dclare est zro.

  Tout est bas ici sur le Filesystem Structure Standard (FSSTND).  Il
  est en train de changer de nom pour devenir File Hierarchy Standard
  (FHS) et tre moins propre  Linux.  Il y a une page Web du FHS
  <http://www.pathname.com/fhs> qui explique comment rejoindre la
  mailing list prive des dveloppeurs.


  1122..66..  PPaaggeess WWWWWW

  Il y a un grand nombre de pages Web intressantes, et elles bougent
  beaucoup, ne soyez pas tonns si ces liens deviennent obsoltes.

  Un bon point de dpart est sur Sunsite: c'est l'archive du Linux
  Developpement Project <http://sunsite.unc.edu/LDP/>


    Mike Neuffer, l'auteur du cache caching et des pilotes pour
     contrleurs RAID, a des pages intressantes sur SCSI
     <http://www.uni-mainz.de/~neuffer/scsi> et DPT <http://www.uni-
     mainz.de/~neuffer/scsi/dpt>.

    Sur le dveloppement du RAID 1 logiciel, voir la page des
     dveloppeurs RAID 1 <http://www.nuclecu.unam.mx/~miguel/raid>.

    Sur (entre autres) la mesure de performances, le RAID, la
     fiabilit, voir la page du projet Linas Vepstas <http://linas.org>.

    Il y a aussi un HOWTO sur comment avoir en RAID la partition racine
     <ftp://ftp.bizsystems.com/pub/raid/Root-RAID-HOWTO.html>.

    Voir enfin ici pour la documentation dtaille de ext2fs
     <http://step.polymtl.ca/~ldd/ext2fs/ext2fs_toc.html>.

    Mark D. Roth a une page sur VPS <http://www.uiuc.edu/ph/www/roth>

    Un projet similaire: Enhanced File System
     <http://www.virtual.net.au/~rjh/enh-fs.html>

    Il y a un projet de compression qui s'intgrerait  ext2fs et
     s'appelle e2compr. Voir la maison-page de e2compr
     <http://netspace.net.au/~reiter/e2compr.html>.

    Pour plus d'information sur le dmarrage et sur BSD voir ici
     <http://www.paranoia.com/~vax/boot.html> page.

  On trouve des tableaux sur les disques, les contrleurs, etc.  la
  page appele The Ref <http://theref.c3d.rl.af.mil>.  On peut
  l'interroger en ligne ou tlcharger la base de donnes par FTP
  <ftp://theref.c3d.rl.af.mil/public>.


  1122..77..  MMootteeuurrss ddee rreecchheerrcchhee

  N'oubliez pas que vous pouvez utiliser les moteurs de recherche,
  comme:

    Altavista <http://www.altavista.digital.com>

    Excite <http://www.excite.com>

    Hotbot <http://www.hotbot.com>

  Il y a aussi Dejanews <http://www.dejanews.com>, ddi  la recherche
  dans les news, qui archive les forums depuis 1995.

  Si vous voulez de l'aide vous posterez sans doute dans le forum Linux
  Setup <news:comp.os.linux.setup> (ndT: Pour les francophones consulter
  plutt le forum franais sur Linux <news:fr.comp.os.linux>)


  1133..  CCoommmmeenntt oobbtteenniirr ddee ll''aaiiddee


  Il se peut que, dans l'incapacit  rsoudre vos problmes par vous-
  mme, vous ayez besoin d'aide. Le moyen le plus sr est de demander 
  quelqu'un dans le groupe d'utilisateurs Linux le plus proche de chez
  vous.

  Une autre possibilit est de poster dans les news. Le problme est que
  le rapport signal/bruit des newsgroups est parfois faible et votre
  question peut trs bien passer inaperue.

  Quel que soit l'endroit o vous demandez, il est important de bien
  poser la question. Dire juste _m_o_n _d_i_s_q_u_e _d_u_r _n_e _m_a_r_c_h_e _p_a_s ne risque
  pas de vous aider: au mieux, quelqu'un vous demandera d'tre plus
  prcis.

  Il est recommand de dcrire le problme avec assez de dtails pour
  permettre aux gens de vous aider. Il peut se produire l o vous vous
  y attendez le moins. Voil pourquoi il faut dcrire:


     MMaattrriieell

       Le Processeur

       Le chipset (LX, BX, etc)

       Le bus (ISA, VESA, PCI etc)

       Les cartes d'extension (carte graphique, etc.)


     LLooggiicciieell

       La version du BIOS (Pour la carte-mre et ventuellement les
        adaptateurs SCSI)

       LILO, s'il est utilis

       La version du noyau et les patchs ou modifications ventuels

       Les paramtres du noyau (s'il y en a)

       Les programmes qui font apparatre l'erreur (avec numro de
        version)


     PPrriipphhrriiqquueess

       Type du disque, fabriquant, version et modle.

       Les autres priphriques prsents sur le mme bus.


  Un exemple d'inter-relation de ces diffrents lments: on a dj vu
  un vieux chipset qui cause des problmes si on utilise certaines
  combinaisons de carte graphique et d'adaptateur SCSI.

  Joindre  votre message un extrait (bref) du contenu de
  /var/log/messages peut tre utile (mais parfois regarder ce contenu
  suffit  dtecter la source du problme). Bien sr si le disque est en
  panne il est possible que ces messages ne soient pas enregistrs, mais
  on peut au moins scroller en arrire avec les touches SHIFT et PAGE
  UP.


  1144..  RReemmaarrqquueess eenn gguuiissee ddee ccoonncclluussiioonn

  La configuration des disques et le choix des partitions sont
  difficiles, et on n'a pas donn de rgles fixes ici. Cependant, y
  travailler un peu peut apporter des gains considrables. Maximiser
  l'usage d'un seul disque quand les autres sont inactif est loin d'tre
  optimal, regardez les LED, elles ne sont pas l que pour la
  dcoration. Avec un systme bien fait, les petites diodes qui
  indiquent l'activit des disques doivent clignoter comme des lampes de
  discothque. Linux permet le RAID au niveau logiciel mais supporte
  aussi quelques contrleurs RAID SCSI. Vrifiez ce qui est disponible.
  Plus tard, si vous re-partitionnez votre systme, vous pourrez jetez 
  nouveau un oeil  ce document. Les commentaires et les contributions
  sont bienvenus.


  1144..11..  EEnn pprrppaarraattiioonn


  Il y a encore quelques sujets qui vont apparatre ici. En particulier
  je vais ajouter d'autres exemples de tables pour la configuration de
  grands rseaux. Des exemples de rseaux marchant sans problme sont
  les bienvenus.

  Il reste aussi un peu de boulot dans ce HOWTO sur les systmes de
  fichiers et utilitaires.

  Une grande section sera ajouts sur les technologies de disque dur
  ainsi qu'une meilleure description sur l'utilisation de fdisk or
  cfdisk. La section sur les systmes de fichiers se remplira au fur et
   mesure que les nouveauts sortiront.

  J'ai reu rcemment une plaquette de DPT, qui fabrique le premier
  systme RAID hardware support par Linux. Leurs feuillets portent
  maintenant le petit pingouin Linux. Bientt plus d'information  ce
  sujet.

  Il y a quelques petits passages qui font double emploi avec le
  Filesystem Hierarchy Standard. Les enlever signifiera probablement un
  remaniement complet des tables de la fin de ce document.

  J'envisage aussi d'crire un programme qui automatiserait le processus
  de dcision, en donnant un point de dpart simple et plus complet.


  1144..22..  DDeemmaannddee dd''iinnffoorrmmaattiioonn

  Ecrire ce document a pris un certain temps et bien qu'il commence 
  ressembler  quelque chose, ce document a encore besoin d'information
  que seul vous, prcieux lecteurs, pouvez m'apporter.


    Plus d'information sur la taille de swap ncessaire et la plus
     grande taille de swap autorise avec les diffrentes versions du
     noyau.

    Est-ce qu'il est frquent qu'un disque soit abm ou qu'un systme
     de fichier soit corrompu ? Autant que je me souvienne, je n'ai
     jamais connu que des problmes ds  du matriel dfectueux.

    J'ai aussi besoin de documentation sur la vitesse compare des
     disques.

    Y a-t-il d'autres contrleurs RAID compatibles avec Linux ?

    Des pistes quant aux systmes de fichiers,  la gestion de volumes
     et assimils sont bienvenues.

    Quels utilitaires dignes d'intrt sont disponibles ?

    Il faudrait aussi une liste complte des sources d'information.
     Peut-tre sur un document spar ?

    L'usage de /tmp et /var/tmp est difficile  dterminer, en fait
     savoir quels programmes utilisent quel rpertoire n'est pas
     vident, plus d'information  ce sujet est bienvenue. Cependant, il
     reste clair que ces deux rpertoires doivent tre sur des disques
     diffrents pour profiter du paralllisme.




  1144..33..  SSuuggggeessttiioonnss ppoouurr ppaarrttiicciippeerr  uunn pprroojjeett..

  Sur les forums comp.os.linux.* on trouve plein de bonnes ides. Je
  vais en lister ici quelques-uns en rapport avec notre sujet.  Les
  projets ambitieux comme un nouveau systme de fichiers doivent
  toujours tre posts soit pour trouver des collaborateurs soit pour
  voir si quelqu'un ne travaille pas dj dessus.



     DDeess oouuttiillss ddee PPllaannnniinngg
        qui automatisent la conception d'un systme constituent un
        projet de taille moyenne. Une sorte d'exercice en programmation
        par contraintes.


     DDeess oouuttiillss ddee ppaarrttiittiioonnnneemmeenntt
        qui acceptent en entre le rsultat du programme mentionn ci-
        dessus et formatent les disques en parallle puis crent
        l'arborecence de fichiers avec les bons liens symboliques. Ce
        serait encore mieux si on intgrait a  des programmes
        d'installation existants. Le programme d'installation de Solaris
        est un bon exemple  mditer.


     DDeess oouuttiillss ddee ssuurrvveeiillllaannccee
        qui surveillent les partitions et tirent la sonnette d'alarme
        avant qu'elles soit pleines.


     DDeess oouuttiillss ddee mmiiggrraattiioonn
        qui permettent de dplacer sans danger des arborescences
        entires (par exemple pour migrer vers un systme RAID).  Ce
        serait par exemple un script shell assez simple contrlant un
        programme de sauvegarde. Cependant, veillez  ce qu'il soit
        scuris et qu'il permette de revenir en arrire.



  1155..  QQuueessttiioonnss // RRppoonnsseess

  Voici quelques questions frquentes et leur rponse.


    Q: De combien de disque dur Linux a besoin ?

    R: Linux marche trs bien avec un seul disque dur. Avoir assez de
     mmoire vive (32 ou 64 Mo) est un meilleur choix point de vue
     performances que d'acheter un second disque. Les disques IDE sont
     moins chers, mais aussi moins rapides que les SCSI.

    Q: J'ai un seul disque, est-ce que ce HOWTO est fait pour moi ?

    R: Oui, mais en partie seulement. Voir la section sur le
     ``Positionnement physique des pistes''.

    Q: Y a-t-il des dsavantages dans ce cas ?

    R: Un seul petit dsavantage. Si une partition n'a plus de place
     libre, le systme peut se bloquer ou se comporter bizarrement. La
     gravit dpend bien sr de la partition affecte. Cependant, ce
     n'est pas difficile  contrler, avec la commande df qui donne une
     vue gnrale de la situation. Utiliser aussi la commande free pour
     s'assurer que la mmoire virtuelle (c'est--dire la mmoire vive +
     le swap) est suffisante.

    Q: OK, je dois donc sparer mon systme entre autant de partitions
     que possible pour un seul disque ?

    R: Non, car cela a plusieurs dsavantages. D'abord la maintenance
     est plus complexe et le gain peut tre mineur. Des partitions trop
     grandes ne sont pas non plus l'idal. Il y a un juste milieu, qui
     dpend du nombre de disques que vous avez.

    Q: Est-ce que cela veut dire que plus de disques permettent d'avoir
     plus de partitions ?

    R: En un sens, oui. Cependant, certains rpertoires ne doivent pas
     tre spars de la racine (voir le FHS pour les dtails)

    Q: Et si j'ai beaucoup de disques ?

    R: Si vous avez plus que 3 ou 4 disques vous devriez penser 
     utiliser un des modes RAID. Cependant, il vaut mieux garder la
     partition root sur une partition simple (sans RAID), voir la
     section sur le ``RAID'' pour les dtails.

    Q: J'ai install le dernier Windows95 mais je n'arrive pas 
     accder aux partitions Windows depuis Linux.

    R: Sans doute votre partition Windows est formate en FAT32. C'est
     le cas pour Windows 95 OSR2 et pour Windows 98.  Linux a un support
     pour ce systme de fichiers depuis le noyau 2.0.35.

    Q: Je n'arrive pas  faire correspondre la somme des taille de mes
     disques et celle de mes partitions.

    R: Il est possible que vous ayez mont une partition en un point
     qui n'tait pas un rpertoire vide. Le point de montage est un
     rpertoire et s'il n'est par vide le montage masquera son contenu.
     Et en faisant la somme vous verrez qu'il manque la place occupe
     par le contenu de ce rpertoire avant montage.

     Pour rsoudre a vous pouvez dmarrer depuis une disquette de
     sauvetage et voir ce qui se cache derrire les points de montage.
     Vous pouvez ensuite effacer ou transfrer ces donnes en montant la
     partition en question sur un point de montage temporaire.

    Q: Qu'est ce que ce nyx qui est mentionn plusieurs fois dans ce
     HOWTO ?

    R: C'est un grand systme utilisant les Unix libres et avec 10000
     utilisateurs. Je m'en sers pour hberger mes pages Web mais aussi
     comme source d'inspiration pour ce HOWTO, en ce qui concerne la
     configuration de rseaux assez vastes. Voir la page d'accueil de
     Nyx <http://www.nyx.net> qui indique aussi comment obtenir un
     compte gratuit.



  1166..  BBrriicc----bbrraacc

  C'est une section o vont tous les paragraphes que je n'ai pas pu
  caser ailleurs: ils y restent plus ou moins longtemps.


  1166..11..  CCoommbbiinneerr llee sswwaapp  eett //ttmmpp

  On a discut dans les forums linux au sujet de systmes de fichiers
  spcialiss pour le stockage temporaire. Un peu comme tmpfs sur les
  machines *BSD et Solaris, et swapfs sur les machines NeXT.

  Combiner le swap et la partition /tmp permet de gagner de la place. Ce
  systme de fichiers spcialis n'est rien d'autre qu'un RAM disk qu'on
  peut swapper, et qui n'est mis sur le disque que lorsque la place est
  limite, ce qui revient  metter les fichiers temporaires sur la
  partition de swap.

  Il y a pourtant un hic. Ce schma interdit d'agir en parallle sur le
  swap et sur la partition /tmp ce qui peut effondrer les performances.
  Autrement dit, on change de la place disque contre de la vitesse.

  Il y a aussi un problme de scurit vis--vis des utilisateurs qui
  tentent d'effondrer une machine en remplissant le rpertoire /tmp.


  1166..22..  DDiissqquueess ddee sswwaapp  eennttrreellaaccss..

  Les partitions de swap sont accdes par la mthode du colibri
  (c'est--dire dans le dsordre), afin de rpartir grosso modo la
  charge entre plusieurs disques.  Linux offre en plus la possibilit
  d'attribuer des priorits aux disques, ce qui est utile si on a des
  disques de vitesse diffrente.  Voir man 8 swapon et man 2 swapon pour
  les dtails.


  1166..33..  FFaauutt--iill aavvooiirr oouu nnoonn uunnee ppaarrttiittiioonn ddee sswwaapp ??

  Dans de nombreux cas vous n'avez pas besoin d'une partition, par
  exemple si vous avez beaucoup de mmoire vive, mettons 64 Mo, et si
  vous tes le seul utilisateur de la machine. Dans ce cas vous pouvez
  essayer de tourner dans partition de swap et voir (par exemple avec
  les rapports du systme ou avec la commande top) s'il y a des moments
  o vous n'avez plus de mmoire libre.

  Enlever la partition de swap a deux avantages:

    Vous gagnez de la place disque

    Vous gagnez sur le temps moyen d'accs car la partition de swap
     aurait occup le milieu du disque (qui est plus rapide)

  Au total, avoir une partition de swap est comme avoir des toilettes
  chauffes: on n'en a pas besoin la plupart du temps, mais c'est bien
  agrable parfois. (ndT: Ah qu'en termes galants ces choses-l sont
  mises !)


  1166..44..  PPooiinnttss ddee mmoonnttaaggee eett //mmnntt


  Dans une ancienne version de ce document, je proposais de mettre
  toutes les partitions montes sur des sous-rpertoires de /mnt. C'est
  cependant une mauvaise ide car /mnt lui-mme peut tre utilis comme
  point de montage, ce qui rend toutes les autres partitions
  inaccessibles. (voir Questions et Rponses). Je propose plutt de
  monter les partitions directement dans la racine avec des noms comme
  /mnt.nom-bien-choisi.

  Certaines distributions Linux utilisent des points de montage comme
  /mnt/floppy et /mnt/cdrom ce qui montre bien combien les choses sont
  peu claires. Esprons que le FHS mettra de l'ordre dans tout a.


  1166..55..  SSCCSSII:: nnuummrrooss eett nnoommss ssyymmbboolliiqquueess



  Les partitions sont nommes dans l'ordre o elles sont trouves, et ne
  dpendent pas du numro SCSI. Cela signifie que si vous ajoutez un
  disque avec un numro intermdiaire, ou si vous changez les numros
  d'une autre manire, les noms de partitions sont intervertis et ne
  correspondent plus  rien. C'est important si vous utilisez des
  disques amovibles. Dans ce cas il faut rserver les premiers numros
  aux disques fixes et les derniers pour les media amovibles.

  Beaucoup se sont fait avoir par cette ``feature'' et rclament qu'on
  fasse quelque chose. Personne ne sait quand ce sera fix. Pour
  l'instant, donc, il faut faire avec. Par exemple c'est une bonne ide
  de mettre le disque contenant la partition racine au premier numro
  SCSI. Ainsi il ne sera pas re-numrot si un autre disque a une panne.

  Le coeur du problme est le nombre limit de bits disponibles pour les
  numros majeurs et mineurs des fichiers du rpertoire /dev utiliss
  pour dcrire le device lui-mme. Voir man MAKEDEV.  Actuellement deux
  solutions sont envisages:

     ssccssiiddeevv
        cre une base de donnes avec les disques et l'endroit o ils
        sont, voir  man scsifs.

     ddeevvffss
        est un projet  plus long terme, qui veut contourner tout la
        numrotation des fichiers de priphriques en faisant du
        rpertoire /dev un rpertoire dy noyau tout comme /proc. A
        suivre.

  Les numros SCSI sont aussi utiliss pour l'arbitrage. Si plusieurs
  disques demandent un service, le disque qui a le numro le plus faible
  a la priorit.


  1166..66..  CCoonnssoommmmaattiioonn eett CChhaalleeuurr

  Il n'y a pas si longtemps, une machine de puissance quivalente  un
  PC d'aujourd'hui consommait du courant triphas, et exigeait un
  refroidissement  air ou mme  eau. La technologie a progress trs
  vite, offrant des composants rapides mais aussi peu gourmands en
  nergie. Cependant, il y a des choses qu'on doit garder en tte avant
  d'ajouter  l'ordinateur un disque ou une carte PCI. Gardez  l'esprit
  que l'nergie consomme va bien quelque part, et que la plupart est
  transforme en chaleur. Si la chaleur n'est pas dissipe, il en
  rsultera une surchauffe qui diminue la fiabilit et la dure de vie
  des composants. Les constructeurs ont de exigences de refroidissement,
  en termes de mtres cubes par minute, et on ne saurait trop conseiller
  d'en tenir compte.

  Gardez des passages pour l'air, nettoyez la crasse et vrifiez la
  temprature des disques. S'il sont brlants au toucher, c'est sans
  doute qu'ils sont en surchauffe.

  Si possible utilisez l'acclration squentielle (_s_e_q_u_e_n_t_i_a_l _s_p_i_n_-_u_p)
  pour les disques. C'est l'acclration qui consomme le plus
  d'lectricit et si tous les disques dmarrent en mme temps vous
  risquez de dpasser la puissance fournie par votre alimentation.


  1166..77..  DDeejjaanneewwss

  C'est un systme que la plupart conaissent dj. Il permet d'effectuer
  des recherches parmi les articles posts dans les _f_o_r_u_m_s _U_s_e_n_e_t depuis
  1995 jusqu' maintenant, et offre aussi une interface Web pour lire et
  poster des articles. Voir Dejanews <http://www.dejanews.com>

  Ce qui est sans doute moins connu est qu'ils utilisent 120 stations
  Linux parallles, la plupart utilisant le module md pour grer 4 et 24
  Go d'espace disque (plus de 1200 Go au total). L'ensemble grandit sans
  cesse mais actuellement il est essentiellement constitu de Bi-Pentium
  Pro 200MHz et de Bi-Pentium II 300 MHz avec 256 Mo de mmoire vive ou
  plus.

  Une machine de la base de donnes a normalement 1 disque pour le
  systme d'exploitation et entre 4 et 6 disques grs par md o les
  articles sont archivs. Les disques sont connects  un adaptateur PCI
  SCSI (BusLogic Modle BT-946C ou BT-958), un par machine.

  Les erreurs disque ne constituent que 0,25% des indisponibilits du
  systme.

  Enfin, ce n'est pas de la publicit que je fais, mais juste un example
  de ce qu'il faut pour mettre en place un service Internet majeur.
  (ndT: le site voila.fr de France Tlcom utilise un nombre comparable
  de stations Linux pour un moteur de recherche)


  1166..88..  SSttrruuccttuurree ddee llaa hhiirraarrcchhiiee ddeess ffiicchhiieerrss

  Il y a beaucoup de schmas pour les hirarchies de fichiers, qui
  diffrent du FHS par la philosophie, la stratgie et l'implmentation.
  Il n'est pas possible de les dtailler ici, le lecteur est renvoy 
  man hier qui est disponible sur beaucoup d'architectures.


  1166..99..  NNuummrroottaattiioonn ddeess ppiisstteess eett ooppttiimmiissaattiioonn

  Autrefois les systmes de fichiers utilisaient les paramtres
  physiques du disque pour optimiser les transferts, par exemple en
  essayent de metter tout un fichier dans la mme piste afin
  d'conomiser les temps du changement de piste. Aujourd'hui avec les
  paramtres logiques, le cache et les schmas pour viter les secteurs
  dfectueux, ce genre d'optimisation ne fait plus de sens et peut mme
  coter plus cher qu'elle ne rapporte. Certains systmes d'exploitation
  utilisent encore ce genre d'algorithmes, mais plus Linux.




  1177..  ssyymmbboolliiqquueess AAppppeennddiiccee AA:: PPaarrttiittiioonnnneemmeenntt:: ppooiinnttss ddee mmoonnttaaggee eett
  lliieennss


  La table suivante fait de la conception un simple exercice avec un
  crayon et un papier. Il est conseill de l'imprimer (avec des fontes 
  casse fixe) et d'ajuster les nombres jusqu' obtenir satisfaction.

  Le point de montage vous voulez accder  une partition ou
  priphrique. Cette table est aussi l'endroit idal pour noter les
  liens (ou raccourcis) que vous tablirez. La taille correspond  une
  installation assez complte de Debian 1.3.











  Rpertoire      Point de montage  vitesse temps   taux       taille
                                            moyen   de
                                            d'accs transfert


  swap            __________        ooooo   ooooo   ooooo      (32) ____

  /               __________        o       o       o          (20) ____

  /tmp            __________        oooo    oooo    oooo            ____

  /var            __________        oo      oo      oo         (25) ____
  /var/tmp        __________        oooo    oooo    oooo            ____
  /var/spool      __________                                        ____
  /var/spool/mail __________        o       o       o               ____
  /var/spool/news __________        ooo     ooo     oo              ____
  /var/spool/____ __________        ____    ____    ____            ____

  /home           __________        oo      oo      oo              ____

  /usr            __________                                   (500)____
  /usr/bin        __________        o       oo      o          (250)____
  /usr/lib        __________        oo      oo      ooo        (200)____
  /usr/local      __________                                        ____
  /usr/local/bin  __________        o       oo      o               ____
  /usr/local/lib  __________        oo      oo      ooo             ____
  /usr/local/____ __________                                        ____
  /usr/src        __________        o       oo      o          (50) ____

  DOS             __________        o       o       o               ____
  Win             __________        oo      oo      oo              ____
  NT              __________        ooo     ooo     ooo             ____

  /mnt._________  __________        ____    ____    ____            ____
  /mnt._________  __________        ____    ____    ____            ____
  /mnt._________  __________        ____    ____    ____            ____
  /_____________  __________        ____    ____    ____            ____
  /_____________  __________        ____    ____    ____            ____
  /_____________  __________        ____    ____    ____            ____
  /_____________  __________        ____    ____    ____            ____


  Espace disque total :                                             ____





  1188..  AAppppeennddiiccee BB:: PPaarrttiittiioonnnneemmeenntt:: eemmppllaacceemmeenntt ddeess ppaarrttiittiioonnss


  Ici vous choisirez dans quel disque va chacune des partitions de la
  table prcdente, en gardant  l'esprit les remarques dans la section
  ``postition physique des pistes''.












    Disque          sda     sdb     sdc     hda     hdb     hdc     ___

  No SCSI         |  __   |  __   |  __   |

  Rpertoire

  swap            |       |       |       |       |       |       |

  /               |       |       |       |       |       |       |

  /tmp            |       |       |       |       |       |       |

  /var            :       :       :       :       :       :       :
  /var/tmp        |       |       |       |       |       |       |
  /var/spool      :       :       :       :       :       :       :
  /var/spool/mail |       |       |       |       |       |       |
  /var/spool/news :       :       :       :       :       :       :
  /var/spool/____ |       |       |       |       |       |       |

  /home           |       |       |       |       |       |       |

  /usr            |       |       |       |       |       |       |
  /usr/bin        :       :       :       :       :       :       :
  /usr/lib        |       |       |       |       |       |       |
  /usr/local      :       :       :       :       :       :       :
  /usr/local/bin  |       |       |       |       |       |       |
  /usr/local/lib  :       :       :       :       :       :       :
  /usr/local/____ |       |       |       |       |       |       |
  /usr/src        :       :       :       :

  DOS             |       |       |       |       |       |       |
  Win             :       :       :       :       :       :       :
  NT              |       |       |       |       |       |       |

  /mnt.___/_____  |       |       |       |       |       |       |
  /mnt.___/_____  :       :       :       :       :       :       :
  /mnt.___/_____  |       |       |       |       |       |       |
  /_____________  :       :       :       :       :       :       :
  /_____________  |       |       |       |       |       |       |
  /_____________  :       :       :       :       :       :       :


  Place totale:





  1199..  AAppppeennddiiccee CC:: PPaarrttiittiioonnnneemmeenntt:: nnuummrroottaattiioonn

  Cette troisime table sert juste  trier les partitions en attribuant
  un numro  chacune, sous la forme attendue par fdisk.  Ici vous
  pouvez tenir compte de la position physique des pistes pour
  l'optimisation.

  Ces numros seront utiliss pour mettre  jour les tables prcdentes:
  les trois tables sont trs utiles pour la maintenance.

  En cas de crash disque, vous trouverez utile de savoir quel numro
  SCSI correspond  quel disque, gardez en consquence une copie papier
  de cette information.





          Disque:   sda     sdb     sdc     hda     hdb     hdc      ___

  Taille totale:  |  ___  |  ___  |  ___  |  ___  |  ___  |  ___  |  ___
  No SCSI         |  __   |  __   |  __   |

  Partition

  1               |       |       |       |       |       |       |
  2               :       :       :       :       :       :       :
  3               |       |       |       |       |       |       |
  4               :       :       :       :       :       :       :
  5               |       |       |       |       |       |       |
  6               :       :       :       :       :       :       :
  7               |       |       |       |       |       |       |
  8               :       :       :       :       :       :       :
  9               |       |       |       |       |       |       |
  10              :       :       :       :       :       :       :
  11              |       |       |       |       |       |       |
  12              :       :       :       :       :       :       :
  13              |       |       |       |       |       |       |
  14              :       :       :       :       :       :       :
  15              |       |       |       |       |       |       |
  16              :       :       :       :       :       :       :






  2200..  AAppppeennddiiccee DD:: EExxeemmppllee 11:: sseerrvveeuurr ggnnrraalliissttee

  La table suivante montre la configuration d'un serveur gnraliste de
  taille moyenne. C'est un serveur rseau (DNS, courrier lectronique,
  FTP, news, imprimante partage, etc.), un serveur X pour plusieurs
  programmes de CAO, un serveur de cdrom et de bien d'autres choses.
  Les fichiers sont sur 3 disques SCSI d'une capacit de 600, 1000 and
  1300 Mo.

  On pourrait augmenter la vitesse en sparant /usr/local de /usr mais
  on a suppos a n'en valait pas la peine vue la complexit de gestion
  que cela entrane. Avec 2 disques de plus a serait plus envisageable.
  sda est vieux et lent et pourrait aussi bien tre remplac par un
  disque IDE. Les deux autres disques sont assez rapides. On rpartira
  la charge principale entre ces deux-l. Pour rduire le dsquilibre
  on a mis /usr/bin et /usr/local/bin sur un disque et /usr/lib et
  /usr/local/lib sur un autre.

  Avec du RAID on pourrait gagner en fiabilit mais on a jug que le
  patch de md n'tait pas assez fiable et qu'un contrleur RAID matriel
  tait au-del du budget.


  2200..11..  PPooiinnttss ddee mmoonnttaaggee eett lliieennss













  Rpertoire      Mount point     speed   seek    transfer        size    SIZE


  swap            sdb2, sdc2      ooooo   ooooo   ooooo           32      2x64

  /               sda2            o       o       o               20       100

  /tmp            sdb3            oooo    oooo    oooo                     300

  /var            __________      oo      oo      oo                      ____
  /var/tmp        sdc3            oooo    oooo    oooo                     300
  /var/spool      sdb1                                                     436
  /var/spool/mail __________      o       o       o                       ____
  /var/spool/news __________      ooo     ooo     oo                      ____
  /var/spool/____ __________      ____    ____    ____                    ____

  /home           sda3            oo      oo      oo                       400

  /usr            sdb4                                            230      200
  /usr/bin        __________      o       oo      o               30      ____
  /usr/lib        -> libdisk      oo      oo      ooo             70      ____
  /usr/local      __________                                              ____
  /usr/local/bin  __________      o       oo      o                       ____
  /usr/local/lib  -> libdisk      oo      oo      ooo                     ____
  /usr/local/____ __________                                              ____
  /usr/src        ->/home/usr.src o       oo      o               10      ____

  DOS             sda1            o       o       o                        100
  Win             __________      oo      oo      oo                      ____
  NT              __________      ooo     ooo     ooo                     ____

  /mnt.libdisk    sdc4            oo      oo      ooo                      226
  /mnt.cd         sdc1            o       o       oo                       710


  Espcace disque total: 2900 MB





  2200..22..  eemmppllaacceemmeenntt ddeess ppaarrttiittiioonnss
























  Rpertoire        sda     sdb     sdc


  swap            |       |   64  |   64  |

  /               |  100  |       |       |

  /tmp            |       |  300  |       |

  /var            :       :       :       :
  /var/tmp        |       |       |  300  |
  /var/spool      :       :  436  :       :
  /var/spool/mail |       |       |       |
  /var/spool/news :       :       :       :
  /var/spool/____ |       |       |       |

  /home           |  400  |       |       |

  /usr            |       |  200  |       |
  /usr/bin        :       :       :       :
  /usr/lib        |       |       |       |
  /usr/local      :       :       :       :
  /usr/local/bin  |       |       |       |
  /usr/local/lib  :       :       :       :
  /usr/local/____ |       |       |       |
  /usr/src        :       :       :       :

  DOS             |  100  |       |       |
  Win             :       :       :       :
  NT              |       |       |       |

  /mnt.libdisk    |       |       |  226  |
  /mnt.cd         :       :       :  710  :
  /mnt.___/_____  |       |       |       |


  Place totale:   |  600  | 1000  | 1300  |






  2200..33..  NNuummrroottaattiioonn




                Disque:     sda      sdb    sdc

       Capacit totale: |   600  |  1000 |  1300  |

       Partition

       1                |   100  |   436  |  710  |
       2                :   100  :    64  :   64  :
       3                |   400  |   300  |  300  |
       4                :        :   200  :  226  :








  2211..  AAppppeennddiiccee EE:: EExxeemmppllee 22:: sseerrvveeuurr eenn mmiilliieeuu uunniivveerrssiittaaiirree


  L'exemple suivant est d  nakano (at) apm.seikei.ac.jp, et montre la
  configuration d'un serveur en milieu universitaire.

  /var/spool/delegate est un rpertiore pour les fichiers de log et de
  cache d'un serveur de proxy Web qui s'appelle "delegated". Il y a 1000
   1500 requtes pas jour, et le disque est rempli en moyenne  15 ou
  30 poucents.

  /mnt.archive est utilis pour les gros fichiers qui ne sont pas
  souvent utiliss, comme les donnes exprimentales (et spcialement
  les images), les sources de programmes et les sauvegardes de Win95.

  /mnt.root est une copie de sauvegarde de la racine contenant des
  utilitaires pour le dpannage. Une disquette de dmarrage est faite
  pour dmarrer sur cette partition.
















































  =================================================

  Rpertoire                 sda      sdb     hda

  swap                    |    64 |    64 |       |
  /                       |       |       |    20 |
  /tmp                    |       |       |   180 |

  /var                    :   300 :       :       :
  /var/tmp                |       |   300 |       |
  /var/spool/delegate     |   300 |       |       |

  /home                   |       |       |   850 |
  /usr                    |   360 |       |       |
  /usr/lib                -> /mnt.lib/usr.lib
  /usr/local/lib          -> /mnt.lib/usr.local.lib

  /mnt.lib                |       |   350 |       |
  /mnt.archive            :       :  1300 :       :
  /mnt.root               |       |    20 |       |

  Espace total :             1024    2034    1050


  =================================================

          Disque :          sda     sdb     hda

  Place totale :         |  1024 |  2034 |  1050 |

  Partition
  1                       |   300 |    20 |    20 |
  2                       :    64 :  1300 :   180 :
  3                       |   300 |    64 |   850 |
  4                       :   360 :   ext :       :
  5                       |       |   300 |       |
  6                       :       :   350 :       :


  Filesystem         1024-blocks  Used Available Capacity Mounted on
  /dev/hda1              19485   10534     7945     57%   /
  /dev/hda2             178598      13   169362      0%   /tmp
  /dev/hda3             826640  440814   343138     56%   /home
  /dev/sda1             306088   33580   256700     12%   /var
  /dev/sda3             297925   47730   234807     17%   /var/spool/delegate
  /dev/sda4             363272  170872   173640     50%   /usr
  /dev/sdb5             297598       2   282228      0%   /var/tmp
  /dev/sdb2            1339248  302564   967520     24%   /mnt.archive
  /dev/sdb6             323716   78792   228208     26%   /mnt.lib




  Apparemment /tmp et /var/tmp sont trop grands. On pourrait les
  regrouper sur la mme partition si l'espace disque vient  manquer.

  /mnt.lib semble aussi trop grand, mais je prvois une nouvelle
  installation de TeX et de ghostcript, ce qui prend 100 Mo avec les
  fontes japonaises !

  Le systme est sauvegard sur un Seagate Tapestore 8000 (Travan TR-4,
  4G/8G).




  2222..  AAppppeennddiiccee FF:: EExxeemmppllee 33:: SSPPAARRCC SSoollaarriiss


  L'exemple suivant montre la configuration d'un serveur SPARC sous
  Solaris 2.5.1 en milieu industriel. En plus des services comme le
  courrier lectronique, c'est un serveur pour des applications de CAO
  et de bases de donnes.

  La simplicit prime ici, donc /usr/lib n'a pas t spar de /usr.

  C'est une configuration classique, prvue pour 100 utilisateurs.



          Disque:       SCSI 0                     SCSI 1

          Partition     Taille(Mo)  Monte sur     Taille (Mo) Monte sur

            0           160         swap           160         swap
            1           100         /tmp           100         /var/tmp
            2           400         /usr
            3           100         /
            4            50         /var
            5
            6           le reste    /local0        le reste    /local1




  A cause des besoins spcifiques  ce serveur, il est parfois
  ncessaire d'avoir de grandes partitions disponibles. On met tout ce
  qu'on peut sur le disque, en laissant une grande partition /local1.

  Cette configuration a t utilise un certain temps avec succs.

  Pour un systme gnral et plus quilibr il faudrait changer /tmp et
  /var/tmp puis dplacer /var vers le disque 1.


  2233..  AAppppeennddiiccee GG:: EExxeemmppllee 44:: SSeerrvveeuurr aavveecc 44 ddiissqquueess


  Cet exemple illustre tous les conseils de ce HOWTO, sauf le RAID.  Il
  est assez compliqu, je l'admets, mais offre de grandes performances
  avec un matriel moyen. La taille des partitions n'y figure pas mais
  on peut trouver des valeurs typiques dans les autres exemples.



       Partition       sda             sdb             sdc             sdd
                       ----            ----            ----            ----
               1       root            overview        lib             news
               2       swap            swap            swap            swap
               3       home            /usr            /var/tmp        /tmp
               4                       spare root      mail            /var




  La configuration est optimse vis--vis du positionnement des pistes
  mais aussi pour diminuer le temps d'accs moyen.

  Si vous voulez DOS ou Windows vous devrez utiliser sda1 et dcaler les
  autres partitions. Il serait intressant d'utiliser le swap de sdb2,
  sdc2 et sdd2 pour le swap de Windows et pour le rpertoire temporaire
  de Windows. Voir les HOWTOs qui expliquent comment faire cohabiter
  plusieurs systmes d'exploitation.

  Un exemple avec 4 disques utilisant plusieurs types de RAID est donn
  ci-dessous:



       Partition       sda             sdb             sdc             sdd
                       ----            ----            ----            ----
               1       boot            overview        news            news
               2       overview        swap            swap            swap
               3       swap            lib             lib             lib
               4       lib             overview        /tmp            /tmp
               5       /var/tmp        /var/tmp        mail            /usr
               6       /home           /usr            /usr            mail
               7       /usr            /home           /var
               8       / (root)        spare root




  Ici toutes les partitions en double exemplaire sont combines en RAID
  0 avec deux exceptions, le swap qui est entrelac, et et les
  partitions home et mail qui sont ralises en RAID 1 pour des raisons
  de scurit.

  Notez que les fichiers de dmarrage et la racine sont spars: seuls
  les fichiers de dmarrage doivent tre placs en-desous de la limite
  du 1023-ime cylindre. Le reste de la racine peut tre plac n'importe
  o, et ici ils sont placs sur la partition la plus lente et la plus 
  l'extrieur. Par simplicit et pour la scurit, la partition racine
  n'est pas un systme RAID.


  2244..  AAppppeennddiiccee HH:: EExxeemmppllee 55:: AAvveecc 22 ddiissqquueess


  Avec deux disques on peut faire moins de choses compliques mais le
  schma ci-dessous devrait donner un point de dpart:



       Partition       sda             sdb
                       ----            ----
               1       boot            lib
               2       swap            news
               3       /tmp            swap
               4       /usr            /var/tmp
               5       /var            /home
               6       / (root)





  2255..  AAppppeennddiiccee II:: EExxeemmppllee 66:: AAvveecc uunn sseeuull ddiissqquuee


  Mme si a tombe hors du champ de ce HOWTO, il est indniable que les
  trs grands disques deviennent abordables. On voit maintenant des
  disques de 10  20 Go, et la question est alors: comment tirer profit
  de tels monstres ? Il est intressant de constater que les gens n'ont
  auun problme  remplir de tels disques, et l'avenir semble trs rose
  pour les fabricants qui prvoient des disques encore plus gros.


  Bien sr on peut faire moins d'optimisations qu'avec deux disques mais
  on peut utiliser quelques trucs pour optimiser la position des pistes
  et minimiser les mouvements de la tte.



       Partition       hda             Size estimate (MB)
                       ----            ------------------
                1      DOS             500
                2      boot            20
                3      Winswap         200
                4      data            Selon la taille du disque
                5      lib             50 - 500
                6      news            300+
                7      swap            128     (maximum avec une puce 32 bits)
                8      tmp             300+    (/tmp et /var/tmp)
                9      /usr            50 - 500
               10      /home           300+
               11      /var            50 - 300
               12      mail            300+
               13      dosdata         10      ( Windows bug workaround!)




  Souvenez-vous que dosdata est un systme de fichiers DOS qui doit tre
  sur la toute dernire partition, sinon Windows plante.







































  Rseau sous Linux (anciennement NET-3-HOWTO).
  Auteur actuel: {Poet} poet@linuxports.com (Traduction et
  trahison de Jacques.Chion@wanadoo.fr, un grand merci  Jean-
  Albert Ferrez et Bernard Choppy pour leur aide)
  v1.5, Aot 1999.

  Auteurs prcdents: Terry Dawson (auteur principal), VK2KTJ; Alessan
  dro Rubini (mainteneur) Le systme Linux possde un support rseau
  inclus dans le noyau et crit presque entirement  partir de zro.
  Les performances de l'implmentation tcp/ip des derniers noyaux en
  font une alternative digne de respect mme vis  vis de ses meilleurs
  concurrents.  Le but de ce document est de dcrire comment installer
  et configurer le logiciel de rseau sous Linux, ainsi que les outils
  ncessaires.
  ______________________________________________________________________

  Table des matires

















































  1. Introduction

  2. Historique du document

     2.1 Retour d'informations

  3. Comment utiliser ce document.

     3.1 Les conventions utilises dans ce document

  4. Informations gnrales concernant le rseau  sous Linux.

     4.1 Brve histoire du dveloppement du noyau du rseau Linux.
     4.2 Informations sur la couche rseau de Linux.
     4.3 O obtenir des informations sur le rseau,  non spcifiques de Linux.

  5. Informations gnrales concernant la configuration rseau

     5.1 De quoi ai-je besoin pour dmarrer ?
        5.1.1 Sources du noyau rcentes (Optionnel).
        5.1.2 Outils de rseau rcents
        5.1.3 Applications rseau
        5.1.4 Adresses et explications.
     5.2 O mettre les commandes de configuration ?
     5.3 Crer vos interfaces rseau
     5.4 Configurer une interface rseau
     5.5 Configurer votre solveur de noms
        5.5.1 Qu'y a-t-il dans un nom ?
        5.5.2 Les informations ncessaires
        5.5.3 /etc/resolv.conf
        5.5.4 /etc/hosts
        5.5.5 Faire tourner un serveur de noms
     5.6 Configurer votre interface loopback
     5.7 Routage
        5.7.1 Alors, que fait le programme
     5.8 Configurer vos serveurs rseau et les services.
        5.8.1 (TT
           5.8.1.1 Exemple de fichier
        5.8.2 (TT
           5.8.2.1 Exemple de fichier
     5.9 Autres fichiers de configuration ayant un rapport avec le rseau
        5.9.1 (TT
        5.9.2 (TT
     5.10 Scurit rseau et contrle d'accs
        5.10.1 /etc/ftpusers
        5.10.2 /etc/securetty
        5.10.3 Le mcanisme de contrle d'accs des htes
           5.10.3.1 /etc/hosts.allow
           5.10.3.2 /etc/hosts.deny
        5.10.4 /etc/hosts.equiv
        5.10.5 Configurer votre dmon
        5.10.6 Pare-feu (Firewall) sur le rseau
        5.10.7 Autres suggestions

  6. Informations sur IP et Ethernet

     6.1 Ethernet
     6.2 EQL - galiseur de charge  lignes multiples
     6.3 Enregistrement IP (IP Accounting) (pour Linux-2.0)
     6.4 Enregistrement IP (IP Accounting) (pour Linux-2.2)
     6.5 IP Aliasing
     6.6 IP Pare-feu (Firewall) (pour Linux-2.0)
     6.7 Pare-feu IP (pour Linux-2.2)
     6.8 Encapsulation IPIP
        6.8.1 Une configuration de rseau avec tunneling.
        6.8.2 Une configuration d'hte pour l'encapsulation IPIP.
     6.9 IP Masquerade
     6.10 IP Transparent Proxy
     6.11 IPv6
     6.12 IP Mobile
     6.13 Multicast
     6.14 NAT - Network Address Translation (Traduction d'adresse rseau)
     6.15 Mise en forme du trafic - Changer la bande passante alloue
     6.16 Routage avec Linux-2.2

  7. Utilisation du matriel courant pour PC

     7.1 RNIS
     7.2 PLIP pour Linux-2.0
     7.3 PLIP pour Linux2.2
     7.4 PPP
        7.4.1 Maintenance d'une connexion permanente avec le rseau  l'aide de
     7.5 Client SLIP
        7.5.1 dip
        7.5.2 slattach
        7.5.3 Quand utiliser quoi ?
        7.5.4 Serveur SLIP statique avec une ligne tlphonique  et DIP
        7.5.5 Serveur SLIP dynamique avec une ligne tlphonique et DIP
        7.5.6 Utiliser DIP
        7.5.7 Connexion permanente SLIP utilisant une ligne et slattach
     7.6 Serveur SLIP
        7.6.1 Serveur SLIP utilisant
           7.6.1.1 O obtenir
           7.6.1.2 Configurer
           7.6.1.3 Configurer
           7.6.1.4 Configurer le fichier
           7.6.1.5 Configurer le fichier
           7.6.1.6 Configurer le fichier
        7.6.2 Serveur Slip utilisant
           7.6.2.1 Configurer
        7.6.3 Serveur SLIP utilisant l'ensemble

  8. Autres technologies rseau

     8.1 ARCNet
     8.2 Appletalk (
        8.2.1 Configurer le support Appletalk.
        8.2.2 Exporter un systme de fichiers Linux avec Appletalk.
        8.2.3 Tester Appletalk.
        8.2.4 Autres informations
     8.3 ATM
     8.4 AX25 (
     8.5 DECNet
     8.6 FDDI (Fiber Distributed Data Interface)
     8.7 Relais de trames (Frame Relay)
     8.8 IPX (
     8.9 NetRom (
     8.10 Protocole Rose (
     8.11 Support SAMBA - `NetBEUI', `NetBios', `CIFS'.
     8.12 Support STRIP (Starmode Radio IP)
     8.13 Token Ring
     8.14 X.25
     8.15 Carte WaveLan

  9. Cbles et cblages

     9.1 Cble srie NULL Modem
     9.2 Cble port parallle (cble PLIP)
     9.3 Cblage Ethernet 10base2 (coaxial fin)
     9.4 Cblage Ethernet  paires torsades

  10. Glossaire des termes utiliss dans ce document.
  11. Linux pour un fournisseur d'accs  l'Internet ?

  12. Remerciements

  13. Copyright.

  14. Note du traducteur



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ceci est la premire version depuis que Linuxports est devenu l'auteur
  de ce document. Tout d'abord je dois dire que nous avons l'espoir que
  dans les prochains mois ce document vous rendra service et que nous
  serons capables de vous fournir des informations prcises en temps et
  en heure sur les publications en relation avec les rseaux sous linux.

  Ce document, comme les autres HOWTO dont nous avons la charge, va
  devenir totalement diffrent et deviendra rapidement ``le rseau sous
  Linux-HOWTO'' et pas seulement le NET3-4-HOWTO. Nous traiterons de
  sujets tels que PPP, VPN et autres ...


  22..  HHiissttoorriiqquuee dduu ddooccuummeenntt

  Le premier document NET-FAQ fut crit par Matt Welsh et Terry Dawson
  en vue de rpondre aux questions qui taient souvent poses au sujet
  des rseaux sous Linux, ceci en un temps o le LPD (Linux
  Documentation Project) n'existait pas encore.  Il s'agissait alors des
  toutes premires versions de dveloppement du noyau rseau sous Linux.
  Le document NET-2-HOWTO, qui succda au NET-FAQ, fut l'un des premiers
  documents du LDP HOWTO et il traitait de ce qui fut appel version 2,
  et plus tard version 3, du logiciel rseau du noyau Linux.  Ce
  document prend la suite  son tour et ne traite que de la version 4 du
  noyau rseau Linux et plus spcialement des versions du noyau 2.x et
  2.2.x.

  Les versions prcdentes de ce document taient devenues plutt
  normes en raison du grand nombre de sujets abords. Pour rsoudre ce
  problme, un certain nombre de documents HOWTO ont t crs et
  traitent de sujets spcifiques.  Ce document fait rfrence  ceux qui
  sont pertinents et aborde les sujets qui ne sont pas encore couverts
  par d'autres documents.


  22..11..  RReettoouurr dd''iinnffoorrmmaattiioonnss

  Nous apprcions toujours les retours d'informations.  Contactez-nous
  s'il vous plait : poet@linuxports.com.

  Encore une fois, si vous trouvez quelque chose d'erron ou bien si
  vous dsirez que l'on ajoute quelque chose, contactez-nous.


  33..  CCoommmmeenntt uuttiilliisseerr ccee ddooccuummeenntt..

  Ce document est organis de haut en bas. Les premires sections
  traitent d'informations sur le matriel et peuvent tre sautes si
  cela ne vous intresse pas ; ensuite il y a une discussion gnrale
  sur ce qui concerne les rseaux, et vous devez tre certains de
  l'avoir assimile avant de poursuivre vers les paragraphes plus
  spcifiques. Le restant, qui traite d'informations ``plus
  technologiques'', est regroup en trois parties principales :
  informations sur Ethernet et IP, les technologies qui concernent le
  matriel PC le plus courant, et les technologies moins rpandues.

  La dmarche que je suggre pour parcourir ce document est donc la
  suivante :




     LLiirree lleess sseeccttiioonnss ggnnrraalleess
        Ces paragraphes s'appliquent  chaque technologie, ou presque,
        dcrite plus tard, il est donc important que vous les ayez
        compris.  D'autre part, j'espre que beaucoup de lecteurs
        connaissent dj le sujet.


     RRffllcchhiisssseezz  vvoottrree rrsseeaauu
        Vous devez savoir comment votre rseau est, ou sera, conu et
        quels matriels et types de technologies vous utiliserez.


     LLiisseezz llaa sseeccttiioonn ````EEtthheerrnneett eett IIPP'''' ssii vvoouuss tteess ccoonnnneeccttss eenn
        ddiirreecctt
        sur un rseau local ou  l'Internet" Cette section traite de la
        configuration de base d'Ethernet et des diffrentes possibilits
        offertes par Linux, et qui concernent le rseau, telles que le
        pare-feu, le routage avanc, etc..

     LLiisseezz aapprrss ssii vvoouuss tteess iinnttrreessssss ppaarr lleess rrsseeaauuxx llooccaauuxx  bbaass
        ccoott oouu
        les connexions par tlphone" Cette section parle de PLIP, PPP,
        SLIP, et RNIS, les technologies utilises habituellement sur les
        stations personnelles.

     LLiisseezz llaa sseeccttiioonn ccoonncceerrnnaanntt llaa tteecchhnnoollooggiiee qquuii ccoorrrreessppoonndd
        plus particulirement  vos besoins."  Si vos besoins ne
        concernent pas IP et/ou un matriel courant, vous trouverez  la
        fin des dtails sur les protocoles non-IP et les matriels de
        communication particuliers.

     CCoonnffiigguurreezz vvoottrree rrsseeaauu
        Si vous allez rellement essayer de configurer votre rseau,
        prenez soigneusement note de tout problme ventuel.

     CChheerrcchheezz ddee ll''aaiiddee ssii nncceessssaaiirree
        Si vous rencontrez des problmes qui ne sont pas traits dans ce
        document, reportez-vous au paragraphe donnant les endroits o
        l'on peut en obtenir ou bien envoyer des reports de bogues.

     AAmmuusseezz--vvoouuss!!
        Le rseau est amusant, profitez-en.



  33..11..  LLeess ccoonnvveennttiioonnss uuttiilliisseess ddaannss ccee ddooccuummeenntt

  Il n'y a pas de conventions spciales utilises ici, mais vous devez
  faire attention  la faon de montrer les commandes. En regardant la
  documentation habituelle d'Unix, toute commande qui doit tre tape
  est prcde d'une invite du shell.  Ce document utilise "user%" comme
  invite pour les commandes ne ncessitant pas de privilges de
  superutilisateur, et "root#" pour les commandes que l'on doit excuter
  comme utilisateur root. J'ai prfr utiliser "root#"  la place du
  classique "#" pour viter toute confusion avec les extraits de scripts
  shell, ou le signe dise est utilis pour dfinir les lignes de
  commentaires.
  Lorsque les ``Options de Compilation du noyau'' sont mentionnes,
  elles le sont avec le format utilis par _m_e_n_u_c_o_n_f_i_g. Elles devraient
  donc tre comprhensibles mme si vous (comme moi) n'tes pas
  familiers avec _m_e_n_u_c_o_n_f_i_g. Si vous avez un doute sur la dclaration
  des options, faire tourner le programme une fois ne peut qu'apporter
  de l'aide.


  Notez que tous les liens avec les autres documents HOWTO sont locaux
  pour vous aider  naviguer avec vos documents LDP copis localement,
  au cas o vous utiliseriez la version html de ce document. Si vous ne
  possdez pas l'ensemble des documents, chaque HOWTO peut tre rcupr
  sur metalab.unc.edu (rpertoire /pub/Linux/HOWTO) ou l'un de ses
  nombreux miroirs.



  44..  ssoouuss LLiinnuuxx..  IInnffoorrmmaattiioonnss ggnnrraalleess ccoonncceerrnnaanntt llee rrsseeaauu




  44..11..  BBrrvvee hhiissttooiirree dduu ddvveellooppppeemmeenntt dduu nnooyyaauu dduu rrsseeaauu LLiinnuuxx..

  Dvelopper une nouvelle implmentation noyau de l'ensemble du
  protocole tcp/ip, de qualit, et qui marcherait aussi bien que les
  produits existants, n'tait pas une tche facile.  La dcision de ne
  pas partir d'une implmentation existante fut prise  un moment o il
  y avait un doute sur d'ventuelles restrictions sur les droits de
  copie, en raison de dcisions de justice U.S., et  un moment o il y
  avait beaucoup d'enthousiasme pour faire diffremment et peut-tre
  mme mieux que ce qui avait t fait auparavant.

  Le premier volontaire pour diriger le dveloppement fut Ross Biro
  <biro@yggdrasil.com>. Ross produisit une implmentation de routines
  simple, incomplte, mais parfaitement utilisable,  laquelle fut
  ajout un pilote Ethernet pour la carte interface rseau WD-8003.  Ce
  fut suffisant pour que beaucoup de personnes essayent le logiciel et
  mme certains s'arrangrent pour se connecter, avec cette
  configuration, sur le rseau Internet en direct.  La pression de la
  communaut Linux qui s'occupait du dveloppement du support rseau
  augmenta, et pour finir, la convergence de cette pression injuste et
  de ses propres obligations l'emportrent sur les avantages que Ross en
  tirait; il arrta donc sa tche de coordinateur de dveloppement.  Les
  efforts de Ross pour faire dmarrer le projet, son acceptation de la
  responsabilit de faire vraiment quelque chose d'utile dans de telles
  circonstances mouvementes, furent le point de dpart de tout le
  travail ultrieur et donc un lment essentiel du succs du produit
  actuel.

  Orest Zborowski <obz@Kodak.COM> produisit la premire interface socket
  BSD pour le noyau Linux.  Ce fut un grand pas en avant et permit 
  beaucoup d'applications rseau existantes d'tre portes sous Linux
  sans grandes modifications.

   peu prs  cette poque Laurence Culhane <loz@holmes.demon.co.uk>
  dveloppa les premiers pilotes Linux pour supporter le protocole SLIP.
  Ceci permit  beaucoup de gens qui n'avaient pas accs  un rseau
  Ethernet d'essayer le logiciel rseau. Puis certains utilisrent ce
  pilote pour se connecter sur l'Internet.  Cela donna  encore plus de
  personnes un aperu de ce qui serait possible si Linux avait un
  support complet pour le rseau et augmenta le nombre d'utilisateurs
  utilisant et exprimentant ce logiciel rseau.

  L'une des personnes qui a aussi activement travaill sur la
  construction du support rseau fut Fred van Kempen
  <waltje@uwalt.nl.mugnet.org>.  Aprs la priode d'incertitude qui
  suivit le retrait de Ross, Fred offrit son temps et accepta le rle de
  conducteur du dveloppement sans rencontrer d'opposition.  Fred avait
  quelques projets ambitieux quant  la direction vers laquelle il
  voulait porter le logiciel rseau Linux, et il se mit  progresser
  dans ces directions.  Fred produisit une srie de code rseau appele
  le code noyau `NET-2' (le code `NET' tant celui de Ross), qui permit
   beaucoup de personnes de l'utiliser avec intrt.  Ensuite Fred mit
  nombre d'innovations dans la poursuite du dveloppement, telle que
  l'interface de priphrique dynamique, le support du protocole radio-
  amateur AX-25 et une implmentation rseau conue de manire plus
  modulaire.  Le code NET-2 de Fred fut utilis par un grand nombre
  d'enthousiastes, ce nombre augmentant au fur et  mesure de
  l'utilisation du logiciel dans le monde. Le logiciel rseau  ce
  moment tait constitu encore d'un grand nombre de patches qui
  devaient tre appliqus au code noyau et n'tait pas inclus dans la
  distribution normale.  Le document NET-FAQ et son successeur
  NET-2-HOWTO dcrivait la procdure assez complexe pour que tout cela
  fonctionne.  Fred se concentra sur le dveloppement d'innovations et
  cela prenait du temps. La communaut des utilisateurs s'impatientait,
  car elle voulait avoir quelque chose fonctionnant correctement et qui
  satisferait 80% des utilisateurs puis, comme avec Ross, la pression
  sur le responsable du dveloppement augmentait.

  Alan Cox <iialan@www.uk.linux.org> proposa une solution pour amliorer
  la situation.  Il proposa de prendre le code NET-2 de Fred, de le
  dboguer, de le rendre fiable et stable si bien qu'il satisferait
  l'utilisateur de base impatient, relchant ainsi la pression sur Fred
  qui pourrait continuer son oeuvre.  Alan se mit au travail avec un
  certain succs et sa premire version du code rseau Linux fut appele
  `Net-2D(ebugged;)'.  Le code fonctionnait de manire fiable avec
  plusieurs configurations typiques et l'utilisateur de base tait
  content. Alan avait vraiment des ides et une comptence  lui pour
  contribuer au projet et de nombreuses discussions concernant la
  direction que devait prendre le code NET-2 furent suivies d'effet.  Il
  se dveloppa alors deux coles distinctes dans la communaut Linux,
  l'une ayant pour principe `que a marche d'abord, puis on amliorera
  ensuite' et l'autre `amliorer d'abord'. Linus arbitra finalement et
  offrit son aide aux efforts de dveloppement d'Alan et inclut son code
  dans la distribution standard du noyau.  Cela plaait Fred dans une
  situation dlicate. Tout dveloppement de longue haleine souffrirait
  de l'absence d'utilisation et d'essais par l'utilisateur de base et
  cela signifierait que les progrs seraient longs et difficiles.  Fred
  continua  travailler encore quelque temps, puis se retira finalement,
  et Alan devint le nouveau pilote de dveloppement du code rseau dans
  le noyau Linux.

  Donald Becker <becker@cesdis.gsfc.nasa.gov> rvla rapidement ses
  talents dans les aspects de bas niveau du rseau et produisit une
  norme quantit de pilotes Ethernet, presque tous ceux inclus dans les
  noyaux actuels tant de lui. Il y a d'autres personnes qui ont apport
  une contribution significative, mais le travail de Donald est
  prolifique et mrite donc une mention spciale.

  Alan continua  affiner le code NET-2-D(ebugged) pendant un certain
  temps, tout en progressant sur certains des sujets qui restaient en
  suspens dans la liste des `TODO' (NdT : ` Faire').  Pendant que les
  sources du noyau Linux 1.3.* faisaient leurs premiers pas, le code
  rseau migra vers la distribution NET-3, sur laquelle les versions
  actuelles sont fondes.  Alan travailla sur de multiples aspects du
  code rseau et, avec l'assistance d'un grand nombre de personnes
  talentueuses venant de la communaut Linux, dveloppa le code dans
  toutes sortes de directions. Alan produisit des pilotes de
  priphriques rseau, le premier standard AX.25 et les implmentations
  IPX.  Alan continua  rafistoler le code, le restructurant petit 
  petit et l'amenant  son niveau d'aujourd'hui.
  Le support PPP fut ajout par Michael Callahan
  <callahan@maths.ox.ac.uk> et Al Longyear <longyear@netcom.com>, ce qui
  fut important pour accrotre le nombre de personnes utilisant Linux
  dsireuses d'aller sur le rseau.

  Jonathon Naylor <jsn@cs.nott.ac.uk> apporta sa contribution en
  amliorant le code AX.25 d'Alan et en y ajoutant les protocoles NetRom
  et Rose. Le support AX.25/NetRom lui-mme est tout  fait
  significatif, car aucun autre systme d'exploitation que Linux ne peut
  se vanter d'avoir un support natif pour ce protocole.

  Il y a eu bien sr des centaines d'autres personnes qui ont apport
  une contribution significative  la couche rseau de Linux.  Vous en
  retrouverez certains plus tard dans les paragraphes traitant de
  technologies spcifiques, d'autres ont collabor aux modules, pilotes,
  corrections de bogues, suggestions, rapports d'essais et support
  moral. Dans tous les cas chacun peut se prvaloir d'avoir jou un rle
  et offert ce qu'il pouvait. Le code rseau Linux est un excellent
  exemple de ce que l'on peut obtenir avec un style Linux de
  dveloppement anarchique, si cela ne vous a pas encore tonn, et on
  le voit encore, le dveloppement ne s'est pas arrt.



  44..22..  IInnffoorrmmaattiioonnss ssuurr llaa ccoouucchhee rrsseeaauu ddee LLiinnuuxx..

  Il y a un grand nombre d'endroits o l'on peut trouver de bonnes
  informations sur le rseau Linux.

  Il y a un tas de spcialistes disponibles. On peut en trouver une
  liste sur LinuxPorts Consultants Database.

  Alan Cox, l'actuel mainteneur du code rseau Linux entretient une page
  web contenant les points principaux du rseau actuel, et ses nouveaux
  dveloppements,  l'adresse : www.uk.linux.org.

  Une autre bonne source est un livre crit par Olaf Kirch ayant pour
  titre Network Administrators Guide. C'est une oeuvre du Linux
  Documentation Project et vous pouvez le lire de manire interactive
  sur Network Administrators Guide HTML version ou bien vous pouvez
  l'obtenir sous diffrents formats via ftp sur : metalab.unc.edu LDP
  ftp archive. Le livre d'Olaf est trs comprhensible et fournit un
  point de vue de haut niveau sur la configuration rseau sous Linux.

  (NdT : ce livre a t traduit en franais de manire remarquable par
  le regrett Ren Cougnenc)

  Il existe un groupe de discussion ddi au rseau et, en ce qui le
  concerne dans la hirarchie Linux, c'est : comp.os.linux.networking

  Il existe une liste de diffusion  laquelle vous pouvez vous inscrire,
  et o vous pourrez poser des questions en relation avec le rseau
  Linux.  Pour souscrire vous devez envoyer un message par courrier
  lectronique :


       To: majordomo@vger.rutgers.edu
       Subject: (rien du tout)
       Message:

       subscribe linux-net





  Sur les diffrents rseaux IRC, il y a souvent des canaux #linux sur
  lesquels des personnes sont en mesure de rpondre  vos questions au
  sujet du rseau Linux.

  Souvenez-vous lorsque vous faites part d'un problme d'y inclure le
  plus possible de dtails ncessaires. Plus spcialement indiquez les
  versions des logiciels que vous utilisez, en particulier la version du
  noyau, les versions des outils tels que _p_p_p_d ou _d_i_p, et la nature
  exacte des problmes que vous rencontrez. Cela veut dire prendre note
  de la syntaxe exacte des messages d'erreurs que vous recevez, et les
  commandes que vous avez excutes.


  44..33..  nnoonn ssppcciiffiiqquueess ddee LLiinnuuxx..  OO oobbtteenniirr ddeess iinnffoorrmmaattiioonnss ssuurr llee
  rrsseeaauu,,

  si vous dsirez des informations gnrales de base sur tcp/ip, alors
  je vous recommande de regarder les documents suivants :



     iinnttrroodduuccttiioonn  TTCCPP//IIPP
        ce document se trouve  la fois sur en version texte et en
        version postscript.


     aaddmmiinniissttrraattiioonn TTCCPP//IIPP
        ce document se trouve  la fois sur en version texte et en
        version postscript.


  Si vous recherchez des informations plus dtailles je vous recommande
  chaudement :


       _I_n_t_e_r_n_e_t_w_o_r_k_i_n_g _w_i_t_h _T_C_P_/_I_P_, _V_o_l_u_m_e _1 _: _p_r_i_n_c_i_p_e_s_, _p_r_o_t_o_
       _c_o_l_e_s _e_t _a_r_c_h_i_t_e_c_t_u_r_e_s, par Douglas E. Comer,ISBN
       0-13-227836-7, Prentice Hall publications, 3me dition,
       1995.


  Si vous voulez apprendre comment crire des applications rseau dans
  un environnement compatible Unix, je vous recommande galement
  chaudement :


        _U_n_i_x _N_e_t_w_o_r_k _P_r_o_g_r_a_m_m_i_n_g par W. Richard Stevens ISBN
       0-13-949876-1, Prentice Hall publications, 1990.


  Une deuxime dition de ce livre va apparaitre sur les rayons : le
  nouveau livre comporte 3 volumes : voyez le site de Prentice Hall pour
  en savoir plus.


  Vous pouvez essayer aussi le groupe de discussions :
  comp.protocols.tcp-ip.

  Une importante source d'informations techniques concernant l'Internet
  et la suite des protocoles TCP/IP sont les RFC. RFC est l'acronyme de
  `Request For Comment' et c'est le moyen habituel de soumettre et de
  s'informer des normes de protocoles Internet.  Il y a beauccoup
  d'endroits o sont stockes ces RFC. Beaucoup de ceux-ci sont des
  sites ftp, d'autres fournissent des accs WWW avec un moteur de
  recherche qui cherche les bases de donnes RFC avec des mots-cls
  particuliers.
  Une source possible de RFC est : la base de donnes RFC de Nexor.



  55..  IInnffoorrmmaattiioonnss ggnnrraalleess ccoonncceerrnnaanntt llaa ccoonnffiigguurraattiioonn rrsseeaauu

  Vous devez connatre et bien comprendre les paragraphes suivants avant
  d'essayer de configurer votre rseau.  Ce sont des principes de base
  qui s'appliquent, indpendamment de la nature du rseau que vous
  voulez mettre en place.



  55..11..  DDee qquuooii aaii--jjee bbeessooiinn ppoouurr ddmmaarrrreerr ??

  Avant de commencer  construire ou configurer votre rseau, vous aurez
  besoin de certaines choses. Les plus importantes sont :



  55..11..11..  SSoouurrcceess dduu nnooyyaauu rrcceenntteess ((OOppttiioonnnneell))..

   noter:

  La majorit des distributions actuelles sont livres avec l'option
  rseau active, en sorte que vous n'avez pas besoin de recompiler le
  noyau. Si vous utilisez du matriel bien connu, tout ira bien. Par
  exemple: cartes 3COM, cartes NE2000  ou cartes Intel. Cependant si
  vous devez recompiler le noyau, voyez les informations qui suivent.


  Si le noyau que vous utilisez actuellement ne supporte pas les types
  de rseau ou les cartes que vous voulez utiliser, vous aurez besoin
  des sources du noyau pour pouvoir le recompiler avec les options
  adquates.

  Pour les utilisateurs des principales distributions comme RedHat,
  Caldera, Debian ou Suse, ce n'est plus vrai. Tant que vous restez avec
  un matriel de grande diffusion, il n'est pas ncessaire de recompiler
  le noyau,  moins que vous n'ayez une exigence trs spcifique.


  Vous pouvez toujours obtenir les sources du dernier noyau sur :
  ftp.cdrom.com.  Ce n'est pas le site officiel mais ils ont BEAUCOUP de
  bande passante et BEAUCOUP d'utilisateurs peuvent se connecter en mme
  temps. Le site officiel est kernel.org, mais dans la mesure du
  possible, utilisez s'il vous plat celui que je viens de donner.
  Souvenez-vous que ftp.kernel.org est particulirement surcharg.
  Utilisez un miroir.: (NdT : et bien sr ftp.lip6.fr) .

  Normalement les sources du noyau doivent tre dsarchives dans le
  rpertoire /usr/src/linux.  Pour savoir comment appliquer les patches
  et compiler le noyau, lisez le Kernel-HOWTO.  Pour savoir comment
  configurer les modules du noyau, lisez le ``Modules-mini-HOWTO''.
  Enfin, le fichier README qui se trouve dans les sources du noyau ainsi
  que le rpertoire Documentation donnent beaucoup de renseignements au
  lecteur courageux.

  Sauf indication contraire, je vous recommande de vous en tenir  une
  version stable du noyau (celle avec un chiffre pair en seconde place
  dans le numro de version). Les versions de dveloppement (avec un
  chiffre impair en seconde place dans le numro de version) peuvent
  avoir une structure ou autre chose qui peut poser problme avec les
  logiciels de votre systme. Si vous n'tes pas certain de rsoudre ce
  type de problmes, avec en plus ceux qui existeraient sur d'autres
  logiciels, ne les utilisez pas.
  D'autre part, certaines caractristiques dcrites dans ce document ont
  t introduites lors du dveloppement des noyaux 2.1.x, vous devez
  donc choisir : soit vous restez avec la version 2.0 et attendez la
  version 2.2, avec une distribution mise  jour contenant tous les
  nouveaux outils, soit vous utilisez la version 2.1 et cherchez les
  divers programmes qui supportent les nouvelles fonctionnalits.
  Lorsque j'cris ce paragraphe, en aot 1998, la version de
  dveloppement en cours est la 2.1.115 et la 2.2 va apparatre
  prochainement.



  55..11..22..  OOuuttiillss ddee rrsseeaauu rrcceennttss

  Ces outils sont les programmes utiliss pour configurer les fichiers
  de priphriques rseau. Ils vous permettent d'assigner des adresses
  aux priphriques et de configurer des routes par exemple.

  La plupart des distributions Linux modernes sont fournies avec les
  outils de rseau, aussi si vous avez fait votre installation  partie
  d'une distribution et que vous n'avez pas encore install les outils
  de rseau, vous devez le faire.

  Si vous n'avez pas fait l'installation  partir d'une distribution,
  vous aurez alors besoin des sources pour les compiler vous-mme.  Ce
  n'est pas difficile.

  Les outils de rseau sont maintenus par Bernd Eckenfels et se trouvent
  sur : ftp.inka.de et sont recopis sur : ftp.linux.uk.org.

  Vous pouvez galement obtenir les derniers paquetages RedHat sur net-
  tools-1.51-3.i386.rpm

  Soyez srs de choisir la version la mieux approprie  votre noyau et
  suivez les instructions incluses dans le paquetage.

  Pour installer et configurer la version actuelle (au moment o
  j'cris), vous devrez faire :


       user% tar xvfz net-tools-1.33.tar.gz
       user% cd net-tools-1.33
       user% make config
       user% make
       root# make install




  Ou avec les paquetages Redhat:



       root# rpm -U net-tools-1.51-3.i386.rpm





  De plus, si vous voulez configurer une protection pare-feu ou utiliser
  le masquage IP vous aurez besoin de la commande _i_p_f_w_a_d_m. La dernire
  version peut-tre obtenue sur : ftp.xos.nl.  Encore une fois, de
  nombreuses versions existent. Soyez srs de prendre celle qui s'adapte
  le mieux  votre noyau. Notez que les fonctionnalits pour pare-feu de
  Linux ont chang pendant le dveloppement de la version 2.1 et ont t
  remplaces par _i_p_c_h_a_i_n_s dans la version 2.2 du noyau.  _i_p_f_w_a_d_m ne
  s'applique donc qu'aux versions 2.0 du noyau.  Ce qui suit ne
  s'applique donc qu'aux distributions ayant la version 2.0 ou
  antrieure.


       Redhat 5.2 ou infrieure
       Caldera pr-version 2.2
       Slackware pr-version 4.x
       Debian pr-version 2.x




  Pour installer et configurer la version existante au moment de
  l'criture de ce document, vous devez lire le document howto IPchains
  situ sur Le projet de Documentation Linux.

  Notez que si vous avez la version 2.2 (ou l'ancienne 2.1) du noyau,
  _i_p_f_w_a_d_m n'est pas le bon outil pour configurer le pare-feu. Cette
  version de NET-3-HOWTO n'est pas en accord avec les nouveaux rglages
  du pare-feu. Si vous dsirez plus d'informations dtailles sur
  ipchains, rfrez-vous au document mentionn ci-dessus.



  55..11..33..  AApppplliiccaattiioonnss rrsseeaauu

  Les programmes d'application rseau sont des programmes tels que
  _t_e_l_n_e_t et _f_t_p et leurs serveurs respectifs. David Holland s'occupe
  maintenant d'une distribution trs rpandue, qui est maintenant
  maintenue par netbug@ftp.uk.linux.org.  Vous pouvez obtenir cette
  distribution sur : ftp.uk.linux.org.




  55..11..44..  AAddrreesssseess eett eexxpplliiccaattiioonnss..

  Les adresses de protocole Internet (IP) sont composes de quatre
  octets. La convention d'criture est appele `notation dcimale
  pointe'. Sous cette forme chaque octet est converti en un nombre
  dcimal (0-255), en omettant les zros de tte ( moins que ce nombre
  ne soit lui-mme un zro) et chaque octet est spar par le caractre
  `.'.  Par convention, chaque interface d'un hte ou routeur possde
  une adresse IP. Il est permis, dans certaines circonstances, que la
  mme adresse IP soit utilise sur diffrentes interfaces d'une mme
  machine, mais, en gnral, chaque interface possde sa propre adresse.

  Les rseaux IP (Protocole Internet) sont des squences contigus
  d'adresses IP. Toutes les adresses d'un mme rseau ont des chiffres
  en commun.  La partie d'adresse commune  toutes les adresses d'un
  rseau s'appelle la `partie rseau' de l'adresse. Les chiffres
  restants s'appellent `partie hte'. Le nombre de bits qui sont
  partags par toutes les adresses d'un mme rseau est appel masque de
  rseau (netmask) et c'est le rle du masque de rseau de dterminer
  quelles adresses appartiennent  `son' rseau et celles qui ne sont
  pas concernes.  Par exemple :









  ----------------------------------------     ----------------
  Adresse hte (host address)                  192.168.110.23
  Masque de rseau (network mask)              255.255.255.0
  Partie rseau (network portion)              192.168.110.
  Partie hte (host portion)                              .23
  ----------------------------------------     ----------------
  Adresse rseau (network address)             192.168.110.0
  Adresse de diffusion (broadcast address)     192.168.110.255
  ----------------------------------------     ----------------





  Toute adresse qui est `ANDE bit  bit' avec son masque de rseau
  rvlera l'adresse du rseau auquel elle appartient.  L'adresse du
  rseau est par consquent l'adresse de plus petit nombre dans
  l'ensemble des adresses et a toujours la partie hte code avec des
  zros.

  L'adresse de diffusion est une adresse spciale que chaque hte du
  rseau coute en mme temps que son adresse personnelle.  Cette
  adresse est celle  laquelle les datagrammes sont envoys si tous les
  htes du rseau sont en mesure de les recevoir.  Certains types de
  donnes telles que les informations de routage et les messages
  d'alerte sont transmis vers l'adresse de diffusion de telle sorte que
  tous les htes du rseau peuvent les recevoir en mme temps.  Il y a
  deux standards utiliss de manire courante pour dfinir ce que doit
  tre l'adresse de diffusion. Le plus largement utilis est de prendre
  l'adresse la plus haute possible du rseau comme adresse de diffusion.
  Dans l'exemple ci-dessus ce serait 192.168.110.255. Pour d'autres
  raisons, certains sites ont adopt la convention d'utiliser l'adresse
  de rseau comme adresse de diffusion. En pratique cela n'a pas
  beaucoup d'importance, mais vous devez tre srs que tous les htes du
  rseau sont configurs avec la mme adresse de diffusion.

  Pour des raisons d'administration, il y a quelque temps, lors du
  dveloppement du protocole IP, des ensembles d'adresses ont t
  organiss en rseaux et ces rseaux ont t regroups en ce que l'on a
  appell classes. Ces classes donnent un certain nombre de rseaux de
  tailles standards auxquels on peut assigner des adresses. Ces classes
  sont :



       ----------------------------------------------------------
       |Classe de |Masque de     | Adresses de rseau           |
       | rseau   |  rseau      |                              |
       ----------------------------------------------------------
       |    A    | 255.0.0.0     | 0.0.0.0    - 127.255.255.255 |
       |    B    | 255.255.0.0   | 128.0.0.0  - 191.255.255.255 |
       |    C    | 255.255.255.0 | 192.0.0.0  - 223.255.255.255 |
       |Multicast| 240.0.0.0     | 224.0.0.0  - 239.255.255.255 |
       ----------------------------------------------------------





  Le type d'adresse que vous devez utiliser dpend de ce que vous voulez
  faire exactement. Vous pouvez utiliser une combinaison des actions
  suivantes pour obtenir l'ensemble des adresses dont vous aurez besoin
  :



     IInnssttaalllleerr uunnee mmaacchhiinnee LLiinnuuxx ssuurr uunn rrsseeaauu IIPP eexxiissttaanntt
        Vous devez alors contacter un des administrateurs du rseau et
        lui demander les informations suivantes :

       Adresse hte;

       Adresse rseau;

       Adresse de diffusion;

       Masque de rseau;

       Adresse de routage;

       Adresse du serveur de noms de domaine (DNS).

        Vous configurerez alors votre rseau Linux  l'aide de ces
        donnes.  Vous ne pouvez pas les inventer vous-mme et esprer
        que votre configuration fonctionne.

     CCoonnssttrruuiirree uunn rrsseeaauu ttoouutt nneeuuff nnoonn ccoonnnneecctt 
        l'Internet" Si vous construisez un rseau priv et que vous
        n'ayez pas l'intention de vous connecter  l'Internet, vous
        pouvez alors choisir n'importe quelle adresse.  Cependant, pour
        des raisons de scurit et de fiabilit, il y a quelques
        adresses de rseau IP rserves  cet usage. Elles sont
        spcifies dans la RFC 1597 et sont les suivantes :


        -----------------------------------------------------------
        |         ALLOCATIONS POUR RSEAUX PRIVS                 |
        -----------------------------------------------------------
        | Classe  | Masque de     | Adresses de rseau            |
        | rseau  |  rseau       |                               |
        -----------------------------------------------------------
        |    A    | 255.0.0.0     | 10.0.0.0    - 10.255.255.255  |
        |    B    | 255.255.0.0   | 172.16.0.0  - 172.31.255.255  |
        |    C    | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 |
        -----------------------------------------------------------



     Vous devez d'abord dcider de la dimension de votre rseau et
     choisir ensuite les adresses dont vous avez besoin.



  55..22..  OO mmeettttrree lleess ccoommmmaannddeess ddee ccoonnffiigguurraattiioonn ??

  Il y a plusieurs possibilits de procdures de dmarrage d'un systme
  Linux. Aprs le dmarrage du noyau, celui-ci excute toujours un
  programme appel `_i_n_i_t'. Ce programme lit le fichier de configuration
  appel /etc/inittab et commence le processus de dmarrage. Il y a
  quelques variantes de _i_n_i_t, bien que maintenant tout le monde se
  dirige vers la variante System V (cinq), dveloppe par Miguel van
  Smoorenburg.

  Bien que que le programme _i_n_i_t soit toujours le mme, les rglages du
  processus de dmarrage se font diffremment suivant le type de
  distribution.  Habituellement le fichier /etc/inittab contient une
  entre telle que :



       si::sysinit:/etc/init.d/boot

  Cette ligne spcifie le nom du fichier script qui prend en charge
  rellement la squence de dmarrage. Ce fichier est en quelque sorte
  quivalent au fichier MS-DOS AUTOEXEC.BAT.

  Il y a aussi d'autres scripts appels par le script de dmarrage, et
  souvent le rseau est configur dans l'un de ceux-ci.

  Le tableau suivant peut tre utilis comme guide suivant le systme
  que vous avez :



       -------------------------------------------------------------------------------
       Distrib. |Interface Config/Routage           | Initialisation serveur
       -------------------------------------------------------------------------------
       Debian   | /etc/init.d/network               | /etc/rc2.d/*
       -------------------------------------------------------------------------------
       Slackware| /etc/rc.d/rc.inet1                | /etc/rc.d/rc.inet2
       -------------------------------------------------------------------------------
       RedHat   | /etc/rc.d/init.d/network          | /etc/rc.d/rc3.d/*
       -------------------------------------------------------------------------------





  Notez que les distributions Debian et RedHat utilisent tout un
  rpertoire pour les scripts qui mettent en route les services du
  systme (et habituellement l'information ne se situe pas dans ces
  fichiers, par exemple les systmes RedHat stockent l'ensemble de la
  configuration du systme sous /etc/sysconfig, o elle est rcupre
  par les scripts de dmarrage). Si vous voulez saisir les dtails du
  processus de dmarrage, je vous conseille de vrifier _/_e_t_c_/_i_n_i_t_t_a_b
  ainsi que la documentation accompagnant _i_n_i_t. Linux Journal va
  galement publier un article sur l'initialisation des systmes, et
  nous pointerons sur lui ds qu'il sera disponible sur le rseau.


  La plupart des distributions rcentes incluent un programme qui permet
  de configurer de nombreux types d'interfaces rseau. Si vous en
  possdez une, regardez si ce programme vous convient au lieu de tenter
  une configuration manuelle.




       -----------------------------------------
       Distrib   | Programme de configuration rseau
       -----------------------------------------
       RedHat    | /sbin/netcfg
       Slackware | /sbin/netconfig
       -----------------------------------------






  55..33..  CCrreerr vvooss iinntteerrffaacceess rrsseeaauu

  Sur beaucoup de systmes Unix les priphriques rseau apparaissent
  dans le rpertoire _/_d_e_v . Il n'en est pas de mme avec Linux. Les
  priphriques rseau  sont crs dynamiquement par les logiciels et ne
  ncessitent donc pas de fichiers de priphriques.


  Dans la majorit des cas, le priphrique rseau est cr
  automatiquement par le pilote de priphrique pendant son
  initialisation lorsqu'il dtecte votre matriel.  Par exemple le
  pilote Ethernet cre les interfaces eth[0..n] une  une quand il
  dtecte votre matriel Ethernet. La premire carte Ethernet trouve
  devient eth0, la deuxime eth1, etc.

  Cependant, dans certains cas, notamment avec _S_L_I_P et _P_P_P, les
  priphriques rseau sont crs par un programme utilisateur. Le mme
  mcanisme squentiel s'applique sur les priphriques, mais ce n'est
  pas au moment du dmarrage du systme. La raison en est que, 
  l'inverse des dispositifs Ethernet, le nombre de priphriques _S_L_I_P ou
  _P_P_P actifs peut varier dans le temps.  Nous y reviendrons plus tard.



  55..44..  CCoonnffiigguurreerr uunnee iinntteerrffaaccee rrsseeaauu

  Lorsque vous avez tous les programmes requis, votre adresse et les
  informations rseau, vous pouvez alors configurer vos interfaces.
  Lorsque nous parlons de la configuration d'interface, nous faisons
  allusion au processus d'assignation des adresses du priphrique
  rseau, et au processus de rglage des paramtres configurables.  Le
  programme le plus utilis pour ce faire est la commande _i_f_c_o_n_f_i_g
  (interface configure).

  Typiquement vous utilisez une commande comme ci-dessous :


       root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up




  Dans ce cas je configure l'interface Ethernet `eth0' avec l'adresse IP
  `192.168.0.1' et un masque de rseau `255.255.255.0'.  Le `_u_p' qui
  termine la commande enjoint  l'interface de devenir active, mais il
  peut tre omis, tant par dfaut. Pour clore une interface, vous
  faites juste ``ifconfig eth0 down''.

  Le noyau suppose certaines valeurs par dfaut lorsque l'on configure
  les interfaces. Par exemple, vous pouvez indiquer une adresse de
  rseau et une adresse de diffusion, mais si vous ne le faites pas
  comme nous venons de le faire dans l'exemple ci-dessus, alors le noyau
  fera certaines hypothses fondes sur le masque de rseau que vous
  avez fourni, et si vous ne l'avez pas donne, sur la classe de
  l'adresse IP configure.  Dans mon exemple, le noyau considrera que
  c'est un rseau de classe C et configurera une adresse rseau de
  `192.168.0.0' et une adresse de diffusion de `192.168.0.255'.

  Il y a de nombreuses autres options pour la commande _i_f_c_o_n_f_i_g . Les
  plus importantes sont :

     uupp active une interface (est fait par dfaut).

     ddoowwnn
        dsactive une interface.

     [[--]]aarrpp
        active ou dsactive le protocole de rsolution d'adresses sur
        cette interface.

     [[--]]aallllmmuullttii
        active ou dsactive la rception de tous les paquets multicast
        matriel (Ndt : Les adresses multicast sont un genre d'adresses
        de diffusion limites  un groupe de machine qui n'ont pas
        ncessairement besoin de se trouver sur le mme sous-rseau). Le
        multicast matriel permet  des groupes d'htes de recevoir des
        paquets adresss vers des destinations spciales. Ce peut tre
        important si vous utilisez des applications comme la
        vidoconfrence, mais la plupart du temps on ne l'utilise pas.

     mmttuu NN
        ce paramtre permet de rgler le _M_T_U (Maximum Transfert Unit)
        sur le priphrique.

     nneettmmaasskk <<aaddddrr>>
        ce paramtre permet de fixer le masque de rseau.

     iirrqq <<aaddddrr>>
        ce paramtre ne fonctionne qu'avec certains types de matriels,
        mais vous permet d'en fixer l'IRQ.

     [[--]]bbrrooaaddccaasstt [[aaddddrr]]
        permet d'activer ou de dsactiver l'acceptation de datagrammes
        destins  l'adresse de diffusion.

     ((--))ppooiinnttooppooiinntt [[aaddddrr]]
        permet de fixer l'adresse de la machine  l'extrmit d'un lien
        point--point comme pour _s_l_i_p ou _p_p_p.

     hhww <<ttyyppee>> <<aaddddrr>>
        permet de fixer l'adresse matrielle de certains priphriques
        rseau. Ce n'est pas souvent utilis pour Ethernet, mais utile
        pour d'autres types de rseau tels que AX.25.

  Vous pouvez utiliser la commande _i_f_c_o_n_f_i_g pour toutes les interfaces
  rseau. Quelques programmes utilisateurs comme _p_p_p_d et _d_i_p configurent
  automatiquement les priphriques en mme temps qu'ils les crent, ds
  lors l'utilisation manuelle de _i_f_c_o_n_f_i_g n'est pas ncessaire.



  55..55..  CCoonnffiigguurreerr vvoottrree ssoollvveeuurr ddee nnoommss

  Le `_S_o_l_v_e_u_r _d_e _N_o_m_s' (Name Resolver) fait partie de la bibliothque
  standard de Linux. Sa premire fonction est de convertir des noms
  d'htes comprhensibles par l'homme, comme `ftp.funet.fi' , en
  adresses IP comprhensibles par une machine, comme 128.214.248.6.


  55..55..11..  QQuu''yy aa--tt--iill ddaannss uunn nnoomm ??

  Vous tes probablement familiers avec l'aspect des noms d'htes
  Internet, mais vous ne savez pas comment ils sont composs ou
  dcomposs. Les noms de domaine Internet sont hirarchiss par nature,
  c'est--dire qu'ils ont une structure arborescente.  Un `_d_o_m_a_i_n_e' est
  une famille, ou un groupe de noms. Un `_d_o_m_a_i_n_e' peut tre subdivis en
  `_s_o_u_s_-_d_o_m_a_i_n_e_s'. Un `_d_o_m_a_i_n_e _d_e _p_r_e_m_i_e_r _n_i_v_e_a_u' est un domaine qui
  n'est pas un sous-domaine. Les Domaines de Premier Niveau sont
  spcifis dans la RFC-920. Quelques exemples :


     CCOOMM
        Organisations Commerciales

     EEDDUU
        Organisations ayant rapport avec l'ducation

     GGOOVV
        Organisations Gouvernementales (NdT: parfois GOUV en France!)

     MMIILL
        Organisations Militaires

     OORRGG
        Autres organisations

     NNEETT
        Organisations ayant un rapport avec l'internet

     NNoomm ddee PPaayyss
        il existe des codes de deux lettres qui reprsentent un pays
        donn.

  Pour des raisons historiques la plupart des domaines appartenant  des
  domaines qui ne sont pas bass sur des noms de pays sont pour les
  organisations situes aux tats-Unis, bien que les tats-Unis aient
  aussi le code de pays `.us'. Ce n'est plus vrai pour les domaines .com
  et .org, qui sont couramment utiliss par des socits hors des tats-
  Unis.


  Chacun de ces domaines de premier niveau possde des sous-domaines.
  Les domaines de premier niveau fonds sur les noms de pays sont
  diviss ensuite en sous-domaines bass sur les domaines com, edu, gov,
  mil et org . Ainsi par exemple, vous finissez par : com.au and gov.au
  pour des organisations commerciales ou gouvernementales situes en
  Australie ; notez que ce n'est pas une rgle absolue, car les
  politiques relles dpendant de l'autorit qui donne les noms pour
  chaque domaine.

  Le niveau de division suivant reprsente habituellement le nom de
  l'organisation. Ces sous-domaines sont variables, souvent ils sont
  fonds sur la structure en dpartements de l'organisation mais ils
  peuvent l'tre galement sur d'autres critres considrs comme
  rationnels et comprhensibles par les administrateurs rseau de
  l'organisation.

  La partie tout  fait  gauche du nom est toujours le nom unique
  assign  la machine hte et est appele le nom d'hte `_h_o_s_t_n_a_m_e', la
  partie de droite du nom est le nom de domaine `_d_o_m_a_i_n_n_a_m_e' et le nom
  complet s'appelle le nom de domaine compltement qualifi `_F_u_l_l_y
  _Q_u_a_l_i_f_i_e_d _D_o_m_a_i_n _N_a_m_e' (ou FQDN).

  Si l'on examine l'adresse de la machine de Terry par exemple, le nom
  pleinement qualifi est `perf.no.itg.telstra.com.au'. Cela veut dire
  que le nom d'hte est `perf' et le nom de domaine
  `no.itg.telstra.com.au'. Le nom de domaine est fond sur un domaine de
  premier niveau bas sur son pays, l'Australie et comme son adresse
  lectronique appartient  une organisation commerciale nous avons
  `.com' comme domaine de niveau adjacent. Le nom de la socit est
  (tait) `telstra' et notre structure interne de noms est bas sur la
  structure organisationnelle, dans mon cas, ma machine appartient 
  l'Information Technology Group, section Network Operations.

  Habituellement, les noms sont plutt plus courts ; par exemple, mon
  fournisseur d'accs  l'internet est ``systemy.it'' et mon
  organisation  but non lucratif est ``linux.it'', sans sous-domaine
  com ou org, aussi mon propre hte est simplement appel
  ``morgana.systemy.it'' et rubini@linux.it est une adresse lectronique
  valide. Notez que le propritaire d'un domaine a le droit
  d'enregistrer les noms d'htes aussi bien que les noms de sous-domaine
  ; par exemple le Groupe d'Utilisateur Linux auquel j'appartiens
  utilise le domaine pluto.linux.it, car les propritaires de linux.it
  taient d'accord pour crer un sous-domaine pour ce groupe.


  55..55..22..  LLeess iinnffoorrmmaattiioonnss nncceessssaaiirreess

  Vous devez connatre le domaine auquel votre nom d'hte appartient. Le
  solveur de nom effectue la traduction en faisant appel  un `_S_e_r_v_e_u_r
  _d_e _N_o_m_s _d_e _D_o_m_a_i_n_e', aussi vous devez connatre l'adresse IP d'un
  serveur de nom local que vous pouvez utiliser.

  Il y a trois fichiers que vous devez diter, nous en parlerons chacun
   leur tour.



  55..55..33..  //eettcc//rreessoollvv..ccoonnff

  Le fichier /etc/resolv.conf est le principal fichier de configuration
  pour le code de rsolution de nom. Son format est trs simple.  C'est
  un fichier texte avec un mot-cl par ligne. Il y a trois mots-cls
  typiquement utiliss, qui sont :

     ddoommaaiinn
        ce mot-cl indique le nom de domaine local.

     sseeaarrcchh
        ce mot-cl spcifie une liste d'autres noms de domaine pour
        rechercher un nom d'hte.

     nnaammeesseerrvveerr
        ce mot-cl, qui peut tre utilis plusieurs fois, spcifie
        l'adresse IP d'un serveur de nom de domaine pour la rsolution
        de noms.

  Un exemple de /etc/resolv.conf pourrait ressembler  ceci :


       domain maths.wu.edu.au
       search maths.wu.edu.au wu.edu.au
       nameserver 192.168.10.1
       nameserver 192.168.12.1




  Cet exemple spcifie que le nom de domaine par dfaut  ajouter aux
  noms non qualifis (c'est--dire sans domaine) est maths.wu.edu.au, et
  que si l'hte n'est pas trouv dans ce domaine on peut aussi essayer
  le domaine wu.edu.au directement. Deux entres de serveurs de noms
  sont fournies, chacune d'elles pouvant tre appele par le solveur de
  noms.



  55..55..44..  //eettcc//hhoossttss

  Le fichier /etc/hosts est l'endroit o vous mettez les noms et les
  adresses IP des htes locaux. Si vous mettez un hte dans ce fichier,
  alors vous n'avez pas  interroger le serveur de nom de domaine pour
  obtenir son adresse IP. L'inconvnient est que vous devez tenir votre
  fichier  jour si l'adresse de cet hte a chang.  Dans un systme
  bien administr les seuls noms d'htes qui apparaissent habituellement
  sont l'interface loopback, et le nom des htes locaux.






  # /etc/hosts
  127.0.0.1      localhost loopback
  192.168.0.1    ma.belle.machine




  Vous pouvez spcifier plus d'un nom d'hte, comme montr dans la
  premire entre (qui est standard pour l'interface loopback).



  55..55..55..  FFaaiirree ttoouurrnneerr uunn sseerrvveeuurr ddee nnoommss

  Si vous voulez faire tourner un serveur de nom local, vous pouvez le
  faire facilement. Voyez le DNS-HOWTO et tous les documents inclus dans
  votre version de _B_I_N_D (Berkeley Internet Name Domain).



  55..66..  CCoonnffiigguurreerr vvoottrree iinntteerrffaaccee llooooppbbaacckk

  L'interface `loopback' est un type spcial d'interface qui permet de
  vous connecter  vous-mme. Il y a plusieurs raisons pour faire cela,
  par exemple si vous voulez faire des essais de logiciel rseau sans
  interfrer avec quelqu'un d'autre sur votre rseau. Par convention,
  l'adresse IP `127.0.0.1' lui a t assigne. Aussi quelle que soit la
  machine o vous tes, si vous ouvrez une connexion telnet vers
  127.0.0.1 vous atteindrez toujours l'hte local.

  Configurer l'interface loopback est simple et vous devez vous assurer
  de l'avoir fait (mais notez que cette tche est habituellement
  effectue par les scripts standards d'initialisation).



       root# ifconfig lo 127.0.0.1
       root# route add -host 127.0.0.1 lo




  Nous en dirons plus sur la commande _r_o_u_t_e dans le prochain paragraphe.



  55..77..  RRoouuttaaggee

  Le routage est un vaste sujet. On peut crire de grandes quantits de
  textes sur ce sujet. La plupart d'entre vous ont besoin d'un simple
  routage, et certains mme de rien du tout.  Je ne parlerai que des
  principes du routage. Si vous voulez plus d'informations je vous
  suggre de vous reporter aux rfrences fournies en dbut du document.

  Commenons par une dfinition. Qu'est-ce que le routage IP ?  Voici
  celle que j'utilise :


       Le routage IP est le processus par lequel un hte, ayant des
       connexions rseau multiples, dcide du chemin par lequel
       dlivrer les datagrammes IP qu'il a reus.


  Il peut tre utile d'illustrer cela par un exemple. Imaginez un
  routeur dans un bureau : il peut avoir un lien PPP sur l'Internet, un
  certain nombre de segments Ethernet alimentant les stations de travail
  et un second lien PPP vers un autre bureau.  Lorsque le routeur reoit
  un datagramme de l'une de ses connexions, le routage est le mcanisme
  utilis pour dterminer vers quelle interface il doit renvoyer ce
  datagramme. De simples htes ont besoin aussi de routage, tous les
  htes Internet ayant deux priphriques rseau, l'un tant l'interface
  loopback dcrite auparavant et l'autre est celui qui est utilis pour
  parler avec le reste du monde, soit un lien Ethernet, soit une
  interface srie PPP ou SLIP.

  Ok, alors comment marche le routage ? Chaque hte possde une liste
  spciale de rgles de routage, appele une table de routage. Cette
  table contient des colonnes qui contiennent au moins trois champs, le
  premier tant une adresse de destination, le deuxime tant le nom de
  l'interface vers lequel le datagramme doit tre rout et le troisime,
  qui est optionnel, l'adresse IP d'une autre machine qui transportera
  le datagramme vers sa prochaine destination sur le rseau passerelle.
  Sur Linux vous pouvez voir cette table en utilisant la commande
  suivante :


       user% cat /proc/net/route




  ou bien en utilisant l'une des commandes suivantes :


       user% /sbin/route -n
       user% /sbin/netstat -r




  Le processus de routage est plutt simple : un datagramme entrant est
  reu, l'adresse de destination est examine et compare avec chaque
  entre de la table. L'entre qui correspond le mieux  cette adresse
  est choisie, et le datagramme est renvoy vers l'interface spcifie.
  Si le champ passerelle est rempli, alors le datagramme est renvoy
  vers cet hte via l'interface spcifie, sinon l'adresse de
  destination est suppose comme tant sur le rseau support par
  l'interface.

  Pour manipuler ce tableau, une commande spciale est utilise.  Cette
  commande prend des arguments et les convertit en appels systme pour
  demander au noyau d'ajouter, supprimer ou modifier des entres dans la
  table de routage. Cette commande s'appelle `_r_o_u_t_e'.

  Un exemple simple. Imaginez que vous ayez un rseau Ethernet. On vous
  a dit que c'est un rseau classe C avec une adresse de 192.168.1.0. On
  vous fournit une adresse IP 192.168.1.10 pour votre usage et on vous a
  dit que 192.168.1.1 est un routeur connect  l'Internet.

  La premire tape est de configurer l'interface comme indiqu plus
  haut. Vous utiliserez la commande :


       root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up




  Maintenant vous avez besoin d'ajouter une entre dans la table de
  routage pour indiquer au noyau que les datagrammes destins aux htes
  dont les adresses correspondent  192.168.1.* doivent tre dirigs
  vers le priphrique Ethernet. Vous utiliserez une commande comme ceci
  :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0




  Notez l'utilisation de l'argument `-net' pour indiquer au programme
  route que cette entre est une route rseau.  Un autre choix peut tre
  `-host' qui est une route spcifique d'une adresse IP.

  Cette route vous permettra d'tablir des connexions IP avec tous les
  htes sur votre segment Ethernet. Mais qu'en est-il des htes IP qui
  n'y sont pas ?

  Ce serait compliqu d'ajouter des routes pour chaque rseau
  destinataire, aussi il y a une astuce utilise pour simplifier la
  tche.  L'astuce est appele route par `default'. La route par defaut
  s'adapte  toutes les destinations possibles, mais pas trs bien, de
  telle sorte que si il y a une entre qui correspond  l'adresse
  requise elle sera utilise  la place de la route par defaut. L'ide
  de la route par defaut est simplement de pouvoir dire `et tout le
  reste va ici'. Dans l'exemple que j'ai invent, on utilisera une
  entre telle que :


       root# route add default gw 192.168.1.1 eth0




  L'argument `gw' indique  la commande route que le prochain argument
  est l'adresse IP, ou le nom, d'une passerelle (gateway) ou d'une
  machine routeur vers qui tous les datagrammes correspondant  cette
  entre seront dirigs pour  routage ultrieur.

  Ainsi votre configuration complte sera :


       root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add default gw 192.168.1.1 eth0




  Si vous regardez bien vos fichiers `rc' concernant le rseau vous en
  trouverez au moins un trs semblable  celui-ci. C'est une configura
  tion courante.

  Examinons maintenant une configuration un peu plus complique.
  Imaginons que nous configurions le routeur examin auparavant, celui
  qui avait un lien PPP vers l'Internet et des segments LAN alimentant
  des stations de travail dans le bureau. Supposons que ce routeur ait 3
  segments Ethernet et un lien PPP. Notre configuration de routage
  ressemblerait  ceci :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add -net 192.168.2.0 netmask 255.255.255.0 eth1
       root# route add -net 192.168.3.0 netmask 255.255.255.0 eth2
       root# route add default ppp0



  Chacune des stations de travail utilisera le format plus simple dcrit
  ci-dessus, seul le routeur aura besoin d'indiquer les routes rseau
  sparment car pour les stations de travail le mcanisme de routage
  par defaut les capturera toutes, laissant au routeur le soin de les
  sparer de manire approprie. Vous pouvez vous demander pourquoi la
  route par dfaut n'utilise pas `gw'.  La raison en est trs simple :
  les protocoles de lien srie comme PPP et SLIP ont seulement deux
  htes sur leur rseau, un  chaque bout. Spcifier  l'hte que
  l'autre bout de la liaison est une passerelle est sans objet et redon
  dant, car il n'a pas d'autre choix, aussi vous n'avez pas  indiquer
  de passerelle pour ce type de connexions rseau. Les autres types
  comme Ethernet, arcnet ou token ring ont besoin que l'on indique une
  passerelle car ces rseaux supportent un grand nombre d'htes.



  55..77..11..  AAlloorrss,, qquuee ffaaiitt llee pprrooggrraammmmee rroouutteedd  ??

  La configuration de routage dcrite ci-dessus est bien adapte aux
  rseaux simples o il n'y a que des chemins uniques entre les
  destinations. Lorsque vous avez un rseau plus complexe les choses
  deviennent plus compliques.  Heureusement pour la plupart d'entre
  vous, ce ne sera pas le cas.

  Le gros problme est qu'avec le `routage manuel' ou `routage statique'
  comme dcrit ci-dessus, si une machine ou un lien tombe en panne dans
  le rseau, alors la seule faon de diriger vos datagrammes vers un
  autre chemin, s'il existe, est d'intervenir manuellement et d'excuter
  les commandes adquates. Naturellement c'est lourd, lent, peu pratique
  et source de risques. Des techniques varies ont t dveloppes pour
  rgler automatiquement les tables de routage dans le cas d'incidents
  sur un rseau o il y a plusieurs routes possibles, toutes ces
  techniques tant regroupes sous le nom de `protocoles de routage
  dynamique'.

  Vous avez peut-tre entendu parler des plus courants. Ce sont RIP
  (Routing Information Protocol) et OSPF (Open Shortest Path First
  Protocol). RIP est trs souvent utilis sur les petits ou moyens
  rseaux d'entreprise. L'OPSF est plus moderne et plus apte  grer de
  grands rseaux et mieux adapt dans le cas o il y a un grand nombre
  de chemins possibles  travers le rseau.  Les implmentations
  usuelles de ces protocoles sont : `_r_o_u_t_e_d' - RIP, et `_g_a_t_e_d' - RIP,
  OSPF et autres.  Le programme `_r_o_u_t_e_d' est normalement fourni avec
  votre distribution Linux ou est inclus dans la paquetage `NetKit'
  dcrit auparavant.

  Un exemple pour vous montrer comment et o vous pouvez utiliser un
  protocole de routage dynamique ressemblerait  ceci :


















      192.168.1.0 /                         192.168.2.0 /
         255.255.255.0                         255.255.255.0
       -                                     -
       |                                     |
       |   /-----\                 /-----\   |
       |   |     |ppp0   //    ppp0|     |   |
  eth0 |---|  A  |------//---------|  B  |---| eth0
       |   |     |     //          |     |   |
       |   \-----/                 \-----/   |
       |      \ ppp1             ppp1 /      |
       -       \                     /       -
                \                   /
                 \                 /
                  \               /
                   \             /
                    \           /
                     \         /
                      \       /
                       \     /
                    ppp0\   /ppp1
                       /-----\
                       |     |
                       |  C  |
                       |     |
                       \-----/
                          |eth0
                          |
                     |---------|
                     192.168.3.0 /
                        255.255.255.0




  Nous avons trois routeurs A, B et C. Chacun supporte un segment Ether
  net avec un rseau IP de classe C (masque de rseau 255.255.255.0).
  Chaque routeur a galement une liaison PPP vers chacun des autres rou
  teurs. Ce rseau forme un triangle.

  Il est vident que la table de routage sur le routeur A ressemble 
  ceci :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add -net 192.168.2.0 netmask 255.255.255.0 ppp0
       root# route add -net 192.168.3.0 netmask 255.255.255.0 ppp1




  Cela fonctionnera bien jusqu' ce que le lien entre A et B tombe en
  panne. Si cette liaison est dfaillante, alors l'entre de routage
  montre que les htes sur le segment A ne peuvent pas atteindre les
  htes sur le segment B car leurs datagrammes seront dirigs sur le
  lien ppp0 du routeur A qui est rompu.  Ils pourront encore continuer 
  parler aux htes du segment C, et les htes du segment C pourront tou
  jours parler  ceux du segment B car la liaison reste intacte.

  Mais.., si A peut parler  C et si C peut toujours parler  B,
  pourquoi A ne routerait-il pas ses datagrammes pour B via C, et
  laisser ensuite C les envoyer  B ? C'est exactement le type de
  problmes que les protocoles de routage dynamique comme RIP sont en
  mesure de rsoudre.  Si chacun des routeurs A, B et C utilisent un
  dmon de routage (NdT: dmon est une francisation familire du vocable
  informatique anglais daemon, qui signifie Disk And Extension MONitor,
  c'est  dire qui n'est pas invoqu manuellement mais attend en tche
  de fond que quelque chose se passe, que quelque condition se produise.
  Ce terme fut introduit au dpart sous CTSS (Compatible Time Sharing
  System), un anctre du systme MULTICS, lui-mme parent d'UNIX (voir
  la traduction de Ren Cougnenc de `Le systme Linux' de M. Welsh et L.
  Kaufman chez O'Reilly International Thomson), alors leurs tables de
  routage seront automatiquement rgles pour reflter le nouvel tat du
  rseau mme si l'une des liaisons est dfectueuse. Configurer un tel
  rseau est simple, sur chaque routeur vous devez seulement faire deux
  choses. Dans ce cas, pour le routeur A :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# /usr/sbin/routed




  Le dmon de routage `_r_o_u_t_e_d' trouve automatiquement tous les ports
  actifs vers le rseau quand il dmarre et coute tous les messages sur
  chacun des priphriques rseau ce qui lui permet de dterminer et de
  mettre  jour sa table de routage.

  C'tait une trs brve explication du routage dynamique et de son
  utilisation. Si vous voulez d'avantage d'explications reportez-vous
  aux rfrences listes en dbut de document.

  Les points importants relatifs au routage dynamique sont :

  1. Vous n'avez besoin d'utiliser un dmon de routage dynamique que
     quand votre machine Linux peut choisir entre plusieurs routes pour
     une destination donne. C'est la cas par exemple lorsque vous
     envisagez d'utiliser IP masquerade.

  2. Le dmon de routage dynamique modifiera automatiquement votre table
     de routage pour tenir compte des changements survenus dans votre
     rseau.

  3. RIP est adapt aux rseaux de petite et moyenne taille.



  55..88..  CCoonnffiigguurreerr vvooss sseerrvveeuurrss rrsseeaauu eett lleess sseerrvviicceess..

  Les serveurs de rseau et les services sont des programmes qui
  permettent  un utilisateur distant de devenir utilisateur de votre
  machine Linux. Les programmes serveurs sont  l'coute des ports
  rseau.  Les ports rseau permettent die demander un service
  particulier  un hte particulier  et de faire la diffrence entre une
  connexion telnet entrante et une connexion ftp entrante. L'utilisateur
  distant tablit une connexion rseau avec votre machine puis le
  programme serveur, ou dmon de rseau,  l'coute du port, accepte la
  connexion et s'excute. Il y a deux faons d'oprer pour les dmons de
  rseau.  Les deux sont couramment utiliss en pratique. Ce sont :

     aauuttoonnoommee
        le programme dmon coute le port rseau dsign et lorsqu'il y
        a une connexion, il prend lui-mme la connexion en charge pour
        fournir le service.

     eessccllaavvee dduu sseerrvveeuurr _i_n_e_t_d
        le serveur _i_n_e_t_d est un programme dmon spcial spcialis dans
        la conduite des connexions rseau. Il possde un fichier de
        configuration qui indique quel programme doit tre utilis
        lorsqu'une connexion entrante est reue. Chacun des ports
        service doit tre configur soit avec le protocole tcp, soit
        avec le protocole udp.  Les ports sont dcrits dans un autre
        fichier dont nous parlerons plus tard.

  Il y deux fichiers importants que vous devez configurer. Ce sont
  /etc/services qui assigne des noms aux numros de port et
  /etc/inetd.conf qui sert pour la configuration du dmon de rseau
  _i_n_e_t_d .



  55..88..11..  //eettcc//sseerrvviicceess

  Le fichier /etc/services est une simple base de donnes qui associe
  des noms comprhensibles par l'homme  des ports service
  comprhensibles par la machine. Son format est tout  fait simple. Le
  fichier est un fichier texte dont chaque ligne reprsente une entre
  de la base de donnes. Chaque entre comprend trois champs spars par
  des caractres espace ou tabulation. Ces champs sont :

  nom      port/protocole        alias     # commentaire



     nnoomm
        un simple mot qui reprsente le service dcrit.

     ppoorrtt//pprroottooccoollee
        ce champ est divis en deux.

     ppoorrtt
        un nombre qui spcifie le numro de port o le service dsign
        sera disponible. La plupart des services ont des numros
        assigns. Ils sont dcrits dans la RFC-1340.

     pprroottooccoollee
        c'est soit tcp soit udp.  Il est important de noter qu'une
        entre comme 18/tcp est trs diffrente de 18/udp et qu'il n'y a
        pas de raisons techniques que le mme service existe sur les
        deux. Normalement le bon sens prvaut et c'est vraiment pour un
        service particulier disponible   la fois sur tcp et udp que
        vous verrez une entre pour les deux..

     aalliiaass
        autre nom qui peut tre utilis pour  dsigner ce service.

  Tout texte apparaissant aprs le caractre `#' est ignor et trait
  comme commentaire.



  55..88..11..11..  EExxeemmppllee ddee ffiicchhiieerr //eettcc//sseerrvviicceess ..

  Toutes les distributions rcentes de Linux fournissent un bon fichier
  /etc/services.  Juste au cas o vous construiriez tout depuis le
  dpart, voici une copie du fichier /etc/services fourni avec
  l'ancienne distribution Debian .











  # /etc/services:
  # $Id: services,v 1.3 1996/05/06 21:42:37 tobias Exp $
  #
  # Network services, Internet style
  #
  # Notez que c'est la politique actuelle de l'IANA d'assigner un seul numro
  # de port  la fois pour TCP et UDP; ainsi, la plupart des ports ont deux
  #entres mme si le protocole ne supporte pas UDP.
  # Mis  jour d'aprs la RFC 1340, ``Assigned Numbers'' (Juillet 1992).
  # Il n'y a pas tous les ports, seulement les plus courants.

  tcpmux          1/tcp                           # TCP port service multiplexer
  echo            7/tcp
  echo            7/udp
  discard         9/tcp           sink null
  discard         9/udp           sink null
  systat          11/tcp          users
  daytime         13/tcp
  daytime         13/udp
  netstat         15/tcp
  qotd            17/tcp          quote
  msp             18/tcp                          # message send protocol
  msp             18/udp                          # message send protocol
  chargen         19/tcp          ttytst source
  chargen         19/udp          ttytst source
  ftp-data        20/tcp
  ftp             21/tcp
  ssh             22/tcp                          # SSH Remote Login Protocol
  ssh             22/udp                          # SSH Remote Login Protocol
  telnet          23/tcp
  # 24 - private
  smtp            25/tcp          mail
  # 26 - non assign
  time            37/tcp          timserver
  time            37/udp          timserver
  rlp             39/udp          resource        # resource location
  nameserver      42/tcp          name            # IEN 116
  whois           43/tcp          nicname
  re-mail-ck      50/tcp                          # Remote Mail Checking Protocol
  re-mail-ck      50/udp                          # Remote Mail Checking Protocol
  domain          53/tcp          nameserver      # name-domain server
  domain          53/udp          nameserver
  mtp             57/tcp                          # deprecated
  bootps          67/tcp                          # BOOTP server
  bootps          67/udp
  bootpc          68/tcp                          # BOOTP client
  bootpc          68/udp
  tftp            69/udp
  gopher          70/tcp                          # Internet Gopher
  gopher          70/udp
  rje             77/tcp          netrjs
  finger          79/tcp
  www             80/tcp          http            # WorldWideWeb HTTP
  www             80/udp                          # HyperText Transfer Protocol
  link            87/tcp          ttylink
  kerberos        88/tcp          kerberos5 krb5  # Kerberos v5
  kerberos        88/udp          kerberos5 krb5  # Kerberos v5
  supdup          95/tcp
  # 100 - reserve
  hostnames       101/tcp         hostname        # usually from sri-nic
  iso-tsap        102/tcp         tsap            # part of ISODE.
  csnet-ns        105/tcp         cso-ns          # also used by CSO name server
  csnet-ns        105/udp         cso-ns
  rtelnet         107/tcp                         # Remote Telnet
  rtelnet         107/udp
  pop-2           109/tcp         postoffice      # POP version 2
  pop-2           109/udp
  pop-3           110/tcp                         # POP version 3
  pop-3           110/udp
  sunrpc          111/tcp         portmapper      # RPC 4.0 portmapper TCP
  sunrpc          111/udp         portmapper      # RPC 4.0 portmapper UDP
  auth            113/tcp         authentication tap ident
  sftp            115/tcp
  uucp-path       117/tcp
  nntp            119/tcp         readnews untp   # USENET News Transfer Protocol
  ntp             123/tcp
  ntp             123/udp                         # Network Time Protocol
  netbios-ns      137/tcp                         # NETBIOS Name Service
  netbios-ns      137/udp
  netbios-dgm     138/tcp                         # NETBIOS Datagram Service
  netbios-dgm     138/udp
  netbios-ssn     139/tcp                         # NETBIOS session service
  netbios-ssn     139/udp
  imap2           143/tcp                         # Interim Mail Access Proto v2
  imap2           143/udp
  snmp            161/udp                         # Simple Net Mgmt Proto
  snmp-trap       162/udp         snmptrap        # Traps for SNMP
  cmip-man        163/tcp                         # ISO mgmt over IP (CMOT)
  cmip-man        163/udp
  cmip-agent      164/tcp
  cmip-agent      164/udp
  xdmcp           177/tcp                         # X Display Mgr. Control Proto
  xdmcp           177/udp
  nextstep        178/tcp         NeXTStep NextStep       # NeXTStep window
  nextstep        178/udp         NeXTStep NextStep       # server
  bgp             179/tcp                         # Border Gateway Proto.
  bgp             179/udp
  prospero        191/tcp                         # Cliff Neuman's Prospero
  prospero        191/udp
  irc             194/tcp                         # Internet Relay Chat
  irc             194/udp
  smux            199/tcp                         # SNMP Unix Multiplexer
  smux            199/udp
  at-rtmp         201/tcp                         # AppleTalk routing
  at-rtmp         201/udp
  at-nbp          202/tcp                         # AppleTalk name binding
  at-nbp          202/udp
  at-echo         204/tcp                         # AppleTalk echo
  at-echo         204/udp
  at-zis          206/tcp                         # AppleTalk zone information
  at-zis          206/udp
  z3950           210/tcp         wais            # NISO Z39.50 database
  z3950           210/udp         wais
  ipx             213/tcp                         # IPX
  ipx             213/udp
  imap3           220/tcp                         # Interactive Mail Access
  imap3           220/udp                         # Protocol v3
  ulistserv       372/tcp                         # UNIX Listserv
  ulistserv       372/udp
  #
  # services spcifiques  UNIX
  #
  exec            512/tcp
  biff            512/udp         comsat
  login           513/tcp
  who             513/udp         whod
  shell           514/tcp         cmd             # no passwords used
  syslog          514/udp
  printer         515/tcp         spooler         # line printer spooler
  talk            517/udp
  ntalk           518/udp
  route           520/udp         router routed   # RIP
  timed           525/udp         timeserver
  tempo           526/tcp         newdate
  courier         530/tcp         rpc
  conference      531/tcp         chat
  netnews         532/tcp         readnews
  netwall         533/udp                         # -for emergency broadcasts
  uucp            540/tcp         uucpd           # uucp daemon
  remotefs        556/tcp         rfs_server rfs  # Brunhoff remote filesystem
  klogin          543/tcp                         # Kerberized `rlogin' (v5)
  kshell          544/tcp         krcmd           # Kerberized `rsh' (v5)
  kerberos-adm    749/tcp                         # Kerberos `kadmin' (v5)
  #
  webster         765/tcp                         # Network dictionary
  webster         765/udp
  #
  # D'aprs ``Assigned Numbers'' :
  #
  #> Les Ports Enregistrs ne sont pas contrls par l'IANA et peuvent tre
  #> utiliss sur la plupart des systmes par des processus ordinaires
  #> ou des programmes excuts par des utilisateurs ordinaires.
  #
  #> Les ports sont utiliss dans le TCP [45,106] pour nommer les extrmits
  #> des connexions logiques qui transportent les conversations de longue
  #> dure. Pour offrir des services  des utilisateurs non connus, un port
  #> de service pour contact a t dfini. Cette liste spcifie le port utilis
  #> par le processus serveur ainsi que son port de contact. Comme l'IANA ne peut
  #> contrler l'usage de ces ports, on donne ici une liste d'utilisation
  #> de ces ports pour tre agrable  la communaut.
  #
  ingreslock      1524/tcp
  ingreslock      1524/udp
  prospero-np     1525/tcp                # Prospero non-privileged
  prospero-np     1525/udp
  rfe             5002/tcp                # Radio Free Ethernet
  rfe             5002/udp                # Actually uses UDP only
  bbs             7000/tcp                # BBS service
  #
  #
  # services Kerberos (Project Athena/MIT)
  # Notez que ceux-ci sont pour Kerberos v4, et ne sont pas officiels. Les sites
  # tournant sous v4 doivent utiliser ceux-ci et annuler les entres v5 ci-dessus.
  #
  kerberos4       750/udp         kdc     # Kerberos (server) udp
  kerberos4       750/tcp         kdc     # Kerberos (server) tcp
  kerberos_master 751/udp                 # Kerberos authentication
  kerberos_master 751/tcp                 # Kerberos authentication
  passwd_server   752/udp                 # Kerberos passwd server
  krb_prop        754/tcp                 # Kerberos slave propagation
  krbupdate       760/tcp         kreg    # Kerberos registration
  kpasswd         761/tcp         kpwd    # Kerberos "passwd"
  kpop            1109/tcp                # Pop with Kerberos
  knetd           2053/tcp                # Kerberos de-multiplexor
  zephyr-srv      2102/udp                # Zephyr server
  zephyr-clt      2103/udp                # Zephyr serv-hm connection
  zephyr-hm       2104/udp                # Zephyr hostmanager
  eklogin         2105/tcp                # Kerberos encrypted rlogin
  #
  # Services non officiels mais ncessaires (pour NetBSD)
  #
  supfilesrv      871/tcp                 # SUP server
  supfiledbg      1127/tcp                # SUP debugging
  #
  # Services protocole de dlivrance de datagrammes
  #
  rtmp            1/ddp                   # Routing Table Maintenance Protocol
  nbp             2/ddp                   # Name Binding Protocol
  echo            4/ddp                   # AppleTalk Echo Protocol
  zip             6/ddp                   # Zone Information Protocol
  #
  # Services Debian GNU/Linux
  rmtcfg          1236/tcp                # Gracilis Packeten remote config server
  xtel            1313/tcp                # french minitel
  cfinger         2003/tcp                # GNU Finger
  postgres        4321/tcp                # POSTGRES
  mandelspawn     9359/udp        mandelbrot      # network mandelbrot

  # Services locaux




  Dans la ralit, le fichier augmente toujours en taille au fur et 
  mesure que de nouveaux services apparaissent. Si vous craignez que
  votre copie soit incomplte, je vous suggre de copier un nouveau
  fichier /etc/services provenant d'une distribution rcente.



  55..88..22..  //eettcc//iinneettdd..ccoonnff

  Le fichier /etc/inetd.conf est le fichier de configuration du serveur
  dmon _i_n_e_t_d . Il sert  dire  _i_n_e_t_d ce qu'il doit faire lorsqu'il
  reoit une demande de connexion pour un service particulier.  Pour les
  services o vous acceptez une connexion vous devez dire  _i_n_e_t_d quel
  dmon serveur de rseau doit tourner, et comment.

  Son format est aussi trs simple. C'est un fichier texte dont chaque
  ligne dcrit un service que vous voulez fournir. Tout texte suivant un
  `#' est ignor et considr comme commentaire. Chaque ligne contient
  sept champs spars par un nombre quelconque d'espaces (espace ou
  tabulation). Le format gnral est comme suit :


       service  type_de_socket  protocole  drapeaux  utilisateur  chemin  arguments





     sseerrvviiccee
        est le nom de service applicable  cette configuration, pris
        dans le fichier /etc/services.

     ttyyppee__ddee__ssoocckkeett
        ce champ dcrit le type de socket que cette entre considre
        comme pertinent, les valeurs permises sont : stream, dgram, raw,
        rdm, ou seqpacket.  C'est un peu technique par nature, mais par
        exprience, presque tous les services bass sur tcp utilisent
        stream et presque tous les services bass sur udp  utilisent
        dgram.  Il n'y a que quelques types de serveurs dmons spciaux
        utilisant d'autres valeurs.

     pprroottooccoollee
        le protocole considr comme valide pour cette entre. Il doit
        correspondre  l'entre approprie dans le fichier /etc/services
        et sera donc soit tcp soit udp.  Les serveurs bass sur Sun RPC
        (Remote Procedure Call) utilisent rpc/tcp ou rpc/udp.

     ddrraappeeaauuxx
        il n'y a en fait que deux valeurs pour ce champ. Celles-ci
        disent  _i_n_e_t_d si le programme serveur rseau libre le socket
        aprs dmarrage, et donc si _i_n_e_t_d peut prendre en compte une des
        prochaines demandes de connexion, ou bien si _i_n_e_t_d doit attendre
        qu'un autre dmon serveur tournant dj prenne en charge la
        nouvelle demande de connexion.  C'est encore compliqu, mais en
        pratique tous les serveurs tcp doivent avoir cette entre
        positionne sur nowait et la plupart des serveurs udp ont cette
        entre positionne sur wait.  Attention il y a quelques
        exceptions notables, laissez vous guider par l'exemple suivant
        si vous n'tes pas srs.

     uuttiilliissaatteeuurr
        ce champ dcrit quel compte utilisateur extrait de /etc/passwd
        sera considr comme propritaire du dmon rseau lorsqu'il est
        lanc.  C'est trs utile lorsque vous voulez vous protger
        contre les trous de scurit. Vous pouvez mettre nobody comme
        utilisateur pour une entre si bien que dans le cas o le rseau
        comporte une brche, les dommages ventuels seront minimiss.
        Cependant habituellement ce champ est rgl sur root, car
        beaucoup de serveurs ont besoin des privilges de root pour
        tourner correctement.

     cchheemmiinn__ddee__sseerrvveeuurr
        ce champ est le chemin rel du programme  excuter pour cette
        entre.

     aarrgguummeennttss
        ce champ correspond au reste de la ligne et est optionnel.  Il
        sert  indiquer les arguments de commande que vous voulez passer
        au programme serveur au lancement.



  55..88..22..11..  EExxeemmppllee ddee ffiicchhiieerr //eettcc//iinneettdd..ccoonnff

  Comme pour le fichier /etc/services, toutes les distributions modernes
  incluent un bon fichier /etc/inetd.conf pour pouvoir travailler. Ici,
  pour tre complet , vous trouverez le fichier /etc/inetd.conf de la
  distribution Debian.





























  # /etc/inetd.conf:  voir inetd(8) pour d'autres informations.
  #
  # Base de donnes pour la configuration d'un serveur Internet
  #
  #
  # Modifi pour Debian par Peter Tobias <tobias@et-inf.fho-emden.de>
  #
  # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
  #
  # Services internes
  #
  #echo           stream  tcp     nowait  root    internal
  #echo           dgram   udp     wait    root    internal
  discard         stream  tcp     nowait  root    internal
  discard         dgram   udp     wait    root    internal
  daytime         stream  tcp     nowait  root    internal
  daytime         dgram   udp     wait    root    internal
  #chargen        stream  tcp     nowait  root    internal
  #chargen        dgram   udp     wait    root    internal
  time            stream  tcp     nowait  root    internal
  time            dgram   udp     wait    root    internal
  #
  # Services standards.
  #
  telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.telnetd
  ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.ftpd
  #fsp    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.fspd
  #
  # Shell, login, exec et talk sont des protocoles BSD.
  #
  shell   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd
  login   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind
  #exec   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rexecd
  talk    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.talkd
  ntalk   dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.ntalkd
  #
  # Services Mail, news et uucp.
  #
  smtp    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.smtpd
  #nntp   stream  tcp     nowait  news    /usr/sbin/tcpd  /usr/sbin/in.nntpd
  #uucp   stream  tcp     nowait  uucp    /usr/sbin/tcpd  /usr/lib/uucp/uucico
  #comsat dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.comsat
  #
  # Pop et autres
  #
  #pop-2  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop2d
  #pop-3  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop3d
  #
  # `cfinger' est le serveur finger GNU de Debian.  (NOTE : L'implmentation
  # habituelle du dmon `finger' permet de le faire tourner avec `root'.)
  #
  #cfinger stream tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.cfingerd
  #finger stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.fingerd
  #netstat        stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/netstat
  #systat stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/ps -auwwx
  #
  # Le service tftp est fourni principalement pour dmarrer. La plupart des sites
  # l'utilisent seulement sur les machines servant de `serveurs de boot'.
  #
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /boot
  #bootps dgram   udp     wait    root    /usr/sbin/bootpd        bootpd -i -t 120
  #
  # Services Kerberos (ils doivent probablement tre corrigs)
  #
  #klogin         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k
  #eklogin        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k -x
  #kshell         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd -k
  #
  # Services tournant UNIQUEMENT sur Kerberos (doivent tre probablement corrigs)
  #
  #krbupdate      stream tcp      nowait  root    /usr/sbin/tcpd  /usr/sbin/registerd
  #kpasswd        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/kpasswdd
  #
  # Services RPC
  #
  #mountd/1       dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.mountd
  #rstatd/1-3     dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rstatd
  #rusersd/2-3    dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rusersd
  #walld/1        dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rwalld
  #
  # Fin de inetd.conf.
  ident           stream  tcp     nowait  nobody  /usr/sbin/identd       identd -i






  55..99..  AAuuttrreess ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn aayyaanntt uunn rraappppoorrtt aavveecc llee rrsseeaauu

  Il y a beaucoup de fichiers relatifs  la configuration rseau sous
  Linux susceptibles de vous intresser. Vous n'aurez jamais  modifier
  ces fichiers, mais il est utile de les dcrire pour que vous sachiez
  ce qu'ils contiennent et quelle est leur utilit.



  55..99..11..  //eettcc//pprroottooccoollss

  Le fichier /etc/protocols est une base de donnes qui donne la
  relation des numros id de protocole avec leurs noms.  Il est utilis
  par les programmeurs pour leur permettre de spcifier les protocoles
  par leur nom dans les programmes et aussi par quelques programmes tels
  que _t_c_p_d_u_m_p pour pouvoir afficher en sortie des noms au lieu de
  chiffres. La syntaxe gnrale de ce fichier est :


       nom du protocole     numro    alias




  Le fichier /etc/protocols fourni avec la distribution Debian est le
  suivant :

















  # /etc/protocols:
  # $Id: protocols,v 1.1 1995/02/24 01:09:41 imurdock Exp $
  #
  # Protocoles Internet (IP)
  #
  #       d'aprs: @(#)protocols  5.1 (Berkeley) 4/17/89
  #
  # Mise  jour pour NetBSD basee sur la RFC 1340, Assigned Numbers (July 1992).

  ip      0       IP              # internet protocol, pseudo protocol number
  icmp    1       ICMP            # internet control message protocol
  igmp    2       IGMP            # Internet Group Management
  ggp     3       GGP             # gateway-gateway protocol
  ipencap 4       IP-ENCAP        # IP encapsulated in IP (officially ``IP'')
  st      5       ST              # ST datagram mode
  tcp     6       TCP             # transmission control protocol
  egp     8       EGP             # exterior gateway protocol
  pup     12      PUP             # PARC universal packet protocol
  udp     17      UDP             # user datagram protocol
  hmp     20      HMP             # host monitoring protocol
  xns-idp 22      XNS-IDP         # Xerox NS IDP
  rdp     27      RDP             # "reliable datagram" protocol
  iso-tp4 29      ISO-TP4         # ISO Transport Protocol class 4
  xtp     36      XTP             # Xpress Tranfer Protocol
  ddp     37      DDP             # Datagram Delivery Protocol
  idpr-cmtp       39      IDPR-CMTP       # IDPR Control Message Transport
  rspf    73      RSPF            # Radio Shortest Path First.
  vmtp    81      VMTP            # Versatile Message Transport
  ospf    89      OSPFIGP         # Open Shortest Path First IGP
  ipip    94      IPIP            # Yet Another IP encapsulation
  encap   98      ENCAP           # Yet Another IP encapsulation






  55..99..22..  //eettcc//nneettwwoorrkkss

  Le fichier /etc/networks a une fonction similaire au fichier
  /etc/hosts. Il fournit une simple base de donnes de noms de rseau
  avec des adresses. Son format diffre en ce qu'il n'y a que deux
  champs par ligne, et que ces champs sont cods comme ceci :



        Nom du rseau   adresse de rseau




  Un exemple :


       loopnet    127.0.0.0
       localnet   192.168.0.0
       amprnet    44.0.0.0





  Lorsque vous utilisez une commande comme _r_o_u_t_e, si une destination est
  un rseau, et que ce rseau a une entre dans le fichier /etc/networks
  la commande affichera alors le nom du rseau en lieu et place de son
  adresse.
  55..1100..  SSccuurriitt rrsseeaauu eett ccoonnttrrllee dd''aaccccss

  Laissez-moi dbuter ce paragraphe en vous mettant en garde que la
  scurisation de votre machine et du rseau contre les attaques
  pernicieuses est un art complexe. Je ne me considre pas du tout comme
  un expert dans ce domaine et bien que les mcanismes que je vais
  dcrire puissent vous aider, si vous tes proccups par la scurit,
  alors je vous recommande d'effectuer vous-mme des recherches sur le
  sujet. Il existe beaucoup de bonnes rfrences sur l'Internet qui
  traitent du sujet, y compris Security-HOWTO

  Une importante rgle pratique est : `NN''uuttiilliisseezz ppaass ddee sseerrvveeuurrss ddoonntt
  vvoouuss nn''aavveezz ppaass ll''uuttiilliitt'.  Beaucoup de distributions arrivent avec
  plein de services configurs et dmarrant automatiquement. Pour
  assurer quand mme un minimum de scurit vous devriez aller dans
  votre fichier /etc/inetd.conf et retirez (_p_l_a_c_e_z _u_n _`_#_' _a_u _d__b_u_t _d_e _l_a
  _l_i_g_n_e) toute entre que vous ne comptez pas utiliser.  De bons
  candidats sont :  shell, login, exec, uucp, ftp, et les services
  informatifs tels que finger, netstat and systat.

  Il y a plein de sortes de scurit et de mcanismes de contrle
  d'accs ; je vais dcrire les plus lmentaires.



  55..1100..11..  //eettcc//ffttppuusseerrss

  Le fichier /etc/ftpusers est un mcanisme simple qui vous permet
  d'interdire l'accs de votre machine  certains utilisateurs de ftp.
  Il est lu par le programme dmon (_f_t_p_d) lorsqu'une connexion ftp est
  reue. Le fichier est une simple liste d'utilisateurs qui ne peuvent
  pas se connecter. Il ressemble  :


       # /etc/ftpusers - utilisateurs ne pouvant pas se connecter par ftp
       root
       uucp
       bin
       mail






  55..1100..22..  //eettcc//sseeccuurreettttyy

  Le fichier /etc/securetty vous permet de spcifier sur quels fichiers
  de priphriques tty root a le droit de se connecter. Le fichier
  /etc/securetty est lu par le programme de connexion (habituellement
  _/_b_i_n_/_l_o_g_i_n). Son format est une liste de fichiers de priphriques tty
  autoriss (sur tous les autres root ne peut se connecter) :


       # /etc/securetty - consoles ou root peut se connecter
       tty1
       tty2
       tty3
       tty4







  55..1100..33..  LLee mmccaanniissmmee ddee ccoonnttrrllee dd''aaccccss ddeess hhtteess ttccppdd ..

  Le programme _t_c_p_d que vous avez vu dans le fichier /etc/inetd.conf
  fournit les mcanismes de contrle d'accs et de connexion aux
  services qu'il a pour but de protger.

  Lorsqu'il est invoqu par le programme _i_n_e_t_d, il lit deux fichiers
  contenant les rgles d'accs et il autorise ou interdit l'accs au
  serveur qu'il protge.

  Il cherche dans ces deux fichiers jusqu' ce qu'il trouve une
  correspondance. S'il n'en trouve pas il suppose que l'accs est
  autoris. Il recherche dans l'ordre suivant : /etc/hosts.allow,
  /etc/hosts.deny. Je dcrirai chacun d'eux plus tard. Pour une
  description complte rfrez-vous aux pages de manuel appropries
  (hosts_access(5) est un bon point de dpart).



  55..1100..33..11..  //eettcc//hhoossttss..aallllooww

  Le fichier /etc/hosts.allow est un fichier de configuration du
  programme _/_u_s_r_/_s_b_i_n_/_t_c_p_d. Il contient les htes dont l'accs est
  _a_u_t_o_r_i_s_ _(_a_l_l_o_w_e_d_) et qui peuvent donc utiliser un service de votre
  machine.

  Le format du fichier est trs simple :


       # /etc/hosts.allow
       #
       # <liste des services>: <liste des htes> [: commande]





     liste des services
        c'est une liste de serveurs, spars par des virgules, auxquels
        les rgles d'accs s'appliquent.  Exemples de serveur : ftpd,
        telnetd, et fingerd.

     liste des htes
        c'est une liste de noms d'htes, spars par des virgules (vous
        pouvez utiliser galement des adresses IP).  Vous pouvez en plus
        spcifier des noms d'htes ou des adresses IP avec des jokers
        pour obtenir des groupes d'htes.  Des exemples :
        gw.vk2ktj.ampr.org pour un hte spcifique, .uts.edu.au pour
        tous les htes se terminant par cette chane , 44. pour toutes
        les adresses IP commenant par ces chiffres.  Il y a quelques
        expressions pour simplifier la configuration, parmi lesquelles :
        ALL pour tous les htes, LOCAL pour tout hte dont le nom ne
        contient pas de `.' c'est  dire appartenant au mme domaine que
        votre machine, et PARANOID pour tout hte dont le nom ne
        correspond pas avec son adresse (tricherie dans le nom). Il y a
        enfin une expression qui peut tre utile.  Il s'agit de EXCEPT
        qui vous permet de fournir une liste avec des exceptions.  Nous
        verrons un exemple plus tard.

     commande
        c'est un paramtre optionnel. Ce paramtre est le nom complet
        d'une commande (avec son rpertoire) qui sera excute chaque
        fois qu'il y aura correspondance.  Ce peut tre par exemple une
        commande qui essaiera d'identifier qui se connecte, ou de
        gnrer un message par courrier ou tout message d'alerte pour
        l'administrateur systme avertissant que quelqu'un est en train
        de se connecter.  On peut y inclure des extensions, par exemple
        : %h donnera le nom de l'hte qui se connecte ou bien son
        adresse s'il n'a pas de nom , %d le programme dmon appel.

  Un exemple :


       # /etc/hosts.allow
       #
       # Permet a tout le monde d'utiliser le courrier
       in.smtpd: ALL
       # telnet et ftp pour les hotes de mon domaine et my.host.at.home.
       telnetd, ftpd: LOCAL, myhost.athome.org.au
       # finger pour tout le monde, mais garde une trace de l'identite.
       fingerd: ALL: (finger @%h | mail -s "finger from %h" root)






  55..1100..33..22..  //eettcc//hhoossttss..ddeennyy

  Le fichier /etc/hosts.deny est un fichier de configuration du
  programme _/_u_s_r_/_s_b_i_n_/_t_c_p_d. Ce fichier contient les htes qui _n_'_o_n_t _p_a_s
  _l_'_a_u_t_o_r_i_s_a_t_i_o_n  d'accder  l'un des services de votre machine.

  Un exemple simple ressemblerait  ceci :



       # /etc/hosts.deny
       #
       # Interdit l'acces aux hotes ayant des noms suspects
       ALL: PARANOID
       #
       # Interdit l'acces a tous les hotes
       ALL: ALL




  L'entre PARANOID est en fait redondante car l'autre entre interdit
  tous les cas.  L'une ou l'autre entre devrait convenir, en fonction
  de vos besoins particuliers.

  Mettre ALL: ALL par dfaut dans le fichier /etc/hosts.deny puis
  autoriser certains services, en liaison avec les htes que vous avez
  choisis, dans le fichier /etc/hosts.allow, est la configuration la
  plus sre.



  55..1100..44..  //eettcc//hhoossttss..eeqquuiivv

  Le fichier hosts.equiv est utilis pour concder  certains htes des
  droits d'accs leur permettant d'avoir un compte sur votre machine
  sans fournir de mot de passe. Cela est utile dans un environnement
  scuris o vous contrlez toutes les machines, sinon ce peut tre
  trs risqu. Votre machine est aussi sre que le moins sr de vos
  htes de confiance. Pour augmenter la scurit, n'utilisez pas cette
  possiblit et encouragez vos utilisateurs  ne pas utiliser le fichier
  .rhosts.



  55..1100..55..  CCoonnffiigguurreerr vvoottrree ddmmoonn ffttpp  ccoorrrreecctteemmeenntt

  Beaucoup de sites sont intresss  avoir un serveur _f_t_p anonyme pour
  permettre aux autres de transfrer et de rcuprer des fichiers sans
  avoir besoin d'une identification spciale.  Si vous dcidez d'offrir
  ce service soyez certains de configurer votre dmon _f_t_p de manire
  adquate pour les accs anonymes. La plupart des pages de manuel
  ddies  ftpd(8) dcrivent tous les dtails pour y arriver. Vous
  devez toujours vous assurer que vous avez bien suivi les instructions.
  Un rgle importante est de ne pas utiliser une copie de votre fichier
  /etc/passwd dans le rpertoire /etc du compte anonyme. Soyez srs
  d'avoir limin tous les dtails des comptes excepts ceux qui sont
  ncessaires, autrement vous serez vulnrables vis  vis de ceux qui
  matrisent les techniques de mise en pices des mots de passe.



  55..1100..66..  PPaarree--ffeeuu ((FFiirreewwaallll)) ssuurr llee rrsseeaauu

  Ne pas permettre aux datagrammes d'atteindre votre machine ou les
  serveurs est un excellent moyen de scurisation. Ceci est abord en
  profondeur dans Firewall-HOWTO et (de manire plus concise) plus loin
  dans ce document.



  55..1100..77..  AAuuttrreess ssuuggggeessttiioonnss

  Voici d'autres suggestions, potentiellement religieuses,  prendre en
  considration :

     sseennddmmaaiill
        en dpit de sa popularit, le dmon _s_e_n_d_m_a_i_l apparat avec une
        effrayante rgularit dans les mises en garde concernant la
        scurit. Faites comme vous voulez, mais j'ai choisi de ne pas
        l'utiliser.

     NNFFSS eett aauuttrreess sseerrvviicceess SSuunn RRPPCC
        soyez circonspects avec eux. Il y a toutes sortes d'exploits
        possibles avec ces services. Il est difficile de trouver une
        option pour les services tels que NFS, mais si vous les
        configurez, soyez prudents envers ceux  qui vous accordez des
        droits.




  66..  IInnffoorrmmaattiioonnss ssuurr IIPP eett EEtthheerrnneett

  Cette section traite d'informations spcifiques sur IP et Ethernet.
  Les sous-sections ont t rassembles car je pense que ce sont les
  plus intressantes de ce qui tait appel autrefois ``Technologies
  spcifiques''. Toute personne ayant un rseau local doit pouvoir tirer
  bnfice de ces bonnes choses.



  66..11..  EEtthheerrnneett

  Les noms de priphriques Ethernet sont `eth0', `eth1', `eth2' etc. La
  premire carte dtecte par le noyau devient `eth0' et le reste est
  nomm dans l'ordre de dtection.

  par dfaut, le noyau Linux ne dtecte qu'un seul dispositif Ethernet,
  vous devez donc donner des arguments sur la ligne de commande pour
  forcer le noyau  dtecter des autres cartes.
  Pour savoir comment faire marcher votre carte Ethernet sous Linux
  rfrez-vous au Ethernet-HOWTO.

  Une fois que vous avez compil convenablement votre noyau pour
  supporter les cartes Ethernet, la configuration des cartes est aise.

  Typiquement vous faites ainsi (ce que la plupart des distributions
  font automatiquement pour vous, si vous les avez configures pour
  supporter votre carte ethernet) :



       root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
       root# route add -net 192.168.0.0 netmask 255.255.255.0 eth0




  La plupart des pilotes Ethernet ont t dvelopps par Donald Becker,
  becker@CESDIS.gsfc.nasa.gov.




  66..22..  EEQQLL -- ggaalliisseeuurr ddee cchhaarrggee  lliiggnneess mmuullttiipplleess

  Le nom du priphrique EQL est `eql'. Avec les sources standards du
  noyau vous ne pouvez avoir qu'un seul priphrique EQL par machine.
  EQL permet d'utiliser plusieurs lignes point  point telles que PPP,
  SLIP ou PLIP comme si c'tait un seul lien logique de transport
  tcp/ip. C'est souvent moins cher d'utiliser plusieurs lignes  faible
  dbit que d'avoir une ligne  haut dbit.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support --->
           [*] Network device support
           <*> EQL (serial line load balancing) support




  Pour supporter ce mcanisme la machine  l'autre bout de la ligne doit
  galement supporter EQL.  Linux, Livingstone Portmasters et de
  nouveaux serveurs de ligne supportent des systmes compatibles.

  Pour configurer EQL vous avez besoin des outils eql, disponibles sur :
  metalab.unc.edu.

  La configuration est plutt directe. Vous commencez par configurer
  l'interface eql. C'est exactement comme un autre priphrique rseau.
  Vous configurez l'adresse IP et le mtu en utilissant l'outil _i_f_c_o_n_f_i_g
  , comme ceci :


       root# ifconfig eql 192.168.10.1 mtu 1006




  Ensuite vous devez initialiser manuellement chacune des lignes que
  vous allez utiliser. Ce peut tre toute combinaison de priphriques
  rseau point  point. La faon d'initialiser les connexions dpend du
  type de lien, voyez les paragraphes appropris pour d'autres
  informations.
  Enfin vous devez associer le lien srie et le dispositif EQL, cela
  s'appelle `asservissement' (enslaving) et est ralis avec la commande
  _e_q_l___e_n_s_l_a_v_e comme suit :


       root# eql_enslave eql sl0 28800
       root# eql_enslave eql ppp0 14400




  Le paramtre `_e_s_t_i_m_a_t_e_d _s_p_e_e_d' que vous fournissez  _e_q_l___e_n_s_l_a_v_e ne
  fait rien directement. Il est utilis par le pilote EQL pour dter
  miner comment les datagrammes vont se rpartir sur ce priphrique,
  aussi vous pouvez rgler l'quilibrage des lignes en jouant avec cette
  valeur.

  Pour librer une ligne d'un priphrique EQL vous utilisez la commande
  _e_q_l___e_m_a_n_c_i_p_a_t_e comme ci-dessous :


       root# eql_emancipate eql sl0




  Vous ajoutez le routage comme vous le feriez pour tout lien point 
  point, sauf que vos routes doivent se rapporter au dispositif eql
  plutt qu'aux priphriques sries eux-mmes. Typiquement vous devriez
  utiliser :


       root# route add default eql




  Le pilote EQL fut dvelopp par Simon Janes, simon@ncm.com.



  66..33..  EEnnrreeggiissttrreemmeenntt IIPP ((IIPP AAccccoouunnttiinngg)) ((ppoouurr LLiinnuuxx--22..00))

  Les possibilits d'enregistrement IP du noyau Linux vous permettent de
  recueillir et d'analyser les donnes d'utilisation du rseau.  Les
  donnes collectes comprennent le nombre de paquets et le nombre
  d'octets en cumul depuis la dernire remise  zro.  Vous avez  votre
  disposition une grande varit de rglages pour obtenir les donnes
  que vous dsirez. Cette option a t enleve du 2.1.102, car l'ancien
  dispositif pare-feu bas sur ipfwadm a t remplac par
  ``ipfwchains''.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           [*] IP: accounting





  Aprs avoir compil et install le noyau vous devez utiliser la
  commande _i_p_f_w_a_d_m pour configurer l'enregistrement IP. Il y a
  diffrentes possibilits pour choisir les informations  enregistrer.
  J'ai pris un exemple simplifi qui pourrait vous tre utile; lisez
  plutt la page de manuel _i_p_f_w_a_d_m pour plus d'informations.

  Scenario : Vous avez un rseau Ethernet qui est reli  l'Internet via
  une liaison PPP.  Sur l'Ethernet vous avez une machine qui offre un
  grand nombre de services et vous voulez savoir quel trafic est
  engendr par le trafic ftp et ww, aussi bien que le trafic total tcp
  et udp.

  Vous pouvez utiliser une commande qui ressemble  ceci, qui se
  prsente comme un script shell :



               #!/bin/sh
               #
               # Donne les rglages d'enregistrement
               ipfwadm -A -f
               #
               # Met en place les raccourcis
               localnet=44.136.8.96/29
               any=0/0
               # Ajoute des rglages pour le segment Ethernet local
               ipfwadm -A in  -a -P tcp -D $localnet ftp-data
               ipfwadm -A out -a -P tcp -S $localnet ftp-data
               ipfwadm -A in  -a -P tcp -D $localnet www
               ipfwadm -A out -a -P tcp -S $localnet www
               ipfwadm -A in  -a -P tcp -D $localnet
               ipfwadm -A out -a -P tcp -S $localnet
               ipfwadm -A in  -a -P udp -D $localnet
               ipfwadm -A out -a -P udp -S $localnet
               #
               # Rglages par dfaut
               ipfwadm -A in  -a -P tcp -D $any ftp-data
               ipfwadm -A out -a -P tcp -S $any ftp-data
               ipfwadm -A in  -a -P tcp -D $any www
               ipfwadm -A out -a -P tcp -S $any www
               ipfwadm -A in  -a -P tcp -D $any
               ipfwadm -A out -a -P tcp -S $any
               ipfwadm -A in  -a -P udp -D $any
               ipfwadm -A out -a -P udp -S $any
               #
               # Liste les rglages
               ipfwadm -A -l -n
               #






  Les noms ``ftp-data'' et ``www'' se rfrent aux lignes du fichier
  /etc/services.  La dernire commande liste chacune des rgles
  d'enregistrement et affiche le total.

  Il est important de noter, lorsque l'on analyse les enregistrement IP,
  que lleess ttoottaauuxx ssoonntt iinnccrrmmeennttss  cchhaaqquuee ffooiiss, donc pour connaitre les
  diffrences vous devez excuter les oprations mathmatiques
  ncessaires.  Par exemple si je veux savoir combien de donnes ne
  venaient pas de ftp, telnet, rlogin ou www je dois soustraire les
  totaux individuels correspondant  chaque port.






  root# ipfwadm -A -l -n
  IP accounting rules
   pkts bytes dir prot source               destination          ports
      0     0 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 20
      0     0 out tcp  44.136.8.96/29       0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 80
     10   572 out tcp  44.136.8.96/29       0.0.0.0/0            80 -> *
    252 10943 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> *
    231 18831 out tcp  44.136.8.96/29       0.0.0.0/0            * -> *
      0     0 in  udp  0.0.0.0/0            44.136.8.96/29       * -> *
      0     0 out udp  44.136.8.96/29       0.0.0.0/0            * -> *
      0     0 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 20
      0     0 out tcp  0.0.0.0/0            0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 80
     10   572 out tcp  0.0.0.0/0            0.0.0.0/0            80 -> *
    253 10983 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> *
    231 18831 out tcp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 in  udp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 out udp  0.0.0.0/0            0.0.0.0/0            * -> *
  #






  66..44..  EEnnrreeggiissttrreemmeenntt IIPP ((IIPP AAccccoouunnttiinngg)) ((ppoouurr LLiinnuuxx--22..22))

  On accde au nouveau code d'enregistrement par des ``chanes IP pare-
  feu''.  Voir La page d'accueil des chanes IP pour plus
  d'informations. Entre autres vous devrez utiliser _i_p_c_h_a_i_n_s au lieu de
  _i_p_f_w_a_d_m pour configurer vos filtres. (d'aprs Documentations/Changes
  dans les sources du dernier noyau).




  66..55..  IIPP AAlliiaassiinngg

  Il y a des applications o tre en mesure d'affecter plusieurs
  adresses IP  un seul priphrique rseau pourrait tre utile.
  Certains fournisseurs d'accs  l'Internet utilise souvent cette
  possibilit pour fournir des offres www et ftp ` la carte' pour leurs
  clients. Vous pouvez vous rfrer au mini-HOWTO IP-Aliasing pour plus
  d'informations.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           ....
           [*] Network aliasing
           ....
           <*> IP: aliasing support




  Aprs avoir compil et install le noyau avec le support IP_Alias, la
  configuration est trs simple. Les alias sont ajouts aux
  priphriques rseau virtuels  associs au priphrique rseau rel.
  Une simple convention de noms s'applique pour priphriques : <nom de
  priphrique> : <numro de priphrique virtuel>, par ex. eth0:0,
  ppp0:10 etc. Notez que le pilote de priphrique ifname:number ne peut
  tre configur _q_u_'_a_p_r__s le rglage de l'interface principale.

  Par exemple, supposons que vous ayez un rseau Ethernet avec
  simultanment deux sous-rseaux IP et que vous vouliez que votre
  machine ait un accs direct aux deux, vous pouvez faire quelque chose
  comme ceci :



               root# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0

               root# ifconfig eth0:0 192.168.10.1 netmask 255.255.255.0 up
               root# route add -net 192.168.10.0 netmask 255.255.255.0 eth0:0





  Pour supprimer un alias vous ajoutez simplement un `-' au bout de son
  nom et et vous faites aussi simplement que a :


              root# ifconfig eth0:0- 0





  Toutes les routes associes avec cet alias seront enleves automa
  tiquement.


  66..66..  IIPP PPaarree--ffeeuu ((FFiirreewwaallll)) ((ppoouurr LLiinnuuxx--22..00))

  Le pare-feu IP et les publications le concernant sont traits de
  manire plus appronfondies dans le document Firewall-HOWTO. Le pare-
  feu IP vous permet de scuriser votre machine contre les accs rseau
  non-autoriss en filtrant, ou acceptant, des datagrammes venant de, ou
  allant vers, des adresses IP de votre choix.  Il y a diffrentes
  rgles : le filtrage en entre, le filtrage en sortie, et le filtrage
  en retransmission. Les rgles en entre s'appliquent aux datagrammes
  qui sont reus par un dispositif rseau. Les rgles en sortie
  s'appliquent aux datagrammes qui sont mis par un dispositif rseau.
  Les rgles en retransmission s'appliquent aux datagrammes qui ne sont
  pas pour cette machine, c'est  dire les datagrammes qui seront
  rerouts.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           [*] Network firewalls
           ....
           [*] IP: forwarding/gatewaying
           ....
           [*] IP: firewalling
           [ ] IP: firewall packet logging




  La configuration du pare-feu IP est ralise en utilisant la commande
  _i_p_f_w_a_d_m.  Comme mentionn plus haut, la scurit n'est pas ma
  spcialit, aussi, bien que je vous prsente un exemple utilisable par
  vous-mme, faites des recherches et mettez au point vos propres
  rglages si la scurit est importante pour vous.

  Vraisemblablement l'utilisation la plus courante du pare-feu IP est
  lorsque vous utilisez votre machine Linux comme routeur et passerelle
  pare-feu et que vous voulez protger votre rseau local contre les
  accs extrieurs non autoriss.

  La configuration suivante est due  Arnt Gulbrandsen,
  <agulbra@troll.no>.

  L'exemple dcrit une configuration de pare-feu pour une machine Linux
  /pare-feu/routeur illustre par ce diagramme :



       -                                   -
        \                                  | 172.16.37.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |  172.16.174.30 | Linux |      |
       NET =================|  f/w  |------|    ..37.19
           |    PPP         | router|      |  --------
          /                 ---------      |--| Mail |
         /                                 |  | /DNS |
        /                                  |  --------
       -                                   -





  Les commandes suivantes doivent tre normalement places dans un
  fichier rc de telle sorte qu'elles seront dmarres automatiquement 
  chaque redmarrage du systme. Pour une scurit maximum, elles
  devront tre effectues aprs la configuration des interfaces rseau,
  mais avant le montage de ces interfaces pour viter que quelqu'un
  puisse se connecter pendant que la machine pare-feu reboute.































          #!/bin/sh

          # Nettoie la table des rgles de 'Forwarding'
          # Change le rglage par dfaut en 'accept'
          #
          /sbin/ipfwadm -F -f
          /sbin/ipfwadm -F -p accept
          #
          # .. et pour 'Incoming'
          #
          /sbin/ipfwadm -I -f
          /sbin/ipfwadm -I -p accept

          # En premier, dvrouille l'interface PPP
          # J'aimerais bien utiliser '-a deny' au lieu de '-a reject -y' mais
          # il serait alors impossible d'tablir des connexions galement sur
          # cette interface. L'utilisation de -o fait en sorte que tous
          # les datagrammes rejets sont enregistrs. Cela occupe de l'espace
          # disque avec pour compensation la connaissance sur l'attaque due
          #  une erreur de configuration.
          #
          /sbin/ipfwadm -I -a reject -y -o -P tcp -S 0/0 -D 172.16.174.30

          # Rejette certains types de paquets visiblement faux:
          # Rien ne doit venir des adresses multicast/anycast/broadcast s
          #
          /sbin/ipfwadm -F -a deny -o -S 224.0/3 -D 172.16.37.0/24
          #
          # et aucune chose venant du rseau loopback ne doit tre vu sur l'air
          #
          /sbin/ipfwadm -F -a deny -o -S 127.0/8 -D 172.16.37.0/24

          # accepte les connexions entrantes SMTP et DNS, mais seules pour
          # le serveur  de courrier et le serveur de noms
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 0/0 -D 172.16.37.19 25 53
          #
          # DNS utilise UDP aussi bien que TCP, ce qui l'autorise donc quand
          # le serveur de noms est interrog
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 -D 172.16.37.19 53
          #
          # mais pas de "rponses" arrivant sur les ports dangereux tels que
          # NFS et l'extension NFS de Larry McVoy. Si vous utilisez squid
          # ajoutez son port ici.
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 53 \
                  -D 172.16.37.0/24 2049 2050

          # les rponses aux autres ports utilisateurs sont autorises
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 53 \
                  -D 172.16.37.0/24 53 1024:65535

          # Rejette les connexions entrantres vers identd
          # Nous utilisons 'reject' dans ce cas en sorte qu'il soit dit  l'hte
          # entrant de ne pas persvrer, sinon nous devrons attendre que
          # identd s'arrte.
          #
          /sbin/ipfwadm -F -a reject -o -P tcp -S 0/0 -D 172.16.37.0/24 113

          # Accepte des connexions sur des services en provenance des rseaux
          # 192.168.64 et 192.168.65, qui sont des amis de confiance.
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 192.168.64.0/23 \
                  -D 172.16.37.0/24 20:23
          # accepte et laisse passer tout ce qui vient de l'intrieur
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 172.16.37.0/24 -D 0/0

          # rejette la plupart des autres connexions TCP entrantes et les
          # enregistre (ajoutez 1:1023 si ftp ne fonctionne pas)
          #
          /sbin/ipfwadm -F -a deny -o -y -P tcp -S 0/0 -D 172.16.37.0/24

          # ... pour UDP galement
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 -D 172.16.37.0/24




  De bonnes configurations pare-feu sont difficiles  faire. Cet exemple
  peut tre un bon point de dpart pour vous. La page de manuel _i_p_f_w_a_d_m
  vous aidera pour savoir comment utiliser cet outil. Si vous voulez
  configurer un pare-feu, demandez autour de vous et recueillez des avis
  venant de sources de confiance et prenez contact avec quelqu'un qui
  est  l'extrieur pour tester votre configuration et en vrifier la
  fiabilit.



  66..77..  PPaarree--ffeeuu IIPP ((ppoouurr LLiinnuuxx--22..22))

  On accde au nouveau code d'enregistrement par des ``chanes pare-feu
  IP''.  Voir La page d'accueil des chanes IP pour plus d'informations.
  Entre autres vous devrez utiliser _i_p_c_h_a_i_n_s au lieu de _i_p_f_w_a_d_m pour
  configurer vos filtres. (D'aprs Documentations/Changes dans les
  sources du dernier noyau).

  Nous sommes conscients du fait que ce n'est malheureusement plus
  d'actualit et nous oeuvrons actuellement pour que cette section soit
  plus  jour. Vous pouvez en esprer une en Aot 1999.




  66..88..  EEnnccaappssuullaattiioonn IIPPIIPP

  Pourquoi vouloir encapsuler des paquets IP dans d'autres paquets IP?
  Cela semble bizarre si vous n'avez jamais vu d'applications
  auparavant.  Il y a deux endroits o c'est utilis : le Mobile-IP et
  l'IP-Multicast. C'est dans un environnement qui est peut-tre le plus
  largement utilis et qui est le moins connu : le radio-amateurisme.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] TCP/IP Networking
           [*] IP: forwarding/gatewaying
           ....
           <*> IP tunelling




  Les priphriques IP tunnel s'appellent `tunl0', `tunl1', etc..

  "Mais pourquoi ?" D'accord. D'accord. Les rgles de routage classiques
  spcifient qu'un rseau IP comprend une adresse IP et un masque de
  rseau. Ceci fournit un ensemble d'adresses contigus qui peuvent
  toutes tre routes par l'intermdiaire d'une seule entre de routage.
  Cela marche, mais signifie que vous ne pouvez utiliser une seule
  adresse uniquement lorsque vous tes connect  un point du rseau
  auquelle elle appartient.  Dans la plupart des cas, il n'y a pas de
  problmes, mais si vous tes en mouvement alors vous ne pouvez pas
  rester connect au mme endroit tout le temps. L'encapsulation  IP/IP
  ( IP tunneling) vous permet de passer outre cette contrainte en
  permettant aux paquets destins  votre adresse d'tre envelopps et
  redirigs vers une autre adresse. Si vous savez que vous allez oprer
  depuis un autre rseau IP pour quelques temps, vous pouvez rgler une
  machine qui est chez vous pour accepter des paquets destins  votre
  adresse IP et les rediriger vers l'adresse que vous allez utiliser
  provisoirement.



  66..88..11..  UUnnee ccoonnffiigguurraattiioonn ddee rrsseeaauu aavveecc ttuunnnneelliinngg..




        192.168.1.24                         192.168.2.24

            -                                    -
            |      ppp0 =           ppp0 =       |
            |  aaa.bbb.ccc.ddd  fff.ggg.hhh.iii  |
            |                                    |
            |   /-----\                 /-----\  |
            |   |     |        //       |     |  |
            |---|  A  |------//---------|  B  |  |
            |   |     |    //           |     |  |
            |   \-----/                 \-----/  |
            |                                    |
            -                                    -






  Ce diagramme montre une autre raison possible d'utiliser
  l'encapsulation IPIP : le rseau priv virtuel. Cet exemple prsuppose
  que vous ayez deux machines chacune avec une seule connexion Internet.
  Chaque hte a une seule adresse IP. Derrire chacune de ces machines
  se trouve des rseaux privs locaux configurs avec des adresses IP
  rserves. Supposez que vous vouliez permettre  chacun des htes du
  groupe A de se connecter  n'importe quel hte du groupe B, comme
  s'ils taient vraiment connects  l'Internet via un routage rseau.
  L'encapsulation IPIP vous permettra de le faire.  noter que
  l'encapsulation ne vous permettra pas de faire en sorte que chacun des
  htes des rseaux A et B puissent parler  n'importe qui sur
  l'Internet, vous aurez toujours besoin de choses comme le masquage IP
  pour pouvoir le faire.  L'encapsulation est normalement accomplie par
  une machine fonctionnant comme routeur.

  Le routeur Linux `A' sera configur comme suit :










          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=fff.ggg.hhh.iii
          #
          # configuration thernet
          ifconfig eth0 192.168.1.1 netmask $mask up
          route add -net 192.168.1.0 netmask $mask eth0
          #
          # ppp0 configuration (start ppp link, set default route)
          pppd
          route add default ppp0
          #
          # configuration du priphrique de tunneling
          ifconfig tunl0 192.168.1.1 up
          route add -net 192.168.2.0 netmask $mask gw $remotegw tunl0






  Le routeur Linux `B' sera configur comme suit :


               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=aaa.bbb.ccc.ddd
               #
               # configuration thernet
               ifconfig eth0 192.168.2.1 netmask $mask up
               route add -net 192.168.2.0 netmask $mask eth0
               #
               # ppp0 configuration (start ppp link, set default route)
               pppd
               route add default ppp0
               #
               # configuration du priphrique de tunneling
               ifconfig tunl0 192.168.2.1 up
               route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0





  La commande :


       root# route add -net 192.168.1.0 netmask $mask0 gw $remotegw tunl0




  dit : `Envoyer tous les datagrammes destins  192.168.1.0/24 dans un
  paquet d'encapsulation ayant pour adresses de destination
  aaa.bbb.ccc.ddd'.

  Notez que les configurations sont inverses  l'autre bout.  Le
  priphrique tunnel utilise `gw' dans la commande route comme
  _d_e_s_t_i_n_a_t_i_o_n du paquet IP o se trouve le datagramme qu'il doit router.
  Cette machine doit savoir comment `dsencapsuler' les paquets IPIP,
  c'est  dire qu'elle doit aussi tre configure comme priphrique
  tunnel.


  66..88..22..  UUnnee ccoonnffiigguurraattiioonn dd''hhttee ppoouurr ll''eennccaappssuullaattiioonn IIPPIIPP..

  Ce n'est pas tout un rseau que vous aurez  router. Vous pouvez par
  exemple ne router qu'une seule adresse IP. Dans ce cas vous devrez
  configurer le priphrique tunl sur la machine `distante' avec sa
  propre adresse IP et  l'extrmit A n'utiliser qu'une route hte
  (avec Proxy Arp) plutt qu'une route rseau via le priphrique
  tunnel. Refaisons et modifions notre configuration de manire
  approprie. Maintenant nous avons seulement l'hte `B' qui veut agir
  comme si il tait  la fois connect  l'Internet et galement au
  rseau distant support par l'hte `A' :



        192.168.1/24

            -
            |      ppp0 =                ppp0 =
            |  aaa.bbb.ccc.ddd      fff.ggg.hhh.iii
            |
            |   /-----\                 /-----\
            |   |     |       //        |     |
            |---|  A  |------//---------|  B  |
            |   |     |     //          |     |
            |   \-----/                 \-----/
            |                      aussi: 192.168.1.12
            -




  Le routeur Linux  `A' sera configur comme suit :


               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=fff.ggg.hhh.iii
               #
               # configuration thernet
               ifconfig eth0 192.168.1.1 netmask $mask up
               route add -net 192.168.1.0 netmask $mask eth0
               #
               # configuration de ppp0 (dmarre le lien ppp link, rgle la route par
               # dfaut)
               pppd
               route add default ppp0
               #
               # configuration du priphrique de tunneling
               ifconfig tunl0 192.168.1.1 up
               route add -host 192.168.1.12 gw $remotegw tunl0
               #
               # Proxy ARP pour l'hte distant
               arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub




  L'hte Linux `B' sera configur comme suit :







          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=aaa.bbb.ccc.ddd
          #
          # configuration de ppp0 (dmarre le lien ppp, rgle la route par dfaut)
          pppd
          route add default ppp0
          #
          # configuration du priphrique de tunelling
          ifconfig tunl0 192.168.1.12 up
          route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0





  Ce type de configuration est vraiment typique d'une application IP-
  Mobile, o un simple hte veut seulement se balader sur l'Internet et
  maintenir une adresse IP utilisable tout le temps. Rfrez-vous au
  paragraphe Mobile-IP pour avoir plus d'informations et savoir comment
  faire en pratique.



  66..99..  IIPP MMaassqquueerraaddee

  Beaucoup de gens ont une simple connexion par tlphone pour aller sur
  l'Internet. Presque tout le monde ne se voit offrir qu'une seule
  adresse IP par le founisseur d'accs avec ce type de configuration.
  Ceci est normalement suffisant pour permettre un accs complet au
  rseau. IP Masquerade est une astuce intelligente qui vous permet
  d'avoir plusieurs machines utilisant une seule adresse IP, en faisant
  croire aux autres htes qu'il n'y a que la machine supportant la
  connexion (NdT : d'o le terme masquerade=duperie, mascarade).  Il y a
  qu'une seule mise en garde, qui est que la fonction masquage ne
  travaille pratiquement que dans un seul sens : les htes masqus
  peuvent appeler mais ne peuvent accepter ou recevoir des connexions
  rseau de la part d'htes loigns. Cela signifie que certains
  services rseau comme _t_a_l_k ne peuvent fonctionner et que d'autres,
  comme _f_t_p doivent tre configurs pour fonctionner en mode passif
  (PASV). Heureusement la plupart des services rseau comme _t_e_l_n_e_t,
  World Wide Web et _i_r_c fonctionnent correctement.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Code maturity level options  --->
           [*] Prompt for development and/or incomplete code/drivers
       Networking options  --->
           [*] Network firewalls
           ....
           [*] TCP/IP networking
           [*] IP: forwarding/gatewaying
           ....
           [*] IP: masquerading (EXPERIMENTAL)




  Normalement votre machine Linux supportant un lien SLIP ou PPP se
  comportera comme si elle tait toute seule. De plus elle peut avoir un
  autre priphrique rseau configur, par exemple une carte Ethernet,
  avec des adresses rseau rserve. Les htes masqus seront ceux du
  second rseau. Chacun de ces htes aura l'adresse IP du port Ethernet
  rgle comme passerelle ou routeur par dfaut.
  Une configuration typique ressemble  ceci :


       -                                   -
        \                                  | 192.168.1.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |                | Linux | .1.1 |
       NET =================| masq  |------|
           |    PPP/slip    | router|      |  --------
          /                 ---------      |--| hte |
         /                                 |  |      |
        /                                  |  --------
       -                                   -




  _M_a_s_q_u_e_r_a_d_i_n_g _a_v_e_c _I_P_F_W_A_D_M

  Les commandes adquates pour cette configuration sont :


       # Routage rseau pour thernet
       route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       #
       # Route par dfaut pour le reste de l'internet.
       route add default ppp0
       #
       # Fait en sorte que tous les htes du rseau 192.168.1/24  soient masqus.
       ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0




  _M_a_s_q_u_e_r_a_d_i_n_g _a_v_e_c _I_P_C_H_A_I_N_S

  Cela ressemble  l'utilisation avec IPFWADM mais la structure de la
  commande change:



                # Routage rseau pour ethernet
                route add -net 192.168.1.0 netmask 255.255.255.0 eth0
                #
                # Route par dfaut vers le reste de l'internet.
                route add default ppp0
                #
                # Fait en sorte que tous les htes sur le rseau 192.168.1/24 soient
                # masqus.
               ipchains -A forward -s 192.168.1.0/24 -j MASQ





  Vous pouvez obtenir plus d'informations sur IP Masquerade sur la Page
  d'informations sur l'IP Masquerade.  Il existe galement un document
  _t_r__s dtaill qui est le ``IP-Masquerade-mini-HOWTO'' (qui donne en
  plus des renseignements pour configurer d'autres systmes
  d'exploitation pour fonctionner avec un serveur de masquage linux).





  66..1100..  IIPP TTrraannssppaarreenntt PPrrooxxyy

  IP transparent proxy est un procd qui vous permet de rediriger des
  serveurs ou des services destins  une autre machine vers les
  services de votre machine.  Typiquement c'est utile lorsque vous avez
  une machine Linux routeur et qui fournit aussi un serveur proxy. Vous
  redirigerez toutes les connexions  ce service distant vers le serveur
  proxy local.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Code maturity level options  --->
               [*] Prompt for development and/or incomplete code/drivers
       Networking options  --->
               [*] Network firewalls
               ....
               [*] TCP/IP networking
               ....
               [*] IP: firewalling
               ....
               [*] IP: transparent proxy support (EXPERIMENTAL)




  La configuration du dispositif transparent proxy est ralis en
  utilisant la commande _i_p_f_w_a_d_m.

  Par exemple :


       ipfwadm -I -a accept -D 0/0 telnet -r 2323




  Cet exemple fera en sorte que toutes les tentatives de connexion vers
  le port telnet (23), de n'importe quel hte, seront rediriges vers le
  port 2323 de ce mme hte. Si vous utilisez un service sur ce port,
  vous pouvez rediriger des connexions telnet, les enregistrer ou
  excuter tout ce qui bon vous semble.

  Un exemple plus intressant est la redirection de tout le trafic http
  au travers d'un cache local. Cependant, le protocole utlis par les
  serveurs proxy diffre du protocole natif de http : quand un client se
  connecte  www.server.com:80 et demande chemin/page, quand il se
  connecte au cache local il contacte proxy.local.domain:8080 et
  recherche www.server.com/chemin/page.

  Pour filtrer une demande http au travers du proxy local, vous devez
  pouvoir adapter le protocole en insrant un petit serveur, appel
  transproxy (vous pouvez le trouver sur la toile). Vous pouvez choisir
  de faire tourner transproxy sur le port 8081, et excuter la commande
  :


       ipfwadm -I -a accept -D 0/0 80 -r 8081




  Alors le programme transproxy recevra toutes les connexions devant
  aller vers des serveurs externes et les passera au proxy local aprs
  avoir corrig les diffrences de protocole.

  66..1111..  IIPPvv66

   peine pensez-vous avoir commenc  comprendre comment fonctionne le
  rseau IP, que les rgles ont chang!  IPv6 est l'abbrviation de
  version 6 du `Protocole Internet' (version 6 de IP). Il fut dvelopp
  initialement pour calmer les inquitudes de la communaut Internet
  quant  la pnurie ventuelle d'adresses IP. Les adresses IPv6 ont 16
  octets de long (128 bits). IPv6 inclut un certain nombre d'autres
  changements, la plupart du temps des simplifications, qui rendront les
  rseaux IPv6 plus facilement grables que les rseaux IPv4.

  Linux a dj une implmentation IPv6 qui marche, mais pas encore
  compltement, dans la srie des noyaux 2.2.*.

  Si vous voulez essayer cette prochaine gnration de technologie
  Internet, ou si vous voulez un renseignement, lisez le document
  IPv6-FAQ qui se trouve sur www.terra.net.



  66..1122..  IIPP MMoobbiillee

  Le terme "mobilit IP" dcrit la possibilit qu'un hte a de
  transfrer sa connexion rseau d'un point de l'Internet vers un autre
  sans changer d'adresse IP ou sans perdre la connectivit. Normalement
  quand un hte IP change de point de connexion, il change aussi
  d'adresse IP.  La mobilit IP rsoud ce problme en allouant une
  adresse IP fixe  l'hte qui se dplace et en utilisant une
  encapsulation IP (tunneling) avec routage automatique pour s'assurer
  que les datagrammes qui lui sont destins seront routs vers l'adresse
  effectivement utilise  ce moment.

  Un projet est en cours en vue de fournir un paquetage complet d'outils
  Linux pour la mobilit IP. L'tat de ce projet et les outils peuvent
  tre obtenus sur : Linux Mobile IP Home Page.



  66..1133..  MMuullttiiccaasstt

  L'IP Multicast permet de router simultanment des datagrammes IP vers
  un certain nombre d'htes se trouvant sur des rseaux diffrents.  Ce
  mcanisme est exploit pour fournir sur l'Internet des applications
  prenant de la bande passante, telles que les transmissions audio et
  video et autres nouvelles applications.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
               [*] TCP/IP networking
               ....
               [*] IP: multicasting




  Un ensemble d'outils et quelques modifications de la configuration
  rseau sont ncessaires.  Pour plus d'informations sur le support
  multicast pour Linux, voyez le Multicast-HOWTO.html






  66..1144..  NNAATT -- NNeettwwoorrkk AAddddrreessss TTrraannssllaattiioonn ((TTrraadduuccttiioonn dd''aaddrreessssee rrsseeaauu))

  Le systme de traduction d'adresse rseau IP ressemble plutt au grand
  frre standardis du systme de masquage IP de Linux. Il est dcrit en
  dtail dans la RFC-1631 sur votre archive RFC la plus proche. NET
  fournit des possibilits que IP Masquerade ne sait pas faire, ce qui
  le rend plus apte  une utilisation de routeur pare-feu pour un rseau
  d'entreprise et des installations de plus grandes dimensions.

  Une implmentation alpha de NAT pour le noyau 2.0.29 de Linux a t
  dveloppe par Michael.Hasenstein, Michael.Hasenstein@informatik.tu-
  chemnitz.de.  La documentaion et l'umplmentation de Michael se trouve
  sur :

  Linux IP Network Address Web Page

  Les noyaux 2.2.* rcents incluent galement quelques fonctions de NAT
  dans l'algorithme de routage.



  66..1155..  MMiissee eenn ffoorrmmee dduu ttrraaffiicc -- CChhaannggeerr llaa bbaannddee ppaassssaannttee aalllloouuee

  Le metteur en forme de trafic est un pilote de priphrique qui cre
  de nouvelles interfaces; celles-ci sont limites au point de vue
  trafic selon les rglages de l'utilisateur, et se connectent aux
  priphriques de rseau physiques pour la transmission relle, et
  peuvent donc tre utilises comme route vers l'extrieur en vue de
  trafic rseau.


  Le metteur en forme fut introduit sur Linux-2.1.15 et ensuite sur
  Linux-2.0.36 (il apparut dans le 2.0.36-pre-patch-2 distribut  par
  Alan Cox, l'auteur du dispositif de mise en forme et le mainteneur de
  Linux-2.0).


  Le metteur en forme de trafic ne peut tre compil qu'en tant que
  module, et se configure  l'aide du programme _s_h_a_p_e_c_f_g avec des
  commandes comme :



               shapecfg attach shaper0 eth1
               shapecfg speed shaper0 64000






  Ce metteur en forme de trafic ne peut contrler que la bande passante
  du trafic sortant, car les paquets sont transmis par le metteur en
  forme si l'on se rfre aux tables de routage; ainsi, le
  fonctionnement suivant ``un routage par adresse de dpart'' peut aider
   limiter la bande passante totale d'htes spcifiques utilsant un
  routeur Linux.


  Linux-2.2 possde dj le support pour un tel routage et si vous en
  avez besoin pour Linux-2.0, voyez le patch de Mike McLagan, sur
  ftp.invlogic.com. Lisez le fichier Documentationnetworking/shaper.txt
  pour plus d'informations.



  Si vous voulez faire (une tentative de) mise en forme pour les paquets
  entrants, essayez rshaper-1.01 (ou plus rcent), sur ftp.systemy.it.



  66..1166..  RRoouuttaaggee aavveecc LLiinnuuxx--22..22

  La dernire version de Linux-2.2 permet un tas de rglages concernant
  le routage. Malheureusement, vous devez attendre la prochaine dition
  de cet HOWTO, ou bien lire les sources du noyau.



  77..  UUttiilliissaattiioonn dduu mmaattrriieell ccoouurraanntt ppoouurr PPCC





  77..11..  RRNNIISS

  Le Rseau Numrique  Intgration de Service (RNIS) (en anglais ISDN:
  Integrated Services Digital Network) est une srie de normes donnant
  les spcifications d'un rseau de donnes numriques  usage gnral.
  Un `appel' RNIS cre un service synchrone de donnes point  point
  vers la destination. RNIS est gnralement dlivr sur une ligne 
  haut dbit divise en un certain nombre de canaux discrets.  Il y a
  deux types de canaux, les `canaux B' qui transportent effectivement
  les donnes utilisateurs, et un canal unique appel `canal D' qui est
  utilis pour envoyer les informations de contrle pendant l'change
  RNIS en vue d'tablir des appels et autres fonctions. En Australie,
  par exemple, RNIS peut tre fourni sur une liaison 2 Mps qui est
  divise en 30 canaux B discrets de 64 kps et un canal D de 64 kps.
  N'importe quel nombre de canaux peuvent tre utiliss en mme temps et
  ceci dans toutes les combinaisons possibles.  Vous pouvez par exemple
  tablir 30 appels diffrents de 64 kps vers 30 destinations
  diffrentes, ou bien 15 appels de 128 kps chacun vers 15 destinations
  diffrentes (2 canaux utiliss par appel), ou seulement un petit
  nombre d'appels, le reste tant inactif.  Un canal peut tre utilis
  pour des appels entrant ou sortant.  Le but initial de RNIS tait de
  permettre aux socits de Tlcommunications de fournir un seul
  service de donnes pouvant dlivrer soit le tlphone (avec une voix
  numrise) ou bien des services de donnes vers votre domicile ou
  votre bureau sans avoir  effectuer de changements pour obtenir une
  configuration spciale.

  Il y a plusieurs faons de connecter votre ordinateur  un service
  RNIS. L'une consiste  utiliser un dispositif appel `Adaptateur de
  Terminal' qui se branche sur l'unit de terminal rseau que votre
  oprateur de tlcommunications a install au moment de l'obtention de
  votre service RNIS, et qui prsente des interfaces sries.  L'une de
  ces interfaces est utilise pour entrer les commandes pour tablir les
  appels et la configuration, et les autres sont relies aux
  priphriques rseau qui utiliseront les circuits de donnes quand la
  connexion sera faite. Linux peut travailler avec ce type de
  configuration sans modification, vous devez juste traiter le port de
  l'adaptateur de terminal comme vous traitez tout priphrique srie.
  Une autre faon, qui est la raison d'tre pour le support RNIS dans le
  noyau, vous permet d'installer une carte RNIS dans votre machine Linux
  et le logiciel Linux prend en charge les protocoles et fait les appels
  lui-mme.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :



  ISDN subsystem  --->
          <*> ISDN support
          [ ] Support synchronous PPP
          [ ] Support audio via ISDN
          < > ICN 2B and 4B support
          < > PCBIT-D support
          < > Teles/NICCY1016PC/Creatix support




  L'implmentation Linux de RNIS supporte diffrents types de cartes
  internes RNIS.  Il y a celles numres dans les options de
  configuration noyau :

    ICN 2B and 4B

    Octal PCBIT-D

    Teles ISDN-cards et compatibles

     Certaines de ces cartes ont besoin de logiciels devant tre
     tlchargs pour les rendre oprationnelles. Il y a un utilitaire
     spar pour le faire.

  Tous les dtails pour configurer le support RNIS Linux se trouvent
  dans le rpertoire /usr/src/linux/Documentation/isdn/ et un document
  FAQ ddi  _i_s_d_n_4_l_i_n_u_x est disponible sur www.lrz-muenchen.de (vous
  pouvez cliquer sur le drapeau anglais pour obtenir la version
  anglaise).

  NNoottee aauu ssuujjeett ddee PPPPPP. L'ensemble des protocoles PPP peut travailler
  sur des lignes srie synchrone ou asynchrone. Le dmon PPP `_p_p_p_d'
  couramment distribu pour Linux ne supporte que le mode asynchrone. Si
  vous dsirez utiliser les protocoles PPP avec votre service RNIS vous
  aurez besoin d'une version spciale. Les dtails pour la trouver se
  trouvent dans la documentation mentionne ci-dessus.



  77..22..  PPLLIIPP ppoouurr LLiinnuuxx--22..00

  Les noms de priphriques PLIP sont `plip0', `plip1', `plip2'.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           <*> PLIP (parallel port) support





  _P_L_I_P (Parallel Line IP) est, comme SLIP, utilis pour fournir une
  connexion rseau _p_o_i_n_t _ _p_o_i_n_t entre deux machines, sauf qu'il est
  conu pour utiliser les ports parallles de votre machine au lieu des
  ports sries. Parce qu'il est possible de transmettre plus d'un bit en
  mme temps avec un port parallle, il est possible d'atteindre de plus
  hautes vitesses avec l'interface _P_L_I_P qu'avec une sortie srie
  standard (un schma de cblage est donn plus loin dans ce document).
  De plus, mme le plus simple des ports parallles, le port imprimante,
  peut tre utilis, au lieu d'acheter un UART 16550AFN relativement
  cher pour vos ports sries. PLIP utilise beaucoup de CPU en
  comparaison d'une liaison srie et ce n'est srement pas un bon choix
  si vous avez la possibilit d'avoir des cartes thernet pas chres,
  mais a fonctionne lorsque rien d'autre n'est disponible, et a
  fonctionne trs bien.

  Les pilotes PLIP entrent en comptition avec les autres pilotes du
  matriel branch sur le port parallle. Si vous voulez utiliser les
  deux, vous devez alors les compiler en tant que modules pour pouvoir
  choisir quel port vous voulez utiliser pour PLIP et quel port pour
  l'imprimante.  Voyez le document ``Modules-mini-HOWTO'' pour plus
  d'informations sur la configuration des modules noyau.

  Attention, notez que certains portables utilisent des circuits qui ne
  peuvent pas fonctionner avec PLIP car ils n'autorisent pas certaines
  combinaisons dont PLIP a besoin et que les imprimantes n'utilisent
  pas.

  L'interface Linux _P_L_I_P est compatible avec le _P_i_l_o_t_e _P_L_I_P _C_r_y_n_w_y_r
  _P_a_c_k_e_t et ceci signifie que vous pouvez connecter votre machine Linux
  avec une machine DOS tournant avec n'importe quel logiciel TCP/IP via
  _P_L_I_P.

  Dans la srie des noyaux 2.0.* les pilotes de priphrique PLIP sont
  affects aux ports e/s et IRQ comme suit :


       device  i/o addr    IRQ
       ------  --------    -----
       plip0   0x3BC           5
       plip1   0x378           7
       plip2   0x278           2




  Si vos ports parallles ne correspondent pas aux combinaisons
  prcdentes alors vous pouvez changer les IRQ en utilisant la commande
  _i_f_c_o_n_f_i_g avec le paramtre `irq'. N'oubliez pas de valider les IRQ
  pour vos ports imprimantes dans votre ROM BIOS s'il supporte cette
  option. Un autre moyen consiste  spcifier les options ``io='' et
  ``irq='' sur la ligne de commande de insmod, si vous utilisez les
  modules. Par exemple :



       root# insmod plip.o io=0x288 irq=5




  Le fonctionnement de PLIP est contrl par deux temporisations de
  dpassement de temps, dont les valeurs par dfaut devraient convenir
  la plupart du temps. Vous devrez peut-tre les augmenter si vous avez
  un ordinateur particulirement lent, auquel cas les valeurs devant
  tre augmentes se trouvent sur l'aauuttrree ordinateur. Il existe un
  programme appel _p_l_i_p_c_o_n_f_i_g qui permet d'effectuer ces rglages sans
  recompiler le noyau. Il est fourni avec de nombreuses distributions
  Linux.

  Pour configurer une interface _p_l_i_p, vous devez invoquer les commandes
  suivantes (ou les _a_j_o_u_t_e_r  vos scripts d'initialisation) :


        root# /sbin/ifconfig plip1 localplip pointopoint remoteplip
        root# /sbin/route add remoteplip plip1



  Dans ce cas, le port utilis est celui qui a l'adresse 0x378 ;
  _l_o_c_a_l_p_l_i_p et _r_e_m_o_t_e_p_l_i_p sont les adresses IP utilises sur le cble
  PLIP. Je les mets personnellement dans la base de donnes /etc/host :


        # entres plip
        192.168.3.1 localplip
        192.168.3.2 remoteplip





  Le paramtre _p_o_i_n_t_o_p_o_i_n_t a la mme signification que pour  SLIP,
  c'est--dire qu'il spcifie l'adresse de la machine  l'autre bout de
  la liaison.

  Dans la plupart des cas vous pouvez traiter l'interface _P_L_I_P comme si
  elle tait une interface _S_L_I_P, sauf que ni _d_i_p ni _s_l_a_t_t_a_c_h ne doivent,
  ou ne peuvent, tre utiliss.

  Plus d'information sur PLIP peut tre obtenu avec le document ``PLIP-
  mini-HOWTO''.



  77..33..  PPLLIIPP ppoouurr LLiinnuuxx22..22

  Durant le dveloppement des versions 2.1 du noyau, le support
  concernant les ports parallles s'est amlior.


  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       General setup --->
           [*] Parallel port support
       Network device support --->
           <*> PLIP (parallel port) support




  Le nouveau code concernant PLIP se comporte comme l'ancien ( on
  utilise les mmes commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e comme dans le paragraphe
  prcdent), mais l'initialisation du systme est diffrente en raison
  du support port parallle amlior.

  Le ``premier'' priphrique PLIP est toujours appel ``plip0'',
  premier signifiant celui qui est dtect en premier par le systme,
  comme pour les priphriques Ethernet. Le port parallle utilis de
  fait est l'un de ceux qui sont disponibles, comme indiqu dans
  /proc/parport.  Par exemple, si vous n'avez qu'un seul port parallle,
  vous n'aurez qu'un seul rpertoire appel /proc/parport/0.

  Si votre noyau ne dtecte pas l'IRQ utilise par votre port parallle,
  ``insmod plip'' chouera ; dans ce cas, vous crivez juste le chiffre
  adquat dans /proc/parport/0/irq et vous invoquez de nouveau _i_n_s_m_o_d.

  Une information complte sur la gestion des ports parallles est
  disponible dans le fichier Documentation/parport.txt, qui se trouve
  dans les sources du noyau.




  77..44..  PPPPPP

  Les noms de priphriques PPP sont `ppp0', `ppp1', etc.  Les noms sont
  attribus squentiellement, le premier priphrique tant `0'.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           <*> PPP (point-to-point) support




  La configuration de PPP est discute en dtail dans le PPP-HOWTO.


  77..44..11..  MMaaiinntteennaannccee dd''uunnee ccoonnnneexxiioonn ppeerrmmaanneennttee aavveecc llee rrsseeaauu  ll''aaiiddee
  ddee ppppppdd

  Si vous tes suffisamment fortuns pour avoir une connexion semi-
  permanente avec le net et que vous vouliez que votre machine refasse
  la connexion PPP en cas de dconnexion, alors voici une astuce simple.

  Configurer PPP de sorte qu'il soit dmarr par l'utilisateur root en
  lanant la commande :


       # pppd




  SSooyyeezz cceerrttaaiinnss d'avoir l'option `-detach' dans le fichier
  /etc/ppp/options. Puis, insrez la ligne suivante dans votre fichier
  /etc/inittab, avec les dfinitions des _g_e_t_t_y :


       pd:23:respawn:/usr/sbin/pppd




  Cela permettra au programme _i_n_i_t de dmarrer et de surveiller le pro
  gramme _p_p_p_d , et de le redmarrer automatiquement s'il meurt.




  77..55..  CClliieenntt SSLLIIPP

  Les fichiers de priphriques SLIP sont nomms `sl0', `sl1', etc. Le
  premier configur tant `0' et les autres s'incrmentant au fur et 
  mesure de leur configuration.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
           [*] Network device support
           <*> SLIP (serial line) support
           [ ]  CSLIP compressed headers
           [ ]  Keepalive and linefill
           [ ]  Six bit SLIP encapsulation


  SLIP (Serial Line Internet Protocol) vous permet d'utiliser TCP/IP
  avec une ligne srie, ce peut tre un tlphone et un modem, ou tout
  autre ligne ddie.  Bien sr pour utiliser SLIP vous devez avoir
  accs  un _s_e_r_v_e_u_r _S_L_I_P dans votre entourage.  Beaucoup d'universits
  et de socits fournissent des accs SLIP de par le monde.

  SLIP utilise les ports sries de votre machine pour transporter les
  datagrammes IP. Pour cela il doit prendre le contrle du priphrique
  srie. Les noms de priphriques SLIP sont _s_l_0, _s_l_1, etc. Comment
  ceux-ci correspondent avec vos priphriques srie ? Le code rseau
  utilise ce que l'on nomme un appel _i_o_c_t_l (i/o control) pour
  transformer les priphriques srie en priphriques SLIP. Il y a deux
  programmes qui peuvent faire cela, ce sont _d_i_p et _s_l_a_t_t_a_c_h.




  77..55..11..  ddiipp

  _d_i_p (Dialup IP) est un programme lgant capable de rgler la vitesse
  du dispositif srie, de demander  votre modem d'appeler l'autre
  extrmit de la ligne, de vous connecter automatiquement au serveur
  distant, de chercher des messages qui vous ont t envoys par le
  serveur et d'en extraire des informations telles que votre adresse IP
  et de faire le _i_o_c_t_l ncessaire pour basculer votre port srie en mode
  SLIP.  _d_i_p est trs flexible quant  l'utilisation de scripts et grce
   ceci vous pouvez automatiser vos procdures de connexion.

  On peut le trouver sur : metalab.unc.edu.

  Pour l'installer faites :


       user% tar xvfz dip337o-uri.tgz
       user% cd dip-3.3.7o
       user% vi Makefile
       root# make install





  Le fichier Makefile suppose l'existence d'un groupe nomm _u_u_c_p, mais
  vous pouvez le changer en _d_i_p ou _S_L_I_P, selon votre configuration.



  77..55..22..  ssllaattttaacchh

  _s_l_a_t_t_a_c_h au contraire de _d_i_p est un programme trs simple, trs facile
   utiliser, mais qui n'a pas la sophistication de _d_i_p.  Il n'a pas la
  possiblit d'accepter des scripts, tout ce qu'il fait tant de
  configurer votre priphrique srie en priphrique SLIP. Il suppose
  que vous avez toutes les informations ncessaires et que la liaison
  srie est tablie avant de l'invoquer.  _s_l_a_t_t_a_c_h est idal quand vous
  avez une liaison permanente avec votre serveur, comme un cble
  physique ou une ligne ddie.



  77..55..33..  QQuuaanndd uuttiilliisseerr qquuooii ??

  Vous devriez utiliser _d_i_p lorsque votre liaison vers la machine qui
  est votre serveur SLIP est un modem, ou tout autre lien intermittent.
  Vous devriez utiliser _s_l_a_t_t_a_c_h quand vous avez une ligne ddie,
  peut-tre un cble, entre votre machine et le serveur et qu'il n'y a
  pas d'action spciale ncessaire pour garder la ligne en activit.
  Voir la section `Connexion SLIP permanente' pour plus de dtails.


  Configurer SLIP est analogue  la configuration d'une interface
  Ethernet (voir la section `Configurer un priphrique Ethernet' ci-
  dessus).  Cependant, il existe quelques diffrences.


  Tout d'abord, les liens SLIP ne sont pas des rseaux Ethernet en ce
  sens qu'il n'y a que deux htes sur le rseau, un  chaque extrmit
  de la liaison.  la diffrence de l'Ethernet qui est disponible ds
  que vous tes cbl, avec SLIP, en fonction du type de lien que vous
  avez, vous serez amen  initialiser votre connexion rseau d'une
  manire spciale.


  Si vous utilisez _d_i_p, alors cela ne sera pas fait au moment du
  dmarrage de la machine, mais plus tard, quand vous serez prt 
  utiliser la liaison.  Il est possible d'automatiser la procdure. Si
  vous utilisez _s_l_a_t_t_a_c_h vous voudrez probablement ajouter une section
  dans votre fichier _r_c_._i_n_e_t_1.  Ceci sera dcrit bientt.


  Il y a deux types principaux de serveurs SLIP : serveurs avec
  adressage IP dynamique et serveurs avec adressage IP statique. Presque
  tous les serveurs SLIP vous demanderont  la connexion d'utiliser un
  nom d'utilisateur et un mot de passe quand vous composez le numro.
  _d_i_p peut prendre en charge la connexion automatiquement.



  77..55..44..  eett DDIIPP SSeerrvveeuurr SSLLIIPP ssttaattiiqquuee aavveecc uunnee lliiggnnee ttllpphhoonniiqquuee

  Le serveur SLIP statique est celui qui vous fournit une adresse IP qui
  reste exclusivement la vtre.  chaque fois que vous vous connectez 
  ce serveur, vous configurez votre port SLIP avec cette adresse. Le
  serveur SLIP statique rpond  votre appel par modem, vous demande
  probablement un nom d'utilisateur et un mot de passe, et ensuite
  dirige tous les datagrammes destins  votre adresse au travers de
  cette connexion. Si vous avez un serveur statique, alors vous mettez
  des entres pour votre nom d'hte et votre adresse IP (puisque vous
  savez ce qu'elle sera) dans votre fichier /etc/hosts. Vous devez aussi
  configurer d'autres fichiers comme : rc.inet2, host.conf, resolv.conf,
  /etc/HOSTNAME et rc.local. N'oubliez pas qu'en configurant rc.inet1,
  vous n'avez pas besoin d'ajouter de commandes spciales pendant la
  connexion SLIP puisque c'est _d_i_p qui fait tout le dur labeur  votre
  place en configurant votre interface. Vous avez besoin de donner  _d_i_p
  les informations adquates et il configure l'interface pour vous aprs
  avoir demand au modem d'tablir l'appel et de vous connecter au
  serveur.


  Si votre serveur SLIP fonctionne comme cela alors vous pouvez
  directement aller  la section `Utiliser Dip' pour apprendre 
  configurer _d_i_p convenablement.



  77..55..55..  SSeerrvveeuurr SSLLIIPP ddyynnaammiiqquuee aavveecc uunnee lliiggnnee ttllpphhoonniiqquuee eett DDIIPP

  Le serveur SLIP _d_y_n_a_m_i_q_u_e vous alloue une adresse IP de manire
  alatoire,  partir d'un groupe d'adresses,  chaque fois que vous
  vous connectez. Cela signifie qu'il n'y a aucune garantie d'avoir la
  mme adresse  chaque fois, et que celle-ci peut tre utilise par
  quelqu'un d'autre aprs la dconnexion. L'administrateur rseau qui a
  configur le serveur SLIP a assign un groupe d'adresses que le
  serveur SLIP peut utiliser quand il reoit un appel entrant. Il prend
  alors la premire adresse inutilise, guide l'appelant au travers du
  processus de connexion et envoie un message de bienvenue contenant
  l'adresse IP qu'il a alloue et continue d'utiliser cette adresse tout
  le temps de l'appel.


  Configurer ce type de serveur revient  configurer un serveur
  statique, sauf que vous devez ajouter une tape pour obtenir l'adresse
  IP alloue par le serveur puis configurer le priphrique SLIP avec
  celle-ci.


  Encore une fois, _d_i_p fait le sale boulot et les nouvelles versions
  sont suffisamment lgantes pour non seulement tablir la connexion,
  mais aussi pour lire l'adresse IP inscrite dans le message de
  bienvenue et la stocker de telle sorte que vous puissiez configurer
  votre priphrique SLIP avec.

  Si votre serveur SLIP fonctionne ainsi, alors vous pouvez aller  la
  section `Utiliser DIP' pour savoir comment configurer _d_i_p de manire
  adquate.



  77..55..66..  UUttiilliisseerr DDIIPP

  Comme expliqu plus haut, _d_i_p est un programme puissant qui simplifie
  et automatise le processus de composition d'un numro vers un serveur
  SLIP, se connecte dessus, dmarre la connexion et configure les
  priphriques SLIP  l'aide des commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e
  appropries.


  Essentiellement, pour utiliser _d_i_p vous crivez un `script dip' qui
  est tout simplement une liste de commandes que _d_i_p comprend et qui lui
  dit comment raliser chacune des actions que vous voulez qu'il fasse.
  Voyez le fichier sample.dip fourni avec _d_i_p pour avoir une ide de la
  manire dont il travaille.  _d_i_p est vraiment un programme puissant,
  avec beaucoup d'options.  Au lieu de regarder chacune d'elles, il vaut
  mieux jeter un coup d'oeil dans la page de manuel, le fichier README
  et les fichiers d'exemple qui sont fournis avec votre version de _d_i_p.


  Vous pouvez noter que le script sample.dip suppose que vous utilisez
  un serveur SLIP statique, aussi vous connaissez votre adresse IP 
  l'avance. Pour les serveurs SLIP dynamiques, les nouvelles versions de
  _d_i_p incluent une commande que vous pouvez utiliser pour lire et
  configurer automatiquement votre priphrique SLIP avec l'adresse IP
  donne par le serveur dynamique. L'exemple suivant est une version
  modifie du fichier sample.dip fourni avec _d_i_p_3_3_7_j_-_u_r_i_._t_g_z et qui est
  probablement un bon point de dpart pour vous. Vous pouvez le
  sauvegarder sous le nom de /etc/dipscript et l'diter pour l'adapter 
  votre configuration :











  #
  # sample.dip    Programme de support pour connexion IP.
  #
  #       Ce programme (devrait montrer) montre comment utiliser DIP
  #       Il devrait fonctionner avec des serveurs dynamiques de type Annex,
  #       et si vous utilsez un serveur avec adresse statique utilsez alors le
  #       fichier sample.dip livr avec le paquetage dip337-uri.tgz.
  #
  #
  # Version:      @(#)sample.dip  1.40    07/20/93
  #
  # Auteur:       Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  #

  main:
  # Aprs, postionner l'adresse et le nom de l'hte distant.
  # Ma machine s'appelle 'xs4all.hacktic.nl' (== 193.78.33.42)
  get $remote xs4all.hacktic.nl
  # Positionne le masque de rseau sur sl0  255.255.255.0
  netmask 255.255.255.0
  # Rgle le port srie et la vitesse.
  port cua02
  speed 38400

  # Reset le modem et la ligne de terminal.
  # Cela semble poser problme  certains!
  reset

  # Notez! Valeurs "standards" prdfinies de "errlevel":
  #  0 - OK
  #  1 - CONNECT
  #  2 - ERROR
  #
  # Vous pouvez les changer en faisant un grep dans *.c avec "addchat()"...

  # On se prpare pour numroter.
  send ATQ0V1E1X4\r
  wait OK 2
  if $errlvl != 0 goto modem_trouble
  dial 555-1234567
  if $errlvl != 1 goto modem_trouble

  # Nous sommes connects. Nous nous enregistrons sur le systme.
  login:
  sleep 2
  wait ogin: 20
  if $errlvl != 0 goto login_trouble
  send MYLOGIN\n
  wait ord: 20
  if $errlvl != 0 goto password_error
  send MYPASSWD\n
  loggedin:

  # Maintenant nous sommes enregistrs.
  wait SOMEPROMPT 30
  if $errlvl != 0 goto prompt_error

  # Demande au serveur de basculer en mode SLIP
  send SLIP\n
  wait SLIP 30
  if $errlvl != 0 goto prompt_error

  # Obtenir et ajuster notre adresse IP grce au serveur.
  # Ici nous supposons qu'aprs le basculement du serveur en mode SLIP, celui-ci
  # nous donne l'adresse IP
  #   mode that it prints your IP address
  get $locip remote 30
  if $errlvl != 0 goto prompt_error

  # rglage des paramtres SLIP.
  get $mtu 296
  # S'assurer que "route add -net default xs4all.hacktic.nl" sera fait
  default

  # Dire bonjour, et en avant!
  done:
  print CONNECTED $locip ---> $rmtip
  mode CSLIP
  goto exit

  prompt_error:
  print TIME-OUT waiting for sliplogin to fire up...
  goto error

  login_trouble:
  print Trouble waiting for the Login: prompt...
  goto error

  password:error:
  print Trouble waiting for the Password: prompt...
  goto error

  modem_trouble:
  print Trouble occurred with the modem...
  error:
  print CONNECT FAILED to $remote
  quit

  exit:
  exit





  L'exemple prcdent suppose que vous appeliez un serveur SLIP
  _d_y_n_a_m_i_q_u_e ; si vous appelez un serveur SLIP _s_t_a_t_i_q_u_e,  alors le
  fichier sample.dip founi avec _d_i_p_3_3_7_j_-_u_r_i_._t_g_z devrait vous convenir.

  Quand on donne  _d_i_p la commande _g_e_t _$_l_o_c_a_l, il cherche dans le texte
  venant de l'extrmit de la ligne une chane de caractres ressemblant
   une adresse IP, c'est  dire des ensembles de nombres spars par
  des caractres `.'. Cette modification fut mise en place plus
  spcialement pour les serveurs SLIP _d_y_n_a_m_i_q_u_e_s, afin que le processus
  de lecture de l'adresse IP fournie par le serveur soit automatis.

  L'exemple ci-dessus cre automatiquement une route par dfaut via
  votre liaison SLIP, et si ce n'est pas ce que vous voulez, car vous
  avez une connexion Ethernet qui devrait tre votre route par dfaut,
  alors enlevez la commande _d_e_f_a_u_l_t du script.  Aprs que le script ait
  fini de tourner, tapez la commande _i_f_c_o_n_f_i_g, et vous verrez que vous
  avez un priphrique _s_l_0. C'est votre priphrique SLIP. Si le besoin
  s'en fait sentir, vous pouvez modifier manuellement sa configuration,
  aprs que la commande _d_i_p soit finie, en utilisant les commandes
  _i_f_c_o_n_f_i_g et _r_o_u_t_e.

  Notez que _d_i_p vous permet de choisir parmi diffrents protocoles en
  utilisant la commande mode, l'exemple le plus courant tant _c_S_L_I_P pour
  utiliser SLIP avec compression.  Notez encore que les deux extrmits
  de la liaison doivent tre d'accord, aussi assurez-vous que ce que
  vous avez choisi est en accord avec les rglages du serveur.

  L'exemple montr ci-dessus est plutt robuste et devrait faire face 
  la plupart des erreurs. Rfrez-vous  la page de manuel de _d_i_p pour
  plus d'informations.  Naturellement, vous pouvez, par exemple,
  modifier le script pour raliser des choses comme recomposer le numro
  vers le serveur si la connexion n'a pas t faite au bout d'un certain
  temps, ou mme essayer une srie de serveurs si vous avez accs  plus
  d'un d'entre eux.



  77..55..77..  CCoonnnneexxiioonn ppeerrmmaanneennttee SSLLIIPP uuttiilliissaanntt uunnee lliiggnnee eett ssllaattttaacchh

  Si vous avez deux machines relies par un cble, ou si vous tes
  suffisamment riche pour avoir une ligne ddie, ou un autre type de
  connexion permanente entre votre machine et une autre, alors vous
  n'avez pas besoin de vous casser la tte avec _d_i_p pour rgler votre
  liaison srie.  _s_l_a_t_t_a_c_h est un utilitaire trs simple  utiliser et
  vous permet d'avoir les fonctionnalits juste ncessaires pour
  configurer votre connexion.

  Puisque votre connexion est permanente, vous ajoutez quelques
  commandes dans votre fichier rc.inet1. Tout ce dont vous avez besoin
  pour une connexion permanente est de vous assurer que vous avez
  configur votre priphrique srie  la bonne vitesse et basculer
  votre priphrique srie en mode SLIP.  _s_l_a_t_t_a_c_h vous permet de faire
  ceci avec une seule commande.  Ajoutez ce qui suit  votre fichier
  rc.inet1 :



       #
       # Attache une connexion SLIP statique sur une ligne ddie
       #
       #  configure /dev/cua0  la vitesse de 19.2kbps et cslip
       /sbin/slattach -p cslip -s 19200 /dev/cua0 &
       /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
       #
       # Fin de SLIP statique.




  O :

     IIPPAA..IIPPAA..IIPPAA..IIPPAA
        reprsente votre adresse IP.

     IIPPRR..IIPPRR..IIPPRR..IIPPRR
        reprsente l'adresse IP de l'hte distant.


  _s_l_a_t_t_a_c_h alloue le premier priphrique SLIP disponible au
  priphrique srie spcifi.  _s_l_a_t_t_a_c_h dmarre avec _s_l_0. Par
  consquent la premire commande _s_l_a_t_t_a_c_h relie le priphrique _s_l_0 au
  priphrique spcif, puis _s_l_1 la fois suivante, etc.


  _s_l_a_t_t_a_c_h vous permet de configurer un certain nombre de protocoles
  grce  l'argument -p. Dans votre cas vous utilisez soit _S_L_I_P soit
  _c_S_L_I_P suivant que vous voulez utiliser la compression ou non.  Note :
  les deux extrmits doivent tre d'accord sur l'utilisation de la
  compression.




  77..66..  SSeerrvveeuurr SSLLIIPP

  Vous avez peut-tre une machine connecte au rseau et vous aimeriez
  que d'autres personnes puissent s'y connecter pour y chercher des
  services de rseau, alors vous devez configurer votre machine comme
  serveur. Si vous voulez utiliser SLIP comme protocole de ligne srie,
  vous avez trois possiblits pour configurer votre machine Linux comme
  serveur SLIP. Ma prfrence est la premire prsente, _s_l_i_p_l_o_g_i_n, car
  elle semble la plus facile  configurer et  comprendre, mais je
  prsenterai un rsum pour chacune, ainsi vous pourrez dcider par
  vous-mme.



  77..66..11..  SSeerrvveeuurr SSLLIIPP uuttiilliissaanntt sslliippllooggiinn

  _s_l_i_p_l_o_g_i_n est un programme que vous pouvez utiliser  la place du
  shell normal de connexion pour les utilisateurs SLIP, et qui convertit
  la ligne terminal en ligne SLIP. Il vous permet de configurer votre
  machine Linux soit en _s_e_r_v_e_u_r _ _a_d_r_e_s_s_e _s_t_a_t_i_q_u_e (les utilisateurs
  obtiennent toujours la mme adresse  chaque connexion), soit en
  _s_e_r_v_e_u_r _ _a_d_r_e_s_s_e _d_y_n_a_m_i_q_u_e (les utilisateurs obtiennent une adresse
  qui n'est pas forcment la mme que lors de la connexion prcdente).

  L'appelant se connecte comme sur un terminal standard, en donnant son
  nom d'utilisateur et son mot de passe, mais au lieu d'avoir une invite
  de shell aprs la connexion, _s_l_i_p_l_o_g_i_n est excut et cherche dans son
  fichier de configuration une entre dont le nom correspond  celui de
  l'appelant. S'il en dtecte une, il configure la ligne avec 8 bits de
  donnes, et utilise un appel _i_o_c_t_l pour basculer celle-ci en ligne
  SLIP.  Quand ce processus est fini, la dernire tape de la
  configuration prend place, _s_l_i_p_l_o_g_i_n invoquant un script qui configure
  l'interface SLIP avec l'adresse IP adquate, ainsi que le masque de
  rseau et positionne le routage appropri. Ce script est appel
  habituellement /etc/slip.login, mais tout comme _g_e_t_t_y, si certains
  appelants ncessitent une initialisation spciale, alors vous pouvez
  crer des scripts de configuration appels /etc/slip.login.loginname
  qui seront utiliss  la place du script par dfaut.

  Il y a quelques fichiers que vous devez configurer pour que _s_l_i_p_l_o_g_i_n
  travaille pour vous. Je dcrirai comment et o obtenir les logiciels
  et comment chacun est configur. Ces fichiers sont :


    /etc/passwd, pour l'acceptation des utilisateurs entrants;

    /etc/slip.hosts, qui contient une information spcifique de chaque
     utilisateur entrant;

    /etc/slip.login, qui s'occupe de la configuration du routage;

    /etc/slip.tty, requis uniquement si vous configurez votre serveur
     avec _a_l_l_o_c_a_t_i_o_n _d_'_a_d_r_e_s_s_e _d_y_n_a_m_i_q_u_e : il contient une table des
     adresses  allouer.

    /etc/slip.logout, qui contient les commandes de `nettoyage' aprs
     une dconnexion volontaire ou intempestive.



  77..66..11..11..  OO oobbtteenniirr sslliippllooggiinn

  Votre distribution contient peut-tre dj le paquetage; si ce n'est
  pas le cas alors _s_l_i_p_l_o_g_i_n peut tre obtenu sur metalab.unc.edu.  Le
  fichier tar contient  la fois les sources, les binaires prcompils
  et une page de manuel.
  Pour s'assurer que seuls les utilisateurs autoriss pourront faire
  tourner le programme _s_l_i_p_l_o_g_i_n, vous devez ajouter une entre dans
  votre fichier /etc/group similaire  la suivante :



        ..
       slip::13:radio,fred
        ..





  Lorsque vous installez le paquetage _s_l_i_p_l_o_g_i_n, Makefile change le
  groupe du programme _s_l_i_p_l_o_g_i_n en slip, et cela signifie que seuls les
  utilisateurs qui appartiennent  ce groupe pourront l'excuter.
  L'exemple donn ci-dessus ne permet qu'aux utilisateurs radio et fred
  de pouvoir faire tourner le programme _s_l_i_p_l_o_g_i_n.

  Pour installer les binaires dans le rpertoire /sbin et les pages de
  manuel dans la section 8, faites :



       root# cd /usr/src
       root# gzip -dc .../sliplogin-2.1.1.tar.gz | tar xvf -
       root# cd sliplogin-2.1.1
       root# <..editez le Makefile si vous n'utilisez pas les shadow passwords..>
       root# make install




  Si vous voulez recompiler les binaires avant de les installer, faites
  make clean avant de faire make install. Si vous voulez installer les
  binaires autre part, vous devez diter le fichier Makefile et le
  modifier en consquence.

  Lisez les fichiers README qui sont inclus dans le paquetage pour plus
  d'informations.



  77..66..11..22..  CCoonnffiigguurreerr //eettcc//ppaasssswwdd  ppoouurr uuttiilliisseerr SSLLIIPP

  Normalement vous devez crer des noms d'utilisateurs spciaux, pour
  ceux qui appellent avec SLIP, dans votre fichier /etc/passwd.  Une
  convention souvent suivie est d'utiliser le _n_o_m _d_'_u_t_i_l_i_s_a_t_e_u_r de
  l'appelant prfixe avec la lettre capitale `S'.  Ainsi, par exemple,
  si l'appelant s'appelle radio alors vous pouvez crer une entre dans
  le fichier /etc/passwd ressemblant  ceci :



       Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin




  Le nom du compte n'a pas rellement d'importance, du moment qu'il ait
  une signification pour vous.

  Note : l'appelant n'a pas besoin de rpertoire home spcial car il
  n'utilisera pas de shell sur la machine, ds lors /tmp est un bon
  choix. Notez bien que _s_l_i_p_l_o_g_i_n est utilis  la place du shell de
  connexion normal.



  77..66..11..33..  CCoonnffiigguurreerr //eettcc//sslliipp..hhoossttss

  Le fichier /etc/slip.hosts  est le fichier o _s_l_i_p_l_o_g_i_n cherche les
  entres correspondant au nom de connexion pour obtenir les dtails de
  configuration. C'est le fichier o sont indiqus l'adresse IP et le
  masque de rseau qui seront assigns  l'appelant et configurs pour
  leur usage. Des exemples d'entres pour deux utilisateurs, une
  statique pour  radio et l'autre dynamique pour albert ressemblent 
  ceci :



       #
       Sradio   44.136.8.99   44.136.8.100  255.255.255.0  normal      -1
       Salbert  44.136.8.99   DYNAMIC       255.255.255.0  compressed  60
       #




  Les entres du fichier /etc/slip.hosts sont :


  1. Le nom de connexion de l'appelant.

  2. L'adesse IP de la machine serveur, donc de la machine contenant ce
     fichier.

  3. L'adresse IP qui sera attribue  l'appelant. Si le champ vaut
     DYNAMIC alors l'adresse IP sera alloue suivant les informations
     contenues dans le fichier /etc/slip.tty dcrit plus loin. NNoottee ::
     vous devez utiliser au moins la version 1.3 de sliplogin pour que
     cela fonctionne.

  4. Le masque de rseau assign  la machine appelante, en notation
     dcimale, par exemple 255.255.255.0 pour un masque de rseau de
     classe C.

  5. Un rglage du mode SLIP qui active/dsactive la compression. Les
     valeurs autorises sont "normal" et "compressed".

  6. Un paramtre de dlai qui spcifie combien de temps la ligne peut
     rester inactive (aucun datagramme reu) avant une dconnexion
     automatique. Une valeur ngative dsactive cette possiblit.

  7. arguments optionnels.

  Note : Vous pouvez mettre soit les noms d'htes soit les adresses IP
  en notation dcimale pointe pour les champs 2 et3.  Si vous utilisez
  les noms d'htes, alors ces htes doivent tre rsolubles, c'est 
  dire que votre machine est capable de dterminer une adresse IP pour
  ces noms d'htes, autrement le script chouera pendant l'appel. Vous
  pouvez le tester en faisant telnet vers un nom d'hte : si vous
  obtenez le message `_T_r_y_i_n_g _n_n_n_._n_n_n_._n_n_n_._._.' alors votre machine est
  capable de trouver une adresse ip pour ce nom d'hte. Si vous obtenez
  le message `_U_n_k_n_o_w_n _h_o_s_t', alors il n'en a pas. Dans ce cas essayez
  d'utiliser l'adress IP en notation dcimale pointe ; ou bien voyez du
  ct de votre configuration de solveur de noms (voir la section
  Rsolution de noms).

  Les modes les plus courants de SLIP sont :

     nnoorrmmaall
        mode SLIP normal non compress.

     ccoommpprreesssseedd
        mode avec compression van Jacobsen des en-ttes (cSLIP)

  Bien sr ils sont mutuellement exclusifs, vous devez utiliser l'un ou
  l'autre. Pour plus d'informations sur les options disponibles, voir
  les pages de manuels.



  77..66..11..44..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..llooggiinn ..

  Aprs que _s_l_i_p_l_o_g_i_n ait explor le fichier /etc/slip.hosts et ait
  trouv une entre qui convient, il essaye d'excuter le fichier
  /etc/slip.login pour effectivement configurer l'interface SLIP avec
  son adresse IP et son masque de rseau.

  L'exemple de fichier /etc/slip.login fourni avec le paquetage
  _s_l_i_p_l_o_g_i_n ressemble  ceci :



       #!/bin/sh -
       #
       #       @(#)slip.login  5.1 (Berkeley) 7/1/90
       #
       # fichier gnrique de connexion pour une ligne SLIP. Invoqu par sliplogin
       # avec les paramtres:
       #     $1       $2       $3    $4, $5, $6 ...
       # unit SLIP vitesse    pid   arguments tirs de slip.host
       #
       /sbin/ifconfig $1 $5 pointopoint $6 mtu 1500 -trailers up
       /sbin/route add $6
       arp -s $6 <hw_addr> pub
       exit 0
       #




  Notez que ce script utilise seulement les commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e
  pour configurer le priphrique SLIP avec sa propre adresse IP,
  l'adresse IP de l'hte distant , le masque de rseau puis cre une
  route vers l'adresse distante via le priphrique SLIP. C'est--dire
  la mme chose que si vous utilisiez la commande _s_l_a_t_t_a_c_h.

  Notez aussi l'utilisation de _P_r_o_x_y _A_R_P pour s'assurer que les htes
  placs sur le mme segment thernet que la machine serveur sauront
  comment atteindre l'hte qui s'est connect.  Le champ <hw_addr> doit
  tre l'adresse matrielle de la carte Ethernet de la machine. Si votre
  machine serveur n'est pas sur un rseau Ethernet, vous pouvez ignorer
  cette ligne.



  77..66..11..55..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..llooggoouutt

  Quand la connexion s'est arrte, assurez-vous que le priphrique
  srie soit revenu  son tat normal de telle sorte que les appelants
  suivants puissent se connecter correctement. Ceci est accompli en
  utilisant le fichier /etc/slip.logout. Il est de format trs simple et
  est appel avec le mme argument que le fichier /etc/slip.login.


       #!/bin/sh -
       #
       #               slip.logout
       #
       /sbin/ifconfig $1 down
       arp -d $6
       exit 0
       #




  Tout ce qu'il fait est de `mettre  zro' l'interface qui supprimera
  la route prcdemment cre.  Il utilise aussi la commande _a_r_p pour
  supprimer tout arp proxy en place, encore une fois vous n'avez pas
  besoin de la commande _a_r_p dans le script si votre machine serveur ne
  possde pas de port Ethernet.



  77..66..11..66..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..ttttyy

  Si vous utilisez une allocation d'adresse ip dynamique (tous les htes
  configurs avec le mot-cl DYNAMIC dans le fichier /etc/slip.hosts)
  alors vous devez configurer le fichier /etc/slip.tty pour lister les
  adresses qui seront assignes aux ports. Vous n'aurez besoin de ce
  fichier que si vous voulez que votre serveur alloue des adresses aux
  utilisateurs de manire dynamique.

  Ce fichier est un tableau qui liste les priphriques _t_t_y supportant
  les connexions SLIP entrantes et l'adresse ip qui sera assigne aux
  utilisateurs se connectant  ceux-ci.

  Son format est le suivant :


       # slip.tty    mappage d'adresses tty -> IP pour SLIP dynamique
       # format: /dev/tty?? xxx.xxx.xxx.xxx
       #
       /dev/ttyS0      192.168.0.100
       /dev/ttyS1      192.168.0.101
       #





  Ce que dit ce tableau est que les appelants qui se connectent sur le
  port /dev/ttyS0 et dont le champ adresse dans le fichier
  /etc/slip.hosts vaut sur DYNAMIC auront l'adresse 192.168.0.100.

  De cette manire vous n'avez besoin d'allouer qu'une seule adresse par
  port pour tous les utilisateurs n'ayant pas besoin d'adresse fixe.
  Ceci vous permet d'avoir le nombre minimum d'adresses ncessaires pour
  viter du gaspillage.



  77..66..22..  SSeerrvveeuurr SSlliipp uuttiilliissaanntt ddiipp

  Tout d'abord laissez-moi dire que certaines informations ci-dessous
  proviennent des pages de manuel de _d_i_p, o la manire de faire tourner
  Linux comme serveur SLIP est brivement dcrite. Faites attention
  aussi que ce qui suit est fond sur le paquetage _d_i_p_3_3_7_o_-_u_r_i_._t_g_z et ne
  s'applique vraisemblablement pas  d'autres versions de _d_i_p.

  _d_i_p possde un mode de traitement des donnes d'entre qui permet de
  localiser automatiquement un utilisateur entrant et qui configure la
  ligne srie comme lien SLIP suivant les informations trouves dans le
  fichier /etc/diphosts.  Ce mode est activ en invoquant _d_i_p avec
  _d_i_p_l_o_g_i_n. Voil donc comment utiliser _d_i_p comme serveur SLIP, en
  crant des comptes spciaux o _d_i_p_l_o_g_i_n est utilis comme shell de
  connexion.

  La premire chose  faire est de crer un lien symbolique comme suit :



       # ln -sf /usr/sbin/dip /usr/sbin/diplogin




  Ensuite vous devez ajouter des entres  la fois dans vos fichiers
  /etc/passwd et /etc/diphosts. Les entres que vous devez y mettre sont
  formates comme suit :

  Pour configurer Linux comme serveur SLIP avec _d_i_p, vous devez crer
  quelques comptes SLIP spciaux pour les utilisateurs, o _d_i_p (en mode
  d'entre) est utilis comme shell de connexion. Une convention
  suggre est d'avoir tous les comptes SLIP commenant avec la lettre
  `S' majuscule, par exemple `Sfredm'.

  Un exemple d'entre dans /etc/passwd pour un utilisateur SLIP
  ressemble  ceci :



       Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
       ^^         ^^        ^^  ^^   ^^   ^^   ^^
       |          |         |   |    |    |    \__ diplogin comme shell de connexion
       |          |         |   |    |    \_______ Rpertoire personnel
       |          |         |   |    \____________ Nom complet d'utilisateur
       |          |         |   \_________________ GID
       |          |         \_____________________ UID
       |          \_______________________________ Mot de passe chiffr
       \__________________________________________ Nom de connexion Slip





  Aprs la connexion de l'utilisateur, le programme _l_o_g_i_n (s'il trouve
  et accepte l'utilisateur) excute la commande _d_i_p_l_o_g_i_n. _d_i_p, lorsqu'il
  est invoqu en tant que _d_i_p_l_o_g_i_n sait qu'il sera automatiquement
  utilis comme shell de connexion.  Quand il est dmarr comme _d_i_p_l_o_g_i_n
  la premire chose qu'il fait est d'utiliser l'appel de la fonction
  _g_e_t_u_i_d_(_) pour obtenir l'identificateur de l'utilisateur appelant. Il
  regarde ensuite dans le fichier /etc/diphosts pour trouver la premire
  entre qui corresponde soit  l'utilisateur soit au priphrique _t_t_y
  o l'appel est entr et se configure lui-mme de manire approprie.
  Par un choix judicieux : soit de donner  l'utilisateur une entre
  dans le fichier diphosts, soit de laisser  l'utilisateur la
  configuration par dfaut, vous pouvez construire votre serveur de
  telle manire que vous puissiez faire cohabiter des utilisateurs ayant
  des adresses alloues statiquement ou dynamiquement.

  _d_i_p ajoutera automatiquement une entre `Proxy-ARP' si elle est
  invoque en mode d'entre, aussi vous n'avez pas  vous soucier
  d'ajouter de telles entres manuellement.


  77..66..22..11..  CCoonnffiigguurreerr //eettcc//ddiipphhoossttss

  /etc/diphosts est utilis par _d_i_p pour examiner des configurations
  prtablies concernant des htes loigns. Ceux-ci peuvent tre des
  htes se connectant sur votre machine, ou bien des machines sur
  lesquelles vous vous connectez.

  Le format gnral de /etc/diphosts est :



        ..
       Suwalt::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
       ttyS1::145.71.34.3:145.71.34.2:255.255.255.0:Dynamic ttyS1:CSLIP,296
        ..




  Les champs sont :

  1. nom de connexion : comme retourn par getpwuid(getuid()) ou bien le
     nom de tty.

  2. inutilis : pour compatibilit avec passwd

  3. Adresse distante : adresse IP de l'appelant, soit numrique soit
     nominative

  4. Adresse locale : adresse IP de cette machine, soit numrique soit
     nominative.

  5. Masque de rseau : en notation dcimale pointe

  6. Commentaires : vous y mettez ce que vous voulez.

  7. protocole : Slip, CSlip, etc.

  8. MTU : nombre dcimal

  Un exemple d'entre /etc/net/diphosts pour un hte distant peut tre :



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296




  qui spcifie une liaison SLIP avec une adresse distante de 145.71.34.1
  et un MTU de 296, ou :



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006




  qui spcifie une liaison compatible cSLIP avec une adresse distante de
  145.71.34.1 et un MTU de 1006.

  Ds lors, tous les utilisateurs  qui vous permettez d'avoir une
  connexion avec allocation d'adresse IP statique auront une entre dans
  /etc/diphosts. Si vous voulez que des utilisateurs qui appellent sur
  un port particulier aient leur adresse alloue dynamiquement, vous
  devez avoir une entre pour le priphrique tty, mais pas d'entre
  pour l'utilisateur lui-mme. Vous devez vous souvenir de configurer au
  moins une entre pour chaque priphrique tty que vos utilisateurs
  entrants utiliseront pour tre srs qu'une configuration adquate soit
  disponible, indpendamment du modem sur lequel ils se connectent.

  Quand un utilisateur se connecte, il recevra une invite normal de
  login et une demande de mot de passe, pour lesquels il devra entrer
  son identificateur SLIP et son mot de passe. Si tout est correct,
  l'utilisateur ne verra pas de message spcial, il devra juste basculer
  en mode SLIP chez lui et ensuite il sera connect et configur avec
  les paramtres contenus dans le fichier diphosts.



  77..66..33..  SSeerrvveeuurr SSLLIIPP uuttiilliissaanntt ll''eennsseemmbbllee ddSSLLIIPP

  Matt Dillon <dillon@apollo.west.oic.com> a crit un paquetage qui
  permet des liaisons SLIP non seulement entrantes mais aussi sortantes.
  Le paquetage de Matt est une combinaison de petits programmes et de
  scripts qui prennent en charge les connexions  votre place.  Vous
  aurez besoin de _t_c_s_h car au moins l'un des scripts en a besoin. Matt
  fournit une copie binaire de l'utilitaire _e_x_p_e_c_t car il est aussi
  ncessaire pour l'un des scripts.  Il serait prfrable d'avoir une
  certaine exprience de _e_x_p_e_c_t pour que ce paquetage soit utile pour
  vous, mais que cela ne vous dcourage pas.

  Matt a crit une bonne procdure d'installation dans le fichier
  README, aussi je ne me fatiguerai pas  la rpter.

  Vous pouvez rcuprer le paquetage _d_S_L_I_P sur son site d'origine :

  aappoolllloo..wweesstt..ooiicc..ccoomm


       /pub/linux/dillon_src/dSLIP203.tgz




  ou bien sur :

  mmeettaallaabb..uunncc..eedduu


       /pub/Linux/system/Network/serial/dSLIP203.tgz




  Lisez le fichier README et crez les entres /etc/passwd et /etc/group
  aavvaanntt de faire make install.



  88..  AAuuttrreess tteecchhnnoollooggiieess rrsseeaauu

  Les paragraphes suivants traitent de sujets spcifiques concernant des
  technologies lies au rseau. Les informations qui y sont contenues ne
  s'appliquent pas forcment aux autres types de technologies rseau.
  Les sujets sont traits par ordre alphabtique.





  88..11..  AARRCCNNeett

  Les noms de fichier priphriques de ARCNet sont `arc0e', `arc1e',
  `arc2e' ... ou bien `arc0s', `arc1s', `arc2s', etc. La premire carte
  dtecte par le noyau devient `arc0e' ou `arc0s' et les autres sont
  nommes en suivant dans l'ordre de leur dtection.  La lettre finale
  dpend de votre choix : soit un format d'encapsulation de paquets
  Ethernet, soit un format de paquets suivant RFC1051.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
           [*] Network device support
           <*> ARCnet support
           [ ]   Enable arc0e (ARCnet "Ether-Encap" packet format)
           [ ]   Enable arc0s (ARCnet RFC1051 packet format)




  Si vous avez construit convenablement votre noyau pour supporter votre
  carte Ethernet, alors la configuration de la carte est facile.

  Typiquement vous devriez utiliser quelque chose comme ceci :


       root# ifconfig arc0e 192.168.0.1 netmask 255.255.255.0 up
       root# route add -net 192.168.0.0 netmask 255.255.255.0 arc0e




  Merci de vous rfrer aux documents /usr/src/linux/Documentation/net
  working/arcnet.txt et /usr/src/linux/Documentation/networking/arcnet-
  hardware.txt pour d'autres informations.

  Le support ARCNet fut dvelopp par Avery Pennarun,
  apenwarr@foxnet.net.



  88..22..  AApppplleettaallkk (( AAFF__AAPPPPLLEETTAALLKK ))

  Le support Appletalk ne possde pas de noms de priphriques
  spcifiques car il utilise les priphriques rseau existants.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           <*> Appletalk DDP




  Le support Appletalk permet  votre machine Linux de dialoguer avec
  les rseaux Apple.  Son utilisation principale est de pouvoir partager
  des ressources, comme les imprimantes et les disques, entre vos ordi
  nateurs Linux et Apple. Un logiciel supplmentaire est requis, il
  s'appelle _n_e_t_a_t_a_l_k. Wesley Craig netatalk@umich.edu reprsente une
  quipe appele le `Research Systems Unix Group'  l'universit du
  Michigan.  Celle-ci a labor le paquetage _n_e_t_a_t_a_l_k, qui fournit un
  logiciel implmentant la pile protocole Appletalk et quelques utili
  taires.  Soit ce paquetage _n_e_t_a_t_a_l_k vous a t fourni avec votre dis
  tribution Linux, soit vous pouvez le rcuprer par ftp depuis le site
  University of Michigan

  Pour construire et installer le paquetage, vous faites :


       user% cd /usr/src
       user% tar xvfz .../netatalk-1.4b2.tar.Z
       - Vous pouvez diter le fichier `Makefile'  ce stade, plus
       prcisment pour changer la valeur de la variable
        DESTDIR qui dfinit l'endroit o les fichiers seront
       installs plus tard.
        Le rpertoire par dfaut, /usr/local/atalk, semble
        trs raisonnable.
       user% make
       - puis, en temps que root :
       root# make install






  88..22..11..  CCoonnffiigguurreerr llee ssuuppppoorrtt AApppplleettaallkk..

  La premire chose  faire pour que tout fonctionne est de vrifier que
  les entres adquates sont prsentes dans le fichier /etc/services.
  Ces entres sont :


       rtmp    1/ddp   # Routing Table Maintenance Protocol
       nbp     2/ddp   # Name Binding Protocol
       echo    4/ddp   # AppleTalk Echo Protocol
       zip     6/ddp   # Zone Information Protocol




  L'tape suivante consiste  crer les fichiers de configuration
  Appletalk dans le rpertoire /usr/local/atalk/etc (ou bien  l'endroit
  o vous avez install le paquetage).

  Le premier fichier  crer est /usr/local/atalk/etc/atalkd.conf.
  Initialement ce fichier ne ncessite qu'une ligne qui indique le
  priphrique supportant le rseau sur lequel sont vos machines Apple :



       eth0




  Le programme dmon Appletalk ajoutera d'autres dtails quand il
  tournera.



  88..22..22..  EExxppoorrtteerr uunn ssyyssttmmee ddee ffiicchhiieerrss LLiinnuuxx aavveecc AApppplleettaallkk..

  Vous pouvez exporter des systmes de fichiers depuis votre machine
  Linux vers le rseau en sorte qu'une machine Apple puisse les
  partager.

  Pour cela vous devez configurer le fichier
  /usr/local/atalk/etc/AppleVolumes.system. Il y a une autre fichier de
  configuration appel /usr/local/atalk/etc/AppleVolumes.default qui a
  exactement le mme format et qui dcrit quels systmes de fichiers les
  utilisateurs connects pourront recevoir avec des privilges
  d'invits.

  Tous les dtails, qui vous diront comment configurer ces fichiers et
  avec quelles options, peuvent tre trouvs dans la page de manuel de
  _a_f_p_d.

  Un simple exemple :


       /tmp Scratch
       /home/ftp/pub "Public Area"




  Ce qui exportera votre systme de fichiers /tmp comme volume
  AppleShare `Scratch' et votre rpertoire public ftp comme volume
  AppleShare `Public Area'.  Les noms de volume ne sont pas
  obligatoires, le programme dmon pouvant les choisir pour vous, mais
  a ne cote rien de les spcifier quand mme.



  88..22..33..  TTeesstteerr AApppplleettaallkk..

  Pour tester si le programme fonctionne correctement, allez sur une des
  machines Apple, droulez le menu Pomme, cliquez sur AppleShare, et
  votre bote Linux devrait apparatre.



  88..22..44..  AAuuttrreess iinnffoorrmmaattiioonnss

  Pour en savoir plus sur la configuration de Appletalk pour Linux,
  rfrez vous  la page de Anders Brownworth _L_i_n_u_x _N_e_t_a_t_a_l_k_-_H_O_W_T_O sur
  thehamptons.com.



  88..33..  AATTMM

  Werner Almesberger <werner.almesberger@lrc.di.epfl.ch> dirige un
  projet en vue de fournir un support Mode de Transfert Asynchrone
  (Asynchronous Transfer Mode) pour Linux.  Les informations sur l'tat
  du projet se trouvent sur : lrcwww.epfl.ch.



  88..44..  AAXX2255 (( AAFF__AAXX2255 ))

  Les noms de priphriques AX.25 sont `sl0', `sl1', etc. avec les
  noyaux 2.0.* ou `ax0', `ax1', etc. avec les noyaux 2.1.*.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2




  Les protocoles AX25, Netrom et Rose sont couverts par le document
  AX25-HOWTO.  Ces protocoles sont utiliss par les radio-amateurs du
  monde entier pour l'exprimentation packet-radio.

  L'essentiel du travail d'implmentation de ces protocoles a t
  ralis par Jonathon Naylor, jsn@cs.nott.ac.uk.



  88..55..  DDEECCNNeett

  Le support pour DECNet est en cours d'laboration. Vous devriez le
  voir apparaitre dans l'un des prochains noyaux 2.1.*.



  88..66..  FFDDDDII ((FFiibbeerr DDiissttrriibbuutteedd DDaattaa IInntteerrffaaccee))

  Les noms de priphriques FDDI sont `fddi0', `fddi1', `fddi2' etc. La
  premire carte dtecte par le noyau s'appelle `fddi0' et le reste est
  nomm dans l'ordre de dtection.

  Larry Stefani, lstefani@ultranet.com, a dvelopp un pilote pour les
  cartes Digital Equipment Corporation FDDI EISA et PCI.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Network device support  --->
           [*] FDDI driver support
           [*] Digital DEFEA and DEFPA adapter support




  Lorsque vous avez construit et install votre noyau pour supporter le
  pilote FDDI, la configuration de l'interface FDDI est presque
  identique  celle d'une interface Ethernet. Vous devez spcifier le
  nom de l'interface FDDI approprie dans les commandes _i_f_c_o_n_f_i_g et
  _r_o_u_t_e.



  88..77..  RReellaaiiss ddee ttrraammeess ((FFrraammee RReellaayy))

  Les noms de priphriques de `relais de trames' sont `dlci00',
  `dlci01' etc pour les systmes d'encapsulation DLCI et  `sdla0',
  `sdla1' etc pour les FRAD(s) (Frame Relay Access Device).

  Le relais de trames est une nouvelle technologie rseau conue pour
  s'adapter au trafic de transmission de donnes `par  coups' ou de
  nature intermittente.  Vous vous connectez  un rseau de ce type en
  utilisant un dispositif d'accs par relais de trames (FRAD).  Les
  supports Linux relais de trames supportent IP par-dessus celui-ci
  comme dcrit dans la RFC-1490.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Network device support  --->
           <*> Frame relay DLCI support (EXPERIMENTAL)
           (24)   Max open DLCI
           (8)   Max DLCI per device
           <*>   SDLA (Sangoma S502/S508) support




  Mike McLagan, mike.mclagan@linux.org, a dvelopp le support Frame
  Relay et les outils de configuration.

   l'heure actuelle le seul FRAD support est Sangoma Technologies
  S502A, S502E et S508.

  Pour configurer les systmes FRAD et DLCI aprs avoir reconstruit
  votre noyau, vous aurez besoin des outils de configuration. Ils sont
  disponibles sur ftp.invlogic.com.  Compiler et installer les outils
  est trs facile, mais le manque de fichier Makefile au premier niveau
  oblige  le faire  la main :


       user% tar xvfz .../frad-0.15.tgz
       user% cd frad-0.15
       user% for i in common dlci frad; make -C $i clean; make -C $i; done
       root# mkdir /etc/frad
       root# install -m 644 -o root -g root bin/*.sfm /etc/frad
       root# install -m 700 -o root -g root frad/fradcfg /sbin
       root# install -m 700 -o root -g root dlci/dlcicfg /sbin




  Notez que ces commandes utilisent la syntaxe du shell _s_h, et si vous
  utilisez _c_s_h (comme _t_c_s_h), la boucle _f_o_r sera diffrente.

  Aprs l'installation vous devez crer un fichier /etc/frad/router.conf
  Vous pouvez utiliser cet exemple, qui est une version modifie de l'un
  des fichiers donn en exemple :




































  # /etc/frad/router.conf
  # C'est un modle de configuration pour relais de trames.
  # Tout y est inclus. Les valeurs par dfaut sont fondes sur le code
  # fourni avec les pilotes DOS de la carte Sangoma S502A.
  #
  # Une ligne avec '#' est un commentaire
  # Les blancs sont ignors (vous pouvez utiliser des tabulations aussi).
  # Les sections [] inconnues et les entres inconnues sont ignores.
  #

  [Devices]
  Count=1                 # nombre de priphriques  configurer
  Dev_1=sdla0             # nom d'un priphrique
  #Dev_2=sdla1            # nom d'un priphrique

  # Ce qui est spcifie ici s'applique  tous les priphriques, et peut tre
  # mis  jour pour chaque carte individuelle.
  #
  Access=CPE
  Clock=Internal
  KBaud=64
  Flags=TX
  #
  # MTU=1500              # Taille maximum de l'unit de transfert 4096 par dfaut
  # T391=10               # valeur de T391  5 - 30, 10 par dfaut
  # T392=15               # valeur de T392  5 - 30, 15 par dfaut
  # N391=6                # valeur de N391  1 - 255, 6 par dfaut
  # N392=3                # valeur de N392  1 - 10,  3 par dfaut
  # N393=4                # valeur de N393  1 - 10,  4 par dfaut

  # On spcifie ici les valeurs par dfaut pour toutes les cartes
  # CIRfwd=16             # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511


  #
  #
  # Configurations spcifiques
  #
  #

  #
  #  Sangoma S502E
  #
  [sdla0]
  Type=Sangoma            # Type de priphrique  configurer, actuellement seul
                          # SANGOMA est reconnu
  #
  # Spcifique des types 'Sangoma'
  #
  # cartes S502A, S502E, S508
  Board=S502E
  #
  # Le nom du logiciel de carte en essai pour Sangoma
  # Testware=/usr/src/frad-0.10/bin/sdla_tst.502
  #
  # Le nom du logiciel de carte FR
  # Firmware=/usr/src/frad-0.10/bin/frm_rel.502
  #
  Port=360                # Port pour cette carte particulire
  Mem=C8                  # Adresse de fentre mmoire, A0-EE, dpend de la carte
  IRQ=5                   # numro d'IRQ, pas ncessaire pour S502A
  DLCIs=1                 # Nombre de DLCI attachs  ce priphrique
  DLCI_1=16               # numro du premier DLCI, de 16  991
  # DLCI_2=17
  # DLCI_3=18
  # DLCI_4=19
  # DLCI_5=20
  #
  # Ce qui est spcifie ici s'applique au priphrique seulement,
  # et remplace les valeurs par dfaut
  #
  # Access=CPE            # CPE ou NODE,  CPE par dfaut
  # Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
  # Clock=Internal        # Externe ou Interne, Interne par dfaut
  # Baud=128              # Dbit spcifi du CSU/DSU attach
  # MTU=2048              # Taille maximum de l'unit de transfert 4096 par dfaut
  # T391=10               # valeur de T391   5 - 30, 10 par dfaut
  # T392=15               # valeur de T392   5 - 30, 15 par dfaut
  # N391=6                # valeur de N391   1 - 255, 6 par dfaut
  # N392=3                # valeur de N392   1 - 10,  3 par dfaut
  # N393=4                # valeur de N393   1 - 10,  4 par dfaut

  #
  # Le second periphrique est une autre carte
  #
  # [sdla1]
  # Type=FancyCard        # Type de priphrique  configurer.
  # Board=                # Type de carte Sangoma
  # Key=Value             # valeurs spcifiques pour ce type de priphrique


  #
  # Paramtres de configuration DLCI par dfaut.
  # Peuvent tre crass par des configurations spcifiques
  #
  CIRfwd=64               # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511

  #
  # Configuration DLCI
  # Optionnel. La convention d'appellation est
  # [DLCI_D<devicenum>_<DLCI_Num>]
  #

  [DLCI_D1_16]
  # IP=
  # Net=
  # Mask=
  # Drapeaux dfinis par Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=64
  # Bc_fwd=512
  # Be_fwd=0
  # CIRbak=64
  # Bc_bak=512
  # Be_bak=0

  [DLCI_D2_16]
  # IP=
  # Net=
  # Mask=
  # Drapeaux dfinis par Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=16
  # Bc_fwd=16
  # Be_fwd=0
  # CIRbak=16
  # Bc_bak=16
  # Be_bak=0





  Lorsque vous avez construit votre fichier /etc/frad/router.conf, la
  seule tape restante est de configurer les priphriques eux-mmes.
  C'est un tout petit peu plus compliqu que la configuration normale
  d'un priphrique rseau; vous devez vous souvenir de monter le
  priphrique FRAD avant les priphriques d'encapsulation DLCI.



       #!/bin/sh
       # Configure le materiel frad et les parametres DLCI
       /sbin/fradcfg /etc/frad/router.conf || exit 1
       /sbin/dlcicfg file /etc/frad/router.conf
       #
       # Montage du dispositif FRAD
       ifconfig sdla0 up
       #
       # Configure les interfaces d'encapsulation DLCI et le routage
       ifconfig dlci00 192.168.10.1 pointopoint 192.168.10.2 up
       route add -net 192.168.10.0 netmask 255.255.255.0 dlci00
       #
       ifconfig dlci01 192.168.11.1 pointopoint 192.168.11.2 up
       route add -net 192.168.11.0 netmask 255.255.255.0 dlci00
       #
       route add default dev dlci00
       #






  88..88..  IIPPXX (( AAFF__IIPPXX ))

  Le protocole IPX est la plupart du temps utilis dans les
  environnements rseaux locaux Novell NetWare(tm).  Linux offre un
  support pour ce protocole, et peut tre configur pour agir comme
  extrmit rseau, ou comme routeur pour les environnements rseaux
  IPX.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] The IPX protocol
           [ ] Full internal IPX network




  Le protocole IPX et le NCPFS sont traits en dtail dans le document
  IPX-HOWTO.




  88..99..  NNeettRRoomm (( AAFF__NNEETTRROOMM ))

  Les noms de priphriques NetRom sont `nr0', `nr1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2
           [*] Amateur Radio NET/ROM




  Les protocoles AX25, Netrom et Rose sont dcrits dans le document
  AX25-HOWTO.  Ces protocoles sont utiliss par les radio-amateurs dans
  le monde entier pour l'exprimentation du packet-radio.

  L'essentiel du travail d'implmentation a t fait par Jonathon
  Naylor, jsn@cs.not.ac.uk.


  88..1100..  PPrroottooccoollee RRoossee (( AAFF__RROOSSEE ))

  Les noms de priphriques Rose sont `rs0', `rs1', etc.  .  Rose est
  disponible dans la srie des noyaux 2.1.*.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2
           <*> Amateur Radio X.25 PLP (Rose)




  Les protocoles AX25, Netrom et Rose sont expliqus dans le AX25-HOWTO.
  Ces protocoles sont utiliss par les oprateurs radio-amateur du monde
  entier pour l'exprimentation du packet-radio.

  L'essentiel du travail d'implmentation de ces protocoles a t
  ralis par Jonathon Naylor, jsn@cs.not.ac.uk.



  88..1111..  SSuuppppoorrtt SSAAMMBBAA -- ``NNeettBBEEUUII'',, ``NNeettBBiiooss'',, ``CCIIFFSS''..

  SAMBA est une implmentation du protocole Session Management Block.
  Samba permet aux Systmes Microsoft et autres de monter et d'utiliser
  vos disques et imprimantes.

  SAMBA et sa configuration sont dcrits en dtail dans le SMB-HOWTO.



  88..1122..  SSuuppppoorrtt SSTTRRIIPP ((SSttaarrmmooddee RRaaddiioo IIPP))

  Les noms de priphriques STRIP sont `st0', `st1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :





  Network device support  --->
          [*] Network device support
          ....
          [*] Radio network interfaces
          < > STRIP (Metricom starmode radio IP)




  STRIP est un protocole conu spcialement pour un certain type de
  modems radio Metricom dans le cadre d'un projet de recherche conduit
  par l'Universit de Stanford appel MosquitoNet Project.  Il y a un
  tas de choses intressantes  lire, mme si vous n'tes pas
  directement concern par le projet.

  Les radios Metricom se connectent sur un port srie et emploient la
  technologie  large bande spectrale et peuvent aller jusqu' 100kbps.
  Des informations sur ceux-ci sont disponibles sur : Le serveur web de
  Metricom.

   l'heure actuelle, les outils rseau habituels ne supportent pas le
  pilote STRIP, vous devez donc tlcharger des outils personnaliss 
  partir du serveur web MosquitoNet. Pour avoir des dtails sur les
  logiciels  utiliser allez voir : MosquitoNet STRIP Page.

  En rsum la configuration consiste  utiliser un programme _s_l_a_t_t_a_c_h
  modifi pour rgler la discipline de ligne d'un priphrique srie
  pour SLIP, puis  configurer le priphrique `st[0-9]' rsultant comme
  vous le feriez pour Ethernet avec une exception importante : pour des
  raisons techniques STRIP ne supporte pas le protocole ARP , vous devez
  alors configurer manuellement les entres ARP pour chacun des htes de
  votre sous-rseau. Cela ne devrait pas tre trop contraignant.



  88..1133..  TTookkeenn RRiinngg

  Le noms de priphriques Token ring sont `tr0', `tr1' etc. Token Ring
  est un protocole LAN standard IBM en vue d'viter les collisions en
  fournissant un mcanisme qui n'autorise qu'une seule station du LAN 
  transmettre  un moment donn.  Un `jeton' est dtenu par une station
   un moment donn, et celle-ci est la seule autorise  mettre.
  Lorque c'est fait, elle passe le jeton  la station suivante. Le jeton
  fait le tour de toutes les stations actives, d'o le nom de `Token
  Ring' (anneau  jeton).

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
               [*] Network device support
               ....
               [*] Token Ring driver support
               < > IBM Tropic chipset based adaptor support




  La configuration de token ring est identique  celle de l'Ethernet 
  l'exception du nom de priphrique rseau  configurer.






  88..1144..  XX..2255

  X.25 est un protocole de circuit bas sur la commutation de paquets
  dfini par le C.C.I.T.T. (un groupe de normalisation reconnu par les
  compagnies de tlcommunications dans la plupart du monde). Une
  implmentation de X.25 et LAPB est en cours dans les noyaux rcents
  2.1.*.

  Jonathon Naylor jsn@cs.nott.ac.uk dirige le dveloppement et une liste
  de diffusion a t cre pour discuter des affaires relatives  X.25
  pour Linux. Pour y souscrire, envoyez un message  :
  majordomo@vger.rutgers.edu avec le texte "subscribe linux-x25" dans le
  corps du message.

  Les dernires versions des outils de configuration peuvent tre
  obtenues sur le site ftp de Jonathon  ftp.cs.nott.ac.uk.



  88..1155..  CCaarrttee WWaavveeLLaann

  Les noms de priphriques Wavelan sont `eth0', `eth1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
               [*] Network device support
               ....
               [*] Radio network interfaces
               ....
               <*> WaveLAN support




  La carte WaveLAN est une carte LAN sans-fil  large bande. Elle
  ressemble beaucoup en pratique  une carte Ethernet et se configure
  presque de la mme manire.

  Vous pouvez avoir des informations sur la carte Wavelan sur
  Wavelan.com.



  99..  CCbblleess eett ccbbllaaggeess

  Ceux qui sont habiles du fer  souder peuvent vouloir fabriquer leurs
  propres cbles pour relier deux machines Linux. Les schmas de cblage
  suivants pourront les y aider.


  99..11..  CCbbllee ssrriiee NNUULLLL MMooddeemm

  Tous les cbles NULL modem ne se ressemblent pas. Beaucoup ne font que
  faire croire  votre ordinateur que tous les signaux appropris sont
  prsents et changent les donnes de transmission et de rception.
  C'est bien, mais cela signifie que vous devez utiliser le contrle de
  flux logiciel (XON/XOFF) qui est moins efficace que le contrle de
  flux matriel. Le cble suivant donne la meilleure transmission de
  signal entre les deux machines et vous permet d'utiliser le contrle
  de flux matriel (RTS/CTS).




  Pin Name  Pin                               Pin
  Tx Data    2  -----------------------------  3
  Rx Data    3  -----------------------------  2
  RTS        4  -----------------------------  5
  CTS        5  -----------------------------  4
  Ground     7  -----------------------------  7
  DTR        20 -\---------------------------  8
  DSR        6  -/
  RLSD/DCD   8  ---------------------------/-  20
                                           \-  6





  99..22..  CCbbllee ppoorrtt ppaarraallllllee ((ccbbllee PPLLIIPP))

  Si vous avez l'intention d'utiliser le protocole PLIP entre deux
  machines alors ce cble vous conviendra indpendamment du type de port
  parallle install.


       Pin Name    pin            pin
       STROBE      1*
       D0->ERROR   2  ----------- 15
       D1->SLCT    3  ----------- 13
       D2->PAPOUT  4  ----------- 12
       D3->ACK     5  ----------- 10
       D4->BUSY    6  ----------- 11
       D5          7*
       D6          8*
       D7          9*
       ACK->D3     10 ----------- 5
       BUSY->D4    11 ----------- 6
       PAPOUT->D2  12 ----------- 4
       SLCT->D1    13 ----------- 3
       FEED        14*
       ERROR->D0   15 ----------- 2
       INIT        16*
       SLCTIN      17*
       GROUND      25 ----------- 25




  Notes :

    Ne pas connecter les broches marques avec un astrisque `*'.

    Les masses supplmentaires sont 18,19,20,21,22,23 et 24.

    Si le cble que vous utilisez possde un blindage, il doit tre
     connect  une des prises DB-25 et uunnee sseeuullee.

     AAtttteennttiioonn :: uunn ccbbllee PPLLIIPP mmaall bbrraanncchh ppeeuutt ddttrruuiirree vvoottrree ccaarrttee
     ccoonnttrrlleeuurr. Soyez attentifs et vrifiez chaque connexion deux fois
     pour tre sr de ne pas vous crer de travail inutile ou de gros
     ennuis.  Bien que l'on puisse utiliser des cbles PLIP sur des
     longues distances, vitez-le si possible. Les spcifications du
     cble permettent d'avoir une longueur d'environ 1 mtre. Faites
     attention si vous utilisez de grandes longueurs, car les sources de
     champs magntiques levs comme la foudre, les lignes de puissance
     et les metteurs radio peuvent interfrer et parfois endommager
     votre carte contrleur. Si vous voulez vraiment connecter deux de
     vos ordinateurs sur une grande distance, utilisez plutt des cartes
     Ethernet et un cble coaxial.
  99..33..  CCbbllaaggee EEtthheerrnneett 1100bbaassee22 ((ccooaaxxiiaall ffiinn))

  10base2 est un standard de cblage Ethernet spcifiant l'utilisation
  d'un cble coaxial 52 ohms avec un diamtre d'environ 5 mm. Il faut se
  souvenir d'un nombre important de rgles quand on relie deux machines
  avec un cblage 10base2.  La premire est que vous devez utiliser des
  terminaisons  cchhaaqquuee eexxttrrmmiitt du cble. Un terminateur est une
  rsistance de 52 ohms qui sert  s'assurer que le signal est absorb
  et non rflchi  l'extrmit du cble. Sans terminaison  chaque
  extrmit vous pourriez trouver que l'Ethernet n'est pas fiable ou ne
  marche pas du tout. Normalement vous utilisez des `T' pour
  interconnecter les machines, en sorte que vous finirez par avoir
  quelque chose qui ressemble  ceci :


        |==========T=============T=============T==========T==========|
                   |             |             |          |
                   |             |             |          |
                 -----         -----         -----      -----
                 |   |         |   |         |   |      |   |
                 -----         -----         -----      -----




  Les `|'  chaque extrmit reprsentent une terminaison, les `======'
  reprsentent une longueur de cble coaxial avec des prises BNC en bout
  et les `T' reprsentent un connecteur en `T'. Gardez la longueur de
  cble entre les connecteurs en `T' et les cartes Ethernet aussi courte
  que possible, l'idal tant que ces connecteurs soient branchs
  directement sur la carte Ethernet.



  99..44..  CCbbllaaggee EEtthheerrnneett  ppaaiirreess ttoorrssaaddeess

  Si vous n'avez que deux cartes Ethernet avec paires torsades et que
  vous voulez les relier, vous n'avez pas besoin de rpartiteur.  Vous
  pouvez cbler les deux cartes directement ensemble.  Un schma
  montrant comment faire est inclus dans le document Ethernet-HOWTO



  1100..  GGlloossssaaiirree ddeess tteerrmmeess uuttiilliissss ddaannss ccee ddooccuummeenntt..

  Ci-dessous une liste des termes les plus importants utiliss dans ce
  document.

     AARRPP
        C'est l'acronyme de _A_d_d_r_e_s_s _R_e_s_o_l_u_t_i_o_n _P_r_o_t_o_c_o_l (protocole de
        rsolution d'adresses), permettant  une machine du rseau
        d'associer une adresse IP  une adresse matrielle.

     AATTMM
        C'est l'acronyme de _A_s_y_n_c_h_r_o_n_o_u_s _T_r_a_n_s_f_e_r _M_o_d_e (mode de
        transfert asynchrone). Un rseau ATM enveloppe les donnes en
        blocs de taille standard pour pouvoir les convoyer efficacement
        d'un point  un autre. ATM est une technologie rseau 
        commutation de paquets.

     cclliieenntt
        C'est habituellement le morceau de logiciel d'un systme du ct
        o se trouve l'utilisateur.  Il y a des exceptions, par exemple,
        dans le systme de fentres X11 c'est en fait le serveur qui est
        avec l'utilisateur et le client qui est sur la machine distante.
        Le client est le programme ou l'extrmit d'un systme qui
        utilise le service fourni par un serveur. Dans le cas de
        systmes _d_'__g_a_l _ __g_a_l tels que _s_l_i_p ou _p_p_p le client se trouve
         l'extrmit qui a initialis la connexion, l'autre extrmit,
        tant considre comme le serveur.

     ddaattaaggrraammmmee
        Un datagramme est un paquet discret de donnes qui contient les
        adresses, et qui est l'unit de base de transmission sur un
        rseau IP. On peut aussi l'appeler `paquet'.

     DDLLCCII
        DLCI veut dire `Data Link Connection Identifier'(identifieur de
        connexion de liaison de donnes), et est utilis pour identifier
        une liaison virtuelle unique point  point via un rseau 
        relais de trames (Frame Relay). Les DLCI sont normalement
        assigns par le fournisseur de rseau  relais de trames.

     RReellaaiiss ddee ttrraammeess
        Frame Relay (Relais de trames) est une technologie rseau idale
        lorsque l'on a un trafic de nature cahotique ou sporadique. Les
        cots peuvent tre rduits quand on a de nombreux clients
        partageant la mme capacit rseau et on compte sur le fait que
        les clients utilisent le rseau  des instants diifrents.

     AAddrreessssee mmaattrriieellllee
        C'est un nombre qui identifie de manire unique un hte sur un
        rseau physique au niveau de la couche accs. Par exemple :
        _A_d_r_e_s_s_e_s _E_t_h_e_r_n_e_t et _A_d_r_e_s_s_e_s _A_X_._2_5.

     IISSDDNN
        C'est l'acronyme de _I_n_t_e_g_r_a_t_e_d _S_e_r_v_i_c_e_s _D_i_g_i_t_a_l _N_e_t_w_o_r_k(Rseau
        Numrique  Intgration de Services=RNIS). Il fournit des moyens
        standardiss avec lesquels les compagnies de tlcommunications
        peuvent dlivrer soit de la voix soit des informations vers des
        clients.  Techniquement c'est un rseau de donnes  commutation
        de paquets.

     IISSPP
        C'est l'acronyme de `Internet Service Provider' (fournisseur
        d'accs  l'Internet=FAI). Ce sont des organisations ou des
        socits qui fournissent une connexion rseau  l'Internet au
        public.

     AAddrreessssee IIPP
        C'est un nombre qui identifie de manire unique un hte TCP/IP
        sur le rseau. Cette adresse est code sur 4 octets et se
        prsente habituellement sous la forme appele "notation dcimale
        pointe", o chaque octet est sous forme dcimale, avec un point
        `.' entre chaque.

     MMSSSS
        Le Maximum Segment Size (_M_S_S) (Taille Maximum de Segment) est la
        plus grande quantit de donnes qui peut tre transmise en une
        seule fois. Si vous voulez viter des fragmentations MSS doit
        tre gal  l'en-tte MTU-IP.

     MMTTUU
        Le Maximum Transmission Unit (_M_T_U) (taille maximum de l'unit de
        transfert) est un paramtre qui dtermine le plus long
        datagramme pouvant tre transmis par une interface IP sans avoir
        besoin d'tre fragment en units plus petites.  Le MTU doit
        tre plus grand que le datagramme le plus grand que vous voulez
        transmettre sans tre fragment. Note : ceci protge de la
        fragmentation uniquement de manire locale, d'autres liens sur
        le chemin peuvent avoir un MTU plus petit et les datagrammes
        seront fragments  cet endroit. Les valeurs typiques sont de
        1500 octets pour une interface Ethernet, ou de 576 octets pour
        une interface SLIP.

     rroouuttee
        La _r_o_u_t_e est le chemin que les datagrammes suivent  travers le
        rseau pour atteindre leur destination.

     sseerrvveeuurr
        C'est habituellement le morceau de logiciel ou l'extrmit d'un
        systme loign de l'utilisateur. Le serveur fournit un service
        vers un ou plusieurs clients.  Des exemples de serveurs sont
        _f_t_p, _N_e_t_w_o_r_k_e_d _F_i_l_e _S_y_s_t_e_m (NFS), ou _D_o_m_a_i_n _N_a_m_e _S_e_r_v_e_r (DNS).
        Dans le cas de systmes __g_a_l _ __g_a_l comme _S_L_I_P ou _P_P_P le serveur
        est considr comme tant l'extrmit de la liaison qui est
        appele et l'extrmit appeleante est le client.

     ffeennttrree
        La _f_e_n__t_r_e (window) est la plus grande quantit de donnes que
        l'extrmit rceptrice peut accepter  un certain moment.



  1111..  LLiinnuuxx ppoouurr uunn ffoouurrnniisssseeuurr dd''aaccccss  ll''IInntteerrnneett ??

  Si vous tes intresss par l'utilisation de Linux  des fins de
  fourniture d'accs Internet, je vous recommande de consulter la page
  ISP Linux pour une bonne liste de pointeurs vers les informations dont
  vous pourriez avoir besoin.



  1122..  RReemmeerrcciieemmeennttss

  Je voudrais remercier les personnes suivantes pour leur contribution 
  ce document (sans ordre particulier) : Terry Dawson, Axel Boldt, Arnt
  Gulbrandsen, Gary Allpike, Cees de Groot, Alan Cox, Jonathon Naylor,
  Claes Ensson, Ron Nessim, John Minack, Jean-Pierre Cocatrix, Erez
  Strauss.



  1133..  CCooppyyrriigghhtt..


  _I_n_f_o_r_m_a_t_i_o_n_s _d_e _c_o_p_y_r_i_g_h_t


  Le document NET-3-HOWTO donne des informations concernant
  l'installation et la configuration du support rseau pour Linux.
  Copyright (c) 1997 Terry Dawson, 1998 Alessandro Rubini, 1999 {POET} -
  LinuxPorts


  Celui-ci est libre ; vous pouvez le redistribuer et/ou le modifier
  selon les termes de la GNU General Public License telle que publie
  par la Free Software Foundation ; soit avec la version 2 de la
  license, soit ( votre guise) avec une version ultrieure.

  Ce document est distribu avec l'espoir qu'il sera utile, mais SANS
  AUCUNE GARANTIE ; ni mme la garantie implicite de COMMERCIALISATION
  ou D'ADAPTATION DANS UN BUT PARTICULIER. Voir la GNU General Public
  License pour plus de dtails.

  Vous devriez recevoir une copie de la GNU General Public License avec
  ce document ; si ce n'est pas le cas, crivez  :

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.

  1144..  NNoottee dduu ttrraadduucctteeuurr

  Voir les autres HOWTO traduits en franais.  Lire galement le livre
  Administration rseau sous Linux, ditions O'Reilly.  Enfin voyez le
  site www.linux-france.com o vous trouverez de trs bons articles
  dcrivant en dtail diffrents points voqus dans ce document.

























































  Linux NFS HOWTO
  Nicolai Langfeldt janl@linpro.no
  v1.0, 1er octobre 1999

  (30 novembre 1999. Adaptation franaise par Christophe Deleuze,
  Christophe.Deleuze@lip6.fr).  HOWTO dcrivant l'installation de
  serveurs et clients NFS.
  ______________________________________________________________________

  Table des matires
























































  1. Prambule

     1.1 Blabla lgal
     1.2 Dngation
     1.3 Retour
     1.4 Autre blabla

  2. LISEZMOI.d_abord

  3. Installer un serveur NFS

     3.1 Conditions pralables
     3.2 Premiers pas
     3.3 Le portmapper
     3.4 Mountd et nfsd

  4. Installer un client NFS

     4.1 Options de montage
     4.2 Optimisation de NFS

  5. NFS sur les lignes  faible dbit

  6. NFS et la scurit

     6.1 Scurit du client
     6.2 Scurit du serveur : nfsd
     6.3 Scurit du serveur : le portmapper
     6.4 NFS et les coupent-feu (firewalls)
     6.5 Rsum

  7. ``Checklist'' mount

  8. FAQ

  9. Exporter un systme de fichiers

     9.1 IRIX, HP-UX, Digital-UNIX, Ultrix, SunOS 4 (Solaris 1), AIX
     9.2 Solaris 2

  10. NFS sous Linux 2.2

     10.1 Le client
     10.2 Le serveur

  11. Serveur NFS sur une disquette

     11.1 Introduction
     11.2 Attentes
     11.3 Matriel ncessaire
     11.4 Configuration du serveur
        11.4.1 Dmarrer le serveur NFS temporaire
        11.4.2 Monter la disquette et le cdrom
        11.4.3 Configurer le rseau sur le serveur provisoire
        11.4.4 Configurer le volume NFS
     11.5 Lancer le serveur NFS
        11.5.1 Prt, commencez l'installation
     11.6 Problmes
        11.6.1 Rien ici pour l'instant
     11.7  faire
        11.7.1 Disquette DOS
        11.7.2 Commandes RPC

  12. PC-NFS


  ______________________________________________________________________

  11..  PPrraammbbuullee

  11..11..  BBllaabbllaa llggaall

  (C)opyright 1997-1999 Nicolai Langfeldt et Ron Peters. Si vous
  modifiez ce document signalez le dans le copyright, sa distribution
  est libre  condition de conserver ce paragraphe. La section FAQ est
  base sur la FAQ NFS compile par Alan Cox. La section _C_h_e_c_k_l_i_s_t est
  base sur une _c_h_e_c_k_l_i_s_t des problmes de mount compile par IBM
  Corporation. La section ``NFS serveur sur disquette'' a t crite par
  Ron Peters.

  (C)opyright 1997-1999 Christophe Deleuze pour la version franaise. Si
  vous lisez ce document sous le pont de l'Alma, veillez  respecter les
  limitations de vitesse.


  11..22..  DDnnggaattiioonn

  Ni Nicolai Langfeldt, ni Ron Peters ni leurs employeurs, ni qui que ce
  soit, n'assume de responsabilit pour les consquences que les
  instructions de ce document peuvent avoir. Si vous choisissez de
  suivre ces instructions, bonne chance !



  11..33..  RReettoouurr

  Ce document ne sera jamais termin, merci de m'envoyer par mail vos
  problmes et russites, cela pourra amliorer ce HOWTO. Envoyez
  argent, commentaires et questions  janl@math.uio.no, ou
  rpeters@hevanet.com pour ce qui concerne les serveurs NFS sur
  disquette. Si vous m'envoyez un mail, par piti, _v__r_i_f_i_e_z que
  l'adresse de retour soit correcte et fonctionne. Vous ne vous imaginez
  pas combien de mes rponses sont revenues  cause d'une adresse
  incorrecte.


  11..44..  AAuuttrree bbllaabbllaa

  Si vous voulez traduire ce HOWTO merci de me le signaler, que je
  puisse savoir en quels langages j'ai t publi :-). [Ndt : c'est
  fait...]

  Remerciements  Olaf Kirch pour m'avoir convaincu d'crire ceci, puis
  fourni de bonnes suggestions.

  Les commentaires sur la traduction sont  envoyer  Christophe
  Deleuze, Christophe.Deleuze@lip6.fr.



  22..  LLIISSEEZZMMOOII..dd__aabboorrdd

  NFS, le systme de fichiers par rseau, a trois caractristiques
  importantes :


    il permet le partage de fichiers sur un rseau ;

    il marche suffisamment bien ;

    il cre tout un tas de problmes de scurit bien connus des
     crackers qui peuvent facilement les exploiter pour obtenir l'accs
     (lecture, criture et effacement)  tous vos fichiers.


  Je parlerai de ces deux aspects dans ce HOWTO. Lisez bien la section
  scurit et vous supprimerez quelques risques stupides. Ne dites pas
  que je ne vous ai pas prvenus. Les passages sur la scurit sont
  parfois assez techniques et demandent quelques connaissances en rseau
  IP. Si vous ne connaissez pas les termes utiliss vous pouvez soit
  consulter le HOWTO rseau, improviser ou vous procurer un livre sur
  l'administration de rseau TCP/IP pour vous familiariser avec TCP/IP.
  C'est une bonne ide de toutes faons si vous administrez des machines
  UNIX/Linux. Un trs bon livre sur le sujet est _T_C_P_/_I_P _N_e_t_w_o_r_k
  _A_d_m_i_n_i_s_t_r_a_t_i_o_n par Craig Hunt, publi par O'Reilly & Associates, Inc.
  Et quand vous l'aurez lu et compris, vous vaudrez plus cher sur le
  march du travail, vous ne pouvez qu'y gagner :-)


  Il y a deux sections pour vous aider  rgler vos problmes NFS, la
  _M_o_u_n_t _C_h_e_c_k_l_i_s_t et les _F_A_Q_s. Jetez-y un oeil si quelque chose ne
  marche pas comme prvu.


  Si vous voulez/avez besoin de le rcuprer et compiler vous mme, le
  site de rfrence pour le nfsd Linux 2.0 est ftp.mathematik.th-
  darmstadt.de:/pub/linux/okir.


   propos de NFS sous Linux 2.2 voir ``la section sur Linux 2.2''.



  33..  IInnssttaalllleerr uunn sseerrvveeuurr NNFFSS

  33..11..  CCoonnddiittiioonnss pprraallaabblleess

  Avant de continuer  lire ce HOWTO, vous aurez besoin de pouvoir faire
  des telnet dans les deux sens entre les machines que vous utiliserez
  comme serveur et client. Si cela ne fonctionne pas, voyez le HOWTO
  rseau (NET-3) et configurez correctement le rseau.


  33..22..  PPrreemmiieerrss ppaass

  Avant de faire quoi que ce soit d'autre, il nous faut un serveur NFS
  install. Si vous faites partie d'un dpartement rseau d'une
  universit ou autre, il y a probablement un grand nombre de serveurs
  NFS qui tournent dj. Si votre but est d'utiliser un serveur dj
  install alors vous pouvez sauter  ``la section sur l'installation
  d'un client NFS''.

  Si vous devez installer un serveur sur une machine non Linux vous
  devrez lire les pages de manuel du systme pour trouver comment
  configurer le serveur NFS et l'exportation des systmes de fichiers
  par NFS. Ce HOWTO contient une section dcrivant les manipulations
  ncessaires sur divers systmes. Ceci fait, vous pourrez passer  la
  section suivante. Ou continuer  lire cette section vu que certaines
  des choses que je vais dire sont pertinentes quel que soit le type de
  machine que vous utilisez comme serveur.

  Si vous utilisez Linux 2.2, voyez ``la section sur Linux 2.2'' avant
  de passer  la suite.

  Nous allons maintenant configurer tout un tas de programmes.



  33..33..  LLee ppoorrttmmaappppeerr

  Le portmapper de Linux est appel soit portmap soit rpc.portmap. La
  page de manuel sur mon systme dit que c'est un convertisseur de port
  DARPA vers numro de programme RPC. C'est l que se trouve la premire
  faille de scurit. La gestion de ce problme est dcrite  la section
  ``sur la scurit'', que, encore une fois, je vous invite trs
  fortement  lire.

  Lancez le portmapper. Il devrait tre dans le rpertoire /usr/sbin
  (sur quelques machines il est appel rpcbind). Vous pouvez le lancer 
  la main pour cette fois mais il devra tre lanc  chaque dmarrage de
  la machine, il faudra donc crer ou diter les scripts rc. Les scripts
  rc sont dcrits dans la page de manuel init, ils sont gnralement
  dans /etc/rc.d, /etc/init.d ou /etc/rc.d/init.d. S'il y a un script
  qui a un nom du genre inet, c'est probablement le script  diter.
  Mais ce qu'il faut crire ou faire sort du cadre de ce HOWTO. Lancez
  portmap, et vrifiez qu'il tourne avec ps -aux, puis rpcinfo -p. Il y
  est ? Benissimo.



  Encore une chose. L'accs distant  votre portmapper est contrl par
  le contenu de vos fichiers /etc/hosts.allow et /etc/hosts.deny. Si
  rcpinfo -p choue alors que le portmapper tourne, vrifiez ces
  fichiers. Voyez la section ``sur la scurit'' pour les dtails
  concernant ces fichiers.


  33..44..  MMoouunnttdd eett nnffssdd

  Les prochains programmes  lancer sont mountd et nfsd. Mais d'abord il
  faut diter un autre fichier, /etc/exports. Disons que je veux que le
  systme de fichiers /mn/eris/local qui est sur la machine eris soit
  disponible sur la machine apollon. Je l'indique dans /etc/exports sur
  eris :


  ______________________________________________________________________
  /mn/eris/local  apollon(rw)
  ______________________________________________________________________



  La ligne ci-dessus donne  apollon un accs en lecture/criture sur
  /mn/eris/local. Au lieu de rw on pourrait mettre ro pour _r_e_a_d _o_n_l_y
  (lecture seule, c'est la valeur par dfaut). D'autres options
  existent, et je parlerai de quelques unes lies  la scurit plus
  loin. Elles sont toutes dcrites dans la page de manuel exports qu'il
  faut lire au moins une fois dans sa vie. Il y a de meilleures faons
  de faire que de lister tous les hosts dans le fichier exports. Peuvent
  tre autoriss  monter un systme de fichiers NFS, des groupes
  rseaux (_n_e_t _g_r_o_u_p_s) si vous utilisez NIS (ou NYS, auparavant connu
  sous le nom YP), des noms de domaines avec jokers et des sous rseaux
  IP. Mais il faudra vrifier qui peut obtenir un accs au serveur avec
  ce type d'autorisations groupes.


  Note : ce fichier exports n'utilise pas la mme syntaxe que d'autres
  Unix. Ce HOWTO contient une section sur la faon dont les autres Unix
  exportent leurs fichiers.

  Maintenant nous sommes prts  lancer mountd (ou peut-tre s'appelle-
  t-il rpc.mountd), puis nfsd (qui s'appelle peut-tre rpc.nfsd). Ils
  liront tous deux le fichier exports.

  Si vous modifiez /etc/exports, vous devrez vous assurer que nfsd et
  mountd savent que le fichier a chang. La faon traditionnelle est de
  lancer exportfs. Beaucoup de distributions Linux n'ont pas le
  programme exportfs. Si c'est le cas sur votre machine, vous pouvez
  installer ce script :


  ______________________________________________________________________
  #!/bin/sh
  killall -HUP /usr/sbin/rpc.mountd
  killall -HUP /usr/sbin/rpc.nfsd
  echo Volumes NFS rexports
  ______________________________________________________________________



  Sauvez le dans /usr/sbin/exportfs par exemple, et n'oubliez pas de lui
  appliquer chmod a+rx. Dsormais, chaque fois que vous changez votre
  fichier exports, lancez ensuite exportfs en root.

  Maintenant, vrifiez que mountd et nfsd fonctionnent correctement.
  D'abord avec rpcinfo -p. Il devrait donner quelque chose du genre :


  ______________________________________________________________________
     program vers proto   port
      100000    2   tcp    111  portmapper
      100000    2   udp    111  portmapper
      100005    1   udp    745  mountd
      100005    1   tcp    747  mountd
      100003    2   udp   2049  nfs
      100003    2   tcp   2049  nfs
  ______________________________________________________________________



  On voit que le portmapper a annonc ses services, de mme que mountd
  et nfsd.

  Si vous obtenez : rpcinfo: can't contact portmapper: RPC: Remote
  system error - Connection refused, RPC_PROG_NOT_REGISTERED ou quelque
  chose du style c'est que le portmapper ne tourne pas. OU, vous avez
  quelques chose dans /etc/hosts.{allow,deny} qui interdit au portmapper
  de rpondre, voyez ``la section scurit''  ce propos. Si vous
  obtenez No remote programs registered alors soit le portmapper ne veut
  pas vous parler, soit quelque chose ne marche pas. Tuez nfsd, mountd
  et le portmapper et essayez de recommencer.

  Aprs avoir vrifi que le portmapper rend compte des services vous
  pouvez vrifier aussi avec ps. Le portmapper continuera  afficher les
  services mme si les programmes qui les offrent ont crash. Il vaut
  donc mieux vrifier par ps si quelque chose ne marche pas.

  Bien sur, vous devrez modifier vos fichiers systmes rc pour lancer
  mountd et nfsd au dmarrage de la mme faon que le portmapper. Il y a
  de trs fortes chances que les scripts existent dj sur votre
  machine, vous aurez juste  dcommenter les bonnes lignes ou les
  activer pour les bons _r_u_n_l_e_v_e_l_s (pardon niveaux d'excution) d'init.

  Quelques pages de manuel avec lesquelles vous devriez tre familier :
  portmap, mountd, nfsd et exports.

  Bon, si vous avez tout fait exactement comme j'ai dit vous tes prts
   enchaner sur le client NFS.


  44..  IInnssttaalllleerr uunn cclliieenntt NNFFSS

  Tout d'abord il faudra compiler un noyau avec le systme de fichiers
  NFS, soit compil dans le noyau, soit disponible sous forme de module.
  Si vous n'avez encore jamais compil un noyau vous aurez peut tre
  besoin de consulter le HOWTO du noyau. Si vous utilisez une
  distribution trs cool (comme Chapeau Rouge) et que vous n'avez jamais
  trifouill le noyau (pas toucher toucher) il y a des chances que NFS
  soit automagiquement disponible.

  Vous pouvez maintenant,  l'invite (prompt) du root, entrer la
  commande mount approprie et le systme de fichiers apparatra.
  Continuons avec l'exemple de la section prcdente, nous voulons
  monter /mn/eris/local depuis eris. La commande est :


  ______________________________________________________________________
  mount -o rsize=1024, wsize=1024 eris:/mn/eris/local /mnt
  ______________________________________________________________________



  Nous reviendrons plus tard sur les options rsize et wsize. Le systme
  de fichiers est maintenant disponible sous /mnt et vous pouvez faire
  un cd sur lui, puis un ls et regarder les fichiers individuellement.
  Vous remarquerez que ce n'est pas aussi rapide qu'avec un systme de
  fichiers local, mais beaucoup plus pratique que ftp. Si, au lieu de
  monter le systme de fichiers, mount renvoie un message d'erreur comme
  mount: eris:/mn/eris/local failed, reason given by server: Permission
  denied alors le fichier exports est incorrect, ou vous avez oubli de
  lancer exportfs aprs avoir modifi le fichier exports. S'il dit
  mount: clntudp_ipdate: RPC: Program not registered cela signifie que
  nfsd ou mountd ne tourne pas sur le serveur, ou que vous avez le
  problme avec les fichiers hosts.{allow,deny} mentionn plus haut.

  Pour vous dbarrasser du systme de fichiers, vous pouvez faire :


  ______________________________________________________________________
  umount /mnt
  ______________________________________________________________________



  Pour que le systme monte automatiquement un systme de fichiers NFS
  au dmarrage, ditez /etc/fstab de la faon habituelle. Par exemple
  avec une ligne comme celle-ci :


  ______________________________________________________________________
  # device       mountpoint    fs-type    options           dumps  sfckorder
  ...
  eris:/mn/eris/local   /mnt   nfs     rsize=1024,wsize=1024   0   0
  ...
  ______________________________________________________________________



  C'est presque tout ce qu'il y a  savoir. Vous pouvez jeter un coup
  d'oeil  la page de manuel nfs. Continuons plize.






  44..11..  OOppttiioonnss ddee mmoonnttaaggee

  Il y a trois comportements principaux des clients NFS en cas de chute
  du serveur qui sont spcifis par les options de montage :


     ssoofftt
        Le client NFS renverra une erreur au processus concern si aprs
        quelques essais le serveur NFS persiste  ne pas rpondre. Si
        vous voulez utiliser cette option, vous devez vrifier que votre
        logiciel la gre correctement. Je ne recommande pas ce rglage,
        c'est un bon moyen de perdre des donnes et corrompre des
        fichiers. En particulier, n'utilisez pas a pour les disques o
        sont stocks vos mails (si vous tenez  vos mails).


     hhaarrdd
        Le client NFS ressaiera infiniment jusqu' ce qu'il soit tu.
        Les oprations reprendront normalement si le serveur NFS se
        rtablit ou redmarre. Le client ne pourra pas tre interrompu
        ou tu.


     hhaarrdd,,iinnttrr
        Comme hard, mais Ctrl-C tuera le processus bloqu. Dans quelques
        cas, notament un disque /usr/spool/mail mont par NFS cela ne
        changera rien car le shell ignore le Ctrl-C quand il teste si
        vous avez du mail. Je recommande cette option pour ttoouuss les
        systmes de fichiers NFS, y compris le _s_p_o_o_l du mail.



  Reprenons l'exemple prcdent, votre entre fstab est maintenant :


  ______________________________________________________________________
  # device       mountpoint   fs-type    options            dumps  sfckorder
  ...
  eris:/mn/eris/local   /mnt  nfs   rsize=1024,wsize=1024,hard,intr 0   0
  ...
  ______________________________________________________________________





  44..22..  OOppttiimmiissaattiioonn ddee NNFFSS

  Normalement, si les options rsize et wsize ne sont pas prcises, NFS
  crira et lira par blocs de 4096 ou 8192 octets. Mais certaines
  combinaisons de noyau Linux et cartes rseau ne peuvent pas
  fonctionner avec ces valeurs, de plus, mme si cela marche, cela peut
  ne pas tre optimal du tout. Il nous faudra donc exprimenter et
  trouver les valeurs de rsize et wsize qui fonctionnent et donnent les
  transferts les plus rapides. Vous pouvez tester la vitesse obtenue
  avec diffrentes valeurs des options avec des commandes simples. La
  commande mount ci-dessus ayant t excute, si vous avez l'accs en
  criture sur le disque vous pouvez tester les performances en criture
  squentielle :


  ______________________________________________________________________
  time dd if=/dev/zero of=/mnt/testfile bs=16k count=4096
  ______________________________________________________________________


  Ceci cre un fichier de 64 Mo ne contenant que des 0. Faites le
  quelques (5-10?) fois et prenez la moyenne des temps. C'est le temps
  `elapsed' ou `wall clock' qui est le plus intressant. Ensuite vous
  pouvez tester les performances en lecture en relisant le fichier :


  ______________________________________________________________________
  time dd if=/mnt/testfile of=/dev/null bs=16k
  ______________________________________________________________________



  faites le quelques fois et prenez la moyenne. Puis dmontez (umount)
  et remontez (mount) avec des valeurs plus grandes pour rsize et wsize.
  Il vaut mieux prendre des multiples de 1024, et probablement pas plus
  grand que 16384 octets, car les gros blocs ralentissent les accs
  alatoires. Immdiatement aprs avoir remount avec une taille
  suprieure, placez vous (cd) dans le systme de fichiers et faites des
  trucs comme ls, explorez un peu pour vrifier que tout est bien
  normal. Si la valeur de rsize/wsize est trop grande, les symptmes
  sont _v_r_a_i_m_e_n_t bizarres et pas vidents. Un symptme typique est une
  liste de fichiers donne par ls incomplte sans aucun message
  d'erreur. Ou la lecture de fichier qui choue mystrieusement et sans
  message d'erreur. Aprs vous tre assurs que les wsize/rsize choisis
  fonctionnent, vous pouvez faire les tests de rapidit. Diffrentes
  plateformes de serveur auront peut-tre des tailles optimales
  diffrentes. SunOS et Solaris sont rputs pour tre beaucoup plus
  rapides avec une taille de 4096 octets.


  Les noyaux Linux rcents (depuis 1.3) font parfois des lectures
  anticipes (_r_e_a_d _a_h_e_a_d) pour des rsizes suprieurs ou gaux  la
  taille de page de la machine. Sur les processeurs Untel la taille de
  la page est de 4096 octets. La lecture anticipe augmentera
  _s_e_n_s_i_b_l_e_m_e_n_t les performances en lecture. Sur une machine Untel on
  devrait donc choisir un rsize de 4096 si c'est possible.


  Un truc pour augmenter les performances d'criture de NFS est
  d'invalider les critures synchrones sur le serveur. Les
  spcifications de NFS disent que les requtes d'criture de NFS ne
  doivent pas tre considres comme termines avant que les donnes ne
  soient sur un mdium non versatile (normalement le disque). Ceci
  rduit les performances  l'criture, les critures asynchrones sont
  plus rapides. Le nfsd Linux ne fait pas d'critures synchrones car
  l'implmentation du systme de fichiers ne s'y prte pas, mais sur les
  serveurs non Linux vous pouvez augmenter les performances de cette
  faon dans votre fichier exports :


  ______________________________________________________________________
  /dir    -async, access=linuxbox
  ______________________________________________________________________




  ou quelque chose du genre. Rfrez vous  la page de manuel exports de
  la machine concerne. Notez que ceci augmente les risques de perte de
  donnes.






  55..  NNFFSS ssuurr lleess lliiggnneess  ffaaiibbllee ddbbiitt

  Les lignes lentes ( faible dbit) comprennent les modems, RNIS et
  aussi sans doute les autres connexions longue distance.


  Cette section est base sur la connaissance des protocoles utiliss
  mais pas sur des exprimentations. Faites moi savoir si vous essayez
  ceci ;-)


  La premire chose  retenir est que NFS est un protocole lent. Il a un
  grand _o_v_e_r_h_e_a_d (sur-cot en bande passante). Utiliser NFS, c'est
  presque comme utiliser kermit pour transfrer des fichiers. Il est
  _l_e_n_t. Presque tout est plus rapide que NFS. FTP est plus rapide. HTTP
  est plus rapide. rcp est plus rapide. ssh est plus rapide.


  Vous voulez toujours l'essayer ? Ok.


  Par dfaut NFS est paramtr pour des lignes rapides et  faible
  latence. Si vous utilisez les paramtres par dfaut sur des lignes 
  grande latence cela peut provoquer des erreurs, des annulations, des
  rtrcissements de fichiers, et des comportements bizarres.


  La premire chose  faire est de ne _p_a_s utiliser l'option de montage
  soft. Les temporisations retourneront des erreurs au logiciel, qui,
  dans l'immense majorit des cas, ne saura pas quoi en faire. C'est une
  bonne faon d'avoir des problmes bizarres. Utilisez plutt l'option
  de montage hard. Quand hard est actif les temporisations dclenchent
  des essais infinis au lieu d'annuler ce que le logiciel tait en train
  de faire (quoi que ce soit). C'est ce que vous voulez. Vraiment.


  La deuxime chose  faire est d'ajuster les options de montage timeo
  et retrans. Elles sont dcrites dans la page de manuel nfs(5), en
  voici un extrait (version franaise) :



























  ______________________________________________________________________
         timeo=n        La valeur,  en  dixiemes  de  secondes,  du
                        delai   avant  de  declencher  la  premiere
                        retransmission d'une RPC.   La  valeur  par
                        defaut  est 7/10 de seconde. Apres une pre
                        miere expiration, le delai  est  double  et
                        l'on recommence les retransmissions jusqu'a
                        ce que le delai atteigne la valeur maximale
                        de 60 secondes, ou que le nombre maximal de
                        retransmission soit depasse.  Il se produit
                        alors  une  erreur  d'expiration majeure de
                        delai.  Si le systeme est monte  "en  dur",
                        les  retransmissions  reprendront a nouveau
                        indefiniment.

                        On peut ameliorer les performances en  aug
                        mentant  le delai sur un  reseau charge, si
                        le serveur est un  peu  lent,  ou  si  l'on
                        traverse plusieurs routeurs ou passerelles.

         retrans=n      Le  nombre  d'expirations  mineures  et  de
                        retransmissions  qui  doivent  se  produire
                        avant de declencher une expiration majeure.
                        La  valeur  par  defaut  est  3 expirations
                        mineures.  Quand  une  erreur  d'expiration
                        majeure  se  produit,  soit l'operation est
                        abandonnee, soit  un  message  "server  not
                        responding" est affiche sur la console.
  ______________________________________________________________________




  En d'autres mots : si une rponse n'est pas reue avant la
  temporisation de 0,7 seconde (700 ms), le client NFS rptera la
  requte et doublera la temporisation  1,4 seconde. Si la rponse
  n'arrive pas dans les 1,4 seconde, la requte est rpte  nouveau et
  la temporisation est double  2,8 secondes.


  La vitesse de la ligne peut tre mesure avec un ping ayant vos
  valeurs de rsize/wsize comme taille de paquet.


  ______________________________________________________________________
  $ ping -s 8192 lugulbanda
  PING lugulbanda.uio.no (129.240.222.99): 8192 data bytes
  8200 bytes from 129.240.222.99: icmp_seq=0 ttl=64 time=15.2 ms
  8200 bytes from 129.240.222.99: icmp_seq=1 ttl=64 time=15.9 ms
  8200 bytes from 129.240.222.99: icmp_seq=2 ttl=64 time=14.9 ms
  8200 bytes from 129.240.222.99: icmp_seq=3 ttl=64 time=14.9 ms
  8200 bytes from 129.240.222.99: icmp_seq=4 ttl=64 time=15.0 ms

  --- lugulbanda.uio.no ping statistics ---
  5 packets transmitted, 5 packets received, 0% packet loss
  round-trip min/avg/max = 14.9/15.1/15.9 ms
  ______________________________________________________________________




  Le temps indiqu est celui que le paquet du ping a pris pour aller et
  revenir de lugulbanda. 15 ms, c'est assez rapide. Sur une ligne  28
  800 bps vous pouvez vous attendre  une valeur de l'ordre de 4000-5000
  ms, et si la ligne est charge ce temps sera encore plus lev,
  facilement le double. En gnral, la latence augmente avec la taille
  des paquets et la charge de la ligne. Si vous comptez utiliser FTP et
  NFS en mme temps il faudra mesurer les temps du ping pendant un
  transfert FTP et augmenter timeo en accord avec la latence de votre
  ligne.


  66..  NNFFSS eett llaa ssccuurriitt

  Je ne suis en aucun cas un expert en scurit informatique. Mais j'ai
  tran dans le secteur et j'ai un _p_e_t_i_t conseil pour ceux qui se
  proccupent de la scurit. Mais attention. Ce n'est pas absolument
  pas une liste complte des problmes lis  NFS et si vous pensez tre
  en scurit une fois que vous avez lu et mis en pratique tout ceci
  alors j'ai un pilier de pont (presque neuf)  vous vendre.


  Cette section n'a probablement pas d'intrt si vous tes sur un
  rseau _f_e_r_m_ o vous avez confiance en tous les utilisateurs, et que
  personne en qui vous n'avez pas confiance ne peut obtenir un accs sur
  les machines du rseau. I.e., il ne devrait y avoir aucun moyen de se
  connecter  votre rseau depuis l'extrieur et il ne devrait tre
  reli  aucun autre rseau o vous n'avez pas confiance en tous les
  utilisateurs et en sa scurit. Vous pensez que je suis parano ? Pas
  du tout. C'est un conseil de scurit _d_e _b_a_s_e. Et rappelez-vous que
  c'est juste le commencement. Un site _s__r ncessite un administrateur
  consciencieux et bien inform qui sait o trouver l'information sur
  les problmes de scurit existants ou potentiels.


  Un problme de base de NFS est que le client, si on ne lui demande pas
  le contraire, fera confiance au serveur NFS et vice versa. a peut
  tre mauvais. Cela signifie que si le compte root du serveur est cass
  (_b_r_o_k_e_n _i_n_t_o) il peut tre trs facile de casser le compte root du
  client. Et vice versa. Il y a quelques moyens de grer ce problme sur
  lesquels nous reviendrons.


  Les documents consultatifs (_a_d_v_i_s_o_r_i_e_s) du CERT sur NFS sont une bonne
  source d'information, la plupart des problmes (et des solutions)
  voques ci-dessous sont traits dans ces documents. Voyez
  ftp.cert.org:/01-README pour une liste  jour. En voici quelques-uns
  lis  NFS (il n'y a pas  ma connaissance de version franaise) :


  ______________________________________________________________________
  CA-91:21.SunOS.NFS.Jumbo.and.fsirand                            12/06/91
       Vulnerabilities concerning Sun Microsystems, Inc. (Sun) Network
       File System (NFS) and the fsirand program.  These vulnerabilities
       affect SunOS versions 4.1.1, 4.1, and 4.0.3 on all architectures.
       Patches are available for SunOS 4.1.1.  An initial patch for SunOS
       4.1 NFS is also available. Sun will be providing complete patches
       for SunOS 4.1 and SunOS 4.0.3 at a later date.

  CA-94:15.NFS.Vulnerabilities                                    12/19/94
       This advisory describes security measures to guard against several
       vulnerabilities in the Network File System (NFS). The advisory was
       prompted by an increase in root compromises by intruders using tools
       to exploit the vulnerabilities.

  CA-96.08.pcnfsd                                                 04/18/96
       This advisory describes a vulnerability in the pcnfsd program (also
       known as rpc.pcnfsd). A patch is included.
  ______________________________________________________________________



  66..11..  SSccuurriitt dduu cclliieenntt

  Du ct client il y a quelques options de mount qui permettent de ne
  pas faire trop confiance au serveur. L'option nosuid interdit le
  dmarrage de programmes suid depuis le systme de fichiers NFS. C'est
  une option  utiliser systmatiquement, car elle empche le root du
  serveur de crer un fichier suid sur le systme de fichiers NFS, puis
  de se loger dans le client en utilisateur et de lancer le programme
  suid pour devenir root sur le client. Il est aussi possible
  d'interdire l'excution des fichiers du systme de fichiers NFS avec
  l'option noexec. Mais ceci est beaucoup moins utile que nosuid car le
  systme de fichiers contiendra trs probablement au moins _q_u_e_l_q_u_e_s
  scripts ou programmes  excuter. Ces options se rentrent dans la
  colonne d'options, avec wsize et rsize, spares par des virgules.



  66..22..  SSccuurriitt dduu sseerrvveeuurr :: nnffssdd

  Du ct serveur on peut ne pas faire confiance au root du client, avec
  l'option root_squash (rembarrage du root :-) dans le fichier exports :


  ______________________________________________________________________
  /mn/eris/local apollon(rw, root_squash)
  ______________________________________________________________________



  Dans ce cas, si un utilisateur du client avec l'UID 0 essaye d'accder
  (en lecture, criture ou effacement) au systme de fichiers, le
  serveur remplace l'UID par celui de l'utilisateur `nobody' du serveur.
  Ceci signifie que l'utilisateur root du client ne peut
  accder/modifier les fichiers du serveur que seul le root du serveur
  peut accder/modifier. C'est bien, et vous aurez probablement 
  utiliser cette option sur tous les systmes de fichiers que vous
  exportez. J'en entends un qui me dit : ``Mais l'utilisateur root du
  client peut toujours utiliser 'su' pour devenir n'importe qui et
  accder  ses fichiers !'' Et l je rponds : ``Oui, c'est comme a,
  c'est Unix''. Ceci a une consquence importante : tous les fichiers et
  binaires importants devraient appartenir  root, et pas bin ou un
  compte autre que root, car le seul compte auquel le root du client ne
  peut pas accder est le compte root du serveur. Plusieurs autres
  options permettant de ne pas faire confiance  qui ne vous plait pas
  sont numres dans la page de manuel nfsd. Il y a aussi des options
  pour rembarrer (_t_o _s_q_u_a_s_h) des intervalles d'UID ou GID.

  Il est important aussi de s'assurer que nfsd vrifie que toutes les
  requtes viennent d'un port privilgi. S'il accepte les requtes de
  n'importe quel port du client, un utilisateur quelconque peut excuter
  un programme qu'il est facile de se procurer sur l'Internet. Il parle
  le protocole NFS et pourra prtendre tre n'importe qui et tre cru.
  a fait peur hein ? Le nfsd Linux effectue cette vrification par
  dfaut, sur d'autres systmes d'exploitation il faut la valider. a
  devrait tre dcrit dans les pages du manuel de ce systme.


  Autre chose. N'exportez jamais un systme de fichiers vers `localhost'
  ou 127.0.0.1.  Croyez-moi.



  66..33..  SSccuurriitt dduu sseerrvveeuurr :: llee ppoorrttmmaappppeerr

  Le portmapper de base, en combinaison avec nfsd prsente un problme
  de conception qui rend possible de rcuprer les fichiers d'un serveur
  NFS sans avoir aucun privilge. Heureusement le portmapper utilis par
  la plupart des distributions Linux est relativement sr vis  vis de
  cette attaque, et peut tre scuris en configurant les listes d'accs
  au moyen de deux fichiers.


  Toutes les distributions de Linux ne sont pas gales. Certaines
  apparemment  jour n'incluent _p_a_s un portmapper sur, mme aujourd'hui,
  alors que le problme est connu depuis plusieurs annes. Au moins une
  distribution contient mme la page de manuel pour un portmapper sr
  alors que le portmapper effectivement install n'est _p_a_s sr. Pour
  dterminer simplement si votre portmapper est le bon ou pas, lancez
  strings(1) et voyez s'il lit les fichiers appropris /etc/hosts.deny
  et /etc/hosts.allow. Si votre portmapper est /usr/sbin/portmap
  excutez la commande strings /usr/sbin/portmap | grep hosts. Sur ma
  machine cela donne :


  ______________________________________________________________________
  /etc/hosts.allow
  /etc/hosts.deny
  @(#) hosts_ctl.c 1.4 94/12/28 17:42:27
  @(#) hosts_access.c 1.20 96/02/11 17:01:27
  ______________________________________________________________________



  Tout d'abord, ditons /etc/hosts.deny. Il devrait contenir la ligne :


  ______________________________________________________________________
  portmap: ALL
  ______________________________________________________________________



  qui refusera l'accs  _q_u_i_c_o_n_q_u_e. Maintenant qu'il est ferm, lancez
  rpcinfo -p pour vrifier qu'il lit et se conforme au contenu du
  fichier. rpcinfo ne devrait rien renvoyer, ou peut tre un message
  d'erreur. Il ne devrait _p_a_s y avoir besoin de relancer le portmapper.


  Fermer le portmapper  tous le monde est peut tre un peu excessif,
  nous r-ouvrons donc quelque peu l'accs en ditant le fichier
  /etc/hosts.allow. Mais il faut d'abord savoir ce qu'on va y mettre. 
  la base, il devrait contenir les noms de toutes les machines qui
  doivent avoir accs  votre portmapper. Sur le systme Linux moyen  il
  y a trs peu de machines qui ont une bonne raison de demander cet
  accs. Le portmapper administre nfsd, mountd, ypbind/ypserv, pcnfsd et
  les services ``en r'' comme ruptime et rusers. Parmis ceux-ci, seuls
  nfsd, mountd, ypbind/ypserv et peut-tre pcnfsd ont de l'importance.
  Toutes les machines qui ont besoin d'accder  ces services sur votre
  machine devraient y tre autorises. Disons que votre machine est
  129.240.223.254 et que tout ce qui vit sur le sous rseau
  129.240.223.0 doit pouvoir y accder (si ceci n'est pas clair pour
  vous, voyez le HOWTO rseau). On crit :


  ______________________________________________________________________
  portmap: 129.240.223.0/255.255.255.0
  ______________________________________________________________________



  dans hosts.allow. C'est l'adresse de rseau que vous donnez aussi  la
  commande route et le masque de rseau que vous donnez  ifconfig. Pour
  le prifrique eth0 sur cette machine ifconfig devrait donner :


  ______________________________________________________________________
  ...
  eth0      Link encap:10Mbps Ethernet  HWaddr 00:60:8C:96:D5:56
            inet addr:129.240.223.254  Bcast:129.240.223.255  Mask:255.255.255.0
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:360315 errors:0 dropped:0 overruns:0
            TX packets:179274 errors:0 dropped:0 overruns:0
            Interrupt:10 Base address:0x320
  ...
  ______________________________________________________________________



  et netstat -rn devrait donner :


  ______________________________________________________________________
  Kernel routing table
  Destination     Gateway         Genmask         Flags Metric Ref Use    Iface
  ...
  129.240.223.0   0.0.0.0         255.255.255.0   U     0      0   174412 eth0
  ...
  ______________________________________________________________________



  (Adresse rseau dans la premire colonne)

  Les fichiers hosts.deny et hosts.allow sont dcrits dans les pages de
  manuel de mmes noms.

  IIMMPPOORRTTAANNTT : ne _r_i_e_n mettre d'autre que des adresses IP (numriques)
  dans les lignes portmap de ces fichiers. Les _h_o_s_t _n_a_m_e _l_o_o_k_u_p
  (recherche d'adresse IP (numrique)  partir de l'adresse
  alphanumrique ex. ftp.lip6.fr donne 132.227.77.2) peuvent
  indirectement dclencher une activit portmap qui dclenchera un _h_o_s_t
  _n_a_m_e _l_o_o_k_u_p qui dclenchera...

  Ceci fait, votre serveur devrait tre un peu plus solide. Le dernier
  problme (mais oui !) est que quelqu'un casse le compte root (ou boute
  MS-DOS) sur une machine de confiance et utilise ce privilge pour
  envoyer des requtes depuis un port sr en se faisant passer pour
  n'importe quel utilisateur.




  66..44..  NNFFSS eett lleess ccoouuppeenntt--ffeeuu ((ffiirreewwaallllss))

  C'est une trs bonne ide de bloquer les ports NFS et portmap dans
  votre routeur ou firewall. nfsd utilise le port 2049, que ce soit avec
  tcp ou udp. Le portmapper est au port 749 (tcp et udp) et mountd aux
  port 745 et 747 (tcp et udp). Vrifiez les ports avec la commande
  rpcinfo -p.

  Si au contraire vous voulez que NFS traverse un firewall, il existe
  des options sur les nfsd et mountd rcents pour leur spcifier le port
   utiliser. Vous pouvez donc choisir un port qui ne soit pas bloqu
  par le firewall.




  66..55..  RRssuumm

  Si vous configurez correctement votre installation portmapper/NFS avec
  hosts.allow/deny, root_squash, nosuid et les ports privilgis, vous
  vitez beaucoup des bogues connues de NFS et pouvez presque vous
  sentir en scurit au moins pour __a. Mais de toutes faons : quand un
  intrus obtient l'accs  votre rseau, il/elle peut faire apparatre
  des commandes bizarres dans votre .forward ou lire votre mail quand
  /home ou /var/spool/mail sont exports. Pour la mme raison, vous ne
  devriez jamais accder  votre cl prive PGP par NFS. Ou au moins
  vous devez savoir quel est le risque. Et maintenant vous savez un peu.

  NFS et le portmapper constituent un systme complexe et il n'est donc
  pas totalement exclu que de nouvelles bogues soient dcouvertes, soit
  dans la conception soit dans l'implmentation que nous utilisons. Il
  pourrait mme y avoir des dfauts de scurit connus, que quelqu'un
  utilise. Mais c'est la vie. Pour vous tenir au courant, vous devriez
  au moins lire les forums comp.os.linux.announce et
  comp.security.announce comme minimum absolu (en franais, consultez
  fr.comp.os.linux.annonces).



  77..  ````CChheecckklliisstt'''' mmoouunntt

  Cette section est base sur la _m_o_u_n_t _c_h_e_c_k_l_i_s_t (liste des problmes
  lis  mount) de IBM Corp. Je les remercie de m'autoriser  l'utiliser
  dans ce HOWTO. Si vous avez un problme en montant un systme de
  fichiers NFS, consultez cette liste avant de poster votre problme sur
  les niouzes. Chaque point dcrit un type de problme et sa solution.


  1. Mount rpte RPC: Program not registered


     Le portmapper tourne ?

     SSoolluuttiioonn :: lancez-le.

     mountd tourne ?

     SSoolluuttiioonn :: lancez-le.

     nfsd tourne ?

     SSoolluuttiioonn :: lancez-le.

     /etc/hosts.deny empche le portmapper de rpondre ?

     SSoolluuttiioonn :: vous pouvez enlever la rgle en question dans hosts.deny
     ou en ajouter une dans hosts.allow de faon que le portmapper soit
     autoris  vous parler.


  2. Systme de fichier non export, ou non export au client en
     question.


     SSoolluuttiioonn :: exportez le [Ndt : merci IBM !]


  3. La rsolution de noms ne s'accorde pas avec la liste des exports.


     e.g.: la liste des exports dit d'exporter vers johnmad mais le nom
     de johnmad est rsolu en johnmad.austin.ibm.com. La permission de
     monter est refuse.


     SSoolluuttiioonn :: exportez vers les deux formes du nom.


     Cela peut aussi arriver si le serveur a deux interfaces avec des
     noms diffrents et que les exports n'en spcifient qu'un.


     SSoolluuttiioonn :: exportez les deux interfaces.


     Cela peut aussi se produire si le serveur ne peut pas faire un
     lookuphostbyname ou lookuphostbyaddr (ce sont des fonctions de
     bibliothque) sur le client. Assurez-vous que le client peut faire
     host <name>; host <ip_addr>; et que les deux donnent la mme
     machine.


     SSoolluuttiioonn :: mettez de l'ordre dans la rsolution de noms.


  4. Le systme de fichiers a t mont aprs que NFS soit lanc (sur ce
     serveur). Dans ce cas le serveur exporte le point de montage sous-
     jacent, pas le systme de fichiers.


     SSoolluuttiioonn :: teignez nfsd et relancez le.


     NNoottee :: les clients qui avaient mont le point de montage sous-
     jacent auront des problmes pour y accder aprs le redmarrage.



  5. La date est trs dcale sur une ou sur les deux machines (cela
     peut mettre la pagaille pour make)


     SSoolluuttiioonn :: rglez correctement la date.


     L'auteur du HOWTO recommande d'utiliser NTP pour synchroniser les
     horloges. Vu qu'il y a des restrictions  l'exportation (au sens
     commercial !) de NTP aux .U., vous devez vous procurer NTP pour
     Debian, Redhat ou Slakware depuis
     ftp://ftp.hacktic.nl/pub/replay/pub/linux ou un miroir.


  6. Le serveur ne peut pas utiliser un mount d'un utilisateur qui est
     dans plus de 8 groupes.

     SSoolluuttiioonn :: diminuez le nombre de groupes auxquels l'utilisateur
     appartient ou montez depuis un autre utilisateur.


  88..  FFAAQQ

  Voici la section FAQ. Elle est en partie base sur une vieille FAQ NFS
  crite par Alan Cox.

  Si vous avez un problme pour monter un systme de fichier, voyez si
  votre problme est dcrit dans la section ``Checklist mount''.


  1. J'obtiens un tas d'erreurs ``stale nfs handle'' quand j'utilise
     Linux comme serveur NFS.


     Cela est d  une bogue dans quelques vieilles versions de nfsd.
     Elle est corrige  partir de nfs-server2.2beta16.


  2. Quand j'essaye de monter le systme de fichiers j'obtiens



           can't register with portmap: system error on send







  Vous utilisez probablement un systme Caldera. Il y a une bogue dans
  les scripts rc. Contactez Caldera pour obtenir la solution.


  3. Pourquoi ne puis-je pas excuter un fichier aprs l'avoir copi sur
     le serveur NFS ?


     La raison est que nfsd cache les manipulations de fichiers pour des
     raisons de performances (rappelons qu'il fonctionne dans l'espace
     utilisateur). Ainsi, aprs une criture le fichier peut ne pas tre
     ferm tout de suite, et tant qu'il est ouvert le noyau ne vous
     autorisera pas  l'excuter. Les nfsd plus rcents que le printemps
     95 [Ndt : hum...] ferment les fichiers ouverts aprs quelques
     secondes, les plus vieux pouvaient ne pas les relcher avant
     plusieurs jours...


  4. Mes fichiers NFS sont tous en lecture seule.


     Le serveur NFS Linux est par dfaut en lecture seule. Voyez les
     sections ``Mountd et nfsd'' et ``Exporter des systmes de fichier''
     dans ce HOWTO et rfrez vous aux pages de manuel ``exports'' et
     ``nfsd''. Vous devrez modifier /etc/exports.


  5. Je monte depuis un serveur NFS Linux, ls marche et pourtant je ne
     peux pas lire ou crire de fichiers.


     Sur les anciennes versions de Linux il faut monter un serveur NFS
     avec rsize=1024, wsize=1024.


  6. Je monte depuis un serveur NFS Linux avec une taille de bloc
     comprise entre 3500 et 4000 et Linux crashe rgulirement.


     Bah alors ne le faites pas. Cela ne se produit pas avec les noyaux
     2.0 et 2.2 ni, autant que je sache avec les 1.2.


  7. Est-ce que Linux peut utiliser NFS sur TCP ?


     Non, pas pour le moment.


  8. J'ai des tonnes d'erreurs bizarres en essayant de monter depuis un
     serveur Linux.


     Assurez-vous que vos utilisateurs sont dans 8 groupes au maximum.
     C'est une limitation des vieux serveurs.


  9. Quand je redmarre ma machine elle se bloque parfois en essayant de
     dmonter un serveur NFS bloqu (_h_u_n_g).


     Ne dmontez ppaass les serveurs NFS en redmarrant ou arrtant la
     machine, a ne crera pas de problmes si vous ne le faites pas. La
     commande est umount -avt nonfs.


  10.
     Les clients NFS Linux sont trs lents quand ils crivent sur des
     systmes Sun ou BSD.


     Normalement les critures NFS sont synchrones (vous pouvez le
     dsactiver si vous ne craignez pas de perdre des donnes). Les
     noyaux drivs de BSD ont tendance  ne pas savoir travailler avec
     des petits blocs. Ainsi quand vous crivez 4K de donnes depuis un
     client Linux dans des paquets de 1K, BSD fait ceci :



                       lit une page de 4K
                       traite 1K
                       crit 4K sur le disque
                       lit une page de 4K
                       traite 1K
                       crit 4K sur le disque
                       ...






  11.
     Quand je connecte de nombreux clients  un serveur NFS Linux, la
     performance diminue soudainement.


     Le protocole NFS utilise les paquets UDP fragments. Le noyau ne
     conserve qu'un nombre limit de fragments de paquets incomplets
     avant de commencer  jeter des paquets. En 2.2, ce paramtre est
     rglable  l'excution au moyen du systme de fichier /proc :
     /proc/sys/net/ipv4/ipfrag_high_tresh et ipfrag_low_tresh. En 2.0 ce
     sont des constantes dfinies  la compilation dans
     .../linux/net/ipv4/ip_fragment.c, IPFRAG_HIGH_TRESH et
     IPFRAG_LOW_THRESH. La signification des ces valeurs est que quand
     la mmoire consomme par les fragments UDP non rassembls atteint
     ``ipfrag_high_thresh'' (en octets, 256K par dfaut en 2.2.3 et
     2.0.36) elle est ramene  ``ipfrag_low_tresh'' d'un coup, en
     jetant des fragments. Ainsi, si la borne suprieure (high_tresh)
     est atteinte, la performance de votre serveur diminue
     drastiquement.

     256K est suffisant pour 30 clients. Si vous en avez 60, doublez la
     valeur. Et doublez aussi la borne infrieure (low_tresh).


  12.
     J'utilise Linux 2.2 (ou suivant) avec knfsd et ma machine AIX,
     IRIX, Solaris, DEC-Unix, ... n'arrive pas  monter de volume.


     knfsd annonce qu'il implmente NFS version 3, alors que ce n'est
     pas vrai. Utilisez l'option qui permet de stopper ces annonces, ou
     mettez "vers=2" dans la liste d'options de montage de votre client.


  13.
     Ma machine AIX 4 n'arrive pas  monter depuis mon serveur NFS
     Linux. Elle dit quelque chose du genre :



               mount: 1831-011 access denied for server:/dir
               mount: 1831-008 giving up on:
               server:/dir
               The file access permissions do not allow the specified action.







  AIX 4.2 utilise des ports rservs (<1024) pour NFS. AIX 4.2.1 et 4.3
  peuvent utiliser d'autres ports, et essaient de monter par NFS3,
  NFS/TCP et finalement NFS/UDP.


  Ajouter


  ______________________________________________________________________
  nfso -o nfs_use_reserved_ports=1
  ______________________________________________________________________




   la fin de rc.tcpip la forcera  utiliser les ports rservs (truc
  fourni par Brian Gorka).





  99..  EExxppoorrtteerr uunn ssyyssttmmee ddee ffiicchhiieerrss

  Bien sur, la faon d'exporter les systmes de fichiers par NFS n'est
  pas toujours la mme sur toutes les plate-formes. Linux et Solaris 2
  sont les plus dviants. Cette section liste de manire superficielle
  la faon de procder sur la plupart des systmes. Si votre systme
  n'est pas trait ici, cherchez dans vos pages de manuel. Les mot-cls
  sont : nfsd, system administration tool, rc scripts, boot scripts,
  boot sequence, /etc/exports, exportfs. J'utiliserai le mme exemple
  tout au long de cette section : comment exporter /mn/eris/local vers
  apollon en lecture/criture.


  99..11..  IIRRIIXX,, HHPP--UUXX,, DDiiggiittaall--UUNNIIXX,, UUllttrriixx,, SSuunnOOSS 44 ((SSoollaarriiss 11)),, AAIIXX

  Ces systmes utilisent le format export traditionnel de Sun. Dans
  /etc/exports, crivez :


  ______________________________________________________________________
  /mn/eris/local -rw=apollon
  ______________________________________________________________________



  La documentation complte se trouve dans la page de manuel exports.
  Aprs avoir dit le fichier, lancez exportfs -av pour exporter les
  systmes de fichiers.


  La rigueur de la syntaxe demande par exportfs varie. Sur certains
  systmes vous verrez que la ligne prcdente peut tre :


  ______________________________________________________________________
  /mn/eris/local apollon
  ______________________________________________________________________



  ou mme quelque chose de dgnr comme :


  ______________________________________________________________________
  /mn/eris/local rw=apollon
  ______________________________________________________________________



  Je recommande d'utiliser la syntaxe stricte. Il se peut que la
  prochaine version de exportfs soit plus exigeante vis  vis de la
  syntaxe et ne fonctionne plus.


  99..22..  SSoollaarriiss 22

  Sun ont compltement rinvent la roue quand ils ont fait Solaris 2,
  et donc c'est compltement diffrent des autres systmes. Il faut
  diter le fichier /etc/dfs/dfstab et y placer les commandes de partage
  (_s_h_a_r_e) documentes dans la page de manuel share(1M), comme ceci :


  ______________________________________________________________________
  share -o rw=apollon -d "Eris Local" /mn/eris/local
  ______________________________________________________________________



  Lancez ensuite le programme shareall pour exporter les systmes de
  fichiers.



  1100..  NNFFSS ssoouuss LLiinnuuxx 22..22

  Au moment o j'cris, la version courante du noyau est 2.2.12 et
  utiliser NFS peut tre assez pnible. Ou pas. J'ignore ce qu'il en
  sera pour Linux 2.4.

  La grosse nouveaut dans Linux 2.2 c'est le support d'un serveur nfs
  dans le noyau, appel knfsd 2.2. Ce type d'implmentation a des
  avantages, principalement la rapidit, une machine Linux 2.2 avec
  knfsd est un serveur NFS respectable. Vous pouvez cependant toujours
  utiliser l'ancien nfsd avec Linux 2.2, et cela prsente quelques
  avantages aussi, dont la simplicit.

  Si vous utilisez un paquetage noyau source ou binaire fabriqu par
  quelqu'un comme RedHat (6.0 et suivantes), SuSE (6.1 et suivantes il
  me semble) ou un autre intgrateur de systme professionnel ils auront
  probablement intgr compltement ``knfsd'' et vous n'avez pas de
  soucis  vous faire, cela marchera. Pour l'essentiel. Jusqu' ce que
  vous vouliez compiler un noyau vous mme. Si vous utilisez un noyau
  2.2 standard (au moins jusqu' 2.2.12) knfsd ne fonctionnera pas.

  Pour le faire fonctionner vous mme il vous faut le paquetage knfsd de
  H.J. Lu. C'est un ensemble de patchs avec les utilitaires requis pour
  2.2 que Lu maintient bnvolement. Rcuprez le depuis votre miroir de
  noyau local, le site matre est ftp.kernel.org:/pub/linux/devel/gcc/.
  CCee nn''eesstt ppaass ddeessttiinn aauu ggrraanndd ppuubblliicc. Si vous trouvez que c'est trop
  compliqu, n'insistez pas et attentez qu'un paquetage noyau soit
  disponible auprs de votre intgrateur (Redhat, SuSE...).

  Ne m'envoyez pas de question  ce sujet, je ne peux pas vous aider, je
  n'ai aucun serveur bas sur knfsd qui tourne. Si vous trouvez des
  erreurs ou omissions dans la documentation, crivez-moi et je
  corrigerai ce HOWTO.

  Toujours l ? Ok. H.J. Lu annonce les nouvelles versions de son
  paquetage sur la liste de diffusion linux-kernel, o il passe d'autres
  choses lies  NFS dans Linux 2.2. Lisez-la.



  1100..11..  LLee cclliieenntt

  Le client est presque simple. Afin que les verrous (_l_o_c_k_s) marchent
  correctement il faut que statd (du paquetage knfsd) soit compil,
  install et lanc depuis vos scripts de dmarrage. Statd a besoin d'un
  rpertoire appel /var/lib/nfs qu'il vous faudra crer avant de le
  lancer (sans quoi il se termine immdiatement sans message d'erreur).

  Une fois que statd tourne vous pouvez utiliser le programme testlk
  (dans tools/locktest) pour tester si un verrou sur un fichier d'un
  volume mont par NFS fonctionne. a devrait. S'il affiche _N_o _l_o_c_k_s
  _a_v_a_i_l_a_b_l_e, statd ne fonctionne pas.

  En fait, vous pouvez aussi vous passer des verrous (ce que je ne
  recommande pas) en mettant "nolock" dans la liste des options de
  montage.

  Autant que je sache, c'est tout ce qu'il faut pour faire fonctionner
  correctement le client.

  Ah, si vous avez un serveur NFS Alpha ou Sparc vous verrez que le
  client nfs de Linux 2.2 est vraiment de la merde. Les dbits sont
  extrmement faibles, bien pire qu'avec Linux 2.0. Bien sur on peut
  corriger le problme. Les noyaux 2.2 d'Alan Cox (un petit peu plus
  exprimentaux que ceux de Linus) incluent un patch pour amliorer la
  performance du client 2.2 avec un serveur Alpha ou Sparc. Si vous
  voulez utiliser les noyaux d'Alan Cox, vous devriez lire la liste de
  diffusion linux-kernel, et si c'est le cas vous savez o les trouver.
  Le site de rfrence est  <http://www.uio.no/~trondmy/src/>, au cas o
  vous voudriez essayer de l'appliquer  un noyau 2.2 standard. Ce patch
  ne sera probablement pas intgr dans Linux 2.4, car il demande trop
  de changements dans le noyau pour tre accept dans le cycle de
  dveloppement actuel. Attendez Linux 2.5.

  trondmy propose des patchs pour utiliser NFS version 3 avec Linux, et
  qui permettent aussi d'utiliser TCP comme mcanisme de transport au
  lieu d'UDP. NFSv3 est trs bien pour des rseaux grande distance ou
  avec des taux de pertes non nuls, ou des temps de latence levs.

  Si vous utilisez ces patchs, il vous faut lire linux-kernel, car de
  sales bugs, qui mangent vos fichiers, sont parfois dcouverts. Alors
  ssooyyeezz pprruuddeenntt.


  1100..22..  LLee sseerrvveeuurr

  Le serveur NFS de Linux 2.2 et suivants est appel "knfsd". Il est
  difficile  configurer. Il faudra vous dbrouiller tout seul ou
  utiliser ce que SuSE, RedHat et autres fournissent dans leurs
  paquetages 2.2. Dsol, mais vous pouvez toujours utiliser l'ancien
  nfsd. Il est lent mais facile  installer.



  1111..  SSeerrvveeuurr NNFFSS ssuurr uunnee ddiissqquueettttee

  Cette section a t crite par Ron Peters, rpeters@hevanet.com. Elle
  explique comment installer un serveur NFS en dmarrant depuis une
  disquette. L'objectif initial tait de partager par NFS un cdrom
  d'une autre machine pour installer Linux sur une machine sans lecteur
  de cdrom.



  1111..11..  IInnttrroodduuccttiioonn

  Ce document a pour but d'aider ceux qui auront le mme problme que
  moi rcemment. J'installais un serveur Linux sur une machine sans
  lecteur de cdrom et sans moyen d'en installer un,  part peut tre
  un SCSI externe. Ce genre de situations sera sans doute de plus en
  plus rare et ce document perdra donc de son intrt, mais j'aurais
  bien aim l'avoir quand j'essayais d'installer ma machine.

  Vu que la machine n'avait pas de lecteur de cdrom, j'ai pens
  installer un serveur NFS pour Win95 afin de partager le lecteur de
  cdrom juste le temps d'installer ma machine et de la mettre sur le
  rseau. Je n'ai trouv que deux produits (je ne citerai pas les noms
  mais l'un est un freeware et l'autre avait une licence limite  14
  jours), l'un ne marcha pas ``cls en main'' et l'autre n'tait pas
  capable de grer les conventions de nommage Linux suffisamment bien
  pour mener  bien l'installation.

  J'ai donc dcid d'essayer de redmarrer ma machine Win95 sous Linux
  avec les disquettes boot/root et d'utiliser une disquette
  supplmentaire pour installer un serveur NFS.

  Cela a t remarquablement simple, la procdure est en fait
  probablement plus simple que de lire cette introduction. Cependant, je
  pense qu'il est intressant de rassembler les information ncessaires
  dans ce document.


  1111..22..  AAtttteenntteess

  J'ai utilis les disquettes boot/root fournies dans une des
  distributions de Slakware (InfoMagic developpers distributions). Le
  noyau utilis sur les disquettes tait un 2.0.34, et les programmes du
  serveur NFS venaient d'un serveur pour 2.0.30. J'ai toujours utilis
  la mthode d'installation Slakware, non pas qu'elle soit plus facile
  ou meilleure ou pire, mais simplement qu'elle m'est familire et que
  je n'ai jamais pris le temps d'apprendre  en utiliser une autre.

  Je ne pense pas qu'il puisse y avoir beaucoup de problmes lis  la
  version du systme. Je recommanderais simplement d'utiliser un systme
  relativement rcent, ce qui devrait tre le cas si vous utilisez les
  disquettes boot/root de la distribution  installer.


  1111..33..  MMaattrriieell nncceessssaaiirree


    Une machine et une disquette de boot supportant le rseau. La
     machine devant jouer le rle du serveur NFS doit avoir une carte
     rseau reconnue pendant le dmarrage. Pour plus d'informations,
     voir le HOWTO sur le rseau (NET4-HOWTO).

    Une deuxime disquette contenant rpc.portmap, rpc.mountd et
     rpc.nfsd. Vous pouvez trouver facilement ces fichiers par un
     ftpsearch sur le oube.

    Un cd (par exemple) Slakware (ou autre).


  1111..44..  CCoonnffiigguurraattiioonn dduu sseerrvveeuurr



  1111..44..11..  DDmmaarrrreerr llee sseerrvveeuurr NNFFSS tteemmppoorraaiirree

  Dmarrez la machine qui sera serveur NFS depuis la disquette de
  dmarrage et assurez-vous que la carte rseau est reconnue, de mme
  que le lecteur de cdrom. Dans la suite je suppose que la carte
  rseau en question est eth0.


  1111..44..22..  MMoonntteerr llaa ddiissqquueettttee eett llee ccddrroomm

  Une fois que le systme est dmarr, vous n'avez plus besoin des
  disquette boot/root, le systme tant compltement install en disque
  mmoire. Remplacez la disquette root par la disquette supplmentaire,
  et montez la :

  mount /dev/fd0 /floppy

  Ceci fonctionne pour une disquette avec un systme de fichiers ext2.
  J'imagine que la disquette pourrait utiliser un systme de fichiers
  MSDOS mais je n'ai pas essay. Je suppose que cela serait plus simple
  que de faire une image disque. Dans ce cas, il faudrait utiliser mount
  -t msdos ...etc.

  Montez le cdrom :

  mount -t iso9660 /dev/hdc /cdrom

  J'ai utilis les priphriques disquette et cdrom, on peut en
  utiliser d'autres selon ce que l'on veut faire. Les points de montage
  /floppy et /cdrom doivent exister sur l'image de la disquette root. Si
  ce n'est pas le cas, crez-les, ou bien vous pouvez utiliser n'importe
  quels autres points de montage.





  1111..44..33..  CCoonnffiigguurreerr llee rrsseeaauu ssuurr llee sseerrvveeuurr pprroovviissooiirree

  Il faut maintenant configurer le serveur NFS et le rseau. Il n'y a
  que quelques commandes  lancer, et quelques informations qu'il vous
  faudra rassembler auparavant (je donne ici des valeurs d'exemple) :


  IPADDR:172.16.5.100    #L'adresse du serveur temporaire.

  NETMASK:255.255.255.0  #Le masque de rseau (netmask).

  BROADCAST:172.16.5.255 #L'adresse de diffusion sur le rseau

  ETHNETWORK:172.16.5.0  #L'adresse rseau

  GATEWAY:172.16.5.251 #Ncessaire seulement si vous avez une
  passerelle. Si c'est le cas, vous le savez. La plupart des rseau ``
  la maison'' n'en ont pas.


  Les commandes pour se connecter au rseau (utiliser les valeurs
  donnes ci-dessus) :


  ifconfig eth0 inet IPADDR arp netmask NETMASK broadcast BROADCAST

  route add -net ETHNETWORK netmask NETMASK eth0

  Celle-ci uniquement si vous avez une passerelle et que vous devrez la
  traverser :

  route add default gw GATEWAY netmask 0.0.0.0 eth0


  Si tout va bien, vous tes maintenant sur le rseau et devriez pouvoir
  faire des ping sur les autres machines.


  1111..44..44..  CCoonnffiigguurreerr llee vvoolluummee NNFFSS

  Choisissez le rpertoire  partager. Dans mon exemple, c'tait
  /cdrom/slakware. Placez-le dans le fichier /etc/exports :

  echo "/cdrom/slakware" > /etc/exports




  1111..55..  LLaanncceerr llee sseerrvveeuurr NNFFSS

  Allez dans /floppy/usr/bin et lancez :

  ./rpc.portmap

  ./rpc.mountd

  ./rpc.nfsd



  1111..55..11..  PPrrtt,, ccoommmmeenncceezz ll''iinnssttaallllaattiioonn

  Normalement, le rpertoire /cdrom/slakware est maintenant partageable.
  Dmarrez votre machine (celle  installer) depuis les disquettes
  boot/root (j'ai utilis les mmes qui ont servi  dmarrer le serveur)
  et commencez l'installation.
  Quand il faut choisir le mdia source  utiliser, choisissez ``serveur
  NFS''. Il vous demandera l'adresse IP du serveur, qui est celle que
  vous avez appel IPADDR pour le serveur. Il vous faut aussi donner le
  rpertoire  monter, qui est celui que vous avez indiqu dans le
  fichier /etc/exports du serveur.

  Le volume NFS devrait maintenant tre mont, surveillez l'apparition
  de messages d'erreur. Si tout va bien, continuez l'installation.


  1111..66..  PPrroobbllmmeess



  1111..66..11..  RRiieenn iiccii ppoouurr ll''iinnssttaanntt

  Je n'ai rien  dire  ce sujet pour le moment. Peut tre si des gens
  utilisent cette procdure, on aura des choses  ajouter.


  1111..77..   ffaaiirree



  1111..77..11..  DDiissqquueettttee DDOOSS

  Voir si la disquette supplmentaire peut tre au format DOS.


  1111..77..22..  CCoommmmaannddeess RRPPCC

  Vrifiez l'ordre dans lequel lancer les commandes rpc.* et si toutes
  sont ncessaires.



  1122..  PPCC--NNFFSS

  Vous ne voulez pas utiliser PC-NFS, mais plutt samba.

  Samba est bien meilleur que PC-NFS, il fonctionne avec ``Windows3 for
  Workgroups'' et les versions suivantes de Windows. Il est plus rapide
  et plus sur. Utilisez plutt samba.























  Le Linux NIS(YP)/NYS/NIS+ HOWTO
  Thorsten Kukuk
  Version 0.12, 12 Juin 1998

  Ce document dcrit la faon de configurer Linux en client de NIS(YP)
  ou de NIS+, et la faon d'installer un serveur NIS.
  ______________________________________________________________________

  Table des matires

























































  1. Version franaise

  2. Introduction

     2.1 Nouvelles versions de ce document
     2.2 Avertissement
     2.3 Retour d'information et corrections
     2.4 Remerciements

  3. Glossaire et informations gnrales

     3.1 Glossaire des termes employs
     3.2 Quelques informations gnrales

  4. NIS ou NIS+ ?

     4.1 libc 4/5 avec "NIS traditionnel" ou NYS ?

  5. Comment a marche ?

     5.1 Comment fonctionne NIS(YP) ?
     5.2 Comment fonctionne NIS+ ?

  6. Le RPC Portmapper

  7. De quoi avez-vous besoin pour configurer NIS ?

     7.1 Dterminez si vous tes un serveur, un esclave ou un client
     7.2 Les programmes
     7.3 Le dmon ypbind
     7.4 Configurer un client NIS en utilisant le NIS traditionnel
     7.5 Configurer un client NIS en utilisant NYS
     7.6 Configurer un client NIS en utilisant la glibc 2.x
     7.7 Le fichier nsswitch.conf

  8. Mots de passe Shadow avec NIS et PAM

  9. Que faut-il pour configurer NIS+ ?

     9.1 Les programmes
     9.2 Configurer un client NIS+
     9.3 NIS+, keylogin, login et PAM
     9.4 Le fichier nsswitch.conf

  10. Configurer un serveur NIS

     10.1 Le programme serveur ypserv
     10.2 Le programme serveur yps
     10.3 Le programme rpc.yppasswdd

  11. Vrifier l'installation de NIS ou de NYS

  12. Problmes et erreurs de fonctionnement de NIS

  13. FAQ : Les questions les plus frquemment poses



  ______________________________________________________________________

  11..  VVeerrssiioonn ffrraannaaiissee


  Ce document constitue la version franaise du NIS-HOWTO, adaptation
  ralise par Frdric Veynachter (frederic.veynachter@hol.fr), le 26
  juillet 1998, fortement inspire de la traduction prcdemment
  ralise par ric Dumas (dumas@Linux.EU.Org), le 19 Novembre 1997.

  Vous pouvez consulter ce document sur les sites suivants :

    http://www.freenix.fr/linux/HOWTO
     <http://www.freenix.fr/linux/HOWTO/>

    ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO
     <ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/>

     ainsi que leurs nombreux miroirs.

  Pour plus de renseignements concernant la traduction en langue
  franaise des documents du LDP (_L_i_n_u_x _D_o_c_u_m_e_n_t_a_t_i_o_n _P_r_o_j_e_c_t),
  consultez le document "Liste-des-HOWTO" que l'on trouve aux mmex
  endroits.

  Les diffrents sites conseills dans  ce document possdent srement
  des miroirs plus proches de chez vous, comme par exemple ftp.lip6.fr,
  ftp.loria.fr ... utilisez-les !


  22..  IInnttrroodduuccttiioonn

  Les machines sous Linux sont de plus en plus souvent installes et
  connectes dans des rseaux informatiques.Pour simplifier
  l'administration systme, la plupart des rseaux (surtout ceux qui
  sont fonds sur du matriel Sun) fonctionnent avec le _N_e_t_w_o_r_k
  _I_n_f_o_r_m_a_t_i_o_n _S_e_r_v_i_c_e. Les machines Linux peuvent tirer de nombreux
  avantages des services NIS existant, ou fournir elles-mmes ces
  services. Elles peuvent galement se comporter comme des clients NIS+,
  mais il s'agit encore d'une version bta.

  Ce document tente de rpondre aux questions concernant la mise en
  place et la configuration de NIS(YP) et de NIS+ sur votre machine
  Linux. N'oubliez pas de lire la section concernant ``le Portmapper
  RPC''.

  Le NIS-Howto est rdig et maintenu par:


       Thorsten Kukuk, kukuk@vt.uni-paderborn.de


  La version initiale de ce document a t ralise par:



       Andrea Dell'Amico       <adellam@ZIA.ms.it>
       Mitchum DSouza          <Mitch.DSouza@NetComm.IE>
       Erwin Embsen            <erwin@nioz.nl>
       Peter Eriksson          <peter@ifm.liu.se>




  que nous tenons  remercier.


  22..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Vous pourrez toujours trouver la dernire version de ce document sur
  le web via l'URL http://sunsite.unc.edu/mdw/HOWTO/NIS-HOWTO.html
  <http://sunsite.unc.edu/mdw/HOWTO/NIS-HOWTO.html>.


  Les nouvelles versions de ce document seront galement prsentes sur
  diffrents sites ftp et web consacrs  Linux, y compris sur la page
  principale du LDP (Linux Documentation Project).

  Des liens vers les traductions de ce document peuvent tre trouvs 
  l'adresse http://www-vt.uni-paderborn.de/~kukuk/linux/nis-howto.html
  <http://www-vt.uni-paderborn.de/~kukuk/linux/nis-howto.html>.


  22..22..  AAvveerrttiisssseemmeenntt

  Mme si ce document rassemble le maximum de donnes selon notre
  connaissance, il peut contenir, et contient sans doute, certaines
  erreurs. Nous vous demandons de lire attentivement tous les fichiers
  README qui sont livrs avec les outils dcrits dans ce document, pour
  avoir plus de dtails et une information plus prcise.  Nous
  essayerons, dans la mesure du possible, d'viter que des erreurs se
  glissent ans ce document.


  22..33..  RReettoouurr dd''iinnffoorrmmaattiioonn eett ccoorrrreeccttiioonnss

  Si vous avez des questions ou des commentaires  propos de ce
  document, n'hsitez pas  envoyer un courrier lectronique 
  kukuk@vt.uni-paderborn.de.  J'accepte volontiers toutes les
  suggestions ou critiques. Si vous trouvez une anomalie ou une erreur
  dans ce document, merci de me le faire savoir, pour que je puisse la
  corriger dans la prochaine version.

  Merci de ne pas m'envoyer de questions concernant des problmes
  spcifiques  une distribution de Linux. Je ne les connais pas toutes.
  J'essayerai nanmoins d'intgrer toute solution qui me sera envoye.


  22..44..  RReemmeerrcciieemmeennttss

  Nous voudrions remercier toutes les personnes qui ont contribu
  (directement ou indirectement)  ce document. Par ordre alphabtique :



       Byron A Jeff            <byron@cc.gatech.edu>
       Miquel van Smoorenburg  <miquels@cistron.nl>




  Theo de Raadt <deraadt@theos.com> est  l'origine du code yp-clients.
  Swen Thuemmler <swen@uni-paderborn.de> a port ce code pour Linux et
  il a galement port le code yp-routines pour la libc (toujours fond
  sur le travail de Theo). Thorsten Kukuk a totalement r-crit toutes
  les routines NIS(YP) et NIS+ pour la GNU libc 2.x.


  33..  GGlloossssaaiirree eett iinnffoorrmmaattiioonnss ggnnrraalleess

  33..11..  GGlloossssaaiirree ddeess tteerrmmeess eemmppllooyyss

  Dans ce document, bon nombre d'acronymes sont employs. Voici la liste
  des plus utiliss, avec une brve explication.


     DDBBMM
        DataBase Management (Gestion de la base de donnes):
        bibliothque de fonctions pour maintenir les clefs et le contenu
        de la base de donnes.
     DDLLLL
        Dynamically Linked Library (Bibliothque lie dynamiquement):
        bibliothque de fonctions charges dynamiquement  l'excution.


     ddoommaaiinnnnaammee
        Nom du domaine : nom "clef" utilis par les clients NIS pour
        qu'ils puissent trouver un serveur NIS convenable qui gre la
        clef du domaine. Notez que cela n'a rien  voir avec le
        "domaine" DNS (nom de la machine) des machines.


     FFTTPP
        File Transfer Protocol  (Protocole de transfert de fichiers) :
        protocole utilis pour transfrer des fichiers entre deux
        ordinateurs.


     lliibbnnssll
        Name services library  : bibliothque d'appels systmes (tels
        que getpwnam, getservbyname, ...)  sur les systmes Unix SVR4.
        La GNU libc utilise cette bibliothque pour les fonctions NIS
        (YP) et NIS+.


     lliibbssoocckkeett
        Bibliothque de fonctions de manipulation de sockets socket,
        bind, listen, ... sur les systmes SVR4.


     NNIISS
        Network Information Service (Service d'information du rseau):
        service qui permet  certaines informations d'tre connues par
        toutes les machines disponibles sur le rseau. Ce service est
        gr dans la bibliothque standard de la libc Linux. Il est
        considr par la suite comme tant le "NIS traditionnel".


     NNIISS++
        Network Information Service (Plus...)   : en gros, version de
        NIS amliore. NIS+ a t conu par Sun Microsystems Inc.  pour
        remplacer NIS, avec un niveau de scurit suprieur et une
        meilleure gestion pour les grosses installations.


     NNYYSS
        Il s'agit du nom d'un projet de dveloppement et de
        standardisation pour NIS+, YP et Switch.  Il est dirig par
        Peter Eriksson (<peter@ifm.liu.se>).  Il contient entre autres
        choses une rimplmentation complte du code de NIS
        (c'est--dire YP) qui utilise les fonctionnalits  _N_a_m_e _S_e_r_v_i_c_e_s
        _S_w_i_t_c_h de la bibliothque NYS.


     NNSSSS
        Name Service Switch (littralement, commutation des noms de
        service): le fichier /etc/nsswitch.conf dtermine l'ordre de
        recherche d'informations en fonction des services demands.


     RRPPCC
        Remote Procedure Call (Appel de procdure distante): les
        routines RPC permettent aux programmes C d'appeler d'autres
        machines  travers le rseau.  Lorsque des personnes parlent de
        RPC, elles parlent souvent en fait de la version Sun RPC.

     YYPP Yellow Pages(tm)  : marque dpose par British Telecom. (les
        pages jaunes... comme les ntres !).


     TTCCPP--IIPP
        Transmission Control Protocol/Internet Protocol : protocole de
        communication le plus frquemment utilis sur les machines Unix.


  33..22..  QQuueellqquueess iinnffoorrmmaattiioonnss ggnnrraalleess

  Les quatre lignes ci-dessous sont une citation du manuel
  d'administration rseau de Sun(TM) System.



           "NIS was formerly known as Sun Yellow Pages (YP) but
            the name Yellow Pages(tm) is a registered trademark
            in the United Kingdom of British Telecom plc and may
            not be used without permission."

           "NIS etait formellement connu sous le nom de
            Yellow Pages (YP) (Pages Jaunes) mais le nom
            Yellow Pages(tm) est une marque enregistree au
            Royaume Uni par British Telecom et ne peut etre
            utilisee sans autorisation."




  NIS est l'abrviation pour _N_e_t_w_o_r_k _I_n_f_o_r_m_a_t_i_o_n _S_e_r_v_i_c_e (Service
  d'Information Rseau).  Son but est de fournir des informations, qui
  doivent tre connues sur l'ensemble du rseau,  toutes les machines
  connectes. Les informations susceptibles d'tre distribues par NIS
  sont:


    noms de login, mots de passe, rpertoires d'ouverture (/etc/passwd)

    renseignements sur les groupes d'utilisateurs (/etc/group)

  Par exemple, si votre mot de passe et les informations s'y rattachant
  sont enregistrs dans la base de donnes NIS, vous pourrez vous loguer
  sur toutes les machines du rseau sur lesquelles un client NIS est
  lanc.

  Sun est une marque dpose de Sun Microsystems Inc, brevete par
  SunSoft, Inc.



  44..  NNIISS oouu NNIISS++ ??

  Le choix entre NIS et NIS+ est facile  faire : utilisez NIS tant que
  vous n'avez pas besoin d'utiliser NIS+ ou si vous avez des besoins de
  scurit importants. NIS+ est bien plus problmatique  administrer
  (c'est plutt facile  manipuler du ct du client, mais en ce qui
  concerne le ct serveur, c'est une horreur). Un autre problme est
  que le support de NIS+ pour Linux est encore en cours de dveloppement
  : vous devrez avoir la toute dernire version de glibc ou attendre la
  sortie de glibc 2.1. Il existe un portage du NIS+ glibc pour libc5,
  qui consiste  installer une libc de remplacement.




  44..11..  lliibbcc 44//55 aavveecc ""NNIISS ttrraaddiittiioonnnneell"" oouu NNYYSS ??

  Le choix entre "NIS traditionnel" ou le code NIS dans la bibliothque
  NYS est un choix entre paresse et maturit d'un ct, flexibilit et
  amour de l'aventure de l'autre.

  Le code "NIS traditionnel" se trouve dans la bibliothque C standard,
  existe depuis fort longtemps, et souffre parfois de son age et de son
  lger manque de souplesse.

  Le code NIS de la bibliothque NYS vous oblige  recompiler la
  bibliothque libc pour y inclure le code NYS ( moins que vous ne
  trouviez une version de libc prcompile chez quelqu'un qui l'a dj
  fait).

  Une autre diffrence est que le code "NIS traditionnel" gre en partie
  les groupes de rseaux NIS (_N_e_t_g_r_o_u_p_s), alors que le code NYS ne le
  fait pas. D'un autre ct, le code NYS vous permet d'utiliser les mots
  de passe Shadow d'une manire transparente.  Le code "NIS
  traditionnel" ne permet pas d'utiliser les mots de passe Shadow sur
  NIS.

  Vous pouvez cependant oublier tout a si vous utilisez la nouvelle
  bibliothque GNU C 2.x (alias libc6). Elle comporte un vrai support de
  NSS (_N_a_m_e _S_w_i_t_c_h _S_e_r_v_i_c_e), ce qui la rend vraiment souple, et elle est
  capable de grer les "maps" NIS/NIS+ suivantes : aliases, ethers,
  group, hosts, netgroups, networks, protocols, publickey, passwd, rpc,
  services et shadow. La bibliothque GNU C ne pose aucun problme avec
  les mots de passe Shadow sur NIS.


  55..  CCoommmmeenntt aa mmaarrcchhee ??

  55..11..  CCoommmmeenntt ffoonnccttiioonnnnee NNIISS((YYPP)) ??

  A l'intrieur d'un rseau, il doit y avoir au moins une machine
  faisant office de serveur NIS. Vous pouvez avoir plusieurs serveurs
  NIS, chacun grant plusieurs "domaines" NIS, ou bien vous pouvez avoir
  des serveurs NIS coopratifs. Dans ce cas, l'un d'entre eux est dit
  serveur NIS _m_a__t_r_e, les autres tant serveurs NIS esclaves. Vous
  pouvez galement mlanger les deux possibilits.

  Les serveurs esclaves n'ont qu'une copie de la base de donnes et la
  reoivent du serveur NIS matre lorsque des changement sont effectus
  dans la base de donnes. En fonction du nombre de machine et de la
  fiabilit de votre rseau, vous pouvez dcider d'installer un ou
  plusieurs serveurs esclaves. Lorsqu'un serveur NIS tombe en panne ou
  bien s'il est trop long pour rpondre aux requtes, un client NIS
  connect  ce serveur va alors essayer d'en trouver un en tat de
  marche.

  Les bases de donnes NIS sont au format DBM, un driv des bases de
  donnes ASCII. Par exemple, les fichiers /etc/passwd et /etc/group
  peuvent tre directement convertis dans le format DBM en utilisant un
  programme de conversion _A_S_C_I_I_-_t_o_-_D_B_M (makedbm est inclus dans les
  programmes du serveur). Le serveur NIS matre devrait avoir les deux
  types : la base ASCII et la base DBM.

  Les serveurs esclaves seront avertis de tout changement dans les
  tables NIS (grce au programme yppush), et effectueront
  automatiquement les changements ncessaires pour synchroniser leurs
  bases de donnes. Les clients NIS n'ont pas besoin d'effectuer cette
  opration puisqu'ils communiquent tout le temps avec le serveur NIS
  pour lire les informations ranges dans les bases de donnes DBM.


  L'auteur des clients YP pour Linux nous a inform que la nouvelle
  version de ypbind (situe dans l'archive ypbind-3.3.tar.gz) permet
  d'indiquer le serveur NIS  contacter dans un fichier de
  configuration, ce qui vite d'effectuer un _b_r_o_a_d_c_a_s_t (ce qui n'est pas
  scuris car n'importe qui peut installer un serveur NIS et peut donc
  rpondre aux requtes...).


  55..22..  CCoommmmeenntt ffoonnccttiioonnnnee NNIISS++ ??

  NIS+ est une nouvelle version du service d'information rseau de Sun.
  La diffrence la plus notable entre NIS et NIS+ est que NIS+ est
  capable de grer des donnes chiffres ainsi que l'authentification
  _v_i_a les RPC scuriss.

  Le modle de nommage de NIS+ est bas sur une structure arborescente.
  Chaque noeud de l'arbre correspond  un objet NIS+,  partir duquel
  nous avons six types : directory, entry, group, link, table et private
  (rpertoire, entre, groupe, lien, table et priv).

  Le rpertoire NIS+ qui constitue la racine de l'espace de nommage NIS+
  est appel le rpertoire racine. Il existe deux rpertoires spciaux
  NIS+ : org_dir et groups_dir. Le premier regroupe toutes les tables
  d'administration, telles que passwd, hosts, et mail_aliases.  Le
  second rpertoire contient les objets groupe NIS+ qui sont utiliss
  pour contrler les accs. L'ensemble des rpertoires org_dir,
  groups_dir et leurs parents sont considrs comme tant un domaine
  NIS+.


  66..  LLee RRPPCC PPoorrttmmaappppeerr

  Pour lancer n'importe lequel des programmes mentionns ci-dessous,
  vous aurez besoin de lancer le programme /usr/sbin/rpc.portmap.
  Certaines distributions de LLiinnuuxx ont dj dans le code du script
  /etc/rc.d/rc.inet2  ce qui est ncessaire pour lancer ce dmon.  Tout
  ce que vous avez  faire, c'est de dcommenter ce qui est ncessaire
  puis  rebooter votre machine pour l'activer.  Lisez la documentation
  de votre distribution pour plus de dtails.

  Le RPC portmapper (portmap(8)) est un serveur qui convertit les
  numros des programmes RPC en numros de ports pour le protocole
  TCP/IP (ou UDP/IP). Il doit tre lanc dans un certain ordre pour
  raliser les appels RPC (ce que fait le programme client NIS/NIS+)
  vers les serveurs (comme par exemple un serveur NIS/NIS+) sur cette
  machine.  Lorsque le serveur RPC est lanc, il va indiquer au dmon
  portmap quel numro de port il scrute, et quels sont les numros de
  programmes RPC avec lesquels il est prt  travailler. Lorsque le
  client souhaite raliser un appel RPC  certain numro de programme,
  il contacte dans un premier temps portmap sur le serveur de la machine
  pour dterminer le numro de port o il doit alors envoyer les paquets
  RPC.

  En principe, les serveurs RPC standards sont lancs par inetd (manuel
  inetd(8)), donc portmap doit tre lanc avant qu'inetd ne le soit.

  Pour les RPC scuriss, le portmapper a besoin des services d'horloge.
  Assurez-vous qu'ils sont activs dans le fichier /etc/inetd.conf sur
  toutes les machines :







  #
  # Time service is used for clock syncronization.
  #
  time    stream  tcp     nowait  root    internal
  time    dgram   udp     wait    root    internal




  IMPORTANT : n'oubliez pas de relancer inetd aprs toute modification
  de ce fichier !


  77..  DDee qquuooii aavveezz--vvoouuss bbeessooiinn ppoouurr ccoonnffiigguurreerr NNIISS ??



  77..11..  DDtteerrmmiinneezz ssii vvoouuss tteess uunn sseerrvveeuurr,, uunn eessccllaavvee oouu uunn cclliieenntt

  Pour rpondre  cette question, nous pouvons considrer deux cas :

  1. votre machine va tre insre dans un rseau avec des serveurs NIS
     dj existants ;

  2. vous n'avez pas encore de serveur NIS dans votre rseau.

  Dans le premier cas, vous n'aurez besoin que des programmes clients
  (ypbind, ypwhich, ypcat, yppoll, ypmatch). Le programme le plus
  important est ypbind. Ce dmon doit toujours tre lanc, c'est--dire
  qu'il doit toujours apparatre dans la liste des processus.  Comme
  c'est un dmon, il doit tre lanc au dmarrage de votre machine dans
  le fichier de dmarrage (/etc/rc.local, /etc/init.d/nis,
  /etc/rc.d/init.d/ypbind).  Ds que ypbind fonctionne, votre systme
  devient un client NIS.

  Dans le second cas, vous n'avez pas de serveur NIS, donc vous aurez
  galement besoin d'un programme serveur NIS (gnralement ypserv).  La
  section 10 ( _1_0 _C_o_n_f_i_g_u_r_e_r _u_n _s_e_r_v_e_u_r _N_I_S ) dcrit comment configurer
  un serveur NIS sur votre machine Linux en utilisant la version ypserv
  implmente par Peter Eriksson et Thorsten Kukuk. On peut remarquer
  qu' partir de la version 0.14 de cette implmentation, le concept de
  matre-esclave dont nous avons parl dans la section 5.1 est gr.

  Il existe galement un autre serveur NIS en libre distribution, appel
  yps, crit par Tobias Reber en Allemagne, et qui gre le concept de
  matre-esclave mais qui a d'autres limitations et qui n'est plus
  maintenu.


  77..22..  LLeess pprrooggrraammmmeess

  La bibliothque /usr/lib/libc.a (version 4.4.2 et suprieure) ou la
  bibliothque dynamique partage /lib/libc.so.x contient tous les
  appels systmes correspondants pour compiler sans problme les
  programmes clients et serveurs NIS.  Pour la glibc 2.x, vous aurez
  galement besoin de /lib/libnsl.so.1.

  Certaines personnes ont signal que NIS ne fonctionne qu'avec
  /usr/lib/libc.a version 4.5.21 et suprieure, donc, pour plus de
  sret, vitez d'utiliser des bibliothques plus anciennes.  Les
  clients NIS peuvent tre rcuprs sur les sites suivants :





    Site                   Repertoire                      Nom du fichier

    ftp.kernel.org        /pub/linux/utils/net/NIS         yp-tools-2.0.tar.gz
    ftp.kernel.org        /pub/linux/utils/net/NIS         ypbind-mt-1.2.tar.gz
    ftp.kernel.org        /pub/linux/utils/net/NIS         ypbind-3.3.tar.gz
    sunsite.unc.edu       /pub/Linux/system/Network/admin  yp-clients-2.2.tar.gz
    ftp.uni-paderborn.de  /linux/local/yp                  yp-clients-2.2.tar.gz
    ftp.uni-paderborn.de  /linux/local/yp                  ypbind-3.3.tar.gz




  Une fois que vous aurez rcupr ces programmes, suivez les
  instructions qui sont livres avec. yp-clients 2.2 doit tre utilis
  avec les bibliothques libc4 et libc5 jusqu' la version 5.4.20. Les
  libc 5.4.21 et glibc 2.x ncessitent yp-tools 1.4.1. La nouvelle
  version yp-tools 2.0 fonctionnera avec toutes les libc Linux. Vous ne
  devriez pas utiliser les libc 5.4.21 - 5.4.35 car elles prsentent de
  nombreux dfauts. Utilisez la libc 5.4.36 ou une version suprieure,
  sinon, la plupart des programmes de YP ne fonctionneront pas. ypbind
  3.3 fonctionnera galement avec toutes les bibliothques. Vous ne
  devriez jamais utiliser la version ypbind qui est fournie dans yp-
  clients 2.2.


  77..33..  LLee ddmmoonn yyppbbiinndd


  Nous supposons que vous avez compil correctement les programmes et
  que vous tes prt  les installer. L'endroit o installer le dmon
  ypbind est le rpertoire /usr/sbin. Certains peuvent vous dire que
  vous n'avez pas besoin de ypbind sur un systme qui utilise NYS. C'est
  faux : ypwhich et ypcat en ont besoin.

  Vous  devez raliser cette opration en tant que super-utilisateur
  (i.e. "root"), bien sr.  Les autres binaires (ypwhich, ypcat, yppoll,
  ypmatch) doivent tre placs dans un rpertoire accessible  tous les
  utilisateurs, normalement c'est le rpertoire /usr/bin qui est
  utilis.

  Le programme ypbind a besoin d'un fichier de configuration
  /etc/yp.conf. Vous pouvez y indiquer, en dur, le nom du serveur NIS.
  Pour plus d'informations, consultez la page de manuel de ypbind(8).
  Vous aurez galement besoin de ce ficher pour NYS.  Un court exemple :


         ypserver voyager
         ypserver ds9




  Si le systme est capable de rsoudre les noms de machine sans NIS,
  vous pouvez utiliser le nom de la machine. Dans le cas contraire,
  utilisez l'adresse IP.

  Il est souhaitable de tester ypbind avant de l'inclure dans les
  fichiers de /etc/rc.d/. Pour tester ypbind faites ceci :

    Vrifiez que votre nom de domaine est dfini. Si ce n'est pas le
     cas, faites





              /bin/domainname-yp nis.domain






  o nis.domain doit tre une chane, qui n'a normalement RIEN A VOIR
  avec le nom de votre machine ! La raison est que cela rend plus diffi
  cile le travail des pirates pour trouver les mots de passe de la base
  de donnes du serveurs NIS. Si vous ne connaissez pas le nom du
  domaine de votre rseau, contactez votre administrateur systme.

    Lancez /usr/sbin/rpc.portmap s'il ne tourne pas dj.

    Crez le rpertoire /var/yp s'il n'existe pas.

    Lancez /usr/sbin/ypbind

    Utilisez la commande rpcinfo -p localhost pour vrifier qu'ypbind
     est capable d'enregistrer ses services dans portmapper. La commande
     rpcinfo devrait produire un message de ce style :


              program vers proto   port
               100000    2   tcp    111  portmapper
               100000    2   udp    111  portmapper
               100007    2   udp    637  ypbind
               100007    2   tcp    639  ypbind
               300019    1   udp    660






    Vous pouvez galement lancer rpcinfo -u localhost ypbind.  Cette
     commande devrait alors produire :



               program 100007 version 2 ready and waiting





  Vous devriez alors tre capable d'utiliser les programmes clients tels
  que ypcat, etc. Par exemple, ypcat passwd vous donne la liste des mots
  de passe (chiffrs !) de la base de donnes NIS.

  IMPORTANT : si vous avez vit la procdure de test, vrifiez que vous
  avez positionn le nom de votre domaine, et cr le rpertoire :



           /var/yp




  Ce rpertoire DOIT exister pour qu'ypbind soit correctement lanc.

  Pour vrifier que le nom de domaine est correctement configurer,
  utilisez le programme /bin/ypdomainname, fourni avec yp-tools 2.0. Il
  utilise la fonction _y_p___g_e_t___d_e_f_a_u_l_t___d_o_m_a_i_n, qui est plus restrictive.
  Elle n'autorise pas, par exemple, le nom de domaine "(none)", qui est
  celui par dfaut avec Linux et qui cre de nombreux problmes.

  Si le test a fonctionn, vous pouvez alors modifier les fichiers
  /etc/rc.d sur votre systme pour qu'ypbind soit lanc lors de
  l'amorage de la machine et pour que votre machine se comporte comme
  un client NIS. Assurez-vous que le nom de domaine soit configur lors
  de l'amorage.

  Normalement, tout est prt. Relancez votre machine et observez les
  messages pour voir si ypbind est lanc.


  77..44..  CCoonnffiigguurreerr uunn cclliieenntt NNIISS eenn uuttiilliissaanntt llee NNIISS ttrraaddiittiioonnnneell


  Pour la recherche de noms de machines, vous devez ajouter "nis" dans
  la ligne "host" du fichier /etc/host.conf. Lisez la page de manuel
  "resolv+.8" pour plus de dtails.

  Ajoutez ensuite la ligne suivante dans le fichier /etc/passwd de vos
  machines clientes :



       +::::::




  Vous pouvez galement utiliser les caractres + et - pour
  inclure/exclure ou modifier certains utilisateurs. Si vous souhaitez
  exclure l'utilisateur guest, ajoutez -guest  votre fichier
  /etc/passwd. Si vous souhaitez utiliser un interprteur de commandes
  diffrent (par exemple ksh) pour l'utilisateur "linux", ajoutez la
  ligne +linux::::::/bin/ksh.  Les champs que vous ne souhaitez pas
  modifier doivent rester vides.  Vous pouvez galement utiliser les
  Netgroups pour grer les utilisateurs.

  Par exemple, pour n'utiliser que les login miquels, dth et ed, ainsi
  que tous les membres du netgroup sysadmin, tout en ayant quand mme
  accs aux comptes des autres utilisateurs :



             +miquels:::::::
             +ed:::::::
             +dth:::::::
             +@sysadmins:::::::
             -ftp
             +:*::::::/etc/NoShell




  Remarquez qu'avec Linux, vous pouvez galement surcharger le champ mot
  de passe, comme nous l'avons fait dans cet exemple. Nous avons
  galement supprim le login "ftp" : cet utilisateur n'est plus connu
  sur la machine et le ftp anonyme ne fonctionnera pas.

  Le netgroup peut tre dfini de la sorte :


       sysadmins (-,software,) (-,kukuk,)


  IMPORTANT : la fonctionnalit de netgroup n'est implmente qu'
  partir de la libc version 4.5.26. Mais si vous possdez une libc plus
  ancienne que la 4.5.26, tout utilisateur dans la base de donne des
  mots de passe peut accder  la machine linux si vous lancez ypbind.


  77..55..  CCoonnffiigguurreerr uunn cclliieenntt NNIISS eenn uuttiilliissaanntt NNYYSS


  Il vous suffit d'avoir le fichier de configuration NIS (/etc/yp.conf)
  qui pointe sur le (ou les) serveur(s) adquat(s), ainsi qu'un fichier
  /etc/nsswitch.conf correctement configur.

  Vous devriez galement installer ypbind. Il n'est pas ncessaire pour
  la libc, mais les outils NIS(YP) en ont besoin.

  Si vous souhaitez utiliser les fonctionnalits d'inclusion/exclusion
  d'utilisateurs (+/-guest/+@admins), vous devez utiliser "passwd:
  compat" et "group: compat".  Notez qu'il n'existe pas de "shadow:
  compat" !  Vous devez utiliser "shadow: files nis" dans ce dernier
  cas.

  Les sources de NYS sont fournies avec les sources de libc5. Lorsque
  vous lancez la configuration pour la premire fois, rpondez "NO"  la
  question "Values correct" (NDT: en franais, "Est-ce que les valeurs
  sont correctes ?"), puis rpondez "YES"  la question "Build a NYS
  libc from nys" (NDT: en franais, "Construire une libc NYS  partir de
  nys ?").


  77..66..  CCoonnffiigguurreerr uunn cclliieenntt NNIISS eenn uuttiilliissaanntt llaa gglliibbcc 22..xx


  La glibc utilise la version "NIS traditionnelle", donc vous devrez
  lancer ypbind. Le fichier /etc/nsswitch.conf doit galement tre
  correctement configur. Si vous utilisez le mode compat pour les
  tables passwd, shadow ou group, vous devez ajouter le caractre "+" 
  la fin de ces fichiers, et vous pourrez alors utiliser les
  fonctionnalits d'inclusion/d'exclusion d'utilisateurs.  La
  configuration est exactement la mme que sous Solaris 2.x.


  77..77..  LLee ffiicchhiieerr nnsssswwiittcchh..ccoonnff


  Le fichier de configuration /etc/nsswitch.conf dtermine l'ordre dans
  lequel sont effectues les recherches de certaines informations, en
  fonction des donnes et des services, de la mme manire que le
  fichier /etc/host.conf dtermine la faon dont les recherches de noms
  de machines se font. Par exemple, la ligne



           hosts: files nis dns




  indique que la recherche d'un nom de machine sera d'abord effectue
  dans le fichier local /etc/hosts, puis dans la table NIS et enfin en
  utilisant le DNS (/etc/resolv.conf et named). Si aucune machine ne
  correspond, alors une erreur est renvoye. Ce fichier doit tre
  accessible en lecture pour tous les utilisateurs !

  Voici un bon exemple de fichier /etc/nsswitch.conf pour NIS:

  #
  # /etc/nsswitch.conf
  #
  # Un exemple de configuration de NSS (Name Service Switch). Ce fichier doit
  # etre trie en mettant en tete les services les plus utilises.
  #
  # L'entree '[NOTFOUND=return]' signifie que la recherche d'une entree
  # doit s'arreter si la recherche dans l'entree precedente n'a rien donne
  # Notez que si la recherche echoue pour tout autre raison
  # (par exemple, le serveur NIS ne repond pas), alors la recherche continue
  # avec l'entree suivante.
  #
  # Les entrees connues sont :
  #
  #       nisplus                 NIS+ (NIS version 3)
  #       nis                     NIS (NIS version 2), connu comme YP
  #       dns                     DNS (Domain Name Service)
  #       files                   Fichiers locaux
  #       db                      Bases de donnees /var/db
  #       [NOTFOUND=return]       Arret de la recherche si l'on n'a rien trouve
  #

  passwd:     compat
  group:      compat
  shadow:     compat

  passwd_compat: nis
  group_compat: nis
  shadow_compat: nis

  hosts:      nis files dns

  services:   nis [NOTFOUND=return] files
  networks:   nis [NOTFOUND=return] files
  protocols:  nis [NOTFOUND=return] files
  rpc:        nis [NOTFOUND=return] files
  ethers:     nis [NOTFOUND=return] files
  netmasks:   nis [NOTFOUND=return] files
  netgroup:   nis
  bootparams: nis [NOTFOUND=return] files
  publickey:  nis [NOTFOUND=return] files
  automount:  files
  aliases:    nis [NOTFOUND=return] files




  Les entres passwd_compat, group_compat et shadow_compat ne sont
  gres qu'avec la glibc 2.x. S'il n'y a pas d'entre shadow dans
  /etc/nsswitch.conf, la glibc utilisera l'entre passwd pour effectuer
  ses recherches. Il existe certaines entres supplmentaires avec la
  glibc comme hesoid. Pour plus d'informations, consultez la
  documentation de la glibc.


  88..  MMoottss ddee ppaassssee SShhaaddooww aavveecc NNIISS eett PPAAMM

  L'utilisation des mots de passe Shadow avec NIS est toujours une
  mauvaise ide.  Vous perdez toute la scurit apporte par le systme
  Shadow. Une bonne faon d'viter les mots de passe Shadow avec NIS est
  de ne mettre dans le fichier /etc/shadow que les utilisateurs du
  systme local. Enlevez de la base de donnes Shadow toutes les entres
  correspondant aux utilisateurs NIS, et remettez les mots de passe dans
  /etc/passwd. Vous pourrez ainsi utiliser le systme Shadow pour le
  super-utilisateur (i.e. "root"), et les mots de passe classiques pour
  les utilisateurs NIS. Cette solution a l'avantage de pouvoir
  fonctionner avec tous les clients NIS.

  Si cette option n'est pas possible pour vous, il faudra utiliser la
  bibliothque GNU C 2.x. C'est la seule bibliothque libc pour Linux
  qui gre l'utilisation des mots de passe Shadow avec NIS. Sous Linux,
  la libc5 ne le permet pas. La libc5 compile avec le support de NYS
  contient une partie de code permettant le mlange Shadow - NIS, mais
  ce code prsente de srieuses erreurs dans certains cas et ne
  fonctionne pas correctement avec toutes les entres Shadow.

  Le problme suivant est PAM. La bibliothque GNU C gre l'utilisation
  des mots de passe Shadow avec NIS, mais PAM ne le fait pas,
  essentiellement  pam_pwdb/libpwdb.  C'est un gros problme pour les
  utilisateurs de RedHat 5.x. Si vous avez glibc et PAM, vous devez
  changer les entres dans /etc/pam.d/*. Changez toutes les entres de
  pam_pwdb par l'intermdiaire des modules pam_auth_unix_*. Cette
  mthode devrait fonctionner.


  99..  QQuuee ffaauutt--iill ppoouurr ccoonnffiigguurreerr NNIISS++ ??



  99..11..  LLeess pprrooggrraammmmeess


  Le code de NIS+ pour Linux a t dvelopp pour la bibliothque GNU C
  2.  Il existe galement une version pour la libc5 de Linux, puisque
  toutes les applications commerciales sont compiles en dition de lien
  avec cette bibliothque, et que vous ne pouvez pas les recompiler en
  utilisant la glibc. Il y a des problmes avec la libc5 et NIS+: Vous
  ne pourrez pas raliser d'dition de lien statique de vos programmes,
  et les programmes compils avec cette bibliothque ne fonctionneront
  pas avec les autres versions de la libc5.

  Vous devez rcuprer et recompiler la dernire version de la glibc2,
  et une distribution base sur cette bibliothque comme la Redhat
  Mustang ou l'instable Debian. Mais attention : il s'agit toujours
  d'une version bta. Lisez la documentation concernant la glibc et
  celle fournie par la distribution.  La glibc2.0.x ne gre pas
  pleinement NIS+, et ne l'intgrera jamais. La premire version avec la
  gestion NIS+ sera la 2.1.

  Les programmes clients NIS+ peuvent tre rcuprs sur les sites :


         Site                   Repertoire                 Nom du fichier

         ftp.kernel.org         /pub/software/libs/glibc   libc-*, glibc-crypt-*,
                                                           glibc-linuxthreads-*
         ftp.kernel.org         /pub/linux/utils/net/NIS+  nis-tools-1.4.2.tar.gz
         ftp.kernel.org         /pub/linux/utils/net/NIS+  pam_keylogin-1.2.tar.gz




  Les distributions bases sur la glibc peuvent tre rcupres sur les
  sites :


         Site                   Repertoire

         ftp.redhat.com         /pub/redhat/redhat-5.1
         ftp.debian.org         /pub/debian/dists/hamm


  Pour compiler la glibc, suivez les instructions livres avec les
  sources.  Vous pouvez trouver  l'adresse suivante la version patche
  de la libc5, base sur NYS et sur les sources de la glibc, qui peut
  tre utilise pour remplacer la libc5.



         Site                   Repertoire                 Nom du fichier

         ftp.kernel.org         /pub/linux/utils/net/NIS+  libc-5.4.44-nsl-0.4.10.tar.gz




  Vous pouvez galement consulter le site http://www-vt.uni-
  paderborn.de/~kukuk/linux/nisplus.html <http://www-vt.uni-
  paderborn.de/~kukuk/linux/nisplus.html> pour plus d'informations ainsi
  que pour avoir les dernires sources.


  99..22..  CCoonnffiigguurreerr uunn cclliieenntt NNIISS++


  IMPORTANT : pour configurer un client NIS+, lisez la documentation
  NIS+ Solaris pour voir ce qu'il convient de faire du ct serveur.  Ce
  document ne dcrit que le ct client !

  Aprs avoir install la nouvelle libc ainsi que nis-tools, crez les
  rfrences pour le nouveau client sur le serveur NIS+. Assurez vous
  que portmap est lanc.  Ensuite, vrifiez que votre PC Linux est  la
  mme heure que le serveur NIS+. Pour raliser des RPC scuriss, vous
  disposez d'une courte priode de 3 minutes, durant lesquelles les
  rfrences sont valides. Lancer xntpd sur toutes les machines peut
  tre une bonne ide. Aprs tout a, excutez les commandes suivantes :



       domainname nisplus.domain.
       nisinit -c -H <serveur NIS+>




  pour initialiser le systme de lancement. Lisez la page de manuel de
  nisinit pour connatre les diffrentes options existantes.  Assurez-
  vous que le nom de domaine est toujours bien positionn lors d'un
  ramorage. Si vous ne connaissez pas votre nom de domaine NIS+ sur
  votre rseau, demandez-le  votre administrateur systme.

  Pensez galement  modifier votre ficher /etc/nsswitch.conf.  Assurez-
  vous que le seul service situ avec publickey est nisplus ("publickey:
  nisplus"), et rien d'autre !

  Ensuite, lancez keyserv et assurez-vous qu'il sera toujours lanc lors
  de l'amorage de la machine. Lancez


       keylogin -r




  pour conserver la clef prive sur votre systme (j'espre que vous
  avez ajout la clef publique de la nouvelle machine sur le serveur
  NIS+ !).

  "niscat passwd.org_dir" doit dsormais vous donner toutes les entres
  contenues dans la base de donnes passwd.


  99..33..  NNIISS++,, kkeeyyllooggiinn,, llooggiinn eett PPAAMM

  Lorsque l'utilisateur se connecte, il a besoin de fixer sa clef
  secrte sur le serveur de clef. Cela est effectu en appelant
  keylogin.  Le login  partir du paquetage shadow fera cela  la place
  de l'utilisateur. Pour un login de type PAM, vous devez installer
  pam_keylogin-1.1.tar.gz et modifier le fichier /etc/pam.d/login pour
  utiliser pam_unix_auth, et non pwdb qui ne gre pas NIS+. Voici un
  exemple :



       #%PAM-1.0
       auth       required     /lib/security/pam_securetty.so
       auth       required     /lib/security/pam_keylogin.so
       auth       required     /lib/security/pam_unix_auth.so
       auth       required     /lib/security/pam_nologin.so
       account    required     /lib/security/pam_unix_acct.so
       password   required     /lib/security/pam_unix_passwd.so
       session    required     /lib/security/pam_unix_session.so





  99..44..  LLee ffiicchhiieerr nnsssswwiittcchh..ccoonnff


  Le fichier de configuration /etc/nsswitch.conf dtermine l'ordre dans
  lequel sont effectues les recherches de certaines informations, en
  fonction des donnes et des services, de la mme manire que le
  fichier /etc/host.conf dtermine la faon dont les recherches de noms
  de machines se font. Par exemple, la ligne



           hosts: files nisplus dns




  indique que la fonction de recherche doit dans un premier temps
  chercher dans le fichier local /etc/hosts, suivi par une recherche
  NIS+ et enfin _v_i_a le service de recherche de noms (/etc/resolv.conf et
  named).   ce moment l, si aucune machine n'est trouve, alors une
  erreur est renvoye.

  Voici un exemple de bon fichier /etc/nsswitch.conf














  # Un exemple de configuration de NSS. Ce fichier doit etre trie en
  # mettant en tete les services les plus utilises.
  #
  # L'entree '[NOTFOUND=return]' signifie que la recherche d'une entree
  # doit s'arreter si la recherche dans l'entree precedente n'a rien donne
  # Notez que si la recherche echoue pour tout autre raison
  # (par exemple, le serveur NIS ne repond pas), alors la recherche continue
  # avec l'entree suivante.
  #
  # Les entrees connues sont :
  #
  #       nisplus                 NIS+ (NIS version 3)
  #       nis                     NIS (NIS version 2), connu comme YP
  #       dns                     DNS (Domain Name Service)
  #       files                   Fichiers locaux
  #       db                      Bases de donnees /var/db
  #       [NOTFOUND=return]       Arret de la recherche si l'on a rien trouve
  #
  passwd:     compat
  # pour libc5: passwd: files nisplus
  group:      compat
  # pour libc5: group: files nisplus
  shadow:     compat
  # pour libc5: shadow: files nisplus

  passwd_compat: nisplus
  group_compat:  nisplus
  shadow_compat: nisplus

  hosts:      nisplus files dns

  services:   nisplus [NOTFOUND=return] files
  networks:   nisplus [NOTFOUND=return] files
  protocols:  nisplus [NOTFOUND=return] files
  rpc:        nisplus [NOTFOUND=return] files
  ethers:     nisplus [NOTFOUND=return] files
  netmasks:   nisplus [NOTFOUND=return] files
  netgroup:   nisplus
  bootparams: nisplus [NOTFOUND=return] files
  publickey:  nisplus
  automount:  files
  aliases:    nisplus [NOTFOUND=return] files





  1100..  CCoonnffiigguurreerr uunn sseerrvveeuurr NNIISS



  1100..11..  LLee pprrooggrraammmmee sseerrvveeuurr yyppsseerrvv


  Ce document ne dcrit que la manire de configurer le serveur NIS
  "ypserv".

  Les programmes serveur NIS peuvent tre trouvs sur :



         Site                   Repertoire                    Nom de fichier

         ftp.kernel.org         /pub/linux/utils/net/NIS      ypserv-1.3.2.tar.gz
         wauug.erols.com        /pub/net/nis                  ypserv-1.3.2.tar.gz

  Vous pouvez galement regarder le document http://www-vt.uni-
  paderborn.de/~kukuk/linux/nis.html <http://www-vt.uni-
  paderborn.de/~kukuk/linux/nis.html> pour obtenir de plus amples
  informations ainsi que les sources.

  La configuration du serveur est la mme que cela soit le NIS
  traditionnel ou NYS.

  Compilez les sources pour gnrer les programmes "ypserv" et
  "makedbm".  Si votre serveur est considr comme matre, dterminez
  quels fichiers vous souhaitez rendre disponibles via NIS et ajoutez ou
  supprimez les entres appropries dans /var/yp/Makefile.

  Il y a une seule grande diffrence entre ypserv 1.1 et ypserv 1.2.
  Depuis la version 1.2, ypserv utilise une mmoire cache pour les
  manipulations de fichiers.  Cela signifie que vous devez toujours
  appeler makedbm avec l'option -c si crez de nouvelles maps. Assurez-
  vous que vous utilisez le nouveau /var/yp/Makefile fourni avec ypserv
  1.2 ou une version suprieure, ou ajoutez l'option -c  makedbm dans
  le Makefile. Si vous ne le faites pas, ypserv continuera  utiliser
  les anciennes maps, et non les nouvelles.

  ditez ensuite /var/yp/securenets et /etc/ypserv.conf. Pour plus
  d'information, lisez les pages de manuel ypserv(8) et ypserv.conf(5).

  Assurez-vous que le portmapper (portmap(8)) fonctionne et lancez le
  serveur ypserv. La commande



           % rpcinfo -u localhost ypserv




  doit vous rpondre un message du genre



           program 100004 version 2 ready and waiting




  Maintenant, gnrez la base de donne NIS (YP).  Sur le serveur
  matre, lancez :



           % /usr/lib/yp/ypinit -m




  sur un esclave, assurez-vous que ypwhich -m fonctionne. C'est  dire
  que votre esclave doit tre configur en tant que client NIS, puis
  lancez:


           % /usr/lib/yp/ypinit -s masterhost




  pour que la machine soit un esclave NIS.

  a y est, votre serveur fonctionne.

  Si vous avez de plus gros problmes, vous pouvez lancer ypserv et
  ypbind en mode debug sur des xterms diffrents. La sortie cran du
  mode dbug devrait vous montrer ce qui ne va pas.

  Il est possible que vous souhaitiez ajouter les lignes suivantes sur
  le serveur esclave dans la crontab root :



             20 *    * * *    /usr/lib/yp/ypxfr_1perhour
             40 6    * * *    /usr/lib/yp/ypxfr_1perday
             55 6,18 * * *    /usr/lib/yp/ypxfr_2perday




  De cette manire, vous tes sr que les maps NIS sont synchronises et
  sont  jour, mme s'il peut arriver qu'une mise  jour soit rate
  parce que l'esclave tait arrt lors de la mise  jour du matre.

  Vous pouvez ajouter un esclave n'importe quand, ensuite. Tout d'abord,
  assurez-vous que le nouveau ypserv a les droits pour contacter le
  serveur matre. Ensuite, lancez


           % /usr/lib/yp/ypinit -s masterhost




  sur l'esclave, et ajoutez le nom du serveur au fichier
  /var/yp/ypservers. Aprs cela, lancez la commande "make" dans le
  rpertoire /var/yp pour mettre les maps  jour.

  Si vous souhaitez restreindre l'accs au serveur NIS, vous devez
  configurer le serveur NIS comme s'il tait galement un client en
  lanant ypbind et en ajoutant les entres "+" dans le fichier
  /etc/passwd. La bibliothque de fonctions va alors ignorer les entres
  normales aprs la premire entre NIS et va rcuprer le reste des
  informations en utilisant NIS.  C'est de cette manire que sont
  maintenues les rgles d'accs NIS.  Par exemple :



            root:x:0:0:root:/root:/bin/bash
            daemon:*:1:1:daemon:/usr/sbin:
            bin:*:2:2:bin:/bin:
            sys:*:3:3:sys:/dev:
            sync:*:4:100:sync:/bin:/bin/sync
            games:*:5:100:games:/usr/games:
            man:*:6:100:man:/var/catman:
            lp:*:7:7:lp:/var/spool/lpd:
            mail:*:8:8:mail:/var/spool/mail:
            news:*:9:9:news:/var/spool/news:
            uucp:*:10:50:uucp:/var/spool/uucp:
            nobody:*:65534:65534:noone at all,,,,:/dev/null:
            +miquels::::::
            +:*:::::/etc/NoShell
            [ Tous les utilisateurs normaux APRES cette ligne !]
            tester:*:299:10:Just a test account:/tmp:
            miquels:1234567890123:101:10:Miquel van Smoorenburg:/home/miquels:/bin/zsh



  L'utilisateur _t_e_s_t_e_r existera toujours mais il aura l'interprteur de
  commandes /etc/NoShell. L'utilisateur _m_i_q_u_e_l_s aura un accs normal.

  Sinon, vous pouvez galement diter le fichier /var/yp/Makefile et
  configurer NIS pour qu'il utilise un autre fichier passwd.  Sur de
  gros systmes, les fichiers passwd et group sont gnralement
  conservs dans le rpertoire /var/yp/ypfiles/. Si vous utilisez les
  outils standards pour administrer le fichier mot de passe ("passwd",
  "chfn", "adduser"), cela ne fonctionnera plus et devrez alors crer
  vos propres outils.

  Toutefois, yppasswd, ypchsh et ypchfn fonctionneront bien sur.


  1100..22..  LLee pprrooggrraammmmee sseerrvveeuurr yyppss


  Pour mettre en place le serveur NIS yps, consultez les paragraphes
  prcdents. Sa configuration est assez similaire sans tre exactement
  la mme, donc faites attention si vous essayez d'appliquer les
  instructions de ypserv  yps! Cependant, yps n'est plus maintenu par
  son auteur, et contient un certain nombre de failles de scurit. Vous
  devriez viter de vous en servir.

  Ce serveur NIS peut tre trouv sur :



           Site                Repertoire               Nom du Fichier

         ftp.lysator.liu.se  /pub/NYS/servers            yps-0.21.tar.gz





  1100..33..  LLee pprrooggrraammmmee rrppcc..yyppppaasssswwdddd

   chaque fois qu'un utilisateur change son mot de passe, le mot de
  passe de la  base de donnes NIS, ainsi que celui des autres bases de
  donnes NIS, doit tre mis  jour. Le programme rpc.yppasswd est un
  serveur qui gre les modifications de mot de passe et qui s'assure que
  les informations NIS seront correctement mises  jour. rpc.yppasswdd
  est dsormais intgr dans ypserv. Vous n'avez plus besoin des
  vieilles versions spares yppasswd-0.9.tar.gz ou
  yppasswd-0.10.tar.gz, et vous ne devriez plus les utiliser. La version
  de rpc.yppasswdd qui est comprise dans ypserv 1.3.2 gre totalement
  les Shadow. yppasswd fait maintenant parti de yp-tools-1.2.tar.gz.

  Le lancement de rpc.yppasswdd n'est ncessaire que sur le serveur
  matre.  Par dfaut, les utilisateurs ne sont pas autoriss  changer
  leur Nom complet (NDT: Prnom + Nom), ni leur shell. Vous pouvez
  cependant les y autoriser en utilisant l'option -e de chfn ou l'option
  -e de -e de chsh.


  1111..  VVrriiffiieerr ll''iinnssttaallllaattiioonn ddee NNIISS oouu ddee NNYYSS

  Si tout fonctionne correctement (comme cela devrait tre), vous
  devriez tre capable de vrifier votre installation avec quelques
  commandes simples. Supposons que le fichier de mots de passe soit gr
  par NIS, la commande




      % ypcat passwd




  devrait alors vous donner le contenu du fichier des mots de passe.  La
  commande



           % ypmatch id_utilisateur passwd




  (o _i_d___u_t_i_l_i_s_a_t_e_u_r est le nom de login d'un utilisateur) devrait vous
  donner l'entre de l'utilisateur dans le fichier des mots de passe
  NIS.  Les commandes ypcat et ypmatch doivent tre incluses dans la
  distribution du NIS (ou NYS) traditionnel.

  Si un utilisateur ne peut pas se connecter, lancez le programme
  suivant sur la machine cliente :



       #include <stdio.h>
       #include <pwd.h>
       #include <sys/types.h>

       int
       main(int argc, char *argv[])
       {
         struct passwd *pwd;

         if(argc != 2)
           {
             fprintf(stderr,"Usage: getwpnam username\n");
             exit(1);
           }

         pwd=getpwnam(argv[1]);

         if(pwd != NULL)
           {
             printf("name.....: [%s]\n",pwd->pw_name);
             printf("password.: [%s]\n",pwd->pw_passwd);
             printf("user id..: [%d]\n", pwd->pw_uid);
             printf("group id.: [%d]\n",pwd->pw_gid);
             printf("gecos....: [%s]\n",pwd->pw_gecos);
             printf("directory: [%s]\n",pwd->pw_dir);
             printf("shell....: [%s]\n",pwd->pw_shell);
           }
         else
           fprintf(stderr,"User \"%s\" not found!\n",argv[1]);

         exit(0);
       }




  Faites tourner ce programme avec le nom de l'utilisateur en paramtre.
  Il va afficher toutes les informations renvoyes par la fonction
  getpwnam concernant l'utilisateur.  Cela peut vous permettre de savoir
  si l'entre est correcte. Un problme assez frquemment rencontr est
  une redfinition du champ de mot de passe par un "*".
  1122..  PPrroobbllmmeess eett eerrrreeuurrss ddee ffoonnccttiioonnnneemmeenntt ddee NNIISS

  Voici certains problmes rencontrs par diffrents utilisateurs :


  1. Les bibliothques 4.5.19 sont dfectueuses. NIS ne fonctionnera pas
     avec.

  2. Si vous faites une mise  jour de 4.5.19  4.5.24 alors la commande
     su plante. Vous devez rcuprer la commande su  partir de la
     distribution de la _s_l_a_c_k_w_a_r_e 1.2.0 ou suprieure. ventuellement,
     vous pouvez galement y rcuprer les bibliothques mises  jour.

  3. Vous pouvez avoir quelques problmes avec NIS et DNS sur la mme
     machine si vous utilisez une vieille distribution en _a_._o_u_t.  Le
     serveur DNS ne supporte pas toujours NIS.

  4. Lorsqu'un serveur NIS tombe et est relanc, ypbind dmarre avec des
     messages du genre :

              yp_match: clnt_call:
                          RPC: Unable to receive; errno = Connection refused



  et les logins sont refuss pour les utilisateurs rfrencs dans la
  base de donne NIS. Loguez vous en tant que root si vous le pouvez,
  tuez ypbind puis relancez-le.

  5. Aprs avoir mis  jour la libc version suprieure  5.4.20, les
     outils YP ne fonctionneront plus. Vous devez utiliser les yp-tools
     version 1.2 ou suprieure pour la libc >= 5.4.21 et glibc 2.x, et
     la version yp-clients 2.2 pour les versions prcdentes.  yp-tools
     2.0 devrait fonctionner avec toutes les bibliothques.

  6. Dans les libc 5.4.21 - 5.4.35, yp_maplist est dfectueux.  Vous
     devrez prendre une version 5.4.36 ou suprieure, sinon, certains
     programmes pour YP comme ypwhich gnreront une erreur _s_e_g_._f_a_u_l_t.

  7. La libc5 avec le NIS traditionnel ne gre pas l'utilisation des
     mots de passe Shadow avec NIS. Vous devez donc utiliser la libc5
     avec NYS ou la glibc 2.x.

  8. ypcat shadow ne montre pas la map Shadow. C'est l quelque chose de
     correct, puisque le nom de la map Shadow est "shadow.byname", et
     non "shadow".


  1133..  FFAAQQ :: LLeess qquueessttiioonnss lleess pplluuss ffrrqquueemmmmeenntt ppoosseess

  Bon nombre de questions doivent tre rsolues dsormais. Si vous avez
  des questions sans rponse, vous pouvez poster un message dans les
  forums de discussion :


           comp.os.linux.help




  ou



           comp.os.linux.networking

  ou contacter l'un des auteurs de ce HOWTO.

































































  Rseau sous Linux :
  Auteur : Joshua Drake poet@linuxports.com
  v1.6.2, Dcembre 1999

  (Traduction et trahison de Jacques.Chion@wanadoo.fr, un grand merci 
  Jean-Albert Ferrez, Bernard Choppy et ric Dumas pour leur aide) Un
  document www.linuxports.com pour le LDP: Linux Documentation Project.
  ______________________________________________________________________

  Table des matires
























































  1. Introduction.

  2. Histoire de ce document

     2.1 Retour d'informations

  3. Comment utiliser ce document.

     3.1 Les conventions utilises dans ce document

  4. Informations gnrales concernant le rseau  sous Linux.

     4.1 Informations sur la couche rseau de Linux.
     4.2 O obtenir des informations sur le rseau,  non spcifiques de Linux.

  5. Informations gnrales concernant la configuration rseau

     5.1 De quoi ai-je besoin pour dmarrer ?
        5.1.1 Sources du noyau rcents (Optionnel).
        5.1.2 Adresses et explications.
     5.2 O mettre les commandes de configuration ?
     5.3 Crer vos interfaces rseau
     5.4 Configurer une interface rseau. Noyaux 2.0 et 2.2
     5.5 Configurer votre solveur de noms
        5.5.1 Qu'y a-t-il dans un nom ?
        5.5.2 Les informations ncessaires
        5.5.3 /etc/resolv.conf
        5.5.4 /etc/hosts
        5.5.5 Faire tourner un serveur de noms
     5.6 Configurer votre interface loopback
     5.7 Routage
        5.7.1 Alors, que fait le programme
     5.8 Configurer vos serveurs rseau et les services.
        5.8.1 (TT
           5.8.1.1 Exemple de fichier
        5.8.2 (TT
           5.8.2.1 Exemple de fichier
     5.9 Autres fichiers de configuration ayant un rapport avec le rseau
        5.9.1 (TT
        5.9.2 (TT
     5.10 Scurit rseau et contrle d'accs
        5.10.1 /etc/ftpusers
        5.10.2 /etc/securetty
        5.10.3 Le mcanisme de contrle d'accs des htes
           5.10.3.1 /etc/hosts.allow
           5.10.3.2 /etc/hosts.deny
        5.10.4 /etc/hosts.equiv
        5.10.5 Configurer votre dmon
        5.10.6 Pare-feu (Firewall) sur le rseau
        5.10.7 Autres suggestions

  6. Informations sur Ethernet

     6.1 Cartes Ethernet supportes
        6.1.1 3Com
        6.1.2 AMD, ATT, Allied Telesis, Ansel, Apricot
        6.1.3 Cabletron, Cogent, Crystal Lan
        6.1.4 Danpex, DEC, Digi, DLink
        6.1.5 Fujitsu, HP, ICL, Intel
        6.1.6 KTI, Macromate, NCR NE2000/1000, Netgear, New Media
        6.1.7 PureData, SEEQ, SMC
        6.1.8 Sun Lance, Sun Intel, Schneider, WD, Zenith, IBM, Enyx
     6.2 Informations gnrales sur Ethernet
     6.3 Utiliser plusieurs cartes Ethernet sur la mme machine
        6.3.1 Si le gestionnaire est sous forme de module (habituellement avec les nouvelles distributions)

  7. Informations relatives  l'IP

     7.1 DHCP et DHCPD
     7.2 Rglage d'un client DHCP pour les utilisateurs de LinuxConf
     7.3 Rglage d'un serveur DHCP sous Linux
        7.3.1 Options de DHCPD
        7.3.2 Dmarrage du serveur
     7.4 EQL - galiseur de charge  lignes multiples
     7.5 Enregistrement IP (IP Accounting) (pour Linux-2.0)
        7.5.1 Enregistrement IP (IP Accounting) (pour Linux-2.2)
     7.6 IP Aliasing
     7.7 IP Pare-feu (Firewall) (pour Linux-2.0)
        7.7.1 Pare-feu IP (pour Linux-2.2)
     7.8 Encapsulation IPIP
        7.8.1 Une configuration de rseau avec tunneling.
        7.8.2 Une configuration d'hte pour l'encapsulation IPIP.
     7.9 IP Masquerade
        7.9.1 Masquerading avec IPFWADM
        7.9.2 Masquerading avec IPCHAINS
     7.10 IP Transparent Proxy
     7.11 IPv6
     7.12 IP Mobile
     7.13 Multicast
     7.14 Mise en forme du trafic - Changer la bande passante alloue

  8. Routage avec Linux-2.2

     8.1 Les bases
        8.1.1 Utiliser les informations
     8.2 Ajouter une route avec les nouveaux outils ip
     8.3 Utiliser NAT avec le noyau 2.2

  9. Utilisation du matriel courant pour PC

     9.1 RNIS
     9.2 PLIP pour Linux-2.0
        9.2.1 PLIP pour Linux-2.2
     9.3 PPP
        9.3.1 Maintenance d'une connexion permanente avec le rseau  l'aide de
     9.4 Client SLIP (Antique)
        9.4.1 dip
        9.4.2 slattach
        9.4.3 Quand utiliser quoi ?
        9.4.4 Serveur SLIP statique avec une ligne tlphonique  et DIP
        9.4.5 Serveur SLIP dynamique avec une ligne tlphonique et DIP
        9.4.6 Utiliser DIP
        9.4.7 Connexion permanente SLIP utilisant une ligne et slattach
        9.4.8 Serveur SLIP
        9.4.9 Serveur SLIP utilisant
        9.4.10 O obtenir
        9.4.11 Configurer
        9.4.12 Configurer
        9.4.13 Configurer le fichier
        9.4.14 Configurer le fichier
        9.4.15 Configurer le fichier
        9.4.16 Serveur Slip utilisant
        9.4.17 Configurer
        9.4.18 Serveur SLIP utilisant l'ensemble

  10. Autres technologies rseau

     10.1 ARCNet
     10.2 Appletalk (
        10.2.1 Configurer le support Appletalk.
        10.2.2 Exporter un systme de fichiers Linux avec Appletalk.
        10.2.3 Tester Appletalk.
        10.2.4 Autres informations
     10.3 ATM
     10.4 AX25 (
     10.5 DECNet
     10.6 FDDI (Fiber Distributed Data Interface)
     10.7 Relais de trames (Frame Relay)
     10.8 IPX (
     10.9 NetRom (
     10.10 Protocole Rose (
     10.11 Support SAMBA - `NetBEUI', `NetBios', `CIFS'.
     10.12 Support STRIP (Starmode Radio IP)
     10.13 Token Ring
     10.14 X.25
     10.15 Carte WaveLan

  11. Cbles et cblages

     11.1 Cble srie NULL Modem
     11.2 Cble port parallle (cble PLIP)
     11.3 Cblage Ethernet 10base2 (coaxial fin)
     11.4 Cblage Ethernet  paires torsades

  12. Glossaire des termes utiliss dans ce document.

  13. Copyright.

  14. Note du traducteur



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn..

  Les mises  jour de ce document se trouvent en premier lieu sur
  http://www.linuxports.com.

  Auparavant ce document s'appelait NET3-4-HOWTO et NET-3-HOWTO. Je
  pense que ce n'tait pas vident pour tout le monde. Je l'ai donc
  renomm Net-HOWTO.

  Vous pouvez contribuer  ce document en allant sur
  http://beta.linuxports.com/howto/networking/update.phtm. Si vous
  voulez ajouter quelque chose  ce document, vous pouvez le faire sur
  la page http://www.linuxports.com/howto.networking/updates.phtml.





  22..  HHiissttooiirree ddee ccee ddooccuummeenntt

  Le premier document NET-FAQ fut crit par Matt Welsh et Terry Dawson
  pour rpondre aux questions frquemment poses concernant les rseaux
  sous Linux, ceci au moment o le LPD (Linux Documentation Project)
  dmarrait tout juste.  Il s'agissait alors des toutes premires
  versions de dveloppement du noyau rseau sous Linux.  Le document
  NET-2-HOWTO, qui succda au NET-FAQ, fut l'un des premiers documents
  du LDP HOWTO et il traitait de ce qui fut appel version 2 (et plus
  tard version 3) du logiciel rseau du noyau Linux.  Ce document prend
  la suite  son tour et ne traite que de la version 4 du noyau rseau
  Linux et plus spcialement des versions du noyau 2.x et 2.2.x.

  Les versions prcdentes de ce document taient devenues plutt
  normes en raison du grand nombre de sujets abords. Pour rsoudre ce
  problme, un certain nombre de documents HOWTO ont t crs et
  traitent de sujets spcifiques.  Ce document fait rfrence  ceux qui
  sont pertinents et aborde les sujets qui ne sont pas encore couverts
  par d'autres documents.


  22..11..  RReettoouurr dd''iinnffoorrmmaattiioonnss

  Nous apprcions toujours les retours d'informations.  Contactez-nous
  s'il vous plait : poet@linuxports.com.

  Encore une fois, si vous trouvez quelque chose d'erron ou bien si
  vous dsirez que l'on ajoute quelque chose, contactez-nous.


  33..  CCoommmmeenntt uuttiilliisseerr ccee ddooccuummeenntt..

  Ce document est organis de manire  tre lu progressivement.  Les
  premires sections traitent d'informations sur le matriel et peuvent
  tre passes si cela ne vous intresse pas. Ensuite, vous trouverez
  une discussion gnrale sur les rseaux, et vous devez tre certains
  de l'avoir assimile avant de poursuivre vers les paragraphes plus
  spcifiques. Le reste traite l'aspect plus technique, et est regroup
  en trois parties principales : informations sur Ethernet et IP, les
  technologies concernant le matriel PC le plus courant, et les
  technologies moins rpandues.


  La dmarche que je suggre pour parcourir ce document est donc la
  suivante :




     LLiirree lleess sseeccttiioonnss ggnnrraalleess
        Ces paragraphes s'appliquent  chaque, ou presque, technologie
        dcrite plus loin et il est donc important que vous les ayez
        comprises.  D'autre part, j'espre que de nombreux de lecteurs
        connaissent dj le sujet.



     RRffllcchhiisssseezz  vvoottrree rrsseeaauu
        Vous devez savoir comment votre rseau est (ou sera) conu et
        quels matriels et types de technologies vous utiliserez.




     LLiisseezz llaa sseeccttiioonn ````EEtthheerrnneett eett IIPP'''' ssii vvoouuss tteess ccoonnnneeccttss eenn
        ddiirreecctt
        sur un rseau local ou  l'Internet" Cette section traite de la
        configuration de base d'Ethernet et des diffrentes possibilits
        offertes par Linux, et qui concernent le rseau, telles que le
        pare-feu, le routage avanc, etc..


     LLiisseezz aapprrss ssii vvoouuss tteess iinnttrreessssss ppaarr lleess rrsseeaauuxx llooccaauuxx  bbaass
        ccoott
        ou les connexions par tlphone" Cette section parle de PLIP,
        PPP, SLIP, et RNIS, les technologies utilises habituellement
        sur les stations personnelles.


     LLiisseezz llaa sseeccttiioonn ccoonncceerrnnaanntt llaa tteecchhnnoollooggiiee qquuii ccoorrrreessppoonndd
        plus particulirement  vos besoins."  Si vos besoins ne
        concernent pas IP et/ou un matriel courant, vous trouverez  la
        fin des dtails sur les protocoles non-IP et les matriels de
        communication particuliers.


     CCoonnffiigguurreezz vvoottrree rrsseeaauu
        Si vous allez rellement essayer de configurer votre rseau,
        prenez soigneusement note de tout problme ventuel.


     CChheerrcchheezz ddee ll''aaiiddee ssii nncceessssaaiirree
        Si vous rencontrez des problmes qui ne sont pas traits dans ce
        document, reportez-vous au paragraphe donnant les endroits o
        l'on peut en obtenir ou bien envoyer des reports de bogues.

     AAmmuusseezz--vvoouuss!!
        Le rseau est amusant, profitez-en.



  33..11..  LLeess ccoonnvveennttiioonnss uuttiilliisseess ddaannss ccee ddooccuummeenntt

  Il n'y a pas de convention spciale utilise dans ce document, mais
  vous devez faire attention  la faon dont les commandes sont
  spcifies. En consultant la documentation habituelle d'Unix, toute
  commande qui doit tre tape est prcde d'une invite du shell.  Ce
  document utilise "user%" comme invite pour les commandes ne
  ncessitant pas de privilges de superutilisateur, et "root#" pour les
  commandes que l'on doit excuter comme super-utilisateur (root).  Je
  prfre utiliser "root#"  la place du classique "#" pour viter toute
  confusion avec les extraits de scripts shell, ou le signe dise est
  utilis pour dfinir les lignes de commentaires.




  Lorsque les ``Options de Compilation du noyau'' sont mentionnes,
  elles le sont avec le format utilis par _m_e_n_u_c_o_n_f_i_g. Elles devraient
  donc tre comprhensibles mme si vous (comme moi) n'tes pas
  familiers avec _m_e_n_u_c_o_n_f_i_g. Si vous avez un doute sur l'utilisation
  d'options, faites tourner le programme une fois. Cela ne peut que vous
  aider.



  44..  ssoouuss LLiinnuuxx..  IInnffoorrmmaattiioonnss ggnnrraalleess ccoonncceerrnnaanntt llee rrsseeaauu


  44..11..  IInnffoorrmmaattiioonnss ssuurr llaa ccoouucchhee rrsseeaauu ddee LLiinnuuxx..

  Il existe un grand nombre d'endroits o l'on peut trouver de bonnes
  informations sur le rseau Linux.

  Il y a un tas de spcialistes disponibles. On peut en trouver une
  liste sur LinuxPorts Consultants Database.

  Alan Cox, l'actuel mainteneur du code rseau Linux entretient une page
  web contenant les points principaux du rseau actuel, et ses nouveaux
  dveloppements,  l'adresse : www.uk.linux.org.

  Il existe un groupe de discussion ddi au rseau et, en ce qui le
  concerne dans la hirarchie Linux, c'est : comp.os.linux.networking

  Il existe une liste de diffusion  laquelle vous pouvez vous inscrire,
  et o vous pourrez poser des questions en relation avec le rseau
  Linux.  Pour souscrire vous devez envoyer un message par courrier
  lectronique :
       To: majordomo@vger.rutgers.edu
       Subject: (rien du tout)
       Message:

       subscribe linux-net




  Souvenez-vous lorsque vous faites part d'un problme d'y inclure le
  plus possible de dtails ncessaires. Plus spcialement indiquez les
  versions des logiciels que vous utilisez, en particulier la version du
  noyau, les versions des outils tels que _p_p_p_d ou _d_i_p, et la nature
  exacte des problmes que vous rencontrez. Cela veut dire prendre note
  de la syntaxe exacte des messages d'erreurs que vous recevez, et les
  commandes que vous avez excutes.


  44..22..  nnoonn ssppcciiffiiqquueess ddee LLiinnuuxx..  OO oobbtteenniirr ddeess iinnffoorrmmaattiioonnss ssuurr llee
  rrsseeaauu,,

  si vous dsirez des informations gnrales de base sur tcp/ip, alors
  je vous recommande de regarder les documents suivants :



     iinnttrroodduuccttiioonn  TTCCPP//IIPP
        ce document se trouve  la fois sur en version texte et en
        version postscript.


     aaddmmiinniissttrraattiioonn TTCCPP//IIPP
        ce document se trouve  la fois sur en version texte et en
        version postscript.


  Si vous recherchez des informations plus dtailles je vous recommande
  chaudement :


       _I_n_t_e_r_n_e_t_w_o_r_k_i_n_g _w_i_t_h _T_C_P_/_I_P_, _V_o_l_u_m_e _1 _: _p_r_i_n_c_i_p_e_s_, _p_r_o_t_o_
       _c_o_l_e_s _e_t _a_r_c_h_i_t_e_c_t_u_r_e_s, par Douglas E. Comer,ISBN
       0-13-227836-7, Prentice Hall publications, 3me dition,
       1995.


  Si vous voulez apprendre comment crire des applications rseau dans
  un environnement compatible Unix, je vous recommande galement
  chaudement :


        _U_n_i_x _N_e_t_w_o_r_k _P_r_o_g_r_a_m_m_i_n_g par W. Richard Stevens ISBN
       0-13-949876-1, Prentice Hall publications, 1990.


  Une deuxime dition de ce livre va apparaitre sur les rayons : le
  nouveau livre comporte 3 volumes : voyez le site de Prentice Hall pour
  en savoir plus.


  Vous pouvez essayer aussi le groupe de discussions :
  comp.protocols.tcp-ip.

  Une importante source d'informations techniques concernant l'Internet
  et la suite des protocoles TCP/IP sont les RFC. RFC est l'acronyme de
  `Request For Comment' et c'est le moyen habituel de soumettre et de
  s'informer des normes de protocoles Internet.  Il y a beauccoup
  d'endroits o sont stockes ces RFC. Un grand nombre sont des sites
  ftp, d'autres fournissent des accs WWW avec un moteur de recherche
  qui fouille dans les bases de donnes RFC avec des mots-cls
  particuliers.

  Une source possible de RFC est : la base de donnes RFC de Nexor.



  55..  IInnffoorrmmaattiioonnss ggnnrraalleess ccoonncceerrnnaanntt llaa ccoonnffiigguurraattiioonn rrsseeaauu

  Vous devez connatre et bien comprendre les paragraphes suivants avant
  d'essayer de configurer votre rseau.  Ce sont des principes de base
  qui s'appliquent, indpendamment de la nature du rseau que vous
  voulez mettre en place.



  55..11..  DDee qquuooii aaii--jjee bbeessooiinn ppoouurr ddmmaarrrreerr ??

  Avant de commencer  construire ou configurer votre rseau, vous aurez
  besoin de certaines choses. Les plus importantes sont :



  55..11..11..  SSoouurrcceess dduu nnooyyaauu rrcceennttss ((OOppttiioonnnneell))..

   noter:

  La majorit des distributions actuelles sont livres avec l'option
  rseau active, de sorte que vous n'avez pas besoin de recompiler le
  noyau. Si vous utilisez du matriel bien connu, tout ira bien. Par
  exemple: cartes 3COM, cartes NE2000  ou cartes Intel. Cependant si
  vous devez recompiler le noyau, voyez les informations qui suivent.


  Si le noyau que vous utilisez actuellement ne gre pas les types de
  rseau ou les cartes que vous voulez utiliser, vous aurez besoin des
  sources du noyau pour pouvoir le recompiler avec les options
  adquates.

  Pour les utilisateurs des principales distributions comme RedHat,
  Caldera, Debian ou Suse, ce n'est plus vrai. Tant que vous restez avec
  un matriel de grande diffusion, il n'est pas ncessaire de recompiler
  le noyau,  moins que vous n'ayez une exigence trs spcifique.


  Vous pouvez toujours obtenir les sources du dernier noyau sur :
  ftp.cdrom.com.  Ce n'est pas le site officiel mais ils ont BEAUCOUP de
  bande passante et BEAUCOUP d'utilisateurs peuvent se connecter en mme
  temps. Le site officiel est kernel.org, mais dans la mesure du
  possible, utilisez s'il vous plat celui que je viens de donner.
  Souvenez-vous que ftp.kernel.org est particulirement surcharg.
  Utilisez un miroir.  (NdT : et bien sr ftp.lip6.fr) .

  Normalement les sources du noyau doivent tre dsarchives dans le
  rpertoire /usr/src/linux.  Pour savoir comment appliquer les patches
  et compiler le noyau, lisez le Kernel-HOWTO.  Pour savoir comment
  configurer les modules du noyau, lisez le ``Modules-mini-HOWTO''.
  Enfin, le fichier README qui se trouve dans les sources du noyau ainsi
  que le rpertoire Documentation donnent de nombreux renseignements au
  lecteur courageux.

  Sauf indication contraire, je vous recommande de vous en tenir  une
  version stable du noyau (celle avec un chiffre pair en seconde place
  dans le numro de version). Les versions de dveloppement (avec un
  chiffre impair en seconde place dans le numro de version) peuvent
  avoir une structure ou autre chose qui peut poser problme avec les
  logiciels de votre systme. Si vous n'tes pas certain de rsoudre ce
  type de problmes, avec en plus ceux qui existeraient sur d'autres
  logiciels, ne les utilisez pas.



  55..11..22..  AAddrreesssseess eett eexxpplliiccaattiioonnss..

  Les adresses de protocole Internet (IP) sont composes de quatre
  octets. La convention d'criture est appele `notation dcimale
  pointe'. Sous cette forme chaque octet est converti en un nombre
  dcimal (0-255), en omettant les zros de tte ( moins que ce nombre
  ne soit lui-mme un zro) et chaque octet est spar par le caractre
  `.'.  Par convention, chaque interface d'un hte ou routeur possde
  une adresse IP. Il est permis, dans certaines circonstances, que la
  mme adresse IP soit utilise sur diffrentes interfaces d'une mme
  machine, mais, en gnral, chaque interface possde sa propre adresse.

  Les rseaux IP (Protocole Internet) sont des squences contigus
  d'adresses IP. Toutes les adresses d'un mme rseau ont des chiffres
  en commun.  La partie d'adresse commune  toutes les adresses d'un
  rseau s'appelle la `partie rseau' de l'adresse. Les chiffres
  restants s'appellent `partie hte'. Le nombre de bits qui sont
  partags par toutes les adresses d'un mme rseau est appel masque de
  rseau (netmask) et c'est le rle du masque de rseau de dterminer
  quelles adresses appartiennent  `son' rseau et celles qui ne sont
  pas concernes.  Par exemple :



       ----------------------------------------     ----------------
       Adresse hte (host address)                  192.168.110.23
       Masque de rseau (network mask)              255.255.255.0
       Partie rseau (network portion)              192.168.110.
       Partie hte (host portion)                              .23
       ----------------------------------------     ----------------
       Adresse rseau (network address)             192.168.110.0
       Adresse de diffusion (broadcast address)     192.168.110.255
       ----------------------------------------     ----------------





  Toute adresse qui est un `AND bit  bit' avec son masque de rseau
  rvlera l'adresse du rseau auquel elle appartient.  L'adresse du
  rseau est par consquent l'adresse de plus petit nombre dans
  l'ensemble des adresses et a toujours la partie hte code avec des
  zros.

  L'adresse de diffusion est une adresse spciale que chaque hte du
  rseau coute en mme temps que son adresse personnelle.  Cette
  adresse est celle  laquelle les datagrammes sont envoys si tous les
  htes du rseau sont en mesure de les recevoir.  Certains types de
  donnes telles que les informations de routage et les messages
  d'alerte sont transmis vers l'adresse de diffusion de telle sorte que
  tous les htes du rseau peuvent les recevoir en mme temps.  Il y a
  deux standards utiliss de manire courante pour dfinir ce que doit
  tre l'adresse de diffusion. Le plus largement utilis est de prendre
  l'adresse la plus haute possible du rseau comme adresse de diffusion.
  Dans l'exemple ci-dessus ce serait 192.168.110.255. Pour d'autres
  raisons, certains sites ont adopt la convention d'utiliser l'adresse
  de rseau comme adresse de diffusion. En pratique cela n'a pas
  beaucoup d'importance, mais vous devez tre srs que tous les htes du
  rseau sont configurs avec la mme adresse de diffusion.

  Pour des raisons d'administration, il y a quelque temps, lors du
  dveloppement du protocole IP, des ensembles d'adresses ont t
  organiss en rseaux et ces rseaux ont t regroups en ce que l'on a
  appell classes. Ces classes donnent un certain nombre de rseaux de
  tailles standards auxquels on peut assigner des adresses. Ces classes
  sont :



       ----------------------------------------------------------
       |Classe de |Masque de     | Adresses de rseau           |
       | rseau   |  rseau      |                              |
       ----------------------------------------------------------
       |    A    | 255.0.0.0     | 0.0.0.0    - 127.255.255.255 |
       |    B    | 255.255.0.0   | 128.0.0.0  - 191.255.255.255 |
       |    C    | 255.255.255.0 | 192.0.0.0  - 223.255.255.255 |
       |Multicast| 240.0.0.0     | 224.0.0.0  - 239.255.255.255 |
       ----------------------------------------------------------





  Le type d'adresse que vous devez utiliser dpend de ce que vous voulez
  faire exactement. Vous pouvez utiliser une combinaison des actions
  suivantes pour obtenir l'ensemble des adresses dont vous aurez besoin
  :



     IInnssttaalllleerr uunnee mmaacchhiinnee LLiinnuuxx ssuurr uunn rrsseeaauu IIPP eexxiissttaanntt
        Vous devez contacter un des administrateurs du rseau et lui
        demander les informations suivantes :

       Adresse hte;

       Adresse rseau;

       Adresse de diffusion;

       Masque de rseau;

       Adresse de routage;

       Adresse du serveur de noms de domaine (DNS).

        Vous configurerez alors votre rseau Linux  l'aide de ces
        donnes.  Vous ne pouvez pas les inventer vous-mme et esprer
        que votre configuration fonctionne.

     CCoonnssttrruuiirree uunn rrsseeaauu ttoouutt nneeuuff nnoonn ccoonnnneecctt 
        l'Internet" Si vous construisez un rseau priv et que vous
        n'ayez pas l'intention de vous connecter  l'Internet, vous
        pouvez alors choisir n'importe quelle adresse.  Cependant, pour
        des raisons de scurit et de fiabilit, il y a quelques
        adresses de rseau IP rserves  cet usage. Elles sont
        spcifies dans la RFC 1597 et sont les suivantes :






     -----------------------------------------------------------
     |         ALLOCATIONS POUR RSEAUX PRIVS                 |
     -----------------------------------------------------------
     | Classe  | Masque de     | Adresses de rseau            |
     | rseau  |  rseau       |                               |
     -----------------------------------------------------------
     |    A    | 255.0.0.0     | 10.0.0.0    - 10.255.255.255  |
     |    B    | 255.255.0.0   | 172.16.0.0  - 172.31.255.255  |
     |    C    | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 |
     -----------------------------------------------------------




     Vous devez d'abord dcider de la dimension de votre rseau et
     choisir ensuite les adresses dont vous avez besoin.



  55..22..  OO mmeettttrree lleess ccoommmmaannddeess ddee ccoonnffiigguurraattiioonn ??

  Il y a plusieurs possibilits de procdures de dmarrage d'un systme
  Linux. Aprs le dmarrage du noyau, celui-ci excute toujours un
  programme appel `_i_n_i_t'. Ce programme lit le fichier de configuration
  appel /etc/inittab et commence le processus de dmarrage. Il y a
  quelques variantes de _i_n_i_t, bien que maintenant tout le monde se
  dirige vers la variante System V (cinq), dveloppe par Miguel van
  Smoorenburg.

  Bien que que le programme _i_n_i_t soit toujours le mme, les rglages du
  processus de dmarrage se font diffremment suivant le type de
  distribution.  Habituellement le fichier /etc/inittab contient une
  entre telle que :



       si::sysinit:/etc/init.d/boot




  Cette ligne spcifie le nom du fichier script qui prend en charge
  rellement la squence de dmarrage. Ce fichier est en quelque sorte
  quivalent au fichier MS-DOS AUTOEXEC.BAT.

  Il y a aussi d'autres scripts appels par le script de dmarrage, et
  souvent le rseau est configur dans l'un de ceux-ci.

  Le tableau suivant peut tre utilis comme guide suivant le systme
  que vous avez :



       -------------------------------------------------------------------------------
       Distrib. |Interface Config/Routage           | Initialisation serveur
       -------------------------------------------------------------------------------
       Debian   | /etc/init.d/network               | /etc/rc2.d/*
       -------------------------------------------------------------------------------
       Slackware| /etc/rc.d/rc.inet1                | /etc/rc.d/rc.inet2
       -------------------------------------------------------------------------------
       RedHat   | /etc/rc.d/init.d/network          | /etc/rc.d/rc3.d/*
       -------------------------------------------------------------------------------




  Notez que les distributions Debian et RedHat utilisent tout un
  rpertoire pour les scripts qui mettent en route les services du
  systme (et habituellement l'information ne se situe pas dans ces
  fichiers, par exemple les systmes RedHat stockent l'ensemble de la
  configuration du systme sous /etc/sysconfig, o elle est rcupre
  par les scripts de dmarrage). Si vous voulez saisir les dtails du
  processus de dmarrage, je vous conseille de vrifier _/_e_t_c_/_i_n_i_t_t_a_b
  ainsi que la documentation accompagnant _i_n_i_t. Linux Journal va
  galement publier un article sur l'initialisation des systmes, et
  nous pointerons sur lui ds qu'il sera disponible sur le rseau.


  La plupart des distributions rcentes incluent un programme qui permet
  de configurer de nombreux types d'interfaces rseau. Si vous en
  possdez une, regardez si ce programme vous convient au lieu de tenter
  une configuration manuelle.




       -----------------------------------------
       Distrib   | Programme de configuration rseau
       -----------------------------------------
       RedHat    | /sbin/netcfg
       Slackware | /sbin/netconfig
       -----------------------------------------






  55..33..  CCrreerr vvooss iinntteerrffaacceess rrsseeaauu

  Sur un grand nombre de systmes Unix, les priphriques rseau
  apparaissent dans le rpertoire _/_d_e_v . Il n'en est pas de mme avec
  Linux. Les priphriques rseau  sont crs dynamiquement par les
  logiciels et ne ncessitent donc pas de fichiers de priphriques.

  Dans la majorit des cas, le priphrique rseau est automatiquement
  cr par le gestionnaire de priphrique lors de son initialisation
  par le noyau.  Par exemple le pilote Ethernet cre les interfaces
  eth[0..n] une par une lorsqu'il dtecte votre matriel Ethernet. La
  premire carte Ethernet trouve devient eth0, la deuxime eth1, etc.

  Cependant, dans certains cas, notamment avec _S_L_I_P et _P_P_P, les
  priphriques rseau sont crs par un programme utilisateur. Le mme
  mcanisme squentiel s'applique sur les priphriques, mais ce n'est
  pas au moment du dmarrage du systme. La raison en est que, 
  l'inverse des dispositifs Ethernet, le nombre de priphriques _S_L_I_P ou
  _P_P_P actifs peut varier dans le temps.  Nous y reviendrons plus tard.



  55..44..  CCoonnffiigguurreerr uunnee iinntteerrffaaccee rrsseeaauu.. NNooyyaauuxx 22..00 eett 22..22

  Lorsque vous avez tous les programmes requis, votre adresse et les
  informations rseau, vous pouvez alors configurer vos interfaces.
  Lorsque nous parlons de la configuration d'interface, nous faisons
  allusion au processus d'assignation des adresses du priphrique
  rseau, et au processus de rglage des paramtres configurables.  Le
  programme le plus utilis pour ce faire est la commande _i_f_c_o_n_f_i_g
  (interface configure).

  Typiquement vous utilisez une commande comme ci-dessous :

  root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up




  Dans ce cas je configure l'interface Ethernet `eth0' avec l'adresse IP
  `192.168.0.1' et un masque de rseau `255.255.255.0'.  Le `_u_p' qui
  termine la commande enjoint  l'interface de devenir active, mais il
  peut tre omis, tant par dfaut. Pour clore une interface, vous
  faites juste ``ifconfig eth0 down''.

  Le noyau suppose certaines valeurs par dfaut lorsque l'on configure
  les interfaces. Par exemple, vous pouvez indiquer une adresse de
  rseau et une adresse de diffusion, mais si vous ne le faites pas
  comme nous venons de le faire dans l'exemple ci-dessus, alors le noyau
  fera certaines hypothses fondes sur le masque de rseau que vous
  avez fourni, et si vous ne l'avez pas donne, sur la classe de
  l'adresse IP configure.  Dans mon exemple, le noyau considrera que
  c'est un rseau de classe C et configurera une adresse rseau de
  `192.168.0.0' et une adresse de diffusion de `192.168.0.255'.

  Il y a de nombreuses autres options pour la commande _i_f_c_o_n_f_i_g . Les
  plus importantes sont :

     uupp active une interface (est fait par dfaut).

     ddoowwnn
        dsactive une interface.

     [[--]]aarrpp
        active ou dsactive le protocole de rsolution d'adresses sur
        cette interface.

     [[--]]aallllmmuullttii
        active ou dsactive la rception de tous les paquets multicast
        matriel (Ndt : Les adresses multicast sont un genre d'adresses
        de diffusion limites  un groupe de machine qui n'ont pas
        ncessairement besoin de se trouver sur le mme sous-rseau). Le
        multicast matriel permet  des groupes d'htes de recevoir des
        paquets adresss vers des destinations spciales. Ce peut tre
        important si vous utilisez des applications comme la
        vidoconfrence, mais la plupart du temps on ne l'utilise pas.

     mmttuu NN
        ce paramtre permet de rgler le _M_T_U (Maximum Transfert Unit)
        sur le priphrique.

     nneettmmaasskk <<aaddddrr>>
        ce paramtre permet de fixer le masque de rseau.

     iirrqq <<aaddddrr>>
        ce paramtre ne fonctionne qu'avec certains types de matriels,
        mais vous permet d'en fixer l'IRQ.

     [[--]]bbrrooaaddccaasstt [[aaddddrr]]
        permet d'activer ou de dsactiver l'acceptation de datagrammes
        destins  l'adresse de diffusion.

     ((--))ppooiinnttooppooiinntt [[aaddddrr]]
        permet de fixer l'adresse de la machine  l'extrmit d'un lien
        point--point comme pour _s_l_i_p ou _p_p_p.

     hhww <<ttyyppee>> <<aaddddrr>>
        permet de fixer l'adresse matrielle de certains priphriques
        rseau. Ce n'est pas souvent utilis pour Ethernet, mais utile
        pour d'autres types de rseau tels que AX.25.
  Avec les versions 2.2 du noyau, il y a un certain nombre d'options que
  nous n'avons pas numres ci-dessus. Parmi les plus intressantes,
  citons le tunneling et les options IPV6. Voici les paramtres ifconfig
  pour les noyaux 2.2.

     iinntteerrffaaccee
        Le nom de l'interface. C'est habituellement le nom d'un
        gestionnaire de priphrique suivi par un numro d'unit, par
        exemple eth0 pour la premire interface Ethernet.

     uupp Ceci provoque l'activation de l'interface. C'est implicitement
        spcifi si un adresse est affecte  l'interface.

     ddoowwnn
        Ceci provoque la dsactivation de l'interface.

     [[--]]aarrpp
        Active ou dsactive l'utilisation du protocole ARP sur
        l'interface considre.

     [[--]]pprroommiisscc
        Active ou dsactive le mode promiscuous sur l'interface. Si il
        est choisi, tous les paquets du rseau seront reus par
        l'interface.


     [[--]]aallllmmuullttii
        Active ou dsactive le mode all-multicast.  Si il est choisi
        tous les paquets multicast du rseau seront reus par
        l'interface.


     mmeettrriicc NN
        Ce paramtre positionne le paramtre metric de l'interface.


     mmttuu NN
        Ce paramtre positionne le Maximum Transfer Unit (MTU) d'une
        interface.


     ddssttaaddddrr aaddddrr
        Positionne l'adresse IP distante d'un lien point--point (tel
        que PPP). Ce mot-cl est maintenant obsolte; utilisez  la
        place le mot-cl pointopoint.


     nneettmmaasskk aaddddrr
        Positionne le masque de rseau IP de l'interface. Donne les
        valeurs par dfaut pour les classes habituelles de masque rseau
        A, B ou C (provenant de l'adresse IP de l'interface), mais on
        peut donner n'importe quelle valeur.


     aadddd aaddddrr pprreeffiixxlleenn
        Ajoute un adresse IPv6  l'interface.



     ddeell aaddddrr pprreeffiixxlleenn
        Enlve une adresse IPv6 de l'interface.


     ttuunnnneell aaaa..bbbb..cccc..dddd
        Cre un nouveau priphrique SIT (IPv6-in-IPv4), tunnelling vers
        une destination donne.
     iirrqq aaddddrr
        Positionne l'interruption utilise par ce priphrique.  Tous
        les priphriques ne sont pas capables de changer d'IRQ de
        manire dynamique.


     iioo__aaddddrr aaddddrr
        Positionne l'adresse d'entre-sortie du priphrique.


     mmeemm__ssttaarrtt aaddddrr
        Positionne l'adresse de dbut de la mmoire partage utilise
        par le priphrique. Seuls quelques priphriques en ont besoin.


     mmeeddiiaa ttyyppee
        Positionne le port physique ou bien le type de matriel qui doit
        tre utilis par le priphrique. Tous les priphriques ne
        peuvent pas changer ce rglage, et ceux qui peuvent le faire
        diffrent quant aux valeurs qui peuvent leur tre assignes. Les
        valeurs typiques pour sont 10base2 (thin Ethernet), AUI
        (transceiver externe) et autres. La valeur spciale auto peut
        tre utilise pour dire au gestionnaire de priphrique de
        dtecter automatiquement le priphrique. Encore une fois tous
        les gestionnaires de priphrique ne peuvent faire ceci.


     [[--]]bbrrooaaddccaasstt [[aaddddrr]]
        Si une adresse est donne en argument, positionne l'adresse de
        protocole de diffusion de l'interface. Autrement, positionne (ou
        efface) le drapeau IFF_BROADCAST de l'interface.


     [[--]]ppooiinnttooppooiinntt [[aaddddrr]]
        Autorise le mode point--point pour l'interface, ce qui signifie
        qu'il existe un lien direct entre deux machines sans que
        quelqu'un d'autre puisse tre  l'coute. Si une adresse est
        donne comme argument, positionne l'adresse protocole  l'autre
        extrmit du lien, tout comme le faisait la commande dstaddr,
        devenue obsolte. Autrement, positionne ou efface le drapeau
        IFF_POINTTOPOINT de l'interface.


     hhww ccllaassss aaddddrreessss
        Positionne l'adresse matrielle de l'interface, si le
        gestionnaire de priphrique supporte cela. Le mot-cl doit tre
        suivi par le nom de la classe matrielle et l'quivalent ASCII
        de l'adresse matrielle. Les classes matrielles actuellement
        supportes sont ether (Ethernet), ax25 5AMPR AX.25), ARCnet et
        netrom (AMPR NET/ROM).


     mmuullttiiccaasstt
        Positionne le drapeau multicast de l'interface. Normalement on
        n'en a pas besoin tant donn que les gestionnaires de
        priphrique positionne eux-mmes le drapeau correctement.


     aaddddrreessss
        L'adresse IP que l'on doit assigner  l'interface.


     ttxxqquueeuueelleenn lleennggtthh
        Positionne la longueur de la file de transmission du
        priphrique.  Il est prfrable de la mettre  une valeure
        faible pour les priphriques les plus lents ayant une latence
        (liens modem, ISDN) pour empcher que les grosses masses de
        transferts comme telnet perturbent le trafic sur l'interface.


        Vous pouvez utiliser la commande _i_f_c_o_n_f_i_g pour toutes les
        interfaces rseau. Quelques programmes utilisateurs comme _p_p_p_d
        et _d_i_p configurent automatiquement les priphriques en mme
        temps qu'ils les crent, ds lors l'utilisation manuelle de
        _i_f_c_o_n_f_i_g n'est pas ncessaire.


  55..55..  CCoonnffiigguurreerr vvoottrree ssoollvveeuurr ddee nnoommss

  Le `_S_o_l_v_e_u_r _d_e _N_o_m_s' (Name Resolver) fait partie de la bibliothque
  standard de Linux. Sa premire fonction est de convertir des noms
  d'htes comprhensibles par l'homme, comme `ftp.funet.fi' , en
  adresses IP comprhensibles par une machine, comme 128.214.248.6.


  55..55..11..  QQuu''yy aa--tt--iill ddaannss uunn nnoomm ??

  Vous tes probablement familiers avec l'aspect des noms d'htes
  Internet, mais vous ne savez pas comment ils sont composs ou
  dcomposs. Les noms de domaine Internet sont hirarchiss par nature,
  c'est--dire qu'ils ont une structure arborescente.  Un `_d_o_m_a_i_n_e' est
  une famille, ou un groupe de noms. Un `_d_o_m_a_i_n_e' peut tre subdivis en
  `_s_o_u_s_-_d_o_m_a_i_n_e_s'. Un `_d_o_m_a_i_n_e _d_e _p_r_e_m_i_e_r _n_i_v_e_a_u' est un domaine qui
  n'est pas un sous-domaine. Les Domaines de Premier Niveau sont
  spcifis dans la RFC-920. Quelques exemples :


     CCOOMM
        Organisations Commerciales

     EEDDUU
        Organisations ayant rapport avec l'ducation

     GGOOVV
        Organisations Gouvernementales (NdT: parfois GOUV en France !)

     MMIILL
        Organisations Militaires

     OORRGG
        Autres organisations

     NNEETT
        Organisations ayant un rapport avec l'internet

     NNoomm ddee PPaayyss
        il existe des codes de deux lettres qui reprsentent un pays
        donn.


  Pour des raisons historiques la plupart des domaines appartenant  des
  domaines qui ne sont pas bass sur des noms de pays sont pour les
  organisations situes aux tats-Unis, bien que les tats-Unis aient
  aussi le code de pays `.us'. Ce n'est plus vrai pour les domaines .com
  et .org, qui sont couramment utiliss par des socits hors des tats-
  Unis.



  Chacun de ces domaines de premier niveau possde des sous-domaines.
  Les domaines de premier niveau fonds sur les noms de pays sont
  diviss ensuite en sous-domaines bass sur les domaines com, edu, gov,
  mil et org . Ainsi par exemple, vous finissez par : com.au and gov.au
  pour des organisations commerciales ou gouvernementales situes en
  Australie ; notez que ce n'est pas une rgle absolue, car les
  politiques relles dpendant de l'autorit qui donne les noms pour
  chaque domaine.

  Le niveau de division suivant reprsente habituellement le nom de
  l'organisation. Ces sous-domaines sont variables, souvent ils sont
  fonds sur la structure en dpartements de l'organisation mais ils
  peuvent l'tre galement sur d'autres critres considrs comme
  rationnels et comprhensibles par les administrateurs rseau de
  l'organisation.

  La partie tout  fait  gauche du nom est toujours le nom unique
  assign  la machine hte et est appele le nom d'hte `_h_o_s_t_n_a_m_e', la
  partie de droite du nom est le nom de domaine `_d_o_m_a_i_n_n_a_m_e' et le nom
  complet s'appelle le nom de domaine compltement qualifi `_F_u_l_l_y
  _Q_u_a_l_i_f_i_e_d _D_o_m_a_i_n _N_a_m_e' (ou FQDN).

  Si l'on examine l'adresse de la machine de Terry par exemple, le nom
  pleinement qualifi est `perf.no.itg.telstra.com.au'. Cela veut dire
  que le nom d'hte est `perf' et le nom de domaine
  `no.itg.telstra.com.au'. Le nom de domaine est fond sur un domaine de
  premier niveau bas sur son pays, l'Australie et comme son adresse
  lectronique appartient  une organisation commerciale nous avons
  `.com' comme domaine de niveau adjacent. Le nom de la socit est
  (tait) `telstra' et notre structure interne de noms est bas sur la
  structure organisationnelle, dans mon cas, ma machine appartient 
  l'Information Technology Group, section Network Operations.

  Habituellement, les noms sont plutt plus courts ; par exemple, mon
  fournisseur d'accs  l'internet est ``systemy.it'' et mon
  organisation  but non lucratif est ``linux.it'', sans sous-domaine
  com ou org, aussi mon propre hte est simplement appel
  ``morgana.systemy.it'' et rubini@linux.it est une adresse lectronique
  valide. Notez que le propritaire d'un domaine a le droit
  d'enregistrer les noms d'htes aussi bien que les noms de sous-domaine
  ; par exemple le Groupe d'Utilisateur Linux auquel j'appartiens
  utilise le domaine pluto.linux.it, car les propritaires de linux.it
  taient d'accord pour crer un sous-domaine pour ce groupe.



  55..55..22..  LLeess iinnffoorrmmaattiioonnss nncceessssaaiirreess

  Vous devez connatre le domaine auquel votre nom d'hte appartient. Le
  solveur de nom effectue la traduction en faisant appel  un `_S_e_r_v_e_u_r
  _d_e _N_o_m_s _d_e _D_o_m_a_i_n_e', aussi vous devez connatre l'adresse IP d'un
  serveur de nom local que vous pouvez utiliser.

  Il y a trois fichiers que vous devez diter, nous en parlerons chacun
   leur tour.



  55..55..33..  //eettcc//rreessoollvv..ccoonnff

  Le fichier /etc/resolv.conf est le fichier principal de configuration
  de la rsolution de noms. Son format est trs simple.  C'est un
  fichier texte avec un mot-cl par ligne. Il y a trois mots-cls
  typiquement utiliss, qui sont :

     ddoommaaiinn
        ce mot-cl indique le nom de domaine local.


     sseeaarrcchh
        ce mot-cl spcifie une liste d'autres noms de domaine pour
        rechercher un nom d'hte.

     nnaammeesseerrvveerr
        ce mot-cl, qui peut tre utilis plusieurs fois, spcifie
        l'adresse IP d'un serveur de nom de domaine pour la rsolution
        de noms.

  Un exemple de /etc/resolv.conf pourrait ressembler  ceci :


       domain maths.wu.edu.au
       search maths.wu.edu.au wu.edu.au
       nameserver 192.168.10.1
       nameserver 192.168.12.1




  Cet exemple spcifie que le nom de domaine par dfaut  ajouter aux
  noms non qualifis (c'est--dire sans domaine) est maths.wu.edu.au, et
  que si l'hte n'est pas trouv dans ce domaine on peut aussi essayer
  le domaine wu.edu.au directement. Deux entres de serveurs de noms
  sont fournies, chacune d'elles pouvant tre appele par le solveur de
  noms.



  55..55..44..  //eettcc//hhoossttss

  Le fichier /etc/hosts est l'endroit o vous mettez les noms et les
  adresses IP des htes locaux. Si vous mettez un hte dans ce fichier,
  alors vous n'avez pas  interroger le serveur de nom de domaine pour
  obtenir son adresse IP. L'inconvnient est que vous devez tenir votre
  fichier  jour si l'adresse de cet hte a chang.  Dans un systme
  bien administr les seuls noms d'htes qui apparaissent habituellement
  sont l'interface loopback, et le nom des htes locaux.



       # /etc/hosts
       127.0.0.1      localhost loopback
       192.168.0.1    ma.belle.machine




  Vous pouvez spcifier plus d'un nom d'hte, comme montr dans la
  premire entre (qui est standard pour l'interface loopback).



  55..55..55..  FFaaiirree ttoouurrnneerr uunn sseerrvveeuurr ddee nnoommss

  Si vous voulez faire tourner un serveur de nom local, vous pouvez le
  faire facilement. Voyez le le DNS-HOWTO ainsi que tous les documents
  inclus dans votre version de _B_I_N_D (Berkeley Internet Name Domain).



  55..66..  CCoonnffiigguurreerr vvoottrree iinntteerrffaaccee llooooppbbaacckk

  L'interface `loopback' est un type spcial d'interface qui permet de
  vous connecter  vous-mme. Il y a plusieurs raisons pour faire cela,
  par exemple si vous voulez faire des essais de logiciel rseau sans
  interfrer avec quelqu'un d'autre sur votre rseau. Par convention,
  l'adresse IP `127.0.0.1' lui a t assigne. Aussi quelle que soit la
  machine o vous tes, si vous ouvrez une connexion telnet vers
  127.0.0.1 vous atteindrez toujours l'hte local.

  Configurer l'interface loopback est simple et vous devez vous assurer
  de l'avoir fait (mais notez que cette tche est habituellement
  effectue par les scripts standards d'initialisation).



       root# ifconfig lo 127.0.0.1
       root# route add -host 127.0.0.1 lo




  Nous en dirons plus sur la commande _r_o_u_t_e dans le prochain paragraphe.


  55..77..  RRoouuttaaggee

  Le routage est un vaste sujet. On peut crire de grandes quantits de
  textes sur ce sujet. La plupart d'entre vous ont besoin d'un simple
  routage, et certains mme de rien du tout.  Je ne parlerai que des
  principes du routage. Si vous voulez plus d'informations je vous
  suggre de vous reporter aux rfrences fournies en dbut du document.

  Commenons par une dfinition. Qu'est-ce que le routage IP ?  Voici
  celle que j'utilise :


       Le routage IP est le processus par lequel un hte, ayant des
       connexions rseau multiples, dcide du chemin par lequel
       dlivrer les datagrammes IP qu'il a reus.


  Il peut tre utile d'illustrer cela par un exemple. Imaginez un
  routeur dans un bureau : il peut avoir un lien PPP sur l'Internet, un
  certain nombre de segments Ethernet alimentant les stations de travail
  et un second lien PPP vers un autre bureau.  Lorsque le routeur reoit
  un datagramme de l'une de ses connexions, le routage est le mcanisme
  utilis pour dterminer vers quelle interface il doit renvoyer ce
  datagramme. De simples htes ont besoin aussi de routage, tous les
  htes Internet ayant deux priphriques rseau, l'un tant l'interface
  loopback dcrite auparavant et l'autre est celui qui est utilis pour
  parler avec le reste du monde, soit un lien Ethernet, soit une
  interface srie PPP ou SLIP.

  Ok, alors comment fonctionne le routage ? Chaque hte possde une
  liste spciale de rgles de routage, appele une table de routage.
  Cette table contient des colonnes qui contiennent au moins trois
  champs, le premier tant une adresse de destination, le deuxime tant
  le nom de l'interface vers lequel le datagramme doit tre rout et le
  troisime, qui est optionnel, l'adresse IP d'une autre machine qui
  transportera le datagramme vers sa prochaine destination sur le rseau
  passerelle. Sur Linux vous pouvez voir cette table en utilisant la
  commande suivante :


       user% cat /proc/net/route




  ou bien en utilisant l'une des commandes suivantes :
       user% /sbin/route -n
       user% /sbin/netstat -r




  Le processus de routage est plutt simple : un datagramme entrant est
  reu, l'adresse de destination est examine et compare avec chaque
  entre de la table. L'entre qui correspond le mieux  cette adresse
  est choisie, et le datagramme est renvoy vers l'interface spcifie.
  Si le champ passerelle est rempli, alors le datagramme est renvoy
  vers cet hte via l'interface spcifie, sinon l'adresse de
  destination est suppose comme tant sur le rseau support par
  l'interface.

  Pour manipuler ce tableau, une commande spciale est utilise.  Cette
  commande prend des arguments et les convertit en appels systme pour
  demander au noyau d'ajouter, supprimer ou modifier des entres dans la
  table de routage. Cette commande s'appelle `_r_o_u_t_e'.

  Un exemple simple. Imaginez que vous ayez un rseau Ethernet. On vous
  a dit que c'est un rseau classe C avec une adresse de 192.168.1.0. On
  vous fournit une adresse IP 192.168.1.10 pour votre usage et on vous a
  dit que 192.168.1.1 est un routeur connect  l'Internet.

  La premire tape est de configurer l'interface comme indiqu plus
  haut. Vous utiliserez la commande :


       root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up




  Maintenant vous avez besoin d'ajouter une entre dans la table de
  routage pour indiquer au noyau que les datagrammes destins aux htes
  dont les adresses correspondent  192.168.1.* doivent tre dirigs
  vers le priphrique Ethernet. Vous utiliserez une commande comme ceci
  :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0




  Notez l'utilisation de l'argument `-net' pour indiquer au programme
  route que cette entre est une route rseau.  Un autre choix peut tre
  `-host' qui est une route spcifique d'une adresse IP.

  Cette route vous permettra d'tablir des connexions IP avec tous les
  htes sur votre segment Ethernet. Mais qu'en est-il des htes IP qui
  n'y sont pas ?

  Il serait compliqu d'ajouter des routes pour chaque rseau
  destinataire, aussi il y a une astuce utilise pour simplifier la
  tche.  L'astuce est appele route par `default'. La route par default
  s'adapte  toutes les destinations possibles, mais pas trs bien, de
  telle sorte que si il y a une entre qui correspond  l'adresse
  requise elle sera utilise  la place de la route par default. L'ide
  de la route par default est simplement de pouvoir dire `et tout le
  reste va ici'. Dans l'exemple que j'ai invent, on utilisera une
  entre telle que :



  root# route add default gw 192.168.1.1 eth0




  L'argument `gw' indique  la commande route que le prochain argument
  est l'adresse IP, ou le nom, d'une passerelle (gateway) ou d'une
  machine routeur vers qui tous les datagrammes correspondant  cette
  entre seront dirigs pour  routage ultrieur.

  Ainsi votre configuration complte sera :


       root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add default gw 192.168.1.1 eth0




  Si vous regardez bien vos fichiers `rc' concernant le rseau vous en
  trouverez au moins un trs semblable  celui-ci. C'est une configura
  tion courante.

  Examinons maintenant une configuration un peu plus complique.
  Imaginons que nous configurions le routeur examin auparavant, celui
  qui avait un lien PPP vers l'Internet et des segments LAN alimentant
  des stations de travail dans le bureau. Supposons que ce routeur ait 3
  segments Ethernet et un lien PPP. Notre configuration de routage
  ressemblerait  ceci :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add -net 192.168.2.0 netmask 255.255.255.0 eth1
       root# route add -net 192.168.3.0 netmask 255.255.255.0 eth2
       root# route add default ppp0




  Chacune des stations de travail utilisera le format plus simple dcrit
  ci-dessus, seul le routeur aura besoin d'indiquer les routes rseau
  sparment car pour les stations de travail le mcanisme de routage
  par defaut les capturera toutes, laissant au routeur le soin de les
  sparer de manire approprie. Vous pouvez vous demander pourquoi la
  route par dfaut n'utilise pas `gw'.  La raison en est trs simple :
  les protocoles de lien srie comme PPP et SLIP ont seulement deux
  htes sur leur rseau, un  chaque bout. Spcifier  l'hte que
  l'autre bout de la liaison est une passerelle est sans objet et redon
  dant, car il n'a pas d'autre choix, aussi vous n'avez pas  indiquer
  de passerelle pour ce type de connexions rseau. Les autres types
  comme Ethernet, arcnet ou token ring ont besoin que l'on indique une
  passerelle car ces rseaux supportent un grand nombre d'htes.



  55..77..11..  AAlloorrss,, qquuee ffaaiitt llee pprrooggrraammmmee rroouutteedd  ??

  La configuration de routage dcrite ci-dessus est bien adapte aux
  rseaux simples o il n'y a que des chemins uniques entre les
  destinations. Lorsque vous avez un rseau plus complexe les choses
  deviennent plus compliques.  Heureusement pour la plupart d'entre
  vous, ce ne sera pas le cas.

  Le gros problme est qu'avec le `routage manuel' ou `routage statique'
  comme dcrit ci-dessus, si une machine ou un lien tombe en panne dans
  le rseau, alors la seule faon de diriger vos datagrammes vers un
  autre chemin, s'il existe, est d'intervenir manuellement et d'excuter
  les commandes adquates. Naturellement c'est lourd, lent, peu pratique
  et source de risques. Des techniques varies ont t dveloppes pour
  rgler automatiquement les tables de routage dans le cas d'incidents
  sur un rseau o il y a plusieurs routes possibles, toutes ces
  techniques tant regroupes sous le nom de `protocoles de routage
  dynamique'.

  Vous avez peut-tre entendu parler des plus courants. Ce sont RIP
  (Routing Information Protocol) et OSPF (Open Shortest Path First
  Protocol). RIP est trs souvent utilis sur les petits ou moyens
  rseaux d'entreprise. L'OPSF est plus moderne et plus apte  grer de
  grands rseaux et mieux adapt dans le cas o il y a un grand nombre
  de chemins possibles  travers le rseau.  Les implmentations
  usuelles de ces protocoles sont : `_r_o_u_t_e_d' - RIP, et `_g_a_t_e_d' - RIP,
  OSPF et autres.  Le programme `_r_o_u_t_e_d' est normalement fourni avec
  votre distribution Linux ou est inclus dans la paquetage `NetKit'
  dcrit auparavant.

  Un exemple pour vous montrer comment et o vous pouvez utiliser un
  protocole de routage dynamique ressemblerait  ceci :


           192.168.1.0 /                         192.168.2.0 /
              255.255.255.0                         255.255.255.0
            -                                     -
            |                                     |
            |   /-----\                 /-----\   |
            |   |     |ppp0   //    ppp0|     |   |
       eth0 |---|  A  |------//---------|  B  |---| eth0
            |   |     |     //          |     |   |
            |   \-----/                 \-----/   |
            |      \ ppp1             ppp1 /      |
            -       \                     /       -
                     \                   /
                      \                 /
                       \               /
                        \             /
                         \           /
                          \         /
                           \       /
                            \     /
                         ppp0\   /ppp1
                            /-----\
                            |     |
                            |  C  |
                            |     |
                            \-----/
                               |eth0
                               |
                          |---------|
                          192.168.3.0 /
                             255.255.255.0




  Nous avons trois routeurs A, B et C. Chacun supporte un segment Ether
  net avec un rseau IP de classe C (masque de rseau 255.255.255.0).
  Chaque routeur a galement une liaison PPP vers chacun des autres rou
  teurs. Ce rseau forme un triangle.

  Il est vident que la table de routage sur le routeur A ressemble 
  ceci :

  root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
  root# route add -net 192.168.2.0 netmask 255.255.255.0 ppp0
  root# route add -net 192.168.3.0 netmask 255.255.255.0 ppp1




  Cela fonctionnera bien jusqu' ce que le lien entre A et B tombe en
  panne. Si cette liaison est dfaillante, alors l'entre de routage
  montre que les htes sur le segment A ne peuvent pas atteindre les
  htes sur le segment B car leurs datagrammes seront dirigs sur le
  lien ppp0 du routeur A qui est rompu.  Ils pourront encore continuer 
  parler aux htes du segment C, et les htes du segment C pourront
  toujours parler  ceux du segment B car la liaison reste intacte.

  Mais.., si A peut parler  C et si C peut toujours parler  B,
  pourquoi A ne routerait-il pas ses datagrammes pour B via C, et
  laisser ensuite C les envoyer  B ? C'est exactement le type de
  problmes que les protocoles de routage dynamique comme RIP sont en
  mesure de rsoudre.  Si chacun des routeurs A, B et C utilisent un
  dmon de routage (NdT: dmon est une francisation familire du vocable
  informatique anglais daemon, qui signifie Disk And Extension MONitor,
  c'est  dire qui n'est pas invoqu manuellement mais attend en tche
  de fond que quelque chose se passe, que quelque condition se produise.
  Ce terme fut introduit au dpart sous CTSS (Compatible Time Sharing
  System), un anctre du systme MULTICS, lui-mme parent d'UNIX (voir
  la traduction de Ren Cougnenc de `Le systme Linux' de M. Welsh et L.
  Kaufman chez O'Reilly International Thomson), alors leurs tables de
  routage seront automatiquement rgles pour reflter le nouvel tat du
  rseau mme si l'une des liaisons est dfectueuse. Configurer un tel
  rseau est simple, sur chaque routeur vous devez seulement faire deux
  choses. Dans ce cas, pour le routeur A :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# /usr/sbin/routed




  Le dmon de routage `_r_o_u_t_e_d' trouve automatiquement tous les ports
  actifs vers le rseau quand il dmarre et coute tous les messages sur
  chacun des priphriques rseau ce qui lui permet de dterminer et de
  mettre  jour sa table de routage.

  C'tait une trs brve explication du routage dynamique et de son
  utilisation. Si vous voulez d'avantage d'explications reportez-vous
  aux rfrences listes en dbut de document.


  Les points importants relatifs au routage dynamique sont :

  1. Vous n'avez besoin d'utiliser un dmon de routage dynamique que
     quand votre machine Linux peut choisir entre plusieurs routes pour
     une destination donne. C'est la cas par exemple lorsque vous
     envisagez d'utiliser IP masquerade.

  2. Le dmon de routage dynamique modifiera automatiquement votre table
     de routage pour tenir compte des changements survenus dans votre
     rseau.

  3. RIP est adapt aux rseaux de petite et moyenne taille.




  55..88..  CCoonnffiigguurreerr vvooss sseerrvveeuurrss rrsseeaauu eett lleess sseerrvviicceess..

  Les serveurs de rseau et les services sont des programmes qui
  permettent  un utilisateur distant de devenir utilisateur de votre
  machine Linux. Les programmes serveurs sont  l'coute des ports
  rseau.  Les ports rseau permettent de demander un service
  particulier  un hte particulier  et de faire la diffrence entre une
  connexion telnet entrante et une connexion ftp entrante. L'utilisateur
  distant tablit une connexion rseau avec votre machine puis le
  programme serveur, ou dmon de rseau,  l'coute du port, accepte la
  connexion et s'excute. Il y a deux faons d'oprer pour les dmons de
  rseau.  Les deux sont couramment utiliss en pratique. Ce sont :

     aauuttoonnoommee
        le programme dmon coute le port rseau dsign et lorsqu'il y
        a une connexion, il prend lui-mme la connexion en charge pour
        fournir le service.

     eessccllaavvee dduu sseerrvveeuurr _i_n_e_t_d
        le serveur _i_n_e_t_d est un programme dmon spcial spcialis dans
        la conduite des connexions rseau. Il possde un fichier de
        configuration qui indique quel programme doit tre utilis
        lorsqu'une connexion entrante est reue. Chacun des ports
        service doit tre configur soit avec le protocole tcp, soit
        avec le protocole udp.  Les ports sont dcrits dans un autre
        fichier dont nous parlerons plus tard.

  Il existe deux fichiers importants qui doivent tre configurs :
  /etc/services qui assigne des noms aux numros de port et
  /etc/inetd.conf qui sert pour la configuration du dmon de rseau
  _i_n_e_t_d .



  55..88..11..  //eettcc//sseerrvviicceess

  Le fichier /etc/services est une simple base de donnes qui associe
  des noms comprhensibles par l'homme  des ports service
  comprhensibles par la machine. Son format est tout  fait simple. Le
  fichier est un fichier texte dont chaque ligne reprsente une entre
  de la base de donnes. Chaque entre comprend trois champs spars par
  des caractres espace ou tabulation. Ces champs sont :

  nom      port/protocole        alias     # commentaire



     nnoomm
        un simple mot qui reprsente le service dcrit.

     ppoorrtt//pprroottooccoollee
        ce champ est divis en deux.

     ppoorrtt
        un nombre qui spcifie le numro de port o le service dsign
        sera disponible. La plupart des services ont des numros
        assigns. Ils sont dcrits dans la RFC-1340.

     pprroottooccoollee
        c'est soit tcp soit udp.  Il est important de noter qu'une
        entre comme 18/tcp est trs diffrente de 18/udp et qu'il n'y a
        pas de raisons techniques que le mme service existe sur les
        deux. Normalement le bon sens prvaut et c'est vraiment pour un
        service particulier disponible   la fois sur tcp et udp que
        vous verrez une entre pour les deux..

     aalliiaass
        autre nom qui peut tre utilis pour  dsigner ce service.

  Tout texte apparaissant aprs le caractre `#' est ignor et trait
  comme commentaire.



  55..88..11..11..  EExxeemmppllee ddee ffiicchhiieerr //eettcc//sseerrvviicceess ..

  Toutes les distributions rcentes de Linux fournissent un bon fichier
  /etc/services.  Juste au cas o vous construiriez tout depuis le
  dpart, voici une copie du fichier /etc/services fourni avec
  l'ancienne distribution Debian .




















































  # /etc/services:
  # $Id: services,v 1.3 1996/05/06 21:42:37 tobias Exp $
  #
  # Network services, Internet style
  #
  # Notez que c'est la politique actuelle de l'IANA d'assigner un seul numro
  # de port  la fois pour TCP et UDP; ainsi, la plupart des ports ont deux
  # entres mme si le protocole ne supporte pas UDP.
  # Mis  jour d'aprs la RFC 1340, ``Assigned Numbers'' (Juillet 1992).
  # Il n'y a pas tous les ports, seulement les plus courants.

  tcpmux          1/tcp                           # TCP port service multiplexer
  echo            7/tcp
  echo            7/udp
  discard         9/tcp           sink null
  discard         9/udp           sink null
  systat          11/tcp          users
  daytime         13/tcp
  daytime         13/udp
  netstat         15/tcp
  qotd            17/tcp          quote
  msp             18/tcp                          # message send protocol
  msp             18/udp                          # message send protocol
  chargen         19/tcp          ttytst source
  chargen         19/udp          ttytst source
  ftp-data        20/tcp
  ftp             21/tcp
  ssh             22/tcp                          # SSH Remote Login Protocol
  ssh             22/udp                          # SSH Remote Login Protocol
  telnet          23/tcp
  # 24 - private
  smtp            25/tcp          mail
  # 26 - non assign
  time            37/tcp          timserver
  time            37/udp          timserver
  rlp             39/udp          resource        # resource location
  nameserver      42/tcp          name            # IEN 116
  whois           43/tcp          nicname
  re-mail-ck      50/tcp                          # Remote Mail Checking Protocol
  re-mail-ck      50/udp                          # Remote Mail Checking Protocol
  domain          53/tcp          nameserver      # name-domain server
  domain          53/udp          nameserver
  mtp             57/tcp                          # deprecated
  bootps          67/tcp                          # BOOTP server
  bootps          67/udp
  bootpc          68/tcp                          # BOOTP client
  bootpc          68/udp
  tftp            69/udp
  gopher          70/tcp                          # Internet Gopher
  gopher          70/udp
  rje             77/tcp          netrjs
  finger          79/tcp
  www             80/tcp          http            # WorldWideWeb HTTP
  www             80/udp                          # HyperText Transfer Protocol
  link            87/tcp          ttylink
  kerberos        88/tcp          kerberos5 krb5  # Kerberos v5
  kerberos        88/udp          kerberos5 krb5  # Kerberos v5
  supdup          95/tcp
  # 100 - reserve
  hostnames       101/tcp         hostname        # usually from sri-nic
  iso-tsap        102/tcp         tsap            # part of ISODE.
  csnet-ns        105/tcp         cso-ns          # also used by CSO name server
  csnet-ns        105/udp         cso-ns
  rtelnet         107/tcp                         # Remote Telnet
  rtelnet         107/udp
  pop-2           109/tcp         postoffice      # POP version 2
  pop-2           109/udp
  pop-3           110/tcp                         # POP version 3
  pop-3           110/udp
  sunrpc          111/tcp         portmapper      # RPC 4.0 portmapper TCP
  sunrpc          111/udp         portmapper      # RPC 4.0 portmapper UDP
  auth            113/tcp         authentication tap ident
  sftp            115/tcp
  uucp-path       117/tcp
  nntp            119/tcp         readnews untp   # USENET News Transfer Protocol
  ntp             123/tcp
  ntp             123/udp                         # Network Time Protocol
  netbios-ns      137/tcp                         # NETBIOS Name Service
  netbios-ns      137/udp
  netbios-dgm     138/tcp                         # NETBIOS Datagram Service
  netbios-dgm     138/udp
  netbios-ssn     139/tcp                         # NETBIOS session service
  netbios-ssn     139/udp
  imap2           143/tcp                         # Interim Mail Access Proto v2
  imap2           143/udp
  snmp            161/udp                         # Simple Net Mgmt Proto
  snmp-trap       162/udp         snmptrap        # Traps for SNMP
  cmip-man        163/tcp                         # ISO mgmt over IP (CMOT)
  cmip-man        163/udp
  cmip-agent      164/tcp
  cmip-agent      164/udp
  xdmcp           177/tcp                         # X Display Mgr. Control Proto
  xdmcp           177/udp
  nextstep        178/tcp         NeXTStep NextStep       # NeXTStep window
  nextstep        178/udp         NeXTStep NextStep       # server
  bgp             179/tcp                         # Border Gateway Proto.
  bgp             179/udp
  prospero        191/tcp                         # Cliff Neuman's Prospero
  prospero        191/udp
  irc             194/tcp                         # Internet Relay Chat
  irc             194/udp
  smux            199/tcp                         # SNMP Unix Multiplexer
  smux            199/udp
  at-rtmp         201/tcp                         # AppleTalk routing
  at-rtmp         201/udp
  at-nbp          202/tcp                         # AppleTalk name binding
  at-nbp          202/udp
  at-echo         204/tcp                         # AppleTalk echo
  at-echo         204/udp
  at-zis          206/tcp                         # AppleTalk zone information
  at-zis          206/udp
  z3950           210/tcp         wais            # NISO Z39.50 database
  z3950           210/udp         wais
  ipx             213/tcp                         # IPX
  ipx             213/udp
  imap3           220/tcp                         # Interactive Mail Access
  imap3           220/udp                         # Protocol v3
  ulistserv       372/tcp                         # UNIX Listserv
  ulistserv       372/udp
  #
  # services spcifiques  UNIX
  #
  exec            512/tcp
  biff            512/udp         comsat
  login           513/tcp
  who             513/udp         whod
  shell           514/tcp         cmd             # no passwords used
  syslog          514/udp
  printer         515/tcp         spooler         # line printer spooler
  talk            517/udp
  ntalk           518/udp
  route           520/udp         router routed   # RIP
  timed           525/udp         timeserver
  tempo           526/tcp         newdate
  courier         530/tcp         rpc
  conference      531/tcp         chat
  netnews         532/tcp         readnews
  netwall         533/udp                         # -for emergency broadcasts
  uucp            540/tcp         uucpd           # uucp daemon
  remotefs        556/tcp         rfs_server rfs  # Brunhoff remote filesystem
  klogin          543/tcp                         # Kerberized `rlogin' (v5)
  kshell          544/tcp         krcmd           # Kerberized `rsh' (v5)
  kerberos-adm    749/tcp                         # Kerberos `kadmin' (v5)
  #
  webster         765/tcp                         # Network dictionary
  webster         765/udp
  #
  # D'aprs ``Assigned Numbers'' :
  #
  #> Les Ports Enregistrs ne sont pas contrls par l'IANA et peuvent tre
  #> utiliss sur la plupart des systmes par des processus ordinaires
  #> ou des programmes excuts par des utilisateurs ordinaires.
  #
  #> Les ports sont utiliss dans le TCP [45,106] pour nommer les extrmits
  #> des connexions logiques qui transportent les conversations de longue
  #> dure. Pour offrir des services  des utilisateurs non connus, un port
  #> de service pour contact a t dfini. Cette liste spcifie le port utilis
  #> par le processus serveur ainsi que son port de contact. Comme l'IANA ne peut
  #> contrler l'usage de ces ports, on donne ici une liste d'utilisation
  #> de ces ports pour tre agrable  la communaut.
  #
  ingreslock      1524/tcp
  ingreslock      1524/udp
  prospero-np     1525/tcp                # Prospero non-privileged
  prospero-np     1525/udp
  rfe             5002/tcp                # Radio Free Ethernet
  rfe             5002/udp                # Actually uses UDP only
  bbs             7000/tcp                # BBS service
  #
  #
  # services Kerberos (Project Athena/MIT)
  # Notez que ceux-ci sont pour Kerberos v4, et ne sont pas officiels. Les sites
  # tournant sous v4 doivent utiliser ceux-ci et annuler les entres v5 ci-dessus.
  #
  kerberos4       750/udp         kdc     # Kerberos (server) udp
  kerberos4       750/tcp         kdc     # Kerberos (server) tcp
  kerberos_master 751/udp                 # Kerberos authentication
  kerberos_master 751/tcp                 # Kerberos authentication
  passwd_server   752/udp                 # Kerberos passwd server
  krb_prop        754/tcp                 # Kerberos slave propagation
  krbupdate       760/tcp         kreg    # Kerberos registration
  kpasswd         761/tcp         kpwd    # Kerberos "passwd"
  kpop            1109/tcp                # Pop with Kerberos
  knetd           2053/tcp                # Kerberos de-multiplexor
  zephyr-srv      2102/udp                # Zephyr server
  zephyr-clt      2103/udp                # Zephyr serv-hm connection
  zephyr-hm       2104/udp                # Zephyr hostmanager
  eklogin         2105/tcp                # Kerberos encrypted rlogin
  #
  # Services non officiels mais ncessaires (pour NetBSD)
  #
  supfilesrv      871/tcp                 # SUP server
  supfiledbg      1127/tcp                # SUP debugging
  #
  # Services protocole de dlivrance de datagrammes
  #
  rtmp            1/ddp                   # Routing Table Maintenance Protocol
  nbp             2/ddp                   # Name Binding Protocol
  echo            4/ddp                   # AppleTalk Echo Protocol
  zip             6/ddp                   # Zone Information Protocol
  #
  # Services Debian GNU/Linux
  rmtcfg          1236/tcp                # Gracilis Packeten remote config server
  xtel            1313/tcp                # french minitel
  cfinger         2003/tcp                # GNU Finger
  postgres        4321/tcp                # POSTGRES
  mandelspawn     9359/udp        mandelbrot      # network mandelbrot

  # Services locaux




  Dans la ralit, le fichier augmente toujours en taille au fur et 
  mesure que de nouveaux services apparaissent. Si vous craignez que
  votre copie soit incomplte, je vous suggre de copier un nouveau
  fichier /etc/services provenant d'une distribution rcente.



  55..88..22..  //eettcc//iinneettdd..ccoonnff

  Le fichier /etc/inetd.conf est le fichier de configuration du serveur
  dmon _i_n_e_t_d . Il sert  dire  _i_n_e_t_d ce qu'il doit faire lorsqu'il
  reoit une demande de connexion pour un service particulier.  Pour les
  services o vous acceptez une connexion vous devez dire  _i_n_e_t_d quel
  dmon serveur de rseau doit tourner, et comment.

  Son format est aussi trs simple. C'est un fichier texte dont chaque
  ligne dcrit un service que vous voulez fournir. Tout texte suivant un
  `#' est ignor et considr comme commentaire. Chaque ligne contient
  sept champs spars par un nombre quelconque d'espaces (espace ou
  tabulation). Le format gnral est comme suit :


       service  type_de_socket  protocole  drapeaux  utilisateur  chemin  arguments





     sseerrvviiccee
        est le nom de service applicable  cette configuration, pris
        dans le fichier /etc/services.

     ttyyppee__ddee__ssoocckkeett
        ce champ dcrit le type de socket que cette entre considre
        comme pertinent. Voici les valeurs qui sont autorises : stream,
        dgram, raw, rdm, ou seqpacket.  C'est un peu technique par
        nature, mais par exprience, presque tous les services bass sur
        tcp utilisent  stream et presque tous les services bass sur udp
        utilisent dgram.  Il n'y a que quelques types de serveurs dmons
        spciaux utilisant d'autres valeurs.

     pprroottooccoollee
        le protocole considr comme valide pour cette entre. Il doit
        correspondre  l'entre approprie dans le fichier /etc/services
        et sera donc soit tcp soit udp.  Les serveurs bass sur Sun RPC
        (Remote Procedure Call) utilisent rpc/tcp ou rpc/udp.

     ddrraappeeaauuxx
        il n'y a en fait que deux valeurs pour ce champ. Celles-ci
        disent  _i_n_e_t_d si le programme serveur rseau libre le socket
        aprs dmarrage, et donc si _i_n_e_t_d peut prendre en compte une des
        prochaines demandes de connexion, ou bien si _i_n_e_t_d doit attendre
        qu'un autre dmon serveur tournant dj prenne en charge la
        nouvelle demande de connexion.  C'est encore compliqu, mais en
        pratique tous les serveurs tcp doivent avoir cette entre
        positionne sur nowait et la plupart des serveurs udp ont cette
        entre positionne sur wait.  Attention il y a quelques
        exceptions notables, laissez vous guider par l'exemple suivant
        si vous n'tes pas srs.

     uuttiilliissaatteeuurr
        ce champ dcrit quel compte utilisateur extrait de /etc/passwd
        sera considr comme propritaire du dmon rseau lorsqu'il est
        lanc.  C'est trs utile lorsque vous voulez vous protger
        contre les trous de scurit. Vous pouvez mettre nobody comme
        utilisateur pour une entre si bien que dans le cas o le rseau
        comporte une brche, les dommages ventuels seront minimiss.
        Cependant habituellement ce champ est rgl sur root, car de
        nombreux serveurs ont besoin des privilges de root pour tourner
        correctement.

     cchheemmiinn__ddee__sseerrvveeuurr
        ce champ est le vritable chemin d'accs au programme.

     aarrgguummeennttss
        ce champ correspond au reste de la ligne et est optionnel.  Il
        sert  indiquer les arguments de commande que vous voulez passer
        au programme serveur au lancement.



  55..88..22..11..  EExxeemmppllee ddee ffiicchhiieerr //eettcc//iinneettdd..ccoonnff

  Comme pour le fichier /etc/services, toutes les distributions modernes
  incluent un bon fichier /etc/inetd.conf pour pouvoir travailler. Ici,
  pour tre complet , vous trouverez le fichier /etc/inetd.conf de la
  distribution Debian.






























  # /etc/inetd.conf:  voir inetd(8) pour d'autres informations.
  #
  # Base de donnes pour la configuration d'un serveur Internet
  #
  #
  # Modifi pour Debian par Peter Tobias <tobias@et-inf.fho-emden.de>
  #
  # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
  #
  # Services internes
  #
  #echo           stream  tcp     nowait  root    internal
  #echo           dgram   udp     wait    root    internal
  discard         stream  tcp     nowait  root    internal
  discard         dgram   udp     wait    root    internal
  daytime         stream  tcp     nowait  root    internal
  daytime         dgram   udp     wait    root    internal
  #chargen        stream  tcp     nowait  root    internal
  #chargen        dgram   udp     wait    root    internal
  time            stream  tcp     nowait  root    internal
  time            dgram   udp     wait    root    internal
  #
  # Services standards.
  #
  telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.telnetd
  ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.ftpd
  #fsp    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.fspd
  #
  # Shell, login, exec et talk sont des protocoles BSD.
  #
  shell   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd
  login   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind
  #exec   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rexecd
  talk    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.talkd
  ntalk   dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.ntalkd
  #
  # Services Mail, news et uucp.
  #
  smtp    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.smtpd
  #nntp   stream  tcp     nowait  news    /usr/sbin/tcpd  /usr/sbin/in.nntpd
  #uucp   stream  tcp     nowait  uucp    /usr/sbin/tcpd  /usr/lib/uucp/uucico
  #comsat dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.comsat
  #
  # Pop et autres
  #
  #pop-2  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop2d
  #pop-3  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop3d
  #
  # `cfinger' est le serveur finger GNU de Debian.  (NOTE : L'implmentation
  # habituelle du dmon `finger' permet de le faire tourner avec `root'.)
  #
  #cfinger stream tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.cfingerd
  #finger stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.fingerd
  #netstat        stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/netstat
  #systat stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/ps -auwwx
  #
  # Le service tftp est fourni principalement pour dmarrer. La plupart des sites
  # l'utilisent seulement sur les machines servant de `serveurs de boot'.
  #
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /boot
  #bootps dgram   udp     wait    root    /usr/sbin/bootpd        bootpd -i -t 120
  #
  # Services Kerberos (ils doivent probablement tre corrigs)
  #
  #klogin         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k
  #eklogin        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k -x
  #kshell         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd -k
  #
  # Services tournant UNIQUEMENT sur Kerberos (doivent tre probablement corrigs)
  #
  #krbupdate      stream tcp      nowait  root    /usr/sbin/tcpd  /usr/sbin/registerd
  #kpasswd        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/kpasswdd
  #
  # Services RPC
  #
  #mountd/1       dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.mountd
  #rstatd/1-3     dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rstatd
  #rusersd/2-3    dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rusersd
  #walld/1        dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rwalld
  #
  # Fin de inetd.conf.
  ident           stream  tcp     nowait  nobody  /usr/sbin/identd       identd -i






  55..99..  AAuuttrreess ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn aayyaanntt uunn rraappppoorrtt aavveecc llee rrsseeaauu

  Il y a de nombreux fichiers relatifs  la configuration rseau sous
  Linux et qui sont susceptibles de vous intresser. Vous n'aurez jamais
   modifier ces fichiers, mais il est utile de les dcrire pour que
  vous sachiez ce qu'ils contiennent et quelle est leur utilit.



  55..99..11..  //eettcc//pprroottooccoollss

  Le fichier /etc/protocols est une base de donnes qui donne la
  relation des numros id de protocole avec leurs noms.  Il est utilis
  par les programmeurs pour leur permettre de spcifier les protocoles
  par leur nom dans les programmes et aussi par quelques programmes tels
  que _t_c_p_d_u_m_p pour pouvoir afficher en sortie des noms au lieu de
  chiffres. La syntaxe gnrale de ce fichier est :


       nom du protocole     numro    alias




  Le fichier /etc/protocols fourni avec la distribution Debian est le
  suivant :

















  # /etc/protocols:
  # $Id: protocols,v 1.1 1995/02/24 01:09:41 imurdock Exp $
  #
  # Protocoles Internet (IP)
  #
  #       d'aprs: @(#)protocols  5.1 (Berkeley) 4/17/89
  #
  # Mise  jour pour NetBSD basee sur la RFC 1340, Assigned Numbers (July 1992).

  ip      0       IP              # internet protocol, pseudo protocol number
  icmp    1       ICMP            # internet control message protocol
  igmp    2       IGMP            # Internet Group Management
  ggp     3       GGP             # gateway-gateway protocol
  ipencap 4       IP-ENCAP        # IP encapsulated in IP (officially ``IP'')
  st      5       ST              # ST datagram mode
  tcp     6       TCP             # transmission control protocol
  egp     8       EGP             # exterior gateway protocol
  pup     12      PUP             # PARC universal packet protocol
  udp     17      UDP             # user datagram protocol
  hmp     20      HMP             # host monitoring protocol
  xns-idp 22      XNS-IDP         # Xerox NS IDP
  rdp     27      RDP             # "reliable datagram" protocol
  iso-tp4 29      ISO-TP4         # ISO Transport Protocol class 4
  xtp     36      XTP             # Xpress Tranfer Protocol
  ddp     37      DDP             # Datagram Delivery Protocol
  idpr-cmtp       39      IDPR-CMTP       # IDPR Control Message Transport
  rspf    73      RSPF            # Radio Shortest Path First.
  vmtp    81      VMTP            # Versatile Message Transport
  ospf    89      OSPFIGP         # Open Shortest Path First IGP
  ipip    94      IPIP            # Yet Another IP encapsulation
  encap   98      ENCAP           # Yet Another IP encapsulation






  55..99..22..  //eettcc//nneettwwoorrkkss

  Le fichier /etc/networks a une fonction similaire au fichier
  /etc/hosts. Il fournit une simple base de donnes de noms de rseau
  avec des adresses. Son format diffre en ce qu'il n'y a que deux
  champs par ligne, et que ces champs sont cods comme ceci :



        Nom du rseau   adresse de rseau




  Un exemple :


       loopnet    127.0.0.0
       localnet   192.168.0.0
       amprnet    44.0.0.0





  Lorsque vous utilisez une commande comme _r_o_u_t_e, si une destination est
  un rseau, et que ce rseau a une entre dans le fichier /etc/networks
  la commande affichera alors le nom du rseau en lieu et place de son
  adresse.
  55..1100..  SSccuurriitt rrsseeaauu eett ccoonnttrrllee dd''aaccccss

  Laissez-moi commencer ce paragraphe en vous avertissant que la
  scurisation de votre machine et du rseau contre les attaques
  pernicieuses est un art complexe. Je ne me considre pas du tout comme
  un expert dans ce domaine et bien que les mcanismes que je vais
  dcrire puissent vous aider, si vous tes proccups par la scurit,
  alors je vous recommande d'effectuer vous-mme des recherches sur le
  sujet. Il existe un grand nombre d'excellentes rfrences sur
  l'Internet qui traitent du sujet, y compris le Security-HOWTO

  Une importante rgle pratique est : `NN''uuttiilliisseezz ppaass ddee sseerrvveeuurrss ddoonntt
  vvoouuss nn''aavveezz ppaass bbeessooiinn'.  Un grand nombre de distributions sont
  livres avec tout un tas de services dj configurs et dmarrant
  automatiquement. Pour assurer quand mme un minimum de scurit vous
  devriez aller dans votre fichier /etc/inetd.conf et retirez (_p_l_a_c_e_z _u_n
  _`_#_' _a_u _d__b_u_t _d_e _l_a _l_i_g_n_e) toute entre que vous ne comptez pas
  utiliser.  De bons candidats sont :  shell, login, exec, uucp, ftp, et
  les services informatifs tels que finger, netstat and systat.

  Il y a plein de sortes de scurit et de mcanismes de contrle
  d'accs ; je vais dcrire les plus lmentaires.



  55..1100..11..  //eettcc//ffttppuusseerrss

  Le fichier /etc/ftpusers est un mcanisme simple qui vous permet
  d'interdire l'accs de votre machine  certains utilisateurs de ftp.
  Il est lu par le programme dmon (_f_t_p_d) lorsqu'une connexion ftp est
  reue. Le fichier est une simple liste d'utilisateurs qui ne peuvent
  pas se connecter. Il ressemble  :


       # /etc/ftpusers - utilisateurs ne pouvant pas se connecter par ftp
       root
       uucp
       bin
       mail






  55..1100..22..  //eettcc//sseeccuurreettttyy

  Le fichier /etc/securetty vous permet de spcifier sur quels fichiers
  de priphriques tty root a le droit de se connecter. Le fichier
  /etc/securetty est lu par le programme de connexion (habituellement
  _/_b_i_n_/_l_o_g_i_n). Son format est une liste de fichiers de priphriques tty
  autoriss (sur tous les autres root ne peut se connecter) :


       # /etc/securetty - consoles o root peut se connecter
       tty1
       tty2
       tty3
       tty4







  55..1100..33..  LLee mmccaanniissmmee ddee ccoonnttrrllee dd''aaccccss ddeess hhtteess ttccppdd ..

  Le programme _t_c_p_d que vous avez vu dans le fichier /etc/inetd.conf
  fournit les mcanismes de contrle d'accs et de connexion aux
  services qu'il a pour but de protger.

  Lorsqu'il est invoqu par le programme _i_n_e_t_d, il lit deux fichiers
  contenant les rgles d'accs et il autorise ou interdit l'accs au
  serveur qu'il protge.

  Il cherche dans ces deux fichiers jusqu' ce qu'il trouve une
  correspondance. S'il n'en trouve pas il suppose que l'accs est
  autoris. Il recherche dans l'ordre suivant : /etc/hosts.allow,
  /etc/hosts.deny. Je dcrirai chacun d'eux plus tard. Pour une
  description complte rfrez-vous aux pages de manuel appropries
  (hosts_access(5) est un bon point de dpart).



  55..1100..33..11..  //eettcc//hhoossttss..aallllooww

  Le fichier /etc/hosts.allow est un fichier de configuration du
  programme _/_u_s_r_/_s_b_i_n_/_t_c_p_d. Il contient les htes dont l'accs est
  _a_u_t_o_r_i_s_ _(_a_l_l_o_w_e_d_) et qui peuvent donc utiliser un service de votre
  machine.

  Le format du fichier est trs simple :


       # /etc/hosts.allow
       #
       # <liste des services>: <liste des htes> [: commande]





     liste des services
        c'est une liste de serveurs, spars par des virgules, auxquels
        les rgles d'accs s'appliquent.  Exemples de serveur : ftpd,
        telnetd, et fingerd.

     liste des htes
        c'est une liste de noms d'htes, spars par des virgules (vous
        pouvez utiliser galement des adresses IP).  Vous pouvez en plus
        spcifier des noms d'htes ou des adresses IP avec des jokers
        pour obtenir des groupes d'htes.  Des exemples :
        gw.vk2ktj.ampr.org pour un hte spcifique, .uts.edu.au pour
        tous les htes se terminant par cette chane , 44. pour toutes
        les adresses IP commenant par ces chiffres.  Il y a quelques
        expressions pour simplifier la configuration, parmi lesquelles :
        ALL pour tous les htes, LOCAL pour tout hte dont le nom ne
        contient pas de `.' c'est  dire appartenant au mme domaine que
        votre machine, et PARANOID pour tout hte dont le nom ne
        correspond pas avec son adresse (tricherie dans le nom). Il y a
        enfin une expression qui peut tre utile.  Il s'agit de EXCEPT
        qui vous permet de fournir une liste avec des exceptions.  Nous
        verrons un exemple plus tard.

     commande
        c'est un paramtre optionnel. Ce paramtre est le nom complet
        d'une commande (avec son rpertoire) qui sera excute chaque
        fois qu'il y aura correspondance.  Ce peut tre par exemple une
        commande qui essaiera d'identifier qui se connecte, ou de
        gnrer un message par courrier ou tout message d'alerte pour
        l'administrateur systme avertissant que quelqu'un est en train
        de se connecter.  On peut y inclure des extensions, par exemple
        : %h donnera le nom de l'hte qui se connecte ou bien son
        adresse s'il n'a pas de nom , %d le programme dmon appel.

  Un exemple :


       # /etc/hosts.allow
       #
       # Permet  tout le monde d'utiliser le courrier
       in.smtpd: ALL
       # telnet et ftp pour les htes de mon domaine et my.host.at.home.
       telnetd, ftpd: LOCAL, myhost.athome.org.au
       # finger pour tout le monde, mais garde une trace de l'identit.
       fingerd: ALL: (finger @%h | mail -s "finger from %h" root)






  55..1100..33..22..  //eettcc//hhoossttss..ddeennyy

  Le fichier /etc/hosts.deny est un fichier de configuration du
  programme _/_u_s_r_/_s_b_i_n_/_t_c_p_d. Ce fichier contient les htes qui _n_'_o_n_t _p_a_s
  _l_'_a_u_t_o_r_i_s_a_t_i_o_n  d'accder  l'un des services de votre machine.

  Un exemple simple ressemblerait  ceci :



       # /etc/hosts.deny
       #
       # Interdit l'acces aux hotes ayant des noms suspects
       ALL: PARANOID
       #
       # Interdit l'acces a tous les hotes
       ALL: ALL




  L'entre PARANOID est en fait redondante car l'autre entre interdit
  tous les cas.  L'une ou l'autre entre devrait convenir, en fonction
  de vos besoins particuliers.

  Mettre ALL: ALL par dfaut dans le fichier /etc/hosts.deny puis
  autoriser certains services, en liaison avec les htes que vous avez
  choisis, dans le fichier /etc/hosts.allow, est la configuration la
  plus sre.



  55..1100..44..  //eettcc//hhoossttss..eeqquuiivv

  Le fichier hosts.equiv est utilis pour concder  certains htes des
  droits d'accs leur permettant d'avoir un compte sur votre machine
  sans fournir de mot de passe. Cela est utile dans un environnement
  scuris o vous contrlez toutes les machines, sinon ce peut tre
  trs risqu. Votre machine est aussi sre que le moins sr de vos
  htes de confiance. Pour augmenter la scurit, n'utilisez pas cette
  possiblit et encouragez vos utilisateurs  ne pas utiliser le fichier
  .rhosts.



  55..1100..55..  CCoonnffiigguurreerr vvoottrree ddmmoonn ffttpp  ccoorrrreecctteemmeenntt

  Un grand nombre de sites sont intresss  avoir un serveur _f_t_p
  anonyme pour permettre aux autres de transfrer et de rcuprer des
  fichiers sans avoir besoin d'une identification spciale.  Si vous
  dcidez d'offrir ce service soyez certains de configurer votre dmon
  _f_t_p de manire adquate pour les accs anonymes. La plupart des pages
  de manuel ddies  ftpd(8) dcrivent tous les dtails pour y arriver.
  Vous devez toujours vous assurer que vous avez bien suivi les
  instructions.  Un rgle importante est de ne pas utiliser une copie de
  votre fichier /etc/passwd dans le rpertoire /etc du compte anonyme.
  Soyez srs d'avoir limin tous les dtails des comptes excepts ceux
  qui sont ncessaires, autrement vous serez vulnrables vis  vis de
  ceux qui matrisent les techniques de mise en pices des mots de
  passe.



  55..1100..66..  PPaarree--ffeeuu ((FFiirreewwaallll)) ssuurr llee rrsseeaauu

  Ne pas permettre aux datagrammes d'atteindre votre machine ou les
  serveurs est un excellent moyen de scurisation. Ceci est abord en
  profondeur dans le Firewall-HOWTO et (de manire plus concise) plus
  loin dans ce document.



  55..1100..77..  AAuuttrreess ssuuggggeessttiioonnss

  Voici d'autres suggestions, potentiellement religieuses,  prendre en
  considration :

     sseennddmmaaiill
        en dpit de sa popularit, le dmon _s_e_n_d_m_a_i_l apparat avec une
        effrayante rgularit dans les mises en garde concernant la
        scurit. Faites comme vous voulez, mais j'ai choisi de ne pas
        l'utiliser.

     NNFFSS eett aauuttrreess sseerrvviicceess SSuunn RRPPCC
        soyez circonspects avec eux. Il y a toutes sortes d'exploits
        possibles avec ces services. Il est difficile de trouver une
        option pour les services tels que NFS, mais si vous les
        configurez, soyez prudents envers ceux  qui vous accordez des
        droits.




  66..  IInnffoorrmmaattiioonnss ssuurr EEtthheerrnneett

  Cette section traite d'informations spcifiques sur Ethernet et la
  configuration des cartes Ethernet.


  66..11..  CCaarrtteess EEtthheerrnneett ssuuppppoorrtteess


  66..11..11..  33CCoomm


    3Com 3c501 - ` fuir comme la peste' (gestionnaire 3c501)

    3Com 3c503 (gestionnaire 3c503), 3c505 (gestionnaire 3c505), 3c507
     (gestionnaire 3c507), 3c509/3c509B (ISA) / 3c579 (EISA)


    3Com Etherlink III Vortex Ethercards (3c590, 3c592, 3c595, 3c597)
     (PCI), 3Com Etherlink XL Boomerang (3c900, 3c905) (PCI) et Cyclone
     (3c905B, 3c980) Ethercards (gestionnaire 3c59x) et 3Com Fast
     EtherLink Ethercard (3c515) (ISA) (gestionnaire 3c515)

    3Com 3ccfe575 Cyclone Cardbus (gestionnaire 3c59x)

    3Com 3c575 series Cardbus (gestionnaire 3c59x) (ALL PCMCIA ??)

  66..11..22..  AAMMDD,, AATTTT,, AAlllliieedd TTeelleessiiss,, AAnnsseell,, AApprriiccoott


    AMD LANCE (79C960) / PCnet-ISA/PCI (AT1500, HP J2405A,
     NE1500/NE2100)

    ATT GIS WaveLAN

    Allied Telesis AT1700

    Allied Telesis LA100PCI-T

    Allied Telesyn AT2400T/BT (module "ne")

    Ansel Communications AC3200 (EISA)

    Apricot Xen-II / 82596

  66..11..33..  CCaabblleettrroonn,, CCooggeenntt,, CCrryyssttaall LLaann


    Cabletron E21xx

    Cogent EM110

    Crystal Lan CS8920, Cs8900

  66..11..44..  DDaannppeexx,, DDEECC,, DDiiggii,, DDLLiinnkk


    Danpex EN-9400

    DEC DE425 (EISA) / DE434/DE435 (PCI) / DE450/DE500 (gestionnaire
     DE4x5)

    DEC DE450/DE500-XA (dc21x4x) (gestionnaire Tulip)

    DEC DEPCA et EtherWORKS

    DEC EtherWORKS 3 (DE203, DE204, DE205)

    DECchip DC21x4x "Tulip"

    DEC QSilver's (Gestionnaire Tulip)

    Digi International RightSwitch

    DLink DE-220P, DE-528CT, DE-530+, DFE-500TX, DFE-530TX

  66..11..55..  FFuujjiittssuu,, HHPP,, IICCLL,, IInntteell


    Fujitsu FMV-181/182/183/184

    HP PCLAN (sries 27245 et 27xxx)


    HP PCLAN PLUS (27247B et 27252A)

    HP 10/100VG PCLAN (J2577, J2573, 27248B, J2585) (ISA/EISA/PCI)

    ICL EtherTeam 16i / 32 (EISA)

    Intel EtherExpress

    Intel EtherExpress Pro

  66..11..66..  KKTTII,, MMaaccrroommaattee,, NNCCRR NNEE22000000//11000000,, NNeettggeeaarr,, NNeeww MMeeddiiaa


    KTI ET16/P-D2, ET16/P-DC ISA (fonctionne sans cavaliers et avec des
     options de configuration matrielles)

    Macromate MN-220P (PnP or NE2000 mode)

    NCR WaveLAN

    NE2000/NE1000 (attention aux clnes)

    Netgear FA-310TX (puce Tulip)

    New Media Ethernet

  66..11..77..  PPuurreeDDaattaa,, SSEEEEQQ,, SSMMCC


    PureData PDUC8028, PDI8023

    SEEQ 8005

    SMC Ultra / EtherEZ (ISA)

    SMC 9000 series

    SMC PCI EtherPower 10/100 (gestionnaire DEC Tulip)

    SMC EtherPower II (gestionnaire epic100.c)

  66..11..88..  SSuunn LLaannccee,, SSuunn IInntteell,, SScchhnneeiiddeerr,, WWDD,, ZZeenniitthh,, IIBBMM,, EEnnyyxx


    Adaptateurs Sun LANCEs (noyau kernel 2.2 et suivants)

    Adaptateurs Sun Intel (noyaux kernel 2.2 et suivants)

    Schneider et Koch G16

    Western Digital WD80x3

    Adaptateur intgr Zenith Z-Note / IBM ThinkPad 300

    Ensemble Znyx 312 (gestionnaire Tulip)



  66..22..  IInnffoorrmmaattiioonnss ggnnrraalleess ssuurr EEtthheerrnneett

  Les noms de priphriques Ethernet sont `eth0', `eth1', `eth2' etc. La
  premire carte dtecte par le noyau devient `eth0' et le reste est
  nomm dans l'ordre de dtection.

  Une fois que vous avez compil convenablement votre noyau pour
  supporter les cartes Ethernet, la configuration des cartes est aise.
  Typiquement vous faites ainsi (ce que la plupart des distributions
  font automatiquement pour vous, si vous les avez configures pour
  supporter votre carte ethernet) :



       root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
       root# route add -net 192.168.0.0 netmask 255.255.255.0 eth0




  La plupart des gestionnaires Ethernet furent dvelopps par Donald
  Becker, Donald Becker



  66..33..  UUttiilliisseerr pplluussiieeuurrss ccaarrtteess EEtthheerrnneett ssuurr llaa mmmmee mmaacchhiinnee


  66..33..11..  SSii llee ggeessttiioonnnnaaiirree eesstt ssoouuss ffoorrmmee ddee mmoodduullee ((hhaabbiittuueelllleemmeenntt
  aavveecc lleess nnoouuvveelllleess ddiissttrriibbuuttiioonnss))

  Le module pourra normalement dtecter toutes les cartes installes.

  Les informations concernant la dtection sont stockes dans le fichier
  :

  _/_e_t_c_/_c_o_n_f_._m_o_d_u_l_e_s_.


  Supposons qu'un utilisateur possde 3 cartes NE2000, une  l'adresse
  0x300, l'autre  0x240, et la dernire  0x220. Il faut ajouter les
  lignes suivantes au fichier /etc/conf.modules :



               alias eth0 ne
               alias eth1 ne
               alias eth2 ne
               options ne io=0x220,0x240,0x300





  Ceci enjoint au programme _m_o_d_p_r_o_b_e de rechercher 3 cartes NE aux
  adresses spcifies. De plus cela donne l'ordre dans lequel on doit
  les trouver et quel priphrique leur est assign.

  La plupart des modules ISA acceptent des valeurs d'E/S spares par
  des virgules.  Par exemple :



               alias eth0 3c501
               alias eth1 3c501
               options eth0 -o 3c501-0 io=0x280 irq=5
               options eth1 -o 3c501-1 io=0x300 irq=7







  L'option -o permet d'assigner un nom unique  chaque module. La raison
  en est que vous ne pouvez charger deux copies du mme module.

  L'option irq= sert  spcifier l'IRQ matriel et l'option io= 
  spcifier les diffrents ports entre-sortie.



  Par dfaut, le noyau Linux ne peut dtecter qu'un seul dispositif
  Ethernet, et vous devez passer des commandes pour forcer la dtection
  des autres cartes.

  Pour apprendre  faire fonctionner vos cartes ethernet sous Linux,
  voyez le Ethernet-HOWTO.

  77..  IInnffoorrmmaattiioonnss rreellaattiivveess  ll''IIPP

  Cette section traite d'informations spcifiques  l'IP.

  77..11..  DDHHCCPP eett DDHHCCPPDD

  DHCP est l'acronyme de Dynamic Host Configuration Protocol
  (Protocole de configuration dynamique d'un hte). La cration de DHCP
  a rendu la configuration du rseau avec plusieurs htes extrmement
  simple.  Au lieu de configurer chaque hte sparment vous pouvez
  assigner tous les paramtres communs  l'ensemble des htes utilisant
  un serveur DHCP.


  Chaque fois qu'un hte dmarre il diffuse un paquet sur le rseau. Ce
  paquet est un appel vers tous les serveurs DHCP situs sur le mme
  segment pour configurer l'hte.

  DHCP est extrmement utile pour assigner des choses comme l'adresse
  IP, le masque de rseau et la passerelle de chaque hte.


  77..22..  RRggllaaggee dd''uunn cclliieenntt DDHHCCPP ppoouurr lleess uuttiilliissaatteeuurrss ddee LLiinnuuxxCCoonnff

  Sous linux,  dmarrez le programme linuxconf en tant que super-
  utilisateur.  Ce programme est disponible avec toutes les versions de
  redhat et fonctionne sous X aussi bien qu'en mode console. Il
  fonctionne galement avec les distributions Suse et Caldera.



       Select Networking
       ----------------->Basic Host Information
       ----------------->Select Enable
       ----------------->Set Config Mode DHCP





  77..33..  RRggllaaggee dd''uunn sseerrvveeuurr DDHHCCPP ssoouuss LLiinnuuxx

  RRccuupprreezz DDHHCCPPDD ss''iill nn''eesstt ppaass ddjj iinnssttaallll ssuurr vvoottrree mmaacchhiinnee..
  Tlcharger DHCPD

  _N_o_t_e _B_r__v_e_: _S_O_Y_E_Z _C_E_R_T_A_I_N_S _D_'_A_V_O_I_R _L_'_O_P_T_I_O_N _M_U_L_T_I_C_A_S_T _I_N_S_T_A_L_L__E _D_A_N_S
  _L_E _N_O_Y_A_U_.

  _S_i _v_o_u_s _n_'_a_v_e_z _p_a_s _d_e _d_i_s_t_r_i_b_u_t_i_o_n _b_i_n_a_i_r_e _p_o_u_r _v_o_t_r_e _v_e_r_s_i_o_n _d_e
  _l_i_n_u_x_, _v_o_u_s _d_e_v_r_e_z _c_o_m_p_i_l_e_r _D_H_C_P_D_.

  ditez /etc/rc.d/rc.local pour prendre en compte l'ajout d'une route
  vers 255.255.255.255.

  _E_x_t_r_a_i_t _d_u _f_i_c_h_i_e_r _R_E_A_D_M_E _d_e _D_H_C_P_d _:



  Afin que dhcpd fonctionne correctement avec des clients difficiles
  (par exemple Windows 95), il doit tre en mesure d'envoyer des paquets
  vers l'adresse 255.255.255.255. Malheureusement, Linux insiste pour
  changer l'adresse 255.255.255.255 en l'adresse de diffusion du sous-
  rseau local (ici, 192.5.5.223). Il en rsulte une violation du
  protocole DHCP, et alors que de nombreux clients DHCP ne s'aperoive
  pas de ce problme, d'autres (par ex, tous les clients DHCP Microsoft)
  le font.  Les clients ayant ce problme apparatront comme ne voyant
  pas les messages DHCPOFFER venant du serveur.


  Sous le compte root, tapez ce qui suit :

  route add -host 255.255.255.255 dev eth0

  Si le message suivant apparait :

  255.255.255.255: Unknown host

  Essayez d'ajouter la ligne suivante  votre fichier /etc/hosts :

  255.255.255.255 dhcp

  Puis ressayez :

  route add -host dhcp dev eth0


  77..33..11..  OOppttiioonnss ddee DDHHCCPPDD

  Maintenant vous devez configurer DHCPd. Pour cela vous devez crer ou
  diter le fichier /etc/dhcpd.conf. Il existe une interface graphique
  pour la configuration de dhcpd sous linuxconf. On configure et rgle
  ainsi DHCPD trs facilement.

  Si vous voulez le configurer  la main, suivez les instructions qui
  suivent.  Je suggre de le faire au moins une fois  la main. Cela
  vous aidera pour faire des diagnostiques, ce qu'une interface
  graphique ne peut vous offrir.  Malheureusement Microsoft n'y croit
  pas.

  Le plus facile est d'assigner des adresses IP de manire alatoire.
  Ci-dessous un exemple de fichier de configuration montrant le type de
  rglage.















  # Sample /etc/dhcpd.conf
  # (add your comments here)
  default-lease-time 1200;
  max-lease-time 9200;
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.1.255;
  option routers 192.168.1.254;
  option domain-name-servers 192.168.1.1, 192.168.1.2;
  option domain-name "mydomain.org";

  subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.10 192.168.1.100;
  range 192.168.1.150 192.168.1.200;
  }





  Cela permet au serveur DHCP d'assigner au client une adresse IP
  comprise entre 192.168.1.10 et 192.168.1.100 ou bien 192.168.1.150 et
  192.168.1.200.


  Une adresse IP sera alloue pendant 1200 secondes si le client ne
  demande pas plus. Autrement l'allocation maximum permise sera 9200
  secondes. Le serveur envoie les paramtres suivants au client :


  Utilisez 255.255.255.0 comme masque de sous-rseau
  Utilisez 192.168.1.255 comme adresse de diffusion
  Utilisez 192.168.1.254 comme passerelle par dfaut
  Utilisez 192.168.1.1 et 192.168.1.2 comme serveurs DNS.



  Si vous spcifiez un serveur WINS pour vos clients Windows, vous devez
  insrer l'option suivante dans le fichier dhcpd.conf.

  option netbios-name-servers 192.168.1.1;

  Vous pouvez aussi assigner des adresses IP spcifiques bases sur une
  adresse ethernet MMAACC, par exemple



         host haagen {
            hardware ethernet 08:00:2b:4c:59:23;
            fixed-address 192.168.1.222;
       }




  Cela assignera l'adresse IP 192.168.1.222 au client ayant une adresse
  ethernet MMAACC de 08:00:2b:4c:59:23.


  77..33..22..  DDmmaarrrraaggee dduu sseerrvveeuurr

  Dans la plupart des cas, l'installation de DHCP ne cre pas le fichier
  dhcpd.leases. Ds lors, avant de dmarrer le serveur, vous devez crer
  un fichier vide :

  _t_o_u_c_h _/_v_a_r_/_s_t_a_t_e_/_d_h_c_p_/_d_h_c_p_d_._l_e_a_s_e_s

  Pour dmarrer le serveur DHCP, tapez simplement (ou bien insrez-le
  dans les scripts de dmarrage)

   _/_u_s_r_/_s_b_i_n_/_d_h_c_p_d

  Cela dmarre dhcpd sur le dispositif eth0. Si vous devez le dmarrer
  sur un autre dispositif, tapez simplement

   _/_u_s_r_/_s_b_i_n_/_d_h_c_p_d _e_t_h_1

  Si vous voulez tester une configuration bizarre vous pouvez dmarrer
  dhcpd en mode dbogage. En tapant la commande suivante, vous pourrez
  voir exactement ce qui se passe sur le serveur.

    _/_u_s_r_/_s_b_i_n_/_d_h_c_p_d _-_d _-_f

  DDmmaarrrreezz uunn cclliieenntt et jetez un coup d'oeil sur la console du serveur.
  Vous verrez apparatre un grand nombre de messages de dbogage.

  _C_'_e_s_t _f_i_n_i





  77..44..  EEQQLL -- ggaalliisseeuurr ddee cchhaarrggee  lliiggnneess mmuullttiipplleess

  Le nom du priphrique EQL est `eql'. Avec les sources standards du
  noyau vous ne pouvez avoir qu'un seul priphrique EQL par machine.
  EQL permet d'utiliser plusieurs lignes point  point telles que PPP,
  SLIP ou PLIP comme si c'tait un seul lien logique de transport
  tcp/ip. C'est souvent moins cher d'utiliser plusieurs lignes  faible
  dbit que d'avoir une ligne  haut dbit.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support --->
           [*] Network device support
           <*> EQL (serial line load balancing) support




  Pour supporter ce mcanisme la machine  l'autre bout de la ligne doit
  galement supporter EQL.  Linux, Livingstone Portmasters et de
  nouveaux serveurs de ligne supportent des systmes compatibles.

  Pour configurer EQL vous avez besoin des outils eql, disponibles sur :
  metalab.unc.edu.

  La configuration est plutt directe. Vous commencez par configurer
  l'interface eql. C'est exactement comme un autre priphrique rseau.
  Vous configurez l'adresse IP et le mtu en utilissant l'outil _i_f_c_o_n_f_i_g
  , comme ceci :


       root# ifconfig eql 192.168.10.1 mtu 1006




  Ensuite vous devez initialiser manuellement chacune des lignes que
  vous allez utiliser. Ce peut tre toute combinaison de priphriques
  rseau point  point. La faon d'initialiser les connexions dpend du
  type de lien, voyez les paragraphes appropris pour d'autres
  informations.

  Enfin vous devez associer le lien srie et le dispositif EQL, cela
  s'appelle `asservissement' (enslaving) et est ralis avec la commande
  _e_q_l___e_n_s_l_a_v_e comme suit :


       root# eql_enslave eql sl0 28800
       root# eql_enslave eql ppp0 14400




  Le paramtre `_e_s_t_i_m_a_t_e_d _s_p_e_e_d' que vous fournissez  _e_q_l___e_n_s_l_a_v_e ne
  fait rien directement. Il est utilis par le gestionnaire EQL pour
  dterminer comment les datagrammes vont se rpartir sur ce
  priphrique, aussi vous pouvez rgler l'quilibrage des lignes en
  jouant avec cette valeur.

  Pour librer une ligne d'un priphrique EQL, utilisez la commande
  _e_q_l___e_m_a_n_c_i_p_a_t_e comme ci-dessous :


       root# eql_emancipate eql sl0




  Vous ajoutez le routage comme vous le feriez pour tout lien point 
  point, sauf que vos routes doivent se rapporter au dispositif eql
  plutt qu'aux priphriques sries eux-mmes. Ainsi vous devriez
  utiliser :


       root# route add default eql




  Le gestionnaire EQL fut dvelopp par Simon Janes, simon@ncm.com.



  77..55..  EEnnrreeggiissttrreemmeenntt IIPP ((IIPP AAccccoouunnttiinngg)) ((ppoouurr LLiinnuuxx--22..00))

  Les possibilits d'enregistrement IP du noyau Linux vous permettent de
  recueillir et d'analyser les donnes d'utilisation du rseau.  Les
  donnes collectes comprennent le nombre de paquets et le nombre
  d'octets en cumul depuis la dernire remise  zro.  Vous avez  votre
  disposition une grande varit de rglages pour obtenir les donnes
  que vous dsirez. Cette option a t enleve du 2.1.102, car l'ancien
  dispositif pare-feu bas sur ipfwadm a t remplac par
  ``ipfwchains''.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           [*] IP: accounting





  Aprs avoir compil et install le noyau vous devez utiliser la
  commande _i_p_f_w_a_d_m pour configurer l'enregistrement IP. Il y a
  diffrentes possibilits pour choisir les informations  enregistrer.
  J'ai pris un exemple simplifi qui pourrait vous tre utile; lisez
  plutt la page de manuel _i_p_f_w_a_d_m pour plus d'informations.

  Scenario : Vous avez un rseau Ethernet qui est reli  l'Internet via
  une liaison PPP.  Sur l'Ethernet vous avez une machine qui offre un
  grand nombre de services et vous voulez savoir quel trafic est
  engendr par le trafic ftp et ww, aussi bien que le trafic total tcp
  et udp.

  Vous pouvez utiliser une commande qui ressemble  ceci, qui se
  prsente comme un script shell :



               #!/bin/sh
               #
               # Donne les rglages d'enregistrement
               ipfwadm -A -f
               #
               # Met en place les raccourcis
               localnet=44.136.8.96/29
               any=0/0
               # Ajoute des rglages pour le segment Ethernet local
               ipfwadm -A in  -a -P tcp -D $localnet ftp-data
               ipfwadm -A out -a -P tcp -S $localnet ftp-data
               ipfwadm -A in  -a -P tcp -D $localnet www
               ipfwadm -A out -a -P tcp -S $localnet www
               ipfwadm -A in  -a -P tcp -D $localnet
               ipfwadm -A out -a -P tcp -S $localnet
               ipfwadm -A in  -a -P udp -D $localnet
               ipfwadm -A out -a -P udp -S $localnet
               #
               # Rglages par dfaut
               ipfwadm -A in  -a -P tcp -D $any ftp-data
               ipfwadm -A out -a -P tcp -S $any ftp-data
               ipfwadm -A in  -a -P tcp -D $any www
               ipfwadm -A out -a -P tcp -S $any www
               ipfwadm -A in  -a -P tcp -D $any
               ipfwadm -A out -a -P tcp -S $any
               ipfwadm -A in  -a -P udp -D $any
               ipfwadm -A out -a -P udp -S $any
               #
               # Liste les rglages
               ipfwadm -A -l -n
               #






  Les noms ``ftp-data'' et ``www'' se rfrent aux lignes du fichier
  /etc/services.  La dernire commande liste chacune des rgles
  d'enregistrement et affiche le total.

  Il est important de noter, lorsque l'on analyse les enregistrement IP,
  que lleess ttoottaauuxx ssoonntt iinnccrrmmeennttss  cchhaaqquuee ffooiiss, donc pour connaitre les
  diffrences vous devez excuter les oprations mathmatiques
  ncessaires.  Par exemple si je veux savoir combien de donnes ne
  venaient pas de ftp, telnet, rlogin ou www je dois soustraire les
  totaux individuels correspondant  chaque port.




  root# ipfwadm -A -l -n
  IP accounting rules
   pkts bytes dir prot source               destination          ports
      0     0 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 20
      0     0 out tcp  44.136.8.96/29       0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 80
     10   572 out tcp  44.136.8.96/29       0.0.0.0/0            80 -> *
    252 10943 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> *
    231 18831 out tcp  44.136.8.96/29       0.0.0.0/0            * -> *
      0     0 in  udp  0.0.0.0/0            44.136.8.96/29       * -> *
      0     0 out udp  44.136.8.96/29       0.0.0.0/0            * -> *
      0     0 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 20
      0     0 out tcp  0.0.0.0/0            0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 80
     10   572 out tcp  0.0.0.0/0            0.0.0.0/0            80 -> *
    253 10983 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> *
    231 18831 out tcp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 in  udp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 out udp  0.0.0.0/0            0.0.0.0/0            * -> *
  #






  77..55..11..  EEnnrreeggiissttrreemmeenntt IIPP ((IIPP AAccccoouunnttiinngg)) ((ppoouurr LLiinnuuxx--22..22))

  On accde au nouveau code d'enregistrement par des ``chanes IP pare-
  feu''.  Voir La page d'accueil des chanes IP pour plus
  d'informations. Entre autres vous devrez utiliser _i_p_c_h_a_i_n_s au lieu de
  _i_p_f_w_a_d_m pour configurer vos filtres. (d'aprs Documentations/Changes
  dans les sources du dernier noyau).




  77..66..  IIPP AAlliiaassiinngg

  Il y a des applications o tre en mesure d'affecter plusieurs
  adresses IP  un seul priphrique rseau pourrait tre utile.
  Certains fournisseurs d'accs  l'Internet utilise souvent cette
  possibilit pour fournir des offres www et ftp ` la carte' pour leurs
  clients. Vous pouvez vous rfrer au mini-HOWTO IP-Aliasing pour plus
  d'informations.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           ....
           [*] Network aliasing
           ....
           <*> IP: aliasing support




  Aprs avoir compil et install le noyau avec le support IP_Alias, la
  configuration est trs simple. Les alias sont ajouts aux
  priphriques rseau virtuels  associs au priphrique rseau rel.
  Une simple convention de noms s'applique pour priphriques : <nom de
  priphrique> : <numro de priphrique virtuel>, par ex. eth0:0,
  ppp0:10 etc. Notez que le gestionnaire de priphrique ifname:number
  ne peut tre configur _q_u_'_a_p_r__s le rglage de l'interface principale.

  Par exemple, supposons que vous ayez un rseau Ethernet avec
  simultanment deux sous-rseaux IP et que vous vouliez que votre
  machine ait un accs direct aux deux, vous pouvez faire quelque chose
  comme ceci :



               root# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0

               root# ifconfig eth0:0 192.168.10.1 netmask 255.255.255.0 up
               root# route add -net 192.168.10.0 netmask 255.255.255.0 eth0:0





  Pour supprimer un alias vous ajoutez simplement un `-' au bout de son
  nom et et vous faites aussi simplement que a :


              root# ifconfig eth0:0- 0





  Toutes les routes associes avec cet alias seront enleves automa
  tiquement.


  77..77..  IIPP PPaarree--ffeeuu ((FFiirreewwaallll)) ((ppoouurr LLiinnuuxx--22..00))

  Le pare-feu IP et les publications le concernant sont traits de
  manire plus approfondie dans le Firewall-HOWTO. Le pare-feu IP vous
  permet de scuriser votre machine contre les accs rseau non-
  autoriss en filtrant, ou acceptant, des datagrammes venant de, ou
  allant vers, des adresses IP de votre choix.  Il y a diffrentes
  rgles : le filtrage en entre, le filtrage en sortie, et le filtrage
  en retransmission. Les rgles en entre s'appliquent aux datagrammes
  qui sont reus par un dispositif rseau. Les rgles en sortie
  s'appliquent aux datagrammes qui sont mis par un dispositif rseau.
  Les rgles en retransmission s'appliquent aux datagrammes qui ne sont
  pas pour cette machine, c'est  dire les datagrammes qui seront
  rerouts.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           [*] Network firewalls
           ....
           [*] IP: forwarding/gatewaying
           ....
           [*] IP: firewalling
           [ ] IP: firewall packet logging




  La configuration du pare-feu IP est ralise en utilisant la commande
  _i_p_f_w_a_d_m.  Comme mentionn plus haut, la scurit n'est pas ma
  spcialit, aussi, bien que je vous prsente un exemple utilisable par
  vous-mme, faites des recherches et mettez au point vos propres
  rglages si la scurit est importante pour vous.

  Vraisemblablement l'utilisation la plus courante du pare-feu IP est
  lorsque vous utilisez votre machine Linux comme routeur et passerelle
  pare-feu et que vous voulez protger votre rseau local contre les
  accs extrieurs non autoriss.

  La configuration suivante est due  Arnt Gulbrandsen,
  <agulbra@troll.no>.

  L'exemple dcrit une configuration de pare-feu pour une machine Linux
  /pare-feu/routeur illustre par ce diagramme :



       -                                   -
        \                                  | 172.16.37.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |  172.16.174.30 | Linux |      |
       NET =================|  f/w  |------|    ..37.19
           |    PPP         | router|      |  --------
          /                 ---------      |--| Mail |
         /                                 |  | /DNS |
        /                                  |  --------
       -                                   -





  Les commandes suivantes doivent tre normalement places dans un
  fichier rc de telle sorte qu'elles seront dmarres automatiquement 
  chaque redmarrage du systme. Pour une scurit maximum, elles
  devront tre effectues aprs la configuration des interfaces rseau,
  mais avant le montage de ces interfaces pour viter que quelqu'un
  puisse se connecter pendant que la machine pare-feu reboute.































          #!/bin/sh

          # Nettoie la table des rgles de 'Forwarding'
          # Change le rglage par dfaut en 'accept'
          #
          /sbin/ipfwadm -F -f
          /sbin/ipfwadm -F -p accept
          #
          # .. et pour 'Incoming'
          #
          /sbin/ipfwadm -I -f
          /sbin/ipfwadm -I -p accept

          # En premier, dvrouille l'interface PPP
          # J'aimerais bien utiliser '-a deny' au lieu de '-a reject -y' mais
          # il serait alors impossible d'tablir des connexions galement sur
          # cette interface. L'utilisation de -o fait en sorte que tous
          # les datagrammes rejets sont enregistrs. Cela occupe de l'espace
          # disque avec pour compensation la connaissance sur l'attaque due
          #  une erreur de configuration.
          #
          /sbin/ipfwadm -I -a reject -y -o -P tcp -S 0/0 -D 172.16.174.30

          # Rejette certains types de paquets visiblement faux:
          # Rien ne doit venir des adresses multicast/anycast/broadcast s
          #
          /sbin/ipfwadm -F -a deny -o -S 224.0/3 -D 172.16.37.0/24
          #
          # et aucune chose venant du rseau loopback ne doit tre vu sur l'air
          #
          /sbin/ipfwadm -F -a deny -o -S 127.0/8 -D 172.16.37.0/24

          # accepte les connexions entrantes SMTP et DNS, mais seules pour
          # le serveur  de courrier et le serveur de noms
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 0/0 -D 172.16.37.19 25 53
          #
          # DNS utilise UDP aussi bien que TCP, ce qui l'autorise donc quand
          # le serveur de noms est interrog
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 -D 172.16.37.19 53
          #
          # mais pas de "rponses" arrivant sur les ports dangereux tels que
          # NFS et l'extension NFS de Larry McVoy. Si vous utilisez squid
          # ajoutez son port ici.
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 53 \
                  -D 172.16.37.0/24 2049 2050

          # les rponses aux autres ports utilisateurs sont autorises
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 53 \
                  -D 172.16.37.0/24 53 1024:65535

          # Rejette les connexions entrantres vers identd
          # Nous utilisons 'reject' dans ce cas en sorte qu'il soit dit  l'hte
          # entrant de ne pas persvrer, sinon nous devrons attendre que
          # identd s'arrte.
          #
          /sbin/ipfwadm -F -a reject -o -P tcp -S 0/0 -D 172.16.37.0/24 113

          # Accepte des connexions sur des services en provenance des rseaux
          # 192.168.64 et 192.168.65, qui sont des amis de confiance.
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 192.168.64.0/23 \
                  -D 172.16.37.0/24 20:23
          # accepte et laisse passer tout ce qui vient de l'intrieur
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 172.16.37.0/24 -D 0/0

          # rejette la plupart des autres connexions TCP entrantes et les
          # enregistre (ajoutez 1:1023 si ftp ne fonctionne pas)
          #
          /sbin/ipfwadm -F -a deny -o -y -P tcp -S 0/0 -D 172.16.37.0/24

          # ... pour UDP galement
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 -D 172.16.37.0/24




  De bonnes configurations pare-feu sont difficiles  faire. Cet exemple
  peut tre un bon point de dpart pour vous. La page de manuel _i_p_f_w_a_d_m
  vous aidera pour savoir comment utiliser cet outil. Si vous voulez
  configurer un pare-feu, demandez autour de vous et recueillez des avis
  venant de sources de confiance et prenez contact avec quelqu'un qui
  est  l'extrieur pour tester votre configuration et en vrifier la
  fiabilit.



  77..77..11..  PPaarree--ffeeuu IIPP ((ppoouurr LLiinnuuxx--22..22))

  On accde au nouveau code d'enregistrement par des ``chanes pare-feu
  IP''.  Voir La page d'accueil des chanes IP pour plus d'informations.
  Entre autres vous devrez utiliser _i_p_c_h_a_i_n_s au lieu de _i_p_f_w_a_d_m pour
  configurer vos filtres. (D'aprs Documentations/Changes dans les
  sources du dernier noyau).

  Nous sommes conscients du fait que ce n'est malheureusement plus
  d'actualit et nous oeuvrons actuellement pour que cette section soit
  plus  jour. Vous pouvez en esprer une en 1999.




  77..88..  EEnnccaappssuullaattiioonn IIPPIIPP

  Pourquoi vouloir encapsuler des paquets IP dans d'autres paquets IP?
  Cela semble bizarre si vous n'avez jamais vu d'applications
  auparavant.  Il y a deux endroits o c'est utilis : le Mobile-IP et
  l'IP-Multicast. C'est dans un environnement qui est peut-tre le plus
  largement utilis et qui est le moins connu : le radio-amateurisme.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] TCP/IP Networking
           [*] IP: forwarding/gatewaying
           ....
           <*> IP tunelling




  Les priphriques IP tunnel s'appellent `tunl0', `tunl1', etc..

  "Mais pourquoi ?" D'accord. D'accord. Les rgles de routage classiques
  spcifient qu'un rseau IP comprend une adresse IP et un masque de
  rseau. Ceci fournit un ensemble d'adresses contigus qui peuvent
  toutes tre routes par l'intermdiaire d'une seule entre de routage.
  Cela marche, mais signifie que vous ne pouvez utiliser une seule
  adresse uniquement lorsque vous tes connect  un point du rseau
  auquelle elle appartient.  Dans la plupart des cas, il n'y a pas de
  problmes, mais si vous tes en mouvement alors vous ne pouvez pas
  rester connect au mme endroit tout le temps. L'encapsulation  IP/IP
  ( IP tunneling) vous permet de passer outre cette contrainte en
  permettant aux paquets destins  votre adresse d'tre envelopps et
  redirigs vers une autre adresse. Si vous savez que vous allez oprer
  depuis un autre rseau IP pour quelques temps, vous pouvez rgler une
  machine qui est chez vous pour accepter des paquets destins  votre
  adresse IP et les rediriger vers l'adresse que vous allez utiliser
  provisoirement.



  77..88..11..  UUnnee ccoonnffiigguurraattiioonn ddee rrsseeaauu aavveecc ttuunnnneelliinngg..




        192.168.1.24                         192.168.2.24

            -                                    -
            |      ppp0 =           ppp0 =       |
            |  aaa.bbb.ccc.ddd  fff.ggg.hhh.iii  |
            |                                    |
            |   /-----\                 /-----\  |
            |   |     |        //       |     |  |
            |---|  A  |------//---------|  B  |  |
            |   |     |    //           |     |  |
            |   \-----/                 \-----/  |
            |                                    |
            -                                    -






  Ce diagramme montre une autre raison possible d'utiliser
  l'encapsulation IPIP : le rseau priv virtuel. Cet exemple prsuppose
  que vous ayez deux machines chacune avec une seule connexion Internet.
  Chaque hte a une seule adresse IP. Derrire chacune de ces machines
  se trouve des rseaux privs locaux configurs avec des adresses IP
  rserves. Supposez que vous vouliez permettre  chacun des htes du
  groupe A de se connecter  n'importe quel hte du groupe B, comme
  s'ils taient vraiment connects  l'Internet via un routage rseau.
  L'encapsulation IPIP vous permettra de le faire.  noter que
  l'encapsulation ne vous permettra pas de faire en sorte que chacun des
  htes des rseaux A et B puissent parler  n'importe qui sur
  l'Internet, vous aurez toujours besoin de choses comme le masquage IP
  pour pouvoir le faire.  L'encapsulation est normalement accomplie par
  une machine fonctionnant comme routeur.

  Le routeur Linux `A' sera configur comme suit :










          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=fff.ggg.hhh.iii
          #
          # configuration thernet
          ifconfig eth0 192.168.1.1 netmask $mask up
          route add -net 192.168.1.0 netmask $mask eth0
          #
          # ppp0 configuration (start ppp link, set default route)
          pppd
          route add default ppp0
          #
          # configuration du priphrique de tunneling
          ifconfig tunl0 192.168.1.1 up
          route add -net 192.168.2.0 netmask $mask gw $remotegw tunl0






  Le routeur Linux `B' sera configur comme suit :


               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=aaa.bbb.ccc.ddd
               #
               # configuration thernet
               ifconfig eth0 192.168.2.1 netmask $mask up
               route add -net 192.168.2.0 netmask $mask eth0
               #
               # ppp0 configuration (start ppp link, set default route)
               pppd
               route add default ppp0
               #
               # configuration du priphrique de tunneling
               ifconfig tunl0 192.168.2.1 up
               route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0





  La commande :


       root# route add -net 192.168.1.0 netmask $mask0 gw $remotegw tunl0




  dit : `Envoyer tous les datagrammes destins  192.168.1.0/24 dans un
  paquet d'encapsulation ayant pour adresses de destination
  aaa.bbb.ccc.ddd'.

  Notez que les configurations sont inverses  l'autre bout.  Le
  priphrique tunnel utilise `gw' dans la commande route comme
  _d_e_s_t_i_n_a_t_i_o_n du paquet IP o se trouve le datagramme qu'il doit router.
  Cette machine doit savoir comment `dsencapsuler' les paquets IPIP,
  c'est  dire qu'elle doit aussi tre configure comme priphrique
  tunnel.


  77..88..22..  UUnnee ccoonnffiigguurraattiioonn dd''hhttee ppoouurr ll''eennccaappssuullaattiioonn IIPPIIPP..

  Ce n'est pas tout un rseau que vous aurez  router. Vous pouvez par
  exemple ne router qu'une seule adresse IP. Dans ce cas vous devrez
  configurer le priphrique tunl sur la machine `distante' avec sa
  propre adresse IP et  l'extrmit A n'utiliser qu'une route hte
  (avec Proxy Arp) plutt qu'une route rseau via le priphrique
  tunnel. Refaisons et modifions notre configuration de manire
  approprie. Maintenant nous avons seulement l'hte `B' qui veut agir
  comme si il tait  la fois connect  l'Internet et galement au
  rseau distant support par l'hte `A' :



        192.168.1/24

            -
            |      ppp0 =                ppp0 =
            |  aaa.bbb.ccc.ddd      fff.ggg.hhh.iii
            |
            |   /-----\                 /-----\
            |   |     |       //        |     |
            |---|  A  |------//---------|  B  |
            |   |     |     //          |     |
            |   \-----/                 \-----/
            |                      aussi: 192.168.1.12
            -




  Le routeur Linux  `A' sera configur comme suit :


               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=fff.ggg.hhh.iii
               #
               # configuration thernet
               ifconfig eth0 192.168.1.1 netmask $mask up
               route add -net 192.168.1.0 netmask $mask eth0
               #
               # configuration de ppp0 (dmarre le lien ppp link, rgle la route par
               # dfaut)
               pppd
               route add default ppp0
               #
               # configuration du priphrique de tunneling
               ifconfig tunl0 192.168.1.1 up
               route add -host 192.168.1.12 gw $remotegw tunl0
               #
               # Proxy ARP pour l'hte distant
               arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub




  L'hte Linux `B' sera configur comme suit :







          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=aaa.bbb.ccc.ddd
          #
          # configuration de ppp0 (dmarre le lien ppp, rgle la route par dfaut)
          pppd
          route add default ppp0
          #
          # configuration du priphrique de tunelling
          ifconfig tunl0 192.168.1.12 up
          route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0





  Ce type de configuration est vraiment typique d'une application IP-
  Mobile, o un simple hte veut seulement se balader sur l'Internet et
  maintenir une adresse IP utilisable tout le temps. Rfrez-vous au
  paragraphe Mobile-IP pour avoir plus d'informations et savoir comment
  faire en pratique.



  77..99..  IIPP MMaassqquueerraaddee

  Un grand nombre de gens ont une simple connexion par tlphone pour
  aller sur l'Internet. Presque tout le monde ne se voit offrir qu'une
  seule adresse IP par le founisseur d'accs avec ce type de
  configuration. Ceci est normalement suffisant pour permettre un accs
  complet au rseau. IP Masquerade est une astuce intelligente qui vous
  permet d'avoir plusieurs machines utilisant une seule adresse IP, en
  faisant croire aux autres htes qu'il n'y a que la machine supportant
  la connexion (NdT : d'o le terme masquerade=duperie, mascarade).  Il
  y a qu'une seule mise en garde, qui est que la fonction masquage ne
  travaille pratiquement que dans un seul sens : les htes masqus
  peuvent appeler mais ne peuvent accepter ou recevoir des connexions
  rseau de la part d'htes loigns. Cela signifie que certains
  services rseau comme _t_a_l_k ne peuvent fonctionner et que d'autres,
  comme _f_t_p doivent tre configurs pour fonctionner en mode passif
  (PASV). Heureusement la plupart des services rseau comme _t_e_l_n_e_t,
  World Wide Web et _i_r_c fonctionnent correctement.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Code maturity level options  --->
           [*] Prompt for development and/or incomplete code/drivers
       Networking options  --->
           [*] Network firewalls
           ....
           [*] TCP/IP networking
           [*] IP: forwarding/gatewaying
           ....
           [*] IP: masquerading (EXPERIMENTAL)




  Normalement votre machine Linux supportant un lien SLIP ou PPP se
  comportera comme si elle tait toute seule. De plus elle peut avoir un
  autre priphrique rseau configur, par exemple une carte Ethernet,
  avec des adresses rseau rserve. Les htes masqus seront ceux du
  second rseau. Chacun de ces htes aura l'adresse IP du port Ethernet
  rgle comme passerelle ou routeur par dfaut.
  Une configuration typique ressemble  ceci :


       -                                   -
        \                                  | 192.168.1.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |                | Linux | .1.1 |
       NET =================| masq  |------|
           |    PPP/slip    | router|      |  --------
          /                 ---------      |--| hte |
         /                                 |  |      |
        /                                  |  --------
       -                                   -




  77..99..11..  MMaassqquueerraaddiinngg aavveecc IIPPFFWWAADDMM

  Les commandes adquates pour cette configuration sont :


       # Routage rseau pour thernet
       route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       #
       # Route par dfaut pour le reste de l'internet.
       route add default ppp0
       #
       # Fait en sorte que tous les htes du rseau 192.168.1/24  soient masqus.
       ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0





  77..99..22..  MMaassqquueerraaddiinngg aavveecc IIPPCCHHAAIINNSS

  Cela ressemble  l'utilisation avec IPFWADM mais la structure de la
  commande change:



                # Routage rseau pour ethernet
                route add -net 192.168.1.0 netmask 255.255.255.0 eth0
                #
                # Route par dfaut vers le reste de l'internet.
                route add default ppp0
                #
                # Fait en sorte que tous les htes sur le rseau 192.168.1/24 soient
                # masqus.
               ipchains -A forward -s 192.168.1.0/24 -j MASQ





  Vous pouvez obtenir plus d'informations sur IP Masquerade sur la Page
  d'informations sur l'IP Masquerade.  Il existe galement un document
  _t_r__s dtaill qui est le ``IP-Masquerade-mini-HOWTO'' (qui donne en
  plus des renseignements pour configurer d'autres systmes
  d'exploitation pour fonctionner avec un serveur de masquage linux).




  77..1100..  IIPP TTrraannssppaarreenntt PPrrooxxyy

  IP transparent proxy est un procd qui vous permet de rediriger des
  serveurs ou des services destins  une autre machine vers les
  services de votre machine.  Typiquement c'est utile lorsque vous avez
  une machine Linux routeur et qui fournit aussi un serveur proxy. Vous
  redirigerez toutes les connexions  ce service distant vers le serveur
  proxy local.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Code maturity level options  --->
               [*] Prompt for development and/or incomplete code/drivers
       Networking options  --->
               [*] Network firewalls
               ....
               [*] TCP/IP networking
               ....
               [*] IP: firewalling
               ....
               [*] IP: transparent proxy support (EXPERIMENTAL)




  La configuration du dispositif transparent proxy est ralis en
  utilisant la commande _i_p_f_w_a_d_m.

  Par exemple :


       ipfwadm -I -a accept -D 0/0 telnet -r 2323




  Cet exemple fera en sorte que toutes les tentatives de connexion vers
  le port telnet (23), de n'importe quel hte, seront rediriges vers le
  port 2323 de ce mme hte. Si vous utilisez un service sur ce port,
  vous pouvez rediriger des connexions telnet, les enregistrer ou
  excuter tout ce qui bon vous semble.

  Un exemple plus intressant est la redirection de tout le trafic http
  au travers d'un cache local. Cependant, le protocole utlis par les
  serveurs proxy diffre du protocole natif de http : quand un client se
  connecte  www.server.com:80 et demande chemin/page, quand il se
  connecte au cache local il contacte proxy.local.domain:8080 et
  recherche www.server.com/chemin/page.

  Pour filtrer une demande http au travers du proxy local, vous devez
  pouvoir adapter le protocole en insrant un petit serveur, appel
  transproxy (vous pouvez le trouver sur la toile). Vous pouvez choisir
  de faire tourner transproxy sur le port 8081, et excuter la commande
  :


       ipfwadm -I -a accept -D 0/0 80 -r 8081




  Alors le programme transproxy recevra toutes les connexions devant
  aller vers des serveurs externes et les passera au proxy local aprs
  avoir corrig les diffrences de protocole.

  77..1111..  IIPPvv66

   peine pensez-vous avoir commenc  comprendre comment fonctionne le
  rseau IP, que les rgles ont chang !  IPv6 est l'abbrviation de
  version 6 du `Protocole Internet' (version 6 de IP). Il fut dvelopp
  initialement pour calmer les inquitudes de la communaut Internet
  quant  la pnurie ventuelle d'adresses IP. Les adresses IPv6 sont
  codes sur 16 octets (128 bits). IPv6 inclut un certain nombre
  d'autres changements, la plupart du temps des simplifications, qui
  rendront les rseaux IPv6 plus facilement grables que les rseaux
  IPv4.

  Linux a dj une implmentation IPv6 qui marche, mais pas encore
  compltement, dans la srie des noyaux 2.2.*.

  Si vous voulez essayer cette prochaine gnration de technologie
  Internet, ou si vous voulez un renseignement, lisez le document
  IPv6-FAQ qui se trouve sur www.terra.net.



  77..1122..  IIPP MMoobbiillee

  Le terme "mobilit IP" dcrit la possibilit qu'un hte a de
  transfrer sa connexion rseau d'un point de l'Internet vers un autre
  sans changer d'adresse IP ou sans perdre la connectivit. Normalement
  quand un hte IP change de point de connexion, il change aussi
  d'adresse IP.  La mobilit IP rsoud ce problme en allouant une
  adresse IP fixe  l'hte qui se dplace et en utilisant une
  encapsulation IP (tunneling) avec routage automatique pour s'assurer
  que les datagrammes qui lui sont destins seront routs vers l'adresse
  effectivement utilise  ce moment.

  Un projet est en cours en vue de fournir un paquetage complet d'outils
  Linux pour la mobilit IP. L'tat de ce projet et les outils peuvent
  tre obtenus sur : Linux Mobile IP Home Page.



  77..1133..  MMuullttiiccaasstt

  L'IP Multicast permet de router simultanment des datagrammes IP vers
  un certain nombre d'htes se trouvant sur des rseaux diffrents.  Ce
  mcanisme est exploit pour fournir sur l'Internet des applications
  prenant de la bande passante, telles que les transmissions audio et
  video et autres nouvelles applications.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
               [*] TCP/IP networking
               ....
               [*] IP: multicasting




  Un ensemble d'outils et quelques modifications de la configuration
  rseau sont ncessaires.  Pour plus d'informations sur le support
  multicast pour Linux, voyez le Multicast-HOWTO.html





  77..1144..  MMiissee eenn ffoorrmmee dduu ttrraaffiicc -- CChhaannggeerr llaa bbaannddee ppaassssaannttee aalllloouuee

  Le metteur en forme de trafic est un gestionnaire de priphrique qui
  cre de nouvelles interfaces; celles-ci sont limites au point de vue
  trafic selon les rglages de l'utilisateur, et se connectent aux
  priphriques de rseau physiques pour la transmission relle, et
  peuvent donc tre utilises comme route vers l'extrieur en vue de
  trafic rseau.


  Le metteur en forme fut introduit sur Linux-2.1.15 et ensuite sur
  Linux-2.0.36 (il apparut dans le 2.0.36-pre-patch-2 distribut  par
  Alan Cox, l'auteur du dispositif de mise en forme et le mainteneur de
  Linux-2.0).


  Le metteur en forme de trafic ne peut tre compil qu'en tant que
  module, et se configure  l'aide du programme _s_h_a_p_e_c_f_g avec des
  commandes comme :



               shapecfg attach shaper0 eth1
               shapecfg speed shaper0 64000






  Ce metteur en forme de trafic ne peut contrler que la bande passante
  du trafic sortant, car les paquets sont transmis par le metteur en
  forme si l'on se rfre aux tables de routage; ainsi, le
  fonctionnement suivant ``un routage par adresse de dpart'' peut aider
   limiter la bande passante totale d'htes spcifiques utilsant un
  routeur Linux.


  Linux-2.2 possde dj le support pour un tel routage et si vous en
  avez besoin pour Linux-2.0, voyez le patch de Mike McLagan, sur
  ftp.invlogic.com. Lisez le fichier Documentationnetworking/shaper.txt
  pour plus d'informations.


  Si vous voulez faire (une tentative de) mise en forme pour les paquets
  entrants, essayez rshaper-1.01 (ou plus rcent), sur ftp.systemy.it.



  88..  RRoouuttaaggee aavveecc LLiinnuuxx--22..22

  Le noyau 2.2 a accru les possibilits de routage de Linux de manire
  certaine.  Malheureusement la documentation pour exploiter ces
  nouvelles possibilits est presque impossible  trouver, mme si elle
  existe.


  J'y ai pass un peu de temps et ai t en mesure de faire un petit
  quelque chose.  J'en mettrai plus quand j'aurai le temps et l'aide
  ncessaire pour comprendre tout ce qui a t dit.

  Dans les versions du noyau 2.0 et antrieures, Linux utilise la
  commande _r_o_u_t_e standard pour positionner les routes dans une seule
  table de routage. Si vous aviez tap _n_e_t_s_t_a_t _-_r_n  l'invite vous
  auriez pu voir un exemple.

  Dans les noyaux rcents (2.1 et au-del) vous avez une autre option.
  Cette option est autorise et vous permet d'avoir plusieurs tables de
  routage.  Les nouvelles rgles donnent beaucoup plus de souplesse sur
  la faon de manipuler les paquets. Vous pouvez choisir entre des
  routes bases non seulement sur l'adresse de destination, mais aussi
  l'adresse de dpart, TOS, ou un priphrique de rception.


  88..11..  LLeess bbaasseess

  AAffffiicchheerr llaa ttaabbllee ddee rroouuttaaggee ::

  ip route

  Maintenant sur ma machine cela donne la sortie suivante :



       207.149.43.62 dev eth0  scope link
       207.149.43.0/24 dev eth0  proto kernel  scope link  src 207.149.43.62
       default via 207.149.43.1 dev eth0




  La premire ligne :

  220077..114499..4433..6622 ddeevv eetthh00 ssccooppee lliinnkk est la route vers l'interface

  La deuxime :

  220077..114499..4433..00//2244 ddeevv eetthh00 pprroottoo kkeerrnneell ssccooppee lliinnkk ssrrcc 220077..114499..4433..6622 est
  la route qui dit _t_o_u_t _c_e _q_u_i _v_a _v_e_r_s _2_0_7_._1_4_9_._4_3_._0 _d_o_i_t _a_l_l_e_r _v_e_r_s
  _2_0_7_._1_4_9_._4_3_._6_2.

  La troisime :

  ddeeffaauulltt vviiaa 220077..114499..4433..11 ddeevv eetthh00 est la route par dfaut.


  88..11..11..  UUttiilliisseerr lleess iinnffoorrmmaattiioonnss

  Maintenant que nous avons vu une table de routage de base, voyons
  comment l'utiliser. Tout d'abord lisez the Policy routing text. Si
  vous tes embts, ne vous en faites pas -- c'est un texte confus. Il
  vous donne tout ce que les nouvelles tables de routage peuvent faire.


  88..22..  AAjjoouutteerr uunnee rroouuttee aavveecc lleess nnoouuvveeaauuxx oouuttiillss iipp

  Dans la section prcdente, nous avons mentionn comment afficher la
  table de routage et comment comprendre les bases. Impeccable, la
  sortie ressemble de trs prs  la syntaxe que nous devons utiliser
  pour mettre en place la table de routage correspondant exactement 
  nos besoins.



       ip route add 207.149.43.62 dev eth0  scope link
       ip route add 207.149.43.0/24 dev eth0 proto kernel scope link src 207.149.43.62
       ip route add 127.0.0.0/8 dev lo  scope link
       ip route add default via 207.149.43.1 dev eth0




  Comme vous pouvez le constater, les entres et sorties sont presque
  les mmes, sauf le _i_p _r_o_u_t_e _a_d_d au dbut de chaque ligne.

  NNoottee:: Je suis conscient que la documentation sur le routage avec les
  noyaux 2.2 fait cruellement dfaut. Dans les faits, je pense que TOUT
  LE MONDE en est conscient. Si vous avez une petite exprience,
  contactez-nous s'il vous plat  poet@linuxports.com nous aimerions
  obtenir les informations que vous avez pour l'inclure plus tard dans
  ce document.


  88..33..  UUttiilliisseerr NNAATT aavveecc llee nnooyyaauu 22..22


  Le systme de traduction d'adresse rseau (NAT: Network Address
  Translation) ressemble plutt au grand frre standardis du systme de
  masquage IP de Linux.  Il est dcrit en dtail dans la RFC-1631 sur
  votre archive RFC la plus proche.  NAT fournit des possibilts que IP
  Masquerade ne sait pas faire, ce qui le rend plus apte  une
  utilsation de routeur pare-feu pour un rseau d'entreprise et des
  installations de plus grande dimension.

  Une implmentation alpha de NAT pour le noyau 2.0.29 de Linux a t
  dveloppe par Michael.Hasenstein, Michael.Hasenstein@informatik.tu-
  chemnitz.de.  La documentation et l'implmentation de Michael se
  trouve sur : Linux IP Network Address Web Page L'empilement TCP/IP du
  noyau 2.2, qui a t grandement amlior, inclut les fonctionnalits
  de NAT. Ce systme semble rendre obsolte le travail de Michael
  Hasenstein (Michael@informatik.tu-chemnitz.de).


  Pour le rendre oprationnel vous devez activer dans le noyau
  CONFIG_IP_ADVANCED_ROUTER, CONFIG_IP_MULTIPLE_TABLES (pour le systme
  de routage) et CONFIG_IP_ROUTE_NAT (pour un NAT rapide). De plus, si
  vous voulez utiliser un rglage plus fin de NAT, vous devez activer le
  pare-feu (CONFIG_IP_FIREWALL) et CONFIG_IP_ROUTE_FWMARK.  Pour faire
  fonctionner effectivement ces possibilits incluses dans le noyau,
  vous aurez besoin du programme ip de Alexey Kuznyetsov rcupr sur
  ftp://ftp.inr.ac.ru/ip-routing/.

  Datagrammes NAT entrants

  Maintenant pour traduire les adresses des datagrammes entrants, on
  utilise la commande suivante :



                  ip route add nat <ext-addr>[/<masklen>] via <int-addr>





  Ceci fait qu'un paquet entrant destin  l'adresse "ext-addr"
  (l'adresse visible sur l'internet extrieur) aura son champ d'adresse
  converti en "int-addr" (l'adresse de votre rseau interne, derrire
  votre passerelle ou pare-feu). Le paquet est alors rout suivant la
  table de routage locale. Vous pouvez traduire soit une adresse hte
  unique, soit des blocs complets.  EExxeemmpplleess::




               ip route add nat 195.113.148.34 via 192.168.0.2
               ip route add nat 195.113.148.32/27 via 192.168.0.0

  La premire commande rend l'adresse interne 192.168.0.2 accessible en
  tant que 195.113.148.34. Le second exemple montre une rallocation du
  bloc 192.168.0.0-31 en 195.113.148.32-63.



  99..  UUttiilliissaattiioonn dduu mmaattrriieell ccoouurraanntt ppoouurr PPCC





  99..11..  RRNNIISS

  Le Rseau Numrique  Intgration de Service (RNIS) (en anglais ISDN:
  Integrated Services Digital Network) est une srie de normes donnant
  les spcifications d'un rseau de donnes numriques  usage gnral.
  Un `appel' RNIS cre un service synchrone de donnes point  point
  vers la destination. RNIS est gnralement dlivr sur une ligne 
  haut dbit divise en un certain nombre de canaux discrets.  Il y a
  deux types de canaux, les `canaux B' qui transportent effectivement
  les donnes utilisateurs, et un canal unique appel `canal D' qui est
  utilis pour envoyer les informations de contrle pendant l'change
  RNIS en vue d'tablir des appels et autres fonctions. En Australie,
  par exemple, RNIS peut tre fourni sur une liaison 2 Mps qui est
  divise en 30 canaux B discrets de 64 kps et un canal D de 64 kps.
  N'importe quel nombre de canaux peuvent tre utiliss en mme temps et
  ceci dans toutes les combinaisons possibles.  Vous pouvez par exemple
  tablir 30 appels diffrents de 64 kps vers 30 destinations
  diffrentes, ou bien 15 appels de 128 kps chacun vers 15 destinations
  diffrentes (2 canaux utiliss par appel), ou seulement un petit
  nombre d'appels, le reste tant inactif.  Un canal peut tre utilis
  pour des appels entrant ou sortant.  Le but initial de RNIS tait de
  permettre aux socits de Tlcommunications de fournir un seul
  service de donnes pouvant dlivrer soit le tlphone (avec une voix
  numrise) ou bien des services de donnes vers votre domicile ou
  votre bureau sans avoir  effectuer de changements pour obtenir une
  configuration spciale.

  Il y a plusieurs faons de connecter votre ordinateur  un service
  RNIS. L'une consiste  utiliser un dispositif appel `Adaptateur de
  Terminal' qui se branche sur l'unit de terminal rseau que votre
  oprateur de tlcommunications a install au moment de l'obtention de
  votre service RNIS, et qui prsente des interfaces sries.  L'une de
  ces interfaces est utilise pour entrer les commandes pour tablir les
  appels et la configuration, et les autres sont relies aux
  priphriques rseau qui utiliseront les circuits de donnes quand la
  connexion sera faite. Linux peut travailler avec ce type de
  configuration sans modification, vous devez juste traiter le port de
  l'adaptateur de terminal comme vous traitez tout priphrique srie.
  Une autre faon, qui est la raison d'tre pour le support RNIS dans le
  noyau, vous permet d'installer une carte RNIS dans votre machine Linux
  et le logiciel Linux prend en charge les protocoles et fait les appels
  lui-mme.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       ISDN subsystem  --->
               <*> ISDN support
               [ ] Support synchronous PPP
               [ ] Support audio via ISDN
               < > ICN 2B and 4B support
               < > PCBIT-D support
               < > Teles/NICCY1016PC/Creatix support

  L'implmentation Linux de RNIS supporte diffrents types de cartes
  internes RNIS.  Il y a celles numres dans les options de
  configuration noyau :

    ICN 2B and 4B

    Octal PCBIT-D

    Teles ISDN-cards et compatibles

     Certaines de ces cartes ont besoin de logiciels devant tre
     tlchargs pour les rendre oprationnelles. Il y a un utilitaire
     spar pour le faire.

  Tous les dtails pour configurer le support RNIS Linux se trouvent
  dans le rpertoire /usr/src/linux/Documentation/isdn/ et un document
  FAQ ddi  _i_s_d_n_4_l_i_n_u_x est disponible sur www.lrz-muenchen.de (vous
  pouvez cliquer sur le drapeau anglais pour obtenir la version
  anglaise).

  NNoottee aauu ssuujjeett ddee PPPPPP. L'ensemble des protocoles PPP peut travailler
  sur des lignes srie synchrone ou asynchrone. Le dmon PPP `_p_p_p_d'
  couramment distribu pour Linux ne supporte que le mode asynchrone. Si
  vous dsirez utiliser les protocoles PPP avec votre service RNIS vous
  aurez besoin d'une version spciale. Les dtails pour la trouver se
  trouvent dans la documentation mentionne ci-dessus.



  99..22..  PPLLIIPP ppoouurr LLiinnuuxx--22..00

  Les noms de priphriques PLIP sont `plip0', `plip1', `plip2'.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           <*> PLIP (parallel port) support





  _P_L_I_P (Parallel Line IP) est, comme SLIP, utilis pour fournir une
  connexion rseau _p_o_i_n_t _ _p_o_i_n_t entre deux machines, sauf qu'il est
  conu pour utiliser les ports parallles de votre machine au lieu des
  ports sries. Parce qu'il est possible de transmettre plus d'un bit en
  mme temps avec un port parallle, il est possible d'atteindre de plus
  hautes vitesses avec l'interface _P_L_I_P qu'avec une sortie srie
  standard (un schma de cblage est donn plus loin dans ce document).
  De plus, mme le plus simple des ports parallles, le port imprimante,
  peut tre utilis, au lieu d'acheter un UART 16550AFN relativement
  cher pour vos ports sries. PLIP utilise beaucoup de CPU en
  comparaison d'une liaison srie et ce n'est srement pas un bon choix
  si vous avez la possibilit d'avoir des cartes thernet pas chres,
  mais a fonctionne lorsque rien d'autre n'est disponible, et a
  fonctionne trs bien.

  Les gestionnaires PLIP entrent en comptition avec les autres
  gestionnaires du matriel branch sur le port parallle. Si vous
  voulez utiliser les deux, vous devez alors les compiler en tant que
  modules pour pouvoir choisir quel port vous voulez utiliser pour PLIP
  et quel port pour l'imprimante.  Voyez le document ``Modules-mini-
  HOWTO'' pour plus d'informations sur la configuration des modules
  noyau.

  Attention, notez que certains portables utilisent des circuits qui ne
  peuvent pas fonctionner avec PLIP car ils n'autorisent pas certaines
  combinaisons dont PLIP a besoin et que les imprimantes n'utilisent
  pas.

  L'interface Linux _P_L_I_P est compatible avec le _G_e_s_t_i_o_n_n_a_i_r_e _P_L_I_P
  _C_r_y_n_w_y_r _P_a_c_k_e_t et ceci signifie que vous pouvez connecter votre
  machine Linux avec une machine DOS tournant avec n'importe quel
  logiciel TCP/IP via _P_L_I_P.

  Dans la srie des noyaux 2.0.* les gestionnaires de priphrique PLIP
  sont affects aux ports e/s et IRQ comme suit :


       device  i/o addr    IRQ
       ------  --------    -----
       plip0   0x3BC           5
       plip1   0x378           7
       plip2   0x278           2




  Si vos ports parallles ne correspondent pas aux combinaisons
  prcdentes alors vous pouvez changer les IRQ en utilisant la commande
  _i_f_c_o_n_f_i_g avec le paramtre `irq'. N'oubliez pas de valider les IRQ
  pour vos ports imprimantes dans votre ROM BIOS s'il supporte cette
  option. Un autre moyen consiste  spcifier les options ``io='' et
  ``irq='' sur la ligne de commande de insmod, si vous utilisez les
  modules. Par exemple :



       root# insmod plip.o io=0x288 irq=5




  Le fonctionnement de PLIP est contrl par deux temporisations de
  dpassement de temps, dont les valeurs par dfaut devraient convenir
  la plupart du temps. Vous devrez peut-tre les augmenter si vous avez
  un ordinateur particulirement lent, auquel cas les valeurs devant
  tre augmentes se trouvent sur l'aauuttrree ordinateur. Il existe un
  programme appel _p_l_i_p_c_o_n_f_i_g qui permet d'effectuer ces rglages sans
  recompiler le noyau. Il est fourni avec de nombreuses distributions
  Linux.

  Pour configurer une interface _p_l_i_p, vous devez invoquer les commandes
  suivantes (ou les _a_j_o_u_t_e_r  vos scripts d'initialisation) :


        root# /sbin/ifconfig plip1 localplip pointopoint remoteplip
        root# /sbin/route add remoteplip plip1





  Dans ce cas, le port utilis est celui qui a l'adresse 0x378 ;
  _l_o_c_a_l_p_l_i_p et _r_e_m_o_t_e_p_l_i_p sont les adresses IP utilises sur le cble
  PLIP. Je les mets personnellement dans la base de donnes /etc/host :





   # entres plip
   192.168.3.1 localplip
   192.168.3.2 remoteplip





  Le paramtre _p_o_i_n_t_o_p_o_i_n_t a la mme signification que pour  SLIP,
  c'est--dire qu'il spcifie l'adresse de la machine  l'autre bout de
  la liaison.

  Dans la plupart des cas vous pouvez traiter l'interface _P_L_I_P comme si
  elle tait une interface _S_L_I_P, sauf que ni _d_i_p ni _s_l_a_t_t_a_c_h ne doivent,
  ou ne peuvent, tre utiliss.

  Plus d'information sur PLIP peut tre obtenu avec le document ``PLIP-
  mini-HOWTO''.



  99..22..11..  PPLLIIPP ppoouurr LLiinnuuxx--22..22

  Durant le dveloppement des versions 2.1 du noyau, le support
  concernant les ports parallles s'est amlior.


  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       General setup --->
           [*] Parallel port support
       Network device support --->
           <*> PLIP (parallel port) support





  Le nouveau code concernant PLIP se comporte comme l'ancien (on utilise
  les mmes commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e comme dans le paragraphe
  prcdent), mais l'initialisation du systme est diffrente en raison
  du support port parallle amlior.


  Le ``premier'' priphrique PLIP est toujours appel ``plip0'',
  premier signifiant celui qui est dtect en premier par le systme,
  comme pour les priphriques Ethernet. Le port parallle utilis de
  fait est l'un de ceux qui sont disponibles, comme indiqu dans
  /proc/parport.  Par exemple, si vous n'avez qu'un seul port parallle,
  vous n'aurez qu'un seul rpertoire appel /proc/parport/0.


  Si votre noyau ne dtecte pas l'IRQ utilise par votre port parallle,
  ``insmod plip'' chouera ; dans ce cas, vous crivez juste le chiffre
  adquat dans /proc/parport/0/irq et vous invoquez de nouveau _i_n_s_m_o_d.


  Une information complte sur la gestion des ports parallles est
  disponible dans le fichier Documentation/parport.txt, qui se trouve
  dans les sources du noyau.





  99..33..  PPPPPP

  Un grand nombre de personnes ont des problmes avec Linux et PPP, en
  raison de l'augmentation du nombre de technologies d'authentification,
  et il est devenu plus difficile de grer les liens PPP. Bien que
  l'information qui suive soit dtaille, elle est peut-tre exagre si
  vous ne voulez que rgler une simple connexion. La majorit des
  fournisseurs d'accs utilise PAP (Plain Text Authentification Protocol
  : Protocole d'Identification en Texte simple). Puisque c'est le cas,
  je vous recommande _F_O_R_T_E_M_E_N_T que vous jetiez un coup d'oeil sur les
  programmes suivants pour vous aider  grer vos liens.


    Linuxconf

    COAS

  Ces deux programmes fournissent des menus pour la configuration pour
  PPP.  Encore une fois, je vous _s_u_g_g__r_e d'utiliser ces programmes.  Ils
  rendront votre vie plus agrable. LinuxConf fonctionne avec la plupart
  des distributions et il est distribu avec RedHat. COAS est distribu
  avec Caldera et SUSE possde un programme appel YAST. Je n'ai aucune
  exprience avec YAST, si quelqu'un pouvait m'envoyer une machine
  (grossire allusion) je chargerai SUSE avec le document YAST.

  Les noms de priphriques PPP sont `ppp0', `ppp1', etc.  Les noms sont
  attribus squentiellement, le premier priphrique tant `0'.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           <*> PPP (point-to-point) support




  La configuration de PPP est discute en dtail dans le PPP-HOWTO. Ce
  document est vraiment vieux et j'essayerai d'avoir plus d'informations
   partir du manuel d'installation de PPP ds que je peux.


  99..33..11..  MMaaiinntteennaannccee dd''uunnee ccoonnnneexxiioonn ppeerrmmaanneennttee aavveecc llee rrsseeaauu  ll''aaiiddee
  ddee ppppppdd

  Si vous tes suffisamment fortuns pour avoir une connexion semi-
  permanente avec le net et que vous vouliez que votre machine refasse
  la connexion PPP en cas de dconnexion, alors voici une astuce simple.

  Configurer PPP de sorte qu'il soit dmarr par l'utilisateur root en
  lanant la commande :


       # pppd




  SSooyyeezz cceerrttaaiinnss d'avoir l'option `-detach' dans le fichier
  /etc/ppp/options. Puis, insrez la ligne suivante dans votre fichier
  /etc/inittab, avec les dfinitions des _g_e_t_t_y :


       pd:23:respawn:/usr/sbin/pppd


  Cela permettra au programme _i_n_i_t de dmarrer et de surveiller le pro
  gramme _p_p_p_d , et de le redmarrer automatiquement s'il meurt.




  99..44..  CClliieenntt SSLLIIPP ((AAnnttiiqquuee))

  Les fichiers de priphriques SLIP sont nomms `sl0', `sl1', etc. Le
  premier configur tant `0' et les autres s'incrmentant au fur et 
  mesure de leur configuration.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
           [*] Network device support
           <*> SLIP (serial line) support
           [ ]  CSLIP compressed headers
           [ ]  Keepalive and linefill
           [ ]  Six bit SLIP encapsulation




  SLIP (Serial Line Internet Protocol) vous permet d'utiliser TCP/IP
  avec une ligne srie, ce peut tre un tlphone et un modem, ou tout
  autre ligne ddie.  Bien sr pour utiliser SLIP vous devez avoir
  accs  un _s_e_r_v_e_u_r _S_L_I_P dans votre entourage.  De nombreuses
  universits et de socits fournissent des accs SLIP de par le monde.

  SLIP utilise les ports sries de votre machine pour transporter les
  datagrammes IP. Pour cela il doit prendre le contrle du priphrique
  srie. Les noms de priphriques SLIP sont _s_l_0, _s_l_1, etc. Comment
  ceux-ci correspondent avec vos priphriques srie ? Le code rseau
  utilise ce que l'on nomme un appel _i_o_c_t_l (i/o control) pour
  transformer les priphriques srie en priphriques SLIP. Il y a deux
  programmes qui peuvent faire cela, ce sont _d_i_p et _s_l_a_t_t_a_c_h.




  99..44..11..  ddiipp

  _d_i_p (Dialup IP) est un programme lgant capable de rgler la vitesse
  du dispositif srie, de demander  votre modem d'appeler l'autre
  extrmit de la ligne, de vous connecter automatiquement au serveur
  distant, de chercher des messages qui vous ont t envoys par le
  serveur et d'en extraire des informations telles que votre adresse IP
  et de faire le _i_o_c_t_l ncessaire pour basculer votre port srie en mode
  SLIP.  _d_i_p est trs flexible quant  l'utilisation de scripts et grce
   ceci vous pouvez automatiser vos procdures de connexion.

  On peut le trouver sur : metalab.unc.edu.

  Pour l'installer faites :


       user% tar xvfz dip337o-uri.tgz
       user% cd dip-3.3.7o
       user% vi Makefile
       root# make install




  Le fichier Makefile suppose l'existence d'un groupe nomm _u_u_c_p, mais
  vous pouvez le changer en _d_i_p ou _S_L_I_P, selon votre configuration.



  99..44..22..  ssllaattttaacchh

  _s_l_a_t_t_a_c_h au contraire de _d_i_p est un programme trs simple, trs facile
   utiliser, mais qui n'a pas la sophistication de _d_i_p.  Il n'a pas la
  possiblit d'accepter des scripts, tout ce qu'il fait tant de
  configurer votre priphrique srie en priphrique SLIP. Il suppose
  que vous avez toutes les informations ncessaires et que la liaison
  srie est tablie avant de l'invoquer.  _s_l_a_t_t_a_c_h est idal quand vous
  avez une liaison permanente avec votre serveur, comme un cble
  physique ou une ligne ddie.



  99..44..33..  QQuuaanndd uuttiilliisseerr qquuooii ??

  Vous devriez utiliser _d_i_p lorsque votre liaison vers la machine qui
  est votre serveur SLIP est un modem, ou tout autre lien intermittent.
  Vous devriez utiliser _s_l_a_t_t_a_c_h quand vous avez une ligne ddie,
  peut-tre un cble, entre votre machine et le serveur et qu'il n'y a
  pas d'action spciale ncessaire pour garder la ligne en activit.
  Voir la section `Connexion SLIP permanente' pour plus de dtails.


  Configurer SLIP est analogue  la configuration d'une interface
  Ethernet (voir la section `Configurer un priphrique Ethernet' ci-
  dessus).  Cependant, il existe quelques diffrences.


  Tout d'abord, les liens SLIP ne sont pas des rseaux Ethernet en ce
  sens qu'il n'y a que deux htes sur le rseau, un  chaque extrmit
  de la liaison.  la diffrence de l'Ethernet qui est disponible ds
  que vous tes cbl, avec SLIP, en fonction du type de lien que vous
  avez, vous serez amen  initialiser votre connexion rseau d'une
  manire spciale.


  Si vous utilisez _d_i_p, alors cela ne sera pas fait au moment du
  dmarrage de la machine, mais plus tard, quand vous serez prt 
  utiliser la liaison.  Il est possible d'automatiser la procdure. Si
  vous utilisez _s_l_a_t_t_a_c_h vous voudrez probablement ajouter une section
  dans votre fichier _r_c_._i_n_e_t_1.  Ceci sera dcrit bientt.


  Il y a deux types principaux de serveurs SLIP : serveurs avec
  adressage IP dynamique et serveurs avec adressage IP statique. Presque
  tous les serveurs SLIP vous demanderont  la connexion d'utiliser un
  nom d'utilisateur et un mot de passe quand vous composez le numro.
  _d_i_p peut prendre en charge la connexion automatiquement.



  99..44..44..  eett DDIIPP SSeerrvveeuurr SSLLIIPP ssttaattiiqquuee aavveecc uunnee lliiggnnee ttllpphhoonniiqquuee

  Le serveur SLIP statique est celui qui vous fournit une adresse IP qui
  reste exclusivement la vtre.  chaque fois que vous vous connectez 
  ce serveur, vous configurez votre port SLIP avec cette adresse. Le
  serveur SLIP statique rpond  votre appel par modem, vous demande
  probablement un nom d'utilisateur et un mot de passe, et ensuite
  dirige tous les datagrammes destins  votre adresse au travers de
  cette connexion. Si vous avez un serveur statique, alors vous mettez
  des entres pour votre nom d'hte et votre adresse IP (puisque vous
  savez ce qu'elle sera) dans votre fichier /etc/hosts. Vous devez aussi
  configurer d'autres fichiers comme : rc.inet2, host.conf, resolv.conf,
  /etc/HOSTNAME et rc.local. N'oubliez pas qu'en configurant rc.inet1,
  vous n'avez pas besoin d'ajouter de commandes spciales pendant la
  connexion SLIP puisque c'est _d_i_p qui fait tout le dur labeur  votre
  place en configurant votre interface. Vous avez besoin de donner  _d_i_p
  les informations adquates et il configure l'interface pour vous aprs
  avoir demand au modem d'tablir l'appel et de vous connecter au
  serveur.


  Si votre serveur SLIP fonctionne comme cela alors vous pouvez
  directement aller  la section `Utiliser Dip' pour apprendre 
  configurer _d_i_p convenablement.



  99..44..55..  SSeerrvveeuurr SSLLIIPP ddyynnaammiiqquuee aavveecc uunnee lliiggnnee ttllpphhoonniiqquuee eett DDIIPP

  Le serveur SLIP _d_y_n_a_m_i_q_u_e vous alloue une adresse IP de manire
  alatoire,  partir d'un groupe d'adresses,  chaque fois que vous
  vous connectez. Cela signifie qu'il n'y a aucune garantie d'avoir la
  mme adresse  chaque fois, et que celle-ci peut tre utilise par
  quelqu'un d'autre aprs la dconnexion. L'administrateur rseau qui a
  configur le serveur SLIP a assign un groupe d'adresses que le
  serveur SLIP peut utiliser quand il reoit un appel entrant. Il prend
  alors la premire adresse inutilise, guide l'appelant au travers du
  processus de connexion et envoie un message de bienvenue contenant
  l'adresse IP qu'il a alloue et continue d'utiliser cette adresse tout
  le temps de l'appel.


  Configurer ce type de serveur revient  configurer un serveur
  statique, sauf que vous devez ajouter une tape pour obtenir l'adresse
  IP alloue par le serveur puis configurer le priphrique SLIP avec
  celle-ci.


  Encore une fois, _d_i_p fait le sale boulot et les nouvelles versions
  sont suffisamment lgantes pour non seulement tablir la connexion,
  mais aussi pour lire l'adresse IP inscrite dans le message de
  bienvenue et la stocker de telle sorte que vous puissiez configurer
  votre priphrique SLIP avec.

  Si votre serveur SLIP fonctionne ainsi, alors vous pouvez aller  la
  section `Utiliser DIP' pour savoir comment configurer _d_i_p de manire
  adquate.



  99..44..66..  UUttiilliisseerr DDIIPP

  Comme expliqu plus haut, _d_i_p est un programme puissant qui simplifie
  et automatise le processus de composition d'un numro vers un serveur
  SLIP, se connecte dessus, dmarre la connexion et configure les
  priphriques SLIP  l'aide des commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e
  appropries.


  Essentiellement, pour utiliser _d_i_p vous crivez un `script dip' qui
  est tout simplement une liste de commandes que _d_i_p comprend et qui lui
  dit comment raliser chacune des actions que vous voulez qu'il fasse.
  Voyez le fichier sample.dip fourni avec _d_i_p pour avoir une ide de la
  manire dont il travaille.  _d_i_p est vraiment un programme puissant,
  avec beaucoup d'options.  Au lieu de regarder chacune d'elles, il vaut
  mieux jeter un coup d'oeil dans la page de manuel, le fichier README
  et les fichiers d'exemple qui sont fournis avec votre version de _d_i_p.


  Vous pouvez noter que le script sample.dip suppose que vous utilisez
  un serveur SLIP statique, aussi vous connaissez votre adresse IP 
  l'avance. Pour les serveurs SLIP dynamiques, les nouvelles versions de
  _d_i_p incluent une commande que vous pouvez utiliser pour lire et
  configurer automatiquement votre priphrique SLIP avec l'adresse IP
  donne par le serveur dynamique. L'exemple suivant est une version
  modifie du fichier sample.dip fourni avec _d_i_p_3_3_7_j_-_u_r_i_._t_g_z et qui est
  probablement un bon point de dpart pour vous. Vous pouvez le
  sauvegarder sous le nom de /etc/dipscript et l'diter pour l'adapter 
  votre configuration :





















































  #
  # sample.dip    Programme de support pour connexion IP.
  #
  #       Ce programme (devrait montrer) montre comment utiliser DIP
  #       Il devrait fonctionner avec des serveurs dynamiques de type Annex,
  #       et si vous utilsez un serveur avec adresse statique utilsez alors le
  #       fichier sample.dip livr avec le paquetage dip337-uri.tgz.
  #
  #
  # Version:      @(#)sample.dip  1.40    07/20/93
  #
  # Auteur:       Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  #

  main:
  # Aprs, postionner l'adresse et le nom de l'hte distant.
  # Ma machine s'appelle 'xs4all.hacktic.nl' (== 193.78.33.42)
  get $remote xs4all.hacktic.nl
  # Positionne le masque de rseau sur sl0  255.255.255.0
  netmask 255.255.255.0
  # Rgle le port srie et la vitesse.
  port cua02
  speed 38400

  # Reset le modem et la ligne de terminal.
  # Cela semble poser problme  certains!
  reset

  # Notez! Valeurs "standards" prdfinies de "errlevel":
  #  0 - OK
  #  1 - CONNECT
  #  2 - ERROR
  #
  # Vous pouvez les changer en faisant un grep dans *.c avec "addchat()"...

  # On se prpare pour numroter.
  send ATQ0V1E1X4\r
  wait OK 2
  if $errlvl != 0 goto modem_trouble
  dial 555-1234567
  if $errlvl != 1 goto modem_trouble

  # Nous sommes connects. Nous nous enregistrons sur le systme.
  login:
  sleep 2
  wait ogin: 20
  if $errlvl != 0 goto login_trouble
  send MYLOGIN\n
  wait ord: 20
  if $errlvl != 0 goto password_error
  send MYPASSWD\n
  loggedin:

  # Maintenant nous sommes enregistrs.
  wait SOMEPROMPT 30
  if $errlvl != 0 goto prompt_error

  # Demande au serveur de basculer en mode SLIP
  send SLIP\n
  wait SLIP 30
  if $errlvl != 0 goto prompt_error

  # Obtenir et ajuster notre adresse IP grce au serveur.
  # Ici nous supposons qu'aprs le basculement du serveur en mode SLIP, celui-ci
  # nous donne l'adresse IP
  #   mode that it prints your IP address
  get $locip remote 30
  if $errlvl != 0 goto prompt_error

  # rglage des paramtres SLIP.
  get $mtu 296
  # S'assurer que "route add -net default xs4all.hacktic.nl" sera fait
  default

  # Dire bonjour, et en avant!
  done:
  print CONNECTED $locip ---> $rmtip
  mode CSLIP
  goto exit

  prompt_error:
  print TIME-OUT waiting for sliplogin to fire up...
  goto error

  login_trouble:
  print Trouble waiting for the Login: prompt...
  goto error

  password:error:
  print Trouble waiting for the Password: prompt...
  goto error

  modem_trouble:
  print Trouble occurred with the modem...
  error:
  print CONNECT FAILED to $remote
  quit

  exit:
  exit





  L'exemple prcdent suppose que vous appeliez un serveur SLIP
  _d_y_n_a_m_i_q_u_e ; si vous appelez un serveur SLIP _s_t_a_t_i_q_u_e,  alors le
  fichier sample.dip fourni avec _d_i_p_3_3_7_j_-_u_r_i_._t_g_z devrait vous convenir.

  Quand on donne  _d_i_p la commande _g_e_t _$_l_o_c_a_l, il cherche dans le texte
  venant de l'extrmit de la ligne une chane de caractres ressemblant
   une adresse IP, c'est  dire des ensembles de nombres spars par
  des caractres `.'. Cette modification fut mise en place plus
  spcialement pour les serveurs SLIP _d_y_n_a_m_i_q_u_e_s, afin que le processus
  de lecture de l'adresse IP fournie par le serveur soit automatis.

  L'exemple ci-dessus cre automatiquement une route par dfaut via
  votre liaison SLIP, et si ce n'est pas ce que vous voulez, car vous
  avez une connexion Ethernet qui devrait tre votre route par dfaut,
  alors enlevez la commande _d_e_f_a_u_l_t du script.  Aprs que le script ait
  fini de tourner, tapez la commande _i_f_c_o_n_f_i_g, et vous verrez que vous
  avez un priphrique _s_l_0. C'est votre priphrique SLIP. Si le besoin
  s'en fait sentir, vous pouvez modifier manuellement sa configuration,
  aprs que la commande _d_i_p soit finie, en utilisant les commandes
  _i_f_c_o_n_f_i_g et _r_o_u_t_e.

  Notez que _d_i_p vous permet de choisir parmi diffrents protocoles en
  utilisant la commande mode, l'exemple le plus courant tant _c_S_L_I_P pour
  utiliser SLIP avec compression.  Notez encore que les deux extrmits
  de la liaison doivent tre d'accord, aussi assurez-vous que ce que
  vous avez choisi est en accord avec les rglages du serveur.

  L'exemple montr ci-dessus est plutt robuste et devrait faire face 
  la plupart des erreurs. Rfrez-vous  la page de manuel de _d_i_p pour
  plus d'informations.  Naturellement, vous pouvez, par exemple,
  modifier le script pour raliser des choses comme recomposer le numro
  vers le serveur si la connexion n'a pas t faite au bout d'un certain
  temps, ou mme essayer une srie de serveurs si vous avez accs  plus
  d'un d'entre eux.



  99..44..77..  CCoonnnneexxiioonn ppeerrmmaanneennttee SSLLIIPP uuttiilliissaanntt uunnee lliiggnnee eett ssllaattttaacchh

  Si vous avez deux machines relies par un cble, ou si vous tes
  suffisamment riche pour avoir une ligne ddie, ou un autre type de
  connexion permanente entre votre machine et une autre, alors vous
  n'avez pas besoin de vous casser la tte avec _d_i_p pour rgler votre
  liaison srie.  _s_l_a_t_t_a_c_h est un utilitaire trs simple  utiliser et
  vous permet d'avoir les fonctionnalits juste ncessaires pour
  configurer votre connexion.

  Puisque votre connexion est permanente, vous ajoutez quelques
  commandes dans votre fichier rc.inet1. Tout ce dont vous avez besoin
  pour une connexion permanente est de vous assurer que vous avez
  configur votre priphrique srie  la bonne vitesse et basculer
  votre priphrique srie en mode SLIP.  _s_l_a_t_t_a_c_h vous permet de faire
  ceci avec une seule commande.  Ajoutez ce qui suit  votre fichier
  rc.inet1 :



       #
       # Attache une connexion SLIP statique sur une ligne ddie
       #
       #  configure /dev/cua0  la vitesse de 19.2kbps et cslip
       /sbin/slattach -p cslip -s 19200 /dev/cua0 &
       /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
       #
       # Fin de SLIP statique.




  O :

     IIPPAA..IIPPAA..IIPPAA..IIPPAA
        reprsente votre adresse IP.

     IIPPRR..IIPPRR..IIPPRR..IIPPRR
        reprsente l'adresse IP de l'hte distant.


  _s_l_a_t_t_a_c_h alloue le premier priphrique SLIP disponible au
  priphrique srie spcifi.  _s_l_a_t_t_a_c_h dmarre avec _s_l_0. Par
  consquent la premire commande _s_l_a_t_t_a_c_h relie le priphrique _s_l_0 au
  priphrique spcif, puis _s_l_1 la fois suivante, etc.


  _s_l_a_t_t_a_c_h vous permet de configurer un certain nombre de protocoles
  grce  l'argument -p. Dans votre cas vous utilisez soit _S_L_I_P soit
  _c_S_L_I_P suivant que vous voulez utiliser la compression ou non.  Note :
  les deux extrmits doivent tre d'accord sur l'utilisation de la
  compression.




  99..44..88..  SSeerrvveeuurr SSLLIIPP

  Vous avez peut-tre une machine connecte au rseau et vous aimeriez
  que d'autres personnes puissent s'y connecter pour y chercher des
  services de rseau, alors vous devez configurer votre machine comme
  serveur. Si vous voulez utiliser SLIP comme protocole de ligne srie,
  vous avez trois possiblits pour configurer votre machine Linux comme
  serveur SLIP. Ma prfrence est la premire prsente, _s_l_i_p_l_o_g_i_n, car
  elle semble la plus facile  configurer et  comprendre, mais je
  prsenterai un rsum pour chacune, ainsi vous pourrez dcider par
  vous-mme.



  99..44..99..  SSeerrvveeuurr SSLLIIPP uuttiilliissaanntt sslliippllooggiinn

  _s_l_i_p_l_o_g_i_n est un programme que vous pouvez utiliser  la place du
  shell normal de connexion pour les utilisateurs SLIP, et qui convertit
  la ligne terminal en ligne SLIP. Il vous permet de configurer votre
  machine Linux soit en _s_e_r_v_e_u_r _ _a_d_r_e_s_s_e _s_t_a_t_i_q_u_e (les utilisateurs
  obtiennent toujours la mme adresse  chaque connexion), soit en
  _s_e_r_v_e_u_r _ _a_d_r_e_s_s_e _d_y_n_a_m_i_q_u_e (les utilisateurs obtiennent une adresse
  qui n'est pas forcment la mme que lors de la connexion prcdente).

  L'appelant se connecte comme sur un terminal standard, en donnant son
  nom d'utilisateur et son mot de passe, mais au lieu d'avoir une invite
  de shell aprs la connexion, _s_l_i_p_l_o_g_i_n est excut et cherche dans son
  fichier de configuration une entre dont le nom correspond  celui de
  l'appelant. S'il en dtecte une, il configure la ligne avec 8 bits de
  donnes, et utilise un appel _i_o_c_t_l pour basculer celle-ci en ligne
  SLIP.  Quand ce processus est fini, la dernire tape de la
  configuration prend place, _s_l_i_p_l_o_g_i_n invoquant un script qui configure
  l'interface SLIP avec l'adresse IP adquate, ainsi que le masque de
  rseau et positionne le routage appropri. Ce script est appel
  habituellement /etc/slip.login, mais tout comme _g_e_t_t_y, si certains
  appelants ncessitent une initialisation spciale, alors vous pouvez
  crer des scripts de configuration appels /etc/slip.login.loginname
  qui seront utiliss  la place du script par dfaut.

  Il y a quelques fichiers que vous devez configurer pour que _s_l_i_p_l_o_g_i_n
  travaille pour vous. Je dcrirai comment et o obtenir les logiciels
  et comment chacun est configur. Ces fichiers sont :


    /etc/passwd, pour l'acceptation des utilisateurs entrants;

    /etc/slip.hosts, qui contient une information spcifique de chaque
     utilisateur entrant;

    /etc/slip.login, qui s'occupe de la configuration du routage;

    /etc/slip.tty, requis uniquement si vous configurez votre serveur
     avec _a_l_l_o_c_a_t_i_o_n _d_'_a_d_r_e_s_s_e _d_y_n_a_m_i_q_u_e : il contient une table des
     adresses  allouer.

    /etc/slip.logout, qui contient les commandes de `nettoyage' aprs
     une dconnexion volontaire ou intempestive.



  99..44..1100..  OO oobbtteenniirr sslliippllooggiinn

  Votre distribution contient peut-tre dj le paquetage; si ce n'est
  pas le cas alors _s_l_i_p_l_o_g_i_n peut tre obtenu sur metalab.unc.edu.  Le
  fichier tar contient  la fois les sources, les binaires prcompils
  et une page de manuel.
  Pour s'assurer que seuls les utilisateurs autoriss pourront faire
  tourner le programme _s_l_i_p_l_o_g_i_n, vous devez ajouter une entre dans
  votre fichier /etc/group similaire  la suivante :



        ..
       slip::13:radio,fred
        ..





  Lorsque vous installez le paquetage _s_l_i_p_l_o_g_i_n, Makefile change le
  groupe du programme _s_l_i_p_l_o_g_i_n en slip, et cela signifie que seuls les
  utilisateurs qui appartiennent  ce groupe pourront l'excuter.
  L'exemple donn ci-dessus ne permet qu'aux utilisateurs radio et fred
  de pouvoir faire tourner le programme _s_l_i_p_l_o_g_i_n.

  Pour installer les binaires dans le rpertoire /sbin et les pages de
  manuel dans la section 8, faites :



       root# cd /usr/src
       root# gzip -dc .../sliplogin-2.1.1.tar.gz | tar xvf -
       root# cd sliplogin-2.1.1
       root# <..editez le Makefile si vous n'utilisez pas les shadow passwords..>
       root# make install




  Si vous voulez recompiler les binaires avant de les installer, faites
  make clean avant de faire make install. Si vous voulez installer les
  binaires autre part, vous devez diter le fichier Makefile et le
  modifier en consquence.




  99..44..1111..  CCoonnffiigguurreerr //eettcc//ppaasssswwdd  ppoouurr uuttiilliisseerr SSLLIIPP

  Normalement vous devez crer des noms d'utilisateurs spciaux, pour
  ceux qui appellent avec SLIP, dans votre fichier /etc/passwd.  Une
  convention souvent suivie est d'utiliser le _n_o_m _d_'_u_t_i_l_i_s_a_t_e_u_r de
  l'appelant prfixe avec la lettre capitale `S'.  Ainsi, par exemple,
  si l'appelant s'appelle radio alors vous pouvez crer une entre dans
  le fichier /etc/passwd ressemblant  ceci :



       Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin




  Le nom du compte n'a pas rellement d'importance, du moment qu'il ait
  une signification pour vous.

  Note : l'appelant n'a pas besoin de rpertoire home spcial car il
  n'utilisera pas de shell sur la machine, ds lors /tmp est un bon
  choix. Notez bien que _s_l_i_p_l_o_g_i_n est utilis  la place du shell de
  connexion normal.

  99..44..1122..  CCoonnffiigguurreerr //eettcc//sslliipp..hhoossttss

  Le fichier /etc/slip.hosts  est le fichier o _s_l_i_p_l_o_g_i_n cherche les
  entres correspondant au nom de connexion pour obtenir les dtails de
  configuration. C'est le fichier o sont indiqus l'adresse IP et le
  masque de rseau qui seront assigns  l'appelant et configurs pour
  leur usage. Des exemples d'entres pour deux utilisateurs, une
  statique pour  radio et l'autre dynamique pour albert ressemblent 
  ceci :



       #
       Sradio   44.136.8.99   44.136.8.100  255.255.255.0  normal      -1
       Salbert  44.136.8.99   DYNAMIC       255.255.255.0  compressed  60
       #




  Les entres du fichier /etc/slip.hosts sont :


  1. Le nom de connexion de l'appelant.

  2. L'adesse IP de la machine serveur, donc de la machine contenant ce
     fichier.

  3. L'adresse IP qui sera attribue  l'appelant. Si le champ vaut
     DYNAMIC alors l'adresse IP sera alloue suivant les informations
     contenues dans le fichier /etc/slip.tty dcrit plus loin. NNoottee ::
     vous devez utiliser au moins la version 1.3 de sliplogin pour que
     cela fonctionne.

  4. Le masque de rseau assign  la machine appelante, en notation
     dcimale, par exemple 255.255.255.0 pour un masque de rseau de
     classe C.

  5. Un rglage du mode SLIP qui active/dsactive la compression. Les
     valeurs autorises sont "normal" et "compressed".

  6. Un paramtre de dlai qui spcifie combien de temps la ligne peut
     rester inactive (aucun datagramme reu) avant une dconnexion
     automatique. Une valeur ngative dsactive cette possiblit.

  7. arguments optionnels.

  Note : Vous pouvez mettre soit les noms d'htes soit les adresses IP
  en notation dcimale pointe pour les champs 2 et3.  Si vous utilisez
  les noms d'htes, alors ces htes doivent tre rsolubles, c'est 
  dire que votre machine est capable de dterminer une adresse IP pour
  ces noms d'htes, autrement le script chouera pendant l'appel. Vous
  pouvez le tester en faisant telnet vers un nom d'hte : si vous
  obtenez le message `_T_r_y_i_n_g _n_n_n_._n_n_n_._n_n_n_._._.' alors votre machine est
  capable de trouver une adresse ip pour ce nom d'hte. Si vous obtenez
  le message `_U_n_k_n_o_w_n _h_o_s_t', alors il n'en a pas. Dans ce cas essayez
  d'utiliser l'adress IP en notation dcimale pointe ; ou bien voyez du
  ct de votre configuration de solveur de noms (voir la section
  Rsolution de noms).

  Les modes les plus courants de SLIP sont :

     nnoorrmmaall
        mode SLIP normal non compress.


     ccoommpprreesssseedd
        mode avec compression van Jacobsen des en-ttes (cSLIP)

  Bien sr ils sont mutuellement exclusifs, vous devez utiliser l'un ou
  l'autre. Pour plus d'informations sur les options disponibles, voir
  les pages de manuels.



  99..44..1133..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..llooggiinn ..

  Aprs que _s_l_i_p_l_o_g_i_n ait explor le fichier /etc/slip.hosts et ait
  trouv une entre qui convient, il essaye d'excuter le fichier
  /etc/slip.login pour effectivement configurer l'interface SLIP avec
  son adresse IP et son masque de rseau.

  L'exemple de fichier /etc/slip.login fourni avec le paquetage
  _s_l_i_p_l_o_g_i_n ressemble  ceci :



       #!/bin/sh -
       #
       #       @(#)slip.login  5.1 (Berkeley) 7/1/90
       #
       # fichier gnrique de connexion pour une ligne SLIP. Invoqu par sliplogin
       # avec les paramtres:
       #     $1       $2       $3    $4, $5, $6 ...
       # unit SLIP vitesse    pid   arguments tirs de slip.host
       #
       /sbin/ifconfig $1 $5 pointopoint $6 mtu 1500 -trailers up
       /sbin/route add $6
       arp -s $6 <hw_addr> pub
       exit 0
       #




  Notez que ce script utilise seulement les commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e
  pour configurer le priphrique SLIP avec sa propre adresse IP,
  l'adresse IP de l'hte distant , le masque de rseau puis cre une
  route vers l'adresse distante via le priphrique SLIP. C'est--dire
  la mme chose que si vous utilisiez la commande _s_l_a_t_t_a_c_h.

  Notez aussi l'utilisation de _P_r_o_x_y _A_R_P pour s'assurer que les htes
  placs sur le mme segment thernet que la machine serveur sauront
  comment atteindre l'hte qui s'est connect.  Le champ <hw_addr> doit
  tre l'adresse matrielle de la carte Ethernet de la machine. Si votre
  machine serveur n'est pas sur un rseau Ethernet, vous pouvez ignorer
  cette ligne.



  99..44..1144..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..llooggoouutt

  Quand la connexion s'est arrte, assurez-vous que le priphrique
  srie soit revenu  son tat normal de telle sorte que les appelants
  suivants puissent se connecter correctement. Ceci est accompli en
  utilisant le fichier /etc/slip.logout. Il est de format trs simple et
  est appel avec le mme argument que le fichier /etc/slip.login.





  #!/bin/sh -
  #
  #               slip.logout
  #
  /sbin/ifconfig $1 down
  arp -d $6
  exit 0
  #




  Tout ce qu'il fait est de `mettre  zro' l'interface qui supprimera
  la route prcdemment cre.  Il utilise aussi la commande _a_r_p pour
  supprimer tout arp proxy en place, encore une fois vous n'avez pas
  besoin de la commande _a_r_p dans le script si votre machine serveur ne
  possde pas de port Ethernet.



  99..44..1155..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..ttttyy

  Si vous utilisez une allocation d'adresse ip dynamique (tous les htes
  configurs avec le mot-cl DYNAMIC dans le fichier /etc/slip.hosts)
  alors vous devez configurer le fichier /etc/slip.tty pour afficher les
  adresses qui seront assignes aux ports. Vous n'aurez besoin de ce
  fichier que si vous voulez que votre serveur alloue des adresses aux
  utilisateurs de manire dynamique.

  Ce fichier est un tableau qui liste les priphriques _t_t_y supportant
  les connexions SLIP entrantes et l'adresse ip qui sera assigne aux
  utilisateurs se connectant  ceux-ci.

  Son format est le suivant :


       # slip.tty    mappage d'adresses tty -> IP pour SLIP dynamique
       # format: /dev/tty?? xxx.xxx.xxx.xxx
       #
       /dev/ttyS0      192.168.0.100
       /dev/ttyS1      192.168.0.101
       #





  Ce que dit ce tableau est que les appelants qui se connectent sur le
  port /dev/ttyS0 et dont le champ adresse dans le fichier
  /etc/slip.hosts vaut sur DYNAMIC auront l'adresse 192.168.0.100.

  De cette manire vous n'avez besoin d'allouer qu'une seule adresse par
  port pour tous les utilisateurs n'ayant pas besoin d'adresse fixe.
  Ceci vous permet d'avoir le nombre minimum d'adresses ncessaires pour
  viter du gaspillage.



  99..44..1166..  SSeerrvveeuurr SSlliipp uuttiilliissaanntt ddiipp

  Tout d'abord laissez-moi dire que certaines informations ci-dessous
  proviennent des pages de manuel de _d_i_p, o la manire de faire tourner
  Linux comme serveur SLIP est brivement dcrite. Faites attention
  aussi que ce qui suit est fond sur le paquetage _d_i_p_3_3_7_o_-_u_r_i_._t_g_z et ne
  s'applique vraisemblablement pas  d'autres versions de _d_i_p.

  _d_i_p possde un mode de traitement des donnes d'entre qui permet de
  localiser automatiquement un utilisateur entrant et qui configure la
  ligne srie comme lien SLIP suivant les informations trouves dans le
  fichier /etc/diphosts.  Ce mode est activ en invoquant _d_i_p avec
  _d_i_p_l_o_g_i_n. Voil donc comment utiliser _d_i_p comme serveur SLIP, en
  crant des comptes spciaux o _d_i_p_l_o_g_i_n est utilis comme shell de
  connexion.

  La premire chose  faire est de crer un lien symbolique comme suit :



       # ln -sf /usr/sbin/dip /usr/sbin/diplogin




  Ensuite vous devez ajouter des entres  la fois dans vos fichiers
  /etc/passwd et /etc/diphosts. Les entres que vous devez y mettre sont
  formates comme suit :

  Pour configurer Linux comme serveur SLIP avec _d_i_p, vous devez crer
  quelques comptes SLIP spciaux pour les utilisateurs, o _d_i_p (en mode
  d'entre) est utilis comme shell de connexion. Une convention
  suggre est d'avoir tous les comptes SLIP commenant avec la lettre
  `S' majuscule, par exemple `Sfredm'.

  Un exemple d'entre dans /etc/passwd pour un utilisateur SLIP
  ressemble  ceci :



       Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
       ^^         ^^        ^^  ^^   ^^   ^^   ^^
       |          |         |   |    |    |    \__ diplogin comme shell de connexion
       |          |         |   |    |    \_______ Rpertoire personnel
       |          |         |   |    \____________ Nom complet d'utilisateur
       |          |         |   \_________________ GID
       |          |         \_____________________ UID
       |          \_______________________________ Mot de passe chiffr
       \__________________________________________ Nom de connexion Slip





  Aprs la connexion de l'utilisateur, le programme _l_o_g_i_n (s'il trouve
  et accepte l'utilisateur) excute la commande _d_i_p_l_o_g_i_n. _d_i_p, lorsqu'il
  est invoqu en tant que _d_i_p_l_o_g_i_n sait qu'il sera automatiquement
  utilis comme shell de connexion.  Quand il est dmarr comme _d_i_p_l_o_g_i_n
  la premire chose qu'il fait est d'utiliser l'appel de la fonction
  _g_e_t_u_i_d_(_) pour obtenir l'identificateur de l'utilisateur appelant. Il
  regarde ensuite dans le fichier /etc/diphosts pour trouver la premire
  entre qui corresponde soit  l'utilisateur soit au priphrique _t_t_y
  o l'appel est entr et se configure lui-mme de manire approprie.
  Par un choix judicieux : soit de donner  l'utilisateur une entre
  dans le fichier diphosts, soit de laisser  l'utilisateur la
  configuration par dfaut, vous pouvez construire votre serveur de
  telle manire que vous puissiez faire cohabiter des utilisateurs ayant
  des adresses alloues statiquement ou dynamiquement.

  _d_i_p ajoutera automatiquement une entre `Proxy-ARP' si elle est
  invoque en mode d'entre, aussi vous n'avez pas  vous soucier
  d'ajouter de telles entres manuellement.


  99..44..1177..  CCoonnffiigguurreerr //eettcc//ddiipphhoossttss

  /etc/diphosts est utilis par _d_i_p pour examiner des configurations
  prtablies concernant des htes loigns. Ceux-ci peuvent tre des
  htes se connectant sur votre machine, ou bien des machines sur
  lesquelles vous vous connectez.

  Le format gnral de /etc/diphosts est :



        ..
       Suwalt::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
       ttyS1::145.71.34.3:145.71.34.2:255.255.255.0:Dynamic ttyS1:CSLIP,296
        ..




  Les champs sont :

  1. nom de connexion : comme retourn par getpwuid(getuid()) ou bien le
     nom de tty.

  2. inutilis : pour compatibilit avec passwd

  3. Adresse distante : adresse IP de l'appelant, soit numrique soit
     nominative

  4. Adresse locale : adresse IP de cette machine, soit numrique soit
     nominative.

  5. Masque de rseau : en notation dcimale pointe

  6. Commentaires : vous y mettez ce que vous voulez.

  7. protocole : Slip, CSlip, etc.

  8. MTU : nombre dcimal

  Un exemple d'entre /etc/net/diphosts pour un hte distant peut tre :



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296




  qui spcifie une liaison SLIP avec une adresse distante de 145.71.34.1
  et un MTU de 296, ou :



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006




  qui spcifie une liaison compatible cSLIP avec une adresse distante de
  145.71.34.1 et un MTU de 1006.

  Ds lors, tous les utilisateurs  qui vous permettez d'avoir une
  connexion avec allocation d'adresse IP statique auront une entre dans
  /etc/diphosts. Si vous voulez que des utilisateurs qui appellent sur
  un port particulier aient leur adresse alloue dynamiquement, vous
  devez avoir une entre pour le priphrique tty, mais pas d'entre
  pour l'utilisateur lui-mme. Vous devez vous souvenir de configurer au
  moins une entre pour chaque priphrique tty que vos utilisateurs
  entrants utiliseront pour tre srs qu'une configuration adquate soit
  disponible, indpendamment du modem sur lequel ils se connectent.

  Quand un utilisateur se connecte, il recevra une invite normal de
  login et une demande de mot de passe, pour lesquels il devra entrer
  son identificateur SLIP et son mot de passe. Si tout est correct,
  l'utilisateur ne verra pas de message spcial, il devra juste basculer
  en mode SLIP chez lui et ensuite il sera connect et configur avec
  les paramtres contenus dans le fichier diphosts.



  99..44..1188..  SSeerrvveeuurr SSLLIIPP uuttiilliissaanntt ll''eennsseemmbbllee ddSSLLIIPP

  Matt Dillon <dillon@apollo.west.oic.com> a crit un paquetage qui
  permet des liaisons SLIP non seulement entrantes mais aussi sortantes.
  Le paquetage de Matt est une combinaison de petits programmes et de
  scripts qui prennent en charge les connexions  votre place.  Vous
  aurez besoin de _t_c_s_h car au moins l'un des scripts en a besoin. Matt
  fournit une copie binaire de l'utilitaire _e_x_p_e_c_t car il est aussi
  ncessaire pour l'un des scripts.  Il serait prfrable d'avoir une
  certaine exprience de _e_x_p_e_c_t pour que ce paquetage soit utile pour
  vous, mais que cela ne vous dcourage pas.

  Matt a crit une bonne procdure d'installation dans le fichier
  README, aussi je ne me fatiguerai pas  la rpter.

  Vous pouvez rcuprer le paquetage _d_S_L_I_P sur son site d'origine :

  aappoolllloo..wweesstt..ooiicc..ccoomm


       /pub/linux/dillon_src/dSLIP203.tgz




  ou bien sur :

  mmeettaallaabb..uunncc..eedduu


       /pub/Linux/system/Network/serial/dSLIP203.tgz




  Lisez le fichier README et crez les entres /etc/passwd et /etc/group
  aavvaanntt de faire make install.



  1100..  AAuuttrreess tteecchhnnoollooggiieess rrsseeaauu

  Les paragraphes suivants traitent de sujets spcifiques concernant des
  technologies lies au rseau. Les informations qui y sont contenues ne
  s'appliquent pas forcment aux autres types de technologies rseau.
  Les sujets sont traits par ordre alphabtique.





  1100..11..  AARRCCNNeett

  Les noms de fichier priphriques de ARCNet sont `arc0e', `arc1e',
  `arc2e' ... ou bien `arc0s', `arc1s', `arc2s', etc. La premire carte
  dtecte par le noyau devient `arc0e' ou `arc0s' et les autres sont
  nommes en suivant dans l'ordre de leur dtection.  La lettre finale
  dpend de votre choix : soit un format d'encapsulation de paquets
  Ethernet, soit un format de paquets suivant RFC1051.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
           [*] Network device support
           <*> ARCnet support
           [ ]   Enable arc0e (ARCnet "Ether-Encap" packet format)
           [ ]   Enable arc0s (ARCnet RFC1051 packet format)




  Si vous avez construit convenablement votre noyau pour supporter votre
  carte Ethernet, alors la configuration de la carte est facile.

  Typiquement vous devriez utiliser quelque chose comme ceci :


       root# ifconfig arc0e 192.168.0.1 netmask 255.255.255.0 up
       root# route add -net 192.168.0.0 netmask 255.255.255.0 arc0e




  Merci de vous rfrer aux documents /usr/src/linux/Documentation/net
  working/arcnet.txt et /usr/src/linux/Documentation/networking/arcnet-
  hardware.txt pour d'autres informations.

  Le support ARCNet fut dvelopp par Avery Pennarun,
  apenwarr@foxnet.net.



  1100..22..  AApppplleettaallkk (( AAFF__AAPPPPLLEETTAALLKK ))

  Le support Appletalk ne possde pas de noms de priphriques
  spcifiques car il utilise les priphriques rseau existants.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           <*> Appletalk DDP




  Le support Appletalk permet  votre machine Linux de dialoguer avec
  les rseaux Apple.  Son utilisation principale est de pouvoir partager
  des ressources, comme les imprimantes et les disques, entre vos ordi
  nateurs Linux et Apple. Un logiciel supplmentaire est requis, il
  s'appelle _n_e_t_a_t_a_l_k. Wesley Craig netatalk@umich.edu reprsente une
  quipe appele le `Research Systems Unix Group'  l'universit du
  Michigan.  Celle-ci a labor le paquetage _n_e_t_a_t_a_l_k, qui fournit un
  logiciel implmentant la pile protocole Appletalk et quelques utili
  taires.  Soit ce paquetage _n_e_t_a_t_a_l_k vous a t fourni avec votre dis
  tribution Linux, soit vous pouvez le rcuprer par ftp depuis le site
  University of Michigan

  Pour construire et installer le paquetage, vous faites :


       user% cd /usr/src
       user% tar xvfz .../netatalk-1.4b2.tar.Z
       - Vous pouvez diter le fichier `Makefile'  ce stade, plus
       prcisment pour changer la valeur de la variable
        DESTDIR qui dfinit l'endroit o les fichiers seront
       installs plus tard.
        Le rpertoire par dfaut, /usr/local/atalk, semble
        trs raisonnable.
       user% make
       - puis, en temps que root :
       root# make install






  1100..22..11..  CCoonnffiigguurreerr llee ssuuppppoorrtt AApppplleettaallkk..

  La premire chose  faire pour que tout fonctionne est de vrifier que
  les entres adquates sont prsentes dans le fichier /etc/services.
  Ces entres sont :


       rtmp    1/ddp   # Routing Table Maintenance Protocol
       nbp     2/ddp   # Name Binding Protocol
       echo    4/ddp   # AppleTalk Echo Protocol
       zip     6/ddp   # Zone Information Protocol




  L'tape suivante consiste  crer les fichiers de configuration
  Appletalk dans le rpertoire /usr/local/atalk/etc (ou bien  l'endroit
  o vous avez install le paquetage).

  Le premier fichier  crer est /usr/local/atalk/etc/atalkd.conf.
  Initialement ce fichier ne ncessite qu'une ligne qui indique le
  priphrique supportant le rseau sur lequel sont vos machines Apple :



       eth0




  Le programme dmon Appletalk ajoutera d'autres dtails quand il
  tournera.



  1100..22..22..  EExxppoorrtteerr uunn ssyyssttmmee ddee ffiicchhiieerrss LLiinnuuxx aavveecc AApppplleettaallkk..

  Vous pouvez exporter des systmes de fichiers depuis votre machine
  Linux vers le rseau en sorte qu'une machine Apple puisse les
  partager.

  Pour cela vous devez configurer le fichier
  /usr/local/atalk/etc/AppleVolumes.system. Il y a une autre fichier de
  configuration appel /usr/local/atalk/etc/AppleVolumes.default qui a
  exactement le mme format et qui dcrit quels systmes de fichiers les
  utilisateurs connects pourront recevoir avec des privilges
  d'invits.

  Tous les dtails, qui vous diront comment configurer ces fichiers et
  avec quelles options, peuvent tre trouvs dans la page de manuel de
  _a_f_p_d.

  Un simple exemple :


       /tmp Scratch
       /home/ftp/pub "Public Area"




  Ce qui exportera votre systme de fichiers /tmp comme volume
  AppleShare `Scratch' et votre rpertoire public ftp comme volume
  AppleShare `Public Area'.  Les noms de volume ne sont pas
  obligatoires, le programme dmon pouvant les choisir pour vous, mais
  a ne cote rien de les spcifier quand mme.



  1100..22..33..  TTeesstteerr AApppplleettaallkk..

  Pour tester si le programme fonctionne correctement, allez sur une des
  machines Apple, droulez le menu Pomme, cliquez sur AppleShare, et
  votre bote Linux devrait apparatre.



  1100..22..44..  AAuuttrreess iinnffoorrmmaattiioonnss

  Pour en savoir plus sur la configuration de Appletalk pour Linux,
  rfrez vous  la page de Anders Brownworth _L_i_n_u_x _N_e_t_a_t_a_l_k_-_H_O_W_T_O
  disponible  l'url thehamptons.com.



  1100..33..  AATTMM

  Werner Almesberger <werner.almesberger@lrc.di.epfl.ch> dirige un
  projet en vue de fournir un support Mode de Transfert Asynchrone
  (Asynchronous Transfer Mode) pour Linux.  Les informations sur l'tat
  du projet se trouvent sur : lrcwww.epfl.ch.



  1100..44..  AAXX2255 (( AAFF__AAXX2255 ))

  Les noms de priphriques AX.25 sont `sl0', `sl1', etc. avec les
  noyaux 2.0.* ou `ax0', `ax1', etc. avec les noyaux 2.1.*.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2




  Les protocoles AX25, Netrom et Rose sont couverts par le document
  AX25-HOWTO.  Ces protocoles sont utiliss par les radio-amateurs du
  monde entier pour l'exprimentation packet-radio.

  L'essentiel du travail d'implmentation de ces protocoles a t
  ralis par Jonathon Naylor, jsn@cs.nott.ac.uk.



  1100..55..  DDEECCNNeett

  Le support pour DECNet est en cours d'laboration. Vous devriez le
  voir apparaitre dans l'un des prochains noyaux 2.1.*.



  1100..66..  FFDDDDII ((FFiibbeerr DDiissttrriibbuutteedd DDaattaa IInntteerrffaaccee))

  Les noms de priphriques FDDI sont `fddi0', `fddi1', `fddi2' etc. La
  premire carte dtecte par le noyau s'appelle `fddi0' et le reste est
  nomm dans l'ordre de dtection.

  Larry Stefani, lstefani@ultranet.com, a dvelopp un gestionnaire pour
  les cartes Digital Equipment Corporation FDDI EISA et PCI.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Network device support  --->
           [*] FDDI driver support
           [*] Digital DEFEA and DEFPA adapter support




  Lorsque vous avez construit et install votre noyau pour supporter le
  gestionnaire FDDI, la configuration de l'interface FDDI est presque
  identique  celle d'une interface Ethernet. Vous devez spcifier le
  nom de l'interface FDDI approprie dans les commandes _i_f_c_o_n_f_i_g et
  _r_o_u_t_e.



  1100..77..  RReellaaiiss ddee ttrraammeess ((FFrraammee RReellaayy))

  Les noms de priphriques de `relais de trames' sont `dlci00',
  `dlci01' etc pour les systmes d'encapsulation DLCI et  `sdla0',
  `sdla1' etc pour les FRAD(s) (Frame Relay Access Device).

  Le relais de trames est une nouvelle technologie rseau conue pour
  s'adapter au trafic de transmission de donnes `par  coups' ou de
  nature intermittente.  Vous vous connectez  un rseau de ce type en
  utilisant un dispositif d'accs par relais de trames (FRAD).  Les
  supports Linux relais de trames supportent IP par-dessus celui-ci
  comme dcrit dans la RFC-1490.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Network device support  --->
           <*> Frame relay DLCI support (EXPERIMENTAL)
           (24)   Max open DLCI
           (8)   Max DLCI per device
           <*>   SDLA (Sangoma S502/S508) support




  Mike McLagan, mike.mclagan@linux.org, a dvelopp le support Frame
  Relay et les outils de configuration.

   l'heure actuelle le seul FRAD support est,  ma connaissance,
  Sangoma Technologies S502A, S502E et S508.  et Emerging Technologies.
  Leur site se trouve sur ici.

  _J_e _v_o_u_d_r_a_i_s _d_i_r_e _q_u_e_l_q_u_e_c_h_o_s_e_. _J_'_a_i _u_n_e _e_x_p__r_i_e_n_c_e _p_e_r_s_o_n_n_e_l_l_e _a_v_e_c
  _E_m_e_r_g_i_n_g _T_e_c_h_n_o_l_o_g_i_e_s _e_t _j_e _v_o_u_s _l_e_s _r_e_c_o_m_m_a_n_d_e _p_a_s_. _J_e _l_e_s _a_i _t_r_o_u_v__s
  _a_b_s_o_l_u_m_e_n_t _p_a_s _p_r_o_f_e_s_s_i_o_n_n_e_l_s _e_t _t_r__s _g_r_o_s_s_i_e_r_s_. _S_i  _q_u_e_l_q_u_'_u_n _d_'_a_u_t_r_e
  _a _e_u _u_n_e _b_o_n_n_e _e_x_p__r_i_e_n_c_e _a_v_e_c _e_u_x_, _f_a_i_t_e_s _l_e _m_o_i _s_a_v_o_i_r_. _A _l_e_u_r
  _d__c_h_a_r_g_e_, _l_e_u_r _p_r_o_d_u_i_t _e_s_t _s_o_u_p_l_e _d_'_u_t_i_l_i_s_a_t_i_o_n _e_t _p_a_r_a__t _s_t_a_b_l_e_.

  Pour configurer les systmes FRAD et DLCI aprs avoir reconstruit
  votre noyau, vous aurez besoin des outils de configuration. Ils sont
  disponibles sur ftp.invlogic.com.  Compiler et installer les outils
  est trs facile, mais le manque de fichier Makefile au premier niveau
  oblige  le faire  la main :


       user% tar xvfz .../frad-0.15.tgz
       user% cd frad-0.15
       user% for i in common dlci frad; make -C $i clean; make -C $i; done
       root# mkdir /etc/frad
       root# install -m 644 -o root -g root bin/*.sfm /etc/frad
       root# install -m 700 -o root -g root frad/fradcfg /sbin
       root# install -m 700 -o root -g root dlci/dlcicfg /sbin





  Notez que ces commandes utilisent la syntaxe du shell _s_h, et si vous
  utilisez _c_s_h (comme _t_c_s_h), la boucle _f_o_r sera diffrente.  Aprs
  l'installation vous devez crer un fichier /etc/frad/router.conf Vous
  pouvez utiliser cet exemple, qui est une version modifie de l'un des
  fichiers donn en exemple :





























  # /etc/frad/router.conf
  # C'est un modle de configuration pour relais de trames.
  # Tout y est inclus. Les valeurs par dfaut sont fondes sur le code
  # fourni avec les gestionnaires DOS de la carte Sangoma S502A.
  #
  # Une ligne avec '#' est un commentaire
  # Les blancs sont ignors (vous pouvez utiliser des tabulations aussi).
  # Les sections [] inconnues et les entres inconnues sont ignores.
  #

  [Devices]
  Count=1                 # nombre de priphriques  configurer
  Dev_1=sdla0             # nom d'un priphrique
  #Dev_2=sdla1            # nom d'un priphrique

  # Ce qui est spcifie ici s'applique  tous les priphriques, et peut tre
  # mis  jour pour chaque carte individuelle.
  #
  Access=CPE
  Clock=Internal
  KBaud=64
  Flags=TX
  #
  # MTU=1500              # Taille maximum de l'unit de transfert 4096 par dfaut
  # T391=10               # valeur de T391  5 - 30, 10 par dfaut
  # T392=15               # valeur de T392  5 - 30, 15 par dfaut
  # N391=6                # valeur de N391  1 - 255, 6 par dfaut
  # N392=3                # valeur de N392  1 - 10,  3 par dfaut
  # N393=4                # valeur de N393  1 - 10,  4 par dfaut

  # On spcifie ici les valeurs par dfaut pour toutes les cartes
  # CIRfwd=16             # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511


  #
  #
  # Configurations spcifiques
  #
  #

  #
  #  Sangoma S502E
  #
  [sdla0]
  Type=Sangoma            # Type de priphrique  configurer, actuellement seul
                          # SANGOMA est reconnu
  #
  # Spcifique des types 'Sangoma'
  #
  # cartes S502A, S502E, S508
  Board=S502E
  #
  # Le nom du logiciel de carte en essai pour Sangoma
  # Testware=/usr/src/frad-0.10/bin/sdla_tst.502
  #
  # Le nom du logiciel de carte FR
  # Firmware=/usr/src/frad-0.10/bin/frm_rel.502
  #
  Port=360                # Port pour cette carte particulire
  Mem=C8                  # Adresse de fentre mmoire, A0-EE, dpend de la carte
  IRQ=5                   # numro d'IRQ, pas ncessaire pour S502A
  DLCIs=1                 # Nombre de DLCI attachs  ce priphrique
  DLCI_1=16               # numro du premier DLCI, de 16  991
  # DLCI_2=17
  # DLCI_3=18
  # DLCI_4=19
  # DLCI_5=20
  #
  # Ce qui est spcifie ici s'applique au priphrique seulement,
  # et remplace les valeurs par dfaut
  #
  # Access=CPE            # CPE ou NODE,  CPE par dfaut
  # Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
  # Clock=Internal        # Externe ou Interne, Interne par dfaut
  # Baud=128              # Dbit spcifi du CSU/DSU attach
  # MTU=2048              # Taille maximum de l'unit de transfert 4096 par dfaut
  # T391=10               # valeur de T391   5 - 30, 10 par dfaut
  # T392=15               # valeur de T392   5 - 30, 15 par dfaut
  # N391=6                # valeur de N391   1 - 255, 6 par dfaut
  # N392=3                # valeur de N392   1 - 10,  3 par dfaut
  # N393=4                # valeur de N393   1 - 10,  4 par dfaut

  #
  # Le second periphrique est une autre carte
  #
  # [sdla1]
  # Type=FancyCard        # Type de priphrique  configurer.
  # Board=                # Type de carte Sangoma
  # Key=Value             # valeurs spcifiques pour ce type de priphrique


  #
  # Paramtres de configuration DLCI par dfaut.
  # Peuvent tre crass par des configurations spcifiques
  #
  CIRfwd=64               # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511

  #
  # Configuration DLCI
  # Optionnel. La convention d'appellation est
  # [DLCI_D<devicenum>_<DLCI_Num>]
  #

  [DLCI_D1_16]
  # IP=
  # Net=
  # Mask=
  # Drapeaux dfinis par Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=64
  # Bc_fwd=512
  # Be_fwd=0
  # CIRbak=64
  # Bc_bak=512
  # Be_bak=0

  [DLCI_D2_16]
  # IP=
  # Net=
  # Mask=
  # Drapeaux dfinis par Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=16
  # Bc_fwd=16
  # Be_fwd=0
  # CIRbak=16
  # Bc_bak=16
  # Be_bak=0





  Lorsque vous avez construit votre fichier /etc/frad/router.conf, la
  seule tape restante est de configurer les priphriques eux-mmes.
  C'est un tout petit peu plus compliqu que la configuration normale
  d'un priphrique rseau; vous devez vous souvenir de monter le
  priphrique FRAD avant les priphriques d'encapsulation DLCI.



       #!/bin/sh
       # Configure le materiel frad et les parametres DLCI
       /sbin/fradcfg /etc/frad/router.conf || exit 1
       /sbin/dlcicfg file /etc/frad/router.conf
       #
       # Montage du dispositif FRAD
       ifconfig sdla0 up
       #
       # Configure les interfaces d'encapsulation DLCI et le routage
       ifconfig dlci00 192.168.10.1 pointopoint 192.168.10.2 up
       route add -net 192.168.10.0 netmask 255.255.255.0 dlci00
       #
       ifconfig dlci01 192.168.11.1 pointopoint 192.168.11.2 up
       route add -net 192.168.11.0 netmask 255.255.255.0 dlci00
       #
       route add default dev dlci00
       #






  1100..88..  IIPPXX (( AAFF__IIPPXX ))

  Le protocole IPX est la plupart du temps utilis dans les
  environnements rseaux locaux Novell NetWare(tm).  Linux offre un
  support pour ce protocole, et peut tre configur pour agir comme
  extrmit rseau, ou comme routeur pour les environnements rseaux
  IPX.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] The IPX protocol
           [ ] Full internal IPX network




  Le protocole IPX et le NCPFS sont traits en dtail dans le document
  IPX-HOWTO.




  1100..99..  NNeettRRoomm (( AAFF__NNEETTRROOMM ))

  Les noms de priphriques NetRom sont `nr0', `nr1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2
           [*] Amateur Radio NET/ROM




  Les protocoles AX25, Netrom et Rose sont dcrits dans le document
  AX25-HOWTO.  Ces protocoles sont utiliss par les radio-amateurs dans
  le monde entier pour l'exprimentation du packet-radio.

  L'essentiel du travail d'implmentation a t fait par Jonathon
  Naylor, jsn@cs.not.ac.uk.


  1100..1100..  PPrroottooccoollee RRoossee (( AAFF__RROOSSEE ))

  Les noms de priphriques Rose sont `rs0', `rs1', etc.  .  Rose est
  disponible dans la srie des noyaux 2.1.*.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2
           <*> Amateur Radio X.25 PLP (Rose)




  Les protocoles AX25, Netrom et Rose sont expliqus dans le AX25-HOWTO.
  Ces protocoles sont utiliss par les oprateurs radio-amateur du monde
  entier pour l'exprimentation du packet-radio.

  L'essentiel du travail d'implmentation de ces protocoles a t
  ralis par Jonathon Naylor, jsn@cs.not.ac.uk.



  1100..1111..  SSuuppppoorrtt SSAAMMBBAA -- ``NNeettBBEEUUII'',, ``NNeettBBiiooss'',, ``CCIIFFSS''..

  SAMBA est une implmentation du protocole Session Management Block.
  Samba permet aux Systmes Microsoft et autres de monter et d'utiliser
  vos disques et imprimantes.

  SAMBA et sa configuration sont dcrits en dtail dans le SMB-HOWTO.



  1100..1122..  SSuuppppoorrtt SSTTRRIIPP ((SSttaarrmmooddee RRaaddiioo IIPP))

  Les noms de priphriques STRIP sont `st0', `st1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :





  Network device support  --->
          [*] Network device support
          ....
          [*] Radio network interfaces
          < > STRIP (Metricom starmode radio IP)




  STRIP est un protocole conu spcialement pour un certain type de
  modems radio Metricom dans le cadre d'un projet de recherche conduit
  par l'Universit de Stanford appel MosquitoNet Project.  Il y a un
  tas de choses intressantes  lire, mme si vous n'tes pas
  directement concern par le projet.

  Les radios Metricom se connectent sur un port srie et emploient la
  technologie  large bande spectrale et peuvent aller jusqu' 100kbps.
  Des informations sur ceux-ci sont disponibles sur : Le serveur web de
  Metricom.

   l'heure actuelle, les outils rseau habituels ne supportent pas le
  gestionnaire STRIP, vous devez donc tlcharger des outils
  personnaliss  partir du serveur web MosquitoNet. Pour avoir des
  dtails sur les logiciels  utiliser allez voir : MosquitoNet STRIP
  Page.

  En rsum la configuration consiste  utiliser un programme _s_l_a_t_t_a_c_h
  modifi pour rgler la discipline de ligne d'un priphrique srie
  pour SLIP, puis  configurer le priphrique `st[0-9]' rsultant comme
  vous le feriez pour Ethernet avec une exception importante : pour des
  raisons techniques STRIP ne supporte pas le protocole ARP , vous devez
  alors configurer manuellement les entres ARP pour chacun des htes de
  votre sous-rseau. Cela ne devrait pas tre trop contraignant.



  1100..1133..  TTookkeenn RRiinngg

  Le noms de priphriques Token ring sont `tr0', `tr1' etc. Token Ring
  est un protocole LAN standard IBM en vue d'viter les collisions en
  fournissant un mcanisme qui n'autorise qu'une seule station du LAN 
  transmettre  un moment donn.  Un `jeton' est dtenu par une station
   un moment donn, et celle-ci est la seule autorise  mettre.
  Lorque c'est fait, elle passe le jeton  la station suivante. Le jeton
  fait le tour de toutes les stations actives, d'o le nom de `Token
  Ring' (anneau  jeton).

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
               [*] Network device support
               ....
               [*] Token Ring driver support
               < > IBM Tropic chipset based adaptor support




  La configuration de token ring est identique  celle de l'Ethernet 
  l'exception du nom de priphrique rseau  configurer.





  1100..1144..  XX..2255

  X.25 est un protocole de circuit bas sur la commutation de paquets
  dfini par le C.C.I.T.T. (un groupe de normalisation reconnu par les
  compagnies de tlcommunications dans la plupart du monde). Une
  implmentation de X.25 et LAPB est en cours dans les noyaux rcents
  2.1.*.

  Jonathon Naylor jsn@cs.nott.ac.uk dirige le dveloppement et une liste
  de diffusion a t cre pour discuter des affaires relatives  X.25
  pour Linux. Pour y souscrire, envoyez un message  :
  majordomo@vger.rutgers.edu avec le texte "subscribe linux-x25" dans le
  corps du message.

  Les dernires versions des outils de configuration peuvent tre
  obtenues sur le site ftp de Jonathon  ftp.cs.nott.ac.uk.



  1100..1155..  CCaarrttee WWaavveeLLaann

  Les noms de priphriques Wavelan sont `eth0', `eth1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
               [*] Network device support
               ....
               [*] Radio network interfaces
               ....
               <*> WaveLAN support




  La carte WaveLAN est une carte LAN sans-fil  large bande. Elle
  ressemble beaucoup en pratique  une carte Ethernet et se configure
  presque de la mme manire.

  Vous pouvez avoir des informations sur la carte Wavelan sur
  Wavelan.com.



  1111..  CCbblleess eett ccbbllaaggeess

  Ceux qui sont habiles du fer  souder peuvent vouloir fabriquer leurs
  propres cbles pour relier deux machines Linux. Les schmas de cblage
  suivants pourront les y aider.


  1111..11..  CCbbllee ssrriiee NNUULLLL MMooddeemm

  Tous les cbles NULL modem ne se ressemblent pas. Une grosse partie
  d'entre eux ne font que faire croire  votre ordinateur que tous les
  signaux appropris sont prsents et changent les donnes de
  transmission et de rception. C'est bien, mais cela signifie que vous
  devez utiliser le contrle de flux logiciel (XON/XOFF) qui est moins
  efficace que le contrle de flux matriel. Le cble suivant donne la
  meilleure transmission de signal entre les deux machines et vous
  permet d'utiliser le contrle de flux matriel (RTS/CTS).




  Pin Name  Pin                               Pin
  Tx Data    2  -----------------------------  3
  Rx Data    3  -----------------------------  2
  RTS        4  -----------------------------  5
  CTS        5  -----------------------------  4
  Ground     7  -----------------------------  7
  DTR        20 -\---------------------------  8
  DSR        6  -/
  RLSD/DCD   8  ---------------------------/-  20
                                           \-  6





  1111..22..  CCbbllee ppoorrtt ppaarraallllllee ((ccbbllee PPLLIIPP))

  Si vous avez l'intention d'utiliser le protocole PLIP entre deux
  machines alors ce cble vous conviendra indpendamment du type de port
  parallle install.


       Pin Name    pin            pin
       STROBE      1*
       D0->ERROR   2  ----------- 15
       D1->SLCT    3  ----------- 13
       D2->PAPOUT  4  ----------- 12
       D3->ACK     5  ----------- 10
       D4->BUSY    6  ----------- 11
       D5          7*
       D6          8*
       D7          9*
       ACK->D3     10 ----------- 5
       BUSY->D4    11 ----------- 6
       PAPOUT->D2  12 ----------- 4
       SLCT->D1    13 ----------- 3
       FEED        14*
       ERROR->D0   15 ----------- 2
       INIT        16*
       SLCTIN      17*
       GROUND      25 ----------- 25




  Notes :

    Ne pas connecter les broches marques avec un astrisque `*'.

    Les masses supplmentaires sont 18,19,20,21,22,23 et 24.

    Si le cble que vous utilisez possde un blindage, il doit tre
     connect  une des prises DB-25 et uunnee sseeuullee.

     AAtttteennttiioonn :: uunn ccbbllee PPLLIIPP mmaall bbrraanncchh ppeeuutt ddttrruuiirree vvoottrree ccaarrttee
     ccoonnttrrlleeuurr. Soyez attentifs et vrifiez chaque connexion deux fois
     pour tre sr de ne pas vous crer de travail inutile ou de gros
     ennuis.  Bien que l'on puisse utiliser des cbles PLIP sur des
     longues distances, vitez-le si possible. Les spcifications du
     cble permettent d'avoir une longueur d'environ 1 mtre. Faites
     attention si vous utilisez de grandes longueurs, car les sources de
     champs magntiques levs comme la foudre, les lignes de puissance
     et les metteurs radio peuvent interfrer et parfois endommager
     votre carte contrleur. Si vous voulez vraiment connecter deux de
     vos ordinateurs sur une grande distance, utilisez plutt des cartes
     Ethernet et un cble coaxial.
  1111..33..  CCbbllaaggee EEtthheerrnneett 1100bbaassee22 ((ccooaaxxiiaall ffiinn))

  10base2 est un standard de cblage Ethernet spcifiant l'utilisation
  d'un cble coaxial 50 ohms avec un diamtre d'environ 5 mm. Il faut se
  souvenir d'un nombre important de rgles quand on relie deux machines
  avec un cblage 10base2.  La premire est que vous devez utiliser des
  terminaisons  cchhaaqquuee eexxttrrmmiitt du cble. Un terminateur est une
  rsistance de 50 ohms qui sert  s'assurer que le signal est absorb
  et non rflchi  l'extrmit du cble. Sans terminaison  chaque
  extrmit vous pourriez trouver que l'Ethernet n'est pas fiable ou ne
  marche pas du tout. Normalement vous utilisez des `T' pour
  interconnecter les machines, en sorte que vous finirez par avoir
  quelque chose qui ressemble  ceci :


        |==========T=============T=============T==========T==========|
                   |             |             |          |
                   |             |             |          |
                 -----         -----         -----      -----
                 |   |         |   |         |   |      |   |
                 -----         -----         -----      -----




  Les `|'  chaque extrmit reprsentent une terminaison, les `======'
  reprsentent une longueur de cble coaxial avec des prises BNC en bout
  et les `T' reprsentent un connecteur en `T'. Gardez la longueur de
  cble entre les connecteurs en `T' et les cartes Ethernet aussi courte
  que possible, l'idal tant que ces connecteurs soient branchs
  directement sur la carte Ethernet.



  1111..44..  CCbbllaaggee EEtthheerrnneett  ppaaiirreess ttoorrssaaddeess

  Si vous n'avez que deux cartes Ethernet avec paires torsades et que
  vous voulez les relier, vous n'avez pas besoin de rpartiteur.  Vous
  pouvez cbler les deux cartes directement ensemble.  Un schma
  montrant comment faire est inclus dans le document Ethernet-HOWTO



  1122..  GGlloossssaaiirree ddeess tteerrmmeess uuttiilliissss ddaannss ccee ddooccuummeenntt..

  Ci-dessous une liste des termes les plus importants utiliss dans ce
  document.

     AARRPP
        C'est l'acronyme de _A_d_d_r_e_s_s _R_e_s_o_l_u_t_i_o_n _P_r_o_t_o_c_o_l (protocole de
        rsolution d'adresses), permettant  une machine du rseau
        d'associer une adresse IP  une adresse matrielle.

     AATTMM
        C'est l'acronyme de _A_s_y_n_c_h_r_o_n_o_u_s _T_r_a_n_s_f_e_r _M_o_d_e (mode de
        transfert asynchrone). Un rseau ATM enveloppe les donnes en
        blocs de taille standard pour pouvoir les convoyer efficacement
        d'un point  un autre. ATM est une technologie rseau 
        commutation de paquets.

     cclliieenntt
        C'est habituellement le morceau de logiciel d'un systme du ct
        o se trouve l'utilisateur.  Il y a des exceptions, par exemple,
        dans le systme de fentres X11 c'est en fait le serveur qui est
        avec l'utilisateur et le client qui est sur la machine distante.
        Le client est le programme ou l'extrmit d'un systme qui
        utilise le service fourni par un serveur. Dans le cas de
        systmes _d_'__g_a_l _ __g_a_l tels que _s_l_i_p ou _p_p_p le client se trouve
         l'extrmit qui a initialis la connexion, l'autre extrmit,
        tant considre comme le serveur.

     ddaattaaggrraammmmee
        Un datagramme est un paquet discret de donnes qui contient les
        adresses, et qui est l'unit de base de transmission sur un
        rseau IP. On peut aussi l'appeler `paquet'.

     DDLLCCII
        DLCI veut dire `Data Link Connection Identifier'(identifieur de
        connexion de liaison de donnes), et est utilis pour identifier
        une liaison virtuelle unique point  point via un rseau 
        relais de trames (Frame Relay). Les DLCI sont normalement
        assigns par le fournisseur de rseau  relais de trames.

     RReellaaiiss ddee ttrraammeess
        Frame Relay (Relais de trames) est une technologie rseau idale
        lorsque l'on a un trafic de nature cahotique ou sporadique. Les
        cots peuvent tre rduits quand on a de nombreux clients
        partageant la mme capacit rseau et on compte sur le fait que
        les clients utilisent le rseau  des instants diifrents.

     AAddrreessssee mmaattrriieellllee
        C'est un nombre qui identifie de manire unique un hte sur un
        rseau physique au niveau de la couche accs. Par exemple :
        _A_d_r_e_s_s_e_s _E_t_h_e_r_n_e_t et _A_d_r_e_s_s_e_s _A_X_._2_5.

     IISSDDNN
        C'est l'acronyme de _I_n_t_e_g_r_a_t_e_d _S_e_r_v_i_c_e_s _D_i_g_i_t_a_l _N_e_t_w_o_r_k(Rseau
        Numrique  Intgration de Services=RNIS). Il fournit des moyens
        standardiss avec lesquels les compagnies de tlcommunications
        peuvent dlivrer soit de la voix soit des informations vers des
        clients.  Techniquement c'est un rseau de donnes  commutation
        de paquets.

     IISSPP
        C'est l'acronyme de `Internet Service Provider' (fournisseur
        d'accs  l'Internet=FAI). Ce sont des organisations ou des
        socits qui fournissent une connexion rseau  l'Internet au
        public.

     AAddrreessssee IIPP
        C'est un nombre qui identifie de manire unique un hte TCP/IP
        sur le rseau. Cette adresse est code sur 4 octets et se
        prsente habituellement sous la forme appele "notation dcimale
        pointe", o chaque octet est sous forme dcimale, avec un point
        `.' entre chaque.

     MMSSSS
        Le Maximum Segment Size (_M_S_S) (Taille Maximum de Segment) est la
        plus grande quantit de donnes qui peut tre transmise en une
        seule fois. Si vous voulez viter des fragmentations MSS doit
        tre gal  l'en-tte MTU-IP.

     MMTTUU
        Le Maximum Transmission Unit (_M_T_U) (taille maximum de l'unit de
        transfert) est un paramtre qui dtermine le plus long
        datagramme pouvant tre transmis par une interface IP sans avoir
        besoin d'tre fragment en units plus petites.  Le MTU doit
        tre plus grand que le datagramme le plus grand que vous voulez
        transmettre sans tre fragment. Note : ceci protge de la
        fragmentation uniquement de manire locale, d'autres liens sur
        le chemin peuvent avoir un MTU plus petit et les datagrammes
        seront fragments  cet endroit. Les valeurs typiques sont de
        1500 octets pour une interface Ethernet, ou de 576 octets pour
        une interface SLIP.

     rroouuttee
        La _r_o_u_t_e est le chemin que les datagrammes suivent  travers le
        rseau pour atteindre leur destination.

     sseerrvveeuurr
        C'est habituellement le morceau de logiciel ou l'extrmit d'un
        systme loign de l'utilisateur. Le serveur fournit un service
        vers un ou plusieurs clients.  Des exemples de serveurs sont
        _f_t_p, _N_e_t_w_o_r_k_e_d _F_i_l_e _S_y_s_t_e_m (NFS), ou _D_o_m_a_i_n _N_a_m_e _S_e_r_v_e_r (DNS).
        Dans le cas de systmes __g_a_l _ __g_a_l comme _S_L_I_P ou _P_P_P le serveur
        est considr comme tant l'extrmit de la liaison qui est
        appele et l'extrmit appeleante est le client.

     ffeennttrree
        La _f_e_n__t_r_e (window) est la plus grande quantit de donnes que
        l'extrmit rceptrice peut accepter  un certain moment.


  1133..  CCooppyyrriigghhtt..


  _I_n_f_o_r_m_a_t_i_o_n_s _d_e _c_o_p_y_r_i_g_h_t


  Auteurs initiaux: Terry Dawson (auteur principal), VK2KTJ; Allessandro
  Rubini (mainteneur).

  Les documents NET-3/4-HOWTO,NET-3 donnent des informations concernant
  l'installation et la configuration du support rseau pour Linux.
  Copyright (c) 1997 Terry Dawson, 1998 Alessandro Rubini, 1999 Joshua
  D. Drake {POET} -  http://www.linuxports.com


  Celui-ci est libre ; vous pouvez le redistribuer et/ou le modifier
  selon les termes de la GNU General Public License telle que publie
  par la Free Software Foundation ; soit avec la version 2 de la
  license, soit ( votre guise) avec une version ultrieure.

  Ce document est distribu avec l'espoir qu'il sera utile, mais SANS
  AUCUNE GARANTIE ; ni mme la garantie implicite de COMMERCIALISATION
  ou D'ADAPTATION DANS UN BUT PARTICULIER. Voir la GNU General Public
  License pour plus de dtails.

  Vous devriez recevoir une copie de la GNU General Public License avec
  ce document ; si ce n'est pas le cas, crivez  :

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.

  1144..  NNoottee dduu ttrraadduucctteeuurr

  Voir les autres HOWTO traduits en franais.  Lire galement le livre
  Administration rseau sous Linux, ditions O'Reilly.  Enfin voyez le
  site www.linux-france.com o vous trouverez de trs bons articles
  dcrivant en dtail diffrents points voqus dans ce document.








  Possibilits rseau de Linux HOWTO
  Daniel Lpez Ridruejo, ridruejo@esi.us.es
  v0.2, 10 Juillet 1998

  Le but de ce document est de donner une vue d'ensemble des possi
  bilits rseau du Systme d'Exploitation Linux et de donner des
  adresses pour de plus amples informations.
  ______________________________________________________________________

  Table des matires
























































  1. Introduction.

  2. Linux.

     2.1 Qu'est ce que Linux ?
     2.2 Qu'est ce qui fait que Linux est diffrent ?

  3. Protocoles rseau

     3.1 TCP/IP
     3.2 TCP/IP version 6
     3.3 IPX/SPX
     3.4 Le protocole AppleTalk
     3.5 Rseaux WAN : X.25, Frame-relay, etc...
     3.6 ISDN
     3.7 PPP, SLIP, PLIP
     3.8 Radio Amateur
     3.9 ATM

  4. Matriel rseau support

  5. Partage de fichiers et d'imprimantes

     5.1 Environnement Apple
     5.2 Environnement Windows
     5.3 Environnement Novell
     5.4 Environnement UNIX

  6. Internet/Intranet

     6.1 Mail
        6.1.1 Serveurs de Mail
        6.1.2 Accs distant aux mails
        6.1.3 Lecteurs de Mail
        6.1.4 Logiciels de liste de diffusion
        6.1.5 Fetch-mail
     6.2 Serveurs Web
     6.3 Navigateurs Web
     6.4 Serveurs et clients FTP
     6.5 Services de News
     6.6 Noms de domaines (DNS)
     6.7 DHCP, bootp
     6.8 NIS
     6.9 Authentification

  7. Excution d'applications  distance

     7.1 Telnet
     7.2 Commandes excutes  distance
     7.3 X-Window
     7.4 VNC

  8. Interconnection de rseaux

     8.1 Routeur
     8.2 Pont
     8.3 IP-Masquerading
     8.4 IP-Accounting
     8.5 IP-Aliasing
     8.6 Traffic Shaping
     8.7 Firewall
     8.8 Reroutage de ports
     8.9 Rpartition de charge
     8.10 EQL
     8.11 Serveur Proxy
     8.12 Connection  la demande
     8.13 Tunnelling, IP mobile et rseaux privs virtuels

  9. Administration Rseau

     9.1 Programmes d'administration rseau
     9.2 SNMP

  10. Rseaux d'entreprises sous Linux

     10.1 Haute disponibilit
     10.2 RAID
     10.3 Redondance rseau

  11. Sources d'informations

  12. Remerciements et mise en garde



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn..


  Le but de ce document est de donner une ide des possibilits rseau
  du Systme d'Exploitation Linux. De plus, une des grandes forces de
  Linux est qu'il est possible de trouver des tonnes d'informations sur
  presque tous les sujets, et la majorit de ces informations concernent
  surtout la manire dont les choses sont implmentes. La plupart des
  nouveaux utilisateurs de Linux, particulirement ceux qui arrivent
  d'un environnement Windows, ne savent rien des possibilits rseau de
  Linux. Ce document a donc pour but de donner une vue d'ensemble de
  toutes ces possibilits avec une petite description pour chacune et
  des adresses pour aller chercher d'autres informations. Les
  informations ont t rcoltes  partir de nombreuses sources :
  HowTos, faqs, pages web de projets et ma propre exprience. Tous les
  auteurs sont cits. Sans eux, et sans leurs programmes, ce document
  n'aurait pas t possible, ni ncessaire.


  22..  LLiinnuuxx..

  22..11..  QQuu''eesstt ccee qquuee LLiinnuuxx ??

  L'auteur principal de Linux est Linus Torvalds. Depuis la premire
  version, ce systme a t amlior par un nombre impressionnant de
  personnes. C'est un clone, crit  partir de rien, du systme
  d'exploitation UNIX. Le plus intressant  propos de Linux, c'est que
  son dveloppement se fait simultanment tout autour du monde.

  Linux est protg par la Licence GNU (GPL). Cette licence a t crite
  par la Free Software Foundation (FSF), elle est faite pour empcher
  les gens de restreindre la distribution des logiciels. En gros, a dit
  que bien que l'on puisse demander de l'argent pour la distribution, la
  personne qui a reu la copie a le droit de la redistribuer
  gratuitement. Cela dit aussi que le code source doit tre disponible.
  C'est trs utile pour les programmeurs. N'importe qui peut modifier
  Linux et mme distribuer ses modifications, tant que le code reste
  dans le mme copyright.


  22..22..  QQuu''eesstt ccee qquuii ffaaiitt qquuee LLiinnuuxx eesstt ddiiffffrreenntt ??

  Pourquoi travailler sur Linux ? Linux est gnralement moins cher (ou
  du moins pas plus cher) que les autres systmes d'exploitation, et
  cre frquemment moins de problmes que les systmes commerciaux. Mais
  ce qui fait que Linux est diffrent n'est pas le prix (aprs tout,
  pourquoi voudrait-on d'un systme - mme s'il est gratuit - s'il n'est
  pas bien ?), mais ses tonnantes capacits :


    Linux est un vrai systme d'exploitation multitche 32 bits,
     suffisamment solide et puissant pour tre utilis des universits
     jusque dans les grandes entreprises.

    Il fonctionne sur un nombre impressionnant de machines, depuis les
     386 bas de gamme, jusqu'aux machines massivement parallles des
     centres de recherches.

    Il y a des versions disponibles pour les architectures
     Intel/Sparc/Alpha, et un support exprimental des Power PC et des
     systmes tels SGI, Ultra Sparc, AP1000+, Strong ARM, MIPS
     R3000/R4000...

    Finalement, quand on arrive  la partie rseau, Linux est "le"
     choix; non seulement parce que la couche rseau est profondment
     intgre dans le systme, ainsi qu' cause du nombre impressionnant
     d'applications disponibles, mais aussi grce  sa robustesse
     lorsque le systme est trs charg, chose qui ne peut tre
     accomplie dans un tel projet qu'aprs des annes de debuggage et de
     tests.


  33..  PPrroottooccoolleess rrsseeaauu


  Linux supporte beaucoup de protocoles rseau diffrents :


  33..11..  TTCCPP//IIPP


  Le protocole internet (IP) a t conu  l'origine, il y a une
  vingtaine d'annes, pour le dpartement de la dfense des tats Unis
  (DoD), avec pour but principal de pouvoir connecter des ordinateurs de
  diffrentes marques. La suite de protocoles TCP/IP a permis, grce 
  sa structure en couches, d'isoler les applications de la couche rseau
  matrielle.

  De plus, ce modle en couches est plus tourn vers les possibilits
  d'interconnections que vers la rigidit de couches fonctionnelles.
  C'est d'ailleurs pour cette raison que TCP/IP est devenu le standard
  international inter rseau et non pas ISO.

  TCP/IP est prsent dans Linux depuis ses dbuts. Son implmentation
  est partie de rien. Il fait partie des implmentations les plus
  robustes, rapides et fiables et c'est d'ailleurs un facteur cl du
  succs de Linux.

  HowTo : http://sunsite.unc.edu/mdw/HOWTO/NET-3-HOWTO.html


  33..22..  TTCCPP//IIPP vveerrssiioonn 66

  IPv6, aussi connu sous le nom de IPng (IP Next Generation) est une
  mise  jour du protocole IPv4 pour rgler les problmes lis aux
  adresses. Ces problmes incluent : manque d'adresses IP, manque de
  mcanismes pour grer le trafic prioritaire, manque d'une couche de
  scurit...

  L'accroissement du nombre d'adresses s'accompagnera d'un accroissement
  de la complexit des tables d'adressage, ce qui aura un gros impact
  sur les performances de routage. Une implmentation bta existe dj
  pour Linux, et une version stable est attendue pour la version 2.2.0
  du kernel.


    Le HowTo Linux IPv6 : http://www.terra.net/ipv6/linux-ipv6.faq.htm

    La page de dpart d'IPv6 :
     http://playground.sun.com/pub/ipng/html/ipng-main.html


  33..33..  IIPPXX//SSPPXX

  IPX/SPX (Internet Packet Exchange/Sequenced Packet Exchange) est un
  protocole propritaire dvelopp par Novell et bas sur le Xerox
  Nework System (XNS). IPX/SPX tait trs utilis au dbut des annes
  1980 en tant que partie intgrante de Novell NetWare. NetWare est par
  consquent devenu le standard des systmes d'exploitation rseau des
  LANs de premire gnration. Novell a amlior son systme avec des
  applications orientes business et des utilitaires de connections.

  Linux a une implmentation trs propre de IPX/SPX, permettant d'tre
  configur en tant que :


    Routeur IPX

    Pont IPX

    Client NCP et/ou serveur NCP (pour partager des fichiers)

    Client et Serveur d'impression Novell

  Et de :


    Permettre PPP/IPX : une machine Linux de servir de client/serveur
     PPP

    IPX tunnelling  travers IP, permettant la connection de deux
     rseaux IPX via un lien IP

  En plus, Caldera <http://www.caldera.com> offre un support commercial
  pour Novell NetWare sous Linux. Caldera vend un client Novell NetWare
  complet bas sur une technologie achete  Novell Corporation. Ce
  client fournit un accs complet aux serveurs de fichiers Novell 3.x et
  4.x et inclut des trucs comme NetWare Directory Service (NDS) et le
  cryptage RSA.


    Le HowTo IPX : http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html


  33..44..  LLee pprroottooccoollee AApppplleeTTaallkk

  Appletalk est le nom de la pile rseau d'Apple. Elle permet des
  liaisons postes  postes, ce qui offre les fonctions de base telles
  que le partage de fichiers ou d'imprimantes. Chaque machine peut agir
  simultanment en tant que client et serveur. Les logiciels et le
  matriel sont inclus dans chaque ordinateur Apple.

  Linux fournit une pile rseau Appletalk complte. Netatalk, le port
  Linux d'AppleTalk, est implment au niveau du noyau, et provient de
  systmes drivs de BSD. Il inclut le support pour router l'AppleTalk,
  partager les systmes de fichiers Unix et AFS via AFP (AppleShare),
  partager les imprimantes Unix et les imprimantes Appletalk via PAP.
  Aller voir la section 5.1 pour plus de renseignements.


  33..55..  RRsseeaauuxx WWAANN :: XX..2255,, FFrraammee--rreellaayy,, eettcc......

  Certains fournissent des produits T-1, T-3, X.25 et Frame Relay pour
  Linux. Gnralement un matriel spcifique est ncessaire pour ce type
  de connections. Ceux qui vendent le matriel vendent aussi les drivers
  avec support du protocole.


    Ressources WAN pour Linux:
     http://www.secretagent.com/networking/wan.html




  33..66..  IISSDDNN

  Le noyau de Linux a des capacits ISDN intgres. Isdn4linux contrle
  les cartes ISDN des PC et peut muler un modem avec des commandes
  Hayes (commandes "AT"). Les possibilits vont de l'utilisation d'une
  connection type terminal via HDLC (utilisant les priphriques
  inclus), jusqu' une connection Internet complte avec les
  possibilits PPP/Sons.


    FAQ pour isdn4linux: http://tsikora.tiac.net/i4l-faq/eng-i4l-
     faq.html



  33..77..  PPPPPP,, SSLLIIPP,, PPLLIIPP

  Le noyau de Linux a un support intgr pour PPP (Point-to-Point-
  Protocol), SLIP (Serial Line IP) et PLIP (Parallel Line IP). PPP est
  la manire la plus populaire pour les utilisateurs individuels de se
  connecter  leurs FAI (Fournisseurs d'Accs Internet). PLIP permet des
  connections faciles entre deux machines. Il utilise un port parallle
  et un cble spcial, atteignant des vitesses de 10kBps  20kBps.


    Le Linux PPP Howto <http://sunsite.unc.edu/mdw/HOWTO/PPP-
     HOWTO.html>

    L'mulateur PPP/SLIP <http://sunsite.unc.edu/mdw/HOWTO/mini/SLIP-
     PPP-Emulator.html>

    Des informations complmentaires peuvent tre trouves dans The
     Network Administrator Guide
     <http://sunsite.unc.edu/mdw/LDP/nag/nag.html>


  33..88..  RRaaddiioo AAmmaatteeuurr

  Le noyau de Linux possde un support intgr pour les protocoles de
  radio amateur.

  Un point intressant est le support AX.25. Le protocole AX.25 offre
  des possibilits d'oprations avec ou sans connections, et est mme
  utilis par lui-mme pour des connections d'un point  un autre, ou
  pour transporter d'autres protocoles tels TCP/IP ou NetRom.

  Il est similaire au X.25 niveau 2 de par sa structure, avec quelques
  extensions qui le rendent plus utile pour l'environnement radio
  amateur.
    Amateur radio how-to <http://sunsite.unc.edu/mdw/HOWTO/HAM-
     HOWTO.html>


  33..99..  AATTMM

  Le support ATM de Linux en est en ce moment au stade pr-alpha. C'est
  une distribution exprimentale, qui supporte les connections ATM raw
  (PVC et SVC), IP via ATM, mulation LAN...


    La page de l'ATM pour Linux <http://lrcwww.epfl.ch/linux-atm/>


  44..  MMaattrriieell rrsseeaauu ssuuppppoorrtt

  Linux supporte une trs grande varit de matriel rseau, certains
  mme obsoltes.

  Quelques documents intressants :

    Le Hardware How-To <http://sunsite.unc.edu/mdw/HOWTO/Hardware-
     HOWTO.html>

    L'Ethernet How-To <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-
     HOWTO.html>


  55..  PPaarrttaaggee ddee ffiicchhiieerrss eett dd''iimmpprriimmaanntteess

  Le premier but de la majorit des rseaux locaux (LAN) bass sur des
  PC est de fournir un service de partage de fichiers et d'imprimantes
  aux utilisateurs. Linux en tant que serveur de fichiers et
  d'imprimantes pour l'entreprise apparat comme une excellente
  solution.


  55..11..  EEnnvviirroonnnneemmeenntt AAppppllee

  Comme il a t soulign dans les sections prcdentes, Linux supporte
  la famille de protocoles Appletalk. Le netatalk de Linux permet  un
  client Macintosh de voir les systmes Linux comme des autres Macintosh
  sur le rseau, de partager les fichiers, et d'utiliser les imprimantes
  connectes aux serveurs Linux.

  La FAQ de Netatalk et son HowTo :

    http://thehamptons.com/anders/netatalk/

    http://www.umich.edu/~rsug/netatalk/

    http://www.umich.edu/~rsug/netatalk/faq.html


  55..22..  EEnnvviirroonnnneemmeenntt WWiinnddoowwss

  Samba est une suite logicielle qui permet  la majorit des Unix (et
  en particulier Linux) de s'intgrer  un rseau Microsoft en tant que
  client et serveur. En tant que serveur, il permet aux clients Windows
  95, Windows pour Workgroups, DOS et Windows NT d'accder aux fichiers
  et aux imprimantes de la machine Linux. Il peut remplacer compltement
  Windows NT pour le partage de fichiers et les services d'impression,
  incluant le chargement automatique des pilotes d'impression par les
  clients. En tant que client, la station Linux est capable de monter
  des systmes de fichiers exports par d'autres machines.

  D'aprs la Meta-FAQ SAMBA :



       "Beaucoup d'utilisateurs ont dclar qu'en comparaison avec d'autres implmentations SMB,
       Samba est plus stable, plus rapide, et compatible avec plus de clients. Les administrateurs
       de grosses installations disent que Samba est le seul serveur SMB disponible qui peut servir
       plusieurs dizaines de milliers d'utilisateurs sans planter."





    La Page du projet Samba <http://samba.anu.edu.au/samba/>

    Le HowTo Samba <http://sunsite.unc.edu/mdw/HOWTO/SMB-HOWTO.html>

    Le Printing How-to <http://sunsite.unc.edu/mdw/HOWTO/Printing-
     HOWTO.html>


  55..33..  EEnnvviirroonnnneemmeenntt NNoovveellll

  Comme il a t dit dans les sections prcdentes, Linux peut tre
  configur en tant que client ou serveur NCP, et donc, permettre
  l'accs  ses fichiers et ses imprimantes  travers un rseau Novell,
  aussi bien pour les clients Novell que pour les clients Unix.


    Le HowTo IPX <http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html>


  55..44..  EEnnvviirroonnnneemmeenntt UUNNIIXX

  La faon la plus simple de partager les fichiers dans un rseau UNIX
  est d'utiliser NFS. NFS signifie Network File Sharing, c'est  dire,
  partage de fichiers en rseau; son protocole a t dvelopp 
  l'origine par la socit Sun Microsystems. C'est un moyen simple de
  partager des fichiers entre les machines comme s'ils taient locaux.
  Un client "monte" un systme de fichier "export" par un serveur NFS.
  Le systme de fichier mont apparatra au client comme s'il faisait
  partie du systme de fichier local.

  Il est possible de monter un systme de fichier racine au dmarrage,
  permettant ainsi  des clients sans disque de dmarrer et d'accder 
  tous les fichiers du serveur. Plus simplement, il est possible d'avoir
  un ordinateur pleinement fonctionnel bien que n'ayant pas de disque.

  Document en rapport avec NFS :

    http://sunsite.unc.edu/mdw/HOWTO/mini/NFS-Root.html

    http://sunsite.unc.edu/mdw/HOWTO/mini/Diskless.html

    http://sunsite.unc.edu/mdw/HOWTO/mini/NFS-Root-Client.html

    http://www.redhat.com/support/docs/rhl/NFS-Tips/NFS-Tips.html

    http://sunsite.unc.edu/mdw/HOWTO/NFS-HOWTO.html


  66..  IInntteerrnneett//IInnttrraanneett

  Linux est une trs bonne plate-forme pour agir en tant que serveur
  Internet / Intranet. Le terme Intranet se rfre  l'application des
  technologies d'Internet au sein d'une entreprise pour la diffusion
  d'informations dans l'entreprise. Les services Internet et Intranet
  offerts par Linux incluent Mail, News, serveur WWW, et bien plus
  encore qui seront dtaills dans les sections suivantes.


  66..11..  MMaaiill


  66..11..11..  SSeerrvveeuurrss ddee MMaaiill

  Sendmail est de facto, le serveur de mail standard pour les plate-
  formes UNIX. Il est robuste, extensible, et proprement configur avec
  le matriel ncessaire, peut supporter une charge de plusieurs
  milliers d'utilisateurs sans ciller. D'autres serveurs de mails (MTA
  Mail Transport Agents) existent, comme smail et qmail qui sont des
  produits de remplacement pour sendmail.


    Le Site de Sendmail <http://www.sendmail.org/>

    La FAQ de Smail <http://www.sbay.org/smail-faq.html>

    Le Site de Qmail <http://www.qmail.org>

     HowTo Mail :

    http://sunsite.unc.edu/mdw/HOWTO/Mail-HOWTO.html

    http://sunsite.unc.edu/mdw/HOWTO/mini/Qmail+MH.html

    http://sunsite.unc.edu/mdw/HOWTO/mini/Sendmail+UUCP.html

    http://sunsite.unc.edu/mdw/HOWTO/mini/Mail-Queue.html


  66..11..22..  AAccccss ddiissttaanntt aauuxx mmaaiillss

  Dans une entreprise ou chez un FAI, les utilisateurs accderont  leur
  boite  lettres lectronique depuis leur bureau. Plusieurs
  alternatives existent sous Linux, incluant des serveurs POP (Post
  Office Protocol) et IMAP (Internet Message Access Protocol). Le
  protocole POP est gnralement utilis pour transfrer les messages du
  serveur au client. IMAP permet la manipulation des messages sur le
  serveur, cration et suppression  distance de rpertoires sur le
  serveur, accs  des dossiers de mails partags, etc.


    Brve comparaison de IMAP et POP
     <http://www.imap.org/imap.vs.pop.brief.html>

     HowTo en rapports avec le courrier lectronique :

    http://sunsite.unc.edu/mdw/HOWTO/Mail-HOWTO.html

    http://sunsite.unc.edu/mdw/HOWTO/mini/Cyrus-IMAP.html


  66..11..33..  LLeecctteeuurrss ddee MMaaiill

  Il y a un bon nombre de lecteurs de mail sous Linux, soit en mode
  graphique, soit en mode texte. Les plus utiliss son pine, elm, mutt
  et Netscape.


    Liste des logiciels en rapport avec le courrier lectronique
     <http://www.linuxlinks.com/Software/Internet/Mail/>
    http://sunsite.unc.edu/mdw/HOWTO/mini/TkRat.html


  66..11..44..  LLooggiicciieellss ddee lliissttee ddee ddiiffffuussiioonn

  Il y a beaucoup de programmes de gestion de listes de diffusion
  disponibles pour UNIX en gnral et pour Linux en particulier.


    Une bonne comparaison des gestionnaires de listes peut tre trouv
      : ftp://ftp.uu.net/usenet/news.answers/mail/list-admin/

    Listserv <http://www.lsoft.com/>

    Majordomo <http://www.greatcircle.com/majordomo/>


  66..11..55..  FFeettcchh--mmaaiill

  L'un des utilitaires trs pratique pour la gestion du courrier
  lectronique est fetchmail. Fetchmail est un programme de rcupration
  et de reroutage de mails gratuit, robuste, complet et trs bien
  document, fait pour tre utilis avec une connection TCP/IP  la
  demande (comme des connections SLIP ou PPP). Il supporte tous les
  protocoles de mail distants en vigueur de nos jours sur Internet. Il
  supporte mme IPv6 et IP-SEC.

  Fetchmail rcupre les mails depuis des serveurs de mails distants et
  les reroute via SMTP, par consquent, ils peuvent tre normalement lus
  par des clients mails normaux tels mutt, elm ou BSD Mail. Il permet 
  tous les systmes de filtrage, de reroutage et d'aliasing des serveurs
  mail de fonctionner comme s'il s'agissait de mails normaux.

  Fetchmail peut tre utilis en tant que passerelle POP/IMAP-vers-SMTP
  pour un domaine DNS entier, rcuprant les mails d'une seule boite aux
  lettres chez le FAI, et transfrant le tout en se basant sur les en-
  ttes.

  Une petite entreprise peut centraliser tous ses comptes mails dans une
  seule boite, et programmer fetchmail pour rcuprer tous les mails en
  partance, les envoyer sur Internet et rcuprer les messages arrivant
  d'un seul coup.

    La page de Fetch-mail <http://sagan.earthspace.net/~esr/fetchmail/>


  66..22..  SSeerrvveeuurrss WWeebb

  La majorit des distributions Linux incluent Apache
  <http://www.apache.org>. D'aprs http://www.netcraft.co.uk/survey/
  Apache est le premier serveur Web sur internet, plus de la moiti des
  sites internet utilisent Apache, ou un de ses drivs. Les avantages
  d'Apache incluent sa conception modulaire, sa stabilit, et sa
  vitesse. Avec une configuration approprie et un matriel adquat, il
  peut supporter les plus grosses charges : Yahoo, Altavista, GeoCities,
  Hotmail sont bass sur des versions customises de ce serveur.

  Un support optionnel des SSL (qui permettent des transactions
  cryptes) est aussi disponible  :

    http://www.apache-ssl.org/

    http://raven.covalent.net/

    http://www.c2.net/

  HowTo en relation :

    http://sunsite.unc.edu/mdw/HOWTO/WWW-HOWTO.html

    http://sunsite.unc.edu/mdw/HOWTO/Virtual-Services-HOWTO.html

    http://sunsite.unc.edu/mdw/HOWTO/Intranet-Server-HOWTO.html

    Serveurs Web pour Linux
     <http://www.linuxlinks.com/Software/Internet/WebServers/>


  66..33..  NNaavviiggaatteeuurrss WWeebb

  Un bon nombre de navigateurs WWW existent pour les plate-formes Linux.
  Netscape Navigator est l'un des choix du dbut, et Mozilla
  <http://www.mozilla.org> aura une version Linux. Un autre navigateur
  en mode texte populaire est lynx. Il est rapide et pratique quand
  aucun environnement graphique n'est disponible.


    Navigateurs pour Linux
     <http://www.linuxlinks.com/Software/Internet/WebBrowsers/>

    http://sunsite.unc.edu/mdw/HOWTO/mini/Public-Web-Browser.html


  66..44..  SSeerrvveeuurrss eett cclliieennttss FFTTPP

  FTP signifie File Transfer Protocol, protocole de transfert de
  fichier. Un serveur FTP permet aux clients de se connecter et de
  rcuprer des fichiers. Il y a beaucoup de clients et de serveurs FTP
  qui existent pour Linux et sont, la plupart du temps inclus dans les
  distributions. Il y a des clients en mode texte ainsi que des clients
  avec une interface graphique. Les logiciels en rapport avec le FTP
  peuvent tre trouvs  :
  http://sunsite.unc.edu/pub/Linux/system/network/file-transfer/


  66..55..  SSeerrvviicceess ddee NNeewwss

  Usenet (aussi appel news) est un norme BBS qui couvre tous les
  sujets possibles et qui est organis hirarchiquement. Un rseau
  d'ordinateurs au travers d'Internet (Usenet) change des articles
  grce au protocole NNTP. Plusieurs implmentations existent pour
  Linux, que ce soit pour un site trs charg ou un petit site recevant
  peu de groupes.

    La page de INN <http://www.isc.org/>

    Les logiciels en rapport avec les news
     <http://www.linuxlinks.com/Software/Internet/News/>


  66..66..  NNoommss ddee ddoommaaiinneess ((DDNNSS))

  Un serveur DNS a pour tche de traduire les noms (comprhensibles par
  les humains) en adresses IP. Un serveur de DNS ne connat pas toutes
  les adresses IP du monde, mais, il est capable de demander  un autre
  serveur une adresse inconnue. Le serveur de DNS retournera alors, soit
  l'IP demande, ou rpondra qu'il ne trouve pas ce nom dans ses tables.

  Les serveurs de noms sous Unix (et majoritairement sur Internet) sont
  grs par un programme appel named. Il fait partie du paquetage bind
  de l'Internet Software Consortium.

    BIND <http://www.isc.org/>

    Le HowTo DNS <http://sunsite.unc.edu/mdw/HOWTO/DNS-HOWTO.html>


  66..77..  DDHHCCPP,, bboooottpp

  DHCP et bootp sont des protocoles qui permettent  une machine cliente
  d'obtenir des informations sur le rseau (comme son adresse IP) depuis
  un serveur. Beaucoup d'entreprises commencent  l'utiliser car cela
  rend plus facile l'administration des rseaux, spcialement dans les
  cas de grands rseaux ou de rseaux avec beaucoup d'utilisateurs
  mobiles.

  Documents en relation :

    Le HowTo DHCP <http://sunsite.unc.edu/mdw/HOWTO/mini/DHCP.html>


  66..88..  NNIISS

  NIS est l'abrviation de Service d'Information Rseau (Network
  Information Service). Il fournit un simple service de consultation
  comprenant bases de donnes et processus. Son objectif est de fournir
  des informations qui doivent tre connues  travers le rseau par
  toutes les machines qui s'y trouvent. Les informations distribues par
  NIS sont :


    nom de login, mots de passe, rpertoires parents (/etc/passwd) ;

    renseignements sur le groupe d'utilisateurs (/etc/group).

  Par exemple, si votre mot de passe est enregistr dans la base de
  donnes NIS, vous pourrez vous loger sur n'importe quelle machine
  situe sur le rseau qui possde les clients NIS.


  HowTo en relation :

    NIS How-to <http://sunsite.unc.edu/mdw/HOWTO/NIS-HOWTO.html>


  66..99..  AAuutthheennttiiffiiccaattiioonn

  Il y a aussi plusieurs mthodes pour authentifier des utilisateurs
  dans un rseau htrogne.


  Pour Linux/Windows NT : http://www.mindware.com.au/ftp/smb-NT-
  verify.1.1.tar.gz.


  Le PAM (pluggable authentication module) qui est une mthode flexible
  d'authentification sous UNIX : librairie PAM
  <http://www.kernel.org/pub/linux/libs/pam/index.html>.

  Et enfin, LDAP pour Linux
  <http://www.umich.edu/~dirsvcs/ldap/index.html>


  77..  EExxccuuttiioonn dd''aapppplliiccaattiioonnss  ddiissttaannccee

  L'une des plus folles fonctionnalits d'UNIX (et pourtant une des plus
  mconnues pour les nouveaux utilisateurs) est le superbe support pour
  l'excution rpartie et  distance des applications.
  77..11..  TTeellnneett

  Telnet est un programme qui permet  une personne d'utiliser un
  ordinateur distant comme s'il tait sur place. Telnet est l'un des
  plus puissants outils d'UNIX, permettant une relle administration 
  distance. C'est aussi un programme intressant au niveau de
  l'utilisateur, parce qu'il permet  un utilisateur d'accder 
  distance  tous les fichiers et les programmes qu'il utilise depuis
  n'importe o sur Internet. Combin avec un serveur X, il n'y a pas de
  diffrence ( part le dlai) entre tre sur place ou  l'autre bout du
  monde. Les clients et daemons telnet sont disponibles avec toutes les
  distributions de Linux.

  Des shells scuriss existent via SSH <http://www.cs.hut.fi/ssh/>
  permettant une administration scurise.


    Logiciels en rapport avec Telnet
     <http://sunsite.unc.edu/pub/Linux/system/network/telnet/>


  77..22..  CCoommmmaannddeess eexxccuutteess  ddiissttaannccee

  Sous Unix, et en particulier sous Linux, il existe des commandes qui
  permettent d'interagir avec d'autres ordinateurs depuis la ligne de
  commande. Par exemple : rlogin, qui permet de se loger sur une machine
  distante d'une manire quivalente  telnet ou rcp, qui permet de
  faire des transferts entre machines, etc. Et bien sr la commande rsh
  (remote shell) permet d'excuter des commandes sur une machine
  distante sans pour autant s'y loger.


  77..33..  XX--WWiinnddooww

  Le systme X-Window a t dvelopp au MIT  la fin des annes 80 et
  il est rapidement devenu l'interface graphique standard de l'industrie
  pour les stations de travail graphiques UNIX. Le tout est disponible
  gratuitement, est trs polyvalent, et est port pour une trs grande
  varit de plate-formes. Tout systme X-Window consiste en deux
  parties, le serveur X, et un ou plusieurs clients X. Il est important
  de faire la distinction entre le serveur et le client. Le serveur
  contrle l'affichage directement, et gre les entres et les sorties
  via le clavier, la souris ou l'affichage. Le client, d'un autre ct,
  n'accde pas  l'cran directement, il communique avec le serveur, qui
  gre les entres et les sorties. C'est le client qui fait tout le
  "vrai" travail, excution d'application ou quoi que ce soit. Le client
  communique avec le serveur, demandant au serveur d'ouvrir une ou
  plusieurs  fentres, et de grer entres et sorties pour le client.

  Pour rsumer, le systme X-Window permet  un utilisateur d'accder 
  une autre machine, d'excuter un programme (par exemple, un navigateur
  WWW) et d'avoir les sorties affiches sur sa propre machine. Parce que
  ce processus est en ralit excut sur le serveur, trs peu de
  puissance CPU est ncessaire sur le client. En fait, il est possible
  d'avoir des ordinateurs dont la fonction essentielle est d'tre des
  serveurs X-Window et ils sont appels terminaux X.

  Un port gratuit du systme X-Window existe pour Linux et peut tre
  trouv  : Xfree <http://www.xfree86.org/> Il est normalement inclus
  dans la plupart des distributions Linux.

  HowTo en relation :

    Application X  distance
     <http://sunsite.unc.edu/mdw/HOWTO/mini/Remote-X-Apps.html>

  77..44..  VVNNCC

  VNC signifie Virtual Network Computing c'est  dire, rseau virtuel
  d'ordinateurs. C'est un systme d'affichage  distance qui permet de
  voir un 'bureau' d'ordinateur non seulement depuis la machine o il
  marche mais aussi depuis n'importe quelle machine sur Internet, et sur
  des architectures trs varies. Des clients et des serveurs existent
  pour Linux et bien d'autres plate-formes. Par exemple, il est possible
  d'excuter MS-Word depuis une machine sous Windows NT ou 95 et d'avoir
  le rsultat affich sur n'importe quelle autre machine, une machine
  Linux par exemple. Le contraire est bien sr aussi possible, ainsi que
  d'excuter une application sur une machine Linux et d'avoir
  l'affichage sur une autre machine Linux, ou une machine Windows... Un
  client Java existe aussi, permettant l'affichage dans un navigateur
  Web. Finalement, un port Linux utilisant la librairie graphique
  SVGAlib permet  des 386 avec 4 Mo de RAM de devenir de vrais
  terminaux X.



    Le site VNC <http://www.orl.co.uk/vnc>


  88..  IInntteerrccoonnnneeccttiioonn ddee rrsseeaauuxx

  La couche rseau de Linux est pleine de fonctionnalits. Un ordinateur
  sous Linux peut tre configur pour agir en tant que routeur,
  passerelle, etc... Quelques unes des options disponibles sont dcrites
  ci-dessous.


  88..11..  RRoouutteeuurr

  Le noyau de Linux supporte les fonctions de routage. Un ordinateur
  sous Linux peut aussi bien fonctionner en tant que routeur IP ou IPX
  pour un cot bien moins lev qu'un routeur commercial. Les noyaux
  rcents incluent des options spciales pour les machines jouant le
  rle de routeurs :

    Multicasting : permet  la machine Linux de fonctionner en tant que
     routeur pour des paquets IP qui ont plusieurs adresses de
     destination. C'est ncessaire sur le MBONE, un rseau  grande
     bande passante, qui diffuse du son et de la vido.

    IP policy routing : Normalement, un routeur dcide quoi faire quand
     il reoit un paquet en se basant principalement sur l'adresse
     finale du paquet, mais il peut aussi prendre en compte l'adresse
     d'origine et l'endroit d'o le paquet arrive.

  Il y a quelques projets qui ont pour but de faire marcher un routeur
  Linux avec juste une disquette : Projet de routeur Linux
  <http://www.psychosis.com/linux-router/>


  88..22..  PPoonntt

  Le noyau de Linux sait agir en tant que pont Ethernet, ce qui signifie
  que les diffrents segments Ethernets auxquels il est connect
  apparatront comme un seul Ethernet aux participants. Plusieurs ponts
  peuvent collaborer, pour crer d'encore plus larges rseaux Ethernet
  en utilisant l'algorithme d'arbre (spanning tree) IEEE802.1. Comme
  c'est un standard, les ponts Linux pourront fonctionner avec des ponts
  d'autres sortes. D'autres paquetages permettent le filtrage bas sur
  les adresses IP, IPX ou MAC.


  HowTo en relation :

    Bridge+Firewall
     <http://sunsite.unc.edu/mdw/HOWTO/mini/Bridge+Firewall.html>

    Bridge <http://sunsite.unc.edu/mdw/HOWTO/mini/Bridge.html>


  88..33..  IIPP--MMaassqquueerraaddiinngg

  IP Masquerade est une fonction de dveloppement de rseau pour Linux.
  Si une machine Linux est connecte  Internet avec IP Masquerade
  activ, les ordinateurs s'y connectant (soit sur le mme rseau, soit
  se connectant par modems) peuvent accder  Internet sans problmes,
  mme s'ils n'ont pas de relle IP d'assigne. Ceci permet de rduire
  les cots, puisque pas mal de personnes pourront accder  Internet en
  utilisant une simple connection par modem. Cela permet aussi de
  rduire les risques de scurit car d'une certaine faon, la machine
  agit en tant que firewall, puisque les adresses non officielles ne
  peuvent pas tre accdes depuis l'extrieur de ce rseau.

  Pages et documents se rapportant  l'IP Masquerade :

    http://www.tor.shaw.wave.ca/~ambrose/

    http://www.indyramp.com/masq/links.pfhtml

    http://sunsite.unc.edu/mdw/HOWTO/mini/IP-Masquerade.html


  88..44..  IIPP--AAccccoouunnttiinngg

  Cette option permet au noyau de Linux de garder une trace de tout le
  trafic IP, d'enregistrer les paquets IP, et de produire quelques
  statistiques. Une srie de rgles peuvent tre dfinies pour que,
  lorsque certains paquets ont certaines caractristiques, un compteur
  soit incrment, que le paquet  soit accept ou rejet, etc...


  88..55..  IIPP--AAlliiaassiinngg

  Cette fonctionnalit du noyau de Linux fournit la possibilit
  d'assigner plusieurs adresses rseau  la mme interface (ex : deux
  adresses IP sur une carte Ethernet). Typiquement, pour tre utilis
  pour des services qui se comportent diffremment selon l'adresse par
  laquelle ils sont appels (ex : "multihosting" ou "domaines virtuel"
  ou "service d'hbergement virtuel").

  HowTo en relation :

    IP Aliasing How-to <http://sunsite.unc.edu/mdw/HOWTO/mini/IP-
     Alias.html>


  88..66..  TTrraaffffiicc SShhaappiinngg

  Le traffic shaper est une interface virtuelle qui permet de limiter le
  trafic montant vers une autre interface rseau. C'est particulirement
  utile quand on veut limiter/contrler la bande passante utilise par
  un client. Une autre alternative (pour le web seulement) serait
  d'utiliser un module d'Apache qui restreint le nombre de connections
  par client, ou la bande passante utilise.




  88..77..  FFiirreewwaallll

  Un firewall est une interface qui protge un rseau prive du reste
  d'Internet. Il est conu pour contrler le flux de paquets en se
  basant sur la source, la destination, le port et le type de paquet
  contenu dans chaque paquet.

  Il existe diffrents outils de firewalls pour Linux, ainsi qu'un
  support intgr dans le noyau. D'autres firewalls sont TIX et SOCKS.
  Ces kits de firewall sont trs complets, et combins avec d'autres
  outils, permettent de bloquer/rediriger tous types de trafic et
  protocoles. Diffrentes rgles peuvent tre implmentes par le biais
  de fichiers de configuration ou grce  des programmes graphiques.


    La page de TIS <http://www.tis.com>

    SOCKS <http://www.socks.nec.com/socksfaq.html>

    Le Firewall How-to <http://sunsite.unc.edu/mdw/HOWTO/Firewall-
     HOWTO.html>


  88..88..  RReerroouuttaaggee ddee ppoorrttss

  Un nombre croissant de sites WWW deviennent interactifs en ayant des
  cgi-bins ou des applets Java qui accdent  des bases de donnes ou 
  d'autres services. Puisque ces accs peuvent poser des problmes de
  scurit, la machine contenant la base de donne ne devrait pas tre
  connecte directement  Internet.

  Le reroutage de ports peut fournir une solution presque idale  ce
  problme d'accs. Avec un firewall, les paquets IP qui arrivent sur un
  port spcifique peuvent tre rcrit et envoys au serveur interne
  fournissant le service. Le paquet qui est reu du serveur interne est
  rcrit pour le faire apparatre comme arrivant du firewall.

  Des informations sur le reroutage de ports peuvent tre trouves  ici
  <http://www.ox.compsoc.net/~steve/portforwarding.html>


  88..99..  RRppaarrttiittiioonn ddee cchhaarrggee

  Lorsqu'un serveur Web, qui utilise une base de donne, est trs
  charg, il serait utile d'avoir plusieurs serveurs identiques et de
  rediriger les requtes vers le serveur le moins charg. Ceci peut tre
  fait avec les techniques de translation d'adresses rseau (NAT :
  Network Address Translation) dont IP-Masquerading est un sous-
  ensemble. Les administrateurs rseaux peuvent remplacer un serveur
  simple fournissant des services Web - ou n'importe quoi d'autre - par
  un groupe de serveurs partageant la mme adresse IP. Les connections
  arrivantes sont rediriges vers l'un des serveurs en utilisant un
  algorithme de rpartition de charge. Le serveur virtuel rcrit les
  paquets entrants et sortants pour que les clients aient un accs
  transparent au serveur, comme s'il tait unique.

  Des informations sur Linux IP-NAT peuvent tre trouves l
  <http://www.csn.tu-chemnitz.de/~mha/linux-ip-nat/diplom/>


  88..1100..  EEQQLL

  EQL est intgr au noyau de Linux. Si deux connections sries existent
  vers un autre ordinateur (cela demande deux modems et deux lignes de
  tlphone) et si SLIP ou PPP (un protocole pour envoyer un trafic
  internet  travers une ligne de tlphone) sont utiliss dessus, il
  est possible de les faire se comporter comme une seule connection
  ayant une vitesse double en utilisant ce driver. Naturellement, EQL
  doit tre support de l'autre ct aussi.


    Le EQL How-to <http://www.abies.com/eql-howto.mhtml>


  88..1111..  SSeerrvveeuurr PPrrooxxyy

  Le terme proxy signifie "faire quelque chose pour quelqu'un d'autre".
  En termes de rseau, un serveur proxy est un ordinateur qui agit pour
  plusieurs clients. Un proxy HTTP est une machine qui reoit des
  requtes  des pages Web d'autres machines (machine A). Le proxy
  rcupre la page en question et retourne le rsultat  la machine A.
  Le proxy peut avoir un cache contenant les pages dj demandes, de
  faon  ce que , si une autre machine demande la mme page, la copie
  du cache soit retourne  la place. Ceci permet de rduire la bande
  passante utilise, et d'avoir un temps de rponse plus court. Comme
  effet de bord, les machines clientes n'accdent pas directement au
  monde extrieur et cela peut rendre un rseau plus sr. Un proxy bien
  configur peut tre aussi efficace qu'un firewall.

  Plusieurs serveurs proxy existent pour Linux. La solution la plus
  populaire est le module proxy d'Apache. Il y a aussi SQUID qui est une
  implmentation plus complte et plus robuste de proxy HTTP.


    Apache <http://www.apache.org>

    Squid <http://squid.nlanr.net>



  88..1122..  CCoonnnneeccttiioonn  llaa ddeemmaannddee

  Le but des connections  la demande est de faire croire aux
  utilisateurs qu'ils ont une connection permanente d'un point  un
  autre. D'habitude, il y a un daemon qui surveille le trafic de
  paquets, qui tablit la connection quand elle est ncessaire, puis
  aprs une priode d'inactivit, clot la connection.


    Le Diald How-to <http://sunsite.unc.edu/mdw/HOWTO/mini/Diald.html>


  88..1133..  TTuunnnneelllliinngg,, IIPP mmoobbiillee eett rrsseeaauuxx pprriivvss vviirrttuueellss

  Le noyau de Linux permet le tunnelling (encapsulation) de protocoles.
  Il peut faire du tunnelling IPX via IP, permettant la connection de
  deux rseaux IPX via une simple liaison IP. Il peut aussi faire du
  tunnelling IP-IP, qui est majoritairement utilis pour le support des
  IP mobiles, le support du multicast, et la radio amateur. (voir
  http://sunsite.unc.edu/mdw/HOWTO/NET-3-HOWTO-6.html#ss6.13)

  Les IP mobiles sont une amlioration qui permet un routage transparent
  de datagrammes IP vers des noeuds IP sur Internet. Chaque noeud est
  toujours identifi par son adresse d'origine, quelque soit son point
  de rattachement  Internet. Quand il est loign de son point
  d'origine, un noeud mobile est aussi associ avec une adresse
  d'hbergement, ce qui fournit des informations sur son point de
  rattachement actuel sur Internet. Le protocole permet d'enregistrer
  l'adresse de l'hbergeur avec un programme spcifique. Ce programme
  envoie les datagrammes destins au noeud mobile via le tunnel de
  l'adresse de l'hbergeur. Aprs tre arriv, chaque datagramme est
  alors dlivr au noeud mobile.
  Le Point-to-Point Tunneling Protocol (PPTP) est une technologie rseau
  qui permet d'utiliser Internet en tant que rseau priv virtuel (VPN :
  virtual private network). PPTP est intgr dans le serveur de services
  d'accs  distance (RAS : Remote Access Services) de Windows NT
  server. Avec PPTP, les utilisateurs peuvent se connecter  leur FAI
  local, ou se connecter directement  Internet, et utiliser leur rseau
  comme s'ils taient devant leur bureau. PPTP est un protocole bien
  dfini, et sa scurit a rcemment t compromise. Il est fortement
  conseill d'utiliser l'une des alternatives proposes par Linux, car
  elles s'appuient sur des standards qui ont t examins et tests trs
  minutieusement.


    Un client PPTP pour Linux est disponible ici
     <http://www.pdos.lcs.mit.edu/~cananian/Projects/PPTP/>

     IP mobile :

    http://www-uk.hpl.hp.com/people/jt/mip.html

    http://anchor.cs.binghamton.edu/~mobileip/

     Document parlant des rseaux privs virtuels :

    http://sunsite.unc.edu/mdw/HOWTO/mini/VPN.html

    http://sites.inka.de/sites/bigred/devel/cipe.html



  99..  AAddmmiinniissttrraattiioonn RRsseeaauu


  99..11..  PPrrooggrraammmmeess dd''aaddmmiinniissttrraattiioonn rrsseeaauu

  Il y a une liste impressionnante d'outils qui sont ddis 
  l'administration rseau et  l'administration  distance. Quelques
  projets intressants sont linuxconf et webmin :

    Webmin <http://www.webmin.com/webmin/>

    Linuxconf <http://solucor.solucorp.qc.ca/linuxconf/>

  D'autres outils incluent des outils d'analyse de trafic rseau, de
  scurit rseau, de surveillance, de configuration, etc. Une archive
  de tous ces outils peut tre trouve  Sunsite
  <http://www.sunsite.unc.edu/pub/Linux/system/network/>


  99..22..  SSNNMMPP

  Le Simple Network Management Protocol (protocole d'administration
  rseau simple) est un protocole ddi  l'administration des services
  rseaux. Il permet l'administration et la surveillance  distance de
  routeurs, passerelles, cartes rseaux, switches, etc... Il y a un
  grand nombre de librairies, clients, daemons et programmes de
  surveillances SNMP disponibles pour Linux. Une bonne page pour
  dmarrer est : http://linas.org/linux/NMS.html


  1100..  RRsseeaauuxx dd''eennttrreepprriisseess ssoouuss LLiinnuuxx

  Dans certaines situations, il est ncessaire d'avoir une
  infrastructure rseau comprenant des mcanismes lui permettant d'tre
  disponible quasiment 100% du temps. Certaines de ces techniques sont
  dcrites plus loin. La majorit des documents suivants peuvent tre
  trouvs sur l'excellent site web de Linas :
  http://linas.org/linux/index.html et dans le HowTo Linux High-
  Availability <http://sunsite.unc.edu/pub/Linux/ALPHA/linux-ha/High-
  Availability-HOWTO.html>


  1100..11..  HHaauuttee ddiissppoonniibbiilliitt

  La redondance est utilise pour viter qu'Internet dans sa globalit
  ait un point faible. Un serveur avec une seule carte rseau ou un seul
  disque SCSI a deux points faibles. L'objectif est de cacher aux
  utilisateurs les problmes imprvus de faon  ce qu'ils puissent
  continuer  travailler rapidement. Les logiciels de haute
  disponibilit sont un groupe de scripts et d'outils qui surveillent et
  dtectent les problmes, suivent une mthode approprie pour restaurer
  l'tat normal et prviennent les administrateurs systmes.


  1100..22..  RRAAIIDD

  RAID est l'abrviation de Redundant Array of Inexpensive Disks, c'est
   dire Grappe redondante de disques, c'est une mthode grce 
  laquelle les informations sont rparties sur plusieurs disques,
  utilisant des techniques telles que la mise bout  bout des disques
  (RAID niveau 0), la mise en miroirs (RAID niveau 1) pour obtenir la
  redondance, des temps d'attente plus faibles et/ou une plus grande
  bande passante pour la lecture et/ou l'criture, et la rcupration
  aprs un crash disque. 6 niveaux RAID diffrents ont t dfinis. Il y
   3 solutions RAID possibles pour les utilisateurs de Linux : RAID
  logiciel, botiers DASD externes, et contrleurs de disques RAID.


    RAID Logiciel : Implmentation RAID purement logicielle, permet
     l'utilisation des diffrents niveaux RAID dans le code de gestion
     des disques du noyau (les bloc devices)

    Botiers DASD externes : les DASD (Direct Access Storage Device, c-
     a-d priphrique de stockage  accs direct) sont des botiers
     spars ayant leur propre alimentation lectrique, fournissent un
     chssis pour ranger les disques, et sont considrs par Linux comme
     un priphrique SCSI comme un autre. D'une faon gnrale, c'est la
     solution RAID la plus fiable.

    Contrleurs de disques RAID : Les contrleurs de disques sont des
     cartes qui se mettent dans les bus ISA/EISA/PCI. Un cble les
     rattache aux disques, comme pour les contrleurs normaux. Mais
     contrairement aux contrleurs normaux, les contrleurs RAID
     implmentent le RAID sur la carte elle-mme, avec tout ce qu'il
     faut pour fournir les diffrents niveaux RAID.

  HowTo en relation :

    http://sunsite.unc.edu/mdw/HOWTO/mini/DPT-Hardware-RAID.html

    http://sunsite.unc.edu/mdw/HOWTO/Root-RAID-HOWTO.html

    http://sunsite.unc.edu/mdw/HOWTO/mini/Software-RAID.html

  Le RAID  linas.org:

    http://linas.org/linux/raid.html





  1100..33..  RReeddoonnddaannccee rrsseeaauu

  Le takeover d'adresse IP (IPAT) :

  Quand une interface rseau tombe en panne, son adresse IP devrait tre
  prise par une carte en tat de marche sur le mme noeud du rseau, ou
  sur un autre noeud.

  Le takeover d'adresse MAC :

  Quand un takeover d'adresses IP survient, il faut s'assurer que tous
  les noeuds du rseau mettent  jour les caches de leurs tables ARP
  (les correspondances entre adresses IP et les adresses MAC).

  Pour plus de dtails, rfrez vous au : HowTo High-Availability
  <http://sunsite.unc.edu/pub/Linux/ALPHA/linux-ha/High-Availability-
  HOWTO.html>


  1111..  SSoouurrcceess dd''iinnffoorrmmaattiioonnss

  O trouver de plus amples informations :

    Linux : http://www.linux.org

    Le Linux Documentation Project :
     http://sunsite.unc.edu/mdw/linux.html (Allez lire le Linux Network
     Administrator Guide)

    Freshmeat : Les dernires nouveauts des logiciels Linux.
     http://www.freshmeat.net

    Liens sur Linux : http://www.linuxlinks.com/Networking/


  1122..  RReemmeerrcciieemmeennttss eett mmiissee eenn ggaarrddee

  Ce document est bas sur le travail de beaucoup d'autres personnes qui
  ont fait leur possible pour que Linux devienne ce qu'il est maintenant
  : un des meilleurs systmes d'exploitation bas rseau. Tous les
  crdits leurs reviennent. Beaucoup de travail a t fait pour que ce
  document soit clair, ainsi qu'exact et complet, mais sans tre
  excessivement long. Nanmoins, l'auteur dcline toute responsabilit
  en cas de mauvaise utilisation des informations contenues dans ce
  document. N'hsitez pas  m'envoyer vos suggestions, corrections, ou
  commentaires gnraux pour que je puisse l'amliorer. Ce HowTo
  grandira certainement avec le temps, par exemple avec radius, les
  outils pour dupliquer un web/ftp grce  wget, des analyseurs de
  trafic, CORBA... Et tout ce qui me sera suggr et qui me paratra
  intressant. Vous pouvez me joindre ici <mailto:ridruejo@esi.us.es>
  (et l <mailto:arn@mygale.org> pour la traduction franaise)

  Daniel Lpez Ridruejo 9 Mai 1998













  News-Howto
  Vince Shakan, vince@halcyon.com;
  Version Franaise par Arnaud Launay, asl@launay.org
  v1.4, 29 Novembre 1995

  Ce document dcrit la mise en place, la maintenance et l'entretien de
  News USENET sous Linux. Vous devez le lire si vous projetez de lire ou
  de poster des News USENET, soit localement sur votre site, soit entre
  votre site et d'autres sites. Vous n'aurez probablement ppaass  lire ce
  document si vous ne pensez pas distribuer les News USENET sur votre
  systme.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Nouvelles Versions de ce Document
     1.2 Echos, Ractions
     1.3 Informations sur le Copyright
     1.4 Responsabilit standard
     1.5 Autres sources d'informations
        1.5.1 USENET
        1.5.2 Livres
     1.6 O ne PAS chercher de l'aide

  2. Matriel ncessaire

  3. Obtenir les logiciels de News USENET

  4. Logiciels de transport de News

     4.1 Cnews Cleanup Release
        4.1.1 Installer Cnews
        4.1.2 Configurer Cnews
        4.1.3 Maintenir un site Cnews
     4.2 InterNetNews (INN)
        4.2.1 Installer INN
        4.2.2 Configurer INN
        4.2.3 Maintenir un site INN
     4.3 Autres outils de transport de News

  5. Lecteurs de News

     5.1 Tin
     5.2 Trn/Mthreads
     5.3 NN
     5.4 Autres lecteurs de news

  6. Remerciements

  7. FAQ sur USENET (du moins sur c.o.l.* )

     7.1 Pourquoi ne puis-je pas poster dans les groupes modrs ?
     7.2 Pourquoi semble-t-il y avoir des problmes de permissions ?
     7.3 Pourquoi puis-je poster des articles localement, mais qu'ils  n'apparaissent pas ou disparaissent dans les flux ?
     7.4 Pourquoi ma distribution binaire ne dispose pas de nntp ?
     7.5 Pourquoi doexpire (ou relaynews ou..) me dit "severe space shortage"  alors qu'il y a beaucoup de place ?
     7.6 Pourquoi, alors que tout semble normal, l'envoi ne se fait pas ?
     7.7 Puis-je utiliser le New News Overview (NOV) de tin/trn/nn pour remplacer les diverses bases ?
     7.8 Pourquoi ne peut-on avoir de distribution binaire de NNTP ?


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  L'intention de ce document est de rpondre  quelques unes des
  questions et commentaires qui semblent correspondre  la dfinition de
  "Frequently Asked Questions"  propos des logiciels de News sous Linux
  en gnral, et la version de la distribution SlackWare en particulier.

  Ce document et les documents correspondant Mail et UUCP HOWTO
  remplacent collectivement la FAQ UUCP-NEWS-MAIL qui a t prcdemment
  poste  comp.os.linux.announce .


  11..11..  NNoouuvveelllleess VVeerrssiioonnss ddee ccee DDooccuummeenntt

  Les nouvelles versions de ce document seront rgulirement postes sur
  comp.os.linux.announce, comp.answers, et news.answers .  Elles seront
  galement ajoutes sur divers sites ftp anonymes qui archivent de
  telles informations, comme ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO
  (NdT: ou ftp://ftp.traduc.org/pub/HOWTO pour la version franaise.)

  De plus, vous devriez gnralement trouver ce document sur la "Linux
  WorldWideWeb home page"  http://sunsite.unc.edu/mdw/linux.html.


  11..22..  EEcchhooss,, RRaaccttiioonnss

  Je suis interess par tout commentaire, positif ou ngatif,  propos
  du contenu de ce document via e-mail. Contactez moi prcisment si
  vous trouvez des erreurs ou des omissions.

  Je lis, mais ne rpond pas ncessairement,  tous les e-mails que je
  reois. Les demandes d'ajouts seront considres et effectues
  uniquement lorsque la combinaison journalire du temps libre, du
  mrite de la demande, et de la pression sanguine du jour seront
  runies :-)

  Les flames iront tranquillement dans /dev/null, donc ne vous en
  inquitez pas.

  En particulier, le systme de fichiers standard de Linux pour les
  pathnames est en volution. Ce qu'il y a dans ce document est
  uniquement  titre d'illustration, bas simplement sur le standard
  actuel  l'poque de l'criture des parties de ce document, et dans
  les chemins utiliss dans les distributions ou distribution de Linux
  pour connatre les diffrents chemins utiliss.

  Les ractions concernant le format actuel de ce document doivent tre
  adresses au coordinateur des HOWTOs - Greg Hankins
  (greg@sunsite.unc.edu).


  11..33..  IInnffoorrmmaattiioonnss ssuurr llee CCooppyyrriigghhtt

  Le News-HOWTO est (c) 1994, Vince Shakan.

  Une copie exacte peut tre reproduite ou distribue sur tout media
  physique ou lectronique sans accord de l'auteur. Les traductions sont
  galement permises sans permission expresse si une notice sur le
  traducteur est incluse (NdT: ben heu, faut voir :) ).
  De courtes citations peuvent tre utilises sans le consentement
  pralable de l'auteur.
  Les travaux drivs et les distributions partielles du News-HOWTO
  doivent tre accompagnes soit d'une copie texto de ce fichier, soit
  d'un pointeur vers une copie identique.


  Les redistributions commerciales sont autorises et encourages;
  cependant, l'auteur (NdT: et le traducteur s'il s'agit de la
  traduction) apprcierait d'tre prvenu d'une telle distribution (en
  tant que courtoisie).

  En bref, nous dsirons promouvoir la dissmination de ces informations
  sur le maximum de canaux. Cependant, nous dsirons conserver le
  Copyright des documents HOWTO.

  Nous esprons que TOUTES les informations prsentes dans les HOWTOs
  seront diffuses. Si vous avez des questions, contactez Greg Hankins,
  le coordinateur des Linux Howtos,  gregh@sunsite.unc.edu.


  11..44..  RReessppoonnssaabbiilliitt ssttaannddaarrdd

  Bien entendu, je dsavoue tout risque potentiel du contenu du
  document. L'utilisation des concepts, exemples, et/ou du reste du
  document est  votre entire responsabilit.


  11..55..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonnss

  11..55..11..  UUSSEENNEETT


    news.admin.misc : Questions gnrales sur l'administration d'un
     rseau de news

    news.admin.policy : Politique d'USENET

    news.admin.technical : Maintenance d'un rseau de news (modr)

    news.software.b : Discussion sur les logiciels compatibles B-news

    news.software.nn : Discussion sur le paquetage de lecture de news
     'nn'

    news.software.nntp : Protocole: Network News Transfer Protocol

    news.software.readers : Logiciels utiliss pour lire les news

    news.sysadmin : Commentaires orients vers les administrateurs
     systmes

    news.announce.newusers : Messages d'explications pour les nouveaux
     utilisateurs (modr)

    news.newusers.questions : Questions et rponses pour les nouveaux
     utilisateurs d'Usenet


  11..55..22..  LLiivvrreess

  Ce qui suit est un ensemble non-exclusif de livres pouvant aider:

    "Managing UUCP and USENET" publi par O'Reilly+Associates est  mon
     avis le meilleur livre existant pour comprendre les programmes et
     les protocoles utiliss par un site USENET;

    "Unix Communications" publi par The Waite Group contient une
     description sympathique de tous les outils (et bien plus) et
     comment ils s'accordent entre eux;

    "Practical Unix Security" publi par O'Reilly+Associates comporte
     une discussion agrable sur la scurisation d'UUCP en gnral;
    "The Internet Complete Reference" d'Osborne est une rfrence
     prcieuse qui explique les divers services disponibles sur
     l'Internet et est une grosse source d'informations sur les news, le
     mail et diverses autres ressources de l'Internet;

    "The Linux Networking Administrators' Guide" d'Olaf Kirch du Linux
     DOC Project est disponible sur le net et est galement publi (au
     moins) par O'Reilly et SSC. Il constitue un achat utile pour
     apprendre tout ce que vous n'avez jamais imagin  propos du
     travail en rseau sous Unix.


  11..66..  OO nnee PPAASS cchheerrcchheerr ddee ll''aaiiddee

  Il n'y a rien de trs spcial sur la configuration et le lancement de
  news USENET sous Linux (pas plus). Par consquence, vous n'aurez
  certainement *PAS*  poster des questions gnriques relatives aux
  news sur les newsgroups comp.os.linux.* .

  A moins que votre envoi ne soit vraiment spcifique  Linux (cd "svp
  dites moi quels patches sont ncessaires pour utiliser INN avec bash
  1.12 sous SLS v1.03"), vous devrez poster vos questions dans les
  newsgroups mentionns ci-dessus.

  Laissez moi rpter cela.

  Il n'y a virtuellement aucune raison de poster quoi que ce soit de
  relatif aux news dans la hirarchie comp.os.linux. Il existe des
  newsgroups dans la hirarchie news.* pour rpondre  *TOUTES* vos
  questions.

  SI VOUS POSTEZ DES QUESTIONS NON SPECIFIQUES A LINUX DANS
  COMP.OS.LINUX.*, VOUS CHERCHEZ DE L'AIDE AU MAUVAIS ENDROIT. LES
  EXPERTS DES NEWS USENET REPONDENT DANS LES GROUPES INDIQUES CI-DESSUS
  ET NE TOURNENT GENERALEMENT PAS SOUS LINUX.

  POSTER DANS LA HIERARCHIE LINUX DES QUESTIONS NON SPECIFIQUES A LINUX
  VOUS FAIT PERDRE VOTRE TEMPS ET CELUI D'AUTRES PERSONNES, ET AUGMENTE
  FREQUEMMENT LES DELAIS POUR OBTENIR UNE REPONSE.


  22..  MMaattrriieell nncceessssaaiirree

  Il n'y a pas de matriel spcifiquement ncessaire pour les News
  USENET sous Linux. La seule condition requise est d'avoir suffisamment
  de place sur le disque dur pour installer les logiciels, les banques
  de donnes de discussion, et la quantit de news que vous dsirez
  conserver sur le serveur. Il faut un minimum de 10 Mga pour le dbut.


  33..  OObbtteenniirr lleess llooggiicciieellss ddee NNeewwss UUSSEENNEETT

  Tous les logiciels rfrencs dans ce "HOWTO" sont disponibles sur les
  sites ftp anonymes classiques.

  Regarder dans /networking/news sur ftp.uu.net est gnralement un bon
  moyen de dbuter.

  La distribution newspak-2.4.tar.z contient les fichiers de
  configuration et de documentation relatifs  la construction de
  logiciels uucp, mail et news sous Linux  partir des sources gratuites
  disponibles. Il peut gnralement tre trouv sur sunsite.unc.edu,
  dans le rpertoire /pub/Linux/system/Mail/news . Si vous ne pouvez le
  trouver sur sunsite, envoyez moi un mail et je m'assurerai que vous en
  obtiendrez une copie.

  44..  LLooggiicciieellss ddee ttrraannssppoorrtt ddee NNeewwss

  Il y a deux principaux jeux de logiciels de "transport" de News de nos
  jours, Cnews et INN. Les anciennes "BNews" ont t officiellement
  dclares abandonnes et non supportes par leurs auteurs.

  Le "transport" de News est dfini ici comme tant le logiciel qui
  travail en sous-main pour poster et propager les articles des news
  tout en rendant ces mmes articles disponibles  l'accs par les
  lecteurs de news.

  Vous pouvez dfinir n'importe quoi comme chemin, tant que UUCP a le
  chemin gnral vers rnews dans le fichier des Permissions et tant que
  vos lecteurs de news sont configurs de faon  pouvoir trouver
  "inews" et "mail".

  Important - vous aurez des ennuis si vous utilisez  la fois Cnews et
  INN. Prenez l'un ou l'autre. Il est toutefois possible d'ajouter le
  "NNTP Reference Release" dans Cnews depuis qu'ils sont prvus d'tre
  utiliss de concert.


  44..11..  CCnneewwss CClleeaannuupp RReelleeaassee

  Le standard courant en tant que logiciel de News est Cnews. Il existe
  depuis un certain nombre d'annes, je l'ai vu pour la premire fois en
  1988. La version courante lors de l'criture de ce Howto est appelle
  "Cnews CleanUp Release, avec le patch CR.G".

  Le point fort de Cnews est sa maturit. Il tourne sur tout systme
  *nix que vous pouvez trouver et il y a littralement des milliers de
  systme tournant dessous de par le monde.

  Son principal dsavantage est qu'il semble tre conu pour des
  connexions uucp-par-modem entre sites, et comme tel il requiert
  l'ajout d'une couche NNTP pour permettre la lecture et l'criture dans
  les news directement sur l'Internet.

  Nanmoins, l'administrateur Usenet dbutant devra probablement
  commencer par lancer Cnews car il est trs stable, bien document, et
  dispose de plusieurs milliers d'administrateurs expriments qui
  peuvent rpondre aux questions.

  La 'CleanUp Release' dclare que "le support de vue globale a t
  pleinement intgr et est plus rapide qu'il ne l'tait autrefois". Le
  rsultat est que vous pouvez par exemple utiliser le support Cnews NOV
  plutt que de lancer des gnrateurs de listes pour lecteurs de News
  tels nn, tin, et trn.

  Je n'ai pas encore cherch comment implmenter cette partie, car j'ai
  depuis longtemps opt pour INN  la maison. Si quelqu'un attend de moi
  de complter ce document, envoyez-moi un mot par e-mail.

  La distribution newspak sur sunsite contient des fichiers de
  configuration utilisables par la Cnews Cleanup Release sous Linux
  ainsi que quelques patchs ncessaires pour faire un "doexplode" pour
  se jouer de certains problmes sous bash 1.12.

  Basiquement, vous lancerez le nouveau script "quiz" et utiliserez les
  dfauts. Vous devrez vous rfrez  votre arbre /usr/include pour
  rpondre  un certain nombre de questions, mais ceci est plutt
  contraignant.




  44..11..11..  IInnssttaalllleerr CCnneewwss

  L'installation de la Cleanup Release de Cnews est absolument un projet
  "rtfm". Prenez simplement les sources, dcompactez les et suivez les
  instructions.

  Le quiz.def du newspak est gnr en lanant "quiz" la premire fois,
  et pour rpondre aux questions vous n'aurez qu' regarder les fichiers
  du /usr/include.

  Vous devrez avoir une version rcente de bash pour que Cnews passe ses
  tests. Essayez 'bash -version' pour savoir quelle version vous avez.
  La version 1.14.2 est dfinitivement hors du coup. La version courante
  (lors de l'criture de ce howto) est la 1.14.5, qui semble meilleure.

  Steve Robbins a galement dtermin que la rcente 'cleanup release'
  de Cnews a trouv un bug dans le join du shellutils 1.9 de GNU. Il y a
  quelques patchs ncessaires pour que "join" puisse nanmoins
  fonctionner. Si je me rappelle bien, Steve les a plac sur sunsite.


  44..11..22..  CCoonnffiigguurreerr CCnneewwss

  Tout d'abord, vous devrez diter ou tout au moins jeter un oeil aux
  fichiers suivants qui doivent tous tre dans /usr/local/lib/news:


       ______________________________________________________________________
         active             - le fichier actif
         batchparms         - les paramtres de lancement
         explist            - contrle de l'expiration des articles
         mailname           - nom dans l'entte pour les retours par mail
         mailpaths          - path o envoyer les articles pour groupes modrs
         organization       - votre "org"
         sys                - controlez ce que vous prenez et enregistrez
         whoami             - votre hostname pour la ligne Path:
       ______________________________________________________________________





  44..11..33..  MMaaiinntteenniirr uunn ssiittee CCnneewwss

  Tout d'abord, il ne faut pas modifier  la main les fichiers qui
  possdent des utilitaires permettant de les configurer. En particulier
  ne cherchez pas  configurer newsfeed manuellement (lancez "addfeed")
  et le fichier "active" (lancez addgroup). Si vous avez un doute, lisez
  et relisez les docs des sources.

  Tout peut tre fait par cron. Mon crontab pour les "news" ressemble au
  suivant:














  ______________________________________________________________________
            # Rcupre les batchs compresss provenant d'autres systmes
            # aussi, poste localement les articles
            20 *       * * * /usenet/sw/news/bin/input/newsrun

            # Automatise l'envoi
            0 *        * * * /usenet/sw/news/bin/batch/sendbatches myfeedsite

            # expire C-news
            59 0       * * * /usenet/sw/news/bin/expire/doexpire

            # Rapports si ncessaire
            10 5       * * * /usenet/sw/news/bin/newsdaily
            00 5       * * * /usenet/sw/new/bin/newswatch

            # Arrte l'arrive des news de 6:30AM  4:00 PM
            30 6       * * * /usenet/sw/news/bin/input/newsrunning off
            00 16      * * * /usenet/sw/news/bin/input/newsrunning on
  ______________________________________________________________________





  44..22..  IInntteerrNNeettNNeewwss ((IINNNN))

  INN est le nouveau-venu de la scne, mais il gagne en popularit en
  mrissant. Son principal intrt est sa rapidit et le fait qu'il
  contient un paquage nntp intgr. Son principal dfaut est qu'il est
  nouveau et son installation et excution sur l'un des nombreux "*nix
  standard" peut tre prilleuse. De plus, il opre par un daemon (innd)
  toujours prsent et un daemon supplmentaire pour raliser
  l'indentation. Le march semble donc tre la mmoire contre la
  vitesse.

  J'ai fait tourner l'arrive de news jusqu' 5 Mb par nuit avec INN au
  travers d'UUCP sur un 386  33 MHz avec 8 Mb de RAM (normalement sans
  XWindows) avec un modem 14.4 sans aucun problme.

  Les nouveaux administrateurs Usenet ne devraient probablement pas
  essayer INN jusqu' ce qu'ils aient de l'exprience avec B-News ou
  Cnews. Puisqu'il est rapide et sr sous Linux, il est sous-document
  pour l'administrateur news dbutant (cependant en pratique il est
  simple  faire tourner ds que vous avez compris).

  INN est trs particulier avec les permissions. Ne vous en inquitez
  pas.

  INN est galement trs particulier sur la "qualit" du TCP/IP avec
  lequel il doit marcher. Linux n'est pas forcment prsent  ce moment
  l, il est donc recommand que vous preniez une distribution
  spcifique  Linux  partir de l'un des sites archive Linux classique.


  44..22..11..  IInnssttaalllleerr IINNNN

  ( par Arjan de Vet - devet@info.win.tue.nl )

  J'ai crit un patch et un kit de configuration pour avoir INN 1.4
  tournant sous Linux. Ils peuvent tre trouvs sur:
  ftp.win.tue.nl:/pub/linux/ports/inn-1.4-linux.tar.gz.

  INN dpend fortement d'un bon substitut pour /bin/sh . J'utilise une
  version bta de bash 1.13 qui est dornavant accessible pour Linux
  dans les sites classiques. bash 1.12 a quelques problmes avec les
  newsgroups qui ne sont pas proprement rcuprs (il y a peut-tre
  d'autres problmes, je ne me rappelle plus).


  44..22..22..  CCoonnffiigguurreerr IINNNN

  Suivez les indications d'Arjan et vous devriez russir. Voici le
  rsum de ce qu'il y a  faire:

    Dans le fichier config.data, vrifiez que vous avez
     "HAVE_UNIX_DOMAIN DONT";

    Ajoutez le hostname du systme sur lequel tourne innd  hosts.nntp
     . Pour un site bas uniquement sur uucp, il s'agit du nom de votre
     site;

    Vrifiez que vous n'avez PAS de ligne pour nntp dans
     /etc/inetd.conf;

    Vrifiez que vous avez une variable pour le shell de inn qui donne
     "HAVE_UUSTAT DO" plutt que le "DONT" de cet exemple, si vous avez
     install uustat du paquetage Taylor UUCP. Si vous avez mal dfini
     cela, il en rsultera que les news ne seront pas envoyes
     automatiquement;

    Si vous utilisez INN, dfinissez dfinitivement le syslogd
     recommand car c'est trs, trs utile !

  Il y a une FAQ spectaculaire (!!!!) sur INN qui est poste
  mensuellement. Regardez sur rtfm.mit.edu:/pub/usenet-by-
  hierarchy/news. Vous en serez heureux.

  44..22..33..  MMaaiinntteenniirr uunn ssiittee IINNNN

  J'ai trouv qu'il n'y avait rien d'autre  faire pour maintenir un
  site INN sous Linux qu'avoir un cron fonctionnel. Vous devez
  simplement avoir une crontab qui ressemble  la suivante:


       ______________________________________________________________________
                 # maintenance quotidienne, fait galement expirer les donnes
                 # et les articles du .overview
                 1 0 * * * /usenet/sw/inn/bin/news.daily expireover delayrm < /dev/null

                 # pour envoyer en dehors
                 5 * * * * /usenet/sw/inn/lib/send-uucp
       ______________________________________________________________________




  (si vous changez pour batch 1.13, le "< /dev/null" n'est pas
  ncessaire)


  44..33..  AAuuttrreess oouuttiillss ddee ttrraannssppoorrtt ddee NNeewwss

  Ce qui suit est une liste non-exclusive des autres logiciels de
  transport de news connus pour tourner sous linux:

    dynafeed

    nntp1.5.11

    slurp1.05


  55..  LLeecctteeuurrss ddee NNeewwss

  Il n'y a pas de "vrai lecteur de news". En consquence, il y a de
  nombreux lecteurs de news trs connus qui peuvent tre facilement
  ports sous Linux. Au moment o j'cris ces lignes, "tin", "trn", et
  "nn" sont les plus communs disponibles dans les distributions de Linux
  et le newspak.

  Lorsque vous choisissez un lecteur de news, vous dsirez
  principalement quelque chose de facile  utiliser, trs configurable
  par l'utilisateur, avec indentation et fichiers de suppression (pour
  slectionner les articles intressants et faire disparatre ceux qui
  ne le sont pas).

  Vous pouvez configurer vos chemins pour ce que vous voulez, tant que
  le lecteur de news peut trouver "inews" de votre installation de Cnews
  ou INN et un programme "mail" pour envoyer des rponses aux articles.

  Cette section traitera brivement de quelques uns des plus populaires.
  Avant que vous ne posiez la question, j'utilise "nn" pour beaucoup de
  raisons :-)


  55..11..  TTiinn

  Tin est un lecteur de news indent gnralement dcrit comme facile
  d'utilisation pour les nouveaux utilisateurs. Il supporte les fichiers
  de suppression et l'indentation NOV. Si vous utilisez INN, il lira par
  dfaut les fichiers NOV .overview et n'crira pas de fichiers d'index.

  Pour compiler tin sous linux, vous devrez juste diter le makefile
  pour configurer l'emplacement des logiciels (principalement celle de
  inews) et taper"make linux". Tin ne requiert pas de patch pour tourner
  sous linux.

  Pour l'indentation, vous devrez juste mettre "tin -u" pour mettre 
  jour les fichiers d'index.

  Pour activer la possibilit de lecture via NNTP, compilez le avec
  "NNTP_ABLE" dfini. Il en rsultera un fichier nomm "tin" pour la
  lecture locale et un fichier nomm "rtin" pour la lecture via NNTP.
  "tin -r" donnera aussi le mme effet que "rtin".

  Iain Lea recommande l'entre suivante dans la crontab et ajoute que
  vous devrez faire un "make daemon" pour compiler "tind".


       ______________________________________________________________________
                 # indexe la base de donnes
                 35 * * * * /usenet/bin/tind -u
       ______________________________________________________________________




  J'ai lanc tin au travers d'une liaison SLIP comme lecteur de news par
  NNTP. Si vous tes connect  un systme comprenant tous les
  newsgroups, vous deviendrez extrmement vieux en attendant le
  chargement du fichier "active".


  55..22..  TTrrnn//MMtthhrreeaaddss

  "Trn" est un driv en index du lecteur "rn". Trn 3.2 et plus rcents
  ont la sympathique capacit de choisir entre les indexations
  "mthreads" (le paquetage d'indexation de trn) ou "NOV" (indexation par
  INN).

  Pour le compiler, lancez juste le script Configure et prenez les
  options par dfaut. Vous devrez avoir au moins la libc 4.4.1 et bash
  1.1.13 pour lancer sans problmes Configure.

  La distribution newspak sur sunsite contient des fichiers de
  configuration effectifs pour trn sous linux.

  Il est probablement indsirable d'essayer d'diter le script de
  configuration  la main  moins que ce ne soit pour changer quelque
  chose de *TRES* simple, comme changer les chemins pour indiquer vos
  prfrences. Si vous faites cela, vous devrez lancer un "Configure -S"
  avant de faire "make depend", "make" et "make install".

  Alors que "Configure" plante avec Linux sous bash 1.12, "Configure -S"
  marche correctement, donc si vous prenez le config.sh de newspak comme
  point de dpart, vous serez trs tranquille.

  Pour compiler pour une lecture par NNTP, il suffit de rpondre "yes"
  lorsque Configure vous demande si vous dsirez cette option (en
  supposant que Configure tourne sur votre systme). Une prochaine mise
   jour du newspak devrait inclure un config.sh pour la lecture NNTP
  comme celui pour la lecture locale, pour tous ceux d'entre nous qui
  sont encore avec un "bash impair" :-)

  J'ai lanc trn au travers d'une liaison SLIP comme lecteur de news par
  NNTP. Si vous tes connect  un systme comprenant tous les
  newsgroups, vous deviendrez extrmement vieux en attendant le
  chargement du fichier "active" et pour l'indexation des articles.

  Il y a des douzaines d'options en lignes pour obtenir toutes sortes de
  contextes. Lisez la man page "trn" pour plus de dtails. J'utilise un
  truc sympa pour configurer toutes les options facilement:

    Crer un fichier  /.trnrc

    ajouter export TRNINIT=" /.trnrc"

  La version actuelle de newspak contient une copie de mon .trnrc 
  titre d'exemple.

  trn 3.2 et suivants ont le support pour l'indexation NOV ou mthreads
  slectionnable par l'utilisateur. Ainsi, je recommande de compiler le
  logiciel avec les deux sortes d'indentation (c'est une question dans
  Configure). Pour en slectionner un au lancement, essayez "trn -Zo"
  pour NOV et "trn -Zt" pour mthreads.

  Pour construire la base de donnes mthreads, essayez quelque chose
  comme ceci dans le "news" crontab:


       ______________________________________________________________________
                 # indexe la base de donnees trn
                 35 * * * * /usenet/bin/mthreads all
       ______________________________________________________________________





  55..33..  NNNN

  La distribution newspak de sunsite contient des fichiers de
  configuration valables pour linux pour nn 6.4.18, vous pouvez donc les
  mettre en place et taper "make". Ils fonctionnent aussi pour la beta
  6.5b3 de la prochaine nn 6.5.

  La compilation termine, vous devrez faire ceci:

    lancer le programme "inst" pour tout installer

    initialiser la base de donnes

    rendre actif nnmaster

  Voyez la doc de nn pour les dtails. Compiler, configurer, et faire
  tourner nn sous Linux n'est pas diffrent de le lancer sous un autre
  *nix, avec l'exception que vous devrez lancer nnmaster en tant
  qu'entre cron plutt qu'en tant que daemon. Si vous le lancez en tant
  que daemon sous linux, il peut agir imparfaitement (l'effet rseau est
  de toutes faons le mme en le lanant par cron).

  Le support de nnnn se fait par l'entre suivante dans la crontab:


       ______________________________________________________________________
                 # lance nnmaster pour rcuprer le travail d'nn
                 # (inutile si vous utilisez NOV d'INN de nn-6.5beta3)
                 25 * * * * /usenet/sw/nn/lib/nnmaster

                 # Rend obsolte la base de donnes de nn
                 # (inutile si vous utilisez NOV d'INN de nn-6.5beta3)
                 0  4       * * * /usenet/sw/nn/bin/nnadmin =EYW

                 # prpare une copie du fichier active pour "nngoback" et
                 # conserve les 7 derniers
                 0 3 * * * /usenet/sw/nn/lib/back_act 7
       ______________________________________________________________________




  J'ai quelque peu essay de lancer nn en tant que lecteur de news NNTP
  au travers d'une connexion SLIP. Dans ce cas, vous devrez diter
  prcisment le fichier config.h . Voyez les commentaires dans le
  fichier pour avoir des dtails. Lorsque vous lancez nn en tant que
  lecteur NNTP, celui-ci lance une copie locale de nnmaster pour
  conserver l'index sur le systme local, en sorte que la slection des
  articles est trs rapide (vous devrez cependant videmment attendre un
  peu pour recevoir le texte de l'article si vous utilisez SLIP par
  modem).

  La nouvelle version (6.5.x) de nn a le support des bases de donnes
  NOV d'INN qui rendent inutile le lancement d'nnmaster pour vous. Cette
  configuration est trs recommande, puisqu'en rsultat vous n'aurez
  pas  utiliser de temps processeur pour lancer nnmaster, et vous
  n'aurez pas de base de donne et d'articles news hors d'atteinte.


  55..44..  AAuuttrreess lleecctteeuurrss ddee nneewwss

  Ce qui suit est une liste incomplte de lecteurs de news dit pouvoir
  tre installs et lancs sous Linux:

    tass

    xrn

    gnus


    (NdT: on peut rajouter Netscape)


  66..  RReemmeerrcciieemmeennttss

  Les personnes suivantes m'ont aid  rassembler les informations (et
  l'exprience) qui ont rendu possible l'existence de ce document:

  Ed Carp, Steve Robbins, Ian Taylor, Greg Naber, Matt Welsh, Iain Lea,
  Arjan de Vet.

  Si j'ai oubli quelqu'un, je m'en excuse.


  77..  FFAAQQ ssuurr UUSSEENNEETT ((dduu mmooiinnss ssuurr cc..oo..ll..** ))

  77..11..  PPoouurrqquuooii nnee ppuuiiss--jjee ppaass ppoosstteerr ddaannss lleess ggrroouuppeess mmooddrrss ??

  Probablement parce que le lecteur de news essaye d'appeler /bin/mail
  pour envoyer le mail et il n'apprcie pas. Remplacez le /bin/mail des
  vieilles versions de SLS avec le port de mailx-5.5 d'une slackware
  rcente et utilisez l'outil pkgtool pour installer le kit et tout sera
  configur.

  Une autre possibilit est que vous auriez un groupe modr configur
  comme un groupe non-modr et quelque chose supprime tranquillement
  l'article du flux. Vrifiez en lanant un cchheecckkggrroouuppss ds maintenant
  et que les articles des news passent en news.admin pour quelques
  semaines.


  77..22..  PPoouurrqquuooii sseemmbbllee--tt--iill yy aavvooiirr ddeess pprroobbllmmeess ddee ppeerrmmiissssiioonnss ??

  Parce qu'il y en a :-)

  Vrifiez que vous avez les bonnes permissions et que vous avez un
  utilisateur et un groupe news dans /etc/passwd et /etc/group qui
  correspondent  la distribution binaire que vous avez prise. Il
  semblerait ne pas y avoir de standard pour les comptes couramment
  disponibles sous Linux.

  Tout ce qui se trouve dans /usr/local/lib/news doit tre plac
  news.news sauf /usr/local/lib/news/setnewsids qui doit tre indiqu
  root.

  Vous pouvez utiliser ce que vous voulez comme UID et GID pour news.


  77..33..  nn''aappppaarraaiisssseenntt ppaass oouu ddiissppaarraaiisssseenntt ddaannss lleess fflluuxx ??  PPoouurrqquuooii
  ppuuiiss--jjee ppoosstteerr ddeess aarrttiicclleess llooccaalleemmeenntt,, mmaaiiss qquu''iillss

  Probablement parce que vous n'appelez pas newsrun par cron.  Peut-tre
  parce que vous avez mal dit le fichier systme. Peut-tre parce que
  vous n'avez pas d'arbre /usr/spool/news/out.going ou approchant.
  Peut-tre parce que vous avez pris les distributions 'Performance' ou
  'Cleanup' de Cnews, qui automatisent certaines tches et ncessitent
  'newsrun' lanc par la crontab pour rcuprer les news d'autres sites
  et pour les voir localement.

  Ne crez pas de newsgroups en ditant les fichiers active ou sys.
  Utilisez les outils de /usr/local/lib/news/bin/maint pour le faire.





  77..44..  PPoouurrqquuooii mmaa ddiissttrriibbuuttiioonn bbiinnaaiirree nnee ddiissppoossee ppaass ddee nnnnttpp ??

  Parce que ceci est suppos tre plug-and-play sous Linux et parce que
  je ne veux pas rendre la distribution SLS deux fois plus grosse
  qu'elle n'est dj en ayant  maintenir les versions nntp et non-nntp
  des programmes de lecture et de transport des news.  Egalement, parce
  qu'il est compil avec des informations localises qui ne sont pas
  rouvrables au lancement via un fichier de config.


  77..55..  aalloorrss qquu''iill yy aa bbeeaauuccoouupp ddee ppllaaccee ??  PPoouurrqquuooii ddooeexxppiirree ((oouu
  rreellaayynneewwss oouu....)) mmee ddiitt ""sseevveerree ssppaaccee sshhoorrttaaggee""

  Parce qu'il ne peut lire /etc/mtab. Mettez le en mode 644. Ceci arrive
  quand vous 'umount'-ez un systme de fichiers mont par
  l'administrateur avec un umask ne permettant pas la lecture par toute
  personne de fichiers possds par l'administrateur.


  77..66..  PPoouurrqquuooii,, aalloorrss qquuee ttoouutt sseemmbbllee nnoorrmmaall,, ll''eennvvooii nnee ssee ffaaiitt ppaass ??

  Les vieilles versions de Linux ont un sed "cass" qui rendait Cnews
  trange. En particulier, si vous avez install une vieille SLS,
  vrifiez dans /bin et /usr/bin que vous avez seulement une copie de
  sed et que celle-ci est rcente.

  A cause de la 'Performance Release' aux alentours de fvrier 1993,
  vous devrez avoir newsrun lanc priodiquement par cron pour que les
  choses se droulent normalement. C'est un tat qui surprend
  apparemment beaucoup de monde.


  77..77..  PPuuiiss--jjee uuttiilliisseerr llee NNeeww NNeewwss OOvveerrvviieeww ((NNOOVV)) ddee ttiinn//ttrrnn//nnnn ppoouurr
  rreemmppllaacceerr lleess ddiivveerrsseess bbaasseess ??

  Oui. trn , tin, et la bta de nn le supportent maintenant.

  Vous pouvez utiliser celle des Releases 'CleanUp' et 'Performance' de
  Cnews, ainsi que celle d'autres lecteurs.


  77..88..  PPoouurrqquuooii nnee ppeeuutt--oonn aavvooiirr ddee ddiissttrriibbuuttiioonn bbiinnaaiirree ddee NNNNTTPP ??

  Car certaines informations sont uniquement locales et sont inclues
  dans la compilation, et ne peuvent tre dtermines "magiquement" au
  lancement.




















  un compte) Mthode de messagerie off-line pour Linux
  (Adresses e-mail off-line avec
  Gunther Voet, freaker@tuc.ml.org - Belgium (CompuMed/TuCSRV)
  Traduction par Thierry Le Quau ThierryLeQueau@wanadoo.fr
  v1.3.2, 7 February 1998

  Utilisez votre systme de messagerie Linux hors connexion, recevez du
  courrier pour plusieurs utilisateurs avec seulement une adresse e-
  mail, et sans tre connect 24/24.  Si vous n'avez pas les moyens de
  payer une ligne directe pour tre connect 24/24 et voulez quand mme
  que vos utilisateurs recoivent leur courrier dans leur bote  lettre
  Linux; au lieu de payer un service de diffusion multi-utilisateur 
  votre fournisseur d'accs, vous pouvez utiliser ce systme pour redis
  tribuer aux diffrents comptes utilisateur le courrier en utilisant
  une seule adresse e-mail. Vous pouvez y avoir accs 24/24 depuis le
  serveur o vous avez votre compte pour recevoir votre courrier.  ``Ce
  howto est Copyright (c)1997-98 par Gunther Voet.''
  ______________________________________________________________________

  Table des matires














































  1. Prface.

     1.1 D'un point de vue lgal.
     1.2 Copyrights
     1.3 Ractions.
     1.4 Distribution.
     1.5 Corrections.
     1.6 Qu'est-ce que j'utilise ?
     1.7 Remerciements  ...

  2. Preliminaires.

     2.1 Prface & Description
     2.2 L'intrt d'une telle chose ...
     2.3 Les choses  connatre.
     2.4 Il y a deux voies diffrentes...

  3. Vos besoins.

     3.1 Une machine sous Linux
     3.2 Un compte supplmentaire sur votre machine sous Linux.
     3.3 Fetchmail
     3.4 Procmail
     3.5 Un compte e-mail.
        3.5.1 Un enregistrement DNS (MX).
        3.5.2 Faire suivre le courrier de compte  compte :)

  4. Bon, j'ai tout ce qu'il me faut, et maintenant ?

     4.1 Cration du fichier .fetchmailrc
     4.2 Cration du fichier .procmailrc
        4.2.1 Pour la distribution par le destinataire (m(A)):
        4.2.2 Pour la distribution avec comme "sujet: touser" (m(B))
     4.3 Il n'y a pas d'abonn ... (fichier nosuchuser)
     4.4 Fichier "crontab".
        4.4.1 Vrification du courrier
        4.4.2 crontab
     4.5 Chez votre fournisseur d'accs.
        4.5.1 (Ancienne version de sendmail) ajoutez les lignes suivantes au fichier sendmail.cf
        4.5.2 (Nouvelle version de sendmail) Ajoutez ces lignes au fichier sendmail.cf
        4.5.3 (Nouvelle version de sendmail) Editez le fichier /etc/sendmail.cw
        4.5.4 Crez un fichier /etc/maildomains file
        4.5.5 Au travail !

  5. Automatisation

     5.1 La structure.
        5.1.1 Le fichier de pre-routine ".procmailrc-header"
        5.1.2 Le fichier de post-routine ".procmailrc-footer"
     5.2 Script d'ajout de bote  lettre

  6. A l'aide ! (Sic)

     6.1 Le script d'automatisation ne fonctionne pas:
     6.2 Qu'est-ce que vous entendez par serveur de mail anonyme ?
     6.3 Mon chat est mort
     6.4 Mon chien est mort
     6.5 Linux?
     6.6 Pouvez vous m'aider  trouver un compte ?
     6.7 Pourquoi avoir enlev " peut-tre que plus tard je rajouterais quelques commentaires ..." ?
     6.8 Comment puis-je obtenir un "domaine" ?
     6.9 Pourquoi tes-vous un enc... en utilisant cette mthode ?
     6.10 Le fichier "nosuchuserfile" ?
     6.11 Est-ce que mes utilisateurs peuvent crire et envoyer du courrier ?
     6.12 Est-ce que chaque utilisateur a besoin d'un compte shell sur mon serveur ?
     6.13 sans objet
     6.14 l'ajout de courrier ?
     6.15 Pourquoi tes-vous si cruel ?
     6.16 Avez vous eu des plaintes  propos de langage excessif ?
     6.17 Pourquoi ce HowTo est-il si diffrent des autres ?
     6.18 Localement mon domaine fonctionne, mais semble rien recevoir de l'extrieur.
     6.19 Mon chien est mort

  7. The End



  ______________________________________________________________________

  11..  PPrrffaaccee..

  Dans ce chapitre je veux juste me mettre  l'abri de tous dommages et
  de retour de flamme - mme si je peux avoir tort ...Si vous avez des
  questions ou suggestions  rajouter aux FAQ ainsi que les erreurs que
  vous pourriez trouver, voir la section concerne plus loin ...

  Nota : tous les noms et types de fichier sont repertoris ainsi :


       (*** < file > *** text ***)     .procmailrc


  Il s'agit donc d'un fichier .procmailrc contenant du texte. La
  variable texte peut aussi tre code. Cela pour dfinir le nom du
  fichier  utiliser.  S'il n'y a pas de chemin, vous pouvez le choisir
   votre convenance (dans la plupart des cas ces fichiers rsident dans
  le rpertoire de l'utilisateur comme /home/mailer).


  11..11..  DD''uunn ppooiinntt ddee vvuuee llggaall..

  Ni l'auteur, ni les distributeurs de ce HowTo ne peuvent tre tenu en
  aucun cas pour responsable des dommages physiques, financiers ou
  moraux qui pourraient rsulter de l'application des suggestions ou
  exemples de ce texte.  L' information contenue dans ce document est la
  quintescence de mon savoir et de mon exprience, mais je peux encore
  faire des erreurs dans les informations ou les exemples. Chaque marque
  commerciale est la proprit de son dtenteur respectif (je ne veux
  pas faire de commerce ici - mais, bon - SI je veux rajouter quelque
  chose, je n'aurais pas besoin de modifier cette dclaration). Si votre
  chat meurt sous la charge de ce document, je n'en suis pas plus
  responsable ...


  11..22..  CCooppyyrriigghhttss

  Ce document et son contenu sont copyright (c)1997-98 de Gunther Voet.
  Toute reproduction non autorise sous toute forme que ce soit est
  explicitement autorise et mme chaudement encourage tant que vous
  n'en changez pas le contenu sans contacter l'auteur (Gunther Voet). Si
  vous utilisez ce document en entier ou en partie, vous devez y inclure
  une allusion au copyright ou un lien vers le HowTo complet." Les
  droits de copie des documents Howto sont rgits par leurs auteurs
  respectifs. Le "HowTo Copyright" donnera les directives de copie pour
  ce document. S'il est utilis dans un but commercial, l'auteur doit en
  tre averti. Les exceptions  ce copyright doivent tre demand 
  l'auteur par lettre ou par e-mail. Pour plus d'information sur le
  standard de diffusion des HowTo contacter gregh@sunsite.unc.edu.

  *SVP* *SI* vous voulez crer un systme bas sur ce HowTo, pensez 
  mon copyright :) heh... - je ne suis pas mchant :)).  Bien sr en
  tant qu'addon - PAS pour le programme de mail lui-mme - bien que ce
  soit agrable d'y tre inclus :))Je peux toujours avoir une adresse
  supplmentaire pour tre encore plus critiqu :)) (je plaisante).


  11..33..  RRaaccttiioonnss..

  J'espre que ce HowTo vous sera utile ainsi qu' tous ceux qui le
  voudront.  Si vous avez des suggestions, commentaires ou corrections (
  excepts les injures  :) ) - svp expdiez les moi  freaker@tuc.ml.org
  et j'en ferai la mise  jour pour la prochane version. Si vous
  publiez ce document dans un but commercial, une copie supplmentaire
  sera apprcie - vous pouvez me l'envoyer  mon adresse postale. Pour
  les critiques - vous pouvez me les expdier, mais elle finirons dans
  le rpertoire /dev/null ...  aussi - ce n'est pas la peine encombrer
  la bande passante avec ! En plus je peux empcher certains
  utilisateurs de recevoir des e-mail (expliqu dans ce document) (evil
  grin). Mon surnom est "freaker btw" :) ). Vous pouvez toujours essayer
  freaker@ibm.net.


  11..44..  DDiissttrriibbuuttiioonn..

  La dernire version de ce document peut tre tlcharge  l'adresse:

  http://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Offline-Mailing

  -et-

  http://tuc.ml.org/om/

  (essayez aussi  : http://tuc.ml.org)



  11..55..  CCoorrrreeccttiioonnss..


   v1.0.0        - Premire version, test interne, nous l'avons essay avant de
                   vous le donner :) ..  depuis il devient oprationnel et a
                   besoin de travailler ? vrai ? :)
   v1.1.0        - Corrections de nombreuses erreurs dans le texte, ajout de
                   nouveaux chapitres
                 - Corrections de quelques petites erreurs et typographie ...
   v1.2.0        - Corrections d'erreurs grammaticales
                 - Addon du chapitre "Qu'est-ce que nous utilisons ? "
                 - Addon de l'adresse de Sunsite
   v1.3.0        - Addon du support courrier virtuel pour l'administrateur
                 - Nouveau site et adresse e-mail
                 - Remerciements  ..
   v1.3.1        - Conversion au format sgml et corrections d'erreurs mineures
   v1.3.2        - Corrections d'erreurs majeures ( nom de fichier .fetchmailrc
                   vers .procmailrc) etc. (merci  Tetsu Isaji)
                 - Addon douveau support pour "Sendmail" v 8.8.0+
                 - Corrections d'erreurs mineures
                 - Mise  jour de mon systme YAY !
                 - La version japonaise arrivera bientt, je vous signalerais
                    son emplacement ds que je le connatrai ...
                    (merci  Tetsu Isaji)




  11..66..  QQuu''eesstt--ccee qquuee jj''uuttiilliissee ??

  J'utilise Linux 2.0.30, un Pentium 166, carte ATI pci-mach64, Metro-X
  et une connexion internet par mon fournisseur d'accs (actuellement
  ibmnet) via ppp en utilisant un modem ZyXEL 28 800 bauds, et de temps
  en temps un Bausch 28 800.

  Maintenant j'ai mis  jour mon noyau  la version 2.0.33, install un
  modem USRobotics, il fonctionne encore comme il le devrais :) (tout le
  monde devrait mettre  jour leur version Linux ds qu'il sort un patch
  :) croyez moi:) a vous pargnera beaucoup de temps et de recherche
  d'erreur en le faisant :).


  11..77..  RReemmeerrcciieemmeennttss  ......


    Fred, durban.hebel.net (pour autoriser les pages & bot)

    Lifesaver, parkside.net ( pour la validation des nouvelles pages,
     aide pour la foire aux questions de la messagerie, depuis a marche
     ici et l ... faites une visite  son ciber-caf ... leur caf est
     super bon :) )

    L'administrateur systme de lodus.net pour la maintenance de ce
     projet.


  22..  PPrreelliimmiinnaaiirreess..

  Bon, comment fonctionne ce systme? Qu'est-ce que vous pouvez faire
  avec ?  Quoi d'autres ? Et ai-je besoin de le lire ? A toutes ces
  questions - j'ai une rponse.



  22..11..  PPrrffaaccee && DDeessccrriippttiioonn

  Ce HowTo est ddi  tous les utilisateurs de mailing offline sous
  Linux...  Vous tes un groupe, ou une organisation, et vous voulez que
  tous vos membres aient une adresse e-mail, sans pour autant payer pour
  un accs direct 24/24 ou un compte pour chaque utilisateur.... Ou vous
  avez un rseau interne - avec un serveur camoufl et vous voulez  que
  tous les utilisateurs aient une adresse e-mail, vous pouvez utiliser
  cette mthode pour le faire. Personnellement je l'utilise pour fournir
  aux utilisateurs et membres de mon groupe de dmo un compte e-mail
  sans tre 24/24 connect, puisque c'est  but non lucratif - et nous
  n'avons pas beaucoup d'argent pour nous payer un ligne directe avec un
  accs e-mail permanent - et diffrentes adresses IP.  Tous ont une
  adresse e-mail, mme s'ils n'ont pas accs  internet. Le seul  avoir
  un accs internet peut recevoir leur courrier  leur adresse
  personnelle - via le systme dcrit ci-dessous.  Vos utilisateurs
  peuvent expdier leur courrier comme ils ont l'habitude de le faire,
  et votre systme grera les diffrentes boites aux lettres. La seule
  chose qui change pour les utilsateurs est l'ajout de leur adresse e-
  mail dans l a ligne du sujet ou de l'entte suivant la mthode
  choisie.


  22..22..  LL''iinnttrrtt dd''uunnee tteellllee cchhoossee ......


    Permettre de contacter tous les membres d'une organisation par
     adresse e-mail si ncessaire.

    Un service de mail anonyme - ils ne peuvent lire votre "mail setup
     file" - aussi ils ne peuvent savoir o le courrier est retransmis
     ou suivi.


    Un club qui n'a pas assez de sou (ne riez pas), ou qui est gratuit,
     et ne veut pas dpenser de l'argent pour a (eh eh) - et qui veut
     quand mme fournir une adresse e-mail  chacun de ses membres.

    Un rseau camoufl - avec un serveur connect sur le net, dont les
     utilisateurs ont besoin d'avoir compte e-mail.

    Vous voulez retransmettre certains documents automatiquement -
     comme je le fais avec mon HowTo, statistiques, ou documents ...
     comme "info@yourmail.dom" ou "document@yourmail.dom".

    Vous avez seulement besoin d' un compte chez votre fournisseur
     d'accs, pour les +200 comptes e-mail que vous pouvez crer sur
     votre serveur.

    J'utilise la mthode B avec plus de 300 comptes e-mail avec un
     serveur perso  base de 486DX4-100 et le tout fonctionne en une
     minute.


  22..33..  LLeess cchhoosseess  ccoonnnnaattrree..


    Tous les serveurs de mail (gratuit ou non) ne sont pas contents
     quand vous faites leur boulot chez vous, ou mettez en place un
     serveur anonyme, aussi SVP essayez de contacter votre
     administrateur rseau avant de le faire.

    C'est un moyen moins rapide qu'une connection on-line 24/24 puisque
     vous devez vous connecter pour distribuer le courrier.

    Cette mthode  besoin d'un administrateur pour grer la
     distribution du courrier et ajouter des utilisateurs ... a vous
     donnera un peu de boulot ce n'est pas automatique ! (je l'ai rendu
     semi-automatique sur mon serveur vous pouvez essayer de faire de
     mme).

    Une bonne bande passante et un espace virtuel consquent chez votre
     fournisseur d'accs est indispensable quand vous avez plusieurs
     utilisateurs ... et soyez sr d'y avoir assez de place quand vous
     expdiez les fichiers.

    Tout le courrier sera transfr en une seule fois - aussi - le
     dernier message que vous recevrez sur votre serveur sera aussi le
     dernier que vous aurez expdier. "Premier entr -  premier sorti".

    Dans la premire mthode (to : ) il n'y a pas de problme avec les
     noms des diffrents utilisateurs - mais dans la seconde mthode -
     vous ne pouvez pas donner de sujet puisqu'il sera utilis pour la
     dlivrance  son destinataire. Beaucoup d'utilisateurs oublient
     d'utiliser le sujet du message... - ou ils ont besoin de le savoir
     clairement.

    Si vous vrifiez souvent votre messagerie sur le serveur, (par
     exemple 4 fois par jour) - le courrier sera distribu  son
     destinataire au moins toutes les 6 heures. Aussi le traitement
     devient presque rgulier.

    Vous POUVEZ l'utiliser galement lorsque vous avez un accs
     permanent :) et lui faire vrifier le courrier toutes les XX
     minutes. Mais  - quand vous tes connect - pourquoi utiliser un
     autre serveur ? et pourquoi ne pas avoir alors votre propre
     domaine ? (fric).



  22..44..  IIll yy aa ddeeuuxx vvooiieess ddiiffffrreenntteess......


  1. methode 'A' - que nous appellerons "(m(A))".

     Le systme de courrier vrifie le destinataire du message d'aprs
     le "to:".  C'est la meilleure mthode puisque c'est l'adresse e-
     mail relle . Vous avez besoin d'un autre compte sur un serveur ET
     avez besoin'une entre DNS (MX) (votre propre domaine en
     l'occurrence). Si l'administrateur systme veux bien vous aider,
     alors il n'y aura aucun problme ! Il redirigera TOUS les messages
     envoys au nom de votre domaine sur votre compte ! Cela lui prendra
     du temps pour le faire :) aussi soyez sympa avec lui :)) Merci 
     mon administrateur systme (Fred) j'ai  obtenu un nom de domaine et
     le service utilisateur pour mon groupe de dmo. Il se peut qu'une
     entre DNS vous cote quelque chose,aussi vous aurez  voir si a
     vous convient ou non.

  2. methode 'B' - que nous appellerons "(m(B))".

     Le programme va voir la ligne du sujet, et transfre le courrier
     vers l'utilisateur concern. Si l'utilisateur n'est pas trouv, il
     renverra un message. Cela demande un serveur POP avec un seul
     compte, et vous n'avez pas besoin de votre propre entre DNS ou
     vous n'avez pas besoin d'tre gentil avec votre administrateur
     systme pour qu'il vous arrange votre adresse e-mail :). J'ai
     utilis cette mthode la premire fois pendant prs d'un an... je
     sais que c'est un peu truander, mais je ne vous ai pas dit que vous
     deviez utiliser cette mthode, aussi ne me tirez pas dessus -
     alors que je suis juste en train de vous fournir des solutions pour
     vos problmes de messagerie :) - vous pouvez utiliser la mthode A
     qui est elle rglo !


  33..  VVooss bbeessooiinnss..

  Bon, vous avez besoin (bien sr) d'une bcane sous Linux, qui peut se
  connecter  internet - Ok ! (que je suis bon - que je suis bon ! :)) -
  vous avez probablement un modem, pas vrai ? Une ligne tlphonique -
  ou n'importe quel moyen de vous connecter  votre fournisseur d'accs.
  Vous avez besoin aussi de quelque software comme Fetchmail, Procmail,
  un compte supplmentaire, et votre compte e-mail ou d'une entre  DNS
  avec un compte e-mail.


  33..11..  UUnnee mmaacchhiinnee ssoouuss LLiinnuuxx

  Ca peut-tre n'importe quelle bcane... mme un 8086... - mais il est
  prfrable -  puisqu'il y aura quelques chargements  effectuer -  de
  possder au moins un 386 :) plus votre babasse ira vite, plus votre
  logiciel sera rapide (pas vrai ?) :).


  33..22..  UUnn ccoommppttee ssuuppppllmmeennttaaiirree ssuurr vvoottrree mmaacchhiinnee ssoouuss LLiinnuuxx..

  Vous avez besoin de crer un compte supplmentaire sur votre systme.
  J'utilise pour mon exemple  mailservice . Cpeut tre aussi bien
  "mailserver" ou "mailtousers" - bref un nom que vous reconnaitrez !

  ! Vous n'avez pas besoin d'tre logu root !

  Ce compte vous servira  attribuer tous les messages aux diffrents
  destinataires de votre systme, ou les envoyer vers l'extrieur :)).
  Crez-le juste comme simple utilisateur. Vous aurez besoin de faire
  des tests sur ce compte, et l'administrateur du courrier peut
  l'utiliser pour le distribuer sans
  tre pour autant root -  c'est bien plus sr !


  33..33..  FFeettcchhmmaaiill

  J'utilise la version 1.9 avec le patch 9... je l'ai trouv  l'adresse
  et j'utilise seulement ce programme de mail dans mon exemple -   vous
  de voir si vous en prfrez un autre, vous tes seul juge ! Pour ma
  part il me satisfait :). Si vous le voulez plus personnalis vous
  devrez consulter le manuel de Fetchmail :).  Il peut tre install
  comme root aussi bien que comme simple utilisateur...  le mieux est de
  l'installer comme root :) puisque je suis sr qu'il fonctionne bien
  :).


  33..44..  PPrrooccmmaaiill

  J'utilise la version 3.10 - vous la trouverez aussi  , je pense que
  c'est le meilleur mda (mail delivery agent) sur le march... Il gre
  merveilleusement et est bien mieux que l'agent par dfaut puisqu'il
  dlivre les messages utilisateur par utilisateur !  Pour
  l'installation je vous donne les mmes conseils que pour Fetchmail.


  33..55..  UUnn ccoommppttee ee--mmaaiill..

  Vous aurez toujours besoin d'un compte e-mail -   partir duquel vous
  pourrez retirer vos messages. Un serveur POP - qui vous permet de
  retirer votre courrier quand vous le souhaitez, et qui permet aux
  diffrents utilisateurs d'envoyer des e-mail 24/24. Ca peut tre aussi
  bien un service de messagerie gratuit que payant -  bien que votre
  compte e-mail soit suffisant.  Avec la mthode B (adresse dans le
  corps du sujet) vous n'avez besoin de rien d'autre -  par contre la
  mthode A (adresse dans le champ "to ") en demande un peu plus -
  suivez le guide !


  33..55..11..  UUnn eennrreeggiissttrreemmeenntt DDNNSS ((MMXX))..

  Requis pour faire fonctionner votre propre domaine de messagerie -  il
  est indispensable puisque l'administrateur de votre fournisseur ne
  peut pas utiliser son domaine  l'usage exclusif de vos utilisateurs -
  il a d'autres clients qui ont besoin aussi d'tre contacts et qui
  pourraient interfrer avec vos utilisateurs.  Et vos enttes de
  messages doivent tre filtres sur ce domaine. Ce qui vous donne un
  domaine autonome pointant sur SON domaine. Par contre a vous cotera
  un peu plus cher, ou vous pouvez demander  votre administrateur
  systme de rajouter une adresse impersonnelle pointant sur son
  serveur, cependant a doit tre un autre domaine que le sien !


  33..55..22..  FFaaiirree ssuuiivvrree llee ccoouurrrriieerr ddee ccoommppttee  ccoommppttee ::))

  Bien, l'administrateur sytme a besoin de faire suivre tous les
  messages destins  votre domaine sur votre compte... c'est une tche
  relativement aise pour lui s'il sait le faire :) ..sinon il devra
  lire le manuel du sendmail :) ( ou qmail ). Vous rcuprez votre
  courrier sur votre compte et voil ! Tous les messages seront
  redistribus sur votre propre domaine.


  44..  BBoonn,, jj''aaii ttoouutt ccee qquu''iill mmee ffaauutt,, eett mmaaiinntteennaanntt ??

  Vous avez cr votre compte supplmentaire, rcupr votre adresse e-
  mail et/ou l'entre DNS pour rerouter sur votre compte... Procmail et
  Fetchmail sont installs, ok on peut balancer la sauce ! :) on y va !
  1. Vous devez crer un fichier .procmailrc qui contiendra les infos de
     routage vers vos utilisateurs.

  2. Vous avez besoin galement de crer un fichier nosuchuserfile
     pour que l'expditeur sache que son message n'as pas t dlivr.

  3. Pour un boulot au top :) vous pouvez utiliser crontab pour vrifier
     le courrier. C'est le moyen le plus facile pour vrifier toutes les
     XX minutes si vous avez du courrier lorsque vous tes connect.


  44..11..  CCrraattiioonn dduu ffiicchhiieerr ..ffeettcchhmmaaiillrrcc

  Vous avez besoin de crer un fichier .fetchmailrc qui contiendra  les
  informations de votre service (nom d'utilisateur, mot de passe, aussi
  bien que le mda (agent de distribution de courrier) pour attribuer les
  messages.  Exemple:


       (*** < file > *** text ***)     .fetchmailrc




       ______________________________________________________________________
       server my.mail.server.com
       proto pop3
       user myaccountthere
       pass deepestsecrets
       flush
       mda /usr/bin/procmail
       ______________________________________________________________________




  Ce fichier peut tre utilis pour grer votre courrier. Testez-le en
  utilisant fetchmail (fetchmail -vv) et voyez si votre courrier est
  bien transfr ... Il devrait y avoir quelques erreurs puisque le
  fichier de contrle procmail n'a pas encore t install. Vous pouvez
  attendre de crer le fichier .procmailrc avant d'effectuer le test
  mais je vous prviens SI il y a erreur :) a PEUT provenir de ce
  fichier :). Ce fichier doit tre accessible au propritaire du compte
  (dans mon exemple : mailservice) et doit tre lisible par
  l'utilisateur mais PAS lisible par le groupe/extrieur puisqu'il
  contient le mot de passe principal :) (vous devrez changer les droits
  du fichier .fetchmailrc en 600)


  44..22..  CCrraattiioonn dduu ffiicchhiieerr ..pprrooccmmaaiillrrcc

  Ce fichier de contrle distribuera le courrier vers son destinataire.
  Il y a deux manires de le faire comme nous l'avons vu prcdemment :
  par le destinataire (to: ) et par le corps du sujet (moins rglo).  Ce
  fichier contiendra les diffrents destinataires des messages. Tous les
  commentaires prcds d'un # ne sont pas obligatoires - ils sont l
  uniquement pour vous permettre de suivre ma dmarche... Vous pouvez
  aussi changer les droits de ce fichier en 600 - le reste du monde et
  le groupe nont pas besoin de connatre ces adresses prives :)...
  L'utilisateur doit aussi en tre le propritaire (comme mailservice)
  :). Le fichier "nosuchuserfile" renvoie un e-mail  l'expditeur si le
  destinataire n'est pas trouv dans le fichier procmail (le courrier
  n'est pas distribu) - aussi l'expditeur sait que son adresse n'est
  pas valide.


  44..22..11..  PPoouurr llaa ddiissttrriibbuuttiioonn ppaarr llee ddeessttiinnaattaaiirree ((mm((AA))))::


       (*** < file > *** text ***)     .procmailrc




       ______________________________________________________________________
       # Cette ligne sert uniquement au dbogage ! Il peut-tre enlever dans un but
       # de confidentialit puisque vous aurez accs  toute la messagerie transitant
       # par votre domaine... Tous les messages seront copis dans le fichier
       # "passtrough" avant d'tre distribus aux destinataires... ici vous pouvez
       # voir ce qui ne va pas ...
       :0 c
               passtrough

       # l'e-mail avec l'entte "to: freaker@mydom.com" me sera directement dirig,
       # les autres continuerons leur chemin...
       :0
       * ^To:.*freaker@mydom.com
       ! freaker

       # l'e-mail pour root@mydom.com sera dirig vers le root... et vers
       # l'administrateur du courrier !
       :0
       * ^To:.*root@mydom.com
       ! root

       :0
       * ^To:.*postmaster@mydom.com
       ! postmaster


       # l'e-mail pour barbara@mydom.com sera distribu  barbara ET sera retransmis
       # vers son adresse prive !

       :0 c
       * ^To:.*barbara@mydom.com
       ! barbara@her.private.one

       :0
       * ^To:.*barbara@mydom.com
       ! barbara

       # Ce script renvoie un e-mail vers l'expditeur s'il n'a pas trouv le
       # destinataire dans son fichier... il enverra le fichier "nosuchuser" dans le
       # corps du message comme rponse... attention ! vous avez absolument besoin
       # d'un tel fichier ! - le mien signale : " La personne que vous essayez de
       # joindre n'est pas abonne  ce serveur, essayez  nouveau svp, il se pourrait
       # qu'elle ne soit plus prsente".
       :0
         |(/usr/bin/formail -r -k \
            -A"X-loop: mailservice@mydomain.dom "| \
              /usr/bin/gawk '{print }\
              /^/ && !HEADER \
                { system("/bin/cat nosuchuser"); \
                print"--" ;\
                HEADER=1 }' ) |\
                /usr/bin/sendmail -t


       exit
       ______________________________________________________________________


  44..22..22..  PPoouurr llaa ddiissttrriibbuuttiioonn aavveecc ccoommmmee ""ssuujjeett:: ttoouusseerr"" ((mm((BB))))


       (*** < file > *** text ***)     .procmailrc






























































  ______________________________________________________________________
  # Cette ligne sert uniquement au deboggage ! Il peut-tre enlever dans un but
  # de confidentialit puisque vous aurez accs  toute la messagerie transitant
  # par votre domaine... Tous les messages seront copis dans le fichier
  # "passtrough" avant d'tre distribus aux destinataires... ici vous pouvez
  # voir ce qui ne va pas...
  :0 c
          passtrough

  # l'e-mail avec l'entte "to: freaker@mydom.com" me sera directement dirig,
  # les autres continuerons leur chemin... si vous avez un compte ddi pour
  # recevoir votre "mailservice" vous n'avez pas besoin de cette ligne :)
  :0
  * ^To:.*freaker@ibm.net
  ! freaker

  #  l'e-mail avec l'entte root@mydom.com sera dirig vers le root !
  :0
  * ^Subject:.root
  ! root

  # l'e-mail avec l'entte barbara@mydom.com sera distribu  barbara...
  :0
  * ^Subject:.barbara
  ! barbara

  # l'e-mail avec l'entte peul sera transmis vers son adresse prive.
  :0
  * ^Subject:.paul
  ! paul@his.personal.emailaddress

  # Tout e-mail avec l'entte john sera transmis  son compte et une copie vers
  # son adresse e-mail prive...
  :0 c
  * ^Subject:.john
  ! john@his.personal.emailaddress

  :0
  * ^Subject:.john
  ! john

  # Tous e-mail d'ibm, avec les infos de mise  jour, seront envoys  freaker,
  # comme il est le seul  vouloir administrer le service d'e-mail et que ibm ne
  # veut pas recevoir les retours de courrier non attribu !!
  # si votre fournisseur vous expdie des "newsletters" etc... cette ligne est
  # obligatoire.
  :0
  * ^From:.*newsletter@ibm.net
  ! freaker

  # Tous les messages que le dmon veut rejeter, ou dans mon cas, les sauve dans
  # un fichier... (utiliser  /dev/null pour les envoyer au fin fond des abysses).
  :0
  * ^FROM_DAEMON
  throwaway

  # Ce script renvoie un e-mail vers l'expditeur s'il n'a pas trouv de
  # destinataire dans son fichier... il enverra le fichier "nosuchuser" dans le
  # corps du message comme rponse... attention ! vous avez absolument besoin
  # d'un tel fichier ! - le mien signale: "L'utilisateur n'est pas reconnu dans
  # la ligne objet svp utilisez "Subject: nom de l'utilisateur" pour crire  la
  # personne concerne, par exemple "Subject: freaker" enverra un e-mail 
  # freaker". Ce fichier peut tre long, mais aussi court :)... l'adresse de
  # votre domaine "mailservice@mydomain.com" vitera de confondre vos
  # utilisateurs avec ceux de votre fournisseur d'accs - il a besoin de
  # connatre votre adresse exacte!
  # Sinon vous pouvez crer une boucle sans fin qui envoie un e-mail du style
  # "Ne dpensez pas 500$ chez votre ..."
  :0
    |(/usr/bin/formail -r -k \
       -A"X-loop: mailservice@mydomain.dom "| \
         /usr/bin/gawk '{print }\
         /^/ && !HEADER \
           { system("/bin/cat nosuchuser"); \
           print"--" ;\
           HEADER=1 }' ) |\
           /usr/bin/sendmail -t

  exit
  ______________________________________________________________________






  44..33..  IIll nn''yy aa ppaass dd''aabboonnnn ...... ((ffiicchhiieerr nnoossuucchhuusseerr))


       (*** < file > *** text ***)     nosuchuser




       ______________________________________________________________________

       La personne que vous dsirez contacter n'est pas abonne  cette adresse.

       S'il vous plat, utilisez la ligne rserve au sujet pour y crire le nom de
       votre correspondant - exemple: "subject: freaker" enverra un mail  freaker 
       cette adresse"
       ______________________________________________________________________






  44..44..  FFiicchhiieerr ""ccrroonnttaabb""..

  Si vous ne savez pas comment crontab fonctionne :) il vaut mieux que
  vous lisiez le manuel :)...  Vous avez besoin de crer un fichier pour
  contrle le courrier "checkmail" - celui-ci vrifiera si la connection
  est valide, de la mme manire que cron...  - j'utilise le protocole
  ppp :) - aussi l'exemple suivant vrifiera la connection - ainsi que
  la messagerie toutes les 10 minutes en utilisant cron.  Ca parat un
  peu louche - mais a ne l'est pas !



  44..44..11..  VVrriiffiiccaattiioonn dduu ccoouurrrriieerr

  Le fichier "checkformail" sera appel (il doit tre excutable pour
  cel) - et il vrifiera la connection.  Si elle est valide alors il
  ira rcuprer le courrier. Crontab utilisera ce fichier quand vous
  utilisez l'entre cron suivante ...


       (*** < file > *** code ***)     .checkformail



  ______________________________________________________________________
  #!/bin/sh
  #

          cd /home/mailservice

          if [ -f /var/run/ppp0.pid ]; then
          /usr/local/bin/fetchmail -s > /dev/null 2>&1
  fi
  ______________________________________________________________________





  44..44..22..  ccrroonnttaabb

  Cette entre cron doit tre charge dans crontab, elle appellera le
  fichier .checkformail toutes les 10 minutes.  Elle n'a aucune action
  sur le courrier ni sur la console - puisque le tout va directement
  dans le rpertoire /dev/null.


       (*** < file > *** text ***)     cronentry




       ______________________________________________________________________
       0,10,20,30,40,50 * * * *  /home/mailservice/.checkformail 1> /dev/null 2>
       /dev/null
       ______________________________________________________________________






  44..55..  CChheezz vvoottrree ffoouurrnniisssseeuurr dd''aaccccss..

  Ce qui suit doit tre fait si vous utilisez la mthode A... chez
  l'administrateur, l'e-mail va directement du domaine vers
  l'utilisateur.  C'est assez simple, et une fois que c'est install a
  roule d'enfer !  Ce n'est pas ncessaire ni chez vous ni chez votre
  administrateur systme si celui-ci utilise une autre mthode.

  Si vous utilisez une nouvelle version de sendmail, l'ancienne version
  ne fonctionnera sans doute pas, aussi rfrez vous au manuel
  d'utilisation  pour que le routage d'e-mail ait lieu.


  44..55..11..  sseennddmmaaiill..ccff ((AAnncciieennnnee vveerrssiioonn ddee sseennddmmaaiill)) aajjoouutteezz lleess lliiggnneess
  ssuuiivvaanntteess aauu ffiicchhiieerr

  Ajoutez les lignes suivantes au fichier /etc/sendmail.cf, ainsi le
  fichier du domaine sera lu. SVP il est  noter que la rgle 98 est
  ajoute ci-dessous, ceci pour rcuprer les erreurs :) c'est l'enfer
  pour les enlever ! (et je sait de quoi je parle :) DuH).


       (*** < file > *** add ***)    /etc/sendmail.cf





  ______________________________________________________________________
  # Base de donnes du domaine maintenu

  Kmaildomains btree /etc/maildomains.db

  # ajoutez ces lignes "dans" la rgle 98 ! (sous la rgle 98)

  R$+ < @ $+  . >         $: $1 < @ $2 > .
  R$+ < @ $+ > $*         $: $(maildomains $1@$2 $: $1 < @ $2 > $3 $)
  R$+ < @ $+ > $*         $: $(maildomains $2 $: $1 < # $2 > $3 $)
  R$+ < @ $* > .          $: $1 < @ $2 . >
  ______________________________________________________________________






  44..55..22..  ((NNoouuvveellllee vveerrssiioonn ddee sseennddmmaaiill)) AAjjoouutteezz cceess lliiggnneess aauu ffiicchhiieerr
  sseennddmmaaiill..ccff

  Avec la nouvelle version de sendmail (test avec la version 8.8.7 et
  8.8.8), ignorez la mthode A, et ajoutez les lignes suivantes :


       (*** < file > *** add ***)    /etc/sendmail.cf




       ______________________________________________________________________
       # Base de donnes du domaine maintenu

       Fw/etc/sendmail.cw
       Kvirtuser btree /etc/maildomains.db

       *OR*

       Fw/yourhomedir/sendmail.cw
       Kvirtuser btree /yourhomedir/maildomains.db
       ______________________________________________________________________






  44..55..33..  ((NNoouuvveellllee vveerrssiioonn ddee sseennddmmaaiill)) EEddiitteezz llee ffiicchhiieerr //eettcc//sseenndd
  mmaaiill..ccww

  Editez le fichier /etc/sendmail.cw (ou /votrerpertoire/sendmail.cw si
  vous n'utilisez pas le mme emplacement).  Un point positif 
  l'utilisation de votre rpertoire: vous n'avez pas besoin d'tre
  loguer root pour activer votre domaine. Bien que vous pouvez avoir des
  risques de scurit si vous n'tes pas rigoureux !

  Ce fichier peut dj exister, ou a besoin d'tre cr. S'il existe
  dj soyez sr de ne pas craser les anciennes donnes - ou je vous
  rappelerai ma dclaration :)

  En premier lieu crez un fichier /etc/sendmail.cw, qui sera utilis
  entre le domaine et l'utilisateur... (comme je vous l'ai dj dit, le
  nom "mailservice" est  votre convenance - a peut mme tre votre
  login (le mien est freaker)).  Exemple :


       (*** < file > *** text ***) /etc/sendmail.cw




       ______________________________________________________________________
       mydomain.dom            mailservice
       ______________________________________________________________________






  44..55..44..  CCrreezz uunn ffiicchhiieerr //eettcc//mmaaiillddoommaaiinnss ffiillee

  En premier lieu crez un fichier /etc/maildomains, qui sera utilis
  entre le domaine et l'utilisateur... (comme je vous l'ai dj dit, le
  nom "mailservice" est  votre convenance - a peut mme tre votre
  login (le mien est freaker)).  (Vous pouvez avoir ce fichier dans
  votre rpertoire, changez le chemin :).  Exemple :

  Avec l'ancienne version de sendmail:


       (*** < file > *** text ***)     /etc/maildomains




       ______________________________________________________________________
       mydomain.dom            mailservice
       ______________________________________________________________________




  Avec la nouvelle version de sendmail:


       (*** < file > *** text ***)     /etc/maildomains




       ______________________________________________________________________
       @mydomain.dom           mailservice
       ______________________________________________________________________






  44..55..55..  AAuu ttrraavvaaiill !!

  Avec l'ancienne et la nouvelle version de sendmail vous avez besoin de
  crer les fichiers btree (base de donnes), suivez le guide :


  cd /etc    (or /yourhomedir)
  makemap btree maildomains < maildomains




  aprs cel, tuez le dmon sendmail et redmarrez le. Maintenant a
  devrait marcher ! Bonne chance :)



  55..  AAuuttoommaattiissaattiioonn

  OK, tout ce que nous avons vu fonctionne... (sinon ne pensez mme pas
   l'automatisation, il faut d'abord que tout soit ok) maintenant il
  nous faut un script pour que l'administrateur ou le root ne se prenne
  pas la tte pour ajouter un utilisateur  votre fichier procmail...
  L'exemple suivant s'adresse  des utilisateurs plus expriments -
  parce que certaines choses ont besoin d'tre changes. J'ai dcid
  d'utiliser la M(B) parce qu'elle est plus utilise que la M(A) (moins
  chre). Mon exemple peut trs bien tre adapt  la M(A).


  55..11..  LLaa ssttrruuccttuurree..

  Puisque le fichier de post-routine termine le programme (tout ce qui
  va suivre ne fonctionnera pas sans lui) nous avons besoin d'un fichier
  de pre-routine.



  55..11..11..  LLee ffiicchhiieerr ddee pprree--rroouuttiinnee ""..pprrooccmmaaiillrrcc--hheeaaddeerr""

  Ce fichier servira  la fois au fichier de pre-routine et au fichier
  principal puisqu'ici seront rajouts ou supprims les diffrents
  utilisateurs. C'est un fichier trs important, une copie de sauvegarde
  sera la meilleure chose  faire avant l'ajout d'un utilisateur, il
  PEUT y avoir des problmes ... une machine n'est pas infaillible.


       (*** < file > *** text ***) .procmailrc-header































  ______________________________________________________________________
  :0 c
          passtrough

  :0
  * ^To:.*freaker@ibm.net
  ! freaker

  :0
  * ^Subject:.root
  ! root

  :0
  * ^Subject:.barbara
  ! barbara

  :0
  * ^Subject:.paul
  ! paul@his.personal.emailaddress

  :0 c
  * ^Subject:.john
  ! john@his.personal.emailaddress

  :0
  * ^Subject:.john
  ! john

  :0
  * ^From:.*newsletter@ibm.net
  ! freaker

  :0
  * ^FROM_DAEMON
  throwaway
  ______________________________________________________________________






  55..11..22..  LLee ffiicchhiieerr ddee ppoosstt--rroouuttiinnee ""..pprrooccmmaaiillrrcc--ffooootteerr""

  Comme mentionn ci-dessus, ce fichier doit tre la post-routine
  puisqu'il ne sera pas utilis pour dlivrer les donnes - ce fichier
  contient le code de "rejet" pour retourner le message  l'expditeur
  s'il ne trouve pas de correspondant ! C'est vraiment la fin de la
  boucle !


       (*** < file > *** text ***) .procmailrc-footer














  ______________________________________________________________________

  :0
    |(/usr/bin/formail -r -k \
       -A"X-loop: mailservice@mydomain.dom "| \
         /usr/bin/gawk '{print }\
         /^/ && !HEADER \
           { system("/bin/cat nosuchuser"); \
           print"--" ;\
           HEADER=1 }' ) |\
           /usr/bin/sendmail -t


  exit
  ______________________________________________________________________






  55..22..  SSccrriipptt dd''aajjoouutt ddee bboottee  lleettttrree

  Ce script ajoutera un utilisateur au fichier de pre-routine, et mettra
   jour le ".procmailrc" d'aprs le ".procmailrc-header" pour clturer
  le tout. Les commentaires (prcds de #) ne sont l que pour vous
  aider :) vous pouvez les supprimer.


       (*** < file > *** code ***)     addmail   (* chmod 500 *)




































  ______________________________________________________________________
  #/bin/sh
  #
  # Copyright (c)1997 par Gunther Voet. rev 1.0.1
  # SVP merci de laisser ce copyright si vous fournissez une machine avec ce
  # programme prinstall ...


  echo ""
  echo "Addmail v1.0.1 by Gunther Voet, Freaker / TuC'97-98 (21/04/97)"
  echo ""

  if [ $1 ]; then

          if [ $2 ]; then

  # Faites une sauvegarde!

          cp /home/mailserv/.procmailrc-header /home/mailserv/.procmailrc-backup

  # Ajoutez l'information (>>) au fichier .procmailrc-header

          echo ":0" >> /home/mailserv/.procmailrc-header
          echo "* ^Subject:.$1" >> /home/mailserv/.procmailrc-header
          echo "! $2" >> /home/mailserv/.procmailrc-header
          echo "" >> /home/mailserv/.procmailrc-header

  # Mettez  jour le fichier .procmailrc  partir des fichiers .procmailrc-header
  #  et .procmailrc-footer


          cat /home/mailserv/.procmailrc-header > /home/mailserv/.procmailrc
          cat /home/mailserv/.procmailrc-footer >> /home/mailserv/.procmailrc

  # Soyez sr que le fichier .procmailrc n'appartient qu' l'administrateur
  # "mailserv" et que ce dernier a l'exclusivit de l'criture/lecture...

          chown mailserv /home/mailserv/.procmailrc
          chgrp users /home/mailserv/.procmailrc
          chmod 600 /home/mailserv/.procmailrc
  else
          echo "No DESTINATION mail address has been given ..."
  fi

  else
          echo "usage:"
          echo ""
          echo "syntax:  addmail from_user to_user(domain)"
          echo ""
          echo "example: addmail freaker freaker@myemail.dom"
          echo ""
  fi
  ______________________________________________________________________




  Ok, ce script va donc ajouter les informations de l'utilisateur ainsi
  que son adresse dans le fichier .procmailrc-header, et mettra  jour
  le fichier .procmailrc  partir des deux autres fichiers (header  et
  footer).  Si vous voulez supprimer un utilisateur, vous n'avez juste
  qu' diter le fichier ".procmailrc-header" pour le modifier, ainsi la
  prochaine fois que vous ajouterez quelqu'un, l'utilisateur prcdent
  sera supprim du fichier .procmailrc. Pour effectuer une suppresion
  immdiate, il vous faut le supprimer  la fois dans le fichier
  .procmailrc et .procmailrc-header.
  Je vous crois assez comptent pour modifier le script pour que l'ajout
  d'un utilisateur  votre compte se fasse automatiquement et ce pour
  les deux mthodes.


  66..  AA ll''aaiiddee !! ((SSiicc))

  Bon, vous avez besoin d'un peu d'aide, non :) je pourrais tre
  sarcastique et seulement vous dire: "vous feriez mieux de tout
  rinstaller, parce que vu d'ici c'est un peu le bordel"... ou  je peux
  vous aider ... - j'ai dcris ici quelques problmes courants.  Si vous
  avez des problmes qui ne sont pas rpertoris ici, faites m'en part
  par e-mail et je rajouterais tout a  ce HowTo avec en sus votre nom
  et adresse e-mail - AVANT de m'crire svp, vrifiez que vous n'oubliez
  rien et si vous voulez que je vous aide expdiez moi le plus d'info
  possible incluant le script et la description de ce que vous voulez.
  Je n'ai PAS besoin des binaires, je ne veux pas le faire tourner.



  66..11..  LLee ssccrriipptt dd''aauuttoommaattiissaattiioonn nnee ffoonnccttiioonnnnee ppaass::


    est-il executable ?

    est-ce que votre emplacement par dfaut est /bin/sh ?

  66..22..  QQuu''eesstt--ccee qquuee vvoouuss eenntteennddeezz ppaarr sseerrvveeuurr ddee mmaaiill aannoonnyymmee ??


    Vous pouvez crer un compte comme "anon0001@votredomaine.dom" et le
     faire suivre vers une autre adresse e-mail... personne n'ayant
     accs au fichier .procmailrc, VOUS SEUL connaissez l'identit de
     vos utilisateurs !

  66..33..  MMoonn cchhaatt eesstt mmoorrtt


    La prochaine fois n'imprimez pas ce HowTo avec du papier de 200gr,
     parceque pour 10 pages ce sera 2kg pour le chat - c'est JUSTE TROP
     LOURD !

  66..44..  MMoonn cchhiieenn eesstt mmoorrtt


    Hmmm... je ne peux rien faire pour vous, pourquoi vous me posez
     cette question ? ... Enterrez le...

  66..55..  LLiinnuuxx??


    Un UNIX libre de droit - compatible Posix - cr par Linus Torvalds
     ...  Pourquoi tes-vous en train de lire cel si vous ne connaissez
     mme pas Linux ?

  66..66..  PPoouuvveezz vvoouuss mm''aaiiddeerr  ttrroouuvveerr uunn ccoommppttee ??


    Non! C'est un HowTo pour une utilisation personnelle, je me
     contrefous de votre fournisseur d'accs ainsi que de votre adresse
     e-mail.

  66..77..  PPoouurrqquuooii aavvooiirr eennlleevv "" ppeeuutt--ttrree qquuee pplluuss ttaarrdd jjee rraajjoouutteerraaiiss
  qquueellqquueess ccoommmmeennttaaiirreess ......"" ??


    Lisez le point 5.5 avec attention :) et verrez pourquoi... c'est
     parce que j'avais besoin de le rajouter sur demande gnrale :)


  66..88..  CCoommmmeenntt ppuuiiss--jjee oobbtteenniirr uunn ""ddoommaaiinnee"" ??


    Demandez  votre fournisseur d'accs, il vous y aidera. Ca peut
     prendre des jours voire des semaines pour le demander  Internic -
     votre fournisseur d'accs peut aider.

  66..99..  PPoouurrqquuooii tteess--vvoouuss uunn eenncc...... eenn uuttiilliissaanntt cceettttee mmtthhooddee ??


    Parce que je ne veux pas dpenser de l'argent et parce que j'aime
     bien tre un enc... en l'utilisant - JE l'utilise - pourquoi a
     vous ennuie ?

  66..1100..  LLee ffiicchhiieerr ""nnoossuucchhuusseerrffiillee"" ??


    Vous pouvez y mettre ce que vous voulez - pourvu que l'expditeur
     sache pourquoi son message a t refus.

  66..1111..  EEsstt--ccee qquuee mmeess uuttiilliissaatteeuurrss ppeeuuvveenntt ccrriirree eett eennvvooyyeerr dduu ccoouurr
  rriieerr ??


    Ce n'est pas le but de ce systme, lisez le manuel du sendmail...
     je vous explique ici comment RECEVOIR   du courrier et avoir
     toujours une adresse valide.

  66..1122..  EEsstt--ccee qquuee cchhaaqquuee uuttiilliissaatteeuurr aa bbeessooiinn dd''uunn ccoommppttee sshheellll ssuurr
  mmoonn sseerrvveeuurr ??


    Nan... Mais ! Ce sera difficile pour les utilisateurs qui n'ont pas
     accs  internet :) vous pourriez avoir un rseau camoufl (et
     utiliser un ordinateur qui y soit connect) pour que les
     utilisateurs puissent lire leur courrier de cette faon, ou bien
     vous pourriez crer un lien entre un BBS et le courrier
     lectronique, vous pourriez mme le transmettre vers une passerelle
     Fidonet :) Autant de circonstances qui permettraient d'viter de
     donner un compte shell.

  66..1133..  ssaannss oobbjjeett


    A priori un jeu de mot entre Skeletion et Skeleton

  66..1144..  ll''aajjoouutt ddee ccoouurrrriieerr ??


    Pas de question - pour l'automatisation - vous feriez mieux d'tre
     sr de ce que vous voulez, parce que a pourrait tre votre cheval
     de troie ;)) Ce que je veux vous dire, c'est que vous devez savoir
     comment faire un script avant de poser des questions.  C'est assez
     facile  interprter et en plus j'y ai ajout des commentaires.  Si
     vous avez l'intention de distribuer ce script, svp pensez  mon
     copyright !  merci ;)

  66..1155..  PPoouurrqquuooii tteess--vvoouuss ssii ccrruueell ??


    Je ne suis pas cruel :) je suis gentil :) je suis le plus gentil
     garon de la Terre, de l'univers ! MAINTENANT DEHORS ! ( je veux
     juste m'en tenir  mon HowTo et pas TROP driver de mon point de
     dpart - aussi :) that's all folks ! ).

  66..1166..  AAvveezz vvoouuss eeuu ddeess ppllaaiinntteess  pprrooppooss ddee llaannggaaggee eexxcceessssiiff ??


    Pas encore, mais, il se pourrait que je filtre toute chose
     contenant "excessif" et "langage" :) je ne sais pas :))

  66..1177..  PPoouurrqquuooii ccee HHoowwTToo eesstt--iill ssii ddiiffffrreenntt ddeess aauuttrreess ??


    Parce que le fait de lire beaucoup de HowTo peut devenir barbant...
     j'ai voulu y ajouter autre chose...

  66..1188..  LLooccaalleemmeenntt mmoonn ddoommaaiinnee ffoonnccttiioonnnnee,, mmaaiiss sseemmbbllee rriieenn rreecceevvooiirr ddee
  ll''eexxttrriieeuurr..


    Vrifiez votre fichier "sendmail.cw, le nom de domaine a BESOIN de
     s'y trouver !

  66..1199..  MMoonn cchhiieenn eesstt mmoorrtt


    Les rgles ne fonctionnent pas, je ne peux recevoir d'e-mail, ou
     sendmail plante, rfrez vous  la section  new sendmail  et ne
     ftes pas attention aux explications de l'ancienne version.  La
     nouvelle version de sendmail sera plus facile  utiliser avec les
     domaines virtuels.


  77..  TThhee EEnndd

  Il faut une fin  tout... si vous trouvez des bugs non repertoris (ou
  des particularits), alors laissez de ct vos critiques... envoyez
  moi vos commentaires et suggestions :) Si vous tes encore en colre
  aprs avoir lu cel, svp allez voir  .

  Mes remerciements :

  Hannes van de Vel: pour m'avoir support (hum) Tetsu Isaji: pour la
  version japonaise ainsi que pour m'avoir signal quelques erreurs :)
  Greg Hankins: pour m'avoir fait remarquer les erreurs de la version
  sgml.  Linus torvalds: bien sr, sans qui ce HowTo n'existerait pas !





















  Online Troubleshooting Resources HOWTO
  Howard Mann, howardm@xmission.com
  v0.5, 18 Septembre 1999

  Ce document dirigera les utilisateurs de Linux vers les ressources
  disponibles sur Internet, qui constitue un vaste rservoir d'informa
  tions utiles dans la rsolution des problmes sous Linux.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Mises  jour du document
     1.2 Copyright et Licence
     1.3 Retour et Corrections

  2. HOWTO et mini-HOWTO

  3. Foire Aux Questions (FAQ)

  4. Les sections du support en ligne

  5. Les archives des forums Usenet

     5.1 Power Search sur deja.com
     5.2 Searchlinux.com (CNET Linux Help)

  6. Les moteurs de recherche sur Internet

     6.1 Google.com

  7. Les archives des listes de diffusion

  8. Les manuels d'utilisation en ligne

  9. Les tutoriels Unix en ligne

  10. Ressources diverses

     10.1 Notes de version et la documentation disponible relative  XFree86 - Serveur de fentres
     10.2 Les pages GNU Texinfo
     10.3 Les logiciels et manuels GNU
     10.4 Le glossaire des termes relatifs  Linux
     10.5 Le dictionnaire en ligne des termes informatiques et technologiques
     10.6 Un guide dtaill pour les PC (Personal Computers)
     10.7 L'encyclopdie de Gary (Gary's Encyclopedia)

  11. Commentaires de conclusion

  12. Traduction



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  L'approche traditionnelle dans la rsolution des problmes lis aux
  ordinateurs implique la consultation des manuels d'utilisation, de
  livres, des amis -- probablement porteurs de bons conseils -- et,
  quand tout cela n'a pas apport la solution,  appeler le service de
  support technique du vendeur du produit en question.  Et nous
  connaissons tous l'efficacit plaisante et fiable de cette dernire
  technique. Malheureusement, c'est la norme dans la sphre des produits
  commerciaux propritaires.

  A contradistinguo (NdT : adaptation libre du nologisme
  "contradistinction" utilis par l'auteur), Linux, et les
  distributions, les utilitaires et les applications associs, ont
  largement t dvelopps suivant le modle Open Source
  <http://www.opensource.org>, dans lequel les dveloppeurs utilisent la
  communication lectronique via Internet --  classiquement sous forme
  de listes de diffusion publiques -- pour collaborer avec leurs pairs 
  l'amlioration du code source associ. Une telle collaboration a aussi
  impliqu traditionnellement la publication en ligne des manuels
  d'utilisation, des Foires Aux Questions (FAQ), de bases de
  connaissance, de notes de version, de guides formels tels que ce
  document (HOWTO) et de tutoriels. De plus, les utilisateurs assistent
  souvent les autres grce aux forums Usenet et aux autres groupes de
  discussion, et les messages envoys sont immdiatement disponibles
  sous forme d'archives consultables. Ces forums consacrs  Linux sont
  rputs pour le haut niveau de participation des utilisateurs. Pour
  une bonne partie, Linux peut tre considr comme un produit de
  l'Internet.

  Prises dans leur ensemble, ces ressources ouvrent un accs  une large
  base d'informations en perptuelle volution, et mon objectif est
  d'encourager et de diriger le lecteur dans l'utilisation de ces
  donnes lorsqu'il doit faire face  un problme non prvu dans la
  documentation incluse dans chaque distribution de Linux. (NdT :
  d'autant plus que dans certains pays, chacun peut laisser sa machine
  personnelle en ligne pour un cot drisoire ; la situation volue
  partout peu  peu dans ce sens). Les gourous Linux qui assistent les
  nouveaux arrivants via Usenet deviennent rapidement conscients de la
  frquence avec laquelle certaines questions techniques sont
  rgulirement postes -- questions dont les rponses sont dj
  disponibles dans une ou plus des mines d'informations en ligne. Alors,
  pour diminuer la probabilit d'tre insult en rponse  la question
  que vous avez pose sur Usenet ou sur l'IRC, lisez ce qui suit !

  Equips d'un butineur, les utilisateurs de Linux peuvent rapidement
  devenir des adeptes de la rsolution de problmes sur leurs systmes.
  La cl tant de savoir comment et o chercher. Mon objectif est de
  guider l'utilisateur -- en particulier le dbutant (newbie) sous
  Linux -- dans cette qute.


  11..11..  MMiisseess  jjoouurr dduu ddooccuummeenntt

  La dernire version de ce document est toujours disponible sur
  <http://www.newbielinux.com>, mon site pour les dbutants Linux.
  (NdT : la dernire version traduite en franais est disponible sur
  <ftp://ftp.traduc.org>)


  11..22..  CCooppyyrriigghhtt eett LLiicceennccee

  Copyright (c) 1999, by Howard Mann.

  Ce document est rgi par la Licence du LDP, dont les termes sont
  dtaills ici : <http://www.linuxdoc.org/copyright.html>


  11..33..  RReettoouurr eett CCoorrrreeccttiioonnss

  J'apprcie toujours d'avoir un retour et des critiques constructives.
  En particulier, je souhaiterais tre averti des erreurs prsentes dans
  ce document ainsi que des ressources absentes et qui mriteraient
  d'tre cites.  D'avance, merci.

  22..  HHOOWWTTOO eett mmiinnii--HHOOWWTTOO

  Ces documents sont associs avec le Linux Documentation Project
  <http://www.linuxdoc.org>.  Il y a une page d'index
  <http://www.linuxdoc.org/HOWTO/HOWTO-INDEX-3.html> que je vous
  conseille de mettre dans les favoris dans votre butineur.  (NdT : il
  existe aussi des traductions de ces documents dans diffrentes
  langues ; en particulier, pour les versions franaises, voir
  <http://www.traduc.org>)

  Ces HOWTO sont crits (NdT : et traduits) par des utilisateurs de
  Linux et sont rgulirement mis  jour par leur(s) auteur(s). La
  plupart des auteurs fournissent la dernire version sur leur site web
  personnel, et un lien hypertexte vers la dernire version est
  habituellement fourni dans le document. Cette version peut tre plus
  rcente que celle disponible sur le site du LLDDPP.  Le document peut
  tre publi en ligne avant son inclusion dans la base de donnes du
  LLDDPP. (NdT : ce n'est videmment pas le cas de cette version, puisque
  les traducteurs participent au LDP.)

  Notez aussi que d'autres HOWTO sont disponibles sans que leurs auteurs
  les aient envoys au LLDDPP. Il est donc bien intressant d'essayer de
  les chercher en utilisant un moteur de recherche comme je le dcris
  dans une section suivante.

  Ces documents sont particulirement utiles lorsque vous dcidez
  d'accder  un nouveau service ou d'en fournir un avec votre systme
  Linux, ou lorsque vous vous lancez dans un projet techniquement
  complexe. Par exemple, vous pouvez avoir la possibilit d'accder au
  Net avec des services AADDSSLL ou MMooddeemm ppoouurr ccaabbllee ; d'excellents guides
  sont disponibles sous la forme de HOWTO.

  De plus, les auteurs incluent souvent des rfrences et des liens vers
  des sites qu'ils ont trouvs utiles. Vous pouvez trouver l'information
  dont vous avez besoin sur l'un des sites cits plutt que dans le
  HOWTO lui-mme.  Par exemple, j'ai trouv Linux Network Drivers
  <http://cesdis1.gsfc.nasa.gov/linux/drive rs/>, le site principal sur
  les pilotes de cartes pour les rseaux, dans le EEtthheerrnneett HHOOWWTTOO.


  33..  FFooiirree AAuuxx QQuueessttiioonnss ((FFAAQQ))

  Une liste de FAQ est l'accompagnement traditionnel des applications,
  utilitaires et autres pour Linux. Une FAQ est classiquement fournie en
  ligne par le(s) dveloppeur(s) du produit en question, et les
  utilisateurs entreprenants hbergent parfois aussi une FAQ 'non
  officielle'. Cherchez la dernire version avec un moteur de recherche
  sur Internet.

  La FAQ est le premier document  utiliser pour rgler des problmes
  avec une application. De plus, des FAQ existent pour les distributions
  Linux, les gestionnaires de fentres, et les environnements de bureau
  (KDE et Gnome).

  Pour les dbutants sous Linux, je fournis des liens vers trois FAQ qui
  ensemble traitent de llaa pplluuppaarrtt des questions poses sur les forums de
  discussion de Usenet :


  1. The Linux FAQ sur  <http://www.fokus.gmd.de/linux/FAQ/Linux-FAQ.ht
     ml>

  2. The XFree86 X - Window System FAQ sur  <http://www.xfree86.org/FAQ
     >


  3. The Linux Kernel mailing list FAQ sur  <http://www.tux.org/lkml/>


  44..  LLeess sseeccttiioonnss dduu ssuuppppoorrtt eenn lliiggnnee

  Ces sections se trouvent typiquement sur les sites web des
  distributions Linux, et contiennent souvent une varit de documents
  utiles avec les informations qui ne peuvent tre traites dans une
  FAQ. Cherchez les sections portant un ou plusieurs des titres
  suivant :


    Support pour l'installation

    Bases de connaissance ou de solutions

    Trucs et astuces

    Errata, corrections et mises  jour

    Spcifications

    Guides techniques

    Guide du matriel ou Liste de compatibilit

    Information sur la scurit

  Certains sites web fournissent un moteur de recherche qui facilite
  votre qute de solution.

  Si vous avez un problme avec une distribution frachement installe,
  cherchez d'abord l car les rapports de bogues et les correctifs sont
  gnralement posts ici.  Vous pouvez trouver un guide dtaill qui
  vous aidera  accomplir une tche telle que mettre  jour votre noyau
  ou la dernire version de XFree86 X - Systme de fentres que vous
  utilisez.

  Je vous recommande de passer un certain temps sur le site pour vous
  familiariser avec ce qui est disponible.



  55..  LLeess aarrcchhiivveess ddeess ffoorruummss UUsseenneett

  La capacit de rechercher et de retrouver l'information dans les
  messages publis sur les groupes de discussion (Usenet) lis  Linux
  rpresente un puissant outil dans la rsolution de problmes sous
  Linux.

  Les moteurs de recherche permettent  chacun de chercher dans les
  archives en indiquant le forum, des mots-cls, des auteurs, des dates,
  une langue et des combinaisons des prcdents. En raison du nombre
  important de forums de discussion lis  Linux, les chances de trouver
  des informations utiles sont grandes.

  Je voudrais vous raconter une petite anecdote pour dmontrer
  l'efficacit de cette approche. La premire fois que j'ai tent de
  compiler un noyau, je me suis retrouv avec le message d'erreur
  suivant lorsque j'ai tap la commande "make" :






  make[1]: as86: Command not found
  make[1]: *** [bootsect.o] Error 127
  make[1]: Leaving directory `/usr/src/linux/arch/i386/boot'
  make: *** [zImage] Error 2




  Je n'avais aucune ide de ce que aass8866 tait, mais j'ai entr ce mot-
  cl dans l'utilitaire Power Search de ddeejjaa..ccoomm (voir plus bas), et
  j'ai obtenu un grand nombre de messages de gens qui avaient rencontr
  le mme problme. Ceux qui ont rpondu ont fourni la cause et la
  solution : je n'avais pas l'assembleur/lieur ncessaire pour crer le
  code machine, et le paquetage bbiinn8866 le contient. J'ai tlcharg et
  install le paquetage RPM de la dernire version et tout tait rsolu.
  La dmarche dans son ensemble a pris environ 10 minutes (j'ai une
  connexion ADSL au Net !).

  Il y a deux sites web qui fournissent un accs aux archives Usenet via
  un moteur de recherche, comme il est indiqu dans les sections
  suivantes.


  55..11..  PPoowweerr SSeeaarrcchh ssuurr ddeejjaa..ccoomm

  C'est le site principal pour tout ce qui concerne Usenet, et l'outil
  PPoowweerr SSeeaarrcchh est disponible ici : <http://www.deja.com/home_ps.shtml>.
  Passez un peu de temps sur le site  apprendre  utiliser rellement
  le moteur de recherche, sans oublier les nuances du Search Language
  <http://www.deja.com/help/help_lang.shtml>.  En particulier, notez
  l'intrt d'utiliser le symbole joker (wwiillddccaarrdd).  Vous serez
  rcompens du temps pass et de vos efforts. J'ai tape habituellement
  ce qui suit pour une recherche :



       LANGUAGE : English
       SUBJECT :  try different keywords, thinking of a subject line you would use for
        a post.
       FORUM    :  *linux* or comp.os.linux.*




  Il y a une autre interface agrable pour l'outil PPoowweerr SSeeaarrcchh sur :
  <http://www.exit109.com/~jeremy/news/deja.html>. Accommodez  votre
  got cette page (j'aime l'option "DejaClassic"), et ensuite choisissez
  "Save Settings".

  Vous pouvez aussi trouver intressant d'utiliser l'outil DDeejjaaSSeeaarrcchh,
  disponible sur :  <http://homemade.hypermart.net/dejasearch/>, qui
  sortira tous les messages trouvs dans un fichier HTML pour en
  faciliter l'examen.  En utilisant cela, vous n'aurez pas  aller et
  revenir sur les pages avec votre butineur.


  55..22..  SSeeaarrcchhlliinnuuxx..ccoomm ((CCNNEETT LLiinnuuxx HHeellpp))

  Il s'agit d'un site relativement nouveau qui offre la plupart des
  fonctionnalits de deja.com. Il dispose d'options de recherche de base
  ("basic") et avance ("advanced"). La dernire n'offre pas autant
  d'options que l'outil PPoowweerr SSeeaarrcchh de deja.com. Il offre une option
  sympathique 'un seul click' pour voir un de ces propres messages et
  les rponses associes. Il se trouve sur :
  <http://www.searchlinux.com>.

  66..  LLeess mmootteeuurrss ddee rreecchheerrcchhee ssuurr IInntteerrnneett

  J'utilise frquemment un moteur de recherche pour trouver des
  informations utiles ou ncessaires sur le Net. Ces moteurs cataloguent
  les pages des sites web commerciaux, personnels et scolaires, ainsi
  que les listes de diffusion et autres.

  Bien sr, il y a un grand nombre de moteurs de recherche disponibles,
  et je vous suggre d'en utiliser plusieurs avant d'arrter votre
  recherche particulire. La recherche a prouv que chacun ne catalogue
  qu'une petite partie des pages web existantes. Il vaut la peine de
  devenir familier avec les dtails de fonctionnement d'au moins un
  moteur non-annuaire pour maximiser l'efficacit et le rendement de vos
  efforts de recherche. Vous avez probablement votre favori -- j'aime
  bien GGooooggllee..ccoomm, et j'ai vais en discuter plus en dtails.


  66..11..  GGooooggllee..ccoomm

  Ce moteur possde plusieurs fonctionnalits originales qui sont
  dcrites sur : <http://www.google.com/why_use.html>. En particulier,
  le moteur retourne souvent les pages les plus utiles en premier ; en
  fait, j'ai souvent trouv que la premire page liste contenait
  l'information dont j'avais besoin.  Comme il stocke ('cache') les
  pages web, il est relativement rapide pour afficher les lments
  demands. Il existe aussi un outil appel GGoooogglleeSSccoouutt ((TTMM)) qui fournit
  d'autres liens intressant pour chaque lment trouv.

  En plus, il dispose d'un moteur de recherche spcialis dans Linux
  sur : <http://www.google.com/linux> que j'utilise comme mon premier
  outil de recherche sur Internet. Il recherche dans la base de donnes
  des pages relatives  Linux sur GGooooggllee..ccoomm amliorant ainsi
  l'efficacit de la recherche. Essayez-le - je suis sr que vous allez
  le mettre dans vos favoris immdiatement.


  77..  LLeess aarrcchhiivveess ddeess lliisstteess ddee ddiiffffuussiioonn

  Comme vous pouvez vous y attendre, il existe un trs grand nombre de
  listes de diffusion relatives  Linux qui permettent aux dveloppeurs
  et aux utilisateurs de communiquer et de collaborer sur des projets.
  Ces listes couvrent tous les aspects possibles de Linux, des arcanes
  techniques du dveloppement du noyau aux discussions relativement
  vagues sur les problmes des dbutants. Les inscrits sur une liste
  donne sont gnralement bien informs sur le sujet de la liste, et
  des informations dtailles et utiles sont souvent rcuprables. Les
  changes sont publiquement accessibles via les moteurs de recherche
  sur Internet et sous la forme d'archives en ligne de listes de
  diffusion. Vous verrez souvent des pages archives lorsque vous
  rechercherez avec un moteur de recherche sur Internet.

  Toutes les listes de diffusion ne sont pas associes  une archive en
  ligne, mais c'est de plus en plus le cas. De la mme faon, toutes les
  archives ne sont pas associes  un moteur de recherche.

  D'abord, essayez de trouver l'archive de la liste de diffusion qui
  vous intresse en tapant un ou plusieurs mots-cls et "mailing list
  archive" (NdT : parfois "liste diffusion archive" pour des listes en
  franais) dans un moteur de recherche sur Internet.

  Pour obtenir une liste des listes de diffusion relatives  Linux,
  examiner des sites web tels que LLiinnuuxx RReessoouurrccee EExxcchhaannggee sur :
  <http://www.linuxrx.com/Lists/Lists.perl> et LLiinnuuxx OOnnlliinnee MMaaiilliinngg
  LLiissttss sur :  <http://www.linux.org/help/lists.html>.


  Vous pouvez aussi trouver des archives de listes de diffusion aux
  endroits suivants :


  1. le site web de la distribution Linux que vous utilisez,

  2. le ou les sites web du gestionnaire de fentres et/ou de
     l'environnement de bureau que vous utilisez,

  3. le site web ddi  l'application ou au projet en question,

  4. TThhee MMaaiill AArrcchhiivvee sur :  <http://www.mail-archive.com/list s.html>

  5. MMaaiilliinngg LLiisstt AArrcchhiivveess sur :
     <http://www.uwsg.indiana.edu/hypermail/>

  6. LLiinnuuxx MMaaiilliinngg LLiisstt AArrcchhiivveess sur :
     <http://kernelnotes.org/lnxlists/>

  7. TTuuxx MMaaiilliinngg LLiisstt AArrcchhiivveess sur : <http://www.tux.org/hypermail/>

  Ce n'est pas une liste complte des archives et vous pouvez trouver
  d'autres sites avec un moteur de recherche sur Internet. Mais, avec
  ceux-l, vous devriez trouver votre bonheur.


  88..  LLeess mmaannuueellss dd''uuttiilliissaattiioonn eenn lliiggnnee

  Certaines des distributions majeures Linux et certains des
  gestionnaires de fentre/environnements de bureau publient leur manuel
  d'utilisation en ligne.  Si le manuel n'est pas en ligne, des guides
  d'installation et de configuration sont souvent disponibles sur le
  site correspondant. Cela est aussi valable pour les applications
  majeures comme GGiimmpp (GNU Image Manipulation Program).

  Ainsi, pour les utilisateurs qui n'ont pas de manuel imprim, un luxe
  d'aide  l'installation et  la configuration est gnralement
  disponible en ligne.


  99..  LLeess ttuuttoorriieellss UUnniixx eenn lliiggnnee

  Comme Linux est un systme d'exploitation ' la Unix', tre familier
  avec les concepts fondamentaux d'Unix comme l'arborescence des
  rpertoires Unix et les permissions sur les fichiers est essentiel.
  Heureusement, il existe beaucoup de tutoriels Unix en ligne qui
  couvrent ensemble tout ce qu'un utilisateur peut avoir besoin de
  connatre pour utiliser Unix. Je vous suggre de placer dans vos
  favoris les liens suivant comme une bibliothque de rfrences en
  ligne :


  1. Une rfrence vaste et bien organise sur :
     <http://www.dicamp.univ.trieste.it/du96/unix/TOC.html>

  2. Unixhelp sur  <http://www.ucs.ed.ac.uk/~unixhelp/servers.html>

  3. Unix is a Four Letter Word... sur
     <http://www.linuxbox.com/~taylor/4ltrwrd/title.html>


  1100..  RReessssoouurrcceess ddiivveerrsseess

  Dans cette section, je fournis des liens vers les sites web que j'ai
  trouv utiles pour apprendre  utiliser Linux. Cette collection est
  clectique, mais gardez a  porte de main.
  1100..11..  NNootteess ddee vveerrssiioonn eett llaa ddooccuummeennttaattiioonn ddiissppoonniibbllee rreellaattiivvee 
  XXFFrreeee8866 -- SSeerrvveeuurr ddee ffeennttrreess

  Cette documentation accompagne chaque version de XFree86, et est
  disponible sur :  <http://www.xfree86.org/>. Chaque fois que vous avez
  un problme avec votre environnement X, parcourez les notes relatives
   votre carte vido/puce graphique. Celles-ci procurent spcifiquement
  les dtails concernant la configuration du systme X-Window relatif 
  votre carte, et numrera toutes les options que vous devez inclure
  dans le fichier XF86Config qui gouverne X.


  1100..22..  LLeess ppaaggeess GGNNUU TTeexxiinnffoo

  Une grande collection de pages est disponible sur : <http://www.geek-
  girl.com/unix.html#texinfo>. On y trouve des liens vers les pages
  suivantes :


    BBaasshh    - Le shell Bourne-again

    CCoonnffiigguurree    - utilis lors de la compilation de sources

    GG++++    - le compilateur GNU C++

    GGcccc  - le compilateur C

    LLiibbcc  - la bibliothque GNU C

    MMaakkee  - un programme de gestion de la recompilation

  Notez que certains de ceux-l sont inclus dans les "docs" qui
  accompagnent les distributions de Linux. En gnral, il s'agit de
  documents techniques dtaills d'un intrt particulier pour les
  dveloppeurs. Nanmoins, si, comme moi, vous n'tes pas programmeur,
  vous pourrez examiner les sections introductrices de ces documents
  pour mieux comprendre, par exemple, les commandes configureet make que
  vous utilisez pour installer des applications  partir du code source.


  1100..33..  LLeess llooggiicciieellss eett mmaannuueellss GGNNUU

  Beaucoup de programmes importants qui sont frquemment utiliss par
  l'utilisateur Linux sont des utilitaires GNU -- par exemple, les
  programmes ttaarr (archive) et ggzziipp (compression). Les descriptions de
  ces programmes sont disponibles sur :
  <http://www.gnu.org/software/software.html#DescriptionsOfGNUSoftware>
  et les manuels en ligne pour beaucoup de ceux-l sont disponibles
  sur : <http://www.gnu.org/manual/manual.html>.

  Ces manuels fournissent gnralement un peu plus d'informations que ce
  qui se trouve dans la page mmaann correspondante sur votre systme. Par
  exemple, comparez la page mmaann et le manuel en ligne de l'utilitaire
  ttaarr .


  1100..44..  LLee gglloossssaaiirree ddeess tteerrmmeess rreellaattiiffss  LLiinnuuxx

  Ce guide en ligne sur  <http://www.firstlinux.com/guide/> possde une
  jolie collection de termes et de dfinitions, classs par ordre
  alphabtique.  Allez l-bas si vous rencontrez un terme que vous
  n'avez jamais vu avant ou que vous ne comprenez pas.




  1100..55..  LLee ddiiccttiioonnnnaaiirree eenn lliiggnnee ddeess tteerrmmeess iinnffoorrmmaattiiqquueess eett tteecchh
  nnoollooggiiqquueess

  Le site WWeebbooppeeddiiaa sur  <http://www.pcwebopedia.com/> consiste en un
  vaste dictionnaire en ligne des termes relatifs  l'informatique et en
  un moteur de recherche qui fournit les liens vers des documents qui
  prsentent chaque lment avec plus de dtails. Par exemple, j'ai
  utilis ce site pour apprendre les diffrences entre les bus IISSAA et
  PPCCII.


  1100..66..  UUnn gguuiiddee ddttaaiillll ppoouurr lleess PPCC ((PPeerrssoonnaall CCoommppuutteerrss))

  L'index par sujet de ce volumineux guide du matriel, disponible sur
  <http://www.PCguide.com/topic.html>, vous donnera une bonne ide du
  contenu de ce site. Je l'ai utilis frquemment lorsque j'ai install
  Linux et configur le systme X-Window pour la premire fois. J'ai
  appris beaucoup  propos des cartes vido et des crans, y compris les
  concepts de rsolution de l'cran, de profondeur des couleurs etc,
  utiles pour rgler les problmes d'affichage sous X.


  1100..77..  LL''eennccyyccllooppddiiee ddee GGaarryy ((GGaarryy''ss EEnnccyyccllooppeeddiiaa))

  Le site de Gary Momarison sur
  <http://members.aa.net/~swear/pedia/index.html> contient un trs grand
  nombre de liens classs relatifs  Linux. Vous pouvez utiliser la
  fonction "rechercher" de votre butineur pour trouver des liens dans
  une catgorie donne.  Visitez ce site pour apprcier ce qu'il offre.


  1111..  CCoommmmeennttaaiirreess ddee ccoonncclluussiioonn

  Si vous tes dbutant sous Linux, il peut vous tre utile de crer un
  rpertoire RRssoolluuttiioonn ddeess pprroobbllmmeess dans la liste des favoris de votre
  butineur, dans lequel vous mettrez les liens hypertextes que j'ai
  inclus dans ce document, ainsi que ceux qui sont pertinents pour la
  distribution de Linux et le gestionnaire de fentres/environnement de
  bureau que vous utilisez.

  En utilisant ces liens, vous deviendrez rapidement un adepte de la
  rsolution des problmes en ligne.

  Mes amitis et bonne recherche !


  1122..  TTrraadduuccttiioonn

  Ce document a t traduit par Benot Sibaud. Merci de m'envoyer vos
  remarques et corrections   <mailto:benoit.sibaud@wanadoo.fr>.  J'en
  profite aussi pour faire un peu de rclame : rejoignez le groupe des
  traducteurs du LDP sur  <http://www.traduc.org> :)














  Linux - Optical Disk HOWTO
  Skip Rye,   abr@preferred.com
  v1.6, 11 December 1998

  Ce document dcrit l'installation et la configuration des lecteurs de
  disques optiques sous Linux.  Que ceux qui ont pratiqu le sujet me
  fassent part de leurs remarques afin que je puisse les inclure dans le
  document SGML pour les transmettre  la communaut. N'oubliez pas de
  me confirmer que je peux mentionner votre adresse lectronique.
  ______________________________________________________________________

  Table des matires


  1. Avertissement

  2. Copyright

     2.1 LF1000 mini-HOWTO
     2.2 Optical Disk-HOWTO

  3. Technologie du changement de phase optique

     3.1 Introduction
     3.2 LF1000 Panasonic
        3.2.1 Caractristiques intressantes :
        3.2.2 Ce qu'il faut savoir
        3.2.3 Installation
        3.2.4 Phases de l'installation
        3.2.5 Conseils d'utilisation
     3.3 Notes supplmentaires de configuration par Jeff Rooze

  4. Principe de fonctionnement de la technique magnto-optique

     4.1 Introduction
     4.2 Olympus, Epson, Mitsubishi MK230LK3 - Stephan Shuichi Haupt
     4.3 Fujitsu DynaMO 640 - Phil Garcia
     4.4 Panasonic LF-7010 - Philip Kerr

  5. Les juke-box optiques

     5.1 Maxoptix 520 - Zed Shaw
        5.1.1 Message original de Zed - 13 fvrier 1998
        5.1.2 change avec Zed le lundi 16 fvrier 1998 :


  ______________________________________________________________________


  11..  AAvveerrttiisssseemmeenntt


  Les personnes impliques dans la rdaction, la distribution et la
  traduction du prsent document dclinent toute responsabilit quant
  aux dommages qui pourraient dcouler de son utilisation.


  22..  CCooppyyrriigghhtt

  Les noms "Optical Disk-HOWTO" et "LF1000 mini-HOWTO" sont protgs.


  22..11..  LLFF11000000 mmiinnii--HHOOWWTTOO

  Copyright (c) 1996,1997 by Skip Rye, abr@brspc_0064.msd.ray.com

  22..22..  OOppttiiccaall DDiisskk--HHOOWWTTOO

  Copyright (c) 1997,1998 by Skip Rye, abr@preferred.com

  La distribution de ce document doit se conformer aux termes de la
  licence LDP tels que dfinis  l'adresse :
  sunsite.unc.edu/LDP/COPYRIGHT.html.



  33..  TTeecchhnnoollooggiiee dduu cchhaannggeemmeenntt ddee pphhaassee ooppttiiqquuee


  33..11..  IInnttrroodduuccttiioonn

  La technologie du changement de phase permet de stocker l'information
  binaire via l'tat de phase d'un matriau particulier. Le priphrique
  module l'intensit d'un rayon laser pour modifier l'tat de phase. A
  un certain niveau de puissance, le faisceau laser permet une
  cristallisation du support tandis qu'un autre niveau le laisse
  compltement amorphe. Le support ne rflchira pas les missions laser
  de la mme faon selon qu'il se prsente cristallis ou non. Il est
  ainsi possible de stocker des donnes sur le disque.


  La spcificit du disque optique rside en ce que le formatage du
  disque repose sur une succession de pistes concentriques chacune
  divise en secteurs,  l'instar des disques magnto-optiques. La
  proximit des pistes autorise le stockage d'une quantit de donnes
  importante. A la diffrence d'un cdrom, cela confre  l'ensemble
  l'aspect d'un disque magntique.  Les cdroms sont eux dots d'une
  piste en spirale  l'image de celle des CD audios La diffrence entre
  le disque  changement de phase et le disque optique ne se cantonne
  pas  une division en pistes et secteurs. La technologie du changement
  de phase permet une criture directe des donnes, opration couteuse
  avec un systme magnto-optique. Le support possde en outre la
  proprit intressante de ne PAS tre sensible aux champs magntiques
  ou aux dcharges lectriques. Cela lui confre une dure de vie
  particulirement leve.


  33..22..  LLFF11000000 PPaannaassoonniicc


  33..22..11..  CCaarraaccttrriissttiiqquueess iinnttrreessssaanntteess ::


    Lecture/criture des disques optiques.

    Lecture des cdroms en quadruple vitesse.

    Lecture des CD Kodak (stockage des photos).

    Le support a une dure de vie de 15 ans.

    Interface de type SCSI-2.

    Formatage en pistes et secteurs.

    Temps d'accs de 165 ms (bien meilleur qu'une bande de sauvegarde).

    650 Mb de donnes par disque.

    Les disques cotent dans les 50 $ pice.


  33..22..22..  CCee qquu''iill ffaauutt ssaavvooiirr


    Le format du disque optique n'est pas compatible avec un autre
     lecteur.

    Le support Unix semble inexistant. Le produit cible plutt les
     utilisateurs de DOS/Windows et de Macintosh.

    N'achetez pas le lecteur PD qui utilise le port parallle. A ma
     connaissance, aucun pilote de priphriques sous Linux ne le gre.


  33..22..33..  IInnssttaallllaattiioonn

  Le LF1000 est un priphrique supportant les changes en SCSI-2. Il
  dispose d'une taille de bloc de 512 octets et est compatible avec les
  pilotes SCSI de Linux. L'installation a eu lieu sur un compatible PC
  muni d'un 486 d'AMD  100 MHZ et d'un contrleur SCSI Adaptec 1542C.
  La prise en charge et l'insertion dans l'arborescence du disque ont
  suivi les tapes ci-dessous :


  33..22..44..  PPhhaasseess ddee ll''iinnssttaallllaattiioonn


    Mettez en place le lecteur et configurez son numro de priphrique
     sur la chane SCSI de faon qu'il n'interfre pas avec les autres
     lments de la chane. Rebranchez les cbles.

    Dmarrez l'ordinateur. Le contrleur SCSI devrait remarquer la
     prsence du lecteur.

    Au cours du lancement du noyau Linux, vous apercevrez normalement
     un nouveau priphrique SCSI. Comme je disposais dj d'un lecteur
     magnto-optique sur la chane SCSI, le priphrique est apparu en
     /dev/sdb.

    Je n'ai pas partitionn le disque parce que fdisk a mis un
     avertissement et que je n'avais pas envie d'introduire quelque
     incompatibilit que ce soit du point de vue de dosemu.

    mkfs -t ext2 /dev/sdb

    mkdir /pd

    mount -t ext2 -o ro,suid,dev,exec,auto,nouser,async /dev/sdb /pd
     -- on se cantonne  des accs en lecture (pas d'criture).

    mount -t ext2 -o defaults /dev/sdb /pd -- accs en
     lecture/criture.

  _P_r__t_s _p_o_u_r _l_e _d__c_o_l_l_a_g_e _?


  33..22..55..  CCoonnsseeiillss dd''uuttiilliissaattiioonn


    Le support physique est sens tre r-inscriptible environ 500000
     fois.  Il n'est donc pas recommand d'installer un systme
     d'exploitation  usage permanent tel Linux sur un disque optique 
     changement de phase. De tels systmes d'exploitation usent souvent
     du disque  des fins de cache mmoire. Au fil du temps, l'esprance
     de vie du support  changement de phase risque d'tre atteinte.


    Montez autant que possible le disque en lecture seule.

    Pour les accs au disque en criture, privilgiez les transferts de
     grandes quantits de donnes. Vous diminuerez ainsi la dispersion
     des fichiers, source de nombreux dplacements.

    Quoi qu'il en soit, le disque  changement de phase reste un bon
     support pour les sauvegardes, les images ou les programmes que vous
     n'utilisez pas trop souvent. La rcupration d'archives est bien
     plus rapide qu'avec une bande. L'archivage peut se cantonner  un
     cp -rp sans avoir besoin du pilote pour les bandes. Les liens
     symboliques seront cependant remplacs par les fichiers
     correspondants. Note du traducteur : cp -arp y remdie.]

    Si lors d'une criture de fichiers vous constatez qu'il ne se
     produit aucune modification sur le disque optique, vous avez
     probablement oubli de dsenclencher la protection en criture du
     disque.


  33..33..  NNootteess ssuuppppllmmeennttaaiirreess ddee ccoonnffiigguurraattiioonn ppaarr JJeeffff RRoooozzee

  Bonjour,

  J'ai lu votre article traitant de la configuration du Panasonic
  LF-1000 sous Linux. Sur mon systme, le disque optique et le cdrom
  ont chacun leur nom, ce qui me permet de monter n'importe lequel de
  ces supports quand je le souhaite. Aucun disque n'est requis dans le
  lecteur lorsque je dmarre Linux. Enfin, j'utilise sur les disques
  optiques un systme de fichiers de type ext2.

  J'ai rencontr quelques problmes.


  Tout d'abord, mon disque dur occupait l'ID SCSI 6 et mon lecteur 
  changement de phase l'ID 4. Je dsirais une priorit plus leve pour
  mon disque dur que pour le lecteur  changement de phase. Sous Linux,
  le pilote SCSI recherche les priphriques en partant de l'ID SCSI la
  plus basse. Par consquent, le nommage des priphriques dpendait du
  contenu du disque optique. Difficile de vivre avec une racine attache
   un priphrique dont le nom change sans arrt ! J'ai rsolu le
  problme en modifiant l'ordre de recherche des priphriques dans le
  pilote SCSI.

  Ensuite, le noyau Linux inclus dans ma distribution n'examine pas tous
  les LUNS SCSI. Or le disque optique propose un mode dans lequel le
  cdrom se retrouve sur le LUN 1 et le disque optique sur le LUN 0.
  Le mode est choisi au moyen des cavaliers de configuration du
  priphrique.  Le cavalier #2 doit tre en position basse. S'il est en
  position haute, l'identit du priphrique dpend du type de disque
  qu'il contient et ce dernier est signal sur le LUN 0. En l'absence de
  disque, je crois que le priphrique se manifeste comme un lecteur de
  cdroms.  J'utilise une carte SCSI 16-xx de Future Domain en guise
  d'adaptateur.  Le pilote correspondant dans le noyau linux reconnat
  les signatures de disque optique lorsqu'il examine les LUNS. Je pense
  que c'est le cas de la plupart des gestionnaires SCSI. J'ai configur
  le noyau de faon que tous les LUNS soient examins par les
  gestionnaires SCSI au dmarrage (option "scan all LUNS"). Le noyau
  affecte un nom diffrent  chaque priphrique. Ce qui suit provient
  d'un enregistrement des messages de dmarrage. Vous remarquerez la
  prsence d'une srie d'erreurs, due  l'absence de disque dans le
  lecteur tandis que celui-ci tentait d'accder  la table des
  partitions pour obtenir la taille des blocs. Par dfaut, la taille des
  blocs est fixe  512 octets. Je pense modifier prochainement ce
  comportement, pour le gestionnaire SCSI Future Domain, lorsqu'un
  priphrique optique est dtect.
       >  scsi0 <fdomain>: BIOS version 3.2 at 0xde000 using scsi id 7
       >  scsi0 <fdomain>: TMC-18C50 chip at 0x140 irq 12
       >  scsi0 : Future Domain TMC-16x0 SCSI driver, version 5.28
       >  scsi : 1 host.
       >    Vendor: CONNER    Model: CP30545 545MB3.5  Rev: A9AF
       >    Type:   Direct-Access                      ANSI SCSI revision: 02
       >  Detected scsi disk sda at scsi0, id 6, lun 0
       >    Vendor: MATSHITA  Model: PD-1 LF-1000      Rev: A109
       >    Type:   Optical Device                     ANSI SCSI revision: 02
       >  Detected scsi disk sdb at scsi0, id 4, lun 0
       >    Vendor: MATSHITA  Model: PD-1 LF-1000      Rev: A109
       >    Type:   CD-ROM                             ANSI SCSI revision: 02
       >  Detected scsi CD-ROM sr0 at scsi0, id 4, lun 1
       >  fdomain: Selection failed
       >  scsi : detected 1 SCSI cdrom 2 SCSI disks total.
       >  SCSI Hardware sector size is 512 bytes on device sda
       >  fdomain: REQUEST SENSE Key = 2, Code = 3a, Qualifier = 0
       >  last message repeated 3 times
       >  sdb : READ CAPACITY failed.
       >  sdb : status = 0, message = 00, host = 0, driver = 28
       >  sdb : extended sense code = 2
       >  sdb : block size assumed to be 512 bytes, disk size 1GB.
       >  .
       >  .
       >  .
       >  Partition check:
       >    sda: sda1 sda2 sda3
       >  scsidisk I/O error: dev 0810, sector 0
       >    unable to read partition table of device 0810




  Ensuite, j'ai modifi le fichier dcrivant les arborescences
  disponibles sur ma machine (/etc/fstab) pour que chaque priphrique y
  soit prsent.  Je n'ai pas tent le montage automatique au dmarrage.
  Ci-suit un extrait de mon /etc/fstab. Les options les plus importantes
  sont noauto, rw (resp. ro) et les indicateurs de vrification.

  Afin de crer un systme de fichier sur le disque  changement de
  phase, j'ai utilis la commande suivante : "mkfs.ext2 -i 2048
  /dev/sdb".



       # fstab - Liste des systmes de fichiers
       #
       # device  mount   type          options              dumpfrequency
       checkpass
       /dev/sdb /optd    ext2   rw,user,suid,noauto,sync,exec,dev,umask=0 0 2
       /dev/sr0 /dist  iso9660  ro,user,suid,noauto,sync,exec,dev 0 2





  Aprs ces changements, je n'ai pas eu de problmes au montage de
  quelque priphrique que ce soit. Il me suffit d'insrer un disque et
  de taper "mount /optd" ou "mount /dist". Le systme se charge du
  reste.

  J'espre que ces informations seront utiles.




  Jeff
  --
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  \ Jeff Rooze -- http://www.treknet.net/~jrooze -- jrooze@treknet.net /
  /  If builders built buildings the way some programmers write        \
  \  programs, then the first woodpecker that came along would destroy /
  /  civilization.                                     GERALD WEINBERG \
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





  J'ai appliqu les instructions de Jeff comme suit :

    Modification du noyau dont l'arborescence se situait sous
     /usr/src/linux au moyen de xconfig puis installation dudit noyau.

    Basculement du cavalier de mode du disque  changement de phase sur
     la position non-DOS. J'ai connect un interrupteur  la broche de
     choix du mode puis l'ai log sur la face arrire. Aprs avoir
     dtermin quelle tait la position ouverte de l'interrupteur, je
     l'ai note "DOS". L'autre correspond bien sr  Linux. Avant le
     dmarrage de mon systme, j'agis sur l'interrupteur en consquence.
     Il semblerait que la position Linux soit la plus frquemment
     employe.

    Redmarrage de la machine. On doit voir apparatre plusieurs LUN 
     l'initialisation, lors de l'examen du disque  changement de phase.
     Si le noyau date, on modifiera le fichier
     "/usr/src/linux/drivers/scsi/config.in".

    Mise  jour de la fstab (fichier /etc/fstab) pour prendre en compte
     aussi bien la lecture de cdroms que de disques  changement de
     phase.

    Utilisation de la commande mount adquate.

    Un ``df'' pour vrifier que tout va bien.

  Ma tentative de passage  6 de l'identit SCSI de mon disque primaire
  a rvl certains problmes. Je ne me souviens plus exactement mais
  cela semblait provenir du fait que mon contrleur Adaptec 1542 et le
  SCSI Corel exigent un disque amorable sous l'identit 0 pour que la
  mise en place du BIOS soit compatible avec le DOS. J'ai donc remis le
  disque comme  l'origine et j'ai commenc  me servir tranquillement
  de mon disque  changement de phase. Avec cette configuration,
  ``workman'' -- le lecteur de CD audio -- fonctionne correctement.


  44..  PPrriinncciippee ddee ffoonnccttiioonnnneemmeenntt ddee llaa tteecchhnniiqquuee mmaaggnnttoo--ooppttiiqquuee


  44..11..  IInnttrroodduuccttiioonn

  Les disques magnto-optiques ont recours  un champ magntique dit
  ``lointain'' et  un faisceau laser pour modifier la polarisation d'un
  milieu magntique. Le support est tel qu'il doit tre chauff pour
  qu'un changement de polarisation soit possible, d'o la prsence du
  laser. Un laser de puissance provoque un chauffement de la surface du
  disque jusqu' une temprature suffisante pour que le champ
  ``lointain'' soit capable de polariser la surface magntique. Peu
  aprs, le disque refroidit et fixe la polarisation.  Je crois qu'un
  laser de faible puissance sert pour la lecture, le champ magntique d
   la polarisation du disque interagissant avec les composantes de son
  champ lectromagntique. J'espre que c'est  peu prs a mais rien
  n'est moins sr. A corriger peut-tre.

  La prcision apporte par le laser pour le changement de polarisation
  autorise une densit de pistes et de bits plus leve que celle des
  techniques magntiques conventionnelles. Le champ ``lointain'' limine
  les dgts parfois occasionns par les ttes magntiques, du moins si
  l'tiquette de votre disque ne se relve pas subitement et s'il n'y a
  pas une saloperie du mme genre sur la cartouche du disque. La plupart
  des supports autorisent le stockage de 650 Mo de donnes par face et
  sur certains modles les deux faces sont employes, portant la
  capacit  1,3 Go. Il faudra cependant retourner le disque pour passer
  d'une tranche de 650 Mo  l'autre.


  44..22..  OOllyymmppuuss,, EEppssoonn,, MMiittssuubbiisshhii MMKK223300LLKK33 -- SStteepphhaann SShhuuiicchhii HHaauupptt

  Stephan Shuichi Haupt <stephan@bios.t.u-tokyo.ac.jp>

















































  Bonjour,

    j'ai remarqu que le HOWTO ne parle gure des disques magnto-optiques,
  peut-tre en raison de leur manque de popularit. Au Japon, ils sont
  cependant fort rpandus, plus particulirement les modles trois pouces
  et demi qui supportent des disques de 128, 230 et dernirement 640 Mo.
  J'imagine que les informations en japonais concernant ces lecteurs ne
  manquent pas. Certaines personnes ne s'en estiment nanmoins gure plus
  avances pour autant :o). Les disques magnto-optiques s'emploient comme
  n'importe quel autre support amovible et s'avrent adapts aux petites
  sauvegardes compte tenu de leur faible cot (10 dollars US pour une
  unit de 640 Mo en octobre 1998). Je vais dire quelques mots des lecteurs
  de 230 Mo  interface SCSI.

  Disques employs : plusieurs (Olympus, Epson et en ce moment un MK230LK3
  de Mitsubishi), pas de problmes particuliers. Les lecteurs prsentent
  parfois des cavaliers aux configurations exotiques (``Mode Mac'' et
  autres). Dsactivez-les. Si vous souhaitez vous quiper d'un disque,
  faites attention  la taille du cache : elle peut amliorer notablement
  le taux de transfert, qui restera bien sr infrieur  ceux des disques
  durs.
  Contrleurs SCSI : cartes  base de NCR53C810 (Asus SC-200), Adaptec
  APA-1460A, Adaptec AHA2940.
  Installez le lecteur comme vous le feriez avec un disque SCSI
  supplmentaire. Il apparatra de la mme faon. Aucun disque n'est
  requis dans le lecteur au dmarrage.

  Il y a deux faons de formater les disques :
  -  la mode disquette. Lancez directement mkfs sur le priphrique associ,
   savoir quelque chose comme sdb ou sdc. Je dconseille cette mthode (cf.
  ci-dessous) ;
  - comme un disque dur. Utilisez fdisk pour partitionner le priphrique et
  appliquez ensuite mkfs aux partitions concernes (quelque chose du style
  sdc0, je n'ai pour ma part jamais dfini plus d'une partition sur un disque
  magnto-optique).
  Je n'ai pour l'instant pas encore essay de dmarrer depuis un disque
  magnto-optique mais je ne vois aucune raison pour laquelle cela ne
  fonctionnerait pas. Compte tenu des performances du lecteur, je
  cantonnerais cependant ce genre d'utilisation aux disques de secours.

  Remarque : les disques prvus pour dos ou windows, une fois formats  la
  mode ``disquette'', risquent de s'avrer inutilisables avec l'un quelconque
  de ces systmes tandis que le recours au partitionnement (FAT16, type 6)
  suivi de mkdosfs fonctionne correctement (au moins avec NT3.5/4.0).
  Quand il se termine, fdisk met un avertissement au sujet des partitions de
  type FAT16 : prtez-y donc attention (cf. la page de manuel de fdisk).
  La taille des secteurs n'est pas positionne automatiquement par mkdosfs.
  Invoquez ``mkdosfs -s 8''. Cette information a t pche dans un site ouaibe, courant
  1995 (merci  Ken Kawabata pour l'avoir trouve et dchiffre). Un systme
  de fichiers de type vfat fonctionnera correctement. Pour l'instant je n'ai
  employ que les couples FAT/dosfs et Linux/ext2 avec mes disques.

  Note : le support reste assez sensible, aux champs magntiques bien sr,
  mais galement aux contraintes mcaniques. Certains formats paraissent
  plus fragiles, le Mac semblant le pire : des pertes de donnes ont eu
  lieu lors de retraits de disques avec de faibles trafics rseau.

  Ces informations n'aideront personne  retrouver son chemin au fin fond
  de la jungle, mais elles peuvent quand mme s'avrer utiles.

          Steve

  --
  ***********************cut*here*or*do*not********************************
          S. Shuichi Haupt
          email stephan@bios.t.u-tokyo.ac.jp
          http://www.bios.t.u-tokyo.ac.jp/~stephan/

  ---------------- 11 dcembre 1998 mise  jour de Steve -------------------

  Bon, certains problmes vont parfois se manifester avec les disques
  magnto-optiques. La meilleure faon de les viter consiste  ne pas
  employer les disques tels quels au sortir du magasin. Le montage
  risque mme de provoquer des plantages du noyau. J'ai
  malencontreusement essay de monter un disque de 640Mo, prtendument
  format sous Windows 95, peut tre en FAT32, en tant que systme de
  fichier vfat :  viter...
  De plus, les noyaux 2.0.x ne grent pas les blocs de 2 ko (ainsi que les
  disques de 640 Mo). Un patch adquat semble se promener quelque part
  au Japon mais je n'ai pas encore mis la main dessus. Le lien suivant
  en fournira srement la description :
  http://elektra.e-technik.uni-ulm.de/~mbuck/linux/patches.html.
  Sinon, allez fouiller du ct de u-tokyo.ac.jp. La page des dveloppeurs
  s'y trouve.

  Le meilleur emploi des disques de 640 Mo passe par fdisk et mkfs.
  C'est ce que j'ai fait avec mke2fs sur des partitions de type 83 :
  mke2fs -b 2048 /dev/sdxy

  J'examinerai le cas des partitions de type FAT16 et de mkdosfs ds que
  j'aurai un peu de temps (et quelques disques).

  Tout ce qui prcde a t ralis avec un noyau 2.1.124.

  Steve
  --
  ***********************cut*here*or*do*not********************************
          Stephan Shuichi
  office: Dept. for Mechano-Informatics, Yoshizawa Lab.
          Faculty for Engineering, University of Tokyo
          Tel 03-3812-2111 ext 6390, FAX 03-5802-2957
          email stephan@bios.t.u-tokyo.ac.jp
          http://www.bios.t.u-tokyo.ac.jp/~stephan/
  private: --





  44..33..  FFuujjiittssuu DDyynnaaMMOO 664400 -- PPhhiill GGaarrcciiaa

  pgarcia@execpc.com

    Vous avez srement dj reu de nombreux messages concernant le Dynamo
  640 de Fujitsu. Je dispose de la version interne, le 640SZI. Numro de
  version donn par le gestionnaire SCSI : M2513-MCC3064SS. J'ai
  dernirement install ce disque presque sans la moindre difficult. Je
  dis presque car la taille des secteurs des disques de 640 Mo est
  de 2048 octets, format que ne grent pas les noyaux 2.0.x mais
  qu'admettent les noyaux de dveloppement. Un patch pour les noyaux
  2.0.x est disponible via :
  http://wwwcip.informatik.uni-erlangen.de/~orschaer/mo/.
  Le mme site vous fournira une version adapte de fdisk.

  Autrement, l'installation du priphrique ne diffre pas de celle d'un disque
  dur SCSI. Il fonctionne bien et j'en suis trs content.

  Phil Garcia




  44..44..  PPaannaassoonniicc LLFF--77001100 -- PPhhiilliipp KKeerrrr

  philip_kerr_at_wmc__brsf2@wmcmail.wmc.ac.uk































































       Cher Skip

    Vous avez demand dans votre HOWTO aux utilisateurs de relater leurs
  expriences des disques optiques sous Linux. Vous trouverez ci-dessous les
  dtails de la mise en oeuvre d'un LF-7010 de Panasonic (SCSI) avec une
  Sparc Classic. J'utilise des RedHat, 4.2 et 5.1.
    Amitis
      Philip Kerr <philip.kerr@wmc.ac.uk>

    PS : j'essaie  prsent de faire fonctionner le lecteur sous Solaris
  2.6 et c'est une autre paire de manches.
       ------------------------
  branchement du disque (ID 5)...
  mise en route de la station...
  messages :
       scsi0 : Sparc ESP100A-FAST
       scsi : 1 host.
       Vendor: SAMSUNG   Model: WN32162U          Rev: 0100
       Type:   Direct-Access                      ANSI SCSI revision: 02

       Detected scsi disk sda at scsi0, channel 0, id 3, lun 0
       Vendor: MATSHITA  Model: LF-7010  (00:06)  Rev: 1.42
       Type:   Optical Device                     ANSI SCSI revision: 02
       Detected scsi removable disk sdb at scsi0, channel 0, id 5, lun 0 scsi
       : detected 2 SCSI disks total.
       esp0: target 3 [period 100ns offset 15 10.00MHz FAST SCSI-II]
       SCSI device sda: hdwr sector= 512 bytes. Sectors= 4236661 [2068 MB]
       [2.1 GB]
       esp0: target 5 [period 248ns offset 4 4.03MHz synchronous SCSI] sdb :
       READ CAPACITY failed.
       sdb : status = 0, message = 00, host = 0, driver = 28 sdb : extended
       sense code = 2
       sdb : block size assumed to be 512 bytes, disk size 1GB.
       sunlance.c:v1.9 21/Aug/96 Miguel de Icaza (miguel@nuclecu.unam.mx)
       eth0: LANCE 08:00:20:04:3d:cf
       eth0: using auto-carrier-detection.
       Partition check:
       sda: sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8
       sdb:scsidisk I/O error: dev 08:10, sector 0, absolute sector 0 unable
       to read partition table
  J'ai modifi mon /etc/fstab, ajoutant l'entre adquate pour le lecteur
  (en /dev/sdb) :
       ==========
       /etc/fstab
       ==========
       /dev/sda1          /                       ext2    defaults        1 1
       /dev/sda2          swap                    swap    defaults        0 0
       /dev/fd0           /mnt/floppy             msdos   noauto,user     0 0
       /dev/sr0           /mnt/cdrom              iso9660 noauto,ro,user  0 0
       /dev/sdb           /mnt/optical            ext2    noauto,rw,user  0 0
       none               /proc                   proc    defaults        0 0
  fsck :
       [root@localhost me]# /sbin/mkfs -t ext2 /dev/sdb

       mke2fs 1.10, 24-Apr-97 for EXT2 FS 0.5b, 95/08/09 /dev/sdb is entire
       device, not just one partition! Proceed anyway? (y,n) y
       Linux ext2 filesystem format
       Filesystem label=
       118320 inodes, 472448 blocks
       23622 blocks (5.00%) reserved for the super user First data block=1
       Block size=1024 (log=0)
       Fragment size=1024 (log=0)
       58 block groups
       8192 blocks per group, 8192 fragments per group 2040 inodes per group
       Superblock backups stored on blocks:
       8193, 16385, 24577, 32769, 40961, 49153, 57345, 65537, 73729, 81921,
       90113, 98305, 106497, 114689, 122881, 131073, 139265,
       147457,
       155649, 163841, 172033, 180225, 188417, 196609, 204801,
       212993, 221185,
       229377, 237569, 245761, 253953, 262145, 270337, 278529,
       286721, 294913,
       303105, 311297, 319489, 327681, 335873, 344065, 352257,
       360449, 368641,
       376833, 385025, 393217, 401409, 409601, 417793, 425985,
       434177, 442369,
       450561, 458753, 466945

       Writing inode tables: done
       Writing superblocks and filesystem accounting information: done
  Rinitialisation...
  Montage du disque...
  J'ai encore ajout une entre  la fstab :
       /dev/sdb           /mnt/dostical          msdos   noauto,rw,user 0 0
  A prsent, je peux accder  des disques optiques formats aussi bien en
  ext2 qu'en msdos en utilisant au choix le point d'ancrage optical ou
  dostical.




  55..  LLeess jjuukkee--bbooxx ooppttiiqquueess

  Je n'ai pas eu l'occasion d'essayer de juke-box optiques avec Linux
  mais avec HP-UX. Dans cette configuration, le juke-box disposait de
  son propre adressage SCSI et  chaque lecteur tait associ un LUN. A
  chaque face d'un disque correspondait un priphrique. La commande de
  montage prenait le priphrique adquat en argument. Je disposais d'un
  juke-box avec un seul lecteur et 16 platines, soit 20 Go de
  disponibles. Je m'imaginais que l'criture d'un gestionnaire de
  montage pour le partage des disques entre utilisateurs serait une
  vritable corve jusqu' ce que je dcouvre que le gestionnaire du
  juke-box autorisait le montage d'un nombre quelconque de disques dont
  il assurait l'arbitrage. Voil une fonctionnalit sympathique !  Bien
  sr, on reste cantonn  de la lecture pour un systme dans lequel on
  espre qu'il n'y aura pas trop de processus  accder simultanment au
  juke-box. Le disque s'arrte, le support le charge, se dplace, le
  range, se dplace encore, charge un autre disque, le met en place, le
  lecteur le charge, prend 12 secondes pour se mettre  tourner
  -- toujours avec nous ?  Un train d'enfer en vrit !


  55..11..  MMaaxxooppttiixx 552200 -- ZZeedd SShhaaww

  shawz@imap1.asu.edu

  55..11..11..  MMeessssaaggee oorriiggiinnaall ddee ZZeedd -- 1133 ffvvrriieerr 11999988















  Bonjour,

    j'tais en train de lire votre guide (une vraie trousse de survie, merci)
  et je me demandais de quel type de juke-box vous vous serviez ? J'ai un
  Maxoptix 520 -- 20 disques de 2,6 Go chacun, sympa -- et j'aimerais arriver 
  le piloter depuis une machine sous Linux pour que mes utilisateurs puissent
  lire les disques. L'accs aux lecteurs me pose de srieux problmes. Pour
  l'instant, je ne vois que deux lecteurs et quelque chose qui rpond au doux
  nom de MAXLYB. Je pense qu'il s'agit d'un vague contrleur.
  Je me demandais si votre juke-box tait du mme type ou similaire et comment
  vous l'aviez install. Bien que vous soyez sous HP-UX, toute information
  serait la bienvenue. Je suis dispos  vous donner accs  ma machine si
  vous voulez voir  quoi ressemble le juke-box. 52 Go de capacit de stockage,
  il n'y a pas mieux !
  Votre aide sera vraiment la bienvenue.

  Zed A. Shaw
  Application Systems Analyst
  Arizona State University




  55..11..22..  cchhaannggee aavveecc ZZeedd llee lluunnddii 1166 ffvvrriieerr 11999988 ::










































  > Il semblerait que votre Maxoptix 520 soit un juke-box  deux lecteurs.
  Oui, celui-l mme.

  >
  > Tous les juke-box sont munis d'un contrleur de platine. Il s'agit
  > probablement du priphrique MAXLYB.
  > ...

  J'ai dcouvert que l'on ne s'inquitait pas trop chez Maxoptix quand il
  tait question de pilotes. Manifestement, il n'en ont pas crit le moindre
  pour quelque interface que ce soit ! J'ignore comment une socit pareille
  peut vivre. Je vais encore les harceler, vous avez raison, l'engin
  a besoin d'un pilote qui gre sa platine. Du ct des bonnes nouvelles,
  on signale que le MX520 (il s'agit du numro de srie du juke-box) mule
  pas mal de contrleurs diffrents. Peut-tre un de ceux-ci est-il gr ?
  Je vais regarder a.

  >
  > Prenez donc contact avec Maxoptix afin de voir s'ils disposent d'un logiciel
  > correspondant  votre version du noyau Linux. Si ce n'est pas le cas,
  > demandez-leur les spcifications de programmation du contrleur de platine et
  > peut-tre pourrons-nous en crire un !
  >

  Pour sr, si je n'arrive pas  obtenir le moindre pilote et que j'arrive 
  convaincre les gens de Maxoptix de me fournir les spcifications, je serai le
  premier heureux d'crire un pilote. Je demanderai surement de l'aide vu que je
  manque de temps pour tout faire moi-mme. Connaissez-vous quelqu'un d'autre
  dont nous pourrions tirer quelque chose ?

  >
  > Transmettez-moi les informations que vous obtiendrez afin que je les
  > intgre, ainsi que les remerciements, dans le HOWTO.
  >

  Naturellement. Je vais commencer par glaner quelques informations. Pour
  l'instant a reste lger.

  > > Je me demandais si votre juke-box tait du mme type ou similaire et
  > > comment vous l'aviez install. Bien que vous soyez sous HP-UX, toute
  > > information serait la bienvenue. Je suis dispos  vous donner accs 
  > > ma machine si vous voulez voir  quoi ressemble le juke-box. 52 Go de
  > > capacit de stockage, il n'y a pas mieux !
  >
  > Excellent.  mon domicile j'emploie PPP pour monter les 84 plateaux de
  > mon juke-box HP. a s'avre assez lent. Je prfrerais l'avoir sous la main.

  Je ne dispose pas de cet engin chez moi : les 30000 dollars que mon employeur
  a dpens pour l'obtenir me font dfaut. Nanmoins, il n'en a rien tir et
  a d le laisser ramasser la poussire depuis un an. Il me laisse donc
  m'amuser avec et essayer de lui trouver un usage.

  Je reprendrai contact ds que j'aurai des informations supplmentaires,
  srement en cours de semaine lorsque je saurai si je peux le faire
  fonctionner ou non.

  Zed









  Oracle Database HOWTO
  Paul Haigh, paul@nailed.demon.co.uk
  Adaptation franaise par Stphane Lee Chip Hing, slee@ile-
  maurice.com
  v1.2, 04 aot 1998

  Un guide pour installer et configurer le Serveur de Base de Donnes
  Oracle sur un systme Linux.
  ______________________________________________________________________

  Table des matires























































  1. Introduction

     1.1 Historique des Versions
     1.2 Copyright
     1.3 Mise en garde
     1.4 But de ce HOWTO
     1.5 Pr-Requis
     1.6 Nouvelles d'Oracle Corporation

  2. Installation du logiciel Oracle

     2.1 Prparation du Serveur
        2.1.1 Cration d'un Utilisateur Oracle
     2.2 Installation depuis le CDROM
     2.3 Tches de Post Installation
        2.3.1 Tches pour Root
        2.3.2 Tches pour Oracle
        2.3.3 Ceux que vous pouvez enlever

  3. Cration d'une base de donnes

     3.1 Crer le fichier d'Initialisation
     3.2 Cration du script pour l'installation de la base de donnes
     3.3 Excuter le script pour l'installation de la base de donnes
     3.4 Dmarrer la base de donnes
     3.5 Arrter la base de donnes
     3.6 Crer un Utilisateur par dfaut

  4. Configurer SQL*Net sur le Serveur

     4.1 (TT
     4.2 (TT
     4.3 (TT
     4.4 Lancer et Arrter les Ecouteurs.

  5. Configuration du Client

     5.1 Clients Windows
     5.2 Clients Unix

  6. Lancement et Arrt Automatique

     6.1 (TT
     6.2 (TT

  7. Autres trucs

     7.1 Agent Intelligent

  8. Dpannage

     8.1 Je ne peux pas crer une base de donnes en utilisant Oracle 7.2.x.
     8.2 J'obtiens les dfauts de segmentation dans le

  9. Crdits



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  HHiissttoorriiqquuee ddeess VVeerrssiioonnss



    v0.1 - 21 fv. 1998 - Paul Haigh - Version Originale

    v0.2 - 01 mars 1998 - Paul Haigh - Adjonction des Commentaires des
     Relecteurs

    v1.0 - 10 mars 1998 - Paul Haigh - Publi sous LDP

    v1.1 - 20 juin 1998 - Paul Haigh - Section Dpannage ajoute et
     rangement gnral

    v1.2 - 04 aot 1998 - Paul Haigh - Nouvelles d'Oracle Corp ajoute
     et section sur les Amloirations Futures supprime.


  11..22..  CCooppyyrriigghhtt

  Le HOWTO Oracle Database est copyright (c) 1998, Paul Haigh.

  Comme tous les documents HOWTO Linux, celui-ci peut tre reproduit et
  distribu en entier ou en extrait, sur n'importe quel support,
  physique ou lectronique, tant que ce copyright est maintenu sur
  toutes les copies.


  La redistribution commerciale est autorise et encourage. Cependant,
  l'auteur aimerait tre avis de telles distributions. Vous pouvez
  traduire ce HOWTO dans n'importe quelle langue tant que vous incluez
  une notice prcisant celui ou celle qui a traduit ce document.


  11..33..  MMiissee eenn ggaarrddee

  Bien que j'ai essay d'inclure les informations les plus correctes et
  les plus rcentes a ma disposition, je ne peux garantir que leur
  utilisation ne va pas occasionner des pertes de donnes ou de
  matriel.  Je ne fournis AUCUNE GARANTIE sur les informations dans ce
  HOWTO et je ne suis responsable d'aucune consquence rsultant de
  l'utilisation des informations de ce document.


  11..44..  BBuutt ddee ccee HHOOWWTTOO

  Dans ce HOWTO, je vais essayer de couvrir l'installation et
  l'administration basique d'une base de donnes Oracle tournant sur une
  machine Linux. Je vais couvrir particulirement l'installation du
  serveur Oracle, la configuration de SQL*Net et du client.


  Ce document n'est pas un tutoriel complet sur l'utilisation et
  l'administration d'une base de donnes Oracle. Si c'est cela que vous
  recherchez, il y a de bons livres sur ces sujets publis par O'Reilly
  et autres.


  Je ne vais pas non plus couvrir le dveloppement des programmes Oracle
  sous UNIX. Si cela vous est absolument ncessaire, je vous
  recommanderais d'acheter le systme de dveloppement de SCO (avec
  OpenServer 5.x) , dont on m'a dit qu'il pouvait tre obtenu pour un
  prix trs raisonnable US $19,  SCO <http://www.sco.com>

  11..55..  PPrr--RReeqquuiiss

  Je suppose acquises un certain nombre de notions pour comprendre la
  suite du HOWTO.


    LLee CCDD SSeerrvveeuurr OOrraaccllee ppoouurr SSCCOO OOppeennSSeerrvveerr ((VVeerrssiioonn 77..33..33..00..00..))

        Ceci  ddooiitt tre une copie lgale.  N'oubliez pas qu'Oracle est
        une socit commerciale et vend ses produits. Si vous voulez une
        base de donnes compatible SQL gratuite, utilisez PostgreSQL ou
        quelque chose de similaire.

        Il est aussi possible d'installer Oracle, avec une licence
        d'valuation de 60 jours,  partir d'un fichier tar
        tlchargeable sur le site web d'Oracle. Je ne l'ai pas
        personnellement essay et ce n'est pas vrifi.



    UUnn SSeerrvveeuurr LLiinnuuxx


        Vous n'auriez pas lu ceci sans un... N'est-ce pas?



    NNooyyaauu 22..00..3300++


        Je ne peux garantir que les instructions seront fiables pour les
        autres noyaux. (ni pour le 2.0.30, d'ailleurs...)



    iiBBCCSS


        Il est trs important que ceci soit install et tourne avec la
        version la plus rcente possible pour votre plate-forme.
        (J'utilise iBCS-2.0-10.i386.rpm de RedHat Linux).



    BBeeaauuccoouupp dd''eessppaaccee ddiissqquuee


        600 Mb+ est une quantit raisonnable. Il est possible
        d'installer avec moins de place mais vous devez faire des
        sacrifices, et je ne commence jamais avec a. Nanmoins, je vais
        essayer de souligner les endroits o l'on peut librer de
        l'espace.



    3322MMbb++ RRaamm


        Je sais que ceci peut sembler important, surtout en ce qui
        concerne Linux, mais n'oubliez pas que Oracle est un logiciel
        complexe. Vous n'auriez pas ces rserves sur SCO!

        Je ne dis pas que Oracle ne marchera pas avec moins, mais que
        c'est le minimum recommand par Oracle, ce que je n'aurais pas
        conseill.


    LLiicceenncceess ddee OOrraaccllee


        Je sais que je l'ai deja mentionn ceci mais je voudrais tre
        clair sur son importance. Utilisez les logiciels d'Oracle sans
        licence est illgal.




  11..66..  NNoouuvveelllleess dd''OOrraaccllee CCoorrppoorraattiioonn

  Oracle a cd sous la pression de la communaut Linux. Oracle
  Corporation a dcid de supporter ooffffiicciieelllleemmeenntt Oracle 8 sur la
  plate-forme Linux (i386). Elle doit tre lanc en dcembre 1998, selon
  le site web d'Oracle.

  Mieux encore, Oracle va aussi porter Oracle Applications sur Linux. Il
  doit tre disponible dans le premier semestre 1999, selon le site web
  d'Oracle.

  Rfrences:

    http://www.oracle.com/html/linux.html

    http://www.news.com/News/Item/0,4,24436,00.html

    http://www.zdnet.com/pcweek/news/0720/20morac.html


  22..  IInnssttaallllaattiioonn dduu llooggiicciieell OOrraaccllee

  22..11..  PPrrppaarraattiioonn dduu SSeerrvveeuurr

  22..11..11..  CCrraattiioonn dd''uunn UUttiilliissaatteeuurr OOrraaccllee

  Nous avons videmment besoin d'un utilisateur pour maintenir la base
  de donnes Oracle. Comme nous n'avons l'intention de relier le noyau
  Oracle (plus sur ceci plus tard), nous devons accepter les noms
  d'utilisateur et de groupe par dfaut d'Oracle. Il inclut
  l'utilisateur ORACLE et le groupe DBA.


  1. Se connecter comme root


  2. Crer l'utilisateur oracle et le groupe dba.


       ______________________________________________________________________
       $ groupadd dba
       $ useradd  oracle
       ______________________________________________________________________




  3. S'assurer que le rpertoire personnel est cr pour l'utilisateur
     oracle.


       ______________________________________________________________________
       $ mkdir /home/oracle
       $ mkdir /home/oracle/7.3.3.0.0 (Version of Oracle)
       $ chown -R oracle.dba /home/oracle
       ______________________________________________________________________





  22..22..  IInnssttaallllaattiioonn ddeeppuuiiss llee CCDDRROOMM

  Malheureusement, l'Installateur Oracle sur le CD SCO ne marchera pas.
  Beaucoup de problmes peut tre rencontrs, des core dumps aux
  blocages. On doit donc copier les fichiers du CDROM manuellement et
  les dcompresser:

  (S'assurer que le CDROM est mont sur le systme).

  1. Se connecter comme utilisateur Oracle

  2. Changer de rpertoire pour /home/oracle/7.3.3.0.0.

  3. Copier les fichiers d'installation du CDROM


       ______________________________________________________________________
       $ cp -a /mnt/cdrom/* .
       ______________________________________________________________________




  4. Dcompresser les fichiers Oracle du CDROM.


       ______________________________________________________________________
       $ find . -name *_ -exec ~/7.3.3.0.0/orainst/oiuncomp {} \;
       ______________________________________________________________________





  22..33..  TTcchheess ddee PPoosstt IInnssttaallllaattiioonn

  22..33..11..  TTcchheess ppoouurr RRoooott

  Ajouter les lignes suivantes dans /etc/profile ou  dans  .profile pour
  chaque utilisateur d'Oracle.


       ______________________________________________________________________
       # Oracle Specific
       ORACLE_HOME=/home/oracle/7.3.3.0.0
       ORACLE_SID=orcl
       ORACLE_TERM=vt100
       export ORACLE_HOME ORACLE_SID ORACLE_TERM

       # Changer le chemin pour Oracle
       PATH="$PATH:$ORACLE_HOME/bin"
       ______________________________________________________________________





  Nous devons aussi changer le propritaire et les permissions de
  l'utilitaire Oracle d'augmentation de ulimit.


       ______________________________________________________________________
       $ chown root.root $ORACLE_HOME/bin/osh
       $ chmod u+s $ORACLE_HOME/bin/osh
       ______________________________________________________________________

  22..33..22..  TTcchheess ppoouurr OOrraaccllee

  Changer les permissions pour les fichiers Oracle pour s'assurer de
  leur bonne excution.


       ______________________________________________________________________
       $ chmod +x $ORACLE_HOME/bin/*
       $ chmod u+s $ORACLE_HOME/bin/oracle
       ______________________________________________________________________





  Les outils Oracle demandent que les messages soient dans le rpertoire
  $ORACLE_HOME/tool_name/mesg.  Donc, dplacez les fichiers  msb  des
  rpertoires  msg_ship aux rpertoires mesg.


       ______________________________________________________________________
       $ mv $ORACLE_HOME/plsql/mesg/mesg_ship/* $ORACLE_HOME/plsql/mesg/.
       $ mv $ORACLE_HOME/rdbms/mesg/mesg_ship/* $ORACLE_HOME/rdbms/mesg/.
       $ mv $ORACLE_HOME/svrmgr/mesg/mesg_ship/* $ORACLE_HOME/svrmgr/mesg/.
       ______________________________________________________________________




  Crer les rpertoires suivants, s'ils n'existent pas:


       ______________________________________________________________________
       $ mkdir $ORACLE_HOME/rdbms/log
       $ mkdir $ORACLE_HOME/rdbms/audit
       $ mkdir $ORACLE_HOME/network/log
       ______________________________________________________________________




  22..33..33..  CCeeuuxx qquuee vvoouuss ppoouuvveezz eennlleevveerr

  Les rpertoires suivants peuvent tre enlevs sans problme:

    $ORACLE_HOME/guicommon2/

    $ORACLE_HOME/ctx/

    $ORACLE_HOME/md/

    $ORACLE_HOME/mlx/

    $RACLE_HOME/precomp/

    $ORACLE_HOME/slax/

  33..  CCrraattiioonn dd''uunnee bbaassee ddee ddoonnnneess

  Maintenant que le serveur Oracle est install, nous devons crer une
  base de donnes pour tester l'installation.  Si vous utilisez Oracle
  7.2.x ou une version anterieure, veuillez lire la section Dpannage
  ci-dessous.



  33..11..  CCrreerr llee ffiicchhiieerr dd''IInniittiiaalliissaattiioonn

  Copiez $ORACLE_HOME/dbs/init.ora vers $ORACLE_HOME/dbs/initorcl.ora:


       ______________________________________________________________________
       $ cd $ORACLE_HOME/dbs
       $ cp init.ora initorcl.ora
       ______________________________________________________________________




  Le modifier en ajoutant les lignes suivantes:


       ______________________________________________________________________
       db_name = orcl
       COMPATIBLE=7.3.3.0.0
       ______________________________________________________________________






  33..22..  CCrraattiioonn dduu ssccrriipptt ppoouurr ll''iinnssttaallllaattiioonn ddee llaa bbaassee ddee ddoonnnneess

  Crer un fichier script nomm makedb.sql dans le rpertoire
  $ORACLE_HOME/dbs:


       ______________________________________________________________________
       connect internal
       startup nomount
       set echo on
       spool makedb.log
       create database orcl
               maxinstances 1
               maxlogfiles  8
               datafile '$ORACLE_HOME/dbs/orcl_syst_01.dbf' size 40M reuse
               logfile
                       '$ORACLE_HOME/dbs/orcl_redo_01.dbf' size 1M reuse,
                       '$ORACLE_HOME/dbs/orcl_redo_02.dbf' size 1M reuse,
                       '$ORACLE_HOME/dbs/orcl_redo_03.dbf' size 1M reuse;
       @$ORACLE_HOME/rdbms/admin/catalog.sql
       create tablespace rollback
               datafile '$ORACLE_HOME/dbs/orcl_roll_01.dbf' size 8.5M reuse;
       create tablespace temp
               datafile '$ORACLE_HOME/dbs/orcl_temp_01.dbf' size 5M reuse
               temporary;
       create tablespace users
               datafile '$ORACLE_HOME/dbs/orcl_user_01.dbf' size 10M reuse;
       create rollback segment r1 tablespace rollback
               storage ( optimal 5M );
       alter rollback segment r1 online;
       connect system/manager
       @$ORACLE_HOME/rdbms/admin/catdbsyn.sql
       connect internal
       @$ORACLE_HOME/rdbms/admin/catproc.sql
       connect system/manager
       @$ORACLE_HOME/sqlplus/admin/pupbld.sql
       spool off
       exit
       ______________________________________________________________________

  33..33..  EExxccuutteerr llee ssccrriipptt ppoouurr ll''iinnssttaallllaattiioonn ddee llaa bbaassee ddee ddoonnnneess

  Dmarrer svrmgrl et excuter le script:


       ______________________________________________________________________
       $ cd $ORACLE_HOME/dbs
       $ svrmgrl

       Oracle Server Manager Release 2.3.3.0.0 - Production

       Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.

       Oracle7 Server Release 7.3.3.0.0 - Production Release
       PL/SQL Release 2.3.3.0.0 - Production

       SVRMGR> connect internal
       Connected.
       SVRMGR> startup nomount
       ORACLE instance started.
       Total System Global Area       4313312 bytes
       Fixed Size                       41876 bytes
       Variable Size                  4140364 bytes
       Database Buffers                122880 bytes
       Redo Buffers                      8192 bytes
       SVRMGR> @makedb
       <beaucoup de messages>
       SVRMGR> exit
       Server Manager complete.
       ______________________________________________________________________




  33..44..  DDmmaarrrreerr llaa bbaassee ddee ddoonnnneess

  Premirement, nous devons lancer la base de donnes manuellement (nous
  l'automatiserons plus tard). Pour dmarrer une base de donnes Oracle,
  nous devons mettre la commande startup en tant connect localement:


       ______________________________________________________________________
       $ svrmgrl

       Oracle Server Manager Release 2.3.3.0.0 - Production

       Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.

       Oracle7 Server Release 7.3.3.0.0 - Production Release
       PL/SQL Release 2.3.3.0.0 - Production

       SVRMGR> connect internal
       Connected.
       SVRMGR> startup
       ORACLE instance started.
       Total System Global Area       4313316 bytes
       Fixed Size                       41876 bytes
       Variable Size                  4140368 bytes
       Database Buffers                122880 bytes
       Redo Buffers                      8192 bytes
       Database mounted.
       Database opened.
       SVRMGR> exit
       Server Manager complete.
       ______________________________________________________________________

  33..55..  AArrrrtteerr llaa bbaassee ddee ddoonnnneess

  Il est important de mentionner ici que redmarrer un serveur Linux
  sans fermer auparavant la base de donnes Oracle risque fort de
  corrompre la base de donnes.

  Donc, avant d'mettre la commande Linux shutdown, il est sage de
  fermer le base de donnes:


       ______________________________________________________________________
       $ svrmgrl

       Oracle Server Manager Release 2.3.3.0.0 - Production

       Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.

       Oracle7 Server Release 7.3.3.0.0 - Production Release
       PL/SQL Release 2.3.3.0.0 - Production

       SVRMGR> connect internal
       Connected.
       SVRMGR> shutdown
       Database closed.
       Database dismounted.
       ORACLE instance shut down.
       SVRMGR> exit
       Server Manager complete.
       ______________________________________________________________________




  33..66..  CCrreerr uunn UUttiilliissaatteeuurr ppaarr ddffaauutt

  La base de donnes, telle qu'elle a t cre, a deux utilisateurs
  spciaux qui sont crs automatiquement. Ce sont;


       ______________________________________________________________________
       Username                Password

       SYSTEM                  MANAGER
       SYS                     change_on_install
       ______________________________________________________________________





  Ces utilisateurs sont typiquement utiliss pour maintenir les
  informations sur le dictionnaire standard de donnes pour la base de
  donnes. C'est une bonne ide de changer les mots de passe par dfaut
  aussitt que possible.


  Ceci peut tre fait par:









  ______________________________________________________________________
  sqlplus system/manager

  SQL*Plus: Release 3.3.3.0.0 - Production on Sat Feb 21 12:43:33 1998

  Copyright (c) Oracle Corporation 1979, 1996.  All rights reserved.


  Connected to:
  Oracle7 Server Release 7.3.3.0.0 - Production Release

  SQL> alter user system identified by <newpassword>;

  User altered.

  SQL> alter user sys identified by <newpassword>;

  User altered.

  SQL> exit;
  Disconnected from Oracle7 Server Release 7.3.3.0.0 - Production Release
  PL/SQL Release 2.3.3.0.0 - Production
  ______________________________________________________________________





  Comme l'utilisateur system/manager est similaire  l'utilisateur root
  sur une machine UNIX, nous devons crer un utilisateur avec moins de
  pouvoir  causer des dgats possibles (rappelez-vous de lancer la base
  de donnes avant d'essayer de crer un utilisateur).

  Se connecter  SQL*Plus et crer un utilisateur:


       ______________________________________________________________________
       $ sqlplus system/manager

       SQL*Plus: Release 3.3.3.0.0 - Production on Sat Feb 21 12:43:33 1998

       Copyright (c) Oracle Corporation 1979, 1996.  All rights reserved.


       Connected to:
       Oracle7 Server Release 7.3.3.0.0 - Production Release
       PL/SQL Release 2.3.3.0.0 - Production

       SQL> create user <user> identified by <psw>
         2  default tablespace users
         3  temporary tablespace temp;

       User created.

       SQL> grant connect, resource to <user>

       Grant succeeded.

       SQL> exit
       Disconnected from Oracle7 Server Release 7.3.3.0.0 - Production Release
       PL/SQL Release 2.3.3.0.0 - Production
       ______________________________________________________________________




  Maintenant que vous avez un nouvel utilisateur sur le systme, vous
  pouvez jouer avec. Pour se connecter sur la base de donnes Oracle:


       ______________________________________________________________________
       $ sqlplus <user>/<password>
       ______________________________________________________________________




  Si ceci s'excute sans messages d'erreur, vous avez donc une base de
  donnes Oracle qui marche. Si vous ne voulez vous connecter qu'
  partir de ce serveur, votre travail est donc termin. Amusez-vous!

  Si, cependant, comme la plupart des gens, vous voulez configurer la
  partie rseau du logiciel pour que vous puissiez vous connecter depuis
  d'autres machine, continuez votre lecture.



  44..  CCoonnffiigguurreerr SSQQLL**NNeett ssuurr llee SSeerrvveeuurr

  Tous ces fichiers configurent la partie rseau d'Oracle (SQL*Net ou
  Net8 pour Oracle8). Ces fichiers doivent tre crs sur le serveur
  dans le rpertoire $ORACLE_HOME/network/admin.

  44..11..  ttnnssnnaammeess..oorraa

  Le fichier TNSNAMES.ORA identifie les services disponibles depuis la
  machine. Dans notre cas, nous dcrirons toutes les bases de donnes
  que le serveur a mont. Pour chaque base de donnes sur votre serveur,
  ajouter une section comme ci-dessous:



       ______________________________________________________________________
       orcl.world =
         (DESCRIPTION =
           (ADDRESS_LIST =
               (ADDRESS =
                 (COMMUNITY = tcp.world)
                 (PROTOCOL = TCP)
                 (Host = <INSERER LE NOM LOGIQUE DU SERVEUR ICI> )
                 (Port = 1521)
               )
               (ADDRESS =
                 (COMMUNITY = tcp.world)
                 (PROTOCOL = TCP)
                 (Host = <INSERER LE NOM LOGIQUE DU SERVEUR ICI> )
                 (Port = 1526)
               )
           )
           (CONNECT_DATA = (SID = ORCL)
           )
         )
       ______________________________________________________________________




  44..22..  lliisstteenneerr..oorraa

  Le fichier listener.ora contient la description des services auxquels
  d'autres machines sont autorises  se connecter et toutes les
  configurations ncessaires pour l'couteur du serveur.
  Il contient les sections pour le nom de l'couteur, son adresse, les
  bases de donnes desservies par l'couteur et les paramtres de
  configuration.


  Voici un exemple:


       ______________________________________________________________________
       # Nom de l'couteur et les adresses a couter
       LISTENER =
               ( ADDRESS_LIST =
                       (ADDRESS =
                               (PROTOCOL=tcp)
                               (HOST=<INSERT HOST>)
                               (PORT=1521)
                               (COMMUNITY=UK_SUP_TCPIP)
                       )
                       (ADDRESS =
                               (PROTOCOL=ipc)
                               (KEY=700)
                               (COMMUNITY=UK_SUP_TCPIP)
                       )
               )

       # Liste des services dsservis par l'couteur
       SID_LIST_LISTENER=
               (SID_LIST=
                       (SID_DESC=
                               (SID_NAME=orcl)
                               (ORACLE_HOME=/home/oracle/7.3.3.0.0)
                       )
               )

       # Dbut des paramtres de configuration
       TRACE_LEVEL_LISTENER=OFF
       TRACE_FILE_LISTENER = "listener"
       LOG_FILE_LISTENER = "listener"
       CONNECT_TIMEOUT_LISTENER = 10
       STOP_LISTENER = YES
       DBA_GROUP = dba
       ______________________________________________________________________




  44..33..  ssqqllnneett..oorraa

  Le fichier sqlnet.ora contient la configuration pour le noeud du
  rseau. Ceci est indpendant du nombre de bases de donnes ou du
  nombre d'couteurs. La chose la plus importante dans ce fichier est la
  variable de configuration Timeout des Connexions Mortes.


  Le timeout des connexions mortes vrifie chaque processus entrant  la
  base de donnes et assure que le ct client rpond toujours. Si le
  client (de tout type) ne rpond pas, le processus en tche de fond du
  serveur Oracle sera tu.

  Ceci est trs utile si vous avez plusieurs clients qui accdent  la
  base de donnes, surtout pendant la phase de dveloppement o ces
  clients ne russiront certainement pas  sortir proprement de la base
  de donnes Oracle.



  Voici une copie de mon fichier sqlnet.ora pour vous servir d'exemple:


       ______________________________________________________________________
       TRACE_LEVEL_CLIENT = OFF
       sqlnet.expire_time = 30         # le nombre de secondes entre les vrifications des clients.
       names.default_domain = world
       name.default_zone = world
       ______________________________________________________________________





  44..44..  LLaanncceerr eett AArrrrtteerr lleess EEccoouutteeuurrss..

  Maintenant que la configuration des couteurs et de SQL*Net est finie,
  nous pouvons essayer de connecter la base de donnes en utilisant la
  partie rseau. (Avant nous utilisions l'accs direct  la base de
  donnes, alors qu'ici nous simulons une connexion depuis une machine
  cliente distante).


  Pour lancer l'couteur en utilisant la configuration ci-dessus:


       ______________________________________________________________________
       $ lsnrctl

       LSNRCTL for SCO System V/386: Version 2.3.3.0.0 - Production on 23-FEB-98 20:38:25

       Copyright (c) Oracle Corporation 1994.  All rights reserved.

       Welcome to LSNRCTL, type "help" for information.

       LSNRCTL> start
       Starting /home/oracle/7.3.3.0.0/bin/tnslsnr: please wait...

       TNSLSNR for SCO System V/386: Version 2.3.3.0.0 - Production
       System parameter file is /home/oracle/7.3.3.0.0/network/admin/listener.ora
       Log messages written to /home/oracle/7.3.3.0.0/network/log/listener.log
       Listening on: (ADDRESS=(PROTOCOL=tcp)(DEV=6)(HOST=192.168.1.1)(PORT=1521))
       Listening on: (ADDRESS=(PROTOCOL=ipc)(DEV=10)(KEY=700))

       Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=magic.com)(PORT=1521)(COMMUNITY=UK_SUP_TCPIP))
       STATUS of the LISTENER
       ------------------------
       Alias                     LISTENER
       Version                   TNSLSNR for SCO System V/386: Version 2.3.3.0.0 - Production
       Start Date                23-FEB-98 20:38:50
       Uptime                    0 days 0 hr. 0 min. 0 sec
       Trace Level               off
       Security                  OFF
       SNMP                      ON
       Listener Parameter File   /home/oracle/7.3.3.0.0/network/admin/listener.ora
       Listener Log File         /home/oracle/7.3.3.0.0/network/log/listener.log
       Services Summary...
         orcl          has 1 service handler(s)
       The command completed successfully
       LSNRCTL> exit
       ______________________________________________________________________





  Pour arrter les couteurs:


       ______________________________________________________________________
       $ lsnrctl

       LSNRCTL for SCO System V/386: Version 2.3.3.0.0 - Production on 23-FEB-98 20:43:20

       Copyright (c) Oracle Corporation 1994.  All rights reserved.

       Welcome to LSNRCTL, type "help" for information.

       LSNRCTL> stop
       Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=magic.com)(PORT=1521)(COMMUNITY=UK_SUP_TCPIP))
       The command completed successfully
       LSNRCTL> exit
       ______________________________________________________________________




  Si vous avez une configuration DNS qui ne retourne pas l'adresse IP
  pour le nom logique specifi, le lancement et l'arrt de l'couteur
  prendront donc in certain temps. (2-3 mins. dpendant de la variable
  timeout du DNS). Si c'est le cas , ne vous inquitez pas. Soyez
  patient.



  55..  CCoonnffiigguurraattiioonn dduu CClliieenntt

  55..11..  CClliieennttss WWiinnddoowwss

  La configuration SQL*Net sur un PC avec les versions rcentes du
  logiciel Client Oracle est trs facile. La meilleure faon (et la plus
  facile) pour russir l'installation d'un client qui marche
  entirement, est d'utiliser l'outil SQL*Net Easy Configuration fourni
  par Oracle.

  Cet outil a une interface qui vous guidera dans l'installation des
  fichiers tnsnames.ora et sqlnet.ora.

  Slectionnez "Add Database Alias" et entrez le nom pour l'alias
  demand.  Cet alias est le nom par lequel vous allez vous rfrer 
  l'instance de la base de donnes, et doit donc tre le mme que celui
  de l'instance (orcl dans ce cas).

  Slectionnez TCP/IP comme protocole, le nom logique de la machine
  hbergeant la base de donnes et le nom de l'instance de la base de
  donnes.

  C'est tout.

  Cependant, si vous n'avez pas l'outil SQL*Net Easy Configuration Tool,
  ne vous inquietez pas. Vous pouvez simplement crer les fichiers
  tnsnames.ora et sqlnet.ora dans le rpertoire
  $ORACLE_HOME/network/admin sur le client, exactement comme sur le
  serveur.  Il fournira comme alias le mme que sur le serveur (toujours
  une bonne ide de toute faon).

  55..22..  CClliieennttss UUnniixx

  Les clients UNIX ne sont pas trs diffrents des clients Windows. Si
  vous avez Network Manager d'Oracle, alors utilisez-le de la mme faon
  que ci-dessus, sinon vous pouvez utiliser juste les mmes fichiers de
  configuration que sur le serveur dans le rpertoire
  $ORACLE_HOME/network/admin.

  66..  LLaanncceemmeenntt eett AArrrrtt AAuuttoommaattiiqquuee

  66..11..  ddbbssttaarrtt  eett ddbbssttoopp

  Le dmarrage et l'arrt automatique de la base de donnes Oracle
  peuvent tre effectus (avec la version 7.3.3.0.0) avec les fichiers
  dbstart et dbshut, tous deux fournis par Oracle. Ces fichiers
  dpendent sur l'existence du fichier /etc/oratab pour fonctionner
  (bien qu'en modifiant les fichiers dbshut et dbstart il puissent tre
  dplacs).

  Le format du fichier /etc/oratab est le suivant:


       ______________________________________________________________________
       SID:ORACLE_HOME:AUTO
       ______________________________________________________________________




  Un  exemple:


       ______________________________________________________________________
       orcl:/home/oracle/7.3.3.0.0:Y
       leaveup:/home/oracle/7.3.2.1.0:N
       ______________________________________________________________________




  66..22..  iinniitt..dd  eett rrcc..dd

  Pour dmarrer et arrter la base de donnes quand la machine se lance
  ou s'teint, il faut modifier les routines de dmarrage pour la
  machine Linux. Ceci est trs facile, bien que je devrais souligner que
  cela peut changer suivant la distribution Linux (Slackware, Debian,
  RedHat, etc).  Je vais montrer quelques exemples qui marchent avec
  RedHat Linux 5.0. Pour modifier ceux-ci pour votre propre distribution
  Linux, veuillez voir votre documentation Linux. (bien que ceci doit
  tre valable pour n'importe quel UNIX de type Sys V)


  Premirement, nous devons crer le script qui excutera  dbshut et
  dbstart dans le rpertoire  /etc/rc.d/init.d . Crez le fichier
  suivant comme /etc/rc.d/init.d/oracle:

















  ______________________________________________________________________
  #!/bin/sh
  #
  # /etc/rc.d/init.d/oracle
  # Description: Starts and stops the Oracle database and listeners
  # See how we were called.
  case "$1" in
    start)
          echo -n "Starting Oracle Databases: "
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Starting Oracle Databases as part of system up." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          su - oracle -c dbstart >> /var/log/oracle
          echo "Done."
          echo -n "Starting Oracle Listeners: "
          su - oracle -c "lsnrctl start" >> /var/log/oracle
          echo "Done."
          echo ""
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Finished." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          touch /var/lock/subsys/oracle
          ;;
    stop)
          echo -n "Shutting Down Oracle Listeners: "
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Shutting Down Oracle Databases as part of system down." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          su - oracle -c "lsnrctl stop" >> /var/log/oracle
          echo "Done."
          rm -f /var/lock/subsys/oracle
          echo -n "Shutting Down Oracle Databases: "
          su - oracle -c dbshut >> /var/log/oracle
          echo "Done."
          echo ""
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Finished." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          ;;
    restart)
          echo -n "Restarting Oracle Databases: "
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Restarting Oracle Databases as part of system up." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          su - oracle -c dbstop >> /var/log/oracle
          su - oracle -c dbstart >> /var/log/oracle
          echo "Done."
          echo -n "Restarting Oracle Listeners: "
          su - oracle -c "lsnrctl stop" >> /var/log/oracle
          su - oracle -c "lsnrctl start" >> /var/log/oracle
          echo "Done."
          echo ""
          echo "----------------------------------------------------" >> /var/log/oracle
          date +"! %T %a %D : Finished." >> /var/log/oracle
          echo "----------------------------------------------------" >> /var/log/oracle
          touch /var/lock/subsys/oracle
          ;;
    *)
          echo "Usage: oracle {start|stop|restart}"
          exit 1
  esac
  ______________________________________________________________________




  Il vaut la peine de vrifier si le fichier arrte et dmarre vraiment
  correctement les bases de donnes pour le systme.  Vrifiez le
  fichier de log, /var/log/oracle, pour les messages d'erreur.

  Une fois que le script marche, nous devons crer les liens symboliques
  de start et kill dans les rpertoires appropris de niveau d'excution
  (runlevel) /etc/rc.d/rcX.d.

  Les commandes suivantes assureront que les bases de donnes vont
  dmarrer dans les niveaux d'excution 2,3 et 4:


       ______________________________________________________________________
       $ ln -s ../init.d/oracle /etc/rc.d/rc2.d/S99oracle
       $ ln -s ../init.d/oracle /etc/rc.d/rc3.d/S99oracle
       $ ln -s ../init.d/oracle /etc/rc.d/rc4.d/S99oracle
       ______________________________________________________________________




  Pour arrter les bases de donnes avant un ramorage ou arrt, nous
  avons besoin des liens suivants:


       ______________________________________________________________________
       $ ln -s ../init.d/oracle /etc/rc.d/rc0.d/K01oracle          # Halting
       $ ln -s ../init.d/oracle /etc/rc.d/rc6.d/K01oracle          # Rebooting
       ______________________________________________________________________




  77..  AAuuttrreess ttrruuccss

  77..11..  AAggeenntt IInntteelllliiggeenntt

  Si vous avez besoin d'un Agent Intelligent Oracle, vous pouvez
  l'excuter sans changement de la configuration.

  Pour dmarrer le AI, essayez:


       ______________________________________________________________________
       $ lsnrctl dbsnmp_start
       ______________________________________________________________________




  Pour arrter l'AI, essayez:


       ______________________________________________________________________
       $ lsnrctl dbsnmp_stop
       ______________________________________________________________________




  Il ne semble pas y avoir de message indiquant le lancement avec succs
  ou non de l'agent intelligent.  Cependant, l'AI rpond au gestionnaire
  _E_n_t_e_r_p_r_i_s_e sur le ct client. Donc, je ne peux que supposer qu'il
  marche.


  88..  DDppaannnnaaggee

  Voir ci-dessous les diffrents conseils de dpannage.

  88..11..  JJee nnee ppeeuuxx ppaass ccrreerr uunnee bbaassee ddee ddoonnnneess eenn uuttiilliissaanntt OOrraaccllee
  77..22..xx..

  Les fichiers expdis par Oracle dans les versions 7.2.x sont
  incorrects en supposant que vous voulez installer une configuration
  parallle de serveur. Le fichier init.ora contient la ligne suivante:


       ______________________________________________________________________
       # define parallel server (multi-instance) parameters
       ifile = ora_system:initps.ora
       ______________________________________________________________________




  Pour fixer le problme, mettez la en commentaire:


       ______________________________________________________________________
       # define parallel server (multi-instance) parameters
       #ifile = ora_system:initps.ora
       ______________________________________________________________________




  88..22..  JJ''oobbttiieennss lleess ddffaauuttss ddee sseeggmmeennttaattiioonn ddaannss llee  ssvvrrmmggrrll  ddee llaa
  vveerrssiioonn 77..33..44..xx..

  Ce problme m'a t signal par un certain nombre de personnes.
  Gerald Weber gerald_weber@master.co.at l'a rsolu:






























  ______________________________________________________________________
  Bonjour Paul,

  D'abord merci pour votre aide, mais aucun des problmes possubles que vous pensez n'tait responsable de mon problme.
  Le problme esy l'mulateur iBCS lui-mme.
  Il semble que Oracle excute les appels sysconf qui ne sont pas supports dans la version en cours d'iBCS.
  Regardez la trace:

  <7>[22]615 sysconf(34)
  <7>iBCS2 unsupported sysconf call 34
  <7>[22]615 sysconf error return linux=-22 -> ibcs=22 <Invalid argument>
  <7>[24]615 sysconf(34)
  <7>iBCS2 unsupported sysconf call 34
  <7>[24]615 sysconf error return linux=-22 -> ibcs=22 <Invalid argument>

  Solution:  patcher iBCS-source.apply avec le diff-patch suivant:


  --- sysconf.c   Sun Apr 19 19:19:15 1998
  +++ sysconf.c.ori       Sun Apr 19 19:28:45 1998
  @@ -60,7 +60,6 @@
   #define _SC_JOB_CONTROL        5
   #define _SC_SAVED_IDS  6
   #define _SC_VERSION    7
  -#define _SC_HACK_FOR_ORACLE 34

   #define _SC_PAGESIZE   11

  @@ -97,11 +96,6 @@
                  case _SC_SAVED_IDS: {
                          return (1);
                  }
  -
  -               case _SC_HACK_FOR_ORACLE: {
  -                 return (1);
  -               }
  -

                  case _SC_PAGESIZE: {
                    return PAGE_SIZE;
  ______________________________________________________________________





  99..  CCrrddiittss

  Ce document est bas sur un document crit par Bob Withers. Des
  informations supplmentaires sont extraites des documents crits par
  Georg Rehfeld et David Mansfield.

  Relectures supplmentaires faites par Bob Withers, Mark Watling, Peter
  Sodhi et Greg Hankins.

  Mes remerciements vont au support immense de la part des gens
  impliqus dans ce document et aux recherches qu'ils ont effectues.
  Remerciements particuliers  Bob Withers et Mark Watling pour leurs
  commentaires additionnels et l'aide qu'ils m'ont apporte.







  Linux PCI-HOWTO
  par Michael Will, Michael.Will@student.uni-tuebingen.de
  version 0.5h, 15 Novembre 1995

  Linux et les cartes-meres PCI

  11..  IInnttrroodduuccttiioonn

  De  nombreux utilisateurs de Linux --- y compris votre serviteur ! ---
  aimeraient employer Linux sur une machine  a  bus  PCI.   Ce  document
  propose  une  etude  de  la  compatibilite  des  cartes  PCI (meres et
  d'extension) avec Linux, realisee grace a  une  enquete  menee  aupres
  d'utilisateurs.

  Si  vous  disposez d'informations a ce propos (et dignes d'interet !),
  n'hesitez a contacter l'auteur de ce document ou, si  l'anglais  ecrit
  genere  une  terrible  angoisse,  celui  de cette adaptation francaise
  (adresse email : cf. derniere page).

  Dans ce document le terme "embarque" designe un circuit  installe  sur
  la  carte-mere,  par  opposition  a un composant de carte d'extension.
  J'ai traduit "driver" par "pilote".

  22..  PPCCII ...... ppoouurrqquuooii ??

  22..11..  AAppeerrccuu ggeenneerraall

  Le bus d'un PC peut mettre en oeuvre une ou plusieurs des normes  dont
  la  liste suit (certaines d'entre elles sont mutuellement exclusives).

     IISSAA
        Peu onereux, lent (le plus souvent 8Mhz),  standard,  nombre  de
        cartes d'extension disponibles tres eleve

     EEIISSAA
        Onereux,  rapide, relativement peu de cartes specifiques (seules
        capables d'exploiter au mieux ses possibilites)

     MMCCAA
        Concu et cautionne par IBM. Rapide mais peu repandu

     VVEESSAA--BBuuss llooccaall
        Base sur l'ISA (qu'il epaule), peu onereux, rapide, relativement
        peu de cartes specifiques.

     PPCCII--BBuuss llooccaall
        Onereux,  rapide,  peu  de  cartes  specifiques mais ce standard
        l'emportera probablement, ce qui diminuera le cout et la  rarete
        des materiels compatibles.

  ISA/VESA-Local-Bus   et  EISA/VLB  :  cette  combinaison,  sur  bus  a
  frequences d'horloges elevees, pose divers problemes et s'avere  assez
  peu  fiable  mais  son faible cout et ses tres honorables performances
  lui assurerent un  bon  succes  commercial.   La  plupart  des  cartes
  recentes paraissent fiables.

  EISA : fiable et ouvert (standard n'appartenant pas a un constructeur)
  mais assez cher, surtout prevu  pour  les  machines  des  utilisateurs
  avertis et les serveurs de reseaux. Peu de cartes disponibles.

  PCI  :  ouvert,  au moins aussi rapide que l'EISA et cable sur 64 bits
  (consideration capitale pour les machines Pentium), gagne du  terrain.

  PCI n'est pas, comme le fut la combinaison (E)ISA/Local-Bus, dependant
  du processeur employe. Un composant PCI est commun a toutes les lignes
  de  processeurs  (DEC  Alpha,  Intel et compatibles, Power ...) et son
  installation  sur  une  carte  mere  PCI  n'implique   aucun   circuit
  d'interfacage  :  seul  le  BIOS  varie,  ce qui garantit des couts de
  production moins eleves que ceux de l'(E)ISA/Local Bus).

  22..22..  PPeerrffoorrmmaanncceess

  Extrait (adapte) du document de "propagande pro-PCI" de Craig  Sutphin
  :

       Contrairement a certains autres bus locaux, le PCI est concu
       pour servir toutes les  cartes  d'extension  :  video,  mais
       aussi  reseau,  interfaces disques ("controleurs") ...  A 33
       MHz le bus PCI transfere (sur 32 bits) jusqu'a  132  Moctets
       par seconde.  Une extension (passage a 64 bits) des logiques
       d'adressage et de transfert  des  donnees  peut  doubler  ce
       debit sans remettre en cause l'existant.  Le PCI reste inde-
       pendant du processeur et administre au mieux les  transferts
       en  permettant  au  bus  local de vehiculer les donnees sans
       employer le bus principal (processeur/memoire).   Cela  con-
       stitue,  pour les utilisateurs de PC rapides, une importante
       augmentation de la fiabilite, de la  performance  et  de  la
       facilite d'exploitation (caracteristiques non triviales avec
       des  bus  travaillant  a  33MHz).   Divers   modes   evolues
       d'exploitation du bus ameliorent les performances des cartes
       d'extension sans grever le systeme  central.   L'interfacage
       des  composants  PCI  ne necessite aucune circuiterie speci-
       fique.

  On se reportera au  chapitre  sur  les  Benchmarks  pour  obtenir  des
  resultats de tests, bruts (et parfois incoherents) sur les cartes ASUS
  PCI pour 486 et 586.

  22..33..  LLee cciirrccuuiitt ""ccoonnttrroolleeuurr"" SSCCSSII--22 eemmbbaarrqquuee ((iinntteeggrree ssuurr ccaarrttee--mmeerree))
  NNCCRR5533cc881100

  Le circuit embarque NCR de gestion  de  la  chaine  SCSI-II  constitue
  l'une  des plus allechantes caracteristiques de certaines cartes-meres
  PCI.  Il est theoriquement au moins aussi rapide que celui des  cartes
  Adaptec  174x  (EISA)  mais reste beaucoup moins onereux.  Des pilotes
  (drivers) pour DOS et OS/2 sont disponibles.  Drew Eckard a publie  la
  version   3   de   son   pilote  pour  circuit  NCR53c810.   J'utilise
  actuellement le noyau 1.1.78 (9 janvier  1994).   Cela  fonctionne  si
  bien  que  j'ai  revendu  mon  adaptec-1542B-ISA.  :-) (-- NCR est une
  marque de semiconducteurs :-) NdT--)

  Certaines cartes meres PCI integrent le circuit  NCR53c810.   On  peut
  aussi l'acheter sur carte d'extension pour a peu pres 70 dollars.

  Les  patchs  pour  NCR  et  fichiers  images  de  disques de boot sont
  disponibles      sur      tsx-11.mit.edu,      probablement       dans
  /pub/linux/ALPHA/scsi/ncr.   Ils  doivent  aussi  se  trouver  sur les
  sites-miroirs.

  Les plus recentes distributions Slackware (posterieures a 2.0) doivent
  aussi  pouvoir  gerer  ce  circuit.   Les  plus  recentes versions non
  stabilisees du noyau (1.1.41, par exemple) ne necessitent  plus  aucun
  patch. Depuis la version 1.2 le pilote NCR est dans le noyau standard.

  J'ai remarque une seule chose qui ne fonctionne  pas  encore  dans  le
  pilote  NCR  actuel.  La Deconnection/Reconnection n'est pas geree, ce
  qui rends penible l'utilisation  d'un  streamer  SCSI.  En  effet  une
  commande comme "mt erase" bloque tout le bus SCSI jusqu'a sa fin. Cela
  est bien embetant.

  Drew y travaille, voir plus bas.

  Le systeme FreeBSD gere le NCR53c810 depuis  un  bon  moment  deja,  y
  compris  les "Tagged Command Queues", le "FAST" et le "WIDE" SCSI ansi
  que la deconnection pour les 53c810, 815 et 825. Drew dit qu'il serait
  possible  d'adapter  le  pilote  FreeBSD  pour  Linux.  Y  a-t-il  des
  volontaires ?

  J'ai l'impression que l'evolution separee de FreeBSD et Linux oblige a
  reinventer  la roue un peu trop souvent. Un peu plus de cooperation ne
  nuirait pas a aucun des deux systemes...

  Apres une trop longue attente, j'ai abandonne la carte  NCR  pour  une
  des  cartes,  performantes  mais cheres, controleur SCSI PCI de marque
  DPT qui sont mentionnees dans cet  article.  Evidemment,  juste  apres
  j'ai  appris  que Drew fournissait en test une nouvelle version de son
  pilote. :-)

  22..44..  DDrreeww EEcckkhhaarrddtt aa pprrooppooss ddee PPCCII--SSCCSSII ::

  Drew a declare a la fin de Mars a propos de controleurs SCSI  sur  bus
  PCI : (legerement modifie pour clarification dans le contexte)

  Les  cartes  Adaptec  2940,  Buslogic  BT946,  BT946W, DPT PCI, Future
  Domain   3260,   NCR53c810,   NCR53c815,   NCR53c820,   et   NCR53c825
  fonctionnent toutes plus ou moins.

  +o  L'Adaptec  2940  souffre du meme probleme de sensibilite de cablage
     que toutes les cartes recentes mais, a par ca, fonctionne bien.

  +o  Les cartes Futur Domain n'exploitent pas le busmaster et le  pilote
     ne gere pas les commandes multiples simultanees. Si vous n'avez pas
     besoin de commandes simultanee choisissez  la  carte  NCR  qui  est
     moins  chere  et exploite le busmaster. Si la gestion des commandes
     simultanees vous est indispensable, prenez une Buslogic.

  +o  The Buslogic BT956W will  do  WIDE  SCSI  with  the  Linux  drivers
     (although  you can't use targets 8-15), the Adaptec 2940W (with one
     line patch to the 2940 driver) won't, nor will  the  NCR53c820  and
     NCR53c825.

  +o  La Buslogic BT956W fait du WIDE SCSI avec le pilote Linux (bien que
     l'on ne puisse pas utiliser les cibles 8  a  15).  L'Adaptec  2940W
     (avec  le  pilote  2940  patche  d'une  ligne)  la  NCR53c820 et la
     NCR53c825 n'en font pas.

  +o  Les  cartes  NCR  sont  vraiement  peu  cheres  (70  US  $),   sont
     generalement  rapides  mais  le pilote ne gere pas actuellement les
     commandes simultanees. Une version Alpha  du  pilote  qui  gere  la
     deconnection/reconnection  et le transfert synchrone est maintenant
     disponible publiquement. (voire plus bas)

  +o  Les cartes  SCSI  Emulux,  Forex,  et  celles  non  mentionnees  ne
     fonctionnent pas.

  22..55..  NNoouuvveellllee vveerrssiioonn AAllpphhaa dduu ppiilloottee NNCCRR

  Des  versions  Alpha  du  pilote  NCR font des choses sympas commme la
  connection/reconnection  et  les  transferts  synchrones.  Elles  sont
  maintenant   disponibles   publiquement.   Toute  personne  interessee
  voulant jouer avec devrait

  +o  S'abonner a la liste de  diffusion  NCR  en  envoyant  un  courrier
     electronique  a  majordomo@colorado.edu  avec "subscribe ncr53c810"
     dans le texte.

  +o  Telecharger tous les readmes et les derniers fichiers  de  diffs  a
     l'adresse ftp://tsx-11.mit.edu/pub/ALPHA/linux/SCSI/ncr53c810

  22..66..  LLee ppiilloottee EEAATTAA--DDMMAA eett lleess ccoonnttrroolleeuurrss PPCCII SSCCSSII ddee DDPPTT

  Le  pilote scsi EATA-DMA a subi de gros changements et prend en charge
  maintenant aussi les controleurs PCI SCSI, les  controleurs  multiples
  et tous les canaux SCSI sur les cartes SmartCache/Raid multicanaux.

  Le pilote prend en charge tous les controleurs SCSI au protocole EATA-
  DMA (document CAM/89-004 rev. 2.0c) et a ete teste  avec  beaucoup  de
  ces controleurs dans des configurations diverses.

  Il s'agit des_:    (ISA)   (EISA) (PCI)
        DPT Smartcache: PM2011  PM2012A
                                PM2012B
        Smartcache III: PM2021  PM2022  PM2024
                                PM2122  PM2124
                                PM2322
        SmartRAID     : PM3021  PM3122  PM3224
                                PM3222
        et d'autres controleurs NEC ou ATT.

  Sur une carte DPT de base (sans cache ni module RAID), un MC680x0 gere
  le (ou les) circuits DMA busmaster  ansi  que  le  circuit  controleur
  SCSI.   La  carte  SCSI  DPT se comporte presque comme un coprocesseur
  SCSI.

  La carte DPT peut aussi emuler un controleur IDE (interface ST506), ce
  qui  vous  permet  de l'utiliser avec tous les systemes d'exploitation
  meme s'ils n'ont pas de pilote EATA.

  Sur une carte avec cache, c'est le 680x0 qui assure la gestion  de  ce
  cache.   La  carte  DPT  admet  jusqu'a 64 Mo de RAM en tant que cache
  disque.

  Sur une carte avec module RAID, c'est aussi le 680x0 qui gere le RAID,
  assurant  le "mirroring" en RAID-1, le "striping" et la generation des
  codes ECC en RAID-5, etc.

  Les cartes d'entree de gamme utilisent un Motorola  68000  tandis  que
  les  hauts  de  gamme,  plus  tournees  vers  le  RAID,  utilisent  un
  processeur 68020, 68030 ou 68040/40MHz.

  Les prix officiels vont de 245 $ a 1995 $ (1er decembre 1994).

  Comme on m'a demande de nombreuses  fois  ou  acheter  ces  cartes  en
  Europe,   j'ai   demande   a  DPT  de  m'envoyer  la  liste  de  leurs
  distributeurs europeens officiels. En voici un court extrait :
  Autriche : Macrotron GmbH             Tel:+43 1 408 15430   Fax:+43 1 408 1545
  Danemark : Tallgrass Technologies A/S Tel:+45 86 14 7000    Fax:+45 86 14 7333
  Finlande : Computer 2000 Finnland OY  Tel:+35 80 887 331    Fax:+35 80 887 333 43
  France   : Chip Technologies          Tel:+33 1 49 60 1011  Fax:+33 1 49 599350
  Allemagne: Akro Datensysteme GmbH     Tel:+49 (0)89 3178701 Fax:+49 (0)89 31787299
  Russie   : Soft-tronik                Tel:+7 812 315 92 76  Fax:+7 812 311 01 08
  GB   .   : Ambar Systems Ltd.         Tel:+44 296 435 511   Fax:+44 296 479 461

  "A mon avis, les cartes DPT sont les cartes  SCSI  les  mieux  concues
  disponibles pour PC. Et j'ai ecris du code pour presque tous les types
  de cartes SCSI pour PC. (Bien que retroactivement, je me demande  bien
  pourquoi  !)  ;-)"  Jon  R.  Taylor  (jtaylor@magicnet.net) President,
  Visionix, Inc.

  La derniere version du pilote EATA-DMA et une image  de  disquette  de
  boot    Slackware    sont   disponibles   a   l'adresse   :   ftp.uni-
  mainz.de:/pub/Linux/Drivers/SCSI/EATA

  Le pilote est inclus dans le noyau standard depuis la version  1.1.81.

  L'auteur    peut    etre    joint    aux    adresses    suivantes    :
  neuffer@goofy.zdv.uni-mainz.de or linux@uni-koblenz.de

  22..77..  FFuuttuurree DDoommaaiinn TTMMCC--33226600 PPCCII SSCCSSII

  Rik Faith (faith@cs.unc.edu) m'a indique le 1er Fevrier  1995  que  la
  carte  Future  Domain  TMC-3260  PCI SCSI etait prise en charge par le
  pilote Future Domain 16x0 SCSI driver.  Le  SCSI-HOWTO  peut  contenir
  des informations plus recentes.

  +o  La detection n'est pas bien faite car elle n'utilise pas la methode
     standard du BIOS PCI (J'ai besoin que quelqu'un qui  possede  cette
     carte  m'envoie  les patches qui corrigent ce probleme). Vous aurez
     peut-etre a bidouiller la routine de detection  dans le noyau  pour
     que votre carte soit reconnue.

  +o  Le  pilote ne gere pas encore les commandes multiples en attente ce
     qui fait que votre systeme sera bloque pendant  le  rembobinage  de
     votre streamer.

  +o  Le  pilote  ne  gere pas le mode de transfert ameliore pseudo-32bit
     apporte par les composants recents Future Domain. Vous n'aurez donc
     pas de taux de transfert aussi eleves que sous DOS.

  +o  Comme  le  pilote  gere  seulement le protocole SCSI-I, vos disques
     rapides ne fourniront pas leur debit maximum possible.  (La  aussi,
     les  bonnes  volontes  sont les bienvenues -- personne ne travaille
     dessus actuellement.)

  22..88..  RReefflleexxiioonnss ddiivveerrsseess ssuurr llee SSCCSSII

  James Soutter (J.K.Soutter1@lut.ac.uk) m'a  demande  de  preciser  les
  points suivants :

  Le  SCSI-2  "Fast  Wide"  est  parfois,  a tort, designe par
  "SCSI-3".  Il differe du SCSI-2 standard dans la  mesure  ou
  il  met en oeuvre un bus de donnees SCSI sur 16 bits (et non
  8).   Cela  porte   le   taux   de   transfert   maximum   a
  20Moctets/seconde (au lieu de 10) mais necessite l'emploi de
  disques adaptes (Fast Wide).

  Ce theorique gain en performances n'accelerera peut-etre pas
  certains  systemes car les taux de transfert "internes" (des
  plateaux  au  metacontroleur)  de  la  plupart  des  disques
  restent inferieurs a 10Moctets/seconde. Un seul disque de ce
  type ne peut donc se trouver limite par  la  bande  passante
  offerte par une carte SCSI-2 standard.

  Dans  le  catalogue  Seagate  d'octobre 1993, seul un disque
  Fast Wide SCSI-2 a un taux de tranfert interne  superieur  a
  10 Mo/s ( le ST12450W).  La pluspart des disques ont un taux
  de transfert interne de 6 Mo/s au plus, bien que le ST12450W
  ne   soit   pas  la  seule  exception  a  cette  regle.   En
  conclusion, la norme Fast  Wide  SCSI  est  concue  pour  le
  marche des serveurs et n'apporte pas forcement d'avantages a
  une station de travail.

  Plutot  que  d'acheter  une  carte  mere  a  interface  SCSI
  integree  ou  bien  d'attendre  le pilote NCR, vous pourriez
  acheter une carte controleur SCSI separee.  D'apres Drew, la
  seule  option  PCI  SCSI  qui a une chance de marcher est la
  Buslogic 946. Elle est censee etre  compatible  a  l'Adaptec
  1540 comme les cartes EISA/VESA/ISA de la serie.

  Drew  a  indique  que  les autres cartes PCI SCSI ont peu de
  chances d'etre prises en charge par Linux  ou  les  systemes
  BSD  car  les  controleurs  a base de circuit NCR sont moins
  chers et plus courants.

  Selon broom@ocean.fit.qut.edu.au (Bradley Broom) :

       La Buslogic BT-946C PCI SCSI  fonctionne  si  l'on  debraye,
       grace  au  programme MS/DOS AUTOSCSI livre par son construc-
       teur, l'option "enable Disconnection".

  Ernst Kloecker (ernst@cs.tu-berlin.de) ecrit (citation adaptee) :

       Talus Corporation dispose d'un pilote NS/FIP pour cartes PCI
       a  circuit  SCSI  "NCR". Il sera diffuse sous peu, peut-etre
       meme a titre gracieux.

  Toutes les cartes meres PCI ne disposent pas du  circuit.  Les  cartes
  ASUS  anciennes l'ont ainsi qu'une des cartes J-Bond.( La pluspart des
  cartes meres actuelles (06/95) considerent que c'est a vous  d'acheter
  le   NCR53c810   separement.)   Certaines   marques   fournissent  une
  alternative comme vous pouvez le lire dans le texte de Drew...

  Le circuit NCR est assez evolue pour prendre  en  charge  des  disques
  formates  par  d'autres  circuits.  (-- Ce qui semble assez naturel si
  aucun des circuits impliques n'effectue de translation ! NdT.--)

  33..  CCaarrttee--mmeerree ddee mmaarrqquuee AASSUUSS

  33..11..  AASSUUSS eett NNMMII ((PPaarriittee)) ---- iimmppaacctt ssuurr llaa  GGrraavviiss--UUllttrraassoouunndd

  Les  dernieres  cartes  meres  PCI ne gerent plus les barettes SIMMS a
  parite. Comme j'achetais habituellement des barettes SIMMS sans parite
  a  cause de leur cout, je ne pensais pas que ce soit un probleme avant
  de rajouter une carte Gravis-Ultrasound dans ma machine. Sous  DOS  le
  pilote  SBOS  et  l'utilitaire  de  test se plaignent de la sorte "nmi
  procedure disabled on this pc". La documentation conseille de  changer
  de carte mere dans ce cas, ce qui n'aide pas beaucoup.

  La Gravis-Ultrasound fonctionne bien dans les cartes ASUS-SP3 et ASUS-
  SP4, malgre cela, mais ma Gravis-Ultrasound-Max genere  avec  gmod  un
  "kernel  panic"  sur  les  deux cartes. De plus, de temps en temps, le
  fait de  jouer  des  fichiers  son  precedent  apres  le  nouveau.  Le
  gestionaire  de  son  recommende un buffer de 65536 octets avec la GUS
  Max contrairement au petit buffer de la GUS - je ne sais pas pourquoi.
  Les  deux cartes possedent chacunes 1Mo de DRAM. Ces problemes ne sont
  peut-etre pas lies au probleme NMI mais plutot au gestionaire de son ?

  J'ai entendu dire que ce n'est pas seulement ASUS mais la pluspart des
  cartes recentes qui ne gerent pas la parite et le NMI.

  De plus en plus bizarre, la carte ASUS-TP4 a chipset Triton fonctionne
  bien avec la GUS Max - il charge bien le pilote SBOS. Je dois admettre
  que je ne comprends pas tout.

  33..22..  DDiiffffeerreennttss ttyyppeess ddee ccaarrtteess mmeerreess AASSUUSS

  33..22..11..  AASSUUSS SSPP33 aa cchhiippsseett SSaattuurrnn II ((rreevv.. 22)) ppoouurr 448866

  +o  2 x rs232 with 16550

  +o  NCR53c810 onboard,

  +o  chipset Saturn I (rev. 2) legerement bugge.

  33..22..22..  AASSUUSS SSPP33GG aa cchhiippsseett SSaattuurrnn IIII ((rreevv.. 44)) ppoouurr 448866

  comme la SP3, mais le chipset Saturn est moins bugge.

  33..22..33..  AASSUUSS SSPP33 aa cchhiippsseett SSiiSS ppoouurr 448866

  comme la AP4 mais plus  recente,  chipset  SiS,  fonctions  d'economie
  d'energie,  EIDE,  rs232 avec 2 16550 et port centronics.  Seulement 2
  connecteurs  pour  barettes  SIMM,  a  l'air   de   fonctionner   avec
  l'AMD486DX4/120  mais  pas  tres  fiable  avec  le  NCR53c810  et sous
  differents systemes  d'exploitation  (Windows-NT,  Windows  95,  OS2).
  Apres  mise a jour vers une carte Pentium ASUS SP4, tous les problemes
  ont disparus ce qui confirme que cela venait de la carte. A  l'air  de
  bien fonctionner quand meme sous Linux.

  33..22..44..  AASSUUSS AAPP44,, ppoouurr 448866,, aa bbuuss PPCCII//IISSAA//VVeessaaLLooccaallbbuuss

  fonctions  d'economie d'energie, 1 slot VLB, 3 slots ISA, 4 slots PCI,
  seul le controleur EIDE  est  integre,  il  n'y  a  ni  controleur  de
  disquettes, ni rs232/centronics.  Tres petite taille.

  Prend  l'AMD486DX2/66  pour un DX4/100. On peut corriger ca en soudant
  une broche (laquelle ?)  a  la  masse,  mais  de  toute  facon  je  ne
  recommenderais pas cette carte.

  Celle  que  j'ai  teste ne fonctionnait ni sous OS2 ni sous Linux bien
  que certaines personnes l'utilisent avec ses deux systemes.

  Le slot VLB est cense etre plus lent qu'un slot VLB normal a cause  du
  pont PCI vers VLB, mais sans nuire a la rapidite du cote PCI.

  33..22..55..  AASSUUSS SSPP44--SSiiSS,, ppoouurr PPeennttiiuumm9900,, PPCCII//IISSAA

  Identique a la SP3-SiS, mais pour Pentium90/100.

  33..22..66..   AASSUUSS  TTPP44XXEE aa cchhiippsseett TTrriittoonn eett pprriissee eenn cchhaarrggee ddee llaa SSRRAAMM oouu
  EEDDOORRAAMM

  Peut  utiliser  la nouvelle ram EDO et la future SRAM. La memoire SRAM
  devrait augmenter les performances de facon considerable.  Cette carte
  n'a  pas  accepte  les  barrettes PS2-SIMMS de 8Mo qui marchaient sans
  probleme sur une ASUS SP4. Apres echange contre d'autres barettes plus
  volumineuses (16 puces au lieu de 8 si je me souviens bien) cela s'est
  mis a fonctionner.  Testee avec un P90 et un P100.

  33..33..  TTeessttss ddee rraappiiddiittee ssuurr ddeess ccaarrtteess mmeerreess AASSUUSS

  J'ai essaye de comparer la vitesse CPU sur deux cartes ASUS : pour  le
  486 j'ai teste la SP3 SiS (celle qui a un slot VLB) et pour le 586, la
  TP4/XE. Les  deux  cartes  avait  16  Mo  de  RAM,  le  systeme  etait
  inutilise.   Les  tests  whestone  et  dhrystone  ont  ete employes en
  changeant le CPU.

  Je dois reconnaitre  que  je  n'ai  pas  encore  lu  la  faq  sur  les
  benchmarks  et  que  je  serais  donc  amene a beaucoup modifier cette
  partie bientot. Si vous avez des commentaires, n'hesitez pas a me  les
  envoyer par courrier electronique.

  Je  suis  specialement etonne par le fait que l'AMD486DX4/100 est plus
  rapide au test dhrystones que le DX4/120 ! Je ne  retrouve  pas  cette
  incoherence en comparant les P90 et P100.

  Le   probleme  vient  peut-etre  du  fait  que  lorsque  j'ai  branche
  l'amdDX4-100, la carte etait configuree pour un DX2-66.  Bien  que  le
  BIOS  voyait  bien qu'il s'agissait d'un DX4-100, la carte a peut-etre
  utilise les mauvaises frequences d'horloge... mais puisque  le  DX2-66
  fonctionne  a  33Mhz  *  2  et le DX4 a 33Mhz * 3, cela aurait du etre
  correct ?

  La carte avec le DX4-120 est configuree en 40Mhz * 3 = 120 Mhz.

  Je me demande aussi si le test whetstone fournit  des  chiffres  aussi
  egaux sur d'autres machines ?

  33..33..11..  AASSUUSS SSPP33 aavveecc ll''aammdd448866DDXX44--110000

  +o  Temps pour 500000 passes Dhrystone = 7 soit 63559 dhrystones/second

  +o  Temps pour 1000 passes Whetstone = 5 soit 200.000 Whetstones/second

  33..33..22..  AASSUUSS SSPP33 aavveecc ll''aammdd448866DDXX44--112200

  +o  Temps pour 500000 passes Dhrystone = 8 soit 58074 dhrystones/second

  +o  Temps pour 1000 passes Whetstone = 4 soit 250.000 Whetstones/second

  33..33..33..  AASSUUSS SSPP33 aavveecc ll''iinntteell448866DDXX22--6666

  +o  Temps pour 500000 passes Dhrystone = 9 soit 50761 dhrystones/second

  +o  Temps   pour   1000   passes   Whetstone   =   7   soit    142.8571
     Whetstones/second

  33..33..44..  AASSUUSS TTPP44//XXEE aavveecc ll''iinntteell558866--9900

  +o  Temps    pour   500000   passes   Dhrystone   =   4   soit   101010
     dhrystones/second

  +o  Temps   pour   1000   passes   Whetstone   =   3   soit    333.3333
     Whetstones/second

  33..33..55..  AASSUUSS TTPP44//XXEE aavveecc ll''iinntteell558866--110000

  +o  Temps    pour   500000   passes   Dhrystone   =   4   soit   102040
     dhrystones/second

  +o  Temps   pour   1000   passes   Whetstone   =   2    soit   500.0000
     Whetstones/second

  33..44..   ddeettaaiilllleeeess  ::  CCaarrttee--mmeerree  AASSUUSS PPCCII--II--SSPP33 :: hheeiinnrriicchh@@zzssvv..ggmmdd..ddee
  ffoouurrnniitt ddeess iinnffoorrmmaattiioonnss

  +o  Slots : 3 PCI, 4 ISA (3x16 bits, 1x8 bits)

  +o  4 bancs de SIMM 72 broches (max. 128Mo)

  +o  Processeur monte sur support ZIF

  +o  place pour 4 SIMM 72 broches (max. 128Mo)

  +o  BIOS AWARD en EPROM-flash

  +o  Embarques  :  SCSI  "NCR",  1  //,  2  series  (avec FIFO), AT-Bus,
     controleur de disquettes

  Comme la plupart des cartes de  cette  categorie  elle  n'offre  qu'un
  cache  memoire  en  lecture (perte de performances estimee par rapport
  aux cartes avec cache en ecriture : environ 3% (?)).

  Le BIOS prend en charge les disques SCSI sous DOS/Windows sans  pilote
  additionnel  (ASPI  livre)  Autres  pilotes fournis : OS2, Windows-NT,
  SCO-Unix, Netware (3.11 et 4, d'apres ce que j'ai compris).

  Gert Doering (gert@greenie.muc.de) affirme que le pilote  fourni  pour
  SCO  ne  fonctionne  pas  correctement.   Plusieurs commandes "time dd
  if=/dev/rhd20 of=/dev/null bs=100k  count=500"  menent  a  un  "kernel
  panic".

  Il  semble  preferable,  lorsque  l'on  emploie  le  circuit  embarque
  d'origine Adaptec, de ne pas employer l'option de  "sync  negotiation"
  (configuration accessible grace au setup en BIOS de la carte Adaptec).
  (-- Attention : de graves accidents  d'exploitation  ("kernel  panic")
  surviennent parfois lors du redemarrage du systeme apres un changement
  de  configuration.  Cela  ne  semble  pas  preter  a  consequence  (le
  redemarrage suivant se deroule correctement) mais ...  Teste par votre
  serviteur !  NdT.--)

  Une version plus recente de cette carte-mere existe  (ASUS-PCI-I/SP3G,
  le  `G' est important) et ces problemes ont probablement ete corriges.
  Elle emploie le nouvel ensemble de circuits Intel (version 4) "Saturn-
  ZX"  et  supporte  donc  les  options  PCI  les  plus  evoluees (level
  triggered shareable and BIOS-configurable).  En sus : port souris PS/2
  (aux), dispositif d'economie d'energie EPA et support pour DX-4.

  Les   dernieres   informations   disponibles  indiquent  que  certains
  utilisateurs  de  cette  carte  (ASUS-SP3-G)  constatent  qu'elle   ne
  supporte  pas  (crashes  sous Linux) l'option "PCI-to-Memory-Posting".
  Tout  fonctionne  parfaitement  lorsque  cette  option  est  debrayee.
  jw@peanuts.informatik.uni-tuebingen.de  pense  que  cela  peut relever
  d'un probleme avec le noyau Linux car  certaines  parties  du  systeme
  semblent  continuer  de  fonctionner  lors  des  crashes,  ce qui peut
  reveler un bogue dans le code du swapper. MS-DOS, OS/2 et  Windows  ne
  presentent pas ce symptome.

  33..55..   PPaatt  DDoowwlleerr  ((ddoowwlleerr@@pptt11BB11110066..FFSSHH..UUVViicc..CCAA)) nnoouuss ppaarrllee ddee ll''AASSUUSS
  SSPP33GG

  +o  carte ASUS SP3G (rev.4 == saturn II)

  +o  CPU  AMD  DX4-100  CPU  (il  faut  positionner le cavalier 36 a 1&2
     plutot que 2&3, et les  autres  de  la  meme  facon  que  pour  les
     processeurs 486DXn)

  +o  memoire cache 256K cache (15ns :-)

  +o  16meg RAM (2x8meg)

  +o  carte video ET4000 ISA

  +o  disque dur quantum IDE

  +o  carte ethernet SMC Elitel16 combo

  Contrairement  a  d'autres  compte-rendus,  j'ai trouve que le curseur
  souris de deplace de facon tres souple sous X (comme sur le bon  vieux
  386) - par contre il sautille avec certains jeux DOS...

  Les  performances  sont tres bonnes ! J'ai fais tourner des gros tests
  de calcul en virgule flottante ( 500x500 doubles - a peu  pres  4megs)
  et  j'ai  constate  que les performances en mode 3x33 (100Mhz) etait a
  peu pres 1.5x superieures a celles en mode 2x  (66Mhz)...  J'etais  un
  peu  sceptique  a  propos du triplement de frequence mais il me semble
  que ca tient ses promesses :-)

  Le systeme  hautement  configurable  de  gestion  de  la  consommation
  "energy star" ne fonctionne pas avec les processeurs AMD DX4 actuels -
  il faut un processeur SL.

  J'ai vraiement besoin d'un disque SCSI et d'une carte video PCI :-)

  (J'ai recu le coup de telephone d'une personne qui a eu le probleme du
  composant  defectueux SMC FIFO. Ils se plantent apres l'utilisation de
  X-window.)

  44..  CCoonnffuussiioonn aa pprrooppooss ddeess cchhiippsseettss SSaattuurrnn

  Pat Duffy (duffy@theory.chem.ubc.ca) nous dit :

  Saturn I:  Ce sont les versions 1 et 2 des chipsets Saturn.
  Saturn II:  Aussi appele version 4 du chipset Saturn.

  Autant que je le sache , la version 3 n'a jamais etee livree, et (d'apres un
  petit nombre de gens qui la possedent) la SP3G integre maintenant la version 4
  (Saturn II).

  Vous etes perdus ? He bien, la seule vraie reponse est de disposer de la carte
  et d'y lancer le script de deboggage du chipset PCI. A ma connaissance,
  pourtant, la carte SP3G est livree avec la version 4 (Saturn II).

  55..  CCaarrtteess vviiddeeooss

  Divers utilisateurs emploient des cartes "Number Nine" (nom  abrege  :
  #9)   Level   12   et   ELSA   Winner   1000   (modele   2000   aussi,
  vraisemblablement) et autres basees sur le circuit S3 928. La nouvelle
  version  d'XFree  (3.1) prend en charge les cartes Tseng ET4000/W32 en
  mode accelere, les chipsets S3 Vision 864 et 964  y  compris  sur  les
  cartes  telles que l'ELSA Winner 1000Pro et 2000Pro, Number Nine GXE64
  et GXE64Pro, Miro Crystal 20SV). Les modes videos comptant  16  ou  32
  bits  par  pixel  (16  bpp)  sont  a  present disponibles.  Le circuit
  d'horloge Chrontel8391 est maintenant reconnu par le serveur S3.

  Les cartes S3 Trio32 et Trio64 comme la SPEA V7 Mirage P64 PCI et MIRO
  Crystal  40SV,  sont  maintenant  gerees.  La Mach32 et la Mach64 sont
  gerees maintenant en mode accelere.

  Le pilote SVGA

  La gestion du mode 16bpp (65K couleurs au lieu  des  256  habituelles)
  pour  les  Mach32  ainsi  que  le mode 32bpp de certaines cartes S3 et
  P9000 a ete rajoutee.

  tldraben@eos.ncsu.edu declare :

  +o  Diamond Stealth W32 -- le mode texte fonctionne.

  +o  ET4000/W32 -- insupportable.

  +o  # 9GXEL13 -- Fonctionne, mais  affichage  des  consoles  virtuelles
     perdu  lors  de  basculements  de sessions. Ai du acheter une carte
     Dell.

  Par ailleurs :

  +o  Genoa Phantom 8900PCI fonctionne.

  +o  Genoa Phantom/W32 2Mo ne fonctionne pas avec la carte-mere ASUS.

  +o  Tseng 3000/W32i semble fonctionner correctement.

  +o  Spea-v7 mecury-lite fonctionne  parfaitement  (sous  XFree  2.1  et
     ulterieur).

  La  Spea  V7 Mirage P64 PCI 2M a base de Trio64 fonctionne bien depuis
  XFree86(tm)-3.1.1.

  L'ATI Graphics Ultra Pro pour PCI avec 2Mo VRAM et  le  DAC  ATI68875C
  fonctionne    bien    (1280x1024   256   74Hz   non-entrelace)   selon
  dem@skyline.dayton.oh.us.

  jbauer@badlands.NoDak.edu (John Edward Bauer) indique que la  Paradise
  WD90C33  PCI  bloque  la  machine  lorsque  la sauvegarde d'ecran de X
  Window entre en action. Les nouveaux noyaux corrigent ce probleme.

  miroChrystal 8S/PCI (1Mo) S3 - aucun probleme.

  Stephen Tweedie indique que sa carte Cirrus Logics 5434 PCI fonctionne
  bien.   Elle fonctionne en 64 bits avec 2M et marche parfaitement avec
  le pilote SVGA en 8, 16 et 32 bits par pixel.

  66..  CCaarrtteess EEtthheerrnneett

  Les cartes ISA fonctionnent, bien entendu,  mais  d'aucuns  aimeraient
  utiliser  les  versions  PCI.  L'auteur de la plupart (sinon tous) des
  programmes   pilotes   pour    cartes    Ethernet    (Donald    Becker
  (becker@cesdis.gsfc.nasa.gov)) declare :

       Le  code  LANCE  a  ete  etendu  pour  gerer la version PCI.
       J'espere fournir le code de detection PCI (a  peu  pres  une
       douzaine  de  lignes  supplementaires  dans le pilote LANCE)
       dans la prochaine version du noyau.  Je  suis  en  train  de
       travailler  sur le mode 32 bit.  Je n'ai pas encore commence
       le code 21040.

       Je vais ecrire des versions adaptees au mode PCnet32 et a la
       carte  DEC  21040.   Cela couvrira la majorite du marche des
       cartes Ethernet PCI.

       Voir                         l'URL                         :
       file://cesdis.gsfc.nasa.gov/pub/people/becker/whoiam.html

  Les  noyaux  1.1.50  et  ulterieurs  gerent  les  cartes basees sur le
  circuit AMD.  Une carte-mere Pentium permet  alors  d'obtenir  environ
  900Ko/seconde  sous  ftp  avec  environ 20% de charge CPU (circuit AMD
  Lance).

  Tous les materiels Ethernet bases sur le chip  AMD  PCnet/PCI  doivent
  fonctionner. Les cartes Boca coutent, aux US, moins de 70$.

  Geoffry  Coram  a  indique  dans  les  news  qu'il  a  reussi  a faire
  fonctionner sa carte 3com 590 TPO. Il a du telecharger le pilote alpha
  a  l'adresse  :  http://cesdis.gsfc.nasa.gov/linux/drivers.  On peut y
  trouver      aussi      d'autres      pilotes.        Voir       aussi
  http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html

  Donald  Holmgren  dit  qu'il  a  reussi a connecter sa carte DEC DE435
  (PCI) au reseau local sur coax fin  (BNC).  Le  pilote  DE435  verifie
  d'abord  la  prise  pour  paire  torsadee,  puis  commute vers le port
  alternatif (selectionable par cavalier en  AUI  ou  BNC)  si  le  port
  10BaseT ne fonctionne pas.

  Jim  Cusick  utilise  la carte Boca 1PI sur coax fin.  Elle fonctionne
  tres      bien.      On      ira      voir       a       l'URL       :
  http://cesdis.gsfc.nasa.gov/linux/misc/boca-failure.html    pour   des
  details sur les  disfonctionements  du  debut  avec  cette  carte.  Ma
  deuxieme  carte,  apres  retour  pour  echange  de  la premiere, etait
  etiquetee "PN 4186". La precedente  qui  ne  marchait  pas  etait  une
  "PN4185".  Precisez  a  la  commande que vous voulez le modele le plus
  recent. A 70 $, cette carte est une bonne affaire.

  Dave Platt recommande d'eviter a tout prix la carte Boca BEN1PI.  Elle
  ne  serait  pas  fiable  a  cause  de defauts de conception et Boca ne
  semble pas en mesure de corriger le probleme. La carte 3Com 3c590  PCI
  "Vortex"  est disponible en version combo (10BaseT, thin coax at AUI).
  Le pilote Linux de cette carte ne fait  pas  encore  partie  du  noyau
  standard,        mais        est        disponible       a       l'URL
  http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html  et  peut   etre
  patche  dans  les  derniers  noyaux  1.2.x  (ainsi que les 1.3.x) sans
  beaucoup de difficulte.  Le pilote  Linux  ne  peut  pas  utiliser  la
  possibilite  d'autodetection d'interface de cette carte - le programme
  DOS  fourni  permet  de  configurer  la  carte  afin  qu'elle  utilise
  l'interface choisie ( coax fin dans notre cas). Une fois cela fait, le
  pilote Linux utilise l'interface correcte.

  Il a utilise avec succes une 3c590 pendant plusieurs semaines.

  Dave Kennedy nous fait part qu'il a eu deux  des  cartes  Boca  citees
  plus  haut  et qu'elles fonctionnent bien sous charge legere. Craig ne
  les recommende pas car Boca ne semble pas  suivre  les  specifications
  d'AMD  mais il a pu les utiliser pendant deux semaines sans problemes.
  Il a teste les performances NFS en transferant de gros fichiers depuis
  et  vers  son  serveur  (16M,  8M).  Il  a  aussi essaye de travailler
  localement avec tous ses fichiers de donnees montes par  NFS  et  cela
  sans  problemes.  Les  performances  paraissent ameliorees de 100 pour
  cent par rapport a sa carte ISA NE2000.  (note  de  l'editeur  :  cela
  aurait sans doute ete la meme chose avec la SMC ISA Elite Ultra ?)

  66..11..  33CCoomm--33cc559900--ttppoo

  Quelqu'un  a  mentionne  sur  usenet  avoir  utilise la 3Com-3c590-TPO
  (EtherLink III - PCI). Pour que cela fonctionne avec son  noyau  Linux
  1.2.8, il lui a fallu le pilote "3c59x.c" avec le "vortex.patch".

  66..22..  DDEECC443355 PPCCII NNIICC

  Il parait que la carte DEC435 PCI marche bien avec les pilotes fournis
  dans la distribution Slackware - Je pense donc  qu'ils  sont  dans  le
  noyau standard ?

  77..  CCaarrtteess mmeerreess

  Liste  des  utilisateurs  qui  ont repondu a mon questionnaire, sur le
  type de cartes meres qu'ils emploient ... et resultats obtenus lors de
  l'installation et l'utilisation de Linux :

  77..11..  AASSUUSS

  +o  Ruediger.Funck@Physik.TU-Muenchen.DE - fonctionne mais ...

  +o  strauss@dagoba.escape.de - demi-succes, fonctionne mais ...

  +o  krypton@netzservice.de (Ulrich Teichert), - fonctionne

  +o  heinrich@zsv.gmd.de - fonctionne

  +o  CARSTEN@AWORLD.aworld.de - fonctionne

  +o  egooch@mc.com - fonctionne (sauf le port serie)

  +o  archie@CS.Berkeley.EDU  -  fonctionne,  apres avoir compris comment
     configurer l'IDE.

  +o  Lars Heinemann (lars@uni-paderborn.de) fonctionne

  +o  Michael   Will    (michaelw@desaster.student.uni-tuebingen.de)    -
     fonctionne

  77..22..  MMiiccrroonniiccss PP5544ii--9900

  +o  root@intellibase.gte.com - fonctionne.

  +o  bill.foster@mccaw.com - fonctionne.

  +o  karpens@ncssm-server.ncssm.edu - fonctionne.

  77..33..  SSAA448866PP AAIIOO--IIII

  ah@doc.ic.ac.uk fonctionne.

  77..44..  SSiirriiuuss SSPPAACCEE

  hi86@rz.uni-karlsruhe.de - fonctionne.

  77..55..  GGaatteewwaayy--22000000

  +o  kenf@clark.net - fonctionne (pb. avec carte son)

  +o  dmarples@comms.eee.strathclyde.ac.uk - fonctionne mais ...

  +o  robert logan (rl@de-montfort.ac.uk)  - sans aucun probleme.

  +o  James D. Levine (jdl@netcom.com) - sans aucun probleme.

  77..66..  IInntteell--PPrreemmiieerr

  grif@cs.ucr.edu   - fonctionne.  jeromem@amiserv.xnet.com - fonctionne
  demarest@rerf.or.jp - fonctionne (Premier-II)

  77..77..  DDEELLLL PPoowweerreeddggee SSPP44110000

  gbelow@pmail.sams.ch - fonctionne

  77..88..  CCoommttrraaddee BBeesstt BBuuyy PPCCII // PPCCII4488XX MMoo RReevv 11..00

  tldraben@eos.ncsu.edu - Fonctionne. Probablement equipee de l'ensemble
  de circuits ("chipset") deficient Intel "Saturn".

  77..99..  IIDDeeaall PPCCII // PPCCII4488XX MMoo RReevv 11..00

  tldraben@eos.ncsu.edu - Ne fonctionne pas.

  77..1100..  CCMMDD TTeecchh.. PPCCII IIDDEE // CCSSAA--66440000CC

  tldraben@eos.ncsu.edu - Fonctionne.

  77..1111..  GGAA--448866iiSS ((GGiiggaabbyyttee))

  Stefan.Dalibor@informatik.uni-erlangen.de - Fonctionne.

  77..1122..  GGAA--558866--IIDD ((GGiiggaabbyyttee)) 9900 MMhhzz PPeennttiiuumm PPCCII//EEIISSAA

  kkeyte@esoc.bitnet - fonctionne

  77..1133..  EESSCCOOMM 448866ddxx22//6666 -- TTyyppee ddee ccaarrttee nnoonn pprreecciissee

  Seul le streamer (floppy tape de marque Archive) ne fonctionne pas.

  77..1144..  JJ--BBoonndd aavveecc ii448866ddxx22//6666

  Drew   Eckhardt  (drew@kinglear.cs.Colorado.EDU)  utilise  la  Diamond
  Stealth 64 VRAM avec 4M de Memoire (a base de  964).  Elle  fonctionne
  tres  bien  en  1024x768 72Hz et 32bpp de meme qu'en 16bpp et 8bpp. Il
  lui a fallu le serveur X311u2S3 de ftp.xfree86.org. Les possesseurs de
  cartes Diamond a base de 968 devront faire de meme.

  77..1155..  SSuuppeerr mmiiccrroo 001111889955 0033::5500 SSUUPPEERR PP5544CCII--PPCCII rreevv 11..33 ((OOppttii))

  Manuel de Vega Barreiro

  +o  carte mere super micro 011895 03:50 SUPER P54CI-PCI rev 1.3

  +o  Chipset Opti: 82c557,82c556,82c558,82c621.

  +o  4 slots PCI, 4 ISA (4x16 Bit)

  +o  Support ZIF pour CPU (120,100,90,75 mHz)

  +o  4 SIMMs 72 broches (max 128Mb)

  +o  cache 256,512,1024 Kb L2-cache

  +o  Ami WinBIOS en Flash-Eprom (101094-VIPER-P)

  +o  controleur integre EIDE pour 4 disques.

  +o  Pentium 90Mhz, 8Mo (now 16Mo) RAM et 256K L2-cache.

  +o  1 maxtor 540 Mo, 1 st3122A 1Go

  +o  Number Nine 9GXE64pro with 2Mo

  +o  Sound blaster 16 + cdrom Matsushita

  +o  Ecran 17" microscan 5ep ADI

     J'utilise  Linux  1.1.57   (maintenant   1.2.1)   sans   problemes.
     dosemu0.53  fonctionne  bien  (logiciels  de  comm  comme kermit et
     xtalk) XFree86 3.1 a la resolution de 1024x768

  88..  RRaappppoorrttss ddeettaaiilllleess

  88..11..  MMiiccrroonniiccss PP5544ii--9900 ((rroooott@@iinntteelllliibbaassee..ggttee..ccoomm))

  Pentium a 90MHz, 32Mo de RAM et 512Ko de cache a 2 niveaux. Fonctionne
  parfaitement (une compilation de noyau n'exige que 10 minutes).

  La carte-mere offre :

  +o  UART - 2 16550A

  +o  ECP - un port parallele ameliore

  +o  IDE

  +o  Controleur de lecteurs de disquettes

  Avantages  :  j'emploie pour le moment une Adaptec 1542CF et un disque
  Seagate d'un giga. Aucun probleme. Carte video ATI Graphics Pro  Turbo
  (PCI),  tres  veloce.  Les  ports  serie gerent un modem TeleBit T3000
  (38400) sans pertes de caracteres. Les adresses memoires  situees  au-
  dela  de 16Mo sont aussi servies par le cache. Trois bancs de circuits
  SIMM (2 barettes par banc) pouvant chacun supporter 64 Mo (32  Mo  par
  barette).  Chaque  banc  doit  bien entendu etre complet (2 barettes).
  Support CPU ZIF. BIOS flash PHOENIX.

  Inconvenients : RAM maxi 192Mo mais cache limite  a  512Ko.  La  carte
  video est tres veloce mais il n'existe pas pour le moment de serveur X
  pour circuit Mach64 (le serveur SVGA existant n'exploite du moins  pas
  ses  possibilites).   Je  ne  sais  pas si le "controleur" IDE integre
  fonctionne car je n'apprecie guere les  standards  specifiques  a  une
  plateforme  et  n'ai  donc  pas  achete  de disque IDE mais emploie un
  Seagate 31200N et un NEC 3Xi.

  Mitch.

  88..22..  AAIIOO--IIII :: AAnnggeelloo HHaarriittssiiss ((aahh@@ddoocc..iicc..aacc..uukk)) aa pprrooppooss ddee llaa SSAA448866PP

  J'ai  achete  une   carte   "SA486P   AIO-II"   supportant   les   486
  SX/DX/DX2/DX4.  Elle offre :

  +o  Chipset Intel Saturn v2

  +o  BIOS Phoenix (flash EPROM)

  +o  NCR scsi BIOS v 3.04.00

  +o  256K 15ns cache (max 512K) (write back et write through)

  +o  4 connecteurs pour RAM (SIMM 72 points) en 2 bancs

  +o  3 slots PCI, 4 ISA

  +o  NCR 53c810 embarque

  +o  IDE / floppy / 2 x 16550A uarts / parallele etendu embarques

  J'utilise  un  486/DX2-66,  un  disque  dur  Seagate "Barracuda" 2.1Go
  (ST12550N), un streamer Wangtek 5525ES et une vieille carte S3  (ISA).
  Tout  fonctionna  parfaitement des le premier boot (noyau 1.1.50).  Et
  cela perdure depuis un mois.  Note : j'employais une Buslogic  BT-445S
  et  ai  pu  placer  le  disque  sous  le  controle du circuit NCR sans
  reformater ... tout a  survecu.   Les  peripheriques  SCSI  paraissent
  nettement plus rapides.  Seules reserves :

  1/  lilo  ne  peut  booter  le  systeme  sans  une edition manuelle de
  /etc/disktab, effectuee une fois pour toutes.

  2/ Afin que l'ensemble fonctionne : disconnect/reconnect est  debraye.
  Cela  autorise donc le verrouillage du bus SCSI meme durant de longues
  operations  ("rewind"  du  streamer)  ...   La  negociation  du   mode
  synchrone est elle aussi debrayee. Cela entraine une certaine perte de
  performances.

  Je crois que Drew (auteur du pilote pour circuit SCSI NCR)  resout  en
  ce moment ces limitations.

  Quelques problemes avec Windows.

  88..33..  bbiillll..ffoosstteerr@@mmccccaaww..ccoomm ppaarrllee ddee ssaa MMiiccrroonniiccss MM55PPii

  +o  Micronics M5Pi avec Pentium 60 MHz a bus PCI et :

  +o  16Mo RAM/512Ko cache

  +o  IDE, parallele, 16550A UARTS

  +o  2 X 340MB IDE Maxtor

  +o  Soundblaster 16 SCSI-II

  +o  Toshiba 3401B CD-ROM SCSI

  +o  Derouleur de bandes Archive Viper 525MB SCSI

  +o  Moniteur Viewsonic 17 pouces

  +o  Carte video Cardex Challenger PCI (ET4000/W32P)

  +o  Souris serie A4-Tech

  Tout  fonctionne  bien.  L'installation  de  la distribution Slackware
  s'avera tres aisee et je peux employer Quicken  7  pour  DOS  grace  a
  DOSEMU.  J'emploie X Window en 1152x900 a 67Hz.

  88..44..   SSiimmoonn  KKaarrppeenn  ((kkaarrppeennss@@nnccssssmm--sseerrvveerr..nnccssssmm..eedduu))  aa pprrooppooss ddee llaa
  MMiiccrroonniiccss MM5544ppii

  Je  n'ai  pas  eu de problemes avec cette carte, le controleur PCI IDE
  integre (j'espere passer au SCSI bientot) et une ATI Mach32 (GUP) avec
  2Mo de VRAM.

  88..55..   GGooeerrgg  vvoonn  BBeellooww  ((ggbbeellooww@@ppmmaaiill..ssaammss..cchh)) aa pprrooppooss dduu DDEELLLL PPooww--
  eerreeddggee

  +o  Intel 486DX4/100

  +o  16 Mo RAM

  +o  DELL SCSI Array (DSA) avec Firmware A07, DSA-Manager 1.7

  +o  disque dur 1 Go SCSI DIGITAL

  +o  CD-ROM NEC SCSI

  +o  streamer SCSI 2 Go interne

  +o  Ethernet : 3-Com C579 EISA

  +o  Carte video : ATI 6800AX PCI VGA, 1 MB RAM

  Attention  :  Le DSA ne fonctionne qu'avec le firmware ("BIOS") A07 !!
  A06, trop bogue, interdit le reboot !!  Pour recuperer ce code  :  ftp
  dell.com, fichier /dellbbs/dsa/dsaman17.zip

  A  part  cela  aucun  probleme  sous  Linux. Machine faisant office de
  serveur de noms, de serveur de news et de serveur WWW  sur  l'Internet
  depuis deux mois ...

  88..66..  zzeennoonn@@rreessoonneexx..ccoomm aa pprrooppooss dduu GGaatteewwaayy22000000 PP--6666

  Gateway  2000,  Pentium a 66 MHz, carte-mere Intel offrant 5 slots ISA
  et 3 PCI.  Je n'utilise qu'une carte PCI #9 GXe level 12 (2 Mo VRAM et
  1  Mo  DRAM)  achetee  chez Dell. Je n'emploie le mode graphique, sous
  Linux, qu'a  partir  des  consoles  et  attends  quelques  adaptations
  d'XFree86  avant  de  l'essayer  en  1280x1024. J'ai pu utiliser cette
  carte sous DOS/Windows en 1280x1024x256 sans probleme.  Installees par
  ailleurs  : carte Ethernet "Etherlink 3C509" (Etherlink III), la carte
  Mitsumi (--  Interfacant  probablement  un  lecteur  de  CD-ROM.--)  ,
  l'Adaptec 1542C et une carte serie/parallele (la machine comprend donc
  3 ports serie).

  32 Mo de memoire installes et reconnus par DOS et Linux.   Une  souris
  bus (Microsoft en mode PS/2).

  Aucun probleme jusqu'a present.

  88..77..  JJaammeess DD.. LLeevviinnee ((jjddll@@nneettccoomm..ccoomm)) uuttiilliissee uunn GGaatteewwaayy 22000000

  Gateway 2000 P5-60 a carte-mere Intel "Mercury", BIOS sur EPROM  Flash
  d'origine  AMI (1.00.03.AF1, (c)'92) 16Mo RAM, interface IDE embarquee
  et carte video PCI : ATI AX0 (Mach32 Ultra XLR).

  Aucun probleme avec ce materiel jusqu'a present, mais n'a rien  essaye
  de tres special (pilotes SCSI ou accelerateurs d'IDE).

  88..88..  hhii8866@@rrzz..uunnii--kkaarrllssrruuhhee..ddee :: ccaarrttee SSPPAACCEE

  8Mo  RAM, S3 805 1Mo DRAM PCI Disque dur 260Mo Seagate IDE (je ne peux
  exploiter le circuit  NCR53c810  faute  de  pilote),  Linux  0.99pl15d
  fonctionne bien.

  88..99..  ggrriiff@@ccss..uuccrr..eedduu :: ccaarrttee IINNTTEELL

  17 machines 60MHz Pentium (carte Intel "Premier").

  88..1100..  JJeerroommee MMeeyyeerrss ((jjeerroommeemm@@xxnneett..ccoomm)) eett IInntteell PPrreemmiieerr

  Intel  Premier  Plato-babyAT  90mhz  avec Buslogic bt946c w/4.86 mcode
  w/4.22  autoSCSI,  ATI  Xpression  (Mach64)  (j'emploie  les   pilotes
  disponibles sur sunsite et un moniteur AcerView 56L).

  4 disques durs IDE. Linux (Slackware 2.0) percoit les deux premiers et
  ce que controle la BusLogic (qui emule une Adaptec 1542). DOS  percoit
  tout.   BusLogic  (aux  US  du moins ! NdT) expedie sans problemes les
  circuits permettant de proceder a une mise-a-jour materielle (boitiers
  PLCC).   Une  Sound  Blaster  SCSI-2  controle aussi un lecteur de CD.
  Config complete, donc : 4 disques IDE (2 pour Linux) et 2  controleurs
  SCSI.

  88..1111..   TTiimmootthhyy  DDeemmaarreesstt  ((ddeemmaarreesstt@@rreerrff..oorr..jjpp)) eett ll''IInntteell PPllaattoo PPrree--
  mmiieerree IIII

  La  configuration  de mon systeme est la suivante : 16 Mo de RAM 60ns,
  carte ethernet 3Com Etherlink-III (10base2), ATI Mach 64 2 Mo de VRAM,
  CDROM  SCSI  double  vitesse  Toshiba, NCR 53c810 PCI SCSI, lecteur de
  cartouches 270 Mo Syquest 3270, ecran Viewsonic 17 pouces, Pentium  90
  (non  bugge).   Je  tourne sous Slackware 2.1.0 avec un noyau 1.2.0 et
  d'autres mises a jour diverses.

  Tout fonctionne sans probleme.  Je  ne  recommende  pas  les  lecteurs
  Syquest.  J'ai utilise les modeles 3105 et 3270 qui sont tous les deux
  tres,  tres  fragiles.  De  plus  les   cartouches   sont   facilement
  endommagees  ce qui m'a cause de frequents problemes. Je suis en train
  de m'interesser a d'autres systemes de  stockage  amovible  (MO,  Zip,
  Minidisc, etc).

  Quelques informations qui peuvent etre utiles :

  88..1111..11..  MMiisseess aa jjoouurr dduu FFllaasshh BBiiooss

  On peut telecharger par ftp les mises a jour de Flash Bios a partir de
  wuarchive.wustl.edu:/pub/MSDOS_UPLOADS/plato.  Le  numero  de  version
  actuelle  est  1.00.12.AX1.  Les  mises  a  jour  de BIOS doivent etre
  effectuees  dans  l'ordre.   De  1.00.03.AZ1  vers  1.00.06.AX1   vers
  1.00.08.AX1   vers   1.00.10.AX1  vers  1.00.12.AX1.   On  peut  aussi
  telecharger ces mises a jour sur le BBS Intel.

  88..1111..22..  CCaarrttee PPCCII SSCCSSII NNCCRR 5533cc881100 ssaannss BBIIOOSS

  Si vous utilisez la carte PCI SCSI NCR 53c810 sans BIOS avec la Plato,
  il  se  peut  que  vous  ayez  du  mal a la faire reconnaitre. J'ai du
  modifier un des cavaliers de la carte NCR : Celui qui controle si il y
  a  1  ou 2 cartes SCSI NCR dans votre machine doit etre sur "2". Je ne
  sais pas pourquoi, mais c'est comme ca que  j'ai  reussi  a  la  faire
  marcher.   L'autre cavalier controle le choix de l'interruption (A, B,
  C, D). Je l'ai laisse sur A (position par defaut).

  88..1111..33..  AA ppaarrtt ccaa,, cc''eesstt dduu ""pplluugg aanndd ppllaayy"" !!

  Il n'y a rien a faire dans  le  BIOS  pour  configurer  la  carte  NCR
  53c810.   Ne  vous  en faites pas - une fois les cavaliers de la carte
  bien positionnes, elle sera bien detectee ! Le PCI c'est bien du "plug
  and play" !

  88..1122..  hheeiinnrriicchh@@zzssvv..ggmmdd..ddee :: ccaarrttee AASSUUSS

  ASUS-PCI-Board (SP3) equipe de :

  +o  Carte-mere PCI Asus, CPU AMD 486/dx2-66 et 16Mo RAM

  +o  Disque dur Fujitsu 2196ESA 1G SCSI-II

  +o  Interface  disque dur Future Domain 850MEX (peu cheres, copie quasi
     conforme des Seagates ST01. J'attends le pilote pour  le  NCR53c810
     embarque)

  +o  ATI  Graphics  Ultra  (premiere vague : circuit Mach-8, carte ISA 8
     bits)

  +o  Slackware 1.1.1

  L'utilisateur s'est contente d'installer la nouvelle  carte  mere,  de
  reinstaller  les  cartes  et  de  connecter  les  cables ... et tout a
  fonctionne  du  premier  coup.   Mais  il   n'emploie   aucune   carte
  d'extension PCI.

  88..1133..  CCAARRSSTTEENN@@AAWWOORRLLDD..aawwoorrlldd..ddee :: ccaarrttee AASSUUSS

  Carte  ASUS-PCI  avec 486DX66/2, miro-crystal 8s PCI avec serveur pour
  S3 de XFree86-2.0, n'utilisant pas le circuit SCSI NCR  embarque  pour
  cause  de  manque de pilotes sous Linux mais teste sous DOS et reconnu
  tres veloce.  Aucun probleme de compatibilite.

  88..1144..  LLaarrss HHeeiinneemmaannnn ((llaarrss@@uunnii--ppaaddeerrbboorrnn..ddee)) :: AASSUUSS

  Carte ASUS PCI/I-486SP3 a  486DX2/66,  16Mo  RAM  (2x8),  miroChrystal
  8S/PCI (1Mo) S3, Soundblaster PRO, Adaptec 1542b (3.20 ROM) carte SCSI
  et deux disques (Fujitsu  M2694ESA  et  Quantum  LPS52)  plus  QIC-150
  Streamer.  Aucun probleme !

  88..1155..  RRuueeddiiggeerr..FFuunncckk@@PPhhyyssiikk..TTUU--MMuueenncchheenn..DDEE :: ccaarrttee AASSUUSS

  +o  ASUS PCI/I-486SP3 /  i486DX2-66  /  8 Mo PS/2 70 ns

  +o  BIOS: Award v 4.50

  +o  Miro Crystal 8s PCI - S3 P86C805 - 1Mo DRAM

  +o  Disque dur Quantum LPS 540S SCSI controle par NCR 53c810

  +o  CPU vers DRAM "write buffer" : en fonction (enabled)

  +o  CPU vers PCI "write buffer" :  en fonction

  +o  PCI vers DRAM "write buffer" : non employe

  +o  CPU vers PCI "burst write" :   en fonction

  88..1166..  rroobbeerrtt llooggaann ((rrll@@ddee--mmoonnttffoorrtt..aacc..uukk)) :: GGWW//22000000

  +o  Gateway 2000 4DX2-66P

  +o  16 Mo RAM,

  +o  PCI ATI AX0 2Mo DRAM (ATI GUP).

  +o  Disque dur WD 2540 (528 Mo)

  +o  Slackware 1.1.2 (0.99pl15f)

  Aucun  probleme.  SLIP  et  la carte Orchid-Soundwave-32 fonctionnent.
  J'attends moi aussi le pilote pour NCR.  Seul probleme rencontre : les
  performances  du disque IDE laissent a desirer sous Linux alors que ce
  tres  recent  disque  WD  vole  sous  DOS/WfW.  (--  L'interface   IDE
  fonctionne  en  mode  ISA  sous Linux et un pilote commute le mode PCI
  sous DOS. Cela explique la perte de charge constatee.   Cf.  aussi  le
  cas de dmarples@comms.eee.strathclyde.ac.uk  NdT.--)

  88..1177..  aarrcchhiiee@@CCSS..BBeerrkkeelleeyy..EEDDUU :: AASSUUSS ((ddeeuuxx mmaacchhiinneess))

  +o  ASUS PCI-SP3 (4 ISA, 3 PCI)

  +o  Intel 486DX2/66

  +o  Genoa Phantom 8900PCI (autre machine : Tseng 3000/W32i)

  +o  Maxtor 345 Mo IDE

  +o  Carte modem Supra 14.4

  +o  Moniteurs : ViewSonic 6e et NEC Multisync 4fge

  +o  Slackware 1.2.0

  Le  circuit  SCSI  embarque  est mis hors-fonction. Problemes de prime
  abord avec la chaine IDE (interface embarquee) : "un  jumper,  sur  la
  carte, permet de specifier si la ligne d'IRQ 14 provient du bus ISA ou
  PCI.  Un exemple fourni par le manuel montre une connexion a  l'INT  A
  du PCI.  Ne pas le respecter. La configuration du Supra exige l'emploi
  de setserial (pour preciser que le port est un 16550A).   Slackware  :
  utiliser /etc/rc.d/rc.serial."

  88..1188..  MMiicchhaaeell WWiillll :: AASSUUSS--SSPP33 448866 ((pprreemmiieerree ggeenneerraattiioonn))

  J'utilise la configuration suivante :

  +o  ASUS PCI-SP3-Board : 486dx2/66 et 16Mo RAM

  +o  NCR53c810-SCSI-II embarque pour 1Go Seagate et streamer Wangtek

  +o  ATI-GUP  PCI  Mach32  /  2Mo  VRAM  fonctionnant  parfaitement avec
     XFree86(tm)-3.1 (8 et 16 bits/pixel)

  +o  Linux kernel 1.1.54

  Tout fonctionne. Vitesse satisfaisante. Les performances de  la  carte
  ATI-GUP-PCI  (Mach32)  restent  en  deca des indices de benchmarks. Si
  j'avais de l'argent j'acheterais un P90 Plato et une carte  #9GXE64Pro
  !

  88..1199..  MMiikkee FFrriisscchh ((mmffrriisscchh@@ssaattuurrnn..ttlluugg..oorrgg)) :: GGiiggaa--BByyttee 448866IIMM

  +o  Giga-Byte 486IM

  +o  4 slots ISA (2 double VLB) et 4 PCI

  +o  CPU: Intel 486DX/33

  +o  BIOS: Award 4.50G

  +o  Controleur disque PCI EIDE : Giga-Byte GA-107 (CMD 640x PCI  Multi-
     I/O)

  +o  carte video PCI : ATI Graphics eXpression PCI 2MB DRAM

  +o  Linux Kernel: 1.2.9

  +o  Distribution Linux : Slackware 2.2.0 tres modifiee

  J'ai  fait  tourner cette carte 24h sur 24 ces 6 derniers mois. Elle a
  fonctionne  sans  probleme  sous  DOS/Windows,  OS/2  Warp  et   Linux
  (24h/24).

  88..2200..  KKaarrll KKeeyyttee ((kkkkeeyyttee@@eessoocc..bbiittnneett)) GGiiggaabbyyttee GGAA558866 PPeennttiiuumm

  +o  PCI/EISA Board Gigabyte GA586-ID 90MHz  Pentium  (biprocesseur,  un
     seul CPU monte)

  +o  32 Mo RAM

  +o  SCSI - pas de circuit NCR, j'emploie donc une Adaptec 1542C,

  +o  PCI ATI GUP 2M VRAM

  +o  Adaptec 1742 EISA SCSI

  +o  Soundblaster 16

  DOS  et  Linux  fonctionnent parfaitement. Machine extremement veloce.
  Les benchmarks de BYTE pour machines Unix lui accordent une  puissance
  a  peu  pres egale a celle d'une Sun SPARC 20 sous Solaris 2.3.  Le PC
  effectue plus vite le  test  de  vitesse  de  calcul  en  arithmetique
  entiere et celui portant sur la manipulation des processus (changement
  de contexte y compris). La station Sun l'emporte lors des  traitements
  en  virgule  flottante  et sur l'un des tests de vitesse du systeme de
  disques.

  88..2211..  kkeennff@@ccllaarrkk..nneett :: GG//WW 22000000

  Emploie un Gateway 2000 sans probleme. La carte son livree (modele non
  precise)  ne  fonctionne  pas. Il espere obtenir satisfaction apres un
  echange contre une veritable Sound Blaster.

  88..2222..  JJooeerrgg WWeeddeecckk ((jjww@@ppeeaannuuttss..iinnffoorrmmaattiikk..uunnii--ttuueebbiinnggeenn..ddee)) // EESSCCOOMM

  486  DX2/66 vendue par ESCOM (type de carte mere non precise) avec IDE
  embarque et sans circuit SCSI "NCR". Adaptec  1542cf  et  carte  video
  SPEA  v7  mercury  lite  (s3, PCI, 1Mo), ISA-Soundblaster-16, mitsumi-
  cdrom (simple vitesse).  Seul le streamer Archive ne  fonctionne  pas.
  Le spea-v7 s'entend parfaitement avec XFree86-2.1 !

  Il  abandonna  tout cela pour adopter une carte ASUS-SP3-G et constata
  qu'elle ne supporte pas les transferts en mode rafale du bus PCI  vers
  la  memoire  ("PCI-to-Memory  posting"). Seul Linux crashe, Windows et
  OS/2 fonctionnent.  Debrayer cette option rend  le  tout  parfaitement
  stable.              Lire            a            ce            propos
  "http://wsiserv.informatik.uni-tuebingen.de/ jw".

  88..2233..  uutt@@iinnffoorrmmaattiikk..uunnii--kkiieell..dd440000..ddee // AASSUUSS

  ASUS-PCI et AMD486dx40 (cadence a  33MHz  ?!).   La  carte  ISA-ET3000
  Optima  1024A ISA fonctionne bien. Pas de probleme avec le disque SCSI
  Quantum540S connecte au NCR53c810 integre.

  99..  PPrroobblleemmeess rreennccoonnttrreess

  99..11..  hhsscchhmmaall@@iinnffoorrmmaattiikk..uunnii--rroossttoocckk..ddee :: SSCCSSII--PPCCII--SSCC220000

  Linux refuse de demarrer lorsque la  carte  SCSI-PCI-SC200  se  trouve
  dans le systeme.

  99..22..  ddmmaarrpplleess@@ccoommmmss..eeeeee..ssttrraatthhccllyyddee..aacc..uukk GG//WW 22000000

  Gateway 2000 G/W 2000 4DX2/66 PCI ATI-Graphics-Ultra-Pro IDE

  Fonctionne bien, seule la carte IDE fonctionne en mode ISA sous Linux,
  beaucoup plus lentement que sous DOS apres basculement en mode PCI par
  un programme MS-DOS specifique.  Plus lent sous Linux, donc : un patch
  serait le bienvenu.

  99..33..  cciipp557744@@wwppaaxx0011..pphhyyssiikk..uunnii--wwuueerrzzbbuurrgg..ddee ((FFrraannkk HHooffmmaannnn)) // AASSUUSS

  La  carte  ASUS / 16Mo-RAM, carte ISA S3/928, interface IDE embarquee,
  disque Seagate ST4550A.  Aucun probleme avec  les  noyaux  Linux  plus
  recents.

  Probleme rencontre :

       Ma souris, sous X, ne reagit plus comme d'habitude. Le pointeur semble
       bondir lorsque je la deplace vite. Ce probleme a je crois  ete  traite
       dans  un  newsgroup Linux. L'utilisation du 16550 expliquerait ce phe-
       nomene. Apres deux semaines d'utilisation je m'y suis habitue :-)

  Reduire le seuil du tampon fourni par le 16550  devrait  ameliorer  la
  situation.  Un  patch pour setserial le permettrait mais je ne sais ou
  le trouver.

  99..44..  aaxxeell@@aavvaallaanncchhee..ccss..ttuu--bbeerrlliinn..ddee ((AAxxeell MMaahhlleerr)) // AASSUUSS

  Carte-mere ASUS PCI/I-486SP3 (Award BIOS 4.50), 16 Mo RAM Circuit SCSI
  "NCR" mis hors-fonction, Carte PCI Genoa Phantom/W32 2Mo

  Adaptec AHA-1542CF (BIOS v2.01) pour :

  +o  disque IBM 1.05 Go

  +o  CD-ROM Toshiba (XM4101-B)

  +o  DAT HP (2Go)

  mke2fs  (0.4,  v. 1.11.93) fige le systeme et interdit l'installation.
  (-- (Version  ancienne,  indique  l'utilisation  d'un  noyau  obsolete
  NdT).--)

  Le  remplacement  de  la carte video Genoa Phantom/W32 2Mo PCI par une
  ELSA Winner 1000 2Mo PCI corrigea le probleme.  Le systeme  fonctionne
  aussi avec une vieille carte VGA ISA de marque EIZO. Cela met en cause
  la carte Genoa.

  99..55..  FFrraannkk SSttrraauussss ((ssttrraauussss@@ddaaggoobbaa..eessccaappee..ddee)) // AASSUUSS

  Carte ASUS SP3   i486DX2/66 NCR53c810 hors-fonction Adaptec 1542B dans
  un slot ISA : 2 disques (200Mo Maxtor, 420Mo Fujitsu), SyQuest 88Mo et
  streamer  Tandberg  carte  video  ELSA  Winner  1000   PCI,   1Mo-VRAM
  Soundblaster  Pro  dans  slot ISA (IRQ 5) Interface IDE embarquee mise
  hors-fonction Circuits embarques pour serie, parallele  et  controleur
  de disquettes en fonction.

  La  machine se fige parfois apres un reset (logiciel ou materiel).  Ce
  n'est probablement pas du a l'Adaptec ou a la carte son car le systeme
  ne  redemarre  pas,  parfois,  meme  lorsqu'elles sont deposees.  Mais
  sitot lance (lorsque le message  du  BIOS  de  l'ELSA  apparait)  tout
  fonctionne  a merveille. (-- Memes symptomes ici depuis l'installation
  d'une carte clone a base  de  Cirrus  5428  /  VLB  dans  une  machine
  EISA/VLB   NdT.--)

  Les  deux  ports  serie  sont bien detectes en mode 16550 mais lors de
  certains transferts perdent de nombreux  caracteres  en  mode  V42bis.
  Cela semble relever d'un probleme materiel.

  Le mode rafale CPU->PCI fonctionne bien sous DOS/Windows

  Le   mode   rafale   CPU->PCI  ne  fonctionne  pas  correctement  avec
  linux0.99p15 : pertes de pages ecrans lors de basculements de consoles
  virtuelles  et blocages du systeme laissant le voyant SCSI allume lors
  de l'invocation d'applications massives telles que ghostview ou  xdvi.

  (Je  pense que ces applications exigent beaucoup de transferts en mode
  CPU->PCI-burst a cause des importants volumes  de  donnees  transferes
  vers la carte ELSA lors de leur invocation).

  Tout  fonctionne bien apres mise hors-fonction du mode CPU->PCI-Burst.
  La carte video delivre 93k xstones en 1152x846 (peu de cache pour  les
  fontes  avec  1Mo).  Le mode Opaquemove sous twm est un poil mieux que
  "supportable" :-)

  Un programme DOS nomme SATURN.EXE, lance avant de demarrer Linux, aide
  ce dernier a exploiter le mode burst sans accroc.

  Quelqu'un  a  affirme que certains de ces problemes disparaitraient si
  je pouvais debrayer le  mode  "sync  negotiation"  de  l'Adaptec  mais
  j'ignore si la 1542B permet cela.

  Avec  le  mode  CPU->PCI-Burst  la carte video atteint 95k xstones, ce
  gain ne justifie pas l'effort.  L'utilisateur  aimerait  exploiter  la
  carte video en mode 1152x900 mais cela ne semble pas possible car elle
  interprete toute resolution horizontale superieure a 1024 comme  egale
  a  1280,  entamant  la  bande  passante  au point de devoir reduire la
  dimension verticale a 816 pixels.

  99..66..  eeggoooocchh@@mmcc..ccoomm // AASSUUSS

  +o  Carte    ASUS PCI/I-486 SP3      RAM : 16Mo (4x4M-SIMM)

  +o  Processeur       486DX33

  +o  BIOS     Ver. 4.50 (12/30/93)

  +o  2 lecteurs de  disquettes  (1.2  et  1.44),  utilisant  le  circuit
     embarque

  +o  SCSI    WD7000 SCSI et Adaptec 1542CF fonctionnent

  +o  2 disques SCSI 320Mo

  +o  CD-ROM SCSI NEC84

  +o  Streamer Archive QIC150 SCSI

  +o  Video    Tseng ET4000 ISA

  +o  Son      PAS16

  +o  Imprimante sur le port parallele integre a la carte mere

  Aucune  carte  d'extension PCI pour le moment, mais desire acheter une
  carte  video  PCI.  Utilise  une  carte  d'interface  SCSI  WD7000  en
  attendant le pilote pour circuit NCR embarque.

  Tout  fonctionne  parfaitement.  Le  premier port serie (sert un modem
  14.4) se bloque parfois lors  des  tentatives  de  reconnexions  apres
  utilisation  du  modem.  Ce probleme serait cause par un circuit (SMC-
  LSI) du 16550 deficient.  La souris Logitech serie connectee au second
  port  fonctionne  bien,  mais  je cherche comment diminuer le seuil du
  tampon fourni par le 16550.

  99..77..  SStteeffaann..DDaalliibboorr@@iinnffoorrmmaattiikk..uunnii--eerrllaannggeenn..ddee // GGiiggaaBByyttee

  +o  Carte  GA-486iS Gigabyte 256Kb cache 2L, i486-DX2

  +o  Bios     AMI, 93/8

  +o  SCSI     Pas de circuit SCSI embarque, j'emploie une Adaptec 1542C,

  +o  Video     ELSA Winner 1000

  +o  Linux  0.99pl14 + SCSI-Clustering-Patches / Slackware 1.1.1

  Tout semble fonctionner correctement mais l'utilisateur n'a pas encore
  essaye d'installer une carte Ethernet, d'imprimer  ou  d'exploiter  un
  streamer.   Des  problemes  de blocages du systeme lorsqu'il utilisait
  find furent resolus par l'application des patches de  clustering  SCSI
  mais ils relevaient plutot de dysfonctionnements des anciennes version
  du noyau.

  La carte video ELSA-Winner-1000 se fige parfois.  L'affichage  devient
  pour  le  moins etrange et il faut relancer le systeme. Le revendeur a
  parle d'un bug de la carte ELSA mais le constructeur a  affirme  avoir
  resolu  cela.  le probleme n'est pas systematique, l'utilisateur tache
  donc de l'ignorer.

  Tout bien considere la  machine  fonctionne  bien  en  utilisation  de
  bureautique   oriente   traitement  de  textes  (emacs,  LaTeX,  xfig,
  ghostview) et semble tres veloce, a peine au-dessous des stations  Sun
  coutant au moins 3 fois plus cher qu'il emploie par ailleurs.

  Le  mode  CPU->PCI-Burst  est  debraye  car  le  BIOS  ne supporte pas
  correctement cela.

  99..88..  TToomm DDrraabbeennssttootttt ((ttllddrraabbeenn@@eeooss..nnccssuu..eedduu)) :: CCoommttrraaddee // PPCCII4488IIXX

  PCI48IX  Rev.  1.0.  Constructeur inconnu, documentation par "TMC". Le
  BIOS ne permet guere de parametrer le bus PCI.

  La carte ISA multifonctions d'interface  IDE  de  type  UMC  (863+865)
  fonctionne bien sous DOS et OS/2 mais pas sous Linux.

  1100..  CChhooiixx dd''uunnee ccaarrttee--mmeerree PPCCII :: ccoonnsseeiillss eett oobbsseerrvvaattiioonnss ddiivveerrsseess

  Angelo Haritsis (ah@doc.ic.ac.uk) a rassemble les  elements  de  cette
  section.

  1100..11..  AATTTTEENNTTIIOONN

  Ne  pas  acheter  de  carte-mere  PCI/VLB, elles paraissent toutes mal
  concues.  Opter pour une carte PCI/ISA.  Eviter les jeu de  composants
  (chipsets)  de  marque OPTi modeles 82C596, 82C597 et 82C822 comme sur
  la carte mere TMC PCI54PV.

  (Je connais au moins une personne qui n'a pas de probleme avec sa  TMC
  PCI54PV.   Il  lui a fallu seulement mettre sa carte NCR53c810 dans le
  slot A qui semble le seul capable de faire du busmaster.)

  Diverses rumeurs laissent entendre  que  les  cartes  meres  Intel  ne
  peuvent  supporter  plus  d'une  carte  d'extension bus master. On dit
  aussi que le chipset Saturn II  pose  divers  problemes  ...  mais  je
  l'emploie avec satisfaction !

  1100..22..  CCoonnnneecctteeuurr ddee ccoommppoossaannttss ddee RRAAMM

  Opter  pour  une  carte  a  connecteurs 72 points (velocite maximale).
  Toutes les cartes Intel offrent cela.

  1100..33..  CCaarrttee--mmeerree PPCCII pplleebbiisscciitteeee

  La carte-mere Intel pour Pentium 90  a  chipset  Premiere  II  (connue
  aussi  sous  le  nom  de "Plato") parait satisfaisante.  Opter pour un
  BIOS integrant le code du controleur SCSI NCR embarque afin  que  meme
  le  53c810  permette  a MS-DOS de fonctionner.  La version 1.00.08 (ou
  peut-etre 1.00.06) offre un BIOS pour le circuit NCR integre  au  BIOS
  principal  (AMI).  Une  disquette  permet  de mettre a jour ce dernier
  (inscrit sur EPROM FLASH). La plus recente version  reperee  porte  le
  numero  1.00.10  et  corrige  tous  les  problemes  de  jeunesse de ce
  produit.

  1100..44..  LLiiggnneess dd''IIRRQQ ((IInntteerrrruupptt RReeQQuueesstt))

  La plupart des cartes-meres exigent une configuration  explicite  (via
  le  SETUP)  des  parametres  PCI bas-niveau ... pour chaque connecteur
  (slot PCI) !  Cela menage la compatibilite de ce bus avec  les  cartes
  ISA.   Sur  les  plus  anciennes  cartes  PCI  des cavaliers (jumpers)
  doivent configurer le mode d'exploitation des  lignes  d'interruptions
  fournies  par  chaque slot PCI (INTA et parfois INTB, INTC et INTD) et
  de leur interfacage avec les lignes du classique 8259. Si  une  carte-
  mere   donnee   integre   ces   cavaliers   leurs   positions  doivent
  imperativement correspondre au parametrage (SETUP) du  bus  PCI.   Les
  documents  fournis  avec  un  certain  nombre  de cartes (Viglens, par
  exemple) sont partiellement errones. L'installation exige  en  ce  cas
  quelques tatonnements.

  1100..55..  LLaa ffaammiillllee ddeess cciirrccuuiittss ccoonnttrroolleeuurrss SSCCSSII ddee NNCCRR ""88xxxx""

  Tous les circuits NCR 8XX emploient le bus mastering (peuvent  prendre
  le  controle  du  bus)  et  se  connectent directement au bus PCI. Ils
  correspondent aux specifications PCI version 2.0 et sont donc capables
  de transferts en mode rafale sur 32 bits a 33MHz (133 Mo/s).

  1100..55..11..  5533CC881100

  8  bits  Fast  SCSI-2  (10 Mo/s).  Necessite un BIOS specifique sur la
  carte mere.  100 broches Quad Flat Pack (PQFP).  Premier circuit  SCSI
  pour PCI. Le moins onereux car le plus produit.

  1100..55..22..  5533CC881155

  8  bits Fast SCSI-2 (10 Mo/s).  Terminaisons passives ("single ended")
  uniquement.   Interface  pour  BIOS  externe   (circuit   ideal   pour
  conception de carte).  128 broches QFP.

  1100..55..33..  5533CC882255

  16   bits   Fast   SCSI-2   (20   Mo/s).    Terminaisons  passives  ou
  differentielles.  Interface pour BIOS externe.  160 broches QFP.

  1100..66..  LLee ffuuttuurr ddeess 5533cc88xxxx

  NCR  annoncera  dans  les  6  prochains  mois  4  nouveaux   circuits.
  Brochages  compatibles  avec  les  810  et  825  et quelques nouvelles
  fonctions.

  Tous ces circuits necessitent un BIOS sous MS-DOS. Le 810  seul  exige
  son  implantation  sur  la carte-mere. La plus recente version du BIOS
  NCR porte le numero 3.04.00 et permet a MS-DOS d'employer les  disques
  de plus d'un Go.

  1100..77..  PPeerrffoorrmmaanncceess ddeess cciirrccuuiittss SSCCSSII NNCCRR

  Les  tests  de  velocite  du magazine allemand "C't" indiquent que ces
  circuits fonctionnent nettement plus vite que la BusLogic  BT-946.  Un
  utilisateur  a  constate  un niveau de performances d'environ 10 a 15%
  superieur a celui d'une Adaptec 2940 et qu'avec un tres rapide  disque
  dur  le  tout  semble  environ  deux  fois  et demi plus rapide qu'une
  Adaptec 1540.

  1100..88..  DDeess nnoouuvveelllleess dduu ssuuppppoorrtt NNCCRR5533cc882255

  Ca fonctionne. point.

  1100..99..  FFrreeddeerriicc PPOOTTTTEERR ((FFrreeddeerriicc..PPootttteerr@@mmaassii..iibbpp..ffrr)) aa pprrooppooss ddee  PPeenn--
  ttiiuumm++NNCCRR++SSttrraapp__bbuugg

  Sur certaines cartes Intel Plato, le bios  NCR  ne  reconnait  pas  la
  carte car il doit la voir en tant que "controleur SCSI secondaire", et
  que  sur  la  pluspart  des  cartes  SCSI  le  cavalier  de  selection
  primaire/secondaire  a ete soude en position primaire (pour economiser
  un centime, sans doute).

  Solution:

  Pres du circuit NCR, il y a 3 connections (sorte de trous) avec un strap,
  qui ressemblent a

                  O--O  O

          Cela indique que le primaire est configure par defaut. Pour la carte
          Intel Plato il devrait etre comme ceci

                  O  O--O

          La meilleure solution est d'enlever le strap et de mettre a la place
          un cavalier a deux positions.

  1100..1100..  LLaa ddeetteeccttiioonn ddeess  ppeerriipphheerriiqquueess  PPCCII  ddaannss  lleess  nnooyyaauuxx  LLiinnuuxx
  rreecceennttss ppaarr FFrreeddeerriicc PPootttteerr

  Frederic Potter a rajoute une detection des peripheriques PCI dans les
  noyaux  recents.   Si vous faites "cat /proc/pci" vous devriez obtenir
  la liste de vos cartes.  Si certaines de vos cartes ne sont  pas  bien
  reconnues,      envoyez      un      courrier      electronique      a
  "Frederic.Potter@masi.ibp.fr".

  Voir arch/i386/kernel/bios32.c et include/linux/pci.h dans les sources
  du  noyau  pour  en  savoir plus sur le fonctionnement de la detection
  PCI.

  1100..1111..  AAuuttrreess ppeerriipphheerriiqquueess PPCCII

  Quelles autres cartes PCI peut-on utiliser ?  A  part  les  nombreuses
  cartes  graphiques,  j'aimerais  entendre parler d'autres cartes comme
  les cartes ethernet, de capture d'ecran ou de  TEST.   Cyclades  a  en
  beta test en ce moment :

  1100..1111..11..  CCyyccllaaddeess:: ccaarrttee mmuullttiippoorrtt PPCCII RRIISSCC aa 1166 ppoorrttss

  Ce produit appele Cyclom-Ye possede les caracteristiques suivantes :

  +o  Carte PCI hote base sur le jeu de circuits PLX. Cette carte gere de
     8 a 32 ports serie, avec des boitiers externes 8 ou 16 ports.

  +o  cable SCSI II.

  +o  boitiers externes 8 or 16 ports avec connecteurs RJ45  ou  DB25  au
     choix.  On peut debuter avec 8 ports et augmenter a 32 en rajoutant
     seulement des boitiers. Chaque boitier  externe  contient  2  ou  4
     controleurs  serie  RISC  CD-1400  (chaque CD-1400 controle 4 ports
     serie).

  +o  Il est possible d'installer 4 cartes hote dans un PC ce qui  permet
     un maximum de 128 ports serie par systeme.

     Ce  produit est en cours de beta test au 26 juillet 1995 et devrait
     etre  disponible  vers  octobre.  Vous  pouvez  les   contacter   a
     sales@cyclades.com.

  1111..  CCoonncclluussiioonn

  Si  vous  avez l'argent necessaire optez pour une ASUS-SP4, P90, c'est
  ce que je possede en ce moment. Si vous pouvez vous le permettre 32 Mo
  de RAM est tres superieur a 16 Mo.

  Dans  un  avenir  proche, le futur standard sera le chipset Triton qui
  permettra l'utilisation des barettes memoires EDO et  SRAM.  Les  deux
  seront  plus  cheres que de la RAM PS2, et en ce moment (28 juin 1995)
  la SRAM n'est pas encore disponible. Si la RAM EDO est plus  chere  ce
  n'est  pas  a  cause  des  couts  de production, il parait qu'ils sont
  identiques.

  Pour un systeme a hautes performances, je choisirais  quand  meme  une
  ASUS-TP4/XE  avec  de  la RAM EDO mais si vous n'en avez pas un besoin
  urgent il vaut mieux attendre encore un peu.

  Pour le choix d'une carte graphique, je dirais que  la  meilleure  des
  cartes  bon  marche  qui  s'accorde parfaitement avec un ecran Samsung
  Syncmaster 15Gli, est la SPEA  V7  Mirage  P64  a  circuit  Trio64  en
  version  2  Mo  de  DRAM.  Pour  des  affichages plus sophistiques tel
  l'Iiyama-IDEK 8617-T, je pense que la PCI Mach64 ATI-GUP-Turbo (pas le
  modele  moins  cher GUP-Turbo-Windows) serait un bon choix : avec 4 Mo
  de RAM on peut avoir 16 millions  de  couleurs  dans  les  resolutions
  superieures.  Elle  est  bien  geree  par XFree86(tm)-3.1.1, et il y a
  aussi des serveurs X commerciaux,  parmi  lesquels  je  recommenderais
  Accelerated/X, qui la font fonctionner tres efficacement.

  Pour du SCSI je conseille un controleur DPT plustot que le (moins cher
  et tres rapide) NCR53c810 si l'on compte utiliser beaucoup de streamer
  SCSI.   Le  pilote  Linux  pour  NCR53c810  ne gere pas, en effet, les
  connection/deconnection ce qui bloque le bus SCSI a  chaque  operation
  du  type  "mt  rewind", "mt fsf", etc.  Cela implique de penaliser les
  performances  pendant  l'utilisation  de  Tar.  Mais  allez  voir  les
  nouveaux pilotes alpha de Drew avant de prendre un decision, peut-etre
  resolvent-ils ces problemes.

  Pour des serveurs, le DPT reste de toute facon le controleur de  choix
  a cause de la bonne gestion du cache materiel ( avec tri des acces, ce
  qui rend le cache embarque interessant meme sur un environnement Linux
  ou l'OS gere son propre cache) et du support raid jusqu'au niveau 5.

  Si  vous ne voulez depenser autant d'argent en equipement informatique
  (vous avez aussi une vie) vous pourriez prendre une ASUS-SP3-SiS  avec
  un  AMD-DX2/66  ou  un DX4/100. La SPEA V7 Mirage P64 PCI avec 2 Mo de
  DRAM est un bon choix car elle utilise le circuit S3  Trio64  qui  est
  bien  supporte  par  XFree86(tm)-3.1.1  et  de plus n'est pas chere et
  rapide.

  Depuis XFree86(tm)-3.1, l'ET4000/w32-PCI rapide et peu chere est aussi
  un bon choix.

  1122..  RReemmeerrcciieemmeennttss

  Les personnes suivantes ont directement contribue a la redaction de ce
  document :

  +o  David  Lesher  (wb8foz@netcom.com)  (correction   de   la   version
     anglaise)

  +o  Nathanael   MAKAREVITCH   (nat@nataa.frmug.fr.net)  (adaptation  en
     francais)

  +o  Jun Morimoto (morimoto@lab.imagica.co.jp) (adaptation en japonais)

  +o  Marco Melgazzi (marco@vcldec1.polito.it) (adaptation en italien)

  +o  Donald Becker (becker@cesdis.gsfc.nasa.gov) (infos ethernet)

  +o  Drew Eckhardt (drew@kinglear.cs.Colorado.EDU) (infos SCSI)

  J'ai collecte la plupart des informations presentees ici par email  et
  articles de news postes par les personnes dont les noms suivent :

       CARSTEN@AWORLD.aworld.de,        dmarples@comms.eee.strathclyde.ac.uk,
       drew@kinglear.cs.Colorado.EDU (oeuvrant sur le pilote  du  NCR53c810),
       duncan@spd.eee.strathclyde.ac.uk,           fm3@irz.inf.tu-dresden.de,
       grif@ucrengr.ucr.edu,  heinrich@zsv.gmd.de,  hm@ix.de   (iX-Magazine),
       hm@seneca.ix.de,   kebsch.pad@sni.de,  kenf@clark.net,  matthias@pent-
       house.boerde.de,    ortloff@omega.informatik.uni-dortmund.de,     pre-
       berle@cip.informatik.uni-erlangen.de,    rob@me62.lbl.gov,    rsi@net-
       com.com,   sk001sp@unidui.uni-duisburg.de,   strauss@dagoba.escape.de,
       strauss@dagoba.priconet.de, hi86@rz.uni-karlsruhe.de, Ulrich Teichert,
       krypton@netzservice.de,     Stefan.Dalibor@informatik.uni-erlangen.de,
       tldraben@teleport.com  mundkur@eagle.ece.uci.edu, ooch@jericho.mc.com,
       Gert Doering (gert@greenie.muc.de), James D. Levine  (jdl@netcom.com),
       Georg     von     Below    (gbelow@pmail.sams.ch),    Jerome    Meyers
       (jeromem@quake.xnet.com),    Angelo    Haritsis     (ah@doc.ic.ac.uk),
       archie@CS.Berkeley.EDU et son copain kenf@clark.net.

  Nat  aimerait  remercier  les  courageux  relecteurs/correcteurs de ce
  document :

  Xavier Cazin, Rene Cougnenc

  1133..  IInnffoorrmmaattiioonnss ddiivveerrsseess ((sseeccttiioonn aajjoouutteeee ppaarr NNaatt))

  ---------------------------------------

  Truc pour verifier la release  du  chipset  PCI  (merci  a  Jean-Louis
  Matrat).

  Sous debug:

  -o cf8 f0
  -i c000
  86
  -i c001
  80
  -i c002
  A3
  -i c003
  04
  -i c008
  11
  -o cf8 00
  -q

  Les valeurs retournees indiquent :

  +o  en 00 et 01 : Vendor ID, Intel si 8086

  +o  en  02  et 03 : Device ID, 0483 si Saturn (PCI en 486), 04A3 si PCI
     en Pentium (Mercury et la suite)

  +o  en 04 : Revision ID, 01 pour Mercury 1 (60 MHz), 03 pour Mercury  2
     (66 MHz), Neptune (90 MHz) si 10 et plus.

  ---------------------------------------

  Pour  recuperer  les  fichiers  permettant  de reprogrammer un BIOS de
  carte Plato :

  ftp.ibp.fr:/pub/linux/packages/GCC/plato.tar.gz

  Un newsgroup nomme alt.comp.periphs.mainboard.asus traite du  cas  des
  cartes meres ASUS.

  1144..  NNoottee dduu ttrraadduucctteeuurr

  Note  destinee  aux  utilisateurs  de  Linux  residant en France : Une
  conference repartie sur de nombreux  BBS  francais  traite  de  Linux.
  Elle est reliee au newsgroup Usenet "fr.comp.os.linux".

  Divers  sites  publics  proposent  fichiers  et  informations  utiles.
  Connexion par modem/reseau telephonique commute, sans parite,  8  bits
  de donnees et 1 bit de stop :

  brasil       (1)  44 67 08 44       Bulletin Board System
  bbs-fdn      (1)  48 89 58 59       Site Linux et uucp anonyme de
                                      l'association FDN. Login guest,
                                      ou nuucp sans mot de passe.
  remcomp      (1)  40 22 90 93       Site uucp anonyme.
               (1)  42 47 06 11       Login: nuucp, pas de mot de
                                      passe. Liste des fichiers dans
                                      ~/catalogue.gz
  renux        (1)  42 37 78 92       Site Linux ou uucp anonyme.
                                      Liste des fichiers dans:
                                      /mirror/catalogue.zip
  shagshag     (1)  40 30 04 68       Site Linux
  fasterix    (1)  47 07 32 34        fichiers /gnu et /vrac
  magix        (1)  45 21 02 52
  paoux        (1)  60 82 29 34       Site Linux ou uucp anonyme
  spia         (16) 47 42 56 25       Site Linux
  stdin BBS    (16) 72 34 54 37       Bulletin Board System
  Le Lien      (16) 72 08 98 79       Bulletin Board System
  Suptel Nancy (16) 83 53 16 17       Bulletin Board System
               (16) 83 53 20 21
  cafard naum  (16) 51 70 16 32      Bulletin Board System
               (16) 51 70 16 34      Site Linux  ou uucp anonyme.

  Serveurs ftp :
  ftp.ibp.fr         132.227.60.2     /pub/linux : miroir de tsx-11.mit.edu.
  ftp.fdn.org        193.55.4.75      /pub/Linux
  ftp.loria.fr       152.81.10.10     /pub/linux
  ftp.univ-angers.fr 193.49.144.1     /pub/Linux

  Voir aussi :
  fgb1.fgb.mw.tu-muenchen.de     129.187.200.1    /pub/linux
  ftp.denet.dk                   129.142.6.74     /pub/OS/linux
  ftp.dfv.rwth-aachen.de         137.226.4.105    /pub/linux
  ftp.ibr.cs.tu-bs.de            134.169.34.15    /pub/os/linux
  ftp.informatik.rwth-aachen.de  137.226.112.172  /pub/Linux
  ftp.informatik.tu-muenchen.de  131.159.0.110    /pub/Linux
  ftp.mcc.ac.uk                  130.88.203.12    /pub/linux
  ftp.stack.urc.tue.nl           131.155.2.71     /pub/linux
  ftp.win.tue.nl                 131.155.70.100   /pub/linux
  nic.funet.fi                   128.214.6.100    /pub/OS/Linux
  src.doc.ic.ac.uk               146.169.2.1      /packages/linux

  1155..  CCooppyyrriigghhtt//aavveerrttiisssseemmeenntt lleeggaall

  (c)   Copyright   1993,  94  by  Michael  Will  (michaelw@student.uni-
  tuebingen.de) - reserve aux usages non commerciaux.   La  licence  GPL
  (Gnu  Public  License)  s'applique.  Si vous ne pouvez pas obtenir une
  copie de la GPL, je serais heureux de vous en envoyer une.

  Si vous vendez ce HOWTO sur un CD ou dans un livre je  serais  heureux
  d'en obtenir un exemplaire pour reference.

  (Michael.Will@student.uni-tuebingen.de)

  Vous  pouvez  me  contacter  par  courrier  electronique  ou  bien  au
  +49-7071-969063.

  La  reproduction  de  la  presente   traduction   ne   necessite   pas
  l'autorisation  de  ses  traducteurs : Nat (nat@nataa.frmug.fr.net) et
  Olivier (olivier.chretien@atd.fdn.fr).

  Les marques citees restent la propriete  de  leurs  possesseurs.   Les
  informations fournies ne sont assorties d'aucune garantie.
  Linux PPP, Foire Aux Questions
  Par Alfred Longyear, adaptation Francaise Rene Cougnenc
  27 Janvier 1994

  Ce document contient les reponses aux questions frequemment posees
  concernant l'implementation de PPP sous Linux, il s'agit de la traduc-
  tion Francaise et d'une mise en forme SGML du fichier contenu dans
  l'archive de distribution du paquetage PPP. Depuis, Al Longyear dif-
  fuse un ``PPP-HOWTO''. Ce document ayant ete realise avant, il con-
  serve le nom de PPP-FAQ et est un peu different du HOWTO original; en
  fait il est plus complet.

  1.  Mentions legales

   "Linux PPP Frequently Asked Questions" est Copyright (c) 1994 Alfred
  Longyear.

  Ce document  peut etre reproduit en tout ou partie a condition que son
  origine soit clairement mentionnee et que ce present copyright soit
  present.  Aucune modification du texte n'est autorisee.

  Microsoft est une marque deposee de  Microsoft Corporation.  Morning
  Star est une marque deposee de
   Morningstar Technologies Incorporated.  Tous les autres produits
  mentionnes sont des marques deposees des compagnies en etant
  proprietaires.



  2.  Introduction

  Voici les reponses aux questions frequemment posees concernant
  l'utilisation de PPP sous Linux.

  Envoyez toute correction que vous jugerez necessaire a l'adresse
   longyear@netcom.com. Attention ! consultez le texte original Anglais
  auparavant; l'auteur, Alfred Longyear, n'est pas concerne par les
  eventuelles erreurs introduites dans cette adaptation Francaise.

  Ce document sera occasionnellement remis a jour, mais surement pas
  tres regulierement, realiser ce genre de choses prend un temps non
  negligeable et n'est pas un travail passionnant.  Sa diffusion sera
  tout aussi peu precise, nous tacherons de le rendre disponible sur les
  principaux sites diffusant Linux en France. Le source original est
  realise en SGML et formate par le systeme Linux-doc-SGML mis au point
  par Matt Welsh pour la documentation du systeme Linux.  Vous
  disposerez par consequent de ce texte dans differents formats, qui
  sont:

  o  Sortie DVI apres formatage LaTeX, que vous pourrez par exemple
     afficher sous X-Window par la commande xdvi,

  o  Sortie PostScript, permettant directement l'impression papier du
     plus bel effet,

  o  Sortie HTML, qui vous autorisera a parcourir ce document sous forme
     hypertexte dans Chimera, Mosaic ou tout autre client WWW,

  o  Sortie ASCII, desaccentuee et pas tres jolie, mais si vous ne
     pouvez pas faire autrement elle sera lisible sur n'importe quoi,

  o  Et bien sur du texte source SGML ayant permis la realisation de ces
     precedents formats.

  La mise en page n'est pas extraordinaire, le kit Linux-doc-sgml
  n'etant pas destine a realiser des productions aussi peaufinees que
  celles faites directement sous LaTeX.

  Tout au long de ce document, il est fait usage du terme "distant" pour
  designer "systeme situe a l'autre bout de la connexion modem", que
  l'on appelle souvent "peer". Son adresse IP est l'adresse 'P-t-P'
  indiquee par la commande 'ifconfig'.




  3.  Questions et reponses



  3.1.	Qu'est-ce que PPP ?

  PPP, ou "Point-to-Point Protocol", est un protocole internet
  ``officiel''. Il est destine a l'echange de paquets IP (ou autre type
  de reseau) sur une liaison serie. Sa description se trouve dans le RFC
  1661.

  Contrairement a ce que beaucoup de personnes pensent, PPP ne signifie
  pas du tout "Peer to Peer Processing", bien qu'il soit possible
  d'effectuer des communications "peer-peer" en utilisant TCP/IP sur une
  liaison PPP.


  3.2.	Mon entreprise (universite) ne supporte pas PPP. Puis-je
  l'utiliser ?

  En general, non. Une implementation ``classique'' de PPP necessite des
  modifications aux routages et interfaces reseau du systeme
  d'exploitation.  Cela peut necessiter la recompilation du noyau du
  systeme distant.

  Ce n'est pas une tache de simple utilisateur. Si vous arrivez a
  convaincre vos administrateurs systeme que PPP est une ``bonne
  chose'', alors vous aurez une chance de voir ce protocole installe. Si
  ils sont refractaires a cette idee, vous ne pourrez probablement pas
  utiliser PPP.

  Malgre tout, si vous utilisez un systeme qui est supporte par les gens
  qui vendent "TIA" ("The Internet Adapter") il y a un petit espoir.
  Nous n'avons pas beaucoup d'informations sur ce paquetage, mais nous
  avons entendu dire qu'ils comptent supporter PPP dans les prochaines
  versions. (Ces informations sont sans doute tres anciennes, contactez-
  les directement. Vous trouverez des renseignements sur TIA sur
  ftp.marketplace.com dans le repertoire /pub/tia).

  Un portage Linux est prevu.

  Si votre systeme n'est pas supporte par TIA et que vous ne pouvez
  convaincre vos administrateurs de l'utilite de PPP, essayez d'utiliser
  le paquetage "term".


  3.3.	Ou et sous quelle forme se trouve PPP ?

  Il se decompose en deux parties, dont la premiere est dans le noyau,
  incluse depuis Linux 1.1.13.

  NE REMPLACEZ PAS LE PILOTE FOURNI AVEC LE NOYAU PAR UNE VERSION
  TROUVEE DANS LE PAQUETAGE PPPD !!!

  La seconde partie est le "demon pppd". Ce programme est INDISPENSABLE,
  ses sources se trouvent dans le fichier ppp-2.1.2b.tar.gz sur les
  sites diffusant Linux.

  Pour les noyaux de version inferieure a 1.1.13, le pilote necessaire
  est inclus dans un sous-repertoire de cette archive. C'est le seul cas
  ou vous devez utiliser ces fichiers systeme, mais il est plutot
  preferable que vous mettiez a jour votre noyau.


  3.4.	Je viens de recuperer PPP. Quelle est la suite des operations ?

  Lisez la documentation fournie. Elle a ete ecrite pour vous !

  Commencez par lire les fichiers README et README.linux. Diverses
  autres sources de documentation sont indiquees ci-apres.


  3.5.	Quelles autres documentations sur PPP sont disponibles ?

  (Ou est la doc ? Ou est la FAQ ? etc.)

  Il existe plusieurs sources d'information concernant le protocole PPP
  tel qu'il est implemente sous Linux.


  o  Le fichier README contenu dans l'archive des sources.

  o  Le fichier README.linux au meme endroit.

  o  Le document Linux Net-2-HOWTO.

  o  Le "Network Admin Guide".

  o  La page de manuel du programme "pppd".

  o  La FAQ de PPP (Ce n'est pas le document que vous lisez ici).

  Le fichier HOWTO peut se telecharger sur les sites habituels diffusant
  Linux, par exemple sur ftp.ibp.fr dans le repertoire
  /pub/linux/docs/HOWTO.

  Le Network Admin Guide fait partie du projet de documentation Linux,
  vous trouverez ce livre sous forme electronique au meme endroit.  Il
  sera prochainement publie par O'Reilly et disponible en version
  Francaise. Si vous desirez un document de presentation
  professionnelle, vous pourrez alors acheter cet ouvrage plutot que de
  le telecharger et l'imprimer vous-meme.

  Les pages de manuel sont fournies avec les sources. Il vous faudra les
  placer dans les repertoires standard, /usr/man/man8 pour que la
  commande man puisse les traiter. Vous pouvez bien entendu les examiner
  directement a l'aide de groff.

  La FAQ de PPP decrit le protocole en lui-meme et ses diverses
  implementations sur differents systemes. Vous trouverez ce document
  dans le forum Usenet comp.protocols.ppp, ou encore dans news.answers
  et il est bien entendu archive sur rtfm.mit.edu dans le repertoire
  /usenet.  Il est a l'heure actuelle compose de huit parties.


  3.6.	Ou dois-je poser des questions relatives a PPP ?

  Il est preferable de les poser dans le groupe comp.protocols.ppp.  Il
  est fait pour cela. Helas, beaucoup d'utilisateurs ont tendance a
  exposer d'abord leur problemes dans les groupes comp.os.linux.*, ou
  ils recoivent des reponses bien que ce ne soit pas l'endroit ideal.

  Tres peu de questions sur PPP sont directement liees a son
  implementation sous Linux. La plupart des problemes poses sont d'ordre
  general, concernent l'utilisation du paquetage PPP et les reponses
  sont applicables a n'importe quel autre systeme d'exploitation.

  Aussi, pour reduire le trafic dans les groupes Linux, et pour toucher
  les vrais specialistes de PPP, si vous devez utiliser Usenet a ce
  sujet, utilisez absolument le groupe comp.protocols.ppp.


  3.7.	PPP ne marche pas, pppd se termine apres l'appel. SOS !!!

  C'est l'une des questions les plus irritantes. Nous nous rendons bien
  compte que c'est un appel a l'aide, mais il est inutile de poster un
  tel message SANS AUCUNE AUTRE INFORMATION. La plupart des gens
  susceptibles de pouvoir vous aider l'ignoreront, purement et
  simplement.

  Il vous faut fournir les logs systeme (syslog) produits lorsque vous
  lancez le programme pppd avec l'option debug. De plus, si vous
  utilisez chat pour l'appel du service, utilisez son option -v pour
  obtenir une trace du dialogue.

  Fournissez egalement le log de demarrage de votre noyau Linux.  Il
  informe des differentes configurations propres a votre systeme, comme
  la version de PPP, le type de port serie, etc.

  Enfin, rajoutez toute information que vous pensez relative a votre
  probleme. Bien entendu, votre machine, disques durs, boutons de
  souris, terminaux, n'ont aucun interet... Ce qui compte est surtout le
  systeme que vous tentez de contacter, la version de PPP ou de serveur
  de terminaux qu'il utilise, les types et vitesses de modem de part et
  d'autre, etc.

  Faites attention, editez soigneusement ces informations, en supprimant
  eventuellement tout numero de telephone, login et mot de passe
  susceptibles d'apparaitre. Ils n'ont aucune utilite pour le deboguage,
  et les diffuser sur Usenet ne serait pas tres malin. Supprimez aussi
  les lignes qui ne viennent pas du noyeau ou de pppd.

  Ne postez jamais integralement le log du programme pppd lance avec
  l'option kdebug 7 !

  Si le probleme demande une analyse du flux de donnees, vous serez
  contacte par courrier electronique et l'on vous demandera la trace par
  ce biais. Usenet coute deja bien trop cher pour beaucoup de gens.

  L'information est ecrite sous plusieurs niveaux. Les messages de
  deboguages sont au niveau debug. Ceux d'information le sont au niveau
  info, les erreurs au niveau error.  Incluez tous les niveaux par le
  groupe local2, issu du processus pppd.

  De plus, surtout ne supprimez pas les informations horaires, elles
  sont tres importantes.


  3.8.	Je cherche une implementation de PPP ailleurs que sous Linux.

  Existe-t-il des versions pour HP-UX, AIX, ou... bien d'autres systemes
  ?

  Lisez les documentations mentionnees plus haut.

  AIX sera supporte dans la version 2.2 du paquetage pppd.  HP-UX n'est
  a notre connaissance supporte que par la version commerciale
  MorningStar.
  Si vous ne trouvez vraiment aucun renseignement, demandez dans
  comp.protocols.ppp, mais surtout pas dans un groupe Linux, qui n'est
  en aucun cas concerne.


  3.9.	Saviez vous qu'il existe une autre implementation nommee "dp" ?

  Oui, nous sommes au courant. Le paquetage "dp" fut envisage au tout
  debut de l'implementation de PPP sous Linux. Il est tres bien, il
  supporte l'appel a la demande. Il ne peut fonctionner que sur un
  systeme supportant les streams, c'est a dire principalement le nouveau
  SunOS (Solaris).

  Linux, pour l'instant, ne supporte pas les streams.

  Il existe d'autres ensembles PPP disponibles par l'Internet.	Le
  paquetage Portable ppp ressemble beaucoup au code TIA; une autre
  implementation se nomme tout simplement ppp, et on trouve du code pour
  PPP dans l'excellent paquetage KA9Q.

  De toutes ces versions, pppd etait le plus proche de ce que Linux
  necessitait pour assurer un portage correct.

  (Si vous desirez plus d'informations sur ces autres implementations,
  demandez dans comp.protocols.ppp.


  3.10.	 Quels RFC decrivent le protocole PPP tel qu'implemente sous
  Linux ?

  L'implementation courante de PPP est un melange de plusieurs.	 La plus
  grande partie du code de PPP est realisee selon les RFC 1331 et 1332.
  Ces documents sont maintenant obsoletes; le 1331 fut remplace par le
  1548 qui, a son tour, fut remplace par le 1661 six mois plus tard.
  Vous trouverez une liste complete dans la FAQ PPP.

  La plupart des implementations de PPP converseront sans problemes avec
  celle de Linux.

  Tous les RFC 1134, 1171, et 1172 (et, de ce fait, 1055) sont
  maintenant obsoletes. Ils ne sont interessants que si vous comptez
  deboguer une connection avec une ancienne implementation de PPP, et si
  vous vous demandez pourquoi, par exemple, elle vous a demande l'option
  IPCP 2 avec une longueur de 4 seulement, et un type de compression
  0x0037.  (Il en circule encore de nombreuses versions, faites
  attention).

  Le PPP de Linux ne supportera pas ces vieilleries.


  3.11.	 PPP peut il converser avec SLIP ?

  Non. SLIP fonctionne avec SLIP, PPP fonctionne avec PPP.

  Quelques distributeurs peuvent offrir des produits fonctionnant a la
  fois en SLIP et PPP. Toutefois, ils doivent etre configures dans l'un
  de ces deux modes. Il n'existe actuellement aucune methode permettant
  de determiner a la connexion quels types de protocoles SLIP, ou PPP,
  est attendu.


  3.12.	 Quel est le meilleur ? PPP ou SLIP ?

  CELA DEPEND DE NOMBREUX FACTEURS !


  Les gens qui posent ce genre de question n'ont en general pas lu le
  moindre document sur ces protocoles, a commencer par le Net-2-HOWTO.

  Un articles tres interessant sur ce sujet est disponible sur le
  serveur Web de Morning Star, www.morningstar.com.


  3.13.	 Quel est le mieux ? L'authentification CHAP ou PAP ?

  Si vous avez le choix, prenez CHAP.  Sinon, PAP sera mieux que rien.



  3.14.	 Que doit contenir le fichier  /etc/ppp/pap-secrets ?


  Le protocole pap est le plus souvent implemente sous la forme de votre
  nom d'utilisateur associe a un mot de passe.	Vous devez mettre le nom
  du systeme distant, votre nom d'utilisateur, et le mot de passe.

  Prenons un exemple: L'utilisateur abbot veut appeler costello.
  L'entree sera la suivante:



	       #remote	  account    password	  IP address list
	       costello	  abbot	     firstbase






  3.15.	 Que doit contenir le fichier  /etc/ppp/chap-secrets ?


  Le probleme le plus courant est que les gens ne reconnaissent pas
  cette negociation CHAP par un couple de secrets.  Chacun des deux
  ordinateurs devant se relier doivent connaitre les deux secrets pour
  que la communication aboutisse.

  Par exemple, si abbot	 veut communiquer avec costello, le fichier sur
  abbot contiendra:



		   #local      remote	      secret	    IP address list
		   abbot       costello	      firstbase
		   costello    abbot	      who




  Et celui de costello sera:



		   #local      remote	      secret	    IP address list
		   abbot       costello	      firstbase
		   costello    abbot	      who






  3.16.	 J'ai des erreurs lors de la compilation...

  J'ai des erreurs lors de la compilation du noyau quand j'inclus le
  pilote ppp.c. Ce noyau est en version 1.1.8. Que faire ?

  Avez-vous edite le fichier ppp.c pour lui indiquer la configuration du
  noyau que vous utilisez ? Il y a deux #define qui doivent etre
  correctement definis si vous comptez compiler le code pour PPP.


	  ._____________________.__________________._________________________.
	  |			|		   |			     |
	  |  version du noyau	|     NET02D	   |	 NEW_TTY_DRIVERS     |
	  |_____________________|__________________|_________________________|
	  |			|					     |
	  |  < 1.0.0		|	 MISE A JOUR NECESSAIRE !!!!	     |
	  |_____________________|__________________._________________________|
	  |  1.0.0  - 1.0.*	|     #define	   |	 #undef		     |
	  |  1.1.0  - 1.1.3	|     #define	   |	 #undef		     |
	  |  1.1.4  - 1.1.12	|     #undef	   |	 #undef		     |
	  |_____________________|__________________|_________________________|
	  |			|					     |
	  |  1.1.13		|	MISE A JOUR NECESSAIRE !!!	     |
	  |_____________________|__________________._________________________|
	  |			|		   |			     |
	  |  1.1.14 - ... NOTE	|     #undef	   |	 #define	     |
	  |_____________________|__________________|_________________________|




  Le troisieme #define au debut du fichier s'appelle OPTIMIZE_FLAG_TIME.
  Il peut etre ou non defini avec n'importe quelle version du noyau
  supportant PPP. Vous trouverez plus de details en lisant ppp.c.

  NOTE: A partir du noyau 1.1.14, ne remplacez pas les fichiers
  drivers/net/ppp.c et include/linux/ppp.h.  Ils sont adaptes a votre
  version.

  Donc, comme vous le voyez dans le tableau ci-dessus, pour le noyau
  1.1.8 par exemple, il faut definir a la fois NET02D et
  NEW_TTY_DRIVERS. De meme, une version 1.1.18 contient deja tout ce
  qu'il faut, vous n'avez aucune modification a faire.


  3.17.	 Que signifie le message:  unable to create pid file ?


  Vous devez creer le repertoire /var/run.  Dans certaines
  distributions, il s'agit d'un lien symbolique vers le repetoire /etc.

  Ce n'est qu'un avertissement, qui n'empeche pas PPP de fonctionner
  correctement. Toutefois, le script ppp-off depend de ce fichier, il
  est donc preferable de regler le probleme.

  L'entete POSIX path.h definit l'endroit du fichier pid sous le nom
  _VAR_RUN. Si vous desirez utiliser un autre repertoire pour PPP ou
  d'autres programmes, changez la valeur de cette definition et
  recompilez les programmes.


  3.18.	 Que veut dire /etc/ppp/options: no such file or directory ?


  Vous devez creer le repertoire /etc/ppp et y mettre un fichier nomme
  options. Il doit etre lisible par le processus pppd (root).
  Ce fichier peut etre vide, tout simplement. Dans ce cas, utilisez la
  commande touch pour le creer. Lisez la page de manuel de pppd pour
  obtenir une description de ce fichier.

  Il est possible de compiler pppd pour qu'il n'utilise pas ce fichier;
  dans ce cas il faut supprimer (commenter) la ligne SECURE_FLAGS =
  -DREQ_SYSOPTIONS=1 dans le Makefile.


  3.19.	 Le programme ``dip'' reference PPP...


  Lorsque je tente d'utiliser mode ppp depuis dip j'obtiens une erreur
  disant que le mode PPP n'est pas supporte.  Est-il prevu d'utiliser
  dip avec PPP ?

  Le programme dip controle l'etablissement  d'une liaison SLIP. Puisque
  le processus pppd doit faire plusieurs choses a des moments differents
  que dans un lien SLIP, il y a fort peu de chances pour que dip et pppd
  puissent s'entendre un jour.

  La commande dip peut neanmoins etre utilisee pour l'appel telephonique
  et le lancement de PPP sur le systeme distant. Dans ce cas il est
  preferable de le lancer en tant qu'argument connect de pppd.


  3.20.	 Comment arreter PPP ? Existe-t-il un ``dip -k'' pour PPP ?

  Non, il n'y en a pas.

  Dans le repertoire chat, vous trouverez un script appele ppp-off. Il
  arretera la liaison PPP de la meme facon que votre dip -k .

  Le voici ci-dessous. Copiez-le dans un fichier que vous rendrez
  executable par la commande chmod +x et le tour sera joue.


       ______________________________________________________________________
       #!/bin/sh
       DEVICE=ppp0
       #
       # Si le fichier pid de ppp0 est present, alors c'est que le programme
       # tourne. Arretons-le.
       if [ -r /var/run/$DEVICE.pid ]; then
	       kill -INT `cat /var/run/$DEVICE.pid`
       #
       # Si ca n'a pas marche, c'est qu'il n'y a plus de processus actifs
       # correspondant a ce pid. Cela peut aussi signifier que le fichier
       # de verrouillage a ete laisse en place. Il faut supprimer ce verrou.
	       if [! "$?" = "0" ]; then
		       rm -f /var/run/$DEVICE.pid
		       echo 'ERROR: Removed stale pid file'
		       exit 1
	       fi
       #
       # Succes. Laissons pppd faire son propre menage.
	       echo 'PPP link to $DEVICE terminated.'
	       exit 0
       fi
       #
       # Le processus pppd n'est pas actif sur ppp0
       echo 'ERROR: PPP link is not active on $DEVICE'
       exit 1
       ______________________________________________________________________


  3.21.	 deconnecte. Je dois l'arreter manuellement pour que getty
  reprenne la main.  Le processus pppd ne se termine pas lorsque le
  modem se


  Avez-vous lance le programme avec le parametre modem ?

  Ce parametre indique a pppd d'honorer les signaux relatifs au statut
  du modem sur la ligne, qu'il ignore par defaut. Il est decrit dans la
  page de manuel de pppd.

  Est-ce que votre modem reflete bien l'etat de la communication par la
  ligne DCD ?

  La commande Hayes positionnant ce comportement est generalement  &C1.
  Si vous remettez l'appareil a zero par ATZ lors de la communication,
  assurez-vous bien qu'il gere toujours le signal DCD. La configuration
  d'usine fournie par beaucoup de constructeurs est helas d'ignorer ce
  Carrier Detect.

  Le signal DTR est genere par l'ordinateur et indique au modem de
  raccrocher la ligne. La sequence Hayes pour cela est generalement
  &D1 ou   &D2, la seconde etant preferee pour utiliser PPP. La
  configuration par defaut des constructeurs etant souvent d'ignorer
  DTR.

  N'utiliseriez-vous pas un cable de liaison bon marche, incomplet, ne
  transmettant pas la ligne DCD ? Les cables de Macintosh classic, par
  exemple, ont la reputation de poser ce probleme. Cet ordinateur
  n'utilise pas ce signal.

  Pour les connexions en mode serveur, avez-vous fait executer pppd
  correctement ? Le processus doit etre lance par un appel exec; si vous
  le lancez depuis le shell comme une simple commande, ce sera le shell
  qui recevra SIGHUP et non pas le processus pppd.

  Le script doit avoir un format du type suivant:



       ______________________________________________________________________

	    #!/bin/sh
	    exec pppd -detach modem ...
       ______________________________________________________________________





  3.22.	 bien lorsque je fais un ``get''.  Les transferts FTP echouent
  quand je fais un ``put'' mais se passent


  Est-ce que le controle de flux est bien en service ?	Il se valide par
  l'option crtscts de pppd, pour ce qui est du controle de flux materiel
  RTS/CTS, et par l'option xonxoff pour XON/XOFF. Sans controle de flux,
  vous perdrez des caracteres et le resultat sera desastreux pour la
  compression vj, entre autres.


  3.23.	 Comment utiliser le controle de flux XON/XOFF ?


  Le mieux est de ne pas l'utiliser, et de choisir RTS/CTS.  Toutefois,
  si vous ne pouvez faire autrement, vous devez operer selon les trois
  points suivants:


  o  Vous devez specifier l'option xonxoff a pppd.  Cela indiquera au
     programme de configurer le port serie pour le controle de flux
     XON/XOFF, en indiquant ces caracteres au pilote.

  o  Vous devez specifier les deux caracteres XON et XOFF dans le
     parametre asyncmap de pppd. Cela indiquera au systeme distant qu'il
     doit encoder XON et XOFF lorsqu'il doit les envoyer en tant que
     caracteres normaux. Il suffit en principe d'indiquer asyncmap
     a0000.

  o  Bien sur, n'oubliez pas d'indiquer au modem d'utiliser ce type de
     controle de flux. Consultez la documentation de votre appareil pour
     determiner la commande Hayes necessaire.


  3.24.	 Le modem ne semble jamais se connecter aux vitesses rapides.


  Mettez la vitesse desiree dans la commande de pppd.  Si vous ne
  l'indiquez pas, ce sera celle qui est initialisee au moment ou vous
  lancez le programme qui sera utilisee, et elle peut etre quelconque :
  tous les programmes ne remettent pas correctement les parametres du
  port serie qu'ils ont trouve en arrivant. Certains peuvent meme
  laisser des valeurs etranges amenant un fonctionnement curieux (Une
  vitesse de 0, par exemple !).


  3.25.	 Pourquoi ne puis-je lancer pppd si je ne suis pas root ?

  Le processus pppd a besoin de modifier le parametrage du reseau, et
  ceci n'est autorise qu'au super-utilisateur.	Si vous desirez pouvoir
  lancer pppd sous un autre nom d'utilisateur, le programme doit alors
  etre ``suid root'':


	       chown root pppd
	       chmod 4755 pppd




  Si vous voulez n'autoriser pppd qu'a un petit groupe de personnes,
  attribuez-le a ce groupe et interdisez a tous les autres son
  execution.


  3.26.	 Je peux atteindre la machine distante, mais aucune autre.

  N'auriez-vous pas oublie le parametre defaultroute ?	Il rajoute une
  route par defaut dans vos tables de routage, de maniere a ce que les
  paquets vers toutes les autres adresses IP soient envoyes par
  l'interface PPP.

  Le programme ne remplacera pas une route par defaut deja existante.
  Ceci est volontaire, cela evite de detruire la route par defaut vers
  d'eventuels routeurs Ethernet par accident. Dans ce cas, un message
  d'avertissement est envoye au systeme de ``log'' de la machine, via
  syslog, et ce sera a vous d'effectuer les operations que vous jugerez
  necessaires.




  3.27.	 J'ai une route par defaut mais je ne peux toujours pas me con-
  necter ailleurs !


  Cela ne provient pas de votre systeme Linux local, mais probablement
  d'un probleme de routage sur la machine distante.

  Le systeme distant a besoin d'une route vers vous, tout comme vous en
  avez une vers lui. Ceci peut etre realise de quatre facons
  differentes. Chaque methode a ses avantages et inconvenients; vous
  devez en choisir une, et une seule.


  1. Utiliser une route de type ``host''. Sur chaque machine du site
     distant, rajouter une route vers votre adresse IP Linux, avec comme
     passerelle le serveur de terminaux que vous utilisez pour votre
     acces local. Cette methode fonctionnera si vous avez un nombre
     limite de machines et un reseau tres simple.

  2. Utiliser une route de type ``network''. Subdivisez les adresses IP
     distantes de maniere a ce que l'adresse IP locale a votre machine
     Linux, celle de votre serveur distant, et celle de l'interface
     Ethernet de ce dernier soient dans le meme domaine IP.

     Cette methode fonctionnera si vous possedez des adresses a
     distribuer.  Elle sera parfaite si vous possedez un reseau de
     classe B et pouvez assigner toutes les adresses distantes dans le
     meme domaine IP.  Ajoutez alors une route reseau sur chacune des
     passerelles et routeurs de facon que toute adresse du reseau
     distant soit accedee par le serveur de terminaux. Beaucoup de
     configurations possedent beaucoup de machines mais tres peu de
     routeurs. (A sii.com, nous avons plus de 300 systemes actifs et
     seulement 3 routeurs).

  3. Utilisez le programme gated sur toutes les passerelles et sur le
     serveur de terminaux. Cela fera diffuser par le serveur de
     terminaux des informations vers les passerelles, indiquant qu'il
     peut accepter des paquets pour votre adresse IP.  Puisque les
     machines auront une route par defaut vers l'une de ces passerelles,
     ces dernieres genereront les requetes ICMP de redirection et le
     routage s'etablira automatiquement.

  4. Utilisez ``proxy ARP'' sur le serveur de terminaux.  Cette methode
     ne fonctionnera que si votre adresse IP locale correspond a l'un
     des domaines IP des cartes reseau.

  En resume, il n'y a pas de solution miracle, simple et unique.  Vous
  devez faire votre choix parmi l'une de ces quatre la.


  3.28.	 est toujours refuse (NAK). Le systeme ne se connecte pas.  Je
  n'arrete pas de recevoir le message disant que le ``magic number''

  La probabilite que les deux systemes aient choisi le meme nombre
  magique est d'une chance sur un billion. Si vous obtenez
  continuellement cette erreur, prenez un billet de loterie et/ou
  surveillez votre femme :-)

  Les deux causes les plus courantes de ce probleme sont:


  1. Le modem s'est deconnecte immediatement apres avoir realise la
     connexion et l'acces au systeme distant. Beaucoup de modems sont
     configures pour renvoyer l'echo des donnees qu'on leur injecte, et
     vos dialoguez avec l'echo local.

  2. Les programmes realisant PPP ne sont pas en service sur le systeme
     distant au moment ou vous tentez d'etablir le lien.  Est-ce que la
     machine distante est bien configuree pour PPP ?  Est-ce que les
     programmes s'y trouvent bien accessibles, tant en chemin d'acces
     qu'en permissions ?

     Cela tendrait a indiquer que c'est le shell qui vous realise un
     echo local des donnees que vous envoyez.

     Quoi qu'il en soit, le systeme Linux envoie des donnees que l'autre
     cote retourne immediatement. Ce n'est pas une condition acceptable,
     vous avez ce que l'on appelle une "boucle".


  3.29.	 par le message ``Could not determine local IP address''.  Je
  tente de me connecter a un Telebit Netblazer, et il termine

  Le Netblazer n'a pas votre adresse IP. Vous n'avez pas non plus votre
  adresse IP. La liaison ne s'effectuera pas tant que ces deux
  parametres ne seront pas connus.

  On a du vous donner une feuille de papier sur laquelle ces deux
  adresses IP sont indiquees. Vous devez signaler au Netblazer l'adresse
  a utiliser. Indiquez alors ces deux adresses, locale et distante,
  comme parametres lors du lancement du programme pppd, selon le format
  suivant:


	       adresse_locale:adresse_distante




  N'oubliez surtout pas les deux points (:) de separation.




  3.30.	 par le message ``Could not determine remote IP address''.  Je
  tente de me connecter a un Telebit Netblazer, et il termine

  Lisez donc la reponse a la question precedente...




  3.31.	 Je ne peux pas ``pinguer'' mon adresse IP locale.

  Vous ne pouvez pas parceque vous n'avez pas de route vers cette
  adresse. C'est le fonctionnement normal. N'essayez pas.

  Si vous voulez faire un ping sur votre propre systeme, utilisez
  l'adresse loopback: 127.0.0.1.

  Vous devriez pouvoir ``pinguer'' l'adresse distante.	Toutefois,
  certains serveurs interdisent cette operation.

  En regle generale, n'essayez pas ping sur l'une ou l'autre de ces
  adresse. Choisissez en une troisieme, que vous savez accessible sur le
  reseau distant.


  3.32.	 de mon serveur PPP ?  Puis-je utiliser la meme adresse IP
  locale pour toutes les lignes


  Oui.

  L'adresse locale n'est pas significative pour le systeme local.  Vous
  devez avoir une adresse IP  distante unique. Le routage est fait en
  fonction de l'adresse distante et non locale.


  3.33.	 plaint de se voir refuser le protocole fffb. Qu'est-ce que
  c'est que ca ?  J'utilise un serveur de terminaux Xyplex et pppd se

  Le serveur de terminaux Xyplex est trouble par la compression
  d'entetes Van Jacobson. Utilisez l'option -vj de pppd pour ne pas
  l'utiliser.


  3.34.	 Le log contient souvent Alarm. Est-ce grave ?

  Non.

  Cela signifie simplement qu'une mesure de temps s'est ecoulee, c'est
  une partie necessaire de la phase d'etablissement du protocole.


  3.35.	 que c'est que cette histoire ?	 Le log indique	 protocol reject
  for protocol c025. Qu'est-ce

  Le site distant voudrait mettre en service le protocole d'analyse de
  qualite de liaison sur la machine Linux.  (LQR, ``Link Quality
  Reporting'').	 Ce protocole n'est pas encore supporte, ce n'est pas
  une erreur. Linux signale en substance: ``L'autre m'a demande ca, je
  lui ai dit que je ne sais pas le faire pour l'instant et qu'il ne
  m'embete pas avec''.

  L'implementation MorningStar tentera toujours LQR. C'est normal.


  3.36.	 ne jamais se terminer. Le peripherique n'est jamais ``UP'', et
  finalement le programme raccroche. Que se passe-t-il ?  La connexion
  s'effectue mais la sequence d'initialisation semble

  Essayez avec l'option debug et examinez les traces systeme.  (Vous
  aurez de toutes facons besoin de ces traces si vous comptez demander
  de l'aide). Si elles montrent que vous envoyez la sequence `` LCP-
  request'' continuellement et que la valeur d'``id'' ne s'incremente
  pas, c'est qu'il n'y a pas de PPP a l'autre bout.

  Les trois causes les plus courantes sont:


  o  PPP n'est pas lance sur la machine distante. Vous envoyez des
     demandes de negociation a un programme quelconque, qui est
     probablement en train de vous repondre ``Qu'est-ce que c'est que ce
     charabia ?''

     Assurez-vous que le protocole PPP est bien lance a l'autre bout
     avant d'entrer dans la phase de negociation du protocole.

     Essayez d'utiliser un programme de communications normal et simulez
     la session a la main. Vous devriez alors voir nettement la
     tentative de negociation PPP vous arriver, c'est facile a
     identifier: il s'agit de trains d'environ 16 caracteres, contenant
     beaucoup d'accolades ouvrantes. Il ne doit pas y avoir de retour-
     chariot dedans et ils sont envoyes par saccades.



  o  La liaison n'est pas ``8 bits clean''. Cela signifie que pour
     utiliser PPP, vous devez etre configure en 8 bits de donnees, pas
     de parite et un bit de stop. PPP ne peut fonctionner qu'en 8 bits.

     Le programme pppd passera automatiquement la ligne sous ce format.
     La machine distante doit egalement se conformer a cette
     configuration sous peine de nombreuses erreurs de format et parite.

     PPP encode certains caracteres. Il ne lui est pas possible de
     travailler au niveau bit comme kermit peut le faire.  PPP ne
     fonctionne pas sur une liaison 7 bits.

     Il y a une option de compilation dans le pilote ppp.c (qui fait
     partie du noyau) appelee CHECK_CHARACTERS, qui ajoute du code
     destine a effectuer des tests supplementaires sur les caracteres
     recus. Elle pourra vous indiquer si la parite etait validee ou si
     le systeme distant envoyait du 7 bits.


  o  Le systeme distant est configure pour demander l'authentification
     PAP ou CHAP. Vous n'avez pas configure votre systeme local pour le
     faire. Par consequent, l'autre cote refuse tous vos paquets jusqu'a
     en rencontrer un d'identification, que vous n'enverrez jamais.

     Dans ce cas, il vous fait soit configurer la machine distante pour
     qu'elle ne demande pas d'authentification, ou configurer le systeme
     local pour qu'il le fasse.


  3.37.	 La connexion echoue sur une erreur ioctl(TIOCSCTTY).

  Utilisez l'archive ppp-2.1.2b.tar.gz. Il s'agit d'un bug qui n'etait
  pas gere avant la diffusion de ppp-2.1.2a.


  3.38.	 n'arrive pas a trouver l'adresse MAC avec Linux 1.0.  J'essaie
  d'utiliser proxyarp. La fonction proxyarp

  Utilisez l'archive ppp-2.1.2b.tar.gz. Le programme pppd etait compile
  par erreur sous Linux 1.1.8 et utilisait les definitions  Net-3 plutot
  que celles de l'ancien Net-2.


  3.39.	 des versions 4.6 des bibliotheques partagees ! Alors ???  Bon
  sang ! J'ai recupere ppp-2.1.2b et il dit qu'il a besoin

  Desole, on s'est trompe, nous travaillons avec vos programmes du
  futur, que voulez-vous. Un jour ou l'autre, vous disposerez egalement
  de ces librairies.

  En attendant,il va vous falloir recompiler le code vous-meme, avec les
  bibliotheques dont vous disposez. C'est tres facile:

  Allez dans le repertoire pppd, effacez le mauvais binaire, et tapez la
  commande ``make''. Faites de meme dans le repertoire chat si vous
  comptez utiliser ce programme.

  Une autre solution est de vous procurer une version de ces
  bibliotheques et de jouer les Alpha-testeurs :-)


  3.40.	 ou bien  ioctl(PPPIOCSINPSIG): I/O error . Allo, Docteur ?  La
  connection echoue avec des erreurs comme  ioctl(TIOCGETD): I/O error



  Regardez les messages du noyau lors de l'amorcage de votre systeme
  Linux. Si il affiche	PPP version 0.1.2, vous avez une version
  beaucoup trop ancienne du pilote ppp.c.

  Si vous voyez PPP version 0.2.7, vous disposez de la version a jour,
  mais qui cependant n'a pas ete compilee avec les memes definitions
  pour les valeurs d'ioctl().

  Verifiez que vous disposez bien d'un fichier, ppp.h, qui doit se
  trouver dans le repertoire include/linux des sources du noyau. Dans ce
  cas, recompilez le noyau, puis le programme pppd.


  3.41.	 ``ioctl(TIOCSETD): I/O error'' et ``ioctl(TIOCNXCL): I/O
  error''.  Pourquoi donc ?  Quelquefois, j'obtiens les messages
  ``ioctl(PPPIOCGDEBUG): I/O error'',

  Parceque le systeme distant a raccroche le telephone.	 Les pilotes tty
  retablissent alors la discipline correcte sur le port serie, et ces
  erreurs sont le resultat du processus pppd, tentant de faire la meme
  chose.

  Tout cela est parfaitement normal, il n'y a pas d'inquietudes a avoir.


  3.42.	 J'essaie d'utiliser le reseau merit, et je me fais jeter.

  Des utilisateurs de ce reseau ont signale qu'il necessite PAP.  Avez-
  vous essaye l'authentification PAP ?


  3.43.	 adresse MAC bizarroide.  Mon ifconfig affiche autre chose que
  ce qui suit.	 Il indique l'interface ppp comme ``unknown'' et une



	  ppp0	    Link encap Point-to-Point Protocol
		    inet addr 192.76.32.2  P-t-P 129.67.1.165  Mask 255.255.255.0




  Ce n'est pas grave. Cet affichage n'est la que pour information.  Si
  vous utilisez un noyeau 1.1. recent, mettez a jours vos programmes
  reseau.


  3.44.	 et route et ca ne marche toujours pas ! J'ai lu ca dans le
  Net-2-HOWTO; ou est l'erreur ?  Mon systeme ne marche pas. J'utilise
  slattach,ifconfig

  N'utilisez jamais slattach et ifconfig avec PPP. Ces programmes ne
  sont utiles que pour SLIP.  Le processus pppd s'occupe de ces
  fonctions tout seul au moment opportun, c'est a dire apres l'echange
  des protocoles LCP et IPCP.

  Vous ne pouvez pas remplacer pppd par slattach et ifconfig.  La plus
  grande partie du protocole PPP se trouve dans pppd.  Le noyau ne
  connait que IP (et IPX dans l'avenir).

  La route vers le site distant sera automatiquement ajoutee par pppd.
  Il n'y a pas d'option pour supprimer cette operation. Le programme se
  terminera si la route ne peut pas etre rajoutee a la table de routage.

  La route par defaut peut etre automatiquement ajoutee, ou non.  Ceci
  est controle par l'option  defaultroute.  Si vous avez deja une route
  par defaut, elle ne sera pas modifiee.

  Si vous devez router un reseau entier, mettez la commande dans le
  script /etc/ppp/ip-up. Les parametres passes a ce script sont:


  o  $0 - nom du script (/etc/ppp/ip-up ou /etc/ppp/ip-down)

  o  $1 - nom de l'interface reseau (comme ppp0)

  o  $2 - nom du peripherique (comme /dev/cua0)

  o  $3 - vitesse du peripherique en bits par seconde (comme 38400)

  o  $4 - l'adresse IP locale

  o  $5 - l'adresse IP distante


  3.45.	 et non pas la route vers le host. Comment faire ?  D'accord,
  j'ai les parametres. Mais je veux la route vers le reseau

  Sur sunsite.unc.edu se trouve un paquetage du nom de devinfo.tar.gz.
  Il contient quelques petits utilitaires pratiques qui extraient les
  donnees concernant un peripherique et font differentes operations sur
  les notations d'adresses IP.

  La documentation est fournie sous forme de pages de manuel.

  Par exemple, si vous voulez router le domaine IP entier vers le site
  distant, vous pouvez mettre les choses suivantes dans le script
  /etc/ppp/ip-up.

  Bien entendu, si les valeurs ne sont pas variables, il vous suffit
  d'utiliser les entrees appropriees avec la commande route.


       ______________________________________________________________________
       # Obtention du masque reseau pour l'interface ppp0 (ou autres)
       NETMASK = `devinfo -d $1 -t mask`

       # Obtention du domaine IP (sans l'adresse host en supprimant les bits ad hoc)
       DOMAIN = `netmath -a $5 $NETMASK`

       # Rajout de la route vers le reseau que nous connaissons maintenant
       route -net add $DOMAIN gw $5
       ______________________________________________________________________






  3.46.	 Quand Linux supportera-t-il la numerotation sur demande ?
  J'en ai absolument besoin !

  Mercredi prochain !

  Plus serieusement, la numerotation sur demande devait se trouver dans
  la prochaine version. Toutefois, le paquetage pppd est l'oeuvre de
  Paul Mackerras (nous ne faisons que le portage) et il a prefere
  commencer par ce qu'il preferait, c'est a dire la compression BSD.

  Aussi, cela viendra apres que ce code de compression soit diffuse. Il
  y a deja quelques volontaires s'etant propose pour travailler sur le
  projet. Vous pouvez vous y mettre aussi !
  3.47.	 Quid du filtrage ? Quand allez-vous implementer ca ?

  Rien n'est prevu a ce sujet dans le code de PPP.  Utilisez le code
  ipfirewall, c'est disponible sur sunsite.unc.edu. Aidez l'auteur a
  deboguer la chose, et ca fera ce que vous desirez que ca fasse.


  3.48.	 Quid de IPX ?

  L'addition du support pour IPX se fait tranquillement.  J'ai (Al
  Longyear) commence a	y travailler pour quelqu'un me l'ayant demande
  sur l'IRC (Internet Relay Chat).  Je dois d'abord approfondir les
  manuels Novell pour comprendre quelles sont les valeurs correctes pour
  les fonctions de routages necessaires pour IPXCP. (IPXCP est le
  protocole de controle d'IPX).


  3.49.	 Quid de NETBIOS ?

  Il existe un protocole PPP Netbios. Toutefois, la meilleure solution
  serait que vous utilisiez TCP/IP et le code ``samba''.

  Microsoft et compagnie ont utilise le protocole PPP Netbios.	C'est
  generalement un savant melange tres proprietaire et une implementation
  ne fonctionne pas forcement avec une autre.

  Je laisse ces machins a quelqu'un d'autre.



  3.50.	 documentation et c'est vide...Pourquoi ?  Je viens de regarder
  /proc/net/dev comme indique dans la


  Avez-vous juste tape la commande ``ls -l /proc/net'' en vous etonnant
  de trouver une taille de zero octets ? Si c'est le cas, c'est normal.
  Vous devez faire:



		       cat /proc/net/dev




  Vous devriez alors voir le contenu de ce fichier, qui ne doit pas etre
  vide. Sa taille est toujours indiquee comme etant nulle, c'est le
  systeme de fichiers ``proc''qui veut ca. Ce ne sont pas de vrais
  fichiers, ils sont simules par le noyau. Ne tenez pas compte de la
  taille, tapez la commande indiquee.



  3.51.	 avec le PPP Microsoft. Pourquoi diable ?  Je ne peux pas con-
  necter de/vers mon code Windows NT (Daytona)


  Le PPP de Microsoft envoie une authentification de type 0xC207, alors
  que le PAP normal est 0xC203.

  Microsoft a choisi d'utiliser un protocole d'authentification non
  standard dans Windows NT. C'est leur droit le plus strict, a condition
  qu'ils aient enregistre leur numero de protocole avec l'IANA. (C'est
  le cas).  Toutefois, ils sont dans l'obligation de supporter la
  sequence de refus du protocole, ce qui est logique.  Il y avait un
  bogue dans les beta-versions Daytona, qui peut encore se trouver dans
  les versions definitives, qui fait que cette sequence n'est pas
  supportee. Il insiste pour que le systeme Linux supporte cette
  authentification.

  Par consequent, allez dans la configuration des parametres TCP/IP pour
  Daytona et supprimez la sequence d'authentification.	Du coup, tout
  marchera avec des implementations standard de PPP, comme celle de
  Linux.

  Le protocole d'authentification de Microsoft est du type PAP, avec
  leur propre algorithme d'encryptage des mots de passe.  Le PAP normal
  envoie les mots de passe en clair, ce qui violerait la securite C2.


  3.52.	 les News ?  Avez-vous un lecteur de courrier compatible PPP ?
  et pour

  Heu... ?

  Vous vous trompez de groupe si vous cherchez des bricoles MSDOS.  PPP
  n'a rien a voir du tout avec l'agent de transport de courrier !  Ils
  sont tous ``compatibles'' avec PPP :-)





  4.  Courts exemples a titre de pense-bete

  Cette section ne constitue pas un mode d'emploi, elle contient
  quelques trucs epars qui peuvent rendre service, sans aller chercher
  dans la documentation generale.


  4.1.	Verifier que le noyau contient bien le pilote PPP

  On utilise le systeme de fichiers /proc, tres pratique pour ce genre
  de choses:



       bash$ cat /proc/net/dev
       Inter-|	 Receive		  |  Transmit
	face |packets errs drop fifo frame|packets errs drop fifo colls carrier
	   lo:	    0	 0    0	   0	0	 0    0	   0	0     0	   0
	 ppp0:	    0	 0    0	   0	0	 0    0	   0	0     0	   0
	 ppp1:	    0	 0    0	   0	0	 0    0	   0	0     0	   0
	 ppp2:	    0	 0    0	   0	0	 0    0	   0	0     0	   0
	 ppp3:	    0	 0    0	   0	0	 0    0	   0	0     0	   0
	  sl0:	    0	 0    0	   0	0	 0    0	   0	0     0	   0
	  sl1:	    0	 0    0	   0	0	 0    0	   0	0     0	   0
	  sl2:	    0	 0    0	   0	0	 0    0	   0	0     0	   0
	  sl3:	    0	 0    0	   0	0	 0    0	   0	0     0	   0
	 eth0:	    0	 0    0	   0	0	 0    0	   0	0     0	   0




  Si vous avez les quatre lignes ppp0, le pilote PPP est bien la. Les
  lignes sl0 concernent SLIP et eth0 l'Ethernet, vous pouvez ne pas en
  disposer bien sur.





  4.2.	Connexion a un serveur PPP via modem.

  Pour utiliser PPP, vous invoquez le programme pppd avec les options
  appropriees. Tout ce que vous avez besoin de savoir sur ce programme
  est contenu dans la page de manuel de pppd(8). Voici un exemple assez
  general.

  La commande ci-apres peut etre directement tapee sous shell, ou de
  facon plus pratique faire l'objet d'un petit shell-script.



       ______________________________________________________________________
	 pppd connect 'chat -v "" ATDT5551212 CONNECT "" ogin: ppp word: sesame' \
	     /dev/cua1 38400 -detach debug crtscts modem defaultroute 192.1.1.17:
       ______________________________________________________________________




  Adaptez ces valeurs aux votres bien entendu.


  4.3.	Verifier la connexion

  Tout d'abord, tapez /sbin/ifconfig, vous devez obtenir quelque chose
  comme ce qui suit, ce qui compte est la partie ppp0:




       lo	 Link encap Local Loopback
		 inet addr 127.0.0.1  Bcast 127.255.255.255  Mask 255.0.0.0
		 UP LOOPBACK RUNNING  MTU 2000	Metric 1
		 RX packets 0 errors 0 dropped 0 overrun 0
		 TX packets 0 errors 0 dropped 0 overrun 0

       ppp0	 Link encap Point-Point Protocol
		 inet addr 192.76.32.2	P-t-P 129.67.1.165  Mask 255.255.255.0
		 UP POINTOPOINT RUNNING	 MTU 1500  Metric 1
		 RX packets 33 errors 0 dropped 0 overrun 0
		 TX packets 42 errors 0 dropped 0 overrun 0





  Vous aurez l'etat du lien PPP, et les adresses IP etablies lors de la
  negociation. Verifiez les routes par la commande route ou netstat -r,
  et essayez trois ou quatre ping.


  5.  Creer un compte pour recevoir des connexions PPP


  Creez un compte nomme par exemple, ppp, comme ceci:


       ppp:(mot de passe crypte):102:50:PPP LOGIN:/tmp:/etc/ppp/ppplogin




  Le fichier /etc/ppp/ppplogin sera un shell-script executable contenant
  par exemple:

  ______________________________________________________________________
	  #!/bin/sh
	  exec /usr/etc/pppd :192.1.2.23
  ______________________________________________________________________




  Dans cet exemple, pppd insistera pour que la machine qui appelle se
  voit attribuer l'adresse IP 192.1.2.23, l'adresse locale pour le
  serveur sera celle trouvee dans /etc/hosts puisqu'elle n'est pas
  precisee.



  6.  Rajouter des canaux PPP supplementaires

  Par defaut, vous disposez de 4 canaux, ce qui permet 4 connexions
  simultanees (sur 4 modems par exemple).  Si vous en desirez plus, vous
  pouvez tres facilement reconfigurer le noyau pour les obtenir. Cela se
  fait en deux etapes.

  Tout d'abord vous devez editer le fichier
  /usr/src/linux/drivers/net/Space.c.  Il contient une section qui
  ressemble a ceci:



       ______________________________________________________________________
	       #if defined(CONFIG_PPP)
	       extern int ppp_init(struct device *);
	       static struct device ppp3_dev = {
		   "ppp3", 0x0, 0x0, 0x0, 0x0, 3, 0, 0, 0, 0, NEXT_DEV,	 ppp_init, };
	       static struct device ppp2_dev = {
		   "ppp2", 0x0, 0x0, 0x0, 0x0, 2, 0, 0, 0, 0, &ppp3_dev, ppp_init, };
	       static struct device ppp1_dev = {
		   "ppp1", 0x0, 0x0, 0x0, 0x0, 1, 0, 0, 0, 0, &ppp2_dev, ppp_init, };
	       static struct device ppp0_dev = {
		   "ppp0", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, &ppp1_dev, ppp_init, };
	       #undef NEXT_DEV
	       #define NEXT_DEV (&ppp0_dev)
	       #endif	/* PPP */

       ______________________________________________________________________




  Cela doit vous sembler evident. Rajoutez les entrees dont vous avez
  besoin, n'oubliez pas de terminer par NEXT_DEV sur la premiere ligne
  et ne vous trompez pas dans la numerotation.

  Ensuite, vous devez modifier une ligne dans le fichier
  include/linux/ppp.h:


	       #define PPP_NRUNIT     4




  Mettez la nouvelle valeur. Enfin, recompilez le noyau et reamorcez la
  machine. Les messages lors du demarrage, ainsi que l'affichage de
  /proc/net/dev devraient refleter vos modifications.


  Linux PPP Howto
  par Robert Hart, hart@interweft.com.au
  Version 3.0, 31 mars 1997

  (Adaptation francaise par Antoine Levavasseur levavass@efrei.fr, le 22
  octobre 1997).  Ce document montre comment connecter votre PC Linux  a
  un  serveur  PPP, comment utiliser PPP pour relier deux reseaux locaux
  ensemble, et fournit une methode pour configurer votre  machine  Linux
  comme  serveur  PPP.  Ce  document  fournit  egalement  une  aide pour
  deboguer les connections PPP qui ne fonctionnent pas.

  CCooppyyrriigghhtt

  Ce document est distribue sous les contraintes de la GPL  (GNU  Public
  Licence).

  DDiissttrriibbuuttiioonn

  Le  document original sera poste dans comp.os.linux.answers lorsque de
  nouvelles versions du document arriveront. Il est egalement disponible
  en HTML a :

  +o  Linux Howto Index <http://sunsite.unc.edu/mdw/linux.html#howto>

  +o  PPP-HOWTO         <http://www.interweft.com.au/other/ppp-howto/ppp-
     howto.html>

  Les autres formats (SGML, ASCII, PostScript, DVI) sont  disponibles  a
  Howtos                 -                 other                 formats
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats>.

  Comme sunsite.unc.edu est tres charge, vous etes encourages a utiliser
  un  miroir  plus  proche  de  chez  vous.  En  particulier  la version
  francaise   de    ce    HOWTO    est    poste    regulierement    dans
  fr.comp.os.linux.annonce,   et   est  disponible  sur  ftp.lip6.fr  et
  http://www.freenix.fr/.

  RReemmeerrcciieemmeennttss

  Un nombre important et croissant de personnes m'ont aide a preparer ce
  document.  Remerciements  speciaux  a  Al Longyear pour l'aide sur PPP
  lui-meme (si il y a des erreurs ici, ce sont les miennes  et  pas  les
  siennes), Greg Hankins (qui maintient les Howto Linux) et Debi Tackett
  (de Maximum Access.com) pour ses nombreuses suggestions sur le  style,
  l'organisation du contenu, la logique et la clarte des explications.

  Pour  finir,  je  remercie  les  nombreuses personnes qui m'ont envoye
  leurs commentaires par courrier electronique. Comme tous  les  auteurs
  de  HOWTO,  la  satisfaction  d'aider  est  le  seul  salaire que nous
  recevons, et cela nous suffit. En  ecrivant  ce  HOWTO,  je  rembourse
  d'une certaine facon la dette que je - et tous les autres utilisateurs
  Linux - dois aux personnes qui ecrivent  et  maintiennent  le  systeme
  d'exploitation que nous avons choisi.

  TTrraadduuccttiioonn FFrraannccaaiissee ddee ccee ddooccuummeenntt

  La  traduction du present document PPP-Howto (et precedemment PPP-FAQ)
  etait assuree par Rene Cougnenc. C'etait  l'un  des  premiers  (si  ce
  n'est  le premier) utilisateur de Linux en France alors que ce n'etait
  qu'un petit projet un peu fou lance par Linus Torvalds. Rene  Cougnenc
  a  participe  au  developpement  de Linux et a assure la traduction de
  nombreux HOWTO et ouvrages sur Linux qui  font  encore  reference.  Si
  vous utilisez Linux aujourd'hui c'est sans doute un peu grace a lui...
  Prendre ses pas dans la traduction de ce HOWTO etait  un  peu  delicat
  car  la  barre  etait placee haut, et j'espere que le lecteur que vous
  etes ne sera pas decu par mon travail.
  Et si Rene nous entends la-haut, je suis sur qu'il  levera  avec  nous
  son verre a la sante de notre systeme d'exploitation favori ! :-)

  Enfin merci a Thomas Parmelan pour la relecture et les conseils sur la
  forme de la version francaise de ce document.

  11..  IInnttrroodduuccttiioonn

  PPP (Point to Point Protocol) est un mecanisme  qui  permet  de  faire
  fonctionner  IP  (Internet  Procotol)  et  tous  les autres protocoles
  reseaux a travers une liaison serie -  qui  peut  etre  une  connexion
  serie directe (avec un cable null-modem), a travers une liaison par un
  telnet, ou encore une liaison  utilisant  les  modems  et  les  lignes
  telephoniques  (et  bien  sur  utilisant  les  lignes numeriques comme
  RNIS).

  Avec PPP, vous pouvez connecter votre PC sous Linux a un  serveur  PPP
  et  acceder  aux ressources reseau aux quelles le serveur est connecte
  (presque) comme si vous etiez directement connecte a ce reseau.

  Vous pouvez egalement configurer votre PC Linux comme un serveur  PPP,
  de  cette facon, d'autres ordinateurs peuvent appeler votre ordinateur
  et acceder aux ressources de votre PC et/ou reseau local.

  Comme PPP est un systeme qui marche dans les deux  sens,  vous  pouvez
  egalement  utiliser  PPP  sur  deux PC Linux pour relier ensemble deux
  reseaux (ou un reseau local a Internet),  creant  ainsi  un  reseau  a
  large domaine (WAN : Wide Area Network).

  Une  difference  majeure  entre PPP et une connexion Ethernet est bien
  entendu la vitesse - une connexion Ethernet standard offre a un  debit
  maximal  theorique  de  10  Mbs (Mega - millions de bits par seconde),
  alors qu'une liaison analogique par modem offre un maximum de  56  Kbs
  (kilo - millier de bits par seconde).

  Par  consequent,  selon  le type de votre connexion PPP, il y aura des
  limitations sur l'utilisation des applications et des services.

  11..11..  CClliieennttss eett SSeerrvveeuurrss

  PPP est un protocole strictement symetrique; il n'y a  (techniquement)
  aucune  difference  entre la machine qui appelle et la machine qui est
  appelee.  Cependant, pour des raisons de clarte, il est interessant de
  penser en terme de sseerrvveeuurr et cclliieenntt.

  Quand  vous  appelez un site pour etablir une connexion PPP, vous etes
  un cclliieenntt. La machine sur laquelle vous-vous connectez est le sseerrvveeuurr.

  Quand  vous configurez une machine Linux pour repondre aux appels pour
  les connexion PPP, vous configurez un sseerrvveeuurr PPP.

  Tous les PC Linux peuvent etre a la fois serveur et client PPP -  meme
  en  meme  temps  si  vous  avez plus d'un port serie (et d'un modem si
  necessaire).   Comme  decrit  plus  haut,  il  n'y  a  pas  de  reelle
  difference entre les clients et les serveurs tant que l'on utilise PPP
  et que la connexion est etablie.

  Ce document reference la machine qui initie l'appel (qui  le  compose)
  comme le CCLLIIEENNTT, alors que la machine qui repond au telephone, verifie
  l'authentification de l'appel (en utilisant les noms utilisateurs, les
  mots  de  passe  et eventuellement d'autres mecanismes) est referencee
  comme le SSEERRVVEEUURR.

  L'utilisation de  PPP  comme  client  pour  relier  une  ou  plusieurs
  machines  a Internet est probablement celle qui interesse une majorite
  de gens.  Ils utiliseront alors leur PC Linux comme client.

  La procedure exposee dans ce document va vous permettre  d'etablir  et
  d'automatiser votre connexion a Internet.

  Ce  document  va  egalement  vous  offrir  un  guide pour permettre de
  configurer un sseerrvveeuurr PPPPPP sur votre PC Linux et relier  ensemble  deux
  reseaux  (avec  le  routage  complet) en utilisant PPP (cela est aussi
  appele une liaison WAN - wide area network).

  11..22..  DDiiffffeerreenncceess eennttrree lleess ddiissttrriibbuuttiioonnss LLiinnuuxx

  Il y a de nombreuses distributions  Linux  differentes  qui  on  leurs
  propres idiosyncrasies et facons de faire les choses.

  En particulier, il y a deux manieres differentes sur une machine Linux
  (ou Unix) de demarrer, configurer ses interfaces et ainsi de suite.

  Il y ll''iinniittiiaalliissaattiioonn BBSSDD  et ll''iinniittiiaalliissaattiioonn SSyyssVV  ssyysstteemm.  Si  vous
  consultez  certains forums de discussion Unix, vous trouverez de temps
  en temps des guerres de religion entre les  partisans  de  chacun  des
  deux  systemes.  Si  ce  genre  de  chose  vous  plait, allez donc les
  rejoindre pour gacher de la bande passante avec eux !

  Les distributions les plus utilisees sont sans doute :

  +o  Slackware
     qui utilise une initialisation systeme BSD

  +o  Red Hat (et son precedent associe Caldera)
     qui  utilise  une  initialisation  SysV  system  (bien  qu'un   peu
     modifiee)

  +o  Debian
     qui utilise une initialisation SysV system

  Les  initialisations  de  type BSD conservent typiquement ces fichiers
  dans /etc/ et ces fichiers sont :

  ______________________________________________________________________
          /etc/rc
          /etc/rc.local
          /etc/rc.serial
                  (et parfois d'autres fichiers)
  ______________________________________________________________________

  Recemment,  certaines  initialisation  systemes  BSD  se  mettaient  a
  utiliser  un repertoire /etc/rc.d/ contenant les fichiers de demarrage
  plutot que de tout mettre dans /etc.

  L'initialisation System V conserve ses fichiers d'initialisation  dans
  les  repertoires  /etc/  ou  /etc/rc.d  et  un certain nombre de sous-
  repertoires de ces derniers.

  ______________________________________________________________________
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 init.d
  -rwxr-xr-x   1 root     root         1776 Feb  9 05:01 rc
  -rwxr-xr-x   1 root     root          820 Jan  2  1996 rc.local
  -rwxr-xr-x   1 root     root         2567 Jul  5 20:30 rc.sysinit
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc0.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc1.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc2.d
  drwxr-xr-x   2 root     root         1024 Jul 18 18:07 rc3.d
  drwxr-xr-x   2 root     root         1024 May 27  1995 rc4.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc5.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc6.d
  ______________________________________________________________________

  Si vous essayez de chercher ou votre interface et  les  routes  reseau
  associees  sont  configurees,  vous  devez parcourir tous les fichiers
  pour parvenir a trouver ou sont les commandes correspondantes.

  11..33..  OOuuttiillss ddee ccoonnffiigguurraattiioonn ssppeecciiffiiqquueess aauuxx ddiissttrriibbuuttiioonnss

  Dans certaines installations (par exemple Red Hat et Caldera), il y  a
  un  systeme de configuration des PPP sous X Window. Ce HOWTO ne traite
  pas de ces outils specifiques aux  distributions.  Si  vous  avez  des
  problemes avec ceux-ci, contactez directement les distributeurs !

  Pour  les  utilisateurs  de  Red Hat 4.x, il y a maintenant un Red Hat
  PPP-TIP <http://www.interweft.com.au/> dans la partie Linux ressources
  et  egalement  chez  Red Hat Software <http://www.redhat.com/> dans la
  partie support.

  22..  AAddrreessssee IIPP

  Tout materiel connecte a Internet doit  avoir  sa  propre,  et  unique
  adresse IP.  Elle sont distribuees de facon centralisee par l'autorite
  designee pour chaque pays.
  Si vous etes connectes par un reseau  local  (LAN)  a  Internet,  VVOOUUSS
  DDEEVVEEZZ  utiliser  une adresse IP de votre propre domaine d'adresses qui
  vous a ete assigne pour les ordinateurs et materiels de  votre  reseau
  local.  Vous  NNEE  DDEEVVEEZZ  PPAASS  prendre  n'importe  quelle adresse IP et
  l'utiliser lorsque vous vous connectez avec un autre reseau local  (et
  a  plus  forte raison Internet). Au pire ca ne marchera pas du tout et
  cela peut causer des ravages  puisque  votre  adresse  IP  'volee'  va
  interferer  avec  les communications d'un autre ordinateur qui utilise
  deja l'adresse IP que vous avez prise au hasard.

  Remarquez que les adresses IP de ce  document  appartiennent  (a  part
  quelques  exceptions)  aux  adresses de reseaux non connectes qui sont
  reservees aux reseaux qui ne sont pas (encore) connectes  a  Internet.
  (RFC1918)

  Il  y  a des adresses IP qui sont specifiquement destinees aux reseaux
  locaux qui ne sont pas connectes a Internet. Ces adresses IP sont :

  +o  Une Adresse Reseau de Classe A
     10.0.0.0 (netmask 255.0.0.0)

  +o  16 Adresses Reseau de Classe B
     172.16.0.0 - 172.31.0.0 (netmask 255.255.0.0)

  +o  256 Adresses Reseau de Classe C
     192.168.0.0 - 192.168.255.0 (netmask 255.255.255.0)

  Si vous avez un reseau pour lequel vous nn''aavveezz ppaass alloue d'adresse IP
  aupres  de  l'autorite  responsable de votre pays, vous devez utiliser
  une des adresses reseau de la sequence precedente pour vos machines.

  Ces adresses ne doivent jjaammaaiiss etre utilisees sur Internet.

  Cependant, elles  peuvent  etre  utilisees  pour  les  reseaux  locaux
  Ethernet  sur la machine qui est connectee a Internet. C'est parce que
  les adresses IP sont en fait allouees aux interfaces reseau et  non  a
  l'ordinateur.   Ainsi, votre interface Ethernet peut utiliser 10.0.0.1
  (par exemple), et quand vous vous connecterez a Internet en  utilisant
  PPP,  votre  interface PPP recuperera une autre adresse IP (valide) du
  serveur. Votre PC sera connecte a Internet alors que les autres ne  le
  seront pas.

  Cependant, en utilisant Linux, les capacites de IP Masquerading (aussi
  appele NAT - Network Adress Translation)  de  Linux  et  du  programme
  iippffwwaaddmm,  vous  pouvez  connecter  votre reseau local a Internet (avec
  quelques restrictions sur les  services),  meme  si  vous  n'avez  pas
  d'adresse IP valide pour vos machines en Ethernet.

  Pour  plus  d'informations  sur  le  sujet, consulter le mini-HOWTO IP
  Masquerade     a     Linux     IP      Masquerade      mini      HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/mini/IP-Masquerade>

  Pour  la  plupart  des utilisateurs, qui sont connectes avec une seule
  machine a leur fournisseur d'acces Internet (FAI) par PPP, obtenir une
  adresse   IP   (ou  plus  largement  une  adresse  reseau)  n'est  pas
  necessaire.
  Si vous souhaitez connecter un  petit  reseau  local  a  Internet,  de
  nombreux  FAI  peuvent vous fournir un sous-reseau dedie (une sequence
  specifique d'adresses IP) sur  leur  espace  d'adresses  IP  existant.
  Alternativement, utilise IP masquerading.

  Pour les utilisateurs qui connectent un seul PC a Internet, la plupart
  des FAI utilise l'allocation ddyynnaammiiqquuee des adresses IP.  C'est pendant
  le  processus  de  connexion  que le service PPP que vous contactez va
  indiquer a votre machine quelle adresse IP utiliser  pour  l'interface
  PPP  pendant  la session en cours. Cette adresse ne sera pas forcement
  la meme a chaque fois que vous vous connecterez a votre FAI.

  Avec les adresses IP dynamiques, vous nn''aavveezz ppaass la meme adresse IP  a
  chaque  fois que vous vous connectez. Cela a des repercussions sur les
  applications de  type  serveur  de  votre  machine  Linux  telles  que
  Sendmail,   ftpd,  httpd  et  d'autres.  Ces  services  supposent  que
  l'ordinateur offrant le service soit accessible tout  le  temps  a  la
  meme  adresse  IP (ou au moins au meme nom de domaine qualifie, et que
  la  resolution  des  noms  par  DNS  du  nom  vers  l'adresse  IP  est
  disponible).

  Les  limitations de service dues aux allocations dynamiques d'adresses
  IP (et les facons d'eviter cela, quand c'est possible)  sont  decrites
  plus loin.

  33..  BBuuttss ddee ccee ddooccuummeenntt

  33..11..  MMeettttrree eenn ppllaaccee uunn cclliieenntt PPPPPP

  Ce  document  fournit  un  guide aux personnes qui souhaitent utiliser
  Linux et PPP pour appeler un Serveur PPP et configurer  une  connexion
  IP  avec  PPP.  Cela  suppose  que PPP ait ete compile et installe sur
  votre   machine   Linux   (mais   une   breve   description   de    la
  reconfiguration/recompilation  de  votre noyau avec le support PPP est
  fournie).

  Bien que dip (la maniere standard de creer des connexions SLIP) puisse
  etre  utilise  pour  mettre en place un connexion PPP, les scripts dip
  sont generalement un peu complexes. Pour cette raison, ce document  ne
  traite pas l'utilisation de dip pour lancer une connexion PPP.

  A  la  place,  ce  document  decrit  les programmes standard Linux/PPP
  (chat/pppd).

  33..22..  RReelliieerr ddeeuuxx RReesseeaauuxx llooccaauuxx oouu uunn rreesseeaauu llooccaall aa IInntteerrnneett ggrraaccee aa
  PPPPPP

  Ce document donne des informations (de base) pour relier deux  reseaux
  locaux entre eux ou un reseau local a Internet grace a PPP.

  33..33..  CCoonnffiigguurreerr uunn sseerrvveeuurr PPPPPP

  Ce  document  fournit  un  guide  pour configurer votre PC Linux comme
  serveur PPP (autorisant d'autres personnes a appeler votre PC Linux et
  etablir une connexion PPP).

  Notez  qu'il  y  a un grand nombre de facons de configurer Linux comme
  serveur PPP. Ce document donne une methode  -  qui  est  utilisee  par
  l'auteur  pour configurer quelques petits serveurs PPP (chacun avec 16
  modems).

  Cette methode est connue pour fonctionner correctement. Cependant,  ce
  n'est pas forcement la meilleure methode.

  33..44..  UUttiilliisseerr PPPPPP aavveecc uunnee ccoonnnneexxiioonn NNuullll--MMooddeemm ddiirreeccttee

  Ce document offre un bref apercu d'utilisation de PPP pour relier deux
  PC Linux avec un cable null modem. Il est possible de relier  d'autres
  Systemes  d'exploitation  a  Linux  de  cette facon egalement. Pour ce
  faire, utiliser la documentation du systeme d'exploitation pour lequel
  vous etes interesse.

  33..55..  PPoouurr llee mmoommeenntt ccee ddooccuummeenntt nnee ccoouuvvrree ppaass......

  +o  La compilation du daemon PPP
     Regarder  la documentation fournie avec la version de pppd que vous
     utilisez.

  +o  Connecter et configurer un modem sous Linux (en detail)
     Regarder le Serial-HOWTO et pour les initialisations specifiques au
     modem,         voir         Modem         Setup         Information
     <http://www.in.net/info/modems/index.html>  des  informations   qui
     pourraient vous aider a configurer votre modem.

  +o  Utiliser dip pour faire des connexion PPP
     utiliser chat a la place

  +o  Utiliser socks ou IP Masquerading
     Il y a d'excellents documents qui couvrent deja ces paquetages.

  +o  Utiliser  EQL  pour  regrouper deux modems pour une seule connexion
     PPP.

  +o  Les methodes de connexion PPP specifiques aux distributions  (comme
     l'outil  de  configuration  reseau  de la Red Hat 4.x).  Voir votre
     distribution pour la documentation sur les methodes utilisees.

  +o  Le nombre  croissant  d'outils  disponibles  pour  automatiser  les
     connexions PPP
     Voir la documentation appropriee.

  44..  VVeerrssiioonnss ddeess llooggiicciieellss ttrraaiitteess

  Ce  HOWTO  suppose  que  vous  utilisez  un  noyau Linux 1.2.X avec le
  programme PPP 2.1.2 ou Linux 1.3.X/2.0.x et PPP 2.2.

  Au moment de la redaction,  la  derniere  version  officielle  de  PPP
  disponible est ppp-2.2.0f. La nouvelle version (ppp-2.3) est encore en
  beta.

  Il est possible d'utiliser  PPP  2.2.0  avec  le  noyau  1.2.13.  Cela
  necessite des patchs pour le noyau. Il est recommande aux utilisateurs
  du  noyau  1.2.13  de  passer  a  ppp-2.2  puisqu'il  inclut  quelques
  extensions et corrections de bogues.

  VVoouuss ddeevveezz eeggaalleemmeenntt eettrree ppaarrttiiccuulliieerreemmeenntt vviiggiillaanntt eett nnee ppaass uuttiilliisseerr
  llee pprrooggrraammmmee PPPPPP 22..11..22 aavveecc uunn nnooyyaauu LLiinnuuxx 22..00..XX..

  Veuillez remarquer que ce document nnee ttrraaiittee ppaass des problemes  venant
  de  l'utilisation de modules chargeables pour votre noyau Linux 2.0.x.
  Consulter le mini-HOWTO kerneld  et  la  documentation  kerneld/module
  2.0.x      (dans      les     sources     de     Linux     2.0.x     a
  /usr/src/linux/Documentation/..).

  PPuuiissqquuee ccee ddooccuummeenntt eesstt ddeessttiinnee aa aaiiddeerr lleess nnoouuvveeaauuxx uuttiilliissaatteeuurrss,,  iill
  eesstt  ffoorrtteemmeenntt  rreeccoommmmaannddee  dd''uuttiilliisseerr  uunnee  nnoouuvveellllee vveerrssiioonn dduu nnooyyaauu
  LLiinnuuxx eett llaa vveerrssiioonn aapppprroopprriieeee ddee PPPPPP qquuii ssoonntt ccoonnnnuuss ppoouurr ffoonnccttiioonnnneerr
  eennsseemmbbllee..

  55..  DD''aauuttrreess ddooccuummeennttss uuttiilleess//iimmppoorrttaannttss

  Je conseille aux utilisateurs de lire :

  +o  la documentation accompagnant le paquetage PPP;

  +o  les pages de manuel de pppd et chat;
     (utiliser man chat et man pppd pour les lire)

  +o  La page de configuration des modems - voir  Modem Setup Information
     <http://www.in.net/info/modems/index.html>

  +o  Les  excellents  livres  Unix/Linux  publies   par   O'Reilly   and
     Associates.    (O'Reilly   and   Associates   On-Line  Catalogue  <
     http://www.ora.com/>). Si vous etes nouveau  a  Unix/Linux,  ccoouurreezz
     (ne marchez pas) au plus proche marchand de livres informatiques et
     investissez dans un certain nombre d'entre eux immediatement !

  +o  La PPP-FAQ maintenue par Al Longyear, disponible sur  Linux PPP-FAQ
     <ftp://sunsite.unc.edu/pub/Linux/docs/faqs>.
     Elle  contient  un grand nombre d'informations utiles sous forme de
     questions/reponses indispensable lorsque l'on cherche pourquoi  PPP
     ne fonctionne pas (correctement).

  +o  Le  nombre  croissant de livre Linux venant des differents editeurs
     et auteurs;
     Vous etes encourages a verifier la date de parution de ces  livres.
     Le  developpement et la distribution de Linux tendent a etre plutot
     rapides, alors que la mise a jour  des  livres  est  (generalement)
     bien  plus  lente  !  Acheter un excellent livre (et il y en a) qui
     est  deja  depasse  entraine  une  confusion  et  une   frustration
     considerable pour les nouveaux utilisateurs.

  Le meilleur point de depart pour la documentation Linux est  The Linux
  Documentation Project  Home  Page  <http://sunsite.unc.edu/mdw/>.  Les
  HOWTO sont mis a jour raisonnablement regulierement.

  Bien  que  vous puissiez utiliser ce document pour creer votre liaison
  PPP sans lire aucun de ces documents,  vous  devriez  avoir  une  bien
  meilleure  comprehension de ce qu'il se passe si vous le faites ! Vous
  pouvez egalement exposer vous-meme vos problemes (ou  du  moins  poser
  les  questions  les  plus  intelligentes sur les groupes de discussion
  comp.os.linux...  ou  fr.comp.os.linux/unix...  ou  les  mailing  list
  Linux).

  Ces   documents   (ainsi   que   quelques   autres,   comme  les  RFCs
  correspondants) fournissent des explications complementaires  et  plus
  detaillees que ce qui est possible dans les HOWTO.

  Si  vous  connectez  un  reseau  local  a Internet avec PPP, vous avez
  besoin de connaitre un  certain  nombre  de  choses  sur  les  reseaux
  TCP/IP.  En  complement  des documents precedents, vous trouverez dans
  les livres  O'Reilly  "TCP/IP  Network  Administration"  et  "Building
  Internet Firewalls" un benefice considerable !

  55..11..  LLeess MMaaiilliinngg LLiisstteess uuttiilleess

  Il  y  a  de nombreuses mailing listes (listes de diffusion) Linux qui
  servent de moyen de  communication  entre  les  utilisateurs  dans  de
  nombreux   domaines.    Souscrivez   absolument   a  celles  qui  vous
  interessent pour donner votre point de vue.

  RReemmaarrqquueess ddee bboonn sseennss: certaines listes sont  specifiquement  destines
  au utilisateurs "experts" et/ou a certains sujets specifiques. Meme si
  personne ne se plaindra que vous soyez voyeur (souscrire  sans  poster
  de  messages),  vous  recevrez  certainement  des  commentaires chauds
  (voire des flammes) si vous postez des questions de debutant dans  les
  listes innappropriees.

  Ce  n'est pas parce que les utilisateurs gourous detestent les nouveau
  utilisateurs, mais parce que ces listes  sont  la  pour  contenir  des
  remarques specifiques a un certain niveau de difficulte.

  Vous  etes  largement  encourages  a souscrire librement a differentes
  listes mais faites absolument des commentaires  qui  cadrent  avec  le
  sujet (et le niveau) de la liste !

  Un  bon  point de depart pour les mailing-list Linux est Linux Mailing
  List      Directory       <http://summer.snu.ac.kr/~djshin/linux/mail-
  list/index.shtml>

  66..   PPrreesseennttaattiioonn  ddee ccee qquuii ddooiitt eettrree ffaaiitt ppoouurr ffaaiirree ffoonnccttiioonnnneerr PPPPPP
  ccoommmmee cclliieenntt

  Ce  document  contient un grand nombre d'informations - qui augmente a
  chaque version !

  Par consequent, cette section a pour but de fournir  une  presentation
  concise  des actions pour connecter votre systeme Linux comme client a
  un serveur PPP.

  66..11..  OObbtteenniirr//iinnssttaalllleerr lleess pprrooggrraammmmeess

  Si votre distribution Linux ne contient pas les programmes  PPP,  vous
  devez     les     obtenir     sur      the     Linux     PPP    daemon
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/serial/ppp/ppp-2.2.0f.tar.gz>

  C'est la derniere version officielle lors de la redaction du document.
  Cependant, prenez la derniere version disponible sur ce site  (ppp-2.3
  etait  en  beta  lors de la redaction de ce document et devrait sortir
  bientot).

  Le paquetage PPP contient les instructions sur la facon de compiler et
  d'installer le logiciel ddoonncc ccee HHOOWWTTOO nn''eenn ppaarrlleerraa ppaass. !

  66..22..  CCoommppiilleerr llee ssuuppppoorrtt PPPPPP ddaannss llee nnooyyaauu

  L'installation de PPP Linux se divise en deux parties

  +o  le daemon PPP mentionne ci-dessus

  +o  le support PPP dans le noyau

  De  nombreuses  distributions semblent fournir un support PPP dans les
  noyaux installes par defaut, mais certaines ne le font pas.

  Si lors du boot, le noyau donne un message ressemblant a :

  ______________________________________________________________________
  PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.
  PPP line discipline registered.
  ______________________________________________________________________

  Votre noyau a le support PPP compile.

  Toutefois, vous devez recompiler votre propre noyau quelque soit votre
  distribution  pour fournir l'utilisation la plus efficace possible des
  ressources  disponibles   et   de   votre   configuration   materielle
  personnelle.  Il  est  bon  de savoir que le noyau ne peut etre swappe
  hors de la memoire. Avoir un noyau le plus  petit  possible  est  donc
  interessant surtout pour une machine limitee en memoire.

  Ce  document fournit les instructions minimales pour la re-compilation
  du noyau a la section ``Configurer votre noyau Linux''.

  Pour plus de details, voir le Kernel-HOWTO a The  Linux  Kernel  HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>

  66..33..  OObbtteenniirr lleess iinnffoorrmmaattiioonnss ppoouurr vvoottrree ffoouurrnniisssseeuurr dd''aacccceess aa IInntteerr--
  nneett

  Il  y a presque une infinite de manieres de configurer un serveur PPP.
  Pour se connecter chez votre fournisseur d'acces (ou  un  serveur  PPP
  pour  acceder  a  votre intranet), vous devez obtenir des informations
  sur la facon dont le serveur fonctionne.

  Puisque vous utilisez Linux, vous pourriez avoir quelques  difficultes
  avec   le   support   de   certains  FAI  (et  les  serveurs  Intranet
  d'entreprise) qui ne connaissent que les clients MS-Windows.

  Toutefois, un nombre croissant de FAI utilisent Linux pour offrir leur
  service  - et Linux penetre egalement l'environnement industriel, vous
  devriez reduire ainsi les chances de rencontrer des problemes.

  La section ``Fournir les informations dont vous avez besoin pour votre
  serveur  PPP''  vous explique ce dont vous devez savoir sur le serveur
  PPP sur lequel vous vous connectez et comment obtenir les informations
  dont vous avez besoin.

  66..44..  CCoonnffiigguurreerr vvoottrree mmooddeemm eett vvoottrree ppoorrtt sseerriiee

  Pour  se  connecter  a  un  serveur PPP et obtenir le meilleur taux de
  transfert possible, votre modem doit etre configure correctement.

  De la meme facon, les ports serie  de  votre  modem  ainsi  que  votre
  ordinateur doivent etre configures correctement.

  La  section ``Configurer votre modem et votre port serie'' fournit des
  informations a ce sujet.

  66..55..  MMeettttrree eenn ppllaaccee llaa rreessoolluuttiioonn ddee nnoommss ((DDNNSS))

  En plus des fichiers qui lancent PPP et automatisent la connexion  sur
  le  serveur  PPP,  il y a un grand nombre de fichiers de configuration
  qui sont mis en place pour que votre ordinateur  puisse  resoudre  les
  noms  comme  www.interweft.com.au vers l'adresse IP qui est reellement
  utilisee pour contacter cet ordinateur. Ces fichiers sont :

  +o  /etc/resolv.conf

  +o  /etc/host.conf

  Voir la section ``Configurer la resolution  de  nom  vers  l'adresse''
  pour une configuration detaillee de cela.

  En particulier, vous nn''aavveezz ppaass bbeessooiinn de lancer un serveur de nom sur
  votre PC  Linux  pour  le  connecter  a  Internet  (sauf  si  vous  le
  souhaitez).   Tout ce dont vous avez besoin est de connaitre l'adresse
  IP d'au moins l'un des serveurs  de  noms  que  vous  pouvez  utiliser
  (plutot celui de votre fournisseur d'acces).

  66..66..  PPPPPP eett lleess pprriivviilleeggeess rroooott

  Puisqu'etablir  une  liaison  PPP  entre  votre ordinateur Linux et un
  autre serveur PPP necessite la manipulation des  peripheriques  reseau
  (l'interface  PPP  est une interface reseau) et des tables de routages
  du noyau, pppd necessite les privileges rroooott.

  Pour des details la-dessus, voir la  section  ``Utiliser  PPP  et  les
  privileges root''.

  66..77..   VVeerriiffiieerr  lleess  ffiicchhiieerrss ddee vvoottrree ddiissttrriibbuuttiioonn PPPPPP eett ccoonnffiigguurreerr
  lleess ooppttiioonnss ddee PPPPPP

  Il  y  a un certain nombre de fichiers de configuration et d'appel qui
  doivent etre configures pour rendre  PPP  operationnel.  Des  exemples
  sont fournis avec la distribution de PPP et cette section montre quels
  fichiers il doit y avoir :

  ______________________________________________________________________
  /etc/ppp/options
  /etc/ppp/scripts/ppp-on
  /etc/ppp/scripts/ppp-on-dialer
  /etc/ppp/options.tpl
  ______________________________________________________________________

  Vous devrez creer des fichiers supplementaires en fonction de  ce  que
  vous souhaitez exactement utiliser avec PPP :

  ______________________________________________________________________
  /etc/ppp/options.ttyXX
  /etc/ppp/ip-up
  /etc/ppp/pap-secrets
  /etc/ppp/chap-secrets
  ______________________________________________________________________

  En plus, le daemon PPP peut traiter un grand nombre d'options en ligne
  de commande et il est important d'utiliser  les  bonnes;  ainsi  cette
  section  montre les options standard de PPP et vous aide a choisir les
  options que vous utiliserez.

  Pour les details a ce sujet, voir en section ``Configurer les fichiers
  de connexion de PPP''.

  66..88..  SSii vvoottrree sseerrvveeuurr PPPPPP uuttiilliissee PPAAPP ((PPaasssswwoorrdd AAuutthheennttiiccaattiioonn PPrroottoo--
  ccooll))

  De  nombreux  fournisseurs  d'acces  et serveurs PPP utilisent PAP. Si
  votre serveur nn''aa ppaass besoin  d'utiliser  PAP  (si  vous  pouvez  vous
  connecter   a   la  main  et  recevoir  les  messages  textes  de  nom
  utilisateur/mot  de  passe  il  n'utilise  pas   PAP),   vous   pouvez
  tranquillement ignorer cette section.

  Plutot  que  se  connecter  dans  de tels serveurs en utilisant le nom
  utilisateur et le mot de passe  quand  vous  etes  interroges  par  le
  serveur  pour  les entrer, un serveur PPP utilisant PAP n'a pas besoin
  de login base sur du texte.

  Les informations d'authentification de l'utilisateur sont echangees  a
  la  place  comme partie prenante du protocole de controle de connexion
  qui est la premiere partie de l'etablissement d'une liaison PPP.

  La  section   ``Si   votre   serveur   PPP   utilise   PAP   (Password
  Authentification Protocol)'' fournit des informations sur les fichiers
  dont vous avez besoin pour etablir une connexion PPP en utilisant PAP.

  66..99..  SSee ccoonnnneecctteerr aauu sseerrvveeuurr PPPPPP aa llaa mmaaiinn

  Une  fois  les  fichiers  de base configures, c'est une bonne idee que
  d'essayer ceux-ci en se connectant  (avec  minicom  ou  seyon)  et  de
  lancer pppd sur votre PC Linux a la main.

  Voir  la  section  ``Configurer une connexion PPP a la main'' pour des
  details complets.

  66..1100..  AAuuttoommaattiisseerr vvoottrree ccoonnnneexxiioonn PPPPPP

  Une fois que  vous  pouvez  vous  connecter  a  la  main,  vous  allez
  maintenant  commencer a configurer les scripts qui vont automatiser la
  mise en place de la connexion.

  La section ``Automatiser votre  connexion  -  Creer   les  scripts  de
  connexion''  couvre  la  configuration des fichiers necessaires, et la
  mise en place des scripts et du processus de  login  avec  le  serveur
  PPP, ainsi que des details complets sur chat.

  Cette   section   traite   des   scripts   d'authentification  du  nom
  utilisateur/mot de passe ainsi que des scripts d'authentification pour
  les serveurs PAP/CHAP.

  66..1111..  TTeerrmmiinneerr llaa ccoonnnneexxiioonn

  Une  fois  que  votre  connexion est activee et fonctionne, vous devez
  pouvoir desactiver la liaison.

  Consultez la section ``Terminer une connexion PPP''.

  66..1122..  SSii vvoouuss aavveezz ddeess pprroobblleemmeess

  De nombreuses personnes ont des problemes pour faire  fonctionner  PPP
  directement.  Les  differences entre les serveurs PPP et la facon dont
  il faut configurer la connexion  sont  enormes.  De  plus,  PPP  a  de
  nombreuses  options  -  et  certaines  combinaisons  d'entre  elles ne
  fonctionnent absolument pas ensemble.

  En plus des problemes de journalisation et  de  demarrage  du  service
  PPP,  il y a des problemes lies aux modems et aux lignes de telephones
  qui s'ajoutent !

  La section ``Resoudre les problemes'' fournit des informations de base
  au  sujet  des erreurs classiques, et la facon de les isoler et de les
  corriger.

  Elle nn''eesstt ttoouutteeffooiiss ppaass destinee a offrir plus que  les  informations
  de  base.  Al  Longyear  maintient  la  PPP-FAQ qui contient bien plus
  d'informations a ce sujet !

  66..1133..  UUnnee ffooiiss qquuee llaa ccoonnnneexxiioonn eesstt llaanncceeee

  Une fois que la liaison PPP est  operationnelle  (specifiquement,  une
  fois que les trames IP fonctionnent), pppd peut lancer automatiquement
  (comme utilisateur root) un script  pour  accomplir  n'importe  quelle
  fonction qu'un script peut accomplir.

  La  section  ``Une  fois  que  la  connexion  est lancee'' fournit des
  informations sur le script /etc/ppp/ip-up, les parametres que PPP  lui
  envoie   et   comment   l'utiliser   pour   recuperer  votre  courrier
  electronique de votre compte de votre fournisseur d'acces, ou  envoyer
  les messages en attente de transmission sur votre machine.

  66..1144..   PPrroobblleemmeess  aavveecc  lleess  sseerrvviicceess  IIPP  ssttaannddaarrddss  eett ll''aaddrreessssee IIPP
  ddyynnaammiiqquuee ddee llaa lliiaaiissoonn PPPPPP..

  Comme   cela  est  mentionne  dans  l'introduction,  les  adresses  IP
  dynamiques affectent la capacite de votre PC Linux  a  agir  comme  un
  serveur sur Internet.

  La  section ``Problemes avec les services IP  standard et l'adresse IP
  dynamique de  la  liaison  PPP''  fournit  des  informations  sur  les
  (principaux)  services  affectes et ce que vous pouvez faire (si c'est
  possible) pour contourner cela.

  77..  CCoonnffiigguurreerr vvoottrree nnooyyaauu LLiinnuuxx

  Pour utiliser PPP, votre noyau Linux doit etre compile avec le support
  PPP.   Recuperez le code source de votre noyau Linux si vous ne l'avez
  pas encore - il se  situe  dans  /usr/src/linux  dans  un  systeme  de
  fichiers Linux standard.

  Verifiez  ce  repertoire  - de nombreuses distributions installent les
  sources   (fichiers   et   repertoires)   pendant    leur    processus
  d'installation.

  Au  demarrage,  votre noyau ecrit une grande quantitee d'informations.
  Parmi elles, est indique si le noyau contient le  support  PPP.   Pour
  afficher  ces informations, regardez votre fichier syslog, ou utilisez
  dmesg | less pour afficher ces informations a l'ecran. Si votre  noyau
  contient le support PPP, vous verrez quelques lignes du genre

  ______________________________________________________________________
  PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.
  PPP line discipline registered.
  ______________________________________________________________________

  (pour les noyau Linux version 2.0.x)

  Les  sources du noyau Linux sont disponibles par ftp a sunsite.unc.edu
  ou ses nombreux miroirs, en particulier ftp.lip6.fr.

  77..11..  IInnssttaalllleerr lleess ssoouurrcceess dduu nnooyyaauu

  La suite regroupe de breves instructions pour obtenir et installer les
  sources  du noyau Linux. Des informations completes sont disponibles a
  The  Linux  Kernel   HOWTO   <http://sunsite.unc.edu/mdw/HOWTO/Kernel-
  HOWTO.html>.
  Pour installer et compiler le noyau Linux vous devez etre root.

  1. Changer de repertoire vers /usr/src/
     cd /usr/src/

  2. Verifier  dans  /usr/src/linux  pour  voir si les sources sont deja
     installees.

  3. Si vous n'avez pas les sources, recuperez les a Linux kernel source
     directory  <ftp://sunsite.unc.edu/pub/Linux/kernel/v2.0>  ou sur un
     miroir plus proche comme ftp.lip6.fr.
     Si vous cherchez une version  plus  ancienne  du  noyau  (comme  la
     1.2.X),   elles  sont  conservees  dans  Old  Linux  kernel  source
     directory <ftp://sunsite.unc.edu/pub/Linux/kernel/old>.

  4. Choisissez  le  noyau  approprie  -  generalement  le  plus  recent
     disponible  est  le meilleur. Le recuperer et mettre le fichier tar
     dans /usr/src.
     RReemmaarrqquuee: un fichier 'tar' est une  archive  -  parfois  compressee
     (comme  le  sont  les  fichiers  tar des sources du noyau Linux) il
     contient de nombreux fichiers repartis dans plusieurs  repertoires.
     C'est  l'equivalent  Linux  des fichiers multi-repertoires sous MS-
     DOS.

  5. Si vous avez deja les sources de Linux installees,  mais  que  vous
     voulez  les  mettre  a  jour, il faut effacer les anciens fichiers.
     Utiliser la commande
     rm -rf /usr/src/linux

  6. Maintenant decompresser et extraire les sources avec la commande
     tar xzf linux-2.0.XX.tar.gz

  7. Maintenant,  cd  /usr/usr/linux  et  lire  le  fichier  README.  Il
     contient  une  excellente  explication  de  la  facon de faire pour
     configurer et compiler un nouveau noyau. Lisez  ce  fichier  (c'est
     une  bonne idee de l'imprimer pour en garder une copie sous la main
     quand vous compilerez votre noyau jusqu'a ce que vous  l'ayez  fait
     suffisamment pour vous debrouiller tout seul).

  77..22..  CCoonnnnaaiittrree vvoottrree mmaatteerriieell

  Vous DDEEVVEEZZ savoir quelles cartes/peripheriques vous avez dans votre PC
  si  vous  commencer  a  recompiler  votre  noyau  !!!  Pour   certains
  peripheriques  (comme  les cartes sons) vous devez egalement connaitre
  quelques parametres (comme les IRQ et les adresse I/O et des choses du
  genre).

  77..33..  CCoommppiillaattiioonn dduu nnooyyaauu -- llee nnooyyaauu LLiinnuuxx 11..22..1133

  Pour  commencer le processus de configuration, suivre les instructions
  du fichier README pour installer les sources correctement. Vous lancez
  le processus de configuration du noyau avec

       make config

  Pour  utiliser  PPP,  vous  devez  configurer le noyau pour inclure le
  support PPP (PPP a besoin DE pppd ET DU support de PPP dans le noyau).
  ______________________________________________________________________
    PPP (point-to-point) support (CONFIG_PPP) [n] y
  ______________________________________________________________________

  Repondre  aux  autres  questions  du  make  config  en  accord avec le
  materiel de votre PC et les caracteristiques que vous  souhaitez  pour
  votre  systeme  d'exploitation  Linux.  Continuer ensuite a suivre les
  instructions de compilation et d'installation  du  README  pour  votre
  nouveau noyau.

  Le  noyau 1.2.13 creait seulement 4 peripheriques PPP. Pour les cartes
  series multiports, vous devez editer les sources  du  noyau  PPP  pour
  avoir  plus  de  ports.  (Voir le fichier README.Linux accompagnant la
  distribution de PPP-2.1.2  pour  des  details  complets  des  editions
  simples que vous devez faire).

  Remarque  :  la configuration du noyau 1.2.13 ne permet pas de revenir
  en arriere - si  vous  faites  une  erreur  en  repondant  a  une  des
  questions dans le make config quitter avec CTRL-C et recommencer.

  77..44..  CCoommppiillaattiioonn dduu nnooyyaauu LLiinnuuxx 11..33..xx eett 22..00..xx

  Pour  Linux 1.3.x et 2.0.x, vous pouvez utiliser le meme processus que
  pour Linux 1.2.13. De meme, suivez les instructions du fichier  README
  pour  installer les sources correctement. Vous lancez la configuration
  du noyau avec

       make config

  Cependant, vous pouvez aussi utiliser

       make menuconfig

  Qui fournit un systeme de configuration avec une aide en ligne et vous
  pouvez avancer et reculer dans la configuration.

  Il  y  a  aussi  l'interface de configuration sous X-Window chaudement
  recommandee

       make xconfig

  Vous pouvez compiler le support PPP directement dans  votre  noyau  ou
  sous la forme d'un module chargeable dynamiquement.
  Si  vous utilisez PPP occasionnellement, alors compiler le support PPP
  en  module  chargeable  est  recommande.  Avec  kerneld,  votre  noyau
  chargera  automatiquement  le(s) module(s) necessaires pour fournir le
  support  PPP  quand  vous  lancerez  une  liaison  PPP.  Cela   permet
  d'economiser  une  partie  de l'espace memoire : le noyau ne peut etre
  swappe, alors que les modules chargeables sont automatiquement enleves
  si ils ne sont pas utilises.

  Pour cela, vous devez activer le support des modules chargeables :

  ______________________________________________________________________
          Enable loadable module support (CONFIG_MODULES) [Y/n/?] y
  ______________________________________________________________________

  Pour  ajouter  le  support  PPP  a votre noyau, repondre a la question
  suivante :

  ______________________________________________________________________
          PPP (point-to-point) support (CONFIG_PPP) [M/n/y/?]
  ______________________________________________________________________

  Pour  un  module  chargeable,  repondre  MM,  sinon  pour  le  compiler
  directement dans le noyau, repondre YY.

  A  la  difference du 1.2.13, le noyau 2.0.x cree les peripheriques PPP
  au vol et selon les besoins, et il n'y  a  absolument  pas  besoin  de
  bricoler le source pour augmenter le nombre de peripheriques PPP.

  77..55..  RReemmaarrqquuee ssuurr PPPPPP--22..22 eett //pprroocc//nneett//ddeevv

  Si vous utilisez PPP-2.2, vous trouverez qu'un probleme de la creation
  des peripheriques PPP 'au vol' est qu'aucun peripherique n'est  trouve
  dans  le fichier /proc/net tant qu'un peripherique n'est pas cree avec
  le lancement de pppd :

  ______________________________________________________________________
  [hartr@archenland hartr]$ cat /proc/net/dev
  Inter-|   Receive                  |  Transmit
   face |packets errs drop fifo frame|packets errs drop fifo colls carrier
      lo:  92792    0    0    0    0    92792    0    0    0     0    0
    eth0: 621737   13   13    0   23   501621    0    0    0  1309    0
  ______________________________________________________________________

  Une fois que vous avez un (ou plus) services ppp lances,  vous  verrez
  des entrees comme celles-ci (sur un serveur PPP) :

  ______________________________________________________________________
  [root@kepler /root]# cat /proc/net/dev
  Inter-|   Receive                  |  Transmit
   face |packets errs drop fifo frame|packets errs drop fifo colls carrier
      lo: 428021    0    0    0    0   428021    0    0    0     0    0
    eth0:4788257  648  648  319  650  1423836    0    0    0  4623    5
    ppp0:   2103    3    3    0    0     2017    0    0    0     0    0
    ppp1:  10008    0    0    0    0     8782    0    0    0     0    0
    ppp2:    305    0    0    0    0      297    0    0    0     0    0
    ppp3:   6720    7    7    0    0     7498    0    0    0     0    0
    ppp4: 118231  725  725    0    0   117791    0    0    0     0    0
    ppp5:  38915    5    5    0    0    28309    0    0    0     0    0
  ______________________________________________________________________

  77..66..  CCoonnssiiddeerraattiioonnss ggeenneerraalleess ssuurr llaa ccoonnffiigguurraattiioonn dduu nnooyyaauu ppoouurr PPPPPP

  Si vous configurez votre PC Linux comme un  serveur  PPP,  vous  devez
  activer  le support IP Forwarding. Il est egalement necessaire si vous
  voulez utiliser Linux pour relier deux reseaux locaux entre eux ou  un
  reseau local a Internet.

  Si  vous  reliez  un  reseau  local a Internet (ou reliez deux reseaux
  entre eux), vous devez etre concernes  par  la  securite.  Ajouter  le
  support  pour  IP  firewall  dans  votre  noyau  est  alors sans doute
  obligatoire !

  Vous aurez egalement besoin, d'utiliser IP Masquerade pour  relier  un
  reseau  local  qui  utilise les adresses IP non connectees mentionnees
  plus haut.

  Pour activer IP Masquerade et IP firewalling, vous DDEEVVEEZZ repondre  Oui
  a la premiere question de make config :

  ______________________________________________________________________
  Prompt for developement and/or incomplete code/drivers (CONFIG_EXPERIMENTAL)?
  ______________________________________________________________________

  Bien que cela puisse sembler un peu bizarre aux nouveaux utilisateurs,
  je confirme que de nombreux utilisateurs utilisent les possibilites de
  IP  Masquerading  et  de  IP  firewalling  du  noyau  Linux 2.0.X sans
  problemes.

  Une fois que vous avez installe et boote  votre  nouveau  noyau,  vous
  pouvez commencer a configurer et a tester votre liaison PPP.

  88..   FFoouurrnniirr lleess iinnffoorrmmaattiioonnss ddoonntt vvoouuss aavveezz bbeessooiinn ppoouurr vvoottrree sseerrvveeuurr
  PPPPPP

  Avant  d'etablir  la connexion PPP avec un serveur, vous devez obtenir
  les  informations  suivantes  (de   l'administrateur   systeme/support
  utilisateur/ personnes gerant le serveur PPP) :

  +o  Le numero de telephone a composer pour le service
     Si vous etes derriere un standard, vous avez aussi besoin du numero
     qui vous permet  de  sortir  a  l'exterieur  du  standard  -  c'est
     generalement le chiffre zero (0) ou neuf(9).

  +o  Est-ce  que  le  serveur  utilise  des  adresse  IP  DYNAMIQUES  ou
     STATIQUES ?
     Si le serveur utilise des adresses IP STATIQUES, vous devez  savoir
     quelle  adresse  IP utiliser a la fin de la connexion PPP. Si votre
     FAI vous fournit une adresse  de  sous-reseau  valide,  vous  devez
     connaitre le masque de sous-reseau a utiliser (netmask).

     La plupart des FAI utilisent des adresses IP DYNAMIQUES. Comme cela
     est mentionne plus haut, cela a des impliquations sur les  services
     que vous pouvez utiliser.

     Cependant,  meme  si  vous  utilisez  des adresses IP STATIQUES, la
     plupart des serveurs PPP ne laisseront jamais (pour des raisons  de
     securite) les clients specifier leur adresse IP car c'est un risque
     pour la securite. Vous ddeevveezz connaitre aussi cette information !

  +o  Quel sont les adresses IP des  serveur  de  noms  des  fournisseurs
     d'acces ?
     Il doit y en avoir au moins deux, meme si un seul suffit.

     Il  peut  y  avoir  un  probleme  a ce niveau. Le service PPP de MS
     Windows 95 permet que l'adresse DNS soit transmise au  client  dans
     le   processus  de  connexion.  Ainsi,  votre  fournisseur  d'acces
     pourrait vous repondre que vous n'avez pas besoin de  l'adresse  IP
     du serveur DNS.

     Avec  Linux,  vous  ddeevveezz  connaitre  l'adresse  d'au moins un DNS.
     L'implementation  PPP  de  Linux  ne  permet  pas   de   configurer
     dynamiquement  a  la  connexion  l'adresse  du  serveur DNS - et ne
     pourra certainement jamais.

     RReemmaarrqquuee: bien que Linux (comme client PPP) ne  peut  pas  recevoir
     d'adresse  DNS  du  serveur,  il peut, en tant que serveur, envoyer
     l'information au client en utilisant l'option dns-addr de pppd.

  +o  Est-ce-que le serveur a besoin d'utiliser PAP/CHAP ?
     Si tel est le cas, vous devez connaitre le id et le secret que vous
     avez pour vous connecter. (c'est probablement votre nom utilisateur
     et le mot de passe de votre fournisseur d'acces).

  +o  Le serveur est-il un systeme Microsoft Windows NT et, dans ce  cas,
     utilise-t-il le systeme PAP/CHAP ?
     De nombreux fournisseurs d'acces semblent utiliser MS-Windows NT de
     cette facon pour ameliorer la securite.

  Attention a l'information suivante - elle risque d'etre utile !

  99..  CCoonnffiigguurreerr vvoottrree mmooddeemm eett vvoottrree ppoorrtt sseerriiee

  Vous devez vous assurer que votre modem est correctement configure  et
  que vous savez sur quel port serie il est branche.

  SSee ssoouuvveenniirr qquuee :

  +o  DOS COM1: = Linux /dev/cua0 (et /dev/ttyS0)

  +o  DOS COM2: = Linux /dev/cua1 (et /dev/ttyS1)
     etc.

  Il  est egalement bien de se souvenir que si vous avez 4 ports series,
  la configuration standard d'un PC est d'avoir COM1 et COM3  partageant
  IRQ4 et COM2 et COM4 partageant IRQ3.

  Si  vous avez des peripheriques sur vos ports series qui partagent une
  IRQ avec votre modem vous allez avoir des problemes. Vous  devez  vous
  assurer  que  le port serie de votre modem est sur sa propre et unique
  IRQ. De nombreuses cartes series modernes (et  les  ports  series  des
  cartes meres de bonne qualite) permettent de changer les IRQ des ports
  serie.

  Si vous utilisez le noyau  Linux  2,  vous  pouvez  afficher  des  IRQ
  actuellement  utilises  avec  cat  /proc/interrupts,  qui produira une
  sortie ressemblant a :

  ______________________________________________________________________
   0:    6766283   timer
   1:      91545   keyboard
   2:          0   cascade
   4:     156944 + serial
   7:     101764   WD8013
  10:     134365 + BusLogic BT-958
  13:          1   math error
  15:    3671702 + serial
  ______________________________________________________________________

  Cela montre que le le port serie en IRQ4 (une souris) et le port serie
  en  IRQ15 (un modem permanent base sur PPP pour une liaison Internet).
  (Il y a egalement un port serie sur le port COM2,  IRQ3  et  COM4  est
  dans  l'IRQ14,  mais  comme  ils ne sont pas utilises, ils ne sont pas
  affiches).

  Avertissement - vous devez vous rendre compte de ce  que  vous  faites
  lorsque  vous  voulez  jouer  avec vos IRQ ! Non seulement, vous devez
  ouvrir votre ordinateur, retirer vos cartes et jouer avec les jumpers,
  mais  vous  devez  savoir  ce qu'il y a sur chaque IRQ.  Dans mon cas,
  j'ai un PC totalement SCSI, et j'ai donc desactive les interfaces  IDE
  de la carte-mere qui utilisent normalement les IRQ14 et 15 !

  Je tiens egalement a preciser que si votre PC utilise un autre systeme
  d'exploitation, changer les IRQ pourrait bien signifier que  votre  OS
  ne bootera plus correctement, ou plus du tout !

  Si  vous  deplacez  vos  ports  series vers des IRQ non-standard, vous
  devez specifier a Linux quel IRQ utilise chaque port. setserial permet
  de  le  faire,  et  de  preference lors du processus de lancement dans
  rc.local ou rc.serial qui est appele dans rc.local ou comme une partie
  de  l'initialisation SysV system. Pour la machine presentee ci-dessus,
  les commandes utilisees sont

  ______________________________________________________________________
  /bin/setserial -b /dev/ttyS2 IRQ 11
  /bin/setserial -b /dev/ttyS3 IRQ 15
  ______________________________________________________________________

  Toutefois, si vous utilisez le module serie  charge  dynamiquement  au
  besoin avec le processus kerneld, vous ne pouvez pas definir et perdre
  les IRQ a chaque redemarrage. Si le module  serie  est  efface,  Linux
  perds alors les configurations speciales.

  Donc,  si  vous  chargez  le  module  serie  a  la demande, vous devez
  reconfigurer les IRQ a chaque fois qu'il est charge.

  99..11..  RReemmaarrqquuee aauu ssuujjeett ddeess ppoorrttss sseerriieess eett ddeess ccaappaacciittee ddee vviitteessssee

  Si  vous  utilisez  un  modem  haut  debit  (externe) (14.400 Bits par
  seconde ou plus), votre port serie doit  etre  capable  de  suivre  le
  debit  qu'un  tel  modem est capable de produire, en particulier si le
  modem compresse les donnees.

  Cela  demande  que  votre  port  serie   utilise   un   UART(Universal
  Asynchronous  Receiver Transmitter) moderne comme un 16550(A). Si vous
  utilisez une vieille machine (ou une vieille carte serie), il est tout
  a  fait  possible  que votre port serie ait seulement un UART 8250, ce
  qui amenera des problemes considerables avec un modem haute vitesse.

  Utiliser la commande

       setserial -a /dev/ttySx

  Pour que Linux vous affiche le type d'UART  que  vous  avez.  Si  vous
  n'avez  pas  un  UART  de type 16550, acheter une nouvelle carte serie
  (disponible pour moins de 300 F). Quand vous  acheterez  une  nouvelle
  carte, assurez vous que vous pouvez changer les IRQ !

  Remarque  :  les  premieres  versions des puces UART 16550 avaient une
  erreur. Elle a ete rapidement decouverte et une mise a jour de la puce
  est  sortie  -  l'UART  16550A. Un nombre relativement faible de puces
  erronees ont cependant ete mises  en  circulation.  Ca  serait  de  la
  malchance  que d'un recuperer une, en particulier sur certaines cartes
  d'occasion, mais il  suffit  de  chercher  la  reponse  qui  s'appelle
  16550A.

  99..22..  NNoommss ddeess ppoorrttss sseerriiee

  Historiquement,  Linux  utilise les peripheriques cuaX pour les appels
  sortants et ttySx pour les appels entrants.

  Le code du noyau a eu besoin de changer cela dans la version 2.0.x  du
  noyau,  et  vous  devez  maintenant  utiliser  ttySx  pour  les appels
  entrants  et  sortants.  Cela  semble  annoncer  que   les   noms   de
  peripheriques  cuaX devraient disparaitre dans les futures versions du
  noyau.

  99..33..  CCoonnffiigguurraattiioonn ddee vvoottrree mmooddeemm

  Vous devez configurer votre modem correctement pour PPP -  pour  cela,
  LLIISSEEZZ  LLEE  MMAANNUUEELL  DDEE  VVOOTTRREE  MMOODDEEMM  !  La  plupart des modems ont uunnee
  ccoonnffiigguurraattiioonn ppaarr ddeeffaauutt eenn uussiinnee avec les options requises  par  PPP.
  La configuration minimale specifie :

  +o  Controle de flux materiel (RTS/CTS) (&K3 sur les modems Hayes)

  Les  autres  parametres  (en  commandes Hayes standard) que vous devez
  verifier sont :

  +o  La commande E1 Echo ON (necessaire pour que chat fonctionne)

  +o  S0=0 Auto Answer OFF (a moins que vous ne vouliez que  votre  modem
     reponde au telephone)

  +o  &C1 Carrier Detect ON seulement apres la connexion

  +o  &S0 Data Set Ready (DSR) toujours ON

  +o  (variable) Data Terminal Ready

  Un  site  fournit  la  configuration  des  modems  pour une variete de
  fabricants  et  de  modeles  de  modems  croissante  a   Modem   setup
  information   <http://www.in.net/info/modems/index.html>  qui  devrait
  vous simplifier la configuration.

  Il est aussi interessant de verifier  comment  fonctionne  l'interface
  serie  entre  votre  ordinateur  et votre modem. La plupart des modems
  modernes vous permettent d'utiliser l'interface serie  a  une  vitesse
  FIXE permettant a l'interface avec la ligne telephonique de changer de
  vitesse pour atteindre la plus  haute  vitesse  que  les  deux  modems
  peuvent supporter.

  Cela  s'appelle  l'operation de division de la vitesse. Si votre modem
  le  supporte,  bloquer  l'interface  serie  du  modem  a  la   vitesse
  disponible  la  plus  rapide  (d'habitude  115.200  bauds mais parfois
  38.400 pour les modems 14.400).

  Utiliser les outils de communication (c.-a-d. minicom ou  seyon)  pour
  acceder  a  la configuration de votre modem, et l'adapter a ce qui est
  necessaire a PPP. De nombreux modems renvoient leurs reglages courants
  apres  la  commande AT&V, mais vous devez consulter le manuel de votre
  modem.

  Si vous avez completement modifie les reglages, vous  pouvez  repartir
  sur des bases saines (generalement) en envoyant AT&F - ca retourne aux
  reglages usine. (Pour la majorite des modems que j'ai  rencontre,  les
  reglages  usine  on  tout  ce qu'il faut pour faire du PPP - mais vous
  devez verifier).

  Un fois que vous avez la commande  necessaire  pour  configurer  votre
  modem,  ecrivez-la.  Vous devez maintenant prendre une decision : vous
  pouvez stocker ces parametres dans la memoire  non-volatile  de  votre
  modem, comme cela vous pourrez la relancer en envoyant une commande AT
  appropriee. Alternativement, vous pouvez passer le parametrage correct
  a votre modem lors du processus de connexion de PPP.

  Si  vous utilisez uniquement votre modem sous Linux pour appeler votre
  FAI ou un serveur d'entreprise, la  maniere  la  plus  simple  est  de
  sauver la configuration de votre modem dans la memoire non-volatile.

  D'un  autre cote, si votre modem est utilise par d'autres applications
  et systemes d'exploitation, il est plus sur de passer ces informations
  au  modem a chaque appel que vous passez, comme cela, c'est sur que le
  modem sera bien configure lors de l'appel. (Cela a aussi l'avantage de
  conserver  la  ligne  de  configuration  du  modem  au cas ou le modem
  perdrait le contenu de sa NV-RAM, ce qui peut parfois arriver).

  99..44..  RReemmaarrqquuee ssuurr llee ccoonnttrroollee ddee fflluuxx sseerriiee

  Lorsque les donnees transitent sur les lignes de communication  serie,
  il peut arriver que les donnees arrivent plus vite que l'ordinateur ne
  peut les traiter (l'ordinateur peut etre occupe a faire autre chose  -
  n'oubliez   pas   que   Linux   est  un  systeme  Multi-taches  Multi-
  utilisateurs). Pour s'assurer que des donnees ne se sont  pas  perdues
  (les  donnees  n'arrivent  pas  dans le tampon d'entree pour se perdre
  ensuite), certaines methodes de controles sont necessaires.

  Il y a deux facons de faire sur des lignes series :

  +o  Utiliser des signaux  materiels  (Clear  To  Send/Request  To  Send
     CTS/RTS)

  +o  Utiliser  des  signaux  logiciel  (control  S  et  control Q, aussi
     appeles XON/XOFF).

  Bien  que  le  dernier  soit  correct  pour  les  liaisons  vers   des
  terminaux(texte), les donnees sur une liaison PPP utilisent les 8 bits
  - et il est fort probable que quelque part dans les donnees, un  octet
  se  traduis  par  un  control S ou un control Q. Donc, si un modem est
  configure  pour  utiliser  le  controle  de  flux,  les  choses   vont
  rapidement s'envenimer !

  Pour les liaisons a haut debit utilisant PPP (avec l'utilisation des 8
  bits de donnees) le controle de flux materiel est vital, et  c'est  la
  raison pour laquelle vous devez utiliser le controle de flux materiel.

  99..55..  TTeesstteerr vvoottrree mmooddeemm ppoouurr ccoommppoosseerr uunn nnuummeerroo

  Maintenant que vous en avez termine avec la configuration du modem  et
  du  port  serie,  il  serait  utile de verifier si cette configuration
  marche vraiment en appelant votre fournisseur d'acces et voir si  vous
  pouvez vous connecter.

  En  utilisant  le  paquetage  du  terminal  de  communication (tel que
  minicom), la  commande  d'initialisation  de  votre  modem  pour  PPP,
  appelez  le serveur PPP sur lequel vous voulez vous connecter pour une
  session PPP.

  (Remarque : a ce niveau, nous nn''eessssaayyeerroonnss ppaass d'etablir la  connexion
  PPP  -  mais  juste  d'etre sur que nous pouvons composer un numero et
  ainsi trouver eexxaacctteemmeenntt  ce  que  le  serveur  nous  envoie  pour  se
  connecter et lancer PPP).

  Pendant le processus, soit vous capturez (dans un fichier) la totalite
  du  processus  de  login   soit   vous   notez   attentivement   (_t_r_e_s
  _a_t_t_e_n_t_i_v_e_m_e_n_t)  eexxaacctteemmeenntt  ce que le serveur envoie pour savoir quand
  est le moment d'entrer votre nom utilisateur et votre mot de passe (et
  quelques  autres commandes necessaires pour etablir la connexion PPP).
  Si votre serveur utilise PAP, vous ne verrez pas de message de  login,
  mais  vous verrez a la place la (representation texte) du protocole de
  controle de liaison (une suite incoherente de  caracteres)  s'afficher
  sur votre ecran.

  Quelques mots d'avertissements :

  +o  certains serveurs sont relativement intelligents : vous pouvez vous
     connecter en utilisant un nom utilisateur /mot de passe base sur du
     texte  OU  en utilisant PAP. Ainsi, si votre fournisseur d'acces ou
     votre serveur  d'entreprise  utilise  PAP  mais  n'affiche  pas  le
     message  directement,  cela  ne signifie pas que vous avez fait une
     erreur.

  +o  certains serveurs ont besoin que vous entriez  du  texte  avant  de
     lancer _e_n_s_u_i_t_e la sequence PAP standard.

  +o  Certains  serveurs  PPP  sont  passifs - il attendent et n'envoient
     rien tant que le client avec lequel il dialogue ne  lui  envoie  un
     paquet  LCP  valide.   Si  le  serveur  PPP  sur  lequel  vous vous
     connectez fonctionne en mode  passif,  vous  ne  verrez  jamais  de
     message !

  +o  Certains  serveurs  ne  lancent  pas  PPP  tant que vous n'avez pas
     presse ENTREE - essayez donc cela si vous etes connecte et ne voyez
     pas de message !

  Il est interessant de dialoguer au moins deux fois - certains serveurs
  changent leur message d'accueil (c.-a-d. avec le temps !) chaque  fois
  que vous vous connectez. Les deux messages critiques que votre machine
  Linux doit pouvoir identifier chaque fois que vous vous vous connectez
  sont :

  +o  le message qui vous demande d'entrer votre nom utilisateur ;

  +o  le message qui vous demande d'entrer votre mot de passe ;

  Si  vous  avez  tape une commande pour lancer PPP sur le serveur, vous
  devez aussi rechercher le message que le serveur vous envoie une  fois
  que  vous  etes  connecte pour vous informer que vous pouvez entrer la
  commande pour lancer ppp.

  Si votre serveur lance automatiquement PPP, une  fois  que  vous  etes
  connecte,  vous allez voir des caracteres s'afficher sur votre ecran -
  c'est le serveur PPP qui envoie a votre machine les informations  pour
  demarrer et configurer la connexion PPP.

  Ca doit donner quelque chose comme ceci :

  ______________________________________________________________________
  ______________________________________________________________________

  (et ca ne s'arrete pas !)

  Sur  certains  systemes,  PPP  doit  etre  explicitement  lance sur le
  serveur. Cela  vient  generalement  du  fait  que  le  serveur  a  ete
  configure  pour permettre aux connexions PPP et aux connexions Shell a
  utiliser les memes paires nom utilisateur/mot de passe.  Si  c'est  le
  cas,  envoyez  cette commande lorsque vous etes connecte. Une nouvelle
  fois vous verrez des caracteres que le serveur  envoie  a  la  fin  du
  lancement de la connexion PPP.

  Si  vous  ne voyez pas directement apres la connexion (et le processus
  de connexion et le lancement du serveur PPP si besoin),  tapez  EEnnttrreeee
  pour voir si le serveur PPP demarre...

  A  ce  niveau, vous pouvez raccrocher votre modem (generalement, taper
  +++ rapidement et envoyer la commande ATHO une fois  que  votre  modem
  vous a repondu OK).

  Si  vous n'arrivez pas a faire fontionner votre modem, lisez le manuel
  du modem, les pages de manuel des programmes de communication,  et  le
  Serial HOWTO ! Une fois que vous aurez fait tout cela reprenez l'etape
  precedente.

  1100..  CCoonnffiigguurreerr llaa rreessoolluuttiioonn ddee nnoomm vveerrss ll''aaddrreessssee ((DDNNSS))

  Alors  que  les  humains  aiment  donner  des  noms  aux  choses,  les
  ordinateurs  preferent  les  nombres.  Sur  un  reseau  TCP/IP  (comme
  Internet), nous appelons les  machines  avec  un  nom  particulier  et
  chaque  machine  se trouve dans un "domaine" particulier. Par exemple,
  ma station de travail Linux s'appelle aarrcchheennllaanndd et se trouve dans  le
  domaine  iinntteerrwweefftt..ccoomm..aauu.  Son adresse lisible par un humain est donc
  archenland.interweft.com.au (qui s'appelle le FQDN -  nom  de  domaine
  totalement qualifie).

  Cependant,  pour  que  cette  machine  soit  trouvee  par  les  autres
  ordinateurs sur Internet, elle est reellement connue par  son  adresse
  IP lorsque les ordinateurs communiquent a travers Internet.

  Traduire  (resoudre)  les  noms de machines (et de domaine) en nombres
  reellement utilises sur  Internet  est  le  travail  de  machines  qui
  offrent le DNS.

  Ce qui se passe en fait :

  +o  Votre  machine  a  besoin  de  savoir  l'adresse IP d'un ordinateur
     particulier.  L'application  qui  a  besoin  de  cette  information
     interroge  le  resolveur  de  votre  PC  Linux  pour  obtenir cette
     information;

  +o  Le resolveur  interroge  le  fichier  local  /etc/hosts  et/ou  les
     serveurs  de noms des domaines qu'il connait (le comportement exact
     du resolveur est determine dans /etc/hosts.conf);

  +o  si la reponse se trouve dans  le  fichier  hosts,  la  reponse  est
     renvoyee;

  +o  si  un  serveur de nom est specifie, votre PC interroge alors cette
     machine

  +o  si la machine DNS connait deja l'adresse IP du nom demande, elle le
     retourne.  Si  elle  ne  le  connait  pas,  elle interroge un autre
     serveur de noms sur Internet pour trouver l'information. Le serveur
     de  noms  redescend  alors  les informations au resolveur qui les a
     demande - qui les envoie a l'application qui l'a interroge.

  Quand vous utilisez une connexion PPP, vous  devez  indiquer  a  votre
  machine  Linux  ou  elle  peut  recuperer l'adresse IP a partir du nom
  (resolution des adresses), comme cela vvoouuss ppoouurrrreezz uuttiilliisseerr llee nnoomm ddeess
  mmaacchhiinneess  mais  votre ordinateur pourra traduire ces derniers vers les
  adresses IP dont il a besoin pour travailler.

  Une solution est de rentrer  tous  les  hotes  avec  qui  vous  voulez
  dialoguer dans le fichier /etc/hosts (ce qui est en realite totalement
  impossible si vous etes connecte a  Internet);  une  autre  facon  est
  d'utiliser  les  adresses  IP  plutot  que  les  noms  (une  tache  de
  memorisation impossible sauf pour les petits reseaux).

  La meilleure facon est de configurer Linux  pour  qu'il  connaisse  ou
  recupere   l'information   de   conversion  des  noms  en  adresses  -
  automatiquement. Ce service est fourni par le systeme  DNS.  La  seule
  chose  a  faire est d'entrer l'adresse IP des serveurs de noms dans le
  fichier /etc/resolv.conf.

  1100..11..  LLee ffiicchhiieerr //eettcc//rreessoollvv..ccoonnff

  Le support client de votre serveur PPP doit vous fournir deux adresses
  IP  de  DNS  (un  seul  est  necessaire  -  mais  deux  permettent une
  redondance en cas d'echec).

  Comme c'est mentionne plus haut, Linux ne peut pas  definir  l'adresse
  IP  de  son  serveur  de noms comme MS Windows 95 le fait. Ainsi, vous
  devez  iinnssiisstteerr  (poliment)  aupres  de  votre  FAI  pour  qu'il  vous
  fournisse cette information !

  Votre /etc/resolv.conf doit ressembler a quelque chose comme :

  ______________________________________________________________________
  domain votre.nom.de.domaine
  nameserver 10.25.0.1
  nameserver 10.25.1.2
  ______________________________________________________________________

  Editer   ce  fichier  (le  creer  si  necessaire)  pour  contenir  les
  informations que votre FAI vous a donne. Il doit avoir les  droits  et
  les permissions comme suit :

       -rw-r--r--   1 root     root           73 Feb 19 01:46 /etc/resolv.conf

  Si  vous  avez deja configure un /etc/resolv.conf car vous etes sur un
  reseau local, ajoutez simplement les adresses IP du  serveur  DNS  PPP
  dans votre fichier existant.

  1100..22..  LLee ffiicchhiieerr //eettcc//hhoossttss..ccoonnff

  Vous  devez  egalement  verifier que votre fichier /etc/hosts.conf est
  correctement configure. Il doit ressembler a

  ______________________________________________________________________
  order hosts,bind
  multi on
  ______________________________________________________________________

  Il indique au resolveur d'utiliser les informations  du  fichier  host
  avant d'envoyer les requetes pour une resolution DNS.

  1111..  UUttiilliisseerr PPPPPP eett lleess pprriivviilleeggeess rroooott

  Puisque  PPP a besoin de configurer les peripheriques reseau, modifier
  les tables de routage entre autres, il a besoin des privileges rroooott.

  Si des utilisateurs autres que rroooott doivent lancer des connexions PPP,
  le programme pppd doit avoir l'uid rroooott :

       -rwsr-xr-x   1 root     root        95225 Jul 11 00:27 /usr/sbin/pppd

  Si  /usr/sbin/pppd  n'est  pas  defini comme cela, alors eenn eettaanntt rroooott
  taper la commande :

       chmod u+s /usr/sbin/pppd

  Cela permet a pppd de fonctionner avec les privileges root mmeemmee  i  si
  le  programme est lance par un utilisateur ordinaire. Ainsi pppd a les
  bons privileges pour configurer les interfaces reseau et les tables de
  routage.

  Les  programmes  qui  utilisent  le  uid  root sont autant de trous de
  securite potentiels  et  vous  devez  etre  extremement  vigilant  par
  rapport  aux  programmes uid root. De nombreux programmes (comme pppd)
  ont ete ecrits minutieusement pour minimiser le danger d'utiliser suit
  root,  vous  devez  donc  etre  tranquille  avec  celui-ci  (mais sans
  garanties totales).

  Selon ce que vous voulez faire de votre systeme - particulierement  si
  vous voulez qu'un utilisateur puisse initialiser une liaison PPP, vous
  devez mettre vos scripts ppp-on/off lisibles et executables  par  tout
  le  monde.   (c'est sans doute genial si vous etes le SEUL utilisateur
  du PC).

  Cependant, si vous NE voulez PAS que n'importe qui puisse  lancer  une
  connexion  PPP (par exemple, votre enfant qui a un compte sur votre PC
  Linux et que vous ne voulez pas qu'il  se  connecte  a  Internet  sans
  votre  permission),  vous devez faire un groupe PPP (en tant que root,
  editer le fichier /etc/group) et :

  +o  Rendre pppd 'suid root',  possede  par  l'utilisateur  rroooott  et  le
     groupe  PPP, avec ces nouvelles permissions sur le fichier. Il doit
     ressembler a

       -rwsr-x---   1 root     PPP        95225 Jul 11 00:27 /usr/sbin/pppd

  +o  Mettre les scripts ppp-on/off possedes par l'utilisateur rroooott et le
     groupe PPPPPP

  +o  Rendre le script ppp-on/off lisible/executable par le groupe PPP

         -rwxr-x---   1 root     PPP           587 Mar 14  1995 /usr/sbin/ppp-on
         -rwxr-x---   1 root     PPP           631 Mar 14  1995 /usr/sbin/ppp-off

  +o  Ajouter  les utilisateurs qui utilisent PPP dans le groupe PPP dans
     /etc/group

  Meme si vous faites cela, les utilisateurs  normaux  ne  pourront  pas
  fermer la connexion avec un programme ! Utiliser ppp-off necessite les
  privileges rroooott. Meme si n'importe quel utilisateur peut  eteindre  le
  modem (ou deconnecter la ligne telephonique sur un modem interne).

  Un alternative (et une meilleure methode) de faire cela est d'utiliser
  le programme sudo, qui offre une meilleure securite et vous  permettra
  de  choisir quels utilisateurs (autorises) pourrons activer/desactiver
  la  liaison  en  utilisant  des  scripts.  Utiliser  sudo  permet  aux
  utilisateurs  autorises  d'activer/desactiver  la liaison PPP de facon
  propre et securisee.

  1122..  CCoonnffiigguurreerr lleess ffiicchhiieerrss ddee ccoonnnneexxiioonn ddee PPPPPP

  Maintenant, vous devez etre connecte en tant que rroooott pour  creer  les
  repertoires  et  editer les fichiers necessaires a la configuration de
  PPP, meme si vous souhaitez que  PPP  soit  utilisable  par  tous  les
  utilisateurs.

  PPP  utilise  un  certain  nombre  de  fichiers  pour  configurer  les
  connexions.  Ceux-ci different dans leur nom et les chemins entre  PPP
  2.1.2 et 2.2.

  Pour PPP 2.1.2 les fichiers sont :

  ______________________________________________________________________
  /usr/sbin/pppd          # le programme PPP
  /usr/sbin/ppp-on        # le script d'appel/connexion
  /usr/sbin/ppp-off       # le script de deconnexion
  /etc/ppp/options        # les options utilisees pour toutes le connexions
  /etc/ppp/options.ttyXX  # les options specifiques pour ce connecter sur ce port
  ______________________________________________________________________

  Pour PPP 2.2. les fichiers sont :

  ______________________________________________________________________
  /usr/sbin/pppd                  # Le programme PPP
  /etc/ppp/scripts/ppp-on         # le script d'appel connexion
  /etc/ppp/scripts/ppp-on-dialer  # premiere partie du script d'appel
  /etc/ppp/scripts/ppp-off        # le script chat reel
  /etc/ppp/options                # options utilisees par pppd pour toutes les
                                  # connexions
  /etc/ppp/options.ttyXX          # options specifiques pour se connecter sur ce
                                  # port
  ______________________________________________________________________

  Je   rappelle   aux   utilisateurs   de   la  RedHat  Linux  que  dans
  l'installation standard de la Red Hat 4.X les scripts sont places dans
  /usr/doc/ppp-2.2.0f-2/scripts.

  Dans votre repertoire /etc, il devrait y avoir un repertoire pppppp :

       drwxrwxr-x   2 root     root         1024 Oct  9 11:01 ppp

  S'il n'existe pas - le creer avec ces possessions et permissions.

  Si le repertoire existe deja, il devrait contenir un fichier d'options
  modele appele ooppttiioonnss..ttppll. Ce fichier est inclus plus bas au cas ou il
  n'existerait pas.

  Imprimez-le  il contient une explication de presque toutes les options
  de PPP et c'est pratique de le lire en meme temps  que  les  pages  de
  manuel  de ppp).  Meme si vous pouvez utiliser ce fichier comme base a
  votre /etc/ppp/options, il est sans doute mieux de creer votre  propre
  fichier  d'options  qui  ne  contiendra  pas  tous les commentaires du
  modele - il sera bien plus court, et plus facile a lire/maintenir.

  Si vous avez une ligne serie/modems multiple (c'est typiquement le cas
  des serveurs PPP), creer un fichier general /etc/ppp/options contenant
  les options  communes  a  tous  les  ports  series  dans  lequel  vous
  supportez  la  composition  et  la reception d'appels et un fichier de
  configuration individuel pour chaque ligne  serie  sur  laquelle  vous
  etablirez la configuration individuelle necessaire pour chaque port.

  Ces   fichiers   d'options   specifiques   aux   ports   sont  appeles
  options.ttyx1, options.ttyx2 et ainsi de suite (ou  x  est  la  lettre
  appropriee pour votre port serie).

  Toutefois,  pour  une  connexion  simple,  vous  pouvez tranquillement
  utiliser le fichier /etc/ppp/options. Vous pouvez aussi mettre  toutes
  les options comme argument de la commande pppd elle-meme.

  Il  est  plus  simple  de  maintenir une configuration qui utilise les
  fichiers /etc/ppp/options.ttySx. Si vous utilisez PPP  sur  differents
  sites,  vous  pouvez  creer un fichier d'options pour chaque site dans
  /etc/ppp/options.site, et ainsi  specifier  le  fichier  d'options  en
  parametre  a la commande PPP lorsque vous vous connectez (en utilisant
  l'option file option-file de pppd dans la ligne de commande de  pppd).

  1122..11..  LLee ffiicchhiieerr ooppttiioonnss..ttppll ffoouurrnnii

  Certaines  distributions  de  PPP  semblent  avoir  perdu  le  fichier
  options.tpl, donc voici le fichier  complet.  Je  suggere  de  NE  PAS
  editer ce fichier pour creer votre fichier(s) /etc/ppp/options. Copiez
  plutot celui-ci dans un nouveau fichier et editez-le  alors.  Si  vous
  vous  trompez  dans  votre  edition,  vous pourrez toujours revenir en
  arriere en recommencant sur l'original.

  ______________________________________________________________________
  # /etc/ppp/options -*- sh -*- fichiers d'options generales pour pppd
  # cree le 13-Jul-1995 jmk
  # autodate: 01-Aug-1995
  # autotime: 19:45
  # adaptation francaise par Antoine Levavasseur levavass@efrei.fr

  # Utilise l'executable ou la commande shell specifiee pour configurer la ligne
  # serie. Ce script va en fait utiliser le programme "chat" pour appeler le
  # modem et le debut de la liaison distante ppp.
  #connect "echo Vous devez installer une commande connect."

  # Lance l'executable ou la commande shell specifie, une fois que ppp a termine
  # la liaison. Ce script va, par exemple, envoyer les commandes au modem pour le
  # faire raccrocher si les signaux de controles materiels ne sont pas
  # disponibles.
  #disconnect "chat -- \d+++\d\c OK ath0 OK"

  # table de caractere async -- 32-bit hex; chacun des bit est un caractere qui
  # doit etre echappe pour que pppd le recoive.  0x00000001 represente '\x01',
  # et 0x80000000 represente '\x1f'.
  #asyncmap 0

  # Demande a votre correspondant de s'authentifier avant de pouvoir envoyer ou
  # recevoir des paquets reseaux
  #auth

  # Utilise le controle de flux materiel (i.e. RTS/CTS) pour controler le flux
  # de donnees du port serie
  #crtscts

  # Utilise le controle de flux logiciel (i.e. XON/XOFF) pour controler le flux
  # de donnees du port serie.
  #xonxoff
  # Ajouter une route par defaut aux tables de routage systeme, pour utiliser
  # votre correspondant comme gateway, lorsque la negociation ICP reussi. Cette
  # entree est supprimee lorsque la connexion PPP se termine.
  #defaultroute

  # Specifie que certains caracteres doivent etre echapes sur la transmission
  # (en fonction de la facon dont le client souhaite qu'ils soient echappes avec
  # la table de controle async). Les caracteres qui sont echappes sont specifies
  # comme une liste de nombres hexa separes par des guillemets. La plupart des
  # caracteres peuvent etres specifies avec l'option escape, a moins que l'option
  # asyncmap soit activee puisque dans ce cas seuls les caracteres de controle
  # peuvent etres specifies. Les caracteres qui ne peuvent etre echapes ont les
  # valeurs hexa 0x20 - 0x3f ou 0x5e.
  #escape 11,13,ff

  # Ne pas utiliser les lignes de controle du modem
  #local

  # Specifie que pppd doit utiliser un verouillage du peripherique serie style
  # UUCP pour s'en assurer un acces exclusif.
  #lock

  # Utilise les lignes de controle du modem. Sur un Ultrix, cette option implique
  # un controle de flux materiel, comme avec l'option crtscts. (Cette option
  # n'est pas completement implementee.)
  #modem

  # Definit la valeur MRU [Unite de Reception Maximum] a n pour la negociation.
  # pppd demandera alors de se faire renvoyer les paquets pour au plus <n> octets
  # La valeur MRU minimale est de 128. La valeur par defaut est 1500. La valeur
  # 296 est recommandee pour les liaisons lentes (40 octets pour l'entete TCP/IP
  # + 256 octets de donnees).
  #mru 542

  # Definit le masque reseau avec <n> qui est un masque reseau 32 bit en
  # "chiffres decimaux" note (e.g 255.255.255.0).
  #netmask 255.255.255.0

  # Desactive le comportement par defaut lorsque aucune adresse IP n'est
  # specifiee, et qu'elle est determine (quand c'est possible) a partir du
  # hostname. Avec cette option, votre correspondant devra vous fournir votre
  # adresse IP locale pendant la negotiation IPCP (a moins que cela ne soit
  # specifie explicitement dans la ligne de commande ou un fichier d'options)
  #noipdefault

  # Active l'option passive sur le LCP. Avec cette option, pppd, essayera
  # d'initier la connexion; si aucune reponse n'est recue de votre correspondant,
  # pppd attendra passivement un packet LCP (au lieu de s'arreter comme il fait
  # sans cette option)
  #passive

  # Avec cette option, pppd ne va pas transmettre les paquets LCP pour
  # initialiser la connexion tant qu'un paquet LCP valide n'est pas envoye
  # par votre correspondant (comme avec l'option "passive" pour des versions
  # plus anciennes de pppd).
  #silent

  # Ne requiert et ne permet pas de negociation pour n'importe quelle option de
  # LCP et IPCP (utilise  les valeurs par defaut).
  #-all

  # Desactive la negociation de la compression d'adresses/controle (utilise les
  # reglages par defaut, i.e. le champ adresse/controle desactive)
  #-ac

  # Desactive la negociation asyncmap (utilise le reglage asyncmap par defaut,
  # i.e. echappement de tout les caracteres de controle)
  #-am

  # Ne forke pas pour devenir un processus en tache de fond (sinon pppd le fera
  # si un peripherique serie est specifie).
  #-detach

  # Desactive la negociation d'adresses IP (avec cette option, l'adresse IP
  # distante doit etre specifiee avec une option en ligne de commande ou dans
  # un fichier d'options).
  #-ip

  # Desactive la negociation des nombres magiques. Avec cette option, pppd ne
  # peut pas detecter une ligne avec une boucle.
  #-mn

  # Desactive la negociation MRU [Unite de Reception Maximum] (utilise la valeur
  # par defaut, i.e. 1500).
  #-mru

  # Desactive la negociation du protocole de compression par champ (utilise la
  # valeur par defaut, i.e le protocole de compression par champs desactive)
  #-pc

  # Impose a votre corresondant de s'autentifier avec PAP. Cela necessite une
  # authentification des DEUX COTES - NE PAS utiliser pour une liaison standard
  # authentifiee par PAP vers un FAI puisqu'il faudra que la machine du FAI
  # soit authentifie aupres de votre machine (et ce qu'elle ne pourra pas faire).
  #+pap

  # Refuse d'utiliser l'authentification avec PAP.
  #-pap
  # Oblige votre correspondant a s'authentifier avec une authentification
  # CHAP [Cryptographic Handshake Authentication Protocol]
  # Cela necessite une authentification des DEUX COTES - ne PAS utiliser pour une
  # liaison avec un FAI puisqu'il faudra que la machine du FAI
  # soit authentifie aupres de votre machine (et ce qu'elle ne pourra pas faire).
  #+chap

  # Refuse d'utiliser l'authentification avec CHAP.
  #-chap

  # Desactive la negociation de la compression de l'entete IP style Van Jacobson
  # (utilise la valeur par defaut, i.e. pas de compression).
  #-vj
  # Augmente de niveau de deboguage (comme -d). Si cette option est passee, pppd
  # enverra dans le log le contenu de tous les paquets de controle envoyes ou
  # recus dans une forme lisible. Les paquets seront envoyes dans syslog avec les
  # possibilites des daemons et du niveau de deboguage. Ces informations peuvent
  # etre diriges dans un fichier en configurant /etc/syslog.conf correctement
  # (voir syslog.conf(5)). (Si pppd est compile avec des options de deboguage
  # supplementaires, il enverra les messages de log dans local2 au lieu du
  # daemon).
  #debug

  # Ouvre le nom de domaine <d> pour permettre l'authentification de nom d'hote
  # local. Par exemple, si gethostname() retourne le nom porsche,
  # mais le nom de domaine qualifie est porsche.Quotron.COM, vous devriez
  # utiliser l'option domain pour mettre le nom de domaine a Quotron.COM.
  #domain <d>

  # Active le code de deboguage du pilote PPP au niveau du noyau. L'argument n
  # est un nombre qui est la somme des valeurs suivantes : 1 active les messages
  # de deboguage generaux, 2 pour que le contenu des paquets recus soient
  # affiches, et 4 pour que le contenu des paquets envoyes soient affiches.
  #kdebug n

  # Configure la valeur MTU [Unitee de Transmission Maximum] a <n>. A moins
  # que votre correspondant ne demande une valeur plus petite lors de la
  # negociation MRU, pppd demande que les codes reseaux du noyau envoie des
  # paquets d'au plus n octets dans l'interface reseau PPP.
  #mtu <n>

  # Definit le nom du systeme local avec <n> dans un but d'authentification.
  # Cela doit certainement avoir ete configure avec votre nom utilisateur de votre
  # FAI si vous utilisez PAP/CHAP.
  #name <n>

  # Definit le nom utilisateur avec <u> pour l'authentification avec le
  # correspondant utilisant PAP .
  # Ne pas utiliser si vous utilisez le 'name' au-dessus !
  #user <u>

  # Force l'utilisation du nom d'hote comme nom du systeme local pour les
  # authentification (masque l'option name).
  #usehostname

  # Configure le nom du systeme distant pour les authentifications a <n>.
  #remotename <n>

  # Ajoute une entree au systeme des tables ARP [Protocole de Resolution
  # d'Adresses] avec l'adresse IP de votre correspondant et l'adresse Ethernet
  # de ce syteme.
  #proxyarp

  # Utilise le systeme de base de donnes de mots de passe pour l'authentification
  # de votre correspondant avec PAP.
  #login
  # Si cette option est passee, pppd va envoyer une requete-echo LCP a votre
  # correspondant toutes les n secondes. Sous Linux, une requete-echo est envoyee
  # lorsqu'aucun paquet n'a ete recu du correspondant depuis n secondes.
  # Normalement, le correspondant doit repondre a la requete-echo en envoyant une
  # reponse-echo. Cette option peut etre utilise avec l'option lcp-echo-failure
  # pour detecter que le correspondant n'est plus connecte.
  #lcp-echo-interval <n>

  # Si cette option est passe, pppd va supposer que le correspondant est mort
  # si n requetes-echo LCP sont envoyees sans recevoir de reponse-echo LCP
  # valide. Si cela arrive, pppd va terminer la connexion. Utiliser cette option
  # necessite une valeur non nulle pour le parametre lcp-echo-interval.
  # Cette option peut etre utilisee pour permettre a pppd de terminer une fois
  # qu'une connexion pppd ait ete cassee (c.-a-d. le modem a ete raccroche) dans
  # les situations ou aucune ligne de controle materiel du modem n'est
  # disponibles
  #lcp-echo-failure <n>

  # Definit l'intervale relance LCP (delay de retransmission) a <n> secondes
  # (defaut 3).
  #lcp-restart <n>

  # Definit le nombre maximal de transmission de requete-fin de LCP a <n>
  # (defaut 3).
  #lcp-max-terminate <n>

  # Definit la nombre maximum de transmission de requete-configure LCP a <n>
  # (defaut 10).
  # Certains serveurs PPP sont lents a demarrer. Vous devrez alors augmenter
  # ceci si vous avez des erreurs 'serial line looped back' et que vous etes
  # SUR que vous etes connecte correctement et que PPP doit demarrer sur le
  # serveur.
  #lcp-max-configure <n>

  # Definit le nombre maximum de retours LCP configure-NAKs avant de commencer
  # a envoyer des configure-Rejects a la place a <n> (defaut 10).
  #lcp-max-failure <n>

  # Definit l'intervale de relancce de IPCP (temps de retransmission) a <n>
  # secondes (defaut 3).
  #ipcp-restart <n>

  # Definit le nombre maximum de transmission de requete-fin IPCP a <n>
  # (defaut 3).
  #ipcp-max-terminate <n>

  # Definit la nombre maximum de transmission de requete-configure IPCP a <n>
  # (defaut 10).
  #ipcp-max-configure <n>

  # Definit la nombre maximem de retour configure-NAKs IPCP avant de commencer
  # a envoyer des configure-Rejects a la place a <n> (defaut 10).
  #ipcp-max-failure <n>

  # Definit l'intervalle de relance PAP (temps de retransmission) a <n> secondes
  # (defaut 3).
  #pap-restart <n>

  # Definit le nombre maximum de transmission de requete-d'authentification PAP
  # a n (defaut 10)
  #pap-max-authreq <n>

  # Definit les intervales de relance de CHAP (temps de retransmission) a <n>
  # secondes (defaut 3).
  #chap-restart <n>

  # Definit le nombre maximal d'essai de  transmission de CHAP a <n>
  # (defaut 10).
  #chap-max-challenge

  # Si cette option est passee, pppd va relancer votre correspondant toutes les
  # <n> secondes.
  #chap-interval <n>

  # Avec cette option, pppd va accepter la proposition de votre correspondant
  # pour votre adresse IP locale, meme si l'adresse IP est specifiee en option.
  #ipcp-accept-local

  # Avec cette option, pppd va accepter la proposition d'adresse IP (distante),
  # meme si l'adresse distante est specifiee en option.
  #ipcp-accept-remote
  ______________________________________________________________________

  1122..22..  QQuueelllleess ooppttiioonnss ddooiiss--jjee uuttiilliisseerr ?? ((SSaannss PPAAPP//CCHHAAPP))

  En fait,  comme  toujours,  ca  depend.  Les  options  specifiees  ici
  devraient marcher avec la plupart des serveurs.

  Cependant,   si   ca   NE  fonctionne  PAS  LISEZ  LE  FICHIER  MODELE
  (/etc/ppp/options.tpl) eett les pages de manuel de pppd  eett  demandez  a
  votre  administrateur/support  client  qui fait marcher le serveur sur
  lequel vous vous connectez.

  Je rappelle egalement que  les  scripts  de  connexion  presentes  ici
  utilisent  egalement  des  options  en  ligne de commande pour pppd et
  rendre les choses plus facilement modifiables.

  ______________________________________________________________________
  # /etc/ppp/options (NO PAP/CHAP)
  #
  # Empeche pppd de forker en tache de fond
  -detach
  #
  # utilise les lignes de controle du modem
  modem
  # utilise les verrous style uucp pour assurer une utilisation exclusive du
  # port serie
  lock
  # utilise le flux de controle materiel
  crtscts
  # creer une route par defaut pour cette connexion dans la table de routage
  defaultroute
  # ne configure aucune sequence de controle echapee
  asyncmap 0
  # utlise une taille maximale de paquet transmis de 552 octets
  mtu 552
  # utilise une taille maximale de paquets recus de 552 octets.
  mru 552
  #
  #-------FIN D'EXEMPLE /etc/ppp/options (sans PAP/CHAP)
  ______________________________________________________________________

  1133..  SSii vvoottrree sseerrvveeuurr PPPPPP uuttiilliissee PPAAPP ((PPaasssswwoorrdd AAuutthheennttiiffiiccaattiioonn  PPrroo--
  ttooccooll))

  Si  le  serveur  sur  lequel  vous  vous   connectez   a   besoin   de
  l'authentification  PAP  ou  CHAP,  vous  avez  un  petit  peu plus de
  travail.

  Pour les fichiers de  configuration  precedents,  ajouter  les  lignes
  suivantes :

  ______________________________________________________________________
  #
  # force pppd a utiliser le nom utilisateur de FAI comme 'nom d'hote' pendant
  # le processus d'authentification
  name <le nom de votre FAI>       # vous devez editer cette ligne
  #
  # Si vous avez un *serveur* PPP vous devez forcer PAP ou CHAP en decommentant
  # l'une des lignes suivantes. Ne pas les utiliser si vous etes un client qui
  # se connecte sur un serveur PPP (meme s'il utilise PAP ou CHAP) puisque cela
  # forcera le serveur a s'authentifier aupres de votre machine (alors que cela
  # ne sera certainement pas possible - et la liaison echouera).
  #+chap
  #+pap
  #
  # Si vous utilisez des secrets ENCRYPTES dans le fichier /etc/ppp/pap-secrets,
  # alors decommentez la ligne suivante.
  # Remarque: ce n'est pas pareil que d'utiliser les mots de passe MS encryptes
  # comme ils peuvent etres avec MS RAS sur Windows NT.
  #+papcrypt
  ______________________________________________________________________

  1133..11..  UUttiilliisseerr MMSSCCHHAAPP

  Microsoft  Windows  NT  RAS  peut  etre  configure  pour  utiliser une
  variation particuliere  de  CHAP  (Challenge/Handshake  Authentication
  Protocol).  Dans l'archive des sources de PPP, vous devriez trouver un
  fichier appele README.MSCHAP80 qui parle de cela.

  Vous pouvez determiner si  le  serveur  demande  une  authentification
  utilisant  ce  protocole  en  activant  le  deboguage dans pppd. Si le
  serveur demande une authentification MS CHAP, vous  devriez  voir  les
  lignes

  ______________________________________________________________________
  rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap 80> <magic 0x46a3>]
  ______________________________________________________________________

  L'information critique ici est aauutthh cchhaapp 8800.

  Pour  utiliser MS CHAP, vous devez recompiler pppd. Veuillez consulter
  les instructions dans le fichier README.MSCHAP80 des  sources  de  PPP
  pour  obtenir  les  instructions sur la facon de compiler en utilisant
  cette variante.

  Vous devez remarquer que  le  code  present  supporte  uniquement  des
  clients  Linux  PPP  connectes  sur  un serveur MS Windows NT. Mais NE
  supporte PAS la configuration d'un serveur  PPP  Linux  pour  utiliser
  l'authentification MSCHAP80 pour les clients.

  1133..22..  LLee ffiicchhiieerr ddee sseeccrreettss ddee PPAAPP//CCHHAAPP

  Si  vous  utilisez  l'authentification  PAP  ou CHAP, alors vous devez
  creer les fichiers . Ce sont

  ______________________________________________________________________
  /etc/ppp/pap-secrets
  /etc/ppp/chap-secrets
  ______________________________________________________________________

  Il doivent etre possedes  par  rroooott,  le  groupe  rroooott  et  avoir  les
  permissions 740 pour la securite.

  Le  premier  point a remarquer au sujet de PAP et CHAP est qu'ils sont
  concus pour authentifier lleess oorrddiinnaatteeuurrss mais pas lleess uuttiilliissaatteeuurrss

  "Humm? Qu'est ce que ca change ? " Me demandez vous.

  He bien, une fois que l'ordinateur a etabli une connexion PPP avec  le
  serveur,  nn''iimmppoorrttee  qquueell  utilisateur  de votre systeme peut utiliser
  cette connexion - pas  seulement  vous.  C'est  pourquoi  vous  pouvez
  configurer  un  reseau  a large domaine en reliant deux reseaux locaux
  avec PPP.

  PAP peut (et CHAP DDOOIITT) demander une authentification bbiiddiirreeccttiioonnnneellllee
  -  c'est  un  nom  et  un  code  secret qui est necessaire pour chaque
  ordinateur avec lequel il est implique. Cependant,  ce  n'est  pas  la
  facon   dont   tous   les   serveurs   PPP  fonctionnent  pour  offrir
  l'authentification PAP des appels PPP.

  Il a ete  dit  que  votre  FAI  vous  donnerait  certainement  un  nom
  utilisateur  et  un mot de passe pour vous permettre de vous connecter
  sur son systeme et  ensuite  sur  Internet.  Votre  FAI  se  fiche  de
  connaitre  le nom de votre ordinateur, vous devrez donc utiliser votre
  nom utilisateur chez votre FAI comme nom pour votre machine.

  Cela est possible avec l'option name username de pppd. Donc,  si  vous
  utilisez le nom donne par votre FAI, ajoutez la ligne

  ______________________________________________________________________
  name votre_utilisateur nom_chez_votre_FAI
  ______________________________________________________________________

  dans votre fichier /etc/ppp/options.

  Techniquement,    vous    devrez   utiliser   user   votre_utilisateur
  nom_chez_votre_FAI pour PAP, mais pppd  est  suffisamment  intelligent
  pour  interpreter l'option name comme user si necessaire pour utiliser
  PAP. L'avantage d'utiliser l'option name  est  qu'elle  est  egalement
  valide pour CHAP.

  Puisque PAP permet d'authentifier les oorrddiinnaatteeuurrss, techniquement, vous
  devez aussi specifier un nom d'ordinateur distant. Toutefois, comme de
  nombreuses  personnes  ont plus d'un seul FAI, vous pouvez utiliser un
  caractere generique (*) pour  le  nom  d'ordinateur  distant  dans  le
  fichier de secrets.

  Il  est aussi interessant de remarquer que de nombreux FAI utilise des
  banques de modems  multiples  connectes  sur  differents  serveurs  de
  terminaux  -  tous ont un nom different, mais sont accessibles avec un
  seul numero d'appel. Il  peut  alors  etre  difficile  dans  certaines
  circonstances  de  savoir  a  l'avance quel est le nom de l'ordinateur
  distant, puisque cela dependra du serveur de terminal sur lequel  vous
  vous connecterez !

  1133..33..  LLee ffiicchhiieerr ddee sseeccrreettss ddee PPAAPP

  Le fichier /etc/ppp/pap-secrets ressemble a

  ______________________________________________________________________
  # Authentication Secrete avec PAP
  # client        serveur       secret     adresses_IP_locale_acceptable
  ______________________________________________________________________

  Les quatre champs sont separes par des espaces et le dernier peut etre
  omis (c'est l'adresse dynamique ou sans doute statique de votre  FAI).

  Supposons  que  votre FAI vous ait donne un nom utilisateur fred et un
  mot  de  passe  flintstone  vous  aurez  l'option   name   fred   dans
  /etc/ppp/options[.ttySx]  et  vous  configurerez  votre  /etc/ppp/pap-
  secrets comme suit

  ______________________________________________________________________
  # Authentication Secrete avec PAP
  # client        serveur       secret     adresses_IP_locale_acceptable
  fred            *       flintstone
  ______________________________________________________________________

  Cela signifie que pour une machine locale fred  (pppd  lui  impose  de
  s'appeler  comme cela meme si ca n'est pas son nom de machine reel) et
  pour nn''iimmppoorrttee  qquueell  serveur,  utiliser  le  mot  de  passe  (secret)
  "flintstone".

  Remarquez que vous ne devez pas specifier d'adresse IP locale, a moins
  que vous ne deviez FORCER une adresse  locale  statique  particuliere.
  Meme  si  vous  essayez  cette  option,  il y a peu de chances qu'elle
  marche puisque la plupart  des  serveurs  PPP  (pour  des  raisons  de
  securite) ne permettent pas au systeme distant de configurer l'adresse
  IP qu'ils recoivent.

  1133..44..  LLee ffiicchhiieerr ddee sseeccrreettss ddee CCHHAAPP

  Cette methode necessite une methode authentification mutuelle -  c'est
  a  dire  que  vous  devez  permettre a votre machine d'authentifier le
  serveur distant EETT le serveur distant d'authentifier votre machine.

  Donc, si votre machine  s'appelle  fred  et  que  le  serveur  distant
  s'appelle  barney il faut definir sur fred name fred remotename barney
  et sur la machine  distante  name  barney  remotename  fred  dans  les
  fichiers /etc/ppp/options.ttySx respectifs.

  Le fichier /etc/chap-secrets de fred ressemblera a

  ______________________________________________________________________
  # Authentication Secrete avec CHAP
  # client        serveur       secret     adresses_IP_locale_acceptable
  fred            barney      flintstone
  barney          fred        wilma
  ______________________________________________________________________

  et pour barney

  ______________________________________________________________________
  # Authentication Secrete avec CHAP
  # client        serveur       secret     adresses_IP_locale_acceptable
  barney          fred    flintstone
  fred            barney  wilma
  ______________________________________________________________________

  Remarquez  en  particulier  que  les  deux  machines doivent avoir des
  entrees pour une authentification bidirectionnelle. Cela permet  a  la
  machine  locale  d'authentifier  elle-meme  la  machine distante EETT la
  machine distante d'authentifier elle-meme la machine locale.

  1133..55..  SSuuppppoorrtteerr pplluussiieeuurrss ccoonnnneexxiioonnss aauutthheennttiiffiieeeess aavveecc PPAAPP

  Certains  utilisateurs  ont  plus  d'un  serveur  sur  lesquels ils se
  connectent  en  utilisant  PAP.  A  partir  du  moment  ou  votre  nom
  utilisateur est different sur chacune des machines sur lesquelles vous
  vous connectez, il n'y a pas de probleme.

  Mais, nombreux sont les utilisateurs qui ont le meme  nom  utilisateur
  sur deux (ou plus, voire meme tous les) systemes ou ils se connectent.
  Le  probleme  revient  donc  a  choisir  la  bonne  ligne  du  fichier
  /etc/ppp/pap-secrets.

  Comme  vous  pouvez  le supposer, PPP fournit un mecanisme pour regler
  cela.  PPP permet de definir un  <<  pseudonyme  >>  pour  le  serveur
  distant  final  de  la  connexion  en utilisant l'option rreemmootteennaammee de
  pppd.

  Supposons que vous vous connectiez sur deux serveurs PPP utilisant  le
  meme  nom  utilisateur  fred.  Vous  configurerez  votre /etc/ppp/pap-
  secrets avec

  ______________________________________________________________________
  fred    pppserveur1      barney
  fred    pppserveur2      wilma
  ______________________________________________________________________

  Maintenant, pour se connecter sur  pppserveur1  vous  utiliserez  name
  fred  remotename pppserver1 dans votre ppp-options et pour pppserveur2
  name fred remotename pppserver2.

  Puisque vous pouvez selectionner le fichier d'options a utiliser  avec
  pppd  en  utilisant  l'option  file  filename,  vous pouvez definir un
  script pour se connecter sur chacun de vos serveurs PPP, qui  choisira
  le fichier d'options correct et mettra la bonne option remotename.

  1144..  CCoonnffiigguurreerr uunnee ccoonnnneexxiioonn PPPPPP aa llaa mmaaiinn

  Maintenant  que  vous  avez  cree  les  fichiers  /etc/ppp/options  et
  /etc/resolv.conf (et si besoin le fichier  /etc/ppp/pap/chap-secrets),
  vous  pouvez  tester les parametres en etablissant une connexion PPP a
  la  main.  (Une  fois  que  la  connexion  manuelle   marchera,   nous
  automatiserons le processus).

  Pour  ce  faire,  votre  programme  de communication doit pouvoir etre
  quitte sans reinitialiser le modem. Minicom peut le faire  avec  Alt-Q
  (ou dans les versions plus ancienne de minicom CTRL-A Q)

  Verifiez que vous etes rroooott.

  Lancez le programme de communication (minicom par exemple), appelez le
  serveur PPP et connectez-vous comme d'habitude. Si  vous  avez  besoin
  d'envoyer  une  commande  pour demarrer PPP sur le serveur, faites-le.
  Vous devriez maintenant voir les messages que vous aviez deja vus.

  Si vous utilisez PAP ou CHAP, se connecter simplement sur  le  systeme
  distant  devrait  demarrer  PPP  et  vous  devriez voir des caracteres
  s'afficher sans toutefois se connecter (meme si ca peut ne pas marcher
  sur  certains  serveurs  -  essayez  alors d'appuyer sur EEnnttrreeee et les
  caracteres devraient s'afficher).

  Maintenant quittez le programme de communication _s_a_n_s  _i_n_i_t_i_a_l_i_s_e_r  _l_e
  _m_o_d_e_m  (ALT-Q  ou  CTRL-A  Q  dans minicom) et au message d'accueil de
  Linux (etant rroooott) tapez

  ______________________________________________________________________
  pppd -d -detach /dev/ttySx 38400 &
  ______________________________________________________________________

  L'option -d active le deboguage - la conversation de demarrage  de  la
  connexion  ppp  sera  retranscrite dans votre journal systeme - ce qui
  est tres utile si des problemes apparaissent.

  Les lumieres de votre  modem  devraient  alors  clignoter  puisque  la
  connexion PPP est etablie. Cela peut prendre un peu de temps avant que
  la connexion soit terminee.

  A ce niveau,  vous  pouver  afficher  l'interface  PPP  en  tapant  la
  commande :

  ______________________________________________________________________
  ifconfig
  ______________________________________________________________________

  En plus des eventuels peripheriques loopback et Ethernet, vous devriez
  avoir quelque chose qui ressemble a :

  ______________________________________________________________________
  ppp0     Link encap:Point-Point Protocol
           inet addr:10.144.153.104  P-t-P:10.144.153.51 Mask:255.255.255.0
           UP POINTOPOINT RUNNING  MTU:552  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0
           TX packets:0 errors:0 dropped:0 overruns:0
  ______________________________________________________________________

  Ou

  +o  inet addr:10.144.153.10 est l'adresse IP de votre connexion.

  +o  P-t-P:10.144.153.5 est l'adresse IP du serveur.

  (Naturellement, ifconfig ne renvoie pas ces nombres la, mais ceux  qui
  sont utilises par le serveur PPP.)

  Remarque  :  ifconfig  indique  egalement que votre liaison fonctionne
  correctement !

  Si vous aucun peripherique PPP n'est affiche ou quelque chose du genre

  ______________________________________________________________________
  ppp0     Link encap:Point-Point Protocol
           inet addr:0.0.0.0  P-t-P:0.0.0.0  Mask:0.0.0.0
           POINTOPOINT  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0
           TX packets:0 errors:0 dropped:0 overruns:0
  ______________________________________________________________________

  Votre  liaison  PPP n'est pas correcte... voir la section suivante sur
  le debuggage !
  Vous devez aussi pouvoir voir une route vers l'hote distant  (et  meme
  plus).  Pour cela, entrez la commande

  ______________________________________________________________________
  route -n
  ______________________________________________________________________

  Vous devriez obtenir quelque chose comme :

  ______________________________________________________________________
  Kernel routing table
  Destination     Gateway         Genmask         Flags MSS    Window Use Iface
  10.144.153.3    *               255.255.255.255 UH    1500   0        1 ppp0
  127.0.0.0       *               255.0.0.0       U     3584   0       11 lo
  10.0.0.0        *               255.0.0.0       U     1500   0       35 eth0
  default         10.144.153.3    *               UG    1500   0        5 ppp0
  ______________________________________________________________________

  Ce  qui  est  important  ici, c'est d'avoir DEUX entrees pointant vers
  votre interface ppp.

  La premiere est une route d'hote (indique par le  drapeau  H)  et  qui
  permet de voir l'hote sur lequel vous etes connecte - mais pas plus.

  La seconde est la route par defaut (etablie en donnant a pppd l'option
  defaultroute).  C'est  cette  route  qui  indique  a  votre  PC  Linux
  d'envoyer  tous  les paquets qui ne sont pas destines a vos interfaces
  Ethernet - vers lesquelles vous avez des routes reseau  specifiques  -
  au  serveur  PPP  lui-meme.   Le  serveur PPP est alors responsable de
  router vos paquets vers Internet et de vous renvoyer les paquets  chez
  vous.

  Si  vous  ne voyez pas une table de routage avec deux entrees, quelque
  chose ne marche pas. En  particulier  si  votre  syslog  contient  des
  messages  indiquant que pppd ne remplace pas la route par defaut, vous
  devez avoir une route  par  defaut  qui  pointe  sur  votre  interface
  Ethernet  -  qui DDOOIITT etre remplacee par une route reseau specifique :
  VVOOUUSS NNEE PPOOUUVVEEZZ AAVVOOIIRR QQUU''UUNNEE SSEEUULLEE RROOUUTTEE PPAARR DDEEFFAAUUTT !!!!!!

  Vous devez explorer vos fichiers  d'initialisation  de  votre  systeme
  pour  trouver  ou  est  configure  votre  route  par defaut (elle doit
  utiliser la commande route add default...). Changer cette commande par
  quelque chose du genre route add net ....

  Maintenant  testez  la  liaison en 'pingant' le serveur a l'adresse IP
  affiche par ifconfig, comme suit :

  ______________________________________________________________________
  ping 10.144.153.51
  ______________________________________________________________________

  Vous devriez obtenir

  ______________________________________________________________________
  PING 10.144.153.51 (10.144.153.51): 56 data bytes
  64 bytes from 10.144.153.51: icmp_seq=0 ttl=255 time=328.3 ms
  64 bytes from 10.144.153.51: icmp_seq=1 ttl=255 time=190.5 ms
  64 bytes from 10.144.153.51: icmp_seq=2 ttl=255 time=187.5 ms
  64 bytes from 10.144.153.51: icmp_seq=3 ttl=255 time=170.7 ms
  ______________________________________________________________________

  Ce listing doit continuer sans jamais s'arreter  -  pour  le  stopper,
  taper CTRL C, vous recevrez alors des informations complementaires :

  ______________________________________________________________________
  --- 10.144.153.51 ping statistics ---
  4 packets transmitted, 4 packets received, 0% packet loss
  round-trip min/avg/max = 170.7/219.2/328.3 ms
  ______________________________________________________________________

  Jusqu'ici tout va bien, jusqu'ici tout va bien.

  Maintenant, essayez de pinger un nom d'hote (pas le nom du serveur PPP
  lui-meme) mais un hote d'un autre site dont vous SAVEZ qu'il  y  a  de
  tres fortes chances qu'il marche...). Par exemple

  ______________________________________________________________________
  ping sunsite.unc.edu
  ______________________________________________________________________

   _o_u _l_i_p_6_._f_r

  Dans  ce  cas,  il  va  y  avoir  une  petite pause le temps que Linux
  obtienne l'adresse IP du nom de hote que vous avez 'pinge' par le  DNS
  que  vous  avez  specifie dans le /etc/resolv.conf - ne vous inquietez
  pas (les lumieres de votre  modem  devraient  clignoter).  Rapidement,
  vous devriez avoir l'affichage suivant

  ______________________________________________________________________
   PING sunsite.unc.edu (152.2.254.81): 56 data bytes
  64 bytes from 152.2.254.81: icmp_seq=0 ttl=254 time=190.1 ms
  64 bytes from 152.2.254.81: icmp_seq=1 ttl=254 time=180.6 ms
  64 bytes from 152.2.254.81: icmp_seq=2 ttl=254 time=169.8 ms
  64 bytes from 152.2.254.81: icmp_seq=3 ttl=254 time=170.6 ms
  64 bytes from 152.2.254.81: icmp_seq=4 ttl=254 time=170.6 ms
  ______________________________________________________________________

  La   encore,   arretez   le   en   tapant  CTRL  C  pour  obtenir  les
  statistiques...

  ______________________________________________________________________
  --- sunsite.unc.edu ping statistics ---
  5 packets transmitted, 5 packets received, 0% packet loss
  round-trip min/avg/max = 169.8/176.3/190.1 ms
  ______________________________________________________________________

  Si vous n'avez pas de reponse, essayer de pinger  l'adresse  de  votre
  serveur  DNS  de  votre  FAI. Si vous n'avez pas de resultat, alors il
  doit y avoir un probleme avec votre /etc/resolv.conf.

  Si ca ne fonctionne pas, vous devez avoir un probleme de  routage,  ou
  votre  FAI  a  un  probleme  a vous renvoyer les paquets. Verifiez les
  tables de routages presentees plus haut et si tout est  OK,  contacter
  votre FAI. Si cela se trouve apres votre FAI, alors le probleme est de
  votre cote.

  Si tout marche correctement, fermez la connexion en tapant

  ______________________________________________________________________
  ppp-off
  ______________________________________________________________________

  Apres une courte pause, le modem devrait raccrocher.

  Si ca ne marche pas, soit vous eteignez votre modem, soit vous  lancez
  votre  programme de communication et vous interrompez votre modem avec
  +++ puis vous raccrochez avec ATH0 quand vous recevez le message OK de
  votre modem.

  Vous devez egalement effacer le fichier cree par pppd

  ______________________________________________________________________
  rm -f /var/lock/LCK..ttySx
  ______________________________________________________________________

  1155..  AAuuttoommaattiisseerr vvoottrree ccoonnnneexxiioonn -- CCrreeeerr lleess ssccrriippttss ddee ccoonnnneexxiioonn

  Meme si vous pouvez continuer a vous connecter a la main comme  montre
  ci-dessus il est plus sympa de faire quelques scripts pour automatiser
  tout ca.

  Quelques scripts vont automatiser la connexion et le lancement de PPP,
  vous n'aurez alors plus qu'a envoyer une seule commande (en etant rroooott
  ou membre du groupe PPP) pour lancer votre connexion.

  1155..11..  SSccrriippttss  ddee  ccoonnnneexxiioonn  ppoouurr  ll''aauutthheennttiiffiiccaattiioonn  nnoomm  uuttiilliissaa--
  tteeuurr//mmoott ddee ppaassssee

  Si votre FAI n'a pas besoin  d'utiliser  PAP/CHAP,  ces  scripts  sont
  faits pour vous !
  Si  le  paquetage ppp est correctement installe, vous devez avoir deux
  fichiers d'exemple. Pour PPP 2.1.2 il sont dans /usr/sbin et pour  PPP
  2.2 il sont dans /etc/ppp/scripts. Ils s'appellent

  pour PPP-2.1.2

       ppp-on
       ppp-off

  et pour PPP 2.2

       ppp-off
       ppp-on
       ppp-on-dialer

  Maintenant,  si  vous  utilisez PPP 2.1.2, je vous presse fermement de
  detruire ces fichiers d'exemple. Il y a pleins de problemes potentiels
  avec  ceux-ci  -  et ne me dites pas qu'ils marchent correctement - je
  les ai egalement utilise pendant des annees (et les recommandait  meme
  dans la premiere version de ce HOWTO) !

  Pour  les  utilisateurs de PPP 2.1.2, voici de BIEN MEILLEURS modeles,
  pris dans la distribution 2.2 de PPP. Je vous conseille de les  copier
  et d'utiliser ces scripts a la place des anciens de PPP-2.1.2.

  1155..22..  LLee ssccrriipptt pppppp--oonn

  C'est le premier des DEUX scripts qui lance la connexion.

  ______________________________________________________________________
  #!/bin/sh
  #
  # Script pour initialiser une connexion PPP. C'est la premiere partie de deux
  # scripts. Ce ne sont pas des scripts securises, puisque les codes sont
  # visibles avec la commande 'ps'. Cependant ils sont simples.
  #
  # Ce sont des parametres a changer selon les besoins
  TELEPHONE=555-1212    # Le numero de telephone de la connexion
  ACCOUNT=george        # Le nom du compte (comme dans 'George Burns')
  PASSWORD=gracie       # Le mot de passe du compte (et 'Gracie Allen')
  LOCAL_IP=0.0.0.0      # L'adresse IP locale si elle est connue Dynamic = 0.0.0.0
  REMOTE_IP=0.0.0.0     # Adresse IP distante. Normally 0.0.0.0
  NETMASK=255.255.255.0 # Le masque reseau si besoin
  #
  # Les exporter pour qu'ils soit disponible avec 'ppp-on-dialer'
  export TELEPHONE ACCOUNT PASSWORD
  #
  # C'est l'emplacement du script qui compose le numero et se connecte.
  # Utilisez les noms de fichiers absolus, car la variable $PATH n'est pas
  # utilisee avec l'option connect. (Faire ca en etant 'root' entraine un
  # trou de securite.)
  #
  DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
  #
  # Commencer la connexion
  #
  #
  exec /usr/sbin/pppd debug /dev/ttySx 38400 \
          $LOCAL_IP:$REMOTE_IP \
          connect $DIALER_SCRIPT
  ______________________________________________________________________

  Voici le script ppp-on-dialer :

  ______________________________________________________________________
  #!/bin/sh
  #
  # C'est la deuxieme partie du script ppp-on. Il contient le protocole de
  # connexion de la connexion desiree.
  #
  /usr/sbin/chat -v                                                 \
          TIMEOUT         3                               \
          ABORT           '\nBUSY\r'                      \
          ABORT           '\nNO ANSWER\r'                 \
          ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
          ''              \rAT                            \
          'OK-+++\c-OK'   ATH0                            \
          TIMEOUT         30                              \
          OK              ATDT$TELEPHONE                  \
          CONNECT         ''                              \
          ogin:--ogin:    $ACCOUNT                        \
          assword:        $PASSWORD
  ______________________________________________________________________

  Avec PPP-2.2, le script ppp-off ressemble a :

  ______________________________________________________________________
  #!/bin/sh
  ######################################################################
  #
  # Determine le peripherique a terminer.
  #
  if [ "$1" = "" ]; then
          DEVICE=ppp0
  else
          DEVICE=$1
  fi

  ######################################################################
  #
  # Si le fichier pid ppp0 est present alors le programme est lance. Le stopper.
  if [ -r /var/run/$DEVICE.pid ]; then
          kill -INT `cat /var/run/$DEVICE.pid`
  #
  # Si le kill ne marche pas, alors il n'y a pas de processus lance pour ce pid.
  # Cela peut signifier que le fichier de lock a ete laisse. Vous souhaitez
  # peut-etre detruire le fichier de lock en meme temps.
          if [ ! "$?" = "0" ]; then
                  rm -f /var/run/$DEVICE.pid
                  echo "ERROR: Removed stale pid file"
                  exit 1
          fi
  #
  # Succes. pppd a enlever tout ce qu'il avait cree.
          echo "PPP link to $DEVICE terminated."
          exit 0
  fi
  #
  # Le processus ppp ne marche pas pour ppp0
  echo "ERROR: PPP link is not active on $DEVICE"
  exit 1
  ______________________________________________________________________

  1155..33..  EEddiitteerr lleess ssccrriippttss ddee ddeemmaarrrraaggee ddee PPPPPP ffoouurrnniiss

  Puisque  les  nouveaux  scripts  sont en deux parties, nous allons les
  editer chacun leur tour.

  1155..33..11..  LLee ssccrriipptt pppppp--oonn

  Vous devez editer ces fichiers pour contenir VOTRE nom utilisateur  de
  votre  FAI, VOTRE mot de passe de votre FAI, et le numero de telephone
  de votre FAI.

  Chacune des lignes ressemblant a TELEPHONE= definissent  une  variable
  du  shell  contenant les informations a droite du '=' (mise a part les
  commentaires evidemment). Editer donc toutes les lignes de ce  fichier
  pour qu'il corresponde a votre FAI et votre connexion.

  De plus, si vous configurez l'adresse IP (si vous avez besoin) dans le
  fichier /etc/ppp/options, DETRUISEZ les lignes mentionnant

  ______________________________________________________________________
  $LOCAL_IP:$REMOTE_IP \
  ______________________________________________________________________

  Assurez-vous egalement que la variable shell DIALER_SCRIPT pointe  sur
  le  chemin  complet  du  script  d'appel  qui sera reellement utilise.
  Ainsi, si vous deplacez ou renommez ce script, assurez-vous  que  vous
  modifier correctement cette ligne dans le script ppp-on !

  1155..33..22..  LLee ssccrriipptt pppppp--oonn--ddiiaalleerr

  C'est le deuxieme des scripts qui lance votre liaison PPP.

  Remarque : un script chat est normalement sur une ligne complete.  Les
  backslashs sont utilises pour permettre a la ligne de se repartir  sur
  plusieurs  lignes  physiques  (pour une lisibilite plus humaine) et ne
  font pas partie du script lui-meme.

  Cependant, il est tres utile de le regarder en detail, comme cela nous
  comprenons ce qu'il est reellement suppose faire !

  1155..44..  CCee qquuee ssccrriipptt CChhaatt ssiiggnniiffiiee......

  Un  script  chat est une sequence de paires de "chaines d'attentes" et
  de "chaines d'envoi ". En particulier, remarquez  que  nous  attendons
  TTOOUUJJOOUURRSS quelque chose avant d'envoyer quoi que ce soit.

  Si nous envoyons quelque chose SSAANNSS avoir rien recu avant, nous devons
  attendre une chaine vide avant (indiquee par un  "")  Et  de  la  meme
  maniere  attendre quelque chose sans avoir rien envoye ! Ainsi, si les
  chaine consistent en quelques mots, (c.-a-d. NO CARRIER),  vous  devez
  entourez  les  chaines  par des quotes pour qu'elles soient vues comme
  une seule entite par chat.

  La ligne chat de notre modele est :

  ______________________________________________________________________
  exec /usr/sbin/chat -v
  ______________________________________________________________________

  Invoque chat, le -v indique a chat de mettre toutes ses entree/sorties
  dans le journal systeme (generalement /var/log/messages). Une fois que
  votre script chat marchera correctement, editez cette ligne et enlevez
  le -v pour economiser des messages inutiles dans votre syslog.

  ______________________________________________________________________
  TIMEOUT         3
  ______________________________________________________________________

  Ca  definit  un  temps  d'attente de trois secondes avant la reception
  d'une entree attendue. Vous devrez l'augmenter a 5 ou 10  secondes  si
  vous utilisez un modem extremement lent !
  ______________________________________________________________________
  ABORT           '\nBUSY\r'
  ______________________________________________________________________

  Si la chaine BUSY est recue, abandonner l'operation.

  M

  ______________________________________________________________________
  ABORT           '\nNO ANSWER\r'
  ______________________________________________________________________

  Si la chaine NO ANSWER est recue, abandonner l'operation.

  ______________________________________________________________________
  ABORT           '\nRINGING\r\n\r\nRINGING\r'
  ______________________________________________________________________

  Si  la  chaine  RINGING  est  recue  de  maniere  repetee,  abandonner
  l'operation.  C'est parce que quelqu'un vous appelle !

  ______________________________________________________________________
  "              \rAT
  ______________________________________________________________________

  Ne rien attendre du modem et envoyer la chaine AT.

  ______________________________________________________________________
  OK-+++\c-OK   ATH0
  ______________________________________________________________________

  C'est un petit plus complique car cela utilise certaines capacites  de
  chat a recuperer les erreurs.

  Ca  veux  dire...Expect  OK, si on ne l'a pas recu (parce que le modem
  n'est pas en ligne de commande) alors envoyer +++ (la chaine  standard
  des  modems  compatible  Hayes pour retourner en ligne de commande) et
  attendre OK.  Ensuite envoyer ATH0 (la chaine pour  raccrocher).  Cela
  permet  au  script  de  repondre  a  la situation ou votre modem avait
  laisse la ligne decrochee !

  ______________________________________________________________________
  TIMEOUT         30
  ______________________________________________________________________

  Mettre le temps d'attente a 30 secondes pour le reste  du  script.  Si
  vous  avez  des  soucis  avec  des  abandons du script chat a cause de
  timeout, augmentez cette valeur a 45 secondes ou plus.
  ______________________________________________________________________
  OK              ATDT$TELEPHONE
  ______________________________________________________________________

  Attends un OK (la reponse du modem a la commande ATH0) et  compose  le
  numero que nous voulez appeler.

  ______________________________________________________________________
  CONNECT         ''
  ______________________________________________________________________

  Attendre  CONNECT(ce que le modem nous envoie lorsque le modem distant
  decroche) et n'envoie rien en reponse.

  ______________________________________________________________________
  ogin:--ogin:    $ACCOUNT
  ______________________________________________________________________

  Une fois encore nous avons une recuperation d'erreur ici. Attendre  le
  message  de  login  (...ogin:) mais si nous ne le recevons pas au bout
  d'un certain temps, envoyer un retour chariot et attendre une nouvelle
  fois  le message de login. Lorsque le message est recu, envoyer le nom
  utilisateur (stocke dans la variable shell $ACCOUNT).

  ______________________________________________________________________
  assword:        $PASSWORD
  ______________________________________________________________________

  Attendre le message du mot de passe et envoyer le  mot  de  passe  (la
  aussi stocke dans une variable shell).

  Ce  script  chat  a une capacite de recuperation d'erreurs resonnable.
  Chat possede bien d'autres possibilites  que  celles  detailles.  Pour
  plus d'informations, consulter la page de manuel de chat (man 8 chat).

  1155..44..11..  DDeemmaarrrreerr PPPPPP ssuurr llee sseerrvveeuurr ffiinnaall

  Bien que le script ppp-on-dialer soit parfait pour  les  serveurs  qui
  lancent  automatiquement  pppd  sur le serveur final une fois que vous
  etes connectes, certains serveurs necessitent  que  vous  lanciez  PPP
  explicitement sur le serveur.

  Si  vous avez besoin d'envoyer une commande de lancement de PPP sur le
  serveur, vous DEVEZ editer le script ppp-on-dialer.

  A la fin du script (apres la ligne password) ajouter une paire aatttteennttee
  eennvvooii  en  plus  -  elle  cherchera  un message de login (une suite de
  caracteres qui ont une signification particuliere dans le shell Bourne
  - comme $ et  ou  (les crochets ouverts et fermes).

  Une  fois  que  chat a obtenu le prompt du shell, chat doit envoyer la
  commande de demarrage de ppp necessaire sur le serveur  PPP  de  votre
  FAI.

  Pour ma part, mon serveur PPP utilise un prompt Bash standard

  ______________________________________________________________________
  [hartr@kepler hartr]$
  ______________________________________________________________________

  et necessite que je tapes

  ______________________________________________________________________
  ppp
  ______________________________________________________________________

  pour lancer ppp sur le serveur.

  Une  idee  judicieuse  peut  etre  d'ajouter  un  peu  de recuperation
  d'erreur, dans mon cas j'utilise

  ______________________________________________________________________
          hartr--hartr    ppp
  ______________________________________________________________________

  Cela signifie que si je ne recois pas le prompt dans le temps imparti,
  j'envoie  un  retour  chariot  et  je recherche le prompt une nouvelle
  fois.

  Une fois que le message est recu, j'envoie la chaine ppp.

  Remarque : n'oubliez  pas  d'ajouter  un  \  a  la  fin  de  la  ligne
  precedente  pour que chat pense que le script de connexion de chat est
  toujours sur une seule ligne !

  Malheureusement, certains serveurs generent un nombre de messages tres
  variable  !  Vous  aurez  peut-etre besoin de vous connecter plusieurs
  fois avec minicom pour comprendre comment ca marche et  recuperer  une
  chaine "d'attente" stable.

  1155..55..  UUnn ssccrriipptt cchhaatt ppoouurr lleess ccoonnnneeccttiioonnss aauutthheennttiiffiieeeess aavveecc PPAAPP//CCHHAAPP

  Si  votre  FAI utilise PAP/CHAP, alors votre script chat est bien plus
  simple. Tout ce que votre script chat doit faire est  de  composer  le
  numero,  attendre  la  connexion  et ensuite laisser pppd s'occuper du
  processus de connexion !

  ______________________________________________________________________
  #!/bin/sh
  #
  # C'est la deuxieme partie du script ppp-on. Il contient le protocole de
  # connexion de la connexion desiree.
  #
  exec /usr/sbin/chat -v                                  \
          TIMEOUT         3                               \
          ABORT           '\nBUSY\r'                      \
          ABORT           '\nNO ANSWER\r'                 \
          ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
          ''              \rAT                            \
          'OK-+++\c-OK'   ATH0                            \
          TIMEOUT         30                              \
          OK              ATDT$TELEPHONE                  \
          CONNECT         ''                              \
  ______________________________________________________________________

  1155..66..  LLeess ooppttiioonnss ddeebbuugg et file option_file de pppd

  Comme nous l'avons deja vu, vous pouvez activer  les  informations  de
  debuggage avec l'option -d de pppd. L'option 'debug' est equivalente a
  celle-ci.

  Puisque vous etablissez la connexion avec un nouveau  script,  laissez
  pour  le  moment  les informations de debuggage. (Attention : si votre
  espace disque est reduit, les echanges de connexion  de  pppd  peuvent
  rapidement augmenter votre fichier syslog et vous amener des problemes
  - mais pour aller jusque la, il faut que vous essayez et vous echouiez
  vos connexions un certain temps).

  Une fois que tout marche correctement, vous pouvez alors enlever cette
  option.

  Si vous avez appele votre  fichier  d'options  de  ppp  autrement  que
  /etc/ppp/options   ou  /etc/ppp/options.ttySx,  specifiez  le  nom  du
  fichier avec l'option file de pppd :

  ______________________________________________________________________
  exec /usr/sbin/pppd debug file options.myserver /dev/ttyS0 38400 \
  ______________________________________________________________________

  1166..  TTeesstteezz vvoottrree ssccrriipptt ddee ccoonnnneexxiioonn

  Ouvrez un nouveau Xterm rroooott (si vous  etes  sous  X)  ou  ouvrez  une
  nouvelle console virtuelle et connectez vous comme rroooott.

  Dans cette nouvelle session, tapez la commande

       tail -f /var/log/messages

  (ou l'endroit exact ou se trouve le fichier log).

  Dans la premiere fenetre (ou console virtuelle), tapez la commande

       ppp-on &

  (ou  le  nom  que  vous  avez  donne  a  la  nouvelle version de votre
  /usr/sbin/ppp- on). Si vous ne mettez pas le script en tache  de  fond
  en  specifiant & en fin de commande, vous ne recupererez pas le prompt
  de votre terminal avant que ppp se  termine  (ou  que  la  liaison  se
  termine).

  Maintenant  revenez  dans  la  fenetre  ou vous affichez votre journal
  systeme.

  L'affichage devrait ressembler a ce qui suit (si  vous  avez  specifie
  l'option  -vi  a chat et -d a pppd )....c'est le deroulement du script
  chat et des reponses envoyees dans le fichier  journal  systeme  suivi
  des informations de demarrage de pppd :

  ______________________________________________________________________
  Oct 21 16:09:58 hwin chat[19868]: abort on (NO CARRIER)
  Oct 21 16:09:59 hwin chat[19868]: abort on (BUSY)
  Oct 21 16:09:59 hwin chat[19868]: send (ATZ^M)
  Oct 21 16:09:59 hwin chat[19868]: expect (OK)
  Oct 21 16:10:00 hwin chat[19868]: ATZ^M^M
  Oct 21 16:10:00 hwin chat[19868]: OK -- got it
  Oct 21 16:10:00 hwin chat[19868]: send (ATDT722298^M)
  Oct 21 16:10:00 hwin chat[19868]: expect (CONNECT)
  Oct 21 16:10:00 hwin chat[19868]: ^M
  Oct 21 16:10:22 hwin chat[19868]: ATDT722298^M^M
  Oct 21 16:10:22 hwin chat[19868]: CONNECT -- got it
  Oct 21 16:10:22 hwin chat[19868]: send (^M)
  Oct 21 16:10:22 hwin chat[19868]: expect (ogin:)
  Oct 21 16:10:23 hwin chat[19868]: kepler login: -- got it
  Oct 21 16:10:23 hwin chat[19868]: send (hartr^M)
  Oct 21 16:10:23 hwin chat[19868]: expect (ssword:)
  Oct 21 16:10:23 hwin chat[19868]:  hartr^M
  Oct 21 16:10:23 hwin chat[19868]: Password: -- got it
  Oct 21 16:10:23 hwin chat[19868]: send (??????^M)
  Oct 21 16:10:23 hwin chat[19868]: expect (hartr)
  Oct 21 16:10:24 hwin chat[19868]: [hartr -- got it
  Oct 21 16:10:24 hwin chat[19868]: send (ppp^M)
  Oct 21 16:10:27 hwin pppd[19872]: pppd 2.1.2 started by root, uid 0
  Oct 21 16:10:27 hwin pppd[19873]: Using interface ppp0
  Oct 21 16:10:27 hwin pppd[19873]: Connect: ppp0 <--> /dev/cua1
  Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(LCP): Sent code 1, id 1.
  Oct 21 16:10:27 hwin pppd[19873]: LCP: sending Configure-Request, id 1
  Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfreq(LCP): Rcvd id 1.
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd MRU
  Oct 21 16:10:27 hwin pppd[19873]: (1500)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd ASYNCMAP
  Oct 21 16:10:27 hwin pppd[19873]: (0)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd MAGICNUMBER
  Oct 21 16:10:27 hwin pppd[19873]: (a098b898)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd PCOMPRESSION
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd ACCOMPRESSION
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: returning CONFACK.
  Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(LCP): Sent code 2, id 1.
  Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfack(LCP): Rcvd id 1.
  Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 1, id 1.
  Oct 21 16:10:27 hwin pppd[19873]: IPCP: sending Configure-Request, id 1
  Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfreq(IPCP): Rcvd id 1.
  Oct 21 16:10:27 hwin pppd[19873]: ipcp: received ADDR
  Oct 21 16:10:27 hwin pppd[19873]: (10.144.153.51)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: ipcp: received COMPRESSTYPE
  Oct 21 16:10:27 hwin pppd[19873]: (45)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: ipcp: returning Configure-ACK
  Oct 21 16:10:28 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 2, id 1.
  Oct 21 16:10:30 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 1, id 1.
  Oct 21 16:10:30 hwin pppd[19873]: IPCP: sending Configure-Request, id 1
  Oct 21 16:10:30 hwin pppd[19873]: fsm_rconfreq(IPCP): Rcvd id 255.
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: received ADDR
  Oct 21 16:10:31 hwin pppd[19873]: (10.144.153.51)
  Oct 21 16:10:31 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: received COMPRESSTYPE
  Oct 21 16:10:31 hwin pppd[19873]: (45)
  Oct 21 16:10:31 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: returning Configure-ACK
  Oct 21 16:10:31 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 2, id 255.
  Oct 21 16:10:31 hwin pppd[19873]: fsm_rconfack(IPCP): Rcvd id 1.
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: up
  Oct 21 16:10:31 hwin pppd[19873]: local  IP address 10.144.153.104
  Oct 21 16:10:31 hwin pppd[19873]: remote IP address 10.144.153.51
  ______________________________________________________________________

  (Remarque  - j'utilise les adresses IP STATIQUES - ma machine l'envoie
  au serveur PPP - vous ne verrez pas la meme chose si vous utilisez des
  adresses  IP  DYNAMIQUES.)  Ainsi,  le  server  necessite une commande
  specifique pour demarrer ppp a la fin.

  Ca semble OK - alors testez comme avant avec des ping des adresses  IP
  et des noms des hotes.

  Lancer  votre navigateur web ou n'importe quoi d'autre et allez surfer
  - vous etes connecte !

  1177..  TTeerrmmiinneerr uunnee ccoonnnneexxiioonn PPPPPP

  Quand vous en avez termine avec la liaison PPP, utilisez  la  commande
  standard  ppp-off  pour  la terminer (rappel - vous devez etre rroooott ou
  membre du groupe PPP ! ).

  Dans votre fichier journal  de  votre  systeme,  il  devrait  y  avoir
  quelque chose ressemblant a :

  ______________________________________________________________________
  Oct 21 16:10:45 hwin pppd[19873]: Interrupt received: terminating link
  Oct 21 16:10:45 hwin pppd[19873]: ipcp: down
  Oct 21 16:10:45 hwin pppd[19873]: default route ioctl(SIOCDELRT): Bad address
  Oct 21 16:10:45 hwin pppd[19873]: fsm_sdata(LCP): Sent code 5, id 2.
  Oct 21 16:10:46 hwin pppd[19873]: fsm_rtermack(LCP).
  Oct 21 16:10:46 hwin pppd[19873]: Connection terminated.
  Oct 21 16:10:46 hwin pppd[19873]: Exit.
  ______________________________________________________________________

  Ne  pas  s'inquieter du SIOCDELRT - c'est juste pppd qui indique qu'il
  se termine, il n'y a pas a s'en inquieter.

  1188..  RReessoouuddrree lleess pprroobblleemmeess

  Il y a de nombreuses raisons pour que votre liaison ne fonctionne  pas
  -  chat  n'a  pas reussi a aller jusqu'au bout, vous avez une mauvaise
  ligne, etc.  Regardez votre syslog pour avoir des indications.

  1188..11..  JJ''aaii ccoommppiillee llee ssuuppppoorrtt PPPPPP ddaannss llee nnooyyaauu,, mmaaiiss......

  Un probleme relativement courant est que les gens compilent le support
  PPP  dans  leur noyau et apres, lorsqu'ils essayent de lancer pppd, le
  noyau repond qu'il ne supporte pas ppp ! Un grand  nombre  de  raisons
  peuvent en etre la cause.

  1188..11..11..  BBooootteezz--vvoouuss aavveecc llee bboonn nnooyyaauu ??

  Meme  si  vous aavveezz recomplie votre support de ppp dans le noyau, vous
  ne bootez pas sur le nouveau noyau. Cela peut arriver si  vous  n'avez
  pas mis a jour /etc/lilo.conf et relance lilo.

  Une  bonne  facon de verifier le noyau est d'envoyer la commande uname
  -a, qui affiche la ligne ressemblant a

  ______________________________________________________________________
  Linux archenland 2.0.28 #2 Thu Feb 13 12:31:37 EST 1997 i586
  ______________________________________________________________________

  Cela donne la version du noyau et la date a laquelle il a ete  compile
  - ce qui vous donnera une bonne idee de ce qui se passe.

  1188..11..22..  AAvveezz--vvoouuss ccoommppiillee llee ssuuppppoorrtt nnooyyaauu ddee pppppp ccoommmmee uunn mmoodduullee ??

  Si vous avez compile le support de ppp comme un  module,  mais  n'avez
  pas  fait  d'installation  des  modules, alors vous pouvez avoir cette
  erreur. Relisez le kernel-HOWTO et le fichier README de /usr/src/linux
  !

  Une autre possibilite concernant les modules est que vous supposez que
  les modules sont charges automatiquement, alors que le daemon  kerneld
  n'est  pas  lance (il charge et decharge les modules au vol). Verifiez
  le mini-HOWTO kerneld pour des informations sur  la  configuration  de
  kerneld.

  1188..11..33..  UUttiilliisseezz--vvoouuss uunnee bboonnnnee vveerrssiioonn ddee PPPPPP ppoouurr vvoottrree nnooyyaauu ??

  Vous ddeevveezz utiliser ppp-2.2 avec les versions  2.0.x  du  noyau.  Vous
  pouvez  utiliser  ppp-2.2 avec les versions 1.2.x du noyau (si vous le
  patchez) sinon vous devez utiliser ppp-2.1.2.

  1188..11..44..  LLaanncceezz vvoouuss ppppppdd eenn eettaanntt rroooott ??

  Si vous ne lancez pas pppd en etant l'utilisateur rroooott  (et  que  pppd
  n'est pas suid vers rroooott), vous pourrez recevoir ce message.

  1188..22..  MMoonn mmooddeemm ssee ccoonnnneeccttee mmaaiiss PPPPPP nnee ddeemmaarrrree jjaammaaiiss

  Il   y   a   d'innombrables   possibilites   avec  ca  (regardez  dans
  comp.os.linux....).

  Une erreur EEXXTTRREEMMEEMMEENNTT frequente est que vous avez  mal  tape  quelque
  chose  dans  vos  scripts.  La seule chose a faire est de verifier que
  vous avez la conversation entre votre PC Linux et le serveur  rapporte
  dans le syslog /var/log/message) allez ensuite dans celui-ci _l_i_g_n_e _p_a_r
  _l_i_g_n_e. Vous aurez peut-etre besoin d'appeler votre serveur  ppp  a  la
  main pour reverifier tout ca.

  Vous devez verifier les messages de logs reels tres attentivement - et
  ayez a l'esprit que les hommes on tendance a lire  ce  qu'ils  PENSENT
  avoir tape - et non ce qu'ils ont sous leurs yeux !

  1188..33..  LLee ssyysslloogg ccoonnttiieenntt ""sseerriiaall lliinnee iiss nnoott 88 bbiitt cclleeaann..."

  Il y a plusieurs possibilites a cela - comme des retours sur la  ligne
  etc., qui peuvent etre la consequence d'une (ou plusieurs) choses.

  Pour  comprendre ce qui se passe, il est necessaire de chercher se qui
  se passe en coulisses dans pppd lui-meme.

  Lorsque  pppd  demarre,  il  envoie  des  paquets  LCP  (Link  Control
  Protocol)  a  la  machine distante. Si il recoit une reponse valide il
  passe ensuite a l'etape suivante (avec IPCP - les paquets de  controle
  IP) et c'est seulement une fois que cette negociation est terminee que
  les trames IP reelles  commencent  et  que  vous  pouvez  utiliser  la
  liaison PPP.

  Si  il n'y a pas de serveur ppp fonctionnel a l'autre bout quand votre
  PC envoie les paquets LCP, ceux-ci sont renvoyes par le  processus  de
  login  final.  Comme  ces  paquets utilisent 8 bits, et sont reflechis
  avec le 8eme bit (souvenez vous qu'ASCII est un code 7 bits). PPP s'en
  apercoit et s'en plaint.

  Il y a plusieurs possibilite pour qu'un reflexion arrive.

  1188..33..11..  VVoouuss nn''eetteess ppaass ccoorrrreecctteemmeenntt ccoonnnneeccttee ssuurr llee sseerrvveeuurr

  Lorsque le  script  chat  se  termine,  pppd  demarre  sur  votre  PC.
  Cependant,  si  vous  n'avez  pas termine le processus de connexion au
  serveur (comme envoyer une commande necessaire a  lancer  PPP  sur  le
  serveur), PPP ne se lancera pas.

  Ainsi, le paquet LCP sera reflechi et vous aurez une erreur.

  Vous  devez  verifier  et corriger (si necessaire) attentivement votre
  script chat (voir plus haut).

  1188..33..22..  VVoouuss nn''aavveezz ppaass llaannccee PPPPPP ssuurr llee sseerrvveeuurr

  Certains serveurs PPP necessitent que vous entriez une commande  et/ou
  un  retour  chariot  apres  avoir termine le processus de connexion et
  avant que ppp soit lance a l'autre bout.

  Verifiez votre script chat (voir plus haut).

  Si vous vous connectez a la main et que vous vous  rendez  compte  que
  vous   devez  envoyer  sur  ENTREE  apres  avoir  lance  PPP,  ajouter
  simplement une paire attente/envoi vide a la fin de votre script  chat
  (un chaine vide envoie en fait ENTREE).

  1188..44..  LLee pprroocceessssuuss PPPPPP ddiissttaanntt eesstt lloonngg aa ddeemmaarrrreerr

  La c'est un peu delicat !

  Par defaut, votre pppd Linux est compile pour envoyer un maximum de 10
  requetes LCP de configuration.  Si  le  serveur  est  un  peu  lent  a
  demarrer, la totalite des 10 requetes auront ete envoyees avant que le
  serveur PPP distant n'ait eu le temps de les recevoir.

  Sur votre machine, pppd voit la reflexion des  10  requetes  (avec  le
  8eme bit inverse) et s'arrete.

  Il y a deux facon de resoudre cela :

  Ajouter  lcp-max-configure  30 comme option de ppp. Cela augmentera le
  nombre  de  packets  de  configuration  LCP  que  pppd  enverra  avant
  d'abandonner.   Pour  les  serveurs  vraiment  lents,  vous devez meme
  mettre plus que ca.

  Sinon, vous pouvez etre un peu malin de votre cote.  Vous  avez  peut-
  etre remarque que lorsque vous vous connectez a la main au serveur PPP
  et que vous demarrez alors PPP, le pprreemmiieerr caractere que ppp envoie et
  qui apparait est toujours le caractere tilda (~).

  En savant cela, vous pouvez ajouter une nouvelle paire attente/envoi a
  la fin de votre script chat qui attendra un tilda et  n'enverra  rien.
  Cela ressemblera alors a :

  ______________________________________________________________________
  \~      ''
  ______________________________________________________________________

  Remarque  :  comme le caractere tilda a une signification particuliere
  pour  le  shell,  il  doit  etre  echappe  (en  fait  precede  par  un
  backslash).

  1188..55..  LLaa rroouuttee ppaarr ddeeffaauutt nn''eesstt ppaass ccoonnffiigguurreeee

  Si  pppd  refuse  de  configurer  la route par defaut, c'est parce que
  (assez justement) il  refuse  de  remplacer/supprimer  une  route  par
  defaut existante.

  La  raison  habituelle lorsque cette erreur apparait est que certaines
  distributions configurent  une  route  par  defaut  pour  votre  carte
  Ethernet au lieu de la configurer comme une route reseau specifique.

  Voir  le  Linux  NAG  et  le HOWTO Net2/3 pour des informations sur la
  facon de configurer correctement votre carte Ethernet  et  les  routes
  associees.

  Une  alternative  a  cela  est  que votre reseau local utilise deja un
  gateway/routeur et que votre table de routage est deja configuree pour
  envoyer la route par defaut a cet endroit.

  Resoudre  cette  situation  peut  necessiter quelques connaissances de
  reseau IP qui sort du domaine de ce HOWTO. Il  est  suggere  d'obtenir
  l'avis  d'un  expert  (par  les  groupes de news ou quelqu'un que vous
  pouvez interroger pres de vous).

  1188..66..  AAuuttrreess pprroobblleemmeess

  Il y a des tas de  raisons  autres  que  celles-ci  pour  que  ppp  ne
  parvienne pas a se connecter et/ou fonctionner correctement.

  Lisez  la  FAQ  PPP(qui est une serie de questions-reponses). C'est un
  document tres didactique et les reponses y SONT !  De  ma  propre  (et
  triste)  experience,  si la reponse a votre probleme n'est pas dedans,
  votre probleme  N'est  PAS  de  la  faute  de  ppp  !  Pour  ma  part,
  j'utilisais  un  noyau  ELF  alors  que  je n'avais pas mis a jour les
  modules du noyau. J'ai juste perdu 2 jours (et  presque  une  nuit)  a
  chercher  comment  doit  etre  un  serveur  PPP parfait avant de faire
  lumiere !

  1199..  OObbtteenniirr ddee ll''aaiiddee qquuaanndd oonn eesstt ttoottaalleemmeenntt ppeerrdduu

  Si vous n'arrivez pas a faire fonctionner votre liaison  PPP,  relisez
  ce  document  et  tout  verifier  - en conjonction avec les sorties de
  "chat-v..."  et "pppd -d" dans votre journal systeme.

  Consultez egalement la  documentation  de  PPP  la  FAQ  et  tout  les
  documents mentionnes ici !

  Si   vous   etes   encore   bloque,   essayez   les  groupes  de  news
  comp.os.linux.misc et comp.os.linux.networking qui sont  regulierement
  parcourus  par  des  gens capable de vous aider sur PPP ainsi que dans
  comp.protocols.ppp

  Vous pouvez essayer de m'envoyer personnellement  un  email,  mais  si
  j'ai  une  journee  (et  meme  une  vie)  charge, je ne garanti pas de
  repondre rapidement (meme pas du tout) selon la quantite de travail en
  cours et l'etat de ma vie privee !

  En  particulier  -  NNEE  PPOOSSTTEEZZ PPAASS DDEESS PPAAGGEESS EETT DDEESS PPAAGGEESS DDEE SSOORRTTIIEE DDEE
  DDEEBBUUGGGGAAGGEE DDAANNSS LLEESS NNEEWWSS GGRROOUUPPSS NNII MMEEMMEE AA MMOOII PPAARR  EEMMAAIILL  -  c'est  une
  enorme  perte  de  bande  passante,  et  la  majorite sera envoye dans
  /dev/null (a moins qu'elle ne soit expressement demande).

  2200..  PPrroobblleemmeess ccllaassssiiqquueess lloorrssqquuee llaa lliiaaiissoonn ffoonnccttiioonnnnee

  Un  des  problemes  que  vous  rencontrerez  est   que   de   nombreux
  fournisseurs  d'acces est qu'ils ne supporterons que les programmes de
  connexions qu'ils distribuent  avec  les  nouveaux  comptes.  Il  sont
  (habituellement) pour Microsoft Windows :-( - et la plupart des bureau
  d'aide des fournisseurs d'acces ne sembleront  rien  savoir  au  sujet
  d'Unix  (ou Linux). Donc preparez vous a une assistance limite de leur
  part !

  Vous pouvez evidemment leur faire une  faveur  et  leur  apprendre  ce
  qu'est  Linux  (certaines  personnes  au  support de votre fournisseur
  d'acces seront relativement  'branche'  avec  le  monde  Internet  est
  auront une machine Linux chez eux - bien sur que ca existe ! )

  2200..11..  JJee nn''aarrrriivvee ppaass aa vvooiirr aapprreess llee sseerrvveeuurr PPPPPP oouu jjee ssuuiiss ccoonnnneeccttee

  OK  -  votre connexion PPP est lancee et fonctionne vous pouvez pinger
  le serveur PPP avec son adresse IP (la deuxieme ou "remote" adresse IP
  affichee  par ifconfig ppp0), mais vous ne pouvez rien atteindre apres
  cela.

  Tout d'abord, essayez de pinger les adresses IP que vous avez specifie
  dans  /etc/resolv.conf  comme serveur de noms. Si elles marchent, vous
  ppoouuvveezz voir apres votre serveur PPP (en tout cas ce qui a une  adresse
  IP  identique  a  ce  que  vous  avez specifie). Maintenant essayez de
  pinger l'adresse complete de votre fournisseur d'acces :

       ping mon.fournisseur.internet.fr

  Si ca ne marche pas, vous avez un  probleme  avec  la  resolution  des
  noms.  C'est  probablement  a  cause  d'une faute de frappe dans votre
  fichier /etc/resolv.conf.  Verifiez  ca  attentivement  a  partir  des
  informations  que  vous  aviez  obtenues en appelant votre fournisseur
  d'acces. Si ca semble correct, appelez votre fournisseur  d'acces,  et
  verifiez que vous avez note l'adresse IP correctement.

  Si  ca  ne  marche TOUJOURS pas (et que votre fournisseur d'acces vous
  confirme que le serveur de noms fonctionne correctement),  vous  devez
  avoir  un  probleme  ailleurs  -  et je vous suggere de verifier votre
  installation de Linux (en particulier les permissions des fichiers).

  Si vous ne pouvez TOUJOURS pas pinger  le  serveur  de  nom  de  votre
  fournisseur  d'acces par l'adresse IP, soit il est eteint (appelez les
  par telephone et verifiez) soit il y a un probleme de routage du  cote
  de votre fournisseur d'acces. De meme appelez-les et demandez leur.

  Un  autre possibilite est qu'a l'autre bout le serveur PPP Linux n'ait
  pas l'option IP forwarding d'activee dans le noyau !

  Un bon test est d'essayer de se connecter avec le programme que  votre
  fournisseur  d'acces  vous  a  donne pour (oups) Microsoft Windows. Si
  tout marche sur un autre systeme  d'exploitation  avec  exactement  le
  meme  compte, alors le probleme vient de votre machine Linux et NON de
  votre fournisseur d'acces.

  2200..22..  JJee ppeeuuxx eennvvooyyeerr dduu ccoouurrrriieerr mmaaiiss ppaass eenn rreecceevvooiirr

  Si vous avez une adresse IP dynamique, c'est tout a fait normal.  Voir
  "Configurer les services" plus bas.

  2200..33..   aavveecc  mmaa  mmaacchhiinnee ??  PPoouurrqquuooii lleess ggeennss nnee ppeeuuvveenntt ppaass ffaaiirree ddee
  ffiinnggeerr,, WWWWWW,, ggoopphheerr,, ttaallkk eettcc

  La  aussi, si vous utilisez une adresse IP dynamique c'est tout a fait
  normal.  voir "Configurer les services" plus bas.

  2211..  UUttiilliisseerr lleess sseerrvviicceess IInntteerrnneett aavveecc ddeess aaddrreesssseess IIPP ddyynnaammiiqquueess

  Si  vous  utilisez une adresse IP dynamique (et tous les provideurs ne
  vous donnerons qu'une adresse dynamique a moins que vous ne payez bien
  plus  pour  votre  connexion),  vous  devez  accepter  les limitations
  qu'elle impose.

  Tout d'abord, les requetes pour les  services  sortant  fonctionneront
  parfaitement.  Cela signifie que vous pourrez envoyer du courrier avec
  sendmail (si sendmail est configure correctement),  les  fichiers  ftp
  pour  les  sites  distants, les fingers vers d'autres machines, surfer
  sur le web etc.

  En particulier, vous pourrez repondre au courrier que vous  avez  recu
  meme  si  votre machine n'est plus connectee. Le courrier restera dans
  votre queue de messages jusqu'a ce que vous appeliez votre FAI.

  Cependant, votre machine N'est PAS connectee a Internet 24H/24, et  en
  plus  elle  n'a  pas  la  meme  adresse  IP  a  chaque fois qu'elle se
  connecte. Il est donc impossible de recevoir du courrier  electronique
  directement  sur  votre machine, et de creer un serveur web et ftp que
  vos amis pourraient acceder !  A  partir  du  moment  ou  ca  concerne
  Internet,  votre  machine  n'est  pas unique, ni accessible de maniere
  permanente comme cela serait le cas avec une adresse IP unique (rappel
  -  les  autres machines utilisent les adresses IP pour acceder a votre
  machine).

  Si vous configurez en serveur WWW (ou n'importe quoi d'autre), il  est
  totalement  inconnu  des utilisateurs d'Internet A MOINS QU'ils soient
  au courant que votre machine est connectee et qu'ils connaissent votre
  adresse  IP  courante.  Il  y  a  plusieurs  facon  de  fournir  cette
  information, vous demander par telephone, leur envoyer un e-mail  pour
  leur dire, ou utiliser un fichier ".plan" sur le compte shell de votre
  fournisseur d'acces (en partant  du  principe  que  votre  fournisseur
  d'acces permet les script shell et les finger).

  Maintenant,  pour  la majorite des utilisateurs, ca n'est pas vraiment
  un probleme - la plupart des gens veulent pouvoir envoyer et  recevoir
  leur  email  (sur  le compte de leur fournisseur d'acces) et faire des
  connexions sortantes vers WWW, ftp et d'autres services d'Internet. Si
  vous  AVEZ  un  besoin  imperatif  de connexion sortantes, vous feriez
  mieux de prendre une adresse  IP  statique.   Cependant,  vous  pouvez
  aussi explorer les methodes astucieuses ci dessous...

  2211..11..  CCoonnffiigguurreerr llee ccoouurrrriieerr eelleeccttrroonniiqquuee ((eemmaaiill))

  Meme   avec   une  adresse  IP  dynamique,  vous  devrez  certainement
  configurer sendmail sur votre machine pour  envoyer  le  courrier  que
  vous  ecrivez  localement.   La  configuration  de  sendmail peut etre
  obscure et difficile - ce document ne vous parleras pas de la facon de
  faire.  Cependant,  vous  aimeriez sans doute configurer sendmail pour
  que votre fournisseur d'acces soit  considere  comme  un  hote  "smart
  relay"   (l'options   DDSS  de  sendmail).  (Pour  plus  d'info  sur  la
  configuration de sendmail, voir la  documentation  de  sendmail  -  et
  regardez la configuration de m4 fourni avec sendmail. Il y a forcement
  quelque chose qui reponds a ce que vous cherchez).

  Il y a un excellent livre sur  Sendmail  (une  veritable  'bible'  aux
  editions  O'Reilly  and  Associates), mais c'est certainement beaucoup
  trop pour la plupart des utilisateurs !

  Une fois que vous avez  configure  sendmail,  vous  avez  probablement
  envie que sendmail envoie les messages en attente des que la connexion
  PPP est lancee.  Pour cela, ajouter la commande

       sendmail -q &

  dans votre script /etc/ppp/ip-up (voir plus haut).

  Les mails entrant sont problematique avec les adresses IP  dynamiques.
  La facon de les supporter est de :

  +o  configurer  votre  lecteur d'email pour que le courrier contiennent
     un  champ  "reply  to"  dans  lequel  il  y  aura   votre   adresse
     electronique chez votre fournisseur d'acces.
     Si  vous  le  pouvez, configurez egalement le champ FROM avec votre
     adresse electronique chez votre FAI.

  +o  utiliser les programmes  popclient,  fetchmail  pour  recuperer  le
     courrier  chez  votre  fournisseur  d'acces.  Ou bien, si votre FAI
     utilise IMAP, utilisez un lecteur de  courrier  electronique  ayant
     IMAP d'active (comme pine).

  Vous  pouvez  automatiser  ce processus lors de l'appel en ajoutant la
  commande necessaire dans le script /etc/ppp/ip-up (voir plus haut).

  2211..22..  CCoonnffiigguurreerr uunn sseerrvveeuurr ddee nnoommss llooccaall

  Meme si vous etes content d'utiliser le serveur  de  noms  situe  chez
  votre  fournisseur  d'acces, vous pouvez en plus configurer un serveur
  de nom local (secondaire) de cache uniquement qui serait lance avec le
  script  ip-up.   L'avantage d'utiliser un serveur de noms local (cache
  uniquement) est de gagner du temps (et de la bande passante)  si  vous
  contactez souvent les meme sites pendant de longues sessions en ligne.

  La configuration du DNS  pour  un  serveur  de  cache  seulement  (qui
  utilise une ligne 'forwarders' dans le fichier named.boot pointant sur
  le DNS de votre FAI) est relativement simple. Le livre  O'Reilly  (DNS
  et Bind) explique tout ce que vous devez savoir sur le sujet.

  Il existe egalement un DNS-HOWTO.

  Si  un  petit  reseau  local  accede a Internet grace a votre PC Linux
  (avec IP masquerading par exemple), c'est sans  doute  une  excellente
  idee  d'utiliser  un  serveur  de  noms (avec la directive forwarders)
  puisque cela reduira les delais et la bande passante utilisee pour  la
  resolution des noms.

  Un point de la Netiquette : demandez la permission a votre fournisseur
  d'acces avant de mettre en place un  serveur  de  noms  secondaire  de
  cache uniquement dans le domaine de votre FAI. Configure correctement,
  il n'entrainera aucun probleme chez votre FAI, mais  si  il  ne  l'est
  pas, il peut causer de nombreux problemes.

  2222..  RReelliieerr ddeeuuxx rreesseeaauuxx llooccaauuxx aavveecc PPPPPP

  Il  y  a fondamentalement aucune difference entre le fait de relier un
  seul PC Linux avec PPP et relier deux reseaux locaux avec PPP  et  une
  machine   sur  chaque  reseau.  Souvenez-vous  PPP  est  un  protocole
  rreevveerrssiibbllee.

  Cependant, vous devez RREEEELLLLEEMMEENNTT  comprendre  comment  le  routage  se
  deroule.   Lisez  le  NET-2  HOWTO  et le Guide d'administration Linux
  (NAG). Vous trouverez egalement une aide inestimable dans le  " TCP/IP
  Network   Administration"  (publie  par  O'Reilly  and  Assoc  -  ISBN
  0-937175-82-X)

  Si vous utilisez une adresse de  sous-reseau  de  chaque  cote  de  la
  liaison, le (brouillon) de mini-howto Linux sub networking pourra vous
  etre utile.  Il est  disponible  a  Linux  Sub  networking  mini-HOWTO
  <http://www.interweft.com.au/other/>.

  Pour  relier  deux reseaux locaux, vous ddeevveezz utiliser des adresses IP
  differentes (ou des sous-reseau d'adresses differentes) et vous devrez
  utiliser  des  adresses  IP  statiques  ou  l'IP Masquerading. Si vous
  voulez  utiliser  l'IP  Masquerading,  consultez  le   mini-howto   IP
  masquerade   pour   avoir  des  instructions  sur  la  maniere  de  le
  configurer.

  2222..11..  CCoonnffiigguurreerr lleess aaddrreesssseess IIPP

  Arrangez-vous avec l'administrateur systeme de  l'autre  reseau  local
  pour  choisir  les  adresses  IP qui seront utilises de chaque cote de
  l'interface PPP.  Si vous utilisez des adresses IP statiques, il  sera
  sans doute pratique d'appeler un numero de telephone dedie.

  Maintenant,  editez le fichier /etc/ppp/options[.ttyXX] approprie - il
  est judicieux d'avoir un modem et un port dedie de chaque cote  de  la
  connexion.   Cela  necessite  quelques  changements  dans  le  fichier
  /etc/ppp/options et la creation d'un fichier  options.ttyXX  approprie
  pour les autres connexions !

  Specifiez  les  adresses IP pour le cote de votre liaison PPP dans les
  fichiers d'options appropries exactement comme cela  est  decris  plus
  haut pour les adresses IP statiques.

  2222..22..  CCoonnffiigguurreerr llee rroouuttaaggee..

  Vous  devez vous occuper que les paquets du reseau local soit routes a
  travers l'interface lorsque la liaison PPP est lancee. Ce processus se
  fait en deux parties.

  Tout  d'abord,  vous  devez configurer une route partant de la machine
  qui fait marcher la liaison PPP vers le reseau situe a  l'autre  bout.
  Si cette liaison donne sur Internet, vous pouvez utilisez la route par
  defaut mise en place par pppd lui-meme a la  connexion  avec  l'option
  defaultroute.

  Si  toutefois,  la  liaison relie seulement deux reseaux locaux, alors
  une route reseau specifique doit etre ajoutee pour  tous  les  reseaux
  accessible  par  cette  liaison. C'est la commande 'route' qui le fait
  pour chaque reseau dans le script /etc/ppp/ip-up script (voir une fois
  que la liaison fonctionne...) pour des instructions detaillees.

  La  seconde  chose  dont  vous  avez besoin est de prevenir les autres
  ordinateurs que vous etes le gateway vers les reseaux situes a l'autre
  bout de la liaison.

  Bien  sur,  l'administrateur reseau de l'autre cote de la liaison doit
  faire les meme choses ! Cependant, puisque  qu'il  route  les  paquets
  vers  votre  reseau  particulier,  une  rroouuttee  rreesseeaauu  ssppeecciiffiiqquuee  est
  indispensable, et non la route par defaut (a moins que le reseau situe
  a l'autre bout se connecte chez vous pour acceder a Internet).

  2222..33..  SSeeccuurriittee rreesseeaauu

  Si  vous  reliez  votre reseau local a Internet avec PPP - ou du moins
  avec un reseau local "etranger", vous devez reflechir aux problemes de
  securite.  Je  vous  conseille  fermement  de  penser  a configurer un
  firewall !

  Vous devriez egalement parler a l'administrateur reseau de votre  site
  AAVVAANNTT de lancer une connexion vers un reseau local etranger voire vers
  Internet ce cette maniere. Ne rien faire  peut  soit  n'amener  aucune
  reaction soit de serieux problemes !

  2233..  UUnnee ffooiiss qquuee llaa ccoonnnneexxiioonn ffoonnccttiioonnnnee -- llee ssccrriipptt //eettcc//pppppp//iipp--uupp

  Une fois que la connexion est etablie, pppd cherche un /etc/ppp/ip-up.
  Si  ce  script  existe et est executable, le daemon PPP le lance. Cela
  permet d'automatiser des commandes de routages speciales  qui  peuvent
  etre  necessaires  et  toutes  les  autres  actions que vous souhaitez
  lancer une fois que la liaison PPP est activee.

  C'est un simple script shell qui fait uniquement ce qu'un script shell
  peut faire (en fait quasiment tout ce que vous voulez).

  Par exemple, vous pouvez demander a sendmail d'envoyer les messages en
  attentes.

  Il y a quelques restrictions avec /etc/ppp/ip-up:

  +o  Il fonctionne  deliberemment  dans  un  environnement  reduit  pour
     augmenter  la  securite.  Cela  signifie  que  vous devez donner le
     chemin complet des executables.

  +o  Techniquement, /etc/ppp/ip-up est un _p_r_o_g_r_a_m_m_e et  non  un  script.
     Cela  signifie qu'il ne peut pas etre execute directement - meme si
     il a besoin du (#!/bin/bash) magique au debut de la premiere  ligne
     et qu'il doit etre lisible est executable par root.

  2233..11..  RRoouuttaaggeess ssppeecciiaauuxx

  Si  vous  reliez deux reseaux locaux, vous devez configurer des routes
  specifiques vers le reseau 'etranger'. Le script  /etc/ppp/ip-up  peut
  le  faire  facilement.  La  seule difficulte est lorsque votre machine
  supporte plusieurs liaisons PPP.

  /etc/ppp/ip-up est utilise a chaque lancement de ppp, vous devez  donc
  etre   extremement   vigilant  d'executer  les  commandes  de  routage
  correctes pour la liaison qui  demarre  -  et  non  lorsque  n'importe
  quelle liaison demarre !

  2233..22..  SSuuppppoorrtt dduu ccoouurrrriieerr eelleeccttrroonniiqquuee eenn aatttteennttee

  Lorsqu'une  liaison  entre  deux reseaux locaux demarre, vous voudriez
  vous assurez que le courrier en attente de chaque cote de  la  liaison
  est  bien  envoye a son destinataire. Cela est possible en ajoutant un
  appel correct a sendmail.

  Utiliser la commande case du bash sur le bon parametre que passe  pppd
  au script permet cela. Par exemple, voici un script /etc/ppp/ip-up que
  j'utilise pour mes liaisons entre  l'entreprise  et  chez  mon  reseau
  Ethernet (egalement connecte au meme serveur ppp).

  2233..33..  UUnn eexxeemmppllee ddee ssccrriipptt //eettcc//pppppp//iipp--uupp

  Le script suivant permet de nombreuses utilisations.

  ______________________________________________________________________
  #!/bin/bash
  #
  # Script permettant de supporter les possiblites de routages necessaires a pppd
  # Seule la liaison vers Newman necessite ce support.
  #
  # Quand la liaison ppp demarre, ce script est appele avec les parmetres
  # suivants
  #       $1      le nom de l'interface utilisee par pppd (c.-a-d. ppp3)
  #       $2      le nom du peripherique tty
  #       $3      la vitesse du peripherique tty
  #       $4      l'adresse IP locale de l'interface
  #       $5      l'adresse  IP distante
  #       $6      le parametre specifie par l'option 'ipparam' a pppd
  #
  case "$5" in
  # Supporte le routage vers le serveur du Newman Campus
          202.12.126.1)
                  /sbin/route add -net 202.12.126.0 gw 202.12.126.1
  # et envoie les courriers en attente la-bas !
                  /usr/sbin/sendmail -q &
                  ;;
          139.130.177.2)
  # Notre liaison Internet
  # Lorsque notre liaison est lancee, demarre le serveur de temps et
  # se synchronise avec le monde si il n'a pas encore bouge.
                  if [ ! -f /var/lock/subsys/xntpd ]; then
                          /etc/rc.d/init.d/xntpd.init start &
                  fi
  # Demarre le serveur de news (si il ne marche pas encore)
                  if [ ! -f /var/lock/subsys/news ]; then
                          /etc/rc.d/init.d/news start &
                  fi
                  ;;
          203.18.8.104)
  # Recupere le courrier electronique sur ma machine tant que la liaison
  # fonctionne. Aucun routage n'est necessaire tant que mon reseau local
  # Ethernet supporte IP masquerade et le routages proxyarp.
                  /usr/sbin/sendmail -q &
                  ;;
          *)
  esac
  exit 0
  ______________________________________________________________________

  Le resultat du lancement de la liaison PPP vers notre campus Newman et
  le demarrage de ce script,  determine  les  entrees  de  la  table  de
  routage (cette machine est aussi notre serveur PPP general ET supporte
  nos liaisons Internet).  J'ai ajoute des commentaires  sur  la  sortie
  pour expliquer a quoi correspond chaque entree) :

  ______________________________________________________________________
  [root@kepler /root]# route -n
  Kernel routing table
  Destination     Gateway         Genmask         Flags MSS    Window Use Iface
  # la route de l'HOTE de notre gateway internet
  139.130.177.2   *               255.255.255.255 UH    1500   0      134 ppp4
  # la route de l'HOTE vers le serveur Newman campus
  202.12.126.1    *               255.255.255.255 UH    1500   0       82 ppp5
  # la route de l'HOTE de mon reseau local ethernet
  203.18.8.104    *               255.255.255.255 UH    1500   0       74 ppp3
  # deux des lignes generales PPP
  203.18.8.64     *               255.255.255.255 UH    552    0        0 ppp2
  203.18.8.62     *               255.255.255.255 UH    552    0        1 ppp1
  # la route reseau specifique vers le reseau Newman campus
  202.12.126.0    202.12.126.1    255.255.255.0   UG    1500   0        0 ppp5
  # la route de notre reseau local Ethernet (super-netting two adjacent C classes)
  203.18.8.0      *               255.255.254.0   U     1500   0     1683 eth0
  # la route vers le peripherique loop back
  127.0.0.0       *               255.0.0.0       U     3584   0      483 lo
  # la route par defaut vers Internet
  default         139.130.177.2   *               UG    1500   0     3633 ppp4
  ______________________________________________________________________

  2233..44..  SSuuppppoorrtt dduu ccoouurrrriieerr eelleeccttrroonniiqquuee

  La  section precedente montrait comment supporter le mail sortant - en
  envoyant simplement le courrier lorsque la liaison demarrait.

  Si vous utilisez une liaison pour un reseau large,  vous  pouvez  vous
  arranger avec l'administrateur reseau du site distant pour qu'il fasse
  exactement la meme chose. Par exemple, a l'autre bout de la liaison au
  Newman Campus, le script /etc/ppp/ip-up ressemble a :

  ______________________________________________________________________
  #!/bin/bash
  #
  # Script permettant de supporter les possiblites de routages necessaires a pppd
  # Seule la liaison vers Hedland necessite ce support.
  #
  # Quand la liaison ppp demarre, ce script est appele avec les parmetres
  # suivants
  #       $1      le nom de l'interface utilisee par pppd (c.-a-d. ppp3)
  #       $2      le nom du peripherique tty
  #       $3      la vitesse du peripherique tty
  #       $4      l'adresse IP locale de l'interface
  #       $5      l'adresse  IP distante
  #       $6      le parametre specifie par l'option 'ipparam' a pppd
  #
  case "$5" in
          203.18.8.4)
                  /usr/sbin/sendmail -q
                  ;;
          *)
  esac
  exit 0
  ______________________________________________________________________

  Si  toutefois, vous n'avez qu'une adresse IP dynamique chez votre FAI,
  vous devrez recevoir votre courrier sur le compte de votre fournisseur
  d'acces.  Cela est generalement possible en utilisant POP (Post Office
  Protocol).  Ce  processus  peut  etre  supporte  avec   le   programme
  'popclient"  - le script ip-up peut automatiser le processus pour vous
  !

  Creez simplement  un  script  /etc/ppp/ip-up  qui  contient  un  appel
  correct  a  popclient.  Pour mon portable avec la RedHat Linux (que je
  prends lorsque je voyage), j'ai

  ______________________________________________________________________
  popclient -3 -c -u hartr -p <password> kepler.hedland.edu.au |formail -s procmail
  ______________________________________________________________________

  Vous pouvez aussi utiliser slurp en quelque chose d'autre  d'identique
  pour  les  news,  et d'autres trucs. Souvenez vous que le script ip-up
  est un script bash standard et qui peut servir  a  automatiser  TOUTES
  les  fonctions que vous devez accomplir chaque fois qu'une liaison PPP
  correspondante demarre.

  2244..  UUttiilliisseerr //eettcc//pppppp//iipp--ddoowwnn

  Vous pouvez ecrire un script, qui sera execute a  chaque  fois  qu'une
  liaison  se  termine. Qui se situe dans /etc/ppp/ip-down. Il peut etre
  utilise pour retirer ce que vous  avez  ajoutez  de  special  avec  le
  script /etc/ppp/ip-up correspondant.

  2255..  PPoossssiibbiilliittee ddee rroouuttaaggee ssuurr uunn rreesseeaauu llooccaall

  Si  vous etes connecte sur un reseau local et que vous voulez toujours
  utiliser PPP avec votre machine Linux, vous devez definir  les  routes
  que  les  packets  doivent  prendre  pour  atteindre le reseau local a
  partir de votre machine (par l'interface  Ethernet)  et  egalement  le
  serveur PPP distant voire plus loin.

  Cette  section  ne pretend pas vous apprendre le routage - elle traite
  seulement de cas simples et speciaux de routage (statique) !

  Je vous recommande chaudement de lire de Guide d'administration Reseau
  Linux  si  vous  n'etes  pas habitue avec le routage. De meme le livre
  d'O'Reilly "TCP/IP Network Administration" couvre le sujet de  maniere
  tres abordable.

  La  regle  de  base  du  routage  statique est que la route par DEFAUT
  pointe a l'endroit ou il y le PLUS grand nombre d'adresse reseau. Pour
  les  autres  reseau,  entres  des  routes specifiques dans la table de
  routage.

  La SEULE situation que je couvre ici est lorsque votre  machine  Linux
  est  sur  un  reseau  non  connecte  a  Internet - et vous voulez vous
  connectez a Internet pour une utilisation personnelle tout en  restant
  connecte au reseau local.

  Tout d'abord, assurez-vous que votre route Ethernet est bien configure
  comme une adresse reseau specifique disponible sur votre reseau  local
  - et PAS dans la route par defaut !

  Verifiez  cela en tapant la commande route, vous devriez avoir quelque
  chose qui ressemble a ce qui suit :

       [root@hwin /root]# route -n
       Kernel routing table
       Destination     Gateway         Genmask         Flags MSS    Window Use Iface
       loopback        *               255.255.255.0   U     1936   0       50 lo
       10.0.0.0        *               255.255.255.0   U     1436   0      565 eth0

  Si votre interface Ethernet (eth0) pointe vers la  route  par  defaut,
  (la  premiere colonne contiendra un "default" dans la ligne eth0) vous
  devez changer les scripts  d'inititalisation  d'Ethernet  pour  qu'ils
  utilisent  des  adresses  reseau  specifiques  plutot que la route par
  defaut (consultez le HOWTO Net2 et le NAG).

  Cela va permettre a pppd de configurer votre route  par  defaut  comme
  suit :

       [root@hwin /root]# route -n
       Kernel routing table

       Destination     Gateway         Genmask         Flags MSS    Window Use Iface
       10.144.153.51   *               255.255.255.255 UH    488    0        0 ppp0
       127.0.0.0       *               255.255.255.0   U     1936   0       50 lo
       10.1.0.0        *               255.255.255.0   U     1436   0      569 eth0
       default         10.144.153.51   *               UG    488    0        3 ppp0

  Comme vous pouvez le voir, nous avons une route d'hote vers le serveur
  PPP (10.144.153.51) par ppp0 qui est egalement  la  route  par  defaut
  utilise par le serveur PPP comme gateway.

  Si  votre  configuration  est  plus  complique  que  cela,  lisez  les
  documents concernant le routage  cites  plus  haut,  et  consultez  un
  expert de votre site !

  Si  votre reseau local a aussi des routeurs, vous devez deja avoir des
  gateways pour interconnecter les reseaux disponibles sur  votre  site.
  Vous  devez TOUJOURS mettre la route par defaut vers l'interface PPP -
  et utiliser des routes specifiques pour les autres  reseaux  que  vous
  accedez.

  2255..11..  RReemmaarrqquueess ssuurr llaa sseeccuurriittee

  Lorsque vous configurez une machine Linux sur un reseau local existant
  sur Internet, vous ouvrez potentiellement tout votre reseau local vers
  Internet - ainsi que les pirates qui l'utilise. Avant de commencer, je
  vous conseille vivement de consulter votre administrateur reseau et le
  responsable  de la securite de votre site. Si votre connexion PPP vers
  Internet est utilise et permet d'attaquer votre site, vous serez  dans
  la  plus  mauvaise position face a la colere de vos collegues et votre
  administrateur systeme et reseau. Vous  pourriez  vous-meme  avoir  de
  serieux problemes !

  Avant de connecter un reseau local sur Internet, vous devez prendre en
  compte les problemes de securite meme avec une connexion  DYNAMIQUE  -
  dans  ce  cas  la  reference la plus recente est le "Building Internet
  Firewalls" d'O'Reilly !

  2266..  CCoonnffiigguurreerr uunn sseerrvveeuurr PPPPPP

  Comme c'est mentionne plus haut, il y a des tas de facons de faire. Ce
  que  je  presente  ici est la facon de faire une liaison tournante sur
  plusieurs lignes  telephoniques  (avec  une  carte  serie  multi-ports
  utilisant des Cyclades)

  Si  vous  n'aimez pas la methode presentee ici, faites donc comme vous
  preferez.  J'aimerais toutefois ajouter des  methodes  supplementaires
  dans  les  prochaines  versions  de ce HOWTO. Envoyez donc moi comment
  vous faites !

  Remarquez que cette section ne concerne que la configuration de  Linux
  comme  serveur  PPP. Je ne compte absolument pas donner d'informations
  sur la facon de configurer des serveurs terminaux ou autre.

  Meme si, j'ai deja experimente l'utilisation de  shadow  password  (et
  l'utilise   de  temps  en  temps).  Les  informations  presentees  ici
  n'utiliserons toutefois pas ce mecanisme.

  2266..11..  CCoommppiilleerr llee nnooyyaauu

  Tous les commentaires precedent concernant la compilation du noyau  et
  les  versions  du noyau et de pppd sont encore valables. Cette section
  considere que vous avez lu les sections precedentes du document !

  Pour un serveur PPP, vous DDEEVVEEZZ ajouter le support  de  IP  forwarding
  dans  votre  noyau. Vous pouvez aussi inclure d'autres supports (comme
  le IP fire walls, accounting etc etc).

  Si vous utilisez une carte serie multi-port, vous devez  bien  entendu
  inclure egalement les pilotes necessaires dans le noyau !

  2266..22..  PPrreesseennttaattiioonn dduu ssyysstteemmee ddee sseerrvveeuurr

  Nous  offrons  des  comptes  PPP  (ou  SLIP)  et  des comptes shell en
  utilisant les memes paires nom utilisateur/ mot de passe. Cela  permet
  (pour  nous)  que  les  utilisateurs  n'aient qu'un seul compte qu'ils
  peuvent utiliser pour toutes les connexions.

  Comme nous sommes une organisation  educative,  nous  ne  faisons  pas
  payer  le  personnel ni les etudiants pour leur acces, et nous n'avons
  donc pas besoin de nous inquieter des problemes de payement.
  Un firewall existe entre notre site et Internet, et  cela  limite  les
  acces  des  utilisateurs  puisque  les  lignes d'appels sont sur notre
  firewall Internet (pour certaines raisons evidentes,  le  details  des
  autres  firewalls internes ne sera pas presente ici et serait de toute
  facon inutile)

  Le processus avec lequel un utilisateur etablit une liaison  PPP  avec
  notre site (une fois qu'ils ont un compte bien sur) :

  +o  Appeler  notre ligne d'appel groupe (qui est un numero de telephone
     qui se connecte sur une banque de modems - le premier  modem  libre
     est utilise).

  +o  Connexion avec une paire valide de nom utilisateur et mot de passe

  +o  Au  prompt  du  shell, lancement de la commande ppp pour lancer PPP
     sur le serveur.

  +o  Demarrer PPP sur le PC (il peut utiliser Windows, DOS,  Linux,  MAC
     OS ou n'importe quoi d'autre - ce n'est pas un probleme).

  Le  serveur  utilise un fichier /etc/ppp/options.ttyXX individuel pour
  chacune des connexions sur le  port  ou  est  configure  l'adresse  IP
  distante  pour  l'allocation  des  adresses  IP dynamiques. Le serveur
  utilisateur route les clients avec proxyarp (configure  avec  l'option
  appropriee de pppd). Cela oblige la presence de routed ou gated.

  Quand  l'utilisateur raccroche de son cote, pppd le detecte et indique
  au modem de raccrocher, fermant en meme temps la liaison PPP.

  2266..33..  FFaaiirree mmaarrcchheerr lleess pprrooggrraammmmeess ttoouuss eennsseemmbbllee

  Vous avez besoin des programmes suivants :

  +o  Linux, correctement compile avec les options necessaires

  +o  La version de pppd correspondant a votre noyau

  +o  Un programme 'getty' qui decroche intelligemment les communications
     par modem.
     Nous  utilisons getty_ps2.0.7h, mais mgetty est aussi bien. Je sais
     que mgetty peut s'apercevoir qu'un appel utiliser PAP/CHAP (PAP est
     le standard pour Windows 95) et invoquer pppd automatiquement, mais
     je dois encore explorer un peu ca.

  +o  Un serveur de nom (DNS) fonctionnel qui  est  accessible  pour  les
     utilisateurs qui se connectent.

  CCee  hhoowwttoo nnee ccoouuvvrree ppaass ssaa ccoonnffiigguurraattiioonn.. RReeggaarrddeezz llaa ddooccuummeennttaattiioonn ddee
  ggeettttyy ddee vvoottrree cchhooiixx oouu llee sseerriiaall HHOOWWTTOO ppoouurr pplluuss  dd''iinnffoorrmmaattiioonnss  ssuurr
  llee ssuujjeett..

  2266..44..  CCoonnffiigguurreerr lleess ffiicchhiieerrss dd''ooppttiioonnss

  Vous  avez  besoin  de configurer la totalite de /etc/ppp/options avec
  les options standard pour les ports d'appel. Les options utiles sont :

  ______________________________________________________________________
  asyncmap 0
  netmask 255.255.254.0
  proxyarp
  lock
  crtscts
  modem
  ______________________________________________________________________

  Remarque - nous n'utilisons AUCUN routage (direct) - et en particulier
  il n'y a pas d'option defaultroute. La raison de cela est que tout  ce
  dont  vous avez besoin (en tant que serveur PPP) a l'endroit ou router
  les paquets vveennaanntt du client ppp vers votre reseau local  ou  Internet
  et  de  router  les  paquets  vveerrss le client ppp qui viennent du votre
  reseau local ou d'Internet.

  Tout ce dont vous avez besoin est la route hote de la  machine  client
  et l'utilisation de l'option 'proxyarp' de pppd.

  L'option  'proxyarp' configure (surprise) une entree proxy ARP dans la
  table ARP du serveur qui signifie en substance 'envoie  moi  tous  les
  paquets  destines  au  client'.  C'est  la  maniere  la plus simple de
  configurer le routage vers un client PPP unique - mais  elle  ne  peut
  etre  utilise  pour  le routage entre deux reseaux locaux - vous devez
  alors utiliser les routes reseau reelles qui ne pourront pas  utiliser
  le proxy ARP.

  Vous  devez  certainement  avoir  envie  de  fournir  des  adresses IP
  dynamiques aux utilisateurs qui se connectent. Vous pouvez le faire en
  associant  une  adresse  IP  dynamique  sur chaque port d'appel. Creez
  alors pour chaque port d'appel un /etc/ppp/options.ttyXX.

  Dedans, mettez simplement l'adresse IP locale du serveur et  l'adresse
  IP qui doit etre utilise pour ce port. Par exemple

  ______________________________________________________________________
  kepler:slip01
  ______________________________________________________________________

  Remarquez  en  particulier  que  vous pouvez utiliser les noms d'hotes
  valides dans ce fichier (je trouve que c'est  la  seule  facon  de  se
  souvenir  des  adresses IP des machines importantes de mon reseau, les
  noms sont bien plus significatifs) !

  2266..55..  CCoonnffiigguurreerr ppppppdd ppoouurr ppeerrmmeettttrree aauuxx uuttiilliissaatteeuurrss ddee llee llaanncceerr

  Comme   configurer   une   liaison   ppp  implique  de  configurer  un
  peripherique dans le noyau (une interface reseau) et de manipuler  les
  tables  de routage, des privileges speciaux sont necessaires - en fait
  la totalite des privileges root.

  Heureusement, pppd est prevu pour marcher correctement  avec  set  uid
  root.  Vous devez donc

  ______________________________________________________________________
  chmod u+s /usr/sbin/pppd
  ______________________________________________________________________

  Quand vous listez le fichier, il doit apparaitre comme cela

  ______________________________________________________________________
  -rwsr-xr-x   1 root     root        74224 Apr 28 07:17 /usr/sbin/pppd
  ______________________________________________________________________

  Si vous n'avez pas ca, vous ne pourrez pas utiliser votre liaison ppp.

  2266..66..  CCrreeeerr uunn aalliiaass gglloobbaall ppoouurr ppppppdd

  Pour simplifier les choses pour les utilisateurs  de  notre  connexion
  PPP,  nous creerons un alias global (dans /etc/bashrc) qui est en fait
  une simple commande qui lancera ppp sur le serveur des  qu'ils  seront
  connectes.

  Cela nous donne

  ______________________________________________________________________
  alias ppp="exec /usr/sbin/pppd -detach"
  ______________________________________________________________________

  Et il fait ceci

  +o  exec  : va remplacer le programme en cours (dans le cas d'un shell)
     par le programme qui va etre lance.

  +o  pppd -detach : lance pppd et le laisse pas en tache de  fond.  Cela
     assure  que  pppd  existe et qu'il n'y a pas d'autres processus qui
     trainent.

  Quand un utilisateur se connecte comme cela, il va apparaitre apres un
  'w'

  ______________________________________________________________________
    6:24pm  up 3 days,  7:00,  4 users,  load average: 0.05, 0.03, 0.00
  User     tty       login@  idle   JCPU   PCPU  what
  hartr    ttyC0     3:05am  9:14                -
  ______________________________________________________________________

  Et  c'est  tout... Je vous avais dit que c'etait simple un serveur PPP
  de base !

  2277..  UUttiilliisseerr PPPPPP aavveecc uunnee ccoonnnneexxiioonn nnuullll mmooddeemm

  C'est tres simple - il n'y a pas de modem et  ainsi  les  choses  sont
  bien plus facile.

  Tout d'abord, choisissez une machine comme 'serveur', configurez getty
  sur le port serie pour que vous testiez si vous avez une  connectivite
  en utilisant minicom sur le 'client'.

  Une  fois  que ca fonctionne, vous pouvez enlever le getty A MOINS que
  vous vouliez etre sur que la connexion permet  d'utiliser  les  paires
  nom  utilisateur/  mot  de  passe pour les connexions entrantes. Comme
  vous avez un 'controle physique' des deux machines, je pense que  vous
  n'avez pas besoin de ca.

  Maintenant,  sur  le  serveur,  enlevez  getty et assurez vous que les
  ports serie sont configures correctement sur les  deux  machines  avec
  'setserial'.

  Tout  ce  que vous avez besoin maintenant est de demarrer pppd sur les
  deux systemes. Je suppose que les connexions utilise une connexion par
  /dev/ttyS34.  Ainsi sur les deux machines lancez la commande :

  ______________________________________________________________________
  pppd -detach crtscts lock <local IP>:<remote IP> /dev/ttyS3 38400 &
  ______________________________________________________________________

  Cela  devrait lancer la connexion - mais pour le moment il n'y a aucun
  routage de specifie.  Vous  pouvez  tester  la  connexion  en  pingant
  l'autre  machine.   Si  ca  marche,  eteignez  la  liaison en tuant le
  processus pppd

  Le routage dont vous avez besoin depend de ce que  vous  voulez  faire
  exactement.   Generalement,  une  des  machines  sera  connecte sur un
  reseau  Ethernet  (et  meme  plus)  le  routage  necessaire  est  donc
  exactement le meme qu'entre un serveur PPP et un client.

  Sur la machine equipee d'Ethernet, la commande sera donc

  ______________________________________________________________________
  pppd -detach crtscts lock proxyarp <local IP>:<remote IP> /dev/ttyS3 38400 &
  ______________________________________________________________________

  et sur l'autre machine

  ______________________________________________________________________
  pppd -detach crtscts lock defaultroute <local IP>:<remote IP> /dev/ttyS3 38400 &
  ______________________________________________________________________

  Si  vous  reliez  deux  reseaux locaux (avec une liaison serie !) vous
  aurez  besoin  d'un  routage  plus  complexe,  vous  pouvez   utiliser
  /etc/ppp/ip-up exactement de la meme facon qu'il est decrit plus haut.

  RRoobbeerrtt HHaarrtt
  Port Hedland, Western Australia
  Melbourne, Victoria, Australia August/October 1996 January/March 1997

  Bureau Palm OS
  par David H. Silber palm@orbits.com
  (traduction : Frank Pavageau, pavageau@imaginet.fr)
  v1.0.0, 20 septembre 1998

  Ce document HOWTO explique comment utiliser votre appareil sous Palm
  OS avec votre systme Linux. Bien que les documents HOWTO concernent
  le travail avec le systme d'exploitation Linux, celui-ci ne dpend
  pas de la version d'Unix utilise.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 A propos de ce document
     1.2 A voir aussi
     1.3 Liste de diffusion
     1.4 Archives de la liste de diffusion
     1.5 Site FTP

  2. Informations gnrales

     2.1 Installation du matriel

  3. Partage de donnes entre l'appareil Palm OS et Linux

     3.1 Le logiciel pilot-link
        3.1.1 Installation du logiciel pilot-link
        3.1.2 Utilisation du logiciel pilot-link
           3.1.2.1 pilot-xfer
           3.1.2.2 install-memo
           3.1.2.3 memos
           3.1.2.4 pilot-addresses
     3.2 MakeDoc
        3.2.1 Installation de MakeDoc
        3.2.2 Utilisation de MakeDoc

  4. Personnes

  5. Historique des appareils Palm OS



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Palm Computing Devices a successivement propos plusieurs modles de
  ses produits : le Pilot, puis le PalmPilot, et enfin le Palm III.  IBM
  vend sa propre version du PalmPilot Professional qu'ils appellent le
  WorkPad. Que sont ces gadgets ? Ce sont des assistants personnels
  numriques (Personal Digital Assistants ou PDA), parfois appels
  ordinateurs de paume (palm-top computers). Ils sont vendus comme un
  quivalent lectronique  la fois du carnet d'adresses, du rpertoire
  tlphonique et du bloc-notes, alors qu'il s'agit en fait
  d'ordinateurs  part entire capables de faire fonctionner des
  applications de tous genres. Reste  trouver les applications Palm OS
  correspondant  vos besoins et  tre capable de partager vos donnes
  avec votre systme Linux. Les appareils Palm OS contiennent un
  logiciel permettant de synchroniser leurs donnes avec des programmes
  fonctionnant sur une autre machine. L'appareil est gnralement fourni
  avec ce type de logiciel pour Windows 95. Une version MacOS existe
  aussi. Si l'autre machine fonctionne sous un autre systme
  d'exploitation, vous devez trouver auprs d'autres sources des
  logiciels pouvant travailler avec votre appareil Palm OS. Ce document
  dcrit de tels logiciels disponibles pour les systmes Linux ou Unix.


  11..11..  AA pprrooppooss ddee ccee ddooccuummeenntt


  La version anglaise la plus rcente de ce document peut tre obtenue 
  <http://www.orbits.com/Palm/PalmOS-HOWTO.html> et fait partie du
  Projet de Documentation Linux (Linux Documentation Project ou LDP). Ce
  document remplace la prcdente version, appele le Pilot HOWTO.
  Reportez-vous   <http://metalab.unc.edu/LDP/> (ou
  <http://www.freenix.fr/linux/HOWTO/> pour les versions franaises)
  pour plus d'informations sur les autres documents HOWTO.

  Si vous trouvez quoi que ce soit dans ce document qui ncessite une
  correction ou une explication approfondie, merci de m'envoyer un
  courrier lectronique  l'adresse indique ci-dessus en prcisant 
  quelle version du document vous faites rfrence.

  Ce document est Copyright  1997, 1998 par David H. Silber. Il est
  disponible selon les termes de la licence du document LDP HOWTO-INDEX.


  11..22..  AA vvooiirr aauussssii


  Le document  <http://www.orbits.com/Palm/PalmDevelompent-HOWTO.html>
  explique comment utiliser un environnement de dveloppement  base de
  gcc pour crire des applications Palm OS.

  Le document  <http://www.orbits.com/Palm/PalmConduit-HOWTO.html>
  explique comment utiliser les bibliothques pilot-link pour crire des
  programmes de transfert pour Linux fonctionnant avec des appareils
  Palm OS.


  11..33..  LLiissttee ddee ddiiffffuussiioonn


  La liste de diffusion pilot-unix est maintenue par Matthew Cravit
  pilot-unix-owner@lists.best.com. Son but est dcrit ci-dessous :


       La liste de diffusion pilot-unix est l pour permettre aux
       personnes intresses par l'utilisation de PDA US Robotics
       Pilot avec des systmes Unix de discuter et partager des
       ides. Cela comprend les personnes souhaitant participer au
       dveloppement d'outils permettant au Pilot de travailler
       avec Unix, et ventuellement au dveloppement d'un SDK pour
       le Pilot sous Unix.


  Pour plus d'informations, y compris sur la manire de s'inscrire  la
  liste de diffusion, envoyez un courrier lectronique contenant le mot
  "INFO"  pilot-unix-request@lists.best.com. La ligne de sujet ne
  compte pas.


  11..44..  AArrcchhiivveess ddee llaa lliissttee ddee ddiiffffuussiioonn


  On peut trouver une archive de la liste de diffusion pilot-unix sur
  <http:///www.acm.rpi.edu/~albert/pilot/>. Elle est maintenue par Chris
  Stevens albert@acm.rpi.edu.
  11..55..  SSiittee FFTTPP


  Le site FTP  <ftp://ryeham.ee.ryerson.ca/pub/PalmOS/> contient une
  archive d'outils Palm OS fonctionnant sous Unix. Il est maintenu par
  Jeff Dionne jeff@ryeham.ee.ryerson.ca.


  22..  IInnffoorrmmaattiioonnss ggnnrraalleess



  22..11..  IInnssttaallllaattiioonn dduu mmaattrriieell


  Les appareils Palm OS sont fournis avec un "berceau" (station
  d'accueil) pour changer les donnes avec l'ordinateur de bureau. Ce
  priphrique est en fait un cble srie avec support adapt 
  l'appareil Palm OS ainsi qu'un bouton "HotSync" intgr. Branchez
  votre berceau sur un port srie libre de votre machine. Quand vous
  lancez l'un des programmes indpendants, vous devez placer votre
  appareil Palm OS dans le berceau et appuyer sur le bouton "HotSync"
  pour que celui-ci sache qu'il doit effectuer la communication. S'il
  est teint au moment o vous appuyez sur le bouton, il s'allumera
  automatiquement.

  Pour simplifier, crez un priphrique /dev/pilot comme nom
  supplmentaire pour le port srie sur lequel votre appareil Palm OS
  est connect. En tant qu'utilisateur root, tapez la commande suivante
   l'invite du shell :


          ln /dev/cua0 /dev/pilot



  Remplacez cua0 par le nom du port sur lequel le berceau est connect.


  33..  PPaarrttaaggee ddee ddoonnnneess eennttrree ll''aappppaarreeiill PPaallmm OOSS eett LLiinnuuxx



  33..11..  LLee llooggiicciieell ppiilloott--lliinnkk


  L'ensemble des outils logiciels pilot-link vous permet de charger des
  programmes sur votre appareil Palm OS et de transfrer des donnes
  pour les diffrents programmes intgrs  celui-ci vers ou depuis
  votre systme Linux. Bien que ces programmes ne soient pas aussi
  simples d'emploi que le Desktop livr avec l'appareil Palm OS, ils
  vous permettent quand mme de transfrer des donnes dans les deux
  sens. En gnral, chaque programme individuel du paquetage pilot-link
  gre un type de donnes.


  33..11..11..  IInnssttaallllaattiioonn dduu llooggiicciieell ppiilloott--lliinnkk


  Les versions dj empaquetes ont invitablement un lger retard avec
  la distribution principale, mais sont plus faciles  installer et ne
  ncessitent pas de configuration supplmentaire. La distribution
  principale peut s'avrer plus intressante dans les rares cas o vous
  attendez une fonctionnalit ou une correction particulire.


  Vous pouvez trouver la version Linux Debian (i386) de pilot-link 0.8.7
  sur  <ftp://ftp.debian.org/pub/debian/dists/stable/main/binary-
  i386/otherosfs/pilot-link_0.8.7-2.deb>.  Si ce fichier n'existe pas,
  vous trouverez probablement une version plus rcente dans le mme
  rpertoire. Si ce n'est pas le cas ou si vous cherchez une version
  plus rcente que celle empaquete pour Debian, vous pouvez installer
  la distribution gnrique, comme dcrit ci-dessous. Installez ce
  fichier de la manire normale, et passez  la section ``Utilisation du
  logiciel pilot-link''.

  Vous pouvez trouver la version Linux RedHat (i386) de pilot-link 0.8.9
  sur  <ftp://ftp.redhat.com/pub/contrib/i386/pilot-
  link-0.8.9-1.i386.rpm>.  Si ce fichier n'existe pas, vous trouverez
  probablement une version plus rcente dans le mme rpertoire. Si ce
  n'est pas le cas ou si vous cherchez une version plus rcente que
  celle empaquete pour RedHat, vous pouvez installer la distribution
  gnrique, comme dcrit ci-dessous. Installez ce fichier de la manire
  normale, et passez  la section ``Utilisation du logiciel pilot-
  link''.

  Pour d'autres versions de Linux ou Unix, ou si vous cherchez la toute
  dernire version, rcuprez la version 0.9.0 de pilot-link sur
  <ftp://ryeham.ee.ryerson.ca/pub/PalmOS/pilot-link.0.9.0.tar.gz>.  Le
  numro de version aura probablement chang, mais les nouvelles
  versions se trouveront probablement au mme endroit avec un nom
  similaire.

  Une fois que vous avec le logiciel, dcompressez-le avec :

          tar -xvzf pilot-link.0.9.0.tar.gz



  Si votre version de tar ne supporte pas l'option -z, dcompressez
  l'archive avec gunzip, comme suit :

          gunzip pilot-link.0.9.0.tar.gz | tar -xvf -



  Cela va crer un rpertoire (pilot-link-0.9.0) contenant les sources.

  Entrez dans ce rpertoire.

  Lancez ./configure. Cela va chercher sur votre systme les
  informations ncessaires  la compilation du logiciel. configure
  prpare pour une installation dans /usr/local par dfaut. Si vous
  souhaitez changer le rpertoire d'installation, lancez ./configure
  --prefix=REP, o REP est le nom du rpertoire dans lequel le logiciel
  sera install.

  Lancez make. Cela compilera le logiciel. Il ne sera par contre
  install que plus tard, ce qui vous permet de l'essayer d'abord. (Si
  vous remplacez une version plus ancienne, vous voulez sans doute vous
  assurer que les fonctionnalits que vous utilisez marchent toujours.
  En gnral, il n'y a pas de problme.)

  En tant qu'utilisateur root, lancez make install. Cela va copier le
  logiciel dans des rpertoires situs sous /usr/local (ou tout autre
  rpertoire que vous avez indiqu avec l'option --prefix). Si vous ne
  pouvez pas vous loguer en tant que root, vous pouvez installer le
  logiciel dans un autre rpertoire sur lequel vous avez des droits
  d'criture.

  N'oubliez pas de rajouter les nouveaux rpertoires contenant les
  excutables  votre chemin de recherche.
  33..11..22..  UUttiilliissaattiioonn dduu llooggiicciieell ppiilloott--lliinnkk


  La plupart des programmes de l'ensemble pilot-link font office de
  "conduits", c'est--dire qu'ils transfrent des donnes depuis ou vers
  votre appareil Palm OS.

  A chaque fois que vous utilisez l'un de ces programmes, appuyez sur le
  bouton HotSync du berceau. Cela initialisera le transfert du ct de
  l'appareil Palm OS. Attention, tous les programmes ne vous demandent
  pas explicitement d'appuyer sur le bouton "HotSync", il vous faudra
  donc penser  le faire.

  Pour plus d'informations, ainsi que pour les autres options de ces
  programmes, reportez-vous  la page de manuel correspondante. Il y a
  une page de manuel de prsentation appele pilot-link. Par exemple,
  pour le programme pilot-xfer, vous pouvez taper man pilot-xfer 
  l'invite de votre shell Unix.


  33..11..22..11..  ppiilloott--xxffeerr


  Il s'agit probablement du programme le plus utile de l'ensemble pilot-
  link, puisque pilot-xfer vous permet d'installer des programmes sur
  votre appareil Palm OS, de faire des sauvegardes et de les remettre en
  place.

  Pour installer un programme :

          pilot-xfer /dev/pilot -i program.prc



  Pour sauvegarder votre appareil Palm OS :

          pilot-xfer /dev/pilot -b rep-sauvegarde



  Cela copiera toutes les bases de donnes de votre appareil Palm OS (y
  compris les programmes) dans un rpertoire appel "rep-sauvegarde", le
  crant s'il n'existait pas dj.

  Pour remettre en place des donnes sauvegardes sur l'appareil Palm OS
  :

          pilot-xfer /dev/pilot -r rep-sauvegarde



  En gnral, vous n'aurez  faire cela que si votre appareil perd son
  alimentation ou si vous avez d faire une remise  zro complte.

  Pour obtenir la liste des programmes prsents sur votre appareil :

          pilot-xfer /dev/pilot -l




  33..11..22..22..  iinnssttaallll--mmeemmoo


  Il installe un fichier Linux sur votre appareil Palm OS en tant que
  mmo.
  Pour installer un mmo dans la catgorie projet (qui doit dj
  exister) :

          install-memo /dev/pilot -c projet projet.memo



  Le nom du fichier sera insr dans le mmo  la premire ligne et
  apparatra dans le rpertoire de mmos de votre appareil.


  33..11..22..33..  mmeemmooss


  Ce programme rcupre chaque mmo sur l'appareil Palm OS et l'affiche
  au format mailbox standard.

  Pour voir vos mmos :

          memos /dev/pilot




  33..11..22..44..  ppiilloott--aaddddrreesssseess


  Transfrez votre base de donnes d'adresses depuis ou vers l'appareil
  Palm OS.

  Pour crire vos adresses dans un fichier Linux depuis l'appareil :

          pilot-addresses /dev/pilot -w fichier.stockage



  Pour lire vos adresses dans un fichier Linux et les mettre sur
  l'appareil :

          pilot-addresses /dev/pilot -r fichier.stockage




  33..22..  MMaakkeeDDoocc


  Un des dfauts du programme de mmos intgr des appareils Palm OS est
  son incapacit  grer correctement les gros documents. Pour y
  remdier, Rick Bram  <mailto:rbram@concentric.net> a crit Doc, un
  lecteur de document pour appareils Palm OS (voir
  <http://www.concentric.net/~rbram/doc.shtml>). Les documents peuvent
  tre convertis au format Doc grce  MakeDoc, de Pat Beirne
  <mailto:pat.beirne@sympatico.ca>.


  33..22..11..  IInnssttaallllaattiioonn ddee MMaakkeeDDoocc


  MakeDoc peut tre rcupr sur
  <http://www.concentric.net/~rbram/makedoc7.cpp>. Compilez-le avec
  votre compilateur C++ et installez l'excutable gnr en tant que
  "makedoc" dans un rpertoire de votre chemin de recherche. Il semble y
  avoir une petite bogue dans makedoc (version 0.7a) qui fait qu'il n'y
  a pas de retour chariot aprs le dernier caractre affich 
  l'utilisateur. Cela ne semble pas tre gnant pour le document gnr,
  mais c'est ennuyeux.

  Un nouvelle version existe, mais elle ncessite Java. Jetez un oeil 
  la page web MakeDoc de Pat Beirne sur
  <http://cpu563.adsl.sympatico.ca/MakeDocJ.htm>.


  33..22..22..  UUttiilliissaattiioonn ddee MMaakkeeDDoocc


  Lancez MakeDoc de la manire suivante :

          makedoc data.txt data.prc "Donnes  afficher avec Doc"



  Cela crera un fichier data.prc, qui peut tre alors install sur
  votre appareil Palm OS  l'aide de pilot-xfer. Le texte "Donnes 
  afficher avec Doc" sera affich dans le rpertoire des documents grs
  par Doc.

  MakeDoc a les syntaxes suivantes :

          makedoc [-n] [-b] <fichier-texte> <fichier-prc> <nom>


  ou

          makedoc -d [-b] <fichier-prc> <fichier-texte>





     <<ffiicchhiieerr--tteexxttee>>
        Le fichier que vous voulez convertir.


     <<ffiicchhiieerr--pprrcc>>
        Le nom du fichier gnr. (Mettez .prc  la fin du nom.)


     <<nnoomm>>
        Le nom que vous voulez voir apparatre dans le rpertoire de
        documents de Doc ou Jdoc.


  Il y a aussi des options pour dcoder le fichier .prc gnr et
  utiliser diffrentes options de compression.


  DD..  PPeerrssoonnnneess


  Kenneth Albanowski  <mailto:kjahds@kjahds.com> assure la maintenance
  des outils pilot-link.

  Donnie Barnes  <mailto:djb@redhat.com> a empaquet pilot-link sous
  forme de fichiers RPM Red Hat.

  Rick Bram  <mailto:rbram@concentric.net> est l'auteur de Doc.

  Matthew Cravit  <mailto:pilot-unix-owner@lists.best.com> gre la liste
  de diffusion pilot-unix.


  Jeff Dionne  <mailto:jeff@ryeham.ee.ryerson.ca> est le premier auteur
  des outils pilot-link. Il gre le site FTP pour le projet de
  dveloppement Unix Palm OS/Pilot.

  Mark W. Eichin  <mailto:eichen@kitten.gen.ma.us> a effectu le portage
  de pilot-link sur Linux Debian.

  David H. Silber  <mailto:pilot@orbits.com> est l'auteur de ce
  document.

  Chris Stevens  <mailto:albert@acm.rpi.edu> assure la maintenance des
  archives de la liste de diffusion pilot-unix.


  EE..  HHiissttoorriiqquuee ddeess aappppaarreeiillss PPaallmm OOSS


  Il existe deux versions du Pilot : les 1000 et 5000 qui ont
  respectivement 128 et 512 Ko de mmoire vive. Ils sont fournis avec
  Palm OS 1.0 en mmoire morte.

  Sont alors apparus deux appareils sous le nom PalmPilot : le PalmPilot
  Personal et le PalmPilot Professional qui ont respectivement 512 Ko et
  1 Mo de mmoire vive. Ils ont aussi l'cran  cristaux liquides
  rtro-clair et la version 2.0 du systme d'exploitation. La version
  Professional a aussi une pile TPC/IP et quelques programmes
  supplmentaires intgrs.

  (IBM a sorti sa propre version du PalmPilot Professional qu'ils
  appellent un WorkPad.)

  On trouve maintenant le Palm III, dont le botier a t redessin et
  qui est quip d'un port infrarouge, sans oublier les 2 Mo de mmoire
  vive et Palm OS 3.0.

  Il est possible de mettre  jour n'importe quel Pilot en changeant la
  carte mmoire, qui contient  la fois la mmoire vive et la mmoire
  morte. Bien sr, cela ne vous rajoute pas le rtro-clairage sur les
  premiers modles de Pilot.



























  Le HOWTO _P_l_u_g_-_a_n_d_-_P_l_a_y pour Linux
  David S.Lawyer    dave@lafn.org
  v0.08, 28 Novembre 1999

  Aide  l'utilisation et  la comprhension des priphriques Plug-and-
  Play.  Comment rendre votre systme Linux apte  grer le Plug-and-
  Play.
  ______________________________________________________________________

  Table des matires
























































  1. Introduction

     1.1 Copyright, Marques dposes, Limitation de garantie & Crdits
        1.1.1 Copyright
        1.1.2 Marques dposes
        1.1.3 Limitation de garantie
     1.2 Pour le futur : Vous pouvez contribuer
     1.3 Nouvelles versions de cet HOWTO

  2. Que devrait faire le PnP : Allouer les "Ressources du bus"

     2.1 En quoi consiste le
     2.2 Comment un ordinateur trouve-t-il les priphriques (et inversement)
     2.3 Adresses d'E/S etc.
     2.4 Les IRQ, vue d'ensemble
     2.5 Les canaux DMA
     2.6 Espace mmoire
     2.7 Les "ressources" pour le priphrique et son pilote
     2.8 Le  problme
     2.9 Le

  3. La solution

     3.1 Introduction au
     3.2 Comment cela fonctionne-t-il ? (explication simplifie)
     3.3 Dmarrage du PC
     3.4 Les bus
     3.5 Linux doit mieux prendre en compte le

  4. Configuration d'un BIOS PnP

     4.1 Avez-vous un systme d'exploitation PnP ?
        4.1.1 Cohabitation avec Windows9x
     4.2 Comment doivent tre contrles les ressources du bus ?
     4.3 Rinitialiser la configuration ?

  5. Comment agir avec les cartes PnP

     5.1 Introduction
     5.2 Dsactiver le
     5.3 Le BIOS configure le PnP
        5.3.1 Introduction  l'utilisation du BIOS pour configurer le
        5.3.2 La base de donnes ESCD du BIOS
        5.3.3 Utilisation de Windows pour paramtrer l'ESCD
        5.3.4 Ajout d'un nouveau priphrique (sous Linux ou sous Windows)
     5.4 Isapnp
     5.5 Utilitaires PCI
     5.6 Corriger le noyau pour rendre Linux compatible PnP
     5.7 Configuration par Windows
     5.8 Configuration par les pilotes de priphriques
     5.9 Logiciels et documents

  6. Communication de la configuration au pilote

     6.1 Introduction
     6.2 Pilote du port srie : setserial
     6.3 Pilotes de cartes son
        6.3.1 OSS-Lite
        6.3.2 OSS (Open Sound System) et ALSA

  7. Quelle est ma configuration actuelle?

     7.1 Comment mes pilotes de priphriques sont-ils configurs ?
     7.2 Comment mes priphriques sont-ils configurs ?

  8. Appendice
     8.1 Adresses
        8.1.1 Adresses de configuration sur le bus ISA (Port de lecture etc.)
        8.1.2 Champs d'adresses
        8.1.3 Espace d'adresses
        8.1.4 Vrification des champs d'adresses (Test des conflits d'adresses E/S ISA)
        8.1.5 Communication directe via la mmoire.
     8.2 Les interruptions - Description dtaille.
     8.3 Interruptions PCI
     8.4 Isolation


  ______________________________________________________________________

  Adaptation franaise : Albert-Paul Bouillot apb@club-internet.fr

  DDffiinniittiioonn :: _P_l_u_g_-_a_n_d_-_P_l_a_y (Installez-et-Utilisez),PPnnPP.  C'est du
  jargon. C'est un matriel ou un logiciel, qui, aprs avoir t
  install ("plugged in"), peut tre utilis immdiatement ("played
  with"), par opposition au matriel ou au logiciel qui ncessite d'tre
  configur.


  11..  IInnttrroodduuccttiioonn

  11..11..  CCooppyyrriigghhtt,, MMaarrqquueess ddppoosseess,, LLiimmiittaattiioonn ddee ggaarraannttiiee && CCrrddiittss

  11..11..11..  CCooppyyrriigghhtt

  Copyright (c) 1998, 1999 de David S. Lawyer.

  Vous pouvez librement copier ou distribuer (vendre ou donner) ce
  document, dans n'importe quel format.  Pour les corrections et les
  modifications mineures, prenez contact avec le gestionnaire. Vous
  pouvez en raliser des travaux drivs et les distribuer  condition
  de :


  1. Envoyer le travail driv (dans le format le plus appropri, par
     exemple sgml) au LDP (Projet de Documentation Linux) ou quivalent
     pour en assurer la diffusion sur Internet. Si ce n'est pas le LDP,
     indiquez-lui l'endroit o il est disponible. Sauf pour les
     traductions, envoyez une copie de ce travail  la dernire url
     indique du gestionnaire ;

  2. tablir une licence dans l'esprit de celle-ci ou utiliser la
     licence GPL. Inclure une notice de copyright et au moins un
     pointeur sur la licence retenue ;

  3. Reconnatre les mrites des auteurs et contributeurs importants.

  Si vous envisagez de faire un travail, autre qu'une traduction, 
  partir de ce document, discutez de votre projet avec le gestionnaire
  actuel.


  11..11..22..  MMaarrqquueess ddppoosseess

  Si certains mots sont des marques dposes, le contexte doit en mettre
  l'appartenance en vidence.  Par exemple "MS Windows" (ou simplement
  "Windows") implique que "Windows" appartient  Microsoft.


  11..11..33..  LLiimmiittaattiioonn ddee ggaarraannttiiee

  Une grande partie des informations contenues dans cet HOWTO ont t
  obtenues d'Internet, de livres qui peuvent tre errons ou obsoltes
  etc.  Bien que je n'aie pas essay de vous induire en erreur
  sciemment, il peut y avoir un certain nombre d'inexactitudes dans ce
  document. Ayez l'obligeance de me le faire savoir.  Dans la mesure o
  cette documentation est gratuite, il est bien vident que ni moi, ni
  les auteurs prcdents (ni le traducteur ;-) ) ne pourront tre tenus
  pour lgalement responsables des erreurs ventuelles.


  11..22..  PPoouurr llee ffuuttuurr :: VVoouuss ppoouuvveezz ccoonnttrriibbuueerr

  Merci de me faire part de toutes erreurs dans les faits, les opinions,
  la logique, l'orthographe et la grammaire, la clart, les liens etc.
  que vous pourrez rencontrer. Mais d'abord, vrifiez que le document ne
  soit pas trop ancien et que vous possdez la dernire version.  Merci
  de m'envoyer toutes les infos que vous pensez devoir concerner ce
  document.

  Je n'ai pas tudi en dtail ni les outils "isapnptools" ni les
  correctifs du noyau de David Howells (mais j'envisage de le faire). De
  mme, je ne comprends pas totalement comment le BIOS configure le PnP
  (cela dpend de la version du BIOS) ni comment Windows9x met  jour
  l'ESCD.  Donc, cet HOWTO est encore incomplet et peut se rvler
  inexact (faites-moi savoir o sont les erreurs). Dans cet HOWTO j'ai
  parfois utilis;nbsp;?? pour indiquer que je ne connais pas vraiment
  la rponse.


  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee cceett HHOOWWTTOO

  Les nouvelles versions du Plug-and-Play-HOWTO devraient tre
  disponibles  peu prs tous les mois pour consultation et/ou
  tl-chargement sur les sites miroirs du LDP.  Pour obtenir une liste
  de ces sites, consultez : <http://metalab.unc.edu/LDP/mirrors.html>.
  Diffrents formats sont disponibles. Si vous voulez rapidement
  vrifier la date de la dernire version, regardez  :
  <http://metalab.unc.edu/LDP/HOWTO/Plug-and-Play-HOWTO.html>.


  22..  QQuuee ddeevvrraaiitt ffaaiirree llee PPnnPP :: AAlllloouueerr lleess ""RReessssoouurrcceess dduu bbuuss""

  22..11..  EEnn qquuooii ccoonnssiissttee llee PPlluugg--aanndd--PPllaayy  ((PPnnPP)) ??

  En simplifiant beaucoup, le _P_l_u_g_-_a_n_d_-_P_l_a_y est une mthode pour
  indiquer automatiquement au logiciel (pilotes de priphriques) o
  trouver diffrents lments matriels (priphriques) tels que modems,
  cartes rseau, cartes son etc. La tche du _P_l_u_g_-_a_n_d_-_P_l_a_y consiste 
  mettre en correspondance les priphriques physiques et les logiciels
  (pilotes de priphriques) qui les font fonctionner et  tablir un
  canal de communication entre chaque priphrique et son pilote. Pour
  ce faire, le PnP alloue les "ressources bus" suivantes  la fois aux
  pilotes et au matriel : adresses d'E/S, IRQ, canaux DMA (uniquement
  pour le bus ISA), rgions mmoire. Si vous ne comprenez pas ce que
  signifient ces quatre notions, lisez les paragraphes suivants.  Aprs
  que ces ressources du bus ont t assignes (et si les pilotes
  adquats sont installs), les noms des units priphriques dans le
  rpertoire /dev sont prts  tre utiliss.

  Cette mthode d'affectation de certaines ressources du bus est
  quelquefois dsigne par le terme "configuration", mais c'est
  uniquement d'une configuration de bas niveau qu'il s'agit. Mme
  lorsque le _P_n_P est utilis au maximum, une bonne partie de la
  configuration des priphriques est ralise par autre chose que le
  _P_n_P. Par exemple, pour la configuration du modem, une "chane de
  caractres d'initialisation" est envoye au modem  travers le "canal"
  adresse d'E/S. Cette "chane de caractres d'initialisation" n'a rien
   voir avec le PnP bien que le "canal" utilis pour l'envoyer ait t
  allou par le PnP. Le rglage de la vitesse (et de beaucoup d'autres
  paramtres) d'un port srie est ralis en envoyant, de programmes
  excuts par l'utilisateur (souvent automatiquement, au dmarrage),
  des messages au pilote de priphrique. Et cette configuration n'a
  rien  voir avec le _P_n_P. Donc, quand on parle de la configuration
  effectue par le_P_n_P, cela ne concerne qu'un certain type de
  configuration.  Alors que d'autres documentations (telle celle de MS
  Windows) parlent simplement de "ressources" quand il s'agit des
  ressources du bus, j'ai volontairement utilis le terme "ressources du
  bus" pour les distinguer de la multitude d'autres ressources
  disponibles.


  22..22..  CCoommmmeenntt uunn oorrddiinnaatteeuurr ttrroouuvvee--tt--iill lleess pprriipphhrriiqquueess ((eett iinnvveerrssee
  mmeenntt))

  Un ordinateur est constitu d'un CPU/processeur qui effectue les
  traitements, et de mmoire pour stocker les programmes et les donnes.
  De plus, il y a un certain nombre de priphriques tels que diffrents
  types d'unit de disques, une carte vido, un clavier, des cartes
  rseau, des cartes modem, des cartes son, des ports srie et parallle
  etc.  Il y a galement une alimentation pour fournir l'nergie
  ncessaire, diffrents bus sur une carte mre pour connecter les
  priphriques au CPU, ainsi qu'un botier pour contenir le tout.

  Dans les temps anciens, la plupart des priphriques avaient leur
  propre carte d'interface (circuits imprims). Aujourd'hui, en plus des
  cartes d'interface, beaucoup de "priphriques" sont de petits
  circuits monts de faon permanente sur une carte unique appele
  "carte mre". Les cartes qui se connectent sur la carte mre peuvent
  contenir plus d'un priphrique.  Les circuits mmoire sont
  quelquefois galement considrs comme des priphriques mais ne sont
  pas _p_l_u_g_-_a_n_d_-_p_l_a_y au sens de cet HOWTO.

  Pour qu'un systme informatique fonctionne correctement, chaque unit
  priphrique doit tre sous le contrle de son "pilote de
  priphrique" Ce logiciel fait partie du systme d'exploitation (ou
  d'un module) et tourne sur le CPU. Les pilotes de priphriques sont
  associs  des "fichiers spciaux" dans le rpertoire /dev, bien que
  ce ne soient pas vraiment des fichiers. Ils ont des noms tels que hda1
  (premire partition sur le disque dur a), ttyS0 (premier port srie),
  eth1 (deuxime carte Ethernet) etc. Pour rendre les choses plus
  compliques, le pilote de priphrique slectionn, disons pour eth1,
  dpendra du type de carte Ethernet que vous aurez. Donc, eth1 ne peut
  pas tre affect  n'importe quel pilote Ethernet, mais  un certain
  pilote qui fonctionnera avec le type de carte que vous avez install.
  Pour grer un priphrique, le CPU (sous le contrle du pilote de
  priphrique), envoie des commandes (et des donnes) vers les
  diffrents priphriques et en lit les infos. Pour cela, chaque pilote
  de priphrique doit connatre l'adresse utilise pour le priphrique
  qu'il gre.  Connatre une telle adresse correspond  mettre en oeuvre
  un canal de communication, mme si le "canal" physique est en ralit
  un bus de donnes dans le PC qui est partag avec pratiquement tout le
  reste.

  Le canal de communication est en ralit un peu plus compliqu que la
  description qui en est faite ci-dessus. Une "adresse" est en ralit
  un ensemble d'adresses et il y a un canal inverse (les interruptions)
  qui permet aux priphriques d'envoyer, en urgence, une requte de
  "demande d'aide" au pilote de priphrique.


  22..33..  AAddrreesssseess dd''EE//SS eettcc..

  Les PC utilisent trois espaces d'adresses : mmoire principale, E/S,
  et configuration (uniquement dans le cas du bus PCI). Les trois types
  d'adresses partagent le mme bus  l'intrieur du PC. Mais la tension
  sur certains fils spcialiss indique  tous les priphriques  quel
  "espace" une adresse appartient : E/S, mmoire centrale, ou
  configuration.  Consultez ``Adresses'' pour plus de dtails. Les
  priphriques sont normalement situs dans l'espace d'adressage E/S
  bien que, maintenant ils utilisent l'espace d'adressage mmoire
  centrale. Une adresse E/S (Entre/Sortie) (ou I/0, pour Input/Output)
  est quelquefois appele simplement "I/O", "IO", "i/o" ou "io". Le
  terme "port d'E/S" (ou "I/O port") est galement utilis.  Il y a deux
  tapes principales pour allouer les adresses d'E/S (ou d'autres
  ressources telles que les interruptions) :


  1. Affecter l'adresse d'E/S etc. sur la carte (dans l'un de ses
     registres)

  2. Communiquer cette adresse d'E/S etc. au pilote.


  Le processus en deux tapes ci-dessus ressemble un peu au problme de
  la recherche du numro de la maison de quelqu'un dans une rue. Vous
  devez obtenir (et noter) le numro de la maison et quelqu'un doit
  avoir appos le numro sur la maison afin qu'on puisse le trouver.
  Dans les ordinateurs, le pilote de priphrique doit obtenir
  l'adresse, et le matriel du priphrique doit installer la mme
  adresse dans l'un de ses registres. Ces deux oprations doivent tre
  ralises, mais certains font l'erreur de ne raliser que l'une de ces
  deux tapes et se demandent ensuite pourquoi l'ordinateur ne peut pas
  trouver le priphrique. Par exemple, ils utiliseront "setserial" pour
  attribuer une adresse  un port srie, sans penser que cela indique
  seulement au pilote quelle est cette adresse. Cela ne slectionne pas
  l'adresse physique du port srie lui-mme. Si le port srie a, en
  ralit, une adresse diffrente (ou pas d'adresse du tout)et que vous
  indiquiez une adresse errone a setserial, vous avez des problmes.

  Une autre obligation, vidente, consiste a avoir paramtr l'adresse
  d'E/S sur la carte avant que le pilote de priphrique n'essaie
  d'utiliser cette adresse. Comme les pilotes de priphriques dmarrent
  souvent ds la mise en route de l'ordinateur, ils essaient quelquefois
  d'accder  une carte (pour tester sa prsence etc. ) avant que
  l'adresse ait t paramtre dans la carte par le programme de
  configuration _P_n_P. Ainsi, vous voyez des messages d'erreur indiquant
  qu'une carte est introuvable bien qu'elle soit prsente (mais son
  adresse n'a pas encore t attribue).

  Ce qui vient d'tre dit dans les deux derniers paragraphes concernant
  les adresses d'E/S s'applique avec la mme force aux autres
  ressources : ``Les IRQ --Vue d'ensemble'', ``Canaux DMA'',et ``Espace
  mmoire''.  C'est ce que nous allons expliquer dans les trois
  paragraphes suivants.


  22..44..  LLeess IIRRQQ,, vvuuee dd''eennsseemmbbllee

  Aprs avoir lu ce paragraphe, il faut lire ``Interruptions --Dtails''
  pour avoir quelques dtails complmentaires.  Ce qui suit est
  volontairement trs simplifi : en plus de l'adresse, il faut
  galement prendre en compte un numro d'interruption (tel que IRQ5),
  que l'on appelle galement numro d'IRQ (IRQ = Interrupt ReQuest,
  demande d'interruption). Nous avons dj mentionn plus haut que le
  pilote de priphrique doit connatre l'adresse de la carte de faon 
  pouvoir communiquer avec elle. Mais comment se fait la communication
  dans l'autre sens ? Supposons que le priphrique ait besoin de dire
  quelque chose  son pilote immdiatement.  Par exemple, le
  priphrique peut venir de recevoir une rafale d'octets destins 
  aller en mmoire centrale et que le priphrique ait besoin de
  demander  son pilote de venir les rcuprer immdiatement de sa
  mmoire tampon pratiquement pleine pour les transfrer en mmoire
  centrale.

  Comment le priphrique peut-il appeler son pilote  l'aide ? Il ne
  peut pas utiliser le bus de donnes principal puisque celui-ci est
  dj en cours d'utilisation. Au lieu de cela, il lance un appel en
  mettant une certaine tension sur une ligne d'interruption (qui fait
  partie du bus). Il y a l'quivalent de 16 lignes, et chacune d'elle
  correspond (indirectement)  un certain pilote de priphrique.
  Chaque ligne possde un numro d'interruption (IRQ) unique (IRQ =
  Interrupt ReQuest). Le priphrique doit envoyer son interruption sur
  la bonne ligne et le pilote de priphrique doit attendre
  l'interruption sur cette ligne. Le numro d'IRQ stock dans le
  priphrique dtermine quelle est la ligne concerne. Ce mme numro
  d'IRQ doit tre connu du pilote de priphrique de manire que celui-
  ci sache quelle ligne d'IRQ le concerne.

  Lorsqu'un pilote de priphrique reoit une interruption (un appel 
  l'aide) il doit se renseigner sur la cause de l'mission de cette
  interruption et effectuer les actions appropries pour y rpondre. Sur
  un bus ISA chaque priphrique a besoin d'un numro d'interruption
  unique (sauf que deux ports srie ou plus peuvent partager la mme
  interruption depuis le noyau 2.2). Sur un bus PCI, le partage des
  interruptions est permis.


  22..55..  LLeess ccaannaauuxx DDMMAA

  Les canaux DMA ne concernent que le bus ISA.  DMA signifie "Accs
  Direct Mmoire" (Direct Memory Access). Dans ce cas, le priphrique
  est autoris  prendre le pas sur le CPU pour le contrle du bus et 
  transfrer les octets directement en mmoire centrale. Normalement le
  CPU effectuerait un tel transfert en deux tapes :

  1. Lecture de l'espace mmoire E/S du priphrique et stockage de ces
     octets dans le CPU lui-mme

  2. criture de ces octets du CPU dans la mmoire centrale.

     Avec le DMA le processus de transfert des octets du priphrique
     vers la mmoire centrale se droule normalement en une seule tape.
     Les priphriques doivent avoir cette capacit intgre dans le
     matriel, et donc tous les priphriques ne fonctionnent pas en
     DMA. Pendant que le transfert DMA est en cours d'excution, le CPU
     ne peut pas faire grand-chose puisque le bus principal est utilis
     par ce transfert DMA.

  Le bus PCI n'a pas vraiment de DMA, mais plutt quelque chose de
  mieux : le "contrle du bus" (bus mastering). Cela fonctionne un peu
  comme le DMA et on l'appelle quelquefois DMA (par exemple, les units
  de disques durs se nomment "UltraDMA"). Cette technique permet aux
  priphriques de prendre temporairement le contrle du bus et de
  transfrer des octets exactement comme le fait le CPU lorsqu'il a le
  contrle du bus. On n'utilise pas de numros de canaux car le bus PCI
  est constitu de telle manire que le matriel sait quel est le
  contrleur du bus actuel et quel est le priphrique qui demande  le
  devenir. Il n'y a donc pas d'allocation de canaux DMA dans le cas d'un
  bus PCI.

  Quand un priphrique, sur un bus ISA, dsire effectuer un transfert
  DMA, il gnre une requte de DMA en utilisant une ligne spcialise
  comme pour une demande d'interruption. Le DMA aurait pu tre ralis
  en utilisant les interruptions mais cela aurait introduit des retards,
  donc il est plus rapide d'utiliser un type d'interruption spcial
  connu sous le nom de requte DMA. Comme les interruptions, les
  requtes DMA sont numrotes de faon  identifier le priphrique qui
  a envoy cette requte. Ce numro est appel canal DMA.  Puisque tous
  les transferts DMA utilisent le bus principal (et qu'un seul
  utilisateur ne peut utiliser ce bus  un instant donn) ils utilisent
  tous le mme canal, mais le numro de "canal DMA" sert  identifier
  qui est en train d'utiliser le "canal". Des registres existent sur la
  carte mre pour stocker l'tat courant de chaque "canal". Donc, pour
  mettre une requte DMA, le priphrique doit connatre son numro de
  canal DMA qui doit tre stock dans un registre sur le priphrique
  physique.


  22..66..  EEssppaaccee mmmmooiirree

  Certains priphriques se voient assigner des adresses dans l'espace
  de la mmoire principale. On parle souvent de "mmoire partage" ou
  "d'E/S en zone mmoire". Quelquefois, il s'agit de mmoire morte (ROM)
  sur le priphrique. A propos de ressources _P_n_P, on parle simplement
  de "mmoire". Un tel priphrique peut galement utiliser l'espace
  d'adressage E/S.

  Lorsque vous branchez une telle carte, en ralit vous connectez un
  module mmoire pour la mmoire principale. Cette mmoire peut tre
  soit de la mmoire morte (ROM = Read Only Memory) soit de la mmoire
  partage. La mmoire partage est partage entre le priphrique et
  l'Unit Centrale (CPU qui excute le pilote de priphrique). Cette
  mmoire peut servir de moyen de "transfert" direct des donnes entre
  le priphrique et la mmoire principale. En ralit, ce n'est pas un
  transfert  proprement parler puisque le priphrique met ses donnes
  dans sa propre mmoire qui se trouve tre galement la mmoire
  centrale.  la fois la carte et le pilote de priphrique doivent
  savoir o cela se passe.  Il faut utiliser des adresses mmoires
  hautes de faon  viter tout conflit avec les circuits mmoires des
  adresses basses (de la mmoire centrale) de votre ordinateur.

  Pour la ROM, c'est diffrent. C'est comme un programme (peut-tre le
  pilote de priphrique) qui serait utilis avec le priphrique.
  Heureusement, il peut tourner avec Linux et pas seulement avec Windows
  ?? Il peut tre ncessaire de le dupliquer en mmoire centrale pour le
  faire tourner plus vite. Une fois dupliqu, il n'est plus "en lecture
  seule".


  22..77..  LLeess ""rreessssoouurrcceess"" ppoouurr llee pprriipphhrriiqquuee eett ssoonn ppiilloottee

  Donc, les pilotes de priphriques doivent tre "attachs" d'une faon
  quelconque au matriel qu'ils contrlent. Cela est ralis en
  fournissant des "ressources" (E/S, Mmoire, IRQ, DMA)  la fois au
  priphrique physique et au logiciel de pilotage. Par exemple, un port
  srie n'utilise seulement que 2 ressources (parmi les 4 possibles) :
  une IRQ et une adresse d'E/S. Ces deux valeurs doivent tre fournies
  au pilote de priphrique et au priphrique physique. On donne alors
  un nom (tel que ttyS1) au pilote (et  l'unit priphrique
  correspondante) dans le rpertoire /dev.  L'adresse et le numro d'IRQ
  sont stocks dans un registre sur la carte du priphrique physique
  (ou dans un circuit sur la carte mre). Si l'on utilise de cavaliers,
  cette information est toujours stocke dans la partie "matriel" du
  priphrique (sur la carte etc.). Mais dans le cas du _P_n_P, la donne
  enregistre est gnralement perdue lors de l'arrt du PC (mise hors
  tension) de sorte que cette donne doit tre fournie  chaque fois que
  le PC est remis en fonction.





  22..88..  LLee  pprroobbllmmee

  L'architecture du PC fournit seulement un nombre limit d'IRQ, de
  canaux DMA, d'adresses d'E/S et de rgions mmoire.  S'il n'y avait
  que quelques priphriques et qu'ils aient des ressources
  standardises (comme des adresses d'E/S et des numros d'IRQ uniques)
  il n'y aurait aucun problme pour attacher des pilotes de
  priphriques aux units priphriques. Chaque unit aurait des
  ressources fixes qui n'entreraient en conflit avec aucune autre unit
  priphrique de l'ordinateur. Deux priphriques n'auraient pas la
  mme adresse d'E/S, la mme IRQ etc. Chaque pilote pourrait tre
  programm avec l'adresse d'E/S, l'IRQ etc. codes en dur dans le
  programme. La vie serait simple.

  Mais ce n'est pas le cas. Non seulement il existe tellement de
  priphriques diffrents aujourd'hui que les conflits sont frquents,
  mais, de plus, on a souvent besoin d'avoir plus d'un priphrique d'un
  type donn. Par exemple, on peut vouloir disposer de plusieurs units
  de disques diffrentes, de plusieurs ports srie etc. Pour ces
  raisons, les priphriques doivent tre paramtrables afin que l'on
  puisse leur attribuer les adresses, IRQ etc.  que l'on dsire pour
  viter les conflits. Mais quelques IRQ et adresses sont tout  fait
  standard comme celles de l'horloge et du clavier. Elles ne ncessitent
  pas une telle adaptabilit.

  En dehors du problme de conflit d'allocation des ressources, il y a
  le problme de l'erreur en communiquant la nature des ressources au
  pilote de priphrique. Par exemple, supposons que vous ayez entr IRQ
  4 dans un fichier de configuration alors que le priphrique utilise,
  en ralit, l'IRQ 5.  C'est un autre type d'erreur dans l'allocation
  des ressources du bus.

  L'allocation des ressources du bus, si elle est correctement ralise,
  tablit des canaux de communication entre les priphriques physiques
  et leurs pilotes. Par exemple, si une certaine gamme d'adresses d'E/S
  (ressource) est alloue  la fois  un pilote de priphrique et  un
  matriel, alors on a tabli un canal de communication  sens unique
  entre eux. Le pilote peut envoyer des commandes et des informations au
  priphrique. C'est, en ralit, un peu plus qu'un canal  sens unique
  puisque le pilote peut obtenir des informations du priphrique en
  consultant ses registres. Mais le priphrique ne peut pas prendre
  l'initiative d'une communication de cette faon. L'allocation d'une
  IRQ est ncessaire pour crer un canal de communication bi-
  directionnel, o  la fois le pilote et le priphrique peuvent
  prendre l'initiative d'une communication.


  22..99..  LLee PPnnPP  ddtteeccttee lleess pprriipphhrriiqquueess ccoonnnneeccttss aauuxx ppoorrttss ssrriiee

  Les priphriques externes qui se connectent au port srie par un
  cble (comme les modems externes) peuvent galement tre appels _P_l_u_g_-
  _a_n_d_-_P_l_a_y Puisque seul le port srie lui-mme ncessite des ressources
  (une IRQ et une adresse d'E/S), il n'y a pas de ressources  allouer 
  un priphrique qui se connecte  un tel port. Donc, le _P_n_P n'a pas
  vraiment de raison d'tre pour ces priphriques. Cela, mme s'il y a
  des spcifications _P_n_P pour de tels priphriques srie.

  Un systme d'exploitation _P_n_P les dtectera et saura lire leur numro
  de modle etc. Il sera donc alors capable de trouver un pilote de
  priphrique adapt et vous n'aurez pas  dire  un programme
  d'application que vous utilisez disons, /dev/ttyS1. Mais puisque vous
  devriez tre capable d'indiquer manuellement  votre ordinateur (par
  l'intermdiaire d'un fichier de configuration etc.) sur quel port
  srie votre priphrique est connect (et ventuellement le modle
  dont il s'agit) vous n'avez pas rellement besoin de cette
  fonctionnalit "port srie" du _P_n_P.
  33..  LLaa ssoolluuttiioonn PPlluugg--aanndd--PPllaayy  ((PPnnPP))

  33..11..  IInnttrroodduuccttiioonn aauu PPnnPP

  Le terme _P_l_u_g_-_a_n_d_-_P_l_a_y (PnP) (Installez et Utilisez) a plusieurs sens.
  Au sens large c'est uniquement une auto-configuration o l'on installe
  simplement un priphrique et que celui-ci se configure par lui-mme.
  Au sens o je l'entends dans cet HOWTO, la configuration ne concerne
  que la configuration de la ressource PnP et la communication de
  l'information au pilote de priphrique. Dans un sens plus troit
  c'est simplement le paramtrage des ressources des priphriques.
  Cela peut aussi concerner les spcifications qui, (entre autres
  choses) indiquent comment les donnes PnP de la ressource doivent tre
  lues ou crites dans les priphriques (souvent des cartes) sur le bus
  ISA. Les spcifications du standard PCI (et non PnP) sont de mme
  nature pour le bus PCI.

  Le _P_l_u_g_-_a_n_d___P_l_a_y _(_P_n_P_) met en relation les priphriques et leurs
  pilotes et spcifie leurs "canaux" de communication. Sur le bus ISA,
  avant le _P_l_u_g_-_a_n_d_-_P_l_a_y, les ressources taient configures sur le
  matriel par des cavaliers et les pilotes de priphriques taient
  assigns aux ressources par des fichiers de configuration (ou quelque
  chose du mme style) ou par des tests des priphriques  des adresses
  o ils taient supposs se trouver.  Le bus PCI a t compatible PnP
  ds le dbut et il a t trivial d'implmenter le PnP pour ce bus.
  Mais comme les spcifications du bus PCI n'utilisent pas le terme PnP
  on ne sait pas si l'on doit dire que le bus PCI est PnP (mais il
  supporte le matriel que l'on appelle aujourd'hui PnP).


  33..22..  CCoommmmeenntt cceellaa ffoonnccttiioonnnnee--tt--iill ?? ((eexxpplliiccaattiioonn ssiimmpplliiffiiee))

  Voici une explication trs simple de la faon dont fonctionne le _P_n_P.
  Le programme de configuration _P_n_P (ventuellement un programme du
  BIOS) recherche tous les priphriques _P_n_P et demande  chacun les
  ressources du bus dont il a besoin. Ensuite, il regarde les ressources
  du bus (IRQs, etc.) qu'il doit attribuer. Bien sr, s'il y a des
  ressources du bus rserves par des priphriques (anciens) non _P_n_P
  (dont il a connaissance), il ne les attribue pas. Puis il utilise un
  certain critre (non prcis dans les spcifications _P_n_P) pour
  attribuer les ressources de faon  ce qu'elles n'entrent pas en
  conflit et que tous les priphriques obtiennent ce dont ils ont
  besoin.  Il indique alors  chaque priphrique physique quelles
  ressources du bus lui ont t affectes et chacun se configure alors
  pour n'utiliser que les seules ressources du bus qui lui ont t
  affectes.

  Par exemple, supposons qu'une carte carte ait besoin d'une
  interruption (d'un numro d'interruption) et de 1 MB de mmoire
  partage. Le programme _P_n_P lit cette requte dans la carte. Il
  attribue alors le numro d'interruption 5 (IRQ 5) et un mga-octet
  d'espace mmoire  partir de l'adresse 0xe9000000. Ce n'est pas
  toujours aussi simple car la carte peut utiliser uniquement certains
  numros d'interruption (seulement pour ISA) ou n'accepter qu'un
  certain domaine d'adressage. Les dtails sont diffrents pour les bus
  ISA et PCI, les choses tant plus complexes pour le bus ISA

  Le logiciels _P_n_P peut utiliser quelques raccourcis. L'un d'entre eux
  consiste  garder une trace de la manire dont il a assign les
  ressources du bus lors de la dernire configuration (lors de la
  dernire utilisation de l'ordinateur) et la rutiliser. Windows9x et
  les BIOS PNP le font mais ce n'est pas le cas du Linux standard.
  Windows9x enregistre ces informations dans ses "Registres" sur le
  disque dur et un BIOS PnP le fait dans la mmoire non volatile de
  votre PC (connu sou le nom d' ESCD; voir ``La Base de donnes ESCD du
  BIOS'').
  Sous Linux, c'est le rgne du "chaque priphrique pour lui-mme" et
  il n'existe aucun registre centralis des affectations de ressources.
  Certains pilotes de priphriques enregistrent la dernire
  configuration qu'ils ont utilis et la rutilisent  la prochaine
  remise en route de l'ordinateur. Implicitement, ils considrent que le
  reste du matriel n'aura pas besoin d'utiliser ses ressources du bus.

  Si les priphriques se souvenaient de leur configuration prcdente,
  il n'y aurait aucun matriel pour les reconfigurer au prochain
  dmarrage, mais ils semblent oublier leur configuration lorsque l'on
  stoppe l'alimentation. Certains priphriques ont une configuration
  par dfaut (mais pas ncessairement la dernire utilise). Le
  programme de configuration _P_n_P doit tre excut  chaque mise sous
  tension du PC. De mme, si l'on ajoute un nouveau priphrique, celui-
  ci a besoin d'tre configur.  L'allocation de ressources du bus  ce
  nouveau priphrique peut ncessiter d'en enlever  un priphrique
  existant et de donner  celui-ci des ressources du bus diffrentes
  qu'il pourra utiliser  la place.


  33..33..  DDmmaarrrraaggee dduu PPCC

  Lors de la mise sous tension initiale du PC le circuit BIOS excute
  son programme pour dmarrer l'ordinateur (la premire tape consistant
   tester le matriel). Si le systme d'exploitation est stock sur le
  disque dur (ce qui constitue le cas normal), le BIOS doit trouver le
  disque dur. Si le disque dur est _P_n_P, alors le BIOS doit utiliser une
  mthode PnP pour le trouver. Donc, pour permettre  l'utilisateur de
  configurer manuellement la mmoire CMOS du BIOS et de ragir aux
  messages d'erreur apparaissant au dmarrage de l'ordinateur, un cran
  (une carte vido) et un clavier sont galement ncessaires.  Donc, le
  BIOS doit configurer, selon la procdure PnP, ces priphriques lui-
  mme.

  Une fois que le BIOS a identifi le disque dur, la carte vido et le
  clavier il est prt  entamer le processus de dmarrage (chargement du
  systme d'exploitation du disque dur vers la mmoire centrale). Si
  vous avez indiqu  votre BIOS que vous aviez un systme
  d'exploitation _P_n_P (SE PnP ou PnP OS), il devrait commencer  dmarrer
  le PC de la manire indique ci-dessus et laisser le soin de terminer
  la configuration _P_n_P au systme d'exploitation. Autrement, un BIOS-PnP
  essaiera de raliser le reste de la configuration _P_n_P des
  priphriques avant le chargement du systme d'exploitation (mais ne
  chargera pas leurs pilotes).


  33..44..  LLeess bbuuss

  Le bus ISA est le vieux bus du vieil IBM PC alors que le bus PCI est
  un bus plus rcent et plus rapide de Intel. Le bus PCI a t conu
  pour ce que l'on appelle aujourd'hui le _P_n_P. Il est facile (si l'on
  compare au bus ISA) de voir comment les ressources du bus ont t
  assignes aux priphriques.  Pour voir comment cela s'est pass
  consulter le "fichier" /proc/pci (/proc/bus/pnp/devices pour les
  noyaux 2.2+), les messages de dmarrage sur votre cran (utilisez
  shift-PageUp pour revenir en arrire), ou utilisez les utilitaires PCI
  (pour les noyaux 2.2+).

  Pour ce qui concerne le bus ISA, il y a un vrai problme pour
  implmenter le _P_n_P car personne n'y pensait lors de la conception de
  ce bus et il n'y a pratiquement pas d'adresse d'E/S disponible pour
  communiquer les informations de configuration aux priphriques
  physiques. Il en rsulte que la manire dont le _P_n_P a t implant sur
  le bus ISA est trs complique. Un livre entier a t rdig  ce
  sujet. Voir ``Le livre du PnP''. Entre autres choses, le programme _P_n_P
  doit attribuer  chaque priphrique _P_n_P un "identificateur"
  provisoire de faon  pouvoir l'adresser pour la configuration _P_n_P.
  L'assignation de ces "identificateurs" provisoires est appele
  "isolation". Voir ``Isolation'' pour de plus amples dtails.

  Finalement, le bus ISA finira par disparatre. Ce jour l, le _P_n_P
  deviendra plus simple puisqu'il sera facile de voir comment le BIOS a
  configur le matriel. Il restera cependant ncessaire de mettre en
  correspondance les priphriques et leurs pilotes ainsi que de
  configurer les priphriques ajouts alors que le PC est en
  fonctionnement. Ces besoins seraient satisfaits si Linux tait un
  systme d'exploitation _P_n_P.


  33..55..  LLiinnuuxx ddooiitt mmiieeuuxx pprreennddrree eenn ccoommppttee llee PPnnPP

  Le _P_n_P (pour le bus ISA) a t invent par Compaq, Intel et Phoenix.
  Microsoft a t un des leaders de sa promotion. Linux aurait t
  meilleur si le _P_n_P n'avait jamais t "invent". Finalement, le bus
  ISA aura disparu et le bus PCI  la mode _P_n_P prvaudra de sorte que
  nous aurons alors un _P_n_P facile  implanter. Mais, que l'on veuille ou
  pas, la plupart des nouveaux matriels ISA aujourd'hui sont _P_n_P et
  Linux ne peut pas faire autrement que de grer efficacement le _P_n_P.
  Cependant le Linux standard (celui du dbut 1999) rend la gestion du
  _P_n_P complique (spcialement pour le bus ISA) alors que le but du _P_n_P
  tait de rendre les choses faciles.

  D'une certaine faon, Linux est un peu _P_n_P pour le bus PCI.  Quand le
  PC dmarre vous pouvez noter, en lisant les messages sur la console,
  que certains pilotes de priphriques Linux trouvent leurs
  priphriques (et les ressources du bus que le BIOS leur a attribu).
  Mais il y a des situations o un systme d'exploitation _P_n_P pourrait
  prendre les choses en compte de manire plus satisfaisante :

  1. En cas de pnurie de ressources du bus;

  2. S'il y a plus d'un pilote pour un priphrique physique;

  3. Si un pilote de priphrique activ ne peut pas trouver le
     priphrique physique;

  4. Installation  chaud d'un priphrique.

     Les utilisateurs de Linux ne devraient pas avoir  plonger dans les
     dtails du _P_n_P pour configurer leurs priphriques _P_n_P ISA comme
     ils doivent le faire. Une solution pourrait consister  avoir une
     version standardise du noyau qui supporterait le _P_l_u_g_-_a_n_d_-_P_l_a_y sur
     les bus ISA, PCI et autres. Un correctif pour le noyau a t crit,
     bien que la plupart des pilotes ne le grent pas. Il ne fait pas
     partie du Linux standard.  Voir ``Correctif noyau''.


  44..  CCoonnffiigguurraattiioonn dd''uunn BBIIOOSS PPnnPP

   la mise sous tension de l'ordinateur, le BIOS s'excute avant que le
  systme d'exploitation ne soit charg. Les nouveaux BIOS sont PnP et
  configurent quelques-uns ou la totalit des priphriques PnP. Il
  n'est pas possible de dsactiver la plupart des BIOS PnP, donc il faut
  faire avec. Voici quelques-uns des choix possibles dans le menu BIOS
  (quelquefois appel CMOS) :

    ``Avez-vous un systme d'exploitation PnP ?''

    ``Comment doivent tre contrles les ressources du bus ?''

    ``Rinitialiser la configuration ?''

  44..11..  AAvveezz--vvoouuss uunn ssyyssttmmee dd''eexxppllooiittaattiioonn PPnnPP ??

  Si vous rpondez oui, alors le BIOS PnP commencera  configurer le
  disque dur, la carte vido et le clavier pour permettre le dmarrage
  du systme.  Mais il laissera le soin de terminer la configuration au
  systme d'exploitation. Il peut faire une ``isolation'' sur le bus ISA
  en laissant les priphriques dsactivs, mais prts  tre configurs
  par le systme d'exploitation. Pour Linux, vous devrez probablement
  indiquer que votre systme d'exploitation n'est pas _P_n_P. Si vous ne le
  faites pas, le BIOS risque de laisser vos priphriques ISA, qu'il n'a
  pas configurs,en tat dsactiv ?? Et les priphriques PCI peuvent
  galement ne pas tre configurs ?

  Si vous rpondez non, alors le BIOS fera la configuration lui-mme. Il
  utilisera la configuration prcdente, sauvegarde dans la mmoire non
  volatile (ESCD),  moins que vous n'ayez ajout de nouveaux
  priphriques PnP.  Voir ``La base de donnes ESCD du BIOS'' Si votre
  dernire session d'utilisation de l'ordinateur a t faite sous Linux,
  il n'y aura pas de modification de configuration.  Voir ``Le BIOS
  configure le PnP''.  Mais si cette dernire session a t faite sous
  Windows 9x (qui est PnP), alors Windows peut avoir modifi l'ESCD.
  Normalement, il ne le fera que si vous "forcez" une configuration ou
  si vous installez un priphrique ancien.  Voir ``Utilisation de
  Windows pour paramtrer l'ESCD''.  Si vous utilisez le(s) programme(s)
  utilitaire(s) isapnp ou PCI pour raliser la configuration, ils
  s'excuteront aprs le BIOS et modifieront les choses de la faon que
  vous leur aurez indiqu.


  44..11..11..  CCoohhaabbiittaattiioonn aavveecc WWiinnddoowwss99xx

  Si vous faites tourner Windows sur le mme PC, comment rpondre  la
  question du BIOS : Avez-vous un Systme d'Exploitation (SE) _P_n_P ?
  Normalement (et avec confiance) vous devriez dire non pour Linux
  standard et oui pour Windows9x. Mais il est particulirement pnible
  d'avoir  paramtrer le menu CMOS manuellement  chaque fois que vous
  changez de SE.  Une solution consiste  paramtrer la CMOS pour un SE
  non _P_n_P, mme si vous dmarrez sous Windows. On peut esprer que
  Windows sera capable de prendre en compte cette situation o tout le
  matriel a t entirement configur par le BIOS. De plus, on peut
  penser que mme si Windows ne s'aperoit pas que le matriel a dj
  t configur, il fera la configuration lui-mme et que tout ira bien.
  Mais il semble que cela ne se passe pas ainsi. Windows ne semble
  seulement capable d'indiquer aux pilotes de priphriques que ce qui
  est enregistr dans les registres Windows.  Mais, la configuration
  matrielle relle (effectue par le BIOS) est celle qui est
  enregistre dans l'ESCD et elle peut tre diffrente de celle des
  registres => donc ennuis.

  Une solution pour essayer d'avoir les mmes infos dans les registres
  et dans l'ESCD consiste  installer (ou rinstaller) Windows aprs que
  le BIOS ait t configur pour un "SE non _P_n_P".  Cela devrait
  permettre de prsenter  Windows un systme configur par le BIOS. Si
  cette configuration se fait sans conflits, avec un peu de chance,
  Windows s'en contentera et la sauvegardera dans ses registres. Si cela
  fonctionne pour vous (et c'est la dernire version de cet HOWTO),
  faites-le moi savoir car je n'ai eu qu'une seule indication me disant
  que cela marchait.

  Une autre mthode consiste  "enlever" les priphriques qui causent
  des problmes  Windows en cliquant sur "enlever" dans le gestionnaire
  de priphriques. Ensuite, redmarrez le PC avec "SE non _P_n_P"
  (paramtr dans la CMOS au moment du redmarrage. Windows
  rinstallera alors les priphriques, en utilisant, on l'espre, le
  paramtrage des ressources du bus tel que configur par le BIOS.
  Pensez que Windows peut vous demander d'insrer le CD d'installation
  de Windows dans le lecteur car, quelquefois, il ne trouve pas les
  fichiers de pilotes (et autres) mme s'ils sont dj prsents. Pour le
  vrifier, j'ai "enlev" la carte NIC (carte interface rseau) qui
  avait un pilote compatible Novell. Au redmarrage, Windows l'a
  rinstalle pour un rseau Microsoft au lieu de Novell. Ce qui
  signifie que le client Novell a d tre rinstall. Indiquez moi vos
  problmes lors de l'utilisation de cette mthode (uniquement pour la
  dernire version de cet HOWTO).


  44..22..  CCoommmmeenntt ddooiivveenntt ttrree ccoonnttrrlleess lleess rreessssoouurrcceess dduu bbuuss ??

  cela peut simplement signifier de dcider comment allouer les
  ressources du bus pour les IRQ et le DMA.  Sur "auto", le bios se
  chargera de l'allocation. Sur manuel, vous rserverez manuellement
  certaines IRQ  utiliser pour des cartes anciennes (cartes non-pnp).
  Maintenant le BIOS peut, ou non, reconnatre vos vieilles cartes. Le
  BIOS ne reconnatra vos cartes anciennes que si vous faites tourner
  ICU (ou quelque chose comme cela) sous Windows pour les faire
  reconnatre par le BIOS. S'il les reconnat, alors essayez l'option
  "auto". S'il ne les reconnat pas, alors rservez manuellement les IRQ
  ncessaires pour les cartes ISA anciennes et laissez BIOS PnP allouer
  le reste.


  44..33..  RRiinniittiiaalliisseerr llaa ccoonnffiigguurraattiioonn ??

  Cette opration effacera de la base de donnes ESCD du BIOS la manire
  dont les priphriques PnP doivent tre configurs ainsi que la liste
  de configuration des priphriques anciens (non-PnP). Ne jamais faire
  cela  moins d'tre convaincu que cette base de donnes est errone et
  doit tre refaite. Il a t dit quelque part que vous ne devriez faire
  cela que dans le cas o votre ordinateur refuserait de dmarrer. Si le
  BIOS perd les donnes sur les priphriques anciens, alors vous devrez
  faire tourner  nouveau ICA sous Windows pour retrouver ces donnes.


  55..  CCoommmmeenntt aaggiirr aavveecc lleess ccaarrtteess PPnnPP

  55..11..  IInnttrroodduuccttiioonn

  Aujourd'hui, la plupart des nouvelles cartes internes sont _P_l_u_g_-_a_n_d_-
  _P_l_a_y _(_P_n_P_). Bien qu'il existe quelques logiciels sous Linux pour grer
  le _P_n_P ils ne sont pas toujours d'utilisation facile.  Il y a 6
  mthodes diffrentes, dont la liste suit, pour s'occuper du _P_n_P (mais
  certaines peuvent ne pas tre utilisables dans notre situation).
  Celle(s)  utiliser dpend(ent) de nos objectifs. Ce qui semble tre
  le plus efficace dans l'immdiat peut se rvler ne pas tre le plus
  facile et le meilleur dans le long terme. Une mthode qui parat
  simple consiste  ne rien faire et  laisser le BIOS-PnP effectuer la
  configuration, mais vous devrez faire quelques investigations pour
  dcouvrir ce qu'a fait le BIOS. Il faudrait que quelqu'un qui a tester
  toutes les mthodes en fasse une comparaison et l'crive. Vous pouvez
  avoir  utiliser plus d'une mthode pour arriver  vos fins.


    ``Dsactiver le PnP''  par cavaliers (mais ce n'est pas possible
     pour de nombreuses cartes) ou par un logiciel spcial

    ``Le BIOS configure le PnP'' (Pour le bus PCI, vous avez seulement
     besoin d'un BIOS PCI, autrement, il vous faut BIOS PnP)

    ``Isapnp'' c'est un programme que vous pouvez toujours utiliser
     pour configurer les priphriques PnP sur le bus ISA uniquement


    ``Utilitaires PCI'' pour effectuer la configuration du bus PCI

    ``Configuration par Windows'' puis vous lancez Linux  partir de
     Windows/DOS.  utiliser en dernier recours

    ``Patch Kernel'' pour transformer Linux en un systme
     d'exploitation PnP.

    ``Configuration par le pilote de  priphrique'', mais peu le font.

  Chacune des solutions ci-dessus configurera les ressources du bus dans
  le matriel. Seule les deux dernires solutions devraient informer le
  pilote du priphrique de ce qui a t fait. Mais seule la dernire le
  fait srement (puisque c'est le pilote lui-mme qui le fait). La faon
  dont le pilote se trouve inform dpend de lui et vous pouvez avoir 
  faire quelque chose pour le renseigner. Voir  ``Indiquer la
  configuration au pilote''


  55..22..  DDssaaccttiivveerr llee PPnnPP  ??

  De nombreux priphriques sont uniquement PnP, sans option pour le
  dsactiver. Mais, pour certains, vous pouvez dsactiver le _P_n_P avec
  des cavaliers ou en utilisant un programme sous Windows qui est fourni
  avec le priphrique (configuration sans cavaliers). Cela vite la
  tche souvent complique de configuration _P_n_P. N'oubliez d'indiquer au
  BIOS que ces ressources du bus sont rserves. Il y a aussi plusieurs
  raisons pour lesquelles vous pouvez ne pas vouloir dsactiver le _P_n_P :


  1. Si vous avez MS Windows sur la mme machine, vous voulez permettre
     au PnP sous MS Windows de configurer les priphriques de faon
     diffrente que sous Linux.

  2. Le champ des possibilits de choix des numros d'IRQ (ou des
     adresses de ports) etc. peut tre particulirement restreint si
     l'on n'utilise pas le PnP.

  3. Vous avez un pilote de priphrique sous Linux qui utilise les
     mthodes _P_n_P pour chercher le priphrique qu'il contrle.

  4. Si vous avez  changer la configuration dans le futur, cela peut
     tre plus facile en utilisant le _P_n_P (pas de cavaliers  dplacer
     ou de programme Dos/Windows  faire tourner).

  5. Vous pouvez avoir (ou aurez) d'autres priphriques _P_n_P qui auront
     besoin d'tre configurs et vous voulez donc le prvoir (ou
     l'tudier) de toute faon.

     Une fois qu'ils sont configurs comme des priphriques non-PnP,
     ils ne peuvent plus tre configurs par un logiciel PnP ou par le
     BIOS ( moins que vous ne dplaciez les cavaliers et/ou n'utilisiez
      nouveau le logiciel de configuration Dos/Windows).


  55..33..  LLee BBIIOOSS ccoonnffiigguurree llee PPnnPP

  55..33..11..  IInnttrroodduuccttiioonn  ll''uuttiilliissaattiioonn dduu BBIIOOSS ppoouurr ccoonnffiigguurreerr llee PPnnPP

  Si vous avez un BIOS PnP, il peut configurer le matriel. Cela
  signifie que votre BIOS lit les besoins en ressources de tous les
  priphriques et les configure (leur alloue les ressources du bus).
  C'est un substitut de SE _P_n_P  l'exception prs que le BIOS ne fait
  pas le lien entre les priphriques et leurs pilotes et qu'il
  n'indique pas aux pilotes comment il a fait la configuration. Il
  devrait normalement utiliser la configuration qu'il a stock en
  mmoire non volatile (ESCD). S'il trouve un nouveau priphrique ou en
  prsence d'un conflit, le BIOS devrait effectuer les modifications
  ncessaires dans la configuration et ne pas utiliser exactement ce
  qu'il y avait dans l'ESCD.

  Votre BIOS doit supporter une telle configuration mais il y a eu des
  cas o il ne l'a pas fait correctement ou l'a fait de manire
  incomplte.  Un avantage de l'utilisation du BIOS rside dans sa
  simplicit puisque, dans la plupart des cas, il n'y a rien 
  paramtrer (sauf  indiquer dans le menu CMOS du BIOS que le SE n'est
  pas PnP). Alors que quelques pilotes de priphriques peuvent tre
  capables de dtecter automatiquement ce que le BIOS a fait, dans
  certains cas, vous devrez le faire (ce qui n'est pas toujours facile).
  Voir  ``Quelle est ma configuration actuelle ?'' Un autre avantage
  possible vient de ce que le BIOS fait son boulot avant que Linux ne
  dmarre et donc que toutes les ressources du bus sont prtes  tre
  utilises (et trouves) par les pilotes de priphriques qui dmarrent
  plus tard.

  Selon MS le fait qu'un BIOS PNP soit capable de configurer au sens PnP
  les priphriques (sans l'aide de MS Windows) est optionnel (pas
  obligatoire).  Mais il semble que la plupart de ceux crs aprs 1996
  ?? ou aux environs en sont capables. Nous devrions leur envoyer des
  lettres de remerciements s'ils le font correctement. Ils configurent 
  la fois les bus ISA et PCI, mais on a dit que quelques vieux BIOS ne
  le faisaient que pour le PCI. Pour essayer d'avoir plus d'informations
  concernant votre BIOS, regardez sur le Web. Merci de ne pas me poser
  de questions sur ce sujet car je n'ai aucunes donnes.  Les dtails
  que vous aimeriez connatre concernant votre BIOS peuvent tre
  difficiles  trouver (ou pas disponibles). Quelques BIOS ont des
  fonctionnalits _P_n_P minimales et essaient de se dcharger de la partie
  difficile de la tche de configuration sur des utilitaires Windows. Si
  cela arrive, soit vous devrez trouver une autre mthode (comme les
  outils isapnp) soit vous devrez essayer de paramtrer la base de
  donnes ESCD si le BIOS en possde une. Consulter le paragraphe
  suivant.


  55..33..22..  LLaa bbaassee ddee ddoonnnneess EESSCCDD dduu BBIIOOSS

  Le BIOS entretient une base de donnes non volatile contenant la
  configuration _P_n_P qu'il essaiera d'utiliser. On l'appelle ESCD
  (Extended System Configuration Data). Encore une fois, l'existence de
  l'ESCD est optionnelle mais la plupart des BIOS-PnP la possde. L'ESCD
  non seulement stocke la configuration des ressources des priphriques
  _P_n_P mais aussi stocke les informations de configuration des
  priphriques non-PnP (et les repre comme tant non-PnP) pour viter
  les conflits. Les donnes ESCD sont habituellement sauvegardes dans
  un circuit qui conserve ces donnes quand on arrte l'alimentation,
  mais quelquefois elles sont stockes sur un disque dur ??

  L'objectif de l'ESCD est de garder la dernire configuration utilise,
  mais si vous utilisez un programme tel que isapnp sous Linux ou des
  utilitaires PCI (qui ne mettent pas  jour l'ESCD) alors, l'ESCD n'en
  n'aura aucune connaissance et ne sauvegardera pas cette configuration
  dans l'ESCD. Un bon SE _P_n_P doit mettre  jour l'ESCD de faon  ce que
  vous puissiez l'utiliser plus tard avec un SE non-PnP (comme Linux
  standard).  Windows peut le faire dans certaines circonstances.  Voir
  ``Utilisation des Windows pour paramtrer l'ESCD''.

  Pour utiliser ce qui a t paramtr dans l'ESCD assurez-vous de
  choisir "SE non-PnP" quivalent dans la CMOS du BIOS. Ensuite, chaque
  fois que le BIOS dmarre (avant le chargement du SE Linux) il doit
  configurer les choses de cette faon. Si le BIOS dtecte une nouvelle
  carte _P_n_P qui n'est pas dans l'ESCD, il doit alors allouer des
  ressources du bus  cette carte et mettre l'ESCD  jour. Il peut mme
  avoir  modifier les ressources du bus dj assignes  des cartes _P_n_P
  existantes et modifier l'ESCD en consquence.

  Si chaque priphrique a enregistr sa dernire configuration, il ne
  devrait pas tre ncessaire de les reconfigurer  chaque redmarrage
  de votre PC. Mais cela ne fonctionne pas comme cela. Donc toutes les
  donnes ESCD doivent tre correctes si vous utilisez le BIOS pour le
  _P_n_P.  Il y a quelques BIOS qui n'ont pas d'ESCD mais possdent une
  sorte de mmoire non volatile pour stocker les informations concernant
  les ressources du bus qui ont t rserves par les cartes non-PnP. De
  nombreux BIOS possdent les deux.


  55..33..33..  UUttiilliissaattiioonn ddee WWiinnddoowwss ppoouurr ppaarraammttrreerr ll''EESSCCDD

  Si le BIOS ne paramtre pas l'ESCD de la faon que vous le voulez (ou
  de la faon dont il faudrait), il serait intressant d'avoir un
  utilitaire Linux qui le fasse. Au dbut 1999, il n'y en avait pas. Il
  faut donc essayer d'utiliser Windows pour le faire (si vous l'avez sur
  le mme PC).

  Il y a trois manires d'utiliser Windows pour essayer de
  paramtrer/modifier l'ESCD. L'une consiste  utiliser l'utilitaire ICU
  conu pour DOS ou Windows 3.x. Cela devrait aussi fonctionner
  correctement pour Windows 9x/2k ??  Une autre mthode consiste 
  initialiser les priphriques manuellement ("force") sous Windows
  9x/2k de sorte que Windows mette cette information dans l'ESCD
  lorsqu'on stoppe Windows normalement.  La troisime mthode est
  destine aux priphriques anciens qui ne sont pas _p_l_u_g_-_a_n_d_-_p_l_a_y.  Si
  Windows les reconnat et sait quelles ressources du bus ils utilisent,
  alors Windows devrait mettre cette info dans l'ESCD.

  Si les priphriques _P_n_P sont configurs automatiquement par Windows
  sans que l'utilisateur ne le "force"  changer les paramtres, alors
  ceux-ci ne seront probablement inscrit dans l'ESCD. Naturellement
  Windows peut dcider de lui-mme de les configurer en utilisant des
  paramtres identiques  ceux qui sont dans l'ESCD mais ce n'est qu'une
  concidence.

  Les systmes d'exploitation Windows 9x sont _P_n_P et configurent, au
  sens _P_n_P les priphriques. Ils entretiennent leur propre base de
  donnes _P_n_P au plus profond des Registres (stocks dans des fichiers
  binaires Windows). Il y a galement tout un tas de renseignements
  concernant la configuration dans les registres, en plus des ressources
  du bus pour le _P_n_P.  Il y a  la fois la configuration courante des
  ressources _P_n_P en mmoire et une autre (peut-tre  peu prs la mme)
  stocke sur le disque dur. Pour la consulter (celle qui est en mmoire
   ?)indirectement dans Windows98 ou pour y forcer des modifications
  vous utilisez le gestionnaire de priphriques.

  Dans Windows98, il y a 2 manires d'invoquer le gestionnaire de
  priphriques :

  1. Poste de travail --> Panneau de configuration --> Systme -->
     Gestionnaire de priphriques.

  2. (cliquer sur le bouton droit de la souris) Poste de travail -->
     Proprits --> Gestionnaire de priphriques.

     Puis dans le gestionnaire de priphriques vous slectionnez un
     priphrique (quelquefois en plusieurs tapes s'il y plusieurs
     priphriques de la mme classe). Puis cliquez sur Proprits puis
     sur Ressources. Pour essayer de modifier la configuration de la
     ressource manuellement, dslectionnez "utiliser les paramtres
     automatiques" puis cliquez sur "Modification des paramtres".
     Maintenant essayer de modifier les paramtres, mais il se peut que
     cela ne soit pas possible. Si vous le pouvez, vous avez "forc" une
     modification. Un message doit vous informer de ce qui a t forc.
     Si vous voulez conserver le paramtrage existant de Windows mais
     que vous vouliez le "forcer", alors, vous devrez forcer une
     modification quelconque puis forcer  nouveau les paramtres
     originaux.

  Pour voir ce qui a t "forc" sous Windows98 regardez dans la liste
  du "matriel forc" : Dmarrer --> Programmes --> Accessoires -->
  Outils systme -- Information systme --> Ressources matrielles -->
  Matriel forc.  Quand vous "forcez une modification des ressources du
  bus sous Windows, il doit mettre votre modification dans l'ESCD (
  condition que vous quittiez Windows normalement).

  > De la fentre "Information systme" vous pouvez galement contrler
  comment les IRQ et les ports d'E/S ont t allous sous Windows.

  Mme si Windows ne signale pas de conflit de ressources du bus, il
  peut en exister sous Linux. Cela vient du fait que Windows peut
  assigner les ressources du bus de manire diffrente de l'ESCD. Dans
  les rares cas o tous les priphriques sous Windows sont soit des
  priphriques anciens soit des priphriques "forcs", il faut que les
  configurations Windows et ESCD soient identiques.


  55..33..44..  AAjjoouutt dd''uunn nnoouuvveeaauu pprriipphhrriiqquuee ((ssoouuss LLiinnuuxx oouu ssoouuss WWiinnddoowwss))

  Si vous ajoutez un nouveau priphrique _P_n_P et que vous ayez paramtr
  votre BIOS pour un "SE non PnP", alors le BIOS devrait le configurer
  automatiquement et en enregistrer la configuration dans l'ESCD. S'il
  s'agit d'un priphrique _n_o_n _P_n_P ancien (ou d'un priphrique
  configurable par cavaliers, etc...), vous n'avez alors que peu
  d'options pour le prendre en compte.

  Vous devez tre capable d'indiquer directement au BIOS (par
  l'intermdiaire des menus de configuration de la CMOS) que certaines
  ressources du bus qu'il utilise sont rserves et ne doivent pas tre
  alloues par le _P_n_P. Cette information n'est pas sauvegarde dans
  l'ESCD.  Mais, en cas de conflit, il peut y avoir une option du menu
  BIOS permettant de rendre prpondrant ou non, sur le contenu de
  l'ESCD, les choix faits au niveau de la CMOS. Une autre mthode
  consiste  faire tourner ICU sous DOS/Windows. Encore une autre
  consiste  installer manuellement le priphrique sous Windows 9x/2k
  et de s'assurer que cette configuration a t "force" (voir le
  paragraphe prcdent). Si elle a t "force" Windows devrait avoir
  mis  jour l'ESCD lors de l'arrt du PC.


  55..44..  IIssaappnnpp

  Une bonne partie de la documentation concernant isapnp est difficile 
  comprendre si l'on ne connat pas les bases du _P_n_P. Cet HOWTO devrait
  aider  la comprendre ainsi que les FAQ (Questions frquemment poses)
  qui l'accompagne.  isapnp ne concerne que les priphriques PnP sur le
  bus ISA (non PCI).  En lanant le programme Linux "isapnp" au
  dmarrage, on configure ces priphriques avec les valeurs indiques
  dans /etc/isapnp.conf. Il est possible de crer ce fichier de
  configuration automatiquement mais vous devrez l'diter manuellement
  pour faire des choix entre diffrentes options.  Avec isapnp, un
  pilote de priphrique, faisant partie du noyau, peut tre lanc
  prmaturment, avant que isapnp ait paramtr l'adresse, etc.  dans le
  matriel. Ce qui entrane que le pilote de priphrique ne sera pas
  capable de trouver le priphrique correspondant. Le pilote utilise la
  bonne adresse alors que celle-ci n'a pas encore t paramtre dans le
  matriel.

  Si votre distribution Linux installe automatiquement isapnptools,
  isapnp peut dj tre lanc au dmarrage. Dans ce cas, tout ce que
  vous avez besoin de faire est d'diter /etc/isapnp.conf selon "man
  isapnp.conf".  Notez que cela revient  configurer manuellement PnP
  puisque vous avez  prendre les dcisions sur la manire de configurer
   mesure que vous ditez le fichier de configuration.  Vous pouvez
  utiliser le programme  "pnpdump" pour vous aider  crer le fichier de
  configuration. Si vous utilisez "isapnp" tel quel et que vous ayez un
  BIOS _P_n_P, vous devrez probablement indiquer au BIOS (quand vous le
  paramtrerez) que vous n'avez pas de SE _P_n_P puisque vous voudrez
  toujours que que le BIOS configure les priphriques PCI. Alors que le
  BIOS peut galement configurer les priphriques ISA, isapnp le
  refera.


  55..55..  UUttiilliittaaiirreess PPCCII

  Le nouveau paquetage Utilitaires PCI (= pciutils, improprement appel
  "pcitools"), devrait vous permettre de configurer manuellement, _ _l_a
  _P_n_P, le bus PCI.  "lspci" donne la liste des ressources bus, alors que
  "setpci" paramtre les allocations de ressources dans le matriel.


  55..66..  CCoorrrriiggeerr llee nnooyyaauu ppoouurr rreennddrree LLiinnuuxx ccoommppaattiibbllee PPnnPP

  David Howells a cr une telle mise  jour pour le faire. C'est le
  "Gestionnaire de configuration/ressource du noyau Linux" ("Linux
  Kernel Configuration/Resource Manager") quelquefois appel
  "Gestionnaire de configuration matrielle". Cette adaptation peut ne
  pas correspondre au noyau le plus rcent. Le noyau rsultant est
  rput stable mais cependant des bogues ont t signals.  Une
  documentation est incluse comme serial.txt, pour montrer comment faire
  pour un port srie. Elle fournit des "fichiers" dans l'arborescence
  /proc pour que vous puissiez voir ce qui se passe et peut enregistrer
  des commandes dans l'un de ces fichiers pour une configuration
  personnalise.  Un problme vient de ce que de nombreux pilotes de
  priphriques ne le prennent pas en compte et qu'il vous faut encore
  utiliser les fichiers de configuration traditionnels etc. pour
  effectuer la configuration.  Consultez  <http://www.astarte.free-
  online.co.uk>



  55..77..  CCoonnffiigguurraattiioonn ppaarr WWiinnddoowwss

  Si vous avez Windows9x (ou 2k) sur le mme PC, dmarrer alors
  simplement Windows et laissez-le configurer le _P_n_P.  Puis lancez alors
  Linux  partir de Windows (ou du DOS). On a signal que Windows
  effaait les IRQ des registres des priphriques PCI. Dans ce cas,
  Linux signale qu'il a trouv une IRQ  zro. Dans ce cas, vous ne
  pouvez pas utiliser cette mthode.


  55..88..  CCoonnffiigguurraattiioonn ppaarr lleess ppiillootteess ddee pprriipphhrriiqquueess

  Quelques pilotes de priphriques utilisent les mthodes _P_n_P pour
  paramtrer les ressources du bus au point de vue matriel et seulement
  pour les priphriques qu'ils contrlent. Dans ce cas, puisque le
  pilote a effectu la configuration, il connat videmment la
  configuration et il n'y a aucun besoin de lui fournir ces
  informations.

  Le problme ici porte sur deux points. Il est difficile de mettre dans
  le pilote tout ce qui est ncessaire et le pilote peut accaparer des
  ressources du bus qui seraient ncessaires pour d'autres
  priphriques. Cela serait plus facile pour l'utilisateur, mais un
  noyau Linux _P_n_P serait une meilleure solution.  Voir ``Linux doit
  mieux prendre en compte le <em>PnP</em>''



  55..99..  LLooggiicciieellss eett ddooccuummeennttss PPnnPP


    Page d'acceuil Isapnptools
     <http://www.roestock.demon.co.uk/isapnptools/>

    Mise  jour pour rendre le noyau Linux <em>PnP</em>
     <http://www.astarte.free-online.co.uk>

    Projet de pilote <em>PnP</em>
     <http://www.io.com/~cdb/mirrors/lpsg/pnp-linux.html>

    Spcifications <em>PnP</em> de Microsoft
     <http://www.microsoft.com/hwdev/respec/pnpspecs.htm>

    Le livre : PCI System Architecture, 3rd ed. by Tom Shanley +,
     MindShare 1995. Traite des fonctionnalits style PnP pour le bus
     PCI bus.

    Le livre : Architecture systme _P_l_u_g _a_n_d _P_l_a_y, de Tom Shanley, Mind
     Share 1995. Dtaille le _P_n_P sur le bus ISA.  Uniquement un survol
     concis du _P_n_P sur le bus PCI.



  66..  CCoommmmuunniiccaattiioonn ddee llaa ccoonnffiigguurraattiioonn aauu ppiilloottee

  66..11..  IInnttrroodduuccttiioonn

  La manire exacte dont cela s'effectue dpend du pilote. Certains
  pilotes disposent de plus d'une mthode pour dtecter la configuration
  du priphrique physique.  l'extrme, on trouve le cas o il faut
  paramtrer "en dur" les ressources du bus dans le noyau et recompiler
  celui-ci.  l'autre extrme, le pilote fait tout automatiquement et
  vous n'avez rien  faire. Il peut mme paramtrer les ressources du
  bus dans le matriel en utilisant les mthodes _P_n_P.

  Entre les deux, on trouve les cas o il faut faire tourner un
  programme pour faire passer les infos au pilote ou mettre ces infos
  dans un fichier. Dans certains cas, le pilote peut tester le
  priphriques  des adresses ou il pense trouver le priphrique. Il
  peut alors essayer de tester diffrentes IRQ pour voir laquelle
  fonctionne (IRQ = Interrupt ReQuest / ReQute d'Interruption). Ce
  qu'il peut faire automatiquement ou non. Dans d'autres cas, le pilote
  utilise des mthodes _P_n_P pour trouver le priphrique et la faon dont
  les ressources du bus ont t affectes, mais ne pas les paramtrer
  lui-mme. Il peut aussi regarder certains fichiers du rpertoire
  /proc.

  On peut avoir besoin d'indiquer les ressources du bus comme paramtre
  au noyau pour un module chargeable. Voir
  /usr/lib/modules_help/descr.gz pour avoir une liste des paramtres
  possibles. Le modules  charger est indiqu dans /etc/modules avec ses
  paramtres. Dans certains autres cas les ressources du bus peuvent
  tre indiques au noyau par des paramtres.  Ceux-ci sont mis dans le
  fichier lilo.conf sous la forme append="...".  Dans ce cas le
  programme lilo doit tre excut pour enregistrer ces donnes dans le
  code de dmarrage du noyau.

  Alors qu'il y a une grande diversit dans la manire dont les pilotes
  peuvent trouver les ressources du bus, le but final est le mme. Il y
  a tellement de priphriques diffrents et de pilotes de priphriques
  pour les grer que vous pouvez avoir besoin de consulter la
  documentation de votre pilote particulier pour trouver comment celui-
  ci gre les ressources du bus et ce que vous avez besoin de faire pour
  vous assurer qu'il trouve les infos dont il a besoin. Quelques brves
  indications sur un petit nombre de pilotes de priphriques sont
  donnes dans les paragraphes suivants.


  66..22..  PPiilloottee dduu ppoorrtt ssrriiee :: sseettsseerriiaall

  Pour le pilote de port srie standard (et non pas pour les cartes
  multi-ports) vous utilisez setserial pour en configurer le pilote. Ce
  programme est souvent lanc  partir d'un fichier de dmarrage. Dans
  les versions les plus rcentes, on trouve un fichier  /etc/serial.conf
  que vous pouvez "diter" en utilisant simplement la commande setserial
  de la manire habituelle et ce que vous paramtrez en utilisant
  setserial est sauvegard dans le fichier serial.conf. Le fichier
  serial.conf devrait tre consult lors de l'excution de la commande
  setserial lance par un fichier de dmarrage. Votre distribution peut
  le faire ou ne pas le faire pour vous.

  Il y a deux manires diffrentes d'utiliser setserial selon les
  options que vous choisissez. Une mthode consiste  indiquer la
  configuration manuellement au pilote. L'autre mthode consiste 
  tester une adresse donne et  voir s'il y a un port srie  cette
  adresse. On peut aussi tester cette adresses et essayer de dtecter si
  une interruption est utilise pour ce port. Le pilote excute quelque
  chose comme setserial au dmarrage, mais ne teste pas les
  interruptions, il affecte simplement l'interruption "standard" ce qui
  peut ne pas correspondre  la ralit. Il teste uniquement l'existence
  d'un port. Consulter le Serial-HOWTO pour avoir des dtails
  complmentaires.


  66..33..  PPiillootteess ddee ccaarrtteess ssoonn

  66..33..11..  OOSSSS--LLiittee

  Vous devez passer IO, IRQ, et DMA en tant que paramtres  un module
  ou les compiler dans le noyau. Mais quelques cartes PCI seront
  dtectes automatiquement (par exemple en prenant les infos dans
  /proc/pci ou quelque chose d'quivalent).  RedHat fournit un programme
  "sndconfig" qui dtecte les cartes ISA PnP et paramtre
  automatiquement les modules pour les charger avec les ressources de
  bus trouves.


  66..33..22..  OOSSSS ((OOppeenn SSoouunndd SSyysstteemm)) eett AALLSSAA

  Ils dtecteront les cartes par les mthodes _P_n_P puis choisiront le
  pilote appropri et le chargeront. Ils paramtreront galement les
  ressources du bus sur une carte ISA-PnP. Vous pouvez avoir 
  intervenir manuellement pour rsoudre les problmes de conflits. Pour
  le pilote ALSA, la prise en charge de l'ISA-PnP est optionnelle et
  vous pouvez utiliser isapnp si vous le voulez.


  77..  QQuueellllee eesstt mmaa ccoonnffiigguurraattiioonn aaccttuueellllee??

  Ici "configuration" concerne l'attribution des ressources _P_n_P du bus
  (adresses, IRQ, et DMA). C'est une question  deux volets pour chaque
  priphrique, et chacun d'eux doit avoir le mme rponse.

  1. Quelle est la configuration du logiciel du pilote de priphrique ?
     Autrement dit : comment le pilote pense-t-il que le matriel est
     configur ?

  2. Quelle est la configuration (s'il y a lieu) du  matriel
     priphrique ?

  Naturellement la configuration matrielle du priphrique et celle de
  son pilote doivent tre les mmes (et normalement, c'est le cas).
  Mais, si les choses ne se passent pas bien, c'est qu'il y a peut-tre
  une diffrence. Cela signifie que le pilote a des donnes incorrectes
  concernant la configuration relle du matriel, et dysfonctionnement.
  Si le logiciel que vous utilisez ne vous indique pas correctement ce
  qui ne va pas (ou n'effectue pas la configuration correcte
  automatiquement), il vous faudra chercher la configuration matrielle
  des priphriques et celle des pilotes correspondants. Alors que les
  pilotes de priphriques de Linux devraient "tout nous dire", il y a
  des cas o il n'est pas facile de dterminer comment le matriel a t
  configur.

  Un autre problme vient de ce que les messages  l'cran indiquant la
  configuration ne sont pas toujours clairs quant  la nature de la
  configuration qu'ils concernent : le pilote de priphrique, le
  priphrique lui-mme ou les deux. Si le pilote de priphrique s'est
  vu attribu une configuration et qu'ils teste le matriel pour
  vrifier qu'il est configur de la mme manire, alors la
  configuration indique par le pilote devrait tre  la fois celle du
  pilote et du matriel.

  Mais certains pilotes ne se comportent pas comme cela et peuvent
  accepter une configuration qui ne puisse pas se vrifier. Par exemple,
  "setserial" acceptera une configuration qui ne se vrifie pas (mme si
  vous demandez un test des ressources du bus). Dans ce cas "setserial"
  peut uniquement vous indiquer la configuration du pilote et pas celle
  du matriel.

  Quelques infos concernant la configuration peuvent tre obtenues en
  lisant les messages du BIOS et de Linux qui apparaissent  l'cran au
  dmarrage initial de l'ordinateur. Souvent, ces messages dfilent trop
  rapidement pour pouvoir tre lus, mais lorsque leur dfilement
  s'arrte, tapez plusieurs fois sur la touche "Majuscule + dfilement
  arrire" (Shift-PageUp) pour les visualiser. Pour visualiser la suite,
  taper sur la touche "Majuscule + dfilement avant" (Shift-PageDow). La
  commande "dmesg" n'importe quand n'affichera que les messages du noyau
  Linux et les messages les plus importants peuvent manquer (y compris
  ceux du BIOS).  Les messages de Linux peuvent quelquefois n'indiquer
  que la vue de la configuration par les pilotes de priphrique, et ces
  informations peuvent parfois provenir d'un fichier de configuration
  incorrect.

  Les messages du BIOS affichent la configuration relle du matriel 
  cet instant donn, mais un SE _P_n_P, isapnp ou les utilitaires PCI
  peuvent la modifier ultrieurement. Les messages du BIOS sont affichs
  avant ceux de Linux. Comme alternative au rappel des messages par les
  touches "majuscule + dfilement arrire", essayez de geler l'affichage
  en tapant sur la touche "Pause". Taper sur n'importe quelle touche
  pour continuer. Mais, une fois que les messages de Linux commencent 
  apparatre, c'est trop tard pour utiliser la touche "Pause"
  puisqu'alors, les messages de Linux ne sont pas gels.


  77..11..  CCoommmmeenntt mmeess ppiillootteess ddee pprriipphhrriiqquueess ssoonntt--iillss ccoonnffiigguurrss ??

  Il y a des programmes que l'on peut lancer de la ligne de commande
  (tel que "setserial" pour les ports srie) pour le dterminer.
  L'arborescence du rpertoire /proc est utile.  /proc/ioports indique
  les adresses d'E/S utilises par les pilotes (ou essaye si c'est
  faux). Ils peuvent ne pas tre configurs de cette faon dans le
  matriel.

  /proc/interrupts n'indique que les interruptions utilises
  actuellement et beaucoup de celles qui ont t alloues aux pilotes ne
  sont pas affiches car elles ne sont pas actuellement utilises. Par
  exemple, mme s'il y a une disquette dans l'unit et qu'elle est prte
   tre utilise, l'interruption la concernant ne sera pas affiche, 
  moins qu'elle ne soit effectivement en cours d'utilisation. De plus,
  une interruption indique ici  ne signifie pas qu'elle existe dans le
  matriel. Un indice du fait qu'elle n'existe pas dans le matriel
  consiste  vrifier que le nombre d'interruptions gnres est 0. Et
  encore, mme si l'on voit que quelques interruptions ont t gnres,
  cela peut signifier que cette interruption n'existe pas pour ce
  priphrique mais par un autre priphrique qui n'est pas en cours
  d'utilisation mais qui a pu gnrer une interruption ou deux.  Dans le
  noyau 2.2 l'arborescence /proc a t modifie.


  77..22..  CCoommmmeenntt mmeess pprriipphhrriiqquueess ssoonntt--iillss ccoonnffiigguurrss ??

  C'est facile de trouver quelles ressources du bus ont t attribues 
  des priphriques sur un bus PCI : on utilise soit la commande "lspci"
  ou, pour les noyaux <: 2.2: voir /proc/pci; pour les noyaux 2.2+:
  /proc/bus/pci/devices. Pour le bus ISA, on peut essayer de faire
  tourner pnpdump --dumpregs, mais ce n'est pas une mthode sre. Les
  rsultats peuvent tre difficile  dcoder. Ne pas confondre les
  adresses de port de lecture que pnpdump "essaye" (et o il trouve
  quelque chose) avec les adresses d'E/S du priphrique trouv. Ce ne
  sont pas les mmes.

  Les messages en provenance du BIOS, lors du dmarrage, indique la
  configuration matrielle au moment du dmarrage. Si vous vous basez
  sur le BIOS pour faire votre configuration, ils faut qu'elle soit
  encore valable. Les messages de Linux peuvent provenir des pilotes qui
  ont fait des essais pour vrifier la prsence du matriel (et
  ventuellement des essais sur les IRQ et le DMA).  Naturellement, si
  le priphrique fonctionne correctement, alors il doit tre configur
  comme son pilote.



  88..  AAppppeennddiiccee

  88..11..  AAddrreesssseess

  Il y a trois types d'adresses : les adresses mmoire centrale, les
  adresses d'E/S et les adresses de configuration. Pour le bus PCI, les
  adresses de configuration constituent un espace d'adressage spar,
  exactement comme le sont les adresses d'E/S. Sauf dans le cas des
  adresses de configuration ISA, qu'une adresse sur le bus d'adresses
  (ou sur le bus partag adresses-donnes dans le cas du PCI) soit ou
  non une adresse mmoire, une adresse d'E/S ou une adresse de
  configuration dpend uniquement des tensions sur d'autres fils
  (pistes) du bus.


  88..11..11..  AAddrreesssseess ddee ccoonnffiigguurraattiioonn ssuurr llee bbuuss IISSAA ((PPoorrtt ddee lleeccttuurree
  eettcc..))

  En ce qui concerne le bus ISA, il n'y a pas, techniquement, d'espace
  d'adressage de configuration, mais il existe, pour le CPU, une mthode
  spciale d'accs aux registres de configuration sur les cartes PnP.
  Trois adresses d'E/S sont rserves  cet usage. Ces 3 adresses ne
  sont pas diffrentes pour chaque carte, mais sont partages par toutes
  les cartes.

  Les trois adresses sont appeles port de lecture, port d'criture et
  port d'adresse. Ces ports ont la taille d'un octet. Chaque carte PnP
  possde un certain nombre de registres car ces trois adresses seules
  ne sont pas suffisantes pour une simple carte. Pour communiquer avec
  une carte, le numro de la carte (handle) est envoy  toutes les
  cartes sur le port d'criture. Une seule carte reconnat son numro et
  se met  l'coute.  Alors l'adresse du registre concern est envoye
  sur le port adresse (de toutes les cartes, mais une seule est 
  l'coute). Ensuite, on fait une criture sur le port d'criture ou une
  lecture sur le port de lecture.

  Le port d'criture est toujours  l'adresse A79 et le port d'adresse
  est toujours 279. Le port de lecture n'est pas dtermin et est
  initialis par le logiciel de configuration  une adresse qui est
  suppose ne pas tre en conflit avec une autre carte ISA. S'il y a
  conflit, il modifiera l'adresse.  Pour toutes les cartes PnP, cette
  adresses est "programme". Donc, si vous utilisez disons, isapnp, pour
  initialiser ou tester des donnes de configuration, vous aurez besoin
  de connatre l'adresse du port de lecture.


  88..11..22..  CChhaammppss dd''aaddrreesssseess

  Le terme "adresse" est quelquefois utilis dans ce document pour
  parler d'une srie d'adresses contigus. Comme les adresses sont
  donnes en octets, une simple adresses contient uniquement un octet
  mais les adresses E/S (et mmoire centrale) ont besoin de plus que
  cela. Donc un espace de, disons, 8 octets est souvent utilis pour les
  adresses d'E/S alors que le nombre d'adresses en mmoire centrale
  alloues  un priphrique est beaucoup plus grand. Pour un port srie
  (priphrique d'E/S), il suffit de donner l'adresse de dpart du
  priphrique (par exemple 3F8) puisqu'il est bien connu que le champ
  d'adresses de ce type de priphrique est seulement de 8 octets.
  Cette adresse de dpart est connue sous le nom "d'adresse de base".


  88..11..33..  EEssppaaccee dd''aaddrreesssseess

  En ce qui concerne l'ISA, pour accder  la fois aux "espaces"
  d'adresses E/S et mmoire (centrale) on utilise le mme bus d'adresses
  (les fils utiliss pour les adresses sont partags). Comment le
  priphrique reconnat-il si une adresse qui apparat sur le bus
  d'adresses est une adresse mmoire ou une adresse E/S ?  Eh bien, il y
  a quatre lignes spcialises du bus qui vhiculent cette information
  et un peu plus. Si l'un de ces quatre fils est aliment, cela indique
  que le CPU veut lire une adresse E/S, et la mmoire centrale ne tient
  pas compte de l'adresse prsente sur les fils d'adresses du bus. Les
  trois autres fils sont utiliss  des fins identiques. En rsum : il
  existe des lignes de lecture et d'criture pour les adresses mmoire
  centrale et pour celles d'E/S (4 fils en tout).

  Pour le bus PCI, l'ide de base est identique et on utilise galement
  4 fils, mais c'est ralis de faon lgrement diffrente. Au lieu
  d'avoir uniquement l'un des quatre fils aliment, on code un nombre
  binaire sur ces fils (16 possibilits diffrentes). On peut donc
  vhiculer plus d'informations. Quatre de ces 16 valeurs sont utilises
  pour les espaces mmoire et E/S comme dans le paragraphe ci-dessus. En
  plus, on trouve l'espace des adresses de configuration qui utilise
  deux valeurs supplmentaires. Les dix possibilits restantes sont
  rserves pour d'autres utilisations.






  88..11..44..  VVrriiffiiccaattiioonn ddeess cchhaammppss dd''aaddrreesssseess ((TTeesstt ddeess ccoonnfflliittss
  dd''aaddrreesssseess EE//SS IISSAA))

  Pour le bus ISA, il existe un systme implant sur chaque carte PnP
  pour vrifier que d'autres cartes n'utilisent pas la mme adresse.  Si
  deux cartes ou plus utilisent les mmes adresses d'E/S, aucune des
  cartes ne fonctionnera correctement. Un bon logiciel _P_n_P devrait
  affecter les ressources du bus pour viter de tels conflits, mais,
  mme dans ce cas, une carte ancienne pourrait se cacher quelque part
  avec la mme adresse.

  Le test consiste, pour la carte,  donner, sur le bus, comme numros
  de test ses propres registres d'E/S. Le logiciel _P_n_P les lit et
  vrifie qu'il lit les mmes numros. Si tel n'est pas le cas, quelque
  chose ne va pas (comme, par exemple, une autre carte  la mme
  adresse). Il rpte alors le test avec un autre numro de test.
  Puisqu'en ralit il teste le champ des adresses d'E/S assign  cette
  carte, on l'appelle " test des champs d'adresses". On devrait plutt
  l'appeler "test des conflits d'adresses".  S'il y a un conflit
  d'adresses, on obtient un message d'erreur qu'il faut rsoudre par ses
  propres moyens.


  88..11..55..  CCoommmmuunniiccaattiioonn ddiirreeccttee vviiaa llaa mmmmooiirree..

  Traditionnellement, la plupart des priphriques d'E/S utilisaient les
  E/S mmoire pour communiquer avec le CPU. Par exemple, le port srie
  fonctionne de cette faon. Le pilote de priphrique, qui tourne sur
  le CPU lit et crit les donnes de/vers l'espace des adresses d'E/S et
  la mmoire centrale.  Une mthode plus rapide consisterait  faire
  mettre les donnes directement en mmoire centrale par le
  priphrique. Une manire de le raliser est d'utiliser l'accs direct
  mmoire (``Canaux DMA'').  Une autre mthode consiste  affecter un
  espace de la mmoire centrale au priphrique. Comme cela, le
  priphrique lit et crit directement en mmoire centrale sans avoir 
  se proccuper de l'accs direct mmoire (DMA).  De tels priphriques
  possdent normalement des adresses d'E/S et des adresses mmoire.


  88..22..  LLeess iinntteerrrruuppttiioonnss -- DDeessccrriippttiioonn ddttaaiillllee..

  Le systme d'interruption vhicule un paquet d'informations, mais
  seulement de faon indirecte. Le signal d'interruption (une tension
  sur un fil) indique simplement  un circuit appel contrleur
  d'interruptions qu'un certain priphrique a besoin que l'on s'occupe
  de lui. Le contrleur d'interruption le signale alors au CPU. Le CPU
  va chercher le pilote de ce priphrique et en excute une partie que
  l'on dsigne sous le nom de "routine de service de l'interruption" (ou
  "routine de gestion de l'interruption").  Cette "routine" essaie de
  voir ce qui s'est pass et se charge de traiter la question comme, par
  exemple, de transfrer des octets du (ou vers le) priphrique. Ce
  programme (cette routine) peut facilement analyser ce qui s'est pass
  puisqu'il connat les adresses des registres ( condition que les
  numros d'interruption (IRQ) et que les adresses d'E/S aient t
  correctement renseignes). Ces registres contiennent les informations
  concernant l'tat du priphrique. Le logiciel lit le contenu de ces
  registres et, en examinant ce contenu, voit ce qui s'est pass et
  entreprend l'action approprie.

  Donc, chaque pilote de priphrique a besoin de savoir quel est le
  numro d'interruption (IRQ) qui le concerne. Sur le bus PCI (et pour
  les ports srie sur un bus ISA depuis la version du noyau 2.2) il est
  possible que deux priphriques ou plus se partagent le mme IRQ
  (numro d'interruption).  Cela est rendu possible en faisant excuter
  par le CPU toutes les routines de service d'interruption de tous les
  priphriques qui utilisent cette interruption. La premire chose que
  ralise une telle routine de service consiste  tester si
  l'interruption concerne son priphrique. Si tel n'est pas le cas
  (fausse alarme), elle se termine et le traitement continue avec la
  routine de service suivante etc.



  88..33..  IInntteerrrruuppttiioonnss PPCCII

  Les interruptions PCI sont diffrentes, mais comme elles correspondent
  normalement aux IRQ, elles se comportent  peu prs de la mme faon.
  Le fait que les interruptions PCI puissent tre partages constitue
  une diffrence majeure. Par exemple l'IRQ5 peut tre partage entre
  deux priphriques PCI. Cette possibilit de partage est automatique :
  il n'est pas ncessaire de disposer d'un matriel ou d'un logiciel
  spcial.  On a entendu parler de situations o un tel partage ne
  fonctionne pas, mais la cause rside certainement dans le logiciel du
  pilote de priphrique.  Tous les pilotes de priphrique PCI sont
  supposs fonctionner avec partage des interruptions. Il faut cependant
  noter que le partage d'une mme interruption entre un bus ISA et PCI
  n'est pas possible. Mais un partage illgal d'interruption
  fonctionnera  condition que les priphriques en conflit ne soient
  pas utiliss en mme temps. "En mme temps" signifie ici qu'un
  programme en cours d'excution "ouvre" le priphrique dans le
  programme C.

  Vous pouvez avoir besoin de connatre quelques-uns des dtails du
  systme d'interruption PCI de faon  pouvoir paramtrer la mmoire
  CMOS du BIOS ou pour positionner les cavaliers sur de vieilles cartes
  PCI. Le bus PCI possde quatre lignes d'interruptions de INTA#  INTD#
  (A, B, C et D).  Pour un systme  7 connecteurs, d'aprs les
  spcifications, on aurait la possibilit de disposer de 7 x 4 = 28
  lignes d'interruptions diffrentes.  Mais ces spcifications ne
  permettent qu'un nombre infrieur de lignes d'interruption. Ce n'est
  pas trop contraignant puisque l'on peut partager les interruptions.
  Beaucoup de bus PCI ne paraissent disposer que de 4 lignes
  d'interruption. Appelons ces lignes (fils ou pistes) W, X, Y et Z.
  Supposons que l'on dsigne l'interruption B de l'emplacement numro 3
  comme tant l'interruption 3B. Alors, on peut utiliser le fil W pour
  partager les interruptions 1A, 2B, 3C, 4D, 5A, 6B, 7C. On le ralise
  physiquement en connectant le fil W aux fils 1A, 2B etc... De mme, le
  fil X pourrait tre connect aux fils 1B, 2C, 3D, 4A, 5B, 6C, 7D. Au
  dmarrage, le BIOS fait correspondre X, W, Y, Z aux interruptions.
  Ensuite il crit dans un registre physique de chaque priphrique
  quelle interruption lui a t affecte de sorte que le priphrique
  (et tout ce qui interroge le priphrique) sache quelle IRQ il
  utilise.

  Les fils X, W, Y et Z mentionns ci-dessus sont dsigns dans les
  spcifications PCI par les noms INTA#, INTB#, INTC# et INTD#. Cette
  dnomination officielle PCI porte  confusion puisque, maintenant,
  INTA# a deux significations selon que l'on parle du connecteur ou du
  bus PCI.  Par exemple, si 3C correspond  X alors on dira que l'INTC#
  du connecteur 3 est relie  l'INTA# (X) du bus PCI. C'est une
  notation confuse.

  Il y a galement une autre obligation. Un connecteur PCI doit utiliser
  les premires lettres d'interruption en premier. Donc, s'il n'y a
  qu'un connecteur  utiliser une interruption, ce doit tre L'INTA#.
  S'il utilise 2 interruptions ce doivent tre INTA# et INTB# etc.
  Jusqu' 8 priphriques peuvent tre connects  une carte  un
  emplacement donn, mais ils ne peuvent disposer que de 4 interruptions
  PCI. Cela ne pose pas de problme puisque les interruptions peuvent
  tre partages et donc, chacun des 8 priphriques (s'ils sont
  prsents) pourra disposer d'une interruption. La lettre d'interruption
  PCI d'un priphrique est souvent fixe et cble dans le priphrique.
  Le BIOS affecte les IRQ(demandes d'interruptions) de faon  viter
  les conflits avec les IRQ qu'il connat sur le bus ISA. Quelquefois,
  dans le menu CMOS, on peut affecter des IRQ aux cartes PCI (mais ce
  n'est pas aussi facile  faire que ce qui a t expliqu ci-dessus).
  Il existe une situation dans laquelle Windows met  zro tous les
  numros d'interruption dans les cartes PCI aprs que l'affectation des
  numros d'interruption a t effectu. Alors, quelqu'un qui utilise
  Windows et qui lance Linux  partir de Windows verra Linux ne trouver
  que des IRQ incorrectement paramtres  zro.

  Vous pourriez penser que l'utilisation par le PCI des IRQ (bus ISA)
  peut tre lent etc. Pas vraiment. Le(s) circuit(s) contrleur(s)
  d'interruptions ISA possde(nt) un fil d'interruption directement
  reli au CPU afin que celui-ci puisse ragir immdiatement. Alors que
  les signaux sur les bus d'adresse et de donnes ISA doivent cheminer 
  travers le bus PCI pour atteindre le CPU, les signaux d'interruption
  IRQ lui parviennent pratiquement directement.



  88..44..  IIssoollaattiioonn


  C'est uniquement valable pour le bus ISA. L'isolation est une mthode
  complexe d'assignation d'un identificateur temporaire (id number =
  numro d'identification ou Card Select Number (CSN) = numro de
  slection de carte)  chaque priphrique _P_n_P sur le bus. Puisqu'il
  existe des moyens plus efficaces (mais plus complexes) pour le faire,
  certains pourront affirmer que c'est une mthode simpliste. On
  n'utilise qu'une seule adresse d'criture pour toutes les critures
  sur tous les priphriques _P_n_P connects. Cette adresse est utilise
  pour envoyer (assigner) un identificateur unique  chaque priphrique
  _P_n_P. L'attribution de cet identificateur impose qu'un seul
  priphrique soit  l'coute lorsque cet identificateur est envoy
  (crit)  cette adresse commune. Tous les priphriques _P_n_P ont un
  numro de srie unique qu'ils utilisent dans le processus d'isolation.
  La ralisation de l'isolation ressemble  un jeu. Elle est ralise en
  utilisant l'quivalent d'un bus  un seul fil reliant tous les
  priphriques _P_n_P et du programme d'isolation.

  Lors de la premire manche de ce "jeu", tous les priphriques _P_n_P
  sont  l'coute sur ce fil et envoient simultanment une squence de
  bits sur le fil. Les valeurs permises sont soit des 1 (tension
  positive) soit des "0 ouverts" sans tension (circuit ouvert ou
  troisime tat). Chaque priphrique _P_n_P commence  envoyer
  squentiellement son numro de srie, bit par bit, en commenant par
  le bit de poids fort, sur le fil.  Si l'un des priphriques envoie un
  1 sur le fil, un 1 sera reu par tous les autres. Si tous les
  priphriques envoient un "0 ouvert", on n'entendra rien sur le fil.
  L'objectif est d'liminer ( la fin de cette premire manche) tout le
  monde sauf le priphrique ayant le numro de srie le plus lev. Par
  "liminer", on entend cesser d'couter plus avant l'adresse d'criture
  que tous les priphriques encore dans la course continuent d'couter.
  On appelle galement cela "se retirer". (Il faut noter que tous les
  numros de srie sont de mme longueur).

  En premier lieu, ne prenons en considration que le bit de poids le
  plus lev du numro de srie mis sur le fil par tous les
  priphriques n'ayant pas encore d'identificateur. Si l'un des
  priphriques _P_n_P envoie un 0 (0 ouvert) mais reoit un 1, cela
  signifie qu'un autre priphrique _P_n_P possde un numro de srie
  suprieur au sien. Donc, il se retire provisoirement du jeu et
  n'coute plus ce qui se passe sur la ligne jusqu' la fin de cette
  manche (quand un identificateur est attribu au gagnant : celui qui a
  le numro de srie le plus lev).  Alors, les priphriques encore de
  la partie possdent tous le bit de poids fort (un 1), donc, nous
  pouvons supprimer ce bit et prendre en compte uniquement le "numro de
  srie tronqu" rsultant pour continuer  participer  cette manche.
  Retournez au dbut de ce paragraphe et rptez le processus jusqu' ce
  que le numro de srie complet ait t trait pour chacun des
  priphriques (voir ci-dessous comment est trait le cas o il n'y a
  que des 0).

  Il est donc clair que le numro de srie le plus lev ne sera pas
  limin de la partie. Mais qu'en est-il si les chiffres de tte (du
  numro de srie ventuellement tronqu) sont tous des 0 ?. Dans ce cas
  un "0 ouvert" est envoy sur la ligne et tous les participants restent
  en lice. S'ils ont tous des zros en tte, alors les 0 sont limins
  exactement comme les 1 au paragraphe ci-dessus. La partie continue et
  les chiffres suivants (du numro de srie) sont envoys.

   la fin de la manche (lorsque le bit de poids faible du numro de
  srie du concurrent restant a t mis), seul le priphrique _P_n_P
  ayant le numro de srie le plus lev est prsent. On lui donne alors
  un identificateur et il quitte la partie dfinitivement. Ensuite, tous
  les limins de la dernire manche (ceux qui n'ont pas encore obtenu
  d'identificateur) reviennent dans le jeu et une nouvelle manche
  commence avec un concurrent de moins. Finalement, tous les
  priphriques _P_n_P se verront attribuer un identificateur. Il est
  facile de prouver que cet algorithme fonctionne.

  Une fois que tous les identificateurs ont t attribus,ils sont
  utiliss pour s'adresser  chacun des priphriques _P_n_P pour les
  configurer et lire leur configuration. On notera que ces
  identificateurs ne sont utiliss que pour la configuration _P_n_P et ne
  sont pas utiliss pour les communications normales avec le
  priphrique _P_n_P. Au dmarrage de l'ordinateur, tous les
  identificateurs sont perdus et, donc, un BIOS PnP refait normalement
  ce processus d'isolation  chaque fois que vous remettez votre PC en
  service.


  FIN DU Plug-and-Play-HOWTO





























  Database-SQL-RDBMS HOW-TO pour Linux
  Al Dev (Alavoor Vasudevan)        alavoor@yahoo.com
  v13.0,23 Octobre 1999, (version franaise 28 Octobre 1999)

  Ce document est un "guide pratique" pour la mise en place rapide d'un
  moteur de Base de Donnes SQL et des outils frontaux sur un systme
  Unix. Il traite galement du langage standard International ANSI/ISO
  SQL et passe en revue les mrites/avantages d'un moteur de Base de
  Donnes dvelopp dans le cadre mondial de l'environnement de
  dveloppement ouvert d'internet.  Ce document explique COMMENT mettre
  en place une Base de Donnes Relationnelle SQL Objet de la nouvelle
  gnration "PostgreSQL" sur votre systme unix qui pourra tre
  utilise comme Base de Donnes Serveur d'Application ou Serveur Web.
  PostgreSQL implmente un sous-ensemble des normes Internationales ISO
  et ANSI SQL 1998,92,89. Ce document donne aussi des informations sur
  les programmes d'interface  la base de donnes tels que interfaces
  utilisateur graphiques (GUI), outils RAD (Dveloppement Rapide
  d'Application ), interfaage des langages de programmation ("C",
  "C++", Java, Perl), pilotes ODBC, JDBC ainsi que sur les outils et
  programmes interfaage d'une Base de Donnes Web . L'information
  donne ici est valable pour toutes autres plates-formes unix et autres
  Bases de Donnes. Cette information sera trs utile aux nouveaux util
  isateurs des Bases de Donnes, de PostgreSQL et du langage SQL.  Ce
  document comporte aussi un didacticiel SQL et les spcifications de la
  syntaxe SQL qui devrait tre trs utile aux dbutants. Les gens
  expriments trouveront dans ce document un guide de rfrence trs
  pratique. Pour les tudiants, l'information donne ici leur permettra
  d'obtenir le code source du Systme de Gestion de Base de Donnes
  Relationnel (SGBDR) PostgreSQL  partir duquel ils pourront tudier
  comment un moteur de SGBDR SQL est crit.
  ______________________________________________________________________

  Table des matires

































  1. Introduction

  2. Autres Formats de ce Document

  3. Les lois de la Physique s'appliquent au logiciel !

  4. Qu'est-ce que PostgreSQL ?

  5. O le trouver?

  6. PostgreSQL  grands pas

     6.1 Installation et tests
     6.2 Maximum RPM
     6.3 Test de PyGreSQL - Interface Python
     6.4 Test de Perl - Interface Perl
     6.5 Test des interfaces libpq, libpq++
     6.6 Test des interfaces Java
     6.7 Test des interfaces ecpg
     6.8 Test des exemples SQL - Types and fonctions dfinis par l'utilisateur
     6.9 Test des interfaces Tcl/Tk
     6.10 Test des interfaces ODBC
     6.11 Test des interfaces de la feuille de travail Motif MPSQL
     6.12 Vrification

  7. PostgreSQL Supporte des Base de Donnes extrmement grandes > 200 Gigas

  8. PostgreSQL est-il fiable?

  9. Outil GUI frontal pour PostgreSQL (Interface Utilisateur Graphique)

  10. Pilotes d'interface pour PostgreSQL

     10.1 ODBC Pilotes pour PostgreSQL
     10.2 Pilotes UDBC pour PostgreSQL
     10.3 Pilotes JDBC pour PostgreSQL
     10.4 Java pour PostgreSQL

  11. Pilote d'interface de SGBD Perl (Database Interface  DBI) pour PostgreSQL

     11.1 interface Perl 5 pour PostgreSQL
     11.2 DBI Interface de Base de Donnes Perl
        11.2.1 Qu'est-ce que DBI ?
        11.2.2 Pilote DBI pour PostgreSQL DBD-Pg-0.89
        11.2.3 Support technique sur DBI
        11.2.4 Qu'est-ce que c'est que DBI, DBperl, Oraperl and *perl?
        11.2.5 Spcifications DBI
        11.2.6 Problmes de compilation ou "Il choue aux tests"
        11.2.7 DBI est-il support sur les plates-formes Windows 95 / NT ?
        11.2.8 Qu'est-ce que DBM? Et pourquoi dois-je utiliser DBI  sa place?
        11.2.9 Est-ce que < insrez une fonctionnalit ici > est support par DBI?
        11.2.10 Est-ce que DBI est d'une quelconque utilit pour la programmation CGI?
        11.2.11 Comment puis-je obtenir un temps de connexion plus rapide avec DBD::Oracle et CGI CGI?
        11.2.12 Comment puis-je obtenir une connexion persistante avec DBI et CGI?
        11.2.13 "Quand je lance un script perl de la ligne de commande, a marche, mais, quand je le lance sous httpd, a choue!" Pourquoi?
        11.2.14 Puis-je faire de l'excution en parallle avec DBI?
        11.2.15 Comment puis-je invoquer des procdures enregistres avec DBI?
        11.2.16 Comment puis-je rcuprer les valeurs de retour de procdures enregistres avec DBI?
        11.2.17 Comment puis-je crer ou supprimer une base de donnes avec DBI?
        11.2.18 Comment les valeurs NULL sont-elles prises en compte par DBI?
        11.2.19 Qu'est-ce que c'est que ces histoires de mthodes func?
        11.2.20 Assistance et formation payante

  12. Outils de Gestion PostgreSQL

     12.1 PGACCESS - Un GUI pour la gestion de PostgreSQL
     12.2 Outil Windows interactif de gnration de requte pour PostgreSQL
     12.3 Outil interactif de gnration de requte pour PostgreSQL - ISQL
     12.4 MPMGR - Un outil de gestion de Base de Donnes pour PostgresSQL

  13. Mise en place de plusieurs machines PostgreSQL avec un seul moniteur

  14. Outils et Applications pour PostgreSQL

     14.1 PostgreSQL 4GL pour les applications de bases de donnes web - Le systme de dveloppement AppGEN
     14.2 WWW Web interface pour PostgresSQL - DBENGINE

  15. Module Apache Webserver pour PostgreSQL - NeoSoft NeoWebScript

     15.1 HEITML, extension, ct serveur de HTML et langage 4GL pour PostgreSQL
     15.2 Serveur Web America On-line AOL pour PostgreSQL
     15.3 Outil Systme de suivi de Problme/Projet pour PostgreSQL
     15.4 Conversion de fichiers dbase dbf en fichiers PostgreSQL

  16. Outil de Conception/Implmentation pour SGBD Web pour PostgreSQL - EARPW

     16.1 EARP, c'est quoi ?
     16.2 Implantation
     16.3 Ce dont vous avez besoin pour faire fonctionner EARP
     16.4 Comment fonctionne-t-il?
     16.5 O puis-je le trouver?

  17. PHP Pr-processeur Hypertexte - Langage de script ct serveur, avec HTML intgr, pour PostgreSQL

     17.1 Fonctionnalits principales
     17.2 Crdits
     17.3 PHP 3 - Bref Historique
     17.4 Bon, que puis-je faire avec PHP/FI?
     17.5 Un simple exemple
     17.6 Redirection CGI
        17.6.1 Notes Apache 1.0.x
        17.6.2 HTTPD Netscape
        17.6.3 HTTPD NCSA
     17.7 Lancer PHP/FI  partir de la ligne de commande

  18. Interface Python pour PostgreSQL

     18.1 O le trouver PyGres ?
     18.2 Information et support

  19. Passerelle entre PostgreSQL et WWW - WDB-P95

     19.1 Le serveur PostgresSQL, pgperl, et httpd doivent-ils rsider sur le mme hte?

  20. Interfaces au langage "C", "C++", ESQL/C et Oprateurs sur les bits pour PostgreSQL

     20.1 Interface "C"
     20.2 "C++" interface
     20.3 ESQL/C
     20.4 Oprateurs sur les bits pour PostgreSQL

  21. Les Codes Kanji Japonais pour PostgreSQL

  22. Portage de PostgreSQL pour Windows 95/Windows NT

  23. Mailing Lists

     23.1 Obtenir un compte e-mail Gratuit
     23.2 Liste de Diffusion Anglaise
     23.3 Archive des listes de diffusion
     23.4 Liste de Diffusion Espagnole

  24. Livres et Documentations

     24.1 Guides utilisateur et Manuels
     24.2 Documentation en ligne
     24.3 Documents de Rfrence: Ouvrages de rfrence utiles :
     24.4 Documents de Spcifications ANSI/ISO SQL - SQL 1992, SQL 1998
     24.5 Syntaxe de l'ANSI/ISO SQL 1992
     24.6 Syntaxe de l'ANSI/ISO SQL 1998
     24.7 Didacticiel SQL pour les dbutants
     24.8 Extension Temporelle  SQL92
     24.9 Partie 0 - Acquisition des Documents ISO/ANSI SQL
     24.10 Partie 1 - Etat Actuel de l'ISO/ANSI SQL
     24.11 Partie 2 - Fondements ISO/ANSI SQL
     24.12 Partie 3 - Interface d'Appel SQL ISO/ANSI
     24.13 Partie 4 - Modules Mmoriss Persistants ISO/ANSI SQL
     24.14 Partie 5 - ISO/ANSI SQL/Liens
     24.15 Partie 6 - Interface de Spcialisation (SQL/XA) ISO/ANSI SQL XA)
     24.16 Partie 7 - ISO/ANSI SQL Temporel
        24.16.1 INTRODUCTION
        24.16.2 TUDE DE CAS - ENREGISTREMENT DE L'INFORMATION COURANTE
        24.16.3 TUDE DE CAS - ENREGISTREMENT DE L'INFORMATION HISTORIQUE
        24.16.4 TUDE DE CAS - PROJECTION
        24.16.5 TUDE DE CAS - JOINTURE
        24.16.6 TUDE DE CAS - AGRGATS
        24.16.7 RSUM
     24.17 Partie 8 - SQL MULTIMEDIA ISO/ANSI (SQL/MM)

  25. Support Technique pour PostgreSQL

  26. Aspects conomiques et Commerciaux

  27. Liste des autre Bases de Donnes

  28. Indications pour la recherche sur le World Wide Web Internet

  29. Conclusion

  30. FAQ - Questions sur PostgreSQL

  31. Notice de Copyright

  32. Appendice A - Syntaxe de l' ANSI/ISO SQL 1992

  33. Appendice B - Tutoriel SQL  l'usage des dbutants

     33.1 Didacticiel pour PostgreSQL
     33.2 Pointeurs URL Internet

  34. Appendix C - Instructions pour une installation rapide de Linux



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Le but de ce document est de fournir une liste de pointeurs/URL
  dtaille de faon  mettre rapidement en oeuvre PostgreSQL et de
  mettre en avant l'intrt des systmes  Code Source Ouvert tel que
  PostgreSQL, Linux.

  Tout systme informatique au monde a besoin d'une base de donnes pour
  stocker/retrouver les informations. La premire raison pour laquelle
  on utilise un ordinateur est de stocker, retrouver et traiter
  l'information et de faire cela trs rapidement, et donc, de faire
  conomiser du temps.  En mme temps, le systme doit tre simple,
  robuste, rapide, fiable, conomique et d'utilisation aise.  La Base
  de Donnes constitue une PPAARRTTIIEE VVIITTAALLEE DDUU SSYYSSTTMMEE des plus importantes
  car elle contient les donnes indispensables de toute compagnie au
  monde.  Les systmes de gestion de base de donnes les plus courants
  sont bass sur les spcifications ISO (International Standard
  Organisation) SQL lesquelles sont galement bases sur les normes
  amricaines ANSI SQL. Les spcifications les plus courantes
  gnralement utilises sont l'ISO/ANSI SQL 1992. La prochaine norme,
  encore en cours de dveloppement est la SQL 1998/99 aussi appele
  SQL-3. Les systmes de gestion de bases de donnes les plus rpandus
  tels que Oracle, Sybase et Informix s'appuient sur ces standards ou
  essaient de les implmenter.

  Il y a plus de 20 varits, commerciales/internet,  de systmes de
  gestion de base de donnes actuellement utiliss dans le monde et
  beaucoup plus dans un futur proche. En l'absence d'une norme telle que
  l'ANSI/ISO SQL, il serait trs difficile pour l'utilisateur de
  dvelopper une application une fois pour toutes et de l'utiliser avec
  tous les systmes de gestion de bases de donnes. L'utilisateur veut
  dvelopper son application une fois pour toutes en utilisant les
  normes ISO SQL, ODBC, JDBC afin qu'elle puisse tre dploye sur une
  grande varit de systmes de gestion de base de donnes a travers le
  monde.

  PostgreSQL est la Base de Donne LIBRE la plus populaire au monde qui
  implmente la plupart des normes ISO SQL, ANSI SQL/98, SQL/92 et ANSI
  SQL/89 RDBMS. PostgreSQL est une base de donnes relationnelle Objet
  de la nouvelle gnration et les futures normes ANSI SQL tels que le
  SQL 1998 (SQL-3) et au-del traiteront de manire croissante de bases
  de donnes Objet et de types de donnes Objet. PostgreSQL est le seul
  SGBD (RDBMS - Relational Data Base Management System) au monde qui
  supporte les bases de donnes Objet et SQL. Ce document vous explique
  comment installer le systme de gestion de base de donnes, comment
  mettre en place la base de donnes Web, la base de donnes application
  , les frontaux GUIs et les programmes interfaage. On ne saurait trop
  RECOMMANDER d'crire vos applications bases de donnes 100 %
  compatibles avec les normes ISO/ANSI SQL, ODBC, JDBC ceci rendant
  votre application portable sur de multiples SGBD (Systmes de gestion
  de Bases de Donnes) tels que PostgreSQL, Oracle, Sybase, Informix
  etc.

  La haute qualit, et un large ensemble de possibilits de PostgreSQL
  viennent du fait que ce systme est dvelopp suivant le principe du
  Modle de dveloppement  Code Source Ouvert. Les modles  Code
  Source Ouvert sont ceux ou la totalit du code source est fournie et
  ou le dveloppement se fait  travers l'internet par une trs vaste
  communaut de cerveaux humains en rseau. La tendance future des
  dveloppement logiciels rside dans ce que l'on appelle les "super
  autoroutes de l'information" qui s'tendent  travers le monde entier.
  Dans les annes  venir, la croissance d'internet va tre explosive et
  de ce fait favorisera l'adoption de PostgreSQL par la communaut des
  utilisateurs de bases de donnes.

  Par l'application des principes de la statistique, des mathmatiques
  et de la science  la qualit des logiciels, on obtient la meilleure
  qualit des logiciels  ' Code Source Ouvert' tel que PostgreSQL en
  mettant le code source des programmes  la disposition d'un grand
  nombre de cerveaux humains interconnects par les super-autoroutes de
  l'information. Plus le nombre de cerveaux au travail sera grand,
  meilleure sera la qualit du logiciel produit. Le modle " Code
  Source Ouvert" vite aussi de RRIINNVVEENNTTEERR LLAA RROOUUEE, supprime LLAA
  DDUUPPLLIICCAATTIIOONN DDUU TTRRAAVVAAIILLtout en tant particulirement conomique, en
  diminuant les dlais de distribution et en suivant les lois
  conomiques modernes d'optimisation des ressources nationales et
  globales.  Une fois qu'un logiciel a t ralis par d'autres, vous
  NN''AAVVEEZZ PPAASS  recommencer le travail. Vous ne perdrez pas un temps
  prcieux sur quelque chose qui a dj t CCOORRRREECCTTEEMMEENNTT ralis.  Votre
  temps est extrmement prcieux et il faut l'utiliser de manire
  efficace, car vous ne disposez que de 8 heures par jour pour
  travailler!!.  Dans un futur proche,  l'aube du 21-ime sicle, la
  manire de se procurer un logiciel va changer. Les utilisateurs
  accorderont en premier lieu leur prfrence aux logiciels ouverts tel
  PostgreSQL, Linux etc...

  En achetant des binaires vous n'obtenez pas la vritable proprit du
  logiciel et ce n'est pas juste. Acheter un logiciel _p_e_u_t devenir une
  attitude archaque. On a seulement besoin d'acheter un bon matriel,
  il vaut mieux dpenser de l'argent en matriel et trouver le logiciel
  sur internet.  Le point important, c'est que llee ggrrooss dduu ttrraavvaaiill est
  effectu par le matriel. Le matriel est le cheval de bataille et le
  logiciel est l pour le piloter.  Le matriel est tellement plus
  compliqu que seulement 6 pays sur 180 au monde ont dmontr leur
  capacit  concevoir et  fabriquer les composants d'ordinateurs. La
  conception et la fabrication de composants d'ordinateurs est une
  technologie avance. C'est un processus trs complexe, requrant de
  trs larges investissements en usine et en machines de production
  matrisant la technologie des 0.18 micron. Des milliards de
  transistors/circuits sont implants sur une petite puce de silicium.
  Des compagnies telles que Applied Material, AMD, Intel, Cyrix,
  Hitachi, Ibm et autres ont dpens d'importantes quantits d'hommes-
  ans de travail pour matriser des hautes technologies telles que la
  Micro-lectronique et la Nano-lectronique (Micro signifie millionime
  de mtre et Nano signifie milliardime de mtre).  La technologie
  actuelle utilise la micro-lectronique  0.35 microns avec des
  conducteurs en aluminium, celle de 0.25 microns utilise des
  conducteurs de cuivre. Dans un futur proche, la technologie des 0.10
  microns avec conducteurs de cuivre et mme la nano-lectronique sera
  utilises pour les circuits intgrs d'ordinateurs.  Les conducteurs
  en aluminium seront dtrns par ceux en cuivre sur les puces
  d'ordinateurs, car le cuivre est meilleur conducteur d'lectrons.  En
  photo-lithographie, l'extrme ultraviolet, les rayons X ou les
  techniques de faisceau d'electrons seront utilises pour graver des
  circuits de taille infrieure  0.15 microns.  Dans environ 20 ans,
  les circuits en silicium seront remplaces par des ordinateurs
  molculaires et des circuits biologiques qui seront des millions de
  fois plus rapides que les circuits en silicium.  Les molcules sont
  des groupes d'atomes, et les atomes sont de minuscules particules
  constituant la matire premire premire de tout ce qui nous entoure.
  Les ordinateurs molculaires utiliseront les molcules en tant
  qu'interrupteurs lectroniques ultra rapides. Lorsque l'interrupteur
  est ferm (ON), on obtient la valeur 1 et quand il est ouvert (OFF),
  la valeur 0. Tous les programmes d'ordinateurs au monde utilisent
  l'algbre binaire (nombres 0 et 1).  Le tableau ci-dessous montre les
  progrs et les tendances futures des puces d'ordinateurs.


















                  Progrs dans les capacits des puces dans le futur
                  **************************************************
  +--------------------------------+--------+--------+--------+--------+-------+---------+
  | Item/Anne                     | 1997   | 1999   | 2001   | 2003   | 2012  |  2020   |
  +--------------------------------+--------+--------+--------+--------+-------+---------+
  | Technologie (micron)           | 0.25   | 0.18   | 0.15   | 0.13   | 0.05  |< 0.00001|
  +--------------------------------+--------+--------+--------+--------+-------+---------+
  | Taille de la puce(mm)          | 200    | 300    | 300    | 300    | 45    | Mol/bio |
  +--------------------------------+--------+--------+--------+--------+-------+---------+
  | Tension mini. de fonctionnement| 1.8-2.5| 1.5-1.8| 1.2-1.5| 1.2-1.5|0.5-0.6| < 0.001 |
  +--------------------------------+--------+--------+--------+--------+-------+---------+
  | Puissance dissipe maximum     | 70     | 90     | 110    | 130    | 175   |  600    |
  +--------------------------------+--------+--------+--------+--------+-------+---------+
  | frquence de fonct. puce  (MHz)| 750    | 1250   | 1500   | 2100   | 10000 | > 50 000|
  +--------------------------------+--------+--------+--------+--------+-------+---------+
  | Capacit mmoire DRAM          | 256 MB | 1 GB   | 2 GB   | 4 GB   | 256 GB| > 1000GB|
  +--------------------------------+--------+--------+--------+--------+-------+---------+




  Comme on peut le voir c'est le matriel qui est important et de haute
  technologie, le logiciel est une technologie moins difficile 
  matriser. Donc la fabrication de matriel est vitale pour l'conomie
  nationale!. Des compagnies comme Compaq, Dell, Sun Microsystems, HP,
  IBM qui fabriquent des ordinateurs contribuent de faon importante 
  l'conomie U.S. aujourd'hui et dans le futur!!

  D'un autre ct, chaque pays au monde dveloppe/produit du logiciel.
  En fait, n'importe qui dans le monde, avec un petit PC conomique,
  peut crer un systme serveur de base de donnes Oracle.  Mais cela
  lui prendra environ 10 ans (Le serveur de base de donnes Oracle
  correspond  plus de 10 hommes-ans de travail). Un homme-an correspond
  au travail d'un homme  temps plein pendant une anne. Si 10 personnes
  travaillent pendant un an cela correspond  10 hommes-ans.

  Les SGBD tels que Oracle, Informix, Sybase, IBM DB2 (Unix) sont crits
  en langage "C" et les binaires crs par compilation de ces sources
  sont fournis aux clients. Les SGBD Oracle,  Sybase, Informix sont des
  programmes "C"  100 %!!.

  Puisqu'une masse importante de travail a t effectue sur PostgreSQL
  au cours des 14 dernires annes, cela n'aurait aucun sens de recrer
  ex-nihilo un autre systme de gestion de base de donnes satisfaisant
  aux normes ANSI/ISO SQL. Il est bien plus intressant de prendre le
  code existant de PostgreSQL, de commencer  l'utiliser, de l'amliorer
  et d'y ajouter les fonctionnalits manquantes.

  PostgreSQL n'est pas seulement un SGBD libre mais aussi un "Produit
  Internet" de bonne qualit.

  On peut prdire que la demande de produits "Fabriqu sur Internet" va
  crotre exponentiellement. Ces produits tant de haute qualit, de
  faible cot et ayant une base d'utilisateurs et de dveloppeurs
  extrmement large.  Les pays qui n'utilisent pas  les produits
  "Fabriqu sur Internet" seront les oublis de "la Rvolution mondiale
  Internet" et resteront loin derrire les autres pays. La raison
  provient de ce "qu'Internet" lui-mme est la PPLLUUSS GGRRAANNDDEE compagnie de
  logiciels!

  22..  AAuuttrreess FFoorrmmaattss ddee ccee DDooccuummeenntt

  Ce document est publi en 10 formats diffrents qui sont - DVI,
  Postscript, Latex, LyX, GNU-info, HTML, RTF(Rich Text Format), Texte
  simple, Pages de manuel Unix et SGML.

    Vous pouvez obtenir ce document HOWTO en tant que fichier tar dans
     les formats HTML, DVI, Postscript ou SGML de -
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/>

    Le format texte simple se trouve dans:
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO>

    Des traductions dans d'autres langues telles que le Franais,
     l'Allemand, l'Espagnol, le Chinois se trouvent dans
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> Toute aide que vous
     pourriez apporter pour le traduire dans d'autres langues sera la
     bienvenue.

     Ce document est rdig  l'aide d'un outil appel "SGML tool" que
     l'on peut obtenir de - <http://www.xs4all.nl/~cg/sgmltools/> Pour
     compiler le texte source, vous utilisez des commandes telles que :

    sgml2html databasehowto.sgml     (pour gnrer un fichier html)

    sgml2rtf  databasehowto.sgml     (pour gnrer un fichier RTF)

    sgml2latex databasehowto.sgml    (pour gnrer un fichier latex)

  Ce document se trouve  -

    <http://sunsite.unc.edu/LDP/HOWTO/PostgreSQL-HOWTO.html>

  Vous pouvez galement le trouver sur les sites miroirs suivants -

    <http://www.caldera.com/LDP/HOWTO/PostgreSQL-HOWTO.html>

    <http://www.WGS.com/LDP/HOWTO/PostgreSQL-HOWTO.html>

    <http://www.cc.gatech.edu/linux/LDP/HOWTO/PostgreSQL-HOWTO.html>

    <http://www.redhat.com/linux-info/ldp/HOWTO/PostgreSQL-HOWTO.html>

    Vous pouvez trouver d'autres sites miroirs proches de chez vous (au
     sens d'adresse rseau)  <http://sunsite.unc.edu/LDP/hmirrors.html>
     choisissez un site et allez dans le rpertoire
     /LDP/HOWTO/PostgreSQL-HOWTO.html


  Pour visualiser le document au format dvi, utilisez le programme xdvi.
  Le programme xdvi se trouve dans le paquetage tetex-xdvi*.rpm de
  Redhat Linux que l'on trouve en choisissant les menus  : Panneau de
  contrle | Applications | Publication | TeX.  Pour lire le document,
  tapez la commande -


               xdvi -geometry 80x90 howto.dvi
         man xdvi




  Et redimensionnez l'cran  l'aide du mulot. Consultez la page de
  manuel concernant xdvi.  Pour naviguer dans le document, utilisez les
  touches Flches, Page prcdente ,Page suivante. Vous pouvez aussi
  utiliser les lettres 'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' pour vous
  dplacer vers le haut, vers le bas, au centre, vers la page
  prcdente, Pour dsactiver le menu expert, tapez 'x'.

  Vous pouvez lire le fichier postscript en utilisant le programme 'gv'
  (ghostview) ou Le programme ghostscript se trouve dans le paquetage
  ghostscript*.rpm et le programme gv dans le paquetage gv*.rpm de Linux
  Redhat que l'on peut trouver en choisissant les menus : Panneau de
  contrle | Applications | Graphique.  Le programme gv est beaucoup
  plus convivial que ghostscript.  Les programmes ghostscript et gv sont
  disponibles sous d'autres plates-formes telles que OS/2, Windows 95 et
  NT, vous pouvez donc visualiser ce document sur ces plates-formes.
  Pour lire le document postscript tapez la commande -


                       gv howto.ps




  AATTTTEENNTTIIOONN:: ce document est volumineux, le nombre total de pages
  (postscript) imprimes est approximativement de 134.

  Vous pouvez lire ce document en format HTML en utilisant Netscape
  Navigator, Microsoft Internet explorer, Redhat Baron Web browser ou
  n'importe lequel des 10 butineurs web.

  Vous pouvez le lire en format latex de sortie de LyX en utilisant LyX,
  frontal X-Window pour latex.

  33..  LLeess llooiiss ddee llaa PPhhyyssiiqquuee ss''aapppplliiqquueenntt aauu llooggiicciieell !!

  Dans ce chapitre, on montrera comment la science joue un rle
  important dans la cration de nombreux objets comme le logiciel, cet
  univers, la masse, les atomes, les nergies et mme vous-mme !.  Ce
  chapitre montre galement pourquoi il est important d'avoir des
  connaissances en science AVANT de commencer  en utiliser les
  produits.  Tout en fait partie - par exemple PostgreSQL, le temps, la
  masse, l'nergie, les plantes, le soleil, la lune, les toiles, les
  super-amas, les humains etc... sont des objets crs par la science.
  Ce chapitre montre galement comment les lois de la science et les
  statistiques tmoignent en faveur de systmes  code source ouvert
  comme PostgreSQL et Linux.  La vitesse d'internet s'accroissant de
  jour en jour, et internet devenant de PLUS EN PLUS fiable, les
  systmes  code source ouvert gagnent rapidement de l'audience.  Et,
  si les rgles de la statistique et les lois de la physique sont
  correctes, les systmes  code source ferms sont appels 
  DISPARATRE de cette plante.

  Les paragraphes ci-dessous montreront - "combien la science est vaste,
  combien elle est importante pour les hommes et quel est son impact sur
  des projets logiciels comme PostgreSQL, Linux".

  Le dveloppement d'un projet tel que PostgreSQL requiert des
  ressources telles que de l'nergie et du temps, de ce fait, PostgreSQL
  est un produit d'nergie et de temps.  Puisque l'nergie et le temps
  ne peuvent d'expliquer que par la science, il y a une corrlation
  directe entre la physique et les projets tels que PostgreSQL, Linux.


  Les lois des sciences (Physique) s'appliquent partout, toujours, 
  tout ce que vous faites et mme aux projets logiciels.  La physique
  est en action pendant que vous parlez (ondes sonores), marchez
  (frottement entre le sol et vos pieds), lisez un livre ou crivez un
  logiciel.  Diffrentes branches des sciences, telles que la physique,
  la chimie, etc... se rejoignent toutes dans un vaste ensemble, les
  mathmatiques (galement nommes Reine des Sciences).

  Et tout, dans ce monde, a des racines profondes dans les
  mathmatiques, y compris PostgreSQL.  PostgreSQL utilise L'algbre
  moderne qui constitue une petite branche des mathmatiques. L'algbre
  moderne concerne la Thorie des ensembles , l'algbre
  relationnelle, la science des Groupes, des Anneaux, les Collections,
  Ensembles, Unions, Intersections, Exclusions,Domaines, Listes, etc...


  Un logiciel tel que PostgreSQL existe aujourd'hui grce  l'nergie et
  au temps.  C'est l'nergie qui a cr ce monde, les cerveaux humains
  et beaucoup d'autres choses!.  Et, la masse et l'nergie sont UNE et
  la MMMMEE entit!.  Il y a 100 ans, le fait que la masse et l'nergie
  soient la mme chose n'tait pas connu des gens !

  Les cellules des cerveaux humains consomment de l'nergie en
  travaillant ( la cration d'un logiciel), transformant de l'nergie
  chimique en chaleur.  Mme pendant la lecture de ce paragraphe, les
  cellules de votre cerveau consomment du carburant et utilisent de
  l'nergie. Donc INTERROMPEZ IMMDIATEMENT VOTRE LECTURE!


  L'nergie rsultant de l'activit des neurones (cellules du cerveau)
  peut tre mesure en laboratoire. Par exemple, il y a de nombreux
  instruments comme le "dtecteur de mensonge" et autres instruments
  mdicaux qui peuvent mesurer l'activit du cerveau. Tout cela sous-
  entend que le cerveau humain est une machine thermodynamique. Et comme
  le cerveau humain est une machine thermodynamique, les lois de la
  thermodynamique d'appliquent au cerveau et, par consquent, la
  thermodynamique a des effets indirects sur les logiciels comme
  PostgreSQL.

  Suivant la science, il est impossible de construire tout systme ou
  thorie (y compris un systme logiciel de gestion de base de donnes)
  qui soit parfait  100 % et sans erreur.  C'est comme poursuivre un
  mirage, nous ne pourrons JJAAMMAAIISS atteindre l'objectif d'obtenir la
  perfection dans un systme ou une thorie.  Les quations/discussions
  mathmatiques dtailles pour prouver qu'un "systme parfait" (de mme
  pour prouver qu'un "systme imparfait") est impossible sont des sujets
  avancs et hors sujet dans ce document. Et une telle tude
  mathmatique implique la prise en compte d'un nombre infini de
  dimensions (ainsi que les dimensions primaires) que l'on trouve dans
  la nature. Malheureusement, les humains ne peuvent voir et
  conceptualiser que 4 dimensions alors que les mathmatiques peuvent
  facilement en explorer beaucoup d'autres.  Les autres dimensions sont
  ""iinnffiinniimmeenntt pplluuss ppeettiitteess"" que les atomes, et les atomes eux-mmes sont
  si minuscules que les yeux humains ne peuvent pas les voir !  Pour
  analyser et expliquer la naissance et la mort de notre univers, les
  mathmatiques constituent un outil trs puissant.  Notre univers, si
  vous le regardez  partir d'un autre univers possde pratiquement une
  ttaaiillllee nnuullllee et vice versa. Ce qui signifie que notre univers n'est
  pas visible (n'existe pas) pour les gens d'un autre univers ! Et vice
  versa !  Thoriquement, il est possible de sortir de notre univers et
  de voyager sur des distances immenses (milliard d'annes lumire) en
  un temps nul et de rentrer en un point diffrent de l'espace-temps !.
  La distance entre notre univers et les autres univers est en ralit
  nulle !.

  Bien qu'il y ait un nombre infini de dimensions, celles-ci peuvent
  tre dduites/gnres  partir d'un nombre restreint de dimensions
  PRIMAIRES.  C'est--dire qu'un nombre infini de dimensions peut se
  combiner et se ramener aux dimensions primaires. Les dimensions
  primaires absorbent simplement les autres dimensions sans tre
  dtruites.  Les mathmaticiens utilisent ces dimensions primaires pour
  comprendre la naissance et la mort des univers. L'univers o vous
  vivez actuellement a commenc  exister lors d'un BBIIGG BBAANNGG, caus par
  les interactions de particules atomiques d'autres dimensions, qui
  s'est produit il y a des milliards d'annes (environ 20 milliards
  d'annes).  Juste avant le big bang il y avait un petit point o la
  longueur, la largeur, la hauteur et le temps taient NULS (
  c'est--dire que notre univers N'EXISTAIT PAS !!) alors que d'autres
  univers et les dimensions primaires existaient.  Le temps lui-mme
  n'existait PAS l et les atomes, les toiles, les plantes et les
  galaxies n'existaient PAS! Les atomes qui sont  l'intrieur de notre
  corps n'existaient PAS !!.  Tellement de choses se sont passes AVANT
  qu le temps n'existe !

  Le big bang et donc la naissance de notre univers rsulte de quelques
  atomes de dimensions primaires. QQUUEELLQQUU''UUNN, (quelque chose ?), a caus
  le fracassement de quelques atomes minuscules d'autres dimensions pour
  crer notre univers, et de nouvelles dimensions de temps, de longueur,
  de largeur et de hauteur taient nes !. Nous voyons l'effet d'une
  quelconque main dans se processus.  Ce processus nn''eesstt ppaass
  ppaarrffaaiitteemmeenntt ccoommpprriiss par les hommes. Ceux-ci essaient de gnrer un
  autre univers en laboratoire en simulant le big bang (Un acclrateur
  trs puissant est en construction en Europe, un autre, en cours de
  construction  Dallas, aux USA, a t arrt par le congrs US pour
  cause de coupes budgtaires). Il y a des atomes dans d'autres
  dimensions exactement comme nous avons des atomes dans notre univers.
  Thoriquement, on peut crer/gnrer un nombre infini d'univers !. Ce
  processus est rversible, ce qui veut dire que notre univers peut
  compltement s'effondrer sur lui-mme et disparatre en quelques
  atomes d'autres dimensions !. C'est une analogie similaire  la faon
  dont VOUS tes ns  partir de de deux cellules minuscules qui se sont
  FRACASSES l'une contre l'autre pour crer une cellule unique. Cette
  toute petite cellule s'est divise et multiplie en 6 billions de
  cellules pour devenir cet tre humain de 1.80 mtre (que vous tes !).
  Il y a une ressemblance entre les tres humains et les univers qui
  naissent puis meurent, un peu comme les humains.

  Puisqu'un tat PARFAIT (comme IMPARFAIT) est impossible, des univers
  comme le ntre sont ns et plus tard mourront selon un processus
  cyclique. MAIS il ne peut pas y avoir de mort PARFAITE, seules des
  transformations sont permises par la science !.  Actuellement notre
  univers est en expansion  un rythme formidable, il n'est pas statique
  mais trs dynamique.  Cet univers continuera son expansion jusqu' ce
  que quelque chose interfre pour entraner son effondrement par
  l'application de pressions ayant des dimensions externes qui
  l'annihileront !!. Il y a deux possibilits  : suppression de masse de
  l'univers via les trous noirs (processus lent), ou ajout de masse 
  l'univers via les trous blancs (processus rapide d'un big crunch). Des
  millions d'univers peuvent exister mais seuls trs peu d'univers
  peuvent tre btis  partir des dimensions primaires.  Vous n'tes pas
  constitus uniquement d'atomes de cet univers mais aussi d'atomes
  d'autres dimensions !.  Dans les trous noirs les atomes et les
  particules de notre univers sont engloutis et entirement transforms
  et convertis en particules d'autres dimensions !. Au centre d'un trou
  noir, le temps est nul comme le sont la longueur, la largeur et la
  hauteur !. Et le trou noir constitue la porte d'ENTRE/SORTIE pour
  d'autres univers. Ces portes d'entre/sortie peuvent s'ouvrir
  n'importe o, mme  l'intrieur de votre corps !

  Il peut y avoir un nombre infini de couleurs, de langages
  informatiques, d'architectures de circuits d'ordinateurs et de
  thories, mais il NE PEUT PAS y avoir LA PERFECTION pour UN(E) SEUL(E)
  couleur, langage informatique, architecture ou systme !  Vous ne
  pouvez obtenir qu'une couleur (longueur d'onde, qu'un systme, qu'une
  base de donnes ou une thorie PRESQUE PARFAITE !  La nature est comme
  un kalidoscope.

  En combinant les nergies de millions de personnes  travers le monde
  via internet il est possible d'obtenir un systme PPRREESSQQUUEE PPAARRFFAAIITT (y
  compris un systme logiciel de gestion de base de donnes). Prise
  individuellement, l'nergie de chacun est microscopique, mais en
  mettant en rseau un trs grand nombre de personnes, l'nergie totale
  sera norme, et elle peut tre canalise pour crer un systme presque
  parfait.  Les tres humains sont des cratures  l'nergie et aux
  ressources finies, ports  faire des erreurs allant de la plus
  triviale  la plus profonde. Puisque notre propension  faire des
  erreurs varie largement en fonction de qualifications particulires,
  d'exprience particulire et des humeurs du moment, la dcouverte et
  l'limination des erreurs logicielles dues  des erreur humaines
  ordinaires peut tre largement facilite en concentrant un grand
  nombre d'esprits humains  ce problme.

  Il est trs clair qu'internet peut mettre en rseau un grand nombre de
  personnes, ce qui implique qu'internet possde beaucoup d'nergie et
  de temps qui peuvent crer des produits logiciels de bien meilleure
  qualit, en un temps plus court, que des compagnies commerciales. Mme
  de grandes compagnies comme Microsoft, IBM ne peuvent pas s'affranchir
  des lois de la physique mais finalement SSEE PPLLIIEERR aux lois de la
  science !

  Aujourd'hui, il y a beaucoup trop de systmes de base de donnes
  relationnelles SQL RDBMS dans le monde se rfrant  une spcification
  ANSI/ISO SQL unique.  LL''hhuummaanniitt nnee ddooiitt ppaass ppeerrddrree ssoonn tteemmppss  ccrreerr
  ddee ttrroopp nnoommbbrreeuuxx ppaaqquueettaaggeess llooggiicciieellss SSIIMMIILLAAIIRREESS OOUU IIDDEENNTTIIQQUUEESS  alors
  qu'il y a trop d'autres sujets en sciences qui mriteraient
  l'attention.

  En conclusion,  cause des lois de la science, les systmes  "code
  source ouvert" comme PostgreSQL, Linux seront toujours meilleurs que
  les systmes  "code source ferm", et il est possible de prouver
  cette affirmation scientifiquement.

  44..  QQuu''eesstt--ccee qquuee PPoossttggrreeSSQQLL ??

  PostgreSQL Version 6.5.2 est un SGBD libre, son code source complet
  est fourni. De plus, c'est un SGBD Relationnel-Objet pratiquement
  conforme (de plus en plus conforme) aux normes ANSI SQL1998,92,89. Il
  fonctionne sur diverses plates-formes matrielles sous diffrents
  Systmes d'Exploitation.


               Quelquefois des corrections urgentes d'erreurs sont diffuses aprs la diffusion
               d'une rvision de PostgreSQL. Vous pouvez appliquer ces rustines optionnelles
               selon les besoins de votre application. Effectuez les tapes suivantes pour
               appliquer ces rustines -
                       cd /usr/src/postgresql6.5.2
           man patch
                       patch -p0 < patchfile
                       make clean
                       make




  Les fichiers de mise  jour se trouvent dans

    Rustines PostgreSQL :  <ftp://ftp.postgresql.org/pub/patches>

  L'objectif ultime et le but final de PostgreSQL est de devenir
  compatible  100 %  la norme ANSI/ISO SQL ainsi que de devenir le
  numro UN mondial des systmes de gestion de Base de Donnes ouverts
  gnriques. PostgreSQL guidera, conduira, contrlera, suivra et
  dictera le futur de l'ANSI/ISO SQL.  C'est--dire, l'implmentation et
  les ides apparatront en premier dans PostgreSQL puis, plus tard,
  seront incorpors dans l'ANSI/ISO SQL. PostgreSQL reprsente "l'tat
  de l'art" de la technologie des bases de donnes.

  Le serveur Informix Universal (diffus en 1997) est bas sur une
  version prcdente de PostgreSQL car Informix a achet Illustra Inc.
  et l'a intgre  Informix. La base de donnes Illustra tait
  compltement base sur Postgres (version prcdente de PostgreSQL).
  PostgreSQL est une amlioration du SGBD POSTGRES, prototype de
  recherche de SGBD de la prochaine gnration. PostgreSQL, tout en
  conservant le puissant modle de donnes et la richesse des types de
  donnes de POSTGRES, remplace le langage de requte PostQuel par un
  sous-ensemble tendu de SQL.

  Le dveloppement de PostgreSQL est ralis par une quipe de
  dveloppeurs Internet qui sont tous inscrits  la liste de diffusion
  "PostgreSQL dveloppement mailing list".  Son coordinateur actuel est
  Marc G. Fournier

    scrappy@postgreSQL.org

     Cette quipe est maintenant responsable des dveloppements actuels
     et futurs de PostgreSQL. Naturellement, l'utilisateur de la base de
     donnes est lui-mme dveloppeur de PostgreSQL!. La charge de
     dveloppement est rpartie au sein d'un grand nombre d'utilisateurs
     finaux de bases de donnes sur internet.

  Les auteurs de  PostgreSQL 1.01 sont Andrew Yu et Jolly Chen.  De
  nombreux autres ont contribu au portage, aux tests,  la mise au
  point et a l'amlioration du code. Le code original Postgres, duquel
  PostgreSQL est issu, est le rsultat de l'effort de nombreux tudiants
  de troisime cycle, de deuxime cycle et d'enseignants sous la
  direction du Professeur Michael Stonebraker de l'universit de
  Californie, Berkeley.

  Le nom original du logiciel  Berkeley tait Postgres. Lors de l'ajout
  des fonctionnalits SQL en 1995, il fut renomm Postgres95. Ce nom fut
  chang  la fin de 1996 en PostgreSQL.

  Des millions d'exemplaires du SGBD PostgreSQL sont installs comme
  serveurs, serveurs Web et serveurs d'application. Ce SGBD est trs
  avanc, c'est un SGBD Relationnel-Objet (ORDBMS).

  PostgreSQL peut stocker plus de types de donnes que les types
  traditionnels entier, caractres, etc. - L'utilisateur peut crer des
  types, des fonctions, de l'hritage de type etc. PostgreSQL fonctionne
  sur Solaris, SunOS, HPUX, AIX, Linux, Irix, Digital Unix, BSDi,
  NetBSD, FreeBSD, SCO unix, NEXTSTEP, Unixware et toutes sortes d'unix.
  Un portage pour Windows 95/NT est en cours de ralisation.

    Titre :           PostgreSQL SQL RDBMS Database (Systme de Gestion
     de Base de Donnes Relationnelle Objet)

    Version actuelle : 6.5.2

    Age :           PostgreSQL a 14 ans. En dveloppement depuis 1985

    Auteurs :         Dvelopp par des millions
     d'universits/compagnies sur internet au cours de ces 14 dernires
     ANNES

     PostgreSQL et les lments qui s'y rapportent dans ce document sont
     couverts par le COPYRIGHT de l'Universit de Californie, Berkeley.

  55..  OO llee ttrroouuvveerr??

  On peut acheter le CDROM Linux Redhat 5.0, le CDROM Linux Debian ou le
  CDROM Linux Slackware qui contiennent dj postgresql sous forme de
  paquetage (a la fois en code source et en binaires) au :

    site Web Linux System Labs :  <http://www.lsl.com/>  (7 U.S.
     dollars)


    site Web Cheap Bytes Inc :  <http://www.cheapbytes.com/> (7 U.S.
     dollars)

    site Web Principal Debian :  <http://www.debian.org/vendors.html>

  L'organisation PostgreSQL vend un 'CDROM PostgreSQL' qui contient le
  code source complet et les binaires pour de nombreux systmes
  d'exploitation Unix, ainsi que la documentation complte.

    CDROM PostgreSQL au site Web principal  :
     <http://www.postgresql.org> 30 (U.S. dollars)

  Distributions uniquement en binaire de PostgreSQL :

    On peut excuter PostgreSQL sans compiler le source. Rcuprer les
     binaires pour Intel-Linux de l'url
     <ftp://www.redhat.com/pub/contrib/i386/> le fichier se nomme
     postgresql-6.5.2.i386.rpm.  Son format est de type paquetage redhat
     'rpm'. Il contient  la fois le source et les binaires de
     PostgreSQL.

    Sites binaires pour Solaris, HPUX, AIX, IRIX, Linux :
     <ftp://ftp.postgresql.org/pub/bindist> Si vous faites une
     compilation pour n'importe laquelle des plates-formes envoyer le
     binaire  ce site, cela peut tre utile aux autres.

    site ftp : rcuprer les binaires pour Intel-Linux de
     <ftp://ftp.redhat.com/pub/contrib/i386/> le fichier se nomme
     postgresql-6.5.2.i386.rpm. Son format est de type paquetage redhat
     'rpm'. Il contient  la fois le source et les binaires de
     PostgreSQL.


  Sites WWW Web :

    Site Web primaire :    <http://www.postgresql.org/>

    Site Web secondaire :  <http://logical.thought.net/postgres95/>

    <http://www.itm.tu-clausthal.de/mirrors/postgres95/>

    <http://s2k-ftp.cs.berkeley.edu:8000/postgres95/>

    <http://xenium.pdi.net/PostgreSQL/>

    <http://s2k-ftp.cs.berkeley.edu:8000/postgres95/>


  Les sites ftp sont indiqus ci-dessous :-

    Primaire FTP :       <ftp://ftp.postgresql.org/pub>

    Secondaire FTP :     <ftp://ftp.chicks.net/pub/postgresql>

    <ftp://ftp.emsi.priv.at/pub/postgres/>

    <ftp://ftp.itm.tu-clausthal.de/pub/mirrors/postgres95>

    <ftp://rocker.sch.bme.hu/pub/mirrors/postgreSQL>

    <ftp://ftp.jaist.ac.jp/pub/dbms/postgres95>

    <ftp://ftp.luga.or.at/pub/postgres95>

    <ftp://postgres95.vnet.net:/pub/postgres95>

    <ftp://ftpza.co.za/mirrors/postgres>

    <ftp://sunsite.auc.dk/pub/databases/postgresql>

    <ftp://ftp.task.gda.pl/pub/software/postgresql>

    <ftp://xenium.pdi.net/pub/PostgreSQL>


  Le code source de PostgreSQL est aussi disponible sur tous les sites
  miroirs de  sunsite.unc (soit environ 1000 sites autour du globe). Il
  se trouve dans la distribution Linux Red Hat dans le fichier
  /pub/contrib/i386/postgresql.rpm.

    Pour obtenir la liste des sites miroirs aller  l'url
     <ftp://sunsite.unc.edu>

  66..  PPoossttggrreeSSQQLL  ggrraannddss ppaass

  Ce chapitre est destin  vous aider  installer et  faire tourner la
  base de donnes trs rapidement, en moins de 10 minutes.

  66..11..  IInnssttaallllaattiioonn eett tteessttss

  tapes rapides pour installer, tester, vrifier et faire tourner
  PostgreSQL Connectez-vous en tant qu'utilisateur _r_o_o_t.

  ______________________________________________________________________
  # rpm -qpl postgre*.rpm (pour consulter la liste des fichiers. Pour la documentation 'man rpm')
  # rpm -qpi postgre*.rpm (pour prendre connaissance des informations concernant le paquetage)
  # cat /etc/passwd | grep postgres
  ______________________________________________________________________


  Note: Si vous voyez un utilisateur 'postgres', vous pouvez avoir 
  faire une sauvegarde et un nettoyage du rpertoire  postgres et  sup
  primer l'utilisateur unix 'postgres', une autre solution consiste 
  renommer l'utilisateur unix 'postgres' en quelque chose du genre
  'postgres2'.  L'installation doit tre effectue dans un "rpertoire
  propre".

  ______________________________________________________________________
  # rpm -i postgre*.rpm (Doit installer tous les paquetages clients, devel, data
          et main pour que pgaccess puisse fonctionner )
  # chkconfig --add postgresql  (pour lancer pg durant le dmarrage, voir 'man
  chkconfig')
  # cp /usr/lib/pgsql/python/_pg.so /usr/lib/python1.5/lib-dynload (pour
  python)
  # /etc/rc.d/init.d/postgresql start  (pour lancer postgres)
  # su - postgres
  bash$ createdb mydatabase  (ceci va crer une base de donnes de nom  :
                   (pour lire la documentation 'man createdb')
  bash$ psql mydatabase   (pour lire la documentation 'man psql')
  ..... dans psql utilisez les flches haut/bas ou \s pour visualiser l'historique
  bash$ export DISPLAY=<hostname>:0.0; pgaccess mydatabase; (consulter 'man
  pgaccess')
  ______________________________________________________________________


  Ds maintenant, vous pouvez commencer  taper des commandes SQL pour
  pgaccess ou psql !!

  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql*
  ______________________________________________________________________

  Arriv l, lisez toutes les FAQ, les manuels du programmeur et de
  l'administrateur ainsi que les documents de prise en main (tutorials)
  existants.

  Pour obtenir des informations complmentaires concernant PostgreSQL,
  consultez  <http://www.postgresql.org>

  66..22..  MMaaxxiimmuumm RRPPMM

  Tlchargez le livre 'Maximum RPM'  l' <http://www.RPM.org>. le nom
  du fichier est maximum-rpm.ps.gz Lisez-le sous Linux en utilisant la
  commande gv -

  ______________________________________________________________________
  # gv maximum-rpm.ps.gz
  ______________________________________________________________________



  66..33..  TTeesstt ddee PPyyGGrreeSSQQLL -- IInntteerrffaaccee PPyytthhoonn


  ______________________________________________________________________
  bash$ cd /usr/lib/pgsql/python
  bash$ createdb thilo
  bash$ psql thilo
  thilo=> create table test (aa char(30), bb char(30) );
  bash$ /usr/bin/python
  >>> import _pg
  >>> db = _pg.connect('thilo', 'localhost')
  >>> db.query("INSERT INTO test VALUES ('ping', 'pong')")
  >>> db.query("SELECT * FROM test")
  eins|zwei
  ----+----
  ping|pong
  (1 row)
  >>>CTRL+D
  bash$
  ..... Wow! Cela a l'air de fonctionner - maintenant, installons-le proprement
  bash$ su - root
  # cp /usr/lib/pgsql/python/_pg.so /usr/lib/python1.5/lib-dynload
  ______________________________________________________________________



  66..44..  TTeesstt ddee PPeerrll -- IInntteerrffaaccee PPeerrll


  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql-6.5.2/examples/perl5
  ______________________________________________________________________


  Note: La variable globale @INC doit inclure le module Pg.pm dans le
  rpertoire site_perl donc utilisez l'option -I ci-dessous

  ______________________________________________________________________
  bash$ perl -I/usr/lib/perl5/site_perl/5.004/i386-linux-thread ./example.newstyle
  ______________________________________________________________________


  .... Re_Wow! Vous avez fait tourner un perl qui accde  la base de
  donnes PostgreSQL!!

  Prenez connaissance des fichiers d'exemples pour l'utilisation de
  l'interface perl.
  66..55..  TTeesstt ddeess iinntteerrffaacceess lliibbppqq,, lliibbppqq++++


  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql-6.5.2/examples/libpq++
  bash$ su root   --> to change ownership of examples
  # chown -R postgres /usr/doc/postgresql-6.5.2/examples
  # exit
  bash$ g++ testlibpq0.cc -I/usr/include/pgsql -I/usr/include/pgsql/libpq++
  -lpq++ -lpq -lcrypt
  bash$ ./a.out  (Note: Ignore Error messages if you get any - as below)
  > create table foo (aa int, bb char(4));
  No tuples returned...
  status = 1
  Error returned: fe_setauthsvc: invalid name: , ignoring...
  > insert into foo values ('4535', 'vasu');
  No tuples returned...
  status = 1
  Error returned: fe_setauthsvc: invalid name: , ignoring...
  > select * from foo;
  aa   |bb   |
  -----|-----|
  4535 |vasu |
  Query returned 1 row.
  >
  >CTRL+D
  bash$
  ______________________________________________________________________


  .... Hourra!! Vous venez de faire tourner les interfaces directes de
  C/C++  la base de donnes PostgreSQL!!

  66..66..  TTeesstt ddeess iinntteerrffaacceess JJaavvaa

  Pour pouvoir effectuer ceci vous DEVEZ installer le paquetage
  jdk-*glibc*.rpm (paquetage Java RPM)

  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql-6.5.2/examples/jdbc
  bash$ echo $CLASSPATH
   --> Devrait afficher  CLASSPATH=/usr/lib/jdk-1.1.6/lib/classes.zip
  bash$ export CLASSPATH=$CLASSPATH:.:/usr/lib/pgsql/postgresql.jar
  Editer tout le fichier psql.java et enlevez le symbole de commentaire de la ligne 'package'.
  bash$ javac psql.java
  bash$ java psql jdbc:postgresql:template1 postgres < password>[1] select * from pg_tables;
  tablename       tableowner      hasindexes      hasrules
  pg_type postgres        true    false   false
  pg_attribute    postgres        true    false   false
  [2]
  CTRL+C
  bash$
  ______________________________________________________________________


  .... Re_Hourra!! Vous venez de faire tourner les interfaces directes
  de Java  la base de donnes PostgreSQL!!

  66..77..  TTeesstt ddeess iinntteerrffaacceess eeccppgg







  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql-6.5.2/examples/ecpg
  bash$ ecpg test1.pgc -I/usr/include/pgsql
  bash$ cc test1.c -I/usr/include/pgsql -lecpg -lpq -lcrypt
  bash$ createdb mm
  bash$ ./a.out
  ______________________________________________________________________


  .... Wow!! vous venez de faire tourner le "C"-SQL / base de donnes
  PostgreSQL" intgr!!

  66..88..  TTeesstt ddeess eexxeemmpplleess SSQQLL -- TTyyppeess aanndd ffoonnccttiioonnss ddffiinniiss ppaarr ll''uuttiill
  iissaatteeuurr


  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql-6.5.2/examples/sql
  Under-development..
  ______________________________________________________________________



  66..99..  TTeesstt ddeess iinntteerrffaacceess TTccll//TTkk

  Il y a un exemple d'interfaces Tcl/Tk dans le programme pgaccess.
  Lire le fichier /usr/bin/pgaccess  l'aide d'un diteur de texte -

  ______________________________________________________________________
  bash$ view /usr/bin/pgaccess
  bash$ export DISPLAY=<hostname of your machine>:0.0
  bash$ createdb mydb
  bash$ pgaccess mydb
  ______________________________________________________________________



  66..1100..  TTeesstt ddeess iinntteerrffaacceess OODDBBCC

  1. Procurez-vous le pilote win32 pgsql odbc 
  <http://www.insightdist.com/psqlodbc/> 2. Voir galement
  /usr/lib/libpsqlodbc.a

  66..1111..  TTeesstt ddeess iinntteerrffaacceess ddee llaa ffeeuuiillllee ddee ttrraavvaaiill MMoottiiff MMPPSSQQLL

  Procurez-vous les RPMs auprs de  <http://www.mutinybaysoftware.com>

  66..1122..  VVrriiffiiccaattiioonn

  Pour vrifier le parfait fonctionnement de PostgreSQL, faites tourner
  le paquetage de test de Rgression :- Connectez-vous en tant que root
  -














  ______________________________________________________________________
  # rpm -i postgresql*.src.rpm
  # cd /usr/src/redhat/SPECS
  # more postgresql*.spec   (pour savoir quels sont les paquetage RPM que
  vous devez installer)
  # rpm -bp postgresql*.spec  (.. ce qui va prparer le paquetage)

  Le test de rgression a besoin des Makefiles et de quelques fichiers en-tte
  comme *fmgr*.h
  qui peuvent tre construits par -
  # rpm --short-circuit -bc postgresql*.spec ( .. utilisez "short circuit" pour
  forcer les choses!)
  Interrompre la construction en pressant les touches CTRL+C quand vous voyez
   'make -C common  SUBSYS.o'
   ce moment l, la configuratioin est russie, tous les "makefiles" et tous les fichiers en-tte (headers) ont t crs.
  Il n'y a rien de plus  faire.
  # cd /usr/src/redhat/BUILD
  # chown -R postgres postgresql*
  # su - postgres
  bash$ cd /usr/src/redhat/BUILD/postgresql-6.5.2/src/test/regress
  bash$ more README
  bash$ make clean; make all runtest
  bash$ more regress.out
  ______________________________________________________________________




  77..  PPoossttggrreeSSQQLL SSuuppppoorrttee ddeess BBaassee ddee DDoonnnneess eexxttrrmmeemmeenntt ggrraannddeess >> 220000
  GGiiggaass

  Les performances des machines  cpu 32-bit dcroissent rapidement
  quand la taille de la base de donnes dpasse 5 GigaBytes. Vous pouvez
  faire tourner des bases de donnes de 30 gigas avec un cpu 32-bit cpu
  mais cela ne sera pas trs performant. Les machines  CPU 32 bits
  imposent une limitation de 2 GB de mmoire RAM, de 2 GB pour le
  systme de fichier et d'autres limitations dues au systme
  d'exploitation.

  Si vous avez besoin d'utiliser des bases de donnes extrmement
  grandes, il est fortement recommand d'utiliser des machines 64-bit
  telles que : Digital Alpha cpu, Sun Ultra-sparc 64-bit cpu, Silicon
  graphics 64-bit cpu, Intel Merced IA-64 cpu, machines HPUX 64bit ,
  machines IBM 64-bit. Si l'on compile PostgreSQL avec un cpu 64-bit il
  pourra supporter d'normes bases de Donnes et de grosses requtes.
  Les performances de PostgreSQL pour des interrogations sur de grandes
  tables et de grandes bases de donnes sera plus rapide de plusieurs
  ordres de grandeurs que sur des machines  cpu 32-bit . L'avantage des
  machines 64-bit est qu'elles disposent d'un grand espace d'adressage
  mmoire et que le systme d'exploitation peut grer de trs grands
  systmes de fichiers. Cela permet des meilleures performances avec de
  grandes bases de donnes, plus de mmoire centrale (RAM), plus de
  possibilits etc...

  88..  PPoossttggrreeSSQQLL eesstt--iill ffiiaabbllee??

  Le paquetage de "Test de Rgression" permet de s'assurer de son bon
  fonctionnement.  Il est inclus (src/test/regress) dans la distribution
  et permet  l'ordinateur d'effectuer la vrification des oprations
  SQL standard ainsi que des capacits de PostgreSQL.  Le paquetage de
  test contient dj des centaines de programmes SQL de test.

  L'avantage de ce test effectu par l'ordinateur vient du fait que
  celui-ci peut effectuer plusieurs millions de test SQL trs
  rapidement. La vitesse de l'ordinateur est un milliard de fois plus
  rapide que celle de l'esprit humain!  Il est donc pertinent d'utiliser
  la puissance de calcul de l'ordinateur pour valider un logiciel plutt
  celle de l'esprit humain.

  Si c'est ncessaire, vous pouvez en ajouter beaucoup d'autres. Dans ce
  cas penser  envoyer ces tests au site PostgreSQL primaire si vous
  pensez que cela peut tre utile aux autres. Le paquetage de Test de
  Rgression permet d'asseoir la confiance des utilisateurs en
  PostgreSQL et facilite le dploiement rapide de PostgreSQL sur des
  systmes en production sans inquitude majeure.

  Le paquetage "Test de Rgression" peut tre considr comme un
  document technique ""TTRRSS SSOOLLIIDDEE"" reconnu mutuellement par les
  dveloppeurs et par les utilisateurs finaux.  Les dveloppeurs de
  PostgreSQL utilisent de faon intensive ce paquetage durant la priode
  de dveloppement et galement avant de mettre le logiciel  la
  disposition des utilisateurs pour en assurer la parfaite qualit.

  99..  OOuuttiill GGUUII ffrroonnttaall ppoouurr PPoossttggrreeSSQQLL ((IInntteerrffaaccee UUttiilliissaatteeuurr
  GGrraapphhiiqquuee))

  Le navigateur Web deviendra, dans le futur, l'interface utilisateur
  graphique le (GUI) le plus populaire.  La plus grande partie du code
  doit tre crite en utilisant le langage de scripts de serveurs Web
  PHP/Zend (et en le compilant) ``'' combin avec un peu de JavaScript
  du ct du client web.  Il est recommand de migrer vos applications
  existantes sous Windows 95/NT vers PHP/Zend.

  Les meilleurs outils sont  :

    PHP et Zend (script et compilateur) ``''

    X-Designer supporte C++, Java et MFC  <http://www.ist.co.uk/xd>

    Qt pour Windows95 et Unix   <http://www.troll.no> et
     <ftp://ftp.troll.no>

    Code Crusader se trouve sur le cdrom linux, logiciel libre bas sur
     Code Warrior de  MetroWorks
     <http://www.kaze.stetson.edu/cdevel/code_crusader/about.html>

    Code Warrior de MetroWorks  <http://www.metrowerks.com>

    GNU Prof C++ IDE de Cygnus  <http://www.cygnus.com>

    Borland C++ Builder pour Linux  <http://www.inprise.com>

    Borland Java JBuilder pour Linux  <http://www.inprise.com>

  Les langages, par ordre de prfrence sont  :

  1. Le langage de script serveur Web PHP avec Javascript pour le
     client.

  2. Le langage de script Perl en utilisant Perl-Qt ou Perl-Tk ``''

  3. Le langage C++ Omniprsent avec QtEZ, QT, Lesstiff ou Motif.

  4. Java mais les programmes obtenus sont trs lents.

  D'autres outils sont disponibles  : PostgreSQL possde une
  bibliothque d'interface Tcl/Tk dans la distribution nomme 'pgTcl'.
  Il existe un Environnement de Dveloppement Intgr (EDI ou IDE pour
  integrated development environment) pour Tcl/Tk nomm SpecTcl.



    L'outil Lesstiff Motif
     <ftp://ftp.redhat.com/pub/contrib/i386/lesstiff*.rpm>

    Vibe Java/C++ se trouve t
     <http://www.LinuxMall.com/products/00487.html>

    JccWarrior  <ftp://ftp.redhat.com/pub/contrib/i386/jcc*.rpm>

    Tcl/Tk  <http://www.scriptics.com>

    Une extension oriente objet de Tcl appele INCR se trouve 
     <http://www.tcltk.com>

    Le site Visual TCL  <http://www.neuron.com>

    Le rpm Visual TCL de Redhat 
     <ftp://ftp.redhat.com/pub/contrib/i386/visualtcl*.rpm>

    <http://sunscript.sun.com/>

    <http://sunscript.sun.com/TclTkCore/>

    <ftp://ftp.sunlabs.com/pub/tcl/tcl8.0a2.tar.Z>

    FreeBuilder  <ftp://ftp.redhat.com/pub/contrib/i386/free*.rpm>

    SpecTCL  <ftp://ftp.redhat.com/pub/contrib/i386/spec*.rpm>

    Kanchenjunga Java RAD Tool pour PostgreSQL
     <http://www.man.ac.uk/~whaley/kj/kanch.html>

    L'Applixware Tool  <http://www.redhat.com>

    XWPE X Windows Programming Environment
     <http://www.rpi.edu/~payned/xwpe/>
     <ftp://ftp.redhat.com/pub/contrib/i386/xwpe*.rpm>

    XWB X Windows Work Bench
     <ftp://ftp.redhat.com/pub/contrib/i386/xwb*.rpm>

    NEdit  <ftp://ftp.redhat.com/pub/contrib/i386/nedit*.rpm>

     Vous pouvez galement utiliser Borland C++ Builder, Delphi, Borland
     JBuilder, PowerBuilder sous Windows95 pour connecter PostgreSQL
     sous unix  travers des pilotes ODBC/JDBC.

  1100..  PPiillootteess dd''iinntteerrffaaccee ppoouurr PPoossttggrreeSSQQLL


  1100..11..  OODDBBCC PPiillootteess ppoouurr PPoossttggrreeSSQQLL

  ODBC signifie 'Open DataBase Connectivity'. C'est une norme rpandue
  pour accder aux informations des bases de donnes de diffrents
  vendeurs. Le fonctionnement des applications crites en utilisant les
  pilotes ODBC est garanti quelle que soient les bases de donnes
  utilises PostgreSQL, Oracle, Sybase, Informix etc..


    PostODBC <http://www.insightdist.com/psqlodbc> est dj inclus dans
     les distributions. Consultez le site web principal
     <http://www.postgresql.org>. Il est inclus dans ce CDROM
     PostgreSQL.

    <http://www.openlinksw.com> Open Link Software Corporation
     distribue des ODBC pour PostgreSQL et d'autres bases de donnes.
     Open Link dispose aussi d'ODBC gratuits (quantit limite) vrifier
     auprs d'eux.

    Insight ODBC pour PostgreSQL  <http://www.insightdist.com/psqlodbc>
     C'est le site officiel PostODBC.

  Il existe aussi un projet appel FreeODBC Pack Package . Il n'y a pas
  de version PostgreSQL, peut-tre pouvez vous y participer.

    <http://www.ids.net/~bjepson/freeODBC/> c'est une version gratuite
     d'ODBC.

  1100..22..  PPiillootteess UUDDBBCC ppoouurr PPoossttggrreeSSQQLL

  UDBC est une version statique de pilote de gestionnaire et de DLL
  d'ODBC indpendant, pour intgrer le support de la connectivit base
  de donnes directement au niveau des applications.

    <http://www.openlinksw.com> Open Link Software Corporation vends
     UDBC pour PostgreSQL et autres SGBD.  Open Link dispose aussi
     d'UDBC gratuits (quantit limite) vrifier auprs d'eux.

  1100..33..  PPiillootteess JJDDBBCC ppoouurr PPoossttggrreeSSQQLL

  JDBC signifie 'Java DataBase Connectivity'. Java est un langage de
  dveloppement indpendant de la plate-forme d'utilisation dvelopp
  par Sun Microsystems. Les programmeurs Java sont encourags  crire
  leurs applications en utilisant JDBC pour faciliter la portabilit
  entre diffrentes plates-formes telles que PostgreSQL, Oracle,
  informix, etc. Si vous crivez des applications Java applications vous
  pouvez obtenir les pilotes JDBC pour PostgreSQL  partir des sites
  suivants :

  Le pilote JDBC est inclus dans la distribution PostgreSQL.


    <http://www.demon.co.uk/finder/postgres/index.html> Sun's Java
     connectivity to PostgreSQL

    <ftp://ftp.ai.mit.edu/people/rst/rst-jdbc.tar.gz>

    <http://www.openlinksw.com> Open Link Software Corporation vends
     JDBC pour PostgreSQL et autres SGBD.  Open Link dispose aussi
     d'JDBC gratuits (quantit limite) vrifier auprs d'eux.

    Site JDBC UK  <http://www.retep.org.uk/postgres>

    Site JDBC FAQ  <http://eagle.eku.edu/tools/jdbc/faq.html>

  Le site JDBC, le guide et les FAQ sont situs  -

    JDBC HOME  <http://splash.javasoft.com/jdbc>

    JDBC guide
     <http://www.javasoft.com/products/jdk/1.1/docs/guide/jdbc>

    JDBC FAQ  <http://javanese.yoyoweb.com/JDBC/FAQ.txt>

  1100..44..  JJaavvaa ppoouurr PPoossttggrreeSSQQLL

  Ces classes pour PostgreSQL seront trs utiles au programmeur JAVA.

    <ftp://ftp.redhat.com/pub/contrib/i386> et regardez postgresql-
     jdbc-*.rpm

    <http://www.blackdown.org>

  1111..  PPiilloottee dd''iinntteerrffaaccee ddee SSGGBBDD PPeerrll ((DDaattaabbaassee IInntteerrffaaccee  DDBBII)) ppoouurr
  PPoossttggrreeSSQQLL


  1111..11..  iinntteerrffaaccee PPeerrll 55 ppoouurr PPoossttggrreeSSQQLL

  PERL est l'acronyme de 'Practical Extraction and Report Language'.
  Perl est disponible pour tous les systmes d'exploitation et toutes
  les plates-formes matrielles au monde. Vous pouvez utiliser Perl sous
  Windows95/NT, Apple Macintosh iMac, toutes les varits d'Unix
  (Solaris, HPUX, AIX, Linux, Irix, SCO etc..), ordinateur central MVS,
  ordinateur de bureau OS/2, OS/400, Amdahl UTS et beaucoup d'autres.
  Perl tourne MMMMEE sur de nombreux matriels et systmes d'exploitations
  peu courants/gnralement inconnus!!  Aussi, ne soyez pas surpris si
  vous voyez perl tourner sur un systme d'exploitation trs rarement
  utilis.

  Cette interface est incluse dans la distribution de PostgreSQL. On la
  trouve dans le rpertoire src/pgsql_perl5.

    Contact pour Pgsql_perl5 par email : E.Mergl@bawue.de

    On la trouve aussi dans -
     <ftp://ftp.kciLink.com/pub/PostgresPerl-1.3.tar.gz>

    Page d'accueil Perl :  <http://www.perl.com/perl/index.html>

    Tutoriel Perl, pour un titre de tutoriel, consultez :
     <http://reference.perl.com/>

    La FAQ Perl est  :
     http://www.yahoo.com/Computers\_and\_Internet/Programming\_Languages/Perl/

    Perl GUI Interfaces Utilisateurs Perl-Qt rpm :
     <ftp://ftp.redhat.com/pub/contrib/i386> et cherchez
     PerlQt-1.06-1.i386.rpm

    Perl GUI Interfaces Utilisateurs Perl-Qt :
     <http://www.accessone.com/~jql/perlqt.html>

    Perl GUI Interfaces Utilisateurs Perl-XForms :
     <ftp://ftp.redhat.com/pub/contrib/i386> et cherchez
     Xforms4Perl-0.8.4-1.i386.rpm

    Perl GUI Interfaces Utilisateurs Perl-Tk :
     <ftp://ftp.redhat.com/pub/contrib/i386>

    Perl GUI kits :  <http://reference.perl.com/query.cgi?ui>

    Interfaces de Base de Donnes Perl :
     <http://reference.perl.com/query.cgi?database>

    Traducteur de Perl en "C" :  <http://www.perl.com/CPAN-
     local/modules/by-module/B/> et cherchez Compiler-a3.tar.gz

    Traducteur de Bourne shell en Perl :
     <http://www.perl.com/CPAN/authors/id/MERLYN/sh2perl-0.02.tar.gz>

    awk en perl "a2p" et sed en perl "s2p" sont inclus dans la
     distribution PERl.

    Consultez galement le forum PERL  comp.lang.perl.*




  1111..22..  DDBBII IInntteerrffaaccee ddee BBaassee ddee DDoonnnneess PPeerrll

  1111..22..11..  QQuu''eesstt--ccee qquuee DDBBII ??

  L'interface de SGBD Perl (Perl Database Interface - DBI) est une
  interface logicielle d'accs  un SGBD (Application Programming
  Interface - API) pour le langage PERL. Les spcifications de l'API DBI
  perl dfinissent un ensemble de fonctions, de variables et de
  conventions d'accs  un SGBD cohrent et indpendant du SGBD utilis.
  Les informations concernant cette section DBI ont t prises dans la
  "DBI FAQ" dont l'auteur est Alligator Descartes et sont reproduites
  ici avec sa permission.

    Alligator Descartes Hermetica peut tre contact 
     descarte@hermetica.com

  1111..22..22..  PPiilloottee DDBBII ppoouurr PPoossttggrreeSSQQLL DDBBDD--PPgg--00..8899

  Vous pouvez obtenir DBD-Pg-0.89.tar.gz de l'un des sites indiqus ci-
  dessous :

    DBD-Pg-0.89 :  <http://www.perl.com/CPAN/modules/by-module/DBD/>

    Comprehensive Perl Archive Network CPAN  <http://www.perl.com/CPAN>

    Liste des pilotes DBI et pages sur les modules DBI
     <http://www.hermetica.com/technologia/perl/DBI>

    L'information sur DBI se trouve   <http://www.fugue.com/dbi/>

    Site ftp primaire  <ftp://ftp.demon.co.uk/pub/perl/db>

    Liens divers sur DBI  <http://www-ccs.cs.umass.edu/db.html>

    Liens divers sur DBI
     <http://www.odmg.org/odmg93/updates_dbarry.html>

    Liens divers sur DBI  <http://www.jcc.com/sql_stnd.html>

    Base de Donnes PostgreSQL  <http://www.postgresql.org>

  CONTRAINTES :

    - Construire, tester et installer Perl 5         (au moins 5.002)

    - Construire, tester et installer le module DBI  (au moins 0.89)

    - Construire, tester et installer PostgreSQL     (au moins 6.2)

  1111..22..33..  SSuuppppoorrtt tteecchhnniiqquuee ssuurr DDBBII

  Veuillez envoyer vos commentaires et vos comptes-rendus d'erreurs 

    E.Mergl@bawue.de

  Pensez  inclure la sortie de perl -v, et perl -V, la version de
  PostgreSQL, la version de DBD-Pg, et la version de DBI dans votre
  compte-rendu d'erreur.


  1111..22..44..  QQuu''eesstt--ccee qquuee cc''eesstt qquuee DDBBII,, DDBBppeerrll,, OOrraappeerrll aanndd **ppeerrll??

  Pour citer Tim Bunce, l'architecte et l'auteur de DBI :

  ``DBI est une interface logicielle d'accs aux bases de donnes
  (Application Programming Interface  -API) pour le langage Perl. Les
  spcifications DBI API dfinissent un ensemble de fonctions, de
  variables et de conventions cohrents d'interfaage  une base de
  donnes indpendant de la base de donnes utilise.''

  En langage simple, l'interface DBI permet aux utilisateurs d'accder
  de manire transparente  de multiples base de donnes. Ainsi, Si vous
  vous connectez  une base de donnes Oracle, Informix, mSQL, Sybase ou
  n'importe quelle autre, vous n'avez pas besoin de connatre les
  mcanismes sous-jacents de la couche 3GL. L'API dfinie par DBI
  fonctionnera sur tous ces types de bases de donnes.

  On obtient un bnfice du mme ordre en ayant la possibilit de se
  connecter  deux bases de donnes de diffrents fournisseurs  l'aide
  du mme script perl, i.e., je veux lire des donnes d'une base de
  donnes Oracle et les insrer dans une Informix  partir du mme
  programme. La couche logicielle DBI permet de le raliser simplement
  et efficacement.

  DBperl est le nom ancien des spcifications de l'interface. Il est
  utilis maintenant pour dsigner les modules perl4 d'interfaage des
  bases de donnes tels que oraperl, isqlperl, ingperl et autres. Ces
  interfaces n'ont pas d'API standard et ne sont gnralement pas
  supports.

  Voici une liste des modules DBperl, de leur quivalent DBI
  correspondants et du support d'information. Notez que les auteurs
  cits ici ne maintiennent gnralement pas le module DBI de la base de
  donnes. Les adresses E-mail n'ont pas t vrifies et ne doivent
  tre utilises que pour les questions concernant les modules perl4
  lists ci-dessous. Les questions sur les pilotes DBI doivent tre
  directement adresses aux listes de diffusion des utilisateurs DBI.


         Nom du module SGBD requis         Auteur          DBI
           ----------- -----------------   ------          ---
           Sybperl     Sybase              Michael Peppler DBD::Sybase
                                           <mpeppler@itf.ch>
           Oraperl     Oracle 6 & 7        Kevin Stock     DBD::Oracle
                                           <dbi-users@fugue.com>
           Ingperl     Ingres              Tim Bunce &     DBD::Ingres
                                           Ted Lemon
                                           <dbi-users@fugue.com>
           Interperl   Interbase           Buzz Moschetti  DBD::Interbase
                                           <buzz@bear.com>
           Uniperl     Unify 5.0           Rick Wargo      None
                                           <rickers@coe.drexel.edu>
           Pgperl      Postgres            Igor Metz       DBD::Pg
                                           <metz@iam.unibe.ch>
           Btreeperl   NDBM                John Conover    SDBM?
                                           <john@johncon.com>
           Ctreeperl   C-Tree              John Conover    None
                                           <john@johncon.com>
           Cisamperl   Informix C-ISAM     Mathias Koerber None
                                           <mathias@unicorn.swi.com.sg>
           Duaperl     X.500 Directory     Eric Douglas    None
                       User Agent




  Cependant, certains modules DBI possdent des couches logicielles
  d'mulation. Ainsi DBD::Oracle est livr avec une couche d'mulation
  Oraperl, ce qui permet d'excuter d'anciens scripts oraperl sans modi
  fication. La couche logicielle d'mulation traduit les appels oraperl
  API en appels DBI et les excute.

  Voici une table des  couches d'mulation :


           Module        Couche d'mulation     tat
           ------          ---------------     ------
           DBD::Oracle     Oraperl             Complte
           DBD::Informix   Isqlperl            En cours de  dveloppement
           DBD::Sybase     Sybperl             Fonctionnelle? ( Ncessite une
                                               vrification)
           DBD::mSQL       Msqlperl            En version exprimentale avec
                                               DBD::mSQL-0.61




  L'mulation Msqlperl est un cas particulier. Msqlperl est un pilote
  perl5 pour les bases de donnes mSQL , mais il ne se conforme pas aux
  spcifications DBI. On dsapprouve son utilisation en faveur de
  DBD::mSQL. On peut tl-charger Msqlperl  partir du site CPAN via :

    <http://www.perl.com/cgi-bin/cpan_mod?module=Msqlperl>

  1111..22..55..  SSppcciiffiiccaattiioonnss DDBBII


  Il existe quelques sources d'information sur  DBI.  Spcifications DBI

    <http://www.hermetica.com/technologia/perl/DBI/doc/dbispec>

     On trouve deux spcifications disponibles  cette adresse: la
     nouvelle spcification Draft (dition provisoire) DBI qui est un
     document en volution rapide  mesure que l'quipe de dveloppement
     s'approche d'une version stable de l'interface, et l'ancienne
     spcification historique DBperl  partir de laquelle l'interface
     DBI actuelle a volu.

  Il faut considrer ce dernier document comme ne prsentant qu'un
  intrt historique et ne pas l'utiliser en tant que manuel de
  programmation ou document de rfrence. Il demeure cependant une
  source d'informations trs utile.

  Documentation POD (Plain Old Documentation) Les PODs sont des morceaux
  de documentation gnralement noys  l'intrieur des programmes perl
  qui documentent le code "sur place".  Ce sont des ressources trs
  utiles pour les programmeurs et les utilisateurs des modules. Les PODs
  pour DBI et pour les pilotes deviennent monnaie courante et la
  documentation pour les modules contenant ces PODs peut tre lue avec
  les commandes suivantes.

  La Spcification DBI Les PODs pour la spcification DBI peut tre lue
  avec la commande :

  perldoc DBI

  Oraperl Les utilisateurs de la couche d'mulation fournie avec
  DBD::Oracle, peuvent s'informer sur la manire de programmer en
  utilisant l'interface Oraperl en tapant:

  perldoc Oraperl

  Ce qui permettra d'obtenir une copie  jour de la page de manuel
  originale crite par Kevin Stock pour perl4. L'API oraperl y est
  entirement liste et dcrite.

  DBD::mSQL Les utilisateurs du module DBD::mSQL peuvent lire des
  informations sur quelques fonctions prives et bizarreries de ce
  pilote en tapant :

  perldoc DBD::mSQL

  Foire Aux Questions (FAQ) Ce document, la Foire Aux Questions, est
  aussi disponible en tant que documentation POD! Vous pouvez le lire
  sur votre propre systme en tapant :

  perldoc DBI::FAQ

  Ceci peut tre plus pratique pour ceux qui ne sont pas connects 
  l'Internet ou le sont d'une manire peu pratique.

  Les POD en gnral On peut lire des informations sur la manire
  d'crire des PODs, ainsi que sur la philosophie des PODs en gnral en
  tapant :

  perldoc perlpod

  Les utilisateurs ayant le module Tk install seront peut-tre
  intresss d'apprendre qu'il existe un lecteur de POD bas sur Tk
  nomm tkpod. Il formate les POD de manire pratique et lisible.

  Discussions, Cancans et Observations

    <http://www.hermetica.com/technologia/perl/DBI/tidbits>

  Il y a , de temps en temps, une srie de discussions de la part de
  certaines personnes, dans les listes de diffusion sur DBI.

  ``DBI -- L'interface de SGBD en perl5'' C'est un article crit par
  Alligator Descartes et Tim Bunce sur la structure de DBI. Il a t
  publi dans le numro 5 de ``The Perl Journal''.  Il est extrmement
  bon. Allez acheter ce magazine. En fait, achetez les tous.  Le site
  WWW de ``The Perl Journal'' est :

    <http://www.tpj.com>

  ``DBperl'' Cet article, publi dans l'dition de novembre 1996 du
  ``Dr. Dobbs Journal'' traitait de DBperl.

  ``The Perl5 Database Interface'' Cette rfrence est celle d'un livre
   crire par Alligator Descartes publi par O'Reilly et Associs.

  Listes de diffusion Il y a trois listes de diffusion pour DBI gres
  par Ted Lemon.  On peut s'inscrire  toutes et rsilier cette
  inscription  travers le World Wide Web  :

    Listes de diffusion  <http://www.fugue.com/dbi>

  Les listes o les utilisateurs peuvent participer sont:

  ddbbii--aannnnoouunnccee Cette liste de diffusion est rserve uniquement aux
  annonces.  Si vous n'arrivez pas  utiliser le formulaire sur la page
  WWW indique ci-dessus, inscrivez-vous  cette liste de la manire
  suivante :

    Email: dbi-announce-request@fugue.com

     avec le mot 'subscribe' dans le corps du message.

  ddbbii--ddeevv Cette liste de diffusion est  l'usage des dveloppeurs pour
  discuter des ides et des concepts de l'interface DBI, API et des
  mcanismes des pilotes. Seulement utiles pour les dveloppeurs et les
  personnes intresses. Trafic faible.  Si vous n'arrivez pas 
  utiliser le formulaire sur la page WWW indique ci-dessus, inscrivez-
  vous  cette liste de la manire suivante :

    Email: dbi-dev-request@fugue.com

     avec 'subscribe' dans le corps du message.

  ddbbii--uusseerrss Cette liste de diffusion est un lieu de discussion gnrale
  utilise pour les rapports d'erreurs, la discussion sur diffrents
  problmes et des demandes de renseignement d'intrt gnral. Si vous
  n'arrivez pas  utiliser le formulaire sur la page WWW indique ci-
  dessus, inscrivez-vous  cette liste de la manire suivante :

    Email: dbi-users-request@fugue.com

     avec 'subscribe' dans le corps du message.

  Archives des Listes de Diffusion

    Archive des listes de diffusion US
     <http://outside.organic.com/mail-archives/dbi-users/>

    Archive des listes de diffusion Europennes  <http://www.rosat.mpe-
     garching.mpg.de/mailing-lists/PerlDB-Interest>

  1111..22..66..  PPrroobbllmmeess ddee ccoommppiillaattiioonn oouu ""IIll cchhoouuee aauuxx tteessttss""

  Si vous avez un vidage mmoire, essayez le module Devel::CoreStack
  pour gnrer une trace de la pile du vidage mmoire. On peut trouver
  Devel::CoreStack  :

    <http://www.perl.com/cgi-bin/cpan_mod?module=Devel::CoreStack>

  Envoyez un courrier lectronique sur la Liste dbi-users contenant la
  trace de la pile, les versions des modules, la version de perl, les
  situations de test, la version du systme d'exploitation et toutes
  autres informations pertinentes.  Plus vous fournirez d'informations
  plus vite les dveloppeurs pourront rsoudre les problmes. Si vous ne
  nous envoyez rien, n'attendez rien en retour.

  1111..22..77..  DDBBII eesstt--iill ssuuppppoorrtt ssuurr lleess ppllaatteess--ffoorrmmeess WWiinnddoowwss 9955 // NNTT ??

  Les portages de DBI et de DBD::Oracle pour Win32 ports font maintenant
  partie intgrante de DBI, donc, la rcupration d'une version de DBI
  suprieure  0.81 doit donner satisfaction.  Vous pouvez accder aux
  bases de donnes Microsoft Access et SQL-Server  partir de DBI via
  ODBC.  Une "couche d'mulation" DBI exprimentale est fournie avec
  DBI-0.79 (et suivants ) pour le module Win32::ODBC. Son nom est
  DBI::W32ODBC.  Vous aurez besoin du module Win32::ODBC.

    Win32 DBI    <http://www.hermetica.com/technologia/perl/DBI/win32>

    Win32 ODBC    <http://www.roth.net>

  1111..22..88..  QQuu''eesstt--ccee qquuee DDBBMM?? EEtt ppoouurrqquuooii ddooiiss--jjee uuttiilliisseerr DDBBII  ssaa
  ppllaaccee??

  A l'origine UNIX tait bienheureux avec sa "Base de Donnes" rustique
  reposant sur des fichiers, nomme systme dbm. Avec dbm vous
  enregistrez les donnes dans des fichiers et les retrouvez rapidement.
  Cependant, il souffre de srieux inconvnients.

  Verrouillage des fichiers

  Les systmes dbm ne permettent par un verrouillage particulirement
  robuste des fichiers, de mme qu'il n'y a pas de possibilit de
  corriger les problmes survenants lors d'critures [ dans la base de
  donnes ] simultanes.

  Structures de Donnes Arbitraires

  Les systmes dbm permettent seulement une simple structure de donnes
  fixe: paires cl-valeur. Cette valeur peut tre un objet complexe, tel
  qu'une structure [ C ], mais la cl doit tre unique. Ce fut une
  grande limitation dans l'utilit des systmes dbm.

  Cependant, les systmes dbm continuent d'offrir des fonctions utiles
  pour les utilisateurs ayant des ensembles de donnes simples et des
  ressources limites, puisqu'ils sont rapides, robustes et extrmement
  bien tests. Les modules Perl pour accder aux systmes dbm font
  maintenant partie intgrante de la distribution Perl via le module
  AnyDBM_File.''

  Pour rsumer, DBM est une solution parfaitement satisfaisante pour les
  bases de donnes essentiellement en lecture seule, ou pour des
  ensembles de donnes simples et rduits. Toutefois, pour des ensembles
  de donnes plus importants, sans mentionner un verrouillage des
  transactions robuste, on recommandera aux utilisateurs de prfrer
  DBI.

  1111..22..99..  EEsstt--ccee qquuee << iinnssrreezz uunnee ffoonnccttiioonnnnaalliitt iiccii >> eesstt ssuuppppoorrtt
  ppaarr DDBBII??

  Si l'on suppose que la fonctionnalit en question n'est pas, en
  standard, spcifique d'un SGBD, alors la rponse sera non.

  DBI reprsente un API qui doit fonctionner avec la plupart des SGBD,
  et n'a pas de fonctionnalit spcifique  un SGDB particulier.

  Cependant, les auteurs d'un pilote peuvent, s'ils le dsirent, ajouter
  une fonctionnalit spcifique  un SGBD  travers les mthodes func
  dfinies dans l'API DBI. Les dveloppeurs de Scripts doivent noter que
  l'utilisation de cette fonctionnalit au travers de ces mthodes func
  a de bonnes chances d'en sacrifier la portabilit entre les diffrents
  SGBD.

  1111..22..1100..  EEsstt--ccee qquuee DDBBII eesstt dd''uunnee qquueellccoonnqquuee uuttiilliitt ppoouurr llaa pprrooggrraamm
  mmaattiioonn CCGGII??

  En un mot, oui! DBI est extrmement utile pour la programmation CGI!
  En fait, la programmation CGI est une des deux principales utilisation
  de DBI.

  DBI confre aux programmeurs CGI la possibilit d'offrir des base de
  donnes WWW  leurs utilisateurs, ce qui donne  ces utilisateurs la
  possibilit d'utiliser de grandes quantits de donnes bien
  organises. DBI donne aussi la possibilit , si un site reoit un
  trafic trop important pour les performances du serveur, d'amliorer ce
  serveur de base de donnes de faon transparente, sans modifier les
  scripts CGI.

  1111..22..1111..  CCoommmmeenntt ppuuiiss--jjee oobbtteenniirr uunn tteemmppss ddee ccoonnnneexxiioonn pplluuss rraappiiddee
  aavveecc DDBBDD::::OOrraaccllee eett CCGGII CCGGII??

  Le serveur httpd Apache maintient un ensemble de processus fils httpd
  pour servir les requtes clients.

  En utilisant le module mod_perl Apache de Doug MacEachern,
  l'interprteur perl est inclus dans le processus fils httpd. Les
  modules CGI, DBI, et vos autres modules favoris peuvent tre chargs
  au lancement de chaque processus fils. Ces modules ne seront pas
  rechargs  moins d'tre modifis sur disque.

  Pour de plus amples informations sur Apache, consultez le site WWW du
  Projet Apache  :

    Site WWW du Projet Apache  <http://www.apache.org>

    Module Mod_perl  <http://www.perl.com/cgi-
     bin/cpan_mod?module=mod_perl>

  1111..22..1122..  CCoommmmeenntt ppuuiiss--jjee oobbtteenniirr uunnee ccoonnnneexxiioonn ppeerrssiissttaannttee aavveecc DDBBII
  eett CCGGII??

  En utilisant le module Apache::DBI de Edmund Mergl, les connexions 
  la base de donnes sont enregistres dans une table avec chacun des
  processus httpd fils. Si votre application utilise une base de donnes
  simple utilisateur, cette connexion peut tre lance avec chaque
  processus fils. Actuellement, les connexions  la base de donnes ne
  peuvent pas tre partages entre processus httpd fils.  Apache::DBI
  peut tre tl-charg de CPAN via :

    <http://www.perl.com/cgi-bin/cpan_mod?module=Apache::DBI>

  1111..22..1133..  ""QQuuaanndd jjee llaannccee uunn ssccrriipptt ppeerrll ddee llaa lliiggnnee ddee ccoommmmaannddee,, aa
  mmaarrcchhee,, mmaaiiss,, qquuaanndd jjee llee llaannccee ssoouuss hhttttppdd,, aa cchhoouuee!!"" PPoouurrqquuooii??


  Fondamentalement, il y a une bonne chance que cela provienne du fait
  que l'utilisateur  partir duquel vous avez lanc la ligne de commande
  a un ensemble de variables d'environnement correctement configur, ce
  sont, dans le cas de DBD::Oracle, des variables telles que
  $ORACLE_HOME, $ORACLE_SID ou TWO_TASK.  Le processus httpd s'excute
  habituellement sous un utilisateur id ne correspondant pas  un
  utilisateur, ce qui implique qu'il n'y a pas d'environnement
  configur. Tous scripts essayant de s'excuter dans ces circonstances
  choueront.  Pour rsoudre ce problme, initialisez l'environnement de
  votre base de donnes dans un bloc BEGIN ( ) en tte de votre script.
  Ceci devrait rsoudre votre problme.  De mme, vous devriez regarder
  votre fichier registre d'erreurs pour y trouver des indices, ainsi que
  les guides "Idiot's Guide To Solving Perl / CGI Problems" et "Perl
  CGIProgramming FAQ" pour avoir des informations complmentaires. Il
  est peu probable que ce problme concerne DBI.  Lisez ces DEUX
  documents trs soigneusement !

    Idiot's Guide to Solving Perl / CGI problems
     <http://www.perl.com/perl/faq/index.html>

  1111..22..1144..  PPuuiiss--jjee ffaaiirree ddee ll''eexxccuuttiioonn eenn ppaarraallllllee aavveecc DDBBII??

  A la date de ce document, non. perl ne permet pas l'excution en
  parallle. Cependant, l'excution en parallle doit faire partie de la
  distribution perl de base  compter de la version 5.005, ce qui sous-
  entend que le support de l'excution en parallle pour DBI devrait
  suivre rapidement.  Pour quelques exemples de code OCI pour Oracle
  ayant des instructions SELECT avec excution en parallle, voir :

    <http://www.hermetica.com/technologia/oracle/oci/orathreads.tar.gz>


  1111..22..1155..  CCoommmmeenntt ppuuiiss--jjee iinnvvooqquueerr ddeess pprrooccdduurreess eennrreeggiissttrreess aavveecc
  DDBBII??

  En supposant que vous avez cr une procdure enregistre 
  l'intrieur de la base de donnes cible, e.g., une base de donnes
  Oracle, vous pouvez utiliser $ dbh-> do pour excuter immdiatement
  cette procdure. Par exemple,


  $ dbh-> do( "BEGIN someProcedure END" );

  1111..22..1166..  CCoommmmeenntt ppuuiiss--jjee rrccuupprreerr lleess vvaalleeuurrss ddee rreettoouurr ddee
  pprrooccdduurreess eennrreeggiissttrreess aavveecc DDBBII??

  N'oubliez pas d'effectuer un test d'erreur, strict!


           $sth = $dbh->prepare( "BEGIN foo(:1, :2, :3); END;" );
           $sth->bind_param(1, $a);
           $sth->bind_param_inout(2, \$path, 2000);
           $sth->bind_param_inout(3, \$success, 2000);
           $sth->execute;




  1111..22..1177..  CCoommmmeenntt ppuuiiss--jjee ccrreerr oouu ssuupppprriimmeerr uunnee bbaassee ddee ddoonnnneess aavveecc
  DDBBII??

  La cration et la suppression de bases de donnes sont des concepts
  qui sont beaucoup trop abstraits pour tre supports par DBI. Par
  exemple, Oracle ne supporte pas le concept de dtruire une base de
  donnes du tout ! Ainsi, dans Oracle, le serveur de base de donnes
  est essentiellement la base de donnes elle-mme alors que dans mSQL,
  le processus serveur s'excute tranquillement sans aucune base de
  donnes cre. C'est un problme trop htrogne pour s'y attaquer.
  Quelques pilotes, cependant, supportent la cration et la suppression
  de bases de donnes  travers des mthodes func prives. Il vous faut
  regarder dans la documentation des pilotes que vous utilisez pour
  vrifier s'ils supportent de tels mcanismes.

  1111..22..1188..  CCoommmmeenntt lleess vvaalleeuurrss NNUULLLL ssoonntt--eelllleess pprriisseess eenn ccoommppttee ppaarr
  DDBBII??

  Les valeurs NULL dans DBI sont traites comme la valeur undef. Des
  NULLs peuvent tre insrs dans les bases de donnes en tant que NULL,
  par exemple :


           $rv =
               $dbh->do( "INSERT INTO table VALUES( NULL )" );




  mais lors d'une interrogation, les NULLs devront tre tests comme des
  undef.  C'est une norme pour tous les pilotes.

  1111..22..1199..  QQuu''eesstt--ccee qquuee cc''eesstt qquuee cceess hhiissttooiirreess ddee mmtthhooddeess ffuunncc??

  Une mthode func est dfinie  l'intrieur de DBI comme tant un point
  d'entre pour une fonctionnalit d'une base de donnes spcifique, eg,
  la possibilit de crer ou supprimer des bases de donnes.
  L'invocation de ces mthodes spcifiques aux pilotes est simple. Par
  exemple, pour invoquer une mthode createDatabase qui n'a qu'un seul
  argument, on crira :


           $rv = $dbh->func( 'argument', 'createDatabase' );




  Les dveloppeurs de logiciels doivent cependant noter que ces mthodes
  func ne sont pas portables entre SGBD.
  1111..22..2200..  AAssssiissttaannccee eett ffoorrmmaattiioonn ppaayyaannttee

  L'interface aux SGBD Perl5 est un logiciel LIBRE. IL EST DISTRIBUE
  SANS GARANTIE D'AUCUNE SORTE.  Cependant, quelques organisations
  fournissent soit une assistance technique soit des programmes de
  formation pour DBI.

  PPEERRLL CCLLIINNIICC :: La socit "Perl Clinic" peut offrir des contrats
  d'assistance payants pour Perl, DBI, DBD::Oracle et Oraperl. Cette
  assistance est fournie par la compagnie o travaille Tim Bunce, auteur
  de DBI. Pour de plus amples informations concernant leurs services,
  consultez :

    <http://www.perl.co.uk/tpc>

  1122..  OOuuttiillss ddee GGeessttiioonn PPoossttggrreeSSQQLL


  1122..11..  PPGGAACCCCEESSSS -- UUnn GGUUII ppoouurr llaa ggeessttiioonn ddee PPoossttggrreeSSQQLL

  PgAccess est une interface Tcl/Tk  PostgreSQL.  Il est dj inclus
  dans la distribution de PostgreSQL.  Pour une copie plus rcente, vous
  pouvez accder au site web :

    <http://www.flex.ro/pgaccess>

    Si vous avez des commentaires, des suggestions pour des
     amliorations, n'hsitez pas  envoyer un courrier lectronique  :
     teo@flex.ro

  Fonctionnalits de PgAccess

  Fentres de PgAccess : Fentre principale, crateur de tables, vue de
  table (interrogation), crateur visuel d'interrogation .

  Tables


    - Ouverture de tables pour la visualisation, 200 enregistrements
     maximum ( modifiable dans le menu des prfrences )

    - re-dimensionnement d'une colonne en tirant la ligne verticale de
     la grille ( plus pratique  raliser  l'intrieur mme de la table
     que dans l'en-tte)

    - texte encadr dans les cellules - disposition enregistre pour
     chacune des tables)

    - importation/exportation vers des fichiers externes (SDF,CSV)

    - possibilit de filtres (filtre de saisie, tel que (prix>3.14)

    - possibilits de tri (saisie manuelle de(s) champ(s)  trier)

    - dition en ligne

    - assistant gnrateur de table amlior

    - dition de champ amliore

  Requtes

    - dfinition, dition et enregistrement de "requtes dfinies par
     l'utilisateur"


    - enregistrement de requtes en tant que vues

    - excution des requtes

    - visualisation des rsultats de requtes de type select

    - suppression et changement de nom de requte

    - crateur visuel de requtes avec possibilits de
     "glisser/dposer".  Pour tous ceux d'entre vous qui ont l'extension
     pour Netscape Navigator de Tcl/Tk installe, vous pouvez le voir au
     travail en cliquant ici

  Squences

    - dfinition de squences, ainsi que leurs suppression et
     inspection Fonctions

    - dfinition, inspection et suppression de fonctions en langage SQL

  Les futures implmentations disposeront

    - de la conception des tables (ajout de nouveaux champs, changement
     de nom, etc.)

    - de la dfinition de fonction

    - d'un gnrateur de rapport

    - d'un langage de script de base


  Si vous avez des commentaires, ou des suggestions d'amlioration,
  envoyez un courrier lectronique  :

    teo@flex.ro

  Informations concernant libgtcl

  Vous aurez galement besoin de la bibliothque d'interface de
  PostgreSQL  Tcl, disponible comme module Tcl/Tk chargeable. Son nom
  est libpgtcl et le source est situ dans le rpertoire PostgreSQL
  /src/interfaces/libpgtcl.  Prcisment, vous aurez besoin d'une
  bibliothque libpgtcl qui soit "chargeable"  partir de Tcl/Tk.  Ce
  qui est techniquement diffrent d'un fichier objet chargeable
  PostgreSQL ordinaire, car libpgtcl est constitue d'un ensemble de
  fichiers objets. Sous Linux, on l'appelle libpgtcl.so. Vous pouvez
  tl-charger  partir d'ici une version dj compile pour les
  systmes Linux i386. La seule chose  faire est de copier libpgtcl.so
  dans le rpertoire bibliothque systme (/usr/lib) et c'est tout. Une
  solution possible est de supprimer dans le source la ligne contenant
  load libpgtcl.so et de charger pgaccess.tcl non pas avec wish, mais
  avec pgwish (ou wishpg) le wish qui a t li avec la bibliothque
  libpgtcl.

  1122..22..  OOuuttiill WWiinnddoowwss iinntteerraaccttiiff ddee ggnnrraattiioonn ddee rreeqquuttee ppoouurr PPoosstt
  ggrreeSSQQLL

  ("Windows Interactive Query Tool" WISQL ou MPSQL) MPSQL offre une
  interface SQL graphique  PostgresSQL.  MPSQL est identique  la
  feuille de programmation SQL d'Oracle et au serveur de requte SQL de
  Microsoft WISQL! Il dispose d'un GUI agrable et d'un historique des
  commandes. Vous pouvez utiliser le coup/coll ainsi que d'autres
  fonctionnalits sympathiques pour accrotre votre productivit.


    <http://www.troubador.com/~keidav/index.html>

    Email : keidav@whidbey.com

    <http://www.ucolick.org/~de/> dans le fichier tcl_syb/wisql.html

    <http://www.troubador.com/~keidav/index.html>

    Email : de@ucolick.org

  1122..33..  OOuuttiill iinntteerraaccttiiff ddee ggnnrraattiioonn ddee rreeqquuttee ppoouurr PPoossttggrreeSSQQLL --
  IISSQQLL

  ISQL est destin aux terminaux fonctionnants en mode ligne de
  commande.  C'est inclus dans la distribution et nomm PSQL. Il est
  trs similaire   Sybase ISQL, et  Oracle SQLplus. A l'invite unix
  tapez la commande 'psql' qui en retour vous affichera le caractre
  d'attente de commande: psql> .


       Tapez /h pour obtenir de l'aide sur les commandes utilisables.




  C'est trs convivial et d'utilisation facile.  C'est aussi trs utile
  pour crire des scripts pour les interprteurs de commandes.

  1122..44..  MMPPMMGGRR -- UUnn oouuttiill ddee ggeessttiioonn ddee BBaassee ddee DDoonnnneess ppoouurr PPoossttggrreessSSQQLL

  MPMGR fournira un outil graphique de gestion de Base de Donnes pour
  PostgresSQL. Vous pouvez le trouver 

    <http://www.mutinybaysoftware.com/>

    Email: keidav@mutinybaysoftware.com

    <http://www.troubador.com/~keidav/index.html>

    Email: keidav@whidbey.com

    <http://www.troubador.com/~keidav/index.html>

    <http://www.ucolick.org/~de> dans le fichier tcl_syb/wisql.html

    WISQL for PostgreSQL  <http://www.ucolick.org/~de/Tcl/pictures>

    Email: de@ucolick.org

  1133..  MMiissee eenn ppllaaccee ddee pplluussiieeuurrss mmaacchhiinneess PPoossttggrreeSSQQLL aavveecc uunn sseeuull mmoonnii
  tteeuurr

  Vous pouvez empiler plusieurs cpu et les connecter  un unique
  moniteur en utilisant un commutateur KVM (Keyboard, Video, Monitor)
  pour choisir la connexion avec une unit centrale particulire. Ce qui
  conomise de l'espace et vite l'utilisation de plusieurs crans,
  claviers et mulots (conomisant environ de 100  500 US dollars par
  ensemble) et vite aussi pas mal de pagaille.

  En utilisant ce commutateur, vous pouvez empiler plusieurs serveurs
  PostgreSQL (dveloppement, test, production), serveurs Web, serveurs
  ftp, serveurs Intranet, serveur de Courrier, serveurs de Nouvelles,
  sur une tagre.  Le botier commutateur peut tre galement utilis
  pour contrler des machines Windows 95/NT ou OS/2.


  Veuillez consulter ces sites :

    DataComm Warehouse Inc.au 1-800-328-2261. Ils fournissent toutes
     sortes de matriels informatique <http://www.warehouse.com> Un
     commutateur manuel 4-ports KVM (PS/2) vaut environ $89.99.
     Rfrence de l'article : DDS1354

    Network Technologies Inc
     <http://www.networktechinc.com/servswt.html> (120 dollars/PC 8
     ports) qui propose des commutateurs de serveurs 'Server Switches'
     et des commutateurs uniquement vido

    Scene Double Inc, England
     <http://www.scene.demon.co.uk/qswitch.htm>

    Cybex corporation  <http://www.cybex.com>

    Raritan Inc  <http://www.raritan.com>

    RealStar Solutions Inc  <http://www.real-star.com/kvm.htm>

    Belkin Inc  <http://www.belkin.com>

    DataComm Warehouse Inc Appels 24 heures sur 24, 7 jours sur 7 au
     1-800-328-2261 Ils fournissent toutes sortes de matriels
     d'ordinateur  <http://www.warehouse.com>

    Better Box Communications Ltd.
     <http://www.betterbox.com/info.html>

    Allez chez votre marchand de matriel le plus proche et demandez un
     commutateur de serveur "Server Switch" galement connu sous le nom
     "KVM Auto Commutateurs".

  Utilisez le moteur de recherche yahoo pour trouver d'autres compagnies
  en utilisant la cl de recherche 'Server Switches' ou "KVM Switches".

  Pour avoir de meilleures performances, on recommande instamment
  d'avoir une machine unix pour chaque processus serveur PostgreSQL.
  Aucun autre programme/traitement ne doit tourner sur cette machine.
  Consultez la page Affaires de votre journal local pour trouver des
  vendeurs de machines intel nues, avec un moniteur monochrome de 13"
  (moniteur particulirement conomique). Les vendeurs locaux vendent
  uniquement du matriel SSAANNSS un quelconque Microsoft Windows/DOS (ce
  qui vous fait conomiser environ $ 150).  Vous n'avez pas besoin d'un
  moniteur couleur pour un serveur de base de donnes puisque vous
  pouvez en effectuer l'administration  distance  partir d'une station
  de travail PC couleur. Procurez-vous le cdrom Linux  l'adresse ci-
  dessous -

    Site Web Linux System Labs :   <http://www.lsl.com/>  7 (U.S.
     dollars)

    Site Web Cheap Bytes Inc :   <http://www.cheapbytes.com/> 7 (U.S.
     dollars)

     Assurez-vous que le matriel que vous achetez est support par le
     Linux Redhat. Vrifiez sur le site ftp de Redhat le matriel
     recommand tels que les coupleurs SCSI, les cartes video avant
     d'acheter.  Pour seulement $ 600 vous obtiendrez une machine intel
     puissante avec un Linux Redhat faisant tourner PostgreSQL.
     Utilisez odbc/jdbc/perl/tcl pour vous connecter  PostgreSQL 
     partir de Windows95, OS/2, Unix Motif ou de butineurs web (e.g.
     Redbaron, Opera, Netscape, 20 autres). (Les butineurs web sont en
     train de rapidement devenir le client standard).

  En suivant ce conseil, vous pouvez contrler de nombreux systmes 
  l'aide de seulement un clavier et un moniteur!

  On trouvera ci-dessous un eexxttrraaiitt dduu ccaattaalloogguuee ddee nneettwwoorrkktteecchhnniicc IInncc

  Commandez maintenant, appelez le  800-742-8324 (appel gratuit  partir
  des USA)

  Pour recevoir notre catalogue, veuillez envoyer votre adresse par
  courrier lectronique  : sales@networktechinc.com

  PILOTEZ PLUSIEURS PC's avec un seul clavier, cran et mulot Ces
  commutateurs lectroniques permettent de piloter jusqu' 64 PC's avec
  un unique clavier, cran et mulot. Son microprocesseur interne simule
  la prsence constante du clavier, de l'cran et du mulot pour chacun
  des PC's connects.

  Fonctionnalits et Applications


    Clavier, face avant ou commande  distance

    utilisation de connecteurs de mulots 9 broches D Srie ou 6 broches
     miniDIN

    utilisation de connecteurs de clavier 5 broches DIN ou 6 broches
     miniDIN

    rsolution vido 1600x1200 sans dgradation

    Utilisation de cbles standards

    Botier pour bureau ou pour montage en rack

  Spcifications - Clavier


    Tous les connecteurs dont femelles

    5 broches DIN ou 6 broches miniDIN

    Permettent un Re-dmarrage (boot) matriel ou logiciel de tous les
     PC's  chaque instant

  Contrles - Boutons en face avant


    Le toucher d'un bouton permet la connexion au PC correspondant

    L'appui sur un bouton pendant plus de 0.5 secondes entrane le
     fonctionnement dans les modes SCAN, BROADCAST ou COMMAND

    Les LEDs en face avant indiquent le mode d'opration du clavier

    L'appui sur CTRL+* entrane le fonctionnement en mode COMMAND

    Les modes SCAN, BROADCAST ou COMMAND sont disponibles

  Mulot

  * 9 broches D srie

    o Le commutateur NTI mule le mulot Microsoft srie pour tous les
     PC's


    o 9 broches D mle pour mulot

    o 9 broches D femelle pour PC's

  * 6 broches miniDIN

    o Le commutateur NTI mule le mulot IBM PS/2 pour tous les PC's

    o Tous les connecteurs sont femelles

  Par cble,  distance

    Optionnel--doit tre acquis sparment

    Fonctionnement identique  celui "Boutons en face avant"

  Moniteur (cran) - VGA

    Bande passante 150 MHz

    Rsolution 1600X1200 sans dgradation

    Tous les connecteurs sont des connecteurs femelles

  1144..  OOuuttiillss eett AApppplliiccaattiioonnss ppoouurr PPoossttggrreeSSQQLL

  1144..11..  LLee ssyyssttmmee ddee ddvveellooppppeemmeenntt AAppppGGEENN PPoossttggrreeSSQQLL 44GGLL ppoouurr lleess
  aapppplliiccaattiioonnss ddee bbaasseess ddee ddoonnnneess wweebb --

  AppGEN peut tre tl-charg de

    <http://www.man.ac.uk/~whaley/ag/appgen.html>

    <ftp://ftp.mcc.ac.uk/pub/linux/ALPHA/AppGEN>.

     AppGEN est un langage de haut niveau de la quatrime gnration
     ainsi qu'un gnrateur d'application pour produire des applications
     destines au World Wide Web (WWW). Ces applications sont
     typiquement utilises  travers l'internet ou dans le cadre d'un
     rseau intranet d'entreprise. Les applications AppGEN sont
     implantes en scripts C respectants la norme Common Gateway
     Interface (CGI) utilis par la plupart des serveurs Web.

  Pour utiliser AppGEN il vous faudra disposer de :-

  PostgresSQL, systme de gestion de base de donnes relationnel

  Un serveur web compatible CGI tel que HTTPD du NCSA

  D'un compilateur ANSI C tel que GCC

  AppGEN est constitu des excutables Unix (Linux) suivants :-


    defgen, qui produit une application cadre, de base,  partir de la
     structure logique des donnes. Ces applications sont capables
     d'ajouter, de mettre  jour, de supprimer et de rechercher les
     enregistrements d'une base de donnes tout en conservant
     automatiquement l'intgrit rfrentielle de cette base.


    appgen, le compilateur AppGEN qui compile le code source appgen en
     code source C CGI excutable et en documents formats HTML prts
     pour leur dploiement sur un serveur web.


    dbf2sql, un utilitaire de conversion de fichiers .dbf compatibles
     dBase III en scripts SQL excutables. Ce qui permet de migrer les
     donnes stockes dans la plupart des bases de donnes DOS/Windows
     vers un serveur SQL tel que PostgresSQL.

    De plus, AppGEN comprend un ensemble de documents HTML , de
     fichiers GIF et d'applets Java qui sont utiliss,  l'excution,
     par le systme. Et, naturellement, comme pour tout bon logiciel, la
     totalit du code source est fournie.


  L'auteur, Andrew Whaley, peut tre contact 

    andrew@arthur.smuht.nwest.nhs.uk

  1144..22..  WWWWWW WWeebb iinntteerrffaaccee ppoouurr PPoossttggrreessSSQQLL -- DDBBEENNGGIINNEE

  dbengine est une interface Web "plug 'n play" pour Postgres95 cre
  par Ingo Ciechowski. Il est  :

    <http://www.cis-computer.com/dbengine/ >

     AA pprrooppooss ddee DDBBEENNGGIINNEE :: dbengine est une interface entre le WWW et
     Postgres95 qui permet un accs simple  n'importe quelle base de
     donnes existante en seulement quelques minutes.

  PHP 3 offre une sorte de langage Perl dans vos documents, mais pas le
  vrai Perl alors que AppGen et wdb-p95 ncessite la cration d'un
  fichier de configuration pour chacune de vos bases de donnes -- c'est
  un peu comme si vous deviez apprendre un nouveau mta-langage avant de
  pouvoir commencer  travailler.

  A la diffrence des autres outils, vous n'avez pas  apprendre un
  langage de programmation particulier ou un langage de script pour
  commencer  utiliser dbengine. De plus, il n'y a pas  crer de
  fichier de configuration pour chaque base de donnes, et vous n'avez
  donc pas besoin de vous familiariser avec sa structure.  Cependant -
  au cas o vous voudriez profiter de toutes les possibilits de
  dbengine, ce serait une bonne ide de connatre le langage Perl.

  Le systme tout entier peut tre configur  l'aide de simples
  manipulations d'une base de donnes complmentaire qui contient les
  informations de dtail sur la manire de visualiser vos accs  la
  base de donnes. Vous pouvez mme spcifier des Champs Virtuels qui
  sont calculs en temps rel avant d'tre affichs  l'cran.

  LLiicceennccee ::

  dbengine est un logiciel libre selon les mmes conditions que Perl.
  Lisez sa licence si vous n'tes pas sr de ce que vous pouvez ou ne
  pouvez pas faire.  La dernire ligne indique que c'est une version
  plus gentille et plus modre que celle de la licence GNU -- une de
  celle qui n'affecte pas votre travail si vous extrayez des parties de
  dbengine ou du paquetage pour l'inclure dans un produit commercial!


  1155..  MMoodduullee AAppaacchhee WWeebbsseerrvveerr ppoouurr PPoossttggrreeSSQQLL -- NNeeooSSoofftt NNeeooWWeebbSSccrriipptt

  Apache est un serveur Web bien connu. On trouvera un module
  d'interface de PostgreSQL pour le serveur Web Apache  -

    <http://www.neosoft.com/neowebscript/>

     NeoWebScript est un langage de programmation qui permet d'inclure
     des programmes simples ou compliqus dans des fichiers HTML.

  Quand une page HTML contenant un script NeoWebScript est appele, le
  serveur Web ayant le NeoWebScript activ, excute le(s) script(s)
  inclus, produisant une page Web dont le contenu, personnalis, a t
  cr par le programme.

  NeoWebScript est un moyen rapide, sre, facile  apprendre de crer
  des programmes interactifs puissants directement en code HTML dans des
  pages Web.  Avec NeoWebScript, les compteurs, les formulaires de
  courrier lectronique, murs  graffitis, livres d'or et suivi des
  visiteurs sont aiss, mme pour un programmeur dbutant. Regardez
  comment NeoWebScript se dfend bien par rapport  PERL et JavaScript.

  Au cas o vous souhaiteriez installer NeoWebScript sur votre serveur
  web, votre webmestre doit lire notre "FAQ Sysop" pour se lancer. Le
  document "Thorie de fonctionnement" explique comment NeoWebScript
  fonctionne, celui d'Installation est un guide pas  pas des oprations
   effectuer. Le guide de Gestion traite de la manire de configurer et
  de faire fonctionner le serveur, celui de Tests permet de vrifier le
  fonctionnement correct de NeoWebScript, enfin, celui de Maintenance
  traite des problmes de serveur.

  Il n'y a aucuns frais pour l'utilisation de NeoWebScript-2.2 que ce
  soit pour votre ISP, votre intranet, ou votre extranet. Vous pourrez
  voir un licence complte quand vous vous enregistrerez pour
  tl-charger le logiciel, mais il en cote $ 99 si vous dsirez
  l'inclure dans votre propre produit ou l'utiliser dans un serveur
  commercial (eg. SSL).

  NeoWebScript est un module pour le serveur web Apache qui vous permet
  d'inclure , en tant que langage de script, pour vos pages web, le
  langage de programmation Tcl/Tk .  Il a t invent par Karl
  Lehenbauer, Directeur Technique chez NeoSoft, et document, renforc
  et tendu par les programmeurs de NeoSoft et par des rdacteurs
  techniques.

  Le serveur Apache est le serveur web le plus populaire au monde,
  totalisant 68 % des sites interrogs.

  Tcl/Tk est un langage de script puissant, libre et multi-plateformes
  dvelopp par le Dr. John Ousterhout. Selon ses propres termes :

  "Tcl/Tk permet aux dveloppeurs de logiciels de raliser un travail
  dix fois plus rapidement qu'avec des outils bass sur C ou C++. C'est
  aussi un grand langage de synthse permettant de faire travailler
  ensemble des applications existantes en les rendant plus graphiques et
  orientes Internet."

  Karl Lehenbauer, Fondateur et Directeur Technique de NeoSoft, a
  particip au dveloppement de Tcl/Tk ds le tout dbut. Avec Mark
  Diehkans, ils sont les auteurs de Tcl tendu  (Extended Tcl), connu
  galement sous le nom de TclX ou NeoSoft Tcl, qui constitue un
  ensemble puissant d'extensions au langage.  Beaucoup des commandes
  courantes essentielles de Tcl proviennent de Tcl tendu, et furent
  introduites dans le langage par le Dr. Ousterhout.

  NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA

  1155..11..  HHEEIITTMMLL,, eexxtteennssiioonn,, cctt sseerrvveeuurr ddee HHTTMMLL eett llaannggaaggee 44GGLL ppoouurr
  PPoossttggrreeSSQQLL

  Heitml est un autre outil d'interfaage de postgres avec le monde du
  world wide web.  Pour plus de dtails contacter




            Helmut Emmelmann H.E.I. Informationssyteme GmbH
            Wimpfenerstrasse 23 Tel. 49-621-795141
            68259 Mannheim Germany Fax. 49-621-795161





    E-mail Mr.Helmut Emmelmann at emmel@h-e-i.de

    Heitml site web principal  <http://www.heitml.com>

    Heitml site web secondaire  <http://www.h-e-i.deom>

  Heitml est  la fois une extension, ct serveur, de HTML et un
  langage de la quatrime gnration (4GL). Avec lui, on peut crire des
  applications web dans un style HTML et en utilisant de nouvelles
  balises de style HTML.

  heitml (prononc "H-ail"-TML) est une extension de HTML et un langage
  de quatrime gnration complet permettant aux Applications utilisant
  le web d'interagir avec des donnes stockes dans des bases de donnes
  SQL, sans mriter l'criture de scripts CGI complexes.

  heitml tend HTML ct serveur, convertissant de manire dynamique les
  fichiers ".hei" au format HTML et ainsi, les rendant compatibles avec
  n'importe quel butineur web. Il englobe la syntaxe simple et familire
  de HTML et apporte un large assortiment de Balises et de Bibliothques
  pr-dveloppes pour prendre en charge les tches qui auparavant
  ncessitaient CGI. De mme que XML, heitml permet l'utilisation de
  balises dfinies par l'utilisateur. Avec heitml les marqueurs dfinis
  par l'utilisateur peuvent tre traduits en HTML et envoys  un
  butineur.

  heitml est destin  la fois aux concepteurs HTML et aux programmeurs
  professionnels. Les concepteurs HTML peuvent utiliser les Balises
  heitml pour fabriquer des pages web dynamiques, des accs aux bases de
  donnes SQL ou crer des applications web compltes. On peut crer des
  Compteurs, des bases de donnes d'inscriptions, des formulaires de
  recherche, des formulaires de courrier lectronique ou des menus
  hirarchiss en utilisant simplement des Balises de style HTML
  pr-dveloppes que l'on trouve dans les nombreuses Bibliothques de
  Composants.

  Pour les programmeurs, heitml inclut un langage de quatrime
  gnration complet en HTML


                 (e.g. <if>, <while>, et <let> Balises),




  plus un valuateur d'expression puissant pour les types de donnes
  entiers, rels, boolens chane de caractres et tuple. Les tuples ont
  une rfrence smantique comme dans les langages orients objets mod
  ernes et sont stocks sur un tas. Les variables heitml y compris
  toutes les structures de donnes complexes stockes sur le tas conser
  vent leur valeur de page en page par l'utilisation du Mode Session. Il
  vous est possible de dfinir vos propres balises ou vos balises
  d'environnement et mme de redfinir les balises HTML.

  Avec heitml il devient possible de

  - - - dvelopper des Sites Web de manire structure et modulaire,
  tout en rduisant de faon drastique la surcharge due  la
  maintenance.

  - - - dvelopper des Sites Web intelligents et interactifs, dont le
  contenu s'adapte dynamiquement aux besoins de l'utilisateur.

  - - - de visualiser le contenu de bases de donnes SQL sans autre
  programmation que l'utilisation de notre bibliothque de Balises
  pr-dfinies "dba".

  - - - de dvelopper des applications de bases de donnes complexes et
  de Catalogue d'Achat en utilisant les Variables Session

  heitml tourne sous Linux avec n'importe quel Serveur Web utilisant
  l'interface CGI, et il est particulirement rapide (mis  part la
  surcharge due  CGI) avec le Serveur Web APACHE (version 1.1.1, 1.1.3,
  ou 1.2.4) en utilisant l'API apache. Actuellement MSQL (Version 1 et
  2), PostgreSQL (Version 6), mysql, et les bases de donnes yard sont
  supports. heitml tourne sous Linux, BSDi, Solaris et SunOS, de mme
  que sous Windows NT avec CGI, ISAPI et ODBC et Windows 95.

  heitml (sous linux) est libre pour la recherche, et pour une
  utilisation prive et non commerciale. Les Sites Web commerciaux
  doivent payer une licence. La version totalement oprationnelle de
  heitml est disponible pour une priode d'essai et peut tre
  tl-charg librement. (Notez, cependant, que chaque page Web ".hei"
  que vous dvelopperez affichera un message indiquant qu'il s'agit
  d'une version  usage non commerciale. Aprs enregistrement, vous
  recevrez une cl pour effacer ce message sans avoir  rinstaller le
  programme.)

  Les nouvelles fonctionnalits de la version 1.2 sont

  - - - Bibliothque de Composants pour des Formulaires de Recherche
  dans un Base de Donnes, menus hirarchiss d'ouverture et de
  fermeture, formulaires de courrier lectronique

  - - - Le Mode Session a t re-conu et amlior pour conserver toutes
  les variables (y compris le tas tout entier) au travers des
  diffrentes pages. Cela signifie que les donnes, de n'importe quelle
  taille sont conserves  l'intrieur d'une session. Ceci offre
  l'opportunit d'un champ plus large pour crer de nouvelles
  applications, e.g. stockage complet des rsultats d'une interrogation
  dans la mmoire de la session.

  - - - Les instructions d'installation, la documentation et les
  bibliothques d'exemples ont t augmentes de manire significative,
  un cours d'auto-formation a t ajout

  - - - Des balises pour excuter des commandes shell et pour envoyer
  des courriers lectronique ont t ajoutes

  - - - Le support du formatage d'impression et de la mise au point.
  heitml affiche votre code source en couleurs dans votre butineur et
  signale les erreurs de faon intuitive. En cas d'erreur  l'excution,
  toutes les structures de donnes internes sont affiches dans le
  butineur en indiquant et prservant leurs positions dans le code
  source original.

  - - - Diverses nouvelles variables serveur et fonctions intgres ont
  t ajoutes

  - - - En mode production, heitml collecte maintenant des informations
  compltes sur les erreurs survenues lors de l'accs, par des
  utilisateurs,  votre site.


  Voici ce que dit la page d'accueil de heitml -

  heitml (prononcer "H-ail"-TML) tend et augmente de faon
  significative les fonctionnalits de HTML grce aux balises
  dfinissables et aux possibilits compltes de programmation. Ce qui
  permet de crer simplement des applications au contenu dynamique et
  orientes bases de donnes dans le monde HTML, sans CGI et sans
  scripts externes ou langages de programmation.  Cela signifie que
  vous, en tant qu'auteur HTML, vous pouvez inclure des applications
  dans vos pages web, simplement, en utilisant quelques nouvelles
  balises sans CGI et sans programmation. D'un autre ct, comme
  utilisateur avanc ou comme programmeur vous pouvez crer et
  programmer de puissantes bibliothques de balises.  Cette approche
  rend heitml souhaitable  la fois pour les utilisateurs nouveaux de
  HTML et pour les programmeurs professionnels.  heitml tourne sur le
  serveur web et gnre dynamiquement du HTML, aussi heitml est
  compatible avec les normes internet et avec n'importe quel butineur
  web. Il permet un accs total aux bases de donnes tout en vitant 
  l'utilisateur toute la complexit inutile de CGI. heitml a t
  dvelopp selon les plus rcents critres en matire de construction
  de compilateurs et de systmes transactionnels.

  Les pages heitml sont dveloppes exactement de la mme faon que les
  pages  HTML,  l'aide d'un diteur de texte ou d'un diteur HTML, et
  places comme d'habitude sur le serveur web. Cependant, maintenant,
  les pages peuvent contenir des balises heitml dynamiques et des accs
   des bibliothques de balises. Vous pouvez utiliser ces balises pour
  accder  une base de donnes, pour crer un contenu dynamique, pour
  envoyer des courriers lectronique, et mme pour crer de puissantes
  applications telles que les bases de donnes d'inscriptions ou de
  systmes d'achats.

  Les nouveaux venus  HTML et les programmeurs professionnels seront
  stupfaits de la vitesse et de la facilits avec lesquelles il peuvent
  concevoir des applications passionnantes telle que notre Livre d'Or
  Interactif sans ncessiter la complexit et l'apprentissage difficiles
  des scripts CGI, simplement en utilisant les outils fournis dans notre
  bibliothque dba.

  heitml est accompagn d'un large ventail de bibliothques de balises,
  pour crer des livres d'or, des applications de maintenance de bases
  de donnes, des formulaires puissants de courrier lectronique ou de
  structuration de votre site web  l'aide de menus hirarchiques. Ces
  outils sont prts  tre utiliss, il suffit simplement d'ajouter les
  balises correspondantes  votre site web.

  En tant que programmeur expriment, vous pouvez pleinement utiliser
  l'architecture dynamique persistante de tuple d'heitml : heitml n'est
  pas simplement un langage de script  typage dynamique, avec
  valuateur d'expression, procdures rcursives et capacits de passage
  de paramtres tendues, mais il apporte aussi des possibilits de
  tuples persistants dynamiques pour conserver automatiquement des
  donnes de session de n'importe quelle taille.

  1155..22..  SSeerrvveeuurr WWeebb AAmmeerriiccaa OOnn--lliinnee AAOOLL ppoouurr PPoossttggrreeSSQQLL

  Le serveur web commercial gratuit, AOLserver version 2.3 supporte des
  connexions  la base de donnes PostgreSQL version 6.2.1 et
  ultrieure.  Pour des informations complmentaires consultez

    AOL Web Server  <http://www.aolserver.com>





  1155..33..  OOuuttiill SSyyssttmmee ddee ssuuiivvii ddee PPrroobbllmmee//PPrroojjeett ppoouurr PPoossttggrreeSSQQLL

  Se trouve  l'url :

    <http://www.homeport.org/~shevett/pts/>

  1155..44..  CCoonnvveerrssiioonn ddee ffiicchhiieerrss ddbbaassee ddbbff eenn ffiicchhiieerrss PPoossttggrreeSSQQLL

  Le programme dbf2msql fonctionne parfaitement avec mSQL et PostgreSQL.
  Vous pouvez le trouver 

    <ftp://ftp.nerosworld.com/pub/SQL/dbf2sql/>

    <ftp://ftp.postgresql.org/pub/incoming/dbf2pg-3.0.tar.gz>

  Ce programme a t crit par Maarten Boekhold, Faculty of Electrical
  Engineering TU Delft, NL Computer Architecture and Digital Technique
  section

    M.Boekhold@et.tudelft.nl

  Vous pouvez galement utiliser une mthode python pour lire des
  fichiers dbf et les charger dans une base de donnes postgres.

    Voir  <http://www.python.org>

  1166..  OOuuttiill ddee CCoonncceeppttiioonn//IImmppllmmeennttaattiioonn ppoouurr SSGGBBDD WWeebb ppoouurr PPoossttggrreeSSQQLL
  -- EEAARRPPWW


    <http://www.oswego.edu/Earp>

    <ftp://ftp.oswego.edu> in the directory 'pub/unix/earp'.

  1166..11..  EEAARRPP,, cc''eesstt qquuooii ??

  Le "Programme de Rponse Facilement Ajustable" ("Easily Adjustable
  Response Program" - EARP) cr par David Dougherty.  EARP est un outil
  de Conception/Implmentation pour Base De Donnes Web, ralis au-
  dessus du systme de gestion de base de donnes PostgresSQL. Ses
  fonctionnalits comprennent:


    Un systme de conception visuel.

    Une interface d'envoi de courrier lectronique. (pouvant prendre en
     charge le courrier entrant et sortant)

    Un Mcanisme de Scurit amlior.

    Un pilote cgi.

  1166..22..  IImmppllaannttaattiioonn


  L'implantation principale de EARP consiste en un binaire CGI qui
  s'excute sous le dmon http pour fournir l'accs au serveur de base
  de donnes. Tous les outils de conception sont intgrs dans le
  pilote, aucune conception ne se fait sur le web. Les outils eux-mmes
  requirent un navigateur graphique, la compatibilit des objets conus
  avec ces outils est indpendante de l'implantation, elle ne dpend
  uniquement que des prfrences de conception individuelles.




  1166..33..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn ppoouurr ffaaiirree ffoonnccttiioonnnneerr EEAARRPP


  EARP est sens fonctionner sur une grande varit de plates-formes
  avec peu de modifications sinon pas du tout. Les plates-formes pour
  lesquelles le fonctionnement est connu sont les suivantes :

    Solaris 2.5

    Linux 1.2.13+

    GNU C++

    PostgreSQL (Version 1.01 / 1.02 )

    netsite server

    NCSA httpd


    GNU C++

    PostgreSQL (Version 1.01 / 1.02 )

    NCSA httpd

    Apache httpd

     La version actuelle (1.3) de Earp a t conue au-dessus de la
     version de libpq livre avec PostgreSQL v1.01/1.02.  Si vous
     utilisez une version plus rcente de Postgres, vous devez vous
     attendre  ce que le programme ncessite quelques modifications
     pour fonctionner correctement. Dans la version de dveloppement
     (Earp 2.0), la prise en charge de libpq est en cours de prise en
     compte en tant que module.

  1166..44..  CCoommmmeenntt ffoonnccttiioonnnnee--tt--iill??


  Une des fonctionnalits principales de EARP est d'utiliser une
  approche oriente objet pour produire des pages html qui s'interfacent
   la base de donnes. La plupart des pages sont constitues de
  plusieurs objets. Chaque objet est produit par une sorte d'outil et
  reoit un nom, les objets sont alors lis ensembles et appels en
  squence par l'outil de gestion de pages.  Les objets sont galement
  rutilisables  l'intrieur de plusieurs pages. Il existe des outils
  de base pour HTML, pour les Requtes, pour la saisie dans des
  formulaires, le formatage variable des requtes et des objets en
  entre, ainsi que pour lier des objets pour en former de nouveaux.  On
  trouve galement des outils plus avancs tels que l'outil de courrier
  lectronique et l'outil de cration de requtes en parallle.

  La gestion perfectionne de la scurit est une des autres
  fonctionnalits de EARP.  L'accs aux diffrentes zones du systme
  EARP peut tre limit par une grande varit de moyens. Pour faciliter
  cette scurit perfectionne, EARP effectue des contrles  chaque
  connexion au systme, et dtermine  quels "ids" et "groups"
  appartient l'agent qui se connecte. Les accs aux zones sont dfinis
  sparment, et la combinaison des deux permet de dcider si l'accs 
  une certaine zone de Earp est autoris. De plus , tout ce qui est
  requis pour raliser les fonctionnalits de scurit se trouve dans un
  serveur http qui effectue une authentification de l'utilisateur
  minimale (ou meilleure).



  1166..55..  OO ppuuiiss--jjee llee ttrroouuvveerr??


  EARP est disponible via un ftp anonyme  :

    <ftp://ftp.oswego.edu> in the directory 'pub/unix/earp'.

  1177..  PPHHPP PPrr--pprroocceesssseeuurr HHyyppeerrtteexxttee -- LLaannggaaggee ddee ssccrriipptt cctt sseerrvveeuurr,,
  aavveecc HHTTMMLL iinnttggrr,, ppoouurr PPoossttggrreeSSQQLL

  L'outil d'interfaage WWW se trouve  :

    <http://www.php.net>

    <http://www.vex.net/php>

     PHP possde galement un compilateur appel Zend qui amliore
     grandement les performances.  En premier lieu, pendant le
     dveloppement, les tests et la mise au point, vous crivez votre
     application en utilisant le langage de script PHP.  Une fois que le
     projet est prt  tre dploy, vous utilisez le compilateur Zend
     pour compiler le script PHP et crer un excutable qui tournera
     trs rapidement.

  PHP 3 est l'ancien nom des Pages d'accueil professionelles et le
  nouveau nom est Pr-Processeur Hypertexte PHP

    Des sites miroirs existent dans de nombreux pays  l'adresse
     www.COUNTRYCODE.php.org

    <http://www.fe.de.php.net>

    <http://www.sk.php.net>

    <http://php.iquest.net/>

  Pour les questions envoyer un courrier lectronique  :

    rasmus@lerdorf.on.ca

     PHP 3 est un langage de script ct serveur, avec langage HTML
     intgr.  Il vous permet d'crire des scripts simples directement
     dans vos fichiers .HTML  la manire JavaScript, sauf que,  la
     diffrence de JavaScript, PHP 3 n'est pas dpendant du butineur
     utilis. JavaScript est un langage, ct client, avec HTML intgr
     alors que PHP 3 est un langage ct serveur. PHP 3 est similaire,
     dans son concept, au produit LiveWire Pro pour Netscape. Si vous en
     avez les moyens, vous utilisez le serveur du commerce Netscape et
     l'un des systmes d'exploitation supports, et vous jetterez
     probablement un oeil sur LiveWire Pro. Si vous prfrez un logiciel
     libre, voluant rapidement, qui est disponible avec la totalit de
     son code source, vous apprcierez probablement PHP 3.

  1177..11..  FFoonnccttiioonnnnaalliittss pprriinncciippaalleess

  Support de CGI Standard, FastCGI et du module Apache.  Comme programme
  CGI standard, PHP 3 peut tre install sur n'importe quelle machine
  Unix sur laquelle tourne n'importe quel serveur web Unix. Avec le
  support de la nouvelle norme FastCGI, PHP 3 peut trouver avantage des
  gains de vitesse apports par ce mcanisme. Comme module Apache, PHP 3
  devient une alternative extrmement puissante et brillante  la
  programmation CGI.


    Enregistrement des accs Avec les possibilits d'enregistrement des
     accs de PHP 3, les utilisateurs peuvent entretenir leur propre
     compteur d'accs et l'enregistrer. Il n'utilise en aucune faon les
     fichiers de d'enregistrement des connexions du systme central, et
     il permet un suivi des accs en temps rel. Le Script du
     Visualisateur de Connexions fournit un rsum rapide des accs  un
     ensemble de pages possdes par un utilisateur individuel. De plus,
     le paquetage peut tre configur pour gnrer un pied de page, sur
     chaque page, qui montre l'information sur les accs. Regardez au
     bas de cette page pour en avoir un exemple.

    Contrle d'accs Un cran de configuration intgr, bas sur le
     web, permet la configuration du contrle des accs. Il est possible
     de crer des rgles d'accs pour toutes ou quelques unes des pages
     web possdes par une certaine personne qui met diverses
     restrictions sur qui peut voir ces pages et comment elles seront
     vues.  Les pages peuvent tre protges par un mot de passe,
     compltement interdites,  connexion dsactive et l'accs bas sur
     le domaine du client, le butineur, l'adresse de courrier
     lectronique ou mme le document auquel on se rfre.

    Support de Postgres Postgres est un SGBDR (RDBMS) avanc libre. PHP
     3 supporte les requtes Postgres95 et PostgreSQL SQL incluses
     directement dans les fichiers .html.


    RFC-1867 Support du tl-chargement de fichier Le tl-chargement
     de fichier est une nouvelle fonctionnalit de Netscape 2.0.  Il
     permet aux utilisateurs de tl-charger des fichiers vers le
     serveur web.  PHP 3 ralise le dcodage Mime rel pour faire ce
     travail et fournit aussi le cadre additionnel pour faire quelque
     chose d'utile avec le fichier tl-charg une fois que celui-ci a
     t reu.

    Contrle d'authentification bas sur HTTP PHP 3 peut tre utilis
     pour crer des mcanismes d'authentification personnaliss bass
     sur HTTP pour le serveur web Apache.

    Variables, Tableaux, Tableaux associatifs PHP 3 supporte des
     variables types, des tableaux et mme des tableaux associatifs 
     la Perl. Ils peuvent tre passs d'une page web  l'autre en
     utilisant les mthodes GET ou POST.

    Conditions, Boucles Tant que (While) PHP 3 possde un langage de
     script aux fonctionnalits compltes de style C. Vous disposez des
     instructions de tests conditionnels if/then/elseif/else/endif ainsi
     que des boucles while et des instructions switch/case pour
     contrler l'ordre logique et la manire dont les pages html doivent
     tre affiches.

    Expressions Rgulires tendues Les expressions rgulires sont
     trs utilises pour le filtrage, le remplacement de squences et
     les manipulations gnrales de chanes de caractres. PHP 3
     supporte toutes les oprations communes sur les expressions
     rgulires.

    Contrle de l'En-tte HTTP brute La possibilit d'envoyer  partir
     de pages web des en-ttes HTTP brutes personnalises en fonction
     d'une condition est essentielle pour crer un site web de haut
     niveau. Un usage frquent est l'envoi d'un emplacement: en-tte URL
     pour Rediriger le client appelant vers une autre URL.  Il peut
     aussi tre utilis pour stopper le stockage ou manipuler la
     dernire mise  jour de l'en-tte de pages.

    Cration d'images KIF  la vole PHP 3 prend en compte la
     bibliothque d'image GD de Thomas Boutell ce qui offre la
     possibilit de gnrer des images GIF  la vole.

    Prise en charge du mode scurit ("Safe Mode") ISP PHP 3 prend en
     charge un "Mode de Scurit" exceptionnel qui permet d'avoir de
     multiples utilisateurs excutant des scripts PHP en toute scurit
     sur le mme serveur.

    C'est Libre!  Pour finir, et c'est un point essentiel. Le paquetage
     est entirement libre.  Il est sous les conditions de la licence
     GPL qui vous permet d'utiliser ce logiciel pour n'importe quel
     objectif, commercial ou autre. Reportez-vous au document de la
     Licence Publique GNU pour des renseignements dtaills.

  1177..22..  CCrrddiittss


  * De grandes parties de ce code ont t dveloppes  et pour
  l'universit de Toronto. De grands Mercis  Lee Oattes du Dpartement
  de Dveloppement des Rseaux  l'universit pour ses critiques
  constructives permanentes.

  * Le code de prise en charge de Postgres95 a t crit par Adam
  Sussman

    asussman@vidya.com

  * d'autres, innombrables, ont particip aux tests et  la mise au
  point du paquetage.

  1177..33..  PPHHPP 33 -- BBrreeff HHiissttoorriiqquuee


  PHP a commenc sa vie comme simple petite enveloppe cgi crite en
  Perl.  Son utilisation en dehors d'un usage priv n'avait jamais t
  envisage. Le nom de ce premier paquetage tait "Personal Home Page
  Tools" (Outils pour Page d'Acceuil Personnelle"), qui devint plus tard
  "Kit de Construction d'une Page d'Acceuil".

  Un outil pour inclure facilement des requtes SQL dans des pages web a
  t crit. C'tait fondamentalement un autre petit programme enveloppe
  CGI qui analysait les requtes SQL et facilitait la cration de
  formulaires et de tables bass sur ces requtes. Cet outil fut appel
  FI "Interprteur de Formulaire" (Form Interpreter).

  La version 2.0 PHP/FI est une rcriture complte de ces deux
  paquetages combins pour former un simple programme. il a maintenant
  volu au point de devenir un simple langage de programmation intgr
  dans les fichiers HTML.  L'acronyme original, PHP, lui est rest. Il
  n'est plus rellement appropri.  PHP/FI est aujourd'hui plus utilis
  pour mettre en place des sites web entiers que pour de petites pages
  d'accueil personnelles. Quel que soit son nom, il limine le besoin de
  recourir  de nombreux petits programmes cgi Perl en permettant
  d'insrer de simples scripts directement dans vos fichiers HTML.  Ceci
  amliore les performances globales de vos pages web puisque la
  surcharge due au lancement de processus Perl successifs a t
  limine. La gestion de larges sites web a galement t facilite en
  plaant tous les composants d'une page web dans un fichier html
  unique. En incluant le support de diffrentes bases de donnes, il
  devient trivial de dvelopper des pages web mettant en oeuvre des
  bases de donnes. Nombreux sont ceux qui trouvent que cette
  intgration est plus facile  grer que d'essayer de crer des
  fichiers HTML et CGI spars.

  Tout au long de cette documentation, toute rfrence  PHP, FI ou
  PHP/FI traite de la mme chose. La diffrence entre PHP et FI est
  seulement conceptuelle. Les deux sont construits  partir de la mme
  distribution du code source. Maintenant, PHP/FI a t renomm PHP 3.

  1177..44..  BBoonn,, qquuee ppuuiiss--jjee ffaaiirree aavveecc PPHHPP//FFII??


  La premire chose que vous allez noter, si vous faites tourner une
  page par l'intermdiaire de PHP/FI, c'est qu'il ajoute un pied de page
  vous informant du nombre d'accs  votre page (si vous incluez le
  support des connexions d'accs dans votre binaire). C'est seulement un
  tout petit exemple de ce que PHP/FI peut faire pour vous. Il joue
  galement le rle trs important d'interprteur de formulaire cgi,
  d'o la partie FI de son nom. Par exemple si vous crez un formulaire
  dans l'une de vos pages web, vous avez besoin de quelque chose pour
  traiter l'information contenue dans ce formulaire. Mme si vous
  dsirez simplement passer l'information  une autre page web, vous
  aurez besoin d'un programme cgi pour le faire. PHP/FI facilite
  grandement le processus de prise en charge des donnes du formulaire
  pour en faire quelque chose.

  1177..55..  UUnn ssiimmppllee eexxeemmppllee


  Supposons que vous ayez le formulaire :



       <FORM ACTION="/cgi-bin/php.cgi/~userid/display.html" METHOD=POST>
       <INPUT TYPE="text" name="name">
       <INPUT TYPE="text" name="age">
       <INPUT TYPE="submit">
       <FORM>




  Votre fichier display.html doit contenir quelque chose du genre :


       < ?echo "Hi $ name, vous avez $ age ans!<p>" >




  C'est aussi simple que cela! PHP/FI cre automatiquement une variable
  pour chaque champ de saisie de votre formulaire. Vous pouvez alors
  utiliser ces variables dans le fichier ACTION URL.

  L'tape suivante, aprs avoir vu comment utiliser ces variables, est
  de commencer  jouer avec quelques balises de gestion du droulement
  logique de vos pages. Par exemple, si vous voulez afficher diffrents
  messages dpendants de des informations entres par l'utilisateur,
  vous pouvez utiliser la logique si/alors (if/else). Dans notre exemple
  ci-dessus, on peut afficher diffrentes choses dpendant de l'ge
  entr par l'utilisateur en modifiant notre fichier display.html en :



       <?
           if($age>50);
               echo "Hi $name, vous tes un fossile!<p>";
           elseif($age>30);
               echo "Hi $name, vous tes trs vieux!<p>";
           else;
               echo "Hi $name.";
           endif;
       >


  PHP/FI fournit un langage de script trs puissant qui peut faire
  beaucoup plus que ce qui est expos dans l'exemple ci-dessus. Regardez
  la section sur le langage de Script PHP/FI pour des informations
  complmentaires.

  Vous pouvez galement utiliser PHP/FI pour configurer qui a le droit
  d'accder  vos pages. Ceci est effectu en utilisant l'cran de
  configuration inclus.  Par son intermdiaire , vous pourrez, par
  exemple, spcifier que seulement les gens appartenant  un certain
  domaine seront autoriss  voir vos pages, vous pouvez galement crer
  une rgle protgeant certaines pages par un mot de passe. Voir la
  section Contrle d'Accs pour plus de dtails.

  PHP/FI est galement capable de recevoir des fichiers tl-chargs par
  n'importe quel butineur conforme  la norme RFC-1867. Cette
  fonctionnalit permet aux gens de tl-charger galement des fichiers
  de texte ou binaire.  Avec le contrle de PHP/FI et les fonctions
  logiques, vous disposez d'un contrle total sur qui est autoris 
  tl-charger un fichier et sur ce que l'on peut faire de ce fichier
  une fois tl-charg. Voir la section Tl-chargement de fichier pour
  de plus amples dtails.

  PHP/FI supporte le paquetage Postgres95. Il supporte les requtes SQL
  incluses dans vos fichiers .HTML. Consultez la section Support
  Postgres95 pour plus d'informations.

  PHP/FI supporte galement le paquetage du SGBD mysql. Il supporte les
  requtes SQL incluses dans vos fichiers .HTML. Consultez la section
  Support mysql pour plus d'informations.

  1177..66..  RReeddiirreeccttiioonn CCGGII


  1177..66..11..  NNootteess AAppaacchhee 11..00..xx

  Une bonne manire de faire tourner PHP/FI est d'utiliser un module de
  redirection cgi avec le serveur Apache. Veuillez noter que vous n'avez
  pas  vous soucier des modules de redirection si vous utilisez la
  version module Apache de PHP/FI. Deux de ces modules de redirection
  sont disponibles. L'un est dvelopp par Dave Andersen

    angio@aros.net

     et est disponible 

    ftp://ftp.aros.net/pub/util/apache/mod\_cgi\_redirect.c

     et l'autre est inclus avec Apache et est appel mod_actions.c. Ces
     deux modules sont extrmement similaires. Ils diffrent trs
     lgrement dans leur utilisation. Les deux ont t tests et
     fonctionnent avec PHP/FI.

  Regardez dans la documentation Apache la manire d'ajouter un module.
  En gnral vous ajoutez le nom de module dans un fichier appel
  Configuration. La ligne  ajouter si vous voulez utiliser le module
  mod_actions est :


            Module action_module mod_actions.o




  Si vous envisagez d'utiliser le module mod_cgi_redirect.c ajoutez
  cette ligne :

       Module cgi_redirect_module mod_cgi_redirect.o




  Puis compilez votre httpd et installez-le. Pour configurer la redirec
  tion cgi il vous faudra soit crer un nouveau type mime dans votre
  fichier mime.types soit utiliser la commande AddType dans votre
  fichier srm.conf pour ajouter le type mime. Le type mime  ajouter
  doit tre quelque chose comme :


            application/x-httpd-php phtml




  Si vous vous apprtez  utiliser le module mod_actions.c il vous fau
  dra ajouter la ligne suivante dans votre fichier srm.conf:


            Action application/x-httpd-php /cgi-bin/php.cgi




  Si vous vous apprtez  utiliser mod_cgi_redirect.c vous devrez
  ajouter cette ligne  srm.conf :


            CgiRedirect application/x-httpd-php /cgi-bin/php.cgi




  N'essayez pas d'utiliser en mme temps mod_actions.c et mod_cgi_redi
  rect.c .

  Une fois que vous avez l'un de ces modules de redirection cgi install
  et configur correctement, vous pouvez spcifier que vous voulez qu'un
  fichier soit filtr par php/fi en mettant simplement l'extension
  .phtml au fichier. De plus, si vous ajoutez index.phtml  votre ligne
  de configuration DirectoryIndex dans votre fichier srm.conf alors la
  page de plus haut niveau d'un rpertoire sera automatiquement filtre
  par php si vous appelez votre fichier index index.phtml.

  1177..66..22..  HHTTTTPPDD NNeettssccaappee

  Vous pouvez rediriger automatiquement les requtes pour des fichiers
  ayant une extension donne de faon  ce qu'ils soient pris en compte
  par PHP/FI en utilisant le module de Redirection du Serveur CGI
  Netscape.  Ce module est disponible dans le Fichier Archives de la
  Page d'Accueil de PHP/FI. Le fichier LISEZ_MOI (README) dans le
  paquetage explique clairement comment le configurer pour l'utiliser
  avec PHP/FI.

  1177..66..33..  HHTTTTPPDD NNCCSSAA

  Actuellement NCSA ne supporte pas les modules, donc, pour effectuer
  une redirection cgi avec ce serveur, il vous faudra modifier le code
  source de votre serveur. Une rustine pour faire cela avec NCSA 1.5 est
  disponible dans le fichier archives de PHP/FI.




  1177..77..  LLaanncceerr PPHHPP//FFII  ppaarrttiirr ddee llaa lliiggnnee ddee ccoommmmaannddee


  Si vous fabriquez la version CGI de PHP/FI, vous pouvez l'utiliser
  simplement  partir de la ligne de commande, en tapant: php.cgi
  nom_de_fichier o nom_de_fichier est le fichier que vous voulez
  filtrer. Vous pouvez galement crer des scripts PHP/FI autonomes en
  faisant ressembler la premire ligne de votre script  quelque chose
  comme :



           #!/usr/local/bin/php.cgi -q




  L'option "-q" supprime l'impression des en-ttes HTTP. Vous pouvez
  vous passer de cette option si vous le dsirez.

  1188..  IInntteerrffaaccee PPyytthhoonn ppoouurr PPoossttggrreeSSQQLL

  Python est un langage de script, interprt et orient objet.  Il est
  simple  utiliser (syntaxe lgre, instructions simples et sans
  dtours ). Il possde de nombreuses extensions pour btir des
  interfaces utilisateurs ( GUI ), pour s'interfacer au WWW, etc. Un
  butineur de web intelligent (  la HotJava ), est actuellement en
  cours de dveloppement (novembre 1995), et cela devrait ouvrir de
  nombreuses portes aux programmeurs.  Le copyrightde Python est dtenu
  par Stichting S Mathematisch Centrum, Amsterdam, Pays-Bas, et est
  librement distribuable Il supporte le chargement dynamique d'objets,
  de classes, de modules et d'exceptions. L'ajout d'interfaces  de
  nouvelles bibliothques systme,  l'aide de code C est ais, rendant
  Python facile  utiliser en cas de personnalisation. Python est un
  langage de script de trs haut niveau possdant une interface X. Le
  paquetage Python est distribu dans les cdroms Linux, et il comprend
  la plupart des modules Python standards, ainsi que des modules
  d'interfaage  l'ensemble de widgets Tix pour Tk.

  PyGresSQL est un module Python qui s'interface  une base de donnes
  PostgreSQL. Il intgre la bibliothque de requtes de PostgreSQL pour
  permettre l'utilisation aise des possibilits de PostgreSQL  partir
  d'un script Python.  PyGreSQL a t crit par D'Arcy J.M. Cain et
  Pascal Andre.

    Nouveau site de PyGreSQL  <http://www.druid.net/pygresql/>

    Maintenu par  D'Arcy   <http://www.druid.net/~darcy/>

    L'ancien site est 
     <ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95.README >

    D'Arcy J.M. Cain darcy@druid.net

    Pascal Andre andre@chimay.via.ecp.fr

    Pascal Andre andre@via.ecp.fr



  1188..11..  OO llee ttrroouuvveerr PPyyGGrreess ??


  Les sites d'accueil des diffrents paquetages sont :


    Python
     <ftp://ftp.python.org:/pub/www.python.org/1.5/python1.5b2.tar.gz>

    PyGreSQL  <ftp://ftp.druid.net/pub/distrib/PyGreSQL-2.1.tgz>

    Old site
     <ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95-1.0b.tar.gz
     >

     Vous devriez cependant essayer de trouver un site miroir proche de
     votre propre site. Consultez les sources d'information pour trouver
     ces sites.  PyGres95 devrait se trouver dans les rpertoires
     contrib des sites Python et PostgresSQL.

  1188..22..  IInnffoorrmmaattiioonn eett ssuuppppoorrtt


  Si vous avez besoin d'informations concernant ces paquetages veuillez
  consulter leurs sites web:


    Python :      <http://www.python.org/>

    PostgreSQL :
     <http://epoch.cs.berkeley.edu:8000/postgres95/index.html>

    PyGreSQL  <ftp://ftp.druid.net/pub/distrib/PyGreSQL-2.1.tgz>

    Ancien site PyGreSQL :
     <http://www.via.ecp.fr/via/products/pygres.html>

  Pour un support :

    Liste de diffusion de PyGreSQL. Vous pouvez vous abonner en
     envoyant un courrier lectronique  majordomo@vex.net en mettant la
     ligne "subscribe pygresql name@domain" dans le corps du message et
     en remplaant "name@domain" par votre propre adresse lectronique.

    Forum de discussion pour Python :     newsgroup comp.lang.python

    PyGreSQL :   contacter Andre  andre@via.ecp.fr pour les comptes-
     rendus d'erreurs, ides, remarques

  1199..  PPaasssseerreellllee eennttrree PPoossttggrreeSSQQLL eett WWWWWW -- WWDDBB--PP9955

  WDB-P95 - Une interface Web interface aux bases de donnes PostgresSQL
  a t cre par J. Douglas Dunlop.  C'est  :

    La nouvelle WDB de J Rowe se trouve 
     <http://www.lava.net/beowulf/programming/wdb>

    La nouvelle version de WWW-WDB est 
     <http://www.eol.ists.ca/~dunlop/wdb-p95/>

    Pour les questions ou pour s'abonner  une liste de diffusion
     contacter : dunlop@eol.ists.ca

     C'est une version modifie de wdb-1.3a2 qui fournit une passerelle
     WWW  PostgresSQL. Cette version ncessite galement un Butineur
     capable de prendre en compte les Tables HTML pour avoir une sortie
     tabule. Ceci n'est pas requis pour le  wdb original et on peut
     facilement y revenir.

  Vous pouvez essayer ma Bande CASI et ma Requte d'Image. Vous pouvez
  jeter un coup d'oeil au Fichier de Dfinition de Formulaire (FDF) qui
  est utilis pour crer la Bande CASI et galement la Requte d'Image,
  qui comprends une jointure (JOIN) de 2 tables.

  Cette version contient tous les fichiers ncessaires pour installer et
  faire tourner WDB-P95 en tant qu'interface  vos bases de donnes
  PostgresSQL. Le portage de ce systme pour une autre base de donnes
  devrait tre relativement facile -  condition qu'elle supporte le SQL
  standard et possde une interface Perl.

  1199..11..  LLee sseerrvveeuurr PPoossttggrreessSSQQLL,, ppggppeerrll,, eett hhttttppdd ddooiivveenntt--iillss rrssiiddeerr
  ssuurr llee mmmmee hhttee??

  Non - Le serveur PostgresSQL n'a pas  tre sur le mme hte. Comme
  WDB-P95 est appel par le dmon http, ils doivent rsider sur le mme
  hte. - Et comme WDB-P95 a t crit pour utiliser Pg.pm - pgperl doit
  tre sur le mme hte galement. Pgperl a t crit en utilisant la
  bibliothque libpq, donc, il sera capable d'accder  n'importe quel
  serveur Postgres95 n'importe o sur le rseau, juste comme n'importe
  quel autre client PostgresSQL. Comme illustr ci-dessous

  {WWW Client (Netscape)} => {HTTP Server (NCSA's http) + WDB-P95 +
  pgperl + libpq}=> {PostgresSQL server}

  Les parenthses () reprsentent les machines.


  Chaque machine peut tre d'un type diffrent : NT, SUN, HP, ... mais
  il faut que vous ayez la bibliothque d'interface libpq pour le type
  de machine sur lequel  vous envisagez d'utiliser WDB-P95, puisqu'il
  vous faut compiler pgperl.  (Le systme a t conu pour utiliser les
  tables HTML donc un client WWW rcent est meilleur)


  2200..  IInntteerrffaacceess aauu llaannggaaggee ""CC"",, ""CC++++"",, EESSQQLL//CC eett OOpprraatteeuurrss ssuurr lleess
  bbiittss ppoouurr PPoossttggrreeSSQQLL


  2200..11..  IInntteerrffaaccee ""CC""

  Elle est incluse dans la distribution et s'appelle 'libpq'. Elle est
  similaire aux bibliothques OCI Oracle, DB-lib Sybase, ou CLI
  Informix.


  2200..22..  ""CC++++"" iinntteerrffaaccee

  Elle est incluse dans la distribution et est nomme 'libpq++'.


  2200..33..  EESSQQLL//CC

  C'est un pr-compilateur C intgr pour PostgreSQL ESQL/C comme Pro*C
  d'Oracle, et ESQL/C d'Informix.  ESQL/C pour PostgreSQL est une
  interface de programmation d'application SQL (API) qui permet au
  programmeur C de crer des applications personnalises avec des
  possibilits de gestion de base de donnes. ESQL/C pour PostgreSQL
  vous permet d'utiliser un langage de troisime gnration avec lequel
  vous tes familiaris tout en profitant des avantages d'un Langage de
  Requtes Structur (SQL).

  ESQL/C est compos des lments logiciels suivants:

    Les bibliothques ESQL/C de fonctions C fournissent les accs au
     serveur de base de donnes.

    Les fichiers d'en-tte ESQL/C apportent les dfinitions des
     structures de donnes, les constantes et les macros utiles dans un
     programme ESQL/C.

    Le pr-processeur ESQL/C, qui est un pr-processeur de code source,
     transforme un fichier C contenant des instructions SQL en fichier
     excutable.

     Il se trouve  :

    ESQL/C pour PostgreSQL est dj inclus dans la distribution.

    Site principal  <ftp://ftp.lysator.liu.se/pub/linus>

    Email : linus@epact.se


  2200..44..  OOpprraatteeuurrss ssuurr lleess bbiittss ppoouurr PPoossttggrreeSSQQLL

  Les oprateurs sur les bits ont t crits par Nicolas Moldavsky

    nico@overnet.com.ar

  Ce sont des fonctions "C" qui implantent les oprateurs bit-par-bit
  (AND, OR, XOR, bit complement) dans pgsql. Si quelqu'un dsire les
  utiliser, il peut les rcuprer par ftp anonyme de


    <ftp://ftp.overnet.com.ar/pub/utils/linux/bitpgsql.tgz>

  De plus, il y a un "Makefile" pour Linux.

  2211..  LLeess CCooddeess KKaannjjii JJaappoonnaaiiss ppoouurr PPoossttggrreeSSQQLL

  Sont trs utiles pour les Japonais.  On les trouvera au site suivant :

    <ftp://ftp.sra.co.jp/pub/cmd/postgres/>

  2222..  PPoorrttaaggee ddee PPoossttggrreeSSQQLL ppoouurr WWiinnddoowwss 9955//WWiinnddoowwss NNTT

  Un portage pour Windows 95/Windows NT est en cours de ralisation.  Ce
  portage de fait en utilisant  gcc, gmake pour Win NT/95. Le programme
  gnu-win32 est utilis pour compiler le code source sous win32.  GNU
  gcc est disponible pour win32. Consultez ce site -

    <http://www.cygnus.com/misc/gnu-win32>

     Rcuprez-y le fichier cdk.exe (fichier auto-extractible pour gnu-
     win32)

  Le portage peut galement tre ralis en utilisant  l'outil
  "Emulateur Unix sous NT" (Unix-Emulator on NT) suivant de

    <http://www.softway.com>

  2233..  MMaaiilliinngg LLiissttss


  2233..11..  OObbtteenniirr uunn ccoommppttee ee--mmaaiill GGrraattuuiitt

  Regardez les offres gratuites - obtenez des comptes e-mail gratuit
  chez

    Yahoo  <http://www.yahoo.com> cliquer sur e-mail

    Lycos  <http://www.lycos.com> cliquer sur nouveaux comptes e-mail


    hotmail  <http://www.hotmail.com> cliquer sur nouveaux comptes e-
     mail

     Inscrivez vous  la liste de diffusion PostgreSQL et Yahoo dispose
     de la fonctionnalit complmentaire de cration d'un classeur
     spar pour les courriers lectroniques PostgreSQL e-mails, ainsi
     votre e-mail habituel ne sera pas pollu. Slectionnez le menu
     Email- > Options- > Filters et prenez un classeur spar pour e-
     mail.  Avec ce compte e-mail vous pouvez accder au courrier de
     n'importe o dans le monde  partir du moment o vous avez accs 
     une page web.

  Si vous disposez d'un autre  e-mail, vous pouvez utiliser les "Filtres
  de Courrier" pour recevoir automatiquement les courriers PostgreSQL
  dans un dossier spar. De cette faon, vous viterez de voir votre
  courrier pollu.

  2233..22..  LLiissttee ddee DDiiffffuussiioonn AAnnggllaaiissee

  Regardez les Titres des Listes de Diffusion sur la page web principale
   :

    <http://www.postgresql.org/>

    Envoyez vos questions par courrier lectronique : pgsql-
     questions@postgresql.org

    Dveloppeurs pgsql-hackers@postgresql.org

    Questions spcifiques  un portage pgsql-ports@postgresql.org

    Questions concernant la documentation pgsql-docs@postgresql.org

     Vous recevrez une rponse, par courrier lectronique, dans la
     journe qui suit!!

  Vous pouvez galement vous inscrire aux listes de diffusion.  Pour
  vous inscrire ou vous radier d'une liste, envoyez un courrier 

    pgsql-questions-request@postgresql.org

    pgsql-hackers-request@postgresql.org

    pgsql-ports-request@postgresql.org

    pgsql-docs-request@postgresql.org

     Le corps du message doit uniquement contenir la simple ligne

  subscribe

  (ou)

  unsubscribe

  2233..33..  AArrcchhiivvee ddeess lliisstteess ddee ddiiffffuussiioonn

  Il y a aussi des listes de diffusion qui sont archives au format html
   l'endroit suivant -

    Liste accessible par dates via MHonarc sur le WWW 
     <http://www.postgresql.org/mhonarc/pgsql-questions>

    <ftp://ftp.postgresql.org> dans le rpertoire /pub/majordomo


  2233..44..  LLiissttee ddee DDiiffffuussiioonn EEssppaaggnnoollee

  Il y a maintenant une liste "non officielle" pour postgreSQL en
  Espagnol.  Consultez galement la section 'Compte gratuit pour
  Organiser vos e-mails PostgreSQL e-mails' ci-dessus. Pour souscrire,
  l'utilisateur doit envoyer un message  :

    majordomo@tlali.iztacala.unam.mx

     Le corps du message doit contenir la simple ligne :

  inscripcion pgsql-ayuda

  2244..  LLiivvrreess eett DDooccuummeennttaattiioonnss


  2244..11..  GGuuiiddeess uuttiilliissaatteeuurr eett MMaannuueellss

  On trouve dans la distribution PostgreSQL aux formats postscript, HTML
  et pages de manuel unix les documents suivants. Si vous avez accs 
  l'internet, vous pouvez trouver les documents indiqus ci-dessous 
  <http://www.postgresql.org/docs>


    Le 'Guide Utilisateur' pour PostgreSQL,

    Le 'Guide de Ralisation' dtaillant la constitution interne de
     PostgreSQL.

    Les manuels "en ligne".

    Le manuels en ligne au format HTML.

    galement les manuels au format Postscript pour faire des ditions
     papier.

  2244..22..  DDooccuummeennttaattiioonn eenn lliiggnnee


    Liste et description des types de donnes et des oprateurs par
     dfaut


       Fait partie des commandes PSQL de la version 6.5.2.




    Liste des mots-cls SQL supports


       Il y a un script dans le rpertoire /tools qui fait cela




    Liste des instructions supportes -


       Utilisez la commande psql \h




    Concepts de base des bases de donnes relationnelles sous
     PostgreSQL (en implmentation) et des tonnes d'exemples en ligne
     (requtes) -


       Consultez les tests de rgression dans src/test. L, vous y trouver les
       rpertoires regress/sql et suite/*.sql.





    Didacticiel pour PostgreSQL.



       Les scripts du didacticiel SQL sont dans le rpertoire src/tutorial





  Voir galement "Didacticiel SQL pour les dbutants" dans l'appendice B
  de ce document ``''

  2244..33..  DDooccuummeennttss ddee RRffrreennccee:: OOuuvvrraaggeess ddee rrffrreennccee uuttiilleess ::


    "Understanding the New SQL: A Complete Guide" (Comprendre le
     Nouveau SQL: Un Guide Complet)- par Jim Melton et Alan R.Simon


       Morgan Kaufman Publisher. C'est un des meilleurs livres sur SQL. Il
       concerne SQL92.





    "A Guide to THE SQL STANDARD" (Un Guide du STANDARD SQL) - par
     C.J.Date


       Addison-Wesley Publishing company. C'est galement un bon livre. Trs
       populaire en ce qui concerne SQL.





    SQL - The Standard Handbook, (Le Manuel Standard) November 1992


       Stephen Cannan and Gerard Otten
       McGraw-Hill Book Company Europe , Berkshire, SL6 2QL, England





    SQL Instant Reference, (Rfrence Immdiate SQL) 1993


       Martin Gruber, Technical Editor: Joe Celko
       SYBEX Inc.  2021 Challenger Drive Alameda, CA 94501



    C.J.Date, "An introduction to Database Systems" (Une introduction
     aux Systmes de Bases de Donnes) (6th Edition), Addison-Wesley,
     1995, ISBN 0-201-82458-2


       Ce livre est la Bible des Systmes de Gestion de Bases de Donnes.
       Le livre dtaille la normalisation, SQL, la rcupration, la concurrence,
       la scurit, l'intgrit, les extensions au modle relationnel original,
       des sujets actuels tels que  les systmes client/serveur et le(s) modle(s)
       Orient(s) Objet. De nombreuses rfrences sont donnes pour des lectures
       complmentaires. Recommand pour la plupart des utilisateurs.





    Stefan Stanczyk, "Theory and Practice of Relational Databases",
     (Thorie et pratique des bases de Donnes Relationnelles) UCL Press
     Ltd, 1990, ISBN 1-857-28232-9


       Ce livre dtaille la thorie des bases de donnes relationnelles, l'algbre
       relationnelle, le calcul et la normalisation. Mais il ne couvre pas les sujets
       du mode rel et les exemples sont un peu simplistes. Recommand pour la plupart
       des utilisateurs.





    "The Practical SQL Handbook" (Le Manuel Pratique de SQL) Third
     Edition, Addison Wesley Developers Press ISBN 0-201-44787-8


       Recommand pour la plupart des utilisateurs.





    Michael Stonebraker, "Readings in Database Systems" (lectures sur
     les Systmes de Bases de Donnes), Morgan Kaufmann, 1988, ISBN
     0-934613-65-6


       Ce livre est un recueil de papiers, sur les bases de donnes, qui ont t
       publis sur plusieurs annes. Il n'est pas pour l'utilisateur occasionnel
       mais, c'est rellement une rfrence pour les tudiants en classes suprieures
       (troisime cycle) ou pour les dveloppeurs de systmes de bases de donnes.





    C.J.Date, "Relational Database - Selected Readings" (Bases de
     Donnes Relationnelles - Morceaux choisis), Addison-Wesley, 1986,
     ISBN 0-201-14196-5


       Ce livre est un recueil de papiers, sur les bases de donnes, qui ont t
       publis sur plusieurs annes. Il n'est pas pour l'utilisateur occasionnel
       mais c'est rellement une rfrence pour les tudiants en classes
       suprieures (troisime cycle) ou pour les dveloppeurs de systmes de
       bases de donnes.


    Nick Ryan and Dan Smith, "Database Systems Engineering",
     (Ingnierie de Systmes de Bases de Donnes), International Thomson
     Computer Press, 1995, ISBN 1-85032-115-9


       Ce livre traite des dtails des mthodes d'accs, et des technique de stockage.





    Bipin C. Desai, "An introduction to Database Systems", (Une
     introduction aux systmes de bases de donnes) West Publishing Co.,
     1990, ISBN 0-314-66771-7


       Il n'est pas pour l'utilisateur occasionnel mais c'est rellement une
       rfrence pour les tudiants en classes suprieures (troisime cycle)
       ou pour les dveloppeurs de systmes de bases de donnes.





    Joe Celko "INSTANT SQL Programming" (Programmation SQL IMMEDIATE)


       Wrox Press Ltd.
       Unit 16, 20 James Road, Tyseley
       Birmingham, B11 2BA, England
       1995





    Michael Gorman "Database Management Systems: Understanding and
     Applying Database" (Systmes de Gestion de Bases de Donnes :
     comprendre et appliquer les bases de donnes)


       Technology
       QED and John Wiley
       1991





    Michael Gorman "Enterprise Database for a Client/Server
     Environment" (Base de Donnes d'Entreprise pour un Environnement
     Client/Serveur) QED and John Wiley


       Prsente les exigences de construction d'applications de base de donnes
       client/server par l'intermdiaire de mta-modles d'entrept et l'utilisation
       de la norme SQL ANSI 1993





  Des centaines d'autres titres concernant SQL sont disponibles!
  Vrifiez-le dans une librairie.


  2244..44..  DDooccuummeennttss ddee SSppcciiffiiccaattiioonnss AANNSSII//IISSOO SSQQLL -- SSQQLL 11999922,, SSQQLL 11999988

  Les documents de Spcifications ANSI/ISO SQL sont situs  l'endroit
  indiqu ci-dessous.

    <http://www.naiua.org/std-orgs.html>

    <http://www.ansi.org/docs> et cliquez sur le fichier cat_c.html
     puis rechercher "Database SQL"

    Standard  SQL92  <http://www.jcc.com> et cliquez sur le fichier
     sql_stnd.html

    Spcifications ANSI/ISO SQL
     <http://www.contrib.andrew.cmu.edu/~shadow/sql.html> Vous trouverez
     la Rfrence SQL ici.

  2244..55..  SSyynnttaaxxee ddee ll''AANNSSII//IISSOO SSQQLL 11999922

  Voir l'Appendice A de ce document ``''

  2244..66..  SSyynnttaaxxee ddee ll''AANNSSII//IISSOO SSQQLL 11999988

  Les spcifications de SQL 1998 (SQL 3) sont encore en cours de
  dveloppement.  Voir le paragraphe 'Electronic Access to the SQL3
  Working Draft' de ce document document  ``''

  2244..77..  DDiiddaaccttiicciieell SSQQLL ppoouurr lleess ddbbuuttaannttss

  Voir l'Appendice B de ce document ``''

  2244..88..  EExxtteennssiioonn TTeemmppoorreellllee  SSQQLL9922


    Document pour l'Extension Temporelle  SQL-92
     <ftp://FTP.cs.arizona.edu/tsql/tsql2/>

    Spcification SQL-3 Temporelle
     <ftp://FTP.cs.arizona.edu/tsql/tsql2/sql3/>

  Ce rpertoire contient les spcifications pour une extension
  temporelle au langage SQL-92 standard. Ce nouveau langage est appel
  TSQL2.

  Les spcifications du langage prsentes ici correspondent  la
  version finale du langage.

  La correspondance doit tre adresse au bureau du Comit de Conception
  du Langage TSQL2, Richard T.Snodgrass, Department of Computer Science,
  University of Arizona, Tucson, AZ 85721,

    rts@cs.arizona.edu

     Les affiliations et les adresses lectroniques des membres du
     Comit de Conception du langage TSQL2 peuvent tre trouves, dans
     un chapitre spar,  la fin des spcifications du langage.

  Le contenu du rpertoire est le suivant :

  spec.dvi,.ps    Spcifications du langage TSQL2, publi en Septembre,
  1994

  bookspec.ps     Spcifications du langage TSQL2, telles qu'elles
  apparaissent dans le livre sur TSQL2, publi en Septembre, 1995 (voir
  ci-dessous).

  sql3            proposition de modification soumise au comits ANSI et
  ISO SQL3.

  Un ensemble de commentaires, associs aux spcifications du langage,
  parle des dcisions de conception, fournit des exemples, et traite de
  la faon dont le langage peut tre implant. Ces commentaires sont, 
  l'origine, des propositions faites au Comit de Conception du Langage
  TSQL2. Ils poursuivent actuellement un objectif diffrent: fournir des
  exemples de syntaxe, expliquer les nombreuses dcisions prises durant
  la conception du langage, et comparer TSQL2 aux nombreuses autres
  propositions de langage faites au cours des quinze dernires annes.
  Il faut insister sur le fait que ces commentaires ne font pas partie
  intgrante des spcifications du langage TSQL2 en lui-mme, mais
  plutt qu'elles le compltent et constituent un apport. Le mot de la
  fin est donn par les spcifications de TSQL2 proprement dit.

  Les commentaires, ainsi que les spcifications du langage, plusieurs
  index, et d'autres lments de support ont t publis dans un livre :

  Snodgrass, R.T., diteur, The TSQL2 Temporal Query Language, (Le
  Langage de  Requtes Temporel TSQL2) Kluwer Academic Publishers, 1995,
  674+xxiv pages.

  Les commentaires d'valuation sont donns sous forme abrge dans le
  livre; La totalit des commentaires est fournie dans le fichier
  eval.ps situ dans ce rpertoire

  Le fichier tl2tsql2.pl est un programme prolog qui traduit la logique
  temporelle autorise en TSQL2. Ce programme a t crit par Michael
  Boehlen

    boehlen@iesd.auc.dk

     On peut le contacter pour obtenir un papier qui dcrit cette
     traduction.  C'est une version tout  fait ancienne du programme.
     Les nouvelles versions sont disponibles 

    <http://www.cs.auc.dk/general/DBS/tdb/TimeCenter/Software>

     (the TimeDB and Tiger systems).

  2244..99..  PPaarrttiiee 00 -- AAccqquuiissiittiioonn ddeess DDooccuummeennttss IISSOO//AANNSSII SSQQLL

  Ce document vous explique comment acqurir (lgalement) une copie de
  la norme SQL-92 et comment acqurir une copie du Brouillon de Travail
  du SQL3 "actuel".

  La norme ANSI est protge par un copyright de l'ANSI, et la norme ISO
  par un copyright de l'ISO.

  Il y a deux (2) normes SQL courantes, une  publication ANSI et une
  publication ISO. Les deux normes sont identiques mot-pour-mot except
  pour quelques sujets triviaux tel que le titre du document, les en-
  tte de page, la phrase "International Standard" au lieu de "American
  Standard", et ainsi de suite.

  Achat du Standard SQL-92

  La norme ISO, ISO/IEC 9075:1992, Information Technology - Database
  Languages - SQL, est actuellement (Mars, 1993) disponible et en stock
   l'ANSI :





       American National Standards Institute
       1430 Broadway
       New York, NY 10018 (USA)
       Phone (sales): +1.212.642.4900




  au prix de US$ 230.00. La version ANSI, ANSI X3.135-1992, American
  National Standard for Information Systems - Database Language SQL,
  n'tait pas disponible en stock au moment de la rdaction, mais il
  devrait l'tre entre fin Mars et dbut Mai, 1993). Il devrait coter
  US$ 225.00.

  Si vous achetez l'un ou l'autre document  l'ANSI, il y aura un
  supplment de 7% pour le traitement (soit environ US$ 9.10). Les frais
  d'envoi  l'tranger accrotront sans doute le cot. ANSI exige des
  socits un document de commande crit pour chaque commande; d'un
  autre ct, vous pouvez envoyer un chque tir sur une banque US en
  dollars US, qu'ils encaisseront avant d'expdier votre commande. (Il y
  a une exception : si votre organisation est membre de l'ANSI, alors
  l'ANSI enverra les documents et une facture  votre compagnie.)

  La norme ISO est aussi disponible en dehors des tats-Unis  partir de
  reprsentations nationales locales (entits de standardisation du
  pays) qui sont membres soit de l'ISO (International Organization for
  Standardization) soit de l'IEC (International Electrotechnical
  Commission). Des copies de la liste des reprsentations nationales,
  avec leurs adresses, sont disponibles de l'ANSI ou d'autres entits
  nationales.  Ils sont aussi disponibles  l'ISO :


            International Organization for Standardization
            Central Secretariat
            1, rue de Varembi
            CH-1211 Genve 20
            Switzerland




  Si vous prfrez commander la norme d'une faon plus facile et plus
  rapide, il vous faudra payer pour ce privilge. Vous pouvez commander
  le ISO/IEC 9075:1992, Information Technology - Database Languages -
  SQL,  :


            Global Engineering Documents
            2805 McGaw Ave
            Irvine, CA 92714 (USA)
            USA
            Tlphone (accessible de partout): +1.714.261.1455
            Tlphone (uniquement aux USA): (800)854-7179




  pour un prix de US$ 308.00. Je ne sais pas si le port est compris ou
  non, mais je parierais que l'envoi international (au moins) sera en
  supplment.  Ils peuvent vous envoyer un document trs rapidement et
  acceptent mme les "plus grandes cartes de crdit". Global n'a pas
  encore la version ANSI pas plus qu'un prix ou qu'une date prvisible
  de disponibilit (bien que je l'attende dans les quelques semaines
  suivant la publication par l' ANSI et  un prix aux alentours de US$
  300.00).

  Achat d'une copie du Document de Travail SQL3

  Vous pouvez acheter une copie du document de travail SQL3 au
  secrtariat de l'ANSI X3, CBEMA (Computer and Business Equipment
  Manufacturers Association). Leur objectif est d'avoir la "plus
  rcente" version du document de travail de SQL3 disponible et de la
  vendre pour environ US$ 60.00  US$ 65.00.  Vous pouvez contacter
  CBEMA :


            CBEMA, X3 Secretariat
            Attn: Lynn Barra
            1250 Eye St.
            Suite 200
            Washington, DC 20005 (USA)




  Lynn Barra peut aussi tre contacte par tlphone au +1.202.626.5738
  pour une demande de copie, bien qu'un courrier soit probablement plus
  courtois.

  Accs lectronique au Document de Travail SQL3

  La plus rcente version ( la date de rdaction) du document de
  travail SQL3 ( la fois ANSI et ISO, et de toutes ses parties) est
  disponible par "ftp anonyme" ou par "ftpmail" sur:


            gatekeeper.dec.com

         dans

            /pub/standards/sql/




  Dans ce rpertoire , il y a de nombreux fichiers.  Ce sont des
  fichiers PostScript et "texte ordinaire" (pas trs bien formats, mais
  lisibles sur un cran sans logiciel spcifique).

  En gnral, vous pouvez trouver des fichiers avec des noms tels que :


            sql-bindings-mar94.ps
            sql-bindings-mar94.txt
            sql-cli-mar94.ps
            sql-cli-mar94.txt
            sql-foundation-mar94.ps
            sql-foundation-mar94.txt
            sql-framework-mar94.ps
            sql-framework-mar94.txt
            sql-psm-mar94.ps
            sql-psm-mar94.txt




  A mesure que de nouvelles versions des documents sont produites le
  "mar94" changera pour indiquer la nouvelle date de publication (e.g.,
  "aug94" est la date attendue de la prochaine publication suivant
  "mar94").


  De plus, pour les lecteurs ne pouvant pas obtenir une liste de
  rpertoire par FTP, nous avons ajout un fichier ayant pour nom :


            ls




  dans le mme rpertoire.  Ce fichier (surprise!) contient une liste du
  rpertoire.

  Rcuprer les Fichiers Directement par Ftp

  Voici un exemple sur la faon d'utiliser FTP. Spcifiquement, il
  montre comment se connecter  gatekeeper.dec.com, aller au rpertoire
  o le document de base est gard et  transfrer ce document sur votre
  machine. Notez que votre machine doit pouvoir accder  l'internet
  pour faire cela. Le nom de connexion est 'ftp' et le mot de passe est
  votre adresse e-mail (on appelle quelquefois cela 'ftp anonyme'). La
  commande 'type binaire' est utilise pour s'assurer qu'aucuns bits ne
  seront supprims du (des) fichier(s) reu(s). La commande 'get'
  rcupre un fichier  la fois.  Les commentaires dans le script ci-
  dessous sont placs entre les signes < ... >, < comme ceci > .


         % ftp gatekeeper.dec.com
         Connected to gatekeeper.dec.com.
         220- *** /etc/motd.ftp ***
              Gatekeeper.DEC.COM is an unsupported service of DEC Corporate Research.
              <...il en va ainsi pendant un certain temps...>
         220 gatekeeper.dec.com FTP server (Version 5.83 Sat ... 1992) ready.
         Name (gatekeeper.dec.com:<votre nom de connexion ici>): ftp  <anonyme fonctionne galement>
         331 Guest login ok, send ident as password.
         Password: <entrez votre adresse e-mail ici>
         230 Guest login ok, access restrictions apply.
         Remote system type is UNIX.  <ou autre>
         Using binary mode to transfer files.
         ftp> cd pub/standards/sql
         250 CWD command successful.
         ftp> dir
         200 PORT command successful.
         150 Opening ASCII mode data connection for /bin/ls.
         total 9529
         -r--r--r--  1 root     system     357782 Feb 25 10:18 x3h2-93-081.ps
         -r--r--r--  1 root     system     158782 Feb 25 10:19 x3h2-93-081.txt
         -r--r--r--  1 root     system     195202 Feb 25 10:20 x3h2-93-082.ps
         -r--r--r--  1 root     system      90900 Feb 25 10:20 x3h2-93-082.txt
         -r--r--r--  1 root     system    5856284 Feb 25 09:55 x3h2-93-091.ps
         -r--r--r--  1 root     system    3043687 Feb 25 09:57 x3h2-93-091.txt
         226 Transfer complete.
         ftp> type binary
         200 Type set to I.
         ftp> get x3h2-93-082.txt
         200 PORT command successful.
         150 Opening BINARY mode data connection for x3h2-93-082.txt (90900 bytes).
         226 Transfer complete.
         90900 bytes received in 0.53 seconds (166.11 Kbytes/s)
         ftp> quit
         % <le fichier est maintenant dans votre rpertoire sous le nom x3h2-93-082.txt>




  Rcupration de Fichiers Sans Faire un ftp Direct

  Digital Equipment Corporation, comme plusieurs autres compagnies,
  fournit un service de ftp par courrier lectronique. La rponse peut
  prendre plusieurs jours, mais cela fournit un service quivalent  ftp
  pour ceux qui n'ont pas un accs direct au ftp par Internet.
  L'adresse du serveur est:

  ftpmail@decwrl.dec.com

  Le script suivant rcuprera la dernire version PostScript du
  document SQL3 :


            reply joe.programmer@imaginary-corp.com
            connect gatekeeper.dec.com anonymous
            binary
            compress




  Le script suivant rcuprera la dernire version PostScript du docu
  ment SQL3 :


            reply joe.programmer@imaginary-corp.com
            connect gatekeeper.dec.com anonymous
            binary
            compress
            uuencode
            chdir /pub/standards/sql
            get x3h2-93-091.ps
            quit




  La premire ligne du script commande au serveur de vous retourner les
  fichiers demands; vous devrez remplacer "joe.programmer@imaginary-
  corp.com" par votre adresse Internet.  Le fichier x3h2-93-091.ps, dans
  cet exemple, est retourn sous forme de 34 messages e-mail spars,
  "compresss" et "uuencods". Si votre environnement ne dispose pas des
  outils pour reconstruire de tels fichiers, alors, il vous faudra
  rcuprer le fichier sous forme de texte pur en utilisant le script
  suivant:


            reply joe.programmer@imaginary-corp.com
            connect gatekeeper.dec.com anonymous
            chdir /pub/standards/sql
            get x3h2-93-091.ps
            quit




  Mais, attention, le fichier .ps vous sera probablement envoy en plus
  de 70 morceaux!

  Pour rcuprer un fichier particulier, autre que x3h2-93-091.ps,
  remplacez simplement "x3h2-93-091.ps" par le nom du fichier dsir.
  Pour obtenir la liste de tous les fichiers disponibles dans un
  rpertoire, remplacez "get x3h2-93-091.ps" par "dir".




  2244..1100..  PPaarrttiiee 11 -- EEttaatt AAccttuueell ddee ll''IISSOO//AANNSSII SSQQLL

  Ce chapitre constitue une source d'information  propos du processus
  de normalisation de SQL et de son tat actuel.

  tat Actuel

  Le dveloppement pour amliorer SQL afin d'en faire un langage complet
  pour la dfinition et la gestion d'objets persistants et complexes.
  Ceci comprend : les hirarchies de gnralisation et de
  spcialisation, l'hritage multiple, les types de donnes dfinies par
  l'utilisateur, les dclencheurs et les assertions, le support des
  systmes  base de connaissances, les requtes rcursives, et des
  outils complmentaires d'administration de donnes. Cela inclue
  galement la spcification des types de donnes abstraits (ADTs), des
  identificateurs d'objets, des mthodes, de l'hritage, du
  polymorphisme, de l'encapsulation et de tous les autres moyens
  normalement associs  la gestion d'objets.

  A l'automne 1996, plusieurs parties de SQL3 ont t soumises  un vote
  de l'ISO CD. Ce sont SQL/Framework, SQL/Foundation et SQL/Bindings.
  Ce vote choua (comme prvu) avec environ 900 commentaires. Fin
  Janvier, un comit de rdaction traita un grand nombre de solutions
  aux problmes qui furent soit incluses avec les commentaires du vote
  ou soumises en tant que documents spars. Depuis le comit de
  rdaction DBL n'a pas pu traiter tous les commentaires et sa dure a
  t augmente. La fin du comit de rdaction est prvue pour la fin
  Juillet 1997,  Londres.


  A la suite du comit de rdaction de Juillet, on attend qu'un vote
  final du CD soit demand pour ces parties de SQL. Le processus du CD
  Final prendra environ 6 mois et un comit de rdaction du DBL, aprs
  lesquels il y aura un vote IS et un trs rapide vote IS.

  Les procdures ISO ont chang depuis SQL/92, et les comits SQL
  travaillent encore selon les rgles du processus.

  Si tout va bien, ces parties du SQL3 deviendront une norme officielle
  ISO/IEC en fin 1998, mais le programme est trs serr.

  En 1993, les comits de dveloppement ANSI et ISO ont dcid de
  d'clater le dveloppement futur de SQL en une norme multi-parties.
  Ces parties sont :


    Partie 1: Structure Description non technique de la manire dont le
     document doit tre structur.

    Partie 2: Base Spcifications de base, incluant toutes les
     nouvelles fonctionnalits ADT.

    Partie 3: SQL/CLI Interface du niveau appel (Call Level Interface).

    Partie 4: SQL/PSM Spcifications des procdures enregistres

    Partie 5: SQL/Bindings SQL Dynamique et SQL Embedded SQL liens
     venant de SQL-92.

    Partie 6: SQL/XA Une spcialisation de l'interface populaire XA
     dveloppe par X/Open

    Partie 7:SQL/Temporal Ajoute les capacits lies au temps  la
     norme SQL.


  Aux  USA, la totalit de SQL3 est en cours de traitement  la fois
  comme projet ("D") national et comme projet ISO. La fin de SQL3 est
  attendue pour courant 1999.

  Le SQL/CLI et le SQL/PSM sont en cours de traitement aussi rapidement
  que possible comme addenda  SQL-92. Aux USA, ils sont traits
  uniquement comme projet International. SQL/CLI a t termin en 1995.
  SQL/PSM devrait tre termin fin 1996.

  En plus du travail sur SQL3, quelques projets additionnels sont
  poursuivis :


    SQL/MM Un effort en cours pour dfinir une norme multi-media
     utilisant les possibilits de SQL3 ADT.

    Accs aux donnes  distance (RDA)

  Comits et Processus de Standardisation

  Il y a effectivement de nombreux comits de normalisation de par le
  monde. Il y a un groupe international de normalisation SQL faisant
  partie de l'ISO. Un certain nombre de pays on des comits qui se
  consacrent  SQL. Ces pays (habituellement) envoient des reprsentants
  aux runions ISO/IEC JTC1/SC 21/WG3 DBL. Les pays qui participent
  activement au processus de normalisation ISO SQL sont :


    Australie

    Brsil

    Canada

    France

    Allemagne

    Japon

    Core

    Pays-Bas

    Angleterre

    tats-Unis

  Validation NIST

  Les implmentations SQL sont valides (aux tats-Unis) par le National
  Institute of Standards and Testing (NIST). Le NIST possde une suite
  de tests de validation pour le niveau de base SQL-92. Les dtails
  exacts des exigences de la validation NIST sont dfinis comme un
  Federal Information Processing Standard (FIPS). Les exigences
  actuelles pour SQL sont dfinies dans le document FIPS 127-2. Les
  versions Postscript et Texte de ce document peuvent tre obtenues au
  NIST. La Liste des Produits Valids  jour peut galement tre obtenue
  au NIST.

  Publications et Articles sur le Standard SQL

  Il y a deux versions de la norme SQL. Les deux sont disponibles 
  l'ANSI:


    ISO/IEC 9075:1992, "Information Technology --- Database Languages
     --- SQL"

    ANSI X3.135-1992, "Database Language SQL"

  Les deux versions de la norme SQL sont identiques sauf la page de
  garde et les rfrences aux autres normes. Les deux versions sont
  disponibles au :


            American National Standards Institute
            1430 Broadway
            New York, NY 10018
            USA
            Tlphone (ventes): +1.212.642.4900




  En supplment  la norme SQL-92, il y a maintenant un Technical Corri
  gendum (correction d'erreurs) :


          * Technical Corrigendum 1:1994 to ISO/IEC 9075:1992




  Le TC 1 doit aussi tre disponible  l'ANSI. Il n'y a qu'une version
  du TC 1 -- qui s'applique  la fois aux versions ISO et ANSI de
  SQL-92.

  En supplment  ces normes, plusieurs livres ont t crits sur la
  norme SQL 1992. Ces livrent donnent une description bien plus lisible
  de la norme que celle donne par le norme elle-mme.

  Standards connexes

  Un certain nombre d'autres normes prsentent de l'intrt pour la
  communaut SQL. Cette section contient des pointeurs donnant des
  informations sur ces efforts. Ces pointeurs seront plus nombreux 
  mesure que des informations complmentaires seront disponibles sur le
  web.


    SQL Environnements (FIPS 193) - (Environnements SQL)

    Next Generation Repository Systems (X3H4) - (Systmes Dpositaires
     de la Prochaine Gnration) Une version des Nouvelles appelant 
     une participation au "Dveloppement des Standards pour les Systmes
     Dpositaires de la Prochaine Gnration."

  2244..1111..  PPaarrttiiee 22 -- FFoonnddeemmeennttss IISSOO//AANNSSII SSQQLL

  Une partie importante de l'effort pour SQL3 rside dans le document de
  base SQL :


    Capacits de Base SQL/PSM (venant de SQL/PSM-92)

    Nouveaux types de donnes

    Dclencheurs

    Sous-tables

    Types de Donnes Abstraits (ADT)

    Capacits Orientes Objets

  Il y a plusieurs pr-requis pour les capacits orientes objets :


    Capacit de pouvoir dfinir des oprations complexes

    Stockage des oprations complexes dans la base de donnes

    Appels de Procdures Externes  Quelques oprations peuvent ne pas
     exister dans SQL ou peuvent ncessiter des interactions externes

  Ces capacits sont dfinies comme faisant partie de SQL/PSM

  Une grande quantit de travail est en cours de ralisation pour
  affiner le modle objet SQL-3 et l'aligner sur le modle objet propos
  par l'ODMG. Cet effort est dcrit dans les papiers X3H2 et ISO DBL :
  Accommoder SQL3 et ODMG. Une mise  jour rcente sur le Fusionneur
  SQL3/OQL est galement disponible.

  Planification de SQL3

  Le travail sur SQL3 se poursuit normalement, mais la publication de la
  norme finale se situe encore  un horizon de plusieurs annes.


    Le vote International pour passer du Brouillon de Travail au
     Brouillon du Comit (CD) aura lieu  l'automne 1996.

    On s'attend  ce que le vote gnre de nombreux commentaires

    Un second vote sera probablement ncessaire

    Le vote pour le Brouillon du Standard International devrait avoir
     lieu  la mi-1998

    Le Standard International doit tre termin  la mi-1999.

     Le programme de la version ANSI sera similaire.

  2244..1122..  PPaarrttiiee 33 -- IInntteerrffaaccee dd''AAppppeell SSQQLL IISSOO//AANNSSII

  SQL/CLI est une interface de programmation d'appel pour les bases de
  donnes SQL.  Il est conu pour accder aux bases de donnes  partir
  d'applications fermes.  CLI a,  l'origine, t cr par un sous-
  comit du groupe SQL Access (SAG).  Les spcifications de SAG/CLI ont
  t publies, en 1992, en tant que spcifications Microsoft Open
  DataBase Connectivity (ODBC) en 1992. En 1993, le SAG a soumis le CLI
  aux comits ANSI et ISO SQL. (Le groupe "SQL Access Group" a
  maintenant t fusionn avec le consortium X/Open.)

  SQL/CLI fournit une norme internationale pour :


    Un CLI dpendant de l'implmentation pour accder aux bases de
     donnes SQL

    Des outils Client-serveur pour accder facilement  une base de
     donnes au moyen de Bibliothques de Lien Dynamique

    Supporter et encourager un riche ensemble d'outils Client-serveur

  Planification de SQL/CLI

  Le processus de normalisation de SQL/CLI se poursuit  une vitesse
  aveuglante.


    SQL/CLI est un addendum  la norme SQL de 1992 (SQL-92)

    Achev comme norme ISO en 1995

    ISO/IEC 9075-3:1995 Information technology -- Database languages --
     SQL -- Partie 3: Call-Level Interface (SQL/CLI)

    L'effort actuel porte sur l'ajout des fonctionnalits SQL3 
     SQL/CLI

  2244..1133..  PPaarrttiiee 44 -- MMoodduulleess MMmmoorriissss PPeerrssiissttaannttss IISSOO//AANNSSII SSQQLL

  SQL/PSM tend SQL en ajoutant :


    Des extensions de langage procdural

    Des procdures mmorises multi-instructions

    Des appels de procdures et de fonctions externes

  SQL/PSM apporte, en plus du fait d'tre un bon outil de dveloppement
  d'application, une base pour des fonctionnalits orientes objet dans
  SQL3.

  Procdures mmorises et multi-instructions

  Multi-instructions et procdures mmorises offrent une grande varit
  d'avantages dans un environnement client/serveur :


    Performance - Puisqu'une procdure mmorise peut effectuer de
     multiples instructions SQL, les interactions sur le rseau, avec le
     client, sont rduites.

    Scurit - On peut donner  un utilisateur le droit d'appeler une
     procdure mmorise qui met  jour une table ou un ensemble de
     tables mais lui refuser le droit de mettre  jour les tables
     directement

    Code partag - Le code d'une procdure mmorise n'a pas  tre
     rcrit ni re-test pour chaque outil d'un client qui accde  la
     base de donnes.

    Contrle - Fournit un point unique de dfinition et de contrle
     dans la logique de l'application.

  Extensions de Langage Procdural

  Le langage procdural ajoute la puissance d'un langage de
  programmation traditionnel  SQL grce  des instructions de contrle
  de flot et  d'autres constructions utilises en programmation.

  Instructions de contrle de flot


    If-then-else  (si-alors-sinon)

    Instructions de boucle

    Prise en compte de erreurs

    Instruction de choix multiple (Case)

    Blocks (Begin-End blocks)

  Les extensions de langage procdural comprennent d'autres
  constructions des langages de programmation :


    Dclaration des variables

    Instructions d'affectation de valeur

    Lecture de diagnostiques sur les processus et l'tat

  De plus, toutes les instructions SQL traditionnelles peuvent tre
  inclues dans de procdures multi-instructions.

  Appels de Fonctions et de Procdures externes

  Une fonctionnalit souvent mentionne dans la liste des souhaits pour
  de nombreuses base de donnes et produits et qui est implmente dans
  quelques-uns, est la capacit de pouvoir augmenter les fonctionnalits
  du logiciel de base de donnes d'origine par des appels  des
  procdures externes crites par les utilisateurs.


    Cela permet  un site ou a une application en particulier d'ajouter
     leurs propres fonctions base de donnes

    Peuvent tre utilises tout au long des applications bases de
     donnes

  Le bnfice de cette capacit est de donner accs, pour la base de
  donnes (et, par l, aux applications base de donnes),  un riche
  ensemble de procdures et de fonctions trop nombreuses pour tre
  dfinies par un comit de normalisation.

  Planification de SQL/PSM

  SQL/PSM volue rapidement :


    SQL/PSM est un addendum  SQL-92

    Un vote international pour faire passer SQL/PSM de Brouillon de
     Norme Internationale  Norme Internationale s'est achev en fin
     janvier 1996.

    Une runion de travail en mai 1996 n'a pas apport de solution 
     tous les commentaires

    La poursuite de la runion de travail du PSM est programme du 30
     septembre au 4 octobre 1996

    Le programme est serr, mais il y a des chances que le PSM le
     publie en 1996.

    Sa dsignation officielle sera : ISO/IEC DIS 9075-4:199?
     Information technology -- Database languages -- SQL -- Partie 4:
     SQL Persistent Stored Modules (SQL/PSM)

    L'ajout du support de SQL/PSM dans les fonctionnalits de SQL3 est
     en bonne voie.



  2244..1144..  PPaarrttiiee 55 -- IISSOO//AANNSSII SSQQLL//LLiieennss

  Pour en faciliter l'accs, la description des liens avec le langage de
  programmation a t mise dans un document spar. La version actuelle
  consiste simplement en un extrait concernant les liens dynamiques et
  intgrs de SQL-92.

  Un certain nombre de sujets concernant les liens avec le langage de
  programmation restent en suspens.

  Pour les langage de programmation traditionnels, il existe des
  transformations pour les types de donnes de SQL-92. Cependant, des
  transformations doivent tre dfinis entre les objets SQL et les
  variables des langages de programmation.

  Pour les langages orients objets, la transformation doit tre dfinie
  pour les types de donnes courants SQL et entre le modle objet SQL et
  le modle objet du langage orient objet.

  Le modle objet doit se stabiliser avant de rsoudre ces problmes.

  Les liens avec le langage feront partie intgrante de SQL3.

  2244..1155..  PPaarrttiiee 66 -- IInntteerrffaaccee ddee SSppcciiaalliissaattiioonn ((SSQQLL//XXAA)) IISSOO//AANNSSII SSQQLL
  XXAA))

  Cette spcification devrait normaliser l'interface de programmation
  d'application (API) entre un Gestionnaire de Transaction global et le
  Gestionnaire de Ressources SQL. Il devrait normaliser les appels de
  fonction, en s'appuyant sur la smantique de l'ISO/IEC 10026,
  "Distributed Transaction Processing", qu'un Gestionnaire de Ressources
  SQL devrait supporter pour la validation en deux phases. Le document
  de base est driv d'une publication de l'X/Open, avec sa permission,
  qui spcifie explicitement les paramtres d'entre, de sortie et la
  smantique, en termes de types de donnes SQL, pour les fonctions
  suivantes : xa_close, xa_commit, xa_complete, xa_end, xa_forget,
  xa_open, xa_prepare, xa_recover, xa_rollback, et xa_start.

  ISO essaye actuellement de coller aux spcifications XA de l'X/Open.
  Ce processus de suivi, au plus prs, consiste  adopter les
  spcifications de l'industrie sans changements. Le vote pour l'XA 
  l'ISO SC21, JTC 1 a dbut le 27 avril 1995 et se termine le 27
  octobre 1995. Si les spcifications XA sont approuves par 75% des
  votants, et par 2/3 des membres participants de JTC 1, cela deviendra
  une Norme Internationale. Si le vote est approuv, SQL/XA pourrait
  devenir une norme en 1996.

  2244..1166..  PPaarrttiiee 77 -- IISSOO//AANNSSII SSQQLL TTeemmppoorreell

  Le SQL Temporel traite des donnes en relation avec le temps.
  Conceptuellement, cela consiste  dire qu'il est utile d'aller
  chercher des donnes pour dcouvrir l'allure qu'elles avaient  un
  certain moment. L'origine du SQL Temporel rside dans un papier de
  dcembre 1994 de Rick Snodgrass qui en dcrivait les concepts.

  X3 Annonce l'Approbation d'un Nouveau Projet, ISO/IEC 9075 Partie 7 :
  SQL/Temporel est un communiqu de presse concernant le SQL/Temporel.


       ----------------------------------------------------------------------------
                                       SQL Temporel
                                       ************
       Rick Snodgrass (Prsident du comit TSQL2)
       31-Dec-1994


  Plusieurs personnes se sont pos la question de la ncessit de la
  prise en charge de la gestion du temps dans SQL3 (comme cela a t
  propos par DBL RIO-75, demandant qu'une nouvelle partie de SQL prenne
  en charge les bases de donnes temporelles). Le sentiment est que les
  types de donnes abstraits (ADT) sont suffisants pour grer les ques
  tions de temps. Dans ce papier, je dmontre, par des exemples con
  crets, que l'utilisation de colonnes types, avec des types de donnes
  abstraits, est inadapte pour des requtes temporelles.  En partic
  ulier, beaucoup de requtes temporelles courantes sont soit difficiles
   simuler en SQL, soit ncessitent d'intgrer SQL dans un langage
  procdural. Des solutions alternatives sont exposes dans TSQL2, une
  extension temporelle  SQL-92.

  2244..1166..11..  IINNTTRROODDUUCCTTIIOONN

  La prise en charge d'un instant de validit va au-del de celle de
  types de donnes temporels abstraits (ADT temporel). Avec ce dernier,
  on spcifie qu'une colonne sera celle consacre au domaine temporel,
  tel que la DATE ou un INTERVALLE (je donnerai des exemples bientt).
  Avec un instant de validit, les lignes d'une table varient en
  fonction du temps, refltant les modifications de la ralit. Le
  timbre dateur associ  une ligne d'une table  instant de validit
  est interprt par le langage d'interrogation comme l'instant o la
  combinaison des valeurs dans les colonnes d'une ligne tait valide.
  Ce timbre dateur implicite permet d'exprimer des requtes de manire
  simple et intuitive.

  2244..1166..22..  TTUUDDEE DDEE CCAASS -- EENNRREEGGIISSTTRREEMMEENNTT DDEE LL''IINNFFOORRMMAATTIIOONN CCOOUURRAANNTTEE

  Le bureau du personnel (BP) salari de l'universit de l'Arizona
  possde un certain nombre d'informations, dans une base de donnes,
  dont le nom de chaque employ, son salaire actuel ainsi que son titre.
  On peut reprsenter cela dans une simple table.


               Employee(Name, Salary, Title)




  tant donn cette table, retrouver le salaire d'un employ est une
  opration aise.


               SELECT Salary
               FROM Employee
               WHERE Name = 'Bob'




  Maintenant, le BP souhaite enregistrer les dates de naissance. Pour ce
  faire, on ajoute une colonne  la table, ce qui donne le schma suiv
  ant.


               Employee(Name, Salary, Title, DateofBirth DATE)




  Retrouver la date de naissance d'un employ est analogue  retrouver
  son salaire.



          SELECT DateofBirth
          FROM Employee
          WHERE Name = 'Bob'




  2244..1166..33..  TTUUDDEE DDEE CCAASS -- EENNRREEGGIISSTTRREEMMEENNTT DDEE LL''IINNFFOORRMMAATTIIOONN HHIISSTTOORRIIQQUUEE

  Le BP souhaite informatiser l'historique de l'emploi. Pour ce faire,
  ils ajoutent deux colonnes, l'une pour indiquer quand l'information
  contenue dans le ligne est devenue valide, l'autre indiquant la fin de
  validit de cette information.

  Employee (Name, Salary, Title, DateofBirth, Start DATE, Stop DATE)

  Pour le modle de donnes, ces nouvelles colonnes sont identiques  la
  date de naissance. Cependant, leur prsence  des consquences 
  grande chelle.

  2244..1166..44..  TTUUDDEE DDEE CCAASS -- PPRROOJJEECCTTIIOONN

  Pour trouver le salaire actuel d'un salari, les choses sont plus
  difficiles.


               SELECT Salary
               FROM Employee
               WHERE Name = 'Bob' AND Start <= CURRENT_DATE AND CURRENT_DATE <= Stop




  Cette requte est plus complique que la prcdente. Le coupable se
  situe, de toute vidence, dans ces deux nouvelles colonnes. Le BP veut
  fournir  chaque employ l'historique de leur salaire. Pour chaque
  personne, spcifiquement, il est ncessaire de dterminer les inter
  valles correspondants  chacun des salaires. Malheureusement, cela
  n'est pas possible en SQL. Un employ peut avoir un nombre arbitraire
  de changements de titre entre deux changements de salaire.


       Name    Salary  Title             DateofBirth   Start           Stop
       ----    ------  -----             -----------   -----           ----
       Bob     60000   Assistant Provost 1945-04-09    1993-01-01      1993-05-30
       Bob     70000   Assistant Provost 1945-04-09    1993-06-01      1993-09-30
       Bob     70000   Provost           1945-04-09    1993-10-01      1994-01-31
       Bob     70000   Professor         1945-04-09    1994-02-01      1994-12-31

                                      Figure 1




  Notez qu'il y a trois lignes pour lesquelles le salaire de Bob reste
  constant  $ 70,000. De l, le rsultat sera de deux lignes pour Bob.


       Name    Salary  Start           Stop
       ----    ------  -----           ----
       Bob     60000   1993-01-01      1993-05-30
       Bob     70000   1993-06-01      1994-12-31




  Une alternative est de donner  l'utilisateur une dition des informa
  tions Salaire et Titre, et de laisser l'utilisateur dterminer quand
  son salaire a chang. Cette alternative n'est ni trs attirante ni
  trs raliste. Une seconde alternative est d'utiliser SQL autant que
  possible.


       CREATE TABLE Temp(Salary, Start, Stop)
       AS      SELECT Salary, Start, Stop
               FROM Employee;




  rpter


               UPDATE Temp T1
               SET (T1.Stop) = (SELECT MAX(T2.Stop)
                                FROM Temp AS T2
                                WHERE T1.Salary = T2.Salary AND T1.Start < T2.Start
                                       AND T1.Stop >= T2.Start AND T1.Stop < T2.Stop)
               WHERE EXISTS (SELECT *
                             FROM Temp AS T2
                             WHERE T1.Salary = T2.Salary AND T1.Start < T2.Start
                                       AND T1.Stop >= T2.Start AND T1.Stop < T2.Stop)
               jusqu' ce qu'aucune ligne ne soit mise  jour;

       DELETE FROM Temp T1

       WHERE EXISTS (SELECT *
                     FROM Temp AS T2
                     WHERE T1.Salary = T2.Salary
                               AND ((T1.Start > T2.Start AND T1.Stop <= T2.Stop)
                               OR (T1.Start >= T2.Start AND T1.Stop < T2.Stop))




  La boucle trouve des intervalles qui se chevauchent ou sont adjacents
  et, doivent donc tre fusionns. La boucle est excute log N fois
  dans le pire des cas, o N est le nombre de lignes dans une chane de
  lignes de valeur quivalente qui se chevauchent ou sont adjacentes. Le
  lecteur peut simuler cette requte sur la table de l'exemple pour se
  convaincre de sa vrit.

  Une troisime alternative consiste  utiliser SQL uniquement pour
  ouvrir un curseur sur la table. Une liste chane de priodes est
  entretenue, chacune avec un salaire. La liste chane doit tre
  initialise vide.


       DECLARE emp_cursor CURSOR FOR
               SELECT Salary, Title, Start, Stop
               FROM Employee;
       OPEN emp_cursor;
       boucle:
               FETCH emp_cursor INTO :salary, :start, :stop;
               si pas-de-donnes est retourn alors aller  fin;
               trouver la position dans la liste chane pour insrer cette information;
               aller  boucle;
       fin:
       CLOSE emp_cursor;



  Rpter tout au long de la liste chane, dition des dates et des
  salaires

  La liste chane peut ne pas tre ncessaire au cas o le curseur est
  ORDER BY Start.

  Dans tous les cas, la requte, tout ce qu'il y a de naturelle, est
  tout  fait difficile  exprimer en utilisant les possibilits
  offertes par SQL-92. La requte est triviale en TSQL2.


               SELECT Salary
               FROM Employee




  2244..1166..55..  TTUUDDEE DDEE CCAASS -- JJOOIINNTTUURREE

  Une approche plus drastique consiste  viter le problme d'extraction
  de l'historique du salaire en rorganisant le schma pour sparer les
  informations de salaire, de titre, et de date de naissance (dans ce
  qui suit, nous ignorerons la date de naissance pour raison de
  simplicit).


               Employee1 (Name, Salary, Start DATE, Stop DATE)
               Employee2 (Name, Title, Start DATE, Stop DATE)




  La table Employee1 est la suivante.


       Name    Salary  Start           Stop
       ----    ------  -----           ----
       Bob     60000   1993-01-01      1993-05-30
       Bob     70000   1993-06-01      1993-12-31




  Voici un exemple de la table Employee2.


       Name    Title                   Start           Stop
       ----    ------                  -----           ----
       Bob     Assistant Provost       1993-01-01      1993-09-30
       Bob     Provost                 1993-10-01      1994-01-31
       Bob     Professor               1994-02-01      1994-12-31




  Avec cette modification, aller chercher l'information de salaire d'un
  employ devient maintenant facile.


               SELECT Salary, Start, Stop
               FROM Employee1
               WHERE Name = 'Bob'




  Mais qu'en est-il si le BP veut une table des salaires, des inter
  valles de titre (c'est--dire, supposons que le BP veuille qu'une
  table soit calcule dans la forme de la Figure 1)? Une alternative est
  d'diter les deux tables, et de laisser l'utilisateur en calculer les
  combinaisons. Une seconde alternative est d'utiliser entirement SQL.
  Malheureusement, cette requte doit faire une tude de cas sur la
  manire dont chaque ligne de Employee1 se chevauche avec chaque ligne
  de Employee2; il y a quatre cas possibles.


       SELECT Employee1.Name, Salary, Dept, Employee1.Start, Employee1.Stop
       FROM Employee1, Employee2
       WHERE Employee1.Name = Employee2.Name
            AND Employee2.Start <= Employee1.Start AND Employee1.Stop < Employee2.Stop
       UNION
       SELECT Employee1.Name, Salary, Dept, Employee1.Start, Employee2.Stop
       FROM Employee1, Employee2
       WHERE Employee1.Name = Employee2.Name
            AND Employee1.Start >= Employee2.Start AND Employee2.Stop < Employee1.Stop
               AND Employee1.Start < Employee2.Stop
       UNION
       SELECT Employee1.Name, Salary, Dept, Employee2.Start, Employee1.Stop
       FROM Employee1, Employee2
       WHERE Employee1.Name = Employee2.Name
            AND Employee2.Start > Employee1.Start AND Employee1.Stop < Employee2.Stop
               AND Employee2.Start < Employee1.Stop
       UNION
       SELECT Employee1.Name, Salary, Dept, Employee2.Start, Employee2.Stop
       FROM Employee1, Employee2
       WHERE Employee1.Name = Employee2.Name
            AND Employee2.Start > Employee1.Start AND Employee2.Stop < Employee1.Stop




  Prendre en compte, d'une faon correcte, tous les cas constitue une
  tche qui relve du challenge. En TSQL2, raliser une jointure tem
  porelle correspond simplement  ce que l'on peut esprer.


               SELECT Employee1.Name, Salary, Dept
               FROM Employee1, Employee2
               WHERE Employee1.Name = Employee2.Name




  2244..1166..66..  TTUUDDEE DDEE CCAASS -- AAGGRRGGAATTSS

  Maintenant, on demande au BP quel est le salaire maximum ? Avant
  d'ajouter les donnes de temps, c'tait facile.


               SELECT MAX(Salary)
               FROM Employee




  Maintenant que l'historique du salaire est enregistr, nous obtien
  drons quelque chose comme l'historique du salaire maximum  travers le
  temps. Le problme est que, naturellement, SQL ne fournit pas
  d'agrgats temporels. Le moyen simple de raliser cela consiste 
  diter l'information, et  chercher,  la main, le maximum. Une alter
  native consiste  tre plus astucieux et  convertir l'instantan de
  la requte agrge en une requte non agrge, puis  convertir le
  rsultat en requte temporelle. La requte non agrge retrouve les
  salaires pour lesquels un salaire plus lev n'existe pas.


               SELECT Salary
               FROM Employee AS E1
               WHERE NOT EXISTS (SELECT *
                                 FROM Employee AS E2
                                 WHERE E2.Salary > E1.Salary)




  Convertir cette requte en une requte temporelle est loin d'tre
  vident. Ce qui suit constitue une approche possible.


       CREATE TABLE Temp (Salary, Start, Stop)
       AS      SELECT Salary, Start, Stop
               FROM Employee;
       INSERT INTO Temp
               SELECT T.Salary, T.Start, E.Start
               FROM Temp AS T, Employee AS E
               WHERE E.Start >= T.Start AND E.Start < T.Stop AND E.Salary > T.Salary;

       INSERT INTO Temp
               SELECT T.Salary, T.Stop, E.Stop
               FROM Temp AS T, Employee AS E
               WHERE E.Stop > T.Start AND E.Stop <= T.Stop AND E.Salary > T.Salary;
       DELETE FROM Temp T
       WHERE EXISTS (SELECT *
                     FROM Employee AS E
                     WHERE ((T.Start => E.Start AND T.Start < E.Stop)
                               OR (E.Start >= T.Start AND E.Start < T.Stop))
                           AND E.Salary > T.Salary;




  Cette approche cre une table auxiliaire. Nous ajoutons  cette table
  la priode infrieure soustraite d'une priode et la partie suprieure
  soustraite d'une priode. Nous supprimons alors toutes les priodes
  qui se chevauchent avec une ligne dfinie dans la sous-requte, de ce
  fait ralisant le NOT EXISTS(n'existe pas). Finalement nous gnrons 
  partir de la table auxiliaire les priodes maximales, de la mme faon
  que l'information de salaire avait t calcule ci-dessus. Comme on
  peut l'imaginer, un tel code SQLest extrmement inefficace 
  l'excution, compte tenu des requtes complexes imbriques contenant
  des prdicats d'ingalit.

  Une troisime alternative consiste  utiliser le moins possible SQL,
  et plutt de calculer le maximum dsir dans un langage hte en
  utilisant des curseurs.

  La requte en TSQL2 est de nouveau simple et intuitive.


               SELECT MAX(Salary)
               FROM Employee







  2244..1166..77..  RRSSUUMM

  Dans la plupart des applications de base de donnes on manipule des
  donnes qui changent en fonction du temps. La prise en compte de
  l'instant de validit est absente de SQL. Beaucoup de requtes
  temporelles ordinaires sont difficiles  simuler en SQL, ou requirent
  du SQL intgr dans un langage procdural, ceci tant d au manque de
  support des tables avec instant de validit dans son modle de donnes
  et dans la structure des requtes.

  Ailleurs, nous avons montr que l'ajout du support de l'instant de
  validit ne requiert que peu de modifications dans l'implmentation
  des SGDB, peut radicalement simplifier un certain nombre de requtes
  et en permettre d'autres, et peut, plus tard, permettre des
  optimisations dans les structures de mmoires, les mthodes
  d'indexation et les stratgies d'optimisation qui peuvent entraner
  des amliorations notables dans les performances.

  Avec une nouvelle partie de SQL3 supportant les informations qui
  varient avec le temps, permettant une meilleure gestion des donnes
  temporelles par SQL3, nous pouvons commencer  apporter une rponse 
  de telles application.


       ----------------------------------------------------------------------------
                  Comit de Normalisation Accrdit* X3, Technologie de L'Information
       COMMUNIQUE

       Doc. No.:       PR/96-0002

       Reply to:       Barbara Bennett at bbennett@itic.nw.dc.us

                    X3 Annonce l'approbation d'un Nouveau Projet, ISO/IEC

                                9075 Partie 7:  SQL/Temporal

       Washington D.C., Janvier 1996
       ----------------------------------------------------------------------------




  -- Le Comit de Normalisation Accrdit X3, Technologie de l'Informa
  tion, annonce l'approbation d'un nouveau projet concernant le support
  de SQL/Temporel , ISO/IEC 9075 Partie 7, le travail devant tre
  ralis au sein du Comit Technique X3H2, Bases de Donnes.  Cette
  proposition de norme concerne un nouvelle partie de la norme naissante
  SQL3, e.g., Partie 7, SQL Temporel, et spcifie les extensions au lan
  gage SQL pour grer le stockage, l'extraction et la manipulation des
  donnes temporelles dans un environnement de base de donnes SQL.

  La prochaine runion du comit X3H2 est planifi pour la priode du 11
  au 14 Mars 1996 dans le Kansas.

  Les questions concernant ce projet doivent tre envoyes au prsident
  de X3H2 :


               Chairman of X3H2,
               Dr. Donald R. Deutsch,
               Sybase, Inc., Suite 800,
               6550 Rock Spring
               Drive, Bethesda, MD  20817.
               Email: deutsch@sybase.com.


  Un appel initial pour de possibles brevets ou autres sujets pertinents
  (copyrights, trademarks) est sur le point d'tre mis. Soumettez, s'il
  vous plat, les informations  ce propos au secrtariat de X3  :


               X3 Secretariat
               1250 Eye Street
               NW, Suite 200,
               Washington DC  20005.
               Email: x3sec@itic.nw.dc.us
               FAX:  (202)638-4922.




  2244..1177..  PPaarrttiiee 88 -- SSQQLL MMUULLTTIIMMEEDDIIAA IISSOO//AANNSSII ((SSQQLL//MMMM))

  Un nouveau projet international de normalisation ISO/IEC pour le
  dveloppement d'une bibliothque de classe SQL pour les applications
  multi-media a t approuv dbut 1993. Cette nouvelle activit de
  normalisation, appele SQL Multi-media (SQL/MM), spcifiera les
  paquetages de dfinition de types de donnes abstraites SQL (ADT) en
  utilisant les fonctions fournies dans les spcifications SQL3
  naissantes pour ADT.  SQL/MM a pour objectif de normaliser des
  bibliothques de classes pour la science et l'ingnierie, le
  traitement des textes et des documents, ainsi que des mthodes pour la
  gestion d'objets multi-media tels que les images, les sons, les
  animations, la musique et la vido. Il fournira vraisemblablement un
  lien entre le langage SQL et les objets multi-media dfinis par les
  autres entits de normalisation du JTC1 (e.g. SC18 pour les documents,
  SC24 pour les images, et SC29 pour les photographies et les images
  animes).

  Le Plan du Projet pour SQL/MM prvoit que ce sera une norme multi-
  parties dont le nombre de parties pourra voluer. La partie 1
  consistera en un cadre spcifiant comment les autres parties doivent
  tre architectur.  Chacune de ces autres parties sera consacre  un
  paquetage d'application SQL spcifique. En aot 1994, la structure
  existante tait la suivante :


    Partie 1: Cadre - Description non technique de la manire dont le
     document est structur.

    Partie 2: Mthodes pour le Texte et ADT (types de donnes
     abstraits) pour le traitement des textes. Environ 45 pages.

    Partie 3: Mthodes Spatiales et ADT pour la gestion des donnes
     spatiales Environ 200 pages avec l'active contribution d'experts en
     Donnes Spatiales de 3 entits nationales.

    Partie 4: Mthode  Usage Gnral et ADT pour les nombres
     complexes, et des fonctionnalits incluant la trigonomtrie et les
     fonctions exponentielles les vecteurs, les ensembles etc.
     Actuellement environ 90 pages.

  On assiste  des efforts de normalisation dans le domaine des
  informations Spatiales et Gographiques :


    ANSI X3L1 - Systmes d'Information Gographique.  Mark Ashworth de
     Unisys est charg de la liaison entre X3L1 et ANSI X3H2. Il est
     galement le rdacteur des parties 1, 3, and 4 du brouillon de
     SQL/MM.


    ISO TC 211 - Information gographique/Gomatique.

  2255..  SSuuppppoorrtt TTeecchhnniiqquuee ppoouurr PPoossttggrreeSSQQLL

  Si vous avez des questions techniques ou si vous rencontrez des
  problmes vous pouvez envoyer un courrier lectronique  :

    pgsql-questions@postgresql.org

     et vous recevrez par courrier lectronique une rponse dans la
     journe qui suit.  Comme le nombre de produits internet est trs
     large, et que les utilisateurs aident les autres utilisateurs,
     internet est capable d'apporter facilement un support technique 
     des millions d'utilisateurs. Le support par Email est de loin
     beaucoup plus adapt que celui effectu par tlphone car on peut
     rcuprer les messages d'erreur, les sorties de programme etc... et
     les transmettre facilement dans les listes de diffusion ou les
     forums.

  Dans un futur proche, l'organisation PostgreSQL vendra un support
  technique aux petites et grandes compagnies, les revenus de cette
  activit serviront  entretenir plusieurs sites miroirs (web et ftp)
  partout dans le monde. Ces revenus pourront aussi servir  crer une
  documentation imprime, des guides, des livres pour aider les clients.
  Les profits seront galement utiliss  construire des
  immeubles/salles de classe et  offrir des cours techniques sur
  l'administration et la gestion des bases de donnes et  organiser des
  confrences annuelles pour les utilisateurs.  Ceci devrait aider
  l'organisation PostgreSQL  se dbrouiller toute seule.

  Vous pouvez aussi vous faire aider par des socits de conseil
  professionnelles telles que Anderson, WGS (Work Group Solutions). Pour
  de l'aide, puisqu'ils ont une trs bonne expertise en "C", "C++"
  (PostgreSQL est crit en "C"), contactez les  -

    Work Group Solutions  <http://www.wgs.com>

    Anderson Consulting  <http://www.ac.com>

  2266..  AAssppeeccttss ccoonnoommiiqquueess eett CCoommmmeerrcciiaauuxx

  Les bases de donnes commerciales paient de nombreuses taxes telles
  que des taxes fdrales, d'tat, sur les ventes, sur les salaris, la
  scurit sociale, les taxes pour les soins mdicaux, des indemnits
  pour les employs, des cots de marketing et de publicit. Tous ces
  cots ne sont pas destins directement au dveloppement de la base de
  donne. Quand vous achetez une base de donnes commerciale une partie
  du montant est destin aux taxes, aux dpenses de recherche et
  dveloppement ( R&D ). Donc la valeur relle pour la base de donnes
  est beaucoup plus faible.

  De plus les bases de donnes commerciales doivent payer pour leurs
  immeubles/biens et pour l'achat de machines Unix, leur installation et
  leur maintenance. Tous ces cots sont rpercuts sur les clients.

  PostgreSQL possde l'avantage, sur les bases de donnes commerciales,
  de ne pas supporter de taxes puisque dveloppe sur l'internet. Un
  trs grand nombre de personnes contribuent  son dveloppement. Par
  exemple, cas hypothtique, s'il y a un million de compagnies aux U.S.A
  et que chacune contribue pour environ $ 10 (en valeur de logiciel pour
  PostgreSQL) alors, chaque compagnie recevra dix millions de dollars!!
  C'est cela la
   GGRRAANNDDEE MMAAGGIIEE  du dveloppement sur internet.

  Actuellement, le code source de PostgreSQL est constitu d'environ 200
  000 lignes de code "C" et "C++". Si le cot de chaque ligne de code
  "C" est valu  $ 10, alors le cot total de PostgreSQL, tel qu'il
  est aujourd'hui est de $ 2 000 000 (deux millions de dollars!!).

  De nombreuses compagnies ont dj dvelopp de grandes quantits de
  code "C", "C++" maison. Donc, en prenant le code source de PostgreSQL
  et en collaborant avec les autres compagnies sur internet, cela leur
  bnficierait beaucoup en leur faisant conomiser du temps et des
  efforts.

  2277..  LLiissttee ddeess aauuttrree BBaasseess ddee DDoonnnneess

  On trouvera ci-dessous la liste des autres bases de donnes SQL pour
  Unix, Linux.

    Cliquez et allez  Applications->databases.
     <http://www.caldera.com/tech-ref/linuxapps/linapps.html>

    Cliquez et allez  Applications->databases.
     <http://www.xnet.com/~blatura/linapps.shtml>

    Ressources pour Bases de Donnes <http://linas.org/linux/db.html>

    Liste des Bases de Donnes libres
     <http://cuiwww.unige.ch:80/~scg/FreeDB/FreeDB.list.html>

    Liste des SGBDR de Browne <http://www.hex.net/~cbbrowne/rdbms.html>
     crit par Christopher B. Browne cbbrowne@hex.net

    Liste des SGBDR de SAL <http://SAL.KachinaTech.COM/H/1/>

    Liste des SGBD Orients Objets de SAL
     <http://SAL.KachinaTech.COM/H/2/>

    Liste des Utilitaires et d'Autres SGDB de SAL
     <http://SAL.KachinaTech.COM/H/3/>

    Index des Logiciels de Base de Donnes Publics  de l'ACM SIGMOD
     <http://bunny.cs.uiuc.edu/sigmod/databaseSoftware/>

  2288..  IInnddiiccaattiioonnss ppoouurr llaa rreecchheerrcchhee ssuurr llee WWoorrlldd WWiiddee WWeebb IInntteerrnneett

  Internet est immense, recle un trs grand nombre de logiciels et un
  ocan d'informations. Il s'accrot  la vitesse de 500% par an. On
  estime le nombre de sites Web  environ 90 million dans le monde
  entier!

  Utilisez des moteurs de recherche tels que "Yahoo", "Netscape",
  "Lycos" etc. pour trouver une information. Allez sur Yahoo, et cliquez
  sur recherche. Utilisez les options de filtrage pour affiner vos
  critres de recherche. La mthode de recherche par dfaut consiste en
  une "recherche intelligente" qui est plus gnrale et donne toutes les
  possibilits. Cliquez sur "Options" et slectionnez la recherche par
  "EXACT phrase" , par "AND" , par "OR" , etc... De cette manire vous
  trouverez l'information que vous cherchez beaucoup plus rapidement.
  Dans le menu de recherche, il y a galement des boutons pour une
  recherche dans Usenet, dans les sites Web et les sites Yahoo.

  2299..  CCoonncclluussiioonn

  Aprs avoir cherch toutes les bases de donnes disponibles qui soient
  libres et dont le code source soit disponible, j'ai trouv que SEUL
  PostgreSQL, le SGBDR (Relationnel Objet)SQL libre, est le PLUS mature
  et le plus largement utilis au monde. PostgreSQL est trs attractif
  en ce que beaucoup de travail a dj t effectu et qu'il possde des
  pilotes ODBC et JDBC permettant d'crire des applications
  indpendantes des bases de donnes. Les applications crites en
  PostgreSQL qui utilisent les pilotes ODBC, JDBC sont facilement
  portables sur d'autres systmes tels que Oracle, Sybase et Informix et
  vice versa.

  Vous pouvez vous demander "Mais pourquoi PostgreSQL ?" La rponse 
  cela est que puisqu'il faut pas mal de temps pour dvelopper un
  systme de gestion de base de donnes ex nihilo, il est plus
  raisonnable d'en utiliser un qui satisfasse aux conditions suivantes -

  Un systme de gestion de base de donnes

    Dont le code source soit disponible, ce doit tre un systme 
     "code source ouvert"

    Qui ne ncessite pas de licence, qui n'a pas de doits de proprit

    Qui puisse tre distribu sur internet

    Qui a ncessit plusieurs annes de dveloppement.

    Qui satisfasse des standards tels que ISO/ANSI SQL 92 (and SQL 89)

    Qui puisse rpondre aux besoins futurs telles que SQL 3 (SQL 98)

    Qui possde des fonctionnalits avances

     Et, justement, il appert que c'est 'PostgreSQL' qui rpond  tous
     ces critres et que c'est un logiciel appropri dans ce cas.

  3300..  FFAAQQ -- QQuueessttiioonnss ssuurr PPoossttggrreeSSQQLL

  Veuillez vous rfrer  la dernire version de la FAQ pour les
  questions gnrales, celles concernant Linux et Irix  :

    <http://www.postgresql.org/docs/faq-english.shtml>

  3311..  NNoottiiccee ddee CCooppyyrriigghhtt

  Copyright (c) 1997 Al Dev (Alavoor Vasudevan). Tous droits rservs.

  AUCUNE RESPONSABILIT NE SAURAIT TRE RETENUE POUR DES DOMMAGES
  CONSCUTIFS A L'UTILISATION DE TOUT OU PARTIE DE CE DOCUMENT. En aucun
  cas l'auteur ou le traducteur de ce document ne pourra tre tenu pour
  responsable vis--vis de de qui que ce soit pour tous dommages quels
  qu'ils soient (y compris et sans limitation, spcial, fortuit,
  conscutif, blessures directes ou indirectes pour les personnes,
  pertes financires dues au manque  gagner,  l'interruption
  d'activit, pertes d'informations commerciales  ou toutes autres
  pertes financires) rsultant de l'utilisation de ce document.

  L'auteur et le traducteur n'offrent aucunes garanties sur
  l'adquation, l'utilit ou la valeur marchande de ce document. Les
  marques, les compagnies et les noms de produits mentionns dans ce
  document sont des marques de fabrique ou des marques dposes de leurs
  propritaires respectifs. Veuillez vous rfrer aux notices de
  copyright individuelles des marques, compagnies et produits mentionns
  dans ce document. Il est de votre responsabilit de lire et de
  comprendre les notices de copyright des
  organisations/compagnies/produits/auteurs mentionns dans ce document
  avant d'utiliser leurs informations respectives.

  AAFF..  AAppppeennddiiccee AA -- SSyynnttaaxxee ddee ll'' AANNSSII//IISSOO SSQQLL 11999922




  Ce fichier contient la grammaire en BNF du langage, arborescence
  explore d'abord en profondeur, ralise le 27-AOT-1992 11:03:41.64.
  La version spcifique de BNF donne ici est :
  ANSI et SQL2-seulement.


  <SQL terminal character> ::=
        <SQL language character>
      | <SQL embedded language character>

  <SQL language character> ::=
        <simple Latin letter>
      | <digit>
      | <SQL special character>

  <simple Latin letter> ::=
        <simple Latin upper case letter>
      | <simple Latin lower case letter>

  <simple Latin upper case letter> ::=
            A | B | C | D | E | F | G | H | I | J | K | L | M | N | O
      | P | Q | R | S | T | U | V | W | X | Y | Z

  <simple Latin lower case letter> ::=
            a | b | c | d | e | f | g | h | i | j | k | l | m | n | o
      | p | q | r | s | t | u | v | w | x | y | z

  <digit> ::=
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

  <SQL special character> ::=
        <space>
      | <double quote>
      | <percent>
      | <ampersand>
      | <quote>
      | <left paren>
      | <right paren>
      | <asterisk>
      | <plus sign>
      | <comma>
      | <minus sign>
      | <period>
      | <solidus>
      | <colon>
      | <semicolon>
      | <less than operator>
      | <equals operator>
      | <greater than operator>
      | <question mark>
      | <underscore>
      | <vertical bar>

  <space> ::= !! <EMPHASIS>(space character in character set in use)

  <double quote> ::= "

  <percent> ::= %

  <ampersand> ::= &

  <quote> ::= '

  <left paren> ::= (

  <right paren> ::= )
  <asterisk> ::= *

  <plus sign> ::= +

  <comma> ::= ,

  <minus sign> ::= -

  <period> ::= .

  <solidus> ::= /

  <colon> ::= :

  <semicolon> ::= ;

  <less than operator> ::= <

  <equals operator> ::= =

  <greater than operator> ::= >

  <question mark> ::= ?

  <underscore> ::= _

  <vertical bar> ::= |

  <SQL embedded language character> ::=
        <left bracket>
      | <right bracket>

  <left bracket> ::= [

  <right bracket> ::= ]

  <token> ::=
        <nondelimiter token>
      | <delimiter token>

  <nondelimiter token> ::=
        <regular identifier>
      | <key word>
      | <unsigned numeric literal>
      | <national character string literal>
      | <bit string literal>
      | <hex string literal>

  <regular identifier> ::= <identifier body>

  <identifier body> ::=
      <identifier start> [ ( <underscore> | <identifier part> )... ]

  <identifier start> ::= <EMPHASIS>(!! See the Syntax Rules)

  <identifier part> ::=
        <identifier start>
      | <digit>

  <key word> ::=
        <reserved word>
      | <non-reserved word>

  <reserved word> ::=
        ABSOLUTE | ACTION | ADD | ALL
      | ALLOCATE | ALTER | AND
      | ANY | ARE
      | AS | ASC
      | ASSERTION | AT
      | AUTHORIZATION | AVG
      | BEGIN | BETWEEN | BIT | BIT_LENGTH
      | BOTH | BY
      | CASCADE | CASCADED | CASE | CAST
      | CATALOG
      | CHAR | CHARACTER | CHAR_LENGTH
      | CHARACTER_LENGTH | CHECK | CLOSE | COALESCE
      | COLLATE | COLLATION
      | COLUMN | COMMIT
      | CONNECT
      | CONNECTION | CONSTRAINT
      | CONSTRAINTS | CONTINUE
      | CONVERT | CORRESPONDING | COUNT | CREATE | CROSS
      | CURRENT
      | CURRENT_DATE | CURRENT_TIME
      | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR
      | DATE | DAY | DEALLOCATE | DEC
      | DECIMAL | DECLARE | DEFAULT | DEFERRABLE
      | DEFERRED | DELETE | DESC | DESCRIBE | DESCRIPTOR
      | DIAGNOSTICS
      | DISCONNECT | DISTINCT | DOMAIN | DOUBLE | DROP
      | ELSE | END | END-EXEC | ESCAPE
      | EXCEPT | EXCEPTION
      | EXEC | EXECUTE | EXISTS
      | EXTERNAL | EXTRACT
      | FALSE | FETCH | FIRST | FLOAT | FOR
      | FOREIGN | FOUND | FROM | FULL
      | GET | GLOBAL | GO | GOTO
      | GRANT | GROUP
      | HAVING | HOUR
      | IDENTITY | IMMEDIATE | IN | INDICATOR
      | INITIALLY | INNER | INPUT
      | INSENSITIVE | INSERT | INT | INTEGER | INTERSECT
      | INTERVAL | INTO | IS
      | ISOLATION
      | JOIN
      | KEY
      | LANGUAGE | LAST | LEADING | LEFT
      | LEVEL | LIKE | LOCAL | LOWER
      | MATCH | MAX | MIN | MINUTE | MODULE
      | MONTH
      | NAMES | NATIONAL | NATURAL | NCHAR | NEXT | NO
      | NOT | NULL
      | NULLIF | NUMERIC
      | OCTET_LENGTH | OF
      | ON | ONLY | OPEN | OPTION | OR
      | ORDER | OUTER
      | OUTPUT | OVERLAPS
      | PAD | PARTIAL | POSITION | PRECISION | PREPARE
      | PRESERVE | PRIMARY
      | PRIOR | PRIVILEGES | PROCEDURE | PUBLIC
      | READ | REAL | REFERENCES | RELATIVE | RESTRICT
      | REVOKE | RIGHT
      | ROLLBACK | ROWS
      | SCHEMA | SCROLL | SECOND | SECTION
      | SELECT
      | SESSION | SESSION_USER | SET
      | SIZE | SMALLINT | SOME | SPACE | SQL | SQLCODE
      | SQLERROR | SQLSTATE
      | SUBSTRING | SUM | SYSTEM_USER
      | TABLE | TEMPORARY
      | THEN | TIME | TIMESTAMP
      | TIMEZONE_HOUR | TIMEZONE_MINUTE
      | TO | TRAILING | TRANSACTION
      | TRANSLATE | TRANSLATION | TRIM | TRUE
      | UNION | UNIQUE | UNKNOWN | UPDATE | UPPER | USAGE
      | USER | USING
      | VALUE | VALUES | VARCHAR | VARYING | VIEW
      | WHEN | WHENEVER | WHERE | WITH | WORK | WRITE
      | YEAR
      | ZONE

  <non-reserved word> ::=

        ADA
      | C | CATALOG_NAME
      | CHARACTER_SET_CATALOG | CHARACTER_SET_NAME
      | CHARACTER_SET_SCHEMA | CLASS_ORIGIN | COBOL | COLLATION_CATALOG
      | COLLATION_NAME | COLLATION_SCHEMA | COLUMN_NAME | COMMAND_FUNCTION
      | COMMITTED
      | CONDITION_NUMBER | CONNECTION_NAME | CONSTRAINT_CATALOG | CONSTRAINT_NAME
      | CONSTRAINT_SCHEMA | CURSOR_NAME
      | DATA | DATETIME_INTERVAL_CODE
      | DATETIME_INTERVAL_PRECISION | DYNAMIC_FUNCTION
      | FORTRAN
      | LENGTH
      | MESSAGE_LENGTH | MESSAGE_OCTET_LENGTH | MESSAGE_TEXT | MORE | MUMPS
      | NAME | NULLABLE | NUMBER
      | PASCAL | PLI
      | REPEATABLE | RETURNED_LENGTH | RETURNED_OCTET_LENGTH | RETURNED_SQLSTATE
      | ROW_COUNT
      | SCALE | SCHEMA_NAME | SERIALIZABLE | SERVER_NAME | SUBCLASS_ORIGIN
      | TABLE_NAME | TYPE
      | UNCOMMITTED | UNNAMED

  <unsigned numeric literal> ::=
        <exact numeric literal>
      | <approximate numeric literal>

  <exact numeric literal> ::=
        <unsigned integer> [ <period> [ <unsigned integer> ] ]
      | <period> <unsigned integer>

  <unsigned integer> ::= <digit>...

  <approximate numeric literal> ::= <mantissa> E <exponent>

  <mantissa> ::= <exact numeric literal>

  <exponent> ::= <signed integer>

  <signed integer> ::= [ <sign> ] <unsigned integer>

  <sign> ::= <plus sign> | <minus sign>

  <national character string literal> ::=
      N <quote> [ <character representation>... ] <quote>
        [ ( <separator>... <quote> [ <character representation>... ] <quote> )... ]

  <character representation> ::=
        <nonquote character>
      | <quote symbol>

  <nonquote character> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <quote symbol> ::= <quote><quote>

  <separator> ::= ( <comment> | <space> | <newline> )...

  <comment> ::=
      <comment introducer> [ <comment character>... ] <newline>

  <comment introducer> ::= <minus sign><minus sign>[<minus sign>...]

  <comment character> ::=
        <nonquote character>
      | <quote>

  <newline> ::= !! <EMPHASIS>(implementation-defined end-of-line indicator)

  <bit string literal> ::=
      B <quote> [ <bit>... ] <quote>
        [ ( <separator>... <quote> [ <bit>... ] <quote> )... ]

  <bit> ::= 0 | 1

  <hex string literal> ::=
      X <quote> [ <hexit>... ] <quote>
        [ ( <separator>... <quote> [ <hexit>... ] <quote> )... ]

  <hexit> ::= <digit> | A | B | C | D | E | F | a | b | c | d | e | f

  <delimiter token> ::=
        <character string literal>
      | <date string>
      | <time string>
      | <timestamp string>
      | <interval string>
      | <delimited identifier>
      | <SQL special character>
      | <not equals operator>
      | <greater than or equals operator>
      | <less than or equals operator>
      | <concatenation operator>
      | <double period>
      | <left bracket>
      | <right bracket>

  <character string literal> ::=
      [ <introducer><character set specification> ]
      <quote> [ <character representation>... ] <quote>
        [ ( <separator>... <quote> [ <character representation>... ] <quote> )... ]

  <introducer> ::= <underscore>

  <character set specification> ::=
        <standard character repertoire name>
      | <implementation-defined character repertoire name>
      | <user-defined character repertoire name>
      | <standard universal character form-of-use name>
      | <implementation-defined universal character form-of-use name>

  <standard character repertoire name> ::= <character set name>

  <character set name> ::= [ <schema name> <period> ]
        <SQL language identifier>

  <schema name> ::=
      [ <catalog name> <period> ] <unqualified schema name>

  <catalog name> ::= <identifier>

  <identifier> ::=
      [ <introducer><character set specification> ] <actual identifier>

  <actual identifier> ::=
        <regular identifier>
      | <delimited identifier>

  <delimited identifier> ::=
      <double quote> <delimited identifier body> <double quote>

  <delimited identifier body> ::= <delimited identifier part>...

  <delimited identifier part> ::=
        <nondoublequote character>
      | <doublequote symbol>

  <nondoublequote character> ::= <EMPHASIS>(!! See the Syntax Rules)

  <doublequote symbol> ::= <double quote><double quote>

  <unqualified schema name> ::= <identifier>

  <SQL language identifier> ::=
      <SQL language identifier start>
         [ ( <underscore> | <SQL language identifier part> )... ]

  <SQL language identifier start> ::= <simple Latin letter>

  <SQL language identifier part> ::=
        <simple Latin letter>
      | <digit>

  <implementation-defined character repertoire name> ::=
      <character set name>

  <user-defined character repertoire name> ::= <character set name>

  <standard universal character form-of-use name> ::=
      <character set name>

  <implementation-defined universal character form-of-use name> ::=
      <character set name>

  <date string> ::=
      <quote> <date value> <quote>

  <date value> ::=
      <years value> <minus sign> <months value>
          <minus sign> <days value>

  <years value> ::= <datetime value>

  <datetime value> ::= <unsigned integer>

  <months value> ::= <datetime value>

  <days value> ::= <datetime value>

  <time string> ::=
      <quote> <time value> [ <time zone interval> ] <quote>

  <time value> ::=
      <hours value> <colon> <minutes value> <colon> <seconds value>

  <hours value> ::= <datetime value>

  <minutes value> ::= <datetime value>

  <seconds value> ::=
        <seconds integer value> [ <period> [ <seconds fraction> ] ]

  <seconds integer value> ::= <unsigned integer>

  <seconds fraction> ::= <unsigned integer>

  <time zone interval> ::=
      <sign> <hours value> <colon> <minutes value>

  <timestamp string> ::=
      <quote> <date value> <space> <time value>
          [ <time zone interval> ] <quote>

  <interval string> ::=
      <quote> ( <year-month literal> | <day-time literal> ) <quote>

  <year-month literal> ::=
        <years value>
      | [ <years value> <minus sign> ] <months value>

  <day-time literal> ::=
        <day-time interval>
      | <time interval>

  <day-time interval> ::=
      <days value>
        [ <space> <hours value> [ <colon> <minutes value>
          [ <colon> <seconds value> ] ] ]

  <time interval> ::=
        <hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ]
      | <minutes value> [ <colon> <seconds value> ]
      | <seconds value>

  <not equals operator> ::= <>

  <greater than or equals operator> ::= >=

  <less than or equals operator> ::= <=

  <concatenation operator> ::= ||

  <double period> ::= ..

  <module> ::=
      <module name clause>
      <language clause>
      <module authorization clause>
      [ <temporary table declaration>... ]
      <module contents>...

  <module name clause> ::=
      MODULE [ <module name> ]
        [ <module character set specification> ]

  <module name> ::= <identifier>

  <module character set specification> ::=
      NAMES ARE <character set specification>

  <language clause> ::=
      LANGUAGE <language name>

  <language name> ::=
      ADA | C | COBOL | FORTRAN | MUMPS | PASCAL | PLI

  <module authorization clause> ::=
        SCHEMA <schema name>
      | AUTHORIZATION <module authorization identifier>
      | SCHEMA <schema name>
            AUTHORIZATION <module authorization identifier>

  <module authorization identifier> ::=
      <authorization identifier>

  <authorization identifier> ::= <identifier>

  <temporary table declaration> ::=
      DECLARE LOCAL TEMPORARY TABLE
          <qualified local table name>
        <table element list>
        [ ON COMMIT ( PRESERVE | DELETE ) ROWS ]

  <qualified local table name> ::=
      MODULE <period> <local table name>

  <local table name> ::= <qualified identifier>

  <qualified identifier> ::= <identifier>

  <table element list> ::=
        <left paren> <table element> [ ( <comma> <table element> )... ] <right paren>

  <table element> ::=
        <column definition>
      | <table constraint definition>

  <column definition> ::=
      <column name> ( <data type> | <domain name> )
      [ <default clause> ]
      [ <column constraint definition>... ]
      [ <collate clause> ]

  <column name> ::= <identifier>

  <data type> ::=
        <character string type>
             [ CHARACTER SET <character set specification> ]
      | <national character string type>
      | <bit string type>
      | <numeric type>
      | <datetime type>
      | <interval type>

  <character string type> ::=
        CHARACTER [ <left paren> <length> <right paren> ]
      | CHAR [ <left paren> <length> <right paren> ]
      | CHARACTER VARYING <left paren> <length> <right paren>
      | CHAR VARYING <left paren> <length> <right paren>
      | VARCHAR <left paren> <length> <right paren>

  <length> ::= <unsigned integer>

  <national character string type> ::=
        NATIONAL CHARACTER [ <left paren> <length> <right paren> ]
      | NATIONAL CHAR [ <left paren> <length> <right paren> ]
      | NCHAR [ <left paren> <length> <right paren> ]
      | NATIONAL CHARACTER VARYING <left paren> <length> <right paren>
      | NATIONAL CHAR VARYING <left paren> <length> <right paren>
      | NCHAR VARYING <left paren> <length> <right paren>

  <bit string type> ::=
        BIT [ <left paren> <length> <right paren> ]
      | BIT VARYING <left paren> <length> <right paren>

  <numeric type> ::=
        <exact numeric type>
      | <approximate numeric type>

  <exact numeric type> ::=
        NUMERIC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | DECIMAL [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | DEC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | INTEGER
      | INT
      | SMALLINT

  <precision> ::= <unsigned integer>

  <scale> ::= <unsigned integer>

  <approximate numeric type> ::=
        FLOAT [ <left paren> <precision> <right paren> ]
      | REAL
      | DOUBLE PRECISION

  <datetime type> ::=
        DATE
      | TIME [ <left paren> <time precision> <right paren> ]
            [ WITH TIME ZONE ]
      | TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
            [ WITH TIME ZONE ]

  <time precision> ::= <time fractional seconds precision>

  <time fractional seconds precision> ::= <unsigned integer>

  <timestamp precision> ::= <time fractional seconds precision>

  <interval type> ::= INTERVAL <interval qualifier>

  <interval qualifier> ::=
        <start field> TO <end field>
      | <single datetime field>

  <start field> ::=
      <non-second datetime field>
          [ <left paren> <interval leading field precision> <right paren> ]

  <non-second datetime field> ::= YEAR | MONTH | DAY | HOUR
      | MINUTE

  <interval leading field precision> ::= <unsigned integer>

  <end field> ::=
        <non-second datetime field>
      | SECOND [ <left paren> <interval fractional seconds precision> <right paren> ]

  <interval fractional seconds precision> ::= <unsigned integer>

  <single datetime field> ::=
        <non-second datetime field>
            [ <left paren> <interval leading field precision> <right paren> ]
      | SECOND [ <left paren> <interval leading field precision>
            [ <comma> <interval fractional seconds precision> ] <right paren> ]

  <domain name> ::= <qualified name>

  <qualified name> ::=
      [ <schema name> <period> ] <qualified identifier>

  <default clause> ::=
        DEFAULT <default option>

  <default option> ::=
        <literal>
      | <datetime value function>
      | USER
      | CURRENT_USER
      | SESSION_USER
      | SYSTEM_USER
      | NULL

  <literal> ::=
        <signed numeric literal>
      | <general literal>

  <signed numeric literal> ::=
      [ <sign> ] <unsigned numeric literal>

  <general literal> ::=
        <character string literal>
      | <national character string literal>
      | <bit string literal>
      | <hex string literal>
      | <datetime literal>
      | <interval literal>

  <datetime literal> ::=
        <date literal>
      | <time literal>
      | <timestamp literal>

  <date literal> ::=
      DATE <date string>

  <time literal> ::=
      TIME <time string>

  <timestamp literal> ::=
      TIMESTAMP <timestamp string>

  <interval literal> ::=
      INTERVAL [ <sign> ] <interval string> <interval qualifier>

  <datetime value function> ::=
        <current date value function>
      | <current time value function>
      | <current timestamp value function>

  <current date value function> ::= CURRENT_DATE

  <current time value function> ::=
        CURRENT_TIME [ <left paren> <time precision> <right paren> ]

  <current timestamp value function> ::=
        CURRENT_TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]

  <column constraint definition> ::=
      [ <constraint name definition> ]
      <column constraint>
        [ <constraint attributes> ]

  <constraint name definition> ::= CONSTRAINT <constraint name>
  <constraint name> ::= <qualified name>

  <column constraint> ::=
        NOT NULL
      | <unique specification>
      | <references specification>
      | <check constraint definition>

  <unique specification> ::=
      UNIQUE | PRIMARY KEY

  <references specification> ::=
      REFERENCES <referenced table and columns>
        [ MATCH <match type> ]
        [ <referential triggered action> ]

  <referenced table and columns> ::=
       <table name> [ <left paren> <reference column list> <right paren> ]

  <table name> ::=
        <qualified name>
      | <qualified local table name>

  <reference column list> ::= <column name list>

  <column name list> ::=
      <column name> [ ( <comma> <column name> )... ]

  <match type> ::=
        FULL
      | PARTIAL

  <referential triggered action> ::=
        <update rule> [ <delete rule> ]
      | <delete rule> [ <update rule> ]

  <update rule> ::= ON UPDATE <referential action>

  <referential action> ::=
        CASCADE
      | SET NULL
      | SET DEFAULT
      | NO ACTION

  <delete rule> ::= ON DELETE <referential action>

  <check constraint definition> ::=
      CHECK
          <left paren> <search condition> <right paren>

  <search condition> ::=
        <boolean term>
      | <search condition> OR <boolean term>

  <boolean term> ::=
        <boolean factor>
      | <boolean term> AND <boolean factor>

  <boolean factor> ::=
      [ NOT ] <boolean test>

  <boolean test> ::=
      <boolean primary> [ IS [ NOT ]
            <truth value> ]

  <boolean primary> ::=
        <predicate>
      | <left paren> <search condition> <right paren>

  <predicate> ::=
        <comparison predicate>
      | <between predicate>
      | <in predicate>
      | <like predicate>
      | <null predicate>
      | <quantified comparison predicate>
      | <exists predicate>
      | <unique predicate>
      | <match predicate>
      | <overlaps predicate>

  <comparison predicate> ::=
      <row value constructor> <comp op>
          <row value constructor>

  <row value constructor> ::=
         <row value constructor element>
      | <left paren> <row value constructor list> <right paren>
      | <row subquery>

  <row value constructor element> ::=
        <value expression>
      | <null specification>
      | <default specification>

  <value expression> ::=
        <numeric value expression>
      | <string value expression>
      | <datetime value expression>
      | <interval value expression>

  <numeric value expression> ::=
        <term>
      | <numeric value expression> <plus sign> <term>
      | <numeric value expression> <minus sign> <term>

  <term> ::=
        <factor>
      | <term> <asterisk> <factor>
      | <term> <solidus> <factor>

  <factor> ::=
      [ <sign> ] <numeric primary>

  <numeric primary> ::=
        <value expression primary>
      | <numeric value function>

  <value expression primary> ::=
        <unsigned value specification>
      | <column reference>
      | <set function specification>
      | <scalar subquery>
      | <case expression>
      | <left paren> <value expression> <right paren>
      | <cast specification>

  <unsigned value specification> ::=
        <unsigned literal>
      | <general value specification>

  <unsigned literal> ::=
        <unsigned numeric literal>
      | <general literal>

  <general value specification> ::=
        <parameter specification>
      | <dynamic parameter specification>
      | <variable specification>
      | USER
      | CURRENT_USER
      | SESSION_USER
      | SYSTEM_USER
      | VALUE

  <parameter specification> ::=
      <parameter name> [ <indicator parameter> ]

  <parameter name> ::= <colon> <identifier>

  <indicator parameter> ::=
      [ INDICATOR ] <parameter name>

  <dynamic parameter specification> ::= <question mark>

  <variable specification> ::=
      <embedded variable name> [ <indicator variable> ]

  <embedded variable name> ::=
      <colon><host identifier>

  <host identifier> ::=
        <Ada host identifier>
      | <C host identifier>
      | <COBOL host identifier>
      | <Fortran host identifier>
      | <MUMPS host identifier>
      | <Pascal host identifier>
      | <PL/I host identifier>

  <Ada host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <C host identifier> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <COBOL host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <Fortran host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <MUMPS host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <Pascal host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <PL/I host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <indicator variable> ::=
      [ INDICATOR ] <embedded variable name>

  <column reference> ::= [ <qualifier> <period> ] <column name>

  <qualifier> ::=
        <table name>
      | <correlation name>

  <correlation name> ::= <identifier>

  <set function specification> ::=
        COUNT <left paren> <asterisk> <right paren>
      | <general set function>

  <general set function> ::=
        <set function type>
            <left paren> [ <set quantifier> ] <value expression> <right paren>

  <set function type> ::=
      AVG | MAX | MIN | SUM | COUNT

  <set quantifier> ::= DISTINCT | ALL

  <scalar subquery> ::= <subquery>

  <subquery> ::= <left paren> <query expression> <right paren>

  <query expression> ::=
        <non-join query expression>
      | <joined table>

  <non-join query expression> ::=
        <non-join query term>
      | <query expression> UNION  [ ALL ]
            [ <corresponding spec> ] <query term>
      | <query expression> EXCEPT [ ALL ]
            [ <corresponding spec> ] <query term>

  <non-join query term> ::=
        <non-join query primary>
      | <query term> INTERSECT [ ALL ]
            [ <corresponding spec> ] <query primary>

  <non-join query primary> ::=
        <simple table>
      | <left paren> <non-join query expression> <right paren>

  <simple table> ::=
        <query specification>
      | <table value constructor>
      | <explicit table>

  <query specification> ::=
      SELECT [ <set quantifier> ] <select list> <table expression>

  <select list> ::=
        <asterisk>
      | <select sublist> [ ( <comma> <select sublist> )... ]

  <select sublist> ::=
        <derived column>
      | <qualifier> <period> <asterisk>

  <derived column> ::= <value expression> [ <as clause> ]

  <as clause> ::= [ AS ] <column name>

  <table expression> ::=
      <from clause>
      [ <where clause> ]
      [ <group by clause> ]
      [ <having clause> ]

  <from clause> ::= FROM <table reference>
      [ ( <comma> <table reference> )... ]

  <table reference> ::=
        <table name> [ [ AS ] <correlation name>
            [ <left paren> <derived column list> <right paren> ] ]
      | <derived table> [ AS ] <correlation name>
            [ <left paren> <derived column list> <right paren> ]
      | <joined table>

  <derived column list> ::= <column name list>

  <derived table> ::= <table subquery>

  <table subquery> ::= <subquery>

  <joined table> ::=
        <cross join>
      | <qualified join>
      | <left paren> <joined table> <right paren>

  <cross join> ::=
      <table reference> CROSS JOIN <table reference>

  <qualified join> ::=
      <table reference> [ NATURAL ] [ <join type> ] JOIN
        <table reference> [ <join specification> ]

  <join type> ::=
        INNER
      | <outer join type> [ OUTER ]
      | UNION

  <outer join type> ::=
        LEFT
      | RIGHT
      | FULL

  <join specification> ::=
        <join condition>
      | <named columns join>

  <join condition> ::= ON <search condition>

  <named columns join> ::=
      USING <left paren> <join column list> <right paren>

  <join column list> ::= <column name list>

  <where clause> ::= WHERE <search condition>

  <group by clause> ::=
      GROUP BY <grouping column reference list>

  <grouping column reference list> ::=
      <grouping column reference>
          [ ( <comma> <grouping column reference> )... ]

  <grouping column reference> ::=
      <column reference> [ <collate clause> ]

  <collate clause> ::= COLLATE <collation name>

  <collation name> ::= <qualified name>

  <having clause> ::= HAVING <search condition>

  <table value constructor> ::=
      VALUES <table value constructor list>

  <table value constructor list> ::=
      <row value constructor> [ ( <comma> <row value constructor> )... ]

  <explicit table> ::= TABLE <table name>

  <query term> ::=
        <non-join query term>
      | <joined table>

  <corresponding spec> ::=
      CORRESPONDING [ BY <left paren> <corresponding column list> <right paren> ]

  <corresponding column list> ::= <column name list>

  <query primary> ::=
        <non-join query primary>
      | <joined table>

  <case expression> ::=
        <case abbreviation>
      | <case specification>

  <case abbreviation> ::=
        NULLIF <left paren> <value expression> <comma>
              <value expression> <right paren>
      | COALESCE <left paren> <value expression>
              ( <comma> <value expression> )... <right paren>

  <case specification> ::=
        <simple case>
      | <searched case>

  <simple case> ::=
      CASE <case operand>
        <simple when clause>...
        [ <else clause> ]
      END

  <case operand> ::= <value expression>

  <simple when clause> ::= WHEN <when operand> THEN <result>

  <when operand> ::= <value expression>

  <result> ::= <result expression> | NULL

  <result expression> ::= <value expression>

  <else clause> ::= ELSE <result>

  <searched case> ::=
      CASE
        <searched when clause>...
        [ <else clause> ]
      END

  <searched when clause> ::= WHEN <search condition> THEN <result>

  <cast specification> ::=
      CAST <left paren> <cast operand> AS
          <cast target> <right paren>

  <cast operand> ::=
        <value expression>
      | NULL

  <cast target> ::=
        <domain name>
      | <data type>

  <numeric value function> ::=
        <position expression>
      | <extract expression>
      | <length expression>

  <position expression> ::=
      POSITION <left paren> <character value expression>
          IN <character value expression> <right paren>

  <character value expression> ::=
        <concatenation>
      | <character factor>

  <concatenation> ::=
      <character value expression> <concatenation operator>
          <character factor>

  <character factor> ::=
      <character primary> [ <collate clause> ]

  <character primary> ::=
        <value expression primary>
      | <string value function>

  <string value function> ::=
        <character value function>
      | <bit value function>

  <character value function> ::=
        <character substring function>
      | <fold>
      | <form-of-use conversion>
      | <character translation>
      | <trim function>

  <character substring function> ::=
      SUBSTRING <left paren> <character value expression> FROM <start position>
                  [ FOR <string length> ] <right paren>

  <start position> ::= <numeric value expression>

  <string length> ::= <numeric value expression>

  <fold> ::= ( UPPER | LOWER )
       <left paren> <character value expression> <right paren>

  <form-of-use conversion> ::=
      CONVERT <left paren> <character value expression>
          USING <form-of-use conversion name> <right paren>

  <form-of-use conversion name> ::= <qualified name>

  <character translation> ::=
      TRANSLATE <left paren> <character value expression>
          USING <translation name> <right paren>

  <translation name> ::= <qualified name>

  <trim function> ::=
      TRIM <left paren> <trim operands> <right paren>

  <trim operands> ::=
      [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>
  <trim specification> ::=
        LEADING
      | TRAILING
      | BOTH

  <trim character> ::= <character value expression>

  <trim source> ::= <character value expression>

  <bit value function> ::=
      <bit substring function>

  <bit substring function> ::=
      SUBSTRING <left paren> <bit value expression> FROM <start position>
          [ FOR <string length> ] <right paren>

  <bit value expression> ::=
        <bit concatenation>
      | <bit factor>

  <bit concatenation> ::=
      <bit value expression> <concatenation operator> <bit factor>

  <bit factor> ::= <bit primary>

  <bit primary> ::=
        <value expression primary>
      | <string value function>

  <extract expression> ::=
      EXTRACT <left paren> <extract field>
          FROM <extract source> <right paren>

  <extract field> ::=
        <datetime field>
      | <time zone field>

  <datetime field> ::=
        <non-second datetime field>
      | SECOND

  <time zone field> ::=
        TIMEZONE_HOUR
      | TIMEZONE_MINUTE

  <extract source> ::=
        <datetime value expression>
      | <interval value expression>

  <datetime value expression> ::=
        <datetime term>
      | <interval value expression> <plus sign> <datetime term>
      | <datetime value expression> <plus sign> <interval term>
      | <datetime value expression> <minus sign> <interval term>

  <interval term> ::=
        <interval factor>
      | <interval term 2> <asterisk> <factor>
      | <interval term 2> <solidus> <factor>
      | <term> <asterisk> <interval factor>

  <interval factor> ::=
      [ <sign> ] <interval primary>

  <interval primary> ::=
        <value expression primary> [ <interval qualifier> ]
  <interval term 2> ::= <interval term>

  <interval value expression> ::=
        <interval term>
      | <interval value expression 1> <plus sign> <interval term 1>
      | <interval value expression 1> <minus sign> <interval term 1>
      | <left paren> <datetime value expression> <minus sign>
            <datetime term> <right paren> <interval qualifier>

  <interval value expression 1> ::= <interval value expression>

  <interval term 1> ::= <interval term>

  <datetime term> ::=
        <datetime factor>

  <datetime factor> ::=
        <datetime primary> [ <time zone> ]

  <datetime primary> ::=
        <value expression primary>
      | <datetime value function>

  <time zone> ::=
      AT <time zone specifier>

  <time zone specifier> ::=
        LOCAL
      | TIME ZONE <interval value expression>

  <length expression> ::=
        <char length expression>
      | <octet length expression>
      | <bit length expression>

  <char length expression> ::=
      ( CHAR_LENGTH | CHARACTER_LENGTH )
          <left paren> <string value expression> <right paren>

  <string value expression> ::=
        <character value expression>
      | <bit value expression>

  <octet length expression> ::=
      OCTET_LENGTH <left paren> <string value expression> <right paren>

  <bit length expression> ::=
      BIT_LENGTH <left paren> <string value expression> <right paren>

  <null specification> ::=
      NULL

  <default specification> ::=
      DEFAULT

  <row value constructor list> ::=
      <row value constructor element>
          [ ( <comma> <row value constructor element> )... ]

  <row subquery> ::= <subquery>

  <comp op> ::=
        <equals operator>
      | <not equals operator>
      | <less than operator>
      | <greater than operator>
      | <less than or equals operator>
      | <greater than or equals operator>

  <between predicate> ::=
      <row value constructor> [ NOT ] BETWEEN
        <row value constructor> AND <row value constructor>

  <in predicate> ::=
      <row value constructor>
        [ NOT ] IN <in predicate value>

  <in predicate value> ::=
        <table subquery>
      | <left paren> <in value list> <right paren>

  <in value list> ::=
      <value expression> ( <comma> <value expression> )...

  <like predicate> ::=
      <match value> [ NOT ] LIKE <pattern>
        [ ESCAPE <escape character> ]

  <match value> ::= <character value expression>

  <pattern> ::= <character value expression>

  <escape character> ::= <character value expression>

  <null predicate> ::= <row value constructor>
      IS [ NOT ] NULL

  <quantified comparison predicate> ::=
      <row value constructor> <comp op> <quantifier> <table subquery>

  <quantifier> ::= <all> | <some>

  <all> ::= ALL

  <some> ::= SOME | ANY

  <exists predicate> ::= EXISTS <table subquery>

  <unique predicate> ::= UNIQUE <table subquery>

  <match predicate> ::=
      <row value constructor> MATCH [ UNIQUE ]
          [ PARTIAL | FULL ] <table subquery>

  <overlaps predicate> ::=
      <row value constructor 1> OVERLAPS <row value constructor 2>

  <row value constructor 1> ::= <row value constructor>

  <row value constructor 2> ::= <row value constructor>

  <truth value> ::=
        TRUE
      | FALSE
      | UNKNOWN

  <constraint attributes> ::=
        <constraint check time> [ [ NOT ] DEFERRABLE ]
      | [ NOT ] DEFERRABLE [ <constraint check time> ]

  <constraint check time> ::=
        INITIALLY DEFERRED
      | INITIALLY IMMEDIATE

  <table constraint definition> ::=
      [ <constraint name definition> ]
      <table constraint> [ <constraint attributes> ]

  <table constraint> ::=
        <unique constraint definition>
      | <referential constraint definition>
      | <check constraint definition>

  <unique constraint definition> ::=
              <unique specification> even in SQL3)
      <unique specification>
        <left paren> <unique column list> <right paren>

  <unique column list> ::= <column name list>

  <referential constraint definition> ::=
      FOREIGN KEY
          <left paren> <referencing columns> <right paren>
        <references specification>

  <referencing columns> ::=
      <reference column list>

  <module contents> ::=
        <declare cursor>
      | <dynamic declare cursor>
      | <procedure>

  <declare cursor> ::=
      DECLARE <cursor name> [ INSENSITIVE ] [ SCROLL ] CURSOR
        FOR <cursor specification>

  <cursor name> ::= <identifier>

  <cursor specification> ::=
      <query expression> [ <order by clause> ]
        [ <updatability clause> ]

  <order by clause> ::=
      ORDER BY <sort specification list>

  <sort specification list> ::=
      <sort specification> [ ( <comma> <sort specification> )... ]

  <sort specification> ::=
      <sort key> [ <collate clause> ] [ <ordering specification> ]

  <sort key> ::=
        <column name>
      | <unsigned integer>

  <ordering specification> ::= ASC | DESC

  <updatability clause> ::=
      FOR
          ( READ ONLY |
            UPDATE [ OF <column name list> ] )

  <dynamic declare cursor> ::=
      DECLARE <cursor name> [ INSENSITIVE ] [ SCROLL ] CURSOR
          FOR <statement name>

  <statement name> ::= <identifier>
  <procedure> ::=
      PROCEDURE <procedure name>
          <parameter declaration list> <semicolon>
        <SQL procedure statement> <semicolon>

  <procedure name> ::= <identifier>

  <parameter declaration list> ::=
        <left paren> <parameter declaration>
            [ ( <comma> <parameter declaration> )... ] <right paren>
      | <parameter declaration>...

  <parameter declaration> ::=
        <parameter name> <data type>
      | <status parameter>

  <status parameter> ::=
      SQLCODE | SQLSTATE

  <SQL procedure statement> ::=
        <SQL schema statement>
      | <SQL data statement>
      | <SQL transaction statement>
      | <SQL connection statement>
      | <SQL session statement>
      | <SQL dynamic statement>
      | <SQL diagnostics statement>

  <SQL schema statement> ::=
        <SQL schema definition statement>
      | <SQL schema manipulation statement>

  <SQL schema definition statement> ::=
        <schema definition>
      | <table definition>
      | <view definition>
      | <grant statement>
      | <domain definition>
      | <character set definition>
      | <collation definition>
      | <translation definition>
      | <assertion definition>

  <schema definition> ::=
      CREATE SCHEMA <schema name clause>
        [ <schema character set specification> ]
        [ <schema element>... ]

  <schema name clause> ::=
        <schema name>
      | AUTHORIZATION <schema authorization identifier>
      | <schema name> AUTHORIZATION
            <schema authorization identifier>

  <schema authorization identifier> ::=
      <authorization identifier>

  <schema character set specification> ::=
      DEFAULT CHARACTER
          SET <character set specification>

  <schema element> ::=
        <domain definition>
      | <table definition>
      | <view definition>
      | <grant statement>
      | <assertion definition>
      | <character set definition>
      | <collation definition>
      | <translation definition>

  <domain definition> ::=
      CREATE DOMAIN <domain name>
          [ AS ] <data type>
        [ <default clause> ]
        [ <domain constraint>... ]
        [ <collate clause> ]

  <domain constraint> ::=
      [ <constraint name definition> ]
      <check constraint definition> [ <constraint attributes> ]

  <table definition> ::=
      CREATE [ ( GLOBAL | LOCAL ) TEMPORARY ] TABLE
          <table name>
        <table element list>
        [ ON COMMIT ( DELETE | PRESERVE ) ROWS ]

  <view definition> ::=
      CREATE VIEW <table name> [ <left paren> <view column list>
                                    <right paren> ]
        AS <query expression>
        [ WITH [ <levels clause> ] CHECK OPTION ]

  <view column list> ::= <column name list>

  <levels clause> ::=
      CASCADED | LOCAL

  <grant statement> ::=
     GRANT <privileges> ON <object name>
       TO <grantee> [ ( <comma> <grantee> )... ]
         [ WITH GRANT OPTION ]

  <privileges> ::=
        ALL PRIVILEGES
      | <action list>

  <action list> ::= <action> [ ( <comma> <action> )... ]

  <action> ::=
        SELECT
      | DELETE
      | INSERT [ <left paren> <privilege column list> <right paren> ]
      | UPDATE [ <left paren> <privilege column list> <right paren> ]
      | REFERENCES [ <left paren> <privilege column list> <right paren> ]
      | USAGE

  <privilege column list> ::= <column name list>

  <object name> ::=
        [ TABLE ] <table name>
      | DOMAIN <domain name>
      | COLLATION <collation name>
      | CHARACTER SET <character set name>
      | TRANSLATION <translation name>

  <grantee> ::=
        PUBLIC
      | <authorization identifier>

  <assertion definition> ::=
      CREATE ASSERTION <constraint name> <assertion check>
        [ <constraint attributes> ]

  <assertion check> ::=
      CHECK
          <left paren> <search condition> <right paren>

  <character set definition> ::=
      CREATE CHARACTER SET <character set name>
          [ AS ]
        <character set source>
        [ <collate clause> | <limited collation definition> ]

  <character set source> ::=
        GET <existing character set name>

  <existing character set name> ::=
        <standard character repertoire name>
      | <implementation-defined character repertoire name>
      | <schema character set name>

  <schema character set name> ::= <character set name>

  <limited collation definition> ::=
      COLLATION FROM <collation source>

  <collation source> ::=
        <collating sequence definition>
      | <translation collation>

  <collating sequence definition> ::=
        <external collation>
      | <schema collation name>
      | DESC <left paren> <collation name> <right paren>
      | DEFAULT

  <external collation> ::=
      EXTERNAL <left paren> <quote> <external collation name> <quote> <right paren>

  <external collation name> ::=
        <standard collation name>
      | <implementation-defined collation name>

  <standard collation name> ::= <collation name>

  <implementation-defined collation name> ::= <collation name>

  <schema collation name> ::= <collation name>

  <translation collation> ::=
      TRANSLATION <translation name>
          [ THEN COLLATION <collation name> ]

  <collation definition> ::=
      CREATE COLLATION <collation name> FOR
          <character set specification>
        FROM <collation source>
          [ <pad attribute> ]

  <pad attribute> ::=
        NO PAD
      | PAD SPACE

  <translation definition> ::=
      CREATE TRANSLATION <translation name>
        FOR <source character set specification>
          TO <target character set specification>
        FROM <translation source>

  <source character set specification> ::= <character set specification>

  <target character set specification> ::= <character set specification>

  <translation source> ::=
        <translation specification>

  <translation specification> ::=
        <external translation>
      | IDENTITY
      | <schema translation name>

  <external translation> ::=
      EXTERNAL <left paren> <quote> <external translation name> <quote> <right paren>

  <external translation name> ::=
        <standard translation name>
      | <implementation-defined translation name>

  <standard translation name> ::= <translation name>

  <implementation-defined translation name> ::= <translation name>

  <schema translation name> ::= <translation name>

  <SQL schema manipulation statement> ::=
        <drop schema statement>
      | <alter table statement>
      | <drop table statement>
      | <drop view statement>
      | <revoke statement>
      | <alter domain statement>
      | <drop domain statement>
      | <drop character set statement>
      | <drop collation statement>
      | <drop translation statement>
      | <drop assertion statement>

  <drop schema statement> ::=
      DROP SCHEMA <schema name> <drop behavior>

  <drop behavior> ::= CASCADE | RESTRICT

  <alter table statement> ::=
      ALTER TABLE <table name> <alter table action>

  <alter table action> ::=
        <add column definition>
      | <alter column definition>
      | <drop column definition>
      | <add table constraint definition>
      | <drop table constraint definition>

  <add column definition> ::=
      ADD [ COLUMN ] <column definition>

  <alter column definition> ::=
      ALTER [ COLUMN ] <column name> <alter column action>

  <alter column action> ::=
        <set column default clause>
      | <drop column default clause>

  <set column default clause> ::=
      SET <default clause>

  <drop column default clause> ::=
      DROP DEFAULT

  <drop column definition> ::=
      DROP [ COLUMN ] <column name> <drop behavior>

  <add table constraint definition> ::=
      ADD <table constraint definition>

  <drop table constraint definition> ::=
      DROP CONSTRAINT <constraint name> <drop behavior>

  <drop table statement> ::=
      DROP TABLE <table name> <drop behavior>

  <drop view statement> ::=
      DROP VIEW <table name> <drop behavior>

  <revoke statement> ::=
      REVOKE [ GRANT OPTION FOR ]
          <privileges>
          ON <object name>
        FROM <grantee> [ ( <comma> <grantee> )... ] <drop behavior>

  <alter domain statement> ::=
      ALTER DOMAIN <domain name> <alter domain action>

  <alter domain action> ::=
        <set domain default clause>
      | <drop domain default clause>
      | <add domain constraint definition>
      | <drop domain constraint definition>

  <set domain default clause> ::= SET <default clause>

  <drop domain default clause> ::= DROP DEFAULT

  <add domain constraint definition> ::=
      ADD <domain constraint>

  <drop domain constraint definition> ::=
      DROP CONSTRAINT <constraint name>

  <drop domain statement> ::=
      DROP DOMAIN <domain name> <drop behavior>

  <drop character set statement> ::=
      DROP CHARACTER SET <character set name>

  <drop collation statement> ::=
      DROP COLLATION <collation name>

  <drop translation statement> ::=
      DROP TRANSLATION <translation name>

  <drop assertion statement> ::=
      DROP ASSERTION <constraint name>

  <SQL data statement> ::=
        <open statement>
      | <fetch statement>
      | <close statement>
      | <select statement: single row>
      | <SQL data change statement>

  <open statement> ::=
      OPEN <cursor name>

  <fetch statement> ::=
      FETCH [ [ <fetch orientation> ] FROM ]
        <cursor name> INTO <fetch target list>

  <fetch orientation> ::=
        NEXT
      | PRIOR
      | FIRST
      | LAST
      | ( ABSOLUTE | RELATIVE ) <simple value specification>

  <simple value specification> ::=
        <parameter name>
      | <embedded variable name>
      | <literal>

  <fetch target list> ::=
      <target specification> [ ( <comma> <target specification> )... ]

  <target specification> ::=
        <parameter specification>
      | <variable specification>

  <close statement> ::=
      CLOSE <cursor name>

  <select statement: single row> ::=
      SELECT [ <set quantifier> ] <select list>
        INTO <select target list>
          <table expression>

  <select target list> ::=
      <target specification> [ ( <comma> <target specification> )... ]

  <SQL data change statement> ::=
        <delete statement: positioned>
      | <delete statement: searched>
      | <insert statement>
      | <update statement: positioned>
      | <update statement: searched>

  <delete statement: positioned> ::=
      DELETE FROM <table name>
        WHERE CURRENT OF <cursor name>

  <delete statement: searched> ::=
      DELETE FROM <table name>
        [ WHERE <search condition> ]

  <insert statement> ::=
      INSERT INTO <table name>
        <insert columns and source>

  <insert columns and source> ::=
        [ <left paren> <insert column list> <right paren> ]
              <query expression>
      | DEFAULT VALUES

  <insert column list> ::= <column name list>

  <update statement: positioned> ::=
      UPDATE <table name>
        SET <set clause list>
          WHERE CURRENT OF <cursor name>

  <set clause list> ::=
      <set clause> [ ( <comma> <set clause> )... ]

  <set clause> ::=
      <object column> <equals operator> <update source>

  <object column> ::= <column name>

  <update source> ::=
        <value expression>
      | <null specification>
      | DEFAULT

  <update statement: searched> ::=
      UPDATE <table name>
        SET <set clause list>
        [ WHERE <search condition> ]

  <SQL transaction statement> ::=
        <set transaction statement>
      | <set constraints mode statement>
      | <commit statement>
      | <rollback statement>

  <set transaction statement> ::=
      SET TRANSACTION <transaction mode>
          [ ( <comma> <transaction mode> )... ]

  <transaction mode> ::=
        <isolation level>
      | <transaction access mode>
      | <diagnostics size>

  <isolation level> ::=
      ISOLATION LEVEL <level of isolation>

  <level of isolation> ::=
        READ UNCOMMITTED
      | READ COMMITTED
      | REPEATABLE READ
      | SERIALIZABLE

  <transaction access mode> ::=
        READ ONLY
      | READ WRITE

  <diagnostics size> ::=
      DIAGNOSTICS SIZE <number of conditions>

  <number of conditions> ::= <simple value specification>

  <set constraints mode statement> ::=
      SET CONSTRAINTS <constraint name list>
          ( DEFERRED | IMMEDIATE )

  <constraint name list> ::=
        ALL
      | <constraint name> [ ( <comma> <constraint name> )... ]

  <commit statement> ::=
      COMMIT [ WORK ]

  <rollback statement> ::=
      ROLLBACK [ WORK ]

  <SQL connection statement> ::=
        <connect statement>
      | <set connection statement>
      | <disconnect statement>

  <connect statement> ::=
      CONNECT TO <connection target>

  <connection target> ::=
        <SQL-server name>
          [ AS <connection name> ]
            correspondence with Tony Gordon)
          [ USER <user name> ]
      | DEFAULT

  <SQL-server name> ::= <simple value specification>

  <connection name> ::= <simple value specification>

  <user name> ::= <simple value specification>

  <set connection statement> ::=
      SET CONNECTION <connection object>

  <connection object> ::=
        DEFAULT
      | <connection name>

  <disconnect statement> ::=
      DISCONNECT <disconnect object>

  <disconnect object> ::=
        <connection object>
      | ALL
      | CURRENT

  <SQL session statement> ::=
        <set catalog statement>
      | <set schema statement>
      | <set names statement>
      | <set session authorization identifier statement>
      | <set local time zone statement>

  <set catalog statement> ::=
      SET CATALOG <value specification>

  <value specification> ::=
        <literal>
      | <general value specification>

  <set schema statement> ::=
      SET SCHEMA <value specification>

  <set names statement> ::=
      SET NAMES <value specification>

  <set session authorization identifier statement> ::=
      SET SESSION AUTHORIZATION
          <value specification>

  <set local time zone statement> ::=
      SET TIME ZONE
          <set time zone value>
  <set time zone value> ::=
        <interval value expression>
      | LOCAL

  <SQL dynamic statement> ::=
        <system descriptor statement>
      | <prepare statement>
      | <deallocate prepared statement>
      | <describe statement>
      | <execute statement>
      | <execute immediate statement>
      | <SQL dynamic data statement>

  <system descriptor statement> ::=
        <allocate descriptor statement>
      | <deallocate descriptor statement>
      | <set descriptor statement>
      | <get descriptor statement>

  <allocate descriptor statement> ::=
      ALLOCATE DESCRIPTOR <descriptor name>
         [ WITH MAX <occurrences> ]

  <descriptor name> ::=
      [ <scope option> ] <simple value specification>

  <scope option> ::=
        GLOBAL
      | LOCAL

  <occurrences> ::= <simple value specification>

  <deallocate descriptor statement> ::=
      DEALLOCATE DESCRIPTOR <descriptor name>

  <set descriptor statement> ::=
      SET DESCRIPTOR <descriptor name>
          <set descriptor information>

  <set descriptor information> ::=
        <set count>
      | VALUE <item number>
          <set item information> [ ( <comma> <set item information> )... ]

  <set count> ::=
      COUNT <equals operator> <simple value specification 1>

  <simple value specification 1> ::= <simple value specification>

  <item number> ::= <simple value specification>

  <set item information> ::=
      <descriptor item name> <equals operator> <simple value specification 2>

  <descriptor item name> ::=
        TYPE
      | LENGTH
      | OCTET_LENGTH
      | RETURNED_LENGTH
      | RETURNED_OCTET_LENGTH
      | PRECISION
      | SCALE
      | DATETIME_INTERVAL_CODE
      | DATETIME_INTERVAL_PRECISION
      | NULLABLE
      | INDICATOR
      | DATA
      | NAME
      | UNNAMED
      | COLLATION_CATALOG
      | COLLATION_SCHEMA
      | COLLATION_NAME
      | CHARACTER_SET_CATALOG
      | CHARACTER_SET_SCHEMA
      | CHARACTER_SET_NAME

  <simple value specification 2> ::= <simple value specification>

  <item number> ::= <simple value specification>

  <get descriptor statement> ::=
      GET DESCRIPTOR <descriptor name> <get descriptor information>

  <get descriptor information> ::=
        <get count>
      | VALUE <item number>
          <get item information> [ ( <comma> <get item information> )... ]

  <get count> ::=
      <simple target specification 1> <equals operator>
           COUNT

  <simple target specification 1> ::= <simple target specification>

  <simple target specification> ::=
        <parameter name>
      | <embedded variable name>

  <get item information> ::=
      <simple target specification 2> <equals operator> <descriptor item name>>

  <simple target specification 2> ::= <simple target specification>

  <prepare statement> ::=
      PREPARE <SQL statement name> FROM <SQL statement variable>

  <SQL statement name> ::=
        <statement name>
      | <extended statement name>

  <extended statement name> ::=
      [ <scope option> ] <simple value specification>

  <SQL statement variable> ::= <simple value specification>

  <deallocate prepared statement> ::=
      DEALLOCATE PREPARE <SQL statement name>

  <describe statement> ::=
        <describe input statement>
      | <describe output statement>

  <describe input statement> ::=
      DESCRIBE INPUT <SQL statement name> <using descriptor>

  <using descriptor> ::=
      ( USING | INTO ) SQL DESCRIPTOR <descriptor name>

  <describe output statement> ::=
      DESCRIBE [ OUTPUT ] <SQL statement name> <using descriptor>

  <execute statement> ::=
      EXECUTE <SQL statement name>
        [ <result using clause> ]
        [ <parameter using clause> ]

  <result using clause> ::= <using clause>

  <using clause> ::=
        <using arguments>
      | <using descriptor>

  <using arguments> ::=
      ( USING | INTO ) <argument> [ ( <comma> <argument> )... ]

  <argument> ::= <target specification>

  <parameter using clause> ::= <using clause>

  <execute immediate statement> ::=
      EXECUTE IMMEDIATE <SQL statement variable>

  <SQL dynamic data statement> ::=
        <allocate cursor statement>
      | <dynamic open statement>
      | <dynamic fetch statement>
      | <dynamic close statement>
      | <dynamic delete statement: positioned>
      | <dynamic update statement: positioned>

  <allocate cursor statement> ::=
      ALLOCATE <extended cursor name> [ INSENSITIVE ]
          [ SCROLL ] CURSOR
        FOR <extended statement name>

  <extended cursor name> ::=
      [ <scope option> ] <simple value specification>

  <dynamic open statement> ::=
      OPEN <dynamic cursor name> [ <using clause> ]

  <dynamic cursor name> ::=
        <cursor name>
      | <extended cursor name>

  <dynamic fetch statement> ::=
      FETCH [ [ <fetch orientation> ] FROM ] <dynamic cursor name>
          <using clause>

  <dynamic close statement> ::=
      CLOSE <dynamic cursor name>

  <dynamic delete statement: positioned> ::=
      DELETE FROM <table name>
        WHERE CURRENT OF
            <dynamic cursor name>

  <dynamic update statement: positioned> ::=
      UPDATE <table name>
        SET <set clause>
            [ ( <comma> <set clause> )... ]
          WHERE CURRENT OF
              <dynamic cursor name>

  <SQL diagnostics statement> ::=
      <get diagnostics statement>

  <get diagnostics statement> ::=
      GET DIAGNOSTICS <sql diagnostics information>

  <sql diagnostics information> ::=
        <statement information>
      | <condition information>

  <statement information> ::=
      <statement information item> [ ( <comma> <statement information item> )... ]

  <statement information item> ::=
      <simple target specification> <equals operator> <statement information item name>

  <statement information item name> ::=
        NUMBER
      | MORE
      | COMMAND_FUNCTION
      | DYNAMIC_FUNCTION
      | ROW_COUNT

  <condition information> ::=
      EXCEPTION <condition number>
        <condition information item> [ ( <comma> <condition information item> )... ]

  <condition number> ::= <simple value specification>

  <condition information item> ::=
      <simple target specification> <equals operator> <condition information item name>

  <condition information item name> ::=
        CONDITION_NUMBER
      | RETURNED_SQLSTATE
      | CLASS_ORIGIN
      | SUBCLASS_ORIGIN
      | SERVER_NAME
      | CONNECTION_NAME
      | CONSTRAINT_CATALOG
      | CONSTRAINT_SCHEMA
      | CONSTRAINT_NAME
      | CATALOG_NAME
      | SCHEMA_NAME
      | TABLE_NAME
      | COLUMN_NAME
      | CURSOR_NAME
      | MESSAGE_TEXT
      | MESSAGE_LENGTH
      | MESSAGE_OCTET_LENGTH

  <embedded SQL host program> ::=
        <embedded SQL Ada program>
      | <embedded SQL C program>
      | <embedded SQL COBOL program>
      | <embedded SQL Fortran program>
      | <embedded SQL MUMPS program>
      | <embedded SQL Pascal program>
      | <embedded SQL PL/I program>

  <embedded SQL Ada program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL C program> ::=
        !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL COBOL program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL Fortran program> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL MUMPS program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL Pascal program> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL PL/I program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL declare section> ::=
        <embedded SQL begin declare>
          [ <embedded character set declaration> ]
          [ <host variable definition>... ]
        <embedded SQL end declare>
      | <embedded SQL MUMPS declare>

  <embedded SQL begin declare> ::=
      <SQL prefix> BEGIN DECLARE SECTION
          [ <SQL terminator> ]

  <SQL prefix> ::=
        EXEC SQL
      | <ampersand>SQL<left paren>

  <SQL terminator> ::=
        END-EXEC
      | <semicolon>
      | <right paren>

  <embedded character set declaration> ::=
      SQL NAMES ARE <character set specification>

  <host variable definition> ::=
        <Ada variable definition>
      | <C variable definition>
      | <COBOL variable definition>
      | <Fortran variable definition>
      | <MUMPS variable definition>
      | <Pascal variable definition>
      | <PL/I variable definition>

  <Ada variable definition> ::=
      <Ada host identifier> [ ( <comma> <Ada host identifier> )... ] :
      <Ada type specification> [ <Ada initial value> ]

  <Ada type specification> ::=
        <Ada qualified type specification>
      | <Ada unqualified type specification>

  <Ada qualified type specification> ::=
        SQL_STANDARD.CHAR [ CHARACTER SET
           [ IS ] <character set specification> ]
            <left paren> 1 <double period> <length> <right paren>
      | SQL_STANDARD.BIT
            <left paren> 1 <double period> <length> <right paren>
      | SQL_STANDARD.SMALLINT
      | SQL_STANDARD.INT
      | SQL_STANDARD.REAL
      | SQL_STANDARD.DOUBLE_PRECISION
      | SQL_STANDARD.SQLCODE_TYPE
      | SQL_STANDARD.SQLSTATE_TYPE
      | SQL_STANDARD.INDICATOR_TYPE

  <Ada unqualified type specification> ::=
        CHAR
            <left paren> 1 <double period> <length> <right paren>
      | BIT
            <left paren> 1 <double period> <length> <right paren>
      | SMALLINT
      | INT
      | REAL
      | DOUBLE_PRECISION
      | SQLCODE_TYPE
      | SQLSTATE_TYPE
      | INDICATOR_TYPE

  <Ada initial value> ::=
      <Ada assignment operator> <character representation>...

  <Ada assignment operator> ::= <colon><equals operator>

  <C variable definition> ::=
        [ <C storage class> ]
        [ <C class modifier> ]
        <C variable specification>
      <semicolon>

  <C storage class> ::=
        auto
      | extern
      | static

  <C class modifier> ::= const | volatile

  <C variable specification> ::=
        <C numeric variable>
      | <C character variable>
      | <C derived variable>

  <C numeric variable> ::=
      ( long | short | float | double )
        <C host identifier> [ <C initial value> ]
              [ ( <comma> <C host identifier> [ <C initial value> ] )... ]

  <C initial value> ::=
      <equals operator> <character representation>...

  <C character variable> ::=
      char [ CHARACTER SET
               [ IS ] <character set specification> ]
        <C host identifier>
          <C array specification> [ <C initial value> ]
          [ ( <comma> <C host identifier>
            <C array specification>
                   [ <C initial value> ] )... ]

  <C array specification> ::=
      <left bracket> <length> <right bracket>

  <C derived variable> ::=
        <C VARCHAR variable>
      | <C bit variable>

  <C VARCHAR variable> ::=
      VARCHAR [ CHARACTER SET [ IS ]
          <character set specification> ]
          <C host identifier>
              <C array specification> [ <C initial value> ]
            [ ( <comma> <C host identifier>
                <C array specification>
                        [ <C initial value> ] )... ]

  <C bit variable> ::=
      BIT <C host identifier>
          <C array specification> [ <C initial value> ]
        [ ( <comma> <C host identifier>
          <C array specification>
                     [ <C initial value> ] )... ]

  <COBOL variable definition> ::=
      (01|77) <COBOL host identifier> <COBOL type specification>
        [ <character representation>... ] <period>

  <COBOL type specification> ::=
        <COBOL character type>
      | <COBOL bit type>
      | <COBOL numeric type>
      | <COBOL integer type>

  <COBOL character type> ::=
      [ CHARACTER SET [ IS ]
            <character set specification> ]
      ( PIC | PICTURE ) [ IS ] ( X [ <left paren> <length> <right paren> ] )...

  <COBOL bit type> ::=
      ( PIC | PICTURE ) [ IS ]
          ( B [ <left paren> <length> <right paren> ] )...

  <COBOL numeric type> ::=
      ( PIC | PICTURE ) [ IS ]
        S <COBOL nines specification>
      [ USAGE [ IS ] ] DISPLAY SIGN LEADING SEPARATE

  <COBOL nines specification> ::=
        <COBOL nines> [ V [ <COBOL nines> ] ]
      | V <COBOL nines>

  <COBOL nines> ::= ( 9 [ <left paren> <length> <right paren> ] )...

  <COBOL integer type> ::=
        <COBOL computational integer>
      | <COBOL binary integer>

  <COBOL computational integer> ::=
      ( PIC | PICTURE ) [ IS ] S<COBOL nines>
        [ USAGE [ IS ] ] ( COMP | COMPUTATIONAL )

  <COBOL binary integer> ::=
      ( PIC | PICTURE ) [ IS ] S<COBOL nines>
        [ USAGE [ IS ] ] BINARY

  <Fortran variable definition> ::=
      <Fortran type specification>
      <Fortran host identifier>
          [ ( <comma> <Fortran host identifier> )... ]

  <Fortran type specification> ::=
        CHARACTER [ <asterisk> <length> ]
            [ CHARACTER SET [ IS ]
                  <character set specification> ]
      | BIT [ <asterisk> <length> ]
      | INTEGER
      | REAL
      | DOUBLE PRECISION

  <MUMPS variable definition> ::=
      ( <MUMPS numeric variable> | <MUMPS character variable> )
          <semicolon>

  <MUMPS numeric variable> ::=
      <MUMPS type specification>
        <MUMPS host identifier> [ ( <comma> <MUMPS host identifier> )... ]

  <MUMPS type specification> ::=
        INT
      | DEC
            [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | REAL

  <MUMPS character variable> ::=
      VARCHAR <MUMPS host identifier> <MUMPS length specification>
        [ ( <comma> <MUMPS host identifier> <MUMPS length specification> )... ]

  <MUMPS length specification> ::=
      <left paren> <length> <right paren>

  <Pascal variable definition> ::=
      <Pascal host identifier> [ ( <comma> <Pascal host identifier> )... ] <colon>
        <Pascal type specification> <semicolon>

  <Pascal type specification> ::=
        PACKED ARRAY
            <left bracket> 1 <double period> <length> <right bracket>
          OF CHAR
            [ CHARACTER SET [ IS ]
                  <character set specification> ]
      | PACKED ARRAY
            <left bracket> 1 <double period> <length> <right bracket>
          OF BIT
      | INTEGER
      | REAL
      | CHAR [ CHARACTER SET
                                  [ IS ] <character set specification> ]
      | BIT

  <PL/I variable definition> ::=
      (DCL | DECLARE)
          (   <PL/I host identifier>
            | <left paren> <PL/I host identifier>
                  [ ( <comma> <PL/I host identifier> )... ] <right paren> )
      <PL/I type specification>
      [ <character representation>... ] <semicolon>

  <PL/I type specification> ::=
        ( CHAR | CHARACTER ) [ VARYING ]
            <left paren><length><right paren>
            [ CHARACTER SET
                  [ IS ] <character set specification> ]
      | BIT [ VARYING ] <left paren><length><right paren>
      | <PL/I type fixed decimal> <left paren> <precision>
            [ <comma> <scale> ] <right paren>
      | <PL/I type fixed binary> [ <left paren> <precision> <right paren> ]
      | <PL/I type float binary> <left paren> <precision> <right paren>

  <PL/I type fixed decimal> ::=
        ( DEC | DECIMAL ) FIXED
      | FIXED ( DEC | DECIMAL )

  <PL/I type fixed binary> ::=
        ( BIN | BINARY ) FIXED
      | FIXED ( BIN | BINARY )

  <PL/I type float binary> ::=
        ( BIN | BINARY ) FLOAT
      | FLOAT ( BIN | BINARY )

  <embedded SQL end declare> ::=
      <SQL prefix> END DECLARE SECTION
          [ <SQL terminator> ]

  <embedded SQL MUMPS declare> ::=
      <SQL prefix>
        BEGIN DECLARE SECTION
          [ <embedded character set declaration> ]
          [ <host variable definition>... ]
        END DECLARE SECTION
      <SQL terminator>

  <embedded SQL statement> ::=
      <SQL prefix>
        <statement or declaration>
      [ <SQL terminator> ]

  <statement or declaration> ::=
        <declare cursor>
      | <dynamic declare cursor>
      | <temporary table declaration>
      | <embedded exception declaration>
      | <SQL procedure statement>

  <embedded exception declaration> ::=
      WHENEVER <condition> <condition action>

  <condition> ::=
      SQLERROR | NOT FOUND

  <condition action> ::=
      CONTINUE | <go to>

  <go to> ::=
      ( GOTO | GO TO ) <goto target>

  <goto target> ::=
        <host label identifier>
      | <unsigned integer>
      | <host PL/I label variable>

  <host label identifier> ::= !!<EMPHASIS>(See the Syntax Rules.)

  <host PL/I label variable> ::= !!<EMPHASIS>(See the Syntax Rules.)

  <preparable statement> ::=
        <preparable SQL data statement>
      | <preparable SQL schema statement>
      | <preparable SQL transaction statement>
      | <preparable SQL session statement>
      | <preparable implementation-defined statement>

  <preparable SQL data statement> ::=
        <delete statement: searched>
      | <dynamic single row select statement>
      | <insert statement>
      | <dynamic select statement>
      | <update statement: searched>
      | <preparable dynamic delete statement: positioned>
      | <preparable dynamic update statement: positioned>

  <dynamic single row select statement> ::= <query specification>

  <dynamic select statement> ::= <cursor specification>

  <preparable dynamic delete statement: positioned> ::=
     DELETE [ FROM <table name> ]
        WHERE CURRENT OF <cursor name>

  <preparable dynamic update statement: positioned> ::=
     UPDATE [ <table name> ]
        SET <set clause list>
        WHERE CURRENT OF <cursor name>

  <preparable SQL schema statement> ::=
        <SQL schema statement>

  <preparable SQL transaction statement> ::=
        <SQL transaction statement>

  <preparable SQL session statement> ::=
        <SQL session statement>

  <preparable implementation-defined statement> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <direct SQL statement> ::=
      <directly executable statement> <semicolon>

  <directly executable statement> ::=
        <direct SQL data statement>
      | <SQL schema statement>
      | <SQL transaction statement>
      | <SQL connection statement>
      | <SQL session statement>
      | <direct implementation-defined statement>

  <direct SQL data statement> ::=
        <delete statement: searched>
      | <direct select statement: multiple rows>
      | <insert statement>
      | <update statement: searched>
      | <temporary table declaration>

  <direct select statement: multiple rows> ::=
      <query expression> [ <order by clause> ]

  <direct implementation-defined statement> ::=
      !!<EMPHASIS>(See the Syntax Rules)

  <SQL object identifier> ::=
      <SQL provenance> <SQL variant>

  <SQL provenance> ::= <arc1> <arc2> <arc3>

  <arc1> ::= iso | 1 | iso <left paren> 1 <right paren>

  <arc2> ::= standard | 0 | standard <left paren> 0 <right paren>

  <arc3> ::= 9075

  <SQL variant> ::= <SQL edition> <SQL conformance>

  <SQL edition> ::= <1987> | <1989> | <1992>

  <1987> ::= 0 | edition1987 <left paren> 0 <right paren>

  <1989> ::= <1989 base> <1989 package>

  <1989 base> ::= 1 | edition1989 <left paren> 1 <right paren>

  <1989 package> ::= <integrity no> | <integrity yes>
  <integrity no> ::= 0 | IntegrityNo <left paren> 0 <right paren>

  <integrity yes> ::= 1 | IntegrityYes <left paren> 1 <right paren>

  <1992> ::= 2 | edition1992 <left paren> 2 <right paren>

  <SQL conformance> ::= <low> | <intermediate> | <high>

  <low> ::= 0 | Low <left paren> 0 <right paren>

  <intermediate> ::= 1 | Intermediate <left paren> 1 <right paren>

  <high> ::= 2 | High <left paren> 2 <right paren>




  AAGG..  AAppppeennddiiccee BB -- TTuuttoorriieell SSQQLL  ll''uussaaggee ddeess ddbbuuttaannttss


  AAGG..11..  DDiiddaaccttiicciieell ppoouurr PPoossttggrreeSSQQLL

  Le didacticiel SQL est inclus dans la distribution de PostgreSQL.  Les
  scripts du didacticiel SQL se trouvent dans le rpertoire src/tutorial

  AAGG..22..  PPooiinntteeuurrss UURRLL IInntteerrnneett

  On peut trouver le didacticiel SQL pour dbutants 

    <http://w3.one.net/~jhoffman/sqltut.htm>

     Pour les commentaires ou suggestions, envoyer un courrier
     lectronique 

    jhoffman@one.net

     John Hoffman suggre de visiter les sites suivants :

    Rfrence SQL  <http://www.contrib.andrew.cmu.edu/~shadow/sql.html>

    Demandez SQL Pro  <http://www.inquiry.com/techtips/thesqlpro/>

    Sites utiles pour les BD relationnelles SQL Pro
     <http://www.inquiry.com/techtips/thesqlpro/usefulsites.html>

    Le site du programmeur
     <http://infoweb.magi.com/~steve/develop.html>

    Sites  <http://info.itu.ch/special/wwwfiles> Go here and see file
     comp_db.html

    Ingrdients DB  <http://www.compapp.dcu.ie/databases/f017.html>

    Web Authoring  <http://www.stars.com/Tutorial/CGI/>

    Dictionnaire informatique  <http://wfn-shop.princeton.edu/cgi-
     bin/foldoc>

    DBMS Lab/Links  <http://www-ccs.cs.umass.edu/db.html>

    FAQ SQL
     <http://epoch.CS.Berkeley.EDU:8000/sequoia/dba/montage/FAQ> Et l,
     consultez le fichier SQL_TOC.html

    Bases de donnes SQL
     <http://chaos.mur.csu.edu.au/itc125/cgi/sqldb.html>
    Page de conception de la base de donne RIT
     <http://www.it.rit.edu/~wjs/IT/199602/icsa720/icsa720postings.html>

    Site de renvoi sur les Bases de Donnes
     <http://www.pcslink.com/~ej/dbweb.html>

    Didacticiels de programmation sur le Web
     <http://www.eng.uc.edu/~jtilley/tutorial.html>

    Ressources de dveloppement
     <http://www.ndev.com/ndc2/support/resources.htp>

    Liste de requte  <http://ashok.pair.com/sql.htm>

    Diverses IMAGES SQL
     <http://jazz.external.hp.com/training/sqltables/main.html>

    Liste de ressources Internet
     <http://www.eit.com/web/netservices.html>

  AAHH..  AAppppeennddiixx CC -- IInnssttrruuccttiioonnss ppoouurr uunnee iinnssttaallllaattiioonn rraappiiddee ddee LLiinnuuxx

  Si vous envisagez d'utiliser PostgreSQL sous Linux, et avez besoin
  d'aide dans l'installation de Linux, consultez les pointeurs donns
  dans cette annexe.  Ils couvrent les sujets suivants :

    Fonctionnalits saillantes de Linux - Pourquoi Linux constitue un
     meilleur serveur de donnes que Windows 95/NT

    Instructions pour une installation rapide de Linux en 10 minutes

    Liste des analogies Microsoft-Linux

    tapes rapides pour recompiler le noyau Linux


    Site principal   <http://members.spree.com/technology/aldev/>

    Site miroir  <http://aldev.8m.com>

    Site miroir  <http://aldev.webjump.com>

    Site miroir  <http://homepages.infoseek.com/~aldev1/index.html>

    Site miroir  <http://www3.bcity.com/aldev/>





















  Printing-HOWTO
  Grant  Taylor  <gtaylor+pht@picante.com>,  traduction  Jean-
  Michel        VANSTEENE        <J.M.Vansteene@frcl.bull.fr>,
  <vanstee@worldnet.fr>
  12 Novembre 1997

  11..  IInnttrroodduuccttiioonn

  Le  Printing-HOWTO devrait  contenir  tout ce  dont  vous avez  besoin
  pour mettre  en   place   les    services   d'impression  sur    votre
  systeme  Linux.  Comme  vous  vous  en  doutez  peut-etre, ceci est un
  tantinet plus complique  que le ``simple''  _c_l_i_c  du  monde  _M_i_c_r_o_s_o_f_t
  et _A_p_p_l_e, mais  en   contre-partie,    c'est beaucoup  plus     souple
  et  certainement   plus   facile      a   administrer    pour      les
  grands reseaux.

  Ce document est  organise de facon  a ce que la lecture de la premiere
  moitie suffise  a la mise en place d'un systeme     qui    ``tourne''.
  Les    choses   plus  obscures voire particulieres sont    concentrees
  dans la   deuxieme moitie. Vous pouvez vous referer  a  la  table  des
  matiere pour les details.

  Depuis  la  version  3.x, ce  document a ete completement reecrit   et
  un    certain    nombre     d'informations   ont  ete  retirees.    La
  principale  raison est  que l'ancien document faisait  une soixantaine
  de  pages   et  contenait  pas  mal  de  parties  redondantes    voire
  inutiles.   Ainsi  fait,    la sanction est tombee: vous trouverez ici
  un document sensiblement plus  concis.  S'il  manque  une  information
  qui   vous   semble   importante,   nous    vous  encourageons  soit a
  parcourir l'ancien HOWTO,  soit  a  nous  envoyer  un   courrier  nous
  proposant  d'ajouter ladite   information.   L'adresse du site  de  G.
  Taylor est http://www.picante.com/~gtaylor/pht/.

  En vous souhaitant comme  a l'accoutumee, moulte satisfaction dans vos
  recherches    et   pleine  reussite  dans  la   configuration de votre
  imprimante  (Note : Desole  : ca  vouloir   dire   nous  esperer   toi
  reussir configurer imprimante :-)).

  Les   HOWTOs  francais  peuvent etre trouves  en France, notamment sur
  les sites

             ftp.lip6.fr             (/pub/linux/french/docs/HOWTO)
             ftp.univ-angers.fr      (/pub/linux/french/docs/HOWTO)

  11..11..  HHiissttoorriiqquuee

  Ce   document  est   le  troisieme    du   nom,  c'est   a  dire    la
  troisieme version  completement revue (en esperant que sa    structure
  se  stabilise un    peu).   L'histoire  du  PHT  peut etre  brievement
  decrite ainsi :

  J'ai  commence    a    ecrire    le premier   HOWTO    en reponse a un
  nombre assez consequent de  questions  qui  avaient  ete  posees  dans
  comp.os.linux.   C'etait  en   fait  une     FAQ   que  j'avais nommee
  HOWTO.   Cette   version etait disponible uniquement en ASCII.

  Le  PHT a  ensuite ete  regroupe  avec  la FAQ  de   LPD  ecrite   par
  Brian    McCauley   <B.A.McCauley@bham.ac.uk>,  nous avons    continue
  ce document   de   concert  pendant  a peu  pres    deux   ans.   Nous
  avons   alors    ajoute a notre document  les  travaux  de Karl   Auer
  <Karl.Auer@anu.edu.au>.  Cette version du  PHT  etait  disponible   en
  TeXInfo, PostScript, HTML, ASCII et Info.

  Apres  avoir   un peu laisse le  PHT vieillir pendant une bonne annee,
  sans avoir pu trouver quelqu'un souhaitant le maintenir,  j'ai  decide
  de   le   reecrire.   Cette   version    est  conforme au ``standard''
  Linuxdoc-SGML.

  11..22..  CCooppyyrriigghhtt

  Ce document est  sous Copyright (C)  1996  par   Grant  Taylor.   Vous
  pouvez  le  copier  et   le  distribuer   tel  quel   comme   vous  le
  souhaitez.    Par contre aucune  modification  ne  peut   etre   faite
  sans  le  consentement    de  l'auteur  sauf  si   vous   supprimez du
  document   toute   marque  qui  lui    fait  reference,   ainsi  qu'au
  traducteur    et  a toutes  les personnes  citees   (y     compris les
  adresses   de     courrier electronique) et que vous  le  diffusez  en
  votre  nom.   L'auteur  (et  le  traducteur) ne sauraient etre   tenus
  responsables de propos qui  ne sont pas les leurs.

  Le     coordinateur     des    HOWTOs   est       actuellement    Greg
  Hankins   <gregh@sunsite.unc.edu>.    Veuillez  quand    meme  ne  pas
  encombrer  sa boite aux lettres de questions sauf  de  la  plus  haute
  importance.   En  France,  le       coordinateur      est         Eric
  Dumas     <dumas@freenix.fr, dumas@Linux.EU.Org>.

  22..  QQuu''eesstt--ccee qquuee ll''iimmpprreessssiioonn ssoouuss UUNNIIXX ??

  Je me permets de consacrer un petit chapitre au B.A.BA de l'impression
  sous  UNIX  et   donc  sous Linux. Les gourous  trouveront ce chapitre
  inutile et je les invite  a   passer   au  suivant.    Les   debutants
  trouveront  l'information  suffisante,  je  l'espere, pour  comprendre
  comment  les  donnees   sont     vehiculees    vers     leur     chere
  imprimante.

  La  facon   la plus simple d'imprimer sous   Unix (et donc  Linux) est
  d'envoyer les donnees directement au pilote de l'imprimante.

        ls >/dev/lp0

  Cette methode  a neanmoins un gros inconvenient : elle  ne  tire   pas
  parti des caracteristiques  multi-taches du systeme d'exploitation. En
  effet  vous devrez attendre que le tampon de l'imprimante ait  absorbe
  toutes les donnees pour  pouvoir continuer a travailler.

  Une   meilleure    methode     consiste    a   utiliser    un    spool
  d'impression,   dont   le   role   est   de   collecter  les   donnees
  temporairement  dans  des fichiers afin  de  les envoyer, en tache  de
  fond, a l'imprimante.  Lorsque  plusieurs fichiers sont  soumis,   ils
  seront   imprimes dans  l'ordre  de soumission (premier entre, premier
  sorti). La zone  de spool est donc  bien une ffiillee.  On  dit  que   les
  travaux  sont   dans     la ffiillee  dd''iimmpprreessssiioonn.      Cette methode met
  en jeu  deux acteurs : le client  (_l_p_r)  permet  a  tout   utilisateur
  de  soumettre  des    travaux    d'impression.  Le serveur quant a lui
  (_l_p_d) les prend en charge en tache de fond.  Il recupere  les  donnees
  dans le spool ainsi que des informations   qui   lui  sont necessaires
  pour    l'impression proprement dite.

  Nous  verrons dans  un chapitre  un  peu plus loin comment  tout  cela
  interagit.   Arretons-nous  la  pour  le  moment et penchons-nous deja
  sur  le plus important:  les peripheriques du systeme.

  33..  CCoommmmeenntt IImmpprriimmeerr

  Si  le   demon   d'impression de  votre  machine    est   correctement
  configure, vous pouvez lire le  _P_r_i_n_t_i_n_g_-_U_s_a_g_e _H_O_W_T_O

  <http://www.loria.fr/services/linux/HOWTOFRENCH/Printing-Usage-
  HOWTO/Printing-Usage-HOWTO.html

  qui  traite plus  particulierement  de   la  commande  lpr  et  de  la
  manipulation des files d'impression.

  Si,  par   contre, vous venez  d'installez un nouveau systeme  (un qui
  marche,   quoi...)  vous   souhaitez   certainement    configurer  les
  services  d'impression.   Restez sur cette chaine :-) ne zappez pas et
  allons-y.

  33..11..  LLeess ppeerriipphheerriiqquueess dd''iimmpprriimmaanntteess ddaannss llee ssyysstteemmee

  Les imprimantes  sont  souvent rattachees  (surtout   les  imprimantes
  personnelles)   au   port   parallele.   Elles  sont  gerees  par  les
  peripheriques de type /dev/lp?.

  Si  vous  disposez   d'une imprimante  serie,  vous  utiliserez   bien
  sur    /dev/ttyS?   (ou   /dev/ttys?),    et   non    pas  /dev/lp? ni
  /dev/cua?.   Le majeur de /dev/ttyS?  est 4, celui de /dev/cua? est 5.

  33..22..  LLee ppeerriipphheerriiqquuee llpp

  33..22..11..  NNooyyaauuxx aanntteerriieeuurrss aa 22..11..3322

  Si  vous  utilisez une  imprimante parallele, vous devez disposer d'un
  noyau    Linux   compile       avec    les    gestionnaires         de
  peripheriques d'impression lp.  Verifiez-le a l'aide de la commande

             cat /proc/devices

  qui  doit  vous montrer un ou plusieurs  peripheriques lp.  De plus le
  repertoire    /dev  doit  comporter  la     liste   des  peripheriques
  /dev/lp0, /dev/lp1, ...

  Sur  un  systeme    de type XT,   LPT1:  correspond a /dev/lp0 (majeur
  6,  mineur  0),  alors  que   sur un  AT,  LPT1: correspond a /dev/lp1
  (majeur 6, mineur 1).

            Nom     Majeur  Mineur  Port
            lp0     6       0       0x3bc
            lp1     6       1       0x378
            lp2     6       2       0x278

  Le  port  parallele   peut  etre gere par le  pilote du  noyau de deux
  manieres.  D'une part  par polling  (scrutation), d'autre  part    par
  interruption.     La   methode de    gestion  par interruption est  en
  theorie plus  efficace, puisque le gestionnaire n'est  sollicite   par
  une  interruption qu'au    moment ou un travail est   a effectuer.  En
  pratique,  il  semble que  ce  soit  dependant  de  la  machine.  Dans
  beaucoup de cas, il n'y  a pas tant de difference que cela.

  Un   certain   nombre   d'utilisateurs   se sont    plaints  que  leur
  port  parallele  bidirectionnel    n'etait   pas  detecte   lorsqu'ils
  utilisent  un  vieux  cable unidirectionnel. Verifiez que le votre est
  recent.

  Vous ne pourrez pas utiliser les pilotes plip et  lp  en  meme  temps.
  Vous   pouvez  cependant  charger  l'un ou l'autre soit  manuellement,
  soit   par kerneld   version  2.x (et   noyaux  au   moins 1.3.x).  En
  configurant     les     interruptions       avec    attention,    vous
  pourrez theoriquement  utilisez plip   sur  un    port   et  lp    sur
  l'autre.   Quelqu'un  l'a fait en  modifiant les pilotes...  J'attends
  avec  impatience que quelqu'un    me dise comment    faire   a  partir
  d'une  simple et ingenieuse commande.

  Un petit utilitaire appele  tunelp vous permet, sous  le compte super-
  utilisateur,      de     regler    les         interruptions      d'un
  peripherique  lp, le mode de fonctionnement du pilote, la frequence de
  scrutation, et plein d'autres options...

  Avec  LILO  et  LOADLIN,  vous  pouvez  configurer   les  adresses  et
  interruptions utilises par le pilote.

            Syntaxe:      lp=port0[,irq0[,port1[,irq1[,port2[,irq2]]]]]

            Par exemple:   lp=0x378,0   ou   lp=0x278,5,0x378,7 **

  (**) le  port lp0 en 0x3bc n'est  plus utilise  sur les PC recents.

  Si     cette      caracteristique   est     utilisee,    vous    devez
  specifier tous  les ports que vous  souhaitez utiliser, il n'y  a  pas
  de  valeurs  par defaut. Vous  pouvez invalider un pilote en indiquant
  lp=0.

  Lorsque le pilote est charge en tant que module  (version noyau  2  et
  1.3.x),    il   est  egalement  possible    de  specifier  les  lignes
  d'interruption    utilisees        soit     dans   le          fichier
  /etc/conf.modules,  soit   sur  la   ligne  de  commande de insmod  en
  utilisant   la      meme    syntaxe.      Les      parametres     sont
  io=port0,port1,port2  et    irq=irq0,irq1,irq2.    Lisez  les mages de
  manuel de insmod pour plus d'information.

  Le   code source   du pilote   de  port  parallele   se  trouve   dans
  /usr/src/linux/drivers/char/lp.c.

  33..22..22..  ppaarrppoorrtt..  NNooyyaauuxx  ppoosstteerriieeuurrss   aa 22..11..3322:: llee ppeerriipphheerriiqquuee

  Depuis   le  noyau  2.1.33  (il  existe    un  patch pour   la version
  2.0.30), le peripherique   lp    est     simplement  un    client   du
  nouveau  peripherique    parport.    L'ajout de  ce    parport corrige
  un certain     nombre  de   problemes  dont    etait affuble lp  -  il
  peut  partager  le port avec d'autres pilotes, il met dynamiquement en
  relation les   ports  paralleles  disponibles  avec  les   numeros  de
  peripheriques   plutot    que  de  forcer  une correspondance statique
  entre addresse d'entre/sortie et numero de port, ...

  Une  prochaine version de  ce  document  devrait  couvrir  le  parport
  lorsque  j'en  aurai  utilise un, mais  en attendant, vous pouvez lire
  le fichier Documentation/parport.txt dans les  sources  du  noyau,  ou
  aller          sur          le          site         _p_a_r_p_o_r_t         a
  http://www.cyberelk.demon.co.uk/parport.html

  33..33..  LLeess ppeerriipphheerriiqquueess sseerriiee

  Les  peripheriques    serie              utilisables    sont   appeles
  /dev/ttyS?     (les    peripheriques /dev/cua? sont  aussi  serie mais
  pas utilisables  dans ce  domaine).    L'utilitaire  stty  permet   de
  visualiser  ou  de  modifier  les  caractertiques   d'un  port  donne.
  setserial  permet  de controler   et configurer les  IRQ   et adresses
  d'entree/sortie   si  besoin est.  Referez-vous  au _S_e_r_i_a_l_-_H_O_W_T_O  pour
  de plus amples renseignements.

  Si  vous utilisez une imprimante serie   lente  avec  le  controle  de
  flux,   vous  constaterez  peut-etre   que certaines  impressions sont
  tronquees.  Ceci  est  certainement   du  au  port   serie   dont   le
  comportement    par   defaut  est    de     purger   son   tampon  des
  caracteres   non   transmis   dans   les    30  secondes  apres     sa
  fermeture.   Une  imprimante  trop   lente  n'aura pas  le temps de le
  vider. Le tampon peut contenir 4096 caracteres.

  Si la  commande cat file > /dev/ttyS2   produit  une  sortie  correcte
  pour  les   fichiers courts et  tronquee pour les longs fichiers, vous
  etes peut-etre dans ce cas.

  Le   delai  de    30   secondes  peut   etre  ajuste   a  l'aide    du
  parametre  ``closing_wait''   (attente  fermeture)    de  la  commande
  setserial (version 2.12 et ulterieure).

  Notez   que   les   ports  serie    sont  generalement  configures  au
  demarrage  de  la machine grace a un appel a setserial dans le fichier
  /etc/rc.d/rc.serial.  Vous pouvez  rajouter  toute  option  necessaire
  dans ce fichier.

  44..  LLeess iimmpprriimmaanntteess ssuuppppoorrtteeeess

  Le  noyau   Linux supporte quasiment toutes  les imprimantes que  vous
  pouvez physiquement connecter  au port  serie  ou parallele. Il  y   a
  neanmoins   des   petites    choses  a  savoir,   notamment  certaines
  imprimantes     a      eviter       bien        qu'elles      puissent
  (electriquement  parlant)  communiquer avec Linux. En premier lieu, il
  existe    toute    une    generation   d'imprimantes     incompatibles
  s'appuyant  sur   le ``Windows Printing System''  et qui  repondent au
  label ``pour   Windows''. Ces imprimantes  ne fonctionnent   pas  avec
  Linux.  Elles  font  travailler   l'unite  centrale pour    des taches
  normalement  laissees    au   microprocesseur   de       l'imprimante.
  Malheureusement  ces  taches  ne  peuvent   etre effectuees que par le
  pilote  du  constructeur   qui    ne  tourne    que   sous    Windows.
  Conclusion n'achetez pas ce genre d'imprimante pour Linux.

  Evidemment,  sous  Linux, comme d'ailleurs sous tout autre systeme, le
  meilleur   choix est d'avoir  une  imprimante    PostScript.  Presquer
  tous  les  logiciels Unix produisent du _P_o_s_t_S_c_r_i_p_t  et bien evidemment
  le mieux  est   d'avoir une  imprimante   qui    le  comprend.    Cela
  simplifie.    Malheureusement   _P_o_s_t_S_c_r_i_p_t   n'est   pratiquement  pas
  disponible en dehors du domaine des imprimantes laser. Et c'est  cher.
  Rassurez-vous, vous pouvez utiliser toute autre imprimante.

  Si  vous  ne  comptez pas avoir de PostScript  a imprimer, vous pouvez
  connecter une   simple imprimante matricielle retrouvee    dans  votre
  grenier.   Sinon,  comme   nous  le  verrons,  il faudra passer par un
  logiciel d'interpretation du  _P_o_s_t_S_c_r_i_p_t (le   plus  celebre  est   le
  logiciel   gratuit   _G_h_o_s_t_S_c_r_i_p_t    de   _A_l_l_a_d_i_n  _s_o_f_t_w_a_r_e).  Utilisez
  alors une imprimante reconnue par ce logiciel.

  Voir    http://www.cs.wisc.edu/~ghost/printer.html      pour       des
  informations   mises  a  jour selon  les  versions disponibles et  les
  pilotes en test.

  Les imprimantes supportees sont:

       Canon BubbleJet BJ10e
       Canon BubbleJet BJ200
       Canon BubbleJet BJC-210 (4.01) N/B seulement
       Canon BubbleJet BJC-240 (3.33, 4.03) N/B seulement
       Canon BubbleJet BJC-600
       Canon BubbleJet BJC-610 (3.53) 360dpi seulement, N/B & couleur. Voir correctif bjc610.
       Canon BubbleJet BJC-4000
       Canon BubbleJet BJC-4100 (4.01) pas couleur.
       Canon MultiPASS C2500
       Canon BJC-240 (5.01)
       Canon BJC-70 (5.01)
       Canon BubbleJet BJC-800

       HP DeskJet (3.33)
       HP DeskJet Plus (3.33)
       HP DeskJet 500 (3.53)
       HP DeskJet Portable (4.01)
       HP DeskJet 400 (3.33, 4.03) N/B teste seulement.
       HP DeskJet 500C (3.53)
       HP DeskJet 540C (3.53)
       HP DeskJet 690C (4.03) 1bit/pixel et 32bit/pixel
       HP DeskJet 693C (4.03)
       HP DeskJet 550C (3.53)
       HP DeskJet 560C (3.53)
       HP DeskJet 600 (3.53) N/B teste seulement (1bit/pixel or 32bit/pixel)
       HP DeskJet 660C (3.53)
       HP DeskJet 682C (4.01) Utiliser gamma=0.3
       HP DeskJet 683C (3.33, 4.03)
       HP DeskJet 693C (4.03) 24bit/pixel
       HP DeskJet 850 (3.53) 300dpi
       HP DeskJet 870Cse (4.03) (16 ou 32 bits/pixel)
       HP DeskJet 850
       HP DeskJet 870Cse (4.03)
       HP DeskJet 870Cxi (4.03)
       HP DeskJet 680 (5.01)
       HP DeskJet 500C (3.53)
       HP DeskJet 500C (3.53)
       HP DeskJet 510 (3.53)
       HP DeskJet 520 (3.53)
       HP DeskJet 540C (3.53)
       HP DeskJet 693C (4.03)
       HP DeskJet 600 (3.53)
       HP DeskJet 600 (3.53) marges incorrectes
       HP DeskJet 870Cse (4.03)
       HP LaserJet 5 (4.01) 300dpi ou 600dpi
       HP LaserJet 5L (4.03) 300dpi ou 600dpi Marges incorrectes dans GS 3.33. Correct dans GS 4.03.
       Oki OL410ex LED printer (4.03) 300dpi ou 600dpi
       HP PaintJet XL300
       HP DeskJet 600 (3.53) 300dpi OK, 600 dpi tres lent
       HP DeskJet 1200C (3.53)
       HP DeskJet 1600C (4.03) 24bit/pixel. -dShingling=2 -dDepletion=1 -dPrintQuality=1
       Ricoh 4081 laser printer (3.53)
       Ricoh 6000 laser printer (3.53)
       Epson Stylus Color (3.53)
       Epson Stylus Color II (3.53) -r360 -dMicroweave voir devices.txt et GS stcolor FAQ
       Epson Stylus 500 (4.03) -r360 or -r720, -dMicroweave voir les notes
                               d'Alan Williams sur GS. (Ne marche pas avec 3.33.)
       Epson Stylus 800 (3.53) -sModel=st800

  55..  QQuueell ddeemmoonn dd''iimmpprreessssiioonn ??

  Jusque recemment, le  choix  sous Linux etait simple  puisque tout  le
  monde  disposait    du seul demon lpd    sorti tout droit   et presque
  tel quel  du   code    BSD   Net-2.   Aujourd'hui     la  plupart  des
  fournisseurs  proposent    ce  logiciel.  Mais    les  choses  sont en
  train  de changer.  Les  systemes SVR4  tels  que  Sun   Solaris  sont
  fournis  avec  un  paquetage logiciel d'impression centre sur lpsched.
  D'autre part,  sous  Linux, quelques  fournisseurs   proposent  LPRng,
  une  implementation     beaucoup     plus   recente     et  disponible
  gratuitement.   LPRng  est   tres  facilement administrable  notamment
  sur  des  plate-formes  importantes  et  contient du code plus robuste
  (moins farfelu??)  que lpd.

  A l'heure actuelle malgre toutes ces nouveautes, lpd est  certainement
  ce  qui  convient le mieux a la plupart des utilisateurs.  Meme  si ce
  n'est  pas le  fin  du  fin,  il  tourne  bien  une    fois  configure
  et,      chose  importante,  il     est tres   bien documente dans les
  livres sur Unix.

  Pour   plus    d'information     sur     LPRng,   allez     voir   sur
  http://ltpwww.gsfc.nasa.gov/ltpcf/about/unix/Depotdoc/LPRng/.

  66..  LL''iimmpprreessssiioonn,, ccoommmmeenntt ccaa mmaarrcchhee

  Nous  considerons  ici  que  vous utilisez la suite logicielle lpd que
  nous decrirons  d'ailleurs. Elle est  la plus repandue  et  fonctionne
  tres bien.

  66..11..  IImmpprreessssiioonn llooccaallee eett iimmpprreessssiioonn ddiissttaannttee

  L'impression    locale   permet     aux  utilisateurs  d'envoyer   des
  travaux d'impression  a  l'imprimante directement   rattachee  a  leur
  machine.

  L'impression   distante,  par     contre,   permet  de soumettre   des
  travaux d'impression   depuis  une  machine, a  une    autre   machine
  sur le reseau, sur laquelle est connectee une imprimante.

  66..22..  DDee qquuooii aavveezz vvoouuss bbeessooiinn

  Nous  supposons  que vous savez editer un  fichier texte sous Linux et
  que  vous avez   une bonne  comprehension   des  notions   de   droits
  d'acces et de propriete (chmod, chown).

  Nous   supposons   egalement   que  votre   systeme  Linux  fonctionne
  correctement.   En  particulier,   si    vous  souhaitez   faire    de
  l'impression distante, que votre reseau fonctionne deja.

  Consultez  a  ce propos les  nombreuses documentations disponibles sur
  le sujet  (comme  on dit: RTFM, ce   qui  en bon  francais veut   dire
  LLBD :-)).

  66..33..  LLeess pprrooggrraammmmeess iimmppoorrttaannttss

  Le  systeme   d'impression Unix comprend (au  moins) 5 programmes. Ils
  doivent se trouver a  l'endroit  decrit (c'est le  mieux)  ou dans  un
  repertoire  accessible   (avec   la variable PATH),  appartenir a root
  (groupe lp), et avoir les permissions suivantes :

                    -r-sr-sr-x      root    lp      /usr/bin/lpr
                    -r-sr-sr-x      root    lp      /usr/bin/lpq
                    -r-sr-sr-x      root    lp      /usr/bin/lprm
                    -r-xr-sr-x      root    lp      /usr/sbin/lpc
                    -rwxr--r--      root    lp      /usr/sbin/lpd

  Les quatre  premiers   sont  utilises  pour  soumettre,    visualiser,
  annuler,  controler les   travaux   d'impression. Le dernier    est le
  demon.

  Il existe bien  entendu  des  pages  de  manuel   en  ligne  pour  ces
  commandes que vous  pourrez consulter  pour    plus d'information.  Le
  point   important a noter  est    que   les commandes    lpr,     lpq,
  lpc  et    lprm operent   sur une    imprimante par defaut nommee  lp.
  La    variable   d'environnement PRINTER    peut contenir le nom    de
  l'imprimante  que vous  avez choisie.  La  specification du nom  d'une
  imprimante sur la ligne de commande  surchargera ces definitions  (les
  imprimantes de l'exemple sont hors-ligne):

            # echo $PRINTER
                                       (vide)
            #
            # lpq
            waiting for lp to become ready (offline ?)
            ...
            # export PRINTER=mon_imprimante
            # lpq
            waiting for mon_imprimante to become ready (offline ?)
            ...

            # lpq -Plpr0
            waiting for lpr0 to become ready (offline ?)
            ...

  66..33..11..  LLee cclliieenntt eett llee sseerrvveeuurr

  Voici ci-dessous les interactions client - demon

                                                     _________
                                                   +/BlaBla  /+
                                                  //________//|
                                                 /          / +
       +----------------+                       +----------+ /
       |      LPR       |                       |=      oo |/
       +----------------+                       +----------+
               |                                 Imprimante
               |                                     ^
               V                                     |
       +----------------+                  +------------------+
       |      LPD       |------>------>----|        LPD       |
       +----------------+                  +------------------+

                   Soumission d'un requete d'impression

       +----------------+
       |      LPQ       |
       +----------------+
                         \
                          \_______>______
                                         \
       +----------------+                 \+------------------+
       |      LPD       |                  |        LPD       |
       +----------------+                  +------------------+

                   Soumission d'une demande d'information

  Lorsque       le   systeme     demarre,   lpd     est charge.   Il lit
  le   fichier   /etc/printcap (dont  vous  trouverez   une  explication
  plus  loin) qui  decrit  les imprimantes connues.

  66..33..22..  LLeess ffiicchhiieerrss ssoouummiiss ppaarr llee cclliieenntt

  Lorsqu'un   programme    client    soumet  un   travail  d'impression,
  il genere deux fichiers qu'il ecrit dans le spool:

  +o   Un fichier de donnees qui  contient une copie des donnees que vous
     souhaitez  soumettre a l'imprimante. Il s'agit bien d'une copie, ce
     qui signifie  que toute modification  ulterieure de  votre  fichier
     n'alterera pas l'impression.

  +o   Un fichier de description du travail a effectuer.

  66..33..33..  LLaa ccoommmmaannddee llpprr

  La  commande  lpr  soumet  un travail d'impression.  Elle se charge de
  mettre les  donnees   a  imprimer  dans   un  fichier  dans  le  spool
  d'impression.  Ces  donnees  peuvent provenir  soit d'un fichier  (les
  donnees    sont         dupliquees      et     toute      modification
  ulterieure  du   fichier d'origine n'affectera pas l'impression), soit
  de    l'entree  standard   (stdin).    Le    demon   est   averti   de
  l'existence   d'un  nouveau fichier et   envoie, des que possible, les
  donnees vers l'imprimante physique (ou la machine distante).

  La  taille   du   spool   est   bien   entendu  limitee  a   la  place
  disponible  sur  votre  disque  dans /usr/spool/ ou a la taille limite
  specifiee  dans  le fichier  de configuration   printcap.  Vous pouvez
  neanmoins  imprimer  un  gros  fichier  en  demandant a lpr de ne  pas
  dupliquer le fichier.     Le  demon d'impression ira   alors  chercher
  le  fichier  que  vous  indiquez dans la ligne de commande et non plus
  dans le spool.

  66..33..44..  LLaa ccoommmmaannddee llppqq

  La commande lpq  affiche le contenu du   spool,  pour  une  imprimante
  donnee.      Une  des   informations    importantes fournies   est  le
  numero  du  travail (job).  C'est   lui  qui pourra  servir a  annuler
  un  des    travaux  soumis, y  compris  celui  en  cours d'impression.
  Parmi tous  les travaux soumis, l'indication   ``active''  indique  le
  travail  en  cours   d'impression   (ou   que  lpd  essaie   d'envoyer
  a l'impression).

  66..33..55..  LLaa ccoommmmaannddee llpprrmm

  La commande lprm enleve  un travail de la  file (et  donc  le  fichier
  du  spool).   Vous  pouvez soit  specifier un numero de job,  soit  un
  tiret    permettant   de   supprimer   tous     les     travaux   vous
  appartenant.    Si    vous   etes  root,    tous    les  travaux  sont
  supprimes.    Pour   supprimer    les   travaux     d'un  utilisateur,
  specifiez son nom.

            # lprm 1
            dfA001Aa00484 dequeued
            cfA001Aa00484 dequeued
            #

  Le   premier fichier contient les  donnees  a imprimer.  Il a ete cree
  par  lpr. Le deuxieme contient des informations que le  demon  utilise
  pour  savoir que faire des donnees (impression  locale, distante, ...)
  Consultez le manuel en ligne : lpd(8).

  66..33..66..  LLaa ccoommmmaannddee llppcc

  La commande lpc  permet de  controler  les  travaux  en   cours  ainsi
  que    l'imprimante,  et certains     aspects de son   utilisation. En
  particulier,  vous pouvez demarrer ou  stopper la sortie  des  travaux
  du    spool    pour   l'impression,     valider    ou   invalider  une
  imprimante, et meme modifier   l'ordre   d'impression  des   fichiers.
  Les   commandes  suivantes   permettent   d'invalider l'impression sur
  mon_imprimante, de valider le spool sur ton_imprimante, et   de  faire
  passer le job 37 en debut de file:

            lpc down mon_imprimante
            lpc enable ton_imprimante
            lpc topq 37

  lpc  peut   fonctionner  en interactif  si aucun  parametre ne lui est
  passe. Vous pouvez  lire les pages  du manuel en  ligne  pour  obtenir
  des  instructions completes. A noter que certaines actions de lpc sont
  reservees au super-utilisateur (root).

  66..44..  LLeess rreeppeerrttooiirreess iimmppoorrttaannttss

  Le repertoire le plus  important est le  repertoire  de   spool,  dans
  lequel   les  donnees  vont   etre stockees  avant d'etre   imprimees.
  Typiquement,    un  systeme   sera  configure     pour     avoir    un
  repertoire        de  spool par imprimante. Cela rend la gestion  plus
  facile.   Sur  mon  systeme,  par  exemple,      le         repertoire
  /usr/spool/lp  est    le repertoire   principal. Sous ce   repertoire,
  on  y trouve le sous-repertoire     lpr0, correspondant       a     la
  declaration  que   j'ai faite  dans   /etc/printcap pour le repertoire
  de spool de mon imprimante.

  NDT: Ce  qui va suivre decrit  une facon  de  faire  pour  donner  les
  bons       droits      d'acces     aux      repertoires     de  spool.
  Differentes   methodes  sont   possibles,  sachant  que,  comme   sous
  Un*x,  beaucoup  de  choses   sont   possibles  dans   ce  domaine, il
  convient de  faire  attention de  ne   pas offrir de failles    a   la
  securite de l'ensemble.

  Le repertoire de spool doit appartenir a root, et au groupe lp,   avec
  les  droits  de lecture/d'ecriture  pour  utilisateur  et  groupe,  et
  lecture seule pour le reste du monde.

               chmod ug=rwx,o=rx lpr0
               chgrp lp lpr0

            drwxrwxr-x   2 root     lp           1024 Feb 11 10:51 lpr0/

  Un  autre   repertoire  doit  egalement  etre present : /usr/spool/lpd
  avec  les memes  droits.   Vous aurez plus d'informations  plus  avant
  dans ce document.

  66..55..  LLeess ffiicchhiieerrss iimmppoorrttaannttss

  En     dehors     des   programmes  que      nous  avons  deja evoques
  precedemment, quatre  fichiers   doivent  se   trouver    dans  chaque
  repertoire  de  spool.   Avec les versions recentes des  gestionnaires
  d'impression,  vous n'avez pas  a vous soucier de ces  fichiers.   Ils
  sont  crees  automatiquement  s'ils  n'existent    pas :  .seq,  errs,
  lock et status.       Ces      fichiers      doivent      avoir    les
  droits  -rw-rw-r--.   Le   fichier   .seq  contient  un compteur  pour
  l'affectation des numeros de  jobs.  Le  fichier  status  contient  le
  message   devant    etre   emis   par    la   commande    lpc stat. Le
  fichier  lock est utilise par le  demon  pour  qu'il  n'imprime  qu'un
  fichier  a   la  fois.  Le fichier errs contient les erreurs survenues
  sur l'imprimante.

  Le fichier errs n'est pas obligatoire.  De  plus,  il  peut  s'appeler
  comme  vous  le  souhaitez,  pourvu  que  son nom soit declare dans le
  fichier /etc/printcap que nous decrirons dans la suite.

  77..  CCoonnffiigguurreerr lleess sseerrvviicceess dd''iimmpprreessssiioonn

  La   configuration minimale pour   un systeme d'impression  permet  de
  mettre  des   fichiers   en  file d'impression   puis de les imprimer.
  Il ne prete  aucune  attention  au  fait que   votre imprimante puisse
  les  imprimer   (les  comprendre  meme)   et   ne  vous  permettra pas
  d'imprimer des choses extraordinaires.  Neanmoins,  c'est  un  premier
  pas.

  77..11..  LLee ffiicchhiieerr //eettcc//pprriinnttccaapp

  Le  fichier   /etc/printcap  decrit  toutes  les imprimantes que votre
  systeme    doit  connaitre.      Il    peut  etre modifie  avec  votre
  editeur prefere, doit appartenir a root et avoir les droits suivants:

            -rw-r--r--   1 root     system        164 Oct 25 21:23 /etc/printcap

  Le contenu  du    fichier semble  assez    incomprehensible a premiere
  vue.    Il    respecte    effectivement   une    syntaxe  particuliere
  et   malgre les  apparences, assez simple lorsque l'on connait !    Il
  n'y  a  pas  toujours de manuels   concernant   ce  fichier,  et  cela
  complique un peu les choses.  Un  petit conseil en passant :  essayez,
  dans la  mesure  du  possible   de  rendre  votre   fichier  le   plus
  lisible  possible,  avec des  commentaires.  Vous pouvez consulter les
  pages du manuel en   ligne concernant printcap(5) (ou   empressez-vous
  de  les  recuperer    si   vous  ne   les avez  pas).   Plus loin sont
  decrits les parametres importants.

  Une   entree   de  printcap    decrit   une  imprimante,  c'est-a-dire
  une correspondance nom  logique -  imprimante physique, puis decrit la
  facon de transmettre les  donnees. Par exemple, une entree  va decrire
  le  peripherique  physique  a  utiliser,  le repertoire  de spool, les
  traitements a effectuer sur  les donnees avant  impression,  ou encore
  le  repertoire   dans  lequel    seront  notifiees   les erreurs. Vous
  pouvez aussi limiter la quantite  de donnees pour  un  job,   ou  meme
  limiter   l'acces   d'une   imprimante   a  une classe d'utilisateurs.
  Vous trouverez dans  la partie suivante la description des champs.

  Il    est  tout   a   fait    possible   d'avoir  plusieurs    entrees
  decrivant       differentes      facons d'envoyer   des donnees a  une
  meme  imprimante physique.  Par exemple,  une  imprimante     physique
  peut  supporter  les    formats    HP   LaserJet  et  PostScript,   en
  fonction  de   la  sequence   de  caracteres envoyee au   debut   d'un
  travail.    Vous  definirez  donc  deux  entrees, l'une permettant  de
  traiter  le   format  HP,  l'autre  le  format   _P_o_s_t_S_c_r_i_p_t.       Les
  programmes      generant  des  donnees   ``HP''  les     enverront   a
  l'imprimante  HP,     ceux  generant  des    donnees   _P_o_s_t_S_c_r_i_p_t  les
  enverront  a  l'imprimante _P_o_s_t_S_c_r_i_p_t. Toutes les deux representent la
  meme imprimante physique.

  Les   programmes  qui modifient  les  donnees  avant  de les envoyer a
  l'imprimante physique sont des filtres.

  Exemple d'entree d'un fichier /etc/printcap:

            # LOCAL djet500
            lp|dj|deskjet:\
                    :sd=/var/spool/lpd/dj:\
                    :mx#0:\
                    :lp=/dev/lp0:\
                    :sh:

  Ceci  definit  une  imprimante  dont les  noms sont   lp (par defaut),
  dj  et deskjet.   Les  deux   derniers  sont  des  alias  de  la  meme
  imprimante.    La  file  (on  dit  tres  souvent  le  spool,  meme  en
  francais...)   de cette  imprimante  de  trouve  dans   le  repertoire
  /var/spool/lpd/dj (sd signifie spool   directory).    Le  peripherique
  utilise  est /dev/lp0.      La     page  d'en-tete    est    supprimee
  (sh) et   aucune limite de  taille   de fichier n'est fixee (mx)

  Notez que la meme entree pourrait s'ecrire:

            lp|dj|deskjet:sd=/var/spool/lpd/dj:mx#0:lp=/dev/lp0:sh:

  mais c'est moins beau.

  Vous pouvez consultez la page de manuel de printcap sur

  http://www.picante.com/~gtaylor/pht/man/printcap.html.   Toutes    les
  options y sont decrites.

  Tous les champs exceptes les noms d'imprimantes sont entoures de deux-
  points  et   reperes par  un  symbole de  deux  lettres suivi du signe
  egal.   Ensuite  est  indiquee  la  valeur  qui  peut  etre   de  type
  numerique,  booleenne ou chaine de caracteres:

            champ           type            signification

            lp              string          designe le peripherique d'impression
            sd              string          designe le repertoire de spool
            lf              string          designe le fichier de rapport d'erreurs
            if              string          specifie le nom du filtre d'entree
            rm              string          designe le nom d'un site d'impression distant
            rp              string          designe le nom d'une imprimante distante
            sh              booleen         indique s'il faut supprimer les en-tetes
            sf              booleen         indique s'il faut supprimer les sauts de pages
                                            de fin de travaux
            mx              numerique       indique la taille maximum d'un job
                                            (en blocs = 1Ko sous linux)

  77..11..11..  DDeettaaiillss ssuurr llee cchhaammpp llpp

  Si           vous         specifiez          /dev/null           comme
  peripherique, tous  les   traitements se  feront,  mais  tout  partira
  a  la  poubelle. Ca semble ridicule, mais cela vous permet par exemple
  de  tester une configuration.   Lisez le chapitre ``Imprimantes qui ne
  sont     pas  de  simples   peripheriques''.      Si vous designez une
  imprimante  distante avec  rp et  rm, lp doit contenir :lp=:.

  Ne laissez  pas ce champ  vide en cas  d'impression locale,  le  demon
  signalerait une erreur.

  77..11..22..  DDeettaaiillss ssuurr llee cchhaammpp llff

  Tout     fichier  specifie   ici   doit  exister,   sinon  le  rapport
  d'erreurs ne se ferait pas.

  77..11..33..  DDeettaaiillss ssuurr llee cchhaammpp iiff

  Les     filtres  d'entree sont   des    utilitaires  transformant  les
  donnees  qu'il  recoivent  sur  leur  entree  standard  en  un  format
  particulier qu'il sortent sur leur sortie standard.   Typiquement,  la
  conversion   texte -  _P_o_s_t_S_c_r_i_p_t deja mentionnee.

  Si  vous   specifiez     un  filtre    d'entree,   le   demon n'envoie
  pas    directement     les        donnees       au  peripherique.   Il
  execute le  filtre  en dirigeant les donnes sur son   entree  standard
  et en  designant  le peripherique de sortie comme sortie standard.

  77..11..44..  DDeettaaiillss ssuurr lleess cchhaammppss rrmm eett rrpp

  Envoyer des   donnees   a une   imprimante   rattachee a   une machine
  distante   est   tres  simple:   il  suffit de specifier   le nom   de
  la    machine avec  rm    et     le  nom  de  l'imprimante   avec  rp.
  S'assurer  que  l'entree  lp  est vide. A noter que les donnees seront
  d'abord mises dans le spool local  avant  d'etre   transferees.   Meme
  si  votre imprimante est distante, il faudra egalement un spool local.

  77..11..55..  DDeettaaiillss ssuurr lleess cchhaammppss sshh eett ssff

  Les  bannieres    concernent  eventuellement   les    utilisations   a
  plusieurs personnes. Elles identifient les jobs.

  La  suppression de ces  bannieres vous permet d'economiser  du papier.
  Par   contre     la gestion  des   sauts    de     page   sera    plus
  interessante,  surtout  si vous utilisez des traitements de textes qui
  formatent toujours des  pages pleines.  Dans ce  cas,  pas  besoin  de
  saut  de  page supplementaire.  Vous auriez sinon une page  blanche en
  fin de chaque travail.   Si  vous  utilisez  des  listings  ou  autres
  documents,  ajouter  un  saut  de  page  garantit  que  chaque travail
  commancera bien en debut de page.

  77..11..66..  DDeettaaiill ssuurr llee cchhaammpp mmxx

  Ce champ permet de limiter la taille des donnees pour chaque  job.  Le
  nombre  a  specifier  est en blocs de BUFSIZE (pardon, de 1 Ko)   sous
  Linux.  La valeur   0  rend  la   taille    illimitee,  permettant  la
  soumission  de   travaux limitee uniquement a  la taille    du disque.
  Notez   que   la   limite concerne   la   taille des donnees mises  en
  spool,    et    non   pas   les      donnees envoyees a   l'imprimante
  physique.   Si  la   limite   est depassee,    le   fichier        est
  tronque    avec  l'emission d'un  message disant: lpr: <fichier>: copy
  file is too large.

  Cela  peut etre interessant pour  des imprimantes  physiques  en  mode
  texte,  notamment  si   des  utilisateurs  ou  des  programmes  creent
  accidentellement des donnees trop volumineuses.

  Si vous manquez de memoire de masse, pourquoi  n'inventeriez-vous  pas
  un   filtre  qui    decompresse  ce qu'il a   a envoyer a l'imprimante
  ?      Vous    soumettriez     alors   des    donnees compressees.

  88..  LLeess ffiillttrreess

  Si   avec   les   explications  precedentes,   tout    marche    c'est
  formidable, mais en regle general, cela ne suffit pas.  Regardez   ci-
  dessous ce que l'on  obtient   sur  la  DeskJet 500,  lorsque j'envoie
  un fichier texte:

       Ceci est la premiere ligne.
                                  Celle-ci est la deuxieme.
                                                           Voici la troisieme.

  Et alors l'impression    d'un fichier _P_o_s_t_S_c_r_i_p_t...   Vous obtenez  le
  listing complet    du   code  _P_o_s_t_S_c_r_i_p_t   avec     les   meme  effets
  d'escalier. Une horreur.

  Il  faut donc quelque chose de plus et c'est  le role des filtres. Les
  plus  observateurs    d'entre   vous   auront    peut-etre    remarque
  l'existence  des  parametres  if  (input filter) et of (output filter)
  dans le fichier printcap.  Pour l'instant nous avons besoin de if.

  Un filtre  est    un  simple  programme  executable  qui     lit   les
  donnees   sur  son entree  standard  et sort le resultat sur sa sortie
  standard.

  Commencons par  ecrire   un    script que vous      appellerez  filtre
  et qui ajoute des retours chariot avant chaque caractere fin de ligne.
  Ceci elimine l'effet d'escalier.

            #!/usr/local/bin/perl
            # La ligne ci-dessous doit contenir le chemin complet vers perl
            # Ce script doit etre executable: chmod 755 filtre
            while(<STDIN>){chop $_; print "$_\r\n";};
            # Vous pouvez aussi vouloir terminer avec une fin de page: print "\f";

  Dans   /etc/printcap,   l'entree  est  modifiee   en consequence:

       lp|dj|deskjet:\
                    :sd=/var/spool/lpd/dj:\
                    :mx#0:\
                    :lp=/dev/lp0:\
                    :if=/var/spool/lpd/dj/filtre:\
                    :sh:

  Essayez  d'ecrire le filtre en shell  qui sera  plus efficace  que  de
  charger perl. Bon allez, je vous aide un peu:

            #!/bin/sh
            if [ "$1" = -c ]; then
              cat
            else
              sed -e s/$/^M/
            fi
            # echo -ne suppose que /bin/sh correspond a bash
            echo -ne \\f

  Notez  que   '^M' symbolise le caractere  retour-chariot et non pas un
  `^' suivi d'un 'M'. Dans emacs, pour saisir  ce caractere,  entrez  la
  sequence  C-q   C-m,     alors  que   sous  vi, entrez   C-v C-m.   Le
  test  de $1   permet    d'invalider l'insertion du retour-chariot  par
  la  commande   lpr   -l  A savoir que  lpr genere  des  parametres qui
  sont  passes   au filtre. Par defaut  il passe -w0.   Si  l'option  -l
  est  donnee,  il   passe  -c.   Ce script est traditionnellement nomme
  /usr/lib/lpf.  Si vous avez   plusieurs  scripts  de   la  sorte,  une
  bonne idee consiste  a  les  mettre tous dans  un sous-repertoire, par
  exemple /usr/lib/lpd.

  Il se peut aussi que votre  imprimante  puisse  passer  dans  un  mode
  permettant  l'ajout   de   retour-chariots   grace    a une   sequence
  d'echappement. Voici   un  exemple de filtre  utilisant   la  commande
  echo -ne pour envoyer cette sequence:

            #!/bin/sh
            # Filtre pour imprimantes HP, permettant de traiter LF comme CRLF
            # La commande echo -ne suppose que /bin/sh correspond a bash
            echo -ne \\033&k2G
            cat
            echo -ne \\f

  Vous pouvez compliquer  les filtres  comme bon  vous  semble. Le mieux
  est d'avoir un  filtre qui  reconnait le   fichier   d'entree  et   le
  convertit    au bon format   pour   votre imprimante.   Un  tel filtre
  est appele  filtre magique.   Ne  vous embetez   pas   a   les  ecrire
  vous-meme,   il     en     existe   surement deja  un  qui        vous
  convient.                Allez                voir                 sur
  tsx-11.mit.edu:/pub/linux/sources/usr.bin/magic-filter-x.y.tar.gz.

  99..  LLeess ffiicchhiieerrss,, lleeuurr eemmppllaacceemmeenntt eett lleess ddrrooiittss dd''aacccceess

  Les  differences  qui existent entre les nombreuses distributions font
  que l'on ne  peut ici etre exhaustif.  Je  pense que beaucoup de  gens
  utilisent  maintenant  les distributions type   slackware  et on  peut
  raisonnablement s'appuyer sur cet exemple.

  Pensez a  inclure lpd dans le  fichier  rc.local  apres  le  demarrage
  eventuel  de   syslogd.   Voici  les  fichiers  tels que l'on peut les
  trouver:

            -r-sr-xr-x   1 root     lp           9308 Aug 23 21:45 /usr/bin/lpq*
            -r-sr-xr-x   1 root     lp          10056 Aug 23 21:45 /usr/bin/lpr*
            -r-sr-xr-x   1 root     lp           8900 Aug 23 21:45 /usr/bin/lprm*
            -r-x------   1 root     lp           1596 Aug 23 21:45 /usr/bin/lptest*

            -r-xr-sr-x   1 root     lp          17160 Aug 23 21:45 /usr/sbin/lpc*
            -rwxr--r--   1 root     lp          34072 Aug 23 21:45 /usr/sbin/lpd*

  et pour chaque repertoire de spool:

            /usr/spool/lp/lpr0/
            total 5
            drwxr-xr-x   2 root     lp           1024 Feb 12 15:15 ./
            drwxr-xr-x   3 root     lp           1024 Sep  2  1993 ../
            -rw-r----x   1 root     lp              4 Feb 12 15:15 .seq
            -rw-r--r--   1 root     lp              3 Feb 13 20:46 lock
            -rw-rw-r--   1 root     root           27 Feb 12 15:15 status

  Ces  trois   fichiers    sont  crees  par     lpr et lpd. Ils  peuvent
  etre  absents  si  vous    ne  les  avez  encore  jamais  lances. Avec
  d'anciennes  versions il fallait executer touch sur   ces fichiers  ou
  bien  modifier  leurs  droits. Les  bugs concernant ces  fichiers  ont
  maintenant  ete corriges dans les versions recentes.

  Il est   a noter  egalement   que  le   groupe   d'appartenance  etait
  daemon  avec  d'anciennes  versions, et   est maintenant lp.

  Ne     soyez  pas    surpris  de  trouver     des   choses  legerement
  differentes sur  votre systeme. D'un autre cote, si quelque  chose  ne
  fonctionne   pas, pensez a soupconner ces droits avant   d'affoler nos
  boites   aux  lettres   (Si   vous  saviez  le  nombre  de   courriers
  electroniques recus  et dont la  solution se trouve la !).

  On peut trouver le programme lpr avec ou sans  le bit setuid(root). En
  fait ce  n'est  pas si   evident que  cela.   Tout depend  des  droits
  et  permissions des repertoires de spool. Autant que je sache, il  y a
  une totale  securite  avec lpr, meme si il est setuid(root).  Donc,  a
  la  limite,   positionnez  le  bit pour ne pas vous soucier des droits
  d'acces au repertoire de spool.

  Vous etes libre  de mettre les  binaires   dans  les  repertoires  que
  vous  voulez,  bien  qu'ils  se   trouvent couramment dans /usr/bin ou
  /usr/sbin.   (lpc  et lpd peuvent  se  trouver  par     exemple   dans
  /etc).       Certaines    commandes  etant  interessantes   pour  tout
  utilisateur, il  est bon de les laisser aux endroits habituels.

  Attention  toutefois, car les  gens qui concoivent  les  distributions
  sont   egalement   libres   de  choisir.   Pensez   a  supprimer   les
  anciennes versions, si vous changez de distribution.

  L'emplacement du  fichier  de  verrouillage  principal  du  demon  lpd
  (lpd.lock),  est  fixe    en  dur  dans  le  code.   Il se trouve dans
  /var/spool/lpd/lpd.lock.  Donc,  vous  devrez  prevoir  un  repertoire
  /var/spool/lpd    meme     si        votre  repertoire   de  spool est
  different.   Les  binaires   anciens   mettaient   ce   fichier   dans
  /var/spool/lpd.lock/

  Typiquement, chez moi, on trouve

            /var/spool/lpd/
            drwxr-xr-x   4 root     lp           1024 Aug 18  1994 ./
            drwxr-xr-x  18 root     root         1024 Aug 17  1994 ../
            -rw-r--r--   1 root     root            3 Feb 14 20:12 lpd.lock

            /var/spool/lp/lpr0
            drwxr-xr-x   2 root     lp           1024 Feb 12 15:15 ./
            drwxr-xr-x   3 root     lp           1024 Sep  2  1993 ../
            -rw-r----x   1 root     lp              4 Feb 12 15:15 .seq*
            -rw-r--r--   1 root     root            3 Feb 14 20:12 lock
            -rw-rw-r--   1 root     root           27 Feb 12 15:15 status

  Etant   donne   que l'on  jongle  en permanence entre /usr et /var, il
  est clair  qu'un  lien  doit   exister  entre  les  deux.   Soit  vous
  definissez       vos         repertoires        dans /usr/spool/... et
  definissez  le lien   /var vers /usr,  soit vous  mettez   tout   sous
  /var/spool/lpd... et definissez le lien /usr/spool vers /var/spool.

  Si  vous  avez,  comme  moi,  une partition root  (/) et une partition
  /usr, les deux cas  ne sont pas  identiques.  Dans  le   premier,  vos
  fichiers  seront  stockes  dans    la    partition  de  root,     /var
  etant cree sous /, dans l'autre,  ce  sera  dans  la  partition  /usr,
  puisque  /usr   est  monte.    Vous  pouvez  aussi avoir un systeme de
  fichiers /var reserve.

  Le fichier de configuration principal  est  /etc/printcap.  Il  existe
  aussi,   pour l'impression  distante, les fichiers /etc/hosts.allow et
  /etc/hosts.lpd.

  Desormais,  le   repertoire       /etc   est      le  repertoire    ou
  sont     situes  les    fichiers   de configuration.   Vous     pouvez
  choisir de  les    mettre  ailleurs, mais definissez  toujours un lien
  symbolique  de /etc  vers vos fichiers.  Si votre systeme comporte des
  binaires qui vont toujours chercher leur configuration  dans  /usr/etc
  ou  /etc/inet, ils  sont  surement tres  anciens   et vous gagneriez a
  mettre votre systeme a jour.

  1100..  OOuu ttrroouuvveerr ddeess ffiillttrreess dd''iimmpprreessssiioonn ??

  Pas  mal  de filtres   sont  deja  rediges   et disponibles        sur
  _S_u_n_s_i_t_e                      ou                _l_i_p_6               dans
  /pub/sunsite/linux/system/printing.

  1100..11..  LLeess ffiillttrreess mmaaggiiqquueess

  Titre:          magicfilter
  Version:        1.1b
  Date-entree:    04APR95
  Description:    Un filtre d'impression automatique, extensible, parametrable.
                  Detecte tout type de fichier pour lequel existe un utilitaire
                  de conversion. Ce filtre est ecrit en C et completement controle'
                  par un fichier de configuration externe. Cette version
                  apporte la creation "automagique" de ce fichier
                  d'apres les logiciels installes sur votre systeme
                  grace a 'GNU Autoconf'.
                  Cette version corrige les bogues de la version 1.1/1.1a;
                  En plus: filtres pour imprimantes PostScript non-ASCII
  Auteur:         H. Peter Anvin <hpa@zytor.com>
  Site-initial:   sunsite.unc.edu
                  53000 /pub/Linux/system/printing/magicfilter-1.1b.tar.gz
  licence-copie:  GPL

  1100..22..  LLeess ffiillttrreess AAPPSS

       Titre:          apsfilter
       Version:        4.9.1
       Date-entree:    Lundi, 10. Juillet 1995, 21:22:35  MET DST
       Description:    magicfilter for lpd with auto filetype detection
       Mots-cles:      lpd magicfilter aps apsfilter
       Site-initial:   sunsite.unc.edu
                       /pub/Linux/system/printing/
                       211KB aps-491.tgz
       Platformes:     C-Compiler, gs Postscript emulator, pbmutils
       Licence-copie:  GPL

  Les  filtres APS  se    configurent  dans  l'entree   _i_f  du   fichier
  /etc/printcap  et   convertissent  la  plupart  des  types de fichiers
  connus   (texte,   _P_o_s_t_S_c_r_i_p_t,   dvi,   gif,    ...)     en  commandes
  comprehensibles par votre imprimante.

  1100..33..  LLeess ffiillttrreess EEZZ--mmaaggiicc

  Titre:          ez-magic printer filter
  Version:        1.0.5
  Date-entree:    26 Janvier 1997
  Description:    ez-magic est un filtre d'impression supportant 8 formats
                  de fichiers (txt,ps,gif,bmp,pcx,png,jpg,tif).
                  Il permet l'impression via un reseau (SMB), ou vers une
                  imprimante locale. Lit depuis un fichier, STDIN ou lpd.
                  Simple a utiliser et a configurer. Seul un fichier 'script'
                  est necessaire, pas de multitudes de manuels et pilotes.
                  Necessite des programmes de conversion (tels que netpbm et
                  ghostscript). Ecrit en 'bash'. Ajout de nouveaux formats
                  facile. Preconfigure pour HP DeskJet 870Cse en reseau.
                  Comparable a apsfilter et autres.
  Mots-cles:      magic filter, print, graphics, samba, network, smb,
                  ghostscript, postscript, gif, jpg, simple
  Auteur:         toby@eskimo.com (Toby Reed)
  Maintenu-par:   toby@eskimo.com (Toby Reed)
  Site-initial:   http://www.eskimo.com/~toby/ez-magic-1.0.5.tar.gz
                  38 kb ez-magic-1.0.5.tar.gz
  Site-secondaire:sunsite.unc.edu /pub/Linux/system/printing
                  38 kb ez-magic-1.0.5.tar.gz
  Licence-copie:  Copyright, droits complets de manipulation sauf 1 ou 2
                  restrictions.

  1111..  LLeess llooggiicciieellss dd''iimmpprreessssiioonn

  Les    logiciels   d'impression  sont    disponibles   en  France  par
  exemple sur ftp://ftp.lip6.fr/pub/linux/sunsite/system/Printing.

  1111..11..  GGhhoossttSSccrriipptt

  _G_h_o_s_t_S_c_r_i_p_t est un  logiciel majeur pour  l'impression  sous Linux. En
  effet   la   plupart   des  logiciels  generent  du   _P_o_s_t_S_c_r_i_p_t.   Ce
  logiciel, gratuit,   est capable de    convertir   le   _P_o_s_t_S_c_r_i_p_t  en
  langage  comprehensible  par   votre   imprimante (si le    pilote est
  disponible).  Il  joue   le role de   filtre  afin que vous   puissiez
  considerer   votre    imprimante   comme    _P_o_s_t_S_c_r_i_p_t.    Ceci   vous
  simplifie grandement la vie.

  _G_h_o_s_t_S_c_r_i_p_t est disponible sous deux formes.  Une version commerciale,
  appelee  _A_l_l_a_d_i_n _G_h_o_s_t_S_c_r_i_p_t, peut etre   utilisee librement pour  des
  besoins   prives  mais  ne   doit   pas   etre  distribuee  par    les
  distributions  payantes   de    Linux.   Elle   est  generalement   en
  avance  d'une annee sur   la version gratuite.

  La  version gratuite est  sous licence   GNU  et n'est  rien   d'autre
  qu'une version plus ancienne de _A_l_l_a_d_i_n _G_h_o_s_t_S_c_r_i_p_t.

  1111..11..11..  UUttiilliisseerr GGhhoossttSSccrriipptt

  gs  est  le  nom  de l'executable. gs -help vous donne une aide rapide
  sur  les  parametres disponibles.  (La   liste   des  pilotes  est  la
  liste des pilotes compiles avec  la version et non la liste complete.)
  Quoi que vous fassiez avec gs, il est  conseille  d'invalider  l'acces
  aux     fichiers    (par    -dSAFER).     En   effet _P_o_s_t_S_c_r_i_p_t est un
  langage  pleinement  operationnel  et  un   fichier   _P_o_s_t_S_c_r_i_p_t   peu
  scrupuleux  peut  endommager  vos  fichiers et vous donner un terrible
  mal de crane..

  Exemple de ligne de commande pour un imprimante Stylus 800

       gs -dNOPAUSE -sDEVICE=escp2 -sPAPERSIZE=a4 -sOutputFile=/dev/lp1 fichier.ps

  1111..11..22..  RReeggllaaggeess

  La  taille,   l'aspect et la    situation d'une image   sur  une  page
  sont  regles  par  le   pilote  de  l'imprimante dans _G_h_o_s_t_S_c_r_i_p_t.  Si
  vous   trouvez   que  vos   impressions    sont    tronquees   ou  mal
  cadrees     il     faudra    soit  retoucher  le      code   du pilote
  (deconseille),   soit  modifier   les    fichiers   de   configuration
  (gs_init.ps, gamma.ps)

  1111..11..33..  GGaammmmaa,, ttaaiilllleess ddee ppooiinnttss,, ......

  Il  se  peut que vous trouviez  vos   impressions trop  sombres.  Ceci
  peut arriver si votre imprimante n'a pas  une  definition  suffisante.
  Dans  ce  cas vous devez  creer votre  propre  fonction de  transfert.
  Pour  ceci,  creez  le  fichier   gamma.ps  dans  le   repertoire  des
  librairies   de  _G_h_o_s_t_S_c_r_i_p_t  et   appelez le fichier  sur la ligne de
  commande de  gs  avant  le  fichier  a  imprimer.  Pour  eclaricir  le
  resultat,   vous     devez     diminuer   les    valeurs    indiquees.
  Notamment si votre pilote utilise l'algorithme de _F_l_o_y_d_-_S_t_e_i_n_b_e_r_g pour
  rasteriser   les  couleurs, des  valeurs comprises  entre  0.15 et 0.2
  sont mieux adaptees.

            ---8<---- gamma.ps ----8<---
            %!
            %transfer functions for cyan magenta yellow black
            {0.3 exp} {0.3 exp} {0.3 exp} {0.3 exp} setcolortransfer
            ---8<------------------8<---

  Vous  pouvez     aussi   modifier   les    dominantes    de   couleurs
  (voir   le repertoire /examples de  _G_h_o_s_t_S_c_r_i_p_t  qui contient une page
  de test des couleurs).

  1122..  LL''iimmpprreessssiioonn aa ddiissttaannccee

  Une des caracteristiques de lpd est qu'il  supporte  l'impression  sur
  des   imprimantes   rattachees  a   d'autres   machines  que la votre.
  Avec, en  plus,  une  combinaison   de  filtres  soignee,  vous  aurez
  un systeme   d'impression  transparent,    reparti et performant.
  1122..11..  VVeerrss uunn hhoottee UUnniixx//llppdd

  Pour    que      des    machines    distantes      puissent   utiliser
  l'imprimante attachee a   votre machine, le   nom   de  ces   machines
  doit  etre  reference      soit  dans    le    fichier /etc/hosts.lpd,
  soit   dans le  fichier   /etc/hosts.equiv.   Ce  sont   des  fichiers
  textes   normaux,  dans  lesquels  on   indique un  nom de machine par
  ligne.

  Il  est  preferable  de  declarer les   machines  dans  /etc/hosts.lpd
  qui   est   specialement   reserve   a   l'impression,   le    fichier
  /etc/hosts.equiv  donnant des droits plus etendus.

  Vous  pouvez restreindre les droits  d'acces distants  par  groupe  ou
  par  utilisateur.    Les     groupes  autorises sont    indiques grace
  au        parametre    :rg=:      du    fichier   printcap:   rg=admin
  restreint       l'utilisation          aux   utilisateurs   du  groupe
  admin.  Le   parametre booleen :rs=:  du  meme    fichier    restreint
  l'acces  aux utilisateurs ayant un compte sur votre machine.

  1122..11..11..  AAvveecc llppdd

  Pour   imprimer  vers  une  autre   machine,  vous  devez  creer   une
  entree printcap telle que:

            # REMOTE djet500
            lp|dj|deskjet:\
                    :sd=/var/spool/lpd/dj:\
                    :rm=machine.out.there.com:\
                    :rp=printername:\
                    :lp=/dev/null:\
                    :sh:

  Vous noterez qu'il doit  bien exister un  repertoire de  spool   local
  gere   par  votre lpd  local. Les fichiers soumis y seront copies puis
  envoyes vers la machine distante.

  1122..11..22..  AAvveecc rrllpprr

  Vous pouvez utiliser  rlpr  pour soumettre une  impression directement
  a  la  machine  distante  sans  passer  par un demon local et toute sa
  configuration.   C'est  particulierement  interessant   lorsque   vous
  imprimer rarement et vers differentes imprimantes.

  rlpr   s'appuie   sur  TCP/IP.   Il  n'est  pas  necessaires  que  les
  imprimantes soient connues   explicitement.   N'ayant  pas  besoin  de
  fichier  printcap, il est plus facile a gerer.  Il est compatible avec
  lpr.

  1122..22..  LLaannMMaannaaggeerr oouu SSaammbbaa..  IImmpprriimmeerr vveerrss  uunnee  iimmpprriimmaannttee   aattttaacchheeee
  aa   WWiinnddoowwss  9955,, NNTT,,

  Il  existe un   mini-document  (Printing   to   Windows   HOWTO)   qui
  decrit ceci tres bien.

  Il est possible de rediriger une file lpd vers un service d'impression
  SMB       grace           au            programme            smbclient
  (http://www.picante.com/~gtaylor/pht/man/smbclient.html).        Samba
  contient un script (smbprint) qui fait cela.   Vous  devez  mettre  un
  fichier  de   configuration   pour  l'imprimante   en  question   dans
  le repertoire de spool  et decrire le programme smbprint en  tant  que
  filtre dans /etc/printcap:

            lp|remote-smbprinter:\
                :lp=/dev/null:sh:\
                :sd=/var/spool/lpd/lp:\
                :if=/usr/local/sbin/smbprint:

  Vous    pouvez  egalement  utiliser     le  programme  smbclient  pour
  soumettre un fichier directement a un  service d'impression  SMB  sans
  impliquer  lpd.   Lisez  la  documentation de tous ces programmes pour
  plus d'information.

  1122..33..  VVeerrss uunnee iimmpprriimmaannttee NNeettWWaarree

  La suite     logicielle ncpfs  contient    un utilitaire appele nprint
  qui  fournit  les  memes fonctionnalites que smbprint pour    NetWare.
  Vous               pouvez               l'obtenir                  sur
  ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/.        Avec
  ncpfs vous pouvez  monter  des volumes    du  serveur  NetWare    sous
  Linux.    Vous   pouvez egalement  soumettre  des travaux d'impression
  vers  NetWare ou mettre  des  travaux  d'impression   de   NetWare  en
  file  sur  votre  systeme Linux.    Vous devez disposer   d'un  noyaux
  1.2.x  ou 1.3.54   et ulterieur.   ncpfs NNEE fonctionne   PPAASS  avec  un
  noyau 1.3.x (x < 54).

  Pour  que   nprint  fonctionne  via  lpd,  vous devez ecrire un shell-
  script    pour   diriger  stdin   sur    l'imprimante  NetWare.   Vous
  l'installerez  comme   un    filtre   (if)  d'une file    d'impression
  lpd. Vous obtiendrez :

       sub2|remote-NWprinter:\
                    :lp=/dev/null:sh:\
                    :sd=/var/spool/lpd/sub2:\
                    :if=/var/spool/lpd/nprint-script:

  le script nprint-script ressemble a quelque chose comme :

            #! /bin/sh
            # Essayez en premier le compte invite (guest)sans mot de passe!
            /usr/local/bin/nprint -S net -U name -P passwd -q printq-name -

  1122..44..  VVeerrss uunnee iimmpprriimmaannttee EEtthheerrTTaallkk

  Le     paquetage  logiciel netatalk    contient l'equivalent de nprint
  et      smbclient.         Referez-vous      au  Netatalk-HOWTO   dans
  lequel      est  bien   decrite   la procedure  d'impression  vers  et
  depuis un reseau _A_p_p_l_e.

  1122..55..  VVeerrss uunnee iimmpprriimmaannttee HHPP oouu aauuttrree iimmpprriimmaannttee EEtthheerrnneett

  Certaines  imprimantes    (HP  et  autres)    sont fournies  avec  une
  interface  Ethernet  que  vous   pouvez  directement  adresser    pour
  soumettre  vos  travaux d'impression.    Conformez-vous    au   manuel
  du    constructeur.    En general,  ces imprimantes  font  ``tourner''
  un   lpd  et fournissent une ou  plusieurs files vers  lesquelles vous
  pouvez imprimer.  Une imprimante  HP, par exemple, pourra  fonctionner
  avec une entree printcap telle que:

       lj-5|remote-hplj:\
                    :lp=/dev/null:sh:\
                    :sd=/var/spool/lpd/lj-5:\
                    :rm=printer.name.com:rp=raw:

  Les     imprimantes  LaserJet    HP  avec  une   interface   JetDirect
  ont  en general deux files  incorporees; l'une ``raw'' accepte le  PCL
  (et  peut-etre  le  PostScript),  l'autre ``text'' accepte l'ascii pur
  (et    s'arrange     pour   resoudre     d'elle-meme    les  problemes
  d'effets d'escalier).

  Dans   un   environnement   dans    lequel  plusieurs  imprimantes  ne
  supportent pas le  _P_o_s_t_S_c_r_i_p_t,  il  peut etre   bon  de configurer  un
  serveur  d'impression dedie vers lequel  toutes les machines enverront
  leurs travaux et sur lequel GhostScript tournera.

  1122..66..  VVeerrss dd''aanncciieennnneess HHPP

  Certaines anciennes imprimantes HP ne  supportent qu'un protocole  mal
  foutu  s'appuyant  sur    des    connexions     TCP,  notamment    les
  premiers modeles a base de cartes JetDirect (et quelques JetDirectEx).
  Pour   imprimer  vers  de  telles   imprimantes, vous devez ouvrir une
  connexion  TCP   vers   un  port  dedie   (9100)   et  envoyer   votre
  impression vers cette connexion. Voici le script Perl correspondant :

       #!/usr/bin/perl
       # Thanks to Dan McLaughlin for writing the original version of this
       # script (And to Jim W. Jones for sitting next to Dan when writing me
       # for help ;)

       $fileName = @ARGV[0];

       open(IN,"$fileName") || die "Can't open file $fileName";

       $dpi300     = "\x1B*t300R";
       $dosCr      = "\x1B&k3G";
       $ends = "\x0A";

       $port =  9100 unless $port;
       $them = "bach.sr.hp.com" unless $them;

       $AF_INET = 2;
       $SOCK_STREAM = 1;
       $SIG{'INT'} = 'dokill';
       $sockaddr = 'S n a4 x8';

       chop($hostname = `hostname`);
       ($name,$aliases,$proto) = getprotobyname('tcp');
       ($name,$aliases,$port) = getservbyname($port,'tcp')
           unless $port =~ /^\d+$/;;

       ($name,$aliases,$type,$len,$thisaddr) =
               gethostbyname($hostname);
       ($name,$aliases,$type,$len,$thataddr) = gethostbyname($them);
       $this = pack($sockaddr, $AF_INET, 0, $thisaddr);
       $that = pack($sockaddr, $AF_INET, $port, $thataddr);

       if (socket(S, $AF_INET, $SOCK_STREAM, $proto)) {
       #    print "socket ok\n";
       }
       else {
           die $!;
       }
       # Give the socket an address.
       if (bind(S, $this)) {
       #    print "bind ok\n";
       }
       else {
           die $!;
       }

       # Call up the server.

       if (connect(S,$that)) {
       #    print "connect ok\n";
       }
       else {
           die $!;
       }

       # Set socket to be command buffered.

       select(S); $| = 1; select(STDOUT);

       #    print S "@PJL ECHO Hi $hostname! $ends";
       #    print S "@PJL OPMSG DISPLAY=\"Job $whoami\" $ends";
       #    print S $dpi300;

       # Avoid deadlock by forking.

       if($child = fork) {
           print S $dosCr;
           print S $TimesNewR;

           while (<IN>) {
               print S;
           }
           sleep 3;
           do dokill();
       } else {
           while(<S>) {
               print;
           }
       }

       sub dokill {
           kill 9,$child if $child;
       }

  1122..77..  LLeess ffiillttrreess dd''eennttrreeee ppoouurr ddeess iimmpprriimmaanntteess ddiissttaanntteess

  Une  des   bizarreries  de   lpd  est  que le   filtre   d'entree (if)
  n'est pas    execute    pour  des    imprimantes  distantes.  Si  vous
  devez  absolument  passer  par  un   filtre,   il vous faudra utiliser
  deux  files,   la    premiere    redirigeant   vers      la  deuxieme.
  Par exemple :

            lj-5:remote-hplj:\
                    :lp=/dev/null:sh:\
                    :sd=/var/spool/lpd/lj-5:\
                    :if=/usr/lib/lpd/filter-lj-5:
            lj-5-remote:lp=/dev/null:sh:rm=printer.name.com:\
                    :rp=raw:sd=/var/spool/lpd/lj-5-raw:

  et le filtre filter-lj-5 (exemple):

            #!/bin/sh
            gs <options> -q -dSAFER -sOutputFile=- - | \
                    lpr -Plj-5-remote -U$5

  L'option  -U  ne fonctionne que si  lpr est lance en tant  que  demon.
  Elle   positionne  correctement   le    nom    du  soumissionnaire  du
  travail    dans   la  deuxieme   queue.     Il serait d'ailleurs mieux
  d'utiliser   une  methode  plus  sure   pour recuperer ce  nom car  ce
  n'est pas toujours  le 5eme parametre.

  1122..88..  IImmpprriimmeerr ddeeppuuiiss WWiinnddoowwss

  L'impression  depuis  un  client  Windows  vers  un   serveur Unix est
  directement supporte  par SMB en  utilisant le  paquetage  SAMBA  (qui
  supporte  egalement  le  partage   de  fichiers du systeme de fichiers
  Linux vers les clients Windows).

  Samba est fourni avec une documentation  complete.  Vous  pouvez  soit
  installer un  filtre magique sur Linux et  imprimer du _P_o_s_t_S_c_r_i_p_t soit
  installer un pilote     d'imprimante  specifique sous     Windows   et
  decrire  une   file sans   filtre.    En s'appuyant sur   les  pilotes
  Windows, vous pourrez obtenir de meilleurs  resultats, mais  c'est  un
  peu  plus  complique  a administrer si   vous avez plusieurs  stations
  sous Windows.  Donc essayez d'abord la premiere solution.

  1122..99..  DDeeppuuiiss NNeettwwaarree

  Il y  a des services  NetWare disponibles  pour Linux,  mais  je  n'ai
  aucune  idee  si    vous  pouvez  offrir   des   services d'impression
  depuis des client Netware. Des informations sont les bienvenues.

  1122..1100..  DDeeppuuiiss uunn AAppppllee

  Netatalk permet d'imprimer depuis une  station  Apple  sur  EtherTalk.
  Voir le Netatalk   HOWTO (http://thehamptons.com/anders/netatalk) pour
  de plus amples renseignements.

  1122..1111..  IImmpprriimmeerr vveerrss uunn ffaaxx

  1122..1111..11..  UUttiilliisseerr uunn mmooddeemm//ffaaxx

  Si    vous disposez   d'un   modem/fax,   vous     pouvez   configurer
  votre  systeme    pour     envoyer   ou   recevoir    des    fax   aux
  formats _P_o_s_t_S_c_r_i_p_t, dvi, ascii, etc...  Vous  pourrez  meme  faire  en
  sorte que votre courrier electronique soit faxe!

  Les   modems/Fax  supportent  les  commandes   de classe 1  ou 2.  Les
  modems de classe  1 ont un  sous-ensemble  de fonctionnalites d'un fax
  disons  traditionnel  (donc, le logiciel doit faire le reste...  et le
  cout de traitement est parfois critique!)

  La classe 1  correspond   au  standard   EIA   578.   Les   modems  de
  classe   2  repondent   au  sandard  EIA   592. Vous trouverez dans la
  documentation de votre  modem a  quelle   classe   il  appartient.  Ne
  confondez  pas classe et groupe. Le  groupe est generalement le groupe
  III.

  Les logiciels de  fax  tournant sous  Linux  doivent savoir  convertir
  les donnees recues  en  un format  compatible  avec le groupe III pour
  la  transmission.  Comme d'habitude  _G_h_o_s_t_s_c_r_i_p_t    sait  faire  !  Le
  pilote tiffg3 genere des  messages fax encodes au format g3/tiff. Vous
  devrez  compiler et integrer le pilote si ce n'est deja fait.
  Un des logiciels    les plus complets    sur  le sujet,   HylaFax  est
  disponible sur :

            ftp.sgi.com:/sgi/fax/?????.src.tar.Z

  Il   supporte  toutes  sortes de  choses comme  les  multiples  modems
  et  la diffusion.

  mgetty    + sendfax  est un    couple   de  logiciels,  contenant   un
  getty pour Linux et les modems fax ainsi qu'un logiciel d'envoi de fax
  assez simple.  Ce paquetage se trouve a:

            sunsite.unc.edu:/pub/Linux/system/serial/getty/mgetty+sendfax-1.0.0.tar.gz

  Enfin, efax merite   d'etre mentionne.    C'est   un  excellent  choix
  pour Linux. Il supporte les classes 1 et 2.

            sunsite.unc.edu:/pub/Linux/apps/serialcomm/fax/efax08a.tar.gz

  (Repertoire      dans       lequel      on        trouvera   egalement
  vfax10.tar.z,                                          qfax1.3.tar.gz,
  xfax.v1.07s.tar.gz)

  1122..1111..22..  UUttiilliisseerr llee sseerrvviiccee dd''iimmpprreessssiioonn ddiissttaanntt

  C'est  un  service experimental vous  permettant d'envoyer un courrier
  electronique que  vous souhaitez imprimer sur un  fax   distant.   Des
  formats  tels  que PostScript  sont supportes. Bien que  la couverture
  geographique   de  ce  service  soit   tres   faible,   il   est  tres
  prometteur.      Pour             plus         d'information, referez-
  vous    au    site    Web     ``Remote    Printing       WWW    Site''
  (http://www.tpc.int/).

  1133..  LLeess llooggiicciieellss qquuii ppeerrmmeetttteenntt ddee rreeaalliisseerr ddee bbeelllleess iimmpprreessssiioonnss

  Linux sait faire tourner un grand nombre de   binaires  avec  plus  ou
  moins  de  reussite:   Linux/x86,  Linux/Alpha,    Linux/Sparc,  iBCS,
  Windows  (Un jour, avec  Wine),  Mac/68k   (avec  Executor)  et  Java.
  WordPerfect,   traitement  de   texte  commercial  tourne   bien  avec
  l'emulation  iBCS.  La  suite  Corel  Office  en  Java  est  egalement
  prometteuse...)

  En  ce  qui concerne Linux, les choix  sont limites aux logiciels Unix
  classiques:

  1133..11..  LLeess llaannggaaggeess aa bbaalliisseess

  La  plupart  des  langages  balises  sont  bien  adaptes  aux  projets
  consequents   ou   repetitifs   pour   lesquels   vous  souhaitez  que
  l'ordinateur  controle la mise  en forme  pour un  resultat  homogene.
  Vouloir   ajouter   un   bel  effet   dans  un  tel  langage  choquera
  certainement.

  1133..11..11..  nnrrooffff

  C'est l'un des plus anciens langages balises sous Unix. Les  pages  de
  manuel  en  ligne sont l'exemple le  plus connu de pages formattees en
  macros  nroff; beaucoup de gens ne  jurent que par   lui...   mais  sa
  syntaxe  est  quand  meme  plus  compliquee  que  necessaire; ce n'est
  certainement  pas   le bon     choix   pour  les    nouveaux  projets.
  Il  est  interessant de savoir que  vous pouvez imprimer  une page  de
  manuel directement en   PostScript avec groff.   La  syntaxe   est  la
  suivante: man -t truc | lpr. Le resultat en vaut vraiment la peine.

  1133..11..22..  TTeeXX

  TeX  (et  le paquetage de macros LaTeX) est  l'un des langages balises
  le   plus repandu sous Unix.  Les   travaux  techniques  sont  souvent
  rediges  en LaTeX parce qu'il  simplifie grandement la mise en page et
  il  est   l'un  des  rares   logiciels  a  traiter  correctement    et
  puissamment  les   fomules mathematiques. Le format  de  sortie de TeX
  est  dvi, et  peut  etre  converti  en  _P_o_s_t_S_c_r_i_p_t  ou   PCL   (HP)  a
  l'aide du programme dvips ou dvilj.

  1133..11..33..  SSGGMMLL

  Il  y  a au moins un interpreteur de SGML gratuit  sous Unix et Linux;
  il est    la base  du systeme    de documentation  LinuxDoc-SGML.   Il
  supporte bien entendu d'autres types de documents.

  1133..11..44..  HHTTMMLL

  Bien connu, il permet d'ecrire des documents simples.

  1133..22..  TTrraaiitteemmeennttss ddee tteexxtteess WWYYSSIIWWYYGG

  Ca   y  est!  Linux  et   Unix ne manquent plus de  tels traitement de
  texte. Il existe plusieurs  suites  logicielles  dont  une  disponible
  gratuitement pour une utilisation personnelle: _S_t_a_r_O_f_f_i_c_e.

  1133..22..11..  SSttaarrOOffffiiccee

  Une  compagnie allemande  distribue  StarOffice pour  Linux.   On peut
  trouver une version libre de droits  sur les serveurs ftp  classiques.
  Cette  version   est    limitee  a  un   usage personnel.  Cette suite
  logicielle est   tres complete; vous  trouverez   tout  ce  dont  vous
  reviez.    Il   existe  d'ailleurs  un   mini-HOWTO   decrivant ou  la
  trouver et  comment l'lnstaller.  La   plupart  des  imprimantes  sont
  reconnues.

  1133..22..22..  LLyyXX

  LyX est une   interface pour LaTeX assez prometteuse.  Rendez-vous sur
  la          page         Web      de          Lyx       a  http://www-
  pu.informatik.uni-tuebingen.de/users/ettrich/   pour   de  plus amples
  renseignements.

  1133..22..33..  LL''iinntteerrffaaccee uuttiilliissaatteeuurr ''AAnnddrreeww''

  Cette  interface comprend un  editeur WYSIWYG  appele ez comportant la
  plupart  des  fonctionnalites  de base d'un traitement de texte: HTML,
  et MIME pour courrier et  forums de  discussions   (niouzes,  si  vous
  preferez).

  1133..22..44..  OOffffrreess ccoommmmeerrcciiaalleess

  Caldera    et    Red    Hat   vendent      des  paquetages   logiciels
  comprenant les applications  principales,  a savoir un  traitement  de
  texte  et  un  tableur.   Caldera  vend  egalement (a verifier)  WABI,
  l'emulation   Windows  de  Sun qui   permet   de faire    tourner  les
  applications de Microsoft bien connues.

  Pour      plus    d'information,      consultez     les     sites   de
  Caldera  (http://www.caldera.com)         et            de         Red
  Hat (http://www.redhat.com).

  D'autres  vendeurs  peuvent  m'envoyer  un courrier descriptif de leur
  offre.

  1144..  LLooggiicciieellss ddee pprree--vviissuuaalliissaattiioonn

  Tout ce que vous imprimez peut etre  egalement  visualise  a  l'ecran.
  Ceci permet  dans bien des cas d'economiser du papier.

  1144..11..  PPoossttSSccrriipptt

  GhostScript     possede    un   pilote  X11  utilise    par  Ghostview
  (http://www.picante.com/~gtaylor/pht/man/ghostview.html).           La
  derniere  version  de  ce   logiciel  devrait   permettre egalement la
  visualisation de fichiers au format PDF.

  1144..22..  TTeeXX ddvvii

  les fichiers TeX    dvi    (DeVice Independent  -    independant    du
  peripherique)     peuvent      etre    visualises    sous     X11    a
  l'aide                              de                            xdvi
  (http://www.picante.com/~gtaylor/pht/man/xdvi.html).    Les   versions
  recentes  de  xdvi  appellent   ghostscript    pour   le   rendu    de
  specificites _P_o_s_t_S_c_r_i_p_t.

  Un  pilote  VT100   (dgvt)   existe egalement.  Tmview fonctionne sous
  Linux avec svgalib, si cela vous suffit.

  1144..33..  AAddoobbee PPDDFF

  _A_c_r_o_b_a_t  _R_e_a_d_e_r d'Adobe  est  disponible pour Linux.   Vous  pouvez le
  charger  depuis  http://www.adobe.com.  Vous pouvez egalement utiliser
  xpdf, un logiciel   gratuit  fournit avec  les  sources.  _G_h_o_s_t_S_c_r_i_p_t,
  devrait, comme je l'ai dit plus haut, supporter le format pdf.

  1155..  LLeess iimmpprriimmaanntteess sseerriiee

  Le  demon  lpd fournit cinq attributs que vous pouvez positionner dans
  /etc/printcap afin  de  controler le  port serie sur lequel se  trouve
  votre imprimante.

       br
            (numerique) definit le taux de transfert en bauds (appel a ioctl(2))
       fc
            (num) efface des indicateurs (sgtty.h)
       fs
            (num) positionne des indicateurs (inverse de `fc')
       xc

       xs

  Pour   definir    la      vitesse   du     port,  la    syntaxe    est
  evidente. Exemple: br .Pp

  Les autres parametres a positionner correspondent  a  un  ensemble  de
  bits,  que  l'on  pourra  soit   positionner,   soit  mettre a 0. Pour
  effacer des bits, on utilisera les  parametres  fc  et  xc,  pour  les
  positionner, fs et xs.

  Faites  bien  attention aux bits  que vous selectionnez.  Mais au fait
  que sont-ils  ?  Souvenez-vous..., la  commande stty.  Elle indique de
  nombreux   parametres  caracterisant  un   tty.   La commande stty  -a
  affiche en clair  les  parametres du tty, certains  d'entre-eux  etant
  precedes  d'un  tiret   s'ils  sont invalides et sans tiret s'ils sont
  valides.  La commande stty peut   etre    appliques  au  port    serie
  (voir  exemple).   Ce sont certains de   ces parametres (des drapeaux,
  des flags, donc des bits) que l'on va manipuler.

       # stty -a < /dev/ttyS2
            speed 9600 baud; rows 0; columns 0; line = 0;
            intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
            eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
            lnext = ^V; min = 1; time = 0;
            -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
            -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
            -igncr -icrnl ixon -ixoff -iuclc -ixany -imaxbel
            -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0
            bs0 vt0 ff0
            -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
            -echoprt -echoctl -echoke

  Note:    utilisez  toujours   stty    de  cette    facon    (stty    <
  /dev/ttyS?); cette command utilise en effet l'entree standard).

  Vous pouvez utiliser cette commande pour configurer le port de facon a
  obtenir  une      impression    correcte.       Par   exemple,     les
  differences   que   l'on  peut   noter  entre le  stty   ci-dessus  et
  l'initialisation du port  au  demarrage de  ma   machine  reside  dans
  les  informations  -clocal, -crtscts et  ixon.  (La   configuration de
  votre   port  pourra   tres  bien  etre differente  selon  la  maniere
  dont votre imprimante gere le controle de flux).

  Votre   port  etant bien configure, faites  : cat fichier > /dev/ttyS?
  (? est  le numero de  votre  port) pour  imprimer un fichier.

  Imprimez               par                exemple                   le
  fichier     /usr/src/linux/include/asm-i386/termbits.h.           Vous
  y decouvrirez  un   tas    de  definitions   de    constantes  et   de
  structures.    Nous  allons  voir  quelles  valeurs definies  dans  ce
  fichier vont nous servir pour configurer le port,  non plus avec stty,
  mais  avec  les  parametres  fc,   xc,  fs  et xs du fichier printcap.
  Regardez la section commencant par :

            /* c_cflag bit meaning */
            #define CBAUD   0010017

  Elle decrit justement les bits manipulables a l'aide de fc et fs  dont
  on  parlait.  On  y voit les constantes des  vitesses de modulation en
  baud, puis des lignes  qui  nous  interessent  particulierement  :  ce
  sont   les  memes      parametres   que dans   la   commande stty.  Je
  sens que  vous voyez ou  on veut en venir.  stty n'est qu'un interface
  necessaire au positionnement (ou  effacement) de bits.

  Vous   savez  maintenant   que    chaque parametre   affiche  par stty
  correspond a un bit, et qui ont  la valeur 0 lorsqu'il y  a  un  tiret
  devant.   Notez  alors  les  bits  a  effacer   (ce  sera fait avec la
  parametre fc) et ceux a positionner (parametre fs).   Exemple:   `fcfc
  semble   surcharger  le   parametre   br,  donc  prenez  garde  a  les
  positionner correctement).

  Ensuite  occupez-vous des bits  a positionner. Par exemple  s'il  faut
  positionner    les    bits   cs8,   hupcl  et    cread,  regardez  les
  constantes    CS8     (0000060),    HUPCL    (0002000)     et    CREAD
  (0000200).   Pensez   a  la  vitesse de  modulation qu'il  faut  aussi
  definir, dans mon cas,   ce  sera  B9600   (0000015).  Tous  ces  bits
  ensemble   font  `0002275'.    Indiquez  cette   valeur  au  parametre
  fs.

  Effectuez   les    meme   reglages     avec   la   section    suivante
  intitulee

            /* c_lflag bits */

  Dans   mon cas  je n'ai rien   a  positionner, j'ai  donc simplement a
  fournir  la  valeur  xcvotre  fichier  printcap  correctement  defini,
  essayez  d'imprimer.  Si quelque chose ne va pas, continuez a lire les
  paragraphes suivants.

  Souvenez-vous  de toujours commencer par  les  bits que vous souhaitez
  voir  a   0   (fc    et  xc), puis   de   definir  seulement apres des
  bits a positionner (fs et xs).

  La  commande cat   fonctionne  pour  le port  serie,  mais  pas lpd

  La mise en place de lpd n'est  pas traitee ici,  mais  sachez  que  si
  vous    avez   des    problemes  avec    la    configuration  du  port
  serie,  vous  pouvez empecher  lpd  de  le  configurer en  considerant
  votre   imprimante  comme ne  presentant  pas  une interface  normale.
  Lisez egalement   a ce propos le chapitre suivant.

  Donnez  a     votre      imprimante    le     peripherique  /dev/null1
  (mknod /dev/null1  c  1   3). N'utilisez pas /dev/null, pour    ne pas
  qu'il    soit ouvert  de  maniere exclusive. Enlevez   les  parametres
  de vitesse et  de positionnement des bits du fichier printcap.

  Creez un shell-script comme ci-dessous :

                #!/bin/sh
                echo if: $* >> /var/spool/lpd/results
                # /dev/lp est un lien vers /dev/ttyS2 auquel est reliee l'imprimante
                exec votre_vieux_filtre $* > /dev/lp

                #!/bin/sh
                echo if: $* >> /var/spool/lpd/results
                cat > /dev/lp
                # la commande ``echo -ne'' suppose que /bin/sh correspond a bash
                echo -en \\f > /dev/lp

  Donnez-lui     les   droits   de    lecture/ecriture   pour  tout   le
  monde. Essayez-le: /usr/lib/lpd/if <FICHIER.

  Definissez  un  filtre    d'entree   dans   votre     fichier printcap
  pour appeler ce script. :if=/usr/lib/lpd/if:.

  Utilisez     la  commande     stty     pour     configurer  le    port
  correctement.  Essayez d'imprimer.  Vous  devriez  pouvoir  determiner
  si  le(s)  fichier(s) sont bien mis dans le repertoire de spool.  Cela
  devrait  imprimer,  si  votre  essai  manuel  du  script  precedent  a
  fonctionne.    Bien  entendu, le mieux  serait de pouvoir se passer du
  script d'entree et donc du parametre if.

  Supposons   donc   que    la  methode  precedente    a fonctionne,  et
  que   vous   pensez  avoir   correctement  configure  votre    fichier
  printcap.   Executez    la     commande  stty    -a  </dev/ttyS?.   Si
  certains  parametres  ne  sont pas corrects, verifiez   les constantes
  du    fichier termbits.h.  Si  la  configuration    est    incorrecte,
  malgre   tous    vos  efforts   de verification,  n'hesitez    pas   a
  installer   un demon recent.

  1155..11..  IImmpprriimmaanntteess aanncciieennnneess eett ccaarraacctteerreess ppeerrdduuss

  Certaines  anciennes  imprimantes  series  ont  des   petits   tampons
  memoire  et  gerent   mal  le controle  de flux.  Supprimer le FIFO du
  port serie  (16550)  avec setserial  (faites croire  a  setserial  que
  c'est un port 8250 et ca marchera).

  1166..  CCoommpplleemmeennttss eett rreeggllaaggeess

  Si  votre     imprimante  est  _P_o_s_t_S_c_r_i_p_t,  elle    peut  ne  pas etre
  capable de traiter du texte pur.  Si tel  est  le  cas,   vous  devrez
  mettre en place un filtre pour transformer  le texte en _P_o_s_t_S_c_r_i_p_t. Un
  excellent freeware  (logiciel libre de tout   droit de distribution et
  d'utilisation)  appele  nenscript  realise cela tres bien.  Si vous ne
  mettez pas en place un  tel  filtre,   vous  devez  vous  assurer  par
  d'autres moyens que l'imprimante ne recoit bien que du _P_o_s_t_S_c_r_i_p_t.

  Vous    pouvez  egalement  definir   dans    vos  fichiers  de   login
  (.profile,  par   exemple)  ou  celui   par   defaut,   une   variable
  d'environnement     PRINTER  definissant  l'imprimante     a utiliser.
  Exemple:

            export PRINTER=lpr0

  Ceci  evite  d'avoir a       specifier -Plpr0 a chaque fois.

  Il est  possible de  ``reutiliser''  une  entree  printcap.   Si  vous
  declarez   votre  propre    machine  comme machine   hote distante, et
  une  autre   imprimante   comme  imprimante  distante,   vous   pouvez
  rediriger   les   donnees    a  imprimer  de    l'une   vers  l'autre.
  Souvenez-vous que  si vous  utilisez  cette technique,   les   donnees
  passeront    par  chaque   filtre  de  la  chaine   et   seront  mises
  successivement dans chaque spool.

  Bien que vous puissiez specifier  pour une imprimante  autant  d'alias
  que   vous   le   souhaitez,    il  semble   que   pour  la  meilleure
  utilisation, les deux premiers doivent  etre  identiques  et   doivent
  correspondre  au  nom  reel.   Certains    programmes    n'utiliseront
  que    ces   deux entrees. La  commande  lpc  indiquera  seulement  le
  premier   alias,   alors   que  les   commandes  lpr,   lprm   et  lpq
  comprennent  tous les alias.

  Plutot  que  de  specifier   une   taille  maximum  de  fichier   pour
  l'impression,  vous  prefereriez sans doute  que les fichiers du spool
  ne puissent remplir votre disque, meme temporairement. Pour ce  faire,
  creez   un     fichier   appele   minfree   dans  chaque repertoire de
  spool,  contenant, sous  forme   d'un  nombre  de  blocs  (1  Ko  pour
  Linux),  la  quantite  minimum  d'espace disque devant rester pour que
  les donnees puissent  etre  acceptees dans le spool.   Vous    creerez
  un       fichier   reel    dans      le repertoire    principal     de
  spool   et,       dans    chaque sous-repertoire, un  lien  symbolique
  vers ce fichier.

  1177..  RReessuummee

  Voici  un  guide   de   configuration  etape   par  etape   pour   une
  imprimante    nommee /dev/lp0. Vous pouvez l'etendre  a  votre  guise.
  Pour faire ce qui suit,  vous devez etre root.  (NDT:  L'auteur a tout
  installe dans /usr/spool/lpd.  J'ai prefere     modifier    legerement
  cette  configuration     en  definissant  /usr/spool/lp/lpr0        et
  /usr/spool/lpd, comme dans la plupart des distributions)

  +o   Verifiez les droits   d'acces et  l'emplacement    de  lpr,  lprm,
     lpq,  lpc et lpd.   Voir a ce  propos: Les programmes importants.

  +o    Creez  le     repertoire   de    spool  pour  votre   imprimante,
     appelee dans notre exemple lpr0:

                mkdir /usr/spool/lp /usr/spool/lp/lpr0
                chowm root.lp /usr/spool/lp /usr/spool/lp/lpr0
                chmod ug=rwx,o=rx /usr/spool/lp /usr/spool/lp/lpr0

  +o   Creez un repertoire permettant au  demon  d'y  mettre  son  propre
     fichier de verrouillage lpd.lock:

           mkdir /usr/spool/lpd
           chowm root.lp /usr/spool/lpd
           chmod ug=rwx,o=rx /usr/spool/lpd

  +o     Dans     les       repertoires         /usr/spool/lp/lpr0     et
     /usr/spool/lpd,  creez  les  fichier  necessaires,  avec  les  bons
     droits   (Cette   manipulation   n'est  pas  necessaire  avec   les
     versions recentes du gestionnaire d'impression):

                cd /usr/spool/lp/lpr0
                touch .seq errs status lock
                chown root.lp .seq errs status lock
                chmod ug=rw,o=r errs status
                chmod u=rw,go=r lock
                chmod u=rw,g=r,o=x .seq

                cd /usr/spool/lpd
                touch .seq errs status lock
                chown root.lp .seq errs status lock
                chmod ug=rw,o=r errs status
                chmod u=rw,go=r lock
                chmod u=rw,g=r,o=x .seq

  +o    Creez    le          shell-script    filtre_entree     dans    le
     repertoire      /usr/spool/lp/lpr0.  Utilisez le      filtre decrit
     precedemment. Donnez-lui les bons droits.

                cd /usr/spool/lp/lpr0
                chmod ug=rwx,o=rx filtre_entree

  +o   Creez le fichier  /etc/printcap, s'il n'existe  pas.  Enlevez  les
     entrees   qu'il   contient et ajoutez   une entree de  test decrite
     precedemment.  Donnez-lui       les    droits -rw-r--r--.

  +o   Editez le fichier /etc/rc.d/rc.local ou rc.multi. Ajoutez la ligne
     /usr/sbin/lpd     a   la   fin.   Cela lancera    le demon au boot.
     Vous pouvez aussi le lancer a la main :

       root# /usr/sbin/lpd

  +o   Effectuez un test d'impression :

           ls -l | lpr -Plpr0

  +o   Regardez dans   /tmp   et  verifiez   la   presence    du  fichier
     testlp.out.  Il    devrait   contenir    le  listing  du repertoire
     dans lequel vous etiez.

  +o    Editez  /etc/printcap.    Dupliquez  l'entree  lpr0.   Vous  avez
     alors      2  entrees  identiques.        Dans  la premiere entree,
     changez, sur   la premiere   ligne  uniquement, les occurrences  de
     lpr0  par testlp.  Dans la  seconde entree, changez /dev/null   par
     le peripherique reel, par   exemple  /dev/lp0.  Dans   la   seconde
     entree, enlevez le champ if completement.

  +o    Rebootez  le  systeme    ou     tuez le demon  d'impression    et
     relancez-le,   afin       qu'il   reprenne      en     compte    le
     fichier /etc/printcap modifie.

  +o   Refaites un test  d'impression -  Allumez  votre imprimante.  Cela
     devrait imprimer!

                ls -l | lpr -Plpr0

  1188..  PPrroobblleemmeess aavveecc llaa LLaasseerrJJeett 55MM

  1188..11..  PPoossttSSccrriipptt

  Cette  imprimante   peut    poser des  problemes    d'impression    en
  PostScript.   Si   vous  constatez,   apres  avoir imprime un document
  PostScript, qu'elle ne  sort  plus les documents  suivants et  qu'elle
  affiche   ``DATA  RECEIVED''  en  permanence, suivez  les conseils qui
  suivent.  Merci a <Patrick.Begou@hmg.inpg.fr>.

  +o    l'imprimante  est  en   configuration   d'usine  avec   le   flag
     d'impression des erreurs postscript valide.

  +o  Le fichier printcap est tres simple:

       # /etc/printcap
       #
       # This file can be edited with the printtool in the control-panel.
       laser5M|lp:\
           :lp=/dev/lp2:\
           :sh:\
           :sd=/var/spool/lpd/laser5M:\
           :lf=/var/spool/lpd/laser5M/erreurs:\
           :if=/var/spool/lpd/laser5M/filter_court:

  +o    Le   filtre  utilise  (filter_court)   est  donne ci-dessous.  Il
     n'accepte  que  les  fichiers  _a_s_c_i_i,  _P_o_s_t_S_c_r_i_p_t   et   _P_o_s_t_S_c_r_i_p_t
     _c_o_m_p_r_e_s_s_e.   Ce   qui  est   interessant,   ce  sont   les  chaines
     d'initialisation en PCL.  En gros:

       \033%-12345X      passage en mode PCL (d'apres l'ingenieur de MDS)
       \033E             reinitialisation de l'imprimante les \n
                         semblent indispensables dans le filtre.

  Avec echo -ne, Esc c'est  033 en octal (27 en decimal )

  #!/bin/sh
  #
  # Filtre d'impression gerant l'ascii, le postscript et le postscript
  # compresse pour une laserjet  5M. A declarer comme filtre "if" dans
  # /etc/printcap.
  # Reinitialise l'imprimante entre chaque impression postscript pour
  # eviter les erreurs sur timeout.
  #
  # Version 0.1   P. BEGOU    8/97  (Patrick.Begou@hmg.inpg.fr)
  #
  # recuperation des donnees dans un fichier temporaire
  #
  FILE=/tmp/laser5M.$$
  cat - > ${FILE}
  #
  # Scrutation du type de fichier
  #
  filetype=`file $FILE| cut -d":" -f2`
  case $filetype in
    *PostScript*)
         (echo -ne "\033%-12345X\n"; cat ${FILE}; echo -ne "\033%-12345X\033E\033%-12345X\n")
          echo " $FILE postscript" >&2
          ;;
    *text*|*script*)
         (echo -ne "\033%-12345X\n"; /usr/bin/nenscript -s -2rG -p- ${FILE};
          echo -ne "\033%-12345X\033E\033%-12345X\n")
          echo " $FILE texte" >&2
          ;;
    *compress*)
         # verifions qu'il s'agit bien de postscript.
         resu=`zcat ${FILE} |head -1|grep "^%!"|wc -l`
         if [ ${resu} -eq 1 ]
         then
            (echo -ne "\033%-12345X\n"; zcat ${FILE}; echo -ne "\033%-12345X\033E\033%-12345X\n")
            echo " $FILE compresse" >&2
         else
            echo " $FILE compresse non reconnu" >&2
         fi
         ;;
    *)
          echo " $FILE non reconnu" >&2
          ;;
  esac

  #
  # On repond Ok, tout s'est bien passe.
  #
  rm ${FILE}
  exit 0

  1188..22..  RReeccttoo--vveerrssoo

  Voici comment configurer, par  logiciel, le  passage  en  mode  recto-
  seulement ou recto-verso aussi bien pour de l'ascii que du PostScript.

  Il suffit d'inserer apres la premiere ligne...

  %!Ado...

       %%BeginFeature: *Duplex DuplexNoTumble <<Duplex true  /Tumble  false>>
       setpagedevice %%EndFeature

  ou, pour valider le recto seul:

       %%BeginFeature:  *Duplex None <<Duplex false>> setpagedevice %%EndFea-
       ture

  1199..  IInnffoorrmmaattiioonnss ccoonncceerrnnaanntt ccee ddooccuummeenntt

  Sauf changements, les documents HOWTO sont places sous  copyright  par
  leurs  auteurs respectifs.  Les  documents  Linux HOWTO peuvent   etre
  reproduits  et distribues   en  tout ou  partie,  par   quelque  moyen
  physique    que   ce  soit,  sans   l'autorisation  de  l'auteur.  Les
  traductions et travaux  derives    sont   egalement     permis    sans
  autorisation  expresse.    La  distribution  a  titre  commercial  est
  permise  et  meme encouragee; cependant, l'auteur souhaiterait en etre
  averti.

  En bref, nous souhaitons que l'information contenue  dans ces document
  soit  repandue   le   plus  largement    possible.   Cependant,   nous
  souhaitons  maintenir  le  copyright sur ce document, et souhaiterions
  etre avertis de toute re-distribution.  Si vous  avez des questions  a
  ce   propos,  contactez  Greg   Hankins,  le nouveau coordinateur  des
  documents  Linux  HOWTO  a  l'adresse  <gregh@cc.gatech.edu>.      Son
  representant          francais          est         Eric         Dumas
  <dumas@freenix.fr,dumas@Linux.EU.Org>.

  Le Linux Printing Usage HOWTO
  Mark Komarinski, markk@auratek.com
  v1.2.1, 24 Mars 1997

  Ce  document est une aide a l'impression sous Linux et fournissant des
  informations pratiques sur des sujets de base.  Toute remarque ou com-
  mentaire  concernant ce HOWTO ou sa traduction peuvent etre envoyees a
  la personne concernee.

  11..  IInnttrroodduuccttiioonn

  Ce document decrit comment utiliser le systeme de gestion d'impression
  fourni  avec  le  systeme  d'exploitation  Linux.  Ce  HOWTO  vient en
  complement du HOWTO Comment imprimer sous Linux (Linux Printing  Setup
  HOWTO)  qui traite de l'installation et de la configuration du systeme
  d'impression sous Linux. Le contenu de ce  HOWTO  devrait  etre  d'une
  egale  utilite  pour toutes les declinaisons du systeme d'exploitation
  BSD en plus du systeme d'exploitation Linux.

  11..11..  HHiissttoorriiqquuee dduu PPrriinnttiinngg HHOOWWTTOO

  Note de Mark Komarinski markk@auratek.com :

  Je voudrais  remercier  Matt  Foster  pour  son  imposant  travail  de
  reecriture  de  ce  HOWTO.  Je  conserve son style et je procede a des
  ajouts pour garder le tout a jour.

  Note de Matt Foster mwf@engr.uark.edu :

  Cette version du Linux Printing HOWTO est une complete  reecriture  de
  l'original   ecrit  par  Grant  Taylor  grant@god.tufts.edu  et  Brian
  McCauley B.A.McCauley@bham.ac.uk. J'ai essaye de conserver le  contenu
  present dans le HOWTO de Grant et de Brian mais j'ai fortement modifie
  le style de presentation et la profondeur  des  notions  abordees.  Je
  trouve  que  cela  rend  le  HOWTO plus complet et plus facile a lire.
  J'espere seulement que vous en serez d'accord.

  11..22..  HHiissttoorriiqquuee ddeess vveerrssiioonnss

  +o  v1.2.1

  +o  mise a jour, quelques changements pour la publication Dr. Linux

  +o  v1.2

  +o  Imprimantes Windows

  +o  Changement de la taille maximale des fichiers d'impression

  +o  v1.11

  +o  Nouveau responsable

  +o  Ajout d'information sur lpc

  +o  Ajout d'information sur le depannage

  +o  Des notions sur l'impression de fichiers graphiques

  +o  v1.1

  +o  Revision du vocabulaire utilise

  +o  Etoffement de la section sur l'impression PostScript

  +o  Tentative de clarification des exemples

  +o  Complements sur les utilitaires basiques d'impression sous Linux

  +o  v1.0

  +o  Publication initiale du Printing Usage HOWTO

  11..33..  CCooppyyrriigghhttss eett MMaarrqquueess ddeeppoosseeeess

  Certains des noms mentionnes dans ce HOWTO font l'objet de  copyrights
  et/ou  de  marques  deposees par certaines personnes et/ou compagnies.
  Ces noms apparaissent entierement en majuscules ou  debutent  par  une
  majuscule dans ce HOWTO.

  (c) 1995 Matt Foster (mwf@engr.uark.edu)

  (c) 1996-1997 Mark F. Komarinski (markk@auratek.com)

  Toutes   les  traductions,  les  travaux  derives  ou  de  compilation
  incorporant n'importe lequel des  documents  HOWTO  Linux  doivent  se
  trouver sous le coup de ce copyright.

  Ainsi,  vous  ne  pouvez  pas produire un travail derive d'un HOWTO et
  imposer des restrictions additionnelles  quant  a  sa  diffusion.  Des
  exceptions   a  ces  regles  peuvent  etre  accordees  sous  certaines
  conditions ; veuillez contacter le  coordinateur  des  HOWTO  Linux  a
  l'adresse donnee plus bas.

  En   resume,   nous   voulons   promouvoir  la  dissemination  de  ces
  informations a travers autant de canaux que possible. Cependant,  nous
  souhaitons tout de meme conserver le copyright sur les documents HOWTO
  et  souhaiterions  etre  mis  au  courant  de  tous  les  projets   de
  redistribution des HOWTO.

  Si  vous  avez  des  questions,  veuillez  contacter  Greg Hankins, le
  coordinateur des HOWTO Linux,  a  gregh@sunsite.unc.edu.  Vous  pouvez
  utiliser  finger sur cette adresse pour obtenir un numero de telephone
  et d'autres informations pour la prise de contact.

  11..44..  TTeelleecchhaarrggeerr lleess HHOOWWTTOOss LLiinnuuxx ssuurr ll''iimmpprreessssiioonn

  Dans le cas ou vous voudriez imprimer une version de ce HOWTO, je vous
  recommande  de  telecharger  la  version PostScript. Elle est formatee
  d'une maniere qui la  rend  esthetiquement  plus  attrayante  et  plus
  facile  a  lire. Vous pouvez obtenir la version PostScript depuis l'un
  des  nombreux  sites  de  distribution  Linux  tel  que  SunSITE   (ou
  ftp.ibp.fr en France NdT).

  11..55..  CCoommmmeenntt nnoouuss ccoonnttaacctteerr

  Les questions, commentaires ou corrections concernant ce HOWTO peuvent
  etre envoyes a  markk@auratek.com.
  11..66..  RReemmeerrcciieemmeennttss

  Un grand merci a tous ceux qui ont pris le temps de  lire  la  version
  alpha  de  ce HOWTO et de me repondre avec de nombreux commentaires et
  suggestions dont certains pourront etre reconnus dans cette version.

  Je voudrais aussi remercier Matt Foster qui a effectue  la  reecriture
  originale.

  22..  IImmpprriimmeerr ssoouuss LLiinnuuxx

  Cette  section  decrit comment imprimer des fichiers, examiner la file
  d'impression, supprimer des travaux de la file d'impression,  formater
  des  fichiers avant de les imprimer ainsi que comment configurer votre
  environnement d'impression.

  22..11..  HHiissttoorriiqquuee ddee ll''iimmpprreessssiioonn ssoouuss LLiinnuuxx

  Le systeme d'impression de Linux, le gestionnaire lp, est  un  portage
  du  code  source ecrit par the Regents of the University of California
  pour la version BSD du systeme d'exploitation UNIX.

  22..22..  IImmpprriimmeerr uunn ffiicchhiieerr eenn uuttiilliissaanntt llpprr

  La maniere la plus simple, et de loin, d'imprimer un fichier  sous  le
  systeme  d'exploitation  Linux  est  de  l'envoyer  directement sur le
  peripherique d'impression. Une facon de le  faire  est  d'utiliser  la
  commande cat. En tant qu'utilisateur root, on peut faire quelque chose
  du genre :

       ______________________________________________________________________
       # cat thesis.txt > /dev/lp
       ______________________________________________________________________

  Dans  le  cas  present,  /dev/lp  est  un  lien  symbolique  vers   le
  peripherique d'impression reel, que ce soit une imprimante matricielle
  ou laser, un logiciel de mise en page ou un traceur.  (Cf  ln(1)  pour
  plus d'information sur les liens symboliques.)

  Pour  des  raisons  de  securite,  seulement l'utilisateur root et les
  utilisateurs dans le  meme  groupe  que  le  demon  d'impression  sont
  autorises  a  ecrire  directement sur l'imprimante. C'est pourquoi des
  commandes telles que lpr, lprm et  lpq  doivent  etre  utilisees  pour
  acceder a l'imprimante.

  De  ce  fait,  les  utilisateurs doivent utiliser lpr pour imprimer un
  fichier. La commande lpr prend  en  charge  tout  le  travail  initial
  necessaire a l'impression du fichier puis passe le controle a un autre
  programme,  lpd,  le  demon  d'impression.  Celui-ci   dit   alors   a
  l'imprimante comment imprimer le fichier.

  Quand lpr est execute, il commence par copier le fichier specifie vers
  un repertoire particulier (le repertoire spool) ou le fichier  demeure
  jusqu'a  ce  que  lpd  l'ait  imprime. Une fois que lpd est prevenu de
  l'existence d'un fichier a imprimer, il va produire une copie de  lui-
  meme   (ce  que  nous  programmeurs  appelons  forking).  Cette  copie
  imprimera alors notre fichier alors  que  l'original  attend  d'autres
  requetes  d'impression.  Cela  permet  a  de  multiples travaux d'etre
  integres a la queue au meme instant.

  La syntaxe de lpr(1) est tres familiere :

       ______________________________________________________________________
       $ lpr [ options ] [ nom_du_fichier ... ]
       ______________________________________________________________________

  Si un nom de fichier n'est pas specifie,  lpr  attend  une  entree  en
  provenance  de  l'entree  standard  (generalement  le  clavier  ou  le
  resultat  d'un  autre  programme).  Cela  permet  a  l'utilisateur  de
  rediriger  la sortie d'une commande vers le gestionnaire d'impression.
  Ainsi :

       ______________________________________________________________________
       $ cat thesis.txt | lpr
       ______________________________________________________________________

  ou

       ______________________________________________________________________
       $ pr -l60 thesis.txt | lpr
       ______________________________________________________________________

  La commande lpr accepte de nombreux arguments sur la ligne de commande
  qui  permettent  a  l'utilisateur  de  controler  son  fonctionnement.
  Certains de ces arguments les plus utilises sont :

  +o  -Pprinter pour specifier l'imprimante a utiliser

  +o  -s pour creer un lien symbolique plutot que de  copier  le  fichier
     dans le repertoire d'impression (utile pour de gros fichiers)

  +o  -#num pour specifier le nombre de copies a imprimer

     Un exemple d'utilisation de lpr pourrait etre du genre :

       ______________________________________________________________________
       $ lpr -#2 -sP dj thesis.txt
       ______________________________________________________________________

  Cette  commande  creera  un lien symbolique vers le fichier thesis.txt
  dans le repertoire spool pour l'imprimante  appelee  dj,  ou  il  sera
  traite par lpd. Il imprimera alors une seconde copie de thesis.txt.
  Pour  une  liste  de  toutes  les  options  que lpr reconnaitra, voyez
  lpr(1).

  22..33..  VVooiirr llaa ffiillee dd''iimmpprreessssiioonn aavveecc llppqq

  Pour voir le contenu de la file  d'impression,  utilisez  la  commande
  lpq.  Employee  sans  arguments,  elle  renvoie  le contenu de la file
  d'impression de l'imprimante par defaut.

  La sortie retournee par lpq peut etre utile a plus d'un titre.

       ______________________________________________________________________
       $ lpq
       lp is ready and printing
       Rank   Owner      Job  Files                            Total Size
       active mwf        31   thesis.txt                       682048 bytes
       ______________________________________________________________________

  22..44..  AAnnnnuulleerr uunn ttrraavvaaiill dd''iimmpprreessssiioonn eenn uuttiilliissaanntt llpprrmm

  Une autre fonctionnalite utile de tout  systeme  d'impression  est  la
  possibilite  d'annuler  un travail qui a ete prealablement envoye dans
  la file. Pour ce faire, utilisez lprm.

       ______________________________________________________________________
       $ lprm -
       ______________________________________________________________________

  La  commande  ci-dessus  annule  tous  les  travaux  d'impression  qui
  appartiennent  a  l'utilisateur  qui a employe la commande. Un travail
  d'impression en particulier  peut  etre  annule  en  se  munissant  en
  premier  lieu  du  numero de travail tel que mentionne par lpq puis en
  donnant ce numero a lprm. Par exemple :

       ______________________________________________________________________
       $ lprm 31
       ______________________________________________________________________

  annulerait le travail 31 (thesis.txt) de l'imprimante par defaut.

  22..55..  CCoonnttrroolleerr llee pprrooggrraammmmee llppdd aavveecc llppcc..

  Le programme lpc(8) est utilise pour controler les imprimantes que lpd
  dessert. Vous pouvez activer ou desactiver une imprimante ou ses files
  d'impression, reorganiser les travaux a  l'interieur  d'une  file,  et
  obtenir  un rapport d'etat sur les imprimantes ou leurs files. Lpc est
  le plus  souvent  utilise  dans  une  configuration  ou  de  multiples
  imprimantes sont raccordees a la meme machine.

  ______________________________________________________________________
  $ lpc
  ______________________________________________________________________

  La  commande  ci-dessus  lancera  le  programme  lpc. Par defaut, vous
  entrez alors en mode interactif et vous pouvez commencer a envoyer des
  commandes. L'autre option est d'employer une commande lpc sur la ligne
  de commande.

       ______________________________________________________________________
       $ lpc status all
       ______________________________________________________________________

  Une liste de toutes les commandes disponibles se trouve dans les pages
  man  de  lpd mais voici quelques unes des commandes majeures dont vous
  allez avoir besoin. Toutes les commandes ou  figure  option  acceptent
  soit  un  nom  d'imprimante particulier (lp, print, etc) ou le mot-cle
  all qui designe toutes les imprimantes.

  +o  disable  option  -  empeche  l'entree  de  tout   nouveau   travail
     d'impression

  +o  down option - desactive toute impression sur l'imprimante

  +o  enable  option  -  autorise  de nouveaux travaux a integrer la file
     d'impression

  +o  quit (ou exit) - quitte lpc

  +o  restart option - relance lpd pour cette imprimante

  +o  status option - imprime l'etat de l'imprimante

  +o  up option - autorise tout et lance un nouveau lpd

  22..66..  LLee pprrooggrraammmmee pprriinnttttooooll ssoouuss RReeddHHaatt..

  Juste quelques mots sur l'etonnant programme printtool de  RedHat.  Il
  semble  etre  en  mesure de faire tout ce qu'un filtre magique ferait.
  RedHat  installe  deja  la  plupart  des  programmes  necessaires   au
  filtrage.  Voici  comment  j'ai  configure mon imprimante  sous RH 4.0
  avec une HP LJ 4L connectee a mon port parallele.

  +o  Devenez root et lancez printtool (si vous  avez  utilise  su,  vous
     vous etes rappele de faire SETENV DISPLAY :0.0 et xhost +, n'est-ce
     pas ?)

  +o  Cliquez sur Add et appuyez sur OK pour une imprimante locale

  +o  Remplissez l'information sur le peripherique d'impression (/dev/lp1
     pour moi)

  +o  Completez  le  filtre d'entree : selectionnez un type d'imprimante,
     une resolution, et la taille du papier (ljet4, 300x300 et letter)

  +o  Appuyez sur OK jusqu'a revenir au point de depart et relancez  lpd.

  Comme  si  vous  remplissiez  un fichier /etc/printcap a la main, vous
  pouvez avoir de multiples definitions d'imprimante pour chacune de vos
  imprimantes  reelles.  Une  pour  chaque  taille  de  papier, pour les
  differentes resolutions, etc.

  33..  IImmpprriimmeerr ddeess ffiicchhiieerrss

  Cette section de l'impression des types de  fichiers  que  vous  allez
  rencontrer dans une configuration Linux.

  33..11..  IImmpprreessssiioonn ddeess ffiicchhiieerrss ggrraapphhiiqquueess

  L'impression   de   fichiers  graphiques  sur  une  imprimante  depend
  generalement du type de  graphiques  que  vous  utilisez  et  du  type
  d'imprimante   sur   lequel  vous  voulez  imprimer.  Les  imprimantes
  matricielles sont hors de question du fait  de  leurs  differences  de
  traitement  des  graphismes.  La  meilleure  chose  a faire dans cette
  situation est de voir si votre  imprimante  est  compatible  avec  une
  Epson  ou une IBM ProPrinter et d'alors convertir le fichier graphique
  en PostScript avant d'utiliser Ghostscript (voir la section  suivante)
  pour l'impression du graphisme.

  Si  vous  avez  une imprimante laser, les choses sont plus simples car
  nombre d'entre elles sont compatibles avec PCL. Cela vous donne  alors
  plusieurs alternatives. Certains programmes peuvent fournir une sortie
  directement en PCL. Si ce n'est pas le cas, des  programmes  tels  que
  NetPBM  peuvent  convertir  vers  PCL.  La  derniere  possibilite  est
  d'utiliser ghostscript (voir section suivante).

  Votre meilleure possibilite consiste a installer des packages tels que
  NetPBM  et Ghostscript puis d'installer un filtre magique qui traitera
  les fichiers graphiques automagiquement.

  33..22..  IImmpprreessssiioonn ddeess ffiicchhiieerrss PPoossttSSccrriipptt

  Imprimer des fichiers PostScript sur uen imprimante qui  dispose  d'un
  interpreteur  PostScript  est  simple  :  il  suffit d'utiliser lpr et
  l'imprimante s'occupera des details pour vous. Pour  ceux  parmi  nous
  qui  ne  disposent  pas  d'imprimantes  possedant  des fonctionnalites
  PostScript, nous devons faire appel a d'autres  moyens.  Heureusement,
  il  y  a des programmes disponibles a meme de comprendre PostScript et
  de  le  traduire  en  un  langage  que  la  plupart  des   imprimantes
  comprendront.   Ghostscript   est   probablement  le  plus  connu  des
  programmes de ce type.

  La  responsabilite  de  Ghostscript  est  de  convertir   toutes   les
  descriptions d'un fichier PostScript en des commandes que l'imprimante
  comprendra.  Pour  imprimer  un  fichier   PostScript   en   utilisant
  Ghostscript, vous pourriez faire quelque chose du genre :

       ______________________________________________________________________
       $ gs -dSAFER -dNOPAUSE -sDEVICE=deskjet -sOutputFile=\|lpr thesis.ps
       ______________________________________________________________________

  Remarquez  que  dans  l'exemple  ci-dessus,  on  envoie par le tube la
  sortie de Ghostscript vers  la  commande  lpr  en  utilisant  l'option
  -sOutputFile.

  Ghsostview  est une interface de Ghostscript pour le systeme X Window.
  Il vous  permet  de  previsualiser  un  fichier  PostScript  avant  de
  l'imprimer.   Ghostview   et   Ghostscript   peuvent  tous  deux  etre
  telecharges de SunSITE par exemple.

  33..33..  IImmpprreessssiioonn ddeess ffiicchhiieerrss PPDDFF

  Adobe a diffuse un lecteur Acrobat pour Linux et il est disponible sur
  la  home  page  d'Adobe. Son predecesseur, xpdf, est aussi disponible.
  Tous deux devraient imprimer sur un peripherique PostScript.

  33..44..  IImmpprreessssiioonn ddeess ffiicchhiieerrss TTeeXX

  Une des manieres les plus faciles d'imprimer des fichiers TeX  est  de
  les  convertir  en PostScript puis de les imprimer par l'intermediaire
  de Ghostscript. Pour ce faire, vous devez d'abord les covertir en  DVI
  (pour  DeVice  Independent).  Vous  pouvez  le  faire avec la commande
  tex(1). Ensuite vous convertissez le fichier DVI  en  PostScript  avec
  dvips. Tout ceci ressemblera a ce qui suit une fois tape :

       ______________________________________________________________________
       $ tex thesis.tex
       $ dvips thesis.dvi
       ______________________________________________________________________

  Maintenant,  vous etes pret a imprimer le fichier PostScript resultant
  en suivant les indications ecrites plus haut.

  33..55..  IImmpprreessssiioonn ddeess ffiicchhiieerrss ffoorrmmaatteess aapprreess ttrrooffff

       ______________________________________________________________________
       $ groff -Tascii thesis.tr | lpr
       ______________________________________________________________________

  ou, si vous preferez :

       ______________________________________________________________________
       $ groff thesis.tr > thesis.ps
       ______________________________________________________________________

  suivi de l'impression du fichier PostScript comme indique ci-dessus.

  33..66..  IImmpprreessssiioonn ddeess ppaaggeess mmaann

       ______________________________________________________________________
       $ man man | col -b | lpr
       ______________________________________________________________________

  Les pages man contiennent des donnees predormatees  par  troff,  c'est
  pourquoi  nous devons enlever toute surbrillance ou soulignement, etc.
  Le programme col fait cela  tres  bien  et  comme  nous  envoyons  les
  donnees par le tube, le programme man n'utilisera pas more.

  44..  DDiivveerrss

  Cette section couvre les sujets qui n'avaient pas leur place ailleurs.

  44..11..  FFoorrmmaattaaggee aavvaanntt iimmpprreessssiioonn

  Comme la  plupart  des  fichiers  ASCII  ne  sont  pas  formates  pour
  l'impression,  il  est utile de les formater prealablement d'une facon
  ou d'une autre avant de  les  imprimer  pour  de  bon.  On  peut,  par
  exemple,  mettre  un  titre et des numeros de page, regler les marges,
  les espacements, l'indentation ou l'imprimer dans plusieurs  colonnes.
  Une  maniere  courante  de  faire cela est d'utiliser un preprocesseur
  d'impression tel que pr.

       ______________________________________________________________________
       $ pr +4 -d -h'Ph.D. Thesis, 2nd Draft' -l60 thesis.txt | lpr
       ______________________________________________________________________

  Dans l'exemple ci-dessus,  pr  prendrait  le  fichier  thesis.txt,  en
  sauterait  les  trois  premieres pages (+4), reglerait la longueur des
  pages a soixante lignes (-l60), introduirait un double espacement (-d)
  et  ajouterait  la  phrase 'Ph.D. Thesis, 2nd Draft' en haut de chaque
  page (-h). Lpr enverrait alors dans la file d'impression la sortie  de
  pr. Pour plus d'informations sur pr, voir sa page man.

  44..22..  LLeess vvaarriiaabblleess dd''eennvviirroonnnneemmeenntt PPRRIINNTTEERR

  Toutes  ces  commandes  du  systeme  d'impression  de  Linux acceptent
  l'option -P. cette option permet a l'utilisateur de  specifier  quelle
  imprimante  utiliser  pour  la  sortie.  Si  l'utilisateur ne specifie
  l'imprimante a utiliser, l'imprimante par defaut sera  alors  utilisee
  comme peripherique de sortie.

  Plutot  que  d'avoir a specifier l'imprimante a utiliser a chaque fois
  que vous imprimez, vous pouvez affecter a la variable  d'environnement
  PRINTER  le nom de l'imprimante que vous voulez utiliser. Cela se fait
  de differentes manieres selon le shell utilise. Ainsi pour bash :

  ______________________________________________________________________
  $ PRINTER='printer_name'; export PRINTER
  ______________________________________________________________________

  et pour csh, cela donne :

       ______________________________________________________________________
       % setenv PRINTER 'printer_name'
       ______________________________________________________________________

  Ces commandes peuvent etre  placees  dans  vos  scripts  de  connexion
  (.profile  pour  bash,  .cshrc  pour  csh)  ou  tapees sur la ligne de
  commande. Cf bash(1)  et  csh(1)  pour  plus  d'informations  sur  les
  variables d'environnement.

  55..  FFooiirree AAuuxx QQuueessttiioonnss

  Q1. Comment eviter l'effet marche d'escalier ?

  R1.  L'effet  marche  d'escalier  est  du  a  la  facon dont certaines
  imprimantes attendent les fins de ligne. Certaines imprimantes veulent
  des  lignes  terminees  par  une  sequence retour chariot/fin de ligne
  (comme sous DOS) plutot que la sequence fin de ligne utilisee par  les
  systemes  type  UNIX.  La maniere la plus simple de regler ce probleme
  est de voir si votre imprimante est en mesure de basculer d'un mode  a
  l'autre,  que  ce soit par la manipulation d'un interrupteur DIP ou en
  envoyant  une  sequence  d'echappement  au  debut  de  chaque  travail
  d'impression.  Dans  le  dernier  cas,  vous pouvez utiliser un filtre
  magique voir Q2).

  Une solution rapide est d'utiliser un filtre sur la ligne de  commande
  comme dans :

       ______________________________________________________________________
       $ cat thesis.txt | todos | lpr
       ______________________________________________________________________

  Q2. Qu'est-ce qu'un filtre ?

  R2.  Un  filtre  est  un  programme qui lit l'entree standard (stdin),
  traite d'une certaine maniere cette entree  et  ecrit  sur  la  sortie
  standard (stdout). Les filtres sont utilises dans de nombreux cas tels
  que le traitement de textes.

  Q3. Qu'est-ce qu'un filtre magique ?

  R3. Un filtre magique est un  filtre  qui  realise  un  traitement  en
  fonction du type de fichier. Par exemple, si le fichier est un fichier
  texte   simple,   il   l'imprimera   en   utilisant    les    methodes
  traditionnelles. Si c'est un fichier PostScript, ou d'un autre format,
  il l'imprimera en utilisant  une  autre  methode  (ghostscript).  Deux
  exemples  en sont magicfilter et APSfilter. Une limitation de ce style
  de programme est que les programmes appropries doivent etre  installes
  avant l'installation du filtre.

  La  raison  en est que quand magicfilter s'installe, il recherche dans
  votre systeme des programmes specifiques (comme ghostscript qui,  s'il
  le  trouve,  lui  permettra  de  traiter les fichier PostScript) et se
  construit alors sur la  base  du  resultat  de  ses  recherches.  Pour
  pouvoir traiter tous les fichiers a imprimer, vous devrez probablement
  avoir installe l'un de ces programmes :

  +o  GhostScript

  +o  TeX

  +o  NetPBM

  +o  jpeg utilities

  +o  gzip

  Q4. Qu'en est-il du Windows Printing System ? Marchera-t-il sous Linux
  ?

  R4.  Peut-etre.  Les imprimantes qui n'acceptent que les commandes WPS
  ne marcheront pas  sous  Linux.  Les  imprimantes  qui  acceptent  les
  commandes   WPS  et  d'autres  commandes  (comme  la  Canon  BJC  610)
  fonctionneront du moment qu'elles auront ete configurees  en  un  mode
  autre  que  WPS. D'autres imprimantes, telles que certaines HP DeskJet
  820Cxi/Cse, ne fonctionneront  pas  sous  Linux.  Cela  dit,  on  peut
  utiliser Linux comme serveur d'impression pour des machines sous Win95
  (cf Samba) puisque Win95 dispose de pilotes pour ces imprimantes.

  Q5. Qu'est-ce donc que ce systeme  de  pacotille  ?  Je  ne  peux  pas
  imprimer  plus  de  6  pages sans obtenir un message d'erreur 'fichier
  trop gros' ('file too large').

  R5. Une des options du fichier /etc/printcap a rapport avec la  taille
  maximale d'un fichier d'impression. Par defaut, elle est de 1000 blocs
  disque (environ 500k?). Pour les  fichiers  PostScript  ou  assimiles,
  cela  vous  autorise  6  a  8  pages avec des graphismes. Assurez vous
  d'avoir ajoute la ligne suivante dans la definition  de  l'imprimante:
  mx=0

  La  principale  raison de cet etat de fait est d'essayer d'empecher le
  remplissage du  repertoire  spool.  Il  y  a  une  autre  maniere  d'y
  remedier,  en  forcant  lpr  a  creer un lien symbolique du repertoire
  spool vers le fichier  a  imprimer.  Mais  vous  devez  vous  rappeler
  d'ajouter l'option -s a lpr a chaque fois.

  66..  DDeeppaannnnaaggee

  Cette  section detaille quelques uns des problemes les plus communs en
  matiere d'impression.

  Si votre imprimante ne fonctionne pas:

  +o  les autres travaux d'impression  fonctionnent-ils?  (probleme  avec
     l'application?)

  +o  lpd  est-il  lance?  (le  verifier  en utilisant lpc) (gestionnaire
     d'impression?)

  +o  L'utilisateur root peut-il  ecrire  directement  sur  l'imprimante?
     (services d'impression?)

  +o  Pouvez-vous   imprimer   sous   DOS?   (probleme  de  connexion  ou
     d'imprimante?)

  Repondre a ces questions pourrait vous fournir une solution.

  Envoyez vos suggestions pour cette rubrique a markk@auratek.com.

  77..  RReeffeerreenncceess

  Ici prennent placent les  references  aux  documents  sur  le  systeme
  d'impression  sous  Linux.  J'ai essaye de garder cette rubrique aussi
  pointue que possible. Si vous trouvez  que  j'ai  oublie  un  document
  d'importance, n'hesitez pas a me contacter.

  Avant de poster votre question sur un newsgroup d'USENET, assurez vous
  des choses suivantes:

  +o  L'imprimante  accepte-t-elle  des  travaux  d'impression?   (Lancez
     lpc(8) pour en avoir le coeur net)

  +o  La  reponse  a  votre  question  figure-t-elle  dans  le  HOWTO sur
     l'impression de Grant Taylor?

  Si la reponse a l'une des questions ci-dessus est oui, refelchissez  a
  deux  fois  avant  de  poster votre question. Et si finalement vous la
  postez, assayez d'y inclure des  informations  pertinentes.  N'ecrivez
  pas  quelque  chose du genre 'J'ai des problemes avec lpr, aidez-moi.'
  Ce type de message sera tout simplement ignore  par  la  majorite  des
  personnes.  Pensez  egalement  a  inclure la version du noyau que vous
  utilisez,  comment  l'erreur  est  apparue  ainsi  que  les  eventuels
  messages d'erreur fournis par le systeme.

  Pages de manuel

  +o  cat(1) concatenation et impression de fichiers

  +o  dvips(1) convertisseur de fichiers DVI TeX en PostScript

  +o  ghostview(1)  visualisation  de  documents  PostScript  a l'aide de
     Ghostscript

  +o  groff(1) interface pour le systeme de formatage de document groff

  +o  gs(1) interpreteur/visualisateur Ghostscript

  +o  lpc(8) programme de controle d'impression

  +o  lpd(8) demon d'impression

  +o  lpq(1) programme de visualisation de la file d'impression

  +o  lpr(1) imprimante hors-ligne

  +o  lprm(1) effacement de travaux d'impression de la file

  +o  pr(1) formatage des fichiers textes pour l'impression

  +o  tex(1) composition et formatage de texte

  Newsgroups d'USENET

  +o  comp.os.linux.* une plethore d'informations sur Linux

  +o  comp.unix.*  groupe  de  discussion  en  rapport  avec  le  systeme
     d'exploitation UNIX

  Linux Quake HOWTO
  Bob Zimbinski bobz@mr.net Version Franaise : Eric MAISONOBE
  viret@nat.fr
  v1.0.1.14, 30 Aot 1998

  Ce document explique comment installer, excuter et rgler les
  problmes lis  Quake, QuakeWorld et Quake II sur un systme Linux
  Intel.
  ______________________________________________________________________

  Table des matires























































  1. Introduction

     1.1 Retour d'informations, Commentaires, Corrections
     1.2 Remerciements **
     1.3 Autres Sources d'Information
        1.3.1 Informations Spcifiques  Quake Linux **
        1.3.2 Information Gnrales sur Quake
        1.3.3 Informations sur les Jeux Linux

  2. Quake/Quakeworld

     2.1 Configuration Minimale
     2.2 Installation de Quake
        2.2.1 Tlchargement des fichiers ncessaires
        2.2.2 Cration du rpertoire d'installation ++
        2.2.3 Installation de Quake depuis un CD ++
        2.2.4 Installation sous Linux depuis DOS/Windows
        2.2.5 Installation de la Version Shareware
     2.3 Ajout des Binaires Linux
     2.4 Mise en place des Permissions
     2.5 X11 Quake
     2.6 Quake SVGAlib
     2.7 GLQuake
        2.7.1 SVGAlib
        2.7.2 Glide
        2.7.3 Mesa
     2.8 Commandes d'options en ligne spcifiques  Linux
     2.9 QuakeWorld **
        2.9.1 Installation des paquetages RPM ++
        2.9.2 Installation des paquetages tar.gz ++
        2.9.3 Excution de QuakeWorld ++
     2.10 Serveurs
     2.11 Modes et Ajouts
        2.11.1 Capture du Drapeau
        2.11.2 Mission Packs **
        2.11.3 Les Outils Quake

  3. Quake II

     3.1 Prrequis
     3.2 Installation de Quake II
        3.2.1 Tlchargement des Fichiers ncessaires
        3.2.2 Cration du rpertoire d'installation
        3.2.3 Installation depuis un CD
        3.2.4 Installation sur Linux depuis Windows
        3.2.5 Installation de la version de dmonstration **
     3.3 Ajout des binaires de Linux
        3.3.1 Installation des paquetages RPM**
        3.3.2 Installation des paquetages tar.gz **
     3.4 Configuration des Permissions **
        3.4.1 Quake2.conf **
     3.5 Les interprteurs X
     3.6 L'interprteur SVGAlib
     3.7 L'interprteur OpenGL
        3.7.1 SVGAlib
        3.7.2 Glide
        3.7.3 Mesa
        3.7.4 lib3dfxgl.so
     3.8 L'interprteur GLX
     3.9 Commandes d'options en ligne spcifiques  Linux
     3.10 Serveurs Quake II
        3.10.1 Serveurs d'accueil
        3.10.2 Serveurs ddis
        3.10.3 Autres Sources d'information sur les serveurs
     3.11 Modes & Ajouts
        3.11.1 Les modes Client
           3.11.1.1 Capture du drapeau
        3.11.2 Les modes serveur
        3.11.3 Source du Jeu
        3.11.4 Mission Packs **

  4. Logiciels apparents

     4.1 QStat
     4.2 XQF
     4.3 QuickSpy
     4.4 QPlug pour Linux
     4.5 qkHacklib
     4.6 GiMd2Viewer
     4.7 QIPX
     4.8 Ice
     4.9 Q2getty
     4.10 rcon
     4.11 qlog ++
     4.12 Cheapo **
     4.13 qgraph **

  5. Problmes/FAQs

     5.1 Gnral
        5.1.1 Considrations sur diffrents OS
        5.1.2 Considrations relatives  Glibc, RedHat 5.x et Debian 2
        5.1.3 Ma souris ne fonctionne pas ou semble rpondre alatoirement.
        5.1.4 Ma souris Microsoft Intellimouse ou Logitech MouseMan+ ne fonctionne pas correctement.
        5.1.5 Ma souris se trane et semble beaucoup plus lente que sous Windows.
        5.1.6 Je possde une carte Voodoo2 et, lorsque je tente une mise en route avec l'interprteur gl, il m'affirme que je n'ai pas de carte Voodoo installe.
        5.1.7 Lorsque je joue  l'un des jeux Quake sous SVGAlib ou GL et que je presse CTRL-C, le jeu s'arrte et quelquefois me laisse la console dans un tat inutilisable.
        5.1.8 Quelquefois lorsque Quake/Quake II se termine de faon anormale, il me laisse la console dans un tat inutilisable.
        5.1.9 squake/quake2 refuse de dmarrer et avertit "
        5.1.10 Quelquefois, aprs avoir jou  l'un des jeux Quake sous X, la rptition de touches ne fonctionne plus.
        5.1.11 Quake/Quake II avertit "/dev/dsp : device not configured"
        5.1.12 GL Quake/Quake II s'excutent plus lentement sous Linux que sous Windows. **
        5.1.13 Comment puis-je dmarrer un serveur et me dconnecter, puis y revenir ultrieurement? **
     5.2 Quake/QuakeWorld
        5.2.1 Quake meurt au dmarrage avec une "segmentation fault".
        5.2.2 Quelle est la diffrence entre
        5.2.3 Quand je lance
     5.3 Quake II
        5.3.1 Quand j'essaie de lancer Quake II avec l'interprteur GL, cela ne marche pas et il s'affiche "LoadLibrary("ref_gl.so") failed: Unable to resolve symbol"
        5.3.2 Quake II ne se lance pas avec le message
        5.3.3 Lorsque je modifie le contraste pendant l'utilisation de l'interprteur GL, et que je presse "apply," rien ne se passe!
        5.3.4 Note sur la distribution 3.17
        5.3.5 Quand je lance Quake II en plein cran avec
        5.3.6 Pourquoi ne puis-je pas utiliser certains modes SVGA prsents dans le menu Vido de Quake II? **

  6. Trucs et Astuces

     6.1 Excution de jeux X et GL sans setuid
     6.2 Lancement des jeux SVGA et GL depuis X
     6.3 Conserver la souris  l'intrieur de la fentre sous X
     6.4 Le paramtrage "gonflant" 3Dfx fonctionne galement sous Linux
     6.5 Le navigateur de serveur du pauvre
     6.6 Utilisation de

  7. Administration

     7.1 Nouvelles versions de ce document
     7.2 Autres formats de ce Document
     7.3 Politique de Distribution
     7.4 Historique des rvisions


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Quake, QuakeWorld et Quake II sont de formidables jeux d'action 3D
  dvelopps par id Software.

  Si vous n'tes pas familier avec les jeux Quake, il existe de
  meilleurs documents que ce HOWTO pour en apprhender les bases.
  Reportez-vous  la section ``Autres Sources d'Information'' ci-dessous
  pour en obtenir une liste.

  Ce document prsuppose que vous avez Linux install et ventuellement
  galement le systme X Window. X n'est pas ncessaire au
  fonctionnement de ces jeux, mais c'est un bon moyen pour tester une
  installation de base. Si vous n'avez pas X, vous pouvez sans risque
  ignorer toutes les rfrences qui y font appel.

  Les sections de ce document qui ont t modifies lors de la dernire
  mise  jour ont un ** aprs l'entte de la section. De la mme
  manire, les sections modifies lors de mises  jour antrieures sont
  reconnaissables par ++.


  11..11..  RReettoouurr dd''iinnffoorrmmaattiioonnss,, CCoommmmeennttaaiirreess,, CCoorrrreeccttiioonnss


  Ce document ne contient certainement ppaass tout ce qu'il y a  connatre
  de Quake Linux.  Avec votre aide, cependant, nous pourrons nous en
  rapprocher.  Nous voulons que ce document soit aussi complet et prcis
  que possible, aussi, si vous remarquez des erreurs ou des omissions,
  merci de les porter  notre attention.

  Les questions, commentaires ou corrections sont  envoyer  Bob
  Zimbinski (bobz@mr.net) ou Mike Hallock (mikeh@medina.net).

  Les critiques constructives sont les bienvenues. Les descentes en
  flammes ne le sont pas.



  11..22..  RReemmeerrcciieemmeennttss ****

  La version originale de ce document a t crite par Brett A.Thomas
  (quark@baz.com) et Mike Hallock (mikeh@medina.net).  Bob Zimbinski
  (bobz@mr.net) a rcrit et enrichi le document original.

  Remerciements particuliers aux personnes suivantes pour nous avoir
  permis d'obtenir Quake pour Linux :

    John Carmack et les membres de id Software pour ces clbres jeux.

    Dave 'Zoid' Kirsch (zoid@idsoftware.com) pour le portage sous
     Linux.

    Dave Taylor (ddt@crack.com) pour avoir commenc ce singulier
     travail de portage.

    Daryll Strauss (daryll@harlot.rb.ca.us) pour le portage de glide
     sous Linux.

    Brian Paul (brianp@elastic.avid.com) pour la librairie graphique
     Mesa.

    David Bucciarelli (tech.hmw@plus.it) pour le driver Mesa.

  Remerciements aux personnes suivantes pour leurs contributions  ce
  HOWTO :


    Mike Brunson (brunson@l3.net) pour l'astuce vid_restart.

    Joey Hess (joey@kite.ml.org) pour ses informations sur le
     fonctionnement des jeux svga & gl sous X

    Joe S. (jszabo@eden.rutgers.edu) pour une bouillante pile de
     suggestions.

    Brad Lambert (bradl@dial.pipex.com) pour le pense-bte -noudp.

    agx (gguenthe@iris.rz.uni-konstanz.de) pour les informations sur
     l'installation de Quake et QIPX.

    Derrik Pates (dmp8309@silver.sdsmt.edu) pour m'avoir fait penser 
     la scurit.

    Michael Dwyer (michael_dwyer@mwiworks.com) pour ses ides sur les
     considrations relatives  d'autres l'OS.

    Derek Simkowiak (dereks@kd-dev.com) pour la procdure
     d'installation de Quake I.

    sunstorm (sunstorm@glasscity.net) pour les informations sur le 2me
     pack de Missions Quake.

    Neil Marshall (marshall@pssnet.com) pour les crans d'information.


  11..33..  AAuuttrreess SSoouurrcceess dd''IInnffoorrmmaattiioonn



  11..33..11..  IInnffoorrmmaattiioonnss SSppcciiffiiqquueess  QQuuaakkee LLiinnuuxx ****


    LQ:Linux Quake & Utilites http://www.linuxquake.com/.

    Linux Quake Page http://captured.com/threewave/linux/

    QuakeWorld.net http://www.quakeworld.net


  11..33..22..  IInnffoorrmmaattiioonn GGnnrraalleess ssuurr QQuuaakkee


    id Software http://www.idsoftware.com

    PlanetQuake http://www.planetquake.com

    QuakeWorld Central http://qwcentral.stomped.com

    3Dfx's GL Quake FAQ (quelque peu hors du temps)
     http://www.3dfx.com/game_dev/quake_faq.html

    Liste des commandes pour Console, Farenheit
     176http://www.planetquake.com/f176

    Forums rec.games.computer.quake.*




  11..33..33..  IInnffoorrmmaattiioonnss ssuurr lleess JJeeuuxx LLiinnuuxx


    LinuxGames http://www.linuxgames.com/

    The Linux Game Tome
     http://www.cs.washington.edu/homes/tlau/tome/linux-game.html


  22..  QQuuaakkee//QQuuaakkeewwoorrlldd

  Pour installer Quake sur votre systme Linux, vous aurez besoin de
  quelques composants de la distribution officielle de Quake par id.
  Cela pourra tre n'importe quel CD-ROM DOS/Windows achet  votre
  dtaillant favori ou la version shareware tlcharge sur Internet
  (reportez-vous ``ci-dessous'' pour plus de dtails sur la manire
  d'acqurir la version shareware).

  Ou bien, si vous avez dj Quake install sur une machine DOS/Windows,
  vous pouvez utiliser les fichiers provenant de cette installation.


  22..11..  CCoonnffiigguurraattiioonn MMiinniimmaallee

  Vous aurez besoin, au strict minimum, de la configuration suivante :


    Un ordinateur de type Pentium 90 ou mieux (133 recommand)

    16 MB RAM (24 recommand)

    Le CD-ROM Quake oouu la version shareware (quake106.zip)

    Un noyau Linux version 2.0.24 ou suprieure

    libc 5.2.18 ou suprieure

    Au choix :

    X11R5 ou suprieur (pour xquake)

    SVGAlib 1.2.0 ou suprieure (pour squake et glquake)

    30-80 megabytes d'espace disque libre (dpend de votre
     installation)

    L'accs root sur la machine devant recevoir l'installation


  En Option:

    Une carte son supporte

    Une carte acclratrice 3Dfx VooDoo Graphics ou VooDoo2

    Mesa 2.6 ou suprieur (pour glquake)


  22..22..  IInnssttaallllaattiioonn ddee QQuuaakkee



  22..22..11..  TTllcchhaarrggeemmeenntt ddeess ffiicchhiieerrss nncceessssaaiirreess****

  Tous les fichiers ncessaires pour Quake Linux sont disponibles sur le
  site ftp d'id Software, ftp.idsoftware.com. Ce site pouvant tre trs
  sollicit, vous pouvez utiliser l'un des sites miroirs ci-dessous :

    ftp.cdrom.com/pub/idgames/idstuff (California, USA)

    ftp.gamesnet.net/idsoftware (California, USA)

    ftp.linuxquake.com/lqstuff (Michigan, USA)

    ftp.stomped.com/pub/mirror/idstuff (Minnesota, USA)

    mirrors.telepac.pt/pub/idgames (Lisbon, Portugal)

    download.netvision.net.il/pub/mirrors/idsoftware (Haifa, Israel)

  Les fichiers Quake mentionns dans cette section sont :

    Distribution Shareware Quake pour Windows
     ftp://ftp.idsoftware.com/idstuff/quake/quake106.zip

    Binaires X11 Quake
     ftp://ftp.idsoftware.com/idstuff/unsup/unix/quake.x11-1.0-i386-unknown-
     lin ux2.0.tar.gz

    Binaires SVGAlib Quake
     ftp://ftp.idsoftware.com/idstuff/unsup/squake-1.1-i386-unknown-
     linux2.0.ta r.gz

    Binaires OpenGL/Mesa Quake
     ftp://ftp.idsoftware.com/idstuff/unsup/unix/glquake-0.97-i386-unknown-
     linu x2.0.tar.gz

    Clients QuakeWorld pour Linux (Les clients X11, SVGAlib et GL sont
     tous inclus dans chaque paquetage)

    Paquetage libc5 tar.gz
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-i386-unknown-
     li nux2.0.tar.gz

    Paquetage glibc tar.gz
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-glibc-
     i386-unkn own-linux2.0.tar.gz

    Paquetage libc5 rpm
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-1.i386.rpm

    Paquetage glibc rpm
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-glibc-1.i386.rp
     m


    Serveur QuakeWorld Linux

    Paquetage libc5 tar.gz
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-i386-unknown-
     li nux2.0.tar.gz

    Paquetage glibc tar.gz
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-glibc-
     i386-unkn own-linux2.0.tar.gz

    Paquetage libc5 rpm
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-1.i386.rpm

    Paquetage glibc rpm
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-glibc-1.i386.rp
     m
    Le paquetage de la couche client
     ftp://ftp.cdrom.com/pub/quake/planetquake/threewave/ctf/client/3wctfc.zip

  Autres logiciels mentionns:

    Utilitaire d'archivade lha
     ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.

    Librairie graphique SVGAlib
     http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.tar.gz

    Binaires SVGAlib libc5
     http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar
     .gz

    Libraries Glide runtime http://glide.xxedgexx.com/3DfxRPMS.html



  22..22..22..  CCrraattiioonn dduu rrppeerrttooiirree dd''iinnssttaallllaattiioonn ++++

  La premire chose que vous avez  faire est de dcider o vous
  souhaitez installer Quake.  Beaucoup l'installent dans
  /usr/games/quake.  L'administrateur systme que je suis a choisi
  d'installer tout ce qui n'est pas partie intgrante de ma distribution
  Linux sous /usr/local. Aussi,, pour moi, Quake a trouv sa place sous
  /usr/local/games/quake. Si vous choisissez de l'installer ailleurs,
  n'oubliez pas de substituer le chemin appropri partout o
  /usr/local/games/quake est indiqu.


  RReemmaarrqquuee aauuxx uuttiilliissaatteeuurrss ddee RReeddhhaatt:: Si vous envisagez d'installer
  QuakeWorld depuis les paquetages rpm, vous devrez probablement
  installer Quake sous /usr/local/games/quake, tant donn que rpm
  installe dans ce rpertoire par dfaut.

  Bien! Maintenant, crons le rpertoire dans lequel nous allons
  installer Quake, et dplaons-nous dedans (les instructions suivantes
  partent du principe que c'est notre rpertoire courant).




       mkdir /usr/local/games/quake
       cd /usr/local/games/quake





  22..22..33..  IInnssttaallllaattiioonn ddee QQuuaakkee ddeeppuuiiss uunn CCDD ++++

  Si vous installez Quake depuis un CD-ROM, lisez ceci. Si ce n'est pas
  le cas, vous avez la permission de sauter cette section.

  Il y a au moins deux versions de Quake CD en circulation. J'ai l'une
  des plus anciennes, contenant la version 1.01 de Quake. J'ai pu
  rencontrer d'autres CD avec la version 1.06. Vous possdez la version
  1.01 si vous avez des fichiers appels quake101.1 et quake101.2. Si
  vous trouvez un fichier appel resource.1, vous avez la version la
  plus rcente.  Montez votre CD Quake et dterminez quelle version vous
  possdez. Dans l'exemple ci-dessous, remplacez /dev/cdrom et
  /mnt/cdrom par le fichier et le point de montage appropris  votre
  systme:


  mount -t iso9660 /dev/cdrom /mnt/cdrom
  ls /mnt/cdrom





    Si vous avez un fichier resource.1 sur le CD, vous pouvez passer au
     point suivant.  Pour la version CD 1.01, vous aurez besoin de
     tlcharger le paquetage shareware Quake pour mettre  jour les
     fichiers .pak aprs l'installation. Le dernier point de cette
     section dtaille cela.


    Concatnons les deux fichiers de votre CD en un seul sur le disque
     dur:


       cat /mnt/cdrom/quake101.1 /mnt/cdrom/quake101.2 > resource.1




    Maintenant passez au paragraphe suivant, mais lorsque je ferai
     rfrence  /mnt/cdrom/resource.1, vous devrez utiliser  la place
     /usr/local/games/quake/resource.1.




    Il est maintenant temps d'extraire les fichiers de Quake. Le
     fichier resource.1 est une archive lha (lha est un format de
     compression et d'archivage comme zip ou tar). Nous utiliserons la
     commande lha(1) pour l'extraire. Si lha n'est pas dj install sur
     votre systme, vous pouvez l'obtenir depuis
     ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.



       lha e /mnt/cdrom/resource.1





  Lorsque lha aura termin, votre rpertoire Quake contiendra bon nombre
  de fichiers nouveaux.  Un rpertoire appel id1/ aura galement t
  cr. Les fichiers de ce rpertoire sont les seuls importants pour
  Quake Linux, aussi vous pouvez sans crainte supprimer tout les autres.
  Si vous tes totalement nouveau dans Quake, ou mme si vous ne l'tes
  pas, vous pouvez souhaiter conserver les fichiers *.txt. Sur mon
  systme, je rassemble tous les "readme" dans un rpertoire doc/. Pour
  ce faire :



       cd /usr/local/games/quake
       mkdir doc
       mv *.txt doc
       rm -f *






    Si vous installez depuis une version CD 1.01 CD, vous devez
     maintenant remplacer vos fichiers id1/pak0.pak par ceux de la
     version shareware de Quake. Installez la version shareware comme
     cela est dcrit dans ``Installation de la Version Shareware'', en
     effectuant cette installation dans un rpertoire temporaire afin de
     ne pas craser vos fichiers CD. Lorsque vous avez extrait tous les
     fichiers shareware, copiez le fichier id1/pak0.pak du rpertoire
     temporaire shareware dans votre rpertoire
     /usr/local/games/quake/id1. Aprs quoi vous pouvez craser tous les
     fichiers temporaires sharewares.

  Voil pour ce qui est de l'installation  partir du CD. Vous pouvez
  maintenant passer  la section ``Installation des Binaires Linux''.


  22..22..44..  IInnssttaallllaattiioonn ssoouuss LLiinnuuxx ddeeppuuiiss DDOOSS//WWiinnddoowwss

  Si vous avez Quake install sous Windows ou DOS sur une machine
  diffrente, vous pouvez transfrer les fichiers dans quake\id1\ sur
  votre systme Linux via FTP ou tout autre moyen. Gardez  l'esprit que
  les noms des fichiers sur Linux doivent tre en minuscules pour que
  Quake puisse les trouver, aussi vous devrez ventuellement les
  renommer aprs le transfert. Notez galement qu'il peut tre ensuite
  ncessaire de supprimer votre installation sous DOS/Win afin de rester
  en rgle avec les termes de la licence consentie par ID SOFTWARE. Ce
  ne sera pas ma faute si vous faites quelque chose d'illgal.

  Si vos systmes DOS/Win et Linux sont sur la mme machine, vous avez
  deux possibilits: copier les fichiers de votre partition DOS/Windows
  sur votre partition Linux, ou crer des liens sur les fichiers
  ncessaires sous Linux. Les deux options fonctionnent aussi bien. Vous
  conomisez simplement  peu prs 50 megaoctets d'espace disque quand
  vous crez des liens au lieu de copier.

  Quoi que vous choisissiez de faire, commencez par vous dplacer dans
  votre rpertoire Quake et crez un nouveau rpertoire appel id1:



       cd /usr/local/games/quake
       mkdir id1





    Si vous prfrez copier les fichiers de votre partition
     DOS/Windows, faites quelque chose de ce genre:



       cp /win95/games/quake/id1/*.pak id1





    Pour crer des liens sur vos fichiers Quake DOS/Windows, faites
     ceci  la place:



       cd id1
       ln -s /win95/games/quake/id1/*.pak .


  Remplacez /win95/games/quake par le chemin correspondant  votre
  partition DOS/Windows et  votre rpertoire d'installation Quake.

  Les fichiers de donnes Quake sont maintenant installs. Passez 
  l'``Installation des Binaires Linux''.




  22..22..55..  IInnssttaallllaattiioonn ddee llaa VVeerrssiioonn SShhaarreewwaarree

  L'unique pisode de la version shareware de Quake est gratuitement
  disponible au tlchargement sur le site ftp de ID SOFTWARE. Il a
  toutes les fonctionnalits de la version complte, avec deux
  limitations majeures: vous ne pouvez pas jouer  QuakeWorld avec, et
  vous ne pouvez pas modifier les niveaux.

  L'installation de la version shareware de Quake n'est pas trs
  diffrente de l'installation  partir du CD.


  Voyez la section ``Tlchargement des fichiers ncessaires'' pour
  trouver les rfrences de la distribution shareware.  Tlchargez-la
  et dcompressez-la dans votre rpertoire Quake :



       cd /usr/local/games/quake
       unzip -L /wherever/you/put/it/quake106.zip




  Maintenant vous avez (entre autres) un fichier appel resource.1 qui
  est en fait une archive lha (lha est un format de compression et
  d'archivage comme zip ou tar). Nous utiliserons la commande llhhaa((11))
  pour l'extraction.

  Si lha n'est pas dj install sur votre systme, vous pouvez
  l'obtenir depuis
  ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.



       lha e resource.1




  Lorsque lha aura termin, votre rpertoire Quake contiendra bon nombre
  de fichiers nouveaux. Un rpertoire appel id1/ aura galement t
  cr.  Les fichiers de ce rpertoire sont les seuls importants pour
  Quake Linux, aussi vous pouvez sans crainte supprimer tous les autres.
  Si vous tes totalement nouveau dans Quake, ou mme si vous ne l'tes
  pas, vous pouvez souhaiter conserver les fichiers*.txt. Sur mon
  systme, je rassemble tous les "readme" dans une rpertoire doc/. Pour
  ce faire :



       cd /usr/local/games/quake
       mkdir doc
       mv *.txt doc
       rm -f *


  Maintenant vous tes prt  installer les binaires Linux.




  22..33..  AAjjoouutt ddeess BBiinnaaiirreess LLiinnuuxx

  Dcidez lequel des trois composants de Quake vous souhaitez installer:


    X11 Quake vous permet d'excuter Quake dans une fentre de votre
     bureau X.  C'est le client le moins excitant, mais c'est une bonne
     et sre manire de tester votre installation.

    Squake est le client Quake SVGAlib. Il s'excute en plein cran sur
     votre console.

    GLQuake est le client Quake OpenGL, la Seule Vraie Manire de jouer
      Quake si vous possdez une carte acclratrice 3Dfx.

  Tlchargez les paquetages que vous souhaitez (reportez-vous  la
  section``Tlchargement des fichiers Ncessaires'') et extrayez-les
  dans votre rpertoire Quake de ce faon:



       cd /usr/local/games/quake
       tar -xzf XXXX-i386-unknown-linux2.0.tar.gz





  22..44..  MMiissee eenn ppllaaccee ddeess PPeerrmmiissssiioonnss

  Les serveurs de Quake et QuakeWorld peuvent tre excuts par
  n'importe quel utilisateur. Les clients Quake, de toute faon, ont
  besoin d'accder  vos cartes son et graphique, ce qui requiert des
  privilges que les utilisateurs normaux n'ont pas. Une (mauvaise)
  faon de contourner le problme est de toujours lancer Quake en tant
  que root. Tout Administrateur Systme Responsable hurlera 
  l'vocation de cette suggestion malsaine. Rendre les binaires de Quake
  "setuid root" est une solution plus acceptable (Ndt: setuid est une
  instruction Linux/Unix rendant ici possible l'excution par des
  joueurs n'tant pas root).  Quake peut alors tre excut par un
  utilisateur normal et a toujours les privilges ncessaires aux accs
  son et graphique.  Setuid prsente cependant un risque de scurit. Un
  utilisateur astucieux peut exploiter un bug ou un trou de scurit
  dans Quake pour parvenir  un accs root sur votre systme. Bien sr,
  si vous n'excutez pas de session multi-utilisateur, cela peut ne pas
  tre une grosse proccupation..

  squake est le seul client Quake qui _d_o_i_t tre excut avec les
  permissions root. Avec un peu de travail, vous pouvez excuter les
  clients X et GL sans setuid. ``Excuter les jeux X et GL sans
  setuid'', dans la section Trucs et Astuces, vous expliquera comment
  faire.

  Si vous projetez de d'excuter squake, rendez-le setuid root avec les
  commandes suivantes :



       chown root squake
       chmod 4755 squake

  Si vous dcidez d'excuter quake.x11 et glquake setuid root sur votre
  systme, vous pouvez rpter ces commandes sur ces binaires.



  22..55..  XX1111 QQuuaakkee

  Si vous installez le client X11, voici venu le moment de le tester.
  Vous pouvez avoir besoin d'affiner la configuration pour glquake et
  squake, mais quake.x11 est maintenant prt  s'excuter.



       cd /usr/local/games/quake
       ./quake.x11




  Si tout fonctionne, une petite fentre Quake doit apparatre avec la
  premire dmo en action. Vous devez entendre les effets sonores et
  ventuellement la musique si le CD est mont. Si rien ne se passe,
  consultez l'aide de la section ``Problmes''.


  22..66..  QQuuaakkee SSVVGGAAlliibb

  Squake et glquake ncessitent SVGAlib pour s'excuter. (glquake
  utilise SVGAlib pour traiter les entres clavier et souris, si cela
  vous surprend). SVGAlib est fournie avec les distributions de Linux
  les plus modernes et ddooiitt tre correctement configure pour que squake
  ou glquake fonctionnent convenablement.

  libvga.config est le fichier de configuration de SVGAlib. Sur la
  plupart des systmes, vous le trouverez dans /etc ou /etc/vga.  Soyez
  certain que les paramtrages de la souris, du moniteur et de la carte
  vido contenus dans ce fichier sont corrects pour votre systme.
  Reportez-vous  la documentation de SVGAlib pour plus de dtails.

  Si vous n'avez pas encore SVGAlib install, tlchargez le depuis le
  site mentionn dans la ``Section fichiers'' ci-dessous.  Si vous
  possdez une Redhat 5.x, ou une autre distribution base sur la glibc,
  rfrez-vous  ``Considrations relatives  Glibc, RedHat 5.x et
  Debian 2'', dans la section Problmes/FAQs, pour d'importantes
  recommandations sur la compilation des librairies  utiliser avec
  Quake. Une librairie binaire "libc5 SVGAlib" prcompile est
  disponible 
  http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar
  .gz pour ceux qui ne veulent pas se mesurer aux tracas de la
  compilation de libc5.

  Vous devrez lancer squake d'une console virtuelle. Il ne fonctionnera
  pas sous X  moins que vous ne soyez root lorsque vous le lancez. Et
  lancer un jeu en tant qu'utilisateur root est quelque chose 
  proscrire. Aussi, si vous tes sous X, faites un CTRL+ALT+F1, login et
  alors:



       cd /usr/local/games/quake
       ./squake





  ``Lancer des jeux SVGA et GL depuis X'', dans la section Trucs et
  Astuces ci-dessous, vous expliquera comment lancer Quake SVGA et Quake
  GL depuis X sans passer manuellement sur une console virtuelle.


  22..77..  GGLLQQuuaakkee

  L'utilisation de tout matriel acclrateur ouvre la Voie Royale de
  Quake.  Rien ne peut le remplacer, et l'essayer c'est l'adopter.

  Pour excuter glquake, vous avez besoin d'une carte graphique 3D avec
  chipset Voodoo, Voodoo2 ou Voodoo Rush. Il y a des points particuliers
   respecter pour dclarer une carte Voodoo Rush, et je ne peux les
  dvelopper ici car, franchement, je ne saurais pas de quoi je parle.
  Une prochaine version de ce HOWTO couvrira cet aspect (Si quelqu'un
  souhaite s'en charger, je serai heureux d'intgrer ses explications).

  Les librairies SVGAlib, Glide, et Mesa doivent tre correctement
  installes et configures pour que glquake fonctionne. Les sections
  suivantes vous expliqueront brivement comment vous y prendre.

  Le Linux 3Dfx HOWTO (http://www.gamers.org/dEngine/xf3D/howto/3Dfx-
  HOWTO.html) de Bernd Kreimeier (bk@gamers.org) est une source
  d'informations plus complte.

  Le newsgroup des serveurs 3dfx (news.3dfx.com) 3dfx.glide.linux est
  une autre bonne source d'information, au croisement de Linux, glide,
  Mesa et Quake.


  22..77..11..  SSVVGGAAlliibb

  glquake utilise SVGAlib pour grer la souris et le clavier, aussi vous
  devrez le configurer comme il est prcis dans la section `` Quake
  SVGAlib''.


  22..77..22..  GGlliiddee

  Glide est une librairie qui fournit un API pour la programmation des
  cartes de type 3dfx.  Si vous souhaitez que la librairie graphique
  Mesa utilise votre carte 3dFX, vous devez l'avoir.  La dernire
  version de glide peut tre trouve sur
  http://glide.xxedgexx.com/3DfxRPMS.html. Choisissez le(s) paquetage(s)
  appropri(s)  votre systme, et installez-le(s) en vous reportant aux
  instructions de la page web.

  Notez bien que tant que vous n'aurez pas tlcharg le paquetage du
  driver 3Dfx en plus de la librairie Glide, vous ne pourrez lancer que
  des applications Glide (comme GLQuake) sous root. Installez le module
  /dev/3dfx et vous pourrez jouer  GLQuake en tant que simple
  utilisateur.

  Une fois que glide est install, excutez le programme de test fourni.
  Souvenez-vous que ce programme est une bonne solution pour
  rinitialiser votre affichage si une application glide plante et
  teint votre cran. NNOOTTAA:: llaanncceezz ccee tteesstt dd''uunnee ccoonnssoollee vviirrttuueellllee,, _p_a_s
  ddeeppuuiiss XX!! Il est possible que cette application test perde le contrle
  du clavier et de la souris sous X, et vous vous retrouveriez bloqu.



       /usr/local/glide/bin/test3Dfx



  Votre cran doit virer au bleu et vous demander de presser une touche.
  Une fois cette touche presse, vous retournerez au prompt.
  3dfx.glide.linux sur le serveur de news 3dfx (news.3dfx.com) est une
  bonne source d'information pour les problmes spcifiques  glide sous
  Linux.


  22..77..33..  MMeessaa

  Une fois glide install, vous aurez besoin d'installer Mesa, l'OpenGL
  libre ralis par Brian Paul (brianp@elastic.avid.com). Par chance,
  vous n'avez pas  chercher bien loin, car Mesa 2.6 est inclus avec les
  binaires de QLQuake et QuakeWorld. Tout ce que vous avez  faire est
  de le placer au bon endroit:



       cd /usr/local/games/quake
       cp libMesaGL.so.2.6 /usr/local/lib
       ldconfig




  Si vous souhaiter une version plus rcente de Mesa (Mesa 3.0 est lors
  de la rdaction de ce document la plus rcente) visitez le site
  ftp://iris.ssec.wisc.edu/pub/Mesa.  Si vous avez une distribution
  RedHat 5.x ou une autre distribution base sur glibc, reportez-vous
  aux ``Considrations relatives  Glibc, RedHat 5.x et Debian 2'', dans
  la section Problmes/FAQs, pour d'importantes recommandations sur la
  compilation des librairies  utiliser avec Quake.

  Aprs une compilation conforme  ces instructions, vous avez deux
  choses  faire:


    Supprimer votre ancienne installation Mesa. Si vous avez
     pralablement install libMesaGL.so.2.6 comme dcrit ci-dessus,
     vous devez la supprimer ou bien Quake n'utilisera pas la nouvelle
     version.



       cd /usr/local/lib/
       rm -f libMesaGL.so.2*





    Si votre nouvelle Mesa a un numro majeur de version suprieur  2,
     vous devrez crer un lien avec le nom libMesaGL.so.2:



       cd /usr/local/lib/
       ln -s /wherever/you/installed/it/libMesaGL.so.3.0 libMesaGL.so.2
       ldconfig





  Maintenant passons sur une console virtuelle (CTRL+ALT+F1) et lanons
  glquake.

       cd /usr/local/games/quake
       ./glquake





  22..88..  CCoommmmaannddeess dd''ooppttiioonnss eenn lliiggnnee ssppcciiffiiqquueess  LLiinnuuxx

  Cette section rassemble les commandes en ligne qui sont spcifiques
  aux versions Linux de Quake. Il existe beaucoup d'autres options, mais
  elles dpassent le cadre de cet HOWTO. Recherchez ce genre
  d'information sur les sites lists dans la section ``Informations
  Gnrales sur Quake''.


     --mmeemm _n_u_m
        Spcifie la mmoire  allouer en megaoctets (par dfaut 8Mo, ce
        qui doit tre suffisant dans la plupart des cas).


     --nnoossttddoouutt
        Ne renvoie aucune information sur la sortie standard. Utilisez
        cette option si vous voulez viter de collecter tous les
        messages des consoles sur votre terminal.


     --mmddeevv _d_e_v_i_c_e
        Le fichier systme de la souris, par dfaut /dev/mouse


     --mmrraattee _s_p_e_e_d
        La frquence, en bauds, de la souris, par dfaut 1200.


     --ccddddeevv _d_e_v_i_c_e
        Le fichier systme du CD, par dfaut /dev/cdrom.


     --mmooddee _n_u_m
        Utilise le mode vido indiqu (squake uniquement).


     --nnookkddbb
        N'initialise pas le clavier.


     --ssnnddbbiittss _8 _o_r _1_6
        Dfinit la taille de l'chantillon sonore en bits. La valeur par
        dfaut est 16 si cela est support.


     --ssnnddssppeeeedd _s_p_e_e_d
        Dfinit la frquence sonore. Les valeur usuelles sont 8000,
        11025, 22051 ou 44100. La valeur par dfaut est 11025.


     --ssnnddmmoonnoo
        Positionne le mode son en mono.


     --ssnnddsstteerreeoo
        Positionne le mode son en stro (par dfaut s'il est support).



  22..99..  QQuuaakkeeWWoorrlldd ****

  http://www.quakeworld.net est plus loquent que je ne saurais l'tre:


       QuakeWorld est une version Internet de Quake multi-joueurs.
       Bien que l'on puisse jouer avec la version originale de
       Quake sur Internet, les utilisateurs de modems - la majorit
       des joueurs, y trouvaient moins de satisfaction. Des
       symptmes comme un retard excessif (des actions ralises
       bien aprs qu'elles aient t inities), des pertes de
       paquets (le jeu se bloquait et repartait quelques secondes
       plus tard), et diverses autres difficults harcelaient les
       utilisateurs. Aprs avoir pris conscience du nombre de per
       sonnes qui jouaient  Quake sur Internet, et du nombre de
       celles qui souhaitaient le faire mais s'abstenaient car
       elles n'taient pas satisfaites des performances, John Car
       mack de id Software dcida de crer une version de Quake
       optimise pour le modem moyen d'un joueur internaute. Cette
       version Internet spcifique ne fait qu'une chose, excuter
       au mieux le jeu sur un rseau TCP/IP tel qu'Internet.  Elle
       n'a aucun support pour un usage individuel, et vous ne pou
       vez rien faire sans tre connect  un serveur spcial.


  Vous avez besoin de la version complte, dclare ou achete, de Quake
  pour jouer  QuakeWorld, et d'un client QuakeWorld pour Linux. Les
  clients QuakeWorld sont semblables aux clients normaux Quake (X11,
  SVGAlib and Mesa), mais ils sont rassembls dans un seul paquetage,
  aussi vous n'avez  tlcharger qu'un fichier. Quoi qu'il en soit,
  vous devrez choisir entre 4 paquetages:


    un paquetage libc5 tar.gz

    un paquetage glibc tar.gz

    un paquetage libc5 rpm

    un paquetage glibc rpm

  Installez un seul de ces paquetages. Chacun contient les mmes
  fichiers, ils sont simplement lis  des librairies diffrentes. Les
  utilisateurs de Redhat 5.x choisiront le paquetage rpm glibc. Les
  utilisateurs de systmes bass sur glibc sans support rpm choisiront
  le paquetage glibc tar. Le rpm libc5 est rserv au distributions
  Redhat antrieures  la 5.0 et les autres distributions utilisant le
  format de paquetage rpm. Le paquetage libc5 tar.gz est destin  la
  distribution Slackware et  toutes les autres.

  Voyez la section ``Tlchargement des Fichiers Ncessaires'' pour
  trouver l'adresse des fichiers Quakeworld pour Linux.

  Les prrequis et la mthode de configuration de ces binaires sont les
  mmes que ceux de Quake, aussi rfrez-vous aux section prcdentes
  dtaillant la configuration de SVGAlib ou de glide/Mesa.



  22..99..11..  IInnssttaallllaattiioonn ddeess ppaaqquueettaaggeess RRPPMM ++++

  L'installation des paquetages rpm est aussi simple que ceci:




  su root
  rpm -Uvh qwcl-xxxxx.i386.rpm




  qwcl, glqwcl et glqwcl.glx seront installs setuid root pour pouvoir
  accder aux priphriques graphiques de votre systme.  Les clients X
  et GL peuvent tre lancs sans les privilges root si vous suivez les
  instructions ``Excuter des jeux X et GL sans setuid'' ci-dessous.

  Rpm peut se plaindre de ne pas trouver libglide2x.so. La librairie
  Glide est uniquement ncessaire si vous possdez une carte 3Dfx et
  souhaitez lancer QuakeWorld en mode GL (glqwcl). Si vous ne prvoyez
  pas d'utiliser le mode GL, vous pouvez passer outre les dpendances de
  glide avec l'option --nodeps:



       su root
       rpm -Uvh qwcl-xxxxx.i386.rpm --nodeps





  22..99..22..  IInnssttaallllaattiioonn ddeess ppaaqquueettaaggeess ttaarr..ggzz ++++

  Il suffit de "dtarer" le fichier dans votre rpertoire Quake.
  Effectuez cette opration en tant que root, et les permissions
  convenables seront conserves:



       cd /usr/local/games/quake
       su root
       tar -xzf qwcl2.21-i386-unknown-linux2.0.tar.gz




  qwcl, glqwcl et glqwcl.glx seront installs setuid root et pourront
  donc accder aux priphriques graphiques de votre systme.  Les
  clients X et GL peuvent tre lancs sans les privilges root si vous
  suivez les instructions ``Excuter des jeux X et GL sans setuid'' ci-
  dessous.


  22..99..33..  EExxccuuttiioonn ddee QQuuaakkeeWWoorrlldd ++++

  Une fois que QuakeWorld est install  cot de vos fichiers Quake,
  vous pouvez le lancer par:



       ./qwcl +connect some.server.address




  Voyez la section ``Logiciels apparents'' pour trouver de
  l'information sur quelques formidables interfaces pour QuakeWorld qui
  rendent facile la localisation de serveurs.



    lliibb33ddffxxggll..ssoo  **

     Avec Quakeworld version 2.30, une alternative  la librairie Mesa
     est envisageable. lib3dfxgl.so est un mini driver GL optimis pour
     Quake qui fournit une rafrachissement lgrement meilleur que
     celui de Mesa. Il s'agit du portage d'un driver que 3Dfx a
     dvelopp pour Quake sous Windows, et apparemment toutes ses
     possibilits ne fonctionnent pas correctement. Nous comptons bien
     que ses performances s'amlioreront avec le temps.

     Comme Mesa, lib3dfxgl.so ncessite Glide pour accder  votre carte
     3Dfx. Le paquetage QuakeWorld est fourni avec un script,
     glqwcl.3dfxgl permettant de lancer Quakeworld avec sa librairie sur
     les systmes glibc. Le paragraphe suivant explique comment lancer
     Quakeworld avec lib3dfxgl.so sur un systme libc5. Sur un systme
     glibc, pour que ce script fonctionne, l'excutable glqwcl nnee ddooiitt
     ppaass ttrree sseettuuiidd, et vous ne devez pas le lancer en tant que root.
     glqwcl chargera silencieusement Mesa au lieu de lib3dfxgl.so si il
     est excut avec les permissions root. Cette non-ncessit d'tre
     root suppose que vous ayez le driver /dev/3dfx install.

     Sur un systme libc5, vous devrez crer un lien symbolique sur
     lib3dfxgl.so appel libMesaGL.so.2 de cette faon:



       cd /usr/local/games/quake
       ln -sf lib3dfxgl.so libMesaGL.so.2




  Puis lancez Quakeworld depuis un script assignant le rpertoire
  courant  $LD_LIBRARY_PATH :


  ______________________________________________________________________
  #!/bin/sh

     LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ./glqwcl $*

  ______________________________________________________________________



  Vous pouvez vrifier quel driver est charg en attendant sur votre
  console un message de ce genre au dmarrage de Quakeworld:



       GL_VENDOR: 3Dfx Interactive Inc.
       GL_RENDERER: 3Dfx Interactive Voodoo^2(tm)
       GL_VERSION: 1.1
       GL_EXTENSIONS: 3DFX_set_global_palette WGL_EXT_swap_control
       GL_EXT_paletted_texture GL_EXT_shared_texture_palette GL_SGIS_multitexture




  Si GL_VENDOR affiche Brian Paul au lieu de 3Dfx Interactive Inc., cela
  signifie que Mesa est encore utilis  la place du mini driver.


    ggllqqwwccll..ggllxx **


     glqwcl.glx est li aux librairies standard OpenGL  la place de
     Mesa.  Cela permet  Quakeworld de s'excuter sur d'autres
     matriels 3D supports par d'autres implmentations d'OpenGL. A ce
     jour, je ne connais pas d'autres implmentations d'OpenGL qui
     supportent un matriel diffrent de 3Dfx, mais ce fournisseur
     assure qu' leur apparition, ces matriels permettront de jouer 
     Quake.

     C'est une application GLX, qui de ce fait doit tre lance sous X.

     Vous pouvez utiliser ce client avec Mesa/3Dfx si vous installez
     Mesa et Glide comme dtaill dans la section prcdente. Dfinissez
     alors la variable d'environnement $MESA_GLX_FX  "fullscreen" avant
     de lancer quake2:



       export MESA_GLX_FX=fullscreen
       ./glqwcl.glx +_windowed_mouse 1




  Pourquoi l'option +_windowed_mouse 1 ? Rappelez-vous que c'est une
  application X qui utilisera votre carte 3Dfx. Mme si l'affichage se
  fait en plein cran, Quakeworld s'excute encore dans une fentre. Ce
  qui signifie que si vous n'tes pas _t_r__s prudent, vous pouvez dplacer
  le pointeur de la souris en dehors de la fentre de Quakeworld, et
  Quakeworld s'arrtera subitement de rpondre  la souris et au
  clavier. +_windowed_mouse 1 contourne le problme en demandant 
  glqwcl.glx de conserver la souris dans la fentre.


  22..1100..  SSeerrvveeuurrss

  La plupart des informations, pour ne pas dire toutes, concernant le
  fonctionnement des serveurs QW DOS/Windows sont transposables pour le
  fonctionnement sous Linux.

  Pour lancer un serveur QuakeWorld, faites simplement:



       ./qwsv




  Le manuel officiel du serveur QuakeWorld se trouve sur
  http://qwcentral.stomped.com.


  22..1111..  MMooddeess eett AAjjoouuttss

  Un des aspects les plus sympathiques des jeux Quake rside dans le
  fait que les auteurs les ont rendus facilement enrichissables. Les
  utilisateurs peuvent crer leurs propres niveaux, ajouter de nouvelles
  armes, de nouveaux monstres ou mme changer totalement les rgles du
  jeu.


  22..1111..11..  CCaappttuurree dduu DDrraappeeaauu

  Il s'agit de ma variation favorite sur Quake et Quake 2. A lieu de
  simplement se jeter partout et tuer tous ceux que vous rencontrez (ce
  qui est quand mme mritant, n'exagrons pas!), CTF (Ndt : Capture The
  Flag en anglais) est une variante plus stratgique, base sur un jeu
  par quipe.  Dave 'Zoid' Kirsch, qui est galement le mainteneur du
  portage de Quake sous Linux, en est le crateur.

  Tout ce que vous devez savoir sur CTF peut tre trouv sur
  http://captured.com/threewave/.  Vous avez besoin de
  ftp://ftp.cdrom.com/pub/quake/planetquake/threewave/ctf/client/3wctfc.zip
  pour jouer.  Pour installer la partie client de CTF, crez simplement
  un rpertoire appel ctf dans votre rpertoire Quake et 'unzippez' le
  fichier 3wctfc.zip  cet endroit. Le fichier readme.txt regorge
  d'informations trs utiles.



       cd /usr/local/games/quake
       mkdir ctf
       cd ctf
       unzip -L /wherever/you/put/it/3wctfc.zip




  Pour toute information sur le lancement d'un serveur CTF, reportez-
  vous aux pages mentionnes ci-dessus.


  22..1111..22..  MMiissssiioonn PPaacckkss ****

  Activision a ralis deux "add-on packs" de niveaux supplmentaires
  pour Quake, SSccoouurrggee ooff AArrmmaaggoonn et DDiissssoolluuttiioonn ooff EEtteerrnniittyy.


    MMiissssiioonn PPaacckk 11:: TThhee SSccoouurrggee ooff AArrmmaaggoonn Assurez-vous que votre CD
     est mont sous /mnt/cdrom et que Quake est install dans
     /usr/local/games/quake:



       cd /usr/local/games/quake
       mkdir hipnotic
       cp /mnt/cdrom/hipnotic/pak0.pak hipnotic
       cp /mnt/cdrom/hipnotic/config.cfg hipnotic





  Vous pouvez jouer avec ce pack en tapant ceci:



       cd /usr/local/games/quake
       ./quake.x11 -game hipnotic





    MMiissssiioonn PPaacckk 22:: DDiissssoolluuttiioonn ooff EEtteerrnniittyy L'installation de ce second
     pack se fait selon une procdure trs proche de celle du premier.
     Suivez les instructions concernant le 'Mission Pack 1', mais
     remplacez le mot _h_i_p_n_o_t_i_c par le mot _r_o_g_u_e, et sautez l'tape
     config.cfg, ce fichier n'tant pas inclus dans le deuxime pack.



  22..1111..33..  LLeess OOuuttiillss QQuuaakkee

  Quelqu'un voudra-t-il contribuer  ce HOWTO en m'envoyant quelques
  informations sur qcc, bsp et tout cela ?



  33..  QQuuaakkee IIII

  Pour installer QuakeII sur votre systme Linux, vous aurez besoin de
  quelques composants de la distribution officielle de Quake par id.
  Cela pourra tre n'importe quel CD-ROM DOS/Windows achet  votre
  dtaillant favori ou la version de dmonstration tlcharge sur
  Internet (reportez-vous ``Tlchargement des fichiers ncessaires''
  pour les dtails sur la manire d'acqurir la version de
  dmonstration).

  Ou bien, si vous avez dj Quake install sur une machine Windows,
  vous pouvez utiliser les fichiers provenant de cette installation.



  33..11..  PPrrrreeqquuiiss

  Vous aurez besoin, au strict minimum, de la configuration suivante :


    Un ordinateur de type Pentium 90 ou mieux (133 recommand)

    16 Mo RAM (24 recommand)

    Le CD-ROM Quake 2 oouu la version de dmonstration (q2-314-demo-
     x86.exe)

    Un noyau Linux version 2.0.24 ou suprieure

    libc 5.2.18 ou suprieure

    Au choix :

    Un serveur X11 qui supporte l'extension mmoire partage MITSM. Les
     affichages sur 8 et 16 bits sont supports pour les interprteurs X

    SVGAlib 1.2.0 ou suprieure (pour les interprteurs SVGA et GL)

    25-400 megaoctets d'espace disque libre (dpend de votre
     installation)

    L'accs root sur la machine devant recevoir l'installation


  En Option:

    Une carte son supporte

    Une carte acclratrice 3Dfx VooDoo Graphics ou VooDoo2 ou Voodoo
     Rush 3D

    Les librairies glide 3Dfx installes (pour les interprteurs GL)

    Mesa 2.6 ou suprieure (pour les interprteurs GL)





  33..22..  IInnssttaallllaattiioonn ddee QQuuaakkee IIII



  33..22..11..  TTllcchhaarrggeemmeenntt ddeess FFiicchhiieerrss nncceessssaaiirreess****

  Tous les fichiers ncessaires  Quake II pour Linux sont disponibles
  sur le site ftp de ID Software, ftp.idsoftware.com.

  Ce site pouvant tre trs sollicit, vous pouvez utiliser l'un des
  sites miroirs ci-dessous :

    ftp.cdrom.com/pub/idgames/idstuff (Californie, USA)

    ftp.gamesnet.net/idsoftware (Californie, USA)

    ftp.stomped.com/pub/mirror/idstuff (Minnesota, USA)

    mirrors.telepac.pt/pub/idgames (Lisbonne, Portugal)

    download.netvision.net.il/pub/mirrors/idsoftware (Hafa, Israel)

  Les fichiers de Quake II mentionns dans cette section sont :

    Binaires Quake II Linux

    Paquetage libc5 tar.gz
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-i386-unknown-
     linux2.0. tar.gz

    Paquetage glibc tar.gz
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-glibc-
     i386-unknown-lin ux2.0.tar.gz

    Paquetage rpm libc5 rpm
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-2.i386.rpm

    Paquetage rpm glibc
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-
     glibc-2.i386.rpm

    La version de dmonstration de Quake II pour Windows
     ftp://ftp.idsoftware.com/idstuff/quake2/q2-314-demo-x86.exe

    Les sources du jeu Quake II
     ftp://ftp.idsoftware.com/idstuff/quake2/source/q2source-3.14.shar.Z

    Quake II - Capture du
     drapeauftp://ftp.idsoftware.com/idstuff/quake2/ctf/102.zip

  Autres logiciels mentionns:

    Librairie graphique SVGAlib
     http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.tar.gz

    Binaires libc5 SVGAlib
     http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar
     .gz

    Librairies Glide runtime http://glide.xxedgexx.com/3DfxRPMS.html

    Librairie graphique Mesa
     3Dhttp://www.ssec.wisc.edu/~brianp/Mesa.html

    Utilitaire de dcompression unzip
     http://sunsite.unc.edu/pub/Linux/utils/compress/unzip-5.31.tar.gz
  33..22..22..  CCrraattiioonn dduu rrppeerrttooiirree dd''iinnssttaallllaattiioonn

  La premire chose que vous avez  faire est de dcider o vous allez
  installer Quake II. Beaucoup l'installent dans /usr/games/quake.
  L'administrateur systme que je suis a choisi d'installer tout ce qui
  n'est pas partie intgrante de ma distribution Linux sous /usr/local.
  Aussi,, pour moi, Quake II a trouv sa place sous
  /usr/local/games/quake2. Si vous choisissez de l'installer ailleurs,
  n'oubliez pas de substituer le chemin appropri partout o
  /usr/local/games/quake2 est indiqu.

  Bien! Maintenant, crons le rpertoire dans lequel nous allons
  installer Quake II, et dplaons-nous dedans (les instructions
  suivantes partent du principe que c'est notre rpertoire courant).



       mkdir /usr/local/games/quake2
       cd /usr/local/games/quake2





  33..22..33..  IInnssttaallllaattiioonn ddeeppuuiiss uunn CCDD

  Introduisez votre CD de Quake II dans votre lecteur, et montez-le:



       mount -t iso9660 /dev/cdrom /mnt/cdrom




  Si votre CD-ROM est mont sur un autre point de montage, remplacez
  /mnt/cdrom par le bon emplacement. Si vous n'tes pas certain du point
  de montage de votre CD-ROM, reportez-vous  la documentation de votre
  distribution.


    IInnssttaallllaattiioonn ccoommppllttee La mthode d'installation la plus simple est
     l'installation complte qui consiste  copier l'intgralit de
     votre CD sur votre disque dur. Cela ncessite environ 350 Mo, et se
     ralise par le biais des commandes suivantes :



       cd /usr/local/games/quake2
       cp -r /mnt/cdrom/Install/Data/* .





  Il y a une grande quantit de fichiers Windows inutiles que vous pou
  vez supprimer sans crainte:



       rm -f /usr/local/quake2/*.dll
       rm -f /usr/local/quake2/quake2.exe
       rm -f /usr/local/quake2/baseq2/gamex386.dll



    IInnssttaallllaattiioonn iinntteerrmmddiiaaiirree Si vous pensez que 450 Mo reprsente un
     peu trop d'espace  allouer  Quake II, vous pouvez viter la copie
     des scnes vido, et crer  la place des liens sur le CD-ROM. Cela
     rduira d'environ 200 Mo l'espace ncessaire:



       cd /usr/local/games/quake2
       mkdir baseq2
       cp /mnt/cdrom/Install/Data/baseq2/pak0.pak baseq2
       cp -r /mnt/cdrom/Install/Data/baseq2/players baseq2
       ln -s /mnt/cdrom/Install/Data/baseq2/video baseq2/video





  Notez que cela ne signifie pas que vous devrez monter le CD  chaque
  fois que vous jouerez  Quake. Si le jeu ne peut pas charger les
  vidos, il ne les affichera pas.


  33..22..44..  IInnssttaallllaattiioonn ssuurr LLiinnuuxx ddeeppuuiiss WWiinnddoowwss

  Si vous avez Quake II install sous Windows sur une machine
  diffrente, vous pouvez transfrer les fichiers dans quake2\baseq2\
  sur votre systme Linux via FTP ou quelque chose de similaire. Gardez
   l'esprit que les noms des fichiers sur votre systme Linux doivent
  tre en minuscules pour que Quake II puisse les trouver, aussi vous
  pouvez avoir  les renommer aprs le transfert.  Notez galement qu'il
  peut tre ensuite ncessaire de supprimer votre installation sous
  Windows afin de rester en rgle avec les termes de la licence
  consentie par ID SOFTWARE. Ce ne sera pas ma faute si vous faites
  quelque chose d'illgal.

  Si vos systmes DOS/Win et Linux sont sur la mme machine, vous avez
  deux possibilits: copier les fichiers de votre partition Windows sur
  votre partition Linux, ou crer des liens sur les fichiers ncessaires
  sous Linux. Les deux options fonctionnent aussi bien. Vous conomisez
  simplement beaucoup d'espace disque quand vous crez des liens au lieu
  de copier.  Pour ce faire, remplacez /win95/games/quake2 dans
  l'exemple suivant par le chemin correct de votre partition Windows et
  de votre rpertoire d'installation Quake II.


    Si vous voulez copier les fichiers depuis votre partition Windows,
     faites quelque chose de ce genre:



       cd /usr/local/games/quake2
       cp -r /win95/games/quake2/baseq2 .





    Au lieu de cela, pour crer des liens sur vos fichiers Quake II,
     tapez:



       cd /usr/local/games/quake2
       ln -s /win95/games/quake2/baseq2 .


  Cette seconde mthode ncessite que chaque utilisateur puisse crire
  sur la partition Windows que vous liez, ce qui peut ne pas tre appro
  pri  tous les systmes. En rendant votre partition Windows
  inscriptible, vous donnez  tous les utilisateurs la possibilit de
  dtruire l'intgralit de votre installation Windows. Si cela ne vous
  effraie pas, modifiez votre /etc/fstab pour permettre le montage de la
  partition Windows avec les options _u_m_a_s_k_=_0_0_2_,_g_i_d_=_X_X_X, o XXX
  reprsente le numro du groupe des utilisateurs. Cherchez cette infor
  mation dans /etc/group. Lorsque fstab est modifi, dmontez et remon
  tez la partition Windows, et vous tes prt.

  Vous venez d'installer les fichiers de donnes de Quake II. Reportez-
  vous ci-dessus pour l'``Installation des binaires Linux''.



  33..22..55..  IInnssttaallllaattiioonn ddee llaa vveerrssiioonn ddee ddmmoonnssttrraattiioonn ****

  ID Software propose une version de dmonstration gratuite sur son site
  ftp. Elle reprsente 40 megaoctets  tlcharger. La dmonstration
  inclue toutes les fonctionnalits de la version complte, y compris le
  mode multi-joueurs, mais ne dispose que de trois niveaux de jeu, aussi
  il peut tre difficile de trouver un serveur adquat.

  Vous trouverez l'adresse de la version de dmonstration de Quake II
  dans la section ``Tlchargement des Fichiers Ncessaires''.
  Tlchargez-la et placer la dans votre rpertoire Quake II.

  La distribution de la dmonstration est sous forme d'un fichier zip
  auto-extractible (auto-extractible sous d'autres OS). Vous pouvez le
  dcompresser avec la commande uunnzziipp((11)) qui doit tre inclue dans la
  plupart des distributions modernes. Si vous n'avez pas unzip, vous
  pouvez le tlcharger depuis le site rpertori dans la section
  ``Tlchargement des Fichiers Ncessaires''.

  Placez-vous dans votre rpertoire Quake II et dcompressez l'archive:



       cd /usr/local/games/quake2
       unzip q2-314-demo-x86.exe




  Nous devons maintenant effacer plusieurs choses et en dplacer
  d'autres:


       rm -rf Splash Setup.exe
       mv Install/Data/baseq2 .
       mv Install/Data/DOCS docs
       rm -rf Install
       rm -f baseq2/gamex86.dll




  La dmonstration de Quake II est maintenant installe. Vous n'avez
  plus qu' ajouter les binaires de Linux.


  33..33..  AAjjoouutt ddeess bbiinnaaiirreess ddee LLiinnuuxx****

  Il y a quatre paquetages Quake II pour Linux disponibles au
  tlchargement:
    un paquetage tar.gz

    un paquetage tar.gz

    un paquetage rpm libc5

    un paquetage rpm glibc

  Installez uniquement l'un d'eux. Chaque paquetage contient les mmes
  fichiers, ils sont simplement lis  des librairies diffrentes. Les
  utilisateurs de Redhat 5.x devront choisir le paquetage rpm glibc. Les
  utilisateurs de systmes bass sur glibc sans support rpm devront
  utiliser le paquetage glibc tar. Le rpm libc5 est rserv aux
  distributions Redhat antrieures  la 5.0 et aux autres distributions
  utilisant le format de paquetage rpm. Le paquetage libc5 tar.gz est
  destin  la Slackware et aux autres.

  Voyez la section ``Tlchargement des Fichiers Ncessaires'' pour
  localiser les adresses des fichiers Quake II pour Linux.


  33..33..11..  IInnssttaallllaattiioonn ddeess ppaaqquueettaaggeess RRPPMM****

  L'installation des paquetages rpm est aussi simple que ceci:



       su root
       rpm -Uvh quake2-xxxxx.i386.rpm




  Rpm peut se plaindre de ne pas trouver libglide2x.so. La librairie
  Glide est uniquement ncessaire si vous possdez une carte 3Dfx et
  voulez lancer Quake II en mode GL. Si vous ne projetez pas d'utiliser
  le mode GL, vous pouvez vous affranchir des dpendances de glide avec
  l'option --nodeps:



       su root
       rpm -Uvh quake2-xxxxx.i386.rpm --nodeps





  33..33..22..  IInnssttaallllaattiioonn ddeess ppaaqquueettaaggeess ttaarr..ggzz ****

  Pour les installer, "dtarez" simplement le fichier dans votre
  rpertoire Quake II. Faites cette opration en tant que root pour que
  les permissions correctes soient conserves:



       cd /usr/local/games/quake
       su root
       tar -xzf qwcl2.21-i386-unknown-linux2.0.tar.gz







  33..44..  CCoonnffiigguurraattiioonn ddeess PPeerrmmiissssiioonnss ****

  Si vous avez lanc rpm ou tar en tant que root lors de l'installation
  du paquetage Quake II sur votre systme, les permissions correctes
  doivent tre mises en place. L'excutable quake2 a t install setuid
  root pour qu'il puisse accder aux priphriques graphiques de votre
  systme. Pour des raisons de scurit, les librairies d'interprtation
  ref_*.so sont la proprit de l'utilisateur root, et sont uniquement
  modifiables par lui. Si ces librairies n'appartiennent pas  root, ou
  bien si elles sont modifiables, quake2 refusera de s'excuter.

  Si vous envisagez d'excuter uniquement Quake II avec les
  interprteurs GL ou X, votre quake2 n'a pas besoin d'tre setuid root.
  Voyez ``Excution de jeux X et GL sans setuid'' et la rubrique Trucs
  et Astuces ci-dessous pour trouver le moyen de lancer Quake II sans
  permissions root.


  33..44..11..  QQuuaakkee22..ccoonnff ****


  Pour des raisons de scurit, il existe un fichier quake2.conf, qui
  indique  Quake II o trouver les librairies interprtatives dont il a
  besoin (ref_*.so). Il contient uniquement une ligne qui doit tre le
  chemin de votre installation Quake II. Quake II cherche ce fichier
  dans /etc. Si vous avez install Quake II depuis un paquetage .rpm, ce
  fichier a t install pour vous. Si vous avez install Quake II
  depuis un paquetage .tar, vous devez le crer de cette faon:



       su root
       cd /usr/local/games/quake2
       pwd > /etc/quake2.conf
       chmod 644 /etc/quake2.conf





  33..55..  LLeess iinntteerrpprrtteeuurrss XX

  Quake II doit tre maintenant prt  s'excuter sous X. Faites un
  essai:



       cd /usr/local/games/quake2
       ./quake2 +set vid_ref softx





  Si tout va bien, aprs une courte attente, une petite fentre Quake II
  apparatra avec la premire dmonstration en action. Vous devriez
  entendre les effets sonores et ventuellement la musique si le CD est
  mont. Si rien de tout cela ne se passe, voyez la section
  ``Problmes'' pour trouver de l'aide.


  33..66..  LL''iinntteerrpprrtteeuurr SSVVGGAAlliibb

  Vous avez besoin de SVGAlib installe et configure, que vous
  souhaitiez utiliser comme interprteur ref_soft ou ref_gl. (Quake II
  utilise SVGAlib pour grer les entres clavier et souris, au cas ou
  vous vous demanderiez pourquoi vous en avez besoin pour l'interprteur
  GL). SVGAlib est prsente dans les distributions les plus rcentes et
  ddooiitt tre correctement configure pour que Quake II fonctionne
  correctement sans X.  libvga.config est un fichier de configuration de
  SVGAlib. Sur la plupart des systmes, vous le trouverez soit sous /etc
  soit sous /etc/vga.  Soyez certain que la souris, l'cran et la carte
  vido mentionns dans ce fichier sont corrects pour votre systme.
  Voyez la documentation de SVGAlib pour de plus amples dtails.

  Si vous n'avez pas encore SVGAlib sur votre systme, tlchargez-le
  depuis l'emplacement mentionn dans la ``Section des fichiers'' ci-
  dessus. Si vous avez une RedHat 5.x ou une autre distribution Linux
  base sur glibc, voyez ``Considrations relatives  Glibc, RedHat 5.x
  et Debian 2'' dans la section Problmes/FAQs, pour d'importantes
  recommandations sur la compilation des librairies  utiliser avec
  Quake. Une librairie binaire libc5 SVGAlib prcompile est disponible
  
  http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar
  .gz pour ceux qui ne veulent pas se mesurer aux tracas de la
  compilation de libc5.

  Vous devrez lancer Quake II d'une console virtuelle lorsque vous
  utiliserez l'interprteur ref_soft ou ref_gl. Il ne s'excutera pas
  depuis X  moins que vous ne soyez root lorsque vous le lancez, et
  cela n'est pas conseill. Aussi, si vous tes sous X, tapez
  CTRL+ALT+F1, loggez vous puis:



       cd /usr/local/games/quake2
       ./quake2




  ``Excuter des jeux SVGA et GL depuis X'' dans la rubrique Trucs et
  Astuces, explique comment lancer Quake II SVGA et GL depuis X sans
  manuellement passer sur une console virtuelle.



  33..77..  LL''iinntteerrpprrtteeuurr OOppeennGGLL

  L'utilisation de tout matriel acclrateur OpenGl pour Quake ouvre la
  Voie Royale de Quake.  Rien ne peut le remplacer, et l'essayer c'est
  l'adopter.

  Pour excuter Quake II en mode GL, vous avez besoin d'une carte
  graphique 3D avec chipset Voodoo, Voodoo2 ou Voodoo Rush. Il y a des
  points particuliers  respecter pour dclarer une carte Voodoo Rush,
  et je ne peux les dvelopper ici car, franchement, je ne saurais pas
  de quoi je parle. Une prochaine version de ce HOWTO couvrira cet
  aspect (Si quelqu'un souhaite s'en charger, je serai heureux
  d'intgrer ses explications).

  Les librairies SVGAlib, Glide, et Mesa doivent tre correctement
  installes et configures pour que quake2 fonctionne. Les sections
  suivantes expliqueront brivement comment vous y prendre.


  Le Linux 3Dfx HOWTO (http://www.gamers.org/dEngine/xf3D/howto/3Dfx-
  HOWTO.html) de Bernd Kreimeier (bk@gamers.org) est une source
  d'informations plus complte.

  Le newsgroup des serveurs 3dfx (news.3dfx.com) 3dfx.glide.linux est
  une autre bonne source d'information, au croisement de Linux, glide,
  Mesa et Quake.



  33..77..11..  SSVVGGAAlliibb


  Quake II utilise SVGAlib pour grer la souris et le clavier, aussi
  vous devrez le configurer comme il est prcis dans la section
  ``Interprteur SVGAlib''.


  33..77..22..  GGlliiddee

  Glide est une librairie qui fournit un API pour la programmation des
  cartes de type 3dfx.  Si vous souhaitez que la librairie graphique
  Mesa utilise votre carte 3dfx, vous devrez l'avoir.

  La dernire version de glide peut tre trouve sur
  http://glide.xxedgexx.com/3DfxRPMS.html. Choisissez le(s) paquetage(s)
  appropri(s)  votre systme, et installez-le(s) en vous reportant aux
  instructions de la page web.

  Notez bien que tant que vous n'aurez pas tlcharg le paquetage de
  driver 3Dfx en plus de la librairie Glide, vous ne pourrez lancer que
  des applications Glide (comme GLQuake) sous root. Installez le module
  /dev/3dfx et vous pourrez jouer  GLQuake en tant que simple
  utilisateur.

  Une fois que glide est install, excutez le programme de test fourni.
  Souvenez-vous que ce programme est une bonne solution pour
  rinitialiser votre affichage si une application glide plante et
  teint votre cran. NNOOTTAA:: llaanncceezz ccee tteesstt dd''uunnee ccoonnssoollee vviirrttuueellllee,, _p_a_s
  ddeeppuuiiss XX!! Il est possible que cette application test perde le contrle
  du clavier et de la souris sous X, et vous vous retrouveriez bloqu.



       /usr/local/glide/bin/test3Dfx




  Votre cran doit virer au bleu et vous demander de presser une touche.
  Une fois cette touche presse, vous retournerez au prompt.
  3dfx.glide.linux sur le serveur de news 3dfx (news.3dfx.com) est une
  bonne source d'information pour les problmes spcifiques  glide sous
  Linux.


  33..77..33..  MMeessaa

  Une fois glide install, vous aurez besoin d'installer Mesa, l'OpenGL
  libre ralis par Brian Paul (brianp@elastic.avid.com). Par chance,
  vous n'avez pas  chercher bien loin , car Mesa 2.6 est inclus avec
  les binaires de QLQuake et QuakeWorld. Tout ce que vous avez  faire
  est de le placer au bon endroit:



          cd /usr/local/games/quake2
          cp libMesaGL.so.2.6 /usr/local/lib
          ldconfig



  Si vous souhaitez une version plus rcente de Mesa (Mesa 3.0 est lors
  de la rdaction de ce document la plus rcente) visitez le site
  ftp://iris.ssec.wisc.edu/pub/Mesa.  Si vous avez une distribution
  RedHat 5.x ou une autre distribution base sur glibc, reportez-vous
  aux ``Considrations relatives  Glibc, RedHat 5.x et Debian 2'' dans
  la section Problmes/FAQs, pour d'importantes recommandations sur la
  compilation des librairies  utiliser avec Quake.

  Aprs une compilation conforme  ces instructions, vous avez deux
  choses  faire:


    Supprimer votre ancienne installation Mesa. Si vous avez
     pralablement install libMesaGL.so.2.6 comme dcrit ci-dessus,
     vous devez la supprimer ou bien Quake n'utilisera pas la nouvelle
     version.



          cd /usr/local/lib/
          rm -f libMesaGL.so.2*






    Si votre nouvelle Mesa a un numro majeur de version suprieur  2,
     vous devrez crer un lien avec le nom libMesaGL.so.2:



          cd /usr/local/lib/
          ln -s /wherever/you/installed/it/libMesaGL.so.3.0 libMesaGL.so.2
          ldconfig






  Maintenant, passons sur une console virtuelle (CTRL+ALT+F1) et lanons
  Quake II:



          cd /usr/local/games/quake2
          ./quake2 +set vid_ref gl






  33..77..44..  lliibb33ddffxxggll..ssoo ****

  Avec Quake II version 3.19, une alternative  la librairie Mesa est
  envisageable. lib3dfxgl.so est un mini driver GL optimis pour Quake
  qui fournit une rafrachissement lgrement suprieur  celui de Mesa.
  Il s'agit du portage d'un driver que 3Dfx a dvelopp pour Quake sous
  Windows, et apparemment toutes ses possibilits ne fonctionnent pas
  correctement. Nous comptons bien que ses performances s'amlioreront
  avec le temps.

  Comme Mesa, lib3dfxgl.so ncessite Glide pour accder  votre carte
  3Dfx. Le paquetage QuakeWorld est fourni avec un script, quake2.3dfxgl
  permettant de lancer Quake II avec sa librairie sur les systmes
  glibc. Le paragraphe suivant explique comment lancer Quake II avec
  lib3dfxgl.so sur un systme libc5. Sur un systme glibc, pour que ce
  script fonctionne, l'excutable glqwcl nnee ddooiitt ppaass ttrree sseettuuiidd, et
  vous ne devez pas le lancer en tant que root. glqwcl chargera
  silencieusement Mesa au lieu de lib3dfxgl.so si il est excut avec
  les permissions root. Cette non ncessit d'tre root suppose que vous
  avez le driver /dev/3dfx install.

  Sur un systme libc5, vous devrez crer un lien symbolique sur
  lib3dfxgl.so appel libMesaGL.so.2 de cette faon:



          cd /usr/local/games/quake2
          ln -sf lib3dfxgl.so libMesaGL.so.2





  Puis lancez Quakeworld depuis un script assignant le rpertoire
  courant  $LD_LIBRARY_PATH :


  ______________________________________________________________________
     #!/bin/sh

     LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ./quake2 +set vid_ref gl $*

  ______________________________________________________________________




  Vous pouvez vrifier quel driver est charg en visualisant sur votre
  console un message de ce genre au dmarrage de Quakeworld:



          GL_VENDOR: 3Dfx Interactive Inc.
          GL_RENDERER: 3Dfx Interactive Voodoo^2(tm)
          GL_VERSION: 1.1
          GL_EXTENSIONS: 3DFX_set_global_palette WGL_EXT_swap_control
       GL_EXT_paletted_texture GL_EXT_shared_texture_palette GL_SGIS_multitexture





  Si GL_VENDOR affiche Brian Paul au lieu de 3Dfx Interactive Inc., cela
  signifie que Mesa est encore utilis  la place du mini driver.


  33..88..  LL''iinntteerrpprrtteeuurr GGLLXX ****


  ref_glx.so est li aux librairies standard OpenGL  la place de Mesa.
  Cela permet  Quake II de s'excuter sur d'autres matriels 3D
  supports par d'autres implmentations d'OpenGL. A ce jour, je ne
  connais pas d'autres implmentations d'OpenGL qui supportent un
  matriel diffrent de 3Dfx, mais ce fournisseur assure qu' leur
  apparition, ces nouveaux matriels permettront de jouer  Quake.

  C'est une application GLX, et de ce fait elle doit tre lance sous X.

  Vous pouvez utiliser ce client avec Mesa/3Dfx si vous installez Mesa
  et Glide comme dtaill dans la section prcdente; dfinissez alors
  la variable d'environnement $MESA_GLX_FX  "fullscreen" avant de
  lancer quake2:



          export MESA_GLX_FX=fullscreen
          ./quake2 +set vid_ref glx +set _windowed_mouse 1





  Pourquoi l'option +_windowed_mouse 1? Rappelez-vous que c'est une
  application X qui utilisera votre carte 3Dfx. Mme si l'affichage se
  fait en plein cran, Quake II s'excute encore dans une fentre. Ce
  qui signifie que si vous n'tes pas _t_r__s prudent, vous pouvez dplacer
  le pointeur de la souris en dehors de la fentre de Quakeworld, et
  Quakeworld s'arrtera subitement de rpondre  la souris et au
  clavier. +_windowed_mouse 1 contourne le problme en demandant 
  glqwcl.glx de conserver la souris dans la fentre.


  33..99..  CCoommmmaannddeess dd''ooppttiioonnss eenn lliiggnnee ssppcciiffiiqquueess  LLiinnuuxx

  Cette section rassemble les commandes en ligne qui sont spcifiques
  aux versions Linux de Quake II. Il existe beaucoup d'autres options,
  mais elles dpassent le cadre de cet HOWTO. Recherchez ce genre
  d'information sur les sites lists dans la section ``Informations
  Gnrales sur Quake''. Ce sont en ralit des cvars (variables client)
  que vous pouvez dfinir dans la console Q2, mais il parat plus
  raisonnable de les dfinir sur la ligne de commande. Dfinissez-les
  avec +set sur la ligne de commande, comme:



       ./quake2 +set cd_dev /dev/hdc





     ccdd__ddeevv _d_e_v_i_c_e
        Nom du fichier priphrique du CD-ROM.


     nnooccddaauuddiioo _v_a_l_u_e
        Dsactive le CD audio si _v_a_l_u_e est diffrent de zro


     ssnnddbbiittss _n_u_m
        Dfinit la taille de l'chantillon sonore en bits. La valeur par
        dfaut est 16.


     ssnnddssppeeeedd _n_u_m
        Dfinit la frquence sonore. Les valeur usuelles sont 8000,
        11025, 22051 ou 44100. Si la valeur est zro, le driver son
        testera les vitesses en ordre croissant: 11025, 22051, 44100,
        8000.


     ssnnddcchhaannnneellss _n_u_m
        Indique un son mono ou stro. Par dfaut 2 (stro). Utiliser 1
        pour mono.
     nnoossttddoouutt _v_a_l_u_e
        Ne renvoie aucune information sur la sortie standard. Utilisez
        cette option si vous voulez viter de collecter tous les
        messages des consoles sur votre terminal.


  33..1100..  SSeerrvveeuurrss QQuuaakkee IIII

  La puissance de Linux en tant que serveur internet en fait une
  plateforme parfaite pour ouvrir un serveur Quake II. Cette section
  dcrira les aspects de base spcifiques  Linux de la mise en place
  d'un serveur Quake II. De plus amples informations sur la manire
  d'ouvrir un serveur Quake sont disponibles par ailleurs (reportez-vous
   la section ``Autres Sources d'Information'' plus haut dans ce
  document).


  33..1100..11..  SSeerrvveeuurrss dd''aaccccuueeiill

  Vous pouvez lancer un serveur Quake II "d'accueil" depuis le jeu par
  le menu _M_u_l_t_i_j_o_u_e_u_r. Cela vous permet d'hberger une partie et d'y
  participer dans le mme temps.

  Pour lancer un serveur d'accueil, lancez Quake II, appelez le menu de
  Quake II par la touche ESC, et slectionnez _M_u_l_t_i_j_o_u_e_u_r. Quake est
  ensuite trs explicite.



  33..1100..22..  SSeerrvveeuurrss ddddiiss

  Transposer la procdure de mise en place d'un serveur d'accueil 
  l'ouverture d'un serveur ddi  Quake II qui ne ncessite pas une
  attention constante, n'est pas cohrent. Quake II propose un mode
  Serveur Ddi qui rpond  ce type d'utilisation. Un serveur ddi est
  lanc depuis la ligne de commande et utilise moins de ressources
  systme qu'un serveur d'accueil car il n'excute aucun client
  graphique.

  Pour mettre en route un serveur ddi, utilisez l'option +set
  dedicated 1 sur la ligne de commande. Pour pouvez dfinir des
  paramtres supplmentaires soit sur la ligne de commande, soit dans un
  fichier de configuration que vous ferez prendre en compte en par +exec
  sur la ligne de commande. Votre fichier de configuration doit se
  trouver dans le rpertoire baseq2.

  Un petit nombre d'options communes pour serveur sont listes ci-
  dessous. Pour intgrer ces options  la ligne de commande, faites +set
  fraglimit 30.  Le principe est le mme si vous optez pour un fichier
  de configuration; tez simplement le + prcdant set. Appelez votre
  fichier de configuration de la faon suivante: +exec server.cfg.


     ffrraagglliimmiitt
        Nombre de personnes  tuer avant de changer de tableau

     ttiimmeelliimmiitt
        Temps en minutes devant s'couler avant de changer de tableau

     hhoossttnnaammee
        Le nom de votre serveur Quake II. C'est une chane arbitraire
        qui n'a rien  voir avec le nom DNS de votre hte.

     mmaaxxcclliieennttss
        Le nombre maximum de joueur pouvant se connecter au serveur en
        mme temps.
  Pour trouver plus d'informations que vous ne pouvez l'esprer,
  consultez Farenheit 176 (http://www.planetquake.com/f176).


  33..1100..33..  AAuuttrreess SSoouurrcceess dd''iinnffoorrmmaattiioonn ssuurr lleess sseerrvveeuurrss


    La FAQ du serveur Q2 propose un guide permettant, pas  pas, de
     configurer un serveur sous Linux:
     http://www.bluesnews.com/faqs/q2s-faq.html

    Grant Cornelius Reticulus Copernicus Sperry (flubber@xmission.com)
     propose quelques fichiers de configuration de base et des scripts
     de dmarrage sur
     http://www.atomicage.com:80/quake/server/server_cfg/.


  33..1111..  MMooddeess && AAjjoouuttss

  Les modifications de Quake II telles que Capture du drapeau (Ndt :
  Capture the Flag), Jailbreak, et Lithium II sont des extensions trs
  populaires du jeux original. Quelques modes rsident entirement sur
  le serveur (Lithium), et d'autres ncessitent des modifications du
  client (CTF). Pour les modes sur serveur, connectez vous normalement
  et jouez. Les modes clients requirent pralablement l'installation de
  fichiers supplmentaires dans votre rpertoire quake2.


  33..1111..11..  LLeess mmooddeess CClliieenntt

  En gnral, l'installation d'un mode client rside simplement dans le
  tlchargement du paquetage ad hoc et son dsarchivage dans le
  rpertoire de Quake II, mais reportez-vous  la documentation propre 
  chaque mode pour de plus amples dtails. Il peut tre ncessaire de
  tlcharger un paquetage supplmentaire spcifique  Linux en plus du
  paquetage client principal (Windows). Il se peut galement que tous
  les modes clients ne soient pas disponibles pour Linux.

  Les paquetages en mode client contiennent gnralement un nouveau
  fichier gamei386.so et un ou plusieurs fichiers .pak. D'autres
  fichiers supplmentaires peuvent galement exister. Ces nouveaux
  fichiers seront installs dans un sous-rpertoire dpendant de votre
  rpertoire principal Quake II. Utilisez l'option +set game _m_o_d_-_d_i_r sur
  la ligne de commande pour excuter ce mode. Rocket Arena 2 sera
  install, par exemple, dans un rpertoire appel arena. Pour jouer 
  RA2, vous devrez lancer votre client de cette manire:


       ./quake2 +set game arena





  33..1111..11..11..  CCaappttuurree dduu ddrraappeeaauu

  Etant donn que cette variation multi-joueurs de Quake II est de loin
  la plus populaire, j'ai inclus les instructions spcifiques 
  l'installation de ce mode.  Capture du Drapeau pour Quake II et
  disponible sur le site ftp de ID.  Tlchargez le, puis installez le
  ainsi:





  cd /usr/local/games/quake2
  mkdir ctf
  cd ctf
  unzip -L /wherever/you/put/it/q2ctf102.zip




  Excutez Quake II avec +set game ctf pour jouer  CTF (Ndt: Capture
  the Flag).


  33..1111..22..  LLeess mmooddeess sseerrvveeuurr

  Lancer Quake II en mode serveur n'est pas trs diffrent du lancement
  en mode client. Gnralement vous devrez installer les fichiers
  gamei386.so et server.cfg dans un nouveau sous-rpertoire et lancer
  votre serveur de cette faon:


       ./quake2 +set game XXXX +set dedicated 1 +exec server.cfg




  o XXXX reprsente le nom du sous-rpertoire cr. La procdure exacte
  peut bien sr varier d'un mode  l'autre. Reportez-vous  la documen
  tation jointe  votre mode pour des dtails spcifiques.


  33..1111..33..  SSoouurrccee dduu JJeeuu

  Le jeu complet, hormis le moteur lui-mme, se trouve dans une
  librairie partage, gamei386.so. Les modes de Quake II sont crs en
  changeant le contenu de ce fichier. Le code source en C est librement
  disponible (section ``Tlchargement des fichiers ncessaires'' ci-
  dessus) pour quiconque souhaite le tlcharger et le modifier.

  Aprs avoir tlcharg le code source, voici comment le "prparer":



       cd /usr/local/games/quake2
       mkdir mymod
       cd mymod
       gunzip /wherever/you/put/it/q2source-3.14.shar.Z
       sh /wherever/you/put/it/q2source-3.14.shar




  Vous serez assailli par de nombreuses clauses auxquelles vous devrez
  rpondre yes, et le jeu s'extraira. Construire un nouveau gamei386.so
  depuis ces sources est accompli par un simple make. Vous pouvez lancer
  Quake II avec la librairie rcemment compile par:



       cd /usr/local/games/quake2
       ./quake2 +set game mymod




  Ne vous excitez pas trop encore, ce que vous venez juste de construire
  est un fichier identique au gamei386.so standard, mais cela peut
  inspirer de futurs auteurs de modes.


  33..1111..44..  MMiissssiioonn PPaacckkss ****


    MMiissssiioonn PPaacckk 11:: TThhee RReecckkoonniinngg "The Reckoning" ncessite une version
     version 3.15 ou suprieure de Quake II pour s'excuter. Vous aurez
     besoin d'au moins 95 Mo pour une installation minimale. 90 Mo de
     plus sont ncessaires si vous voulez galement installer les
     squences vido. Assurez-vous que votre CD est mont sur /mnt/cdrom
     et que Quake II est install dans /usr/local/games/quake2:



       cd /usr/local/games/quake2
       cp -r /mnt/cdrom/Data/all/* xatrix/
       rm -f xatrix/gamex86.dll





  Si vous voulez installer les squences vido:



       cp -r /mnt/cdrom/Data/max/xatrix/video xatrix





  Lancez "The Reckoning" de cette faon :


       cd /usr/local/games/quake2
       ./quake2 +set game xatrix





    MMiissssiioonn PPaacckk 22:: GGrroouunndd ZZeerroo Ce pack ncessite une version 3.17 ou
     suprieure de Quake II. Vous aurez besoin d'au moins 120 Mo pour
     une installation minimale. 115 Mo supplmentaires sont  prvoir si
     vous voulez installer les squences vido. Assurez-vous que votre
     CD est mont sur /mnt/cdrom et que Quake II est install dans
     /usr/local/games/quake2:



       cd /usr/local/games/quake2
       cp -r /mnt/cdrom/Data/all/* rogue/
       rm -f rogue/gamex86.dll





  Si vous voulez installer les squences vido:



       cp -r /mnt/cdrom/Data/max/rogue/video rogue

  Lancez "Ground Zero" de cette manire:


       cd /usr/local/games/quake2
       ./quake2 +set game rogue







  44..  LLooggiicciieellss aappppaarreennttss ++++



  44..11..  QQSSttaatt

  Qstat est un programme bas sur ligne de commande qui renvoie l'tat
  des serveurs Internet Quake, QuakeWorld, et Quake 2 cr par Steve
  Jankowski mailto:steve@activesw.com.

  Voici un aperu sommaire de la page d'accueil de QStat:

    Supporte Windows 95, NT, et la plupart des Unixes

    Livr avec le code source C et un binaire pour Windows

    Supporte les serveurs de l'ancienne version Quake (NetQuake), de
     QuakeWorld, de Hexen II, et de Quake II

    Peut afficher toutes les statistiques disponibles, y compris les
     informations sur les joueurs et les rgles des serveurs

    Sortie formate pour une gnration HTML automatique

    Mode de sortie non formate pour une intgration par les
     gnrateurs de pages HTML

    Cache du nom de l'hte intgr

    Tri par "ping time", jeu, ou les deux

    Plusieurs options activables

  Qstat est l'outil que vous devez avoir si vous envisagez n'importe
  quel jeu en rseau. Un grand nombre de d'interfaces pour qstat ont t
  galement crites.  Quelques unes d'entre elles sont recenses dans
  cette section.

  Vous pouvez obtenir la dernire version de qstat depuis sa page
  d'accueil (http://www.activesw.com/people/steve/qstat.html.


  44..22..  XXQQFF

  XQF est une interface graphique pour QStat qui utilise l'outil GTK.
  C'est le meilleur navigateur de serveurs QuakeWorld/Quake2 existant
  actuellement, et Roman Pozlevich (roma@botik.ru), produit encore des
  rvisions  la cadence d'environ une par mois.

  Si vous tes un familier de GameSpy pour les plateformes Windows, il
  s'agit de la chose la plus approchante pour Linux..

  La page d'accueil de XQF se trouve  http://www.linuxgames.com/xqf.

  44..33..  QQuuiicckkSSppyy

  QuickSpy est un navigateur texte de serveurs QuakeWorld. C'est une
  autre interface pour QStat qui fonctionne aussi bien. Si vous
  n'excutez pas X et que vous n'avez pas Quake II, c'est une option
  dcente. Attention cependant, il n'est plus en dveloppement.

  Vous pouvez obtenir QuickSpy 
  http://diana.ecs.soton.ac.uk/~rht96r/quake/quickspy/.


  44..44..  QQPPlluugg ppoouurr LLiinnuuxx

  Qplug est un plugin de Netscape qui rcupre et affiche les
  informations des serveurs QuakeWorld et Quake II dans une page web.
  L'auteur, Olivier Debon (odebon@club-internet.fr) crivit la version
  Linux en partant de zro sans n'avoir jamais vu la version Windows.

  QPlug pour Linux peut tre obtenu  l'adresse
  http://www.geocities.com/TimesSquare/Labyrinth/5084/qplug.html.


  44..55..  qqkkHHaacckklliibb

  David Bucciarelli (tech.hmw@plus.it), auteur du driver 3Dfx pour Mesa,
  a crit une librairie appele qkHack, qui tente d'muler toutes les
  fonctions SVGAlib/fxMesa utilises par Quake et Quake II. Cela devrait
  suppler le besoin de SVGAlib lorsque glquake ou Quake II sont
  excuts avec ref_gl.

  Autres caractristiques extraites du fichier README de qkHacklib:


    Vous pouvez dynamiquement passer du mode Plein cran au mode
     fentr en pressant simplement la touche de Tabulation (vous devez
     lancer votre serveur X en mode 16 bpp pour utiliser cette
     possibilit)

    Vous pouvez presser Ctrl-C dans le shell ou tuer le processus Quake
     sans problme

    Vous pouvez activer/dsactiver la capture de la souris et du
     clavier en pressant F11/F12

    Vous pouvez iconifier et mettre en pause Quake en pressant F10 (il
     ne consommera plus de ressources CPU). Vous pouvez tout redmarrer
     par un double clic sur l'icne "****"

    Vous pouvez lancer Quake avec n'importe quel driver Mesa (par
     exemple avec le driver X11 mais vous devrez recompiler le Mesa sans
     le driver Voodoo)

    Vous pouvez lancer Quake sous n'importe quelle machine Linux et
     rcuprer la sortie du matriel acclrateur sur une machine SGI
     (Soit, c'est un peu exotique et thorique comme possibilit, mais
     c'est un exemple de ce que peut tre la puissance d'une application
     GLX/OpenGL)

  J'ai test qkHacklib et il fonctionne bien avec Quake sur mon systme.
  Nanmoins, dans Quake II, les rponses de la souris deviennent
  _v_r_a_i_m_e_n_t lentes.  D'autres rapportent un complet succs, aussi donnez-
  lui sa chance s'il semble s'apparenter  quelque chose dont vous avez
  besoin.

  La page web de David Bucciarelli est  l'adresse http://www-
  hmw.caribel.pisa.it/fxmesa/fxqkhack.html.
  44..66..  GGiiMMdd22VViieewweerr

  GiMd2Viewer est un visualiseur de modles Quake II crit pour Gtk et
  OpenGL par Lionel Ulmer (bbrox@mygale.org).  Il charge modles et
  textures depuis des fichiers ordinaires ou des fichiers .PAK. Il
  animera galement les modles (par interpolation d'image).

  Ce programme est toujours en dveloppement et je ne l'ai pas encore
  essay, mais il semble vraiment formidable. Rcuprez-le sur
  http://www.mygale.org/~bbrox/GiMd2Viewer/.


  44..77..  QQIIPPXX

  QIPX est un lot de programmes qui permettent aux clients Quake Linux
  (utilisant TCP/IP) de se connecter avec les clients Quake DOS
  (utilisant IPX). Je suppose que cela peut s'avrer utile si vous jouez
   netquake sur un LAN. QIPX est disponible sur
  http://www.geocities.com/SiliconValley/Park/6083/qipx.html.


  44..88..  IIccee

  Ice est un diteur de carte Quake pour UNIX cr par C.J. Beyer et
  John Watson.  Je n'ai pas utilis ce programme, et je ne connais pas
  non plus l'tat d'avancement de son dveloppement.  La page d'accueil
  de Ice se trouve sur http://styx.phy.vanderbilt.edu/~ice/.


  44..99..  QQ22ggeettttyy

  Q2getty est une "bidouille" de mingetty par Mike Gleason
  (mgleason@ncftp.com) qui vous permet d'excuter et de relancer
  automatiquement un programme (comme un serveur Quake) sur une console
  virtuelle.  Ce programme est disponible dans la rubrique fichiers sur
  http://www.ncftpd.com/unixstuff/q2getty.html.


  44..1100..  rrccoonn

  Rcon se compose de deux outils permettant l'administration  distance
  d'un serveur Quake II par le biais du protocole RCON. Michael Dwyer
  (michael_dwyer@mwiworks.com) en est l'auteur. Rcon 1.1 est disponible
  sur http://sunsite.unc.edu/pub/Linux/games/quake/rcon-1.1.tar.gz.


  44..1111..  qqlloogg ++++

  Qlog est un serveur d'analyse de log pour QuakeWorld/Quake II bas sur
  GPL qui gnre des statistiques dtailles sur les joueurs. Craig
  Knudsen (cknudsen@radix.net) en est l'auteur. La page d'accueil de
  qlog est http://www.radix.net/~cknudsen/qlog/.


  44..1122..  CChheeaappoo ****

  Cheapo est un proxy qui peut tre utilis pour router le trafic du
  rseau QuakeWorld. De plus, le proxy peut modifier les donnes et
  dispose de fonctionnalits permettant d'amliorer la partie. Vous
  pouvez vous connecter  cheapo comme s'il s'agissait d'un serveur
  Quakeworld, puis lui donner des commandes qui vous renvoient sur un
  serveur existant. Le proxy peut galement tre lanc sur une machine
  avec firewall incapable de grer le trafic Quake, donc cette machine
  derrire le firewall peut tre utilise pour jouer. La page d'accueil
  de Cheapo est  l'adresse http://www.saunalahti.fi/~softech/.

  44..1133..  qqggrraapphh ****

  QGraph (Quake Graph) est un utilitaire d'aide  la gestion des
  "DeathMathes" Quake, tournois et jeux Quakeworld.  QGraph est un
  programme qui se connecte  des serveurs Quake, QuakeII, Quakeworld et
  Hexen2 (via Lan ou Internet) et qui vous montre les donnes en temps
  rel de la partie se droulant sur le serveur. La page d'accueil de
  QGraph est  l'adresse http://www.frag.com/qgraph.



  55..  PPrroobbllmmeess//FFAAQQss




  55..11..  GGnnrraall



  55..11..11..  CCoonnssiiddrraattiioonnss ssuurr ddiiffffrreennttss OOSS


    SSeennssiibbiilliitt  llaa CCaassssee  - Sous DOS et Windows, la casse n'est pas
     importante. BASE1.TXT est quivalent  base1.txt. Sous Linux et
     autres Unix, la casse A une signification. MOTD.TXT et motd.txt
     sont des fichiers diffrents. Cela peut poser problme avec des
     modles de joueurs et des "skin files" s'ils sont installs avec
     des noms en majuscules ou mitigs minuscules/majuscules.
     players/male/santa.PCX doit tre renomm santa.pcx pour tre
     reconnu sous Linux. Le script fixskins.sh inclus avec quakeworld
     convertira tous les noms de fichiers d'un rpertoire en minuscules.
     Il est reproduit ci-dessous pour votre commodit:

     ___________________________________________________________________
     #!/bin/sh
     for x in *; do
     y=`echo $x | tr '[A-Z]' '[a-z]'`
     if [ $x != $y ]; then
     mv $x $y
     fi
     done
     ___________________________________________________________________



    DDlliimmiitteeuurrss ddee cchheemmiinn ((""PPaatthh"")) - DOS et Windows utilisent le
     caractre "anti-slash" \" pour sparer les lments d'un chemin
     d'accs. Si vous utilisez des chemin d'accs dans vos fichiers de
     configuration (ou n'importe quoi d'autre), soyez certain d'utiliser
     "/" et non "\".

    CCaarraaccttrreess ddee ffiinn ddee lliiggnnee - Sous DOS/Windows, chaque fin de ligne
     d'un fichier texte se termine par un retour de chariot (CR:
     carriage return) et un passage  la ligne suivante (LF: linefeed).
     Les fichiers texte Unix ont simplement un passage  la ligne
     suivante (LF)  la fin de chaque ligne. Utiliser des fichiers texte
     formats DOS/Win sous Unix peut avoir pour consquence toute sorte
     de problmes mystrieux sous Unix. Un format incorrect du fichier
     quake2.conf du paquetage 3.17 de Quake2, par exemple, donne
     l'erreur "LoadLibrary("ref_XXX.so") failed: No such file or
     directory".  Si vous avez un problme que vous ne pouvez expliquer,
     essayer de supprimer les retour de chariot de votre fichier texte:



  mv file.txt file.bak; tr -d '\r' < file.bak > file.txt






  55..11..22..  CCoonnssiiddrraattiioonnss rreellaattiivveess  GGlliibbcc,, RReeddHHaatt 55..xx eett DDeebbiiaann 22****

  Ce qui suit s'applique uniquement aux binaires de Quake I (squake,
  glquake, et quake.x11). Depuis respectivement les versions 2.30 et
  3.19, QuakeWorld and Quake II sont disponibles  la fois en version
  libc5 et glibc.

  Les excutables Quake ont t compils avec libc5. Les distributions
  Linux les plus rcentes, comme RedHat 5.1 et Debian 2.0 utilisent
  l'incompatible glibc comme librairie par dfaut. Si vous excutez
  Quake sur un sytme glibc, vous devez vrifier plusieurs choses:


    RedHat 5 et Debian 2 ont les paquetages de compatibilit libc5 qui
     vous permettent de lancer des applications bases sur libc5. Soyez
     certain que vous avez ces paquetages installs. Les deux
     distributions placent les librairies libc5 sous /usr/i486-linux-
     libc5/lib.

    Soyez certain que Quake utilise les librairies correctes. Crez un
     script similaire  celui-ci qui fait pointer $LD_LIBRARY_PATH sur
     votre rpertoire contenant les librairies de compatibilit avant de
     lancer Quake.

     ___________________________________________________________________
        #!/bin/sh
        export LD_LIBRARY_PATH=/usr/i486-linux-libc5/lib
        ./quake2 +set vid_ref gl $*

     ___________________________________________________________________



    Si vous allez compiler une librairie comme SVGAlib ou Mesa pour
     l'utiliser avec Quake, elle doit tre compile avec libc5.
     Construire simplement une nouvelle librairie en suivant les
     instructions d'installation inclues conduira  crer une librairie
     lie  votre librairie par dfaut, glibc. Vous devez vous assurer
     que votre nouvelle librairie est lie uniquement  libc5 et aux
     librairies bases sur libc5 pour tre compatible avec Quake.
     Reportez-vous  la documentation de votre distribution pour toute
     information concernant les liens sur une librairie n'tant pas
     celle par dfaut.



  55..11..33..  MMaa ssoouurriiss nnee ffoonnccttiioonnnnee ppaass oouu sseemmbbllee rrppoonnddrree aallaattooiirreemmeenntt..


    gpm est-il lanc? gpm est un programme qui active le copier/coller
     avec la souris sur des consoles virtuelles. Beaucoup de
     distributions l'activent par dfaut. Cela peut interfrer avec
     Quake. Vrifiez si gpm est activ avec la commande suivante:


          ps aux | grep gpm



  Si vous obtenez quelque chose comme


          root   6115 0.0 0.4  832  316 ? S  17:54  0:00 gpm -t PS/2





  alors gpm est lanc et interfre avec Quake. gpm -k (en tant que root)
  devrait arrter gpm. Si ce n'est pas le cas, (gpm -k ne marche pas
  toujours sur mon systme), tuez gpm avec la commande killall gpm.

  Si vous n'utilisez jamais gpm, vous pouvez vouloir arrter son lance
  ment au dmarrage. Voyez la documentation de votre distribution pour
  savoir comment faire.


    Est-ce que votre souris est correctement dfinie dans
     libvga.config? Ce fichier se trouve habituellement dans /etc ou
     /etc/vga. Ouvrez-le et recherchez une ligne de ce genre


          mouse Microsoft





  Sur mon systme, c'est la premire option du fichier. Assurez-vous que
  le type de la souris est appropri  votre matriel.



  55..11..44..  ccoorrrreecctteemmeenntt..  MMaa ssoouurriiss MMiiccrroossoofftt IInntteelllliimmoouussee oouu LLooggiitteecchh
  MMoouusseeMMaann++ nnee ffoonnccttiioonnnnee ppaass

  SVGAlib, dans les versions antrieures  la 1.3.0, qui gre la souris
  pour Quake/QW/Q2 sous SVGA et GL, ne supporte pas directement
  l'Intellimouse. Si vous avez une version de SVGAlib antrieure  la
  1.3.0, vous devrez la mettre  jour pour pouvoir utiliser une souris
  de type IntelliMouse (pour les souris srie) ou IMPS2 (pour les souris
  PS/2) dans votre fichier de configurationlibvga.config.


  55..11..55..  MMaa ssoouurriiss ssee ttrraannee eett sseemmbbllee bbeeaauuccoouupp pplluuss lleennttee qquuee ssoouuss
  WWiinnddoowwss..


    Pour beaucoup de personnes, le simple fait d'augmenter la valeur de
     la sensibilit dans le jeu solutionne le problme. Ce rglage se
     fait soit manuellement dans le menu Option, soit dans un fichier
     .cfg qui vous permet d'augmenter la sensibilit de la souris plus
     amplement que le rglage du menu Options. sensitivity 15, par
     exemple.

    Extrait de la mise  jour Zoid du 1/7/98:

       Si vous constatez un retard de la vido sous l'interprteur
       GL (le rafrachissement semble traner derrire les mouve
       ments de votre souris) tapez "gl_finish 1" sur la console.
       Cela force le rafrachissement sur la base d'une image.




    La dernire version de SVGAlib (1.3.0) intgre un grand nombre de
     paramtres dans libvga.config que vous pouvez utiliser pour
     personnaliser le comportement de votre souris. Avec un paramtrage
     correct, il devrait tre possible de faire ragir votre souris
     exactement comme vous le souhaitez. Sur mon systme, le simple fait
     de dfinir mouse_accel_type en normal (la valeur par dfaut tant
     power) me donne les rsultats attendus. Je n'ai pas test les
     autres paramtres, je ne m'avancerai donc pas sur le bnfice
     qu'ils apportent.

    Le petit "slider"


  55..11..66..  ll''iinntteerrpprrtteeuurr ggll,, iill mm''aaffffiirrmmee qquuee jjee nn''aaii ppaass ddee ccaarrttee
  VVooooddoooo iinnssttaallllee..  JJee ppoossssddee uunnee ccaarrttee VVooooddoooo22 eett,, lloorrssqquuee jjee tteennttee
  uunnee mmiissee eenn rroouuttee aavveecc

  Il y a diffrentes versions de Glide pour cartes Voodoo et Voodoo 2.
  Soyez certain que vous tlchargez celle qui correspond  votre
  systme.



  55..11..77..  CCTTRRLL--CC,, llee jjeeuu ss''aarrrrttee eett qquueellqquueeffooiiss mmee llaaiissssee llaa ccoonnssoollee
  ddaannss uunn ttaatt iinnuuttiilliissaabbllee..  LLoorrssqquuee jjee jjoouuee  ll''uunn ddeess jjeeuuxx QQuuaakkee ssoouuss
  SSVVGGAAlliibb oouu GGLL eett qquuee jjee pprreessssee

  55..11..88..  llaaiissssee llaa ccoonnssoollee ddaannss uunn ttaatt iinnuuttiilliissaabbllee..  QQuueellqquueeffooiiss
  lloorrssqquuee QQuuaakkee//QQuuaakkee IIII ssee tteerrmmiinnee ddee ffaaoonn aannoorrmmaallee,, iill mmee

  Oui. Cela agace. SVGAlib intercepte le CTRL-C et dcide ce qu'il y a 
  faire plutt que de laisser cette responsabilit  Quake. Je ne
  connais pas de moyen de contourner ce problme.

  Si vous lancez un jeu Quake depuis un script qui rinitialise le
  clavier et le terminal, comme ci-dessous, vous aurez moins de chances
  de vous retrouver avec un terminal bloqu, si cela doit arriver, bien
  sr.


  ______________________________________________________________________
     #!/bin/sh
     ./quake2 $*
     kbd_mode -a
     reset

  ______________________________________________________________________




  55..11..99..  ppeerrmmiissssiioonnss"" ssqquuaakkee//qquuaakkee22 rreeffuussee ddee ddmmaarrrreerr eett aavveerrttiitt ""
  ssvvggaalliibb:: ccaannnnoott ggeett II//OO

  Les excutables Quake doivent s'excuter en tant que root, aussi vous
  devez les lancer en tant root ou les rendre 'setuid' root. Reportez-
  vous aux instructions d'installation de ce document pour plus de
  dtails.


  55..11..1100..  ddee ttoouucchheess nnee ffoonnccttiioonnnnee pplluuss..  QQuueellqquueeffooiiss,, aapprrss aavvooiirr jjoouu
   ll''uunn ddeess jjeeuuxx QQuuaakkee ssoouuss XX,, llaa rrppttiittiioonn

  Pour plusieurs raisons, les versions X11 de Quake dsactivent les
  touches de rptition pendant leur excution. Si le programme se
  termine anormalement pour une raison ou une autre, la rptition des
  touches ne sera pas ractive.  Faites:


          xset r on





  pour la rtablir.


  55..11..1111..  QQuuaakkee//QQuuaakkee IIII aavveerrttiitt ""//ddeevv//ddsspp :: ddeevviiccee nnoott ccoonnffiigguurreedd""

  Votre matriel son n'est pas correctement configur. Vous pouvez avoir
  simplement  faire un insmod sound, ou il peut tre ncessaire de
  recompiler votre noyau. Les utilisateurs de RedHat peuvent appeler
  l'utilitaire ssnnddccoonnffiigg((88)).  Reportez-vous  la documentation de votre
  distribution Linux et/ou au SOUND-HOWTO Linux pour toute information
  sur la configuration de votre matriel son.


  55..11..1122..  **** GGLL QQuuaakkee//QQuuaakkee IIII ss''eexxccuutteenntt pplluuss lleenntteemmeenntt ssoouuss LLiinnuuxx
  qquuee ssoouuss WWiinnddoowwss..

  Le miniport 3Dfx GL de Windows est largement optimis pour les besoins
  de Quake II. Mesa, d'autre part, est plus gnral et moins optimis.
  Il en rsulte que Quake II Linux s'excute plus lentement que sous
  Windows. Ce n'est pas li  une limitation de Linux, mais  une
  limitation des drivers actuels.

  Avec les plus rcentes version de QuakeWorld et Quake II, le miniport
  3Dfx mentionn ci-dessus est disponible pour Linux. Bien qu'il ne
  porte pas les performances de Quake Linux au niveau de celles de Quake
  Windows, c'est un pas supplmentaire dans cette direction.

  De plus, pour les possesseurs de Pentium Pro et Pentium II, quelques
  gains peuvent tre raliss avec la mmoire cache - le dernier fichier
  de priphrique /dev/3dfx a un support intgrant un paramtrage
  automatique. De l'activation de MTRRs peut rsulter une augmentation
  _s_i_g_n_i_f_i_c_a_t_i_v_e (10 fps sur mon systme) de la vitesse de Quake GL.
  Reportez-vous  http://glide.xxedgexx.com/MTRR.html pour de plus
  amples informations.


  55..11..1133..  uullttrriieeuurreemmeenntt?? **** CCoommmmeenntt ppuuiiss--jjee ddmmaarrrreerr uunn sseerrvveeuurr eett mmee
  ddccoonnnneecctteerr,, ppuuiiss yy rreevveenniirr

  ssccrreeeenn((11)) est un remarquable utilitaire pour ce genre de chose. Il
  vous permet de crer plusieurs crans virtuels dans un seul tty et de
  passer de l'un  l'autre. Screen est livr avec la plupart des
  distributions. Vous pouvez le tlcharger sur
  ftp://prep.ai.mit.edu/pub/gnu ou n'importe quel miroir GNU.

  Lancez screen en tapant la commande screen, puis crez une nouvelle
  fentre en pressant CTRL-A CTRL-C. Vous ne vous apercevrez de rien
  lorsque vous ferez cela, mais, rassurez-vous, quelque chose se passe.

  Lancez un serveur Quakeworld:


       /usr/local/games/quake/qwsv




  Maintenant ouvrez une nouvelle fentre cran par CTRL-A CTRL-C et
  lancez un serveur Quake II:


       /usr/local/games/quake2/quake2 +set dedicated 1




  Vous pouvez basculer d'un serveur  l'autre en pressant CTRL-A CTRL-N.

  Appuyer sur CTRL-A CTRL-D pour vous dtacher du programme screen.
  Screen et vos serveurs sont toujours en route, mais ne sont plus
  visibles dans la fentre de votre terminal. Vous pouvez maintenant
  vous dconnecter et vos processus continueront  s'excuter
  normalement.

  Utilisez screen -r pour vous rattacher  votre prcdent processus
  screen et accder de nouveau  vos serveurs.

  C'est tout ce qu'il y a  faire. Reportez-vous  la page d'aide de
  ssccrreeeenn((11)) pour des informations plus dtailles.



  55..22..  QQuuaakkee//QQuuaakkeeWWoorrlldd


  55..22..11..  QQuuaakkee mmeeuurrtt aauu ddmmaarrrraaggee aavveecc uunnee ""sseeggmmeennttaattiioonn ffaauulltt""..

  Ce signifie gnralement que votre rseau n'est pas conforme. Essayez
  de lancer quake avec l'option -noudp et voyez si l'erreur se
  reproduit. Si cela rsout le problme, inspectez votre fichier
  /etc/hosts et vrifiez qu'il comporte une entre pour votre machine.
  Utilisez 127.0.0.1 pour votre adresse IP si vous avez une adresse IP
  assigne diffrente  chaque fois que vous vous connectez.


  55..22..22..  eett ggllqqwwccll..ggllxx ?? ++++ QQuueellllee eesstt llaa ddiiffffrreennccee eennttrree ggllqqwwccll ,,
  ggllqqwwccll..33ddffxxggll ,,


    glqwcl est le client standard Quakeworld GL que vous avez vu dans
     la version prcdente. Il est li  libMesaGL.so.2.

    glqwcl.3dfxgl est un script qui lance glqwcl aprs avoir prcharg
     la librairie du miniport 3Dfx GL, lib3dfxgl.so.  Le prchargement
     de la librairie du miniport a pour consquence l'utilisation des
     fonctions GL au lieu des fonctions Mesa. Depuis que le miniport GL
     est optimis pour Quake, c'est prfrable.

    glqwcl.glx est li  la librairie standard OpenGL au lieu de Mesa.
     Cela permet  glquake de s'excuter sur d'autres matriels 3D
     supports par d'autres implmentations OpenGL. C'est une
     application X et elle doit donc tre lance depuis X.


  55..22..33..  ppaass uuttiilliisseerr mmaa ssoouurriiss oouu mmoonn ccllaavviieerr.. ++++ QQuuaanndd jjee llaannccee
  ggllqqwwccll..ggllxx  eenn pplleeiinn ccrraann ddeeppuuiiss XX,, jjee nnee ppeeuuxx


  Lancez glqwcl.glx avec l'option +_windowed_mouse 1. Quakeworld GLX
  s'excute dans une fentre, mme s'il semble tre en plein cran. Si
  vous dplacez la souris pendant que WM est en mode "focus-follows-
  mouse", cela revient  placer votre pointeur en dehors de cette
  fentre, et Quake arrtera de rpondre aux sollicitations du clavier
  et de la souris. +_windowed_mouse 1 oblige Quakeworld  capturer la
  souris pour son propre et unique usage.


  55..33..  QQuuaakkee IIII


  55..33..11..  ppaass eett iill ss''aaffffiicchhee ""LLooaaddLLiibbrraarryy((""rreeff__ggll..ssoo"")) ffaaiilleedd:: UUnnaabbllee
  ttoo rreessoollvvee ssyymmbbooll"" QQuuaanndd jj''eessssaaiiee ddee llaanncceerr QQuuaakkee IIII aavveecc
  ll''iinntteerrpprrtteeuurr GGLL,, cceellaa nnee mmaarrcchhee

  Si, juste avant la ligne "Unable to resolve symbol" vous avez un
  message du style "can't resolve symbol 'fxMesaCreateContext'", votre
  librairie Mesa n'a pas le support glide compil. Reportez-vous  la
  section ``L'interprteur GL'' de la section d'installation de Quake II
  pour toute information sur l'installation de Mesa et glide.


  55..33..22..  ffaaiilleedd:: NNoo ssuucchh ffiillee oorr ddiirreeccttoorryy QQuuaakkee IIII nnee ssee llaannccee ppaass
  aavveecc llee mmeessssaaggee LLooaaddLLiibbrraarryy((""rreeff__XXXXXX..ssoo""))


    /etc/quake2.conf ne mentionne pas le chemin correct de votre
     rpertoire Quake II. Ce fichier doit contenir une ligne
     correspondant au rpertoire de Quake II.

    Si /etc/quake2.conf _c_o_n_t_i_e_n_t le chemin correct, essayez de
     supprimer ce fichier et de le recrer manuellement. Quelques
     versions de Quake II pour Linux intgrent un fichier quake2.conf
     incorrectement format.

    Avez-vous SVGAlib installe? Recherchez dans /lib, /usr/lib et
     /usr/local/lib un fichier appel libvga.so.1.X.X, o les X peuvent
     tre diffrents nombres. Si vous ne trouvez rien, vous devrez
     rcuprer et installer SVGAlib pour excuter Quake II hors de X.

    Si l'interprteur en question est ref_gl.so, Mesa peut ne pas tre
     correctement install. Avez-vous copi libMesaGL.so.2.6 dans le
     rpertoire de la librairie comme le prconisent les instructions
     d'installation?

    Si l'interprteur en question est ref_gl.so, avez-vous install les
     librairies glide?



  55..33..33..  GGLL,, eett qquuee jjee pprreessssee ""aappppllyy,,"" rriieenn nnee ssee ppaassssee!!  LLoorrssqquuee jjee
  mmooddiiffiiee llee ccoonnttrraassttee ppeennddaanntt ll''uuttiilliissaattiioonn ddee ll''iinntteerrpprrtteeuurr


  Tapez vid_restart sur la console pour que les changements prennent
  effet.



  55..33..44..  NNoottee ssuurr llaa ddiissttrriibbuuttiioonn 33..1177


  Au jour de la ralisation de ce document, la plus rcente version de
  Quake II est 3.19. Si, pour une raison ou une autre, vous avez la
  version 3.17, les informations suivantes peuvent vous aider.

  Deux fichiers texte (quake2.conf et fixperms.sh) de la distribution
  3.17 ont t par inadvertance enregistrs avec le format des fichiers
  texte MS-DOS CR/LF au lieu du format Unix LF. Ce qui signifie qu'il y
  a un caractre "retour chariot" supplmentaire  la fin de chaque
  ligne de ces fichiers et qu'ils ne seront pas exploitables tant qu'il
  vous ne les aurez pas corrigs.

  Nous utiliserons ttrr((11)) pour retirer les retours de chariot.



          for i in fixperms.sh quake2.conf
          do
          mv $i $i.bak
          tr -d '\r' < $i.bak > $i
          done






  55..33..55..  ddeeppuuiiss XX,, jjee nnee ppeeuuxx ppaass uuttiilliisseerr mmaa ssoouurriiss oouu mmoonn ccllaavviieerr.. ++++
  QQuuaanndd jjee llaannccee QQuuaakkee IIII eenn pplleeiinn ccrraann aavveecc ++sseett vviidd__rreeff ggllxx


  Lancez quake2 GLX avec l'option +set _windowed_mouse 1. Quake2 GLX
  s'excute dans une fentre, mme s'il semble tre en plein cran. Si
  vous dplacez la souris pendant que WM est en mode "focus-follows-
  mouse", cela revient  placer votre pointeur en dehors de cette
  fentre, et Quake II arrtera de rpondre aux sollicitations du
  clavier et de la souris. +set _windowed_mouse 1 oblige Quakeworld 
  capturer la souris pour son propre et unique usage.



  55..33..66..  mmeennuu VViiddoo ddee QQuuaakkee IIII?? **** PPoouurrqquuooii nnee ppuuiiss--jjee ppaass uuttiilliisseerr
  cceerrttaaiinnss mmooddeess SSVVGGAA pprrsseennttss ddaannss llee

  SVGAlib ne sait sans doute pas comment crer les modes sur votre
  carte. Lorsque Quake II s'excute avec un interprteur SVGA
  (ref_soft.so), il affiche une liste de tous les modes que SVGAlib lui
  indique disponibles:


       ------- Loading ref_soft.so -------
       Using RIVA 128 driver, 4096KB.
       mode 320: 200 1075253220
       mode 320: 240 1075253220
       mode 320: 400 1075253220
       mode 360: 480 1075253220
       mode 640: 480 1075253220
       mode 800: 600 1075253220
       mode 1024: 768 1075253220
       mode 1280: 1024 1075253220




  Ce sont les seuls modes sur lesquels vous pourrez basculer avec succs
  depuis le menu Video. Si par exemple 512x384 n'est pas dans la liste,
  la slection de ce mode depuis le menu Vido ne sera pas possible.

  SVGAlib vous permet de dfinir de nouveau modes video pour d'autres
  "chipsets" dans libvga.config, vous pouvez donc crer votre propre
  mode vido de cette faon. Reportez-vous  la documentation de SVGAlib
  pour plus de dtails sur ce sujet.



  66..  TTrruuccss eett AAssttuucceess




  66..11..  EExxccuuttiioonn ddee jjeeuuxx XX eett GGLL ssaannss sseettuuiidd

  Si vous excutez uniquement les versions X et GL de Quake, QuakeWorld
  ou Quake II, vous n'aurez pas besoin de les lancer avec les permission
  root. SVGA est le seul mode qui requiert d'tre lanc par root. Les
  versions X ont simplement besoin d'avoir accs  /dev/dsp, le fichier
  priphrique son. les versions GL ont de plus besoin d'avoir accs 
  la carte 3Dfx par /dev/dsp.

  /dev/dsp doit tre lisible et modifiable par Quake. La plupart des
  distributions dfinissent les permissions  662 (rw-rw--w-) par
  dfaut.  La solution la plus simple est de faire un chmod 666
  /dev/dsp. Sur la plupart des systmes, la possibilit de lire depuis
  un fichier priphrique son ne pose pas de problme de scurit
  majeur. Si cette approche n'est pas acceptable pour votre systme,
  crez un groupe propritaire de /dev/dsp et rendez les joueurs de
  Quake membre de ce groupe.

  Vous aurez besoin du driver /dev/3dfx de la page glide de Daryll
  Strauss (http://glide.xxedgexx.com/3DfxRPMS.html) pour lancer les
  anciennes applications glide (like GLQuake) sans tre root.
  Tlchargez le paquetage Device3Dfx.xxx.rpm et installez-le en suivant
  les instructions de la page web. Aprs l'installation du driver,
  vrifiez que les permissions de /dev/3dfx sont  666 (chmod 666
  /dev/3dfx).

  Lorsque /dev/dsp et /dev/3dfx seront correctement paramtrs, vous
  pourrez retirer le bit setuid de vos excutables Quake/QW/Q2. Faites
  simplement (en tant que root) chmod 0755 XXXXX, o XXXXX reprsente
  glquake, quake.x11, ou quake2.

  Si vous avez jou en tant que root avant de faire ces modifications,
  beaucoup de vos fichiers Quake (comme les sauvegardes) peuvent
  appartenir  root et tre inaccessibles  un utilisateur normal, aussi
  souvenez-vous de modifier le propritaire de ces fichiers avant de
  jouer en tant que simple utilisateur.


  66..22..  LLaanncceemmeenntt ddeess jjeeuuxx SSVVGGAA eett GGLL ddeeppuuiiss XX****

  Les clients Quakeworld et Quake II GLX sont des applications natives
  X, mais depuis qu'elles utilisent Mesa plutt que le mini-driver 3Dfx,
  elles sont plus lentes que les versions lib3dfxgl.so. Pour cette
  raison, vous pouvez prfrer encore lancer ces jeux depuis X plutt
  que d'utiliser les clients GLX.

  Ce qui suit est tir de la Gazette LINUX n20, "Truc" par Joey Hess
  (joey@kite.ml.org). L'original de ce document se trouve sur
  http://www.ssc.com/lg/issue20/lg_tips20.html#squake

  Oui, il est possible d'excuter les jeux Quake depuis X en tant que
  root, mais cette option est inconvenante, et vous courez en plus le
  risque d'un plantage de Quake laissant la console sans rponse. Avec
  un peu de travail, vous pouvez donner la possibilit  un utilisateur
  normal de lancer Quake SVGA et GL depuis X _E_T de revenir
  automatiquement sous X lorsque le programme se termine, que son arrt
  soit normal ou non.

  Nota: lorsque je prcise "Quake" dans le texte ci-dessus, je veux en
  fait dire "quake, glquake squake, qwcl, glqwcl, qwcl.x11 ou quake2".

    Premirement, vous aurez besoin du paquetage ooppeenn((11)) de Jon Tombs.
     C'est un lot de trs petits programmes qui vous permettent de
     passer d'une console virtuelle  l'autre et de lancer des
     programmes sur chacune d'elles. Tlchargez open depuis
     http://sunsite.unc.edu/pub/Linux/utils/console/. Vous ne devriez
     pas avoir grand chose de plus  faire que make;make install pour le
     compiler et l'installer. Une fois l'installation acheve, vous
     devrez rendre open et switchto excutables "setuid root". Pour
     cela:


       cd /usr/local/bin
       chown root open switchto
       chmod 4755 open switchto





    Maintenant, enregistrez le code suivant dans un fichier appel
     getvc.c:

     ___________________________________________________________________
         /* getvc.c
          * Affiche le numro de la CV courante sur la sortie standard.
          * Une grande partie de ce code a t inspire du programme open,
          * et ce code est bas sur GPL
          *
          * Joey Hess, Fri Apr 4 14:58:50 EST 1997
          */

          #include <sys/vt.h>
          #include <fcntl.h>

          main () {
           int fd = 0;
           struct vt_stat vt;

           if ((fd = open("/dev/console",O_WRONLY,0)) < 0) {
            perror("Failed to open /dev/console\n");
            return(2);
           }
           if (ioctl(fd, VT_GETSTATE, &vt) < 0) {
            perror("can't get VTstate\n");
            close(fd);
            return(4);
           }
           printf("%d\n",vt.v_active);
          }

          /* End of getvc.c */

     ___________________________________________________________________


  Compilez et installez quelque part dans votre $PATH:


          gcc getvc.c -o getvc
          strip getvc
          mv getvc /usr/local/bin





    Maintenant crons un script appel runvc: votre $PATH:

     ___________________________________________________________________
        #!/bin/sh
        # Lance quelque chose sur une CV, depuis X, et retourne sous X
        # lorsque c'est fait.
        # GPL Joey Hess, Thu, 10 Jul 1997 23:27:08 -0400
        exec open -s -- sh -c "$* ; chvt `getvc`"

     ___________________________________________________________________


  Rendez-le excutable et mettez-le quelque part dans votre $PATH:


          chmod 755 runvc
          mv runvc /usr/local/bin






  Maintenant vous pouvez utiliser la commande runvc pour excuter Quake.
  Continuez  utiliser la ligne de commande qui vous sert habituellement
  pour lancer votre partie, mais insrez runvc au dbut:


          runvc ./quake2 +set vid_ref gl +connect quake.foo.com





  Vous basculerez automatiquement sur une console virtuelle, lancerez
  Quake puis retournerez sous X lorsque vous sortirez de Quake!



  66..33..  CCoonnsseerrvveerr llaa ssoouurriiss  ll''iinnttrriieeuurr ddee llaa ffeennttrree ssoouuss XX

  Extrait du fichier readme.linux Quake II:

       Par dfaut, la souris ne sera pas confine dans la fentre
       de Quake2.  Pour obliger Quake2  capturer la souris, slec
       tionnez 'Windowed Mouse' sur le menu vido, ou tapez '_win
       dowed_mouse 0' sur la console. Faites l'inverse pour la
       relcher. Vous pouvez dfinir des raccourcis clavier pour
       capturer et relcher la souris dans la console, de cette
       faon: bind i "_windowed_mouse 1" bind o "_windowed_mouse 0"
       Alors "i" activera la capture de la souris et "o" la
       relchera.



  66..44..  LLee ppaarraammttrraaggee ""ggoonnffllaanntt"" 33DDffxx ffoonnccttiioonnnnee ggaalleemmeenntt ssoouuss LLiinnuuxx

  Vous pouvez avoir vu ou entendu parler de certain moyens de "gonfler"
  les performances d'OpenGL pour Quake par un paramtrage spcial des
  variables d'environnement. Ces variables sont galement valides sous
  Linux. Vous les dfinissez simplement de faon lgrement diffrente.
  Si un guide "gonflant" pour Windows/DOS vous indique de faire:




     SET SST_GRXCLK=59





  Sous Linux, ralisez-le de cette manire:


          export SST_GRXCLK=59






  66..55..  LLee nnaavviiggaatteeuurr ddee sseerrvveeuurr dduu ppaauuvvrree

  Joe S. (jszabo@eden.rutgers.edu) suggre:


       Une astuce que j'utilise avec qstat:
       Je crer un fichier de mes serveurs favoris, puis je fais:
       qstat -f /C/quake2/file.txt | less




  Je presse Ctrl z pour arrter, puis je copie l'adresse IP ou le nom de
  l'hte avec gpm dans une ligne de commande du genre:



          ./quake2 +connect expert.eqclans.com





  Alors je peux utiliser fg (Ndt: "fg" pour "foreground", commande shell
  qui a pour effet de remettre un programme au premier plan) pour
  revenir sur ma liste ultrieurement...


  66..66..  UUttiilliissaattiioonn ddee lliibb33ddffxxggll..ssoo  ppoouurr QQuuaakkee II****

  Vous pouvez utiliser le mini-driver 3Dfx (lib3dfxgl.so) de Quakeworld
  ou Quake II avec glquake galement. Copiez simplement le script
  glqwcl.3dfxgl ou quake2.3dfxgldans un nouveau fichier, appel
  glquake.3dfxgl. Editez alors le script glquake.3dfxgl pour qu'il lance
  glquake au lieu de glqwcl. Les mmes restrictions sur l'excution en
  tant que root s'appliquent ici, de mme que les diffrences entre une
  excution sous glibc et libc5.Voyez les section ``Quakeworld'' ou
  ``Quake II'' pour de plus amples informations sur lib3dfxgl.so.


  77..  AAddmmiinniissttrraattiioonn



  77..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document seront priodiquement postes
  sur comp.os.linux.answers et rec.games.computer.quake.misc.  Elles
  pourront galement tre tlcharges sur de nombreux sites WWW et FTP,
  y compris la Page d'accueil LDP.
  Les nouvelles versions de ce document seront priodiquement postes
  sur rec.games.computer.quake.misc et comp.os.linux.misc.

  La dernire version du HOWTO Quake Linux peut toujours tre trouve
  sur les sites suivants:


    http://www.linuxquake.com/

    http://webpages.mr.net/bobz/

    http://www.linuxgames.com/quake


  77..22..  AAuuttrreess ffoorrmmaattss ddee ccee DDooccuummeenntt

  Ce document est disponible dans une grande varit de formats
  diffrents.  Beaucoup plus que ncessaire, en fait. Vous pouvez les
  trouver sur http://www.linuxquake.com/howto/other-formats (NDT : en
  anglais! Mais la majorit de ces versions (Texte, sgml, html et
  postscript) sont galement disponibles en franais sur votre miroir
  national prfr :-)).

    ASCII text

    ASCII text with backspace-overstrikes appropri pour une
     visualisation par mmaann((11))

    HTML tout zipp et prt  tre insr dans votre site web

    Postscript

    PRC pour une visualisation sur votre "Palm Pilot" avec "Aportis
     Doc"

    SGML

    LaTeX

    Tout ce qui est mentionn ci-dessus est galement disponible dans
     un seul paquetage (Ndt : toujours en anglais!)


  77..33..  PPoolliittiiqquuee ddee DDiissttrriibbuuttiioonn


  Copyright (c) 1998, Bob Zimbinski, Brett A. Thomas et Mike Hallock.
  Ce document peut tre distribu dans le respect des termes de la
  licence LDP disponible sur sunsite.unc.edu/LDP/COPYRIGHT.html.

  Ce HOWTO est une documentation libre; vous pouvez le redistribuer
  et/ou le modifier sous les conditions de la licence LDP. Ce document
  est distribu dans l'espoir d'tre utile, mais _s_a_n_s _a_u_c_u_n_e _g_a_r_a_n_t_i_e;
  sans mme la garantie implicite de _q_u_a_l_i_t_ _l_o_y_a_l_e _e_t _m_a_r_c_h_a_n_d_e ou
  _d_'_e_x_a_c_t_i_t_u_d_e _p_o_u_r _u_n_e _u_s_a_g_e _p_a_r_t_i_c_u_l_i_e_r. Et puis zut, mme si ce
  document _t_u_e _v_o_t_r_e _c_h_i_e_n, ce n'est pas de notre faute.

  Reportez-vous  la licence LDP pour de plus amples dtails.


  77..44..  HHiissttoorriiqquuee ddeess rrvviissiioonnss

  Les diffrentes parties de ce document qui ont t modifies dans la
  dernire rvision ont un ** derrire le titre de la section. Les
  parties modifies dans une rvision antrieure  la dernire en date
  sont identifiables par un ++.
  Vous trouverez ci-dessous l'historique complet des rvisions de ce
  document. Non pas dans le but d'tre utile  tous, mais aux auteurs de
  ce document (Ndt: en consquence de quoi il est en version originale).































































  ______________________________________________________________________
     $Log: Quake-HOWTO.sgml,v $
     Revision 1.0.1.14 1998/10/05 19:54:17 bobz
     Removed the long-dead LinQuake page from list of Linux Quake sites
     Removed renaissoft.com link
     Minor wording changes throughout
     Added link to svgalib libc5 binary
     Added info about q2 demo
     Updated q2 installation info for the 3.19 release
     moved section about 3.17 textfile problems to the troubleshooting section
     Added part about lib3dfxgl.so to QW section
     Added part about GLX client to QW section
     Added part about lib3dfxgl.so to Q2 section
     Added part about GLX client to Q2 section
     Updated "slower than windows" FAQ
     Removed obsolete TS tip about glibc & q2
     Removed obsolete TS tip about playing w/CD mounted
     Changed tip about running glquake with lib3dfxgl.so
     Added instructions for Q2 mission pack 2
     Added pointer to svgalib libc5 binary
     Added FAQ about svgalib modes in Q2
     Added Cheapo proxy to software section
     Added screen FAQ
     Added qgraph to software sectoin
     Decided I was lying when I promised a 3Dfx tweak section in the next update

     Revision 1.0.1.13 1998/09/02 01:35:18 bobz
     Fixed some broken url links
     Restored <author> tag
     added an acknowledgement
     added a reminder to the non-root tip
     added qlog listing

     Revision 1.0.1.12 1998/08/30 21:35:23 bobz
     Updated QuakeWorld install section for 2.30 release
     Updated QW file list
     Updated Quake 1.01 install info per email suggestion
     Added QW 2.30 caveat to "Glibc considerations" section
     Updated linux vs. windows speed section for new 3dfx miniport
     Added glqwcl versions FAQ
     Added troubleshooting tip about windows focus and glx
     Added a sentence about /dev/3dfx permissions
     Made runvc script usage clearer
     Added tip about using mini-driver with Quake & QuakeII

     Revision 1.0.1.11 1998/08/15 19:28:49 bobz
     Added glibc topic in Troubleshooting/FAQ section
     Moved non-setuid info to Tips & Tricks section
     Moved rcs log into Revision Hist section
     Changed distribution info a little until LDP wakes up
     Changed references to quake.medina.net to www.linuxquake.com
     Added linuxgames.com to list of places to get current version
     Changed 3dfx Howto pointer
     Moved explanation of change markings (** and ++) to intro section where
  they'll be noticed
     Mentioned zoid's GL driver port in the Win vs Linux FAQ
     Fixed credit and URL in q2getty

     Revision 1.0.1.10 1998/08/07 19:07:02 bobz
     Changed XQF url
     Added comments to the revision history section
     Started marking changed sections
     Added OS Considerations to troubleshooting section
     Added rcon to Other Software section
     Added ICE to Other Software section

     Revision 1.0.1.9 1998/08/04 21:06:22 bobz
     Updated Acknowledgements
     Added discussion of Quake security
     Added QIPX to "Related Software"
     Added ts topic about -noudp

     Revision 1.0.1.8 1998/08/03 22:09:28 bobz
     Updated and restructured the q2 mods section
     Minor change to gpm troubleshooting info
     Changed sound ts info
     Changed intellimouse ts info

     Revision 1.0.1.7 1998/08/03 04:55:21 mikeh
     Added "Playing" section of Q2 Mods & Addons section.
     Added "Intelimouse" section of Troubleshooting section
     Added RedHat sndconfig part to Troubleshooting section
     Fixed a few spacing problems, and one error message

     Revision 1.0.1.6 1998/08/03 02:01:13 bobz
     Changed abstract.

     Revision 1.0.1.5 1998/07/31 16:07:11 bobz
     Added gpm -k mention in mouse troubleshooting
     mentioned 'sensitivity' in mouse lag troubleshooting
     Added qstat|less tip
     Added "/dev/dsp not configured" to troubleshooting
     Slightly reworded part of the mod compiling section
     Added bit about running mods server side
     corrected required version # in q2 mission pack 1
     Updated acknowledgements section

     Revision 1.0.1.4 1998/07/30 21:08:46 bobz
     Fixed a problem with broken lines in <sect> tags

     Revision 1.0.1.3 1998/07/30 17:40:29 bobz
     Fixed broken link to Latex version.

     Revision 1.0.1.2 1998/07/30 15:46:40 bobz
     Test update.

     Revision 1.0.1.1 1998/07/30 15:43:59 bobz
     Changed version numbering scheme.

     Revision 1.10 1998/07/30 13:51:24 bobz
     Minor version reporting change

     Revision 1.9 1998/07/29 20:42:03 bobz
     Added some server links

     Revision 1.8 1998/07/29 17:37:15 bobz
     Added a Quake II model viewer to the Other Programs section

     Revision 1.7 1998/07/29 16:02:23 bobz
     Added some relative links in Other Formats to make it
     more portable.

     Revision 1.6 1998/07/29 15:18:12 bobz
     Version and date stamps back to the way they were

     Revision 1.5 1998/07/29 14:52:03 bobz
     Added tags for automatic timestamping

     Revision 1.4 1998/07/29 13:17:51 bobz
     Changed captured.com's web address per webmaster's request

     Revision 1.3 1998/07/29 02:11:02 bobz
     Ooops again. Made "Other formats" a <sect> instead of a <sect1>.

     Revision 1.2 1998/07/29 01:55:41 bobz
     Oops. I deleted the doctype tag...

     Revision 1.1 1998/07/29 01:48:34 bobz
     Added Other Formats section.
     Changed acknowledgments slightly
     Added ftp.medina.net to list of ftp sites.

     Revision 1.0 1998/07/28
     First publicly released version
          Revision 0.9 1998/07/25
     Restructured,rewritten and expanded by Bob Zimbinski.

     Revision 0.01 1998/06/16
     First Pre-Release version v0.01by Brett A. Thomas and Mike Hallock.

  ______________________________________________________________________
















































	This directory contains the French versions of the Howtos, 
the Linux Documentation Project documents (LDP).

    The primary sites for these translations are:
	- ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/fr
        - ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO
        - http://www.freenix.org/linux/HOWTO/

Contact :
	traduc@traduc.org : mailling list of the translation team.
	        To subscribe (French language), send a message to 
		   Majordomo@traduc.org.

        For more informations, read the document Liste-des-HOWTO,
http://www.freenix.org/unix/linux/HOWTO/Liste-des-HOWTO.html.


		Eric Dumas, dumas@Linux.EU.Org - dumas@freenix.org.

  RPM HOWTO (RPM at Idle)
  Donnie Barnes, djb@redhat.com <mailto:djb@redhat.com>
  v2.0, 8 Avril 1997

  Traduit en franais par Sebastien Bricout, sbricout@francemel.com
  <mailto:sbricout@francemel.com> Traduit le 3 juillet 1999
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Overview

  3. Information gnrale

     3.1 Se procurer RPM
     3.2 Ce que RPM requiert

  4. Utiliser RPM

  5. Que puis-je vraiment faire avec RPM ?

  6. Compiler des RPMs

     6.1 Le fichier rpmrc
     6.2 Le fichier Spec
     6.3 L'en-tte
     6.4 Prep
     6.5 Compiler
     6.6 Installation
     6.7 Scripts d'installation/dsinstallation optionnels
     6.8 Fichiers
     6.9 Le compiler
        6.9.1 L'arborescence du rpertoire des sources
        6.9.2 Test de la compilation
        6.9.3 Gnrer la liste des fichiers
        6.9.4 Compiler le package avec RPM
     6.10 Le tester
     6.11 Que faire avec vos nouveaux RPMs
     6.12 Que faire maintenant ?

  7. Construire des RPM pour plusieurs architectures

     7.1 Exemple de fichier spec
     7.2 Optflags
     7.3 Macros
     7.4 Exclure des architectures des paquetages
     7.5 Pour finir

  8. Note de Copyright



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  RPM est le gestionnaire de paquetages Redhat (RedHat package manager).
  Malgr le fait qu'il contienne RedHat dans le nom, il se veut
  totalement un systme de paquetages ouvert disponible pour tous. Il
  permet aux utilisateurs de prendre le code source pour des nouveaux
  logiciels et de l'"empaqueter" sous forme de source ou de binaire pour
  que les binaires puissent tre simplement installs et suivis et les
  sources recompiles simplement. Il maintient aussi une base de dones
  de tous les paquetages et de leurs fichiers qui peut tre utilise
  pour vrifer les paquetages et chercher des informations a propos des
  fichiers et/ou des paquetages.

  RedHat Software encourage les autres vendeurs de distributions 
  prendre le temps de s'intresser  RPM et  l'utiliser pour leur
  propre distribution. RPM est compltement flexible et simple
  d'utilisation, bien qu'il fournisse la base d'un systme trs
  puissant. Il est aussi compltement ouvert et disponible, bien que
  nous apprciions les rapports de bugs et les correctifs. La permission
  d'utiliser et distribuer RPM gratuitement est admise conformment  la
  GPL.

  Une documentation plus complte est disponible sur RPM dans le livre
  d'Ed Bailey, Maximum RPM. Ce livre est disponible pour le
  tlchargement ou l'achat sur www.redhat.com http://www.redhat.com/
  <http://www.redhat.com/>.



  22..  OOvveerrvviieeww

  Premirement, laissez-moi dcrire la philosophie de RPM. Un but de
  l'tude tait de permettre l'utilisation des sources "de base". Avec
  RPP (notre ancien systme de paquetages duquel rien de RPM n'est
  driv), nos paquetages sources taient des sources "bidouilles" 
  partir desquelles nous compilions.  Thoriquement, quelqu'un peut
  installer un RPP source puis le compiler sans prblmes. Mais les
  sources n'taient pas les originales, et il n'y avait pas de rfrence
  comme quels changements avsions nous fait pour que les sources
  compilent. Il devait tlcharger les sources de base sparment. Avec
  RPM, vous avez les sources de base ainsi qu'un patch que nous avons
  utilis pour compiler. Nous y voyons un grand avantage. Pourquoi ? Il
  y a plusieurs raisons. Tout d'abord, si une nouvelle version d'un
  programme sort, vous ne devez pas ncessairement repartir de rien pour
  obtenir la compilation par les RedHat Labs. Vous pouvez regarder le
  patch pour voir ce que vous avez besoin de faire. Toutes les valeurs
  par dfaut de compilation sont facilement visibles par ce moyen.

  RPM est aussi conu pour avoir de puissantes options de reqete. Vous
  pouvez chercher  travers la base de donnes entire des paquetages ou
  seulement certains fichiers. Vous pouvez aussi simplement trouver 
  quel paquetage un fichier appartient, et d'o il vient. Les fichiers
  RPM eux-mmes sont des archives compresses, mais vous pouvez
  interroger des paquetages individuels simplement et rapidement grce 
  un en-tte binaire spcial ajout au paquetage avec tout ce dont vous
  pouvez avoir besoin de savoir sur le contenu sous forme non-
  compresse. Cela permet des requtes plus rapides.

  Une autre fonctionnalit puissante est la capacit de vrifier des
  paquetages. Si vous avez peur d'avoir effac un fichier important pour
  un paquetage, vrifiez-le simplement. Vous serez avertis des
  anomalies. A ce stade, vous pouvez rinstaller le paquetage so
  ncessaire. Les fichiers de configuration que vous aviez sont bien sr
  prservs.

  Nous aimerions remercier les gens de la distribution BOGUS pour
  beaucoup de leurs ides et concepts qui sont inclus dans RPM. Quoique
  RPM ait t compltement crit par RedHat Software, ses fonctions sont
  bases sur le code crit par BOGUS (PM et PMS).






  33..  IInnffoorrmmaattiioonn ggnnrraallee



  33..11..  SSee pprrooccuurreerr RRPPMM

  Le meilleur moyen de se procurer RPM est d'installer RedHat Linux. Si
  vous ne le voulez pas, vous pouvez tout de mme obtenir et utiliser
  RPM. Vous pouvez vous le procurer sur ftp.redhat.com
  ftp://ftp.redhat.com//pub/redhat/code/rpm
  <ftp://ftp.redhat.com//pub/redhat/code/rpm>.



  33..22..  CCee qquuee RRPPMM rreeqquuiieerrtt

  Ce qui est principalement requis pour faire tourner RPM est cpio 2.4.2
  ou suprieur. Quoique ce systme soit conu pour tre utilis avec
  Linux, il peut trs bien tre port sur d'autres systmes Unix. Il a,
  en fait, t compil sur SunOS, Solaris, AIX, Irix, AmigaOS, et
  d'autres. Faites attention, les paquetages binaires gnrs sur un
  systme Unix de type diffrent ne seront pas compatibles.

  Ce sont les exigences minimales pour installer des RPMs. Pour
  construire des RPMs  partir de sources, vous avez aussi besoin de ce
  qui est normalement requis pour compiler un paquetage, comme gcc,
  make, etc.



  44..  UUttiilliisseerr RRPPMM

  Dans sa forme la plus simple, RPM peut tre utilis pour installer des
  paquetages:



                      rpm -i foobar-1.0-1.i386.rpm




  La commande suivant la plus simple est la dsinstallation d'un paque
  tage:



                       rpm -e foobar




  Une des plus complexes mais trs utile des commandes vous permet
  d'installer des paquetages via FTP. Si vous tes connects  internet
  et voulez installer un nouveau paquetage, tout ce que vous avez besoin
  de faire est de spcifier le fichier avec une URL valide, comme dans:



                      rpm -i ftp://ftp.pht.com/pub/linux/redhat/rh-2.0-beta/RPMS/foobar-1.0-1.i386.rpm




  Notez que RPM va maintenant interroger et/ou installer via FTP.

  Bien que ce soient des commandes simples, RPM peut tre utilis d'une
  multitude de faons comme le montre le message Usage:



       ______________________________________________________________________
         RPM version 2.3.9
         Copyright (C) 1997 - Red Hat Software
         This may be freely redistributed under the terms of the GNU Public License

         usage: rpm {--help}
                rpm {--version}
                rpm {--initdb}   [--dbpath <dir>]
                rpm {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]
                                 [--replacepkgs] [--replacefiles] [--root <dir>]
                                 [--excludedocs] [--includedocs] [--noscripts]
                                 [--rcfile <file>] [--ignorearch] [--dbpath <dir>]
                                 [--prefix <dir>] [--ignoreos] [--nodeps]
                                 [--ftpproxy <host>] [--ftpport <port>]
                                 file1.rpm ... fileN.rpm
                rpm {--upgrade -U} [-v] [--hash -h] [--percent] [--force] [--test]
                                 [--oldpackage] [--root <dir>] [--noscripts]
                                 [--excludedocs] [--includedocs] [--rcfile <file>]
                                 [--ignorearch]  [--dbpath <dir>] [--prefix <dir>]
                                 [--ftpproxy <host>] [--ftpport <port>]
                                 [--ignoreos] [--nodeps] file1.rpm ... fileN.rpm
                rpm {--query -q} [-afpg] [-i] [-l] [-s] [-d] [-c] [-v] [-R]
                                 [--scripts] [--root <dir>] [--rcfile <file>]
                                 [--whatprovides] [--whatrequires] [--requires]
                                 [--ftpuseport] [--ftpproxy <host>] [--ftpport <port>]
                                 [--provides] [--dump] [--dbpath <dir>] [targets]
                rpm {--verify -V -y} [-afpg] [--root <dir>] [--rcfile <file>]
                                 [--dbpath <dir>] [--nodeps] [--nofiles] [--noscripts]
                                 [--nomd5] [targets]
                rpm {--setperms} [-afpg] [target]
                rpm {--setugids} [-afpg] [target]
                rpm {--erase -e} [--root <dir>] [--noscripts] [--rcfile <file>]
                                 [--dbpath <dir>] [--nodeps] [--allmatches]
                                 package1 ... packageN
                rpm {-b|t}[plciba] [-v] [--short-circuit] [--clean] [--rcfile  <file>]
                                 [--sign] [--test] [--timecheck <s>] specfile
                rpm {--rebuild} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm
                rpm {--recompile} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm
                rpm {--resign} [--rcfile <file>] package1 package2 ... packageN
                rpm {--addsign} [--rcfile <file>] package1 package2 ... packageN
                rpm {--checksig -K} [--nopgp] [--nomd5] [--rcfile <file>]
                                    package1 ... packageN
                rpm {--rebuilddb} [--rcfile <file>] [--dbpath <dir>]
                rpm {--querytags}
       ______________________________________________________________________




  Vous pouvez trouver plus de dtails sur ce que font ces options dans
  la page de man de RPM.


  55..  QQuuee ppuuiiss--jjee vvrraaiimmeenntt ffaaiirree aavveecc RRPPMM ??

  Rpm est un utilitaire trs utile (!), comme vous pouvez le voir, avec
  de nombreuses options. Le meilleur moyen de de leur donner un sens est
  de regarder des exemples. J'ai abord la simple
  installation/dsinstallation plus haut, alors voici plus d'exemples :


    Imaginez que vous ayez effac des fichiers par accident, mais que
     vous ne soyez pas sr que vous les avez effac. Si vous ne voulez
     pas vrifier votre systme complet et voir ce qui manque, vous
     ferez :


               rpm -Va




    Imaginez que parcouriez un fichier que vous ne reconnaissez pas.
     Pour trouvez  quel paquetage il appartient, vous ferez :


               rpm -qf /usr/X11R6/bin/xjewel




  La sortie sera :


               xjewel-1.6-1




    Vous avez trouv un nouveau RPM de koules, mais vous ne savez pas
     ce que c'est. Pour avoir des informations  son propos, faites :


               rpm -qpi koules-1.2-2.i386.rpm




  La sortie sera :


       ______________________________________________________________________
              Name        : koules                      Distribution: Red Hat Linux Colgate
              Version     : 1.2                               Vendor: Red Hat Software
              Release     : 2                             Build Date: Mon Sep 02 11:59:12 1996
              Install date: (none)                        Build Host: porky.redhat.com
              Group       : Games                         Source RPM: koules-1.2-2.src.rpm
              Size        : 614939
              Summary     : SVGAlib action game with multiplayer, network, and sound support
              Description :
              This arcade-style game is novel in conception and excellent in execution.
              No shooting, no blood, no guts, no gore.  The play is simple, but you
              still must develop skill to play.  This version uses SVGAlib to
              run on a graphics console.
       ______________________________________________________________________




    Maintenant vous voulez voir quels fichers le RPM de koules va
     installer. Vous ferez :


               rpm -qlp koules-1.2-2.i386.rpm



  La sortie est :


       ______________________________________________________________________

         /usr/doc/koules
         /usr/doc/koules/ANNOUNCE
         /usr/doc/koules/BUGS
         /usr/doc/koules/COMPILE.OS2
         /usr/doc/koules/COPYING
         /usr/doc/koules/Card
         /usr/doc/koules/ChangeLog
         /usr/doc/koules/INSTALLATION
         /usr/doc/koules/Icon.xpm
         /usr/doc/koules/Icon2.xpm
         /usr/doc/koules/Koules.FAQ
         /usr/doc/koules/Koules.xpm
         /usr/doc/koules/README
         /usr/doc/koules/TODO
         /usr/games/koules
         /usr/games/koules.svga
         /usr/games/koules.tcl
         /usr/man/man6/koules.svga.6
       ______________________________________________________________________




  Ce sont juste quelques exemples. De plus cratifs peuvent tre proches
  de ce que vous pouvez vraiment faire en tant familier de RPM.



  66..  CCoommppiilleerr ddeess RRPPMMss

  Compiler ses RPMs est trs simple, spcialement si vous pouvez obtenir
  du logiciel que vous essayez qu'il se compile tout seul.

  La procdure de base pour compiler un RPM est la suivante :


    Assurez-vous que votre fichier /etc/rpmrc est paramtr pour votre
     systme.

    Rcuprez les sources donc vous compilez le RPM pour la compilation
     sur votre systme.

    Faites un patch des changements que vous devez faire aux sources
     pour qu'elles compilent correctement.

    Faites un fichier spec pour le paquetage.

    Assurez-vous que chaque chose est  sa place.

  En utilisation normale, RPM construit aussi bien des paquetages
  sources que des binaires.



  66..11..  LLee ffiicchhiieerr rrppmmrrcc

  Maintenant, la seule configuration de RPM is disponible via le fichier
  /etc/rpmrc. Un exemple de celui-ci ressemble  :



  ______________________________________________________________________

    require_vendor: 1
    distribution: I roll my own!
    require_distribution: 1
    topdir: /usr/src/me
    vendor: Mickiesoft
    packager:  Mickeysoft Packaging Account <packages@mickiesoft.com>

    optflags: i386 -O2 -m486 -fno-strength-reduce
    optflags: alpha -O2
    optflags: sparc -O2

    signature: pgp
    pgp_name: Mickeysoft Packaging Account
    pgp_path: /home/packages/.pgp

    tmppath: /usr/tmp
  ______________________________________________________________________




  La ligne require_vendor fait que RPM trouve une ligne vendor. Elle
  peut provenir du fichier /etc/rpmrc ou de l'en-tte du fichier spec
  lui-mme. Pour dsactiver ceci, mettez le nombre  0. Cela reste vrai
  pour les lignes require_distribution et require_group.

  La ligne suivante est la ligne distribution. Pour pouvez dfinir cela
  ici ou plus tard, dans l'en-tte du fichier spec. Quand vous compilez
  pour une distribution particulire, il est conseill de s'assurer que
  cette ligne est correcte, bien que a ne soit pas requis. La ligne
  vendor fonctionne selon le mme principe, mais peut tre n'importe
  quoi (ex: Joe's Software and Rock Music Emporium).

  RPM supporte aussi maintenant la cration de paquetages sur des
  architectures multiples. Le fichier rpmrc peut conserver une variable
  "optflags" pour compiler ce qui requiert des options spcifiques 
  l'architecture durant la compilation. Voir plus loin les paragraphes
  concernant l'utilisation de cette option.

  En supplment des macros ci-dessus, il y en a beaucoup plus. Vous
  pouvez utiliser :



               rpm --showrc




  pour savoir comment vos options sont dfinies et quels sont les
  options disponibles.



  66..22..  LLee ffiicchhiieerr SSppeecc

  Nous avons commenc  parler du fichier spec. Les fichiers spec sont
  requis pour construire un paquetage. Le fichier spec est une
  description du logiciel accompagne des instructions concernant sa
  compilation, ainsi qu'une liste des fichiers pour tous les binaires
  qui seront installs.

  Il est recommand nommer votre fichier spec conformment  une
  convention standard, c'est  dire nom_du_paquetage-numro_de_version-
  numro de release.spec.

  Voici un petit fichier spec (vim-3.0-1.spec):



       ______________________________________________________________________

         Summary: ejects ejectable media and controls auto ejection
         Name: eject
         Version: 1.4
         Release: 3
         Copyright: GPL
         Group: Utilities/System
         Source: sunsite.unc.edu:/pub/Linux/utils/disk-management/eject-1.4.tar.gz
         Patch: eject-1.4-make.patch
         Patch1: eject-1.4-jaz.patch
         %description
         This program allows the user to eject media that is autoejecting like
         CD-ROMs, Jaz and Zip drives, and floppy drives on SPARC machines.

         %prep
         %setup
         %patch -p1
         %patch1 -p1

         %build
         make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"

         %install
         install -s -m 755 -o 0 -g 0 eject /usr/bin/eject
         install -m 644 -o 0 -g 0 eject.1 /usr/man/man1

         %files
         %doc README COPYING ChangeLog

         /usr/bin/eject
         /usr/man/man1/eject.1
       ______________________________________________________________________






  66..33..  LL''eenn--ttttee

  L'en-tte comporte des champs standard que vous devez remplir. Il y a
  quelques restrictions bien sr. Les champs doivent tre remplis comme
  suit :


    Summary: C'est la description du paquetage en une ligne.

    Name: Cela doit tre la partie "nom" du fichier rpm que vous
     projetez d'utiliser.

    Version: Cela doit tre la partie "version" du fichier rpm que vous
     projetez d'utiliser.

    Release: C'est le numro de release pour un paquetage d'une mme
     version (par exemple si vous construisez un paquetage et que vous
     le trouvez qu'il est lgrement rt et que vous souhaitez le
     reconstruire, le paquetage suivant aura le numro de release 2).


    Icon: c'est le nom du fichier icne pour utilisation par un autre
     utilitaire d'installation de "haut niveau" (comme glint ou gnorpm).
     Ce doit tre un gif et doit tre plac dans le rpertoire SOURCES.

    Source: Cette ligne pointe sur l'emplacement d'origine des sources
     de base. Il est utilis si vous voulez robtenir les sources ou
     regarder si il existe une version plus rcente. Restriction: le nom
     du fichier dans cette ligne doit concorder avec le nom du fichier
     que vous avez sur votre propre systme (c'est  dire ne pas
     tlcharger les sources et changer le nom du fichier). Vous pouvez
     aussi spcifier plus d'un fichier source en utilisation des lignes
     comme :



       ______________________________________________________________________
         Source0: blah-0.tar.gz
         Source1: blah-1.tar.gz
         Source2: fooblah.tar.gz
       ______________________________________________________________________




  Ces fichiers iront dans le rpertoire SOURCES (la structure des
  rpertoires est aborde dans un autre paragraphe, "L'arborescence du
  rpertoire des sources".)


    Patch: C'est l'emplacement o vous pouvez trouvez le patch si vous
     voulez le retlcharger. Restriction: le nom du fichier dpot
     concorder avec celui que vous utilisez qaudn vous faites VOTRE
     patch. Notez que vous pouvez avoir plusieurs fichiers patch de la
     mme faon que vous pouvez avoir plusieurs sources. Vous auriez
     ainsi quelque chose comme :



       ______________________________________________________________________
              Patch0: blah-0.patch
              Patch1: blah-1.patch
              Patch2: fooblah.patch
       ______________________________________________________________________




  Ces fichiers vont dans le rpertoire SOURCES.


    Copyright: Cette ligne indique la faon dont le package est protg
     lgalement. Vous pouvez utiliser quelque chose comme GPL, BSD, MIT,
     public domain, Distributable, ou commercial.

    Buildroot: Cette ligne vous permet de spcifier un rpertoire comme
     "root" pour la compilation et l'installation du nouveau paquetage.
     Vous pouvez l'utiliser pour faciliter les tests de votre paquetage
     avant de l'installer sur votre machine.

    Group: Cette ligne est utilise pour donner aux programmes
     d'installation de haut niveau l'emplacement de ce paquetage dans
     leur structure hirarchique. La arborescence des groupes ressemble
     actuellement  :



  ______________________________________________________________________
  Applications
          Communications
          Editeurs
                  Emacs
          Ingnirie
          Tableurs
          Bases de donnes
          Graphiques
          Rseau
          Mail
          News
          Publication
                  TeX
  Base
          Noyau
  Utilitaires
          Archive
          Console
          Fichiers
          Systme
          Terminal
          Texte
  Dmons
  Documentation
  X11
          XFree86
                  Serveurs
          Applications
                  Graphiques
                  Rseau
          Jeux
                  Stratgie
                  Vido
          Amusements
          Utilitaires
          Librairies
          Gestionnaires de fentres
  Librairies
  Rseaux
          Admin
          Dmons
          News
          Utilitaires
  Dveloppement
          Dbuggeurs
          Librairies
                  Libc
          Langages
                  Fortran
                  Tcl
          Construction
          Contrle de version
          Utilitaires
  Shells
  Jeux
  ______________________________________________________________________





    %description Ce n'est pas pas vraiment un champ de l'en-tte, mais
     doit tre dcrit avec le reste de celui-ci. Vous avez besoin d'un
     champ description par paquatage/sous-paquetage. C'est un champ
     multilgine qui est utilis pour donner une description claire du
     paquetage.



  66..44..  PPrreepp

  C'est la seconde section du fichier spec. Il est utilis pour prparer
  les sources  la compilation. Vous mettez ce que vous avez besoin de
  faire pour patcher les sources et paramtrer, comme ce que vous
  mettriez pour compiler les sources.

  Une chose importante: chacune de ces sections est simplement un
  emplacement pour excuter des scripts shell. Vous pourriez simplement
  faire un script sh et le mettre aprs le tag %prep pour dcompresser
  et patcher vos sources. Nous avons conu des macros pour aider  cela,
  toutefois.

  La premire de ces macros est %setup. Dans sa forme la plus simple
  (pas d'options de ligne de commande), elle dcompresse simplement les
  sources et se rend dans le rpertoire des sources. Elle prend aussi
  les options suivantes :


    -n nom va dfinir le nom du rpertoire de compilation. La valeur
     par dfaut est $NAME-$VERSION. D'autres possibilits, parmi
     lesquelles $NAME, ${NAME}${VERSION}, ou n'importe quoi utilis par
     le fichier tar principal. (Notez que ces variables "$" ne sont pas
     des variables relles disponibles  l'intrieur du fichier spec .
     En ralit, elles sont juste utilises ici  la place du nom de
     l'exemple. Il est ncessaire d'utiliser les vrais noms et versions
     dans votre paquetage, et non une variable.)


    -c va crer et se rendre dans le rpertoire donn avant de
     dtarrer.


    -b # va dtarrer Source# avant de se rendre dans le rpertoire (et
     cela n'a aucun sens avec -c donc ne les associez pas). C'est utile
     seulement avec de multiples fichiers source.


    -a # va dtarrer Source# aprs s'tre rendu dans le rpertoire.


    -T Cette option supplante l'action par dfaut de dtarrer le Source
     et requiert un -b 0 ou -a 0 pour dtarrer le fichier source
     principal. Vous en aurez besoin quand il y a des sources
     secondaires.


    -D N'efface pas le rpertoire avant la dcompression. C'est
     seulement utilse o vous avez plus d'un macro setup Cela doit tre
     utilis uniquement dans les macros setup aprs la premire (mais
     jamais dans celle-ci).

  La macro suivante est la macro %patch. Cette macro aide  automatiser
  le processus d'application des patches aux sources. Il comporte
  plusieurs options, listes ici :


    # va appliquer Patch# comme fichier patch


    -p # spcifie le nombre de rpertoires  liminer pour la commande
     patch(1) (NdT: option -p).
    -P L'action par dfaut est d'appliquer Patch (ou Patch0). Ce
     paramtre inhibe ce comportement par dfaut et requierrera un 0
     pour dtarrer le fichier. Cette option est trs utile en seconde
     (ou plus) macro %patch qui requiert un numro diffrent de la
     premire macro.


    Vous pouvez aussi faire %patch# au lieu de faire la commande
     relle: %patch # -P

  Ce sont toutes les macros dont vous avez besoin. Aprs que vous les
  ayez faites, vous pouvez galement faire un autre rglage dont vous
  avez besoin via un script sh. Tout ce que vous incluez jusqu' de la
  macro %build (voque dans la section suivante) est excut par sh.
  Regardez l'exemple plus haut afin de vous donner une ide du genre de
  choses que vous pouvez faire ici.


  66..55..  CCoommppiilleerr

  Ils n'y a pas de vraies macros pour cette section. Vous devez juste
  mettre ici les commandes dont vous avez besoin pour compiler le
  logiciel lorsque vous avez dtarr les sources, patches celles-ci, et
  vous tre rendu dans le rpertoire. C'est juste un autre ensemble de
  commandes passes  sh, donc n'importe quelle commande accepte par sh
  peut tre place ici (y compris des commentaires). Votre rpertoire de
  travail courant est rtabli dans ces sections au rpertoire racine des
  cources, gardez cela en mmoire. Vous devez changer de rpertoire pour
  atteindre les sous-rpertoires si ncessaire.



  66..66..  IInnssttaallllaattiioonn

  De mme, il n'y a pas ici non plus de vraies macros. Vous mettrez ici
  simplement les commandes donc vous avez besoin pour installer. Si vous
  avez un "make install" disponible dans le paquetage que vous compilez,
  mettez-le ici. Sinon, vous pouvez patcher le Makefile pour un "make
  install" et faire juste un make install ici, ou l'installer  la main
  ici avec des commandes sh. Considrez que votre rpertoire courant est
  le rpertoire racine de vos sources.


  66..77..  SSccrriippttss dd''iinnssttaallllaattiioonn//ddssiinnssttaallllaattiioonn ooppttiioonnnneellss

  Vous pouvez mettre des scripts qui seront excuts avant et aprs
  l'installation et la dsinstallation de paquetages binaires. Une des
  principales raison pour a est la ncessit de lancer /sbin/ldconfig
  aprs l'installation ou la suppression de paquetages contenant des
  librairies partages. Les macros pour chacun de ces scripts sont les
  suivantes:


    %pre est la macro qui fait les scripts de pr-installation.


    %post est la macro qui fait les scripts de post-installation.


    %preun est la macro qui fait les scripts de pr-dsinstallation.


    %postrun est la macro qui fait les scripts de post-dsinstallation.

  Le contenu de ces sections doit ressembler  un script sh, sauf que
  vous n'avez pas besoin de #!/bin/sh.
  66..88..  FFiicchhiieerrss

  C'est la section o vous devez lister les fichiers pour le paquetage
  binaire. RPM n'a aucun moyen de connaitre quels fichiers sont
  installs par le "make install". Il n'y a PAS de moyen de le savoir.
  Certains ont suggr de faire un "find" avant et aprs l'installation.
  Avec un systme multiutilisateur, c'est inacceptable car d'autres
  fichiers qui n'ont rien  voir peuvent tre cres pendant le processus
  d'installation.

  Il y a plusieurs macros disponibles pour faire des choses spciales.
  Elles sont listes et dcrites ici:


    %doc est utiliser pour marquer la documentation dans le paquetage
     source que vous voulez installer dans un paquetage binaire. Les
     documents seront installs dans /usr/doc/$NAME-$VERSION-$RELEASE.
     Vous pouvez lister plusieurs documents sur la ligne de commande
     avec cette macro, ou les lister sparment en utilisant une macro
     pour chaque.


    %config est utilis pour marquer les fichiers de configuration dans
     un paquetage. Cela inclut des fichiers comme sendmail.cf, passwd,
     etc. Si vous dinstallez par la suite un paquetage contenant des
     fichiers de configuration, les fichiers non modifis seront
     supprims et les fichiers modifis seront conservs avec
     l'extension .rpmsave. Vous pouvez bien sr mettre plusieurs
     fichiers avec cette macro.


    %files -f nomfichier va vous permettre de lister vos fichiers dans
     un fichier arbitraire  l'intrieur du rpertoire de compilation
     des sources. C'est pratique dans le cas o vous avez un paquetage
     qui ne peut pas construire sa propre liste de fichiers. Vous
     incluez alors simplement cette liste de fichiers ici, et vous ne
     devez pas lister les fichiers spcifiquement.

  Le plus gros inconvnient dans le liste de fichier est la liste des
  rpertoire. Si vous listez /usr/bin par accident, votre paquetage va
  contenir tous les fichiers de /usr/bin sur votre systme.



  66..99..  LLee ccoommppiilleerr



  66..99..11..  LL''aarrbboorreesscceennccee dduu rrppeerrttooiirree ddeess ssoouurrcceess

  La premire chose dont vous avez besoin est une arborescence de
  compilation bien configure. C'est configurable dans /etc/rpmrc. La
  plupart des gens utiliseront simplement /usr/src.

  Vous aurez probablement besoin de crer les rpertoires suivants pour
  construire l'arborescence de compilation:


    BUILD est le rpertoire o toutes les compilations par RPM ont
     lieu. Vous ne devez pas faire vos tests de compilation quelquepart
     en particulier, mais c'est l o RPM va faire sa compilation.


    SOURCES est le rpertoire o vous mettrez le fichier source tarr
     original et vos patches. C'est l que RPM regarde par dfaut.

    SPECS est le rpertoire o tous les fichiers spec vont.


    RPMS is le rpertoire o RPM va mettre tous ses binaires RPMs
     compils.



  66..99..22..  TTeesstt ddee llaa ccoommppiillaattiioonn

  La premire chose que vous voudrez probablement faire est de compiler
  proprement la source sans utiliser RPM. Pour faire cela, dcompressez
  les sources, et changez le nom du rpertoire en $NAME.orig. Ensuite
  re-dcompressez les sources. Utilisez ces sources pour compiler. Allez
   l'intrieur de celui-ci et suivez les instructions de compilation
  pour le compiler. Si vous devez diter des choses, vous aurez besoin
  d'un patch. Ds que vous ruississez  le compiler, nettoyez le
  rpertoire des sources. Effacez les fichiers qui ont t obtenus par
  le script configure. Ensuite, remontez au rpertoire parent. Vous
  ferez ensuite quelque chose comme :



                      diff -uNr dirname.orig dirname > ../SOURCES/dirname-linux.patch




  Cela crera un patch pour vous que vous pourrez utilisez dans votre
  fichier spec. Notez que le "linux" que vous voyez dans le nom du patch
  est juste un identificateur. Vous voudrez srement utiliser quelque
  chose de plus descriptif comme "config" ou "bugs" pour dcrire
  pourquoi vous avez d faire un patch. De plus il est recommand de
  vrifier dans le fichier patch que vous avez cr que vous n'avez pas
  inclus de binaires par accident avant de l'utiliser.



  66..99..33..  GGnnrreerr llaa lliissttee ddeess ffiicchhiieerrss

  Maintenant que vous avez des souces qui vont compiler et que vous
  savez comment le faire, compilez-les et installez-les. Regardez la
  sortie de la squence d'installation et construisez la liste de
  fichiers que vous utiliserez dans le fichier spec  partir de celle-
  ci. On construit habituellement le fichier spec en parallle avec
  toutes ces tapes. Vous pouvez crer celui de base et remplir ses
  parties les plus simples, et ensuite remplir les autre tapes au fur
  et  mesure.



  66..99..44..  CCoommppiilleerr llee ppaacckkaaggee aavveecc RRPPMM

  Ds que vous avez un fichier spec, vous tes prt  essayer et 
  compiler votre paquetage. Le voie la plus utilise pour faire cela est
  avec une commande qui ressemble  la suivante :



                      rpm -ba foobar-1.0.spec




  Il y a d'autres options utiles avec le paramtre -b :

    p signifie d'xcuter simplement la section prep du fichier spec.


    l est un vrificateur de liste qui fait des contrles sur %files.


    c fait le prep et compile. C'est utile quand vous n'tes pas sr du
     tout de la source que vous compilez. Cela semble peu utile parce
     que vous travaillerez avec les sources elles-mmes jusqu' ce
     qu'elles compilent et commencerez seulement  travailler avec RPM,
     mais ds que vous serez accoutum  l'utilisation de RPM vous
     trouverez des cas o vous les utiliserez.


    i fait un prep, compile, et installe.


    a fait tout (paquetages source et binaire).

  Il y a plusieurs modificateurs  l'option -b. Ce sont les suivants:


    --short-circuit va sauter  une tape (peut tre utilis uniquement
     avec c et i).


    --clean efface l'arborescence de compilation quand le travail est
     termin.


    --keep-temps va conserver tous les fichiers temporaires et les
     scripts fais dans /tmp. Vous pouvez actuellement voir quels
     fichiers ont t cres dans /tmp en utilisant l'option -v.


    --test n'excute aucune des tapes relles, mais conserve les
     fichiers temporaires.



  66..1100..  LLee tteesstteerr

  Ds que vous avez des rpms source et binaire pour votre paquetage,
  vous devez le tester. La voie la plus simple et la meilleure est
  d'utiliser pour les tests une machine totalement diffrente de celle
  sur laquelle vous avez construit le paquetage. Aprs tout, vous avec
  juste fait un ensemble de "make install" sur votre propre machine,
  alors il pourrait aussi bien tre install.

  Vous pouvez faire un rpm -u nom_du_paquetage sur le paquetage pour
  tester, mais vous pouvez tre du parce durant la construction du
  paquetage, vous avez fait un make install. Si vous avez laiss quelque
  chose en dehors de votre liste des fichiers, il ne sera pas
  dsinstall. Vous rinstallerez alors le paquetage binaire et votre
  systme sera de nouveau complet, mais votre rpm toujours pas. Gardez 
  l'esprit que vous faites un rpm -ba paquetage, la plupart des
  peersonnes installeront simplement celui-ci avec rpm -i paquetage.
  Assurez-vous de ne rien faire dans la section build ou install qui
  aura besoin d'tre fait quand les binaires seront installs par eux-
  mmes.






  66..1111..  QQuuee ffaaiirree aavveecc vvooss nnoouuvveeaauuxx RRPPMMss

  Ds que vous avez construit votre propre rpm de quelque chose (si il
  n'a pas dj t "RPMis"), vous pouvez faire profier les autres de
  votre travail (si votre rpm est un logiciel librement redistribuable).
  Pour cela, vous l'uploaderez sur ftp://contrib.redhat.com/
  <ftp://contrib.redhat.com/>



  66..1122..  QQuuee ffaaiirree mmaaiinntteennaanntt ??

  Regardez les sections prcdentes Tests et Que faire ... Nous voulons
  tous les RPMs que nous pouvons obtenir, et nous voulons que ce soient
  tous les bons RPMs. Prenez le temps de les tester correctement, et
  ensuite prenez le temps de les uploader afin que chacun en bnficie.
  De mme, assurez-vous que vous uploadez uniquement des logiciels
  librement redistribuables. Les logiciels commerciaux et les sharewares
  ne doivent pas tre uploads  moins que le copyright le permette
  explicitement. Cela inclut Netscape, ssh, pgp, etc.



  77..  CCoonnssttrruuiirree ddeess RRPPMM ppoouurr pplluussiieeuurrss aarrcchhiitteeccttuurreess

  RPM peut maintenant tre utilis pour construire des paquetages pour
  intel 386, le Digital Alpha faisant tourner linux, et le Sparc. Il a
  t signal qu'il fonctionnait aussi bien sur des stations de travail
  SGI et HP. De nombreuses options permettent de construire des
  paquetages sur toutes les plateformes facilement. La premire de
  celles-ci est la directive "optflags" dans /etc/rpmrc. Elle peut tre
  utilise pour positionner des options utiliss durant la compilation
  concernant des valeurs spcifiques  l'architecture. Elles peuvent
  tre utilises pour faire diffrentes choses qui dpend de
  l'architecture sur laquelle vous compilez. Une fonctionnalit est la
  directive "Exclude" dans le header.



  77..11..  EExxeemmppllee ddee ffiicchhiieerr ssppeecc

  La partie qui suit est extraite du fichier spec pour le paquetage
  fileutils. Il est paramtr pour compiler aussi bien sur Alpha que sur
  Intel.






















  ______________________________________________________________________
    Summary: GNU File Utilities
    Name: fileutils
    Version: 3.16
    Release: 1
    Copyright: GPL
    Group: Utilities/File
    Source0: prep.ai.mit.edu:/pub/gnu/fileutils-3.16.tar.gz
    Source1: DIR_COLORS
    Patch: fileutils-3.16-mktime.patch

    %description
    These are the GNU file management utilities.  It includes programs
    to copy, move, list, etc, files.

    The ls program in this package now incorporates color ls!

    %prep
    %setup

    %ifarch alpha
    %patch -p1
    autoconf
    %endif
    %build
    configure --prefix=/usr --exec-prefix=/
    make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s

    %install
    rm -f /usr/info/fileutils*
    make install
    gzip -9nf /usr/info/fileutils*
  ______________________________________________________________________






  77..22..  OOppttffllaaggss

  Dans cet exemple, vous pouvez voir comment la directive "optflags" est
  utilise dans le /etc/rpmrc. Selon l'architecture sur laquelle vous
  compilez, la valeur est donne  RPM_OPT_FLAGS. Vous devez patcher le
  Makefile pour votre paquetage pour utiliser cette variable  la place
  des directives normales que vous utilisez probablement (comme -m486 et
  -O2). Vous pouvez obtenir un meilleur aspect de ce dont vous avez 
  faire par l'installation du paquetage source, la dcompression de
  celui-ci et l'examen du Makefile. Ensuite regardez au patch pour le
  Makefile et voyez les changements  faire.



  77..33..  MMaaccrrooss

  la macro %ifarch est trs important pour tout cela. LA plupart du
  temps vous autre besoin de faire un patch ou deux qui sera spcifique
   une architecture seulement. Dans ce cas, RPM va vous permettre
  d'appliquer ce patch uniquement sur cette architecture.

  Dans l'exemple plus haut, fileutils a un patch pour les machines 64
  bits. Manifestement, cela doit uniquement tre appliqu sur Alpha  ce
  jour. Donc, on ajoute une macro %ifarch pour le patch 64 bits comme
  suit:


              %ifarch axp
              %patch1 -p1
              %endif




  Cela garantira que le patch ne sera pas appliqu sur une autre archi
  tecture que Alpha.



  77..44..  EExxcclluurree ddeess aarrcchhiitteeccttuurreess ddeess ppaaqquueettaaggeess

  Comme vous pouvez maintenir les RPMs sources dans un rpertoire pour
  toutes les plateformes, nous avons implment la capacit d'exclure
  des paquetages d'tre compiles sur certaines architectures. C'est ce
  que vous pouvez faire avec quelque chose comme



              rpm --rebuild /usr/src/SRPMS/*.rpm




  et vous obtenez les vrais paquetages compils. Si vous n'avez pas
  encore port une application sur une certaine platefome, tout ce que
  vous devez faire est une ligne comme:



             ExcludeArch: axp




   l'en-tte du fichier spec des paquetages source. Ensuite recompilez
  les paquetages sur les plateformes sur lesquelles il compile. Vous
  aurez alors un paquetage source qui compile sur Intel et peut
  facilement tre saut sur Alpha.



  77..55..  PPoouurr ffiinniirr

  Utilisez RPM pour construire des paquetages multi-architectures est
  habituellement plus simple  faire que d'obtenir du paquetage lui-mme
  qu'il compile sur des architectures diffrentes. Aussi plus les
  paquetages compilent difficilement  plus vous obtiendrez de facilit
  (Ndt: ?). Comme toujours, la meilleure aide quand la construction d'un
  RPM vous pose problme est de regarder un paquetage source similaire.



  88..  NNoottee ddee CCooppyyrriigghhtt

  Ce document et son contenu sont protgs.  La redistribution de ce
  document est permise tant que le contenu demeure compltement intact
  et inchang. En d'autres mots, vous pouvez changer le format et le
  rimprimer ou redistribuer seulement.





  Une Bibliographie Linux (The Linux Reading List HOWTO)
  Eric S. Raymond
  Traduction Thierry Le Quau, thierry.lequeau@wanadoo.fr
  1.2, 29 Novembre 1997

  Ce document donne la liste des livres de rfrence que je considre
  essentiels pour dbuter et programmer sous UNIX (et spcialement sous
  Linux).
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 But de ce document
     1.2 Nouvelles versions de ce document
     1.3 Joindre l'auteur : commentaires et corrections
     1.4 Autres ressources
     1.5 Conventions utilises dans ce document

  2. Approche gnrale, histoire et pratique.

  3. Livres sur les gnralits UNIX/LINUX

     3.1 Installation et administration de Linux
     3.2 Utiliser Unix & Linux
     3.3 Scurit du systme

  4. Livres sur les shell, les langages de commandes, la programmation Web

  5. Livres sur les diteurs de texte

     5.1 TeX et LaTeX

  6. Livres sur la programmation en C et C++

     6.1 C et C++
     6.2 L'interface des appels systmes en C

  7. Livres sur le rseau

  8. Livres sur l'implmentation du noyau sous Unix

     8.1 Anctres de Linux
     8.2 Linux
     8.3 Relatifs  Linux

  9. Livres sur l'architecture et la programmation des processeurs Intel

  10. Livres sur le matriel PC

  11. Aspects administratifs

     11.1 Conditions d'utilisations
     11.2 Historique


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn





  11..11..  BBuutt ddee ccee ddooccuummeenntt

  Ce document donne la liste des livres de rfrence que je considre
  essentiels pour dbuter et programmer sous UNIX (et spcialement sous
  Linux).



  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  De nouvelles versions de ce document seront postes rgulirement dans
  comp.os.linux.answer. Elles seront galement disponibles sur les
  divers sites WWW et FTP Linux, notamment le site du LDP (Linux
  Documentation Project).  La version franaise est disponible sur
  <http://www.freenix.fr/linux/HOWTO>.

  Vous pouvez aussi voir la dernire version  l'adresse
  <http://sunsite.unc.edu/LDP/HOWTO/Reading-List-HOWTO.html>.


  11..33..  JJooiinnddrree ll''aauutteeuurr :: ccoommmmeennttaaiirreess eett ccoorrrreeccttiioonnss

  Si vous avez des questions ou des commentaires au sujet de ce document
  (ou si vous voulez conseiller un livre), ne le gardez pas pour vous,
  faites-en part  Eric S. Raymond, esr@thyrsus.com.  Je recevrai avec
  plaisir toute suggestion ou critique.



  11..44..  AAuuttrreess rreessssoouurrcceess

  Pour les HOWTOs en ligne, magazines et autres supports voyez 
  l'adresse du Linux Documentation Project
  <http://sunsite.unc.edu/LDP/HOWTO>.  En franais :
  <http://www.freenix.fr/linux/HOWTO>.

  Il y a quelques annes j'ai crit une bibliographie sur UNIX, moins
  axe sur LINUX, qui prsente encore quelque intrt et peut prter 
  sourire. Vous pouvez trouver la "Loginataka"  l'adresse
  <http://www.ccil.org/~esr/faqs/loginataka.html>.


  11..55..  CCoonnvveennttiioonnss uuttiilliisseess ddaannss ccee ddooccuummeenntt

  Les commentaires qui ne sont pas entre guillemets sont les miens, ou
  je n'ai pas jug bon de modifier ceux de Jim Haynes (mon
  prdcesseur).  Les commentaires envoys par d'autres personnes sont
  entre guillemets, prcds du nom de leur auteur. (JH = Jim Haynes).

  Les URLs "voir" apparaissant  ct des informations sur la
  publication renvoient au catalogue en ligne de la maison d'dition et
  pointent gnralement sur une page contenant une vue de la couverture,
  une brve description et un formulaire de commande. Certains ouvrages
  ne l'on pas, parce que le site web utilise des cadres rendant
  impossible l'accs direct  la page concerne.Pour les livres dits
  par Addison-Wesley, l'url vous amne sur la page de garde, le chemin
  amenant jusqu'au livre semblant poser problme aux sgml-tools.

  Les diffrents sujets sont d'abord traits de manire gnrale.  Les
  sections suivantes aprofondiront le sujet. (dans l'ordre :
  gnralits, programmation au niveau utilisateur, programmation du
  noyau, enfin le matriel.)  J'ai essay de prsenter d'abord les
  livres les plus utiles, dans la mesure o ils me sont familiers.  Si
  l'un de mes ouvrages est cit en premier, il s'agit d'une concidence
  embarrassante ! (Toute suggestion pour une meilleure organisation
  accepte avec plaisir).  NdT: Vous pouvez trouver les Editions
  O'Reilly en franais  l'adresse suivante : O'Reilly France
  <http://www.ora.com/www/international/france/index.html>


  22..  AApppprroocchhee ggnnrraallee,, hhiissttooiirree eett pprraattiiqquuee..


     TThhee NNeeww HHaacckkeerr''ss DDiiccttiioonnaarryy ((TThhiirrdd EEddiittiioonn))
        Raymond, Eric S.; MIT Press; 1996; ISBN 0-262-68092-0; 547pp.
        Voir  <http://www-mitpress.mit.edu/book-
        home.tcl?isbn=0262680920>.

        Euh, un guide sur la culture internet. A beaucoup de fans. HTML
         : Jargon File Resource Page <http://www.ccil.org> Version
        Franaise : "Le Cyberlexis, dictionnaire du jargon
        informatique", 1997,Edition Masson, 345FF


     AA QQuuaarrtteerr CCeennttuurryy ooff UUnniixx
        Salus, Peter H.; Addison-Wesley; 1994; ISBN 0-201-54777-5;
        256pp.
        Voir  <http://www.awl.com/cp/authors/salus/unix/unix.html>

        Linux fait partie de la tradition Unix. Ce livre retrace
        l'histoire d'Unix vu par ses utilisateurs (origine, volution,
        expansion).


     TThhee MMyytthhiiccaall MMaann MMoonntthh ((AAnnnniivveerrssaarryy EEddiittiioonn))
        Brooks, Frederick P.; Addison-Wesley 1995 (ISBN 0-201-83595-9).
        Voir  <http://cseng.aw.com>.

        Le seul livre sur la programmation qui devrait tre lu par tout
        le monde.  Alan Cox : "Je ne recommande pas ce livre pour sa
        valeur technique mais plus pour le ralisme et le bon sens des
        projets proposs." JH : "Ah oui. Qu'est-ce que a aurait t si
        on avait donn  Linus 200 programmeurs et si on lui avait
        demand de fournir Linux en 3 mois !" Version franaise : "Le
        Mythe du mois-homme" 1996, Edition Inter. Thomson, 240FF.


     BBeellll SSyysstteemm TTeecchhnniiccaall JJoouurrnnaall,, JJuullyy--AAuugguusstt 11997788,, VVooll.. 5577,, NNoo.. 66,,
        ppaarrtt 22
        AT&T; 416 pp.

        Plusieurs articles sur les dbuts d'Unix, notamment : Ritchie &
        Thompson, "The UNIX Time Sharing System"; Thompson, "UNIX
        Implementation"; Richie, "A Retrospective"; Bourne, "The UNIX
        Shell"...


  33..  LLiivvrreess ssuurr lleess ggnnrraalliittss UUNNIIXX//LLIINNUUXX



  33..11..  IInnssttaallllaattiioonn eett aaddmmiinniissttrraattiioonn ddee LLiinnuuxx


     LLiinnuuxx IInnssttaallllaattiioonn aanndd GGeettttiinngg SSttaarrtteedd
        Welsh, Matt; LDP; 1997. Disponible sur la page d'accueil du LDP,
        ou directement  :  <http://sunsite.unc.edu/LDP/LDP/gs/gs.html>.

        On y trouve comment installer Linux, l'explication des bases de
        Linux, ainsi qu'une initiation  l'administration systme.


     LLiinnuuxx SSyysstteemm AAddmmiinniissttrraattoorr''ss GGuuiiddee
        Wirzenius, Lars; LDP; 1997. Disponible sur la page d'accueil du
        LDP, ou directement  :  <http://sunsite.unc.edu/LDP/LDP/sag>.

        Un excellent livre pour dbuter. On y trouve comment entretenir
        et administrer un systme Linux.


     EEsssseennttiiaall SSyysstteemm AAddmmiinniissttrraattiioonn ((SSeeccoonndd EEddiittiioonn))
        Frisch, Aeleen; O'Reilly; 1995; ISBN 0-937175-80-3; 788 pp;
        $32.95.
        Voir  <http://www.ora.com/catalog/esa2/noframes.html>.

        Une exploration plus en profondeur des tches normales
        d'administration systme. Ce n'est pas un livre exclusivement
        sur Linux mais il contient des infos sur le matriel.
        Version franaise de ce livre : Les bases de l'administration
        systme.  ISBN : 2-84177-008-7; 768 pages, 320 francs.



  33..22..  UUttiilliisseerr UUnniixx && LLiinnuuxx


     LLiinnuuxx iinn aa NNuuttsshheellll
        Hekman, Jessica P. et al.; O'Reilly; 1997; ISBN 1-56592-167-4;
        438 pp. $9.95.
        Voir  <http://www.ora.com/catalog/linuxnut/noframes.html>.

        D'aprs "The Desktop Reference for Linux" de O'Reilly.  Pour les
        utilisateurs de Linux, cet ouvrage rend obsolte l'dition "Unix
        in a Nutshell" qui tait oriente stations SVR4/Solaris.


     RRuunnnniinngg LLiinnuuxx ((SSeeccoonndd EEddiittiioonn))
        Welsh, Matt, & Kaufman, Lar; O'Reilly; ISBN 1-56592-151-8; 1996;
        650pp; $24.95.
        Voir  <http://www.ora.com/catalog/runux2/noframes.html>.

        Tout ce que vous avez besoin pour comprendre, installer et
        utiliser le systme Linux. Excellent livre pour dbutants.
        Version franaise : "Linux mode d'emploi" 1996, Edition Sybex,
        436p, 79FF.



  33..33..  SSccuurriitt dduu ssyyssttmmee


     PPrraaccttiiccaall UUnniixx SSeeccuurriittyy
        Garfinkel, Simpson, and Spafford, Gene; O'Reilly Associates;
        ISBN 0-56592-148-8; 1991.
        Voir  <http://www.ora.com/catalog/puis/noframes.html>.

        Ronald P. Miller : "Quelques reprises du livre "Essential System
        Admin", mais globalement bien fait sur la scurit, et
        spcialement pour ceux qui veulent crer un serveur sous Linux
        accessible par de multiples utilisateurs via le net."


     FFiirreewwaallllss && IInntteerrnneett SSeeccuurriittyy
        Cheswick, William R. & Bellovin, Steven M.; Addison-Wesley;
        1994; ISBN 0-201-63357-4; 320pp.
        Voir  <http://cseng.aw.com/>.  Il existe un livre "Firewalls :
        la scurit sur Internet" en franais mais qui n'a rien  voir
        avec l'dition anglaise.
  44..  LLiivvrreess ssuurr lleess sshheellll,, lleess llaannggaaggeess ddee ccoommmmaannddeess,, llaa pprrooggrraammmmaattiioonn
  WWeebb


     PPrrooggrraammmmiinngg PPeerrll ((SSeeccoonndd EEddiittiioonn))
        Wall, Larry & Christiansen, Tom & Schwartz, Randal; O'Reilly;
        1997; ISBN 0-56592-149-6; 644pp.
        Voir  <http://www.ora.com/catalog/pperl2/noframes.html>.

        Le Shell est mort (non seulement pour son langage de
        programmation mais aussi pour son criture archaque), Vive
        Perl !  C'est la seconde dition du livre sur Perl, bien mieux
        organise que la premire et elle intgre Perl 5.
        Version franaise : "Programmation en Perl 2e dition" ISBN :
        2-84177-004-4, 710 pages, 280 francs.


     PPrrooggrraammmmiinngg PPyytthhoonn
        Lutz, Mark; O'Reilly; 1997; ISBN 0-56592-197-6; 880pp.
        Voir  <http://www.ora.com/catalog/python/noframes.html>.

        Etape suivante aprs Perl. Belle prsentation de Python, avec
        une meilleure intgration de C, il est plus adapt aux projets
        d'envergure.


     HHTTMMLL :: TThhee DDeeffiinniittiivvee GGuuiiddee ((22nndd EEddiittiioonn))
        Musciano, Chuck & Kennedy. Bill; O'Reilly; 1997; ISBN
        0-56592-235-2; 552pp.
        Voir  <http://www.ora.com/catalog/html2/noframes.html>.

        Le meilleur guide de rfrence que je connaisse, et le seul
        livre sur le HTML dont vous ayez besoin  moins de vouloir
        utiliser le CGI (Common Gateway Interface).


     TThhee UUnniixx PPrrooggrraammmmiinngg EEnnvviirroonnmmeenntt
        Kernighan, Brian, and Pike, Rob; Prentice-Hall; 1984; ISBN
        0-13-937681-X; 1984.

        Un pur classic, sans doute la meilleure prsentation en un seul
        volume de la philosophie UNIX.
        Version franaise : "L'environnement de programmation UNIX"
        1986, International Edition, 376p, 259FF.


  55..  LLiivvrreess ssuurr lleess ddiitteeuurrss ddee tteexxttee


  55..11..  TTeeXX eett LLaaTTeeXX



     TThhee LLaaTTeeXX CCoommppaanniioonn
        Goossens, Michael & Mittlebach, Frank, & Samarin, Alexander;
        Addison-Wesley; 1994; ISBN 0-201-54199-8; 530pp.
        Voir  <http://cseng.aw.com/>.

        Si vous tes un des utilisateurs voulant savoir comment LaTeX
        peut vous aider  crer les plus beaux documents sans devenir un
        expert, alors ce guide est pour vous (tir de la prface).
        Bruce Thompson ajoute : "Un trs joli livre qui vous donne
        beaucoup d'infos sur les nouvelles extensions  LaTeX avec un
        large choix d'exemples vous montrant comment effectuer la mise
        en forme de vos documents."

     LLaaTTeeXX:: AA DDooccuummeenntt PPrreeppaarraattiioonn SSyysstteemm ((SSeeccoonndd EEddiittiioonn))
        Lamport, Leslie; Addison-Wesley; 1994; ISBN 0-201-52983-1;
        256pp.
        Voir  <http://cseng.aw.com/>.

        Bruce Thompson : "Le top des rfrences sur LaTeX 2.09 par son
        auteur. Une nouvelle dition couvrant LaTeX2e est en prparation
        (cette version est incluse dans la distribution TeX/LaTeX).
        LaTeX 2.09 est compatible 100% avec LaTeX2e. Un Must pour
        quiconque veut utiliser LaTeX. Il donne une introduction simple
        sur la prparation de document et les diffrents outils pour les
        produire avec une qualit professionnelle.  De nombreux
        exemples."



     TThhee TTeeXXbbooookk,, VVoolluummee AA ooff CCoommppuutteerrss aanndd TTyyppeesseettttiinngg
        Knuth, Donald A.; Addison-Wesley; 1986, ISBN 0-201-13448; 496pp.
        Voir  <http://cseng.aw.com/>

        Bruce Thompson : "Le Livre d'Or de TeX (comprenant manuel
        d'utilisateur et livre de rfrence). Vous n'en aurez
        probablement jamais besoin pour utiliser TeX de manire normale,
        mais il reste toutefois un livre fascinant." Je rajouterais que
        ce livre ne s'adresse pas aux nophytes,  rserver aux experts
        de TeX.


     TThhee MMEETTAAFFOONNTT bbooookk,, VVoolluummee CC ooff CCoommppuutteerrss aanndd TTyyppeesseettttiinngg
        Knuth, Donald A.; Addison-Wesley; 1986; 0-201-13444-6, 1986;
        384pp.
        Voir  <http://cseng.aw.com/>

        Bruce Thompson : "Le guide dfinitif et complet sur METAFONT,
        une extension de TeX pour la cration de polices de caractres.
        Un excellent ouvrage si vous projetez de crer vos propres
        polices pour TeX et LaTeX. METAFONT est inclus avec la
        distribution normale de TeX/LaTeX." Ce livre n'est vraiment pas
        (mais alors pas du tout !) pour les nophytes, pro only !



  66..  LLiivvrreess ssuurr llaa pprrooggrraammmmaattiioonn eenn CC eett CC++++


  66..11..  CC eett CC++++


     TThhee CC PPrrooggrraammmmiinngg LLaanngguuaaggee ((SSeeccoonndd EEddiittiioonn))
        Kernighan, Brian W.; Ritchie, Dennis M; Prentice-Hall; 1988;
        ISBN 0-13-110362-8, 272pp.

        Une seconde dition amliore et inspire du livre dit par le
        crateur du C "K & R", incluant ANSI C. Toujours le meilleur !
        Version franaise : "Le langage C norme ANSI" seconde dition,
        1997, Edition Masson, 296p, 195FF.


     WWhhoo''ss AAffrraaiidd ooff CC++++ ??
        Heller, Steve; Academic Press; 1996; ISBN 0-12-339097; 508pp.

        Le meilleur livre d'initiation sur la programmation en C++ que
        je connaisse.



  66..22..  LL''iinntteerrffaaccee ddeess aappppeellss ssyyssttmmeess eenn CC


     PPOOSSIIXX PPrrooggrraammmmeerr''ss GGuuiiddee :: WWrriittiinngg PPoorrttaabbllee UUnniixx PPrrooggrraammss
        Lewine, Donald; O'Reilly; 1992; ISBN 0-937175-73-0; 607pp.
        Voir  <http://www.ora.com/catalog/posix/noframes.html>.

        Une excellente rfrence pour tout programmeur sous POSIX.1.  Je
        prfre ce titre  celui choisi par JH.


     TThhee PPoossiixx..11 SSttaannddaarrdd :: AA PPrrooggrraammmmeerr''ss GGuuiiddee
        Zlotnick, Fred; Benjamin Cummings; 1991; ISBN 0-8053-9605-5;
        379pp.; $35.95 (USA).

        JH : "Une fois je me suis plaint de l'absence de pages man pour
        la section 2.  Quelqu'un m'a aussitt dit de me procurer un
        livre sur POSIX, qui refltait bien le sujet de cette section
        sous Linux. J'aime bien cet ouvrage parce que je ne suis pas un
        programmeur professionnel et que son auteur donne beaucoup
        d'explications et d'exemples."


  77..  LLiivvrreess ssuurr llee rrsseeaauu



     UUnniixx NNeettwwoorrkk PPrrooggrraammmmiinngg
        Stevens, W. Richard; Prentice Hall; 1990; ISBN 0-13-949876-1;
        772 pp.; $54 (USA).

        Tout ce que vous voulez savoir sur ce sujet et mme srement au
        del (vraiment, XNS!?). Bien qu'il soit antrieur au web, il
        constitue une rfrence pour ses bases.


     LLiinnuuxx NNeettwwoorrkk AAddmmiinniissttrraattoorr''ss GGuuiiddee
        Kirch, Olaf; O'Reilly; 1995; ISBN 1-56592-087-2; 335pp.
        Voir  <http://www.ora.com/catalog/linag/noframes.html>.

        Un guide pratique sur le protocole TCP/IP et autres outils
        associs sous Linux.  Accessible galement sur la page du Linux
        Documentation Project   <http://sunsite.unc.edu/LDP/>, ou
        directement   <http://sunsite.unc.edu/LDP/LDP/nag/nag.html>.
        Version franaise : "Administration rseaux sous Linux" 1995,
        Edition O'Reilly, 336p, 220FF.


     TTCCPP//IIPP NNeettwwoorrkk AAddmmiinniissttrraattiioonn
        Hunt, Craig; O'Reilly Associates, ISBN 0-937175-82-X; 1992;
        472pp.
        Voir  <http://www.ora.com/catalog/tcp2/noframes.html>.

        Moins spcifique  Linux que le livre de Kirch. Dveloppe le
        TCP/IP en profondeur, incluant le routage et BGP.  Version
        franaise : "Administration de rseaux" 1995, Edition Eddison
        Wesley, 576p, 348FF.


     DDNNSS aanndd BBIINNDD ((SSeeccoonndd EEddiittiioonn))
        Albitz, Paul, and Liu, Cricket; O'Reilly; 1996; ISBN
        1-56592-236-0; 1992; 438pp; $32.95.
        Voir  <http://www.ora.com/catalog/dns2/noframes.html>.

        Explique en profondeur le DNS, utile pour les personnes
        utilisant des installations sophistiques en rseau reli au
        net. Couvre aussi la programmation des librairies BIND.


     SSeennddmmaaiill ((SSeeccoonndd EEddiittiioonn))
        Costales, Bryan & Allman, Eric; O'Reilly; ISBN 1-56592-222-0;
        1997; 1050 pp; $32.95
        Voir  <http://www.ora.com/catalog/sendmail2/noframes.html>.

        Un guide complet sur l'outil de courrier install par dfaut sur
        UNIX et LINUX.


  88..  LLiivvrreess ssuurr ll''iimmppllmmeennttaattiioonn dduu nnooyyaauu ssoouuss UUnniixx


  88..11..  AAnnccttrreess ddee LLiinnuuxx


     TThhee DDeessiiggnn ooff tthhee UUnniixx OOppeerraattiinngg SSyysstteemm
        Bach, Maurice J.; Prentice-Hall; ISBN 0-13-201799-7; 470pp.; $60
        (USA).

        Le livre qui a permis  Linus de dbuter.
        Version franaise : "Conception du systme UNIX" 1989, Edition
        Masson, 512p, 459FF.


     OOppeerraattiinngg SSyysstteemmss,, DDeessiiggnn aanndd IImmpplleemmeennttaattiioonn;;
        Tanenbaum, Andrew S.; Prentice-Hall; 1987.

        Un livre apprci d'Alan Cox (un des concepteurs du noyau).
        Tanenbaum a conu Minix que Linus a remodel pour en faire
        Linux.
        Version franaise : "Systme d'exploitation, systmes
        centraliss, systmes distribus" 1994, International Edition,
        848p, 357FF.


  88..22..  LLiinnuuxx


     LLiinnuuxx KKeerrnneell HHaacckkeerrss'' GGuuiiddee
        Johnston, Michael K.

        Disponible sur le Web  la page du Linux Documentation Project
        <http://sunsite.unc.edu/LDP/> ou directement 
        <http://www.redhat.com:8080/HyperNews/get/khg.html>.


     LLIINNUUXX KKeerrnneell IInntteerrnnaallss
        Beck, Michael & Bohme, Harold & Mirko, Dziadzka & Kunitz, Ulrich
        & Magnus, Robert & Verworner, Dick; Addison Wesley; 1996; ISBN :
        0-201-87741-4; 480pp.
        Voir  <http://cseng.aw.com/>.

        Un manuel sur la programmation du noyau sous Linux 1.2,
        lgrement prim.


  88..33..  RReellaattiiffss  LLiinnuuxx


     TThhee DDeessiiggnn aanndd IImmpplleemmeennttaattiioonn ooff tthhee 44..44BBSSDD UUnniixx OOppeerraattiinngg SSyysstteemm
        McKusick, Marshall Kirk, Bostic, Keith, Karels, Michael J., and
        Quarterman, John S.; Addison-Wesley; 1996; ISBN 0-201-54979-4;
        608pp.
        Voir  <http://cseng.aw.com/>.

        Le successeur de l'ouvrage sur l'implmentation du noyau de BSD
        4.3, qui a influenc le concept de Linux (spcialement pour les
        sockets et travail sur internet).  Ce livre couvre les bases de
        BSD 4.4 pour BSD/OS, FreeBSD et NetBSD.


     PPoorrttiinngg UUnniixx ttoo tthhee 338866
        Jolitz, William F., and Jolitz, Lynne G.; Dr. Dobb's Journal;
        Jan 1991-July 1992.


  99..  LLiivvrreess ssuurr ll''aarrcchhiitteeccttuurree eett llaa pprrooggrraammmmaattiioonn ddeess pprroocceesssseeuurrss
  IInntteell


     8800338866 PPrrooggrraammmmeerr''ss RReeffeerreennccee MMaannuuaall
        Intel Corp.; ISBN 1-55512-022-9; 1986.

        1re partie : Programmation des applications, les types de
        donnes, Les modles d'adressage, mode d'emploi.  2me partie :
        Programmation des systmes, architecture, gestion de la mmoire,
        protection, multi-taches, Entre/Sortie, exceptions et
        interruptions, initialisation, co-processeur et multi-
        processeur.  3me partie : Compatibilit avec les machines plus
        anciennes x86.  4me partie : Manuel des instructions.


     8800338866 SSyysstteemm SSooffttwwaarree WWrriitteerr''ss GGuuiiddee
        Intel Corp.; ISBN 1-55512-023-7; 1987.

        Ce livre explique les caractristiques du 386 pour les
        programmeurs de systme d'exploitation.  Il contient un chapitre
        sur l'implmentation d'Unix. Beaucoup d'architectures bases sur
        le 80386 semblent avoir t prvues avec Multics, les
        caractristiques ne sont pas compatibles avec DOS et UNIX.


     PPrrooggrraammmmiinngg tthhee 8800338866
        Crawford, John H & Gelsinger, Patrick P.; Sybex; ISBN
        0-89588-381-3; 774pp.; $26.95 (USA).

        Les Jolitz ont utilis ce livre pour adapter le BSD sur
        l'architecture 386.


     PPeennttiiuumm PPrroocceessssoorr UUsseerr''ss MMaannuuaall :: VVoolluummee 33,, AArrcchhiitteeccttuurree aanndd PPrroo
        ggrraammmmiinngg
        Manual" Intel Corp.; 1993; ISBN 1-55512-195-0;

        A peu de choses prs la version Pentium du manuel de rfrence
        list ci-dessus.


  1100..  LLiivvrreess ssuurr llee mmaattrriieell PPCC

  Note : ces livres ont quatre ou cinq ans et sont probablement
  dpasss. Le matriel n'est pas ma tasse de th...


     8800338866 HHaarrddwwaarree RReeffeerreennccee MMaannuuaall
        Intel Corp.; 1986; ISBN 1-55512-024-5;

        Connections des pin, synchronisation, type d'ondulation,
        diagrammes de bloc, voltages, toutes ces sortes de choses.
     TThhee IInnddiissppeennssaabbllee PPCC HHaarrddwwaarree BBooookk
        Messmer, Hans-Peter; Addison-Wesley; 1993; ISBN 0-201-62424-9;
        1000 pp.

        JH : "Couvre les plus rcentes technologies comme les bus EIDE
        et PCI."


  1111..  AAssppeeccttss aaddmmiinniissttrraattiiffss


  1111..11..  CCoonnddiittiioonnss dd''uuttiilliissaattiioonnss

  Ce document est copyright 1997 par Eric S. Raymond. Vous pouvez
  l'utiliser, le diffuser et le reproduire librement pour autant que
  vous :


    Ne supprimiez ou modifiez pas cette notice de copyright.

    Ne supprimiez ou modifiez pas le numro de version et la date.

    Ne supprimiez ou modifiez pas le lien vers la version actuelle sur
     le Web.

    Marquiez clairement toute version condense ou altre comme telle.

  Ces restrictions visent  protger les lecteurs potentiels de versions
  dpasses ou dformes. Si vous pensez avoir un motif justifiant une
  exception, contactez-moi.


  1111..22..  HHiissttoorriiqquuee

  Ceci tait  l'origine un mini-HOWTO gr par Jim Haynes. J'en ai
  chang un peu la teneur, essayant d'en faire un document plus autonome
  et moins dpendant des divers articles bibliographiques de USENET. Les
  minicommentaires non attribus sont plutt les miens que les siens.
  Les rajouts pour la version franaise n'ont rien  voir avec celle
  d'origine.


























  Recettes pour le HOWTO Root RAID
  Michael         A.         Robinton,         michael@bzs.org
  <mailto:michael@bzs.org>, traduit par Olivier Tharan,  <tha-
  ran@int-evry.fr>
  v1.06, 12 fevrier 1998

  Ce  document  fournit  quelques  recettes  pour  creer  un  systeme de
  fichiers RAID monte a la racine et le  systeme  de  secours  utilisant
  initrd qui l'accompagne. Il y a des instructions completes, pas a pas,
  pour le peripherique md0 en RAID 1. Chaque etape  est  accompagnee  de
  l'explication  de  son  but.  Cette  procedure peut etre utilisee pour
  toutes les autres structures RAID avec des modifications mineures.

  11..  IInnttrroodduuccttiioonn

  Nous supposerons que le lecteur est familier  avec  les  divers  types
  d'implementation  RAID,  leurs  avantages et inconvenients. Ceci n'est
  pas un guide, juste une serie d'instructions sur la maniere de  mettre
  en  place  du  RAID sur la partition montee a la racine sur un systeme
  Linux. Toutes les informations necessaires a une familiarisation  avec
  RAID  sous  Linux  sont  listees  ici  directement  ou par reference ;
  veuillez les lire avant d'envoyer des questions par e-mail.

  11..11..  OOuu ttrroouuvveerr uunnee ccooppiiee aa jjoouurr ddee ccee ddooccuummeenntt..

  Root-RAID-HOWTO

  Disponible en LaTeX (pour le DVI et le PostScript), texte pur et HTML.

       sunsite.unc.edu/mdw/HOWTO/                      <http://sun-
       site.unc.edu/mdw/HOWTO/>

  Disponible en SGML et HTML.

       ftp.bizsystems.com/pub/raid/              <ftp://ftp.bizsys-
       tems.com/pub/raid/>

  11..22..  BBoogguueess

  Au  moment d'ecrire ce document, le probleme qui consiste a arreter un
  peripherique RAID monte a la racine  n'a  pas  encore  ete  resolu  de
  maniere  satisfaisante.  Une solution de contournement proposee par Ed
  Welbon et implementee par Bohumil Chalupa est incluse dans ce document
  et  elimine  le  besoin de faire un ckraid qui prend du temps a chaque
  demarrage pour  des  peripheriques  RAID  1  et  RAID  5.  Sans  cette
  solution,  il est necessaire de faire un cckkrraaiidd sur le peripherique mmdd
  a chaque fois que le systeme est redemarre.  Sur  une  grande  matrice
  ceci  peut entrainer une degradation importante de la performance pour
  la disponibilite du systeme. Sur mon  peripherique  RAID  1  de  6  Go
  tournant  sur  un Pentium 166 avec 128 Mo de RAM, il faut au moins une
  demi-heure pour faire le ckraid :-( apres chaque redemarrage.

  La solution de contournement stocke l'etat de la matrice au moment  de
  l'extinction  sur le peripherique de demarrage rreeeell et le compare a un
  etat de reference place la a la premiere construction du  systeme.  Si
  les  etats  concordent au redemarrage, le superblock de la matrice est
  reconstruit, sinon l'administrateur est averti de l'erreur  d'etat  et
  le  systeme  de  secours  reste en fonctionnement avec tous les outils
  RAID disponibles.

  La reconstruction du superblock permet au  systeme  d'ignorer  que  la
  matrice  a  ete  eteinte sans mdstop en marquant tous les disques d'un
  OOKK, comme si rien ne s'etait passe. Ceci ne fonctionne que si tous les
  disques  sont  OK  a  l'extinction. Si la matrice fonctionnait avec un
  disque  defectueux,  l'administrateur  devrait   enlever   le   disque
  defectueux  avant  de  redemarrer  le  peripherique  md ou des donnees
  pourraient etre corrompues.

  Ceci ne s'applique pas pour RAID 0 qui  n'a  pas  besoin  d'un  mdstop
  avant l'extinction.

  Des  solutions  finales  proposees  pour  ce  probleme  comprennent un
  ffiinnaallrrdd similaire a iinniittrrdd, et un mmddrroooottssttoopp qui  ecrit  les  drapeaux
  cclleeaann  (propre)  sur  la matrice pendant l'extinction quand la matrice
  est montee en lecture seule. Je suis sur qu'il y en a d'autres.

  Pendant ce temps, le probleme a ete contourne pour l'instant. Veuillez
  me  tenir  au  courant  quand  ce probleme sera resolu de maniere plus
  propre !

  11..33..  RReemmeerrcciieemmeennttss

  Les ecrits et courriers electroniques des  personnes  suivantes  m'ont
  aides  a  realiser  ce  document.  Beaucoup  d'idees ont ete _v_o_l_e_e_s du
  travail utile d'autres personnes, j'ai simplement essaye de les mettre
  sous  forme  de  RREECCEETTTTEESS pour qu'elles soient rapides a utiliser. Mes
  remerciements a :

  +o  Linas Vepstas <mailto:linas@linas.org>
      _p_o_u_r _l_e _H_o_w_t_o _R_A_I_D _q_u_i _m_'_a _e_x_p_l_i_q_u_e _l_a _p_l_u_p_a_r_t _d_e_s _c_h_o_s_e_s _i_c_i_.

  +o  Gadi Oxman <mailto:gadio@netvision.net.il>
      _p_o_u_r _a_v_o_i_r _r_e_p_o_n_d_u _a _m_e_s _q_u_e_s_t_i_o_n_s _i_d_i_o_t_e_s _d_e _"_b_l_e_u_"_.

  +o  Ed Welbon <mailto:welbon@bga.com>
      _p_o_u_r _l_'_e_x_c_e_l_l_e_n_t _p_a_q_u_e_t_a_g_e iinniittrrdd..mmdd  qui  m'a  inspire  a  ecrire
     ceci.

  +o  Bohumil   Chalupa  <mailto:bochal@apollo.karlov.mff.cuni.cz>   _p_o_u_r
     _a_v_o_i_r _i_m_p_l_e_m_e_n_t_e _l_a _"_s_o_l_u_t_i_o_n _d_e _c_o_n_t_o_u_r_n_e_m_e_n_t_" _d_u _r_e_d_e_m_a_r_r_a_g_e  _q_u_i
     _p_e_r_m_e_t  _a  _d_u  RRAAIIDD  mmoonnttee  ssuurr  llaa  rraacciinnee  _d_e _f_o_n_c_t_i_o_n_n_e_r _d_a_n_s _u_n
     _e_n_v_i_r_o_n_n_e_m_e_n_t _d_e _p_r_o_d_u_c_t_i_o_n_.

  +o  et bien d'autres qui ont contribue a  ce  travail  d'une  facon  ou
     d'une autre.

  11..44..  NNoottee ddee ccooppyyrriigghhtt

  Ce  document  est  GNU  copyleft  par Michael Robinton michael@bzs.org
  <mailto:michael@bzs.org>.

  La  permission  d'utiliser,  copier,  distribuer  ce   document   pour
  n'importe  quelle  raison est accordee par la presente, a la condition
  que le nom de l'auteur / editeur apparaisse  dans  toutes  les  copies
  et/ou documents accompagnateurs ; et que toute version non modifiee de
  ce document soit disponible librement. Ce document est distribue  dans
  l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, ni explicite, ni
  implicite. Bien que tous les efforts aient ete faits pour s'assurer de
  la  precision  des  informations documentees ici, l'auteur / editeur /
  mainteneur ne prend AUCUNE RESPONSABILITE sur  toute  erreur  ou  pour
  tout  dommage,  direct ou en decoulant, resultant de l'utilisation des
  informations documentees ici.

  22..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn AAVVAANNTT DDEE CCOOMMMMEENNCCEERR

  Les paquetages dont vous avez besoin et la  documentation  qui  repond
  aux  questions  les  plus  frequentes sur la maniere d'installer et de
  faire fonctionner RAID sont listes ci-dessous. Veuillez les  consulter
  en detail.

  22..11..  PPaaqquueettaaggeess nneecceessssaaiirreess

  Vous devez obtenir les versions les plus recentes de ces paquetages :

  +o  un noyau Linux qui supporte RAID, initrd et /dev/loopx

       J'ai         utilise         linux-2.0.32        <ftp://sun-
       site.unc.edu/pub/Linux/kernel/> de sunsite

  +o  raid145-971022-2.0.31
     <ftp://ftp.kernel.org/pub/linux/daemons/raid/>  patch qui ajoute le
     support pour RAID 1/4/5

  +o  raidtools-pre3-0.42  <ftp://ftp.kernel.org/pub/linux/daemons/raid/>
     outils  pour creer et maintenir des peripheriques RAID (et aussi de
     la documentation).

  +o  linuxthreads-0.71
     <ftp://ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy>  paquetage
     threads obligatoire. Utilisez FTP, les navigateurs ne  fonctionnent
     pas.

  +o  Une distribution Linux, prete a installer.

       J'ai  utilise  Slackware-3.4 <ftp://ftp.cdrom.com/pub/linux>
       disponible partout.

  Les instructions  detaillees  de  ce  document  sont  basees  sur  les
  paquetages  ci-dessus. Si les paquetages ont ete mis a jour ou si vous
  utilisez une distribution  Linux  differente,  vous  devrez  peut-etre
  modifier les procedures que vous trouverez ici.

  Les  patches,  assortiments  d'outils,  etc.  peuvent  varier avec les
  noyaux 2.1. Veuillez verifier la documentation la plus recente a :

       ftp.kernel.org/pub/linux/daemons/raid/       <ftp://ftp.ker-
       nel.org/pub/linux/daemons/raid/>

  22..22..  AAuuttrreess iimmpplleemmeennttaattiioonnss ssiimmiillaaiirreess..

  J'ai  choisi  d'inclure dans le noyau tous les morceaux necessaires au
  fonctionnement des le demarrage sans charger aucun module. L'image  de
  mon noyau fait un peu plus de 300 Ko compressee.

  Jetez    un    coup    d'oeil    a    iinniittrrdd..mmdd..ttaarr..ggzz   d'Ed   Welbon
  <mailto:welbon@bga.com>  pour  un  autre   moyen   de   fabriquer   un
  peripherique  RAID sur lequel on peut demarrer. Il utilise des modules
  chargeables. Un coup d'oeil a ses scripts concis vous montrera comment
  il  s'y  prend  si  vous  avez  besoin  d'un noyau tres petit avec des
  modules.

  http://www.realtime.net/~welbon/initrd.md.tar.gz
  <http://www.realtime.net/~welbon/initrd.md.tar.gz>

  22..33..  DDooccuummeennttaattiioonn ---- lleeccttuurreess rreeccoommmmaannddeeeess

  VVeeuuiilllleezz lliirree ::

       //uussrr//ssrrcc//lliinnuuxx//DDooccuummeennttaattiioonn//iinniittrrdd..ttxxtt

  ainsi  que  la  documentation  et les pages de manuel qui accompagnent
  l'ensemble raidtools. En particulier, lisez mmaann  mmddaadddd  ainsi  que  le
  document QQuuiicckkSSttaarrtt..RRAAIIDD inclus dans le paquetage raidtools.

  22..44..  RReessssoouurrcceess ssuurr RRAAIIDD

  +o  sunsite.unc.edu/mdw/HOWTO/mini/Software-RAID
     <http://sunsite.unc.edu/mdw/HOWTO/mini/Software-RAID>

  +o  www.ssc.com/lg/issue17/raid.html
     <http://www.ssc.com/lg/issue17/raid.html>

  +o  linas.org/linux/raid.html <http://linas.org/linux/raid.html>

  +o  ftp.kernel.org/pub/linux/daemons/raid/
     <ftp://ftp.kernel.org/pub/linux/daemons/raid/>

  +o  www.realtime.net/~welbon/initrd.md.tar.gz
     <http://www.realtime.net/~welbon/initrd.md.tar.gz>

  +o  luthien.nuclecu.unam.mx/~miguel/raid/
     <http://luthien.nuclecu.unam.mx/~miguel/raid/>

     Vous pouvez joindre des listes de distribution a :

  +o  majordomo@nuclecu.unam.mx        <mailto:majordomo@nuclecu.unam.mx>
     _e_n_v_o_y_e_z _u_n _m_e_s_s_a_g_e _a ssuubbssccrriibbee rraaiiddddeevv

     envoyez     le     courrier     a     :     raiddev@nuclecu.unam.mx
     <mailto:raiddev@nuclecu.unam.mx>

  +o  majordomo@vger.rutgers.edu      <mailto:majordomo@vger.rutgers.edu>
     _e_n_v_o_y_e_z _u_n _m_e_s_s_a_g_e _a ssuubbssccrriibbee lliinnuuxx--rraaiidd

     envoyez  le courrier a : linux-raid@vger.rutgers.edu <mailto:linux-
     raid@vger.rutgers.edu> _(_c_e_c_i _s_e_m_b_l_e _e_t_r_e _l_a _l_i_s_t_e _l_a _p_l_u_s _a_c_t_i_v_e_)

  33..  _i_n_i_t_r_d : recette pour du RAID monte sur la racine

  Voici la procedure pour creer un disque RAM  (ramdisk)  'initrd'  avec
  des outils de secours pour le RAID.

  Specifiquement,  ce  document se rapporte a une implementation RAID 1,
  cependant il est applicable  de  maniere  generale  a  n'importe  quel
  arrangement RAID avec un peripherique RAID monte a la racine.

  33..11..  RRaappppeell ddee sseeccuurriittee

  Le  systeme  de  fichiers  de  secours  peut  etre  utilise seul. S'il
  arrivait que votre matrice RAID  ne  puisse  etre  montee,  vous  etes
  reduit  a  utiliser  le systeme de secours monte et en fonctionnement.
  PRENEZ LES PRECAUTIONS DE SECURITE APPROPRIEES !

  33..22..  CCoonnssttrruuccttiioonn dduu nnooyyaauu eett ddeess oouuttiillss RRAAIIDD

  La premiere chose a faire est de patcher et de construire votre  noyau
  et  de  devenir  familier  avec les outils RAID. Configurez, montez et
  testez votre (vos) peripherique(s) RAID. Les details sur la maniere de
  proceder  sont  inclus dans le paquetage rraaiiddttoooollss et revus en details
  plus loin dans ce document.

  33..33..  ddeemmaarrrraaggee CCoonnssttrruuccttiioonn dduu ssyysstteemmee ddee ffiicchhiieerr _i_n_i_t_r_d  de  secours
  et de

  J'ai utilise la distribution SSllaacckkwwaarree--33..44 pour construire a  la  fois
  le  systeme de fichiers de secours/demarrage et le systeme de fichiers
  de la machine  de  production.  N'importe  quelle  distribution  Linux
  devrait  fonctionner  correctement.  Si vous utilisez une distribution
  differente,  relisez  la  partie  de  cette  procedure  specifique   a
  Slackware et modifiez-la pour l'adapter a vos besoins.

  Vous pouvez charger la distribution Slackware a partir de :

       ftp.cdrom.com/pub/linux/ <ftp://ftp.cdrom.com/pub/linux/>

  Si  vous disposez deja de Slackware, vous n'avez besoin de charger que
  les nouveaux ensembles 'a', 'ap' et 'n'.

  J'utilise Loadlin pour lancer l'image  du  noyau  et  un  disque  xRAM
  (ramdisk)  a  partir  d'une  partition  DOS.  J'ai  choisi de creer un
  systeme de disque RAM minimal en utilisant  le  script  d'installation
  sur  mon  disque  en  RAM.  J'ai  utilise une procedure iiddeennttiiqquuee pour
  construire le systeme de production. Par consequent  les  systemes  de
  secours et de production sont tres similaires.

  Ce processus d'installation me donne un systeme 'nu' (sauvez une copie
  du fichier) sur lequel j'ajoute

          /lib/modules/2.x.x......
          /etc .... avec un fstab modifie
          /etc/rc.d
          /dev/md*

  a partir de mon systeme en cours pour le personnaliser pour  le  noyau
  et la machine sur lesquels il tourne ou tournera.

  Ceci  rend  le systeme de demarrage et de secours identique au systeme
  qui  fonctionnera  sur  le  peripherique  RAID  monte  a  la   racine,
  simplement  epure un peu, tout en permettant de toujours garder a jour
  les versions de bibliotheques et autres.

  33..44..  DDeebbuutt ddeess iinnssttrruuccttiioonnss ppaass aa ppaass

  A partir du repertoire de demarrage de root (/root) :

          cd /root
          mkdir raidboot
          cd raidboot

  Creez des points de montage sur lesquels travailler

          mkdir mnt
          mkdir mnt2

  Creez un fichier suffisamment grand pour effectuer  l'installation  du
  systeme  de  fichiers.  Il  sera beaucoup plus grand que le systeme de
  fichiers de secours final. J'ai choisi 24 Mo car 16  Mo  ne  suffisent
  pas.

          dd if=/dev/zero of=build bs=1024k count=24

  Associez le fichier a un peripherique de boucle (loopback) et creez un
  systeme de fichiers ext2 sur le fichier :

          losetup /dev/loop0 build
          mke2fs -v -m0 -L initrd /dev/loop0
          mount /dev/loop0 mnt

  33..55..  IInnssttaallllaattiioonn ddee llaa ddiissttrriibbuuttiioonn -- ssppeecciiffiiqquuee aa SSllaacckkwwaarree

  Sautez  la  partie  specifique  a  la  Slackware et allez a la section
  ``suivante''.

  Maintenant qu'un systeme de fichiers vide est cree  et  monte,  lancez
  "setup".

  Specifiez               /root/raidboot/mnt

  pour  la  cible  (''ttaarrggeett'').  La source est celle a partir de laquelle
  vous faites l'installation habituellement. Selectionnez les paquetages
  que  vous desirez installer et continuez mais NNEE LLAANNCCEEZZ PPAASS configure.

  Choisissez le mode 'EXPERT'.

  J'ai choisi les ensembles 'A', 'AP' et  'N'  en  n'installant  que  le
  minimum  pour  faire tourner le systeme plus un editeur auquel je suis
  habitue (vi, jed, joe) qui soit suffisamment petit.

  lqqqqqqqq SELECTING PACKAGES FROM SERIES A (BASE LINUX SYSTEM) qqqqqqqqk
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x   [X] aaa_base  Basic filesystem, shell, and utils - REQUIRED    x x
  x x   [X] bash      GNU bash-1.14.7 shell - REQUIRED                 x x
  x x   [X] devs      Device files found in /dev - REQUIRED            x x
  x x   [X] etc       System config files & utilities - REQUIRED       x x
  x x   [X] shadow    Shadow password suite - REQUIRED                 x x
  x x   [ ] ide       Linux 2.0.30 no SCSI (YOU NEED 1 KERNEL)         x x
  x x   [ ] scsi      Linux 2.0.30 with SCSI (YOU NEED 1 KERNEL)       x x
  x x   [ ] modules   Modular Linux device drivers                     x x
  x x   [ ] scsimods  Loadable SCSI device drivers                     x x
  x x   [X] hdsetup   Slackware setup scripts - REQUIRED               x x
  x x   [ ] lilo      Boots Linux (not UMSDOS), DOS, OS/2, etc.        x x
  x x   [ ] bsdlpr    BSD lpr - printer spooling system                x x
  x x   [ ] loadlin   Boots Linux (UMSDOS too!) from MS-DOS            x x
  x x   [ ] pnp       Plug'n'Play configuration tool                   x x
  x x   [ ] umsprogs  Utilities needed to use the UMSDOS filesystem    x x
  x x   [X] sysvinit  System V-like INIT programs - REQUIRED           x x
  x x   [X] bin       GNU fileutils 3.12, elvis, etc. - REQUIRED       x x
  x x   [X] ldso      Dynamic linker/loader - REQUIRED                 x x
  x x   [ ] ibcs2     Runs SCO/SysVr4 binaries                         x x
  x x   [X] less      A text pager utility - REQUIRED                  x x
  x x   [ ] pcmcia    PCMCIA card services support                     x x
  x x   [ ] getty     Getty_ps 2.0.7e - OPTIONAL                       x x
  x x   [X] gzip      The GNU zip compression - REQUIRED               x x
  x x   [X] ps        Displays process info - REQUIRED                 x x
  x x   [X] aoutlibs  a.out shared libs - RECOMMENDED                  x x
  x x   [X] elflibs   The ELF shared C libraries - REQUIRED            x x
  x x   [X] util      Util-linux utilities - REQUIRED                  x x
  x x   [ ] minicom   Serial transfer and modem comm package           x x
  x x   [ ] cpio      The GNU cpio backup/archiving utility            x x
  x x   [X] e2fsbn    Utilities for the ext2 file system               x x
  x x   [X] find      GNU findutils 4.1                                x x
  x x   [X] grep      GNU grep 2.0                                     x x
  x x   [ ] kbd       Change keyboard mappings                         x x
  x x   [X] gpm       Cut and paste text with your mouse               x x
  x x   [X] sh_utils  GNU sh-utils 1.16 - REQUIRED                     x x
  x x   [X] sysklogd  Logs system and kernel messages                  x x
  x x   [X] tar       GNU tar 1.12 - REQUIRED                          x x
  x x   [ ] tcsh      Extended C shell version 6.07                    x x
  x x   [X] txtutils  GNU textutils-1.22 - REQUIRED                    x x
  x x   [ ] zoneinfo  Configures your time zone                        x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x

  Dans l'ensemble 'AP', je n'utilise que 'JOE' et l'editeur que je pref-
  ere, et 'MC', petit outil utile de gestion de fichiers. Choisissez les
  outils dont vous aurez besoin sur votre systeme.

  lqqqqqqqqq SELECTING PACKAGES FROM SERIES AP (APPLICATIONS) qqqqqqqqqk
  x x     [ ] ispell    The International version of ispell          x x
  x x     [ ] jove      Jonathan's Own Version of Emacs text editor  x x
  x x     [ ] manpgs    More man pages (online documentation)        x x
  x x     [ ] diff      GNU diffutils                                x x
  x x     [ ] sudo      Allow special users limited root access      x x
  x x     [ ] ghostscr  GNU Ghostscript version 3.33                 x x
  x x     [ ] gsfonts1  Ghostscript fonts (part one)                 x x
  x x     [ ] gsfonts2  Ghostscript fonts (part two)                 x x
  x x     [ ] gsfonts3  Ghostscript fonts (part three)               x x
  x x     [ ] jed       JED programmer's editor                      x x
  x x     [X] joe       joe text editor, version 2.8                 x x
  x x     [ ] jpeg      JPEG image compression utilities             x x
  x x     [ ] bc        GNU bc - arbitrary precision math language   x x
  x x     [ ] workbone  a text-based audio CD player                 x x
  x x     [X] mc        The Midnight Commander file manager          x x
  x x     [ ] mt_st     mt ported from BSD - controls tape drive     x x
  x x     [ ] groff     GNU troff document formatting system         x x
  x x     [ ] quota     User disk quota utilities                    x x
  x x     [ ] sc        The 'sc' spreadsheet                         x x
  x x     [ ] texinfo   GNU texinfo documentation system             x x
  x x     [ ] vim       Improved vi clone                            x x
  x x     [ ] ash       A small /bin/sh type shell - 62K             x x
  x x     [ ] zsh       Zsh - a custom *nix shell                    x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x

  Dans l'ensemble 'N' je n'ai pris que TCP/IP. Ceci n'est  pas  vraiment
  necessaire, mais est tres utile et permet d'avoir acces au reseau pen-
  dant un travail de reparation ou de mise a jour avec la matrice RAID a
  la  racine  demontee. TCP/IP contient aussi 'biff' qui est utilise par
  certaines applications de  'A'.  Si  vous  n'installez  pas  'N'  vous
  voudrez quand meme installer le paquetage biff.

  lqqqq SELECTING PACKAGES FROM SERIES N (NETWORK/NEWS/MAIL/UUCP) qqqqqk
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x    [ ] apache    Apache WWW (HTTP) server                      x x
  x x    [ ] procmail  Mail delivery/filtering utility               x x
  x x    [ ] dip       Handles SLIP/CSLIP connections                x x
  x x    [ ] ppp       Point-to-point protocol                       x x
  x x    [ ] mailx     The mailx mailer                              x x
  x x    [X] tcpip     TCP/IP networking programs                    x x
  x x    [ ] bind      Berkeley Internet Name Domain server          x x
  x x    [ ] rdist     Remote file distribution utility              x x
  x x    [ ] lynx      Text-based World Wide Web browser             x x
  x x    [ ] uucp      Taylor UUCP 1.06.1 with HDB && Taylor configs x x
  x x    [ ] elm       Menu-driven user mail program                 x x
  x x    [ ] pine      Pine menu-driven mail program                 x x
  x x    [ ] sendmail  The sendmail mail transport agent             x x
  x x    [ ] metamail  Metamail multimedia mail extensions           x x
  x x    [ ] smailcfg  Extra configuration files for sendmail        x x
  x x    [ ] cnews     Spools and transmits Usenet news              x x
  x x    [ ] inn       InterNetNews news transport system            x x
  x x    [ ] tin       The 'tin' news reader (local or NNTP)         x x
  x x    [ ] trn       'trn' for /var/spool/news                     x x
  x x    [ ] trn-nntp  'trn' for NNTP (install 1 'trn' maximum)      x x
  x x    [ ] nn-spool  'nn' for /var/spool/news                      x x
  x x    [ ] nn-nntp   'nn' for NNTP (install 1 'nn' maximum)        x x
  x x    [ ] netpipes  Network pipe utilities                        x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x

  A  la  fin  de l'installation, dites non a tout le reste (non a toutes
  les demandes de configuration) et sortez du script.

  33..66..  IInnssttaallllaattiioonn ddee LLiinnuuxx pptthhrreeaaddss

  Vous devez maintenant installer la  bibliotheque  linuxthreads  plutot
  que  d'expliquer  les  details  de l'installation a la main. Sauvez le
  Makefile d'origine, appliquez le patch et ensuite :

          cd /usr/src/linuxthreads-0.71
    patch
          make
          make install

  -------------------diff Makefile.old  Makefile.raid-----------------
  2a3,13
  > # If you are building "linuxthreads" for installation on a mount
  > # point which is not the "root" partition, redefine 'BUILDIR' to
  > # the mount point to use as the "root" directory
  > # You may wish to do this if you are building an 'initial ram disk'
  > # such as used with bootable root raid devices.
  > # REQUIRES ldconfig version 1.9.5 or better
  > # do ldconfig -v to check
  > #
  > BUILDIR=/root/raidboot/mnt
  > #BUILDIR=
  >
  81,82c92,93
  <       install pthread.h $(INCLUDEDIR)/pthread.h
  <       install semaphore.h $(INCLUDEDIR)/semaphore.h
  ---
  >       install pthread.h $(BUILDIR)$(INCLUDEDIR)/pthread.h
  >       install semaphore.h $(BUILDIR)$(INCLUDEDIR)/semaphore.h
  84c95
  <       test -f /usr/include/sched.h || install sched.h $(INCLUDEDIR)/sched.h
  ---
  >       test -f $(BUILDIR)/usr/include/sched.h || install sched.h $(BUILDIR)$(INCLUDEDIR)/sched.h
  86,89c97,103
  <       install $(LIB) $(LIBDIR)/$(LIB)
  <       install $(SHLIB) $(SHAREDLIBDIR)/$(SHLIB)
  <       rm -f $(LIBDIR)/$(SHLIB0)
  <       ln -s $(SHAREDLIBDIR)/$(SHLIB) $(LIBDIR)/$(SHLIB0)
  ---
  >       install $(LIB) $(BUILDIR)$(LIBDIR)/$(LIB)
  >       install $(SHLIB) $(BUILDIR)$(SHAREDLIBDIR)/$(SHLIB)
  >       rm -f $(BUILDIR)$(LIBDIR)/$(SHLIB0)
  >       ln -s $(SHAREDLIBDIR)/$(SHLIB) $(BUILDIR)$(LIBDIR)/$(SHLIB0)
  > ifneq ($(BUILDIR),)
  >       ldconfig -r ${BUILDIR} -n $(SHAREDLIBDIR)
  > else
  91c105,106
  <       cd man; $(MAKE) MANDIR=$(MANDIR) install
  ---
  > endif
  >       cd man; $(MAKE) MANDIR=$(BUILDIR)$(MANDIR) install

  33..77..  IInnssttaallllaattiioonn ddeess oouuttiillss ppoouurr llee RRAAIIDD

  L'etape suivante est l'installation des outils RAID :  raidtools-0.42.

  Vous devez lancer le script "configure" pour faire pointer le Makefile
  vers le repertoire de construction des fichiers ramdisk.
    cd /usr/src/raidtools-0.42
    configure --sbindir=/root/raidboot/mnt/sbin --prefix=/root/raidboot/mnt/usr
    make
    make install

  Maintenant ! Le Makefile pour l'installation n'est  pas  tout  a  fait
  correct,  effectuez  les  operations  suivantes pour le nettoyer. Ceci
  sera modifie dans les versions futures pour que la liaison  des  liens
  ne soit pas a nouveau necessaire.

       Reparer l'erreur du make install

  Les  liens  des  fichiers specifies dans le Makefile a 'LINKS' doivent
  etre enleves et re-lies pour fonctionner correctement.

          cd /root/raidboot/mnt/sbin
          ln -fs mdadd mdrun
          ln -fs mdadd mdstop

  33..88..  nnoouuvveeaauu  ssyysstteemmee  ddee  ffiicchhiieerrss  EEffffaacceemmeenntt  ddeess  rreeppeerrttooiirreess  eett
  ffiicchhiieerrss nnoonn nneecceessssaaiirreess ddaannss llee

  Effacez les repertoires suivants du systeme de fichiers (ATTENTION  NE
  LES  EFFACEZ  PAS  DE VOTRE SYSTEME EN FONCTIONNEMENT), c'est facile a
  faire, devinez comment j'ai trouve !!!

          cd /root/raidboot/mnt
          rm -r home/ftp/*
          rm -r lost+found
          rm -r usr/doc
          rm -r usr/info
          rm -r usr/local/man
          rm -r usr/man
          rm -r usr/openwin
          rm -r usr/share/locale
          rm -r usr/X*
          rm -r var/man
          rm -r var/log/packages
          rm -r var/log/setup
          rm -r var/log/disk_contents

  33..99..  CCrreeaattiioonn ddee //ddeevv//mmdd_x

  La derniere etape  copie  simplement  les  peripheriques  /dev/md*  du
  systeme  de  fichiers  courant  sur le systeme de fichiers de secours.
  Vous pouvez les creer avec mknod.

          cp -a /dev/md* /root/raidboot/mnt/dev

  33..1100..  CCrreeaattiioonn dd''uunn ssyysstteemmee ddee ffiicchhiieerrss nnuu ccoonnvveennaanntt aa _i_n_i_t_r_d

  Vous  avez  maintenant  un systeme de fichiers propre et reutilisable,
  pret a  etre  personnalise.  Une  fois  personnalise,  ce  systeme  de
  fichiers   pourra   etre   utilise  comme  secours,  si  jamais  le(s)
  peripherique(s) RAID, ainsi que  les  outils  RAID  necessaires  a  la
  reparation,  devenaient corrompus. Il sera aussi utilise pour demarrer
  et monter a la racine le peripherique  RAID  en  ajoutant  le  fichier
  linuxrc dont nous parlerons bientot.

  Copiez  le  systeme de fichiers sur un peripherique plus petit pour le
  fichier initrd, 16 Mo devraient etre suffisants.

  Creez le systeme de fichiers plus petit et montez-le

          cd /root/raidboot
          dd if=/dev/zero of=bare.fs bs=1024k count=16

  associez le fichier a un peripherique de boucle et generez un  systeme
  de fichiers ext2 sur ce fichier

          losetup /dev/loop1 bare.fs
          mke2fs -v -m0 -L initrd /dev/loop1
          mount /dev/loop1 mnt2

  Copiez le systeme de fichiers 'build' sur 'bare.fs'

          cp -a mnt/* mnt2

  Sauvez  le systeme 'bare.fs' avant personnalisation pour que les mises
  a jour ulterieures soient facilitees. Le systeme de  fichiers  'build'
  n'est plus necessaire et peut etre efface.

          cd /root/raidboot
          umount mnt
          umount mnt2
          losetup -d /dev/loop0
          losetup -d /dev/loop1
          rm build
          cp bare.fs rescue
          gzip -9 bare.fs

  33..1100..11..  CCrreeaattiioonn dduu ssyysstteemmee ddee ffiicchhiieerrss iinniittrrdd de demarrage/secours

  Copiez maintenant les parties dependantes du systeme qui correspondent
  au  noyau  de  la  plate-forme  de  developpement, ou bien vous pouvez
  modifier a la main les fichiers du systeme de fichiers de secours pour
  correspondre a votre systeme cible.

          losetup /dev/loop0 rescue
          mount /dev/loop0 mnt

  Assurez-vous que votre repertoire etc est propre des fichiers *~, core
  et log. Les deux commandes qui suivent  creent  des  messages  d'aver-
  tissement, ignorez-les.

          cp -dp /etc/* mnt/etc
          cp -dp /etc/rc.d/* mnt/etc/rc.d

          mkdir  mnt/lib/modules
          cp -a  /lib/modules/2.x.x mnt/lib/modules <--- votre noyau 2.x.x en cours

  Editez  les fichiers suivantes pour les corriger pour votre systeme de
  secours.
          cd mnt

  Non reseau
          etc/fstab       mettez en commentaire le montage des peripheriques root et raid
          etc/mdtab       devrait fonctionner
  Reseau
          etc/hosts
          etc/resolv.conf
          etc/hosts.equiv         et fichiers lies
          etc/rc.d/rc.inet1       adresses IP, masque, passerelle, etc. correctes
          etc/rc.d/rc.S           enlevez entierement la section sur l'etat du systeme de fichiers
                  de :
                          # Test to see if the root partition isread-only
                  a, mais n'incluant pas :
                          # remove /etc/mtab* so that mount will .....
                                  ceci evite l'avertissement ennuyeux que
                                  le disque RAM est monte en lecture/ecriture
          etc/rc.d/rc.xxxxx       d'autres si necessaire, voir plus bas
          root/.rhosts            si present
          home/xxxx/xxxx          d'autres si necessaire

      ATTENTION : la procedure ci-dessus deplace vos fichiers de mot de
                  passe et shadow sur le disque de secours !!!

      ATTENTION : vous ne voudrez pas faire ceci pour des raisons de securite

  Creez tous les repertoires pour monter /dev/dsk... tels qu'ils peuvent
  etre necessaires et uniques a votre systeme. Le mien necessite :

          cd /root/raidboot/mnt           <--- racine initrd
          mkdir dosa                      point de montage partition DOS
          mkdir dosc                      point de montage miroir DOS

  Le systeme de fichiers de secours est termine !

  Vous  noterez  en  examinant  les  fichiers  du systeme de fichiers de
  secours qu'il y a  encore  de  nombreux  fichiers  que  l'on  pourrait
  effacer.  Je  ne l'ai pas fait car cela compliquerait totalement cette
  procedure et la plupart des systemes RAID ont suffisamment  de  disque
  et  de memoire. Si vous voulez encore diminuer la taille du systeme de
  fichiers, allez-y !

  33..1100..22..  FFaaiirree qquu''_i_n_i_t_r_d demarre le peripherique RAID - lliinnuuxxrrcc

  Pour  que  la  disquette  de  demarrage  de secours puisse demarrer le
  peripherique RAID, vous n'avez besoin que de copier le fichier  script
  executable :

       lliinnuuxxrrcc

  a la racine du peripherique.

  ---------------------- linuxrc --------------------
  #!/bin/sh
  # ver 1.07 2-12-98
  # monter le systeme de fichiers proc
  /bin/mount /proc

  # Ceci peut varier pour votre systeme.
  # Monter les partitions DOS, essayer les deux
  # au cas ou l'un des disques est mort
  /bin/mount /dosa
  /bin/mount /dosc

  # Positionner un drapeau au cas ou le fichier d'etat RAID n'est pas
  # trouve puis chercher le fichier d'etat sur les deux disques
  RAIDOWN="raidstat.ro not found"
  /bin/echo "Reading md0 shutdown status."
  if [ -f /dosa/linux/raidstat.ro ]; then
    RAIDOWN=`/bin/cat /dosa/linux/raidstat.ro`
    RAIDREF=`/bin/cat /dosc/linux/raidgood.ref`
  else
    if [ -f /dosc/linux/raidstat.ro ]; then
      RAIDOWN=`/bin/cat /dosc/linux/raidstat.ro`
      RAIDREF=`/bin/cat /dosc/linux/raidgood.ref`
    fi
  fi

  # Tester si l'extinction a ete propre avec des disques en etat de
  # marche
  if [ "${RAIDOWN} != ${RAIDREF}" ]; then
    echo "ERROR ${RAIDOWN}"
  # Utilisez les deux lignes suivantes pour SORTIR et laisser le secours
  # tourner
     /bin/echo 0x100>/proc/sys/kernel/real-root-dev
     exit                 # laissant les fichier d'erreurs dans dosa/linux, etc.
  fi

  # La matrice RAID est propre, continuer en enlevant
  # le fichier d'etat et en ecrivant un superblock propre
  /bin/rm /dosa/linux/raidstat.ro
  /bin/rm /dosc/linux/raidstat.ro
  /sbin/mkraid /etc/raid1.conf -f --only-superblock

  /bin/umount /dosa
  /bin/umount /dosc

  # Monter la matrice RAID
  echo "Mounting md0, root filesystem"
  /sbin/mdadd -ar

  # S'il y a des erreurs, SORTIR et laisser le secours tourner
  if [ $? -ne 0 ]; then
     echo "RAID device has errors"
  # Utilisez les trois lignes suivantes pour SORTIR
     /bin/rm /etc/mtab            # enlever le mtab mauvais
     /bin/echo 0x100>/proc/sys/kernel/real-root-dev
     exit
  fi

  # sinon annoncer au noyau de passer a /dev/md0 comme peripherique
  # /root. La valeur 0x900 est le numero de peripherique calcule par :
  #  256*numero_periph_majeur + numero_periph_mineur
  /bin/echo 0x900>/proc/sys/kernel/real-root-dev

  # demonter /proc pour liberer l'espace memoire du peripherique initrd
  /bin/umount /proc
  /bin/echo "/dev/md0 mounted as root"
  exit
  #------------------ end linuxrc ----------------------

  Ajoutez 'linuxrc' au peripherique de demarrage initrd.

          cd /root/raidboot
          chmod 777 linuxrc
          cp -p linuxrc mnt

  33..1111..  MMooddiiffiiccaattiioonn ddeess ssccrriippttss rrcc ppoouurr ll''eexxttiinnccttiioonn

  Pour terminer l'installation, modifiez les scripts rc pour sauvegarder
  l'etat md sur  le  vrai  peripherique  racine  quand  l'extinction  du
  systeme arrive.

  Dans la Slackware, c'est rc.0 -> rc.6

  J'ai  modifie  legerement  le  contournement  de  Bohumil Chalupa pour
  stopper le RAID. Sa solution a l'origine est presentee  dans  l'annexe
  ``A''.

  Puisqu'il  ne  reste  plus  de partition Linux libre sur le systeme de
  production exceptee  mmdd00,  les  partitions  DOS  sont  utilisees  pour
  stocker  l'etat  rraaiiddOOKK  eenn  lleeccttuurree  sseeuullee.  J'ai  choisi d'ecrire un
  fichier sur chaque partition DOS contenant l'etat de la matrice  md  a
  l'extinction  signifiant  que  le  peripherique  md  a  ete remonte en
  lecture seule. Ceci evite la panne du  systeme  si  l'un  des  disques
  meurt.

  J'ai  modifie  mon  script rc.6 pour tenter le demontage de la matrice
  racine en RAID 1 et tout autre peripheriques RAID de mdtab. Vous aurez
  besoin  de  scripts  legerement  differents, mais les elements de base
  devraient etre les memes. Le fichier  rc.6  complet  est  montre  dans
  l'annexe ``B''.

  Pour  capturer l'etat a l'extinction de la matrice RAID, inserez juste
  avant que les systemes de fichiers soient demontes :

          RAIDSTATUS=`/bin/cat /proc/mdstat | /usr/bin/grep md0`

  Apres que tous les systemes de fichiers soient demontes (le systeme de
  fichiers racine ne se demontera pas), ajoutez :

          # le peripheriques racine reste monte en lecture seule
          # les systemes de fichiers DOS sont en lecture/ecriture
          mount -n -o remount,ro /
          echo "Writing RAID read-only boot FLAG(s)."
          mount -n /dosa
          mount -n /dosc
          # creer un drapeau RAID monte en lecture seule en double
          # contenant l'etat d'extinction de la matrice RAID
          echo ${RAIDSTATUS} > /dosa/linux/raidstat.ro
          echo ${RAIDSTATUS} > /dosc/linux/raidstat.ro

          umount -n /dosa
          umount -n /dosc

          # stoppe toutes les matrices RAID (sauf la racine)
          echo "Stopping raid"
          mdstop -a

  Ceci  arretera  proprement tous les peripheriques RAID sauf la racine.
  L'etat de la racine est passe au demarrage suivant dans rraaiiddssttaatt..rroo.

  Copiez le fichier rc sur votre nouvelle matrice RAID,  le  systeme  de
  fichiers  de secours qui est encore monte sur //rroooott//rraaiiddbboooott//mmnntt et le
  systeme de developpement s'il est sur la meme machine.

  Modifiez le eettcc//ffssttaabb de secours si necessaire et assurez-vous que  le
  mmddttaabb de secours est correct.

  Copiez  maintenant  la disquette de secours sur votre partition DOS et
  tout devrait etre pret pour demarrer le peripherique RAID a la racine.

          umount mnt
          losetup -d /dev/loop0
          gzip -9 rescue

  Copiez rescue.gz sur votre partition DOS.

  Tout  ce  qui  reste  est  de tester le nouveau systeme de fichiers en
  redemarrant. Voyez les parametres loadlin sur le fichier DOS lliinnuuxx..bbaatt
  dans ce qui suit.

  33..1122..   MMiissee  eenn ppllaaccee dduu ddeemmaarrrraaggee aavveecc llooaaddlliinn ppoouurr llee sseeccoouurrss eett llee
  RRAAIIDD

  Les  disques  que  j'ai choisis pour mon systeme sont bien plus grands
  que ceux que LILO peut gerer. Par  consequent,  j'ai  utilise  loadlin
  pour  demarrer  le systeme a partir d'une petite partition DOS avec un
  miroir (copie) sur le disque accompagnateur.

  Mon systeme DOS de demarrage  contient  un  petit  editeur  parmi  les
  utilitaires pour que je puisse modifier les parametres de demarrage de
  loadlin si necessaire, ce qui me permet de redemarrer le systeme Linux
  sur mon disque de depannage pendant que je fais des tests.

  Le systeme DOS contient cette arborescence pour Linux :

          c:\linux.bat
          c:\linux\loadlin.exe
          c:\linux\zimage
          c:\linux\rescue.gz
          c:\linux\raidgood.ref
          c:\linux\raidstat.ro    (seulement a l'extinction)

  ---------------------- linux.bat ---------------------------
  rem  fichier batch DOS d'exemple pour demarrer Linux
  rem  Demarrage du processus LOADLIN :

  rem c:\linux\loadlin c:\linux\zimage root=/dev/ram0 ro ramdisk_size=16384 initrd=c:\linux\rescue.gz mem=131072k
  c:\linux\loadlin c:\linux\zimage root=/dev/md0 ro ramdisk_size=16384 initrd=c:\linux\rescue.gz mem=131072k

  rem -- ceci est mon systeme de developpement -- il s'en va plus tard
  rem c:\linux\loadlin c:\linux\zimage root=/dev/hda3 ro noinitrd mem=131072k
  ------------------------------------------------------------

  ***** >> NOTE !! la seule difference entre forcer le lancement du
          systeme de secours et le montage du peripherique RAID est le
          parametre de loadlin.

                  root=/dev/ram0          pour le systeme de secours
                  root=/dev/md0           pour RAID

                  Avec root=/dev/ram0 les peripheriques RAID ne seront
                  pas montes et le systeme de secours tournera sans
                  conditions

  Si  la  matrice RAID tombe en panne, le systeme de secours reste monte
  et tourne (ceci semble ne pas fonctionner de temps  en  temps,  je  ne
  sais  pas  pourquoi,  cela fonctionne quand le bouton reset est appuye
  mais ne fonctionne pas avec 'shutdown -r now').

  44..  CCoonnffiigguurraattiioonn dduu ssyysstteemmee ddee pprroodduuccttiioonn eenn RRAAIIDD

  44..11..  SSppeecciiffiiccaattiioonnss dduu ssyysstteemmee

  Carte mere :    Iwill P55TU     double ide + adaptec scsi
  Processeur :    Intel P200
  Disques:                2 ea. Maxtor 7 gig eide

  Les disques sont designes par Linux comme 'hda' et 'hdc'

  44..22..  PPaarrttiittiioonnnneemmeenntt ddeess ddiissqquueess dduurrss

  Puisque le test d'une grande matrice  RAID  qu'on  peut  monter  a  la
  racine  est  difficile  a  cause  du  probleme  du  redemarrage,  j'ai
  repartitionne mon espace d'echange (swap) pour inclure  une  partition
  RAID plus petite a des fins de tests. Vous pourrez trouver ceci utile.

          <bf/SYSTEME DE DEVELOPPEMENT/

    /dev/hda1     dos             16meg
  * /dev/hda2     extended        126m
    /dev/hda3     linux           126m    partition racine pendant le developpement
    /dev/hda4     linux           6+gig   RAID 1
  * /dev/hda5     linux            26m    RAID 1 de test
  * /dev/hda6     linux swap      100m

    /dev/hdc1     est simplement une copie exacte de hda1 pour que cette
                  partition puisse etre activee si hda tombe en panne
  * /dev/hdc2     extended        126m
    /dev/hdc3     linux           126m    /usr/src pendant le developpement
    /dev/hdc4     linux           6+gig   miroir RAID 1
  * /dev/hdc5     linux            26m    miroir RAID 1 de test
  * /dev/hdc6     linux swap      100m

          <bf/SYSTEME DE PRODUCTION/

  /dev/hda1       dos             16meg
  /dev/hda2       linux swap      126m
  /dev/hda3       linux swap      126m
  /dev/hda4       linux           6+gig   RAID 1

  /dev/hdc1       est simplement une copie exacte de hda1
  /dev/hdc2       linux swap      126m
  /dev/hdc3       linux swap      126m
  /dev/hdc4       linux           6+gig   miroir RAID 1

  Les partitions hdx3 ont ete changees en 'swap' apres  avoir  developpe
  cet  utilitaire.  J'aurais pu le faire sur une autre machine, mais les
  bibliotheques et les noyaux ont tous a peu pres un an  de  retard  sur
  mes autres machines Linux et j'ai prefere le construire sur la machine
  cible.

  J'ai choisi de partitionner  de  cette  facon  et  d'utiliser  loadlin
  plutot que LILO parce que :

  1. la  partition  principale  (6  Go)  est  trop  grande  pour pouvoir
     demarrer  avec  LILO  seul  et   aurait   demande   une   partition
     supplementaire  plus petite situee a l'interieur des 1024 premieres
     adresses du disque ;

  2. Si jamais ce disque tombe en panne de  maniere  catastrophique,  le
     systeme doit continuer a tourner et etre demarrable avec un minimum
     d'efforts et AUCUNE perte de donnees.

  +o  Si l'un des disques durs tombe en panne, le  demarrage  s'arretera,
     et le systeme de secours se mettra en marche. L'examen du message a
     l'ecran ou de /dos_x/linux/raidstat.ro indiquera a  l'administrateur
     l'etat de la matrice defaillante.

  +o  Si  hda  tombe en panne, la partition DOS sur hdc doit etre marquee
     'active' et le BIOS doit  reconnaitre  hdc  comme  peripherique  de
     demarrage ou bien il doit etre deplace physiquement en position hda
     en le recablant. On peut reactiver a nouveau  le  systeme  RAID  en
     enlevant le disque defectueux et en tapant :

              "/sbin/mkraid /etc/raid1.conf -f --only-superblock"

  pour reconstruire le superblock restant.

  +o  Une fois ceci fait, alors

             mdadd -ar

  +o  Examinez  l'etat de la matrice pour verifier que tout est en ordre,
     puis remplacez la reference de la matrice en bon  etat  par  l'etat
     courant  jusqu'a  ce que le disque defectueux puisse etre repare et
     remplace.

             cat /proc/mdstat | grep md0 > /dosa/linux/raidgood.ref

             shutdown -r now

  pour effectuer un redemarrage propre, et le  systeme  sera  a  nouveau
  disponible.

  55..  CCoonnssttrruuccttiioonn dduu ssyysstteemmee ddee ffiicchhiieerrss RRAAIIDD

  Cette  description  convient  a  mon  systeme  RAID  1 decrit dans les
  specifications du systeme. Votre systeme peut avoir  une  architecture
  RAID  differente,  vous  ferez les modifications appropriees. Veuillez
  lire les  pages  de  manuel  et  le  QuickStart.RAID  livre  avec  les
  raidtools-0.42. Mon /etc/raid1.conf contient :

          # configuration RAID 1
          raiddev                 /dev/md0
          raid-level              1
          nr-raid-disks           2
          nr-spare-disks          0

          device                  /dev/hda4
          raid-disk               0

          device                  /dev/hdc4
          raid-disk               1

  55..11..   PPrroocceedduurreess  ppaass  aa  ppaass  ppoouurr  llaa  ccoonnssttrruuccttiioonn dd''uunn ssyysstteemmee ddee
  ffiicchhiieerrss RRAAIIDD ddee pprroodduuccttiioonn

  Pour mon systeme RAID 1, j'ai fait une installation complete de :

          Slackware-3.4
          linuxthreads-0.71
          raidtools-0.42
          linux-2.0.32 avec le patch raid145

  Creez et formatez le peripherique RAID.

          mkraid /etc/raid1.conf
          mdcreate raid1 /dev/md0 /dev/hda4 /dev/hdc4
          mdadd -ar
          mke2fs /dev/md0
          mkdir /md
          mount -t ext2 /dev/md0 /md

  Creez les fichiers de reference que reboot utilisera, ils peuvent etre
  differents sur votre systeme.

          cat /proc/mdstat | grep md0 > /dosa/linux/raidgood.ref
          cat /proc/mdstat | grep md0 > /dosc/linux/raidgood.ref

  Utilisez Slackware 3.4 ou une autre distribution pour construire votre
  systeme d'exploitation.

          setup

  Specifiez  'md'  comme  cible,  et  comme  source ce que vous utilisez
  habituellement. Selectionnez et installez  les  ensembles  de  disques
  interessants  sauf  pour  le noyau. Configurez le systeme, mais passez
  les sections sur LILO et le demarrage du noyau. Sortez de setup.

  Installez les 'pthreads'

          cd /usr/src/linuxthreads-0.71

  Editez le Makefile et specifiez

          BUILDIR=/md

          make
          make install

  Installez les 'raidtools'

          cd /usr/src/raidtools-0.42
          configure --sbindir=/md/sbin --prefix=/md/usr

  Reparez l'erreur du make install des raidtools

          cd /md/sbin
          rm mdrun
          rm mdstop
          ln -s mdadd mdrun
          ln -s mdadd mdstop

  Creez /dev/mdx

          cp -a /dev/md* /md/dev

  Ajoutez la configuration systeme du  systeme  en  cours  (ignorez  les
  erreurs).

          cp -dp /etc/* mnt/etc
          cp -dp /etc/rc.d/* mnt/etc/rc.d         (incluez le nouveau rc.6)
          mkdir  mnt/lib/modules
          cp -a  /lib/modules/2.x.x mnt/lib/modules <--- votre 2.x.x en cours

  Editez  les  fichiers suivants pour les corriger pour votre systeme de
  fichiers

          cd /md

  Non reseau
          etc/fstab       correct pour les peripheriques racine reelle et RAID
          etc/mdtab       devrait etre correct
  Reseau
          etc/hosts
          etc/resolv.conf
          etc/hosts.equiv         et fichiers associes
          etc/rc.d/rc.inet1       adresses IP, masque, passerelle, etc. correctes
          etc/rc.d/rc.S           enlevez la section entiere sur l'etat du systeme de fichiers
                  a partir de :
                          # Test to see if the root partition isread-only
                  jusqu'a mais ne comprenant pas :
                          # remove /etc/mtab* so that mount will .....
                                  Ceci evite l'avertissement ennuyeux que
                                  le disque RAM est monte en lecture/ecriture
          etc/rc.d/rc.xxxxx       d'autres si necessaire
          root/.rhosts            s'il existe
          home/xxxx/xxxx          d'autres si necessaire

      ATTTENTION :        La procedure ci-dessus deplace vos fichiers de
                          mot de passe et shadow sur le nouveau systeme
                          de fichiers !!!

      ATTENTION :         Vous n'aurez pas envie de faire ceci pour des
                          raisons de securite

  Creez tous les repertoires pour  monter  /dev/disk...  qui  pourraient
  etre necessaire compte-tenu de votre systeme. Le mien necessite :

          cd /md          <--- nouvelle racine du systeme de fichiers
          mkdir dosa              point de montage de la partition DOS
          mkdir dosc              point de montage du miroir DOS

  Le  nouveau  systeme  de fichiers est termine. Assurez-vous de sauveg-
  arder l'etat de reference de md sur le 'veritable' peripherique racine
  et vous etes pret a demarrer.

  montez les partitions DOS sur dosa et dosc

          cat /proc/mdstat | grep md0 > /dosa/linux/raidgood.ref
          cat /proc/mdstat | grep md0 > /dosc/linux/raidgood.ref

          mdstop /dev/md0

  66..  UUnnee ddeerrnniieerree ppeennsseeee

  Souvenez-vous qu'un expert est quelqu'un qui en connait au moins 1% de
  plus que vous  sur  un  sujet.  Gardez  ceci  a  l'esprit  quand  vous
  m'enverrez  un  e-mail  demandant de l'aide. J'essaierai, mais je n'ai
  fait ceci qu'une fois !
  Michael Robinton Michael@bzs.org <mailto:michael@bzs.org>

  77..  AAnnnneexxee AA.. -- eexxttiinnccttiioonn ddee mmdd00 cchheezz BBoohhuummiill CChhaalluuppaa

  Voici le post de Bohumil Chalupa sur la liste Linux RAID concernant le
  contournement  du  probleme  de mdstop avec RAID 1 + 5. Sa solution ne
  considere pas la possibilite d'une corruption du peripherique  RAID  a
  l'extinction.  J'ai  donc ajoute une simple comparaison d'etat avec un
  etat de reference  correct  et  connu  au  demarrage.  Ceci  permet  a
  l'administrateur  d'intervenir si quelque chose ne va pas bien avec un
  disque dans une matrice. La description de  ceci  est  dans  le  corps
  principal de ce document.

  (NdT  :  j'ai  traduit le message parce qu'il est long et interessant,
  celui en anglais se trouve bien evidemment dans la  version  d'origine
  de ce HOWTO.)

  > From: Bohumil Chalupa <bochal@apollo.karlov.mff.cuni.cz>
  >
  > Je peux maintenant demarrer initrd et utiliser linuxrc pour demarrer
  > la matrice RAID 1, puis changer la racine en /dev/md0 avec succes.
  >
  > Je ne connais pas, cependant, de maniere d'_arreter_ proprement la
  > matrice.

  Bon. Je dois repondre moi-meme :-)

  > Date: Mon, 29 Dec 1997 02:21:38 -0600 (CST)
  > From: Edward Welbon <welbon@bga.com>
  > Subject: Re: dismounting root raid device
  >
  > Pour les peripheriques md autres que RAID 0, il y a surement un etat
  > a sauvegarder qui n'est connu qu'une fois que toutes les ecritures
  > sont terminees. Un tel etat ne peut bien sur etre sauve a la racine
  > une fois qu'elle est montee en lecture seule. Dans ce cas, on
  > devrait pouvoir monter un systeme de fichiers "X" en ecriture sur la
  > racine en lecture seule et pouvoir ecrire sur "X" (je me rappelle
  > l'avoir fait pendant des operations de "secours", mais pas dans une
  > procedure automatisee).
  >
  > Le systeme de fichiers "X" serait je pense un peripherique de
  > demarrage a partir duquel le RAID (pendant l'execution de linuxrc a
  > travers initrd) irait prendre son etat initial. Heureusement RAID 0
  > ne demande pas d'ecrire un quelconque etat (bien qu'il serait utile
  > de pouvoir ecrire les sommes de verification (checksums) dans mdtab
  > apres un mdstop). En fin de compte, je bricolerai ceci mais ca ne
  > parait pas difficile bien que le "diable" se trouve toujours dans
  > les "details".

  Oui, c'est ca.
  J'ai deja eu cette idee a l'esprit depuis quelques temps, mais je n'ai
  pas eu le temps de l'essayer. Je l'ai fait hier, et ca marche.

  Avec mon RAID 1 (miroir), je ne sauvegarde aucune somme de
  verification ni donnees de superblock RAID. Je ne sauvegarde une
  information que sur la partition de demarrage "reelle", celle sur
  laquelle le volume md racine etait remonte en lecture seule pendant
  l'extinction. Alors, pendant le demarrage, le script linuxrc lance
  mkraid --only-superblock quand il trouve cette information ; sinon, il
  lance ckraid. Ceci veut dire que l'information du superblock RAID
  n'est pas mise a jour pendant l'extinction ; elle est mise a jour au
  demarrage. Ce n'est pas tres propre, j'en ai peur, :-( mais ca
  fonctionne.

  J'utilise Slackware et initrd.md d'Edward Welbon pour demarrer le
  peripherique RAID a la racine.
  Autant que je puisse m'en souvenir, les seuls fichiers modifies sont
  mkdisk et linuxrc, et le script d'extinction /etc/rc.d/rc.6. Et
  lilo.conf, bien sur.

  J'annexe les parties importantes.

  Bohumil Chalupa

  --------------- mon.linuxrc suit -----------------
  #!/bin/sh
  # nous avons besoin de /proc
  /bin/mount /proc
  # demarrer le peripherique md0. Laisser les scripts /etc/rc.d
  s'occuper du reste. Nous devrions en faire le moins possible ici.
  # ________________________________________
  # test d'extinction du RAID 1 racine et recreation
  # /start doit etre cree sur l'image rd dans mon.mkdisk
  echo "preparation de md0: montage de /start"
  /bin/mount /dev/sda2 /start -t ext2
  echo "lecture de l'etat sauvegarde de md0 dans /start"
  if [ -f /start/root.raid.ok ]; then
   echo "RAID ok, modification du superblock"
   rm /start/root.raid.ok
   /sbin/mkraid /etc/raid1.conf -f --only-superblock
  else
   echo "RAID pas propre, lancement de ckraid --fix"
   /sbin/ckraid --fix /etc/raid1.conf
  fi
  echo "demontage de /start"
  /bin/umount /start
  # _________________________________________
  #
  echo "ajout de md0 pour le systeme de fichiers racine"
  /sbin/mdadd /dev/md0 /dev/sda1 /dev/sdb1
  echo "lancement de md0"
  /sbin/mdrun -p1 /dev/md0
  # dire au noyau que nous voulons passer /dev/md0 comme peripherique
  # racine, la valeur 0x900 vient de 256*numero_periph_majeur +
  # numero_periph_mineur.
  echo "mise en place du vrai-periph-racine (real-root-dev)"
  /bin/echo 0x900>/proc/sys/kernel/real-root-dev
  # demontage de /proc pour que le disque RAM puisse etre enleve de la
  # memoire
  echo "unmounting /proc"
  /bin/umount /proc
  /bin/echo "On peut normalement monter /dev/md0 (majeur 9, mineur 0) a la racine"
  exit
  --------------- fin de mon.linuxrc ----------------------------------

  ----------- extrait de /etc/rc.d/rc.6 suit -----------------
    # arreter la swap, puis demonter les systemes de fichiers locaux
    echo "Extinction de la swap."
    swapoff -a
    echo "Demontage des systemes de fichiers locaux."
    umount -a -tnonfs
    # Ne pas remonter les volumes UMSDOS racine :
    if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
      mount -n -o remount,ro /
    fi

    # Sauvegarder l'etat RAID
    echo "Sauvegarde de l'etat RAID"
    /bin/mount -n /dev/sda2 /start -t ext2
    touch /start/root.raid.ok
    /bin/umount -n /start

  -------------- fin de l'extrait de rc.6 ------------------------

  ------------------ une partie de mon.mkdisk suit ----------------------
  #
  #  maintenant que le systeme de fichiers est pret a etre rempli, nous
  #  devons obtenir quelques repertoires importants. J'ai eu des
  #  problemes sans fin jusqu'a ce que je cree un fichier mtab tout
  #  neuf. Dans mon cas, il est pratique de recopier /etc/mdtab, de
  #  cette maniere je peux activer md avec un simple "/sbin/mdadd -ar"
  #  dans linuxrc.
  #
  cp -a $ROOT/etc $MOUNTPNT 2>cp.stderr 1>cp.stdout
  rm -rf $MOUNTPNT/etc/mtab
  rm -rf $MOUNTPNT/etc/ppp*
  rm -rf $MOUNTPNT/etc/termcap
  rm -rf $MOUNTPNT/etc/sendmail*
  rm -rf $MOUNTPNT/etc/rc.d
  rm -rf $MOUNTPNT/etc/dos*
  cp -a $ROOT/sbin $ROOT/dev $ROOT/lib $ROOT/bin $MOUNTPNT 2>>cp.stderr
  1>>cp.stdout
  # _____________________________________________________________________
  #  RAID: aura besoin de mkraid et ckraid
  cp -a $ROOT/usr/sbin/mkraid $ROOT/usr/sbin/ckraid $MOUNTPNT/sbin
  2>>cp.stderr 1>>cp.stdout
  #
  ---------------------------------------------------------------------
  #  il semble qu'init ne voudra pas jouer sans utmp. on peut probablement
  #  reduire ceci de beaucoup. aucune idee de ce que le vrai bug etait 8-).
  #
  mkdir $MOUNTPNT/var $MOUNTPNT/var/log $MOUNTPNT/var/run $MOUNTPNT/initrd
  touch $MOUNTPNT/var/run/utmp $MOUNTPNT/etc/mtab
  chmod a+r $MOUNTPNT/var/run/utmp $MOUNTPNT/etc/mtab
  ln -s /var/run/utmp $MOUNTPNT/var/log/utmp
  ln -s /var/log/utmp $MOUNTPNT/etc/utmp
  ls -lstrd $MOUNTPNT/etc/utmp $MOUNTPNT/var/log/utmp $MOUNTPNT/var/run/utmp
  #
  #  puisque je voulais changer le point de montage, j'avais besoin de
  #  ceci bien que je suppose que j'aurais pu faire un "mkdir /proc"
  #  dans linuxrc.
  #
  mkdir $MOUNTPNT/proc
  chmod 555 $MOUNTPNT/proc
  #
  #  ------------------------------------------------------
  #  nous monterons le vrai peripherique de demarrage sur /start de
  #  maniere temporaire pour verifier l'etat du RAID racine sauve au
  #  moment de l'extinction
  #
  mkdir $MOUNTPNT/start
  #  -------------------------------------------------------
  #
  #  besoin de linuxrc (c'est, apres tout, le but de l'exercice).
  #
  if [ -x ./my.linuxrc ]; then
    cp -a ./my.linuxrc $MOUNTPNT/linuxrc
    chmod 777 $MOUNTPNT/linuxrc
  else
     ln -s /bin/sh $MOUNTPNT/linuxrc
  fi
  #
  ----------------- fin de la partie de mon.mkdisk -----------------

  88..  AAnnnneexxee BB.. -- ffiicchhiieerr rrcc..00 -- rrcc..66 ccoommpplleett

  #! /bin/sh
  #
  # rc.6          Ce fichier est execute par init quand il passe au
  #               runlevel (niveau d'execution) 0 (halt) ou runlevel 6
  #               (redemarrage). Il tue tous les processus, demonte les
  #               systemes de fichiers et soit stoppe soit redemarre.
  #
  # Version:      @(#)/etc/rc.d/rc.6      1.50    1994-01-15
  #
  # Author:       Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org>
  # Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
  # Modified by:  Michael A. Robinton, <michael@bzs.org> for RAID shutdown

    # Positionner le chemin.
    PATH=/sbin:/etc:/bin:/usr/bin

    # Mettre en mode saut de ligne pour eviter l'effet d'escalier.
    stty onlcr

    echo "Lancement du script d'extinction $0:"

    # Trouver comment nous sommes appeles.
    case "$0" in
          *0)
                  message="Le systeme est stoppe."
                  command="halt"
                  ;;
          *6)
                  message="Redemarrage."
                  command=reboot
                  ;;
          *)
                  echo "$0: veuillez m'appeler en tant que \"rc.0\" or \"rc.6\" !"
                  exit 1
                  ;;
    esac

    # Tuer tous les processus.
    # INIT est sense s'occuper entierement de tout ceci, mais il n'a pas
    # toujours fonctionne correctement sans cette seconde passe de
    # tuerie de processus. Puisqu'INIT a deja averti les utilisateurs
    # que les processus etaient tues, nous eviterons d'afficher cette
    # information cette fois-ci.
    if [ "$1" != "fast" ]; then # shutdown n'a pas encore tue tous les processus
      killall5 -15
      killall5 -9
    fi

    # Essayer d'arreter les quotas et la comptabilite.
    if [ -x /usr/sbin/quotaoff ]
    then
          echo "Arret des quotas."
          /usr/sbin/quotaoff -a
    fi
    if [ -x /sbin/accton ]
    then
          echo "Arret de la comptabilite."
          /sbin/accton
    fi

    # Avant de demonter les systemes de fichiers ecrire un
    # enregistrement reboot ou halt dans wtmp.
    $command -w

    # Sauvegarde de l'heure locale
    [ -e /usr/lib/zoneinfo/localtime ] && cp /usr/lib/zoneinfo/localtime /etc
    # Demontage asynchrone de tout systeme de fichiers distant
    echo "Demontage des systemes de fichiers distants."
    umount -a -tnfs &

    # vous devez avoir lance
    # 'cat /proc/mdstat | grep md0 > {your boot vol}/linux/raidgood.ref'
    # avant que linuxrc s'execute proprement avec cette information
    RAIDSTATUS=`/bin/cat /proc/mdstat | /usr/bin/grep md0 # capture raid status`

    # Arret de la swap, puis demontage des systemes de fichiers locaux.
    # effacement de mdtab par la meme occasion
    echo "Arret de la swap."
    swapoff -a
    echo "Demontage des systemes de fichiers locaux."
    umount -a -tnonfs

    # Ne pas remonter les volumes UMSDOS racine :
    if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
      mount -n -o remount,ro /
    fi

    # le peripherique racine reste monte
    # monter les systemes de fichiers DOS en lecture/ecriture
    echo "Ecriture des drapeaux RAID de demarrage en lecture seule."
    mount -n /dosa
    mount -n /dosc
    # creation du drapeau RAID monte en lecture seule en double
    # contenant l'etat a l'extinction de la matrice RAID
    echo ${RAIDSTATUS} > /dosa/linux/raidstat.ro
    echo ${RAIDSTATUS} > /dosc/linux/raidstat.ro

    umount -n /dosa
    umount -n /dosc

    # Arreter toutes les matrices RAID (sauf la racine)
    echo "Arret du RAID"
    mdstop -a

    # Voir si c'est une situation de coupure de courant.
    if [ -f /etc/power_is_failing ]; then
      echo "Extinction de l'UPS, a+."
      /sbin/powerd -q
      exit 1
    fi

    # Maintenant arret ou redemarrage.
    echo "$message"
    [ ! -f /etc/fastboot ] && echo "Au prochain demarrage fsck sera FORCE."
    $command -f

  Le SCSI HOWTO Linux
  par  Drew Eckhardt,<drew@PoohSticks.ORG> (transforme au for-
  mat      linuxdoc-sgml      par      Dieter       Faulbaum),
  <faulbaum@bii.bessy.de>   (Adaptation  francaise  :  Thierry
  Danis thierry.danis@hol.fr, le 28 Novembre 1997).
  Version 2.30, 30 Aout 1996

  11..  IInnttrroodduuccttiioonn

  CCooppyyrriigghhtt

  Ce document est distribue sous les contraintes de la GPL  (GNU  Public
  Licence).  Les  lignes  suivantes sont le texte integral anglais de la
  licence.

       This documentation is free documentation; you can redistribute it and/or
       modify it under the terms of the GNU General Public License as published by
       the Free Software Foundation; either version 2 of the License, or
       (at your option) any later version.

       This documentation is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       GNU General Public License for more details.

       You should have received a copy of the GNU General Public License
       along with this documentation; if not, write to the Free Software
       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  En  dehors  de  l'aspect  GPL,  j'apprecierais   que   les   personnes
  interessees a publier ce document me demandent (<drew@PoohSticks.ORG>)
  auparavant si une version plus recente existe. A  chaque  fois  qu'une
  version  un peu ancienne est publiee, on me pose des questions qui ont
  deja leur reponse dans les derniers documents,  et  la  reputation  de
  l'editeur  en  fait  les  frais.  Je  prefererais  egalement que toute
  reference a un site de distribution gratuit, voire a des distributeurs
  commerciaux, soit laissee intacte.

  IMPORTANT:

  LES  RAPPORTS D'ANOMALIES ET AUTRES APPELS A L'AIDE QUI NE SUIVENT PAS
  LES PROCEDURES DECRITES DANS  LA  SECTION  ``Signaler  une  anomalie''
  SERONT IGNORES.

  Ce  HOWTO  couvre le sous-systeme SCSI de Linux, tel qu'il existe dans
  le noyau version 1.2.10 et dans des  codes  alpha  plus  recents.  Les
  versions plus vieilles du code SCSI ne sont pplluuss ssuuppppoorrtteeeess et peuvent
  differer sensiblement en ce qui concerne les pilotes implementes,  les
  performances et les options disponibles.

  Pour  toute information supplementaire, vous pouvez vous inscrire a la
  liste   de   diffusion   linux-scsi,   en   envoyant   un   email    a
  majordomo@vger.rutgers.edu  contenant  la ligne suivante dans le corps
  du message :

       subscribe linux-scsi

  Vous pouvez vous radier de la liste en envoyant un  email  a  la  meme
  adresse contenant dans le corps du message :

       unsubscribe linux-scsi

  Une  fois  votre inscription effective, vous pouvez envoyer des emails
  dans la liste de diffusion a l'adresse suivante :

       linux-scsi@vger.rutgers.edu

  Je suis conscient que ce document n'est pas  des  plus  conviviaux  et
  qu'il  comporte  certainement des erreurs et des imprecisions. Si vous
  avez des remarques constructives, n'hesitez pas a me les poster.

  22..  LLeess pprroobblleemmeess ccoouurraannttss

  Ce chapitre recense un  certain  nombre  de  problemes  habituellement
  rencontres.  S'il  n'y   a  rien  ici  qui  reponde  a  vos questions,
  consultez egalement les chapitres relatifs aux cartes  d'interface  et
  aux peripheriques.

  22..11..  DDyyssffoonnccttiioonnnneemmeenntt ggeenneerraalliissee

  Si vous rencontrez des erreurs aleatoires, il y a fort a parier que la
  cause en est un cable defectueux ou une mauvaise terminaison.

  Certaines  cartes,  comme  celles  architecturees  autour  du   recent
  composant  NCR,  effectuent  un  filtrage numerique et une negociation
  active de signal et sont par le fait moins sensibles aux problemes  de
  connectique.

  D'autres  cartes, comme par exemple les Adaptec 154xC, 154xCF et 274x,
  sont  eexxttrreemmeemmeenntt  sensibles  et  peuvent  ne  plus  fonctionner  avec
  certains cordons qui ne perturberaient pas d'autres cartes.

  Je le repete donc : certaines cartes sont ttrreess sensibles aux problemes
  de mauvais  cables  et  de  terminaison,  aussi  est-il  important  de
  verifier  ces  deux  points  avant  toute  chose lorsque des problemes
  apparaissent.

  Pour diminuer les risques potentiels, vous devez utiliser  des  cables
  qui :

  1. se prevalent d'une compatibilite SCSI-II,

  2. ont une impedance caracteristique de 132 ohms,

  3. proviennent  tous  d'une  meme  source,  afin  d'eviter  les ecarts
     d'impedance,

  4. sont proposees par un vendeur repute (tel qu'Amphenol).

  Un leger courant pour la  terminaison  doit  etre  fourni  par  chaque
  equipement  present  sur le bus SCSI, via une diode pour prevenir tout
  retour de tension.  De  cette  maniere,  une  tension  suffisante  est
  disponible  en bout de chaine, la ou le bus en a besoin. Pour prevenir
  tout endommagement du a un court-circuit, TERMPWR doit  etre  controle
  au  travers  d'un fusible ou de tout autre dispositif de limitation du
  courant.

  Si plusieurs equipements, des cables externes ou un FAST SCSI  2  sont
  utilises,  une  terminaison  -- active ou forcee -- parfaite doit etre
  mise a chaque extremite du bus.

  Reportez-vous a la FAQ Comp.Periphs.Scsi (disponible sur  tsx-11  dans
  /pub/linux/ALPHA/scsi)   pour   plus   de   renseignements   sur   les
  terminaisons actives.

  22..22..  LLaa lliiggnnee ddee ccoommmmaannddee dduu nnooyyaauu

  D'autres parties du document feront plus tard reference a la "ligne de
  commande du noyau".

  La  ligne  de  commande  du  noyau  est un ensemble d'options que vous
  pouvez specifier, soit apres le nom de  l'image  a  l'invite  de  LILO
  (LILO  : ), soit dans un champ "append" du fichier de configuration de
  LILO (LILO 0.14 et superieurs utilisent le fichier /etc/lilo.conf, les
  versions precedentes /usr/lilo/config).

  Demarrez  votre  systeme avec LILO et appuyez sur une des touches ALT,
  CTRL ou SHIFT, au  moment  ou  il  affiche  le  prompt.  LILO  devrait
  repondre par :

       :

  A  cet  instant,  vous pouvez selectionner l'image du noyau sur lequel
  continuer le demarrage (en tapant son label) ou  avoir  la  liste  des
  images, en apppuyant sur ?. Par exemple :

       :?

       ramdisk floppy disquedur

  Pour  demarrer  (booter)  le  noyau avec la ligne de commande que vous
  avez choisie entrez simplement le nom  du  noyau,  suivi  d'une  liste
  d'options.  Chaque  option est separee de la precedente par un espace.
  L'appui sur ENTREE  valide  la  ligne  et  continue  le  processus  de
  demarrage.

  Les options sont de la forme :

       variable=liste_de_valeurs

  Ici,  lliissttee__ddee__vvaalleeuurrss  peut  etre  une  simple valeur ou une liste de
  valeurs delimitees par des virgules, sans espaces. Exception faite  de
  la  specification  du  peripherique  de  boot, chaque valeur doit etre
  numerique et peut etre fournie en decimal ou en hexadecimal.

  Par exemple, pour demarrer Linux avec  une  carte  compatible  Adaptec
  1520 non reconnue au demarrage, vous pourriez entrer :

       :floppy aha152x=0x340,11,7,1

  Si  vous  ne  tenez  pas  a taper cette commande a chaque demarrage du
  systeme, il est egalement possible d'utiliser l'option  "append"  dans
  le fichier de configuration de LILO (LILO 0.13 et plus).

  Cela donnera une ligne du genre :

       append="aha152x=0x340,11,7,1"

  22..33..  UUnn ppeerriipphheerriiqquuee aappppaarraaiitt aa ttoouutteess lleess aaddrreesssseess SSCCSSII

  Si c'est le cas, vous avez certainement selectionne comme adresse pour
  ce peripherique la meme adresse que le controleur  (traditionnellement
  l'adresse  7,  bien  que quelques cartes soient configurees autrement,
  comme certaines Future Domain fixees a 6 par exemple).

  Changez la configuration des cavaliers.

  22..44..  LLee mmeemmee ppeerriipphheerriiqquuee eesstt rreeccoonnnnuu aa cchhaaqquuee uunniittee llooggiiqquuee

  Ce peripherique a certainement un firmware bugge.

  Une  solution  temporaire  consiste  a  utiliser  la ligne de commande
  suivante :

       max_scsi_luns=1

  Si cela marche, vous pouvez ajouter votre peripherique a la liste  des
  peripheriques  bugges,  dans  les  sources  du  noyau.  La variable en
  question  s'appelle  bbllaacckklliisstt  et   se   trouve   dans   le   fichier
  drivers/scsi/scsi.c.   Envoyez  ensuite  le  patch  a  Linus  Torvalds
  <Linus.Torvalds@cs.Helsinki.FI>.

  22..55..  VVoouuss aavveezz ddeess ''sseennssee eerrrroorrss'' aalloorrss  qquuee  vvoouuss  ssaavveezz  qquuee  vvoottrree
  mmaatteerriieell nn''aa ppaass dd''eerrrreeuurrss

  Cela est parfois du a un mauvais  cordon  ou  a  une  terminaison  mal
  adaptee.

  Referez-vous au chapitre ``Dysfonctionnement generalise''.

  22..66..  UUnn nnooyyaauu ccoonnffiigguurree aavveecc ssuuppppoorrtt rreesseeaauu nnee mmaarrcchhee ppaass

  Les  routines  d'auto-detection  pour  la plupart des cartes reseau ne
  sont pas passives.  Il  se  peut  qu'elles  entrent  en  conflit  avec
  certaines cartes SCSI et qu'elles en perturbent le bon fonctionnement.

  22..77..  DDeess ppeerriipphheerriiqquueess ssoonntt ddeetteecctteess,,  mmaaiiss  iill  eesstt  iimmppoossssiibbllee  dd''yy
  aacccceeddeerr

  Un peripherique SCSI a  ete  detecte  par  le  noyau  mais  vous  etes
  incapable  d'y  acceder (les commandes mkfs /dev/sdc, tar xvf /dev/st2
  par exemple echouent).

  Vous n'avez pas de fichier special /dev/xxx pour votre peripherique.

  Sous Unix, les peripheriques sont en mode bloc ou en  mode  caractere.
  Les  peripheriques en mode bloc utilisent un mecanisme de cache, alors
  que les peripheriques en mode caractere ne sont  pas  bufferises.   Un
  peripherique  est  donc  defini  sous  Unix  par  son  mode  (bloc  ou
  caractere), son numero majeur (ce numero correspond au pilote  qui  le
  gere  --  ainsi, le majeur mode bloc 8 correspond aux disques SCSI) et
  un numero mineur (ce mineur definit quelle unite est accedee via cette
  specification  de peripherique -- ainsi, le peripherique reference par
  le majeur  caractere  4  et  le  mineur  0  est  la  premiere  console
  virtuelle, mineur 1 est la console suivante, etc.). Cependant, acceder
  aux  peripheriques  par  un  espace  de  nommage  separe  romprait  la
  tradition  d'Unix/Linux  ('tout  est  fichier'  !). C'est pourquoi des
  fichiers speciaux sont crees sous /dev.  Ces  fichiers  speciaux  vous
  permettront  d'acceder  directement  a votre troisieme disque SCSI via
  /dev/sdc, au premier port serie via /dev/ttyS0, etc.

  La meilleure methode pour creer un fichier special est  d'utiliser  le
  script MAKEDEV :

  cd /dev

  puis

  MAKEDEV  (en  tant  que  root)  pour les peripheriques que vous voulez
  creer. Par exemple :

        ./MAKEDEV sdc

  Les caracteres generiques "devraient" marcher. Par exemple :

        ./MAKEDEV sd\*

  "devrait" creer les entrees pour tous les disques  SCSI  (la  commande
  precedente  devrait  avoir  cree  /dev/sda  a  /dev/sdp, avec 15 sous-
  partitions pour chaque disque).

        ./MAKEDEV sdc\*

  "devrait" creer les entrees pour /dev/sdc et  ses  15  sous-partitions
  possibles (/dev/sdc1, /dev/sdc2, etc.).

  J'ai  dit "devrait" parce que c'est le comportement standard d'Unix --
  le script MAKEDEV de votre installation pourrait ne pas se conformer a
  cette facon de faire ou pourrait avoir restreint le nombre de fichiers
  speciaux qu'il peut creer, auquel cas ce qui precede  ne  serait  plus
  tout a fait vrai.

  Si  MAKEDEV  ne fait pas le travail pour vous, vous allez devoir creer
  les fichiers speciaux a la main grace a la commande mmkknnoodd.

  Le mode (bloc ou caractere), le majeur et le mineur sont precises pour
  les  divers peripheriques SCSI dans le chapitre ``Fichiers speciaux''.

  Notez les valeurs trouvees dans ce chapitre  et  tapez  (en  tant  que
  root) :

       mknod /dev/peripherique b|c majeur mineur

  par exemple :

       mknod /dev/sdc b 8 32
       mknod /dev/st0 c 9 0

  22..88..  LLee SSCCSSII ssee bbllooqquuee

  Il   peut   y   avoir   de  nombreuses  raisons  au  blocage  du  bus.
  Eventuellement, reportez-vous au chapitre dedie  a  votre  carte  pour
  plus de details.

  Certains  cas  de  blocage  semblent  se  produire  lorsque  plusieurs
  peripheriques sont en cours d'utilisation simultanement. Si cela  vous
  arrive,  essayez  de  contacter  le  fabricant  des  peripheriques  et
  regardez  s'il  n'existe  pas  des  mises  a  jour  de  firmware   qui
  resoudraient le probleme. A l'occasion, essayez de changer de cable ou
  branchez les peripheriques sur une autre machine.

  Il se peut egalement que ce soit du a des secteurs defectueux  sur  un
  des  disques  ou  encore  a une mauvaise gestion du DMA (Direct Memory
  Access) par la carte mere (pour les cartes d'interface qui travaillent
  en  DMA).  En  fait,  tout  un  tas d'autres raisons peut expliquer un
  blocage du bus.

  De temps en temps, comme nous  venons  de  le  signaler,  des  cas  de
  blocage  apparaissent lorsque plusieurs peripheriques sont utilises en
  meme temps sur le bus. Si votre  controleur  est  capable  de  traiter
  plusieurs  requetes  en meme temps, essayer de reduire la taille de la
  queue a 1 et regardez si la situation s'ameliore. Cela etant, si  vous
  utilisez  des  peripheriques  lents (lecteurs de bandes ou lecteurs de
  CDROM peu  rapides),  reduire  ainsi  la  taille  de  la  queue  n'est
  certainement pas la meilleure solution.

  22..99..  CCoonnffiigguurreerr eett rreeggeenneerreerr llee nnooyyaauu

  Les  pilotes  SCSI  non  utilises  consomment  inutilement de precieux
  octets et peuvent amener les systemes possedant peu de  memoire  a  en
  manquer  (la  memoire  du  noyau  est non paginable (swappable)). Pour
  cette raison, il est recommande de generer un noyau ne comportant  que
  le strict necessaire pour votre machine.

       cd /usr/src/linux

  Si  vous comptez utiliser une partition racine (root device) autre que
  la partition racine courante ou une resolution autre que du VGA 80x25,
  voire  si  vous generez une disquette de demarrage, editez le makefile
  et assurez-vous que les lignes

       ROOT_DEV =

  et

       SVGA_MODE =

  sont correctement positionnees.

  Si vous avez applique des patches,  assurez-vous  que  vous  tous  vos
  fichiers sont correctement recompiles. Dans le doute, tapez :

       make mrproper

  Dans tous les cas, vous devrez configurer le noyau :

       make config

  Repondez  aux  questions.  Apres avoir sauvegarde votre configuration,
  regenerez les dependances et recompilez le noyau :

  make depend
  make

  Une fois la generation du noyau terminee, n'oubliez  pas  de  relancer
  lilo  (//ssbbiinn//lliilloo).  Vous pouvez egalement construire une disquette de
  demarrage :

       make zdisk

  22..1100..  LLeess uunniitteess llooggiiqquueess aauuttrreess qquuee llaa pprreemmiieerree nnee ffoonnccttiioonnnneenntt ppaass

  De  nombreux  peripheriques  SCSI  verrouillent completement le bus ou
  reagissent bizarrement lorsque  vous  tentez  d'acceder  a  une  unite
  logique  (LUN)  qui  n'est  pas l'unite 0. C'est pourquoi les versions
  recentes du noyau Linux n'essaient  plus  par  defaut  de  tester  les
  unites  logiques  autres  que  0.   Si  cela  vous  gene,  vous pouvez
  positionner max_scsi_luns sur la ligne de commande  du  noyau  ;  vous
  pouvez   aussi   recompiler   le   noyau   en   positionnant  l'option
  CONFIG_SCSI_MULTI_LUN au moment de la configuration.

  Il est habituel de mettre

       max_scsi_luns=8

  sur la ligne de commande de LILO.

  Si, malgre tout, vos unites logiques ne sont toujours pas correctement
  detectees (cela peut arriver avec de vieux controleurs SCSI->MFM, RLL,
  ESDI ou SMD), essayez de supprimer le petit bout de code suivant de la
  fonction scan_scsis() du fichier drivers/scsi/scsi.c :

       /* Some scsi-1 peripherals do not handle lun != 0.
          I am assuming that scsi-2 peripherals do better */
       if((scsi_result[2] & 0x07) == 1 &&
          (scsi_result[3] & 0x0f) == 0) break;

  33..  SSiiggnnaalleerr uunnee aannoommaalliiee

  Soumis  a  des contraintes de place, les developpeurs des parties SCSI
  de Linux ne maintiennent pas obligatoirement les vieilles versions  du
  code.  Si  vous  ne  tournez pas avec la derniere version du noyau (la
  plupart des  distributions  de  Linux,  (MCC,  SLS,  Yggdrasil,  etc.)
  peuvent  avoir  jusqu'a  une  vingtaine  de  patches  de retard sur le
  dernier noyau), il y a une forte probabilite pour que  vous  ne  soyez
  pas  capable  de  resoudre  votre  probleme.  Avant  de  signaler  une
  anomalie, verifiez si  elle  existe  encore  avec  la  toute  derniere
  version du noyau.

  Si  apres  avoir mis a jour votre noyau et lu entierement ce document,
  vous pensez vraiment avoir decouvert un probleme, envoyez par email un
  rapport  d'anomalie  a  la  liste  de  diffusion  SCSI, ou il aura des
  chances d'etre lu par la plupart  des  personnes  ayant  participe  au
  developpement des pilotes SCSI pour Linux.

  Mettez  dans  votre  rapport  d'anomalie  le maximum d'information sur
  votre configuration materielle, le texte exact des messages que  Linux
  affiche  au  demarrage,  le  moment  ou  l'erreur se produit et a quel
  endroit dans les  sources  l'erreur  a  ete  levee.  Referez-vous  aux
  chapitres ``Capture des messages SCSI'' et ``Localisation de l'origine
  d'un panic()''.

  Des informations incompletes peuvent conduire a de mauvais diagnostics
  ou  a  un classement vertical de la part du developpeur du pilote, qui
  risque d'estimer qu'il a plus important a corriger.

  Retenez bien ceci : si nous ne pouvons pas reproduire le  probleme  et
  si  vous  ne  pouvez pas nous dire ce qui ne marche pas, l'anomalie ne
  sera jamais corrigee.

  33..11..  CCaappttuurree ddeess mmeessssaaggeess SSCCSSII

  Si aucun archiveur (logger) de messages ne tourne, il  va  falloir  en
  lancer un.  Verifiez que le systeme de fichiers /proc est monte :

       grep proc /etc/mtab

  S'il ne l'est pas, il faut le monter :

       mkdir /proc
       chmod 755 /proc
       mount -t proc /proc /proc

  Recopiez  ensuite  la version du noyau et ses messages dans un fichier
  de log :

       cat /proc/version > /tmp/log
       cat /proc/kmsg >> /tmp/log

  Attendez une seconde ou deux  (le  temps  que  le  ccaatt  //pprroocc//kkmmssgg  se
  termine) puis tapez CTRL-C.

  Si  un  logger  de messages tourne, vous allez devoir chercher dans le
  fichier de traces adequat  (jetez  un  oeil  a  /etc/syslog.conf  pour
  trouver  ou  se cache ce fichier). Vous pouvez aussi taper la commande
  ddmmeessgg.

  Si Linux n'est pas lance, formatez une disquette sous DOS.   Si  votre
  distribution monte la disquette en tant que racine (root) plutot qu'un
  disque RAM, vous allez devoir formater une disquette et la mettre dans
  le  lecteur  non  utilise  par  la  racine  (si  vous disposez de deux
  lecteurs). Si vous n'avez  pas  de  second  lecteur,  il  vous  faudra
  utiliser l'option de demarrage 'ramdisk'.

  Maintenant,   demarrez   depuis   la   disquette   de  boot  de  votre
  distribution, de preference en mode utilisateur simple  (single  user)
  et en demandant a placer la racine (root) dans un disque RAM.

       mkdir /tmp/dos

  Inserez la disquette dans un lecteur non utilise pour monter la racine
  et montez-la :

       mount -t msdos /dev/fd0 /tmp/dos

  ou

       mount -t msdos /dev/fd1 /tmp/dos

  Copiez-y ensuite votre fichier de traces :

       cp /tmp/log /tmp/dos/log

  Demontez votre disquette DOS

       umount /tmp/dos

  et arretez Linux.

       shutdown

  Redemarrez sous DOS puis incluez le fichier de traces dans votre mail.

  33..22..  LLooccaalliissaattiioonn ddee ll''oorriiggiinnee dd''uunn ppaanniicc(())

  Ainsi  que  d'autres  Unix le font, Linux appelle la fonction du noyau
  panic()  lorsqu'une  erreur   fatale   est   detectee.   Par   contre,
  contrairement a d'autres Unix, Linux ne produit pas un fichier de dump
  dans la swap. Il ne redemarre pas non plus. Il laisse dans le  fichier
  de traces des informations interessantes. Par exemple :

       Unable to handle kernel NULL pointer dereference at virtual address c0000004
       current->tss,cr3 = 00101000, %cr3 = 00101000
       *pde = 00102027
       *pte = 00000027
       Oops: 0000
       EIP:    0010:0019c905
       EFLAGS: 00010002
       eax: 0000000a   ebx: 001cd0e8   ecx: 00000006   edx: 000003d5
       esi: 001cd0a8   edi: 00000000   ebp: 00000000   esp: 001a18c0
       ds: 0018   es: 0018   fs: 002b   gs: 002b   ss: 0018
       Process swapper (pid: 0, process nr: 0, stackpage=001a09c8)
       Stack: 0019c5c6 00000000 0019c5b2 00000000 0019c5a5 001cd0a8 00000002 00000000
              001cd0e8 001cd0a8 00000000 001cdb38 001cdb00 00000000 001ce284 0019d001
              001cd004 0000e800 fbfff000 0019d051 001cd0a8 00000000 001a29f4 00800000
       Call Trace: 0019c5c6 0019c5b2 0018c5a5 0019d001 0019d051 00111508 00111502
                   0011e800 0011154d 00110f63 0010e2b3 0010ef55 0010ddb7
       Code: 8b 57 04 52 68 d2 c5 19 00 e8 cd a0 f7 ff 83 c4 20 8b 4f 04
       Aiee, killing interrupt handler
       kfree of non-kmalloced memory: 001a29c0, next= 00000000, order=0
       task[0] (swapper) killed: unable to recover
       Kernel panic: Trying to free up swapper memory space
       In swapper task - not syncing

  Prenez  la  valeur  hexadecimale  du  registre  EIP  (le  compteur  de
  programme ; ici, en l'occurence, 19c905).  Cherchez  ensuite  dans  le
  fichier   /usr/src/linux/zSystem.map   (ou   le   fichier   System.map
  correspondant au noyau que vous etes  en  train  d'executer)  la  plus
  grande valeur inferieure a la valeur du registre EIP. Par exemple,

       0019a000 T _fix_pointers
       0019c700 t _intr_scsi
       0019d000 t _NCR53c7x0_intr

  indique   dans   quelle   fonction  l'erreur  fatale  s'est  produite.
  Recompilez ce fichier en ayant autorise les  options  de  debug  (vous
  pouvez  aussi  les  autoriser  a  un  niveau plus global en editant le
  fichier /usr/src/linux/Makefile et en  ajoutant  l'option  "-g"  a  la
  variable CFLAGS).

       #
       # standard CFLAGS
       #

  Par exemple :

       CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe

  devient

       CFLAGS = -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe

  Regenerez le noyau, incrementalement ou en tapant

       make clean
       make

  Rendez  le  noyau  demarrable  (bootable) en creant une entree dans le
  fichier /etc/lilo.conf :

       image = /usr/src/linux/zImage
       label = experimental

  N'oubliez pas de relancer LILO en tant  que  root  (//ssbbiinn//lliilloo).  Vous
  pouvez aussi creer une disquette de demarrage :

       make zImage

  Redemarrez et notez le nouvel EIP pour l'erreur.

  Si  vous  avez  installe  script, lancez-le ; il va tracer toute votre
  session dans un fichier.

  Maintenant, lancez

       gdb /usr/src/linux/tools/zSystem

  et tapez

       info line *<votre EIP>

  Par exemple,

       info line *0x19c905

  GDB devrait repondre quelque chose du genre

       (gdb) info line *0x19c905
       Line 2855 of "53c7,8xx.c" starts at address 0x19c905 <intr_scsi+641&>
          and ends at 0x19c913 <intr_scsi+655>.

  Memorisez cette information. Entrez ensuite

       list <numero de ligne>

  Par exemple,

       (gdb) list 2855
       2850    /*      printk("scsi%d : target %d lun %d unexpected disconnect\n",
       2851                host->host_no, cmd->cmd->target, cmd->cmd->lun); */
       2852            printk("host : 0x%x\n", (unsigned) host);
       2853            printk("host->host_no : %d\n", host->host_no);
       2854            printk("cmd : 0x%x\n", (unsigned) cmd);
       2855            printk("cmd->cmd : 0x%x\n", (unsigned) cmd->cmd);
       2856            printk("cmd->cmd->target : %d\n", cmd->cmd->target);
       2857            if (cmd) {;
       2858                abnormal_finished(cmd, DID_ERROR << 16);
       2859            }
       2860            hostdata->dsp = hostdata->script + hostdata->E_schedule /
       2861                sizeof(long);
       2862            hostdata->dsp_changed = 1;
       2863        /* SCSI PARITY error */
       2864        }
       2865
       2866        if (sstat0_sist0 & SSTAT0_PAR) {
       2867            fatal = 1;
       2868            if (cmd && cmd->cmd) {
       2869                printk("scsi%d : target %d lun %d parity error.\n",

  quit vous permet de sortir de GDB.

  Sauvegardez egalement cette information, car elle permettra de fournir
  le  contexte  dans  lequel l'erreur s'est produite, pour le cas ou les
  developpeurs n'auraient pas exactement la meme arborescence.

  44..  LLeess mmoodduulleess

  Ce chapitre fournit des details specifiques sur le support des modules
  chargeables  et  sur la maniere dont ces modules sont utilises avec le
  SCSI.

  44..11..  IInnffoorrmmaattiioonnss ggeenneerraalleess

  Les   modules   chargeables   permettent   a   l'utilisateur   ou    a
  l'administrateur  du systeme d'etendre les fonctionnalites du noyau en
  y chargeant des fichiers objet. L'utilisation  la  plus  courante  des
  modules  est  l'ajout  de pilotes pour de nouveaux peripheriques ou la
  prise en compte de differents types de systemes de fichiers.

  L'utilisation des modules pour le SCSI presente  plusieurs  avantages.
  Un  de  ceux-ci est que le responsable d'un parc important de machines
  n'a a gerer qu'un seul noyau pour  tout  le  parc  et  n'a  plus  qu'a
  charger les modules necessaires machine par machine.

  Pour  ceux  qui ont l'intention de creer une nouvelle distribution, il
  est possible de lancer un script depuis la disquette de demarrage  qui
  va  demander a l'utilisateur quels modules sont a charger. Cela permet
  de gagner de la memoire (qui serait gaspillee si  le  noyau  contenait
  tous  les pilotes) et cela reduit le risque que l'auto-detection d'une
  carte vienne perturber le fonctionnement d'autres cartes.

  Les modules sont parfaits pour les portables, qui ont tendance a  etre
  moins  fournis  que  leurs  grands  freres de bureaux. Dans ce cas, un
  noyau aussi reduit que possible  avec  chargement  des  modules  a  la
  demande  est  l'ideal.  De  plus,  les  modules  sont  bien adaptes au
  mecanisme des cartes PCMCIA,  puisqu'ils  peuvent  etre  charges  puis
  decharges  au  gre  des insertions/retraits des cartes PCMCIA. (Note :
  actuellement, les pilotes qlogic et 152x supportent le PCMCIA).

  Un dernier avantage des modules est que les  developpeurs  de  pilotes
  ont  plus  de  facilite  a  mettre au point et tester leurs pilotes si
  ceux-ci sont sous forme  de  modules  (il  n'est  plus  necessaire  de
  redemarrer  la  machine  a  chaque  essai, a condition bien sur que le
  pilote ne soit pas bugge au point qu'il ait mis en rideau le PC).

  Mais,  il  y  a  toujours  un  mais,  les  modules  ont  aussi   leurs
  limitations.  Si votre partition racine (root) est sur un peripherique
  SCSI, vous ne serez pas capable d'utiliser les versions 'modularisees'
  des  pilotes SCSI necessaires a l'acces a votre disque. Cela est du au
  fait que le noyau doit etre capable  de  monter  la  partition  racine
  avant  de  pouvoir  charger  le  moindre module depuis le disque. Cela
  etant, des reflexions sont en cours pour modifier le  chargeur  et  le
  noyau  de  maniere  a  ce  que celui-ci soit capable de precharger des
  modules avant d'essayer de monter la partition  racine.  Il  est  fort
  probable qu'a l'avenir la limitation actuelle ne soit plus de mise.

  44..22..  LLee ssuuppppoorrtt ddeess mmoodduulleess ddaannss lleess nnooyyaauuxx 11..22..NN

  Les  modules  noyau  pour le SCSI sont partiellement supportes dans la
  serie 1.2.N du noyau.  Alors  qu'aucun  des  pilotes  de  haut  niveau
  (disque,  bande, etc.) ne peut etre modularise, la plupart des pilotes
  de bas niveau peuvent etre charges et  decharges  a  la  demande  (par
  exemple  les 1542 et 1522). Chaque fois qu'un pilote de bas niveau est
  charge, il commence  par  rechercher  les  cartes  qu'il  peut  gerer.
  Ensuite,  pour  chaque  carte  detectee, le bus SCSI est scrute et des
  structures de donnees internes sont renseignees, si  bien  qu'il  sera
  possible   d'utiliser  tous  les  peripheriques  attaches  aux  cartes
  reconnues.

  Lorsque vous en avez termine avec un pilote de  bas  niveau,  celui-ci
  peut etre decharge. Gardez a l'esprit que l'utilisation d'un pilote se
  fait au travers des montages,  des  fichiers  ouverts,  etc.  Si  vous
  essayez  de  decharger  un  module  en cours d'utilisation (utilitaire
  rrmmmmoodd), le noyau va refuser le retrait du pilote. Lorsqu'un pilote est
  decharge, toutes ses structures internes sont liberees, si bien que le
  systeme retourne dans l'etat ou il se trouvait  avant  l'insertion  du
  module. Vous pourrez recharger le pilote plus tard si vous le desirez.

  44..33..  LLee ssuuppppoorrtt ddeess mmoodduulleess ddaannss lleess nnooyyaauuxx 11..33..NN

  Le code SCSI a ete completement modularise dans les noyaux 1.3.N. Vous
  pouvez  donc  demarrer  avec  un noyau n'ayant aucun support SCSI, les
  modules  se  chargeant  par  la  suite,  jusqu'a  ce  que   tous   les
  peripheriques SCSI possibles soient accessibles.

  Si  vous  le  voulez,  vous pouvez integrer dans le noyau une certaine
  partie du code SCSI et charger  le  reste  plus  tard  sous  forme  de
  modules. Tout cela depend entierement de vous.

  Si vous demarrez avec un noyau qui n'a aucun support SCSI, vous devrez
  commencer par charger la base SCSI. La base se trouve dans  un  module
  nomme  "scsi_mod"  ; elle est indispensable a la gestion du SCSI. Elle
  ne contient par contre aucun pilote specifique de bas niveau et de  ce
  fait  ne scrutera ni carte, ni peripherique. Cette base n'activera pas
  non plus de pilotes de disques SCSI, de lecteurs de  bandes,  etc.  Si
  vous  avez  repondu  'Y'  a  la  question  CCOONNFFIIGG__SSCCSSII  au  moment  de
  construire le noyau, vous n'aurez pas besoin de charger ce module.

  Maintenant que "scsi_mod" est  present  dans  le  noyau,  vous  pouvez
  ajouter  les  modules  plus  ou  moins  dans n'importe quel ordre pour
  ouvrir l'acces a vos peripheriques. Des compteurs  d'utilisation  sont
  presents  pour  eviter  de  retirer un pilote occupe. Si vous utilisez
  rmmod, vous en serez averti par un message d'erreur.

  Les pilotes de haut niveau pour les disques, les  lecteurs  de  CDROM,
  les  lecteurs  de  bandes  et  le  support  SCSI generique se trouvent
  respectivement dans les modules  "sd_mod",  "sr_mod",  "st"  et  "sg".
  Lorsque  vous chargez un pilote de haut niveau, tous les peripheriques
  detectes (par les pilotes de bas niveau) et geres par ce  pilote  sont
  automatiquement actives.

  L'utilisation des modules avec des pilotes de bas niveau a ete decrite
  dans le chapitre ``Le support des modules  dans  les  noyaux  1.2.N''.
  Lorsqu'un pilote de bas niveau est charge, le bus est scrute et chaque
  peripherique reconnu est ensuite eventuellement pris en charge par  un
  pilote de plus haut niveau (voir paragraphe precedent).

  55..  CCaarrtteess dd''iinntteerrffaaccee

  Ce chapitre donne des informations specifiques sur les diverses cartes
  d'interface SCSI qui sont supportees d'une maniere ou d'une autre  par
  Linux.

  55..11..  MMaatteerriieell ssuuppppoorrttee eett nnoonn ssuuppppoorrttee

  Les pilotes de la distribution du noyau :

  Adaptec   152x,   Adaptec  154x  (les  cartes  DTC  329x  fonctionnent
  theoriquement, mais ne sont pas explicitement gerees),  Adaptec  174x,
  Adaptec  274x/284x (le support pour la 294x necessite une version plus
  recente du pilote), BusLogic MultiMaster  Host  Adapters,  les  cartes
  compatibles  avec  les  protocoles  EATA-DMA  et EATA-PIO (DPT PM2001,
  PM2011, PM2012A, PM2012B,  PM2021,  PM2022,  PM2024,  PM2122,  PM2124,
  PM2322,  PM2041,  PM2042,  PM2044,  PM2142,  PM2144,  PM2322,  PM3021,
  PM3122, PM3222, PM3224, PM3334, quelques cartes  de  NEC,  AT&T,  SNI,
  AST, Olivetti et Alphatronix), Future Domain 850, 885, 950 et d'autres
  cartes de cette serie (sauf les cartes 840, 841, 880 et  881  a  moins
  que  vous  n'appliquiez le patch adequat), Future Domain 16x0 avec les
  composants TMC-1800, TMC-18C30 ou  TMC-18C50,  NCR53c8xx,  PAS16,  les
  ports SCSI, Seagate ST0x, les cartes Trantor T128/T130/T228, Ultrastor
  14F, 24F et 34F et les Western Digital 7000.

  MCA :

  Les cartes MCA compatibles avec une  des  cartes  precedemment  citees
  fonctionnent.

  Les pilotes alpha :

  Plusieurs pilotes ALPHA sont disponibles a

       ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi

  Certains pilotes fonctionnent apres quelques modifications :

  NCR53c8x0/7x0:

       Un pilote NCR53c8xx a ete developpe mais il ne marche toujours pas avec les
       composants NCR53c700, NCR53c700-66, NCR53c710 et NCR53c720. Une liste des
       modifications necessaires pour le faire marcher sur chacun de ces composants
       est fournie ci-apres, accompagnee d'un resume de la difficulte de chaque patch.

       NCR53c720 (facile) - modifications dans la detection du composant, dans la
       phase d'initialisation, dans la traduction des adresses des registres '810
       vers l'organisation (mapping) des registres '7xx.

       NCR53c710 (facile) - modifications dans la detection du composant, dans la
       phase d'initialisation, dans la traduction des adresses des registres '810
       vers l'organisation (mapping) des registres '7xx, modification des
       gestionnaires d'interruption pour traiter l'interruption IID de l'instruction
       INTFLY pour l'emuler (Note aux relecteurs (a supprimer dans la version
       definitive) je ne suis pas sur d'avoir bien compris ce que voulait dire
       l'auteur : change interrupt handlers to treat IID interrupt from INTFLY
       instruction to emulate it),

       NCR53c700, NCR53c700-66 (tres complique) - modifications dans la detection
       des composants, dans la phase d'initialisation. Modification du code du NCR
       pour ne pas utiliser DSA, modification du code de la gestion des commutations
       de contextes.

  Les cartes SCSI qui ne marcheront pas :

  Tous  les  adapteurs  parallele->SCSI,  les  cartes Rancho SCSI et les
  cartes Grass Roots SCSI. Les cartes BusLogic  FlashPoint,  telles  que
  les BT-930/932/950, ne sont actuellement pas supportees.

  Les cartes SCSI qui ne marcheront JAMAIS :

  Les  cartes  non  compatibles Adaptec, les cartes non NCR53c8xx DTC (y
  compris les 3270 et les 3280).

  Les cartes CMD SCSI.

  L'obtention d'informations techniques  sur  ces  cartes  necessite  la
  signature   d'un  accord  de  confidentialite  (NDA  :  non-disclosure
  agreement) avec DTC/CMD.  En consequence, distribuer  un  pilote  pour
  Linux  est  impossible  car  se  conformer a cet accord signifie qu'il
  n'est pas possible de fournir les sources, ce qui est en violation  de
  la  GPL.  Inversement,  se conformer a la GPL signifie que les sources
  doivent etre rendus publics, ce qui est en conflit avec la NDA.

  Si vous voulez utiliser Linux  sur  du  materiel  non  supporte,  deux
  options s'offrent a vous :

  1. ecrire  vous-meme  le  pilote (Eric Youngdale et moi-meme repondons
     volontiers aux questions  techniques  sur  les  pilotes  SCSI  pour
     Linux),

  2. faire developper le pilote (les tarifs habituels des sous-traitants
     rendent  cette   solution   non   viable   pour   une   utilisation
     personnelle),

  55..11..11..  CCaarrtteess ccoonnttrroolleeuurr mmuullttiipplleess

  Avec  certaines  cartes  (voir ``Guide de l'acheteur : comparaison des
  fonctionnalites''), vous pouvez utiliser plusieurs controleurs du meme
  type  sur la meme machine. Dans ce cas, la plus petite adresse SCSI va
  etre referencee par le noyau comme scsi0,  la  suivante  comme  scsi1,
  etc.

  Dans tous les cas, il est possible d'utiliser des controleurs de types
  differents, sous reserve que leurs adresses n'entrent pas en  conflit.
  Les  cartes controleur sont scrutees dans l'ordre suivant (defini dans
  le tableau builtin_scsi_hosts[] du fichier drivers/scsi/hosts.c) :

       BusLogic,   Ultrastor   14/34F,   Ultrastor   14F,   Adaptec
       151x/152x,  Adaptec  154x,  Adaptec 174x, AIC7XXX, AM53C974,
       Future Domain 16x0, Always IN2000, Generic NCR5380,  QLOGIC,
       PAS16,  Seagate,  Trantor  T128/T130,  NCR53c8xx,  EATA-DMA,
       WD7000 et le pilote de mise au point.

  Dans la plupart des cas (c'est-a-dire si vous n'utilisez pas  en  meme
  temps  une  BusLogic  et  une Adaptec), le tableau precedent peut etre
  change pour definir un ordre qui vous convient  mieux  (de  maniere  a
  garder  le  meme  ordre pour les peripheriques de votre ancienne carte
  lorsque vous ajoutez une nouvelle carte dans votre systeme);  il  vous
  suffit de deplacer les entrees du tableau.

  55..22..  PPrroobblleemmeess hhaabbiittuueellss

  55..22..11..  TTiimmeeoouuttss SSCCSSII

  Verifiez que les interruptions sont bien autorisees et qu'il n'y a pas
  de conflits d'IRQ, de DMA ou d'adresses avec d'autres cartes.

  55..22..22..  EEcchheecc ddee ll''aauuttoo--ddeetteeccttiioonn ddeess ccaarrtteess  qquuii  ss''aappppuuiieenntt  ssuurr  llee
  BBIIOOSS

  Si votre controleur SCSI est un des suivants :

       Adaptec  152x,  Adaptec  151x,  Adaptec  AIC-6260,   Adaptec
       AIC-6360,  Future Domain 1680, Future Domain TMC-950, Future
       Domain TMC-8xx, Trantor T128, Trantor T128F, Trantor  T228F,
       Seagate ST01, Seagate ST02 ou un Western Digital 7000

  et qu'il n'est pas detecte au demarrage (vous avez eu par exemple :

       scsi : 0 hosts

  ou encore

       scsi%d : type

  au  demarrage),  vous  avez  certainement  un probleme avec la routine
  d'auto-detection qui ne reconnait pas votre carte controleur.

  L'auto-detection echoue pour les pilotes qui s'appuient sur le BIOS si
  celui-ci  est  desactive.  Verifiez  plutot deux fois qu'une que votre
  BIOS est active et qu'il n'entre pas en conflit avec celui d'un  autre
  peripherique.

  L'auto-detection  peut egalement echouer si la "signature" de la carte
  et son adresse de BIOS ne font pas  partie  de  la  liste  des  cartes
  connues.

  Si  le  BIOS  est installe, redemarrez sous DOS et utilisez DEBUG pour
  trouver la signature de votre carte.

  Par exemple, si votre carte se trouve a l'adresse 0xc8000,  redemarrez
  sous DOS puis tapez :

       debug
       d c800:0
       q

  Envoyez  ensuite  un  message  a  la  liste  de diffusion SCSI avec le
  message ASCII obtenu, sa longueur et son  deplacement  par  rapport  a
  l'adresse  de  base  (par exemple 0xc8000). Attention : le texte exact
  est necessaire et vous aurez certainement a fournir une version  ASCII
  et une autre binaire du message.

  Si aucun BIOS n'est installe et si vous utilisez une Adaptec 152x, une
  Trantor T128 ou un controleur Seagate, vous pouvez utiliser  la  ligne
  de  commande  (LILO)  ou bien surcharger des variables au moment de la
  compilation de maniere a ce  que  l'auto-detection  fonctionne  malgre
  tout.

  Reportez-vous a la section appropriee de votre carte SCSI, ainsi qu'au
  chapitre ``Dysfonctionnement generalise''.

  55..22..33..  PPaannnneess ddee ccoonnttrroolleeuurrss uuttiilliissaanntt ddeess EE//SS mmaappppeeeess eenn mmeemmooiirree

  (Les  cartes Trantor T128 et Seagate sont de telles cartes. Les cartes
  Adaptec, Generic NCR5380, PAS16 et Ultrastor n'en sont pas)

  Les pannes sont souvent dues a un 'cache' des ports  d'entrees/sorties
  incorrect.  L'espace  d'adressage  de la carte doit etre indique comme
  'non cachable' dans les parametres  de  la  XCMOS.  Si  ce  n'est  pas
  possible, il vous faudra completement interdire le 'cache'.

  Si  vous  avez  manuellement specifie l'adresse de la carte, souvenez-
  vous que Linux a besoin de la veritable adresse de la carte et non pas
  de  l'adresse  segmentee  (par  segments  de  16 octets) a laquelle la
  documentation pourrait faire reference.

  Ainsi, 0xc8000 est une adresse valide, tandis que 0xc800 ne marche pas
  et  risque de causer des problemes d'integrite de la memoire du noyau.

  55..22..44..  kkeerrnneell ppaanniicc :: ccaannnnoott mmoouunntt rroooott ddeevviiccee"" aauu ddeemmaarrrraaggee aavveecc uunnee
  ddiissqquueettttee ddee ddeemmaarrrraaggee ccoommppoorrttaanntt uunn ppiilloottee AALLPPHHAA

  Vous allez devoir editer l'image binaire  du  noyau  (avant  ou  apres
  l'avoir ecrite sur la disquette) pour modifier quelques champs de deux
  octets (en petit indien -- little  endian),  afin  de  garantir  qu'il
  fonctionnera sur votre systeme.

  1. le  peripherique  de  pagination  (swap) par defaut. Il se trouve a
     l'offset 502 et doit valoir 0x00 0x00

  2. la taille du disque memoire (RAM disk) se trouve  a  l'offset  504.
     Elle doit valoir la taille de la disquette de demarrage, en Ko. Par
     exemple, pour une disquette  5,25",  on  trouvera  1200.  Pour  une
     disquette 3,5", on aura 1440.

       C'est a dire que les octets doivent etre

       3,5" : 0xA0 0x05
       5,25" : 0xB0 0x04

  3. l'identificateur  du  peripherique  de  la  racine (root device) se
     trouve a la position 508 et doit valoir 0x00 0x00  (qui  represente
     le peripherique de demarrage).

  Recopiez  le  fichier  sur  la  disquette  par  dddd ou rraawwrriittee. Inserez
  ensuite la disquette dans un lecteur  puis  relancez.  Attendez  qu'il
  vous  soit  demande  d'inserer  la  disquette  racine (root disk) puis
  mettez celle fournie avec votre distribution.

  55..22..55..  IInnssttaallllaattiioonn dd''uunn ppiilloottee nnoonn iinncclluuss ddaannss llee nnooyyaauu ddee  llaa  ddiiss--
  ttrriibbuuttiioonn

  Vous devez  commencer  avec  la  version  du  noyau  utilisee  par  le
  developpeur  du  pilote. Il arrive qu'on trouve la version en question
  dans la documentation incluse avec le pilote.

  Des versions recentes du noyau sont presentes a l'adresse

       nic.funet.fi:/pub/OS/Linux/PEOPLE/Linus

  dans les fichiers linux-version.tar.gz

  On peut egalement les trouver sur divers sites et autres miroirs (dont
  tsx-11.mit.edu).

       cd /usr/src

  Supprimez  l'ancienne  arborescence  des sources de Linux ou faites-en
  une copie :

       mv linux linux-old

  Desarchivez le fichier

       gunzip < linux-0.99.12.tar.gz | tar xvfp -

  (pour la version 0.99.12 ici). Appliquez les patches.  Habituellement,
  les  patches  sont relatifs a un des repertoires de l'arborescence. En
  recherchant la chaine '---' dans le  fichier  de  patch,  vous  pouvez
  savoir a partir d'ou l'appliquer. Ainsi, des lignes

       --- ./kernel/blk_drv/scsi/Makefile

       --- ./config.in Wed Sep  1 16:19:33 1993

  vous  pouvez  deduire  que  les  fichiers  a  modifier sont relatifs a
  /usr/src/linux.

  Desarchivez les sources du pilote a l'endroit approprie :

       tar tfv patches.tar

  vous fournira  d'abord  une  liste  des  fichiers.  Deplacez  quelques
  fichiers  si  necessaire  (les  sources  des  pilotes  SCSI doivent se
  trouver dans le repertoire /usr/src/linux/kernel/drivers/scsi).

  Vous pouvez ensuite aller dans le repertoire racine du patch et  taper
  :

       patch -p0 < patch_file

  Vous  pouvez  egalement  demander  a  'patch'  d'eliminer  les chemins
  initiaux des noms des fichiers a  modifier.  Ainsi,  si  les  fichiers
  commencent par

       --- linux-new/kernel/blk_drv/scsi/Makefile

  et   que   vous   voulez   appliquer   le   patch  directement  depuis
  /usr/src/linux, vous pouvez faire les operations suivantes :

       cd /usr/src/linux
       patch -p1 < patches

  pour supprimer le "linux-new" des noms des fichiers.

  Une fois les patches appliques, verifiez qu'il n'y a pas eu de  rejets
  (un  fichier  de  rejet  a  la  meme nom que le fichier a modifier, un
  suffixe # y etant ajoute).

       find /usr/src/linux/ -name "*#" -print

  Si vous trouvez des fichiers de rejet, editez-les. Parfois, seules les
  chaines  d'identification RCS seront differentes. Cela ne posera alors
  pas  de  probleme.  Dans  d'autres  cas,  il  vous  faudra   appliquer
  d'importantes  parties du patch a la main. Il n'est pas dans l'optique
  de ce document de decrire les fichiers de differences ou l'utilisation
  de patch.

  Referez-vous  egalement  a  la  section  ``Configurer  et regenerer le
  noyau''.

  55..22..66..  IInnssttaallllaattiioonn dd''uunn ppiilloottee qquuii nn''aa ppaass ddee ppaattcchheess

  L'auteur d'un pilote ne fournit parfois pas de patches avec les .c  et
  .h  qui  forment  le  pilote.  Il se peut aussi que les patches soient
  faits pour une vieille version du noyau et qu'ils risquent de  ne  pas
  passer avec le noyau courant.

  1. copiez les .c et les .h dans /usr/src/linux/drivers/scsi

  2. ajoutez l'option de configuration

     Editez   /usr/src/linux/config.in   puis  ajoutez  une  ligne  (une
     variable de configuration booleenne  pour  votre  pilote)  dans  le
     chapitre

       *
       * SCSI low-level drivers
       *

  Par exemple

       bool 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 y

  3. ajoutez les entrees dans le Makefile

     Editez  /usr/src/linux/drivers/scsi/Makefile  et ajoutez une entree
     similaire a

       ifdef CONFIG_SCSI_IN2000
       SCSI_OBS := $(SCSI_OBJS) in2000.o
       SCSI_SRCS := $(SCSI_SRCS) in2000.c
       endif

  juste avant la ligne

       scsi.a: $(SCSI_OBJS)

  du makefile. Ici, le fichier .c est votre fichier source et le .o  est
  le  fichier  objet  genere a partir de votre fichier source (le .c est
  remplace par le .o).

  4. ajoutez les points d'entree

     Editez /usr/src/linux/drivers/scsi/hosts.c puis ajoutez un #include
     pour  le fichier d'entete, mis en conditionnel par la constante que
     vous venez  de  definir  dans  le  fichier  de  configuration.  Par
     exemple, apres

       #ifdef CONFIG_SCSI_GENERIC_NCR5380
       #include "g_NCR5380.h"
       #endif

  vous pouvez ajouter

       #ifdef CONFIG_SCSI_IN2000
       #include "in2000.h"
       #endif

  Vous  devez egalement ajouter l'entree pour le Scsi_Host_Template dans
  le tableau scsi_hosts[]. Jetez un oeil dans  le  fichier  .h  et  vous
  devriez y trouver un #define qui ressemble a :

       #define IN2000 {"Always IN2000", in2000_detect, \
           in2000_info, in2000_command,    \
           in2000_queuecommand,            \
           in2000_abort,                   \
           in2000_reset,                   \
           NULL,                           \
           in2000_biosparam,               \
           1, 7, IN2000_SG, 1, 0, 0}

  Ajoutez  la constante IN2000 dans le tableau scsi_hosts[], rendue con-
  ditionnelle par le symbole que vous venez de definir dans  le  fichier
  de configuration.

  Par exemple, apres

       #ifdef CONFIG_SCSI_GENERIC_NCR5380
               GENERIC_NCR5380,
       #endif

  vous pouvez ajouter

       #ifdef CONFIG_SCSI_IN2000
               IN2000,
       #endif

  Referez-vous au chapitre ``Configurer et regenerer le noyau''.

  55..22..77..  PPaannnnee dd''uunnee ccaarrttee PPCCII ddaannss uunn ssyysstteemmee CCoommppaaqq

  Un  certain  nombre de machines Compaq logent les extensions 32-bit du
  BIOS permettant de tester les controleurs PCI dans  une  zone  memoire
  inaccessible  au  noyau  Linux  (cela  est  du  a l'organisation de la
  memoire). Si Linux est incapable de detecter une carte PCI SCSI connue
  comme etant supportee et si le noyau affiche un message du genre

       pcibios_init: entry in high memory, unable to access

  allez chercher

       ftp://ftp.compaq.com/pub/softpaq/Software-Solutions/sp0921.zip

  C'est  un  programme auto-extractible qui vous permettra de reloger le
  code du BIOS32.

  55..22..88..  UUnn ssyysstteemmee SSCCSSII aavveecc ddeess ccoonnttrroolleeuurrss PPCCII ssee  bbllooqquuee  aapprreess  llee
  mmeessssaaggee %%dd HHoossttss

  Certains  systemes  PCI  ont  un  BIOS  defectueux  qui   masque   les
  interruptions  et  qui n'arrive pas a les demasquer avant de rendre la
  main a l'appelant. Le patch suivant corrige ce probleme :

  --- bios32.c.orig       Mon Nov 13 22:35:31 1995
  +++ bios32.c    Thu Jan 18 00:15:09 1996
  @@ -56,6 +56,7 @@
   #include <linux/pci.h>

   #include <asm/segment.h>
  +#include <asm/system.h>

   #define PCIBIOS_PCI_FUNCTION_ID        0xb1XX
   #define PCIBIOS_PCI_BIOS_PRESENT       0xb101
  @@ -125,7 +126,9 @@
          unsigned long address;          /* %ebx */
          unsigned long length;           /* %ecx */
          unsigned long entry;            /* %edx */
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%edi)"
                  : "=a" (return_code),
                    "=b" (address),
  @@ -134,6 +137,7 @@
                  : "0" (service),
                    "1" (0),
                    "D" (&bios32_indirect));
  +       restore_flags(flags);

          switch (return_code) {
                  case 0:
  @@ -161,11 +165,13 @@
          unsigned char present_status;
          unsigned char major_revision;
          unsigned char minor_revision;
  +       unsigned long flags;
          int pack;

          if ((pcibios_entry = bios32_service(PCI_SERVICE))) {
                  pci_indirect.address = pcibios_entry;

  +               save_flags(flags);
                  __asm__("lcall (%%edi)\n\t"
                          "jc 1f\n\t"
                          "xor %%ah, %%ah\n"
  @@ -176,6 +182,7 @@
                          : "1" (PCIBIOS_PCI_BIOS_PRESENT),
                            "D" (&pci_indirect)
                          : "bx", "cx");
  +               restore_flags(flags);

                  present_status = (pack >> 16) & 0xff;
                  major_revision = (pack >> 8) & 0xff;
  @@ -210,7 +217,9 @@
   {
          unsigned long bx;
          unsigned long ret;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__ ("lcall (%%edi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -221,6 +230,7 @@
                    "c" (class_code),
                    "S" ((int) index),
                    "D" (&pci_indirect));
  +       restore_flags(flags);
          *bus = (bx >> 8) & 0xff;
          *device_fn = bx & 0xff;
          return (int) (ret & 0xff00) >> 8;
  @@ -232,7 +242,9 @@
   {
          unsigned short bx;
          unsigned short ret;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%edi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -244,6 +256,7 @@
                    "d" (vendor),
                    "S" ((int) index),
                    "D" (&pci_indirect));
  +       restore_flags(flags);
          *bus = (bx >> 8) & 0xff;
          *device_fn = bx & 0xff;
          return (int) (ret & 0xff00) >> 8;
  @@ -254,7 +267,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags (flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -273,7 +288,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -292,7 +309,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -303,6 +322,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  @@ -311,7 +331,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -322,6 +344,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  @@ -330,7 +353,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -341,6 +366,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  @@ -349,7 +375,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -360,6 +388,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  55..33..  AAddaapptteecc 115522xx,, 115511xx,, 11550055,, 228822xx,, SSoouunndd BBllaasstteerr 1166 SSCCSSII,, SSCCSSII PPrroo,,
  GGiiggaabbyyttee eett aauuttrreess pprroodduuiittss bbaasseess ssuurr ll''AAIICC 66226600//66336600 ((ssttaannddaarrdd))

  Configurations supportees :

       adresses du BIOS : 0xd8000, 0xdc000, 0xd0000, 0xd4000, 0xc8000, 0xcc000,
                          0xe0000, 0xe4000.
       Ports            : 0x140, 0x340
       IRQs             : 9, 10, 11, 12
       DMA              : non utilise
       E/S              : port mappe

  Auto-detection :

       Cela marche avec de nombreuses cartes qui ont un BIOS installe. Toutes les autres cartes,
       y compris les Adaptec 1510 et les Sound Blaster 16 SCSI, necessitent d'utiliser une ligne
       de commande du noyau ou une surcharge au moment de la compilation.

  Surcharge de l'auto-detection :

  Au moment de la compilation :

       Definissez PORTBASE, IRQ, SCSI_ID, RECONNECT, PARITE de maniere adequate (voir Definitions)

  Ligne de commande du noyau :

       aha152x=<PORTBASE>[,<IRQ>[,<SCSI-ID>[,<RECONNECT>[,<PARITE>]]]]

  Le  champ  SCSI-ID  est  l'identificateur SCSI de la carte controleur.
  Aucun autre peripherique connecte sur ce bus SCSI  ne  doit  avoir  ce
  numero. Habituellement, il est fixe a 7.

  Pour forcer l'auto-detection a l'adresse 0x340, l'IRQ 11, SCSI-ID 7 et
  autoriser la connexion/deconnexion, vous devez utiliser  la  ligne  de
  commande suivante :

       aha152x=0x340,11,7,1

  Problemes prehistoriques, resolus en mettant a jour le noyau :

  1. le  pilote  n'arrive  pas  a  gerer  les  cartes VLB. Il y avait un
     probleme de temporisation avec les noyaux anterieurs a  la  version
     1.0.5.

  Les constantes :

       AUTOCONF       : utiliser la configuration reportee par le controleur (uniquement pour les 152x)
       IRQ            : surcharge du niveau d'interruption (9,10,11 ou 12) (11 par defaut)
       SCSI_ID        : surcharge du SCSI ID de l'AIC-6260 (0-7) (7 par defaut)
       RECONNECT      : surcharge l'indicateur de deconnexion/reselection (une valeur non nulle
                        signifie 'autoriser', une valeur nulle signifie 'interdire')
       DONT_SNARF     : n'enregistre pas les ports (pl12 et inferieurs)
       SKIP_BIOSTEST  : ne teste pas la signature du BIOS (pour la AHA-1510 ou en cas de BIOS debraye)
       PORTBASE       : force le port de base. Il ne faut pas essayer l'auto-detection

  55..44..  AAddaapptteecc 115544xx,, AAMMII FFaassttDDiisskk VVLLBB,, DDTTCC 332299xx ((ssttaannddaarrdd))

  Configurations supportees :

       Ports          : 0x330 et 0x334
       IRQs           : 9, 10, 11, 12, 14, 15
       Canaux DMA     : 5, 6, 7
       E/S            : port mappe, controle de bus (bus master)

  Auto-detection :

       detecte uniquement les cartes en 0x330 et 0x334.

  Surcharge de l'auto-detection :

       aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<VITESSEDMA>]]

  Notes :

  1. BusLogic  produit  une  serie  de cartes logiciellement compatibles
     avec les Adaptec 1542. Ces cartes existent en  ISA,  VLB,  EISA  et
     plusieurs varietes en PCI.

  2. Des  cartes  sans  suffixe  et  les  premieres cartes a suffixe 'A'
     n'acceptent pas le 'decoupage' /  'reassemblage'  (scatter/gather),
     et,  de ce fait, ne fonctionnent pas. Moyennant une redefinition du
     mot 'fonctionnement', on peut les  faire  marcher  a  condition  de
     mettre  AAHHAA11554422__SSCCAATTTTEERR a 0 dans le fichier drivers/scsi/aha1542.h.

  Problemes prehistoriques, resolus en mettant a jour le noyau :

  1. Les versions du noyau anterieures a la version  0.99.10  ne  gerent
     pas la version 'C' des controleurs.

  2. Les  versions  du noyau anterieures a la version 0.99.14k ne gerent
     pas les options suivantes pour les cartes version 'C' :

  +o  support du BIOS pour le mapping etendu des disques > 1G

  +o  support du BIOS pour plus de 2 disques

  +o  support du BIOS pour la scrutation automatique du bus SCSI

  3. Les versions du noyau anterieures a la version 0.99.15e  ne  gerent
     pas  les  versions  'C' avec support du BIOS pour plus de 2 disques
     active et le support du BIOS pour le mapping etendu des  disques  >
     1G desactive

  4. Les  versions  du  noyau  anterieures  a  la  version  0.99.14u  ne
     supportent les versions 'CF' de ce type de cartes

  5. Il existait un sequencement  critique  (race  condition)  dans  les
     versions  du noyau anterieures a la version 1.0.5 lorsque plusieurs
     peripheriques etaient accedes simultanement.

  Problemes frequents :

  1. erreurs 'non attendues' avec des cartes 154xC ou 154xCF.

     Certaines cartes 154xC parmi les premiers exemplaires generaient un
     signal  a  haute  frequence sur un des signaux SCSI, provoquant des
     reflexions dans des cables de mauvaise impedance.

     Les nouvelles cartes  ne  sont  pas  vraiment  meilleures  et  sont
     pointilleuses  sur  la qualite des cables et sur la sensibilite des
     terminaisons.

     Referez-vous aux chapitres Problemes frequents  ``#2''  et  ``#3'',
     ``Problemes habituels'', ou ``Dysfonctionnement generalise''.

  2. erreurs  'non  attendues' avec des cartes 154xC ou 154x lorsqu'a la
     fois des peripheriques internes et externes sont connectes.

     C'est probablement un probleme  de  terminaison.  Afin  de  pouvoir
     utiliser   l'option   logicielle   permettant   de   desactiver  la
     terminaison interne de la carte, vous devez positionner le cavalier
     1 sur OFF.

     Referez-vous  aux  chapitres  Problemes frequents ``#1'' et ``#3'',
     ``Problemes habituels'', ou ``Dysfonctionnement generalise''.

  3. le sous-systeme SCSI se bloque completement.

     Dans  certains  cas,  le  blocage  semble  se  produire   lors   de
     l'utilisation   simultanee  de  plusieurs  peripheriques.  Si  cela
     arrive, contactez le fabricant de ces peripheriques et voyez si une
     eventuelle  mise  a  jour  du  firmware  resoudrait le probleme. En
     dernier recours, vous pouvez modifier AAHHAA11554422__MMAAIILLBBOOXX a 1  dans  le
     fichier aha1542.h. Cela va limiter le nombre de commandes presentes
     sur le bus SCSI a 1 a la  fois.  Il  se  peut  que  ca  resolve  le
     probleme.   Par   contre,   une  fois  encore,  si  vous  avez  des
     peripheriques lents (lecteur  de  bandes,  lecteur  de  CDROM),  ce
     contournement risque de ne pas etre une solution utilisable.

     Reportez-vous  aux  chapitres Problemes frequents ``#1'' et ``#2'',
     ``Problemes habituels'' ou ``Le SCSI se bloque''.

  4. Le message  "Interrupt  received,  but  no  mail"  est  affiche  au
     demarrage et vos peripheriques SCSI ne sont pas detectes.

     Desactivez  les  options  du BIOS pour la gestion du mapping etendu
     pour les disques > 1G, pour la gestion de plus de  2  peripheriques
     et  pour la scrutation automatique du bus (autoscanning). Ou alors,
     passez a une version de Linux 0.99.14k (ou plus recente).

  5. Si des erreurs de temporisation infinie apparaissent sur des cartes
     version 'C', entrez dans le programme de configuration Adaptec puis
     autorisez la negociation synchrone.

  6. Linux 1.2.x affiche le message

     "Unable to determine Adaptec DMA priority.  Disabling board."

     Cela est du a un conflit  sur  certains  systemes  avec  un  pilote
     BusLogic  obsolete.  Vous pouvez soit regenerer votre noyau sans ce
     pilote, soit lui fournir une option sur la ligne  de  commande  lui
     indiquant   de  scruter  une  adresse  autre  que  celle  de  votre
     controleur. Par exemple, si votre carte Adaptec repond a  l'adresse
     0x334 et qu'il n'y a aucune autre carte en 0x330, utilisez la ligne
     de commande suivante :

       buslogic=0x330

  7. Le  systeme  se  bloque  lors  d'acces   simultanes   a   plusieurs
     peripheriques  sur  des  cartes  1542C ou 1540C avec la deconnexion
     activee.

     Quelques versions du firmware des Adaptec avaient des erreurs.  Une
     mise  a  jour  avec la version du BIOS v2.11 est censee corriger ce
     probleme.

  55..55..  AAddaapptteecc 117744xx

  Configurations supportees :

       Emplacements   : 1-8
       Ports          : non significatif (carte EISA)
       IRQs           : 9, 10, 11, 12, 14, 15
       Canaux DMA     : non significatif (carte EISA)
       E/S            : port mappe, controle de bus

  Auto-detection :

       fonctionne avec toutes les configurations gerees

  Surcharge de l'auto-detection :

       aucune

  Remarque :

  1. Cette carte n'est plus fabriquee par Adaptec.

  Problemes courants :

  1. Si le pilote de l'Adaptec 1740 affiche le message  "aha1740:  Board
     detected, but EBCNTRL = %x, so disabled it."

     votre  carte a ete desactivee parce qu'elle ne tournait pas en mode
     etendu (enhanced mode). Les cartes qui fonctionnent  en  mode  1542
     standard ne sont pas gerees.

  55..66..  AAddaapptteecc 227744xx,, 228844xx ((ssttaannddaarrdd)) 229944xx ((AALLPPHHAA))

  Une  nouvelle  version  qui gere egalement les cartes Adaptec 294x est
  disponible a l'adresse

       ftp://ftp.ims.com/pub/Linux/aic7xxx

  Configurations supportees :

                           274x           284x            294x
       Emplacements EISA : 1-12           N/A             N/A
       Ports             : N/A            TOUS            TOUS
       IRQs              : ALL            TOUTES          TOUTES
       Canaux DMA        : N/A            TOUS            N/A
       E/S               : port mappe, controle de bus

  Surcharge de l'auto-detection :

  Ligne de commande du noyau :

       aha274x=extended
       (pour forcer le mapping etendu)

  Remarques :

  1. Le BIOS doit etre active

  2. Le canal B des cartes 2742AT est ignore

  3. CONFIG_PCI (lors de la generation du noyau) doit  etre  positionnee
     si vous utilisez une carte PCI.

  55..77..  AAllwwaayyss IINN22000000 ((ssttaannddaarrdd))

  Configurations supportees :

       Ports          : 0x100, 0x110, 0x200, 0x220
       IRQs           : 10, 11, 14, 15
       DMA            : non utilise
       E/S            : port mappe

  Auto-detection :

       le BIOS n'est pas necessaire

  Surcharge de l'auto-detection :

       aucune

  Problemes courants :

  1. un  probleme connu concerne les systemes avec des disques IDE et la
     pagination (swapping).

  55..88..  CCaarrtteess ccoonnttrroolleeuurrss mmuullttii--mmaaiittrreess BBuussLLooggiicc

  (cette  section  est   Copyright   1995   par   Leonard   N.   Zubkoff
  <lnz@dandelion.com>)   (le   fichier   README.BusLogic  constitue  une
  documentation plus complete du pilote BusLogic ; lisez-le)

                    Pilote SCSI BusLogic Multi-Maitres pour Linux

                         Version 1.2.2 pour Linux 1.2.13
                         Version 1.3.2 pour Linux 1.3.88

                   ftp://ftp.dandelion.com/BusLogic-1.2.2.tar.gz
                   ftp://ftp.dandelion.com/BusLogic-1.3.2.tar.gz

                                   16 Avril 1996

                                 Leonard N. Zubkoff
                                 Dandelion Digital
                                 lnz@dandelion.com

  BusLogic  Inc.  concoit  et  fabrique  un  ensemble de  controleurs SCSI de hautes
  performances,  qui partagent une interface de  programmation commune pour diverses
  architectures  de bus, par le biais de leur technologie ASIC Multi-Maitres (Multi-
  Master ASIC). Ce pilote gere tous les controleurs BusLogic Multi-Maitres actuels,
  et devrait gerer toutes les cartes Multi-Maitres a venir avec peu (voire aucune) de
  modifications.  Les controleurs  bases sur la  nouvelle architecture FlashPoint ne
  sont pas geres par ce pilote ; reportez-vous au fichier  README.FlashPoint pour la
  marche a suivre pour passer d'une carte FlashPoint LT non geree a une carte BT-948
  supportee.

  Mes buts principaux lorsque j'ai ecrit ce pilote BusLogic completement nouveau pour
  Linux  etaient d'exploiter les performances maximales que les controleurs SCSI Bus-
  Logic  et les peripheriques SCSI  modernes sont capables d'atteindre  et de fournir
  un pilote extremement fiable sur lequel des applications critiques puissent s'appu-
  yer. Tout  peut etre configure sur la ligne de  commande du noyau, des performances
  jusqu'aux detections d'erreurs. Cela permet a chaque installation d'ajuster les pa-
  rametres de performance et de gestion des erreurs aux besoins locaux.

  BusLogic  est une  compagnie avec laquelle il a ete tres agreable de travailler, et
  je  recommande chaleureusement leurs produits a la communaute Linuxienne. En Novem-
  bre 1995, j'ai eu l'opportunite de devenir site beta testeur pour leur dernier pro-
  duit Multi-Maitres - le controleur SCSI BT-948 PCI Ultra -, puis de nouveau pour le
  controleur BT-958 PCI Wide Ultra en Janvier 1996. Cela a ete un benefice reciproque,
  car  nous avons apporte a BusLogic un environnement de test que leurs propres equi-
  pes ne pouvaient pas avoir  et la communaute Linuxienne a dispose de controleurs de
  hautes  performances  qui avaient  correctement ete testes sur Linux avant meme que
  les  produits ne soient  commercialises. Cette  relation avec BusLogic m'a en outre
  donne  l'occasion d'interagir  directement avec leur  equipe technique  et ainsi de
  leur  donner connaissance des besoins et des potentialites du monde Linux. Leur in-
  teret et leur support sont tres apprecies.

  Contrairement  a d'autres  vendeurs, si vous contactez le support technique de Bus-
  Logic et que vous annoncez que vous tournez sous Linux, ils ne vont pas vous retor-
  quer que votre utilisation de leur produit n'est pas supportee. Leurs dernieres pu-
  blications commerciales mentionnent meme "Les controleurs SCSI BusLogic sont compa-
  tibles avec tous les systemes d'exploitation importants, incluant : ... Linux ...".

  BusLogic, Inc. se trouve a 4151  Burton Drive, Santa Clara, California, 95054, USA,
  et vous pouvez les contacter par  telephone au 408/492-9090 ou  par fax au 408/492-
  1542. BusLogic dispose d'un  site Web (http://www.buslogic.com), d'un site FTP ano-
  nyme (ftp.buslogic.com)  et d'une BBS au 408/492-1984. Le support technique de Bus-
  Logic  peut etre joint par  courrier electronique a l'adresse techsup@buslogic.com,
  par  telephone au 408/654-0760 ou par fax au  408/492-1542. Des  renseignements sur
  leurs representants en Europe et au Japon sont disponibles sur leur site Web.

                          LES CONTROLEURS GERES

  La  liste  suivante comporte les  controleurs  SCSI BusLogic  geres a la date de ce
  document.  Il est  recommande qu'une  personne se  portant  acquereur  d'une  carte
  BusLogic  non listee  dans la table  suivante contacte l'auteur de ce document pour
  verifier si elle est supportee ou si elle le sera un jour.

  Les series "W" :

  BT-948      PCI     Ultra Fast Terminaison unique SCSI-2
  BT-958      PCI     Ultra Wide Terminaison unique SCSI-2
  BT-958D     PCI     Ultra Wide Differentielle SCSI-2

  Les series "C" :

  BT-946C     PCI     Fast Terminaison unique SCSI-2
  BT-956C     PCI     Fast Wide Terminaison unique SCSI-2
  BT-956CD    PCI     Fast Wide Differentielle SCSI-2
  BT-445C     VLB     Fast Terminaison unique SCSI-2
  BT-747C     EISA    Fast Terminaison unique SCSI-2
  BT-757C     EISA    Fast Wide Terminaison unique SCSI-2
  BT-757CD    EISA    Fast Wide Differentielle SCSI-2
  BT-545C     ISA     Fast Terminaison unique SCSI-2
  BT-540CF    ISA     Fast Terminaison unique SCSI-2

  Les series "S":

  BT-445S     VLB     Fast Terminaison unique SCSI-2
  BT-747S     EISA    Fast Terminaison unique SCSI-2
  BT-747D     EISA    Fast Differentielle SCSI-2
  BT-757S     EISA    Fast Wide Terminaison unique SCSI-2
  BT-757D     EISA    Fast Wide Differentielle SCSI-2
  BT-545S     ISA     Fast Terminaison unique SCSI-2
  BT-542D     ISA     Fast Differentielle SCSI-2
  BT-742A     EISA    Terminaison unique SCSI-2 (742A version H)
  BT-542B     ISA     Terminaison unique SCSI-2 (542B version H)

  Les series "A" :

  BT-742A     EISA    Terminaison unique SCSI-2 (742A versions A - G)
  BT-542B     ISA     Terminaison unique SCSI-2 (542B versions A - G)

  Les controleurs AMI FastDisk, veritables clones BusLogic, sont geres par ce pilote.

                  REMARQUES SUR L'INSTALLATION DES CARTES BT-948/958/958D

  Les  controleurs SCSI BT-948/958/958D PCI Ultra ont des fonctionnalites qui peuvent
  necessiter une certaine attention lors de l'installation de Linux.

  o Affectation des ports d'entree/sortie PCI

    Lorsqu'elles  sont  configurees avec les valeurs par defaut usine, les cartes BT-
    948/958/958D vont  uniquement reconnaitre les affectations des ports d'E/S faites
    par le BIOS  PCI de la  carte mere. Les  BT-948/958/958D ne  repondront  plus aux
    ports d'E/S compatibles ISA auxquels les controleurs SCSI BusLogic precedents re-
    pondaient. Le pilote gere les affectations des ports d'E/S PCI. C'est la configu-
    ration a privilegier. Toutefois, si le pilote BusLogic obsolete doit etre utilise
    pour une raison quelconque, comme par exemple une distribution Linux qui n'utili-
    serait pas encore le nouveau pilote dans son noyau de demarrage, BusLogic a fourni
    une option de configuration AutoSCSI qui autorise les ports d'E/S compatibles ISA.

    Pour  activer  cette  option de  compatibilite  ascendante, appelez  l'utilitaire
    AutoSCSI  par  CTRL-B au demarrage du systeme  et  choisissez "Adapter Configura-
    tion",  "View/Modify Configuration", puis  changez les parametres "ISA Compatible
    Port"  de "Disable"  a "Primary"  ou "Alternate". Une  fois que  ce  pilote a ete
    installe, l'option "ISA Compatible Port" doit etre remise a "Disable" pour eviter
    tout conflit de futurs ports  d'E/S. Les anciennes  cartes BT-946C/956C/956CD ont
    egalement cette option de configuration, mais le defaut usine est "Primary".

  o L'ordre de scrutation des emplacements PCI

    Dans les  systemes  comportant  plusieurs  controleurs PCI BusLogic, l'ordre dans
    lequel les  emplacements PCI sont scrutes peut apparaitre inverse pour les cartes
    BT-948/958/958D par rapport aux cartes  BT-946C/956C/956CD. Pour demarrer  depuis
    un disque SCSI, il est  necessaire que le  BIOS du controleur et  le noyau soient
    d'accord  sur quel  disque est le disque de  demarrage (boot disk). Cela implique
    qu'ils reconnaissent les  controleurs PCI dans  le meme ordre. Le  BIOS PCI de la
    carte mere fournit un moyen standard d'enumerer les controleurs PCI. Ce moyen est
    utilise par le noyau Linux. Certaines  implementations du BIOS PCI  enumerent les
    emplacements PCI par ordre croissant des numeros de bus et des numeros de contro-
    leurs, alors que d'autres le font dans le sens contraire.

    Malheureusement,  Microsoft  a  decide  que Windows 95  enumererait  toujours les
    emplacements  PCI  dans l'ordre  croissant des  numeros  de bus et des numeros de
    controleurs independamment de l'enumeration du BIOS PCI  et ils ont exige que leur
    facon de faire soit  supportee par le  BIOS des  controleurs pour  etre  certifie
    Windows 95. En  consequence, les defauts usine des cartes BT-948/958/ 958D enume-
    rent les controleurs par numeros croissants. Pour  desactiver ce  fonctionnement,
    appelez l'utilitaire AutoSCSI par CTRL-B au demarrage du systeme, puis choisissez
    "Adapter Configuration",  "View/Modify Configuration",  appuyez sur  CTRL-F10 et
    changez l'option "Use Bus And Device # For PCI Scanning Seq." a 0FF.

    Ce pilote va interroger la valeur de l'option de  Sequence De Scrutation PCI,  de
    maniere  a reconnaitre les controleurs dans le meme ordre qu'ils ont ete enumeres
    par le BIOS du controleur.

                          LA LISTE DE DIFFUSION DES ANNONCES BUSLOGIC

  La  liste de diffusion des  annonces BusLogic constitue un forum d'information pour
  les  utilisateurs Linux des  nouveautes (nouvelles  versions du  pilote  et  autres
  annonces  concernant le  support pour  Linux des  controleurs  BusLogic). Pour vous
  inscrire a la liste, envoyez un message a l'adresse suivante :
  "BusLogic-announce-request@dandelion.com", avec la ligne  "subscribe" dans le corps
  du message.

  55..99..  LLeess ccoonnttrroolleeuurrss BBuussLLooggiicc FFllaasshhPPooiinntt

  (cette  section  est   Copyright   1995   par   Leonard   N.   Zubkoff
  <lnz@dandelion.com>)

  Il  n'y a pas de pilote Linux pour les cartes FlashPoint LT/DL/LW (BT-930/932/950),
  et quand il va y en avoir ou s'il y en aura n'est pas tres clair. Les cartes Flash-
  Point  ont une  architecture differente des  cartes Multi-Maitres  et  n'ont pas de
  processeurs  sur la carte ; elles disposent d'un simple sequenceur SCSI. Elles sont
  concues pour les ordinateurs  de bureau  et ne sont pas  specialement concues  pour
  des systemes d'exploitation multitaches performants comme Linux.

  Les  cartes Multi-Maitres BT-948/958 ont  un processeur  embarque et l'interface de
  programmation  par "boite a lettres"  permet de faire du parallelisme et du pipeli-
  ning  entre le controleur et le systeme d'exploitation, alors que les cartes Flash-
  Point necessitent de frequentes interventions du processeur principal. Etant  donne
  que les  delais de  prise en  compte des  interruptions  augmentent sur  un systeme
  charge, les BT-948/958 continuent d'avoir d'excellentes  performances au  contraire
  des FlashPoint, qui  s'ecroulent  rapidement. De plus, le  firmware des  BT-948/958
  possede la  connaissance  de bas niveau pour une  interaction  efficace avec le bus
  SCSI. Avec un  sequenceur  SCSI comme dans les  FlashPoint, le  noyau Linux doit en
  revanche contenir  lui-meme  toutes ces  informations de  bas niveau,  et il est en
  general long d'arriver a faire marcher tout cela proprement. Etant  donne le faible
  ecart de prix entre  ces deux  modeles, les  cartes BT-948 et  BT-958 sont de toute
  evidence le meilleur choix pour Linux.

  <debut de citation>

                                  ANNONCE
                  Mise a jour des BusLogic FlashPoint vers les BT-948
                               1er Fevrier 1996

  Depuis  leur  apparition en Octobre 1995, les  BusLogic  FlashPoint  LT  ont  pose
  des  problemes  sous  Linux, si  bien  qu'aucun  pilote  n'est  encore  disponible
  pour  cette  nouvelle  carte  Ultra SCSI. Bien que le produit  soit officiellement
  declare  comme  une carte pour machine de bureau  et ne  soit pas particulierement
  efficace  dans  des environnements  multitaches  performants  tels  que  Linux, la
  FlashPoint LT  a ete annoncee  comme etant le dernier cri, le  nec plus ultra, par
  les vendeurs d'ordinateurs  et elle s'est retrouvee sur certains de leurs systemes
  haut de gamme, a l'exclusion  de ceux equipes  des anciennes cartes Multi-Maitres.
  Cela  a  cause du tort a de  nombreuses personnes  qui  ont  par megarde achete un
  systeme en s'attendant a ce que tous les produits BusLogic soient geres par Linux,
  et qui  ont finalement  decouvert que la FlashPoint n'etait pas supportee et ne le
  serait pas avant longtemps, si elle devait l'etre un jour.

  Apres  que  ce  probleme a  ete  identifie, BusLogic  est entree  en contact  avec
  ses  principaux clients  OEM pour  annoncer que les cartes  Multi-Maitres BT-946C/
  956C seraient  toujours disponibles,  et  que les  utilisateurs  Linux qui avaient
  par  megarde  commande des systemes a base  de FlashPoint pourraient mettre a jour
  leur  machine avec une BT-946C. Si cela a aide de nouveaux acheteurs, cela n'etait
  qu'une solution partielle au probleme plus general du support de la FlashPoint pour
  les  utilisateurs  de  Linux. Cette  annonce n'apportait  aucun soutien a ceux qui
  avaient  initialement achete une FlashPoint pour  un systeme d'exploitation qui la
  gerait  et qui decidaient plus tard de passer a Linux ou  ceux qui avaient achete
  une  FlashPoint,  croyant  qu'elle etait  geree  et  qui etaient  incapables de la
  retourner.

  Mi-Decembre,  j'ai demande a  rencontrer le  responsable de la gestion de BusLogic
  pour  discuter  du support pour le  logiciel libre (free software)  et pour  Linux
  de la FlashPoint. Des  bruits plus ou moins  exacts avaient  circule  publiquement
  sur l'attitude  de BusLogic  envers Linux  et  j'avais le sentiment  que le  mieux
  etait d'en  discuter  directement. J'envoyai  un message par  email un  soir  a 11
  heures  et  la  reunion  eut lieu  le lendemain  apres-midi. Malheureusement,  les
  rouages  administratifs tournent lentement, particulierement  lorsqu'une compagnie
  est en cours d'acquisition, c'est pourquoi il a fallu attendre jusqu'a  maintenant
  que tous les details soient parfaitement clairs et qu'une annonce publique  puisse
  etre faite.

  BusLogic  n'est  pas  prete  aujourd'hui  a publier  les  informations necessaires
  a ce  que des parties  tierces puissent  ecrire des pilotes  pour  la  FlashPoint.
  Les  seuls pilotes  existants pour  la FlashPoint  ont  ete  ecrits  par  l'equipe
  technique de BusLogic  et il n'existe pas de documentation suffisamment  detaillee
  pour permettre a un developpeur exterieur d'ecrire un pilote sans aide consequente.
  Alors  qu'il y a des gens  chez BusLogic  qui ne veulent  pas entendre  parler  de
  divulgation  de details  sur l'architecture  de la  FlashPoint, le debat n'est pas
  entierement  clos. Dans tous les cas, meme  si la documentation  etait  disponible
  aujourd'hui, il faudrait certainement pas mal de temps pour qu'un pilote reellement
  utilisable soit ecrit, surtout que je ne suis pas convaincu que l'effort en vaille
  la peine.

  De toute facon, BusLogic continue a fournir une solution SCSI de hautes performan-
  ces pour Linux  et ils ne desirent pas voir quelqu'un incapable de travailler sous
  Linux  sous pretexte qu'il a une FlashPoint LT. En consequence, BusLogic  a mis en
  place un programme de mise a jour permettant a n'importe quel utilisateur de Linux
  dans le monde de changer sa FlashPoint LT pour une nouvelle carte BT-948 Multi-Mai-
  tres  PCI Ultra SCSI. La BT-948  est  la successeur  Ultra SCSI de  la BT-946C, et
  possede  toutes les  fonctionnalites des controleurs BT-946C et  FlashPoint  LT, y
  compris une terminaison adaptative (smart termination) et une PROM  flashable pour
  faciliter les mises a jour du firmware. Elle est bien sur compatible avec le pilote
  actuel de Linux. Le prix pour cette mise a jour a ete fixe a 45 dollars americains,
  et  le programme de mise a jour est  realise par le Support Technique de BusLogic,
  qui peut etre contacte par courrier electronique a l'adresse techsup@BusLogic.com,
  par telephone au +1 408 654-0760 ou par fax au +1 408 492-1542.

  J'ai un site en beta test pour le controleur BT-948 et les versions 1.2.1  et 1.3.1
  de mon pilote BusLogic contiennent deja le support pour les BT-948. Une gestion sup-
  plementaire (non indispensable) pour les cartes Multi-Maitres Ultra SCSI sera ajou-
  tee dans une future version. En resultat de ce mecanisme de test 'cooperatif', plu-
  sieurs  problemes du firmware  ont ete deceles et  corriges (assurez-vous que vous
  avez  la version 5.05R ou plus). Mon systeme de test Linux tres charge a fourni un
  environnement de test ideal pour tester le mecanisme de detection et de correction
  d'erreurs  SCSI, qui  est bien moins  souvent mis en evidence sur les  machines de
  production,  mais qui est crucial pour la  stabilite generale du systeme. Il a ete
  tres pratique de pouvoir travailler directement avec leur ingenieur responsable du
  firmware en reproduisant les problemes sous le controle de l'environnement de debug
  du firmware. Il est certain que les  techniques ont  enormement evolue  depuis  le
  temps ou je  travaillais sur un  firmware pour du  materiel embarque. Je travaille
  actuellement sur des  mesures de performances  et j'espere avoir prochainement des
  chiffres et des statistiques.

  BusLogic  m'a demande d'envoyer cette  annonce puisqu'un important pourcentage des
  questions  relatives au  support de la  FlashPoint m'a  directement ete envoye par
  email ou a ete poste dans les groupes de news de Linux auxquels je participe. Pour
  resumer, BusLogic offre aux  utilisateurs Linux de mettre a jour leur carte Flash-
  Point LT (BT-930) non geree par une carte geree BT-948 pour une somme de 45 dollars
  americains.

  Contactez le support technique de BusLogic a l'adresse techsup@BusLogic.com ou au
  +1 408 654-0760 pour beneficier de leur offre.

                  Leonard N. Zubkoff
                  lnz@dandelion.com
  <fin de citation>

  55..1100..   SSmmaarrttCCaacchhee  IIVV  eett  SSmmaarrttRRAAIIDD ((ssttaannddaarrdd)) EEAATTAA:: DDPPTT SSmmaarrttCCaacchhee,,
  SSmmaarrttCCaacchhee PPlluuss,, SSmmaarrttCCaacchhee IIIIII,,

  Cartes  gerees  :  toutes,  du moment qu'elles supportent le protocole
  EATA-DMA.

  Parmi ces cartes, on trouve :

  La famille des DPT Smartcache (Plus) :
  PM2011      ISA     Fast Terminaison unique SCSI-2
  PM2012B     EISA    Fast Terminaison unique SCSI-2

  La famille des DPT Smartcache III :
  PM2021      ISA     Fast Terminaison unique SCSI-2
  PM2021W     ISA     Wide Terminaison unique SCSI-2
  PM2022      EISA    Fast Terminaison unique SCSI-2
  PM2022W     EISA    Wide Terminaison unique SCSI-2
  PM2024      PCI     Fast Terminaison unique SCSI-2
  PM2024W     PCI     Wide Terminaison unique SCSI-2
  PM2122      EISA    Fast Terminaison unique SCSI-2
  PM2122W     EISA    Wide Terminaison unique SCSI-2
  PM2124      PCI     Fast Terminaison unique SCSI-2
  PM2124W     PCI     Wide Terminaison unique SCSI-2
  PM2322      EISA    Fast Terminaison unique SCSI-2
  PM2322W     EISA    Wide Terminaison unique SCSI-2

  La famille des DPT Smartcache VI :
  PM2041W     ISA     Wide Terminaison unique SCSI-2
  PM2041UW    ISA     Ultra Wide Terminaison unique SCSI-2
  PM2042W     EISA    Wide Terminaison unique SCSI-2
  PM2042UW    EISA    Ultra Wide Terminaison unique SCSI-2
  PM2044W     PCI     Wide Terminaison unique SCSI-2
  PM2044UW    PCI     Ultra Wide Terminaison unique SCSI-2
  PM2142W     EISA    Wide Terminaison unique SCSI-2
  PM2142UW    EISA    Ultra Wide Terminaison unique SCSI-2
  PM2144W     PCI     Wide Terminaison unique SCSI-2
  PM2144UW    PCI     Ultra Wide Terminaison unique SCSI-2
  PM2322W     EISA    Wide Terminaison unique SCSI-2
  PM2322UW    EISA    Ultra Wide Terminaison unique SCSI-2

  La famille des DPT SmartRAID :
  PM3021      ISA     Fast Terminaison unique SCSI-2
  PM3021W     ISA     Wide Terminaison unique SCSI-2
  PM3122      EISA    Fast Terminaison unique SCSI-2
  PM3122W     EISA    Wide Terminaison unique SCSI-2
  PM3222      EISA    Fast Terminaison unique SCSI-2
  PM3222W     EISA    Wide Terminaison unique SCSI-2
  PM3224      PCI     Fast Terminaison unique SCSI-2
  PM3224W     PCI     Wide Terminaison unique SCSI-2
  PM3334W     PCI     Wide Terminaison unique SCSI-2
  PM3334UW    PCI     Ultra Wide Terminaison unique SCSI-2

  mais egalement les  versions  'differentielles'  des  controleurs  ci-
  dessus.

  et quelques controleurs de :

  NEC, AT&T, SNI, AST, Olivetti, Alphatronix.

  Configurations supportees :

       Emplacements   : Tous
       Ports          : Tous
       IRQs           : Tous les niveaux sur changements d'etat (edge triggered)
       Canaux DMA     : Tous les ISA, non significatifs pour les EISA/PCI
       E/S            : port mappe, controle de bus
       Canaux SCSI    : Tous

  Auto-detection :

       fonctionne avec toutes les configurations gerees

  La derniere version du pilote EATA-DMA est disponible a l'adresse :

       ftp.i-Connect.Net:/pub/Local/EATA/

  Liste de diffusion :

  La  liste  de  diffusion EATA constitue un forum pour les utilisateurs
  Linux des pilotes EATA-DMA et EATA-PIO pour  les  discussions  et  les
  annonces des nouvelles versions et autres annonces.  Pour vous abonner
  a la liste, envoyez un  message  a  "linux-eata-request@i-connect.net"
  avec la ligne "subscribe" dans le corps du message.

  Support du repertoire /proc/scsi :

  Pour  avoir  acces  a  des  statistiques  plus  poussees,  entrez  les
  commandes suivantes :

  eecchhoo ""eeaattaa__ddmmaa llaatteennccyy"" >>//pprroocc//ssccssii//eeaattaa__ddmmaa//<<nnoo__ddrriivveerr>>

  Pour ensuite desactiver les statistiques, faites :

  eecchhoo ""eeaattaa__ddmmaa nnoollaatteennccyy"" >>//pprroocc//ssccssii//eeaattaa__ddmmaa//<<nnoo__ddrriivveerr>>

  Problemes habituels :

  1. La Slackware ne trouve pas le controleur.

     Solution : utilisez une des disquettes de boot ascsi*.

  2. Le pilote IDE arrive a detecter l'interface ST-506 de la carte EATA
     dans les anciens noyaux (<v1.3).

     a. Cela  ressemble a l'un des 2 exemples suivants :

          hd.c: ST-506 interface disk with more than 16 heads detected,
            probably due to non-standard sector translation.  Giving up.
            (disk %d: cyl=%d, sect=63, head=64)

     hdc: probing with STATUS instead of ALTSTATUS
     hdc: MP0242 A, 0MB w/128KB Cache, CHS=0/0/0
     hdc: cannot handle disk with 0 physical heads
     hdd: probing with STATUS instead of ALTSTATUS
     hdd: MP0242 A, 0MB w/128KB Cache, CHS=0/0/0
     hdd: cannot handle disk with 0 physical heads

     Si  le  pilote  IDE a des problemes a cause de cela (vous ne pouvez
     pas acceder  a  vos  veritables  peripheriques  IDE  par  exemple),
     changez le port d'E/S et/ou les IRQ de la carte EATA.

     b. Si  le pilote IDE trouve des equipements qu'il sait traiter, par
        exemple des disques durs d'une capacite <=504MB, il  va  allouer
        le  port  d'E/S  et  l'IRQ de maniere a ce que le pilote eata ne
        puisse pas les utiliser. Dans ce  cas,  changez  aussi  le  port
        d'E/S et le niveau d'interruption (IRQ != 14, 15).

  3. Le  firmware  de  certaines  vieilles cartes SK2011 est defectueux.
     Contactez le support client de DPT pour une mise a jour.

  Remarques :

  1. CCOONNFFIIGG__PPCCII doit etre positionnee si vous utilisez une carte PCI.

  55..1111..  FFuuttuurree DDoommaaiinn 1166xx00 wwiitthh TTMMCC--11880000,, TTMMCC--1188CC3300,, TTMMCC--1188CC5500 oouu  ccoomm--
  ppoossaanntt TTMMCC--3366CC7700

  Configurations supportees :

       BIOS           : 2.0, 3.0, 3.2, 3.4, 3.5
       Adresses BIOS  : 0xc8000, 0xca000, 0xce000, 0xde000
       Ports          : 0x140, 0x150, 0x160, 0x170
       IRQs           : 3, 5, 10, 11, 12, 14, 15
       DMA            : non utilise
       E/S            : port mappe

  Auto-detection :

       fonctionne avec toutes les configurations gerees. Requiert un BIOS active

  Surcharge de l'auto-detection :

       aucune

  Problemes prehistoriques, regles par une mise a jour :

  1. Les vieilles versions ne gerent pas le composant  TMC-18C50  et  se
     plantent avec les nouvelles cartes.

  2. Les  routines  d'auto-detection des vieilles versions n'ont pas les
     plus recentes signatures des BIOS.

  3. Les versions avant celle incluse  dans  Linux  1.0.9  et  1.1.6  ne
     gerent pas le nouveau composant SCSI ou le BIOS 3.4.

  Remarque :

  1. Le  BIOS des Future Domain scrute souvent les peripheriques SCSI de
     l'identificateur le plus eleve jusqu'a l'ID 0, dans l'ordre inverse
     des  autres  BIOS  SCSI.  sda  va  alors  correspondre  au  dernier
     peripherique (par analogie avec le DOS, D: au  lieu  de  C:).  Vous
     aurez   certainement   besoin   d'utiliser  l'option  de  surcharge
     'disktab' avec LILO.

  55..1122..  NNCCRR55338800 ggeenneerriiqquuee // TT113300BB ((ssttaannddaarrdd))

  Configurations supportees et non supportees :

       Ports          : Tous
       IRQs           : Tous
       canaux DMA     : le DMA n'est pas utilise
       E/S            : port mappe

  Auto-detection :

       aucune

  Surcharge de l'auto-detection :

  A la compilation :

       definissez GENERIC_NCR5380_OVERRIDE. Ce doit etre un tableau de
       nuplets de la forme {'port', 'irq', 'dma', 'type de carte'}. Par exemple :
       #define GENERIC_NCR5380_OVERRIDE {{0x330, 5, DMA_NONE, BOARD_NCR5380}}

       pour une carte NCR5380 de port 0x330 et d'IRQ 5.

       #define GENERIC_NCR5380_OVERRIDE {{0x350, 5, DMA_NONE, BOARD_NCR53C400}}

       pour une carte T130B sur le port 0x350.

       Les vieilles versions du code suppriment l'entree BOARD_*.

       Les valeurs symboliques IRQ_NONE et IRQ_AUTO peuvent etre employees pour le
       champ IRQ.

  Ligne de commande du noyau :

       ncr5380=port,irq
       ncr5380=port,irq,dma
       ncr53c400=port,irq

       255 peut etre utilise pour 'pas d'irq' et 254 pour 'auto-detection de l'irq'.

  Problemes frequents :

  1. Utilisation  d'une  carte  T130B  avec  le  vieux  pilote   NCR5380
     generique  (version  6  pre-publique) qui ne gerait pas la ligne de
     commande pour le ncr53c400.

     Les registres des cartes compatibles NCR5380 ont un deplacement  de
     8  par  rapport  a  l'adresse  de base. Ainsi, si votre adresse est
     0x350, utilisez :

       ncr5380=0x358,254

  sur la ligne de commande du noyau.

  Problemes prehistoriques, regles par une mise a jour :

  1. Le noyau se bloque lors d'acces disques avec  une  carte  T130B  ou
     d'autres cartes NCR53c400.

     Les  versions  6  pre-publiques  du  pilote  generique  NCR5380  ne
     geraient pas les interruptions sur ces cartes.  Mettez a jour votre
     pilote.

  Remarques :

  1. Le  pilote  generique ne gere pas le DMA actuellement et le pseudo-
     DMA n'est pas mieux supporte par le pilote generique.

  55..1133..  NNCCRR5533cc88xxxx ((ssttaannddaarrdd))

  Configurations supportees et non supportees :

       Adresses de base : Toutes
       IRQs             : Toutes
       Canaux DMA       : non significatif (PCI)
       E/S              : port mappe, controle de bus

  Auto-detection :

       requiert un BIOS PCI, utilise les routines du BIOS PCI pour rechercher les
       controleurs et pour lire les donnees de configuration

  Le pilote utilise les valeurs pre-programmees dans certains  regsitres
  pour son initialisation, aussi un BIOS doit-il etre active.

  Problemes prehistoriques, regles par une mise a jour :

  1. D'anciennes   versions   de  Linux  avaient  un  probleme  avec  la
     pagination (swapping). Reportez-vous au chapitre  ``Le  systeme  se
     fige en swappant''

  2. Les  noyaux des distributions incluent la version 4 ou 5 du pilote,
     qui ne gere pas certaines  fonctionnalites  bien  utiles  comme  la
     deconnexion  /  reconnexion  (l'effet  le  plus manifeste en est le
     blocage complet des peripheriques SCSI lors  du  rembobinage  d'une
     bande), controleurs multiples et operations sans BIOS.

     La derniere version du pilote est disponible a l'adresse :

       ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/ncr53c810

  La  versions  courante  est  pour la 1.2.10 (et les derniers patches),
  bien que la prochaine version soit destinee exclusivement  aux  noyaux
  1.3.x.  Ces patches ne sont pas totalement propres, a cause de patches
  pour  le  format  ELF  (et  d'autres)  qui  se  trouvaient  dans   mon
  arborescence de travail. Si vous ne pouvez pas corriger vous-memes les
  (quatre) problemes d'application des patches, ne les utilisez  surtout
  pas.  Seul  le  dernier  patch  est  necessaire  ;  ce ne sont pas des
  versions incrementales.

  Si vous ne pouvez pas attendre et desirez utiliser le  dernier  pilote
  NCR avec un noyau 1.3.x, Harald Evensen <Harald.Evensen@pvv.unit.no> a
  adapte les patches pour les noyaux 1.3.x

       ftp://ftp.pvv.unit.no/pub/Linux/ALPHA/ncr

  Ces patches devraient s'appliquer sans problemes.

  S'il vous plait, lisez tous les fichiers README dans ces  repertoires.
  Vous  devriez  egalement  rejoindre  la liste de diffusion NCR si vous
  etes  interesse  a  avoir  les  dernieres  versions  du  pilote.   Les
  corrections  de  bugs  intermediaires  et les annonces sont faites sur
  cette liste.

  Pour vous inscrire, envoyez un courrier a majordomo@colorado.edu avec

       subscribe ncr53c810

  dans le corps du message. Pour vous retirer de la liste, envoyez a  la
  meme adresse un message contenant

       unsubscribe ncr53c810

  Problemes frequents :

  1. De  nombreuses  personnes ont rencontre des problemes de composants
     fonctionnant bien  sous  DOS  mais  plantant  sous  Linux  avec  un
     probleme  de  temporisation  (timeout) lors du test 1 (interruption
     perdue).

     Cela est souvent du a un desaccord entre la valeur selectionnee par
     le   cavalier  reglant  le  niveau  d'interruption  (IRQ)  pour  un
     emplacement ou un peripherique de la carte mere et la valeur  fixee
     dans la CMOS. VERIFIEZ TOUJOURS QUE :

  +o  L'IRQ  que  vous  employez est utilisee uniquement par le composant
     NCR de votre carte ou par l'emplacement dans lequel  la  carte  NCR
     est installee

  +o  Les cavaliers de selection des IRQ pour le composant de la carte ou
     pour son emplacement correspondent a la configuration de la CMOS

  +o  Certaines  cartes  meres   PCI   savent   faire   une   affectation
     "automatique" des  IRQ. Cela ne fonctionnera pas.

     Cela   peut   egalement   etre  du  aux  INTB,  INTC  ou  INTD  PCI
     selectionnees sur une carte PCI dans un systeme  qui  ne  gere  que
     l'INTA  PCI.  Si  vous  utilisez  une  carte NCR qui vous permet de
     choisir par cavalier la ligne d'interruption PCI utilisee, assurez-
     vous que vous avez configure l'INTA.

     Enfin,  le  PCI  doit utiliser des interruptions sur niveau (level-
     sensitive) plutot que sur  front  (edge  triggered).  Verifiez  que
     votre  carte  est  positionnee  pour  generer des interruptions sur
     niveau. Si cela ne marche toujours pas, essayez  les  interruptions
     sur front, au cas ou votre systeme serait defectueux.

     Ce  probleme  est  assez frequent avec quelques cartes Viglen, pour
     lesquelles la configuration des cavaliers d'interruptions n'est pas
     documentee  dans  le manuel. On m'a dit que ce qui devrait etre une
     IRQ5 est en fait une IRQ9. Votre cas sera peut-etre different.

  2. Des  blocages  et   d'autres   problemes   apparaissent   lors   de
     l'utilisation  d'une carte video PCI S3 928 et Tseng Lab ET4000W32.

     Il  y  a  des  bugs  materiels  dans  certaines  versions  de   ces
     composants. Ne les utilisez pas.

  3. Un  message  au demarrage vous indique que l'organisation (mapping)
     des E/S a ete desactivee parce que les bits 0..1  de  l'adresse  de
     base 0 indiquaient un mapping non E/S. Le message exact est :

     the I/O mapping was disabled because base address 0 bits 0..1 indicated a
     non I/O mapping

  Cela  est du a un bug du BIOS sur certaines machines : la lecture dou-
  ble mots de registres de configuration retourne les mots de 16 bits de
  poids forts et de poids faibles inverses.

  4. Certaines  machines ont des problemes si l'ecriture differee PCI ou
     la  bufferisation  CPU->PCI  sont  activees.  Si  vous   avez   des
     problemes, desactivez ces options.

  5. Certains  systemes avec le firmware NCR SDMS dans la ROM du BIOS de
     la carte et dans le BIOS du systeme ne sont pas capables de  booter
     sous  DOS.  Desactiver l'image dans un des BIOS devrait resoudre le
     probleme.

  6. Si vous rencontrez le message

       "scsi%d: IRQ0 not free, detaching"

  ou

       "scsi%d: IRQ255 not free, detaching"

  le composant NCR avait tous ses bits a 0 ou a 1 dans  le  registre  de
  configuration  PCI.  Soit  vous  avez  des  problemes de configuration
  (reportez-vous au chapitre ``Problemes frequents 1''), soit le BIOS de
  votre carte mere est defectueux.

  Un contournement serait d'editer le fichier drivers/scsi/ncr53c7,8xx.c
  puis de changer pci_init() pour mettre :

       irq = my_irq;

  avant

       return normal_init (tpnt, board, chip, (int) base,
           (int) io_port, (int) irq, DMA_NONE, 1, bus, device_fn,
           options);

  7. Certains systemes ont des composants BIOS honteusement  bugges.  Ne
     faites pas de rapport d'anomalie avant d'etre certain que vous avez
     recu les plus recentes ROM de votre vendeur.

  8. Les lignes de commande ncr53c810=xxx, etc. ne marchent pas.

     Dans les noyaux d'origine, les points  d'entree  correspondants  ne
     sont intentionnellement pas inclus dans le fichier init/main.c :

     Le  pilote fait malgre tout des auto-detections pour une carte dont
     des parametres ont ete passes sur la ligne de commande.  Ainsi,  si
     une  ligne  de  commande  est  utilisee  alors  que  la carte a ete
     reconnue par la routine de configuration PCI, vous allez au  devant
     de gros problemes.

     La  seule  raison  pour  laquelle  vous pourriez avoir besoin d'une
     surcharge par la ligne de commande serait de contourner un  bug  du
     materiel  PCI  et  du  BIOS.  Dans  ce  cas,  certaines routines de
     correction d'erreurs ne marcheront pas, rendant la  surcharge  plus
     qu'inutile.

     Enfin, pratiquement toutes les personnes qui _pensent_ avoir besoin
     d'une surcharge sur la ligne de commande le font parce qu'elles ont
     eu  un  message de la part du pilote. Si le pilote vous signale que
     vous  avez  une  probleme  de  configuration,  votre  systeme   est
     defectueux  ou  alors  vous  avez  un  probleme de configuration et
     aucune ligne de commande ne pourra y remedier.

     Si quelqu'un a ajoute les points d'entree adequats dans le  fichier
     init/main.c pour les lignes de commande, elle ne sont pas gerees et
     peuvent parfaitement ne pas fonctionner.

  9. Certaines cartes NCR (Nexstor est la plus connue)  qui  n'utilisent
     pas  un  BIOS NCR sortent en timeouts. Certaines de ces ROMs gerent
     les transferts synchrones  et  asynchrones,  mais  etablissent  une
     negociation  de  transferts  synchrones au demarrage du systeme, ce
     qui laisse les disques dans un etat non defini. Lorsque  le  pilote
     NCR  Linux  issu  de  la  distribution essaie de dialoguer avec ces
     peripheriques, il expire en timeout et ne s'en sort pas car  il  ne
     fait ni reset du bus, ni renegociation.

     Si   vous  rencontrez  ce  probleme,  vous  pouvez  desactiver  les
     transferts synchrones dans le  programme  de  configuration  de  la
     carte  ou  mettre  a jour votre pilote NCR avec une version recente
     ALPHA qui sait traiter la negociation synchrone.

  10.
     Les cartes Tyan S1365  '825  ont  des  problemes  de  temporisation
     (timeouts),  tout  particulierement  lorsque  les deconnexions sont
     autorisees. Les documentations de certaines de ces cartes inversent
     les  positions du cavalier d'activation de la terminaison - si bien
     que celle-ci est activee alors que vous auriez voulu la desactiver,
     et inversement.

     Essayez de changer la position du cavalier.

  Remarques :

  1. CCOONNFFIIGG__PPCCII doit etre positionnee

  55..1144..  SSeeaaggaattee SSTT00xx//FFuuttuurree DDoommaaiinn TTMMCC--88xxxx//TTMMCC--99xxxx ((ssttaannddaarrdd))

  Configurations supportees et non supportees :

  Adresses de base : 0xc8000, 0xca000, 0xcc000, 0xce000, 0xdc000, 0xde000
  IRQs             : 3, 5
  Canaux DMA       : le DMA n'est pas utilise
  E/S              : mappees en memoire

  Auto-detection :

       teste uniquement les adresses, le niveau d'interruption (IRQ) etant suppose
       valoir 5 ; necessite un BIOS installe.

  Surcharge de l'auto-detection :

  A la compilation :

       Definir OVERRIDE a la valeur de l'adresse de base, CONTROLLER a FD ou SEAGATE
       en fonction de la configuration et IRQ a la valeur de niveau d'interruption
       de la carte.

  Ligne de commande du noyau :

       st0x=adresse,irq ou tmc8xx=adresse,irq (uniquement pour les noyau 0.99.13b et
       plus recents)

  Problemes prehistoriques, regles par une mise a jour :

  1. Les versions des noyaux 0.99.12 et anterieurs avaient  un  probleme
     d'acquittement  (handshaking)  avec  certains  peripheriques lents.
     Notamment, voici ce  qui  se  passait  lorsque  vous  ecriviez  des
     donnees sur le bus :

     a. ecrire  l'octet  dans  le  registre  de  donnee ; le registre de
        donnees est place sur le bus,

     b. temps_restant = 12us,

     c. attendre tant que temps_restant > 0 et que le signal  REQ  n'est
        pas genere,

     d. si temps_restant > 0, generer le signal ACQ,

     e. attendre tant que temps_restant > 0 et le signal REQ est genere,

     f. redescendre le signal ACQ

     Ce probleme  apparaissait  sur  certains  peripheriques  lents  qui
     traitaient  chaque  commande  apres l'avoir lue et pour lesquels le
     protocole REQ/ACQ (requete / acquittement) prenait plus de  12us  -
     REQ  n'etait  pas  faux au moment ou le pilote l'attendait, si bien
     que le pilote finissait pas envoyer plusieurs octets de  donnees  a
     chaque impulsion REQ.

  2. Avec  Linux  0.99.12,  j'ai  introduit un bug en corrigeant le code
     d'arbitrage. Sur certains systemes, la selection des  peripheriques
     sortait en echec. Ce probleme a ete corrige en 0.99.13.

  Problemes frequents :

  1. Certains commandes sortent en timeouts lorsque Linux essaie de lire
     une table de partition ou de faire d'autres acces disques.

     La carte est fournie avec une configuration prevue par defaut  pour
     MSDOS,  c'est-a-dire  que  les interruptions sont desactivees. Pour
     les reactiver sur les cartes Seagate, fermez les pattes F-G  (choix
     de l'IRQ 5) sur le cavalier W3 (ST01) ou JP3 (ST02).

  2. Le  pilote  ne  parvient  pas  a  gerer  certains peripheriques, en
     particulier des  derouleurs  de  bandes  SCSI  bon  marche  et  des
     lecteurs de CDROM.

     La  Seagate  reporte  le  protocole  REQ/ACQ  du  bus SCSI dans les
     signaux IO CHANNEL READY et, eventuellement,  OWS  du  bus  du  PC.
     Malheureusement, vous n'etes pas averti de l'expiration du timer de
     surveillance (watchdog timer) et vous n'avez aucun moyen de  savoir
     avec  certitude  que  le  signal  REQ  est  descendu ; vous risquez
     finalement de voir passer une seule impulsion REQ  comme  plusieurs
     impulsions REQ.

     Etre  capable  de  traiter  ce cas implique de mettre en oeuvre une
     boucle active pour surveiller la descente du signal  REQ,  avec  un
     delai  de surveillance au cas ou vous auriez manque la transition a
     cause d'une interruption, etc. Vous observerez une degradation  des
     performances ; il pourrait etre judicieux de ne pas appliquer cette
     methode a tous les peripheriques SCSI. La selection peut  se  faire
     peripherique  par peripherique via le champ "broken" des entrees du
     tableau scsi_devices. Si vous  avez  des  problemes,  vous  pourrez
     tenter d'ajouter votre peripherique a la liste des equipements pour
     lesquels le champ "broken" n'est pas positionne a 0  (actuellement,
     il n'y a que les lecteurs de CDROM TENEX).

  3. Une  carte Future Domain (en particulier les  840, 841, 880 et 881)
     ne marche pas.

     Quelques-unes des cartes  Future  Domain  utilisent  l'organisation
     (mapping)  des  registres  des  Seagate  ;  les  bits  MSG et CD du
     registre d'etat sont inverses.

     Editez le fichier seagate.h, echangez les definitions  de  SSTTAATT__MMSSGG
     et  SSTTAATT__CCDD  puis  recompilez  le noyau avec la variable CCOONNTTRROOLLLLEERR
     definie a SSEEAAGGAATTEE et les variables  IIRRQQ  et  OOVVEERRRRIIDDEE  correctement
     positionnees.

  4. Lors  d'une tentative de partionnement de votre disque (par fdisk),
     vous  avez  un  message  indiquant  que  les  ioctl   HDIO_REQ   ou
     HDIO_GETGEO ont echoue, ou encore

     You must set heads sectors and cylinders.
     You can do this from the extra functions menu.

  Reportez-vous a la section ``Partitionnement des disques''

  5. Apres  avoir  specifie  manuellement  la  geometrie  du disque, les
     essais de  lecture  de  la  table  des  partitions  provoquent  les
     messages d'erreurs "partition boundary not on a cylinder boundary",
     "physical and logical boundaries don't match", etc.

     Reportez-vous a la section ``Partitionnement des disques''

  6. Sur certains systeme qui fonctionnaient avant la  version  0.99.13,
     les  nouvelles  versions  de Linux echouent. Les anciennes versions
     affectaient les registres CONTROL et DATA dans un  ordre  different
     de  celui explique dans la documentation Seagate, ce qui perturbait
     certains  systemes.  Les  nouvelles  versions  se   conforment   au
     document, mais cela perturbe maintenant d'autres systemes.

  Le code du fichier seagate.c ressemble maintenant a :

       cli();
       DATA = (unsigned char) ((1 << target) | (controller_type == SEAGATE ? 0x80 : 0x40));
       CONTROL = BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL |
                   (reselect ? CMD_ATTN : 0);
       sti();

  Votre probleme peut etre corrige en changeant ce code en :

       cli();
       CONTROL = BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL |
                   (reselect ? CMD_ATTN : 0);
       DATA = (unsigned char) ((1 << target) | (controller_type == SEAGATE ? 0x80 : 0x40));
       sti();

  Constantes :

  FAST ou FAST32 pour la mise en oeuvre de transferts aveugles

  ARBITRATE      va forcer le controleur a arbitrer le bus en mode de
                 compatibilite SCSI-II, plutot que d'attendre le signal BUS FREE
                 avant de continuer. Cela devrait nous permettre de traiter une
                 commande par unite logique le jour ou j'integrerai mes
                 modifications de reorganisation dans les sources de
                 l'arborescence de reference.

  SLOW_HANDSHAKE autorise la compatibilite avec des peripheriques deficients,
                 qui n'acquittent pas suffisamment rapidement (par exemple
                 certains lecteurs de CDROM) pour le code des cartes Seagate.

  SLOW_RATE=x,   x etant un entier specifiant un taux de transfert par defaut
                 si le protocole d'acquittement (handshaking) ne fonctionne
                 pas correctement.

  55..1155..  PPAASS1166 SSCCSSII ((ssttaannddaarrdd))

  Configurations supportees et non supportees :

       Ports          : 0x388, 0x384, 0x38x, 0x288
       IRQs           : 10, 12, 14, 15
            IMPORTANT : les IRQ DOIVENT etre differentes des IRQ utilisees par la
                        partie de gestion du son de la carte
       DMA            : n'est pas utilise par la partie SCSI de la carte
       E/S            : port mappe

  Auto-detection :

       n'a pas besoin du BIOS

  Surcharge de l'auto-detection :

       A la compilation : definissez PAS16_OVERRIDE comme un tableau de nuplets
       de la forme {'port', 'irq'}. Par exemple :

       #define PAS16_OVERRIDE {{0x388, 10}}

       pour une carte de port 0x388, IRQ 10.

  Ligne de commande du noyau :

  pas16=port,irq

  Constantes :

       AUTOSENSE  - si elle est definie, la commande SCSI 'REQUEST SENSE' sera
                    automatiquement emise pour les commandes qui se terminent
                    avec un status 'CHECK CONDITION'.

       PSEUDO_DMA - autorise le PSEUDO-DMA materiel ; devrait resulter en un
                    gain de performance de l'ordre de x3 / x4 par rapport aux
                    E/S scrutees (polled I/O).

       PARITY     - activation du controle de parite. N'est pas gere.

       SCSI2      - activation de la gestion de 'files marquees' pour le SCSI-II
                    (SCSI-II tagged queuing). Non teste.

       UNSAFE     - autorise les interruptions pendant les transferts
                    pseudo-DMA. Vous activerez cela uniquement si vous avez
                    des problemes de perte de caracteres durant les
                    communications a haute vitesse. Cependant, meme dans ce cas,
                    vous auriez plutot interet a jouer avec les tailles de blocs de
                    transfert.

       USLEEP     - autorise la gestion des peripheriques qui ne se deconnectent
                    pas. Non teste.

  Problemes frequents :

  1. Commandes en timeouts, interruptions, etc.

     Utilisez les patches pour les NCR5380 que j'ai postes sur le reseau
     il y a quelque temps (ils devraient etre integres dans la prochaine
     version  alpha).  Ces  patches  corrigent  un sequencement critique
     (race condition) des precedentes versions du  pilote  NCR5380.  Ils
     corrigent   egalement   un   probleme   de   gestion  de  plusieurs
     peripheriques pour les controleurs bases sur le NCR5380.

     Si cela  echoue,  vous  devrez  interdire  l'option  PSEUDO_DMA  en
     changeant     la    ligne    #define    PSEUDO_DMA    du    fichier
     drivers/scsi/pas16.c en #undef PSEUDO_DMA.

     Remarquez que cette solution doit  etre  consideree  uniquement  en
     dernier recours, car elle penalise gravement les performances.

  55..1166..  TTrraannttoorr TT112288//TT112288FF//TT222288 ((ssttaannddaarrdd))

  Configurations supportees et non supportees :

  Adresses de base :  0xcc000, 00xc8000, 0xdc000, 0xd8000
  IRQs             : aucune, 3, 5, 7 (toutes cartes)
                     10, 12, 14, 15 (T128F uniquement)
  DMA              : non utilise
  E/S              : memoire mappee

  Auto-detection :

       fonctionne sur toutes les configurations supportees ; necessite un BIOS
       installe.

  Surcharge de l'auto-detection :

       A la compilation : la variable T128_OVERRIDE doit etre un tableau
       de nuplets de la forme {'adresse', 'irq'}. Par exemple :

       #define T128_OVERRIDE {{0xcc000, 5}}

       pour une carte a l'adresse 0xcc000, IRQ 5.

       Les valeurs symboliques IRQ_NONE et IRQ_AUTO peuvent etre employees pour le
       champ IRQ.

  Ligne de commande du noyau :

       t128=adresse,irq
       -1 peut etre utilise pour "pas d'irq", -2 pour "auto-detection de l'irq".

  Constantes :

  AUTOSENSE  - si elle est definie, la commande SCSI 'REQUEST SENSE' sera
               automatiquement emise pour les commandes qui se terminent
               avec un status 'CHECK CONDITION'.

  PSEUDO_DMA - autorise le PSEUDO-DMA materiel ; devrait resulter en un
               gain de performance de l'ordre de x3 / x4 par rapport aux
               E/S scrutees (polled I/O).

  PARITY     - activation du controle de parite. N'est pas gere.

  SCSI2      - activation de la gestion de 'files marquees' pour le SCSI-II

  UNSAFE     - autorise les interruptions pendant les transferts
               pseudo-DMA. Vous activerez cela uniquement si vous avez
               des problemes de perte de caracteres durant les
               communications a haute vitesse. Cependant, meme dans ce cas,
               vous auriez tout interet a jouer avec les tailles de blocs de
               transfert.

  USLEEP     - autorise la gestion des peripheriques qui ne se deconnectent
               pas. Non teste.

  Problemes frequents :

  1. Commandes en timeouts, interruptions, etc.

     Utilisez les patches pour les NCR5380 que j'ai postes sur le reseau
     il y quelque temps (ils devraient etre integres dans  la  prochaine
     version  alpha).  Ces  patches  corrigent  un sequencement critique
     (race condition) des precedentes versions du  pilote  NCR5380.  Ils
     corrigent   egalement   un   probleme   de   gestion  de  plusieurs
     peripheriques pour les controleurs bases sur le NCR5380.

     Si cela  echoue,  vous  devrez  interdire  l'option  PSEUDO_DMA  en
     changeant     la    ligne    ##ddeeffiinnee    PPSSEEUUDDOO__DDMMAA    du    fichier
     drivers/scsi/pas16.c en ##uunnddeeff PPSSEEUUDDOO__DDMMAA.

     Remarquez que cette solution doit  etre  consideree  uniquement  en
     dernier recours, car elle penalise gravement les performances.

  55..1177..  UUllttrraassttoorr 1144ff ((IISSAA)),, 2244ff ((EEIISSAA)),, 3344ff ((VVLLBB)) ((ssttaannddaarrdd))

  Configurations supportees :

       Ports          : 0x130, 0x140, 0x210, 0x230, 0x240, 0x310, 0x330, 0x340
       IRQs           : 10, 11, 14, 15
       Canaux DMA     : 5, 6, 7
       E/S            : port mappe, controle de bus

  Auto-detection :

       ne marche pas pour les cartes sur le port 0x310. Le BIOS n'est pas necessaire.

  Surcharge de l'auto-detection :

       uniquement a la compilation (definissez PORT_OVERRIDE)

  Problemes frequents :

  1. L'adresse 0x310 n'est pas reconnue par le code d'auto-detection  et
     peut creer des conflits si le reseau est active.

     Utilisez une adresse differente.

  2. L'utilisation   d'une   carte  Ultrastor  a  l'adresse  0x330  peut
     provoquer des blocages du systeme lorsque les pilotes sons sont  en
     phase d'auto-detection.

     Utilisez une adresse differente.

  3. D'autres  pilotes  effectuent  des  auto-detections  dangereuses  a
     diverses adresses. Si vous avez des problemes de detection ou si le
     systeme se bloque au demarrage, essayez une autre adresse.

     0x340 est reputee etre une adresse qui marche.

  4. Linux  ne  detecte  aucun  peripherique  SCSI, mais reconnait votre
     disque dur connecte a une carte  SCSI  Ultrastor  comme  un  disque
     normal,  sans  que le pilote de disque arrive a le gerer. Notez que
     lorsque cela se produit, vous avez probablement le message

       hd.c: ST-506 interface disk with more than 16 heads detected,
       probably due to non-standard sector translation.  Giving up.
       (disk %d: cyl=%d, sect=63, head=64)

  Si c'est le cas, vous utilisez la carte Ultrastor  en  mode  emulation
  WD1003. Vous devez alors :

     a. basculer la carte Ultrastor en mode natif. C'est ce qu'il y a de
        mieux  a  faire,  etant  donne  que  les   disques   SCSI   sont
        sensiblement plus rapides que les disques IDE, specialement avec
        les patches de lectures/ecritures groupees. Certains ont  obtenu
        des  debits  soutenus  de  plus de 2Mo/s a travers le systeme de
        gestion de fichiers, apres application de ces patches.

        Notez que cela ne sera pas necessaire si vous n'utilisez pas  de
        disque  dur ou si vous branchez plus de deux disques durs sur la
        carte Ultrastor.

     b. utilisez la ligne de commande du noyau

          hd=cylindres,tetes,secteurs

     pour surcharger les parametres  de  configuration  par  defaut,  de
     maniere  a pouvoir demarrer vous-meme, tout en vous assurant que le
     nombre de cylindres <= 2048, le nombre de tetes <= 16 et le  nombre
     de  secteurs  <=  255  soient tels que cylindres * tetes * secteurs
     soit le meme dans les deux representations.

     Vous devez egalement preciser la  geometrie  du  disque  au  moment
     d'utiliser  fdisk  sous Linux. Si vous omettez de le faire, de mau-
     vaises valeurs risqueraient d'etre ecrites dans la table des parti-
     tions.  Ces  valeurs seront correctes pour Linux, mais provoqueront
     des erreurs sous MSDOS, qui se base sur les  triplets  <tete/cylin-
     dre/secteur> de la table des partitions.

     Une fois que Linux a demarre, vous pouvez vous epargner la peine de
     preciser manuellement a chaque demarrage la geometrie en  modifiant
     comme il le faut la macro HD_TYPE du fichier include/linux/config.h
     et en recompilant le noyau.

  55..1188..  WWeesstteerrnn DDiiggiittaall 77000000 ((ssttaannddaarrdd))

  Configurations supportees :

       Adresses du BIOS : 0xce000
       Ports            : 0x350
       IRQs             : 15
       Canaux DMA       : 6
       E/S              : port mappe, controle de bus

  Auto-detection :

       necessite un BIOS active.

  Problemes frequents :

  1. Il existe plusieurs  versions  du  composant  et  du  firmware.  La
     version 3 de la carte est connue pour ne pas fonctionner, alors que
     les cartes de version 5 marchent.  De  meme,  les  composants  sans
     suffixe  ne  fonctionnent  pas,  alors  que  ceux  marques d'un 'A'
     marchent.

  2. La carte gere quelques adresses BIOS qui n'apparaissent pas dans la
     liste  des  adresses  supportees.  Si  vous vous trouvez dans cette
     situation, utilisez une  des  adresses  supportees  et  envoyez  un
     rapport  d'anomalie  suivant  la procedure decrite dans le chapitre
     ``Signaler une anomalie''.

  55..1199..  AAMM5533//7799CC997744 ((AALLPPHHAA))

  ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/AM53C974-0.3.tar.gz

  Configurations supportees :

       Ports          : Tous
       IRQs           : Tous
       Canaux DMA     : 6
       E/S            : port mappe, controle de bus (sans intelligence)

  55..2200..  qqllooggiicc ((ssttaannddaarrdd))

  He, Drew, ou est ce chapitre (I (D.F.). Je ne  l'ai  vu  que  dans  la
  table des matieres ;-) ?

  66..  DDiissqquueess

  Les informations contenues dans ce chapitre concernent les disques.

  66..11..  MMaatteerriieell ssuuppppoorrttee eett nnoonn ssuuppppoorrttee

  Tous  les  peripheriques  SCSI a acces direct, d'une taille de bloc de
  256, 512 ou 1024 octets devraient fonctionner. Les autres  tailles  de
  bloc  ne  marchent  pas  (notez  que cela peut souvent etre corrige en
  modifiant la taille des blocs  et/ou  des  secteurs  en  utilisant  la
  commande SCSI MODE SELECT).

  La  taille  des  secteurs fait reference au nombre d'octets de donnees
  presents par secteur  sur  un  peripherique  (les  lecteurs  de  CDROM
  utilisent par exemple une taille de secteur de 2048 octets).

  La  taille  des  blocs  fait  reference a la taille des blocs logiques
  utilises pour s'interfacer avec le peripherique. Bien que cette valeur
  soit  habituellement  identique  a  la  taille  des secteurs, certains
  peripheriques regroupent plusieurs secteurs physiques plus petits (par
  exemple  256 octets dans le cas des peripheriques Syquest de 55 Mo) en
  un seul bloc logique plus important ou l'inverse  (des  blocs  de  512
  octets sur les lecteurs de CDROM compatibles SUN, par exemple).

  Les  peripheriques  amovibles  incluent  les  disques  Bernouilis, les
  disques flopticals, les disques magneto-optiques et les Syquest.

  En theorie, les peripheriques d'une taille inferieure a  1  To  (tera-
  octets) devraient marcher. Il n'y a en particulier aucun probleme avec
  les minuscules disques de 9 Go.

  66..22..  PPrroobblleemmeess ffrreeqquueennttss

  66..22..11..  MMeessssaaggee ''CCyylliinnddrree ssuuppeerriieeuurr aa 11002244''

  Au moment du partitionnement, un message d'avertissement  "cylinder  >
  1024"  s'affiche  ou  bien  vous etes incapable de demarrer depuis une
  partition possedant des cylindres au-dela du cylindre 1024.

  C'est une limitation du BIOS.

  Reportez-vous aux chapitres ``Geometrie'' et ``Partitionnement''  pour
  des explications plus detaillees.

  66..22..22..  VVoouuss eetteess iinnccaappaabbllee ddee ppaarrttiittiioonnnneerr ""//ddeevv//hhdd**""

  Les /dev/hd* font reference a des peripheriques IDE. Utilisez /dev/sd*
  pour vos disques SCSI.

  Reportez-vous aux chapitres ``Fichiers  speciaux'',  ``Geometrie''  et
  ``Partitionnement''  pour les noms de fichiers corrects et la marche a
  suivre pour le partionnement.

  66..22..33..  IImmppoossssiibbiilliittee dd''eejjeecctteerr llee mmeeddiiaa dd''uunn ppeerriipphheerriiqquuee aammoovviibbllee

  Linux  tente  de  verrouiller  la porte du lecteur lorsqu'un media est
  monte,  afin  d'eviter  les  endommagements  du  systeme  de  fichiers
  resultants d'un changement de support.

  Demontez vos disques amovibles avant de les ejecter.

  66..22..44..   IImmppoossssiibbiilliittee  ddee ddeemmaarrrreerr ddeeppuuiiss uunn ddiissqquuee SSCCSSII eenn uuttiilliissaanntt
  LLIILLOO

  Dans  certaines  conditions,  le  pilote  SCSI  et le BIOS ne sont pas
  d'accord sur le mapping du BIOS correct a utiliser.  Le  resultat  est
  que  LILO  se bloque apres avoir affiche les lettres 'LI' au moment du
  boot.

  Comme contournement, trouvez quelle geometrie est  utilisee  sous  DOS
  puis   creez   une   entree   pour   votre   disque  dans  le  fichier
  /etc/lilo/disktab.

  Vous pouvez eventuellement egalement utiliser l'option  "linear"  pour
  LILO.

  66..22..55..  FFddiisskk rreeppoonndd ppaarr

       You must set heads sectors and cylinders.
       You can do this from the extra functions menu.

  et  la  geometrie  du  disque  n'est  pas  memorisee lorsque fdisk est
  reexecute.

  Reportez-vous au chapitre ``Partitionnement''.

  66..22..66..  UUnn sseeuull ppeerriipphheerriiqquuee eesstt ddeetteeccttee ssuurr uunnee  ccaarrttee  ppoonntt  ((bbrriiddggee
  bbooaarrdd)) aavveecc pplluussiieeuurrss ppeerriipphheerriiqquueess

  Linux ne recherche pas les unites logiques (LUNs) superieures a 0  sur
  les peripheriques SCSI qui retournent une version ANSI SCSI 1. Si vous
  voulez que toutes les unites logiques soient reconnues, allez modifier
  la fonction scan_scsis() du fichier drivers/scsi/scsi.c.

  66..22..77..  LLee ssyysstteemmee ssee ffiiggee eenn sswwaappppaanntt

  La  version 1.1.38 devrait avoir corrige le probleme. Essayez de faire
  une mise a jour de votre pilote.

  66..22..88..  LLeess ddiissqquueess CCoonnnneerr CCFFPP11006600SS ssoonntt eennddoommmmaaggeess

  Cela est du a un erreur du microcode dans  les  fonctions  de  lecture
  anticipee et dans le cache.

  >D'apres Soenke Behrens, du support technique de Conner :

  Ces dernieres semaines, nous avons recu des appels de plusieurs clients
  qui nous affirmaient avoir de serieux problemes avec les disques SCSI
  Conner CFP1060x de 1Go en utilisant le systeme d'exploitation Linux.
  Des erreurs etaient detectees par e2fsck a chaque demarrage du systeme
  (inodes abimes) entre autres.

  Une correction est maintenant disponible pour les clients possedant
  des CFP1060x (versions de microcode 9WA1.62/1.66/1.68) sous Linux. Pour
  appliquer la mise a jour, vous aurez besoin d'une disquette bootable DOS,
  et des pilotes ASPI qui permettent l'acces au disque dur. La mise a jour
  telecharge un nouveau code de gestion de files (mise en file et lecture)
  dans la memoire SCSI non-volatile du disque.

  Si vous avez des problemes avec des disques dont le microcode est a la
  version 9WA1.60, contactez votre centre Conner le plus proche pour une
  mise a jour. La version du microcode peut etre trouvee sur l'etiquette
  du disque ou, sur sa face inferieure, sur l'etiquette d'un des circuits
  integres.

  Si vous vous sentez assez sur de vous pour faire vous-meme la mise a jour,
  appelez le support technique de Conner, apres avoir note la version de
  votre microcode. Le support technique de Conner en Europe peut etre joint
   au +44-1294-315333. Le support americain peut etre joint au 1-800-4CONNER.

  Salutations,
  Soenke Behrens
  Support Technique Europe

  66..33..  FFiicchhiieerrss ssppeecciiaauuxx

  Les  disques  SCSI utilisent le majeur bloc 8. Il n'y a pas d'acces en
  mode "raw", comme sous BSD.

  16 mineurs sont attribues pour chaque disque SCSI, mineur %  16  ==  0
  representant  le  disque  entier,  1  <=  (mineur  %  16)  <=  4 les 4
  partitions principales et 5 <= (mineur %  16)  <=  15  les  partitions
  etendues.

  Exemple de configuration avec un seul controleur :

  Peripherique                 Adresse  Unite logique     disque SCSI
  Seagate 84M                  0        0                 /dev/sda
  Disque 0 SCSI->SMD bridge    3        0                 /dev/sdb
  Disque 1 SCSI->SMD bridge    3        1                 /dev/sdc
  Derouleur de bande Wangtek   4        0                 aucun
  Maxtor 213M                  6        0                 /dev/sdd

  etc.

  La convention de nommage standard est

  /dev/sd{lettre} pour le disque entier ((mineur % 16) == 0)

  /dev/sd{lettre}{partition}  pour  les  partitions  de  ce disque (1 <=
  (mineur % 16) <= 15)

  Par exemple :

  /dev/sda        peripherique mode bloc de majeur 8 et de mineur 0
  /dev/sda1       peripherique mode bloc de majeur 8 et de mineur 1
  /dev/sda2       peripherique mode bloc de majeur 8 et de mineur 2
  /dev/sdb        peripherique mode bloc de majeur 8 et de mineur 16

  etc.

  66..44..  PPaarrttiittiioonnnneemmeenntt

  Vous pouvez partitionner vos disques  SCSI  en  utilisant  l'outil  de
  votre  choix,  sous  DOS,  OS/2, Linux ou n'importe quel autre systeme
  d'exploitation supportant le schema de partionnement standard.

  Le meilleur moyen d'utiliser  le  programme  fdisk  de  Linux  est  de
  specifier  le peripherique sur la ligne de commande. Par exemple, pour
  partitionner le premier disque SCSI, tapez :

       fdisk /dev/sda

  Si vous ne precisez pas explicitement le peripherique, le programme de
  partionnement  pourrait  prendre par defaut /dev/hda, qui n'est pas un
  disque SCSI.

  Il peut arriver que fdisk affiche

  You must set heads sectors and cylinders.
  You can do this from the extra functions menu.

  Command (m for help):

  ou qu'il sorte un message comme quoi "HDIO_REQ ou HDIO_GETGEO ioctl" a
  echoue.   Dans  ce  cas, specifiez manuellement la geometrie du disque
  (``Geometrie'')  au  moment  de  lancer  fdisk   ou   entrez-la   dans
  /etc/disktab  si  vous  avez  l'intention  de  booter sur ce disque en
  utilisant LILO.

  Si  vous  avez  manuellement  precise  la  geometrie  du  disque,  les
  utilisations  ulterieures  de  fdisk  vous  donneront  le meme message
  d'erreur.  C'est  normal,  puisque  les  PC  ne   stockent   pas   les
  informations  de geometrie dans la table des partitions. Cela ne cause
  AUCUN PROBLEME et vous n'aurez pas de soucis a acceder aux  partitions
  creees par Linux. Certains programmes mal ecrits peuvent en etre genes
  ; contactez votre revendeur et insistez pour qu'il corrige son code si
  cela arrivait.

  Un message d'avertissement vous signale parfois que votre partition se
  termine au-dela du cylindre 1024. Si vous creez une  telle  partition,
  vous  ne  serez  pas capable de demarrer dessus avec LILO. Cela etant,
  rien n'empeche de creer une partition racine (root)  partiellement  ou
  entierement  situee  au-dela  de  ce  cylindre  1024.  Il est en effet
  toujours possible de creer une petite partition /boot sous la barriere
  des  1024  ou  de  demarrer  le  noyau  directement  depuis  une autre
  partition.

  66..55..  GGeeoommeettrriiee

  Sous Linux, chaque disque est vu tel que le controleur SCSI le voit  :
  N  blocs,  numerotes  de  0 a N - 1, sans erreurs, la ou le DOS / BIOS
  considerent avoir affaire a des disques intelligents et appliquent une
  transformation  arbitraire  <tete/cylindre/secteur>  a  cet  adressage
  lineaire.

  Cela peut poser un probleme lorsque  vous  partitionnez  votre  disque
  sous  Linux,  puisqu'il  n'y  a  pas de moyen portable de recuperer la
  geometrie estimee par le DOS/BIOS. Dans la plupart des cas, un ioctl()
  HDIO_GETGEO   peut   etre   implemente   pour   obtenir   ce  mapping.
  Malheureusement, lorsque le vendeur (au  hasard  Seagate)  choisit  un
  mapping  retors,  non  standard  et  non  documente,  cela  n'est plus
  possible et il est necessaire de preciser manuellement la geometrie.

  Si vous en arrivez la, plusieurs options sont possibles :

  1. Si cela ne vous gene pas d'utiliser DOS ou de  demarrer  depuis  le
     disque  avec LILO, creez une traduction telle que tete * cylindre *
     secteur * 512 < taille de votre disque en octets (un megaoctet  est
     defini par 2^20 octets).

     1 <= tete <= 256
     1 <= cylindre <= 1024
     1 <= secteur <= 63

  2. Utilisez le mapping du BIOS. Dans certains cas, cela implique qu'il
     faudra reconfigurer  le  disque  de  maniere  a  ce  qu'il  soit  a
     l'adresse  SCSI  0  et qu'il faudra desactiver le second disque IDE
     (si vous en avez un).

  Sous DOS, vous  pouvez  utiliser  un  programme  tel  que  NU  (Norton
  Utilities).  Vous pouvez aussi lancer le programme suivant :

  begin 664 dparam.com
  MBAZ``##_B+^!`+N!`(H'0SP@=/D\,'5:@#]X=`6`/UAU4(!_`3AU2H!_`P!U
  M1(I7`H#J,(#Z`7<Y@,*`M`C-$PCD=3-14HC()#\PY.@R`.@J`%J(\/[`,.3H
  M)0#H'0!8AL2Q!M+L0.@7`+K"`;0)S2'#NIP!ZR"ZQ0'K&[K5`>L6N]T!,=*Y
  M"@#W\8#",$N(%PG`=>^)VK0)S2'#=7-A9V4Z(&1P87)A;2`P>#@P#0H@("!O
  L<B`@9'!A<F%M(#!X.#$-"B1);G9A;&ED(&1R:79E#0HD("`D```````D``!O
  `
  end

  Lorsque  vous  le  lancerez,  il  affichera  le nombre de secteurs, de
  cylindres et de tetes du disque dont l'adresse BIOS a ete fournie  sur
  la ligne de commande (0x80 pour le premier disque, 0x81 pour le second
  disque, etc.).

  Par exemple, dparam 0x80

  60      17      1007

  signifie que C: a 60 secteurs, 17 tetes et 1007 cylindres.

  77..  LLeess lleecctteeuurrss ddee CCDDRROOMM

  Ce chapitre contient des  informations  specifiques  aux  lecteurs  de
  CDROM.

  77..11..  MMaatteerriieell ssuuppppoorrttee eett nnoonn ssuuppppoorrttee

  Les  lecteurs  de  CDROM  SCSI  avec une taille de bloc de 512 ou 2048
  octets doivent marcher. D'autres tailles  de  bloc  ne  fonctionneront
  pas.

  77..22..  PPrroobblleemmeess ffrreeqquueennttss

  77..22..11..  IImmppoossssiibbiilliittee ddee mmoonntteerr llee CCDDRROOMM

  La syntaxe correcte pour monter un CDROM ISO-9660 est la suivante :

       mount -t iso9660 /dev/sr0 /point_de_montage -o ro

  Il  est  evident  que  pour que cela fonctionne, il faut avoir integre
  dans le noyau (ou en module) le support SCSI  pour  votre  controleur,
  pour le pilote SCSI et le systeme de fichiers iso9660.

  Notez  aussi  que dans les noyaux 1.1.32, les peripheriques en lecture
  seule tels que les CDROM ne peuvent pas etre montes avec  les  options
  par defaut (lecture/ecriture (read/write)).

  77..22..22..  IImmppoossssiibbiilliittee dd''eejjeecctteerr llee CCDDRROOMM

  Linux  tente  de  verrouiller  la porte du lecteur lorsqu'un media est
  monte,  afin  d'eviter  les  endommagements  du  systeme  de  fichiers
  resultants d'un changement de support.

  77..22..33..  IImmppoossssiibbiilliittee dd''eeccoouutteerr ddeess CCDD aauuddiioo

  Essayez donc workman ou xcdplayer.

  77..22..44..  WWoorrkkmmaann oouu xxccddppllaayyeerr nnee mmaarrcchheenntt ppaass

  Les  fonctions  de  controle  des fonctionnalites audio font partie de
  l'ensemble des commandes de la norme SCSI-II. Les lecteurs qui ne sont
  pas  SCSI-II  n'ont  donc  que  peu  de  chances  de marcher. De plus,
  quelques lecteurs de CDROM SCSI-I et SCSI-II utilisent un ensemble  de
  commandes  proprietaires au lieu des commandes de la norme SCSI-II. Il
  existe une version de xcdplayer pour les lecteurs NEC - jetez un  oeil
  sur tsx-11.mit.edu au repertoire /pub/linux/BETA/cdrom.

  Ces  programmes  peuvent  egalement  marcher avec quelques lecteurs de
  CDROM non SCSI, si leurs pilotes implementent les memes ioctls que les
  pilotes SCSI.

  77..22..55..  LLeess ddiissqquueess ssuupppplleemmeennttaaiirreess ssuurr lleess cchhaarrggeeuurrss SSCCSSII nnee mmaarrcchheenntt
  ppaass

  La  plupart  des  chargeurs  de  CDROM  attribuent une unite logique a
  chaque  disque.  Verifiez  que  vous  avez  bien  un  fichier  special
  (/dev/...)  pour  chaque  plateau de votre chargeur (reportez-vous aux
  chapitres ``Fichiers speciaux'' et ``Les unites logiques autres que la
  premiere ne fonctionnent pas''.

  77..33..  FFiicchhiieerrss ssppeecciiaauuxx

  Les CDROM SCSI utilisent le majeur 11.

  Les  mineurs sont attribues dynamiquement (reportez-vous aux chapitres
  ``Disques'', ``Fichiers speciaux'' pour des exemples) le premier CDROM
  trouve ayant le mineur 0, le deuxieme le mineur 1, etc.

  La convention standard de nommage est la suivante :

  /dev/sr{chiffre},  bien  que  certaines  distributions  aient  utilise
  /dev/scd{chiffre}. Par exemple :

  /dev/sr0        /dev/scd0
  /dev/sr1        /dev/scd1

  88..  LLeess lleecctteeuurrss ddee bbaannddeess

  Les informations de ce chapitre concernent les lecteurs de bandes.

  88..11..  MMaatteerriieell ssuuppppoorrttee eett nnoonn ssuuppppoorrttee

  Les peripheriques utilisant des tailles de blocs  fixes  ou  variables
  plus  petites  que  la  taille du buffer du pilote SCSI (32Ko dans les
  sources de la distribution du noyau) sont geres.

  Les parametres (taille de bloc, bufferisation,  densite)  sont  regles
  via  des  ioctls  (habituellement  par  le programme mmtt) ; ils restent
  actifs  meme  si  le  peripherique  est  ferme  puis  reouvert   (ici,
  peripherique  est  a prendre au sens : fichier special representant ce
  peripherique).

  Theoriquement, tous les lecteurs doivent marcher, y compris :

  +o  Lecteurs Archive Viper QIC (dont les modeles 150Mo et 525Mo)

  +o  Lecteurs Exabyte 8mm

  +o  Lecteurs Wangtek 5150S

  +o  Lecteurs Wangdat DAT

  88..22..  PPrroobblleemmeess ffrreeqquueennttss

  88..22..11..  LLee lleecctteeuurr ddee bbaannddee nn''eesstt ppaass rreeccoonnnnuu aauu ddeemmaarrrraaggee

  Essayez de demarrer avec une bande dans le lecteur.

  88..22..22..  IImmppoossssiibbiilliittee  ddee  lliirree  ccoorrrreecctteemmeenntt  ddeess  bbaannddeess  ccoommppoorrttaanntt
  pplluussiieeuurrss ffiicchhiieerrss

  En lisant des bandes avec  plusieurs  fichiers,  le  premier  tar  est
  correct,  mais  le  suivant  echoue sans remontee d'erreurs. Un second
  essai de tar reussit.

  Les programmes utilisateur, tels que tar, ne  savent  pas  interpreter
  les marques de fichiers. Le premier tar lit la bande jusqu'a la fin du
  fichier. Le second tar essaie de lire la marque de fichier (file mark)
  et  n'obtient  aucune donnee. Par contre, la bande a depasse la marque
  de fichier, si bien que la troisieme lecture lit le  deuxieme  fichier
  de la bande.

  Utilisez  mmtt sur le fichier special attaquant le lecteur en mode 'non-
  rembobinage' (no-rewind) pour avancer jusqu'au fichier suivant.

  88..22..33..  LLaa ddeeccoommpprreessssiioonn eecchhoouuee

  Les programmes de decompression ne sont  pas  capables  de  gerer  les
  zeros qui comblent le dernier bloc du fichier.

  Pour  eliminer  les avertissements et les erreurs, mettez vos fichiers
  compresses dans un fichier tar. Plutot que de faire :

       tar cfvz /dev/nst0 fichier.1 fichier.2 ...

  faites :

       tar cfvz tmp.tar.z fichier.1 fichier.2 ...

       tar cf /dev/nst0 tmp.tar.z

  88..22..44..  PPrroobblleemmeess ddee lleeccttuurree ddee bbaannddeess ffaaiitteess ssuurr dd''aauuttrreess ssyysstteemmeess

  Vous  n'arrivez  pas  a  relire  une  bande faite sur un autre systeme
  d'exploitation ou bien un autre systeme d'exploitation n'arrive pas  a
  relire les bandes faites sous Linux.

  Les  differents  systemes  utilisent  souvent  des  tailles  de  blocs
  differentes. Sur un lecteur de bande utilisant une taille  fixe,  vous
  allez  avoir  des  erreurs en essayant de lire des blocs inscrits avec
  une autre taille.

  Pour lire ces bandes, vous devez ajuster la taille des blocs de  votre
  pilote de bandes a la taille avec laquelle la bande a ete ecrite. Vous
  pouvez aussi essayer de le configurer pour qu'il  utilise  une  taille
  variable.

  REMARQUE  :  cette taille est une taille physique de bloc et n'est pas
  le facteur de blocage utilise par tar, dump et consors.

  Vous pouvez le faire par la commande mmtt :

       mt setblk <taille>

  ou

       mt setblk 0

  pour indiquer au pilote d'utiliser une taille de bloc variable.

  Notez que ces options de mmtt ne sont pas supportees par la version  GNU
  de  mt qui est incluse dans certaines distributions de Linux. Utilisez
  plutot la version mt  derivee  de  BSD.  Les  sources  devraient  etre
  disponibles a l'adresse

       tsx-11.mit.edu:/pub/linux/ALPHA/scsi

  SSTT__BBUUFFFFEERR__BBLLOOCCKKSS         (definie        dans        le        fichier
  /usr/src/linux/drivers/scsi/st_options.h dans les  noyaux  recents  et
  /usr/src/linux/drivers/scsi/st.c   dans   les   anciens   noyaux)  est
  initialisee de maniere a autoriser une taille maximale des buffers  de
  32Ko. Editez le fichier precedent pour augmenter cette limite.

  88..22..55..  MMeessssaaggee dd''eerrrreeuurr ""NNoo ssuucchh ddeevviiccee""

  Tous les essais pour acceder a la bande se terminent par un message du
  genre

  "No such device".

  Verifiez le type du fichier special  representant  votre  lecteur.  Ce
  doit  etre  un  fichier en mode caractere, les majeur et mineur devant
  etre en  concordance  avec  les  valeurs  definies  dans  le  chapitre
  ``Fichiers speciaux''.

  88..22..66..   LLeess  lleeccttuurreess ddee bbaannddeess aa uunnee cceerrttaaiinnee ddeennssiittee mmaarrcchheenntt,, mmaaiiss
  lleess eeccrriittuurreess eecchhoouueenntt

  Plusieurs  lecteurs  de  bandes  acceptent  les lectures a une densite
  inferieure pour compatibilite avec des materiels  plus  anciens,  mais
  ils n'ecrivent pas a ces memes densites.

  C'est  le  cas en particulier des lecteurs QIC, qui peuvent relire des
  vieilles cassettes de 60Mo, mais qui ne savent  plus  ecrire  que  des
  bandes de 120, 150, 250 ou 525Mo.

  88..22..77..  LLee rreeppoossiittiioonnnneemmeenntt ddee llaa bbaannddee bbllooqquuee llee bbuuss SSCCSSII

  Cela  est  frequent  avec  les  equipements  SCSI qui ne gerent qu'une
  commande  en  attente   a   la   fois   (reportez-vous   au   chapitre
  ``Peripheriques  multiples''  pour  une explication plus detaillee, et
  ``Guide de l'acheteur : comparaison des  fonctionnalites''  pour  voir
  quels  lecteurs  souffrent  de cette limitation), bien que cela puisse
  egalement etre du a un lecteur de bandes refusant les deconnexions.

  Dans tous les cas, vous pouvez contourner ce probleme  en  editant  le
  fichier drivers/scsi/sr.c et en ajoutant une ligne

       #define ST_NOWAIT

  au debut. Regenerez ensuite le noyau.

  Cela  va  avoir pour effet de retarder les eventuelles erreurs jusqu'a
  la prochaine commande SCSI executee. Il est pour  cela  preferable  de
  faire

       mt status

  apres  qu'une commande de repositionnement a ete demandee par mmtt. Cela
  vous evitera d'ecraser des fichiers sur la bande si le  positionnement
  a echoue.

  Vous pouvez aussi envisager de changer votre controleur pour un modele
  mieux supporte ou de vous equiper d'un lecteur de bande  plus  recent,
  si  vous  avez besoin d'utiliser ce contournement et que vous desiriez
  ecrire plusieurs fichiers sur une meme bande.

  88..33..  FFiicchhiieerrss ssppeecciiaauuxx

  Les lecteurs de bandes SCSI utilisent le majeur 9.

  Linux utilise le type dev_t sur 16 bits, dont  8  bits  sont  reserves
  pour  le  mineur.  Pour cette raison, les mineurs pour les bandes SCSI
  sont  affectes  dynamiquement  et  commencent  au  plus  petit  numero
  d'adapteur SCSI, peripherique ou unite logique.

  Les  mineurs des fichiers speciaux rembobinant les bandes commencent a
  0, 0 etant le premier lecteur de bande SCSI (/dev/st0 cree  par  mmkknnoodd
  //ddeevv//sstt00  cc 99 00), le deuxieme lecteur etant /dev/st1 (mmkknnoodd //ddeevv//sstt11 cc
  99 11), etc.

  Les mineurs des fichiers speciaux ne rembobinant pas les bandes ont le
  bit  de  poids  fort  a 1, c'est-a-dire que /dev/nst0 a ete cree par :
  mmkknnoodd //ddeevv//nnsstt00 cc 99 112288.

  La convention standard de nommage est

  /dev/nst{chiffre} pour les operations sans rembobinage
  /dev/st{chiffre}  pour les operations avec rembobinage

  99..  PPiilloottee ggeenneerriiqquuee

  Les informations contenues dans ce chapitre sont specifiques au pilote
  SCSI generique.

  99..11..  MMaatteerriieell ssuuppppoorrttee

  Le  pilote  SCSI generique fournit une interface normalisee permettant
  d'envoyer des commandes SCSI a tous les peripheriques SCSI -  disques,
  bandes, CDROM, chargeurs multi-disques, etc.

  Tout  equipement  electriquement compatible avec votre carte SCSI doit
  fonctionner.

  99..22..  PPrroobblleemmeess ffrreeqquueennttss

  Aucun :-)

  99..33..  FFiicchhiieerrss ssppeecciiaauuxx

  Les fichiers speciaux du  pilote  SCSI  generique  utilisent  le  mode
  caractere,   de   majeur   21.  A  cause  des  memes  contraintes  que
  precedemment, les mineurs sont attribues dynamiquement a partir de  0,
  un par peripherique,

  /dev/sg0

  correspondant  au  plus  petit  peripherique  ou  unite logique sur le
  premier controleur.

  1100..  GGuuiiddee ddee ll''aacchheetteeuurr

  Une question frequente est :

  "Linux gere un nombre plutot eleve  de  controleurs  differents.  Quel
  controleur dois-je acheter ?"

  La  reponse depend des performances que vous esperez ou dont vous avez
  besoin,  de  la  carte  mere  et  des  peripheriques  que  vous   avez
  l'intention de connecter a votre machine.

  1100..11..  TTyyppeess ddee ttrraannssffeerrtt

  Le  facteur  le plus important affectant les performances (en terme de
  debit et de temps de reponse  lors  des  E/S  SCSI)  est  le  type  de
  transfert  utilise.  La  table  ci-dessous  liste  les divers types de
  transfert, les effets de  chacun  sur  les  performances  et  quelques
  recommandations sur leur emploi.

     TTyyppee ddee ttrraannssffeerrtt
        Description / Performance / Recommandations

     SSccrruuttaattiioonn ppuurree ((PPuurree PPoolllleedd))
        Une  carte  d'E/S  scrutee conduit le processeur central a faire
        tout le traitement SCSI, y compris le protocole REQ/ACQ.

        Meme un  processeur  rapide  va  etre  plus  lent  a  gerer  les
        sequences  REQ/ACQ qu'une simple machine a etats finis. Le debit
        peut descendre a 150Ko/s  sur  une  machine  rapide  et  parfois
        60Ko/s sur une machine lente (a travers le systeme de fichiers).

        Le pilote doit egalement se mettre en boucle (tight  loop)  tant
        que  le bus SCSI est occupe, ce qui conduit a une utilisation de
        100% du processeur et a des temps de  reponse  deplorables  lors
        des   E/S   SCSI.   Les  lecteurs  de  CDROM  lents  qui  ne  se
        deconnectent/reconnectent  pas  vont  completement  ecrouler  le
        systeme avec de telles cartes.

        Non recommandees.

     SSccrruuttaattiioonn iinntteerr--vveerrrroouuiilllleeee ((IInntteerrlloocckkeedd PPoolllleedd))
        Les cartes utilisant des E/S a scrutation inter-verrouillee sont
        principalement  les  memes  que  les  cartes   precedentes,   le
        protocole  REQ/ACQ etant effectue conjointement avec les signaux
        de protocole du bus PC. Tous les traitements SCSI hors protocole
        REQ/ACQ sont geres par le processeur.

        Avec  de  telles cartes, des pointes de 500-600Ko/s peuvent etre
        mesurees a travers le systeme de fichiers.

        De meme qu'avec les cartes a scrutation pure, le pilote doit  se
        mettre  en  boucle  tant que le bus SCSI est occupe, ce qui rend
        l'utilisation du processeur dependante des taux de transfert des
        peripheriques et des deconnexions/reconnexions. L'utilisation du
        processeur peut varier de 25% pour des lecteurs de CDROM  simple
        vitesse  qui  gerent proprement les deconnexions/reconnexions, a
        100% pour les peripheriques rapides ou  les  lecteurs  de  CDROM
        deficients qui n'arrivent pas a se deconnecter/reconnecter.

        Sur mon 486-66, avec une carte T128, j'utilise 90% du processeur
        pour un debit soutenu de 547Ko/s avec un disque  dont  le  debit
        maximum est de 1080Ko/s.

        Ces cartes sont parfois acceptables pour des peripheriques lents
        (bandes, CDROM) lorsque le prix est le principal critere.

     SSccrruuttaattiioonn ppaarr FFIIFFOO ((FFIIFFOO PPoolllleedd))
        Les cartes implementant une scrutation  par  FIFO  utilisent  un
        tampon  de  taille reduite (typiquement 8Ko) entre le processeur
        et le bus SCSI et possedent quelque intelligence.  Le processeur
        principal  n'est plus mis a contribution que lors des transferts
        de donnees a pleine vitesse avec la FIFO ou lorsqu'il termine le
        traitement des interruptions FIFO pour les conditions vides, les
        deconnexions/reconnexions, etc.

        Les taux de transfert maximums devraient  etre  suffisants  pour
        traiter  la  plupart des peripheriques SCSI et peuvent atteindre
        4Mo/s sur un Seagate Baracuda rapide avec une  Adaptec  1520  en
        utilisant  des  commandes  SCSI  directes de lecture de blocs de
        64Ko.

        L'utilisation du processeur central depend des taux de transfert
        des   peripheriques,   les   plus   rapides   generant  le  plus
        d'interruptions et demandant donc plus de temps processeur. Bien
        que  le  taux  d'utilisation du processeur puisse etre important
        avec des peripheriques rapides (jusqu'a 75%), le  systeme  reste
        utilisable.   Ces   cartes   offrent   une   excellente  reponse
        interactive  avec  des  peripheriques  defectueux  qui   ne   se
        deconnectent/reconnectent  pas  (typiquement, des lecteurs CDROM
        bon marche).

        Recommandees  pour  un   usage   personnel,   pour   un   budget
        raisonnable.

     DDMMAA eessccllaavvee
        Les  pilotes  pour  les  cartes mettant en oeuvre du DMA esclave
        programment le controleur DMA du PC pour un  canal  lorsqu'elles
        font   un  transfert  de  donnees  et  rendent  le  controle  au
        processeur principal.

        Les taux de transfert  sont  habituellement  penalises  par  les
        mauvaises  performances des controleurs DMA utilises sur les PC,
        une telle carte 8-bits ne pouvant pas depasser les  140-150Ko/s.

        La  consommation  du processeur est tres raisonnable, legerement
        moins qu'avec les cartes  a  scrutation  par  FIFO.  Ces  cartes
        tolerent  parfaitement  les  peripheriques  defectueux qui ne se
        deconnectent/reconnectent pas (typiquement, des  lecteurs  CDROM
        bon marche).

        Acceptables  pour  les  lecteurs  CDROM  lents,  les lecteurs de
        bandes, etc.

     DDMMAA aa ccoonnttrroollee ddee bbuuss ((BBuussmmaasstteerriinngg DDMMAA))
        Ces cartes sont intelligentes. Les pilotes pour ces  controleurs
        envoient   dans   une   structure   d'E/S   une  commande  SCSI,
        l'identificateur de la destination  et  de  son  unite  logique,
        ainsi  que l'adresse de fin des donnees, puis ils avertissent la
        carte qu'ils ont une commande pour elle. Le pilote rend la  main
        au  systeme et la carte repond plus tard pour signaler qu'elle a
        termine l'E/S.

        Puisque l'intelligence est dans le firmware du controleur et non
        dans   le   pilote,  les  pilotes  pour  ces  cartes  supportent
        classiquement plus de fonctionnalites -  transferts  synchrones,
        files marquees (tagged queuing), etc.

        Avec  les  patches  de  lectures/ecritures groupees, des taux de
        transferts  a  travers  le  systeme   de   fichiers   atteignent
        pratiquement  100% des performances maximales en ecriture et 75%
        en lecture.

        L'utilisation du processeur est reduite a  son  minimum,  quelle
        que  soit la charge des E/S, avec 5% d'utilisation sur des acces
        a un CDROM double vitesse via une Adaptec 1540 et 20% lors  d'un
        transfert soutenu a 1,2Mo/s sur un disque SCSI.

        Recommandees dans tous les cas ou le prix n'est pas la priorite,
        ou la carte mere n'est pas defectueuse (certaines de ces  cartes
        ne  fonctionnent  pas  avec  le  controle  de  bus)  et  ou  des
        applications pour lesquelles le temps  d'obtention  des  donnees
        est  plus  important que le debit (le supplement (overhead) du a
        l'utilisation d'un controleur de bus est de 3-4ms par  commande)
        ne seront pas utilisees.

  1100..22..  DDeeccoouuppaaggee//RReeaasssseemmbbllaaggee ((SSccaatttteerr//ggaatthheerr))

  Le second point le plus important pour les performances est la gestion
  des E/S par decoupage/reassemblage. Le  supplement  d'execution  d'une
  commande   SCSI   est   non   negligeable  (de  l'ordre  de  plusieurs
  millisecondes). Les controleurs de bus intelligents tels que l'Adaptec
  1540  peuvent  prendre 3-4ms pour traiter une commande SCSI avant meme
  que la cible ne la recoive. Sur les peripheriques non  bufferises,  ce
  supplement  est toujours suffisant pour manquer un tour de galette, ce
  qui conduit a des taux de transfert de 60Ko/s (sur un lecteur a  3.600
  tours/minute)   par   bloc   transfere.   Ainsi,  pour  maximiser  les
  performances, il est necessaire de minimiser le  nombre  de  commandes
  SCSI  envoyees  pour  transferer  une  certaine quantite de donnees en
  augmentant le nombre d'octets  transferes  pour  chaque  commande.  La
  conception  du  cache  des  tampons de Linux fait que les blocs disque
  contigus ne  sont  pas  contigus  en  memoire.  Avec  les  patches  de
  lectures/ecritures  groupees,  4Ko  utiles  de  donnees  sont!   !   !
  contigus. La taille totale des blocs transferes en une seule  commande
  SCSI  est  donc  de  1Ko * nombre de regions de decoupage/reassemblage
  sans le patch et de 4Ko * nombre de regions avec. Nous avons determine
  experimentalement  que  64Ko est une valeur raisonnable pour une seule
  commande SCSI - c'est-a-dire 64 buffers de decoupage/reassemblage sans
  le  patch, 16 avec. Suite au changement de 16Ko a 64Ko des transferts,
  nous avons observe une amelioration de 50% du debit maximal, a travers
  le  systeme  de  fichiers,  pour les ecritures et les lectures, a 100%
  pour les premieres et 75% pour les secondes, avec  une  carte  Adaptec
  1540.

  1100..33..  BBAALL ccoonnttrree nnoonn--BBAALL ((MMaaiillbbooxx vvss.. nnoonn--mmaaiillbbooxx))

  Certains controleurs intelligents, comme les cartes Ultrastor, WD7000,
  Adaptec 1540, 1740 et BusLogic ont utilise une interface de type boite
  aux   lettres,   dans  laquelle  les  commandes  SCSI  sont  executees
  simplement en placant une structure SCSI a une adresse memoire  donnee
  (BAL),  en  le  signalant  a la carte (c'est-a-dire en positionnant un
  indicateur d'emission pour la BAL),  puis  en  attendant  une  reponse
  (courrier  entrant).  Grace a cette interface de programmation de haut
  niveau, les utilisateurs peuvent souvent mettre a jour leur carte pour
  beneficier  des avantages des nouvelles fonctionnalites, telles que le
  FAST ou le WIDE SCSI, sans modifications du logiciel. Les pilotes  ont
  tendance  a  etre  plus simples, a offrir plus de fonctionnalites et a
  etre plus stables.

  D'autres controleurs intelligents, comme la famille des NCR53c7/8xx ou
  les composants Adaptec AIC-7770/7870 (comprenant les cartes 274x, 284x
  et 2940) utilisent  une  interface  de  programmation  de  moins  haut
  niveau.  Leurs performances peuvent etre meilleures, puisque la charge
  de travail peut etre repartie entre le processeur de la  carte  et  le
  processeur   (plus  rapide)  principal  de  la  machine.  Ils  offrent
  egalement une plus grande souplesse pour la realisation  de  certaines
  fonctionnalites   (le   mode   cible   (target   mode)  pour  certains
  peripheriques par exemple). De plus,  ces  cartes  peuvent  etre  plus
  economiques  a  la  production  (dans  certains cas, cette economie se
  retrouve au niveau du consommateur - voir les NCR).  En  contrepartie,
  les pilotes sont plus compliques (comprenez : sont plus sujets a avoir
  des erreurs) et ils doivent etre modifies pour prendre en  compte  les
  fonctionnalites presentes sur les composants plus recents.

  1100..44..  LLeess ttyyppeess ddee bbuuss

  Le  type du bus est le prochain choix a considerer (ISA, EISA, VESA et
  PCI). Les personnes chargees du marketing clament souvent  des  debits
  maximums  (bandwidth)  absurdes,  bases  sur  des taux de transfert en
  rafale (burst) qui relevent presque de la fiction et qui ne servent de
  toute  facon  a rien. Par opposition, j'ai choisi de parler de valeurs
  realistes, quotidiennes, basees sur  les  performances  mesurees  avec
  divers peripheriques.

     BBuuss
        Debit maximum / description,

     IISSAA
        Le  debit  maximum  est  legerement  meilleur que 5Mo/s pour des
        cartes a controle de bus.  Avec  un  bus  ISA,  l'arbitrage  des
        controleurs  de  bus est realise par un venerable DMA 8237 ; les
        temps d'acquisition du  bus  sont  relativement  mediocres.  Les
        pilotes  d'interruptions  sont  a trois etats (tri-state) ou sur
        changement  d'etat  (edge  triggered).  Cela  signifie  que  les
        interruptions ne peuvent pas etre partagees. Generalement, l'ISA
        n'est pas bufferise et le bus memoire de  la  machine  hote  est
        occupe   a  chaque  transfert.  Aucun  mecanisme  n'existe  pour
        empecher une saturation du bus.

     VVEESSAA
        Le debit maximum se situe  aux  alentours  de  30Mo/s.  Certains
        systemes VESA exploitent le bus en dehors de ses specifications,
        ce qui les rend incompatibles avec  certaines  cartes.  Tenez-en
        compte  au moment d'acheter votre materiel s'il ne beneficie pas
        d'une garantie. Generalement, le VESA est non bufferise ; le bus
        memoire de la machine hote est occupe a chaque transfert.

     EEIISSAA
        Le   debit  maximum  se  situe  aux  alentours  de  30Mo/s,  les
        operations de controle de bus etant  generalement  plus  rapides
        que  pour le VESA. Certains systemes EISA bufferisent le bus, ce
        qui permet d'observer des  transferts  en  rafale  vers  le  bus
        memoire  de  la  machine  hote,  plus  rapide,  et  de minimiser
        l'impact  sur  les  performances  du  processeur  central.   Les
        gestionnaires  d'interruptions  EISA  peuvent etre a trois etats
        (tri-state), sur changement d'etat (edge  triggered)  ou  actifs
        sur  collecteur  ouvert  (open  collector  level-active)  ; cela
        permet  le   partage   des   interruptions   avec   les   autres
        gestionnaires  qui  le  gerent.  Puisque l'EISA alloue un espace
        d'adressage separe pour  chaque  carte,  il  est  habituellement
        moins sujet aux conflits de ressources que l'ISA ou le VESA.

     PPCCII
        Le  debit  maximum  se situe aux alentours de 60Mo/s. La plupart
        des systemes  PCI  utilisent  des  tampons  d'ecriture  differee
        (write posting buffers) sur la carte, ce qui permet de minimiser
        l'effet des transferts  rapides  de  part  et  d'autre  sur  les
        performances  du bus et du processeur central. Les gestionnaires
        d'interruptions PCI sont actifs sur  collecteur  ouvert  ;  cela
        permet   le   partage   des   interruptions   avec   les  autres
        gestionnaires qui le gerent. Des  mecanismes  sont  prevus  pour
        eviter  la saturation du bus et pour permettre a l'esclave et au
        maitre de suspendre une operation de controle de bus.

        Puisque le PCI offre un mecanisme plug-n-play via des  registres
        de  configuration  reinscriptibles  sur  chaque  carte,  dans un
        espace   d'adressage   separe,   un   systeme   qui   implemente
        correctement la gestion PCI est plug-and play.

        Le  PCI  est  tres severe sur la longueur des pistes, la charge,
        les specifications mecaniques, etc. et devrait  finalement  etre
        plus fiable que le VESA ou l'ISA.

        Pour  resumer,  le  PCI  est  le  meilleur  bus  pour  PC ; il a
        cependant  des  inconvenients.  Le  PCI  en  est  encore  a  ses
        balbutiements  et,  bien que les constructeurs aient corrige les
        problemes, il  circule  toujours  quelques  vieilles  cartes  au
        composant  PCI  ou  au  BIOS  defectueux. Je recommanderais pour
        cette raison que vous vous  assuriez  de  pouvoir  retourner  le
        materiel  en cas de defaut. Si les plus recentes cartes PCI sont
        veritablement plug-and-play, les anciennes cartes  necessitaient
        une  intervention  de  la part de l'utilisateur pour positionner
        correctement   les   cavaliers   et   configurer   le   logiciel
        (l'affectation  des  interruptions  par  exemple).  Bien  que la
        plupart des utilisateurs aient resolu leurs problemes PCI,  cela
        a demande du temps et je deconseillerais l'achat d'une carte PCI
        si la disponibilite du systeme est tres critique.

  Pour de nombreux peripheriques SCSI lents (disques a 2Mo/s  ou  moins,
  lecteurs  de  CDROM,  lecteurs  de  bandes),  il  n'y a pas de grandes
  variations de debit en fonction de l'interface avec le bus du PC. Pour
  les  disques  SCSI  actuels (typiquement, les derniers disques haut de
  gamme de plusieurs giga-octets ont un taux par tete de 4  a  5Mo/s  et
  plusieurs  compagnies experimentent des disques a 14Mo/s par tete), le
  debit sera nettement meilleur avec des controleurs sur  des  bus  plus
  rapides ; certains ont meme releve un facteur d'amelioration de 2,5 en
  passant d'une carte ISA Adaptec 1542 a une carte PCI NCR53c810.

  A l'exception des cas  ou  un  mecanisme  d'ecriture  differee  ou  de
  bufferisation  des  ecritures  est mis en oeuvre, lorsqu'un des bus de
  votre systeme est occupe, tous  les  autres  bus  sont  inutilisables.
  Ainsi,  bien  qu'une  saturation du bus n'affecte pas les performances
  SCSI, elle peut avoir un effet negatif sur la reponse  interactive  du
  systeme. Par exemple, si vous avez un disque SCSI a 4Mo/s en ISA, vous
  perdrez 80% de votre bande passante. Dans un  systeme  ISA/VESA,  vous
  n'obtiendrez  pas  mieux  que 6Mo/s. La plupart du temps, l'impact sur
  les taches en arriere plan est egalement tres sensible.

  Notez  bien  qu'avoir  plus  de  16Mo  de   memoire   n'implique   pas
  l'utilisation  d'une carte SCSI a controle de bus ISA. Contrairement a
  certains autres systemes d'exploitation,  Linux  effectue  une  double
  bufferisation  lors des transferts a acces direct memoire (DMA) sur un
  controleur ISA a destination d'une zone  au-dela  des  16Mo.  De  tels
  transferts ne sont penalises que de 1,5%, ce qui est tres raisonnable.

  Pour terminer, la difference de prix pour des cartes a controle de bus
  pour chacune de ces interfaces de bus est souvent minime.

  Avec  tout  cela  a  l'esprit,  en  fonction  de  vos  priorites,  vos
  preferences iront vers

       Stabilite, installations critiques,
       et pas de garantie                      EISA ISA VESA PCI

       Performances et installations personnelles
                                               PCI EISA VESA ISA

  Comme je l'ai deja mentionne  plus  haut,  le  controle  de  bus  (bus
  mastering)  plus  que  tout  autre  mode  de  transfert aura un impact
  benefique sur les performances de tout le systeme et il doit etre plus
  important dans votre choix que le type de bus au moment de votre achat
  d'une carte SCSI.

  1100..55..  PPeerriipphheerriiqquueess mmuullttiipplleess

  Si vous envisagez d'utiliser plusieurs  peripheriques  sur  votre  bus
  SCSI,  assurez-vous  que  votre  controleur  est  capable de supporter
  plusieurs commandes en attente a un  instant  donne.  C'est  essentiel
  pour  les  lecteurs  de bandes et souhaitable si vous comptez melanger
  des peripheriques de vitesses differentes (un lecteur de CDROM  et  un
  disque  dur,  par  exemple).  Si  le pilote Linux ne gere qu'une seule
  commande a la fois, vous risquez de bloquer vos  entrees/sorties  avec
  vos disques durs pendant que le lecteur de bandes rembobine ou va a la
  fin de la  cassette  (cela  peut  durer  une  demi-heure).  Avec  deux
  disques,  le  probleme  n'est  pas  aussi  sensible, bien que le debit
  atteigne la moyenne des deux transferts, plutot que leur somme.

  1100..66..  LLeess ooppttiioonnss SSCCSSII--II,, SSCCSSII--IIII,, SSCCSSII--IIIIII FFAASSTT eett WWIIDDEE,, eettcc..

  Au  fil  des ans, le SCSI a evolue, les nouvelles versions de la norme
  apportant de meilleures performances, des methodes pour augmenter  les
  debits,  des  commandes normalisees pour les nouveaux peripheriques et
  de nouvelles commandes pour les peripheriques deja supportes.

  En tant que telles, les evolutions de la version ne  signifient  rien.
  Exception  faite  de  quelques  details mineurs (du genre : le SCSI-II
  n'autorise pas l'option "initiateur unique" du SCSI-I),  les  versions
  sont  compatibles  ascendantes,  les  nouvelles  fonctionnalites etant
  integrees en tant qu'options et n'etant pas obligatoires. La  decision
  d'appeler  un  peripherique  SCSI SCSI-I, SCSI-II ou SCSI-III est donc
  entierement un choix de vente.

  1100..77..  CCoommppaarraaiissoonn ddeess ppiillootteess

  Comparaison  des  pilotes  (les  chips  supportes  sont  listes  entre
  parentheses)

                                          Nombre de
                                          commandes       SG              > 1
  Pilote          Mode de transfert       simultanees     limite          cartes

                                          total/LUN

  AM53C974        Controle de bus, DMA    12s/1s          255s            O
  aha152x         Scrutation par FIFO(8k) 7s/1s           255s            N
      (AIC6260,
      AIC6360)
  aha1542         Controle de bus, DMA    8s/1s           16              O
  aha1740         Controle de bus, DMA    32s             16              N
  aha274x         Controle de bus, DMA    4s/1s           255s            O
  BusLogic        Controle de bus, DMA    192/31          128s, 8192h     O
  (ces valeurs sont valables pour les BT-948/958/958D, les cartes plus
                               anciennes supportant moins de commandes)

  eata_dma        Controle de bus, DMA    64s-8192h/2-64  512s, 8192h     O
  fdomain         Scrutation par FIFO(8k) 1s              64s             N
      (TMC1800,   sauf le TMC18c30
      TMC18c30,   avec une FIFO de 2k
      TMC18c50,
      TMC36c70)

  in2000*         Scrutation par FIFO(2k) 1s              255s            N
  g_NCR5380       Scrutation pure         16s/2s          255s            O
      (NCR5380,
      NCR53c80,
      NCR5381,
      NCR53c400)
  gsi8*           DMA esclave             16s/2s          255s
      (NCR5380)
  PAS16           Scrutation pure         16s/2s          255s            O
      (NCR5380)   ou Scrutation inter-verrouillee
                  (quelques echecs sur certains systemes !)
  seagate         Scrutation inter-verrouillee
                                          1s/1s           255s            N
  wd7000          Controle de bus, DMA    16s/1s          16              O
  t128            Scrutation inter-verrouillee
                                          16s             255s            O
      (NCR5380)
  qlogic          Scrutation inter-verrouillee
                                          1s/1s           255s            N
  ultrastor       Controle de bus, DMA    16s/2s          32              O
  53c7,8xx        Controle de bus, DMA
      (NCR53c810,
       NCR53c815,
       NCR53c820,
       NCR53c825)
      rel5                                1s/1s           127s            N
      rel10                               8s/1s           127s            O

  Remarques :

  1. Les  pilotes marques d'un asterisque (*) ne sont pas inclus dans la
     distribution du noyau et des images de demarrage  binaires  peuvent
     ne pas etre disponibles.

  2. Les   nombres   suffixes   par  un  's'  representent  des  limites
     arbitraires dans le logiciel, qui  peuvent  etre  changees  par  un
     #define au moment de la compilation.

  3. Les  limitations  materielles  sont indiquees par le suffixe 'h' et
     peuvent differer des limites logicielles actuellement imposees  par
     les pilotes de Linux.

  4. Des  nombres  sans  suffixe  peuvent  indiquer soit des limitations
     materielles, soit des limitations logicielles.

  5. La version 5 du  pilote  NCR53c810  est  incluse  dans  les  noyaux
     standard  1.2.x  et 1.3.x ; la version 10 peut etre telechargee par
     FTP anonyme.

  6. A l'exception de la AM53C974, les cartes a controle de bus DMA sont
     intelligentes  ;  les  NCR executent du microcode depuis la memoire
     principale, les AIC7770  executent  leur  microcode  depuis  de  la
     memoire embarquee sur le composant, toutes les autres utilisent une
     interface du style BAL (mailbox).

  1100..88..  CCoommppaarraaiissoonn ddeess ccoonnttrroolleeuurrss

  Carte                   Pilote          Bus     Prix    Remarques

  Adaptec AIC-6260        aha152x         ISA             composant,
                                                          pas une carte
  Adaptec AIC-6360        aha152x         VLB             composant,
                                                          pas une carte
      (utilise dans la plupart des cartes multi-E/S
       VESA/ISA avec des cartes principales Zenon)
  Adaptec 1520            aha152x         ISA
  Adaptec 1522            aha152x         ISA     $80     1520 avec CdD
                                                          (Controleur de Disquet-
                                                           tes)
  Adaptec 1510            aha152x         ISA             1520 sans ROM de boot,
                                                          auto-detection echouent.
  Adaptec 1540C           aha1542         ISA
  Adaptec 1542C           aha1542         ISA             1540C avec CdD
  Adaptec 1540CF          aha1542         ISA             FAST SCSI-II
  Adaptec 1542CF          aha1542         ISA     $200    1540CF avec CdD
  Adaptec 1640            aha1542         MCA

  Adaptec 1740            aha1740         EISA            n'est plus fabriquee
  Adaptec 1742            aha1740         EISA            n'est plus fabriquee
                                                          1740
                                                          avec CdD
  Adaptec 2740            aha274x         EISA
  Adaptec 2742            aha274x         EISA            avec CdD
  Adaptec 2840            aha274x         VLB
  Adaptec 2842            aha274x         VLB             avec CdD
  Adaptec 2940            aha274x         PCI
  Always IN2000           in2000          ISA
  BusLogic BT-948         BusLogic        PCI     $180    Ultra SCSI
  BusLogic BT-958         BusLogic        PCI     $230    Wide Ultra SCSI

  (reportez-vous au chapitre  ``Cartes  controleurs  multi-maitres  Bus-
  Logic'' pour des details sur d'autres cartes BusLogic)

  DPT     PM2011          eata_dma        ISA             FAST SCSI-II
          PM2012A         eata_dma        EISA            FAST SCSI-II
          PM2012B         eata_dma        EISA            FAST SCSI-II
          PM2021          eata_dma        ISA             FAST SCSI-II
          PM2022          eata_dma        EISA            FAST SCSI-II
          PM2024          eata_dma        PCI             FAST SCSI-II
          PM2122          eata_dma        EISA            FAST SCSI-II
          PM2322          eata_dma        EISA            FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2124          eata_dma        PCI             FAST SCSI-II
          PM2041W         eata_dma        ISA             Wide
                                                          Terminaison unique
                                                                  (Single-ended)
                                                          SCSI-II
          PM2041UW        eata_dma        ISA             Ultra Wide
                                                          Terminaison unique
          PM2042W         eata_dma        EISA            Wide
                                                          Terminaison unique
          PM2042UW        eata_dma        EISA            Ultra Wide
                                                          Terminaison unique
          PM2044W         eata_dma        PCI             Wide
                                                          Terminaison unique
          PM2044UW        eata_dma        PCI             Ultra Wide
                                                          Terminaison unique
          PM2142W         eata_dma        EISA            Wide
                                                          Terminaison unique
          PM2142UW        eata_dma        EISA            Ultra Wide
                                                          Terminaison unique
          PM2144W         eata_dma        PCI             Wide
                                                          Terminaison unique
          PM2144UW        eata_dma        PCI             Ultra Wide
                                                          Terminaison unique
          PM3021          eata_dma        ISA             multi-canaux
                                                          raid/emplacements simm
          PM3122          eata_dma        EISA            multi-canaux/raid
          PM3222          eata_dma        EISA            multi-canaux
                                                          raid/emplacements simm
          PM3224          eata_dma        PCI             multi-canaux
                                                          raid/emplacements simm
          PM3334          eata_dma        PCI             Wide Ultra SCSI
                                                          multi-canaux
                                                          raid/emplacements simm

  DTC 3290                aha1542         EISA            bien qu'ils devraient
                                                          marcher, les materiels
                                                          DTC ne sont pas geres,
                                                          a cause de la politique
                                                          de diffusion des docu-
                                                          mentations
  DTC 3130                53c7,8xx        PCI             '810
  DTC 3130B               53c7,8xx        PCI             '815
  DTC 3292                aha1542         EISA            3290 avec CdD
  DTC 3292                aha1542         EISA            3290 avec CdD
  Future Domain 1680      fdomain         ISA             CdD
  Future Domain 3260      fdomain         PCI
  NCR53c810 (cartes       53c7,8xx        PCI     $60     composant, pas une
      vendues                                     (carte) carte. Les cartes ne
      par FIC, Chaintech,                                 possedent pas de BIOS,
      Nextor, Gigabyte, etc.                              bien que la plupart des
      Cartes avec composant vendues                       cartes non equipees de
      par AMI, ASUS, J-Bond,                              NCR aient le BIOS SDMS
      etc. Frequentes dans les
      systemes PCI DEC)
  NCR53c815 (            53c7,8xx         PCI     $100    NCR53c810 + BIOS
      Intel PCISCSIKIT,
      NCR8150S, etc.)
  NCR53c825              53c7,8xx         PCI     $120    Variante "WIDE" du
                                                          NCR53c815.  Notez que
                                                          le pilote actuel de
                                                          Linux ne negocie pas de
                                                          transferts "WIDE".
  Pro Audio Spectrum 16   pas16           ISA             Carte son avec SCSI
  Seagate ST01            seagate         ISA     $20     Le BIOS ne marche qu'a-
                                                          vec certains lecteurs
  Seagate ST02            seagate         ISA     $40     ST01 avec CdD
  Sound Blaster 16 SCSI   aha152x         ISA             Carte son avec SCSI
  Western Digital 7000    wd7000          ISA             avec CdD
  Trantor T128            t128            ISA
  Trantor T128F           t128            ISA             T128 avec CdD et sup-
                                                          port pour des IRQs ele-
                                                          vees
  Trantor T130B           g_NCR5380       ISA
  Ultrastor 14F           ultrastor       ISA             avec CdD
  Ultrastor 24F           ultrastor       EISA            avec CdD
  Ultrastor 34F           ultrastor       VLB

  Remarques :

  1. Trantor  a  ete recemment rachetee par Adaptec et certains de leurs
     produits sont maintenant vendus sous le nom d'Adaptec.

  2. Suite a un depot de bilan, il n'existe plus aucun support technique
     a cette heure pour les cartes Ultrastor.

  3. Le prix des cartes a controle de bus NCR53c810 n'est pas une erreur
     de frappe ; il inclut le paquetage standard  des  pilotes  ASPI/CAM
     pour  DOS,  OS/2  et  Windows  (acces  32 bits) et d'autres pilotes
     peuvent etre telecharges gratuitement.

     Certains n'ont pas eu a se plaindre de la compagnie

       SW (swt@netcom.com) (214) 907-0871 fax (214) 907-9339

  Au 23 decembre 1995, leur prix etait de $53 pour les cartes '810.

  4. Les  derniers  composants  SCSI   d'Adaptec   font   montre   d'une
     sensibilite   inhabituelle   aux   problemes   de   cablage  et  de
     terminaison. C'est pourquoi je ne  recommanderais  pas  les  cartes
     Adaptec 154x C et CF, pas plus que la serie 2xxx.

     A  remarquer  que  ces problemes de fiabilite ne sont pas constates
     sur les vieilles cartes 154x B et 174x A ou encore, d'apres ce  que
     j'en  sais,  sur les cartes a base des composants AIC-6360/AIC-6260
     (1505, 1510, 1520, etc.).

     La qualite de leur support technique a egalement baisse, les delais
     se  sont  frequemment  allonges  et  les employes sont incompetents
     (arguant par exemple de certaines clauses  de  confidentialite  sur
     des  documents,  alors  qu'il  n'y  en avait pas), parfois hostiles
     (refusant de passer les questions a d'autres techniciens lorsqu'ils
     sont incapables d'y repondre eux-memes).

  5. Si  des  utilisateurs desirent une collaboration ou veulent etablir
     des relations 'politiques' avec Adaptec, les remarques  precedentes
     doivent  etres  prises  en  consideration.  Cela etant, les Adaptec
     152x/1510/1505 sont meilleures que les autres cartes  ISA  dans  la
     meme  gamme  de prix et il y a des affaires a faire avec des cartes
     usagees ou des surplus de 154x B et 1742, ce qui, a mon avis,  doit
     faire oublier le probleme du support.

  6. Toutes  les  cartes  DPT peuvent etre mises a jour avec des modules
     memoire  (cache)  et  raid.  Toutes  les  cartes   sont   egalement
     disponibles en versions "Wide" et/ou differentielles.

  7. Les  cartes  NCR  ne sont pas toutes equivalentes. Ainsi, alors que
     l'ASUS SC200 utilise une terminaison active, la plupart des  autres
     cartes  NCR53c810 utilisent une terminaison passive. Presque toutes
     les cartes '825 ont une terminaison active, mais certaines ont  une
     ROM  pour le BIOS tandis que d'autres ont une ROM Flash. La plupart
     des  cartes  '825  ont  un  large  connecteur  externe,  un   large
     connecteur interne et un connecteur interne fin, bien que quelques-
     unes n'aient pas ce dernier (les cartes bon marche de CSC).

  1100..99..  PPoouurr rreessuummeerr

  La majorite des utilisateurs de cartes ISA, EISA, VESA et  PCI  seront
  probablement  mieux  servis  par les cartes multi-maitres BusLogic, de
  par leur performance,  leurs  fonctionnalites  (comme  la  terminaison
  active) et leur compatibilite avec les Adaptec 1540. Un certain nombre
  de modeles est disponible avec des interfaces EISA, ISA, PCI et  VESA,
  en  terminaison  simple  ou  differentielle, en 8 ou 16 bits. Les tous
  recents  modeles  Ultra  SCSI  PCI,  les   BT-948/958/958D,   incluent
  egalement une ROM Flash pour faciliter les mises a jour du firmware et
  une terminaison automatique "adaptative" (smart termination).

  Les personnes desirant tirer les meilleures performances d'E/S peuvent
  envisager  l'acquisition  de cartes de chez DPT, qui sont les seules a
  gerer le RAID, le cache et plusieurs canaux SCSI.

  Les personnes avec des systemes PCI  pourront  regarder  du  cote  des
  cartes  basees  sur  le  composant  NCR53c8xx.  Ce  sont  des cartes a
  controle de bus ; on peut trouver des '810 a $53 l'unite (c'est-a-dire
  moins cheres que les Adaptec 1520). Le magazine C't a evalue certaines
  de ces cartes. Il ressort des tests qu'elles sont plus rapides que les
  Adaptec  2940  et  les  BusLogic  BT-946C  (sous DOS) et qu'elles s'en
  tirent honorablement sous Linux (jusqu'a 6Mo/s a travers le systeme de
  fichiers).  Les inconvenients de ces cartes comparees aux BusLogic est
  qu'elles ne sont pas  compatibles  avec  les  Adaptec  1540,  qu'elles
  peuvent etre livrees avec ou sans terminaison active et que vous allez
  devoir recuperer les dernieres versions des pilotes (standard dans les
  noyaux  1.3.5x  et  disponibles  par  FTP  pour les noyaux 1.2.x) pour
  exploiter pleinement le materiel, et  qu'enfin  vous  aurez  peut-etre
  plus  de  problemes qu'avec des interfaces de type BAL (mailbox) comme
  sur les BusLogic ou les DPT.

  S'il est important que tout marche du premier coup, une  carte  multi-
  maitres  BusLogic  ou  DPT  est  probablement  le  meilleur  choix, la
  simplicite des interfaces de type BAL comparee  a  la  complexite  des
  interfaces des NCR53c8xx et des Adaptec AIC7xxx faisant la difference.

  Ceux qui veulent des cartes  non  PCI  pour  un  petit  budget  seront
  certainement  heureux  de  trouver  leur  bonheur  dans les surplus de
  cartes Adaptec 154x B ou 174x A, voire avec des clones d'Adaptec  1520
  (aux  alentours  de  $80)  pour  des cartes neuves. Ces cartes ont des
  debits et une reponse interactive acceptables pour un prix modique.

  1111..  AAffffeeccttaattiioonn ddeess nnuummeerrooss ddee mmiinneeuurr

  Suite a l'utilisation par Linux du type dev_t  sur  16  bits,  8  bits
  etant  reserves  pour  le  mineur,  les  disques SCSI, les lecteurs de
  bandes ou de CDROM et les fichiers speciaux generiques ont des mineurs
  attribues dynamiquement, suivant l'algorithme suivant :

       Pour tous les controleurs SCSI, de scsi0 jusqu'a scsiN
               Pour tous les identificateurs SCSI sur le bus, de 0 a 7, sauf pour
               l'identificateur du controleur courant
                       Pour toutes les unites logiques, de 0 a max_scsi_luns
                       - test de la combinaison <bus, cible, unite logique> en
                         envoyant une commande TEST UNIT READY. Si une unite logique
                         est supposee absente, ne plus continuer les tests pour le
                         couple <bus, cible>.
                       - emission d'une commande INQUIRY pour determiner ce qui
                         a ete trouve (type du peripherique, vendeur, modele,
                         version du firmware, etc.).
                       - renvoi du resultat de cette reconnaissance a une fonction
                         speciale d'identification propre a chaque pilote de haut
                         niveau present (par exemple le pilote de disques, de
                         lecteur de bandes, etc.). Attachement de ce peripherique
                         a la prochaine unite disponible pour chaque pilote qui
                         desire gerer ce peripherique. Le gestionnaire generique
                         va tous les attacher.
                       - s'il s'agissait d'un peripherique SCSI-I ou qui fait
                         partie d'une liste de peripheriques connus comme ne
                         gerant pas plusieurs unites logiques, stopper les tests
                         pour le couple <bus, cible>.
                       - s'il s'agissait d'un peripherique connu comme pouvant
                         gerer plusieurs unites logiques, une scrutation de toutes
                         les unites logiques potentielles est commencee, surchargeant
                         la valeur max_scsi_luns.

  Il  y  a  souvent des problemes avec ce genre d'approche, car si votre
  systeme  possede  des  peripheriques  qui  ne  sont  pas  branches  en
  permanence,  les  mineurs  vont dependre des peripheriques presents au
  moment du boot. Cela peut etre genant, car les scripts de demarrage ou
  le  fichier  /etc/fstab  peuvent contenir des instructions pour monter
  des partitions specifiques. Ces commandes peuvent echouer si le disque
  a un mineur different d'une fois sur l'autre.

  Ce  probleme  n'a pas ete completement resolu. Un programme qu'on peut
  trouver sur tsx-11 cree une arborescence /dev/scsi basee sur le numero
  d'hote,  l'identificateur  et  le numero d'unite logique. Ce n'est pas
  particulierement propre, mais cela permet d'eviter pas mal d'ennuis.

  Une meilleure solution passera sans doute  par  le  pseudo  repertoire
  /proc/scsi.  Nous  y travaillons actuellement, aussi pour l'instant ne
  pouvons-nous pas dire quelle sera sa forme definitive.  A  l'heure  ou
  j'ecris  ces  lignes,  cette approche semble prometteuse pour resoudre
  certains de ces points.

  Le HOWTO Linux de la programmation SCSI
  Heiko  Eissfeldt heiko@colossus.escape.de (version francaise
  : Thierry Danis thierry.danis@hol.fr, le  26  Janvier  1998,
  largement  basee  sur la traduction de la version v1.4 faite
  par Bernard Choppy choppy@imaginet.fr).
  v1.5, 7 Juin 1996

  Ce document traite de la programmation de l'interface  SCSI  generique
  de Linux.

  11..  LLeess nnoouuvveeaauutteess

  Les  interfaces  des  nouveaux  noyaux  ont un peu change. Le chapitre
  'rescrutation des peripheriques' est concerne par ces changements.  Il
  est  maintenant possible d'ajouter et d'enlever des peripheriques SCSI
  a chaud et a la volee.

  A  partir  de  la  version  1.3.98,  certains   fichiers   d'inclusion
  importants ont ete deplaces ou decoupes (sg.h and scsi.h).

  Quelques bugs idiots ont ete remplaces par d'autres.

  22..  IInnttrroodduuccttiioonn

  Ce  document  est  un  guide  d'installation  et  de  programmation de
  l'interface generique SCSI de Linux.

  Il traite des prerequis du noyau, de l'organisation des peripheriques,
  et  de  l'interaction  de  base  avec  ces derniers. Quelques exemples
  simples de programmation en C sont inclus. Pour de plus amples details
  sur  la  norme  SCSI  et  les  informations associees, reportez-vous a
  l'annexe de ce document.

  Note : la version texte simple  de  ce  document  ne  dispose  pas  de
  references croisees (indiquees par ``'').

  33..  QQuu''eesstt--ccee qquuee ll''iinntteerrffaaccee SSCCSSII ggeenneerriiqquuee ??

  L'interface generique SCSI a ete faite pour fournir un acces general a
  des  peripheriques  SCSI  (eventuellement  exotiques).  Elle   a   ete
  developpee  par Lawrence Foard ( entropy@world.std.com) et sponsorisee
  par   Killy   Corporation   (voir   les   commentaires   du    fichier
  drivers/scsi/sg.h).

  Cette interface permet a des programmes applicatifs (c'est-a-dire hors
  du noyau) d'acceder aux fonctionnalites de certains peripheriques.  Le
  developpement  de  pilotes dans le noyau, plus risques et difficiles a
  mettre au point, n'est ainsi plus necessaire.

  Neanmoins, si le peripherique n'est pas correctement programme, il est
  possible  de  bloquer  le  bus  SCSI,  le  pilote,  ou le noyau. C'est
  pourquoi  il  est  important  de  programmer  correctement  le  pilote
  generique,  et  de  commencer  par  sauvegarder tous les fichiers afin
  d'eviter une perte de donnees. Une autre precaution utile est de faire
  un  sync  avant  de  lancer vos programmes pour garantir l'ecriture de
  tous les tampons sur le disque ; cela limitera la perte de donnees  en
  cas de blocage du systeme.

  Un  autre  avantage  du  pilote generique est que, aussi longtemps que
  l'interface elle-meme ne change pas, toutes les  applications  restent
  independantes  des  nouveaux  developpements du noyau. En comparaison,
  les pilotes de bas niveau  du  noyau  doivent  suivre  les  evolutions
  internes de celui-ci.

  Typiquement, le pilote generique est utilise pour communiquer avec les
  nouveaux  equipements  SCSI  qui  exigent  l'ecriture   d'applications
  utilisateur  specifiques  pour  tirer avantage de leurs fonctionalites
  (par exemple les scanners, les imprimantes, le juke-boxes  de  CDROM).
  L'interface   generique   permet   un   developpement  rapide  de  ces
  applications.

  44..  QQuuee ffaauutt--iill ppoouurr ll''uuttiilliisseerr ??

  44..11..  CCoonnffiigguurraattiioonn dduu nnooyyaauu

  Il vous faut evidemment un adapteur SCSI reconnu. De plus, votre noyau
  doit  etre  compile  avec  le  support du pilote generique, en plus de
  celui pour votre adapteur.  La configuration du noyau Linux (par  make
  config sous /usr/src/linux) doit ressembler a :

        ...
       *
       * SCSI support
       *
       SCSI support? (CONFIG_SCSI) [n] y
       *
       * SCSI support type (disk, tape, CDrom)
       *
        ...
       Scsi generic support (CONFIG_CHR_DEV_SG) [n] y
       *
       * SCSI low-level drivers
       *
        ...

  Si  le  noyau  est modulable, vous pouvez tout aussi bien utiliser les
  modules.

  44..22..  FFiicchhiieerrss ssppeecciiaauuxx

  Le pilote generique utilise ses propres fichiers speciaux. Ils peuvent
  etre  crees par le script MAKEDEV, que l'on trouve habituellement dans
  le repertoire /dev. La commande MAKEDEV sg cree les fichiers  suivants
  :

       crw-------   1 root     system    21,   0 Aug 20 20:09 /dev/sga
       crw-------   1 root     system    21,   1 Aug 20 20:09 /dev/sgb
       crw-------   1 root     system    21,   2 Aug 20 20:09 /dev/sgc
       crw-------   1 root     system    21,   3 Aug 20 20:09 /dev/sgd
       crw-------   1 root     system    21,   4 Aug 20 20:09 /dev/sge
       crw-------   1 root     system    21,   5 Aug 20 20:09 /dev/sgf
       crw-------   1 root     system    21,   6 Aug 20 20:09 /dev/sgg
       crw-------   1 root     system    21,   7 Aug 20 20:09 /dev/sgh
                                          |    |
                              numeros majeur, mineur

  Notez  que  ces  fichiers  sont  des  fichiers  en mode caractere pour
  permettre les acces  directs.  Sur  certains  systemes,  ces  fichiers
  peuvent   s'appeler   /dev/{sg0,sg1,...},   en   fonction   de   votre
  installation. Vous devrez donc adapter les  exemples  qui  suivant  en
  consequence.

  44..33..  OOrrggaanniissaattiioonn ddeess ppeerriipphheerriiqquueess

  Les  fichiers  speciaux  sont affectes dynamiquement aux ID/LUN (LUN :
  Unite logique) du bus SCSI.  Les  peripheriques  sont  consecutivement
  alloues  selon les unites logiques de chaque peripherique detecte lors
  de la scrutation du bus, les plus petits LUN/ID/BUS etant  alloues  en
  premier.  Le noyau commence par le premier controleur SCSI et continue
  sans interruption avec tous les  autres  adapteurs.  Cette  etape  est
  actuellement realisee lors de l'initialisation du pilote SCSI.

  Par exemple, si vous avez trois peripheriques SCSI configures avec les
  ID 1, 3 et 5 sur le premier bus SCSI  (chacun  avec  une  seule  unite
  logique), l'affectation sera la suivante :

       /dev/sga -> SCSI id 1
       /dev/sgb -> SCSI id 3
       /dev/sgc -> SCSI id 5

  Si vous ajoutez maintenant un nouveau peripherique d'identificateur 4,
  l'organisation apres la prochaine scrutation du bus sera :

       /dev/sga -> SCSI id 1
       /dev/sgb -> SCSI id 3
       /dev/sgc -> SCSI id 4
       /dev/sgd -> SCSI id 5

  Notez  le  changement  pour  l'identificateur  5  -  le   peripherique
  correspondant n'est plus affecte a /dev/sgc, mais a /dev/sgd.

  Les noyaux plus recents permettent de changer cet ordre.

  44..33..11..  IInnsseerrttiioonn eett rreettrraaiitt ddyynnaammiiqquueess ddee ppeerriipphheerriiqquueess SSCCSSII

  Dans les noyaux recents avec un systeme de fichier /proc monte, il est
  possible de retirer et d'ajouter un peripherique libre (non-busy) a la
  volee.

  Pour enlever un peripherique SCSI :

       echo "scsi remove-single-device a b c d" > /proc/scsi/scsi

  De la meme maniere, ajouter un peripherique SCSI se fera par :

       echo "scsi add-single-device a b c d" > /proc/scsi/scsi

  Ici, a, b, c et d sont definis de la facon suivante :

             a == identificateur de l'adapteur (le premier a l'id 0)
             b == canal SCSI sur l'adapteur (le premier a le numero 0)
             c == ID
             d == LUN (la premiere ayant le numero 0)

  Ainsi,  si  nous  desirons  intervertir  l'affectation  des   fichiers
  /dev/sgc et /dev/sgd de l'exemple precedent, nous pouvons faire :

       echo "scsi remove-single-device 0 0 4 0" > /proc/scsi/scsi
       echo "scsi remove-single-device 0 0 5 0" > /proc/scsi/scsi
       echo "scsi add-single-device 0 0 5 0" > /proc/scsi/scsi
       echo "scsi add-single-device 0 0 4 0" > /proc/scsi/scsi

  puisque  les  peripheriques  generiques  sont  alloues dans leur ordre
  d'insertion.

  Si vous voulez ajouter de nouveaux  peripheriques  sur  le  bus  SCSI,
  gardez  a l'esprit qu'un nombre limite d'entrees supplementaires a ete
  attribue. La memoire a ete allouee au demarrage, et il n'y a de  place
  que pour 2 entrees supplementaires.

  55..  LLee gguuiiddee dduu pprrooggrraammmmeeuurr

  Les   sections  qui  suivent  s'adressent  aux  programmeurs  desireux
  d'utiliser l'interface generique SCSI dans leurs propres applications.
  Nous  allons  donner un exemple permettant d'acceder a un peripherique
  SCSI par le biais des commandes INQUIRY et TESTUNITREADY.

  Lors de l'utilisation de ces exemples, prenez garde a ce qui suit :

  +o  l'emplacement des fichiers d'inclusion sg.h et scsi.h  a  change  a
     partir  du  noyau  1.3.98.  Ces  fichiers  se trouvent maintenant a
     /usr/src/linux/include/scsi,  qui  devrait  etre   un   lien   vers
     /usr/include/scsi. Dans les versions precedentes, ils se trouvaient
     dans /usr/src/linux/drivers/scsi. Nous supposerons  dans  la  suite
     que vous utilisez un de ces noyaux recents.

  +o  l'interface  generique SCSI a ete etendue dans la version 1.1.68 du
     noyau.  Les  exemples  necessitent  au  moins  cette  version.   En
     revanche,  evitez  d'utiliser  les  noyaux  de  1.1.77 a 1.1.89 qui
     disposent d'une interface generique SCSI defectueuse.

  +o  la constante DEVICE de la section qui decrit le peripherique accede
     doit  etre positionnee en fonction de vos peripheriques disponibles
     (reportez-vous au chapitre ``La structure d'en-tete'').

  66..  VVuuee dd''eennsseemmbbllee ddee llaa pprrooggrraammmmaattiioonn ddeess ppeerriipphheerriiqquueess

  Le fichier d'inclusion include/scsi/sg.h contient une  description  de
  l'interface (celle du noyau 1.3.98) :

       struct sg_header
        {
                               /*
                                * longueur du paquet entrant (y compris en-tete)
                                */
         int pack_len;
                               /*
                                * taille max de la reponse attendue
                                */
         int reply_len;
                               /*
                                * numero d'id du paquet
                                */
         int pack_id;
                               /*
                                * 0 == ok,
                                * pour les autres, voir les codes pour errno
                                */
         int result;
                               /*
                                * Force la longueur a 12 pour les commandes des
                                * groupes 6 & 7
                                */
         unsigned int twelve_byte:1;
                               /*
                                * pour utilisation future
                                */
         unsigned int other_flags:31;
                               /*
                                * uniquement utilise lors des lectures
                                */
         unsigned char sense_buffer[16];
                               /*
                                * la commande suit puis les donnees de la
                                * commande
                                * .............
                                */

  Cette  structure decrit comment une commande SCSI doit etre traitee et
  disposer de place pour le resultat de son  execution.  Les  composants
  individuels de la structure seront abordes plus loin a la section ``La
  structure d'en-tete''.

  La methode generale pour echanger des donnees avec le pilote generique
  est  la  suivante  :  pour  envoyer  une  commande  a  un peripherique
  generique ouvert, il faut ecrire (write()) un bloc compose  des  trois
  parties suivantes :

                                    struct sg_header
                                      commande SCSI
                            donnees envoyees avec la commande

  Pour obtenir le resultat d'une commande, il faut lire (read()) un bloc
  composes des parties suivantes (similaires a l'ecriture) :

                                    struct sg_header
                                    donnees en entree

  Il s'agit d'une vue generale de la procedure. Les sections qui suivent
  decrivent chaque etape en detail.

  NOTE  :  jusqu'a de recentes versions du noyau, il etait necessaire de
  bloquer le signal  SIGINT  entre  les  appels  write()  et  le  read()
  correspondant  (par  exemple,  par  sigprocmask()). Un retour apres la
  partie ecriture sans lecture pour recuperer les resultats  va  bloquer
  les  acces  suivants.  Le  blocage du signal n'a pas encore ete inclus
  dans le code des exemples. Evitez donc d'envoyer un  SIGINT  (par  ^C,
  par exemple) lors du test de ceux-ci.

  77..  OOuuvveerrttuurree dduu ppeerriipphheerriiqquuee

  Un peripherique generique doit etre ouvert avant tout acces en lecture
  ou en ecriture :

               int fd = open(nom_du_peripherique, O_RDWR);

  (ce qui precede s'applique aussi pour les materiels en  lecture  seule
  comme les lecteurs de CDROM).

  Il  faut executer un write pour envoyer la commande et un read pour en
  lire le resultat. En cas d'erreur, le code de retour est  negatif  (se
  reporter  a la section ``Traitement d'erreurs'' pour la liste complete
  des codes de retour).

  88..  LLaa ssttrruuccttuurree dd''eenn--tteettee

  La structure d'en-tete struct sg_header est utilisee comme  couche  de
  controle   entre  l'application  et  le  pilote  du  noyau.   Abordons
  maintenant le detail de ses composants.

     iinntt ppaacckk__lleenn
        definit la taille du bloc envoye au  pilote.  Cette  valeur  est
        definie dans le noyau pour une utilisation interne.

     iinntt rreeppllyy__lleenn
        definit  la  taille du bloc accepte en reponse. Cette valeur est
        definie du cote application.

     iinntt ppaacckk__iidd
        Ce champ  facilite  l'appariement  des  reponses  aux  requetes.
        L'application  peut  fournir  un  identifiant  unique  a  chaque
        requete. Supposons que vous ayez  ecrit  un  certain  nombre  de
        commandes  (disons  4)  pour  un peripherique. Celles-ci peuvent
        fonctionner en parallele, l'une  d'entre  elles  etant  la  plus
        rapide.  Lors  de  la  lecture  des  reponses par quatre "read",
        celles-ci ne sont pas forcement dans l'ordre des requetes.  Pour
        identifier  la  reponse  correcte  pour  une  requete,  on  peut
        utiliser le champ  pack_id.  Habituellement,  cette  valeur  est
        incrementee  apres chaque requete (et boucle eventuellement). Le
        nombre maximum de requetes emises simultanement est  limite  par
        le noyau a SG_MAX_QUEUE (en general, quatre).

     iinntt rreessuulltt
        C'est  la  valeur du resultat d'un appel a read ou a write. Elle
        est (parfois) definie par la le pilote generique (partie noyau).
        Il est plus prudent de le positionner a 9 avant l'appel a write.
        Ces codes sont declares dans le fichier errno.h  (0  indique  un
        resultat correct).

     uunnssiiggnneedd iinntt ttwweellvvee__bbyyttee::11
        Ce champ n'est necessaire que lors de l'utilisation de commandes
        specifiques non standard (dans la plage 0xc0 a 0xff). Lorsque la
        longueur  de  ces  commandes  est de 12 octets au lieu de 10, il
        faut positionner ce champ a 1 avant l'appel  a  write.  D'autres
        longueurs  de  commandes ne peuvent etre utilisees. Ce champ est
        positionne par l'application.

     uunnssiiggnneedd cchhaarr sseennssee__bbuuffffeerr[[1166]]
        Ce tampon est positionne apres l'execution d'une commande (apres
        un appel a read()) et contient le code de "sensation" SCSI (SCSI
        send code. NdT. :  dans  le  reste  du  document,  on  utilisera
        simplement  la  formule  "tampon  SCSI").  Certains resultats de
        commandes doivent etre lus a cet emplacement (par  exemple  pour
        TESTUNITREADY).  Il  ne  contient  habituellement que des octets
        nuls. La valeur de  ce  champ  est  positionnee  par  le  pilote
        generique (partie noyau).

  L'exemple  de fonction qui suit s'interface directement avec le pilote
  generique du noyau. Il  definit  la  structure  d'en-tete,  envoie  la
  commande  par  write,  lit  le resultat par read et effectue un nombre
  (limite) de controles d'erreurs.  Les  donnees  du  tampon  SCSI  sont
  disponibles  dans  le  tampon de sortie (sauf si un pointeur nul a ete
  fourni, auquel cas elles se trouvent dans le  tampon  d'entree).  Nous
  l'utiliserons dans les exemples qui suivent.

  Note  : positionnez la valeur de DEVICE a celle qui correspond a votre
  materiel.

  #define DEVICE "/dev/sgc"

  /* Programme d'exemple utilisant l'interface SCSI generique */
  #include <stdio.h>
  #include <unistd.h>
  #include <string.h>
  #include <fcntl.h>
  #include <errno.h>
  #include <scsi/sg.h>

  #define SCSI_OFF sizeof(struct sg_header)
  static  unsigned char cmd[SCSI_OFF + 18];       /* tampon de commande SCSI */
  int     fd;                                     /*
                                                   * descripteur de peripherique/
                                                   * fichier SCSI
                                                   */
  /* traite une commande SCSI complete. Utilise l'interface generique */
  static int handle_SCSI_cmd(unsigned cmd_len,     /* longueur de commande  */
                             unsigned in_size,     /* taille data en entree */
                             unsigned char *i_buff,/* tampon d'entree       *//
                             unsigned out_size,    /* taille data en sortie */
                             unsigned char *o_buff /* tampon de sortie      */
                             )
  {
      int status = 0;
      struct sg_header *sg_hd;

      /* verifications de securite */
      if (!cmd_len) return -1;            /* necessite que cmd_len != 0 */
      if (!i_buff) return -1;             /* necessite que i_buff != NULL */

  #ifdef SG_BIG_BUFF
      if (SCSI_OFF + cmd_len + in_size > SG_BIG_BUFF) return -1;
      if (SCSI_OFF + out_size > SG_BIG_BUFF) return -1;
  #else
      if (SCSI_OFF + cmd_len + in_size > 4096) return -1;
      if (SCSI_OFF + out_size > 4096) return -1;
  #endif

      if (!o_buff) out_size = 0;          /* pas de tampon de sortie, pas de */
                                          /* taille                          */

      /* construction de l'en-tete generique de peripherique */
      sg_hd = (struct sg_header *) i_buff;
      sg_hd->reply_len   = SCSI_OFF + out_size;
      sg_hd->twelve_byte = cmd_len == 12;
      sg_hd->result = 0;
  #if     0
      sg_hd->pack_len    = SCSI_OFF + cmd_len + in_size; /* non indispensable */
      sg_hd->pack_id;     /* inutilise */
      sg_hd->other_flags; /* inutilise */
  #endif

      /* envoi de la commande */
      status = write( fd, i_buff, SCSI_OFF + cmd_len + in_size );
      if ( status < 0 || status != SCSI_OFF + cmd_len + in_size ||
                         sg_hd->result ) {
          /* condition d'erreur */
          fprintf( stderr, "write(generic) resultat = 0x%x cmd = 0x%x\n",
                      sg_hd->result, i_buff[SCSI_OFF] );
          perror("");
          return status;
      }

      if (!o_buff) o_buff = i_buff; /* controle du pointeur du tampon */
      /* recuperation du resultat */
      status = read( fd, o_buff, SCSI_OFF + out_size);
      if ( status < 0 || status != SCSI_OFF + out_size || sg_hd->result ) {
          /* condition d'erreur */
          fprintf( stderr, "read(generic) statut = 0x%x, resultat = 0x%x, "
                           "cmd = 0x%x\n",
                           status, sg_hd->result, o_buff[SCSI_OFF] );
          fprintf( stderr, "read(generic) tampon SCSI "
                  "%x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\n",
                  sg_hd->sense_buffer[0],         sg_hd->sense_buffer[1],
                  sg_hd->sense_buffer[2],         sg_hd->sense_buffer[3],
                  sg_hd->sense_buffer[4],         sg_hd->sense_buffer[5],
                  sg_hd->sense_buffer[6],         sg_hd->sense_buffer[7],
                  sg_hd->sense_buffer[8],         sg_hd->sense_buffer[9],
                  sg_hd->sense_buffer[10],        sg_hd->sense_buffer[11],
                  sg_hd->sense_buffer[12],        sg_hd->sense_buffer[13],
                  sg_hd->sense_buffer[14],        sg_hd->sense_buffer[15]);
          if (status < 0)
              perror("");
      }
      /* A-t-on ce qu'on attendait ? */
      if (status == SCSI_OFF + out_size) status = 0; /* on a tout */

      return status;  /* 0 indique que tout est bon */
  }

  Bien que cela puisse sembler quelque peu complexe  au  premier  abord,
  une  grande  partie  du  code  est  dediee  aux  controle et detection
  d'erreurs (ce qui est utile meme  une  fois  que  le  code  fonctionne
  correctement).

  Handle_SCSI_cmd  presente une forme generalisee pour tous les types de
  commandes SCSI, qui correspondent a l'une des categories qui suivent :

            Mode de donnees            |    Exemple de commande
       =============================================================
       ni entree ni sortie de donnees  |     test d'unite prete
       pas d'entree, sortie de donnees |      requete, lecture
       entree de donnees, pas de sortie| selection de mode, ecriture
         entree et sortie de donnees   |     detection de mode

  99..  EExxeemmppllee ddee ccoommmmaannddee ddee rreeqquueettee

  L'une des commandes SCSI de base est INQUIRY, utilisee pour identifier
  les type et constructeur du peripherique. Voici la definition issue de
  la  specification  SCSI-2  (se  reporter  au  standard SCSI-2 pour les
  details).

                              Table 44: Commande INQUIRY
  +=====-========-========-========-========-========-========-========-========+
  |  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
  |Octet|        |        |        |        |        |        |        |        |
  |=====+=======================================================================|
  | 0   |                           Code operation (12h)                        |
  |-----+-----------------------------------------------------------------------|
  | 1   |Numero d'unite logique    |                  Reserve          |  EVPD  |
  |-----+-----------------------------------------------------------------------|
  | 2   |                           Code page                                   |
  |-----+-----------------------------------------------------------------------|
  | 3   |                           Reserve                                     |
  |-----+-----------------------------------------------------------------------|
  | 4   |                           Taille d'allocation                         |
  |-----+-----------------------------------------------------------------------|
  | 5   |                           Controle                                    |
  +=============================================================================+

  Les donnees en sortie ont l'allure suivante :

                     Table 45: Format standard de donnees INQUIRY
  +=====-========-========-========-========-========-========-========-========+
  |  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
  |Octet|        |        |        |        |        |        |        |        |
  |=====+==========================+============================================|
  | 0   | Qualificateur de periph. |           Type de peripherique             |
  |-----+-----------------------------------------------------------------------|
  | 1   |  RMB   |                  Modificateur de type de peripherique        |
  |-----+-----------------------------------------------------------------------|
  | 2   |   Version ISO   |       Version ECMA       |  Version approuvee ANSI  |
  |-----+-----------------+-----------------------------------------------------|
  | 3   |  AENC  | TrmIOP |     Reserve     |   Format de donnees en reponse    |
  |-----+-----------------------------------------------------------------------|
  | 4   |                    Longueur additionnelle (n-4)                       |
  |-----+-----------------------------------------------------------------------|
  | 5   |                           Reserve                                     |
  |-----+-----------------------------------------------------------------------|
  | 6   |                           Reserve                                     |
  |-----+-----------------------------------------------------------------------|
  | 7   | RelAdr | WBus32 | WBus16 |  Sync  | Linked |Reserve | CmdQue | SftRe  |
  |-----+-----------------------------------------------------------------------|
  | 8   | (MSB)                                                                 |
  |- - -+---                      Identification de constructeur             ---|
  | 15  |                                                                 (LSB) |
  |-----+-----------------------------------------------------------------------|
  | 16  | (MSB)                                                                 |
  |- - -+---                      Identification de produit                  ---|
  | 31  |                                                                 (LSB) |
  |-----+-----------------------------------------------------------------------|
  | 32  | (MSB)                                                                 |
  |- - -+---                      Niveau de revision du produit              ---|
  | 35  |                                                                 (LSB) |
  |-----+-----------------------------------------------------------------------|
  | 36  |                                                                       |
  |- - -+---                      Specifique constructeur                    ---|
  | 55  |                                                                       |
  |-----+-----------------------------------------------------------------------|
  | 56  |                                                                       |
  |- - -+---                        Reserve                                  ---|
  | 95  |                                                                       |
  |=====+=======================================================================|
  |     |                       Parametres specifiques constructeur             |
  |=====+=======================================================================|
  | 96  |                                                                       |
  |- - -+---                      Specifique constructeur                    ---|
  | n   |                                                                       |
  +=============================================================================+

  L'exemple qui suit utilise la fonction de bas  niveau  handle_SCSI_cmd
  pour effectuer la commande SCSI INQUIRY.

  Tout d'abord, nous ajoutons le bloc de commande a l'en-tete generique,
  puis appelons handle_SCSI_cmd. Notez que l'argument taille  de  tampon
  en  sortie  de  l'appel  handle_SCSI_cmd exclut la taille de l'en-tete
  generique. Apres l'execution de  la  commande,  le  tampon  de  sortie
  contient les informations, sauf si une erreur s'est produite.

  #define INQUIRY_CMD     0x12
  #define INQUIRY_CMDLEN  6
  #define INQUIRY_REPLY_LEN 96
  #define INQUIRY_VENDOR  8       /* decalage vers le nom du constructeur */

  /* recherche du constructeur et du modele */
  static unsigned char *Inquiry ( void )
  {
    unsigned char Inqbuffer[ SCSI_OFF + INQUIRY_REPLY_LEN ];
    unsigned char cmdblk [ INQUIRY_CMDLEN ] =
        { INQUIRY_CMD,  /* commande                 */
                    0,  /* lun/reserve              */
                    0,  /* code de page             */
                    0,  /* reserve                  */
    INQUIRY_REPLY_LEN,  /* longueur allocation      */
                    0 };/* reserve / drapeau / lien */

    memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) );

    /*
     * +------------------+
     * | struct sg_header | <- commande
     * +------------------+
     * | copie de cmdblk  | <- commande + SCSI_OFF
     * +------------------+
     */

    if (handle_SCSI_cmd(sizeof(cmdblk), 0, cmd,
                        sizeof(Inqbuffer) - SCSI_OFF, Inqbuffer )) {
        fprintf( stderr, "La requete a echoue\n" );
        exit(2);
    }
    return (Inqbuffer + SCSI_OFF);
  }

  L'exemple  ci-dessus suit cette structure. La fonction Inquiry recopie
  son bloc de commande apres l'en-tete generique (donne  par  SCSI_OFF).
  Les donnees en entree sont absentes de cette commande. handle_SCSI_cmd
  definit la structure d'en-tete. Nous pouvons maintenant implementer la
  fonction main qui complete ce programme d'exemple fonctionnel.

       void main( void )
       {
         fd = open(DEVICE, O_RDWR);
         if (fd < 0) {
           fprintf( stderr, "Il faut les permissions lecture/ecriture pour "DEVICE".\n" );
           exit(1);
         }

         /* affiche certains champs du resultat de Inquiry() */
         printf( "%s\n", Inquiry() + INQUIRY_VENDOR );
       }

  Tout  d'abord,  nous  ouvrons  le  peripherique,  controlons l'absence
  d'erreur, puis appelons la fonction  de  haut  niveau.  Ensuite,  nous
  affichons  des resultats sous une forme lisible, dont le constructeur,
  le produit et la version.

  Note : il y a plus d'informations dans le resultat de "Inquiry" que ce
  que  fournit ce petit programme. Il vous est loisible d'etendre celui-
  ci au type de peripherique, version ANSI, etc. Le type de peripherique
  a  une  importance  particuliere,  puisqu'il  determine  les  jeux  de
  commandes obligatoires et  facultatives  pour  celui-ci.  Si  vous  ne
  souhaitez  pas  le  programmer  vous-meme, Eric Youngdale a realise le
  programme  scsiinfo,  qui  fournit  a  peu  pres   toute   information
  disponible pour un peripherique SCSI. Cherchez sur tsx-11.mit.edu dans
  pub/Linux/ALPHA/scsi (NdT : on trouvera ce  programme  sur  les  sites
  miroirs francais, comme ftp.ibp.fr, a un emplacement similaire).

  1100..  LLee ""ttaammppoonn SSCCSSII""

  Les  commandes  qui  ne  renvoient  pas de donnees peuvent fournir des
  informations  d'etat  a  l'aide  du  tampon  SCSI  (qui  fait   partie
  integrante  de  la  structure  d'en-tete).  Les  donnees  d'etat  sont
  disponibles lorsque la commande  precedente  s'est  terminee  avec  un
  statut   "CHECK   CONDITION".   Dans   ce   cas,   le  noyau  rapatrie
  automatiquement les donnees d'etat a l'aide  d'une  commande  "REQUEST
  SENSE". Sa structure est la suivante :

       +=====-========-========-========-========-========-========-========-========+
       |  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
       |Octet|        |        |        |        |        |        |        |        |
       |=====+========+==============================================================|
       | 0   | Valide |                  Code d'erreur (70h ou 71h)                  |
       |-----+-----------------------------------------------------------------------|
       | 1   |                           Numero de segment                           |
       |-----+-----------------------------------------------------------------------|
       | 2   |Filemark|  EOM   |  ILI   |Reserve |         Clef d'etat               |
       |-----+-----------------------------------------------------------------------|
       | 3   | (MSB)                                                                 |
       |- - -+---                        Information                              ---|
       | 6   |                                                                 (LSB) |
       |-----+-----------------------------------------------------------------------|
       | 7   |                           Longueur additionnelle d'etat (n-7)         |
       |-----+-----------------------------------------------------------------------|
       | 8   | (MSB)                                                                 |
       |- - -+---                        Information specifique de la commande    ---|
       | 11  |                                                                 (LSB) |
       |-----+-----------------------------------------------------------------------|
       | 12  |                           Code d'etat additionnel                     |
       |-----+-----------------------------------------------------------------------|
       | 13  |                           Qualificateur de code d'etat additionnel    |
       |-----+-----------------------------------------------------------------------|
       | 14  |                           Code d'unite de champ remplacable           |
       |-----+-----------------------------------------------------------------------|
       | 15  |  SKSV  |                                                              |
       |- - -+------------               Specifique clef d'etat                   ---|
       | 17  |                                                                       |
       |-----+-----------------------------------------------------------------------|
       | 18  |                                                                       |
       |- - -+---                        Octets supplementaires d'etat            ---|
       | n   |                                                                       |
       +=============================================================================+

  Note  :  les  champs  les plus utiles sont la clef d'etat (cf. section
  ``Clefs  du  buffer  SCSI''),  le  code  d'etat  additionnel   et   le
  qualificateur  de  code  d'etat  additionnel  (cf.  section ``Codes et
  qualificateurs du buffer SCSI additionnels''). Les deux derniers  sont
  utilises en combinaison l'un avec l'autre.

  1111..  EExxeemmppllee dd''uuttiilliissaattiioonn dduu ttaammppoonn SSCCSSII

  Nous  allons utiliser ici la commande "TEST UNIT READY" pour controler
  si un support est charge dans  notre  peripherique.  Les  declarations
  d'en-tete  et  la  fonction  handle_SCSI_cmd de l'exemple de "Inquiry"
  seront aussi necessaires.

                               Table 73: Commande TEST UNIT READY
       +=====-========-========-========-========-========-========-========-========+
       |  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
       |Octet|        |        |        |        |        |        |        |        |
       |=====+=======================================================================|
       | 0   |                           Code operation (00h)                        |
       |-----+-----------------------------------------------------------------------|
       | 1   |Numero d'unite logique LUN|                  Reserve                   |
       |-----+-----------------------------------------------------------------------|
       | 2   |                           Reserve                                     |
       |-----+-----------------------------------------------------------------------|
       | 3   |                           Reserve                                     |
       |-----+-----------------------------------------------------------------------|
       | 4   |                           Reserve                                     |
       |-----+-----------------------------------------------------------------------|
       | 5   |                           Controle                                    |
       +=============================================================================+

  Voici la fonction qui l'implemente :

  #define TESTUNITREADY_CMD 0
  #define TESTUNITREADY_CMDLEN 6

  #define ADD_SENSECODE 12
  #define ADD_SC_QUALIFIER 13
  #define NO_MEDIA_SC 0x3a
  #define NO_MEDIA_SCQ 0x00

  int TestForMedium ( void )
  {
    /* demande le statut READY */
    static unsigned char cmdblk [TESTUNITREADY_CMDLEN] = {
        TESTUNITREADY_CMD, /* commande */
                        0, /* lun/reserve */
                        0, /* reserve */
                        0, /* reserve */
                        0, /* reserve */
                        0};/* controle */

    memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) );

    /*
     * +------------------+
     * | struct sg_header | <- commande
     * +------------------+
     * | copie de cmdblk  | <- commande + SCSI_OFF
     * +------------------+
     */

    if (handle_SCSI_cmd(sizeof(cmdblk), 0, cmd,
                              0, NULL)) {
        fprintf (stderr, "Unite non prete\n");
        exit(2);
    }

    return
     *(((struct sg_header*)cmd)->sense_buffer +ADD_SENSECODE) !=
                                                          NO_MEDIA_SC ||
     *(((struct sg_header*)cmd)->sense_buffer +ADD_SC_QUALIFIER) !=
                                                          NO_MEDIA_SCQ;
  }

  Nous pouvons maintenant realiser le controle a l'aide de  la  fonction
  main :

  void main( void )
  {
    fd = open(DEVICE, O_RDWR);
    if (fd < 0) {
      fprintf( stderr, "Il faut les permissions lecture/ecriture pour "DEVICE".\n"
   );
      exit(1);
    }

    /* on regarde si le support est charge */

    if (!TestForMedium()) {
      printf("le support n'est pas charge\n");
    } else {
      printf("le support est charge\n");
    }
  }

  Le fichier generic_demo.c en annexe contient les deux exemples.

  1122..  FFoonnccttiioonnss iiooccttll

  Deux fonctions ioctl sont disponibles :

  +o  ioctl(fd, SG_SET_TIMEOUT, &Timeout); definit la valeur du timeout a
     Timeout * 10 millisecondes.  Timeout  doit  etre  declare  en  tant
     qu'entier (int).

  +o  ioctl(fd,  SG_GET_TIMEOUT,  &Timeout);  lit la valeur du timeout en
     cours. Timeout doit etre declare en tant qu'entier (int).

  1133..  VVaalleeuurrss ppaarr ddeeffaauutt dduu ppiilloottee

  1133..11..  TTaaiilllleess ddee ttrraannssffeerrtt

  Actuellement (au moins jusqu'au noyau  version  1.1.68),  les  tailles
  d'entree  et  de  sortie  doivent  etre  inferieures  ou egales a 4096
  octets, sauf si le noyau a ete compile avec la  constante  SG_BIG_BUFF
  definie,  auquel  cas  elles sont limitees  a SG_BIG_BUFF (soit 32768)
  octets. Les tailles donnees comprennent l'en-tete generique ainsi  que
  le bloc de commande fourni en entree.  SG_BIG_BUFF peut etre augmentee
  sans probleme jusqu'a (131072 - 512). Pour en beneficier, vous  devrez
  bien evidemment regenerer un nouveau noyau et redemarrer avec.

  1133..22..  TTiimmeeoouutt eett vvaalleeuurrss ddee rreeeessssaaiiss

  La  valeur  du  timeout par defaut est d'une minute (Timeout = 6 000).
  Elle peut etre modifiee a l'aide  d'un  appel  a  ioctl  (cf.  section
  ``Fonctions ioctl'').  Le nombre de reessais par defaut est un.

  1144..  CCoommmmeenntt oobbtteenniirr lleess ssppeecciiffiiccaattiioonnss SSCCSSII ??

  Il  existe  des  normes  appelees SCSI-1, SCSI-2 et SCSI-3. Les normes
  assurent a peu de choses pres la compatibilite ascendante.

  Le standard SCSI-1 est (d'apres l'auteur) en grande  partie  obsolete,
  et SCSI-2 est celui qui est le plus largement utilise. SCSI-3 est tres
  jeune et tres cher. Ces jeux de commandes normalises  definissent  des
  commandes  obligatoires  et  facultatives  pour  les  constructeurs de
  materiels SCSI et doivent etre preferees  aux  extensions  specifiques
  non  normalisees et pour lesquelles l'information est plus difficile a
  obtenir. Evidemment,  il  n'y  a  parfois  aucune  alternative  a  ces
  extensions proprietaires.

  Des copies electroniques sont disponibles par FTP anonyme depuis :

  +o  ftp.cs.tulane.edu:pub/scsi

  +o  ftp.symbios.com:/pub/standards

  +o  ftp.cs.uni-sb.de:/pub/misc/doc/scsi

  (J'ai  eu  mes  specifications  SCSI dans le CD-ROM Linux d'Yggdrasil,
  dans le repertoires /usr/doc/scsi-2 et /usr/doc/scsi-1).

  La FAQ SCSI liste aussi les sources d'information imprimee suivantes :

  Les specifications SCSI - disponible depuis :

             Global Engineering Documents
             15 Inverness Way East
             Englewood Co  80112-5704
             (800) 854-7179
               SCSI-1: X3.131-1986
               SCSI-2: X3.131-199x
               SCSI-3 X3T9.2/91-010R4 Working Draft

       (Global Engineering Documentation in Irvine, CA (714)261-1455??)

       SCSI-1: Doc \# X3.131-1986 from ANSI, 1430 Broadway, NY, NY 10018

       IN-DEPTH EXPLORATION OF SCSI peut etre trouve chez
       Solution Technology, Attn: SCSI Publications, POB 104, Boulder Creek,
       CA 95006, (408)338-4285, FAX (408)338-4374

       THE SCSI ENCYLOPEDIA et SCSI BENCH REFERENCE peuvent etre obtenus chez
       ENDL Publishing, 14426 Black Walnut Ct., Saratoga, CA 95090,
       (408)867-6642, FAX (408)867-2115

       SCSI: UNDERSTANDING THE SMALL COMPUTER SYSTEM INTERFACE est publie chez
       Prentice-Hall, ISBN 0-13-796855-8

  1155..  DD''aauuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  1155..11..  HHOOWWTTOOss eett FFAAQQss

  Le  SSCCSSII--HHOOWWTTOO  Linux  de  Drew  Eckhardt (NdT : disponible en version
  francaise) traite de tous les controleurs SCSI reconnus ainsi que  des
  questions  specifiques  aux  peripheriques.  De nombreux aides pour le
  depannage sont fournies. Il est disponible  sur  sunsite.unc.edu  dans
  /pub/Linux/docs/LDP et sur ses sites miroirs.

  Les questions generales concernant le SCSI ont une reponse dans la FAQ
  SCSI du groupe de news comp.periphs.scsi (disponible sur  tsx-11  dans
  /pub/linux/ALPHA/scsi et sur les sites miroirs).

  1155..22..  LLaa lliissttee ddee mmeessssaaggeerriiee

  Il  existe une lliissttee ddee mmeessssaaggeerriiee qui traite des rapports d'anomalies
  et questions sur le developpement SCSI sous Linux. Pour la  rejoindre,
  envoyez   un  courrier  a  majordomo@vger.rutgers.edu  avec  la  ligne
  subscribe linux-scsi dans le corps du message.  Les  messages  doivent
  etre  envoyes a linux-scsi@vger.rutgers.edu. Un texte d'aide peut etre
  demande   par   envoi   de   la   ligne   de    message    "help"    a
  majordomo@vger.rutgers.edu.

  1155..33..  EExxeemmpplleess ddee ccooddee

     ssuunnssiittee..uunncc..eedduu:: aappppss//ggrraapphhiiccss//hhppssccaannppbbmm--00..33aa..ttaarr..ggzz
        Ce  paquetage gere un scanner HP scanjet a l'aide de l'interface
        generique.

     ttssxx--1111..mmiitt..eedduu:: BBEETTAA//ccddrroomm//pprriivvaattee//mmkkiissooffss//ccddwwrriittee--11..33..ttaarr..ggzz
        Le paquetage cdwrite utilise l'interface generique  pour  ecrire
        une image de CD sur un graveur.

     ssuunnssiittee..uunncc..eedduu:: aappppss//ssoouunndd//ccddss//ccddddaa22wwaavv**..ssrrcc..ttaarr..ggzz
        Un composant pour mes propres applications, qui copie des pistes
        audio de CD sous forme de fichiers wav.

  1166..  AAuuttrreess cchhoosseess uuttiilleess

  Des choses qui pourraient devenir pratiques. Je n'ai aucune idee de la
  presence  de  versions  plus  recentes  ou meilleures ici ou la. Toute
  information est la bienvenue.

  1166..11..  AAiiddeess aa ll''eeccrriittuurree ddee ppiillootteess ddee ppeerriipphheerriiqquueess

  Ces  documents  peuvent  etre  trouves   sur   le   serveur   ftp   de
  sunsite.unc.edu et sur ses miroirs.

     //ppuubb//LLiinnuuxx//ddooccss//kkeerrnneell//kkeerrnneell--hhaacckkeerrss--gguuiiddee
        Le  guide  des  stakhanovistes  du  noyau  LDP  (NdT : Projet de
        Documentation Linux). Il  est  peut-etre  un  peu  ancien,  mais
        traite les points les plus fondamentaux.

     //ppuubb//LLiinnuuxx//ddooccss//kkeerrnneell//ddrriivveerrss..ddoocc..zz
        Ce document traite de l'ecriture de pilotes caracteres.

     //ppuubb//LLiinnuuxx//ddooccss//kkeerrnneell//ttuuttoorriiaall..ddoocc..zz
        Tutoriel  sur  l'ecriture  d'un pilote de peripherique caractere
        avec le code.

     //ppuubb//LLiinnuuxx//ddooccss//kkeerrnneell//ssccssii..ppaappeerr..ttaarr..ggzz
        Un document Latex decrivant comment ecrire un pilote SCSI.

     //ppuubb//LLiinnuuxx//ddooccss//hhaarrddwwaarree//DDEEVVIICCEESS
        Une liste des numeros majeurs et mineurs utilises par Linux.

  1166..22..  UUttiilliittaaiirreess

     ttssxx--1111..mmiitt..eedduu:: AALLPPHHAA//ssccssii//ssccssiiiinnffoo**..ttaarr..ggzz
        Programme d'interrogation d'un peripherique  SCSI  pour  obtenir
        ses  parametres  d'utilisation,  listes  de  defauts,  etc.  Une
        interface X necessitant Tk/Tcl/wish est disponible.  Avec  cette
        derniere,  vous  pouvez  facilement modifier la configuration du
        lecteur.

     ttssxx--1111..mmiitt..eedduu:: AALLPPHHAA//kkddeebbuugg
        Une extension a pour le deverminage du noyau.

  1177..  AAuuttrreess iinntteerrffaacceess dd''aacccceess aauu SSCCSSII

  Sous Linux, on peut acceder differemment au SCSI via des appels  ioctl
  SCSI_IOCTL_SEND_COMMAND  qui  necessitent  des  privileges  root.  Les
  paquetages "scsiinfos" ainsi que "cdda2wav" les utilisent.

  D'autres interfaces similaires sont utilisees dans le monde Unix, mais
  ne sont pas disponibles pour Linux :

  1. CAM (Common Access Method) developpee par Future Domain et d'autres
     constructeurs SCSI. Linux dispose  maintenant  d'un  petit  support
     pour  un  systeme  CAM  SCSI (essentiellement pour bouter depuis un
     disque dur).  CAM supporte meme le mode  "target",  qui  permet  de
     deguiser  un  ordinateur  en  peripherique SCSI (c.a.d. realiser un
     petit reseau SCSI).

  2. ASPI (Advanced SCSI Programming Interface) developpee par  Adaptec.
     C'est le standard de facto pour les machines MS-DOS.

  3. ??? est disponible sur NeXTStep.

  4. DSLIB est disponible sur Silicon Graphics.

  5. SCSI... est disponible sur les machines SUN.

  6. SCO Unix a aussi quelque chose.

  7. HPUX utilise des ioctl.  -->

  D'autres   interfaces   applicatives   existent  aussi  chez  SCO(TM),
  NeXT(TM), Silicon Graphics(TM) et SUN(TM).

  1188..  CCoommmmeennttaaiirreess ffiinnaallss

  L'interface generique SCSI jette  un  pont  sur  le  fosse  entre  les
  applications utilisateur et les peripheriques specifiques. Mais plutot
  que de charger de nombreux programmes  avec  des  jeux  similaires  de
  fonctions  de bas niveau, il serait plus souhaitable de disposer d'une
  bibliotheque partagee avec un  jeu  generalise  de  fonctions  de  bas
  niveau  pour un usage particulier. Le but principal est de disposer de
  couches d'interfaces independantes. Une bonne conception doit  separer
  une  application  en  routines  de  bas  niveau  et  independantes  du
  materiel.  Celles-ci  peuvent  etre  placees  dans  une   bibliotheque
  partagee  et  rendues disponibles pour toutes les applications. Ainsi,
  les interfaces standardisees doivent etre suivies autant que  possible
  avant d'en realiser de nouvelles.

  Vous  devriez  maintenant  en  savoir  plus  que  moi  sur l'interface
  generique SCSI de Linux. Vous pouvez donc commencer  a  developper  de
  puissantes  applications  pour le plus grand benefice de la communaute
  Linux...

  1199..  RReemmeerrcciieemmeennttss

  Un grand merci a Jeff Tranter pour ses  corrections  et  ameliorations
  considerables   de  ce  texte,  ainsi  qu'a  Carlos  Puchol  pour  ses
  commentaires utiles.  L'aide de Drew Eckhardt et  Eric  Youngdale  sur
  mes premieres questions (idiotes) sur l'utilisation de cette interface
  a ete appreciee.

  TT..  AAnnnneexxee

  UU..  TTrraaiitteemmeenntt dd''eerrrreeuurrss

  Les fonctions open, ioctl, write et read peuvent renvoyer des erreurs.
  Dans ce cas, leur valeur de retour est -1 et la variable globale errno
  est positionnee au numero d'erreur (negatif).  Les  valeurs  de  errno
  sont   definies  dans  /usr/include/errno.h.   Les  valeurs  negatives
  possibles sont les suivantes :

       Fonction | Erreur       | Description
       =========|==============|==================================================
       open     |  ENXIO       | peripherique invalide
                |  EACCES      | l'acces n'est pas en lecture/ecriture (O_RDWR)
                |  EBUSY       | le peripherique est accede en mode non bloquant,
                |              | mais il est occupe actuellement
                |  ERESTARTSYS | erreur interne. Essayez de la rendre reproductible
                |              | et informez-en le canal SCSI (pour les details sur
                |              | le rapport de bogue, se reporter au SCSI-HOWTO de
                |              | Drew Eckhardts).
       ioctl    |  ENXIO       | peripherique invalide
       read     |  EAGAIN      | le peripherique bloque. Essayez plus tard.
                |  ERESTARTSYS | erreur interne. Essayez de la rendre reproductible
                |              | et informez-en le canal SCSI (pour les details sur
                |              | le rapport de bogue, se reporter au SCSI-HOWTO de
                |              | Drew Eckhardts).
       write    |  EIO         | taille trop petite (plus petite que cette de l'en-
                |              | tete generique). Attention : il n'y a actuellement
                |              | aucun controle de debordement.
                |  EAGAIN      | le peripherique bloque. Essayez plus tard.
                |  ENOMEM      | la memoire necessaire pour cette requete ne peut
                |              | etre allouee. Essayez plus tard sauf si vous depas-
                |              | sez la taille maximale de transfert (cf. ci-dessus).
       select   |              | sans description
       close    |              | sans description

  Pour la lecture  et  l'ecriture,  des  valeurs  de  retour  positivent
  indiquent  comme  d'habitude  la  quantite  d'octets transferes. Cette
  valeur doit correspondre a celle demandee.

  UU..11..  DDeeccooddaaggee ddee ll''eettaatt dd''eerrrreeuurr

  En plus, une information detaillee est fournie par hd_status du  noyau
  et   par  sense_buffer  du  peripherique  (cf.  section  ref  id="sec-
  sensebuff" name="Le tampon SCSI">), les deux  utilisant  la  structure
  d'en-tete generique.

  Les   differents   sens   de   hd_status  peuvent  etre  trouves  dans
  drivers/scsi/scsi.h. Cet  unsigned  int  est  compose  de  differentes
  parties :

    lsb  |    ...    |    ...    | msb
  =======|===========|===========|============
  status | sense key | host code | driver byte

  Les  macros  de  drivers/scsi/scsi.h  sont  disponibles, mais elles ne
  peuvent  malheureusement  pas  etre  facilement  utilisees   a   cause
  d'interdependances tordues entre fichiers d'en-tete. Il faudrait faire
  une passe sur ces fichiers pour clarifier les choses.

               Macro          | Description
       =======================|=================================================
       status_byte(hd_status) | Etat du peripherique. cf. section Codes d'etat
       msg_byte(hd_status)    | du peripherique. cf. section buffer SCSI
       host_byte(hd_status)   | du noyau. cf. section codes hote
       driver_byte(hd_status) | du noyau. cf. section codes intermediaires

  UU..22..  CCooddeess dd''eettaatt

  Les   codes   d'etat   de   peripherique   qui   suivent   (issus   de
  drivers/scsi/scsi.h) sont disponibles :

       Valeur | Symbole
       =======|=====================
       0x00   | GOOD
       0x01   | CHECK_CONDITION
       0x02   | CONDITION_GOOD
       0x04   | BUSY
       0x08   | INTERMEDIATE_GOOD
       0x0a   | INTERMEDIATE_C_GOOD
       0x0c   | RESERVATION_CONFLICT

  On  constate  que  ces valeurs symboliques ont subi un ddeeccaallaaggee ddrrooiitt.
  Lorsque l'etat indique CHECK_CONDITION, les  donnees  du  buffer  SCSI
  sont  valides  (controlez en particulier le code d'etat additionnel et
  le qualificateur de code d'etat additionnel).

  Les valeurs qui suivent concernent les specifications SCSI-2 :

                    Table 27 : Code de l'octet d'etat
  +=================================-==============================+
  |      Bits de l'octet d'etat     |  Etat                        |
  |  7   6   5   4   3   2   1   0  |                              |
  |---------------------------------+------------------------------|
  |  R   R   0   0   0   0   0   R  |  GOOD                        |
  |  R   R   0   0   0   0   1   R  |  CHECK CONDITION             |
  |  R   R   0   0   0   1   0   R  |  CONDITION MET               |
  |  R   R   0   0   1   0   0   R  |  BUSY                        |
  |  R   R   0   1   0   0   0   R  |  INTERMEDIATE                |
  |  R   R   0   1   0   1   0   R  |  INTERMEDIATE-CONDITION MET  |
  |  R   R   0   1   1   0   0   R  |  RESERVATION CONFLICT        |
  |  R   R   1   0   0   0   1   R  |  COMMAND TERMINATED          |
  |  R   R   1   0   1   0   0   R  |  QUEUE FULL                  |
  |                                 |                              |
  |       Tous autres codes         |  Reserve                     |
  |----------------------------------------------------------------|
  |       R = Bit reserve                                          |
  +================================================================+

  La definition des codes de l'octet d'etat sont donnees ci-dessous :

     GGOOOODD..
        Cet  etat  indique  que  la  cible  a  correctement  execute  la
        commande.

     CCHHEECCKK CCOONNDDIITTIIOONN..
        Cet  etat  indique qu'une condition de contention s'est produite
        (cf. 6.6).

     CCOONNDDIITTIIOONN MMEETT..
        Cet etat, ou INTERMEDIATE-CONDITION MET est renvoye lorsque  les
        conditions   de   l'operation  demandee  sont  satisfaites  (cf.
        commandes SEARCH DATA et PRE-FETCH).

     BBUUSSYY..
        Cet etat indique que la cible est occupee. Il peut etre  renvoye
        lorsque  la  cible  ne  peut  accepter  de  commande  depuis  un
        initiateur inacceptable par ailleurs (i.e. conflit d'absence  de
        reservation).  L'action  de reprise recommandee est une nouvelle
        tentative ulterieure.

     IINNTTEERRMMEEDDIIAATTEE..
        Cet etat, ou INTERMEDIATE-CONDITION MET doit etre renvoyee apres
        chaque  commande  reussie  d'une  serie de commandes liees (sauf
        pour la derniere), sauf si celle-ci  se  termine  par  un  CHECK
        CONDITION,  RESERVATION  CONFLICT,  ou COMMAND TERMINATED. Si ni
        INTERMEDIATE ni INTERMEDIATE-CONDITION  MET  n'est  renvoye,  la
        serie   de   commandes   se  termine,  ainsi  que  le  processus
        d'entrees/sorties.

     IINNTTEERRMMEEDDIIAATTEE--CCOONNDDIITTIIOONN MMEETT..
        Cet etat est la combinaison de CONDITION MET et de INTERMEDIATE.

     RREESSEERRVVAATTIIOONN CCOONNFFLLIICCTT..
        Cet  etat doit etre renvoye lorsqu'un initiateur tente d'acceder
        a une unite logique ou a un extension a l'interieur d'une  unite
        logique  reservee avec un type de reservation en conflit pour un
        autre peripherique SCSI (cf. commandes RESERVE et RESERVE UNIT).
        L'action  de  reprise  recommandee  est  une  nouvelle tentative
        ulterieure.

     CCOOMMMMAANNDD TTEERRMMIINNAATTEEDD..
        Cet etat doit etre renvoye lorsque la cible termine le processus
        d'entrees/sorties  apres  reception  d'un  message TERMINATE I/O
        PROCESS (cf. 5.6.22). Cet etat indique aussi qu'une condition de
        contention s'est produite (cf. 6.6).

     QQUUEEUUEE FFUULLLL..
        Cet  etat  doit  etre  implemente  si  la file d'attente marquee
        (tagged  queuing)  l'est  aussi.  Il  est  renvoye  lors  de  la
        reception  d'un  message SIMPLE QUEUE TAG, ORDERED QUEUE TAG, ou
        HEAD OF QUEUE TAG et que la file de  commandes  est  pleine.  Le
        processus  d'entree/sortie n'est alors pas place dans la file de
        commandes.

  UU..33..  CClleeffss dduu bbuuffffeerr SSCCSSII

  Les clefs resultantes peuvent etre rapatriees a  l'aide  de  la  macro
  msg_byte  (cf. section ``Decodage de l'etat d'erreur'').  Les symboles
  du noyau qui suivent sont predefinis dans drivers/scsi/scsi.h :

       Valeur | Symbole
       =======|================
       0x00   | NO_SENSE
       0x01   | RECOVERED_ERROR
       0x02   | NOT_READY
       0x03   | MEDIUM_ERROR
       0x04   | HARDWARE_ERROR
       0x05   | ILLEGAL_REQUEST
       0x06   | UNIT_ATTENTION
       0x07   | DATA_PROTECT
       0x08   | BLANK_CHECK
       0x0a   | COPY_ABORTED
       0x0b   | ABORTED_COMMAND
       0x0d   | VOLUME_OVERFLOW
       0x0e   | MISCOMPARE

  Une liste extraite  de  la  doc  SCSI-2  suit  (issue  de  la  section
  7.2.14.3) :

          Table 69: Description des clefs (0h-7h) du buffer SCSI
  +========-====================================================================+
  |  Clef  |  Description                                                       |
  |--------+--------------------------------------------------------------------|
  |   0h   |  NO SENSE.  Indique qu'aucune information specifique n'est         |
  |        |  disponible pour l'unite logique designee. C'est le cas pour les   |
  |        |  commandes reussies ou celles dont l'etat est CHECK CONDITION ou   |
  |        |  COMMAND TERMINATED a cause de l'un des bits filemark, EOM ou ILI. |
  |--------+--------------------------------------------------------------------|
  |   1h   |  RECOVERED ERROR.  Indique que la reussite de la derniere commande |
  |        |  fut conditionnee par une action de reparation effectuee par la    |
  |        |  cible. Les octets additionnels peuvent fournir des details, ainsi |
  |        |  que le champ information. Lorsque plusieurs erreurs reparees se   |
  |        |  produisent durant une commande, le choix de celle indiquee        |
  |        |  (premiere, derniere, plus severe, etc.) depend du peripherique.   |
  |--------+--------------------------------------------------------------------|
  |   2h   |  NOT READY.  Indique que l'unite logique est inaccessible. Une     |
  |        |  intervention manuelle peut etre necessaire.                       |
  |--------+--------------------------------------------------------------------|
  |   3h   |  MEDIUM ERROR.  Indique la fin d'une commande sur une erreur non-  |
  |        |  recuperable, causee probablement par un defaut du support ou une  |
  |        |  erreur de donnees. Cette clef peut aussi etre renvoyee si la      |
  |        |  cible ne peut faire la distinction entre un defaut du support et  |
  |        |  un defaut specifique du materiel (clef 4h).                       |
  |--------+--------------------------------------------------------------------|
  |   4h   |  HARDWARE ERROR.  Indique que la cible a detecte une erreur mate-  |
  |        |  rielle irrecuperable (defaut du controleur, du peripherique, er-  |
  |        |  reur de parite, etc.) lors de l'execution de la commande ou d'un  |
  |        |  auto-test.                                                        |
  |--------+--------------------------------------------------------------------|
  |   5h   |  ILLEGAL REQUEST.  Indique qu'un parametre illegal a ete detecte   |
  |        |  dans le bloc de description de commande ou dans les parametres    |
  |        |  additionnels (pour certaines commandes : FORMAT UNIT, SEARCH DATA,|
  |        |  etc.). Si la cible detecte un parametre incorrect, il doit termi- |
  |        |  ner celle-ci sans modifier le contenu du support. Si le parametre |
  |        |  incorrect se trouve dans les parametres additionnels, la cible    |
  |        |  peut avoir deja modifie le support. Cette clef est aussi renvoyee |
  |        |  lors de la reception d'un message IDENTIFY invalide (5.6.7).      |
  |--------+--------------------------------------------------------------------|
  |   6h   |  UNIT ATTENTION.  Indique que le support amovible a pu etre change |
  |        |  ou que la cible a ete reinitialisee. Cf. 6.9 pour d'autres infor- |
  |        |  mation sur cette condition.                                       |
  |--------+--------------------------------------------------------------------|
  |   7h   |  DATA PROTECT.  Indique qu'une commande de lecture ou d'ecriture a |
  |        |  ete tentee sur un bloc protege contre cette operation. Celle-ci   |
  |        |  n'est pas effectuee.                                              |
  +=============================================================================+

          Table 70: Description des clefs (8h-Fh) du buffer SCSI
  +========-====================================================================+
  |  Clef  |  Description                                                       |
  |--------+--------------------------------------------------------------------|
  |   8h   |  BLANK CHECK.  Indique qu'un peripherique a ecriture unique ou     |
  |        |  sequentiel a trouve un support vierge ou une indication de fin de |
  |        |  donnees de formatage lors de la lecture, ou qu'un support non     |
  |        |  vierge a ecriture seule a ete trouve pendant l'ecriture.          |
  |--------+--------------------------------------------------------------------|
  |   9h   |  Vendor Specific.  Cette clef est disponible pour indiquer des     |
  |        |  cas particuliers specifiques du constructeur.                     |
  |--------+--------------------------------------------------------------------|
  |   Ah   |  COPY ABORTED.  Indique qu'une commande COPY, COMPARE ou COPY AND  |
  |        |  VERIFY a echoue a cause d'une condition d'erreur sur le periphe-  |
  |        |  rique source, destination ou les deux (cf. 7.2.3.2 pour plus de   |
  |        |  details).                                                         |
  |--------+--------------------------------------------------------------------|
  |   Bh   |  ABORTED COMMAND.  Indique que la cible a abandonne la commande.   |
  |        |  L'initiateur peut eventuellement corriger le probleme par une     |
  |        |  nouvelle tentative.                                               |
  |--------+--------------------------------------------------------------------|
  |   Ch   |  EQUAL.  Indique qu'une commande SEARCH DATA a satisfait une con-  |
  |        |  dition d'egalite.                                                 |
  |--------+--------------------------------------------------------------------|
  |   Dh   |  VOLUME OVERFLOW.  Indique qu'un peripherique a memoire-tampon a   |
  |        |  atteint la fin de partition et que des donnees non ecrites sur le |
  |        |  support peuvent rester dans le tampon. Une (ou plusieurs) commande|
  |        |  RECOVER BUFFER DATA peut etre tentee pour lire les donnees non    |
  |        |  ecrites depuis le tampon.                                         |
  |--------+--------------------------------------------------------------------|
  |   Eh   |  MISCOMPARE.  Indique que les donnees source ne correspondent pas  |
  |        |  a celles lues sur le support.                                     |
  |--------+--------------------------------------------------------------------|
  |   Fh   |  RESERVE.                                                          |
  +=============================================================================+

  UU..44..  CCooddeess hhoottee

  Les   codes   hotes   qui   suivent   sont   definis   au   niveau  de
  drivers/scsi/scsi.h. Ils sont positionnes par le pilote  du  noyau  et
  doivent  etre utilises avec la macro host_byte (cf. section ``Decodage
  de l'etat d'erreur'') :

       Valeur | Symbole        | Description
       =======|================|========================================
       0x00   | DID_OK         | Pas d'erreur
       0x01   | DID_NO_CONNECT | Connexion impossible avant le timeout
       0x02   | DID_BUS_BUSY   | BUS occupe durant la periode de timeout
       0x03   | DID_TIME_OUT   | Timeout atteint pour une autre raison
       0x04   | DID_BAD_TARGET | Mauvaise cible
       0x05   | DID_ABORT      | Arret effectue pour une autre raison
       0x06   | DID_PARITY     | Erreur de parite
       0x07   | DID_ERROR      | Erreur interne
       0x08   | DID_RESET      | Reinitialise par quelqu'un
       0x09   | DID_BAD_INTR   | Interruption inattendue recue

  UU..55..  CCooddeess dduu ppiilloottee

  Le pilote de niveau intermediaire categorise  l'etat  renvoye  par  le
  pilote  de  bas  niveau en fonction du buffer SCSI du peripherique. Il
  suggere certaines actions pouvant etre tentees comme  un  reessai,  un
  abandon  ou  un  changement  de  topographie.  La routine scsi_done de
  scsi.c effectue un travail tres  differencie  fonde  sur  host_byte(),
  status_byte(),  msg_byte()  et  la  suggestion precedente. Ensuite, il
  positionne l'octet du pilote afin d'indiquer ce  qui  a  ete  realise.
  L'octet  du  pilote  est  en  deux  parties  :  l'etat du pilote et la
  suggestion. Chaque moitie  est  composee  des  valeurs  suivantes  (de
  scsi.h) combinees par un OR :

  Valeur | Symbole        | Description ou etat du pilote
  =======|================|========================================
  0x00   | DRIVER_OK      | pas d'erreur
  0x01   | DRIVER_BUSY    | inutilise
  0x02   | DRIVER_SOFT    | inutilise
  0x03   | DRIVER_MEDIA   | inutilise
  0x04   | DRIVER_ERROR   | erreur interne du pilote
  0x05   | DRIVER_INVALID | termine (DID_BAD_TARGET ou DID_ABORT)
  0x06   | DRIVER_TIMEOUT | termine avec timeout
  0x07   | DRIVER_HARD    | termine avec une erreur fatale
  0x08   | DRIVER_SENSE   | buffer SCSI disponible pour informations

       Valeur | Symbole        | Description de la suggestion
       =======|================|========================================
       0x10   | SUGGEST_RETRY  | reessayer la requete SCSI
       0x20   | SUGGEST_ABORT  | abandonner la requete
       0x30   | SUGGEST_REMAP  | remape le bloc (non encore implemente)
       0x40   | SUGGEST_DIE    | laisser le noyau tomber en "panic"
       0x80   | SUGGEST_SENSE  | lire le buffer SCSI du peripherique
       0xff   | SUGGEST_IS_OK  | rien a faire

  VV..  CCooddeess eett qquuaalliiffiiccaatteeuurrss dduu bbuuffffeerr SSCCSSII aaddddiittiioonnnneellss

  Lorsque  l'etat  de la commande SCSI executee est CHECK_CONDITION, des
  donnees  sont  disponibles  dans  le  buffer   SCSI.   Les   code   et
  qualificateur additionnels se trouvent dans ce tampon.

  Je joins ici deux tables issues des specifications SCSI-2. La premiere
  est triee  alphabetiquement,  la  seconde,  numeriquement  (NdT  :  la
  traduction ayant un tantinet bouleverse l'ordre alphabetique, seule la
  table triee par numeros a ete conservee. Le lecteur pourra se reporter
  a la version originale en americain pour la liste alphabetique).

  VV..11..  AASSCC eett AASSCCQQ ddaannss ll''oorrddrree nnuummeerriiqquuee

  La  table  qui  suit  fournit  une  liste  de  descriptions  avec  les
  peripheriques auxquels elles s'appliquent.

                         Table 364 : Assignements ASC et ASCQ

  +=============================================================================+
  |           D - peripherique a acces Direct (Disque)                          |
  |           .T - peripherique a acces sequenTiel (bande magneTique)           |
  |           . I - Imprimante                                                  |
  |           .  P - Processeur                                                 |
  |           .  .W -WORM (CD-ROM inscriptible une fois)                        |
  |           .  . R - CD-ROM (lecture seule)                                   |
  |           .  .  S - Scanner ou numeriseur                                   |
  |           .  .  .O - memoire Optique                                        |
  |           .  .  . M - changeur de Media                                     |
  |           .  .  .  C - peripherique de Communications                       |
  |           .  .  .  .                                                        |
  | ASC ASCQ  DTIPWRSOMC  DESCRIPTION                                           |
  | --- ----              ----------------------------------------------------- |
  |  00  00   DTIPWRSOMC  pas d'information additionnelle                       |
  |  00  01    T          marque de fichier detectee                            |
  |  00  02    T    S     fin de partition/medium detectee                      |
  |  00  03    T          marque de jeu detectee                                |
  |  00  04    T    S     debut de partition/medium detecte                     |
  |  00  05    T    S     fin de donnees detectee                               |
  |  00  06   DTIPWRSOMC  fin du processus d'E/S                                |
  |  00  11   R           lecture audio en cours                                |
  |  00  12   R           lecture audio suspendue                               |
  |  00  13   R           lecture audio terminee avec succes                    |
  |  00  14   R           lecture audio stoppee pour cause d'erreur             |
  |  00  15   R           pas d'etat audio en cours a retourner                 |
  |  01  00   DW  O       pas de signal d'index/de secteur                      |
  |  02  00   D   WR OM   deplacement incomplet                                 |
  |  03  00   DTI W SO    echec d'ecriture sur le peripherique                  |
  |  03  01    T          pas d'ecriture en cours                               |
  |  03  02    T          trop d'erreurs d'ecriture                             |
  |  04  00   DTIPWRSOMC  unite logique non prete, cause inconnue               |
  |  04  01   DTIPWRSOMC  unite logique en preparation                          |
  |  04  02   DTIPWRSOMC  unite logique non prete, commande d'init necessaire   |
  |  04  03   DTIPWRSOMC  unite logique non prete, intervention manuelle necess.|
  |  04  04   DTI    O    unite logique non prete, formatage en cours           |
  |  05  00   DTI WRSOMC  l'unite logique ne repond pas a la selection          |
  |  06  00   D   WR OM   pas de position de reference trouvee                  |
  |  07  00   DTI WRSOM   selection de plusieurs peripheriques                  |
  |  08  00   DTI WRSOMC  echec de communication avec l'unite logique           |
  |  08  01   DTI WRSOMC  timeout de communication avec l'unite logique         |
  |  08  02   DTI WRSOMC  erreur de parite en communication avec l'unite logique|
  |  09  00   DT  WR O    erreur de suivi de piste                              |
  |  09  01       WR O    defaillance du servo de suivi de piste                |
  |  09  02       WR O    defaillance du servo de focalisation                  |
  |  09  03       WR O    defaillance du servo de SPINDLE                       |
  +=============================================================================+

  Table 364 : (suite)
  +=============================================================================+
  |           D - peripherique a acces Direct (Disque)                          |
  |           .T - peripherique a acces sequenTiel (bande magneTique)           |
  |           . I - Imprimante                                                  |
  |           .  P - Processeur                                                 |
  |           .  .W -WORM (CD-ROM inscriptible une fois)                        |
  |           .  . R - CD-ROM (lecture seule)                                   |
  |           .  .  S - Scanner ou numeriseur                                   |
  |           .  .  .O - memoire Optique                                        |
  |           .  .  . M - changeur de Media                                     |
  |           .  .  .  C - peripherique de Communications                       |
  |           .  .  .  .                                                        |
  | ASC ASCQ  DTIPWRSOMC  DESCRIPTION                                           |
  | --- ----              ----------------------------------------------------- |
  |  0A  00   DTIPWRSOMC  debordement de la trace d'erreur                      |
  |  0B  00                                                                     |
  |  0C  00    T     S    erreur d'ecriture                                     |
  |  0C  01   D   W  O    erreud d'ecriture corrigee par auto-reallocation      |
  |  0C  02   D   W  O    erreur d'ecriture - auto-reallocation impossible      |
  |  0D  00                                                                     |
  |  0E  00                                                                     |
  |  0F  00                                                                     |
  |  10  00   D   W  O    erreur ID, CRC ou ECC                                 |
  |  11  00   DT  WRSO    erreur de lecture irrecuperable                       |
  |  11  01   DT  W SO    nombre d'essais atteint                               |
  |  11  02   DT  W SO    erreur trop longue a corriger                         |
  |  11  03   DT  W SO    erreurs de lecture multiples                          |
  |  11  04   D   W  O    erreur de lecture - auto-reallocation impossible      |
  |  11  05       WR O    erreur irrecuperable L-EC                             |
  |  11  06       WR O    erreur irrecuperable CIRC                             |
  |  11  07       W  O    erreur de resynchronisation de donnees                |
  |  11  08    T          lecture de bloc incomplete                            |
  |  11  09    T          pas de breche trouvee                                 |
  |  11  0A   DT     O    erreur mal corrigee                                   |
  |  11  0B   D   W  O    erreur de lecture - reassignement recommande          |
  |  11  0C   D   W  O    erreur de lecture - reecriture recommandee            |
  |  12  00   D   W  O    marque d'adresse introuvable pour le champ ID         |
  |  13  00   D   W  O    marque d'adresse introuvable pour le champ donnees    |
  |  14  00   DTI WRSO    identite enregistree introuvable                      |
  |  14  01   DT  WR O    enregistrement introuvable                            |
  |  14  02    T          marque de fichier ou de jeu introuvable               |
  |  14  03    T          fin de donnees introuvable                            |
  |  14  04    T          erreur de sequence de bloc                            |
  |  15  00   DTI WRSOM   erreur de positionnement aleatoire                    |
  |  15  01   DTI WRSOM   erreur de positionnement mecanique                    |
  |  15  02   DT  WR O    erreur de positionnement detectee par la lecture      |
  |  16  00   DW     O    erreur de marque de synchronisation de donnees        |
  |  17  00   DT  WRSO    donnees recuperees sans correction d'erreur           |
  |  17  01   DT  WRSO    donnees recuperees apres plusieurs essais             |
  |  17  02   DT  WR O    donnees recuperees avec un decalage de tete positif   |
  |  17  03   DT  WR O    donnees recuperees avec un decalage de tete negatif   |
  |  17  04       WR O    donnees recuperees avec plusieurs essais et/ou CIRC   |
  |  17  05   D   WR O    donnees recuperees sur l'ID de secteur precedent      |
  |  17  06   D   W  O    donnees recuperees sans ECC - donnees auto-reallouees |
  |  17  07   D   W  O    donnees recuperees sans ECC - reassignement recommande|
  |  17  08   D   W  O    donnees recuperees sans ECC - reecriture recommandee  |
  |  18  00   DT  WR O    donnees recuperees avec correction d'erreur           |
  |  18  01   D   WR O    donnees recuperees avec correction & plusieurs essais |
  |  18  02   D   WR O    donnees recuperees - donnees auto-reallouees          |
  |  18  03        R      donnees recuperees avec CIRC                          |
  |  18  04        R      donnees recuperees avec LEC                           |
  |  18  05   D   WR O    donnees recuperees - reassignement recommande         |
  |  18  06   D   WR O    donnees recuperees - reecriture recommandee           |
  +=============================================================================+

       Table 364 : (suite)
       +=============================================================================+
       |           D - peripherique a acces Direct (Disque)                          |
       |           .T - peripherique a acces sequenTiel (bande magneTique)           |
       |           . I - Imprimante                                                  |
       |           .  P - Processeur                                                 |
       |           .  .W -WORM (CD-ROM inscriptible une fois)                        |
       |           .  . R - CD-ROM (lecture seule)                                   |
       |           .  .  S - Scanner ou numeriseur                                   |
       |           .  .  .O - memoire Optique                                        |
       |           .  .  . M - changeur de Media                                     |
       |           .  .  .  C - peripherique de Communications                       |
       |           .  .  .  .                                                        |
       | ASC ASCQ  DTIPWRSOMC  DESCRIPTION                                           |
       | --- ----              ----------------------------------------------------- |
       |  19  00   D      O    erreur de liste de defauts                            |
       |  19  01   D      O    liste de defauts indisponible                         |
       |  19  02   D      O    erreur de liste de defauts en liste primaire          |
       |  19  03   D      O    erreur de liste de defauts en liste secondaire (grown)|
       |  1A  00   DTIPWRSOMC  erreur de taille de la liste de defauts               |
       |  1B  00   DTIPWRSOMC  erreur de transfert de donnees synchrone              |
       |  1C  00   D      O    liste de defauts introuvable                          |
       |  1C  01   D      O    liste de defauts primaire introuvable                 |
       |  1C  02   D      O    liste de defauts secondaire (grown) introuvable       |
       |  1D  00   D   W  O    erreur de comparaison durant la verification          |
       |  1E  00   D   W  O    ID recupere avec ECC                                  |
       |  1F  00                                                                     |
       |  20  00   DTIPWRSOMC  code d'operation de commande incorrect                |
       |  21  00   DT  WR OM   adresse du bloc logique hors limites                  |
       |  21  01           M   adresse d'element incorrecte                          |
       |  22  00   D           fonction illegale (seulement 20 00, 24 00 ou 26 00)   |
       |  23  00                                                                     |
       |  24  00   DTIPWRSOMC  champ incorrect en CDB                                |
       |  25  00   DTIPWRSOMC  unite logique non supportee                           |
       |  26  00   DTIPWRSOMC  champ incorrect en liste de parametres                |
       |  26  01   DTIPWRSOMC  parametre non supporte                                |
       |  26  02   DTIPWRSOMC  valeur de parametre incorrecte                        |
       |  26  03   DTIPWRSOMC  parametres de seuil non supportes                     |
       |  27  00   DT  W  O    protection en ecriture                                |
       |  28  00   DTIPWRSOMC  transition non-pret/pret (changement de medium ?)     |
       |  28  01           M   acces a un element import ou export                   |
       |  29  00   DTIPWRSOMC  allumage, reinit. ou reinit. du bus a eu lieu         |
       |  2A  00   DTI WRSOMC  parametres changes                                    |
       |  2A  01   DTI WRSOMC  parametres de mode changes                            |
       |  2A  02   DTI WRSOMC  parametres de trace changes                           |
       |  2B  00   DTIPWRSO C  copie impossible : deconnexion du host impossible     |
       |  2C  00   DTIPWRSOMC  erreur de sequence de commandes                       |
       |  2C  01         S     trop de fenetres specifiees                           |
       |  2C  02         S     combinaison de fenetres incorrecte specifiee          |
       |  2D  00    T          erreur d'ecriture en ecrasement de donnees            |
       |  2E  00                                                                     |
       |  2F  00   DTIPWRSOMC  commandes annulees par un autre initiateur            |
       |  30  00   DT  WR OM   medium incompatible present                           |
       |  30  01   DT  WR O    medium illisible - format inconnu                     |
       |  30  02   DT  WR O    medium illisible - format incompatible                |
       |  30  03   DT          cartouche de nettoyage presente                       |
       |  31  00   DT  W  O    format du medium endommage                            |
       |  31  01   D I    O    echec de la commande de format                        |
       |  32  00   D   W  O    plus d'emplacement de defaut disponible               |
       |  32  01   D   W  O    echec de mise a jour de la liste de defauts           |
       |  33  00    T          erreur de longueur de bande                           |
       |  34  00                                                                     |
       |  35  00                                                                     |
       |  36  00     I         manque d'encre, de ruban ou de toner                  |
       +=============================================================================+

       Table 364 : (suite)
       +=============================================================================+
       |           D - peripherique a acces Direct (Disque)                          |
       |           .T - peripherique a acces sequenTiel (bande magneTique)           |
       |           . I - Imprimante                                                  |
       |           .  P - Processeur                                                 |
       |           .  .W -WORM (CD-ROM inscriptible une fois)                        |
       |           .  . R - CD-ROM (lecture seule)                                   |
       |           .  .  S - Scanner ou numeriseur                                   |
       |           .  .  .O - memoire Optique                                        |
       |           .  .  . M - changeur de Media                                     |
       |           .  .  .  C - peripherique de Communications                       |
       |           .  .  .  .                                                        |
       | ASC ASCQ  DTIPWRSOMC  DESCRIPTION                                           |
       | --- ----              ----------------------------------------------------- |
       |  37  00   DTI WRSOMC  parametre arrondi                                     |
       |  38  00                                                                     |
       |  39  00   DTI WRSOMC  sauvegarde de parametres non supportee                |
       |  3A  00   DTI WRSOM   pas de medium                                         |
       |  3B  00    TI         erreur de positionnement sequentiel                   |
       |  3B  01    T          erreur de positionnement de la bande au debut         |
       |  3B  02    T          erreur de positionnement de la bande a la fin         |
       |  3B  03     I         bande ou feuille-a-feuille non pret                   |
       |  3B  04     I         erreur de SLEW (NdT : !?)                             |
       |  3B  05     I         bourrage papier                                       |
       |  3B  06     I         haut de page non detecte                              |
       |  3B  07     I         bas  de page non detecte                              |
       |  3B  08    T          erreur de repositionnement                            |
       |  3B  09         S     lecture apres la fin du medium                        |
       |  3B  0A         S     lecture avant le debut du medium                      |
       |  3B  0B         S     position apres la fin du medium                       |
       |  3B  0C         S     position avant le debut du medium                     |
       |  3B  0D           M   emplacement de destination occupe                     |
       |  3B  0E           M   emplacement d'origine vide                            |
       |  3C  00                                                                     |
       |  3D  00   DTIPWRSOMC  bits incorrects dans le message d'identification      |
       |  3E  00   DTIPWRSOMC  auto-configuration de l'unite non encore realisee     |
       |  3F  00   DTIPWRSOMC  les conditions de fonctionnement ont change           |
       |  3F  01   DTIPWRSOMC  le micro-code a ete change                            |
       |  3F  02   DTIPWRSOMC  definition de fonctionnement modifiee                 |
       |  3F  03   DTIPWRSOMC  les donnees de requete ont change                     |
       |  40  00   D           defaillance RAM (40nn obligatoire)                    |
       |  40  NN   DTIPWRSOMC  echec de diagnostic du composant nn (80h-FFh)         |
       |  41  00   D           echec du chemin de donnees (40nn obligatoire)         |
       |  42  00   D           echec d'alllumage ou d'auto-test (40nn obligatoire)   |
       |  43  00   DTIPWRSOMC  erreur de message                                     |
       |  44  00   DTIPWRSOMC  defaillance de cible interne                          |
       |  45  00   DTIPWRSOMC  echec de selection ou de reselection                  |
       |  46  00   DTIPWRSOMC  echec de la reinitialisation logicielle               |
       |  47  00   DTIPWRSOMC  erreur de parite SCSI                                 |
       |  48  00   DTIPWRSOMC  reception de message d'erreur detecte par initiateur  |
       |  49  00   DTIPWRSOMC  erreur message incorrect                              |
       |  4A  00   DTIPWRSOMC  erreur de phase de commande                           |
       |  4B  00   DTIPWRSOMC  erreur de phase de donnees                            |
       |  4C  00   DTIPWRSOMC  echec de l'auto-configuration de l'unite logique      |
       |  4D  00                                                                     |
       |  4E  00   DTIPWRSOMC  commandes en recouvrement                             |
       |  4F  00                                                                     |
       |  50  00    T          erreur d'ecriture en ajout                            |
       |  50  01    T          erreur de positionnement en ajout                     |
       |  50  02    T          erreur de positionnement par rapport au timing        |
       |  51  00    T     O    erreur d'effacement                                   |
       |  52  00    T          defaut de cartouche                                   |
       +=============================================================================+

       Table 364 : (suite)
       +=============================================================================+
       |           D - peripherique a acces Direct (Disque)                          |
       |           .T - peripherique a acces sequenTiel (bande magneTique)           |
       |           . I - Imprimante                                                  |
       |           .  P - Processeur                                                 |
       |           .  .W -WORM (CD-ROM inscriptible une fois)                        |
       |           .  . R - CD-ROM (lecture seule)                                   |
       |           .  .  S - Scanner ou numeriseur                                   |
       |           .  .  .O - memoire Optique                                        |
       |           .  .  . M - changeur de Media                                     |
       |           .  .  .  C - peripherique de Communications                       |
       |           .  .  .  .                                                        |
       | ASC ASCQ  DTIPWRSOMC  DESCRIPTION                                           |
       | --- ----              ----------------------------------------------------- |
       |  53  00   DTI WRSOM   echec de chargement ou d'ejection du medium           |
       |  53  01    T          echec de dechargement de la bande                     |
       |  53  02   DT  WR OM   peripherique protege contre le changement de medium   |
       |  54  00      P        defaillance de l'interface host-SCSI                  |
       |  55  00      P        defaut de ressources systeme                          |
       |  56  00                                                                     |
       |  57  00        R      impossible de recuperer la table du contenu           |
       |  58  00          O    la generation n'existe pas                            |
       |  59  00          O    lecture de bloc mis a jour                            |
       |  5A  00   DTIPWRSOM   requete operateur ou demande de changement d'etat     |
       |  5A  01   DT  WR OM   requete operateur d'extraction du medium              |
       |  5A  02   DT  W  O    l'operateur a selectionne la protection en ecriture   |
       |  5A  03   DT  W  O    l'operateur a selectionne l'autorisation d'ecriture   |
       |  5B  00   DTIPWRSOM   exception de trace                                    |
       |  5B  01   DTIPWRSOM   condition de seuil remplie                            |
       |  5B  02   DTIPWRSOM   compteur de trace au maximum                          |
       |  5B  03   DTIPWRSOM   plus de code pour la liste de trace                   |
       |  5C  00   D      O    changement d'etat RPL                                 |
       |  5C  01   D      O    SPINDLES synchronisees                                |
       |  5C  02   D      O    SPINDLES non synchronisees                            |
       |  5D  00                                                                     |
       |  5E  00                                                                     |
       |  5F  00                                                                     |
       |  60  00         S     defaillance de la lampe                               |
       |  61  00         S     erreur d'acquisition video                            |
       |  61  01         S     impossible de capturer la video                       |
       |  61  02         S     hors de la zone focalisee                             |
       |  62  00         S     erreur de positionnement de la tete de digitalisation |
       |  63  00        R      fin de zone utilisateur sur cette piste               |
       |  64  00        R      mode illegal pour cette piste                         |
       |  65  00                                                                     |
       |  66  00                                                                     |
       |  67  00                                                                     |
       |  68  00                                                                     |
       |  69  00                                                                     |
       |  6A  00                                                                     |
       |  6B  00                                                                     |
       |  6C  00                                                                     |
       |  6D  00                                                                     |
       |  6E  00                                                                     |
       |  6F  00                                                                     |
       +=============================================================================+

  Table 364 : (fin)
  +=============================================================================+
  |           D - peripherique a acces Direct (Disque)                          |
  |           .T - peripherique a acces sequenTiel (bande magneTique)           |
  |           . I - Imprimante                                                  |
  |           .  P - Processeur                                                 |
  |           .  .W -WORM (CD-ROM inscriptible une fois)                        |
  |           .  . R - CD-ROM (lecture seule)                                   |
  |           .  .  S - Scanner ou numeriseur                                   |
  |           .  .  .O - memoire Optique                                        |
  |           .  .  . M - changeur de Media                                     |
  |           .  .  .  C - peripherique de Communications                       |
  |           .  .  .  .                                                        |
  | ASC ASCQ  DTIPWRSOMC  DESCRIPTION                                           |
  | --- ----              ----------------------------------------------------- |
  |  70  00                                                                     |
  |  71  00                                                                     |
  |  72  00                                                                     |
  |  73  00                                                                     |
  |  74  00                                                                     |
  |  75  00                                                                     |
  |  76  00                                                                     |
  |  77  00                                                                     |
  |  78  00                                                                     |
  |  79  00                                                                     |
  |  7A  00                                                                     |
  |  7B  00                                                                     |
  |  7C  00                                                                     |
  |  7D  00                                                                     |
  |  7E  00                                                                     |
  |  7F  00                                                                     |
  |                                                                             |
  |  80  xxh \                                                                  |
  |   jusqu'a >  specifique constructeur                                        |
  |  FF  xxh /                                                                  |
  |                                                                             |
  |  xxh 80 \                                                                   |
  |  jusqu'a >  qualification du standard ASC specifique constructeur           |
  |  xxh FF /                                                                   |
  |              TOUS LES CODES VIDES OU NON MONTRES SONT RESERVES              |
  +=============================================================================+

  WW..  RReeffeerreennccee rraappiiddee ddeess ccoommmmaannddeess SSCCSSII

  La table 365 est une liste ordonnee numeriquement des codes  operation
  des commandes.

                          Table 365 : Codes operations SCSI-2

  +=============================================================================+
  |           D - peripherique a acces Direct               Clef de colonne     |
  |           .T - peripherique a acces sequenTiel          N = Necessaire      |
  |           . I - Imprimante                              O = Optionnel       |
  |           .  P - Processeur                             C = Constructeur    |
  |           .  .W -WORM (CD-ROM inscriptible une fois)    R = Reserve         |
  |           .  . R - CD-ROM (lecture seule)                                   |
  |           .  .  S - Scanner ou numeriseur                                   |
  |           .  .  .O - memoire Optique                                        |
  |           .  .  . M - changeur de Media                                     |
  |           .  .  .  C - peripherique de Communications                       |
  |           .  .  .  .                                                        |
  |        OP DTIPWRSOMC Description                                            |
  |----------+----------+-------------------------------------------------------|
  |        00 NNNNNNNNNN test d'unite prete                                     |
  |        01  N         rembobinage                                            |
  |        01 O C OO OO  remise a zero de l'unite                               |
  |        02 CCCCCC  C                                                         |
  |        03 NNNNNNNNNN requete de buffer SCSI                                 |
  |        04   O        formatage                                              |
  |        04 N      O   formatage de l'unite                                   |
  |        05 CNCCCC  C  lecture des limites de bloc                            |
  |        06 CCCCCC  C                                                         |
  |        07         O  initialisation de l'etat d'un element                  |
  |        07 OCC O  OC  reassignation de blocs                                 |
  |        08          N lecture de message (06)                                |
  |        08 ONC OO OC  lecture (06)                                           |
  |        08    O       reception                                              |
  |        09 CCCCCC  C                                                         |
  |        0A   N        impression                                             |
  |        0A          N emission de message (06)                               |
  |        0A    N       emission (06)                                          |
  |        0A ON  O  OC  ecriture (06)                                          |
  |        0B O   OO OC  deplacement (06)                                       |
  |        0B   O        SLEW et impression                                     |
  |        0C CCCCCC  C                                                         |
  |        0D CCCCCC  C                                                         |
  |        0E CCCCCC  C                                                         |
  |        0F COCCCC  C  lecture inversee                                       |
  |        10   O O      synchronisation du tampon                              |
  |        10 CN CCC     ecriture de marques de fichiers                        |
  |        11 CNCCCC     espace                                                 |
  |        12 NNNNNNNNNN requete                                                |
  |        13 COCCCC     verification (06)                                      |
  |        14 COOCCC     recuperation des donnees bufferisees                   |
  |        15 ONO OOOOOO selection de mode (06)                                 |
  |        16 N   NN NO  reservation                                            |
  |        16  NN   N    reservation d'unite                                    |
  |        17 N   NN NO  liberation                                             |
  |        17  NN   N    liberation d'unite                                     |
  |        18 OOOOOOOO   copie                                                  |
  |        19 CNCCCC     effacement                                             |
  |        1A ONO OOOOOO lecture du buffer SCSI (06)                            |
  |        1B  O         chargement dechargement                                |
  |        1B       O    digitalisation                                         |
  |        1B   O        arret d'impression                                     |
  |        1B O   OO O   arret demarrage de l'unite                             |
  +=============================================================================+

  Table 365 : (suite)
  +=============================================================================+
  |           D - peripherique a acces Direct               Clef de colonne     |
  |           .T - peripherique a acces sequenTiel          N = Necessaire      |
  |           . I - Imprimante                              O = Optionnel       |
  |           .  P - Processeur                             C = Constructeur    |
  |           .  .W -WORM (CD-ROM inscriptible une fois)    R = Reserve         |
  |           .  . R - CD-ROM (lecture seule)                                   |
  |           .  .  S - Scanner ou numeriseur                                   |
  |           .  .  .O - memoire Optique                                        |
  |           .  .  . M - changeur de Media                                     |
  |           .  .  .  C - peripherique de Communications                       |
  |           .  .  .  .                                                        |
  |        OP DTIPWRSOMC Description                                            |
  |----------+----------+-------------------------------------------------------|
  |        1C OOOOOOOOOO reception des resultats du diagnostic                  |
  |        1D NNNNNNNNNN emission de diagnostic                                 |
  |        1E OO  OO OO  protection contre l'enlevement du medium               |
  |        1F                                                                   |
  |        20 C   CC C                                                          |
  |        21 C   CC C                                                          |
  |        22 C   CC C                                                          |
  |        23 C   CC C                                                          |
  |        24 C   CCN    definition de fenetre                                  |
  |        25       O    lecture de fenetre                                     |
  |        25 N   N  N   lecture de capacite                                    |
  |        25      N     lecture de capacite de cd-rom                          |
  |        26 C   CC                                                            |
  |        27 C   CC                                                            |
  |        28          O lecture de message (10)                                |
  |        28 N   NNNN   lecture (10)                                           |
  |        29 C   CC O   lecture de generation                                  |
  |        2A          O emission de message (10)                               |
  |        2A       O    emission (10)                                          |
  |        2A N   N  N   ecriture (10)                                          |
  |        2B  O         localisation                                           |
  |        2B         O  positionnement sur element                             |
  |        2B O   OO O   deplacement (10)                                       |
  |        2C C      O   effacement (10)                                        |
  |        2D C   O  O   lecture de bloc mis a jour                             |
  |        2E O   O  O   lecture et verification (10)                           |
  |        2F O   OO O   verification (10)                                      |
  |        30 O   OO O   lecture de donnee haute (10)                           |
  |        31       O    position d'objet                                       |
  |        31 O   OO O   recherche de donnee egale (10)                         |
  |        32 O   OO O   recherche de donnee basse (10)                         |
  |        33 O   OO O   definition de limites (10)                             |
  |        34       O    lecture de l'etat du tampon de donnees                 |
  |        34 O   OO O   pre-lecture                                            |
  |        34  O         lecture de position                                    |
  |        35 O   OO O   synchronisation du cache                               |
  |        36 O   OO O   verrouillage/deverrouillage du cache                   |
  |        37 O      O   lecture de donnees defectueuses (10)                   |
  |        38     O  O   digitalisation du medium                               |
  |        39 OOOOOOOO   comparaison                                            |
  |        3A OOOOOOOO   copie et verification                                  |
  |        3B OOOOOOOOOO ecriture de tampon                                     |
  |        3C OOOOOOOOOO lecture de tampon                                      |
  |        3D     O  O   mise a jour de bloc                                    |
  |        3E O   OO O   lecture longue                                         |
  |        3F O   O  O   ecriture longue                                        |
  +=============================================================================+

       Table 365 : (suite)
       +=============================================================================+
       |           D - peripherique a acces Direct               Clef de colonne     |
       |           .T - peripherique a acces sequenTiel          N = Necessaire      |
       |           . I - Imprimante                              O = Optionnel       |
       |           .  P - Processeur                             C = Constructeur    |
       |           .  .W -WORM (CD-ROM inscriptible une fois)    R = Reserve         |
       |           .  . R - CD-ROM (lecture seule)                                   |
       |           .  .  S - Scanner ou numeriseur                                   |
       |           .  .  .O - memoire Optique                                        |
       |           .  .  . M - changeur de Media                                     |
       |           .  .  .  C - peripherique de Communications                       |
       |           .  .  .  .                                                        |
       |        OP DTIPWRSOMC Description                                            |
       |----------+----------+-------------------------------------------------------|
       |        40 OOOOOOOOOO changement de definition                               |
       |        41 O          ecriture identique                                     |
       |        42      O     lecture de sous-canal                                  |
       |        43      O     lecture du TOC                                         |
       |        44      O     lecture d'en-tete                                      |
       |        45      O     lecture audio (10)                                     |
       |        46                                                                   |
       |        47      O     lecture audio MSF                                      |
       |        48      O     lecture d'index de piste audio                         |
       |        49      O     lecture de piste relative (10)                         |
       |        4A                                                                   |
       |        4B      O     reprise de pause                                       |
       |        4C OOOOOOOOOO trace de selection                                     |
       |        4D OOOOOOOOOO trace du buffer SCSI                                   |
       |        4E                                                                   |
       |        4F                                                                   |
       |        50                                                                   |
       |        51                                                                   |
       |        52                                                                   |
       |        53                                                                   |
       |        54                                                                   |
       |        55 OOO OOOOOO mode de selection (10)                                 |
       |        56                                                                   |
       |        57                                                                   |
       |        58                                                                   |
       |        59                                                                   |
       |        5A OOO OOOOOO mode du buffer SCSI (10)                               |
       |        5B                                                                   |
       |        5C                                                                   |
       |        5D                                                                   |
       |        5E                                                                   |
       |        5F                                                                   |
       +=============================================================================+

  Table 365 : (fin)
  +=============================================================================+
  |           D - peripherique a acces Direct               Clef de colonne     |
  |           .T - peripherique a acces sequenTiel          N = Necessaire      |
  |           . I - Imprimante                              O = Optionnel       |
  |           .  P - Processeur                             C = Constructeur    |
  |           .  .W -WORM (CD-ROM inscriptible une fois)    R = Reserve         |
  |           .  . R - CD-ROM (lecture seule)                                   |
  |           .  .  S - Scanner ou numeriseur                                   |
  |           .  .  .O - memoire Optique                                        |
  |           .  .  . M - changeur de Media                                     |
  |           .  .  .  C - peripherique de Communications                       |
  |           .  .  .  .                                                        |
  |        OP DTLPWRSOMC Description                                            |
  |----------+----------+-------------------------------------------------------|
  |        A0                                                                   |
  |        A1                                                                   |
  |        A2                                                                   |
  |        A3                                                                   |
  |        A4                                                                   |
  |        A5         N  deplacement de medium                                  |
  |        A5      O     lecture audio (12)                                     |
  |        A6         O  changement de medium                                   |
  |        A7                                                                   |
  |        A8          O lecture de message (12)                                |
  |        A8     OO O   lecture (12)                                           |
  |        A9      O     lecture de piste relative (12)                         |
  |        AA          O emission de message (12)                               |
  |        AA     O  O   ecriture (12)                                          |
  |        AB                                                                   |
  |        AC        O   effacement (12)                                        |
  |        AD                                                                   |
  |        AE     O  O   ecriture et verification (12)                          |
  |        AF     OO O   verification (12)                                      |
  |        B0     OO O   recherche de donnee haute (12)                         |
  |        B1     OO O   recherche de donnee egale (12)                         |
  |        B2     OO O   recherche de donnee basse (12)                         |
  |        B3     OO O   definition des limites (12)                            |
  |        B4                                                                   |
  |        B5                                                                   |
  |        B5         O  demande d'adresse d'element volume                     |
  |        B6                                                                   |
  |        B6         O  emission de TAG de volume                              |
  |        B7        O   lecture des donnees de defauts (12)                    |
  |        B8                                                                   |
  |        B8         O  lecture de l'etat d'element                            |
  |        B9                                                                   |
  |        BA                                                                   |
  |        BB                                                                   |
  |        BC                                                                   |
  |        BD                                                                   |
  |        BE                                                                   |
  |        BF                                                                   |
  +=============================================================================+

  XX..  PPrrooggrraammmmeess dd''eexxeemmppllee

  Voici  le  programme  exemple  en  C qui demande le constructeur et le
  modele et indique si un medium est charge dans le peripherique.

  #define DEVICE "/dev/sgc"
  /* Programme de demonstration de l'interface SCSI generique */
  #include <stdio.h>
  #include <unistd.h>
  #include <string.h>
  #include <fcntl.h>
  #include <errno.h>
  #include <scsi/sg.h>

  #define SCSI_OFF sizeof(struct sg_header)
  static unsigned char cmd[SCSI_OFF + 18];        /* tampon de commandes SCSI */
  int     fd;                          /* descripteur de periph./fichier SCSI */

  /* traite une commande SCSI complete. Utilise l'interface SCSI generique */

  static int handle_scsi_cmd(unsigned cmd_len,         /* longueur */
                             unsigned in_size,         /* taille data IN */
                             unsigned char *i_buff,    /* tampon IN */
                             unsigned out_size,        /* taille data OUT */
                             unsigned char *o_buff     /* tampon OUT */
                             )
  {
      int status = 0;
      struct sg_header *sg_hd;

      /* quelques controles de routine */
      if (!cmd_len) return -1;            /* cmd_len doit etre != 0 */
      if (!i_buff) return -1;             /* tampon IN doit etre != NULL */
  #ifdef SG_BIG_BUFF
      if (SCSI_OFF + cmd_len + in_size > SG_BIG_BUFF) return -1;
      if (SCSI_OFF + out_size > SG_BIG_BUFF) return -1;
  #else
      if (SCSI_OFF + cmd_len + in_size > 4096) return -1;
      if (SCSI_OFF + out_size > 4096) return -1;
  #endif

      if (!o_buff) out_size = 0;

      /* construction de l'en-tete du pilote generique */
      sg_hd = (struct sg_header *) i_buff;
      sg_hd->reply_len   = SCSI_OFF + out_size;
      sg_hd->twelve_byte = cmd_len == 12;
      sg_hd->result = 0;
  #if     0
      sg_hd->pack_len    = SCSI_OFF + cmd_len + in_size; /* pas indispensable */
      sg_hd->pack_id;     /* inutilise */
      sg_hd->other_flags; /* inutilise */
  #endif

      /* envoi de la commande */
      status = write( fd, i_buff, SCSI_OFF + cmd_len + in_size );
      if ( status < 0 || status != SCSI_OFF + cmd_len + in_size ||
                         sg_hd->result ) {
          /* une erreur s'est produite */
          fprintf( stderr, "ecriture (generique) resultat = 0x%x cmd = 0x%x\n",
                      sg_hd->result, i_buff[SCSI_OFF] );
          perror("");
          return status;
      }

      if (!o_buff) o_buff = i_buff;       /* controle du pointeur du tampon */

      /* recuperation du resultat */
      status = read( fd, o_buff, SCSI_OFF + out_size);
      if ( status < 0 || status != SCSI_OFF + out_size || sg_hd->result ) {
          /* une erreur s'est produite */
          fprintf( stderr, "lecture (generique) resultat = 0x%x cmd = 0x%x\n",
                  sg_hd->result, o_buff[SCSI_OFF] );
          fprintf( stderr, "read(generic) sense "
                  "%x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\n",
                  sg_hd->sense_buffer[0],         sg_hd->sense_buffer[1],
                  sg_hd->sense_buffer[2],         sg_hd->sense_buffer[3],
                  sg_hd->sense_buffer[4],         sg_hd->sense_buffer[5],
                  sg_hd->sense_buffer[6],         sg_hd->sense_buffer[7],
                  sg_hd->sense_buffer[8],         sg_hd->sense_buffer[9],
                  sg_hd->sense_buffer[10],        sg_hd->sense_buffer[11],
                  sg_hd->sense_buffer[12],        sg_hd->sense_buffer[13],
                  sg_hd->sense_buffer[14],        sg_hd->sense_buffer[15]);
          if (status < 0)
              perror("");
      }
      /* Voyons si nous avons ce que nous attendions */
      if (status == SCSI_OFF + out_size) status = 0; /* on a tout */

      return status;  /* 0 indique que tout est OK */
  }

  #define INQUIRY_CMD     0x12
  #define INQUIRY_CMDLEN  6
  #define INQUIRY_REPLY_LEN 96
  #define INQUIRY_VENDOR  8    /* Decalage sur le constructeur dans la reponse */

  /* On demande le constructeur et le modele */
  static unsigned char *Inquiry ( void )
  {
    unsigned char Inqbuffer[ SCSI_OFF + INQUIRY_REPLY_LEN ];
    unsigned char cmdblk [ INQUIRY_CMDLEN ] =
        { INQUIRY_CMD,  /* commande */
                    0,  /* lun/reserve */
                    0,  /* code page */
                    0,  /* reserve */
    INQUIRY_REPLY_LEN,  /* longueur d'allocation */
                    0 };/* reserve/drapeau/lien */

    memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) );

    /*
     * +------------------+
     * | struct sg_header | <- cmd
     * +------------------+
     * | copie de cmdblk  | <- cmd + SCSI_OFF
     * +------------------+
     */

    if (handle_scsi_cmd(sizeof(cmdblk), 0, cmd,
                        sizeof(Inqbuffer) - SCSI_OFF, Inqbuffer )) {
        fprintf( stderr, "Echec de la demande\n" );
        exit(2);
    }
    return (Inqbuffer + SCSI_OFF);
  }

  #define TESTUNITREADY_CMD 0
  #define TESTUNITREADY_CMDLEN 6

  #define ADD_SENSECODE 12
  #define ADD_SC_QUALIFIER 13
  #define NO_MEDIA_SC 0x3a
  #define NO_MEDIA_SCQ 0x00
  int TestForMedium ( void )
  {
    /* demande de l'etat READY */
    static unsigned char cmdblk [TESTUNITREADY_CMDLEN] = {
        TESTUNITREADY_CMD, /* commande */
                        0, /* lun/reserve */
                        0, /* reserve */
                        0, /* reserve */
                        0, /* reserve */
                        0};/* reserve */

    memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) );

    /*
     * +------------------+
     * | struct sg_header | <- cmd
     * +------------------+
     * | copie de cmdblk  | <- cmd + SCSI_OFF
     * +------------------+
     */

    if (handle_scsi_cmd(sizeof(cmdblk), 0, cmd,
                              0, NULL)) {
        fprintf (stderr, "Echec du test d'unite prete\n");
        exit(2);
    }

    return
     *(((struct sg_header*)cmd)->sense_buffer +ADD_SENSECODE) !=
                                                          NO_MEDIA_SC ||
     *(((struct sg_header*)cmd)->sense_buffer +ADD_SC_QUALIFIER) !=
                                                          NO_MEDIA_SCQ;
  }

  void main( void )
  {
    fd = open(DEVICE, O_RDWR);
    if (fd < 0) {
      fprintf( stderr, "Il faut les droits lecture/ecriture sur "DEVICE".\n" );
      exit(1);
    }

    /* on ecrit quelques champs du resultat de la requete */
    printf( "%s\n", Inquiry() + INQUIRY_VENDOR );

    /* on regarde si le medium est charge */
    if (!TestForMedium()) {
      printf("pas de medium charge\n");
    } else {
      printf("un medium est present\n");
    }
  }

  SMB HOWTO
  David Wood, dwood@plugged.net.au
  arn@multimania.com, 28 Avril 1997.
  v1.0, 10 Aot 1996

  Voici le SMB-HOWTO, dcrivant comment utiliser sous Linux le protocole
  SMB ( Session Message Block ) galement appel le protocole NetBIOS
  ou LanManager.
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Pour plus d'informations

  3. Installation

  4. Lancer les daemons

  5. Configuration gnrale (/etc/smb.conf)

  6. Partager un lecteur Linux avec des machines Windows

  7. Partager un rpertoire Windows pour des machines Linux

  8. Partager une imprimante Linux pour des stations Windows

  9. Partager une imprimante Windows pour des clients Linux

  10. Copyright

  11. Remerciements



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Voici le SMB-HOWTO, dcrivant comment utiliser sous Linux le protocole
  SMB ( Session Message Block ) galement appel le protocole NetBIOS
  ou LanManager.

  Ce document est maintenu par David Wood (dwood@plugged.net.au).
  Veuillez envoyer vos ajouts, modifications ou corrections  cette
  adresse, pour qu'ils soient inclus dans la version suivante.

  Le protocole SMB est utilis par Microsoft Windows 3.11, NT et 95 pour
  partager des disques et des imprimantes. En utilisant les outils Samba
  d'Andrew Tridgell, les systmes Unix (Linux inclus) peuvent galement
  partager des disques et des imprimantes avec des htes Windows.

  Vous pouvez faire quatre choses avec Samba :


  1. Partager un disque Linux pour des machines Windows ;

  2. Accder  disque Windows depuis une machine Linux ;

  3. Partager une imprimante Linux pour des machines Windows ;

  4. Utiliser une imprimante Windows  partir d'un hte Linux.


  Tous ces points sont abords dans ce document.

  Mise en garde : Les procdures dcrites et les scripts prsents
  fonctionnent pour l'auteur ou les personnes qui les ont crits. Les
  informations donnes dans ce document peuvent ne pas fonctionner sur
  une configuration diffrente. Si vous rencontrez un problme, crivez
  un mail  l'auteur avec vos suggestions pour l'amlioration de ce
  document, mais l'auteur ne garantit rien. Qu'attendiez-vous ? Aprs
  tout, l'auteur n'est qu'un consultant...


  22..  PPoouurr pplluuss dd''iinnffoorrmmaattiioonnss

  Cet HOWTO tente d'expliquer comment configurer de manire basique les
  services SMB de partage de fichier et d'imprimantes sous Linux. Samba
  est un ensemble de programme trs complet, et trs complexe galement.
  Cela ne servirait  rien de recopier la documentation de Samba dans ce
  document.

  Pour de plus amples informations, veuillez vous rfrer aux documents
  suivants :


    La documentation de Samba, disponible au sein de la distribution de
     Samba. Cette distribution est disponible  :
     ftp://nimbus.anu.edu.au/pub/tridge/samba/
     <ftp://nimbus.anu.edu.au/pub/tridge/samba/>
     rcuprer les sources de Samba sur ftp.ibp.fr

    Le Printing-HOWTO.

    Le Print2Win Mini-HOWTO.



  33..  IInnssttaallllaattiioonn

  Les sources de la dernire version de Samba sont disponibles sur :

  ftp://nimbus.anu.edu.au/pub/tridge/samba/
  <ftp://nimbus.anu.edu.au/pub/tridge/samba/>

  Cependant, si vous avez install la distribution RedHat de Linux, vous
  pour pouvez l'installer comme paquetage. Certaines autres
  distributions proposent galement un paquetage Samba (NdT : dont
  Slackware et Debian).

  Les deux  daemons  suivant sont ncessaires pour Samba. Ils sont
  gnralement install dans le rpertoire /usr/sbin et sont lancs soit
  au dmarrage soit par inetd. Des scripts d'exemple sont prsents dans
  la section ``Lancer les daemons''.


     ssmmbbdd
        Le daemon SMB ;


     nnmmbbdd
        Propose le support du serveur de nom NetBIOS aux clients.

  En gnral, les binaires Samba suivant sont installs dans /usr/bin,
  bien que leur emplacement soit variable.


     ssmmbbcclliieenntt
        Un client SMB pour machines Unix ;
     ssmmbbpprriinntt
        Un script pour imprimer sur l'imprimante d'un hte SMB ;


     ssmmbbpprriinntt..ssyyssvv
        Comme ci-dessus, mais pour des Unix SVR4 ;


     ssmmbbssttaattuuss
        Liste les connexions SMB prsentes sur localhost ;


     ssmmbbrruunn
        Un script pour faciliter le lancement d'applications sur des
        htes SMB.

  De plus, un script nomm  print  est inclus dans cet HOWTO. Il sert
  d'interface au script smbprint.

  Le paquetage Samba est simple  installer. Il suffit de rcuprer les
  sources depuis les sites mentionns plus haut, et de lire les fichiers
  README fournis dans la distribution. Le fichier docs/INSTALL.txt
  fourni un ensemble d'instruction simple pour une configuration pas 
  pas.

  Installez les daemons dans /usr/sbin et les autres programmes dans
  /usr/bin. Installez les pages _m_a_n dans /usr/local/man.

  Lors de la compilation du paquetage Samba, vous avez d spcifier dans
  le Makefile l'emplacement du fichier de configuration, smb.conf. Il se
  trouve gnralement dans /etc, mais vous pouvez le placer o bon vous
  semble. Dans la suite du document, nous considrerons que ce fichier
  de configuration est /etc/smb.conf, que le fichier de log est
  /var/log/samba.log.%m (valeur de  logfile  dans le Makefile) et que
  le rpertoire des _l_o_c_k_s (verrous) est /var/lock/samba ( lock
  directory  dans le Makefile).

  Installez le fichier de configuration, smb.conf.  Allez dans le
  rpertoire dans lequel vous avez compil Samba. Consultez le fichier
  README dans le rpertoire examples/simple. Copiez le fichier smb.conf
  de ce rpertoire vers /etc. ATTENTION !  Si vous utilisez une
  distribution Linux et que vous avez dj install Samba, il doit dj
  exister un fichier smb.conf dans /etc. Vous devriez sans doute
  commencer avec celui-l.

  Si vous ne dsirez pas placer votre fichier de configuration dans
  /etc, mettez le dans le rpertoire que de votre choix, et faites un
  lien symbolique dans /etc :



       ln -s /path/vers/smb.conf /etc/smb.conf





  44..  LLaanncceerr lleess ddaaeemmoonnss

  Les deux daemons SMB sont /ust/sbin/smbd et /usr/sbin/nmb.

  Vous pouvez lancer les daemons Samba depuis l'inetd ou en tant que
  processus indpendants. Si vous tes en train de configurer un serveur
  de fichier, ils devraient tre lancs depuis l'inetd afin de pouvoir
  tre redmarrez s'ils sont tus. Si vous comptez simplement utiliser
  les services SMB occasionnellement, vous pouvez dmarrer les dmons
  depuis un script /etc/rc.d/init.d ou mme les lancer  la main lorsque
  vous en avez besoin.

  Pour lancer les daemons depuis l'inetd, mettez les lignes suivantes
  dans le fichier de configuration d'inetd, /etc/inetd.conf :



       # SAMBA NetBIOS services (for PC file and print sharing)
       netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
       netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd




  Et relancez le daemon inetd avec la commande :


      killall -HUP inetd



  Pour lancer les daemons depuis les scripts de dmarrage, copier le
  script suivant sous le nom /etc/rc.d/init.d/smb et faites des liens
  depuis les fichiers spcifis dans les commentaire sur ce script :









































  #!/bin/sh

  #
  # /etc/rc.d/init.d/smb - dmarre et stoppe les services SMB.
  #
  # Les fichiers suivants doivent tre des liens symboliques vers ce fichier~:
  #    /etc/rc.d/rc1.d/K35smb  (Kille les services SMB  l'extinction)
  #    /etc/rc.d/rc3.d/S91smb  (Dmarre les services SMB en mode
  #                             multi-utilisateur)
  #    /etc/rc.d/rc6.d/K35smb  (Kille les services SMB au redmarrage)

  # Charge la librairie de fonctions
  . /etc/rc.d/init.d/functions

  # Charge la configuration rseau
  . /etc/sysconfig/network

  # Vrifie que le rseau fonctionne
  [ ${NETWORKING} = "no" ] && exit 0

  # Traite les arguments
  case "$1" in
     start)
        echo -n "Starting SMB services: "
        daemon smbd -D
        daemon nmbd -D
        echo
        touch /var/lock/subsys/smb
       ~;;
     stop)
        echo -n "Shutting down SMB services: "
        killproc smbd
        killproc nmbd
        rm -f /var/lock/subsys/smb
        echo ""
       ~;;
     *)
        echo "Usage: smb {start|stop}"
        exit 1
  esac






  55..  CCoonnffiigguurraattiioonn ggnnrraallee ((//eettcc//ssmmbb..ccoonnff))

  La configuration de Samba sur une machine Linux (ou sur un autre Unix)
  est contrle par un seul fichier, /etc/smb.conf. Ce fichier indique
  quelle ressources systme vous dsirez partager avec le monde
  extrieur, et quelle restrictions vous voulez mettre dessus.

  Puisque les chapitres suivants vont traiter du partage de fichier et
  d'imprimantes avec des machines Windows, le fichier smb.conf prsent
  dans ce chapitre est aussi simple que possible, en guise
  d'introduction.

  Ne vous inquitez pas pour les dtails, en tout cas pas encore. Les
  chapitres suivants vont prsenter les concepts fondamentaux.

  Chaque partie du fichier commence par une entte, comme par exemple
  [global], [homes], [printers], etc...

  La section [global] dfinit quelques variables communes pour le
  partage de toutes les ressources.
  La section [homes] permet  un utilisateur distant d'accder  son
  rpertoire d'accueil (et uniquement aux sien) sur la machine Linux
  locale. C'est--dire que si un utilisateur Windows essaye de se
  connecter  ce rpertoire partag depuis sa machine Windows, il sera
  connect sur sa rpertoire d'accueil personnel. Notez que pour cela,
  il doit possder un compte sur l'hte Linux.

  Le fichier smb.conf suivant donn en exemple permet  des utilisateurs
  distants d'accder  leur rpertoire _h_o_m_e sur la machine local et
  d'crire dans un rpertoire temporaire. Pour qu'un utilisateur Windows
  puisse voir ces partages, il faut que l'hte Linux soit sur le rseau
  local. Ainsi l'utilisateur connecte un lecteur rseau depuis le
  gestionnaire de fichiers Windows ou l'Explorateur.

  Veuillez noter que dans les chapitres suivants, des champs seront
  ajouts  ce fichier pour permettre  plus de ressources d'tre
  partages.



       ; /etc/smb.conf
       ;
       ; Assurez vous de relancer le serveur aprs avoir fait des changement , dans
       ; ce fichier. Par exemple~:
       ; /etc/rc.d/init.d/smb stop
       ; /etc/rc.d/init.d/smb start

       [global]
       ; dcommentez cette ligne si vous dsirez autoriser les invits (comptes
       ; "guest")  se connecter
       ; guest account = nobody
          log file = /var/log/samba-log.%m
          lock directory = /var/lock/samba
          share modes = yes

       [homes]
          comment = Rpertoire homes
          browseable = no
          read only = no
          create mode = 0750

       [tmp]
          comment = Espace disque temporaire
          path = /tmp
          read only = no
          public = yes






  66..  PPaarrttaaggeerr uunn lleecctteeuurr LLiinnuuxx aavveecc ddeess mmaacchhiinneess WWiinnddoowwss

  Comme vous pouvez le constater avec le fichier smb.conf ci-dessus,
  partager des disques Linux avec des utilisateurs est simple.
  Nanmoins, comme pour tout avec Samba, vous pouvez tout contrler
  finement. Voici quelques exemples :

  Pour partager un rpertoire public, crez un clone de la section [tmp]
  ci-dessus en ajoutant le code suivant dans le smb.conf :





  [public]
     comment = Partage public
     path = /home/public
     public = yes
     writable = yes
     printable = yes




  Pour que le rpertoire ci-dessus soit en lecture pour tout le monde
  mais uniquement en criture pour les personnes du groupe staff,
  modifiez l'entre comme ci-dessous :



       [public]
          comment = Partage public
          path = /home/public
          public = yes
          writable = yes
          printable = no
          write list = @staff




  Pour d'autres trucs et astuces concernant les partages de rpertoires,
  confrez vous  la documentation de Samba ou aux pages de manuel.


  77..  PPaarrttaaggeerr uunn rrppeerrttooiirree WWiinnddoowwss ppoouurr ddeess mmaacchhiinneess LLiinnuuxx

  Un client SMB pour un hte Unix est inclus dans la distribution de
  Samba. Il fournit une interface semblable au ftp, en ligne de
  commande. Vous pouvez utiliser cette utilitaire pour transfrer des
  fichiers entre un  serveur  Windows et un client Linux.

  Pour voir ce que partage une machine donne, utilisez :


  /usr/sbin/smbclient -L hte



  o  hte  est le nom NetBIOS de la machine dont vous voulez voir les
  partages. Vous obtiendrez une liste des  services  en partage,
  c'est--dire le nom des rpertoires ou des machines qu'il partage pour
  vous. A moins que le serveur SMB n'aient aucune protection, vous allez
  devoir saisir un mot de passe. Utilisez le mot de passe pour le compte
  d'invit ou pour votre compte personnel sur cette machine.

  Par exemple :


      smbclient -L zimmerman



  Ce qui devrait donner quelque chose comme cela :






  Server time is Sat Aug 10 15:58:27 1996
  Timezone is UTC+10.0
  Password:
  Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]

  Server=[ZIMMERMAN] User=[] Workgroup=[WORKGROUP] Domain=[]

          Sharename      Type      Comment
          ---------      ----      -------
          ADMIN$         Disk      Remote Admin
          public         Disk      Public
          C$             Disk      Default share
          IPC$           IPC       Remote IPC
          OReilly        Printer   OReilly
          print$         Disk      Printer Drivers


  This machine has a browse list:

          Server               Comment
          ---------            -------
          HOPPER               Samba 1.9.15p8
          KERNIGAN             Samba 1.9.15p8
          LOVELACE             Samba 1.9.15p8
          RITCHIE              Samba 1.9.15p8
          ZIMMERMAN




  La  browse list  (liste des machines) montre quels sont les autres
  serveurs SMB partageant des ressources sur le rseau.

  Pour utiliser le client, lancez :


  /usr/sbin/smbclient service <mot de passe>



  ou  service  est une machine et un nom de partage. Par exemple, si
  vous essayez d'accder  un rpertoire en accs public sur une machine
  appele zimmerman, le service sera nomm \\zimmerman\public.
  Nanmoins,  cause des restrictions de l'interprteur de commandes (le
  _s_h_e_l_l), vous allez devoir redoubler les _b_a_c_k_s_l_a_s_h_s, pour obtenir la
  ligne suivante :


  /usr/sbin/smbclient \\\\zimmerman\\public mon_mot_de_passe



  o  mon_mot_de_passe  est votre mot de passe crit tel quel.

  Vous allez obtenir la ligne de commande suivante :



       Server time is Sat Aug 10 15:58:44 1996
       Timezone is UTC+10.0
       Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]
       smb: \>




  Tapez  h  pour obtenir de l'aide sur smbclient :



       smb: \> h
       ls             dir            lcd            cd             pwd
       get            mget           put            mput           rename
       more           mask           del            rm             mkdir
       md             rmdir          rd             prompt         recurse
       translate      lowercase      print          printmode      queue
       cancel         stat           quit           q              exit
       newer          archive        tar            blocksize      tarmode
       setmode        help          ~?             ~!
       smb: \>




  Si vous savez utiliser ftp, vous ne devriez pas avoir besoin de lire
  la page de manuel de smbclient.



  88..  PPaarrttaaggeerr uunnee iimmpprriimmaannttee LLiinnuuxx ppoouurr ddeess ssttaattiioonnss WWiinnddoowwss

  Pour partager une imprimante Linux pour des stations Windows, vous
  devez tre sr que votre imprimante est configure pour fonctionner
  sous Linux. Si vous savez imprimer depuis Linux, la mise en place d'un
  partage de l'imprimante par SMB est quasi-automatique.

  Veuillez vous rfrer au Printing HOWTO pour la configuration de
  l'imprimante.

  Puisque l'auteur utilise une imprimante connecte  une machine sous
  Windows NT, cette section ne doit pas tre prise  la lettre, mais
  simplement comme une suggestion. Quiconque ayant des dtails sur ce
  point est invit  les envoyer  dwood@plugged.net.au afin que ce
  chapitre puisse tre complt.

  Ajoutez la configuration d'impression  votre smb.conf :


























  [global]
     printing = bsd
     printcap name = /etc/printcap
     load printers = yes
     log file = /var/log/samba-log.%m
     lock directory = /var/lock/samba

  [printers]
     comment = Toutes les imprimantes
     security = server
     path = /var/spool/lpd/lp
     browseable = no
     printable = yes
     public = yes
     writable = no
     create mode = 0700

  [ljet]
     security = server
     path = /var/spool/lpd/lp
     printer name = lp
     writable = yes
     public = yes
     printable = yes
     print command = lpr -r -h -P %p %s




  Assurez vous que le  path  (dans cet exemple,  l'intrieur de la
  section [ljet]) corresponde au rpertoire de _s_p_o_o_l dfini dans
  /etc/printcap !

  NB : On constate quelques problmes pour le partage d'imprimante sur
  des des serveurs Unix, utilisant Samba, pour des clients sous Windows
  NT. Un des problmes est que NT ne voit pas l'imprimante partage
  correctement. Pour rsoudre ce problme, lisez les remarques dans le
  fichier docs/WinNT.txt de la distribution de Samba. Un autre problme
  existe avec les mots de passe. Voyez galement dans ce fichier comment
  rsoudre le problme.


  99..  PPaarrttaaggeerr uunnee iimmpprriimmaannttee WWiinnddoowwss ppoouurr ddeess cclliieennttss LLiinnuuxx

  Pour partager une imprimante sur une machine Windows, vous devez
  suivre les points suivants :


  1. Vous devez avoir les entres correspondantes  l'imprimante dans
     /etc/printcap et elles doivent correspondre  la structure locale
     des rpertoires (pour le rpertoire de _s_p_o_o_l, etc...).

  2. Vous devez avoir le script /usr/bin/smbprint. Il est fournit avec
     les sources de Samba, mais pas avec toutes les distributions
     binaires. Une version lgrement modifie de ce script est
     prsente plus loin.

  3. Si vous voulez convertir des fichiers ASCII en Postscript, vous
     devez avoir nenscript, ou quivalent. nenscript est un
     convertisseur Postscript et se trouve gnralement dans /usr/bin.

  4. Vous voudrez peut-tre simplifier l'impression  l'aide de Samba en
     utilisant une interface simple d'emploi. Un script simple, crit en
     perl, pour grer l'ASCII ou le PostScript est prsent ci-dessous.


  L'entre dans /etc/printcap est pour une imprimante HP 5 MP sur une
  machine utilisant Windows NT. Les entres sont comme suit :


  cm - commentaire
  lp - nom du priphrique  ouvrir en criture
  sd - le rpertoire de spool de l'imprimante (sur la machine locale)
  af - le fichier d'accounting
  mx - la taille maximum de fichier (zro pour aucune limite)
  if - le nom du filtre en entre (un script)



  Pour plus ample information, lisez le Printing HOWTO ou la page de
  manuel de printcap.



       # /etc/printcap
       #
       # //zimmerman/oreilly avec smbprint
       #
       lp:\
              ~:cm=HP 5MP Postscript OReilly sur zimmerman:\
              ~:lp=/dev/lp1:\
              ~:sd=/var/spool/lpd/lp:\
              ~:af=/var/spool/lpd/lp/acct:\
              ~:mx#0:\
              ~:if=/usr/bin/smbprint:




  Assurez que le rpertoire de spool et celui d'accounting existent et
  son accessibles en criture, que le chemin correct vers le script
  smbprint (donn ci-dessous) est indiqu par la ligne  if  et que
  vous avez slectionn le bon fichier de priphrique (le fichier
  spcial dans /dev).

  Vient ensuite le script smbprint. Il est gnralement mis dans le
  rpertoire /usr/bin et a t cr par Andre Tridgell, le crateur de
  Samba pour autant que je sache. Il est fourni avec la distribution
  sous forme de code source de Samba, mais est absent de certaines
  distribution binaires. Je l'ai donc recopi ici.

  Examinez le avec attention. Certains changement fait  ce script se
  sont avres tre utiles.



















  #!/bin/sh -x

  # Ce script est un filtre d'entre sur l'impression avec printcap sur une
  # machine Linux. Il utilise le programme smbclient pour imprimer le fichier au
  # serveur et service spcifi.
  # Par exemple, vous pouvez avoir une entre printcap comme celle-ci~:
  #
  # smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
  #
  # qui crerai une imprimante Unix appele "smb" qui imprimerait par
  # l'intermdiaire de ce script. Vous devrez crer le rpertoire de spool,
  # /usr/spool/smb avec les permissions qui conviennent et le bon propritaire,
  # pour votre systme.

  # Mettez les valeurs pour le serveur et le service sur lequel vous voulez
  # imprimer.  Dans cet exemple, j'utilise un PC sous Windows pour Workgroups
  # nomm "laplan" ayant une imprimante appele "printer" sans mot de passe.

  #
  # Script modifi par hamiltom@ecnz.co.nz (Michael Hamilton) afin que le
  # serveur, le service et le mot de passe puissent tre lus depuis un fichier
  # /usr/var/spool/lpd/PRINTNAME/.config
  #
  # Pour que ceci puisse fonctionner, l'entre du /etc/printcap doit inclure un
  # fichier d'accounting (af=...)~:
  #
  #   cdcolour:\
  #       :cm=CD IBM Colorjet au 6eme etage:\
  #       :sd=/var/spool/lpd/cdcolour:\
  #       :af=/var/spool/lpd/cdcolour/acct:\
  #       :if=/usr/local/etc/smbprint:\
  #       :mx=0:\
  #       :lp=/dev/null:
  #
  # Le fichier /usr/var/spool/lpd/PRINTNAME/.config devrait contenir~:
  #   server=SERVEUR_PC
  #   service=NOM_IMPRIMANTE
  #   password="mot_de_passe"
  #
  # Pas exemple~:
  #   server=MON_BO_PC
  #   service=CJET_371
  #   password=""

  #
  # Fichier de log pour debuggage, changez le  /dev/null si vous le voulez
  #
  logfile=/tmp/smb-print.log
  # logfile=/dev/null


  #
  # Le dernier paramtre du filtre est le nom du fichier d'accounting
  #
  spool_dir=/var/spool/lpd/lp
  config_file=$spool_dir/.config

  # Les variables suivantes devraient tre lues depuis le fichier de
  # configuration~:
  #   server
  #   service
  #   password
  #   user
  eval `cat $config_file`

  #
  # Des informations de dbogage, changez le >> en > si vous voulez conomiser
  # de la place.
  #
  echo "server $server, service $service" >> $logfile

  (
  # NOTE Vous voudrez peut tre ajouter la ligne "echo translate" si vous voulez
  # une conversion automatiques des CR/LF lors de l'impression
          echo translate
          echo "print -"
          cat
  ) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $user -N -P >> $logfile




  La plupart des distributions Linux sont fournies avec nenscript pour
  convertir des documents ASCII en Postscript. Le script perl qui suit
  simplifie la vie en fournissant une interface simple  smbprint pour
  l'impression sous Linux.


  Usage: print [-a|c|p] <fichier>
         -a imprime <fichier> comme un fichier ASCII
         -c imprime <fichier> formatt en code source
         -p imprime <fichier> en tant que fichier Postscript
         Si aucun paramtre n'est donn, print tente de
         deviner le type de fichier et imprime en consquence.



  smbprint a tendance  tronquer les longues lignes lors de l'impression
  de fichiers ASCII. Ce script coupe les longues lignes sur les espaces
  (plutt qu'au milieu d'un mot), si possible.

  Le formatage en code source est ralis par nenscript.Il prend en
  entre un fichier ASCII et le formatte sur deux colonnes avec une
  entte (date, nom du fichier, etc...). Il numrote galement les
  lignes. En prenant ce script comme exemple, on peut faire d'autres
  types de formatage.

  Les documents sont dj correctement formats, donc ils passent
  directement  travers le filtre.























  #!/usr/bin/perl

  # Script:   print
  # Auteurs:  Brad Marshall, David Wood
  #           Plugged In Communications
  # Date:     960808
  #
  # Script pour imprimer sur oreilly qui est pour l'instant connecte sur
  # zimmerman.
  # But:      Prendre diffrentes sortes de fichier en argument et les
  #  traiter pour les injecter dans le script d'impression de Samba.
  #
  # Types de fichier supports pour l'instant~:
  #
  # ASCII      - vrifie que les lignes plus longues que $line_length
  #              caractres sont coups sur un espace.
  # Postscript - Aucune action.
  # Code       - Formatte en Postscript ( l'aide de nenscript) pour un
  #              affichage correct (orientation, fonte, etc...).
  #

  # Fixe la longueur maximale d'une ligne de texte ASCII
  $line_length = 76;

  # Le chemin d'accs vers le script d'impression de Samba
  $print_prog = "/usr/bin/smbprint";

  # Le chemin vers le programme nenscript (le convertisseur
  # ASCII->Postscript)
  $nenscript = "/usr/bin/nenscript";

  unless ( -f $print_prog ) {
          die "Je ne peux pas trouver $print_prog!";
  }
  unless ( -f $nenscript ) {
          die "Je ne peux pas trouver $nenscript!";
  }

  &ParseCmdLine(@ARGV);

  # Dbug
  print "filetype is $filetype\n";

  if ($filetype eq "ASCII") {
          &wrap($line_length);
  } elsif ($filetype eq "code") {
          &codeformat;
  } elsif ($filetype eq "ps") {
          &createarray;
  } else {
          print "Dsol, ce n'est pas un type de fichier que je connais";
          exit 0;
  }
  # Envoie le tableau  smbprint
  open(PRINTER, "|$print_prog")
           || die "Je ne peux pas ouvrir $print_prog: $!\n";

  foreach $line (@newlines) {
          print PRINTER $line;
  }
  # Envoie un retour  la ligne supplmentaire si jamais le fichier a sa
  # dernire ligne incomplte
  print PRINTER "\n";
  close(PRINTER);
  print "Achev\n";
  exit 0;
  # --------------------------------------------------- #
  #       Tout ce qui suit est un sous programme        #
  # --------------------------------------------------- #

  sub ParseCmdLine {
          # Traite la ligne de commande, dtermine le type de fichier

          # $arg et $file sont respectivement les arguments (s'ils
          # existent) et le nom de fichier
          if ($#_ < 0) {
                  &usage;
          }
          # Dbug
  #       foreach $element (@_) {
  #               print "*$element* \n";
  #       }

          $arg = shift(@_);
          if ($arg =~ /\-./) {
                  $cmd = $arg;
          # Dbug
  #       print "\$cmd trouv.\n";

                  $file = shift(@_);
          } else {
                  $file = $arg;
          }

          # Dfinition du type de fichier
          unless ($cmd) {
                  # Aucun argument

                  if ($file =~ /\.ps$/) {
                          $filetype = "ps";
                  } elsif ($file =~ /\.java$|\.c$|\.h$|\.pl$|\.sh$|\.csh$|\.m4$|\.inc$|\.html$|\.htm$/) {
                          $filetype = "code";
                  } else {
                          $filetype = "ASCII";
                  }

                  # Traite $file selon le type de fichier et retourne
                  # le type de fichier ($filetype)
          } else {
                  # Nous utilisons ltype de fichier dcrit dans $arg
                  if ($cmd =~ /^-p$/) {
                          $filetype = "ps";
                  } elsif ($cmd =~ /^-c$/) {
                          $filetype = "code";
                  } elsif ($cmd =~ /^-a$/) {
                          $filetype = "ASCII"
                  }
          }
  }

  sub usage {
          print "
  Usage: print [-a|c|p] <fichier>
         -a imprime <fichier> comme un fichier ASCII
         -c imprime <fichier> format en code source
         -p imprime <fichier> en tant que fichier Postscript
         Si aucun paramtre n'est donn, print tente de
         deviner le type de fichier et imprime en consquence.\n
  ";
          exit(0);
  }

  sub wrap {
          # Cre un table contenant les lignes du fichier, avec chaque
          # ligne ayant une longueur < au nombre de caractres
          # spcifis, et coupe uniquement sur un espace.

          # Rcupre la longueur maximum d'une ligne
          $limit = pop(@_);

          # Dbug
          #print "Entre dans la procdure wrap\n";
          #print "La longueur maximum d'une ligne est $limit\n";

          # Lit le fichier, le traite et le stocke dans le tableau
          open(FILE, "<$file") || die "Impossible d'ouvrir $file: $!\n";
          while(<FILE>) {
                  $line = $_;

                  # Dbug
                  #print "La ligne est~:\n$line\n";

                  # Coupe la ligne si celle-ci dpasse la limite
                  while ( length($line) > $limit ) {

                          # Dbug
                          #print "Je coupe...";

                          # Prend les premiers $limit +1 caractres.
                          $part = substr($line,0,$limit +1);

                          # Dbug
                          #print "La ligne partielle est~:\n$part\n";

                          # Vrifie si le dernier caractre est un
                          # espace
                          $last_char = substr($part,-1, 1);
                          if ( " " eq $last_char ) {
                              # Oui, on imprime le reste

                              # Dbug
                              #print "Le dernier caractre tait un espace\n";

                              substr($line,0,$limit + 1) = "";
                              substr($part,-1,1) = "";
                              push(@newlines,"$part\n");
                          } else {
                              # Non, on cherche le dernier espace de la
                              # ligne et on imprime jusqu' lui

                              # Dbug
                              #print "Le dernier caractre n'tait pas un espace\n";

                              # Supprime le caractre aprs $limit
                              substr($part,-1,1) = "";
                              # Inverse la ligne pour trouver plus
                              # facilement l'espace
                              $revpart = reverse($part);
                              $index = index($revpart," ");
                              if ( $index > 0 ) {
                                substr($line,0,$limit-$index) = "";
                                push(@newlines,substr($part,0,$limit-$index)
                                    . "\n");
                              } else {
                                 # Aucun espace dans la ligne
                                 # Imprime jusqu' $limit
                                 substr($line,0,$limit) = "";
                                 push(@newlines,substr($part,0,$limit)
                                     . "\n");
                               }
                          }
                  }
                  push(@newlines,$line);
          }
          close(FILE);
  }

  sub codeformat {
          # Appelle la procdure wrap et filtre par nenscript
          &wrap($line_length);

          # Envoie le rsultat  nenscript pour crer un fichier
          # Postscript qui respecte un format dcent d'impression pour
          # du code source (orientation paysage, font Courier,
          # numrotation des lignes).
          # Imprime d'abord dans un fichier temporaire.
          $tmpfile = "/tmp/nenscript$$";
          open(FILE, "|$nenscript -2G -i$file -N -p$tmpfile -r") ||
                  die "Je ne peux pas ouvrir nenscript~: $!\n";
          foreach $line (@newlines) {
                  print FILE $line;
          }
          close(FILE);

          # Relis le fichier temporaire dans un tableau pour pouvoir
          # tre pass au script smbprint de Samba.
          @newlines = ("");
          open(FILE, "<$tmpfile") || die "Je ne peux pas ouvrir $file~: $!\n";
          while(<FILE>) {
                  push(@newlines,$_);
          }
          close(FILE);
          system("rm $tmpfile");
  }

  sub createarray {
          # Cre le tableau pour un fichier postscript
          open(FILE, "<$file") || die "Can't open $file: $!\n";
          while(<FILE>) {
                  push(@newlines,$_);
          }
          close(FILE);
  }






  1100..  CCooppyyrriigghhtt

  Cet HOWTO est copyright  1996 par David Wood. Il peut tre reproduit
  sous quelque forme que ce soit et tre distribu gratuitement aussi
  longtemps que le fichier reste intact, cette notice y compris.


  1111..  RReemmeerrcciieemmeennttss

  Ds que vous m'enverrez des suggestions, je vous remercierai ici dans
  la prochaine version du document.




  Linux SMP HOWTO
  David Mentr, David.Mentre@irisa.fr
  v1.9, 13 janvier 2000

  Ce HOWTO passe en revue les principaux problmes et leurs solutions
  lis la configuration et  l'emploi d'un systme SMP sous Linux.
  ______________________________________________________________________

  Table des matires

























































  1. Introduction

  2. Questions indpendantes de l'architecture.

     2.1 Ct noyau
     2.2 Ct utilisateur
     2.3 Programmation SMP
        2.3.1 Mthodes de paralllisation
        2.3.2 La librairie C
        2.3.3 Langages, compilateurs et dbogueurs
        2.3.4 Autres librairies
        2.3.5 Autres points concernant la programmation SMP

  3. Questions spcifiques  l'architecture x86

     3.1 Pourquoi cela ne marche-t-il pas avec ma machine ?
     3.2 Causes possibles de plantages
     3.3 Informations spcifiques aux cartes mres
        3.3.1 Cartes mres avec des problmes connus
     3.4 Machine SMP Linux  bas prix (machine double Celeron)
        3.4.1 Est-il possible de faire fonctionner une machine double Celeron ?
        3.4.2 Comment Linux se comporte-t-il sur les systmes double Celeron ?
        3.4.3 Les processeurs Celeron sont rputs pour tre facilement surcadenable. Qu'en est-il des systmes doubles Celeron ?
        3.4.4 Et un systme quadruple Celeron ?
        3.4.5 Pourquoi ne pas mlanger Celeron et Pentium II ?

  4. Questions spcifiques  l'architecture Sparc

     4.1 Quellles sont les machines Sparc supportes ?
     4.2 Problmes spcifiques au support SMP Sparc
     4.3 Limites SMP spcifiques au noyau courant (2.2)

  5. Questions spcifiques  l'architecture PowerPC

     5.1 Quellles sont les machines PPC supportes ?
     5.2 Problmes spcifiques concernant le support SMP PPC

  6. Questions spcifiques  l'architecture Alpha

     6.1 Quelles sont les machines Alpha supportes ?
     6.2 Problmes spcifiques au support SMP Alpha

  7. Pointeurs utiles

     7.1 Divers
     7.2 Programmes et librairies multithread
     7.3 Patches spcifiques SMP
     7.4 Compilateurs parallliseurs/optimiseurs pour les machines 586/686 (

  8. Glossary

  9. Quoi de neuf ?

  10. Liste des contributeurs



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Linux fonctionne sur les machines SMP (Symetric Multi-Processors).  Le
  support SMP fut introduit dans la version 2.0 du noyau et a t
  largement amlior depuis. La gestion est beaucoup plus fine dans la
  srie 2.2.x que dans la 2.0.x, d'o de meilleures performances lorsque
  les processus font appel au noyau !
  HOWTO maintenu par David Mentr (David.Mentre@irisa.fr). La dernire
  version de ce HOWTO peut tre obtenue 

    http://www.irisa.fr/prive/mentre/smp-howto/ (France)

    http://www.phy.duke.edu/brahma/smp-faq/ (USA)


  Si vous voulez contribuer  ce HOWTO, je prfre les diffs SGML
  version <http://www.irisa.fr/prive/mentre/smp-howto/smp-howto.sgml> de
  ce document, mais toute remarque (en texte pur) sera grandement
  apprci.  Si vous m'envoyez un e-mail  propos de ce document,
  insrez s'il vous plat un tag tel [Linux SMP HOWTO] dans le champ
  Suject: de votre e-mail. a m'aide  trier automatiquement mon
  courrier (et vous recevrez une rponse plus rapide ;)).


  Ce HOWTO reprend et enrichit first draft <http://www.ihoc.net/linux-
  smp-faq-draft.html> crit par CChhrriiss PPiirriihh.


  Toutes les informations contenues dans ce HOWTO sont fournies "tel
  que".  Toute garantie explicite, implicite ou lgale, concernant
  l'exactitude de l'information, de la convenance  quelque usage
  particulier est par la prsente spcifiquement dcline. Alors que
  tous les efforts ont t faits pour assurer l'exactitude des
  informations contenues dans ce HOWTO, les auteurs n'assument aucune
  responsabilit pour les erreurs, omissions ou dommages rsultant de
  l'utilisation des informations contenues dans ce document.


  22..  QQuueessttiioonnss iinnddppeennddaanntteess ddee ll''aarrcchhiitteeccttuurree..



  22..11..  CCtt nnooyyaauu



  1. LLiinnuuxx ssuuppppoorrttee--tt--iill lleess tthhrreeaaddss mmuullttiipplleess ??  SSii jjee llaannccee ddeeuuxx oouu
     pplluussiieeuurrss pprroocceessssuuss,, sseerroonntt--iillss rrppaarrttiiss eennttrree lleess ddiiffffrreennttss
     pprroocceesssseeuurrss ddiissppoonniibblleess ??

     Oui. Les processus et les threads du noyau sont rpartis entre les
     processeurs. Ceux de l'espace utilisateur ne le sont pas.


  2. QQuueelllleess ssoonntt lleess aarrcchhiitteeccttuurreess SSMMPP ssuuppppoorrtteess ??


     DD''aapprrss AAllaann CCooxx :
        Les versions 2.0 du noyau supportent les systmes SMP de type
        hypersparc (SS20, etc...) et Intel 486, Pentium ou machines
        suprieurs compatible avec la norme Intel MP1.1/1.4.  RRiicchhaarrdd
        JJeelliinneekk ajoute : jusqu' prsent, seul des systmes ne
        comprenant pas plus de 4 processeurs ont t tests. La
        spcification MP (et donc Linux) autorise thoriquement jusqu'
        16 processeurs.

        Le support SMP pour les architectures UltraSparc, SparcServer,
        Alpha et PowerPC est disponible dans le 2.2.x.


     DDee RRaallff BBcchhllee :
        MIPS, m68k et ARM ne grent pas le SMP; les deux derniers ne le
        supporteront probablement jamais.
        Ceci tant, je ferai un hack pour MIPS-SMP ds que j'aurais une
        machine SMP...


  3. CCoommmmeenntt ccoonnssttrruuiirree uunn nnooyyaauu LLiinnuuxx ggrraanntt llee SSMMPP ??

     La plupart des distributions ne fournissent pas un noyau adapt au
     SMP.  Vous devrez donc en faire un vous mme. Si vous n'avez encore
     jamais compil de noyau, voila une excellente occasion d'apprendre.
     Expliquer comment compiler un nouveau noyau dpasse le cadre de ce
     document; prfrez-vous au Linux Kernel Howto pour de plus amples
     informations (CC.. PPoolliisshheerr).  Dans la srie 2.0 jusqu' la version
     2.1.132 exclue du noyau, dcommentez la ligne SMP=1 dans le
     Makefile principal (/usr/src/linux/Makefile).


     Dans la version 2.2, configurez le noyau et rpondez "oui"  la
     question "Symetric multi-processing support" (MMiicchhaaeell EElliizzaabbeetthh
     CChhaassttaaiinn).


     Autorisez l'horloge temps rel en cochant l'option "RTC support"
     (RRoobbeerrtt GG..  BBrroowwnn). Notez qu'inclure le support RTC, en ralit,
     pour autant que je sache, n'empche pas le problme connu de la
     drive de l'horloge avec le SMP : activer cette fonctionnalit
     avertit en cas de lecture de l'horloge au dmarrage.  Une note de
     RRiicchhaarrdd JJeelliinneekk signale aussi qu'activer "Enhandced RTC" est
     ncessaire pour activer le deuxime processeur (identification) sur
     certaines cartes mre Intel exotiques.


     Enfin, sur plate-forme Intel, N'ACTIVEZ PAS l'option APM (Advanced
     Power Management)! APM et SMP sont incompatibles et votre systme
     plantera certainement (ou du moins probablement ;)) au dmarrage si
     APM est activ (JJaakkoobb OOeesstteerrggaaaarrdd).  AAllaann CCooxx le confirme :
     dsactivez APM pour les machines SMP en 2.1.x. En gros le
     comportement APM est indfini en prsence de systmes SMP et tout
     peut arriver.  Toujours sur plate-forme Intel, activez "MTRR
     (Memory Type Range Register) support". Certains BIOS sont
     dfectueux et n'activent pas la mmoire cache du second processeur.
     Le support MTRR contient le code pour y remdier.


     Vous devez reconstruire votre noyau et vos modules quand vous
     passez en SMP et quand vous changez de mode SMP. N'oubliez pas
     d'effectuer un make modules et un make modules_install (AAllaann CCooxx).


     Si vous obtenez des erreurs au chargement des modules, vous n'avez
     probablement pas rinstall vos modules. Nanmoins, avec quelques
     noyaux 2.2.x, certains ont rapport des problmes lors de la
     recompilation d'un noyau SMP en noyau UP (Uni-Processeur). Afin de
     rsoudre cela, sauvegardez votre fichier .config, et faites un _m_a_k_e
     _m_r_p_r_o_p_e_r, restaurez votre fichier _._c_o_n_f_i_g et recompilez votre noyau
     (_m_a_k_e _d_e_p, etc...)  (WWaaddee HHaammppttoonn).  N'oubliez pas de relancer lilo
     aprs avoir recopi votre nouveau noyau.


     Rcapitulation :







     ___________________________________________________________________
     make config # ou menuconfig ou xconfig
     make dep
     make clean
     make bzImage # ou ce que vous voulez
     # copiez l'image du noyau manuellement puis RELANCER LILO
     # ou make lilo
     make modules
     make modules_install
     ___________________________________________________________________





  4. CCoommmmeenntt ccoommppiillee--tt--oonn uunn nnooyyaauu LLiinnuuxx nnoonn-SMP ?

     Dans la srie 2.0, ccoommmmeenntteezz la ligne SMP=1 dans le Makefile
     principal (/usr/src/linux/Makefile).

     Pour la srie 2.2, configurez le noyau et rpondez "no"  la
     question "Symmetric multi-processing support" (MMiicchhaaeell EElliizzaabbeetthh
     CChhaassttaaiinn).


     Vous devez absolument recompiler votre noyau et ses modules pour
     activer ou dsactiver le mode SMP. N'oubliez pas de faire make
     modules, make modules_install et de relancer lilo. Voyez les notes
     plus haut sur les problmes de configuration possibles.


  5. SSaavvooiirr ssii aa mmaarrcchhee


      cat /proc/cpuinfo




  Sortie typique (bi-PentiumII):

  ______________________________________________________________________
  processor       : 0
  cpu             : 686
  model           : 3
  vendor_id       : GenuineIntel
  [...]
  bogomips        : 267.06

  processor       : 1
  cpu             : 686
  model           : 3
  vendor_id       : GenuineIntel
  [...]
  bogomips        : 267.06
  ______________________________________________________________________




  6. SSttaattuutt ddee llaa mmiiggrraattiioonn dduu nnooyyaauu vveerrss uunn vveerrrroouuiillllaaggee ffiinn eett llee
     mmuullttiitthhrreeaaddiinngg ??

     La version 2.2 du noyau possde une gestion des signaux, des
     interruptions et de quelque E/S  verrouillage fin (fine grain
     locking). Le reste est en cour de migration. En mode SMP, plusieurs
     processus peuvent tre ordonnancs simultanment.


     Les noyaux 2.3 (futur 2.4) possdent vraiment des verrous noyaux
     fins. Dans la srie des noyaux 2.3 l'usage des gros blocages noyau
     a tout simplement disparu.  Tous les sous-systmes majeurs du noyau
     Linux sont compltement cods avec des threads : rseau, VFS, VM,
     ES, block/pages de cache, ordonnancement, interruptions, signaux,
     etc... (IInnggoo MMoollnnaarr)


  7. LLiinnuuxx SSMMPP ssuuppppoorrttee--tt--iill lleess aaffffiinniittss pprroocceesssseeuurr ??



     NNooyyaauuxx ssttaannddaarrdd
        Oui et non. Il n'est pas possible de forcer l'assignation d'un
        processus  un processeur spcifique mais l'ordonnanceur Linux
        possde un parti-pris pour chaque processus qui tend  conserver
        les processus attachs  un processeur spcifique.


     NNooyyaauu ppaattcchh
        Oui. Voir PSET - Processor Sets for the Linux kernel
        <http://isunix.it.ilstu.edu/~thockin/pset/>:

          Ce projet a pour but d'offrir une version compatible au
          niveau sources et fonctionnalits de pset (tel que dfini
          par SGI - partiellement retir de leur noyau 6.4 IRIX)
          pour Linux. Cela autorise les utilisateurs  dterminer
          sur quel processeur ou ensemble de processeurs un proces
          sus peut tourner. Les utilisations possibles incluent
          l'assignement de thread  des processeurs distincts, la
          synchronisation, la scurit (un processeur ddi 
          `root') et srement davantage encore.


     Nous nous sommes attachs  concentrer toutes les fonctionnalits
     autour de l'appel systme sysmp(). Cette routine accepte un certain
     nombre de paramtres qui dterminent la fonctionnalit requise.
     Ces fonctions comprennent:

       affecter un processus/thread  un processeur spcifique;

       interdire un processeur d'excuter certains processus;

       empcher strictement l'utilisation d'un processeur;

       assigner  un processeur un _unique_ processus (et ses fils);

       information sur l'tat du processeur;

       crer/supprimer un ensemble de processeurs, sur lesquels les
        processus peuvent tre limits



  8. AA qquuii rraappppoorrtteerr lleess bboogguueess SSMMPP ??

     Signalez s'il vous plat les bogues  linux-smp@vger.rutgers.edu.


  9. AA pprrooppooss ddeess ppeerrffoorrmmaanncceess SSMMPP

     Si vous voulez mesurer les performances de votre systme SMP, vous
     pouvez essayer les tests de Cameron MacKinnon, disponibles 
     http://www.phy.duke.edu/brahma/benchmarks.smp.




  22..22..  CCtt uuttiilliissaatteeuurr


  1. AAii--jjee vvrraaiimmeenntt bbeessooiinn ddee SSMMPP ??


     Si vous vous le demandez, vous n'en avez probablement pas besoin.
     :) En gnral les systmes multiprocesseurs offrent de meilleurs
     performances que les systmes monoprocesseurs, mais pour obtenir un
     gain quelconque vous devez considrer bien d'autres facteurs que le
     seul nombre de processeurs. Par exemple, sur un systme donn, si
     le processeur est en gnral inactif, la plupart du temps  cause
     d'un disque dur lent, alors le systme est bloqu au niveau des
     entres/sorties ("input/output bound"); il ne bnficiera
     probablement pas de la puissance d'un processeur supplmentaire.
     Si, d'un autre cot, un systme doit excuter beaucoup de processus
     simultanment et que l'utilisation processeur est trs forte, alors
     vous tes susceptible d'amliorer les performances de votre
     systme. Les disques dur SCSI peuvent tre trs efficaces en
     utilisation avec plusieurs processeurs. Ils peuvent grer plusieurs
     commandes simultanment sans immobiliser le processeur (CC..
     PPoolliisshheerr).


  2. OObbttiieenntt--oonn lleess mmmmeess ppeerrffoorrmmaanncceess aavveecc uunn bbiipprroocceesssseeuurr 330000 MMHHzz
     qquu''aavveecc uunn pprroocceesssseeuurr 660000 MMHHzz ??

     Tout dpend de l'application, mais gnralement non. Le SMP
     implique quelques "frais de gestion" absents d'une machine
     monoprocesseur.  (WWaaddee HHaammppttoonn).  :)


  3. CCoommmmeenntt aaffffiicchheerr lleess ppeerrffoorrmmaanncceess ddee pplluussiieeuurrss pprroocceesssseeuurrss ??

     Grce  SSaammuueell SS.. CChheessssmmaann, se ici trouvent quelques utilitaires
     pratiques :

     CChhaarraacctteerr bbaasseedd::
        http://www.cs.inf.ethz.ch/~rauch/procps.html

        En gros, il s'agit de procps v1.12.2 (top, ps, et. al.) et de
        quelques patches pour le support SMP.

        Pour les 2.2.x, GGrreeggoorryy RR.. WWaarrnneess a rendu disponible un patch 
        http://queenbee.fhcrc.org/~warnes/procps


     GGrraapphhiiqquuee::
        xosview-1.5.1 supporte le SMP, les noyaux suprieurs au 2.1.85
        (inclus) et l'entre cpuX dans le fichier /proc/stat.

        Page d'accueil officielle pour xosview :
        http://lore.ece.utexas.edu/~bgrayson/xosview.html

        Vous ici trouverez une version patche par KKuummssuupp LLeeee pour les
        noyaux 2.2.p :
        http://www.ima.umn.edu/~klee/linux/xosview-1.6.1-5a1.tgz

        Les diffrents patches noyau de Forissier sont disponibles  :
        http://www-isia.cma.fr/~forissie/smp_kernel_patch/

     Nanmoins, vous ne pouvez pas contrler l'ordonnancement de faon
     prcise avec xosview car ce dernier le perturbe (HH.. PPeetteerr AAnnvviinn).


  4. CCoommmmeenntt aauuttoorriisseerr pplluuss dd''uunn pprroocceessssuuss lloorrss ddee llaa ccoommppiillaattiioonn dduu
     nnooyyaauu ??

     Utiliser :

     ___________________________________________________________________
             # make [modules|zImage|bzImages] MAKE="make -jX"
             o X = nombre maximum de processus.
             Notez que a ne marche pas avec "make dep".
     ___________________________________________________________________



  Avec un noyau 2.2, rfrez vous au fichier
  /usr/src/linux/Documentation/smp.txt pour des instructions prcises.

  Par exemple, comme lancer de multiples compilateurs autorise une
  machine avec suffisamment de mmoire  utiliser le temps processeur
  autrement perdu durant les dlais causs par les E/S, make MAKE="make
  -j 2" -j 2 aide rellement mme sur les machines monoprocesseurs.  (de
  RRaallff BBcchhllee).


  5. PPoouurrqquuooii llee tteemmppss ddoonnnn ppaarr llaa ccoommmmaannddee time est-il erron ?  (de
     JJooeell MMaarrcchhaanndd)

     Dans la srie des 2.0, le rsultat de la commande time est faux.
     La somme utilisateur+systme est juste *mais* 'l'tendue' entre le
     temps utilisateur et le temps systme est faux.

     Plus prcisment : "tout le temps pass sur un processeur autre que
     celui de dmarrage est comptabilis comme temps systme. Si vous
     chronomtrez un programme, ajoutez le temps utilisateur et le temps
     systme. Votre mesure sera alors correcte,  ceci prs qu'elle
     inclura aussi le temps systme qui restera  dcompter" (JJaakkoobb
     sstteerrggaaaarrdd).

     Ce bogue est corrig dans les versions 2.2.



  22..33..  PPrrooggrraammmmaattiioonn SSMMPP

  Section par JJaakkoobb sstteerrggaaaarrdd.

  Cette section a pour but de signaler ce qui fonctionne et ce qui ne
  fonctionne pas quand il s'agit de programmer des logiciels avec des
  threads pour Linux SMP.


  22..33..11..  MMtthhooddeess ddee ppaarraalllllliissaattiioonn


  1. threads POSIX (POSIX Threads)

  2. PVM / MPI Message Passing Libraries

  3. fork() -- Processus multiples

  Comme ni fork() ni les processus PVM/MPI ne partagent gnralement la
  mmoire, mais communiquent au moyen d'IPC ou d'une API de messagerie,
  ils ne seront pas dcrits davantage dans cette section. Ils ne sont
  pas vraiment spcifiques  SMP, puisqu'ils sont tout autant employs -
  sinon plus - avec des ordinateurs monoprocesseurs et des clusters.


  Seuls les threads POSIX fournissent des threads multiples partageant
  certaines ressources telles la mmoire. Cette proprit des machines
  SMP autorise plusieurs processeurs  partager leur mmoire. Pour
  employer deux (ou plus ;) ) processeurs avec un systme SMP, utilisez
  une librairie de thread du noyau.  Une bonne librairie LinuxThreads,
  une librairie de thread crite par Xavier Leroy
  <http://pauillac.inria.fr/~xleroy/linuxthreads/> est maintenant
  intgre avec la glibc2 (aka libc6). Les distributions Linux rcentes
  intgrent toutes cette librairie par dfaut. Vous n'avez donc pas 
  obtenir un paquetage spar pour utiliser les threads du noyau.

  Il existe des mises en oeuvre des threads (et thread POSIX) de niveau
  application qui ne tirent pas avantage des threads du noyau.  Ces
  paquetages gardent le thread dans un seul processus et, partant, ne
  profitent pas du SMP. Nanmoins, elles sont bonnes pour beaucoup
  d'applications et ont tendance  tre plus rapides que les threads du
  noyau sur des systmes monoprocesseurs.

  Le multithreading n'a jamais t vraiment populaire dans le monde
  UN*X.  Pour diverses raisons, les applications exigeant de multiples
  processus ou threads ont t pour la plupart crites en utilisant
  fork(). Donc, avec une approche de type threads, on rencontre des
  problmes d'incompatibilits et de non-adaptation aux thread des
  librairies, compilateurs et dbogueurs.  GNU/Linux n'y fait pas
  exception. Esprons que les sections qui suivent apporteront quelques
  lumires sur ce qui est possible et sur ce qui ne l'est pas.


  22..33..22..  LLaa lliibbrraaiirriiee CC

  Les vieilles librairies ne sont pas sres au niveau des threads. Il
  est trs important que vous utilisiez la GNU libc (gglliibbcc), aussi
  connue sous le nom de lliibbcc66. Vous pouvez videmment utiliser des
  versions antrieurs, mais cela vous causera plus de problmes que
  mettre  jour votre systme. Enfin, probablement :)

  Si vous voulez utiliser GDB pour dboguer vos programmes, voyez plus
  bas.


  22..33..33..  LLaannggaaggeess,, ccoommppiillaatteeuurrss eett ddbboogguueeuurrss

  Il existe de nombreux langages de programmation disponibles pour
  GNU/Linux et beaucoup d'entre eux utilisent les threads d'une manire
  ou d'une autre. Certains langages comme Ada et Java incluent mme les
  threads dans les primitives du langage.

  Cette section, pour l'instant, ne dcrira que le C et le C++.  Si vous
  avez une exprience de programmation SMP avec d'autre langages, merci
  de nous en faire part.

  Les compilateurs GNU C et C++, tout comme EGCS C et C++, fonctionnent
  avec le support thread de la librairie C standard (gglliibbcc). Il y a
  nanmoins quelques problmes :


  1. Quand vous compilez en C ou C++, incluez --DD__RREEEENNTTRRAANNTT dans la ligne
     de commande du compilateur. Il est ncessaire d'activer certaines
     fonctions de gestion des erreurs telles celles relatives  la
     variable errno.


  2. Quand vous utilisez C++, si deux threads rencontrent des exceptions
     simultanment, le programme retournera une erreur de segmentation.
     Le compilateur gnre un code d'exception inadapt aux threads. Une
     manire de contourner le problme consiste  mettre un
     pthread_mutex_lock(&global_exception_lock) dans le(s)
     constructeur(s) de chaque classe que vous throw() et  insrer le
     pthread_mutex_unlock(...)  correspondant dans le destructeur. Ce
     n'est pas trs beau mais a marche.  Cette solution a t fournie
     par MMaarrkkuuss FFeerrcchh.

  Le dbogueur GNU GGDDBB,  partir de la version 4.18, devrait prendre en
  charge les threads correctement. La plupart des distributions Linux
  comprennent une version patche de gdb qui gre les threads.

  Il n'est pas ncessaire de patcher la gglliibbcc pour qu'elle fonctionne
  avec des threads. Si vous n'avez pas besoin de dboguer le logiciel
  (cela peut-tre vrai pour toutes les machines qui ne sont pas ddies
  au dveloppement), il n'y a pas besoin de patcher la gglliibbcc.

  Notez que les core-dumps ne sont d'aucune utilit quand vous utilisez
  des threads. D'une manire ou d'une autre, le core dump est attach au
  thread courant et non au programme tout entier. Aussi, pour dboguer
  quoi que ce soit, faites le depuis le dbogueur.

  AAssttuuccee :: si vous avez un thread qui perd la tte, se met  utiliser
  100% du temps CPU et que vous ne voyez pas pourquoi, voici une mthode
  lgante de trouver ce qui se passe : lancez le programme depuis la
  ligne de commande, sans GDB. Faites drailler votre thread.  Utilisez
  ttoopp pour obtenir le PID du processus. Lancez GDB tel que ggddbb pprrooggrraamm
  ppiidd. GDB s'attachera lui-mme au processus dont vous avez spcifi le
  PID et arrtera le thread. Vous disposez maintenant d'une session GDB
  avec le thread incrimin et vous pouvez utiliser bbtt ou d'autres
  commandes pour suivre ce qui se passe.


  22..33..44..  AAuuttrreess lliibbrraaiirriieess

  EElleeccttrriiccFFeennccee :: cette librairie n'est pas sre du point de vue SMP.
  Il devrait nanmoins tre possible de la faire fonctionner dans un
  environnement thread en insrant des verrous dans son code source.


  22..33..55..  AAuuttrreess ppooiinnttss ccoonncceerrnnaanntt llaa pprrooggrraammmmaattiioonn SSMMPP


  1. OO ppuuiiss--jjee ttrroouuvveerr pplluuss dd''iinnffoorrmmaattiioonnss ssuurr llaa pprrooggrraammmmaattiioonn
     ppaarraallllllee ??

     Voyez Linux Parallel Processing HOWTO
     <http://yara.ecn.purdue.edu/~pplinux/PPHOWTO/pphowto.html>

     Beaucoup d'informations utiles se trouvent sur Parallel Processing
     using Linux <http://yara.ecn.purdue.edu/~pplinux/>

     Voyez aussi Linux Threads FAQ <http://linas.org/linux/threads-
     faq.html>


  2. EExxiissttee--tt--iill ddeess pprrooggrraammmmeess oouu ddeess lliibbrraaiirriieess uuttiilliissaanntt lleess tthhrreeaaddss
     ??

     Oui. Pour les programmes vous devriez regarder  Multithreaded
     programs on linux <http://www.informatik.uni-
     bremen.de/~hollow/mthread.html> (j'adore les liens hypertextes, le
     saviez vous ? ;))

     En ce qui concerne les librairies :


     OOppeennGGLL MMeessaa lliibbrraarryy
        Grce  DDaavviidd BBuuccccaarreellllii, aannddrreeaass SScchhiifffflleerr et EEmmiill BBrriiggggss, il
        existe une version multithread ( l'heure actuelle [1998-05-11],
        une version fonctionne et permet d'obtenir un accroissement de
        5-30% avec certaines suites de test OpenGL).  La partie
        multithread est maintenant incluse dans la distribution Mesa
        officielle comme une option exprimentale. Pour plus
        d'information, voyez Mesa library
        <http://www.ssec.wisc.edu/~brianp/Mesa.html>


     BBLLAASS
        BLAS et FFTs optimiss Pentium pro pour Intel Linux
        <http://www.cs.utk.edu/~ghenry/distrib/>

        Les routines multithread BLAS ne sont pas disponibles pour
        l'instant, mais une librairie multithread est prvue pour
        1998-05-27, voir Blas News
        <http://www.cs.utk.edu/~ghenry/distrib/blasnews> pour plus de
        dtails.


     TThhee GGIIMMPP
        EEmmiill BBrriiggggss, la mme personne qui est implique dans la version
        multithread de MESA, est aussi en train de travailler sur la
        version multithread des plugins de The Gimp. Voyez
        http://nemo.physics.ncsu.edu/~briggs/gimp/index.html pour plus
        d'info.






  33..  QQuueessttiioonnss ssppcciiffiiqquueess  ll''aarrcchhiitteeccttuurree xx8866


  33..11..  PPoouurrqquuooii cceellaa nnee mmaarrcchhee--tt--iill ppaass aavveecc mmaa mmaacchhiinnee ??


  1. PPuuiiss--jjee uuttiilliisseerr llee mmooddee SSMMPP aavveecc uunn CCPPUU CCyyrriixx//AAMMDD//nnoonn--IInntteell ??

     RRppoonnssee ccoouurrttee:: non.


     RRppoonnssee lloonngguuee Intel rvendique la proprit sur les plan APIC SMP,
     et tant qu'une compagnie ne prend pas de licence d'Intel pour cela,
     ils ne peuvent pas l'utiliser.  Aucune compagnie ne l'a fait pour
     l'instant. Cela peut videment changer dans le futur. A titre
     anecdotique, Cyrix et AMD adhrent au standard non-propritaire
     OpenPIC SMP mais actuellement il n'existe pas de carte mre
     l'utilisant.


  2. PPoouurrqquuooii mmoonn vviieeuuxx CCoommppaaqq nnee ffoonnccttiioonnnnee--tt--iill ppaass ??

     Mettez le en mode compatibilit MP1.1/1.4.

     Vrifiez "Configure Hardware" -> "View / Edit details" -> "Advanced
     mode" (F7 je pense) pour les options de configuration "APIC mode"
     et cochez "full Table mode". Il s'agit d'une recommandation
     officielle de Compaq (DDaanniieell RRooeesseenn).

     AAddrriiaann PPoorrtteellllii :

     a. Pressez F10 quand le serveur dmarre afin d'entrer dans
        l'utilitaire de configuration systme (System Configuration
        Utility)

     b. Pressez Entre pour effacer l'cran de dmarrage

     c. Pressez immdiatement CTRL+A

     d. Un message apparatra vous informant que vous tes maintenant en
        "Advanced Mode"

     e. Slectionnez ensuite "Configure Hardware" -> "View / Edit
        details"

     f. Vous verrez alors les rglages avancs (mlangs avec les
        rglages ordinaires)

     g. Descendez jusqu'au "APIC Mode" et slectionnez alors "Fully
        Mapped"

     h. Sauvegardez les changements et redmarrez


  3. PPoouurrqquuooii mmoonn AALLRR nnee ffoonnccttiioonnnnee--tt--iill ppaass ??

     De RRoobbeerrtt HHyyaatttt: ALR Revolution quad-6 semble  peu prs sre,
     alors que quelques machines Revolution quad plus vieilles sans
     processeurs P6 ne semble pas "fiables"...


  4. PPoouurrqquuooii mmaa mmaacchhiinnee SSMMPP eesstt--eellllee ssii lleennttee ?? ou PPoouurrqquuooii uunn
     pprroocceesssseeuurr mmoonnttrree--tt--iill uunnee vvaalleeuurr bbooggoommiippss bbaassssee eett ppaass ll''aauuttrree ??

     De AAllaann CCooxx: si un de vos processeurs rapporte une valeur bogomips
     trs basse, son cache n'est pas activ. Votre vendeur vous 
     probablement fournis un BIOS bogu. Obtenez un patch pour
     contourner cela ou mieux retournez la  votre vendeur et achetez
     une carte mre chez un fournisseur comptent.

     Un noyau 2.0 (> 2.0.36) contient un patch MTRR qui devrait rsoudre
     ce problme (slectionnez l'option "handle buggy SMP BIOSes with
     bad MTRR setup" dans le menu "General setup").

     Je pense que les BIOS SMP bogus sont pris en charge
     automatiquement dans les derniers noyaux 2.2.


  5. JJ''aaii eenntteenndduu ddiirree qquuee ddeess mmaacchhiinneess IIBBMM aavvaaiieenntt ddeess pprroobbllmmeess


     Certaines machines IBM possdent le bloc BIOS MP1.4 dans l'EBDA.
     C'est autoris mais pas support en dessous des noyaux 2.2.

     Il y a une vieille machine IBM SMP base sur des 486SLC. Linux/SMP
     requiert un support FPU matriel.


  6. LLeess ssppcciiffiiccaattiioonn MMPP 11..44 pprrsseenntteenntt--eelllleess uunn qquueellccoonnqquuee aavvaannttaaggee
     vviiss----vviiss ddeess ssppcciiffiiccaattiioonnss 11..11 ??

     Non (selon Alan :) ), 1.4 est juste une spcification plus stricte
     de 1.1.


  7. PPoouurrqquuooii ll''hhoorrllooggee ddrriivvee--tt--eellllee ssii rraappiiddeemmeenntt qquuaanndd llaa mmaacchhiinnee
     ffoonnccttiioonnnnee eenn mmooddee SSMMPP ??


     Il s'agit d'un problme connu avec la gestion des IRQ et les
     blocages noyau longs dans la srie 2.0 des noyaux. Pensez  mettre
      jour votre systme vers un 2.2 plus rcent.

     De JJaakkoobb OOeesstteerrggaaaarrdd: ou pensez  utiliser xntpd. Cela devrait
     garder votre horloge  l'heure. Je pense avoir entendu qu'activer
     RTC dans le noyau corrigeait aussi le problme de drive de
     l'horloge. a a march pour moi, mais j'ignore si cela est gnral
     ou si j'ai juste t chanceux !


     Certaines corrections du noyau dans les derniers 2.2.x devraient
     rsoudre ce problme.



  8. PPoouurrqquuooii mmeess pprroocceesssseeuurrss ssoonntt--iillss nnuummrroottss 00 eett 22 aauu lliieeuu ddee 00 eett
     11 ((oouu aauuttrree nnuummrroottaattiioonn bbiizzaarrrree)) ??

     Le numro du processeur est fix par le fabricant de la carte mre
     et ne veut absolument rien dire. Ignorez le.


  9. MMoonn ssyyssttmmee qquuaaddrruuppllee XXeeoonn ppllaannttee ddss qquu''iill aa ddccoommpprreessss llee nnooyyaauu

     (DDoouugg LLeeddffoorrdd) Essayez de recompiler LILO avec le support
     LARGE_EBDA et faites attention  bien toujours utiliser bzImage
     quand vous compilez le noyau. Cela semble avoir rsolu le problme
     de plantage au dmarrage ici sur une carte mre Intel multi-Xeon.
     Notez cependant que cela semble aussi affecter LILO en ceci que
     l'option root= ne fonctionne plus. Faites donc bien attention
     d'avoir appliqu 'rdev'  votre noyau au moment o vous lancerez
     LILO afin d'tre sur que votre noyau charge correctement le systme
     de fichier racine au dmarrage.


     (RRoobbeerrtt MM.. HHyyaatttt) Avec 3 processeurs, avez-vous un terminateur dans
     le 4me emplacement ?


  10.
     DDuurraanntt llee ddmmaarrrraaggee llaa mmaacchhiinnee ppllaannttee eenn ssiiggnnaallaanntt uunn pprroobbllmmee
     IIOOAAPPIICC

     Essayez l'option de dmarrage "noapic" (JJoohhnn AAllddrriicchh) et/ou
     "reboot=bios" (TTeerrrryy SShhuullll).


  11.
     MMoonn ssyyssttmmee ssee bbllooqquuee lloorrss ddee ttrraaffiicc NNFFSS iinntteennssee

     Essayez le dernier noyau 2.2.x et le patch knfsd. Cela est en cours
     d'investigation.  (WWaaddee HHaammppttoonn)



  12.
     MMoonn ssyyssttmmee bbllooqquuee ssaannss mmeessssaaggee ooooppss

     Si vous utilisez les noyaux 2.2.11 ou 2.2.12, rcuprez le dernier
     noyau. Par exemple 2.2.13 possde de nombreuses corrections SMP.
     Plusieurs personnes ont rapport ces noyaux comme instables pour le
     SMP. Ces mmes noyaux peuvent avoir des problmes NFS qui
     provoqueraient des blocages. Aussi, utilisez une console srie pour
     capturer vos messages oops. (WWaaddee HHaammppttoonn)

     Si le problme persiste (et que les suggestions sur cette liste
     n'ont pas aid davantage), vous devriez alors essayer les derniers
     noyaux 2.3. Ils ont un code SMP/APIC plus bavard (et plus robuste)
     et un code de prvention contre les blocages durs qui produit des
     oops plus significatifs au lieu de planter en silence (IInnggoo
     MMoollnnaarr).

     (OOssaammuu AAookkii) Vous DEVEZ aussi _d__s_a_c_t_i_v_e_r toutes les fonctionnalits
     du BIOS lies  l'conomie d'nergie. Exemple d'une bonne
     configuration (Dual Celeron 466 Abit BP6) :

     ___________________________________________________________________
      POWER MANAGEMENT SETUP.
        ACPI:              Disabled
        POWER MANAGEMENT:  Disabled
        PM CONTROL by APM: No
     ___________________________________________________________________


  Si les fonctions d'conomie d'nergie sont actives, des plantages
  alatoires peuvent se produire


  13.
     DDbboogguueerr ddeess bbllooccaaggeess

     (item par WWaaddee HHaammppttoonn)

     Un bon moyen de dboguer les blocages consiste  se procurer le
     patch ikd de Andrea Arcangeli:
     ftp://ftp.suse.com/pub/people/andrea/kernel-patches

     Il y a plusieurs options de dbogage. N'utilisez PAS l'option de
     blocage logicielle ! Pour des machines SMP rcentes, activez
     l'option kernel debugging et ensuite l'option NMI oopser. Afin de
     vrifier que le NMI oopser fonctionne, aprs avoir dmarr avec
     votre nouveau noyau, excutez un /cat /proc/interrupts et vrifiez
     que vous obtenez des NMI.  Quand la machine se bloque, vous devriez
     obtenir un oops.

     Vous pouvez aussi essayer l'option %eip. Elle autorise le noyau 
     crire sur la console l'adresse %eip  chaque fois qu'une fonction
     du noyau est appele.  Quand la machine se bloque, crivez sur un
     papier la premire colonne ordonne selon la seconde colonne et
     cherchez ensuite les adresses dans le fichier System.map. Ca ne
     marche qu'en mode console.

     Notez que l'utilisation d'une console srie facilite grandement le
     dbogage des blocages noyau, qu'ils soient SMP ou non !


  14.
     MMeessssaaggeess ""AAPPIICC eerrrroorr iinntteerrrruupptt oonn CCPPUU##nn,, sshhoouulldd nneevveerr hhaappppeenn"" ddaannss
     lleess llooggss

     Un message comme:






     ___________________________________________________________________
     APIC error interrupt on CPU#0, should never happen.
     ... APIC ESR0: 00000002
     ... APIC ESR1: 00000000
     ___________________________________________________________________


  indique la rception d'une erreur de calcul de code d'intgrit. Linux
  ne peut en tre responsable car la partie calcul des messages APIC est
  compltement matrielle. Il peut s'agir d'un problme matriel
  marginal. Tant que vous ne percevez pas d'instabilit, ils ne sont pas
  problmatiques. Les messages APIC sont renvoys jusqu' ce qu'il
  soient dlivrs (IInnggoo MMoollnnaarr).



  33..22..  CCaauusseess ppoossssiibblleess ddee ppllaannttaaggeess

  Dans cette section vous trouverez quelques information sur les causes
  ppoossssiibblleess de plantage sur une machine SMP (merci  JJaakkoobb sstteerrggaaaarrdd
  pour cette partie).  Autant que je sache (David), les problmes
  voqus ici sont spcifiques aux plate-formes Intel.



    PPrroobbllmmeess ddee rreeffrrooiiddiisssseemmeenntt

     De RRaallff BBcchhllee: (concernant la taille des botiers et les
     ventilateurs) il est important que l'air circule.  Bien sr, ce
     n'est pas possible quand toutes sortes d'obstacles, tels des
     cbles, l'en empchent dans des botiers par trop exigus.  D'un
     autre ct, j'ai vu des botiers surdimensionns provoquer de gros
     problmes. Il existe des botiers au format tour sur le march qui
     s'avrent actuellement pire  rafrachir que des botiers au format
     bureau.  En bref, la meilleure chose  faire est de penser 
     l'arodynamique dans le botier. Des botiers supplmentaires pour
     les priphriques dgageant de la chaleur sont galement utiles.

     Bien sr vous pouvez toujours aller chez Radio Shack (ou similaire)
     et acheter un ventilateur. Vous pouvez utiliser lm_sensor pour
     surveiller la temprature des processeurs PII et PIII. Cela peut
     vous aider  dterminer si la chaleur est un problme ou non (WWaaddee
     HHaammppttoonn).


    MMaauuvvaaiissee bbaarrrreettttee ddee mmmmooiirree

     N'achetez pas de la RAM bon march et ne mlangez pas des barrettes
     diffrente sur une mme carte mre.

     Les cartes mres Tyan sont tout particulirement connues pour leur
     susceptibilit sur la vitesse de la RAM (voir le paragraphe ci-
     dessous sur Tyan pour une solution ventuelle).

     Il y a eu des rapports sur des mmoire RAM PC 100  10ns vendues
     avec des cartes mres dont le processeur avait vraiment besoin de
     RAM  8ns (WWaaddee HHaammppttoonn).


    MMaauuvvaaiissee ccoommbbiinnaaiissoonn ddee pprroocceesssseeuurrss ddee ffrrqquueenncceess ddiiffffrreenntteess

     Vrifiez /proc/cpuinfo pour voir si vos processeurs fonctionnent 
     la mme cadence.



    SSii vvoottrree ssyyssttmmee eesstt iinnssttaabbllee,, SSUURRTTOOUUTT nnee ll''oovveerrcclloocckkeezz ppaass !!

     D'ailleurs, mme s'il est stable, ne le surcadencez pas.


     De RRaallff BBcchhllee: le surcadencement pose des problmes trs subtils.
     J'ai un bel exemple: une de mes vieilles machines surcadences
     commet des erreurs de calcul pour quelques pixels d'une fractale de
     640 X 400. Le problme est seulement visible quand on les compare
     en utilisant des outils.  Le mieux est donc de ne _j_a_m_a_i_s_, _n_e_v_e_r_,
     _n_u_n_c_a_s_, _n_i_e_m_a_l_s surcadencer.


    NNooyyaauuxx 22..00..xx eett EEtthheerrnneett rraappiiddee (de RRoobbeerrtt GG.. BBrroowwnn)

     Les noyaux 2.0.x sur des systmes Ethernet rapide et hautes
     performances ont des problmes significatifs (et connus) avec les
     conditions de course/inter-blocage (race/deadlock) dans la prise en
     charge des interruptions rseau.


     La solution consiste  obtenir la dernire version des pilotes
     100BT en cours de dveloppement  CESDIS Linux Ethernet device
     drivers site <http://cesdis.gsfc.nasa.gov/linux/drivers/> (ceux qui
     sont au point dfinissent SMPCHECK).


    UUnn bboogguuee ddaannss llee cchhiippsseett 444400FFXX (de EEmmiill BBrriiggggss)

     Si votre systme utilise le chipset 440FX alors les problmes de
     blocage sont peut-tre ds  une erreur (documente) du chipset. En
     voici la rfrence:


     Intel 440FX PCIset 82441FX (PMC) et 82442FX (DBX) Specification
     Update.  pg. 13


     http://www.intel.com/design/pcisets/specupdt/297654.htm


     Le problme peut se rsoudre avec un contournement par le BIOS (ou
     un patch du noyau). David Wragg a crit un patch qui est inclus
     dans le patch MTRR de Richard Gooch's. Pour plus d'informations
     ainsi qu'un descriptif de solution, voyez ici:


     http://nemo.physics.ncsu.edu/~briggs/vfix.html


    NNEE PPAASS llaanncceerr eemmmm338866..eexxee aavvaanntt ddee ddmmaarrrreerr LLiinnuuxx SSMMPP

     De MMaarrkk DDuugguuiidd, Rgle implicite #1 avec une carte mre W6LI. ;)


    SSii llaa mmaacchhiinnee rreeddmmaarrrree//ggllee aauu bboouutt dd''uunn mmoommeenntt,, iill ppeeuutt yy aavvooiirr
     ddeeuuxx bboonnnnee rraaiissoonnss lliieess  llaa mmmmooiirree eett aauu BBIIOOSS (JJaakkoobb sstteerrggaaaarrdd)

    Si le BIOS est muni de rglages comme "memory hole at 16M" et/ou
     "OS/2 memory > 64MB", essayez de les dsactiver tous les deux.
     Linux ne ragit pas toujours trs bien  ces deux options.

    Si vous avez plus de 64 MB de mmoire dans votre machine, et que
     vous spcifiez manuellement le chiffre exact dans la configuration
     de LILO, vous devriez spcifier 1 MB de moins que ce vous avez
     rellement dans votre machine. Si vous avez 128 MB, votre ligne
     dans votre lilo.conf ressemble : append="mem=127M"

    SSooyyeezz aavveerrttiiss ddeess pprroobbllmmeess ccoonncceerrnnaanntt lleess IIRRQQ

     Parfois, certaines cartes ne sont pas reconnues ou peuvent
     dclencher des conflits d'IRQ. Essayez de mettre les cartes sur des
     slots diffrents et si possible de les assigner  des IRQ
     diffrentes.


     Contribution de hhAASSCCIIII : enlever la ligne "append="hisax=9,2,3"
     dans lilo.conf autorisant  utiliser un noyau de la srie 2.1.xx
     avec le support ISDN + Hisax activ. Les noyaux de la srie 2.0.xx
     ne posent pas ce genre de problme.


     Essayez aussi de configurer les option de configuration du BIOS
     comme "MP 1.4 mode" ou "route PCI interrupts through IOAPIC" ou "OS
     Type" configur ni pour DOS ni pour Novell (IInnggoo MMoollnnaarr).



    UUttiilliissaattiioonn ssiimmuullttaannee dduu lleecctteeuurr ddee ddiissqquueetttteess ddee llaa ssoorrttiiee ssoonn

     Si vous bloquez alors que vous essayez d'accder au lecteur de
     disquettes (par exemple pendant que du son est jou) vous devriez
     peut-tre diter le fichier drivers/pci/quirks.c et positionner
     /int isa_dma_bridge_buggy = 1;. Le problme se manifeste avec mon
     Dell WS400 dual PII/300, 2.2.x, SMP (WWaaddee HHaammppttoonn).



  33..33..  IInnffoorrmmaattiioonnss ssppcciiffiiqquueess aauuxx ccaarrtteess mmrreess

  _N_o_t_e_z que des informations plus prcises peuvent tre trouves avec la
  liste des Cartes mre supposes fonctionner sous Linux SMP
  <http://www.nlug.org/smp/>



  33..33..11..  CCaarrtteess mmrreess aavveecc ddeess pprroobbllmmeess ccoonnnnuuss


    Aucune pour l'instant


  33..44..  MMaacchhiinnee SSMMPP LLiinnuuxx  bbaass pprriixx ((mmaacchhiinnee ddoouubbllee CCeelleerroonn))

  (SSttpphhaannee ccoolliivveett)


  Les machines SMP Linux les moins chres avec des processeurs
  disponibles de nos jours sont les systmes double Celeron. Un tel
  systme n'est pas officiellement possible selon Intel. On a intrt 
  vrifier qu'il s'agit bien de Celerons de seconde gnration, ceux
  avec 128 Kb de cache L2.


  33..44..11..  EEsstt--iill ppoossssiibbllee ddee ffaaiirree ffoonnccttiioonnnneerr uunnee mmaacchhiinnee ddoouubbllee
  CCeelleerroonn ??

  RRppoonnssee ooffffiicciieellllee dd''IInntteell :: non, le Celeron ne peut pas fonctionner
  en mode SMP.



  RRppoonnssee pprraattiiqquuee :: c'est possible, mais cela demande une modification
  matrielle pour les processeurs Slot 1. La manipulation est dcrite
  par Tomohiro Kawada sur sa page Dual Celeron System
  <http://kikumaru.w-w.ne.jp/pc/celeron/index_e.html>.  Naturellement,
  de telles modifications annulent la garantie... Certaines versions du
  processeur Celeron sont aussi disponibles au format Socket 370.  Dans
  ce cas, l'altration peut-tre faite sur l'adaptateur Socket 370 
  Slot 1 qui peut mme tre vendu pr-cabl pour une utilisation SMP
  (AAnnddyy PPoolliinngg, HHaannss -- EErriikk SSkkyyttttbbeerrgg, JJaammeess BBeeaarrdd).


  Il existe aussi une carte mre (ABIT BP6) autorisant l'insertion de
  deux Celerons dans le format Socket 370 (MMaarrttiijjnn KKrruuiitthhooff, RRyyaann
  MMccCCuuee), l'ABIT Computer BP6 vrifie, teste et supporte sous linux
  avec deux ppga socket 370 (AAnnddrree HHeeddrriicckk).


  33..44..22..  CCoommmmeenntt LLiinnuuxx ssee ccoommppoorrttee--tt--iill ssuurr lleess ssyyssttmmeess ddoouubbllee CCeelleerroonn
  ??

  Bien, merci.


  33..44..33..  QQuu''eenn eesstt--iill ddeess ssyyssttmmeess ddoouubblleess CCeelleerroonn ??  LLeess pprroocceesssseeuurrss
  CCeelleerroonn ssoonntt rrppuuttss ppoouurr ttrree ffaacciilleemmeenntt ssuurrccaaddeennaabbllee..

  Cela ppeeuutt marcher. Nanmoins, surcadencer un tel systme n'est pas
  aussi facile que pour un monoprocesseur. Ce n'est franchement pas une
  bonne ide pour un systme de production. Pour une utilisation
  personnelle, des systmes double Celeron 300 A fonctionnant
  parfaitement  450 MHz ont t signals (ddee nnoommbbrreeuusseess ppeerrssoonnnneess).


  33..44..44..  EEtt uunn ssyyssttmmee qquuaaddrruuppllee CCeelleerroonn ??

  C'est impossible. Les processeurs Celerons possdent  peu prs les
  mmes fonctionnalits qu'un Pentium II basique. Si vous voulez plus de
  deux processeur dans votre systme, vous devriez regarder du ct des
  machines  base de Pentium Pro, Pentium II Xeon ou Pentium III (?).


  33..44..55..  PPoouurrqquuooii nnee ppaass mmllaannggeerr CCeelleerroonn eett PPeennttiiuumm IIII ??

  Un systme utilisant un Celeron "r-autoris" et un Pentium II  la
  mme cadence ppeeuutt tthhoorriiqquueemmeenntt fonctionner.

  AAlleexxaannddrree CChhaarrbbeeyy  fabriqu un tel systme:

    Carte mre Asus P2B-D, proc 1: Celeron 366, proc 2: Pentium II
     400@266

    Les frquences de bus 66Mhz et 75Mhz furent fonctionnelles

    Le processeur le plus rapide (dans ce cas le Celeron) doit tre
     plac sur le deuxime slot. Inverser les processeurs (le plus
     rapide en premier) conduit rapidement  un chec.


  44..  QQuueessttiioonnss ssppcciiffiiqquueess  ll''aarrcchhiitteeccttuurree SSppaarrcc



  44..11..  QQuueelllllleess ssoonntt lleess mmaacchhiinneess SSppaarrcc ssuuppppoorrtteess ??

  Citation de la page web UltraLinux <http://ultra.linux.cz/> (systmes
  SMP seulement):
    Workstation UltraSPARC  base de PCI: Ultra60, Ultra450

    Serveurs UltraSPARC  base de SBUS: Enterprise 1, 2, 150

    Serveurs large UltraSPARC  base de SBUS: Enterprise 3000, 4000,
     5000, 6000, 10000

    Serveurs UltraSPARC  base de PCI : Enterprise 250, 450

    Machines SPARC sun4m SMP (AAnnttoonn BBllaanncchhaarrdd)

  UltraLinux a fonctionn sur une machine de 14 processeurs (voir la
  sortie dmesg <http://lwn.net/1998/1210/a/dm-sparc.html>).


  44..22..  PPrroobbllmmeess ssppcciiffiiqquueess aauu ssuuppppoorrtt SSMMPP SSppaarrcc

  (DDaavviidd MMiilllleerr) Il ne devrait pas y avoir d'inquitudes.

  Le seul problme connu et que nous n'avons pas l'intention de
  corriger, consiste en ce qu'un noyau SMP compil pour des systmes
  32bits (ie.  non-ultrasparc) ne fonctionnera pas sur les systmes
  sun4c.


  44..33..  LLiimmiitteess SSMMPP ssppcciiffiiqquueess aauu nnooyyaauu ccoouurraanntt ((22..22))

  DDaavviidd MMiilllleerr: il y a un bug dans le fichier d'en-tte
  include/linux/tasks.h, cela ncessite de dfinir NR_CPUS  64 sur
  UltraSparc puisqu'il s'agit de la limite suprieure pour le matriel
  que nous supportons :-)


  55..  QQuueessttiioonnss ssppcciiffiiqquueess  ll''aarrcchhiitteeccttuurree PPoowweerrPPCC



  55..11..  QQuueelllllleess ssoonntt lleess mmaacchhiinneess PPPPCC ssuuppppoorrtteess ??


    Cartes mres PowerSurge (incluant UMAX s900)

    PowerMac

    Motorola MTX : support en cours de dveloppement. Les patches ne
     sont pas encore inclus dans le noyau principal (TTrrooyy BBeennjjeeggeerrddeess).

  (CCoorrtt DDoouuggaann) Non support: Systmes PPC RS/6000


  55..22..  PPrroobbllmmeess ssppcciiffiiqquueess ccoonncceerrnnaanntt llee ssuuppppoorrtt SSMMPP PPPPCC

  Rien. Compilation SMP normale (voir plus haut). Comme d'habitude,
  soyez attentif. Les modules sont spcifiques pour UP ou pour SMP.
  Recompilez les (PPaauull MMaacckkeerrrraass).


  66..  QQuueessttiioonnss ssppcciiffiiqquueess  ll''aarrcchhiitteeccttuurree AAllpphhaa


  66..11..  QQuueelllleess ssoonntt lleess mmaacchhiinneess AAllpphhaa ssuuppppoorrtteess ??

  GGeeeerrtteenn KKuuiippeerr : le SMP marche pour la plupart des serveurs AXP, sinon
  pour tous.


  JJaayy AA EEssttaabbrrooookk : le SMP semble fonctionner sur la plupart de nos
  machines [Compaq] avec deux processeurs ou plus. La liste de celles-ci
  comprend :

    AS2000/2100 (SABLE)

    AS4000/4100 (RAWHIDE)

    DS20 (DP264)

  En sont exclus :

    AS2100A (LYNX)

    TurboLaser bigboys (8200/8400)


  66..22..  PPrroobbllmmeess ssppcciiffiiqquueess aauu ssuuppppoorrtt SSMMPP AAllpphhaa

  Aucun (vraiment ? :-) ).


  77..  PPooiinntteeuurrss uuttiilleess


  77..11..  DDiivveerrss


    Parallel Processing en utilisant Linux
     <http://yara.ecn.purdue.edu/~pplinux/>

    Linux Parallel Processing HOWTO
     <http://yara.ecn.purdue.edu/~pplinux/PPHOWTO/pphowto.html>

    ((ddppaassss)) Page d'acceuille SMP Linux
     <http://www.uk.linux.org/SMP/title.html>

    linux-smp mailing list

     Pour ssoouussccrriirree, envoyez subscribe linux-smp dans le corps du
     message  majordomo@vger.rutgers.edu

     Pour se ddssiinnssccrriirree, envoyez unsubscribe linux-smp dans le corps du
     message  majordomo@vger.rutgers.edu

     Archives Linux SMP <http://www.linuxhq.com/lnxlists/linux-smp/>

     Archives Linux SMP  progressive-comp.com <http://www.progressive-
     comp.com/Lists/?l=linux-smp&r=1&w=2#linux-smp>

    La librairie pthread de Xavier Leroy
     <http://pauillac.inria.fr/~xleroy/linuxthreads/>

    Les Cartes mres qui parat-il marche avec Linux SMP
     <http://www.nlug.org/smp/>

    procps <http://www.cs.inf.ethz.ch/~rauch/procps.html>

    patch pour procps pour 2.2.x
     <http://queenbee.fhcrc.org/~warnes/procps>

    xosview <http://lore.ece.utexas.edu/~bgrayson/xosview.html>

    xosview pour 2.2.x
     <http://www.ima.umn.edu/~klee/linux/xosview-1.6.1-5a1.tgz>

    Performance SMP de Linux
     <http://www.phy.duke.edu/brahma/benchmarks.smp>

    CESDIS Linux Ethernet device drivers site
     <http://cesdis.gsfc.nasa.gov/linux/drivers/>

    Systmes Double Celeron <http://kikumaru.w-
     w.ne.jp/pc/celeron/index_e.html>



  77..22..  PPrrooggrraammmmeess eett lliibbrraaiirriieess mmuullttiitthhrreeaadd


    Linux Threads FAQ <http://linas.org/linux/threads-faq.html>

    Programmes multithread sur linux <http://www.informatik.uni-
     bremen.de/~hollow/mthread.html>

    BLAS et FFTs optimis Pentium pro pour Intel Linux
     <http://www.cs.utk.edu/~ghenry/distrib/> (pas disponible tout de
     suite, mais une librairie double processeurs est prvue pour le
     5/27/98. Pour plus de dtails, voir Blas News
     <http://www.cs.utk.edu/~ghenry/distrib/blasnews>).

    Librairie Mesa <http://www.ssec.wisc.edu/~brianp/Mesa.html>
     (support multithread exprimental)

    Plugins parallles pour The GIMP
     <http://nemo.physics.ncsu.edu/~briggs/gimp/index.html>



  77..33..  PPaattcchheess ssppcciiffiiqquueess SSMMPP


    Patches noyau de Forissier <http://www-
     isia.cma.fr/~forissie/smp_kernel_patch/>

    Patch pour un bug dans le chipset 440FX
     <http://nemo.physics.ncsu.edu/~briggs/vfix.html>

    Patch MTRR (dernire version: 1.9)
     <http://www.atnf.csiro.au/~rgooch/kernel-patches.html>

    PSET - Processor Sets for the Linux kernel
     <http://isunix.it.ilstu.edu/~thockin/pset/>

    Patches SMP de Ingo Molnar <http://www.redhat.com/~mingo/> (pour
     les esthtes seulement, s'il vous plat lisez linux-
     smp@vger.rutgers.edu)



  77..44..  CCoommppiillaatteeuurrss ppaarraalllllliisseeuurrss//ooppttiimmiisseeuurrss ppoouurr lleess mmaacchhiinneess
  558866//668866 (( SSuummiitt RRooyy ))


    Pentium Compiler Group <http://www.goof.com/pcg/> crateur de pgcc

    Absoft <http://www.absoft.com/> compilateur Fortran 90 et Fortran
     77

    The Portland Group, Inc. <http://www.pgroup.com/> supporte le
     standard OpenMP <http://www.openmp.org> pour la paralllisation
     Fortran sur Linux
    Pacific-Sierra Research Corporation <http://www.psrv.com/> contient
     un compilateur gratuit F90 pour Linux et aussi des compilateurs
     paralllisant pour SMP Linux

    Applied Parallel Research <http://s006.infomall.org/index.html>
     inclut actuellement des compilateurs paralllisant pour NT

    KAI <http://www.kai.com> offre un compilateur C++ pour Linux qui
     inclut OpenMPI. Il s'appelle Guide_OpenMP. Information 
     http://www.kai.com/parallel/kappro/guide (GGeerroo WWeeddeemmaannnn).


  88..  GGlloossssaarryy


    SSMMPP Multi-Processeur Symmtrique

    AAPPIICC Contrleur d'Interruptions Programmable Avanc

    tthhrreeaadd Un thread est l'activit processeur dans un processus.  Un
     mme processus peut avoir de multiples thread. Ces threads
     partagent l'espace adresse du processus et peuvent donc par-l
     partager des donnes.

    pptthhrreeaadd Posix thread, threads dfinie par le standard Posix.

    AAPPMM Gestion avance de l'nergie


  99..  QQuuooii ddee nneeuuff ??



     vv11..99,, 1133 jjaannvviieerr 22000000

       Rappel, dsactivation de toutes les fonctions de gestion
        d'nergie du BIOS (OOssaammuu AAookkii)

       Explication sur la manire d'accder au mode de configuration
        avanc du serveur Compaq (AAddrriiaann PPoorrtteellllii)


     vv11..88,, 88 nnoovveemmbbrree 11999999

       La carte mre quadruple celeron tait un canular, restauration
        de l'ancien paragraphe (SSiimmeenn TTiimmiiaann TThhoorreesseenn)


     vv11..77,, 66 nnoovveemmbbrree 11999999

       Nouvelle introduction (CC.. PPoolliisshheerr aka cp)

       De nombreuses corrections typographiques et grammaticales (cp)

       Paragraphe d'introduction sur la compilation du noyau (cp)

       Paragraphe d'introduction sur les besoins SMP (cp)

       Rfrence sur KAI un compilateur optimis (GGeerroo WWeeddeemmaannnn)

       Les cartes mres quadruple celeron existent (JJeeffffrreeyy HH.. IInnggbbeerr)


     vv11..66,, 2211 ooccttoobbrree 11999999


       Ajout d'information sur la perturbation horaire de xosview

       Ajout du message d'information "Erreur d'interruption APIC sur
        le CPU#n"

       Ajout d'information sur les blocages matriels

       Suppression de la section "Comment obtenir un maximum de
        performance" (obsolte)

       Ajout d'information sur les systmes double processeurs avec
        diffrents processeurs x86 (un Celeron et un PII)


     vv11..55,, 44 ooccttoobbrree 11999999

       Plus de prcision dans la description de PSET


     vv11..44,, 3300 sseepptteemmbbrree 11999999

       Prcision sur l'activation du support MTRR pour les noyaux SMP
        x86 (moi)


     vv11..33,, 2299 sseepptteemmbbrree 11999999

       Beaucoup beaucoup de corrections grammaticales et typographique
        (WWaaddee HHaammppttoonn aka hww)

       Ajout d'information dans la courte introduction  propos des
        diffrences entre 2.2/2.4/2.0 (hww)

       Ajout des choses  faire pas  pas pour recompiler le noyau (hww
        et moi)

       Ajout d'information concernant les problmes lis aux modules
        SMP/UP (hww)

       Ajout de prcision dans la section Threads Posix concernant les
        threads utilisateurs vs. les threads du noyau (hww)

       Nouvel item  propos de NFS et des blocages du noyau (hww)

       Nouvel item  propos des blocage noyau sans message d'alerte
        (hww)

       Nouvel item  propos du dbogage des problmes de blocage (hww)

       Ajout d'information  propos des problmes de dgagement de
        chaleur (hww)

       Divers mise  jour que j'ai oubli (hww)

       Nouvel item  propos des accs disquette et du son (hww)


     vv11..22,, 2277 sseepptteemmbbrree 11999999

       Changement de nom: ce document est maintenant un Howto.  TWD, et
        rapide! (GGuuyyllhheemm AAzznnaarr)


     vv11..11,, 2266 sseepptteemmbbrree 11999999


       Ajout d'un lien vers le premier brouillon de la FAQ de Chris
        Pirish

       Extension des problmes lis aux IRQ


     vv11..0000,, 2255 sseepptteemmbbrree 11999999

       Premire mise  jour depuis bien longtemps !

       Retraitement de toute la FAQ: le 2.2 est l et le 2.4 arrive

       Ajout des informations sur le verrouillage noyau de Ingo Molnar

       Suppression de l'item "Quelle seront les performance de mes
        applications sous SMP" : dpass

       Suppression de l'item "Mon systme SMP se verrouille tout le
        temps." : dpass

       Suppression de l'item "Vous utilisez le 2.0.35, n'est-ce pas
        ?" : dpass

       Suppression de l'item "Certains matriels sont aussi connu pour
        poser des problmes." : dpass

       Effacement de la section "Cartes mre avec des problmes
        connus". Nous devrions recommencer du dbut.

       Suppression de la section "Carte mre sans problmes connus" :
        dpasse

       Mise  jour de la section celeron (de nombreuses personnes)

       Ajout de "Les machines SPARC sun4m SMP" dans les machines Sparc
        supportes (AAnnttoonn BBllaanncchhaarrdd)

       Ajout de l'item "Durant le dmarrage la machine se bloque en
        signalant un problme IOAPIC" dans la section "Pourquoi cela ne
        marche-t-il pas sur ma machine ?"

       Ajout de l'item "A propos des performances SMP ?"

       Mise  jour de l'item "Pourquoi mon vieux Compaq ne marche-t-il
        pas ?"

       Rparation d'un lien dpass

       Ajout d'un pointeur vers les patches de test SMP d'Ingo


     vv00..5544,, 1133 mmaarrss 11999999

       Ajout de la section  propos des systmes SMP Alpha


     vv00..5533,, 0088 mmaarrss 11999999

       Ajout de la section sur les systmes PowerPC SMP


     vv00..5522,, 0077 mmaarrss 11999999

       Ajout de la section sur les systmes Sparc SMP


     vv00..5511,, 0066 mmaarrss 11999999

       Ajout de la section dual-celeron

       Suppression de la section Adaptec

       Mise  jour du lien procps

       Mise  jour du lien xosview

       Ajout d'une rponse pour le plantage du quadri Xeon

       Mise  jour de l'item  propos du patch de la glibc pour gd :
        devrait tre inclus dans la RH 5.2


     vv00..5500,, 0033 ffvvrriieerr 11999999

       Mise  jour du lien "Programmes Multithread sous linux"


     vv00..4499,, 1133 jjaannvviieerr 11999999

       Mise  jour  propos de CONFIG_SMP. Ajout du .txt dans
        Documentation/smp. (MMiicchhaaeell EElliizzaabbeetthh CChhaassttaaiinn)


     vv00..4488,, 1100 ddcceemmbbrree 11999988

       Fautes d'orthographes corrige. Adresses email corrige.


     vv00..4477,, 2200 nnoovveemmbbrree 11999988

       Ajout de la mention du patch MTRR est inclus 2.0.36 (li  des
        problme de BogoMips)


     vv00..4466,, 1100 nnoovveemmbbrree 11999988

       Mise  jour  propos des cartes mre Epox KP6-LS


     vv00..4455,, 2255 ooccttoobbrree 11999988

       Correction d'une erreur concernant le fichier /proc/stat

       Ajout d'un pointeur vers le site CESDIS Ethernet Linux Drivers


     vv00..4444,, 1144 ooccttoobbrree 11999988

       Mise  jour du lien vers la page web :  _C_a_r_t_e_s _m__r_e _s_u_p_p_o_s__e_s
        _f_o_n_c_t_i_o_n_n_e_r _s_o_u_s _L_i_n_u_x _S_M_P

       Ajout de l'explication de Jakob : comment chronomtrer un
        systme SMP avec les noyaux 2.0


     vv00..4433,, 99 sseepptteemmbbrree 11999988

       Mise  jour de la premire question dans la section 3.1

       Mise  jour du lien mt-Mesa : multithread est maintenant inclus
        comme exprimental dans la distribution Mesa

     vv00..4422,, 22 sseepptteemmbbrree 11999988

       Mise  jour cosmtique dans la section 3.3

       Deux liens sont marquer comme obsoltes (Multithreaded Mesa et
        performance SMP)

       Mise  jour de l'item  propos des threads et des exceptions en
        C++ (sect 3.3)


     vv00..4411,, 11 sseepptteemmbbrree 11999988

       Ajout d'une section majeur: "3.3 Programmation SMP" crite par
        Jakob stergaard

       Dplacement de la section "3.2 Cot utilisateur" vers la section
        3.3


     vv00..4400,, 2277 aaoott 11999988

       Mise  jour: section 3.1, item 7: processor affinity


     vv00..3399,, 2277 aaoott 11999988

       Mise  jour ncessaire du BOIS Award pour les cartes mres Tyan
        (hhAASSCCIIII)

       Ajout d'un item sur les IRQ dans la section plantage (moi et
        hhAASSCCIIII)

       Ajout du bon support de l'Asus P2B-DS (UUllff RRoommppee)

       Ajout d'une autre archive smp-list dans la section pointeur
        (HHaannkk LLeeiinniinnggeerr)


     vv00..3388,, 88 aaoott 11999988

       Ajout d'un pointeur vers la FAQ Linux Threads


     vv00..3377,, 3300 JJuuiilllleett 11999988

       EEmmiill BBrriiggggss est en train de travailler sur des plugins
        parallles pour Gimp (voir "Existe-t-il des programmes ou des
        library utilisant les threads ?", section "Cot utilisateur")


     vv00..3366,, 2266 JJuuiilllleett 11999988

       Merci  JJaakkoobb sstteerrggaaaarrdd, deux changement dans "Possible causes
        of Crash"

       Chang le 2.0.33 pour le 2.0.35 (dernier noyau stable)

       Ajout de la section "Les plantages lis au BIOS"


     vv00..3355,, 1144 JJuuiilllleett 11999988

       Ajout des N440BX Server Board dans carte-mre-sans-aucun-
        problme

       Ajout d'une success story pour la carte mre GigaByte avec une
        mise  jour du BIOS

       Ajout de la section "Comment obtenir les performances maximum ?"
        (attend vos suggestions ;)


     vv00..3344,, 1100 jjuuiinn 11999988

       Ajout de la section "Parallelizing/Optimizing Compilers for
        586/686 i machines" dans la section "Useful Pointers", merci 
        SSuummiitt RRooyy

       Correction, "Asus P/I-UP5" est en fait "Asus P/I-P65UP5"


     vv00..3333,, 33 jjuuiinn 11999988

       Encore une success story avec une carte mre GigaByte DLX.

       Une astuce pour les cartes mre Tyan, dsactiver l'option "DRAM
        Fast Leadoff" du BIOS


     vv00..3322,, 2277 mmaaii 11999988

       Asus P/I-UP5 ajouter  la section carte-mre-sans-aucun-problme


     vv00..3311,, 1188 mmaaii 11999988

       Elitegroup P6LX2-A marche avec le 2.1.100 et le 101

       Les bugs doivent tre rapports linux-smp@vger.rutgers.edu


     vv00..3300,, 1122 mmaaii 11999988

       SuperMicro est maintenant une carte mre dans la section carte-
        mre-sans-aucun-problme


     vv00..2299,, 1111 mmaaii 11999988

       La success story d'une carte mre GigaByte 686 avec le 2.1.101

       Ajout d'un nouvel item dans la section "Cot utilisateur" :
        "Existe-t-il des programmes ou des library utilisant les threads
        ?"

       La library OpenGL Mesa library est en train de passer au
        multithread.  Cool! Voir la nouvelle section pour plus de
        dtails.


     vv00..2288,, 0099 mmaaii 11999988

       Un miroir US de cette FAQ est maintenant disponible (voir
        Introduction)

       Fusion de deux entres confuses, Gigabyte 686


     vv00..2277,, 0055 mmaaii 11999988


       Nouvelles informations pour les pilotes Adaptec et TekRam

       Les cartes mres Micronics W6-LI marche avec SMP



  1100..  LLiissttee ddeess ccoonnttrriibbuutteeuurrss

  Un grand merci  ceux qui m'ont aid  maintenir ce HOWTO:


  1. Tigran A. Aivazian

  2. John Aldrich

  3. Niels Ammerlaan

  4. H. Peter Anvin

  5. Osamu Aoki

  6. Guylhem Aznar

  7. Ralf Bchle

  8. James Beard

  9. Troy Benjegerdes

  10.
     Anton Blanchard

  11.
     Emil Briggs

  12.
     Robert G. Brown

  13.
     Alexandre Charbey

  14.
     Michael Elizabeth Chastain

  15.
     Samuel S. Chessman

  16.
     Alan Cox

  17.
     Andrew Crane

  18.
     Cort Dougan

  19.
     Mark Duguid

  20.
     Stphane colivet

  21.
     Jocelyne Erhel


  22.
     Jay A Estabrook

  23.
     Byron Faber

  24.
     Mark Garlanger

  25.
     hASCII

  26.
     Wade Hampton

  27.
     Andre Hedrick

  28.
     Claus-Justus Heine

  29.
     Benedikt Heinen

  30.
     Florian Hinzmann

  31.
     Moni Hollmann

  32.
     Robert M. Hyatt

  33.
     Jeffrey H. Ingber

  34.
     Richard Jelinek

  35.
     Tony Kocurko

  36.
     Geerten Kuiper

  37.
     Martijn Kruithof

  38.
     Doug Ledford

  39.
     Kumsup Lee

  40.
     Hank Leininger

  41.
     Ryan McCue

  42.
     Paul Mackerras

  43.
     Cameron MacKinnon

  44.
     Joel Marchand

  45.
     David Maslen

  46.
     Chris Mauritz

  47.
     Jean-Francois Micouleau

  48.
     David Miller

  49.
     Ingo Molnar

  50.
     Ulf Nielsen

  51.
     Jakob Oestergaard

  52.
     C Polisher

  53.
     Adrian Portelli

  54.
     Matt Ranney

  55.
     Daniel Roesen

  56.
     Ulf Rompe

  57.
     Jean-Michel Rouet

  58.
     Volker Reichelt

  59.
     Sean Reifschneider

  60.
     Sumit Roy

  61.
     Thomas Schenk

  62.
     Terry Shull

  63.
     Chris K. Skinner

  64.
     Hans - Erik Skyttberg

  65.
     Szakacsits Szabolcs

  66.
     Jukka Tainio

  67.
     Simen Timian Thoresen

  68.
     El Warren

  69.
     Gregory R. Warnes

  70.
     Gero Wedemann

  71.
     Christopher Allen Wing

  72.
     Leonard N. Zubkoff














































  SRM Firmware Howto
  Version  originale  : David Mosberger <mailto:davidm@azstar-
  net.com>   (Traduction    francaise    :    Nicolas    Jadot
  (njadot@etu.info.unicaen.fr))
  v0.5, 17 August 1996

  Ce  document  decrit  la  maniere  de demarrer une station Linux/Alpha
  utilisant le _f_i_r_m_w_a_r_e SRM, lequel est  normalement utilise pour demar-
  rer  Digital  Unix.  (NDT : le _f_i_r_m_w_a_r_e est un micro-code embarque sur
  une puce, en quelque sorte l'equivalent du BIOS des PC) En general, il
  est  preferable  d'utiliser MILO a la place du programme aboot sachant
  que MILO est parfaitement adapte aux besoins de Linux. Cependant, MILO
  n'existe pas sur tous les systemes et ne permet pas encore de demarrer
  sur un reseau. Dans ces cas la, utiliser la console SRM est  peut-etre
  la bonne solution.

  A  moins  que  vous soyiez interesses par les details techniques, vous
  pouvez passer directement a la section ``''

  11..  CCoommmmeenntt SSRRMM ddeemmaarrrree--tt--iill uunn ssyysstteemmee dd''eexxppllooiittaattiioonn ??

  Toutes les versions de SRM peuvent demarrer a partir d'un disque  SCSI
  et les versions destinees aux plates-formes recentes, comme les Noname
  et AlphaStations, peuvent de plus demarrer depuis  une  disquette.  Le
  demarrage  reseau  via  bootp  est  egalement supporte.  Notez que les
  anciennes versions de SRM (notamment celles pour Jensen) _n_e  _p_o_u_v_a_i_e_n_t
  _p_a_s  demarrer  depuis une disquette. Le demarrage depuis un disque IDE
  n'est pas supporte.

  Le demarrage de Linux avec SRM s'effectue en deux  etapes  :  d'abord,
  SRM charge et transfere le controle a un chargeur secondaire. Ensuite,
  ce chargeur secondaire met en  place  l'environnement  de  Linux,  lit
  l'image  du noyau depuis un systeme de fichiers sur disque et donne la
  main a Linux.

  A l'heure actuelle  il existe deux chargeurs secondaires pour Linux  :
  le  chargeur  _b_r_u_t   fourni  avec  le  noyau Linux et aboot, distribue
  separement. Ces deux chargeurs sont decrits en details ci-dessous.

  11..11..  CChhaarrggeerr llee cchhaarrggeeuurr sseeccoonnddaaiirree

  SRM est ignorant des  systemes  de  fichiers  et  des  partitions  des
  disques. Il s'attend simplement a ce que le chargeur secondaire occupe
  un certain nombre de secteurs physiques consecutifs, commencant a  une
  adresse   donnee.  L'information  concernant  la  taille  du  chargeur
  secondaire et l'adresse de son premier secteur est  stockee  dans  les
  512  premiers  octets.  Plus  precisement  ,  l'entier  long  occupant
  l'adresse 480 contient la  _t_a_i_l_l_e  du  chargeur  secondaire  et  celui
  occupant  l'adresse  488  donne  le  _n_o_m_b_r_e  _d_e  _s_e_c_t_e_u_r_s  de decalage
  jusqu'au debut du chargeur. Le premier secteur contient  egalement  un
  drapeau a l'adresse 496 qui vaut toujours 0 et une somme de controle a
  l'adresse 504. Cette somme de controle est simplement la somme des  63
  premiers entiers longs du premier secteur.

  Si cette somme est correcte, SRM continue et lit le nombre de secteurs
  indique par la _t_a_i_l_l_e en commencant par celui indique  dans  le  champ
  _n_u_m_e_r_o  _d_e  _s_e_c_t_e_u_r  et  les  place  en  memoire _v_i_r_t_u_e_l_l_e a l'adresse
  0x20000000. Si la lecture se termine avec succes, SRM effectue un saut
  a l'adresse 0x20000000.

  22..  LLee cchhaarrggeeuurr bbrruutt

  Les sources de ce chargeur peuvent etre trouves dans le repertoire

               linux/arch/alpha/boot

  des  sources  du  noyau  Linux.  Ce programme charge le noyau Linux en
  lisant START_SIZE  octets  en  commencant  a  l'adresse  BOOT_SIZE+512
  (egalement  en  octets).  Les  constantes START_SIZE et BOOT_SIZE sont
  definies dans le fichier  d'en-tete  linux/include/asm-alpha/system.h.
  START_SIZE  doit etre au moins aussi eleve que la taille de l'image du
  noyau (i.e, la somme des tailles des segments .text, .data, et .bss ).
  De  meme,  BOOT_SIZE  doit  etre  au  moins aussi eleve que l'image du
  chargeur. Ces deux constantes doivent avoir comme valeur  un  multiple
  entier  de  la  taille  d'un secteur, soit 512 octets. Les valeurs par
  defaut sont 2Mo pour START_SIZE et 16Ko pour BOOT_SIZE. Notez  que  si
  vous  voulez  demarrer  depuis  une  disquette  de  1.44Mo, vous devez
  reduire START_SIZE a 1400Ko et vous assurer que la taille du noyau que
  vous voulez demarrer ne depasse pas cette valeur.

  Pour  construire  un chargeur brut, tapez simplement make rawboot dans
  /usr/src/linux.  Ceci  devrait  produire  dans   arch/alpha/boot   les
  fichiers suivants :

     ttoooollss//llxxbboooott:
        Le premier secteur du disque. Il contient l'adresse et la taille
        du prochain fichier au format decrit ci-dessus.

     ttoooollss//bboooottllxx:
        Le lanceur brut qui chargera le fichier ci-dessous

     vvmmlliinnuuxx..nnhh:
        L'image brute du noyau constituee des segments .text,  .data  et
        .bss  du  fichier  objet /usr/src/linux/vmlinux. L'extension .nh
        indique que ce fichier n'a pas l'entete d'un fichier objet.

  La concatenation de ces trois fichiers  devrait  etre  ecrite  sur  le
  disque  a  partir  duquel  vous  voulez  demarrer.  Par  exemple, pour
  demarrer depuis une disquette, inserez une disquette  vierge  dans  le
  lecteur, soit /dev/fd0 et ensuite tapez :

       cat tools/lxboot tools/bootlx vmlinux >/dev/fd0

  Vous  pouvez  maintenant  arreter  le  systeme  et demarrer depuis une
  disquette en utilisant  la commande boot dva0.

  33..  LLee cchhaarrggeeuurr aabboooott

  Si vous utilisez le _f_i_r_m_w_a_r_e SRM, aboot  est  la  meilleure  facon  de
  demarrer Linux. Il supporte :

  +o  demarrage direct depuis divers systemes de fichiers (ext2, ISO9660,
     et UFS, le systeme de fichiers de Digital Unix),

  +o  lancement de fichiers objets executables (ELF et ECOFF),

  +o  lancement de noyaux compresses,

  +o  demarrage par reseau (en utilisant le protocole bootp),

  +o  table de partitions au format Digital  Unix  (compatible  avec  les
     tables de partitions de BSD),

  +o  demarrage  interactif et configurations par defaut des consoles SRM
     qui n'acceptent pas les longues chaines d'option.

  33..11..  SSee pprrooccuurreerr eett iinnssttaalllleerr aabboooott

  Les  codes  sources  les  plus  recents  d'aboot  sont  disponibles  a
  l'adresse                  ftp://ftp.azstarnet.com/pub/linux/axp/aboot
  <ftp://ftp.azstarnet.com/pub/linux/axp/aboot>. La  description  de  ce
  manuel s'applique a aboot pour les versions 0.5 et suivantes.

  Une  fois  que vous avez telecharge et extrait l'archive tar, jetez un
  oeil  aux  fichiers  README  et  INSTALL  pour  lire  les   directives
  d'installation.  En  particulier, assurez vous que les variables, dans
  les fichiers Makefile et include/config.h sont correctes vis-a-vis  de
  votre  environnement  .   Normalement,  vous  ne  devriez  pas avoir a
  changer quoi que ce soit pour compiler sous Linux, mais c'est toujours
  une  bonne chose de verifier. Si la configuration vous convient, tapez
  simplement make pour lancer la compilation (si  vous  n'effectuez  pas
  cette operation sous Linux, sachez que aboot requiert GNU make).

  Apres  l'execution  de  make, le repertoire aboot devrait contenir les
  fichiers suivants :

     aabboooott
        L'executable reel (fichier objet ECOFF ou ELF),

     bboooottllxx
        Comme ci-dessus, mais ce fichier ne contient  que  les  segments
        text, data et bss (ce fichier n'est pas un fichier objet),

     ssddiisskkllaabbeell//wwrriitteebboooott
        Un utilitaire pour installer aboot sur un disque dur,

     ttoooollss//ee22wwrriitteebboooott
        Un  utilitaire  pour  installer aboot sur un systeme de fichiers
        ext2 (n'est en general utilise que pour les disquettes),

     ttoooollss//iissoommaarrkkbboooott
        Un utilitaire pour installer aboot sur un  systeme  de  fichiers
        iso9660 (utilise par les distributeurs de CD-ROM),

     ttoooollss//aabboooottccoonnff
        Un utilitaire pour configurer aboot s'il est installe.

  33..22..  IInnssttaallllaattiioonn ssuurr ddiissqquueettttee

  Le  lanceur  peut  etre  installe  sur  une  disquette en utilisant la
  commande e2writeboot (note : ceci ne peut se faire sur un  Jensen  car
  son  _f_i_r_m_w_a_r_e n'implante pas le demarrage depuis une disquette). Cette
  commande necessite que le disque ne soit pas trop fragmente car elle a
  besoin  de  trouver  suffisament  de  secteurs  contigus  pour stocker
  l'image entiere de aboot (actuellement, environ 90Ko). Si  e2writeboot
  echoue  a  cause de ca, reformatez la disquette et reessayez (par ex.,
  avec fdformat(1)). Par exemple, la procedure suivante  installe  aboot
  sur  une  disquette  en supposant que la disquette est dans le lecteur
  correspondant a /dev/fd0 :

       fdformat /dev/fd0
       mke2fs /dev/fd0
       e2writeboot /dev/fd0 bootlx

  33..33..  IInnssttaallllaattiioonn ssuurr ddiissqquuee dduurr

  Sachant que  la  commande  e2writeboot  peut  echouer  sur  un  disque
  hautement  fragmente  et  comme  le reformattage d'un disque dur ne se
  fait pas sans peine, il est generalement plus  sur  d'installer  aboot
  sur  un  disque  dur  en utilisant la commande swriteboot.  swriteboot
  necessite que les premiers secteurs soient reserves aux procedures  de
  demarrage.  Nous suggerons que le disque soit partitionne de maniere a
  ce que la premiere partition commence a une  adresse  correspondant  a
  2048  secteurs.  Cela laisse 1Mo d'espace ibre pour stocker aboot. Sur
  un  disque  partitionne  de  cette  facon  ,  il  est  alors  possible
  d'installer  aboot comme decrit ci-dessous (en supposant que le disque
  correspond a /dev/sda.) :

       swriteboot /dev/sda bootlx

  Sur un Jensen, vous devrez laisser un peu plus d'espace,  sachant  que
  vous  devrez  egalement stocker le noyau a cet endroit - 2Mo devraient
  suffire en utilisant une image compressee. Utilisez  swriteboot  comme
  decrit a la section ``'' pour ecrire bootlx avec le noyau Linux.

  33..44..  IInnssttaallllaattiioonn ssuurr CCDD--RROOMM

  Pour  construire  un CD-ROM amorcable avec SRM, construisez simplement
  aboot comme decrit ci-dessus.  Assurez-vous  ensuite  que  le  fichier
  bootlx  est  present  sur le systeme de fichiers iso9660 (e.g., copiez
  bootlx dans le repertoire ou est monte le systeme de  fichiers)  ,  et
  lancez  mkisofs sur ce repertoire). Apres cela, la seule chose restant
  a faire est de marquer le systeme de  fichiers  comme  amorcable  avec
  SRM. Cela est realise grace a une commande de la forme :

       isomarkboot filesystem bootlx

  La   commande  ci-dessus  necessite  que  filesystem  est  un  fichier
  contenant le systeme de fichiers iso9660  et que bootlx  a  ete  copie
  dans la racine de ce systeme de fichiers. C'est tout !

  33..55..  CCoonnssttrruuiirree uunn nnooyyaauu LLiinnuuxx

  Un noyau Linux amorcable peut etre construit par les etapes suivantes.
  Durant le make config, assurez-vous de repondre  "oui"  (_"_y_e_s_")  a  la
  question concernant le lancement du noyau par SRM.

       cd /usr/src/linux
       make config
       make dep
       make boot

  La  derniere commande construira le fichier arch/alpha/boot/vmlinux.gz
  qui peut alors etre copie sur le disque a partir duquel  vous  desirez
  demarrer.  Dans  notre exemple precedent concernant la disquette, cela
  donnerai :

       mount /dev/fd0 /mnt
       cp arch/alpha/boot/vmlinux.gz /mnt
       umount /mnt

  33..66..  DDeemmaarrrreerr LLiinnuuxx

  Avec le  _f_i_r_m_w_a_r_e  SRM  et  aboot  installe,  le  demarrage  de  Linux
  s'effectue generalement avec une commande de la forme :

       boot _d_e_v_i_c_e_n_a_m_e -fi _f_i_l_e_n_a_m_e -fl _f_l_a_g_s

  Les  arguments  _f_i_l_e_n_a_m_e  et  _f_l_a_g_s  sont optionels. S'ils ne sont pas
  specifies, SRM utilise les  valeurs  par  defaut  contenues  dans  les
  variables  d'environnement BOOT_OSFILE et BOOT_OSFLAGS.  La syntaxe et
  la signification de ces deux arguments est decrite plus en detail  ci-
  dessous.

  33..66..11..  NNoomm dduu ffiicchhiieerr bboooott

  L'argument _f_i_l_e_n_a_m_e est de la forme :

       [_n/]_f_i_l_e_n_a_m_e

  _n  est  un simple nombre dans l'intervalle 1..8 qui donne le numero de
  la partition de demarrage. _f_i_l_e_n_a_m_e est le chemin d'acces au fichier a
  lancer.  Par  exemple,  pour  demarrer depuis la deuxieme partition du
  sixieme disque SCSI, vous entreriez :

       boot dka600 -file 2/vmlinux.gz

  Ou, pour demarrer depuis le premier lecteur de disquette :

       boot dva0 -file vmlinux.gz

  Si un disque n'a pas de table des partitions, aboot considere  que  le
  disque  contient  une  partition  ext2  commencant  au premier bloc du
  disque. Cela permet de demarrer depuis une disquette.

  Le numero de partition 0 est utilise pour demander le demarrage depuis
  un disque qui ne contient pas (encore) de systeme de fichiers. Si l'on
  specifie le numero de "partition" 0,  aboot  considere  que  le  noyau
  Linux  suit  directement  l'image  de aboot. Une telle chose peut etre
  realisee avec la commande swriteboot. Par exemple, pour configurer  un
  demarrage  sans  systeme  de  fichiers  depuis  /dev/sda,  on pourrait
  utiliser la commande :

       swriteboot /dev/sda bootlx vmlinux.gz

  Demarrer  un  systeme  de  cette  facon  n'est   pas   obligatoirement
  necessaire.  La raison d'etre de cette fonctionnalite est de permettre
  l'installation de Linux sur un systeme qui ne peut demarrer depuis une
  disquette (e.g., le Jensen).

  33..66..22..  DDrraappeeaauuxx ddee ddeemmaarrrraaggee

  Plusieurs  drapeaux de demarrage peuvent etre specifies. La syntaxe en
  est :

       -flags "options..."

  Ou "options..." est une combinaison des  options  suivantes  (separees
  par des espace). Il y a encore plus d'options, en fonction des pilotes
  que le noyau a installe. Les options listees ci-apres ne sont  la  que
  pour illustrer l'idee generale :

     llooaadd__rraammddiisskk==11
        Copie le systeme de fichiers racine depuis une disquette vers un
        disque virtuel en memoire avant de lancer le systeme. Ce  disque
        virtuel  sera  utilise  en lieu et place du peripherique racine.
        Ceci est utile pour  demarrer  Linux  sur  une  machine  qui  ne
        possede qu'un lecteur de disquettes.

     ffllooppppyy==_s_t_r

     rroooott==_d_e_v
        Selectionne  le  peripherique  _d_e_v  comme  systeme  de  fichiers
        racine. Le peripherique peut etre specifie comme la  combinaison
        des   numeros   _m_a_j_o_r_/_m_i_n_o_r   du   fichier  de  peripherique  en
        hexadecimal (e.g., 0x802 pour /dev/sda2) ou un nom de fichier de
        peripherique (e.g.,/dev/fd0, /dev/sda2).

     ssiinnggllee
        Lance le systeme en mode mono-utilisateur.

     kkggddbb
        Autorise _k_e_r_n_e_l_-_g_d_b (ne fonctionne que si CONFIG_KGDB est active
        ; un deuxieme systeme Alpha doit etre connecte  par  voie  serie
        pour que cela fonctionne).

  Quelques  implementations de SRM (e.g., celle du Jensen) sont limitees
  et n'autorisent que les chaines d'options de courte longueur (e.g., au
  plus  8  caracteres).  Dans ce cas la, aboot peut etre demarre avec le
  drapeau  de  demarrage  "i".  Avec  ce  drapeau,  aboot  demandera   a
  l'utilisateur  d'entrer  une  chaine  d'options  pouvant atteindre 256
  caracteres. Par exemple :

       boot dka0 -fl i
       aboot> 3/vmlinux.gz root=/dev/sda3 single

  Comme demarrer de cette  facon  devient  rapidement  penible  ,  aboot
  autorise  l'utilisateur  a  definir  des raccourcis pour les lignes de
  commande frequemment utilisees. En particulier, une option donnee  par
  un  chiffre  --  option  --> (0-9) demande a aboot d'utiliser l'option
  correspondante dans le fichier /etc/aboot.conf. Un exemple de  fichier
  aboot.conf est donne ci-dessous :

       #
       # aboot default configurations
       #
       0:3/vmlinux.gz root=/dev/sda3
       1:3/vmlinux.gz root=/dev/sda3 single
       2:3/vmlinux.new.gz root=/dev/sda3
       3:3/vmlinux root=/dev/sda3
       8:- root=/dev/sda3            # fs-less boot of raw kernel
       9:0/vmlinux.gz root=/dev/sda3 # fs-less boot of (compressed) ECOFF kernel
       -

  Avec ce fichier, la commande

       boot dka0 -fl 1

  correspond  exactement a la commande de demarrage donnee ci-dessus. Il
  est cependant facile d'oublier la correspondance entre les numeros  et
  les chaines d'options. Pour eviter ce probleme, demarrez avec l'option
  "h" et aboot affichera le contenu de /etc/aboot.conf avant  d'afficher
  l'invite demandant la chaine d'option entiere.

  En  conclusion, meme si aboot demande l'entree d'une chaine d'options,
  il est possible d'entrer un simple caractere ("i",  "h",  ou  "0"-"9")
  pour obtenir le meme resultat que si le drapeau avait ete specifie sur
  la ligne de commande de demarrage. Par exemple, vous  pouvez  demarrer
  avec  le  drapeau  "i", taper ensuite "h" (suivi par entree) pour vous
  rappeler le contenu de /etc/aboot.conf

  33..66..22..11..  SSeelleeccttiioonnnneerr llaa ppaarrttiittiioonn ddee //eettcc//aabboooott..ccoonnff

  Quand aboot est installe sur un disque dur, il a besoin de savoir  sur
  quel  partition  il  lui  faut  chercher  le  fichier /etc/aboot.conf.
  Nouvellement  compile,  aboot  cherchera  sur  la  deuxieme  partition
  (/dev/sda2).  Comme  il serait contraignant d'avoir a recompiler aboot
  uniquement pour changer le numero de la partition, abootconf  autorise
  a  directement  modifier  aboot  deja  installe.  Par exemple, si vous
  desiriez changer aboot afin qu'il utilise la  _t_r_o_i_s_i_e_m_e  partition  du
  disque /dev/sda, vous utiliseriez la commande :

       abootconf /dev/sda 3

  Vous  pouvez  verifier  le  reglage  courant simplement en omettant le
  numero de partition. Alors, abootconf /dev/sda affichera la  partition
  actuellement selectionnee. Notez que aboot etre deja installe pour que
  cette commande reussisse. Aussi, lors de  l'installation  d'un  nouvel
  aboot,  le  numero de partition redeviendra celui par defaut (i.e., il
  sera necessaire de relancer abootconf).

  Depuis  la  version  0.5  de  aboot,  il  est  egalement  possible  de
  selectionner  la  partition  contenant le fichier aboot.conf depuis la
  ligne de commande de demarrage. Cela peut etre fait avec une ligne  de
  commande  de la forme _a:_b ou _a est le numero de la partition contenant
  /etc/aboot.conf et _b est une option d'une  lettre  comme  decrit  plus
  haut  (0-9, i, ou h). Par exemple, si vous tapez boot -fl "3:h" dka100
  le systeme demarre depuis SCSI ID 1, charge /etc/aboot.conf depuis  la
  troisieme  partition, affiche son contenu a l'ecran et attend que vous
  entriez les options de demarrage.

  33..77..  DDeemmaarrrraaggee rreesseeaauu

  Deux etapes preliminaires sont  necessaires  avant  que  Linux  puisse
  demarrer  par  un  reseau.  Premierement,  vous devrez positionner les
  variables d'environnement de SRM pour permettre le  demarrage  _v_i_a  le
  protocole  bootp  et  deuxiemement  vous  devrez  configurer une autre
  machine comme serveur de demarrage. Reportez-vous a  la  documentation
  de  SRM  fournie avec votre machine pour toute information sur la mise
  en  place  de  bootp.  Configurer  le  serveur  de  demarrage   depend
  etroitement   du   systeme   d'exploitation  de  cette  machine,  mais
  typiquement cela necessite de lancer le programme bootpd en  tache  de
  fond  apres  avoir  configure  le  fichier  /etc/bootptab.  Le fichier
  bootptab possede une entree par machine cliente autorisee  a  demarrer
  depuis  le  serveur.  Par  exemple, si vous voulez demarrer la machine
  myhost.cs.arizona.edu,  une  entree  de  la  forme   suivante   serait
  necessaire :
       myhost.cs.arizona.edu:\
               :hd=/remote/:bf=vmlinux.bootp:\
               :ht=ethernet:ha=08012B1C51F8:hn:vm=rfc1048:\
               :ip=192.12.69.254:bs=auto:

  Cette  entree  considere  que  l'adresse  Ethernet  de  la machine est
  08012B1C51F8 et  que  son  adresse  IP  est  192.12.69.254.  L'adresse
  Ethernet  peut  etre  trouvee  grace  a  la commande show device de la
  console SRM ou,  si  Linux  est  lance,  avec  la  commande  ifconfig.
  L'entree  precise  egalement  que  si  le  client  ne  declare  pas le
  contraire, le fichier qui sera lance sera le fichier vmlinux.bootp  du
  repertoire  /remote.  Pour plus d'informations sur la configuration de
  bootpd, reportez-vous a sa page de manuel.

  Ensuite, construiser aboot grace a la commande make netboot.  Assurez-
  vous  que  le  noyau que vous desirez lancer a deja ete construit. Par
  defaut,  le   Makefile   du   programme   aboot   utilise   le   noyau
  /usr/src/linux/arch/alpha/boot/vmlinux.gz  (editez le Makefile si vous
  desirez utiliser un autre chemin d'acces). Le resultat de make netboot
  est  un fichier nomme vmlinux.bootp contenant aboot _e_t le noyau Linux,
  pret pour le demarrage par reseau.

  Enfin,  copiez  vmlinux.bootp  dans  le  repertoire  du   serveur   de
  demarrage.  Dans  l'exemple  plus  haut,  vous  l'auriez copie dans le
  repertoire /remote/. Ensuite, allumez la machine  client  et  demarrez
  la,   en   specifiant  l'adaptateur  Ethernet  comme  peripherique  de
  demarrage. SRM nomme typiquement le premier adaptateur Ethernet  ewa0,
  donc,  pour  demarrer  depuis  ce  peripherique,  vous  utiliserez  la
  commande :

       boot ewa0

  Les  options  -fi  et  -fl  sont  utilisable  comme   d'habitude.   En
  particulier,   vous   pouvez  demander  a  aboot  d'attendre  l'entree
  d'arguments pour le noyau Linux en specifiant l'option -fl i.

  44..  PPaarrttaaggeerr uunn ddiissqquuee aavveecc DDiiggiittaall UUnniixx

  Malheureusement, Digital Unix ne sait rien de Linux,  aussi,  partager
  un  disque unique entre les deux systemes n'est pas totalement simple.
  Cependant, ce n'est  pas  une  tache  difficile  si  vous  suivez  les
  conseils  prodigues  dans  cette  section. Nous considererons que vous
  utilisez la version 0.5 ou posterieure de aboot.

  44..11..  PPaarrttiittiioonnnneerr llee ddiissqquuee

  Premierement et avant tout  :  n'utilisez  _j_a_m_a_i_s  les  programmes  de
  partitionnement  de  Linux (minlabel ou fdisk) sur un disque egalement
  utilise par Digital Unix. Le programme Linux minlabel utilise le  meme
  format  de  table de partitions que le programmme disklabel de Digital
  Unix, mais il existe des incompatibilites avec les donnees ecrites par
  minlabel,  alors  Digital  Unix  refusera  tout simplement la table de
  partitions engendree par  minlabel.   Pour  configurer  une  partition
  Linux  ext2  sous  Digital  Unix,  vous  allez devoir changer l'entree
  _d_i_s_k_t_a_b de votre disque. Pour illustrer notre  propos,  supposons  que
  vous  avez  un  disque  rz26 (un disque de 1Go) sur lequel vous voulez
  installer Linux. L'entree _d_i_s_k_t_a_b sous Digital Unix v3.2  ressemble  a
  (voyez le fichier /etc/disktab) :

       rz26|RZ26|DEC RZ26 Winchester:\
               :ty=winchester:dt=SCSI:ns#57:nt#14:nc#2570:\
               :oa#0:pa#131072:ba#8192:fa#1024:\
               :ob#131072:pb#262144:bb#8192:fb#1024:\
               :oc#0:pc#2050860:bc#8192:fc#1024:\
               :od#393216:pd#552548:bd#8192:fd#1024:\
               :oe#945764:pe#552548:be#8192:fe#1024:\
               :of#1498312:pf#552548:bf#8192:ff#1024:\
               :og#393216:pg#819200:bg#8192:fg#1024:\
               :oh#1212416:ph#838444:bh#8192:fh#1024:

  Les  champs  interessants  ici  sont  oit/?/;  et p_?, ou _? designe une
  lettre de l'intervalle a-h (les huit premieres partitions). La  valeur
  o  indique  l'adresse du debut de la partition (en nombre de secteurs)
  et la valeur p donne la taille de la partition (egalement en nombre de
  secteurs).  Reportez-vous a disktab(4) pour plus d'informations. Notez
  que Digital Unix _a_i_m_e definir des partitions qui se chevauchent.  Pour
  les  entrees ci-dessus, l'organisation des partitions ressemble a cela
  (vous pouvez verifier en ajoutant les diverses valeurs o et p) :

         a     b         d           e           f
       |---|-------|-----------|-----------|-----------|

                               c
       |-----------------------------------------------|

                            g                 h
                   |-----------------|-----------------|

  Digital Unix insiste pour que la partition a commence a l'adresse 0 et
  que  la  partition  c  couvre  l'etendue  du disque. A part cela, vous
  pouvez organiser la table des partitions comme bon vous semble.

  Supposons que vous avez Digital Unix utilisant la partition g  et  que
  vous  voulez  installer  Linux  sur la partition h avec la partition b
  comme partition de swap. Pour obtenir cette organisation sans detruire
  la   partition   Digital   Unix   existante,   vous  devez  configurer
  explicitement les types des partitions. Vous pouvez realiser  ceci  en
  ajoutant  un  champ  t  pour  chaque  partition.  Dans notre cas, nous
  ajoutons la ligne suivante a l'entree _d_i_s_k_t_a_b.

               :ta=unused:tb=swap:tg=4.2BSD:th=reservd8:

  Pourquoi avons-nous marque la partition h comme "reservd8" plutot  que
  comme  "ext2"  ?  Bon,  Digital  Unix  ne  connait  rien de Linux. Une
  partition de type "ext2" correspond a une valeur numerique  de  8,  et
  Digital Unix utilise la chane "reservd8" pour cette valeur. Donc, dans
  le langage de Digital Unix, "reservd8" signifie "ext2". Ceci etait  la
  partie  hardue.  Maintenant,  il  ne nous reste plus qu'a installer la
  nouvelle entree _d_i_s_k_t_a_b sur le disque. Considerons  que  le  disque  a
  l'ID SCSI 5. Dans ce cas, nous faisons :

       disklabel -rw /dev/rrz5c rz26

  Vous  pouvez  verifier que tout va bien en lisant le _d_i_s_k_l_a_b_e_l grace a
  la commande disklabel -r /dev/rrz5c. A ce point, vous  pouvez  vouloir
  redemarrer  Digital Unix et vous assurer que la partition Digital Unix
  est encore presente et en bon etat.  Si  c'est  le  cas,  vous  pouvez
  arreter  la  machine et commencer l'installation de LInux. Prenez soin
  de sauter l'etape de partitionnement du disque lors  de  la  procedure
  d'installation.  Sachant  que  nous  avons  deja installe une table de
  partitions correcte, vous devriez etre capable  de  proceder  a  cette
  operation  et  de  selectionner  la huitieme partition comme partition
  racine de Linux et la deuxieme comme partition de swap. Si  le  disque
  est  le  deuxieme disque SCSI de la machine, les noms de peripheriques
  pour ces deux partitions seront /dev/sdb8 et /dev/sdb2, respectivement
  (notez  que  Linux utilise des lettre pour designer les disques et des
  numeros pour  designer  les  partitions,  exactement  a  l'inverse  de
  Digital Unix ; le schema de Linux a plus de sens bien sur ;-).

  44..22..  IInnssttaalllleerr aabboooott

  _P_r_e_m_i_e_r  _o_b_s_t_a_c_l_e  :  avec  le  _f_i_r_m_w_a_r_e  -->  --  SRM, vous ne pouvez
  demarrer qu'un et un seul  systeme  d'exploitation  par  disque.  Pour
  cette  raison,  il  est generalement preferable de disposer d'au moins
  deux disques SCSI dans une machine sur laquelle vous desirez  utiliser
  aussi bien Linux que Digital Unix. Bien sur vous pouvez aussi demarrer
  Linux depuis une disquette si  la  vitesse  importe  peu,  ou  par  un
  reseau,  si  vous disposez d'un serveur bootp. Mais dans cette partie,
  nous considererons que vous souhaitez demarrer Linux depuis un  disque
  contenant une ou plusieurs partitions Digital Unix.

  _D_e_u_x_i_e_m_e _o_b_s_t_a_c_l_e : installer aboot sur un disque partage avec Digital
  Unix rend les premiere et troisieme partitions inutilisables  (sachant
  qu'elles  doivent  commencer  a  l'adresse 0). Pour cette raison, nous
  vous recommandons de changer la taille de la partition a a une  valeur
  juste suffisament elevee pour contenir aboot (1Mo devrait convenir).

  Une  fois  que  ces deux obstacles sont surmontes, installer aboot est
  aussi simple que d'habitude  :  comme  les  partitions  a  et  c  vont
  recouvrir  aboot  ,  nous  devons  specifier a swriteboot que ceci est
  intentionnel . Nous pouvons le faire sous  Linux  avec  une  ligne  de
  commande  de  la forme suivante (de nouveau, nous supposerons que l'on
  veut installer aboot sur le deuxieme disque SCSI) :

       swriteboot -f1 -f3 /dev/sdb bootlx

  Le parametre -f1 signifie que nous voulons forcer l'ecriture de bootlx
  meme  s'il  recouvre la premiere partition. La meme chose s'applique a
  la troisieme partition.

  C'est tout. Vous devriez  desormais  pouvoir  arreter  le  systeme  et
  lancer  Linux  depuis  le  disque dur. Dans notre exemple, la ligne de
  commande SRM pour le faire serait :

       boot dka5 -fi 8/vmlinux.gz -fl root=/dev/sdb8

  Le Linux HOWTO pour les ports serie
  Greg Hankins, greg.hankins@cc.gatech.edu
  traduit par Eric Festinger, eric@midix.frmug.org
  v1.11, 15 Novembre 1997

  Ce  document  decrit  la configuration sous Linux des ports serie, des
  programmes associes, et des peripheriques qui y sont connectes.

  11..  IInnttrroodduuccttiioonn

  Ce document est la traduction francaise du  Linux  Serial  HOWTO.   Il
  tente  de decrire la configuration des modems et terminaux sous Linux,
  de donner quelques conseils, et enfin de resoudre les  problemes  lies
  aux ports serie.  Il est destine plus particulierement aux plateformes
  Intel x86, meme s'il doit etre applicable a d'autres architectures.

  11..11..  CCooppyyrriigghhtt

  Copyright (c) 1993  -  1997  Greg  Hankins.   Ce  document  peut  etre
  redistribue   sous   les   termes  de  la  licence  LDP  disponible  a
  http://sunsite.unc.edu/LDP/COPYRIGHT.html.  Il ne  peut  etre  modifie
  sans l'accord de son auteur.

  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  La  version  originale la plus recente de ce document est disponible a
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/ ainsi que  sur  les  sites
  miroirs.  D'autres  formats  (PostScript,  DVI...)   existent  dans le
  repertoire  other-formats.  Ce  HOWTO  est  egalement  consultable   a
  http://sunsite.unc.edu/LDP/HOWTO/Serial-HOWTO.html    et   est   poste
  mensuellement dans le forum de discussions comp.os.linux.answers.

  La       version       francaise       est       disponible        sur
  http://www.freenix.fr/linux/HOWTO/Serial-HOWTO.html,   et  est  postee
  tous les mois dans fr.comp.os.linux.annonces.

  11..33..  RReettoouurr dd''iinnffoorrmmaattiioonnss

  Merci de me faire  parvenir  par  email  a  greg.hankins@cc.gatech.edu
  toutes  questions,  commentaires  et  suggestions. Je suis extremement
  interesse par ce que vous pensez a propos de  ce  HOWTO,  et  par  les
  eventuelles  ameliorations.    Faites-moi  part  de  ce  que  vous  ne
  comprenez  pas  ou  de  ce  qui  necessite  des  eclaircissements.  Je
  repondrais  a  tous les emails, meme si ca peut me prendre une semaine
  ou plus.  Je recois beaucoup de messages  de  root  ou  de  sites  mal
  configures.  Assurez-vous de m'envoyer un message electronique en tant
  que personne reelle, ainsi que du bon fonctionnement de votre  systeme
  de  messagerie.  Si  vous n'avez toujours pas de reponse de ma part au
  bout de deux semaines, merci de m'envoyer a nouveau votre message.

  Je peux egalement etre joint a :
  Greg Hankins
  College of Computing
  801 Atlantic Drive
  Atlanta, GA 30332-0280
  par            courrier            postal,            et             a
  http://www.cc.gatech.edu/staff/h/Greg.Hankins/.

  Merci  d'inclure  le numero de version de ce HOWTO dans votre message.
  Ceci est la version 1.11.

  11..44..  AAvveerrttiisssseemmeenntt

  Votre systeme peut varier par rapport aux exemples, et  les  solutions
  presentees dans ce HOWTO peuvent ne pas fonctionner.

  22..  MMaatteerriieell ssuuppppoorrttee

  Les materiels suivants fonctionnent correctement sous Linux.

  22..11..  CCaarrtteess sseerriiee ssttaannddaarrddss ppoouurr PPCC

  +o  cartes  serie  standards  pour PC (COM1 - COM4), auxquelles peuvent
     etre connectes des peripheriques  serie  externes  (modems,  souris
     serie, etc.)

  +o  modems internes standards pour PC (COM1 - COM4)

  +o  Quickpath  Systems  Port-Folio 550e (autorisant les IRQ 3, 4, 5, 9,
     10, 11, 12, ou 15)

  Remarque : en raison  de  conflits  d'adresses,  vous  ne  pouvez  pas
  utilisez simultanement COM4 et une carte video IBM8514.  Ceci est du a
  un bogue de la carte IBM8514.

  22..22..  MMooddeemmss PPlluugg AAnndd PPllaayy ((PPnnPP))

  Meme si les modems PnP fonctionnent sous Linux, je ne  les  recommande
  pas.  Neanmoins, voici quelques conseils :

  +o  Essayez  de  desactiver  les  fonctionnalites  PnP  dans le BIOS de
     l'ordinateur et du modem.

  +o  Demarrez sous Win95, configurez  le  modem,  et  verifiez  que  les
     parametres  sont sauvegardes lorsque vous redemarrez sous Linux. Si
     ce n'est pas le cas :

  +o  Demarrez sous Win95, configurez le modem,  et  redemarrez  a  chaud
     (_w_a_r_m  _b_o_o_t)  sous Linux, de maniere a ce que les parametres soient
     preserves. Vous pouvez effectuer cette manipulation avec loadlin.

  +o  Recuperez les outils PnP a http://www.redhat.com/linux-info/pnp.

  +o  Et, bien sur, utilisez un _v_r_a_i modem :-)

  22..33..    CCaarrtteess   sseerriiee    mmuullttiippoorrttss    ssiimmpplleess    ((eeqquuiippeeeess    dd''UUAARRTT
  88225500//1166445500//1166555500AA))

  +o  AST FourPort et compatibles (4 ports)

  +o  Accent Async-4 (4 ports)

  +o  Arnet Multiport-8 (8 ports)

  +o  Bell Technologies HUB6 (6 ports)

  +o  Boca BB-1004 (4 ports), BB-1008 (8 ports), BB-2016 (16 ports)

  +o  Boca IOAT66 (6 ports)

  +o  Boca 2by4 (4 ports serie, 2 ports paralleles)

  +o  Computone ValuePort V4-ISA (compatible AST FourPort)

  +o  Digi PC/8 (8 ports)

  +o  GTEK BBS-550 (8 ports)

  +o  Longshine LCS-8880, Longshine LCS-8880+ (compatible AST FourPort)

  +o  Moxa C104, Moxa C104+ (compatible AST FourPort)

  +o  PC-COMM (4 ports)

  +o  Sealevel   Systems  <http://www.sealevel.com>  COMM-2  (2   ports),
     COMM-4 (4 ports) et COMM-8 (8 ports)

  +o  SIIG I/O Expander 2S IO1812 (4 ports)

  +o  STB-4COM (4 ports)

  +o  Twincom ACI/550

  +o  Usenet Serial Board II (4 ports)

  De  maniere  generale,  Linux  supporte n'importe quelle carte equipee
  d'un UART 8250, 16450, 16550 ou 16550A (ou compatible),  et  n'importe
  quel modem emulant un de ces composants.

  Remarque : les BB-1004 et BB-1008 ne supportent pas les signaux DCD et
  RI, et ne sont donc pas utilisables pour des  modems  repondeurs.  Ils
  fonctionnent neanmoins tres bien dans les autres cas.

  22..44..  CCaarrtteess sseerriiee mmuullttiippoorrttss iinntteelllliiggeenntteess

  +o  Comtrol RocketPort (ASIC 36MHz ; 4, 8, 16 ou 32 ports)
     contact : info@comtrol.com ou http://www.comtrol.com
     etat du gestionnaire de peripherique : supporte par Comtrol
     emplacement : ftp://tsx-11.mit.edu/pub/linux/packages/comtrol

  +o  Computone IntelliPort II (80186 16MHz ; 4, 8, ou 16 ports),
     IntelliPort II EXpandable (80186 20MHz ; 16 - 64 ports)
     contact : Michael H. Warfield, mhw@wittsend.atl.ga.us
     etat du gestionnaire de peripherique : pre-ALPHA

  +o  Cyclades Cyclom-Y (UART Cirrus Logic CD1400 ; 8 - 32 ports),
     Cyclom-Z (MIPS R3000 25MHz ; 8 - 128 ports)
     contact : sales@cyclades.com ou http://www.cyclades.com
     etat du gestionnaire de peripherique : supporte par Cyclades
     emplacement : ftp://ftp.cyclades.com/pub/cyclades et inclus dans le
     noyau Linux depuis la version 1.1.75

  +o  Decision PCCOM8 (8 ports)
     contact : pccom8@signum.se
     emplacement : ftp://ftp.signum.se/pub/pccom8

  +o  Digi PC/Xi (80186 12.5MHz ; 4, 8, ou 16 ports),
     PC/Xe (80186 12.5/16MHz ; 2, 4, ou 8 ports),
     PC/Xr (IDT3041 16MHz ; 4 ou 8 ports),
     PC/Xem (IDT3051 20MHz ; 8 - 64 ports)
     contact : sales@dgii.com ou http://www.dgii.com
     etat du gestionnaire de peripherique : supporte par Digi
     emplacement : ftp://ftp.dgii.com/drivers/linux et  inclus  dans  le
     noyau Linux depuis la version 2.0
  +o  Digi COM/Xi (80188 10MHz ; 4 ou 8 ports)
     contact : Simon Park, si@wimpol.demon.co.uk
     etat du gestionnaire de peripherique : ALPHA
     Remarque  :  regulierement, Simon ne peut pas lire son mail pendant
     plusieurs   mois   a   cause   de   son   travail.   Mark    Hatle,
     fray@krypton.mankato.msus.edu  s'est gracieusement porte volontaire
     pour rendre le gestionnaire de peripherique disponible si  vous  en
     avez  besoin.  Neanmoins, Mark ne s'occupe pas de la maintenance ni
     du support de ce gestionnaire.

  +o  Equinox SuperSerial Technology (ASIC 30MHz ; 2 - 128 ports)
     contact : sales@equinox.com ou http://www.equinox.com
     etat du gestionnaire de peripherique : supporte par Equinox
     emplacement : ftp://ftp.equinox.com/library/sst

  +o  GTEK Cyclone (UART 16C654 ; 6, 16 et 32 ports),
     SmartCard (Dallas DS80C320 24MHz ; 8 ports),
     BlackBoard-8A (UART 16C654 ; 8 ports),
     PCSS (8032 15/24MHz ; 8 ports)
     contact : spot@gtek.com ou http://www.gtek.com
     etat du gestionnaire de peripherique : supporte par GTEK
     emplacement : ftp://ftp.gtek.com/pub

  +o  Hayes ESP (COM-bic ; 1 - 8 ports)
     contact    :    Andrew    J.    Robinson,    arobinso@nyx.net    ou
     http://www.nyx.net/~arobinso
     etat du gestionnaire de peripherique : supporte par l'auteur
     emplacement  : http://www.nyx.net/~arobinso et inclus dans le noyau
     Linux depuis la version 2.1.15

  +o  Maxpeed SS (Toshiba ; 4, 8 et 16 ports)
     contact : info@maxpeed.com ou http://www.maxpeed.com
     etat du gestionnaire de peripherique : supporte par Maxpeed
     emplacement : ftp://maxpeed.com/pub/ss

  +o  Moxa C218 (80286 12MHz ; 8 ports),
     Moxa C320 (TMS320 40MHz ; 8 - 32 ports)
     contact : info@moxa.com.tw ou http://www.moxa.com.tw
     etat du gestionnaire de peripherique : supporte par Moxa
     emplacement : ftp://ftp.moxa.com.tw/drivers/c218-320/linux

  +o  SDL RISCom/8 (Cirrus Logic CD180 ; 8 ports)
     contact : sales@sdlcomm.com ou http://www.sdlcomm.com
     etat du gestionnaire de peripherique : supporte par SDL
     emplacement : ftp://ftp.sdlcomm.com/pub/drivers

  +o  Specialix SIO (Zilog Z280 20MHz ; 4 - 32 ports),
     XIO (25MHz Zilog Z280 ; 4 - 32 ports)
     contact : Simon Allen, simonallen@cix.compulink.co.uk
     etat du gestionnaire de peripherique : BETA
     emplacement : ftp://sunsite.unc.edu/pub/Linux/kernel/patches/serial

  +o  Stallion EasyIO-4 (4 ports), EasyIO-8 (8 ports), et
     EasyConnection (8 - 32 ports) - toutes avec des UART,
     Stallion (CPU 80186 8MHz ; 8 ou 16 ports),
     Brumby (CPU 80186 10/12 MHz ; 4, 8 ou 16 ports),
     ONboard (CPU 80186 16MHz ; 4, 8, 12, 16 ou 32 ports),
     EasyConnection 8/64 (CPU 80186 25MHz ; 8 - 64 ports)
     contact : sales@stallion.com ou http://www.stallion.com
     etat du gestionnaire de peripherique : supporte par Stallion
     emplacement  :  ftp://ftp.stallion.com/drivers/ata5/Linux et inclus
     dans le noyau Linux depuis la version 1.3.27

  Un descriptif des produits Comtrol, Cyclades, Digi,  et  Stallion  est
  paru  dans  le  numero  14  de  juin  1995  du  _L_i_n_u_x _J_o_u_r_n_a_l.  Il est
  disponible a http://www.ssc.com/lj/issue14.

  22..55..  MMaatteerriieell nnoonn ssuuppppoorrttee

  Les modems dits ``Winmodems'', par exemple l'USR Sportster Winmodem et
  l'IBM  Aptiva  MWAVE, ne sont _p_a_s supportes sous Linux.  Ils utilisent
  des  technologies  proprietaires  necessitant  des  gestionnaires   de
  peripheriques  speciaux  pour  Windows.  Les  modems  necessitant  des
  gestionnaires Rockwell RPI sont a eviter pour la meme raison.

  Les cartes  serie  intelligentes  necessitant  des  gestionnaires  non
  disponibles sous Linux, ne pourront pas fonctionner.

  33..  CCoommmmeenntt ssee nnoommmmeenntt lleess ppoorrttss sseerriiee ??

  Un port d'E/S permet de recevoir des donnees depuis, et d'en envoyer a
  partir d'un ordinateur. Il existe  plusieurs  types  de  ports  d'E/S,
  comme  les  ports  serie,  les  ports  paralleles,  les controleurs de
  disques durs, les cartes Ethernet, etc. Les modems  et  les  terminaux
  dont  nous allons traiter n'utilisent que des ports serie.   Chacun de
  ces ports possede une adresse  d'E/S,  et  un  vecteur  d'interruption
  (IRQ). Les quatre ports serie suivants correspondent a COM1 - COM4 :

       ttyS0 (COM1) adresse 0x3f8 IRQ 4
       ttyS1 (COM2) adresse 0x2f8 IRQ 3
       ttyS2 (COM3) adresse 0x3e8 IRQ 4
       ttyS3 (COM4) adresse 0x2e8 IRQ 3

  Si  aucun  port  serie  n'est  detecte  lors  de  l'amorcage de Linux,
  assurez-vous que leur support a ete selectionne  et  compile  dans  le
  noyau.  Dans  ce  document,  je me refere a COM1 pour ttyS0, COM2 pour
  ttyS1, COM3 pour ttyS2, et a COM4 pour ttyS3.   Par defaut, ces  ports
  ont des IRQ communes, et vous ne pouvez pas les utiliser simultanement
  dans cette configuration. Certaines de  ces  IRQ  doivent  etre  reas-
  signees.   Reportez-vous a la section ``Puis-je  utiliser plus de deux
  ports serie ?''.

  Sur certaines installations, deux peripheriques  supplementaires  vont
  etre  crees  :  /dev/modem pour le modem et /dev/mouse pour la souris.
  Ce sont des liens symboliques sur le peripherique approprie  (dans  le
  repertoire  /dev)  que  vous avez specifie lors de l'installation.  Si
  vous possedez  une  souris  de  type  bus  PS/2,  /dev/mouse  pointera
  correctement sur le peripherique de la souris bus.

  Plusieurs  discussions ont porte sur les avantages et inconvenients de
  ces pseudo-peripheriques /dev/mouse et  /dev/modem.   Personnellement,
  je decourage _f_o_r_t_e_m_e_n_t l'utilisation de ces liens.  En particulier, si
  vous  prevoyez  d'employer  plusieurs  modems  pour   les   connexions
  entrantes sur /dev/modem, des problemes peuvent apparaitre a cause des
  fichiers de verrouillage (_l_o_c_k  _f_i_l_e_s).   Vous  pouvez  neanmoins  les
  utiliser  si  vous  le desirez, mais _a_s_s_u_r_e_z_-_v_o_u_s _q_u_'_i_l_s _p_o_i_n_t_e_n_t _b_i_e_n
  _s_u_r _l_e_s _b_o_n_s _p_e_r_i_p_h_e_r_i_q_u_e_s.  Cependant, si vous supprimez  ces  liens,
  certaines  applications  (comme  minicom)  peuvent ne plus fonctionner
  sans reconfiguration.

  33..11..  PPeerriipphheerriiqquueess sseerriiee eett nnuummeerrooss ddaannss //ddeevv

  /dev/ttyS0 majeur 4, mineur 64         /dev/cua0 majeur 5, mineur 64
  /dev/ttyS1 majeur 4, mineur 65         /dev/cua1 majeur 5, mineur 65
  /dev/ttyS2 majeur 4, mineur 66         /dev/cua2 majeur 5, mineur 66
  /dev/ttyS3 majeur 4, mineur 67         /dev/cua3 majeur 5, mineur 67

  Remarque : toutes les distributions  doivent  etre  livrees  avec  ces
  peripheriques  deja  correctement configures, ce que vous pouvez veri-
  fier en tapant les commandes :

       linux% ls -l /dev/cua*
       linux% ls -l /dev/ttyS*

  33..11..11..  CCrreeeerr lleess ppeerriipphheerriiqquueess ddaannss //ddeevv

  Si un peripherique est absent, vous devez le creer  avec  la  commande
  mknod.  Par exemple, pour ttyS0 :

       linux# mknod -m 666 /dev/cua0 c 5 64
       linux# mknod -m 666 /dev/ttyS0 c 4 64

  Le  script  MAKEDEV,  situe dans le repertoire /dev, peut etre utilise
  pour simplifier leur creation. Par exemple, pour ttyS0 :

       linux# cd /dev
       linux# ./MAKEDEV ttyS0

  Cette commande cree les peripheriques d'entree et de sortie correspon-
  dants, et positionne egalement les bonnes permissions.

  33..22..  RReemmaarrqquueess ppoouurr lleess ccaarrtteess mmuullttiippoorrttss ssiimmpplleess

  Les  peripheriques  utilises par les cartes multiports sont dependants
  du type de carte que vous possedez. Ils sont listes en detail dans  le
  fichier  rc.serial  fourni avec le programme setserial.  Je recommande
  vivement de recuperer la version la plus recente de setserial si  vous
  devez  utiliser  une telle carte. Vous devrez alors surement creer ces
  peripheriques, soit avec  la  commande  mknod,  soit  avec  le  script
  MAKEDEV.   Ils doivent etre declares en ajoutant 64 au numero du port.
  Par exemple, pour ttyS17 :

       linux# mknod -m 666 /dev/cua17 c 5 81
       linux# mknod -m 666 /dev/ttyS17 c 4 81

  Car ``64 + 17 = 81''.  En  utilisant  le  script  MAKEDEV,  il  suffit
  d'entrer :
       linux# cd /dev
       linux# ./MAKEDEV ttyS17

  Remarque  :  le listing des ports COM5-COM8 pour les IO1812 est errone
  dans  le  manuel  SIIG.  Les  valeurs  doivent  etre  remplacees   par
  COM5=0x250, COM6=0x258, COM7=0x260, et COM8=0x268.

  Remarque   :  le  registre  d'etat  d'interruption  (_I_n_t_e_r_r_u_p_t  _S_t_a_t_u_s
  _R_e_g_i_s_t_e_r) de la carte Digi PC/8 se trouve en 0x140.

  Remarque : pour la carte  AST  Fourport,  le  fichier  rc.serial  doit
  specifier le parametre skip_test.

  33..33..  RReemmaarrqquueess ppoouurr lleess ccaarrtteess mmuullttiippoorrttss iinntteelllliiggeenntteess

  Lisez  les  informations  fournies  avec  le gestionnaire.  Ces cartes
  utilisent des peripheriques non-standards.  Ces  informations  varient
  suivant le materiel.

  44..  QQuueellqquueess pprrooggrraammmmeess iinntteerreessssaannttss aa ccoonnnnaaiittrree

  44..11..  QQuu''eesstt--ccee qquuee ggeettttyy ?

  getty  est  un programme qui gere la phase d'entree en session (_l_o_g_i_n)
  sur un systeme Unix. Il  est  indispensable  si  vous  souhaitez  vous
  loguer  sur votre machine Linux avec un modem. Il n'est par contre pas
  utile pour des communications  sortantes.  Il  existe  trois  versions
  couramment  utilisees avec Linux : getty_ps, mgetty et agetty. Chacune
  possede  sa  propre  syntaxe.  Aussi,  assurez-vous  d'utiliser  celle
  correspondant a votre version de getty.

  44..11..11..  AA pprrooppooss ddee ggeettttyy__ppss

  La  plupart  des  distributions  installent  directement  le paquetage
  getty_ps.  Il contient deux programmes : getty pour la console et  les
  terminaux, et uugetty pour les modems.  Je parlerai essentiellement de
  cette version, car c'est celle que j'utilise.

  44..11..22..  AA pprrooppooss ddee mmggeettttyy

  mgetty est un getty specialise pour l'utilisation avec des modems. Par
  rapport   aux  autres  versions,  mgetty  gere  les  fax,  et  detecte
  automatiquement les connexions PPP. La documentation est excellente et
  suffisante.   Veuillez   vous  y  reporter  pour  l'installation.  Les
  informations les plus recentes sur  mgetty  peuvent  etre  trouvees  a
  http://www.leo.org/~doering/mgetty/.

  44..11..33..  AA pprrooppooss ddee aaggeettttyy

  agetty  est  la  troisieme variante de getty. C'est une version simple
  completement  fonctionnelle,  et  plus  particulierement  destinee   a
  l'utilisation  des consoles virtuelles et des terminaux plutot que des
  modems.

  44..22..  QQuu''eesstt--ccee qquuee sseettsseerriiaall ?

  setserial  est  un  programme  autorisant  la   consultation   et   la
  modification  des differents attributs (adresse de port, interruption,
  etc.) d'un peripherique serie.  Vous pouvez determiner  le  numero  de
  version installee en lancant setserial sans argument.

  Lorsque  votre  systeme Linux demarre, seuls ttyS{0-3} sont configures
  avec les IRQ positionnees par default a  4  et  3.  Si  vous  possedez
  d'autres  ports  serie  sur d'autres cartes, ou si ttyS{0-3} utilisent
  des IRQ non standards, vous _d_e_v_e_z lancer ce programme pour  configurer
  ces  ports.  Consultez  le  manuel  pour  une description complete des
  options.

  55..  CCoommmmeenntt ppuuiiss--jjee aappppeelleerr aavveecc mmoonn mmooddeemm ??

  55..11..  MMaatteerriieell nneecceessssaaiirree

  Tout d'abord, assurez-vous d'avoir le bon cable. Votre modem  requiert
  un  cable  droit, sans inversion de fils. Vous devriez pouvoir vous en
  procurer  dans  n'importe  quel   magasin   d'informatique.   Verifiez
  egalement  le  genre  des  connecteurs.  Pour un port a 25 broches, ce
  sera toujours un modele male DB25, a ne pas confondre avec  les  ports
  paralleles  a embase femelle DB25. Connectez votre modem sur un de vos
  ports serie.  Consultez si necessaire le manuel de votre modem.

  55..11..11..  RReemmaarrqquueess ppoouurr lleess mmooddeemmss iinntteerrnneess

  Pour un modem interne, aucun cable n'est necessaire.  De  meme,  aucun
  port  serie  n'est  requis,  car la carte modem en possede un interne.
  Vous devez seulement configurer votre modem  pour  qu'il  utilise  une
  interruption  (IRQ)  et  une  adresse  d'E/S libres.  Reportez-vous au
  manuel de votre modem, ainsi qu'a la section ``Puis-je  utiliser  plus
  de  deux   peripheriques  serie  ?''  si  vous avez besoin d'aide pour
  choisir les interruptions et les adresses.

  Sur certaines cartes meres, il peut etre necessaire de desactiver  les
  ports   serie   afin  d'eviter  les  conflits  avec  le  modem.  Cette
  manipulation peut etre effectuee avec des cavaliers ou les  parametres
  du BIOS. Consultez le manuel de votre carte mere.

  Suite  a  un  bogue  des  cartes video IBM8514, les modems internes ne
  peuvent pas fonctionner sur ttyS3.  Si Linux ne detecte pas  le  modem
  sur  ttyS3,  il  suffit  alors  d'utiliser setserial pour que le modem
  fonctionne correctement. Un modem interne  ttyS{0-2}  ne  devrait  pas
  poser    de    probleme    de   detection.    Linux   n'effectue   pas
  d'autoconfiguration du ttyS3 a cause de ce bogue lie a la carte video.

  55..22..  ````PPaarrlleezz'''' aa vvoottrree mmooddeemm

  Avant  de  vous  lancez  dans le parametrage assez complexe de SLIP ou
  PPP,  utilisez  kermit  ou   n'importe   quel   autre   programme   de
  communication  pour  tester  votre  configuration.  La version la plus
  recente     de     kermit     peut     etre     telechargee     depuis
  http://www.columbia.edu/kermit/.   L'exemple suivant suppose que votre
  modem est sur ttyS3, et que sa vitesse est fixee a 115200 bps :

  linux# kermit
  C-Kermit 6.0.192, 6 Sep 96, for Linux
   Copyright (C) 1985, 1996,
    Trustees of Columbia University in the City of New York.
  Default file-transfer mode is BINARY
  Type\~? or HELP for help.
  C-Kermit>set line /dev/ttyS3
  C-Kermit>set carrier-watch off
  C-Kermit>set speed 115200
  /dev/ttyS3, 115200 bps
  C-Kermit>c
  Connecting to /dev/ttyS3, speed 115200.
  The escape character is Ctrl-\ (ASCII 28, FS)
  Type the escape character followed by C to get back,
  or followed by\~? to see other options.
  ATE1Q0V1                   ; vous tapez cette chaine puis la touche Entree
  OK                         ; le modem doit repondre comme ca

  Si votre modem repond aux commandes AT,  vous  pouvez  supposer  qu'il
  fonctionne  correctement  du cote Linux. Il ne reste plus qu'a essayer
  d'appeler un autre modem :

       ATDT7654321

  ou 7654321 est un numero de telephone.  Utilisez ATDP a  la  place  de
  ATDT  si vous n'etes pas connecte a un central numerique.  Votre modem
  fonctionne si l'appel aboutit.

  Pour revenir a l'invite kermit, appuyez simultanement sur les  touches
  Ctrl et backslash, puis sur C :

       Ctrl-\-C
       (Retour a linux)
       C-Kermit>quit
       linux#

  Il  s'agissait  juste  d'un  test  de  numerotation  ``a la main''. La
  methode normale est de laisser kermit numeroter a votre place a l'aide
  de sa base de donnees interne de modems. Par exemple, pour un modem US
  Robotics (USR) :

  linux# kermit
  C-Kermit 6.0.192, 6 Sep 1997, for Linux
   Copyright (C) 1985, 1996,
    Trustees of Columbia University in the City of New York.
  Default file-transfer mode is BINARY
  Type\~? or HELP for help
  C-Kermit>set modem type usr        ; Selection du type de modem
  C-Kermit>set line /dev/ttyS3       ; Choix du peripherique
  C-Kermit>set speed 115200          ; Vitesse de communication
  C-Kermit>dial 7654321              ; Numerotation
   Number: 7654321
   Device=/dev/ttyS3, modem=usr, speed=115200
   Call completed.<BEEP>
  Connecting to /dev/ttyS3, speed 115200
  The escape character is Ctrl-\ (ASCII 28, FS).
  Type the escape character followed by C to get back,
  or followed by\~? to see other options.

  Welcome to ...

  login:

  Reportez-vous a la section ``Programmes de  communication'' pour  plus
  de liens.

  Lorsque  vous appelez avec votre modem, parametrez la vitesse au debit
  maximal supporte par votre modem. Les systemes Linux avec une  version
  de  la  libc  superieure  a 5.x supportent des vitesses jusqu'a 115200
  bps. libc est habituellement situee  dans  /lib.    Verifiez  dans  ce
  repertoire  la  version  que  vous avez. Si Linux ne reconnait pas des
  vitesses de 57600 ou 115200 bps, vous devez alors utiliser le  program
  setserial  pour  passer  votre  port  serie  a une vitesse superieure.
  Reportez-vous a la section ``Comment  configurer mes ports serie a des
  vitesses  superieures  ?''.  Selectionnez ensuite une vitesse de 38400
  bps dans votre programme de communications.

  55..33..  CCoonnffiigguurraattiioonn dduu mmooddeemm eenn mmooddee aappppeellaanntt

  Pour appeler, vous pouvez configurer votre modem comme vous le voulez.
  Si  vous  souhaitez l'utiliser pour des communications entrantes, vous
  _d_e_v_e_z parametrer votre modem a la meme vitesse que pour getty.  Ainsi,
  si  vous voulez executer getty a 38400 bps, fixez egalement la vitesse
  a  38400  bps  lors  du  parametrage  du  modem,   pour   eviter   une
  incompatibilite   de  vitesses  avec  l'ordinateur.  En  general,  les
  reglages  d'usine  avec  correction  d'erreurs  et  controle  de  flux
  materiel  correspondent au reglage optimal en mode appelant. Consultez
  le manuel du modem pour obtenir ces reglages.

  55..44..  CCoonnttrroollee ddee fflluuxx mmaatteerriieell

  Je vous recommande vivement d'utiliser le controle  de  flux  materiel
  (RTS/CTS)   si  votre  modem  le  supporte.  Cette  fonctionalite  est
  particulierement importante lorsque  la  compression  de  donnees  est
  active.   Premierement,  vous  devez  autoriser  le  controle  de flux
  RTS/CTS sur le port serie. Le mieux est de le faire au demarrage,  par
  exemple  dans /etc/rc.d/rc.local ou /etc/rc.d/rc.serial.  Assurez-vous
  que  ces  fichiers  sont  bien  executes  par  le  fichier   principal
  rc.sysinit.  Ensuite,  pour  chacun des ports serie pour lesquels vous
  desirez activer le controle de flux materiel,  vous  devez  entrer  la
  commande suivante :

  stty crtscts < /dev/ttyS3

  Vous devez egalement activer le controle de flux RTS/CTS sur le modem.
  Consultez le manuel du modem, car le  parametrage  varie  suivant  les
  fabricants. N'oubliez pas de sauvegarder cette configuration, si votre
  modem le permet.

  66..   CCoommmmeenntt  ppuuiiss--jjee  aappppeelleerr  eett  eettrree  aappppeellee  aavveecc  mmoonn  mmooddeemm  eett
  ggeettttyy__ppss ?

  Faites deja fonctionner correctement votre modem en mode appelant.  Si
  vous  n'avez  pas  encore lu la section ``Comment puis-je appeler avec
  mon  modem ?'', _l_i_s_e_z_-_l_a _m_a_i_n_t_e_n_a_n_t ! Elle contient  des  informations
  importantes  sur  la  configuration.  Il  _n_'_e_s_t _p_a_s _n_e_c_e_s_s_a_i_r_e de lire
  cette section si vous souhaitez juste _a_p_p_e_l_e_r avec votre modem.

  66..11..  CCoonnffiigguurraattiioonn eenn mmooddeess aappppeellaanntt eett aappppeellee

  Encore une fois, le modem _d_o_i_t etre specialement configure  (avec  les
  commandes  AT)  afin  de  pouvoir  etre utilise aussi bien en appelant
  qu'en appele :

       E1       echo local active en mode commande
       Q0       envoie les codes de retour
       V1       envoie les reponses sous la forme de donnees textuelles
       S0=0     decrochage automatique desactive (uugetty s'en occupe avec l'option WAITFOR)

  Si ces options ne sont pas selectionnees, il se  peut  que  la  chaine
  d'initialisation  definie  dans  le fichier de configuration, ne fonc-
  tionne pas.

       &C1     le signal DCD est haut seulement apres la connexion
       &S0     DSR est toujours haut
               un changement d'etat du DTR reinitialise le modem (dependant du fabricant - RTFM)

  Ces reglages determinent le comportement du modem au debut et a la fin
  d'un appel.

  Si votre modem ne permet pas la sauvegarde d'un profil, ces parametres
  peuvent etre indiques dans la chaine d'initialisation  du  fichier  de
  configuration.  Certains  modems  sont pourvus de commutateurs DIP qui
  affectent les valeurs des registres.   Assurez-vous  egalement  qu'ils
  sont correctement configures.

  J'ai  debute une compilation de configurations pour differents modeles
  de modems. Pour l'instant, j'en ai seulement quelques uns.    Ne  vous
  privez  donc  pas  de  m'envoyer vos parametrages operationnels. Cette
  collection               est               recuperable               a
  ftp://ftp.cc.gatech.edu/pub/people/gregh/modem-configs.

  Remarque  :  pour  que  mon  modem  USR  Courier  V.34 se reinitialise
  correctement a l'ouverture du signal DTR, je suis oblige de forcer &D2
  et  S13=1 (le bit 0 du registre S13 est mis a 1).  On m'a confirme que
  ca fonctionnait aussi sur les modems USR Sportster V.34.

  Remarque : certains modems Supra traitent le signal  DCD  differement.
  Dans  ce  cas,  essayez  avec  &C0 et _n_o_n &C1. &D2 doit egalement etre
  positionne afin de gerer correctement le DTR.

  66..22..  IInnssttaalllleerr ggeettttyy__ppss

  Recuperez     la      derniere      version      a      partir      de
  sunsite.unc.edu:/pub/Linux/system/serial.    Les  versions  2.0.7j  et
  ulterieures sont indispensables  pour  les  hauts  debits  (57600  and
  115200 bps).  Vous devez aussi avoir la libc 5.x ou superieure.

  Par  defaut,  getty_ps  est  conforme  au  FSSTND  Linux  (_F_i_l_e _S_y_s_t_e_m
  _S_t_a_n_d_a_r_d - norme de systeme de fichiers),  ce  qui  implique  que  les
  binaires  resident  dans  /sbin,  et les fichiers verrous (_l_o_c_k _f_i_l_e_s)
  dans /var/lock.  Assurez-vous donc que le repertoire /var/lock  existe
  bien.

  Si  vous  ne  souhaitez  pas la conformite FSSTND, les binaires seront
  stockes   dans   /etc,   les   fichiers    de    configuration    dans
  /etc/default/{uu}getty.ttyS_N,    et    les   fichiers   verrous   dans
  /usr/spool/uucp.  Je recommande cette  methode  en  cas  d'utilisation
  conjointe avec UUCP afin que les fichiers verrous soient bien partages
  entre getty_ps et UUCP.

  getty_ps peut aussi utiliser syslogd pour  enregistrer  les  messages.
  Reportez-vous  aux  pages  de manuel syslogd(1) et syslog.conf(5) pour
  configurer syslogd, s'il  ne  tourne  pas  deja.   Les  messages  sont
  enregistres  avec  la  priorite LOG_AUTH, les erreurs avec LOG_ERR, et
  les informations de debogage avec LOG_DEBUG. Si vous ne souhaitez  pas
  utiliser syslogd, editez tune.h dans le repertoire des fichiers source
  de  getty_ps  pour  enregistrer  les   messages   dans   un   fichier,
  /var/adm/getty.log par defaut.

  Vous  devez  donc  decider  si  vous  voulez la conformite FSSTND, les
  possibilites  offertes  par  syslog,  ou  une  combinaison  des  deux.
  Modifiez  en consequence les fichiers Makefile, tune.h et config.h. Il
  ne reste plus qu'a compiler et installer le paquetage, en suivant  les
  instructions fournies.

  A  partir  de  maintenant,  toutes les references a getty concerneront
  getty_ps, et celles a uugetty le  programme  uugetty  fourni  avec  le
  paquetage getty_ps.  Ces instructions ne sont pas applicables a mgetty
  ou agetty.

  66..33..  CCoonnffiigguurreerr uuuuggeettttyy

  uugetty, qui  assure  d'importantes  verifications  sur  les  fichiers
  verrous,  sera  utilise  pour  se connecter sur votre modem.  Mettez a
  jour /etc/gettydefs pour inclure  les  differentes  entrees  pour  les
  modems, si elles ne sont pas deja presentes (remarquez que ces entrees
  sont  rebouclees  sur  elles-memes  et  autorisent  donc   differentes
  vitesses - une ligne vide est necessaire entre deux entrees) :

  # Entrees modem
  115200# B115200 CS8 # B115200 SANE -ISTRIP HUPCL #@S @L @B login: #57600

  57600# B57600 CS8 # B57600 SANE -ISTRIP HUPCL #@S @L @B login: #38400

  38400# B38400 CS8 # B38400 SANE -ISTRIP HUPCL #@S @L @B login: #19200

  19200# B19200 CS8 # B19200 SANE -ISTRIP HUPCL #@S @L @B login: #9600

  9600# B9600 CS8 # B9600 SANE -ISTRIP HUPCL #@S @L @B login: #2400

  2400# B2400 CS8 # B2400 SANE -ISTRIP HUPCL #@S @L @B login: #115200

  Si  votre  modem  permet  des  vitesses  de  9600  bps  ou  plus  avec
  compression de donnees, vous pouvez fixer une vitesse  constante  pour
  le  port serie et laisser le modem choisir la vitesse de connexion. Le
  fichier /etc/gettydefs se simplifie et ne necessite plus qu'une  seule
  ligne pour le modem, par exemple :

       # vitesse fixe 115200
       F115200# B115200 CS8 # B115200 SANE -ISTRIP HUPCL #@S @L @B login: #F115200

  Si  le controle de flux RTS/CTS est active sur votre modem, le drapeau
  CRTSCTS peut etre ajoute dans les entrees :

       # vitesse fixe 115200 avec controle de flux materiel
       F115200# B115200 CS8 CRTSCTS # B115200 SANE -ISTRIP HUPCL CRTSCTS #@S @L @B login: #F115200

  Si vous le desirez, uugetty peut imprimer quelques informations sur le
  systeme  dans  la  banniere  de  login.  Dans  mes exemples, j'ai fait
  figurer le nom du  systeme,  le  port  serie,  ainsi  que  la  vitesse
  courante en bps.  D'autres champs sont disponibles :

              @B    La vitesse courante en bps (evaluee lorsque le @B est affiche).
              @D    La date courante (MM/DD/YY).
              @L    Le port serie auquel getty est attache.
              @S    Le nom du systeme.
              @T    L'heure courante (HH:MM:SS / 24-heures).
              @U    Le nombre d'utilisateurs actuellement connectes.  Il s'agit du
                    nombre d'entrees dans le fichier /etc/utmp qui possedent un
                    champ ut_name non nul.
              @V    La valeur de VERSION, telle qu'elle est definie dans le fichier
                    des valeurs par defaut.
              Pour afficher un simple '@', utilisez soit '\@', soit '@@'.

  Ensuite,  assurez-vous  de  connaitre  un  peripherique d'entree et de
  sortie pour le port serie dedie au modem. Si votre modem est attache a
  ttyS3, aucun peripherique correct n'existe et vous devez donc le creer
  (voir la section  ``Creer les peripheriques dans <TT>/dev</TT>'').  Si
  vous  souhaitez pouvoir appeler avec votre modem alors que uugetty est
  en attente de connexion sur le meme  port,  utilisez  le  peripherique
  /dev/cua_N a la place de /dev/ttyS_N.

  Une  fois  que  vous  avez  termine  l'edition de /etc/gettydefs, vous
  pouvez en verifier la syntaxe par :

       linux# getty -c /etc/gettydefs

  66..44..  PPeerrssoonnnnaalliisseerr uuuuggeettttyy

  De nombreuses options  peuvent  etre  configurees  dans  des  fichiers
  separes  pour  chacun des ports presents. Le fichier /etc/conf.uugetty
  sert   a   _t_o_u_t_e_s   les    instances    de    uugetty,    alors    que
  /etc/conf.uugetty.ttyS_N est specifique a un seul port. Des exemples de
  fichiers de configuration sont disponibles parmi les fichiers  sources
  de  getty_ps  livres  avec  la  plupart  des distributions Linux.  Ces
  exemples ne sont pas  repris  dans  ce  document  pour  des  problemes
  d'espace.  Notez  que  pour  les versions anciennes de getty (avant la
  2.0.7e), ou si vous n'utilisez pas la conformite  FSSTND,  le  fichier
  par   defaut   reside  dans  /etc/default/uugetty.ttyS_N.  Mon  fichier
  /etc/conf.uugetty.ttyS3 ressemble a :

       # exemple de fichier de configuration uugetty pour un modem compatible
       # Hayes en mode appele
       #
       # fichier verrou alternatif... s'il existe, uugetty est relance afin de
       # reinitialiser le modem
       ALTLOCK=cua3
       ALTLINE=cua3
       # port serie a initialiser
       INITLINE=cua3
       # delai de liberation de la ligne en cas d'inactivite...
       TIMEOUT=60
       # chaine d'initialisation du modem...
       # format : <expect> <send> ... (protocole de connexion)
       INIT="" AT\r OK\r\n
       WAITFOR=RING
       CONNECT="" ATA\r CONNECT\s\A
       # delai d'attente avant l'envoi de la banniere
       DELAY=1
       #DEBUG=010

  Ajoutez la ligne suivante dans /etc/inittab,  afin  que  uugetty  soit
  automatiquement  lance  sur  le  port  serie  (en  adaptant pour votre
  configuration la localisation du fichier de configuration, le port, la
  vitesse, et le type de terminal par defaut) :

       S3:456:respawn:/sbin/uugetty -d /etc/default/uugetty.ttyS3 ttyS3 F115200 vt100

  Redemarrez init :

  linux# init q

  La  vitesse  maximale  supportee  par le modem a ete selectionnee dans
  /etc/inittab.

  A partir de maintenant, Linux est en attente de connexions sur le port
  serie.  Appelez  depuis  une  autre  machine  et loguez-vous sur votre
  systeme Linux.

  uugetty possede de nombreuses autres options, decrites en detail  dans
  la  page  de  manuel getty(1m). Entre autres choses, on peut y trouver
  des fonctionnalites  de  programmation  horaire  (_s_c_h_e_d_u_l_i_n_g),  et  de
  rappel (_r_i_n_g_b_a_c_k).

  77..  CCoommmmeenntt ccoonnffiigguurreerr uunn tteerrmmiinnaall rraaccccoorrddee aa mmoonn PPCC ??

  Ces  instructions permettent aussi bien de connecter des terminaux que
  d'autres ordinateurs sur le port serie de votre machine Linux.

  77..11..  BBeessooiinnss mmaatteerriieellss

  Assurez-vous de posseder le bon type de cable.  Un  cable  _n_u_l_l  _m_o_d_e_m
  achete  dans  n'importe quel magasin informatique fera l'affaire, mais
  il doit s'agir effectivement d'un  cable  _n_u_l_l  _m_o_d_e_m  !  De  nombreux
  magasins  d'informatique  les vendent comme des cables pour imprimante
  serie. Verifiez que vous utilisez bien le port serie (embase male DB25
  ou DB9), et non le port parallele (embase femelle DB25 ou Centronics).

  Pour un connecteur DB25, il faut au minimum :

          DB25 male du PC                         DB25 du terminal
          TxD   Donnees emises        2 --> 3     RxD   Donnees recues
          RxD   Donnees recues        3 <-- 2     TxD   Donnees emises
          SG    Masse du signal       7 --- 7     SG    Masse du signal

  Si vous voulez profiter du controle de  flux  materiel,  la  connexion
  null modem doit etre integralement cablee :

          DB25 male du PC                         DB25 du terminal
          TxD   Donnees emises        2 --> 3     RxD   Donnees recues
          RxD   Donnees recues        3 <-- 2     TxD   Donnees emises
          RTS   Demande pour emettre  4 --> 5     CTS   Pret a emettre
          CTS   Pret a emettre        5 <-- 4     RTS   Demande pour emettre
          DSR   Poste de donnees pret 6
                                      |
          DCD   Detection de porteuse 8 <-- 20    DTR   Terminal de donnees pret
          SG    Masse du signal       7 --- 7     SG    Masse du signal
                                            6     DSR   Poste de donnees pret
                                            |
          DTR   Terminal pret        20 --> 8     DCD   Detection de porteuse

  Si vous avez un connecteur DB9, vous pouvez essayer :

          DB9 du PC                               DB25 du terminal
          RxD   Donnees recues        2 <-- 2     TxD   Donnees emises
          TxD   Donnees emises        3 --> 3     RxD   Donnees recues
          SG    Masse du signal       5 --- 7     SG    Masse du signal

  Pour un cable complet DB9-DB25, on obtient :

          DB9 du PC                               DB25 du terminal
          RxD   Donnees recues        2 <-- 2     TxD   Donnees emises
          TxD   Donnees emises        3 --> 3     RxD   Donnees recues
                                            6     DSR   Poste de donnees pret
                                            |
          DTR   Terminal pret         4 --> 8     DCD   Detection de porteuse
          SG    Masse du signal       5 --- 7     SG    Masse du signal
          DCD   Detection de porteuse 1
                                      |
          DSR   Poste de donnees pret 6 <-- 20    DTR   Terminal de donnees pret
          RTS   Demande pour emettre  7 --> 5     CTS   Pret a emettre
          CTS   Pret a emettre        8 <-- 4     RTS   Demande pour emettre
          (RI   Indicateur sonnerie   9 pas necessaire)

  (Eh oui, les broches 2 et 3 ont _e_f_f_e_c_t_i_v_e_m_e_n_t la signification opposee
  entre les connecteurs DB9 et DB25 !)

  Ceux qui ne possedent pas de cable null  modem  complet  devront  user
  d'une  astuce  afin  que le PC recoive (de lui-meme) les acquittements
  qu'il demande avec le controle de flux materiel :  sur  le  connecteur
  cote PC, rebouclez ensemble RTS et CTS, ainsi que DSR, DCD et DTR.

  Maintenant  que  avez  le bon type de cable, il vous reste a connecter
  votre terminal sur votre ordinateur. Si possible, demandez au terminal
  d'ignorer  les  signaux  de  controle  pour  modems,  et essayez de le
  parametrer avec une vitesse de  9600 bps, 8 bits de donnees, 1 bit  de
  stop, et pas de parite.

  77..22..  CCoonnffiigguurreerr ggeettttyy

  Si  elles  ne sont pas deja presentes, ajoutez dans /etc/gettydefs les
  entrees destinees a getty pour votre terminal,

       # Entree de terminal simple a 38400 bps
       DT38400# B38400 CS8 CLOCAL # B38400 SANE -ISTRIP CLOCAL #@S @L login: #DT38400

       # Entree de terminal simple a 19200 bps
       DT19200# B19200 CS8 CLOCAL # B19200 SANE -ISTRIP CLOCAL #@S @L login: #DT19200

       # Entree de terminal simple a 9600 bps
       DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S @L login: #DT9600

  Si vous le desirez, getty peut imprimer quelques informations  sur  le
  systeme  dans  la  banniere  de  login.  Dans  mes exemples, j'ai fait
  figurer le nom du systeme ainsi que le port serie.  D'autres variables
  sont disponibles :

  @B    La vitesse courante en bps (evaluee lorsque le @B est affiche).
  @D    La date courante (MM/DD/YY).
  @L    Le port serie auquel getty est attache.
  @S    Le nom du systeme.
  @T    L'heure courante (HH:MM:SS / 24-heures).
  @U    Le nombre d'utilisateurs actuellement connectes.  Il s'agit du
        nombre d'entrees dans le fichier /etc/utmp qui possedent un
        champ ut_name non nul.
  @V    La valeur de VERSION, telle qu'elle est definie dans le fichier
        des valeurs par defaut.
  Pour afficher un simple '@', utilisez soit '\@', soit '@@'.

  Une fois l'edition de /etc/gettydefs terminee, vous pouvez en verifier
  la syntaxe par :

       linux# getty -c /etc/gettydefs

  Assurez-vous qu'il n'existe pas deja de fichier de configuration getty
  ou  uugetty pour le port serie auquel vous avez attache votre terminal
  (/etc/default/{uu}getty.ttyS_N ou  /etc/conf.{uu}getty.ttyS_N),  car  il
  risque probablement d'interferer avec l'instance de getty du terminal.
  Supprimez le fichier s'il existe.

  Editez la ligne suivante dans /etc/inittab, afin que getty soit  lance
  sur  le  port  serie (en adaptant pour votre configuration le port, la
  vitesse, et le type de terminal par defaut) :

       S1:456:respawn:/sbin/getty ttyS1 DT9600 vt100

  Redemarrez init :

       linux# init q

  Vous devez maintenant voir apparaitre une invite  de  session  sur  le
  terminal.  Il  peut  neanmoins  etre necessaire de taper sur la touche
  Entree pour avertir le terminal.

  77..33..  RReemmaarrqquueess ssuurr llaa ccoonnffiigguurraattiioonn dd''uunn PPCC eenn ttaanntt qquuee tteerrmmiinnaall

  Nombreux  sont  ceux  qui  se  servent d'autres PC comme des terminaux
  rattaches a des systemes Linux. Par exemple,  des  vieux  PC  8088  ou
  80286  sont  parfaits  pour  cet  usage.  Vous avez juste besoin d'une
  disquette de demarrage DOS et d'un programme  de  communications  pour
  faire  tourner  votre  terminal-PC.  kermit  fonctionne tres bien dans
  cette configuration. Des versions compilees de kermit  pour  n'importe
  quel      systeme      d'exploitation     sont     disponibles     sur
  http://www.columbia.edu/kermit/.  D'autres  programmes  populaires  de
  communications  sous DOS, comme telix ou procomm remplissent egalement
  tres bien cette fonction. Soyez juste sur de fournir des  informations
  correctes lors du parametrage des communications de votre terminal-PC.

  88..  PPuuiiss--jjee uuttiilliisseerr pplluuss ddee ddeeuuxx ppoorrttss sseerriiee ??

  Il n'est pas necessaire que vous lisiez cette  section,  a  moins  que
  vous  utilisiez  au moins trois ports serie... (mais pas sur une carte
  multiports).

  N'importe quel port serie libre est utilisable.  La  seule  limitation
  reside  dans  le  nombre  d'interruptions  (IRQ) et d'adresses de port
  d'entree/sortie a utiliser.  Cette limitation n'est pas  specifique  a
  Linux,  mais  est  due  au  bus du PC. Chaque peripherique serie (port
  serie,  modem  interne,  carte  serie)  doit  posseder   ses   propres
  interruption et adresse.

  Les cartes serie multiports sont specialement concues pour partager la
  meme  interruption  sur  tous  les  ports  qu'elles  possedent.  Linux
  communique  avec  elles  en  selectionnant une adresse d'entree/sortie
  differente pour chaque port de ces cartes.

  88..11..  CChhooiissiirr lleess iinntteerrrruuppttiioonnss ddeess ppeerriipphheerriiqquueess sseerriiee

  Par defaut sur un PC, l'IRQ 4 est partagee entre  ttyS0 et  ttyS2,  et
  l'IRQ 3 entre ttyS1 et ttyS3. Les interruptions en cours d'utilisation
  sont regroupees dans /proc/interrupts. Pour se servir de plus de  deux
  ports  serie,   leur interruption doit etre reassignee, par exemple en
  choisissant celle d'un port parallele.   En effet, les IRQ 5 et 7 sont
  sur  un  PC  normalement  attribuees aux ports paralleles, mais peu de
  personnes en possedent deux. Vous pouvez donc reassigner  une  de  ces
  interruptions  a  un  port  serie, et continuer a utiliser joyeusement
  votre port parallele  !   Cette  manipulation  requiert  le  programme
  setserial.  De plus, il vous faudra ajuster certains cavaliers sur vos
  cartes (a verifier sur les manuels des cartes) pour fixer les IRQ.

  Vous devez vous arranger pour avoir une IRQ  unique  pour  chacun  des
  ports   serie.   Voici   comment   je   configure   les   miens   dans
  /etc/rc.d/rc.local (cette  initialisation  doit  avoir  lieu  lors  du
  demarrage) :

               /sbin/setserial /dev/ttyS0 irq 3        # ma souris
               /sbin/setserial /dev/ttyS1 irq 4        # mon terminal Wyse
               /sbin/setserial /dev/ttyS2 irq 5        # mon modem Zoom
               /sbin/setserial /dev/ttyS3 irq 9        # mon modem USR

  Assignations standards des IRQ :

                IRQ  0    Base de temps 0
                IRQ  1    Clavier
                IRQ  2    Cascade pour le deuxieme controleur d'IRQ
                IRQ  3    Port serie 2
                IRQ  4    Port serie 1
                IRQ  5    Port parallele 2
                IRQ  6    Disquette
                IRQ  7    Port parallele 1
                IRQ  8    Horloge temps-reel (RTC)
                IRQ  9    Redirige vers l'IRQ2
                IRQ 10    Non assignee
                IRQ 11    Non assignee
                IRQ 12    Non assignee
                IRQ 13    Coprocesseur mathematique
                IRQ 14    Controleur de disques durs 1
                IRQ 15    Controleur de disques durs 2

  Il   n'existe  pas  vraiment  de  Bonne  Technique  pour  choisir  les
  interruptions. Il faut juste  s'assurer  qu'elles  ne  sont  pas  deja
  utilisees  par la carte mere, ou une autre carte. 2, 3, 4, 5, ou 7 est
  generalement un bon choix.  ``Non  assignee''  signifie  que  rien  de
  standard  n'utilise  cette  IRQ.  Notez egalement que l'IRQ2 et l'IRQ9
  sont identiques : vous pouvez donc specifier aussi bien 2  que  9,  le
  gestionnaire  de peripheriques est tres comprehensif. Si vous possedez
  une carte serie avec  un  connecteur  de  bus  16  bits,  vous  pouvez
  egalement utiliser l'IRQ 10, 11, 12 ou 15.

  N'utilisez pas les IRQ 0, 1, 6, 8, 13 et 14 ! Elles sont reservees par
  la carte mere. Une fois le parametrage effectue, verifiez l'absence de
  conflit avec /proc/interrupts.

  88..22..  CChhooiissiirr lleess aaddrreesssseess ddeess ppeerriipphheerriiqquueess sseerriiee

  Vous  devez  ensuite  fixer les adresses des ports. Verifiez le manuel
  pour la position des cavaliers. Comme pour les  interruptions,  chaque
  peripherique  serie  doit  posseder sa propre adresse. Par defaut, les
  ports sont parametres de la maniere suivante :

               ttyS0 adresse 0x3f8
               ttyS1 adresse 0x2f8
               ttyS2 adresse 0x3e8
               ttyS3 adresse 0x2e8

  Choisissez les adresses a affecter a chaque port serie, et positionnez
  les  cavaliers  sur la carte en consequence. Ainsi, j'ai mon modem sur
  ttyS3, ma souris sur ttyS0, et mon terminal sur ttyS2.

  Au prochain  demarrage,  Linux  devrait  voir  vos  ports  series  aux
  adresses  que  vous  avez  selectionnees. Par contre, les IRQ vues par
  Linux  peuvent  ne  pas  correspondre  avec  celles  que   vous   avez
  configurees.  Ne  vous  inquietez pas : Linux ne sait pas detecter les
  IRQ au demarrage, car c'est assez aleatoire et le resultat  peut  etre
  faux.  Utilisez setserial pour specifier a Linux quelles interruptions
  sont associees aux ports, puis verifiez apres redemarrage de Linux les
  adresses des ports d'entree/sortie avec /proc/ioports.

  99..   CCoommmmeenntt  ccoonnffiigguurreerr  ddeess vviitteesssseess pplluuss iimmppoorrttaanntteess ppoouurr mmeess ppoorrttss
  sseerriiee ?? AA qquueellllee vviitteessssee ddooiiss--jjee ffiixxeerr mmoonn mmooddeemm ??

  Cette  section  a  pour  but  de vous aider a determiner la vitesse du
  modem a utiliser avec un programme de communications ou getty.

  +o  Si votre modem ne supporte que des vitesses inferieures a 9600  bps
     (V.32),  choisissez  la vitesse la plus importante, par exemple 300
     bps (V.21/Bell  103),  1200  bps  (V.22/Bell  212A),  ou  2400  bps
     (V.22bis).

  +o  Si vous possedez un modem 9600 bps (V.32), integrant la compression
     de donnees V.42bis, choisissez 38400  bps.  Le  taux  _t_h_e_o_r_i_q_u_e  de
     compression est de 4:1, soit ``4 * 9600 = 38400''.

  +o  Si  vous  possedez  un  modem  14400  bps  (V.32bis),  integrant la
     compression de donnees V.42bis, configurer le port a 57600 bps (4 *
     14400 = 57600) avec l'option spd_hi de setserial.

     Pour  les  modems  28800  ou  33600  bps  (V.FC  ou V.34), utiliser
     l'option spd_vhi (4 * 28800 = 115200).

     Enfin, fixez la  vitesse  a  38400  bps  dans  votre  programme  de
     communications  ou  /etc/inittab.  Vous  etes  maintenant en grande
     vitesse ! Assurez-vous de posseder des UART 16550A.

     Il existe des vitesses nommees 57600 et 115200 dans les versions de
     libc  superieures  ou  egales  a 5.x (a verifier dans le repertoire
     /lib). Dans ce cas, vous pouvez les selectionner directement  (sans
     passer  par  setserial)  si  vos  applications ont ete compilees de
     maniere a en tirer avantage.  Il existe tellement de  distributions
     Linux,  que le mieux a faire est d'essayer directement ces vitesses
     si votre distribution est assez recente.

  Avant de fixer la configuration de setserial dans  /etc/rc.d/rc.serial
  ou  /etc/rc.d/rc.local afin qu'elle soit prise en compte au demarrage,
  il est preferable de l'essayer manuellement.  Par exemple, pour  fixer
  ttyS3 a 115200 bps, mon fichier /etc/rc.d/rc.local contient :

       /sbin/setserial /dev/ttyS3 spd_vhi

  Assurez-vous que le chemin d'acces a setserial est valide, de meme que
  le nom du peripherique. Le  parametrage  d'un  port  serie  peut  etre
  verifie par :

       setserial -a /dev/ttyS3

  1100..  PPrrooggrraammmmeess eett uuttiilliittaaiirreess ddee ccoommmmuunniiccaattiioonnss

  Voici  une  liste  de  logiciels  de  communications  que  vous pouvez
  telecharger  par  FTP,  s'ils  ne  sont   pas   fournis   dans   votre
  distribution :

  +o  ecu - un programme de communications

  +o  C-Kermit    <http://www.columbia.edu/kermit/>    -   programme   de
     communications portable et scriptable, par liaison serie ou TCP/IP,
     incluant  le  transfert  de  fichiers  et la traduction des jeux de
     caracteres

  +o  minicom - un programme de communications du genre de telix

  +o  pcomm - un programme de communications du  genre  de  procomm  avec
     protocole zmodem

  +o  seyon - un programme de communications sous X11

  +o  xc - paquetage de communications xcomm

  +o  D'autres  programmes  utiles  sont  term  et  SLiRP qui offrent des
     fonctionnalites TCP/IP a partir d'un compte shell.

  +o  screen est un autre programme multi-sessions qui se comporte  comme
     les consoles virtuelles.

  +o  callback  est  un  programme  permettant  a votre modem de se faire
     rappeler.

  +o  mgetty+fax gere le mode FAX, et offre un getty alternatif.

  +o  ZyXEL est un programme de controle pour les  modems  ZyXEL  U-1496.
     Il gere les appels entrants et sortants, la securite pour le rappel
     automatique, le mode FAX, et possede des  fonctions  de  messagerie
     vocale.

  +o  SLIP     et     PPP     peuvent     etre     telecharges     depuis
     ftp://sunsite.unc.edu/pub/Linux/system/network/serial.

  +o  On trouve egalement d'autres programmes pour les liaisons serie sur
     ftp://sunsite.unc.edu/pub/Linux/system/serial                    et
     ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm  ou  sur  l'un  des
     nombreux sites miroirs.

  1111..  TTrruuccss eett aassttuucceess ssuurr lleess lliiaaiissoonnss sseerriiee

  Je  vous  presente  ici  quelques  astuces  que  vous  pourrez trouver
  utiles...

  1111..11..  kkeerrmmiitt et zmodem

  Pour utiliser le protocole zmodem  avec  kermit,  ajoutez  les  lignes
  suivantes dans votre .kermrc:

       define rz\~!rz < /dev/ttyS3 > /dev/ttyS3
       define sz\~!sz \%0 > /dev/ttyS3 < /dev/ttyS3

  Soyez  sur  de  positionner  le port serie auquel votre modem est rat-
  tache.  Il suffit alors de taper rz ou sz  <filename>  a  l'invite  de
  commandes de kermit.

  1111..22..  PPaarraammeettrreerr lleess ttyyppeess ddee tteerrmmiinnaauuxx aauuttoommaaggiiqquueemmeenntt

  Pour  selectionner  automagiquement le type de terminal au debut d'une
  session, ajoutez-le dans l'entree correspondante de /etc/inittab.  Par
  exemple,  avec  un terminal VT100 sur ttyS1, j'ajouterais ``vt100'' en
  parametre de la commande getty :

       S1:456:respawn:/sbin/getty ttyS1 DT9600 vt100

  Vous   pouvez   egalement   utiliser   tset   pour   positionner   les
  caracteristiques du terminal a l'entree en session, independamment des
  valeurs par defaut.

  1111..33..  llss en couleurs sur les connexions serie

  Si l'emulation de votre terminal ne supporte pas correctement l'option
  couleur  de ls, desactivez-la. Certaines installations l'utilisent par
  defaut (ls --color ou ls --colour).  Verifiez les alias  sur  ls  dans
  /etc/profile  et /etc/csh.cshrc. Vous pouvez egalement creer un nouvel
  alias de ls sur ls --no-color, si vous ne souhaitez pas  modifier  les
  valeurs par defaut.

  1111..44..  IImmpprriimmeerr ssuurr uunnee iimmpprriimmaannttee aattttaacchheeee aa uunn tteerrmmiinnaall

  Il  existe  pour  cela  un  programme  appele  vtprint, disponible sur
  ftp://ftp.sdsu.edu/pub/vtprint, et sur http://www.sdsu.edu/~garrett.

  Un deuxieme  programme  est  xprt.  Il  peut  etre  telecharge  depuis
  ftp://sunsite.unc.edu/pub/Linux/system/printing.

  1111..55..     LLiinnuuxx    ppeeuutt--iill    ccoonnffiigguurreerr   lleess   ppeerriipphheerriiqquueess   sseerriiee
  aauuttoommaaggiiqquueemmeenntt ??

  Effectivement,  Linux  peut  detecter  et parametrer les peripheriques
  serie automatiquement au demarrage en ajoutant par exemple la ligne :

       /sbin/setserial /dev/ttyS3 auto_irq skip_test autoconfig

  dans votre fichier /etc/rc.d/rc.local ou /etc/rc.d/rc.serial.  Repetez
  la  manipulation  pour  chacun des ports serie qui doit etre configure
  automatiquement.  Soyez juste sur de fournir un  nom  de  peripherique
  existant sur votre machine.

  1111..55..11..  RReemmaarrqquueess ppoouurr lleess ccaarrtteess mmuullttiippoorrttss

  Referez-vous  au  fichier  rc.serial  fourni  avec  setserial pour les
  adresses et les IRQ de ces cartes.   Beaucoup  de  parametres  y  sont
  detailles  concernant les cartes multiports, y compris les adresses et
  les noms des peripheriques a utiliser.

  1111..66..  UUttiilliisseerr uunnee ccoonnssoollee sseerriiee

  Un   article    dans    le     numero    36    du     _L_i_n_u_x    _J_o_u_r_n_a_l
  (http://www.ssc.com/lj/issue36/index.html)  explique  comment utiliser
  un terminal comme une console. Malheureusement, l'adresse electronique
  de  l'auteur  ne  semble  pas  correcte  car  les messages reviennent.
  J'espere que cet article figurera bientot sur le  site  WEB  du  _L_i_n_u_x
  _J_o_u_r_n_a_l  a  l'URL  mentionnee  ci-dessus.   _(_N_d_T  _:  _c_e_t  _a_r_t_i_c_l_e  _e_s_t
  _m_a_i_n_t_e_n_a_n_t          _d_i_s_p_o_n_i_b_l_e          _e_n           _l_i_g_n_e           _a
  _h_t_t_p_:_/_/_w_w_w_._s_s_c_._c_o_m_/_l_j_/_i_s_s_u_e_3_6_/_c_o_n_s_o_l_e_._h_t_m_l)

  1111..77..  OObbtteenniirr ddeess ddeebbiittss pplluuss iimmppoorrttaannttss

  Si  vous  jugez  le  debit  de vos ports serie lent, ou si des erreurs
  d'ecrasement  de  caracteres  a  la  reception  (_o_v_e_r_r_u_n  _e_r_r_o_r_s)   se
  produisent sur un systeme muni de disques durs (E)IDE, utilisez hdparm
  pour modifier certains des parametres de  ces  disques,  notamment  le
  demasquage  des  autres  IRQ  pendant  les interruptions disque. Cette
  manipulation augmentera le taux de reponse et aidera a  supprimer  les
  ecrasements  de  caracteres.  Lisez  bien  les  pages  de  manuel, car
  certaines combinaisons sont plus ou moins bien supportees suivant  les
  disques   et  les  controleurs  utilises,  et  peuvent  provoquer  une
  corruption du systeme de fichiers.

  Regardez egalement l'utilitaire irqtune  qui  permet  de  modifier  la
  priorite  de  l'IRQ d'un peripherique, par exemple celle du port serie
  lie   au   modem.   La    FAQ    d'irqtune    est    disponible    sur
  http://www.best.com/~cae/irqtune.

  1122..  UUnn ppaass ddee pplluuss......

  Cette  section  n'est absolument pas necessaire a la comprehension des
  ports serie sous Linux, mais peut  neanmoins  vous  apporter  quelques
  eclaircissements sur Unix et le monde des telecommunications.

  1122..11..  QQuu''eesstt--ccee qquuee lleess ffiicchhiieerrss vveerrrroouuss ??

  Un  fichier  verrou  est  simplement  un  fichier  qui  indique  qu'un
  peripherique  particulier  est  en  cours  d'utilisation.   Ils   sont
  regroupes  dans  /usr/spool/uucp  ou  /var/lock.   Sous  Linux, ils se
  nomment LCK.._n_o_m ou _n_o_m est soit un nom de peripherique, soit  un  nom
  de  site  UUCP.  Certains  processus  creent  de  tels  fichiers  pour
  s'assurer l'acces exclusif aux peripheriques.  Par  exemple,  si  vous
  appelez  avec votre modem, un fichier verrou va etre cree pour avertir
  les autres processus que le modem est  deja  en  cours  d'utilisation.
  Les  verrous  contiennent principalement le PID du processus qui s'est
  attribue le peripherique.  La plupart des programmes regardent dans un
  premier  temps  si  un  fichier  verrou existe, puis s'il est toujours
  valide en recherchant dans la table des processus le programme  qui  a
  verrouille  le peripherique. Si le fichier verrou est toujours valide,
  alors le nouveau programme doit  s'arreter.  Dans  le  cas  contraire,
  certains  programmes suppriment le fichier verrou perime, et utilisent
  le  peripherique  en  creant  leur  propre  verrou  a  l'interieur  du
  processus.   D'autres   programmes   s'arretent   tout  simplement  et
  previennent l'utilisateur que le peripherique est deja utilise.

  1122..22..  ````bbaauudd'''' eett ````bbppss''''

  ``baud'' et ``bps'' font certainement partie des termes les  plus  mal
  utilises  dans  le  monde de l'informatique et des telecommunications.
  Ils sont souvent consideres a tort comme equivalents, alors qu'ils  ne
  le sont pas !
     bbaauudd
        Le  baud  represente la frequence de (de)modulation d'un signal,
        par exemple celui envoye  ou  recu  par  un  modem  (mmoodulateur-
        ddeemmodulateur),  c'est-a-dire  le nombre de fois ou il change par
        seconde.  Par exemple, 1200 bauds implique que le signal  change
        d'etat   toutes   les   833  microsecondes.  Les  frequences  de
        (de)modulation les plus courantes pour un  modem  sont  50,  75,
        110,  300,  600,  1200,  et  2400  bauds.  La plupart des modems
        hautes vitesses fonctionnent a 2400 bauds.  Les frequences  plus
        elevees  sont plus difficiles a atteindre.  Cette limitation est
        principalement  due   aux   basses   performances   des   lignes
        telephoniques  dediees  essentiellement au transport de la voix.
        Plusieurs bits sont  alors  encodes  par  baud,  ce  qui  permet
        d'obtenir des taux de transfert en bits plus eleves qu'en bauds.
        L'etymologie  du  mot   ``baud''   vient   de   l'inventeur   de
        l'imprimante telegraphique asynchrone, Emile Baudot.

     bbppss
        Le  taux  de  transfert  en  bps  represente  le  nombre de bits
        transmis en une seconde. Les vitesses en bps les plus  courantes
        sont 50, 75, 110, 300, 1200, 2400, 9600, ... 115200.  Les modems
        avec compression V.42bis (rapport maximal de 4 a 1) activee sont
        capables  _t_h_e_r_o_r_i_q_u_e_m_e_n_t d'atteindre des vitesses de 115200 bps.
        C'est l'usage mauvais le plus courant du terme ``baud''.

  Donc, si les modems hautes vitesses fonctionnent a 2400 bauds, comment
  peuvent-ils  emettre  a 14400 bps ? En fait, les modems atteignent des
  taux de transfert en bps superieurs a la frequence de  modulation,  en
  codant  plusieurs bits dans un seul changement d'amplitude ou de phase
  du signal. Ainsi, quand 2 bits ou plus sont codes par baud, la vitesse
  en  bps depasse la frequence en bauds. Quand votre modem se connecte a
  14400 bps, il envoie effectivement  6  bits  a  chaque  changement  de
  phase, a 2400 bauds.

  Cette  confusion  entre  bauds  et  bps  date  du temps ou les taux de
  transfert etaient  faibles,  et  ou  la  vitesse  en  bps  egalait  la
  frequence  de  modulation  en  bauds.  Par exemple, un modem a 300 bps
  fonctionne a une frequence de 300 bauds. Les deux valeurs ont commence
  a diverger avec l'apparition des modems hautes vitesses.

  1122..33..   QQuu''eesstt--ccee  qquuee  lleess  UUAARRTT  ??   CCoommmmeenntt  iinnfflluueenntt--iillss  ssuurr  lleess
  ppeerrffoorrmmaanncceess ??

  Les  UART  (UUniversal  AAsyncronous  RReceiver  TTransmitter  --  EEmmeetttteeuurr
  RReecceepptteeuurr  UUnniivveerrsseell  AAssyynncchhrroonnee))  ssoonntt  ddeess  cciirrccuuiittss   eelleeccttrroonniiqquueess
  eeqquuiippaanntt  lleess  ccaarrtteess  sseerriiee  ddeess  PPCC..   IIllss sseerrvveenntt aa ttrraannssffoorrmmeerr lleess
  ddoonnnneeeess eenn bbiittss,, aa lleess eennvvooyyeerr ssuurr llaa lliiggnnee sseerriiee,, ppuuiiss aa rreeccoonnssttrruuiirree
  cceess  ddoonnnneeeess  aa  ll''aauuttrree  bboouutt..  IIllss  ttrraavvaaiilllleenntt  ssuurr ddeess oocctteettss,, qquuii
  ccoorrrreessppoonnddeenntt jjuusstteemmeenntt aa llaa ttaaiillllee ddeess ccaarraacctteerreess AASSCCIIII..

  Supposons qu'un terminal est connecte a votre PC. Quand vous tapez  un
  caractere, le terminal l'envoie a un emetteur (qui est aussi un UART).
  L'emetteur envoie alors cet octet sur la ligne serie, bit par bit,  et
  a  une  vitesse  specifique.  Du cote PC, l'UART receptionne ces bits,
  reconstruit l'octet, et enfin le place dans une zone memoire.

  Il existe essentiellement deux types d'UART :  les  simples  (8250  et
  16450),   et   ceux  dotes  de  FIFO  (16550A).  Pour  comprendre  les
  differences qui existent entre ces circuits, il faut examiner  ce  qui
  se passe quand un UART envoie ou recoit un octet.

  L'UART  lui-meme  ne fait rien avec les donnees ; il s'occupe juste de
  les emettre ou les receptionner. Le CPU  recoit  une  interruption  du
  peripherique  serie  chaque  fois  qu'un  octet part ou arrive. Le CPU
  deplace alors  l'octet  recu  du  peripherique  serie  vers  une  zone
  memoire,  ou  alors il redonne a l'UART un nouvel octet a transmettre.
  Les UART 8250 et 16450 ne possedent qu'une zone tampon d'un octet,  ce
  qui  signifie  que  le  CPU  est  interrompu  a  chaque  caractere. Ca
  fonctionne aux vitesses faibles, mais pour des  vitesses  elevees,  le
  CPU  est  tellement  occupe  par l'UART, qu'il n'a plus assez de temps
  pour les autres taches. Dans certains cas, le CPU ne peut pas repondre
  a  l'interruption  assez  vite,  et  les caracteres sont alors ecrases
  (_o_v_e_r_r_u_n _e_r_r_o_r).

  Les UART 16550 sont alors utiles car ils sont equipes de tampons  FIFO
  de  16 octets, c'est-a-dire qu'ils peuvent emettre ou recevoir jusqu'a
  16 octets avant d'interrompre le CPU. Bien que ce seuil d'interruption
  soit  rarement  fixe  a  16,  ca  represente  quand  meme  un avantage
  significatif par rapport aux UART dotes d'un tampon d'un  seul  octet.
  Le  CPU  est  alors interrompu moins souvent et peut consacrer plus de
  temps aux autres taches. Les donnees ne sont donc  plus  perdues.  (Il
  existe  egalement  un  UART 16550, considere comme un 16450 car il est
  defectueux.)

  En general, les 8250  et  16450  peuvent  suffire  pour  des  vitesses
  n'excedant pas 38400 bps. A des vitesses superieures, vous pouvez voir
  apparaitre des pertes de caracteres. D'autres systemes  d'exploitation
  pour PC, comme DOS (definition approximative dans ce cas), qui ne sont
  pas multitaches, peuvent a la rigueur mieux se  debrouiller  avec  des
  8250  ou  des  16450.   C'est  pour  cela  que  certaines personnes ne
  constatent aucune perte de donnees, jusqu'au moment ou elles passent a
  Linux.

  Les  cartes multiports intelligentes utilisent des DSP (_D_i_g_i_t_a_l _S_i_g_n_a_l
  _P_r_o_c_e_s_s_o_r_s  -  processeurs  de  signaux  digitaux)  pour  assurer  des
  fonctions  supplementaires  de controle et de mises en memoire tampon,
  ce qui permet de decharger encore plus le CPU. Par exemple, les cartes
  Cyclades Cyclom et Stallion EasyIO possedent un UART RISC Cirrus Logic
  CD1400. La plupart des autres cartes sont dotees de CPU  80186,  voire
  de CPU RISC specifiques, pour assurer les entrees/sorties serie.

  Gardez  a  l'esprit  que  ces UART ne sont pas mauvais, mais qu'ils ne
  suffisent  pas  pour  des  vitesses  elevees.  Vous  ne  devriez   pas
  rencontrer  de probleme en connectant un terminal ou une souris sur de
  tels UART. Par contre, les 16550A sont definitivement un _m_u_s_t pour les
  modems hautes vitesses.

  Les  cartes a base d'UART 16550A sont a peine plus cheres que celles a
  base de 16450. De meme, il est possible de remplacer  les  UART  16450
  existants  sur une carte par des 16550A. Ces circuits sont compatibles
  broche a broche.  Certaines cartes sont  meme  equipees  a  cet  effet
  d'UART montes sur support. Sinon, il faudra souder. Remarquez que vous
  vous eviterez surement pas mal de soucis en achetant  directement  une
  nouvelle carte.

  1133..  RReessoouuddrree lleess pprroobblleemmeess

  1133..11..   LLee mmeessssaaggee ````lliinnee _N_N_N ooff iinniittttaabb iinnvvaalliidd'''' ss''aaffffiicchhee eenn ppeerrmmaa--
  nneennccee

  Assurez-vous  d'utiliser  une  syntaxe  correcte pour votre version de
  init. En effet,  chaque  programme  init  ou  presque  a  une  syntaxe
  specifique  pour  son  fichier de configuration /etc/inittab. De meme,
  verifiez les parametres que vous passez a votre getty.

  1133..22..  LLee mmeessssaaggee ````//ddeevv//ccuuaa_N::  DDeevviiccee  oorr  rreessoouurrccee  bbuussyy''''  aappppaarraaiitt
  qquuaanndd jj''eessssaaiiee dd''aappppeelleerr

  Ce probleme peut survenir quand les signaux DCD ou  DTR  ne  sont  pas
  positionnes  correctement.  DCD  doit  etre  leve seulement lors d'une
  connexion (_i_e quelqu'un est deja connecte), et  non  pas  quand  getty
  scrute  le  port.  Assurez-vous  donc  que le modem est configure pour
  lever le signal DCD seulement en connexion. DTR doit  etre  positionne
  des  qu'un  processus  utilise  ou scrute la ligne, par exemple getty,
  kermit, ou n'importe quel autre programme de communications.

  Une autre cause possible est que l'IRQ assignee au port serie est deja
  prise par un autre peripherique. En effet, lors de son initialisation,
  chaque peripherique demande l'autorisation a  Linux  d'utiliser  l'IRQ
  selectionnee.    Linux   garde   une   trace   de   l'affectation  des
  interruptions, et  si  une  IRQ  est  en  cours  d'utilisation,  votre
  peripherique ne pourra pas s'initialiser.  Celui-ci n'a aucun moyen de
  vous prevenir, excepte par le  message  ``device-busy''  lorsque  vous
  tentez  de l'utilisez.  Verifiez alors les interruptions de toutes vos
  cartes (serie, ethernet, SCSI, etc.) et les conflits eventuels.

  1133..33..  LLee mmeessssaaggee ````IIdd SS_N rreessppaawwnniinngg ttoooo ffaasstt::  ddiissaabblleedd  ffoorr  55  mmiinn--
  uutteess'''' ss''aaffffiicchhee ppeerriiooddiiqquueemmeenntt

  Assurez-vous que votre modem  est  correctement  configure.   Examinez
  particulierement  les  registres  E  et Q. Ce probleme peut apparaitre
  lorque getty discute avec le modem.

  Verifiez egalement  les  parametres  que  vous  passez  a  getty  dans
  /etc/inittab. Une syntaxe ou un nom de peripherique errone peut causer
  de serieux problemes.

  La syntaxe de  /etc/gettydefs  peut  etre  verifiee  par  la  commande
  suivante :

       linux# getty -c /etc/gettydefs

  Ce  probleme arrive quelquefois lors de l'echec de l'initialisation de
  uugetty. Reportez-vous a la section ``getty ou uugetty  ne  fonctionne
  toujours  pas''.

  1133..44..  MMeess ppeerriipphheerriiqquueess sseerriiee ssoonntt lleennttss oouu uunniiddiirreeccttiioonnnneellss

  La cause la plus probable est un conflit d'IRQ. Assurez-vous qu'aucune
  IRQ  n'est partagee. Verifiez les cavaliers sur les differentes cartes
  (serie, ethernet, SCSI,  etc.)  ainsi  que  les  parametres  passes  a
  setserial pour tous les peripheriques serie. Les conflits peuvent etre
  localises avec /proc/ioports et /proc/interrupts.

  1133..55..  MMoonn mmooddeemm nnee rreeppoonndd pplluuss aapprreess llee rraaccccrroocchhaaggee,, oouu uuuuggeettttyy ne se
  relance plus automatiquement

  Cela peut se produire si le modem n'est  pas  reinitialise  lorque  le
  signal  DTR  retombe. J'ai vu les LED RD et SD devenir folles quand ca
  m'est arrive. Il faut alors reinitialiser le  modem.  La  plupart  des
  modems  compatibles  Hayes ont besoin de la commande &D3, mais sur mon
  USR Courier, je dois positionner  &D2  et  S13=1.   Verifiez  dans  la
  documentation de votre modem.

  1133..66..   UUnn  tteerrmmiinnaall  eesstt ccoonnnneeccttee aa mmoonn PPCC,, mmaaiiss iill ssee bbllooqquuee ddeess qquuee
  jj''aaii eennttrree mmoonn nnoomm dd''uuttiilliissaatteeuurr

  +o  Si  vous  utilisez  getty,  vous  devez  faire  figurer CLOCAL dans
     l'entree correspondante de /etc/gettydefs,  et  utiliser  un  cable
     null-modem  complet.  L'option CLOCAL indique a Linux d'ignorer les
     signaux de controle specifiques aux modems :

       # Entree de terminal simple a 38400 bps
       DT38400# B38400 CS8 CLOCAL # B38400 SANE -ISTRIP CLOCAL #@S @L login: #DT38400

       # Entree de terminal simple a 19200 bps
       DT19200# B19200 CS8 CLOCAL # B19200 SANE -ISTRIP CLOCAL #@S @L login: #DT19200

       # Entree de terminal simple a 9600 bps
       DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S @L login: #DT9600

  Ensuite, tuez (kill) le processus getty afin qu'une nouvelle  instance
  soit lancee avec les entrees mises a jour.

  +o  Si   vous   utilisez   agetty,  ajoutez  l'option  -L  a  la  ligne
     correspondante de /etc/inittab,  pour  indiquer  que  vous  desirez
     ignorer les signaux de controle specifiques aux modems.  Redemarrez
     init en tapant init q. L'entree doit ressembler a :

       s1:345:respawn:/sbin/agetty -L 9600 ttyS1 vt100

  1133..77..  MMoonn mmooddeemm ppeerrdd ddeess ddoonnnneeeess aa hhaauuttee vviitteessssee

  Si vous essayez de faire fonctionner votre modem a plus de 38400  bps,
  vous  devez obligatoirement passer en UART 16550A.  Reportez-vous a la
  section ``Qu'est-ce que  les UART ?''.

  1133..88..  AAuu ddeemmaarrrraaggee,, LLiinnuuxx nn''aaffffiicchhee ppaass lleess ppoorrttss sseerriiee tteellss  qquuee  jjee
  lleess aaii ppaarraammeettrreess

  Effectivement, Linux ne cherche pas a detecter les IRQ  au  demarrage,
  mais  seulement  les  ports  serie.  Il  suppose que vous utilisez les
  interruptions par defaut, car leur detection est hasardeuse et peut se
  reveler inexacte.

  Ainsi, meme si j'ai force ttyS2 a l'IRQ 5, je vois toujours :

       Jan 23 22:25:28 misfits vmunix: tty02 at 0x03e8 (irq = 4) is a 16550A

  quand  Linux  se lance. Il faut alors utiliser setserial pour indiquer
  les  IRQ  a  Linux.  Apres  le  demarrage,  vous  pouvez  verifier  le
  parametrage effectif dans le fichier /proc/interrupts.

  1133..99..  rrzz et/ou sz ne fonctionne pas quand j'appelle mon systeme Linux
  avec un modem

  Si  Linux  recherche  le  peripherique /dev/modem quand vous tentez de
  transferer des fichiers, regardez les alias definis dans  /etc/profile
  et   /etc/csh.cshrc.    Ils   peuvent   etre   nombreux   suivant  les
  distributions  (notamment  Slackware)  et  redefinir  les   programmes
  zmodem. Enlevez ces alias, ou corrigez-les.

  1133..1100..  MMoonn eeccrraann iimmpprriimmee ddeess ccaarraacctteerreess bbiizzaarrrreess

  Ce  phenomene  se  produit sur les consoles virtuelles, et parfois sur
  les lignes serie, quand elles recoivent des donnees binaires. Il  faut
  alors taper echo ^v^[c, c'est-a-dire :

       linux% echo <ctrl>v<esc>c

  1133..1111..  ggeettttyy ou uugetty ne fonctionne toujours pas

  getty_ps  fournit  une  option  DEBUG  que l'on peut specifier dans le
  fichier de  configuration  /etc/conf.{uu}getty.ttyS_N.  Editez-le  pour
  ajouter  la  ligne  DEBUG=_N_N_N  ou  _N_N_N  est une combinaison de valeurs
  octales definissant les informations que vous voulez obtenir :

       D_OPT   001            configuration des options
       D_DEF   002            traitement du fichier des valeurs par defaut
       D_UTMP  004            traitement de utmp/wtmp
       D_INIT  010            initialisation de la ligne (INIT)
       D_GTAB  020            traitement du fichier gettytab
       D_RUN   040            autres diagnostics lors de l'execution
       D_RB    100            traitement du mode de rappel (ringback)
       D_LOCK  200            traitement des fichiers verrou pour uugetty
       D_SCH   400            traitement de la programmation horaire (schedule)
       D_ALL   777            tout

  Positionner DEBUG=010 est un bon point de depart.

  Si syslogd tourne, ces informations  apparaitront  dans  les  fichiers
  log.    Dans   le   cas  contraire,  elles  seront  enregistrees  dans
  /tmp/getty:ttyS_N pour getty, dans /tmp/uugetty:ttyS_N pour uugetty,  et
  dans  /var/adm/getty.log.   Consultez  ces fichiers pour determiner ce
  qui  se  passe.  Vous  devrez  tres  probablement   ajuster   certains
  parametres  dans  le  fichier  de configuration, et reconfigurer votre
  modem.

  Vous pouvez egalement essayer mgetty : certaines personnes ont plus de
  chance avec...

  1144..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  +o  les  pages  de  manuel  pour  : agetty(8), getty(1m), gettydefs(5),
     init(1), login(1), mgetty(8), setserial(8)

  +o  la documentation de votre modem

  +o  NET-3 HOWTO : tout sur les reseaux, dont SLIP, CSLIP, et PPP

  +o  PPP HOWTO : aide sur PPP

  +o  Printing HOWTO : pour installer une imprimante serie

  +o  Term HOWTO : tout ce que vous voulez savoir sur le programme term

  +o  UPS HOWTO : pour la connexion d'onduleurs sur un port serie

  +o  UUCP HOWTO : pour des informations sur le parametrage de UUCP

  +o  forums de discussion Usenet :

       comp.os.linux.answers
               FAQ, How-To, README, etc. a propos de Linux.
       comp.os.linux.hardware
               compatibilite materielle avec le systeme d'exploitation Linux.
       comp.os.linux.networking
               reseaux et communications sous Linux.
       comp.os.linux.setup
               installation et administration systeme sous Linux.
       fr.comp.os.linux
               forum de discussion sur Linux en francais

  +o  la liste de diffusion consacree aux ports serie sous Linux.    Pour
     vous     abonnez,     envoyez    un    message    electronique    a
     majordomo@vger.rutgers.edu, avec ``subscribe linux-serial'' dans le
     corps  du  message.   La commande ``help'' dans le corps du message
     vous permet de  recevoir  une  message  d'aide  sur  les  commandes
     supportees.  Ce serveur gere egalement d'autres listes consacrees a
     Linux ; pour les connaitre, envoyez la commande ``lists''.

  +o  un  document  traitant  des  communications  serie  et  des  cartes
     multiports est disponible sur : http://www.cyclades.com.

  +o  FAQ sur les modems :

  +o  programmation serie :
     Advanced   Programming   in   the   UNIX  Environment  <http://heg-
     school.aw.com/cseng/authors/stevens/advanced/advanced.nclk>, par W.
     Richard Stevens (ISBN 0-201-56317-7; Addison-Wesley)
     POSIX  Programmer's  Guide  <http://www.ora.com/catalog/posix/>, by
     Donald Lewine (ISBN 0-937175-73-0; O'Reilly)

  1155..  CCoonnttrriibbuuttiioonnss

  Il ne m'aurait pas ete possible de rediger ce HOWTO tout  seul.   Meme
  si  j'en  ai  ecrit  la  plus grande partie, j'ai du reprendre pas mal
  d'articles existants. Merci  a  tous  ceux  qui  ont  contribue  a  ce
  document,  ou  qui  l'ont  commente.   La  liste  de ces personnes est
  maintenant  trop  longue  pour  figurer  ici  (plus  d'une  centaine).
  J'adresse  plus  particulierement  mes  remerciements  a Ted T'so pour
  toutes ses reponses sur les peripheriques serie, a Kris  Gleason  pour
  la maintenance de getty_ps, et a Gert Doering pour mgetty.

   _N_o_t_e  _d_u  _t_r_a_d_u_c_t_e_u_r  _:  _u_n  _g_r_a_n_d  _m_e_r_c_i _a _O_l_i_v_i_e_r _T_h_a_r_a_n _e_t _F_l_o_r_i_a_n
  _S_a_l_a_m_i_n _p_o_u_r _l_a _r_e_l_e_c_t_u_r_e_, _a_i_n_s_i _q_u_'_a _E_r_i_c _D_u_m_a_s _p_o_u_r _l_a  _g_e_s_t_i_o_n  _d_e_s
  _t_r_a_d_u_c_t_i_o_n_s  _f_r_a_n_c_a_i_s_e_s _e_t _a _S_e_b_a_s_t_i_e_n  _B_l_o_n_d_e_e_l _p_o_u_r _l_a _m_i_s_e _e_n _p_l_a_c_e
  _d_'_u_n _s_y_s_t_e_m_e _c_e_n_t_r_a_l_i_s_e _d_e_s _r_e_l_e_c_t_u_r_e_s_.

  FIN DU LINUX HOWTO POUR LES PORTS SERIE

  Le Linux Serial Programming HOWTO
  par Peter H. Baumann, Peter.Baumann@dlr.de

  Adaptation francaise Etienne BERNARD eb@via.ecp.fr

  v0.3, 14 Juin 1997

  Ce document decrit comment programmer sous Linux la communication avec
  des peripheriques sur port serie.

  11..

  IInnttrroodduuccttiioonn

  Voici  le  Linux  Serial  Programming  HOWTO,  qui  explique   comment
  programmer  sous  Linux la communication avec des peripheriques ou des
  ordinateurs via le port serie. Differentes techniques sont abordees  :
  Entrees/Sorties  canoniques  (envoi  ou  reception  ligne  par ligne),
  asynchrones, ou l'attente de donnees depuis de multiples sources.

  Ce document ne decrit pas comment configurer les ports series, puisque
  c'est decrit par Greg Hankins dans le Serial-HOWTO.

  Je  tiens  a insister sur le fait que je ne suis pas un expert dans ce
  domaine, mais j'ai eu a realiser un projet utilisant la  communication
  par  le  port  serie.  Les  exemples  de code source presentes dans ce
  document sont derives du programme miniterm, disponible dans le  _L_i_n_u_x
  _p_r_o_g_r_a_m_m_e_r_'_s                                                     _g_u_i_d_e
  (ftp://sunsite.unc.edu/pub/Linux/docs/LDP/programmers-
  guide/lpg-0.4.tar.gz      et      les     miroirs,     par     exemple
  ftp://ftp.lip6.fr/pub/linux/docs/LDP/programmers-guide/lpg-0.4.tar.gz)
  dans  le  repertoire  contenant  les  exemples. Je me ferai un plaisir
  d'incorporer  d'eventuels  commentaires  (voyez  la  section  sur  les
  commentaires).

  Tous  les  exemples  ont  ete  testes avec un i386, utilisant un noyau
  Linux de version 2.0.29.

  11..11..

  CCooppyyrriigghhtt

  Le  Linux  Serial-Programming-HOWTO  est  copyright  (c)  1997   Peter
  Baumann.  Les  HOWTO  de  Linux  peuvent etre reproduits et distribues
  integralement ou seulement par partie, sur quelconque support physique
  ou  electronique,  aussi  longtemps  que  ce message de copyright sera
  conserve dans toutes les copies. Une  redistribution  commerciale  est
  autorisee,  et  encouragee;  cependant,  l'auteur  _a_p_p_r_e_c_i_e_r_a_i_t d'etre
  prevenu en cas de distribution de ce type.

  Toutes les traductions ou  travaux  derives  incorporant  un  document
  HOWTO  Linux  doit etre place sous ce copyright. C'est-a-dire que vous
  ne pouvez pas produire de travaux  derives  a  partir  d'un  HOWTO  et
  imposer  des  restrictions  additionnelles  sur  sa  distribution. Des
  exceptions  a  cette  regle  peuvent  etre  accordees  sous  certaines
  conditions    ;  contactez le coordinateur des HOWTO Linux a l'adresse
  donnee ci-dessous.

  En  resume,  nous  desirons  promouvoir  la  distribution   de   cette
  information  par  tous  les moyens possibles. Neanmoins, nous desirons
  conserver le copyright sur les documents HOWTO, et nous _a_i_m_e_r_i_o_n_s etre
  informes de tout projet de redistribution des HOWTO.

  Pour  toute question, veuillez contacter Greg Hankins, le coordinateur
  des HOWTO Linux, a gregh@sunsite.unc.edu par mail.
  11..22..

  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt..

  Les nouvelles version du Serial-Programming-HOWTO seront disponibles a
  ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO/Serial-Programming-HOWTO
  et      les      sites      miroir,      comme       par       exemple
  ftp://ftp.lip6.fr/pub/linux/docs/HOWTO/Serial-Programming-HOWTO.    Il
  existe sous d'autres formats, comme PostScript ou  DVI  dans  le  sous
  repertoire  other-formats.  Le  Serial-Programming-HOWTO est egalement
  disponible  sur   http://sunsite.unc.edu/LDP/HOWTO/Serial-Programming-
  HOWTO.html,  et  sera  poste  dans comp.os.linux.answers tous les mois
  (NdT : la version francaise de ce document est egalement  postee  dans
  fr.comp.os.linux.annonce tous les mois).

  11..33..

  CCoommmmeennttaaiirreess

  Envoyez  moi,  s'il vous plait tout correction, question, commentaire,
  suggestion ou complement. Je desire ameliorer cet HOWTO  !  Dites  moi
  exactement  ce que vous ne comprenez pas, ou ce qui pourrait etre plus
  clair. Vous pouvez me contacter a  Peter.Baumann@dlr.de  par  courrier
  electronique.  Veuillez  inclure  le  numero de version de ce document
  pour tout courrier. Ce document est la version 0.3.

  22..

  DDeemmaarrrraaggee

  22..11..

  DDeebbuuggggaaggee

  Le meilleur moyen de debugguer votre code est  d'installer  une  autre
  machine  sous  Linux et de connecter les deux ordinateurs par un cable
  null-modem. Utilisez miniterm (disponible dans  le  Linux  programmers
  guide     --     ftp://sunsite.unc.edu/pub/Linux/docs/LDP/programmers-
  guide/lpg-0.4.tar.gz  --  dans  le  repertoire  des   exemples)   pour
  transmettre  des  caracteres  a votre machine Linux. Miniterm est tres
  simple a compiler et transmettra toute entree clavier directement  sur
  le   port   serie.  Vous  n'avez  qu'a  adapter  la  commande  #define
  MODEMDEVICE "/dev/ttyS0" a vos besoins. Mettez ttyS0 pour COM1,  ttyS1
  for  COM2,  etc...  Il  est  essentiel,  pour  les tests, que _t_o_u_s les
  caracteres soient transmis bruts (sans traitements) au travers  de  la
  ligne  serie.  Pour  tester votre connexion, demarrez miniterm sur les
  deux ordinateurs et taper au clavier.  Les  caracteres  ecrit  sur  un
  ordinateur devraient apparaitre sur l'autre ordinateur, et vice versa.
  !  !  !  L'entree clavier  sera  egalement  recopiee  sur  l'ecran  de
  l'ordinateur local.

  Pour  fabriquer un cable null-modem, pour devez croiser les lignes TxD
  (_t_r_a_n_s_m_i_t) et RxD (_r_e_c_e_i_v_e). Pour une description  du  cable,  referez
  vous a la section 7 du Serial-HOWTO.

  Il  est  egalement possible de faire cet essai avec uniquement un seul
  ordinateur, si vous disposez de deux ports serie. Vous  pouvez  lancez
  deux  miniterms  sur deux consoles virtuelles. Si vous liberez un port
  serie en deconnectant la souris, n'oubliez pas de rediriger /dev/mouse
  si  ce  fichier  existe.  Si  vous  utilisez  une  carte serie a ports
  multiples, soyez sur de la configurer correctement. La mienne  n'etait
  pas correctement configuree, et tout fonctionnait correctement lorsque
  je testais sur mon ordinateur. Lorsque je l'ai connecte a un autre, le
  port   a  commence  a  perdre  des  caracteres.  L'execution  de  deux
  programmes sur un seul ordinateur n'est pas totalement asynchrone.

  22..22..

  CCoonnffiigguurraattiioonn ddeess ppoorrttss

  Les peripheriques /dev/ttyS* sont destines a connecter les terminaux a
  votre  machine  Linux,  et  sont  configures  pour  cet usage apres le
  demarrage. Vous devez vous en  souvenir  lorsque  vous  programmez  la
  communication  avec un peripherique autre. Par exemple, les ports sont
  configures pour afficher les caracteres envoyes vers lui-meme, ce  qui
  normalement doit etre change pour la transmission de donnees.

  Tous  les  parametres  peuvent  etre  facilement  configure  depuis un
  programme. La configuration est stockee dans  une  structure  de  type
  struct termios, qui est definie dans <asm/termbits.h> :

       #define NCCS 19
       struct termios {
               tcflag_t c_iflag;               /* Modes d'entree */
               tcflag_t c_oflag;               /* Modes de sortie */
               tcflag_t c_cflag;               /* Modes de controle */
               tcflag_t c_lflag;               /* Modes locaux */
               cc_t c_line;                    /* Discipline de ligne */
               cc_t c_cc[NCCS];                /* Caracteres de controle */
       };

  Ce  fichier  inclus  egalement  la definition des constantes. Tous les
  modes d'entree dans  c_iflag  prennent  en  charge  le  traitement  de
  l'entree,  ce  qui  signifie  que  les  caracteres  envoyes  depuis le
  peripherique peuvent etre traites avant d'etre lu par read. De la meme
  facon,  c_oflags se chargent du traitement en sortie. c_cflag contient
  les parametres du port, comme  la  vitesse,  le  nombre  de  bits  par
  caractere,  les  bits  d'arret,  etc... Les modes locaux, stockes dans
  c_lflag determinent si les caracteres sont imprimes,  si  des  signaux
  sont  envoyes a votre programme, etc... Enfin, le tableau c_cc definit
  les caracteres de controle pour la fin de fichier, le caractere  stop,
  etc...  Les  valeurs  par  defaut pour les caracteres de controle sont
  definies dans <asm/termios.h>. Les modes possibles sont  decrits  dans
  la page de manuel de termios(3)

  La  structure  termios contient l'element c_line. Cet element n'est ni
  mentionne dans la page de manuel de termios de Linux, ni dans celle de
  Solaris  2.5.  Quelqu'un  peut-il m'eclairer sur cet attribut ? Est-ce
  qu'il doit reellement etre inclus dans la structure termios ?

  22..33..

  FFaaccoonnss ddee lliirree ssuurr lleess ppeerriipphheerriiqquueess sseerriiee

  Voici trois facons de lire  sur  les  peripheriques  serie.  Le  moyen
  approprie  doit  etre choisi pour chaque application. Lorsque cela est
  possible, ne lisez pas les chaines caractere  par  caractere.  Lorsque
  j'utilisais  ce moyen, je perdais des caracteres, alors qu'un read sur
  la chaine complete ne donnait aucune erreur.

  22..33..11..

  EEnnttrreeee ccaannoonniiqquuee

  C'est le mode de fonctionnement normal pour les terminaux,  mais  peut
  egalement  etre  utilise pour communiquer avec d'autres peripheriques.
  Toutes les entrees sont traitees lignes par lignes,  ce  qui  signifie
  qu'un  read  ne renverra qu'une ligne complete. Une ligne est terminee
  par defaut avec un caractere NL (ACII LF), une fin de fichier,  ou  un
  caractere  de  fin  de  ligne. Un CR (le caractere de fin de ligne par
  defaut de DOS et  Windows)  ne  terminera  pas  une  ligne,  avec  les
  parametres par defaut.

  L'entree  canonique  peut  egalement  prendre  en  charge le caractere
  erase, d'effacement de mot, et de reaffichage,  la  traduction  de  CR
  vers NL, etc...

  22..33..22..

  EEnnttrreeee nnoonn ccaannoonniiqquuee

  L'entree  non  canonique  va  prendre  en  charge  un  nombre  fixe de
  caractere par lecture, et  autorise  l'utilisation  d'un  compteur  de
  temps  pour  les  caracteres.  Ce  mode  doit  etre  utilise  si votre
  application lira toujours un nombre  fixe  de  caracteres,  ou  si  le
  peripherique connecte envoit les caracteres par paquet.

  22..33..33..

  EEnnttrreeee aassyynncchhrroonnee

  Les  deux  modes  ci-dessus  peut  etre  utilise  en mode synchrone ou
  asynchrone. Le mode synchrone est le mode par defaut, pour  lequel  un
  appel a read sera bloquant, jusqu'a ce que la lecture soit satisfaite.
  En mode asynchrone,  un  appel  a  read  retournera  immediatement  et
  lancera un signal au programme appelant en fin de transfert. Ce signal
  peut etre recu par un gestionnaire de signal.

  22..33..44..

  AAtttteennttee dd''eennttrreeee ddeeppuuiiss ddee mmuullttiipplleess ssoouurrcceess

  Cela ne constitue pas un mode d'entree different, mais  peut  s'averer
  etre utile, si vous prenez en charge des peripheriques multiples. Dans
  mon application, je traitais l'entree  depuis  une  socket  TCP/IP  et
  depuis  une  connexion serie sur un autre ordinateur quasiment en meme
  temps. L'exemple de programme donne plus loin attendra des  caracteres
  en  entree  depuis  deux sources. Si des donnees sur l'une des sources
  deviennent  disponibles,  elles  seront  traitees,  et  le   programme
  attendra de nouvelles donnees.

  L'approche  presentee  plus  loin  semble plutot complexe, mais il est
  important que vous vous rappeliez que  Linux  est  un  systeme  multi-
  tache.  L'appel  systeme  select ne charge pas le processeur lorsqu'il
  attend des donnees, alors que le fait de faire une boucle  jusqu'a  ce
  que  des  caracteres  deviennent  disponibles  ralentirait  les autres
  processus.

  33..

  EExxeemmpplleess ddee pprrooggrraammmmeess

  Tous les exemples ont ete extraits de miniterm.c. Le  tampon  d'entree
  est  limite  a  255  caracteres, tout comme l'est la longueur maximale
  d'une ligne en mode canonique (<linux/limits.h> ou <posix1_lim.h>).

  Referez-vous aux commentaires dans le code source  pour  l'explication
  des   differents   modes   d'entree.   J'espere   que   le   code  est
  comprehensible.  L'exemple  sur  l'entree  canonique   est   la   plus
  commentee,  les  autres  exemples sont commentes uniquement lorsqu'ils
  different, afin de signaler les differences.

  Les descriptions ne sont pas  completes,  mais  je  vous  encourage  a
  modifier  les  exemples  pour obtenir la solution la plus interessante
  pour votre application.

  N'oubliez pas de donner les  droits  corrects  aux  ports  serie  (par
  exemple, chmod a+rw /dev/ttyS1) !

  33..11..

  TTrraaiitteemmeenntt ccaannoonniiqquuee

  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <termios.h>
  #include <stdio.h>

  /* les valeurs pour la vitesse, baudrate, sont definies dans <asm/termbits.h>, qui est inclus
  dans <termios.h> */
  #define BAUDRATE B38400
  /* changez cette definition pour utiliser le port correct */
  #define MODEMDEVICE "/dev/ttyS1"
  #define _POSIX_SOURCE 1 /* code source conforme a POSIX */

  #define FALSE 0
  #define TRUE 1

  volatile int STOP=FALSE;

  main()
  {
    int fd,c, res;
    struct termios oldtio,newtio;
    char buf[255];
  /*
    On ouvre le peripherique du modem en lecture/ecriture, et pas comme
    terminal de controle, puisque nous ne voulons pas etre termine si l'on
    recoit un caractere CTRL-C.
  */
   fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY );
   if (fd <0) {perror(MODEMDEVICE); exit(-1); }

   tcgetattr(fd,&oldtio); /* sauvegarde de la configuration courante */
   bzero(newtio, sizeof(newtio)); /* on initialise la structure a zero */

  /*
    BAUDRATE: Affecte la vitesse. vous pouvez egalement utiliser cfsetispeed
              et cfsetospeed.
    CRTSCTS : controle de flux materiel (uniquement utilise si le cable a
              les lignes necessaires. Voir la section 7 du Serial-HOWTO).
    CS8     : 8n1 (8 bits,sans parite, 1 bit d'arret)
    CLOCAL  : connexion locale, pas de controle par le modem
    CREAD   : permet la reception des caracteres
  */
   newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;

  /*
    IGNPAR  : ignore les octets ayant une erreur de parite.
    ICRNL   : transforme CR en NL (sinon un CR de l'autre cote de la ligne
              ne terminera pas l'entree).
    sinon, utiliser l'entree sans traitement (device en mode raw).
  */
   newtio.c_iflag = IGNPAR | ICRNL;

  /*
   Sortie sans traitement (raw).
  */
   newtio.c_oflag = 0;

  /*
    ICANON  : active l'entree en mode canonique
    desactive toute fonctionnalite d'echo, et n'envoit pas de signal au
    programme appelant.
  */
   newtio.c_lflag = ICANON;

  /*
    initialise les caracteres de controle.
    les valeurs par defaut peuvent etre trouvees dans
    /usr/include/termios.h, et sont donnees dans les commentaires.
    Elles sont inutiles ici.
  */
   newtio.c_cc[VINTR]    = 0;     /* Ctrl-c */
   newtio.c_cc[VQUIT]    = 0;     /* Ctrl-\ */
   newtio.c_cc[VERASE]   = 0;     /* del */
   newtio.c_cc[VKILL]    = 0;     /* @ */
   newtio.c_cc[VEOF]     = 4;     /* Ctrl-d */
   newtio.c_cc[VTIME]    = 0;     /* compteur inter-caractere non utilise */
   newtio.c_cc[VMIN]     = 1;     /* read bloquant jusqu'a l'arrivee d'1 caractere */
   newtio.c_cc[VSWTC]    = 0;     /* '\0' */
   newtio.c_cc[VSTART]   = 0;     /* Ctrl-q */
   newtio.c_cc[VSTOP]    = 0;     /* Ctrl-s */
   newtio.c_cc[VSUSP]    = 0;     /* Ctrl-z */
   newtio.c_cc[VEOL]     = 0;     /* '\0' */
   newtio.c_cc[VREPRINT] = 0;     /* Ctrl-r */
   newtio.c_cc[VDISCARD] = 0;     /* Ctrl-u */
   newtio.c_cc[VWERASE]  = 0;     /* Ctrl-w */
   newtio.c_cc[VLNEXT]   = 0;     /* Ctrl-v */
   newtio.c_cc[VEOL2]    = 0;     /* '\0' */

  /*
    a present, on vide la ligne du modem, et on active la configuration
    pour le port
  */
   tcflush(fd, TCIFLUSH);
   tcsetattr(fd,TCSANOW,&newtio);

  /*
    la configuration du terminal est faite, a present on traite
    les entrees
    Dans cet exemple, la reception d'un 'z' en debut de ligne mettra
    fin au programme.
  */
   while (STOP==FALSE) {     /* boucle jusqu'a condition de terminaison */
   /* read bloque l'execution du programme jusqu'a ce qu'un caractere de
      fin de ligne soit lu, meme si plus de 255 caracteres sont saisis.
      Si le nombre de caracteres lus est inferieur au nombre de caracteres
      disponibles, des read suivant retourneront les caracteres restants.
      res sera positionne au nombre de caracteres effectivement lus */
      res = read(fd,buf,255);
      buf[res]=0;       /* on termine la ligne, pour pouvoir l'afficher */
      printf(":%s:%d\n", buf, res);
      if (buf[0]=='z') STOP=TRUE;
   }
   /* restaure les anciens parametres du port */
   tcsetattr(fd,TCSANOW,&oldtio);
  }

  33..22..

  EEnnttrreeee nnoonn ccaannoonniiqquuee

  Dans  le  mode non canonique, les caracteres lus ne sont pas assembles
  ligne par ligne, et ils ne subissent pas de traitement  (erase,  kill,
  delete,  etc...).  Deux  parametres  controlent  ce mode : c_cc[VTIME]
  positionne le _t_i_m_e_r de caracteres, et  c_cc[VMIN]  indique  le  nombre
  minimum de caracteres a recevoir avant qu'une lecture soit satisfaite.

  Si MIN > 0 et TIME = 0, MIN indique le nombre de caracteres a recevoir
  avant  que  la  lecture  soit  satisfaite. TIME est egal a zero, et le
  _t_i_m_e_r n'est pas utilise.

  Si MIN = 0 et  TIME > 0, TIME est utilise comme une valeur de _t_i_m_e_o_u_t.
  Une  lecture  est  satisfaite  lorsqu'un caractere est recu, ou que la
  duree TIME est depassee (t = TIME * 0.1s). Si TIME est depasse,  aucun
  caractere n'est retourne.

  Si  MIN  >  0  et  TIME > 0, TIME est employe comme _t_i_m_e_r entre chaque
  caractere. La lecture sera satisfaite si MIN caracteres sont recus, ou
  que  le  _t_i_m_e_r  entre  deux  caracteres  depasse  TIME.  Le  _t_i_m_e_r est
  reinitialise a chaque fois qu'un caractere est recu, et  n'est  active
  qu'apres la reception du premier caractere.

  Si  MIN  =  0  et  TIME  =  0,  le  retour  est immediat. Le nombre de
  caracteres disponibles, ou bien le nombre de  caracteres  demande  est
  retourne.  Selon Antonino (voir le paragraphe sur les participations),
  vous pouvez utiliser un fcntl(fd, F_SETFL, FNDELAY); avant la  lecture
  pour obtenir le meme resultat.

  Vous  pouvez  tester  tous  les  modes  decrit  ci-dessus en modifiant
  newtio.c_cc[VTIME] et newtio.c_cc[VMIN].

  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <termios.h>
  #include <stdio.h>

  #define BAUDRATE B38400
  #define MODEMDEVICE "/dev/ttyS1"
  #define _POSIX_SOURCE 1 /* code source conforme a POSIX */
  #define FALSE 0
  #define TRUE 1

  volatile int STOP=FALSE;

  main()
  {
    int fd,c, res;
    struct termios oldtio,newtio;
    char buf[255];

   fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY );
   if (fd <0) {perror(MODEMDEVICE); exit(-1); }

   tcgetattr(fd,&oldtio); /* sauvegarde de la configuration courante */

   bzero(newtio, sizeof(newtio));
   newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
   newtio.c_iflag = IGNPAR;
   newtio.c_oflag = 0;

   /* positionne le mode de lecture (non canonique, sans echo, ...) */
   newtio.c_lflag = 0;

   newtio.c_cc[VTIME]    = 0;   /* timer inter-caracteres non utilise */
   newtio.c_cc[VMIN]     = 5;   /* read bloquant jusqu'a ce que 5 */
                                /* caracteres soient lus */
   tcflush(fd, TCIFLUSH);
   tcsetattr(fd,TCSANOW,&newtio);

   while (STOP==FALSE) {       /* boucle de lecture */
     res = read(fd,buf,255);   /* retourne apres lecture 5 caracteres */
     buf[res]=0;               /* pour pouvoir les imprimer... */
     printf(":%s:%d\n", buf, res);
     if (buf[0]=='z') STOP=TRUE;
   }
   tcsetattr(fd,TCSANOW,&oldtio);
  }

  33..33..

  LLeeccttuurree aassyynncchhrroonnee

  #include <termios.h>
  #include <stdio.h>
  #include <unistd.h>
  #include <fcntl.h>
  #include <sys/signal.h>
  #include <sys/types.h>

  #define BAUDRATE B38400
  #define MODEMDEVICE "/dev/ttyS1"
  #define _POSIX_SOURCE 1 /* code source conforme a POSIX */
  #define FALSE 0
  #define TRUE 1

  volatile int STOP=FALSE;

  void signal_handler_IO (int status);   /* le gestionnaire de signal */
  int wait_flag=TRUE;              /* TRUE tant que recu aucun signal */

  main()
  {
    int fd,c, res;
    struct termios oldtio,newtio;
    struct sigaction saio;        /* definition de l'action du signal */
    char buf[255];

    /* ouvre le port en mon non-bloquant (read retourne immediatement) */
    fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK);
    if (fd <0) {perror(MODEMDEVICE); exit(-1); }

    /* installe le gestionnaire de signal avant de passer le port en
       mode asynchrone */
    saio.sa_handler = signal_handler_IO;
    saio.sa_mask = 0;
    saio.sa_flags = 0;
    saio.sa_restorer = NULL;
    sigaction(SIGIO,&saio,NULL);

    /* permet au processus de recevoir un SIGIO */
    fcntl(fd, F_SETOWN, getpid());
    /* rend le descripteur de fichier asynchrone (la page de manuel
       indique que seuls O_APPEND et O_NONBLOCK fonctionnent avec
       F_SETFL...) */
    fcntl(fd, F_SETFL, FASYNC);

    tcgetattr(fd,&oldtio); /* sauvegarde de la configuration courante */
    /* positionne les nouvelles valeurs pour lecture canonique */
    newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
    newtio.c_iflag = IGNPAR | ICRNL;
    newtio.c_oflag = 0;
    newtio.c_lflag = ICANON;
    newtio.c_cc[VMIN]=1;
    newtio.c_cc[VTIME]=0;
    tcflush(fd, TCIFLUSH);
    tcsetattr(fd,TCSANOW,&newtio);

    /* on boucle en attente de lecture. generalement, on realise
       des traitements a l'interieur de la boucle */
    while (STOP==FALSE) {
      printf(".\n");usleep(100000);
      /* wait_flag = FALSE apres reception de SIGIO. Des donnees sont
         disponibles et peuvent etre lues */
      if (wait_flag==FALSE) {
        res = read(fd,buf,255);
        buf[res]=0;
        printf(":%s:%d\n", buf, res);
        if (res==1) STOP=TRUE; /* on arrete la boucle si on lit une
                                  ligne seule */
        wait_flag = TRUE;      /* on attend de nouvelles donnees */
      }
    }
    /* restaure les anciens parametres du port */
    tcsetattr(fd,TCSANOW,&oldtio);
  }

  /***************************************************************************
  * gestionnaire de signal. Positionne wait_flag a FALSE, pour indiquer a    *
  * la boucle ci-dessus que des caracteres ont ete recus.                    *
  ***************************************************************************/

  void signal_handler_IO (int status)
  {
    printf("reception du signal SIGIO.\n);
    wait_flag = FALSE;
  }

  33..44..

  MMuullttiipplleexxaaggee eenn lleeccttuurree

  Cette section est reduite au  minimum,  et  n'est  la  que  pour  vous
  guider.  Le  code  source d'exemple presente est donc reduit au strict
  minimum. Il ne fonctionnera pas seulement avec des ports  serie,  mais
  avec n'importe quel ensemble de descripteurs de fichiers.

  L'appel  systeme select et les macros qui lui sont attachees utilisent
  un fd_set. C'est un tableau de bits, qui dispose d'un bit pour  chaque
  descripteur de fichier valide. select accepte un fd_set ayant les bits
  positionnes pour les descripteurs  de  fichiers  qui  conviennent,  et
  retourne  un  fd_set, dans lequel les bits des descripteurs de fichier
  ou une lecture, une ecriture ou une exception sont positionnes. Toutes
  les  manipulations  de  fd_set  sont  faites avec les macros fournies.
  Reportez vous egalement a la page de manuel de select(2).

  #include <sys/time.h>
  #include <sys/types.h>
  #include <unistd.h>

  main()
  {
     int    fd1, fd2;  /* entrees 1 et 2 */
     fd_set readfs;    /* ensemble de descripteurs */
     int    maxfd;     /* nombre max des descripteurs utilises */
     int    loop=1;    /* boucle tant que TRUE */

     /* open_input_source ouvre un peripherique, configure le port
        correctement, et retourne un descripteur de fichier. */
     fd1 = open_input_source("/dev/ttyS1");   /* COM2 */
     if (fd1<0) exit(0);
     fd2 = open_input_source("/dev/ttyS2");   /* COM3 */
     if (fd2<0) exit(0);
     maxfd = MAX (fd1, fd2)+1; /* numero maximum du bit a tester */

     /* boucle d'entree */
     while (loop) {
       FD_SET(fd1, &readfs);  /* test pour la source 1 */
       FD_SET(fd2, &readfs);  /* test pour la source 2 */
       /* on bloque jusqu'a ce que des caracteres soient
          disponibles en lecture */
       select(maxfd, &readfs, NULL, NULL, NULL);
       if (FD_ISSET(fd1))         /* caracteres sur 1 */
         handle_input_from_source1();
       if (FD_ISSET(fd2))         /* caracteres sur 2 */
         handle_input_from_source2();
     }

  }

  L'exemple ci-dessus bloque indefiniment, jusqu'a ce que des caracteres
  venant  d'une des sources soient disponibles. Si vous avez besoin d'un
  _t_i_m_e_o_u_t, remplacez juste l'appel a select par :

       int res;
       struct timeval Timeout;

       /* fixe la valeur du timeout */
       Timeout.tv_usec = 0;  /* millisecondes */
       Timeout.tv_sec  = 1;  /* secondes */
       res = select(maxfd, &readfs, NULL, NULL, &Timeout);
       if (res==0)
       /* nombre de descripteurs de fichiers avec caracteres
          disponibles = 0, il y a eu timeout */

  Cet exemple verra l'expiration du delai de _t_i_m_e_o_u_t apres une  seconde.
  S'il  y a _t_i_m_e_o_u_t, select retournera 0, mais faites attention, Timeout
  est decremente du temps reellement attendu par select. Si la valeur de
  _t_i_m_e_o_u_t est 0, select retournera immediatement.

  44..

  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  +o  Le  Linux  Serial-HOWTO  decrit  comment  mettre en place les ports
     serie et contient des informations sur le materiel.

  +o  Le Serial Programming Guide for POSIX Compliant  Operating  Systems
     <http://www.easysw.com/~mike/serial>, par Michael Sweet.

  +o  La  page  de  manuel  de  termios(3)  decrit  toutes les constantes
     utilisees pour la structure termios.

  55..

  CCoonnttrriibbuuttiioonnss

  Comme je l'ai dit dans l'introduction, je ne suis pas un  expert  dans
  le  domaine,  mais  j'ai  rencontre  des problemes, et j'ai trouve les
  solutions avec l'aide d'autres personnes. Je tiens  a  remercier  pour
  leur  aide  M.  Strudthoff  du European Transonic WindTunnel, Cologne,
  Michael Carter (mcarter@rocke.electro.swri.edu)  et  Peter  Waltenberg
  (p.waltenberg@karaka.chch.cri.nz).

  Antonino  Ianella (antonino@usa.net a ecrit le Serial-Port-Programming
  Mini HOWTO, au meme moment ou je preparais ce document.  Greg  Hankins
  m'a demande d'inclure le Mini-HOWTO d'Antonino dans ce document.

  La  structure  de ce document et le formattage SGML ont ete derives du
  Serial-HOWTO de Greg Hankins.

  Linux Shadow Password HOWTO, Version francaise
  Michael H. Jackson, mhjack@tscnet.com
   _T_r_a_d_u_c_t_i_o_n  _f_r_a_n_c_a_i_s_e  _:  _I_g_o_r _G_e_n_i_b_e_l _(_I_g_o_r_._G_e_n_i_b_e_l_@_e_m_i_._u_-
  _b_o_r_d_e_a_u_x_._f_r_) .
  v1.3, 3 Avril 1996

  Ce document decrit comment obtenir, installer et configurer l'ensemble
  _S_h_a_d_o_w  _P_a_s_s_w_o_r_d sous Linux. Il prend aussi en compte l'adaptation des
  autres logiciels et demons reseau accedant habituellement aux mots  de
  passe  des  utilisateurs.   Bien qu'ils ne fassent pas parti du paque-
  tage, ces programmes ne fonctionnerons  plus  correctement  apres  son
  installation.   Ce  document  contient en plus un exemple de code pour
  mettre a jour vos applications pour qu'elles supportent le systeme  de
  mots  de passe caches. Des reponses a des questions frequemment posees
  sont fournies en fin de document.

  11..  IInnttrroodduuccttiioonn

  Ceci est le Shadow password  HOWTO  pour  linux.  Ce  document  decrit
  comment  configurer  votre  systeme linux pour utiliser le systeme des
  mots de  passe  caches.  Quelques  exemples  d'utilisation  concernant
  certaines  caracteristiques  de  la _s_u_i_t_e _S_h_a_d_o_w (Note: ce terme n'est
  volontairement pas traduit afin de ne pas alourdir la comprehension du
  document) sont aussi inclus.

  Lorsque  vous  installerez  le  paquetage  des mots de passe caches et
  lorsque vous vous servirez des  utilitaires,  vous  devrez  etre  loge
  root.  Lorsque  vous  installerez  le paquetage, vous devrez effectuer
  certains changements sur des utlitaires systemes,  il  est  donc  tres
  fortement  recommende  de faire des copies de sauvegarde de programmes
  indiques. Je vous recommande aussi de lire et de comprendre toutes les
  instructions avant de commencer.

  11..11..  NNoottee dduu ttrraadduucctteeuurr

  Tout  au  long  du  document vous constaterez tres certainement que je
  n'ai pas traduit le terme "Shadow Password". La raison est simple:  le
  traduction  de  ce  terme  n'est  pas elegante. Je pense qu'une simple
  explication (voir l'introduction)  de  celui-ci  vaut  beaucoup  mieux
  qu'une "francisation" douteuse.

  11..22..  CChhaannggeemmeennttss ppaarr rraappppoorrtt aauuxx vveerrssiioonnss pprreecceeddeenntteess

  Ajouts:

  +o  Ajout  de la sous-section Pourquoi vous ne devriez pas installer le
     systeme Shadow Password

  +o  Ajout de la sous-section Mise a jour du programme xdm

  +o  Ajout de la section Comment faire que les  caracteristiques  de  la
     suite Shadow fonctionnent

  +o  Ajout  de  la  section contenant les questions les plus frequemment
     posees

     Corrections/Mise a jour:

  +o  Correction des references html sur Sunsite

  +o  Correction dans la section sur wu-ftp pour ajouter -lshadow dans le
     Makefile

  +o  Correction de quelques fautes de frappes et de langage

  +o  Chagement dans la section sur wu-ftp pour supporter le format ELF

  +o  Mise  a  jour  pour mettre en evidence les problemes de securite de
     certains programmes de login

  +o  Mise a jour pour  recommander  la  Suite  Linux  Shadow  par  Marek
     Michalkiewicz

  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt::

  La  derniere version de ce document pourra toujours etre recuperee via
  FTP anonyme sur:

  +o  Version Originale: ssuunnssiittee..uunncc..eedduu

     /pub/Linux/docs/HOWTO/SHADOW-HOWTO

  ou:

  /pub/Linux/docs/HOWTO/other-formats/SHADOW-HOWTO{-html.tar,ps,dvi}.gz

  +o  Version Francaise: ffttpp..lliipp66..ffrr

     /pub/linux/french/docs/HOWTO/Shadow-Password-HOWTO*

  Ou bien par le World Wide Web: Linux Documentation Project Web  Server
  <http://sunsite.unc.edu/mdw/linux.html>,   a   la  page:  SHADOW-HOWTO
  <http://sunsite.unc.edu/linux/HOWTO/Shadow-Password-HOWTO.html>  sinon
  directement  par moi, <mhjack@tscnet.com>. Il sera aussi poste dans le
  newsgroup: comp.os.linux.answers

  Ce document est maintenant stocke en portant le nom Shadow-AAJJMM.

  11..44..  CCoommmmeennttaaiirreess oouu ssuuggggeessttiioonnss..

  Merci de m'envoyer  tout  commentaire,  mise  a  jour  ou  suggestion:
  Michael  H.  Jackson  <mhjack@tscnet.com>.   Plus  vite  je recois vos
  commentaires, plus vite je mets a jour ce document. Si vous  avez  des
  problemes, merci de m'ecrire directement, je suis tres rarement a jour
  avec les newsgroups.

  22..  PPoouurrqquuooii uuttiilliisseerr llee ssyysstteemmee ddee mmoottss ddee ppaassssee SShhaaddooww??

  La plupart des distributions Linux actuelles  ne  contiennent  pas  le
  support  des mots de passe shadow (La Slackware 2.3,  Slackware 3.0 et
  d'autres distributions assez populaires...). Une des raisons  est  que
  le  copyright  concernant  la  suite  Shadow n'etait pas clair sur les
  droits de distribution. LLiinnuuxx utilise la licence  GNU  (quelques  fois
  referencee  sous  le  nom  de  _C_o_p_y_l_e_f_t)  qui permet a quiconque de le
  stocker sur n'importe quel support (comme un CD-ROM  par  exemple)  et
  est responsable des droits pour cela.

  Le   mainteneur   actuel  de  la  _S_u_i_t_e  _S_h_a_d_o_w,  Marek  Michalkiewicz
  <marekm@il7linuxb.ists.pwr.wroc.pl> a recu  les  sources  de  l'auteur
  originel  sour  un  copyright  style BSD permettant la redistribution.
  Maintenant que le probleme de  la  distribution  est  resolu,  il  est
  probable  que  les  prochaines  distributions  contiendront les shadow
  password par defaut. En attendant vous devrez l'installer vous-meme.

  Si vous avez installe votre distribution depuis un CD-ROM, vous pouvez
  trouver que, dans la mesure ou la distribution n'a pas la _s_u_i_t_e _s_h_a_d_o_w
  d'installee, quelques fichiers dont vous avez besoin pour installer la
  _s_u_i_t_e _s_h_a_d_o_w peuvent se situer sur le CD-ROM.

  _C_e_p_e_n_d_a_n_t_,  _l_a  _s_u_i_t_e  _s_h_a_d_o_w  _3_._3_._1_,  _3_._3_._1_-_2  _e_t _s_h_a_d_o_w_-_m_k _p_o_s_s_e_d_e_n_t
  _t_o_u_t_e_s _u_n _p_r_o_b_l_e_m_e _d_e _s_e_c_u_r_i_t_e _a_v_e_c  _l_e_u_r  _p_r_o_g_r_a_m_m_e  _d_e  _l_o_g_i_n  _a_i_n_s_i
  _q_u_'_a_v_e_c  _d_'_a_u_t_r_e_s  _p_r_o_g_r_a_m_m_e_s  _p_o_s_s_e_d_a_n_t  _l_e  _d_r_o_i_t  setuid  root.  En
  consequence, elle ne doivent pas etre utilises plus longtemps.

  Tous les fichiers necessaires peuvent etre recuperes via  ftp  anonyme
  ou via le World Wide Web.

  Sur un systeme linux sans l'ensemble Shadow installe, les informations
  sur l'utilisateur, et en particulier le mot  de  passe  sont  stockees
  dans  le  fichier  /etc/passwd. Le mot de passe est enregistre dans un
  format _e_n_c_r_y_p_t_e. Si vous demandez a un expert en cryptographie, il (ou
  elle)  vous  repondra  que  le  mot  de  passe n'est pas _e_n_c_r_y_p_t_e mais
  _e_n_c_o_d_e. En fait, lors de l'utilisation de crypt(3), le  mot  de  passe
  est  considere  comme  la  cle  pour encoder un texte de valeur nulle.
  C'est la raison pour laquelle a partir de maintenant, j'utiliserai  le
  terme _e_n_c_o_d_e.

  L'algorithme  utilise  pour  encoder le mot de passe fonctionne a sens
  unique, c'est-a-dire qu'il est tres difficile a partir du mot de passe
  encode  de  retrouver l'original. Vous trouverez plus d'informations a
  propos de l'algorithme utilise dans  la  section  ``''  les  pages  de
  manuel de crypt(3).

  Lorsqu'un  utilisateur definit un mot de passe, il est encode avec une
  valeur aleatoire appelee _s_e_l (Note : _s_a_l_t en  Anglais).   C'est-a-dire
  qu'un  meme  mot  de  passe  pourrait  etre  enregistre de 4096 facons
  differentes. La valeur du _s_e_l est alors enregistree  avec  le  mot  de
  passe desormais encode.

  Lorsqu'un  utilisateur  se connecte et saisit son mot de passe, le _s_e_l
  est tout d'abord retrouve a partir du mot de passe encode.  Alors,  le
  mot de passe entre est encode avec le _s_e_l precedemment retrouve.

  Il est, avec des moyens informatiques, difficile (mais pas impossible)
  de prendre un mot de passe _e_n_c_o_d_e aleatoirement et de retrouver le mot
  de  passe  original.  Quoi  qu'il  en  soit,  sur  un systeme ayant de
  nombreux utilisateurs, il est probable que  certains  mots  de  passes
  soient  evidents:  un  simple  mot, un nom, ou une combinaison de mots
  simples.

  Mais le pirate de systeme sait tout cela, et va simplement encoder  un
  dictionnaire   de   mots   de  passe  usuels  en  utilisant  les  4096
  possibilites de _s_e_l. Il va alors comparer les mots  de  passe  encodes
  dans  le  fichier  /etc/passwd  par sa propre base de donnee. Quand il
  aura trouve une equivalence, il aura le  mot  de  passe  d'un  compte.
  Cela  s'appelle une _a_t_t_a_q_u_e _a_u _d_i_c_t_i_o_n_n_a_i_r_e, et c'est une des methodes
  les plus courantes pour acceder a un systeme sans autorisation.

  En y reflechissant, a un seul mot de passe de 8 caracteres  correspond
  4096  mots  de  passes  encodes de 13 caracteres (c'est a dire 4096x13
  octets).  Donc un dictionnaire de 400 000 mots simples, noms, mots  de
  passes,  ou  simple variations, tiendrait facilement sur un disque dur
  de 4Go. Le pirate a juste besoin de les trier et de les comparer.

  Meme sans  avoir  beaucoup  d'espace  disque,  des  utilitaires  comme
  crack(1)  peuvent  en  general  casser pas mal de mots de passe sur un
  systeme contenant suffisamment d'utilisateurs. (En considerant que les
  utilisateurs  du  systeme  sont  autorises  a  lire leur propre mot de
  passe).

  Le  fichier  /etc/passwd  contient  aussi   des   informations   comme
  l'identificateur  de l'utilisateur (UID) et l'identificateur de groupe
  (GID) qui sont utilises par de nombreux programmes.  C'est  pour  cela
  que  le  fichier  passwd  _d_o_i_t etre lisible par tout le monde. Si vous
  changiez les permissions  de  /etc/passwd  de  telle  sorte  que  plus
  personne  ne  puisse  le  lire,  la  premiere  chose que vous pourriez
  constater, c'est que la commande ls -l affiche desormais le user ID au
  lieu du nom !

  Le  kit  Shadow  resout  ce  probleme  en  deplacant les mots de passe
  encodes vers un autre fichier (en general /etc/shadow). Il n'y  a  que
  le  root qui a les permissions de lecture et d'ecriture sur le fichier
  _s_h_a_d_o_w.  Quelques programmes (comme xlock) necessitent que  le  groupe
  _s_h_a_d_o_w  puisse  lire  et  ecrire  dans  le fichier /etc/shadow. Il est
  preferable que les programmes qui ont juste besoin de lire et verifier
  le mot de passe soient lances SGID _s_h_a_d_o_w plutot que SGID root.

  En  deplacant  les  mots  de  passe  vers le fichier /etc/shadow, nous
  ecartons effectivement au pirate la possibilite d'avoir acces aux mots
  de  passe  encodes  avec lesquels ils auraient pu faire une _a_t_t_a_q_u_e _a_u
  _d_i_c_t_i_o_n_n_a_i_r_e.

  De  plus,  le   _k_i_t   _s_h_a_d_o_w   propose   de   nouvelles   possibilites
  interessantes:

  +o  Un  fichier  de  configuration pour configurer les options de login
     (/etc/login.defs),

  +o  Des utilitaires pour  ajouter,  modifier  et  effacer  des  comptes
     utilisateurs,

  +o  Gestion de la duree des mots de passe,

  +o  Gestion de la duree d'un compte,

  +o  Groupes shadow (optionnels),

  +o  Mots de passe de double longueur (16 caracteres),

  +o  Meilleur   controle   sur   la  selection  du  mot  de  passe  d'un
     utilisateur,

  +o  Mots de passe Dial-up,

  +o  Programmes d'authentification secondaire.

  Installer l'_e_n_s_e_m_b_l_e _s_h_a_d_o_w, c'est contribuer a la securite  de  votre
  systeme,  mais il y a bien d'autre choses a faire pour securiser votre
  systeme. Il y aura probablement une serie de  HOWTO  discutant  de  la
  securite et des methodes de securisation.

  Pour  le moment, pour avoir des informations sur la securite et linux,
  incluant les vulnerabilites connues du systeme, allez voir  la:  Linux
  Security home page. <http://bach.cis.temple.edu/linux/linux-security/>

  22..11..  PPaasssswwoorrdd PPoouurrqquuooii  nnee  ddeevvrriieezz--vvoouuss  ppaass  iinnssttaalllleerr  llee  ssyysstteemmee
  SShhaaddooww

  Il y a quelques circonstances  et  quelques  configurations  qui  font
  qu'installer la _S_u_i_t_e _S_h_a_d_o_w n'est pas une bonne idee:

  +o  La machine ne possede pas de comptes utilisateurs,

  +o  Votre  machine  fonctionne  sur  un  reseau  local  et  utilise NIS
     (Network Information Service) pour recuperer ou  fournir  des  noms
     d'utilisateurs  et  des  mots  de  passe a d'autres machines sur le
     reseau (Cela peut actuellement  etre  fait  et  n'ameliore  pas  la
     securite pour autant),

  +o  Votre  machine  est  utilisee par des serveurs de terminaux afin de
     verifier des utilisateurs via NFS (Network  File  Sytem),  NIS,  ou
     quelqu'autre methode,

  +o  Votre   machine   utilise   d'autres  logiciels  pour  valider  les
     utilisateurs, et il n'y a pas de version disponible, et vous n'avez
     pas les sources.

  22..22..  FFoorrmmaatt dduu ffiicchhiieerr //eettcc//ppaasssswwdd

  Sur  un  systeme  ne possedant pas la suite Shadow, voici le format du
  fichier /etc/passwd

       username:passwd:UID:GID:full_name:directory:shell

  En detail:

     uusseerrnnaammee
        Le nom de l'utilisateur (login)

     ppaasssswwdd
        Le mot de passe encode

     UUIIDD
        Identificatuer de l'utilisateur: user ID

     GGIIDD
        Identificatuer du groupe: group ID

     ffuullll__nnaammee
        Le nom complet de l'utilisateur (Prenom  Nom)  -  Ce  champ  est
        appele  le champ GECOS (General Electric Comprehensive Operating
        System) et peut eventuellement contenir d'autres informations

     ddiirreeccttoorryy
        Repertoire personnel de l'utilisateur

     sshheellll
        Shell par defaut de l'utilisateur

  Par exemple:

       username:Npge08pfz4wuk:503:100:Full Name:/home/username:/bin/sh

  Np est le _s_e_l et ge08pfz4wuk est le mot de passe _e_n_c_o_d_e. Pour le  meme
  mot  de  passe,  son  equivalent encode aurait tout aussi bien pu etre
  kbeMVnZM0oL7I. Il y a 4096 possibilites d'encodage pour le meme mot de
  passe. (Le mot de passe de cet exemple est

  Une  fois  l'ensemble  shadow installe, voila a quoi ressemblera votre
  fichier /etc/passwd:

       username:x:503:100:Full Name:/home/username:/bin/sh

  Un x est venu remplacer le mot de passe encode. Mis a part ca, le for-
  mat  du fichier /etc/passwd reste en fait inchange. Ceci permet a tous
  les programmes qui lisent le fichier  /etc/passwd  sans  avoir  besoin
  d'acceder aux mots de passe de fonctionner correctement.

  Les mots de passes encodes sont desormais dans le fichier /etc/shadow.

  22..33..  FFoorrmmaatt dduu ffiicchhiieerr //eettcc//sshhaaddooww

  Le fichier /etc/shadow contient les informations suivantes:

       username:passwd:last:may:must:warn:expire:disable:reserved

  En detail:

     uusseerrnnaammee
        Le Nom de l'Utilisateur

     ppaasssswwdd
        Le mot de passe encode

     llaasstt
        Date de la derniere modification (en nombre de jours  depuis  le
        1er janvier 1970).

     mmaayy
        Nombre de jours avant que le mot de passe puisse etre modifie

     mmuusstt
        Nombre de jours avant que le mot de passe doive etre modifie

     wwaarrnn
        Nombre  de  jours  durant  lesquels l'utilisateur est prevenu de
        l'expiration de son mot de passe.

     eexxppiirree
        Nombre de jours  entre  l'expiration  du  mot  de  passe  et  la
        fermeture du compte.

     ddiissaabbllee
        Date de la fermeture du compte (en nombre de jours depuis le 1er
        janvier 1970).

     rreesseerrvveedd
        Champ reserve

  Donc, l'exemple precedent devrait etre:

       username:Npge08pfz4wuk:9479:0:10000::::

  22..44..  AAppeerrccuu ddee llaa ffoonnccttiioonn ccrryypptt((33))

  extrait de la page de manuel de crypt(3)

  "_c_r_y_p_t est la fonction de cryptage du mot de passe. Elle est basee sur
  l'algorithme   du   DES   (_D_a_t_a  _E_n_c_r_y_p_t_i_o_n  _S_t_a_n_d_a_r_d)  avec  quelques
  modifications pour eviter les recherches materielles de la cle.

  La cle est le mot de passe de l'utilisateur

  Le _s_e_l est compose de deux caracteres choisis  dans  l'ensemble  a-zA-
  Z0-9./.   cette  chaine  de  caractere  est  utilisee  pour  perturber
  l'algorithme de 4096 differentes facons.

  En prenant les 7 derniers bits de chaque caractere du mot de passe, on
  obtient  une  cle  de 56 bits. Cette cle est utilisee pour crypter une
  chaine de caractere constante (generalement constituee  de  zero).  La
  valeur  retournee  pointe  sur le mot de passe crypte: une serie de 13
  caracteres   ASCII   imprimables   (les   deux   premiers   caracteres
  correspondent  au  sel).   La  valeur  retournee pointe sur une donnee
  statique dont le contenu est modifie a chaque appel.

  AAtttteennttiioonn:: Une cle de 56 bits correspond a: 2^56 donc  7.3e16  valeurs
  possibles.  Les recherches exhaustives ssoonntt ppoossssiibblleess en utilisant des
  ordinateurs a architecture massivement parallele. Des logiciels  comme
  crack(1) travaillent avec des cles qui sont generalement utilisees par
  les humains.  C'est-a-dire que la selection de mots  de  passe  testes
  sont des mots simples, mots de passe frequemment utilises et des noms.
  L'utilisation d'un programme passwd(1) qui recherche des mots de passe
  trop simple est recommande.

  L'algorithme  DES  lui-meme  est tres limite, ce qui fait qu'envisager
  l'utilisation de crypt(3) pour autre chose que  de  l'authentification
  de  mots  de  passe  n'est  pas  une  bonne  idee.   Si vous envisagez
  d'utiliser crypt(3) pour un projet de cryptographie, ne le faites pas,
  procurez-vous  plutot  un  bon livre sur le cryptage de donnees et une
  des nombreuses bibliotheques DES."

  Si vous recherchez un bon livre sur le cryptage de  donnees,  je  vous
  recommande:

          "Applied Cryptography: Protocols, Algorithms, and Source Code in C"
          par Bruce Schneier <schneir@chinet.com>
          ISBN: 0-471-59756-2

  33..  SSee pprrooccuurreerr llee ppaaqquueettaaggee SShhaaddooww..

  33..11..  HHiissttoorriiqquuee dduu ppaaqquueettaaggee SShhaaddooww ppoouurr LLiinnuuxx??

  _N_'_U_T_I_L_I_S_E_Z   _P_A_S  _L_E_S  _P_A_Q_U_E_T_A_G_E_S  _D_E_C_R_I_T_S  _D_A_N_S  _C_E_T_T_E  _S_E_C_T_I_O_N_,  _I_L_S
  _C_O_N_T_I_E_N_N_E_N_T _D_E_S _P_R_O_B_L_E_M_E_S _D_E _S_E_C_U_R_I_T_E

  Le paquetage Shadow original a ete ecrit par John F. Haugh II.

  De nombreuses versions peuvent etre utilisees sur un systeme Linux:

  +o  shadow-3.3.1 est l'original

  +o  shadow-3.3.1-2 est le patch specifique a Linux fait par Florian  La
     Roche (flla@stud.uni-sb.de) et contient quelques ameliorations.

  +o  shadow-mk est le paquetage specifique a Linux.

  Le paquetage shadow-mk est en fait constitue du paquetage shadow-3.3.1
  distribue par John F. Haugh II  patche  avec  shadow-3.3.1-2  avec  en
  plus:

  +o  des    corrections   par  Mohan  Kokal  <magnus@texas.net>  rendant
     l'installation bien plus evidente,

  +o  un patch par Joseph R.M. Zbiciak pour login1.c  (login.secure)  qui
     elimine  les  trous  de  securite  -f, -h de /bin/login et quelques
     autres patches divers.

  Le paquetage shadow-mk etait precedemment  recommande,  mais  il  doit
  etre remplace a cause d'un trou de securite du programme login.

  Il  y  a  des  _t_r_o_u_s  _d_e  _s_e_c_u_r_i_t_e dans les versions 3.3.1, 3.3.1-2 et
  shadow-mk qui sont dus au programme login. Le bogue login implique  de
  ne  pas  verifier  la  longueur  du  nom  de  login.  Cela entraine un
  surpassement de la zone tampon qui provoque un crash ou  pire  encore.
  Il  est  dit  que  ce surpassement de zone tampon pourrait permettre a
  quiconque ayant un compte sur le systeme d'utiliser ce bogue ainsi que
  des  bibliotheques partagees pour gagner un acces root. Je ne pourrais
  pas vous dire exactement comment cela est possible  mais  de  nombreux
  systemes  Linux  sont  affectes.   Mais  les  systemes  possedants ces
  _p_a_q_u_e_t_a_g_e_s _S_h_a_d_o_w, ainsi que la plupart des distributions pre-ELF _s_a_n_s
  le _p_a_q_u_e_t_a_g_e _S_h_a_d_o_w sont vulnerables !

  Pour  de  plus  amples  informations  sur  cette publication ainsi que
  d'autres publications concernant les problemes de securite  de  Linux,
  consultez  la  _L_i_n_u_x  _S_e_c_u_r_i_t_y  _H_o_m_e  _P_a_g_e _(_S_h_a_r_e_d _L_i_b_r_a_r_i_e_s _a_n_d _l_o_g_i_n
  _P_r_o_g_r_a_m  _V_u_l_n_e_r_a_b_i_l_i_t_y_)   a   <http://bach.cis.temple.edu/linux/linux-
  security/Linux-Security-Faq/Linux-telnetd.html>

  33..22..  OOuu ttrroouuvveerr llaa SSuuiittee SShhaaddooww

  La  seule  suite  recommandee  est  en  beta  test, donc les dernieres
  versions  sont  utilisables  en  environnement  de  production  et  ne
  contiennent pas de programme login vulnerable.

  Le paquetage utilise la convention de notation suivante :

           shadow-AAMMJJ.tar.gz

  ou AAMMJJ est la date de publication de la suite.

  Cette  version  sera  eventuellement la version 3.3.3 lorsqu'elle sera
  publiee apres le beta test; et est maintenue par  Marek  Michalkiewicz
  <marekm@il7linuxb.ists.pwr.wroc.pl>. Elle est disponible sous la forme
  :            _s_h_a_d_o_w_-_c_u_r_r_e_n_t_._t_a_r_._g_z             a             l'adresse
  <ftp://il7linuxb.ists.pwr.wroc.pl/pub/linux/shadow/shadow-
  current.tar.gz>.

  Les miroirs suivants sont aussi disponibles :

  +o  ftp://ftp.icm.edu.pl/pub/Linux/shadow/shdow-current.tar.gz

  +o  ftp://iguana.hut.fi/pub/linux/shadow/shadow-current.tar.gz

  +o  ftp://ftp.cin.net/usr/ggallag/shadow/shadow-current.tar.gz

  +o  ftp://ftp.netural.com/pub/linux/shadow/shadow-current.tar.gz

  Vous devez utiliser la version actuelle disponible.

  Vous NE devez PAS utiliser une version plus ancienne  que  la  version
  shadow-960129  du  fait  qu'elles  possedent  le  probleme de securite
  decrit plus avant.

  Lorsque ce document fait  reference  a  la  _S_u_i_t_e  _S_h_a_d_o_w,  je  ferais
  reference  a  ce  paquetage.  Il est donc suppose que vous utilisez ce
  paquetage.

  Pour information, j'ai utilise le paquetage shadow-960129  pour  faire
  les instructions d'installation.

  Si  vous  utilisiez  precedemment le paquetage shadow-mk, vous devriez
  mettre a jour cette version et reconstruire  tout  ce  que  vous  avez
  originellement compile.

  33..33..  CCee qquuii eesstt iinncclluuss ddaannss llee ppaaqquueettaaggee SShhaaddooww

  La paquetage shadow contient les programmes de remplacement pour:

  su, login, passwd, newgrp, chfn, chsh, et id

  Mais il contient aussi des nouveaux programmes:

  chage,   newusers,   dpasswd,   gpasswd,  useradd,  userdel,  usermod,
  groupadd, groupdel, groupmod, groups, pwck, grpck, lastlog, pwconv, et
  pwunconv

  De  plus,  la  bibliotheque: libshadow.a est incluse pour permettre de
  compiler les programmes necessitant un acces en lecture/ecritures  aux
  mots de passe.

  Les pages de manuel sont aussi incluses.

  Il  y  a  aussi  un  programme  de configuration pour le program login
  intalle sous le nom de /etc/login.defs.

  44..  CCoommppiilleerr lleess pprrooggrraammmmeess..

  44..11..  EExxttrraaiirree ll''aarrcchhiivvee

  La premiere etape apres avoir recupere les paquetage est  l'extraction
  de l'archive. C'est une archive de format tar et compressee avec gzip.
  Donc tout d'abord deplacez la vers /usr/src, et tapez:

       tar -xzvf shadow-current.tar.gz

  Ceci extraira l'ensemble dans le repertoire: /usr/src/shadow-AAMMJJ

  44..22..  CCoonnffiigguurreerr llee ffiicchhiieerr ccoonnffiigg..hh

  La premiere chose a faire  est  d'ecraser  les  fichiers  Makefile  et
  config.h:

  cd /usr/src/shadow-AAMMJJ
  cp Makefile.linux Makefile
  cp config.h.linux config.h

  Jetez  un  coup  d'oeil  au fichier config.h.  Ce fichier contient les
  definitions pour quelques options de configuration.  Si vous  utilisez
  le  paquetage  shadow  _r_e_c_o_m_m_a_n_d_e,  je vous recommande de devalider le
  support de groupes shadow; pour la premiere fois.

  Par defaut les mots de passe pour les groupes cache sont valides. Pour
  les  devalider,  editez  le  fichier  config.h,  et  remplacez #define
  SHADOWGRP en #undef SHADOWGRP. Je recommande  de  commencer  sans  les
  groupes  caches,  mais  si vous souhaitez reellement des mots de passe
  pour les groupes ainsi que des administrateurs de groupes vous pourrez
  ulterieurement  valider  l'option  et  recompiler  le tout. Si vous la
  laissez validee, vous devez creer le fichier /etc/gshadow.

  Valider l'option gerant les longs mots de passe n'est pas recommandee.

  _N_e _P_A_S _c_h_a_n_g_e_r le champ: #undef AUTOSHADOW

  L'option  AUTOSHADOW  etait prevue pour que les programmes non adaptes
  aux mots de passe shadow puissent toujours  fonctionner.  Cela  parait
  interessant  en  theorie  mais ne fonctionne pas correctement. Si vous
  validez cette option, et qu'un programme focntionne avec les droits de
  root, il se peut qu'il utilise la fonction  getpwnam() avec les droits
  root, et, plus tard, qu'il ecrive la donnee modifiee dans  le  fichier
  /etc/passwd.   Il   ne  possedera  donc  plus  les  proprietes  _s_h_a_d_o_w
  _p_a_s_s_w_o_r_d_s. _c_h_f_n et _c_h_s_h sont de tels programmes  (Vous  pouvez  passer
  outre  en echangeant l'uid reel et effectif avant d'appeler getpwnam()
  car root peut utiliser _c_h_f_n et _c_h_s_h aussi).

  Le meme avertissement est aussi valable si vous compilez la libc. Il y
  a  une  option  SHADOW_COMPAT qui fait la meme chose. Elle ne _d_o_i_t _P_A_S
  _e_t_r_e utilisee! Si vous commencez a remettre des mots de passe  encodes
  dans le fichier /etc/passwd, cela pose un probleme.

  Si  vous  utilisez  une  libc  de  versions  inferieure a 4.6.27, vous
  devriez faire un ou deux changements dans le  fichier  config.h  ainsi
  que  dans  le Makefile. En ce qui concerne le fichier config.h, editez
  le et remplacez:

       #define HAVE_BASENAME

  par

       #undef HAVE_BASENAME

  Dans le fichier Makefile, remplacez:

  SOBJS = smain.o env.o entry.o susetup.o shell.o \
          sub.o mail.o motd.o sulog.o age.o tz.o hushed.o

  SSRCS = smain.c enc.c entry.c setup.c shell.c \
          pwent.c sub.c mail.c motd.c sulog.c shadow.c age.c pwpack.c rad64.c \
          tz.c hushed.c

  par

       SOBJS = smain.o env.o entry.o susetup.o shell.o \
               sub.o mail.o motd.o sulog.o age.o tz.o hushed.o basename.o

       SSRCS = smain.c enc.c entry.c setup.c shell.c \
               pwent.c sub.c mail.c motd.c sulog.c shadow.c age.c pwpack.c rad64.c \
               tz.c hushed.c basename.c

  Ce changement ajoute le code contenu dans basename.c qui  est  contenu
  dans la libc 4.6.27 ou plus.

  44..33..  FFaaiirree uunnee ccooppiiee ddee ssaauuvveeggaarrddee ddee vvooss pprrooggrraammmmeess oorriiggiinnaauuxx..

  Faites une copie de sauvegarde des fichiers qui  vont  etre  remplaces
  par le kit shadow. Sur un systeme Slackware 3.0:

  +o  /bin/su

  +o  /bin/login

  +o  /usr/bin/passwd

  +o  /usr/bin/newgrp

  +o  /usr/bin/chfn

  +o  /usr/bin/chsh

  +o  /bin/id

  Le  paquetage  beta possede une cible _s_a_v_e dans le Makefile, mais elle
  est commentee car les differentes distributions placent ces programmes
  a differents endroits.

  Vous   devriez   aussi  faire  une  copie  de  sauvegarde  du  fichier
  /etc/passwd, mais faites attention a le nommer differemment de facon a
  ne pas ecraser l'original.

  44..44..  LLaanncceerr mmaakkee

  _V_o_u_s _a_v_e_z _b_e_s_o_i_n _d_'_e_t_r_e root pour la plupart de l'installation

  Lancez make pour compiler les executables du paquetage.

       make all

  Vous  pourrez  voir les avertissements suivants: rcsid defined but not
  used. Ce n'est rien, il survient seulement parce que l'auteur  utilise
  un paquetage de controle de version.

  55..  IInnssttaalllleerr

  55..11..  AAyyeezz uunnee ddiissqquueettttee ddee bboooott aa ppoorrtteeee ddee mmaaiinn

  Si  la  mise  a  jour  se  deroulait  mal, il serait utile d'avoir une
  disquette de  boot.  Si  vous  avez  l'ensemble  des  deux  disquettes
  boot/root  que  vous  avez  utilisees  lors de l'installation de votre
  systeme, elles feront probablement l'affaire. Dans le  cas  contraire,
  vous  devrez  en  generer:  jetez  un  coup  d'oeil  au Bootdisk-HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Bootdisk-HOWTO.html>        (version
  francaise:                                              Bootdisk-HOWTO
  <ftp://ftp.ibp.fr/pub/linux/french/docs/HOWTO/Bootdisk-HOWTO>)     qui
  vous decrira la marche a suivre.

  55..22..  SSuupppprriimmeerr lleess ppaaggeess ddee mmaannuueell eenn ddoouubbllee

  Vous  devriez  aussi  deplacer  les  pages  de  manuels  qui vont etre
  remplacees. Meme si vous avez le courage  d'installer  le  kit  Shadow
  sans  proceder  a un quelconque sauvegarde, vous aurez a supprimer vos
  anciennes pages: elles ne sont pas ecrasees car - dans la plupart  des
  cas - elles sont enregistrees dans un format compresse.

  Vous  pouvez  utiliser une combinaison de la commande man -aW et de la
  commande  locate  pour  localiser  les  pages  a   effacer.   Il   est
  generalement  plus  aise  de  retrouver  les  anciennes pages avant de
  lancer make intall.

  Si vous utilisez la distribution Slackware 3.0,  alors  les  pages  de
  manuel que vous devez supprimer sont:

  +o  /usr/man/man1/chfn.1.gz

  +o  /usr/man/man1/chsh.1.gz

  +o  /usr/man/man1/id.1.gz

  +o  /usr/man/man1/login.1.gz

  +o  /usr/man/man1/passwd.1.gz

  +o  /usr/man/man1/su.1.gz

  +o  /usr/man/man5/passwd.5.gz

  Regardez  dans  les sous repertoires /var/man/cat[1-9] Il est possible
  qu'il y ait des pages de manuel du meme nom qui devront etre effacees.

  55..33..  LLaanncceerr mmaakkee iinnssttaallll

  C'est desormais le moment de taper: (faites ceci en tant que root).

       make install

  Ceci  installera  les  nouveaux  programmes,  remplacera  les anciens,
  definira les permissions de  fichiers,  et  installera  les  pages  de
  manuel.

  Make  install prend en compte l'installation des fichiers include pour
  les mettre au bon endroit dans /usr/include/shadow.

  Si vous utilisez le paquetage beta, vous devez copier  a  la  main  le
  fichier  login.defs  dans  les  repertoires /etc/ et etre sur que seul
  root peut le modifier.

       cp login.defs /etc
       chmod 700 /etc/login.defs

  Ce fichier est le fichier de configuration pour  le  programme  _l_o_g_i_n.
  Vous  devriez  regarder  et faire des changements dans ce fichier pour
  votre propre systeme. C'est la que vous decidez sur quel terminal root
  peut  se  connecter,  ainsi que d'autres parametres de securite (comme
  l'expiration  par defaut des mots de passe).

  55..44..  LLaanncceerr ppwwccoonnvv

  La prochaine etape consiste a lancer pwconv. Ceci doit  etre  fait  en
  tant que root, et a partir du repertoire /etc :

       cd /etc
       /usr/sbin/pwconv

  pwconv  lit  les  donnees du fichier /etc/passwd et les separe en deux
  fichiers: /etc/npasswd et /etc/nshadow.

  Un programme pwunconv permet de faire la demarche inverse: a partir du
  fichier /etc/passwd et /etc/shadow, il genere un unique /etc/passwd.

  55..55..  RReennoommmmeerr nnppaasssswwdd eett nnsshhaaddooww

  Apres  avoir  lance  pwconv, vous avez normalement cree deux fichiers:
  /etc/npasswd et /etc/nshadow. Ses fichiers doivent etre respectivement
  renommes  en  /etc/passwd  et  /etc/shadow.  Faites aussi une copie de
  votre fichier /etc/passwd original, mais faites attention que seul  le
  root  puisse  y avoir l'acces.  Nous le deplacerons dans le repertoire
  personnel de root:

       cd /etc
       cp passwd ~passwd
       chmod 600 ~passwd
       mv npasswd passwd
       mv nshadow shadow

  Verifiez aussi que les permissions et les proprietaires  des  fichiers
  soient  corrects.  Si vous utilisez _X_-_w_i_n_d_o_w_s, le programme xlock doit
  pouvoir lire directement le fichier /etc/shadow (mais pas  y  ecrire).
  La  meilleure  solution  consiste  a  configurer  le fichier shadow en
  utilisateur root et groupe shadow. Avant toute chose verifiez  que  le
  groupe  shadow  existe  bien  (regardez  dans  le fichier /etc/group).
  Actuellement, il ne devrait y avoir aucun utilisateur appartenant a ce
  groupe.

       chown root.root passwd
       chown root.shadow shadow
       chmod 0644 passwd
       chmod 0640 shadow

  Votre  systeme est desormais equipe de mots de passe shadow. Deplacez-
  vous vers une autre console virtuelle et verifier si vous pouvez  vous
  loguer.

  Si  vous  ne pouvez pas vous loguer c'est que la mise a jour s'est mal
  deroulee !  Pour revenir a un systeme de mot  de  passes  non  shadow,
  entrez ce qui suit:

       cd /etc
       cp ~passwd passwd
       chmod 644 passwd
       cd /usr/src/shadow-mk
       make restore

  Ceci  restaurera  le  fichier passwd original,  et restaurera tous les
  fichiers precedemment sauvegardes.

  66..  LLeess aauuttrreess pprrooggrraammmmeess aa mmeettttrree aa jjoouurr

  Le paquetage shadow contient la plupart des programmes de remplacement
  aux  programmes  accedant  aux mots de passe. Mais toutefois, il reste
  quelques programmes presents en general sur la  plupart  des  systemes
  qui necessitent une mise a jour pour fonctionner correctement.

  Si  vous  utilisez  une  _D_i_s_t_r_i_b_u_t_i_o_n  _D_e_b_i_a_n  (et  meme  si vous n'en
  utilisez pas), vous pouvez obtenir les sources des programmes que vous
  avez          besoin         de         recompiler         a         :
  <ftp://ftp.debian/org/debian/stable/source/>

  La but de cette section  concerne  la  mise  a  jour  des  programmes:
  adduser, wu_ftpd, ftpd, pop3d, xlock xdm et sudo

  Reportez  vous  a  la section ``'' pour vous aider a mettre a jour les
  programmes qui necessitent l'acces aux mots de  passes  (sans  que  le
  programme soit SUID root ou SGID shadow).

  66..11..  llee pprrooggrraammmmee AAdddduusseerr ((SSllaacckkwwaarree))

  Les  distributions Slackware (et probablement d'autres) contiennent un
  programme interactif /bin/adduser permettant d'ajouter facilement  des
  utilisateurs.  Une  version  Shadow  de ce programme peut etre trouvee
  sur:                                  ftp://sunsite.unc.edu/pub/Linux/
  system/Admin/accounts/adduser.shadow-1.4.tar.gz.

  Je  vous  encourage  a utiliser les programmes qui sont fournis par le
  paquetage shadow (useradd, usermod et userdel) a la place de  adduser.
  Ils necessitent un peu de temps pour savoir s'en servir, mais l'effort
  est d'autant plus grand que ces programmes effectuent  un  blocage  de
  fichier sur /etc/passwd et /etc/shadow, ce que ne fait pas adduser

  Lisez la section ``'' pour de plus amples informations.

  L'installation est aisee:

       tar -xzvf adduser.shadow-1.4.tar.gz
       cd adduser.shadow.1.4
       make adduser
       chmod 700 adduser
       make install

  66..22..  LLee sseerrvveeuurr wwuu__ffttppdd

  La  plupart  des  distributions  Linux incluent le serveur wu_ftpd. Si
  votre distribution n'est pas ``native shadow'', votre serveur  wu_ftpd
  n'est  pas  compile pour le support shadow. wu_ftpd est lance a partir
  de inetd/tcpd en tant que processus root. Si vous utilisez  un  ancien
  demon  wu_ftpd,  vous  devrez  de toute facon le mettre a jour car les
  vieilles versions ont un bug, le compte root  pouvait  etre  compromis
  (pour     plus     d'informations,     consultez    la    page    web:
  <http://bach.cis.temple.edu/linux/linux-security/Linux-      Security-
  FAQ/Linux-wu.ftpd-2.4-Update.html>).

  Heureusement,  la  seule demarche a faire est de recuperer les sources
  et de les compiler avec l'option shadow.

  Le   serveur   wu_ftpd   peut   etre   recupere   sur   Sunsite:   wu-
  ftp-2.4-fixed.tar.gz
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/file-transfer/wu-
  ftpd-2.4-fixed.tar.gz>

  Une fois l'archive recuperee, placez la dans /usr/src et tapez:

       cd /usr/src
       tar -xzvf wu-ftpd-2.4-fixed.tar.gz
       cd wu-ftpd-2.4-fixed
       cp ./src/config/config.lnx.shadow ./src/config/config.lnx

  editer  alors  le  fichier  ./src/makefiles/Makefile.lnx et changez la
  ligne:

       LIBES     = -lbsd -support

  par

       LIBES     = -lbsd -support -lshadow

  Maintenant vous etes pres a lancer le script de compilation  installer
  le resultat:

       cd /usr/src/wu-ftpd-2.4-fixed
       /usr/src/wu-ftpd-2.4-fixed/build lnx
       cp /usr/sbin/wu-ftpd /usr/src/wu-ftpd.old
       cp ./bin/ftpd /usr/sbin/wu-ftpd

  Sur  mon  systeme  base  sur  une  Slackware  3.0  j'ai  du  faire ces
  modifications avant de lancer build: build:

       cd /usr/include/netinet
       ln -s in_systm.h in_system.h
       cd -

  Des problemes ont ete rapportes lors de la compilation de ce paquetage
  sous   des  systemes  ELF,  mais  la  beta  version  de  la  prochaine
  publication  fonctionne  bien.  Elle   peut   etre   trouve   a:   wu-
  ftp-2.4.2-beta-10.tar.gz   <ftp://tscnet.com/pub/linux/network/ftp/wu-
  ftpd-2.4.2-beta-20.tar.gz>

  Une fois  que  vous  avez  recupere  le  serveur,  placez-le  dans  le
  repertoire /usr/src/ et tapez:

       cd /usr/src
       tar -xzvf wu-ftpd-2.4.2-beta-10.tar.gz
       cd wu-ftpd-beta-10
       cd ./src/config

  editez alors le fichier config.lnx et remplacez:

       #undef SHADOW_PASSWORD

  par

       #define SHADOW_PASSWORD

  Allez alors dans le repertoire des Makefiles

       cd ../Makefiles

  et editez le fichier Makefile.lnx. Modifiez alors:
       LIBES = -lsupport -lbsd # -lshadow

  par

       LIBES = -lsupport -lbsd -lshadow

  Il ne reste plus qu'a compiler le programme et l'installer:

       cd ..
       build lnx
       cp /usr/sbin/wu-ftpd /usr/sbin/wu-ftpd.old
       cp ./bin/ftpd /usr/sbin/wu-ftpd

  Notez que vous devrez controler le fichier /etc/inetd.conf afin d'etre
  sur que votre serveur  wu-ftpd  soit  reellement  present.  Il  a  ete
  rapporte  que  certaines  distributions  placent les serveurs demons a
  d'autres endroits, et donc, wu-ftpd en particulier pourrait etre nomme
  differemment.

  66..33..  ffttppdd ssttaannddaarrdd

  Si  vous  utilisez  le  serveur  ftpd  standard, tout d'abord, je vous
  recommande de passer au serveur wu_ftpd, mis a  part  les  bugs  cites
  precedemment, il est considere comme plus securise.

  Si  vous  insistez et voulez garder la version standard - ou bien vous
  avez besoin du support NIS - le fichier est sur Sunsite:  ftpd-shadow-
  nis.tgz          <ftp://sunsite.unc.edu/pub/Linux/system/Network/file-
  transfer/ftpd-shadow-nis.tgz>

  66..44..  ppoopp33dd ((PPoosstt OOffffiiccee PPrroottooccooll 33))

  Si vous utilisez le 3eme _P_o_s_t  _O_f_f_i_c_e  _P_r_o_t_o_c_o_l  (POP3),  vous  devrez
  recompiler  le  programme  pop3d.  pop3d  est  normalement  lance  par
  inet2/tcpd dans un process root.

  Il    y    a    deux     versions     disponibles     sur     Sunsite:
  pop3d-1.00.4.linux.shadow.tar.gz
  <ftp://sunsite.unc.edu/pub/Linux/system/Mail/pop/
  pop3d-1.00.4.linux.shadow.tar.gz>      et      pop3d+shadow+elf.tar.gz
  <ftp://sunsite.unc.edu/pub/Linux/system/Mail/pop/
  pop3d+shadow+elf.tar.gz>

  Les deux versions sont tres simples a installer.

  66..55..  xxlloocckk

  Si vous utilisez X-window et que vous ne mettez pas a jour xlock, vous
  devrez utiliser CTRL-ALT-Fx pour vous deplacer sur un autre  terminal,
  vous  loguer  et  tuer  le process xlock (ou utiliser CTRL-ALT-BS pour
  tuer le serveur X). Mais par chance, la mise a  jour  d'  xlock  n'est
  vraiment pas compliquee.

  Si vous utilisez XFree86 Versions 3.x.x,  c'est probablement xlockmore
  qui est installe (c'est un superbe economiseur d'ecran et  un  systeme
  de  lock).   Ce paquetage supporte _s_h_a_d_o_w apres recompilation. Si vous
  utilisez une vieille version xlock, je vous recommande celle-ci.

  xlockmore-3.7.tgz          disponible           sur           Sunsite:
  <ftp://sunsite.unc.edu/pub/Linux/X11/xutils/screen-savers/
  xlockmore-3.7.tgz>

  En gros, voila comment proceder:

  Recuperez xlockmore-3.7.tgz et copiez-le dans /usr/src,  decompressez-
  le:

       tar -xzvf xlockmore-3.7.tgz

  Editez  le  fichier: /usr/X11R6/lib/X11/config/linux.cf, et changez la
  ligne:

       #define HasShadowPasswd    NO

  en

       #define HasShadowPasswd    YES

  Alors, construisez les executables:

       cd /usr/src/xlockmore
       xmkmf
       make depend
       make

  Maintenant, deplacez le tout vers le bon endroit, et mettez-a-jour les
  proprietaires et les permissions de fichier:

       cp xlock /usr/X11R6/bin/
       cp XLock /var/X11R6/lib/app-defaults/
       chown root.shadow /usr/X11R6/bin/xlock
       chmod 2755 /usr/X11R6/bin/xlock
       chown root.shadow /etc/shadow
       chmod 640 /etc/shadow

  Votre xlock fonctionnera desormais correctement.

  66..66..  xxddmm

  xdm  est  un  programme  qui presente un ecran de _l_o_g_i_n pour _W_-_W_i_n_d_o_w.
  Quelques sytemes demarrent xdm  lorsqu'il  se  situe  dans  un  niveau
  specifique (voir /etc/inittab).

  Avec  le  _k_i_t _S_h_a_d_o_w installe, xdm doit etre mis a jour. Heureusement,
  il est relativement facile de mettre a jour votre programme xdm.

  xdm.tar.gz               est               disponible               a:
  <ftp://sunsite.unc.edu/pub/Linux/X11/xutils/xdm.tar.gz>;

  Recuperez  xdm.tar.gz  et  placez-le  dans  le repertoire /usr/src, et
  decompressez-le:

       tar -xzvf xdm.tar.gz

  editez le fichier /usr/X11R6/lib/X11/config/linux.cf,  et  changez  la
  ligne:

       #define HasShadowPassword           NO

  en

       #define HasShadowPassword           YES

  Vous pouvez alors compiler les executables;:

       cd /usr/src/xdm
       xmkmf
       make depend
       make

  Copier alors l'executable:

       cp xdm /usr/X11R6/bin

  xdm  est  execute  en tant que root donc vous n'avez pas a changer les
  permissions.

  66..77..  ssuuddoo

  Le programme sudo permet a l'administrateur  systeme  de  laisser  des
  utilisateurs lancer des programmes qui normalement necessiteraient les
  permissions root. C'est interessant car ca permet  a  l'administrateur
  de  se  limiter  lui  meme  l'acces  root  pendant  qu'il  permet  aux
  utilisateurs de faire des operations comme monter un disque.

  sudo a besoin d'acceder aux mots de passe car il  verifie  le  mot  de
  passe  des utilisateurs quand il est invoque.sudo fonctionne deja SUID
  root, donc acceder au fichier /etc/shadow n'est pas un probleme.

  la mise a jour sudo pour shadow est disponible:

  Cette version a ete prevue pour fonctionner avec  des  mots  de  passe
  shadow, donc la seule chose a faire est de recompiler le tout (mettez-
  le dans /usr/src):

       cd /usr/src
       tar -xzvf sudo-1.2-shadow.tgz
       cd sudo-1.2-shadow
       make all
       make install

  66..88..  iimmaappdd ((ppaaqquueettaaggee EEmmaaiill ppiinnee))

  imapd est un serveur e-mail tout comme pop3d. imapd est  compris  dans
  l'ensemble  Email  pine.  La  documentation  qui  est  fournie avec le
  paquetage pretend que la configuration  par  defaut  pour  un  systeme
  linux  fonctionne avec shadow. Or j'ai constate que ce n'est pas vrai.
  De plus, je n'ai pas encore compris comment fonctionne la  combinaison
  Makefile / Script Build et je n'ai pas reussi a le modifier pour qu'il
  supporte le format shadow.

  Si quelqu'un arrive a faire cette mise a jour, merci de  m'envoyer  un
  email, je l'incluerai ici.

  66..99..  ppppppdd ((SSeerrvveeuurr PPooiinntt--ttoo--PPooiinntt pprroottooccooll))

  Le  serveur  pppd  peut  etre  configure  selon de nombreuses methodes
  d'authentification:  _P_a_s_s_w_o_r_d  _A_u_t_h_e_n_t_i_f_o_c_a_t_i_o_n  _P_r_o_t_o_c_o_l   (PAP)   et
  _C_r_y_p_t_o_g_r_a_p_h_i_c   _A_u_t_h_e_n_t_i_f_i_c_a_t_i_o_n  _P_r_o_t_o_c_o_l  (CHAP).  Le  serveur  pppd
  utilise  en  general  les  mots  de  passe  stockes  dans  le  fichier
  /etc/ppp/chap-secrets  et  /etc/ppp/pap-secret. Si vous utilisez cette
  methode, ce n'est pas la peine de faire de mise-a-jour.

  pppd vous permet aussi d'utiliser le parametre _l_o_g_i_n (soit en ligne de
  commande,  soit  dans  le fichier de configuration). Si l'option login
  est utilisee, alors pppd utilisera pour le _P_A_P le fichier  /etc/passwd
  pour  le  nom  d'utilisateur  et  le  mot  de  passe.  Bien  sur ca ne
  fonctionnera  plus  sur  un  systeme  mots  de  passe   shadow.   Pour
  pppd-1.2.1d, un ajout de code est necesssaire.

  L'exemple  donne dans la prochaine section est la modification du code
  de pppd-1.2.1d (une vieille version de pppd).

  pppd-2.2.0 contient deja le support shadow.

  77..  FFaaiirree eenn ssoorrttee qquuee llaa ssuuiittee sshhaaddooww ffoonnccttiioonnnnee

  Cette section explique quelques elements  que  vous  souhaitez  savoir
  depuis que vous avez la suite shadow sur votre systeme. De plus amples
  informations sont disponibles dans les pages de manuels.

  77..11..  AAjjoouutteerr,, mmooddiiffiieerr,, eett ssuupppprriimmeerr ddeess uuttiilliissaatteeuurrss..

  La _S_u_i_t_e _S_h_a_d_o_w a ajoute les commandes suivantes  qui  sont  orientees
  ``ligne  de  commande'',  pour  ajouter,  modifier  et  supprimer  des
  utilisateurs. Vous avez  aussi  surement  du  installer  le  programme
  adduser.

  77..11..11..  uusseerraadddd

  la commande useradd peut etre utilisee pour ajouter des utilisateurs a
  votre systeme. Vous appelez aussi  cette  commande  pour  changer  les
  parametres par defaut.

  La  premiere chose a faire est d'examiner les parametres par defaut et
  effectuer des changements pour votre propre systeme.

       useradd -D

  ______________________________________________________________________
  GROUP=1
  HOME=/home
  INACTIVE=0
  EXPIRE=0
  SHELL=
  SKEL=/etc/skel
  ______________________________________________________________________

  Les parametres par defauts ne sont probablements  pas  ceux  que  vous
  souhaitez,   donc,  si  vous  commencez  a  ajouter  des  utilisateurs
  maintenant, vous aurez a specifier toutes les informations pour chacun
  d'entre  eux.  C'est  pour cela que nous pouvons et devons changer les
  valeurs par defaut.

  Sur mon syteme:

  +o  Je veux que le groupe par defaut soit 100,

  +o  Je veux que les mots de passe expirent au bout de 60 jours,

  +o  Je ne veux pas que le compte soit bloque lors  de  l'expiration  du
     mot de passe,

  +o  Je veux que le shell par defaut soit /bin/bash

     Pour effectuer ces changements, j'ai du utiliser:

       useradd -D -g100 -e60 -f0 -s/bin/bash

  Maintenant, lancer useradd -D donne:

  ______________________________________________________________________
  GROUP=100
  HOME=/home
  INACTIVE=0
  EXPIRE=60
  SHELL=/bin/bash
  SKEL=/etc/skel
  ______________________________________________________________________

  Ces    valeurs    par   defaut   sont   stockees   dans   le   fichier
  /etc/defaults/useradd

  Maintenant vous pouvez utiliser useradd pour ajouter des  utilisateurs
  a  votre  systeme.  Par  exemple,  pour ajouter l'utilisateur fred, en
  utilisant les valeurs par defaut, vous devez utiliser ce qui suit:

       useradd -m -c "Fred Flintstone" fred

  Cela creera une entree dans le fichier /etc/passwd:

       fred:*:505:100:Fred Flintstone:/home/fred:/bin/bash

  Ainsi que cette entree dans le fichier /etc/shadow:

       fred:!:0:0:60:0:0:0:0

  Le repertoire d'accueil de fredsera cree et le  contenu  de  /etc/skel
  sera copie a cet endroit grace a l'option -m

  De  plus,  lorsque  l'on ne specifie pas l'IUD, le prochain disponible
  est utilise.

  Le compte de fred est maintenant cree, mais fred ne peut pas se  loger
  tant  que nous ne deverouillons pas le compte. Nous effectuons cela en
  changeant le mot de passe.

       passwd fred

  ______________________________________________________________________
  Changing password for fred
  Enter the new password (minimum of 5 characters)
  Please use a combination of upper and lower case letters and numbers.
  New Password: *******
  Re-enter new password: *******
  ______________________________________________________________________

  Maintenant /etc/shadow contient:

       fred:J0C.WDR1amIt6:9559:0:60:0:0:0:0

  fred est maintenant capable de se connecter et d'utiliser le  systeme.
  La  chose  interessante  a  propos de useradd et des autres programmes
  provenant de la Suite Shadow, est qu'ils  effectuent  les  changements
  dans  les fichiers /etc/passwd et /etc/shadow automatiquement. Donc si
  vous ajoutez un utilisateur, et qu'un autre utilisateur change son mot
  de   passe  au  meme  moment,  les  deux  operations  sont  effectuees
  correctement.

  Vous  devriez  plutot  utiliser  les  commandes   fournies   qu'editer
  directement  les fichier /etc/passwd et /etc/shadow. Si vous editez le
  fichier /etc/shadow et qu'un utilisateur change son mot  de  passe  au
  meme  moment, ce que vous sauverez, sera bien dans le fichier mais, le
  nouveau mot de passe de l'utilisateur sera perdu.

  Voici un petit script interactif permettant d'ajouter des utilisateurs
  en utilisant les commandes useradd et passwd:

  ______________________________________________________________________
  #!/bin/bash
  #
  # /sbin/newuser - A script to add users to the system using the Shadow
  #                 Suite's useradd and passwd commands.
  #
  # Written my Mike Jackson <mhjack@tscnet.com> as an example for the Linux
  # Shadow Password Howto.  Permission to use and modify is expressly granted.
  #
  # This could be modified to show the defaults and allow modification similar
  # to the Slackware Adduser program.  It could also be modified to disallow
  # stupid entries.  (i.e. better error checking).
  #
  ##
  #  Defaults for the useradd command
  ##
  GROUP=100        # Default Group
  HOME=/home       # Home directory location (/home/username)
  SKEL=/etc/skel   # Skeleton Directory
  INACTIVE=0       # Days after password expires to disable account (0=never)
  EXPIRE=60        # Days that a passwords lasts
  SHELL=/bin/bash  # Default Shell (full path)
  ##
  #  Defaults for the passwd command
  ##
  PASSMIN=0        # Days between password changes
  PASSWARN=14      # Days before password expires that a warning is given
  ##
  #  Ensure that root is running the script.
  ##
  WHOAMI=`/usr/bin/whoami`
  if [ $WHOAMI != "root" ]; then
          echo "You must be root to add news users!"
          exit 1
  fi
  ##
  #  Ask for username and fullname.
  ##
  echo ""
  echo -n "Username: "
  read USERNAME
  echo -n "Full name: "
  read FULLNAME
  #
  echo "Adding user: $USERNAME."
  #
  # Note that the "" around $FULLNAME is required because this field is
  # almost always going to contain at least on space, and without the
  # the useradd command would think that you we moving on to the next
  # parameter when it reached the SPACE character.
  #
  /usr/sbin/useradd -c"$FULLNAME" -d$HOME/$USERNAME -e$EXPIRE \
          -f$INACTIVE -g$GROUP -m -k$SKEL -s$SHELL $USERNAME
  ##
  #  Set password defaults
  ##
  /bin/passwd -n $PASSMIN -w $PASSWARN $USERNAME >/dev/null 2>&1
  ##
  #  Let the passwd command actually ask for password (twice)
  ##
  /bin/passwd $USERNAME
  ##
  #  Show what was done.
  ##
  echo ""
  echo "Entry from /etc/passwd:"
  echo -n "   "
  grep "$USERNAME:" /etc/passwd
  echo "Entry from /etc/shadow:"
  echo -n "   "
  grep "$USERNAME:" /etc/shadow
  echo "Summary output of the passwd command:"
  echo -n "   "
  passwd -S $USERNAME
  echo ""
  ______________________________________________________________________

  Utiliser  un  script  pour  ajouter  des utilisateurs est preferable a
  l'edition  des  fichiers  /etc/passwd  et   /etc/shadow   ainsi   qu'a
  l'utilisation   de   programmes   comme  adduser  de  la  distribution
  Slackware.

  Vous etes libre d'utiliser et de modifier le script a en  fonction  de
  votre systeme.

  Pour plus d'informations sur useradd, consultez le manuel en ligne.

  77..11..22..  uusseerrmmoodd

  Le  programme  usermod  est  utilise  pour  modifier  les informations
  relatives a un utilisateur.  Les  options  sont  les  memes  que  pour
  useradd.

  Disons  que  l'on souhaite changer le shell de fred. Vous devrez faire
  la chose suivante:

       usermod -s /bin/tcsh fred

  Maintenant l'entree concernant fred dans le  fichier  /etc/passwd  est
  devenue:

       fred:*:505:100:Fred
       Flintstone:/home/fred:/bin/tcsh

  On change la date d'expiration du compte au 15/09/97:

       usermod -e 09/15/97 fred

  Maintenant  l'entree  concernant  fred dans le fichier /etc/shadow est
  devenue:

  fred:J0C.WDR1amIt6:9559:0:60:0:0:10119:0

  Pour plus d'informations concernant  usermod,  consultez  la  page  de
  manuel en ligne.

  77..11..33..  uusseerrddeell

  userdel  fait  exactement ce que vous voulez, il efface le compte d'un
  utilisateur. Utilisez simplement:

       userdel -r username

  L'option -r implique que tous les  fichiers  du  repertoire  d'accueil
  d'un  utilisateur  seront  effaces.  Les  fichiers situes en dehors du
  repertoire d'accueil devront etre cherches et effaces manuellement.

  Si  vous  souhaitez  simplement  verouiller  un  compte  au  lieu   de
  l'effacer, utilisez la commande passwd.

  77..22..  LLaa ccoommmmaannddee ppaasssswwdd eett llaa dduurreeee dduu mmoott ddee ppaassssee..

  La  commande  passwd a pour but de changer les mots de passe. De plus,
  elle est utilisee par l'utilisateur root pour:

  +o  Verouiller et deverouiller des comptes (-l et -u),

  +o  Definir le nombre de jours de validite d'un mot de passe (-x),

  +o  Definir le nombre de jours minimums pour le changement  de  mot  de
     passe (-n),

  +o  Definir  le  nombre  de jours d'alerte concernant l'expiration d'un
     mot de passe(-w),

  +o  Definir le nombre de jours apres que le mot de  passe  soit  expire
     pour verouiller le compte(-i),

  +o  Permettre  de  voir les informations concernant un utilisateur dans
     un format clair(-S).

  Par exemple, jetons un coup d'oeil a fred:

       passwd -S fred
       fred P 03/04/96 0 60 0 0

  Cela signifie que le mot de passe de fred  est  valide,  qu'il  a  ete
  change  pour  la  derniere  fois le 04/03/96, qu'il peut etre change a
  n'importe quel moment, qu'il expire au bout de 60 jours, que  fred  ne
  sera  pas  averti,  et  que  le  compte  ne sera pas verouille lors de
  l'expiration du mot de passe.

  Cela veut simplement dire que si fred se loge  apres  l'expiration  de
  son  mot  de  passe,  il  lui  sera demande de taper un nouveau mot de
  passe.

  Si nous souhaitons prevenir fred 14 jours avant  l'expiration  de  son
  mot  de  passe, et verouiller son compte 14 jours apres l'avoir laisse
  expire, nous devrions faire la chose suivante:

       passwd -w14 -i14 fred

  Maintenant les informations concernant fred sont changees en:

       fred P 03/04/96 0 60 14 14

  Pour de plus amples informations  concernant  passwd,  se  referer  au
  manuel en ligne.

  77..33..  LLee ffiicchhiieerr llooggiinn..ddeeffss

  Le   fichier  /etc/login.defs  est  le  fichier  de  configuration  du
  programme login ainsi que celui de toute le _S_u_i_t_e _S_h_a_d_o_w.

  Le  fichier  /etc/login.defs  contient  les   parametres   allant   de
  l'apparance  de l'invite a l'expiration par defaut concernant les mots
  de passe utilisateurs.

  Le fichier /etc/login.defs  est  assez  bien  documente  de  part  ses
  propres commentaires. De plus, il y a quelques points a noter:

  +o  Il  contient  des  drapeaux  qui  peuvent  etre active ou desactive
     concernant la taille de journalisation,

  +o  Il contient des pointeurs sur d'autres fichiers de configuration,

  +o  Il contient les valeurs par defaut  comme  la  duree  d'un  mot  de
     passe.

  Des  informations  precedantes on peut en deduire que c'est un fichier
  important, vous devez etre sur qu'il existe et que  les  valeurs  sont
  celles que vous desirez pour votre systeme.

  77..44..  LLeess mmoottss ddee ppaassssee ppoouurr lleess ggrroouuppeess

  Le fichier /etc/groups peut contenir des mots de passe permettant a un
  utilisateur de  devenir  un  membre  d'un  groupe  particulier.  Cette
  fonction  est  validee  si vous validez la constante SHADOWGRP dans le
  fichier /usr/src/shadow-AAMMJJ/config.h.

  Si vous definissez cette constante et que vous  compilez,  vous  devez
  creer  un fichier /etc/gshadow pour stocker les mots de passe pour les
  groupes, ainsi que les  informations  concernant  l'administration  du
  groupe.

  Lorsque  vous  avez  cree le fichier /etc/shadow, vous avez utilise un
  programme appele pwconv, il n'y  a  pas  d'equivalent  pour  creer  le
  fichier /etc/gshadow, mais ce n'est pas grave.

  Pour creer le fichier /etc/gshadow initial, faites la chose suivante:

       touch /etc/gshadow
       chown root.root /etc/gshadow
       chmod 700 /etc/gshadow

  Une  fois  que  vous  creez  un nouveau groupe, il sera ajoute dans le
  fichier /etc/group ainsi que dans le  fichier  /etc/gshadow.  Si  vous
  modifiez  un  groupe  en ajoutant, retirant, ou en changeant le mot de
  passe du groupe, le fichier /etc/gshadow sera change.

  Les programmes groups, groupadd, groupmod, et  groupdel  sont  fournis
  dans la _S_u_i_t_e _S_h_a_d_o_w pour modifier les groupes.

  Le format du fichier /etc/group est:

       groupname:!:GID:member,member,...

  ou:

     ggrroouuppnnaammee
        Le nom du groupe,

     !!  Le  champs  contenant  normalement  le  mot  de  passe  qui  est
        maintenant stocke dans le fichier /etc/gshadow,

     GGIIDD
        L'identificateur numerique du groupe,

     mmeemmbbeerr
        La liste des membres du groupe.

  Le format du fichier /etc/gshadow est:

       groupname:password:admin,admin,...:member,member,...

  ou:

     ggrroouuppnnaammee
        Le nom du groupe,

     ppaasssswwoorrdd
        Le mot de passe encode,

     aaddmmiinn
        La liste des administrateurs de groupe,

     mmeemmbbeerr
        La liste des membres du groupe.

  La  commande  gpasswd  est  utilisee   pour   ajouter,   retirer   des
  administrateurs  et des membres d'un groupe. root ou un administrateur
  du groupe peut ajouter ou retirer des membres du groupe.

  Le mot de passe du groupe peut etre change en utilisant  le  programme
  passwd par root ou un administrateur du groupe.

  En  depit  du  fait  qu'il  n'y  ait pas encore de page de manuel pour
  gpasswd, tapez gpasswd sans  parametres  pour  obtenir  la  liste  des
  options.  C'est  relativement facile de comprendre comment tout marche
  un fois que vous avez compris le format du fichier et les concepts.

  77..55..  PPrrooggrraammmmeess ddee vveerriiffiiccaattiioonn ddee llaa ssttrruuccttuurree

  77..55..11..  ppwwcckk

  Le programme pwck est fourni pour verifier la coherence  des  fichiers
  /etc/passwd  et /etc/shadow. Il verifie chaque nom d'utilisateur ainsi
  que les points suivants:

  +o  Le nombre correct de champs,

  +o  Nom unique,

  +o  Nom et groupe valide,

  +o  Groupe primaire valide,

  +o  Repertoire d'accueil valide,

  +o  Shell valide.

  Il previent aussi lorsqu'un compte ne possede pas de mot de passe.

  C'est une bonne idee de lancer pwck  apres  avoir  installe  la  _S_u_i_t_e
  _S_h_a_d_o_w.  C'est  aussi  une bonne idee de le lancer periodiquement, une
  fois par semaine ou par mois.  Si  vous  utilisez  l'option  -r,  vous
  pouvez  utiliser  cron  pour  lancer une analyse reguliere et avoir un
  rapport sous forme de courrier.

  77..55..22..  ggrrppcckk

  grpck est le programme de verification de la  coherance  des  fichiers
  /etc/group et /etc/gshadow. Il effectue les verifications suivantes:

  +o  Le nombre correct de champs,

  +o  Unicite du nom de groupe,

  +o  Validite de la liste des membres et des administrateurs.

  Il possede aussi l'option -r pour des rapports automatiques.

  77..66..  LLeess mmoottss ddee ppaassssee ""AAcccceess aa ddiissttaannccee""

  Les  mots  de passe "Acces a distance" sont une autre ligne de defense
  des systemes permettant la connexion  a  distance.  Si  vous  avez  un
  systeme  qui  permet  a des utilisateurs de se connecter localement ou
  par l'intermediaire d'un reseau, mais vous voulez controler  qui  peut
  appeler  et  se  connecter,  les mots de passe "Acces a distance" sont
  pour vous. Pour valider les mots de passe  "Acces  a  distance",  vous
  devez   editer   le   fichier  /etc/login.defs  et  vous  assurer  que
  DIALUPS_CHECK_ENAB est positionnee a yes.

  Les deux fichiers contenant les informations d'acces a  distance  sont
  /etc/dialups  et  /etc/d_passwd.  Le fichier /etc/dialups contient les
  terminaux (un par  ligne,  avec  l'entete  "/dev/"  supprime).  Si  un
  terminal  est  liste  alors,  la  verification  d'acces a distance est
  effectuee;.

  Le second fichier /etc/d_passwd contient le chemin complet d'un shell,
  suivit d'un mot de passe optionnel.

  Si  un  utilisateur se connecte a un terminal decrit dans une ligne du
  fichier /etc/dialup et  que  son  shell  est  liste  dans  le  fichier
  /etc/d_passwd  alors l'acces lui est autorise en fournissant le mot de
  passe correct.

  Une autre possibilite utile des mots de passe "Acces a  distance"  est
  de  specifier  un  ligne qui ne permet qu'un certain type de connexion
  (PPP, ou UUCP par exemple). Si un utilisateur essaye d'avoir un  autre
  type  de connexion, (ie. une liste de shell), il doit connaitre un mot
  de passe pour l'utiliser.

  Avant de pouvoir utiliser les possibilites de l'acces a distance, vous
  devez creer les fichiers.

  La  commande  dpaswd  est  fournie  pour assigner un mot de passe a un
  shell dans le fichier d_passwd. Lisez le manuel en ligne pour de  plus
  amples informations.

  88..  AAjjoouutteerr llee ssuuppppoorrtt sshhaaddooww aa uunn pprrooggrraammmmee eenn CC..

  Ajouter  le  support shadow a un programme C est assez facile. Le seul
  probleme est que le programme doit etre lance par root (ou SUID  root)
  pour qu'il puisse acceder au fichier /etc/shadow.

  Ceci  presente  un reel probleme, il faut faire tres attention lors de
  la creation de programmes SUID. Par exemple,  il  ne  faut  pas  qu'un
  programme SUID root puisse permettre un acces au shell.

  La  meilleure solution pour qu'un programme puisse acceder aux mots de
  passe encodes sans etre SUID root, est de  lancer  ce  programme  SUID
  shadow a la place. C'est le cas par exemple du programme xlock.

  Dans  l'exemple  donne  precedemment, pppd-1.2.1d fonctionne deja SUID
  root, donc ajouter le support shadow ne le rendra pas plus vulnerable.

  88..11..  LLeess ffiicchhiieerrss dd''eenn--tteettee

  Les  fichiers  d'en-tete  doivent  etre  stockes  dans  le  repertoire
  /usr/include/shadow. Le fichier /usr/include/shadow.h,  doit  etre  un
  lien symbolique vers /usr/include/shadow/shadow.h.

  Pour  ajouter le support shadow a un programme, vous devez inclure les
  fichiers de header:

  #include <shadow/shadow.h>
  #include <shadow/pwauth.h>

  La meilleure solution est d'utiliser  des  directives  de  compilation
  pour  compiler conditionnellement le code shadow (Il y aura un exemple
  par la suite).

  88..22..  LLaa bbiibblliiootthheeqquuee lliibbsshhaaddooww..aa

  Quand vous avez installe _l_'_e_n_s_e_m_b_l_e _s_h_a_d_o_w, le fichier  libshadow.a  a
  ete cree et installe dans le repertoire /usr/lib.

  Lorsque  vous compilez un programme avec le support shadow, vous devez
  preciser a l'editeur de liens d'inclure  la  bibliotheque  libshadow.a
  dans le lien:

       gcc programe.c -o program -lshadow

  Ceci  dit,  et  vous  le  verrez  par  la suite dans notre exemple, la
  plupart des  programmes  plus  ou  moins  gros  utilisent  un  fichier
  Makefile,  qui  en  general, utilise une variable appelee LIBS=... que
  vous pourrez modifier.

  88..33..  LLaa ssttrruuccttuurree sshhaaddooww

  La bibliotheque libshadow.a utilise une structure  appelee  spwd  pour
  recuperer  les  informations  contenues  dans  le fichier /etc/shadow.
  Voici   la   definition   de   la   structure   spwd   provenant    de
  /usr/include/shadow/shadow.h:

  ______________________________________________________________________
  struct spwd
  {
    char *sp_namp;         /* nom de login */
    char *sp_pwdp;         /* mot de passe encode */
    sptime sp_lstchg;      /* date de la derniere modification */
    sptime sp_min;         /* nombre de jours minimum entre les modifs */
    sptime spmax;          /* nombre de jours maximum entre les modifs*/
    sptime sp_warn;        /* nombre de jours de warning avant l'expiration
                              du mot de passe */
    sptime sp_inact;       /* nombre de jours d'utilisation du compte
                              apres l'expiration. */
    sptime sp_expire;      /* nombre de jours a partir du 01/01/70 jusqu'a
                                 l'expiration du compte */
    unsigned long sp_flag; /* reserve pour une utilisation future */
  };
  ______________________________________________________________________

  L'_e_n_s_e_m_b_l_e  _s_h_a_d_o_w peut placer des donnees dans le champ sp_pwdp juste
  apres le mot de passe encode, le champ password pourrait contenir:

       username:Npge08pfz4wuk;@/sbin/extra:9479:0:10000::::

  Cela signifie qu'en plus du mot de  passe,  le  programme  /sbin/extra
  sera  appele  pour  proceder a une authentification supplementaire. Le
  programme appele recevra comme argument, le nom  d'utilisateur  et  un
  _s_w_i_t_c_h  qui  indiquera  pourquoi  il  est  appele. Regardez le fichier
  /usr/include/shadow/pwauth.h et le code source de pwauth.c  pour  plus
  d'informations.

  La  fonction  d'authentification pwauth est toujours utilisee avant la
  deuxieme authentification..

  88..44..  LLeess ffoonnccttiioonnss SShhaaddooww..

  Le fichier  shadow.h  contient  aussi  la  declaration  des  fonctions
  contenues dans la bibliotheque libshadow.a:

  ______________________________________________________________________
  extern void setspent __P ((void));
  extern void endspent __P ((void));
  extern struct spwd *sgetspent __P ((__const char *__string));
  extern struct spwd *fgetspent __P ((FILE *__fp));
  extern struct spwd *getspent __P ((void));
  extern struct spwd *getspnam __P ((__const char *__name));
  extern int putspent __P ((__const struct spwd *__sp, FILE *__fp));
  ______________________________________________________________________

  La  fonction  que  nous allons etudier est getspnam, elle recupere une
  structure spwd a partir d'un nom donne.

  88..55..  EExxeemmppllee

  Voici un exemple d'ajout du support  shadow  a  un  programme  qui  en
  necessite mais pour qui ce support n'existe pas par defaut.

  Nous  allons nous baser sur l'exemple du serveur pppd-1.2.1d ( _S_e_r_v_e_u_r
  _P_o_i_n_t_-_t_o_-_P_o_i_n_t _p_r_o_t_o_c_o_l) configure avec l'option _l_o_g_i_n: il va chercher
  les  mots  de  passe  pour  son  authentification  PAP dans le fichier
  /etc/passwd au lieu des fichiers PAP ou CHAP. Vous n'avez  pas  besoin
  d'ajouter ce code a pppd-2.2.0, c'est deja fait.

  Bien  que cette possibilite de pppd ne soit pas tres utilisee, elle ne
  fonctionnera plus des lors que vous aurez installe l'ensemble  shadow:
  les mots de passe ne sont plus stockes dans /etc/passwd.

  La  partie  du  code  source  d'authentification des utilisateurs avec
  pppd-1.2.1d        se       trouve       dans        le        fichier
  /usr/src/pppd-1.2.1d/pppd/auth.c.

  Le  code  qui  suit  doit  etre ajoute au debut du fichier, la ou sont
  toutes les autres directives #include.

  ______________________________________________________________________
  #ifdef HAS_SHADOW
  #include <shadow.h>
  #include <shadow/pwauth.h>
  #endif
  ______________________________________________________________________

  Maintenant, il faut modifier le code actuel. Nous sommes toujours avec
  le fichier auth.c.

  La fonction auth.c avant les modifications:

  ______________________________________________________________________
  /*
   * login - Controle le nom d'utilisateur et le mot de passe par rapport
   * a ceux stockes sur le systeme.
   * Accepte la connection si l'utilisateur est OK.
   *
   * retourne:
   *      UPAP_AUTHNAK: Connection refusee.
   *      UPAP_AUTHACK: Connection Acceptee.
   * Dans un cas comme dans l'autre, msg pointe sur le message approprie.
   */
  static int
  login(user, passwd, msg, msglen)
      char *user;
      char *passwd;
      char **msg;
      int *msglen;
  {
      struct passwd *pw;
      char *epasswd;
      char *tty;

      if ((pw = getpwnam(user)) == NULL) {
          return (UPAP_AUTHNAK);
      }
       /*
       * XXX Si il n'y a pas de mots de passe, accepte la connection.
       */
      if (pw->pw_passwd == '\0') {
          return (UPAP_AUTHACK);
      }

      epasswd = crypt(passwd, pw->pw_passwd);
      if (strcmp(epasswd, pw->pw_passwd)) {
          return (UPAP_AUTHNAK);
      }

      syslog(LOG_INFO, "user %s logged in", user);

      /*
       * Ecris une entree wtmp pour cet utilisateur.
       */
      tty = strrchr(devname, '/');
      if (tty == NULL)
          tty = devname;
      else
          tty++;
      logwtmp(tty, user, "");    /* Ajoute une entree wtmp de connection */
      logged_in = TRUE;

      return (UPAP_AUTHACK);
  }
  ______________________________________________________________________

  Le  mot  de passe de l'utilisateur est place dans pw->pw_passwd, donc,
  nous devons ajouter la fonction getspnam qui placera le mot  de  passe
  dans spwd->sp_pwdp.

  Nous  rajouterons la fonction pwauth pour l'authentification actuelle.
  Une seconde authentification sera effectuee si le fichier  shadow  est
  configure pour.

  Voici  la  fonction  auth.c apres les modifications pour le support de
  shadow:

  ______________________________________________________________________
  /*
   * login - Controle le nom d'utilisateur et le mot de passe par rapport
   * a ceux stockes sur le systeme.
   * Accepte la connection si l'utilisateur est OK.
   *
   * Cette fonction a ete modifiee pour etre compatible avec les mots de
   * passe Shadow Linux si USE_SHADOW a ete defini
   *
   * retourne:
   *      UPAP_AUTHNAK: Connection refusee.
   *      UPAP_AUTHACK: Connection Acceptee.
   * Dans un cas comme dans l'autre, msg pointe sur le message approprie.
   */

  static int
  login(user, passwd, msg, msglen)
      char *user;
      char *passwd;
      char **msg;
      int *msglen;
  {
      struct passwd *pw;
      char *epasswd;
      char *tty;

  #ifdef USE_SHADOW
      struct spwd *spwd;
      struct spwd *getspnam();
  #endif

      if ((pw = getpwnam(user)) == NULL) {
          return (UPAP_AUTHNAK);
      }

  #ifdef USE_SHADOW
      if ((spwd = getspnam(user)) == NULL) {
             pw->pw_passwd = "";
      } else {
      pw->pw_passwd = spwd->sp_pwdp;
      }
  #endif

       /*
       *  XXX Si il n'y a pas de mots de passe, accepte la connection.
       */
      if (pw->pw_passwd == '\0') {
          return (UPAP_AUTHNAK);
      }
  #ifdef HAS_SHADOW
      if ((pw->pw_passwd && pw->pw_passwd[0] == '@'
           && pw_auth (pw->pw_passwd+1, pw->pw_name, PW_LOGIN, NULL))
          || !valid (passwd, pw)) {
          return (UPAP_AUTHNAK);
      }
  #else
      epasswd = crypt(passwd, pw->pw_passwd);
      if (strcmp(epasswd, pw->pw_passwd)) {
          return (UPAP_AUTHNAK);
      }
  #endif

      syslog(LOG_INFO, "user %s logged in", user);

      /*
       * Ecris une entree wtmp pour cet utilisateur.
       */
      tty = strrchr(devname, '/');
      if (tty == NULL)
          tty = devname;
      else
          tty++;
      logwtmp(tty, user, "");     /* Ajoute une entree wtmp de connection  */
      logged_in = TRUE;

      return (UPAP_AUTHACK);
  }
  ______________________________________________________________________

  En  examinant  precisement  le  code,   vous   verrez   que   d'autres
  modifications  ont  ete  effectuees.  La  version originale autorisait
  l'acces (en retournant UPAP_AUTHACK) quand il n'y avait pas de mots de
  passe  dans  le  fichier  passwd.  Il  ne fallait _p_a_s laisser ceci car
  utilise avec l'option login, pppd utilise le  nom  d'utilisateur  dans
  /etc/passwd   et   le   mot   de   passe  dans  /etc/shadow  pour  son
  authentification PAP.

  Donc si nous avions garde la version originale, n'importe  qui  aurait
  pu etablir une connexion ppp avec un mot de passe vide.

  Nous  avons  arrange  ca  en  retournant  UPAP_AUTHNAK  a  la place de
  UPAP_AUTHACK dans le cap ou le champ mot de passe est vide.

  A savoir que pppd-2.2.0 possede le meme probleme.

  Nous devons modifier le Makefile pour que deux choses soient prises en
  compte:  USE_SHADOW  doit etre defini, et libshadow.a doit etre ajoute
  au processus d'edition de liens.

  Editez le Makefile, et ajoutez:

       LIBS = -shadow

  Alors, trouvez la ligne:

       COMPILE_FLAGS = -I.. -D_linux_=1 -DGIDSET_TYPE=gid_t

  et replacez-la par:

       COMPILE_FLAGS = -I.. -D_linux_=1 -DGIDSET_TYPE=gid_t -DUSE_SHADOW

  Maintenant, lancez make et installez.

  99..  FFooiirree AAuuxx QQuueessttiioonnss

  _Q_: J'essaye de controler sur quel terminal root peut se  connecter  en
  utilisant  /etc/securettys,  mais  il semble que cela ne marcher plus.
  Qu'arrive-t-il ?

  _R_: Les fichier /etc/securettys ne  fait  absolument  rien  lorsque  la
  _S_u_i_t_e  _S_h_a_d_o_w  est installee. Le terminal a partir duquel root peut se
  connecter  et  maintenant  situe  dans  le  fichier   /etc/login.defs.
  L'entree dans ce fichier peut pointer sur un autre fichier.

  _Q_:  J'ai  installe la _S_u_i_t_e _S_h_a_d_o_w, mais je ne peux plus me connecter,
  qu'ai-je oublie ?

  _R_: Vous avez probablement installe les programmes,  mais  vous  n'avez
  tres  certainement  pas  execute  pwconv  ou  bien vous avez oublie de
  copier le fichier /etc/npasswd vers le fichier /etc/passwd  ainsi  que
  le  fichier  /etc/nshadow  vers  le  fichier /etc/shadow. De plus vous
  aurez besoin de placer le fichier login.defs dans le repertoire /etc/.

  _Q_:  Dans  la  section  sur  xlock, il est dit de positionner le groupe
  propietaire du fichier /etc/shadow a shadow. Je  n'ai  pas  de  groupe
  shadow, comment je fais ?

  _R_:  Vous pouvez en ajouter un. Editez simplement le fichier /etc/group
  et inserez une ligne pour le groupe shadow. Vous  devez  vous  assurer
  que le numero du groupe n'est pas deja utilise par un autre groupe, de
  plus vous devez l'inserer avant l'entree nogroup. Ou bien vous  pouvez
  positionner le bit suid du programme xlock a root.

  _Q_:  Y-a-t'il  une  liste de diffusion pour la suite Shadow password de
  Linux ?

  _R_: Oui, mais c'est  pour  le  developpement  et  les  tests  des  beta
  versions  de  la prochaine Suite Shadow pour Linux. Vous pouvez vous y
  inscrire    en    envoyant     un     courrier     a:     shadow-list-
  request@neptune.cin.net  avec  pour  sujet  subscribe.  La  liste  est
  actuellement en cours de discussion a propos des parutions des  series
  shadow-AAMMJJ.  Vous  devriez  vous  inscrire  si  vous souhaitez vous
  investir dans le developpement ou bien si vous  venez  d'installer  la
  suite  sur  votre systeme et que vous souhaitez vous tenir informe des
  nouvelles parutions.

  _Q_: J'ai installe la _S_u_i_t_e _S_h_a_d_o_w, mais lorsque j'utilise  la  commande
  userdel,  j'obtiens,  ``_u_s_e_r_d_e_l_:  _c_a_n_n_o_t  _o_p_e_n  _s_h_a_d_o_w  _g_r_o_u_p  _f_i_l_e_'_',
  qu'est-ce que j'ai fait de travers ?

  _R_: Vous avez compile la suite avec l'option SHADOWGRP de valide,  mais
  vous  ne  possedez  pas  de  fichier  /etc/gshadow.  Vous  avez besoin
  d'editer le fichier config.h et de recompiler la suite. Allez voir  la
  section sur les groupes shadow.

  _Q_:  J'ai  installe  la  _S_u_i_t_e _S_h_a_d_o_w mais je retrouve des mot de passe
  encodes dans mon fichier /etc/passwd, qu'est-ce qui ne va pas ?

  _R_: Soit vous avez compile la suite avec l'option AUTOSHADOW du fichier
  config.h,  soit votre libc a ete compilee avec l'option SHADOW_COMPAT.
  Vous devez determiner quel est votre probleme et recompilez.

  1100..  CCooppyyrriigghhtt..

  La version originale de ce document est placee sous copyright (c) 1996
  de Michael H. Jackson.

  Ce  document  peut  etre reproduit et distribue en tout ou partie, sur
  tout support physique ou electronique, a condition  que  cette  notice
  soit incluse dans chacune des copies.

  Il  est  permis  de  copier et distribuer des versions modifiees de ce
  document dans les conditions ci-dessus.  Une  notice  doit  apparaitre
  specifiant bien qu'il s'agit d'une version modifiee.

  Il  est  permis  de  copier  et distribuer des versions traduites dans
  d'autres langues, dans les conditions generales citees precedemment.

  Il est permis de diffuser ce document sous un autre support selon  les
  clauses  stipulees  plus  haut  concernant  les  versions modifiees du
  document, et sous reserve que celle  specifiant  la  disponibilite  du
  code source soit remplie sous la forme d'une reference evidente sur ce
  code dans ce nouveau support. Le proprietaire du copyright se  reserve
  le  droit  de  trancher  lorsqu'il  y  a  le  moindre  doute sur cette
  definition "d'evidence".

  1111..  DDiivveerrss eett RReemmeerrcciieemmeennttss

  Les exemples  de  code  pour  auth.c  proviennent  de  pppd-1.2.1d  et
  ppp-2.1.0e,  Copyright  (c) 1993 de l'Universite Nationale D'Australie
  et Copyright (c) 1989 de Universite Carnegie Mellon.

  Merci a Marek Michalkiewicz  <marekm@il7linuxb.ists.pwr.wroc.pl>  pour
  ecrire  et  maintenir  la  _S_u_i_t_e  _S_h_a_d_o_w _p_o_u_r _L_i_n_u_x ainsi que pour ses
  commentaires sur ce document.

  Merci a Ron Tidd <rtidd@tscnet.com> pour  sa  precieuse  aide  et  ses
  tests.

  Merci  a  tous  ceux  qui m'ont envoye des commentaires qui ont permis
  d'ameliorer ce document.

  S'il vous plait, si vous avez des  suggestions  ou  des  commentaires,
  envoyez-moi un courrier.

  amities

  Mickael H. Jackson <mhjack@tscnet.com>

  HOWTO sur la publication de logiciels
  Eric S. Raymond <esr@thyrsus.com> Traduction par Thierry
  Bzecourt <thbzcrt@worldnet.fr>
  2.0, 18 septembre 1999

  Ce HOWTO dcrit des mthodes de publication de logiciel convenant 
  des projets de logiciel libre pour Linux. En adoptant ces rgles, vous
  permettrez  vos utilisateurs de compiler votre code et de l'utiliser
  plus facilement, et  d'autres dveloppeurs de mieux le comprendre et
  de vous aider  l'amliorer.  Ce document est  lire absolument par
  les dveloppeurs dbutants. Ceux qui ont plus d'exprience devraient
  le parcourir  nouveau au moment de publier un nouveau projet. Il sera
  mis  jour priodiquement afin de reflter l'volution des rgles de
  bonne pratique.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Raison d'tre de ce document
     1.2 Nouvelles versions de ce document

  2. Rgles d'usage pour le nommage de votre projet et de votre archive

     2.1 Utilisez le style de nommage GNU, avec un prfixe suivi d'un numrotage du type majeur.mineur.patch.
     2.2 Mais respectez le cas chant les conventions locales
     2.3 Choisissez avec le plus grand soin un prfixe unique et facile  taper

  3. Rgles d'usage pour la licence et le copyright : la thorie

     3.1 Les logiciels  code ouvert et le copyright
     3.2 Dterminer ce qui peut tre qualifi comme logiciel  code ouvert

  4. Rgles d'usage pour la licence et le copyright : la pratique

     4.1 Donnez le copyright  vous-mme ou  la FSF
     4.2 Choisissez une licence conforme  l'Open Source Definition
     4.3 N'crivez pas votre propre licence si vous pouvez l'viter.

  5. Rgles d'usage du dveloppement

     5.1 Ecrivez soit en C ANSI pur, soit dans un langage de script portable
     5.2 Respectez les rgles de portabilit du C
     5.3 Utilisez autoconf/automaker/autoheader
     5.4 Soignez la rigueur de votre code avant chaque nouvelle version

  6. Rgles d'usage pour la mise au point de la distribution

     6.1 Assurez-vous que vos archives se dcompactent toujours dans un rpertoire nouveau et unique.
     6.2 Ecrivez un README
     6.3 Adoptez les conventions courantes de nommage des fichiers
     6.4 Fournissez des RPM

  7. Comment communiquer

     7.1 Faites une annonce dans c.o.l.a
     7.2 Faites une annonce dans un forum de discussion adquat
     7.3 Ayez un site Web
     7.4 Hbergez des listes de diffusion pour votre projet
     7.5 Publiez dans les archives les plus importantes

  8. La bonne gestion d'un projet


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  11..11..  RRaaiissoonn dd''ttrree ddee ccee ddooccuummeenntt

  Un vaste ensemble de traditions relatives au dveloppement de
  logiciels libres permet  d'autres personnes de porter le code plus
  facilement, de l'utiliser et de participer  son dveloppement.
  Certaines de ces conventions sont des traditions du monde Unix
  antrieures  Linux ; d'autres ont t suscites rcemment par
  l'apparition de nouveaux outils et de nouvelles technologies comme le
  World Wide Web.

  Ce document vous aidera  acqurir ces rgles d'usage. Il se compose
  de plusieurs sections thmatiques, chacune contenant une liste de
  points  vrifier. Considrez que ces sections sont pour votre
  distribution comme la liste de contrle qu'un pilote d'avion vrifie
  avant le dcollage.


  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Ce document sera envoy chaque mois dans le forum de discussion
  comp.os.linux.answers . Ce document est archiv sur plusieurs sites
  FTP Linux, dont metalab.unc.edu dans le rpertoire
  pub/Linux/docs/HOWTO.

  Vous pouvez aussi voir la dernire version, en anglais, de ce HOWTO
  sur le World Wide Web  l'URL
  <http://metalab.unc.edu/LDP/HOWTO/Software-Release-Practice.html>. La
  version franaise est disponible  l'adresse
  <http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/fr>.

  Vous pouvez envoyer vos questions et vos commentaires sur ce HOWTO 
  Eric S. Raymond, esr@snark.thyrsus.com <mailto:esr@snark.thyrsus.com>.


  22..  RRgglleess dd''uussaaggee ppoouurr llee nnoommmmaaggee ddee vvoottrree pprroojjeett eett ddee vvoottrree aarrcchhiivvee

  Au fur et  mesure que s'accrot la charge de travail des
  gestionnaires d'archives comme Metalab, le site PSA ou le CPAN, les
  soumissions sont de plus en plus souvent traites, en tout ou en
  partie, par des programmes (et non en totalit par des humains).

  Il est donc trs important que le nom de votre projet et celui de
  votre fichier d'archive suivent des rgles prcises, afin que des
  programmes informatiques puissent les analyser et les comprendre.


  22..11..  nnuummrroottaaggee dduu ttyyppee mmaajjeeuurr..mmiinneeuurr..ppaattcchh..  UUttiilliisseezz llee ssttyyllee ddee
  nnoommmmaaggee GGNNUU,, aavveecc uunn pprrffiixxee ssuuiivvii dd''uunn

  Vous faciliterez la vie  tout le monde en donnant  vos archives des
  noms dans le style GNU : un prfixe-racine alphanumrique tout en
  minuscules, suivi par un tiret, puis un numro de version, une
  extension et d'autres suffixes.

  Supposons que vous ayez un projet nomm "toto", qui en est  la
  version 1, mise  jour 2, niveau 3. S'il est compos d'une seule
  archive (sans doute le code source), voici  quoi devrait ressembler
  son nom :



     ttoottoo--11..22..33..ttaarr..ggzz
        L'archive des sources


     ttoottoo..llssmm
        Le fichier LSM (si vous l'envoyez  Metalab).


  N'utilisez _p_a_s les noms suivants :


     ttoottoo112233..ttaarr..ggzz
        Beaucoup de programmes croiront qu'il s'agit du fichier
        d'archive d'un projet nomm `toto123', sans numro de version.


     ttoottoo11..22..33..ttaarr..ggzz
        Beaucoup de programmes croiront qu'il s'agit de l'archive d'un
        projet nomm `toto1'  la version 2.3.


     ttoottoo--vv11..22..33..ttaarr..ggzz
        Beaucoup de programmes prendront cela pour un projet nomm
        `toto-v1'.


     ttoo__ttoo--11..22..33..ttaarr..ggzz
        Le caractre soulign est difficile  prononcer,  taper, et 
        retenir.


     TTooTToo--11..22..33..ttaarr..ggzz
        A moins que vous vouliez _v_r_a_i_m_e_n_t ressembler  un accroc du
        marketing. L encore, c'est difficile  prononcer,  taper et 
        retenir.

  Si vous voulez faire sparment une archive de sources et une archive
  de binaires, ou diffrentes archives de binaires, ou encore indiquer
  un certain type d'option de compilation dans le nom de l'archive,
  rajoutez pour cela une extension _a_p_r__s le numro de version. Voici
  quelques exemples :


     ttoottoo--11..22..33..ssrrcc..ttaarr..ggzz
        sources


     ttoottoo--11..22..33..bbiinn..ttaarr..ggzz
        binaires, type non spcifi


     ttoottoo--11..22..33..bbiinn..EELLFF..ttaarr..ggzz
        binaires ELF


     ttoottoo--11..22..33..bbiinn..EELLFF..ssttaattiicc..ttaarr..ggzz
        binaires ELF lis statiquement


     ttoottoo--11..22..33..bbiinn..SSPPAARRCC..ttaarr..ggzz
        binaires pour SPARC

  N'utilisez _p_a_s des noms comme `toto-ELF.1.2.3.tar.gz', car les
  programmes ont beaucoup de mal  sparer un infixe (tel que `ELF') de
  la racine du mot.

  Un bon schma de nommage gnrique contient, dans l'ordre, les parties
  suivantes :


  1. prfixe du projet

  2. tiret

  3. numro de version

  4. point

  5. "src" ou "bin" (optionnel)

  6. point ou tiret (un point de prfrence)

  7. type de binaire et options (optionnel)

  8. extensions relatives au mode d'archivage et de compression


  22..22..  MMaaiiss rreessppeecctteezz llee ccaass cchhaanntt lleess ccoonnvveennttiioonnss llooccaalleess

  Certains projets ou communauts ont des conventions bien tablies pour
  les noms et les numros de version, et ces conventions ne sont pas
  toujours compatibles avec les conseils qui prcdent. Par exemple, les
  modules Apache ont en gnral des noms du genre mod_foo, et ils ont 
  la fois un numro de version propre et le numro de la version
  d'Apache avec laquelle ils fonctionnent. De mme, les numros de
  version des modules Perl peuvent tre traits comme des nombres
  dcimaux (par exemple, vous pouvez voir 1,303  la place de 1.3.3), et
  les distributions s'appellent en gnral Foo-Bar-1.303.tar.gz pour la
  version 1.303 du module Foo::Bar.

  Apprenez et respectez les conventions des communauts et dveloppeurs
  spcialiss ; suivez les rgles ci-dessus dans le cas gnral.

  22..33..  ttaappeerr CChhooiissiisssseezz aavveecc llee pplluuss ggrraanndd ssooiinn uunn pprrffiixxee uunniiqquuee eett
  ffaacciillee 

  Le prfixe-racine devrait tre le mme pour tous les fichiers d'un
  projet, et il devrait tre facile  lire,  taper et  retenir.
  N'utilisez pas le caractre "soulign". Et ne mettez pas de majuscules
  ou de MajusculesIntrieures sans une trs bonne raison -- cela drange
  le trajet naturel de l'oeil humain, et vous aurez l'air de faire du
  marketing.

  C'est difficile de s'y retrouver lorsque deux projets ont le mme nom.
  Assurez-vous donc, dans la mesure du possible, qu'il n'y a pas de
  conflit de nommage avant de publier votre premire version. Un bon
  endroit pour le vrifier est l'index de Metalab
  <http://metalab.unc.edu/pub/Linux>.


  33..  RRgglleess dd''uussaaggee ppoouurr llaa lliicceennccee eett llee ccooppyyrriigghhtt :: llaa tthhoorriiee

  La licence que vous choisissez dfinit le contrat social que vous
  souhaitez mettre en place avec vos co-dveloppeurs et vos
  utilisateurs. Le copyright que vous mettez sur le logiciel sert
  principalement de dclaration lgale de votre droit  fixer les termes
  de la licence sur le logiciel et sur les oeuvres qui en sont drives.





  33..11..  LLeess llooggiicciieellss  ccooddee oouuvveerrtt eett llee ccooppyyrriigghhtt

  (Note du traducteur : dans cette section comme dans celles qui
  suivent, l'expression "(logiciel ) code ouvert" est utilise pour
  traduire l'anglais "open source", tandis que l'expression habituelle
  "logiciel libre" sert  transcrire "free software")

  Tout ce qui n'appartient pas au domaine public possde un copyright,
  voire plusieurs. Selon la Convention de Berne (qui a force de loi aux
  Etats-Unis depuis 1978), le copyright n'a pas besoin d'tre explicite.
  C'est--dire que les auteurs d'une oeuvre sont dtenteurs du copyright
  mme s'il n'y a pas de note de copyright.


  Il peut tre trs difficile de dterminer qui peut tre compt comme
  un auteur, surtout lorsque de nombreuses mains ont travaill sur le
  logiciel. C'est ce qui fait l'importance des licences. En prcisant
  les conditions dans lesquelles l'oeuvre peut tre utilise, elles
  donnent aux utilisateurs des droits qui les protgent des actions
  arbitraires que pourraient entreprendre les dtenteurs du copyright.


  Dans le logiciel propritaire, les termes de la licence sont formuls
  de manire  protger le copyright. Ils permettent de donner quelques
  droits aux utilisateurs tout en assurant au propritaire (le dtenteur
  du copyright) la plus grande possibilit d'action possible sur le plan
  lgal. Le dtenteur du copyright a une grande importance, et la
  licence est tellement restrictive dans l'esprit que les dtails
  techniques de ses termes sont gnralement sans importance.

  Dans le logiciel  code ouvert, la situation est souvent exactement
  inverse ; le copyright existe pour protger la licence. Les seuls
  droits qui sont toujours conservs au dtenteur du copyright sont ceux
  qui permettent de renforcer la licence. Parmi les autres droits, un
  petit nombre seulement sont rservs, et c'est l'utilisateur qui a la
  plus grande libert. En particulier, le dtenteur du copyright ne peut
  pas modifier la licence sur une copie que vous possdez dj. Par
  consquent, le dtenteur du copyright dans les logiciels  code ouvert
  n'a presque aucune importance -- contrairement aux termes de la
  licence.

  Normalement, le dtenteur du copyright sur un projet est le
  responsable actuel du projet ou une organisation mcne. Le changement
  de responsable  la tte d'un projet se manifeste souvent par la
  modification du copyright. Toutefois ce n'est pas une rgle absolue ;
  dans de nombreux projets  code source ouvert, le copyright revient 
  de multiples personnes, et il n'y a pas de cas connu o cela ait
  entran des complications sur le plan lgal.

  Certains projets choisissent de donner le copyright  la Free Software
  Foundation, avec l'ide que cette fondation a un intrt dans la
  dfense du logiciel  code ouvert, et possde les avocats pour s'en
  occuper.


  33..22..  oouuvveerrtt DDtteerrmmiinneerr ccee qquuii ppeeuutt ttrree qquuaalliiffii ccoommmmee llooggiicciieell 
  ccooddee

  En ce qui concerne la licence, on peut distinguer plusieurs sortes de
  droits transfrables via une licence. Les droits de _c_o_p_i_e _e_t
  _r_e_d_i_s_t_r_i_b_u_t_i_o_n, les droits d'_u_t_i_l_i_s_a_t_i_o_n, les droits de _m_o_d_i_f_i_c_a_t_i_o_n _
  _u_s_a_g_e _p_e_r_s_o_n_n_e_l et les droits de _r_e_d_i_s_t_r_i_b_u_t_i_o_n _d_e _c_o_p_i_e_s _m_o_d_i_f_i__e_s.
  Une licence peut restreindre chacun de ces droits ou les accompagner
  de conditions.


  L'Open Source Initiative <http://www.opensource.org> est le rsultat
  d'un important effort de rflexion sur ce qui fait un ``logiciel 
  code ouvert'' ou (dans une terminologie plus ancienne) un ``logiciel
  libre''. L'association place les contraintes suivantes sur les
  licences :


  1. Un droit de copie illimit doit tre accord.

  2. Un droit d'utilisation illimit doit tre accord.

  3. Un droit de modication illimit pour utilisation personnelle doit
     tre accord.

  Ces rgles proscrivent les restrictions sur la redistribution de
  binaires modifis ; cela correspond aux besoins des distributeurs de
  logiciels,  qui il faut pouvoir livrer sans entraves du code en tat
  de marche. Cela permet aux auteurs de demander que le code source
  modifi soit redistribu sous la forme du code source original plus
  des patchs, ce qui fait apparatre les intentions de l'auteur et, dans
  un``suivi d'audit'', toutes les modifications faites par d'autres
  personnes.

  L'OSD est la dfinition lgale de la marque de certification `OSI
  Certified Open Source', et vaut toutes les dfinitions qu'on a pu
  faire du ``logiciel libre''. Toutes les licences courantes (MIT, BSD,
  Artistic et GPL/LGPL) la vrifient (encore que certaines, comme la
  GPL, ajoutent d'autres restrictions que vous devriez comprendre avant
  de les adopter).

  Notez que les licences n'autorisant qu'un usage non commercial ne
  peuvent _p_a_s tre qualifies de licences  code ouvert, mme si elles
  affichent la licence ``GPL'' ou quelque autre licence courante. Elles
  font de la discrimination envers des occupations, des personnes et des
  groupes particuliers. Elles rendent la vie trop complique aux
  distributeurs de CD-ROM et aux autres personnes qui essaient de
  diffuser commercialement les logiciels  code ouvert.


  44..  RRgglleess dd''uussaaggee ppoouurr llaa lliicceennccee eett llee ccooppyyrriigghhtt :: llaa pprraattiiqquuee

  Voici comment appliquer dans la pratique la thorie qui prcde :


  44..11..  DDoonnnneezz llee ccooppyyrriigghhtt  vvoouuss--mmmmee oouu  llaa FFSSFF

  Dans certains cas, si vous avez derrire vous une organisation mcne
  qui possde des avocats, vous pouvez choisir de donner le copyright 
  cette organisation.


  44..22..  CChhooiissiisssseezz uunnee lliicceennccee ccoonnffoorrmmee  ll''OOppeenn SSoouurrccee DDeeffiinniittiioonn

  L'Open Source Definition (Dfinition du Code Ouvert) est la rgle d'or
  pour les licences. L'OSD n'est pas une licence en soi ; elle dfinit
  plutt un ensemble minimal de droits qu'une licence doit garantir afin
  d'tre considre comme une licence  code ouvert. On peut trouver
  L'OSD, avec des documents complmentaires, sur le site Web de l'Open
  Source Initiative <http://www.opensource.org>.


  44..33..  NN''ccrriivveezz ppaass vvoottrree pprroopprree lliicceennccee ssii vvoouuss ppoouuvveezz ll''vviitteerr..

  Les licences compatibles  l'OSD et connues de tous ont des traditions
  d'interprtation bien tablies. Les dveloppeurs (et, dans la mesure
  o ils s'y intressent, les utilisateurs) savent ce qui en dcoule, et
  mesurent les risques et les inconvnients qu'elles comportent. Par
  consquent, utilisez si possible l'une des licences standards sur le
  site OSI.

  Si vous devez crire votre propre licence, prenez soin de la faire
  certifier par l'OSI. Cela vous pargnera de nombreuses discussions et
  des cots importants. Si vous n'tes jamais pass par l, vous ne
  pouvez pas imaginer pas  quel point un dbat sur les licences peut
  tourner au vinaigre ; les gens s'enflamment, parce que les licences
  sont considres comme des pactes presque sacrs qui touchent aux
  valeurs essentielles de la communaut des logiciels ouverts.

  De plus, l'existence d'une tradition d'interprtation bien tablie
  pourrait se rvler importante si un jour votre licence faisait
  l'objet d'un procs. A la date o on crit ces lignes (septembre
  1999), il n'y a pas d'exemple de dcision judiciaire qui ait confirm
  ou invalid une licence de logiciel  code ouvert. Toutefois, c'est un
  principe de droit (au moins aux Etats-Unis, et sans doute dans
  d'autres pays de droit coutumier comme l'Angleterre et le reste du
  Commonwealth) que les cours de justice doivent interprter les
  licences et les contrats en fonction des attentes et des pratiques de
  la communaut qui les a produits.


  55..  RRgglleess dd''uussaaggee dduu ddvveellooppppeemmeenntt

  La plupart de ces rgles visent  assurer la portabilit, non
  seulement entre les diffrentes distributions de Linux, mais aussi
  avec d'autres varits d'Unix. La portabilit vers Unix n'est pas
  seulement une question de professionnalisme ou de savoir-vivre entre
  programmeurs, c'est aussi une assurance non ngligeable contre les
  volutions futures de Linux lui-mme.

  D'autres personnes finiront par essayer de compiler votre code dans
  d'autres environnements que Linux ; avec la portabilit, vous recevrez
  moins de messages ennuyeux de la part d'utilisateurs perplexes.


  55..11..  EEccrriivveezz ssooiitt eenn CC AANNSSII ppuurr,, ssooiitt ddaannss uunn llaannggaaggee ddee ssccrriipptt
  ppoorrttaabbllee

  Pour des raisons de portabilit et de stabilit, il est fortement
  recommand d'crire soit en C ANSI pur, soit dans un langage de script
  dont la portabilit soit garantie par une implmentation multi-
  plateforme unique.

  Parmi les langages de script, Python, Perl, Tcl et Emacs Lisp
  respectent ce critre. Le bon vieux shell _n_e _c_o_n_v_i_e_n_t _p_a_s ; il existe
  trop d'implmentations diffrentes, chacune ayant des particularits
  subtiles, et l'environnement du shell est souvent transform de
  manire imprvisible par des configurations propres  chaque
  utilisateur, comme les alias.

  Java promet beaucoup sur le plan de la portabilit, mais les
  implmentations disponibles sur Linux sont encore sommaires et mal
  intgres dans le systme d'exploitation. Java est encore un choix
  exotique, bien qu'il ait de fortes chances de gagner en popularit
  lorsqu'il aura plus de maturit.


  55..22..  RReessppeecctteezz lleess rrgglleess ddee ppoorrttaabbiilliitt dduu CC

  Si vous crivez en C, n'hsitez pas  utiliser  fond les
  fonctionnalits dcrites dans la norme ANSI -- y compris les
  prototypes de fonction, qui vous aideront  reprer les incohrences
  entre modules. Les compilateurs du type K&R relvent du pass.
  En revanche, ne supposez _p_a_s que certaines caractristiques
  spcifiques  GCC comme l'option `-pipe' ou les fonctions imbriques
  sont disponibles. Cela vous poursuivra et vous vous en repentirez le
  jour o quelqu'un portera votre logiciel vers un systme autre que
  Linux, et dpourvu de GCC.


  55..33..  UUttiilliisseezz aauuttooccoonnff//aauuttoommaakkeerr//aauuttoohheeaaddeerr

  Si vous crivez en C, utilisez autoconf/automaker/autoheader pour
  assurer la portabilit, vrifier la configuration du systme et
  affiner vos makefiles. De nos jours, les gens qui compilent  partir
  des sources s'attendent  devoir juste taper "configure; make" et que
  tout se compile proprement - sans la moindre erreur.


  55..44..  SSooiiggnneezz llaa rriigguueeuurr ddee vvoottrree ccooddee aavvaanntt cchhaaqquuee nnoouuvveellllee vveerrssiioonn

  Si vous crivez en C, faites une compilation de test avec l'option
  -Wall et corrigez les erreurs rsultantes, au moins une fois avant
  chaque nouvelle version. On trouve comme cela un nombre surprenant
  d'erreurs. Pour tre vraiment complet, compilez aussi avec l'option
  -pedantic.

  Si vous crivez en Perl, vrifiez votre code avec perl -c (voire -T
  dans les cas adquats). Utilisez perl -w 'use strict' religieusement
  (consultez la documentation de Perl pour plus d'informations).


  66..  RRgglleess dd''uussaaggee ppoouurr llaa mmiissee aauu ppooiinntt ddee llaa ddiissttrriibbuuttiioonn

  Les indications qui suivent montrent  quoi votre distribution devrait
  ressembler lorsqu'on la rcupre et qu'on la dcompacte.


  66..11..  rrppeerrttooiirree nnoouuvveeaauu eett uunniiqquuee..  AAssssuurreezz--vvoouuss qquuee vvooss aarrcchhiivveess ssee
  ddccoommppaacctteenntt ttoouujjoouurrss ddaannss uunn

  L'erreur la plus agaante que font les dveloppeurs novices est de
  fabriquer des archives qui dcompactent les fichiers et rpertoires de
  la distribution dans le rpertoire courant, avec le risque d'craser
  des fichiers dj prsents. _N_e _f_a_i_t_e_s _j_a_m_a_i_s _c_e_l_a _!

  A la place, faites en sorte que les fichiers de vos archives partagent
  le mme rpertoire, avec un nom drivant de celui du projet. Ainsi,
  ils se placeront dans un seul rpertoire, juste _e_n_-_d_e_s_s_o_u_s du
  rpertoire courant.

  Voici un moyen de raliser cela dans un makefile, en supposant que le
  rpertoire de votre distribution est `toto' et que SRC est une
  variable contenant la liste des fichiers de votre distribution. Vous
  devez avoir GNU tar 1.13.


  VERS=1.0
  toto-$(VERS).tar.gz:
          tar --name-prefix='toto-$(VERS)/' -czf toto-$(VERS).tar.gz $(SRC)



  Si votre version de tar est plus ancienne, faites quelque chose dans
  ce genre :




  toto-$(VERS).tar.gz:
          @ls $(SRC) | sed s:^:toto-$(VERS)/: >MANIFEST
          @(cd ..; ln -s toto toto-$(VERS))
          (cd ..; tar -czvf toto/toto-$(VERS).tar.gz `cat toto/MANIFEST`)
          @(cd ..; rm toto-$(VERS))




  66..22..  EEccrriivveezz uunn RREEAADDMMEE

  Fournissez un fichier nomm README ou READ.ME, qui donne une vision
  d'ensemble de votre distribution. C'est une vieille convention, et
  c'est le premier fichier que l'intrpide explorateur lira aprs avoir
  extrait les sources (Note du traducteur : le fichier README, comme son
  nom l'indique, est crit en anglais afin d'tre lisible par le plus
  grand nombre de personnes possible. Vous pouvez aussi, si vous le
  jugez utile, fournir une traduction franaise dans un fichier nomm
  LISEZMOI, pour les utilisateurs francophones).

  Voici quelques lments qu'il est bon d'avoir dans un README :


    Une brve description du projet.

    Un lien vers le site Web du projet, le cas chant.

    Des indications sur l'environnement de compilation du dveloppeur
     et sur les possibles problmes de portabilit.

    Un plan d'ensemble des fichiers et sous-rpertoires importants.

    Les instructions de compilation et d'installation, ou bien un lien
     vers le fichier les contenant (habituellement INSTALL).

    Le nom des responsables et des contributeurs, ou un lien vers le
     fichier contenant ces noms (habituellement CREDITS).

    Les dernires nouvelles relatives au projet, ou un lien vers un
     fichier les contenant (habituellement NEWS).


  66..33..  AAddoopptteezz lleess ccoonnvveennttiioonnss ccoouurraanntteess ddee nnoommmmaaggee ddeess ffiicchhiieerrss

  Avant mme d'avoir regard le README, votre intrpide explorateur aura
  parcouru la liste des fichiers dans rpertoire principal de votre
  distribution. Ces noms, par eux-mmes, contiennent de l'information.
  En suivant certaines rgles de nommage, vous donnerez  l'explorateur
  de bons indices pour orienter son parcours.

  Voici quelques noms recommands pour les fichiers du rpertoire
  principal, avec leur signification. Tous ne sont pas indispensables
  dans chaque projet.


     RREEAADDMMEE oouu RREEAADD..MMEE
        le plan d'ensemble,  lire en premier


     IINNSSTTAALLLL
        instructions de configuration, de compilation et d'installation


     CCRREEDDIITTSS
        liste des contributeurs du projet

     NNEEWWSS
        dernires nouvelles


     HHIISSTTOORRYY
        histoire du projet


     CCOOPPYYIINNGG
        termes de la licence (convention GNU)


     LLIICCEENNSSEE
        termes de la licence


     MMAANNIIFFEESSTT
        liste des fichiers


     FFAAQQ
        Foire Aux Questions pour le projet, au format texte.


     TTAAGGSS
        Fichier de tags gnr automatiquement, pour tre utilis par
        Emacs ou vi

  Remarquez que la convention gnrale est que les fichiers dont le nom
  ne comporte que des majuscules sont des fichiers d'information sur le
  projet lui-mme, et ne sont pas des lments du systme  compiler.


  66..44..  FFoouurrnniisssseezz ddeess RRPPMM

  Le format standard de facto pour les distributions de binaires 
  installer est celui qu'utilise le Red Hat Package Manager, RPM. Il est
  prsent dans les distributions Linux les plus populaires, et il est
  support en pratique par toutes les autres (sauf Debian et Slackware ;
  et Debian peut faire des installations  partir de RPM).

  Par consquent, c'est une bonne ide de fournir sur le site de votre
  projet des RPM installables en mme temps qu'une archive des sources.

  C'est aussi une bonne ide d'inclure dans votre archive de sources le
  fichier de spcification du RPM, avec dans le Makefile une entre qui
  fabrique les RPM  partir de lui. Le fichier de spcification devrait
  avoir l'extension `.spec' ; c'est comme cela que l'option -t de rpm le
  trouve  l'intrieur de l'archive.

  Encore un point de style : gnrez votre fichier de spcification avec
  un script shell qui insre automatiquement le numro de version en
  analysant le Makefile ou un fichier version.h.


  77..  CCoommmmeenntt ccoommmmuunniiqquueerr

  Votre logiciel n'apportera pas grand-chose  l'univers si vous tes le
  seul  connatre son existence. De plus, en tablissant une prsence
  visible sur Internet pour votre projet, vous pourrez recruter plus
  facilement des utilisateurs et des co-dveloppeurs. On le fait
  habituellement comme ceci :




  77..11..  FFaaiitteess uunnee aannnnoonnccee ddaannss cc..oo..ll..aa

  Annoncez vos nouvelles versions dans comp.os.linux.announce
  <news:comp.os.linux.announce>. Non seulement ce forum est lu par un
  grand nombre de personnes, mais c'est aussi un fournisseur important
  pour des sites Web d'information comme Freshmeat
  <http://www.freshmeat.net>.


  77..22..  FFaaiitteess uunnee aannnnoonnccee ddaannss uunn ffoorruumm ddee ddiissccuussssiioonn aaddqquuaatt

  Trouvez un forum USENET dont le thme de discussion est directement
  concern par votre application, et faites-y aussi votre annonce.
  N'envoyez votre message qu'aux endroits o la _f_o_n_c_t_i_o_n remplie par
  votre logiciel est pertinente, et restez mesur.

  Si (par exemple) vous publiez un programme en Perl qui interroge des
  serveurs IMAP, vous devriez probablement envoyer un message dans
  comp.mail.imap. Mais srement pas dans comp.lang.perl,  moins que le
  programme utilise de manire instructive des techniques Perl avances.

  Votre annonce devrait aussi contenir l'URL du site Web de votre
  projet.


  77..33..  AAyyeezz uunn ssiittee WWeebb

  Si vous comptez tablir une communaut substantielle d'utilisateurs ou
  de dveloppeurs autour de votre projet, celui-ci devrait avoir son
  site Web. Voici des lments que l'on trouve habituellement sur un
  site Web :

    La charte du projet (pourquoi il existe, quelle est son audience,
     etc).

    Des liens pour le tlchargement des sources.

    Des instructions relatives  l'inscription  la ou les liste(s) de
     diffusion.

    Une FAQ (Foire Aux Questions).

    Une version en HTML de la documentation.

    Des liens vers des projets proches et/ou concurrents.

  Certains projets ont mme une URL pour un accs anonyme 
  l'arborescence principale du code source.


  77..44..  HHbbeerrggeezz ddeess lliisstteess ddee ddiiffffuussiioonn ppoouurr vvoottrree pprroojjeett

  Il est d'usage d'avoir une liste de dveloppement prive qui permet
  aux collaborateurs du projet de communiquer et d'changer des patchs.
  Vous voudrez peut-tre crer en plus une liste d'annonces pour les
  gens qui veulent tre informs de la progression du projet.


  77..55..  PPuubblliieezz ddaannss lleess aarrcchhiivveess lleess pplluuss iimmppoorrttaanntteess

  Depuis plusieurs annes, le site Metalab
  <http://www.metalab/unc.edu/pub/Linux/> est le plus important des
  endroits d'change de logiciels pour Linux.

  Voici quelques autres sites notables :

    le site Python Software       Activity <http://www.python.org>
     (pour les logiciels crits en Python).

    le CPAN <http://language.perl.com/CPAN> ou Rseau d'Archives Perl
     Global (pour les logiciels crits en Perl).


  88..  LLaa bboonnnnee ggeessttiioonn dd''uunn pprroojjeett

  Bien grer un projet lorsque tous les participants sont bnvoles
  prsente des dfis particuliers. Le sujet est trop large pour tre
  trait dans le cadre d'un HOWTO. Heureusement, il existe des documents
  de rflexion qui vous aideront  comprendre les principaux points.

  Pour un essai sur l'organisation de base du dveloppement et du
  principe `distribuez tt, mettez  jour souvent' propre au `mode
  bazar', lisez The Cathedral and the Bazaar
  <http://www.tuxedo.org/~esr/writings/cathedral-bazaar/>.

  Pour une rflexion sur les motivations psychologiques, des coutumes de
  la communaut et de la rsolution des conflits, lisez Homesteading the
  Noosphere <http://www.tuxedo.org/~esr/writings/homesteading/>.

  Pour un expos des principes conomiques et des modles commerciaux 
  adopter, lisez The Magic Cauldron
  <http://www.tuxedo.org/~esr/writings/magic-cauldron/>.

  Si vous tes allergique  la langue de Shakespeare, vous pourrez
  trouver des traductions de ces documents sur le site Linux France
  <http://www.linux-france.org/article/these/>.

  Ces papiers ne prtendent pas se poser comme les rfrences ultimes 
  propos des dveloppements  code source ouvert. Mais ils constituent
  les premires analyses srieuses crites sur le sujet, et n'ont pas
  encore t dpasss.































  Le Linux Sound-HOWTO
  Jeff Tranter, tranter@pobox.com, traduction franaise de
  Gal Duval (version 1.18) gael@linuxmandrake.com
  v1.19, 23 janvier 1998 - mis  jour en dcembre 1998.

  Ce document dcrit comment le son est gr par Linux. Il numre les
  diffrents matriels supports, dcrit comment configurer les pilotes
  dans le noyau, et rpond aux questions les plus frquentes. Son but
  est de permettre aux nouveaux utilisateurs de profiter du son rapide
  ment, et de dsengorger le trafic Usenet.
  ______________________________________________________________________

  Table des matires





















































  1. Introduction

     1.1 Remerciements
     1.2 Versions antrieures
     1.3 Nouvelles versions de ce document
     1.4 Retour d'informations...
     1.5 Ce document : politique de distribution

  2. La technologie des cartes-son

  3. Matriel support

     3.1 Les cartes son
     3.2 Des pilotes son alternatifs
     3.3 Le haut-parleur du PC
     3.4 Le port parallle

  4. L'installation

     4.1 L'installation de la carte son
     4.2 La configuration du noyau
     4.3 La cration des Fichiers spciaux des Priphriques
     4.4 Dmarrage de Linux et Test de l'Installation
     4.5 Problmes rencontrs
        4.5.1 Premier point : Soyez certain que vous utilisez vraiment votre noyau frachement compil !
        4.5.2 Deuxime point : Soyez sr que les pilotes son du noyau y sont bien inclus
        4.5.3 Troisime point : Est-ce que le noyau a bien dtect votre carte son pendant le dmarrage ?
        4.5.4 Quatrime point : Arrivez-vous  lire des donnes en provenance du dsp ?
        4.5.5 Quoi encore...

  5. Applications utilisant le son

  6. Rponses aux Questions Frquemment Poses

     6.1 Quels sont les diffrents fichiers de priphriques lis au son ?
     6.2 Comment puis-je jouer un fichier son ?
     6.3 Comment faire pour enregistrer un son ?
     6.4 Avoir plus d'une carte son
     6.5 Error: No such file or directory for sound devices
     6.6 Error: No such device for sound devices
     6.7 Error: No space left on device for sound devices
     6.8 Error: Device busy for sound devices
     6.9 J'ai encore une erreur de type `device busy' (priphrique occup) !
     6.10 Lecture incomplte d'un fichier d'chantillons audio
     6.11 Il y a des pauses lors de la lecture d'un fichier MOD
     6.12 Erreurs de compilation d'applications utilisant le son
     6.13 SEGV en utilisant des excutables qui fonctionnaient avant
     6.14 Quels sont les bugs connus et les limitations dans le pilote son ?
     6.15 Quelles ressources processeur sont-elles ncessaires pour enregistrer ou jouer des fichiers son sans pause ?
     6.16 Problmes avec la PAS16 et l'adaptateur SCSI Adaptec 1542
     6.17 Est-il possible de lire et de jouer des chantillons sonores simultanment ?
     6.18 Ma SB16 est regle en IRQ 2, mais le programme de configuration ne permet pas cette valeur.
     6.19 Est-ce que les SoundBlaster AWE32 et SoundBlaster16 ASP sont supportes ?
     6.20 Si j'utilise Linux et que je relance le DOS ensuite, j'obtiens des erreurs et/ou certaines applications ne fontionnent plus correctement.
     6.21 Problmes avec DOOM sous Linux
     6.22 Comment rduire le
     6.23 Je peux jouer des sons chantillons, mais pas en enregistrer
     6.24 Ma carte "compatible" fonctionne seulement si je l'initialise pralablement sous DOS.
     6.25 Ma carte son 16 bits "compatible SoundBlaster" fonctionne seulement en mode 8-bits sous Linux.
     6.26 O puis-je trouver des logiciels de son sous Linux ?
     6.27 Est-ce que le pilote de son peut-tre compil comme module chargeable ?
     6.28 Puis-je utiliser ma carte son pour remplacer le "bip" produit par ma console ?
     6.29 Qu'est-ce que VoxWare ?
     6.30 Est-ce que les cartes son Plug & Play sont supportes ?
     6.31 Sox/Play/Vplay indique : "invalid block size 1024"
     6.32 Pourquoi le pilote son possde-il son propre programme de configuration ?
     6.33 Les paramtres du mixeur sont rinitialiss  chaque fois que je charge le module du pilote son
     6.34 Seul l'utilisateur root peut enregistrer des sons
     6.35 Est-ce que les circuits sonores de l'IBM ThinkPad sont supports ?

  7. Rfrences



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Ceci est le document Linux Sound-HOWTO. Il est conu pour tre une
  rfrence rapide couvrant tout ce que vous devez savoir pour installer
  et configurer les fonctions sonores de Linux. Des rponses sont
  donnes aux questions les plus frquentes  propos du son sous Linux,
  et des rfrences  d'autres informations sur le son et la musique de
  synthse sont mentionnes.

  L'tude se limite aux aspects des cartes son qui concernent Linux.
  Pour des informations plus gnrales sur les cartes, la musique et le
  son, consultez la section _A_u_t_r_e_s _s_o_u_r_c_e_s _d_'_i_n_f_o_r_m_a_t_i_o_n.


  11..11..  RReemmeerrcciieemmeennttss


  Beaucoup de ces informations proviennent des fichiers Readme (`lisez-
  moi') provenant de la documentation fournie avec le code source du
  pilote son, crit par Hannu Savolainen (hannu@voxware.pp.fi). Que
  Hannu et les nombreuses autres personnes ayant particip au
  dveloppement des pilotes son du noyau Linux et des utilitaires
  associs soient donc remercis.

  Merci au paquetage Linuxdoc-SGML de Matt Welsh, qui permet  ce HOWTO
  d'tre disponible sous diffrents formats, manants tous d'un mme
  fichier source.


  11..22..  VVeerrssiioonnss aannttrriieeuurreess



     VVeerrssiioonn 11..11
        premire version; poste uniquement dans le canal SOUND de la
        `linux activists mailing list' (`liste de diffusion des
        activistes Linux').

     VVeerrssiioonn 11..22
        corrections mineures; premire version disponible sur les sites
        d'archives.

     VVeerrssiioonn 11..33
        conversion au format SGML ; maintenant disponible sous plusieurs
        formats, grce aux outils Linuxdoc-SGML de Matt Welsh; la
        prsentation a chang  cause du nouveau format, mais peu de
        changements sur le fond.

     VVeerrssiioonn 11..44
        petites modifications de SGML; ajout de rponses  propos des
        incompatibilits entre la PAS16 et la carte SCSI Adaptec1542A.

     VVeerrssiioonn 11..55
        le pilote son 2.5a est maintenant dans la distribution du noyau
        1.1; note sur le support GUS-MAX; quelques petites corrections.
     VVeerrssiioonn 11..66
        ajout d'information sur l'erreur "no space on device" ; notez
        que le Hacker's Guide est dans un rpertoire cach ; ajout de
        questions  propos du mode bidirectionnel ; informations sur les
        erreurs "device busy" ; corrections diverses.


     VVeerrssiioonn 11..77
        ajout d'informations sur l'ASP et l'AWE32; VoxWare 2.9 est
        disponible; rponses aux questions concernant l'utilisation de
        l'IRQ 2; liens vers les Sound-HOWTO et SCSI HOWTO.


     VVeerrssiioonn 11..88
        ajout d'une question  propos d'erreurs survenant sous DOS;
        plusieurs points ractualis pour la version 2.90 du pilote son;
        informations concernant DOOM; rponse sur la rduction du bruit.


     VVeerrssiioonn 11..99
        questions concernant l'enregistrement et les cartes compatibles.


     VVeerrssiioonn 11..1100
        disponibilit de l'HOWTO sur le web, sous diverses formes et
        traduites; informations concernant les conflits de DMA avec le
        pilote de sauvegarde QIC; informations concernant la Sound
        Galaxy NX Pro et la BusMouse Logitech.


     VVeerrssiioonn 11..1111
        une mise  jour tardive; document mis sous licence GPL; mise 
        jour avec la version 3.0 du pilote son; informations concernant
        toutes les nouvelles cartes supportes; nouvelles informations
        sur la configuration et les problmes rencontrs; beaucoup de
        nouveaux liens HTML ajouts; mise  disposition en ligne au
        format du CD-ROM HOWTO.


     VVeerrssiioonn 11..1122
        nouveaux pilotes son du noyau 1.3.34; nouveaux noms pour les
        fichiers de priphrique son; l'adresse de base pour la 1542
        n'est pas 333 mais 334; clarification du statut de la Creative
        Labs Emu et de l'ASP; pointeurs vers les sites web de Creative
        Labs et MediaTrix.


     VVeerrssiioonn 11..1133
        prcision sur le nom VoxWare; mise  jour en fonctions des
        dernires cartes supportes et des options de configuration;
        questions sur le support Plug and Play; question sur le problme
        de la taille du block; nouvelles options pour xconfig et
        menuconfig; modutils a un support de fichier de priphrique
        sonore; fin de la liste de diffusion vger; mise  jour du site
        web de l'auteur; autres changements divers et varis.


     VVeerrssiioonn 11..1144
        l'Audio Excel DSP16 n'est plus supporte (mais devrait
        refonctionner dans quelques mois); changements pour le programme
        configure; la version italienne de ce HOWTO est disponible;
        astuce pour rgler les gains du mixer au chargement du module
        son; la derniere version stable du noyau est maintenant 2.0;
        nouveau nom pour le pilote son; question concernant les droits
        des fichiers de priphrique son.

     VVeerrssiioonn 11..1155
        suppresion d'anciennes questions devenues obsoltes; nouvelle
        adresse email pour l'auteur; mise  jour des liens pour y
        inclure les derniers packages de logiciels disponibles; plus
        d'informations sur le livre du multimdia; petites corrections
        grammaticales.


     VVeerrssiioonn 11..1166
        beaucoup de mises  jour et de corrections proposes par Hannu
        Savolainen; ajout d'une "date limite de consommation" de six
        mois pour ce document; nouveaux liens vers des pages web; ajout
        d'un lien sur la traduction espagnole; petites corrections
        grammaticales.


     VVeerrssiioonn 11..1177
        la traduction chinoise de ce document est disponible; un pilote
        alternatif pour la GUS; le package radio modem; le guide Linux
        Multimedia est desormais disponible en Franais et en Japonais;
        rfrences  des mini-HOWTOs utiles; pointeur pour le Thinkpad
        IBM.


     VVeerrssiioonn 11..1188
        la traduction corenne est disponible; plus d'informations
        concernant le son et les MIPS; mise  jour sur le support de
        nouvelles cartes son; il faut lancer fuser en tant que root.


     VVeerrssiioonn 11..1199
        cette nouvelle version est publie selon la licence LDP plutot
        que GPL.



  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt


  Les nouvelles versions de ce document seront priodiquement postes
  dans le groupe fr.comp.os.linux.annonces.  Elles seront aussi envoyes
   divers sites ftp qui archivent ce genre d'informations, notamment :
  <ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/> (version franaise)
  et <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/> (version originale).

  Des versions hypertexte de ce document ainsi que des autres HOWTOs
  pour Linux sont disponibles sur un grand nombre de sites web dont
  <http://sunsite.unc.edu/LDP/>. La plupart des distributions Linux sur
  CD-ROM contiennent les HOWTOs, souvent dans le rpertoire /usr/doc et
  il est possible d'en acheter des versions imprimes chez plusieurs
  revendeurs spcialiss. Parfois, les HOWTOs disponibles sur CD-ROM,
  sur les sites FTP et dans les version imprimes sont dpasss. Si le
  HOWTO a plus de six mois, alors une nouvelle version est certainement
  disponible sur Internet.


  11..44..  RReettoouurr dd''iinnffoorrmmaattiioonnss......


  Si vous avez des suggestions, des corrections, ou des commentaires 
  apporter  ce HOWTO, merci de bien vouloir me les envoyer
  (tranter@pobox.com), et j'essaierai de les inclure dans la version
  suivante.

  J'essaie galement de rpondre aux questions concernant les cartes son
  sous Linux dans la mesure du possible. Avant de poser directement une
  question, merci de lire toutes les informations contenues dans ce
  HOWTO, et envoyez-moi une description dtaille du problme. Merci de
  ne pas me poser de questions quant  l'utilisation des cartes son avec
  d'autres systmes d'exploitation que Linux.


  Si vous publiez ce document sur CD-ROM ou sous forme imprime,
  j'apprcierais d'en recevoir une copie (n.d.t.: le traducteur aussi
  :-) ). Envoyez-moi un email pour que je vous communique mon adresse
  postale. Pensez galement  contribuer au Linux Documentation Project
  pour supporter la documentation libre de Linux. Pour plus
  d'informations, contactez le coordinateur des HOWTOs LINUX, Tim Bynum
  <mailto:linux-howto@sunsite.unc.edu>.


  11..55..  CCee ddooccuummeenntt :: ppoolliittiiqquuee ddee ddiissttrriibbuuttiioonn


  Copyright 1995-1997 Jeff Tranter.

  Traduction franaise 1998 Gal Duval.

  Ce document est distribuable selon les termes de la licence LDP que
  l'on peut consulter   <http://sunsite.unc.edu/LDP/COPYRIGHT.html>.


  22..  LLaa tteecchhnnoollooggiiee ddeess ccaarrtteess--ssoonn


  Cette partie vous donne un petit aperu des techniques audio employes
  en informatique, cela pour vous aider  comprendre certains concepts
  dont on parlera dans la suite de ce document. Pour en savoir plus,
  vous pouvez consulter certains livres traitant d'audio-numrique ou de
  traitement du signal numrique...

  Le son est un phnomne analogique; il se traduit par une valeur
  quelconque sur une chelle continue. Les ordinateurs fonctionnent de
  manire _n_u_m__r_i_q_u_e; c'est--dire qu'ils utilisent des valeurs
  discrtes. Les cartes-son utilisent un composant appel _C_o_n_v_e_r_t_i_s_s_e_u_r
  _A_n_a_l_o_g_i_q_u_e_-_N_u_m__r_i_q_u_e (A/N ou ADC en anglais) afin de convertir les
  tensions correspondantes aux ondes sonores analogiques en valeurs
  numriques qui peuvent alors tre stockes dans la mmoire de
  l'ordinateur. De mme, un _C_o_n_v_e_r_t_i_s_s_e_u_r _N_u_m__r_i_q_u_e_-_A_n_a_l_o_g_i_q_u_e (N/A ou
  DAC en anglais) convertit les valeurs numriques en une tension
  analogique qui peut alors tre amplifie pour "attaquer" un haut-
  parleur et produire du son...

  La conversion analogique-numrique (chantillonage ou "sampling" en
  anglais) gnre des erreurs. Deux facteurs dterminent la qualit du
  signal echantillon par rapport au signal initial.  Tout d'abord, la
  _f_r__q_u_e_n_c_e _d_'__c_h_a_n_t_i_l_l_o_n_a_g_e est le nombre d'chantillons raliss par
  unit de temps (exprime en Hertz). Une petite frquence
  d'chantillonage produira une reprsentation moins fine du signal
  analogique d'origine, dans le sens o les frquences aigues ne seront
  pas ou mal restitues.  (ndt : la thorie nous enseigne que pour
  restituer correctement une frquence sonore de n Hz, il faut effectuer
  un chantillonage au moins gal  2 x n Hz. Ainsi, l'tendue du
  spectre sonore audible par un humain (0  20000 Hz) sera bien
  restitue par un chantillonage  44100 Hz (norme CD-AUDIO) ).  Le
  nombre de bits d'chantillonage conditionne l'tendue des valeurs
  utilisables pour reprsenter chaque chantillon, qui conditionne elle-
  mme la plage dynamique de restitution.  (ndt : il s'agit du rapport
  entre le niveau sonore le plus fort restituable sans distortion, et le
  niveau de souffle ou de bruit inhrent au matriel de restitution.
  Cette plage dynamique est exprime de manire logarithmique en
  decibels (dB). En thorie, lorsque l'on ajoute un nouveau bit de
  codage pour chaque chantillon, on double cette plage, ce qui
  correspond  un gain en dynamique de 6 dB :-) )

  Les cartes son utilisent typiquement un codage sur 8 ou 16 bits (ndt :
  et parfois 24), pour des frquences d'chantillonage allant de 4000 
  44100 (ndt : ou 48000 Hz). L'chantillonage pouvant tre ralis sur
  une voie (mono) ou deux (stro) (ndt : et plus (8, 16...) pour des
  cartes professionnelles).

  La _s_y_n_t_h__s_e _F_M est une ancienne mthode utilise pour produire des
  sons. Son principe consiste en la combinaison de plusieurs ondes de
  formes diffrentes (ex : sinusodales, triangulaires, carres). Ce
  procd est plus simple  implmenter au niveau "hardware" que la
  conversion analogique-numrique mais son utilisation est plus
  compliqu (au niveau programmation).  Beaucoup de cartes son
  supportent la synthse FM afin de rester compatibles avec des cartes
  ou programmes plus anciens.  Plusieurs gnrateurs sonores diffrents
  sont habituellement fournis.

  La _s_y_n_t_h__s_e _p_a_r _t_a_b_l_e _d_'__c_h_a_n_t_i_l_l_o_n_s _s_o_n_o_r_e_s ou _w_a_v_e_t_a_b_l_e_s associe la
  flexibilit de la conversion A/N avec les possibilits multivoies de
  la synthse FM. Avec ce procd, des sons digitaliss/numriss
  peuvent tre chargs dans une mmoire ddie puis rejous, combins,
  et modifis en sollicitant peu le microprocesseur de la machine.
  Toutes les cartes son actuelles supportent la synthse par tables
  d'chantillons sonores.

  La plupart des cartes offrent galement la possibilit de _m_i_x_a_g_e, en
  combinant les signaux provenant des diffrentes sources avec des
  niveaux diffrents.

  Le terme _M_I_D_I signifie : Musical Instrument Digital Interface soit :
  interface numrique pour instruments musicaux en franais. Ce
  protocole matriel et logiciel standard permet aux "instruments
  lectroniques" de communiquer entre eux. Les vnements envoys dans
  un bus MIDI peuvent aussi tre mmoriss dans des fichiers MIDI. Cela
  permet de les diter ultrieurement et de les rejouer.  Beaucoup de
  cartes son possdent une interface MIDI. Celles qui n'en n'ont pas
  peuvent quand mme jouer des fichier MIDI.

  Les fichiers _M_O_D sont un format courant pour les sons gnrs par
  ordinateur. En plus des informations relatives aux notes devant tre
  joues, ces fichiers contiennent des chantillons d'instruments ou de
  voix digitalises. Les fichiers MOD proviennent du monde Amiga, mais
  peuvent tre jous par d'autres systmes - dont Linux - en utilisant
  des logiciels appropris.


  33..  MMaattrriieell ssuuppppoorrtt


  Cette partie rpertorie les cartes son et interfaces qui sont
  supportes par les derniers noyaux Linux  la date o ce document a
  t rdig.

  Les diffrentes versions des pilotes son ont leur propre numrotation.
  La dernire version stable du noyau Linux est  ce jour la 2.0.33 pour
  une version 3.5.4-960630 du pilote son.

  Le concepteur de ce pilote, Hannu Savolainen, en rend souvent
  publiques les nouvelles versions beta avant qu'elles ne deviennent
  parties intgrantes du noyau Linux.  La liste la plus actualise des
  cartes supportes se trouve sur : <http://www.4front-
  tech.com/ossfree/new_cards.html> (USA) ou
  <http://personal.eunet.fi/pp/voxware/new_cards.html> (Europe). Ces
  pages indiquent quel pilote est ncessaire pour tel type de carte, ou
  si son support est encore en dveloppement. Le fichier
  /usr/src/linux/drivers/sound/Readme.cards distribu avec le noyau
  Linux contient des informations sur les cartes supportes mais n'est
  pas forcment  jour.

  Les informations contenues dans ce HOWTO sont valables pour Linux
  tournant sur un processeur compatible Intel x86.

  Le pilote son devrait galement fonctionner avec la plupart des cartes
  son disponibles pour les plateformes Alpha. Nanmoins, il peut dans ce
  cas exister des conflits d'adresses avec d'autres priphriques, mme
  si la carte fonctionne parfaitement sur une machine  base de x86. Il
  n'est donc gnralement pas possible de dire si telle ou telle carte
  va fonctionner sans l'essayer.

  A l'heure o ces lignes ont t rdiges, le pilote son ne
  fonctionnait pas encore sur la version PowerPC de Linux. Mais cela
  devrait fonctionner dans l'avenir.

  On peut configurer le son dans le noyau pour Linux port sur MIPs, et
  certaines machines MIPs possdent des slots EISA et/ou des circuits-
  son intgrs dans la machine. On m'a dit que le groupe Linux-MIPs
  souhaitait intgrer un support son dans le futur.

  Le noyau Linux contient un pilote-son particulier pour les versions
  Atari et Amiga de Linux qui implmente une compatibilit
  d'instructions avec le pilote son des machines x86, ceci en utilisant
  les possibilits matrielles natives de ces machines.

  Le portage de Linux pour SPARC n'inclue pas encore de support du son.
  De la mme faon que pour les Amiga et les Atari, les machines SPARC
  possdent des possibilits sonores intgres  la machine. Il faudrait
  donc un pilote spcifique (ce qui est rigolo, car sous Linux, /dev/dsp
  est une mulation du pilote son de SunOS !).


  33..11..  LLeess ccaarrtteess ssoonn


  Les cartes son suivantes sont supportes par le pilote son du noyau
  linux :


    ATI Stereo F/X (n'est plus fabriqu)

    AdLib (n'est plus fabriqu)

    Ensoniq SoundScape (et compatibles fabriques par Reveal and Spea)

    Gravis Ultrasound

    Gravis Ultrasound ACE

    Gravis Ultrasound Max

    Gravis Ultrasound avec chantillonage sur 16 bits

    Logitech Sound Man 16

    Logitech SoundMan Games

    Logitech SoundMan Wave

    MAD16 Pro (chipsets OPTi 82C928, 82C929, 82C930, 82C924)


    Media Vision Jazz16

    MediaTriX AudioTriX Pro

    Microsoft Windows Sound System (MSS/WSS)

    Mozart (OAK OTI-601)

    Orchid SW32

    Personal Sound System (PSS)

    Pro Audio Spectrum 16

    Pro Audio Studio 16

    Pro Sonic 16

    Roland MPU-401 interface MIDI

    Sound Blaster 1.0

    Sound Blaster 16

    Sound Blaster 16ASP

    Sound Blaster 2.0

    Sound Blaster AWE32

    Sound Blaster Pro

    TI TM4000M notebook

    ThunderBoard

    Turtle Beach Tropez ("classic", pas la "Plus")

    Turtle Beach Maui

    Yamaha FM synthesizers (OPL2, OPL3 et OPL4)

    6850 UART MIDI Interface

  Notez bien que les cartes Plug and Play (PnP) ne sont pas entirement
  compatibles avec les modles non-PnP de la mme carte. Par exemple, la
  SoundBlaster16 PnP n'est pas compatible  100% avec la SoundBlaster16
  originelle. Il en va de mme pour les Soundscape et les GUS PnP. On
  trouvera plus d'informations  ce sujet dans la suite de ce document.

  Les cartes suivantes ne sont _p_a_s supportes, soit parce qu'elles sont
  dpasses, soit parce que le constructeur ne souhaite pas communiquer
  la totalit des spcifications techniques ncessaires pour crire le
  pilote concern.


    Pro Audio Spectrum (originelle)

    Pro Audio Spectrum+

    anciennes cartes (Sierra Aria based)fabriques par Diamond

  Les autres cartes qui sont annonces comme tant compatibles avec une
  des cartes supportes vues plus haut _p_e_u_v_e_n_t fonctionner  condition
  qu'elles soient rellement compatibles au niveau matriel
  (c'est--dire, au niveau des registres).
  Mme si la plupart des cartes son sont dites "compatibles
  SoundBlaster", un trs petit nombre le sont suffisament pour
  fonctionner avec le pilote SoundBlaster de Linux. Ces cartes
  fonctionnent habituellement mieux en utilisant les pilotes MSS/WSS ou
  MAD16. Seules les vritables cartes SoundBlaster fabriques par
  Creative Labs et qui utilisent les puces Creative (comme la
  SoundBlaster16 Vibra), la MV Jazz16 et les cartes bases sur
  l'ESS688/1688 fonctionnent en gnral avec le pilote SoundBlaster.
  Tenter d'utiliser une "carte son SoundBlaster Pro compatible 16 bits"
  avec le pilote de priphrique SoundBlaster est en gnral une perte
  de temps.

  Le noyau Linux supporte les ports SCSI prsents sur quelques cartes
  son (par exemple, sur la SoundBlaster16 Vibra) et les interfaces
  propritaires pour un certain nombre de lecteurs de CD-ROM (par
  exemple, sur la Soundblaster Pro). Voyez  ce propos le SCSI HOWTO et
  le CDROM HOWTO pour plus d'informations.

  Un module chargeable du noyau supportant les ports joystick (dont
  certains fournis avec certaines cartes son) est galement disponible.

  Notez que les pilotes de priphrique SCSI, CD-ROM, joystick et son du
  noyau sont compltement indpendants les uns des autres.

  Pour des informations  jour sur les pilotes son, consulter le site
  Web de Hannu Savolainen (qui est mentionn dans la liste des
  rfrences).


  33..22..  DDeess ppiillootteess ssoonn aalltteerrnnaattiiffss


  Il y a des pilotes "non officiels" disponibles. Ils font pas partie de
  la distribution standard du noyau Linux et sont utiliss  la place du
  pilote son normal.

  Une version commerciale du pilote son est vendue par 4Front
  Technologies.  Elle offre un grand nombre de caractristiques
  supplmentaires par rapport  la version libre fournie dans le noyau
  Linux. Pour en savoir plus, consulter la page Web de 4Front
  Technologies sur  <http://www.4front-tech.com/>.

  Markus Mummert (mum@mmk.e-technik.tu-muenchen.de) a conu un pilote
  son pour les cartes son Turtle Beach Multisound (classic),  Tahiti et
  Monterey. La documentation prcise :


       "ce pilote a t conu pour de l'enregistrement/ lecture sur
       disque-dur sans perte de synchronisation, mme sur un
       systme charg. Les autres fonctionalits, comme la synthse
       sonore par table d'chantillons, le MIDI et l'utilisation
       des DSP (Digital Signal Processor = Processeurs de Signaux
       Numriques) ne peuvent pas tre utilises. De mme, l'enreg
       istrement et la lecture simultans ne sont pas possibles. Il
       remplace actuellement VoxWare et a t test pour plusieurs
       noyaux, de la version 1.0.9  la 1.2.1. On peut galement
       l'installer sur les systmes UN*X SysV386R3.2."


  On peut le trouver sur  <http://www.cs.colorado.edu/~mccreary/tbeach>.

  Kim Burgaard (burgaard@daimi.aau.dk) a crit un pilote son et des
  utilitaires pour l'interface MIDI MPU-401. Le fichier relatif  Linux
  donne cette description :


       "Un pilote pour vritable interface MIDI compatible Roland
       MPU-401 (incluant la SCC-1 et la RAP-10/ATW-10 Roland).
       Fourni avec un ensemble d'utilitaires, dont un
       lecteur/enregistreur pour fichiers MIDI standards."



       "Beaucoup d'amliorations ont t ralises depuis la ver
       sion 0.11a. Entre autres, le pilote respecte la politique de
       partage des IRQ et la nouvelle interface des modules du
       noyau. Une fonction de mtronome, des possibilits de syn
       chronisation - par exemple des images en fonction d'un bat
       tement sans perte de prcision, une interface avance de
       relecture/enregistrement/overdub (lecture et enregistrement
       simultans) et beaucoup plus encore."


  On peut le trouver sur
  <ftp://sunsite.unc.edu/pub/Linux/kernel/sound/mpu401-0.2.tar.gz>.

  Jaroslav Kysela et d'autres ont galement conu un pilote alternatif
  pour la Gravis UltraSound. Consulter la page
  <http://romeo.pf.jcu.cz/~perex/ultra> du projet Linux UltraSound pour
  plus d'infos.

  Une autre utilisation des cartes son sous Linux consiste  s'en servir
  comme modem pour la radio-amateur par paquets. Les versions rcente
  2.1.x (attention, version de _d__v_e_l_o_p_p_e_m_e_n_t !) contiennent un pilote
  qui fonctionne avec les cartes compatibles SoundBlaster et Windows
  Sound System pour pouvoir utiliser les protocoles paquets AFSK 1200
  bps et FSK 9600 bps. Voyez le HOWTO AX25 pour plus de dtails (je suis
  moi-mme radio-amateur avec VE3ICH comme indicatif !).


  33..33..  LLee hhaauutt--ppaarrlleeuurr dduu PPCC


  Un autre pilote son est galement disponible, qui ne ncessite pas de
  carte son : il utilise le haut-parleur PC. Il est compatible au niveau
  logiciel avec le pilote de cartes son, mais, comme on peut s'y
  attendre, il produit un son de moins bonne qualit et ncessite plus
  de ressources CPU. Les rsultats semblent tre assez ingaux, et
  dpendent  des caractristiques du haut-parleur interne. Pour de plus
  amples informations, consultez la documentation fournie avec ce
  pilote.

  La version actuelle est 1.1 et peut-tre trouve sur
  <ftp://ftp.informatik.hu-berlin.de/pub/os/linux/hu-sound/>


  33..44..  LLee ppoorrtt ppaarraallllllee


  Une autre option consiste  fabriquer un convertisseur numrique-
  analogique en utilisant le port parallle (pour imprimante ou autre
  extensions). Cette solution produit un son de meilleur qualit qu'avec
  le haut-parleur du PC, mais sollicite galement beaucoup la CPU. Le
  paquetage du pilote pour haut-parleur mentionn ci-dessus supporte
  cette fonction et contient les instructions pour construire le
  matriel adquat.


  44..  LL''iinnssttaallllaattiioonn



  La configuration du support son sous Linux doit se faire selon les
  tapes suivantes :


  1. Installation de la carte son.

  2. Configuration et recompilation du noyau avec le support son.

  3. Cration des fichiers "device" (fichiers spciaux associs.  au
     priphrique : /dev/...).

  4. Redmarrage de la machine et tests d'installation.

  Dans la suite sont explicites toutes ces tapes.


  44..11..  LL''iinnssttaallllaattiioonn ddee llaa ccaarrttee ssoonn


  Suivez les instructions du fabriquant pour l'installation matrielle
  ou confiez-la  votre revendeur.

  Les vieilles cartes-son ont souvent des petits interrupteurs appels
  cavaliers ("switch" ou "jumper") permettant de configurer les adresses
  IRQ (Interrupt ReQuest = requte d'interruption ), DMA (Direct Memory
  Access =  bus de transfert direct des donnes), les canaux, etc. Si
  vous n'tes pas certain, utilisez les rglages d'usine. Essayez
  d'viter les conflits avec d'autres prriphriques (comme les cartes
  ethernet, les cartes SCSI, les ports srie et parallle).

  Normalement, vous devrez utiliser les mmes adresses d'E/S, d'IRQ et
  de DMA que celles fonctionnant sous DOS. Cependant, dans certains cas
  (en particulier avec les cartes PnP) vous aurez peut-tre besoin d'un
  rglage particulier pour que cela fonctionne avec Linux.  Il faudra
  peut-tre faire quelques essais.


  44..22..  LLaa ccoonnffiigguurraattiioonn dduu nnooyyaauu


  Quand vous avez install Linux, vous avez certainement utilis un
  noyau prcompil. Gnralement, ces noyaux ne fournissent pas de
  support son. Il vous faut donc recompiler votre noyau en fonction des
  priphriques que vous possdez.  Vous devez galement recompiler le
  noyau lorsque vous passez  une de ses nouvelles versions ou afin de
  librer de la mmoire en rduisant sa taille (ndt : par l'utilisation
  des modules).

  Consultez le Linux Kernel HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>  pour recompiler
  le noyau (ndt : c'est trs simple  faire). Je ne vais parler ici que
  des points qui sont spcifiques aux cartes son.

  Si vous n'avez jamais configur le noyau pour le support son, il peut
  tre utile de lire _t_o_u_s les fichiers Readme fournis avec les pilotes
  son du noyau, et en paticulier les informations spcifiques  votre
  carte-son. La documentation suivant peut-tre trouve dans le
  rpertoire des pilotes son du noyau Linux. Il se trouve en gnral
  dans /usr/src/linux/drivers/sound :







  CHANGELOG         - description des modifications pour chaque version
  COPYING           - droit et restrictions de duplication
  Readme            - informations rcentes et importantes
  Readme.aedsp16    -  propos de la carte Audio Excel 16 DSP
  Readme.cards      - prcisions sur la configuration de cartes spcifiques
  Readme.linux      - prcisions sur l'installation de pilotes son non inclus dans le noyau
  Readme.modules    - comment compiler le pilote en un module chargeable
  Readme.v30        - nouvelles possibilites dans la version 3.0 du pilote son
  experimental.txt  -  propos des caractristiques exprimentales



  Suivez tout d'abord la procdure habituelle pour compiler le noyau. Il
  existe actuellement trois interfaces disponibles pour la procdure de
  configuration. Une interface graphique sous X11 peut tre lance par
  "make xconfig". Une interface  base de menus texte est disponible en
  tapant "make menuconfig".  Enfin, la mthode originelle, en utilisant
  "make config" propose une interface uniquement  base de texte.

  Il faut faire particulirement attention en utilisant "make xconfig"
  ou "make menuconfig". En effet, les choix par dfaut sont toujours
  positionns sur "No", ce qui n'est pas correct dans tous les cas.  En
  particulier, l'option "/dev/dsp and /dev/audio support" (CONFIG_AUDIO)
  doit habituellement tre valide.

  Dans ce document, je suppose que vous utilisez la procdure
  traditionnelle en mode texte : "make config". Nanmoins, la procdure
  est identique dans les autres cas.

  Il y a galement deux autres manires de configurer le son. La
  premire est l'"ancienne" faon (la seule disponible pour les noyaux
  2.0.0). Elle utilise un programme de configuration spar qui fait
  partie du pilote son. Cette mthode fonctionne pour la plupart des
  cartes, exceptes quelques unes qui ncessitent des pilotes
  additionnels "bas niveau" (miroSOUND, AWE32, et AEDSP16).

  La seconde mthode (la "nouvelle") est mieux intgre  la
  configuration par menus texte utilise pour le reste du noyau. Elle ne
  fonctionne pas pour les cartes qui ont besoin d'un fichier
  constructeur tlchargeable. Ceci concerne les cartes PSS, SM Wave,
  AudioTrix Pro et TurtleBeach Tropez/Maui. Avec ces cartes, on
  utilisera la vieille procdure.

  La "nouvelle" mthode est toujours utilise en faisant "make xconfig".
  Quand on utilise "make menuconfig", on peut choisir entre les deux
  mthodes. En faisant "make config", vous aurez la vieille mthode par
  dfaut. Mais si vous avez dj utilis la nouvelle mthode, ce sera
  celle utilise par "make config" ! Vous pouvez reslectionner
  l'ancienne en lanant "make menuconfig" et en la slectionnant.

  La mthode recommende est l'utilisation de "make menuconfig" avec
  l'ancienne mthode de configuration. Beaucoup de problmes de
  configuration du son proviennent (au moins en partie) de l'utilisation
  de la nouvelle mthode.

  Il est galement possible de compiler le pilote de son en tant que
  module chargeable. Je vous recommande de le compiler initialement en
  statique, dans le noyau. Une fois que cela fonctionne et que vous
  l'aurez test, vous pourrez essayer de le compiler en module.

  Quand vous lancez make config, validez le support son en rpondant "y"
   la question :




  Sound card support (CONFIG_SOUND) [M/n/y/?]




  A la fin des questions de configuration, un programme sera compil et
  excut et vous demandera alors quelles sont les options pour votre
  carte son. Attention en rpondant  ces questions, car une rponse
  errone pour une option peut empcher d'autres questions suivantes
  d'tre poses. Par exemple, ne rpondez "yes"  la premire question
  (PAS 16) que si vous n'avez rellement pas de carte PAS 16. De mme,
  n'activez pas plus d'options que celles dont vous avez rellement
  besoin car cela consomme de la mmoire !  Certains pilotes (comme
  celui du MPU-401) peuvent galement entrer en conflit avec votre
  controleur SCSI et empcher le noyau de "booter".

  Voici une liste de toutes les options de configuration. Rpondez "y"
  (oui) ou "n" (non)  chaque question. La rponse par dfaut est
  affiche en lettre majuscule telle que : "[Y/n/?]" signifie "y" par
  dfaut et vice versa. Pour valider la valeur par dfaut, appuyez juste
  sur Enter, tout en sachant que cette valeur par dfaut n'est pas
  forcment correcte.

  Si vous rentrez "?", vous aurez un court message d'explication sur
  l'option prsente.

  Notez galement que toutes les options ne sont pas demandes. Le
  programme de configuration dsactive certaines questions en fonction
  des choix prcedemment valids. Il peut galement slectionner
  automatiquement certaines options.



     OOlldd ccoonnffiigguurraattiioonn eexxiissttss iinn //eettcc//ssoouunnddccoonnff.. UUssee iitt [[YY//nn//??]]
        Si vous avez prcedemment compil le noyau pour le support son,
        la configuration prcdente a pu tre sauvegard.  Si vous
        souhaitez utiliser cette ancienne configuration, alors entrez
        "y". Si vous essayez une configuration diffrente ou si vous
        utilisez une nouvelle version du noyau, rpondez "n" pour
        commencer la configuration.


     PPrrooAAuuddiiooSSppeeccttrruumm 1166 ssuuppppoorrtt [[YY//nn//??]]
        Rpondez "y" _u_n_i_q_u_e_m_e_n_t si vous possdez une Pro Audio Spectrum
        _1_6, une ProAudio Studio 16 ou une Logitech SoundMan 16.  Ne
        rpondez pas "y" si vous avez une autre carte de chez Media
        Vision ou Logitech car elle ne sera pas compatible PAS16.


     SSoouunnddBBllaasstteerr ssuuppppoorrtt [[YY//nn//??]]
        Rpondez "y" si vous avez une carte SoundBlaster de chez
        Creative Labs, ou une carte compatible  100% au niveau matriel
        (comme la Thunderboard ou la SM Games). Si votre carte est dans
        la liste des cartes supportes, consultez le fichier
        Readme.cards des cartes spcifiques avant de rpondre  cette
        question. Pour une carte inconnue, essayez "y" si cette carte se
        dit tre compatible SoundBlaster.


     GGrraavviiss UUllttrraassoouunndd ssuuppppoorrtt [[YY//nn//??]]
        Rpondez "y" si vous avez une GUS ou une GUS MAX.  Rpondez "n"
        si vous n'avez pas de GUS car ce pilote utilise beaucoup de
        mmoire.



     MMPPUU--440011 ssuuppppoorrtt ((NNOOTT ffoorr SSBB1166)) [[YY//nn//??]]
        Attention avec cette question. L'interface MPU-401 est supporte
        par presque toutes les cartes son. Nanmoins, quelques cartes
        supportes possdent leur propre pilote MPU-401. Si vous validez
        l'option dans ce cas l, vous aurez un conflit. La validation de
        cette option sur un systme qui ne possde pas d'interface
        MPU-401 peut causer des disfonctionnements. Si votre carte est
        normalement supporte, consultez quand mme les instructions
        spcifiques la concernant dans le fichier  Readme.cards.  Il est
        plus sr d'entrer "y" si vous possdez une vritable carte avec
        interface MPU-401 MIDI.


     66885500 UUAARRTT MMiiddii ssuuppppoorrtt [[YY//nn//??]]
        Il est sr de rpondre "n"  cette question dans tous les cas.
        L'interface 6850 UART n'est que trs rarement utilise.


     PPSSSS ((EECCHHOO--AADDII22111111)) ssuuppppoorrtt [[YY//nn//??]]
        Rpondez "y" si vous possdez une carte Orchid SW32, ou Cardinal
        DSP16 ou encore d'autres cartes bases sur les puces PSS (codec
        AD1848 + puce DSP ADSP-2115 + puce Echo ESC614 ASIC).

        v

     1166 bbiitt ssaammpplliinngg ooppttiioonn ooff GGUUSS ((_n_o_t GGUUSS MMAAXX)) [[YY//nn//??]]
        Rpondez "y" si vous avez install la carte-fille
        d'chantillonage 16 bits sur votre GUS. Rpondez non si vous
        avez une GUS MAX.  Cette option dsactive le support GUS MAX.


     GGUUSS MMAAXX ssuuppppoorrtt [[YY//nn//??]]
        Rpondez "y" uniquement si vous avez une GUS MAX.


     MMiiccrroossoofftt SSoouunndd SSyysstteemm ssuuppppoorrtt [[YY//nn//??]]
        Faite encore attention avant  de rpondre "y"  cette question.
        Il est plus sr de rpondre "y" si vous possdez la carte
        Windows Sound System originelle fabrique par Petitmou
        (microsoft) ou l'Aztech SG 16 Pro / NX 16 Pro. Vous pouvez aussi
        rpondre "y" au cas o votre carte n'ait pas t propose plus
        haut. Pour les cartes ayant le support natif pour VoxWare,
        consultez les instructions spcifiques dans le fichier
        Readme.cards. Certains pilotes possdent leur propre support MSS
        et l'activation de cette option dans ce cas causera un conflit.


     EEnnssoonniiqq SSoouunnddssccaappee ssuuppppoorrtt [[YY//nn//??]]
        Rpondez "y" si vous avez une carte son base sur les puces
        Ensoniq SoundScape. De telles cartes sont fabriques, au moins
        chez Ensoniq, Spea et Reveal (ce dernier fabrique galement
        d'autres types de cartes).


     MMeeddiiaaTTrriiXX AAuuddiiooTTrriiXX PPrroo ssuuppppoorrtt [[YY//nn//??]]
        Rpondez "y" si vous avez une AudioTriX Pro.


     SSuuppppoorrtt ffoorr MMAADD1166 aanndd//oorr MMoozzaarrtt bbaasseedd ccaarrddss??
        Rpondez "y" ici si votre carte possde une puce d'interface
        Mozart (OAK OTI-601)  ou MAD16 (OPTi 82C928 ou 82C929). Ces
        circuits sont assez rpandus, il est donc possible qu'un grand
        nombre de cartes "anonymes" en possdent.  De plus, la puce
        MAD16 est utilise dans des cartes fabriques par des
        constructeur connus comme Turle Beach (Tropez), Reveal (quelques
        modles) et Diamond (les plus rcentes).
     SSuuppppoorrtt ffoorr CCrryyssttaall CCSS44223322 bbaasseedd ((PPnnPP)) ccaarrddss [[YY//nn//??]]
        Rpondez "y" si vous avez une carte base sur les circuits
        Crystal CS4232.


     SSuuppppoorrtt ffoorr TTuurrttllee BBeeaacchh WWaavvee FFrroonntt ((MMaauuii,, TTrrooppeezz)) ssyynntthheessiizzeerrss
        [Y/n/?]"  Rpondez "y" ici si vous possdez l'une de ces cartes.


     SSoouunnddBBllaasstteerr PPrroo ssuuppppoorrtt [[YY//nn//??]]
        Activez cette option si votre carte est une SoundBlaster Pro ou
        une SoundBlaster 16. Idem si vous avez une carte clone de
        SoundBlaster Pro. On peut conomiser un peu de mmoire ici en
        rpondant "n" mais l'alternative la plus sre est de rpondre
        "y".


     SSoouunnddBBllaasstteerr 1166 ssuuppppoorrtt [[YY//nn//??]]
        Validez si vou avez une SoundBlaster 16 (dont l'AWE 32).


     AAuuddiioo EExxcceell DDSSPP 1166 iinniittiiaalliizzaattiioonn ssuuppppoorrtt [[YY//nn//??]]
        Rpondez "y" si vous avez une Audio Excel DSP 16. Consultez le
        fichier Readme.aedsp16  pour de plus amples informations.


  Le programme de configuration pose alors plusieurs questions  propos
  d'options de plus haut niveau. Il est recommand de rpondre "y" 
  chacune de ces questions, et "n" uniquement si vous savez que vous
  n'aurez pas besoin de cette option.



     //ddeevv//ddsspp aanndd //ddeevv//aauuddiioo ssuuppppoorrtt ((uussuuaallllyy rreeqquuiirreedd)) [[YY//nn//??]]
        Rpondre "n" dsactive /dev/dsp et /dev/audio, les priphriques
        de conversion A/D et D/A. Rpondez "y".


     MMIIDDII iinntteerrffaaccee ssuuppppoorrtt [[YY//nn//??]]
        Rpondre "n" dsactive les priphriques associs  /dev/midixx
        ainsi que les accs aux ports MIDI utilisant /dev/sequencer et
        /dev/music.  Cette option affecte galement tous les
        priphriques compatibles MPU-401 et/ou General MIDI.


     FFMM ssyynntthheessiizzeerr ((YYMM33881122//OOPPLL--33)) ssuuppppoorrtt [[YY//nn//??]]
        Rpondre "y" ici.


     //ddeevv//sseeqquueenncceerr ssuuppppoorrtt [[YY//nn//??]]
        Rpondre "n" dsactive  /dev/sequencer et /dev/music.


     DDoo yyoouu wwaanntt ssuuppppoorrtt ffoorr tthhee mmiixxeerr ooff SSGG NNXX PPrroo ??
        Rpondez "y" si vous possdez une carte son Sound Galaxy NX Pro
        et que vous voulez utiliser ses fonctions tendues de mixage.


     DDoo yyoouu wwaanntt ssuuppppoorrtt ffoorr tthhee MMVV JJaazzzz1166 ((PPrrooSSoonniicc eettcc..)) ??
        Rpondez "y" si vous avez une carte son MV Jazz 16.


     DDoo yyoouu hhaavvee aa LLooggiitteecchh SSoouunnddMMaann GGaammeess [[YY//nn//??]]
        Rpondez "y" si vous possdez une carte Logitech SoundMan Games.


  Aprs toutes ces questions, le programme de configuration vous
  questionne sur la configuration spcifique de la carte.
  Habituellement, juste quelques adresses d'E/S, d'IRQ et de DMA sont
  demandes. Pour certaines cartes, le programme demande quels fichiers
  doivent tre utiliss durant l'initialisation de la carte. Ceci est
  vrai pour les cartes qui possdent une puce DSP ou un microprocesseur
  qui doit tre initialis en chargeant un petit programme (microcode).
  Dans certains cas, ce code est crit dans un fichier .h par le
  programme de configuration et est alors integr au pilote pendant sa
  compilation. Encore une fois, lisez dans le fichier d'information
  Readme.cards ce qui concerne votre type de carte.

  A la fin, il vous sera demand:



       The sound driver is now configured.
       Save copy of this configuration to /etc/soundconf [Y/n/?]




  Normalement, vous devriez entrer "y" ce qui vous permettra
  ventuellement de conserver vos options de configuration pour votre
  pilote son dans une recompilation ultrieure du noyau Linux.

  Si vous mettez  jour votre vieux pilote son, soyez certain que les
  fichiers /usr/include/sys/soundcard.h et /usr/include/sys/ultrasound.h
  sont des liens symboliques sur les fichiers correspondant dans
  /usr/include/linux, et qu'ils contiennent respectivement uniquement
  les lignes  #include <linux/soundcard.h> et #include
  <linux/ultrasound.h>.

  Vous pouvez maintenant recompiler et installer le nouveau noyau.


  44..33..  LLaa ccrraattiioonn ddeess FFiicchhiieerrss ssppcciiaauuxx ddeess PPrriipphhrriiqquueess


  Pour oprer proprement, des entres des fichiers de priphriques
  doivent tre cres pour vos priphriques son. Normalement, ils sont
  crs automatiquement lors de l'installation de Linux. Une
  vrification rapide peut tre effectue en utilisant la commande ci-
  dessous. Si vous obtenez la mme chose (except pour la date...) alors
  les fichiers de priphriques sont certainement presque bons...



       % ls -l /dev/sndstat
       crw-rw-rw-   1 root     root      14,   6 Apr 25  1995 /dev/sndstat




  Notez que le fait d'avoir des fichiers de priphriques corrects ne
  garantit rien en tant que tel... Le pilote du noyau doit galement
  tre charg ou compil avant que les priphriques puissent
  fonctionner.

  Si vous pensez que les fichiers de priphriques ne sont pas bons,
  vous pouvez les recrer en utilisant le petit script shell ( xcuter
  en tant qu'utilisateur root) que vous trouverez  la fin du fichier
  Readme.linux dans le rpertoire /usr/src/linux/drivers/sound
  disponible pour l'utilisateur root. Autrement, beaucoup de
  distributions Linux incluent un script /dev/MAKEDEV uilisable  ces
  fins...
  Si vous utilisez le pilote son du haut-parleur PC, lisez la
  documentation qui va avec ce paquetage pour dterminer quels fichiers
  doivent tre crs.


  44..44..  DDmmaarrrraaggee ddee LLiinnuuxx eett TTeesstt ddee ll''IInnssttaallllaattiioonn


  Vous devriez maintenant tre prt  `rebooter' (redmarrer) sur votre
  nouveau noyau et tester les pilotes de son. Suivez la procdure
  habituelle pour installer et rebooter sur le nouveau noyau (gardez
  l'ancien dans un petit coin au cas o il y aurait un un problme !).

  Pendant le redmarrage, essayez de vrifier quelques messages
  d'information tels que ceux qui suivent (s'ils dfilent trop vite,
  vous pourrez les retrouver avec la commande dmesg) :



       Sound initialization started
       <Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
       <Sound Blaster 16> at 0x330 irq 5 dma 0
       <Yamaha OPL3 FM> at 0x388
       Sound initialization complete




  Cela devrait correspondre avec votre carte son et votre configuration
  de cavaliers (s'il y en a).

  Notez que ces messages ne sont pas affichs quand on utilise le module
  chargeable du pilote son ( moins que vous ne l'ayez spcifi avec :
  "insmod sound trace_init=1).

  Quand le pilote son est attach ("link") au noyau les messages
  "Sound initialization started" et "Sound initialization complete"
  devraient tre affichs. S'ils ne le sont pas, cela signifie qu'il n'y
  a pas de pilote son dans le noyau. Dans ce cas, vrifiez que vous avez
  install le bon noyau...

  Si rien ne s'affiche entre les lignes "Sound initialization started"
  et "Sound initialization complete", cela signifie soit que vous n'avez
  pas install le bon pilote, soit que le port d'E/S est incorrect ou
  que vous avez une carte PnP qui n'a pas t configure.

  Le pilote peut galement afficher des messages d'erreurs ou
  d'avertissement ("warnings") pendant le redmarrage. Regardez bien
  tout a quand vous rebootez pour la premire fois aprs avoir
  configur le pilote son.

  Ensuite, vous devriez vrifier le fichier de priphrique
  /dev/sndstat.  La lecture du fichier d'tat du pilote son devrait vous
  fournir  des informations supplmentaires sur la faon dont a t
  initalise la carte son. Vous devriez obtenir quelque chose dans ce
  style :










  % cat /dev/sndstat
  Sound Driver:3.5.4-960630 (Sat Jan 4 23:56:57 EST 1997 root,
  Linux fizzbin 2.0.27 #48 Thu Dec 5 18:24:45 EST 1996 i586)
  Kernel: Linux fizzbin 2.0.27 #48 Thu Dec 5 18:24:45 EST 1996 i586
  Config options: 0

  Installed drivers:
  Type 1: OPL-2/OPL-3 FM
  Type 2: Sound Blaster
  Type 7: SB MPU-401

  Card config:
  Sound Blaster at 0x220 irq 5 drq 1,5
  SB MPU-401 at 0x330 irq 5 drq 0
  OPL-2/OPL-3 FM at 0x388 drq 0

  Audio devices:
  0: Sound Blaster 16 (4.13)

  Synth devices:
  0: Yamaha OPL-3

  Midi devices:
  0: Sound Blaster 16

  Timers:
  0: System clock

  Mixers:
  0: Sound Blaster




  Cette dernire commande peut gnrer des messages d'erreur. "No such
  file or directory" signifie que vous devez crer les fichiers de
  priphriques (voir la section 4.3).  "No such device" vous indique
  que le pilote son n'est pas charg ou li au noyau. Voyez la section
  4.2 pour corriger cela.

  Si des lignes apparaissent entre parenthses dans la partie "Card
  config:" de /dev/sndstat (par exemple : "(SoundBlaster at 0x220 irq 5
  drq 1,5)" ), cela signifie que le priphrique (la carte) a bien t
  configure, mais pas dtecte.

  Maintenant, vous devriez pouvoir jouer un fichier son. Procurez-vous
  un petit fichier son et envoyez-le vers le fichier de priphrique
  pour vrifier basiquement la sortie son. Par exemple :



       % cat endoftheworld >/dev/dsp
       % cat crash.au >/dev/audio




  (prennez garde de ne pas ommetre le ">" dans les commandes ci-dessus)

  Notez que, gnralement, utiliser cat n'est pas une faon correcte de
  jouer des fichiers audio, mais juste un moyen rapide de vrification.
  Vous souhaiterez sans doute trouver un programme dedi permettant de
  jouer correctement des fichiers son.

  Cette commande fonctionne uniquement si il y a au moins un fichier de
  priphrique list dans la section "Audio devices" de /dev/sndstat. Si
  cette section est vide, il faut essayer de savoir pourquoi la carte
  n'a pas t dtecte.

  Si les commandes ci-dessus retournent "I/O error", regardez la  la
  fin des messages produits par le noyau en tapant la commande "dmesg".
  Il est frquent de trouver des messages d'erreurs  cet endroit. Trs
  souvent, on trouve le message : "Sound: DMA (output) timed out -
  IRQ/DRQ config error?". Cette erreur signifie que la carte n'a pas
  russi  utiliser l'interruption attendue. Dans la plupart des cas,
  cela veut dire que l'IRQ ou le canal DMA configur pour le pilote ne
  fonctionne pas. La meilleure faon de le faire fonctionnner est
  d'essayer tous les IRQ et les DMA supports par le pilote.

  Une autre raison est que le fichier de priphrique n'est pas
  compatible avec le pilote pour lequel il est configur Ceci est le
  plus souvent vrai quand une carte son suppose "compatible
  SoundBlaster (Pro/16)" ne fonctionne pas avec le pilote SoundBlaster.
  Dans ce cas, essayez de trouver avec quelle autre carte votre matriel
  est rellement compatible (en postant dans fr.comp.os.linux par
  exemple).

  Quelques fichiers son peuvent tre trouvs dans ce paquetage :
  <ftp://tsx-11.mit.edu/pub/linux/packages/sound/snd-data-0.1.tar.Z>

  Maintenant, vous pouvez vrifier que l'enregistrement fonctionnne.  Si
  vous pouvez relier un micro(phone !)  votre carte son, vous pouvez
  effectuer un test rapide en utilisant ce genre de commandes :



       # enregistre 4 secondes de son en provenance du micro
       # dans le fichier "sample.au"
       % dd bs=8k count=4 </dev/audio >sample.au
       4+0 records in
       4+0 records out
       # rejoue le son enregistr
       % cat sample.au >/dev/audio




  N'oubliez pas de parler dans le micro pour que cela fonctionne !!!
  Vous pouvez galement avoir besoin de trouver un programme `mixer'
  (mlangeur de sources sonores), afin de slectionner le microphone
  comme tant le priphrique d'entre. Ceci doit galement vous
  permettre d'ajuster le niveau d'enregistrement (gain).

  Si tout cela fonctionne, vous pouvez tre  peu prs certain que vos
  convertisseurs A/N et N/A fonctionnent, ainsi que la partie du pilote
  y tant associe. Si vous rencontrez des difficults, passez  la
  section suivante !!!


  44..55..  PPrroobbllmmeess rreennccoonnttrrss


  Si vous avez encore des problmes aprs avoir suivi les instructions
  de ce HOWTO, voici quelques points  vrifier. Ils sont lists dans un
  ordre de difficult croissante. Si la vrification se solde par un
  echec, rsolvez le problme avant d'effectuer la suivante !


  44..55..11..  PPrreemmiieerr ppooiinntt :: SSooyyeezz cceerrttaaiinn qquuee vvoouuss uuttiilliisseezz vvrraaiimmeenntt vvoottrree
  nnooyyaauu ffrraacchheemmeenntt ccoommppiill !!


  Vous pouvez vrifier la date du noyau pour tre certain que vous
  utilisez celui que vous avez compil avec le support son. Utilisez la
  commande uname :



       % uname -a
       Linux fizzbin 2.0.0 #1 Tue Jun 4 16:57:55 EDT 1996 i386




  ou listez le fichier /proc/version:



       % cat /proc/version
       Linux version 2.0.0 (root@fizzbin) (gcc version 2.7.0) #1 Tue Jun 4 16:57:55 EDT 1996




  Si la date ne semble pas correspondre avec celle  laquelle vous avez
  compil le noyau, alors vous utilisez certainement un noyau plus
  ancien... Avez-vous rellement redmarr la machine ? Si vous utilisez
  LILO (multiboot), l'avez-vous rinstall ?  (normalement, cela se fait
  par : /etc/lilo/install). Si vous bootez  partir d'une disquette, en
  avez-vous cr une nouvelle et bien utilise ?


  44..55..22..  nnooyyaauu yy ssoonntt bbiieenn iinncclluuss DDeeuuxxiimmee ppooiinntt :: SSooyyeezz ssrr qquuee lleess
  ppiillootteess ssoonn dduu


  La faon la plus simple de vrifier ceci est de controler ce que
  contient /dev/sndstat comme cela a t dcrit prcdemment. Si il
  semble y avoir un problme, alors quelque chose s'est mal droul
  pendant la configuration ou la construction du nouveau noyau.


  44..55..33..  TTrrooiissiimmee ppooiinntt :: EEsstt--ccee qquuee llee nnooyyaauu aa bbiieenn ddtteecctt vvoottrree
  ccaarrttee ssoonn ppeennddaanntt llee ddmmaarrrraaggee ??


  Soyez certain que votre carte son a bien t dtecte lors du
  dmarrage. Vous avez d voir un message lors de la phase de boot. Vous
  pouvez retrouvez les messages du dernier dmarrage en utilisant la
  commande dmesg :



       % dmesg




  ou



       % tail /var/adm/messages





  Si votre carte n'a pas t trouve, c'est que quelque chose s'est mal
  pass. Soyez certain que votre carte est rellement installe ! Si
  elle fonctionne sous DOS, vous pouvez supposer qu'elle va fonctionner
  sous Linux, et qu'il doit y avoir un problme au niveau de la
  configuration du noyau. Soit vous avez configur une mauvaise carte ou
  de mauvais paramtres, soit votre carte n'est supporte par aucun des
  pilotes son du noyau Linux...

  Une possibilit est que votre carte ncessite une initialisation par
  le pilote DOS. Essayez sous DOS d'initialiser votre carte avec le
  pilote fourni par le constructeur de la carte. Ensuite, rebootez 
  chaud en utilisant Control-Alt-Delete. Vrifiez bien que que les
  adresses d'E/S, de DMA, et les numros d'IRQ sont les mmes sous Linux
  et sous DOS. Consultez le fichier Readme.cards dans les sources du
  pilote son Linux pour connatre les dtails de configuration de votre
  carte.

  Si votre carte n'est pas mentionne dans ce document, il est possible
  que le pilote son de Linux ne la supporte pas. Vous pouvez consulter
  les rfrences listes  la fin de ce document pour obtenir de l'aide.


  44..55..44..  QQuuaattrriimmee ppooiinntt :: AArrrriivveezz--vvoouuss  lliirree ddeess ddoonnnneess eenn pprroovvee
  nnaannccee dduu ddsspp ??


  Essayez d'enregistrer des sons en provenance de /dev/audio en
  utilisant la commande dd dont on a dj parl dans ce document.

  Si a ne fonctionne pas, alors il y a probablement un conflit d'IRQ ou
  de DMA, ou une incompatibilit matrielle (le priphrique n'est pas
  support par Linux ou le pilote n'est pas configur pour le bon
  priphrique).

  Une autre possibilit est d'avoir un matriel dfectueux. Testez cette
  carte sous DOS pour vrifier !


  44..55..55..  QQuuooii eennccoorree......


  Si a ne marche toujours pas, voici quelques suggestions sur ce que
  vous devriez faire :


    relisez soigneusement ce HOWTO !

    consultez les rfrences  la fin de ce document, et
     particulirement les pages Web de d'Hannu Savolainen et les
     fichiers Readme prsents dans les sources du noyau.

    postez une question prcise et dtaille dans fr.comp.os.linux en
     n'oubliant pas de prciser que vous avez pralablement lu ce HOWTO
     (ndt : :-}  )

    effectuez quelques recherches sur le web ou dans les news avec un
     moteur de recherche comme  <http://altavista.digital.com>

    essayez d'utiliser un noyau Linux plus rcent

    envoyez un email  l'auteur du pilote son de votre carte

    lancez emacs et tapez Esc-x doctor :-)



  55..  AApppplliiccaattiioonnss uuttiilliissaanntt llee ssoonn


  Je donne ici quelques exemples d'applications que vous aimerez
  peut-tre avoir si vous possdez une carte son sous Linux. Pour avoir
  des informations plus fraches, vous pouvez consulter la Linux
  Software Map, les sites d'archives Internet, et/ou les fichiers
  disponibles dans votre CD-ROM Linux.

  Voici quelques programmes  possder :


    un utilitaire de conversion de format des fichiers son (par ex.
     Sox)

    un utilitaire de mixage (par ex. aumix ou xmix)

    un lecteur/enregistreur de fichiers sons (par ex. play ou wavplay)

    un lecteur de fichiers MOD (par ex. tracker)

    un lecteur de fichiers MIDI (par ex. playmidi)

  Pour chacun de ces outils, il existe souvent aussi bien une version
  graphique qu'un version texte. Vous trouverez galement quelques
  applications plus sotriques (comme des utilitaires de synthse ou de
  reconnaissance vocale) qu'il peut-tre amusant d'essayer...


  66..  RRppoonnsseess aauuxx QQuueessttiioonnss FFrrqquueemmmmeenntt PPoosseess


  Ce paragraphe rpond  des questions qui sont souvent poses dans les
  forums de discussion et les listes de diffusion.

  Des rponses  d'autres questions peuvent galement tre trouves sur
  la page web des pilotes son OSS.


  66..11..  QQuueellss ssoonntt lleess ddiiffffrreennttss ffiicchhiieerrss ddee pprriipphhrriiqquueess lliiss aauu ssoonn
  ??


  Ce sont des noms le plus souvent "standard", mais certaines
  distribtutions Linux peuvent avoir choisi des noms diffrents.


     //ddeevv//aauuddiioo
        lien symbolique vers /dev/audio0

     //ddeevv//aauuddiioo00
        priphrique audio compatible avec les stations Sun (dans une
        implmentation partielle seulement : il n'y a pas de support de
        l'interface ioctl Sun, uniquement l'encodage u-law)

     //ddeevv//aauuddiioo11
        second priphrique audio (pour certaines cartes son ou si vous
        en avez deux)

     //ddeevv//ddsspp
        normalement, c'est un lien symbolique vers /dev/dsp0

     //ddeevv//ddsspp00
        premier priphrique d'chantillonage


     //ddeevv//ddsspp11
        second priphrique d'chantillonage

     //ddeevv//mmiixxeerr
        lien vers /dev/mixer0

     //ddeevv//mmiixxeerr00
        premier mixeur son

     //ddeevv//mmiixxeerr11
        second mixeur son

     //ddeevv//mmuussiicc
        interface squenceur de haut niveau

     //ddeevv//sseeqquueenncceerr
        accs bas niveau pour MIDI, FM et GUS

     //ddeevv//sseeqquueenncceerr22
        normalement, lien vers /dev/music

     //ddeevv//mmiiddii0000
        premier port MIDI

     //ddeevv//mmiiddii0011
        second port MIDI

     //ddeevv//mmiiddii0022
        troisime port MIDI

     //ddeevv//mmiiddii0033
        quatrime port MIDI

     //ddeevv//ssnnddssttaatt
        indique l'tat du pilote son

  Le pilote pour haut-parleur PC fournit les fichiers de priphriques
  suivant :


     //ddeevv//ppccaauuddiioo
        quivalent  /dev/audio

     //ddeevv//ppccsspp
        quivalent  /dev/dsp

     //ddeevv//ppccmmiixxeerr
        quivalent  /dev/mixer


  66..22..  CCoommmmeenntt ppuuiiss--jjee jjoouueerr uunn ffiicchhiieerr ssoonn ??


  Les fichiers son provenant des stations Sun (.au) peuvent tre envoys
  directement dans /dev/audio. Les fichiers son bruts doivent tre
  envoys dans /dev/dsp, de prfrence en utilisant un utilitaire prvu
   cet effet (play). Sinon, le rsultat risque d'tre de pitre
  qualit.

  Les programmes comme wavplay ou vplay (dans le paquetage snd-util)
  donneront leurs meilleurs rsultats avec des fichiers WAV. Par contre,
  ils ne reconnaissent pas les fichiers WAV Microsoft compresss avec
  ADPCM. Les anciennes versions de play (dans le paquetage Lsox)
  fonctionnent mal avec les fichiers WAV 16 bits.


  Le programme splay du paquetage snd-util peut tre utilis pour jouer
  la plupart des fichiers son si les paramtres corrects sont spcifis
  en ligne de commande.


  66..33..  CCoommmmeenntt ffaaiirree ppoouurr eennrreeggiissttrreerr uunn ssoonn ??


  La lecture de /dev/audio ou /dev/dsp fournira des donnes
  chantillones qui peuvent tre rediriges vers un fichier. Un
  programme tel que vrec facilite le rglage de la frquence
  d'chantillonage, la dure d'enregistrement, etc. Vous aurez aussi
  certainement besoin d'un programme de mixage pour slectionner
  l'entre son aproprie.


  66..44..  AAvvooiirr pplluuss dd''uunnee ccaarrttee ssoonn


  Avec le piloye son actuel, il est possible d'avoir plusieurs
  SoundBlaster, SoundBlaster/Pro, SoundBlaster16, MPU-401 ou cartes MSS
   la fois sur votre systme. L'installation de deux SoundBlaster est
  possible en dfinissant les macros SB2_BASE, SB2_IRQ, SB2_DMA et dans
  certains cas SB2_DMA2 dans le fichier local.h. Il est aussi possible
  d'avoir en mme temps une SoundBlaster et une PAS16.

  Avec les nouveaux noyaux 2.0.X qui utilisent make config, vous devez
  diter /usr/include/linux/autoconf.h  la place de local.h. Aprs la
  section contenant les lignes :



       #define SBC_BASE 0x220
       #define SBC_IRQ (5)
       #define SBC_DMA (1)
       #define SB_DMA2 (5)
       #define SB_MPU_BASE 0x0
       #define SB_MPU_IRQ (-1)




  ajoutez ceci (avec des valeurs correctes pour votre systme) :



       #define SB2_BASE 0x330
       #define SB2_IRQ (7)
       #define SB2_DMA (2)
       #define SB2_DMA2 (2)




  Les pilotes suivants ne permettent pas d'instances multiples :


    GUS (limitation du pilote)

    MAD16 (limitation matrielle)

    AudioTrix Pro (limitation matrielle)

    CS4232 (limitation matrielle)


  66..55..  EErrrroorr:: NNoo ssuucchh ffiillee oorr ddiirreeccttoorryy ffoorr ssoouunndd ddeevviicceess


  Vous devez crer les fichiers de priphriques du pilote son.
  Consultez la section concerne. Si vous avez dj ces fichiers,
  assurez-vous qu'ils possdent bien les nombres majeur et mineur
  corrects (certaines distributions obsoltes de Linux crent des
  fichiers de priphriques incorrects durant l'installation).


  66..66..  EErrrroorr:: NNoo ssuucchh ddeevviiccee ffoorr ssoouunndd ddeevviicceess


  Vous avez dmarr votre machine avec un noyau non configur pour le
  son, ou alors, les adresses d'E/S configures dans votre noyau ne
  correspondent pas  celles de votre marriel. Vrifiez que vous
  utilisez bien votre noyau fraichement compil et qu'il a t
  correctement configur avec des paramtres correspondant  votre
  matriel.


  66..77..  EErrrroorr:: NNoo ssppaaccee lleefftt oonn ddeevviiccee ffoorr ssoouunndd ddeevviicceess


  Ceci peut arriver si vous tentez d'envoyer des donnes vers /dev/audio
  ou /dev/dsp sans crer le fichier de priphrique adquat. Ce fichier
  est alors un fichier normal qui a rempli votre disque-dur !!! Vous
  devez excuter le script mentionn dans la section _C_r__a_t_i_o_n _d_e_s
  _f_i_c_h_i_e_r_s _d_e _p__r_i_p_h__r_i_q_u_e_s.

  Cela peut galement arriver avec Linux 2.0.x s'il n'y a pas
  suffisamment de mmoire vive sur votre machine lorsque le fichier de
  priphrique est ouvert. Le pilote audio a besoin d'au moins deux
  pages (de 8 ko) contigus de mmoire vive physique pour chaque canal
  DMA.  Cela peut arriver avec des machines ayant moins de 16 Mo de RAM
  ou qui tournent sans discontinuer depuis trs longtemps. Il est
  possible de librer de la mmoire vive en compilant et en xcutant ce
  programme C avant d'ouvrir le fichier de priphrique :




       main() {
         int i;
         char mem[500000];
         for (i = 0; i < 500000; i++)
           mem[i] = 0;
         exit(0);
       }





  66..88..  EErrrroorr:: DDeevviiccee bbuussyy ffoorr ssoouunndd ddeevviicceess


  Un priphrique son ne peut tre ouvert que par un seul processus  la
  fois. Il y a certainement un processus qui utilise dj la carte son.
  Une faon de le savoir est d'utiliser la commande fuser :






  % fuser -v /dev/dsp
  /dev/dsp:             USER       PID ACCESS COMMAND
                        tranter    265 f....  tracker




  Dans cet exemple, la commande fuser montre que le processus numro 256
  a dj ouvert le priphrique.  Vous devez alors attendre que ce
  processus finisse son travail ou alors, le tuer (avec kill). Pour
  connatre les processus d'un utilisateur autre que vous, il faut tre
  root pour utiliser la commande fuser.


  66..99..  JJ''aaii eennccoorree uunnee eerrrreeuurr ddee ttyyppee ``ddeevviiccee bbuussyy'' ((pprriipphhrriiqquuee
  ooccccuupp)) !!


  Selon Brian Gough, il existe un conflit potentiel entre les
  SoundBlaster utilisant le canal DMA 1 et les lecteurs de bandes QIC-02
  utilisant le mme canal. D'o des erreurs de type "device busy". Si
  vous utilisez FTAPE, il se peut que le pilote concern soit actif.
  Selon le FTAPE-HOWTO, le pilote du QIC-02 n'est pas ncessaire pour
  utiliser FTAPE. Il y a seulement besoin du pilote du QIC-117. Vous
  devez donc reconfigurer votre noyau pour qu'il utilise le bon pilote.


  66..1100..  LLeeccttuurree iinnccoommppllttee dd''uunn ffiicchhiieerr dd''cchhaannttiilllloonnss aauuddiioo


  Habituellement, cela se traduit par l'arrt de la lecture au bout
  d'une seconde environ, avec un message d'erreur du type "missing IRQ"
  ou "DMA timeout". Il s'agit certainement d'une mauvaise configuration
  de l'IRQ ou du canal DMA. Vrifiez que le noyau est bien configur et
  qu'il n'y a pas de conflit d'adresse avec d'autres cartes.

  Un autre symptme est une lecture en boucle. Ceci est souvent li  un
  conflit d'IRQ.


  66..1111..  IIll yy aa ddeess ppaauusseess lloorrss ddee llaa lleeccttuurree dd''uunn ffiicchhiieerr MMOODD


  La lecture des fichiers MOD ncessite beacoup de ressources CPU. Il se
  peut que vous ayez trop de processus en cours ou bien que votre
  ordinateur soit trop lent pour une lecture en temps rel.  Vous pouvez
  alors:


    tenter une lecture avec un taux d'chantillonage plus faible ou en
     mono

    supprimer des processus

    acheter un ordinateur plus rapide :-)

    acheter une carte son plus puissante (comme la Gravis UltraSound)

  Si vous avez une Gravis UltraSound, vous avez intrt  utiliser un
  des lecteurs mod conus spcifiquement pour la GUS (par ex. gmod).


  66..1122..  EErrrreeuurrss ddee ccoommppiillaattiioonn dd''aapppplliiccaattiioonnss uuttiilliissaanntt llee ssoonn



  Les version 1.0c et antrieures du pilote son utilisent des appels
  ioctl() incompatibles. Rcuprez des sources plus rcentes ou
  effectuez les modifications ncessaires pour l'adapter au nouveau
  pilote son. Voyez le fichier Readme du pilote son pour plus de
  dtails...

  Soyez galement certain que vous avez utilis la dernire version de
  soundcard.h et ultrasound.h en compilant votre application. Voyez
  comment les installer au dbut de ce document.


  66..1133..  SSEEGGVV eenn uuttiilliissaanntt ddeess eexxccuuttaabblleess qquuii ffoonnccttiioonnnnaaiieenntt aavvaanntt


  Il s'agit certainement du mme problme que prcdemment.


  66..1144..  QQuueellss ssoonntt lleess bbuuggss ccoonnnnuuss eett lleess lliimmiittaattiioonnss ddaannss llee ppiilloottee
  ssoonn ??


  Ils sont partiellement rpertoris dans le _H_a_c_k_e_r_'_s _G_u_i_d_e _t_o _V_o_x_W_a_r_e,
  actuellement disponible sous forme provisoire. La dernire version est
  la "draft 2" disponible sur
  <ftp://nic.funet.fi/pub/Linux/ALPHA/sound/>. Notez que ce rpertoire
  est cach et n'apparatra pas  moins d'y accder directement avec la
  commande "cd" de FTP.

  Lors de la rdaction de ce document, de nouvelles documentations
  taient disponibles sur le site web de 4Front Technologies.

  Une autre source d'information est le Guide du Multimdia sous Linux
  (ndt: traduit en Franais par Eric Dumas). Voir les rfrences dans ce
  document.


  66..1155..  oouu jjoouueerr ddeess ffiicchhiieerrss ssoonn ssaannss ppaauussee ??  QQuueelllleess rreessssoouurrcceess pprroo
  cceesssseeuurr ssoonntt--eelllleess nncceessssaaiirreess ppoouurr eennrreeggiissttrreerr


  Il n'existe pas de rponde immdiate  cette question.  Cela dpend
  de:


    la technique utilise : chantillonage PCM ou synthse FM

    la frquence d'chantillonage et la taille des chantillons

    l'application utilise pour jouer et enregistrer

    la carte son utilise

    la vitesse du disque dur, la vitesse du processeur, la taille du
     cache, etc.

  En gnral, les machines  base de 386 peuvent jouer des chantillons
  ou faire de la synthse FM sur des cartes 8 bits sans problme.

  Jouer des fichiers MOD ncessite plus de ressources CPU. Des mesures
  exprimentales ont montr que la lecture d'un fichier son  44 khz
  utilise plus de 40% des ressources processeur d'un 486/50 et qu'un
  386/25 peut difficilement jouer plus rapidement que 22 khz (ceci pour
  des cartes 8 bits de type SondBlaster...). Une carte comme la Gravis
  UltraSound a plus de fonctions implmentes au niveau physique et
  ncessitera donc moins de ressources CPU.

  (ndt: actuellement, on peut considrer que toute machine moderne, 
  base de pentium ou suprieur est capable d'enregistrer et de jouer des
  fichiers son en qualit "CD" : 44 khz/16 bits)

  Ces considrations supposent que vous n'xcutez par simultanment un
  processus gourmant en ressources CPU !!!

  La conversion de fichiers son ou le calcul d'effets sonores par des
  utilitaires comme sox est galement plus rapide si vous possdez un
  coprocesseur arithmtique (intgr ou non dans le processeur).  Le
  pilote son quant  lui n'effectue pas de calculs en virgule flottante.


  66..1166..  PPrroobbllmmeess aavveecc llaa PPAASS1166 eett ll''aaddaappttaatteeuurr SSCCSSII AAddaapptteecc 11554422


  (les explications suivantes ont r fournies par seeker@indirect.com)

  Linux reconnat seulement la 1542  l'adresse 330 (par dfaut) ou 334,
  et la PAS autorise l'mulation MPU-401  l'adresse 330 uniquement.  Le
  conflit subsiste mme si vous avez dsactiv l'utilisation MPU-401 par
  voie logicielle. Passez la 1542  l'adresse 334 rendera tout le monde
  heureux...


  De plus, la 1542 et la PAS-16 utilisent toutes les deux un DMA 16
  bits. Donc, si vous chantillonez  44,1 khz en 16 bits stro et que
  vous sauvez le fichier sur un disque SCSI pilot par la 1542, vous
  aurez certainement des problmes. Les canaux DMA dbordent et la
  mmoire vive ne se rafrachit pas assez vite. Vous obtenez alors un
  message d'erreur : "PARITY ERROR - SYSTEM HALTED", sans explication
  sur ce qui s'est pass. Encore pire : certains revendeurs de lecteurs
  de bandes QIC-117 recommendent de rgler pour le bus des dlais
  "on/off" tels que la 1542 est active plus longtemps qu'en utilisation
  normale. Procurez-vous le programme SCSISEL.EXE sur le BBS d'Adaptec
  ou  d'autres endroits sur Internet et rduisez la dure "on" du bus,
  ou augmentez sa dure "off" jusqu' ce que le problme disparaisse.
  SCSISEL.EXE modifie les rglages de l'EEPROM et les modifications
  apportes fonctionneront donc au prochain redmarrage sous Linux.


  Dernier problme - les vieilles puces Symphony rduisent de manire
  importante les priodes de cycle I/O pour acclerer les accs au bus.
  Aucune des cartes essayes ne produit de problmes avec ces courtes
  priodes de cycle, sauf pour la PAS-16. Le BBS de Media Vision propose
  le programme SYMPFIX.EXE qui est suppos rsoudre le problme en
  utilisant un bit de diagnostic dans le controleur de bus Symphony,
  mais cela ne procure aucune garantie matrielle. Vous devrez peut-tre
  :


    contacter le distributeur de la carte-mre pour remplacer la
     vieille puce incrimine

    changer de carte-mre ou...

    acheter une autre carte-son !



  Le premier problme dpend de la puce utilise sur votre carte-mre,
  de la vitesse du bus et des paramtres du BIOS, et de la phase de la
  lune.  Le second problme dpend de l'option de rafrachissement
  (cach ou synchronis), de la frquence de rafrachissement du DMA de
  la 1542 et ventuellement de celui du bus d'E/S. Le troisime problme
  peut-tre dtermin en appellant Media Vision et en leur demandant
  quelle catgorie de puce Symphony est incompatible avec leur design...



  66..1177..  EEsstt--iill ppoossssiibbllee ddee lliirree eett ddee jjoouueerr ddeess cchhaannttiilllloonnss ssoonnoorreess
  ssiimmuullttaannmmeenntt ??


  A cause de certaines limitation matrielles, ceci est impossible sur
  beaucoup de cartes-son. Certaines cartes rcentes offrent cette
  possibilit. Pour plus d'informations, Consultez la section concernant
  le "mode bidirectionnel" dans le _H_a_c_k_e_r_'_s _G_u_i_d_e _t_o _V_o_x_w_a_r_e.


  66..1188..  MMaa SSBB1166 eesstt rreeggllee eenn IIRRQQ 22,, mmaaiiss llee pprrooggrraammmmee ddee ccoonnffiigguurraattiioonn
  nnee ppeerrmmeett ppaass cceettttee vvaalleeuurr..


  Sur les machines  base de 286, l'IRQ 2 est quivalente  l'IRQ 9.
  Spcifiez IRQ 9 dans la configuration.


  66..1199..  EEsstt--ccee qquuee lleess SSoouunnddBBllaasstteerr AAWWEE3322 eett SSoouunnddBBllaasstteerr1166 AASSPP ssoonntt
  ssuuppppoorrtteess ??


  Dans le pass, Creative Labs ne souhaitait pas divulguer les
  informations techniques permettant de programmer leurs cartes. Depuis,
  ils ont chang de politique et un pilote pour AWE est maintenant
  inclus dans les noyaux 2.1.x.


  66..2200..  SSii jj''uuttiilliissee LLiinnuuxx eett qquuee jjee rreellaannccee llee DDOOSS eennssuuiittee,, jj''oobbttiieennss
  ddeess eerrrreeuurrss eett//oouu cceerrttaaiinneess aapppplliiccaattiioonnss nnee ffoonnttiioonnnneenntt pplluuss ccoorrrreeccttee
  mmeenntt..


  Cela arrive aprs un redmarrage  chaud sur DOS. Parfois, le message
  d'erreur met en cause un mauvais fichier CONFIG.SYS.

  Une rapide solution  ce problme est de procder  un redmarrage
  complet en utilisant le bouton reset ou en coupant le secteur plutot
  qu'un redmarrage  chaud (en utilisant Control-Alt-Del). (N.d.t.:
  dans les nouvelles versions de linux, le redmarrage par Control-Alt-
  Del provoque normalement une rinitialisation totale de la machine,
  quivalente au "reset" matriel )

  La bonne solution est d'utiliser les mmes rglages d'IRQ et de DMA
  sous DOS et Linux (ou de ne pas utiliser DOS :-) ).


  66..2211..  PPrroobbllmmeess aavveecc DDOOOOMM ssoouuss LLiinnuuxx


  Ceux qui utilisent le portage de DOOM pour Linux ralis par ID
  Software peuvent tre intresss par ces notes.

  Pour une sortie son correcte, vous devez utiliser la version 2.90 ou
  suprieure du pilote son : il a t conu pour supporter le mode
  temps-rel de DOOM.

  Les chantillons sonores sont en 16 bits. Si vous avez une carte son 8
  bits vous pouvez quand mme utiliser le son en rcuprant plusieurs
  programmes disponibles sur
  <ftp://sunsite.unc.edu/pub/Linux/games/doom>.

  Si DOOM rme sur votre systme, dsactiver le son (en renommant le
  fichier sndserver) peut augmenter les performances.

  Par dfaut, DOOM ne supporte pas la musique sous Linux. Le programme
  musserver y remdie. On peut le trouver sur
  <ftp://pandora.st.hmc.edu/pub/linux/musserver.tgz>.


  66..2222..  CCoommmmeenntt rrdduuiirree lleebbrruuiitt pprroodduuiitt ppaarr mmaa ccaarrttee ssoonn ??


  Utilisez des cbles de liaison blinds et de bonne qualit, essayez de
  placer votre carte dans des slots diffrents. Si la carte a un control
  de volume, modifiez ce rglage.

  Utilisez galement un programme "mixeur" pour vous assurer que les
  entres inutiles (comme le micro) sont dsactives.

  Mais certaines cartes sont mal blindes et mal relies  la terre et
  produisent naturellement beaucoup de bruit.

  Enfin, sur mon systme, j'ai dcouvert qu'utiliser l'option de
  configuration no-hlt rduisait le niveau de bruit. Cette commande
  force le noyau  ne pas utiliser l'instruction halt quand il xcute
  le processus "idle" (ndt : c'est  dire, quand le systme n'a rien 
  faire). Vous pouvez utiliser ceci manuellement au dmarrage ou le
  spcifier dans le fichier de configuration de LILO avec la commande :
  append="no-hlt"


  66..2233..  JJee ppeeuuxx jjoouueerr ddeess ssoonnss cchhaannttiilllloonnss,, mmaaiiss ppaass eenn eennrreeggiissttrreerr


  Si vous pouvez jouer des sons mais pas en enregistrer, essayez ceci :


    utilisez un programme mixeur de son pour slectionner le
     priphrique appropri (par exemple, un micro)

    avec le mme mixeur, positionnez le gain d'entre du priphrique
     au maximum

    Si vous le pouvez, essayez de tester l'enregistrement du son sous
     DOS afin de dterminer s'il existe ou non un problme de matriel

  Parfois, deux canaux DMA diffrents sont utiliss pour
  l'enregistrement et la lecture. Dans ce cas, il est assez probable que
  le canal DMA spcifi pour l'enregistrement n'est pas correct.


  66..2244..  MMaa ccaarrttee ""ccoommppaattiibbllee"" ffoonnccttiioonnnnee sseeuulleemmeenntt ssii jjee ll''iinniittiiaalliissee
  pprraallaabblleemmeenntt ssoouuss DDOOSS..


  Dans la plupart des cas, une carte "compatible SoundBlaster"
  fonctionnera mieux sous Linux si elle est configure avec un pilote
  autre que celui destin  la vritable SoundBlaster. Beaucoup de
  cartes se disent "compatibles SoundBlaster" mais bien souvent, ce mode
  SoundBlaster est seulement un bidouillage prvu pour la compatibilit
  avec les jeux sous DOS. Beaucoup de cartes possdent un mode 16 bits
  natif qui est facilement support par les version rcentes du noyau
  Linux (2.0.1 et plus).

  Pour d'autres cartes plus anciennes, il sera ncessaire d'essayer de
  les faire fonctionner dans le mode SoundBlaster. Les seules cartes
  rcentes qui font exception  cette rgle sont les cartes bases sur
  Mwave.


  66..2255..  mmooddee 88--bbiittss ssoouuss LLiinnuuxx..  MMaa ccaarrttee ssoonn 1166 bbiittss ""ccoommppaattiibbllee
  SSoouunnddBBllaasstteerr"" ffoonnccttiioonnnnee sseeuulleemmeenntt eenn


  Les cartes son 16 bits dites "compatible SoundBlaster" ne sont
  vritablement qu'avec le mode 8 bits SoundBlaster Pro. Elles possdent
  en gnral un mode 16 bits qui n'est compatible ni avec la
  SoundBlaster 16, ni avec le noyau Linux.

  Vous arriverez peut-tre  faire fonctionner votre carte en mode 16
  bits en utilisant les pilotes MAD16 ou MSS/WSS.


  66..2266..  OO ppuuiiss--jjee ttrroouuvveerr ddeess llooggiicciieellss ddee ssoonn ssoouuss LLiinnuuxx ??


  Voici quelques bons sites d'archive intressants pour les applications
  utilisant le son sous Linux :


    <ftp://sunsite.unc.edu:/pub/Linux/kernel/sound/>

    <ftp://sunsite.unc.edu:/pub/Linux/apps/sound/>

    <ftp://tsx-11.mit.edu:/pub/linux/packages/sound/>

    <ftp://nic.funet.fi:/pub/Linux/util/sound/>

    <ftp://nic.funet.fi:/pub/Linux/xtra/snd-kit/>

    <ftp://nic.funet.fi:/pub/Linux/ALPHA/sound/>



  66..2277..  EEsstt--ccee qquuee llee ppiilloottee ddee ssoonn ppeeuutt--ttrree ccoommppiill ccoommmmee mmoodduullee
  cchhaarrggeeaabbllee ??


  Ceci est possible pour les versions rcentes du noyau.

  Consultez les fichiers /usr/src/linux/drivers/sound/Readme.modules et
  /usr/src/linux/Documentation/modules.txt (ou /usr/src/linux/README)
  pour plus d'informations.


  66..2288..  PPuuiiss--jjee uuttiilliisseerr mmaa ccaarrttee ssoonn ppoouurr rreemmppllaacceerr llee ""bbiipp"" pprroodduuiitt
  ppaarr mmaa ccoonnssoollee ??


  Essayez le programme oplbeep que l'on peut trouver sur
  <ftp://sunsite.unc.edu/pub/Linux/kernel/patches/misc/modreq_beep.tgz>

  Une variante est le programme beep que vous trouverez sur
  <ftp://sunsite.unc.edu/pub/Linux/kernel/patches/misc/modreq_beep.tgz>

  Le paquetage modutils contient un exemple de programme et de patch
  pour le noyau qui permettent d'appeller un programme externe donn
  afin de gnrer des sons sur requte du noyau.

  De plus, il est possible avec certaines cartes son d'y connecter la
  sortie du haut-parleur PC de telle manire que tous les sons passent
  par les haut parleurs de la carte.

  66..2299..  QQuu''eesstt--ccee qquuee VVooxxWWaarree ??


  Les pilotes son du noyau supportent diffrentes sortes de systmes
  Unix/x86 et sont donc disponibles en tant que paquetage indpendant du
  noyau Linux.  Jusqu' Fvrier 1996, les auteurs ont appell ce
  programme "Voxware".  Malheureusement, ce nom tait dj dpos par
  VoxWare Incorporated et ne pouvait donc plus tre utilis. Ces pilotes
  s'appellent maintenant OSS/Free.

  L'Open Sound System (OSS) est un pilote son distribu de manire
  commerciale pour plusieurs systmes Unix par 4Front Technologies. La
  version gratuite, connue sous le nom d'OSS/Free, continuera d'tre
  disponible gratuitement pour Linux.

  D'autres noms utiliss par le pass et se rferrant au mme pilote son
  sont : TASD (Temporarily Anonymous Sound Driver) et USS (Unix Sound
  System).

  Pour de plus amples informations, consultez la page web de 4Front
  Technologies sur  <http://www.4front-tech.com/>. J'ai cris une
  prsentation d'OSS/Linux dans le numro de juin 1997 de Linux Journal
  (n.d.t. : en anglais).


  66..3300..  EEsstt--ccee qquuee lleess ccaarrtteess ssoonn PPlluugg && PPllaayy ssoonntt ssuuppppoorrtteess ??


  La totalit des fonctions Plug & Play devrait tre disponible dans les
  version 2.1 du noyau Linux. En attendant, il existe de nombreux essais
  de support Plug & Play.

  Si vous possdez un systme Pentium rcent avec un BIOS Plug & Play,
  il devrait pouvoir pouvoir configurer vos cartes. Prennez garde de
  configurer le pilote son de Linux avec les mmes paramtres d'E/S,
  d'IRQ et de canal DMA que dans le BIOS.

  Il existe un paquetage d'outils Plug & Play pouvant tre utiliss pour
  configurer les cartes. On peut le trouver sur le site
  <http://www.redhat.com/> (peut-tre se trouve t-il dj dans votre
  distribution Linux).

  Si vous utilisez votre carte sous Windows95, vous pouvez utiliser le
  gestionnaire de priphrique pour configurer la carte, puis dmarrer
  Linux aprs une rinitialisation  chaud en utilisant le programme
  LOADLIN. Vrifiez que les paramtres de configuration sont identiques
  sous les deux systmes.

  Si vous utilisez votre carte sous DOS, vous pouvez utiliser
  l'utilitaire icu qui est fourni avec les cartes SoundBlaster16 PnP
  afin de configurer votre matriel sous DOS. Utilisez le programme
  LOADLIN pour relancer Linux. Vrifiez ici encore que les paramtres
  sont identiques.

  (N.d.t. : dans un grand nombre de cas, on pourra se contenter de
  configurer sa carte PnP sous DOS avec l'utilitaire adquat pour les
  paramtres dsirs. Ensuite, la carte (mme teinte)  gardera en
  mmoire interne son paramtrage, et il ne sera pas ncessaire de
  repasser par DOS ni d'utiliser LOADLIN.EXE pour lancer Linux :-) ).

  La version commerciale du pilote son OSS supporte les SoundBlaster 16
  PnP.  Elle est disponible auprs de 4Front Technologies.




  66..3311..  SSooxx//PPllaayy//VVppllaayy iinnddiiqquuee :: ""iinnvvaalliidd bblloocckk ssiizzee 11002244""


  Une modification du pilote dans sa version 1.3.67 a rendu inoprants
  certains programmes son qui vrifiaient (abusivement) que le rsultat
  de la requte ioctl SNDCTL_DSP_GETBLKSIZE tait suprieure  4096.
  Les utilitaires prsents dans le dernier paquetage snd-util-3.x.tar.gz
  (sur  <ftp://ftp.4front-tech.com/ossfree>) grent maintenant ceci
  correctement. Les dernires versions du pilote son ont galement t
  modifies pour viter des fragments d'allocation plus petits que 4096
  octets, ce qui rsoud le problme avec les anciens utilitaires.


  66..3322..  PPoouurrqquuooii llee ppiilloottee ssoonn ppoossssddee--iill ssoonn pprroopprree pprrooggrraammmmee ddee ccoonn
  ffiigguurraattiioonn ??


  Le pilote son supporte un grand nombre de paramtres de configuration.
  Le programme configure inclus avec le pilote son vrifie les
  dpendances entre ces paramtres. Les outils utiliss pour configurer
  le noyau ne supportent pas ce niveau de fonctionalits.

  Cela dit, les derniers noyaux Linux permettent en partie d'utiliser
  les outils standard de configuration du noyau pour le pilote son
  (voyez la partie consacre  la "configuration du noyau").



  66..3333..  cchhaarrggee llee mmoodduullee dduu ppiilloottee ssoonn LLeess ppaarraammttrreess dduu mmiixxeeuurr ssoonntt
  rriinniittiiaalliissss  cchhaaqquuee ffooiiss qquuee jjee


  Il est possible de compiler le pilote son en tant que module
  chargeable par le noyau et utiliser kerneld pour un chargement et
  dchargement automatiques. Cela peut engendrer un problme. A chaque
  fois que le module est recharg, les paramtres du mixeur reprennent
  leur valeurs d'origine. Selon les cartes son, on peut alors obtenir un
  volume trop faible ou trop lev (par ex. SoundBlaster 16).  Markus
  Gutschke (gutschk@uni-muenster.de) a trouv une solution qui consiste
   inclure cette ligne dans le fichier /etc/conf.modules :



       options sound dma_buffsize=65536 && /usr/bin/setmixer igain 0 ogain 0 vol 75




  Cela force votre programme mixeur (dans notre cas, setmixer)  tre
  excut immdiatement aprs le chargement du pilote son. Le paramtre
  dma_buffsize est recquis par la commande option. Modifiez cela en
  fonction de votre programme mixeur et de vos rglages de gain.

  Si vous avez compil le pilote son en dur dans le noyau et que vous
  souhaitez rgler les diffrents gains du mixeur au dmarrage de Linux,
  vous pouvez effectuer l'appel au programme mixeur dans
  /etc/rc.d/rc.local.


  66..3344..  SSeeuull ll''uuttiilliissaatteeuurr rroooott ppeeuutt eennrreeggiissttrreerr ddeess ssoonnss


  Par dfaut, le script se trouvant dans Readme.linux qui cre les
  fichiers de priphriques son (/dev/...) autorise seulement l'accs 
  la carte son par root. Ceci afin de combler un trou de scurit
  potentiel. Dans un environnement rseau, des utilisateurs externes
  pourraient se connecter  votre machine et vous couter par
  l'intermdiaire de la carte son et d'un micro qui y serait raccord.
  Si vous vous en foutez, il suffit de changer les permissions des
  fichiers spciaux /dev/audio et /dev/dsp.

  Par contre, ce script autorise par dfaut n'importe quel utilisateur 
  jouer un chantillon sonore dans la carte. Ceci n'a aucune consquence
  sur la scurit mais peut se rvler plutt dsagrable.


  66..3355..  EEsstt--ccee qquuee lleess cciirrccuuiittss ssoonnoorreess ddee ll''IIBBMM TThhiinnkkPPaadd ssoonntt ssuupp
  ppoorrttss ??


  Vous trouverez des informations  ce sujet sur :
  <http://www.screamin.demon.co.uk/>.


  77..  RRffrreenncceess


  Si vous possdez une carte son qui supporte une interface SCSI ou CD-
  ROM, vous pourrez consulter les documents suivants :  SCSI HOWTO, CD-
  ROM HOWTO. Ces documents existent en version franaise.

  Le Sound-Playing HOWTO explique comment jouer diffrents types de
  fichiers son sous Linux.

  Le Ultrasound Plug'n'play Mini-HOWTO explique comment faire
  fonctionner sa Gravis Ultrasound PnP.

  Le Linux SoundBlaster 16 PnP Mini-HOWTO explique comment faire
  fonctionner sa SoundBlaster16 PnP sous Linux.

  Le Linux SoundBlaster AWE64 PnP Mini-HOWTO explique comment faire
  fonctionner sa SoundBlaster AWE64 sous Linux.

  (N.d.t. : consultez ces documents traduits en Franais sur : )

  Il existe un vieux document connu sous le nom de _H_a_c_k_e_r_'_s _G_u_i_d_e _t_o
  _V_o_x_W_a_r_e, et disponible sur
  <ftp://nic.funet.fi/pub/Linux/ALPHA/sound/>.  La plupart des
  informations ici prsentes ont t tires de la documentation
  disponible sur  <http://www.4front-tech.com/pguide>, mais la section
  concernant /dev/sequencer peut tout de mme vous tre utile.

  Les FAQs (Questions Frquemment Poses ou Foire Aux Questions !)
  suivantes sont rgulirement postes dans le forum Usenet
  news.announce et sont galement archives sur
  <ftp://rtfm.mit.edu/pub/usenet/news.answers> :


    PCsoundcards/generic-faq (Generic PC Soundcard FAQ)

    PCsoundcards/soundcard-faq (comp.sys.ibm.pc.soundcard FAQ)

    PCsoundcards/gravis-ultrasound/faq (Gravis UltraSound FAQ)

    audio-fmts/part1 (description des formats de fichiers Audio)

    audio-fmts/part2 (description des formats de fichiers Audio)

  (N.d.t.: voir galement les postages rguliers de FAQ dans le forum
  Usenet fr.comp.os.linux.annonces)


  Les FAQs vous indiquent galement plusieurs listes de diffusion
  spcifiques  certains matriels ainsi que leurs sites d'archives. Les
  forums Usenet suivant concernent le son et/ou la musique :


    alt.binaries.sounds.* (change de fichiers d'chantillons sonores)

    alt.binaries.multimedia (change de fichiers multimdia)

    alt.sb.programmer (programmation de la SoundBlaster)

    comp.multimedia ( propos de Multimdia)

    comp.music (thories et recherches sur la musique assiste par
     ordinateur)

    comp.sys.ibm.pc.soundcard.* (divers forums pour cartes son
     compatibles IBM PC)

  Un site web consacr au multimdia est consultable sur
  <http://viswiz.gmd.de/MultimediaInfo/>. Creative Labs a son site web
  sur  <http://www.creaf.com/>. MediaTrix galement sur
  <http://www.mediatrix.com/>.

  Il existe des listes de diffusion Linux consacres au son. Pour s'y
  abonner, envoyez un email  majordomo@vger.rutgers.edu avec, dans le
  corps du message, le mot "help". Ces listes sont en gnral destines
   des discussions relatives au dveloppement d'applications lies au
  son, pas aux question du genre "comment faire fonctionner ma
  SoundBlaster"...

  Rappelons une fois encore que les sources du noyau Linux contiennent
  un certain nombre de fichiers Readme trs utiles relatifs aux pilotes
  de carte son. Typiquement, on trouvera ces fichiers dans le rpertoire
  /usr/src/linux/drivers/sound.

  Le concepteur du pilote son, Hannu Savolainen, peut tre contact par
  email  hannu@voxware.pp.fi.  Il possde galement un site web sur
  <http://personal.eunet.fi/pp/voxware>.

  Les informations relatives  OSS, la version commerciale du pilote son
  pour Linux et autres Unix, sont consultables sur   <http://www.4front-
  tech.com/>, le site de 4Front Technologies.


  La carte des logiciels Linux ou _L_i_n_u_x _S_o_f_t_w_a_r_e _M_a_p (LSM) est un
  document inestimable pour rechercher un programme donn. Vous pouvez
  faire une recherche dans cette base avec un mot-clef tel que _s_o_u_n_d et
  identifier de cette faon toutes les applications grant les
  priphriques sonores. Ce document peut tre trouv sur un grand
  nombre de sites FTP et en particulier sur :
  <ftp://sunsite.unc.edu/pub/Linux/docs/LSM/>.

  Enfin, si vous voulez en apprendre davantage  propos de la
  programmation multimedia sous Linux (essentiellement d'applications
  grant les CD-ROM et les cartes son), consultez mon livre _L_e _G_u_i_d_e _d_u
  _M_u_l_t_i_m_e_d_i_a _s_o_u_s _L_i_n_u_x (n.d.t : traduction franaise d'Eric Dumas,
  numro ISBN : ISBN 2-84177-014-1) publi chez O'Reilly and Associates.
  Ce bouquin est en vente un peu partout, mais vous pouvez quand mme
  consulter la page Web d'Oreilly
  <http://www.oreilly.com/international/france/>.





  The Linux Sound Playing HOWTO
  Yoo C. Chung wacko@laplace.snu.ac.kr
  v1.6, 11 Aot 1998

  (Adaptation franaise par       Guillaume Bertucat guillaume@ibpc.fr
  et Raphal Gurlie raphael@ibpc.fr, 20 Janvier 1998).  Ce document est
  un inventaire des applications qui lisent diffrents formats de sons
  sous Linux.


  11..  IInnttrroodduuccttiioonn

  Ceci est le document Sound Playing HOWTO. Il fait l'inventaire des
  nombreux formats de son et des applications qui peuvent tre utilises
  pour les lire. Il donne aussi quelques trucs et conseils sur la
  manire d'utiliser ces applications. Il existe galement d'autres
  applications intressantes relatives au son, mais pas directement
  relies a la lecture de celui-ci. Cependant, ce document n'est _p_a_s un
  guide d'installation du support son sur un systme Linux. Pour obtenir
  des informations sur l'installation du support son sur votre systme
  Linux et les matriels supports, reportez-vous au Linux Sound HOWTO
  de Jeff Tranter.

  Ce document traite des applications son destines aux utilisateurs
  normaux. C'est  dire, qu'il ne s'intresse qu' ce que l'utilisateur
  moyen a besoin de savoir sur le cot applicatif du son, et non aux
  bizarreries exotiques comme la synthse vocale, ou aux problmes
  matriels qui sont traits dans le Sound HOWTO.



  11..11..  CCooppyyrriigghhtt ddee ccee ddooccuummeenntt

  Ce document peut tre distribu et modifi librement ( j'apprcierait
  cependant que toute modification me soit signale), aussi longtemps
  que cette note y est incluse.  Cependant, il ne peut lui tre appliqu
  d'autres restrictions, et une version modifie de ce document devra
  tre soumise au mme copyright que celui-ci.  De plus, le mrite doit
  tre rendu  qui de droit.



  11..22..  CCooppyyrriigghhtt ddeess aapppplliiccaattiioonnss iinnvveennttoorriieess

  S'il n'est fait mention d'aucun copyright, alors l'application est
  sous GNU General Public License.



  11..33..  OO ttrroouuvveerr ccee ddooccuummeenntt

  La version officielle la plus rcente de ce document peut tre obtenue
  auprs du Linux Documentation Project <http://sunsite.unc.edu/LDP/>.
  La version non officielle la plus rcente de ce document peut tre
  obtenue auprs de <http://laplace.snu.ac.kr/~wacko/howto/>.

  Une version Corenne de ce document (trs ancienne) est disponible 
  <http://laplace.snu.ac.kr/~wacko/howto/Sound-Playing-HOWTO.ks>.

  Une version Japonaise de ce document est disponible 
  <http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/euc/Sound-Playing-HOWTO.euc>.





  11..44..  RReemmaarrqquueess eett ccoommmmeennttaaiirreess

  Je ne suis pas omniscient, et je n'utilise pas toutes les applications
  cites ci aprs (je n'ai mme pas pu essayer certaines d'entre elles),
  par consquent il y a trs certainement des erreurs. De plus, comme
  les logiciels voluent en permanence, la documentation devient
  invariablement obsolte. C'est pourquoi, si vous trouvez quoi que ce
  soit d'erron, envoyez moi vos corrections.  Toute suggestion ou
  addition  ce document sont galement bienvenues.  (NdT : toute
  remarque relative  la clart ou  la pertinence de la traduction est
  galement bienvenues.)



  11..55..  RReemmeerrcciieemmeennttss

  Merci aux auteurs des applications cites dans ce HOWTO.  Merci
  galement  Hannu Savolainen pour son super pilote son, et  Linus
  Torvalds pour avoir cr un OS fondamental.

  Je voudrais aussi remercier Raymond Nijssen (raymond@es.ele.tue.nl),
  Jeroen Rutten (jeroen@es.ele.tue.nl), Antonio Perez
  (aperez@arrakis.es), Ian Jackson (ijackson@gnu.org), et Peter Amstutz
  (amstpi@freenet.tlh.fl.us) pour leurs conseils et leur aide.



  22..  LLiirree ddiivveerrss ffoorrmmaattss ssoonn

  Il existe de nombreuses sortes de formats son (WAV, MIDI, MPEG etc.).
  Ci dessous, nous donnons une liste de ces divers formats, et des
  applications capables de les lire.



  22..11..  MMIIDDII

  MIDI signifie Musical Instrument Device Interface.  Les fichiers MIDI
  ont gnralement l'extension .mid. Il contiennent des informations sur
  les squences, c'est  dire des informations sur quand et de quelle
  manire jouer de quel instrument, etc. Selon votre matriel (et peut
  tre aussi le logiciel que vous utiliserez), le son pourra tre divin
  ou carrment pourrit.



  22..11..11..  AAddaaggiioo

  Ce paquetage contient mp (un lecteur de fichier MIDI en ligne de
  commande) et xmp (un lecteur de fichier MIDI bas sur Xview,  ne pas
  confondre avec le module de lecture galement appel xmp). Pour
  utiliser xmp vous aurez besoins des extensions SlingShot, qui
  contiennent galement d'autres programmes permettant de jouer les
  partitions d'Adagio.


  Si vous avez une GUS, vous pouvez galement lire les fichiers MOD avec
  mp (reportez-vous  la section ``Modules'' pour de plus amples
  informations sur les modules).

  Un petit bug gnant (cf version 0.5 sur certains matriels) fait que
  le son est ralenti  la fin. Plus prcisment, au lieu d'achever la
  piste sonore comme le spcifie le fichier MIDI, il termine en jouant
  l'avant dernire note dans un intervalle plus long. Cela ne m'a pas
  empch d'utiliser mp, mais cela dcouragera peut tre une utilisation
  plus pousse. Le dmarrage est aussi relativement lent.
  Le paquetage ne faisant mention d'aucun copyright (du moins je n'en ai
  pas trouv), je suppose qu'il peut tre redistribu et modifi. (une
  interprtation stricte de la loi sur les droit de distribution
  n'autorise personne  faire une telle supposition, mais je ne pense
  pas que telle tait l'intention de l'auteur.)

  C'est un portage du CMU MIDI Toolkit vers Linux (bien qu'il y ai
  suffisamment d'ajouts pour que ce qoit discutable ) de Greg Lee
  (lee@uhunix.uhcc.hawaii.edu).

  On peut le rcuperer sur
  <ftp://tsx-11.mit.edu/pub/linux/packages/sound/adagio05.tar.gz> . Les
  excutables inclus ici sont au format a.out (lis aux anciennes
  bibliothques), et l'excutable segfaults de xmp dans l'environnement
  X11R6 (XFree86 3.1.1, libc 4.7.2). L'excutable de mp fonctionne trs
  bien dans un environnement a.out.

  Le compiler vous cotera un peu de sueur, mais en fait pas tant que
  a. Tout ce que vous avez  faire, c'est d'inclure l'option -lfl  la
  fin de SHROBJ et XMPOBJ dans le Makefile. Ceci pour faire le lien avec
  la bibliothque flex, qui n'est pas lie par dfaut. Il ne vous reste
  alors plus qu' suivre les instructions d'installation. Et n'oubliez
  pas qu'il vous faudra avoir install les extensions Xview et SlingShot
  si vous dsirez compiler xmp.



  22..11..22..  TTiiMMiiddiittyy

  Certains recommandent ce programme _e_x_p_e_r_i_m_e_n_t_a_l en raison de la bonne
  la bonne qualit du son (ce qui est incontestablement vrai, C'est
  beaucoup mieux que mp sur une Sound Blaster 16, mme si la diffrence
  tend  disparaitre avec des cartes son possdant une table
  d'chantillons sonores comme les GUS). Cependant, il souffre d'une
  forte consomation CPU. Il lit le format MIDI en commenant par le
  convertir en WAV, puis il lit le WAV (vous pouvez galement seulement
  convertir un fichier MIDI en fichier WAV si vous voulez). Ceci
  explique qu'il soit gourmand en CPU.

  Il existe une interface optionnelle base sur ncurses, Slang, Tcl/Tk
  ou Motif.

  Pour utiliser cette application, vous aurez besoin des patchs Gravis
  Ultrasound. Pour de plus amples informations, consultez les FAQ
  incluses dans le paquetage TiMidity.

  L'auteur est Tuukka Toivonen (tt@cgs.fi).

  La dernire version de TiMidity est disponible sur la TiMidity home
  page <http://www.cgs.fi/~tt/timidity/>.  Cette page contient galement
  un lien vers une petite bibliothque pour patchs GUS



  22..11..33..  ppllaayymmiiddii

  Il s'agit d'un lecteur MIDI qui sort sous FM, GUS et MIDI externe. Il
  est suppos dmarrer plus rapidement que les autres lecteurs MIDI. Il
  peut galement lire les les fichiers Creative Music, Microsoft RIFF,
  et les grandes archives MIDI provenant de jeux comme Ultima 7.

  Il existe une interface X et une interface SVGA. Il y a aussi une
  option de playback en temps rel incluant le traage de toutes les
  notes sur chaque canal et du rythme du playback en cours (inclu
  automatiquement avec xplaymidi et splaymidi).

  Si vous utilisez l'interface SVGA, il vous faudra faire quelque chose
  comme



       $ splaymidi foo.mid; stty sane





  parce que l'initialisation du mode tty du terminal ne se fait pas
  proprement. Cette interface pourrait tre supprime dans un avenir
  proche.

  playmidi a t crit par Nathan Laredo (laredo@gnu.org or
  laredo@ix.netcom.com).

  On peut le rcupprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/playmidi-2.3.tar.gz>.



  22..22..  MMoodduulleess

  Les modules (en musique assiste par ordinateur) sont des fichiers de
  musique digitale, constitues d'un assortiment d'chantillons et
  d'informations de squence, qui signalent  l'utilisateur quand jouer
  quel chantillon (intrument), sur quelle piste, sur quel ton, et
  raliser un effet (optionnel) comme par exemple le vibrato.

  L'avantage par rapport au MIDI est qu'on peut inclure n'importe quel
  son (y compris les voix humaines).De plus, la sonorit est la mme
  quelle que soit la plateforme, car les chantillons sont inclus dans
  le module. L'inconvnient est que la taille des fichiers est nettement
  plus importante que celle des MIDI. Egalement, il n'y a pas vraiment
  de format standard (le seul vrai est le ProTracker, avec lequel de
  nombreux modules ne sont pas compatibles). Il provient d'Amiga.  Le
  format le plus rpandu est identifi par l'extension .mod. Il existe
  de nombreuses autres extensions, qui dpendent de leur format.



  22..22..11..  ttrraacckkeerr

  C'est un programme trs portable (il l'a t sur de nombreuses
  plateformes) qui lit les modules musicaux SoundTracker et ProTracker.
  Il utilise une sortie stro 16 bits, et je trouve sa qualit
  exellente. Si vous cherchez un moyen simple de rduire la consommation
  CPU, utilisez l'option -mono.

  Ce programme est un graticiel (selon l'auteur). Il a t crit par
  Marc Espie (Marc.Espie@ens.fr).

  Une version avec le Makefile dj configur pour Linux peut tre
  obtenue sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tracker-4.3-linux.tar.gz>.



  22..22..22..  ggmmoodd

  C'est un lecteur de modules musicaux pour carte Gravis UltraSound. Les
  formats supports sont 4/6/8 canaux MOD, 8 canaux 669, MultiTracker
  (MTM), UltraTracker (ULT), FastTracker (XM) et ScreamTracker III
  (S3M).
  Il ncessite un pilote son 3.0 ou ultrieur, et bien sr une GUS. Pour
  que le contrle du volume fonctionne de la manire voulue, il peut
  s'avrer ncssaire de modifier le noyau.

  Il possde une interface X qui ncessite le toolkit QT (version 0.99
  ou ultrieure). Connectez vous sur la QT toolkit homepage
  <http://www.troll.no/> pour de plus amples informations sur QT.

  Il peut tre distribu librement. La version originale a t crite
  par Hannu Savolainen, et Andrew J. Robinson en assure  prsent la
  maintenance (robinson@cnj.digex.net).

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/gmod-3.1.tar.gz>.



  22..22..33..  MMiikkMMoodd

  Ce lecteur de modules portable reconnait les formats XM, ULT, STM,
  S3M, MTM, MOD et UNI (UNI est un format interne  MikMod). Il supporte
  galement les fichiers de modules compresss. Il utilise une sortie
  son stro en 16 bits. Pour rduire simplement la consommation CPU,
  utilisez l'option -m (pour sortie mono).

  La version Unix peut utiliser indiffrement ncurses ou Tcl/Tk pour
  l'interfaage. On peut aussi s'en servir comme d'une bibliothque, pas
  seulement comme d'un programme indpendant.

  La version originale a t crite par Jean-Paul Mikkers
  (mikmak@via.nl). A prsent, Jake Stine en assure la maintenance
  (dracoirs@epix.net).  C'est un shareware et vous devrez l'enregistrer
  pour toute utilisation commerciale. Il vous faudra galement une
  autorisation pour toute redistribution commerciale (pour une
  redistribution non commerciale, un autorisation n'est pas ncessaire).

  On peut le trouver sur la MikMod home page
  <http://www.freenet.tlh.fl.us/~amstpi/mikmod.html>.



  22..22..44..  xxmmpp

  C'est un lecteur de module ( ne pas confondre avec le xmp d'Adagio)
  qui reconnait les modules MOD, S3M, MTM, PTM, PTR, STM, 669 et XM
  (d'autres formats sont supports, mais encore de faon exprimentale
  ou incomplte). Si vous possdez une carte son avec table
  d'chantillons sonores (GUS ou SoundBlaster AWE 32), alors, vous
  pouvez l'utiliser pour diminuer la charge du CPU. xmp peut galement
  grer les modules compresss.

  Une interface X pour xmp est disponible.

  xmp a t crit par Claudio Matsuoka (claudio@pos.inf.ufpr.br) et
  Hipolito Carraro Jr.

  On peut le trouver sur la xmp home page <http://xmp.home.ml.org/>.



  22..22..55..  ss33mmoodd

  s3mod lit des modules MOD de 4,6,ou 8 pistes et des modules Scream
  Tracker III. Il utilise une sortie mono 8 bits avec un taux
  d'chantillonage par dfaut de 22 kHz. L'option -s passe en stro, -b
  en sortie 16 bits, et -f rgle la frquence d'chantillonage.
  Cependant, la sortie est plus mauvaise qu'avec tracker (bruit de
  fond), aussi je conseille d'utiliser plutt tracker que s3mod pour
  lire des fichiers MOD ordinaires ( moins que votre machine manque de
  puissance). La consomation CPU est nettement infrieure  celle de
  tracker.

  Un copyright a t dpos par Daniel Marks and David Jeske
  (jeske@uiuc.edu), mais vous pouvez faire ce que vous voulez avec (sauf
  dire que vous l'avez crit).

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/s3mod-
  v1.09.tar.gz>.



  22..22..66..  mmoodd

  Ce programme en version beta lit les formats MOD (15/31 instruments,
  jusqu' 32 voix), MTM, ULT et S3M sur la carte Gravis UltraSound. Il
  peut aussi lire les modules compresss si vous avez install gzip,
  lharc, unzip et unarj. Il ne peut pas lire les modules compresss avec
  certains compositeurs Amiga (signature "PACK").

  Il ncessite un pilote son de version 3.0 au minimum.  Il ne
  fonctionnera _p_a_s avec un pilote son de version 2.90-2 ou antrieure.
  L'interface en mode texte ncessite ncurses. Une interface X est
  galement incluse, base sur Tcl/Tk.

  Il a t crit par Mikael Nordqvist (mech@df.lth.se ou
  d91mn@efd.lth.se).

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/mod-v0.81.tgz>.



  22..22..77..  nnssppmmoodd

  C'est un lecteur de modules en version _a_l_p_h_a qui reconnait les formats
  MTM, S3M et MOD. Il est destin  tre un lecteur de modules pour
  cartes sans DSP ( ne pas confondre avec ce que Creative Labs nomme
  DSP). Sa consommation CPU est comparable  celle de tracker.


  Il intgre la possibilit de faire boucler les modules s'ils le
  veulent. Le nombre de boucles peut tre limit avec l'option -l. Il
  utilise une sortie son 8 bits seulement (cf version 0.1).

  Il a t crit par Toru Egashira (toru@jms.jeton.or.jp).

  On peut le rcuperer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/nspmod-0.1.tar.gz>.



  22..22..88..  yyaammppmmoodd

  Ce programe en version _a_l_p_h_a a t conu pour lire des modules 4
  canaux en utilisant le minimum de ressources CPU. Il n'a _p_a_s t conu
  pour produire un son de grande qualit. Aussi la seule sortie son
  disponible est une sortie mono  22kHz. De plus, la sortie n'est pas
  aussi propre qu'elle le devrait, du fait de son statut alpha.

  Il a t crit par David Groves (djg@djghome.demon.co.uk).

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/yampmod-0.1.tar.gz>.




  22..33..  FFlluuxx aauuddiioo MMPPEEGG

  MPEG est un standard spcifiant le codage vido ainsi que la piste
  audio associe pour un stockage digital.  MPEG est habituellement
  associ avec la vido, mais la partie audio du standart MPEG peut tre
  utilise seule. Elle dfinit trois couches (layer), couche I,II, et
  III. Les lecteurs pouvant dcoder une couche leve peuvent galement
  dcoder une couche plus basse (par exemple un lecteur de couche III
  peut aussi lire les fichiers de couche II). Les fichiers audio MPEG de
  couche I ont habituellement l'extension .mpg ( donc s'il y a un
  fichier avec cette extention qui ne peut pas tre lu par un lecteur de
  vido MPEG, c'est probablement un flux audio), la couche II a
  gnralement l'extension .mp2, et la couche III l'extension .mp3. La
  compression audio est plutt bonne. Un fichier audio MPEG de couche II
  faisant 2 Mgaoctets (Mo) prendra problablement 25 Mo pour un fichier
  d'chantillon brut PCM de la mme qualit.



  22..33..11..  mmppgg112233

  Ce programme en version _b_e_t_a est un lecteur de flux audio MPEG
  efficace, qui supporte les couches I, II, et III. Il est  bas sur du
  code provenant de plusieurs sources. Il est capable de lire des flux
  en temps rel par HTTP (ainsi, on peut lire un flux audio MPEG
  directement  travers le World Wide Web).

  L'auteur principal est Michael Hipp (Michael.Hipp@student.uni-
  tuebingen.de). Le programme peut tre utilis et distribu
  gratuitement pour des utilisations non-commerciales, sous rserve
  qu'il ne soit pas modifi. Son insertion dans une collection de
  logiciels gratuits (comme une image d'un serveur FTP sur CD-ROM) est
  explicitement autoris.

  On peut trouver la version la plus rcente sur la mpg123 homepage
  <http://mpg.123.org/>.



  22..33..22..  mmaappllaayy 11..22

  Ce lecteur de flux audio MPEG supporte seulement les flux de couche I
  et II, et manque du support pour les flux de couche III. Il supporte
  les cartes son 16 bits sous Linux.

  Il utilise pas mal les ressources CPU, prenant plus de 55% du temps
  CPU sur un Pentium 60MHz. La sortie est intolrable sur un 486  66MHz
  parce que le CPU ne peut pas suivre le son. Si cela se produit,
  essayez de ne lire qu'un seul canal du flux audio (avec l'option -l ou
  -r), au lieu de la stro par dfaut.

  Un lger changement dans un des fichiers pourrait tre ncessaire pour
  le compiler. A savoir, vous pourriez avoir besoin d'ajouter la ligne
  suivante au dbut du fichier configuration.sh.



       #! /bin/sh


  L'auteur est Tobias Bading (bading@cs.tu-berlin.de).

  On peut rcuprer maplay 1.2 sur  <ftp://ftp.cs.tu-
  berlin.de/pub/misc/maplay1.2/maplay1_2.tar>.



  22..33..33..  mmaappllaayy 11..33bb

  C'est une modification non officielle (pas par l'auteur original) de
  maplay 1.2  qui peut tre excut avec une charge plus basse du CPU.
  Il l'accomplis principalement en faisant une sortie u-law qui aussi
  sur d'autres plateformes que SPARC. Notez qu'il utilise la sortie u-
  law par dfaut, ce qui rend la qualit du son moins bonne.

  Les modifications ont t faites par Orlando Andico
  (orly@gibson.eee.upd.edu.ph).

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay-1.3b-
  Linux.tar.gz>.



  22..33..44..  mmaappllaayy33

  C'est un autre driv de maplay 1.2. Il ajoute le support des flux
  audio MPEG de couche III. Actuellement il semble y avoir des bugs dans
  le playback (qui se manifestent par des bruits aigus). Tripotez les
  options pour rgler le problme.

  Les modifications ont t faites par Timo Jantunen
  (timo.jantunen@hut.fi ou jeti@cc.hut.fi).  Il peut etre utilis
  librement, mais seulement pour un usage non lucratif. Cependant, je ne
  suis pas entirement sr de la validit de ce copyright, du fait que
  le maplay original est sous GPL (GNU General Public License), licence
  qui ne permet pas aux drivs d'avoir un copyright diffrent.

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay3.tar.gz>.



  22..33..55..  ssppllaayy

  Ce lecteur en version _b_e_t_a est un autre driv de maplay 1.2 (en fait
  de maplay 1.2+, qui est un driv de maplay 1.2, sous MS Window
  seulement).  Il ajoute un support pour les flux audio MPEG de couche
  III. Il est aussi capable de lire les fichiers WAV. Il peut enfin
  aussi lire des flux reus  travers des connections HTTP.

  Une autre caractristique de splay est qu'il peut tre utilis comme
  une bibliothque (sous License GPL), ainsi il peut tre employ dans
  d'autres programmes.  Il tente aussi d'augmenter ses performances en
  utilisant le threading (pthread est ncessairepour utiliser cette
  caracteristique) et un peu d'assembleur en ligne.

  Une interface en ligne de commande pour splay est disponible, ainsi
  qu'une interface X optionnelle (qui utilise QT).

  Si aprs compilation, il ne marche pas (par exemple segmentation
  faults), essayez de le compiler sans le threading.

  Il a t fais par Jung Woo-jae (jwj95@eve.kaist.ac.kr).


  Il peut tre obtenu sur la splay's home page
  <http://adam.kaist.ac.kr/~jwj95/>.



  22..33..66..  SSaajjbbeerr JJuukkeebbooxx

  Ce programme est un lecteur de MPEG audio avec une interface
  utilisateur graphique. Il est bas sur splay, ainsi il inclue un
  support pour les couches audio MPEG de type I, II et III. Il est aussi
  capable de lire les flux audio MPEG en temps rel sous connexion HTTP.
  Il est facilement configurable.

  Il utilise le toolkit QT (ncessite au moins la version 1.2).  Il
  utilise aussi la bibliothque LinuxThreads (les excutables inclus ne
  marchent qu'avec la version 0.5).

  L'auteur est Joel Lindholm (wizball@kewl.campus.luth.se).

  La dernire version peut tre rcupre sur
  <ftp://kewl.campus.luth.se/pub/jukebox>.



  22..33..77..  aammpp

  Ce lecteur de MPEG audio en version _b_e_t_a supporte seulement les flux
  audio de couche III.  Il est capable de lire directement vers la carte
  son, et il peut sortir des fichiers au format brut PCM ou au format
  WAV. Il charge par contre vraiment le CPU ( peu prs 60% sur un
  pentium 133MHz).

  Il a t crit par Tomislav Uzelac (tuzelac@rasip.fer.hr).  Il peut
  tre utilis et distribu librement, tant qu'il n'est pas vendu  des
  fin commerciales sans autorisation (l'inclure dans des CD-ROMs qui
  contiennent des logiciels gratuits est, par contre, explicitement
  autoris).

  On peut le rcuprer sur
  <ftp://ftp.rasip.fer.hr/pub/mpeg/amp-0.7.3.tgz>.



  22..33..88..  XXAAuuddiioo

  Cette bibliothque en version _a_l_p_h_a a t crite pour tre une
  implmentation rapide d'une bibliothque de dcodage pour des IHM
  varies. Il suporte les MPEG audio de couche I, II, et III. Il est
  capable d'effectuer des accs alatoires aux flux de bits. Une
  interface en ligne de commande est incluse, ainsi qu'une interface
  Motif (Lesstif), fournie dans la version Linux.

  Il est de Gilles Boccon-Gibod, Alain Jobart et d'autres.  L'interface
  pour la bibliothque peut tre rcupre librement. La bibliothque
  elle-mme demande une license pour tre utilise (une license pour la
  source et les excutables est disponible).

  L'interface pour la bibliothque peut tre obtenue sur la XAudio home
  page <http://www.xaudio.com/>.



  22..33..99..  LLaayyeerr 33 SShhaarreewwaarree EEnnccooddeerr//DDeeccooddeerr

  C'est un convertisseur de MPEG audio de couche III en fichiers
  d'chantillons au format WAV, AIFF, SND, AIFC, ou juste PCM brut. La
  version Linux ne sort pas directement le son sur la carte audio. On
  doit d'abord le convertir en un autre format.

  Cependant, quand vous essayez de lire un fichier convertis avec sox,
  vous n'entendrez probablement que des bruits parce que l'ordre des
  mots dans les chantillons PCM n'est pas bon (au moins sur les
  machines Intel). Vous avez besoin de donner  sox l'option -x pour
  rsoudre ce problme. Mais certains lecteurs n'ont pas besoin d'tre
  avertis que l'ordre des mots est mauvais, ainsi vous n'aurez peut tre
  pas  vous inquiter de cela.

  Si vous avez un ordinateur vraiment rapide (probablement au moins un
  Pentium 100MHz), alors vous pouvez essayer de lire un flux MPEG de
  couche III directement sans avoir besoin de convertir pralablement le
  fichier audio en un autre format comme dans l'exemple suivant (cet
  expemple suppose que vous utilisiez sox et que vous lisiez un
  chantillon stro de 44,1 kHz).



       $ l3dec foo.mp3 -sto | play -t raw -x -u -w -c 2 -r 44100 -





  Le nombre aprs -r est la frquence du flux audio, et le nombre aprs
  -c dpend de s'il est mono ou stro (ou mme quadriphonique). Si a
  vous semble trop compliqu, vous pouvez utiliser quelque chose comme
  un script shell ou un alias.

  C'est un shareware dpos par  Fraunhofer-IIS.  Une version de
  dmonstration pour les systmes Linux  base de x86 peut tre rcupr
  sur <ftp://ftp.fhg.de/pub/layer3> La version de dmonstration
  convertis seulement les flux audio MPEG de couche III.



  22..33..1100..  XX1111AAmmpp

  Ce logiciel en version _b_e_t_a est un lecteur de flux audio MPEG dot
  d'une interface graphique, similaire  celle utilise par son
  homologue sous Windows winamp.

  Aucun droits de reproduction n'est mentionn (je suppose qu'il peut
  tre librement utilis pour un usage personnel).  Il est maintenu par
  Mikael Alm (psy@x11amp.bz.nu), Thomas Nilsson (fatal@x11amp.bz.nu) et
  Olle Hallnas (crocodile@x11amp.bz.nu).

  On peut le rcuprer sur X11Amp's homepage <http://www.x11amp.bz.nu/>.
  Seuls les excutables pour les systmes Intel Linux et FreeBSD sont
  disponibles  cette adresse.




  22..44..  WWAAVV

  Tir de la page man de sox :


       Ils (format WAV) apparaissent comme tant trs similaires
       aux fichiers IFF, mais ce ne sont pas les mmes. Ce sont les
       formats de fichiers son natifs de Windows 3.1.  Evidemment,
       Windows 3.1 est d'une telle incroyable importance pour
       l'industrie informatique qu'il se doit d'avoir son propre
  format de fichier son.


  Ils ont habituellement l'extention .wav.

  A voir aussi la section ``sox'' et ``bplay'' pour d'autres lecteurs de
  WAV que ceux prsents ici.



  22..44..11..  wwaavvppllaayy

  Ce programme supporte la lecture et l'enregistrement avec le format
  WAV. Il utilise un systme de verrou, ainsi un seul son peut tre lu 
  la fois. Ses capacits de verrou peuvent tre utilises indpendamment
  de celles de lecture du son.

  En plus d'une interface en ligne de commande, il y a une interface
  Motif, utilisable avec Lesstif.

  Il a t crit  l'origine par Andre Fuechsel (af1@irz.inf.tu-
  dresden.de), mais a volu au point d'avoir t completement recrit
  par Warren W. Gay (bx249@freenet.toronto.on.ca ou wwg@ica.net).

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/wavplay-1.0.tar.gz>.



  22..55..  AAuuttrreess

  Cette section prsente les moyens disponibles pour lire les formats
  son qui ne mritent pas une section spare (par exemple les formats
  qui n'ont qu'un lecteur disponible), ou les lecteurs qui lisent plus
  d'un format.



  22..55..11..  ssooxx

  Ce programme est en fait un convertisseur : il convertit un format son
  en un autre. Toutefois, des versions de sox, invoques comme play,
  lisent les sons ( l'application play dans le Sound HOWTO dtaille
  probablement cela). Il supporte les donnes binaires brutes (pas de
  header) et textuelles, les fichiers son IRCAM, .voc de Sound Blaser,
  .au de SPARC (sans header), HCOM de Mac,.sou sur PC/DOS, SndTool, et
  Sounder, .snd de NeXT, RIFF/WAV de Windows 3.1, .smp de Turtle Beach,
  CD-R, AIFF de Apple/SGI, et le format 8SVX.


  Depuis  peu prs les kernels 1.3.6x, vous pourriez avoir  faire un
  petit changement dans un fichier pour le faire lire du son
  directement. A savoir, vous devez changer la ligne 179 dans sbdsp.c de



       if (abuf_size < 4096 || abuf_size > 65536) {





  en



  if (abuf_size < 1 || abuf_size > 65536) {





  Il se peut que a ne soit pas ncessaire, mais le faire ne peut causer
  aucun disfonctionnement.


  Il a t crit et depos par plusieurs personnes et peut tre utilis
  par n'importe qui.

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/Lsox-
  linux.tar.gz>.  En plus, cette version supporte les formats MS ADPCM
  et IMA ADPCM WAV.

  Une version plus rcente de Chris Bagwell (cbagwell@sprynet.com)
  (base sur la dernire version gamma du sox original, et incluant les
  modifications ci-dessus) peut tre rcupre sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/sox-11gamma-
  cb3.tar.gz>.



  22..55..22..  bbppllaayy

  Ce programme en version _b_e_t_a lit les fichiers audio bruts, WAV et VOC.
  Il est aussi en mesure d'enregistrer dans ces formats. Il utilise une
  varits de techniques pour obtenir le vitesse la plus leve
  possible, permettant ainsi d'tre excut de faon acceptable mme sur
  des machines lentes. Une de ces techniques requiert que les programmes
  installs soient setuid root. Le barge esprant l'utiliser devrait
  employer le paquetage Debian de Ian Jackson (ijackson@gnu.org), qui
  permet d'ter la caractritique ncessitant le bit setuid.

  L'auteur est David Monro (davidm@gh.cs.usyd.edu.au).

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/bplay-0.96.tar.gz>.



  22..55..33..  SSIIDDPPLLAAYY

  Ce programme mule la puce Sound Interface Device (MOS 6581,
  communment appele SID) et le Micro Processor Unit (MOS 6510) du
  Commodore 64. Il est ainsi possible de charger et d'excuter des
  programmes en code machine C64 qui produisent de la musique ou du son.
  En gnral ce sont des fragments de code et de donnes qui sont tirs
  de jeux et de dmos directement transfrs du C64.

  Il utilise une interface en ligne de commande par dfaut. Il existe
  aussi des interface en Tk ou QT disponible sparment du paquetage
  principal.

  Il est maintenu par Michael Schwendt (sidplay@geocities.com).

  Il peut tre obtenu sur la SIDPLAY's home page
  <http://www.geocities.com/SiliconValley/Lakes/5147/>.





  22..55..44..  RReeaallAAuuddiioo PPllaayyeerr

  Ce programme vous permet d'couter des sons, qui sont stocks dans un
  format propritaire, en temps rel  travers Internet sans rapatrier
  intgralement le fichier son pralablement. Il peut tre utilis seul,
  mais il est vraiment destin  tre utilis  travers un navigateur
  web (Mosaic et Netscape le supportent explicitement). Il ne peut etre
  utilis sans X (vous ne devriez pas pouvoir le faire marcher avec Lynx
  sur une console texte).

  Cependant, il existe un bricolage qui permet d'executer le lecteur
  RealAudio depuis une console. Pour que a fonctionne, il vous faudra
  le serveur X virtual frame buffer (Xvfb). Ce bricolage peut tre
  rcupr sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/traplayer-0.5.tar.gz>.

  Il a t ralis par Progressive Networks, Inc. Il ne peut tre
  redistribu, modifi, etc. Regardez la license pour les dtails exacts
  sur ce que vous pouvez faire. Il peut tre obtenu en s'enregistrant
  gratuitement sur la RealAudio home page <http://www.realaudio.com/>.



  22..55..55..  ccaatt

  On peut se demander ce que cat, l'utilitaire de concatnation parfois
  suremploy, a  faire avec la lecture des sons. Je vais vous montrer
  son utilisation  travers un exemple.



       $ cat sample.voc > /dev/dsp
       $ cat sample.wav > /dev/dsp
       $ cat sample.au > /dev/audio





  Faire un cat d'un fichier .au sur /dev/audio marchera habituellement,
  et si vous avez suffisament de chance pour que le fichier ait un ordre
  d'octets correct (pour votre plateforme) etc., un cat d'un fichier son
  qui utilise des chantillon PCM (comme .wav ou .voc) sur /dev/dsp
  pourrait mme donner quelque chose d'audible.

  Ce n'est pas un usage totalement inutile de cat. Par exemple, si vous
  avez un fichier son qu'aucun de vos programmes ne reconnaisse, et dont
  vous savez qu'il utilise des chantillons PCM. Vous pourrez alors tre
  en mesure d'en avoir une ide trs approximative (si vous tes
  chanceux).



  33..  AAuuttrreess uuttiilliittaaiirreess ssoonn pprraattiiqquueess


  Cette section ne concerne pas la lecture des fichiers son.  Cependant,
  il existe une collection d'utilitaires que vous pourriez trouver
  utiles.


  33..11..  vvoolluummee

  C'est une simple interface en ligne de commande pour contrler le
  volume (qu'est ce que a aurait pu tre d'autre ?). Il a aussi un
  programme spar, inclus dans le paquetage, ayant une interface en
  Tcl/Tk permettant de contrler le volume, de lire les fichiers son
  .au.  Un lecteur trs simple de CD en Tcl/TK est aussi inclus.

  C'est un Freeware et il a t crit par Sam Lantinga
  (slouken@cs.ucdavis.edu).

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/soundcard/volume-2.1.tar.gz>.



  33..22..  SSoouunndd SSttuuddiioo

  C'est une application en Tcl/Tk utilisant sox qui supporte la lecture,
  l'enregistrement, et l'dition de sons numriques. La distribution
  inclue sox pour eviter tous problemes de comptabilit.

  Il a t crit par Paul Sharpe et N. J. Bailey
  (N.J.Bailey@leeds.ac.uk).  Il peut tre librement utilis et distribu
  si vous leur envoyez un courrier.


  Il peut tre trouv sur la Sound Studio's home page <http://www.elec-
  eng.leeds.ac.uk/staff/een6njb/Software/Studio/screens.html>.



  33..33..  TTiicckkllee MMuussiicc

  Ce programe en version _b_e_t_a dot d'une interface Tcl/Tk est un
  navigateur de fichiers de musicaux qui vous permet de lire des formats
  de son varis tant que le programme appropri pour les jouer est sur
  votre systme. Par dfaut gmod est utilis pour lire les fichiers MOD
  et mp pour les fichiers MIDI (vous pouvez changer la source pour
  utiliser d'autres programmes).

  Il a t crit et dpos par Shannon Hendrix (shendrix@pcs.cnu.edu ou
  shendrix@escape.widomaker.com).

  On peut le rcuprer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tmusic-1.0.tar.gz>.



  44..  RRffrreenncceess


  1. La documentation incluse avec les applications prsentes dans ce
     document.

  2. Le Linux Sound HOWTO. On peut le trouver sur le Linux Documentation
     Project <http://sunsite.unc.edu/LDP/> ou en franais
     <http://www.freenix.fr/linux/HOWTO/>

  3. Linux MIDI and Sound Applications
     <http://www.bright.net/~dlphilp/linux-soundapps.html>

  4. Programmer's Guide to OSS <http://www.4front-tech.com/pguide/>

  5. SoX home page <http://www.spies.com/Sox/>






F 3DFX-HOW.;1                       	3Dfx-HOWTO
F ACCESS-H.;1                       	Access-HOWTO
F ALPHA-HO.;1                       	Alpha-HOWTO
F ASSEMBLY.;1                       	Assembly-HOWTO
F AX25-HOW.;1                       	AX25-HOWTO
F BELGIAN-.;1                       	Belgian-HOWTO
F BENCHMAR.;1                       	Benchmarking-HOWTO
F BEOWULF-.;1                       	Beowulf-HOWTO
F BOOTDISK.;1                       	Bootdisk-HOWTO
F BOOTPROM.;1                       	BootPrompt-HOWTO
F BUSMOUSE.;1                       	Busmouse-HOWTO
F CD-WRITI.;1                       	CD-Writing-HOWTO
F CDROM-HO.;1                       	CDROM-HOWTO
F CHINESE-.;1                       	Chinese-HOWTO
F COMMERCI.;1                       	Commercial-HOWTO
F CONFIGUR.;1                       	Configuration-HOWTO
F DISTRIBU.;1                       	Distribution-HOWTO
F DNS-HOWT.;1                       	DNS-HOWTO
F DOS-WIN-.;1                       	DOS-Win-to-Linux-HOWTO
F DOSEMU-H.;1                       	DOSEMU-HOWTO
F ETHERNET.;1                       	Ethernet-HOWTO
F FIREWALL.;1                       	Firewall-HOWTO
F FRAMEBUF.;1                       	Framebuffer-HOWTO
F FRENCH-H.;1                       	French-HOWTO
F FROM-POW.;1                       	From-PowerUp-To-Bash-Prompt-HOWTO
F FTAPE-HO.;1                       	Ftape-HOWTO
F GCC-HOWT.;1                       	GCC-HOWTO
F GLIBC2-H.;1                       	Glibc2-HOWTO
F HARDWARE.;1                       	Hardware-HOWTO
F HOWTO-HO.;1                       	HOWTO-HOWTO
F HOWTO-IN.;1                       	HOWTO-Index
F INSTALLA.;1                       	Installation-HOWTO
F IPCHAINS.;1                       	IPCHAINS-HOWTO
F IPX-HOWT.;1                       	IPX-HOWTO
F IR-HOWTO.;1                       	IR-HOWTO
F ISP-HOOK.;1                       	ISP-Hookup-HOWTO
F JAVA-CGI.;1                       	Java-CGI-HOWTO
F KERNEL-H.;1                       	Kernel-HOWTO
F KEYBOARD.;1                       	Keyboard-HOWTO
F KICKSTAR.;1                       	KickStart-HOWTO
F KIOSK-HO.;1                       	Kiosk-HOWTO
F LARGE-DI.;1                       	Large-Disk-HOWTO
F LINUXDOC.;1                       	LinuxDoc-Emacs-Ispell-HOWTO
F LISEZMOI.;1                       	LISEZMOI
F LISTE-DE.;1                       	Liste-des-HOWTO
F MAIL-HOW.;1                       	Mail-HOWTO
F MGR-HOWT.;1                       	MGR-HOWTO
F MILO-HOW.;1                       	MILO-HOWTO
D MINI                              	mini
F MODEMS-H.;1                       	Modems-HOWTO
F MP3-HOWT.;1                       	MP3-HOWTO
F MULTI-DI.;1                       	Multi-Disk-HOWTO
F NET-HOWT.;1                       	Net-HOWTO
F NET4-HOW.;1                       	NET4-HOWTO
F NETWORKI.;1                       	Networking-Overview-HOWTO
F NEWS-HOW.;1                       	News-HOWTO
F NFS-HOWT.;1                       	NFS-HOWTO
F NIS-HOWT.;1                       	NIS-HOWTO
F OFFLINE-.;1                       	Offline-Mailing-HOWTO
D OLD                               	old
F ONLINE-T.;1                       	Online-Troubleshooting-HOWTO
F OPTICAL-.;1                       	Optical-Disk-HOWTO
F ORACLE-H.;1                       	Oracle-HOWTO
F PALMOS-H.;1                       	PalmOS-HOWTO
F PCI-HOWT.;1                       	PCI-HOWTO
F PLUG-AND.;1                       	Plug-and-Play-HOWTO
F POSTGRES.;1                       	PostgreSQL-HOWTO
F PPP-FAQ.;1                        	PPP-FAQ
F PPP-HOWT.;1                       	PPP-HOWTO
F PRINTING.;1                       	Printing-HOWTO
F PRINTING.000;1                    	Printing-Usage-HOWTO
F QUAKE-HO.;1                       	Quake-HOWTO
F READING-.;1                       	Reading-List-HOWTO
F README.;1                         	README
F ROOT-RAI.;1                       	Root-RAID-HOWTO
F RPM-HOWT.;1                       	RPM-HOWTO
F SCSI-HOW.;1                       	SCSI-HOWTO
F SCSI-PRO.;1                       	SCSI-Programming-HOWTO
F SERIAL-H.;1                       	Serial-HOWTO
F SERIAL-P.;1                       	Serial-Programming-HOWTO
F SHADOW-P.;1                       	Shadow-Password-HOWTO
F SMB-HOWT.;1                       	SMB-HOWTO
F SMP-HOWT.;1                       	SMP-HOWTO
F SOFTWARE.;1                       	Software-Release-Practice-HOWTO
F SOUND-HO.;1                       	Sound-HOWTO
F SOUND-PL.;1                       	Sound-Playing-HOWTO
F SRM-HOWT.;1                       	SRM-HOWTO
F TCLTK-HO.;1                       	TclTk-HOWTO
F TETEX-HO.;1                       	TeTeX-HOWTO
F TEXT-TER.;1                       	Text-Terminal-HOWTO
F TIPS-HOW.;1                       	Tips-HOWTO
F UMSDOS-H.;1                       	UMSDOS-HOWTO
F UNICODE-.;1                       	Unicode-HOWTO
F UNIX-INT.;1                       	Unix-Internet-Fundamentals-HOWTO
F UPS-HOWT.;1                       	UPS-HOWTO
F USER-GRO.;1                       	User-Group-HOWTO
F UUCP-HOW.;1                       	UUCP-HOWTO
F VAR-HOWT.;1                       	VAR-HOWTO
F VIM-HOWT.;1                       	Vim-HOWTO
F VIRTUAL-.;1                       	Virtual-Services-HOWTO
F VMS-TO-L.;1                       	VMS-to-Linux-HOWTO
F WWW-HOWT.;1                       	WWW-HOWTO
F WWW-MSQL.;1                       	WWW-mSQL-HOWTO
F XFREE86-.;1                       	XFree86-Video-Timings-HOWTO
F XFREE86-.000;1                    	XFree86-HOWTO
  HOWTO Tcl et Tk sous Linux _(_L_i_n_u_x _T_c_l _a_n_d _T_k _H_O_W_T_O_)
  Luca Rossetti lukaros@tin.it, traduit par Carine Bournez,
  cbournez@if.insa-lyon.fr
  v0.2, 07 November 1998

  Ce document dcrit l'approche de Linux  Tcl, un langage de script.
  C'est un langage interprt, facile  apprendre, qui utilise l'absence
  de typage pour permettre un niveau de programmation plus lev et le
  dveloppement rapide d'applications.  La bote  outils Tk est un
  environnement de programmation pour crer des interfaces graphiques
  (Graphical User Interfaces, GUI) sous le systme X-Window.  Leurs
  fonctionnalits incluent la possibilit d'extension et l'inclusion
  dans une autre application, le dveloppement rapide et la facilit
  d'utilisation.  Conjointement, Tcl et Tk apportent de grands bnfices
   la fois au dveloppeur et  l'utilisateur.  Les interfaces bases
  sur Tk ont tendance  tre plus personnalisables et dynamiques que
  celles construites avec une bote  outils reposant sur du C ou C++.
  Tk reproduit l'allure et les sensations de Motif. Un grand nombre
  d'applications intressantes sous X sont entirement implmentes en
  Tk, sans aucune nouvelle commande spcifique  l'application elle-
  mme.
  ______________________________________________________________________

  Table des matires










































  1. Introduction

     1.1 But de ce document
     1.2 Ce qu'il faut savoir avant de poursuivre
     1.3 Nouvelles versions de ce document
     1.4 Historique des rvisions
     1.5 Retours et commentaires
     1.6 Crdits
     1.7 Politique de diffusion

  2. Histoire de Tcl/Tk

     2.1 Chronologie

  3. Qu'est-ce que Tcl/Tk ?

     3.1 Qu'est-ce que Tcl ?
     3.2 Qu'est-ce que Tk ?
     3.3 Extensions
     3.4 Plates-formes supportes

  4. Installation et prise en main de Tcl et Tk

     4.1 Tldchargement des distributions de base
     4.2 Installation
     4.3 L'archive de contributions
     4.4 Sites miroirs
     4.5 Quelles versions utiliser ?
     4.6 O adresser des rapports de problmes, bugs, ou amliorations

  5. Un tout petit peu de programmation

     5.1 Programme-minute en Tcl

  6. Langage de script : avantages et inconvnients

     6.1 Reproches les plus courants  propos de Tcl
        6.1.1 Tcl est interprt
        6.1.2 Plusieurs caractristiques ne sont pas intuitives
     6.2 Principaux avantages de Tcl
        6.2.1 C'est un langage de script de haut niveau
        6.2.2 Tcl est libre
        6.2.3 Il fonctionne sur de nombreuses plates-formes
        6.2.4 Il est interprt
        6.2.5 Il est extensible
        6.2.6 Il est encapsulable dans vos applications
        6.2.7 Tcl/Tk est compatible An 2000

  7. Programmes les plus clbres utilisant Tcl/Tk

  8. Rfrences

     8.1 Livres
        8.1.1 The Tcl and Tk Toolkit
        8.1.2 Practical Programming in Tcl and Tk, deuxime dition
        8.1.3 Tcl and Tk Reference Manual
        8.1.4 The Visual TCL Handbook, 1/e
        8.1.5 Running Linux
        8.1.6 Tcl/Tk for Dummies (Pour les Nuls)
        8.1.7 Interactive Web Applications With Tcl/Tk
     8.2 Manuels en ligne et tutoriels
     8.3 Sites World Wide Web
     8.4 Autres documents & Foires Aux Questions
     8.5 Forum Usenet

  9. Termes de la licence de Tcl/Tk
  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Ceci est le Linux Tcl et Tk HOWTO. Il vise, en tant que rfrence pour
  Linux,  couvrir tout ce qu'il est ncessaire de connatre concernant
  l'installation, la configuration, ainsi qu'une introduction au
  dveloppement sous Tcl et Tk.  Il prsente d'abord un historique,
  puis aborde les avantages et inconvnients de Tcl et Tk sous linux, et
  enfin des rfrences  d'autres sources d'information sur une large
  tendue de sujets lis  ce langage de script simple mais puissant.

  Si vous avez dj recompil votre noyau Linux sous X en utilisant la
  commande

  ______________________________________________________________________
  make xconfig
  ______________________________________________________________________



  vous vous tre certainement trouv face  la puissance de ce langage
  de script.


  Aprs l'excution de la premire tape de la recompilation du noyau,
  un script appel kconfig.tk est excut via wish (l'interprteur Tcl).
  La fentre de configuration du noyau Linux apparat. Au lieu de
  rpondre  des questions en srie, cet utilitaire de configuration
  bas sur X vous permet d'utiliser des cases  cocher pour slectionner
  les options du noyau que vous souhaitez activer.

  Le systme conserve les options de votre dernire configuration afin
  qu' chaque nouvelle excution vous n'ayiez  ajouter/supprimer
  quelques slections au lieu de reprendre tout l'ensemble des options.
  De plus, vous pouvez parcourir l'ensemble (ou seulement une partie)
  des options du noyau dans l'ordre que vous prfrez. Aprs cette tape
  simplifie, vous pouvez recompiler votre noyau, en suivant la manire
  traditionnelle.


  Il existe en fait un autre exemple bien connu. Avez-vous dj utilis
   printtool  ? (Printer Config Tool (C) Copyright 1994 by Red Hat
  Software <http://www.redhat.com> - author: Michael Callahan).  Si vous
  avez install une distribution Red Hat, vous avez agrablement russi
   l'utiliser pour mettre en place des services d'impression. Eh bien
  l'interface de printtool est principalement un script Tcl/Tk.


  Pour ceux qui ne connaissent pas Red Hat, laissez-moi vous dire
  comment vous pouvez configurer facilement vos imprimantes, juste en
  remplissant quelques champs de texte et en cochant quelques cases.

  Le programme lui-mme se charge de mettre en place les services en
  crant le rpertoire de spool, crit le fichier /etc/printcap et le
  filtre de l'imprimante, relance lpd et teste votre filtre avec des
  pages en ascii ou en postscript. Il permet de manipuler les options de
  ghostscript (c'est--dire choisir jusqu' 8 pages par page en sortie
  et rgler les marges), propose une aide en ligne et plein d'autres
  caractristiques.


  Quelle est la diffrence avec une autre implmentation de service
  d'impression ?

  Tout est ralis en utilisant Tcl/Tk comme une  colle  entre
  applications consolides et en oprant avec les fichiers de
  configurations standards de Linux, dans un mode fentr, visuel et
  interactif, sous X-Window. Aucune nouvelle commande spcifique 
  l'application n'a t crite.



  11..11..  BBuutt ddee ccee ddooccuummeenntt


  Actuellement, le but de ce document est de fournir des rfrences de
  dpart aux utilisateurs de Linux ; dans les versions futures,
  j'essaierai d'ajouter un petit  tutoriel de programmation .
  J'insiste : ce n'est pas (et ne veut pas remplacer) un manuel
  utilisateur complet ni une rfrence pour le dveloppement et la
  programmation en Tcl et Tk - c'est juste un point de dpart pour les
  utilisateurs de Linux.

  La conception que l'auteur se fait d'un manuel de rfrence concide
  avec la dfinition des pages man et de nombreuses personnes apprennent
  Tcl/Tk  partir de ces sources brutes d'information.  Ces fichiers
  font partie de la distribution du code source et sont installs sur
  votre machine Linux. Vous pourrez accder aux pages de manuel de
  Tcl/Tk par la commande man.

  Beaucoup de tutoriels de programmation complets et structurs ont t
  crits dans le but de laisser l'utilisateur dbutant trafiquer avec
  Tcl/Tk ; des tonnes d'autres donnes sont disponibles sur Internet.
  M'inspirant de la philosophie de Tcl/Tk, je ne vais pas rinventer la
  roue, mais essayer de cimenter cette norme masse d'information dj
  disponible.

  Je vous suggre de jeter un oeil aux autres documents cits dans ``la
  section Rfrences'' pour savoir o trouver des informations
  spcifiques  propos de Tcl/Tk.


  11..22..  CCee qquu''iill ffaauutt ssaavvooiirr aavvaanntt ddee ppoouurrssuuiivvrree


  Pour comprendre le B.A.BA de Tcl/Tk, vous n'avez pas besoin d'tre un
  gourou de la programmation, la syntaxe des commandes est trs simple.
  Basiquement, vous avez besoin de bien connatre :

    des concepts simples de programmation ;

    l'utilisation de commandes et d'utilitaires trs usuels d'unix ;

    l'accs  Internet ;

    l'utilisation de ftp.



  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt


  Les versions plus rcentes de ce document seront tlcharges sur le
  site ftp : <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/> et seront
  disponibles sur tous les autres miroirs.

  Les versions hypertexte et autres de ceci, ainsi que les autres HOWTOs
  de Linux sont principalement disponibles 
  <http://sunsite.unc.edu/LDP/> et  <http://www.linux-howto.com> et sur
  beaucoup d'autres sites web miroirs.
  (NDT : En France, vous pouvez utiliser le site suivant pour le
  document original : Miroir de Sunsite
  <ftp://ftp.lip6.fr/pub/linux/sunsite/docs/HOWTO/> ou, mieux, la
  version franaise :

  Archive des HOWTO franais sur LIP6
  <ftp://ftp.lip6.fr/pub/linux/french/HOWTO/>

  Archive  des HOWTO franais chez Freenix
  <http://www.freenix.org/unix/linux/HOWTO/>)

  J'essaierai d'ajouter  ma page Web
  <http://space.tin.it/computer/tlqhr/> la version la plus rcente en
  html et en sgml. La plupart des distributions de Linux sur CD-ROM
  incluent les HOWTOs, souvent dans un sous-rpertoire de /usr/doc/ et
  vous pouvez galement en acheter des copies imprimes chez certains
  distributeurs.

  Parfois, les HOWTOs disponibles sur les CD-ROMs, sites ftp ou en copie
  imprime ne sont plus d'actualit. Si la date y figurant est dpasse
  de plus de 6 mois, il existe probablement une version plus rcente sur
  Internet.

  Si vous faites une traduction de ce document dans une autre langue,
  envoyez-moi un mot et j'en inclurai une rfrence ici.


  11..44..  HHiissttoorriiqquuee ddeess rrvviissiioonnss


    VVeerrssiioonn 00..11 : 28 Octobre 1998 - premire version ;

    VVeerrssiioonn 00..22 : 07 Novembre 1998 - profonds changements de style et
     rajeunissement.


  11..55..  RReettoouurrss eett ccoommmmeennttaaiirreess


  Je compte sur vous, lecteurs, pour rendre ce HOWTO utile. Si vous avez
  des suggestions, corrections ou commentaires, s'il vous plat envoyez-
  les moi (Luca Rossetti <mailto:lukaros@tin.it>), et j'essaierai de les
  inclure dans la version suivante.

  Si des liens mentionns dans ce document venaient  tre indisponibles
  ou dplacs, merci de m'en informer tout de suite pour que je puisse
  mettre  jour ou changer le lien.

  J'ai la volont de rpondre aux questions d'ordre gnral  propos de
  Tcl/Tk et de Linux du mieux que je peux. Avant tout, lisez s'il vous
  plat toutes les informations contenues dans ce HOWTO, et envoyez-moi
  un message dtaill sur le problme rencontr.

  Si vous publiez ce document sur un CD-ROM ou sous forme papier,
  j'apprcierais d'en avoir une copie. Envoyez-moi un e-mail et je vous
  donnerai mon adresse postale.

  Dans plusieurs sections je mentionne des socits de publication ou
  des URLs de sites commerciaux. Je ne travaille vraiment pas pour ces
  gens-l.


  11..66..  CCrrddiittss



  La plupart des informations de ce HOWTO proviennent du livre du Dr.
  Ousterhout : Scriptics <http://www.scriptics.com>  et de la FAQ de
  comp.lang.tcl <http://www.tclfaq.wservice.com/tcl-faq/> de Larry W.
  Virden.

  Je souhaiterais remercier le PLUTO <http://www.pluto.linux.it/>,
  Groupe Italien des Utilisateurs de Linux, et l'ensemble des
  volontaires de l' ILDP <http://www.pluto.linux.it/ildp/> (Italian
  Linux Documentation Project), spcialement Eugenia Franzoni et
  Giovanni Bortolozzo pour leurs commentaires.


  11..77..  PPoolliittiiqquuee ddee ddiiffffuussiioonn


  Ce document est Copyright 1998 par Luca Rossetti
  <mailto:lukaros@tin.it>.

  Ce document est diffus dans l'espoir qu'il soit utile au lecteur :
  bien sr il est considr sans garantie ; sans mme la garantie sous-
  jacente de commercialisabilit ou d'adquation  un but particulier.
  Ce HOWTO est une documentation libre ; vous pouvez le redistribuer
  et/ou le modifier, selon les termes du Copyright LDP
  <http://sunsite.unc.edu/LDP/LDP-COPYRIGHT.html>.  Veuillez lire le
  Manifeste du LDP <http://sunsite.unc.edu/LDP/LDP-Manifesto.html> pour
  plus de dtails.


  22..  HHiissttooiirree ddee TTccll//TTkk


  Tcl/Tk a t cr par le Dr. John Ousterhout
  <mailto:ouster@scriptics.com> (prononcer  Oh'-stir-howt ) alors
  qu'il enseignait  l'universit de Berkeley, en Californie.  En fait,
  il a commenc  l'implmenter  son retour  Berkeley au printemps
  1988 ; ds l't, il tait utilis dans quelques applications
  internes, mais Tk n'existait pas encore. Lisez l'histoire de Tcl/Tk
  crite par son auteur 
  <http://www.scriptics.com/scripting/tclHistory.html>.


  22..11..  CChhrroonnoollooggiiee


    11998899 :: premires diffusions externes de Tcl et dbut de
     l'implmentation de Tk ;

    11999911 :: premire version de Tk ;

    11999944 :: le Dr. Ousterhout est employ par Sun Microsystems, Inc. :
     il se distingue comme ingnieur et dirige le projet Tcl.

    AAvvrriill//MMaaii 11999977 :: Le groupe de recherche responsable chez Sun du
     dveloppement de Tcl est dplac dans une filiale de Sun appele
     SunScript. Cependant les choses ont chang  nouveau rapidement.
     Vous pouvez lire les dtails de cette volution en choisissant
     "SunScript_story"  l'URL : SunScript-Story
     <http://starbase.neosoft.com/%7Eclaird/comp.lang.tcl/> ;

    AAoott 11999977 :: un consortium Tcl est cr. Vous pouvez en lire
     davantage, notamment comment en faire partie, qui est actuellement
     dans le conseil d'administration, etc. en visitant  Tcl Consortium
     <http://www.tclconsortium.org/> ;

    FFvvrriieerr 11999988 :: le Dr. Ousterhout quitte Sun pour fonder Scriptics
     <http://www.scriptics.com/>, une entreprise ddie aux outils,
     applications et services d'criture de scripts. Selon <
     http://www.scriptics.com/about/news/qa.html>, le coeur de Tcl/Tk
     reste libre, avec l'quipe de Sun qui continue actuellement son
     travail sur Tcl/Tk 8.1. Aprs la prochaine version, il est prvu
     que ce travail sur la base de Tcl/Tk migre de Sun  Scriptics, et
     que l'quipe de Sun se concentre davantage sur les extensions et
     applications de Tcl.

    2233 AAvvrriill 11999988 :: L'ACM <http://www.acm.org/> (Association for
     Computing Machinery) dcerne le prix du logiciel 1997 (Software
     System Award)  John Ousterhout et Scriptics (
     <http://www.acm.org/awards/>). Cette rcompense est attribue  une
     institution ou une personne reconnue pour avoir dvelopp un
     logiciel qui a eu une influence durable, remarque par des
     contributions  des concepts ou par un plbiscite commercial, ou
     les deux.



  33..  QQuu''eesstt--ccee qquuee TTccll//TTkk ??


  33..11..  QQuu''eesstt--ccee qquuee TTccll ??

  Tcl (prononcer  tickeul ) est l'acronyme de "Tool Command Language"
  (langage de commandes-outils). Tcl est en fait divis en deux
  parties : un langage et une bibliothque.

  Tcl est un langage de programmation simple, dont le but est de passer
  des commandes  des programmes interactifs tels que des diteurs de
  texte, des dbogueurs et des interprteurs shell. Il possde une
  syntaxe simple et il est lui-mme programmable : les utilisateurs de
  Tcl peuvent en effet crire des procdures pour crer des commandes
  plus puissantes que celles que fournies par l'ensemble pr-construit.

  D'autre part, Tcl est un paquetage bibliothque intgrable dans des
  applications. La bibliothque Tcl est constitue d'un analyseur
  syntaxique du langage Tcl, de routines implmentant les commandes
  pr-dfinies de Tcl, et de procdures permettant  chaque application
  d'ajouter  Tcl des commandes additionnelles qui lui sont spcifiques.
  Le programme applicatif gnre des commandes Tcl et les passe 
  l'analyseur syntaxique de Tcl pour l'excution.

  Les commandes peuvent tre gnres en lisant des caractres sur une
  source en entre ou bien en associant des chanes de caractres avec
  des lments de l'interface utilisateur de l'application, comme des
  boutons, des entres de menus, ou d'autres widgets (NdT : widget =
  Window Gadget, lment de fentre). Lorsque la bibliothque Tcl reoit
  une commande, elle analyse les champs qui la composent et excute
  directement les commandes pr-dfinies.

  Pour les commandes implmentes par l'application, Tcl rappelle
  l'application pour excuter les commandes. Dans bien des cas, les
  commandes lanceront des appels rcursifs  l'interprteur Tcl en
  passant des chanes optionnelles  excuter (en fait les procdures et
  commandes de bouclage conditionnel fonctionnent toutes de cette
  manire). Un programme d'application peut tirer de nombreux avantages
  de l'utilisation de Tcl comme langage de commande :

    Tcl fournit une syntaxe standard : une fois que les utilisateurs
     connaissent Tcl, ils seront capables de passer facilement des
     commandes  n'importe quelle application base sur Tcl.

    Tcl parvient  une bonne  programmabilit . Tout ce qu'une
     application ncessite est l'implmentation de quelques commandes
     spcifiques de bas niveau. Tcl fournit de nombreuses commandes
     utilitaires et une interface gnrique de programmation pour
     construire des procdures de commande complexes. En utilisant Tcl,
     les applications ne ncessitent pas de rimplmentation de ces
     caractristiques.

    Les extensions  Tcl, telles que la bote  outils Tk, fournissent
     des mcanismes pour la communication entre applications, en
     envoyant des commandes Tcl dans un sens et dans l'autre. La
     structure commune du langage Tcl rend plus aise la communication
     entre applications.

  Il est important de noter que Tcl a t conu en pensant que le
  programmeur devrait en fait utiliser deux langages ou plus lorsqu'il
  construit un systme logiciel de taille consquente : un pour
  manipuler des structures de donnes internes complexes, et l o la
  performance est cruciale, et un autre, comme Tcl, pour crire de trs
  courts scripts qui assemblent les autres morceaux, en fournissant des
  possibilits d'extensions  l'utilisateur.

  Pour celui qui crit des scripts Tcl, la facilit d'apprentissage, de
  programmation et d'assemblage, sont plus importantes que les
  performances ou les possibilits de structures de donnes complexes et
  d'algorithmes.

  Tcl a t construit pour tre aisment inclus dans un langage de plus
  bas niveau lorsqu'on rencontre des tches pour lesquelles un langage
  de plus bas niveau est plus adquat. Ainsi, les fonctionnalits de
  base peuvent rester petites et chacun a seulement besoin d'ajouter les
  morceaux qu'il veut ou doit avoir.

  Une rponse  la question  Qu'est-ce que Tcl ? raquo; se trouve 
  <http://www.NeoSoft.com/tcl/whatistcl.html>.


  33..22..  QQuu''eesstt--ccee qquuee TTkk ??


  Tk (prononcer "Tiii-kay") est une extension de Tcl qui apporte au
  programmeur une interface avec le systme de fentrage X11. Il est 
  noter que Tk a t compil avec succs sous X11 R4, X11 R5, X11 R6,
  ainsi que les environnements NeWS/X11 de Sun.

  De nombreux utilisateurs rencontreront Tcl/Tk  travers la commande
  "wish".  Wish est un shell de fentrage simple qui permet 
  l'utilisateur d'crire des applications Tcl/Tk dans un environnement
  de prototypage.

  Jusqu' prsent, Tcl/Tk ne supporte pas de fontes pour les langues
  japonaise, chinoise, corenne,...


  33..33..  EExxtteennssiioonnss


  Comme Tcl est facile  tendre, beaucoup essaient de partager des
  extensions, notamment le populaire itcl, [incr Tcl]
  <http://www.tcltk.com/itcl/>, ObjectTcl, TclX,  Tix
  <http://tix.mne.com/>, et BLT <http://www.tcltk.com/blt/>.

  Ces extensions ncessitent bien videmment un interprteur Tcl tendu.
  De plus, de nombreuses applications Tcl libres ncessitent une
  extension particulire de Tcl pour fonctionner.

  Une des extensions les plus populaires est certainement Expect
  <http://expect.nist.gov>.  Elle permet d'avoir une interface
  sympathique pour la plupart des commandes UNIX basiques en ligne,
  telles que ftp, telnet, rlogin, passwd, fsck, etc.

  Une liste complte des extensions de Tcl/Tk peut tre trouve  l'URL
  <http://www.scriptics.com/resource/software/extensions/>.


  33..44..  PPllaatteess--ffoorrmmeess ssuuppppoorrtteess


  Cette section contient des informations  propos de Tcl 8.0 et Tk 8.0,
  versions les plus rcentes de Tcl/Tk. Elles sont sorties le 18 aot
  1998 et le patch le plus rcent (8.0.3) date du 3 septembre 1998.

  Quand vous tldchargez Tcl et Tk, vous rcuprez deux programmes,
  wish et tclsh, les bibliothques supportant les scripts, et la
  documentation en ligne.  Ces programmes supportent des plates-formes
  gnriques de dveloppement d'applications en Tcl. Wish inclut la
  bote  outils pour interface graphique utilisateur Tk. Les paquetages
  sont prts  tre utiliss aprs l'installation.

  Tcl 8.0 et Tk 8.0 fonctionnent sur la plupart des versions des
  systmes d'exploitation suivants :


    Windows 95

    Windows NT

    Solaris et SunOS

    Linux

    HP-UX

    SGI

    IRIX

    Digital Unix

    AIX

    SCO Unix

    La plupart des autres systmes d'exploitation voisins d'UNIX pour
     Macintosh (68K et Power Mac)

    Des versions pr-compiles sont disponibles pour diverses
     distributions de Linux.



  44..  IInnssttaallllaattiioonn eett pprriissee eenn mmaaiinn ddee TTccll eett TTkk

  Les distributions rcentes incluent Tcl et Tk. Des paquetages rpm et
  deb de binaires pr-compils sont disponibles pour les distributions
  Red Hat, SuSE et Debian (ce qui facilite l'installation).

  Une installation standard d'une distribution rcente inclura Tcl/Tk
  puisque c'est un prrequis de nombreux utilitaires de configuration
  qui tournent principalement sous X.

  Tcl et Tk sont distribus librement sur Internet sous forme de code
  source. Il n'y a pas de restrictions quant  leur utilisation, ni de
  licence ou droits  payer (voir la section ``termes de la licence''
  pour information complte).
  Encore plus de scripts et d'extensions Tcl/Tk sont disponibles
  librement galement.


  44..11..  TTllddcchhaarrggeemmeenntt ddeess ddiissttrriibbuuttiioonnss ddee bbaassee


  La base de Tcl/Tk se constitue des bibliothques Tcl et Tk, plus les
  applications wish et tclsh, la documentation associe, des
  bibliothques de scripts et des applications de dmonstration. Le site
  FTP primaire pour ces donnes est  <ftp://ftp.scriptics.com/pub/tcl/>.

  Le site primaire en HTTP est
  <http://www.scriptics.com/software/download.html>.


  44..22..  IInnssttaallllaattiioonn


  A moins qu'elle ne soit dj disponible en paquetages propritaires
  pour votre distribution, vous souhaiterez tldcharger le version
  code source. Vous aurez besoin des sources de Tcl comme de Tk.  La
  procdure suivante se rfre  ce second cas :

  Choisissez entre le format tar et le format tar gzipp.

  Fichiers Tar compresss

  Sources de Tcl (tcl8.0.3.tar.Z) : fichier tar compress (environ 2.4
  Mo).  Sources de Tk (tk8.0.3.tar.Z) : fichier tar compress (environ
  3.3 Mo).

  Fichiers Tar gzipps

  Sources de Tcl (tcl8.0.3.tar.gz) : fichier tar gzipp (environ 1.5
  Mo).  Sources de Tk (tk8.0.3.tar.gz) : fichier tar gzipp (environ 2.1
  Mo).

  Quand vous rcuprez ces fichiers, vous obtenez un fichier compress
  tar avec un nom comme tcl8.0.3.tar.gz ou tcl8.0.3.tar.Z. Ces fichiers
  sont identiques, sauf par la technique de compression (les fichiers
  .gz sont gnralement plus petits que les .Z).

  Pour dcompresser la distribution, lancez des commandes shell comme
  celles-ci, selon la version que vous avez rcupre :


  ______________________________________________________________________
  gunzip -c tcl8.0.3.tar.gz
  ______________________________________________________________________


  ou

  ______________________________________________________________________
  tar xf - zcat tcl8.0.3.tar.Z
  ______________________________________________________________________


  ou

  ______________________________________________________________________
  tar xf - unzip tcl80.3.zip
  ______________________________________________________________________


  Chacune de ces commandes cre un rpertoire appel tcl8.0.3, qui
  contient les sources pour toutes les plates-formes, la documentation,
  et les bibliothques de script pour Tcl 8.0. Pour compiler et
  installer la distribution, suivez les instructions du fichier README
  dans le rpertoire de la distribution. Assurez-vous de compiler Tcl
  avant Tk, puisque Tk dpend d'informations de Tcl.


  44..33..  LL''aarrcchhiivvee ddee ccoonnttrriibbuuttiioonnss


  Il existe beaucoup d'autres paquetages libres pour Tcl et Tk, incluant
  des scripts crits en Tcl et galement des extensions crites en C ou
  C++. Ces paquetages comprennent des applications de bases de donnes
  et d'accs rseau, un constructeur d'interfaces graphiques
  utilisateur, le programme expect, des widgets Tk supplmentaires, et
  des dizaines d'autres choses.

  Le site primaire pour l'archive Tcl/Tk est
  <ftp://ftp.neosoft.com/pub/tcl>.


  44..44..  SSiitteess mmiirrooiirrss


  Plusieurs autres sites dans le monde sont des miroirs de tout ou
  partie des donnes du site de base et de l'archive de contributions ;
  vous trouverez peut-tre plus pratique de prendre des donnes sur un
  miroir plus proche de vous.

  Le fichier ftp "0_mirror"   <ftp://ftp.scriptics.com/pub/tcl/> donne
  une liste de miroirs dans votre pays.


  44..55..  QQuueelllleess vveerrssiioonnss uuttiilliisseerr ??


  Rfrez-vous toujours  la dernire version recommande dans la
  section  Tcl/Tk Core  de Scriptics Software Central page
  <http://www.scriptics.com/software/download.html>.

  A l'heure o j'cris, les versions recommandes sont les dernires
  (Tcl 8.0.3 et Tk 8.0.3), qui sont sorties en septembre 1998. Tcl 8.0
  contient un nouveau compilateur de pseudo-code qui acclre
  l'excution d'un facteur 2  10.  Il fournit aussi des contextes de
  dnomination (namespaces), des entres/sorties binaires et plusieurs
  nouvelles caractristiques.

  Tk 8.0 est la premire version qui fournit l'allure et les impressions
  naturelles sur les Macintoshes et les PCs. Tk 8.0 supporte galement
  l'encapsulation d'applications et propose un nouveau mcanisme de
  fonte portable. Tcl 8.0 et Tk 8.0 offrent tous deux des
  fonctionnalits supplmentaires au modle de scurit Safe-Tcl.


  44..66..  OO aaddrreesssseerr ddeess rraappppoorrttss ddee pprroobbllmmeess,, bbuuggss,, oouu aammlliioorraattiioonnss


  Utilisez  <news:comp.lang.tcl> pour les communications publiques.

  (NdT : le forum en langue franaise quivalent est
  <news:fr.comp.lang.tcl>).

  Une alternative consiste  envoyer problmes, suggestions, ides
  nouvelles, etc.  directement  l'auteur. Un email  John Ousterhout
  <mailto:ouster@scriptics.com> permet de le contacter.
  Lorsque vous rendez compte de problmes ou de bugs, veillez 
  mentionner tous les dtails ncessaires  un diagnostic correct.
  Basiquement, vous devez dcrire votre matriel, votre systme
  d'exploitation et la version de Tcl/Tk utilise, prciser si vous avez
  fait des modifications ou des ajouts, et donner, si possible, soit un
  petit bout de code, soit une URL vers du code mettant en vidence le
  problme.

  Si vous avez du logiciel dont vous pensez que la communaut pourrait
  tirer parti (que ce soit un programme, une fonction, une extension, ou
  un simple exemple), ou si vous avez un document, un article de journal
  ou de magazine, une thse, un projet, ou mme une annonce commerciale,
  faites-le savoir aux personnes susceptibles d'tre intresses.

  Il y a des responsables de FAQ pour tous ces domaines, ainsi qu'un
  forum Usenet comp.lang.tcl.announce <news:comp.lang.tcl.announce> que
  vous pouvez utiliser.

  Cela vaut toujours la peine de soumettre vos contributions directement
  sur le site ftp afin que davantage de personnes puisse dans le futur
  profiter de votre exprience.

  Pour poster sur le forum comp.lang.tcl.announce
  <news:comp.lang.tcl.announce>, envoyez un email dtaill  tcl-
  announce <mailto:tcl-announce@mitchell.org>. N'hsitez pas  renvoyer
  les gens vers votre propre site ftp ou WWW si vous en avez un.


  55..  UUnn ttoouutt ppeettiitt ppeeuu ddee pprrooggrraammmmaattiioonn


  Comme Tcl est un langage interprt, pour excuter un programme Tcl
  (qu'on appelle galement un script) vous passez normalement le fichier
   l'interprteur Tcl, wish, par exemple :

  ______________________________________________________________________
  wish hello.tcl
  ______________________________________________________________________



  Vous pouvez aussi utiliser wish en mode interactif et lui donner des
  commandes  l'invite.

  Il existe un autre interprteur de Tcl en standard, tclsh, qui
  comprend seulement le langage Tcl. Tclsh n'a aucune commande de
  l'interface utilisateur de Tk, donc il n'est pas possible de crer des
  programmes graphiques avec tclsh.

  Certaines applications Tcl libres tendent le langage en ajoutant de
  nouvelles commandes crites sous la forme de fonctions C. Dans ce cas,
  vous devez compiler l'application au lieu de passer seulement son code
  Tcl  l'interprteur wish.  Ce programme applicatif compil est
  vritablement, du point de vue de Tcl, une nouvelle version de
  l'interprteur wish, avec les nouvelles commandes en C lies dedans.
  Bien sr, le programme peut tre bien plus qu'un simple interprteur
  Tcl. (Note : vous pouvez aussi utiliser la capacit de chargement
  automatique de Tcl sur les systmes qui la supportent).

  55..11..  PPrrooggrraammmmee--mmiinnuuttee eenn TTccll


  Tcl a une structure simple. Chaque ligne commence par une nouvelle
  commande, par exemple button et un certain nombre d'arguments. Chaque
  commande est implmente comme si c'tait une fonction C, qui prend en
  charge tous les arguments.
  Voici un exemple trs bateau, le clbre Hello World crit en Tcl/Tk :

  ______________________________________________________________________
  # Ceci est un commentaire
  button .b -text "Hello World" -command exit
  pack .b
  ______________________________________________________________________



  Dans cet exemple, vous devez taper les commandes de manire
  interactive dans tclsh ou wish.

  Vous pouvez aussi placer les commandes dans des fichiers de script et
  les appeler tout comme des scripts shell. Pour reprendre l'exemple
  prcdent, le programme Hello World s'crirait :

  ______________________________________________________________________
  #! /usr/local/bin wish -f
  button .b -text "Hello World" -command exit
  pack .b
  ______________________________________________________________________



  Mettez ce texte dans un fichier appel Hello et assurez-vous que wish
  est install dans /usr/local/bin (si ce n'est pas le cas, corrigez le
  chemin d'accs).

  Rendez le fichier Hello excutable, par un :

  ______________________________________________________________________
  chmod 775 Hello
  ______________________________________________________________________



  et lancez-le sous X.

  Vous allez voir un bouton marqu Hello World dans une fentre :
  cliquer dessus ferme la fentre.

  66..  LLaannggaaggee ddee ssccrriipptt :: aavvaannttaaggeess eett iinnccoonnvvnniieennttss


  Afin de comprendre l'importance de Tcl/Tk et son futur, je vous
  recommande la visite de
  <http://www.scriptics.com/people/john.ousterhout/> par John K.
  Ousterhout  <mailto:ouster@scriptics.com>.  Vous y trouverez des
  choses  lire sur l'importance des scripts (crits dans des langages
  tels que Tcl) et une comparaison avec la programmation systme (dans
  des langages comme le C et le Java).

  Pour une lecture  propos des comparaisons, voyez ``the comparison
  discussion''.

  Voici un rsum des principaux avantages et inconvnients de Tcl/Tk.

  66..11..  RReepprroocchheess lleess pplluuss ccoouurraannttss  pprrooppooss ddee TTccll


  66..11..11..  TTccll eesstt iinntteerrpprrtt


  Les donnes sont traites de manire primaire comme des chanes de
  caractre, les programmes crits en Tcl sont lents.  Tcl 8.0 essaie de
  pallier ceci en compilant  un certain degr ainsi qu'en autorisant
  diffrents types de variables.

  66..11..22..  PPlluussiieeuurrss ccaarraaccttrriissttiiqquueess nnee ssoonntt ppaass iinnttuuiittiivveess


  Les commentaires sont des commandes plutt que de vrais commentaires,
  les nombres commenant par 0 sont en octal, l'utilisation correcte des
  guillemets, etc.  Ces aspects sont abords dans les diverses FAQs.

  66..22..  PPrriinncciippaauuxx aavvaannttaaggeess ddee TTccll


  66..22..11..  CC''eesstt uunn llaannggaaggee ddee ssccrriipptt ddee hhaauutt nniivveeaauu


  Vous avez besoin de beaucoup moins de code pour faire le travail,
  surtout en comparaison avec des applications Motif ou Win32. En
  gnral, le nombre de lignes de code (Line Of Code, LOC) d'un projet
  logiciel est l'indice de complexit le plus important.


  66..22..22..  TTccll eesstt lliibbrree


  Vouz pouvez vous procurer les sources gratuitement sur Internet par la
  page Download de Scriptics ou par le site FTP pour Tcl.  Le site de
  base du logiciel <http://www.scriptics.com/software/download.html>
  inclut la version code source, ainsi que des versions binaires pour
  plates-formes Windows et Macintosh ; ou bien vous pouvez trouver Tcl
  sur un bon nombre de CD-ROMs pour un cot rduit.

  Une lecture  propos de la base libre de Tcl et Tk :
  www.scriptics.com/about/news/qa.html
  <http://www.scriptics.com/about/news/qa.html> .

  66..22..33..  IIll ffoonnccttiioonnnnee ssuurr ddee nnoommbbrreeuusseess ppllaatteess--ffoorrmmeess


  Il existe des versions pour UNIX (Linux... bien sr), Windows et
  Macintosh. Exceptes quelques diffrences entre plates-formes, vos
  scripts Tcl fonctionneront de la mme manire sur tous les systmes.

  66..22..44..  IIll eesstt iinntteerrpprrtt


  Vous pouvez excuter directement votre code sans compilation ni
  dition de liens (mme si quelques compilateurs de Tcl sont
  disponibles).

  66..22..55..  IIll eesstt eexxtteennssiibbllee


  Il est ais d'ajouter vos propres commandes pour tendre le langage
  Tcl. Vous pouvez les crire en C ou en Tcl.

  66..22..66..  IIll eesstt eennccaappssuullaabbllee ddaannss vvooss aapppplliiccaattiioonnss


  L'interprteur Tcl est purement et simplement un ensemble de fonctions
  C que vous appelez dans votre code. Cela signifie que vous pouvez
  utiliser Tcl comme langage applicatif, tout comme un langage de macro
  pour un tableur.



  66..22..77..  TTccll//TTkk eesstt ccoommppaattiibbllee AAnn 22000000


  Lisez ce que le crateur de la base Tcl et Tk dit  ce sujet :
  www.scriptics.com/Y2K.html <http://www.scriptics.com/Y2K.html> .


  77..  PPrrooggrraammmmeess lleess pplluuss ccllbbrreess uuttiilliissaanntt TTccll//TTkk


  A part les deux implmentations dcrites dans ``l'Introduction'', de
  nombreuses applications sont crites en Tcl/Tk ou une combinaison de
  Tcl et de C. Une liste complte de ces implmentations figure  la
  partie 4 <http://www.tclfaq.wservice.com/tcl-faq/part4.html> de la
  Foire Aux Questions sur Tcl/Tk (FAQ). Je vous suggre de visiter
  Scriptics' Software Central
  <http://www.scriptics.com/resource/software/>.

  Un autre bon point de dpart est  <http://www.NeoSoft.com/tcl/>.

  Une des meilleures applications Tcl tournant sous Linux s'appelle
  TkDesk <http://people.mainz.netsurf.de/~bolik/tkdesk/>. C'est un
  gestionnaire de fentres et un lanceur d'applications qui fonctionne
  trs bien.

  Si vous tes dveloppeur en Tcl/Tk, n'hsitez pas  m'envoyer
  <mailto:lukaros@tin.it> une URL (et une description de votre travail)
  que je puisse ajouter ici.



  88..  RRffrreenncceess


  Pour de nombreuses raisons, les gens prfrent souvent avoir un manuel
  papier comme rfrence ou aiment tre aids en ligne par d'autres
  personnes connectes.

  Vous pouvez trouver dans cette section une slection de livres de
  rfrence, de tutoriels, de sites www et forums Usenet.

  88..11..  LLiivvrreess


  Beaucoup de livres concernant Tcl/Tk ont t crits et vont tre
  publis.  Je ne vais pas essayer de tous les rpertorier (uunn aauuttrree
  hhoowwttoo nn''yy ssuuffffiirraaiitt ppaass :) ). Vous trouverez davantage d'informations
  et des notes complmentaires  :

    www.tclconsortium.org/books/index.vet

    www.amazon.com/exec/obidos/subst/categories/computer-
     programming/tcl-tk-article/002-8989352-4516417

    Page : tcl_books.html  l'URL starbase-neosoft-tcl-books

  Je vais essayer ici de rsumer en quelques lignes les livres que je
  connais  ce sujet, qui sont tous d'un niveau basique  moyen. L
  encore, les gens qui connaissent le sujet ont suffisamment
  d'informations pour savoir o trouver des livres d'un niveau plus
  avanc.





  88..11..11..  TThhee TTccll aanndd TTkk TToooollkkiitt


  Auteur : John K. Ousterhout  <mailto:ouster@scriptics.com>

  Information sur le WWW  propos de l'ouvrage :
  cseng.aw.com/bookdetail.qry?ISBN=0%2D201%2D63337%2DX&ptype=0

  Exemples du livre :
  <ftp://ftp.scriptics.com/pub/tcl/doc/book.examples.Z>

  Complments au livre : <http://www.scriptics.com/doc/tk4.0.ps>

  Cet ouvrage couvre  l'origine Tcl 7.3 et Tk 3.6.


  88..11..22..  PPrraaccttiiccaall PPrrooggrraammmmiinngg iinn TTccll aanndd TTkk,, ddeeuuxxiimmee ddiittiioonn

  Auteur : Brent Welch <mailto:welch@acm.org>

  Information sur le WWW  propos de l'ouvrage :
  <http://www.beedub.com/book/>

  Table des matires : <http://www.beedub.com/book/>

  Publicit du livre  la section_50000.html de l'URL
  <http://www.borders.com/sections/>

  Cette dition rvise dcrit Tcl/Tk 8.0 tel qu'il tait dans sa
  priode beta.  Les ajouts par rapport  la premire dition concernent
  les sockets, les paquetages, les contextes (namespaces), et une longue
  section dcrivant les changements dans Tcl 7.4, 7.5, 7.6 et 8.0 (et Tk
  galement), Safe Tk, et le Plugin.


  88..11..33..  TTccll aanndd TTkk RReeffeerreennccee MMaannuuaall


  Editeurs : Marc Ewing <mailto:marc@redhat.com>, Erik Troan

  Information sur le WWW  propos de l'ouvrage :
  <http://www.lsl.com/catalog/books/tcltk/>


  88..11..44..  TThhee VViissuuaall TTCCLL HHaannddbbooookk,, 11//ee


  Auteur : David Young <mailto:david@inforef.com>

  Information sur le WWW  propos de l'ouvrage :
  <http://www.amazon.com/exec/obidos/ASIN/013461674X/qid%3D932034805/002-8225427-0056632>

  Un guide complet sur Visual TCL. Ce livre mne le lecteur des concepts
  de base du dveloppement d'interfaces graphiques utilisateur jusqu'
  des dveloppements d'applications significatifs. Le livre se concentre
  sur les extensions TCLX et VT, voquant beaucoup de sujets
  fondamentaux pour TCL. VT est une interface graphique base sur Motif,
  incompatible avec Tk. L'intgralit du langage TCL est documente dans
  une section Commands spare. Il inclut un CD-ROM avec les versions
  SGI, Solaris, HP-UX, AIX et Unixware de Visual Tcl.


  88..11..55..  RRuunnnniinngg LLiinnuuxx



  Auteur : Matt Welsh et Lar Kaufman

  Information sur le WWW  propos de l'ouvrage :
  <http://www.ora.com/catalog/runux2/noframes.html>

  (NdT : La version franaise de cet ouvrage est intitule "Le Systme
  Linux", aux ditions O'Reilly. Cette adaptation franaise de Ren
  Cougnenc a t rvise, pour la deuxime dition, par Manuel et Nat
  Makarvitch. Voir <http://www.editions-oreilly.fr/sysad/runux2.html>.

  La 3me dition originale doit sortir en aot 1999. Voir
  <http://www.ora.com/catalog/runux3/noframes.html>. Il faudra attendre
  un peu pour la version franaise).

  C'est un livre de base vraiment bien crit. Il contient un chapitre
  sur la programmation en Tcl/Tk (ainsi que Perl, C, C++).


  88..11..66..  TTccll//TTkk ffoorr DDuummmmiieess ((PPoouurr lleess NNuullss))


  Auteur : Timothy Webster, with Alex Francis

  Information sur le WWW  propos de l'ouvrage :
  <http://www.dummies.com/>

  Un autre livre dans la srie des livres de programmation. Celui-ci se
  concentre sur le plugin Tcl comme environnement de programmation.


  88..11..77..  IInntteerraaccttiivvee WWeebb AApppplliiccaattiioonnss WWiitthh TTccll//TTkk


  Auteurs : Michael Doyle, Hattie Schroeder

  Information sur le WWW  propos de l'ouvrage : <
  http://www.eolas.com/tcl/>

  C'est un livre d'apprentissage par l'exemple, pour les personnes qui
  savent un peu programmer sans tre experts. Il couvre le dveloppement
  d'applets comme applications autonomes et des applications serveurs
  simples. Il est fourni avec la bote  outils Spynergy, qui ajoute
  diverses procdures en pur Tcl/Tk pour le traitement distribu, la
  rcupration d'URL, la gnration de HTML, la gestion de bases de
  donnes et la gestion transparente de fichiers quelle que soit la
  plate-forme, un diteur de Tcl, Ed, et un environnement de test, un
  outil de conversion d'image, une dmonstration des fonctionnalits de
  Tk, une version client/serveur d'une application rolodex, un serveur
  web en Tcl pur, une application de push en client/serveur, un
  navigateur web en Tcl.



  88..22..  MMaannuueellss eenn lliiggnnee eett ttuuttoorriieellss


    John Ousterhout a crit un guide dans un style ingnierie, qui
     dcrit le codage, la documentation et les conventions de test en
     usage chez Sun pour le codage de la base en C de Tcl, et l'a mis 
     disposition des autres dveloppeurs Tcl/Tk. Il se trouve 
     <ftp://ftp.scriptics.com/pub/tcl/doc/engManual.tar.Z>

    Un second guide, couvrant l'criture de scripts Tcl, peut tre
     rcupr 
     <ftp://ftp.scriptics.com/pub/tcl/doc/styleGuide.tar.gz>.

    A brief introduction to TCL/TK
     <http://http2.brunel.ac.uk:8080/~csstddm/TCL2/TCL2.html> par  David
     Martland  < mailto:csstddm@brunel.ac.uk>.

    Un autre tutoriel intitul User interfaces with Tcl/Tk
     <http://www.scism.sbu.ac.uk/tkteach/> a t crit par  Fintan
     Culwin  <mailto:fintan@sbu.ac.uk>.

    Mme si vous devriez avoir les pages de manuel de Tcl/Tk sur votre
     systme, voici un autre endroit o chercher : TCL Manual Pages
     (from TCL7.4)-Tk Manual Pages (from TK4.0)
     <http://cuiwww.unige.ch/eao/www/TclTkMan/Man.html>.

    The Tcl/Tk Cookbook <http://www.itd.clrc.ac.uk/Activity/TclTk>
     fournit beaucoup d'informations pour dbuter.



  88..33..  SSiitteess WWoorrlldd WWiiddee WWeebb


  Il existe de nombreuses ressources WWW qui offrent des informations
  complmentaires sur beaucoup d'aspects de Tcl et de ses extensions.

    Rfrez-vous  la FAQ-Tcl (partie 2)
     <http://www.tclfaq.wservice.com/tcl-faq/part2.html> pour des liens
     en quantit vers de la documentation Tcl/Tk et des sites web.

    Lancez votre navigateur web sur Tcl/Tk Information
     <http://www.tcltk.com> : un site avec beaucoup de liens vers des
     ressources Tcl/Tk sur le web (informations, Extensions, Outils,
     Entranement et Evnements).

    Jetez un oeil  Tcl-Consortium <http://www.tclconsortium.org/> :
     une organisation  but non-lucratif pour promouvoir Tcl/Tk et
     soutenir la communaut des dveloppeurs.

    Allez naviguer  l'Archive Officielle des Sources des Contributions
     <http://www.NeoSoft.com/tcl/> pour le Tool Command Language (TCL)
     et la bote  outils Tk, hberge par Neosoft, Inc.

    Pour une discussion  propos du pour et du contre des principaux
     langages de script : article paru dans SunWorld
     <http://www.sun.com/sunworldonline/swol-10-1997/swol-10-scripting.html
     >, par Cameron Laird  < mailto:claird@Starbase.NeoSoft.com>

    Une page web qui contient diverses comparaisons entre Tcl/Tk et
     d'autres systmes similaires. La plupart d'entre elles sont tires
     de "comp.lang.tcl", l'auteur serait heureux d'ajouter tout article
     important que vous, oui vous !, voudrez lui envoyer : Comparaison
     <http://icemcfd.com/tcl/comparison.html> par Wayne Christopher
     <mailto:wayne@icemcfd.com>.

    Le cours de Tcl/Tk de E.J. Friedman-Hill's
     <http://herzberg.ca.sandia.gov/TclCourse/> : ce document est
     disponible seulement sous forme PowerPoint et en HTML de basse
     qualit (en format HTML, toutes les figures et une partie du texte
     sont manquantes).



  88..44..  AAuuttrreess ddooccuummeennttss && FFooiirreess AAuuxx QQuueessttiioonnss


  Beaucoup de matire est disponible sur l'Internet : papiers
  introductifs, papiers blancs, tutoriels, transparents, versions
  PostScript de brouillons d'ouvrages publis, et bien d'autres choses.

  Pour une rfrence complte, veuillez s'il vous plat jeter un oeil 
  l'excellente FAQ Tcl <http://www.tclfaq.wservice.com/tcl-faq/> .

  88..55..  FFoorruumm UUsseenneett


  comp.lang.tcl <news:comp.lang.tcl> est un groupe de discussion non
  modr, cr pour les changes sur le langage de programmation Tcl et
  les outils qui utilisent Tcl sous une forme quelconque, tels que la
  bote  outils Tk pour le systme X Window, le Tcl tendu, et expect.

  (NdT : le forum quivalent dans la hirarchie francophone fr.* est
  fr.comp.lang.tcl <news:fr.comp.lang.tcl>).

  Pour les annonces relatives  Tcl/Tk, regardez toujours
  comp.lang.tcl.announce <news:comp.lang.tcl.announce> : vous y
  trouverez les annonces de versions finales, de patchs, de nouvelles
  applications, etc.

  Je prcise  nouveau que la FAQ se trouve  FAQ Tcl
  <http://www.tclfaq.wservice.com/tcl-faq/>.

  99..  TTeerrmmeess ddee llaa lliicceennccee ddee TTccll//TTkk


  Les termes suivants s'appliquent  toutes les versions diffuses de la
  base de Tcl/Tk, au plug-in Tcl/Tk navigateur version 2.0, et 
  TclBlend et Jacl version 1.0. Veuillez noter que les outils TclPro
  sont sous une autre licence.  La prsente licence est incluse dans les
  distributions standard de Tcl/Tk en tant que fichier "licence.terms".

  LICENCE DE TCL/TK

  Ce logiciel est sous copyright des Rgents de l'Universit de
  Californie, Sun Microsystems, Inc., Scriptics Corporation, et autres
  parties. Les termes suivants s'appliquent  tous les fichiers associs
  au logiciel  moins que ce ne soit explicitement mentionn dans les
  fichiers individuellement.

  Les auteurs accordent ici la permission d'utiliser, copier, modifier,
  distribuer, et placer sous licence ce logiciel et sa documentation
  dans n'importe quel but, pour autant que les notes de copyright
  existantes soient conserves dans toutes les copies et que la prsente
  note soit incluse telle quelle dans toute diffusion. Aucun accord
  crit, licence ou droit d'auteur n'est requis pour un usage autoris.
  Les modifications de ce logiciel devraient tre places sous copyright
  par leurs auteurs et ne ncessitent pas de suivre les termes de la
  licence dcrits ici, pour autant que les nouveaux termes soient
  clairement indiqus sur la premire page de chaque fichier sur lequel
  ils s'appliquent.

  EENN AAUUCCUUNN CCAASS LLEESS AAUUTTEEUURRSS OOUU DDIISSTTRRIIBBUUTTEEUURRSS NNEE PPOOUURRRROONNTT EETTRREE TTEENNUUSS PPOOUURR
  RREESSPPOONNSSAABBLLEESS DDEE DDOOMMMMAAGGEESS DDIIRREECCTTSS,, IINNDDIIRREECCTTSS,, PPAARRTTIICCUULLIIEERRSS,, AACCCCIIDDEENNTTEELLSS
  OOUU CCOOLLLLAATTEERRAAUUXX PPRROOVVOOQQUUEESS PPAARR LL''UUTTIILLIISSAATTIIOONN DDEE CCEE LLOOGGIICCIIEELL,, DDEE SSAA
  DDOOCCUUMMEENNTTAATTIIOONN,, OOUU QQUUEELLCCOONNQQUUEESS CCOONNSSEEQQUUEENNCCEESS DDEE CCEECCII,, MMEEMMEE SSII LLEESS
  AAUUTTEEUURRSS OONNTT EETTEE AAVVEERRTTIISS DDEE LLAA PPOOSSSSIIBBIILLIITTEE DDEE CCEESS DDOOMMMMAAGGEESS..

  LLEESS AAUUTTEEUURRSS EETT DDIISSTTRRIIBBUUTTEEUURRSS SSEE DDEEGGAAGGEENNTT PPRREECCIISSEEMMEENNTT DDEE TTOOUUTTEESS
  GGAARRAANNTTIIEESS,, IINNCCLLUUAANNTT,, MMAAIISS PPAASS EEXXCCLLUUSSIIVVEEMMEENNTT,, LLAA GGAARRAANNTTIIEE IIMMPPLLIICCIITTEE DDEE
  CCOOMMMMEERRCCIIAALLIISSAABBIILLIITTEE,, LL''AADDEEQQUUAATTIIOONN AA UUNN BBUUTT PPAARRTTIICCUULLIIEERR,, EETT LLAA NNOONN--
  CCOONNTTRREEFFAACCOONN.. CCEE LLOOGGIICCIIEELL EESSTT FFOOUURRNNII  TTEELL QQUUEELL ,, LLEESS AAUUTTEEUURRSS EETT
  DDIISSTTRRIIBBUUTTEEUURRSS NN''OONNTT AAUUCCUUNNEE OOBBLLIIGGAATTIIOONN DDEE MMAAIINNTTEENNAANNCCEE,, SSUUPPPPOORRTT,, MMIISSEE AA
  JJOOUURR,, EEXXTTEENNSSIIOONNSS,, OOUU MMOODDIIFFIICCAATTIIOONNSS..

  UTILISATION GOUVERNEMENTALE : Si vous acqurez ce logiciel pour le
  compte du gouvernement amricain, le gouvernement n'aura que des
  droits restreints sur le logiciel et la documentation associe, tel
  qu'il est dfini dans les lois fdrales sur l'acquisition (Federal
  Acquisition Regulations - FARs)  la clause 52.227.19 (c) (2). Si vous
  acqurez ce logiciel pour le compte du ministre de la dfense
  (Department of Defense, DoD), le logiciel sera class comme logiciel
  commercial (Commercial Computer Software) et le gouvernement n'aura
  que des droits restreints, tel que dfini dans la clause 252.227-7013
  (c) (1) des DFARs. Nonobstant ce qui prcde, les auteurs accordent au
  gouvernement amricain et aux personnes agissant en son nom la
  permission d'utiliser et de distribuer le logiciel selon les termes
  spcifis dans la prsente licence.





















































  Le teTeX HOWTO : le guide local de teTeX pour Linux
  Robert Kiesling
  v3.7, 9 Novembre 1998

  Ce document concerne l'installation et l'utilisation de base de teTeX,
  une implmentation de TeX et LaTeX, pour les distributions principales
  de Linux aux tats-Unis, ainsi que des extensions auxiliaires comme
  Ghostscript. Le contenu du teTeX HOWTO : le guide local de teTeX pour
  Linux est la proprit (copyright (C) 1997, 1998) de Robert A. Kies
  ling. Les termes exacts couvrant sa reproduction sont donns dans
  l'introduction et les annexes. Les marques dposes appartiennent 
  leurs propritaires respectifs. Veuillez envoyer vos plaintes, sugges
  tions, errata et autres  kiesling@ix.netcom.com, pour me permettre de
  garder ce document le plus complet et le plus  jour possible.  Adap
  tation franaise : Mark Hoebeke mh@jouy.inra.fr.
  ______________________________________________________________________

  Table des matires
















































  1. Introduction

     1.1 Droits de reproduction
     1.2 Logiciels dcrits dans ce document
        1.2.1 teTeX
        1.2.2 diteurs de textes
        1.2.3 (TT
        1.2.4 Polices

  2. Utilisation de teTeX

     2.1 Imprimer la documentation

  3. Commandes TeX

     3.1 Survol des commandes
     3.2 Commandes de polices
     3.3 Styles et dimensions des paragraphes
        3.3.1 Tolrances.  (C'est quoi ces rectangles noirs  la fin de chaque ligne ?)
     3.4 Mise en page
     3.5 Numros de page, en-ttes et pieds de page
     3.6 Titres et macros

  4. Commandes LaTeX

     4.1 Structure des documents
     4.2 Caractres et styles typographiques
     4.3 Marges et interlignes
     4.4 Classes de documents
        4.4.1 Articles et rapports
        4.4.2 Lettres.

  5. Extensions pour LaTeX et autres ressources

  6. Combiner textes et lments graphiques avec

     6.1 Et si mon imprimante n'est pas supporte ?

  7. Utilisation de polices Postscript

  8. Annexe A : liste des sites CTAN

  9. Annexe B : installation de la distribution CTAN de teTeX

     9.1 Installation de la distribution binaire
        9.1.1 Installation minimale
        9.1.2 Installation complte
     9.2 Configuration d'un systme lmentaire
     9.3 Installation de la distribution source CTAN
     9.4 Dtails de configuration aprs l'installation

  10. Annexe C : distribution et droits d'auteur

     10.1 Distribution
     10.2 GNU GENERAL PUBLIC LICENSE
     10.3 Comment appliquer ces dispositions  vos nouveaux programmes


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn





  11..11..  DDrrooiittss ddee rreepprroodduuccttiioonn

  Le teTeX-HOWTO est copyright (C) 1997, 1998 par Robert Kiesling.  Il
  est permis d'en faire des copies conformes et de les distribuer 
  condition que les instructions concernant les droits de reproduction
  et celles concernant les permissions soient prserves sur toutes les
  copies.

  Il est permis de copier et de distribuer des versions modifies de ce
  manuel sous les mmes conditions que les copies conformes, sous
  rserve que les sections intitules _D_i_s_t_r_i_b_u_t_i_o_n et _G_N_U _G_e_n_e_r_a_l _P_u_b_l_i_c
  _L_i_c_e_n_s_e soient incluses exactement comme dans l'original, et sous
  rserve que l'intgralit du travail driv rsultant soit distribu
  sous les termes d'une note concernant les droits identique  celle-ci.

  Il est permis de copier et de distribuer des traductions de ce
  document dans d'autres langues, sous les conditions mentionnes ci-
  dessus pour les versions modifies.  ceci prs que les sections
  intitules _D_i_s_t_r_i_b_u_t_i_o_n et _G_N_U _G_e_n_e_r_a_l _P_u_b_l_i_c _L_i_c_e_n_s_e peuvent tre
  incluses sous forme d'une traduction approuve par la Free Software
  Foundation au lieu de l'anglais originel. Veuillez vous reporter  la
  section ``Distribution et droits d'auteur'' pour les termes gouvernant
  la copie.


  11..22..  LLooggiicciieellss ddccrriittss ddaannss ccee ddooccuummeenntt

  TeX ne s'occupe que de la partie mise en forme dans la prparation de
  documents. Produire des sorties avec TeX, c'est comme compiler un code
  source en code objet, dont il reste  faire l'dition de liens. Vous
  prparez un fichier d'entre avec un diteur de textes -- ce qui est
  du  traitement de texte  dans la tte de la plupart des gens -- et
  formatez le document d'entre avec TeX pour produire un fichier de
  sortie indpendant de tout priphrique, appel fichier .dvi (pour
  _d_e_v_i_c_e _i_n_d_e_p_e_n_d_e_n_t).

  Vous aurez galement besoin d'un programme ou deux pour traduire le
  fichier .dvi issu de TeX pour votre cran et votre imprimante. Ces
  programmes sont connus sous le nom collectif de  dviware . Par
  exemple, TeX lui-mme n'met que des requtes pour les polices de
  caractres. C'est la tche du traducteur de fichiers .dvi de fournir
  les polices en question pour la sortie, qu'elle se fasse sur cran ou
  sur papier. Cette tape supplmentaire peut sembler inutilement
  complique, mais cette abstraction permet aux documents d'avoir une
  apparence identique sur diffrents priphriques sans aucun changement
  (ou presque) du document d'origine.


  11..22..11..  tteeTTeeXX

  Il existe une implmentation de TeX pour tout systme informatique
  srieux au monde -- et mme pour un tas de systmes  non srieux --,
  les implmenteurs doivent donc fournir les outils d'installation pour
  tous ceux-ci. Ceci rend compte, en partie, de la complexit de teTeX,
  en plus de la complexit inhrente  toute installation de TeX. Ceci
  explique galement que l'installation du systme par vous-mme est une
  tche non ngligeable, et,  moins d'tre dj familier avec TeX, il
  est facile de se perdre dans le nombre de programmes excutables, de
  fichiers TeX, de documentations et de polices.

  Heureusement, teTeX est intgr  la distribution GNU/Linux. Il vous
  est possible d'installer le paquetage beaucoup plus facilement en
  utilisant les outils d'installation de GNU/Linux. Il se peut que teTeX
  soit dj install sur votre systme. Si c'est le cas, vous pouvez
  passer directement  la section ``Utilisation de teTeX''.

  Toutefois, si vous voulez installer le paquetage, les archives
  ncessaires  une installation utilisable de teTeX sont sur le rseau
  d'archives CTAN. Une liste de ces sites se trouve dans la section
  ``Liste de sites CTAN''.

  CTAN est le _C_o_m_p_r_e_h_e_n_s_i_v_e _T_e_X _A_r_c_h_i_v_e _N_e_t_w_o_r_k (rseau abordable
  d'archives TeX), une srie de sites FTP anonymes archivant des
  programmes, des macros, des polices et de la documentation pour TeX.
  Au cours de votre utilisation de TeX, vous vous familiariserez
  probablement avec au moins un site CTAN. Dans ce document, un chemin
  d'accs tel que ~CTAN/contrib/pstricks, signifie  allez voir dans le
  rpertoire contrib/pstricks du site CTAN le plus proche .

  L'installation de la distribution gnrique de teTeX, dcrite dans la
  section ``Installation de la distribution CTAN de teTeX'' se focalise
  sur les versions Intel de Linux. L'installation de teTeX sur d'autres
  matriels ne devrait ncessiter que la substitution approprie de
  l'archive des programmes excutables au cours du processus
  d'installation.

  En plus des programmes excutables, la distribution contient
  l'ensemble des extensions pour TeX et LaTeX, metafont et ses sources,
  bibtex, makeindex, et _t_o_u_t_e la documentation... le tout dpassant les
  4 Mo. La documentation couvre tout ce dont vous aurez a priori besoin
  pour dmarrer. Vous devriez donc installer tous ces documents. Non
  seulement serez-vous amen  tous les lire, mais les documents par
  eux-mmes fournissent de nombreux exemples de code TeX et LaTeX
   vivant .

  TeX a t crit par le professeur Donald Knuth de l'universit de
  Stanford. Il s'agit d'un langage de composition de page de bas niveau
  utilis par toutes les extensions de plus haut niveau comme LaTeX.
  LaTeX est principalement un ensemble de macros TeX fournissant des
  formats de documents prdfinis et pratiques pour l'utilisateur final.
  Si vous aimez les formats fournis par LaTeX, vous n'aurez peut-tre
  jamais  apprendre la programmation de TeX au plus bas niveau. La
  diffrence entre les deux langages est comme la diffrence entre
  l'assembleur et le C. Vous pouvez avoir la vitesse et la flexibilit
  de TeX, ou la facilit d'utilisation de LaTeX.

  Au passage, les lettres du mot  TeX  sont les lettres grecques tau-
  epsilon-chi. Il ne s'agit pas d'une confrrie, mais de la racine du
  mot grec _t_e_c_h_n_e_, qui signifie art et/ou science.  TeX  ne se
  prononce pas comme la premire syllabe de  Texas.  Le _c_h_i n'a pas
  d'quivalent en franais, mais  TeX  se prononce gnralement de
  faon  rimer avec le mot anglais  yecch (-- NdT. : le _c_h_i se
  prononce par exemple comme le _x dans Mexico tels que le prononcent les
  hispanophones.--) ,  exemple donn par le professeur Knuth dans le
  _T_e_X_B_o_o_k_, l'un des standards de rfrence pour TeX. Pour crire le mot
   TeX  sur des priphriques  base de caractres, pensez  utiliser
  la casse standard, ou la macro \TeX{} lors de la composition.


  11..22..22..  ddiitteeuurrss ddee tteexxtteess

  N'importe lequel des diteurs qui marchent sous Linux -- jed, joe,
  jove, vi, vim, stevie, Emacs et micro-Emacs -- peut servir  prparer
  un fichier d'entre pour TeX, sous rserve qu'il puisse lire et crire
  des fichiers en ASCII pur. Mon prfr est GNU Emacs. Cela pour
  plusieurs raisons :

    Vous pouvez formater, prvisualiser et imprimer des documents avec
     les modes TeX et LaTeX d'Emacs.

    Emacs peut insrer automatiquement des  guillemets arrondis   la
     TeX, lors de la saisie, au lieu de ceux de l'espce des "ASCII-pur-
     beurre."

    Emacs intgre le support pour _t_e_x_i_n_f_o, un systme de documentation
     hypertextuel.

    Emacs bnficie d'un support trs rpandu. Les versions 19.34 et
     postrieures, par exemple, sont intgres dans les principales
     distributions Linux aux tats-Unis. La version la plus rcente dans
     les archives GNU est la 20.3.

    Emacs peut tout faire, sauf beurrer la tartine du matin.

    Emacs est libre et gratuit.


  11..22..33..  ddvviippss

  Le programme dvips de Tomas Rokicki produit du Postscript  partir
  d'un fichier .dvi. De plus, en cas de besoin, il lance Metafont pour
  gnrer les polices ncessaires sous forme de _b_i_t_m_a_p (-- NdT. :
  polices o chaque symbole est reprsent par une matrice de points
   allums  ou  teints. --) ou il utilise les polices Postscript
  pour la sortie. Il est aussi capable de redimensionner les pages et
  d'effectuer des translations graphiques  partir d'instructions
  contenues dans un fichier TeX ou LaTeX.

  dvips fait partie de la distribution teTeX. Il est abord plus
  compltement dans la section ``Combiner textes et lments graphiques
  avec dvips''.


  11..22..44..  PPoolliicceess

  Une grande partie de la complexit de TeX, et par consquent de LaTeX,
  provient de son implmentation de divers systmes de polices, et de la
  faon dont ces polices sont spcifies. Une amlioration majeure de
  LaTeX 2e par rapport  son prdcesseur tait dans la manire dont les
  utilisateurs spcifiaient les polices, l'ancien _N_e_w _F_o_n_t _S_e_l_e_c_t_i_o_n
  _S_c_h_e_m_e (nouveau schma de slection des polices). Cela est abord dans
  les sections ``Symboles et styles typographiques'', ``Commandes TeX
  pour les polices'', et ``Utilisation de polices Postscript''.

  teTeX est distribu avec une douzaine de polices standard
  pr-charges, ce qui est suffisant pour dmarrer. Les descriptions des
  mtriques des polices sont galement fournies dans les fichiers .tfm
  (_T_e_X _f_o_n_t _m_e_t_r_i_c). Pour gnrer les autres polices dont vous avez
  besoin, il suffit simplement d'installer les sources pour metafont.
  Les utilitaires pour .dvi de teTeX invoqueront metafont
  automatiquement et gnreront les polices Computer Modern ncessaires.


  22..  UUttiilliissaattiioonn ddee tteeTTeeXX

  En thorie tout du moins, tout est install correctement et prt 
  fonctionner. teTeX est un paquetage logiciel trs vaste. Comme pour
  tout paquetage complexe, vous voudrez commencer par apprendre teTeX en
  douceur, au lieu d'tre submerg par sa complexit.

  Dans le mme temps, nous voulons que le logiciel fasse quelque chose
  d'utile. Donc, au lieu de regarder TeX composer

  ``Hello, World !''


  comme le suggre le professeur Knuth, nous allons produire quelques
  unes des documentations de teTeX pour le mettre  l'preuve.
  22..11..  IImmpprriimmeerr llaa ddooccuummeennttaattiioonn

  Vous devriez tre connect en tant que root les premires fois que
  vous utilisez teTeX. Si vous ne l'tes pas, Metafont peut tre dans
  l'incapacit de crer les rpertoires indispensables pour ses polices.
  Le programme texconfig inclut une option pour rendre les rpertoires
  de polices accessibles en criture  tout un chacun, mais si vous
  travaillez sur un systme multi-utilisateurs, des considrations de
  scurit peuvent rendre cette option inapplicable ou indsirable.

  Dans chacun de ces cas, si vous ne disposez pas des droits appropris
  pour crer ou crire dans les rpertoires o sont logs les polices,
  Metafont se plaindra bruyamment parce qu'il ne peut crer les
  rpertoires. Vous ne verrez aucune sortie parce que vous aurez un tas
  de symboles de polices de longueur nulle. Cela n'est pas un problme.
  Dconnectez-vous simplement, reconnectez-vous sous root, et rptez
  l'opration qui a  chou.

  Le ct agrable de teTeX, c'est que si vous vous plantez, il n'y a
  pas vraiment de dgts. Ce n'est pas comme un compilateur, o, par
  exemple, vous bousillerez la partition racine si un pointeur se met 
  dlirer. Comment, vous n'avez pas encore lu le manuel de teTeX ? Bien
  sr que non. Il est encore dans la distribution sous forme de code
  source, prt  tre sorti.

  Donc, sans plus attendre, il vous plairait de lire le manuel teTeX. Il
  se trouve dans le rpertoire

  /usr/lib/teTeX/texmf/doc/tetex.



  Le source LaTeX pour le manuel s'appelle TETEXDOC.tex. (L'extension
  .tex est utilise aussi bien pour les fichiers TeX que LaTeX. Certains
  diteurs, comme Emacs, ne savent pas faire la diffrence.) Un fichier
  TETEXDOC.dvi est galement inclus dans la distribution, fichier que
  vous voudrez garder en lieu sr -- disons, dans un autre rpertoire --
  au cas o vous voudriez tester vos pilotes .dvi plus tard. Un fois
  cela rgl, tapez

  latex TETEXDOC.tex


  LaTeX affichera plusieurs avertissements. Le premier,

  LaTeX Warning: Label(s) may have changed. Rerun to get the
  cross-references right.


  est standard. Il est courant de construire la table des matires d'un
  document en  LaTeXant  le document deux fois. Donc, refaites la com
  mande. Les autres avertissements peuvent tre ignors sans danger. Il
  vous informent seulement que certains des chemins FTP mentionns dans
  la documentation sont trop longs pour l'espace qui leur est allou.
  Les sections ``Styles et dimensions des paragraphes'' et
  ``Tolrances'' dcrivent l'espacement horizontal en plus dtaill.

  teTeX aura gnr plusieurs fichiers  partir de TETEXDOC.tex. Celui
  qui nous intresse est TETEXDOC.dvi. C'est le fichier de sortie
  indpendant de tout priphrique que vous pouvez envoyer aussi bien
  sur l'cran que sur l'imprimante. Si vous faites marcher teTeX sous le
  systme X Window, vous pouvez prvisualiser le document avec xdvi.

  Pour le moment, supposons que vous ayez une HP LaserJet II. Vous
  lanceriez la commande

  dvilj2 TETEXDOC.dvi


  qui crit un fichier de sortie PCL  partir de TETEXDOC.dvi, incluant
  les polices logicielles qui seront dcharges sur la LaserJet. Cela
  n'est _p_a_s une fonctionnalit de TeX ou LaTeX, mais une fonctionnalit
  offerte par dvilj2. D'autres pilotes .dvi offrent des fonctionnalits
  relatives aux priphriques qu'ils grent. dvilj2 essaie de rpondre
  aux requtes de polices faites dans le document LaTeX d'origine, avec
  leurs quivalents les plus proches prsents sur le systme. Dans le
  cas d'un document purement textuel comme TETEXDOC.tex, la difficult
  n'est pas bien grande. Toutes les polices demandes par TETEXDOC.tex
  seront gnres par metafont, qui est invoqu automatiquement par
  dvilj2, si les polices ne sont pas dj prsentes. (Si c'est la
  premire fois que vous lancez dvilj2, il se peut que le programme
  doive gnrer toutes les polices.) Il existe plusieurs options pour
  contrler la manire dont les polices sont gnres par dvilj2. Elles
  sont exposes dans la page du manuel.  ce stade, vous ne devriez pas
  avoir  manipuler metafont directement. Dans le cas contraire, quelque
  chose de pas net s'est produit dans votre installation. Tous les
  pilotes .dvi invoqueront directement metafont au travers de la bib
  liothque de recherche de chemins kpathsea -- dont la discussion
  dpasse le cadre de ce document -- et, pour l'instant vous n'avez pas
   travailler davantage avec metafont -- tous les sources metafont pour
  la bibliothque de polices Computer Modern sont fournis.

  Vous pouvez imprimer TETEXDOC.lj avec la commande

  lpr TETEXDOC.lj


  Il se peut que vous ayez  installer un filtre d'impression comprenant
  le PCL.

  Le _t_e_T_e_X _G_u_i_d_e de neuf pages fournit de l'information utile pour
  configurer votre systme plus finement ; j'en ai mentionn quelques
  extraits, la majeure partie n'est pas couverte par ce document.

  Je n'ai pas pu tester certaines informations de la section suivante
  car je dispose d'une imprimante couleurs  jet d'encre HP DeskJet 400
  non Postscript connecte au port parallle de l'ordinateur. Nanmoins,
  ne pas possder d'imprimante Postscript ne constitue pas une barrire
   l'impression de textes et de graphiques  partir de vos documents
  textuels. Ghostscript est disponible dans la plupart des distributions
  Linux, et peut mme tre dj install sur votre systme.


  33..  CCoommmmaannddeess TTeeXX

  Prparer des documents pour que TeX en fasse la composition, c'est
  facile. Assurez-vous qu'une ligne blanche se trouve entre les
  paragraphes d'un fichier purement textuel, et faites passer le fichier
  au travers de la moulinette TeX avec la commande

  tex votre_fichier_texte


  Le rsultat sera un fichier dont le nom possde la mme racine, mais
  portant l'extension .dvi. TeX formate le texte en mode 10 points, Com
  puter Modern Roman, avec un interligne simple et justifi aussi bien 
  gauche qu' droite. Si vous obtenez des messages d'erreur au sujet de
  symboles spciaux, comme le dollar, enlevez-leur leur caractre parti
  culier en les faisant prcder par la barre de fraction inverse
  (_b_a_c_k_s_l_a_s_h), \, et lancez TeX une deuxime fois sur votre fichier.
  Vous devez pouvoir traiter le fichier rsultat avec le traducteur de
  .dvi de votre choix (cf. ci-dessus) pour obtenir une sortie imprime.
  Une particularit des entres pour TeX est que vous devez utiliser des
  guillemets ouvrants et fermants, qui figurent dans le fichier d'entre
  sous forme d'accents graves et d'apostrophes. Le mode TeX d'Emacs le
  fera pour vous automatiquement (-- NdT. : en franais, les guillemets
  s'crivent  et . Si votre clavier en dispose vous pouvez les saisir
  tels quels, sinon, ils peuvent tre composs en doublant les symboles
  < et >.--) .

  "Voici des guillemets de type ASCII"
  ``Voici des guillemets ` la TeX'.''




  33..11..  SSuurrvvooll ddeess ccoommmmaannddeess

  En TeX, les commandes commencent par une barre de fraction inverse
  ( \ ). Par exemple, la commande pour changer l'interligne est

  \baselineskip=24pt



  La ligne de base est la limite infrieure des symboles sur une ligne,
  sans compter les jambages infrieurs. La distance entre les lignes de
  base de deux lignes conscutives est le \baselineskip, auquel est
  affect une valeur de 24 points.

  En TeX, les mesures ou les dimensions sont souvent donnes dans les
  units suivantes :

  pt                % Point :      1/72 in.
  pc                % Pica :       12 pt.
  in                % Pouce :      72.27 pt.
  cm                % Centimetre : 2.54 cm = 1 in.
  mm                % Millimetre : 10 mm = 1 cm.



  Quelques unes des commandes ne prennent pas d'affectation. Par
  exemple :

  \smallskip        % Environ 3 pt.
  \medskip          % Deux \smallskips.
  \bigskip         % Deux \medskips.



  Un \smallskip insre dans le document un espacement vertical de 3 pt.
  Les mesures sont approximatives car TeX a besoin d'ajuster les
  dimensions pour les sauts de page, les en-ttes et d'autres lments
  d'espacement vertical. Cela vaut galement pour l'espacement
  horizontal.

  \hsize=6.5in


  Cette commande positionne la largeur de la ligne  6,5 pouces. TeX
  essaie de remplir la ligne en ajustant l'espacement entre les mots, et
  certains caractres. Si TeX est incapable de remplir une ligne en
  respectant ses tolrances, il produit un message d'avertissement, et
  ajuste l'espacement horizontal au sein de la ligne du mieux qu'il
  peut. Les tolrances de formatage sont exposes dans la section
  ``Tolrances''.  /export/home/mh/Docs/HOWTOS/TeTeX-HOWTO/ Il existe
  beaucoup d'autres commandes qui spcifient les dimensions et les
  tolrances horizontales et verticales, et les plus rpandues sont
  dcrites plus loin.


  33..22..  CCoommmmaannddeess ddee ppoolliicceess

  En TeX, la police par dfaut est la Computer Modern Roman en 10 pt.
  Pour prciser un style typographique, comme l'italique, le gras, ou
  l'espacement fixe, utilisez les commandes suivantes :

  \rm          % Roman (par defaut).
  \it          % Italiques.
  \bf         % Gras.
  \tt         % Espacement fixe (machine a ecrire).
  \sl          % Oblique (slanted : incline).


  Ces commandes modifient le style typographique  l'endroit o elles
  apparaissent dans le texte, comme dans cet exemple.

  Ce texte est en Roman, \it et ce texte est en italiques. \bf Ce texte
  est en gras et \rm ce texte est a nouveau en Roman.



  Pour spcifier une police pour votre document, utilisez la commande
  \font.

  \font\romantwelve=cmr12


  Cela cre la commande de police \romantwelve, qui, lorsqu'elle est
  utilise dans le texte, active la police Computer Modern Roman en
  12 points.

  \romantwelve
  Voici la police Computer Modern Roman en 12 points.


  Pour plus d'informations au sujet des polices de la distribution
  teTeX, consultez le fichier :

  /usr/lib/teTeX/texmf/doc/fonts/fontname/fontname.dvi



  Si vous voulez imprimer un chantillon d'une police, lancez TeX sur le
  fichier

  /usr/lib/teTeX/texmf/tex/plain/base/fontchart.tex


  et,  l'invite,  renseignez le nom de la police que vous voulez
  imprimer.

  Vous pouvez galement modifier la taille d'une police pour obtenir des
  effets varis. L'agrandissement des polices est exponentiel, et est
  dfini par la commande scaled \magstep, place aprs la spcification
  de la police.

  \font\sfmedium=cmss12 scaled \magstep 1


  Cette commande vous donnera une police sans srif d'une taille de
  120 pourcent celle de la police sans srif Computer Modern Roman de
  12 points. Les agrandissements de polices peuvent aller de 0  5.
  Chaque chelle donne un agrandissement de 120 pourcent.
  33..33..  SSttyylleess eett ddiimmeennssiioonnss ddeess ppaarraaggrraapphheess

  Comme mentionn ci-dessus, TeX compose le texte en Computer Modern
  roman 10 points par dfaut. La largeur d'une ligne est donne par
  \hsize, qui s'lve  6,5 in. par dfaut. Si vous voulez changer la
  valeur de \hsize en 5,5 in. par exemple, utilisez cette commande.

  \hsize=5.5in



  En TeX, une _d_i_m_e_n_s_i_o_n est une unit de longueur ajustable, soit
  horizontale, soit verticale. La quantit dont on peut augmenter ou
  diminuer une dimension peut tre spcifie dans sa dfinition. En
  relation troite avec une dimension, il existe un pas (_s_k_i_p), qui est
  une dimension place dans l'un des registres internes de TeX. Les pas
  sont dfinis avec la commande \newskip. La dimension \smallskip, telle
  que dfinie par TeX est :

  \newskip\smallskipamount \smallskipamount=3pt plus 1pt minus 1pt


  La commande \smallskip est un raccourci pour :

  \vskip\smallskipamount



  Il existe un certain nombre de dimensions qui contrlent la mise en
  page. Elles sont rsumes dans la section ``Mise en page''.

  TeX compose les paragraphes en les justifiant aussi bien  gauche qu'
  droite. Si vous souhaitez que le texte ne soit justifi qu' gauche,
  utilisez cette commande :

  \raggedright



  Pour composer une ligne qui doit tre justifie  droite, utilisez la
  commande \rightline :


  \rightline{Voici la ligne a composer.}



  La commande \line compose le texte de son argument pour qu'il
  remplisse l'intgralit de la ligne.

  \line{Ce texte sera espace pour remplir toute la ligne.}



  La commande \hfil ajoute de l'espace l o elle apparat pour remplir
  toute la ligne. Ainsi, par exemple, la commande \rightline est
  quivalente  :

  \line{\hfil Cette ligne sera justifiee a droite.}



  Pour composer une ligne centre, utilisez la commande \centerline.

  \centerline{Voici la ligne a centrer.}

  Pour modifier la marge gauche, positionnez la valeur de \hoffset,
  comme dans cet exemple :

  \hoffset=1.5in



  La commande \parindent spcifie la quantit dont la premire ligne de
  chaque paragraphe sera indente.

  \parindent=.5in



  Deux autres dimensions, \leftskip et \rightskip, indenteront
  respectivement les marges gauche et droite des paragraphes qui les
  suivent.

  \leftskip=.5in
  \rightskip=.5in


  La commande \narrower est l'quivalent de :

  \leftskip=\parindent
  \rightskip=\parindent


  En fait, \narrower rtrcit les marges des paragraphes avec la valeur
  de \parindent.

  Comme mentionn dans la section prcdente, \baselineskip spcifie la
  distance entre les lignes. Sa valeur par dfaut est de 12 pt. Pour
  obtenir une approximation d'un double interlignage, utilisez la
  commande suivante :

  \baselineskip=\baselineskip*1.6



  La commande \parskip spcifie une distance qui s'ajoute 
  \baselineskip entre deux paragraphes. Aucun espace supplmentaire
  n'est ajout par dfaut, mais la distance entre paragraphes peut
  s'tirer jusqu' 1 pt. pour remplir la page correctement. Pour insrer
  une ligne blanche entre les paragraphes, utilisez cette commande :

  \parskip=\baselineskip




  33..33..11..  cchhaaqquuee lliiggnnee ??))  TToollrraanncceess..  ((CC''eesstt qquuooii cceess rreeccttaanngglleess nnooiirrss
   llaa ffiinn ddee

  Normalement, TeX compose le texte dans le strict respect des
  tolrances. Si, pour une raison quelconque, le texte ne peut tre
  compos en respectant ces tolrances, TeX produit un message d'erreur
  et compose le texte du mieux qu'il peut. Si le texte doit tre trop
  tir pour s'adapter  la ligne, TeX vous avertit que la \hbox n'est
  pas assez remplie (_u_n_d_e_r_f_u_l_l). Tout texte qui doit tre comprim
  produit un avertissement de dbordement (_o_v_e_r_f_u_l_l \hbox).

  Pour chaque _o_v_e_r_f_u_l_l \hbox, TeX place un _s_l_u_g, un rectangle noir, en
  fin de ligne. Ce rectangle indique que la ligne n'a pu tre formate
  avec les contraintes imposes par le paramtre \hbadness.

  L'ajustement du texte  l'intrieur de ses dimensions imposes est
  mesur par sa  mauvaise qualit  (_b_a_d_n_e_s_s), qui est un nombre entre
  0 et 10000. Une _b_a_d_n_e_s_s de 0 correspond  un ajustement parfait, et
  une _b_a_d_n_e_s_s de 1000 indique que la ligne ne sera probablement jamais
  ajuste. La valeur par dfaut de \hbadness est 1000. Si vous mettez
  \hbadness  10000, TeX ne rclamera plus  propos des lignes pas assez
  remplies.

  TeX autorise quelquefois une ligne  dborder dans la marge droite. Il
  s'agit d'une dcision esthtique de la part de l'auteur de TeX. La
  quantit autorise pour ce dbordement est dtermine par le paramtre
  \hfuzz, dont la valeur par dfaut est de 0,1 pt. Si le texte ne peut
  s'adapter  la ligne, le paramtre de \tolerance dtermine la faon
  dont TeX va grer le dpassement. La valeur par dfaut de \tolerance
  est 200. Positionner \tolerance  1000 supprime les avertissements 
  propos des _o_v_e_r_f_u_l_l \hbox et l'affichage des rectangles noirs.


  33..44..  MMiissee eenn ppaaggee

  En plus des dimensions de marge gauche et de longueur de ligne
  dcrites dans la section prcdente, TeX vous permet de spcifier les
  marges suprieure et infrieure, ainsi que l'espacement vertical.

   l'instar des dimensions \hsize et \hoffset dcrites dans la section
  ci-dessus, TeX dispose des commandes \vsize et \voffset. Par dfaut,
  \vsize vaut 8,9 in. et \voffset vaut 0.

  En temps normal, teTeX place le dbut de la premire ligne de texte 
  1 in. sous le bord suprieur de la feuille et  1 in. du bord gauche.
  Il vous est possible de commencer le texte plus prs du haut de la
  page avec la commande :

  \voffset=-0.5in



  Si vous voulez ajouter de l'espacement vertical dans un document, les
  commandes \smallskip, \medskip et \bigskip ajouteront environ 3, 6 et
  12 points d'espace vide vertical. Ces mesures sont des
  approximations : TeX fera des ajustements pouvant aller jusqu' 1 pt.
  pour remplir correctement la page.

  La commande \vfill ajoute un espacement vertical ajustable entre
  paragraphes d'une mme page. Son tirement peut aller jusqu'
  l'infini, ainsi elle ajoutera de l'espacement vertical pour remplir au
  maximum le restant de la page. Si vous voulez spcifier une dimension,
  utilisez \vskip, comme dans :

  \vskip 10pt



  Les commandes \hss et \vss sont similaires  \hfill et \vfill, mais
  elles fournissent des dimensions pouvant tre rtrcies ou tires 
  l'infini.

  Les commandes \vskip et \vfill produisent des longueurs flexibles.
  Elles n'ajoutent pas d'espace l o il n'y a aucun texte ; par exemple
  en haut de la page. Utilisez \vglue si vous voulez ajouter un
  espacement absolu.

  TeX remplit la dimension \vsize avec le plus possible de texte avant
  de commencer une nouvelle page. Pour forcer un saut de page, utilisez
  la squence \vfill \eject. Si \vfill n'est pas utilis, le texte avant
  le \break sera dispos de faon  remplir la page.
  Si vous voulez que TeX soit plus flexible pour ce qui est des
  espacements verticaux sur la page, placez la commande \raggedbottom
  dans votre document. TeX ajustera alors lgrement la marge infrieure
  de chaque page pour rendre l'espacement vertical plus cohrent.


  33..55..  NNuummrrooss ddee ppaaggee,, eenn--tttteess eett ppiieeddss ddee ppaaggee


  Par dfaut, TeX place le numro de page au centre du pied de page. Si
  vous souhaitez changer l'emplacement et le style du numro de page, il
  vous est possible de spcifier d'autres en-ttes et pieds de page en
  changeant les dfinitions de \headline et \footline. La valeur par
  dfaut pour \footline contient la commande \folio, qui imprime le
  numro de page. La valeur par dfaut pour \headline est \hfill ; ce
  qui imprime donc une ligne blanche.

  La commande \pageno est un synonyme du compteur de pages interne de
  TeX. Vous pouvez changer le numro de page en changeant la valeur de
  \pageno. Si \pageno est ngatif, les nombres sont imprims en chiffres
  romains.

  \pageno=10
  \pageno=-1



  La commande \nopagenumbers est un raccourci pour :

  \headline={\hfil}
  \footline={\hfil}



  La ligne de pied de page par dfaut contient galement la commande
  pour police \tenrm, qui spcifie une police Roman 10 points pour le
  numro de page. Si vous dsirez imprimer le numro de page en Roman
  12 points par exemple, vous devez d'abord dfinir une commande pour
  positionner la police en Roman 12 points, et utiliser celle-ci dans la
  dfinition de \footline. Les commandes pour les polices sont abordes
  dans la section ``Commandes pour les polices''.

  \font\twelvrm=cmr12
  \footline={\hss\twelvrm\folio\hss}



  Vous pouvez insrer une ligne horizontale ou _r_u_l_e, en haut de chaque
  page en redfinissant  \headline comme suit :

  \headline={\hrulefill}



  Pour spcifier des en-ttes diffrents pour les pages paires et
  impaires, utilisez la commande \ifodd, qui a la forme :

  \ifodd[condition][action-si-vrai]\else[action-si-faux]


  Un exemple de \headline utilisant des en-ttes diffrents pour les
  pages paires et impaires est :

  \headline={\ifodd\pageno en-tete-page-impaire \else en-tete-page-paire}


  L'expression \ifodd utilise le premier argument si le numro de page
  est impair, et le deuxime argument sinon.


  33..66..  TTiittrreess eett mmaaccrrooss

  TeX ne fournit que la macro \beginsection pour les en-ttes de
  section. Elle laisse un espace au-dessus de son argument, imprime le
  texte de l'en-tte en gras, ajoute un \smallskip aprs le texte de
  l'en-tte, et commence le paragraphe suivant sans indentation.

  Les commandes de chapitre et de section dcrites plus loin ajoutent la
  numrotation des sections, impriment les titres et les numros des
  sections dans les en-ttes de pages et ajoutent automatiquement les
  sections  la table de matires.

  En TeX pur, c'est  vous d'crire ces commandes. La commande \def vous
  permet de dfinir de nouvelles commandes. Supposons que vous
  souhaitiez imprimer le titre d'un chapitre. En premier, vous
  dfinissez la police que vous voulez utiliser. Une police de grande
  taille et sans srif pour les titres de chapitres peut tre dfinie
  ainsi :

  \font\chapterfontsans=cmss12 scaled \magstep 4


  Vous pouvez utiliser la commande \chapterfontsans  n'importe quel
  endroit o vous voulez adopter cette police, dont la hauteur approxi
  mative est de 24 points. Toutefois, dans cet exemple, son utilisation
  principale sera dans la commande \chaptertitlesans. Voici sa
  dfinition :

  \def\chaptertitlesans#1{\hbox{}\bigskip\bigskip
    \noindent{\leftline{\chapterfontsans#1}}
    \par\bigskip\bigskip\noindent}


  La premire ligne, \hbox{}\bigskip, fixe un espacement de 12 points en
  haut de la page en y plaant une \hbox{} vide. La ligne comportant le
  titre du chapitre n'est pas indente, comme le paragraphe qui le suit
  immdiatement. Si vous placez une ligne vide entre la macro \chapter
  titlesans et le paragraphe suivant, le \noindent final s'appliquera 
  la ligne vide, et non pas au texte du paragraphe qui suit. Pour un
  formatage correct, utilisez \chaptertitlesans, comme dans cet
  exemple :

  L'expression #1 dans la dfinition est remplace par le premier
  argument de \chaptertitlesans qui sera en fait le titre du chapitre.
  Dans les dfinitions en TeX, les paramtres sont dclars par #1, #2,
  #3 et ainsi de suite. Un exemple d'utilisation de \chaptertitlesans
  serait :

  \chaptertitlesans{Chapitre 1}
  Cela est le texte commenant le premier paragraphe du chapitre.
  Le paragraphe ne sera pas indente. Le titre du chapitre est
  "Chapitre 1."




  44..  CCoommmmaannddeess LLaaTTeeXX





  44..11..  SSttrruuccttuurree ddeess ddooccuummeennttss

  Les documents composs pour LaTeX doivent obir  quelques rgles
  supplmentaires, mais pour des documents complexes, LaTeX peut
  grandement simplifier le processus de mise en forme.

  LaTeX est  la base un langage de balisage de document essayant de
  sparer le style produit en sortie du contenu logique du document. Par
  exemple, la composition d'un titre de section avec TeX ncessiterait
  de spcifier un espace de 36 points au dessus du titre, ensuite, le
  titre lui-mme en gras et en 24 points, puis la copie du texte et du
  numro de page dans la table des matires, et enfin de laisser un
  espace de 24 points aprs le titre. Par contraste, LaTeX dispose de la
  commande \section{}, qui fait tout le travail pour vous. Si vous devez
  changer le format des titres de section pour tout le document, vous
  pouvez changer la dfinition de \section{} au lieu du texte lui-mme
  dans le document. Vous pouvez calculer par vous-mme les heures de
  remise en forme gagnes pour des documents comportant plus d'une
  douzaine de pages.

  Tous les documents LaTeX comportent trois sections : un _p_r__a_m_b_u_l_e, le
  _c_o_r_p_s du texte et un _p_o_s_t_a_m_b_u_l_e. Ces termes font partie du jargon
  standard et sont largement utiliss par les TeXperts.

  Le prambule, dans sa forme minimale, spcifie le type du document 
  produire -- la _c_l_a_s_s_e _d_u _d_o_c_u_m_e_n_t -- et une directive signalant le
  dbut du corps du texte du document. Par exemple :

  \documentclass{article}
  \begin{document}


  Le postambule du document est habituellement trs simple. Sauf cas
  exceptionnels, il ne contient que la directive :

  \end{document}


  Notez comment \begin{document} et \end{document} vont de pair. En
  LaTeX, on appelle cela un _e_n_v_i_r_o_n_n_e_m_e_n_t. Tout texte doit apparatre
  dans un environnement, et de nombreuses commandes ne s'appliquent qu'
  l'intrieur des environnements o elles sont appeles. Cependant,
  l'environnement document est le seul cas o LaTeX impose cette conven
  tion. En effet, c'est le seul environnement obligatoire dans un docu
  ment. (La classe lettre, letter pour LaTeX, constitue un exception,
  dans la mesure o elle vous impose de dclarer \begin{letter} et
  \end{letter}. Reportez-vous  la section ``Lettres''.) Quoi qu'il en
  soit, de nombreuses fonctions de formatage sont spcifies au travers
  d'environnements. Elles sont dcrites dans les sections suivantes.

  Les classes de documents peuvent tre appeles avec des arguments. Par
  exemple, au lieu de la taille de base de 10 points adopte par dfaut,
  comme dans l'exemple prcdent, nous aurions pu spcifier :

  \documentclass[12pt]{article}

  pour produire un document bas sur une police de 12 points. La classe
  de documents _a_r_t_i_c_l_e_, opre les ajustements ncessaires.

  Il existe quelques classes de documents utilises de faon courante.
  Elles sont dcrites plus loin. La classe _r_a_p_p_o_r_t (report) est
  similaire  la classe _a_r_t_i_c_l_e mais produit une page de titre et
  commence chaque section sur une nouvelle page. La classe _l_e_t_t_r_e
  (letter) comprend des dfinitions spciales pour les adresses, les
  salutations et les formules de politesse, dont quelques-unes sont
  dcrites plus loin.
  Vous pouvez inclure du code LaTeX premball, connu sous le nom
  _d_'_e_x_t_e_n_s_i_o_n (package),  l'aide de la commande \usepackage{}.

  \usepackage{fancyhdr}


  La commande ci-dessus provoque l'inclusion du fichier de style LaTeX
  fancyhdr.sty se trouvant dans l'un des rpertoires dfinis par TEXIN
  PUTS, que vous-mme et teTeX avez spcifi lors de la phase d'instal
  lation et de configuration.


  \documentclass{article}
  \usepackage{fancyhdr}
  \begin{document}



  Remarquez que les dclarations \usepackage{} sont donnes avant la
  directive \begin{document} ; et donc, dans le prambule du document.

  fancyhdr.sty tend la commande \pagestyle{} pour vous permettre de
  crer des en-ttes et des pieds de page personnaliss. La plupart des
  classes de documents LaTeX fournissent des en-ttes et des pieds de
  page pour les styles de page standardiss suivants :

  \pagestyle{plain}       % style de page par defaut -- numero de page centre
                          % dans le pied de page.
  \pagestyle{empty}       % pas d'en-tetes ni de pied de page.
  \pagestyle{headings}    % imprime le numero de section et le numero de
                          % page dans l'en-tete.
  \pagestyle{myheadings}  % imprime de l'information personnalisee dans
                          % l'en-tete.


  Tout ce qui se trouve  droite du symbole pourcent sur une ligne est
  un commentaire.

  La commande \pagestyle{} ne prend effet qu' la page suivante. Pour
  modifier les en-ttes et pieds de page de la page courante, utilisez
  la commande :

  \thispagestyle{style_de_page}



  44..22..  CCaarraaccttrreess eett ssttyylleess ttyyppooggrraapphhiiqquueess

  Le style des caractres dpend en partie des polices spcifies dans
  le document. Toutefois, la mise en vidence de texte par les
  caractres gras ou italiques devrait tre disponible pour toutes les
  polices. Le soulign peut galement tre utilis, bien que son
  formatage prsente des problmes particuliers. Consultez la section
  ``Extensions pour LaTeX et autres ressources'', plus loin.

  Vous pouvez faire ressortir du texte de plusieurs manires. La plus
  portable repose sur la commande \em. Tout le texte dans sa porte sera
  mis en italiques par dfaut. Par exemple :

  Ce mot sera {\em mis en evidence.}


  S'il y a du texte en italiques suivi de texte qui ne l'est pas, vous
  pouvez spcifier qu'un facteur de correction des italiques doit tre
  utilis. Pour cela, la commande est \/; ce qui correspond  une barre
  de fraction inverse puis une barre de fraction normale.
  Cet exemple {\em sera\/} correctement imprime.

  Cet exemple ne sera {\em pas} imprime correctement.


  Lgrement moins portables, mais encore acceptables dans les situa
  tions o elles sont employes de manire isole, il y a les commandes
  \it, \bf, et \tt, qui spcifient que les caractres dans leurs portes
  doivent tre imprims respectivement en italiques, en gras et en
  espacement fixe (teletype).

  {\tt Ce texte sera imprime avec un espacement fixe,}
  {\it ce texte sera en italiques,} et
  {\bf ce texte sera en gras\dots} le tout dans un meme paragraphe.


  La commande \dots imprime une suite de trois points correspondant aux
  points de suspension, qui ne seront pas coups par un saut de ligne.

  La version la plus rcente de LaTeX, qui est celle dont vous disposez,
  comprend des commandes tenant compte des occurrences o une manire de
  mettre du texte en vidence prendrait le pas sur une autre.

  Cela n'est {\it pas {\bf en gras et en italiques !}}


  Ce qui se passe, c'est que teTeX compose le texte en italiques jusqu'
  ce qu'il rencontre la commande \bf, endroit  partir duquel il adopte
  les caractres gras.

  Pour viter cela, NFSS, la mthode de slection pour la forme des
  polices, ncessite trois paramtres pour chaque jeu de caractres : la
  forme, la _s__r_i_e et la famille. Tous les jeux de polices n'incluent pas
  l'ensemble de ces styles. LaTeX affichera cependant un avertissement
  s'il doit substituer une police  une autre.

  Les formes suivantes peuvent tre spcifies :

  \textup{texte}         % caracteres "droits" (par defaut) -- upright shape
  \textit{texte}         % italiques
  \textsl{texte}         % obliques
  \textsc{texte}         % petites capitales


  Voici les deux sries dont disposent la majorit des polices :

  \textmd{text}          % serie moyenne (par defaut) -- medium
  \textbf{text}          % caracteres gras


  Trois familles de caractres sont gnralement disponibles :

  \textrm{text}          % Roman (par defaut)
  \textsf{text}          % sans serif
  \texttt{text}          % espacement fixe (de type Courier) ou teletype


  Spcifier des styles de polices  l'aide de ces paramtres peut se
  faire en combinant les effets.

  \texttt{\textit{Cet exemple produira vraisemblablement une substitution
  de police, car peu de polices comportent un style italique en
  espacement fixe.}}



  La famille de polices par dfaut est la Computer Modern, qui est une
  police matricielle. D'autres familles de polices sont gnralement au
  format Postscript Type 1. Consultez la section ``Utilisation des
  polices Postscript'' pour les dtails concernant leur utilisation.

  De nombreuses formes d'accents ou de caractres spciaux sont
  galement disponibles pour la composition. En voici quelques uns.
  (Essayez de les composer sur votre propre imprimante.)

  \'{o}  \`{e}  \^{o}  \"{u}        \={o}  \c{c}  `? `!
  \copyright     \pounds                \dag


  Enfin, certains caractres sont utiliss comme des mta-caractres ou
  des caractres d'chappement en TeX et LaTeX. L'un d'eux, le symbole
  du dollar est mentionn plus haut. L'ensemble des mta-caractres
  qu'il faut faire prcder d'une barre de fraction inverse pour leur
  faire perdre leur signification particulire est :

  # $ % & _ { }



  De nombreux alphabets, comme l'alphabet grec ou cyrillique,  sont
  galement disponibles. LaTeX fournit une aide prcieuse pour la
  composition de textes en diffrentes langues, que l'on peut trouver
  dans quelques-unes des rfrences mentionnes ici.


  44..33..  MMaarrggeess eett iinntteerrlliiggnneess

  Changer les marges dans un document TeX ou LaTeX n'est pas une tche
  vidente. Beaucoup de choses dpendent de l'indentation relative du
  texte dont vous essayez d'ajuster la marge. L'endroit o est place la
  commande de modification des marges est galement significatif.

  Pour des changements portant sur tout le document LaTeX, il existe les
  commandes \evensidemargin et \oddsidemargin. Elles influent sur les
  marges de gauche respectivement des pages paires et des pages
  impaires. Par exemple,

  \evensidemargin=1in
  \oddsidemargin=1in


  ajoutent un pouce  la marge de gauche des pages paires et impaires _e_n
  _s_u_p_p_l__m_e_n_t de la marge gauche standard d'un pouce. Ces commandes ont
  un effet sur l'intgralit du document, et dcaleront l'ensemble du
  corps du texte vers la droite et vers la gauche  travers la page,
  quelle que soit l'indentation locale ; leur utilisation est donc sans
  danger avec des environnements tels que verse et list.

  Ci-dessous figure un ensemble de macros de mon cru pour les
  changements de marges. Leur effet est diffrent des commandes
  mentionnes ci-dessus. Comme elles utilisent des commandes en TeX pur,
  il se peut qu'elles ne respectent pas les marges des environnements
  LaTeX qui peuvent tre actifs, mais vous pouvez les placer n'importe
  o dans le document pour changer les marges  partir de ce point.








  %%  margins.sty -- v. 0.1   by Robert Kiesling
  %%  Des copies strictement conformes de ce code peuvent etre librement
  %%  distribuees.
  %%
  %%  Quelques commandes elementaires de changement de marges en TeX
  %%  pur. Les mesures sont en pouces :
  %%  \leftmargin{1}   %% fixe la marge gauche du document a 1 pouce.
  %%  \leftindent{1}   %% fixe l'indentation des paragraphes suivants a
  %%                   %% 1 pouce.
  %%  \rightindent{1}  %% fixe la marge de droite des paragraphes suivants
  %%                   %% a 1 pouce.
  %%  \llength{3}      %% fixe la longueur des lignes suivantes a 3 pouces.
  %%
  \message{Macros pour les marges...}
  \def\lmargin#1{\hoffset = #1 in}
  \def\lindent#1{\leftskip = #1 in}
  \def\rindent#1{\rightskip = #1 in}
  \def\llength#1{\hsize = #1 in}
  %%
  %% (Fin des macros pour les marges.}


  Mettez ce code dans un fichier nomm margins.sty dans le rpertoire
  local figurant dans votre $TEXINPUTS. L'explication des commandes se
  trouve dans la section commente du fichier. Pour les inclure dans un
  document, utilisez la commande

  \usepackage{margins}


  dans le prambule du document.

  Pendant que nous y sommes, si ne voulez pas que le texte soit justifi
   droite, vous pouvez dire  LaTeX de laisser les marges de droite en
  dents de scie grce  la commande :

  \raggedright




  Le positionnement de l'interligne comporte galement quelques
  complications.

  La mesure _b_a_s_e_l_i_n_e_s_k_i_p est la distance entre les lignes de texte. Il
  s'agit d'une mesure absolue, par exemple,

  \baselineskip=24pt


  ou encore mieux :

  \setlength{\baselineskip}{24pt}


  La diffrence entre les deux formes est que _s_e_t_l_e_n_g_t_h respectera
  toutes les rgles de porte qui sont actives au moment o vous
  utilisez la commande.

  Le problme avec l'utilisation de _b_a_s_e_l_i_n_e_s_k_i_p est qu'il joue
  galement un rle dans la distance entre les titres de sections, les
  notes de bas de page et consorts. C'est  vous de veiller  ce que
  _b_a_s_e_l_i_n_e_s_k_i_p soit correct pour l'lment que vous tes en train de
  composer, quel qu'il soit. Toutefois, il existe des extensions
  composes de macros LaTeX comme setspace.sty, qui vous viendront en
  aide dans ces circonstances. Reportez-vous  la section ``Extensions
  pour LaTeX et autres ressources''.


  44..44..  CCllaasssseess ddee ddooccuummeennttss

  LaTeX fournit des classes de documents qui dcrivent des formats
  standardiss pour ces documents. Elles donnent accs  des
  environnements de composition de listes, de citations, de notes de bas
  de page et autres lments textuels. Les classes de documents d'usage
  courant sont abordes dans les sections qui suivent.


  44..44..11..  AArrttiicclleess eett rraappppoorrttss

  Comme mentionn ci-dessus, les classes article et report (utilise
  pour les rapports) sont similaires. Les principales diffrences sont
  que la classe report cre par dfaut une page de titre et fait dbuter
  chaque section sur une nouvelle page. Dans la plupart des cas, ces
  deux classes de documents sont toutefois similaires.

  Pour crer des titres, des rsums et autres dans ces classes de
  documents, vous pouvez entrer, par exemple :

  \title{La reproduction des cactacees}
  \author{John Q. Public}
  \abstract{Description de la maniere dont la cactacee commune du desert
  recherche des points d'eau appopries pour pratiquer ses rituels de
  reproduction.}


  dans le prambule du document. Puis, la commande

  \maketitle


  plac en dbut de texte, gnrera soit une page de titre dans la
  classe report, soit le titre et le rsum en haut de la premire page,
  dans la classe article.

  La dfinition des sections peut se faire avec des commandes de la
  liste suivante :

  \section
  \subsection
  \subsubsection


  Ces commandes produiront des sections numrotes standardises
  utilises dans des documents techniques. Pour obtenir des sections
  non-numrotes, utilisez :

  \section*
  \subsection*
  \subsubsection*


  et ainsi de suite.

  LaTeX fournit de multiples environnements pour composer le texte 
  imprimer. Les citations peuvent tre incluses avec l'environnement
  quotation.





  \begin{quotation}
  Dbut du paragraphe de la citation...

  ... fin du paragraphe.
  \end{quotation}


  Pour des citations plus courtes, vous pouvez utiliser l'environnement
  quote.

  Pour composer des vers, utilisez l'environnement verse.

  \begin{verse}
  Ne pouvant m'arreter pour la mort\\
  Elle eut l'obligeance de s'arreter pour moi
  \end{verse}


  Remarquez que vous devez utiliser deux barres de fraction inverses
  pour couper les lignes  la bonne place. Sinon, LaTeX remplit les
  lignes dans un environnement verse, comme dans tout autre environ
  nement.

  Les listes peuvent adopter plusieurs formats. Pour composer une liste
  avec des tirets, c'est l'environnement list qui est utilis :

  \begin{list}
  \item
  Ceci est le premier element de la liste.
  \item
  Ceci est le deuxieme element de la liste...
  \item
  ... et ainsi de suite.
  \end{list}



  Une liste numrote utilise l'environnement enumerate :

  \begin{enumerate}
  \item
  Element No. 1.
  \item
  Element No. 2.
  \item
  \dots
  \end{enumerate}



  Une liste descriptive utilise l'environnement description :

  \begin{description}
  \item{Four} Sale, a besoin d'un nouveau bruleur.
  \item{Refrigerateur}  Sale.  Desole.
  \item{Evier et egouttoir}  Robinet d'eau froide tache et qui goutte.
  \end{description}




  44..44..22..  LLeettttrreess..

  La classe letter utilise des dfinitions spcifiques pour la
  composition du courrier d'entreprise.

  L'environnement letter prend un argument, l'adresse du destinataire de
  la lettre. La commande address, qui doit figurer dans le prambule du
  document dfinit l'adresse de retour. La commande signature dfinit le
  nom de l'expditeur tel qu'il figurera aprs les salutations.

  Le source LaTeX d'un courrier d'entreprise lmentaire pourrait
  ressembler  ceci :

  \documentclass[12pt]{letter}
  \signature{John Q. Public}
  \address{123 Main St.\\Los Angeles, CA.  96005\\Tel : 123/456-7890}
  \begin{document}
  \begin{letter}{ACME Brick Co.\\100 Ash St.\\San Diego, CA 96403}
  \opening{Cher(e)  Monsieur/Madame,}

  Concernant l'une de vos briques que j'ai retrouvee sur le tapis de mon
  salon entouree des debris de verre de la fenetre de ma facade...

  (Suite du corps de la lettre.)

  \closing{Sincerement votre,}

  \end{letter}
  \end{document}


  Notez que l'adresse inclut deux barres de fraction inverses, qui
  indiquent o doivent se produire les sauts de ligne.


  55..  EExxtteennssiioonnss ppoouurr LLaaTTeeXX eett aauuttrreess rreessssoouurrcceess

  Plus haut, nous avons mentionn que le soulign utilis comme moyen de
  mettre du texte en vidence prsente des problmes particuliers. En
  fait, TeX n'a aucun problme pour souligner du texte, puisqu'il s'agit
  d'une convention pour la composition en mathmatiques. En LaTeX, vous
  pouvez souligner des mots avec la commande :

  \underline{texte a souligner}


  Le problme est que le soulign ne suivra pas les sauts de ligne, et
  qu'il peut se rvler irrgulier dans certaines circonstances. Toute
  fois, il existe une extension de macros LaTeX, prtes  l'emploi, qui
  font du soulign la mthode de mise en vidence par dfaut. Elle
  s'appelle ulem.sty, et c'est l'une des nombreuses contributions 
  LaTeX qui sont disponibles gratuitement sur l'Internet.

  Pour utiliser ulem.sty, incluez la commande :

  \usepackage{ulem}


  dans le prambule du document.

  Parmi les extensions disponibles pour LaTeX, il y a :

     iifftthheenn
        Permet d'inclure des expressions conditionnelles dans vos
        documents.

     iinniittiiaallss
        Dfinit une police pour les lettrines.

     ssaannsskkrriitt
        Police et prprocesseur pour la production de documents en
        sanscrit.

     rreecciippee
        Une classe LaTeX2e pour composer des recettes.

     rreeffmmaann
        Variante des styles rapport et article.

  Pour obtenir l'URL pleinement qualifi  partir d'un chemin donn dans
  le catalogue, concatnez le chemin  l'URL donnant le nom de la
  machine et la racine de l'arborescence du site CTAN que vous dsirez
  contacter. Par exemple, la racine de l'arborescence CTAN du site
  ftp.tex.ac.uk est ctan/tex-archive. L'URL complet du rpertoire rreeffmmaann
  sera :

  ftp://ftp.tex.ac.uk/ctan/tex-archive/   +
  macros/latex/contrib/supported/refman   =

  ftp://ftp.tex.ac.uk/ctan/tex-archive/macros/latex/contrib/supported/refman/


  Certaines extensions comportent plusieurs fichiers ; seul le chemin
  vers le rpertoire contenant l'extension est alors donn.

  Avec l'URL sous la main, vous pouvez tlcharger l'extension  partir
  de l'un des sites d'archives CTAN recenss dans l'annexe ``Annexe A''.
  Vous avez la possibilit de dcharger la liste complte du contenu de
  l'archive qui se trouve dans le fichier FILES.byname, dans le
  rpertoire racine de l'archive. Vous pouvez galement faire une
  recherche par mot-cl en ligne  l'aide de la commande ftp

  quote site index <mot-cle>




  66..  ddvviippss CCoommbbiinneerr tteexxtteess eett llmmeennttss ggrraapphhiiqquueess aavveecc


  De manire gnrale, cette section s'applique  tout document TeX ou
  LaTeX qui combine du texte et des graphiques. teTeX, comme la plupart
  des autres distributions TeX, est configur pour utiliser par dfaut
  les polices Computer Modern. Lors de l'impression de documents
  contenant des polices vectorielles Type 1 ou des lments graphiques,
  le rendu du texte et des graphiques est du ressort de dvips. dvips
  peut utiliser indiffremment des polices matricielles Computer Modern
  ou des polices vectorielles Type 1, ou n'importe quelle combinaison
  des deux. En premier lieu, intressons-nous  l'impression et  la
  prvisualisation de quelques lments graphiques.

  Vous souhaiterez sans doute suivre cette procdure  chaque fois qu'un
  document source LaTeX possde la directive

  \includepackage{graphics}


  dans son prambule. Cette directive indique  LaTeX d'inclure le texte
  de l'extension graphics.sty dans le document source. Il existe
  d'autres commandes pour effectuer des oprations graphiques, et les
  directives contenues dans des documents en TeX pur ne vous renseignent
  pas forcment sur l'obligation ou non d'utiliser dvips. Toutefois, la
  diffrence se verra dans la sortie, lorsque le document imprim ne
  comportera pas toutes les figures ou autres lments graphiques.

  Donc, pour l'instant, nous nous focaliserons sur l'impression de
  documents utilisant l'extension LaTeX graphics.sty. Vous avez
  peut-tre envie d'aller examiner le fichier TeX d'origine. Il ne se
  trouve pas dans la distribution, mais est disponible  :

  ~CTAN/macros/latex/packages/graphics/grfguide.tex.


  Ce qui se trouve bien dans la distribution teTeX est le fichier de
  sortie .dvi, et il a dj t  TeX  pour vous. L'explication en est
  que l'impression correcte du document repose sur la ncessit d'y
  inclure des polices Type 1. Si vous dsirez composer grfguide.tex avec
  LaTeX, reportez-vous  la section suivante. Pour le moment, nous
  tcherons d'obtenir une sortie utilisable  l'aide de dvips.

  Le fichier grfguide.dvi se trouve dans le rpertoire

  texmf/doc/latex/graphics


  Le premier pas dans la production d'une sortie de grfguide.dvi est de
  le traduire en Postscript. Pour cela, on utilise le programme dvips.
  Il fait exactement ce qu'indique son nom. Il existe de nombreuses
  options au lancement de dvips, mais la forme la plus simple (ou
  presque) est

  dvips -f -r <grfguide.dvi >grfguide.ps


  L'option -f demande  dvips de se comporter comme un filtre, lisant 
  partir de l'entre standard et crivant sur la sortie standard. Il est
  possible de configurer dvips pour qu'il crive par dfaut sur lpr.

  Si vous avez la possibilit d'imprimer directement du Postscript sur
  votre imprimante via lpr, il vous suffit de taper

  dvips -r grfguide.dvi


  L'option -r indique  dvips d'crire les pages en ordre inverse pour
  qu'elles s'empilent correctement  leur sortie de l'imprimante. Libre
   vous de l'utiliser, en fonction de votre priphrique de sortie.

  En fonction de l'existence ou non des polices gnres par dvilj2 pour
  le dernier document, dvips et metafont peuvent tre amens  crer de
  nouvelles polices pour les besoins du grfguide.dvi. Cependant, en fin
  de compte, dvips produira la liste des pages traduites en Postscript,
  et vous obtiendrez une sortie Postscript prte  tre imprime sur le
  priphrique dont vous disposez.

  Si vous tes chanceux (et riche), alors vous disposez dj d'une
  imprimante capable de traiter du Postscript et tes prt  imprimer
  directement le fichier grfguide.ps. Vous pouvez envoyer la sortie vers
  la file d'impressions  l'aide de lpr. Si, pour une raison ou pour une
  autre, le programme d'impression ne fonctionne pas correctement,
  dchargez directement le fichier sur l'imprimante en un tour de main,
  avec

  cat grfguide.ps >/dev/lp0


  ou tout autre port auquel votre imprimante est attache, bien que cela
  ne soit pas recommand pour un usage courant.

  Si vous devez invoquer Ghostscript  la main, voici la dmarche
  standard  suivre pour cette opration. La premire chose que vous
  voudrez faire est d'invoquer Ghostscript pour connatre ses options,
  comme ceci :
  gs -help | less


  Vous verrez la liste des priphriques de sortie supports et une
  flope d'autres commandes. Choisissez le priphrique de sortie qui
  correspond le mieux  votre imprimante. Pour ma part, je produis en
  gnral du texte en noir et blanc et utilise le pilote cdjmono, adapt
   une imprimante couleur DeskJet en mode monochrome (noir et blanc).

  La ligne de commande que j'utiliserais est :

  gs -dNOPAUSE -sDEVICE=cdjmono -sOutputFile=/tmp/gs.out grfguide.ps -c quit


  Cela produira une sortie compatible avec ma HP dans le rpertoire
  /tmp. Il est de bon ton d'utiliser un rpertoire du type /tmp car gs
  peut tre quelque peu singulier  propos des droits d'accs, et vous
  ne pouvez (et ne devriez) pas compter sur le fait d'tre connect sous
  root pour effectuer ces tapes.  prsent vous pouvez imprimer le
  fichier :

  lpr /tmp/gs.out


  De toute vidence, tout cela peut tre cas dans un fichier de comman
  des (_s_h_e_l_l_-_s_c_r_i_p_t). Sur mon systme, j'ai crit deux scripts tout sim
  ples, pv et pr, qui se contentent de sortir le fichier Postscript soit
  sur l'cran, soit sur l'imprimante.  La prvisualisation sur l'cran
  est possible sans X, mais c'est loin d'tre l'idal. Ainsi, cela vaut
  vraiment le coup, et l'effort, d'installer XFree86 pour voir la sortie
  sur l'cran.

  L'ordre des commandes sur la ligne de commande de gs est important,
  car quelques unes des options indiquent  Ghostscript de chercher des
  bouts de code Postscript dans sa bibliothque.

  L'important dont il faut se souvenir est que grfguide.dvi met des
  requtes  la fois pour des polices matricielles Computer Modern et
  pour des polices vectorielles Type 1. Si vous arrivez  mlanger des
  polices vectorielles et matricielles dans un document, vous tes en
  bonne voie pour devenir un TeXpert.


  66..11..  EEtt ssii mmoonn iimmpprriimmaannttee nn''eesstt ppaass ssuuppppoorrttee ??

  La distribution teTeX est accompagne d'une slection limite de
  pilotes pour les sorties DVI : dvips, des pilotes pour les LaserJet de
  Hewlett-Packard et c'est tout. Deux possibilits s'offrent  vous si
  vous avez une imprimante incompatible avec la LaserJet : vous pouvez
  utiliser dvips et Ghostscript, ce que je recommande de toutes faons,
  ou vous pouvez vous lancer dans la recherche d'autres sources de
  dviware.

  Un nombre restreint de pilotes DVI a t port sous Linux et est
  disponible sous forme de binaires pr-compils. Il se trouvent dans
  les archives Linux  archives
  ftp://sunsite.unc.edu/pub/Linux/apps/tex/dvi/.

  Les bibliothques principales de dviware sont maintenues dans les
  archives de l'universit de l'Utah. Si vous ne pouvez y trouver le
  pilote DVI adapt  votre imprimante, il est probable qu'il n'existe
  pas. Vous pouvez galement crire _v_o_t_r_e _p_r_o_p_r_e pilote DVI  partir des
  modles qui s'y trouvent. L'URL de la bibliothque est
  ftp://ftp.math.utah.edu/pub/tex/dvi/.


  77..  UUttiilliissaattiioonn ddee ppoolliicceess PPoossttssccrriipptt


  Il tait d'usage que la qualit des polices Type 1 du domaine public
  soit nettement infrieure  celle des polices matricielles Computer
  Modern. Nanmoins, cette situation s'est amliore au cours des
  dernires annes. Mais la mise en correspondance des polices reste 
  votre charge. Disposer de plusieurs systmes de polices diffrents sur
  une seule machine peut paratre redondant et un gchis en espace
  disque. Et les polices Computer Modern peuvent paratre un peu trop
  _f_o_r_m_e_l_l_e_s, disons, pour un usage courant. C'est un peu comme jeter des
  perles aux cochons. Au moins, vous n'tes plus oblig de dpenser une
  fortune pour des polices de qualit professionnelle.

  L'une des amliorations majeures de LaTeX2e par rapport  son
  prdcesseur est l'inclusion du _N_e_w _F_o_n_t _S_e_l_e_c_t_i_o_n _S_c_h_e_m_e (nouveau
  schma de slection des polices). (Qui s'appelle  prsent PSNFSS.)
  Auparavant, les auteurs crivant en TeX devaient spcifier les polices
   l'aide de commandes comme

  \font=bodyroman = cmr10 scaled \magstep 1



  ce qui permet d'tre prcis mais ncessite les talents d'un typographe
  et d'un mathmaticien pour tre utilis correctement. De plus, cela
  manque de portabilit. Si un autre systme tait dpourvu de la police
  cmr10 (ce qui est la nomenclature TeX pour Computer Modern Roman, 10
  points, d'paisseur de trait moyenne), quelqu'un devait recoder les
  spcification des polices pour tout le document. PSNFSS cependant,
  vous permet de spcifier les polices par famille (Computer Modern, URW
  Nimbus, Helvetica, Utopia et ainsi de suite), paisseur (lger, moyen,
  gras), orientation (droit ou oblique), style (Roman ou Italique) et
  taille de base en points. (Cf. section ``Caractres et styles
  typographiques'' pour une description des commandes de spcification
  des styles typographiques.)  De nombreuses polices sont groupes en
  familles. Par exemple, une police du type Roman peut tre groupe avec
  une police sans-srif, comme Helvetica, et une police  espacement
  fixe, comme Courier. Vous, en tant qu'auteur du document LaTeX, pouvez
  spcifier une famille entire de polices avec une seule commande.

  Comme je l'ai dj mentionn, il existe des ensembles de polices de
  trs bonne qualit dans le domaine public. L'un d'entre eux est Adobe
  Utopia. Un autre est Bitstream Charter. Ce sont tous les deux des
  ensembles de qualit professionnelle qui ont t verss dans le
  domaine public.

  Il se trouve que ceux-l sont mes prfrs. Si vous examinez les sites
  CTAN, vous y trouverez les archives qui les contiennent ainsi que
  d'autres. Il y a suffisamment de polices en circulation pour vous
  permettre de concevoir des documents qui correspondent  vos attentes,
  et pas seulement pour du texte en franais.  l'origine, TeX a t
  conu pour la mise en page de mathmatiques, ainsi, il existe toute
  une panoplie de polices mathmatiques, tout comme les alphabets
  cyrilliques et grecs, le kana et d'autres alphabets, trop nombreux
  pour tre mentionns ici.

  L'important est de rechercher les fichiers portant les extensions .pfa
  ou .pfb. Elles indiquent qu'il s'agit des polices vectorielles en tant
  que telles, et non pas simplement des fichiers des mtriques. Les
  polices Type 1 utilisent des fichiers de mtriques .pfm, par
  opposition au fichiers .tfm des polices matricielles. Les deux
  ensembles de polices que j'ai mentionns plus haut sont compris dans
  les distributions teTeX, mais galement de manire spare.


  Ce que j'ai dit ci-dessus, au sujet de la facilit apporte par PSNFSS
  pour la slection des polices, se rvle appropri dans le cas de
  figure suivant : si nous voulons utiliser les polices Charter dans
  notre document au lieu des polices matricielles Computer Modern, tout
  ce qu'il y a  faire est d'inclure la directive LaTeX

  \renewcommand{\familydefault}{bch}


  dans le prambule du document, o  bch  est la dsignation courante
  pour Bitstream Charter. Les polices Charter se trouvent dans le rper
  toire

  /usr/lib/teTeX/texmf/fonts/type1/bitstrea/charter



  Vous y verrez les fichiers .pfb des polices Charter : bchb8a.pfb pour
  Charter Bold, bchr8a.pfb pour Charter Roman, bchbi8a.pfb pour Charter
  Bold Italic. Le  8a  dans les noms des polices indique l'encodage
  des caractres. Arriv  ce point, vous n'avez pas  vous proccuper 
  leur sujet (-- NdT. : cela vaut plus pour les anglophones que pour les
  francophones.--) , car les encodages diffrent principalement pour les
  caractres 8-bits, dont les valeurs numriques dpassent 128 en
  dcimal. Ils dfinissent pour la plupart des accents et des caractres
  non-anglais. Les encodages des Type 1 marchent en gnral bien pour
  les alphabets occidentaux car ils rpondent au standard ISO 8859
  concernant les jeux de caractres internationaux, ce qui constitue un
  argument de plus pour leur utilisation.

  Pour composer un document o sont slectionnes des polices Charter,
  vous lanceriez la commande

  pslatex document.tex


  pslatex est une variante de la commande latex standard de teTeX qui
  dfinit les rpertoires o se trouvent les polices Type 1, ainsi que
  des supplments de code LaTeX  utiliser. Vous verrez l'cran d'aver
  tissement de pslatex suivi de la sortie relative au processus TeX lui-
  mme. En un instant, vous aurez un fichier .dvi incluant des requtes
  pour des polices Charter. Il vous est possible d'imprimer le fichier
  avec dvips, et gs si ncessaire.

  L'installation d'une famille de polices Type 1 n'est pas difficile,
  tant que vous suivez quelques tapes lmentaires. Vous devriez
  dballer les polices dans une rpertoire situ sous
  /usr/lib/teTeX/texmf/fonts/type1, l o se trouvent les autres polices
  de Type 1, et lancer texhash pour faire savoir aux routines de
  recherche dans les rpertoires que de nouvelles polices ont t
  ajoutes. Ensuite, vous devez ajouter les descriptions des polices au
  fichier psfonts.map pour informer dvips de leur existence. Le format
  du fichier psfonts.map est document  plusieurs endroits dans les
  rfrences mentionnes ci-dessus. Encore une fois, n'oubliez pas de
  lancer texhash pour mettre  jour la base de rpertoires de teTeX.

  L'utilisation d'un systme X Window-- XFree86 sous Linux -- avec teTeX
  constitue vraiment un avantage car il permet une prvisualisation des
  documents de qualit suprieure. Il n'est pas exig, mais en rgle
  gnrale, tout ce qui facilite la prvisualisation  l'cran apportera
  un plus  votre travail en termes de qualit des sorties. Cela se paye
  nanmoins en vitesse de frappe, bien plus rapide sur des crans en
  mode texte.



  88..  AAnnnneexxee AA :: lliissttee ddeess ssiitteess CCTTAANN

  Voici le texte du fichier CTAN.sites, qui est disponible dans le
  rpertoire racine de toute archive et de tout miroir CTAN (-- NdT. :
  en plus de la liste des sites miroir, ce texte recommande d'utiliser
  le site le plus proche de chez vous pour ne pas pnaliser le rseau.
  Il voque galement la possibilit d'obtenir une copie du site CTAN
  sur CD-ROM (cf. le fichier help/CTAN.cdrom).--)


























































  In order to reduce network load, it is recommended that you use the
  Comprehensive TeX Archive Network (CTAN) host which is located in the
  closest network proximity to your site.  Alternatively, you may wish to
  obtain a copy of the CTAN via CD-ROM (see help/CTAN.cdrom for details).

  Known mirrors of the CTAN reside on (alphabetically):
    cis.utovrm.it (Italia)                /TeX
    ctan.unsw.edu.au (NSW, Australia)     /tex-archive
    dongpo.math.ncu.edu.tw (Taiwan)       /tex-archive
    ftp.belnet.be (Belgium)               /packages/TeX
    ftp.ccu.edu.tw (Taiwan)               /pub/tex
    ftp.cdrom.com (West coast, USA)       /pub/tex/ctan
    ftp.comp.hkbu.edu.hk (Hong Kong)      /pub/TeX/CTAN
    ftp.cs.rmit.edu.au  (Australia)       /tex-archive
    ftp.cs.ruu.nl (The Netherlands)       /pub/tex-archive
    ftp.cstug.cz (The Czech Republic)     /pub/tex/CTAN
    ftp.duke.edu (North Carolina, USA)    /tex-archive
    ftp.funet.fi (Finland)                /pub/TeX/CTAN
    ftp.gwdg.de (Deutschland)             /pub/dante
    ftp.jussieu.fr (France)               /pub4/TeX/CTAN
    ftp.kreonet.re.kr (Korea)             /pub/CTAN
    ftp.loria.fr (France)                 /pub/unix/tex/ctan
    ftp.mpi-sb.mpg.de (Deutschland)       /pub/tex/mirror/ftp.dante.de
    ftp.nada.kth.se (Sweden)              /pub/tex/ctan-mirror
    ftp.oleane.net (France)               /pub/mirrors/CTAN/
    ftp.rediris.es (Espa\~na)             /mirror/tex-archive
    ftp.rge.com (New York, USA)           /pub/tex
    ftp.riken.go.jp (Japan)               /pub/tex-archive
    ftp.tu-chemnitz.de (Deutschland)      /pub/tex
    ftp.u-aizu.ac.jp (Japan)              /pub/tex/CTAN
    ftp.uni-augsburg.de (Deutschland)     /tex-archive
    ftp.uni-bielefeld.de (Deutschland)    /pub/tex
    ftp.unina.it (Italia)                 /pub/TeX
    ftp.uni-stuttgart.de (Deutschland)    /tex-archive (/pub/tex)
    ftp.univie.ac.at (\"Osterreich)       /packages/tex
    ftp.ut.ee (Estonia)                   /tex-archive
    ftpserver.nus.sg (Singapore)          /pub/zi/TeX
    src.doc.ic.ac.uk (England)            /packages/tex/uk-tex
    sunsite.auc.dk (Denmark)              /pub/tex/ctan
    sunsite.cnlab-switch.ch (Switzerland) /mirror/tex
    sunsite.icm.edu.pl (Poland)           /pub/CTAN
    sunsite.unc.edu (North Carolina, USA) /pub/packages/TeX
    wuarchive.wustl.edu (Missouri, USA)   /packages/TeX

  Known partial mirrors of the CTAN reside on (alphabetically):
    ftp.adfa.oz.au (Australia)            /pub/tex/ctan
    ftp.fcu.edu.tw (Taiwan)               /pub2/tex
    ftp.germany.eu.net (Deutschland)      /pub/packages/TeX
    ftp.gust.org.pl (Poland)              /pub/TeX
    ftp.jaist.ac.jp (Japan)               /pub/TeX/tex-archive
    ftp.uu.net (Virginia, USA)            /pub/text-processing/TeX
    nic.switch.ch (Switzerland)           /mirror/tex
    sunsite.dsi.unimi.it (Italia)         /pub/TeX
    sunsite.snu.ac.kr (Korea)             /shortcut/CTAN

  Please send updates to this list to <ctan@urz.uni-heidelberg.de>.

  The participating hosts in the Comprehensive TeX Archive Network are:
    ftp.dante.de  (Deutschland)
         -- anonymous ftp                 /tex-archive (/pub/tex /pub/archive)
         -- gopher on node gopher.dante.de
         -- e-mail via ftpmail@dante.de
         -- World Wide Web access on www.dante.de
         -- Administrator: <ftpmaint@dante.de>

    ftp.tex.ac.uk (England)
         -- anonymous ftp                 /tex-archive (/pub/tex /pub/archive)
         -- gopher on node gopher.tex.ac.uk
         -- NFS mountable from nfs.tex.ac.uk:/public/ctan/tex-archive
         -- World Wide Web access on www.tex.ac.uk
         -- Administrator: <ctan-uk@tex.ac.uk>




  99..  AAnnnneexxee BB :: iinnssttaallllaattiioonn ddee llaa ddiissttrriibbuuttiioonn CCTTAANN ddee tteeTTeeXX

  La distribution gnrique de teTeX n'est pas plus difficile 
  installer que les paquetages Linux. Cf. la section ``Distribution
  gnrique CTAN'', ci-dessous.

  Vous devriez envisager d'installer la distribution gnrique de teTeX
   partir des archives CTAN si :

    Votre systme n'est pas bas sur l'une des distributions
     standardises de Linux.

    Vous ne disposez pas des privilges de root sur votre systme.

    Vous souhaitez, ou il vous faut absolument, la dernire version de
     teTeX ou LaTeX.

    Vous n'avez pas assez d'espace disque disponible pour une
     installation complte.

    Vous voulez installer teTeX ailleurs que dans le rpertoire /usr.

    Vous voulez partager votre installation teTeX avec d'autres
     variantes d'UNIX ou d'autres plates-formes sur le rseau. Dans ce
     cas, vous devriez srieusement envisager une installation  partir
     de la distribution _s_o_u_r_c_e. Cf. section ``Installation de la
     distrbution source'', plus loin.

    Vous voulez disposer des dernires versions des polices Type 1 du
     domaine public, qui sont considrablement meilleures que les
     polices accompagnant les versions antrieures.

  Une installation complte de la distribution binaire ncessite de 40 
  50 Mo d'espace disque, et la construction de la distribution  partir
  du code source requiert environ 75 Mo, il faut donc vous assurer de
  disposer de cet espace disque avant de commencer. Il n'est pas
  ncessaire d'avoir install le compilateur GCC ou le systme X Window
  (bien que X soit d'une aide prcieuse puisqu'il permet la
  prvisualisation des documents  l'cran). Tout ce qu'il vous faut est
  un diteur capable de produire du texte en ASCII pur (cf. section 2).
  Peut-on faire plus simple ?

  Vous pouvez tlcharger les fichiers  partir de l'un des sites CTAN
  recenss dans la section ``Annexe A''. Dans les exemples ci-dessous,
  les fichiers sont originaires de l'archive CTAN situe 
  ftp.tex.ac.uk.


  99..11..  IInnssttaallllaattiioonn ddee llaa ddiissttrriibbuuttiioonn bbiinnaaiirree



  99..11..11..  IInnssttaallllaattiioonn mmiinniimmaallee


  En premier lieu, faites un FTP sur ftp.tex.ac.uk et un cd vers le
  rpertoire
  ctan/tex-archive/systems/unix/teTeX/distrib/


  Rcuprez les fichiers

  INSTALL.bin
  install.sh


  et placez-les dans le rpertoire-racine de l'endroit ou vous voulez
  installer teTeX, par exemple /var/teTeX si vous souhaitez installer
  teTeX dans le rpertoire /var.

  Imprimez le fichier INSTALL.bin. Gardez-le sous la main car il dcrit
  comment installer une version minimale de teTeX. L'installation
  minimale ne demande que 10  15 Mo mais, si possible, il est
  recommand d'installer l'ensemble du paquetage teTeX. Pour une
  installation minimale, vous aurez besoin des fichiers

  ctan/tex-archive/systems/unix/teTeX/distrib/base/latex-base.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/base/tetex-base.tar.gz


  Vous aurez galement besoin de l'une des deux archives contenant les
  programmes excutables de teTeX. Rcuprez le fichier

  ctan/tex-archive/systems/unix/teTeX/distrib/binaries/i386-linux.tar.gz


  si votre systme utilise les bibliothques partages au format Linux
  ELF, ld.so dans une version au moins gale  1.73, et clibs dans une
  version au moins gale  5.09. Si ce n'est pas le cas, rcuprez
  l'archive

  ctan/tex-archive/systems/unix/teTeX/distrib/binaries/i386-linuxaout.tar.gz


  compil pour des systmes utilisant les bibliothques statiques au
  format a.out, plus anciennes.

  Puis, suivant en cela les instructions du fichier INSTALL.bin,
  excutez la commande

  sh ./install.sh


   partir du rpertoire-racine de l'installation teTeX. (Assurez vous
  que les archives teTeX s'y trouvent galement). Aprs quelques
  instants, le programme d'installation vous avertira s'il manque cer
  tains paquetages teTeX. Si toutefois vous prvoyez une installation
  minimale de teTeX, vous pouvez ignorer ces avertissements et passer 
  la suite. Pour configurer le systme teTeX lmentaire, reportez-vous
   la section ``Configuration d'un systme lmentaire'', ci-dessous.

  Pour installer les paquetages restants, voyez la section suivante.


  99..11..22..  IInnssttaallllaattiioonn ccoommppllttee

  Pour effectuer une installation complte de teTeX, rcuprez les
  fichiers d'archives recenss dans la section prcdente, puis les
  fichiers suivants :




  ctan/tex-archive/systems/unix/teTeX/distrib/doc/ams-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/bibtex-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/eplain-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/fonts-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/general-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/generic-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/latex-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/makeindex-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/metapost-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/programs-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/ams-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/dc-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/ec-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/misc-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/postscript-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/sauter-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/amstex.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/bibtex.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/eplain.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/latex-extra.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/metapost.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/pictex.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/pstricks.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/texdraw.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/xypic.tar.gz


  Tous ces fichiers devraient tre placs dans le rpertoire-racine de
  l'arborescence o teTeX doit rsider. Comme pour l'installation mini
  male, excutez la commande

  sh ./install.sh



  99..22..  CCoonnffiigguurraattiioonn dd''uunn ssyyssttmmee llmmeennttaaiirree

  Le script install.sh, aprs avoir dtermin l'ensemble des archives
  teTeX disponibles, vous offrira un menu d'options. Le seul paramtre
  que vous avez  dfinir  ce moment-l est le rpertoire-racine de
  l'endroit o vous voulez installer teTeX, en slectionnant l'option
   D . Bien sr, vous devez slectionner un rpertoire pour lequel
  vous avez les droits d'criture dans le rpertoire pre. Par exemple,
  si vous installez teTeX dans votre _h_o_m_e _d_i_r_e_c_t_o_r_y, vous spcifierez le
  rpertoire d'installation de teTeX comme

  /home/john.q.public/teTeX


  et, aprs tre retourn au menu principal, slectionnerez  I  pour
  poursuivre l'installation. Notez que ce rpertoire ne doit pas
  exister : le script install.sh doit pouvoir le crer.

  Une option que vous pourriez envisager de modifier est la dfinition
  d'un rpertoire pour la gnration des polices. Mme si vous prvoyez
  de n'utiliser que des polices vectorielles Postscript Type 1, il vous
  arrivera  l'occasion de travailler sur un fichier bas sur des
  polices Computer Modern. L'activation de cette option vous demande
  d'entrer le nom du rpertoire  utiliser. Vous devez disposer des
  droits d'criture dans son rpertoire-pre. En se basant sur l'exemple
  prcdent, vous pourriez spcifier

  /home/john.q.public/texfonts



  ou bien, si vous souhaitez rendre les polices gnres accessibles 
  tous les utilisateurs du systme, spcifiez un rpertoire comme

  /var/texfonts


  Je vous recommanderai cependant de _n_e _p_a_s utiliser le rpertoire par
  dfaut pour cette option, /var/tmp/texfonts, car les polices gnres
  pourraient tre effaces au prochain redmarrage, et elles devraient
  tre rgnres lorsqu'elles seraient  nouveau ncessaires.

  Aprs que vous aurez slectionn l'option  I  et que install.sh aura
  install les archives, positionn les droits d'accs divers et gnr
  les liens et les fichiers de format, le programme se terminera avec un
  message vous indiquant de rajouter le rpertoire des binaires teTeX 
  votre variable d'environnement $PATH, et les rpertoires o se
  trouvent les pages man et info  vos variables d'environnement
  $MANPATH et $INFOPATH. Par exemple, ajoutez les directives

  export PATH=$PATH:"/home/john.q.public/teTeX/bin"
  export MANPATH=$MANPATH":/home/john.q.public/teTeX/man"
  export INFOPATH$=INFOPATH":/home/john.q.public/teTeX/info"


   votre ~/.bash_profile si vous utilisez  bash comme interprteur de
  commandes, ou  votre ~/.profile si vous en utilisez un autre pour vos
  connexions.

  Dconnectez-vous, puis reconnectez-vous pour que les variables
  d'environnement puissent tre prises en compte. Puis, lancez la
  commande

  texconfig confall


  pour vous assurer que l'installation est correcte.

  Ensuite, vous pouvez configurer teTeX pour votre matriel spcifique :
  reportez-vous  la section ``Dtails de configuration aprs
  l'installation'', ci-dessous.


  99..33..  IInnssttaallllaattiioonn ddee llaa ddiissttrriibbuuttiioonn ssoouurrccee CCTTAANN

  Pour installer teTeX V. 0.4  partir du code source, faites un ftp sur
  un site CTAN comme ftp://ftp.tex.ac.uk et rcuprez les fichiers

  ctan/tex-archive/systems/unix/teTeX/distrib/INSTALL.src
  ctan/tex-archive/systems/unix/teTeX/distrib/sources/README.texmf-src
  ctan/tex-archive/systems/unix/teTeX/distrib/sources/teTeX-lib-0.4pl8.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/sources/teTeX-src-0.4pl7.tar.gz



  Parcourez les instructions dans INSTALL.src, puis faites su pour
  devenir root et dballez les fichiers dans un rpertoire pour lequel
  vous avez les droits de lecture-criture-excution.

  Souvenez-vous d'utiliser l'argument p pour faire le tar, et de
  dsactiver l'option noclobber du bash. Cela est possible grce  la
  commande suivante,  l'encontre du bon sens,

  set +o noclobber



  Remarquez que l'argument +o de la commande set _d__s_a_c_t_i_v_e une variable,
   l'inverse de ce que l'on pourrait croire.

  Le fichier teTeX-lib-0.4pl8.tar.gz va crer le rpertoire ./teTeX. Le
  fichier teTeX-src-0.4pl7.tar.gz va crer le rpertoire teTeX-src-0.4.
  Imprimez le fichier INSTALL.src et gardez-le  proximit pour les
  tapes suivantes. Faites un cd vers le rpertoire ./teTeX-src-0.4, et,
  comme indiqu dans les instructions du fichier INSTALL.src, ditez le
  fichier ./Makefile. Vous devrez positionner la variable TETEXDIR avec
  le chemin absolu vers le rpertoire pre du rpertoire teTeX. Il
  s'agit donc du sous-rpertoire teTeX du rpertoire o vous avez
  dball les archives des sources et des bibliothques. Par exemple, si
  vous avez dball les archives dans votre _h_o_m_e _d_i_r_e_c_t_o_r_y, vous
  positionnerez TETEXDIR 

  /home/john.q.public/teTeX


  Les autres options du Makefile sont assez gnriques. Avec GCC version
  2.7.2 ou plus, vous ne devriez pas tre oblig de faire plus d'ajuste
  ments  moins d'avoir une configuration non standard pour le compila
  teur et les bibliothques, ou de souhaiter le que compilateur fasse
  plus d'optimisations ou pour toute autre raison. Vrifiez que les
  variables USE_DIALOG, USE_NCURSES, et HAVE_NCURSES sont correctement
  positionnes pour votre systme, car le programme dialog a besoin de
  la bibliothque ncurses pour tre install. Une bibliothque ncurses
  est comprise dans la distribution source, par consquent, les valeurs
  par dfaut du Makefile devraient fonctionner correctement. Si vous
  n'arrivez pas  compiler ou  faire l'dition de liens de ncurses, le
  programme texconfig peut galement tre lanc  partir de la ligne de
  commande.

  Si vous avez tout bon jusqu'ici, vous devriez pouvoir taper make world
  dans la racine de l'arborescence des sources et vous dtendre jusqu'
  ce que les excutables teTeX soient construits. Cela peut prendre
  quelques heures.

  Aprs que la compilation a pris fin, positionnez les variables
  d'environnement $PATH, $MANPATH, et $INFOPATH pour y inclure les
  rpertoires de teTeX. Les directives  ajouter au fichier
  ~/.bash_profile, dans l'exemple ci-dessus, seraient

  export PATH=$PATH":/home/john.q.public/teTeX/bin/i386-linux"
  export MANPATH=$MANPATH":/home/john.q.public/teTeX/man"
  export INFOPATH=$INFOPATH":/home/john.q.public/teTeX/info"


  La variable $PATH diffre entre les distributions source et binaire.
  Remarquez que le chemin vers les binaires est teTeX/bin/i386-linux au
  lieu de simplement teTeX/bin comme dans la distribution binaire.

   ce stade, vous pouvez lancer texconfig confall pour vous assurer que
  les chemins ont t positionns correctement, et poursuivre la
  configuration de teTeX comme pour la distribution binaire. Cf. section
  ``Dtails de configuration aprs l'installation'', ci-dessous.


  99..44..  DDttaaiillss ddee ccoonnffiigguurraattiioonn aapprrss ll''iinnssttaallllaattiioonn

  La premire chose que vous voudrez faire est de regarder le fichier
  README de Thomas Esser. Il contient un tas d'indices sur la manire de
  configurer teTeX pour votre priphrique de sortie (imprimante par
  exemple). Le fichier README se trouve dans le rpertoire

  /usr/lib/teTeX/texmf/doc/tetex

  Parcourez le fichier  l'aide de la commande (le chemin dans les exem
  ples qui suivent est celui de la distribution Slackware) :

  less /usr/lib/teTeX/texmf/doc/tetex/README


  ou imprimez-le avec la commande

  cat /usr/lib/teTeX/texmf/doc/tetex/README >/dev/lp0


  en supposant que votre imprimante est connecte  /dev/lp0. Remplacez-
  le par le fichier correspondant au pilote auquel votre imprimante est
  attache le cas chant.

  Ou, encore mieux, imprimez-le avec la commande lpr :

  lpr /usr/lib/teTeX/texmf/doc/tetex/README


  Vous devriez avoir install le dmon d'impression qui est inclus dans
  votre distribution Linux. Si ce n'est pas le cas, faites-le main
  tenant, en suivant les instructions qui accompagnent ce paquetage.

  Imprimez la teTeX-FAQ. Gardez la FAQ sous la main car elle contient
  des indications utiles pour la configuration des pilotes de sortie
  pour teTeX adapte  votre imprimante. Nous y viendrons dans un
  moment. Dans des versions plus rcentes de teTeX, la teTeX-FAQ peut
  tre visualise  l'aide de l'utilitaire texconfig.

  Ensuite, vous souhaiterez dfinir un rpertoire o stocker vos propres
  fichiers de formats TeX. teTeX parcourt les rpertoires figurant dans
  la variable d'environnement $TEXINPUTS pour des fichiers d'entre pour
  TeX disponibles en local.

  Ajoutez

  export TEXINPUTS=".:~/texinputs:"


  au fichier systme /etc/profile. Chaque utilisateur peut positionner
  son propre rpertoire $TEXINPUTS local, en ajoutant la ligne dans son
  ~/.profile ou ~/.bash_profile si bash est l'interprteur de commandes
  par dfaut. La variable d'environnement $TEXINPUTS indique  teTeX de
  chercher les fichiers de style TeX des utilisateurs dans les rper
  toires ~/texinputs sous les _h_o_m_e _d_i_r_e_c_t_o_r_y de chacun des utilisateurs.
  Il est _i_n_d_i_s_p_e_n_s_a_b_l_e de mettre un deux-points avant et aprs ce rper
  toire. teTeX va ajouter ses propres rpertoires de recherche aux
  vtres. Vous voudrez que teTeX recherche en premier lieu les fichiers
  de format locaux, pour qu'il utilise les versions locales des fichiers
  standardiss que vous avez dits.

  Ajoutez le rpertoire /usr/lib/teTeX/bin aux chemins dfinis pour le
  systme si vous installez teTeX en tant que root. Encore une fois, si
  vous installez un exemplaire personnel de teTeX, ajoutez le rpertoire
  o se situent les binaires teTeX _e_n _t__t_e de votre $PATH en insrant la
  ligne suivante dans votre ~/.profile ou votre ~/.bash_profile :

  export PATH="~/tetex/bin:"$PATH


   prsent, connectez-vous sous root et lancez texconfig comme il est
  dit dans la teTeX-FAQ et choisissez l'imprimante attache  votre
  systme. Assurez-vous de configurer teTeX aussi bien pour la bonne
  imprimante que pour la bonne rsolution d'impression.

  Enfin, lancez le programme texhash. Cela garantit que la base de
  donnes interne de teTeX est bien  jour. Cette base de donnes n'est
  autre que le fichier ls-lR. Vous _d_e_v_e_z lancer texhash  chaque fois
  que vous modifiez la configuration du systme, sans quoi teTeX sera
  incapable de prendre en compte vos changements.


  1100..  AAnnnneexxee CC :: ddiissttrriibbuuttiioonn eett ddrrooiittss dd''aauutteeuurr


  1100..11..  DDiissttrriibbuuttiioonn

  teTeX est un _l_o_g_i_c_i_e_l _l_i_b_r_e ce qui signifie que tout un chacun est
  libre de l'utiliser et de le redistribuer sous certaines conditions.
  Le paquetage n'est pas dans le domaine public. Il est soumis 
  copyright et il existe des restrictions concernant sa distribution,
  mais ces restrictions sont conues pour permettre tout ce qu'un bon
  citoyen coopratif aurait envie de faire. Ce qui n'est pas autoris,
  c'est d'essayer d'empcher les autres de partager plus en avant toute
  version d'un logiciel libre qu'ils pourraient recevoir de vous. Les
  conditions prcises figurent dans la _G_N_U _G_e_n_e_r_a_l _P_u_b_l_i_c _L_i_c_e_n_s_e qui
  accompagne de nombreux paquetages logiciels et apparat galement dans
  la section suivante.

  Un moyen d'obtenir un exemplaire du paquetage est de le rcuprer
  auprs de quelqu'un qui le possde. Vous n'avez pas besoin de nous
  demander la permission pour ce faire, ni d'en informer qui que ce
  soit ; vous pouvez le copier tout simplement. Si vous disposez d'un
  accs  l'Internet, vous pouvez rapatrier la distribution la plus
  rcente par FTP. Lisez le chapitre _S_o_u_r_c_e_s pour plus d'information.

  Vous pouvez galement recevoir le logiciel lors de l'achat d'un
  ordinateur. Les fabricants d'ordinateurs sont libres de distribuer des
  exemplaires aux mmes conditions que n'importe qui d'autre. Ces
  conditions exigent d'eux qu'ils vous donnent les sources complets, y
  compris toutes les modifications qu'ils peuvent y avoir faites, et
  qu'ils vous permettent de redistribuer les paquetages obtenus auprs
  d'eux sous les conditions habituelles de la _G_N_U _G_e_n_e_r_a_l _P_u_b_l_i_c
  _L_i_c_e_n_s_e. En d'autres termes, le programme doit tre gratuit pour vous
  lorsque vous en prenez possession, et pas seulement gratuit pour le
  fabricant.

  Vous pouvez galement commander des exemplaires des logiciels GNU sur
  CD-ROM  la _F_r_e_e _S_o_f_t_w_a_r_e _F_o_u_n_d_a_t_i_o_n. C'est un moyen pratique et sr
  de se procurer une copie ; c'est galement une bonne mthode pour
  soutenir nos travaux. (La plupart des fonds de la fondation ont
  toujours t fournis par ce biais.) Un bon de commande est inclus dans
  de nombreuses distributions, et sur notre site Web 
  http://www.gnu.ai.mit.edu/order/order.html. Pour plus d'information,
  crivez  l'adresse


  Free Software Foundation
  59 Temple Place, Suite 330
  Boston, MA  02111-1307 USA
  USA



  Les revenus gnrs par la commercialisation des distributions vont au
  soutien des buts que s'est assigns la fondation : le dveloppement de
  nouveaux logiciels libres, et l'amlioration des programmes existants.

  Si vous utilisez des logiciels GNU  votre lieu de travail, vous
  pourriez suggrer  votre entreprise de faire un don. Si votre
  entreprise n'est pas favorable aux dons aux oeuvres de charit, vous
  pourriez alors suggrer de commander  l'occasion un CD-ROM  la
  fondation, ou de s'abonner aux mises  jour priodiques.


  1100..22..  GGNNUU GGEENNEERRAALL PPUUBBLLIICC LLIICCEENNSSEE


  Version 2, juin 1991 (-- NdT. : la version franaise reproduite ici
  est le fruit du travail de l'association APRIL
  http://www.april.org.--)

  Copyright (C) 1989, 1991, Free Software Foundation Inc. 675 Mass Ave,
  Cambridge, MA02139, Etats-Unis.

  Il est permis  tout le monde de reproduire et distribuer des copies
  conformes de ce document de licence, mais aucune modification ne doit
  y tre apporte.

  PPrraammbbuullee

  Les licences relatives  la plupart des logiciels sont destines 
  supprimer votre libert de les partager et de les modifier. Par
  contraste, la licence publique gnrale GNU General Public License
  veut garantir votre libert de partager et de modifier les logiciels
  libres, pour qu'ils soient vraiment libres pour tous leurs
  utilisateurs. La prsente licence publique gnrale s'applique  la
  plupart des logiciels de la Free Software Foundation, ainsi qu' tout
  autre programme dont les auteurs s'engagent  l'utiliser.  (Certains
  autres logiciels sont couverts par la Licence Publique Gnrale pour
  Bibliothques GNU  la place). Vous pouvez aussi l'appliquer  vos
  programmes.

  Quand nous parlons de logiciels libres, nous parlons de libert, non
  de gratuit. Nos licences publiques gnrales veulent vous garantir :

  * que vous avez toute libert de distribuer des copies des logiciels
  libres (et de facturer ce service, si vous le souhaitez) ;

  * que vous recevez les codes sources ou pouvez les obtenir si vous le
  souhaitez ;

  * que vous pouvez modifier les logiciels ou en utiliser des lments
  dans de nouveaux programmes libres ;

  * et que vous savez que vous pouvez le faire.

  Pour protger vos droits, nous devons apporter des restrictions, qui
  vont interdire  qui que ce soit de vous dnier ces droits, ou de vous
  demander d'y renoncer. Ces restrictions se traduisent par certaines
  responsabilits pour ce qui vous concerne, si vous distribuez des
  copies de logiciels, ou si vous les modifiez.

  Par exemple, si vous distribuez des copies d'un tel programme,
  gratuitement ou contre une rmunration, vous devez transfrer aux
  destinataires tous les droits dont vous disposez. Vous devez vous
  garantir qu'eux-mmes, par ailleurs, reoivent ou peuvent recevoir le
  code source. Et vous devez leur montrer les prsentes dispositions, de
  faon qu'ils connaissent leurs droits.

  Nous protgeons vos droits en deux tapes :

  1. Nous assurons le droit d'auteur (copyright) du logiciel, et

  2. Nous vous proposons cette licence, qui vous donne l'autorisation
  lgale de dupliquer, distribuer et/ou modifier le logiciel.

  De mme, pour la protection de chacun des auteurs, et pour notre
  propre protection, nous souhaitons nous assurer que tout le monde
  comprenne qu'il n'y a aucune garantie portant sur ce logiciel libre.
  Si le logiciel est modifi par quelqu'un d'autre puis transmis  des
  tiers, nous souhaitons que les destinataires sachent que ce qu'ils
  possdent n'est pas l'original, de faon que tous problmes introduits
  par d'autres ne se traduisent pas par une rpercussion ngative sur la
  rputation de l'auteur original.

  Enfin, tout programme libre est en permanence menac par des brevets
  de logiciels. Nous souhaitons viter le danger que des sous-
  distributeurs d'un programme libre obtiennent  titre individuel des
  licences de brevets, avec comme consquence qu'ils aient un droit de
  proprit sur le programme. Pour viter cette situation, nous avons
  fait tout ce qui est ncessaire pour que tous brevets doivent faire
  l'objet d'une concession de licence qui en permette l'utilisation
  libre par chacun, ou bien qu'il ne soit pas concd du tout.

  Nous prsentons ci-dessous les clauses et dispositions concernant la
  duplication, la distribution et la modification.

  CCoonnddiittiioonnss dd''eexxppllooiittaattiioonn ppoorrttaanntt ssuurr llaa dduupplliiccaattiioonn,, llaa ddiissttrriibbuuttiioonn
  eett llaa mmooddiiffiiccaattiioonn



    Le prsent contrat de licence s'applique  tout programme ou autre
     ouvrage contenant un avis, appos par le dtenteur du droit de
     proprit, disant qu'il peut tre distribu au titre des
     dispositions de la prsente Licence Publique Gnrale. Ci-aprs, le
      Programme  dsigne l'un quelconque de ces programmes ou
     ouvrages, et un  ouvrage fond sur le programme  dsigne soit le
     programme, soit un ouvrage qui en drive au titre de la loi sur le
     droit d'auteur ; plus prcisment, il s'agira d'un ouvrage
     contenant le programme ou une version de ce dernier, soit mot 
     mot, soit avec des modifications et/ou traduit en une autre langue
     (ci-aprs, le terme  modification  englobe, sans aucune
     limitation, les traductions qui en sont faites). Chaque titulaire
     de licence sera appel  concessionnaire .

     Les activits autres que la duplication, la distribution et la
     modification ne sont pas couvertes par la prsente licence ; elles
     n'entrent pas dans le cadre de cette dernire. L'excution du
     programme n'est soumise  aucune restriction, et les rsultats du
     programme ne sont couverts que si son contenu constitue un ouvrage
     fond sur le programme (indpendamment du fait qu'il a t ralis
     par excution du programme). La vracit de ce qui prcde dpend
     de ce que fait le programme.

    Le concessionnaire peut dupliquer et distribuer des copies mot 
     mot du code source du programme tel qu'il les reoit, et ce sur un
     support quelconque, du moment qu'il appose, d'une manire
     parfaitement visible et approprie, sur chaque exemplaire, un avis
     appropri de droits d'auteur (Copyright) et de renonciation 
     garantie ; qu'il maintient intacts tous les avis qui se rapportent
      la prsente licence et  l'absence de toute garantie ; et qu'il
     transmet  tout destinataire du programme un exemplaire de la
     prsente licence en mme temps que le programme.

     Le concessionnaire peut facturer l'acte physique de transfert d'un
     exemplaire, et il peut,  sa discrtion, proposer en change d'une
     rmunration une protection en garantie.

    Le concessionnaire peut modifier son ou ses exemplaires du
     programme ou de toute portion de ce dernier, en formant ainsi un
     ouvrage fond sur le programme, et dupliquer et distribuer ces
     modifications ou cet ouvrage selon les dispositions de la section 1
     ci-dessus, du moment que le concessionnaire satisfait aussi 
     toutes ces conditions :

     a. Le concessionnaire doit faire en sorte que les fichiers modifis
     portent un avis, parfaitement visible, disant que le
     concessionnaire a modifi les fichiers, avec la date de tout
     changement.

     b. Le concessionnaire doit faire en sorte que tout ouvrage qu'il
     distribue ou publie, et qui, en totalit ou en partie, contient le
     programme ou une partie quelconque de ce dernier ou en drive, soit
     concd en bloc,  titre gracieux,  tous tiers au titre des
     dispositions de la prsente licence.

     c. Si le programme modifi lit normalement des instructions
     interactives lors de son excution, le concessionnaire doit, quand
     il commence l'excution du programme pour une telle utilisation
     interactive de la manire la plus usuelle, faire en sorte que ce
     programme imprime ou affiche une annonce, comprenant un avis
     appropri de droits d'auteur, et un avis selon lequel il n'y a
     aucune garantie (ou autrement, que le concessionnaire fournit une
     garantie), et que les utilisateurs peuvent redistribuer le
     programme au titre de ces dispositions, et disant  l'utilisateur
     comment visualiser une copie de cette licence (exception : si le
     programme par lui-mme est interactif mais n'imprime normalement
     pas une telle annonce, l'ouvrage du concessionnaire se fondant sur
     le programme n'a pas besoin d'imprimer une annonce).

     Les exigences ci-dessus s'appliquent  l'ouvrage modifi pris en
     bloc.  Si des sections identifiables de cet ouvrage ne drivent pas
     du programme et peuvent tre considres raisonnablement comme
     reprsentant des ouvrages indpendants et distincts par eux-mmes,
     alors la prsente licence et ses dispositions, ne s'appliquent pas
      ces sections quand le concessionnaire les distribue sous forme
     d'ouvrages distincts. Mais quand le concessionnaire distribue ces
     mmes sections en tant qu'lment d'un tout qui reprsente un
     ouvrage se fondant sur le programme, la distribution de ce tout
     doit se faire conformment aux dispositions de la prsente licence,
     dont les autorisations, portant sur d'autres concessionnaires,
     s'tendent  la totalit dont il est question, et ainsi  chacune
     de ses parties, indpendamment de celui qui les a crites.

     Ainsi, cette section n'a pas pour but de revendiquer des droits ou
     de contester vos droits sur un ouvrage entirement crit par le
     concessionnaire ; bien plus, l'intention est d'exercer le droit de
     surveiller la distribution d'ouvrages drivs ou collectifs se
     fondant sur le programme.

     De plus, un simple assemblage d'un autre ouvrage ne se fondant pas
     sur le programme, avec le programme (ou avec un ouvrage se fondant
     sur le programme) sur un volume d'un support de stockage ou
     distribution, ne fait pas entrer l'autre ouvrage dans le cadre de
     la prsente licence.

    Le concessionnaire peut dupliquer et distribuer le programme (ou un
     ouvrage se fondant sur ce dernier, au titre de la Section 2), en
     code objet ou sous une forme excutable, au titre des dispositions
     des Sections 1 et 2 ci-dessus, du moment que le concessionnaire
     effectue aussi l'une des oprations suivantes :

     a. Lui joindre le code source complet correspondant, exploitable
     par une machine, code qui doit tre distribu au titre des Sections
     1 et 2 ci-dessus sur un support couramment utilis pour l'change
     de logiciels ; ou bien b. Lui joindre une offre crite, dont la
     validit se prolonge pendant au moins 3 ans, de transmettre  un
     tiers quelconque, pour un montant non suprieur au cot pour le
     concessionnaire, de la ralisation physique de la distribution de
     la source, un exemplaire complet, exploitable par une machine, du
     code source correspondant, qui devra tre distribu au titre des
     dispositions des Sections 1 et 2 ci-dessus sur un support
     couramment utilis pour l'change des logiciels ; ou bien

     c. Lui joindre les informations que le concessionnaire a reues,
     pour proposer une distribution du code source correspondant (cette
     variante n'est autorise que pour la distribution non commerciale,
     et seulement si le concessionnaire a reu le programme sous forme
     excutable ou sous forme d'un code objet, avec une telle offre,
     conformment  l'alina b) ci-dessus).

     Le code source d'un ouvrage reprsente la forme prfre de
     l'ouvrage pour y effectuer des modifications. Pour un ouvrage
     excutable, le code source complet reprsente la totalit du code
     source pour tous les modules qu'il contient, plus tous fichiers de
     dfinitions d'interface associs, plus les informations en code
     machine pour commander la compilation et l'installation du
     programme excutable. Cependant,  titre d'exceptions spciales, le
     code source distribu n'a pas besoin de comprendre quoi que ce soit
     qui est normalement distribu (sous forme source ou sous forme
     binaire) avec les composants principaux (compilateur, noyau de
     systme d'exploitation, etc.) du systme d'exploitation sur lequel
     est excut le programme excutable,  moins que le composant, par
     lui-mme, ne soit joint au programme excutable.

     Si la distribution de l'excutable ou du code objet est ralise de
     telle sorte qu'elle offre d'accder  une copie  partir d'un lieu
     dsign, alors le fait d'offrir un accs quivalent  la
     duplication du code source  partir de ce mme lieu s'entend comme
     distribution du code source, mme si des tiers ne sont pas
     contraints de dupliquer la source en mme temps que le code objet.

    Le concessionnaire ne peut dupliquer, modifier, concder en sous-
     licence ou distribuer le programme, sauf si cela est expressment
     prvu par les dispositions de la prsente licence. Toute tentative
     pour autrement dupliquer, modifier, concder en sous-licence ou
     distribuer le programme est rpte nulle, et met automatiquement
     fin aux droits du concessionnaire au titre de la prsente licence.
     Cependant, les parties qui ont reu des copies, ou des droits, de
     la part du concessionnaire au titre de la prsente licence, ne
     verront pas expirer leur contrat de licence, tant que ces parties
     agissent d'une manire parfaitement conforme.


    Il n'est pas exig du concessionnaire qu'il accepte la prsente
     licence, car il ne l'a pas signe. Cependant, rien d'autre
     n'octroie au concessionnaire l'autorisation de modifier ou de
     distribuer le programme ou ses ouvrages drivs. Ces actions sont
     interdites par la loi si le concessionnaire n'accepte pas la
     prsente licence. En consquence, par le fait de modifier ou de
     distribuer le programme (ou un ouvrage quelconque se fondant sur le
     programme), le concessionnaire indique qu'il accepte la prsente
     licence, et qu'il a la volont de se conformer  toutes les clauses
     et dispositions concernant la duplication, la distribution ou la
     modification du programme ou d'ouvrages se fondant sur ce dernier.

    Chaque fois que le concessionnaire redistribue le programme (ou
     tout ouvrage se fondant sur le programme), le destinataire reoit
     automatiquement une licence de l'metteur initial de la licence,
     pour dupliquer, distribuer ou modifier le programme, sous rserve
     des prsentes clauses et dispositions. Le concessionnaire ne peut
     imposer aucune restriction plus pousse sur l'exercice, par le
     destinataire, des droits octroys au titre des prsentes. Le
     concessionnaire n'a pas pour responsabilit d'exiger que des tiers
     se conforment  la prsente licence.

    Si, en consquence d'une dcision de justice ou d'une allgation
     d'infraction au droit des brevets, ou pour toute autre raison (qui
     ne soit pas limite  des problmes de proprit industrielle), des
     conditions sont imposes au concessionnaire (par autorit de
     justice, par convention ou autrement), qui entrent en contradiction
     avec les dispositions de la prsente licence, elles n'exemptent pas
     le concessionnaire de respecter les dispositions de la prsente
     licence.  Si le concessionnaire ne peut procder  la distribution
     de faon  satisfaire simultanment  ces obligations au titre de
     la prsente licence et  toutes autres obligations pertinentes,
     alors, en consquence de ce qui prcde, le concessionnaire peut ne
     pas procder du tout  la distribution du programme. Par exemple,
     si une licence de brevet ne permettait pas une redistribution du
     programme, sans redevances, par tous ceux qui reoivent des copies
     directement ou indirectement par l'intermdiaire du
     concessionnaire, alors le seul moyen par lequel le concessionnaire
     pourrait satisfaire tant  cette licence de brevet qu' la prsente
     licence, consisterait  s'abstenir compltement de distribuer le
     programme.

     Si une partie quelconque de cette section est considre comme
     nulle ou non excutoire dans certaines circonstances particulires,
     le reste de cette section est rput s'appliquer, et la section
     dans son ensemble est considre comme s'appliquant dans les autres
     circonstances.

     La prsente section n'a pas pour objet de pousser le
     concessionnaire  enfreindre tous brevets ou autres revendications
     au droit de proprit, ou encore  contester la validit d'une ou
     de plusieurs, quelles qu'elles soient, de ces revendications ; la
     prsente section a pour objet unique de protger l'intgrit du
     systme de distribution des logiciels libres, systme qui est mis
     en oeuvre par les pratiques lies aux licences publiques. De
     nombreuses personnes ont apport une forte contribution  la gamme
     tendue des logiciels distribus par ce systme, en comptant sur
     l'application systmatique de ce systme ; c'est 
     l'auteur/donateur de dcider s'il a la volont de distribuer le
     logiciel par un quelconque autre systme, et un concessionnaire ne
     peut imposer ce choix.

     La prsente section veut rendre parfaitement clair ce que l'on
     pense tre une consquence du reste de la prsente licence.

    Si la distribution et/ou l'utilisation du Programme est restreinte
     dans certains pays, sous l'effet de brevets ou d'interfaces
     prsentant un droit d'auteur, le dtenteur du droit d'auteur
     original, qui soumet le Programme aux dispositions de la prsente
     licence, pourra ajouter une limitation expresse de distribution
     gographique excluant ces pays, de faon que la distribution ne
     soit autorise que dans les pays ou parmi les pays qui ne sont pas
     ainsi exclus. Dans ce cas, la limitation fait partie intgrante de
     la prsente licence, comme si elle tait crite dans le corps de la
     prsente licence.

     La Free Software Foundation peut, de temps  autre, publier des
     versions rvises et/ou nouvelles de la General Public License. Ces
     nouvelles versions seront analogues, du point de vue de leur
     esprit,  la prsente version, mais pourront en diffrer dans le
     dtail, pour rsoudre de nouveaux problmes ou de nouvelles
     situations.

     Chaque version reoit un numro de version qui lui est propre. Si
     le programme spcifie un numro de version de la prsente licence,
     qui s'applique  ce dernier et   toute autre version
     ultrieure , le concessionnaire a le choix de respecter les
     clauses et dispositions de cette version, ou une quelconque version
     ultrieure publie par la Free Software Foundation. Si le programme
     ne spcifie pas de numro de version de la prsente licence, le
     concessionnaire pourra choisir une version quelconque publie 
     tout moment par la Free Software Foundation.


    Si le concessionnaire souhaite incorporer des parties du programme
     dans d'autres programmes libres dont les conditions de distribution
     sont diffrentes, il devra crire  l'auteur pour demander son
     autorisation. Pour un logiciel soumis  droit d'auteur par la Free
     Software Foundation, il devra crire  la Free Software
     Foundation ; nous faisons quelquefois des exceptions  cette rgle.
     Notre dcision va tre guide par le double objectif de protger le
     statut libre de tous les drivs de nos logiciels libres, et de
     favoriser le partage et la rutilisation des logiciels en gnral.


     AABBSSEENNCCEE DDEE GGAARRAANNTTIIEE

    COMME LA LICENCE DU PROGRAMME EST CONCEDEE A TITRE GRATUIT, IL N'Y
     A AUCUNE GARANTIE S'APPLIQUANT AU PROGRAMME, DANS LA MESURE
     AUTORISEE PAR LA LOI EN VIGUEUR. SAUF MENTION CONTRAIRE ECRITE, LES
     DETENTEURS DU DROIT D'AUTEUR ET/OU LES AUTRES PARTIES METTENT LE
     PROGRAMME A DISPOSITON  EN L'ETAT , SANS AUCUNE GARANTIE DE
     QUELQUE NATURE QUE CE SOIT, EXPRESSE OU IMPLICITE, Y COMPRIS, MAIS
     SANS LIMITATION, LES GARANTIES IMPLICITES DE COMMERCIALISATION ET
     D'APTITUDE A UN OBJET PARTICULIER. C'EST LE CONCESSIONNAIRE QUI
     PREND LA TOTALITE DU RISQUE QUANT A LA QUALITE ET AUX PERFORMANCES
     DU PROGRAMME. SI LE PROGRAMME SE REVELAIT DEFECTUEUX, C'EST LE
     CONCESSIONNAIRE QUI PRENDRAIT A SA CHARGE LE COUT DE L'ENSEMBLE DES
     OPERATIONS NECESSAIRES D'ENTRETIEN, REPARATION OU CORRECTION.

    EN AUCUN CAS, SAUF SI LA LOI EN VIGUEUR L'EXIGE OU SI UNE
     CONVENTION ECRITE EXISTE A CE SUJET, AUCUN DETENTEUR DE DROITS
     D'AUTEUR, OU AUCUNE PARTIE AYANT LE POUVOIR DE MODIFIER ET/OU DE
     REDISTRIBUER LE PROGRAMME CONFORMEMENT AUX AUTORISATIONS CI-DESSUS,
     N'EST RESPONSABLE VIS-A-VIS DU CONCESSIONNAIRE POUR CE QUI EST DES
     DOMMAGES, Y COMPRIS TOUS DOMMAGES GENERAUX, SPECIAUX, ACCIDENTELS
     OU INDIRECTS, RESULTANT DE L'UTILISATION OU DU PROGRAMME OU DE
     L'IMPOSSIBILITE D'UTILISER LE PROGRAMME (Y COMPRIS, MAIS SANS
     LIMITATION, LA PERTE DE DONNEES, OU LE FAIT QUE DES DONNEES SONT
     RENDUES IMPRECISES, OU ENCORE LES PERTES EPROUVEES PAR LE
     CONCESSIONNAIRE OU PAR DES TIERS, OU ENCORE UN MANQUEMENT DU
     PROGRAMME A FONCTIONNER AVEC TOUS AUTRES PROGRAMMES), MEME SI CE
     DETENTEUR OU CETTE AUTRE PARTIE A ETE AVISE DE LA POSSIBILITE DE
     TELS DOMMAGES.

  FFIINN DDEESS CCOONNDDIITTIIOONNSS DD''EEXXPPLLOOIITTAATTIIOONN


  1100..33..  CCoommmmeenntt aapppplliiqquueerr cceess ddiissppoossiittiioonnss  vvooss nnoouuvveeaauuxx pprrooggrraammmmeess

  Si le concessionnaire dveloppe un nouveau programme, et s'il en
  souhaite l'utilisation la plus large possible dans le public, le
  meilleur moyen d'y arriver est d'en faire un logiciel libre, que tout
  le monde pourra redistribuer et modifier au titre des prsentes
  dispositions.

  Dans ce but, il convient de rattacher au programme les avis suivants.
  Le moyen le plus sr consiste  les rattacher au dbut de chaque
  fichier source, pour avertir le plus efficacement possible de
  l'exclusion de garantie ; et chaque fichier doit comporter au moins la
  ligne  copyright , et un pointeur indiquant o est localise la
  totalit de l'avis.


  Une ligne pour donner le nom du programme et une ide de ce qu'il
  fait.

  Copyright (C) 19yy nom de l'auteur

  Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le
  modifier conformment aux dispositions de la Licence Publique Gnrale GNU,
  telle que publie par la Free Software Foundation ; version 2 de la licence,
  ou encore ( votre choix) toute version ultrieure.

  Ce programme est distribu dans l'espoir qu'il sera utile, mais SANS AUCUNE
  GARANTIE ; sans mme la garantie implicite de COMMERCIALISATION ou
  D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de dtail, voir la Licence
  Publique Gnrale GNU .

  Vous devez avoir reu un exemplaire de la Licence Publique Gnrale GNU en
  mme temps que ce programme ; si ce n'est pas le cas, crivez  la Free
  Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-Unis.



  Ajoutez aussi des informations sur le moyen permettant d'entrer en
  contact avec vous par courrier lectronique (e-mail) et courrier
  normal.

  Si le programme est interactif, prvoyez en sortie un court avis, tel
  que celui qui est prsent ci-dessous, lors du dmarrage en mode
  interactif.


  Gnomovision est livr absolument SANS AUCUNE GARANTIE ; pour plus de dtails,
  tapez "show w". Il s'agit d'un logiciel libre, et vous avez le droit de le
  redistribuer dans certaines conditions ; pour plus de dtail, tapez "show
  c".



  Les instructions hypothtiques show w et show c doivent prsenter les
  parties appropries de la Licence Publique Gnrale. Bien videmment,
  les instructions que vous utilisez peuvent porter d'autres noms que
  show w et show c ; elles peuvent mme correspondre  des clics de
  souris ou  des lments d'un menu, selon ce qui convient  votre
  programme.

  Si ncessaire, vous devrez aussi demander  votre employeur (si vous
  travaillez en tant que programmeur) ou  votre ventuelle cole ou
  universit, de signer une  renonciation  droit d'auteur  concernant
  le programme. En voici un chantillon (il suffit de modifier les
  noms) :


  Yoyodyne, Inc., par la prsente, renonce  tout intrt de droits d'auteur
  dans le programme "Gnomovision" (qui fait des passages au niveau des
  compilateurs) crit par James Hacker.

  Signature de Ty Coon, 1er avril 1989

  Ty Coon, President of Vice



  La prsente Licence Publique Gnrale n'autorise pas le
  concessionnaire  incorporer son programme dans des programmes
  propritaires. Si votre programme est une bibliothque de sous-
  programmes, vous pouvez considrer comme plus intressant d'autoriser
  une dition de liens des applications propritaires avec la
  bibliothque. Si c'est ce que vous souhaitez, vous devrez utiliser non
  pas la prsente licence, mais la Licence Publique Gnrale pour
  Bibliothques GNU.




























































  HOWTO Terminal Texte pour Linux
  David S. Lawyer  <mailto:bf347@lafn.org>, traduit par
  Olivier Tharan,  <mailto:olive@laria.u-picardie.fr>
  v1.06, juin 1999

  Ce document explique ce que sont les terminaux en mode texte, comment
  ils fonctionnent, comment les installer et les configurer, et fournit
  des informations sur la manire de les rparer. Cela peut tre utile
  mme si vous n'avez pas le manuel du terminal. Bien qu'il soit crit
  pour de vrais terminaux relis  un systme Linux, certaines informa
  tions de ce manuel sont applicables  l'mulation de terminal et peu
  vent tre utiles pour des systmes diffrents de Linux.
  ______________________________________________________________________

  Table des matires



















































  1. Introduction

     1.1 Copyright, marques dposes, avertissement et crdits
        1.1.1 Copyright
        1.1.2 Marques dposes
        1.1.3 Avertissement
        1.1.4 Crdits
     1.2 Plans pour l'avenir : vous pouvez m'aider
     1.3 Nouvelles versions de ce HOWTO
     1.4 HOWTOs connexes
     1.5 Terminologie utilise dans ce document
     1.6 Qu'est-ce qu'un terminal ?

  2. Types de terminaux

     2.1 Terminaux passifs
     2.2 Terminaux texte
     2.3 Terminaux graphiques
        2.3.1 Terminaux graphiques sur ligne srie
        2.3.2 Terminaux graphiques rapides (d'autres noms leur sont souvent donns)
     2.4 Quasi-terminaux (= Quasi-ordinateurs)
     2.5 mulation sur un PC

  3. Installation rapide

  4. Pourquoi utiliser un terminal ?

     4.1 Introduction sur le fait d'utiliser un terminal
     4.2 Une rduction du cot du matriel ?
     4.3 Contrle des logiciels
     4.4 Mises  jour du matriel
     4.5 Autres avantages des terminaux
     4.6 Dsavantages majeurs des terminaux
     4.7 Les terminaux texte sont-ils obsoltes ?

  5. Vue d'ensemble du fonctionnement des terminaux (sous Linux)

     5.1 Noms de priphriques
     5.2 Se logger / se dlogger
     5.3 Half/Full Duplex
     5.4 Mmoire du terminal
     5.5 Commandes pour le terminal
     5.6 Manque de normalisation rsolu par Terminfo
     5.7 L'interface
     5.8 mulation
     5.9 La console

  6. Fichiers spciaux pour les terminaux tels que /dev/tty

     6.1 Terminaux sur port srie
     6.2 Pseudo-terminaux
     6.3 Le terminal contrlant /dev/tty
     6.4 "Terminaux" /dev/ttyIN
     6.5 La console : /dev/ttyN
     6.6 Crer un priphrique avec "mknod"

  7. Quelques dtails sur le fonctionnement des terminaux

     7.1 Mmoire du terminal
     7.2 Les premiers terminaux
     7.3 Squences d'chappement et codes de contrle (introduction)
        7.3.1 Codes de contrle
        7.3.2 Squences d'chappement
     7.4 Attributs d'affichage et cookies magiques

  8. Possibilits spciales de certains terminaux
     8.1 Couleur
     8.2 Sessions multiples
     8.3 Port imprimante/auxiliaire
     8.4 Pages
     8.5 Jeux de caractres
     8.6 Polices
     8.7 Claviers et touches spciales

  9. mulation de terminal ; la console

     9.1 mulation de terminal
        9.1.1 Introduction  l'mulation de terminal
        9.1.2 N'utilisez pas TERM pour l'mulation
        9.1.3 Programmes de communications (appels tlphoniques)
        9.1.4 mulation sous X Window
        9.1.5 Les vrais terminaux sont mieux
     9.2 Tester l'mulation du terminal
     9.3 La console Linux

  10. Contrle de flux (prise de contact)

     10.1 Pourquoi le contrle de flux est-il ncessaire ?
     10.2 Remplissage
     10.3 Dbordement d'un port srie
     10.4 Arrt de l'envoi
     10.5 Blocage du clavier
     10.6 Reprendre l'envoi
     10.7 Contrle de flux matriel (RTS/CTS, etc.)
        10.7.1 Contrle de flux RTS/CTS, DTR et DTR/DSR
        10.7.2 Etablir une connexion avec le contrle de flux DTR ou DTR/DSR
        10.7.3 L'ancienne prise de contact RTS/CTS est diffrente
        10.7.4 Canal invers
     10.8 Est-ce que le contrle de flux matriel est fait par le matriel ?
     10.9 Obsolte ?? Contrle de flux ETX/ACK ou ENQ/ACK

  11. Connexion physique

     11.1 Cartes d'entres/sorties multiports (adaptateurs)
     11.2 Connexion directe par cble
        11.2.1 Schma de brochage des cbles null modem (3, 4 ou 5 conducteurs)
        11.2.2 Brochage d'un cble null modem standard (7 connecteurs)
        11.2.3 Limitations de longueur
        11.2.4 Cbles pour le contrle de flux matriel
        11.2.5 Astuces sur les cbles
        11.2.6 Une bidouille qui utilise un cble en paire torsade
        11.2.7 Mise  la terre du cble
     11.3 Connexion sur un modem
        11.3.1 Appeler  l'extrieur  partir d'un terminal
        11.3.2 On peut appeler un terminal
     11.4 Connexion  un serveur de terminaux
     11.5 Types de connecteurs et d'adaptateurs
        11.5.1 Sexe des connecteurs / adaptateurs
        11.5.2 Types d'adaptateurs
        11.5.3 Connecteurs DB
        11.5.4 Connecteurs modulaires RJ
     11.6 Fabriquer ou modifier un cble
        11.6.1 Acheter ou fabriquer ?
        11.6.2 Numros de broches
        11.6.3 Installer des connecteurs DB sur les extrmits des cbles
        11.6.4 Installer des connecteurs RJ

  12. Mise en place (configuration) en gnral

     12.1 Introduction  la configuration
     12.2 Vue d'ensemble de la mise en place (configuration) du terminal
     12.3 Vue d'ensemble de la mise en place (configuration) de l'ordinateur
     12.4 Beaucoup d'options
     12.5 Options de l'interface de communication
        12.5.1 Vitesse
        12.5.2 Parit et devriez-vous l'utiliser ?
        12.5.3 Bits/caractre
        12.5.4 Quel contrle de flux (prise de contact) ?
        12.5.5 Slection du port
     12.6 Essai rapide

  13. Dtails de la mise en place (configuration) du terminal

     13.1 Envoyer des squences d'chappement au terminal
     13.2 Configuration des vieux terminaux
     13.3 Entrer dans le mode de configuration
     13.4 Options de communication
     13.5 Sauver la configuration
     13.6 Paramtres/options de configuration
     13.7 mulation {Personnalit} {{Modes de terminaux}}
     13.8 Options d'affichage
        13.8.1 Taille de cellule de caractre{Char Cell}
        13.8.2 Colonnes / lignes
        13.8.3 Curseur
        13.8.4 Attributs d'affichage (cookies magiques)
        13.8.5 Caractres de contrle d'affichage {Monitor}
        13.8.6 Largeur/hauteur double
        13.8.7 Vido inverse {Display} (Fond clair/fonc)
        13.8.8 Ligne d'tat
        13.8.9 Pendant le changement 80/132 : effacer ou prserver ?
     13.9 Options lies aux pages
        13.9.1 Taille de la page
        13.9.2 Couplage (du curseur et de l'affichage)
     13.10 Faire un rapport et rpondre
        13.10.1 Message de rponse (chane)
        13.10.2 Rponse automatique
        13.10.3 Rponse cache
        13.10.4 Numro ID du terminal {ANSI ID}
     13.11 Options du clavier
        13.11.1 Clic de touche
        13.11.2 Verrouillage majuscule {Keylock}
        13.11.3 Rptition automatique {Repeat}
        13.11.4 Sonnette de marge
        13.11.5 Redfinir les touches
        13.11.6 Touche de coin (uniquement pour les Wyse)
        13.11.7 Envois grce au pav numrique ou aux touches flches
        13.11.8 Qu'envoient les touches Shift+Del et Shift+Backspace ?
        13.11.9 Codes de balayage PC
        13.11.10 Caractres alterns
     13.12 Signification des codes de contrle reus
        13.12.1 Nouvelle ligne automatique {Newline}
        13.12.2 Saut de ligne automatique {Rcv CR}
        13.12.3 Reconnatre DEL (seulement pour Wyse ??) ou NULL
     13.13 O va le nouveau texte
        13.13.1 Passage  la ligne
        13.13.2 Dfilement
        13.13.3 Nouvelle page ?
     13.14 Touches de fonction
     13.15 Options en mode par blocs
        13.15.1 Affichage de formulaires
        13.15.2 Envoi par blocs
        13.15.3 Partie  envoyer
        13.15.4 Dlimiteur de bloc / de page
     13.16 Blocages
     13.17 conomiseur d'cran {Scrn Saver}
     13.18 Imprimante

  14. Dtails de la configuration de l'ordinateur
     14.1 Getty (dans /etc/inittab)
        14.1.1 Agetty (peut s'appeler getty)
        14.1.2 getty (fait partie de getty_ps)
        14.1.3 Mgetty
     14.2 Stty et Setserial
        14.2.1 Setserial
        14.2.2 O lancer setserial ?
        14.2.3 Stty
        14.2.4 O mettre la commande stty ?
     14.3 Terminfo et Termcap (bref)
     14.4 Positionner TERM et TERMINFO
     14.5 Fichier /etc/ttytype rarement ncessaire
     14.6 Restrictions sur les logins
     14.7 Lancer des commandes uniquement si TERM=mon_terminal
        14.7.1 Exemple pour la fonction ls

  15. Terminfo et Termcap (en dtails)

     15.1 Introduction  Terminfo
     15.2 Base de donnes terminfo
        15.2.1 Compilateur terminfo (tic)
        15.2.2 Regardez votre terminfo
        15.2.3 Effacer des donnes non ncessaires
     15.3 Modification des fichiers terminfo
     15.4 Chane d'initialisation
     15.5 Variable TERM
     15.6 Documents sur terminfo/termcap

  16. Utilisation du terminal

     16.1 Introduction  l'utilisation du terminal
     16.2 Dmarrer le terminal
     16.3 Pilote de priphrique (srie) du terminal
     16.4 Problmes avec les diteurs
        16.4.1 Emacs et ^Q
        16.4.2 Vi et les touches curseur
     16.5 Corruption du ls en couleur
     16.6 L'affichage se bloque (terminal bloqu)
     16.7 Interface du terminal corrompue
        16.7.1 Symptmes
        16.7.2 Envoyer des donnes binaires au terminal
        16.7.3 Terminer un programme de faon anormale
     16.8 Caractres (de contrle) spciaux
        16.8.1 dition de la ligne de commande
        16.8.2 Interruption (et Quit, Suspend, EOF, Flush)
        16.8.3 Arrt et reprise du dfilement
        16.8.4 Prendre littralement en compte le caractre suivant
     16.9 Visualiser des fichiers Latin-1 sur un terminal 7 bits
     16.10 Inspection de l'interface
     16.11 Modifier les paramtres du terminal
        16.11.1 setterm
        16.11.2 tput
        16.11.3 echo
        16.11.4 Sauver les modifications
     16.12 Faire d'un terminal une console
        16.12.1 Pour les noyaux 2.2 et suprieurs
        16.12.2 Pour les noyaux antrieurs  2.2
        16.12.3 Puis-je lancer Linux sans moniteur (console PC) ?
     16.13 Sessions multiples
     16.14 Se dlogger
     16.15 Discuter entre terminaux, espionner

  17. Rsoudre les problmes (logiciels)

     17.1 Le terminal fonctionnait correctement
     17.2 Terminal nouvellement install
     17.3 Est-ce que le terminal va bien ?
     17.4 Texte manquant
     17.5 Getty se relance trop rapidement
        17.5.1 Pas de tension de contrle du modem
        17.5.2 Touche enfonce
     17.6 chec aprs le login
     17.7 Impossible de se logger
     17.8 Invite de login embrouille
     17.9 Aucun signe d'une quelconque invite de login
        17.9.1 Diagnostiquer les problmes  partir de la console
        17.9.2 Mesure des tensions
     17.10 Surveillance et diagnostics du port srie
     17.11 Mode local
     17.12 quipement de test lectrique pour le port srie
        17.12.1 Gadgets d'vasion etc.
        17.12.2 Mesurer des tensions
        17.12.3 Goter la tension

  18. Rparations et diagnostics

     18.1 Livres et sites Web sur la rparation
        18.1.1 Livres
        18.1.2 Sites Web
     18.2 Scurit
     18.3 Apparence de l'affichage
     18.4 Diagnostiquer
        18.4.1 Le terminal a mis un bruit
        18.4.2 Le terminal n'a mis aucun bruit
     18.5 Messages d'erreur  l'cran
        18.5.1 Erreur de clavier
        18.5.2 Erreur de somme de contrle en NVR
     18.6 Capacits
     18.7 Claviers
        18.7.1 Interchangeabilit
        18.7.2 Comment ils fonctionnent
        18.7.3 L'appui sur une touche affiche deux caractres diffrents
        18.7.4 Claviers modernes contre anciens
        18.7.5 Le clavier ne fonctionne pas du tout
        18.7.6 L'appui sur b affiche bb, etc. (affichage en double)
        18.7.7 Le clavier tape tout seul
        18.7.8 Liquide vers sur le clavier
        18.7.9 Nettoyage des contacts du clavier
           18.7.9.1 Claviers avec membrane
           18.7.9.2 Claviers avec contacts individuels

  19. Annexe A : gnralits

     19.1 Liste des commandes Linux pour les terminaux
        19.1.1 Envoyer une commande  un terminal
        19.1.2 Configuration du pilote de priphriques pour les terminaux
        19.1.3 Terminfo
        19.1.4 Autres
     19.2 Internet et les livres
        19.2.1 Information sur le terminal sur l'Internet
        19.2.2 Livres lis aux terminaux
        19.2.3 Livres consacrs entirement aux terminaux
        19.2.4 Livres possdant des chapitres sur les terminaux
     19.3 Systmes non Linux

  20. Annexe B : terminologie des commandes de squences d'chappement

     20.1 Liste de squences d'chappement
     20.2 Codes de contrle 8 bits
     20.3 chappement pour l'imprimante
     20.4 Rapports
     20.5 Mouvements du curseur
     20.6 Pages (dfinition)

  21. Annexe C : communications srie sur EIA-232 (RS-232)

     21.1 Introduction aux communications srie
     21.2 Tensions
        21.2.1 Tension pour un bit
        21.2.2 Squence de tension pour un octet
     21.3 La parit explique
     21.4 Formation d'un octet (encadrement)
     21.5 Limitations de EIA-232
        21.5.1 Basses vitesses et courtes distances
        21.5.2 Successeurs de EIA-232
        21.5.3 Pilotes de lignes
     21.6 Synchronisation et synchrone
        21.6.1 Comment on synchronise l'"asynchrone"
        21.6.2 Dfinir l'asynchrone par rapport au synchrone
        21.6.3 Communication synchrone
     21.7 Mode par blocs
        21.7.1 Introduction au mode par blocs
        21.7.2 Types de modes par blocs, formulaires
        21.7.3 Efficacit
     21.8 Livres sur EIA-232 (RS-232)
     21.9 Logiciels srie

  22. Annexe D : Notes classes par marque

     22.1 CIT
     22.2 Terminaux IBM
        22.2.1 IBM 3153
     22.3 Teletypes
     22.4 VT (DEC)
     22.5 Wyse
        22.5.1 Wyse 99-GT
        22.5.2 Wyse 150


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Pour tenter d'installer un terminal rapidement, voyez ``installation
  rapide''.


  11..11..  CCooppyyrriigghhtt,, mmaarrqquueess ddppoosseess,, aavveerrttiisssseemmeenntt eett ccrrddiittss



  11..11..11..  CCooppyyrriigghhtt


  Copyright 1998 par David S. Lawyer. Veuillez copier et distribuer
  librement ce document (par la vente ou le don). Les travaux drivs
  sont permis  la condition que vous : 1. fassiez un effort de bonne
  foi pour vous assurer qu'une copie (ou mme le document matre) soit
  sur Internet sur un site appropri au tlchargement gratuit.  2.
  donniez une licence au travail dans l'esprit de cette licence, ou que
  vous utilisiez la GPL (Free Software Foundation) 3. fassiez un effort
  de bonne foi pour contacter le mainteneur (ou les tenants majoritaires
  du copyright s'il n'y a pas de mainteneur) pour leur faire savoir ce
  que vous avez fait. Si les changements sont nombreux, vous devriez
  alors tenter de prendre plus de contacts ds le dpart et si possible
  pendant votre projet.  4. donniez un crdit total aux prcdent
  auteurs et contributeurs majeurs bien que la section sur les crdits
  ne doive pas excder 1% de la longueur du document.
  11..11..22..  MMaarrqquueess ddppoosseess


  Si certains mots reprsentent des marques dposes, le contexte
  devrait indiquer clairement  qui elles appartiennent. Par exemple,
  "MS Windows NT" implique que "Windows NT" appartient  Microsoft (MS).
  Mac est fabriqu par Apple Computer. Les marques dposes
  appartiennent  leurs propritaires respectifs.


  11..11..33..  AAvveerrttiisssseemmeenntt


  La plupart des informations de ce HOWTO ont t obtenues sur Internet,
  dans des vieux manuels, etc. et peuvent ne pas tre sres (bien que
  j'aie fait des recoupements dans certains cas). Bien que je n'ai pas
  tent de vous induire sciemment en erreur, il y a srement un certain
  nombre d'erreurs dans ce document. Veuillez me les signaler. Puisque
  c'est une documentation libre, il devrait tre vident que je ne peux
  pas tre tenu lgalement responsable des erreurs commises.


  11..11..44..  CCrrddiittss


  La majeure partie de la section "Connexion physique" provient du Howto
  Serial v. 1.11 de Greg Hankins. Sa partie : "Comment configurer un
  terminal connect  mon PC ?" a t incorpore dans la version 1.00 en
  des endroits varis. Les portions non incluses traitaient de thmes
  dj couverts dans ma version prcdente, v0.05.

  Pour la traduction en franais, j'aimerais remercier Xavier Glattard,
  qui a entrepris le dbut de la traduction et que j'ai reprise en cours
  ; ainsi que Guillaume Allgre et Jean-Luc Cassel qui ont fait un
  norme travail de relecture.


  11..22..  PPllaannss ppoouurr ll''aavveenniirr :: vvoouuss ppoouuvveezz mm''aaiiddeerr


  Veuillez me signaler toute erreur dans les faits, les opinions, la
  logique, l'orthographe, la grammaire, la clart, les liens, etc. Mais
  d'abord, si la date est vieille de plus de quelques mois, vrifiez que
  vous avez la dernire version. Veuillez m'envoyer toutes les
  informations que vous pensez tre pertinentes pour ce document. [ NdT
  : cela s'applique aussi pour la version franaise ! ]

   partir de la version 1.00, j'ai tent pour la premire fois d'aider
  les gens  configurer des terminaux sans recourir  un manuel de
  terminal. Il en faudrait bien plus  cet gard. Une manire de
  rsoudre ce problme serait que les fabricants de terminaux mettent
  leurs manuels sur Internet. Je vous suggre de les encourager  le
  faire. Fournir des informations sur la configuration de la plupart des
  terminaux dans ce HOWTO est une tche dcourageante. Il y a beaucoup
  de terminaux diffrents, mais il y a bien moins de modles qu'il n'y
  en avait dans les annes 1980, la tche n'est donc pas totalement
  impossible  raliser.

  Veuillez m'envoyer tous les manuels de terminaux que vous pourriez
  avoir en trop, surtout sur les terminaux fabriqus dans les dix
  dernires annes (mais j'accepterai aussi les manuels plus anciens).
  De plus, vous pourriez crire quelque chose sur un certain type de
  terminal pour l'annexe D : Notes par nom de marque. Mon adresse
  lectronique en 1998 est  <mailto:bf347@lafn.org>.


  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee HHOOWWTTOO


  Les nouvelles versions du HOWTO seront disponibles  la navigation
  Internet et au tlchargement sur les sites miroirs du LDP (Linux
  Documentation Project). Voyez
  <http://metalab.unc.edu/LDP/mirrors.html> pour avoir une liste de ces
  miroirs. Divers formats sont disponibles. Si vous voulez chercher
  rapidement la date de la dernire version, allez 
  <http://metalab.unc.edu/LDP/HOWTO/Text-Terminal-HOWTO.html>. (NdT : le
  miroir officiel en France est  <http://www.traduc.org/HOWTO/Text-
  Terminal-HOWTO.html>.)


  11..44..  HHOOWWTTOOss ccoonnnneexxeess



    Le HOWTO Serial possde des informations sur les cartes srie
     multiports utilises  la fois pour les terminaux et les racks de
     modems. Il possde des informations techniques sur le port srie.
     Les informations sur les terminaux texte seront enleves.

    Le HOWTO Modem

    Le HOWTO Serial-Programming

    Le HOWTO Xterminal (non maintenu). Il se trouve 
     <http://metalab.unc.edu/pub/Linux/docs/HOWTO/unmaintained/mini/Xterminal>


  11..55..  TTeerrmmiinnoollooggiiee uuttiilliissee ddaannss ccee ddooccuummeenntt


  Configuration veut dire la mme chose que mise en place (NdT : j'ai
  utilis le mot "configuration" tout au long du document). Alors que
  les commandes Linux possdent des options (avec le symbole -), les
  options dans un sens plus vaste sont d'autres types de choix.
  L'installation au sens large comprend la configuration du matriel et
  du logiciel. Une affirmation que je pense tre vraie (mais qui peut ne
  pas l'tre) se termine par deux points d'interrogation : ?? Si vous
  tes sr de l'affirmation, dites-le moi.


  11..66..  QQuu''eesstt--ccee qquu''uunn tteerrmmiinnaall ??


  Un terminal consiste en un cran et un clavier qu'on utilise pour
  communiquer  distance avec un ordinateur (hte). On l'utilise comme
  s'il s'agissait d'un ordinateur personnel mais le terminal est loign
  de l'ordinateur hte ( l'autre bout de la pice ou mme  l'autre
  bout du monde). Les programmes s'excutent sur l'ordinateur hte mais
  les rsultats s'affichent sur l'cran du terminal. Sa capacit de
  calcul est relativement faible (sinon ce serait un ordinateur et non
  un terminal). Cette capacit de calcul est en gnral limite  la
  capacit d'afficher ce qu'on lui envoie (il est possible que ceci
  comprenne des graphiques plein cran) et la capacit d'envoyer 
  l'hte ce qui est tap au clavier.

  Dans les temps loigns des gros ordinateurs, du milieu des annes
  1970 au milieu des annes 1980, la plupart des gens utilisaient des
  terminaux pour communiquer avec les ordinateurs. Ils y tapaient des
  programmes, les faisaient tourner, crivaient des documents,
  envoyaient des commandes d'impression, etc. Un cble reliait le
  terminal  l'ordinateur (souvent de manire indirecte). On l'appelait
  terminal puisqu'il tait situ  une extrmit terminale de ce cble.
  Si vous utilisez Linux (sauf pour une utilisation avec X Window) avec
  un moniteur et un clavier vous savez dj ce qu'est un terminal parce
  que vous en utilisez un (ou plus prcisment un "terminal virtuel").
  Le moniteur (avec le clavier) s'appelle console, mais il mule un
  terminal. Dans X Window : xterm, rxvt et zterm mulent des terminaux.

  Un vrai terminal est diffrent d'un moniteur parce que c'est un
  montage lectronique diffrent. Un terminal texte est souvent reli au
  port srie de l'ordinateur par l'intermdiaire d'un long cble. Ainsi,
  contrairement  un moniteur qui est le plus souvent situ juste  ct
  de l'ordinateur, un terminal peut se situer  une distance assez
  grande de son ordinateur hte.  La carte vido  l'intrieur d'un
  ordinateur stocke l'image vido qui apparat sur l'cran du moniteur.
  Pour un terminal, l'quivalent de cette carte vido est construite 
  l'intrieur mme du terminal mais puisque les terminaux texte sont
  souvent monochromes sans beaucoup de graphiques, les capacits de
  cette "carte vido" sont plutt faibles. De plus, la plupart des
  terminaux texte n'ont pas de souris.

  Dans la terminologie client-serveur en rseau, on pourrait penser que
  le terminal est le client et l'ordinateur hte le serveur. Certains
  ont appel le terminal un "client lger". Ceci n'est pas vraiment
  correct puisque le seul "service" fourni par l'hte est de recevoir
  chaque lettre tape au clavier et de ragir  ceci comme un ordinateur
  le ferait. Le terminal ressemble  une fentre donnant sur
  l'ordinateur comme l'est un moniteur (et son clavier).  Vous avez
  srement dj utilis des terminaux virtuels dans Linux (en pressant
  Alt-F2, etc.). Un vrai terminal est la mme chose que lancer un
  terminal virtuel sur son propre cran et clavier. Par rapport 
  l'utilisation d'un terminal virtuel sur la console (moniteur), ceci
  permet  une autre personne de s'asseoir devant le terminal rel et
  d'utiliser l'ordinateur en mme temps que d'autres personnes.


  22..  TTyyppeess ddee tteerrmmiinnaauuxx



  22..11..  TTeerrmmiinnaauuxx ppaassssiiffss


  Il y a plusieurs dfinitions contradictoires pour un "terminal passif"
  mais  mesure que le temps passe, de plus en plus de terminaux sont
  appels passifs.  Ce document couvre principalement les terminaux
  texte qui n'affichent que du texte  l'cran. On pourrait l'appeler
  "HOWTO Terminaux Passifs" mais dans certains articles de magazine,
  tout terminal, quelle que soit son intelligence, mme ceux qui
  prsentent une interface graphique complte (GUI), sont appels
  passifs. Si tous les terminaux sont "passifs" il n'y a plus de raison
  d'ajouter le mot "passif" derrire le mot terminal (sauf dans un
  baratin commercial pour vendre des ordinateurs ou similaires en tant
  que terminaux "intelligents").  cause de la signification ambigu de
  "terminal passif", ce n'est pas considr ici comme un type de
  terminal.


  22..22..  TTeerrmmiinnaauuxx tteexxttee


  Pour un terminal texte, un flux d'informations  double sens entre
  l'ordinateur et le terminal se forme sur le cble les reliant tous les
  deux.  Ce flux est constitu d'octets ASCII o chaque octet reprsente
  gnralement un caractre.  Les octets taps au clavier vont vers
  l'ordinateur et la plupart des octets venant de l'ordinateur sont
  affichs sur l'cran du terminal. Des octets spciaux (ou des
  squences d'octets) de l'ordinateur indiquent au terminal o dplacer
  le curseur, ce qu'il faut effacer, o dmarrer et arrter le
  soulignement et/ou le clignotement et/ou le gras, etc.  Il y a souvent
  des centaines de commandes spciales et beaucoup de terminaux peuvent
  mme changer leur police.

  La communication utilise des caractres (lettres) encodes avec un
  tableau de codes correspondant au jeu de caractres en cours
  d'utilisation. En gnral, les 128 premiers octets sur les 256 octets
  possibles utilisent les codes ASCII. Les terminaux pour des systmes
  de type Unix sont normalement connects aux ordinateurs par un cble
  qui se droule entre les ports srie asynchrones (RS-232-C =
  EIA-232-D) de l'ordinateur hte et du terminal.  Quelquefois la
  connexion se fait par modem ou grce  un serveur de terminaux, etc.

  D'autres noms pour les terminaux texte sont "terminal srie",
  "terminal  cellule de caractre", "terminal ASCII/ANSI", "terminal
  asynchrone", "terminal de donnes", "terminal vido" et "terminal
  d'affichage vido" (VDT). Dans les jours anciens, "unit d'affichage
  vido" (VDU) tait utilis pour les terminaux mais en toute rigueur,
  ceci exclut le clavier.

  Le "mode par blocs" tait exclusivement utilis par les vieux
  terminaux des minis IBM mais beaucoup de terminaux modernes possdent
  aussi cette capacit (qui n'est pas beaucoup utilise). Les caractres
  que vous tapez sont retenus temporairement dans la mmoire du terminal
  (et peuvent parfois tre dits grce  un diteur rsidant dans le
  terminal). Alors quand la touche envoi (ou autre) est presse, un bloc
  de caractres (parfois juste une ligne de caractres) est envoy tout
  d'un coup  l'ordinateur. Le mode par blocs ( la fin 1998) n'est pas
  support par Linux. Le mode par blocs fait du terminal un priphrique
  bloc (et non un priphrique caractre). Voyez la section ``mode par
  blocs''.


  22..33..  TTeerrmmiinnaauuxx ggrraapphhiiqquueess


  Jusqu' un certain degr certains symboles ASCII peuvent fournir du
  graphisme aux terminaux texte. On peut faire des flches <--- et
  dessiner des botes avec _ et |. Avec des ensembles spciaux de
  caractres graphiques, on peut en faire encore plus. Aucun de ceux-ci
  ne sont vraiment des terminaux graphiques.  Cependant, le terme
  "terminal graphique" est quelquefois donn  tous les terminaux texte
  puisque le texte est une forme limite de graphique.

  Il y a deux types de base pour l'affichage graphique : rastris et
  vectoris (rarement utilis). Les graphiques rastriss (en mode point
  par point) affichent des points sur l'cran sur des lignes de balayage
  horizontal par l'intermdiaire d'un faisceau d'lectrons (ou en
  activant des pixels ou points sur un cran plat). Les affichages 
  graphisme vectoriel utilisent une lectronique intelligente pour
  tracer des lignes et des courbes avec un faisceau d'lectrons qui peut
  se dplacer dans n'importe quelle direction.  Les graphiques
  vectoriels affichent des lignes de grande qualit sans zigzags mais
  sont  la fois rares et chers. Les graphiques rastriss sont utiliss
  de manire quasi-universelle de nos jours. Pour les PC, les images
  codes en format graphique vectoriel sont quelquefois utilises mais
  sont traduites en format graphique rastris pour l'affichage (avec
  une baisse de qualit pour l'image).


  22..33..11..  TTeerrmmiinnaauuxx ggrraapphhiiqquueess ssuurr lliiggnnee ssrriiee


  La plus grande partie de ce document s'applique aussi  ceux-ci. La
  plupart de ceux-ci peuvent aussi fonctionner comme des terminaux
  texte. Les protocoles pour de tels terminaux graphiques sont :
  Tektronix Vector Graphics, ReGIS (DEC), Sixel (DEC) et NAPLPS (North
  American Presentation Level Protocol Syntax, syntaxe de protocole au
  niveau prsentation d'Amrique du Nord).


  22..33..22..  TTeerrmmiinnaauuxx ggrraapphhiiqquueess rraappiiddeess ((dd''aauuttrreess nnoommss lleeuurr ssoonntt ssoouuvveenntt
  ddoonnnnss))


  Ceux-ci ne sont pas couverts par ce document. Un terminal qui mrite
  qu'on l'appelle intelligent est un terminal graphique qui peut
  afficher rapidement des graphiques plein cran comme un moniteur de
  PC. Il aura aussi une souris.  Les octets qu'on lui envoie
  reprsentent souvent des bits pour des images (et souvent des
  graphiques). Il utilisera souvent une connexion  grande vitesse vers
  l'ordinateur en utilisant de la paire torsade ou un cble coaxial.
  Les terminaux X Window font partie de ces modles. Voyez le lien vers
  le HOWTO XTerminal rfrenc en ``HOWTOs connexes''

  Pour afficher une interface graphique MS-Windows il y a plusieurs
  types d'interfaces et de terminaux : WinTerm en est un, il utilise le
  logiciel WinFrame de Citrix. Un autre est Hydra de Microsoft (nom de
  code), bas en partie sur le code de Citrix, aussi connu comme
  "Serveur de Terminal Windows" qui fonctionne avec la version 4 ou
  suprieure de Windows NT. Citrix utilise son protocole ICA et a cr
  un supplment  Hydra nomm pICAsso pour que les terminaux WinFrame
  (ICA) puissent utiliser le systme ICA. Hydra est aussi multi-
  utilisateurs. Il y a aussi le "Terminal Personnel Multiconsole" de
  Unbounded Technologies et Tektronix possdait son interface multi-
  utilisateurs mais supportera dsormais Hydra. Un article de magazine
  en 1997 a appel Winterm un "terminal passif" mais il est vraiment
  intelligent.  De tels terminaux sont souvent appels "clients lgers",
  mais certains clients lgers sont plus que de simples terminaux
  puisqu'on peut leur faire excuter du code Java, etc.


  22..44..  QQuuaassii--tteerrmmiinnaauuxx ((== QQuuaassii--oorrddiinnaatteeuurrss))


  Le mot "Quasi" vient de moi (ce n'est pas standard). Ce ne sont ni de
  vrais ordinateurs ni des terminaux mais quelque chose entre les deux.
  Les Network Computers (NC) sont des ordinateurs avec un processeur
  mais pas de disque dur.  Ils sont entirement graphiques et se
  connectent  un ordinateur serveur. Ils sont diffrents des terminaux
  puisque le programme qu'ils font tourner s'excute sur leur propre
  processeur. Du code Java peut leur tre envoy pour tre excut. Ils
  devraient fonctionner sur des rseaux IP et pourraient fonctionner
  avec un serveur sous Linux. Wintel a fabriqu un "NetPC" qui,  la
  diffrence du NC, est presque un ordinateur PC. Cependant, il n'a pas
  de disque amovible et les utilisateurs ne peuvent pas installer leur
  propre logiciel ou obtenir des copies de quoi que ce soit.


  22..55..  mmuullaattiioonn ssuurr uunn PPCC


  Puisqu'un PC possde un cran et un clavier (comme un terminal) mais
  possde aussi plus de puissance de calcul, il est facile d'utiliser
  une partie de cette puissance de calcul pour que le PC se comporte
  comme un terminal texte.  C'est de "l'mulation de terminal". Ce n'est
  pas un type de terminal au sens strict puisque l'mulation pourrait,
  en thorie, simuler n'importe lequel des types ci-dessus (mais la plus
  commune est l'mulation d'un terminal texte).  Voyez ``mulation de
  terminal''

  33..  IInnssttaallllaattiioonn rraappiiddee


  Voici une procdure rapide pour installer un terminal sans passer par
  une procdure de ``mise en place''  la fois pour le terminal et
  l'ordinateur hte. Cela ne fonctionnera probablement pas bien s'il se
  trouve que le terminal a t configur de manire incompatible avec
  l'ordinateur. Si vous ne comprenez pas tout ceci vous devrez consulter
  d'autres parties de ce document pour plus d'informations.

  Pour installer un terminal, regardez d'abord dans /etc/termcap ou
  terminfo.src pour y trouver une entre le concernant (voir ``terminfo
  et termcap (dtaill)''). Dterminez sur quel port srie vous le
  brancherez et quelle est le nom tty pour ce port (par exemple, ttyS1,
  voyez ``noms de priphriques'').  En tant qu'utilisateur root, ditez
  /etc/inittab et ajoutez une commande getty  ct des autres commandes
  getty. Le format de la commande getty dpend du programme getty que
  vous utilisez. agetty (simplement appel getty dans la distribution
  Debian) est le plus simple (pas de fichier de configuration). Voyez le
  fichier "info" ou la page de manuel de getty.  Pour les paramtres de
  getty, utilisez le nom terminfo (ou termcap) de votre terminal, comme
  vt100. Entrez une vitesse de transmission supporte par le terminal.
  Si vous mettez la vitesse trop haut vous aurez peut-tre besoin
  d'utiliser le ``contrle de flux''.

  Connectez alors physiquement le port srie principal du terminal au
  port srie choisi de l'ordinateur avec un cble null-modem et allumez
  le terminal.  N'esprez pas que la plupart des cbles tout prts
  soient cbls correctement pour grer le contrle de flux matriel.
  Assurez-vous que la vitesse de transmission du terminal est la mme
  que celle que vous avez donne  getty et que son paramtre "bits de
  donnes" est 8.  Alors, sur la console de l'ordinateur tapez "init q"
  pour faire prendre en compte les changements que vous avez faits au
  fichier inittab. Vous devriez maintenant voir une invite de login sur
  le terminal. Sinon, appuyez sur la touche retour chariot du terminal.
  Si cela ne fonctionne pas, continuez de lire ce document et/ou voyez
  ``rgler les problmes''.


  44..  PPoouurrqquuooii uuttiilliisseerr uunn tteerrmmiinnaall ??



  44..11..  IInnttrroodduuccttiioonn ssuurr llee ffaaiitt dd''uuttiilliisseerr uunn tteerrmmiinnaall


  Les PC sont de nos jours si puissants qu'un de ces ordinateurs peut
  souvent supporter plusieurs personnes  la fois en train de
  l'utiliser, surtout s'ils excutent des tches faibles en charge
  telles que l'dition de texte, l'entre de donnes, etc. Une manire
  de faire ceci est de relier un certain nombre de terminaux  un seul
  ordinateur (ordinateur hte) par l'intermdiaire de modems ou de
  connexions directes par cble. Pour ce faire, on a besoin d'un systme
  d'exploitation multi-utilisateurs tel que Linux. On a appel cela le
  "partage de temps" (time sharing) mais ce n'est pas une terminologie
  correcte de nos jours puisque l'informatique "distribue" sur un
  rseau est aussi une sorte de partage de temps. On pourrait mieux le
  dcrire comme de l'informatique "centralise". Mais l'ordinateur
  central peut tre connect au reste du monde par un rseau afin que
  les utilisateurs des terminaux puissent envoyer du courrier
  lectronique, naviguer sur Internet avec le navigateur "lynx", etc. Ce
  n'est donc pas vraiment "centralis" non plus.

  On a rarement utilis des terminaux avec des PC parce que les systmes
  d'exploitation populaires qui les ont utiliss (Windows, DOS et Mac)
  n'ont pas t multi-utilisateurs jusqu'en 1998 (c'est le cas pour MS
  Windows NT) et ne pouvaient pas auparavant accepter de terminaux.
  Maintenant que Linux, systme d'exploitation multi-utilisateurs, est
  disponible pour les PC, l'utilisation de terminaux avec des PC devient
  envisageable. L'inconvnient est que les terminaux texte ne sont pas
  assez perfectionns pour supporter le type d'interface graphique
  utilisateur (GUI) que bien des utilisateurs d'ordinateur attendent de
  nos jours.


  44..22..  UUnnee rrdduuccttiioonn dduu ccoott dduu mmaattrriieell ??


  Quand les ordinateurs (mme les PCs) taient relativement chers,
  l'utilisation de terminaux tirait les cots du matriel vers le bas de
  manire significative. Maintenant, avec les PCs bon march, les
  conomies sur les cots sont un problme. Voici ce que j'ai crit il y
  a des annes quand les PCs taient plus chers. C'est encore vrai
  maintenant, mais dans une moindre mesure.

  Si plusieurs personnes utilisent le mme ordinateur en mme temps, il
  y a une diminution de la quantit de matriel ncessaire pour le mme
  niveau de service. Une faon de faire des conomies est due au partage
  du code. Les fichiers des applications sur les disques durs sont
  partags, de mme que les bibliothques partages en mmoire (mme si
  les gens font tourner des programmes diffrents,  condition qu'ils
  utilisent certaines fonctions identiques dans leur code). Une autre
  faon d'conomiser est due  la rduction du pic de charge. Le
  matriel d'un seul PC peut tre inactif la plupart du temps pendant
  que les gens entrent les informations lentement, rflchissent,
  discutent ou s'loignent de leur bureau. Avoir plusieurs personnes sur
  le mme ordinateur  la fois fait bon usage d'une bonne partie de ce
  temps d'inactivit qui, sinon, serait gch.

  Ces conomies sont substantielles. On peut estimer grossirement (en
  utilisant la thorie des statistiques) que pour neuf personnes (huit
  terminaux et une console), le PC partag n'a besoin que d'environ
  trois fois plus de capacit (en mmoire, espace disque, processeur(s),
  etc.) qu'un PC unique afin de fournir le mme niveau de service par
  personne. Le cot par utilisateur du matriel de calcul pour un tel
  systme partag devrait donc tre trois fois moindre. Cependant, le
  cot du systme d'affichage (crans, claviers, lectronique vido,
  etc.) est  peu prs le mme dans les deux cas.  Les terminaux
  induisent cependant un surcot : l'quipement de l'ordinateur hte
  avec des ports srie supplmentaires.

  Pour faire une comparaison juste avec les PC, les terminaux devraient
  avoir les mmes capacits que les moniteurs de PC. Malheureusement,
  les terminaux graphiques couleur pour Linux (X Window) avec des
  communications  grande vitesse est un march de niche avec des prix
  levs, et par consquent dans ce cas les conomies en cot de
  matriel, s'il y en a, seront faibles. Pour les terminaux texte, par
  contre, on fera des conomies, surtout si on obtient les terminaux 
  bas prix.


  44..33..  CCoonnttrrllee ddeess llooggiicciieellss


  En informatique centralise, les logiciels (et les mises  jour des
  logiciels) ne doivent tre installs que sur un seul ordinateur hte
  au lieu de plusieurs. La personne qui s'occupe de cet ordinateur peut
  contrler les logiciels qui y sont installs. Ceci est avantageux si
  la personne qui contrle l'ordinateur hte fait du bon travail et
  connat les besoins et prfrences des autres utilisateurs. On peut
  empcher les utilisateurs de jouer  des jeux ou de naviguer sur
  Internet en n'installant pas les logiciels (ou bien en en restreignant
  l'accs). Que le contrle centralis soit dsirable ou non dpend de
  chaque situation.


  44..44..  MMiisseess  jjoouurr dduu mmaattrriieell


  Avec les terminaux, les mises  jour du matriel de l'ordinateur ne
  prennent place que sur un ordinateur au lieu de plusieurs. Ceci
  conomise un effort d'installation. Alors que le cot du matriel pour
  la mise  jour de l'ordinateur hte sera plus important que pour un PC
  simple (puisque l'hte a besoin de plus de puissance de calcul qu'un
  PC), le cot sera bien moindre que de mettre  jour le nombre de PC
  qu'on utiliserait  la place des terminaux.


  44..55..  AAuuttrreess aavvaannttaaggeess ddeess tteerrmmiinnaauuxx



    L'limination du bruit des ventilateurs et des disques durs, 
     condition que les terminaux ne soient pas proches de l'ordinateur.

    Les utilisateurs des terminaux peuvent partager des donnes et des
     fichiers et peuvent s'envoyer du courrier lectronique. C'est la
     mme chose qu'un rseau local.


  44..66..  DDssaavvaannttaaggeess mmaajjeeuurrss ddeess tteerrmmiinnaauuxx



    Les terminaux texte ne disposent pas d'affichage graphique rapide
     (ou de graphiques haute rsolution) bien qu'ils utilisent souvent
     des jeux de caractres graphiques pour dessiner des botes, etc. Ce
     manque limite les logiciels qu'on peut utiliser dessus.

    Si l'ordinateur hte s'arrte, plus personne ne peut utiliser les
     terminaux non plus (sauf si on peut se connecter sur un autre
     ordinateur).


  44..77..  LLeess tteerrmmiinnaauuxx tteexxttee ssoonntt--iillss oobbssoolltteess ??


  Les terminaux texte reprsentent une technologie obsolte parce que
  pour un matriel lgrement plus cher, on pourrait construire un
  terminal intelligent (avec la mme qualit d'affichage). Ceci n'a pas
  toujours t le cas puisque aux alentours de 1980 la mmoire cotait
  des milliers de francs par mga-octet. Maintenant avec de la mmoire
  et des processeurs  bas prix, on pourrait faire un terminal texte
  intelligent pour une augmentation du cot du matriel de seulement 10
   20 %.

  Les raisons pour lesquelles les terminaux texte ne sont pas encore
  obsoltes sont :


    Il n'y a pas d'interface normalise satisfaisante pour des
     terminaux graphiques intelligents. Le systme MS Hydra fonctionne
     avec Windows NT, alors que X Window n'est pas aussi efficace qu'il
     devrait tre (et les terminaux X Window sont trop chers).

    Beaucoup de gens n'ont pas besoin de graphiques plein cran.


    Les terminaux texte sont peu coteux et mettent en thorie plus de
     temps  devenir obsoltes, mais peuvent cependant donner accs  un
     ordinateur bien plus rcent (et plus puissant).

    Puisque le fonctionnement d'un terminal texte (en opposition  un
     terminal entirement graphique) ne consomme pas beaucoup de
     ressources sur un PC moderne, on peut faire tourner beaucoup de
     terminaux sur un seul PC.


  55..  VVuuee dd''eennsseemmbbllee dduu ffoonnccttiioonnnneemmeenntt ddeess tteerrmmiinnaauuxx ((ssoouuss LLiinnuuxx))


  Voir aussi la section ``quelques dtails sur le fonctionnement des
  terminaux''.


  55..11..  NNoommss ddee pprriipphhrriiqquueess


  Chaque terminal est reli  un port srie sur l'ordinateur hte
  (souvent un simple PC). Les ports ont les noms suivants : ttyS0,
  ttyS1, ttyS2, etc. Ils sont reprsents par des fichiers spciaux dans
  le rpertoire /dev (device : priphrique). /dev/ttyS0 correspond au
  COM1 sous DOS ou Windows. ttyS1 est le COM2, etc. Voyez ``fichiers
  spciaux pour les terminaux'' pour plus de dtails sur ceux-ci et les
  "priphriques" connexes tels que cua.


  55..22..  SSee llooggggeerr // ssee ddllooggggeerr


  Quand l'ordinateur hte dmarre il lance le programme getty (voyez le
  HOWTO Serial 4.1 et 7.2) sur chaque port srie qui y possde un
  terminal (ainsi qu'il est spcifi dans le fichier /etc/inittab). Le
  programme getty lance le programme "login" pour que les gens puissent
  se logger. Une invite "login:" apparat  l'cran. Les gens sur le
  terminal se loggent (aprs avoir donn leur mot de passe) et ont alors
  accs  l'ordinateur. Quand il est temps d'teindre le terminal, on se
  dlogge en gnral et on teint le terminal.  Voyez ``restrictions sur
  le login''  propos de la restriction sur les logins (avec la
  permission pour l'utilisateur root de se logger sur un terminal).


  55..33..  HHaallff//FFuullll DDuupplleexx


  Si on regarde quelqu'un taper sur un terminal, les lettres tapes
  apparaissent simultanment sur l'cran. Une personne nave pourrait
  penser que ce qu'on tape est envoy directement du clavier  l'cran
  avec une copie dirige vers l'ordinateur (de manire half-duplex, voir
  le paragraphe suivant). Ce qui se passe gnralement est que ce qui
  est tap au clavier est envoy directement  l'ordinateur hte
  uniquement qui en retour renvoie au terminal chaque caractre qu'il
  reoit (ce qu'on appelle full-duplex). Dans certains cas (comme les
  mots de passe ou des commandes brutes d'diteurs) les lettres tapes
  ne sont pas renvoyes.

  Full-duplex veut dire qu'il y a deux liens de communication
  unidirectionnels. Le full-duplex est la norme de fait sur les
  terminaux. Le half-duplex est la moiti d'un duplex, ce qui veut dire
  qu'il n'y a qu'un lien de communication unidirectionnel. Ce lien doit
  tre partag par les communications allant dans les deux directions et
  on ne peut utiliser qu'une direction  la fois. Dans ce cas
  l'ordinateur n'est pas en mesure de rpter les caractres que vous
  tapez (et que vous lui envoyez) et par consquent le terminal doit
  aussi envoyer directement sur son cran chaque caractre que vous
  tapez. Certains terminaux possdent un mode de fonctionnement half-
  duplex qui est rarement utilis.


  55..44..  MMmmooiirree dduu tteerrmmiinnaall


  L'image sur un tube  lectrons s'vanouira presque instantanment 
  moins qu'elle ne soit raffiche frquemment sur l'cran par un
  faisceau d'lectrons lancs sur la face du tube. Puisque que le texte
  envoy  un terminal doit rester sur l'cran, l'image de l'cran doit
  tre stocke dans les puces mmoire du terminal et le faisceau
  d'lectrons doit balayer l'cran de faon rpte (disons 60 fois par
  seconde) pour maintenir l'image. Voyez ``mmoire du terminal'' pour
  plus de dtails.


  55..55..  CCoommmmaannddeess ppoouurr llee tteerrmmiinnaall


  Le terminal est sous le contrle de l'ordinateur. L'ordinateur envoie
  au terminal non seulement du texte pour afficher ce dernier sur
  l'cran mais aussi des commandes que le terminal excute. Ce sont des
  ``codes de contrle'' (octets) et des ``squences d'chappement''. Par
  exemple, le code de contrle CR (retour chariot) dplace le curseur
  sur le ct gauche de l'cran. Une certaine squence d'chappement
  (plusieurs octets dans lesquels le premier octet est le code de
  contrle d'"chappement") peut dplacer le curseur  l'emplacement de
  l'cran spcifi par les paramtres placs dans la squence
  d'chappement.

  Les ``premiers terminaux'' n'avaient que peu de telles commandes mais
  les terminaux modernes en ont des centaines.  L'apparence de
  l'affichage peut tre modifie  certains endroits : fort, faible,
  soulign, clignotant et vido inverse. Un haut-parleur dans un
  terminal peut mettre un "cliquetis" quand une touche est presse ou
  mettre un bip si une erreur s'est produite. Les touches de fonctions
  peuvent tre programmes pour des utilisations spciales. Des polices
  varies peuvent exister. On peut faire dfiler l'affichage vers le
  haut ou vers le bas. On peut effacer des parties spcifiques de
  l'affichage. On peut utiliser divers types de contrle de flux pour
  arrter le flux de donnes quand les octets sont envoys au terminal
  plus rapidement que le terminal ne peut le supporter. Il y en a bien
  plus, que vous dcouvrirez en parcourant une notice de terminal trs
  technique ou  travers les liens Internet de la ``liste des squences
  d'chappement''.


  55..66..  MMaannqquuee ddee nnoorrmmaalliissaattiioonn rrssoolluu ppaarr TTeerrmmiinnffoo


  Alors que les terminaux faits pour les tats-Unis utilisaient tous le
  mme code ASCII pour l'alphabet (sauf les terminaux IBM qui
  utilisaient EBCDIC), il n'utilisaient malheureusement pas tous les
  mmes squences d'chappement.  Ceci s'est produit mme aprs que
  plusieurs normes ANSI (et ISO) aient t tablies puisque ces normes
  n'ont jamais t suffisamment matures. De plus, les vieux terminaux
  n'avaient pas les possibilits des nouveaux terminaux.  Ceci pouvait
  poser des problmes. Par exemple, l'ordinateur pouvait envoyer une
  squence d'chappement  un terminal lui disant de sparer l'cran en
  deux fentres de taille spcifie, sans raliser que le terminal tait
  incapable de le faire.

  Pour surmonter ces problmes une base de donnes appele "termcap"
  (maintenant "terminfo") a t mise en place. Cette base de donnes
  rside dans certains fichiers sur l'ordinateur et en a une partie
  (quelquefois le fichier entier) pour chaque modle de terminal. Pour
  chaque modle (comme le VT100) une liste des capacits est fournie,
  avec une liste de certaines squences d'chappement disponibles et ce
  qu'elles font. Voyez la section ``termcap et terminfo (dtaills)''
  pour plus de dtails.  Les applications peuvent utiliser cette base de
  donnes en appelant certains programmes de la bibliothque C. Un grand
  ensemble de tels programmes (il y en a plus de 200) est appel
  "ncurses" et ils sont lists sur la page de manuel de ncurses.


  55..77..  LL''iinntteerrffaaccee


  La variable d'environnement TERM dcrit le type de terminal que Linux
  croit que vous utilisez. Certaines applications l'utilisent pour
  regarder les capacits dans la base de donnes terminfo et par
  consquent TERM doit tre positionne correctement. Mais que
  l'ordinateur connaisse les capacits du terminal n'est qu'une partie
  du chemin vers une interface correcte.

  Pour que les octets affluent de l'ordinateur vers le terminal, le
  terminal doit tre configur pour recevoir les octets  la mme
  vitesse (en bits par seconde) qu'ils sont envoys du terminal. Si on
  configure le terminal pour recevoir  19200 bauds et que l'ordinateur
  envoie des caractres  9600 bauds, on ne verra  l'cran que des
  parasites (ou peut-tre rien du tout).  On slectionne la vitesse de
  transmission pour un terminal (ainsi que bien d'autres possibilits) 
  partir des menus de "configuration" (set-up) sur le terminal.  La
  plupart des terminaux possdent un grand nombre d'options dans leurs
  menus de "configuration" (voyez  ``configuration du terminal
  (dtaille)''). Le port srie de l'ordinateur a aussi des options et
  ces options doivent tre configures d'une manire compatible (voyez
  ``configuration de l'ordinateur (dtaille)'').


  55..88..  mmuullaattiioonn


  La plupart des terminaux de nos jours possdent plus d'une mulation
  (personnalit ou "mode de terminal"). Les numros de modles des
  terminaux fabriqus autrefois par DEC (Digital Equipment Corporation,
  maintenant Compaq) commencent par VT (par exemple, VT100). Bien
  d'autres terminaux diffrents des VT100 peuvent tre configurs pour
  muler un VT100. Wyse est un grand fabricant de terminaux et la
  plupart de leurs terminaux peuvent muler des terminaux DEC divers
  comme les VT100 et les VT220. Par consquent si vous voulez, disons,
  utiliser un terminal VT320 vous pouvez soit utiliser un vrai VT320 en
  personnalit "naturelle" soit utiliser un autre terminal capable
  d'muler un VT320. Les personnalits "naturelles" ont en gnral plus
  de capacits donc, toutes choses tant gales par ailleurs, c'est la
  meilleure option  utiliser.

  Le type d'mulation le plus courant est d'utiliser un PC comme si
  c'tait un terminal vt100 (ou identique). Les programmes chargs dans
  la mmoire du PC permettent ceci. Dans Linux (sauf si vous tes dans X
  Window) le moniteur du PC (appel la console) mule un terminal de
  type "Linux" (proche du vt100).  Mme certaines fentres dans X Window
  mulent des terminaux. Voyez ``mulation de terminal''.


  55..99..  LLaa ccoonnssoollee


  Sur un PC, le moniteur est appel la console. Elle mule un terminal
  de type "Linux". On se logge dessus via un terminal virtuel. Voyez
  ``la console : /dev/tty?''. Elle reoit des messages du noyau
  concernant la progression du dmarrage (boot) et de l'arrt de la
  machine. On peut faire en sorte que les messages allant normalement
  sur la console aillent sur le terminal. Pour ceci, vous devez patcher
  et recompiler le noyau  la main, sauf pour les noyaux 2.2 (et plus)
  pour lesquels il s'agit d'une option de configuration. Voyez ``faire
  qu'un terminal devienne la console''.


  66..  FFiicchhiieerrss ssppcciiaauuxx ppoouurr lleess tteerrmmiinnaauuxx tteellss qquuee //ddeevv//ttttyy


  "tty" est l'abrviation de "Teletype". Les premiers terminaux taient
  des tltypes (comme machine  crire pilote  distance). Voyez la
  sous-section ``tltypes''.


  66..11..  TTeerrmmiinnaauuxx ssuurr ppoorrtt ssrriiee


  L'ordinateur considre chaque port srie comme un "priphrique". On
  l'appelle parfois priphrique terminal puisqu' un moment les
  terminaux reprsentaient une utilisation courante des ports srie.
  Pour chacun de ces ports srie, il existe un fichier spcial dans le
  rpertoire /dev (device : priphrique). /dev/ttyS0 est le fichier
  spcial pour le port srie connu sous le nom COM1 dans le monde
  DOS/Windows. Pour envoyer du texte  un terminal vous pouvez rediriger
  la sortie standard de certains programmes en ligne de commande vers le
  fichier spcial appropri. Par exemple en tapant "echo test >
  /dev/ttyS1"  l'invite de commandes, le mot "test" devrait tre envoy
  sur le terminal sur ttyS1 (COM2)  condition que vous ayez la
  permission d'crire sur /dev/ttyS1. De mme, taper "cat mon_fichier >
  /dev/ttyS0" enverra le contenu du fichier mon_fichier sur COM1
  (ttyS0).

  En plus de ttyS0 (/dev/ttyS0), ttyS1, ttyS2, etc. (le "S" veut dire
  port Srie) il y a aussi une srie de "cua" : cua0, cua1, cua2, etc.
  cua0 correspond au mme port que ttyS0, etc. Le "cu" dans cua veut
  dire CalloUt (appel sortant). Les sries ttyS sont conformes  Posix
  alors que l'utilisation de cua peut permettre l'ouverture d'un port
  dont les lignes de contrles du modem affirment qu'il n'est pas prt.
   partir du noyau 2.2 cua est obsolte et un message d'avertissement
  est affich quand vous essayez de l'utiliser (bien qu'il fonctionne
  encore). Pendant les dernires annes, il n'tait prsent dans Linux
  que pour assurer une compatibilit ascendante. Un programmeur peut
  faire en sorte que ttyS se comporte comme cua, et donc cua n'est pas
  vraiment utile.


  66..22..  PPsseeuuddoo--tteerrmmiinnaauuxx


  Les pseudo-terminaux n'ont pas de connecteur physique associ sur
  l'ordinateur. On les utilise pour muler un port srie. Par exemple,
  si quelqu'un se connecte grce  telnet sur votre ordinateur  travers
  un rseau, il peut se trouver connect au priphrique /dev/ptyp2 (un
  port de pseudo-terminal). Dans X Window, le programme d'mulation de
  terminal, xterm (ou rxvt), utilise des pseudo-terminaux. Les
  programmes pour les radioamateurs sous Linux les utilisent aussi. Avec
  certaines applications, il est possible d'attacher deux ou plus de
  deux pseudo-terminaux sur le mme port srie physique.

  Les pseudo-terminaux vont par deux comme ttyp3 et ptyp3. La srie
  pty... est le terminal matre ou contrleur et la srie tty... est
  l'esclave. ttyq5 est aussi un pseudo-terminal comme l'est ttysc (``c''
  est un chiffre hexadcimal).  Plus prcisment, les pseudo-terminaux
  matres sont /dev/pty[p-s]N et les esclaves correspondants sont
  /dev/tty[p-s]N o N est un chiffre hexadcimal.


  66..33..  LLee tteerrmmiinnaall ccoonnttrrllaanntt //ddeevv//ttttyy


  /dev/tty est le terminal contrlant (s'il y en a un) le processus en
  cours (le processus qui utilise "/dev/tty" dans une commande). Pour
  dterminer quels ttys sont attachs  quels processus, utilisez la
  commande "ps -a"  l'invite de commandes (la ligne de commandes).
  Regardez la colonne "tty".  Pour le processus shell que vous utilisez,
  /dev/tty est le terminal que vous utilisez  l'instant. Tapez "tty" 
  l'invite de commandes pour voir lequel c'est (voyez la page de manuel
  tty(1)). /dev/tty est quelque chose semblable  un lien vers le nom de
  priphrique du terminal en cours avec certaines possibilits
  supplmentaires pour les programmeurs en C : voyez la page de manuel
  tty(4).


  66..44..  ""TTeerrmmiinnaauuxx"" //ddeevv//ttttyyIINN


  N reprsente un entier. L'une des utilisations possibles de ces
  terminaux dans Linux est le paquet du pilote ISDN (RNIS) : isdn4linux.
  La srie ttyIN ressemble  ttySN. Il y a aussi une srie cuiN qui
  ressemble  cuaN. Les sries ttyI et cui mulent des modems et on peut
  leur envoyer des commandes de modems.


  66..55..  LLaa ccoonnssoollee :: //ddeevv//ttttyyNN


  Dans Linux le moniteur du PC est en gnral appel la console et on
  lui associe plusieurs fichiers spciaux de priphriques : tty0, tty1,
  tty2, etc. Quand vous vous loggez vous tes sur le tty1. Pour aller
  sur le tty2 appuyez sur Alt-F2. tty1, tty2, etc. sont des "terminaux
  virtuels" (qu'on appelle parfois des "consoles virtuelles"). Vous
  pouvez vous logger sur diffrents terminaux virtuels et ainsi avoir
  plusieurs sessions diffrentes tournant en mme temps sur
  l'ordinateur. Vous basculez de l'une  l'autre en utilisant la touche
  Alt-F?  o "?" est le numro de terminal virtuel que vous dsirez. La
  console est aussi appele /dev/tty0 et les messages du systme peuvent
  aller sur ce priphrique et s'afficher sur votre console. Seuls le
  systme et l'utilisateur root peuvent crire dans /dev/tty0  laquelle
  /dev/console est quelquefois lie. Les messages du systme peuvent
  aussi tre crits directement  l'adresse matrielle de la console,
  court-circuitant ainsi /dev/tty0. Pour plus d'informations sur la
  console, voyez ``la console Linux''.


  66..66..  CCrreerr uunn pprriipphhrriiqquuee aavveecc ""mmkknnoodd""


  Le rpertoire /dev est install avec beaucoup de fichiers spciaux de
  priphriques. Si vous avez besoin de quelque chose non prsent dans
  ce rpertoire, vous pouvez essayer de le crer avec la commande
  "mknod". Voyez la page de manuel de ttys(4) pour savoir comment le
  faire pour les ports srie.  Pour utiliser mknod vous devez connatre
  les numros de priphriques mineur et majeur. Vous pourriez dduire
  les numros dont vous avez besoin en utilisant la commande "ls -l"
  dans le rpertoire /dev.  Elle affichera les numros majeur et mineur
  des fichiers spciaux existants.



  77..  QQuueellqquueess ddttaaiillss ssuurr llee ffoonnccttiioonnnneemmeenntt ddeess tteerrmmiinnaauuxx


  Si vous ne connaissez presque rien sur les terminaux, je vous suggre
  de lire en premier ``introduction'' et de lire aussi ``survol du
  fonctionnement des terminaux''.


  77..11..  MMmmooiirree dduu tteerrmmiinnaall


  L'cran du terminal se rafrachit peut-tre 60 fois par seconde 
  partir d'une image stocke dans la mmoire du terminal. Pour un PC
  l'image du moniteur est stocke dans la mmoire de la carte vido 
  l'intrieur de l'ordinateur mais pour un terminal, l'quivalent de la
  carte vido est  l'intrieur du terminal. Pour un terminal texte le
  stockage d'une image utilise peu de mmoire. Au lieu de placer chaque
  point (pixel) sur l'cran en mmoire, ce qui demande le stockage d'
  peu prs 250.000 points, on utilise une mthode de stockage bien plus
  efficace.

  Un cran rempli de texte peut tre reprsent dans la mmoire du
  terminal par des octets ASCII, un pour chaque caractre  l'cran. Un
  cran entier ne prend qu'environ 2 K octets ASCII. Pour afficher ces
  caractres, le terminal doit aussi connatre l'image (la forme) de
  chacun des presque 100 caractres ASCII imprimables. L'image d'un
  caractre n'occupant que, disons, 15 octets, on n'a besoin que
  d'environ 1,5 K de mmoire pour les images de tous les caractres
  ASCII (la police). Ce texte ASCII et la mmoire de la police sont
  balays pour que l'image rsultante soit affiche  l'cran environ 60
  fois par seconde.  C'est une forme de mmoire partage o l'image
  unique d'une lettre telle que la lettre e est partage par toutes les
  nombreuses lettres e qui apparaissent sur un cran rempli de texte.
  Une faible demande en mmoire impliquait des cots rduits pour
  produire des moniteurs au dbut des annes 1980 quand le cot de la
  mmoire tait plusieurs milliers de fois plus important qu'il ne l'est
  actuellement (ce qui reprsentait  l'poque plusieurs dollars par
  kilo-octet).


  77..22..  LLeess pprreemmiieerrss tteerrmmiinnaauuxx


  Les premiers terminaux ressemblaient  des machines  crire
  contrles  distance qui ne pouvaient "afficher" (imprimer sur du
  papier) que le flux de caractres que leur envoyait l'ordinateur. Les
  premiers modles taient appels ``tltypes''. Le nom "tty" n'est que
  l'abrviation de "Teletype". Les premiers terminaux taient capables
  de faire un saut de ligne et un retour chariot comme une machine 
  crire et faire tinter une sonnette quand un caractre sonnette (bell)
  tait reu.  cause du manque de possibilits significatives, ce sont
  les premiers terminaux  avoir reu l'appellation "simple" (dumb). Ce
  genre d'interface terminale (l'utilisation d'un type de terminal
  appel "dumb") est quelque fois utilis de nos jours quand
  l'ordinateur ne peut pas dterminer avec quelle sorte de terminal il
  communique.


  77..33..  SSqquueenncceess dd''cchhaappppeemmeenntt eett ccooddeess ddee ccoonnttrrllee ((iinnttrroodduuccttiioonn))


  Les terminaux possdent beaucoup de possibilits dont certaines sont
  toujours prsentes ; pour les autres, l'ordinateur doit envoyer des
  commandes au terminal afin de modifier ou activer ces possibilits.
  Mettre en oeuvre toutes ces possibilits sous le contrle d'un
  ordinateur ncessite la mise en place de codes spciaux pour que
  l'ordinateur puisse dire au terminal ce qu'il doit faire. Il y a deux
  grandes sortes de codes : les squences d'chappement et les code de
  contrle (caractres de contrle). Il y a bien plus de squences
  d'chappement que de codes de contrle.


  77..33..11..  CCooddeess ddee ccoonnttrrllee


  Les codes de contrle (ou caractres de contrle) sont constitus des
  32 premiers octets de l'alphabet ASCII. Ils comprennent les codes
  suivants : retour chariot (curseur  l'extrmit gauche), saut de
  ligne (curseur une ligne vers le bas), retour en arrire, caractre
  d'chappement, tabulation et sonnette. Ils ne s'impriment normalement
  pas sur l'cran. Il y a souvent une commande que vous pouvez envoyer 
  votre terminal qui fera qu'ils seront affichs quand le terminal les
  recevra. On l'appelle parfois "Contrles d'affichage" ou "Moniteur".
  Si vous faites ceci, l'affichage aura l'air lgrement dans le
  dsordre puisque les squences d'chappement, qui commencent toutes
  par le caractre de contrle ESC (escape, chappement), ne seront plus
  excutes. Les mots qui devraient apparatre en haut ou en bas de
  l'cran apparatront  d'autres endroits. Les squences d'chappement
  pour repositionner le curseur s'afficheront sur l'cran mais le
  curseur ne se dplacera pas vers la destination indique par la
  squence d'chappement.


  77..33..22..  SSqquueenncceess dd''cchhaappppeemmeenntt


  Puisque qu'il n'y pas assez de codes de contrle pour tout faire (et
  pour une raison ou pour une autre, ils ne sont pas tous utiliss), on
  utilise de nombreuses squences d'chappement. Elles sont constitues
  du caractre de contrle d'chappement (ESC) suivi d'une squence de
  caractres ordinaires.  En recevant un caractre d'chappement, le
  terminal examine les caractres suivants pour interprter la squence
  et excuter la commande voulue par l'ordinateur. Une fois que la fin
  d'une squence valide est reconnue, les caractres suivants
  s'affichent simplement  l'cran (sauf s'il s'agit de codes de
  contrle ou de squences d'chappement supplmentaires). Certaines
  squences d'chappement peuvent prendre des paramtres (ou arguments)
  comme les coordonnes cran pour dplacer le curseur. Les paramtres
  font partie de la squence d'chappement. Une ``liste des squences
  d'chappement'' se trouve sur le Web pour certains terminaux, mais
  c'est un peu brutal.

  Une liste des squences d'chappement pour votre terminal devrait se
  trouver dans le "manuel du programmeur" de votre terminal.  part pour
  de trs vieux terminaux, il devrait y avoir deux ou trois cents
  squences. Si vous n'avez pas de manuel, ce n'est pas facile de les
  trouver. Certaines squences sont disponibles sur Internet. Un lien
  possible est ``liste des squences d'chappement''. En cherchant une
  squence sur Internet (comme ESC[5m) vous pouvez tomber sur une longue
  liste.

  Une autre faon de dterminer certaines squences est de trouver la
  section termcap (terminfo) du terminal et de la dcoder mentalement.
  Voyez ``terminfo et termcap (dtails)'' dans ce document et/ou le
  ``manuel termcap'' sur Internet. Malheureusement, la section termcap
  (terminfo) d'un terminal ne liste souvent pas toutes les squences
  d'chappement disponibles sur le terminal, mais heureusement, les plus
  importantes sont en gnral prsentes.




  77..44..  AAttttrriibbuuttss dd''aaffffiicchhaaggee eett ccooookkiieess mmaaggiiqquueess


  Les terminaux possdent diverses mthodes pour gnrer des attributs
  de caractres tels que gras, vido inverse, soulignement, etc.
  L'utilisateur ne devrait pas s'inquiter de la manire dont c'est
  gr, sauf que cela peut poser des problmes pour certains vieux
  terminaux et il y a quelquefois une option  ce sujet dans le menu de
  configuration des terminaux plus rcents.

  La mthode des cookies magiques (magic cookie) est dpasse. C'est la
  mthode la plus simple (et la pire) pour dfinir des attributs :
  l'utilisation d'un octet particulier pour dmarrer un attribut et un
  autre pour indiquer la fin de cet attribut. Par exemple, un octet
  magique "dmarrer le soulignement" est plac juste devant le premier
  mot  souligner. Ces octets supplmentaires sont placs dans la
  mmoire de la page cran, comme les octets pour les caractres qui
  s'affichent normalement. Ceci peut cependant fausser le dcompte du
  nombre de caractres par ligne puisque les caractres de cookies
  magiques non imprimables sont mlangs avec les autres caractres
  imprimables. Ceci peut dans certains cas poser des problmes.

  Une mthode plus efficace, qui utilise plus de mmoire, est d'associer
  un caractre d'attribut (ou un demi-caractre, etc.)  chaque
  caractre affich.  Cette mthode est utilise par les cartes vido PC
  (pour le texte) pour les moniteurs PC courants.


  88..  PPoossssiibbiilliittss ssppcciiaalleess ddee cceerrttaaiinnss tteerrmmiinnaauuxx



  88..11..  CCoouulleeuurr


  Bien que le terminal monochrome courant ne soit pas un terminal
  couleur, il peut avoir un affichage en "couleur" fixe autre que blanc
  comme vert ou ambre.  Tous les terminaux possdent le noir (faisceau
  d'lectrons teint = luminosit nulle). Un vritable terminal couleur
  peut modifier la couleur du texte et du fond avec plusieurs couleurs
  diffrentes alors qu'un terminal monochrome ne peut modifier que la
  luminosit d'une couleur donne.

  Cependant, changer la luminosit, etc. offre bien des possibilits.
  Par exemple, un terminal noir et blanc (monochrome) peut avoir du
  blanc, du gris et du noir en variant la luminosit. Certains mots
  peuvent tre en noir sur un fond lgrement gris tandis que d'autres
  sont mis en valeur par du noir sur fond blanc. En plus il y a du blanc
  sur noir, du soulignement et du clignotement.

  La couleur fonctionne comme la couleur sur un moniteur d'ordinateur ou
  un cran de tlvision. Le tube possde trois couleurs de points,
  chacune tant contrle par son propre faisceau d'lectrons (il y a
  trois faisceaux).  Le monochrome a par dfinition une meilleure
  rsolution puisqu'il ne dpend pas de points fixs en permanence 
  l'cran. Pour les terminaux texte la seule utilisation de la couleur
  permet de diffrencier le texte et cet avantage ne vaut pas toujours
  le cot d'une rsolution moins bonne. Le monochrome peut donc tre
  meilleur puisqu'il est aussi moins cher.


  88..22..  SSeessssiioonnss mmuullttiipplleess


  Pour les sessions doubles, le terminal possde deux ports srie de
  statut gal. Chaque port est connect au port srie d'un ordinateur
  diffrent. Ainsi on peut se logger sur deux ordinateurs diffrents,
  chaque session s'affichant dans une fentre de l'cran spar en deux.
  Autrement, chaque session peut s'excuter en plein cran et on utilise
  une touche "rapide" (hot key) pour accder directement  une session
  (ou une mme touche pour basculer). On pourrait aussi se connecter sur
  deux ports srie diffrents sur le mme ordinateur et se logger deux
  fois (de manire identique aux "terminaux virtuels" sur la console).
  Le programme "screen" pourra faire tourner sur n'importe quel terminal
  (session unique) reli  un ordinateur unique deux "sessions" ou plus.


  88..33..  PPoorrtt iimmpprriimmaannttee//aauuxxiilliiaaiirree


  Beaucoup de terminaux possdent un connecteur  l'arrire pour un tel
  port.  Il peut s'appeler "Aux" ou "Printer", etc. Certains ports
  d'imprimantes sont destins aux imprimantes parallle alors que
  d'autres sont destins aux imprimantes srie.  Si une imprimante est
  connecte au port imprimante ou auxiliaire, alors l'appui sur
  certaines touches imprime l'cran. On peut aussi faire imprimer tout
  ce qui s'affiche  l'cran. Si le port est un port auxiliaire, on peut
  le connecter  un autre ordinateur et avoir des sessions doubles comme
  ci-dessus.  Cependant, la mmoire vido  l'intrieur du terminal peut
  ne pas retenir les deux sessions et vous pouvez avoir besoin de
  rafrachir l'cran en basculant sur l'autre session. Il n'y aura
  peut-tre pas de touche rapide non plus mais on pourra peut-tre
  programmer une touche de fonction pour accomplir cette tche. Il
  existe de nombreuses combinaisons de touches et de squences
  d'chappement pour contrler un tel port. Voyez ``chappement de
  l'imprimante''.

  Il y a un programme appel vtprint qui est fait pour envoyer un
  travail d'impression  votre terminal en vue de l'imprimer sur une
  imprimante relie au terminal. Sa page Web est
  http://people.qualcomm.com/garrett/vtprint. Il est aussi inclus (en
  1998) dans la distribution Debian de Linux. xprt (aussi dans Debian)
  semble faire une chose identique, mais seulement pour les terminaux X
  Window ??


  88..44..  PPaaggeess


  Beaucoup de terminaux permettent le stockage de plus d'une page dans
  leur mmoire vido. Quelquefois la taille de la page est la mme que
  celle de l'cran, mais elle est parfois plus grande, ce qui fait que
  le dfilement rvlera les parties invisibles de la page. Quand
  quelqu'un regarde un cran, il peut y avoir du texte cach sur la mme
  page au-dessus ou en dessous de l'affichage. En plus, s'il y a plus
  d'une seule page, il peut y avoir du texte cach sur ces autres pages.
  Une utilisation possible de ces pages concerne les terminaux qui
  supportent les sessions doubles. Chaque session peut avoir sa propre
  page et on peut basculer de l'une  l'autre simplement.

  Mme si vous avez un terminal  page unique avec la taille de la page
  gale  ce qui est affich sur l'cran, vous verrez encore d'autres
  pages d'un fichier (etc.) tant que l'hte envoie des donnes au
  terminal. L'un des avantages de stocker des pages supplmentaires dans
  la mmoire du terminal est que vous pouvez y accder instantanment
  sans attendre une seconde ou presque qu'elles soient transmises depuis
  l'hte.

  Je ne connais aucun programme sous Linux qui exploite l'utilisation
  des pages multiples. Faites-moi savoir si vous en connaissez. Il y a
  un programme commercial appel "Multiscreen" qui les supporte mais il
  n'est srement pas pour Linux ?? Il parait que Multiscreen fait partie
  de SCO et fait quelque chose dans le genre des terminaux virtuels sur
  une console PC Linux.  Le programme Linux "screen" fait semblant
  d'avoir des pages multiples mais elles sont stockes sur l'ordinateur
  et vous ne pouvez avoir qu'une fentre-page pour chaque programme en
  cours.


  88..55..  JJeeuuxx ddee ccaarraaccttrreess


  Un jeu de caractres est normalement reprsent par une liste (ou
  table ou tableau) de caractres accompagne du code d'octet assign 
  chaque caractre. Les codes d'un octet vont de 0  255 (00  FF en
  hexadcimal).  Dans MS-DOS, les tables de jeux de caractres sont
  appeles "pages de code".  Vous devriez examiner une telle table si
  vous n'tes pas familier avec celles-ci. Elles sont parfois incluses
  dans les manuels d'imprimantes et de terminaux mais peuvent tre
  difficiles  trouver.

  L'ASCII est l'un des jeux de caractres les plus courants utiliss sur
  les terminaux texte. C'est un code sur 7 bits mais qui peut tre
  converti en 8 bits si le premier bit (bit de haut rang)  est toujours
  positionn  0. D'autres jeux de caractres sont en gnral
  disponibles (sauf sur de trs vieux terminaux o le seul choix est
  l'ASCII). La premire moiti de la plupart des jeux de caractres sont
  les caractres ASCII traditionnels et la deuxime moiti (les
  caractres avec le bit de haut rang  mis  1) appartiennent  une
  grande varit de jeux de caractres. Les jeux de caractres sont
  souvent des normes ISO. Pour obtenir des jeux de caractres
  spcialiss sur un terminal, vous devrez certainement tlcharger une
  police logicielle pour ce jeu de caractres dans la mmoire du
  terminal.

   ct de l'ASCII, il y a d'autres jeux de caractres courants, tous
  en 8 bits. CP est l'abrviation des jeux de caractres de page de
  codes (Code Page) invents par IBM : CP-437 (ECS DOS), CP-850 (Latin 1
  multilingue -- pas le mme que ISO Latin-1), ISO-8859-1 (Latin-1),
  ANSI (driv de Latin-1). MS Windows utilise ANSI alors qu'Internet
  utilise souvent Latin-1.  Il y a plusieurs jeux de caractres ISO-8859
  en plus de Latin-1.  Ceux-ci comprennent le grec (-7), l'arabe (-6),
  l'Europe de l'Est (-2) et le russe (-5). Il y en a bien d'autres. Par
  exemple, KOI8-R est plus souvent utilis pour le russe que ISO-8859-5.
  Unicode est un jeu de caractres trs grand dans lequel chaque
  caractre est reprsent sur deux octets au lieu d'un seul.

  Voici plus d'informations sur les ensembles de caractres :


    Pages de manuel : ASCII et latin1

    Les HOWTOs pour diverses langues (srement crits dans cette langue
     spcifique). Voyez "Cyrillic" pour le russe.

    <http://www.cc.columbia.edu/kermit/charsets.html> pour une liste
     courte des divers noms de jeux de caractres.

    <http://www.pku.edu.cn/on_line/w3html/International/Overview.html>
     pour des informations sur les jeux de caractres et Internet.

    Langues, pays et jeux de caractres
     <http://www.w3.org/International/O-charset-lang.html>

    Utiliser plusieurs langues en HTML <http://vancouver-
     webpages.com/multilingual/>


  Une fois que vous aurez le nom (ou le numro) du jeu de caractres qui
  vous intresse, vous pouvez chercher plus d'informations dessus sur
  Internet.


  88..66..  PPoolliicceess


  La plupart des terminaux fabriqus aprs le milieu des annes 1980
  peuvent accepter des polices logicielles tlcharges. Ceci veut dire
  qu'ils peuvent afficher quasiment n'importe quel jeu de caractres 
  condition que vous trouviez la police logicielle pour celui-ci. Si
  vous ne pouvez pas trouver la police logicielle ncessaire, vous
  pouvez toujours crer la vtre. Un diteur de polices libre pour
  effectuer ceci s'appelle BitFontEdit (crit par l'auteur de ce
  document) et se trouvait (en 1998) 
  Amrique du Nord :  <ftp://cs.utk.edu/pub/shuford/BitFontEdit.tar.gz>


  88..77..  CCllaavviieerrss eett ttoouucchheess ssppcciiaalleess


  Les claviers des terminaux ont souvent un certain nombre de touches
  qu'on ne trouve pas sur un clavier de PC. Peu (ou pas du tout) de
  terminaux actuels auront toutes ces touches et la plupart auront des
  touches supplmentaires qui ne sont pas listes ici. Certains d'entre
  eux possdent un grand nombre de touches  usage spcial comme les
  terminaux faits pour les caisses enregistreuses. Il y a souvent bien
  plus de significations pour les touches que ce qui est dcrit ici
  puisque ces touches ont souvent une signification tendue quand on les
  utilise avec d'autres touches (comme les touches shift et control).


    BREAK (interruption) envoie un bit 0 trs long (intervalle = +12 V)
     de dure de 300  700 millisecondes vers l'hte. L'hte peut
     l'interprter comme une interruption si stty a positionn brkint ou
     l'ignorer si ignbrk est positionn.

    NO SCROLL (pas de dfilement) arrte le dfilement de l'cran comme
     le fait ^S. Presser la touche  nouveau reprend le dfilement.
     Utilise des signaux de contrle de flux pour faire ceci.

    REPEAT (rptition) si on la maintient avec une autre touche, force
     la sortie rpte de cette autre touche mme si l'option de
     rptition automatique est dsactive.

    LINE FEED (saut de ligne) envoie le caractre de saut de ligne ^J 
     l'hte. Rarement utilise.

    SET-UP (configuration) permet la configuration manuelle du terminal
     par l'intermdiaire de menus. Quelquefois dsactive  dessein en
     plaant un bloc en dessous pour qu'on ne puisse pas la presser.
     Parfois il faut appyer sur une autre touche en mme temps comme
     Shift ou Control. Voyez ``entrer dans le mode de configuration''.

    LOCAL dconnecte le terminal de l'hte. En local, ce qu'on tape va
     directement  l'cran. Utile pour faire des tests.

    RETURN (retour chariot) est la mme chose que la touche "Entre"
     sur un PC. Elle envoie en gnral un retour chariot  l'hte qui
     est normalement traduit en un caractre nouvelle ligne par le
     pilote de priphriques de l'hte. Sur certains terminaux on peut
     le configurer pour qu'il envoie autre chose.

    F1, F2, ... ou PF1, PF2, ... sont des touches de fonction qu'on
     peut gnralement programmer pour envoyer une squence d'octets
     (caractres).  Voyez ``touches de fonction''


  99..  mmuullaattiioonn ddee tteerrmmiinnaall ;; llaa ccoonnssoollee



  99..11..  mmuullaattiioonn ddee tteerrmmiinnaall



  99..11..11..  IInnttrroodduuccttiioonn  ll''mmuullaattiioonn ddee tteerrmmiinnaall


  Puisqu'un PC possde un cran et un clavier (comme un terminal) mais
  possde aussi bien plus de puissance de calcul, il est facile
  d'utiliser une partie de cette puissance de calcul pour que le PC se
  comporte comme un terminal texte.  Les logiciels d'mulation sont
  disponibles pour MS Windows et sont intgrs dans les versions
  rcentes de MS Windows. La plupart des logiciels Linux ne peuvent
  muler que des VT100, VT102 ou VT100/ANSI. Si vous en trouvez
  d'autres, dites-le moi. Puisque la plupart des PC possdent des
  moniteurs couleur mais que les VT100 et VT102 ont t faits pour des
  terminaux monochromes, l'mulation ajoute en gnral des possibilits
  de gestion de couleurs (et un choix de couleurs). Parfois l'mulation
  n'est pas parfaite  100 % mais ceci ne cre en gnral que peu de
  problmes. Pour utiliser un Macintosh pour muler un terminal, voyez
  le mini-Howto : Mac-Terminal.


  99..11..22..  NN''uuttiilliisseezz ppaass TTEERRMM ppoouurr ll''mmuullaattiioonn


  Certaines personnes ont pens qu'ils pouvaient faire un mulateur sur
  la console Linux (le moniteur) en positionnant la variable
  d'environnement TERM sur le type de terminal qu'elles aimeraient
  muler. Ceci ne fonctionne pas.  En agissant ainsi, on dclare
  faussement que le terminal que l'on est en train d'utiliser (de type
  Linux) est d'un autre type -- mais il ne l'est pas.  C'est comme si on
  avait branch un terminal de type A sur un port srie et ensuite
  positionn TERM sur le type B, dclarant ce faisant que le terminal
  est de type B. Dans ce cas, les applications comme les diteurs qui
  utilisent la variable TERM enverront des squences d'chappement
  faites pour un terminal de type B vers un terminal de type A ce qui
  aura pour rsultat de corrompre l'interface. Mme avec cette
  corruption le terminal peut rester utilisable puisque beaucoup de
  terminaux de types diffrents utilisent des squences d'chappement
  identiques pour beaucoup de commandes (mais pas toutes).


  99..11..33..  PPrrooggrraammmmeess ddee ccoommmmuunniiccaattiioonnss ((aappppeellss ttllpphhoonniiqquueess))


  Un programme d'mulation est souvent coupl  un programme d'appel par
  modem (comme Minicom, Seyon ou Kermit) pour que l'on puisse (par
  exemple) appeler par tlphone des bibliothques publiques pour
  utiliser leurs catalogues et index (ou mme lire des articles de
  magazine). Seyon ne s'utilise qu'avec X Window et peut muler des
  terminaux Tektronix 4014. Des mulateurs existent pour DOS comme telix
  et procomm et fonctionnent aussi bien. Les terminaux muls sont
  souvent les vieux VT100, VT102 ou ANSI (comme VT100).





  99..11..44..  mmuullaattiioonn ssoouuss XX WWiinnddooww


  Xterm (obsolte ??) peut fonctionner sous X Window et permet d'muler
  un VT102, VT220 ou Tektronix 4014. Il y a aussi une mulation xterm
  (bien qu'il n'y ait pas de vrai terminal qui s'appelle "xterm"). Si
  vous n'avez pas besoin de l'mulation Tektronix 4014 (un terminal avec
  des vecteurs graphiques ; voyez ``terminaux graphiques'') vous pouvez
  utiliser eterm. Les prdcesseurs de eterm sont rxvt et xvt. eterm
  supporte les pixmaps en fond de fentre.

  Pour les alphabets diffrents de Latin, kterm permet l'mulation de
  terminal Kanji (ou tout autre alphabet non Latin) alors que xcin est
  fait pour le chinois. Il y a aussi l'mulateur 9term. Il semble que ce
  soit plus qu'un simple mulateur puisqu'il possde un diteur intgr
  et des barres de dfilement.  Il a t fait pour Plan 9, un systme
  d'exploitation  la Unix de AT&T.


  99..11..55..  LLeess vvrraaiiss tteerrmmiinnaauuxx ssoonntt mmiieeuuxx


  Sauf si vous utilisez X Window avec un grand affichage, il est plus
  agrable d'utiliser un vrai terminal que de l'muler. Il cote en
  gnral moins cher, a une meilleur rsolution pour le texte et n'a pas
  de lecteurs de disques qui font des bruits agaants. Certains
  terminaux rels peuvent muler divers autres modles de terminaux mais
  restent de vrais terminaux.


  99..22..  TTeesstteerr ll''mmuullaattiioonn dduu tteerrmmiinnaall


  Pour la srie des terminaux VT il y a un programme de test : vttest
  pour aider  dterminer si un terminal se comporte correctement comme
  un vt53, vt100, vt102, vt220, vt320, vt420, etc. Il n'y a pas de
  documentation mais il a des menus et est facile  utiliser. Pour le
  compiler lancez le script configure et ensuite tapez "make". On peut
  le charger  :  <ftp://ftp.clark/net:/pub/dickey/vttest/>. Un autre
  site de chargement est :
  <http://metalab.unc.edu/pub/Linux/utils/console/>.


  99..33..  LLaa ccoonnssoollee LLiinnuuxx


  La console d'un systme PC sous Linux est le moniteur de l'ordinateur.
  Il mule un terminal de type "Linux". Il n'y a pas moyen (sauf si vous
  voulez passer des jours  rcrire le code du noyau) pour le faire
  muler autre chose. Positionner la variable d'environnement TERM  un
  type de terminal diffrent de "Linux" n'aboutira pas  l'mulation de
  cet autre terminal. Vous n'obtiendrez qu'une interface corrompue
  puisque vous avez dclar faussement (par l'intermdiaire de la
  variable TERM) que votre "terminal" est d'un type diffrent de ce
  qu'il est. Voyez la section ``n'utilisez pas TERM pour l'mulation''.

  L'mulation "Linux" est souple et possde des possibilits qui vont
  bien au-del de celles du terminal vt102 qu'il tait cens muler.
  Celles-ci comprennent la possibilit d'utiliser des fontes
  personnalises et de reconfigurer facilement le clavier (sans modifier
  le code source et recompiler le noyau comme il faut le faire dans le
  cas d'un terminal rel).  Ces possibilits supplmentaires se trouvent
  dans le logiciel de pilotage de la console et non dans le logiciel
  d'mulation mais le rsultat fait qu'on dirait que ces possibilits
  font partie de l'mulation.

  Beaucoup de commandes existent (voyez le HOWTO Keyboard-and-Console)
  pour utiliser ces possibilits supplmentaires. Les vrais terminaux,
  qui n'utilisent ni codes de balayages (scancodes) ni carte VGA, ne
  peuvent malheureusement pas utiliser la plupart de ces possibilits.
  On peut recompiler Linux pour qu'un terminal reoive les messages qui
  vont normalement sur la console. Voyez ``transformer un terminal en
  console''.


  1100..  CCoonnttrrllee ddee fflluuxx ((pprriissee ddee ccoonnttaacctt))


  Le contrle de flux (= prise de contact (handshaking) =
  ralentissement) permet d'empcher un flux d'octets trop rapide de
  dpasser un terminal, un ordinateur, un modem ou un autre
  priphrique. Le dpassement est le fait qu'un priphrique ne puisse
  pas traiter ce qu'il reoit assez rapidement et ainsi perd des octets
  et/ou fait d'autres erreurs srieuses. Ce que fait le contrle de flux
  est d'arrter le flux d'octets jusqu' ce que le terminal (par
  exemple) soit prt  recevoir des octets supplmentaires. Le contrle
  de flux envoie un signal pour arrter le flux dans la direction
  oppose au flux des donnes qu'il veut arrter. Le contrle de flux
  doit tre lanc  la fois sur le terminal et sur l'ordinateur.

  Il y a deux types de contrle de flux : matriel et logiciel (Xon/Xoff
  ou DC1/DC3). Le contrle de flux matriel utilise des fils de signaux
  ddis comme RTS/CTS ou DTR/DSR alors que le contrle de flux logiciel
  se signale en envoyant les octets de contrle DC1 ou DC3 dans les fils
  de donnes normaux.  Pour le contrle de flux matriel, le cble doit
  tre cbl correctement.

  Le flux des octets de donnes dans le cble entre deux ports srie est
  bidirectionnel, il y a donc deux flux (et deux fils) diffrents 
  considrer :


  1. le flux de donnes de l'ordinateur vers le terminal

  2. le flux de donnes du clavier du terminal vers l'ordinateur


  1100..11..  PPoouurrqquuooii llee ccoonnttrrllee ddee fflluuxx eesstt--iill nncceessssaaiirree ??


  Vous pouvez vous demander : "Pourquoi ne pas envoyer les donnes  une
  vitesse suffisamment petite pour que le priphrique ne soit pas
  dpass et que le contrle de flux ne soit ainsi plus ncessaire ?"
  Ceci est possible mais c'est en gnral bien plus lent que d'envoyer
  les donnes plus rapidement et d'utiliser le contrle de flux. Une
  raison  ceci est qu'on ne peut pas positionner la vitesse du port
  srie  n'importe quelle vitesse comme 14.500, puisqu'un nombre limit
  de choix est disponible. Le meilleur choix est de slectionner une
  vitesse lgrement plus leve que ce que peut soutenir le
  priphrique et d'utiliser ensuite le contrle de flux pour que les
  choses fonctionnent correctement.

  Si on dcide de ne pas utiliser le contrle de flux, la vitesse doit
  alors tre suffisamment basse pour pallier  la pire des situations.
  Pour un terminal, cela arrive quand on envoie des squences
  d'chappement pour effectuer des tches complexes qui prennent plus de
  temps qu' l'accoutume.  Dans le cas d'un modem (avec la compression
  de donnes mais pas de contrle de flux) la vitesse de l'ordinateur au
  modem doit tre suffisamment basse pour que cette mme vitesse soit
  utilisable sur la ligne tlphonique, puisque dans le pire des cas les
  donnes sont alatoires et ne peuvent tre compresses. Si on ne
  pouvait pas utiliser de contrle de flux, la vitesse (avec la
  compression de donnes active) ne serait pas plus rapide que si on
  n'utilisait pas de compression du tout.

  Les buffers (mmoires tampons) aident  grer les situations
  catastrophes de courte dure. Le tampon stocke les octets qui arrivent
  trop rapidement pour tre traits tout d'un coup, et les garde pour
  les traiter plus tard.


  1100..22..  RReemmpplliissssaaggee


  Une autre manire de grer une situation "catastrophe" (sans utiliser
  de contrle de flux ni de tampon) est d'ajouter un groupe de nulls
  (octets de valeur zro) aux squences d'chappement. Quelquefois on
  utilise des DEL  la place,  condition qu'ils n'aient pas d'autre
  fonction. Voyez ``reconnatre DEL''.

  La squence d'chappement permet au terminal de commencer  faire
  quelque chose, et pendant que le terminal est occup  le faire, il
  reoit une poigne de nulls qu'il ignore. Quand il reoit le dernier
  null, il a termin sa tche et est prt pour la commande suivante.
  C'est ce qu'on appelle le remplissage de zros (null padding). Ces
  nulls taient autrefois appels des "caractres de remplissage". Ces
  nulls sont ajouts simplement pour "perdre" du temps, mais ce n'est
  pas tout  fait perdu puisque le terminal est en gnral occup 
  faire autre chose pendant que les nulls sont reus. On utilisait
  beaucoup cette mthode dans le pass avant que le contrle de flux ne
  devienne populaire. Pour tre efficace, il fallait ajouter le nombre
  exact de nulls et trouver la bonne valeur est difficile. On le faisait
  souvent par essais successifs et ttonnements puisque les manuels de
  terminaux n'taient pas de grand secours. Si le contrle de flux ne
  fonctionne pas correctement ou n'est pas implment, le remplissage
  est une solution. Certaines options de la commande stty concernent le
  remplissage.


  1100..33..  DDbboorrddeemmeenntt dd''uunn ppoorrtt ssrriiee


  On peut se demander comment le dbordement est possible sur un port
  srie puisqu' la fois les ports srie d'envoi et de rception servant
   la transmission d'octets de donnes sont paramtrs pour la mme
  vitesse (en bits/s) comme 19200. La raison est que bien que
  l'lectronique du port srie rcepteur peut grer la vitesse du flux
  arrivant, le matriel/logiciel qui prend et traite les octets du port
  srie ne peut pas toujours se dbrouiller avec une vitesse de flux
  leve.

  L'une des causes de ceci est que le tampon matriel du port srie est
  assez petit. Les anciens ports srie avaient une taille de tampon
  matriel d'un octet seulement ( l'intrieur de la puce UART). Si cet
  unique octet de donnes reu dans le tampon n'est pas enlev (pris)
  par des instructions CPU avant que l'octet suivant n'arrive, cet octet
  est perdu (le tampon est dbord). Les UART rcents, par exemple la
  plupart des 16550A, possdent des tampons de 16 octets (mais peuvent
  tre paramtrs pour muler un tampon d'un octet) et sont moins
  susceptibles d'tre dbords. On peut le paramtrer pour envoyer une
  interruption quand le nombre d'octets dans son tampon atteint 1, 4, 8
  ou 14 octets. C'est le travail d'une autre puce dans l'ordinateur
  (gnralement la puce principale CPU pour un ordinateur) de retirer
  ces octets entrants de ce petit tampon matriel et de les traiter
  (ainsi que d'effectuer d'autres tches).

  Quand le contenu de ce petit tampon matriel de rception atteint la
  limite spcifie (un octet pour les vieux UART) une interruption est
  leve.  L'ordinateur interrompt alors ce qu'il tait en train de faire
  et une routine fait une vrification pour dterminer ce qui vient de
  se passer. Il dtermine finalement qu'il doit retirer un octet (ou
  plusieurs) du tampon du port srie. Il prend cet (ces) octet(s) et les
  met dans un tampon plus grand (un autre tampon pour le port srie) que
  le noyau maintient dans la mmoire principale. Pour le tampon de
  transmission, le matriel srie gnre une interruption quand le
  tampon est vide (ou presque vide) pour dire  la CPU de mettre
  quelques octets supplmentaires dans ce tampon afin de les envoyer.

  Les terminaux possdent aussi des ports srie et des tampons
  similaires  ceux de l'ordinateur. Puisque le flux de donnes des
  octets vers le terminal est en gnral plus grand que le flux dans la
  direction oppose du clavier vers l'ordinateur hte, le terminal a
  plus de chance de souffrir du dbordement. Bien sr, si vous utilisez
  un ordinateur comme terminal (par mulation), il est  son tour sujet
  au dbordement.

  Les situations risques o le dbordement est trs probable sont : 1.
  quand un autre processus a dsactiv les interruptions (pour un
  ordinateur), 2.  quand le tampon du port srie dans la mmoire
  principale (ou dans celle du terminal) est prte  dborder.


  1100..44..  AArrrrtt ddee ll''eennvvooii


  Quand le rcepteur est sur le point d'tre dbord par les octets
  entrants, il envoie un signal  l'expditeur pour arrter l'envoi.
  C'est le contrle de flux et les signaux de contrle de flux sont
  toujours envoys dans la direction oppose au flux de donnes qu'ils
  contrlent (bien que ce ne soit pas dans le mme canal ou le mme
  fil). Ce signal peut tre soit un caractre de contrle (^S = DC3 =
  Xoff) envoy comme un octet de donnes ordinaire sur la ligne de
  donnes (signalement dans la bande), soit une transition de tension du
  positif au ngatif dans le fil de signal dtr-vers-cts (ou autre ;
  signalement hors-bande). L'utilisation de Xoff est appele "contrle
  de flux logiciel" et l'utilisation du saut de tension dans un fil de
  signal ddi ( l'intrieur du cble) est appele contrle de flux
  matriel.


  1100..55..  BBllooccaaggee dduu ccllaavviieerr


  Quand on dit  un terminal d'arrter l'envoi, le terminal "bloque" son
  clavier. Ceci arrive rarement mais quand a arrive, un message ou une
  lumire devrait vous informer que le clavier est bloqu. Tout ce que
  vous tapez sur un clavier bloqu est ignor. Le terme "bloqu" est
  aussi utilis quand on dit  l'ordinateur d'arrter d'envoyer  un
  terminal. Le clavier n'est pas bloqu, afin que tout ce que vous tapez
  soit envoy  l'ordinateur, mais puisque l'ordinateur ne peut rien
  vous renvoyer, les caractres que vous tapez ne s'affichent pas sur
  l'cran et il peut sembler que le clavier est bloqu mais il ne l'est
  pas.


  1100..66..  RReepprreennddrree ll''eennvvooii


  Quand le rcepteur a rattrap son retard dans le traitement et est
  prt  recevoir plus d'octets de donnes il envoie un signal 
  l'envoyeur. Pour le contrle de flux logiciel ce signal est le
  caractre de contrle ^Q = DC1 = Xon qui est envoy sur la ligne de
  donnes normale. Pour le contrle de flux matriel la tension dans une
  ligne de signal passe de ngative (nie)  positive (affirme). Si on
  dit  un terminal de reprendre la transmission le clavier est alors
  dbloqu et prt  tre utilis.


  1100..77..  CCoonnttrrllee ddee fflluuxx mmaattrriieell ((RRTTSS//CCTTSS,, eettcc..))


  Certains terminaux anciens n'offrent pas de contrle de flux matriel
  alors que d'autres offraient un assortiment vari de broches diverses
  sur le port srie pour le faire. La broche la plus en vogue
  actuellement semble tre la broche DTR (ou les broches DTR et DSR
  ensemble).


  1100..77..11..  CCoonnttrrllee ddee fflluuxx RRTTSS//CCTTSS,, DDTTRR eett DDTTRR//DDSSRR


  Les PC Linux utilisent RTS/CTS mais le contrle de flux DTR/DSR
  (utilis par certains terminaux) se comporte de la mme manire. Le
  contrle de flux DTR (dans une seule direction et aussi utilis par
  certains terminaux) n'est que la partie DTR du contrle de flux
  DTR/DSR.

  RTS/CTS utilise les broches RTS et CTS sur le connecteur srie
  (EIA-232). RTS veut dire "Request To Send" (demande d'envoyer). Quand
  cette broche reste en position haute (tension positive) sur le
  rcepteur cela veut dire : continuez de m'envoyer des donnes. Si RTS
  passe en position basse (la tension devient ngative), cela nie
  "demande d'envoyer", ce qui veut dire : arrtez d'envoyer. Quand le
  rcepteur est prt  recevoir plus de donnes, il relance RTS,
  demandant  l'autre ct de reprendre l'envoi. Pour les ordinateurs et
  les terminaux (tous les deux des quipements terminaux) la broche RTS
  envoie le signal de contrle de flux  la broche CTS (Clear To Send,
  prt  envoyer) de l'autre ct du cble. C'est--dire que la broche
  RTS  un bout du cble est relie  la broche CTS  l'autre bout du
  cble.

  Pour un modem (quipement de connexion) le principe est diffrent
  puisque la broche RTS du modem reoit le signal et sa broche CTS
  l'envoie. Alors que ceci peut sembler droutant, il y a des raisons
  historiques correctes pour l'expliquer, raisons qui sont trop
  compliques pour en discuter ici.

  Les terminaux disposent en gnral du contrle de flux DTR ou DTR/DSR.
  Le contrle de flux DTR est le mme que le contrle de flux DTR/DSR
  mais il est unidirectionnel et la broche DSR n'est pas utilise. En ce
  qui concerne le contrle de flux DTR/DSR sur un terminal, le signal
  DTR est comme le signal envoy de la broche RTS, et la broche DSR est
  simplement comme la broche CTS.


  1100..77..22..  EEttaabblliirr uunnee ccoonnnneexxiioonn aavveecc llee ccoonnttrrllee ddee fflluuxx DDTTRR oouu DDTTRR//DDSSRR


  Certains terminaux n'utilisent que le contrle de flux DTR. C'est un
  contrle de flux unidirectionnel uniquement pour empcher le terminal
  d'tre dpass. Il ne protge pas l'ordinateur de quelqu'un qui tape
  trop vite pour que l'ordinateur puisse grer la situation. Dans un
  cble null modem classique la broche DTR du terminal est relie  la
  broche DSR de l'ordinateur. Linux, par contre, ne supporte pas le
  contrle de flux DTR/DSR (bien que des pilotes pour des cartes
  multiports peuvent supporter le contrle de flux DTR/DSR). Un moyen de
  contourner ce problme est simplement de relier la broche DTR  la
  broche CTS sur l'ordinateur et d'activer le contrle de flux RTS/CTS
  (stty crtscts).  Le fait que ce soit unidirectionnel ne changera rien
  tant que l'hte n'est pas dpass par votre vitesse de frappe et ne
  lche RTS en une vaine tentative pour bloquer votre clavier. Voyez
  ``blocage du clavier''. Pour obtenir le contrle de flux DTR/DSR (si
  votre terminal supporte ce type de contrle de flux bidirectionnel)
  vous faites ce qui est dcrit ci-dessus. Mais vous connectez aussi la
  broche DSR sur le terminal  la broche RTS sur l'ordinateur. Vous tes
  alors protg si vous tapez trop rapidement.


  1100..77..33..  LL''aanncciieennnnee pprriissee ddee ccoonnttaacctt RRTTSS//CCTTSS eesstt ddiiffffrreennttee


  Ce qui est droutant est que l'utilisation d'origine de RTS veut dire
   peu prs le contraire de l'explication prcdente ci-dessus. La
  signification d'origine est : je demande  vous envoyer (I Request To
  Send to you). Cette requte tait destine  tre envoye d'un
  terminal (ou d'un ordinateur) vers un modem qui, s'il dcidait
  d'accorder la requte, renvoyait un CTS affirmatif  partir de sa
  broche CTS vers la broche CTS de l'ordinateur : vous tes autoris 
  m'envoyer (You are Cleared To Send to me). Notez qu'au contraire du
  contrle de flux RTS/CTS bidirectionnel du modem, ceci ne protge le
  flux que dans une direction : de l'ordinateur (ou du terminal) vers le
  modem.

  Pour de vieux terminaux, RTS peut avoir cette signification et devient
  positif quand le terminal doit envoyer des donnes. L'utilisation ci-
  dessus est une forme de contrle de flux puisque si le modem veut que
  l'ordinateur arrte d'envoyer il lche CTS (connect au CTS de
  l'ordinateur) et l'ordinateur arrte d'envoyer.


  1100..77..44..  CCaannaall iinnvveerrss


  Les vieux terminaux  sortie papier peuvent avoir une broche de canal
  invers (comme la broche 19) qui se comporte comme la broche RTS dans
  le contrle de flux RTS/CTS. Cette broche passera aussi en ngatif
  s'il n'y a plus de papier ou de ruban. Il est souvent possible de
  relier cette broche  la broche CTS de l'ordinateur hte. Il peut y
  avoir un petit interrupteur pour positionner la polarit de ce signal.


  1100..88..  EEsstt--ccee qquuee llee ccoonnttrrllee ddee fflluuxx mmaattrriieell eesstt ffaaiitt ppaarr llee
  mmaattrriieell ??


  Certains pensent que le contrle de flux matriel est fait par le
  matriel mais (sauf si vous utilisez une carte srie intelligente avec
  plusieurs ports srie) c'est en ralit votre systme d'exploitation
  qui s'en charge. Les puces UART et le matriel associ ne connaissent
  en gnral rien du contrle de flux matriel. Quand un signal de
  contrle de flux matriel est reu, le fil du signal inverse la
  polarit et le matriel envoie un signal lectrique d'interruption au
  processeur. Cependant, le matriel n'a pas d'ide sur la signification
  de cette interruption. Le processeur arrte ce qu'il tait en train de
  faire et saute  une table en mmoire centrale qui indique au
  processeur o aller pour trouver un programme qui saura ce qui s'est
  pass et ce qu'il faut faire.

  C'est ce programme (qui fait partie du pilote de priphrique srie)
  qui arrte (ou reprend) l'envoi. Ce programme vrifie le contenu des
  registres de la puce UART pour trouver qu'un certain fil a chang sa
  polarit. Le logiciel ralise alors qu'un signal de contrle de flux a
  t reu et se charge d'arrter (ou de reprendre) le flux. Cependant,
  si c'est un signal d'arrt qui a t reu, le flux s'arrte presque
  instantanment quand le signal arrive parce que l'interruption a
  stopp tout ce que faisait le processeur (y compris le programme qui
  tait en train d'envoyer les donnes et les mettait dans les tampons
  matriels du port srie pour la transmission). Cependant tous les
  octets (jusqu' 16) qui taient dj dans le tampon de transmission
  matriel du port srie seront encore transmis ?? Ainsi le matriel
  arrte presque instantanment le flux uniquement parce que sa raction
  vis  vis d'un signal matriel est d'interrompre et d'arrter tout ce
  que le processeur tait en train de faire.


  1100..99..  OObbssoollttee ???? CCoonnttrrllee ddee fflluuxx EETTXX//AACCKK oouu EENNQQ//AACCKK


  Ceci est aussi du contrle de flux matriel et ncessite un pilote de
  priphrique qui sait le traiter. Les octets sont envoys par paquets
  (grce au port srie asynchrone), chaque paquet tant termin par un
  caractre de contrle ETX (End of Text, fin de texte). Quand le
  terminal reoit un ETX il attend jusqu' ce qu'il soit prt  recevoir
  le paquet suivant et retourne alors un ACK (Acknowledge,
  acquittement). Quand l'ordinateur reoit le ACK, il envoie le paquet
  suivant. Et ainsi de suite. Ceci n'est pas support par Linux ??
  Certains terminaux HP utilisent la mme mthode mais utilisent ENQ au
  lieux de ETX.


  1111..  CCoonnnneexxiioonn pphhyyssiiqquuee


  Les cartes multiports permettent de relier plusieurs terminaux (ou
  modems)  un ordinateur. On peut relier un terminal  son ordinateur
  hte soit par une connexion directe par cble, soit par un modem, ou
  encore par l'intermdiaire d'un serveur de terminaux.


  1111..11..  CCaarrtteess dd''eennttrreess//ssoorrttiieess mmuullttiippoorrttss ((aaddaappttaatteeuurrss))


  On peut acheter des cartes srie supplmentaires qui possdent
  plusieurs ports srie, et qu'on appelle "cartes multiports". Ces
  cartes ne sont pas dtailles dans ce HOWTO mais on en parle beaucoup
  dans le HOWTO Serial. Une socit qui fait des prix en dessous de la
  moyenne est ByteRunner <http://www.byterunner.com/cgi-
  bin/goto.cgi?FILE=iocards.html>.


  1111..22..  CCoonnnneexxiioonn ddiirreeccttee ppaarr ccbbllee


  La manire la plus simple de relier un terminal  un ordinateur hte
  est par l'intermdiaire d'une connexion directe vers un port srie de
  l'ordinateur.  La plupart des PC possdent deux ports srie, mais la
  souris en utilise en gnral un. Pour le port EIA-232, vous avez
  besoin d'un cble null modem qui croise les fils de transmission et de
  rception. Si vous voulez faire du contrle de flux matriel, vous
  utiliserez srement la broche DTR (ou les broches DTR et DSR
  ensemble).

  Assurez-vous que vous avez le bon type de cble. Un cble null modem
  achet dans un magasin d'ordinateurs peut tre bon (s'il est assez
  long), mais ne fonctionnera probablement pas bien pour le contrle de
  flux matriel. Ce genre de cble peut tre tiquet comme un cble
  pour imprimante srie.  Voyez ceci pour vous aider  dterminer si
  vous devez ``acheter ou fabriquer'' votre propre cble.  Assurez-vous
  que vous utilisez votre port srie, la prise mle DB25 ou DB9, et non
  pas votre port parallle (prise DB25 femelle ou Centronics).


  1111..22..11..  SScchhmmaa ddee bbrroocchhaaggee ddeess ccbblleess nnuullll mmooddeemm ((33,, 44 oouu 55 ccoonndduucc
  tteeuurrss))


  Si vous n'avez que le contrle de flux DTR (unidirectionnel), vous
  pouvez liminer le fil RTS-vers-DSR. Si vous n'avez pas de contrle de
  flux matriel, vous pouvez alors aussi liminer le fil CTS-vers-DTR.
  Alors, si vous avez deux paires torsades, vous pouvez utiliser deux
  fils pour la masse du signal comme indiqu  ``une astuce qui utilise
  du cble en paire torsade''. Pour un connecteur DB25 sur votre PC,
  vous avez besoin de :



    PC DB25 mle                         Terminal DB25
      TxD   Transmit Data       2 --> 3       RxD   Receive Data
      RxD   Receive Data        3 <-- 2       TxD   Transmit Data
      SG    Signal Ground       7 --- 7       SG    Signal Ground
      CTS   Clear To Send       5 <-- 20      DTR   Data Terminal Ready
      RTS   Request To Send     4 --> 6       DSR   Data Set Ready



  Si vous avez un connecteur DB9 sur votre port srie, essayez le schma
  suivant :


         PC DB9                                  Terminal DB25
      RxD   Receive Data        2 <-- 2       TxD   Transmit Data
      TxD   Transmit Data       3 --> 3       RxD   Receive Data
      SG    Signal Ground       5 --- 7       SG    Signal Ground
      CTS   Clear To Send       8 <-- 20      DTR   Data Terminal Ready
      RTS   Request To Send     7 --> 6       DSR   Data Set Ready   **



  Les schmas ci-dessus n'ont pas de lignes de contrle de modem, soyez
  donc sr de donner une option "local"  getty (ce qui est quivalent 
  "stty clocal"). De plus si vous avez besoin du contrle de flux
  matriel il doit tre activ du ct de votre ordinateur (utilisez le
  drapeau -h avec agetty) (quivalent  "stty crtscts").


  1111..22..22..  BBrroocchhaaggee dd''uunn ccbbllee nnuullll mmooddeemm ssttaannddaarrdd ((77 ccoonnnneecctteeuurrss))


  Le diagramme suivant montre des cbles null modem "standards"
  complets. Si vous en achetez un, il risque d'tre cbl de cette
  manire. Ils fonctionneront pour les terminaux en utilisant le
  contrle de flux logiciel (Xon/Xoff), ou sans contrle de flux.
  Cependant, ils ne fonctionnent pas pour le contrle de flux matriel
  puisque la plupart des terminaux supportent le contrle de flux DTR ou
  DTR/DSR (prise de contact) mais que Linux ne le fait pas.













  PC DB25 mle                            Terminal DB25
  TxD   Transmit Data         2 --> 3     RxD   Receive Data
  RxD   Receive Data          3 <-- 2     TxD   Transmit Data
  RTS   Request To Send       4 --> 5     CTS   Clear To Send
  CTS   Clear To Send         5 <-- 4     RTS   Request To Send
  DSR   Data Set Ready        6
                              |
  DCD   Carrier Detect        8 <-- 20    DTR   Data Terminal Ready
  SG    Signal Ground         7 --- 7     SG    Signal Ground
                                    6     DSR   Data Set Ready
                                    |
  DTR   Data Terminal Ready  20 --> 8     DCD   Carrier Detect



  Autrement, voici un cble null modem DB9-DB25 (ne fonctionnera pas
  avec la prise de contact matrielle des terminaux ; voir ci-dessus) :


  PC DB9                                  Terminal DB25
  RxD   Receive Data          2 <-- 2     TxD   Transmit Data
  TxD   Transmit Data         3 --> 3     RxD   Receive Data
                                    6     DSR   Data Set Ready
                                    |
  DTR   Data Terminal Ready   4 --> 8     DCD   Carrier Detect
  GND   Signal Ground         5 --- 7     GND   Signal Ground
  DCD   Carrier Detect        1
                              |
  DSR   Data Set Ready        6 <-- 20    DTR   Data Terminal Ready
  RTS   Request To Send       7 --> 5     CTS   Clear To Send
  CTS   Clear To Send         8 <-- 4     RTS   Request To Send
  (RI   Ring Indicator        9 pas ncessaire)



  (Oui, les broches 2 et 3 _o_n_t _v_r_a_i_m_e_n_t des significations opposes dans
  les connecteurs DB9 et DB25 !)

  L'utilisation des deux connexions ci-dessus fournit des signaux de
  contrle de modem complets et de mme nous permettent de positionner
  "stty -clocal".  On doit alors allumer le terminal en premier (pour
  lancer DTR) avant de pouvoir ouvrir le port de manire normale par
  getty, etc. Mais il risque d'y avoir des problmes si vous n'allumez
  pas le terminal en premier (voyez ``getty se relance trop
  rapidement''). Pour cette raison, on devrait utiliser "stty clocal"
  qui est la valeur par dfaut (ignore les lignes de contrle du modem)
  et les fils supplmentaires dans ces cbles ne servent alors  rien
  d'utile.

  Dans les jours anciens o il n'tait pas si facile d'ignorer les
  signaux de contrle du modem, etc., on utilisait "l'astuce" suivante
  pour les cbles qui n'avaient pas les fils pour le contrle de modem :
  du ct ordinateur du connecteur, on reliait RTS et CTS ensemble, et
  on connectait aussi DSR, DCD et DTR ensemble. De cette manire, quand
  l'ordinateur avait besoin d'un certain signal de prise de contact pour
  continuer, il l'obtenait (par erreur) de lui-mme.


  1111..22..33..  LLiimmiittaattiioonnss ddee lloonngguueeuurr


  Un cble de plus de 15 mtres environ (50 pieds) peut ne pas
  fonctionner correctement  grande vitesse. Des longueurs bien plus
  grandes fonctionnent parfois correctement, surtout si la vitesse est
  basse et/ou le cble est de type basse capacitance et/ou
  l'lectronique de la partie rception est trs sensible. On dit que
  sous certaines conditions idales  9600 bauds, un cble de 1000 pieds
  (300 mtres) fonctionne correctement. Une manire de couvrir de
  longues distances est d'installer un pilote de ligne prs de chaque
  port srie afin de convertir des signaux asymtriques en symtriques
  (et inversement)  et d'utiliser ensuite du cblage en paire torsade.
  Mais les pilotes de lignes sont chers.


  1111..22..44..  CCbblleess ppoouurr llee ccoonnttrrllee ddee fflluuxx mmaattrriieell


  Si vous voulez faire du contrle de flux matriel (prise de contact)
  vous aurez certainement besoin de fabriquer votre propre cble (ou de
  le faire faire). Bien sr, si les connecteurs  chaque extrmit d'un
  cble usag s'enlvent, vous pouvez le reconnecter. Voyez
  ``installation de connecteurs DB''. Vous devrez dterminer si oui ou
  non le terminal utilise la broche DTR pour cela, et sinon, quelle(s)
  broche(s) il utilise. Les menus de configuration peuvent vous donner
  des indices l-dessus puisqu'il peut y avoir une option pour activer
  la "prise de contact DTR" (ou le contrle de flux), ce qui implique
  bien sr qu'il utilise la broche DTR.  Il peut aussi utiliser la
  broche DSR. Voyez ``contrle de flux matriel'' pour une explication
  dtaille. Des terminaux anciens peuvent ne rien fournir pour faire du
  contrle de flux matriel.


  1111..22..55..  AAssttuucceess ssuurr lleess ccbblleess


  Un cble "droit" normal ne fonctionnera pas sauf si vous l'utilisez
  comme cble d'extension coupl soit  un cble null modem, soit  un
  adaptateur null modem. Assurez-vous que les connecteurs au bout du
  cble se brancheront dans les connecteurs matriels. On peut utiliser
  du cble de tlphone qui a au moins 4 conducteurs (et peut-tre en
  paire torsade). Un cble d'ordinateur spcial de basse capacitance,
  blind, est mieux.


  1111..22..66..  UUnnee bbiiddoouuiillllee qquuii uuttiilliissee uunn ccbbllee eenn ppaaiirree ttoorrssaaddee


  Bien qu'aucun signal EIA-232 ne soit stabilis pour de la paire
  torsade on peut tenter d'utiliser un cble en paire torsade.
  Utilisez une paire pour la transmission et l'autre pour la rception.
  Pour faire ceci connectez le signal de terre  un fil sur chacune de
  ces deux paires. Une partie seulement du signal de terre passe dans le
  fil dsir mais a peut aider.  cause de l'inductance plus faible du
  circuit en paire torsade (compare au courant de retour de masse par
  un autre chemin), un peu plus de courant de retour (terre) se massera
  sur le chemin dsir que ce qu'on pourrait attendre des seuls calculs
  de rsistances. Ceci est surtout vrai  des frquences plus leves
  puisque l'impdance d'induction augmente avec la frquence. La courbe
  rectangulaire du port srie contient des harmoniques de haute
  frquence.


  1111..22..77..  MMiissee  llaa tteerrrree dduu ccbbllee


  La broche 1 (d'une prise DB25) devrait tre relie  la masse du
  chssis (qui est aussi la masse de la terre) mais sur les ports srie
  conomiques il peut n'tre connect  rien du tout. Un connecteur 9
  broches n'est mme pas reli  la masse du chssis. La masse du signal
  est la broche 7 et est en gnral relie  la masse du chssis. Cela
  veut dire qu'une partie du courant du signal passera dans les fils de
  masse de l'installation lectrique du btiment (indsirable). Les
  blindages de cbles sont senss n'tre mis  la terre qu' une seule
  extrmit du cble, mais il peut tre mieux de relier les deux
  extrmits  la terre puisqu'il est mieux d'avoir du courant dans le
  blindage que dans l'installation lectrique du btiment ??


  1111..33..  CCoonnnneexxiioonn ssuurr uunn mmooddeemm


  En utilisant une combinaison terminal-modem (sans ordinateur) on peut
  se connecter  des BBS. Certains BBS (comme free-nets) permettent un
  accs  Internet grce au navigateur texte lynx qui fonctionnera sur
  les terminaux texte. Ainsi avec un vieux terminal et un modem externe,
  on peut se connecter  Internet. Si on se connecte  un ordinateur
  hte sur lequel on a un compte, on peut parfois stocker ses fichiers
  (ou ses tlchargements) sur l'ordinateur hte.


  1111..33..11..  AAppppeelleerr  ll''eexxttrriieeuurr  ppaarrttiirr dd''uunn tteerrmmiinnaall


  Au lieu de relier un terminal (ou un ordinateur mulant un terminal)
  directement  un ordinateur hte en utilisant un cble, il peut tre
  reli  l'hte par l'intermdiaire d'une ligne tlphonique (ou d'une
  liaison spcialise ddie) avec un modem  chaque bout de la ligne.
  Le terminal (ou l'ordinateur) appellera en gnral un ordinateur hte
  avec une ligne tlphonique.

  Cet appel sortant se fait couramment en utilisant un ordinateur PC
  muni d'un modem pour appeler un BBS ou un fournisseur d'accs 
  Internet (FAI) o le PC mule un terminal une fois qu'il est connect.
  Si vous utilisez un vrai terminal pour faire ceci, c'est plus
  difficile puisque le vrai terminal n'est pas trs intelligent et ne
  donne pas assez d'informations en retour  l'utilisateur. Pour appeler
   l'extrieur, beaucoup de terminaux peuvent stocker un ou plusieurs
  numros de tlphone comme des messages qu'on peut leur "paramtrer".
  Ces numros sont envoys au modem en pressant certaines touches de
  fonction. Beaucoup de modems peuvent aussi stocker des numros de
  tlphone.  La squence d'initialisation du modem doit prcder le
  numro de tlphone.  L'ordinateur hte peut utiliser "mgetty" (un
  getty qu'on utilise pour les modems) pour que quelqu'un qui a appel
  puisse se logger.


  1111..33..22..  OOnn ppeeuutt aappppeelleerr uunn tteerrmmiinnaall


  Il est courant pour un ordinateur faisant tourner Linux de se faire
  appeler par tlphone. L'appelant obtient une invite de login et se
  logge.  premire vue, il peut sembler trange qu'un terminal simple
  (reli  aucun ordinateur) puisse accepter un appel entrant, mais il
  le peut. Une des raisons possibles de faire ainsi est d'conomiser les
  factures de tlphone quand les tarifs ne sont pas symtriques. Votre
  terminal doit tre configur pour un appel entrant : mettez le modem
  derrire votre terminal en mode rponse automatique (auto answer,
  registre S0 mis  2 rpondra  la deuxime sonnerie). Vous allumez le
  terminal et le modem avant d'attendre un appel et quand l'appel arrive
  vous obtenez une invite de login et vous vous loggez.

  L'ordinateur hte qui appelle votre terminal doit faire quelque chose
  d'inhabituel. Aussitt que votre modem rpond, il doit lancer login
  (getty).  Un hte peut faire ceci en lanant le programme Linux
  "callback", parfois appel "cb". Le callback (ou rappel) c'est
  l'ordinateur A qui appelle l'ordinateur B, B raccroche et rappelle A.
  C'est ce que vous voulez si vous utilisez l'ordinateur A pour muler
  un terminal. Dans le cas d'un vrai terminal cette tche peut tre trop
  complexe et par consquent l'hte n'utilise que la partie retour du
  programme callback. Le fichier de configuration de callback doit tre
  configur correctement sur l'hte.  Callback appelle le terminal et
  ensuite dit  mgetty de lancer un login sur ce port. Mgetty lui-mme
  (au dbut 1998) ne sait grer que les appels entrants mais on
  travaille sur l'incorporation de possibilits de rappel automatique et
  le rendre ainsi capable de grer les appels sortants. Au moment o
  vous lirez ceci, mgetty peut tre l'unique solution  vos besoins.


  1111..44..  CCoonnnneexxiioonn  uunn sseerrvveeuurr ddee tteerrmmiinnaauuxx


  Un serveur de terminaux ressemble  un commutateur intelligent qui
  peut relier beaucoup de terminaux (ou de modems)  un ou plusieurs
  ordinateurs. Ce n'est pas un commutateur mcanique et donc il peut
  changer les vitesses et les protocoles des flux de donnes qui le
  traversent. Un certain nombre de socits fabriquent des serveurs de
  terminaux : Xyplex, Cisco, 3Com, Computone, Livingston, etc. Il y a
  beaucoup de types et de possibilits diffrentes. Un autre HOWTO est
  ncessaire pour les comparer et les dcrire (en incluant la
  possibilit de crer votre propre serveur de terminaux avec un PC
  Linux). La plupart sont utiliss pour des connexions par modem plutt
  que pour des terminaux relis directement.

  Une utilisation possible est de connecter beaucoup de terminaux (ou
  des modems)  un rseau  haut dbit qui permet la connexion  des
  ordinateurs htes. Bien sr le serveur de terminaux doit avoir la
  puissance de calcul et les logiciels pour faire tourner des protocoles
  rseau, il ressemble donc  un ordinateur. Le serveur de terminaux
  peut interagir avec l'utilisateur et demander sur quel ordinateur il
  veut se connecter, etc. ou il peut le connecter sans rien demander. On
  peut parfois envoyer des travaux  une imprimante  travers un serveur
  de terminaux.

  Un PC de nos jours a suffisamment de puissance de calcul pour agir
  comme un serveur de terminaux pour des terminaux texte sauf que chaque
  port srie devrait avoir sa propre interruption matrielle. Les PC ne
  possdent que peu d'interruptions libres  cette fin et puisqu'elles
  sont configures en dur on ne peut pas en crer davantage par
  logiciel. Une solution est d'utiliser une carte srie multiport
  avance qui possde son propre systme d'interruptions (ou sur les
  modles de plus bas prix, partage l'une des interruptions du PC entre
  un certain nombre de ports). Voyez le HOWTO Serial pour plus
  d'informations sur de telles cartes. Si un tel PC fait tourner Linux
  avec getty tournant sur beaucoup de ports srie on peut le considrer
  comme un serveur de terminaux s'il est reli  d'autres PC sur un
  rseau et si son travail est principalement de transfrer les donnes
  et de grer les interruptions du port srie tous les 14 octets (ou 
  peu prs). On utilise parfois un logiciel appel "radius".

  De nos jours les vrais serveurs de terminaux servent plus que de
  simples terminaux. Ils servent aussi des PC qui mulent des terminaux,
  et sont parfois relis  des racks de modems relis  des lignes
  tlphoniques.  Certains contiennent parfois des modems intgrs. Si
  un terminal (ou un PC en mulant un) est reli directement  un modem,
  le modem  l'autre bout de la ligne devrait tre reli  un serveur de
  terminaux. Dans certains cas le serveur de terminaux par dfaut
  s'attend  ce que l'appelant utilise des paquets PPP, quelque chose
  que les vrais terminaux texte ne gnrent pas.


  1111..55..  TTyyppeess ddee ccoonnnneecctteeuurrss eett dd''aaddaappttaatteeuurrss



  Un connecteur est plus ou moins reli de faon permanente 
  l'extrmit d'un cble ou  une unit matrielle. Il y a deux types de
  connexions de base : 1.  DBxx avec des broches et 2. des connecteurs
  modulaires de type tlphone.

  Un adaptateur ressemble  peu prs  un connecteur mais il possde
  deux extrmits. C'est comme un cble qui est si court qu'il ne reste
  plus de partie cble du tout -- il ne reste que des connecteurs
  diffrents sur chaque extrmit. L'adaptateur se branche de chaque
  ct. Il permet de relier entre eux deux connecteurs incompatibles en
  s'interposant entre les deux.  Quelquefois le but de l'adaptateur est
  d'interchanger les fils.  videmment, on peut utiliser un cble
  spcial (ventuellement fait maison) pour remplacer pour cet
  adaptateur.


  1111..55..11..  SSeexxee ddeess ccoonnnneecctteeuurrss // aaddaappttaatteeuurrss


  Les connecteurs (ou un ct des adaptateurs) sont soit mles soit
  femelles.  Les connecteurs qui ont des broches sont mles et ceux qui
  ont des "trous" sont femelles. Pour les connecteurs modulaires, ceux
  qui ont les contacts visibles sont les fiches tandis que ceux qui ont
  les contacts  l'intrieur (pas facile  voir) sont les prises.  Les
  fiches sont mles ; les prises sont femelles (NdT : mais en franais
  on dit aussi prise pour un connecteur mle).


  1111..55..22..  TTyyppeess dd''aaddaappttaatteeuurrss


  Il y a trois type d'adaptateurs de base : les null modem, les
  changeurs de genre et les adaptateurs de ports. Certains adaptateurs
  effectuent plus d'une fonction parmi ces trois fonctions.


    adaptateur null modem : croise certaines connexions, comme un cble
     null modem.

    changeur de genre : change le sexe d'une extrmit d'un cble. Deux
     connecteurs du mme sexe peuvent maintenant tre relis l'un 
     l'autre.

    adaptateur de port : va d'un type de connecteur  un autre (DB9
     vers DB25, etc.).


  1111..55..33..  CCoonnnneecctteeuurrss DDBB


  Pour savoir comment installer un connecteur DB  l'extrmit d'un
  cble, voyez ``installer des connecteurs DB''.  Ceux-ci sont
  disponibles en 9 ou 25 broches. Les spcifications EIA-232 demandent
  des 25 broches mais puisque la plupart de ces broches ne sont pas
  utilises sur les ports srie ordinaires, 9 broches sont suffisantes.
  Voyez ``DB9-DB25'' pour la signification des brochages.  Les broches
  sont en gnral numrotes si vous regardez de suffisamment prs ou si
  vous utilisez une loupe grossissante.


  1111..55..44..  CCoonnnneecctteeuurrss mmoodduullaaiirreess RRJJ


  Ceux-ci ressemblent  des connecteurs de tlphone modernes mais ne
  sont parfois pas compatibles avec les connecteurs tlphoniques. Voyez
  aussi ``installer des connecteurs RJ''. Il peut y avoir 6, 8 ou 10
  conducteurs. RJ11/14 est une fiche de tlphone  4-6 conducteurs.
  Une fiche qui lui ressemble est un connecteur MMJ (6 conducteurs)
  utilis sur certains modles tardifs de terminaux VT (et autres). MMJ
  possde une languette dcale et n'est pas compatible avec RJ11/14.
  Cependant, certains connecteurs ont t fabriqus et sont compatibles
   la fois avec MMJ et RJ11/14. Le brochage MMJ est : 1-DTR, 2-TXD,
  3-TXD GND, 4-RXD GND, 5-RXD, 6-DSR.

  Un cble null modem avec des connecteurs MMJ (ou RJ11/14) reliera :
  1-6, 2-5 et 3-4. Notez qu'un tel cble supporte le contrle de flux
  DTR/DSR qui n'est pas (encore) support par Linux. Faire vous-mme
  votre propre cble null modem  6 conducteurs est trs simple si vous
  comprenez que le cble tlphonique  4 conducteurs de votre mur 
  votre tlphone, utilis dans des centaines de millions d'habitations,
  est aussi un cble null modem.  Trouvez-en un et cblez votre cble de
  la mme faon.

  Si vous talez un tel cble (ou le cble null modem de votre terminal)
   plat sur le sol (sans torsion) vous noterez que les deux fiches aux
  extrmits ont leurs contacts dors dirigs tous les deux vers le haut
  (ou tous les deux vers le bas). Bien que ce soit symtrique, c'est
  aussi null modem si vous y rflchissez un peu. On pourrait associer
  un petit nombre de ces cbles avec des coupleurs en ligne et tout
  fonctionnera correctement car chaque coupleur en ligne est aussi un
  adaptateur null modem. Deux priphriques null modem en srie donnent
  une connexion directe.

  RJ45 et RJ48 sont des fiches tlphoniques  8 conducteurs (ou 10
  conducteurs pour certaines applications informatiques). Ceux  10
  conducteurs sont lgrement plus larges et ne rentreront pas dans des
  fiches  8 conducteurs.  On les utilise  la fois pour des cbles
  tlphoniques plats et des cbles  paire torsade ronds. L'extrmit
  du connecteur ct cble peut tre diffrent pour les cbles plats et
  ronds et  la fois RJ45 et RJ48 peuvent avoir 8 ou 10 conducteurs,
  donc assurez-vous que vous choisissez le bon. RJ48 possde un taquet
  supplmentaire ce qui fait qu'une fiche RJ48 ne rentrera pas dans une
  prise RJ45 (mais une fiche RJ45 rentrera dans une prise RJ48).  On les
  utilise sur certaines cartes srie multiports et dans les rseaux.
  Voici les numros de broches pour une prise  8 conducteurs :


    Fiche                          Prise
    (En regardant                 (En regardant la
     l'extrmit d'un cble)        cavit dans un mur)
       .__________.                   .__________.
       | 87654321 |                   | 12345678 |
       |__.    .__|                   |__.    .__|
          |____|                         |____|




  1111..66..  FFaabbrriiqquueerr oouu mmooddiiffiieerr uunn ccbbllee



  1111..66..11..  AAcchheetteerr oouu ffaabbrriiqquueerr ??


  Vous pouvez essayer d'acheter un cble null modem court. On les
  tiquette souvent comme des cbles d'imprimantes srie (mais les
  imprimantes srie ne sont pas trs en vogue de nos jours, ni les
  cbles associs).  Malheureusement, ils ne fonctionneront probablement
  pas pour le contrle de flux matriel. Assurez-vous que les
  connecteurs sur les extrmits du cble conviendront aux connecteurs
  sur votre ordinateur et votre terminal.
  Mais si vous avez besoin de cbles plus longs pour relier des
  terminaux ou si vous avez besoin du contrle de flux matriel, comment
  obtenez-vous les bons cbles ? Les bons cbles longs tout prts
  peuvent s'avrer difficiles  trouver (vous pouvez tenter de les
  chercher sur Internet), surtout si vous voulez utiliser un minimum
  (disons 4) de conducteurs. Une option est de les faire faire
  spcialement, ce qui risque d'tre relativement cher bien que vous
  puissiez trouver quelqu'un pour le faire  des prix  peine plus
  levs que ceux tout prts (c'est ce que j'ai fait). Une autre
  alternative est de fabriquer le vtre. Ceci peut ncessiter des outils
  spciaux. Si vous pouvez en trouver, du cble d'occasion peut s'avrer
  faire une bonne affaire mais vous devrez probablement recbler les
  connecteurs. La plupart des connecteurs livrs avec les cbles courts
  sont mouls de manire permanente sur le cble et ne peuvent pas tre
  recbls mais la plupart des cbles faits sur mesure ou  la main
  possdent des connecteurs qu'on peut recbler. L'avantage de fabriquer
  votre propre cble est que les comptences que vous acqurerez seront
  utiles si un cble se casse (ou devient mauvais) ou si vous devez
  fabriquer un autre cble en vitesse.


  1111..66..22..  NNuummrrooss ddee bbrroocchheess


  Les numros des broches devraient tre graves sur la partie plastique
  du connecteur. Chaque broche devrait avoir un numro juste  ct.
  Vous aurez peut-tre besoin d'une loupe grossissante pour les lire.


  1111..66..33..  IInnssttaalllleerr ddeess ccoonnnneecctteeuurrss DDBB ssuurr lleess eexxttrrmmiittss ddeess ccbblleess


  Voyez ``connecteurs DB'' pour une courte description de ces
  connecteurs. Malheureusement, la plupart des cbles achets de nos
  jours possdent des connecteurs mouls  chaque extrmit qu'on ne
  peut pas modifier. Si vous fabriquez des cbles ou en modifiez un
  existant, vous devrez apprendre  connatre les broches. Il y en a
  deux sortes : soudes et serties.

  Les broches serties ncessitent un outil de sertissage spcial et
  aussi un outil "d'insertion/extraction". Mais une fois que vous avez
  les outils, fabriquer et modifier un cble est plus rapide que de les
  souder. Si vous reliez deux fils  la mme broche (ncessaire aussi si
  vous voulez relier une broche connecte  une autre broche) alors la
  soudure est plus rapide (pour ces broches). C'est d au fait que les
  broches serties ne peuvent prendre qu'un fil  la fois, alors que les
  broches soudes peuvent accepter plus d'un fil par broche.

  Pour insrer des broches serties, poussez-les simplement  la main ou
  avec l'outil. Enlever une broche avec l'outil est un peu difficile.
  Vous devez insrer le bout de l'outil autour de l'arrire de la
  broche. Un bout de l'outil ncessite de s'taler un petit peu pour
  accder au fil mais avec ce bout la broche devrait tre plus facile 
  enlever. Tirez alors doucement  la fois sur l'outil et sur le fil. Si
  a ne vient pas, l'outil n'a srement pas t insr correctement,
  poussez-le alors plus en avant ou bien tournez-le dans une position
  diffrente. Vous auriez peut-tre d utiliser un autre bout qui
  entoure mieux la broche. En utilisant cet outil, on peut facilement
  convertir un cble droit en cble null modem, etc.

  Vous pouvez avoir des problmes en utilisant l'outil
  d'"insertion/extraction". Si les outils ne s'insrent pas sur le
  derrire de la broche, il se peut que la broche n'ait pas t sertie
  correctement sur le fil et tienne plus du carr que du rond, etc. Si
  une broche commence  sortir mais ne se redresse pas en entier, la
  broche peut tre tordue. Regardez-la sous une loupe grossissante.
  Redresser une broche avec une pince  piler peut endommager le
  plaquage en or. Parfois une broche coince peut tre pousse au dehors
  avec le bout d'une lame de tournevis paisse (ou quelque chose de
  semblable) mais si vous poussez trop fort vous pouvez agrandir le trou
  en plastique ou tordre la broche.

  N'essayez pas de souder sauf si vous savez ce que vous faites ou avez
  lu comment le faire.


  1111..66..44..  IInnssttaalllleerr ddeess ccoonnnneecctteeuurrss RRJJ


  Ce sont des connecteurs modulaires de tlphones, dont une sorte est
  utilise pour la plupart des tlphones ordinaires. Mais il y a
  beaucoup de sortes diffrentes (voyez ``connecteurs modulaires RJ'').

  Ils ne sont pas faciles  rutiliser. Vous pourriez retirer les fils,
  pousser  l'intrieur un outil pointu qui relverait les contacts
  dors et rutiliser le connecteur. Il y a des outils de sertissage
  spciaux qu'on utilise pour les installer ; un outil diffrent pour
  chaque sorte.

  Si vous n'avez pas d'outil de sertissage, l'installation est quand
  mme possible (mais difficile) en utilisant un petit tournevis (et
  peut-tre un marteau). Poussez les fils du cble  l'intrieur et
  ensuite poussez chaque contact dor vers le bas assez fort avec le
  petit tournevis qui passera juste entre les stries isolantes entre les
  contacts. Vous pouvez l'abmer si vous n'utilisez pas un tournevis
  avec une tte qui a presque la mme paisseur que les contacts ou si
  le tournevis glisse du contact alors que vous le poussez vers le bas.
  Vous pouvez aussi utiliser un petit marteau pour faire contrepoids sur
  le tournevis (poussez d'abord  la main).

  Assurez-vous de ne pas abmer le "levier d'extraction" sur le
  connecteur quand vous poussez sur les contacts. Ne le posez pas
  simplement sur une table en poussant les contacts. Il est prfrable
  de mettre une cale (d'environ 1 mm d'paisseur) qui se placera
  parfaitement dans la crevasse entre le levier et le corps. Pour une
  telle cale vous pouvez utiliser du bristol pais, plusieurs cartes
  tlphoniques ou du bois. Puisque le dessous du connecteur (que vous
  mettrez sur la table) n'est pas droit ( cause du "levier
  d'extraction"), assurez-vous que le dessus de la table est recouvert
  de quelque chose de mou (comme un morceau de carton) pour aider 
  supporter le connecteur qui n'est pas droit. Encore mieux  : vous
  pourriez mettre une autre cale d'un millimtre sous les 6 premiers
  millimtres du connecteur en le supportant juste en dessous de la
  partie visible des contacts. Un dessus de table mou ne peut pas faire
  de mal non plus. Une autre mthode (je n'ai jamais fait cela) est de
  mettre le connecteur dans un tau mais faites attention  ne pas
  casser le connecteur.

  En comparaison de l'utilisation d'un outil de sertissage,
  l'installation comme indiqu ci-dessus prend beaucoup plus de temps et
  est plus sujette aux erreurs mais c'est quelquefois plus expditif et
  bien moins cher que d'acheter un outil spcial si vous n'avez qu'un ou
  deux connecteurs  installer.


  1122..  MMiissee eenn ppllaaccee ((ccoonnffiigguurraattiioonn)) eenn ggnnrraall






  1122..11..  IInnttrroodduuccttiioonn  llaa ccoonnffiigguurraattiioonn


  La configuration (mise en place) ncessite  la fois de stocker la
  configuration dans la mmoire non volatile du terminal et de mettre
  des commandes dans les fichiers de dmarrage (sur votre disque dur)
  qui se lanceront  chaque fois que l'ordinateur est allum (ou
  peut-tre aussi  chaque changement de niveau d'excution). Cette
  section donne une vue d'ensemble de la configuration et couvre la
  configuration des principales options de communication  la fois pour
  le terminal et pour l'ordinateur. Les deux grandes sections suivantes
  couvrent la configuration du terminal (voyez ``mise en place du
  terminal'' et de l'ordinateur (voyez ``dtails de la mise en place de
  l'ordinateur (configuration)''.


  1122..22..  VVuuee dd''eennsseemmbbllee ddee llaa mmiissee eenn ppllaaccee ((ccoonnffiigguurraattiioonn)) dduu tteerrmmiinnaall


  Quand un terminal est install il est ncessaire de configurer le
  terminal physique en sauvant (dans sa mmoire non volatile qui n'est
  pas perdue lorsque l'on teint le terminal) les caractristiques qu'il
  aura au dmarrage. Vous pouvez avoir de la chance et avoir un terminal
  qu'on a dj configur correctement pour votre installation de sorte
  que peu ou aucune configuration sur le terminal ne soit ncessaire.

  Il y a deux faons simples de configurer un terminal. L'une est de
  s'asseoir devant le terminal et de parcourir un ensemble de menus de
  configuration.  Une autre est d'envoyer des squences d'chappement au
  terminal  partir de l'ordinateur hte. Avant que vous n'envoyiez quoi
  que ce soit au terminal (comme les squences d'chappement ci-dessus),
  ses options d'``interface de communication'' comme la vitesse de
  transmission doivent tre configures pour correspondre  celles de
  l'ordinateur. On ne peut faire ceci qu'en s'asseyant devant le
  terminal puisqu'il faut configurer la communication correctement avant
  que l'ordinateur et le terminal ne puissent se "parler". Voyez
  ``configuration du terminal''.


  1122..33..  VVuuee dd''eennsseemmbbllee ddee llaa mmiissee eenn ppllaaccee ((ccoonnffiigguurraattiioonn)) ddee ll''oorrddiinnaa
  tteeuurr


   part peut-tre l'envoi de squences d'chappement  partir de
  l'ordinateur pour configurer le terminal, il faut configurer
  l'ordinateur lui-mme pour grer le terminal. Si vous avez de la
  chance tout ce que vous avez  faire est d'ajouter une commande
  "getty" dans le fichier /etc/inittab pour qu'une invite "login:" soit
  envoye au terminal quand l'ordinateur dmarre. Voyez ``getty'' pour
  plus de dtails.

  L'ordinateur communique avec le terminal en utilisant un logiciel de
  pilote de priphrique (qui fait partie du noyau). Le pilote de
  priphrique srie possde une configuration par dfaut et est aussi
  configur en partie (parfois en totalit) par le programme getty avant
  de lancer "login" sur chaque terminal. Cependant, des configurations
  supplmentaires sont souvent ncessaires en utilisant des programmes
  appels "stty" et "setserial". Ces programmes (si besoin est) doivent
  tre lancs  chaque fois que l'ordinateur dmarre puisque la
  configuration est perdue  chaque fois que l'ordinateur s'teint.
  Voyez ``dtails de la mise en place de l'ordinateur (configuration)''.





  1122..44..  BBeeaauuccoouupp dd''ooppttiioonnss


  Il y a normment d'options de configuration dans lesquelles vous
  pourrez piocher. Les options de communication doivent tre correctes
  ou le terminal ne fonctionnera pas du tout. D'autres options peuvent
  tre incorrectes, mais ne causeront pas de problmes puisque les
  possibilits qu'elles introduisent ne sont pas utilises. Par exemple,
  si vous n'avez pas d'imprimante relie au terminal, la manire dont
  sont positionns les paramtres de configuration de l'imprimante dans
  le terminal n'a aucun effet. Cette dernire affirmation n'est pas
  correcte  100 %.  Supposez que vous n'avez pas d'imprimante mais que
  l'ordinateur envoie (par erreur) au terminal une commande pour
  rediriger tous les caractres (les donnes) de l'ordinateur vers
  l'imprimante uniquement. Alors rien ne s'affichera sur l'cran et
  votre terminal sera mort. Certains terminaux possdent une option de
  configuration pour informer le terminal qu'aucune imprimante n'est
  prsente. Dans ce cas le terminal ignorera toute commande qui
  redirigerait la sortie vers "l'imprimante" et le problme ci-dessus
  n'arrivera jamais. Cependant, ceci n'apporte pas beaucoup d'aide
  puisqu'il y a beaucoup d'autres commandes erronnes qu'on peut envoyer
   votre terminal et qui smeront vraiment la pagaille. Cela arrivera
  srement si vous envoyez un fichier binaire au terminal par accident.

  Dans certains cas un paramtrage incorrect ne causera aucun problme
  jusqu' ce qu'il vous arrive de lancer une application peu connue qui
  attend du paramtre qu'il soit positionn d'une certaine faon.
  Certaines options ne concernent que l'apparence de l'affichage et le
  terminal fonctionnera correctement si elles sont mal positionnes mais
  ne sera pas aussi beau  regarder.

  Certaines options ne concernent que le terminal et n'ont pas besoin
  d'tre positionnes sur l'ordinateur. Par exemple : voulez-vous des
  lettres noires sur un fond clair ? C'est plus agrable  l'oeil qu'un
  fond noir. Une touche qu'on appuie doit-elle se rpter ? Est-ce que
  l'cran doit dfiler quand une ligne dpasse le bord droit de l'cran
  ? Est-ce que les touches doivent mettre un cliquetis ?


  1122..55..  OOppttiioonnss ddee ll''iinntteerrffaaccee ddee ccoommmmuunniiccaattiioonn


  Certains paramtres (options) de communication concernent  la fois le
  terminal et l'ordinateur et doivent tre positionns exactement 
  l'identique sur les deux : vitesse, parit, bits/caractres et
  contrle de flux. D'autres options de communication ne sont
  positionnes que sur le terminal (et uniquement certaines d'entre
  elles sont essentielles pour tablir une communication). D'autres
  encore comme l'adresse et l'interruption (IRQ) du port physique ttyS
  ne sont positionnes que sur l'ordinateur en utilisant la commande
  "setserial". Jusqu' ce que toutes les options essentielles ci-dessus
  soient paramtres de manire compatible on ne pourra pas faire de
  communication srie satisfaisante (et srement pas de communication du
  tout) entre le terminal et l'ordinateur. Pour le terminal, on doit
  positionner ces options  la main avec des menus sur chaque terminal
  (ou en utilisant une sorte de cartouche spciale sur chaque terminal).
  L'ordinateur hte est configur en lanant des commandes  chaque
  dmarrage de l'ordinateur (ou quand les gens se loggent). Quelquefois
  le programme getty (qu'on trouve dans le fichier /etc/inittab) qui
  dmarre le processus login s'occupera de ceci pour l'ordinateur. Voyez
  ``getty (dans /etc/inittab)''.

  Les paramtres  la fois pour l'ordinateur et le terminal sont :



    ``vitesse (bits/seconde)''

    ``parit''

    ``bits par caractre''

    ``contrle de flux''

  Certains paramtres essentiels au terminal seul sont :


    ``slection du port''

    Positionner la communication en full duplex (=FDX sur les terminaux
     Wyse)


  Si le programme ``getty (dans /etc/inittab)'' ne peut pas paramtrer
  la partie ct ordinateur de la manire dont vous le dsirez, vous
  aurez alors besoin d'utiliser l'une des commandes ``stty et
  setserial'' (ou les deux).


  1122..55..11..  VViitteessssee


  Elle doit tre identique  la fois sur le terminal et l'ordinateur. La
  vitesse est en bits/seconde (bps ou vitesse en bauds). Utilisez la
  vitesse la plus grande qui fonctionne sans erreurs. Autoriser le
  contrle de flux peut rendre possible des vitesses plus leves. Il se
  peut qu'on puisse configurer deux vitesses sur le terminal :
  transmission et rception, qu'on abrge parfois en T et R. On leur
  donne en gnral la mme valeur puisque stty dans Linux ne semble pas
  encore avoir l'option de les positionner diffremment.  (Il y a une
  option pour faire ceci avec la commande "stty" mais en ralit il
  semble qu'elle leur donne la mme valeur.) Les vitesses courantes sont
  300, 600, 1200, 2400, 4800, 9600, 19200, 38400 ... Les vitesses basses
  (comme 600) sont faites pour les imprimantes et les terminaux  sortie
  papier.


  1122..55..22..  PPaarriitt eett ddeevvrriieezz--vvoouuss ll''uuttiilliisseerr ??


  Pour une dfinition, voyez ``la parit explique''.  La parit
  dsactive est souvent la valeur par dfaut. Pour activer la parit,
  vous devez  la fois l'activer et ensuite slectionner une parit
  paire ou impaire.  Cela ne fait probablement pas de diffrence si
  c'est pair ou impair. Pour les terminaux il y a parfois des paramtres
  de parit pour la transmission et la rception. Vous devriez
  positionner les deux  la mme valeur puisque stty sur l'ordinateur ne
  permet pas un paramtrage diffrent.

  Est-ce vous devriez utiliser la parit ? Il est bon de disposer de la
  parit, bien qu'elle ne soit pas strictement ncessaire. Si vous
  n'avez pas de parit, vous pourrez avoir une lettre incorrecte ici ou
  l et finirez par corriger des fautes d'orthographe qui n'existent pas
  vraiment. Cependant, la parit a un cot. D'abord, elle est lgrement
  plus complique  configurer puisqu'en gnral par dfaut il n'y a pas
  de parit. Ensuite, la parit diminuera la vitesse avec laquelle les
  octets traversent le cble puisqu'il y aura un bit supplmentaire par
  octet. Ceci peut ou peut ne pas diminuer la vitesse effective.

  Par exemple, un terminal  sortie papier est en gnral limit par la
  mcanique du processus d'impression. L'augmentation des octets/seconde
  quand l'ordinateur (sa puce UART) est en train de transmettre ne
  conduit qu' plus de signaux "d'arrt" de contrle de flux pour
  permettre au mcanisme d'impression de rattraper le rythme.  cause
  des attentes supplmentaires dues au contrle de flux, la vitesse
  effective n'est pas meilleure sans parit qu'avec. La situation est
  identique pour certains terminaux : aprs avoir mis en place la parit
  il peut y avoir moins d'attente due au contrle de flux par unit de
  temps ce qui rsulte en plus de bits/seconde (en moyenne). Cependant,
   cause des bits de parit ajouts, le nombre d'octets/seconde (en
  moyenne) reste le mme.

  Une possibilit est d'installer les terminaux sans parit. Ensuite si
  on remarque des erreurs de parit, on peut l'activer plus tard. Pour
  dtecter des erreurs possibles sans parit, regardez des erreurs de
  frappe que vous ne pensez pas avoir faites. Si vous dtectez une telle
  erreur, rafraichissez l'cran (retransmettez de l'ordinateur). Si
  l'erreur s'en va, c'est alors srement une erreur de parit. Si trop
  d'erreurs surviennent (comme plus d'une par quelques centaines
  d'crans), il faut faire une action corrective comme : activer la
  parit et/ou rduire la vitesse et/ou utiliser un cble plus
  court/meilleur. Activer la parit ne rduira pas le nombre d'erreurs
  mais vous signalera quand une erreur s'est produite.

  La politique oppose est d'activer la parit ds le dpart. Ensuite si
  on ne voit jamais d'erreur de parit (des symboles d'erreur sur
  l'cran), sur une priode de temps raisonnable, disons un mois ou
  deux, on peut la dsactiver sans danger.


  1122..55..33..  BBiittss//ccaarraaccttrree


  C'est la taille d'un caractre (le nombre de bits de donnes par
  caractre, en excluant tout bit de parit).  Pour l'ASCII, c'est 7,
  mais c'est 8 pour les jeux de caractres ISO. Si vous n'allez utiliser
  que des caractres ASCII, slectionnez alors 7 bits puisqu'il est plus
  rapide de transmettre 7 bits que 8. Certains vieux terminaux
  n'afficheront que des caractres 7 bits.


  1122..55..44..  QQuueell ccoonnttrrllee ddee fflluuxx ((pprriissee ddee ccoonnttaacctt)) ??


  Il faut choisir entre le contrle de flux "matriel" (par exemple
  rts/cts ou dtr/cts) et "logiciel" (Xon/Xoff). (le menu du terminal
  Adds utilise de manire incorrecte "Xon/Xoff" pour indiquer tout type
  de contrle de flux.)  Bien que le contrle de flux matriel soit plus
  rapide (si les deux fils supplmentaires ncessaires sont prsents
  dans le cble et si le terminal le supporte) dans la plupart des cas
  Xon/Xoff devrait fonctionner correctement.  Certaines personnes disent
  qu'elles ont rsolu des problmes drangeants (voir ci-dessous) en
  passant au contrle de flux matriel mais le contrle de flux logiciel
  a bien fonctionn sur les autres installations (et chez moi
  personnellement).

  Si vous utilisez le contrle de flux logiciel (Xon/Xoff) et avez des
  utilisateurs qui ne le savent pas, ils peuvent alors envoyer par
  accident un Xoff  l'hte et bloquer leur terminal. Pendant qu'il est
  bloqu, ils peuvent trs bien taper frntiquement en une vaine
  tentative pour le dbloquer.  Quand alors Xon est enfin envoy pour
  rtablir la communication, tout ce qui a t tap  toute vitesse est
  excut, peut-tre avec des rsultats inattendus. Ils ne risquent pas
  ceci avec le contrle de flux matriel.  Voyez ``contrle de flux''
  pour une explication sur le contrle de flux.



  1122..55..55..  SSlleeccttiioonn dduu ppoorrtt


  Puisque la plupart des terminaux possdent deux connecteurs ou plus
  derrire eux, il est en gnral possible de dire que l'un de ces
  connecteurs sera reli  l'ordinateur et de dire que l'autre
  connecteur sera le port imprimante. Il peut y avoir un nom  ct du
  connecteur (regardez-le bien) et ce nom (comme Aux ou Serial 2, ou
  Modem) peut tre donn  la connexion vers l'hte principal ou vers
  l'imprimante (ou autre).


  1122..66..  EEssssaaii rraappiiddee


  Bien que tout ce qui est au-dessus puisse sembler trs compliqu,
  faire fonctionner un terminal est souvent assez simple. La section
  ``installation rapide'' dcrit une manire simple d'essayer de le
  faire. Mais si cela ne fonctionne pas ou si vous voulez amliorer
  l'affichage, vous avez besoin d'en lire plus.


  1133..  DDttaaiillss ddee llaa mmiissee eenn ppllaaccee ((ccoonnffiigguurraattiioonn)) dduu tteerrmmiinnaall


   part la prochaine sous-section qui dcrit l'envoi de squences
  d'chappement au terminal, cette section prsente principalement les
  dtails de la configuration du terminal  la main en s'asseyant devant
  le terminal et en se dplaant entre diffrents menus. Si vous ne
  l'avez pas encore fait, vous devriez lire ``vue d'ensemble de la mise
  en place (configuration) d'un terminal''.  C'est mieux si vous avez le
  manuel du terminal, mais mme si vous ne l'avez pas il y a ici des
  informations concernant beaucoup d'options que vous serez peut-tre
  amen  configurer.

  Les paramtres de communication tels que la vitesse d'envoi doivent
  toujours tre configurs sur le terminal puisque si vous ne le faites
  pas ici on ne peut pas communiquer avec le terminal. Une fois que la
  communication est tablie vous avez deux choix pour effectuer le reste
  de la configuration du terminal. Vous pouvez continuer  faire la
  configuration  la main sur le terminal et sauver les rsultats dans
  la mmoire permanente du terminal ou vous pouvez le faire en envoyant
  des squences d'chappement au terminal  partir de l'ordinateur 
  chaque fois que le terminal est allum.

  Si vous savez comment mettre en place et sauver une bonne
  configuration dans le terminal ce peut tre la meilleure faon. Si
  vous ne savez pas, vous pouvez simplement envoyer la chane
  d'initialisation de terminfo  votre terminal  chaque fois que vous
  utilisez le terminal. Peut-tre que ne rien faire vous donnera quand
  mme un terminal utilisable. Vous (ou une application) pouvez toujours
  changer les choses en envoyant certains squences d'chappement au
  terminal.


  1133..11..  EEnnvvooyyeerr ddeess ssqquueenncceess dd''cchhaappppeemmeenntt aauu tteerrmmiinnaall


  Une fois que l'interface de communication est en place, le reste de la
  configuration des terminaux peut parfois tre fait en envoyant des
  squences d'chappement aux terminaux depuis l'ordinateur. Si vous
  avez un grand nombre de terminaux, il peut tre utile d'crire (ou de
  trouver) un script shell pour faire ceci de manire automatique. Il
  peut (ou non) y avoir une commande  envoyer au terminal pour lui dire
  de sauver sa configuration en cours dans sa mmoire permanente pour
  qu'elle soit prsente la prochaine fois qu'on allumera le terminal.
  Il y a une manire simple d'envoyer ces squences d'chappement et une
  manire complique. Pour la manire simple vous ne regardez jamais les
  squences d'chappement mais envoyez des commandes qui trouvent toutes
  seules la squence d'chappement approprie dans la base de donnes
  terminfo et l'envoient. Malheureusement, toutes les squences
  d'chappement que vous avez besoin d'envoyer ne sont pas toujours dans
  la base de donnes terminfo. Ainsi la manire plus complique (mais
  peut-tre meilleure) est d'envoyer directement les squences
  d'chappement.

  Pour cette mthode complique vous aurez besoin d'un manuel avanc.
  Les vieux manuels de terminaux comprenaient autrefois une liste
  dtaille de squences d'chappement mais les manuels rcents n'en ont
  gnralement pas. Pour les trouver vous devrez peut-tre acheter un
  autre manuel intitul "manuel du programmeur" (ou similaire) qui n'est
  pas fourni avec le terminal. Une ``liste de squences d'chappement''
  de certains terminaux est sur Internet mais c'est une liste brute et
  srement incomplte.

  Mme sans manuel ou autre, vous pouvez quand mme envoyer des
  commandes pour configurer le terminal en utilisant les programmes
  "tput" et "setterm". Voyez ``changer les paramtres du terminal''.
  Vous pourriez simplement envoyer une chane d'initialisation au
  terminal  partir de l'entre terminfo si la chane d'initialisation
  configure le terminal comme vous le dsirez. Voyez ``chane
  d'initialisation''.  Except si vous pensez envoyer ces squences de
  l'ordinateur au terminal  chaque fois que vous allumez ce dernier,
  vous devez sauver ces paramtres dans la mmoire permanente du
  terminal.


  1133..22..  CCoonnffiigguurraattiioonn ddeess vviieeuuxx tteerrmmiinnaauuxx


  Sur les vieux terminaux, cherchez sur le clavier des noms juste au-
  dessus de la range suprieure du pav numrique. S'ils existent, ces
  noms peuvent reprsenter l'action des touches en mode configuration.
  Certains vieux terminaux peuvent n'avoir qu'un menu de configuration
  (setup). Certains encore plus anciens possdent des interrupteurs
  physiques. Dans certains cas toutes les touches ne sont pas bien
  nommes mais peuvent tre bien caches.  Bien sr, si vous activez
  quelque chose en basculant un interrupteur, c'est "sauvegard" et vous
  n'avez pas besoin de sauver le paramtre en mmoire permanente.


  1133..33..  EEnnttrreerr ddaannss llee mmooddee ddee ccoonnffiigguurraattiioonn


  Pour slectionner des options (configurer) sur le terminal, vous devez
  d'abord entrer en mode "setup" et ensuite slectionner des options
  (c'est--dire configurer) en utilisant des menus stocks dans le
  terminal et affichs sur l'cran. Pour ce faire, le terminal n'a mme
  pas besoin d'tre reli  un ordinateur. La manire d'entrer en mode
  de configuration est explique dans le manuel du terminal, mais voici
  quelques indices :

  S'il y a une touche "setup", essayez de l'enfoncer. Essayez aussi en
  appuyant sur la touche "Shift" en mme temps.


    Wyse : essayez d'abord la touche "Shift" + "Select" ; ensuite
     remplacez Shift par Ctrl dans tout ce qui est au-dessus.

    VT, Dorio : F3 peut tre la touche de configuration. Sur les VT420
     et modles postrieurs cette touche peut avoir t reprogramme
     pour faire autre chose, alors teignez le terminal. Quand vous
     remettrez le courant, appuyez sur la touche F3 ds que vous obtenez
     un message initial  l'cran.

    IBM : 3151 : Ctrl-ScrollLock. 3153 : Ctrl-Moins_du_pav_numrique
     (ou pareil que pour le 3151).

  Pour vous dplacer dans les menus de configuration, utilisez les
  touches flches. Utilisez Retour, Espace ou une touche spciale
  ("toggle" sur les vieux terminaux) pour slectionner quelque chose.
  Pour sortir du mode de configuration choisissez exit dans un menu (ou
  sur certains vieux terminaux appuyez de nouveau sur la touche setup).


  1133..44..  OOppttiioonnss ddee ccoommmmuunniiccaattiioonn


  Pour que le terminal fonctionne, il faut paramtrer correctement la
  vitesse, la parit, le nombre de bits par caractre et le mode de
  communication. Un contrle de flux incorrect peut tre la cause de la
  perte ou de la corruption des donnes affiches  l'cran. On a parl
  des options de communication essentielles ( la fois pour le terminal
  et pour l'ordinateur) dans une autre section : voyez ``interface de
  communication''.  La liste suivante fournit quelques liens dans cette
  section, ainsi que des options de communication supplmentaires
  positionnes uniquement sur le terminal.


    ``Vitesse (bits/seconde)'' (vitesse de transmission) : 9600, 19200,
     etc.

    ``Parit'' : aucune, paire, impaire, marque, espace

    ``Bits par caractre'' {Donnes} : 7 ou 8

    ``Contrle de flux'' ou prise de contact {Hndshk} : aucun, Xon-
     Xoff, ou matriel (DTR, etc)


    Prise de contact du rcepteur {Rcv Hndshk} protge les donnes
     reues par le terminal en envoyant des signaux de contrle de flux
      l'hte.

    Prise de contact de l'metteur {Xmt Hndshk} est une protection des
     donnes transmises par le terminal. Le terminal reoit des signaux
     de contrle de flux (et bloque/dbloque le clavier). Comprend
     "Xon/Xoff entrant".


    Nombre de bits d'arrt :  1 ou 2. Voyez ``squence de tension pour
     un octet''

    Niveau de contrle de flux {Rcv Hndshk Level} {{Xoff  ...}} : le
     contrle de flux enverra un "arrt" quand ce nombre d'octets sera
     dpass dans le tampon du terminal.

    ``Mode de communication'' {Comm} : ``Full Duplex {FDX}, Half Duplex
     {HDX}'' {{Local Echo}}, ``Mode Local'' {{Online/Local}}

    Limite du taux de transmission (vitesse) {Xmt Lim} : limite le taux
     de transmission au nombre de cps (caractres par seconde) spcifi
     mme si la vitesse est plus grande.

    Limite du taux de touches de fonction : comme ci-dessus mais pour
     les messages de touches de fonction.


    ``Slection du port'' : quel connecteur physique va  l'hte {Host
     Port} ?


  1133..55..  SSaauuvveerr llaa ccoonnffiigguurraattiioonn


  Votre configuration doit tre sauve dans la mmoire permanente du
  terminal pour tre en place la prochaine fois que vous allumez le
  terminal. Si vous manquez  cette sauvegarde, les nouveaux paramtres
  seront perdus quand vous teindrez le terminal. Avant de vous fatiguer
   configurer un terminal, assurez-vous que vous savez sauvegarder les
  paramtres. Sur les terminaux modernes la commande de sauvegarde se
  fait grce  un menu. Dans certains vieux terminaux, seul le manuel
  vous indique comment sauver. Pour beaucoup d'entre eux, pressez Ctrl-S
  pour sauver.


  1133..66..  PPaarraammttrreess//ooppttiioonnss ddee ccoonnffiigguurraattiioonn


  Voyez la page de configuration <http://www.pericom-
  usa.com/twdocs/doc/twusec7.htm> de Teemworld pour avoir une
  description d'un grand nombre de ces paramtres utiliss en mulation
  de terminaux.  L'mulation est souvent lgrement diffrente du
  terminal rel.

  Ce qui suit dans cette section dcrit certaines options disponibles
  dans les menus de configuration de beaucoup de terminaux. Les options
  sont aussi appeles paramtres ou capacits. Beaucoup d'options sont
  parfois appeles "modes". Paramtrer des options est souvent appel
  "configurer". On peut paramtrer beaucoup de ces options en envoyant
  certaines squences d'chappement au terminal. Des modles et marques
  diffrents de terminaux ont des options varies et la mme option peut
  avoir des noms diffrents (qu'on ne donnera pas tous ici). Les noms
  abrupts utiliss par Wyse sont entours de {...}. Les noms utiliss
  principalement pour les terminaux VT sont entours de {{...}}.


  1133..77..  mmuullaattiioonn {{PPeerrssoonnnnaalliitt}} {{{{MMooddeess ddee tteerrmmiinnaauuxx}}}}


  La plupart des terminaux modernes peuvent muler plusieurs autres
  terminaux.  Le terminal peut srement faire plus si on le fait
  s'muler lui-mme (en fait sans mulation) {personnalit native}.
  Quelque fois il y deux mulations diffrentes pour le mme modle de
  terminal. Par exemple, VT220-7 mule un VT220 avec 7 bits par octet
  alors que VT220-8 mule un VT220 avec 8 bits par octet (256 caractres
  possibles).

  Des vieux modles de terminaux possdent en gnral moins de
  possibilits que les modles plus rcents. Supposez qu'on veuille
  muler un vieux terminal tout en gardant certaines possibilits
  avances du modle de terminal plus rcent devant lequel on s'assied.
  Ceci est parfois possible (jusqu' un certain niveau). Cette
  possibilit est parfois appele {Enhance} (ou Enhanced ??).


  1133..88..  OOppttiioonnss dd''aaffffiicchhaaggee



  1133..88..11..  TTaaiillllee ddee cceelllluullee ddee ccaarraaccttrree{{CChhaarr CCeellll}}



  C'est la taille de la cellule dans laquelle tient un caractre. On la
  mesure en pixels (= petits points). Plus il y a de points, meilleure
  est la rsolution. 10x16 reprsente 10 points de large sur 16 points
  de haut (16 lignes et 10 colonnes). Notez que la notation est inverse
  par rapport  la notation de la dimension des matrices qui donnent les
  lignes (la hauteur) d'abord. De mme, la cellule de caractre comprend
  les lignes et les colonnes alloues  l'espace entre des caractres
  adjacents, donc la taille de la cellule qui dfinit les bords d'un
  caractre rel peut tre plus petite.


  1133..88..22..  CCoolloonnnneess // lliiggnneess


  En gnral il y a 80 colonnes et 24 ou 25 lignes. Ceci veut dire qu'il
  peut y avoir jusqu' 80 caractres sur une ligne de l'cran. Beaucoup
  de terminaux possdent une option de 132 caractres par colonne mais,
  sauf si vous avez un grand cran, les petits caractres peuvent tre
  difficiles  lire. {{Activer le mode 132 colonnes}}


  1133..88..33..  CCuurrsseeuurr


  On peut paramtrer le curseur pour qu'il apparaisse comme un rectangle
  (= bloc) {Blk}. D'autres options sont le soulign {Line} ou le
  clignotement. Je prfre un bloc non clignotant {Steady} puisqu'il est
  suffisamment grand pour qu'on le trouve rapidement sans qu'il y a ait
  de clignotement distrayant. Si vous le rendez invisible (une option
  sur certains terminaux) il disparatra mais les nouveaux caractres
  apparatront  l'cran au fur et  mesure que vous tapez sous le
  curseur invisible.


  1133..88..44..  AAttttrriibbuuttss dd''aaffffiicchhaaggee ((ccooookkiieess mmaaggiiqquueess))


  Les ``attributs d'affichage'' peuvent tre soit des cookies magiques
  soit des octets d'attributs assigns  chaque caractre. Pour les
  cookies magiques, il y a une limite  leur tendue : leur effet
  s'tend-il jusqu' la fin de la ligne ou jusqu' la fin de la page ?
  Il est mieux d'utiliser des octets d'attributs (qui peuvent en ralit
  tre des demi-octets = petits bouts).


  1133..88..55..  CCaarraaccttrreess ddee ccoonnttrrllee dd''aaffffiicchhaaggee {{MMoonniittoorr}}


  Ils peuvent avoir des noms varis tels que "contrles d'affichage".
  Dsactivs (par dfaut), ils veulent dire "interprter les caractres
  de contrle". Quand on les active, vous voyez les squences
  d'chappement de l'hte (que vous ne voyez jamais  l'cran en temps
  normal). Pour que ces squences soient visualises d'un coup sur une
  ligne, le terminal ne les interprte pas, sauf la squence CR LF, qui
  cre une nouvelle ligne. Voyez ``codes de contrle''.


  1133..88..66..  LLaarrggeeuurr//hhaauutteeuurr ddoouubbllee


  Certains terminaux peuvent afficher des caractres en largeur et/ou en
  hauteur double. Cette possibilit est rarement ncessaire. En
  changeant une ligne en largeur double (DW = Double Width) la moiti
  gauche (RH = Right Half) est pousse  l'extrieur de l'cran et il
  faut se poser la question de l'effacer ou non. "Prserver" veut dire
  garder la moiti gauche des lignes en largeur double. En mode hauteur
  double, il peut tre ncessaire d'envoyer chacune de ces lignes deux
  fois (la deuxime fois une ligne plus bas) pour obtenir une ligne en
  hauteur double  l'cran.


  1133..88..77..  VViiddoo iinnvveerrssee {{DDiissppllaayy}} ((FFoonndd ccllaaiirr//ffoonncc))


  La vido normale consiste en des lettres (premier plan) claires
  (blanches, vertes, ambre) sur un fond fonc (noir). La vido inverse
  {Display Light} est le contraire : du texte noir sur un fond clair.
  Cela est plus commode pour les yeux (sauf si la pice est sombre).


  1133..88..88..  LLiiggnnee dd''ttaatt


  Une ligne d'tat est une ligne en haut ou en bas de l'cran qui
  affiche des informations sur l'application en cours d'utilisation.
  Elle est souvent mise en valeur d'une certaine manire. Avec une telle
  ligne d'tat, une application peut envoyer au terminal une squence
  d'chappement spciale qui veut dire que le texte qui suit concerne la
  ligne d'tat. Cependant, beaucoup d'applications n'utilisent pas cette
  possibilit et  la place simulent une ligne d'tat relle en
  positionnant directement le curseur. L'utilisateur de base qui le
  regarde ne voit pas la diffrence.


  1133..88..99..  PPeennddaanntt llee cchhaannggeemmeenntt 8800//113322 :: eeffffaacceerr oouu pprrsseerrvveerr ??


  En basculant le nombre de colonnes de 80  132 (ou l'inverse), est-ce
  que les donnes affiches dans le format prcdent doivent tre
  effaces ou prserves ? {80/132 Clr} {{Screen Width Change}}. La
  manire dont vous positionnez cette option ne devrait pas faire de
  diffrence puisque si une application utilise 132 colonnes, elle
  devrait positionner cette option correctement grce  une squence
  d'chappement.


  1133..99..  OOppttiioonnss lliieess aauuxx ppaaggeess


  Pour qu'un terminal Wyse puisse accder  plusieurs pages dans la
  mmoire d'affichage, il faut activer {Multipage}.


  1133..99..11..  TTaaiillllee ddee llaa ppaaggee


  La mmoire du terminal peut tre divise en un certain nombre de
  pages. Voyez ``pages'' et ``pages (dfinition)'' pour une explication
  sur les pages. Vous pouvez partitionner la mmoire de pages en un
  certain nombre de pages de taille dtermine. Les applications Linux
  ne semblent pas utiliser les pages pour le moment, il ne devrait donc
  pas y avoir de diffrence au niveau de la configuration.


  1133..99..22..  CCoouuppllaaggee ((dduu ccuurrsseeuurr eett ddee ll''aaffffiicchhaaggee))


  La mmoire du terminal peut tre divise en un certain nombre de
  pages. Voyez ``pages'' et ``pages (2)'' pour avoir une explication sur
  les pages. Quand on dplace le curseur  un endroit en mmoire vido
  qui n'est pas affiche  cet instant (comme une autre page, ou sur la
  mme page mais  un endroit non affich  l'cran), est-ce que
  l'affichage doit suivre pour que l'on voie la nouvelle position du
  curseur ?  Si c'est le cas, c'est ce qu'on appelle le "couplage". En
  ce qui concerne le mouvement du curseur dans la mme page, il y a le
  "couplage vertical" et le "couplage horizontal". En ce qui concerne le
  mouvement vers une autre page, il y a le "couplage de page".


  1133..1100..  FFaaiirree uunn rraappppoorrtt eett rrppoonnddrree


  Le terminal donnera son identit et son tat, ou enverra un message
  pr-enregistr en rponse  certaines squences d'chappement.


  1133..1100..11..  MMeessssaaggee ddee rrppoonnssee ((cchhaannee))


  Vous pouvez crire un message court pendant la configuration qui peut
  tre envoy de manire optionnelle  l'hte durant le dmarrage ou
  tre envoy  l'hte en rponse  une demande de l'hte (peut-tre le
  caractre de contrle ENQ (enquire, demande)).


  1133..1100..22..  RRppoonnssee aauuttoommaattiiqquuee


  Si ce paramtre est positionn, envoie le message de rponse  l'hte
  durant le dmarrage sans que l'hte le demande. Est-ce qu'un processus
  "getty" quelconque cherchent ce message ??


  1133..1100..33..  RRppoonnssee ccaacchhee


  Si ce paramtre est positionn, il ne laissera personne voir le
  message de rponse (sauf bien sr l'ordinateur hte). S'il faut le
  modifier, dsactivez "rponse cache" et le message prcdemment cach
  sera dtruit pour que vous puissiez alors entrer un nouveau message
  (mais vous ne verrez pas le message prcdent).


  1133..1100..44..  NNuummrroo IIDD dduu tteerrmmiinnaall {{AANNSSII IIDD}}


  Le terminal envoie cette rponse  la rception d'une demande
  d'identit.


  1133..1111..  OOppttiioonnss dduu ccllaavviieerr



  1133..1111..11..  CClliicc ddee ttoouucchhee


  Quand ce paramtre est positionn, la pression de n'importe quelle
  touche provoque un cliquetis (mis par un minuscule haut-parleur dans
  le clavier).  Ces cliquetis ennuient certaines personnes et je pense
  qu'il est mieux de dsactiver cette option.


  1133..1111..22..  VVeerrrroouuiillllaaggee mmaajjuussccuullee {{KKeeyylloocckk}}


  Quand la touche de verrouillage majuscule est enfonce, les touches
  alphabtiques doivent-elles tre les seules  gnrer des caractres
  en majuscule ? Si le paramtre est positionn  {Caps} ou majuscule
  uniquement (upper-case-only), alors l'appui sur une touche numrique
  avec le verrouillage majuscules tapera le chiffre en question. Pour
  obtenir le symbole au-dessus du chiffre il faudra appuyer sur la
  touche shift  la main.  C'est le mode normal.  S'il est positionn
  sur {Shift} toutes les touches tapent alors le caractre "dcal"
  quand le verrouillage majuscules est enfonc (l'appui sur la touche 5
  devrait afficher % sans devoir appuyer sur Shift, etc.) NdT : sur les
  claviers franais, c'est l'inverse, les chiffres tant normalement
  obtenus en appuyant sur la touche Shift.


  1133..1111..33..  RRppttiittiioonn aauuttoommaattiiqquuee {{RReeppeeaatt}}


  Si on maintient une touche enfonce, celle-ci est "tape" de manire
  rpte.  Cela est pratique pour taper rptitivement le mme
  caractre pour crer une ligne  travers une page.


  1133..1111..44..  SSoonnnneettttee ddee mmaarrggee


  Quand le curseur arrive  8 colonnes du bord droit de l'cran, une
  sonnette sonne (comme sur une vieille machine  crire). Quasiment
  tous les diteurs creront automatiquement une ligne nouvelle si
  ncessaire (pas besoin d'appuyer sur la touche entre), par consquent
  cette possibilit est rarement ncessaire.


  1133..1111..55..  RReeddffiinniirr lleess ttoouucchheess


  Le code envoy  l'hte quand on appuie sur une touche correspond
  normalement au code ASCII de cette touche (et dpend aussi des touches
  Shift et Control).  Sur certains terminaux vous pouvez faire en sorte
  que n'importe quelle touche envoie n'importe quel code. C'est--dire
  que vous pouvez compltement redfinir le clavier en configurant le
  terminal de cette faon. Cela peut tre utile pour certaines langues
  trangres et pour les claviers Dvorak etc.  qui vous permettent de
  taper plus rapidement.


  1133..1111..66..  TToouucchhee ddee ccooiinn ((uunniiqquueemmeenntt ppoouurr lleess WWyyssee))


  Les terminaux Wyse possdent une touche prs du coin infrieur gauche
  qu'on peut configurer pour avoir des fonctions varies. Elle est
  souvent appele "Funct", "Compose Character" ou "Alt". Quand on la met
  sur {Hold} (arrt du dfilement, No-Scroll), elle permet d'arrter le
  flux de donnes (en utilisant le contrle de flux) vers le terminal.
  L'appui  nouveau sur cette touche redonne un flux normal. Quand on la
  met sur {Compose} elle permet de gnrer un nombre limit de
  caractres non-latins prdfinis. Quand on la met sur Meta, cela en
  fait une touche Meta qui positionne le bit de haut rang sur chaque
  octet. Quand on la met sur {Funct} (et qu'on l'enfonce), chaque touche
  alphanumrique enfonce envoie un octet prfixe (SOH) et un octet
  suffixe (CR) qui encadrent le code de l'octet ASCII. Quand on la met
  sur {Kpd Compose} (et qu'on l'enfonce) alors la frappe d'un nombre
  dcimal sur le pav numrique (suivi de "entre") envoie le mme
  chiffre en hexadcimal ??





  1133..1111..77..  EEnnvvooiiss ggrrccee aauu ppaavv nnuummrriiqquuee oouu aauuxx ttoouucchheess ffllcchheess


  On peut configurer le pav numrique (le rectangle de touches presque
  toutes numriques  la droite de la partie principale du clavier) pour
  envoyer des codes spciaux qui feront certaines choses dans certaines
  applications. Idem pour les touches flches. Il y a donc un mode
  "normal" o elles envoient ce qui est marqu sur la touche (ou la
  squence d'chappement normale pour une touche flche) et un mode
  "application" o une squence d'chappement spciale est envoye. Dans
  certains cas il y a un mode numrique "hexadcimal" qui ressemble au
  mode numrique  la diffrence que 6 touches non numriques envoient
  les lettres A  F. On peut ainsi taper par exemple "B36F" sur le pav
  numrique.


  1133..1111..88..  QQuu''eennvvooiieenntt lleess ttoouucchheess SShhiifftt++DDeell eett SShhiifftt++BBaacckkssppaaccee ??


  Selon la manire dont les touches sont configures Shift-Del envoie
  parfois le caractre de contrle CAN et Shift-Backspace envoie parfois
  DEL.


  1133..1111..99..  CCooddeess ddee bbaallaayyaaggee PPCC


  Les terminaux rcents peuvent muler un clavier de PC en envoyant des
  codes de balayage PC (voyez le Keyboard-and-Console-HOWTO) au lieu de
  codes ASCII.  Cela pourrait tre utilis si vous tiez directement
  reli  un PC sous DOS/Windows. Positionnez {Keycode} sur {Scan}.
  L'mulation du "PCTerm" DEC devrait faire la mme chose et mme plus.
  Un port srie sous Linux ne peut pas s'occuper de tels codes de
  balayage.


  1133..1111..1100..  CCaarraaccttrreess aalltteerrnnss


  Certaines touches peuvent contenir des lettres alternatives. Quand on
  positionne les touches sur "machine  crire" (Typewriter) elles
  envoient ce qu'elles enverraient normalement sur une machine  crire.
  Quand on les positionne sur autre chose, les caractres alternatifs
  sont envoys.


  1133..1122..  SSiiggnniiffiiccaattiioonn ddeess ccooddeess ddee ccoonnttrrllee rreeuuss



  1133..1122..11..  NNoouuvveellllee lliiggnnee aauuttoommaattiiqquuee {{NNeewwlliinnee}}


  Dans ce cas "nouvelle ligne" veut dire une ligne nouvelle dmarrant
  sur le bord gauche en dessous de la ligne en cours. Sous Linux et en C
  "nouvelle ligne" (NL) peut avoir une signification diffrente : le
  caractre de saut de ligne LF qu'on appelle aussi nouvelle ligne ou
  NL. C'est parce que dans les fichiers texte Linux, le caractre LF
  veut dire "une nouvelle ligne commence ici" et donc on l'appelle NL.
  Normalement, un LF (NL) envoy  un terminal ne fait que descendre le
  curseur d'une ligne par rapport  l'endroit o il se trouvait et ne
  donne pas une nouvelle ligne.

  Si le paramtre Auto New Line (nouvelle ligne automatique) est
  positionn, la situation "normale" ci-dessus est annule et une
  nouvelle ligne physique est cre sur l'cran en recevant un LF de
  l'hte. C'est exactement ce qu'on veut sous Linux. Sauf que (quand
  Auto New Line est positionn) la touche Retour (ou Entre) envoie une
  squence CR LF  l'hte (pour les Wyse et les VT100, mais pour les
  VT420 ??). Puisque Linux utilise LF comme marqueur de "nouvelle ligne"
  dans les fichiers, Linux n'aimerait recevoir qu'un LF (et pas un CR
  LF). L'option "New Line" est par consquent rarement utilise.  la
  place, les traductions ncessaires sont effectues par le pilote du
  port srie par dfaut. C'est comme si on envoyait la commande "stty
  onlcr icrnl" mais vous n'avez pas besoin de le faire puisque c'est le
  comportement par dfaut.


  1133..1122..22..  SSaauutt ddee lliiggnnee aauuttoommaattiiqquuee {{RRccvv CCRR}}


  Cela est simplement un autre type de "nouvelle ligne automatique".
  Quand un caractre CR (retour chariot) est reu, une action LF (saut
  de ligne) est ajoute ce qui rsulte en l'affichage d'une nouvelle
  ligne. Puisque Linux marque les fins de lignes par LF, cette option
  n'est pas utilise.


  1133..1122..33..  RReeccoonnnnaattrree DDEELL ((sseeuulleemmeenntt ppoouurr WWyyssee ????)) oouu NNUULLLL


  Si ce paramtre est dsactiv, tout caractre DEL reu par le terminal
  est ignor. S'il est activ, DEL effectue un retour en arrire
  destructif. Les caractres NULL sont en gnral ignors dans n'importe
  quel cas. Les caractres DEL et NULL sont parfois utiliss ensemble
  pour faire du remplissage. Voyez ``Remplissage''.


  1133..1133..  OO vvaa llee nnoouuvveeaauu tteexxttee



  1133..1133..11..  PPaassssaaggee  llaa lliiggnnee


  On l'appelle aussi passage automatique (Auto Wrap, Auto Wraparound).
  Qu'arrive-t-il quand on atteint le bord droit de l'cran (colonne 80,
  etc.)  et que l'hte n'a pas envoy de caractre retour (ou autre) ?
  Si le passage  la ligne est activ, le reste de la ligne s'affiche
  alors sur la ligne suivante, etc. Sinon, le reste de la ligne est
  perdu et n'est pas affich  l'cran. Toute application qui se
  respecte devrait envoyer des caractres "retour" pour que le passage
  s'effectue avant d'atteindre le bord de l'cran.  Cependant une
  commande de copie brute (et d'autres situations) peut ne pas le faire,
  il est donc en gnral mieux de positionner le passage  la ligne.

  Pour un cran de 80 colonnes, la plupart des terminaux ne passent  la
  ligne que si le 81me caractre venant de l'hte est un caractre
  graphique (imprimable). Cela autorise les cas o le 81me caractre
  venant de l'hte peut tre un "retour" ou "nouvelle ligne" (caractres
  non graphiques) qui veut dire que l'application gre bien le passage 
  la ligne et le terminal n'a pas besoin d'intervenir.


  1133..1133..22..  DDffiilleemmeenntt


  Le dfilement {Scrl} est quand toutes les lignes de l'cran se
  dplacent vers le haut ou vers le bas. On parle aussi de "panoramique"
  (pan), ce qui comprend un mouvement sur les cts. Dans le dfilement
  ordinaire, les lignes disparaissent vers le bas ou vers le haut de
  l'cran et de nouvelles lignes envoyes par l'hte apparaissent sur le
  bord oppos (haut ou bas). Il y en a trois sortes : doux, par sauts ou
  instantan. Le dfilement instantan n'est pas vraiment un dfilement
  puisqu'il y a remplacement instantan d'une page cran par une
  nouvelle (bien que certaines lignes du nouvel cran puissent provenir
  de l'cran prcdent). Le dfilement par sauts est quand les nouvelles
  lignes arrivent en sautillant les unes aprs les autres [ NdT : en
  fait, elles arrivent une  la fois, mais la tentation tait trop forte
  ;-) ].  Le dfilement doux {Smth} est quand le texte se dplace  une
  vitesse soutenue vers le haut ou vers le bas. Si la vitesse de
  dfilement douce est suffisamment lente, on peut lire les lignes qui
  apparaissent alors qu'elles sont encore en train de bouger (en
  mouvement).

  Le dfilement doux sur les terminaux lents tait utile autrefois
  puisqu'on pouvait continuer  lire alors que l'affichage dfilait.
  Mais avec les vitesses de transfert plus rapides, le dfilement par
  sauts est si rapide qu'on ne perd que peu de temps en attendant
  l'apparition du nouvel affichage.  Puisque la lecture d'un texte qui
  dfile prend lgrement plus de temps que la lecture d'un texte fixe,
  on peut en fait perdre plus de temps si on slectionne un dfilement
  doux.

  Si on dsactive le dfilement automatique {Autoscrl}, le nouveau texte
  venant de l'hte doit aller quelque part, alors il est mis en haut de
  l'affichage.  Si l'ancien texte n'est pas effac, le nouveau texte se
  mlange (de faon insense)  l'ancien. Si le vieux texte est effac,
  le nouveau texte sort alors de son contexte. Conservez donc le
  dfilement automatique.


  1133..1133..33..  NNoouuvveellllee ppaaggee ??


  Voyez ``pages'' et ``pages (dfinition)'' pour avoir une explication
  sur les pages. Quand la page courante est pleine (la dernire ligne
  est termine), est-ce que la page doit dfiler, ou est-ce qu'une
  nouvelle page doit tre cre (laissant la page prcdente stocke
  dans la mmoire d'affichage du terminal) ? Si le paramtre {Autopage}
  est positionn, une nouvelle page est cre. Puisque vous n'utilisez
  probablement pas les pages, vous devriez srement dsactiver ce
  paramtre.


  1133..1144..  TToouucchheess ddee ffoonnccttiioonn


  Ce sont les touches nommes F1, F2, etc. Sur les vieux terminaux elles
  s'appellent peut-tre PF1, PF2, etc. o le P veut dire (P)rogrammable.
  Certains claviers ont les deux. On peut programmer (redfinir) ces
  touches pour envoyer une chane d'octets dfinie par l'utilisateur. On
  peut souvent les "programmer" facilement en utilisant un certain menu
  de configuration {FKey}. Sur certains terminaux, on peut aussi
  spcifier o la chane est envoye quand on appuie sur la touche. En
  mode "normal" l'appui sur la touche ressemble  la frappe d'une chane
  au clavier. En mode "local" l'appui sur la touche envoie la chane au
  terminal (comme si le terminal tait en mode local). On peut utiliser
  cela pour envoyer des squences d'chappement au terminal pour le
  configurer d'une manire spciale. En mode "lointain" la chane est
  toujours envoye sur le port srie vers l'ordinateur hte (mme si le
  terminal est en mode local).


  1133..1155..  OOppttiioonnss eenn mmooddee ppaarr bbllooccss



  Certaines options ne concernent que le cas du ``mode par blocs''.
  Cette option est utile puisqu'elle fournit des formulaires et retire
  une charge  l'hte en transmettant par rafales. Mais c'est plus
  compliqu  configurer et ce n'est donc pas beaucoup utilis.


  1133..1155..11..  AAffffiicchhaaggee ddee ffoorrmmuullaaiirreess


  En mode par blocs, certaines parties de l'cran concernent le texte
  des formulaires et sont donc protges en criture "Prot" {WPRT}. Des
  options peuvent faire que les caractres dans ces parties apparaissent
  assombris, en vido inverse {WPRT Rev} et/ou souligns {WPRT Undrln}.
  {WPRT Intensity} (l'intensit) peut tre sombre, normale ou mme
  vierge (invisible).


  1133..1155..22..  EEnnvvooii ppaarr bbllooccss


  Est-ce que le texte protg en criture (le texte d'origine du
  formulaire) doit tre envoy  l'hte lors de la transmission d'un
  bloc : {Send All} ou est-ce que le texte protg en criture est aussi
  protg en lecture : {Send Erasable} ?


  1133..1155..33..  PPaarrttiiee  eennvvooyyeerr


  Doit-on envoyer l'cran entier ou simplement la partie qui dfile ?
  {Send Area}. L'envoi doit-il s'arrter quand la position courante du
  curseur est atteinte ? Si {Xfer Term} est mis sur Cursor, seules les
  donnes sur l'cran jusqu'au curseur sont envoyes.


  1133..1155..44..  DDlliimmiitteeuurr ddee bblloocc // ddee ppaaggee


  Quel est le symbole de dlimitation  ajouter  un bloc de donnes ?
  {Blk End} ou  la fin d'une page {Send Term}inaison.


  1133..1166..  BBllooccaaggeess


  Il y a divers types de blocages. L'un est le clavier bloqu  cause du
  contrle de flux. Voyez ``blocage du clavier''. Un autre blocage
  {Feature Lock} est celui qui empche l'ordinateur hte de modifier la
  configuration du terminal en envoyant certaines squences
  d'chappement au terminal. Placer un tel verrou peut provoquer des
  comportements inattendus quand les applications enverront des
  squences d'chappement qui seront ignores par le terminal. Tous les
  paramtres de configuration ne sont pas verrouills. Sauf si vous avez
  une bonne raison de le faire, vous ne devriez pas activer de tels
  verrous.

  Un blocage de touche de fonction empchera l'ordinateur de redfinir
  ce qu'envoie une touche de fonction programmable. Vous voudrez
  utiliser cela si vous avez programm quelque chose d'important dans
  les touches de fonction.


  1133..1177..  ccoonnoommiisseeuurr dd''ccrraann {{SSccrrnn SSaavveerr}}



  On l'appelle aussi "CRT Saver" (NdT : ce qui revient au mme). Ceci
  teint (ou diminue la luminosit) de l'cran quand le terminal n'est
  pas utilis pendant un certain temps. La dure de vie de l'cran est
  prolonge et cela peut conomiser de l'nergie. L'appui sur une touche
  permettra en gnral de retrouver l'cran et peut "excuter" cette
  touche donc il est prfrable d'appuyer sur la touche Shift etc.


  1133..1188..  IImmpprriimmaannttee


  Pour les Wyse, s'il n'y a pas d'imprimante relie, dsactivez {Printer
  Attached}. Ce n'est pas essentiel de faire ceci, mais si vous le
  faites toute squence d'chappement envoyant du texte  l'imprimante
  (au lieu du terminal) sera ignore.

  Paramtrer le port de l'imprimante est  peu prs la mme chose (en
  gnral plus simple) que de paramtrer les communications sur le port
  principal. Il y a quelques options spcifiques  l'imprimante. Est-ce
  une imprimante srie ou parallle ? Si c'est parallle, on doit la
  dsigner comme telle dans la configuration et la connecter sur le port
  parallle du terminal (s'il y en a un). Doit-on envoyer un FF (saut de
  page)  l'imprimante  la fin d'un travail d'impression ? Si {Print
  Term} est mis sur FF, c'est ce qui se passera.


  1144..  DDttaaiillss ddee llaa ccoonnffiigguurraattiioonn ddee ll''oorrddiinnaatteeuurr


  Il faut diter plusieurs fichiers pour configurer l'ordinateur pour
  grer le terminal. Si vous avez de la chance, vous ne devrez diter
  que /etc/inittab.  On fait ce travail d'dition  partir de la console
  (ou de n'importe quel terminal qui fonctionne).


  1144..11..  GGeettttyy ((ddaannss //eettcc//iinniittttaabb))


  Afin de lancer un processus de login sur un port srie quand
  l'ordinateur dmarre (ou change de niveau d'excution) une commande
  getty doit tre place dans le fichier /etc/inittab. Getty permet de
  faire fonctionner (GET) un terminal (TTY). Chaque terminal a besoin de
  sa commande getty. Il y a aussi au moins une commande getty pour la
  console dans chaque fichier /etc/inittab.  Trouvez-la et ajoutez-y les
  commandes getty pour les vrais terminaux. Ce fichier peut contenir des
  lignes d'exemples de commandes getty pour les terminaux texte mises en
  commentaire, et donc tout ce qu'il vous reste  faire est d'enlever
  les commentaires (enlevez le # au dbut de la ligne) et de modifier
  quelques arguments.

  Les arguments autoriss dpendent du getty que vous utilisez :

  Les meilleurs getty pour les terminaux relis de manire directe sont
  :


    agetty (qu'on appelle parfois simplement getty) : facile 
     configurer.  Pas de fichiers de configuration. Facile  utiliser
     avec des modems. Voyez ``agetty''

    ``getty (fait partie du paquet getty_ps)''

  Deux gettys plus appropris pour les modems sont :



    mgetty : pour les modems ; utilisation possible avec les terminaux
     mais ce n'est pas trs bien document

    uugetty : uniquement pour les modems, fait partie du paquet
     getty_ps


  Un getty simple  utiliser pour les logins sur la console :


    mingetty : uniquement pour les consoles


  Si vous n'avez pas le getty que vous dsirez, vous pouvez le
  tlcharger dans les logiciels srie
  <http://metalab.unc.edu/pub/Linux/system/serial/>.

  Si vous n'utilisez pas les lignes de contrle du modem (par exemple si
  vous n'utilisez que les 3 conducteurs minimums : transmission,
  rception et masse commune) vous devriez le faire savoir  getty en
  utilisant un drapeau "local". Le format de celui-ci dpend du getty
  que vous utilisez.


  1144..11..11..  AAggeettttyy ((ppeeuutt ss''aappppeelleerr ggeettttyy))


  Un exemple de ligne dans /etc/inittab :
  19200 ttyS1 vt102
  lanc en entrant dans les niveaux d'excution 2 ou 3. respawn veut
  dire que si getty est tu, il se relancera automatiquement.
  /sbin/getty est la commande getty. Le -L veut dire Local (ignorer les
  signaux de contrle du modem). vt102 est le type de terminal et ce
  getty donnera cette valeur  la variable d'environnement TERM. Il n'y
  a pas de fichiers de configuration.  Tapez "init q" sur la ligne de
  commande aprs avoir dit la ligne de getty et vous devriez
  apercevoir une invite de login.

  Le programme agetty dtectera automatiquement la parit configure
  dans le terminal. Si vous utilisez stty pour fixer la parit, agetty
  la dsactivera automatiquement puisqu'il ne veut pas que le pilote
  srie enlve le bit de parit tant donn qu'il a besoin de le voir
  dans un caractre 8 bits afin de dtecter la parit.  Donc, si vous
  utilisez la parit, ne l'activez que du ct du terminal et laissez
  agetty la dtecter automatiquement et la positionner sur l'ordinateur.
  L'invite de login sera brouille jusqu' ce que vous tapiez quelque
  chose et que getty positionne la parit. Faites-moi savoir si vous
  trouvez une manire d'obtenir une invite de login qui ait l'air
  correcte avec la parit en utilisant agetty. L'invite brouille
  repoussera les visiteurs etc. qui essaient de se logger (si c'est ce
  que vous voulez).


  1144..11..22..  ggeettttyy ((ffaaiitt ppaarrttiiee ddee ggeettttyy__ppss))


  (Ceci est tir du vieux Serial-HOWTO de Greg Hankins).
  entres pour getty pour utiliser votre terminal dans le fichier de
  configuration /etc/gettydefs si elles ne sont pas dj prsentes :







  # 38400 bps Dumb Terminal entry
  DT38400# B38400 CS8 CLOCAL # B38400 SANE -ISTRIP CLOCAL #@S @L login: #DT38400

  # 19200 bps Dumb Terminal entry
  DT19200# B19200 CS8 CLOCAL # B19200 SANE -ISTRIP CLOCAL #@S @L login: #DT19200

  # 9600 bps Dumb Terminal entry
  DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S @L login: #DT9600




  Si vous voulez, vous pouvez faire en sorte que getty affiche des
  choses intressantes dans la bannire de login. Dans mes exemples, je
  fais afficher le nom du systme et la ligne srie. Vous pouvez ajouter
  d'autres choses :



       @B    la vitesse courante (value au moment o @B est rencontr).
       @D    la date courante, au format MM/JJ/AA.
       @L    la ligne srie  laquelle est attach getty.
       @S    le nom du systme.
       @T    l'heure courante, au format HH:MM:SS (24 heures).
       @U    le nombre d'utilisateurs actuellement loggs. C'est le compte
             du nombre d'entres dans le fichier /etc/utmp qui possdent
             un champ ut_name non nul.
       @V    la valeur de VERSION, donne dans les fichiers de valeurs par
             dfaut.
       Pour afficher un caractre '@', utilisez soit '\@', soit '@@'.




  Quand vous avez fini d'diter /etc/gettydefs, vous pouvez vrifier que
  la syntaxe est correcte en faisant :



       linux# getty -c /etc/gettydefs




  Assurez-vous qu'il n'y a pas de fichier de configuration getty ou
  uugetty pour le port srie auquel est attach votre terminal
  (/etc/default/{uu}getty.ttyS_N ou /etc/conf.{uu}getty.ttyS_N), car cela
  entrera srement en conflit avec le lancement de getty sur un
  terminal. Enlevez le fichier s'il existe.

  ditez le fichier /etc/inittab pour lancer getty sur le port srie (en
  mettant les informations correctes pour votre environnement -- port,
  vitesse et type de terminal par dfaut) :



       S1:23:respawn:/sbin/getty ttyS1 DT9600 vt100




  Relancez init :




  linux# init q




   ce point, vous devriez voir une invite de login sur votre terminal.
  Vous devrez peut-tre appuyer sur Retour pour que le terminal soit
  attentif.


  1144..11..33..  MMggeettttyy


  Le m veut dire modem. Ce programme est d'abord destin aux modems mais
  il fonctionnera pour les terminaux texte. C'est trs mal document (en
  mi-1998) pour les terminaux et vous devrez parcourir beaucoup de
  documentation sur les modems pour dterminer comment l'utiliser pour
  un terminal. Regardez /etc/mgetty/mgetty.config pour avoir un exemple
  de la configuration d'un terminal. [Note du relecteur : je le trouve
  au contraire bien document (jan 1999) dans man mgetty : un mgetty -r
  -s 9600 /dev/ttyS0 (par exemple) est suffisant. Le -r indique que la
  connexion est directe (sans modem).]


  1144..22..  SSttttyy eett SSeettsseerriiaall


  Il y a  la fois une commande "stty" et une commande "setserial" pour
  configurer les ports srie. Certains (ou tous les) paramtres stty
  ncessaires peuvent tre positionns grce  getty et il peut ne pas
  tre ncessaire d'utiliser setserial ; l'utilisation de ces deux
  commandes peut donc ne pas tre ncessaire. Celles-ci (stty et
  setserial) paramtrent diffrents aspects du port srie. Stty en fait
  la plupart tandis que setserial configure la partie bas niveau comme
  les interruptions et les adresses de ports. Pour "sauvegarder" les
  paramtres, ces commandes doivent tre crites dans certains fichiers
  (scripts shell) qui sont lancs  chaque dmarrage de l'ordinateur.
  Vous pouvez aussi utiliser les commandes stty et setserial sur la
  ligne de commande mais de tels paramtres seront perdus ds que vous
  teindrez l'ordinateur.


  1144..22..11..  SSeettsseerriiaall


  Setserial indique au pilote de port srie  la fois le numro
  d'interruption (IRQ) et l'adresse du port. Il peut vous dire quel type
  de puce UART vous avez si vous utilisez le paramtre autoconfig. Il
  peut paramtrer le temps de fonctionnement du port aprs sa fermeture
  (afin de laisser sortir les caractres qui seraient encore dans son
  tampon en mmoire principale). Cela est ncessaire  des vitesses
  basses de 1200 et moins. Pour que le port srie fonctionne, le module
  srie (dans le noyau Linux) doit tre charg. Si vous utilisez plus de
  deux ports srie et voulez assigner des numros d'IRQ uniques, vous
  devez alors utiliser setserial. Si votre port srie est Plug-and-Play
  vous devriez regarder le Modem-HOWTO, ou ventuellement, le Serial-
  HOWTO.


  1144..22..22..  OO llaanncceerr sseettsseerriiaall ??


  Pour modifier (ou ajouter) une commande setserial, ditez le script
  shell qui lance setserial. Son emplacement dpend de votre
  distribution. Il peut tre dans un rpertoire /etc/rc.d ou dans un
  fichier "rc.serial". Vous devrez peut-tre crer votre propre fichier
   cette fin. Dans la distribution Debian c'tait le fichier 0setserial
  dans /etc/rc.boot.


  1144..22..33..  SSttttyy


  Vous n'avez probablement pas besoin d'utiliser la commande "stty" pour
  configurer si vous utilisez l'un des deux getty suggrs pour faire
  l'quivalent de stty... Vous aurez encore besoin d'utiliser la
  commande stty pour voir comment le port srie est configur et vous
  aurez peut-tre besoin de consulter la page de manuel de stty.

  Stty effectue la majeure partie de la configuration du port srie
  (mais les valeurs par dfaut plus ce que vous modifiez avec getty
  devraient mettre les choses en place correctement). Pour voir comment
  il est configur en ce moment pour le terminal (ou la console) sur
  lequel vous vous trouvez, tapez  l'invite du shell : stty -a. Pour
  d'autres terminaux (comme ttyS1) tapez : stty -a < /dev/ttyS1.  Voici
  quelques uns des items que stty peut configurer : vitesse
  (bits/seconde), parit, bits/octet, nombre de bits de stop, enlever le
  8me bit ?, signaux de contrle du modem, contrle de flux, signal
  d'arrt, dlimiteurs de fin de ligne, changer la casse, remplissage,
  sonner si le tampon dborde ?, cho, permettre  des tches de fond
  d'crire sur le terminal ?, dfinir des caractres spciaux (de
  contrle, comme quelle touche presser pour faire une interruption).
  Voyez la page de manuel de stty ou la page info pour plus de dtails.
  Voyez aussi la page de manuel : termios qui couvre les mmes options
  que stty mais (en mi-1998) couvre des possibilits que les documents
  sur stty ne mentionnent pas. Pour l'utilisation de certains caractres
  spciaux, voyez ``caractres spciaux (de contrle)''.

  Avec certaines implmentations de getty (paquet getty_ps), les
  commandes qu'on enverrait normalement  stty sont entres dans un
  fichier de configuration getty : /etc/gettydefs. Mme sans ce fichier
  de configuration, la ligne de commande de getty devrait suffire pour
  paramtrer les choses de sorte que vous n'ayez pas besoin de stty.

  On peut crire des programmes en C qui modifient la configuration de
  stty etc. Regarder la documentation pour ce faire peut aider quelqu'un
   mieux comprendre l'utilisation des commandes stty (et ses nombreux
  arguments possibles). Le Serial-Programming-HOWTO est utile. La page
  de manuel de termios contient la description de la structure au sens
  langage C (de type termios) qui stocke la configuration de stty dans
  la mmoire de l'ordinateur.  Bien des noms de drapeaux dans cette
  structure C sont quasiment les mmes (et font la mme chose) que les
  arguments de la commande stty.


  1144..22..44..  OO mmeettttrree llaa ccoommmmaannddee ssttttyy ??


  Si getty met correctement les choses en place, vous pouvez sauter
  cette sous-section. Pour que stty configure le terminal  chaque fois
  que l'ordinateur dmarre, vous devez mettre la commande stty dans un
  fichier qui sera excut  chaque dmarrage de l'ordinateur (de
  Linux). Ce fichier devrait tre lanc avant le dmarrage de getty. Il
  y a de nombreux endroits disponibles pour le mettre. S'il est mis 
  plus d'un endroit et que vous n'en connaissez (ou rappelez) qu'un, il
  y aura srement un conflit. Assurez-vous donc de documenter son
  emplacement (peut-tre dans le manuel de votre terminal).

  Un bon endroit pour placer cette commande serait dans le mme fichier
  qui lance setserial quand le systme dmarre. Voyez ``o lancer
  setserial ?''. Il semblerait mieux de la placer aprs la commande
  setserial pour que la partie de bas niveau soit faite en premier.
  Dans la distribution Debian il y a un script /etc/init.d/bootmisc.sh
  mais il est lanc pour l'instant avant 0setserial.


  1144..33..  TTeerrmmiinnffoo eett TTeerrmmccaapp ((bbrreeff))


  Voyez ``Terminfo et Termcap (en dtails)'' pour une discussion plus
  dtaille sur terminfo. Beaucoup d'applications que vous lancez
  utilisent la base de donnes terminfo (anciennement termcap). Celle-ci
  possde une entre pour chaque modle ou type (tel que le vt100) de
  terminal et indique ce que le terminal peut faire, quels codes envoyer
  pour diverses actions, et quels codes envoyer au terminal pour
  l'initialiser.

  Puisque beaucoup de terminaux (et de PC aussi) peuvent muler d'autres
  terminaux et possdent des "modes" d'opration varis, il peut y avoir
  plusieurs entres terminfo parmi lesquelles choisir pour un terminal
  physique donn. Ils auront en gnral des noms similaires. Le dernier
  paramtre de getty ( la fois pour agetty et getty_ps) devrait tre le
  nom terminfo du terminal (ou de l'mulation de terminal) que vous
  utilisez (comme vt100).

  La base terminfo fait plus que simplement spcifier de quoi le
  terminal est capable et de donner les codes  envoyer au terminal pour
  le faire faire certaines choses. Elle spcifie  quoi "gras"
  ressemblera (sera-ce en vido inverse ou en intensit forte), comment
  sera le curseur, si les lettres seront noires, blanches ou d'une autre
  couleur, etc. En terminologie PC on appelle ceci des "prfrences".
  Elle spcifie les codes d'initialisation  envoyer au terminal
  (analogues aux chanes d'initialisation qu'on envoie aux modems).
  Linux n'envoie pas automatiquement de telles chanes au terminal.
  Voyez ``chane d'initialisation''. Si vous n'aimez pas l'affichage 
  l'cran ni son comportement, vous devrez peut-tre diter (et ensuite
  mettre  jour) le fichier terminfo (ou termcap). Voyez ``compilateur
  terminfo (tic)'' sur la manire de faire la mise  jour.


  1144..44..  PPoossiittiioonnnneerr TTEERRMM eett TTEERRMMIINNFFOO


  Ce sont deux variables d'environnement pour les terminaux, mais vous
  ne devriez rien avoir  faire avec elles. TERM doit toujours tre
  positionne au nom du terminal que vous utilisez. TERMINFO contient le
  chemin vers la base de donnes terminfo, mais peut ne pas tre
  ncessaire si la base de donnes est dans un endroit prdfini (ou
  TERMINFO peut tre positionn automatiquement par un fichier qui est
  livr avec votre distribution de Linux).

  Heureusement, le programme getty positionne en gnral TERM pour vous
  juste avant le login. Cela permet aux applications de trouver le nom
  de votre terminal et ensuite de regarder les capacits du terminal
  dans la base de donnes terminfo. Voyez ``variable TERM'' pour plus de
  dtails sur TERM.

  Si votre base de donnes terminfo ne peut pas tre trouve, vous
  verrez un message d'erreur  ce propos sur votre terminal. Si cela
  arrive il est temps de vrifier o rside terminfo et de positionner
  TERMINFO si ncessaire. Vous pouvez dcouvrir o se trouve la base de
  donnes terminfo en cherchant un fichier terminfo courant comme
  "vt100" avec la commande "locate".  Assurez-vous que votre terminal
  est dans cette base de donnes. Un exemple de positionnement de
  TERMINFO : export TERMINFO=/usr/share/terminfo (mettez ceci dans
  /etc/profile ou autre). Si les donnes concernant votre terminal dans
  cette base de donnes ne vous conviennent pas, vous devrez l'diter.
  Voyez ``terminfo et termcap (bref)''.
  1144..55..  FFiicchhiieerr //eettcc//ttttyyttyyppee rraarreemmeenntt nncceessssaaiirree


  Le fichier de configuration /etc/ttytype est utilis pour faire la
  correspondance entre /dev/ttySn et les noms de terminaux comme dans
  terminfo.  tset l'utilise, mais si la variable d'environnement TERM
  est dj positionne correctement, alors ce fichier n'est pas
  ncessaire. Puisque le getty de Linux positionne TERM pour chaque tty,
  vous n'avez pas besoin de ce fichier.  Dans d'autres systmes Unix
  comme FreeBSD, le fichier /etc/ttys fait la correspondance entre les
  ttys et bien plus de choses, comme la commande getty approprie, et la
  catgorie de connexion (comme "dialup"). Un exemple de ligne pour le
  ttytype sous Linux : vt220 ttyS1


  1144..66..  RReessttrriiccttiioonnss ssuurr lleess llooggiinnss


  Par dfaut, l'utilisateur root ne peut pas se logger  partir d'un
  terminal.  Pour permettre cela vous devez crer (ou diter) le fichier
  /etc/securetty en suivant la page de manuel "securetty". Pour
  restreindre les logins de certains utilisateurs et/ou de certains
  terminaux etc., ditez /etc/login.access (cela remplace le vieux
  fichier /etc/usertty ??).  /etc/login.defs dtermine si /etc/securetty
  doit tre utilis et peut tre dit afin que /etc/securetty ne soit
  pas ncessaire (ou utilis).  /etc/porttime restreint les heures
  auxquelles certains ttys et utilisateurs peuvent utiliser
  l'ordinateur. S'il y a trop de tentatives de login rates pour un
  utilisateur, cet utilisateur peut se voir interdire l'accs au
  systme. Voyez la page de manuel "faillog" sur la manire de contrler
  cela.


  1144..77..  LLaanncceerr ddeess ccoommmmaannddeess uunniiqquueemmeenntt ssii TTEERRMM==mmoonn__tteerrmmiinnaall


  Il y a parfois des commandes qu'on ne veut excuter au dmarrage que
  pour un certain type de terminal. Faire cela pour la commande stty ne
  pose pas de problmes puisque l'on utilise l'oprateur de redirection
  < pour spcifier le terminal vers lequel la commande est destine.
  Mais quid des alias de shell ou des fonctions ? Vous aurez envie de
  crer une fonction pour la commande ls qui mettra en couleur la liste
  des rpertoires uniquement sur des terminaux couleur ou sur la
  console. Pour les terminaux monochromes vous voudrez le mme nom de
  fonction (mais un corps de fonction diffrent) qui utilisera des
  symboles  la place du codage par couleurs. O mettre de telles
  dfinitions de fonctions qui doivent tre diffrentes pour des
  terminaux diffrents ?

  Vous pouvez les mettre  l'intrieur d'oprateurs "if" dans
  /etc/profile qui est lu au dpart  chaque fois que quelqu'un se
  logge. L'oprateur confitionnel "if" dfinit certaines fonctions etc.,
  seulement si le terminal est d'un type spcifique.


  1144..77..11..  EExxeemmppllee ppoouurr llaa ffoonnccttiioonn llss


  Bien que la plupart de ce que fait cet oprateur if puisse tre fait
  dans le fichier de configuration de dircolors, voici un exemple dans
  le cas du shell bash :





  ______________________________________________________________________
  if [ $TERM = linux ]; then
      eval `dircolors`;
  elif [ $TERM = vt220 ]; then
      ls () { command ls -F $* ; }
  # pour exporter la fonction ls():
      declare -xf ls
  else echo "De /etc/profile : terminal de type $TERM inconnu"
  fi
  ______________________________________________________________________




  1155..  TTeerrmmiinnffoo eett TTeerrmmccaapp ((eenn ddttaaiillss))



  1155..11..  IInnttrroodduuccttiioonn  TTeerrmmiinnffoo


  Terminfo (anciennement termcap) est une base de donnes des capacits
  des terminaux et plus. Pour chaque (enfin presque) modle de terminal
  elle indique aux applications ce que le terminal est capable de faire.
  Elle indique quelles squences d'chappement (ou caractre de
  contrle) envoyer au terminal afin de faire des choses telles que
  dplacer le curseur vers un nouvel endroit, effacer une partie de
  l'cran, faire dfiler l'cran, changer de mode, changer l'apparence
  (couleurs, luminosit, clignotement, soulignement, vido inverse,
  etc.).  partir de 1980 environ, beaucoup de terminaux supportaient
  plus d'une centaine de commandes (certaines d'entre elles prenant des
  paramtres numriques).

  Les abrviations terminfo sont en gnral plus longues que celles de
  termcap et il est ainsi plus facile de deviner ce qu'elles veulent
  dire. Les pages de manuel de terminfo sont plus dtailles (et
  incluent les anciennes abrviations de termcap). Ainsi, sauf si vous
  tes dj li  termcap, vous devriez utiliser les fichier terminfo.


  1155..22..  BBaassee ddee ddoonnnneess tteerrmmiinnffoo


  La base de donnes terminfo est compile et possde ainsi une partie
  source et une partie compile. La vieille base de donnes termcap ne
  possde qu'une partie source mais cette source peut, grce  une seule
  commande, tre  la fois convertie en source terminfo et ensuite
  compile. Vous pouvez ainsi vous en tirer sans avoir le source
  terminfo puisque le source termcap peut crer la base terminfo
  compile.

  Pour voir si votre terminal (disons vt100) est dans la base de donnes
  terminfo, tapez "locate vt100". Ceci pourra montrer
  /usr/lib/terminfo/v/vt100 ou /usr/share/terminfo/v/vt100 qui sont des
  localisations possibles des fichiers terminfo compils. Certains
  programmes anciens peuvent s'attendre  ce qu'elle soit dans le
  rpertoire /etc/terminfo. La variable d'environnement TERMINFO devrait
  tre positionne sur le chemin vers cette base de donnes.  Exemple :
  TERMINFO=/usr/share/terminfo.

  Le code source que vous utilisez peut rsider dans /etc/termcap et/ou
  dans terminfo.src (ou un autre nom). Voyez les pages de manuel :
  terminfo(5) ou termcap(5) pour voir le format ncessaire pour crer
  (ou modifier) ces fichiers. Le fichier terminfo.src peut se trouver en
  divers endroits sur votre ordinateur ou peut ne pas tre inclus dans
  votre distribution Linux.  Utilisez la commande locate pour essayer de
  le trouver. Il est disponible pour tlchargement (sous le nom
  termtypes.ti)   <http://sagan.earthspace.net/terminfo>.


  1155..22..11..  CCoommppiillaatteeuurr tteerrmmiinnffoo ((ttiicc))


  Les donnes des fichiers sources sont compiles avec le programme
  "tic" qui est capable de faire les conversions entre les formats
  termcap et terminfo.  Vous pouvez ainsi crer une base de donnes
  terminfo compile  partir d'un source termcap. Le programme
  d'installation utilis pour installer Linux a probablement install
  les fichiers compils sur votre disque dur donc vous ne devez rien
  compiler sauf si vous modifiez /etc/termcap (ou terminfo.src).  "tic"
  installera automatiquement les fichiers compils rsultant dans un
  rpertoire terminfo prt  tre utilis par les applications.


  1155..22..22..  RReeggaarrddeezz vvoottrree tteerrmmiinnffoo


  C'est une bonne ide de jeter un coup d'oeil  votre entre terminfo
  pour le terminal que vous utilisez (le code source, bien sr) et de
  lire les commentaires. Une manire rapide de l'inspecter sans les
  commentaires est de taper simplement "infocmp". Mais les commentaires
  pourront vous dire des choses spciales sur le terminal comme la
  manire dont vous devez le configurer pour qu'il fonctionne
  correctement avec la base de donnes terminfo.


  1155..22..33..  EEffffaacceerr ddeess ddoonnnneess nnoonn nncceessssaaiirreess


  Afin d'conomiser de l'espace disque, on peut effacer toute la base de
  donnes  part les types de terminaux que l'on possde (ou dont on
  pourrait avoir besoin dans le futur). N'effacez aucun termcap pour un
  "terminal Linux" (la console) ou les entres xterm si vous utilisez X
  Window. Le type de terminal "dumb" peut tre ncessaire quand une
  application ne peut pas dterminer le type de terminal que vous
  utilisez. Cela conomiserait de l'espace disque si les programmes
  d'installation n'installaient les terminfo que pour les terminaux que
  vous possdez et que vous puissiez obtenir un termcap pour un nouveau
  terminal sur Internet en quelques secondes.


  1155..33..  MMooddiiffiiccaattiioonn ddeess ffiicchhiieerrss tteerrmmiinnffoo


  Certaines entres terminfo fournies peuvent tre amliores. Par
  exemple, la plupart des terminaux ont un jeu de caractres graphiques
  que l'on peut utiliser pour dessiner des rectangles avec des lignes
  solides (pas des lignes en pointill). Si vous voyez des lignes en
  pointill dans les programmes comme minicom, alors la raison est
  peut-tre que la capacit graphique n'a pas t intgre dans le
  fichier terminfo. Vous pouvez l'ajouter en dcouvrant quels symboles
  utiliser  partir du manuel (dans ce cas vous devez donner des valeurs
   enacs, rmacs et smacs) et ensuite diter le fichier source. Alors en
  utilisant "tic" vous pouvez le compiler. "tic" devrait placer
  automatiquement le fichier terminfo compil dans le rpertoire correct
  rserv  cet usage.

  Si vous voulez trouver un terminfo meilleur que celui qui est fourni,
  vous pouvez essayer de chercher sur Internet (mais ce que vous y
  trouverez peut tre pire). Si votre nouvelle entre terminfo est
  meilleure que l'ancienne et semble stable (vous l'avez utilise
  pendant un moment sans problmes) vous devriez en envoyer une copie au
  mainteneur de terminfo comme indiqu au dbut du fichier source de
  terminfo (ou termcap).


  1155..44..  CChhaannee dd''iinniittiiaalliissaattiioonn


  Dans le terminfo sont souvent incluses des chanes d'initialisation
  qu'on peut envoyer au terminal pour l'initialiser. Cela peut modifier
  l'apparence de l'cran, changer le mode dans lequel se trouve le
  terminal et/ou faire que le terminal mule un autre terminal. Une
  chane d'initialisation n'est pas envoye automatiquement au terminal
  pour l'initialiser. On pourrait esprer que le programme getty le
  fasse mais s'il le faisait, on pourrait faire un changement de
  configuration sur le terminal et ce changement ne serait pas pris en
  compte parce que la chane d'initialisation l'annulerait
  automatiquement. Vous devez utiliser une commande sur la ligne de
  commande (ou dans un script shell) pour envoyer la chane
  d'initialisation telle quelle. De telles commandes sont : "tset",
  "tput init" ou "setterm -initialize". Parfois il n'y a pas besoin
  d'envoyer la chane d'initialisation puisque le terminal peut se
  configurer correctement quand il est allum (en utilisant les options
  et prfrences qu'on a sauves dans la mmoire permanente du
  terminal).


  1155..55..  VVaarriiaabbllee TTEERRMM


  La variable d'environnement TERM devrait tre initialise au type de
  terminal que vous utilisez. Elle est normalement positionne par le
  paramtre terminal_type pass au programme getty (regardez-le dans le
  fichier /etc/inittab). Ce nom doit se trouver dans la base de donnes
  terminfo. Tapez simplement "set" sur la ligne de commande pour voir
  quelle valeur a TERM (ou tapez : tset -q). Sur la console (moniteur)
  TERM est positionn  "linux" qui reprsente le moniteur du PC mulant
  un modle de terminal fictif appel "linux". Puisque "linux" est
  proche d'un terminal vt100 et que beaucoup de terminaux le sont aussi,
  l'appellation "linux" fonctionnera parfois comme un recours temporaire
  sur un terminal texte.

  Si on peut connecter plus d'un type de terminal sur le mme port
  (/dev/tty...) (par exemple, si un commutateur permet  diffrents
  types de terminaux d'utiliser le mme port srie, ou si le port est
  reli  un modem que des personnes appellent depuis diffrents types
  de terminaux) alors TERM doit tre positionn  chaque fois que
  quelqu'un se connecte sur le port srie. Il y a souvent une squence
  d'chappement de requte pour que l'ordinateur puisse demander au
  terminal de quel type il est. Une autre faon est de demander 
  l'utilisateur de taper (slectionner) le type de terminal qu'il ou
  elle utilise.  Vous aurez peut-tre besoin d'utiliser tset ou d'crire
  un petit script shell pour grer cela.

  Une manire est d'utiliser "tset" (voir la page de manuel).  tset
  essaie de dterminer le nom du terminal  partir du terminal que vous
  utilisez. Il regarde ensuite les donnes dans terminfo et envoie une
  chane d'initialisation  votre terminal. Il peut aussi positionner la
  valeur de TERM. Par exemple, un utilisateur appelle et se logge. Le
  script de login .profile est excut et il contient la commande
  suivante : eval `tset -s ?vt100`. Ceci fait que : on demande 
  l'utilisateur s'il ou elle utilise un vt100. L'utilisateur rpond oui
  ou bien tape le type de terminal rel qu'il ou elle utilise. tset
  envoie ensuite la chane d'initialisation et positionne TERM  ce nom
  (type) de terminal.


  1155..66..  DDooccuummeennttss ssuurr tteerrmmiinnffoo//tteerrmmccaapp



    pages de manuel de terminfo(5) (la meilleure) et/ou termcap(5).  Le
     manuel Termcap
     <http://www.delorie.com/gnu/docs/termcap/termcap_toc.html> (2me
     d.) par Richard M. Stallman est un manuel GNU qui est quelque peu
     obsolte. Bien qu'il date de 1992, il ne mentionne mme pas
     terminfo.

    les fichiers : terminfo.src et /etc/termcap possdent des
     informations sur les diverses versions des fichiers termcap, les
     conventions de nommage pour les terminaux et des codes de capacits
     spciales nommes u6-u9. Si vous ne les avez pas, allez 
     <http://sagan.earthspace.net/terminfo>

    "Termcap et Terminfo" est un livre publi par O'Reilly en 1988.


  1166..  UUttiilliissaattiioonn dduu tteerrmmiinnaall



  1166..11..  IInnttrroodduuccttiioonn  ll''uuttiilliissaattiioonn dduu tteerrmmiinnaall


  Cette section parle du contrle de l'interface terminal-ordinateur
  et/ou du changement de configuration du terminal pendant son
  utilisation. Elle explique (ou pointe vers des explications sur) la
  manire dont l'utilisateur d'un terminal peut contrler et inspecter
  l'interface, et comment utiliser diverses commandes fournies par le
  pilote de priphrique. Elle n'explique pas comment utiliser les
  nombreuses applications, shells ou la plupart des utilitaires Linux.
  Deux commandes utilises couramment sur un terminal sont :


    clear (pour effacer l'cran)

    reset (pour rinitialiser le terminal)


  1166..22..  DDmmaarrrreerr llee tteerrmmiinnaall


  videmment il faut allumer le terminal pour qu'il fonctionne. Si vous
  ne voyez pas d'invite de login, appuyez sur la touche "Retour" (ou
  "Entre") plusieurs fois. Saisissez ensuite le nom de votre compte
  (suivi d'un retour/entre) et votre mot de passe quand on vous le
  demande (suivi aussi d'un retour/entre). Prenez garde  ne pas tout
  taper en lettres majuscules.  Si vous le faites, l'ordinateur peut
  croire que vous avez un vieux terminal qui ne peut pas transmettre de
  lettres minuscules et le pilote srie peut se configurer pour
  n'envoyer que des lettres majuscules au terminal.

  Si rien ne se passe, assurez-vous que l'ordinateur hte va bien. Si
  l'ordinateur hte est teint (pas de courant), ce que vous tapez sur
  le clavier du terminal peut apparatre  l'cran puisque les broches
  de transmission et de rception sur l'ordinateur peuvent tre relies
  ensemble, ce qui fait que les caractres sont retourns par un
  ordinateur "teint". Si vous ne pouvez pas vous logger quand
  l'ordinateur fonctionne, voyez ``rsolution des problmes''.




  1166..33..  PPiilloottee ddee pprriipphhrriiqquuee ((ssrriiee)) dduu tteerrmmiinnaall


  En tapant sur la ligne de commande, le shell (tel que le shell Bash)
  lit ce que vous tapez et y ragit. Ce que vous tapez passe d'abord par
  la partie pilote de terminal de votre systme d'exploitation. Ce
  pilote peut traduire certains caractres (comme changer le caractre
  "retour" gnr par la touche "retour" en un caractre "nouvelle
  ligne" pour les fichiers Linux). Il reconnat aussi certains codes de
  contrle que vous pourriez taper au clavier comme ^C pour interrompre
  l'excution d'un programme. Il retourne normalement ce que vous tapez
   l'cran. On peut utiliser ``stty'' pour configurer le comportement
  de ce terminal, ce qui comprend l'arrt de tout ou partie de cette
  fonctionnalit.


  1166..44..  PPrroobbllmmeess aavveecc lleess ddiitteeuurrss


  Il peut y avoir quelques problmes pendant l'utilisation d'emacs et de
  vi sur certains terminaux.


  1166..44..11..  EEmmaaccss eett ^^QQ


  Si le contrle de flux logiciel est prsent, la commande ^Q dans Emacs
  bloquera l'affichage (NdT : n'est-ce pas plutt la commande ^S ??). La
  solution est de relier cette commande  une autre touche dans le
  fichier de configuration de Emacs.


  1166..44..22..  VVii eett lleess ttoouucchheess ccuurrsseeuurr


  Vi utilise la touche ESC comme commande pour sortir du mode
  d'insertion. Si on appuie sur une touche flche (touche de curseur)
  une squence d'chappement (dmarrant par le caractre ESC) est
  envoye  l'hte. Vi doit faire la diffrence entre ces deux
  significations d'ESC. Un vi intelligent (comme vim) doit tre capable
  de dtecter la diffrence en regardant la touche qui suit la touche
  ESC.

  Sur les terminaux VT on peut faire en sorte que la touche flche
  gauche envoie soit ESC [ D soit ESC O D. Les autres touches flches
  sont similaires mais utilisent A, B et C au lieu de D. Si vous avez
  des problmes, choisissez ESC [ D puisque le "O" dans l'autre
  alternative peut tre interprte comme une commande d'"ouverture de
  ligne". Le "[" devrait tre interprt par vi pour dire qu'une touche
  flche a t presse. ESC [ D sera envoy  condition que le "mode
  application touches flches" (Cursor Key Application Mode) n'ait pas
  t activ. ESC [ D est normalement la valeur par dfaut donc tout
  devrait tre correct. Sauf que de nombreux termcaps contiennent une
  chane (pas la chane d'initialisation) qui positionne ce que vous
  voulez viter : "Mode Application". Les diteurs peuvent envoyer cette
  chane au terminal quand ils dmarrent. L, vous avez des problmes.

  Cette chane possde le code termcap "ks" (smkx dans terminfo) qui
  veut dire activer les touches de fonctions (et similaires, incluant
  les touches flches). Une application active ces touches en envoyant
  la chane "ks" au terminal. La personne qui a crit le termcap a
  conclu que si une application voulait activer ces touches, elles
  devraient tre mises en "Mode Application" puisque c'est une
  "application", mais vous ne voulez pas cela.


  La console Linux n'a pas de chane "ks" pour que vous ne tombiez pas
  dans ce pige sur la console. Pour d'autres terminaux vous aurez
  besoin d'diter termcap (ou terminfo) ou d'utiliser une autre entre
  termcap. Vous devez modifier non seulement la chane "ks" mais aussi
  les dfinitions termcap de ce qu'elle envoie : kd, kl, kr, ku. Lancez
  ensuite tic pour l'installer.

  Pour vim (VI aMlior) il y a une manire de le configurer pour qu'il
  fonctionne correctement avec ESC O D (pour que vous ne deviez pas
  diter termcap) : cherchez "vt100-cursor-keys" dans l'aide de vim.
  Vous pouvez lancer "gitkeys" et ensuite appuyer sur les touches
  flches pour voir ce qu'elles envoient mais on peut les configurer
  pour qu'elles envoient autre chose quand vous tes dans un diteur.


  1166..55..  CCoorrrruuppttiioonn dduu llss eenn ccoouulleeuurr


  Si ls met en l'air l'mulation de votre terminal avec la possibilit
  de couleur, arrtez-la. ls --color et ls --colour utilisent la
  possibilit de couleur. Certaines installations font que ls utilise la
  couleur par dfaut. Vrifiez dans /etc/profile, etc. s'il y a des
  alias pour ls. Voyez ``exemple de fonction ls'' pour savoir comment
  faire pour que ls soit en couleur sur la console et en noir et blanc
  sur les terminaux.


  1166..66..  LL''aaffffiicchhaaggee ssee bbllooqquuee ((tteerrmmiinnaall bbllooqquu))


  Les symptmes d'un terminal bloqu sont que ce que vous tapez ne
  s'affiche pas sur le terminal (ou dans certains cas s'affiche mais ne
  fait rien). Si ce que vous tapez est invisible (ou ne fait rien) tapez
  ^Q pour relancer le flux (si le contrle de flux l'a stopp). Le
  blocage peut aussi venir de :
  peut alors tre bogg ou vous avez intragi de manire fatale avec
  lui.

  Si vous voulez quitter le programme que vous avez lanc et que vous ne
  pouvez pas le faire par les mthodes normales (certains programmes ont
  des touches spciales que vous devez taper pour sortir) essayez de le
  tuer  partir d'un autre terminal en utilisant "top" ou "kill". Si le
  processus refuse de s'arrter, vous pouvez essayer de lui envoyer un
  signal 9  partir de top qui devrait le forcer  s'arrter. Le type de
  sortie force "9" peut laisser certains fichiers temporaires qui
  tranent ainsi qu'une interface corrompue.  Tuer le shell de login
  devrait relancer getty avec une nouvelle invite de login.

  Les personnes dbutantes sous Linux peuvent sans le faire exprs
  appuyer sur Ctrl-S (^S) (ou la touche "Arrt Dfil") qui bloque
  l'cran de manire mystrieuse (bien que ce soit ce que cette touche
  est suppose faire si vous utilisez le contrle de flux logiciel).
  Pour retrouver une interaction normale avec l'cran, pressez Ctrl-Q
  (^Q). Notez que tout ce qui est tap durant le "blocage" est excut
  mais vous n'en verrez rien avant d'appuyer sur ^Q. Ainsi quand il est
  bloqu, ne tapez rien de spcial qui pourrait effacer des fichiers
  etc. L'un des arguments en faveur du contrle de flux matriel est
  qu'il empche de tels blocages.


  1166..77..  IInntteerrffaaccee dduu tteerrmmiinnaall ccoorrrroommppuuee


  Cela inclut le cas de l'"affichage bloqu" = "terminal stopp net" de
  la section prcdente.

  1166..77..11..  SSyymmppttmmeess


  Quand l'affichage ne semble pas correct, ou quand ce que vous tapez ne
  s'affiche pas correctement (si mme un affichage se produit), ou que
  rien ne se passe quand vous tapez une commande, il y a des chances que
  vous soyez en face d'une corruption de l'interface du terminal. Dans
  les cas rares o la partie matrielle du port srie elle-mme serait
  corrompue, le seul remde peut tre de basculer l'interrupteur
  (teindre le PC et redmarrer). Le problme peut provenir de choses
  telles qu'un bogue dans le programme que vous utilisez, une panne
  matrielle (ce qui inclut un dfaut matriel obscur avec lequel vous
  pouvez normalement vivre) ou peut-tre une configuration incorrecte.
  Si tout fonctionnait correctement mais que a va soudainement mal, il
  se peut que l'interface ait t corrompue par une de vos actions.
  Vous pouvez avoir fait l'une de ces trois erreurs :


    ``Envoyer des donnes binaires au terminal''

    ``Stopper un programme de manire anormale''

    ``Taper Ctrl-S par erreur''


  1166..77..22..  EEnnvvooyyeerr ddeess ddoonnnneess bbiinnaaiirreess aauu tteerrmmiinnaall


  Votre terminal modifiera ses caractristiques si on lui envoie
  certaines squences d'chappement ou des caractres de contrle. Si
  vous essayez par inadvertance d'afficher un fichier binaire, il peut
  contenir par hasard de telles squences qui peuvent placer votre
  terminal dans un mode de fonctionnement trange voire le rendre
  inutilisable. Visualisez ou ditez toujours un fichier binaire avec
  des programmes faits  cet effet pour que cela n'arrive pas. La
  plupart des diteurs et des afficheurs manipuleront les binaires de la
  bonne manire afin de ne pas corrompre l'interface. Certains peuvent
  afficher un message vous avertissant qu'ils ne peuvent diter du
  binaire. Par contre, l'utilisation de "cat ...." ou "cp ....
  /dev/tty.." o .... est un fichier binaire enverra le binaire au
  terminal et risque fortement de gnrer des problmes.

  La corruption peut aussi arriver en utilisant un programme de
  communication o un ordinateur distant peut envoyer des donnes
  binaires  l'cran. Il y a de nombreuses autres faons pour lesquelles
  ces problmes peuvent arriver, alors soyez-y prpar. Mme un fichier
  qu'on prend pour un fichier ASCII peut contenir des codes de contrle
  indsirables.

  Pour rsoudre ce problme, r-initialisez le terminal. Vous pouvez
  essayer de taper soit "reset" soit "setterm -reset" (bien que vous ne
  puissiez pas voir ce que vous tapez). Ceci enverra la chane de
  r-initialisation  partir de l'entre du terminal dans la base
  terminfo. Si la configuration correcte a t sauve  l'intrieur du
  terminal, alors l'appui sur certaine(s) touche(s) (peut-tre en mode
  de configuration) peut retrouver ce paramtrage. Vous voudrez alors
  ensuite encore utiliser "reset" pour envoyer la chane
  d'initialisation si vous l'utilisez pour configurer votre terminal.


  1166..77..33..  TTeerrmmiinneerr uunn pprrooggrraammmmee ddee ffaaoonn aannoorrmmaallee


  De grandes applications (comme des diteurs) utilisent souvent les
  commandes stty (ou autres) dans leur code pour modifier de manire
  temporaire la configuration stty pendant que vous utilisez ce
  programme. Cela peut mettre le pilote de priphrique en mode "brut"
  pour que chaque caractre que vous tapez aille directement 
  l'application. L'cho de retour que fait le pilote est dsactiv pour
  que tout ce que vous voyez  l'cran vienne directement de
  l'application. Ainsi de nombreuses commandes de contrle (comme ^C)
  peuvent ne pas fonctionner dans certaines applications.

  Quand vous quittez de telles applications, celle-ci remet d'abord en
  place les paramtres stty aux valeurs qu'ils avaient avant le
  dmarrage de l'application. Si vous quittez le programme de manire
  anormale (vous pouvez deviner que a s'est pass ainsi quand ce que
  vous tapez ne s'affiche plus  l'cran) vous risquez d'tre encore en
  mode "brut" sur la ligne de commande.

  Pour sortir du mode brut et revenir aux paramtres stty normaux, tapez
  "stty sane". Cependant, vous devez taper ceci juste aprs un "retour"
  et le terminer par un "retour". Mais l'appui sur la touche "retour" ne
  donne pas le rsultat escompt puisque le code "retour" n'est plus
  traduit en caractres nouvelle ligne que le shell attend. Tapez donc
  simplement nouvelle ligne (^J)  la place de "retour". L'interface de
  terminal "sane" peut ne pas tre exactement la mme que d'habitude
  mais elle fonctionne en gnral. "stty sane" peut aussi tre utile
  pour sortir d'une interface corrompue par d'autres causes.


  1166..88..  CCaarraaccttrreess ((ddee ccoonnttrrllee)) ssppcciiaauuxx


  Un certain nombre de caractres de contrle que vous pouvez taper au
  clavier sont "attraps" par le pilote de terminal et effectuent
  diverses tches. Pour voir ces commandes de contrle tapez : stty -a
  et regardez les lignes 2  4.  Elles sont expliques de manire vague
  dans les pages de manuel de stty. On peut modifier les caractres ou
  les dsactiver en utilisant la commande stty.  Ainsi vos caractres de
  contrle peuvent diffrer de ceux dcrits ci-dessous.  On les utilise
  pour l'dition de la ligne de commande, l'interruption, le dfilement
  et pour se dplacer sur le caractre suivant de manire transparente.


  1166..88..11..  ddiittiioonn ddee llaa lliiggnnee ddee ccoommmmaannddee


  Alors que le pilote de terminal possde quelques commandes pour
  l'dition de la ligne de commande, certains shells possdent un vrai
  diteur intgr (comme "readline" dans le shell Bash). Un tel diteur
  est normalement activ par dfaut donc vous n'avez besoin de rien
  faire pour l'activer. S'il est disponible vous ne devez pas apprendre
  les commandes suivantes bien qu'elles fonctionnent souvent en plus de
  l'diteur de lignes de commande. Les plus importantes  apprendre sont
  ^C (interruption), ^D et comment arrter le dfilement.


    Delete-key (touche d'effacement, que stty montre comme ^?) efface
     le dernier caractre

    ^U dtruit (efface) la ligne

    ^W efface un mot en arrire

    ^R raffiche la ligne. Utile principalement sur les terminaux 
     sortie papier ??





  1166..88..22..  IInntteerrrruuppttiioonn ((eett QQuuiitt,, SSuussppeenndd,, EEOOFF,, FFlluusshh))



    ^C interrompt. Quitte le programme et vous remet sur l'invite de la
     ligne de commande.

    ^/ quitte. Comme l'interruption ^C mais plus faible. Fait aussi
     gnrer un fichier "core" (dont vous n'avez probablement pas
     l'utilit) dans votre rpertoire de travail).

    ^Z suspend. Stoppe le programme et le met en tche de fond. Tapez
     fg pour le relancer.

    ^D fin de fichier. S'il est tap sur l'invite de la ligne de
     commande, quitte le shell et va l o vous tiez avant que le shell
     dmarre.

    ^O chasser. Pas implment sur Linux. Envoie la sortie vers
     /dev/null.


  1166..88..33..  AArrrrtt eett rreepprriissee dduu ddffiilleemmeenntt


  Si ce que vous dsirez voir dfile hors du bas de l'cran, vous pouvez
  empcher cela en envoyant un signal d'arrt "stop" (^S ou Xoff) 
  l'hte ( condition que le ``contrle de flux'' Xon-Xoff soit activ).
  Envoyez un signal de dpart "start" (^Q ou Xon) pour reprendre.
  Certains terminaux possdent une touche "Pas de dfilement" qui
  enverra de manire alterne Xoff et Xon ou peut-tre enverra des
  signaux de contrle de flux matriel ?? Voici ce que font ctrl-S (^S)
  et ctrl-Q (^Q) :


    ^S arrte le dfilement (Xoff)

    ^Q reprend le dfilement (Xon)

  Si vous voulez  la fois arrter le dfilement et quitter, utilisez
  ^C. Si vous voulez arrter le dfilement pour faire autre chose mais
  voulez garder le programme qui gnrait la sortie en mmoire pour que
  vous puissiez reprendre le dfilement plus tard, utilisez ^Z pour
  suspendre.

  Une mthode de dfilement diffrente est d'envoyer la sortie dans un
  tube vers un afficheur comme more, less ou most. Cependant, la sortie
  peut ne pas tre la sortie standard mais peut tre la sortie d'erreur
  que l'afficheur ne reconnat pas. Pour rsoudre ceci vous pouvez
  utiliser une redirection "2>&1" pour que l'afficheur fonctionne
  correctement. Il est souvent plus simple d'utiliser simplement ^S et
  ^Q sauf si vous devez dfiler en arrire.

  Sur une console PC (qui mule un terminal), vous pouvez dfiler en
  arrire en utilisant Shift-PageHaut. Cela est frquemment ncessaire
  puisque le dfilement est souvent trop rapide  arrter en utilisant
  ^S. Une fois que vous avez dfil en arrire Shift-PageBas dfilera en
  avant  nouveau.


  1166..88..44..  PPrreennddrree lliittttrraalleemmeenntt eenn ccoommppttee llee ccaarraaccttrree ssuuiivvaanntt


  ^V envoie le caractre tap suivant (en gnral un caractre de
  contrle) directement au pilote de priphrique sans action ou
  interprtation. En retour deux caractres ASCII comme ^C sont
  affichs.


  1166..99..  VViissuuaalliisseerr ddeess ffiicchhiieerrss LLaattiinn--11 ssuurr uunn tteerrmmiinnaall 77 bbiittss


  Certains fichiers texte sont au format Latin1 sur 8 bits (voyez
  ``ensembles de caractres''). Si vous avez un terminal qui n'affiche
  pas les caractres Latin1 (ou sur lequel on n'a pas slectionn
  l'ensemble de caractres Latin1), un symbole de boulet s'affichera
  comme un 7, etc. En visualisant des pages de manuel (elles sont en
  Latin1) vous pouvez passer l'option -7  man afin de traduire les 7,
  etc.  quelque chose proche d'un boulet (en ASCII). Y a-t-il des
  afficheurs qui font ces traductions ??


  1166..1100..  IInnssppeeccttiioonn ddee ll''iinntteerrffaaccee


  Ces utilitaires vous fourniront des informations sur l'interface du
  terminal :


    gitkeys : montre quel(s) octet(s) chaque touche envoie  l'hte.

    tty : montre  quel port tty vous tes connect.

    set : montre la valeur de TERM (le nom de l'entre terminfo)

    stty -a : montre tous les paramtres stty.

    setserial -g /dev/tty?? (remplissez les ??) montre le type d'UART,
     l'adresse du port et le numro d'IRQ.

    infocmp : montre l'entre de terminfo en cours (moins de
     commentaires)


  1166..1111..  MMooddiiffiieerr lleess ppaarraammttrreess dduu tteerrmmiinnaall


  Les paramtres du terminal sont normalement positionns une fois quand
  le terminal est install en utilisant les procdures de configuration
  du manuel du terminal. Cependant, certains paramtres peuvent tre
  modifis alors que le terminal est en cours d'utilisation. Vous ne
  donnez normalement aucune commande "stty" ou "setserial" quand le
  terminal est en cours d'utilisation car elles causeront certainement
  des problmes  l'interface du terminal.  Cependant, vous pouvez faire
  certaines modifications  l'apparence de l'cran du terminal ou  son
  comportement sans dtruire l'intgrit de l'interface.  Parfois ces
  modifications sont faites automatiquement par les applications et donc
  vous ne devriez pas avoir besoin de vous en occuper.

  Une mthode directe pour effectuer de telles modifications est
  d'utiliser la touche de configuration (ou autre) sur le terminal et
  ensuite d'utiliser les menus pour faire les modifications. Pour cela,
  vous aurez besoin de bien connatre le terminal. Les trois autres
  mthodes envoient une squence d'chappement de l'ordinateur vers le
  terminal pour faire les modifications.  Ces trois exemples montrent
  des mthodes diffrentes pour faire cela en positionnant la vido
  inverse :


  1. setterm -reverse


  2. tput -rev

  3. echo ^[[7m


  1166..1111..11..  sseetttteerrmm


  C'est la commande la plus facile  utiliser. Elle utilise des options
  longues (mais n'utilise pas les -- devant). Elle consulte la base de
  donnes terminfo pour dterminer le code  envoyer. Vous pouvez
  modifier la couleur, la luminosit, la coupure de ligne, la vitesse de
  rptition du clavier, l'apparence du curseur etc.


  1166..1111..22..  ttppuutt


  La commande "tput" est similaire  "setterm" mais au lieu d'utiliser
  des mots ordinaires comme arguments, vous devez utiliser les
  abrviations utilises par terminfo. Beaucoup d'abrviations sont
  relativement laconiques et difficiles  retenir.


  1166..1111..33..  eecchhoo


  Dans l'exemple "echo ^[[7m" pour positionner la vido inverse, ^[ est
  le caractre d'chappement. Pour le taper, tapez ^V^[ (ou ^V suivi de
  la touche ESC). Pour utiliser cette mthode "echo" vous devez trouver
  quel code utiliser  partir d'un manuel de terminal ou  partir de
  terminfo ou termcap. Il est plus facile d'utiliser setterm ou tput
  bien qu'echo s'excutera un peu plus vite. Vous pouvez donc utiliser
  echo ... dans les scripts shell qui ne s'occupent que d'un type de
  terminal.


  1166..1111..44..  SSaauuvveerr lleess mmooddiiffiiccaattiioonnss


  Quand vous teignez le terminal les modifications que vous avez faites
  seront perdues (sauf si vous les avez sauves dans la mmoire
  permanente du terminal en allant dans le mode configuration et en les
  sauvant). Si vous voulez les utiliser  nouveau sans devoir les
  retaper, mettez les commandes dans un script shell ou crez une
  fonction shell. Lancez-la ensuite quand vous voulez faire les
  modifications. Une manire de rendre les modifications semi-
  permanentes est de mettre ces commandes dans un fichier lanc  chaque
  fois que vous vous loggez ou que vous dmarrez l'ordinateur.


  1166..1122..  FFaaiirree dd''uunn tteerrmmiinnaall uunnee ccoonnssoollee


  C'est aussi ce que l'on appelle une "console srie". Beaucoup de
  messages en provenance du systme ne sont normalement envoys que sur
  la console. On peut aussi voir sur un terminal certains messages
  envoys sur la console durant le dmarrage aprs un dmarrage russi
  en tapant la commande : dmesg. Si le dmarrage ne russit pas, ceci ne
  sera d'aucun utilit. Il est possible de modifier le noyau Linux pour
  qu'un terminal serve de console et reoive tous les messages de Linux
  destins  la console. Malheureusement, les messages du BIOS seront
  perdus puisqu'ils ne seront pas affichs sur le terminal. La "console"
  se trouve maintenant sur un port srie et on l'appelle donc une
  "console srie". Bien sr, elle n'aura pas les couleurs, les fontes,
  les capacits graphiques, ni les possibilits de redfinition du
  clavier de la vraie console du PC.

  Avant le noyau 2.2, vous deviez patcher le noyau  la main.  partir
  du noyau 2.2, le support est inclus dans le noyau  condition que ce
  dernier ait t configur pour cela. Ces deux cas sont traits dans
  les deux sous-sections suivantes :


  1166..1122..11..  PPoouurr lleess nnooyyaauuxx 22..22 eett ssuupprriieeuurrss


  Les instructions pour faire une console srie sont incluses dans la
  documentation livre avec le code source dans le fichier : serial-
  console.txt. Normalement, le priphrique /dev/console est un lien
  vers tty0 (la console PC). Pour une console srie vous crez un
  nouveau /dev/console qui est un vrai priphrique (et non pas un lien
  vers autre chose).  Vous devez aussi inclure une dclaration  propos
  de la console srie dans /etc/lilo.conf et ensuite lancer lilo. Voyez
  la documentation ci-mentionne pour plus de dtails.


  1166..1122..22..  PPoouurr lleess nnooyyaauuxx aannttrriieeuurrss  22..22


  Le Linux Journal d'avril 1997 avait un article sur la faon
  d'appliquer une rustine au noyau. Vous ajoutez quelques #define au
  dbut de src/linux/drivers/char/console.c :


  <item> #define CONFIG_SERIAL_ECHO
  <item> #define SERIAL_ECHO_PORT 0x2f8  /* Serial port address  */

  Ce qui suit n'tait pas dans l'article de Linux Journal. Dans les noyaux 2.+
  (et prcdents ??) vous avez aussi besoin de positionner la vitesse
  d'mission (sauf si 9600 est convenable). Cherchez ces deux lignes :

  serial_echo_outb(0x00, UART_DLM); /* 9600 baud */
  serial_echo_outb(0x0c, UART_DLL);

  Changez 0x0c dans la ligne ci-dessus en (selon la vitesse que vous
  dsirez) :

  115200 baud: 0x01      19200 baud: 0x06        2400 baud: 0x30
   57600 baud: 0x02       9600 baud: 0x0c        1200 baud: 0x60
   38400 baud: 0x03       4800 baud: 0x18



  Si vous utilisez la console pour slectionner quel systme
  d'exploitation dmarrer (avec LILO), mais que vous voudriez le faire 
  partir d'un terminal, vous devez ajouter une ligne au fichier
  /etc/lilo.conf. Voyez la page de manuel de lilo.conf et cherchez la
  chane "serial=".


  1166..1122..33..  PPuuiiss--jjee llaanncceerr LLiinnuuxx ssaannss mmoonniitteeuurr ((ccoonnssoollee PPCC)) ??


  Oui, en utilisant un terminal et en le faisant passer pour une console
  comme indiqu ci-dessus. Vous aurez sans doute quand mme besoin d'une
  carte graphique puisque la plupart des BIOS en ont besoin pour
  dmarrer le PC.  Votre BIOS peut aussi avoir besoin d'un clavier pour
  dmarrer, ou bien il peut avoir une option grce  laquelle vous
  pouvez indiquer au BIOS qu'il n'a pas besoin de clavier.


  1166..1133..  SSeessssiioonnss mmuullttiipplleess


  Le paquet "screen" lance des sessions multiples un peu comme les
  terminaux virtuels sur la console : voyez ``la console : /dev/tty?''.
  Cependant, ce n'est pas comme les "pages" (``section sur les pages'')
  puisque l'image des pages est stocke sur l'ordinateur hte et non 
  l'intrieur du terminal comme elles le sont avec les "pages".


  1166..1144..  SSee ddllooggggeerr


  Pour vous dlogger, tapez soit "logout", soit "exit". Dans certains
  cas votre demande sera refuse, mais on devrait vous dire pourquoi.
  L'une des raisons du refus est que vous n'tes pas sur le mme shell
  que celui avec lequel vous vous tes logg. Une autre manire de vous
  dlogger est d'appuyer sur ^D.  Puisqu'on utilise aussi ^D  d'autres
  fins, vous ne voudrez pas forcment que cette touche vous dlogge. Si
  vous positionnez la variable IGNOREEOF dans le shell Bash, alors ^D ne
  vous dloggera plus.


  1166..1155..  DDiissccuutteerr eennttrree tteerrmmiinnaauuxx,, eessppiioonnnneerr


  Si deux personnes logges par l'intermdiaire de terminaux sur le mme
  ordinateur hte dsirent discuter ensemble, ils peuvent utiliser les
  programmes "write" ou "talk". Sur Internet, on peut discuter en
  utilisant le navigateur "lynx". Pour espionner ce qu'une autre
  personne fait sur son terminal, voyez le programme "ttysnoop".


  1177..  RRssoouuddrree lleess pprroobbllmmeess ((llooggiicciieellss))


  Si vous suspectez que le problme soit matriel, voyez la section
  ``rparation et diagnostic''. Si le problme concerne le port srie
  lui-mme, voyez le Serial-HOWTO.

  Voici une liste des problmes possibles :


    ``Le terminal fonctionne-t-il ?'' Souponnez que le terminal est en
     panne.

    ``Texte manquant'' Soit passe au-dessus d'une partie du texte soit
     affiche correctement du texte puis se bloque

    ``Getty se relance trop rapidement'' (message d'erreur sur la
     console)

    ``Ne fonctionne pas juste aprs le login''

    ``Ne peut pas se logger'' mais l'invite de login est OK.

    ``Invite de login embrouille''

    ``Aucun signe d'une invite de login''

  Il y a deux cas dans lesquels le terminal se comporte mal. L'un arrive
  quand il a fonctionn correctement et s'est mis  mal fonctionner tout
   coup.  C'est ce dont on parle dans la sous-section suivante. L'autre
  cas arrive quand les choses vont mal juste aprs l'installation du
  terminal. Dans ce cas, vous pouvez passer  la section suivante.

  1177..11..  LLee tteerrmmiinnaall ffoonnccttiioonnnnaaiitt ccoorrrreecctteemmeenntt


  Quand un terminal qui fonctionnait correctement ne tourne tout d'un
  coup pas bien, il est souvent facile de dceler le problme. Si vous
  rflchissez  ce qui s'est pass rcemment cela vous donnera
  certainement un indice quant  la cause du problme.

  Le problme peut tre vident comme un message d'erreur au dmarrage
  du terminal. S'il met un bruit, il a srement besoin d'une
  rparation. Voyez ``rparation et diagnostics''. D'abord, rflechissez
   ce que vous avez fait ou modifi rcemment car c'est srement la
  cause du problme. Est-ce que le problme est apparu juste aprs
  l'installation d'un nouveau logiciel ou aprs une modification de
  configuration ?

  Si le terminal ne rpond pas correctement (s'il rpond tout court) 
  ce que vous tapez, vous avez peut-tre une ``interface de terminal
  corrompue''.


  1177..22..  TTeerrmmiinnaall nnoouuvveelllleemmeenntt iinnssttaallll


  Si vous venez de relier un terminal  votre ordinateur en suivant les
  instructions et qu'il ne fonctionne pas, cette section vous concerne.
  Si un terminal qui fonctionnait correctement auparavant ne fonctionne
  plus, voyez ``le terminal fonctionnait''. Si vous prsumez que le port
  srie de votre ordinateur est dfectueux, vous pouvez essayer de
  lancer un programme de test et de diagnostics sur ce port.  prsent
  (juin 1998) il semble que Linux ne dispose pas encore d'un tel
  programme de diagnostics et vous devrez donc lancer les diagnostics
  sous MS DOS/Windows.  Il y a quelques programmes pour surveiller les
  diverses lignes srie comme DTR, CTS, etc. et qui peuvent vous aider.
  Voyez ``surveillance/diagnostic srie''.

  Une manire est d'abord de voir si le terminal fonctionne en essayant
  de copier un fichier vers le terminal (cp mon_fichier /dev/ttyS?) dans
  la situation la plus simple. Ceci implique la dsactivation des lignes
  de contrle du modem et  une vitesse qui ne ncessite pas de contrle
  de flux (assurez-vous que le contrle de flux matriel est dsactiv).
  Si cette copie fonctionne, compliquez alors un petit peu la situation
  et voyez si a fonctionne encore, etc., etc. Quand le problme
  apparat juste aprs avoir fait une modification, alors ce changement
  est srement la cause du problme.  En fait, il est plus efficace
  (mais plus compliqu) de sauter de la situation simple   peu prs la
  moiti de la configuration finale pour que le test limine  peu prs
  la moiti des causes possibles restantes pour le problme.  Rptez
  alors cette mthode pour le test suivant. De cette manire il ne
  faudrait que dix tests environ pour trouver la cause sur un millier de
  causes possibles. Vous devriez vous carter un peu de cette mthode en
  vous basant sur des intuitions et des indices.


  1177..33..  EEsstt--ccee qquuee llee tteerrmmiinnaall vvaa bbiieenn ??


  Un bon terminal dmarre en gnral en affichant quelques mots 
  l'cran. Si ces mots ne donnent aucun message d'erreur, le terminal va
  probablement bien.  S'il n'y aucun signe de courant (aucune lumire
  n'est allume, etc.), renfoncez le cble d'alimentation des deux
  cts. Assurez-vous qu'il y ait du courant sur la prise murale (ou au
  bout du cordon d'alimentation). Essayez un autre cordon si vous en
  avez un. Assurez-vous que le terminal est allum et que son fusible
  n'a pas saut. Un cran blanc (ou sombre) peut parfois tre rpar
  simplement en tournant les molettes de luminosit et de contraste ou
  par une touche de clavier dans le mode de configuration.  Si cela ne
  fonctionne toujours pas, voyez ``rparations et diagnostics'' pour
  avoir des astuces sur la rparation du terminal.

  Si le terminal dmarre correctement, mais que vous souponnez qu'il y
  ait un problme, mettez-vous en "mode local" o il fonctionnera comme
  une machine  crire et essayez de taper. Voyez ``mode local''.


  1177..44..  TTeexxttee mmaannqquuaanntt


  Si le texte s'affiche normalement sur le terminal puis s'arrte sans
  avoir termin (au milieu d'un mot, etc.) ou si des morceaux de texte
  manquent, vous avez srement un problme avec le contrle de flux. Si
  vous ne pouvez pas trouver tout de suite ce qui le cause, baissez la
  vitesse. Si cela l'arrange, c'est srement un problme de contrle de
  flux. Il se peut que le contrle de flux ne fonctionne pas du tout 
  cause d'un manque de configuration correcte ou  cause d'un cblage
  incorrect (pour le contrle de flux matriel). Voyez ``contrle de
  flux''.

  Si des caractrs isols manquent, le port srie est peut-tre dpass
  par une vitesse trop leve. Essayez une vitesse plus petite.

  Si vous utilisez une vitesse de transmission en dessous de 1200 (trs
  lente, principalement utilise par les anciens terminaux  copie
  papier et les imprimantes) et que le texte est tronqu, alors le
  problme peut provenir du pilote de priphriques srie. Voyez le
  Printing-HOWTO  la section "priphriques srie" sur la manire de
  rgler ceci.


  1177..55..  GGeettttyy ssee rreellaannccee ttrroopp rraappiiddeemmeenntt



  1177..55..11..  PPaass ddee tteennssiioonn ddee ccoonnttrrllee dduu mmooddeemm


  Si getty ne peut pas ouvrir et/ou utiliser un port  cause du manque
  de tension de contrle de modem positive sur l'une des broches, alors
  getty peut se terminer. Alors, grce aux instructions dans inittab,
  getty se relance et essaie encore, uniquement pour tre termin 
  nouveau, etc. etc. Vous pouvez voir un message d'erreur indiquant que,
   cause de getty qui se relance trop rapidement, il a t
  temporairement dsactiv. Essayez d'utiliser l'option "local" dans
  getty et/ou de vrifier les paramtres et les tensions de contrle du
  modem.


  1177..55..22..  TToouucchhee eennffoonnccee


  Une autre cause possible du relancement de getty est qu'une touche du
  clavier soit enfonce, ce qui donne le mme rsultat que si la touche
  tait maintenue appuye en continu. Avec la rptition automatique
  active, ceci "tape" des milliers de caractres  l'invite de login.
  Cherchez un cran rempli de caractres identiques (dans certains cas
  avec deux caractres diffrents ou plus).


  1177..66..  cchheecc aapprrss llee llooggiinn



  Si vous pouvez vous logger correctement mais ne pouvez utiliser le
  terminal il se peut que le dmarrage du shell de login ait reconfigur
  le terminal (avec des paramtres incorrects)  cause d'une commande
  que quelqu'un a mise dans l'un des fichiers qui sont lancs quand vous
  vous loggez, et qu'un shell soit lanc. Ces fichiers comprennent
  /etc/profile et  /.bashrc. Cherchez une commande commenant par "stty"
  ou "setserial" et assurez-vous qu'elle est correcte. Mme si elle est
  correcte dans un fichier d'initialisation, elle peut tre
  repositionne de manire incorrecte dans un autre fichier
  d'initialisation que vous ne souponnez pas. Des mthodes pour revenir
  sur le systme afin de le rparer et d'utiliser un autre terminal ou
  console est d'utiliser une disquette de secours ou de taper : "linux
  single"  l'invite de LILO qui vous mettra en mode utilisateur unique
  sans lancer les fichiers de dmarrage.


  1177..77..  IImmppoossssiibbllee ddee ssee llooggggeerr


  Si vous obtenez une invite de login mais pas de rponse (ou peut-tre
  une rponse embrouille)  vos tentatives de login, une cause possible
  est que la communication se fait mal dans un sens du terminal vers
  l'ordinateur. Si vous n'utilisez pas encore l'option "local" de getty,
  faites-le afin de dsactiver les lignes de contrle du modem. Voyez
  ``getty (dans /etc/inittab)''. Vous pourriez aussi dsactiver le
  contrle de flux matriel (stty -crtscts) s'il tait activ. Si cela
  fonctionne maintenant correctement, alors soit les lignes de contrle
  de votre modem sont cbles de manire incorrecte, soit il y a une
  erreur dans votre configuration.  Certains terminaux permettent le
  positionnement de valeurs diffrentes (comme la vitesse de
  transmission) pour envoyer et recevoir, de sorte que la rception soit
  bonne mais pas l'envoi.

  Si vous obtenez un message qui ressemble  "login failed" (le login a
  chou) alors, si vous n'avez fait aucune erreur en tapant ou dans
  votre mot de passe, il peut y avoir des restrictions sur les logins
  qui ne vous permettent pas de vous logger. Malheureusement, ce message
  peut ne pas vous dire pourquoi la tentative a chou. Voyez
  ``restrictions sur les logins''.


  1177..88..  IInnvviittee ddee llooggiinn eemmbbrroouuiillllee


  Ceci peut-tre  cause de l'utilisation d'un jeu de caractres
  incorrect, des erreurs de transmission dues  des vitesses de
  connexion trop leves, des vitesses de connexion incompatibles ou des
  parits incompatibles. Si c'est une varit de caractres tranges
  vous avez un jeu de caractres incorrect ou un bit de haut rang est
  positionn par erreur. Si les mots ont des fautes d'orthographe,
  essayez une vitesse de transmission plus basse. Pour les
  incompatibilits de vitesse de transmission ou de parit vous voyez
  beaucoup d'erreurs "character error" identiques (erreur de caractre)
  qui reprsentent le fait qu'un vrai caractre ne peut tre affich
  correctement  cause d'une erreur dans la parit ou la vitesse de
  transmission.

  Si vous utilisez agetty (souvent nomm simplement getty), le programme
  agetty dtectera et positionnera la parit si vous tapez quelque
  chose. Essayez-le avec un retour chariot pour voir si cela rpare des
  erreurs possibles de parit.





  1177..99..  AAuuccuunn ssiiggnnee dd''uunnee qquueellccoonnqquuee iinnvviittee ddee llooggiinn


  Cela arrive quand rien ne se passe du tout sur le terminal, mais que
  le terminal semble fonctionner correctement. L'une des premires
  choses  faire est de s'assurer que toutes les connexions cbles sont
  fermes et relies correctement. D'autres problmes peuvent tre : une
  diffrence de vitesse de transmission, du matriel en panne ou getty
  ne tournant pas.  ce point, deux possibilits d'approche sont (vous
  pouvez en suivre plus d'une  la fois) :


    ``diagnostiquer les problmes  partir de la console''

    ``mesurer les tensions''


  1177..99..11..  DDiiaaggnnoossttiiqquueerr lleess pprroobbllmmeess  ppaarrttiirr ddee llaa ccoonnssoollee


  Sur la console (ou sur un autre terminal qui fonctionne), utilisez
  "top" ou "ps -al" pour voir si getty fonctionne sur le port. Ne le
  confondez pas avec d'autres programmes getty qui tournent sur d'autres
  ports ou sur les consoles virtuelles. Vous n'obtiendrez pas d'invite
  de login si getty ne tourne pas.  S'il tourne, alors vous pouvez le
  dsactiver afin d'essayer de copier un fichier vers le terminal  des
  fins de tests.

  Pour dsactiver getty, ditez /etc/inittab et mettez en commentaire la
  commande getty avec un signe # au dbut pour qu'il ne se relance pas
  aprs l'avoir tu. Tuez ensuite l'ancien getty en utilisant la touche
  k dans "top".

  Pour copier un court fichier vers le terminal (une bonne ide serait
  d'essayer cela au dbut du processus d'installation avant de
  configurer getty) utilisez la commande Linux de copie comme ceci : cp
  nom_fichier /dev/ttyS1. Si cela ne fonctionne pas, utilisez stty pour
  rendre l'interface aussi simple que possible en dsactivant tout
  (comme le contrle de flux matriel : -crtscts ; la parit, et les
  signaux de contrle du modem : clocal). Assurez-vous que les vitesses
  de transmission et le nombre de bits par octet sont les mmes. Si rien
  ne se passe, vrifiez que le port est vivant avec un voltmtre grce 
  la section suivante.


  1177..99..22..  MMeessuurree ddeess tteennssiioonnss


  Si vous disposez d'un voltmtre  porte de main, vrifiez qu'il y a
  -12 V (-5  -15) sur la broche 3 (rception de donnes) du ct du
  terminal sur le cble null modem. La borne positive du voltmtre
  devrait tre relie  une bonne terre (les connecteurs mtalliques sur
  les extrmits des cbles ne sont souvent pas relis  la terre). S'il
  n'y a pas de tension ngative, vrifiez-la sur la broche de
  transmission (TxD) sur l'ordinateur (voyez ``DB9-DB25'' pour le
  brochage). Si elle est prsente l mais pas sur la broche de rception
  (RxD) du terminal, alors le cble est mauvais (connexion flottante,
  cble cass ou le cble n'est pas null modem).  S'il n'y a pas de
  tension du ct de l'ordinateur, le port srie de l'ordinateur est
  mort. Testez-le avec un programme de diagnostics ou remplacez-le.

  Si le port srie est vivant, vous pouvez lui envoyer un fichier (avec
  les contrles de modem dsactivs) et voyez si quelque chose y arrive.
  Pour vrifier qu'un signal est transmis avec un voltmtre analogique,
  regardez l'aiguille  -12 V quand la ligne est inactive. Commencez
  ensuite  envoyer un fichier (ou lancez getty). Vous devriez voir
  l'aiguille revenir  zro et bouger autour de 0 alors qu'elle mesure
  des moyennes de courte distance sur le flux de donnes. Vous pouvez
  aussi le voir sur l'chelle de courant alternatif  condition que
  votre voltmtre dispose d'une capacit pour bloquer les tensions
  continues quand vous tes sur l'chelle alternative.  S'il n'en a pas,
  alors le -12 V continu en inactif donnera une lecture alternative
  errone. Sans voltmtre, vous pourriez relier un bon priphrique
  (comme un autre terminal ou un modem externe) au port srie et voir
  s'il fonctionne correctement.


  1177..1100..  SSuurrvveeiillllaannccee eett ddiiaaggnnoossttiiccss dduu ppoorrtt ssrriiee


  Quelques programmes Linux surveilleront les lignes de contrle du
  modem et indiqueront si elles sont positives (1) ou ngatives (0).


    statserial (dans la distribution Debian)

    serialmon (ne surveille pas RTS, CTS, DSR mais indique les autres
     fonctions)

    modemstat (ne fonctionne que sur les consoles PC Linux.
     Fonctionnera en concordance avec la ligne de commande)

  Vous les avez peut-tre dj. Sinon, allez  logiciels srie
  <http://metalab.unc.edu/pub/Linux/system/serial/>. En les utilisant,
  gardez  l'esprit que ce que vous voyez est l'tat des lignes sur
  l'ordinateur hte. La situation sur le terminal sera diffrente
  puisque certains fils sont souvent manquants des cbles alors que
  d'autres fils se croisent. En juin 1998, je ne connais aucun programme
  de diagnostic sous Linux pour le port srie.


  1177..1111..  MMooddee llooccaall


  En mode local, le terminal se dconnecte de l'ordinateur et se
  comporte comme une machine  crire (sauf qu'il n'imprime pas sur
  papier mais sur l'cran).  En revenant en ligne, le terminal se
  reconnecte  l'ordinateur vous permettant de reprendre les activits
  au point o vous vous tiez arrt quand vous tes pass en mode
  "local". Ceci est utile  la fois pour tester le terminal et  des
  fins ducatives. En mode local vous pouvez taper des squences
  d'chappement (en commenant par la touche ESC) et observer ce
  qu'elles font. Si le terminal ne fonctionne pas correctement en mode
  local, il est quasiment certain qu'il ne fonctionnera pas mieux quand
  il sera reli  l'ordinateur. Si vous n'tes pas vraiment sr de ce
  que fait une squence d'chappement, vous pouvez l'essayer en mode
  local. Vous pouvez aussi l'utiliser pour essayer un terminal qui est 
  vendre. Pour aller en mode local vous devez d'abord entrer en mode de
  configuration et ensuite slectionner "local" dans un menu (ou presser
  une certaine touche). Voyez ``aller dans le mode de configuration''.


  1177..1122..  qquuiippeemmeenntt ddee tteesstt lleeccttrriiqquuee ppoouurr llee ppoorrtt ssrriiee



  1177..1122..11..  GGaaddggeettss dd''vvaassiioonn eettcc..


  Alors qu'un multimtre (utilis comme voltmtre) peut tre tout ce
  dont vous avez besoin pour quelques terminaux, un quipement de test
  spcial simple a t fait pour tester les lignes des ports srie.
  Certains s'appellent "vasion ..." (breakout, NdT) o vasion veut
  dire sortir des conducteurs d'un cble. Ces gadgets possdent quelques
  connecteurs et s'insrent dans le cble srie. Certains possdent des
  points de tests pour y relier un voltmtre. Certains possdent des
  LEDs qui s'allument quand certaines lignes de contrle sont actives
  (allumes). D'autres encore possdent des cavaliers pour que vous
  puissiez relier n'importe quel fil  n'importe quel fil.  Certains
  possdent des interrupteurs.

  Radio Shack vend (en 1998), un "expert de RS-232" ou "testeur de ligne
  RS-232" qui vrifie TD, RD, CD, RTS, CTS, DTR, et DSR. Une lumire
  verte veut dire "allum" (+12 V) alors que rouge veut dire "teint"
  (-12 V). Ils vendent aussi une "bote de cavaliers srie RS-232" qui
  permet de relier les broches de la manire dont vous le souhaitez.


  1177..1122..22..  MMeessuurreerr ddeess tteennssiioonnss


  N'importe quel voltmtre ou multimtre, mme les moins chers qu'on
  vend pour environ 60 F, devraient fonctionner correctement. Essayer
  d'utiliser d'autres mthodes pour tester la tension est compliqu.
  N'utilisez pas de diode lectroluminescente (LED) sauf si on lui
  adjoint une rsistance en srie pour rduire la tension sur la diode.
  On utilise une rsistance de 470 ohms pour une diode de 20 mA (mais
  toutes les diodes ne font pas 20 mA). La diode ne s'allumera que pour
  une certaine polarit pour que vous puissiez tester les tensions
  positives ou ngatives. Personne ne fait un tel gadget pour tester
  automatiquement les circuits ?? Les sondes logiques peuvent tre
  endommages si vous essayez de les utiliser puisque les tensions TTL
  pour lesquelles elles sont faites ne sont que de 5 volts. Tenter
  d'utiliser une ampoule incandescente de 12 V n'est pas une bonne ide.
  Cela ne vous montrera pas la polarit et  cause du courant de sortie
  limit de l'UART, l'ampoule ne s'allumera probablement pas.

  Pour mesurer la tension sur un connecteur femelle, vous pouvez
  enfoncer un trombone dpli dans l'ouverture dsire. Le diamtre du
  trombone ne doit pas tre plus grand que les broches afin de ne pas
  abmer le contact. Mettez une pince croco (ou autre) sur le trombone
  pour vous connecter.


  1177..1122..33..  GGootteerr llaa tteennssiioonn


  En dernier recours, si vous n'avez pas d'quipement de test et voulez
  risquer d'tre choqu (ou mme lectrocut) vous pouvez toujours
  goter  la tension.  Avant de toucher  l'une des broches de test
  avec votre langue, testez-les pour vous assurez qu'il n'y a pas de
  haute tension sur elles. Prenez les deux broches ( la fois) dans une
  main pour voir si a vous fait de l'effet.  Si ce test vous choque,
  vous n'aurez srement pas envie d'utiliser votre langue.

  Pour tester du 12 V, lchez un doigt et tenez-y une broche de test.
  Mettez l'autre broche de test sur votre langue. Si la broche sur votre
  langue est positive, il y aura un got reconnaissable. Vous pouvez
  d'abord essayer ceci avec des piles 4,5 V pour savoir quel got a
  aura.


  1188..  RRppaarraattiioonnss eett ddiiaaggnnoossttiiccss


  La rparation d'un terminal possde beaucoup en commun avec la
  rparation d'un moniteur et/ou d'un clavier. Parfois les diagnostics
  intgrs au terminal vous indiqueront  l'cran ce qui ne va pas.
  Sinon, par les symptmes, on peut souvent isoler le problme  l'une
  des choses suivantes : clavier dfectueux, cran mort, panne de
  l'lectronique numrique du terminal. Il est mieux d'avoir un manuel
  de service, mais mme si vous n'en avez pas, beaucoup de terminaux
  peuvent encore tre rpars.


  1188..11..  LLiivvrreess eett ssiitteess WWeebb ssuurr llaa rrppaarraattiioonn



  1188..11..11..  LLiivvrreess


  Bigelow, Stephen J. : Troubleshooting & Repairing Computer Monitors,
  2me dition, McGraw-Hill, 1997. Ne couvre pas l'lectronique de
  gnration des caractres ni le clavier.


  1188..11..22..  SSiitteess WWeebb


  La FAQ  <http://www.repairfaq.org> du groupe de nouvelles
  sci.electronics.repair est longue et complte, bien qu'elle ne couvre
  pas les terminaux en soi. Voyez la section "Moniteurs d'ordinateurs et
  vidos" ("Computer and Video Monitors", NdT). La plupart de ces
  informations peuvent s'appliquer aux terminaux ainsi que dans les
  sections "tester les capacits", "tester les transformateurs", etc.
  Peut-tre que dans le futur, les "informations" de rparation de ce
  HOWTO consisteront principalement en des liens vers la FAQ ci-dessus
  (ou un document identique).  Une autre source d'informations est
  l'archive de rparations de Shuford
  <http://www.cs.utk.edu/~shuford/terminal/repair_hints_news.txt>,
  archive de posts dans des groupes de nouvelles sur la rparation des
  terminaux.


  1188..22..  SSccuurriitt


  Les crans utilisent de trs hautes tensions jusqu' 30000 volts pour
  la couleur (un peu moins pour le noir et blanc). Faites attention de
  ne pas toucher cette tension si l'cran est allum et le couvercle
  retir. Cela ne vous tuera probablement pas mme si vous le faites
  puisque la somme de courant qu'il peut fournir est limit. Mais il est
  possible que cela vous brle gravement et vous choque, etc. Les hautes
  tensions peuvent passer  travers des couches d'air et traverser
  certains isolants, alors gardez vos mains  une distance sre. Vous
  devriez remarquer le cble  haute tension bien isol connect  un
  bout du tube d'images. Mme quand l'cran est teint, il reste
  suffisamment de tension rsiduelle sur la connexion du cble au tube
  d'images pour vous donner un certain choc. Pour dcharger cette
  tension quand l'cran est dbranch, utiliser un tournevis (poigne
  isole) avec la lame en mtal reli au cble de masse du tube d'images
  par un fil cavalier. N'utilisez pas la masse du chassis.

  Les tensions plus basses (quelques centaines de volts) peut tre
  encore plus dangereuses parce qu'elles ne sont pas limites en
  courant. Elles sont mme encore plus dangereuses si vos mains sont
  mouilles ou si vous portez un bracelet de montre en mtal, un anneau
  ou autre. Dans certains cas rares, des gens en sont morts alors faites
  attention. Les tensions plus faibles de seulement quelques volts sur
  les circuits numriques sont relativement srs mais ne touchez  rien
  (sauf avec un outil bien isol) sauf si vous savez ce que vous faites.


  1188..33..  AAppppaarreennccee ddee ll''aaffffiicchhaaggee


  Si l'affichage est trop faible, augmentez la luminosit et/ou le
  contraste en utilisant les molettes  l'extrieur de l'unit (si elles
  existent). Si la largeur, la hauteur ou le centrage sont incorrects,
  il y a souvent des molettes de contrle pour ceux-ci. Sur certains
  terminaux anciens, on doit presser une touche flche (ou autre) en
  mode de configuration.

  Vous aurez peut-tre besoin d'enlever le couvercle pour faire des
  ajustements, surtout sur les modles anciens. Vous pourriez arranger
  les choses pour qu'un grand miroir soit en face du terminal afin de
  voir l'affichage dans le miroir tout en faisant les ajustements. Ce
  qu'il faut tourner peut se trouver sur un circuit imprim. Alors qu'un
  tournevis (peut-tre avec une tte Phillips) peut tre tout ce dont
  vous avez besoin, les bobines peuvent ncessiter certains outils
  spciaux d'alignement de tlvisions (cls en plastique, etc.). Le nom
  abrg de l'ajustement devrait tre imprim sur le circuit imprim.
  Par exemple, voici de tels noms :


    V-Size ajuste la hauteur verticale (taille)

    H-Size ajuste largeur horizontale (taille). Ce peut-tre une
     bobine.

    V-Pos ajuste la position verticale

    H-Pos ajuste la position horizontale

    V-Lin ajuste la linarit verticale ( utiliser si la largeur des
     lignes de balayage diffre en haut et en bas de l'cran)

    V-Hold ajuste le maintien vertical ( utiliser si l'cran dfile de
     manire incontrlable)

    Bright ajuste la luminosit (une molette extrieure peut aussi
     exister)

    Sub-Bright ajuste la luminosit du mode d'intensit attnue
     (souvent le mode normal : plus faible que le mode gras ou fort).

  Changer la linarit peut modifier la taille et donc il peut tre
  ncessaire de la rajuster. Un terminal qui a t stock pendant
  quelque temps peut avoir un petit rectangle d'affichage sur l'cran
  entour d'un grand bord noir. S'il est difficile  ajuster, attendez
  un peu avant de l'ajuster puisqu'il va en rcuprer un peu avec
  l'utilisation (les bords noirs vont rtrcir).


  1188..44..  DDiiaaggnnoossttiiqquueerr



  1188..44..11..  LLee tteerrmmiinnaall aa mmiiss uunn bbrruuiitt


  Si le terminal a mis un bruit juste avant de tomber en panne (ou
  quand vous l'allumez juste aprs qu'il est tomb en panne), ce bruit
  est un indice de ce qui ne va pas. Si vous entendez un crpitement ou
  voyez/sentez de la fume, teignez immdiatement le terminal pour
  empcher des dommages supplmentaires. Le problme est srement dans
  l'alimentation en haute tension de plusieurs milliers de volts.
  Enlevez le couvercle et si le point faible n'est pas vident,
  rallumez-le pendant une courte priode de temps dans une pice peu
  claire et regardez les arcs lectriques. Le cble  haute tension
  (qui court entre le transformateur et le ct du tube d'images) peut
  avoir une isolation dfectueuse qui provoque des arcs avec la terre.
  Rparez-le avec de l'isolant haute tension, ou du chatterton
  lectrique spcial fait pour, disons, 10000 volts.

  Le transformateur (haute tension) peut ne faire qu'un cliquetis ou un
  crpitement faible quand il tombe en panne. Vous pouvez ne pas
  l'entendre jusqu' ce que vous teigniez le terminal pendant un moment
  pour le reposer et l'allumiez ensuite  nouveau. Pour dterminer la
  provenance du bruit, vous pouvez utiliser un morceau de tube en
  caoutchouc (comme on en utilise dans les voitures) comme stthoscope
  pour couter. Mais pendant que vous coutez le son, le terminal
  souffre de plus de dommages alors essayez de le trouver rapidement
  (mais pas rapide au point de risquer d'tre lectrocut).

  Un court-circuit dans l'alimentation peut faire sauter un fusible avec
  un bruit "pop". Le remplacement d'un fusible clat peut ne pas
  rsoudre le problme car le mme court-circuit peut faire clater le
  fusible  nouveau.  Recherchez les points noircis  cause d'une
  chaleur trop importante et testez ces composants. Les transistors de
  puissance court-circuits peuvent faire clater le fusible. On peut
  les tester avec un vrificateur de transistors ou mme avec un
  ohmmtre. Utilisez une petite chelle d'ohms sur un ohmmtre pour que
  la tension applique par l'ohmmtre soit faible. Ceci rduira les
  dommages possibles sur les composants sains causs par ce test de
  tension.

  Si le terminal a t expos  l'humidit, en tant stock dans un
  endroit humide ou prs d'une cuisine avec la vapeur de la cuisine, une
  solution peut tre de scher l'unit. Chauffer un transformateur "en
  panne" avec un sche-cheveux pendant quelques minutes peut le ranimer.


  1188..44..22..  LLee tteerrmmiinnaall nn''aa mmiiss aauuccuunn bbrruuiitt


  Un cran vide peut tre caus par une personne qui a tourn le
  contrle de luminosit au plus bas niveau ou par l'ge. La chose 
  faire alors est de vrifier les cbles pour voir si les connexions
  sont mal faites ou casses.  S'il n'y a pas de signe de courant,
  mettez un nouveau cordon d'alimentation aprs vous tre assur que la
  prise de courant murale dlivre du courant.

  Si vous souponnez le clavier, essayez-le sur un autre terminal du
  mme type ou mettez un bon clavier. Manipulez les extrmits du cble
  du clavier et la prise. Les fils  l'intrieur du cble peuvent
  casser, surtout vers leurs extrmits. Si la cassure est vrifie en
  bougeant le cble (et en alternant la panne et la bonne marche du
  terminal en mme temps que le mouvement), il faut alors soit obtenir
  un nouveau cble, soit couper le cble et ressouder les cassures, etc.

  L'une des premires choses  faire si le clavier fonctionne est de
  mettre le terminal en ``mode local''. Si cela fonctionne en local,
  alors le problme vient srement de la connexion  l'ordinateur hte
  (ou d'une interface incorrecte) ou dans les puces UART du terminal.

  En inspectant avec attention les circuits, on peut souvent trouver la
  cause du problme. Regardez les changements de couleurs, les
  craquelures, etc. Un problme intermittent peut se rvler en appuyant
  sur les composantes avec un stylo  bille (pas la partie mtallique,
  bien sr). Une cassure de la partie conductrice d'un circuit imprim
  peut parfois tre rvle en tordant le circuit. De la soudure qui
  semble avoir fait une goutte ou un joint avec un peu de soudure peut
  avoir besoin d'tre refaite. La soudure peut faire chauffer les
  transistors (et d'autres composants) et les endommager, utilisez donc
  un puits de chaleur si c'est faisable.

  Si vous avez une marque de terminal connue, vous pouvez chercher des
  posts sur les groupes de nouvelles sur l'Internet pour trouver les
  types de problmes les plus frquents pour votre terminal et peut-tre
  des informations sur la manire de les rparer.

  Pour voir si l'lectronique numrique fonctionne, essayez (en
  utilisant un bon clavier) de taper sur le mauvais terminal. Essayez de
  lire cela en tapant sur un bon terminal (ou sur la console) en
  utilisant la commande de copie ou avec un programme de communication
  avec les terminaux comme Minicom. Vous aurez peut-tre besoin
  d'appuyer sur la touche retour chariot afin d'envoyer une ligne. On
  peut demander l'identit, etc. du mauvais terminal  partir d'un autre
  terminal. Cela montrera si la communication dans les deux sens
  fonctionne.


  1188..55..  MMeessssaaggeess dd''eerrrreeuurr  ll''ccrraann


  Vous avez de la chance si vous voyez un message d'erreur  l'cran.
  Cela arrive en gnral quand vous allumez pour la premire fois le
  terminal.


  1188..55..11..  EErrrreeuurr ddee ccllaavviieerr


  Ceci veut dire en gnral que le clavier n'est pas branch, ou que la
  connexion est branlante. Pour des problmes plus srieux, voyez
  ``claviers''.


  1188..55..22..  EErrrreeuurr ddee ssoommmmee ddee ccoonnttrrllee eenn NNVVRR


  La NVR est la mmoire non volatile (Non-Volatile RAM, NdT). Ceci veut
  dire que la NVR, o sont stockes les informations de configuration,
  est corrompue. Le terminal fonctionnera srement encore mais la
  configuration qui avait t sauvegarde la dernire fois que quelqu'un
  a configur le terminal a srement t perdue. Essayez de refaire la
  configuration et de la sauver.  Cela a des chances de fonctionner. Sur
  certains terminaux trs vieux (dbut des annes 1980) il y avait un
  CMOS aliment sur pile pour sauver la configuration donc dans ce cas
  le problme peut venir d'une pile morte.  Parfois la puce EEPROM (pas
  besoin de pile) devient mauvaise aprs trop de sauvegardes. On aura du
  mal  en trouver. Si vous ne pouvez pas la rparer vous tes soit
  bloqu avec la configuration par dfaut ou vous pouvez envoyer des
  squences d'chappement au terminal quand vous le dmarrez ou quand
  vous essayez de le configurer.


  1188..66..  CCaappaacciittss


  Les capacits lectrolytiques possdent une coquille de mtal et
  peuvent faiblir ou tomber en panne s'ils restent inutiliss pendant
  des annes.  Parfois le fait de laisser le terminal allum pendant un
  certain temps peut aider  les restaurer en partie. Si vous le pouvez,
  faites faire de l'exercice aux terminaux que vous avez en stock en les
  allumant pendant quelques instants chaque anne ou tous les deux ans.




  1188..77..  CCllaavviieerrss



  1188..77..11..  IInntteerrcchhaannggeeaabbiilliitt


  Les claviers pour terminaux ne sont pas les mmes que les claviers
  pour PC.  La diffrence ne rside pas seulement dans la disposition
  des touches mais aussi dans les codes gnrs quand on presse une
  touche. De plus, les claviers pour diverses marques et modles de
  terminaux ne sont pas toujours interchangeables. On obtient parfois un
  clavier "incompatible" qui fonctionne en partie sur un terminal.
  Toutes les touches ASCII fonctionneront correctement, mais les touches
  spciales pour la configuration et la pause ne fonctionneront pas
  correctement.


  1188..77..22..  CCoommmmeenntt iillss ffoonnccttiioonnnneenntt


  La plupart des claviers font simplement un contact entre deux
  conducteurs quand vous appuyez sur une touche. L'lectronique 
  l'intrieur d'une puce dans le clavier convertit l'tablissement de ce
  contact en un code envoy  travers le cble externe du clavier. Au
  lieu d'avoir un fil (ou conducteur) spar allant de chaque touche 
  la puce, le principe suivant est utilis.  Numrotez les conducteurs
  disons de 1  10 et de A  J. Par exemple : le conducteur 3 conduit 
  plusieurs touches et le conducteur B conduit  plusieurs touches, mais
  seule une touche a les deux conducteurs qui la rejoignent. Quand cette
  touche est presse, un court-circuit est tabli entre 3 et B. La puce
  ressent ce court-circuit et sait quelle touche a t presse.  Un tel
  principe rduit le nombre de conducteurs ncessaire (et rduit le
  nombre de broches ncessaires sur la puce). C'est un principe
  similaire  ce qu'on appelle un commutateur crois (crossbar).


  1188..77..33..  LL''aappppuuii ssuurr uunnee ttoouucchhee aaffffiicchhee ddeeuuxx ccaarraaccttrreess ddiiffffrreennttss


  Si,  cause d'un dfaut, les conducteurs 3 et 4 sont court-circuits
  alors l'appui sur la touche 3-B court-circuitera aussi 4 et B et la
  puce croira que les touches 3-B et 4-B ont t presses  la fois.
  Ceci fera srement afficher deux caractres diffrents alors que tout
  ce que vous souhaitiez tait un caractre.


  1188..77..44..  CCllaavviieerrss mmooddeerrnneess ccoonnttrree aanncciieennss


  Alors que le clavier moderne et le type ancien se ressemblent
  beaucoup, la mcanique d'opration est diffrente. Les vieux possdent
  des contacts de touches individuels sous le capuchon de chaque touche,
  chaque contact tant inclus dans une enveloppe en plastique dur. Les
  claviers modernes utilisent de grandes feuilles (membranes) en
  plastique souple de la taille du clavier.  Une feuille de plastique
  avec des trous est prise en sandwich entre deux autres feuilles de
  plastique contenant des circuits imprims (comprenant des points de
  contact). Quand vous appuyez sur une touche, les deux feuilles
  "imprimes" sont presses l'une contre l'autre  un certain point, ce
  qui ferme les contacts imprims sur les feuilles  ce point.





  1188..77..55..  LLee ccllaavviieerr nnee ffoonnccttiioonnnnee ppaass dduu ttoouutt


  Si aucune touche ne fonctionne, essayez un autre clavier (si vous en
  avez un) pour vrifier que le clavier est effectivement le problme.
  La cause la plus probable est un fil cass  l'intrieur du cordon
  (cble) le reliant au terminal. La position la plus probable de la
  cassure est  l'une des extrmits du cordon. Essayez de manipuler les
  extrmits du cordon tout en tapant sur une touche pour voir si a
  fonctionne de manire intermittente.  Si vous trouvez un point
  endommag, vous pouvez couper attentivement le cordon avec un couteau
   l'endroit du point endommag et pisser le conducteur cass. Parfois
  une simple goutte de soudure fera l'affaire.  Scellez le cordon avec
  du chatterton ou de la colle.


  1188..77..66..  LL''aappppuuii ssuurr bb aaffffiicchhee bbbb,, eettcc.. ((aaffffiicchhaaggee eenn ddoouubbllee))


  Si tous les caractres apparaissent en double il n'y a srement pas de
  problmes avec le clavier. En revanche, votre terminal a srement t
  configur de manire incorrecte en semi-duplex (HDX ou echo local =
  oui) et chaque caractre que vous tapez est renvoy  la fois depuis
  l'lectronique  l'intrieur de votre terminal et depuis votre
  ordinateur hte. Si les deux caractres ne sont pas les mmes, il peut
  y avoir un court-circuit  l'intrieur de votre clavier. Voyez  ``un
  appui affiche deux caractres diffrents''.


  1188..77..77..  LLee ccllaavviieerr ttaappee ttoouutt sseeuull


  Si une touche est court-circuite il est probable qu'elle tapera un
  grand nombre de fois le mme caractre si la rptition automatique
  est active. Si plus d'une touche est court-circuite, alors la
  rptition de squences de quelques caractres sera tape. Cela peut
  amener getty  se relancer trop rapidement si cela arrive  l'invite
  de login. Voyez ``touche court-circuite''. La solution est de
  nettoyer les contacts grce  ``nettoyage des contacts du clavier''.


  1188..77..88..  LLiiqquuiiddee vveerrss ssuurr llee ccllaavviieerr


  Si de l'eau ou du liquide aqueux a t vers sur le clavier (ou s'il a
  t expos  la pluie, une rose forte ou  l'humidit), certaines
  touches ne fonctionneront pas correctement. L'humidit peut faire un
  court-circuit sur une touche (comme si on appuyait dessus tout le
  temps) et vous pourrez voir l'cran se remplir avec cette lettre si la
  rptition automatique est active. S'il est devenu humide et ensuite
  sch en partie (ou en totalit), certaines touches pourront ne pas
  fonctionner  cause de dpts sur la surface des contacts. Sur les
  types de claviers modernes, on peut facilement sparer les feuilles de
  plastique  l'intrieur et les scher/nettoyer. Pour les plus anciens,
  on peut les laisser scher au soleil ou au four (basse temprature).
  Quand c'est sec il faudra peut-tre nettoyer les contacts comme
  expliqu ci-dessous.


  1188..77..99..  NNeettttooyyaaggee ddeess ccoonnttaaccttss dduu ccllaavviieerr






  1188..77..99..11..  CCllaavviieerrss aavveecc mmeemmbbrraannee


  Sur certains claviers rcents, les feuilles de plastique (membranes)
  sont faciles  enlever pour les inspecter et les nettoyer si
  ncessaire. Vous n'avez besoin d'enlever que quelques vis pour sparer
  le clavier en deux et obtenir les feuilles. Sur certains vieux clavier
  IBM les feuilles ne peuvent pas tre enleves sans casser beaucoup de
  taquets en plastique qu'il faudra rparer  la colle afin de les
  remettre (probablement pas la peine de les rparer). Un tel clavier
  peut parfois fonctionner en tordant, tournant et/ou pesant sur
  l'assemblage contenant les feuilles de plastique.


  1188..77..99..22..  CCllaavviieerrss aavveecc ccoonnttaaccttss iinnddiivviidduueellss


  Ce qui suit concerne les vieux claviers qui possdent des contacts
  spars en plastique dur pour chaque touche. Avant de faire tout le
  travail de nettoyage des contacts lectriques essayez d'abord de
  tourner le clavier tte en bas et bougez les mauvaises touches. Ceci
  peut aider  dloger les salets, surtout si vous pressez la touche
  fortement et rapidement pour faire une vibration.  (NdT : bien secouer
  le clavier rgulirement fait effectivement tomber toutes les salets,
  miettes de pain, etc. et fait du bien au clavier !)

  Souvent on peut enlever les capuchons de touches en les dcouvrant
  vers le haut en utilisant un petit tournevis comme levier tout en
  empchant une inclinaison excessive avec un doigt. Il existe un outil
  spcial appel extracteur de touches mais vous pouvez vous en passer.
  (Attention : les capuchons de touches sur les claviers modernes ne se
  dcouvrent pas.) Le capuchon de touche peut basculer un peu et branler
  alors qu'il se dtache. Il peut mme s'envoler et atterrir par terre.
  Vous avez alors deux choix sur le nettoyage des contacts : utiliser un
  vaporisateur de nettoyant de contact directement au-dessus du contact
  de la touche, ou sparer le contact de touche et le nettoyer. Un tout
  autre choix est de remplacer le contact de touche par un nouveau ou un
  d'occasion.

  La vaporisation directe d'un nettoyant de contacts ou autre (obtenu
  dans un magasin d'lectronique) au-dessus du contact de la touche est
  la mthode la plus rapide mais peut ne pas fonctionner et peut aussi
  endommager le plastique. Avant de vaporiser, nettoyez la surface prs
  des supports de contacts. Avec le clavier branch (ou en connectant un
  ohmmtre sur les contacts de touches) utilisez le tube livr avec le
  vaporisateur pour injecter du nettoyant  l'intrieur du contact de
  touche. Ne laissez pas le liquide de nettoyage s'en aller dans les
  touches voisines o il pourrait amasser de la poussire et s'infiltrer
  (avec la poussire) dans d'autres contacts de touches. Si vous faites
  cette erreur, vous pourriez rparer une touche et abimer les touches
  voisines.

  Si possible, basculez le clavier pour que le nettoyant coule 
  l'intrieur des contacts. Pour le terminal CIT101e avec un clavier
  Alps, ceci implique de basculer la range des chiffres vers le
  plafond. Faites bouger le contact de touche vers le haut et vers le
  bas avec un stylo ou le manche d'un petit tournevis pour viter
  d'avoir du liquide nettoyant toxique sur votre peau (ou portez des
  gants).  Finalement retournez le clavier tte en bas tout en bougeant
  la touche pour enlever le nettoyant qui reste. Plus vous injecterez de
  nettoyant plus vous serez sr de rparer la touche mais vous aurez
  aussi plus de chances d'endommager le plastique, utilisez donc ce que
  vous jugez ncessaire pour faire le travail. Une fois que la touche
  fonctionne correctement, bougez-la de haut en bas encore un peu et
  testez-la une demi-minute plus tard, etc.  pour vous assurer qu'elle
  fonctionne encore correctement.
  Parfois une touche fonctionne trs bien quand les contacts 
  l'intrieur sont saturs de liquide de nettoyant de contacts, mais
  quand le liquide sche quelques minutes plus tard, le dpt rsultant
  sur les contacts empche un contact correct et la touche fonctionne
  avec des rats (si elle fonctionne).  Faire bouger la touche alors que
  le liquide sche  l'intrieur peut aider les choses. Certaines
  touches possdent des contacts presque scells  l'intrieur et donc
  peu de nettoyant pour contact atteint les contacts. Le nettoyant qui
  arrive effectivement sur les contacts peut apporter la contamination
  (le nettoyage autour du haut des touches avant la vaporisation peut
  aider  minimiser cet effet).

  Si vous devez dsassembler le contact de touche, inspectez-le d'abord
  pour voir comment il est install et se spare. Parfois on peut
  enlever le capuchon du contact sans enlever le contact du clavier.
  Pour ce faire, dcouvrez (ou tirez) le haut du contact de touche aprs
  avoir retir les taquets en plastique fin qui le retiennent. Ne tirez
  pas trop fort ou vous pourriez casser le plastique fin. Si vous ne
  pouvez faire cela, vous devrez peut-tre dessouder le contact et
  l'enlever afin de le sparer (ou de le remplacer). Une fois que le
  contact a t spar, vous pourrez ne pas encore voir les contacts si
  les surfaces des contacts sont prises en sandwich (qui se touchent
  presque). Vous pouvez mettre du nettoyant pour contact sur les
  contacts en soulevant lgrement les surfaces conductrices et en
  injectant du nettoyant entre elles. Il peut y avoir une sorte
  d'attache maintenant les surfaces de contact ensemble qui doit tre
  enleve avant de soulever ces surfaces. Avec du nettoyant sur les
  contacts, faites-les bouger. Faire basculer le clavier ou le retourner
  peut aider. Prenez garde de ne pas perdre de petites parties car elles
  peuvent s'envoler en l'air quand vous enlevez un contact de touche.


  1199..  AAnnnneexxee AA :: ggnnrraalliittss



  1199..11..  LLiissttee ddeess ccoommmmaannddeess LLiinnuuxx ppoouurr lleess tteerrmmiinnaauuxx



  1199..11..11..  EEnnvvooyyeerr uunnee ccoommmmaannddee  uunn tteerrmmiinnaall



    ``setterm'' : options longues

    ``tput'' : options courtes

    tset : ne fait que l'initialisation

    clear : efface l'cran

    reset : envoie une chane de rinitialisation


  1199..11..22..  CCoonnffiigguurraattiioonn dduu ppiilloottee ddee pprriipphhrriiqquueess ppoouurr lleess tteerrmmiinnaauuxx



    ``setserial'' :

    ``stty''




  1199..11..33..  TTeerrmmiinnffoo



    ``Compilateur Terminfo (tic)'' : compilateur et traducteur pour
     terminfo

    toe : montre la liste des terminaux pour lesquels vous avez des
     fichiers terminfo

    ``infocmp'' : compare ou affiche des entres terminfo


  1199..11..44..  AAuuttrreess



    gitkeys : montre quels octets chaque touche envoie  l'hte.

    tty : montre sur quel port tty vous tes connect.

    set (ou tset -q) : montre la valeur de TERM, le nom de l'entre
     terminfo

    ``tset'' : positionne TERM de manire interactive et fait
     l'initialisation


  1199..22..  IInntteerrnneett eett lleess lliivvrreess



  1199..22..11..  IInnffoorrmmaattiioonn ssuurr llee tteerrmmiinnaall ssuurr ll''IInntteerrnneett



    Site Web de Shuford
     <http://www.cs.utk.edu/~shuford/terminal_index.html>  l'universit
     du Tennessee possde beaucoup d'informations utiles sur les
     terminaux texte ;

    Boundless <http://www.boundless.com/textterm/> a rachet la partie
     terminaux VT et Dorio chez DEC. Pour obtenir des spcifications,
     choisissez les liens ADDS, VT ou DORIO. Choisissez ensuite un lien
     "data sheet". Ensuite, sur la feuille de donnes, slectionnez le
     lien "Go to Specs".

    Wyse <http://www.wyse.com/terminal/> est un grand fabricant de
     terminaux. Voyez aussi vieilles spcifications des terminaux Wyse
     <http://www.wyse.com/service/faq/wysetter.htm>

    Squences d'chappement ; Amrique du Nord <http://www.pericom-
     usa.com/twdocs/doc/twproae.htm> ou squences d'chappement ; Europe
     <http://www.pericom.co.uk/teemworld/doc/twproae.htm> est une liste
     de squences d'chappement (et codes de contrles) pour certaines
     mulations de terminal (qui comprend les VT 100, 300, 420 et Wyse)
     ;

    comp.terminals est le groupe de nouvelles pour les terminaux.


  1199..22..22..  LLiivvrreess lliiss aauuxx tteerrmmiinnaauuxx




    port srie EIA-232, voir ``Livres sur EIA-232 (RS-232)''.

    rparations, voir ``livres et sites Web sur la rparation''.

    base de donnes Terminfo, voir ``documents Termcap''


  1199..22..33..  LLiivvrreess ccoonnssaaccrrss eennttiirreemmeenntt aauuxx tteerrmmiinnaauuxx


  Autant que je sache, il n'existe pas de livre satisfaisant sur les
  terminaux texte (sauf si vous vous intressez aux terminaux antiques
  des annes 70).


    Handbook of Interactive Computer Terminals par Duane E. Sharp ;
     Reston Publishing Co. 1977. (quasiment obsolte)

    Communicating with Display Terminals par Roger K. deBry ; McGraw-
     Hill 1985.  (principalement sur les terminaux synchrones IBM)

  Le "HANDBOOK..." prsente les spcifications brves de plus de cent
  modles diffrents de vieux terminaux fabriqus au dbut des annes
  1970 par plus de 60 socits diffrentes. Il explique aussi comment
  ils fonctionnent physiquement mais montre de manire incorrecte un
  diagramme pour un cran qui utilise une dviation lectrostatique du
  faisceau d'lectrons (mme dans les annes 1970). Ce livre explique un
  certain nombre de concepts techniques avancs comme le "balayage au
  hasard" et le "principe de pntration de la couleur".

  Le livre "COMMUNICATING..." au contraire du "Handbook..." ignore les
  dtails physiques et lectroniques des terminaux. Il possde un
  chapitre entier sur l'explication des nombres binaires (qui n'est pas
  ncessaire dans un livre sur les terminaux puisque cette information
  est largement disponible par ailleurs). Il semble couvrir
  principalement les vieux terminaux IBM (surtout les 3270) dans les
  modes de fonctionnement en bloc et synchrone. Il est de peu d'utilit
  pour les terminaux ANSI utiliss couramment de nos jours sur les
  systmes de type Unix. Bien qu'il en parle un peu, il ne montre les
  diffrents systmes de cblage utiliss pour les relier aux ports
  srie.


  1199..22..44..  LLiivvrreess ppoossssddaanntt ddeess cchhaappiittrreess ssuurr lleess tteerrmmiinnaauuxx


  Ces chapitres ne couvrent presque rien sur les terminaux eux-mmes et
  leurs capacits. Par contre, ces chapitres couvrent plutt la manire
  de configurer l'ordinateur (et le pilote de terminal) pour qu'il
  fonctionne avec les terminaux.  cause des diffrences entre les
  systmes Unix, la plupart des informations ne s'appliquent pas 
  Linux.


    Unix Power Tools by Jerry Peck et. al.  O'Reilly 1998.  Ch. 5 :
     configuration de votre terminal, Ch. 41 : paramtres du terminal et
     de la ligne srie, Ch. 42 : problmes avec les terminaux

    Advanced Programming in the Unix Environment par W. Richard Stevens
     Addison-Wesley, 1993. Ch. 11 : entres/sorties avec le terminal,
     Ch. 19 : pseudo-terminaux

    Essential System Administration par Aleen Frisch, 2me dition.
     O'Reilly, 1998. Ch. 11 : terminaux et modems.


  Le livre "UNIX POWER TOOLS" possde trois chapitres courts sur les
  terminaux texte. Il couvre moins de choses que ce HOWTO mais donne
  plus d'exemples pour vous aider.

  Le livre "ADVANCED PROGRAMMING...", dans le chapitre 11, ne couvre que
  le pilote de priphriques du systme d'exploitation pour s'occuper
  des terminaux. Il explique les paramtres qu'on donne  la commande
  stty pour configurer le terminal.

  Le chapitre du livre "ESSENTIAL SYSTEM..." en dit plus sur les
  terminaux que sur les modems. Il semble bien crit.


  1199..33..  SSyyssttmmeess nnoonn LLiinnuuxx


  La configuration de l'ordinateur hte pour les terminaux sur des
  systmes d'exploitation diffrents de Linux est en gnral largement
  diffrente que sous Linux. Voici quelques liens vers des manuels en
  ligne pour les systmes de type Unix :


    Ajouter des terminaux srie
     <http://www2.sco.com:1996/HANDBOOK/serial_terminal_adding.html>
     pour SCO OpenServer dans le manuel de SCO OpenServer.

    Configuration des terminaux et modems
     <http://www.software.hp.com/OS_transition/DOCS/PERIPH/TERMS3.HTM>
     pour HP-UX de Hewlett-Packard.



  2200..  AAnnnneexxee BB :: tteerrmmiinnoollooggiiee ddeess ccoommmmaannddeess ddee ssqquueenncceess dd''cchhaappppeemmeenntt


  On les appelle parfois "squences de contrle". Cette section du Text-
  Terminal HOWTO est incomplte (et pourra ne jamais tre complte car
  il y a un grand nombre de squences de contrle). Cette section sert
  de rfrence et appartient peut-tre vraiment  ce qu'on pourrait
  appeler "Text-Terminal-Programming-HOWTO" (HOWTO sur la programmation
  d'un terminal texte).

  Un exemple de squence d'chappement ANSI normale est ESC[5B qui
  dplace le curseur vers le bas de cinq lignes. ESC est le caractre
  d'chappement. Le paramtre 5 est inclus dans la squence. Si c'tait
  7 le curseur bougerait vers le bas de sept lignes, etc. Il est facile
  de comprendre l'explication suivante pour la squence : "dplacer le
  curseur vers le bas de x lignes : ESC[xB". Mais un jargon de commande
  tel que : "requte d'attribut pour priphrique tertiaire" est moins
  comprhensible. Cette section essaiera d'expliquer une partie du
  jargon utilis dans les commandes de squences d'chappement. Une
  liste complte (comprenant les codes de squences d'chappement pour
  la norme ANSI) est un projet "qu'on voudrait bien faire".  Puisque
  beaucoup de squences d'chappement font la mme chose que ce qui est
  fait en configurant le terminal avec ``options de configuration'', de
  telles options en squences d'chappement ne seront pas rptes ici.


  2200..11..  LLiissttee ddee ssqquueenncceess dd''cchhaappppeemmeenntt


  Pour avoir une liste de nombreuses squences d'chappement (mais pas
  toutes) pour divers terminaux, voyez squences d'chappement ;
  Amrique du Nord <http://www.pericom-usa.com/twdocs/doc/twproae.htm>
  ou squences d'chappement ; Europe
  <http://www.pericom.co.uk/teemworld/doc/twproae.htm>. On utilise
  celles-ci pour muler un terminal et elles ne sont pas toujours les
  mmes que sur le vrai terminal correspondant.  Une liste pour les VT
  (non maintenue) se trouve  FAQ mulateurs
  <http:/www.cs.ruu.nl/wais/html/na-dir/emulators-faq/part3.html>.
  Cherchez "VT".


  2200..22..  CCooddeess ddee ccoonnttrrllee 88 bbiittss


  Table des codes de contrle 8 bits DEC (en hexadcimal). Fonctionne
  sur les VT2xx ou plus rcents. CSI est le code le plus courant.


  ACRONYME        NOM_COMPLET                     HEXA    REMPLACE
  IND     Index (une ligne vers le bas)           84      ESC D
  NEL     Ligne Suivante                          85      ESC E
  RI      Index Inverse (une ligne vers le haut)  8D      ESC M
  SS2     Dcalage Simple 2                       8E      ESC N
  SS3     Dcalage Simple 3                       8F      ESC O
  DCS     Chane de Contrle Priphrique         90      ESC P
  CSI     Introduction Squence de Contrle       9B      ESC [
  ST      Terminaison de Chane                   9C      ESC \





  2200..33..  cchhaappppeemmeenntt ppoouurr ll''iimmpprriimmaannttee



    Auto Print on/off (impression automatique oui/non) : Active (on),
     les donnes venant de l'hte sont aussi envoyes sur le port
     imprimante du terminal (et sont aussi affiches sur l'cran du
     terminal).

    Print Controller on/off (contrleur d'impression oui/non) : Active
     (on), les donnes venant de l'hte ne sont envoyes qu'
     l'imprimante (rien ne s'affiche sur l'cran du terminal).


  2200..44..  RRaappppoorrttss


  Ces squences sont en gnral des requtes envoyes de l'hte pour
  demander un rapport du terminal. Le terminal rpond en envoyant un
  rapport (en fait une autre squence d'chappement)  l'hte qui y a
  intgr certaines valeurs indiquant  l'hte l'tat en cours du
  terminal. Dans certains cas un rapport peut tre envoy  l'hte mme
  s'il n'a pas t demand. Ceci arrive parfois quand on quitte la
  configuration. Par dfaut aucun rapport non sollicit ne devrait tre
  envoy.


    Request for Status (Report Operating Status) (Demande d'tat,
     rapporter l'tat d'opration) : la signification des rponses du
     VT100 est soit "je vais bien", soit "je ne vais pas bien"

    Request for Device Attributes (demande des attributs du
     priphrique) : le "priphrique" est en gnral l'imprimante. Y a-
     t-il une imprimante ?  Est-elle prte ?

    Request for Tertiary Device Attributes (pour les VT) (demande des
     attributs des priphriques tertiaires) : la rponse est le rapport
     qui a t entr pendant la configuration. Le priphrique tertiaire
     est le troisime priphrique (l'imprimante ou le priphrique sur
     le port auxiliaire ??).  Le premier priphrique peut tre
     l'ordinateur hte et le deuxime priphrique le terminal.

    Request for Terminal Parameters (demande des paramtres du
     terminal) : quelle est la parit, la vitesse de transmission, la
     largeur d'octets, etc.  Cette demande n'a pas l'air d'avoir
     beaucoup de sens, puisque si l'hte ne connaissait pas dj ces
     donnes, il ne pourrait pas communiquer avec le terminal ou envoyer
     une rponse.



  2200..55..  MMoouuvveemmeennttss dduu ccuurrsseeuurr


  Le curseur se trouve  l'endroit o le prochain caractre reu de
  l'hte sera affich. La plupart des mouvements de curseur sont
  comprhensibles. "index cursor" (indexer le curseur) veut dire
  dplacer le curseur vers le bas d'une ligne. Les mouvements du curseur
  peuvent tre relatifs  la position en cours comme "dplacer de 4
  espaces vers la gauche" ou absolus comme "dplacer  la range 3,
  colonne 39". Le mouvement absolu s'appelle "positionnement direct du
  curseur" ou "adressage direct du curseur".

  La position d'origine est range 1, colonne 1 (l'origine de l'index
  est 1).  Mais l'emplacement de cette position d'origine  l'cran
  n'est pas clair. Si "mode d'origine du curseur", quivalent  "mode
  d'origine relatif", est choisi, l'origine se trouve en haut de la
  partie dfilante (pas forcment le haut de l'cran). Si le "mode
  d'origine absolu" est choisi (mme chose que dsactiver l'un des deux
  modes de la phrase prcdente) alors l'origine se situe dans le coin
  en haut  gauche de l'cran. Sur certains terminaux anciens si le
  "mode d'origine du curseur" est activ, cela veut dire que c'est
  relatif.


  2200..66..  PPaaggeess ((ddffiinniittiioonn))


  Voyez ``pages'' pour avoir une explication sur les pages. Il y a un
  certain nombre de squences d'chappement pour s'occuper des pages. Le
  texte peut tre copi d'une page  une autre et on peut dplacer le
  curseur de page en page. Le passage d'une page  l'autre peut ou peut
  ne pas tre automatique : quand l'cran est plein (page 1), alors les
  donnes supplmentaires venant de l'hte vont sur la page 2. Le
  curseur peut n'tre que sur une page  la fois et les caractres
  envoys au terminal vont l. Si cette page n'est pas affiche, le
  nouveau texte sera reu par le terminal et ira en mmoire d'affichage,
  mais vous ne le verrez pas (jusqu' ce qu'on passe  cette page sur le
  terminal).


  2211..  AAnnnneexxee CC :: ccoommmmuunniiccaattiioonnss ssrriiee ssuurr EEIIAA--223322 ((RRSS--223322))



  2211..11..  IInnttrroodduuccttiioonn aauuxx ccoommmmuunniiccaattiioonnss ssrriiee


  (Une grande partie de cette section devrait finalement se trouver dans
  le Serial-HOWTO.) Les terminaux texte sur les systmes de type Unix
  (et sur les PC) sont connects en gnral sur un port srie asynchrone
  232 d'un ordinateur. C'est en gnral un port RS-232-C, EIA-232-D ou
  EIA-232-E. Ces trois ports sont  peu prs identiques. Le prfixe
  originel RS est devenu EIA (Electronics Industries Association) et
  plus tard EIA/TIA aprs que EIA se soit allie avec TIA
  (Telecommunications Industries Association). La spcification EIA-232
  dcrit aussi les communications synchrones mais le matriel qui
  supporte les communications synchrones manque quasiment toujours sur
  les PC. La dsignation RS est obsolte mais est toujours utilise. On
  utilisera EIA dans cet article.

  Le port srie reprsente plus qu'un simple connecteur physique au dos
  d'un ordinateur ou d'un terminal. Il comprend l'lectronique associe
  qui doit produire des signaux conformes  la spcification EIA-232. Le
  connecteur standard possde 25 broches, dont la plupart sont
  inutilises. Un connecteur diffrent ne possde que neuf broches. Une
  broche est utilise pour envoyer des octets de donnes et une autre
  pour en recevoir. Une autre broche est la masse commune du signal. Les
  autres broches "utiles" sont principalement utilises  des fins de
  signalisation avec une tension ngative rgulire voulant dire
  "teint" et une tension positive rgulire voulant dire "allum".

  La puce UART (metteur-rcepteur asynchrone universel) fait la plus
  grande partie du travail. Aujourd'hui, les possibilits de cette puce
  sont en gnral incluses dans une autre puce.


  2211..22..  TTeennssiioonnss



  2211..22..11..  TTeennssiioonn ppoouurr uunn bbiitt


  Sur le port srie EIA-232, les tensions sont bi-polaires (positives ou
  ngatives par rapport  la masse) et devraient tre de l'ordre de 12
  volts en amplitude (certaines font 5 ou 10 volts). Sur les broches
  d'mission et de rception +12 volts reprsente le bit 0 (parfois
  appel "espace") et -12 volts est le bit 1 (parfois appel "marque").
  On appelle cela la logique inverse puisque normalement le bit 0 est 
  la fois faux et ngatif alors que le 1 est normalement vrai et
  positif. Bien que les broches de transmission et rception soient en
  logique inverse, d'autres broches (les lignes de contrle du modem)
  sont en logique normale avec une tension positive tant vraie et une
  tension ngative tant fausse. La tension zro n'a aucune
  signification (sauf qu'elle veut dire en gnral que l'unit est
  teinte).

  Une tendue de tensions est permise. Les spcifications disent que
  l'amplitude d'un signal transmis devrait tre entre 5 et 15 volts mais
  ne doit jamais dpasser 25 volts. Toute tension reue en dessous de 3
  volts est indfinie (mais certains terminaux considreront qu'une
  tension plus basse est valide). On voit parfois des affirmations
  erronnes selon lesquelles la tension est communment 5 volts (ou mme
  3 volts) mais c'est en gnral 11-12 volts. Si vous utilisez un port
  EIA-422 sur un ordinateur Macintosh comme un EIA-232 (cela demande un
  cble spcial) ou un EIA-423 alors la tension sera vraiment 5 volts.
  La discussion ici suppose que c'est 12 volts. Il y a beaucoup de
  confusion  propos des tensions sur Internet.

  Notez que la logique d'ordinateur normale n'est que de quelques volts
  ( une poque, la norme tait 5 volts), et que si vous essayez
  d'utiliser un quipement de test fait pour tester une logique
  d'ordinateur en 3-5 volts (TTL) sur les 12 volts d'un port srie, cela
  peut endommager l'quipement de test.





  2211..22..22..  SSqquueennccee ddee tteennssiioonn ppoouurr uunn oocctteett


  La broche de transmission (TxD) est maintenue  -12 V (marque) comme
  inactive quand rien n'est envoy. Pour commencer un octet elle passe 
  +12 V (espace) pour le bit de dpart et reste  +12 V pendant la dure
  (priode) du bit de dpart. Aprs vient le bit de bas niveau de
  l'octet de donnes. Si c'est un bit 0 rien ne change et la ligne reste
   +12 V pendant une autre priode de bit.  Aprs vient le bit suivant,
  etc. Finalement, un bit de parit peut tre envoy et ensuite un bit
  de stop de -12 V (marque). La ligne reste  -12 V (inactive) jusqu'au
  prochain bit de dpart. Notez qu'il n'y a pas de retour  0 volts et
  il n'y a donc pas de moyen simple (sauf avec un signal de
  synchronisation) pour dire o finit un bit et o commence le bit
  suivant dans le cas o deux bits conscutifs ont la mme polarit
  (tous les deux zro ou tous les deux un).

  Un deuxime bit de stop serait aussi  -12 V, identique au premier bit
  de stop. Puisqu'il n'y a pas de signal pour marquer la frontire entre
  ces deux bits, le seul effet du deuxime bit de stop est que la ligne
  doit rester inactive  -12 V deux fois plus longtemps. Le rcepteur
  n'a aucun moyen de faire la diffrence entre un deuxime bit de stop
  et un temps d'inactivit plus long entre les octets. Ainsi les
  communications fonctionnent bien si une extrmit utilise un bit de
  stop et l'autre extrmit utilise deux bits de stop, mais n'utiliser
  qu'un bit de stop est visiblement plus rapide. Dans de rares cas, un
  bit de stop et demi est utilis. Ceci veut dire que la ligne est
  garde  -12 V pendant une priode de temps et demie (comme un bit de
  stop 50 % plus long que la normale).


  2211..33..  LLaa ppaarriitt eexxpplliiqquuee


  Les caractres sont normalement transmis sur 7 ou 8 bits (de donnes).
  Une parit supplmentaire peut (ou peut ne pas) y tre ajoute, ce qui
  donne un octet de longueur 7, 8 ou 9 bits. Certains mulateurs de
  terminaux et terminaux anciens n'autorisent pas 9 bits. Certains
  interdisent 9 bits si on utilise deux bits de stop (puisque cela
  ferait beaucoup trop de bits : 12 bits au total).

  On peut mettre une parit impaire, paire, ou pas de parit (les
  parits marque et espace peuvent tre des options sur certains
  terminaux). Avec une parit impaire, le bit de parit est slectionn
  de telle sorte que le nombre de bit 1 dans un octet, en comprenant le
  bit de parit, soit impair. Si un tel octet se dtriore par
  l'inversion d'un bit, le rsultat est un octet illgal de parit
  paire. Cette erreur sera dtecte et si c'est un octet arrivant au
  terminal, un symbole caractre d'erreur apparatra  l'cran. La
  parit paire fonctionne de manire similaire avec tous les octets
  lgaux (comprenant le bit de parit) ayant un nombre de bit 1 pair.
  Pendant la configuration, le nombre de bits par caractre signifie en
  gnral le nombre de bits de donnes par octet (7 pour de l'ASCII pur
  et 8 pour les divers codes de caractres ISO).

  Une "marque" est un bit 1 (ou un 1 logique) et un "espace" est un bit
  0 (ou un 0 logique). Pour la parit marque, le bit de parit est
  toujours un bit 1.  Pour la parit espace c'est toujours un bit 0. La
  parit marque ou espace ne fait que gcher de la bande passante et
  devrait tre vite autant que possible. "Pas de parit" veut dire
  qu'aucun bit de parit n'est ajout. Pour les terminaux qui
  n'autorisent pas les octets de 9 bits, il faut slectionner "pas de
  parit" pour utiliser des codes de caractres sur 8 bits puisqu'il n'y
  a pas de place pour le bit de parit.


  2211..44..  FFoorrmmaattiioonn dd''uunn oocctteett ((eennccaaddrreemmeenntt))


  Dans la transmission en srie des octets par les ports EIA-232, le bit
  de bas niveau est toujours envoy en premier. Les ports srie sur les
  PC utilisent des communications asynchrones quand il y a un bit de
  dpart et un bit de stop pour marquer le dbut et la fin d'un octet.
  On appelle cela l'encadrement et l'octet encadr s'appelle parfois un
  cadre. Au final, 9, 10 ou 11 bits sont envoys par octet, 10 tant le
  nombre le plus courant. 8-N-1 veut dire 8 bits de donnes, pas de
  parit, 1 bit de stop. Ceci fait en tout 10 bits si on compte le bit
  de dpart. Un bit de stop est utilis quasiment partout.  110
  bits/seconde (et parfois  300 bits/seconde) deux bits de stop taient
  autrefois utiliss mais maintenant le deuxime bit de stop n'est
  utilis que dans des situations trs inhabituelles (ou par erreur
  puisqu'il semble encore fonctionner correctement de cette manire).


  2211..55..  LLiimmiittaattiioonnss ddee EEIIAA--223322



  2211..55..11..  BBaasssseess vviitteesssseess eett ccoouurrtteess ddiissttaanncceess


  Le port srie EIA-232 traditionnel est  basse vitesse de manire
  inhrente, et est srieusement limit en taille (distance). Les
  publicits disent souvent "grande vitesse" mais cela ne peut
  fonctionner  grande vitesse que sur de trs courtes distances comme
  pour un modem situ juste  ct de l'ordinateur. Tous les fils
  utilisent un retour de masse commun et donc la technologie en paire
  torsade (ncessaire  de grandes vitesses) ne peut tre utilise sans
  matriel supplmentaire. Cependant certains ordinateurs possdent des
  interfaces plus modernes. Voyez ``successeurs de EIA-232''.

  Il est parfois dcevant que la norme RS-232 de 1969 n'ait pas utilis
  la technologie en paire torsade qui aurait pu fonctionner  peu prs
  100 fois plus rapidement. Les paires torsades sont utilises dans les
  cbles tlphoniques depuis la fin du 19me sicle. En 1888 (il y a
  plus de 100 ans) la "confrence sur le cble" a rapport son
  attachement  la paire torsade (pour les systmes tlphoniques) et a
  avanc ses avantages. Mais plus de 80 ans aprs cette approbation par
  la "confrence du cble", RS-232 n'a pas russi  l'utiliser. Puisque
  RS-232 tait au dpart faite pour connecter un terminal  un modem
  basse vitesse situ tout prs, le besoin de grande vitesse et d'une
  longueur de transmission plus leve n'a apparemment pas t peru.


  2211..55..22..  SSuucccceesssseeuurrss ddee EEIIAA--223322


  Un certain nombre de normes EIA ont t tablies pour des vitesses
  plus leves et des distances plus grandes en utilisant la technologie
  en paire torsade (quilibre). Une transmission quilibre peut
  parfois tre une centaire de fois plus rapide que EIA-232 non
  quilibre. Pour une vitesse donne, la distance (longueur maximale du
  cble) peut tre beaucoup de fois plus grande avec de la paire
  torsade. Mais les PC continuent d'tre fabriqus avec l'EIA-232
  "obsolte" puisque que cela fonctionne correctement avec les modems
  relis aux lignes tlphoniques lentes, et cela fonctionne
  correctement avec les souris.

  Une exception reste l'ordinateur Macintosh d'Apple avec son GeoPort
  EIA-232/EIA-422 qui fournit de la paire torsade (quilibre) pour la
  transmission et la rception. Il utilise un petit connecteur rond
  "mini-DIN".  Il fournit aussi du EIA-232 traditionnel mais seulement 
  5 volts (ce qui reste du EIA-232 lgal). Cependant,  cause du fait
  que les Mac cotent plus cher que les PC, on les utilise rarement
  comme ordinateur hte pour des terminaux. Certains terminaux rcents
  utilisent l'EIA-423 mais cela reste comme de l'EIA-232 non quilibr
  et on peut les relier  un port EIA-232. Cet EIA-423 ne fait que 5
  volts, mais les spcifications donnent des vitesses plus leves que
  pour EIA-232 (qui ne sera d'aucune aide sur une grande distance o
  c'est le non-quilibrage qu cause les interfrences).

  L'EIA-530-A (quilibr mais peut aussi tre non quilibr)  2 Mbits/s
  (quilibr) tait fait pour remplacer EIA-232 mais on en a peu
  install. Elle utilise le mme connecteur  25 broches que EIA-232.
  L'interface srie  grande vitesse (HSSI = EIA-612/613, High Speed
  Serial Interface) utilise un connecteur  50 broches et monte  peu
  prs  50 Mbits/s mais la distance est limite  seulement quelques
  mtres. Le Bus Srie Universel (USB, Universal Serial Bus) est
  construit dans des puces PCI. Il fait 12 Mbits/s sur une paire
  torsade avec un connecteur  4 broches (2 cbles fournissent le
  courant) mais il est aussi limit  des distances courtes d'au plus 5
  mtres (cela dpend de la configuration).


  2211..55..33..  PPiillootteess ddee lliiggnneess


  Pour un terminal texte, les vitesses de EIA-232 sont suffisamment
  rapides mais la longueur de cble utilisable est souvent trop courte.
  La technologie quilibre pourrait rsoudre ce problme. La mthode
  courante pour obtenir une communication quilibre avec un terminal
  texte est d'installer deux pilotes de ligne dans la liaison srie pour
  convertir du non quilibr en quilibr (et vice-versa). Ce sont des
  appareils spcialiss et ils sont chers si on les achte neufs.


  2211..66..  SSyynncchhrroonniissaattiioonn eett ssyynncchhrroonnee



  2211..66..11..  CCoommmmeenntt oonn ssyynncchhrroonniissee ll''""aassyynncchhrroonnee""


  Dans EIA-232 il n'y a que deux tats sur le fil de transmission (ou de
  rception) : marque (-12 V) ou espace (+12 V). Il n'y a pas d'tat  0
  V.  Ainsi une squence de bits  1 est tranmise avec uniquement du -12
  V stable sans marqueur d'aucune sorte entre les bits. Pour que le
  rcepteur dtecte les bits individuels il doit toujours disposer d'un
  signal d'horloge qui est synchronis avec l'horloge de l'metteur. De
  telles horloges gnrent un "top" synchronis avec chaque bit transmis
  (ou reu).

  En transmission asynchrone, la synchronisation est faite en encadrant
  chaque octet d'un bit de dpart et d'un bit de stop (fait par le
  matriel). Le rcepteur attend sur la ligne un bit de dpart et quand
  il en dtecte un il lance son top d'horloge. Il utilise ce top
  d'horloge pour mesurer le temps de lecture des 7, 8 ou 9 prochains
  bits. (C'est en fait un petit peu plus compliqu que cela puisqu'on
  prend en gnral plusieurs mesures pour un bit, ce qui demande des
  tops supplmentaires.) Ensuite le bit de stop est lu, l'horloge
  s'arrte et le rcepteur attend le bit de dpart suivant. Ainsi
  l'asynchrone est en fait synchronis pendant la rception d'un seul
  octet mais il n'y a pas de synchronisation entre un octet et l'octet
  suivant.




  2211..66..22..  DDffiinniirr ll''aassyynncchhrroonnee ppaarr rraappppoorrtt aauu ssyynncchhrroonnee


  L'asynchrone signifie "non synchrone". En pratique, un signal
  asynchrone reprsente ce que le port srie asynchrone envoie et reoit
  qui est un flux d'octets, chacun d'entre eux tant dlimit par un bit
  de dpart et un bit de stop. Le synchrone est  peu prs tout le
  reste. Mais ceci n'explique pas les concepts de base.

  En thorie, synchrone veut dire que les octets sont envoys  vitesse
  constante l'un aprs l'autre (en accord sur un top d'horloge). Les
  octets asynchrones peuvent tre envoys n'importe quand avec des
  intervalles de temps varis entre les octets (comme quelqu'un qui tape
  des caractres sur un clavier).

  Il y a des situations limites qu'on doit classer comme synchrones ou
  asynchrones. Le port srie asynchrone envoie souvent des octets dans
  un flux constant qui en ferait un cas synchrone mais comme il y aura
  encore les bits de dpart et de stop (ce qui permet de les envoyer de
  manire indtermine) on l'appelle asynchrone. Un autre cas est quand
  les octets de donnes (sans auncun bit de dpart ou de stop) forment
  des paquets avec un espacement erratique entre un paquet et le
  suivant. On l'appelle synchrone puisque les octets  l'intrieur de
  chaque paquet doit tre transmis de manire synchrone.


  2211..66..33..  CCoommmmuunniiccaattiioonn ssyynncchhrroonnee


  Ne vous-tes vous jamais demand ce qu'on faisait de toutes les
  broches inutilises sur un connecteur 25 broches pour le port srie ?
  La plupart d'entre eux sont utiliss dans une communication synchrone
  qu'on implmente rarement sur les PC. Il y a des broches pour les
  signaux de temporisation de synchronisation ainsi que pour un canal
  inverse synchronis. La spcification EIA-232 est donne  la fois
  pour les communications synchrones et asynchrones mais les PC
  utilisent une puce UART (metteur Rcepteur Asynchrone Universel)
  comme un 16450, un 16550A ou un 16550 et ne peuvent faire de la
  synchronisation. Pour faire du synchrone on a besoin d'une puce USART
  ou quivalente o le "S" veut dire synchrone. Puisque le synchrone est
  un march de niche, un port srie synchrone est srement assez cher.

   ct de la partie synchrone de EIA-232, il y a plusieurs autres
  normes EIA synchrones. Pour EIA-232, trois broches sur le connecteur
  sont rserves pour les signaux d'horloge (de temporisation). Parfois
  c'est le rl du modem de gnrer certains signaux de temporisation
  rendant l'utilisation de communications synchrones impossibles sans un
  modem synchrone (ou sans appareil qu'on appelle "liminateur de modem
  synchrone" qui fournit les signaux de temporisation).

  Bien que peu de ports srie soient synchrones, la communication
  synchrone prend souvent place sur les lignes tlphoniques en
  utilisant des modems qui utilisent la correction d'erreurs V.42. Ceci
  enlve les bits de dpart et de stop et place les octets de donnes
  dans des paquets ce qui donne une opration synchrone sur la ligne
  tlphonique.


  2211..77..  MMooddee ppaarr bbllooccss



  2211..77..11..  IInnttrroodduuccttiioonn aauu mmooddee ppaarr bbllooccss



  Le mode par blocs est rarement utilis sous Linux. En mode par blocs,
  quand quelqu'un tape sur un terminal, le rsultat est sauv dans la
  mmoire du terminal et n'est pas envoy immdiatement  l'ordinateur
  hte. De tels terminaux possdent souvent des possibilits d'dition
  intgres. Quand l'utilisateur appuie sur certaines touches (comme la
  touche envoi), ce qui a t sauvegard dans la mmoire du terminal est
  envoy  l'ordinateur hte.  Cependant les diteurs vi et emacs sous
  Linux ragissent instantanment  l'appui de certaines touches, mais,
  dans la situation ci-dessus, si on appuie sur de telles touches, rien
  ne se passera puisque rien n'est envoy quand on appuie sur une
  touche. Ainsi l'utilisation d'un terminal en mode par blocs ne
  permettra pas l'utilisation de tels programmes interactifs. La vieille
  interface vers les minis IBM utilise le mode par blocs (voyez
  ``terminaux IBM'') et donc beaucoup de terminaux IBM ne fonctionnent
  qu'en mode par blocs et sont aussi synchrones (voyez la section
  ``synchronisation et synchrone'').


  2211..77..22..  TTyyppeess ddee mmooddeess ppaarr bbllooccss,, ffoorrmmuullaaiirreess


  Le mode par blocs peut lui-mme avoir divers sous-modes comme "page"
  (une page  la fois) et "ligne" (une ligne  la fois). Certains
  terminaux possdent  la fois les modes de transmissions par blocs et
  les modes traditionnels par caractres, et on peut passer d'un mode 
  l'autre. Les terminaux asynchrones possdant des modes par blocs sont
  parmi les HP2622A, VT130, VT131, VT330, VT340 et Visual500. Beaucoup
  de modles de terminaux plus rcents peuvent muler le mode par blocs.
  Les modes par blocs peuvent comprendre une possibilit de formulaires
  o l'ordinateur hte envoie un formulaire au terminal.  L'utilisateur
  le remplit alors et envoie la touche envoi qui ne renvoie que les
  donnes du formulaire  l'ordinateur hte. Le formulaire lui-mme (pas
  les donnes) est affich  l'cran dans des champs protgs qui ne
  sont pas transmis  l'hte.


  2211..77..33..  EEffffiiccaacciitt


  Les modes par blocs enlvent une bonne partie de la charge sur
  l'ordinateur hte, surtout si le matriel de l'ordinateur hte est
  fait pour les modes par blocs (comme c'est/c'tait le cas sur les
  minis IBM). En mode caractre, chaque caractre tap est envoy
  immdiatement sur le port srie et en gnral gnre une interruption
  sur l'ordinateur hte. L'hte qui reoit l'octet doit arrter tout ce
  qu'il fait et va chercher ce caractre depuis le matriel du port.
  Mme avec des UART qui possdent des tampons matriels FIFO, le dlai
  matriel ne reprsente normalement que le temps de transmission de 3
  octets, donc une interruption est gnre  chaque caractre tap.

  En vrai mode par blocs, un bloc de caractres long est reu en
  n'utilisant qu'une interruption. Si on utilise le mode par blocs avec
  des ports srie FIFO asynchrones, une interruption n'est ncessaire
  que tous les 14 octets puisqu'ils ont des tampons matriels de 16
  octets. Ainsi la plus grande partie de la charge et du cot de la
  gestion des interruptions est limine et l'ordinateur a plus de temps
   consacrer  d'autres tches quand on utilise le mode par blocs.

  On fait des conomies significatives en mode par blocs si le terminal
  est reli  son hte par l'intermdiaire d'un rseau. Sans le mode par
  blocs, chaque caractre (octet) tap est envoy dans son propre paquet
  avec tous les octets d'enveloppe (40 dans un paquet TCP/IP comme ceux
  utiliss sur l'Internet). En mode par blocs, un grand nombre de
  caractres est envoy dans un seul paquet.


  2211..88..  LLiivvrreess ssuurr EEIIAA--223322 ((RRSS--223322))


  (Note : le premier couvre bien plus que EIA-232 uniquement.)


    Black, Uyless D.: Physical Layer Interfaces & Protocols, IEEE
     Computer Society Press, Los Alamitos, CA, 1996.

    Campbell, Joe: The RS-232 Solution, 2nd ed., Sybex, 1982.

    Putnam, Byron W.: RS-232 Simplified, Prentice Hall, 1987.

    Seyer, Martin D.: RS-232 Made Easy, 2nd ed., Prentice Hall, 1991.


  2211..99..  LLooggiicciieellss ssrriiee


  Voyez logiciels srie <ftp://sunsite.unc.edu/pub/Linux/system/serial/>
  pour les logiciels Linux sur les ports srie avec getty et les
  moniteurs de ports.


  2222..  AAnnnneexxee DD :: NNootteess ccllaasssseess ppaarr mmaarrqquuee


  Voici des notes classes par marque qui taient trop spcifiques  un
  certain terminal pour tre mises autre part dans ce HOWTO. Si vous
  avez des informations  apporter pour un terminal particulier qui
  n'est pas couvert autre part, elles pourraient se trouver ici. Divers
  modles et marques ont souvent beaucoup de choses en commun qu'on ne
  doit crire qu' un endroit. Il serait bien d'avoir, pour chaque
  modle de terminal, un grand nombre de liens vers les documentations
  se rapportant  ce modle (avec les squences d'chappement). Il y a
  tellement de modles de terminaux qu'une telle tche serait
  relativement pnible et moi, David Lawyer (en 1998), n'ai aucunement
  l'intention de tenter cette aventure. Si les fabricants de terminaux
  mettaient au moins leurs manuels  disposition sur Internet, alors
  tout ceci ne serait pas ncessaire.


  2222..11..  CCIITT


  Les terminaux CIT ont t fabriqus au Japon dans les annes 1980 pour
  CIE Terminals. On a cess de les importer  la fin des annes 1980. La
  socit, CIE, fabrique encore des imprimantes CItoh (en 1997) mais n'a
  pas de pices dtaches pour ses terminaux arrts. Ernie au (714)
  453-9555  Irvine, Californie, vendait (en 1997) certaines pices pour
  les modles 224, 326, etc. mais n'a rien pour les 80 et 101. (Le
  document que vous lisez  l'heure actuelle a t principalement crit
  sur le 101e.)

  Pour sauver les paramtres de configuration pressez ^S en mode Set-Up.
  cit80 : contraste : molette  l'arrire du terminal, cit101e :
  luminosit : utilisez les touches flches haut/bas en mode Set-Up.


  2222..22..  TTeerrmmiinnaauuxx IIBBMM


  Ne confondez pas les terminaux IBM avec les moniteurs IBM PC. Beaucoup
  de terminaux IBM n'utilisent pas l'ASCII mais  la place un code
  EBCDIC sur 8 bits. On dit que dans EBCDIC l'ordre de transmission des
  bits est inverse par rapport  la normale avec le bit de haut rang en
  premier. Les normes de communication avec les minis IBM sont un type
  de communication synchrone en mode par blocs (envoie de grands paquets
  de caractres). Deux normes sont "BISYNC" et "SNA" (qui comprend des
  normes de rseau). Beaucoup de leurs terminaux sont relis avec du
  cble coaxial (RG62A/U) et les personnes naves peuvent penser que le
  connecteur "BNC" sur le terminal est pour l'Ethernet (mais ce n'est
  pas le cas).

  Alors que ce systme IBM est en ralit plus efficace que ce qui est
  normalement utilis sous Linux, les terminaux possdant ces
  caractristiques IBM ne fonctionneront pas sous Linux. Cependant,
  certains terminaux IBM sont des terminaux ASCII asynchrones et
  devraient fonctionner sous Linux sur des PC. Les modles 31xx peuvent
  fonctionner  l'exception que 317x et 319x ne sont pas des terminaux
  ASCII. Avant d'acqurir un terminal IBM, assurez-vous qu'il y a une
  entre termcap (ou terminfo) pour celui-ci. S'il n'y en a pas, il ne
  fonctionnera probablement pas sous Linux. Mme s'il y a une entre
  terminfo, il peut ne pas fonctionner. Par exemple, il y a une entre
  termcap pour les 327x mais le 3270 est un terminal synchrone EBCDIC.

  Les modles 3270 comprennent le 3278 (fin des annes 1970), le 3279
  avec la couleur et les graphiques, et le contrleur de terminal 3274
  ( peu prs comme le 3174). On peut les utiliser  la fois pour BISYNC
  et SNA. Le 3290 a un cran spar (spar en quartiers).

  Les terminaux synchrones IBM ne sont pas directement relis au mini
  IBM mais sont relis  un "contrleur de terminaux" (qu'on appelle
  parfois "contrleur de cluster" ou "contrleur de communications").
  Certains de ces contrleurs peuvent convertir un signal synchrone en
  asynchrone et donc dans ce cas on pourrait relier indirectement un
  terminal synchrone  un ordinateur hte de type Unix par son port
  srie. Mais il reste un problme majeur qui est la transmission par
  blocs. Voyez la section ``mode par blocs''.


  2222..22..11..  IIBBMM 33115533


  On dit que le port Aux est DCE et utilise un cble droit.


  2222..33..  TTeelleettyyppeess


  Ce sont des antiquits et ils reprsentent les terminaux les plus
  anciens.  Ils ressemblent  des machines  crire tlcommandes mais
  sont grands et font du bruit. Fabriqus par Teletype Corp., les
  premiers modles ont t faits dans les annes 1920 et devancent
  l'ordinateur de plus de 30 ans. Les premiers modles utilisaient des
  relais lectro-mcaniques et des distributeurs rotatifs au lieu
  d'lectronique. Leur code Baudot n'avait que 5 bits par caractre
  compar  l'ASCII sur 7 bits. Voyez le livre "Small Computer Systems
  Handbook" par Sol Libes, Hayden Books, 1978 : pp. 138-141
  ("Teletypes").


  2222..44..  VVTT ((DDEECC))


  Digital Equipment Corporation a fabriqu les modles VT renomms avec
  le VT100 couramment mul. En 1995 ils ont vendu leur partie terminaux
   SunRiver qui s'appelle maintenant Boundless Technologies. On
  trouvera plus d'informations sur le site Web de Shuford
  <http://www.cs.utk.edu/~shuford/terminal_index.html>. Les informations
  sur les produits actuels sont disponibles sur le site Web de
  Boundless. Voyez ``informations sur Internet''.
  VT220 : certains possdent un connecteur BNC pour la sortie vido (pas
  pour l'entre). Parfois les gens croient  tort que c'est pour une
  liaison Ethernet.

  VT520 : il supporte le contrle de flux DTR/DSR complet.


  2222..55..  WWyyssee


  Wyse possde certaines FAQ pour les terminaux dont les numros sont
  en-dessous de 100 (comme le WY60). Voyez
  <http://www.wyse.com/service/faq/wysetterl.htm>. Pour les
  spcifications de terminaux plus rcents voyez
  <http://www.wyse.com/terminal/>.


  2222..55..11..  WWyyssee 9999--GGTT


  Voici les menus de configuration du Wyse99GT (fin des annes 1980).
  Notez que TERM veut dire "terminaison" (caractre) et non "terminal".












































  Configuration du terminal WYSE 99-GT telle qu'utilise  l'universit
        d'Irvine, Californie par David Lawyer, avril 1990

                          F1 DISP:
  COLUMNS=80              LINES=24                CELL SIZE=10 X 13
  STATUS LINE=STANDARD    BACKGROUND=DARK         SCROLL SPEED=JUMP
  SCREEN SAVER=OFF        CURSOR=BLINK BLOCK      DISPLAY CURSOR=ON
  ATTRIBUTE=CHAR          END OF LINE WRAP=ON     AUTO SCROLL=ON
  ----------------------------------------------------------------------------
                          F2  GENERAL:
  PERSONALITY=VT 100      ENHANCE=ON              FONT LOAD=OFF
  COMM MODE=FULL DUPLEX   RCVD CR=CR              SEND ACK=ON
  RESTORE TABS=ON         ANSWERBACK MODE=OFF     ANSWERBACK CONCEAL=OFF
  WIDTH CHANGE CLEAR=OFF  MONITOR=OFF             TEST=OFF
  ----------------------------------------------------------------------------
                          F3 KEYBRD:
  KEYCLICK=OFF            KEYLOCK=CAPS            KEY REPEAT=ON
  RETURN=CR               ENTER=CR                FUNCT KEY=HOLD
  XMT LIMIT=NONE          FKEY XMT LIMIT=NONE     BREAK=170MS
  LANGUAGE=US             MARGIN BELL=OFF         PRINTER RCV=OFF
  ----------------------------------------------------------------------------
                          F4 COMM:
  DATA/PRINTER=AUX/MODEM    MDM RCV BAUD RATE=9600  MDM XMT BAUD RATE=9600
  MDM DATA/STOP BITS=8/1    MDM RCV HNDSHAKE=NONE   MDM XMT HNDSHAKE=NONE
  MDM PARITY=NONE           AUX BAUD RATE=9600      AUX DATA/STOP BITS=8/1
  AUX RCV HNDSHAKE=NONE     AUX XMT HNDSHAKE=NONE   AUX PARITY=NONE
  (Il y a un port principal (Modem=MDM) et un port auxiliaire (AUX)
  ----------------------------------------------------------------------------
                          F5 MISC 1:
  WARNING BELL=ON         FKEY LOCK=OFF           FEATURE LOCK=ON
  KEYPAD=NUMERIC          DEL=DEL/CAN             XFER TERM=EOS
  CURSOR KEYS=NORMAL      MARGIN CTRL=0           DEL FOR LOW Y=ON
  GIN TERM=CR             CHAR MODE=MULTINATIONAL
  ----------------------------------------------------------------------------
                          F6 MISC 2:
  LOCAL=OFF               SEND=ALL                PRINT=NATIONAL
  PORT=EIA DATA           SEND AREA=SCREEN        PRINT AREA=SCREEN
  DISCONNECT=60 MSEC      SEND TERM=NONE          PRINT TERM=NONE
  PRINT MODE=NORMAL       VT100 ID=VT100          POUND=US
  ----------------------------------------------------------------------------
  F7 TABS: Vous devriez voir plusieurs caractres "T" spars par 8 points.
      Sinon, appuyez sur backspace.
  F8 F/KEYS: Vous ne verrez normalement pas de dfinition pour les touches de
      fonction ici (sauf si quelqu'un les a dfinies et sauves). Ceci veut
      dire qu'elles gnreront normalement leurs valeurs par dfaut (pas
      affiches ici). <ctrl><F5> montre la "dfinition par l'utilisateur" de la
      touche F5, etc.  F9 A/BACK: Normally not defined: ANSWERBACK =
  F10 EXIT: La slection de "DEFAULT ALL" rendra les paramtres par dfaut
      dfinis en usine.



  Astuces sur l'utilisation du Guide de l'Utilisateur du WY-99GT :

  Notez qu'on peut trouver une grande partie de ce qui manque dans ce
  guide dans le Guide du Programmeur WY-99GT. L'mulation (personnalit)
  VT100 s'appelle ANSI et utilise les codes de touches ANSI comme
  indiqu  la page A-10 et plus, bien que le clavier soit en ASCII. Un
  sous-titre sur la page A-13 "clavier ASCII" s'applique aussi au VT100
  parce qu'il a un sur-titre "Touches ANSI..." quelques pages avant.
  Mais tous les titres sur le clavier ASCII ne concernent pas le VT100
  puisqu'ils tombent dans un sur-titre de personnalit non ANSI qu'on
  peut trouver quelques pages auparavant. L'annexe H est le "guide de
  commandes ANSI" sauf pour la personnalit VT52 (ANSI) qu'on trouve
  dans l'annexe G.

  2222..55..22..  WWyyssee 115500


  Quand on sort du menu de configuration avec F12, l'appui sur espace
  change de "non"  "oui" pour sauver la configuration. La phrase 
  gauche de ce non/oui parle d'"alignement vertical" et n'a rien  faire
  avec ce non/oui pour sauver la configuration (interface de menu
  confuse).

  Fin du HOWTO Text-Terminal
























































  traduction du 2 janvier 1999 Astuces Linux HOWTO
  Paul Anderson <mailto:paul@geeky1.ebtech.net>, traduit par
  Arnaud Gomes-do-Vale <mailto:gomesdv@mail.dotcom.fr> et Nat
  Makarvitch <mailto:nat@nataa.fr.eu.org>
  v3.6, Juin 1998

  Ce document contient ces astuces et rglages difficiles  trouver qui
  rendent Linux un peu plus sympathique.
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Astuces simples

     2.1 Un truc pratique pour syslog.
     2.2 Un script pour afficher les HOWTO compacts.
     2.3 Reste-t-il assez de place libre ?
     2.4 Un utilitaire pour nettoyer vos fichiers journaux      (logs).
     2.5 Un script pratique pour nettoyer les fichiers
     2.6 Dplacement de rpertoires inter partitions Linux (filesystems).
     2.7 Trouver les plus gros rpertoires.
     2.8 La Linux Gazette.
     2.9 Indication permettant de rsoudre le problme pos par le VPATH du GNU make version 3.7.
     2.10 Comment interdire  ma machine de lancer fsck aprs chaque dmarrage ?
     2.11 Comment viter les lancements de fsck, au boot, ds au "device busy" ?
     2.12 Comment trouver les plus gros fichiers sur votre disque dur.
     2.13 Comment imprimer sur des pages avec marges ?
     2.14 Mthode permettant de rechercher des expressions rationnelles dans des fichiers.
     2.15 Un script pour faire le mnage derrire les      programmes qui crent des fichiers de sauvegarde.
     2.16 Comment trouver le processus qui occupe le plus de      mmoire.
     2.17 Configuration de
     2.18 Utilisation de ctags pour faciliter la programmation
     2.19 Pourquoi sendmail se bloque-t-il pendant 5 minutes au      dmarrage d'une Red Hat ?
     2.20 Comment configurer une Red Hat pour avoir
     2.21 Comment trouver quelle bibliothque de /usr/lib      contient une fonction donne ?
     2.22 J'ai compil un petit programme en C, mais quand je le      lance, je ne vois aucun rsultat !

  3. Astuces dtailles

     3.1 Linux et Windows peuvent utiliser une mme partition pour le swap !
     3.2 Rcupration de fichiers effacs.
     3.3 Comment utiliser le marqueur d'immutabilit.
     3.4 Une suggestion quant  l'endroit o mettre ce      que vous rajoutez.
     3.5 Conversion de tous les fichiers d'un rpertoire en      minuscules.
     3.6 Mise  jour de Sendmail.
     3.7 Quelques astuces pour les administrateurs systme      dbutants.
     3.8 Comment configurer


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce document est le LLiinnuuxx AAssttuucceess HHOOWWTTOO (titre original : LLiinnuuxx TTiippss
  HHOOWWTTOO), une liste de trucs et d'optimisations bien pratiques, qui
  contribuent  rendre Linux plus agrable. Tout ce qui est ici sort ou
  bien de ma tte, ou bien de l'ancien Astuces HOWTO (aprs tout,
  pourquoi enlever des astuces qui marchent ?) Alors envoyez-moi vos
  astuces prfres (NdT : en anglais !) pour que je puisse les inclure
  dans la prochaine version du Linux Astuces HOWTO.

  Paul Anderson _R__d_a_c_t_e_u_r _d_e _"_L_i_n_u_x _T_I_P_S _H_O_W_T_O_"

  panderso@ebtech.net



  22..  AAssttuucceess ssiimmpplleess

  22..11..  UUnn ttrruucc pprraattiiqquuee ppoouurr ssyysslloogg.. PPaauull AAnnddeerrssoonn,, rrddaacctteeuurr       dduu
  LLiinnuuxx AAssttuucceess HHOOWWTTOO ..

  Editez le ficher /etc/syslog.conf et ajoutez-y la ligne suivante :



       # Tout envoyer sur tty8
       *.*                                      /dev/tty8




  Attention : PENSEZ  UTILISER DES TABULATIONS ! Syslog n'aime pas les
  espaces.



  22..22..  UUnn ssccrriipptt ppoouurr aaffffiicchheerr lleess HHOOWWTTOO ccoommppaaccttss.. DDiiddiieerr       JJuuggeess,,
  ddjj@@ddeessttiinn..nnffddss..nneett ..

  De dbutant  dbutant, voici un petit script qui facilite la lectures
  des howto. Mes howto sont dans /usr/doc/faq/howto/ et sont compresss
  avec gzip. Les fichiers s'appellent XXX-HOWTO.gz, o XXX est le titre.
  J'ai appel le script suivant howto et je l'ai plac dans
  /usr/local/sbin/ :



       ______________________________________________________________________
       #!/bin/sh
       if [ "$1" = "" ]; then
           ls /usr/doc/faq/howto | less
       else
           gunzip -c /usr/doc/faq/howto/$1-HOWTO.gz | less
       fi
       ______________________________________________________________________




  Appel sans argument, il affiche la liste des howto disponibles. Quand
  on lui passe en argument la premire partie du nom du fichier (avant
  le trait d'union), il dcompacte le document (en laissant l'original
  intact) et l'affiche  l'cran.

  Par exemple, pour afficher le document Serial-HOWTO.gz, tapez :


       $ howto serial






  22..33..  zzoocckkii@@ggoollddffiisshh..ccuubbee..nneett ..  RReessttee--tt--iill aasssseezz ddee ppllaaccee lliibbrree ??
  HHaannss ZZooeebbeelleeiinn,,


  Voici un script qui vrifie  intervalles rguliers qu'il reste de la
  place sur tout ce qui est mont (disques durs, CDROM, disquettes...)

  En cas de pnurie d'espace libre, un message est affich  l'cran
  toutes les X secondes et un courrier lectronique est envoy pour
  chaque priphrique qui dborde.




























































  ______________________________________________________________________
  #!/bin/sh

  #
  # $Id: Tips-HOWTO.sgml,v 1.2 1999/02/02 02:11:38 arnaud Exp $
  #

  #
  # Depuis que j'ai t confront  des
  # messages d'erreur mystrieux pendant les compilations
  # quand les fichiers temporaires remplissaient mes disques, j'ai
  # crit a pour tre averti avant que les disques
  # ne soient pleins.
  #
  # Si a a empech vos serveurs d'exploser, envoyez
  # les courriers de remerciement  zocki@goldfish.cube.net.
  # Si votre site flambe  cause de a, dsol
  # mais je vous avais prvenu: c'est votre problme
  # Si vous savez vraiment vous servir de sed, excusez moi :)
  #

  #
  # Lancez-le et vous pouvez l'oublier: mettez "check_hdspace &"
  # dans rc.local. Il vrifie l'espace libre toutes les
  # $SLEEPTIME secondes. Vous pouvez mme surveiller vos
  # disquettes et vos bandes.  :)
  # Si l'espace libre est infrieur  $MINFREE (Ko),
  # le script va afficher un message d'avertissement et envoyer un
  # courrier  $MAIL_TO_ME pour chaque priphrique
  # concern. Ds qu'il y a  nouveau plus de place
  # libre que la limite, le systme d'envoi de courrier est
  # ramorc.
  #

  # RESTE  FAIRE:
  # Des $MINFREE diffrents pour chaque priphrique
  # Nettoyer les rpertoires /*tmp des vieilleries en cas de
  #           pnurie d'espace.


  DEVICES='/dev/sda2 /dev/sda8 /dev/sda9' # vos disques
  MINFREE=20480                           # la limite
  SLEEPTIME=10                            # secondes entre deux vrifications
  MAIL_TO_ME='root@localhost'             # la personne  avertir


  # ------- rien  changer en dessous (j'espre :) -------

  MINMB=0
  ISFREE=0
  MAILED=""
  let MINMB=$MINFREE/1024         # oui, on fait a bien :)

  while [ 1 ]; do
          DF="`/bin/df`"
                  for DEVICE in $DEVICES ; do
                  ISFREE=`echo $DF | sed s#.\*$DEVICE" "\*[0-9]\*""\*[0-9]\*" "\*## | sed s#" ".\*##`

                  if [ $ISFREE -le $MINFREE ] ; then
                          let ISMB=$ISFREE/1024
                          echo  "WARNING: $DEVICE only $ISMB mb free." >&2
                          #echo "more stuff here" >&2
                          echo -e "\a\a\a\a"

                          if [ -z  "`echo $MAILED | grep -w $DEVICE`" ] ; then
                                  echo "WARNING: $DEVICE only $ISMB mb free.      (Trigger is set to $MINMB mb)" \
                                  | mail -s "WARNING: $DEVICE only $ISMB mb free!" $MAIL_TO_ME
                                  MAILEDH="$MAILED $DEVICE"
                                  MAILED=$MAILEDH
                                  # rajoutez ce qu'il reste  faire
                                  # par exemple nettoyer les */tmp
                          fi
                          elif [ -n  "`echo $MAILED | grep -w $DEVICE`" ] ; then
                                  # Enlever le marqueur de courrier si
                                  # l'espace disponible remonte
                                  # au-dessus de la limite. Pour pouvoir
                                  # envoyer un nouveau message en cas de
                                  # besoin.
                                  MAILEDH="`echo $MAILED  | sed s#$DEVICE##`"
                                  MAILED=$MAILEDH
                          fi

                  done
                  sleep $SLEEPTIME

  done
  ______________________________________________________________________







  22..44..  ((llooggss)).. PPaauull AAnnddeerrssoonn,, rrddaacctteeuurr dduu LLiinnuuxx AAssttuucceess HHOOWWTTOO ..  UUnn
  uuttiilliittaaiirree ppoouurr nneettttooyyeerr vvooss ffiicchhiieerrss jjoouurrnnaauuxx

  Si vous tes comme moi, vous avez une liste de diffusion avec 430
  inscrits et plus de 100 messages qui arrivent tous les jours par UUCP.
  Qu'est-ce qu'un bidouilleur peut bien faire avec ces normes fichiers
  journaux ? Il peut installer chklogs. chklogs a t crit par Emilio
  Grimaldo, grimaldo@panama.iaehv.nl, et la version 1.8 actuelle est
  disponible sur ftp.iaehv.nl:/pub/users/grimaldo/chklogs-1.8.tar.gz.
  C'est trs simple  installer (il faut bien sr lire le contenu du
  rpertoire doc). Une fois le paquetage install, rajoutez une entre 
  votre crontab :



       # Lance chklogs tous les jours  21h
       00 21 * * *          /usr/local/sbin/chklogs -m




  Pendant que vous y tes, n'oubliez pas de dire  l'auteur  quel point
  vous apprciez son logiciel :)



  22..55..  ccoorree .. OOttttoo HHaammmmeerrssmmiitthh ..  UUnn ssccrriipptt pprraattiiqquuee ppoouurr nneettttooyyeerr lleess
  ffiicchhiieerrss

  Crez un fichier rmcores (l'auteur l'appelle handle-cores) contenant
  ceci :







  ______________________________________________________________________
  #!/bin/sh
  USAGE="$0 <directory> <message-file>"

  if [ $# != 2 ] ; then
          echo $USAGE
          exit
  fi

   echo Deleting...
  find $1 -name core -atime 7 -print -type f -exec rm {} \;

  echo e-mailing
  for name in `find $1 -name core -exec ls -l {} \; | cut -c16-24`
  do
          echo $name
          cat $2 | mail $name
  done
  ______________________________________________________________________




  Et utilisez cron pour le lancer  intervalles rguliers.



  22..66..  DDppllaacceemmeenntt ddee rrppeerrttooiirreess iinntteerr ppaarrttiittiioonnss LLiinnuuxx ((ffiilleessyysstteemmss))..
  AAllaann CCooxx,,  AA..CCooxx@@sswwaannsseeaa..aacc..uukk ..



       (cd /rpertoire_source && tar cf - . ) | (cd /rpertoire_cible && tar xvf -)




  _[ _E_t _p_a_s _c_d _/_r__p_e_r_t_o_i_r_e___s_o_u_r_c_e_; _t_a_r_._._._e_t_c_._, _q_u_i _l_a_i_s_s_e _l_a _p_o_s_s_i_b_i_l_i_t_
  _d_e _b_o_u_s_i_l_l_e_r _u_n _r__p_e_r_t_o_i_r_e _e_n _c_a_s _d_e _p_r_o_b_l__m_e_. _M_e_r_c_i _ _J_i_m _D_e_n_n_i_s_,
  jim@starshine.org, qui me l'a signal. -le rdacteur ]



  22..77..  TTrroouuvveerr lleess pplluuss ggrrooss rrppeerrttooiirreess.. MMiicckk GGhhaazzeeyy ..

  Vous vous tes dj demand quels taient les plus gros rpertoires
  sur votre machine ?  Voici une faon de les trouver.



       du -S | sort -n






  22..88..  LLaa LLiinnuuxx GGaazzeettttee..

  Bravo et merci  John Fisk, le crateur de la Linux Gazette. C'est un
  excellent magazine en ligne, qui plus est GGRRAATTUUIITT !! Que demander de
  plus ? Vous pouvez le trouver  l'adresse :




  http://www.linuxgazette.com




  Au fait, il s'avre que (1) la LG est maintenant mensuelle et (2) elle
  n'est plus maintenue par John Fisk, mais par l'quipe de SSC.



  22..99..  IInnddiiccaattiioonn ppeerrmmeettttaanntt ddee rrssoouuddrree llee pprroobbllmmee ppooss ppaarr llee VVPPAATTHH
  dduu GGNNUU mmaakkee vveerrssiioonn 33..77.. TTeedd SStteerrnn,,  sstteerrnn@@aammaatthh..wwaasshhiinnggttoonn..eedduu ..

  J'ignore si ce problme concerne de nombreux utilisateurs mais l'une
  des caractristiques de la version 3.7 du GNU make ne m'enthousiasme
  pas. Il s'agit du comportement d'un VPATH sur rpertoire absolu. Un
  robuste patch corrige cela, vous pourrez l'obtenir auprs de Paul D.
  Smith <psmith@wellfleet.com>  (-- Veuillez rdiger votre courrier en
  anglais !  NDT--) .  Ce dernier poste dans le groupe gnu.utils.bug un
  article contenant ce patch et sa documentation aprs parution de
  chaque nouvelle version du GNU make.  En ce qui me concerne... il est
  install sur tous les systmes auxquels j'ai accs !



  22..1100..  CCoommmmeenntt iinntteerrddiirree  mmaa mmaacchhiinnee ddee llaanncceerr ffsscckk aapprrss cchhaaqquuee
  ddmmaarrrraaggee ?? DDaallee LLuuttzz,,  ddaall@@wwiimmsseeyy..ccoomm ..

  Rponse : Aprs recompilation du noyau le systme de fichiers est
  considr comme non vrifi ("marked as dirty"), ce qui implique que
  fsck sera mis en action lors de chaque dmarrage. Pour viter cela
  lancer :


       rdev -R /zImage 1




  Cela modifie le noyau qui, ds lors, considre que le systme de
  fichiers est sain.


  Note : Ajoutez, si vous employez LILO, read-only  la section de
  l'image de boot de votre fichier de configuration LILO (souvent nomm
  /etc/lilo/config ou /etc/lilo.conf).



  22..1111..  CCoommmmeenntt vviitteerr lleess llaanncceemmeennttss ddee ffsscckk,, aauu bboooott,, ddss aauu ""ddeevviiccee
  bbuussyy"" ?? JJoonn TToommbbss,,  jjoonn@@ggtteexx0022..uuss..eess ..

  Si votre systme connat de frquentes erreurs de type "device busy"
  au dmarrage qui laissent le systme de fichiers dans un tat exigeant
  un fsck, veuillez suivre les recommandations suivantes :

  Ajoutez, au fichier /etc/rc.d/init.d/halt ou /etc/rc.d/rc.0, la ligne


       mount -o remount,ro /mount.dir




  pour tous vos systmes de fichiers monts, sauf la racine, avant
  l'invocation de umount -a. Cela signifie que si, pour une quelconque
  raison, "shutdown" ne parvient pas  tuer tous les processus puis
  dmonter les partitions ces dernires seront malgr tout considres
  comme saines lors du redmarrage.  Cette astuce a considrablement
  court le temps de dmarrage de mon systme !



  22..1122..  dduurr.. SSiimmoonn AAmmoorr,,  ssiimmoonn@@ffoooobbaarr..ccoo..uukk ..  CCoommmmeenntt ttrroouuvveerr lleess
  pplluuss ggrrooss ffiicchhiieerrss ssuurr vvoottrree ddiissqquuee



       ls -l | sort +4n




  Pour ceux d'entre vous qui sont vraiment  l'troit, a prend du
  temps, mais a marche bien :



       cd /
       ls -lR | sort +4n






  22..1133..  CCoommmmeenntt iimmpprriimmeerr ssuurr ddeess ppaaggeess aavveecc mmaarrggeess ?? MMiikkee DDiicckkeeyy,,
  mmddiicckkeeyy@@tthhoorrpplluuss..lliibb..ppuurrdduuee..eedduu ..



       ______________________________________________________________________
               #!/bin/sh
               # /usr/local/bin/print
               # Une simple sortie formate pour permettre de
               # perforer les feuilles afin de les mettre dans un classeur

               cat $1 | pr -t -o 5 -w 85 | lpr
       ______________________________________________________________________






  22..1144..  MMtthhooddee ppeerrmmeettttaanntt ddee rreecchheerrcchheerr ddeess eexxpprreessssiioonnss rraattiioonnnneelllleess
  ddaannss ddeess ffiicchhiieerrss.. RRaauull DDeelluutthh MMiilllleerr,,  rroocckkwweellll@@nnoovvaa..uummdd..eedduu ..

  Je dsigne, par "expressions rationnelles", les regexp de "grep" et
  consorts.

  J'ai appel ce script "forall" et l'utilise ainsi :


       forall /usr/include grep -i ioctl
       forall /usr/man grep ioctl




  Voici le script forall:

  ______________________________________________________________________
  #!/bin/sh
  if [ 1 = `expr 2 \> $#` ]
  then
          echo Syntaxe: $0 repertoire commande [arguments]
          exit 1
  fi
  dir=$1
  shift
  find $dir -type f -print | xargs "$@"
  ______________________________________________________________________






  22..1155..  pprrooggrraammmmeess qquuii ccrreenntt ddeess ffiicchhiieerrss ddee ssaauuvveeggaarrddee..  UUnn ssccrriipptt
  ppoouurr ffaaiirree llee mmnnaaggee ddeerrrriirree lleess

  Voici un petit script de deux lignes qui parcourt une arborescence et
  qui y efface les fichiers de sauvegarde (# et ~) d'emacs, les fichiers
  .o, et les fichiers .log de TeX. Il compacte galement les fichiers
  .tex et README. Sur mon systme, je l'ai appel "squeeze".



       ______________________________________________________________________
       #!/bin/sh
       #SQUEEZE efface les fichiers superflus et compacte les fichiers .tex
       #et README.
       #Par Barry tolnas, tolnas@sun1.engr.utk.edu
       #
       echo nettoyage de $PWD
       find  $PWD \( -name \*~ -or -name \*.o -or -name \*.log -or -name \*\#\) -exec
       rm -f {} \;
       find $PWD \( -name \*.tex -or -name \*README\* -or -name \*readme\* \) -exec gzip -9 {} \;
       ______________________________________________________________________






  22..1166..  mmmmooiirree.. SSiimmoonn AAmmoorr ..  CCoommmmeenntt ttrroouuvveerr llee pprroocceessssuuss qquuii ooccccuuppee
  llee pplluuss ddee



       ps -aux | sort +4n




  -OU-


       ps -aux | sort +5n








  22..1177..  AAnnddeerrssoonn,, rrddaacctteeuurr dduu LLiinnuuxx AAssttuucceess HHOOWWTTOO ..  CCoonnffiigguurraattiioonn ddee
  vvii  ppoouurr llaa pprrooggrraammmmaattiioonn eenn CC.. PPaauull

  Je passe beaucoup de temps  programmer en C, et j'ai pris le temps de
  configurer vi pour me faciliter la tche. Voici le contenu de mon
  fichier .exrc :



       ______________________________________________________________________
       set autoindent
       set shiftwidth=4
       set backspace=2
       set ruler
       ______________________________________________________________________




  Qu'est-ce que a fait ? autoindent force vi  indenter automatiquement
  toutes les lignes qui suivent la premire ligne indente, shiftwidth
  impose une taille de 4 espaces pour ^T, backspace configure la touche
  d'espacement arrire, et ruler force l'affichage des numros de
  lignes. Notez que pour placer le curseur sur une ligne donne, par
  exemple la ligne 20, vous pouvez utiliser :



       vi +20 monfichier.c






  22..1188..  UUttiilliissaattiioonn ddee ccttaaggss ppoouurr ffaacciilliitteerr llaa pprrooggrraammmmaattiioonn

  Beaucoup de bidouilleurs ont dj ctags sur leur machine, mais ne s'en
  servent pas. Cela peut tre trs pratique pour diter des fonctions
  spcifiques. Supposez que vous avez une fonction dans l'un des
  nombreux fichiers sources contenus dans un rpertoire pour un
  programme que vous tes en train d'crire, et que vous voulez diter
  cette fonction pour faire une mise  jour. Appelons cette fonction
  foo(). Vous ne savez pas non plus o elle se trouve dans le fichier
  source. C'est l que ctags peut tre trs pratique. Quand vous le
  lancez, ctags cre un fichier nomm tags dans le rpertoire courant,
  qui contient la liste de toutes les fonctions, le fichier source dans
  lequel elles se trouvent et leur emplacement dans ce fichier source.
  Le fichier tags ressemble  a :



       ______________________________________________________________________

       ActiveIconManager       iconmgr.c       /^void ActiveIconManager(active)$/
       AddDefaultBindings      add_window.c    /^AddDefaultBindings ()$/
       AddEndResize    resize.c        /^AddEndResize(tmp_win)$/
       AddFuncButton   menus.c /^Bool AddFuncButton (num, cont, mods, func, menu, item)$/
       AddFuncKey      menus.c /^Bool AddFuncKey (name, cont, mods, func, menu, win_name, action)$/
       AddIconManager  iconmgr.c       /^WList *AddIconManager(tmp_win)$/
       AddIconRegion   icons.c /^AddIconRegion(geom, grav1, grav2, stepx, stepy)$/
       AddStartResize  resize.c        /^AddStartResize(tmp_win, x, y, w, h)$/
       AddToClientsList        workmgr.c       /^void AddToClientsList (workspace, client)$/
       AddToList       list.c  /^AddToList(list_head, name, ptr)$/
       ______________________________________________________________________

  Pour diter, par exemple, AddEndResize() avec vim, tapez :



       vim -t AddEndResize




  Cela va ouvrir le bon fichier dans l'diteur et placer le curseur au
  dbut de la fonction.



  22..1199..  ddmmaarrrraaggee dd''uunnee RReedd HHaatt ?? PPaauull AAnnddeerrssoonn ..  PPoouurrqquuooii sseennddmmaaiill ssee
  bbllooqquuee--tt--iill ppeennddaanntt 55 mmiinnuutteess aauu

  C'est un problme assez courant, presque au point d'en faire une FAQ.
  Je ne sais pas si Red Hat corrige l'erreur dans sa distributions, mais
  vous pouvez rparer a vous-mme. Si vous regardez dans votre fichier
  /etc/hosts, vous allez trouver quelque chose qui ressemble  a :



       127.0.0.1        localhost        votremachine




  Quand sendmail dmarre, il fait une recherche sur le nom de votre
  machive (votremachine dans l'exemple). Ensuite, il trouve que
  l'adresse IP de la machine est 127.0.0.1; sendmail n'aime pas a et
  recommence la recherche. Il continue comme a pendant un moment avant
  d'abandonner. Corriger ce problme est trs facile : ditez votre
  fichier /etc/hosts et mettez-y quelque chose comme a :



       127.0.0.1        localhost
       10.56.142.1      votremachine






  22..2200..  PPaauull AAnnddeerrssoonn,,  ppaauull@@ggeeeekkyy11..eebbtteecchh..nneett ..  CCoommmmeenntt ccoonnffiigguurreerr
  uunnee RReedd HHaatt ppoouurr aavvooiirr llss  eenn ccoouulleeuurrss??

  La distribution Red Hat est fournie avec color-ls (ls en couleurs),
  mais je n'arrive pas  comprendre pourquoi ils ne le configurent pas
  pour utiliser les couleurs par dfaut. Voici une faon d'arranger a.

  Commencez par taper eval `DIRCOLORS`

  Puis alias ls='ls --color=auto'

  Enfin, mettez la ligne "alias ....." dans votre /etc/bashrc.



  22..2211..  ccoonnttiieenntt uunnee ffoonnccttiioonn ddoonnnnee ?? PPaawweell VVeesseellooww ..  CCoommmmeenntt ttrroouuvveerr
  qquueellllee bbiibblliiootthhqquuee ddee //uussrr//lliibb

  Vous tes en train de compiler un programme et vous avez oubli de
  lier une bibliothque ncessaire? Et gcc qui ne donne que les noms des
  fonctions manquantes... Voici une commande pour trouver ce que vous
  cherchez :



       for i in *; do echo $i:;nm $i|grep tgetnum 2>/dev/null;done




  Remplacez tgetnum par le nom de la fonction que vous cherchez.



  22..2222..  llaannccee,, jjee nnee vvooiiss aauuccuunn rrssuullttaatt !!  JJ''aaii ccoommppiill uunn ppeettiitt pprroo
  ggrraammmmee eenn CC,, mmaaiiss qquuaanndd jjee llee

  Vous avez compil le programme et cr un programme appel test, non?
  Linux a dj un programme test, qui teste si une certaine condition
  est vraie et qui n'affiche aucun rsultat  l'cran. Pour lancer votre
  programme test, tapez ./test.



  33..  AAssttuucceess ddttaaiilllleess

  33..11..  LLiinnuuxx eett WWiinnddoowwss ppeeuuvveenntt uuttiilliisseerr uunnee mmmmee ppaarrttiittiioonn ppoouurr llee
  sswwaapp !! TToonnyy AAcceerroo,,  aaccee33@@mmiiddwwaayy..uucchhiiccaaggoo..eedduu ..


  1. Formater la partition sous DOS puis y disposer le fichier d'change
     de Windows. Ne pas employer Windows tout de suite afin de laisser
     ce fichier compltement "vide" pour faciliter son compactage.

  2. Dmarrer Linux et sauver ce fichier dans un fichier.  Exemple (cas
     d'une partition de "swap" commun nomme /dev/hda8) :


       dd if=/dev/hda8 of=/etc/dosswap




  3. Compacter le fichier de swap :


       gzip -9 /etc/dosswap




  4. Ajouter au fichier /etc/rc la ligne suivante afin de prparer et
     installer la partition de swap lorsqu'elle est employe par Linux :
     _X_X_X_X_X _r_e_p_r__s_e_n_t_e _i_c_i _l_e _n_o_m_b_r_e _d_e _b_l_o_c_s _q_u_e _c_o_m_p_t_e _l_a _p_a_r_t_i_t_i_o_n _d_e
     _s_w_a_p


       mkswap /dev/hda8 XXXXX
       swapon -av




  Ajoutez une ligne destine  cette partiton de swap dans le fichier
  /etc/fstab

  5.  Si les programmes init et shutdown employs utilisent /etc/brc
     ajouter  ce fichier les lignes suivantes :


       swapoff -av
       zcat /etc/dosswap.gz | dd of=/dev/hda8 bs=1k count=100




  Dans le cas contraire il vous faudra invoquer ces commandes avant
  chaque fin de session Linux (placer ces commandes dans un script...)

  Note : dd ne traite que 100 blocs car j'ai empiriquement dtermin que
  rien ne sert d'en crire davantage !

  >>  Quels sont les avantages et inconvnients de cette mthode ?

  Avantages : gain d'espace disponible sur le disque !

  Inconvnients : si l'tape de restauration du fichier d'change
  Windows n'est pas automatique il ne faudra pas ngliger, sous Linux et
  avant chaque redmarrage "vers" Windows, de lancer les commandes
  charges de cette remise en place.



  33..22..  RRccuupprraattiioonn ddee ffiicchhiieerrss eeffffaaccss.. MMiicchhaaeell HHaammiillttoonn,,
  mmiicchhaaeell@@aaccttrriixx..ggeenn..nnzz ..

  Voici une astuce dont j'ai eu besoin  quelques reprises.

  La rcupration d'un fichier texte par une personne dsespre.

  Si vous effacez un fichier texte par accident, par exemple un courrier
  lectronique ou le produit d'une nuit de programmation, tout n'est pas
  perdu. Si le fichier a eu le temps d'aller jusqu'au disque, c'est 
  dire s'il a exist pendant plus de 30 secondes, il est possible que
  son contenu se trouve encore sur la partition.

  Vous pouvez le rechercher dans la partition en utilisant la commande
  grep.

  Par exemple, rcemment, j'ai effac un courrier lectronique par
  accident. J'ai immdiatement cess toute activit qui aurait pu
  modifier le contenu de la partition : je me suis abstenu de
  sauvegarder quoi que ce soit, de compiler quoi que ce soit, etc. En
  d'autres occasions, je suis all jusqu' passer le systme en mode
  mono-utilisateur et dmonter le systme de fichiers.

  J'ai ensuite utilis la commande egrep sur la partition : dans mon
  cas, le message se trouvait dans /usr/local/home/michael/, et donc
  d'aprs la sortie de df, dans /dev/hdb5.



          sputnik3:~ % df
          Filesystem         1024-blocks  Used Available Capacity Mounted on
          /dev/hda3              18621    9759     7901     55%   /
          /dev/hdb3             308852  258443    34458     88%   /usr
          /dev/hdb5             466896  407062    35720     92%   /usr/local

          sputnik3:~ % su
          Password:
          [michael@sputnik3 michael]# egrep -50 'ftp.+COL' /dev/hdb5 > /tmp/x

  Je suis extrmement prudent quand je manipule des partitions, donc
  j'ai bien pris le temps de m'assurer que je comprenais la syntaxe de
  cette commande AVANT de presser la touche Entre. Dans ce cas, le
  message contenait la mot "ftp", puis un peu de texte suivi du mot
  "COL". Le message faisait une vingtaine de lignes, donc j'ai utilis
  -50 pour avoir toutes les lignes assez proches de la phrase. Il m'est
  dj arriv d'utiliser -3000 pour tre sr de rperer toutes les
  lignes d'un code source. J'ai redirig le sortie de egrep vers une
  autre partition pour viter d'craser le message que je recherchais.

  J'ai ensuite utilis la commande strings pour examiner le rsultat.



         strings /tmp/x | less




  Effectivement, le message tait l.

  Cette mthode peut ne pas tre efficace si tout ou partie de l'espace
  disque a dj t rutilis.

  Cette astuce n'est probablement utilisable que sur un systme mono-
  utilisateur. Sur un systme multi-utilisateurs avec beaucoup
  d'activit sur les disques, l'emplacement que vous avez libr peut
  trs bien dj avoir t rutilis. Et pour la plupart nous ne pouvons
  pas nous permettre d'enlever la machine de sous les pieds de nos
  utilisateurs ds que nous avons besoin de rcuprer un fichier.

  Sur mon systme personnel, cette astuce a t bien pratique  environ
  trois occasions ces quelques dernires annes - gnralement aprs que
  j'ai dtruit accidentellement une partie de mon travail du jour. Si ce
  que je fais survit assez longtemps pour progresser de faon
  significative, je le sauvegarde sur une disquette, donc je n'ai pas
  souvent besoin de ce truc.



  33..33..  DDeennnniiss,,  jjaaddeessttaarr@@rraahhuull..nneett ..  CCoommmmeenntt uuttiilliisseerr llee mmaarrqquueeuurr
  dd''iimmmmuuttaabbiilliitt.. JJiimm

  Utilisez le marqueur d'immutabilit.

  Juste aprs avoir install et configur votre systme, faites un tour
  dans /bin, /sbin, /usr/bin, /usr/sbin, /usr/lib et autres, et
  n'hsitez pas  vous servir de la commande "chattr +i". Appliquez-la
  aussi aux fichiers du noyau  la racine. Maintenant, "mkdir
  /etc/.dist" et copiez-y toute l'arborescence contenue dans /etc (je le
  fais en deux tapes en utilisant /tmp/etcdist.tar pour viter la
  rcursion). (Vous pouvez aussi vous contenter de /etc/.dist.tar.gz).
  Et placez-y un marqueur d'immutabilit.

  Tout cela sert  limiter les dgts que vous pouvez faire en tant que
  root. Vous viterez ainsi d'craser des fichiers avec une redirection
  mal contrle, et vous ne risquez pas de rendre le systme
  inutilisable  cause d'une espace mal place dans une commande "rm
  -fr" ; vous pouvez toujours faire trs mal  vos donnes, mais vos
  binaires et vos bibliothques seront  l'abri.

  De plus, cela prvient, ou du moins complique, l'exploitation d'un
  certain nombre de trous de scurit ; en effet, beaucoup d'attaques de
  ce type crasent un fichier au moyen d'un quelconque programme SUID
  qui _n_e _p_e_r_m_e_t _p_a_s _d_'_e_x__c_u_t_e_r _u_n_e _c_o_m_m_a_n_d_e _a_r_b_i_t_r_a_i_r_e.

  Le seul inconvnient se prsente  l'installation de divers logiciels
  systme. D'un autre ct, a empche l'crasement accidentel de
  fichiers par "make install". Si vous oubliez de lire le Makefile et
  d'appliquer chattr -i aux fichiers qui doivent tre crass (et aux
  rpertoires auxquels vous voulez ajouter des fichiers), le make
  choue, et il suffit d'utiliser chattr avant de le relancer. Vous
  pouvez aussi en profiter pour dplacer vos anciens binaires,
  bibliothques et autres dans un rpertoire .old/, les renommer, les
  archiver ou autre.



  33..44..  qquuee vvoouuss rraajjoouutteezz..  UUnnee ssuuggggeessttiioonn qquuaanntt  ll''eennddrrooiitt oo mmeettttrree
  ccee

  Tout ce que vous rajoutez doit se trouver sous /usr/local ou
  /usr/local/`hostname`!

  Si votre distribution laisse /usr/local vide, crez /usr/local/src,
  /usr/local/bin, etc. et utilisez-les. Si votre distribution met des
  choses dans /usr/local, crez /usr/local/`hostname` et donnez-lui le
  mode +w pour le groupe wheel (en plus, je le rends SUID et SGID pour
  m'assurer que les membres du groupe wheel ne peuvent toucher qu'
  leurs propres fichiers et que tous les nouveaux fichiers vont
  appartenir au groupe wheel).

  Maintenant, forcez-vous  _T_O_U_J_O_U_R_S placer les nouveaux paquetages sous
  /usr/local/src/.from/$OU_JE_L_AI_EU (pour les fichiers .tar ou autres)
  et  les compiler sous /usr/local/src (ou .../$HOSTNAME/src). Assurez-
  vous qu'ils s'installent sous la hirarchie locale. Si quelque chose
  *doit obligatoirement* tre install dans /bin ou /usr/bin ou autre,
  crez un lien symbolique depuis la hirarchie locale vers tout ce qui
  est install ailleurs.

  La raison de tout a, mme si a reprsente plus de travail, est que
  a permet de trouver facilement ce qui doit tre sauvegard et
  rinstall en cas de rinstallation complte depuis le mdia de
  distribution (habituellement un CD  l'heure actuelle). En utilisant
  un rpertoire /usr/local/src/.from, vous gardez aussi une trace de la
  provenance de vos sources, ce qui est utile pour trouver les mises 
  jour et qui peut s'avrer critique pour suivre les listes d'annonces
  de scurit.

  Un de mes systmes personnels (celui que j'utilise) a t mont avant
  que je n'applique moi-mme cette politique. Je ne "sais" toujours pas
  en quoi il diffre du systme de base "tel qu'install". Et cela bien
  que je n'ai chang que trs peu de choses quant  sa configuration et
  que je suis le *seul*  l'utiliser.

  A contrario, tous les systmes que j'ai mis en place au travail (o
  j'ai t bombard administrateur systme) ont t configurs de cette
  faon. Ils ont t administrs par plusieurs personnes extrieures et
  autres membres du dpartement informatique, et ils ont subi de
  nombreuses mises  jour et installations de logiciels. Pourtant, j'ai
  une ide trs prcise de ce qui a t rajout *aprs* l'installation
  et la configuration initiales.



  33..55..  mmiinnuussccuulleess.. JJuussttiinn DDoosssseeyy,,  ddoosssseeyy@@oouu..eedduu ..  CCoonnvveerrssiioonn ddee ttoouuss
  lleess ffiicchhiieerrss dd''uunn rrppeerrttooiirree eenn

  J'ai remarqu quelques procdures difficiles ou superflues
  recommandes dans les trucs et astuces du numro 12  (-- NdT :
  Apparemment, cette section est tire de la Linux Gazette--) . Comme il
  y en a plusieurs, je vous adresse ce message.
       ______________________________________________________________________
       #!/bin/sh
                # lowerit
                # convertit les noms de tous les fichiers du rpertoire
                # courant en minuscules
                # n'affecte que les fichiers, pas les sous-rpertoires
                # demande confirmation avant d'craser un fichier existant
                for x in `ls`
                  do
                  if [ ! -f $x ]; then
                    continue
                    fi
                  lc=`echo $x  | tr '[A-Z]' '[a-z]'`
                  if [ $lc != $x ]; then
                    mv -i $x $lc
                  fi
                  done
       ______________________________________________________________________




  Voil un long script. Je n'crirais pas un script pour a ;
  j'utiliserais plutt la commande suivante :



       for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr '[A-Z]' '[a-z]'`;
       done;




  Ce contributeur dit qu'il a crit le script de cette faon pour des
  raisons de lisibilit (voir plus bas).

  Pour l'astuce suivante, qui traite de l'ajout et de la suppression
  d'utilisateurs, Geoff s'en sort bien jusqu' la dernire tape.
  Rebooter ? J'espre qu'il ne reboote pas  chaque fois qu'il supprime
  un utilisateur. Les deux premires tapes suffisent. De toutes faons,
  quels processus cet utilisateur pourrait-il laisser tourner ? Un bot
  IRC ? Tuez simplement les processus avec :



       kill -9 `ps -aux |grep ^<nom d'utilisateur> |tr -s " " |cut -d " " -f2`




  Par exemple, pour l'utilisateur foo:



       kill -9 `ps -aux |grep ^foo |tr -s " " |cut -d " " -f2`




  Cette question tant classe, passons au mot de passe de root oubli.

  La solution donne dans la Gazette est la plus universelle, mais pas
  la plus facile. Aussi bien avec LILO qu'avec Loadlin, le paramtre
  "single" permet de lancer directement le shell par dfaut au
  dmarrage, sans entrer de login ni de mot de passe.  partir de l, il
  suffit de changer ou d'enlever le mot de passe problmatique, avant de
  taper "init 3" pour passer en mode multi-utilisateurs. De cette faon,
  un seul reboot ; de l'autre, deux reboots.

  Justin Dossey.



  33..66..  ppaauull@@ggeeeekkyy11..eebbtteecchh..nneett MMiissee  jjoouurr ddee SSeennddmmaaiill.. PPaauull AAnnddeerrssoonn,,

  Nous partons d'une source propre. Commencez par vous procurer le code
  source de sendmail. J'ai tlcharg la version 8.9.0, qui est comme
  vous pouvez le voir  la pointe du progrs. Je l'ai rcupre depuis
  ftp.sendmail.org:/pub/sendmail/sendmail-8.9.0.tar.gz

  Il pse  peu prs un mga-octet, et sachant que j'utilise la version
  8.7.6, je crois que a vaut le cot. Si a marche, vous en entendrez
  srement parler ; sinon, je n'aurai plus de courrier et je ne pourrai
  pas distribuer la nouvelle version de ce HOWTO :)

  Maintenant que vous avez tlcharg le source, dcompactez-le. Cela va
  crer un sous-rpertoire sendmail-8.9.0 dans le rpertoire courant.
  Placez-vous dans ce sous-rpertoire et lisez les fichiers README et
  RELEASE_NOTES (et soyez poustoufl par toutes les amliorations
  qu'ils ont apportes). Maintenant, placez-vous dans src. C'est l que
  vous allez faire le plus gros du travail.

  _U_n_e _r_e_m_a_r_q_u_e _a_u _p_a_s_s_a_g_e _: _S_e_n_d_m_a_i_l _e_s_t _u_n _p_r_o_g_r_a_m_m_e _p_e_t_i_t_, _p_u_i_s_s_a_n_t _e_t
  _b_i_e_n __c_r_i_t_. _L_e _b_i_n_a_i_r_e sendmail lui-mme a mis moins de 5 minutes 
  compiler sur mon 5x86 133 avec 32 Mo de RAM ! La totalit de la
  compilation et de l'installation (sans compter la configuration) ont
  pris moins de 15 minutes !

  Je n'utilise pas BIND sur mon systme, donc j'ai cherch les lignes
  suivantes :



       ______________________________________________________________________
       # ifndef NAMED_BIND
       #  define NAMED_BIND    1       /* use Berkeley Internet Domain Server */
       # endif
       ______________________________________________________________________




  et j'ai remplac le 1 par un 0:



       ______________________________________________________________________
       # ifndef NAMED_BIND
       #  define NAMED_BIND    0       /* use Berkeley Internet Domain Server */
       # endif
       ______________________________________________________________________




  Sur la Debian 1.3, db.h est install par dfaut dans /usr/include/db,
  au lieu de /usr/include o sendmail espre le trouver. Placez-vous
  successivement dans les sous-rpertoires src, mailstats, makemap,
  praliases, rmail et smrsh et xecutez la commande suivante :



   ./Build -I/usr/include/db




  Ensuite, cd .. et tapez make install. Voil ! La version 8.9.0 de
  Sendmail doit maintenant tre installe !  Bien sr, a suppose que
  vous avez dj votre configuration d'origine. Pour que tout marche
  bien sur mon systme, comme j'hberge des listes de diffusion
  gratuites utilisant majordomo, j'ai ajout la ligne suivante au dbut
  de mon /etc/sendmail.cf :



       ______________________________________________________________________
       O DontBlameSendmail=forwardfileinunsafedirpath, forwardfileinunsafedirpathsafe
       ______________________________________________________________________




  Sendmail 8.9.0 est  l'heure actuelle plutt bavard  propos des
  permissions des rpertoires et des fichiers, et il va se plaindre 
  propos des rpertoires et des fichiers qui autorisent l'accs en
  criture pour le groupe ou pour tout le monde parmi les fichiers
  d'alias ou .forward. Bien qu'il ne soit pas recommand d'inhiber ces
  avertissements, je suis toujours seul  la console et j'ai trouv que
  ce trou de scurit mineur n'tait en fait pas gnant. C'est vous qui
  voyez.



  33..77..  ddbbuuttaannttss.. JJiimm DDeennnniiss,,  jjaaddeessttaarr@@rraahhuull..nneett QQuueellqquueess aassttuucceess ppoouurr
  lleess aaddmmiinniissttrraatteeuurrss ssyyssttmmee

  Crez et tenez  jour un fichier /README.`hostname` ou
  /etc/README.`hostname` _[ _o_u __v_e_n_t_u_e_l_l_e_m_e_n_t
  /usr/local/etc/README.`hostname` - le rdacteur ]

  Absolument,  compter du _p_r_e_m_i_e_r _j_o_u_r de l'administration d'un
  systme, prenez des notes dans un fichier journal. Vous pouvez mettre
  "vi /README.$(hostname)" sur une ligne du fichier .bash_logout de
  root. Une autre faon de faire est d'crire un script su ou sudo qui
  fait quelque chose comme a :



                       function exit \
                               { unset exit; exit; \
                                 cat ~/tmp/session.$(date +%y%m%d) \
                                 >> /README.$(hostname) && \
                                 vi /README.$(hostname)
                                 }
                       script -a ~/tmp/session.$(date +%y%m%d)
                       /bin/su.org -




  (utilise la commande tape pour crer une trace de la session et cre
  une fonction pour automatiser la mise  jour du fichier journal).

  J'admets que je n'ai pas implant cette automatisation - jusqu'
  maintenant je me suis repos sur ma discipline. Cependant j'ai
  envisag l'ide (au point d'crire les scripts et les fonctions que
  vous avez sous les yeux). Une chose qui me retient est la commande
  "script" elle-mme. Je pense qu'il va falloir que je me procure les
  sources et que je rajoute une paire de paramtres (pour arrter
  l'enregistrement du script depuis la ligne de commandes) avant de me
  mettre  utiliser a.

  Ma dernire suggestion (pour cette fois) :

  La variable PATH de root devrait contenir PATH=~/bin.

  C'est tout. Rien d'autre dans le PATH de root. Tout ce que root peut
  faire est fourni par un lien symbolique dans ~/bin, un alias, une
  fonction shell, un script ou un binaire situ dans ~/bin, ou bien la
  commande est tape avec un chemin d'accs explicite.

  De cette faon, toute personne utilisant le compte root se rend compte
  (parfois douloureusement)  quel point elle fait confiance aux
  binaires. L'administrateur avis d'un systme multi-utilisateurs va en
  plus parcourir rgulirement son rpertoire ~/bin et ses fichiers
  ~/.*history pour y chercher des rptitions et des moyens de les
  contourner.

  L'administrateur vraiment motiv va reprer les enchanements qui
  peuvent tre automatiss, les endroits o des vrifications peuvent
  tre ajoutes, et les tches pour lesquelles les privilges de root
  peuvent tre abandonnes (comme lancer un diteur, un agent de
  transport de courrier lectronique ou autre gros programme pouvant
  excuter des scripts qui *pourraient* tre inclus dans des fichiers de
  donnes - comme vi (./.exrc) ou emacs (./.emacs) ou mme, plus
  insidieux, $EXINIT et les macros contenues au dbut ou  la fin des
  documents). Bien sr, les commandes de ce genre peuvent tre lances
  avec quelque chose comme a :



                       cp $donnes $rpertoire_utilisateur/tmp
                       su -c $commande_d_origine $paramtres
                       cp $rpertoire_utilisateur/tmp $donnes




  (... o les dtails dpendent de la commande).

  Ces dernires prcautions sont pour la plupart superflues pour la
  machine personnelle ou la station "mono-utilisateur". Mais elles
  reprsentent une trs bonne manire d'administrer un gros systme
  multi-utilisateurs, particulirement dans le cas d'un accs public
  (comme les machines de netcom).



  33..88..  CCoommmmeenntt ccoonnffiigguurreerr xxddmm  ppoouurr qquu''iill ppeerrmmeettttee ddee cchhooiissiirr llee
  ssyyssttmmee hhttee ?? AArrrriiggoo TTrriiuullzzii,,  aa..ttrriiuullzzii@@iicc..aacc..uukk ..


  1. Modifier le  fichier lanant xdm lors du dmarrage (probablement
     nomm /etc/rc/rc.6 ou /etc/rc.local) de faon que la section de xdm
     contienne :


       /usr/bin/X11/xdm
       exec /usr/bin/X11/X -indirect hostname




  2. Modifier le fichier /usr/lib/X11/xdm/Xservers et commenter la ligne
     invoquant le serveur sur la machine locale (commence par "0:")

  3. Relancer le systme... tout doit fonctionner !

  J'ajoute cette section aprs avoir su une semaine durant sur ce
  problme !

  Attention : certaines anciennes versions de la distribution SLS
  (1.1.1) exigent qu'un paramtre "-nodaemon" accompagne l'invocation
  d'xdm.  Les version ultrieures ne prsentent PPAASS cette
  caractristique.






















































  UMSDOS HOW-TO
  Jacques Gelinas, jacques@solucorp.qc.ca
  v1.1, 13 November 1995

  _U_m_s_d_o_s  est un systeme de fichiers pour _L_i_n_u_x. Il propose une alterna-
  tive au systeme de fichiers _E_X_T_2. Son principal but est de parvenir  a
  une  coexistence  simplifiee  avec les donnees _M_S_-_D_O_S en partageant la
  meme partition.  Ce document explique tout  d'abord  comment  utiliser
  _U_m_s_d_o_s dans differentes configurations, puis son fonctionnement. Il se
  termine par quelques informations  qui  devraient  vous  permettre  de
  decider  si c'est un bon choix pour vous (cf. Pourquoi UMSDOS a la fin
  de  ce  document).   Adaptation  francaise  realisee   par   Guillaume
  Deschamps  (Guillaume.Deschamps@enst-bretagne.fr) Version de l'adapta-
  tion : v0.1b

  11..  _U_m_s_d_o_s :: PPrreesseennttaattiioonn

  11..11..  HHiissttoorriiqquuee

  Le projet _U_m_s_d_o_s a commence en 1992, et a ete disponible sur le reseau
  sous  forme  de  patch  en  janvier  1994.  Il  a  ete  inclus dans la
  distribution standard du noyau en juillet,  a  partir  de  la  version
  1.1.36.

  _U_m_s_d_o_s  a  ete  au  depart adopte dans la distribution _S_l_a_c_k_w_a_r_e avant
  meme d'etre inclus dans le noyau officiel.

  _U_m_s_d_o_s a commence a etre ameliore a partir de  la  version  1.1.60  du
  noyau.  Ses  performances ont considerablement augmente, surtout en ce
  qui concerne l'ecriture. Il est de nouveau stable  depuis  la  version
  1.1.70 (a peu pres).

  Un bug majeur a ete corrige dans _L_i_n_u_x 1.2.2. Ce bug causait des torts
  aux utilisateurs depuis le debut (certains fichiers  etaient  renommes
  sans  avertissement, donnant l'impression qu'ils avaient ete effaces).
  Attention ! La _S_l_a_c_k_w_a_r_e 2.2 contient toujours  la  version  1.2.1  du
  noyau, donc elle a ce bug.

  11..22..  DDiissppoonniibbiilliittee

  Il  est  disponible  sous forme de patch pour les noyaus 1.0.x, et est
  inclus dans le noyau 1.2. Il peut etre compile avec le noyau ou charge
  comme  un  module. Cependant si vous decidez pour l'instant d'utiliser
  _U_m_s_d_o_s comme un module, il vous faudra aussi utiliser  le  systeme  de
  fichiers  _M_S_-_D_O_S  en  tant  que module. Cela vient d'une limitation du
  systeme de gestion des modules (certains symboles ne sont exportes que
  lorsque les drivers sont eux-memes des modules).

  11..33..  DDiissttrriibbuuttiioonnss llee ssuuppppoorrttaanntt

  Dans  l'etat actuel des choses, seule la distribution _S_l_a_c_k_w_a_r_e semble
  le supporter. Mais j'ai surement tort donc n'hesitez pas  a  m'envoyer
  des corrections a ce sujet. (NdT : en anglais !)

  11..44..  SSiittee dd''aaccccuueeiill

  Le site d'accueil pour _U_m_s_d_o_s est sunsite.unc.edu. Allez faire un tour
  du cote du repertoire /pub/Linux/system/Filesystems/umsdos.

  11..55..  DDooccuummeennttaattiioonn tteecchhnniiqquuee

  Il existe beaucoup  de  documentation  sur  la  structure  interne  de
  _U_m_s_d_o_s, disponible a la fois aux formats HTML et texte au meme endroit
  que les utilitaires.

  Pour ce que j'en sais, la version HTML n'est pas disponible  sur  WWW.
  Vous  devez  la  telecharger,  puis la "untarer" et finalement la lire
  localement.

  11..66..  LL''aauutteeuurr

  Jacques Gelinas jacques@solucorp.qc.ca

  22..  _U_m_s_d_o_s ccoommmmee ppaarrttiittiioonn pprriinncciippaallee

  22..11..  LLee ccoonncceepptt ppsseeuuddoo--rraacciinnee

  Avec _U_m_s_d_o_s, _L_i_n_u_x peut etre installe sur une partition _D_O_S  standard.
  _L_i_n_u_x  est  alors  installe  comme  le  second  (ou troisieme) systeme
  d'exploitation sur la partition. Pour eviter toute collision dans  les
  noms (il existe peut-etre deja un repertoire bin ou tmp sur le lecteur
  C:), _U_m_s_d_o_s a recours a une astuce : la pseudo-racine.

  Tous les fichiers _L_i_n_u_x sont installes  dans  un  sous-repertoire  _D_O_S
  appele   Linux,   generalement  C:\LINUX.  La  structure  normale  des
  repertoires _L_i_n_u_x_/_U_n_i_x se trouve la. Vous obtenez donc :

  +o

     C:\LINUX\BIN

  +o

     C:\LINUX\ETC

  +o

     C:\LINUX\LIB

  +o

     C:\LINUX\ROOT

  +o

     C:\LINUX\SBIN

  +o

     C:\LINUX\TMP

  +o

     C:\LINUX\USR

  +o

     C:\LINUX\VAR

  Quand _U_m_s_d_o_s demarre, il cherche le repertoire linux puis  /linux/etc.
  S'il existe, il active le mode pseudo-racine.

  Le   mode   pseudo-racine  s'occupe  principalement  de  rediriger  le
  repertoire racine vers  C:\LINUX,  ce  qui  donne  comme  resultat  un
  repertoire _U_n_i_x classique :

  +o

     /bin

  +o

     /etc

  +o

     /lib

  +o

     /root

  +o

     /sbin

  +o

     /tmp

  +o

     /usr

  +o

     /var

  Il  ajoute de plus a cette liste un nouveau repertoire appele DOS, qui
  est virtuel.

  22..22..  CCee qquu''iill ffaauutt ssaavvooiirr aa pprrooppooss dduu mmooddee ppsseeuuddoo--rraacciinnee

  +o  Ce mode peut seulement etre active au moment du demarrage. Il n'y a
     aucun moyen de l'activer en utilisant la commande mount.

  +o  Le mecanisme est juste de donner une vue differente d'un systeme de
     fichiers _U_m_s_d_o_s normal. Cela signifie qu'une  partition  principale
     peut  etre  montee tout a fait normalement. Il n'y aura pas d'effet
     pseudo-racine.

     Par exemple, si vous demarrez sous  Linux  avec  une  disquette  de
     maintenance  et  que vous montez votre partition principale normale
     dans  /mnt,  vous  trouverez  tous  vos  repertoires   linux   dans
     /mnt/linux/bin, /mnt/linux/etc et ainsi de suite.

  33..  DDiiffffeerreenntteess rreemmaarrqquueess aauu ssuujjeett dduu ffoonnccttiioonnnneemmeenntt ddee _U_m_s_d_o_s

  33..11..  OOppttiioonn ddee mmoouunntt

  Vous pouvez utiliser les memes options pour mount que pour le  systeme
  de fichiers MS-DOS. L'utilisation de l'option conv= est discutable sur
  un systeme _U_m_s_d_o_s. Je propose de l'eviter. Les options que vous  aurez
  generalement a prendre en compte sont :

  +o  uid=

  +o  gid=

  +o  umask=

  Il  faut  juste  vous  souvenir  que _U_m_s_d_o_s traite les repertoires non
  promus de la meme facon que _M_S_-_D_O_S. Les options  ci-dessus  vont  donc
  s'appliquer  globalement  a  tous  les  repertoires  non  promus.  _u_i_d
  configure le proprietaire par defaut, _g_i_d  le  groupe  par  defaut  et
  _u_m_a_s_k les permissions par defaut sur les fichiers.

  33..22..   CCoommmmeenntt  ddeetteerrmmiinneerr  lleess  vvaalleeuurrss  ppaarr ddeeffaauutt ppoouurr llaa ppaarrttiittiioonn
  pprriinncciippaallee

  umssetup  a ete creee pour determiner au lancement le proprietaire par
  defaut de la partition principale. Pour les autres partitions  _U_m_s_d_o_s,
  il est possible d'utiliser soit les options de mount soit umssetup. La
  maniere classique pour regler ce  probleme  pour  les  partitions  non
  principales est de stocker les options de mount dans /etc/fstab. Voici
  un exemple.  Mettez ceci dans /etc/rc.d/rc.S :

                       /sbin/umssetup -u jack -g group -m 0755 /

  33..33..  SSwwaappppeerr oouu nnee ppaass sswwaappppeerr

  L'utilisation d'un fichier de swap se revele souvent  plus  lente  que
  celle  d'une partition de swap. Cette solution est cependant bien plus
  flexible. Vous pouvez configurer un fichier de swap dans une partition
  _U_m_s_d_o_s de la meme facon que dans tout autre systeme de fichiers _L_i_n_u_x.
  Par exemple, pour configurer un fichier  de  swap  de  8  Mo  dans  le
  repertoire racine :

                       dd if=/dev/zero bs=1024k count=8 of=/swap
                       mkswap /swap 8192
                       sync
                       swapon /swap

  Une  fois  cela  fait,  vous  pouvez  ajouter  la  ligne suivante dans
  /etc/fstab :

                       /swap   swap    swap    default

  Et le fichier de  swap  sera  active  a  chaque  demarrage.  (Il  y  a
  generalement la commande "swapon -a" dans /etc/rc.d/rc.S.)

  44..  CCoommmmeenntt ddeemmaarrrreerr uunn ssyysstteemmee _U_m_s_d_o_s

  44..11..  LLooaaddlliinn

  Le   paquetage   lodlin15.tgz,  disponible  sur  sunsite.unc.edu  dans
  /pub/Linux/system/Bootutils,  est  particulierement  bien  adapte   au
  demarrage  d'un  systeme  _U_m_s_d_o_s.  En  general,  tout ce que vous avez
  besoin de faire est

          Boot DOS
          C:>loadlinx zimage root=D:

  ou zimage est une image normale du noyau (compressee), tout simplement
  copiee  quelque part sur le lecteur _D_O_S. D: est le lecteur _D_O_S ou vous
  avez installe _L_i_n_u_x.

  44..22..  AA ppaarrttiirr dd''uunnee ddiissqquueettttee

  Demarrer un systeme _U_m_s_d_o_s a partir d'une disquette se fait de la meme
  maniere  que pour un systeme _E_x_t_2. Vous avez besoin d'une image zImage
  de votre noyau proprement initialisee pour localiser  votre  partition
  principale  _U_m_s_d_o_s. Pour ce faire, on utilise generalement la commande
  rdev. La sequence suivante initialise un fichier zImage et le met  sur
  une disquette :

               rdev zImage /dev/hda1
               rdev -R zImage 0
               dd if=zImage bs=8192 of=/dev/fd0

  Si vous trouvez cela deroutant, formattez une disquette systeme DOS et
  copiez les fichiers suivants dessus :

  +o  loadlin.exe

  +o  loadlinx.exe

  +o  zimage

  puis configurez le fichier autoexec.bat comme suit :

               loadlinx zimage rw root=C:

  44..33..  LLIILLOO

  LILO, le chargeur (boot-loader) officiel  de  _L_i_n_u_x  peut  aussi  etre
  utilise  pour  demarrer  un  systeme  _U_m_s_d_o_s. Cependant je n'ai jamais
  essaye, mais ca devrait marcher depuis la  version  1.1.60.  Merci  de
  m'envoyer  un  e-mail  (NdT : toujours en anglais !) si vous avez fait
  l'experience.

  44..44..  CCoommmmeenntt ddeeffrraaggmmeenntteerr uunnee ppaarrttiittiioonn _U_m_s_d_o_s

  Tout  simplement  en  utilisant  n'importe  lequel  des   outils   _D_O_S
  classiques.   Les   fichiers   produits   par  _U_m_s_d_o_s  n'ont  rien  de
  particulier. Et _U_m_s_d_o_s n'attend rien de  particulier  (composition  ou
  sequence  des  points  d'entree  des  repertoires, etc.) du systeme de
  fichier sur lequel il travaille.

  Pour ce que j'en sais, il n'existe pas d'outil sous _L_i_n_u_x  pour  faire
  ca.

  44..55..  AAssttuucceess aavvaanncceeeess

  _U_m_s_d_o_s  repose  sur --linux-.--- qui repose lui-meme sur le repertoire
  _D_O_S.  Certains  voudront   peut-etre   faire   quelques   experiences.
  L'utilitaire  udosctl  (dans  le  paquetage umsdos_progs, qui contient
  umssync  et  umssetup)  permet  de  faire  des  operations   sur   les
  repertoires  (effacer, voir le contenu), et ceci independamment sur le
  repertoire --linux-.--- ou sur le repertoire _D_O_S.

  55..  PPrriinncciippee ddee bbaassee

  55..11..  IInnttrroodduuccttiioonn

  _U_m_s_d_o_s fait directement correspondre aux fichiers _L_i_n_u_x  des  fichiers
  _M_S_-_D_O_S. C'est une transposition un pour un, et le contenu des fichiers
  n'est pas altere du tout. _U_m_s_d_o_s travaille seulement sur les  noms  de
  fichiers,  et  reserve un traitement particulier aux fichiers speciaux
  (par exemple les liens ou les fichiers peripheriques).

  Pour chaque repertoire, il y a un fichier appele --linux-.---.

  55..22..  _U_m_s_d_o_s ppeeuutt rreemmppllaacceerr llee ssyysstteemmee ddee ffiicchhiieerrss _M_S_-_D_O_S

  _U_m_s_d_o_s peut etre vu comme un surensemble plus general  du  systeme  de
  fichiers  _M_S_-_D_O_S  de  linux. En fait cette capacite/flexibilite est la
  source de beaucoup de confusions au sujet  de  _U_m_s_d_o_s.  Je  vais  vous
  expliquer  pourquoi.  Essayez  de  monter  une disquette _D_O_S qui vient
  juste d'etre formattee de la maniere suivante :

               mount -t umsdos /dev/fd0 /mnt

  Puis faites ceci :

               ls / >/mnt/LONGFILENAME
               ls -l /mnt

  Et vous obtiendrez le resultat suivant :

               -rwxr-xr-x   1 root     root          302 Apr 14 23:25 longfile

  Jusqu'ici, le systeme de fichiers n'a pas l'air de faire  grand  chose
  de  plus  (en fait meme rien) que le systeme de fichiers _M_S_-_D_O_S normal
  de _L_i_n_u_x.

  _?_?_?

  55..33..  PPrroommoouuvvooiirr uunn rreeppeerrttooiirree

  Jusqu'ici ca n'est pas tres impressionant. Mais il y a une  astuce.  A
  moins  d'avoir  ete promu, un repertoire _D_O_S sera traite par _U_m_s_d_o_s de
  la meme facon que par _M_S_-_D_O_S. _U_m_s_d_o_s utilise un fichier  special  dans
  chaque  sous-repertoire  pour  effectuer  la  transposition  entre les
  possibilites etendues (noms de fichiers  longs,  propriete,  etc.)  de
  _U_m_s_d_o_s  et  les  limitations inherentes au systeme de fichiers _D_O_S. Ce
  fichier est invisible aux utilisateurs  de  _U_m_s_d_o_s,  mais  il  devient
  visible  si  vous demarrez sous _D_O_S. Pour eviter de mettre inutilement
  le desordre dans la partition _D_O_S avec  ces  fichiers  (--linux-.---),
  ils sont maintenant optionnels. S'ils sont absents, _U_m_s_d_o_s se comporte
  comme _M_S_-_D_O_S.

  Quand un repertoire est promu, toutes les operations effectuees par la
  suite   tiendront   compte  de  toutes  les  possibilites  normalement
  accessibles aux utilisateurs  d'_U_n_i_x  et  de  _L_i_n_u_x.  Tous  les  sous-
  repertoires  crees  ensuite  seront  promus sans autre intervention de
  votre part.

  Cette  caracteristique  vous  permet  d'organiser  logiquement   votre
  partition _D_O_S entre votre hierarchie _D_O_S et votre hierarchie _L_i_n_u_x. Il
  est important de comprendre que les fichiers --linux-.--- prennent  de
  la  place  (en general 2 Ko par repertoire). Comme _D_O_S utilise de gros
  clusters (par exemple de 16 Ko pour une partition de 500  Mo),  eviter
  de mettre des fichiers --linux-.--- partout peut vous faire gagner pas
  mal de place.

  55..44..  CCoommmmeenntt pprroommoouuvvooiirr //ssbbiinn//uummssssyynncc

  Un repertoire peut etre promu a n'importe  quel  moment  en  utilisant
  /sbin/umssync.  Lorsqu'un repertoire est promu, il se passe les choses
  suivantes :

  +o  Creation d'un fichier --linux-.---.

  +o  Une relation un pour un est etablie entre le  fichier  --linux-.---
     et le contenu actuel du repertoire.

  La  commande  /sbin/umssync  est  utilisee  pour  la  maintenance  des
  fichiers --linux-.--- existants. Elle ne le cree pas a partir de  rien
  a  chaque  fois.  Elle modifie simplement ce qui a change (par exemple
  les fichiers nouvellement crees lors d'une session _D_O_S).  Elle  retire
  aussi  de  ce  fichier  les  fichiers  qui  n'existent  plus  dans  le
  repertoire  _D_O_S.  C'est  pourquoi  umssync  porte  ce  nom,  car  elle
  synchronise  les  fichiers  _-_-_l_i_n_u_x_-_._-_-_-  avec le repertoire _D_O_S sous-
  jacent.

  55..55..  UUttiilliisseerr //ssbbiinn//uummssssyynncc au demarrage

  C'est une bonne idee de mettre un appel a /sbin/umssync a  la  fin  du
  fichier  /etc/rc.d/rc.S  (si  ce  n'est  deja  fait...).  La  commande
  suivante marche sur la plupart des systemes :

               /sbin/umssync -r99 -c -i+ /

  L'option -c empeche  umssync  de  promouvoir  les  repertoires.  Cette
  commande  va  donc  seulement  mettre a jour les fichiers --linux-.---
  existants.

  Cette commande est utile si vous desirez acceder au  repertoire  _L_i_n_u_x
  pendant une session _D_O_S. _L_i_n_u_x n'a pas de moyen efficace de dire qu'un
  repertoire a ete modifie par _D_O_S, donc _U_m_s_d_o_s ne peut pas lancer  lui-
  meme la commande _u_m_s_s_y_n_c necessaire.

  55..66..  CCoommmmeenntt ddee--pprroommoouuvvooiirr

  Effacez le fichier --linux-.--- en utilisant _D_O_S.

  55..77..  AA pprrooppooss ddeess ffiicchhiieerrss ccrreeeess lloorrss dd''uunnee sseessssiioonn _D_O_S

  A moins que vous n'utilisiez umssync sur un repertoire dans lequel des
  fichiers ont ete ajoutes ou effaces  par  _D_O_S,  vous  allez  remarquer
  certains des problemes suivants :

  +o  Le systeme ne va pas planter, et cela ne va pas causer de problemes
     majeurs, juste quelques derangements.

  +o  Fichiers crees par _D_O_S.

  +o  Ils seront invisibles pour _L_i_n_u_x.

  +o  Quand vous  voudrez  creer  un  fichier  avec  le  meme  nom,  vous
     obtiendrez  un  message  derreur  vous disant que ce fichier existe
     deja.

  +o  Plus de confusion que de reels problemes, donc. En tout cas cela ne
     cause aucun dommage au systeme de fichiers.

  +o  Les  fichiers  effaces  par _D_O_S ne causeront aucun probleme. _U_m_s_d_o_s
     remarquera leur absence a la premiere tentative  d'acces,  et  vous
     delivrera   un   message   (qui   sera   gene'ralement  ecrit  dans
     /var/adm/syslog).

  66..  ((DDeess--))IInnssttaallllaattiioonn eett qquueellqquueess aassttuucceess

  L'installation de _U_m_s_d_o_s n'est pas vraiment differente de  celle  d'un
  systeme _L_i_n_u_x ordinaire (_b_a_s_e _s_u_r _E_x_t_2).

  Il y a tout de meme deux differences principales.

  66..11..  LLaa ppsseeuuddoo--rraacciinnee //mmnntt//lliinnuuxx

  Les etapes normales lors de l'installation sont :

  1. Creer une partition avec fdisk et la formatter.

  2. La   monter   sur   /mnt  relativement  a  notre  disque  principal
     d'installation.

  3. Copier tous les paquetages dans /mnt.

  Avec _U_m_s_d_o_s l'etape 1 n'est pas necessaire (n'etait-ce pas le  but  de
  _U_m_s_d_o_s de ne pas avoir a reformatter ?).

  Il  est  possible  d'installer un systeme _U_m_s_d_o_s juste en copiant tous
  les paquetages dans /mnt. Cela marchera  certainement.  Mais  cela  va
  aussi  creer  tout  un  tas  de sous-repertoires dans votre repertoire
  racine _D_O_S (C:), et vous n'allez pas aimer ca. C'est  la  raison  pour
  laquelle  toute  installation  de  _U_m_s_d_o_s utilise la pseudo-racine. Et
  c'est la difference majeure entre une installation normale  (_E_x_t_2)  et
  celle de _U_m_s_d_o_s : tous les fichiers sont copies dans /mnt/linux.

  66..22..  PPrreeppaarreerr llee rreeppeerrttooiirree //mmnntt//lliinnuuxx

  /mnt/linux  n'est pas un repertoire ordinaire. Il doit etre promu pour
  pouvoir manipuler correctement les noms de fichiers longs de _L_i_n_u_x  et
  les  fichiers  speciaux  (liens,  fichiers  peripheriques). Les etapes
  necessaires pour configurer /mnt/linux sont :

  1. mkdir /mnt/linux

  2. umssync /mnt/linux

  Et c'est tout !

  66..33..  VVeerriiffiieerr qquuee //mmnntt//lliinnuuxx est correctement configure

  Meme si la configuration de /mnt/linux est plutot simple, il  y  a  un
  certain  nombre  de  paquetages  qui  ne  marchent pas. Comment est-ce
  possible ?

  Le probleme d'installation le  plus  important  vient  d'un  programme
  umssync incompatible. _U_m_s_d_o_s a ete mis a jour dans linux 1.1.88 (je ne
  me rappelle plus exactement du numero) et un bug a ete decouvert  dans
  umssync.  Pour  eviter  toute confusion dans la communaute _L_i_n_u_x, il a
  ete decide de monter le niveau de compatibilite necessaire  pour  tous
  les  utilitaires _U_m_s_d_o_s. Les anciennes versions de ces utilitaires ont
  ete purement et simplement rejetees.

  Apparemment  beaucoup  de  distributions  n'ont   pas   mis   a   jour
  l'utilitaire umssync sur leur disque d'installation.

  Il  existe encore pas mal de distributions de ce style en circulation.
  Le resultat est que le repertoire /mnt/linux n'est pas promu  du  tout
  et  va tronquer tous les noms de fichiers trop longs, et aussi rejeter
  tous les fichiers speciaux.

  Il est possible de faire un test tres tot pendant l'installation  pour
  voir  si  quelque chose s'est mal passe. Grace au mecanisme de pseudo-
  console de _L_i_n_u_x, vous pouvez  le  faire  sans  quitter  le  programme
  d'installation. Suivez les instructions suivantes :

  1. Appuyez  sur Alt-F2 (Appuyez sur la touche Alt et en meme temps sur
     la touche F2).

  2. Logguez-vous sous root.

  3. cd /mnt/linux

     Si cela ne marche pas, vous etes en train d'essayer  trop  tot.  Un
     bon moment pour faire ce test est d'attendre la fin de la selection
     des paquetages.

  4. >TOTO

  5. ls -l

     Un fichier vide du nom de TOTO (en majuscules) doit apparaitre.  Si
     vous le voyez en minuscules, quelque chose s'est mal passe. Essayez
     de recommencer a l'etape du umssync. Vous pouvez  utiliser  umssync
     autant de fois que vous voulez sans problemes.

     umssync .

     S'il  n'y a pas de message d'erreur, refaites le test pour TOTO. Si
     TOTO apparait bien, alors tout va pour le mieux. Cette installation
     avait  quelque  chose  de bizarre mais vous avez reussi quand meme.
     Continuez.

  6. Appuyez sur Alt-F1 pour revenir a l'ecran d'installation.

  Si le test n'a pas marche, la meilleure solution est  de  prendre  une
  disquette d'installation plus recente. Il est generalement possible de
  resoudre ce  probleme  en  installant  une  version  plus  recente  de
  umssync.  Ce  n'est pas difficile mais cela necessite un systeme _L_i_n_u_x
  en etat de marche. Vous avez juste a monter le lecteur de disquette et
  a remplacer la version caduque de umssync par une nouvelle.

  66..44..  OOooppss rreelleeaassiinngg ppsseeuuddoo rroooott ......

  La plupart des installations qui ne marchent pas le font en donnant ce
  message etrange. Ce n'est pas un bug dans _U_m_s_d_o_s bien que  ce  message
  puisse paraitre vraiment bizarre. Voici les causes connues :

  +o  La plus commune

     L'installation  de  la _S_l_a_c_k_w_a_r_e essaye de configurer un fichier de
     swap tres tot lors de l'installation.  Pour  ce  faire,  elle  vous
     demande  de  selectionner une partition (lecteur _D_O_S), puis elle la
     monte et cree pour finir le fichier de swap.
     Lors  de  l'installation  d'un  systeme   _S_l_a_c_k_w_a_r_e,   vous   devez
     configurer  la partition cible avant de commencer a installer autre
     chose. Cela monte normalement la partition _D_O_S sur  /mnt,  cree  le
     repertoire /mnt/linux et lance umssync dessus.

     C'est  de la que viennent la plupart des problemes. Un grand nombre
     d'utilisateurs  sautent  l'etape  "configuration  de  la  partition
     cible"  et  passent  directement  au reste de l'installation. Comme
     /mnt est deja  monte,  cette  erreur  n'est  pas  remarquee.   Cela
     signifie  que /mnt/linux n'a pas ete correctement cree (non promu).
     Donc tous les fichiers dont le nom est trop long,  ainsi  que  tous
     les  fichiers  speciaux  (liens, fichiers peripheriques) ne peuvent
     pas etre crees correctement.

  +o  Utilitaire umssync non valide

     /mnt/linux  a  ete  mal  configure,   generalement   a   cause   de
     l'utilitaire umssync non valide sur la disquette d'installation.

  +o  Vieux bug de _U_m_s_d_o_s

     Il  y  avait  un bug dans _U_m_s_d_o_s avant _L_i_n_u_x _1_._2_._2. Le mode pseudo-
     racine ne s'activait  pas  correctement  si  le  fichier  /etc/init
     n'etait  pas  present.  init  se trouve maintenant dans /sbin. Vous
     pouvez resoudre ce probleme en vous procurant un noyau plus recent.
     C'est  d'autant  plus recommande qu'un nouveau bug a ete detecte et
     corrige dans la version 1.2.2.

     Si vous n'avez pas de version plus recente, faites ceci :

     1. Demarrez a partir de la disquette d'installation.

     2. Logguez-vous sous root.

     3. mount -t umsdos /dev/hdXX /mnt

        ou /dev/hdXX est votre partition _D_O_S.

     4. cd /mnt/linux/etc

     5. ln -s ../sbin/init init

     6. cd /

     7. Ctrl-Alt-Del

     8. Demarrez normalement sous _U_m_s_d_o_s.

  Malheureusement, les deux premiers  problemes  d'installation  donnent
  une installation completement inutilisable. Il va falloir desinstaller
  puis reinstaller _U_m_s_d_o_s.

  66..55..  CCoommmmeenntt ddeessiinnssttaalllleerr uunn ssyysstteemmee _U_m_s_d_o_s

  Il y a quelque chose de pratique  avec  _U_m_s_d_o_s  et  son  mecanisme  de
  pseudo-racine,  c'est que vous pouvez le desinstaller sans douleur. Il
  suffit de demarrer  sous  _D_O_S  et  d'effacer  recursivement  tous  les
  repertoires  linux.  C'est  tout.  _U_m_s_d_o_s  n'a  pas  besoin de drivers
  particuliers dans le fichier config.sys, et il ne cree rien de special
  en dehors du repertoire linux.

  66..66..  DDeeppllaacceerr uunn ssyysstteemmee _U_m_s_d_o_s vveerrss uunn aauuttrree lleecctteeuurr _D_O_S

  Cela  peut  etre  fait a partir de _L_i_n_u_x ou du _D_O_S. Il suffit juste de
  copier recursivement les repertoires linux d'un lecteur vers  l'autre.
  Ensuite  il  faudra  modifier  le mecanisme de demarrage (generalement
  avec la commande loadlin) et le fichier /etc/fstab.

  _U_m_s_d_o_s peut etre installe sur n'importe quel lecteur _D_O_S. Il n'est pas
  obligatoire  de  l'installer sur le lecteur C:, ni meme sur le premier
  disque dur. Cela ne change rien.

  En fait, vous pouvez meme decider d'avoir plusieurs  installations  de
  _U_m_s_d_o_s sur differents lecteurs pour faire des tests.

  66..77..  IInnssttaalllleerr 5500 ssyysstteemmeess _U_m_s_d_o_s..

  Pourquoi  ne pas installer tout un tas de systemes _L_i_n_u_x en un rien de
  temps ?

  _U_m_s_d_o_s repose sur le mode du _D_O_S. Vous pourvez tirer partie  de  cette
  particularite si vous voulez installer _L_i_n_u_x facilement.

  Vous  pouvez  ainsi  installer  et configurer un systeme _U_m_s_d_o_s sur un
  site. Lorsque vous etes satisfait de la configuration obtenue  et  des
  paquetages  selectionnes,  vous  pouvez demarrer sous _D_O_S et copier la
  totalite du repertoire  linux  sur  votre  serveur  de  fichiers  _D_O_S.
  Ensuite  il vous suffit d'aller sur une autre station _D_O_S et de copier
  les fichiers du lecteur reseau vers le lecteur local. C'est  tout.  Il
  ne  vous reste plus qu'a modifier le script de demarrage (_L_o_a_d_l_i_n_x) et
  c'est parti.

  Avec quelques modifications  minimes  (nom  de  l'hote,  adresse  IP),
  n'importe  qui  pourra  installer un systeme _L_i_n_u_x en deux temps trois
  mouvements.

  Les lecteurs interesses auront pu remarquer qu'il est  aussi  possible
  d'installer n'importe quel systeme _L_i_n_u_x de la meme maniere, y compris
  les systemes bases sur _E_x_t_2.

  Un des aspects les plus sympathiques de _L_i_n_u_x est qu'il n'y a  pas  de
  fichiers   caches  qui  doivent  absolument  etre  installes  par  des
  programmes "magiques".

  77..  CCoonnffiigguurreerr uunnee sseeccttiioonn _L_i_n_u_x ddaannss uunnee ppaarrttiittiioonn _D_O_S..

  _U_m_s_d_o_s peut se reveler utile meme aux utilisateurs de _E_x_t_2 (le systeme
  de fichiers natif de _L_i_n_u_x). Un scenario classique est le suivant :

  +o  _L_i_n_u_x  etant  votre  systeme  d'exploitation  prefere, la partition
     _L_i_n_u_x se remplit a n'en plus finir.

  +o  Votre partition _D_O_S est pleine de poussiere, et a moitie vide.

  +o  Soudain vous n'avez plus de place sur votre partition _E_x_t_2.

  +o  Vous n'etes pas encore sur de  vouloir  vous  debarasser  de  votre
     partition _D_O_S.

  C'est  ici  que  _U_m_s_d_o_s  peut  vous  aider.  Vous pouvez configurer un
  repertoire  _L_i_n_u_x  sur  votre  partition  _D_O_S,  et   l'utiliser   sans
  restriction  sous  _L_i_n_u_x. Par exemple, supposons que vous voulez creer
  un nouveau repertoire nomme "extra" sur votre lecteur C:, et que  vous
  voulez qu'il se comporte comme un repertoire _L_i_n_u_x normal. Faites ceci
  : (en supposant que C: est /dev/hda1)

               mkdir /c
               /sbin/mount -t umsdos /dev/hda1 /c
               mkdir /c/extra
               umssync /c/extra

  Il vous faut etre sous root pour executer ces commandes

  En configurant /etc/fstab comme ceci, vous  aurez  toujours  acces  au
  repertoire /c/extra.

  88..  PPoouurrqquuooii _U_m_s_d_o_s ??

  Expliquer  le  fonctionnement et l'installation d'un systeme _U_m_s_d_o_s ne
  suffit pas. Ce que la plupart des gens cherche, ce sont  des  conseils
  pour savoir s'ils doivent utiliser _U_m_s_d_o_s ou non.

  88..11..  LLee bbuutt ddee _U_m_s_d_o_s

  Le  but  de  _U_m_s_d_o_s est de faciliter l'installation de _L_i_n_u_x. Un autre
  but  est  de  faciliter  sa  DES-installation.  L'idee  ici  etait  de
  favoriser   la  diffusion  de  _L_i_n_u_x.  Installer  un  nouveau  systeme
  d'exploitation  est  toujours  problematique.  _O_S_/_2  par  exemple   va
  gentiment  polluer  la  racine de votre lecteur C: avec tout un tas de
  nouveaux repertoires. Si vous etes aussi doue  que  moi,  il  va  meme
  effacer  vos  fichiers config.sys et autoexec.bat :-( (NdT : Tant qu'a
  faire !).

  L'utilisation de la pseudo-racine permet d'eviter cette  invasion  non
  desiree, et _L_i_n_u_x peut etre desinstalle sans effets de bord.

  88..22..  QQuuii eenn aa bbeessooiinn ??

  Si vous avez un petit disque dur, _U_m_s_d_o_s va vous permettre de partager
  l'espace disque entre le _D_O_S et _L_i_n_u_x. A mon avis, on peut  considerer
  qu'un  disque  de  moins  de 300 Mo est un petit disque. Cette opinion
  repose sur la taille des differents paquetages disponibles  a  l'heure
  actuelle. Un traitement de textes populaire veut prendre jusqu'a 70 Mo
  si vous choisissez toutes les possibilites.

  Si vous avez un disque plus gros,  vous  pouvez  choisir  d'avoir  une
  partition  dediee  a _L_i_n_u_x utilisant le systeme de fichiers _E_x_t_2. _E_x_t_2
  utilise une taille de clusters plus petite que _D_O_S  (en  fait  1  Ko),
  donc  installer beaucoup de petits fichiers prendra moins de place que
  sur une partition _U_m_s_d_o_s.

  88..33..  PPeerrffoorrmmaanncceess

  Ceci s'applique a une comparaison entre _U_m_s_d_o_s et _E_x_t_2.

  +o  La gestion des repertoires est plus rapide sous _E_x_t_2. Cela provient
     de la double structure des repertoires sous _U_m_s_d_o_s.

  +o  L'acces  aux  fichiers  (lecture et ecriture) est probablement plus
     rapide sous _U_m_s_d_o_s que sous _E_x_t_2. Cela vient de  la  simplicite  du
     systeme de fichiers _F_A_T utilise par _D_O_S.

     Cependant cette simplicite a un cout :

  +o  Un  maximum  d'environ  65  000 fichiers ou clusters par partition.
     Cela signifie  aussi  qu'une  parition  de  500  Mo  utilisera  des
     clusters  de  16  Ko.  En  d'autres  termes,  un fichier d'un octet
     utilisera 16 K0 d'espace disque.

  +o  Tout est controle par la FAT qui se trouve au debut du disque  dur.
     Le  systeme _D_O_S est donc certainement plsu fragile a cause de cela.

  +o  Aucune prevision pour eviter  la  fragmentation  des  fichiers.  Un
     systeme  _U_m_s_d_o_s  est generalement utilise en mode mono-utilisateur.
     Dans ce cas, cela n'a  pas  beaucoup  d'importance.  Mais  pour  un
     systeme  multi-utilisateurs,  les  fichiers  seront eparpilles dans
     tous les coins du disque, ce qui aura pour  effet  de  reduire  les
     performances d'acces aux fichiers.

  +o  Les  liens  symboliques  sont stockes dans des fichiers normaux. Si
     vous comptex en avoir beaucoup, vous vous rendrez compte que _U_m_s_d_o_s
     utilise beaucoup d'espace disque compare a _E_x_t_2.

  Le HOWTO des onduleurs (UPS)
  Harvey  J.  Stein, hjstein@math.huji.ac.il, Berger Financial
  Research, Ltd.  adaptation francaise B.Choppy, 10 mai 1998
  v2.42, 18 novembre 1997

  Ce document vous aidera  a  connecter  un  onduleur  sur  une  machine
  Linux...   si  vous  avez  de la chance ...  Copyright (c) 1994, 1995,
  1996, 1997 Harvey J. Stein.  Vous pouvez utiliser  ce  document  comme
  vous  l'entendez, tant qu'il reste intact.  En particulier, cette note
  (ainsi que les contributions ci-dessous) doit rester intouchee.  NdT :
  La  traduction  de ce HOWTO est particulierement delicate, en ce qu'il
  integre de  nombreux  messages  echanges  sur  InterNet  reproduits  a
  l'identique.  Autant que possible, on aura conserve le sens general de
  ces  messages,  sans  toutefois  les  reproduire  systematiquement  en
  entier, leur lecture en devenant vite fastidieuse.  Dans certains cas,
  une partie en anglais est conservee, en particulier dans les  en-tetes
  de  messages.   Les  noms  de  signaux et broches de connexion ont ete
  traduits, mais leur  abreviation  originelle  conserve  (par  exemple,
  DCD  :  Detection  de  porteuse).  Une copie de la notice originale de
  copyright est conservee, y compris dans les  sources  des  programmes.
  Le  traducteur  attire  l'attention  de  ses  lecteurs  sur  le risque
  d'erreur introduite lors de la traduction des commentaires et messages
  dans  les programmes source, pouvant rendre ceux-ci impossibles a com-
  piler ou inutilisables.  La reference en ce cas est,  comme  toujours,
  la  version originelle du document (en anglais).  Version originale de
  la notice de copyright : You may use this document as you see fit,  as
  long as it remains intact.  In particular, this notice (along with the
  contributions below) must remain untouched.

  11..  IInnttrroodduuccttiioonn

  Ce HOWTO concerne la connexion d'un onduleur sur  un  PC  sous  Linux.
  L'idee  est  d'etablir  la  connexion  de telle sorte que Linux puisse
  s'arreter proprement lorsque le courant s'arrete.

  Cela  inclut  la  reference  a  des  paquetages  logiciels   existants
  facilitant  l'etablissement  de  ce  genre  de  communications,  et la
  maniere dont celles-ci sont realisees.  Ce dernier point  est  souvent
  superfetatoire si vous pouvez trouver un paquetage tout configure pour
  votre onduleur.  Sinon, il vous faudra lire ce qui suit.

  Dans une large mesure, le present document est encore  plus  redondant
  que  lorsque  j'en  ai  ecrit la premiere version en 1994.  Toutes les
  informations de base ont toujours ete presentes dans les pages de  man
  de  _p_o_w_e_r_d  fournies  avec le paquetage _S_y_s_V_i_n_i_t.  Alors qu'en 1994 il
  arrivait souvent que les distributions ne comportent meme pas lesdites
  pages de man, je ne crois pas que ce soit encore le cas.

  De  plus,  lorsque  j'ai  ecrit  la  premiere  version de ce Howto, il
  n'existait aucun autre logiciel que _p_o_w_e_r_d pour la communication et le
  controle  entre  Linux  et  les  onduleurs.   Maintenant, il existe un
  certain  nombre  de  paquetages  de  controle  d'onduleurs   dans   le
  repertoire UPS de Sunsite.

  Malgre tout, je continue a maintenir le Howto des onduleurs.  Pourquoi
  donc ?  Eh bien :

  +o  une seconde source d'informations peut aider a la comprehension  de
     la  methode  de  connexion de Linux a un onduleur, meme s'il s'agit
     simplement de la meme information, ecrite differemment ;

  +o  le HOWTO peut servir de repository pour les donnees specifiques des
     onduleurs  - de nombreux onduleurs ne sont pas encore geres par les
     paquetages generaux ;
  +o  le HOWTO contient des details supplementaires qui  ne  se  trouvent
     pas dans d'autres documents ;

  +o  ce document semble avoir maintenant sa vie propre.  La necessite de
     creation d'un Howto  se  fait  sentir  clairement.   Il  est  moins
     evident de definir l'instant ou il doive etre mis en sommeil.

  11..11..  CCoonnttrriibbuutteeuurrss

  Je  suis  debiteur  a  vie  de  ceux  dont  j'ai  recu  de l'aide, des
  suggestions, ainsi que des donnees specifiques d'onduleurs.  La  liste
  inclut :

  +o  Hennus Bergman (hennus@sky.nl.mugnet.org) ;

  +o  Charli (mephistos@impsat1.com.ar) ;

  +o  Ciro Cattuto (Ciro Cattuto) ;

  +o  Nick Christenson (npc@minotaur.jpl.nasa.gov) ;

  +o  Lam Dang (angit@netcom.com) ;

  +o  Markus Eiden (Markus@eiden.de) ;

  +o  Dan Fandrich (dan@fch.wimsey.bc.ca) ;

  +o  Ben Galliart (bgallia@orion.it.luc.edu) ;

  +o  Danny ter Haar (dth@cistron.nl) ;

  +o  Christian G. Holtje (docwhat@uiuc.edu) ;

  +o  Raymond A. Ingles (inglesra@frc.com) ;

  +o  Peter Kammer (pkammer@ics.uci.edu) ;

  +o  Marek Michalkiewicz (ind43@sun1000.ci.pwr.wroc.pl) ;

  +o  Jim Ockers (ockers@umr.edu) ;

  +o  Evgeny Stambulchik (fnevgenv@plasma-gate.weizmann.ac.il) ;

  +o  Clive A. Stubbings (cas@vjet.demon.co.uk) ;

  +o  Miquel van Smoorenburg (miquels@cistron.nl) ;

  +o  Slavik Terletsky (ts@polynet.lviv.ua) ;

  +o  Tom Webster (webster@kaiwan.com).

  Notez  que  les  adresses  e-mail  apparaissant  dans  les extraits de
  courriers ci-apres peuvent  etre  obsoletes.   Ce  qui  precede  l'est
  propablement  aussi,  mais quelques-unes sont plus recentes que ce qui
  se trouve plus bas.

  Mes excuses aussi a quiconque j'aie oublie de citer dans cette  liste.
  Envoyez-moi un e-mail et je vous ajouterai.

  11..22..  AAvveerrttiisssseemmeenntt iimmppoorrttaanntt

  Je  ne  peux  reellement  pas  garantir  que  quelque  partie  de ceci
  fonctionne pour vous.  Connecter un onduleur a un ordinateur peut etre
  un  travail  d'astuce.   L'un  ou l'autre, ou les deux peuvent bruler,
  exploser, mettre le feu, ou commencer la  Troisieme  Guerre  Mondiale.
  De  plus,  je  n'ai  une  experience  directe que de l'onduleur Advice
  1200 A, et je n'ai pas eu a fabriquer de cable.  Donc, _S_O_Y_E_Z  _P_R_U_D_E_N_T_,
  _R_A_S_S_E_M_B_L_E_Z   _T_O_U_T_E   _L_'_I_N_F_O_R_M_A_T_I_O_N   _P_O_S_S_I_B_L_E   _S_U_R   _V_O_T_R_E  _O_N_D_U_L_E_U_R_.
  _R_E_F_L_E_C_H_I_S_S_E_Z _D_'_A_B_O_R_D_.  _N_E _C_R_O_Y_E_Z _P_A_S _A _P_R_I_O_R_I _C_E _Q_U_E _V_O_U_S _L_I_S_E_Z _I_C_I _N_I
  _A_I_L_L_E_U_R_S.

  D'un  autre  cote,  j'ai  reussi  a  tout  faire  fonctionner avec mes
  onduleurs, sans beaucoup d'informations  des  constructeurs,  et  sans
  faire fumer quoi que ce soit, donc c'est possible.

  11..33..  AAuuttrreess ddooccuummeennttss

  Ce  document ne traite pas des fonctions et possibilites generales des
  onduleurs.  Pour ce genre d'informations, voyez la Foire Aux Questions
  La     FAQ    UPS.     Elle    peut    aussi    etre    trouvee    sur
  ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/answers/UPS-faq.  Elle
  est maintenue par Nick Christenson, mais semble n'avoir pas ete mise a
  jour depuis 1995.  Si vous lui  envoyez  un  e-mail,  il  souhaiterait
  qu'apparaisse  _U_P_S  ou  _U_P_S  _F_A_Q ou quelque chose de similaire dans la
  ligne Subject de votre message.

  Il y a aussi de plus en plus de constructeurs d'onduleurs present  sur
  le  Net.  Certains d'entre aux fournissent reellement des informations
  utiles sur leur site Web.   Une  liste  pratique  des  sites  web  des
  constructeurs  est  disponible  sur Repertoire des onduleurs.  Le meme
  site propose aussi une FAQ des onduleurs.

  22..  NNoottee iimmppoorrttaannttee ccoonncceerrnnaanntt ll''oobbssoolleesscceennccee ddeess iinnffoorrmmaattiioonnss

  Je viens de decouvrir qu'une partie de la documentation ci-dessous est
  obsolete.   En  particulier,  le  daemon  _i_n_i_t  fourni avec le dernier
  paquetage sysinit est plus sophistique que ce que j'ai  decrit.   Bien
  qu'il  semble que la compatibilite ascendante soit assuree pour ce qui
  est ecrit ici, il apparait que  certaines  fonctions  non  documentees
  sont ttrreess iimmppoorrttaanntteess pour la gestion des onduleurs.

  Le  mecanisme  de  controle indique ci-apres permet seulement a _p_o_w_e_r_d
  d'envoyer a _i_n_i_t un des messages _p_o_w_e_r_f_a_i_l ou _p_o_w_e_r_o_k.   _i_n_i_t  execute
  une  commande lorsqu'il recoit _p_o_w_e_r_f_a_i_l et une autre lorsqu'il recoit
  _p_o_w_e_r_o_k.  Cela complexifie la logique de _p_o_w_e_r_d pour  la  gestion  des
  signaux de batterie faible et autres sortes de situations speciales.

  Les  nouvelles  versions  d'_i_n_i_t (depuis la version 2.58, apparemment)
  sont plus sophistiquees.  Il est possible de leur demander  d'executer
  un  script  parmi  _t_r_o_i_s.   Ainsi, _i_n_i_t peut avoir un script _p_o_w_e_r_f_a_i_l
  pour traiter une coupure  de  courant,  un  script  _p_o_w_e_r_f_a_i_l_n_o_w  pour
  realiser  un  arret  immediat  et  un script _p_o_w_e_r_o_k pour bloquer tout
  arret en cours.  C'est nettement plus propre que  les  circonvolutions
  necessaires avec le mecanisme detaille plus bas.

  Bien  qu'une  grande  partie  du  document  soit fondee sur l'ancienne
  methode de communication avec _i_n_i_t, je viens d'ajouter deux  nouvelles
  sections  dans  lesquelles  les auteurs utilisent la nouvelle methode.
  Il s'agit de ``Trust Energy Protector 400/600'' et APC Smart-UPS  700.
  La  premiere  est  particulierement detaillee.  Les deux comportent un
  _p_o_w_e_r_d_._c qui demande a _i_n_i_t un shutdown immediat lorsqu'un  signal  de
  batterie  faible  est  recu,  ainsi  que les lignes correspondantes de
  _/_e_t_c_/_i_n_i_t_t_a_b.  Pour tout le reste, je peux juste vous dire de regarder
  dans le code source de _i_n_i_t.

  Aussi,  pour  autant  que  je  sache, de nombreux paquetages cites ci-
  dessous utilisent aussi la nouvelle methode de communication.

  (-- NdT : Il semble que  la  plupart  des  contributeurs  a  ce  Howto
  s'appuient sur le redemarrage de l'ordinateur (/sbin/reboot), couple a
  une temporisation, pour realiser l'extinction  de  l'onduleur.   Cette
  methode  semble  hasardeuse.   Le  traducteur  propose  humblement  au
  lecteur d'etudier la possibilite  de  remplacer  la  relance  complete
  (reboot)  par  un  arret  systeme propre (shutdown -h) ou moins propre
  (halt).  Cette  methode  permet  d'eviter  totalement  le  risque  que
  l'onduleur  s'arrete  "trop  tard"  dans  le processus de demarrage de
  l'ordinateur  (i.e.   lorsque  les  systemes  de  fichiers  sont  deja
  montes).--)

  33..  OOnndduulleeuurr bbeettee,, oonndduulleeuurr iinntteelllliiggeenntt

  Les onduleurs peuvent se classer dans deux categories : "intelligents"
  ou "betes".  La difference entre les  deux  reside  dans  la  quantite
  d'informations  que  l'on peut obtenir de et le niveau de controle que
  l'on peut exercer sur l'onduleur.

     OOnndduulleeuurr ""bbeettee""

     +o  se connecte a l'ordinateur par le port serie ;

     +o  utilise les lignes  de  controle  modem  pour  communiquer  avec
        celui-ci ;

     +o  peut indiquer si le courant est present ou non ;

     +o  peut typiquement indiquer si la batterie est faible ;

     +o  accepte   habituellement   un   ordre  d'arret  de  la  part  de
        l'ordinateur.

     OOnndduulleeuurr ""iinntteelllliiggeenntt""

     +o  se connecte a l'ordinateur par le port serie ;

     +o  communique avec celui-ci par transfert de donnees normal sur  le
        port serie ;

     +o  dispose  typiquement  d'une  sorte  de  langage de commandes que
        l'ordinateur peut utiliser pour obtenir  diverses  informations,
        positionner  certains  parametres de fonctionnement et controler
        l'onduleur (pour arreter celui-ci, par exemple).

  Habituellement, les onduleurs intelligents peuvent fonctionner en mode
  bete.   C'est utile, car pour autant que je sache, les entreprises qui
  construisent les onduleurs les  plus  populaires  (notamment  APC)  ne
  diffusent  leur  protocole  de  communication  qu'aux  entreprises qui
  signent un accord de confidentialite.

  Autant que je sache, les seuls onduleurs intelligents avec lesquels il
  soit  simple  de  communiquer sont ceux faits par Best.  De plus, Best
  documente completement le mode intelligent (ainsi que le mode bete) et
  fournit le source de programmes qui communiquent avec leurs onduleurs.
  Tous  les  paquetages   indiques   dans   la   section   ``Logiciels''
  communiqueront avec les onduleurs en mode bete.  C'est tout ce dont on
  a reellement besoin.  Ceux specifiques  des  onduleurs  APC  annoncent
  diverses  possibilites  d'utilisation  en mode intelligent, mais je ne
  sais pas exactement ce qu'ils permettent.  Une implementation complete
  vous  affichera  une  fenetre  avec  toutes sortes de jauges affichant
  diverses statistiques de l'onduleur, telles  que  charge,  temperature
  interieure,  historique  des coupures, voltages d'entree et de sortie,
  etc.   Il  semble  que  le  paquetage  _s_m_u_p_s_d_-_0_._9_-_1_._i_3_8_6_._r_p_m  (section
  ``Logiciels''  se  rapproche  de  cela.   Je  ne suis pas sur pour les
  autres.

  Le reste de ce document est essentiellement limite a la  configuration
  de  votre  systeme  avec  un onduleur bete.  L'idee generale est a peu
  pres la meme  avec  un  onduleur  intelligent,  mais  les  details  de
  fonctionnement  de  _p_o_w_e_r_d et le type de cable sont differents pour un
  onduleur intelligent.

  44..  LLooggiicciieellss

  Fondamentalement, tout ce qu'il vous faut est  un  executable  _p_o_w_e_r_d,
  habituellement place dans _/_s_b_i_n_/_p_o_w_e_r_d.  Il fait habituellement partie
  du  paquetage  _S_y_s_V_i_n_i_t.   Pour  autant  que  je  sache,  toutes   les
  distributions  actuelles  de  Linux contiennent une version recente de
  _S_y_s_V_i_n_i_t.  Les versions tres anciennes ne comportaient pas _p_o_w_e_r_d.

  Le seul probleme que vous puissiez rencontrer est que votre  cable  ne
  corresponde  pas a la configuration de _p_o_w_e_r_d, auquel cas vous devrez,
  soit rebrocher votre cable, soit trouver une copie de _p_o_w_e_r_d_._c  et  le
  modifier  pour  le faire fonctionner avec votre cable.  Ou, pour cela,
  vous pouvez toujours utiliser l'un des paquetages  suivants,  dont  de
  nombreux permettent la configuration du cable.

  Comme  indique,  une  alternative  au _p_o_w_e_r_d du paquetage _S_y_s_V_i_n_i_t est
  l'utilisation de  l'un  des  paquetages  disponibles  maintenant.   il
  existe de nombreux paquetages qui aident a configurer la communication
  entre  l'ordinateur  et  un  onduleur.   Aucun  d'entre  eux   n'etait
  disponible  lorsque  j'ai  ecrit ce Howto pour la premiere fois, c'est
  pourquoi j'ai eu a l'ecrire.  En fait, il y a de  bonnes  chances  que
  vous  puissiez  utiliser  l'un  de  ces paquetages logiciels et eviter
  totalement le present Howto !

  Au 15 mars 1997 a peu pres, le repertoire  UPS  de  Sunsite  disposait
  d'un  certain  nombre  de  paquetages.   D'autres sites semblent avoir
  aussi des paquetages de  controle  d'onduleurs.   Voici  ce  que  j'ai
  trouve (tous sur Sunsite sauf deux) :

     EEnnhhaanncceedd AAPPCC BBaacckkUUPPSS..ttaarr..ggzz
        Un  paquetage  de controle des onduleurs intelligents APC Smart-
        UPS.  Il semble  suivre  basiquement  le  BUPS-Howto  (Back-UPS-
        Howto,  inclus ci-apres), mais semble aussi disposer d'une sorte
        de signal de batterie faible.

     EEnnhhaanncceedd AAPPCC UUPPSSDD--vv11..44..ttaarr..ggzz
        Le fichier _._l_s_m dit  qu'il  s'agit  du  meme  paquetage  que  le
        precedent,   sous  forme  de  _._t_a_r_._g_z  dans  un  _._t_a_r_._g_z  !   La
        documentation est legere.  Il semble  gerer  les  onduleurs  APC
        dans  les  deux  modes bete et intelligent, mais je ne peux m'en
        assurer.

     EEnnhhaanncceedd AAPPCC UUPPSSDD--vv11..44..ttaarr..ggzz
        Un autre paquetage de  controle  des  onduleurs  APC  Smart-UPS.
        Semble  inclure  une  sorte  de support maitre/esclave (i.e. une
        machine en previent une autre de s'arreter  lorsque  le  courant
        est  coupe).  Semble utiliser les onduleurs en mode intelligent,
        par opposition a la bascule des lignes modem.

     ssmmuuppssdd--00..99--11..ii338866..rrppmm

     ssmmuuppssdd--00..99--11..ssrrcc..rrppmm
        L'auteur ( David E. Myers) ecrit :

        smupsd surveille un APC Smart-UPS[TM] sous  Red  Hat[TM]  Linux.
        Si   le  courant  est  coupe,  smupsd  arretera  le  systeme  et
        l'onduleur de maniere correcte.

        smupsd a les fonctionnalites suivantes :

     +o  arret du systeme et de  l'onduleur  en  fonction  de  la  charge
        residuelle de ce dernier ou du temps ecoule depuis la coupure de
        courant ;

     +o  surveillance des parametres de l'onduleur en temps  reel  depuis
        toute  machine  a l'aide du programme graphique upsmon, ecrit en
        JavaTM ;

     +o  trace des parametres de l'onduleur dans un fichier pour  analyse
        et edition ;

     +o  mode  maitre/esclave  permettant  a  des  systemes  additionnels
        partageant le meme onduleur de lire les parametres  de  celui-ci
        sur la machine qui lui est connectee par port serie ;

     +o  controle  des acces reseau a l'aide du fichier _/_e_t_c_/_h_o_s_t_s_._a_l_l_o_w.

     ggeennppoowweerr--11..00..11..ttggzz
        Un  paquetage  general  de  gestion  d'onduleurs.   Inclut   des
        configurations  pour  beaucoup d'onduleurs - deux pour TrippLite
        et trois pour APC.  Contient une bonne  documentation.   Un  bon
        achat.

     ppoowweerrdd--22..00..ttaarr..ggzz
        Un  _p_o_w_e_r_d  de  remplacement  de celui du paquetage _S_y_s_V_i_n_i_t.  A
        l'oppose des commentaires de la documentation, il ne semble  pas
        avoir  ete fusionne avec ce dernier (du moins jusqu'a la version
        2.62).  Ses avantages resident dans le fait  qu'il  puisse  agir
        comme   serveur  pour  d'autres  _p_o_w_e_r_d  tournant  sur  d'autres
        machines (lorsque plusieurs machines d'un  reseau  partagent  le
        meme  onduleur) et etre configure par le biais d'un fichier - le
        source ne necessite donc ni edition ni recompilation.

     uuppssdd--11..00..ttggzz
        Un autre _p_o_w_e_r_d de remplacement.  Semble etre  assez  comparable
        en fonctionnalites avec powerd-2.0.tar.gz.

     cchheecckkuuppss..ttaarr
        Ce  paquetage  est  destine  a controler les onduleurs Best.  Il
        provient directement du site Web de Best.  Comporte des binaires
        pour  de  nombreux  _u_n_i_x  mais,  plus  important, inclut le code
        source, il est donc possible de l'essayer sous Linux, et s'il ne
        fonctionne  pas,  de  tenter  de  le corriger.  Le source inclut
        aussi bien les "controles de  base  (basic  checkups)"  que  les
        "controles  avances  (advanced  checkups)"  qui sont un peu plus
        sophistiques - ils declenchent un  shutdown  lorsque  l'onduleur
        indique  une  duree d'alimentation restante de X minutes, plutot
        qu'au bout de  Y  minutes  apres  la  coupure  de  courant.   Le
        programme  de  controles  avances  declenche  aussi sur diverses
        alarmes telles  que  "temperature  ambiante  elevee",  "batterie
        proche  du  minimum", "tension de sortie faible" ou "alarme test
        declenchee par l'utilisateur".

     bbeessttuuppss--00..99..ttaarr..ggzz
        Un paquetage qui peut bien se trouver sur Sunsite a l'instant ou
        vous  lisez  ceci.   C'est une paire de modules de communication
        qui travaillent  avec  les  onduleurs  Best  Ferrups.   Il  gere
        l'onduleur  en  mode  intelligent.   Il inter-opere correctement
        avec _p_o_w_e_r_d_-_2_._0 - utile si vous avez un gros Ferrups pour toutes
        les machines d'un reseau.

        Note  :  ce  paquetage  doit encore etre charge vers Sunsite. Je
        continue a presser l'auteur de le finir et de le  charger,  mais
        il doit encore en trouver le temps.

     LLaannSSaaffee IIIIII
        Deltec  Electronics  (et  Exide)  vendent  un paquetage logiciel
        appele LanSafe III.  Il existe une version Linux.  Il est fourni
        avec  leurs  onduleurs.   Ils disent qu'il fonctionne aussi avec
        d'autres onduleurs (en mode bete).

     aappccuuppssdd--22..88..ttaarr..ggzz
        L'auteur (Andre Hedrick) ecrit :

        apcupsd-2.1.tar.gz remplace Enhanced_APC_UPSD.tar.gz.

        C'est un paquetage tres complet pour les onduleurs APC.  Il gere
        toute leur gamme.  J'ai maintenant ajoute un mode intelligent au
        paquetage et un support pour les cables APC ou maison  si  aucun
        cable APC n'est gere.

     ssmmaarrttuuppss--11..11..ttggzz
        Du fichier _._l_s_m :

        Un  powerd  et  un utilitaire graphique sous X11 qui vous montre
        les voltages, frequences, pourcentages de charge  et  niveau  de
        batterie   en   temps   reel.    Les  protocoles  "Safeware"  et
        "Tripplite" sont geres.  Source et binaires ELF.

     uuppss..ttaarr..ggzz
        Du fichier _._l_s_m :

        Programme  qui  interagit   avec   les   sauvegardes   batteries
        (onduleurs Powerbox).

     uussvvdd--22..00..00..ttggzz
        Du fichier _._l_s_m :

        uvsd  est un daemon qui surveille l'etat d'un onduleur et reagit
        aux changements d'etats (coupure de courant, retour du  courant,
        batterie  faible).   Vous  pouvez ecrire vos propres scripts qui
        sont appeles dans ces cas.  Il ne necessite _p_a_s SysVinit.
  Notez que j'ai seulement jete un coup d'oeil aux  paquetages.   Je  ne
  les    ai    pas    utilises.     Nous   etions   proches   d'utiliser
  bestups-0.9.tar.gz et powerd-2.0.tar.gz mais nous  ne  l'avons  jamais
  fait.

  55..  FFaaiitteess--llee vvoouuss--mmeemmee

  Ce  chapitre  est  specifiquement  destine  au  controle des onduleurs
  betes.  Neammoins, une grande partie  du  processus  est  a  peu  pres
  identique  pour  les onduleurs intelligents.  La principale difference
  reside  dans  la  maniere  dont  le  daemon  (typiquement  _p_o_w_e_r_d)  de
  surveilance communique avec l'onduleur.

  Avant de faire quoi que ce soit, je suggere l'algorithme suivant :

  +o  parcourir ce document ;

  +o  telecharger  et  etudier  tous  les paquetages qui semblent adaptes
     specifiquement a son onduleur ;

  +o  telecharger et etudier les paquetages plus generiques.   Notes  que
     certains  d'entre eux sont en fait plus puissants, mieux documentes
     et plus faciles d'emploi que leurs equivalents specifiques ;

  +o  si les choses ne se passent pas bien ou si certains points  restent
     obscurs, lire le present document avec attention et bidouiller avec
     ardeur et precaution...

  55..11..  QQuuee ffaauutt--iill ffaaiirree ((ssoommmmaaiirreemmeenntt)) ??

  +o  brancher l'ordinateur sur l'onduleur ;

  +o  connecter le port serie de l'ordinateur a l'onduleur avec un  cable
     special ;

  +o  lancer _p_o_w_e_r_d (ou un de ses equivalents) sur l'ordinateur ;

  +o  configurer  _i_n_i_t pour realiser quelque chose de raisonnable sur les
     evenements _p_o_w_e_r_f_a_i_l et _p_o_w_e_r_o_k (comme lancer un _s_h_u_t_d_o_w_n  et  tuer
     tout _s_h_u_t_d_o_w_n en cours respectivement, par exemple).

  55..22..  CCoommmmeenntt eesstt--ccee ssuuppppoossee ffoonnccttiioonnnneerr ??

     TTrraavvaaiill ddee ll''oonndduulleeuurr
        Lorsque  le courant s'arrete, l'onduleur continue d'alimenter le
        PC et signale l'arret du courant par bascule d'un relais ou d'un
        optocoupleur sur son port de controle.

     TTrraavvaaiill dduu ccaabbllee
        Le  cable  est  concu  de  telle  maniere que lorsque l'onduleur
        bascule  ledit  relais,  cela  monte  un  signal   de   controle
        particulier  de  la  ligne  serie (typiquement _D_C_D, detection de
        porteuse)

     TTrraavvaaiill ddee ppoowweerrdd
        Le  daemon  _p_o_w_e_r_d  controle  le  port  serie.    Il   maintient
        leves/baisses  les  signaux  de  controle  du  port  serie  dont
        l'onduleur a besoin (typiquement _D_T_R, Terminal de Donnees  Pret,
        doit  rester  leve,  et touts les signaux qui coupent l'onduleur
        doivent etre maintenus baisses).  Lorsque _p_o_w_e_r_d voit le  signal
        de   controle   de   l'onduleur   monter,  il  ecrit  FAIL  dans
        /etc/powerstatus et envoie un signal SIGPWR au process _i_n_i_t (les
        anciennes   versions   de   _p_o_w_e_r_d   et   _i_n_i_t   ecrivent   dans
        /etc/powerfail).  Lorsque le signal de  controle  redescend,  il
        ecrit  OK  dans  /etc/powerstatus  et  envoie un signal SIGPWR a
        _i_n_i_t.

     TTrraavvaaiill ddee iinniitt ((eenn pplluuss ddee ttoouutt ccee qquu''iill ffaaiitt ppaarr aaiilllleeuurrss))
        Lorsqu'il   recoit   un   signal   SIGPWR,   il   regarde   dans
        /etc/powerstatus.    Si   celui-ci  contient  FAIL,  il  execute
        l'entree powerfail du fichier /etc/inittab.  S'il  contient  OK,
        il execute l'entree powerokwait de inittab.

  55..33..  CCoommmmeenntt ccoonnffiigguurreerr ttoouutt ccaa ??

  Ce  qui  suit  presuppose  que vous disposez d'un cable qui fonctionne
  correctement avec _p_o_w_e_r_d.   Si  vous  n'en  etes  pas  sur,  voyez  la
  section : ``Analyse de cables et modification de powerd.c'' pour toute
  information sur les  cables  mal  decrits  et  la  reconfiguration  de
  _p_o_w_e_r_d.   Les  sections  ``Assignement  des broches du port serie'' et
  ``Correspondance entre ioctl et RS232'' seront aussi utiles.

  Si vous devez  fabriquer  un  cable,  voyez  la  section  :  ``Comment
  realiser  un  cable ?''  pour les details generaux, et la sous-section
  de :  ``Informations  sur  un  certain  nombre  d'onduleurs''  qui  se
  rapporte  a  votre  onduleur.   Cette derniere peut aussi contenir des
  informations sur les cables fournis par le constructeur.  Vous voudrez
  probablement  parcourir toute la section ``Informations sur un certain
  nombre d'onduleurs'' car  chaque  section  contient  quelques  details
  supplementaires generalement utiles.

  +o  Editez /etc/inittab. Placez-y quelque chose de ce genre :

       # Que faire si le courant s'arrete
       # (arreter le systeme et vider la batterie :) :
       pf::powerfail:/etc/powerfailscript +5

       # Si le courant revient avant la fin du shutdown, arreter celui-ci
       pg:0123456:powerokwait:/etc/powerokscript

  +o  Ecrivez les scripts /etc/powerfailscript et /etc/powerokscript pour
     arreter le systeme  apres  cinq  minutes,  ou  mener  toute  action
     appropriee,  et  tuer  le  shutdown  en  cours, respectivement.  En
     fonction de votre version de shutdown, cela sera, soit  si  trivial
     que  vous n'aurez meme pas a ecrire de script, soit un script d'une
     ligne _b_a_s_h, quelque chose du genre :

  kill `ps -aux | grep "shutdown" | grep -v grep | awk '{print $2}'`

  et vous conserverez les scripts (au cas ou cela ne vous arriverait pas
  dans  un  parfait  etat, la premiere apostrophe sur la ligne ci-dessus
  est une quote inversee, la seconde et la troisieme sont  des  apostro-
  phes, et la derniere est aussi une quote inversee).

  +o  Dites a _i_n_i_t de relire le fichier inittab avec :

       telinit q

  +o  Editez rc.local pour lancer _p_o_w_e_r_d lors du lancement.  Syntaxe :

       powerd <ligne>

  Remplacez  <ligne>  par  le  port serie modem sur lequel sera connecte
  l'onduleur, comme dans : /dev/cua1.

  +o  Connectez le port serie du PC a celui de l'onduleur.   NE  BRANCHEZ
     PAS ENCORE LE PC SUR L'ONDULEUR.

  +o  Branchez une lampe sur l'onduleur.

  +o  Allumez l'onduleur et la lampe.

  +o  Lancez _p_o_w_e_r_d.

  +o  Testez la configuration :

  +o  Debranchez l'onduleur.

  +o  Controlez que la lampe reste allumee,

  +o  Controlez que /etc/powerfailscript est lance,

  +o  Controlez que le shutdown est lance.

  +o  Rebranchez l'onduleur.

  +o  Controlez que la lampe reste allumee,

  +o  Controlez que /etc/powerokscript est lance,

  +o  Controlez que /etc/powerfailscript n'est pas lance,

  +o  Controlez que le shutdown est bien arrete.

  +o  Redebranchez l'onduleur. Laissez-le debranche et verifiez que le PC
     s'arrete proprement dans un delai correct.

  +o  LLaa PPaarrttiiee DDeelliiccaattee..  Une fois que tout semble correct,  arretez  le
     PC et branchez-le sur l'onduleur.  Lancez un script qui synchronise
     le  disque  dur  toutes  les  secondes  ou  a  peu   pres   (sync).
     Simultanement,  lancez  un  second  script  qui execute un find sur
     votre disque entier.  Le premier sert  a  rendre  l'operation  plus
     sure,   et   le  second,  a  consommer  le  maximum  de  puissance.
     Maintenant, tirez sur la prise de l'onduleur, verifiez une fois  de
     plus  que  le  PC  est  lance, et attendez.  Assurez-vous que le PC
     s'arrete correctement avant  que  la  batterie  soit  vide.   C'est
     dangereux,  car si la batterie n'assure pas le delai d'arret du PC,
     vous pouvez vous retrouver avec un systeme de fichiers corrompu, et
     peut-etre  meme  la  perte  de  tous  vos  fichiers.   Vous devriez
     probablement realiser une sauvegarde complete  avant  ce  test,  et
     positionner un delai de shutdown tres court pour commencer.

  Felicitations  !   Vous  avez  maintenant un PC sous Linux protege par
  onduleur qui va s'arreter proprement lors d'une coupure de courant !

  55..44..  AAmmeelliioorraattiioonnss UUttiilliissaatteeuurr

  +o  Bidouillez powerd.c pour surveiller la ligne  indiquant  un  faible
     niveau de batterie.  Dans ce cas, executez un shutdown iimmmmeeddiiaattee ;

  +o  Modifiez  la  procedure de shutdown, afin que lorsqu'elle s'execute
     dans des conditions de coupure de courant, elle eteigne  l'onduleur
     apres avoir effectue tout le necessaire.

  66..  NNootteess ssuurr llee mmaatteerriieell

  66..11..  CCoommmmeenntt rreeaalliisseerr uunn ccaabbllee ??

  Cette  section est juste composee de messages que j'ai vus sur le Net.
  Je ne l'ai pas realise, donc  je  ne  peux  parler  d'experience.   Si
  quelqu'un le peut, qu'il ecrive cette section pour moi :).  Voir aussi
  le  message  concernant  le  GPS1000   dans   la   section   ``GPS1000
  d'ACCODATA''  pour  ne  pas citer toutes les donnees specifiques de la
  section ``Informations sur un certain nombre d'onduleurs''

     >From miquels@caution.cistron.nl.mugnet.org Wed Jul 21 14:26:33 1993
     Newsgroups: comp.os.linux
     Subject: Re: Interface onduleur pour Linux ?
     From: miquels@caution.cistron.nl.mugnet.org (Miquel van Smoorenburg)
     Date: Sat, 17 Jul 93 18:03:37
     Distribution: world
     Organization: Cistron Electronics.

     Dans l'article <1993Jul15.184450.5193@excaliber.uucp>
     joel@rac1.wam.umd.edu (Joel M. Hoffman) ecrit_:
     >Je ne vais pas tarder a acheter un onduleur, et ai remarque que certains
     >d'entre eux ont des interfaces reseau pour prevenir celui-ci lorsque le
     >courant est coupe.
     >
     >Y a-t-il une telle interface pour Linux ?
     >
     >Merci..
     >
     >-Joel
     >(joel@wam.umd.edu)
     >

     Lorsque je travaillais sur la derniere version de SysVinit (2.4
     actuellement), j'ai eu temporairement un onduleur sur mon ordinateur,
     donc j'ai ajoute le support de celui-ci.
     Tu as peut-etre vu que dans le dernier fichier d'en-tete <signal.h>,
     il y a maintenant un #define SIGPWR 30 :-).
     Malgre tout, je n'avais pas une telle interface speciale,
     mais la sortie de nombreux onduleurs est juste un relais qui s'ouvre ou se
     ferme en cas de coupure de courant.
     J'ai reflechi a une methode simple pour connecter ca sur la ligne DCD du
     port serie.
     Dans le paquetage SysVinit, il y a un demon appele "powerd" qui garde
     un oeil sur cette ligne serie et envoie SIGPWR a init lorsque l'etat
     change, pour qu'init puisse faire quelque chose (comme arreter le systeme
     dans les 5 minutes).
     La methode de connexion de l'onduleur a la ligne serie est decrite dans le
     source "powerd.c", mais je vais le dessiner ici pour explications_:

                          +------------------------o  DTR
                          |
                        +---+
                        |   | resistance
                        |   | 10 kilo-Ohm
                        |   |
                        +---+                              Vers le port serie
                          |
            +-----o-------+------------------------o  DCD
            |             |
            o  relais     |
          \     de l'     |
           \   onduleur   |
            |             |
            +-----o-------+------------------------o  GND

     Joli dessin, hein ?

     J'espere que cela peut etre utile.
     SysVinit peut etre trouve sur sunsite (et tsx-11 probablement) dans
     SysVinit2.4.tar.z

     Mike.

  --

          Miquel van Smoorenburg, <miquels@cistron.nl.mugnet.org>
          Ibmio.com: cannot open CONFIG.SYS: file handle broke off.

          >From danny@caution.cistron.nl.mugnet.org Wed Jul 21 14:27:04 1993
          Newsgroups: comp.os.linux
          Subject: Re: Interface onduleur pour Linux_?
          From: danny@caution.cistron.nl.mugnet.org (Danny ter Haar)
          Date: Mon, 19 Jul 93 11:02:14
          Distribution: world
          Organization: Cistron Electronics.

          Dans l'article <9307174330@caution.cistron.nl.mugnet.org>
          miquels@caution.cistron.nl.mugnet.org (Miquel van Smoorenburg) ecrit :
          >La methode de connexion de l'onduleur a la ligne serie est decrite dans le
          >source "powerd.c", mais je vais le dessiner ici pour explications_:

          Le dessin n'etait pas vraiment clair, utilisez plutot celui-ci !
          >
          >                     +------------------------o  DTR
          >                     |
          >                   +---+
          >                   |   | resistance
          >                   |   | 10 kilo-Ohm
          >                   |   |
          >                   +---+                            Vers le port serie
          >                     |
          >       +-----o-------+------------------------o  DCD
          >       |
          >       o  relais
          >     \     de l'
          >      \   onduleur
          >       |
          >       +-----o--------------------------------o  GND
          >

          Le DTR est maintenu haut.
          Lorsque le courant de l'onduleur s'arrete, le relais se ferme.
          L'ordinateur controle la descente de la ligne DCD.
          Lorsque cela arrive, il lance une sequence shutdown...

          _____
          Danny

          --
          <=====================================================================>
          Danny ter Haar  <dannyth@hacktic.nl> or <danny@cistron.nl.mugnet.org>
          Robins law #103: 'a couple of lightyears can't part good friends'

  66..22..  AAnnaallyyssee ddee ccaabblleess eett mmooddiiffiiccaattiioonn ddee ppoowweerrdd..cc

  Essayez d'obtenir la documentation  des  cables  que  votre  revendeur
  d'onduleurs fournit. En particulier, recherchez :

  +o  quelles lignes doivent etre maintenues hautes ;

  +o  quelle(s) ligne(s) eteint(gnent) l'onduleur ;

  +o  quelles lignes l'onduleur modifie pour indiquer que :

  +o  le courant est coupe,

  +o  la batterie est faible.

  Il  vous  faut  ensuite  modifier powerd.c en consequence, ou utiliser
  l'un   des   paquetages   configurables   cites   plus   haut    (voir
  _g_e_n_p_o_w_e_r_-_1_._0_._1_._t_g_z,  _p_o_w_e_r_-_2_._0_._t_a_r_._g_z  ou _u_p_s_d_-_1_._0_._t_g_z decrits dans la
  section ``Logiciels''.  Si vous utilisez l'un des  paquetages,  suivez
  les  instruction correspondantes.  Si vous voulez bidouiller powerd.c,
  lisez ce qui suit.

  Si vous avez des problemes pour obtenir les informations precitees, ou
  si  vous  voulez  juste  les  controler (une _b_o_n_n_e idee), le programme
  suivant peut vous y aider.  C'est une version bidouillee de  powerd.c.
  Il  vous  permet de positionner les signaux du port depuis la ligne de
  commande, puis il controle le port, en affichant  l'etat  des  signaux
  chaque  seconde.   Je  l'ai  utilise  en  "upscheck  /dev/cua1 2" (par
  exemple) pour monter le deuxieme bit (_D_T_R) et  descendre  les  autres.
  Le  nombre en base 2 indique les bits a monter, ainsi par exemple pour
  monter les bits 1, 2 et 3 (et descendre les autres), utilisez 7.  Voir
  le code pour les details.

  Voici  le  programme  (non  teste) upscheck.c.  Il n'est pas teste car
  j'ai modifie la version que j'avais utilisee au depart pour le  rendre
  plus  clair,  et  que  je  ne  peux tester la nouvelle version pour le
  moment.

  NdT : La traduction des commentaires  et  messages  peut  aussi  avoir
  altere le comportement du programme.

  ______________________________________________________________________
  /*
   * upscheck     Controle comment l'ordinateur et l'onduleur communiquent
   *
   * Usage:       upscheck <peripherique> <bits a monter>
   *              Par exemple, upscheck /dev/cua4 4 pour monter le bit 3 et
   *              controler /dev/cua4.
   *
   * Author:      Harvey J. Stein <hjstein@math.huji.ac.il>
   *              (mais en realite juste une modification mineure de Miquel van
   *              Smoorenburg's <miquels@drinkel.nl.mugnet.org> powerd.c
   *
   * Version:     1.0 19940802
   *
   */
  #include <sys/types.h>
  #include <sys/ioctl.h>
  #include <fcntl.h>
  #include <errno.h>
  #include <stdlib.h>
  #include <unistd.h>
  #include <stdio.h>
  #include <signal.h>

  /* Programme principal. */
  int main(int argc, char **argv)
  {
    int fd;

  /*  Ces parametres TIOCM_* sont definis dans <linux/termios.h>, qui  */
  /*  est inclus indirectement ici.                                    */
    int dtr_bit = TIOCM_DTR;
    int rts_bit = TIOCM_RTS;
    int set_bits;
    int flags;
    int status, oldstat = -1;
    int count = 0;
    int pc;

    if (argc < 2) {
          fprintf(stderr, "Usage: upscheck <peripherique> <bits-a-positionner>\n");
          exit(1);
    }

    /* Ouvre le peripherique a controler. */
    if ((fd = open(argv[1], O_RDWR | O_NDELAY)) < 0) {
      fprintf(stderr, "upscheck: %s: %s\n", argv[1], sys_errlist[errno]);
      exit(1);}

    /* Recupere les bits a positionner sur la ligne de commande */
    sscanf(argv[2], "%d", &set_bits);

    while (1) {
      /* Positionne les bits specifies sur la ligne de commande (et */
      /* seulement eux).                                            */
      ioctl(fd, TIOCMSET, &set_bits);
      fprintf(stderr, "Positionnement de %o.\n", set_bits);

      sleep(1);

      /* Recupere les bits actuellement positionnes */
      ioctl(fd, TIOCMGET, &flags);
      fprintf(stderr, "Les signaux sont %o.\n", flags);

  /*  Piochez ici en changeant TIOM_CTS par un autre TIOCM jusqu'a   */
  /*  ce que le programme detecte que le courant est coupe lorsque   */
  /*  vous debranchez l'onduleur. Ensuite, vous saurez comment       */
  /*  modifier powerd.c                                              */
      if (flags & TIOCM_CTS)
        {
          pc = 0 ;
          fprintf(stderr, "Le courant est la.\n");
        }
      else
        {
          pc = pc + 1 ;
          fprintf(stderr, "Le courant est coupe.\n");
        }
      }

    close(fd);
  }
  ______________________________________________________________________

  66..33..  AAssssiiggnneemmeenntt ddeess bbrroocchheess dduu ppoorrtt sseerriiee

  La section qui precede presuppose la connaissance de la correspondance
  entre les signaux de terminal et les broches du port serie.  Voici une
  reference  de cette correspondance, reprise du document de David Tal :
  "Cables et connecteurs frequemment utilises".  J'inclus  un  diagramme
  illustrant  les  connecteurs,  et une table donnant la corresopondance
  entre les numeros de broches et les signaux de ligne de terminal.

  Si vous avez besoin  d'une  reference  generale  sur  le  brochage  de
  cables,  celle  de David Tal en est une bonne, mais je n'arrive plus a
  localiser ce document sur le Net.  Mais j'ai trouve un  bon  livre  de
  remplacement, c'est The Hardware Book.

  NdT  :  si  un  lecteur  francais  veut proposer une reference dans la
  langue de Moliere, qu'il n'hesite pas a me contacter.

  Autres sites utiles :

  +o  Yost Serial Device Wiring Standard qui  contient  des  informations
     interessantes sur les connecteurs RJ-45 et les cables quatre paires
     pour toutes les connexions serie ;

  +o  Stokely consulting pour  l'information  generale  sur  Unix  et  en
     particulier leur Unix Serial Port Resources ;

  +o  Unix  Workstation System Administration Education Certification qui
     contient : RS-232: Connectors and Cables.

  Incidemment, il semble que le paquetage Linuxdoc-sgml ne formate  plus
  les tableaux tres bien en sortie _h_t_m_l.  Si vous voulez pouvoir lire la
  table qui suit, vous devrez probablement vous referer a la version _D_V_I
  ou texte simple du present document.

  |       |         |        |       |         |          |                                           |
  |DB-25  |  DB-9   |  Nom   |  EIA  |  CCITT  |  DTE-DCE |  Description                              |
  |Broche |  Broche |        |       |         |          |                                           |
  +-------+---------+--------+-------+---------+----------+-------------------------------------------+
  |1      |         |  FG    |  AA   |  101    |  ---     | Masse de chassis GND                      |
  |2      |  3      |  TD    |  BA   |  103    |  --->    | Donnees transmises, TxD                   |
  |3      |  2      |  RD    |  BB   |  104    |  <---    |  Donnees recues, RxD                      |
  |4      |  7      |  RTS   |  CA   |  105    |  --->    | Requete pour envoyer                      |
  |5      |  8      |  CTS   |  CB   |  106    |  <---    |  Pret a envoyer                           |
  |6      |  6      |  DSR   |  CC   |  107    |  <---    |  Jeu de donnees pret                      |
  |7      |  5      |  SG    |  AB   |  102    |  ----    | Masse de signal, GND                      |
  |8      |  1      |  DCD   |  CF   |  109    |  <---    |  Detection de porteuse                    |
  |9      |         |  --    |  --   |  -      |  -       | Tension positive continue de test         |
  |10     |         |  --    |  --   |  -      |  -       | Tension negative continue de test         |
  |11     |         |  QM    |  --   |  -      |  <---    |  Mode d'egalisation                       |
  |12     |         |  SDCD  |  SCF  |  122    |  <---    |  Detection de porteuse secondaire         |
  |13     |         |  SCTS  |  SCB  |  121    |  <---    |  Pret a envoyer secondaire                |
  |14     |         |  STD   |  SBA  |  118    |  --->    | Donnees transmise secondaires             |
  |15     |         |  TC    |  DB   |  114    |  <---    |  Signal d'horloge de l'emetteur           |
  |16     |         |  SRD   |  SBB  |  119    |  <---    |  Signal d'horloge secondaire du recepteur |
  |17     |         |  RC    |  DD   |  115    |  --->    | Signal d'horloge du recepteur             |
  |18     |         |  DCR   |  --   |  -      |  <---    |  Horloge divisee du recepteur             |
  |19     |         |  SRTS  |  SCA  |  120    |  --->    | Requete pour emettre secondaire           |
  |20     |  4      |  DTR   |  CD   |  108.2  |  --->    | Terminal de donnees pret                  |
  |21     |         |  SQ    |  CG   |  110    |  <---    |  Detection de qualite de signal           |
  |22     |  9      |  RI    |  CE   |  125    |  <---    |  Indicateur de sonnerie                   |
  |23     |         |  --    |  CH   |  111    |  --->    | Selecteur de vitesse de donnees           |
  |24     |         |  --    |  CI   |  112    |  <---    |  Selecteur de vitesse de donnees          |
  |25     |         |  TC    |  DA   |  113    |  <---    |  Horloge transmise                        |

      Assignement des broches de port serie (RS-232C), DB-25 et DB-9
  ______________________________________________________________________
          1                         13         1         5
        _______________________________      _______________
        \  . . . . . . . . . . . . .  /      \  . . . . .  /    Connecteurs
         \  . . . . . . . . . . . .  /        \  . . . .  /     RS-232 vus de
          ---------------------------          -----------      l'arriere de
          14                      25            6       9       l'ordinateur

     DTE : Equipement terminal de donnees (i.e. ordinateur)
     DCE : Equipement de communication de donnees (i.e. modem)
     RxD : Donnees recues; 1 est transmis "bas", 0 "haut"
     TxD : Donnees envoyees; 1 est transmis "bas", 0 "haut"
     DTR : DTE annonce qu'il est alimente et pret a communiquer
     DSR : DCE annonce qu'il est pret a communiquer; "bas" raccroche le modem
     RTS : DTE demande a DCE la permission d'envoyer des donnees
     CTS : DCE agree la RTS
     RI  : DCE indique au DTE qu'il tente d'etablir une connexion
     DCD : DCE annonce qu'une connexion est etablie
  ______________________________________________________________________

  66..44..  CCoorrrreessppoonnddaannccee eennttrree iiooccttll eett RRSS223322

  Puisque  vous  pouvez  aussi  devoir  modifier powerd.c pour monter et
  descendre les signaux corrects, vous pouvez  aussi  avoir  besoin  des
  valeurs  numeriques  des  differents signaux de terminal.  Ils peuvent
  etre trouves dans /usr/include/linux/termios.h, mais  sont  reproduits
  ici  comme  reference.   Puisqu'ils peuvent etre sujets a changements,
  vous auriez avantage a les verifier avec ledit fichier.

       ______________________________________________________________________
       /* lignes modem */
       #define TIOCM_LE        0x001
       #define TIOCM_DTR       0x002
       #define TIOCM_RTS       0x004
       #define TIOCM_ST        0x008
       #define TIOCM_SR        0x010
       #define TIOCM_CTS       0x020
       #define TIOCM_CAR       0x040
       #define TIOCM_RNG       0x080
       #define TIOCM_DSR       0x100
       #define TIOCM_CD        TIOCM_CAR
       #define TIOCM_RI        TIOCM_RNG
       ______________________________________________________________________

  Notez que la troisieme colonne est en hexadecimal.

  77..  QQuuee ffaaiirree ssii ll''oonn nn''eenn ssoorrtt ppaass ??

  Voici une nouvelle solution pour le  controle  lorsque  l'onduleur  et
  l'ordinateur ne s'entendent pas.  Je dois dire qu'a chaque fois que je
  lis cela, je suis effare de l'intelligence de cette solution.

  From: " Raymond A. Ingles" <inglesra@frc.com>
  To: hjstein@math.huji.ac.il
  Subject: UPS HOWTO tip
  Date: Mon, 24 Feb 1997 11:48:32 -0500 (EST)

  Je ne sais pas si d'autres trouveront ca utile, mais je pense pouvoir
  diffuser ceci pour inclusion possible dans le HOWTO. Merci de maintenir
  un HOWTO que je trouve si utile !

  --------------------

  Ma fiancee m'a offert un onduleur, un Tripp-Lite 400, je crois.
  Il etait le bienvenu et semble fonctionner comme prevu, mais malheureusement,
  ne dispose pas d'interface serie pour prevenir l'ordinateur d'une coupure
  de courant.
  Il semble prevu pour une utilisation personnelle quand l'ordinateur ne
  reste pas seul.

  Evidemment, cela etait inacceptable et j'ai commence a travailler sur un
  systeme de surveillance de ligne, en imaginant ouvrir la boite et voir
  comment ajouter le hard que le constructeur avait omis. J'ai alors realise
  qu'il y avait une solution plus simple et moins chere (bien qu'un peu moins
  dotee en fonctionnalites).

  J'avais un vieux modem 2 400 baud que je n'utilisais pas, que j'ai branche
  sur un port serie inutilise de l'ordinateur. Je l'ai ensuite branche sur une
  prise anti-surtensions, elle-meme branchee sur la prise murale.
  J'ai configure powerd avec les options suivantes :

  ----
  serialline   /dev/ttyS1
  monitor      DCD
  failwhen     low
  ----

  Maintenant, lorsque le courant est coupe (ou, bien que cela ne soit pas
  arrive recemment, lorsque je debranche le parasurtenseur pour tester la
  configuration), le modem tombe mais l'onduleur commence a alimenter
  l'ordinateur.
  Lorsque powerd se rend compte que le modem a descendu DCD, il declenche la
  sequence powerfail.

  Evidemment, il y a certaines limitations.
  Il n'est pas possible de faire indiquer par le modem que la batterie est
  faible, etc.
  On peut seulement indiquer que le courant est coupe.
  Maintenant, ce n'est pas cher et je deteste laisser un equipement
  informatique inutilise.
  Ces temps-ci, il est possible d'avoir un modem 2 400 baud quasi gratuitement.

  Je continue a conseiller un onduleur avec des possibilites de communication
  completes, mais si l'on est coince avec un qui n'en a pas, cela peut au
  moins etre utile.

    Sincerement,

  Ray Ingles           (810) 377-7735           inglesra@frc.com

   "Anybody who has ever seen a photograph showing the kind of damage that
  a trout traveling that fast can inflict on the human skull knows that
  such photographs are very valuable. I paid $20 for mine." - Dave Barry

  88..  IInnffoorrmmaattiioonnss ssuurr uunn cceerrttaaiinn nnoommbbrree dd''oonndduulleeuurrss

  Cette  section  contient  des  informations  specifiques  de  certains
  onduleurs.  Ce que je souhaiterais serait de disposer des informations
  sur le port de controle de l'onduleur (ce que fait chaque broche et ce
  qu'elle attend qui soit fait), sur le cable fourni par le constructeur
  (ce qu'il connecte et ou), ainsi qu'une version modifiee  de  powerd.c
  qui  fonctionne  avec  l'onduleur.   Ce  que j'ai actuellement est une
  description a peu pres  complete  de  chaque  onduleur.   Je  voudrais
  essayer  d'affiner  chaque  information,  mais comme je ne peux tester
  chaque onduleur, il est difficile de decider exactement de ce qui  est
  necessaire.   De  plus,  chaque  onduleur  semble avoir quelques trucs
  supplementaires qui sont  bien  decrits  par  les  auteurs  de  chaque
  section.   Ainsi, pour l'heure, je laisse tout en place.  Tout pour un
  HOWTO epais.

  VVeeuuiilllleezz mm''eennvvooyyeerr vvooss eexxppeerriieenncceess ppoouurr lleess iinncclluurree iiccii..

  88..11..  EExxppeerriieenncceess ggeenneerraalleess..

  J'ai conserve les commentaires des gens, mais n'ai pas  encore  obtenu
  la permission de les inclure ici.  Voici un sommaire general de ce que
  j'ai entendu dire.

     AAPPCC ::
        Ne donneront pas d'informations sur leur mode "intelligent" sans
        votre  signature d'un accord de confidentialite.  Donc, les gens
        sont forces d'utiliser leurs onduleurs  "intelligents"  en  mode
        "bete",  comme souligne plus bas.  Diverses tentatives de retro-
        ingenierie  ont  ete  soldees  par  des  niveaux   de   reussite
        differents.

     BBeesstt ::
        Serviables  et  aimables.   Fournissent  le  code  source  et la
        documentation pour les deux modes.

     TTrriipppp LLiittee ::
        Une personne a  dit  que  Tripp  ne  diffuserait  pas  non  plus
        d'information.

     UUppssoonniicc ::
        Quelqu'un  a  dit  qu'Upsonic a discute de details techniques au
        telephone, repondu aux questions par fax  et  est  serviable  en
        general.

  88..22..  AAddvviiccee 11220000 AA

  Onduleurs  d'Advice  Electronics, Tel Aviv, Israel (Tout leur materiel
  porte une etiquette a leur nom).

  Specification des broches du port de controle.

  +o  2 - Coupure de courant.

  +o  5 - Batterie faible.

  +o  6 - Extinction de l'onduleur.

  +o  4 - Masse commune des broches 2, 5 et 6.

  Ils m'ont aussi donne le dessin suivant qui ne m'a servi a rien,  mais
  peut vous etre utile si vous souhaitez fabriquer vous-meme un cable :

       ______________________________________________________________________
                2 ----------+
                            |
                            \
                             \|
                              |--------------
                             /|
                           \/      <--- Le "\/" indique le type de ce
                           |            transistor. J'ai oublie ce que
                           |            cela veut dire, mais ce n'est
                        +-----+         pas fondamental.
                       /  /  /

                5 ----------+
                            |
                            \
                             \|
                              |--------------
                             /|
                           \/
                           |
                           |
                        +-----+
                       /  /  /

                              +-------------
                              |
                              /
                     10K    |/
                6 --\/\/\/--|
                            |\
                              \/
                              |
                              |
                           +-----+
                          /  /  /

                4 ----------+
                            |
                            |
                         +-----+
                        /  /  /

       ______________________________________________________________________

  Cable fourni.

  Ils m'ont d'abord donne un cable qui appartenait a un paquetage DOS de
  controle de l'onduleur appele RUPS.  Je l'ai utilise pour  les  tests.
  Une  fois  ceux-ci  satisfaisants,  ils  m'ont  donne  un cable qu'ils
  utilisent pour les serveurs Netware connectes  a  des  onduleurs.   Il
  fonctionnait a l'identique.  Voici les details :

  +o  DTR - Alimentation du cable (powerd.c doit le monter) ;

  +o  CTS - Courant present (descend quand le courant est coupe) ;

  +o  DSR - Batterie faible (descend lorsque la batterie faiblit) ;

  +o  RTS - Extinction de l'onduleur (a monter pour eteindre).

  (le  powerd.c  inclus  dans SysVinit place ou laisse RTS haut, causant
  l'arret de l'onduleur immediatement lors du lancement de powerd !)

  88..33..  nnaammee==""TTrruusstt EEnneerrggyy PPrrootteeccttoorr 440000//660000""

  Cette  section  n'est  pas  utile  seulement  pour  le  Trust   Energy
  Protector.  Elle illustre les nouvelles fonctionnalites d'_i_n_i_t.

  Comment utiliser un Trust Energy Protector 400/650 sous Linux ?

  par Ciro Cattuto

  Version 1.0 - 31 mars 1997

     CCoonnnneexxiioonn PPCC--oonndduulleeuurr
        Le  Trust  Energy  Protector  400/650  est  equipe  d'un port de
        signaux.  A  l'aide  d'un  cable  adapte,  il  est  possible  de
        connecter  celui-ci sur un ordinateur pour reagir aux evenements
        concernant l'alimentation electrique.

     LLee ppoorrtt ddee ssiiggnnaauuxx ddee ll''oonndduulleeuurr
        L'assignement des broches du port de signaux DB-9 de  l'onduleur
        est le suivant, comme indique dans le manuel utilisateur :

        bbrroocchhee 22
           Ce  relais  est  ferme  lorsque le courant d'alimentation est
           coupe.

        bbrroocchhee 44
           Masse des broches 2 et 5.

        bbrroocchhee 55
           Ce relais est ferme lorsque  la  batterie  dispose  de  moins
           d'une minute et demi d'autonomie.

        bbrroocchhee 66
           L'utilisateur peut envoyer un signal haut (+5V a +12V) durant
           plus d'une  milliseconde  pour  eteindre  l'onduleur.   Cette
           option  ne  peut  etre  activee  que  durant  une  coupure de
           courant.

        bbrroocchhee 77
           Masse de la broche 6.

     llee ccaabbllee
        Voici le cable que j'ai utilise  pour  connecter  l'onduleur  au
        port serie de mon ordinateur.

               cote ordinateur (DB-15)                         cote onduleur (DB-9)
               ====================================================================

                6 DSR --+                                [R] = resistance 10 kohm
                        |
               20 DTR --+----+
                        |    |
                       [R]  [R]                                             +--- 7
                        |    |                                              |
                8 DCD --+----|--------------           ---------------------|--- 2
                             |                                              |
                7 GND -------|--------------           ---------------------+--- 4
                             |                 ...
                5 CTS -------+--------------           ------------------------- 5

                2 TX  ----------------------           ------------------------- 6

               ====================================================================

     Pour  un  port  serie  DB-9,  les  broches  6,  20,  8,  7,  5 et 2
     correspondent respectivement aux broches 6, 4, 1, 5, 8 et 3.

     CCoommmmeenntt ffoonnccttiioonnnnee llee ccaabbllee ??
        L'ordinateur monte  DTR  et  verifie  que  DSR  soit  haut  pour
        s'assurer  que  le cable soit connecte a l'ordinateur.  Tant que
        le courant est la, DCD et CTS sont hauts tous les deux (a  cause
        des resistances).

        Lorsque le courant est coupe, le relais entre les broches 2 et 4
        de l'onduleur se ferme, et DCD descend pour signaler la coupure.

        De meme, lorsque les batteries sont faibles, le relais entre les
        broches 5 et 4 se ferme, faisant descendre CTS.

        Durant  une  coupure  de  courant,  l'ordinateur  peut  eteindre
        l'onduleur  en  montant TX durant 1 ms au moins.  Cela peut etre
        realise aisement en envoyant un octet 0xFF au  port  serie  avec
        une vitesse faible.

     llee ddaaeemmoonn ppoowweerrdd
        Pour utiliser les informations disponibles sur le port serie, il
        faut utiliser un programme  qu  surveille  celui-ci,  decode  le
        signal   et   envoie   les   messages   appropries   au  systeme
        d'exploitation, en l'occurence au processus  init.   Ce  dernier
        peut  executer  des  scripts  et  programmes  concus  pour gerer
        (proprement !) l'evenement de coupure de courant.

     ccoommppiilleerr ppoowweerrdd
        En annexe A se trouve le code de powerd, le daemon que j'utilise
        pour  surveiller  le  Trust  Energy  Protector 400/650.  Pour le
        compiler, il faut le source du paquetage SysVinit (j'ai  utilise
        celui   de   sysvinit-2.60).   Ecrasez  simplement  le  powerd.c
        d'origine et compilez-le.

     CCoommmmeenntt ffoonnccttiioonnnnee ppoowweerrdd ??
        Des le demarrage, _p_o_w_e_r_d ouvre le peripherique serie connecte  a
        l'onduleur  et  monte  DTR.   Ensuite,  il forke un daemon et se
        termine en laissant celui-ci tourner.  Le daemon _p_o_w_e_r_d peut  se
        trouver dans l'un des trois etats suivants :

        EEttaatt 00 -- llee ccoouurraanntt eesstt bboonn
           Dans  cet  etat, _p_o_w_e_r_d lit le port serie toutes les T0_SLEEP
           secondes (voir les lignes #define au debut du  code  source).
           Si  DCD  descend,  _p_o_w_e_r_d bascule en etat 1.  Si CTS descend,
           _p_o_w_e_r_d bascule en etat 2 (cela ne doit  pas  arriver  si  DCD
           n'est pas descendu avant, mais j'ai prefere assurer le coup).

        EEttaatt 11 -- llee ccoouurraanntt eesstt ccoouuppee
           Une coupure de courant a ete detectee.  DCD est bas et _p_o_w_e_r_d
           lit  le  port de l'onduleur toutes les T1_SLEEP secondes.  Si
           DCD remonte, il bascule en etat 0.  Si CTS tombe, il  bascule
           en etat 2.

        EEttaatt 22 -- llaa bbaatttteerriiee eesstt ffaaiibbllee
           La batterie de l'onduleur est faible.  Le daemon _p_o_w_e_r_d reste
           dans cet etat.

        A chaque changement d'etat de _p_o_w_e_r_d, il previent  le  processus
        _i_n_i_t   afin   que   l'action  appropriee  soit  effectuee.   Ces
        evenements sont traces a l'aide du systeme de trace  du  systeme
        d'exploitation (NdT : _s_y_s_l_o_g_d).

        Si  DSR est bas, c'est qu'il y a un probleme au niveau du cable.
        _p_o_w_e_r_d continue a surveiller la ligne DSR et envoit  un  message
        d'avertissement toutes les deux minutes au systeme de trace.

     UUttiilliisseerr ppoowweerrdd
        Le   daemon   _p_o_w_e_r_d   doit   etre   lance   par   les   scripts
        d'initialisation durant le demarrage du  systeme.   J'ai  ajoute
        les lignes suivantes dans mon script /etc/rc.d/rc.local :

          # Ajout du support de l'onduleur
          echo "Demarrage du processus powerd..."
          rm -f /etc/turnUPSoff
          stty -crtscts speed 75 < /dev/cua3 > /dev/null
          if [ -x /usr/sbin/powerd ]
          then
                  /usr/sbin/powerd /dev/cua3
          fi

     En  premier,  on efface (si necessaire) le fichier /etc/turnUPSoff.
     Celui-ci est utilise par le script de shutdown (/etc/rc.d/rc.0 dans
     mon  cas)  pour  decider s'il faut arreter l'onduleur ou non.  Voir
     plus bas pour plus d'informations.

     Ensuite,  on  desactive  le  controle  de  flux  materiel  sur   le
     peripherique  serie  connecte  a  l'onduleur  et  on  positionne la
     vitesse a 75 bauds.  Maintenant, nous sommes sur que le  signal  TX
     restera haut suffisamment longtemps pour arreter l'onduleur si nous
     envoyons un caractere 0xFF au port  serie  (a  nouveau,  voir  plus
     bas).
     Enfin,  nous  lancons  le  daemon _p_o_w_e_r_d en lui indiquant le port a
     surveiller.  Notez que nous n'avons pas a lire de caracteres sur ce
     port,  donc pas d'inquietude en cas de conflit d'interruptions - il
     n'aura aucune influence.

     LLee ffiicchhiieerr iinniittttaabb eett lleess ssccrriippttss ddee sshhuuttddoowwnn
        Le processus _p_o_w_e_r_d tourne maintenant, et il enverra des signaux
        a  init  en  cas  de  coupure  de  courant.   Il faut maintenant
        configurer le systeme afin qu'il puisse reagir de maniere  utile
        lorsque ces signaux sont recus.

     MMooddiiffiiccaattiioonn ddee iinniittttaabb
        Ajoutez  les  lignes  suivantes  a  proximite  du debut de votre
        fichier /etc/inittab :

          # Quoi faire lorsque le courant est coupe (shutdown temporise)
          pf::powerfail:/etc/powerfail_script

          # Si le courant revient avant le shutdown, arreter celui-ci
          pg::powerokwait:/etc/powerokay_script

          # Si la batterie de l'onduleur est faible, faire un shutdown immediat
          pc::powerfailnow:/etc/powerfailnow_script

     LLeess ssccrriippttss
        Les    scripts     powerfail_script,     powerokay_script     et
        powerfailnow_script  sont executes lorsque _i_n_i_t recoit le signal
        correspondant.  Il ont la responsabilite d'arreter le systeme de
        maniere  propre  ou  d'arreter un shutdown en cours au cas ou le
        courant  reviendrait.    Voici   les   scripts   que   j'utilise
        actuellement :

        /etc/powerfail_script

          #!/bin/sh
          /bin/sync
          /usr/bin/sleep 10m
          kill -9 `ps auxw | \
                   grep "shutdown" | \
                   grep -v grep | \
                   awk '{print $2}'` >/etc/turnUPSoff
          /sbin/shutdown -t30 -h +3 "Coupure de courant"

     Mon  Trust  Energy  Protector 400 n'alimente que l'ordinateur, j'ai
     donc une reserve de courant assez importante.   Dans  mon  secteur,
     les  coupures  de  courant  ne durent souvent que quelques minutes,
     donc le systeme reagit a celles-ci de  la  maniere  suivante  :  Il
     attent  10  minutes (habituellement, le courant revient avant) puis
     arrete le systeme, en laissant aux utilisateurs le temps de  fermer
     leurs  applications  et  de  se  deconnecter.   Avant d'executer la
     commande _s_h_u_t_d_o_w_n, je verifie qu'il n'y a pas d'autre  shutdown  en
     cours.   Je  cree  aussi  le  fichier  /etc/turnUPSoff  afin que le
     systeme arrete l'onduleur.
     /etc/powerokay_script

          #!/bin/sh
          kill    `ps auxw | \
                   grep "powerfail_script" | \
                   grep -v grep | \
                   awk '{print $2}'`
          kill -9 `ps auxw | \
                   grep "shutdown" | \
                   grep -v grep | \
                   awk '{print $2}'`
          rm -f /etc/turnUPSoff

     Si le courant revient, on tue le script  _p_o_w_e_r_f_a_i_l___s_c_r_i_p_t  et  tout
     _s_h_u_t_d_o_w_n en cours.  On n'oublie pas de supprimer /etc/turnUPSoff.

     /etc/powerfailnow_script

          #!/bin/sh
          kill -9 `ps auxw | \
                   grep "shutdown" | \
                   grep -v grep | \
                   awk '{print $2}'` >/etc/turnUPSoff
          /sbin/shutdown -h now "Batterie de l'onduleur faible. ARRET IMMEDIAT."

     Si  la  batterie  faiblit, on s'assure qu'aucun _s_h_u_t_d_o_w_n ne soit en
     cours, on cree le fichier /etc/turnUPSoff puis on arrete le systeme
     immediatement.

     LLee ssccrriipptt dd''aarrrreett ssyysstteemmee
        Lorsque  l'arret  du  systeme  est  effectue,  on  peut  arreter
        l'onduleur en montant le signal TX du  port  serie  durant  plus
        d'une  milliseconde.   Celui-ci  est deja configure correctement
        par  la  commande  stty  du  script  rc.local.   Si  le  fichier
        /etc/turnUPSoff  est  present,  on envoit l'octet 0xFF (tous les
        bits a 1) sur le port serie.

        Pour cela, on ajoute les lignes suivantes autour de  la  fin  du
        script  d'arret  (/etc/rc.d/rc.0  dans  mon cas).  L'emplacement
        correct depend de la maniere dont le systeme est configure, mais
        il  doit pouvoir se situer avant la commande _e_c_h_o qui affiche le
        message "System is halted".

          # Est-on dans un cas de coupure de courant ?
          if [ -f /etc/turnUPSoff ]
          then
                  echo "Arret de l'onduleur"
                  sleep 5
                  echo -e "\377" >/dev/cua3
                  exit 1
          fi

     RReemmaarrqquueess ggeenneerraalleess
        Ce document contient des choses que j'ai apprises en tentant  de
        configurer _m_o_n systeme Linux avec le Trust Energy Protector 400.
        Certaines  informations   (le   chemin   d'acces   aux   scripts
        d'initialisation,  par  exemple)  peuvent etre specifiques a mon
        systeme, et il  vous  faudra  vraisemblablement  faire  quelques
        adaptations.  Neammoins, j'espere que ce document sera une trace
        utile pour ceux qui essaieront d'utiliser un onduleur de ce type
        sous  Linux.  Si vous rencontrez des difficultes, recherchez des
        informations plus generales dans le reste de  ce  Howto.   Bonne
        chance !

     RReettoouurr dd''iinnffoorrmmaattiioonnss
        J'apprecierais  enormement tout retour d'informations concernant
        ce document, afin de pouvoir affiner celui-ci et y  corriger  de
        possibles erreurs (je sais que l'anglais que j'utilise n'est pas
        excellent, mais apres tout, je suis italien ! (-- NdT  :  On  se
        demande quelquefois s'il faut vraiment tout traduire :-))--)

        ).   Envoyez  tout  commentaire/suggestion/critique  a l'adresse
        suivante :

        ciro@stud.unipg.it

        Si vous rencontrez des  problemes  d'utilisation  de  l'onduleur
        Trust  Energy Protector 400/650 sous Linux, vous pouvez aussi me
        contacter.  J'essaierai de vous aider.

     IInnffoorrmmaattiioonnss lleeggaalleess
        Je n'ai aucune relation avec Trust Networking Products.

        L'information  contenue  dans  ce  document  est  livree  "telle
        quelle".  Vous pouvez l'utiliser a vos risques et perils.  Je ne
        puis etre tenu responsable d'un quelconque dommage ni  perte  de
        donnees  resultant  de l'utilisation du code ni des informations
        donnees ici.

        Ciro Cattuto

     AAppppeennddiixx AA  --  CCooddee ssoouurrccee dduu ddaaeemmoonn ppoowweerrdd>>

          powerd.c

     /*
      * powerd       Recoit les evenements de coupure de courant
      *              depuis un Trust Energy Protector 400/650
      *              et previent init
      *
      * Usage:       powerd <port serie>
      *
      * Author:      Ciro Cattuto <ciro@stud.unipg.it>
      *
      * Version 1.0 - 31 Mars 1997
      *
      * Ce code est largement fonde sur le powerd.c original de
      * Miquel van Smoorenburg <miquels@drinkel.ow.org>.
      *
      *
      * This program is free software; you can redistribute it and/or
      * modify it under the terms of the GNU General Public License
      * as published by the Free Software Foundation; either version
      * 2 of the License, or (at your option) any later version.
      *
      * Ce programme est un logiciel libre ; vous pouvez le distribuer
      * et/ou le modifier selon les termes de la Licence Publique Generale
      * GNU publiee par la Free Software Foundation version 2 ou (comme
      * vous le voulez) toute version ulterieure.
      *
      */

     /* etat 0 - le courant est la */
     #define T0_SLEEP        10      /* intervalle de lecture du port en
                                        secondes                                */
     #define T0_DCD          3       /* duree avec DCD monte avant de realiser
                                        une action                              */
     #define T0_CTS          3       /* duree avec CTS monte avant de realiser
                                        une action                              */
     /* etat 1 - le courant est coupe */
     #define T1_SLEEP        2       /* intervalle de lecture du port           */
     #define T1_DCD          3       /* idem    T0_DCD                          */
     #define T1_CTS          3       /* idem    T0_CTS                          */

     #define DSR_SLEEP       2
     #define DSR_TRIES       60

     /* On utilise le nouveau mode de communication avec init. */
     #define NEWINIT

     #include <sys/types.h>
     #include <sys/stat.h>
     #include <sys/ioctl.h>
     #include <fcntl.h>
     #include <errno.h>
     #include <stdlib.h>
     #include <unistd.h>
     #include <stdio.h>
     #include <signal.h>
     #include <syslog.h>
     #include <string.h>
     #include 'paths.h'
     #ifdef NEWINIT
     #include 'initreq.h'
     #endif

     #ifndef SIGPWR
     #  define SIGPWR SIGUSR1
     #endif

     #ifdef NEWINIT
     void alrm_handler()
     {
     }
     #endif

     /* Dire a init que le courant est coupe (1), revenu (0) ou que
        les batteries de l'onduleur sont faibles (2). */
     void powerfail(int event)
     {
       int fd;
     #ifdef NEWINIT
       struct init_request req;

       /* On remplit la structure necessaire */
       memset(&req, 0, sizeof(req));
       req.magic = INIT_MAGIC;
       switch (event)
             {
             case 0:
                     req.cmd = INIT_CMD_POWEROK;
                     break;
             case 1:
                     req.cmd = INIT_CMD_POWERFAIL;
                     break;
             case 2:
             default:
                     req.cmd = INIT_CMD_POWERFAILNOW;
             }

       /* On ouvre le fifo (avec timeout) */
       signal(SIGALRM, alrm_handler);
       alarm(3);
       if ((fd = open(INIT_FIFO, O_WRONLY)) >= 0
                     && write(fd, &req, sizeof(req)) == sizeof(req)) {
             close(fd);
             return;
       }
       /* On revient a l'ancienne methode... */
     #endif

       /* On cree un fichier info pour init */
       unlink(PWRSTAT);
       if ((fd = open(PWRSTAT, O_CREAT|O_WRONLY, 0644)) >= 0) {
       switch (event)
             {
             case 0:
                     write(fd, 'OK\n', 3);
                     break;

             case 1:
                     write(fd, 'FAIL\n', 5);
                     break;

             case 2:
             default:
                     write(fd, 'LOW\n', 4);
                     break;
             }
       close(fd);
       }

       kill(1, SIGPWR);
     }

     /* Programme principal. */
     int main(int argc, char *argv[])
     {
       int fd;
       int dtr_bit = TIOCM_DTR;
       int flags;
       int DCD, CTS;
       int status = -1;
       int DCD_count = 0, CTS_count = 0;
       int tries;

       if (argc < 2) {
             fprintf(stderr, 'Usage: powerd <peripherique>\n');
             exit(1);
       }

       /* On demarre syslog. */
       openlog('powerd', LOG_CONS|LOG_PERROR, LOG_DAEMON);

       /* On ouvre le port a surveiller. */
       if ((fd = open(argv[1], O_RDWR | O_NDELAY)) < 0) {
             syslog(LOG_ERR, '%s: %s', argv[1], sys_errlist[errno]);
             closelog();
             exit(1);
       }

       /* La ligne est ouverte, donc DTR est haut.
          On le force tout de meme pour plus de surete */
       ioctl(fd, TIOCMBIS, &dtr_bit);

       /* On passe en daemon. */
       switch(fork()) {
             case 0: /* Fils */
                     closelog();
                     setsid();
                     break;
             case -1: /* Erreur */
                     syslog(LOG_ERR, 'Impossible de forker.');
                     closelog();
                     exit(1);
             default: /* Pere */
                     closelog();
                     exit(0);
       }

       /* On relance syslog. */
       openlog('powerd', LOG_CONS, LOG_DAEMON);

       /* Maintenant, on echantillonne la ligne DCD */
       while(1) {
             /* On lit le statut. */
             ioctl(fd, TIOCMGET, &flags);

             /* On controle la connexion.
                DSR doit etre haut */
             tries = 0;
             while((flags & TIOCM_DSR) == 0) {
                     /* On continue a essayer, et on previent
                        toutes les deux minutes */
                     if ((tries % DSR_TRIES) == 0)
                         syslog(LOG_ALERT, 'Erreur de connexion onduleur');
                     sleep(DSR_SLEEP);
                     tries++;
                     ioctl(fd, TIOCMGET, &flags);
             }
             if (tries > 0)
                     syslog(LOG_ALERT, 'Connexion onduleur OK');

             /* On calcule l'etat en cours. */
             DCD = flags & TIOCM_CAR;
             CTS = flags & TIOCM_CTS;

             if (status == -1)
                     {
                     status = (DCD != 0) ? 0 : 1;
                     if (DCD == 0)
                             {
                             syslog(LOG_ALERT, 'Coupure de courant. Onduleur actif.');
                             powerfail(1);
                             }
                     }

             switch (status)
                     {
                     case 0:
                             if ((DCD != 0) && (CTS != 0))
                                     {
                                     DCD_count = 0;
                                     CTS_count = 0;
                                     sleep(T0_SLEEP);
                                     continue;
                                     }
                             if (DCD == 0)
                                     DCD_count++;
                             if (CTS == 0)
                                     CTS_count++;
                             if ((DCD_count < T0_DCD) && (CTS_count < T0_CTS))
                                     {
                                     sleep(1);
                                     continue;
                                     }
                             if (CTS_count == T0_CTS)
                                     {
                                     status = 2;
                                     syslog(LOG_ALERT, 'Batteries faibles !');
                                     break;
                                     }
                             status = 1;
                             DCD_count = 0;
                             syslog(LOG_ALERT, 'Coupure de courant. Onduleur actif.');
                             break;

                     case 1:
                             if ((DCD == 0) && (CTS != 0))
                                     {
                                     DCD_count = 0;
                                     CTS_count = 0;
                                     sleep(T1_SLEEP);
                                     continue;
                                     }
                             if (DCD != 0)
                                     DCD_count++;
                             if (CTS == 0)
                                     CTS_count++;
                             if ((DCD_count < T1_DCD) && (CTS_count < T1_CTS))
                                     {
                                     sleep(1);
                                     continue;
                                     }
                             if (CTS_count == T1_CTS)
                                     {
                                     status = 2;
                                     syslog(LOG_ALERT, 'Batteries faibles !');
                                     break;
                                     }
                             status = 0;
                             DCD_count = 0;
                             CTS_count = 0;
                             syslog(LOG_ALERT, 'Courant present.');
                             break;

                     case 2:
                             sleep(1);
                             continue;

                     default:
                             break;
                     }

             powerfail(status);
       }
       /* N'arrive jamais */
       return(0);
     }

  88..44..  TTrruusstt UUPPSS 440000--AA

  J'ai recu un message a propos du Trust UPS 400-A.  Je ne sais  pas  si
  c'est le meme que le Trust Energy Protector 400, donc voici le message
  (-- (NdT : le texte qui suit a ete reformate.  Le  document  d'origine
  comporte une copie de courrier electronique)--)

   :

  Marcel Amerlaan

  16 juillet 1997

     ddiissppoonniibbiilliittee
        Cet  onduleur ne semble plus etre fabrique par son constructeur,
        mais cela ne veut pas dire qu'il ne soit plus disponible :  j'ai
        achete le mien tres peu cher il y a seulement un mois.  De plus,
        cette entreprise reetiquette souvent ses produits.

     ccaabbllee
        Il est facile a fabriquer  a  l'aide  du  cable  d'origine  pour
        powerd et de la documentation de Trust.

        Il presente deux ameliorations :

     +o  indication de batterie faible ;

     +o  extinction de l'onduleur.

     Type               : "pleur"
     Cable power        : {TIOCM_DTR, 0}
     Inverter Kill      : {TIOCM_RTS, 1}
     Inverter Kill Time : 5
     Power Check        : {TIOCM_CTS, 0}
     Battery Check      : {TIOCM_CAR, 0}
     Cable Check        : {TIOCM_RI,  0}

     La  fonction  "cable  check"  n'est  pas utilisee car l'onduleur ne
     semble pas la reconnaitre.

     ccoonncclluussiioonn
        Voila tout  ce  que  je  crois  savoir.   Si  vous  voulez  plus
        d'informations   sur   l'onduleur,  le  cable  ou  le  logiciel,
        contactez-moi.

        Et souvenez-vous que tout ce qui est decrit ici fonctionne  pour
        moi mais je ne garantis pas que ce soit le cas pour vous.

          Marcel Ammerlaan
          CEO Pleursoft (cela explique le nom du cable, n'est-ce pas :-)
          Pays Bas

  88..55..  SSuussttaaiinneerr SS--4400aa

  Informations sur le Sustainer S-40a (-- (NdT : le texte qui suit a ete
  reformate. Le  document  d'origine  comporte  une  copie  de  courrier
  electronique)--)

   :

  Evgeny Stambulchik

  10 septembre 1995

     eennvviirroonnnneemmeenntt
        Sustainer  S-40a  avec  le paquetage unipower (recemment renomme
        genpower), cable maison (cf. infra).  J'ai envoye une  copie  de
        tout  ca  a  Tom Webster, l'auteur du paquetage, et cela devrait
        apparaitre dans la nouvelle version.

     ccaabbllee

     +o  Note : les  broches  d'arret  indiquees  dans  la  documentation
        technique  (4  et  6)  sont incorrectes. Les bonnes sont 6 et 7,
        comme sur le schema joitnt ;

     +o  Note 2 : les broches cote  PC  entre  parenthese  sont  pour  un
        connecteur 25 broches, les autres pour un 9 broches.

                  COTE ONDULEUR                         COTE LINUX

                    2 COUPURE DE COURANT                         1 (8)
               +----o----------------------------+------------------o  DCD
               |                                 |
               o                                 |
                /                                |
               /                                 |
               |    4 MASSE COMMUNE              |               5 (7)
               +----o-------------+--------------|------------------o  GND
               |                  |              |
               \                  |              |
                \                 |              |
               o                  |              |
               |    5 BATTERIE    | FAIBLE       |               8 (5)
               +----o-------------|--------------|--------+---------o  CTS
                                  |              |        |
                                  |            +-+-+    +-+-+
                                  |            |   |    |   |
                                  | Resistances|   |    |   |
                                  |            |   |    |   |
                                  | 3 x 10 kohm|   |    |   |
                                  |            +-+-+    +-+-+
                                  |              |        |      4 (20)
                                  |              +--------+---------o  DTR
                                  |
      |             6 ARRET DE    | L'ONDULEUR    +-------+      7 (4)
      +-+       +---o-------------|---------------+       +---------o  RTS
        \       |                 |               +-------+
         \|    -+-                |
          | <- \ /                |
         /|    -+-                |
       /        |   7             |
       |        +---o-------------+
     --+--
      ---
       -

     ffiicchhiieerr uunniippoowweerrdd..hh

     /************************************************************************/
     /* Fichier              : unipowerd.h                                   */
     /* Programme            : unipowerd                   Version: 1.0.0    */
     /* Auteur               : Tom Webster <webster@kaiwan.com>              */
     /* Creation             : 1994/04/20                                    */
     /* Modification         : Tom Webster                 Date: 1995/04/09  */
     /* Modification         : Evgeny Stambulchik (pour onduleur Sustainer)  */
     /*                                                                      */
     /* Compilation          : GCC 2.5.8                                     */
     /* Compilateur          : Linux 1.0.9                                   */
     /* ANSI C Compatible    : Non                                           */
     /* POSIX Compatible     : Oui ?                                         */
     /*                                                                      */
     /* But                  : Fichier d'entete pour unipowerd.              */
     /*                      : Contient les informations de configuration    */
     /*                      : de unipowerd. Editez ce fichier comme indique */
     /*                      : pour activer les fonctionnalites et ajuster   */
     /*                      : unipowerd pour votre onduleur.                */
     /*                                                                      */
     /* Copyright            : GNU Copyleft                                  */
     /************************************************************************/

     /* Lignes de controle RS232                       */
     /*                                                */
     /*                                            D D */
     /*                                            T C */
     /* Macro           Anglais                    E E */
     /* ---------------------------------------------- */
     /* TIOCM_DTR       DTR - Data Terminal Ready  --> */
     /* TIOCM_RTS       RTS - Ready to send        --> */
     /* TIOCM_CTS       CTS - Clear To Send        <-- */
     /* TIOCM_CAR       DCD - Data Carrier Detect  <-- */
     /* TIOCM_RNG       RI  - Ring Indicator       <-- */
     /* TIOCM_DSR       DSR - Data Signal Ready    <-- */

     #define HIGH            (1)
     #define LOW             0
     #define PWRSTAT         '/etc/powerstatus'
     #define UPSSTAT         '/etc/upsstatus'

     /* CABLEPOWER est la ligne qui alimente le cable  */
     /* pour la surveillance normale.                  */
     #define CABLEPOWER      TIOCM_DTR

     #define POWERBIT        TIOCM_CAR
     #define POWEROK         HIGH

     /* CABLECHECK vaut 1 pour surveiller la batterie ??*/
     /* CABELCHECK vaut 0 pour ne rien surveiller       */
     #define CABLECHECK      0
     #define CABLEBIT        TIOCM_RNG
     #define CABLEOK         HIGH

     /* BATTCHECK vaut 1 pour surveiller la batterie    */
     /* BATTCHECK vaut 0 pour ne rien surveiller        */
     #define BATTCHECK       1
     #define BATTBIT         TIOCM_CTS
     #define BATTOK          HIGH

     /* INVERTERKILL vaut 1 pour gerer l'arret de l'onduleur   */
     /* INVERTERKILL vaut 0 pour ne rien gerer.                */
     /* INVERTERBIT est la ligne qui eteint l'onduleur en      */
     /*    mode powerfail.                                     */
     /* INVERTERTIME est la duree en secondes de maintien haut */
     /* de la ligne INVERTERBIT en haut pour eteindre.         */
     #define INVERTERKILL    1
     #define INVERTERBIT     TIOCM_RTS
     #define INVERTERTIME    5

     /************************************************************************/
     /* Fin du fichier unipowerd.c                                           */
     /************************************************************************/

     ffiicchhiieerr ggeennppoowweerrdd..hh
        Pour la nouvelle version du logiciel (_g_e_n_p_o_w_e_r_d), je pense qu'il
        faut ajouter la ligne suivante :

          /* Evgeny's Sustainer S-40A */
          {'sustainer', {TIOCM_DTR,0}, {TIOCM_RTS,1}, 5, {TIOCM_CAR,0}, {TIOCM_CTS,0},
          {0,0}}

  88..66..  SSyysstteell

  Une autre  entreprise  israelienne.   Je  ne  leur  ai  jamais  achete
  d'onduleur,  mais  il  m'ont  for aimablement fourni une documentation
  detaillee sur leur port  de  communication.   Il  devrait  etre  assez
  facile de controler leur onduleur.  Leur numero de telephone est :

  972-8-409-019 (fax 972-8-407-216).

  88..77..  DDeelltteecc PPoowweerr,, FFiisskkaarrss PPoowweerr SSyysstteemmss eett EExxiiddee

  Fiskars  est une holding finnoise, anciennement proprietaire de Deltec
  Power.  En mars 1996, Fiskars a vendu Deltec Power a Exide.   A  cette
  date, Deltec Power etait l'un des plus gros constructeurs d'onduleurs.

  Avec Fiskars, Deltec fabriquait les PowerServers 10, 20, 30 et 40.  La
  page web de Deltec Power en mentionne d'autres.

  Exide  joint maintenant un logiciel de controle avec ses onduleurs qui
  fonctionne sous Linux.   Ils  vendent  aussi  celui-ci  separement  et
  affirment qu'il fonctionne avec d'autres onduleurs aussi.

  J'aimerais avoir des nouvelles de gens qui utilisent ce logiciel.

  Voici l'annonce qu'ils m'ont envoyee par e-mail :

  Exide Electronics annonce Lansafe III, logiciel de gestion d'onduleurs
  sous Linux.

  Lansafe III est une application de gestion d'onduleurs.   Elle  permet
  l'arret  automatique du systeme en cas de coupure de courant de longue
  duree qui depasserait l'autonomie de la batterie de l'onduleur.

  Lansafe III permet les messages "broadcast" et  l'envoi  de  courriers
  electroniques  en  fonction  des  reglages  utilisateur.   La sequence
  d'arret peut aussi etre parametree.

  Lansafe III fonctionne avec la plus grande partie des onduleurs  Exide
  Electronics.   Il  permet  aussi  l'arret  automatique simple avec des
  onduleurs d'autres constructeurs.

  Lansafe III pour Linux fonctionne sur les systemes Linux a base Intel.
  Deux interfaces sont fournies : mode caracteres et X11/Motif.

  Lansafe III fonctionne sur toutes les plateformes majeures de systemes
  d'exploitation : Linux, IBM  AIX,  HP  UX,  Digital  Unix,  SCO  Unix,
  Solaris,  SunOS,  AT&T  Unix,  toutes  les  plateformes Windows, OS/2,
  Novell et Macintosh en particulier.

  Lansafe III est fourni avec les onduleurs Exide suivant :

  +o  OneUPS Plus ;

  +o  NetUPS ;

  +o  PowerWare Prestige ;

  +o  PowerWare Profile ;

  +o  PowerWare Plus 5xx.

  Il est aussi fourni avec les onduleurs FPS Power Systems :

  +o  PowerRite Plus ;

  +o  PowerRite Max ;

  +o  PowerWorks A30 ;

  +o  PowerWorks A40 ;

  +o  series 9 000 ;

  +o  series 10 000.

  Il est aussi possible d'acquerir une licence logicielle  separee  pour
  l'utilisation  d'un  onduleur  plus ancien ou d'un autre constructeur.
  Les  licences  simples  sont  a  USD  149,  des  licences  site   sont
  disponibles.

  Pour tout detail, visitez nos sites web : www.exide.com,

  www.fiskarsUPS.com et www.deltecpower.com

  Accessoirement,    lorsque    j'ai    tente    de   me   connecter   a
  www.fiskarsUPS.com, il m'a ete demande une identification et un mot de
  passe.

  88..88..  OOnndduulleeuurr BBeeaavveerr mmooddeellee UUBB550000

  Dan Fandrich ecrit :

  Je  pense  avoir  reussi a faire fonctionner mon vieil onduleur Beaver
  modele UB500  avec  genpower.   L'interface  utilise  des  niveaux  de
  tension  compatibles RS-232, donc l'installation est simple.  Ily a un
  connecteur DB-9 femelle a l'arriere qui se connecte  directement  dans
  un port serie DB-9 de PC a l'aide d'un cable droit.

  Les interrupteurs DIP permettent quelques ajustements.  Pour emuler le
  type d'onduleurs apc1-nt de genpower,  ils  doivent  etre  positionnes
  comme suit :
  +o  1 on (CTS = coupure de courant) ;

  +o  2 off (CTS = batterie faible) ;

  +o  3 off (DSR = coupure de courant) ;

  +o  4 off (DSR = batterie faible) ;

  +o  5 off (CD = coupure de courant) ;

  +o  6 on (CD = batterie faible) ;

  +o  7 off (RI = coupure de courant) ;

  +o  8 off (RI = batterie faible) ;

  +o  9 on (DTR = extinction) ;

  +o  10 off (RTS = extinction).

  Les interrupteurs forment des groupes de paires adjacentes pour chaque
  broche de sortie.  Ils sont exclusifs mutuellement - ne tentez pas  de
  positionner  ON  les  5  et  6 ensemble, par exemple, ou vous ferez un
  court-circuit entre les signaux coupure de courant et batterie faible.

  C'est  tout  ce  qu'il  y  a a dire.  Vous pouvez ajouter cela a votre
  documentation.

  88..99..  SSeennddoomm

  Charli ecrit :

  J'ai connecte un onduleur Seldom avec powerd.  Peut-etre  que  ce  qui
  suit sera utile avec d'autres onduleurs.

  J'ai utilise le diagramme de la page de man de _p_o_w_e_r_d :

             9 broches  25 broches

       DTR       4         20       ----------
                                     |       >
       DSR       6          6       --       < 10k
                                             >
       DCD       1          8       -------------------
                                                   relais
       GND       5          7       -------------------

  En  fait, l'onduleur seldom n'utilise pas de relais mais quelque chose
  d'autre et fonctionne dans un sens, _m_a_i_s _p_a_s _d_a_n_s _l_'_a_u_t_r_e.  Si donc le
  cable ne fonctionne pas, il faut essayer d'inverser les broches sur le
  "relais".

  88..1100..  BBeesstt

  L'information sur les onduleurs Best est disponible sur le site web de
  Best  Power.   Leur  site  contient  un paquetage checkup.tar (section
  ``Logiciels'') de communication avec leurs onduleurs,  aussi  bien  en
  modes  intelligent  que  bate, fourni en sources, donc compilable sous
  Linux.

     BBeesstt FFoorrttrreessss aavveecc llee llooggiicciieell ddee BBeesstt
        Mini-Howto des onduleurs Best Power

        par Michael Stutz et http://dsl.org/m.

        Version 1.0, 14 aout 1997

  88..1100..11..  AAvveerrttiisssseemmeenntt

  Copyright 1997 Michael Stutz (-- NdT : la traduction de ce  paragraphe
  est  fournie  a  titre indicatif au lecteur.  Se reporter a la version
  originale pour les termes exacts.--)  ; cette information est libre  ;
  elle  peut  etre  redistribuee  et/ou  modifiee selon les termes de la
  Licence Publique Generale GNU (GPL) version 2 ou (a votre  preference)
  ulterieure,  pour autant que la presente phrase soit conservee ; cette
  information est fournie SANS AUCUNE GARANTIE ; sans meme  de  garantie
  implicite  d'adaptation a un besoin particulier ; se reporter a la GPL
  de GNU pour plus de details.

  88..1100..22..  IInnttrroodduuccttiioonn

  Best Power est constructeur d'onduleurs  de  haute  qualite,  et  leur
  serie  Fortress  est  particulierement bien adaptee a des utilisateurs
  habituels de Linux.  Bien que ses produits ne soient actuellement  pas
  aussi  bon  marche  que certains autres (comme ceux d'APC), Best Power
  fournit le code source de son logiciel et a ete tres reactif quant aux
  questions posees par des utilisateurs de Linux.  De plus, son materiel
  semble choisi souvent par les consommateurs, ce qui  en  fait  un  bon
  choix pour les utilisateurs de Linux.

  Ce  document  decrit  l'installation d'un onduleur Best Power Fortress
  (le modele utilise est un 660a de 1996 accompagne de son  CD-ROM)  sur
  une machine Linux.

  88..1100..33..  IInnssttaallllaattiioonn

  88..1100..33..11..  MMaatteerriieell

  Installez  l'onduleur  comme indique par les instructions.  Les series
  _F_o_r_t_r_e_s_s de Best Power sont fournies avec un cable  RS-232  destine  a
  etre connecte a un port serie libre a l'ariere de l'ordinateur.

  88..1100..33..22..  LLooggiicciieell

  Voici  ce  qui  differe  du  manuel,  qui ne contient pas actuellement
  d'instructions  specifiques  pour  Linux.   En  revanche,  le   CD-ROM
  d'accompagnement   conient   avec   le  code  source  du  logiciel  de
  l'onduleur, ce qui en rend la mise en  oeuvre triviale.

  Pour realiser celle-ci, suivez les etapes ci-dessous, et  utilisez  le
  manuel   comme   reference  pour  avoir  une  vue  d'ensemble  sur  le
  fonctionnement general du logiciel.  J'ai pris  la  liberte  de  faire
  quelques  modifications dans ce HOWTO sur la configuration du logiciel
  _F_o_r_t_r_e_s_s pour Unix d'une maniere qui  me  semble  plus  adaptee  a  un
  systeme Linux.  Par exemple, j'ai elimine la necessite d'un repertoire
  /etc/best, et place les executables dans /usr/local/bin qui me  semble
  un endroit plus approprie.

  +o  D'abord, creez le script "upsdown" destine a etre execute lors d'un
     arret secteur.  Celui-ci va arreter le systeme :

       cat > /etc/upsdown <<EOF
       #!/bin/sh
       shutdown -h now < /dev/console &
       EOF

  +o  Maintenant, creez les repertoires pour la documentation et le  code
     source :

       mkdir /usr/doc/best
       mkdir /usr/local/src/best

  +o  Montez  le CD-ROM, et desarchivez le fichier unix/checkups.tar dans
     un repertoire temporaire :

       cd /tmp
       tar /cdrom/unix/checkups.tar

  +o  Allez dans le repertoire etc/best/advanced qui doit avoir ete  cree
     dans le repertoire temporaire a partir de l'archive ;

  +o  Copiez la documentation et les fichiers script a leurs emplacements
     idoines dans le systeme :

       cp README /usr/doc/best
       cp manual.txt /usr/doc/best
       cp bestsend /etc
       cp source/*.c /usr/local/src/best

  +o  Nettoyez le chantier dans le repertoire temporaire et  compilez  le
     logiciel :

  cd /usr/local/src/best
  rm -R /tmp/etc
  gcc -o checkups checkups.c
  gcc -o mftalk mftalk.c
  mv checkups /usr/local/sbin
  mv mftalk /usr/local/sbin

  +o  Testez  l'onduleur.   Remplacez  ttySx  par  le port serie de votre
     choix.  Si votre connexion est bonne, vous devriez voir  une  ligne
     de caraceres s'imprimer a l'ecran :

       mftalk /dev/ttySx

  +o  Rendez  le  programme  checkups  executable  au  demarrage  pour le
     tester.  Cela peut etre realise d'un  certain  nombre  de  manieres
     differents  (decrites  dans  le  manuel).   Celle que j'ai utilisee
     consiste a ajouter une ligne dans /etc/inittab :

       ups:234:once:/usr/local/sbin/checkups -c500 /dev/ttyS1

  +o  Testez le tout.  Supprimez l'alimentation secteur de l'onduleur  en
     retirant  le  fusible  de l'onduleur, et attendez quelques minutes.
     Le logiciel affiche un message  d'alerte  puis  arrete  le  systeme
     apres quelques instants.

  +o  Si  cela  fonctionne,  retirez  l'option -c500 de la ligne de votre
     inittab (qui en gros implique d'arreter le systeme systematiquement
     au  lieu  de ne le faire que lorsque le courant est coupe), et vous
     pouvez rouler !

  88..1100..33..33..  CCoonncclluussiioonn

  Toute suggestion permettant d'ameliorer ce document ou les  techniques
  qui  y  sont  decrites  est  la bienvenue.  A l'instant ou j'ecris ces
  lignes, _B_e_s_t _P_o_w_e_r semblait interesse par l'inclusion de  la  presente
  information   ou   d'une   autre  dans  la  sienne  afin  d'aider  les
  utilisateurs de Linux par rapport  a  ses  produits,  il  s'agit  donc
  reellement d'une entreprise a promouvoir.  Vous pouvez lui transmettre
  vos impressions a sales@bestpower.com et support@bestpower.com.

     BBeesstt FFoorrttrreessss LLII--995500

        Quelques commentaires  sur  le  _B_e_s_t  _F_o_r_t_r_e_s_s,  de  Leonard  N.
        Zubkoff,  message du 25 mai 1995 dans comp.os.linux.hardware (--
        (NdT : le texte qui suit a ete reformate. Le document  d'origine
        comporte une copie de message de forum)--)

         :
        Citation de nautix@community.net :

        D'accord  avec ce que dit Craig.  APC a ete tres peu cooperatif,
        mais je n'ai que de bonnes choses a dire  sur  Best.   J'utilise
        son modele LI 660 ; 660 VA, des tas d'indications sur le panneau
        frontal, etc.  Le logiciel CheckUPS est  en  option  payante  et
        necessite quelques bidouillages pour entrer dans mons systeme de
        fichiers FSSTND-ise (NdT : File System STaNDard, le standard  de
        repartition  des  elements  dans  les repertoires preconise pour
        Linux) (les repertoires et noms de fichiers  sont  en  dur  pour
        SunOS  4.1.x).   Je  serai heureux de vous envoyer mes diffs, si
        vous les voulez (j'adore quand un constructeur fournit le source
        en tant que pratique commerciale normale !!).

        Le  logiciel  CheckUPS  est  limite,  cependant,  a realiser des
        arrets automagiques (NdT : automagic dans le texte).  L'onduleur
        peut  fournir  des tas d'informations sur son etat ; CheckUPS ne
        controle que "Si le courant est coupe, combien de  temps  reste-
        t'il d'autonomie a la batterie ?".

        Best  suit  aussi  ses  questionnaires  de satisfaction clients.
        J'ai indique ma deception que CheckUPS ne dispose pas de plus de
        fonctions  d'interrogation  (comme  le  voltage  en  entree,  en
        sortie, le pourcentage de charge, etc.) qui sont disponibles  en
        entree.   J'ai  demande  les specifications de l'interface ; ils
        ont  dit  :  "bien  sur"  et  me  l'ont  envoye  en   2   jours,
        gracieusement.   Un  controleur d'etat de l'onduleur complet est
        dans ma casserole de derriere.  Quelqu'un voit-il une utilite  a
        ce genre d'utilitaire ?

        Reponse de Leonard N. Zubkoff :

        Laissez-moi  ajouter  une  autre recommandation pour Best Power.
        Je viens d'acheter un Fortress LI-950, mais  j'ai  decline  leur
        offre  logicielle  pour  CheckUPS.   Contrairement  a  certaines
        autres gammes, un simple cable trois fils suffit a connecter  le
        Fortress  a  un  port serie -- pas besoin de montage "pull-up" a
        faire dans le cable.  Quelques minutes de bidouillage et j'avais
        un  programme  qui  fait a la fois daemon d'arret systeme et qui
        coupe le courant de sortie ensuite lorsque le systeme est arrete
        durant une periode sur batterie.

        Je  pourrais  eventuellement  utiliser le mode de communications
        serie plus intelligent plutot que le simple mode de contact,  et
        j'ai donc demande la documentation au support technique de Best,
        et il est arrive  aujourd'hui,  une  semaine  apres  mon  appel.
        Apres  avoir etudie celle-ci, je deciderai si une interface plus
        intelligente est reellement interessante, en particulier puisque
        dans  certains  cas  j'aurais  besoin d'arreter deux machines en
        reseau partageant l'onduleur.

        Leonard.

     BBeesstt FFeerrrruuppss

        En complement a la documentation et au logiciel sur le site  web
        de    _B_e_s_t,    vous   pouvez   aussi   utiliser   le   paquetage
        bestups-0.9.tar.gz (section  ``Logiciel'').   Nous  avons  juste
        commence a le tester avec notre _F_e_r_r_u_p_s 5 kVA.

        L'idee  de base est qu'il y a deux modules.  L'un qui recoit des
        demandes d'information du port reseau, les relaie a  l'onduleur,
        et  renvoit  les  resultats.  Le second module parle au premier,
        interprete les resultats, et repond OK ou FAIL.

        C'est suffisant pour que le paquetage powerd-2.0.tar.gz (section
        ``Logiciel'') fasse le reste.

        Les details se trouvent dans le paquetage lui-meme.

        Par  ailleurs,  notre  _F_e_r_r_u_p_s  5 kVA a fonctionne sans histoire
        pour nos 10 ordinateurs et  30 ecrans.

  88..1111..  GGPPSS11000000 dd''AACCCCOODDAATTAA

     >From hennus@sky.nl.mugnet.org Thu Mar 10 15:10:22 1994
     Newsgroups: comp.os.linux.help
     Subject: Re: shutdown automatique avec un onduleur
     From: hennus@sky.nl.mugnet.org (Hennus Bergman)
     Date: Tue, 1 Mar 1994 22:17:45 GMT
     Distribution: world
     Organization: The Organization For Removal Of On-Screen Logos

     Dans l'article <CRAFFERT.94Feb28125452@nostril.lehman.com>,
     Colin Owen Rafferty <craffert@nostril.lehman.com> ecrit :
     >Je suis pret a acheter un onduleur pour ma machine, et j'en
     >voudrais un qui sache faire un "auto-shutdown".
     >
     Je viens d'en acheter un vraiment pas cher :-)
     C'est un GPS1000 d'ACCODATA. Tout le monde connait la bonne qualite
     de leur production (je n'ai pas d'actions chez eux :-() ?

     >Je suppose que tous ont une sorte de connexion serie qui previent le
     >systeme de cela.
     >
     Je l'ai pris a part pour trouver comment il fonctionnait. Il y avait
     trois optocoupleurs (deux sorties, une entree) connectes sur un connecteur
     a 9 broches a l'arriere. L'un s'allume lorsque le courant est coupe, et
     s'eteint lorsque ce dernier revient. Durant ce temps, on peut utiliser
     l'"entree" pour arreter la batterie (il relache le relais de puissance).
     Le troisieme est une sorte d'acquittement de la commande d'arret. Je
     pense que l'interface de mon onduleur a ete concue pour etre connectee
     a des niveaux TTL, mais avec quelques resistances il peut etre connecte a
     un port serie. Il est branche de telle sorte qu'avec un port RS-232 on
     ne puisse utiliser les deux optocoupleurs de sortie; mais l'acquittement
     de la commande d'arret n'est pas vraiment necessaire. On peut se conten-
     ter de celui qui est important (Notez qu'il est possible de faire fumer
     la partie transistor des optocoupleurs avec des niveaux RS-232 si on
     le branche mal). ;-)

     J'esperais etre capable de le connecter a mon port de jeux inutilise,
     mais ce dernier n'a pas de sortie, n'est-ce pas_?
     Je vais probablement finir par mettre un port parallele supplementaire
     pour ca.

     Tous les onduleurs n'utilisent pas d'optocoupleurs, certains se contentent
     de simple relais, qui sont moins difficiles a connecter, mais bien sur,
     pas aussi `elegants'.

     >Quelqu'un a-t-il ecrit un paquetage qui surveille l'onduleur et effectue
     >un shutdown (ou similaire) lorsque le courant s'arrete ?
     SysVinit-2.4 (et probablement 2.5 aussi bien) a un demon `powerd' qui
     surveille le port serie en continu et previent init quand CD (Detection
     de porteuse) tombe. Init active ensuite un shutdown avec un delai. Si le
     courant revient apres quelques minutes, le shutdown est arrete. Tres beau.
     Le seul probleme que j'aie eu avec est qu'il ne dit pas a l'onduleur de
     s'arreter lorsque le shutdown est fini. Il attend simplement la avec une
     invite root. Je vais probablement ecrire un petit programme pour l'arreter
     >depuis /etc/brc. RSN.

     >    Colin Rafferty, Lehman Brothers <craffert@lehman.com>

     Hennus Bergman

  88..1122..  TTrriippppLLiittee BBCC775500LLAANN ((SSttaannddbbyy UUPPSS))

  Tom  Webster,  l'auteur  du  paquetage  _g_e_n_p_o_w_e_r,   m'a   envoye   des
  informations  sur  le  _T_r_i_p_p_L_i_t_e  _B_C_7_5_0_L_A_N.  Si vous avez l'un d'entre
  eux, c'est probablement le meilleur paquetage pour commencer.

  Mais pour etre exhaustif, voici le  diagramme  de  brochage  du  cable
  (realise par tatonnements, et sans documentation) :

              Onduleur              Systeme
                DB-25               DB-25
                  1 <-------------->  1       Masse

                  2 <-------------->  4       Coupure de secteur
                  8 <-------------->  8       Circuit de detection

                  3 <-------------->  2       Inverseur d'arret
                 20 <--------------> 22       Circuit

  88..1133..  AAPPCC

  Si  la  plethore  de  paquetages  pour  APC  cites  plus  haut ne vous
  permettent pas de demarrer, il est possible que la  section  qui  suit
  soit d'une certaine utilite.

     BBaacckkuupp--UUPPSS

        Il  semble qu'il y ait une certaine controverse sur la fiabilite
        des informations indiquees ici sur les APC Back-UPS, donc, soyez
        prudent.    Je   preface   cette   section   avec   un   message
        d'avertissement que j'ai recu.  Il peut ne pas prendre tout  son
        sens  tant  que le reste de la section n'est pas lu, mais ainsi,
        au moins vous aves plus de chances de le voir.  Et,  a  nouveau,
        comme  je  n'ai  aucun  onduleur  APC,  je  ne  peux verifier la
        fiabilite d'aucun de ces messages.

     UUnn mmeessssaaggee dd''aavveerrttiisssseemmeenntt

        Message de Marek Michalkiewicz sur le BUPS-HOWTO (-- (NdT  :  le
        texte  qui  suit a ete reformate. Le document d'origine comporte
        une copie de courrier electronique)--)

         :

        Si vous voulez connecter un  onduleur  APC  Back-UPS  sur  votre
        machine Linux, ce qui suit peut vous interesser.

        Il  y  a un bon BUPS-HOWTO qui decrit comment le faire.  Mais il
        comporte un "bug".

        Le signal RTS du port serie est utilise pour arreter l'onduleur.
        Celui-ci  ne  s'arretera  que  s'il  travaille sur batterie.  Le
        manuel indique que le le signal  d'arret  doit  durer  au  moins
        0,5ms.  Mais un temps inferieur est suffisant, au moins pour mon
        propre APC Back-UPS 600.

        L'utilisation de RTS peut etre dangereuse, car  ce  dernier  est
        monte  a  l'ouverture du peripherique.  Le programme backupsd le
        redescend ensuite, mais il reste haut un moment.  Cela coupe  le
        courant  lors  du  premier  lancement  de  backupsd s'il y a une
        coupure secteur a ce  moment  precis.   Cela  peut  arriver  par
        exemple  si  l'onduleur  est  eteint, et que le courant revienne
        seulement pour un moment.

        Soit il faut lancer backupsd avant de  monter  les  systemes  de
        fichiers  en  lecture/ecriture, soit (de preference) utiliser TX
        (broche 3) plutot que RTS (broche 7)  pour  eteindre  l'onduleur
        (la  numerotation est pour un DB-9).  On peut utiliser ioctl(fd,
        TCSBRKP, 10); pour monter TX pendant une seconde,  par  exemple.
        L'utilisation  de TX doit etre plus sure.  Je posterai peut-etre
        les diff si le temps me le permet...

     BBUUPPSS--HHOOWWTTOO

        Luminated Software Group Presente

        HOWTO utilisation d'onduleurs _B_a_c_k_-_U_P_S  (d'_A_P_C)  (pour  proteger
        votre systeme Linux)

        Version: 1.01  BETA

        Document  de : Christian G. Holtje Information sur le cablage et
        aide : Ben Galliart

        Adaptation francaise : Bernard Choppy

        Ce document est place dans le Domaine Public  a  une  condition.
        Celle-ci  est  que  ce  qui appartient a Cesar revienne a Cesar.
        Modifiez ceci autant que vous voulez, rappelez  juste  que  nous
        avons travaille dessus.

        AAtttteennttiioonn !!

        Ni  moi, ni aucun de ceux qui on ecrit ou aide a ce document, ne
        garantissons    quoi    que    ce    soit     concernant     ces
        textes/sources/indications.   Si quoi que ce soit est endommage,
        nous n'y sommes POUR RIEN !  Cela  fonctionne  POUR  AUTANT  QUE
        NOUS  LE  SACHIONS,  mais  nous  pouvons avoir fait des erreurs.
        Donc, soyez prudent !

        (-- NdT : Le  document  d'origine  contient  des  references  de
        pieces  detachees  Radio-Shack,  qui  etaient distribuees par le
        reseau Tandy  en  France.   Ce  reseau  n'existe  plus,  et  les
        references  ont donc ete supprimees de la version francaise.  Le
        lecteur neammoins interesse pourra  se  reporter  a  la  version
        anglaise du present document.--)

        Bien,  vous  venez  juste  d'acheter (ou vous allez le faire) un
        _B_a_c_k_-_U_P_S d'_A_P_C (d'autres modeles pourront  peut-etre  beneficier
        de ces informations, avec peu ou pas de modifications, mais nous
        ne savons pas).  Vous avez jete un coup d'oeil au prix du couple
        logiciel/cable  _P_o_w_e_r_-_C_h_u_t_e,  et  n'etes  pas  sur que le jeu en
        vaille la chandelle.  Bien, j'ai fait mon propre cable,  et  mon
        propre  logiciel  et je les utilise pour arreter automatiquement
        mon systeme Linux lors d'une coupure secteur.  Vous savez quoi ?
        Vous pouvez aussi !

        *** Le Cable ***
        C'etait  la  partie la plus difficile a imaginer (je m'y connais
        peu en hardware, donc Ben a fait le plus gros du travail).  Pour
        en  fabriquer  un,  vous  devez  acheter  ce qui suit chez votre
        marchand d'electronique du coin :

     +o  1 connecteur a souder subminiature male DB-9 ;

     +o  1 connecteur a souder subminiature femelle DB-9 ;

     +o  2 boitiers pour les connecteurs ci-dessus (vendus separement  en
        general) ;

     +o  Du cable multi-brins (pas du mono-brin).

        Il vous faut aussi, mais vous pourrez peut-etre l'emprunter :

     +o  un fer a souder ;

     +o  de la soudure.

        Ok...  Voici comment connecter le tout !

        Ces  diagrammes  montrent  le cote ARRIERE (celui ou vous soudez
        les cables sur les broches).  Les lettres V, R et B representent
        les  couleurs  des  cables  que  j'ai utilises, et facilitent la
        distinction des lignes (-- (Note  :  j'utilise  la  numerotation
        standard RS-232 (pour autant qu'on puisse dire)--)

        Le   manuel   de  l'_A_P_C  utilise  une  numerotation  differente.
        Ignorez-la !  Utilisez la notre...  Je l'ai  deja  changee  pour
        vous !).

             ---------------------     Cote Male (vers l'onduleur)
              \  B   R  *  *  * /
                \  *  *  *  V  /
                  ------------

             ---------------------     Cote femelle (vers le port COM)
              \  R   *  *  *  V /
                \  *  B  *  *  /
                  ------------

     Pour ceux qui preferent les chiffres :

                Male         Femelle
          ---------------------------------------
                  1             7        Bleu
                  2             1        Rouge
                  9             5        Vert

     ----  Complement  :  Utilisation  des broches RS-232 ! ---- Puisque
     nous avons eu a trouver cette information :

     Depuis  l'ARRIERE  (cote  soudure),  les  broches  sont  numerotees
     ainsi :

             ---------------------
              \  1   2  3  4  5 /
                \  6  7  8  9  /
                  ------------

     Les broches signifient

                  Numero  Nom                     Abreviation (parfois prefixee par D)
                  1       Detection de porteuse           CD
                  2       Reception de donnees            RD
                  3       Transmission de donnees         TD(?)
                  4       Terminal de donnees pret        DTR
                  5       Masse de signal                 Gnd
                  6       Jeu de donnees pret             DSR
                  7       Demande pour envoyer            RTS(?)
                  8       Pret a envoyer                  CS
                  9       Indicateur de sonnerie          RI

     Ce  que  nous  avons  fait etait la connexion de la ligne RS-232 de
     l'onduleur "Fail Output" sur CD, le chassis de l'onduleur sur  Gnd,
     et  l'entree "Shut Down" sur RTS.  Facile, maintenant qu'on vous le
     dit, non ?

     Je n'ai aucune idee du comportement du logiciel ci-dessous, si vous
     achetez le cable d'APC.  Il peut fonctionner, ou non.

     *** Le Logiciel ***

     J'utilise  le  paquetage  _S_y_s_V_I_n_i_t  de  Miquel van Smoorenburg pour
     Linux (voir a la fin pour emplacements, remerciements, adresses  E-
     mail,  etc.).   Je  ne  sais  ce qui doit etre change pour utiliser
     l'init de quelqu'un d'autre, mais je sais que ce  code  (qui  suit)
     fonctionne  avec  celui  de  Miquel.   Simplement ainsi je remercie
     comme je le dois.   J'ai  regarde  dans  le  code  de  Miquel  pour
     comprendre  comment ioctl() fonctionnait.  Si je n'avais pas eu cet
     exemple, j'aurais eu des problemes.  J'ai aussi utilise la  routine
     powerfail()  (telle  quelle,  je crois), puisqu'elle doit interagir
     avec init, j'ai pense qu'il devait savoir ca  mieux  que  moi.   Le
     fichier  .c  est  a  la  fin de ce document, et necessite seulement
     d'etre copie/colle.  Pour cela, supprimez simplement  tout  ce  qui
     n'est  pas  du  code.  Ce document doit se terminer par la ligne /*
     Fin de Fichier */...  Coupez le reste.

     Ce programme peut, soit etre  lance  comme  daemon  pour  controler
     l'etat  de  l'onduleur  et  l'indiquer a init, soit etre lance pour
     envoyer  la  commande   kill-power   (coupure   d'alimentation)   a
     l'onduleur.  L'alimentation ne sera coupee que s'il y a un probleme
     secteur et que l'onduleur est sur batteries.  Une fois  le  courant
     revenu, il se rallume.

     Pour le lancer comme demon, entrez simplement :

     backupsd /dev/backups

     /dev/backups  est un lien vers /dev/cua0 (COM 1, pour les DOSseurs)
     actuellement.  La beaute du lien est que je n'ai qu'a le refaire si
     je passe sur COM 2 ou COM 3.

     Ensuite,  si  le  secteur  s'arrete,  init lancera les commandes de
     powerwait.  Un exemple (qui vient de mon /etc/inittab) :

          #Voici les actions de coupure de courant
          pf::powerwait:/etc/rc.d/rc.power start
          po::powerokwait:/etc/rc.d/rc.power stop

     Powerwait sera lance si le  courant  baisse,  et  powerokwait  s'il
     revient.

     Voici mon rc.power complet :

          ___________________________________________________________________
          #! /bin/sh
          #
          # rc.power      Ce fichier est execute par init en cas de coupure de courant
          #
          # Version :     @(#)/etc/rc.d/rc.power   1.50    1994-08-10
          #
          # Auteur :      Christian Holtje, <docwhat@uiuc.edu>
          #

            # Definit le chemin
            PATH=/sbin:/etc:/bin:/usr/bin:/sbin/dangerous

            # Regarde comment nous avons ete appele
            case "$1" in
                  start)
                          echo "Attention - probleme d'alimentation secteur." | wall
                          # Sauvegarde le niveau de fonctionnement actuel
                          ps | gawk '{ if (($5 == "init") && ($1 == "1")) print $6 }' \
                                   | cut -f2 -d[ | cut -f1 -d] \
                                   > /tmp/run.level.power
                          /sbin/shutdown -h +1m
                          ;;
                  stop)
                          echo "Alimentation secteur revenue." | wall
                          echo "Tentative d'arret du shutdown." | wall
                          shutdown -c
                          ;;
                  *)
                          echo "Usage:  $0 [start|stop]"
                          exit 1
                          ;;
            esac
          ___________________________________________________________________

     Pas  mal,  non ?  En fait, il y a un petit probleme, la...  Je n'ai
     pas eu le temps de le trouver...  S'il  y  a  un  gourou  "sh"  par
     ici...

     J'ai  laisse  un  petit  detail  de  cote,  c'est  de  faire couper
     l'alimentation par l'onduleur si le PC est  arrete  courant  coupe.
     Cela  est  realise  en ajoutant la ligne suivante a la fin de votre
     script halt :

            /sbin/backupsd /dev/backups killpower

     Cela va simplement couper l'alimentation si le secteur est coupe.

     *** Tester le tout ***

     C'est juste une petite section pour vous dire :

     SOYEZ PRUDENT !

     Je vous recommande la sauvegarde  de  vos  partitions  Linux,  avec
     plusieurs  sync  avant  de  tester,  et  d'etre prudent en general.
     Evidemment, je ne fais que vous le recommander.  Je  n'ai  pas  ete
     prudent  du tout, et j'ai eu a nettoyer ma partition plusieurs fois
     pendant les tests de ma configuration.  Mais  celle-ci  fonctionne.
     :-)

     *** Ou l'obtenir ***

     Le  SysVInit  de  Miquel  van  Smoorenburg's  peut se trouver sur :
     SysVinit-2.50.tgz

     et une correction pour certains shell bash se trouve juste a cote :
     SysVinit-2.50.patch1

     Pour  ce  qui  est  d'obtenir ce HOWTO, vous pouvez m'envoyer un E-
     mail, docwhat@uiuc.edu avec pour sujet :'request'  et  le  mot-clef
     'backups'  dans le corps du message : Demande du HOWTO original (il
     est possible que j'automatise cela, et d'autres choses).

     *** Section des remerciements qui sont dus ***

     Merci a :

     +o  Miquel van Smoorenburg pour son superbe  paquetage  _S_y_s_V_I_n_i_t  et
        son powerd.c qui m'ont beaucoup aides ;

     +o  Christian  Holtje  Documentation backupsd.c (ce qui n'est pas de
        Miquel) rc.power ;

     +o  Ben Galliart Le cable, informations sur le  standard  RS-232  et
        astuces bruyantes (non rapportees ici).

     ___________________________________________________________________
     /*  backupsd.c -- Simple daemon pour lire les signaux de coupure de
      *                courant d'un onduleur Back-UPS (d'APC).
      *
      *  Certaines parties proviennent du powerd.c de Miquel van Smoorenburg
      *  D'autres sont originales de Christian Holtje <docwhat@uiuc.edu>
      *  Je crois qu'on peut dire que c'est dans le Domaine Public, simplement
      *  n'oubliez pas de citer les auteurs originaux, la ou c'est necessaire.
      *
      *  Avertissement : Nous ne garantissons RIEN de ce logiciel, ni
      *                  n'assumons aucune responsabilite concernant son
      *                  utilisation, bonne ou mauvaise.
      */

     #include <sys/types.h>
     #include <sys/ioctl.h>
     #include <fcntl.h>
     #include <errno.h>
     #include <stdlib.h>
     #include <unistd.h>
     #include <stdio.h>
     #include <signal.h>

     /* C'est le fichier necessaire pour SysVInit */
     #define PWRSTAT         "/etc/powerstatus"

     void powerfail(int fail);

     /* Programme principal */
     int main(int argc, char **argv)
     {
       int fd;
       int killpwr_bit = TIOCM_RTS;
       int flags;
       int status, oldstat = -1;
       int count = 0;

       if (argc < 2) {
             fprintf(stderr, "Usage: %s <peripherique> [killpower]\n", argv[0]);
             exit(1);
       }

       /* Ouverture du port */
       if ((fd = open(argv[1], O_RDWR | O_NDELAY)) < 0) {
             fprintf(stderr, "%s : %s : %s\n", argv[0], argv[1], sys_errlist[errno]);
             exit(1);
       }

       if ( argc >= 3  && (strcmp(argv[2], "killpower")==0) )
           {
               /* Coupons l'alimentation */
               fprintf(stderr, "%s : Tentative de coupure d'alimentation !\n",
                       argv[0] );
               ioctl(fd, TIOCMBIS, &killpwr_bit);
               /* Hmmm... Si vous avez une coupure d'alimentation, */
               /* ce code ne sera jamais execute */
               exit(0);
           }
       else
           /* Puisqu'il ne faut pas couper l'alimentation, il faut restaurer */
           /* RTS (killpwr_bit) */
           ioctl(fd, TIOCMBIC, &killpwr_bit);

     /* Passe en demon. */
       switch(fork()) {
       case 0: /* Je suis le fils */
                     setsid();
                     break;
       case -1: /* Passage demon manque */
                     fprintf(stderr, "%s : fork impossible.\n", argv[0]);
                     exit(1);
       default: /* Je suis le pere */
                     exit(0);
       }

       /* Maintenant, on scrute la ligne DCD */
       while(1) {
           ioctl(fd, TIOCMGET, &flags);
           status = (flags & TIOCM_CD);
           /* Si DCD est monte, le secteur est coupe */
           if (oldstat == 0 && status != 0) {
               count++;
               if (count > 3) powerfail(0);
               else { sleep(1); continue; }
           }
           /* Si DCD est redescendu, le secteur est revenu */
           if (oldstat > 0 && status == 0) {
               count++;
               if (count > 3) powerfail(1);
               else { sleep(1); continue; }
           }
           /* Reinit du compteur, sauvegarde de l'etat et sleep 2 secondes */
           count = 0;
           oldstat = status;
           sleep(2);
       }
       /* Erreur ! (ne doit pas arriver) */
       return(1);
     }

     /* Signale a init que le courant est coupe ou revenu */
     void powerfail(ok)
     int ok;
     {
       int fd;

       /* Cree le fichier necessaire a init pour shutdown/abandon */
       unlink(PWRSTAT);
       if ((fd = open(PWRSTAT, O_CREAT|O_WRONLY, 0644)) >= 0) {
             if (ok)
                     write(fd, "OK\n", 3);
             else
                     write(fd, "FAIL\n", 5);
             close(fd);
       }
       kill(1, SIGPWR);
     }

     /* Fin de Fichier */
     ___________________________________________________________________

     AAuuttrreess iinnffoorrmmaattiioonnss
        (-- (NdT : Le document original comporte de nombreuses copies de
        courriers electroniques a ce point. Le traducteur  s'est  permis
        d'en  realiser  une  synthese  plus courte et, il l'espere, plus
        facile a utiliser)--)

        Message   de   Jim   Ockers   du   12    janvier    1995    dans
        comp.os.linux.hardware :

        Selon  la base de connaissances (_K_n_o_w_l_e_d_g_e_B_a_s_e) de _M_i_c_r_o_s_o_f_t, il
        semble que la broche 5 du connecteur des onduleurs _A_P_C  _B_a_c_k_-_U_P_S
        et  _S_m_a_r_t_-_U_P_S (teste avec un _B_a_c_k_-_U_P_S _4_0_0 sous _W_i_n_d_o_w_s _N_T) monte
        un  signal  "batterie  faible"  deux  minutes  au  moins   avant
        l'epuisement de la batterie.

        Ce  signal  est  au niveau "TTL collecteur ouvert", et peut etre
        ramene aux niveaux RS-232 selon le schema suivant :

              Broche 5                 Broche 8
                        +---------+
                 o------| 10 kOhm |-------o
                        +---------+

     Par ailleurs, le manuel de l'onduleur stipule que la broche commune
     a  utiliser est la 4 (et non la 9, meme si celles-ci sont branchees
     ensemble).

     Message de Peter Kammer du 7 octobre 1996 :

     Les schemas de brochage  sont  inverses  en  ce  qui  concerne  les
     connecteurs  males  :  en  effet,  les  broches  sont numerotees de
     maniere inverse sur les  connecteurs  males  et  femelles  (puisque
     leurs sens s'opposent lors du brancement).  Il faut donc considerer
     que les schemas pour les connecteurs males sont vus cote  exterieur
     et  non  cote  interieur  (soudure),  contrairement  a  ce  qui est
     indique.

     Par ailleurs, il existe un document de reference technique pour les
     onduleurs _B_a_c_k_-_U_P_S qui se trouve sur le site web d'_A_P_C.

     Message de Troy Muller du 6 avril 1997 :

     L'onduleur  _B_a_c_k_-_U_P_S  _P_r_o  _6_5_0  fonctionne  avec  le cable standard
     d'_A_P_C.  La reference du  cable  est  940-023A  et  le  logicel  est
     _E_n_h_a_n_c_e_d___A_P_C___B_a_c_k_U_P_S.   Ce  logiciel  envoit  des  messages globaux
     toutes les deux secondes, mais un eu de  bidouillage  de  dowalll.c
     permet de limiter cette fonction.

     AAPPCC SSmmaarrtt--UUPPSS

        De  nombreuses  personnes ont un APC Smart UPS.  Il semble qu'il
        existe  des   paquetages   pour   utiliser   ceux-ci   en   mode
        "intelligent"   (voir   les   paquetages  mentionnes  plus  haut
        Enhanced_APC_UPSD-v1.4.tar.gz,        apcd-0.5.tar.gz         et
        smupsd-0.7-1.i386.rpm  decrits  dans  la section ``Logiciels'').
        Je ne sais pas ce que vaut le support  pour  chacun  d'eux.   Il
        semble  qu'_A_P_C  ccoonnttiinnuuee a refuser de publier son protocole pour
        le mode "intelligent" sans un  accord  de  non-diffusion,  ainsi
        tout le monde a du faire de la retro-ingenierie dessus.

        Le  consensus  general  est  d'investr dans une gamme qui publie
        cette information, comme _B_e_s_t.

        Une autre possibilite est d'utiliser la version du  logiciel  de
        controle  d'onduleurs  _P_o_w_e_r_c_h_u_t_e  d'_A_P_C  pour  _S_C_O  _U_n_i_x via le
        paquetage de compatibilite _i_B_C_S.  Clive A. Stubbings me dit  que
        cela  fonctionne  bien  apres  quelques  ajustements  du  script
        d'installation.   Il  dit  que  le   seul   probleme   est   que
        "l'interface  graphique  semble  avoir des problemes a controler
        des onduleurs a-travers le reseau".

        Si vous possedez un _A_P_C _S_m_a_r_t_-_U_P_S et que vous n'arriviez  pas  a
        le  faire  fonctionner  en  mode  intelligent  avec aucun de ces
        logiciels, vous pouvez malgre tout  encore  l'utiliser  en  mode
        bete.   Les  sections  qui  suivent  detaillent cette procedure.
        J'ai recu, en particulier, des messages concernant  les  modeles
        _6_0_0,  _7_0_0  et  _1_4_0_0.   Il  vous  faudra  probablement bidouiller
        powerd.c comme indique dans la section ``Analyse  de  cables  et
        modification de powerd.c''.

        Message de Lam Dang du 19 aout 1994 dans comp.os.lnux.misc :

        Realisation du cable pour un _A_P_C _S_m_a_r_t_-_U_P_S _m_o_d_e_l_e _6_0_0.

        Le  cable  est  a  realiser entre un connecteur DB-9 femelle sur
        l'onduleur et un DB-25 male sur  l'ordinateur.   Le  boitier  du
        DB-25  est assez grand pour contenir un regulateur de tension et
        deux resistances.  L'interface entre le connecteur de l'onduleur
        et celui du PC est ainsi :

                  Onduleur (DB-9)         PC (DB-25)

                  1 (Extinction)           20 (DTR)
                  3 (Coupure de secteur)    5 (CTS)
                  4 (Commun)                7 (GND)
                  5 (Batterie faible)       8 (DCD)
                  9 (Masse chassis)         1 (Chassis Ground)

     Vous pouvez utiliser la broche 6 de l'onduleur au lieu de la broche
     3 (elles sont inverses l'une de l'autre).  La complication  est  de
     monter les broches collecteur ouvert 3 (ou 6) et 5 de l'onduleur.

     Ce modele APC fournit une sortie non regulee de 24 V continu sur la
     broche 8.  La tension de sortie est disponible tout  le  temps  (au
     moins  un  peu  apres que le signal de batterie faible soit monte).
     L'intensite est limitee a 40mA.   Pour  monter,  la  broche  8  est
     l'alimentation  d'un regulateur de tension de +5V.  La sortie de ce
     regulateur passe dans deux resistances de  4,7kohm.   L'autre  bout
     d'une  resistance  connecte  les  broches 3 (Coupure de courant) de
     l'onduleur et 5 du PC (CTS).  Celle de l'autre resistance  connecte
     les  broches  5  de  l'onduleur (Batterie faible) et 8 du PC (DCD).
     Les deux resistances consomment environ 2 mA lorsqu'elles sont a la
     masse.

     Lorsque  l'onduleur  est  alimente,  les broches 5 (CTS) et 8 (DCD)
     cote PC doivent etre tres proches de 5V, et  monter  la  broche  20
     pendant  5  secondes ne doit avoir aucun effet.  Lorsque l'onduleur
     passe sur batteries, la broche 5 (CTS) doit tomber a 0V, la  broche
     8  (DCD)  doit  rester  a  l'identique a 5V, et monter la broche 20
     (DTR) en court-circuitant les broches 8 et 20,  par  exemple,  doit
     eteindre l'onduleur apres environ 15 secondes.

     Lorsque  la  diode  "Low  Battery"  du panneau frontal s'allume, la
     broche 8 (DCD) doit descendre a 0V aussi.
     Les tensions de l'interface onduleur sont NEGATIVES pour la coupure
     de  secteur  (sur la broche 3 de l'onduleur) et la batterie faible,
     et POSITIVE pour l'arret a distance.  Les parametres de ligne serie
     comme la vitesse n'ont aucune importance.

     Liste du materiel necessaire :

     +o  un boitier DB-9 ;

     +o  un connecteur sub-DB-25 femelle ;

     +o  un regulateur de tension 7805 +5Vdc ;

     +o  deux resistances de 4,7kohm ;

     +o  un carte a composants perforee ;

     +o  un cable avec au moins un connecteur 9 broches male.

        Et de plus :

     +o  un multimetre ;

     +o  un fer a souder;

     +o  quelques heures...

     AAPPCC SSmmaarrtt--UUPPSS 770000

        Voici  quelques  details  sur le fonctionnement du modele 700 en
        mode bete, qui presente une utilisation  futee  d'un  transistor
        place  dans  le cable qui eteint l'onduleur lorsque l'ordinateur
        est eteint.

          From: Markus Eiden <Markus@eiden.de>
          Sender: eiden@eiden.de
          To: "Harvey J. Stein" <abel@netvision.net.il>
          Subject: Re: APC Smart-UPS
          Date: Sun, 30 Mar 1997 16:21:05 +0200

     J'utilise un APC Smart-UPS 700 pour mon systeme Linux sur une carte
     ASUS.

     Pour  utiliser  quelques possibilites de l'onduleur, il faut quatre
     choses :

     1) faire un cable RS-232 avec une petite interface ; 2)  le  source
     du powerd du paquetage sysvinit (j'utilise la version 2.6 de Miquel
     van Smoorenburg). Il faut ensuite modifier ce powerd ;  3)  changer
     /etc/inittab  ; 4) faire un script qui lance certaines commandes si
     le courant est coupe ou si la batterie est faible.

     Quelques possibilites :

     Lorsque le secteur est coupe, un script est lance et une entree est
     faite dans syslog.

     Si  la  batterie  est  faible, un autre script est lance (qui arete
     l'ordinateur, evidemment) et une entree est faite dans syslog.

     Si  l'ordinateur  est  arrete  et  que  le  courant  l'est   aussi,
     l'onduleur sera arrete a son tour.

     1) D'abord le cable :

     Si l'on jette un coup d'oeil a l'arriere de l'onduleur, on y trouve
     un connecteur femelle comme celui-ci :

                       8             1: Eteint l'onduleur lorsque le courant est coupe
                                        et que la broche 1 est haute.
               X   X   X   X         3: Descend en cas de coupure de curant.
             X   X   X   X   X       4: Masse
                                     5: Descend en cas de baisse de la batterie.
             1       3   4   5       8: +24V

     D'un autre cote, l'arriere du PC presente un connecteur male  comme
     celui-ci :

                   8       6         1: DCD
               X   X   X   X         4: DTR
             X   X   X   X   X       5: GND
             5   4           1       6: DSR
                                     8: CTS

     Il faut realiser l'interface suivant entre ces connecteurs :

      PC                                                           UPS

                                              #------------------  (8)
                                              |
                                             470 Ohm
                                              |
                #-----#-----#-----#-----#-----#----- ca. 9-12V
                |     |     |     |     |     |
                47    3.3   3.3   3.3   1     470
                kOhm  kOhm  kOhm  kOhm  kOhm  Ohm
                |     |     |     |     |     |
      (8) ------------------------#     |     |
                |     |     |           |     |
      (6) ------------#------------------------------------------- (5)
                |           |           |     |
      (1) ------------------#------------------------------------- (3)
                |                       |     |
                |                      C#------------------------- (1)
                |                      -|     |
                |                    B/       |
      (4) ------#-----12kOhm---------|        |
                                      \>E     |
                                      |       |
      (5)-----------------------------#-------#------------------- (4)

     +o  j'utilise un transistor "BC140", mais a peut pres n'importe quel
        transistor NPN devrait faire l'affaire ;-)

     +o  Le transistor fonctionne  comme  "inverseur".   Si  l'on  eteint
        l'ordinateur  ET  que  le  courant  est coupe, la broche 4 du PC
        descend et  la  broche  1  de  l'onduleur  monte.   Cela  eteint
        l'nduleur pour economiser la batterie.

        2) Le source de _p_o_w_e_r_d

        J'ai juste retouche tres peu le source (donc c'est en fait celui
        de Miquel).

        (a) Emet une "alerte" vers syslogd si la broche 8  du  PC  (DCD)
        est basse (c'est qu'alors, le cable n'est pas connecte) ;

        (b)  DCD  descendu  a  zero  -> le courant est coupe -> appel de
        powerfail(0) -> envoi de INIT_CMD_POWERFAIL au processus init ;

        (c)  DCD  remonte  ->  le  courant  est  revenu  ->   appel   de
        powerfail(1) -> envoi de INIT_CMD_POWEROK au processus init ;

        (d)  DSR  et  DCD descendus a zero -> le courant est coupe et la
        batterie  est  faible  >  appel  de  powerfail(2)  ->  envoi  de
        INIT_CMD_POWERFAILNOW au processus init.

        Et voila.

     /*
      * powerd       Surveille la ligne DCD d'un port serie connecte a un
      *              onduleur. Si le courant est coupe, previent init.
      *              Si le courant revient, previent init encore.
      *              Tant que le courant est la, DCD doit etre "haut". Lorsque
      *              le courant est coupe, DCD doit descendre.
      *              Powerd maintient DTR haut, donc en branchant une resistance
      *              de 10 kOhm entre DCD et DTR, l'onduleur ou un simple relais
      *              peuvent descendre DCD a la masse.
      *              Il faut aussi brancher DSR et DTR ensemble. Ainsi, powerd
      *              peut controler ici et la que DSR soit haut, et il sait donc
      *              que l'onduleur est connecte !!
      *
      * Usage:       powerd /dev/cua4 (ou tout autre port serie).
      *
      * Auteur:      Miquel van Smoorenburg, <miquels@drinkel.cistron.nl>.
      *              Quelques changements mineurs de Markus Eiden, <Markus@Eiden.de>
      *              pour APC-Smart-UPS-powerd.
      *
      * Version:     1.31,  29-Feb-1996.
      *
      * Traduction:  Bernard Choppy (choppy@imaginet.fr)
      *
      *              Ce programme fut developpe initialement pour mon employeur
      *                      ** Cistron Electronics **
      *              qui a autorise la distribution de celui-ci pour un usage
      *              generalise.
      *
      *              Copyright 1991-1996 Cistron Electronics.
      *
      *
      *              This program is free software; you can redistribute it and/or
      *              modify it under the terms of the GNU General Public License
      *              as published by the Free Software Foundation; either version
      *              2 of the License, or (at your option) any later version.
      *
      *              Ce programme est un logiciel libre ; vous pouvez le diffuser
      *              et/ou modifier selon les termes de la GPL (GNU Public License)
      *              de la Free Software Foundation; au choix dans la version 2 de
      *              cette licence, ou (a votre choix) toute autre version.
      *
      *              Modifications mineures pour APC-powerd par Markus Eiden
      *              Markus@Eiden.de
      */

     /* Utilisation de la nouvelle methode de communication avec init */
     #define NEWINIT

     #include <sys/types.h>
     #include <sys/stat.h>
     #include <sys/ioctl.h>
     #include <fcntl.h>
     #include <errno.h>
     #include <stdlib.h>
     #include <unistd.h>
     #include <stdio.h>
     #include <signal.h>
     #include <syslog.h>
     #include <string.h>
     #include "paths.h"
     #ifdef NEWINIT
     #include "initreq.h"
     #endif

     #ifndef SIGPWR
     #  define SIGPWR SIGUSR1
     #endif

     #ifdef NEWINIT
     void alrm_handler()
     {
     }
     #endif

     /* Avise init du changement d'etat du courant */
     void powerfail(ok)
     int ok;
     {
       int fd;
     #ifdef NEWINIT
       struct init_request req;

       /* Remplissage de la structure de requete */
       memset(&req, 0, sizeof(req));
       req.magic = INIT_MAGIC;

       /* INIT_CMD_* sont definis dans initreq.h                 *
        * Jetez un coup d'oeil a init.c et /etc/inittab          *
        *                                                        *
        * ok=0 -> INIT_CMD_POWERFAIL      -> powerwait           *
        * ok=1 -> INIT_CMD_POWEROK        -> powerokwait         *
        * ok=2 -> INIT_CMD_POWERFAILNOW   -> powerfailnow        */

       switch (ok) {
         case 0 : req.cmd = INIT_CMD_POWERFAIL;
                  /* Coupure -> alerte */
                  break;
         case 1 : req.cmd = INIT_CMD_POWEROK;
                  /* Retour du courant -> arrete l'alerte */
                  break;
         case 2 : req.cmd = INIT_CMD_POWERFAILNOW;
                  /* Coupure et batterie faible -> arret systeme */
                  break;
                  }

       /* Ouvre le fifo (avec timeout) */
       signal(SIGALRM, alrm_handler);
       alarm(3);
       if ((fd = open(INIT_FIFO, O_WRONLY)) >= 0
                     && write(fd, &req, sizeof(req)) == sizeof(req)) {
             close(fd);
             return;
       }
       /* On en revient a l'ancienne methode... */
     #endif

       /* Creaton d'un fichier info pour init */
       unlink(PWRSTAT);
       if ((fd = open(PWRSTAT, O_CREAT|O_WRONLY, 0644)) >= 0) {
             if (ok)
                     write(fd, "OK\n", 3);
             else
                     write(fd, "FAIL\n", 5);
             close(fd);
       }
       kill(1, SIGPWR);
     }

     /* Programme principal */
     int main(int argc, char **argv)
     {
       int fd;
       int dtr_bit = TIOCM_DTR;
       int flags;
       int status, oldstat = -1;
       int count = 0;
       int tries = 0;
       int powerfailed = 0;
       int rebootnow   = 0;

       if (argc < 2) {
             fprintf(stderr, "Usage: powerd <port>\n");
             exit(1);
       }

       /* Lancement de syslog */
       openlog("powerd", LOG_CONS|LOG_PERROR, LOG_DAEMON);

       /* Ouverture du port a surveiller */
       if ((fd = open(argv[1], O_RDWR | O_NDELAY)) < 0) {
             syslog(LOG_ERR, "%s: %s", argv[1], sys_errlist[errno]);
             closelog();
             exit(1);
       }

       /* Port ouvert, DTR doit etre haut. On le force tout de meme...*/

       /* Fonctionnement : Batterie faible -> Arret -> DTR descend -> *
        * transistor ouvert -> La broche d'arret onduleur monte ->    *
        * l'onduleur s'arrete apres 20 s environ. S'il y a une coupu- *
        * re et que l'ordinateur est eteint, l'onduleur s'arrete.     *
        * Si le courant revient, l'onduleur s'allume, l'ordinateur    *
        * demarre, et powerd est lance.                               *
        *                                                             */

       ioctl(fd, TIOCMBIS, &dtr_bit);

       /* Passe en daemon. */
       switch(fork()) {
             case 0: /* Fils */
                     closelog();
                     setsid();
                     break;
             case -1: /* Erreur */
                     syslog(LOG_ERR, "impossible de forker.");
                     closelog();
                     exit(1);
             default: /* Pere */
                     closelog();
                     exit(0);
       }

       /* Relance syslog. */
       openlog("powerd", LOG_CONS, LOG_DAEMON);

        syslog(LOG_INFO, "APCpowerd demarre...");

       /* On surveille DCD */
       while(1) {
             /* Lecture de l'etat. */
             ioctl(fd, TIOCMGET, &flags);

             /* Controle de connexion : CTS doit etre haut */
             tries = 0;
             /* TIOCM_*- Se reporter a  .../ams/termios.h */
             while((flags & TIOCM_CTS) == 0) {
                     /* On continue a essayer, et alerte toutes les 2 minutes */
                     if ((tries % 60) == 0)
                         syslog(LOG_ALERT, "Onduleur non connecte");
                     sleep(2);
                     tries++;
                     ioctl(fd, TIOCMGET, &flags);
             }
             if (tries > 0)
                     syslog(LOG_ALERT, "Onduleur reconnecte");

             /* Calcule l'etat en cours */
             status = (flags & TIOCM_CAR);

             /* Si DCD est passe a zero, le courant a ete coupe */
             if (oldstat != 0 && status == 0) {
                     count++;
                     if (count > 3) {
                             powerfailed = 1;
                             powerfail(0);
                             }
                     else {
                             sleep(1);
                             continue;
                     }
             }
             /* Si DCD remonte, le courant est revenu. */
             if (oldstat == 0 && status > 0) {
                     count++;
                     if (count > 3) {
                             powerfailed = 0;

                             /* eigentlich unnoetig: */
                             rebootnow = 0;

                             powerfail(1);
                             }
                     else {
                             sleep(1);
                             continue;
                     }
             }

             /* Batterie faible et courant coupe ? */
             if (rebootnow==0)
             if (powerfailed==1)
             if ((flags & TIOCM_DSR) == 0)
             {
                rebootnow=1;
                powerfail(2);

             }

             /* Reinitialisation, stockage de l'etat et attente 2s. */
             count = 0;
             oldstat = status;
             sleep(2);
       }
       /* N'arrive jamais */
       return(0);
     }

     3) Modifier inittab

     init recoit les commandes INIT_CMD et lance les scripts idoines :

          pf::powerwait:/sbin/init.d/powerfail    start
          pn::powerfailnow:/sbin/init.d/powerfail now
          po::powerokwait:/sbin/init.d/powerfail  stop

     Ce  qui signifie, par exemple : si le courant est coupe (powerwait,
     lancer le script /sbin/init.d/powerfail avec le parametre  "start".

     4) Le script powerfail

          #! /bin/sh
          # Copyright (c) 1997 Markus Eiden, Markus@Eiden.de
          #

          case "$1" in
              start)
                  echo "LE COURANT EST COUPE !" | wall
                  logger "Coupure de courant"
                  ;;
              now)
                  echo "BATTERIE FAIBLE ! Arret systeme dans une minute" | wall
                  logger "Batterie faible, arret systeme dans une minute"
                  sync
                  /sbin/shutdown -r -t 5 +1
                  ;;
              stop)
                  echo "LE COURANT EST REVENU !!" | wall
                  logger "Courant retabli"

                  /sbin/shutdown -c >/dev/null 2>/dev/null

                  ;;
            *)
                  echo "Usage: $0 {start|now|stop}"
                  exit 1
                  ;;
          esac

          exit 0

     Eh bien, cela devrait etre simple ;-)

     Vous  voila  pret maintenant, mais restez prudent : cela fonctionne
     pour moi, mais je ne peux evidemment pas garantir que quoi  que  ce
     soit de cela fonctionne pour vous.

     Un  petit  conseil  pour  finir  : si /sbin/init.d/powerfail arrete
     votre PC, DTR descend,  donc  la  broche  d'arret  (cote  onduleur)
     monte.   Des  cet  instant,  il  faut  entre  20  et  30 secondes a
     l'onduleur  pour  s'arreter.    C'est   de   votre   responsabilite
     d'empecher votre machine Linux de redemarrer durant ces 20 secondes
     (en particulier, de monter les volumes disque).  Cela ne fut pas un
     probleme pour mon systeme.

     Quatre  methodes  simples  permettent  d'empecher Linux de demarrer
     rapidement :

        1. le BIOS doit realiser certaines routines (comme identifier le
           nombre  de  pistes  de votre lecteur de disquettes si vous en
           avez un) ;

        2. LILO peut etre configure pour attendre s'il est installe ;

        3. il peut ne rien y avoir a faire (comme dans mons cas) ;

        4. il est  possible  d'acheter  plus  de  memoire  afin  que  le
           decompte  dure 30 secondes.  Cela doit correspondre environ a
           1 024 Mo ;-).

     AAPPCC SSmmaarrtt--UUPPSS 11 440000

        Autre jour, autre APC.  Voici pour le _S_m_a_r_t_-_U_P_S _1 _4_0_0,  en  mode
        bete.

          From: "Slavik Terletsky" <ts@polynet.lviv.ua>
          To: hjstein@math.huji.ac.il
          Subject: my contribution to UPS HOWTO
          Date: Mon, 27 Jan 1997 21:10:16 +0000

     Daemon d'onduleur pour FreeBSD (2.1.5 - teste).

     Schema de branchement :

          Onduleur (broche, nom)          PC (broche, nom)
          ----------------------          ---------------------
          1 Arret                 >----------->   4 Terminal pret
          2 Courant Coupe         >----------->   8 Pret a emettre
          4 Commun                >----------->   5 Masse
          5 Batterie faible       >----------+>   1 Detection de porteuse
          8 Batterie (+24V)       >-|10kOhm|-+

     Description

     Usage: upsd <device> [wait [script]]

     device  - device name upsd interacts thru (e.g. /dev/cuaa1)
     wait    - time (secs) to wait before running script, (default value 0 sec).
     script  - system shutdown script (default /etc/rc.shutdown).

     Fonctionnement :

     upsd  enregistre tous les changements d'etat de l'onduleur (courant
     present ou absent, batterie faible ou bonne).  Lorsque  le  courant
     est  absent  et  que  la batterie est faible, upsd active le signal
     d'arret de l'onduleur, attend le nombre de secondes indique sur  la
     ligne de commande, et lance le script d'arret.

     Exemple de script :

          #!/bin/sh
          # Le script est execute lorsque le systeme s'arrete

          PATH=/sbin:/bin:/usr/sbin:/usr/bin

          echo "ARRET IMMEDIAT DU SYSTEME" | wall

          reboot

     Source d'upsd :

     /* daemon d'onduleur
      * Copyright 1997 Slavik Terletsky. All rights reserved.
      * Auteur: Slavik Terletsky <ts@polynet.lviv.ua>
      * Systeme: FreeBSD
      * Traduction: Bernard Choppy <choppy@imaginet.fr>
      */
     #include <stdio.h>
     #include <stdlib.h>
     #include <signal.h>
     #include <syslog.h>
     #include <unistd.h>
     #include <varargs.h>
     #include <fcntl.h>
     #include <errno.h>
     #include <sys/uio.h>
     #include <sys/types.h>
     #include <sys/ioctl.h>
     #include <sys/ttycom.h>

     int status;
     int wait = 0;
     FILE *fd;
     char *scr = "/etc/rc.shutdown";
     char *idf = "/var/run/upsd.pid";

     void upsterm();
     void upsdown(int);

     int main(int argc, char *argv[]) {
      int pd;
      int zero = 0;
      char d5, d6, d7;
      char low = 0;
      char pow = 1;

      /* controle des arguments */
      switch(argc) {
      case  4:
      scr = argv[3];
      case  3:
      wait = atoi(argv[2]);
      case  2:
      break;
      default:
      fprintf(stderr, "usage: %s <port> [temporisation [script]]\n", argv[0]);
      exit(1);
      }

      /* controle de l'existence du script */
      if(!(fd = fopen(scr, "r"))) {
      fprintf(stderr, "fopen: %s: %s\n", scr, sys_errlist[errno]);
      exit(1);
      }
      fclose(fd);

      /* controle si upsd s'execute deja */
      if(fd = fopen(idf, "r")) {
      fprintf(stderr, "fopen: le fichier %s existe deja\n", idf);
      exit(1);
      }

      /* passe en daemon */
      switch(fork()) {
      case -1:       /* erreur */
      fprintf(stderr, "fork: %s\n", sys_errlist[errno]);
      exit(1);
      case  0:       /* fils */
      break;
      default:       /* pere */
      exit(0);
      }

      /* sauvegarde du pid */
      if(!(fd = fopen(idf, "w"))) {
      fprintf(stderr, "fopen: %s: %s\n", idf, sys_errlist[errno]);
      exit(1);
      }
      fprintf(fd, "%d\n", (int)getpid());
      fclose(fd);

      /* ouverture du port a surveiller */
      if((pd = open(argv[1], O_RDWR | O_NDELAY)) < 0) {
      fprintf(stderr, "open: %s: %s\n", argv[1], sys_errlist[errno]);
      exit(1);
      }

      /* le daemon fonctionne */
      openlog("upsd", LOG_PID, LOG_DAEMON);
      syslog(LOG_INFO, "daemon demarre");

      /* reaction au signal */
      (void)signal(SIGTERM, upsterm);

      /* surveillance du port */
      while(1) {
      /* reinitialisation des bits */
      if(ioctl(pd, TIOCMSET, &zero) < 0) {
       fprintf(stderr, "ioctl: %s\n", sys_errlist[errno]);
       exit(1);
      }

      /* lecture de l'etat du port */
      if(ioctl(pd, TIOCMGET, &status) < 0) {
       fprintf(stderr, "ioctl: %s\n", sys_errlist[errno]);
       exit(1);
      }

      /* determination de l'etat */
      d5 = status & 0x20;
      d6 = status & 0x40;
      d7 = status & 0x80;

      /* courant present */
      if(!(d7 + d5)) {
       if(!pow) {
        syslog(LOG_CRIT, "courant present");
        pow = 1;
       }
      /* courant coupe */
      } else {
       if(pow) {
        syslog(LOG_CRIT, "courant coupe");
        pow = 0;
       }
      }

      /* batterie faible */
      if(!d6 && !low) {
       syslog(LOG_ALERT, "batterie faible");
       low = 1;

       /* arret onduleur */
       if(!pow) {
        upsdown(pd);
       }
      }

      /* batterie ok */
      if(d6 && low) {
       syslog(LOG_CRIT, "batterie ok");
       low = 0;
      }

      sleep(1);
      }

      /* jamais atteint */
      return 0;

     }

     void upsterm() {
      /* message de trace de fin */
      syslog(LOG_INFO, "arret du daemon");

      /* effacement du fichier de pid */
      unlink(idf);

      exit(0);
     }

     void upsdown(int pd) {
      /* message de trace d'arret */
      syslog(LOG_ALERT, "arret du systeme");

      /* effacement du fichier de pid */
      unlink(idf);

      /* mesure de securite : vidange des tampons d'ecriture */
      system("/bin/sync");
      system("/bin/sync");
      system("/bin/sync");

      /* arret de l'onduleur */
      status = TIOCM_DTR;
      if(ioctl(pd, TIOCMSET, &status) < 0) {
      fprintf(stderr, "ioctl: %s\n", sys_errlist[errno]);
      exit(1);
      }

      /* attente puis lancement du script */
      sleep(wait);
      system(scr);
     }
     # Slavik Terletsky      # University "Lvivska Poytechnika" #
     # Network Administrator # mailto:ts@polynet.lviv.ua        #

  99..  CCoommmmeenntt eetteeiinnddrree dd''aauuttrreess mmaacchhiinneess ssuurr llee mmeemmee oonndduulleeuurr ??

  Certaines personnes (y  compris  moi-meme),  ont  plusieurs  PC  Linux
  connectes sur un onduleur.  Un PC controle l'onduleur et doit eteindre
  les autres PC lorsque le secteur est coupe.

  Nous supposons que les PC peuvent communiquer sur un reseau.  Appelons
  le  PC  qui  surveille  l'onduleur  le  maitre,  et les autres PC, les
  esclaves.

  Dans les temps anciens, cela necessitait une amusante programmation.

  Maintenant, la meilleure chose a faire semble etre de trouver l'un des
  paquetages  powerd-2.0.tar.gz  ou  upsd-1.0.tgz  cites  a  la  section
  ``Logiciels'' et de suivre les instructions.  Les deux  sont  capables
  de  fonctionner  sur  les  esclaves dans un mode qui les connecte a un
  processus powerd ou upsd s'executant sur le maitre pour  lui  demander
  l'etat  de  l'onduleur.   Certains des paquetages specifiques pour APC
  semblent disposer aussi de cette fonctionnalite.

  Neammoins, si votre reseau n'est pas sur, vous  pouvez  etre  amene  a
  souhaiter  plus de securite dans ce montage, puisqu'il est possible de
  "pirater" un powerd esclave pour lui faire croire que le  courant  est
  coupe.

  Une autre possibilite est d'utiliser le protocole SNMP (Simple Network
  Management Protocol - protocole simplifie d'administration de reseau).
  Le  detail  de  l'utilisation de SNMP depasse le cadre de ce document,
  pour ne pas dire que cela me depasse tout court actuellement.

  99..11..  MMeetthhooddee ddee ll''eettaatt dduu ppoorrtt

  Configurez un port sur le maitre qui, lorsqu'on y est connecte, envoie
  soit "OK", soit "FAIL", soit "BATLOW" lorsque le courant est la, qu'il
  est coupe, ou que la batterie est faible, respectivement. Montez  cela
  sur  le  port 13 (le port time) sur lequel vous pouvez faire un telnet
  et recevoir l'heure locale.

  Montez sur les esclaves une version de _p_o_w_e_r_d qui lit ce  port  plutot
  que de controler une ligne serie.

  Je  pense  que  c'est  probablement  la  meilleure  methode,  et  j'ai
  l'intention d'upgrader mes systemes pour l'utiliser.

  99..22..  MMeetthhooddee dd''eemmiissssiioonn eenn ll''aaiirr

  Identique a la  section  ``Methode  de  l'etat  du  port'',  mais  par
  emission d'un message broadcast Ethernet signifiant l'evenement.

  Cela  peut  avoir  des  implications  de securite, puisqu'il peut etre
  {{spoofed}}

  99..33..  MMeetthhooddee dduu ppsseeuuddoo--llooggiinn

  Configurez les pseudo-login sur les esclaves avec les noms powerok  et
  powerfail,   tous   les   deux   avec   le   meme   UID.   Faites   de
  /etc/powerokscript   le    shell    du    user    powerok,    et    de
  /etc/powerfailscript celui du user powerfail. Sur le maitre, faites en
  sorte que le script /etc/powerokscript  fasse  un  rlogin  sur  chaque
  esclave en tant que user powerok et que le script /etc/powerfailscript
  fasse un rlogin en tant que powerfail sur chaque  esclave.  Placez  un
  fichier  powerfail  pour  autoriser  le  root du master a entrer comme
  users powerok et powerfail sur chaque esclave.

  C'est le systeme que  j'utilise  actuellement.  Malheureusement,  j'ai
  quelques  difficultes  a  faire  que les login distants s'executent et
  rendent la main sans se  bloquer.  Il  faudrait  probablement  que  le
  script /etc/powerfailscript fasse les rsh sur les esclaves en tache de
  fond pour lui eviter de bloquer. Neammoins, je n'ai jamais  obtenu  de
  login  correct  en  tache  de  fond. J'ai meme essaye des combinaisons
  complexes comme faire se loger toto sur l'esclave. Tout  ce  que  j'ai
  utilise  avait  des  problemes et se trouvait bloque par un entree tty
  (ou sortie, je ne m'en rappelle plus).

  En plus, cela peut creer des trous de securite.

  Le Linux UUCP HOWTO
  Vince  Skahan,  <vince@victrola.wa.com>,  version  francaise
  Rene Cougnenc.
  v1.15, 29 Novembre 1995

  Ce document decrit la configuration d'UUCP  sous  Linux.   Vous  devez
  lire  ce  texte si vous avez l'intention de vous connecter a des sites
  distants par UUCP, via un modem, une connexion directe ou  l'Internet.
  Si  vous  n'avez  pas  besoin  d'UUCP, oubliez ce document, il ne vous
  apportera rien.

  11..  IInnttrroodduuccttiioonn

  Le but de ce petit guide est de repondre a quelques questions revenant
  frequemment a propos de l'utilisation d'UUCP sous Linux en general, et
  de certaines distributions de ce systeme en particulier.

  Ce document, associe a ses equivalents  "Mail-HOWTO"  et  "News-HOWTO"
  annule  et  remplace  l'ancien  fichier "UUCP-NEWS-MAIL-FAQ" qui etait
  auparavant poste dans le forum Usenet _c_o_m_p_._o_s_._l_i_n_u_x_._a_n_n_o_u_n_c_e.

  11..11..  MMiisseess aa jjoouurr ddee ccee ddooccuummeenntt

  Les  nouvelles  versions  de  ce  "Linux  Installation  HOWTO"  seront
  periodiquement  postees dans comp.os.linux, comp.os.linux.announce, et
  news.answers.  Elle seront aussi disponibles  pour  le  telechargement
  sur  differents sites FTP, dont sunsite.unc.edu:/pub/Linux/docs/HOWTO.

  En ce qui concerne cette version francaise, la  politique  de  mise  a
  jour  et de distribution reste encore a definir.  Vous devriez pouvoir
  trouver ce document sur ftp.ibp.fr:/pub/linux/french/docs/HOWTO/ ainsi
  que ftp.loria.fr, et les differents miroirs accessibles par modem. Une
  version HTML sera bientot installee sur http://www.freenix.fr.

  11..22..  VVooss rreeaaccttiioonnss

  Vos  avis  sur  ce  document,  positifs  ou  negatifs,  m'interessent.
  Contactez-moi par courrier electronique si vous trouvez des erreurs ou
  omissions. (--  Le traducteur n'est pas responsable du contenu, de  la
  forme  et du style redactionnel de ce document. Seules les eventuelles
  fautes de frappe ou d'orthographe, ainsi que les possibles erreurs  de
  traduction, lui incombent.--)

  Je  lis,  mais  ne  reponds  pas  systematiquement  au courrier que je
  recois. Les demandes d'amelioration seront considerees  et  effectuees
  en  fonction  de  leur  interet, du temps disponible et de l'humeur du
  jour :-)

  Les insultes sont directement dirigees sur /dev/null, ne vous fatiguez
  donc pas.

  En  particulier, l'arborescence de fichiers standard sous Linux est en
  perpetuelle evolution. Dans ce document, tout ce qui s'y refere  tient
  compte  de  l'etat actuel de ce "standard" au moment ou il est redige,
  et des chemins d'acces ou noms de fichiers que nous  avons  rencontres
  le  plus  frequemment  dans  les  distributions  courantes  de  Linux.
  Consultez la documentation de la distribution que vous utilisez en cas
  de doute.

  Tout ce qui concerne le format de ce document concerne le coordinateur
  de  l'equipe  :  Greg  Hankins,  dont   l'adresse   electronique   est
  gregh@sunsite.unc.edu.

  11..33..  IInnffoorrmmaattiioonnss lleeggaalleess

  Le "Linux UUCP-HOWTO" est copyright (c)1994 Vince Skahan.

  Les  copies  conformes  peuvent  etre  reproduites ou distribuees sous
  quelque  forme  que  ce  soit  sans  autorisation  de  l'auteur.   Les
  traductions  sont  egalement autorisees sans accord prealable si elles
  comprennent une note declarant qui a realise l'adaptation.

  De courts extraits peuvent  etre  utilises  sans  le  consentement  de
  l'auteur.   Les  travaux  derives  ou distributions partielles doivent
  etre accompagnes soit d'une copie complete de ce document, soit  d'une
  indication permettant de se le procurer.

  La diffusion commerciale est autorisee, et meme encouragee ; toutefois
  l'auteur aimerait etre tenu au courant de tout ce qui se  fait  en  la
  matiere.

  En  resume,  nous desirons promouvoir la diffusion de ces informations
  par le plus de canaux possibles. Toutefois, nous voulons conserver  un
  copyright sur ces documents, et aimerions etre informes de tout projet
  de distribution.

  De plus, nous desirons que TOUTES les informations  fournies  par  les
  "HOWTO"  soient  largement  diffusees.  Si  vous  avez des questions a
  poser, contactez  Matt Welsh, le coordinateur du projet,  a  l'adresse
  mdw@sunsite.unc.edu, ou au +1 607 256 7372.

  11..44..  RReessppoonnssaabbiilliitteess

  Bien  sur,  je  declare  n'etre en aucun cas responsable des problemes
  pouvant etre poses par l'utilisation de ce document. Tout ce que  vous
  faites a partir de ce guide est a vos risques et perils.

  11..55..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  11..55..11..  LLeess ddooccuummeennttss ""LLiinnuuxx HHOOWWTTOO""

  Vous  trouverez  beaucoup  d'informations  de  valeur  dans les autres
  documents "HOWTO" de Linux, ainsi que dans les  livres  du  groupe  de
  documentation  Linux  ("Linux  Doc  Project").  En  particulier,  vous
  devriez jeter un oeil a ceci:

  +o  Le _S_e_r_i_a_l _C_o_m_m_u_n_i_c_a_t_i_o_n_s _H_O_W_T_O (communications par lignes series)

  +o  L'_E_t_h_e_r_n_e_t _H_O_W_T_O (consacre au reseau Ethernet)

  +o  Le _L_i_n_u_x _N_e_t_w_o_r_k_i_n_g _A_d_m_i_n_i_s_t_r_a_t_o_r_s_' _G_u_i_d_e (un excellent  livre  sur
     l'administration reseau sous Linux).

  11..55..22..  UUSSEENNEETT

  Vous  trouverez  la  reponse  a la plupart des questions que vous vous
  posez a propos de UUCP dans comp.mail.uucp.

  11..55..33..  LLiisstteess ddee ddiiffffuussiioonn

  Il existe une liste de diffusion dediee a Taylor UUCP.

  Pour y souscrire (ou s'y desabonner), envoyez un courrier electronique
  a

                taylor-uucp-request@gnu.ai.mit.edu

  Cette  requete  arrive a une personne physique, et non a un programme,
  aussi assurez-vous d'avoir bien  precise  l'adresse  a  laquelle  vous
  voulez recevoir la liste dans le corps de votre message.

  Pour envoyer un message a la liste, envoyez-le a

               taylor-uucp@gnu.ai.mit.edu

  11..55..44..  PPuubblliiccaattiioonnss

  Les  versions  V2  et  HDB  de UUCP sont documentees dans pratiquement
  toute documentation sur le sujet, ainsi que dans tout ouvrage traitant
  de la communication sous UNIX.

  La  configuration de type Taylor n'est pour l'instant decrite que dans
  les fichiers "Info" fournis  avec  les  sources  du  programme.   Vous
  pouvez  les  lire grace a tout utilitaire prevu a cet effet, ou depuis
  l'editeur de texte Emacs.

  Voici une liste non  exhaustive  de  quelques  ouvrages  pouvant  vous
  aider:

  +o  "Managing  UUCP and USENET", chez _O_'_R_e_i_l_l_y _a_n_d _A_s_s_o_c_i_a_t_e_s est a mon
     avis le meilleur  livre  pour  comprendre  les  protocoles  et  les
     programmes necessaires afin de devenir un site Usenet.

  +o  "Unix  Communications"  de  _W_a_i_t_e  _G_r_o_u_p  contient  une  excellente
     description de chaque partie mise en jeu, et  de  leur  interfacage
     entre elles.

  +o  "Practical  Unix  Security"  chez  _O_'_R_e_i_l_l_y _a_n_d _A_s_s_o_c_i_a_t_e_s presente
     parfaitement les methodes permettant de securiser UUCP.

  +o  "The Internet Complete Reference", chez _O_s_b_o_r_n_e, est  un  tres  bon
     manuel  de  reference  sur  les  differents  services  offerts  par
     l'Internet et est une source d'informations tres  complete  sur  le
     courrier, Usenet, et les differentes ressources Internet.

  +o  "The  Linux  Networking  Administrators' Guide", par Olaf Kirch, du
     groupe de documentation Linux (LDP) est disponible sur  le  Net  et
     est  publie  par   O'Reilly  et  SSC,  il  sera d'ici quelques mois
     disponible  en  version  Francaise.  Il  presente  une  bonne   vue
     d'ensemble  de tout ce que vous avez besoin de connaitre en matiere
     de reseau sous Unix.

  11..66..  OOuu NNEE PPAASS rreecchheerrcchheerr ddee ll''aaiiddee

  UUCP sous Linux n'a rien de particulier, et fonctionne  exactement  de
  la  meme  maniere que sur tout autre systeme UNIX. Par consequent vous
  ne _d_e_v_e_z _p_a_s poser de questions generales sur  UUCP  dans  les  forums
  Usenet comp.os.linux.*.

  Sauf  si  votre  question  est vraiment relative a Linux (par exemple,
  "quelles sont les options de  compilation  choisies  dans  le  binaire
  fourni  dans  la  distribution  ZGRBGX de Linux"), vous devez la poser
  dans comp.mail.uucp ou dans la liste de diffusion citee plus haut.

  Je repete et j'insiste :

  Il n'y a aucune raison de poser des questions relatives  a  UUCP  dans
  les groupes Usenet dedies a Linux. Usenet comporte des forums dedies a
  chaque sujet comme le courrier, les News, UUCP. Utilisez-les.

  SI VOUS POSEZ DES QUESTIONS NON RELATIVES A  LINUX  DANS  LES  GROUPES
  LINUX,  VOUS  VOUS  TROMPEZ  D'ENDROIT.  LES  SPECIALISTES  D'UUCP  SE
  TROUVENT LA OU NOUS VENONS DE LE DIRE, ET N'UTILISENT GENERALEMENT PAS
  LINUX.

  LES  QUESTIONS  N'AYANT  RIEN  A  VOIR AVEC LINUX DANS LES HIERARCHIES
  DEDIEES A CE SYSTEME VOUS FERONT PERDRE VOTRE TEMPS, AINSI  QUE  CELUI
  DES AUTRES.

  22..  MMaatteerriieell nneecceessssaaiirree

  Il  n'y  a  rien  de vraiment specifique a posseder pour utiliser UUCP
  sous Linux. Tout modem compatible HAYES donnera satistaction.

  D'une facon generale, vous choisirez le modele le plus rapide que vous
  puissiez  vous  payer.  Il  sera  alors preferable de munir votre port
  serie d'un UART 16550 pour depasser les vitesses de  9600  bauds  sans
  encombre.

  Si  vous  ne comprenez pas ce que nous venons de dire, lisez le groupe
  Usenet comp.dcom.modems, les FAQ's sur les  communications  series  et
  autres documentations, pour vous renseigner.

  33..  CCoommmmeenntt ssee pprrooccuurreerr UUUUCCPP

  Taylor  UUCP  (dont  la  version courante est 1.05) est disponible sur
  prep.ai.mit.edu sous sa forme originale, son code source, et  diverses
  distributions  de  Linux  en  proposent  des  versions binaires toutes
  compilees.

  L'archive newspak-2.4.tar.z contient des fichiers de configuration  et
  de  documentations  relatifs a l'installation de UUCP, News, Mail sous
  Linux, a partir des nombreuses sources disponibles. On peut en general
  trouver ce fichier sur sunsite.unc.edu dans le repertoire
   /pub/Linux/system/Mail/news.

  44..  IInnssttaallllaattiioonn ddeess pprrooggrraammmmeess

  (L'essentiel  de  cette  section  est  recopiee  du fichier README des
  sources de  Taylor UUCP v1.05, pour vous permettre de  vraiment  "lire
  la documentation" au lieu de nous contenter de vous le conseiller).

  Le  detail  des  instructions  pour  la compilation se trouve avec les
  sources, dans le fichier  uucp.texi.

  Vous  pouvez  recuperer  des  fichiers  conf.h  et  policy.h  "reputes
  corrects"  pour  Linux dans l'archive _n_e_w_s_p_a_k citee plus haut. Dans ce
  cas, vous pouvez sans doute directement taper make.

  44..11..  EExxttrraaccttiioonn ddeess aarrcchhiivveess ccoommpprreesssseeeess

  Pour extraire une archive tar compressee par gzip, je fais :

                  gunzip -c fichier.tar.z | tar xvf -

  Une version moderne de tar permet de faire :

                 tar -zxvf fichier.tgz

  44..22..  EEddiittiioonn ddee  MMaakkeeffiillee..iinn ppoouurr ssppeecciiffiieerr lleess rreeppeerrttooiirreess dd''iinnssttaall--
  llaattiioonn..

  Ici, j'initialise prefix a /usr plutot que la  valeur  par  defaut  de
  /usr/local

  44..33..  LLaanncceerr ""ccoonnffiigguurree""

  Taper sh configure.

  Le  script configure va compiler un certain nombre de programmes tests
  pour voir ce qu'il est possible de faire sur votre systeme.

  Il creera le fichier conf.h a  partir  de  conf.h.in  et  le  Makefile
  depuis  Makefile.in.  Il  generera egalement config.status, qui est un
  shell-script qui permet de recreer la configuration.

  +o  Plutot que d'editer le fichier Makefile.in dans les  sources  comme
     nous  venons de l'indiquer, vous pouvez obtenir le meme resultat en
     faisant configure --prefix=/usr/lib.

  44..44..  CCoonnffiigguurraattiioonn ddeess ooppttiioonnss dduu pprrooggrraammmmee

  44..44..11..  EExxaammiinneezz ccoonnff..hh et Makefile pour  verifier  qu'ils  sont  cor-
  rects.

  J'ai utilise les valeurs par defaut.

  44..44..22..  EEddiitteezz ppoolliiccyy..hh pour les besoins de votre systeme.

  +o  -  choisissez  le  type  de   fichiers   de   verrouillage   desire
     (HAVE_HDB_LOCKFILES)

  +o  -  choisissez  le(s) type(s) de fichiers de configuration desire(s)
     (HAVE_TAYLOR_CONFIG, HAVE_V2_CONFIG, HAVE_HDB_CONFIG)

  +o  - choisissez le type de structure voulue pour le repertoire "spool"
     (SPOOLDIR_HDB)

  +o  - choisissez le type de fichiers de trace desire (HAVE_HDB_LOGGING)

  +o  - choisissez le chemin de recherche par defaut des commandes  (j'ai
     rajoute /usr/local/bin )

  44..55..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn ddeess pprrooggrraammmmeess

  +o  Tapez  make.

  +o  Utilisez  uuchk  |  more pour tester les fichiers de configuration.
     Vous pouvez employer uuconv pour convertir les  differents  formats
     entre eux.

  +o  Tapez make install pour installer les programmes.

  44..66..  LLeess ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn

  Je  vous  recommande  de commencer par prendre les bons vieux fichiers
  HDB fournis et de les installer.

  +o  Assurez-vous que le fichier Permissions indique  exactement  ou  se
     trouvent  rmail  et rnews s'ils sont dans un repertoire non compris
     dans le chemin de recherche que vous avez specifie dans policy.h.

  +o  Verifiez que votre fichier Devices correspond bien  a  votre  modem
     (cua1=COM2 dans les exemples)

  +o  Editez   le   fichier  Systems  pour  declarer  les  machines  avec
     lesquelles  vous  comptez  communiquer,  ainsi  que  les  vitesses,
     numeros de telephone, nom d'utilisateur et mots de passe.

     *CE FICHIER NE DOIT PAS ETRE LISIBLE PAR TOUT LE MONDE*

  +o  Rajoutez  dans  le  fichier Permissions les lignes necessaires pour
     chaque site avec lequel vous communiquerez.  Pour  des  raisons  de
     securite,  il faut que chaque machine ait un compte separe (si vous
     acceptez  les  appels  entrants)   et   un   repertoire   personnel
     particulier, pour que vous puissiez maitriser les acces.

  44..77..  EEssssaayyeezz llaa cchhoossee......

  /usr/lib/uucp/uucico -r 1 -x 9 -s remote_system_name

  Le parametre -x 9 donne un maximum d'informations de deboguage, ecrite
  en principe dans le  fichier   /usr/spool/uucp/.Admin/audit.local  (ou
  dans  /usr/lib/uucp/Log en configuration Taylor), qui aide beaucoup  a
  la mise au point initiale.

  J'utilise souvent -x 4 car ce niveau de deboguage detaille suffisament
  les  choses  pour verifier les problemes de "login".  Bien entendu, le
  fichier tracant tout cela doit  etre  protege  de  maniere  a  ce  que
  personne ne puisse le lire.

  +o  _P_i_e_r_r_e_._B_e_y_s_s_a_c_@_e_m_e_r_a_u_d_e_._s_y_s_e_c_a_._f_r nous ecrit :

     Taylor supporte plus de niveaux de deboguage. Utilisez  -x all pour
     positionner le niveau maximum.

     Vous pouvez aussi faire un tail -f sur le  fichier  de  trace  pour
     voir  les  informations  s'afficher  au  fur  et  a  mesure de leur
     enregistrement.

  44..88..  CCaa nnee mmaarrcchhee ppaass.. QQuuee ffaaiirree ??

  En general, vous pouvez vous referer a la documentation mentionnee  au
  debut  de  ce  guide pour trouver l'erreur. Vous pouvez aussi demander
  aux operateurs des sites UUCP dont vous etes voisins, mais souvent  il
  ne  s'agit  que  d'une  simple  faute  de  frappe  dans  un fichier de
  configuration.

  55..  QQuueessttiioonnss ffrreeqquueemmmmeenntt ppoosseeeess aa pprrooppooss dd''UUUUCCPP ssoouuss LLiinnuuxx

  55..11..  PPoouurrqquuooii mmoonn bbiinnaaiirree ddee uuuuccpp eesstt--iill ccoonnffiigguurree eenn mmooddee HHDDBB pplluuttoott
  qquu''eenn TTaayylloorr ??

  (Je sais que  certains  sont  aussi  intransigeants  sur  la  facilite
  d'emploi,  que  je  le suis sur le fait de rester standard. C'est pour
  cette raison que vous disposez du code source pour  faire  comme  vous
  l'entendez :-) )

  Parce  que  mon  humble  avis  est  que  le  standard  "de  fait"  des
  implementations d'UUCP, est le type HDB. Il y a des milliers de  sites
  administres par des operateurs experimentes et de nombreux endroits ou
  vous pourrez  trouver  des  informations  incroyablement  correctes  a
  propos de la configuration HDB.

  Les  versions  fournies  avec  certaines  distributions  de Linux sont
  compilees avec le  support  des  trois  modes  possibles.  Ca  marche.
  Choisissez le votre.

  L'ordre de recherche des fichiers de configuration est Taylor, puis V2
  (L.sys) et enfin HDB. Vous pouvez utiliser  l'utilitaire  uuconv  pour
  convertir  les  differents  fichiers  de  configuration  d'un  type  a
  l'autre.

  Si vous ne pouvez pas attendre, prenez les sources d'UUCP et specifiez
  HAVE_BNU_CONFIG,  HAVE_V2_CONFIG et HAVE_TAYLOR_CONFIG, les trois a la
  fois, dans le fichier policy.h et tapez make.

  Il faut egalement savoir que la distribution Slackware est  configuree
  de telle sorte qu'elle separe les fichiers necessaires aux differentes
  configuration dans plusieurs repertoires. Par exemple, ceux  pour  HDB
  se trouveront dans /usr/lib/uucp/hdb_config.

  55..22..  DD''oouu vviieennnneenntt cceess ttiimmeeoouutt sur les connexions ?

  +o  D'apres  _E_d _C_a_r_p _- _e_r_c_@_a_p_p_l_e_._c_o_m :

     Si vous utilisez un peripherique Direct dans le fichier Devices, il
     y a un timeout  de  10  secondes,  code  lors  de  la  compilation.
     Changez le nom du peripherique pour autre chose que Direct.

  +o  _G_r_e_g _N_a_b_e_r _- _g_r_e_g_@_s_q_u_a_l_l_y_._h_a_l_c_y_o_n_._c_o_m ecrit :

     Si  vous  avez  des "timeout" lors des dialogues de connexion, vous
     pouvez regler ce probleme  en  editant  la  ligne  323  du  fichier
     uuconf/syssub.c,  afin  de  changer les 10 secondes par defaut pour
     une valeur superieure.

  +o  _E_d _R_o_d_d_a _- _e_d_@_o_r_c_a_._w_i_m_s_e_y_._b_c_._c_a rencherit :

     En cas de  "timeout"  lors  de  connexions,  particulierement  avec
     d'autres  sites  Taylor,  une pause apres le "login" peut regler le
     probleme.

     feed Any ACU,ag 38400 5551212 ogin: \c\d "" votrenom word: votrepasse

  +o  _D_r_. _E_b_e_r_h_a_r_d _W_. _L_i_s_s_e _- _e_l_@_l_i_s_s_e_._N_A  precise :

     Quelques noyaux Linux raccrochent prematurement la ligne au bout de
     quelques  secondes.  Le  patch suivant, fourni par Ian Taylor, peut
     eviter ce probleme.

     *** conn.c.orig Mon Feb 22 20:25:24 1993
     --- conn.c      Mon Feb 22 20:33:10 1993
     ***************
     *** 204,209 ****
     --- 204,212 ----

          /* Make sure any signal reporting has been done before we set
            fLog_sighup back to TRUE.  */
     +   /* SMR: it seems to me if we don't care about SIGHUPS, we should clear
     +      the flag before we return  */
     +   afSignal[INDEXSIG_SIGHUP] = FALSE;
         ulog (LOG_ERROR, (const char *) NULL);
         fLog_sighup = TRUE;

  Note du traducteur : cette modification est incluse  dans  la  version
  1.05, disponible depuis fin avril 1994 !

  55..33..  PPoouurrqquuooii ll''UUUUCCPP AAnnoonnyymmee sseemmbbllee nnee ppaass ffoonnccttiioonnnneerr eenn mmooddee HHDDBB  ??

  La  version  1.04  incluse  dans  la  distribution  SLS  de  Linux  ne
  fonctionne en anonyme qu'en mode Taylor, car elle  est  compilee  avec
  HAVE_TAYLOR_CONFIG.  Si vous voulez qu'elle marche en HDB, vous devrez
  la recompiler a partir des sources en definissant uniquement HDB.  Ian
  Taylor    est   en   train   de   reflechir   comment   regler   cette
  "caracteristique".

  Par ailleurs, Taylor en mode HDB semble etre tres sensible aux espaces
  et  lignes  vides. Par securite, assurez-vous qu'il n'y a aucune ligne
  vide ou espace en fin de ligne dans le fichier Permissions.

  Enfin, verifiez que vous avez un fichier  nomme   remote.unknown  dans
  /usr/lib/uucp  et  qu'il n'est PAS executable. Voyez le livre _M_a_n_a_g_i_n_g
  _U_U_C_P _a_n_d _U_S_E_N_E_T de O'Reilly pour plus de details a ce sujet.

  55..44..  QQuuee ssiiggnniiffiiee ll''eerrrreeuurr nnoo mmaattcchhiinngg ppoorrttss ffoouunndd ?

  Vous etes probablement en train d'essayer d'utiliser  un  peripherique
  qui  n'existe  pas  (fichier /usr/lib/uucp/Devices), ou bien celui que
  vous avez specifie dans /usr/lib/uucp/Systems ne correspond a aucun de
  ceux declares dans le fichier Devices.

  Voici  ci-dessous des versions _s_a_i_n_e_s de mes fichiers de configuration
  de Taylor UUCP 1.05 en mode HDB que  vous  pouvez  en  toute  securite
  copier et utiliser.

  Vous  voyez  le  mot  ACU  dans  Systems  ? Cela determine quel "port"
  utiliser dans Devices.

  Vous notez le mot scout dans Systems ? Il indique  quel  composeur  de
  numero utiliser dans Dialers.

  Si  vous  aviez  un  port  ACU,  mais  qu'aucun  ne  correspondait  au
  numeroteur precise sur la meme ligne dans Systems,  vous  avez  eu  ce
  message d'erreur.

  55..55..  EExxiissttee--tt--iill ddee ""bboonnss"" ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn ppoouurr llee mmooddee HHDDBB
  ??

  Ceux  qui vont suivre sont "bons", pour Taylor-UUCP 1.05 sous Linux en
  mode HoneyDanBer. Tous ces fichiers doivent etre dans
   /usr/lib/uucp sauf si vous avez  bricole  les  sources  pour  changer
  cette configuration de base.

  Si  vous  _a_v_e_z  deplace les chemins d'acces standards, mefiez-vous car
  certains programmes comme sendmail  peuvent  etre  totalement  perdus.
  Vous   devez  vous  assurer  que  tous  les  programmes  relatifs  aux
  communications  soient  d'accord  avec  votre  idee  des   repertoires
  "standard".

  #------------- Devices -------------
  # assurez-vous que le peripherique (ici cua1) est correct pour vous.
  # cua1 = COM2
  #
  # Ici, "scout" est le modem Digicom Scout Plus 19.2 que j'utilise.
  # tbfast, et la suite, correspondent a un modem Telebit Trailblazer Plus
  # a differentes vitesses.
  #
  ACU cua1 - 19200 scout
  ACU cua1 - 9600 tbfast
  ACU cua1 - 1200 tbslow
  ACU cua1 - 2400 tbmed

  #------------- Dialers --------------
  # Notez l'ajustement des registres du Trailblazer "au vol"
  # "scout" est le modem Digicom Scout Plus 19.2 que j'utilise.
  #
  scout   =W-,    "" ATM0DT\T CONNECT
  tbfast  =W-,    "" A\pA\pA\pT OK ATS50=255DT\T CONNECT\sFAST
  tbslow  =W-,    "" A\pA\pA\pT OK ATS50=2DT\T CONNECT\s1200
  tbmed   =W-,    "" A\pA\pA\pT OK ATS50=3DT\T CONNECT\s2400

  #-------------- Systems -------------
  # Voici une entree tres generale qui devrait fonctionner avec la plupart
  # des systemes.
  #
  # Le Any;1 signifie que l'on peut appeler une fois par minute avec  -f (force)
  # Le ACU,g force le protocole "g" au lieu du Taylor "i" par defaut.
  #
  fredsys Any;1 ACU,g 19200 scout5555555 "" \r ogin:--ogin: uanon word: uanon

  #-------------------------------- Permissions -------------------------
  #
  # Taylor UUCP en mode HDB est sensible aux lignes vides.
  # Verifiez bien que toutes les lignes sont valides ou bien commentees.
  #
  # Voici une entree UUCP Anonyme
  #
  LOGNAME=nuucp MACHINE=OTHER \
  READ=/usr/spool/uucp/nuucp \
  WRITE=/usr/spool/uucp/nuucp \
  SENDFILES=yes REQUEST=yes \
  COMMANDS=/bin/rmail
  #
  #
  # Voici une entree normale pour une machine distante connue qui nous
  # appellera. Notez le chemin d'acces absolu a rnews, qui n'est pas
  # du tout le chemin "standard".
  #
  LOGNAME=fredsys MACHINE=fredsys \
  READ=/usr/spool/uucp/fredsys:/usr/spool/uucp/uucppublic:/files \
  WRITE=/usr/spool/uucp/fredsys:/usr/spool/uucppublic \
  SENDFILES=yes REQUEST=yes \
  COMMANDS=/bin/rmail:/usr/local/lib/news/bin/rnews
  #----------------------------------------------------------------------

  55..66..  FFaaiirree aappppeelleerr ddiiffffeerreennttss nnuummeerrooss ppoouurr uunn mmeemmee ssiittee ppaarr uuuucciiccoo

  La version 1.05 implemente l'option -z dans uucico, pour lui permettre
  d'appeler alternativement differents numeros de telephone pour un meme
  site.

  66..  RReemmeerrcciieemmeennttss

  Les personnes suivantes ont aide a  rassembler  les  informations  (et
  l'experience) qui ont rendu ce document possible :

  Ed  Carp,  Steve  Robbins,  Ian Taylor, Greg Naber, Matt Welsh, Pierre
  Beyssac.

  Si j'ai oublie quelqu'un, je m'en excuse par avance.

  HOWTO Unicode
  Bruno Haible,<haible@clisp.cons.org>, traduction : Samuel
  Tribehou, <samuel-tribehou@mail.cpod.fr>
  v 0.12, 19 Octobre 1999

  Ce document explique comment configurer votre systme Linux pour qu'il
  utilise l'encodage de texte UTF-8.  Ce document est en cours d'labo
  ration. Toutes les astuces, suggestions, patchs, URLs sont les bien
  venus.  NDT : Il a t convenu avec l'auteur que seule la prsente
  version de ce document serait traduite dans un premier temps, le con
  tenu changeant pour l'instant trop souvent pour qu'une traduction
  suivie puisse tre ralise. Reportez vous au site du LDP pour obtenir
  la dernire version.
  ______________________________________________________________________

  Table des matires


















































  1. Introduction

     1.1 Pourquoi Unicode ?
     1.2 Les encodages d'Unicode
        1.2.1 Notes pour les dveloppeurs C/C++
     1.3 Liens

  2. Configuration de l'affichage

     2.1 La console Linux
     2.2 Fontes trangres pour X11
     2.3 Les fontes Unicode pour X11
     2.4 Unicode xterm
     2.5 Divers

  3. Configuration des locales

     3.1 Les fichiers et le kernel
     3.2 Le kernel et les ttys
     3.3 Conversion de donnes gnrales
     3.4 Les variables d'environnement locales
     3.5 Crer les fichiers pour le support des locales
     3.6 Ajouter le support pour la bibliothque C
     3.7 Conversion des catalogues de messages

  4. Applications spcifiques.

     4.1 Le rseau
        4.1.1 rlogin
        4.1.2 telnet
     4.2 Les navigateurs
        4.2.1 Netscape
        4.2.2 Lynx
        4.2.3 Pages de test
     4.3 Les diteurs
        4.3.1 yudit
        4.3.2 mined98
        4.3.3 vim
        4.3.4 emacs
        4.3.5 Xemacs
        4.3.6 nedit
        4.3.7 xedit
        4.3.8 axe
        4.3.9 pico
        4.3.10 TeX
     4.4 Les logiciels de courrier lectronique
        4.4.1 pine
        4.4.2 Kmail
        4.4.3 Netscape Communicator
        4.4.4 Emacs (rmail, vm)
     4.5 Autres applications en mode texte
        4.5.1 less
        4.5.2 expand, wc
        4.5.3 col, colcrt, colrm, column, rev, ul
        4.5.4 figlet
        4.5.5 kermit
     4.6 Autres applications X11

  5. Comment faire pour que vos programmes comprennent Unicode

     5.1 C/C++
        5.1.1 Pour le traitement de texte normal
           5.1.1.1 Notes concernant la portabilit
           5.1.1.2 La bibliothque libutf8
           5.1.1.3 La mthode Plan9
        5.1.2 Pour les interfaces utilisateur graphiques
        5.1.3 Pour la manipulation de texte avance
        5.1.4 Pour la conversion
           5.1.4.1 L'implmentation iconv d'Ulrich Drepper, contenue dans la GNU glibc-2.2.1
           5.1.4.2 librecode par Franois Pinard
        5.1.5 Les autre approches
     5.2 Java
     5.3 Lisp
     5.4 Ada95


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  PPoouurrqquuooii UUnniiccooddee ??

  Les gens de diffrents pays utilisent diffrents caractres pour
  reprsenter les mots de leur langue natale. De nos jours la plupart
  des applications, y compris les logiciels de courrier lectronique  et
  les navigateurs, traitent correctement les caractres 8-bits.  Ils
  peuvent donc traiter et afficher du texte correctement  condition
  qu'il soit reprsent dans un jeu de caractres 8-bits, comme
  ISO-8859-1.

  Il y a bien plus de 256 caractres dans le monde - pensez au
  cyrillique,  l'hbreu,  l'arabe, au chinois, au japonais au coren
  et au tha -, et de temps  autres, de nouveaux caractres sont
  invents. Les problmes que cela induit pour les utilisateurs sont les
  suivants  :


     Il est impossible de stocker du texte avec des jeux de caractres
     diffrents dans le mme document. Par exemple, je peux citer des
     journaux russes dans une publication allemande ou franaise si
     j'utilise TeX, xdvi et Postscript, mais je ne peux pas le faire
     avec du texte pur.

    Tant que chaque document a son propre jeu de caractres, et que la
     reconnaissance des jeux de caractres n'est pas automatique,
     l'intervention manuelle de l'utilisateur est invitable. Par
     exemple, pour voir la page d'accueil de la distribution Linux
     XTeamLinux http://www.xteamlinux.com.cn/, je dois dire  Netscape
     que la page web est code en GB2312.

    De nouveaux symboles comme l'Euro sont invents. ISO a publi un
     nouveau standard ISO-8859-15 qui est en gros identique 
     ISO-8859-1, except qu'il supprime des caractres rarement
     utiliss, comme le vieux symbole montaire, remplac par le signe
     Euro.  Si les utilisateurs acceptent ce standard, ils auront des
     documents dans diffrents jeux de caractres sur leur disque, et
     cela deviendra une proccupation quotidienne. Mais les ordinateurs
     devraient simplifier le choses, pas les compliquer.

  La solution  ce problme est l'adoption d'un jeu de caractres
  universel. Ce jeu de caractres est Unicode http://www.unicode.org/.
  Pour plus d'informations sur Unicode, faites man 7 unicode (page de
  man contenue dans le package lpdman-1.20).


  11..22..  LLeess eennccooddaaggeess dd''UUnniiccooddee

  Cela rduit le problme de l'utilisateur (devoir jongler entre
  diffrents jeux de caractres)  un problme technique : comment
  transporter les caractres Unicode en utilisant des octets de 8 bits ?
  L'unit de 8 bits est la plus petite unit adressable de la plupart
  des ordinateurs et c'est aussi l'unit utilise par les connexions
  rseau TCP/IP.  Cependant, l'utilisation d'un octet pour la
  reprsentation d'un caractre est un accident de l'histoire d au fait
  que le dveloppement de l'ordinateur commena en Europe et aux tats-
  Unis, o l'on pensait que 96 caractres seraient suffisants pour
  longtemps.

  Il y a fondamentalement quatre faons d'encoder des caractres Unicode
  dans des octets :


     UUTTFF--88
        128 caractres sont encods en utilisant 1 octet : les
        caractres ASCII.
        1920 caractres sont encod en utilisant deux octets : le latin,
        le grec, le cyrillique, le copte, l'armnien, l'hbreu, les
        caractres arabes.
        63488 caractres sont encods en utilisant 3 octets, le chinois
        et le japonais entre autres.
        Les 2147418112 caractres restant (non encore assigns) peuvent
        tre encods en utilisant 4, 5 ou 6 caractres.  Pour plus
        d'informations sur UTF-8, faites man 7 utf-8 (cette page est
        contenue dans le package ldpman-1.20).


     UUCCSS--22
        Chaque caractre est reprsent par deux octets. Cet encodage
        peut reprsenter seulement les  65536 premiers caractres
        d'Unicode.


     UUTTFF--1166
        C'est une extension d'UTF-2 qui peut reprsenter 11144112
        caractres Unicode. Les 65536 premiers caractres sont
        reprsents par deux octets, les autres par quatre.


     UUCCSS--44
        Chaque caractre est reprsent par 4 octets.

  L'espace ncessaire pour encoder un texte, comparativement aux
  encodages actuellement en usage (8 bits par caractres pour les
  langues europennes, plus pour le chinois/japonais/coren), est le
  suivant : (Cela a une influence sur l'espace disque, et la vitesse des
  communications rseau.


     UUTTFF--88
        Pas de changement pour l'ASCII amricain, juste quelques
        pourcents supplmentaires  pour ISO-8859-1, 50 % de plus pour le
        chinois/japonais/coren, 100 % de plus pour le grec et le
        cyrillique.


     UUCCSS--22 eett UUTTFF--1166
        Pas de changement pour le chinois/japonais/coren, augmentation
        de 100 % pour l'US ASCII et ISO-8859-1, le grec et le
        cyrillique.


     UUCCSS--44
        Augmentation de 100% pour le chinois/japonais/coren. De 300%
        pour l'US ASCII et ISO-8859-1, le grec et le cyrillique.


  tant donn la pnalit pour les documents amricains et europens,
  cause par UCS-2, UTF-8 et UCS-4, il semble peu probable que ces
  encodages aient un potentiel pour une utilisation  grande chelle.
  L'API Win32 Microsoft supporte l'encodage UCS-2 depuis 1995 (au
  moins), cependant cet encodage n'a pas t largement adopt pour les
  documents -SJIS demeure prdominant au Japon.

  D'un autre ct UTF-8 a le potentiel pour une utilisation  large
  chelle, puisqu'il ne pnalise pas les utilisateurs amricains et
  europens, et que beaucoup de logiciels de "traitement de texte"
  (NDT : au sens large) n'ont pas besoin d'tre changs pour supporter
  UTF-8.
  Nous allons maintenant expliquer comment configurer votre systme
  Linux pour qu'il utilise UTF-8 comme encodage de texte.


  11..22..11..  NNootteess ppoouurr lleess ddvveellooppppeeuurrss CC//CC++++

  L'approche de Microsoft Win32 rend facile pour les dveloppeurs la
  production de versions Unicode de leurs programmes : Vous dfinissez
  Unicode ("#define UNICODE") au dbut de votre programme, et changez
  alors un grand nombre d'occurrences de char en TCHAR jusqu' ce que
  votre programme compile sans Warnings.  Le problmes est que vous avez
  au final deux versions de votre programme : une qui comprend le texte
  UCS-2 mais pas les encodages 8-bit, et une autre qui ne comprend que
  les vieux encodages 8-bit.

  En plus, il y a une complication qui affecte UCS-2 et UCS-4 : l'ordre
  de la reprsentation interne des nombre (``the endianness''). Le
  registre de systmes de codage de caractres de la IANA dit  l'gard
  de ISO-10646-UCS-2 : "il faut spcifier l'ordre de la reprsentation
  interne des nombres  l'intrieur du rseau, le standard ne le
  spcifie pas". Cette reprsentation est "big endian" en contexte
  rseau, alors que Microsoft recommande dans ses outils de
  dveloppement C/C++ d'utiliser une reprsention dpendante de la
  machine (c.a.d. "little endian" sur les processeurs ix86), et
  d'ajouter une marque de polarit (BOM) au dbut du document, ou
  d'utiliser des heuristiques bases sur la statistique.

  D'un autre ct l'approche de UTF-8 garde char* comme type standard
  pour le stockage des chanes en C. Il en rsulte que votre programme
  supportera l'US ASCII, indpendamment de toute variable
  d'environnement, et supportera les textes encods en ISO-8859-1 et
  UTF-8  condition que la variable d'environnement LANG soit
  positionne en consquence.


  11..33..  LLiieennss

  La liste de ressources de Markus Kuhn (mise  jour trs
  rgulirement) :

    http://www.cl.cam.ac.uk/~mgk25/unicode.html

    http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html

  Un survol d'Unicode, UTF-8 et des programmes fonctionnant avec UTF-8
  de Roman Czyborra :
  http://czyborra.com/utf/#UTF-8

  Des exemples de fichiers UTF-8 :

    Les fichiers quickbrown.txt, utf-8-test.txt, utf-8-demo.txt dans le
     rpertoire examples dans le package ucs-fonts de Markus Kuhn
     http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz

    ftp://ftp.cs.su.oz.au/gary/x-utf8.html

    Le fichier iso10646 dans le package trans-1.1.1 de Kosta Kosti
     ftp://ftp.nid.ru/pub/os/unix/misc/trans111.tar.gz

    ftp://ftp.dante.de/pub/tex/info/lwc/apc/utf8.html

    http://www.cogsci.ed.ac.uk/~richard/unicode-sample.html



  22..  CCoonnffiigguurraattiioonn ddee ll''aaffffiicchhaaggee

  Nous supposons que vous avez dj adapt votre console Linux et la
  configuration de X11  votre clavier et avez positionn correctement
  la variable de localisation LANG.  Ceci est expliqu dans le
  Danish/International HOWTO, et dans les autres HOWTOS nationaux :
  Finish, French, German, Italian, Polish, Slovenian, Spanish, Cyrillic,
  Hebrew, Chinese, Thai, Esperanto.  Mais, s'il vous plat, ne suivez
  pas le conseil  donn dans le Thai-HOWTO vous disant de faire croire
  que vous utilisez des caractres ISO-8859-1 (U0000..U00FF) alors que
  vous tapez des caractres Thai (U0E01..U0E5B). Faire cela ne vous
  causera que des problmes lorsque vous passerez  Unicode.


  22..11..  LLaa ccoonnssoollee LLiinnuuxx

  Je ne parle pas tellement de la console ici, parce que je ne l'utilise
  que pour rentrer mon login, password, et taper xinit sur les machines
  dpourvues de xdm.

  Mais revenons  nos moutons : le package kbd-0.99
  ftp://sunsite.unc.edu/pub/Linux/system/keyboards/kbd-0.99.tar.gz, et
  une version largement tendue, le package console-tools-0.2.2
  ftp://sunsite.unc.edu/pub/Linux/system/keyboards/console-
  tools-0.2.2.tar.gz, contiennent dans le rpertoire kbd-0.99/src/ (ou
  console-tools-0.22/screenfonttools/) deux programmes : unicode_start
  et unicode_stop. Quand vous appelez unicode_start, la sortie de la
  console est interprte comme de l'UTF-8. De plus, le clavier est mis
  en mode Unicode (voir "man kbd_mode"). Dans ce mode, les caractres
  Unicode taps par Alt-x1...Alt-xn (o x1...xn sont les chiffres de
  pav numrique) seront mis en UTF-8. Si votre clavier, ou plus
  prcisment, votre keymap a des touches  correspondant  des
  caractres non ASCII(comme le Umlaute allemand), que vous souhaiteriez
  pouvoir CapsLocker, vous devez appliquer au kernel le patch
  linux-2.2.9-keyboard.diff ou linux-2.3.12-keyboard.diff.

  Vous voudrez probablement afficher des caractres de diffrents
  alphabets sur le mme cran. Pour cela, vous aurez besoin d'une fonte
  Unicode pour la console.
  Le package ftp://sunsite.unc.edu/pub/Linux/system/keyboards/console-
  data-1999.08.29.tar.gz contient une fonte
  (LatArCyrHeb-{08,14,16,19}.psf), qui couvre les lettres pour le
  latin, le cyrillique, l'hbreu, et l'arabe. Il supporte les parties 1,
  2, 3, 4, 5, 6, 8, 9, 10 d'ISO-8859  lui tout seul.  Pour l'installer,
  copiez le dans /usr/lib/kbd/consolefonts/, et excutez
  /usr/bin/setfont /usr/lib/kbd/consolefonts/LatArCyrHeb-14.psf.

  Si vous voulez que le copier-coller marche avec les consoles UTF-8,
  vous aurez besoin du patch linux-2.3.12-console.diff d'Edmund Thomas,
  Grimley Evans et Stanislav Voronyi.





  22..22..  FFoonntteess ttrraannggrreess ppoouurr XX1111

  N'hsitez pas  installer des fontes cyrilliques, chinoises,
  japonaises, etc. Mme si ce ne sont pas des fontes Unicodes, elles
  aideront  afficher des documents Unicode : au moins Netscape
  Communicator 4 et Java feront usage des fontes trangres si elles
  sont disponibles.

  Les programmes suivants sont utiles pour installer des fontes :

    "mkfontdir rpertoire" prpare un rpertoire de fontes utilisables
     par le serveur X. Il doit tre excut aprs avoir install les
     fontes dans un rpertoire.

    "xset fp+ rpertoire" ajoute un rpertoire au chemin de fontes
     actuel du serveur X. Pour que ce soit permanent, ajoutez une ligne
     "FontPath"  votre fichier /etc/XF86Config, dans la section
     "Files".

    "xset fp rehash" doit tre excut aprs avoir appel mkfontdir sur
     un rpertoire qui est dj contenu dans le chemin de fontes actuel
     du serveur X.

    "xfontsel" vous permet de parcourir les fontes installes en
     filtrant selon les diverses proprits des fontes.

    "xlsfonts -fn motif-de-recherche" liste toutes les fontes qui
     correspondent  un motif de recherche. Il affiche aussi diverses
     proprits des fontes. En particulier, "xlsfonts -ll -fn fonte"
     liste les proprits de la fonte CHARSET_REGISTRY et
     CHARSET_ENCODING, qui ensemble dterminent l'encodage de la fonte.

    "xfd -fn fonte" affiche une fonte page par page.

  Les fontes suivantes sont disponibles gratuitement (liste non
  exhaustive) :


    Celle contenues dans XFree86, quelquefois contenues dans un package
     spar. Par exemple, la SuSE a seulement les fontes 75 dpi normales
     dans le package "xf86" de base. Les autres fontes sont dans les
     packages "xfnt100", "xfntbig", "xfntcyr", "xfntscl".

    Les fontes internationales pour Emacs,
     ftp://ftp.gnu.org/pub/gnu/intlfonts/intlfonts-1.1.tar.gz.  Comme il
     a t mentionn prcdemment, elles sont utiles mme si vous
     prfrez XEmacs  GNU Emacs,  ou mme si vous n'utilisez pas Emacs
     du tout.


  22..33..  LLeess ffoonntteess UUnniiccooddee ppoouurr XX1111

  Les applications qui souhaitent pouvoir afficher du texte utilisant
  diffrentes alphabets (comme le cyrillique et le grec) en mme temps,
  peuvent le faire en utilisant les diffrentes fontes X pour chaque
  partie de texte.  C'est ce que font Netscape Communicator et Java.
  Cependant, cette approche est plus complique, parce que au lieu de
  travailler avec "Font" et "XFontStruct", le programmeur devra utiliser
  "XFonSet", et aussi parce que toutes les fontes dans le jeu de fontes
  doivent avoir les mmes dimensions.


    Markus Kuhn a assembl des fontes  largeur fixe (fixed width) de
     75 dpi avec Unicode couvrant le latin, le grec, le cyrillique,
     l'armnien, le gorgien, l'hbreu, et les critures symboliques.
     Elles couvrent les parties 1  10 et 13  15 de ISO-8859 en un seul
     jeu de fontes.  Cette fonte est ncessaire pour utiliser un xterm
     en mode UTF-8.  http://www.cl.cam.ac.uk/~mgk25/download/ucs-
     fonts.tar.gz

    Roman Czyborra a assembl une fonte 8x16/16x16  75 dpi avec
     l'encodage Unicode couvrant une partie norme d'Unicode.
     Telchargez unifont.hex.gz et hex2bdf depuis
     http://czyborra.com/unifont/ Elle n'est pas  largeur fixe : 8
     pixels de large pour les caractres europens, 16 pour les
     caractres chinois. Instructions d'installation :


       $ gunzip unifont.hex.gz
       $ hex2bdf < unifont.hex > unifont.bdf
       $ bdftopcf -o unifont.pcf unifont.bdf
       $ gzip -9 unifont.pcf
       $ cp unifont.pcf.gz /usr/X11R6/lib/X11/fonts/misc
       $ cd usr/X11R6/lib/X11/fonts/misc
       $ mkfontdir
       $ xset fp rehash





    Primoz Peterlin a assembl un famille de fontes ETL couvrant le
     latin, le grec, le cyrillique, l'armnien, le gorgien, et
     l'hbreu.  ftp://ftp.x.org/contrib/fonts/etl-unicode.tar.gz.
     Utilisez le programme "bdftopcf" pour l'installer.


  22..44..  UUnniiccooddee xxtteerrmm

  xterm fait partie de X11R6 et XFree86,  mais il est maintenu
  sparment par Tom Dickey.
  http://www.clark.net/pub/dickey/xterm/xterm.html.  Les nouvelles
  versions (patch niveau 109 et plus) supportent la conversion des
  touches (keystrokes) en UTF-8 avant de les envoyer  l'application qui
  tourne dans le xterm, et l'affichage des caractres Unicode que
  l'application renvoie comme une squence d'octets UTF-8.

  Pour obtenir un xterm UTF-8 fonctionnel, vous devez :


    Rapatrier http://www.clark.net/pub/dickey/xterm/xterm.tar.gz.

    Le configurer en excutant "./configure -enable-wide-chars...",
     puis le compiler et l'installer.

    Avoir une fonte Unicode  largeur fixe installe. ucs-fonts.tar.gz
     de Markus Kuhn (voir ci-dessus) est fait pour a.

    Lancer "xterm -u8 -fn fixed". L'option "-u8" enclenche le support
     d'Unicode et d'UTF-8. La fonte "fixed" est celle de Markus Khun.

    Jeter un oeil aux fichiers-exemples contenus dans le package ucs-
     fonts de Markus Khun :



       $ cd .../ucs-fonts
       $ cat quickbrown.txt
       $ cat utf-8-demo.txt



  Vous devriez voir (entre autre) des caractres grecs et cyrilliques.

    Pour configurer xterm pour qu'il utilise le support UTF-8 ds le
     lancement, ajoutez la ligne "XTerm*utf8:1"  votre $HOME/.Xdefaults
     (pour vous seul). Je ne recommande pas de changer directement
     /usr/X11R6/lib/X11/app-defauts/XTerm, parce que vos changements
     seront effacs lorsque vous installerez une nouvelle version de
     XFree86.

    Si vous avez aussi chang le nom de la fonte, vous aurez besoin
     d'une ligne "*VT100*font: votre-fonte" dans votre fichier
     $HOME/.Xdefaults.  Pour les fontes "fixes" ce n'est pas ncessaire,
     puisque "fixed" est la valeur par dfaut de toute faon.


  22..55..  DDiivveerrss

  Un petit programme qui teste si une console Linux est en mode UTF-8
  peut tre trouv dans le package
  ftp://sunsite.unc.edu/pub/Linux/system/keyboards/x-lt-1.18.tar.gz de
  Ricardas Cepas. Ce sont les fichiers testUTF-8.c et testUTF8.c.


  33..  CCoonnffiigguurraattiioonn ddeess llooccaalleess



  33..11..  LLeess ffiicchhiieerrss eett llee kkeerrnneell

  Vous pouvez maintenant utiliser n'importe quel caractre Unicode dans
  les noms de fichiers. Ni le kernel ni aucun utilitaire systme ne
  ncessite de modifications.  Ceci parce que les noms de fichiers dans
  le kernel peuvent tre n'importe quoi qui ne contient ni octet nul, ni
  '/' (utilis pour dlimiter les sous-rpertoires).  Quand ils sont
  encods en utilisant UTF-8, les caractres non-ASCII ne seront jamais
  encods en utilisant un octet nul ou un slash.  La seule consquence
  est que les noms de fichiers et de rpertoires occupent plus d'octets
  qu'ils ne contiennent de caractres.  Par exemple, un nom de fichier
  contenant cinq caractres grecs apparatra pour le kernel comme un nom
  de fichier de 10 octets.  Le kernel ne sait pas (et n'a pas besoin de
  savoir) que ces octets sont affichs en grec.

  C'est une thorie gnrale, qui est vraie tant que vos fichiers
  restent sur un systme Linux.  Sur les systmes de fichiers utiliss
  depuis d'autres systmes d'exploitation,  mount possde des options
  pour contrler la conversion des noms de fichiers de/vers UTF-8 :


    Les systmes de fichiers "vfat" ont  une option "utf8".
     Voir le fichier
     file:/usr/src/linux/Documentation/filesystems/vfat.txt.  Quand vous
     donnez  mount une option "iocharset" diffrente de celle utilise
     par dfaut (qui est "iso8859-1"), les rsultats avec et sans
     l'option "utf8" ne sont pas cohrents. Par consquent, je ne
     conseille pas d'utiliser l'option "iocharset" de mount.

    Les systmes de fichiers "msdos", "umsdos" ont la mme option de
     montage, mais il semble qu'elle n'ait pas d'effet.

    Le systme de fichiers "iso9660" a une option de montage "utf8".
     Voir file:/usr/src/linux/Documentation/filesystems/isofs.txt

     partir des kernels Linux 2.2.x, le systme de fichier "ntfs" a
     une option de montage"utf8".
     Voir file:/usr/src/linux/Documentation/filesystems/ntfs.txt

  Les autres systmes de fichiers (nfs, smbfs, ncpfs, hpfs, etc.) ne
  convertissent pas les noms de fichiers. Par consquent ils accepteront
  les noms de fichier Unicode encods en UTF-8 seulement si l'autre
  systme d'exploitation les supporte.  Rappelez vous que pour qu'une
  option de montage soit applique aux prochains montages,  vous devez
  l'ajouter  la quatrime colonne de la ligne correspondante dans
  /etc/fstab.


  33..22..  LLee kkeerrnneell eett lleess ttttyyss

  Les ttys sont en quelque sorte des tubes bidirectionnels entre deux
  programmes, autorisant des choses comme la rptition (echoing) ou
  l'dition de la ligne de commande.  Quand dans un xterm, vous excutez
  la commande "cat" sans arguments, vous pouvez entrer et diter autant
  de lignes que vous voulez, elles seront rptes en retour ligne par
  ligne.  Les actions d'dition du kernel ne sont pas correctes, en
  particulier les touche Backspace et Tab ne seront pas traites
  correctement.

  Pour rsoudre ce problme, vous devez :


    Appliquer le patch linux-2.0.35-tty.diff ou linux-2.2.9-tty.diff ou
     linux-2.3.12-tty.diff et recompiler votre kernel.

    Si vous utilisez la glibc2, appliquer le patch glibc211-tty.diff et
     recompiler votre libc. Si vous n'tes pas aussi aventureux, il
     suffit de patcher une version dj installe avec le fichier
     inclus : glibc-tty.diff

    Appliquer le patch stty.diff  GNU sh-utils-1.16b, et recompiler le
     programme stty. Testez le ensuite en utilisant stty -a et stty
     iutf8.

    Ajouter la commande stty iutf8 au script unicode_start, et la
     commande stty -iutf8 au script unicode_stop.

    Appliquer le patch xterm.diff  xterm-109, et recompiler "xterm",
     puis le tester en lanant xterm -u8 / xterm +u8 et en lanant stty
     -a et un cat interactif  l'intrieur.

  Pour que ce changement soit persistant mme  travers rlogin et
  telnet, vous devrez aussi :


    Dfinir des nouvelles valeurs pour la variable d'environnement
     TERM, "linux-utf8" comme alias pour "linux", et "xterm-utf8" comme
     alias pour "xterm". Si vous avez la bibliothque ncurses sur votre
     systme et la base de donnes /usr/lib/terminfo (ou
     /usr/share/terminfo), faites cela en xecutant


       $ tic linux-utf8 . terminfo
       $ tic xterm-utfu . terminfo




  sur un compte utilisateur (cela crera les entres terminfo dans votre
  repertoir $HOME/.terminfo).  Voil linux-utf8.terminfo et xterm-
  utf8.terminfo.
  Je ne recommande pas de lancer ces commandes en tant que root, parce
  que cela crera les entres terminfo dans /urs/lib/terminfo, o, elles
  seront probablement effaces lors de la prochaine mise  jour de votre
  systme.  Si votre systme possde un fichier /etc/termcap, vous
  devriez aussi diter ce fichier : copiez les entres linux et xterm,
  et donnez leur les nouveaux noms "linux-utf8" et "xterm-utf8".  Le
  fichier  termcap.diff contient un exemple.

     chaque fois que vous appelez "unicode_start" et "unicode_stop"
     depuis la console, excutez aussi "export TERM =linux-utf8", ou
     "export TERM=linux", respectivement.

    Appliquer le patch xterm2.diff  xterm-0.9, recompiler "xterm", et
     et enlever toutes les lignes "XTerm*termName" des fichiers
     /usr/X11R6/lib/X11/app-defaults/XTerm et $HOME/.Xdefaults.
     Maintenant xterm donne  TERM la valeur "xterm-utf8" plutt que
     "xterm".

    Appliquer les patches netkit.diff, netkitb.diffet telnet.diff puis
     recompiler "rlogind" et "telnetd". Maintenant rlogin et telnet
     mettent tty en mode d'dition UTF-8  chaque fois que la variable
     d'environnement TERM est "linux-ut8" ou "xterm-utf8".


  33..33..  CCoonnvveerrssiioonn ddee ddoonnnneess ggnnrraalleess

  Vous aurez besoin d'un programme pour convertir vos fichiers texte
  locaux (probablement ISO-8859-1) en UTF-8.  L'alternative serait de
  continuer  utiliser des textes qui utilisent diffrents encodages sur
  la mme machine, mais ce n'est pas une bonne solution sur le long
  terme.  Un de ces programmes est "iconv", qui est livr avec la
  glibc-2.1. Tapez simplement


       icon --from-code=ISO-8859-1 --to-code=UTF-8 < vieux_fichier > nouveau_fichier




  Voici deux scripts shell trs pratiques, appels  "i2u" i2u.sh (pour
  conversion de ISO  UTF) et  "u2i" u2i.sh (pour conversion de UTF 
  ISO).  [skip adapt..]

  Si vous n'avez pas la glibc-2.1 et iconv installs, vous pouvez
  utiliser GNU recode 3.5  la place.  "i2u" i2u_recode.sh est "recode
  ISO-8859-1..UTF-8" "u2i" u2i_recode.sh est "recode UTF-8..ISO-8859-1".
  ftp://ftp.iro.umontreal.ca/pub/recode/recode-3.5.tar.gz
  ftp://ftp.gnu.org/pub/gnu/recode/recode-3.5.tar.gz
  Notes : vous devez utiliser GNU recode 3.5 ou plus. Pour compiler GNU
  recode sur des plateformes sans glibc-2 (c'est  dire sur toutes les
  plateformes sauf les systmes Linux rcents), vous devez le configurer
  avec "--disable-nls", autrement l'dition des liens chouera.

  Sinon, vous pouvez aussi utiliser CLISP  la place.  Voici "i2u" et
  "u2i" en version lisp : i2u.lsp et u2i.lsp.
  Note : Vous devez avoir une version de CLISP qui date au plus de
  juillet 1999.
  ftp://clisp.cons.org/pub/lisp/clisp/source/clispsrc.tar.gz
  D'autres programmes de conversion de donnes existent, mais ils sont
  moins puissants que GNU recode. Ce sont

    "trans"
     ftp://ftp.informatik.uni-
     erlangen.de/pub/doc/ISO/charsets/trans113.tar.gz

    "tcs" qui vient du systme d'exploitation Plan9 :
     ftp://ftp.informatik.uni-
     erlangen.de/pub/doc/ISO/charsets/tcs.tar.gz


    et "utrans/uhtrans/hutrans" par G.Adam Stanislav
     <adam@whizkidtech.net>
     ftp://ftp.cdrom.com/pub/FreeBSD/distfiles/i18ntools-1.0.tar.gz


  33..44..  LLeess vvaarriiaabblleess dd''eennvviirroonnnneemmeenntt llooccaalleess

  Vous pouvez avoir les variables d'environnement suivantes
  positionnes, contenant les noms de locales :


     LLAANNGGUUAAGGEE
        Remplacement pour LC_MESSAGES. Seulement utilis par GNU
        gettext.


     LLCC__AALLLL
        Remplacement pour toute les autres variables LC_* :


     LLCC__CCTTYYPPEE,, LLCC__MMEESSSSAAGGEESS,, LLCC__CCOOLLLLAATTEE,, LLCC__NNUUMMEERRIICC,, LLCC__MMOONNEETTAARRYY,, LLCC__TTIIMMEE
        Ce sont des variables individuelles pour : le type des
        caractres et leur encodage, les messages en langue maternelle,
        les rgles de classement, le format des nombres, le format des
        montants montaires, l'affichage de la date et de l'heure.


     LLAANNGG
        Valeur par dfaut pour toutes les variables LC_*

  (Voir `man 7 locale' pour une description dtaille.)

  Chacune des variables LC_* et LANG peuvent contenir un nom de locale
  de la forme suivante :

       language[_territory[.codeset]][@modifier]


  O _l_a_n_g_u_a_g_e est un code de langue ISO 639 (en minuscules), _t_e_r_r_i_t_o_r_y
  est un code de pays ISO 3166 (en majuscules), _c_o_d_e_s_e_t dsigne une
  table de caractres, et _m_o_d_i_f_i_e_r d'autres attributs particuliers (par
  pour exemple indiquer un dialecte particulier d'une langue, ou une
  orthographe non standard).

  LANGUAGE peut contenir plusieurs noms de locale, spars  par deux
  points (:).

  Pour dire  votre systme et  toutes les applications que vous
  utilisez UTF-8, vous devez ajouter un suffixe d'UTF-8  vos noms de
  locales. Par exemple, si vous utilisiez


       LANGUAGE=de:fr:en
       LC_CTYPE=de_DE




  vous le changeriez en


       LANGUAGE=de.UTF-8:fr.UTF-8:en.UTF-8
       LC_CTYPE=de_DE.UTF-8



  33..55..  CCrreerr lleess ffiicchhiieerrss ppoouurr llee ssuuppppoorrtt ddeess llooccaalleess

  Si vous avez la glibc-2.1 ou glibc-2.1.1 ou glibc-2.1.2 installe,
  vrifiez d'abord en utilisant "localedef -help" que le rpertoire
  systme pour le tables de caractres est /usr/share/i18n/charmaps.
  Puis appliquez au fichier /usr/share/i18n/charmaps/UTF8 le patch
  glibc21.diff ou glibc211.diff ou glibc212.diff, respectivement.  Puis
  crez les fichiers de support pour toute les locales UTF-8 que vous
  voulez utiliser, par exemple :



       $ localedef -v -c -i de_DE -f UTF8 /usr/share/locale/de_DE.UTF-8




  Gnralement vous n'avez pas besoin de crer des variables appeles
  "de" ou "fr" sans suffixe pour le code du pays, parce que ces locales
  sont normalement utilises seulement par la variable LANGUAGE, et pas
  par les variables LC_*. De plus LANGUAGE est seulement utilis en
  remplacement de LC_MESSAGES.


  33..66..  AAjjoouutteerr llee ssuuppppoorrtt ppoouurr llaa bbiibblliiootthhqquuee CC

  La glibc-2.2 supportera les locales multi-octets (de plusieurs
  octets), en particulier les locales UTF-8 cres plus haut. Mais les
  glibc-2.1 et 2.1.1 ne la supportent pas rellement. Par consquent le
  seul effet rel de la cration des fichiers
  /usr/local/share/de_DE.UTF-8/* ci dessus est que setlocale(LC_ALL,"")
  retournera "de_DE.UTF-8", conformment  vos variables
  d'environnement, au lieu d'enlever le suffixe "UTF-8".

  Pour ajouter le support pour la locale UTF-8, vous devriez compiler et
  installer la bibliothque 'libutf8_plug.so', depuis
  libutf8-0.5.2.tar.gz.  Puis vous pouvez positionner la variable
  d'environnement LD_PRELOAD pour qu'elle pointe sur la bibliothque
  installe :


       export LD_PRELOAD=/usr/local/lib/libutf8_plug.so




  Alors, dans chaque programme lanc avec cette variable d'environnement
  positionne, les fonctions de libutf8_plug.so seront appeles  la
  place des originales dans /lib/libc.so.6. Pour plus d'informations sur
  LS_PRELOAD, voyez "man 8 ld.so".

  Tout cela ne sera plus ncessaire quand la glibc-2.2 sortira.


  33..77..  CCoonnvveerrssiioonn ddeess ccaattaalloogguueess ddee mmeessssaaggeess

  Maintenant ajoutons un contenu  ces nouvelles locales. Les commandes
  /bin/sh suivantes convertiront vos catalogues de messages au format
  UTF-8. Elles doivent tre lances en tant que root, et ncessitent les
  programmes 'msgfmt' et 'msgunfmt' de GNU gettext-0.10.35 convert-
  msgcat.sh.
  Ceci non plus ne sera plus ncessaire une fois que la glibc-2.2 sera
  sortie, parce qu'alors la fonction gettext convertira les chanes de
  caractres de faon approprie depuis la table de caractres du
  traducteur vers la table de caractres de l'utilisateur, en utilisant
  soit iconv soit librecode.
  44..  AApppplliiccaattiioonnss ssppcciiffiiqquueess..



  44..11..  LLee rrsseeaauu



  44..11..11..  rrllooggiinn

  Marche bien avec les patches mentionns prcdemment.


  44..11..22..  tteellnneett

  Telnet n'est pas ne traite pas les caractres 8-bits (il n'est
  pas"8-bit-clean") par dfaut. Pour pouvoir envoyer des codes de
  touches Unicode  un hte distant, vous devez mettre telnet en mode
  "outbinary". Il y a deux faons de faire cela :



       $ telnet -L <hote>




  et



       $telnet
       telnet> set outbinary
       telnet> open <hote>




  en outre, utilisez les patches mentionns prcdemment.


  44..22..  LLeess nnaavviiggaatteeuurrss



  44..22..11..  NNeettssccaappee

  Netscape 4.05 ou plus peut afficher des documents HTML en encodage
  UTF-8. Tout ce qu'un document ncessite est la ligne suivante, situe
  entre les tags <head> et </head>


       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">




  Netscape 4.05 ou plus peut aussi afficher du HTML et du texte en
  encodage UCS-2 avec le [byte-order mark].
  http://www.netscape.com/computing/download/


  44..22..22..  LLyynnxx

  Lynx 2.8 a un cran d'options (touche 'O') qui permet de slectionner
  la table de caractres utilise  l'affichage. Quand il, tourne dans
  un xterm ou depuis une "Linux console" en mode UTF-8, slectionnez
  "UNICODE UTF-8".

  Maintenant, encore une fois, tout ce qu'un document ncessite est la
  ligne suivante, entre les tags <head> et </head> :


       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">




  Quand vous visualisez des fichiers texte encods en UTF-8, vous devez
  aussi passer  la ligne de commande  l'option
  "-assume_local_charset=UTF-8" (affecte seulement les URLs de type
  file:/...) ou "-assume_charset=UTF-8" (affecte toute les URLs). Sinon,
  dans Lynx-2.2.8, vous pouvez, dans l'cran d'options,  changer le jeu
  de caractres suppos par dfaut ("assumed document character set") en
  "utf-8".

  Il y a aussi, dans l'cran d'options, une option permettant de choisir
  le jeu de caractres par dfaut ("preferred document character set"),
  mais cela n'a pas d'effet, au moins avec les URLs file:/... et
  http://... servies par apache-1.3.0.

  Cependant, il y a un problme concernant les espaces et les fins de
  lignes : regardez  la section russe de x-utf-8.html, ou
  utf-8-demo.txt.

  Notez aussi que dans Lynx-2.8.2, configur avec l'option -enable-
  prettysrc, les jolies combinaisons de couleurs ne marchent plus
  correctement quand le jeu de caractres pour l'affichage  t
  positionn  "UNICODE-UTF-8". Ce problme est rsolu par le patch
  lynx282.diff.

  D'aprs les dveloppeurs de lynx : "Pour une utilisation srieuse de
  l'affichage UTF-8 avec Lynx, il est toujours recommand de compiler
  avec la bibliothque slang et -DSLANG_MBCS_HACK."
  ftp://ftp.gnu.org/pub/gnu/lynx/lynx-2.8.2.tar.gz
  http://lynx.browser.org/
  http://www.slcc.edu/lynx/
  ftp://lynx.isc.org/


  44..22..33..  PPaaggeess ddee tteesstt

  Des pages de test pour les navigateurs peuvent tre trouves sur les
  pages d'Alan Wood et James Kass  :
  http://www.hclrss.demon.co.uk/unicode/#links,
  http://home.att.net/~jameskass/



  44..33..  LLeess ddiitteeuurrss



  44..33..11..  yyuuddiitt

  Le programme yudit de Gspr Sinai http://czyborra.com/yudit/ est un
  diteur de texte unicode de premier ordre pour le systme X Window.
  Il supporte le traitement simultan de beaucoup de langages, mthodes
  d'entre, conversions de caractres locaux standards.  Il est quip
  pour supporter l'entre de texte dans tous les langages avec seulement
  un clavier anglais, en utilisant des tables de configuration du
  clavier.
  Il peut tre compil en 3 versions : interface graphique Xlib , KDE,
  ou Motif.

  Il peut tre personnalis trs facilement. Typiquement, vous voudrez
  modifier votre fonte. Depuis le menu font je choisis "Unicode". Puis,
  puisque la commande "xlsfonts '*_*-iso10646-1" donnait toujours un
  affichage ambigu, je choisis un taille de fonte de 13 (pour
  correspondre  la fonte fixe de 13 pixels de Markhus Kuhn).

  Ensuite, vous personnaliserez votre mthode d'entre. Les mthodes
  "Straight", "Unicode" et "SGML" sont les plus intressantes. Pour
  avoir des dtails sur les autres mthodes d'entres incorpores,
  regardez dans "/usr/local/share/yudit/data/".

  Pour qu'un changement devienne un rglage par dfaut pour les
  prochaines sessions, ditez votre fichier $HOME/.yuditrc.

  Les fonctionnalits gnrales de l'diteur sont limites  l'dition,
  le copier-coller, et le "chercher-remplacer" (search&replace).  Pas de
  fonction d'annulation (undo).


  44..33..22..  mmiinneedd9988

  mined98 est un petit diteur de texte de Michiel Huisjes, Achim Mller
  et Thomas Wolff : http://www.inf.fu-berlin.de/~wolff/mined.html.  Il
  vous permet d'diter des fichier encods en UTF-8 ou 8 bits, dans un
  xterm UTF-8 ou 8-bits.  Il dispose aussi de puissantes fonctionnalits
  pour entrer les caractres Unicode.

  Quand mined est lanc  dans un xterm ou une console Linux en mode
  UTF-8, vous devriez positionner la variable d'environnement utf8_term,
  ou appeler mined avec l'option -U.

  mined vous permet d'diter des fichiers encods aussi bien en UTF-8
  qu'en 8-bits. Par dfaut il utilise un heuristique d'auto-dtection.
  Si vous ne voulez pas vous reposer sur des heuristiques, passez
  l'option -u  la ligne de commande lorsque vous ditez un fichier
  UTF-8, ou +u lorsque vous ditez un fichier encod en 8 bits.  Vous
  pouvez changer l'interprtation  n'importe quel moment depuis
  l'diteur : il affiche l'encodage ("L:h" pour du 8-bits, "U:h" pour de
  l'UTF-8) dans la ligne de menu. Vous pouvez cliquer sur le premier de
  ces caractres pour le changer.

  Quelques bmols :

    Le binaire Linux dans la distribution est dpass et ne supporte
     pas UTF-8. Vous devrez recompiler un binaire  partir des sources.
     Installez ensuite src/mined dans /usr/local/bin/mined et
     doc/mined.help dans /usr/local/man/cat1/mined.1, de faon  ce que
     ESC h le trouve.

    mined ignore votre rglage "stty erase". Quand votre touche
     backspace renvoie un code ASCII 127, et que vous avez positionn
     "stty erase ^?" - ce qui est finalement le rglage le plus sr -
     vous devez appeler mined avec l'option -B de faon  ce que la
     touche backspace efface le caractre  gauche du curseur.

    Les touches "Home", "End", "Delete" ne marchent pas.


  44..33..33..  vviimm

  vim (depuis la version 5.4m) supporte les locales multi-octets, mais
  seulement si la bibliothque X a le mme support, et seulement pour
  les encodages avec au moins deux octets par caractres, i.e les
  encodages ISO-2022. Il ne supporte pas l'UTF-8.


  44..33..44..  eemmaaccss

  Avant tout, vous devriez lire la section "International Character Set
  Support" (noeud "International") dans le manuel d'Emacs. En
  particulier, notez que vous devez dmarrer Emacs avec la commande


       $ emacs -fn fontset-standard




  pour qu'il utilise un jeu de fontes comprenant beaucoup de caractres
  internationaux.

   court terme, le package emacs-utf
  http://www.cs.ust.hk/faculty/otfried/Mule/ d'Otfried Cheong procure un
  "unicode-utf-8" pour Emacs. Aprs avoir compil le programme
  "utf2mule" et l'avoir install quelque part dans votre $PATH,
  installez aussi unicode.el, muleuni-1.el, unicode_char.el quelque
  part, et ajoutez les lignes


            (setq load-path (cons "/home/user/somewhere/emacs" load-path))
            (if (not (string-match "XEmacs" emacs-version))
              (progn
                (require 'unicode)
                (if (eq window-system 'x)
                  (progn
                    (create-fontset-from-fontset-spec
                      "-misc-fixed-medium-r-normal-*-12-*-*-*-*-*-fontset-standard")
                    (create-fontset-from-fontset-spec
                      "-misc-fixed-medium-r-normal-*-13-*-*-*-*-*-fontset-standard")
                    (create-fontset-from-fontset-spec
                      "-misc-fixed-medium-r-normal-*-14-*-*-*-*-*-fontset-standard")
                    (create-fontset-from-fontset-spec
                      "-misc-fixed-medium-r-normal-*-15-*-*-*-*-*-fontset-standard")
                    (create-fontset-from-fontset-spec
                      "-misc-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard")
                    (create-fontset-from-fontset-spec
                      "-misc-fixed-medium-r-normal-*-18-*-*-*-*-*-fontset-standard")))))




   votre $HOME/.emacs. Pour activer un des jeux de fontes, utilisez
  l'item "Set Font/FonSet" du menu mule, ou Shift-down-mouse-1.  Pour
  l'instant les jeux de fontes avec des hauteurs de 15 et 13 ont le
  meilleur support Unicode, grce aux fontes 9x15 et 6x13 de Markus
  Kuhn. Pour ouvrir un fichier encod en UTF-8, vous pouvez taper


       M-x universal-coding-system-argument unicode-utf8 RET
       M-x find-file filename RET




  ou




  C-x RET c unicode-utf8 RET
  C-x C-f filename RET




  Notez que cela marche avec Emacs seulement en mode fentre, pas en
  mode terminal.

  Richard Stallman prvoit  long terme d'ajouter un support d'UTF-8
  intgr  Emacs.


  44..33..55..  XXeemmaaccss


  (Cette section est crite par Gilbert Baumann.)

  Voici comment apprendre  XEmacs (20.4 configur avec MULE) l'encodage
  UTF-8. Malheureusement vous aurez besoin des sources pour pouvoir le
  patcher.

  D'abord vous aurez besoin de ces fichiers fournis par Tomohiko
  Morioka :

  http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/xemacs-21.0-b55-emc-
  b55-ucs.diff

  http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/xemacs-ucs-
  conv-0.1.tar.gz

  Le .diff est un diff pour les sources C. Le tarball contient du code
  elisp, qui fournit beaucoup de tables de code qui permettent la
  conversion depuis et vers Unicode. Comme le nom du diff le suggre, il
  est prvu pour XEmacs-21. J'ai eu besoin d'aider un peu 'patch'.  La
  diffrence la plus notable avec mes sources XEmacs-20.4 est que file-
  coding.[ch] tait appel mule-coding.[ch]

  Pour ceux qui connaissent peu XEmacs-MULE (comme moi) voici un guide
  rapide :

  Ce que nous appelons un encodage est appel par MULE "coding system".
  Les commandes les plus importantes sont :



       M-x set-file-coding-system
       M-x set-buffer-process-coding-system [comint buffer]




  et la variable 'file-coding-system-alist', qui guide 'find-file' pour
  qu'il trouve l'encodage utilis. Une fois que tout marchait, la
  premire chose que j'ai faite fut ceci <gb-hacks.el>.

  Ce code cherche une ligne de mode spciale commenant par _*_ quelque
  part dans les 600 premiers octets du fichier qui va tre ouvert. Si
  cette ligne contient un champ "Encoding: xyz;" et que l'encodage xyz
  ("coding system" dans le langage d'Emacs) existe, il le slectionne.
  Donc maintenant vous pouvez utiliser :





  ;;;  _*_ Mode: Lisp; Syntax: Common-Lisp; Package: CLEX; Encoding:
  utf-8; _*_




  et Emacs entrera en mode utf-8  partir de l.

  Une fois que tout marchait, j'ai dfini une macro pour \u03BB (lambda
  grec) comme ceci :



       (defmacro \u03BB (x) '(lambda .,x))





  44..33..66..  nneeddiitt



  44..33..77..  xxeeddiitt

  En thorie, xedit devrait tre capable d'diter des fichiers UTF-8 si
  vos locales sont configures en consquence (voir au dessus), et que
  vous ajoutez la ligne "Xedit*international: true"  votre fichier
  $HOME/.Xdefaults.  En pratique, il reconnatra les encodages UTF-8 des
  caractres non ASCII, mais il les affichera comme des squences de
  caractres "@".


  44..33..88..  aaxxee

  En thorie, axe devrait tre capable d'diter des fichiers UTF-8 si
  vos locales sont configures en consquence (voir au dessus), et que
  vous ajoutez la ligne "Axe*International: true"  votre fichier
  $HOME/.Xdefaults.  En pratique, il vous laissera simplement un joli
  fichier core.


  44..33..99..  ppiiccoo



  44..33..1100..  TTeeXX

  Les distributions de teTex 0.9 (et suprieures) contiennent  une
  adaptation Unicode de TeX, appele Omega
  (http://www.gutenberg.eu.org/omega/
  ftp://ftp.ens.fr/pub/tex/yannis/omega), mais est-ce que quelqu'un
  connatrait un tutorial sur ce systme ?

  Autres liens peut-tre en rapport :
  http://www.dante.de/projekte/nts/NTS-FAQ.html,
  ftp://ftp.dante.de/pub/tex/language/chinese/CJK/


  44..44..  LLeess llooggiicciieellss ddee ccoouurrrriieerr lleeccttrroonniiqquuee

  MIME : RFC 2279 dfinit les jeux de caractres UTF-8 et MIME, qui
  peuvent tre convertis en encodage 8-bits, quoted-printable ou base64.
  L'ancienne norme MIME UTF-7 (RFC 2152) est considre comme tant
  obsolte ("deprecated") et ne devrait plus tre utilise.

  Les clients mail sortis aprs le 1er janvier 1999 devraient tre
  capables d'envoyer et d'afficher des courriers encods en UTF-8, sous
  peine d'tre considrs comme incomplets. Mais ces courriers doivent
  contenir les tiquettes (labels) MIME :



       Content-Type: text/plain; charset=UTF-8
       Content-Transfer-Encoding: 8-bit




  Envoyer simplement un fichier UTF-8 vers "mail" via un _p_i_p_e sans faire
  attention aux labels MIME ne fonctionnera pas.  Les gens qui
  implmentent des clients de courrier devraient jeter un oeil 
  http://www.imc.org/imc-intl/ et http://www.imc.org/mail-i18n.html

  Parlons maintenant des clients mail  individuels (ou "mail user
  agents") :


  44..44..11..  ppiinnee

  La situation pour une version non patche  de pine 4.10 est la
  suivante.

  Pine ne fait pas de conversion de jeu de caractres. Mais il vous
  permet de voir des courriers UTF-8 dans une fentre texte UTF-8
  (console Linux ou xterm).

  Normalement, Pine se plaindra du fait qu'il y a diffrents jeux de
  caractres  chaque fois que vous visualiserez un courrier encod en
  UTF-8. Pour vous dbarrasser de cet avertissement, choisissez S
  (setup), puis C (config), et changez la valeur de "character set" 
  UTF-8.  Cette option ne fera rien  part rduire le nombre
  d'avertissements, puisque Pine ne connat pas UTF-8 en interne.

  Notez aussi que pour Pine la notion de caractres Unicode est trs
  limite : il affichera les caractres latins et grecs, mais ce sont
  les seuls types de caractres Unicode qu'il connat.

  Un patch de Robert Brady
  http://www.ents.susu.soton.ac.uk/~robert/pine-utf8-0.1.diff ajoute 
  Pine un support UTF-8. Avec ce patch, il peut dcoder et afficher les
  enttes et le corps des messages correctement.  Ce patch ncessite
  GNOME libunicode http://cvs.gnome.org/lxr/source/libunicode/.


  44..44..22..  KKmmaaiill

  Kmail (comme tout KDE 1.0) ne contient absolument aucun support pour
  les mails en UTF-8.


  44..44..33..  NNeettssccaappee CCoommmmuunniiccaattoorr

  Le Messenger de Netscape Communicator peut envoyer et afficher des
  mails encods en UTF-8, mais cela ncessite quelques interventions
  manuelles de l'utilisateur.

  Pour envoyer un mail encod en UTF-8 : aprs avoir ouvert la fentre
  "Compose", mais avant de commencer  composer le message, slectionnez
  dans le menu "View -> Character Set ->Unicode (UTF-8)" puis composez
  votre message et envoyez le.

  Quand vous recevez un courrier encod en UTF-8, Netscape ne l'affiche
  malheureusement pas en UTF-8 directement, et ne donne mme pas un
  indice visuel montrant que le courrier a t encod en UTF-8. Vous
  devez slectionner manuellement l'option adquate dans "View ->
  Character Set -> Unicode (UTF-8)".  Pour afficher les courriers UTF-8,
  Netscape utilise des fontes diffrencies.  Vous pouvez ajuster la
  fonte utilise dans la bote de dialogue "Edit -> Preferences ->
  Fonts". Choisissez la catgorie de fontes "Unicode".


  44..44..44..  EEmmaaccss ((rrmmaaiill,, vvmm))



  44..55..  AAuuttrreess aapppplliiccaattiioonnss eenn mmooddee tteexxttee



  44..55..11..  lleessss

  Telchargez ftp://ftp.gnu.org/pub/gnu/less/less-340.tar.gz et
  appliquez le patch less-340-utf-2.diff de Robert Brady
  <rwb197@ecs.soton.ac.uk>.  Puis positionnez la variable
  d'environnement  LESSCHARSET :


       export LESSCHARSET=utf-8




  Si vous avez positionn une variable d'environnement LESSKEY, vrifiez
  aussi que le fichier vers lequel elle pointe ne dfinit pas LESS
  CHARSET.  Si ncessaire, rgnrez  ce fichier en utilisant la com
  mande


  44..55..22..  eexxppaanndd,, wwcc

  Procurez vous GNU textutils-2.0 et appliquez le patch
  textutils-2.0.diff, puis lancez configure.
  Ajoutez "#define HAVE_MBRTOWC 1", "#define HAVE_FPUTWC 1"  config.h.
  Dans src/Makefile, modifiez CFLAGS et LDFLAGS pour qu'ils incluent les
  rpertoires o libutf8 est install, puis recompilez.


  44..55..33..  ccooll,, ccoollccrrtt,, ccoollrrmm,, ccoolluummnn,, rreevv,, uull

  Procurez vous le package util-linux-2.9y, configurez le, puis
  dfinissez ENABLE_WIDECHAR dans defines.h , changez le "# if 0" en "#
  if 1" dans lib/widechar.h. dans text-utils/Makefile, modifiez CFLAGS
  et LDFLAGS pour qu'ils incluent les rpertoires o libutf8 est
  install. Puis recompilez.


  44..55..44..  ffiigglleett

  Figlet 2.2 a une option pour grer l'entre en UTF-8 : "figlet -C
  utf-8".


  44..55..55..  kkeerrmmiitt

  Le programme de communication srie C-Kermit
  http://www.columbia.edu/kermit/, dans les versions 7.0beta10 et
  suprieures, comprend les encodages de fichier et de transfert UTF-8
  et UCS-2, et l'encodage de terminal UTF-8.  La documentation de ces
  caractristiques peut tre trouve 
  ftp://kermit.columbia.edu/kermit/test/text/ckermit2.txt


  44..66..  AAuuttrreess aapppplliiccaattiioonnss XX1111

  La Xlib de X11 ne peut malheureusement pas encore localiser UTF-8,
  cela devrait tre travaill prochainement.


  55..  CCoommmmeenntt ffaaiirree ppoouurr qquuee vvooss pprrooggrraammmmeess ccoommpprreennnneenntt UUnniiccooddee



  55..11..  CC//CC++++

  Le type C 'char' est 8-bits et restera 8-bits parce qu'il dsigne la
  plus petite unit de donnes adressable. Divers amnagements sont
  disponibles :



  55..11..11..  PPoouurr llee ttrraaiitteemmeenntt ddee tteexxttee nnoorrmmaall


  Le standard ISO/ANSI C contient, dans une correction qui fut ajoute
  en 1995, un type de caractre cod sur 16 bits `wchar_t', un ensemble
  de fonctions comme celles contenues dans <string.h> et  <ctype.h>
  (dclares respectivement dans <wchar.h> et <wctype.h>), et un
  ensemble de fonctions de conversion entre  `char *' et `wchar_t *'
  (dclares dans <stdlib.h>).

  Voici de bonnes rferences pour cette interface de programmation :


    Le manuel de GNU libc-2.1, chapitres 4 "Characters Handling" et 6
     "Character Set Handling"

    Les pages de manuel man-mbswcs.tar.gz

    La rfrence de la bibliothque C Dinkumware
     http://www.dinkumware.com/htm_cl/

    La spcification Single Unix d'OpenGroup http://www.UNIX-
     systems.org/online.html

  Avantages de cette interface de programmation :

    C'est un standard non propritaire.

    Ces fonctions font ce qu'il faut, selon les locales de
     l'utilisateur. Tout ce qu'un programme doit faire est d'appeler
     setlocale(LC_ALL,"");.

  Inconvnients de cette interface de programmation :

    Certaines de ces fonctions ne sont pas "multithread-safe" parce
     qu'elles conservent un tat interne cach entre les appels de
     fonction.

    Il n'y a pas de type de donne de premire classe. Par consquent
     cette API ne peut pas tre utilise raisonnablement pour tout ce
     qui ncessite plus d'une locale ou d'un jeu de caractres au mme
     moment.

    La plupart des systmes d'exploitation ont un  mauvais support de
     cette interface de programmation.


  55..11..11..11..  NNootteess ccoonncceerrnnaanntt llaa ppoorrttaabbiilliitt

  Une variable `wchar_t' peut tre encode en Unicode ou non.  Ceci
  dpend de la plateforme et quelquefois aussi des locales.  Une
  squence multi-octets `wchar_t' peut tre encode en UTF-8 ou non
  selon la plateforme, et parfois selon les locales.

  En dtails, voici ce que la Single Unix specification
  <http://www.UNIX-systems.org/online.html> dit  propos du type
  `wchar_t' :

  _T_o_u_s _l_e_s _c_o_d_e_s _d_e _c_a_r_a_c_t__r_e_s _1_6 _b_i_t_s _d_a_n_s _u_n _p_r_o_c_e_s_s_u_s _d_o_n_n_
  _c_o_n_s_i_s_t_e_n_t _e_n _u_n _n_o_m_b_r_e __g_a_l _d_e _b_i_t_s_. _C_e_c_i _e_n _c_o_n_t_r_a_s_t_e _a_v_e_c _l_e_s
  _c_a_r_a_c_t__r_e_s_, _q_u_i _p_e_u_v_e_n_t __t_r_e _c_o_n_s_t_i_t_u__s _d_'_u_n _n_o_m_b_r_e _v_a_r_i_a_b_l_e _d_'_o_c_t_e_t_s_.
  _L_'_o_c_t_e_t _o_u _l_a _s__q_u_e_n_c_e _d_'_o_c_t_e_t_s _q_u_i _r_e_p_r__s_e_n_t_e_n_t _u_n _c_a_r_a_c_t__r_e _p_e_u_v_e_n_t
  _a_u_s_s_i __t_r_e _r_e_p_r__s_e_n_t__s _c_o_m_m_e _u_n _c_o_d_e _d_e _c_a_r_a_c_t__r_e _1_6 _b_i_t_s_.  _L_e_s _c_o_d_e_s
  _d_e _c_a_r_a_c_t__r_e_s _1_6 _b_i_t_s _f_o_u_r_n_i_s_s_e_n_t _d_o_n_c _u_n_e _t_a_i_l_l_e _u_n_i_f_o_r_m_e _p_o_u_r
  _m_a_n_i_p_u_l_e_r _l_e_s _d_o_n_n__e_s _t_e_x_t_u_e_l_l_e_s_. _U_n _c_o_d_e _d_e _c_a_r_a_c_t__r_e _1_6 _b_i_t_s _a_y_a_n_t
  _t_o_u_s _l_e_s _b_i_t_s _ _0 _e_s_t _u_n _c_o_d_e _d_e _c_a_r_a_c_t__r_e _1_6 _b_i_t_s _n_u_l _(_n_u_l_l_)_, _e_t
  _t_e_r_m_i_n_e _u_n_e _c_h_a__n_e_. _L_a _v_a_l_e_u_r _d_e_s _c_a_r_a_c_t__r_e_s _l_a_r_g_e_s _p_o_u_r _c_h_a_q_u_e _m_e_m_b_r_e
  _d_u _"_P_o_r_t_a_b_l_e _C_h_a_r_a_c_t_e_r _S_e_t_" (i.e ASCII)  _e_s_t __g_a_l_e _q_u_a_n_d _i_l _e_s_t
  _u_t_i_l_i_s_ _e_n _t_a_n_t _q_u_e _s_e_u_l _c_a_r_a_c_t__r_e _d_a_n_s _u_n _c_a_r_a_c_t__r_e _e_n_t_i_e_r _(_i_n_t_e_g_e_r_)
  _c_o_n_s_t_a_n_t_. _L_e_s _c_o_d_e_s _d_e _c_a_r_a_c_t__r_e_s _1_6 _b_i_t_s _p_o_u_r _l_e_s _a_u_t_r_e_s _c_a_r_a_c_t__r_e_s
  _d__p_e_n_d_e_n_t _d_e_s _l_o_c_a_l_e_s _e_t _d_e _l_'_i_m_p_l__m_e_n_t_a_t_i_o_n_.  _L_e_s _o_c_t_e_t_s
  _m_o_d_i_f_i_c_a_t_e_u_r_s _d_'__t_a_t _n_'_o_n_t _p_a_s _d_e _r_e_p_r__s_e_n_t_a_t_i_o_n _e_n _c_o_d_e _d_e _c_a_r_a_c_t__r_e
  _1_6 _b_i_t_s_.

  Une consquence notable est que dans des programmes portables vous ne
  devriez pas utiliser des caractres non-ASCII dans des chanes
  littrales.  Cela signifie que mme si vous savez que les doubles
  guillemets ont les codes U+201C et U+201D, vous ne devriez pas crire
  une chane littrale L"\u201cBonjour\u201d, dit il" ou
  "\xe2\x80\x9cBonjour\xe2\x80\x9d, dit il" dans des programmes C.
  Utilisez plutt GNU gettext comme cela :  gettext ("'Bonjour', dit
  il"), et crez une base de donnes de messages en.UTF-8.po qui traduit
  "'Bonjour' dit il" en "\u201cBonjour\u201d, dit il".

  Voici une tude de la portabilit des amnagements ISO/ANSI C sur
  diverses implmentations d'Unix. La GNU glibc-2.2 les supportera tous,
  mais pour l'instant nous avons le tableau suivant.


     GGNNUU gglliibbcc--22..00..xx,, gglliibbcc--22..11..xx

       <wchar.h> et  <wctype.h> existent.

       Possde les fonctions wcs/mbs, mais pas fgetwc/fputwc/wprintf.

       Pas de locales UTF-8.

       mbrtowc retourne EILSEQ pour les octets >= 0x80.

     SSoollaarriiss 22..77

       <wchar.h> et <wctype.h> existent.

       Possde toutes les fonctions wcs/mbs, fgetwc/fputwc/wprintf.

       Supporte les locales UTF-8 suivantes : en_US.UTF-8, de.UTF-8,
        es.UTF-8, fr.UTF-8, it.UTF-8, sv.UTF-8.


       mbrtowc retourne EILSEQ pour les octets >= 0x80.

     OOSSFF//11 44..00dd

       <wchar.h> et <wctype.h> existent.

       Possde toutes les fonctions wcs/mbs, fgetwc/fputwc/wprintf.

       A en plus universal.utf8@ucs4 locale, voir "man 5 unicode".

       mbrtowc ne connat pas UTF-8.

     IIrriixx 66..55

       <wchar.h> et <wctype.h> existent.

       Possde les fonctions wcs/mbs  et fgetwc/fputwc, mais pas
        wprintf.

       N'a pas de locales multi-octets.

       A seulement un simulacre de dfinition pour  mbstate_t.

       N'a pas mbrtowc.

     HHPP--UUXX 1111..0000

       <wchar.h> existe, mais pas <wctype.h>.

       Possde les fonctions wcs/mbs  et fgetwc/fputwc, mais pas
        wprintf.

       A une locale C.utf8.

       N'a pas mbstate_t.

       N'a pas mbrtowc.

     AAIIXX 44..22

       <wchar.h> existe, mais pas <wctype.h> - utilisez  la place
        <ctype.h> et <wchar.h>.

       Possde les fonctions wcs/mbs  et fgetwc/fputwc, mais pas
        wprintf.

       Possde les locales UTF-8 suivantes : ET_EE.UTF-8, LT_LT.UTF-8,
        LV_LV.UTF-8, ZH_CN.UTF-8.

       N'a pas mbstate_t.

       N'a pas mbrtowc.

  Par consquent je recommande l'utilisation des fonctions redmarrables
  et multithread-safe wcsr/mbsr. Oubliez les systmes qui ne les ont pas
  (Irix, HP-UX, Aix), et utilisez le plug-in qui permet d'utiliser des
  locales UTF-8, libutf8_plug.so (voir ci dessous) sur les systmes qui
  vous permettent de compiler des programmes qui utilisent ces fonctions
  wcrs/mbsr (Linux, Solaris, OSF/1).

  Un avis similaire, donn par Sun dans
  http://www.sun.com/software/white-papers/wp-unicode/, section
  "Internationalized Applications with Unicode", est :

  _P_o_u_r _i_n_t_e_r_n_a_t_i_o_n_a_l_i_s_e_r _c_o_r_r_e_c_t_e_m_e_n_t _u_n_e _a_p_p_l_i_c_a_t_i_o_n _u_t_i_l_i_s_e_z _l_e_s
  _i_n_d_i_c_a_t_i_o_n_s _s_u_i_v_a_n_t_e_s _:
  1. __v_i_t_e_z _l_'_a_c_c__s _d_i_r_e_c_t _ _U_n_i_c_o_d_e_. _C_e_c_i _e_s_t _l_a _t__c_h_e _d_e _l_a _c_o_u_c_h_e
     _d_'_i_n_t_e_r_n_a_t_i_o_n_a_l_i_s_a_t_i_o_n _d_e _l_a _p_l_a_t_e_f_o_r_m_e_.

  2. _U_t_i_l_i_s_e_z _l_e _m_o_d__l_e_s _P_O_S_I_X _p_o_u_r _l_e_s _i_n_t_e_r_f_a_c_e_s _m_u_l_t_i_-_o_c_t_e_t_s _e_t _
     _c_a_r_a_c_t__r_e_s _1_6 _b_i_t_s_.

  3. _A_p_p_e_l_e_z _s_e_u_l_e_m_e_n_t _l_e_s _f_o_n_c_t_i_o_n_s _d_e _l_'_A_P_I _q_u_e _l_a _c_o_u_c_h_e
     _d_'_i_n_t_e_r_n_a_t_i_o_n_a_l_i_s_a_t_i_o_n _f_o_u_r_n_i_t _p_o_u_r _l_a _l_a_n_g_u_e _e_t _l_e_s _o_p__r_a_t_i_o_n
     _s_p__c_i_f_i_q_u_e_s _ _l_a _c_u_l_t_u_r_e_.

  4. _R_e_s_t_e_z _i_n_d__p_e_n_d_a_n_t _d_e _l_'_e_n_c_o_d_a_g_e_.

  Si, pour une raison quelconque, vous devez vraiment supposer que
  voulez faire un traitement spcial de certains caractres Unicode),
  vous devriez rendre ce bout de code conditionnel selon le rsultat de
  is_locale_utf88(). Autrement vous allez mettre la pagaille dans le
  comportement de votre programme sur d'autres plateformes, ou si
  d'autres locales sont utilises.  La fonction is_locale_utf8() est
  dclare dans utf8locale.h et dfinie dans utf8locale.c.


  55..11..11..22..  LLaa bbiibblliiootthhqquuee lliibbuuttff88

  Une implmentation portable de l'API ISO/ANSI C, qui supporte les
  locales 8-bits et les locales UTF-8, peut tre trouve dans
  libutf8-0.5.2.tar.gz

  Avantages :


    Ds maintenant un support pour Unicode UTF-8 portable, mme sur les
     systmes d'exploitation dont le support des caractres multi-octets
     ne marche pas, ou qui n'ont pas du tout de support pour les
     caractres multi-octets/larges.

    Le mme binaire marche pour toutes les locales 8-bit et les locales
     UTF-8 supportes par le systme.

    Quand un systme d'exploitation fournit un vrai support pour les
     caractres multi-octets, vous pouvez en tirer avantage simplement
     en recompilant sans l'option du compilateur -DHAVE_LIBUTF8.


  55..11..11..33..  LLaa mmtthhooddee PPllaann99

  Le systme d'exploitation Plan9, une variante d'Unix, utilise UTF-8
  comme encodage dans toutes ses applications. Son type de caractre
  large est appel 'Rune', pas 'wchar_'. Des parties ce ses
  bibliothques, crites par  Rob Pike et Howard Trikey, sont
  disponibles 
  ftp://ftp.cdrom.com/pub/netlib/research/9libs/9libs-1.0.tar.gz.  Une
  autre bibliothque similaire, crite par Alistair G. Crook, est 
  ftp://ftp.cdrom.com/pub/NetBSD/packages/distfiles/libutf-2.10.tar.gz.
  En particulier, chacune de ces bibliothques contient un moteur
  d'expressions rationnelles qui comprend l'UTF-8.

  Dsavantages de cette API :


    UTF-8 est compil  dans la bibliothque, pas optionnel. Les
     programmes compils dans cet univers  perdent le support des
     encodages 8-bits qui sont toujours utiliss frquemment en Europe.




  55..11..22..  PPoouurr lleess iinntteerrffaacceess uuttiilliissaatteeuurr ggrraapphhiiqquueess

  La bibliothque QT-2.0 http://www.troll.no/ contient la classe QString
  qui est totalement Unicode. Vous pouvez utiliser les fonctions membres
  QString::utf8 et QString::fromUtf8 pour convertir depuis/vers un texte
  encod en UTF-8. Les fonctions membres QString::ascii et
  QString::latin1 ne devraient plus tre utilises.


  55..11..33..  PPoouurr llaa mmaanniippuullaattiioonn ddee tteexxttee aavvaannccee

  Les bibliothques mentionnes prcdemment implmentent des versions
  des concepts ASCII qui comprennent Unicode. Voici des bibliothques
  qui traitent des concepts Unicode, comme titlecase (Une troisime
  casse de lettres, diffrente des majuscules et des minuscules), la
  distinction entre la ponctuation et les symboles, la dcomposition
  canonique, les classes combinables, le classement canonique et
  d'autres choses du mme genre.


     uuccddaattaa--11..99
        La bibliothque ucdata de Mark Leisher
        http://crl.nmsu.edu/~mleisher/ucdata.html s'occupe des
        proprits des caractres, de la conversion de la casse, de la
        dcomposition, des classes combines.


     IICCUU
        Ce  sont les classes IBM pour Unicode.
        http://www.alphaworks.ibm.com/tech/icu/.  Une bibliothque trs
        dtaille comprenant des chanes de caractres Unicode, des
        paquets de ressources, des formateurs de nombres, de date,
        d'heure et de messages, des assemblages, des assembleurs de
        messages et plus encore.  Beaucoup de locales sont supportes.
        Cette bibliothque est portable pour Unix et Win32, mais
        compilera sans intervention ("out of the box") seulement avec la
        libc6, pas la libc5.


     lliibbuunniiccooddee
        La librairie Unicode de GNOME
        http://cvs.gnome.org/lxr/source/libunicode/ de Tom Tromey entre
        autres. Elle couvre la conversion du jeu de caractres, les
        proprits des caractres, la dcomposition.


  55..11..44..  PPoouurr llaa ccoonnvveerrssiioonn

  Deux bibliothques de conversion qui supportent UTF-8 et un grand
  nombre de de jeux de caractres 8-bits, sont disponibles :


  55..11..44..11..  LL''iimmppllmmeennttaattiioonn iiccoonnvv dd''UUllrriicchh DDrreeppppeerr,, ccoonntteennuuee ddaannss llaa
  GGNNUU gglliibbcc--22..22..11


  ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.1.1.tar.gz.

  Avantages :


    iconv est conforme au standard POSIX, les programmes qui
     l'utilisent pour la conversion depuis/vers UTF-8 tourneront aussi
     sous Solaris. Cependant le nom des jeux de caractres diffre entre
     les plateformes. Par exemple, "EUC-JP" sous glibc devient "eucJP"
     sous HP-UX. (Le nom INIA officiel pour ce jeu de caractres est
     "EUC-JP". Il s'agit donc clairement d'une dficience de HP-UX.)

    Aucune bibliothque supplmentaire n'est ncessaire.


  55..11..44..22..  lliibbrreeccooddee ppaarr FFrraannooiiss PPiinnaarrdd

  ftp://ftp.gnu.org/pub/gnu/recode/recode-3.5.tar.gz.

  Avantages :


    Support pour la translittration, i.e conversion de caractres non-
     ASCII en squences de caractres ASCII de faon  prserver la
     lisibilit pour les humains, mme lorsqu'une transformation sans
     pertes est impossible.

  Problmes :


    Cette API est non standard.


  55..11..55..  LLeess aauuttrree aapppprroocchheess


     lliibbuuttff--88
        libutf-8, de G.Adam.Stanislav <adam@whizkidtech.net> contient
        quelques fonctions pour la conversion depuis/vers des flux
        "FILE*".  http://www.whizkidtech.net/i18n/libutf-8-1.0.tar.gz
        Avantages :


       Trs petit.

        Problmes :


       API non standard ;

       UTF-8 est compil  dans la bibliothque, pas optionnel. Les
        programmes compils dans cet univers  perdent le support des
        encodages 8-bits qui sont toujours utiliss frquemment en
        Europe ;

       L'installation n'est pas vidente : le Makefile doit tre
        modifi. Pas d'auto-configuration.


  55..22..  JJaavvaa

  Java supporte Unicode en interne. Le type 'char' dsigne un  caractre
  Unicode, et la classe 'java.lang.String' dsigne une chane de
  caractres construite  partir de caractres Unicode.

  Java peut afficher n'importe quel caractre  travers son systme de
  fentrage AWT,  condition que


  1. vous positionniez la proprit systme "user.language" de faon
     approprie.

  2. Les dfinitions de jeux de fontes
     /usr/lib/java/lib/font.properties._l_a_n_g_u_a_g_e soient appropries, et


  3.  Le fontes spcifies dans ce fichier soient installes.

     Par exemple, pour afficher du texte contenant des caractres
     japonais, vous devriez installer des fontes japonaise, et lancer
     "java -Duser.language=ja ...". Vous pouvez combiner les jeux de
     fontes : pour pouvoir afficher des caractres d'Europe de l'ouest,
     grecs et japonais simultanment, vous devriez crer une combinaison
     des fichiers "font.properties" (couvre ISO-8859-1),
     "font.properties.el" (couvre ISO-8859-7) et "font.properties.ja"
     dans un seul fichier.  ??Ceci n'a pas t test??

  Les interfaces java.io.DataInput et java.io.DataOutput contiennent des
  mthodes appeles 'readUTF', et 'writeUTF' respectivement.  Mais notez
  qu'elles n'utilisent pas UTF-8 ; elles utilisent un encodage UTF-8
  modifi : le caractre NUL est encod dans une squence de deux octets
  0xC0 et 0x80  la place de 0x00, et un octet 0x00 est ajout  la fin.
  Encodes de cette faon, les chanes peuvent contenir des caractres
  NUL mais elles doivent nanmoins tre prfixes par un champ de
  taille.  Les fonctions C <string.h> comme strlen() et strcpy() peuvent
  tre utilises pour les manipuler.


  55..33..  LLiisspp

  Le standard Lisp ordinaire dtermine deux types de caractres :
  support Unicode ou non. Ce langage dtermine aussi un mot-clef
  argument ':external-format' pour 'open' comme place naturelle pour
  spcifier un jeu de caractres ou un encodage.

  Parmi les implmentation gratuites du lisp standard, seul CLISP
  http://clisp.cons.org/ supporte Unicode. Vous aurez besoin d'une
  version de CLISP datant de juillet 99 ou plus rcente.
  ftp://clisp.cons.org/pub/lisp/clisp/source/clispsrc.tar.gz Les types
  "base-char" et "character" sont tous quivalents au 16-bits Unicode.
  L'encodage utilis pour le fichier ou l'I/O socket/pipe peut tre
  spcifi par l'argument ':external-format'.  Les encodages utiliss
  pour les oprations d'entre/sortie sur des ttys et l'encodage par
  dfaut pour les I/O file/socket dpendent des locales.

  Parmi les implmentations commerciales du Lisp standard, seule Eclipse
  http://www.elwood.com/eclipse/eclipse.htm supporte Unicode. Voir
  http://www.elwood.com/eclipse/char.htm Le type 'base-char' est
  quivalent  ISO-8859-1, et le type L'encodage utilis pour les
  entres/sorties sur un fichier peut tre dfini  travers une
  combinaison des arguments de 'open'
  Limitations : les fonctions d'attributs de caractres sont dpendantes
  des locales. Les sources et les fichiers de sources compils ne
  peuvent pas contenir des chanes Unicode littrales.  L'implmentation
  commerciale du Lisp standard Allegro CL ne contient pas encore de
  support Unicode, mais Erik Naggum y travaille.


  55..44..  AAddaa9955

  Ada95 a t conu pour supporter Unicode, et la bibliothque standard
  Ada95 contient les types de donnes spciaux ISO 10646-1
  Wide_Character et Wide_String, ainsi que de nombreuses procdures et
  fonctions associes.  Le compilateur Ada95 GNU (gnat-3.11 ou plus)
  supporte UTF-8 comme encodage externe des caractres 16 bits. Cela
  vous autorise  utiliser UTF-8  la fois dans le code source et dans
  les entres/sorties de l'application. Pour l'activer dans
  l'application, utilisez "WCEM=8" dans la chane FORM quand vous ouvrez
  un fichier, et utilisez l'option du compilateur "-gnatW8" si le code
  source est UTF-8. Pour plus de dtails, voyez les manuels de rfrence
  GNAT et Ada95.

  The Unix and Internet Fundamentals HOWTO
  by Eric S. Raymond
  v1.1, 3 Dcembre 1998

  Ce document dcrit les principes fondamentaux des ordinateurs de type
  PC, des systmes d'exploitation de type UNIX et d'Internet dans un
  langage non technique. (Traduction franaise Philippe Malinge
  pmal@easynet.fr)
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Sujet de ce document
     1.2 Ressources rattaches
     1.3 Nouvelles versions de ce document
     1.4 Ractions et corrections

  2. Anatomie de base de votre ordinateur

  3. Que se passe-t-il lorsque vous allumez votre ordinateur ?

  4. Que se passe-t-il lorsque vous excutez des programmes  partir du shell?

  5. Comment marchent les priphriques d'entre et les interruptions ?

  6. Comment mon ordinateur fait-il plusieurs choses en mme temps ?

  7. Comment mon ordinateur vite aux processus d'empiter les uns sur les autres ?

  8. Comment mon ordinateur stocke des choses sur le disque ?

     8.1 Bas niveau du disque et structure du systme de fichiers
     8.2 Noms de fichiers et rpertoires
     8.3 Points de montage
     8.4 Comment un fichier est retrouv ?
     8.5 Comment les choses peuvent dgnrer ?

  9. Comment fonctionnent les langages d'ordinateur ?

     9.1 Langages compils
     9.2 Langages interprts
     9.3 Langages P-code

  10. Comment Internet fonctionne ?

     10.1 Noms et localisations
     10.2 Paquets et routeurs
     10.3 TCP et IP
     10.4 HTTP, un protocole d'application


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  SSuujjeett ddee ccee ddooccuummeenntt

  Ce document est conu pour aider les utilisateurs de Linux et
  d'Internet qui dsirent apprendre en faisant. Bien que ce soit un bon
  moyen d'acqurir des comptences, quelquefois cela laisse de
  singulires lacunes dans la connaissance des bases -- lacunes qui
  peuvent rendre difficile la rflexion crative ou perturber fortement,
  par manque d'un modle mental clair sur ce qu'il devrait se passer.

  J'essaierai de dcrire clairement, dans un langage simple, comment
  tout marche. La prsentation sera adapte aux personnes qui utilisent
  Unix ou Linux sur du matriel de type PC. Cependant, je ferai ici
  couramment rfrence  'Unix' : ce que je dcrirai se retrouvera sur
  toutes les plates-formes et sur toutes les variantes d'Unix.

  Je suppose que vous utilisez un PC avec un processeur de type Intel.
  Les dtails diffrent quelque peu si vous utilisez un processeur Alpha
  ou PowerPC ou une autre machine Unix, mais les concepts de base
  restent les mmes.

  Je ne voudrais pas rpter les choses, alors vous allez devoir faire
  attention, mais cela veut dire que vous retiendrez chaque mot que vous
  lirez. C'est une bonne ide que de tout parcourir rapidement la
  premire fois ; vous devrez y revenir et relire un certain nombre de
  fois afin de digrer ce que vous avez appris.

  C'est un document en permanente volution. Je prvois d'ajouter des
  chapitres en rponse aux feedbacks, ainsi vous pourrez priodiquement
  le passer en revue.


  11..22..  RReessssoouurrcceess rraattttaacchheess

  Si vous lisez dans l'espoir d'apprendre comment 'hacker', vous devrez
  lire How To Become A Hacker FAQ
  <http://www.tuxedo.org/~esr/faqs/hacker-howto.html>. Il y a beaucoup
  de liens vers d'autres ressources utiles.



  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt


  Les nouvelles versions de 'Unix and Internet Fundamentals HOWTO'
  seront postes priodiquement dans comp.os.linux.help et  et
  news.answers <news:answers>. Elles pourront tre tlcharges  partir
  de divers sites Linux WWW ou FTP, y compris la page d'accueil du LDP.

  Vous pouvez accder  la dernire version (en anglais) de ce document
  sur le World Wide Web via l'URL
  <http://sunsite.unc.edu/LDP/HOWTO/Unix-Internet-Fundamentals-
  HOWTO.html>.


  11..44..  RRaaccttiioonnss eett ccoorrrreeccttiioonnss


  Si vous avez des questions ou des commentaires  propos de ce
  document, vous pouvez envoyer vos courriers lectroniques  Eric S.
  Raymond,  esr@thyrsus.com. Toutes suggestions ou critiques seront les
  bienvenues. Seront spcialement apprcis les liens hypertexte vers
  des explications plus dtailles ou vers des concepts propres. Si vous
  trouvez des erreurs dans ce document, faites-le moi savoir afin que je
  puisse les corriger dans la nouvelle version. Merci.


  22..  AAnnaattoommiiee ddee bbaassee ddee vvoottrree oorrddiinnaatteeuurr

  Votre ordinateur possde un processeur  l'intrieur duquel se font
  rellement les calculs. Il possde une mmoire interne (ce que les
  gens DOS/Windows dsignent par ``RAM'' et que les gens UNIX dsignent
  souvent par ``core''). Le processeur et la mmoire rsident sur la
  _c_a_r_t_e _m__r_e qui est le coeur de votre ordinateur.

  Votre ordinateur possde un cran et un clavier. Il a un (ou des)
  disque(s) dur(s) et un lecteur de disquettes. L'cran et vos disques
  ont des _c_a_r_t_e_s _c_o_n_t_r__l_e_u_r que l'on connecte sur la carte mre et qui
  aident l'ordinateur  piloter ces priphriques externes. Votre
  clavier est trop simple pour ncessiter une carte spare ; le
  contrleur est intgr dans le chssis du clavier.)

  Nous dcrirons plus tard en dtails comment fonctionnent ces
  priphriques. Pour l'instant, quelques notions de base afin de garder
   l'esprit comment ils fonctionnent ensemble :

  Tous les lments internes de votre ordinateur sont connects par un
  _b_u_s. Physiquement, le bus est ce sur quoi vous connectez vos cartes
  contrleur (carte vido, contrleur disque, carte son si vous en avez
  une). Le bus est l'autoroute emprunte par les donnes entre votre
  processeur, votre cran, votre disque et le reste.



  Le processeur, qui fait tout marcher, ne peut rellement voir tous les
  lments directement ; il doit communiquer avec eux via le bus, le
  seul sous-systme qui soit effectivement trs rapide, qui accde
  directement  la mmoire (le core). Afin que les programmes puissent
  s'excuter, ils doivent tre en mmoire _c_o_r_e.

  Lorsque votre ordinateur lit un programme ou une donne sur le disque,
  il se passe rellement les choses suivantes : le processeur utilise le
  bus pour envoyer une requte de lecture du disque  votre contrleur
  de disque. Quelques instants aprs, le contrleur de disque utilise le
  bus pour signaler  l'ordinateur qu'il a lu la donne et qu'il l'a
  mise  un certain endroit de la mmoire. Le processeur peut utiliser
  le bus pour aller chercher ce qu'il y a  cet endroit de la mmoire.

  Votre clavier et votre cran communiquent galement avec le processeur
  via le bus mais d'une manire plus simple. Nous exposerons cela plus
  loin. Pour l'instant vous en savez suffisamment pour comprendre ce
  qu'il se passe lorsque vous allumez votre ordinateur.


  33..  QQuuee ssee ppaassssee--tt--iill lloorrssqquuee vvoouuss aalllluummeezz vvoottrree oorrddiinnaatteeuurr ??

  Un ordinateur sans programme qui s'excute est juste un tas inerte
  d'lectronique. La premire chose que doit faire un ordinateur
  lorsqu'il est allum est de dmarrer un programme spcial appel
  _s_y_s_t__m_e _d_'_e_x_p_l_o_i_t_a_t_i_o_n. Le travail du systme d'exploitation est
  d'aider les autres programmes de l'ordinateur  travailler, en
  traitant les dtails mprisables du contrle du matriel de
  l'ordinateur.

  Le processus de dmarrage du systme d'exploitation est appel
  _b_o_o_t_i_n_g (originalement c'tait _b_o_o_t_s_t_r_a_p_p_i_n_g _(_l_a__a_g_e _d_e_s _c_h_a_u_s_s_u_r_e_s_),
  allusion  la difficult d'enfiler soi mme ses chaussures `par les
  lacets'. Votre ordinateur sait comment booter car les instructions de
  boot sont stockes dans un de ses composants, le composant BIOS (ou
  Basic Input/Output System).

  Le composant BIOS dit o aller chercher,  une place fixe sur le
  disque dur de plus basse adresse (le _d_i_s_q_u_e _d_e _b_o_o_t), un programme
  spcial appel  _c_h_a_r_g_e_u_r _d_e _b_o_o_t _(_b_o_o_t _l_o_a_d_e_r_) (sous Linux le chargeur
  de boot est appel LILO). Le chargeur de boot est charg en mmoire
  puis lanc. Le travail du chargeur de boot est de dmarrer le systme
  d'exploitation rel.


  Le chargeur fait cela en allant chercher un _n_o_y_a_u, en le chargeant en
  mmoire et en le dmarrant. Lorsque vous bootez Linux et voyez "LILO"
  sur l'cran suivi par une succession de points, c'est qu'il charge le
  noyau. (Chaque point signifie qu'il vient de charger un autre _b_l_o_c _d_u
  _d_i_s_q_u_e du code du noyau.)

  (Vous pouvez vous demander pourquoi le BIOS ne charge pas le noyau
  directement -- pourquoi ces deux tapes du processus avec le chargeur
  de boot ? C'est que le BIOS n'est pas vraiment intelligent. En fait il
  est carrment stupide, et Linux ne l'utilise jamais aprs avoir boot.
  A l'origine, j'ai programm sur des PC 8-bits primitifs avec de petits
  disques : littralement ils ne pouvaient accder  suffisamment de
  disque pour charger le noyau directement. L'tape du chargeur de boot
  vous permet de dmarrer plusieurs systmes d'exploitation  partir de
  diffrents emplacements de votre disque, dans le cas o Unix n'est pas
  assez bon pour vous.)

  Une fois que le noyau dmarre, il doit chercher autour de lui, trouver
  le reste du matriel et tre prt pour excuter des programmes. Il
  fait cela en non pas en fouillant  des adresses mmoire ordinaires
  mais plutt  des _p_o_r_t_s _d_'_E_n_t_r__e_/_S_o_r_t_i_e -- des adresses spciales du
  bus, senses avoir une carte contrleur de priphriques en attente de
  commandes  cet endroit. Le noyau ne fouille pas au hasard ; il a un
  ensemble de connaissances qui lui permet de savoir ce qu'il est sens
  trouver ici, et comment les contrleurs rpondraient s'ils taient
  prsents. Ce processus est appel _E_x_p_l_o_r_a_t_i_o_n _a_u_t_o_m_a_t_i_q_u_e.


  La plupart des messages que vous voyez au moment du boot sont
  l'exploration de votre matriel par le noyau  travers les ports
  d'Entre/Sortie, le chiffrage de ce qui est disponible et l'adaptation
   votre machine. Le noyau Linux est extrmement bon pour cela,
  meilleur que la plupart des autres Unix et _t_e_l_l_e_m_e_n_t meilleur que DOS
  ou Windows. En fait, beaucoup de vieux adeptes de Linux pensent que
  l'ingniosit des explorations de Linux lors du boot (qui lui
  permettent de s'installer relativement simplement) ont t une raison
  de s'panouir dans le monde des expriences des Unix libres pour
  attirer une masse critique d'utilisateurs.


  Mais rendre le noyau compltement charg et s'excutant n'est pas la
  fin du processus de boot ; c'est juste la premire tape (quelquefois
  appele _n_i_v_e_a_u _d_'_e_x__c_u_t_i_o_n _1 _(_r_u_n _l_e_v_e_l _1_)).

  L'tape suivante du noyau est de s'assurer que vos disques sont OK.
  Les systmes de fichiers sur disques sont des choses fragiles ; s'ils
  ont t endommags par une panne matrielle ou par une coupure
  soudaine d'alimentation lectrique, il y a de bonnes raisons de
  rtablir l'intgrit avant que votre Unix ne puisse aller plus loin.
  Nous parlerons plus tard de ce que l'on dit  propos de ``comment les
  systmes de fichiers peuvent devenir mauvais''.


  L'tape suivante du noyau est de lancer plusieurs _d__m_o_n_s. Un dmon est
  un programme comme un spouleur d'imprimante, un serveur de mail ou un
  serveur WWW qui se cache en arrire-plan en attendant d'avoir des
  choses  faire. Ces programmes spciaux doivent coordonner plusieurs
  requtes qui peuvent entrer en conflit. Il y a des dmons car il est
  souvent plus facile d'crire un programme qui s'excute constamment et
  qui sait tout des requtes, plutt que d'essayer de s'assurer qu'un
  troupeau de copies (chacune traitant une requte et toutes s'excutant
  en mme temps) ne se gneraient pas mutuellement. La collection
  particulire de dmons que le systme dmarre peut varier, mais
  inclura presque toujours un spouleur d'imprimante (un dmon garde-
  barrire de votre imprimante).

  Une fois que tous les dmons ont dmarr, nous sommes dans le _n_i_v_e_a_u
  _d_'_e_x__c_u_t_i_o_n _2 _(_r_u_n _l_e_v_e_l _2_). L'tape suivante est la prparation pour
  les utilisateurs. Le noyau dmarre une copie d'un programme appel
  getty pour surveiller votre console (et peut tre d'autres copies pour
  surveiller des ports-srie entrants) Ce programme est celui duquel
  jaillit le prompt login sur votre console. Nous sommes maintenant dans
  le _n_i_v_e_a_u _d_'_e_x__c_u_t_i_o_n _3 _(_r_u_n _l_e_v_e_l _3_) et prts pour votre connexion et
  l'excution de vos programmes.


  Quand vous vous connectez (en donnant un nom et un mot de passe), vous
  vous identifiez auprs de getty et de l'ordinateur. Il excute
  maintenant un programme appel (assez naturellement) login, qui
  ralise des tches ancillaires et dmarre un interprteur de
  commandes, le _s_h_e_l_l. (Oui getty et login pourraient tre un seul et
  mme programme. Ils sont spars pour des raisons historiques que nous
  n'expliciterons pas ici.)


  Dans la section suivante, nous parlerons de ce qui se passe lorsque
  vous excutez des programmes  partir du shell.


  44..  QQuuee ssee ppaassssee--tt--iill lloorrssqquuee vvoouuss eexxccuutteezz ddeess pprrooggrraammmmeess  ppaarrttiirr dduu
  sshheellll??

  Le shell normal vous donne le prompt '$' que vous voyez aprs vous
  tre connect (cependant vous pouvez le modifier et mettre autre
  chose). Nous ne parlerons pas de la syntaxe du shell et des choses
  faciles que vous pouvez voir sur votre cran ici ; alors que nous
  l'ordinateur.

  Aprs la phase de boot et avant que vous n'excutiez un programme,
  vous pouvez penser  votre ordinateur comme tant un zoo de processus
  qui attendent qu'il se passe quelque chose. Ils attendent des
  __v__n_e_m_e_n_t_s. Un vnement, ce peut tre l'enfoncement d'une touche ou
  un dplacement de la souris. Ou, si votre machine est connecte  un
  rseau, un vnement peut tre un paquet de donnes venant de ce
  rseau.

  Le noyau est un de ces processus. C'en est un spcial, car il contrle
  le moment o les autres processus _u_t_i_l_i_s_a_t_e_u_r peuvent s'excuter, et
  c'est normalement le seul processus qui accde directement au matriel
  de la machine. En fait, les processus utilisateurs font des requtes
  au noyau lorsqu'ils veulent obtenir une entre clavier, crire sur
  votre cran, lire ou crire sur votre disque ou juste autre chose que
  consommer quelques bits en mmoire. Ces requtes sont appeles _a_p_p_e_l_s
  _s_y_s_t__m_e.

  Normalement toute Entre/Sortie passe par le noyau de manire  ce
  qu'il puisse ordonnancer les oprations et viter ainsi aux processus
  de se marcher les uns sur les autres. Quelques processus utilisateur
  sont autoriss  contourner le noyau, habituellement en ayant accs
  directement aux ports d'Entre/Sortie. Les serveurs X (les programmes
  qui traitent les requtes graphiques des autres programmes sur la
  plupart des machines Unix) sont des exemples classiques. Mais nous
  n'avons pas vu de serveur X pour l'instant ; vous tes au prompt du
  shell sur une console en mode caractres.

  Le shell est juste un processus utilisateur, et non un processus
  particulirement spcial. Il attend vos frappes sur les touches du
  clavier, coutant ( travers le noyau) le port d'E/S du clavier. Comme
  le noyau les voit, il les affiche sur votre cran et les passe au
  shell. Le shell essaie de les interprter comme tant des commandes.


  Tapez `ls' suivi de `Enter' afin de lister le contenu d'un rpertoire.
  Le shell applique ses rgles internes pour valuer la commande que
  vous voulez excuter dans le fichier `/bin/ls'. Il fait un appel
  systme en demandant au noyau de lancer `/bin/ls' comme un processus
  _f_i_l_s et donne son accs  l'cran et au clavier  travers le noyau. Le
  shell se rendort en attendant que 'ls' se termine.

  Lorsque /bin/ls est termin, il dit au noyau qu'il a termin en
  effectuant un appel systme _e_x_i_t. Le noyau rveille le shell et lui
  dit qu'il peut continuer  s'excuter. Le shell affiche un autre
  prompt et attend une autre ligne en entre.

  D'autres choses peuvent tre faites pendant l'excution de `ls',
  cependant (nous supposerons que la liste du rpertoire est trs
  longue). Vous pourriez basculer sur une autre console virtuelle, vous
  connecter, et lancer une jeu de Quake par exemple. Ou bien, supposez
  que vous tes connect  Internet : votre machine peut envoyer ou
  recevoir des mails pendant que `/bin/ls' s'excute.



  55..  CCoommmmeenntt mmaarrcchheenntt lleess pprriipphhrriiqquueess dd''eennttrree eett lleess iinntteerrrruuppttiioonnss ??

  Votre clavier est un priphrique trs simple ; simple car il gnre
  un petit flux de donnes trs lentement (sur un ordinateur standard).
  Lorsque vous relchez une touche, cet vnement est signal par le
  cble du clavier qui va provoquer une _i_n_t_e_r_r_u_p_t_i_o_n _m_a_t__r_i_e_l.

  C'est au systme d'exploitation de surveiller de telles interruptions.
  Pour chaque type possible d'interruption, il y a un _h_a_n_d_l_e_r
  _d_'_i_n_t_e_r_r_u_p_t_i_o_n, une partie du systme d'exploitation dissimule toutes
  les donnes associes (comme la valeur touche enfonce/touche
  relche) tant qu'elle ne peut tre traite.

  Ce que le fait le handler d'interruption disque pour votre clavier est
  de dposer la valeur de la touche dans une zone en bas de la mmoire
  (core). Ainsi elle sera disponible pour l'inspection lorsque le
  systme d'exploitation passera le contrle  n'importe quel programme
  suppos attendre prsentement une entre clavier.


  Des priphriques d'entre plus complexes comme les disques
  travaillent de manire similaire. Prcdemment nous faisions rfrence
   un contrleur de disques utilisant le bus pour signaler qu'une
  requte disque a bien t excute. Que se passe-t-il si ce disque
  reoit une interruption ? Le handler de l'interruption disque copie
  alors la donne trouve dans la mmoire, pour une utilisation future
  par le programme qui en avait fait la demande.

  Chaque type d'interruption est associ  un _n_i_v_e_a_u _d_e _p_r_i_o_r_i_t_. Les
  interruptions de plus basse priorit (comme les vnements clavier)
  sont traites aprs celles de priorit suprieures (comme les tops
  d'horloge ou les vnements disque). Unix a t conu pour traiter
  prioritairement les types d'vnements qui doivent tre traits
  rapidement afin de conserver une machine sur laquelle les temps de
  rponse sont sont sans -coup.

  Les messages que vous voyez pendant la phase de boot font rfrence 
  des numros d'_I_R_Q. Vous devez tre prvenus qu'une des causes les plus
  courantes de mauvaise configuration de votre matriel est d'avoir deux
  priphriques qui essaient d'utiliser la mme IRQ, sans savoir ce que
  c'est rellement.

  La rponse est ici. IRQ est l'abbrviation de "Interrupt ReQuest". Le
  systme d'exploitation a besoin de savoir au dmarrage quel numro
  d'interruption sera utilis par chaque priphrique, ainsi il peut
  associer le handler adquat pour chacun. Si deux priphriques
  diffrents essaient d'utiliser la mme IRQ, les interruptions seraient
  quelquefois distribues au mauvais handler. Cela est classique au
  moins au verrouillage du priphrique, et peut parfois dstabiliser le
  systme d'exploitation, qu'il se "dsintgre" ou qu'il se crashe.


  66..  CCoommmmeenntt mmoonn oorrddiinnaatteeuurr ffaaiitt--iill pplluussiieeuurrss cchhoosseess eenn mmmmee tteemmppss ??

  En fait, il ne le fait pas. Les ordinateurs ne peuvent traiter qu'une
  seule tche (ou _p_r_o_c_e_s_s_u_s)  la fois. Mais un ordinateur peut changer
  de tche trs rapidement, et duper l'esprit humain en lui faisant
  croire qu'il fait plusieurs choses en mme temps. C'est ce que l'on
  appelle le _t_e_m_p_s _p_a_r_t_a_g_.

  Une des tches du noyau est de grer le temps partag. C'est une
  partie ddie  l'_o_r_d_o_n_n_a_n_c_e_u_r qui conserve chez lui toutes les
  informations sur les autres processus (non noyau) de votre
  environnement. Chaque 1/60 me de seconde, une horloge avertit le
  noyau, gnrant une interruption horloge. L'ordonnanceur arrte le
  processus qui s'excute, le suspend dans l'tat, et donne le contrle
   un autre processus.

  1/60 me de seconde peut paratre peu de temps. Mais sur les
  microprocesseurs actuels c'est assez pour excuter des dizaines de
  milliers d'instructions machine, ce qui permet d'effectuer beaucoup de
  choses. Mme si vous avez plusieurs processus, chacun peut accomplir
  un petit peu sa tche pendant ses tranches de temps.

  En pratique, un programme ne dispose pas de sa tranche de temps
  entire. Si une interruption arrive d'un priphrique d'E/S, le noyau
  arrtera en ralit la tche courante, excutera le handler
  d'interruption et retournera  la tche courante. Une tempte
  d'interruption de haute priorit peut interdire tout traitement
  normal ; ce mauvais comportement est appel _d__f_a_i_t_e _(_t_h_r_a_s_h_i_n_g_) et est
  difficile  provoquer sur les Unix modernes.

  En fait, la vitesse des programmes est trs rarement limite par le
  temps machine qu'ils peuvent obtenir (il y a quelques exceptions 
  cette rgle, comme la gnration de son ou de graphiques en 3-D. Le
  plus souvent, les dlais sont dus  l'attente, par le programme, des
  donnes d'un disque ou d'une connexion rseau.

  Un systme d'exploitation qui peut supporter de manire routinire
  plusieurs processus est appel "multitche". Les systmes
  d'exploitation de la famille Unix ont t conus ds le dbut pour le
  multitche et sont vraiment bons pour a -- beaucoup plus efficaces
  que celui de Windows et MAC OS, pour lesquels le multitche a t
  introduit a posteriori et qui le traitent plutt pauvrement. Efficace,
  multitche, fiable sont quelques-unes des raisons qui rendent Linux
  suprieur pour le rseau, les communications et les services WEB.


  77..  CCoommmmeenntt mmoonn oorrddiinnaatteeuurr vviittee aauuxx pprroocceessssuuss dd''eemmppiitteerr lleess uunnss ssuurr
  lleess aauuttrreess ??

  L'ordonnanceur du noyau fait attention  sparer les processus dans le
  temps. Votre systme d'exploitation les divise aussi dans l'espace, de
  telle manire que ces processus n'empitent pas sur la mmoire de
  travail des autres. Ces choses que votre systme d'exploitation
  ralise sont appeles _g_e_s_t_i_o_n _d_e _l_a _m__m_o_i_r_e.

  Chaque processus de votre 'troupeau' a besoin de son propre espace
  mmoire afin de mettre son code et de garder des variables et leur
  rsultat. Vous pouvez imaginer cet ensemble constitu d'un _s_e_g_m_e_n_t _d_e
  _c_o_d_e accessible en lecture uniquement (contenant les instrucions du
  processus) et un _s_e_g_m_e_n_t _d_e _d_o_n_n__e_s accessible en criture (contenant
  toutes les variables du processus). Le segment de donnes est
  vritablement propre  chaque processus, mais si deux processus
  excutent le mme code, Unix s'arrange automatiquement pour qu'ils
  partagent le mme segment de code dans un soucis d'efficacit.

  L'efficacit est importante car la mmoire est chre. Quelquefois,
  vous ne disposez pas de suffisamment de mmoire pour faire tenir tous
  les programmes, spcialement si vous utilisez un gros programme comme
  un serveur X-WINDOW. Pour contourner cela, Unix utilise une stratgie
  appele  _m__m_o_i_r_e _v_i_r_t_u_e_l_l_e. Cela n'essaie pas de faire tenir tout le
  code et les donnes d'un processus en mmoire. Cependant, il garde
  seulement un espace de travail ; le reste de l'tat du processus est
  laiss dans un endroit spcial sur votre disque : _l_'_e_s_p_a_c_e _d_'__c_h_a_n_g_e
  _(_s_w_a_p _s_p_a_c_e_).

  Lorsque le processus s'excute, Unix essaie d'anticiper comment l'
  espace de travail changera, et ne chargera en mmoire que les morceaux
  dont il a besoin. Faire cela efficacement est compliqu et dlicat, je
  n'essaierai pas de le dcrire ici -- mais cela dpend du fait que le
  code et les rfrences aux donnes peuvent arriver en blocs, avec
  chaque nouveau rfrenant vraisemblablement un proche ou un ancien.
  Ainsi, si Unix garde le code ou les donnes frquemment (ou rcemment)
  utiliss, vous gagnerez du temps.

  Notez que dans le pass, le "quelquefois" que nous employons deux
  paragraphes plus haut tait "souvent" voire "toujours", -- la taille
  de la mmoire tait habituellement petite par rapport  la taille des
  programmes en cours d'excution, de telle manire que les changes
  entre le disque et la mmoire ("swapping") taient frquents. La
  mmoire est beaucoup moins chre de nos jours et mme les machines bas
  de gamme en sont bien dotes. Sur les machines mono-utilisateur avec
  64Mo de mmoire, il est possible de faire tourner X-WINDOW et un
  mlange de programmes sans jamais swapper.

  Mme dans cette situation joyeuse, la part du systme d'exploitation
  appele le _g_e_s_t_i_o_n_n_a_i_r_e _d_e _m__m_o_i_r_e a un important travail  faire. Il
  doit tre sr que les programmes ne peuvent modifier que leurs
  segments de mmoire -- ce qui empche un code erron ou malicieux dans
  un programme de ramasser les donnes dans un autre. Pour faire cela,
  il conserve une table des segments de donnes et de code. La table est
  mise  jour chaque fois qu'un processus demande de la mmoire ou en
  libre (habituellement plus tard lorsqu'il se termine).

  Cette table est utilise pour passer des commandes  une partie
  spcialise du matriel sous-jacent appele un _U_G_M _(_M_M_U_) ou _u_n_i_t_ _d_e
  _g_e_s_t_i_o_n _m__m_o_i_r_e _(_m_e_m_o_r_y _m_a_n_a_g_e_m_e_n_t _u_n_i_t_). Les processeurs modernes
  disposent de MMUs intgrs. Le MMU a la facult de mettre des
  barrires autour de zones mmoire, ainsi une rfrence en "dehors des
  clous" sera refuse et gnrera une interruption spciale pour tre
  traite.

  Si vous avez dj vu le message Unix qui dit "Segmentation fault",
  "core dumped" ou quelque chose de similaire, c'est exactement ce qu'il
  se passe ; un programme en cours d'excution a tent d'accder  de la
  mmoire en dehors de son segment et a provoqu une interruption
  fatale. Cela indique un bug dans le code du programme ; le _c_o_r_e _d_u_m_p
  laisse une information en vue d'un diagnostic  l'attention du
  programmeur afin qu'il puisse trouver la trace de son erreur.


  88..  CCoommmmeenntt mmoonn oorrddiinnaatteeuurr ssttoocckkee ddeess cchhoosseess ssuurr llee ddiissqquuee ??

  Sur votre disque dur sous Unix, vous voyez un arbre de rpertoires
  nomms et des fichiers. Normalement vous ne devriez pas  chercher 
  en savoir plus, mais cela peut s'avrer utile de savoir ce qu'il y a
  dessous si vous avez un crash disque et besoin d'essayer de nettoyer
  des fichiers. Malheureusement il n'y a pas de bon moyen de dcrire
  l'organisation du disque en partant du niveau fichier et en
  descendant, c'est pour cela que je le dcrirai en remontant  partir
  du niveau matriel.


  88..11..  BBaass nniivveeaauu dduu ddiissqquuee eett ssttrruuccttuurree dduu ssyyssttmmee ddee ffiicchhiieerrss

  La surface de votre disque , sur laquelle il stocke les donnes est
  divise comme une cible de jeu de flchettes -- en pistes circulaires
  qui sont partages en secteurs. Parce que les pistes de l'extrieur
  contiennent plus de surface que celles prs de l'axe de rotation, au
  centre du disque, les pistes externes ont plus de secteurs que celles
  de l'intrieur. Chaque secteur (ou _b_l_o_c _d_i_s_q_u_e) a la mme taille, qui
  est gnralement de 1Ko (1024 mots de 8 bits). Chaque bloc disque a
  une adresse unique ou un  _n_u_m__r_o _d_e _b_l_o_c _d_i_s_q_u_e.


  Unix divise le disque en _p_a_r_t_i_t_i_o_n_s _d_i_s_q_u_e. Chaque partition est une
  succession de blocs qui est utilise indpendamment des autres
  partitions, comme un systme de fichiers ou un espace d'change (swap
  space). La partition ayant le plus petit numro est souvent traite
  spcialement, telle la _p_a_r_t_i_t_i_o_n _d_e _b_o_o_t dans laquelle vous pouvez
  mettre un noyau pour booter.


  Chaque partition est soit un _e_s_p_a_c_e _d_e _s_w_a_p (utilis pour implmenter
  la ``mmoire virtuelle'') soit un _s_y_s_t__m_e _d_e _f_i_c_h_i_e_r_s pour stocker des
  fichiers. Les partitions de swap sont traites comme une squence
  linaire de blocs. Les systmes de fichiers d'un autre cot, ont
  besoin de relier les noms de fichiers  des squences de blocs disque.
  Parce que les fichiers grossissent, diminuent, et changent tout le
  temps, les blocs de donnes d'un fichier ne seront pas une squence
  linaire mais pourront tre disperss sur toute la partition (tant que
  le systme d'exploitation pourra trouver un bloc libre).



  88..22..  NNoommss ddee ffiicchhiieerrss eett rrppeerrttooiirreess

  Dans chaque systme de fichiers, la liaison entre les noms et les
  blocs est ralise grce  une structure appele _i_-_n_o_d_e _(_n_o_e_u_d
  _d_'_i_n_d_e_x_). Il y en a tout un tas proche de la "base" (numro de bloc
  les plus faibles) du systme de fichiers (les tout premiers sont
  utiliss pour des besoins d'intgrit et de label que nous ne
  dcrirons pas ici). Chaque i-node dcrit un fichier. Les blocs de
  donnes des fichiers sont au dessus des i-nodes (conceptuellement).

  Chaque i-node contient la liste des numros des blocs du fichier
  (rellement c'est une demi-vrit, c'est seulement valable pour les
  petits fichiers, mais le reste de ces dtails ne sont pas importants
  ici). Notez que l'i-node _n_e _c_o_n_t_i_e_n_t _p_a_s le nom du fichier.

  Les noms des fichiers rsident dans les _s_t_r_u_c_t_u_r_e_s _d_e _r__p_e_r_t_o_i_r_e_s. Une
  structure de rpertoire contient juste une table des noms et des
  numros d'i-node associs. C'est la raison pour laquelle, sous Unix,
  un fichier peut avoir plusieurs noms rels (ou _l_i_e_n_s _f_o_r_t_s _(_h_a_r_d
  _l_i_n_k_s_)) ; Il y a juste plusieurs entres dans un rpertoire qui
  pointent vers le mme i-node.


  88..33..  PPooiinnttss ddee mmoonnttaaggee

  Dans le cas le plus simple, votre systme de fichiers Unix tient sur
  une seule partition disque. Cependant vous verrez que cette
  disposition sur des petits systmes Unix n'est pas pratique.
  Typiquement il est rparti sur plusieurs partitions disque voire  sur
  plusieurs disques physiques. Ainsi par exemple, votre systme peut
  avoir une petite partition o le noyau rside, une un peu plus grande
  pour les utilitaires du systme et une beaucoup plus grosse pour les
  rpertoires des utilisateurs.

  La seule partition  laquelle vous aurez accs immdiatement aprs le
  boot est votre _p_a_r_t_i_t_i_o_n _r_a_c_i_n_e _(_r_o_o_t _p_a_r_t_i_t_i_o_n_), qui est (presque
  toujours) celle   partir de laquelle vous avez boot. Elle contient
  le rpertoire racine du systme de fichiers, le noeud le plus haut 
  partir duquel tout est raccroch.

  Les autres partitions du systme doivent tre attaches  cette racine
  afin que votre systme de fichiers unique ou multi-partition soit
  accessible. Au milieu du processus de boot, votre Unix rendra ces
  partitions 'non root' accessibles. Il devra _m_o_n_t_e_r chacune d'elles sur
  un rpertoire de la partition racine.

  Par exemple, si votre Unix a un rpertoire appel '/usr', c'est
  probablement un point de montage d'une partition qui contient un tas
  de programmes installs avec votre Unix mais qui ne sont pas
  ncessaires durant la phase initiale de boot.


  88..44..  CCoommmmeenntt uunn ffiicchhiieerr eesstt rreettrroouuvv ??

  Maintenant nous pouvons considrer le systme de fichiers dans une
  dmarche descendante. Lorsque vous ouvrez un fichier (tel que
  /home/esr/WWW/ldp/fundamentals.sgml) voici ce qu'il arrive :

  Votre noyau dmarre de la racine de votre systme de fichiers Unix
  (dans la partition root). Il cherche un rpertoire appel `home'.
  Habituellement `home' est un point de montage d'une grande partition
  pour les utilisateurs, il descend  l'intrieur. Au sommet de la
  structure du rpertoire de cette partition utilisateur, il va chercher
  une entre nomme `esr' et en extraire le numro d'i-node. Il ira 
  cette i-node, notez que c'est une structure de rpertoire, et
  retrouvera `WWW'. En exploitant _c_e_t i-node, il ira au sous rpertoire
  correspondant et retrouvera `ldp'. Ce qui lui donnera encore un autre
  i-node rpertoire. En ouvrant ce dernier, il trouvera un numro d'i-
  node pour `fundamentals.sgml'. Cet i-node n'est pas un rpertoire mais
  fournit la liste des blocs associs au fichier.




  88..55..  CCoommmmeenntt lleess cchhoosseess ppeeuuvveenntt ddggnnrreerr ??

  Plus haut, nous avons laiss entendre que les systmes de fichiers
  taient fragiles.  Maintenant nous savons que pour accder  un
  fichier vous devez parcourir une longue chane arbitraire de
  rfrences  des rpertoires et  des inodes. A prsent, supposons que
  votre disque dur possde une zone dfectueuse.

  Si vous tes chanceux, il dtruira quelques donnes d'un fichier. Si
  vous tes malchanceux, il va corrompre une structure de rpertoire ou
  un numro d'inode et laissera un sous arbre entier de votre systme
  dans l'oubli -- ou, pire, cela a donn une structure corrompue qui
  pointe par plusieurs chemins au mme bloc disque ou inode. Une telle
  corruption peut s'tendre par des oprations courantes sur les
  fichiers qui ne se trouvent pas au point d'origine.

  Heureusement, ce genre de d'imprvu devient de plus en plus rare car
  les disques sont de plus en plus fiables. Malgr tout, cela veut dire
  que votre Unix voudra vrifier priodiquement l'intgrit du systme
  de fichiers afin de s'assurer que rien ne cloche. Les Unix modernes
  font une vrification rapide sur chaque partition au moment du boot,
  juste avant de les monter. Au bout d'un certain nombre de redmarrages
  (reboot), la vrification sera plus approfondie et durera quelques
  minutes.

  Si tout cela vous parait, comme Unix, terriblement complexe et
  prdispos aux dfaillances, au contraire, c'est rassurant de savoir
  que ces vrifications faites au dmarrage de la machine, dtectent et
  corrigent les problmes courants _a_v_a_n_t qu'ils ne deviennent rellement
  dsastreux. D'autres systmes d'exploitation ne disposent pas de ces
  fonctionnalits, qui acclrent  un petit peu le dmarrage, mais
  peuvent vous laisser tout 'bousiller' en essayant de rcuprer  la
  main (et en supposant que vous ayez une copie des Utilitaires Norton
  ou autre  porte de main...).



  99..  CCoommmmeenntt ffoonnccttiioonnnneenntt lleess llaannggaaggeess dd''oorrddiinnaatteeuurr ??

  Nous avons dj voqu ``comment les programmes sont      excuts''.
  Chaque programme en fin de compte doit excuter une succession
  d'octets qui sont les instructions dans le _l_a_n_g_a_g_e _m_a_c_h_i_n_e de votre
  ordinateur. Les humains ne pratiquent pas trs bien le langage
  machine ; cela est devenu rare, art obscur mme parmi les hackers.

  La plupart du code du noyau d'Unix except une petite partie de
  l'interface avec le matriel est de nos jours crite dans un _l_a_n_g_a_g_e
  _d_e _h_a_u_t _n_i_v_e_a_u. (Le terme 'haut niveau' est un hritage du pass afin
  de le distinguer du 'bas-niveau' des _l_a_n_g_a_g_e_s _a_s_s_e_m_b_l_e_u_r, qui sont de
  maigres "couches" autour du code machine.


  Il y plusieurs types diffrents de langages de haut niveau. Afin de
  parler d'eux, vous trouverez utile que j'attire votre attention sur le
  fait que le _c_o_d_e _s_o_u_r_c_e d'un programme (la cration humaine, la
  version ditable) est pass  travers plusieurs types de traductions
  pour arriver en code machine, que la machine peut effectivement
  excuter.


  99..11..  LLaannggaaggeess ccoommppiillss

  Le type le plus classique de langage est un _l_a_n_g_a_g_e _c_o_m_p_i_l_. Les
  langages compils sont traduits en fichiers excutables de code
  machine binaire par un programme spcial appel (assez logiquement) un
  _c_o_m_p_i_l_a_t_e_u_r. Lorsque le binaire est gnr, vous pouvez l'excuter
  directement sans regarder  nouveau dans le code source. (La plupart
  des logiciels dlivrs sous forme de binaires compils sont faits 
  partir d'un source auquel vous n'avez pas accs.)

  Les langages compils tendent  fournir une excellente performance et
  ont un accs le plus complet au systme d'exploitation, mais il
  difficile de programmer avec.

  Le langage C, langage dans lequel chaque Unix est lui-mme crit, est
  de tous le plus important (avec sa variante C++). FORTRAN est un autre
  langage compil qui reste utilis par de nombreux ingnieurs et
  scientifiques mais plus vieux et plus primitif. Dans le monde Unix
  aucun autre langage compil n'est autant utilis. En dehors de lui,
  COBOL est trs largement utilis pour les logiciels de finance et
  comptabilit.

  Il y a bien d'autres compilateurs de langages, mais la plupart sont en
  voie d'extinction ou sont strictement des outils de recherche. Si vous
  tes un nouveau dveloppeur Unix qui utilise un langage compil, il
  est incontournable que ce soit C ou C++.



  99..22..  LLaannggaaggeess iinntteerrpprrttss

  Un _l_a_n_g_a_g_e _i_n_t_e_r_p_r__t_ dpend d'un programme interprteur qui lit le
  code source et traduit  la vole en calculs et appels systme. Le
  source doit tre r-interprt (et l'interprteur prsent)  chaque
  fois que le programme est excut.

  Les langages interprts tendent  tre plus lents que les langages
  compils, et limitent souvent les accs au systme d'exploitation ou
  au matriel sous-jacent. D'un autre ct, il est plus facile de
  programmer et ils tolrent plus d'erreurs de codage que les langages
  compils.


  Quelques utilitaires Unix, incluant le shell et bc(1) et sed(1) et
  awk(1), sont effectivement des petits langages interprts. Les BASICs
  sont gnralement interprts. Ainsi est Tcl. Historiquement, le
  langage le plus interprt tait LISP (une amlioration norme sur la
  plupart de ses successeurs). Aujourd'hui, Perl est trs largement
  utilis et devient rsolument plus populaire.



  99..33..  LLaannggaaggeess PP--ccooddee

  Depuis 1990 un type de langage hybride qui utilise la compilation et
  l'interprtation est devenu incroyablement important. Les langages P-
  code sont comme des langages compils dans le sens o le code est
  traduit dans une forme binaire compacte qui est celle que vous
  excutez, mais cette forme n'est pas du code machine. Au lieu de cela,
  c'est du _p_s_e_u_d_o_-_c_o_d_e (ou _p_-_c_o_d_e), qui est gnralement un peu plus
  simple mais plus puissant qu'un langage machine rel. Lorsque vous
  excutez le programme, vous interprtez du p-code.


  Le p-code peut s'excuter pratiquement aussi rapidement que du binaire
  compil (les interprteurs de p-code peuvent tre relativement
  simples, petits et rapides). Mais les langages p-code peuvent garder
  la flexibilit et la puissance d'un bon interprteur.

  D'importants langages p-code sont Python et Java.


  1100..  CCoommmmeenntt IInntteerrnneett ffoonnccttiioonnnnee ??

  Afin de vous aider  comprendre comment Internet fonctionne, nous
  verrons ce qui se passe lorsque vous effectuez une opration classique
  -- pointer dans un navigateur ce document  partir du site Web de
  rfrence du Projet de Documentation de Linux (Linux Documentation
  Project). Ce document est :


  http://sunsite.unc.edu/LDP/HOWTO/Fundamentals.html



  ce qui veut dire qu'il rside dans le fichier
  LDP/HOWTO/Fundamentals.html, sous le rpertoire export World Wide Web
  de la machine sunsite.unc.edu.



  1100..11..  NNoommss eett llooccaalliissaattiioonnss

  La premire chose que votre navigateur doit faire est d'tablir une
  connexion rseau avec la machine sur laquelle se trouve le document.
  Pour faire cela, il doit tout d'abord trouver la localisation rseau
  de _l_'_h__t_e sunsite.unc.edu (hte est un raccourci pour `machine hte'
  ou `hte rseau' ; sunsite.unc.edu est un _n_o_m _d_'_h__t_e _(_h_o_s_t_n_a_m_e_)
  typique). La localisation correspondante est en fait un nombre appel
  _a_d_r_e_s_s_e _I_P (nous expliquerons la partie `IP' de ce terme plus tard).

  Pour faire cela, votre navigateur sollicite un programme nomm _s_e_r_v_e_u_r
  _d_e _n_o_m_s. Le serveur de noms peut rsider sur votre machine, mais il
  est plus probable qu'il soit sur une machine de service avec laquelle
  vous pouvez dialoguer. Lorsque vous abonnez chez un Fournisseur
  d'Accs  Internet (FAI), une partie de la procdure d'installation
  dcrit certainement la manire d'indiquer  votre logiciel Internet
  l'adresse IP du serveur de noms du rseau du FAI.

  Les serveurs de noms sur diffrentes machines communiquent avec les
  autres en changeant et en gardant  jour toutes les informations
  ncessaires  la rsolution de noms d'hte (en les associant  des
  adresses IP). Votre serveur de noms doit demander  trois ou quatre
  sites  travers le rseau afin de rsoudre sunsite.unc.edu, mais cela
  se droule vraiment rapidement (en moins d'une seconde).

  Le serveur de noms dira  votre navigateur que l'adresse IP de Sunsite
  est 152.2.22.81 ; sachant cela, votre machine sera capable d'changer
  des bits avec Sunsite directement.



  1100..22..  PPaaqquueettss eett rroouutteeuurrss

  Ce que le navigateur veut faire est d'envoyer une commande au serveur
  Web sur Sunsite qui a la forme suivante :


  GET /LDP/HOWTO/Fundamentals.html HTTP/1.0



  Que se passe-t-il alors ? La commande est faite de _p_a_q_u_e_t_s ; un bloc
  de bits comme un tlgramme est dcoup en trois choses importantes :
  _l_'_a_d_r_e_s_s_e _s_o_u_r_c_e (l'IP de votre machine), _l_'_a_d_r_e_s_s_e _d_e_s_t_i_n_a_t_i_o_n
  (152.2.22.81), et le _n_u_m__r_o _d_e _s_e_r_v_i_c_e ou _n_u_m__r_o _d_e _p_o_r_t (80, dans ce
  cas) qui indique que c'est une requte World Wide Web.

  Alors votre machine envoie le paquet par le fil (de la connexion modem
  avec votre FAI, ou le rseau local) jusqu' ce qu'il rencontre une
  machine spcialise appele _r_o_u_t_e_u_r. Le routeur possde une carte de
  l'Internet dans sa mmoire -- pas une complte mais une qui dcrit
  votre voisinage rseau et sait comment aller aux routeurs pour les
  autres voisinages sur l'Internet.

  Votre paquet peut passer  travers plusieurs routeurs sur le chemin de
  sa destination. Les routeurs sont adroits. Ils regardent combien de
  temps prend un accus rception pour recevoir un paquet. Ils utilisent
  cette information pour aiguiller le trafic sur les liens rapides. Ils
  l'utilisent pour s'apercevoir que d'autres routeurs (ou un cble) sont
  dconnects du rseau et modifier le chemin si possible en trouvant
  une autre route.

  Il existe une lgende urbaine qui dit qu'Internet a t conu pour
  survivre a une guerre nuclaire. Ce n'est pas vrai, mais la conception
  d'Internet est extrmement bonne en ayant une performance fiable bas
  sur des couches matrielles d'un monde incertain... C'est directement
  du au fait que son intelligence est distribue  travers des milliers
  de routeurs plutt qu' quelques auto-commutateurs massifs (comme le
  rseau tlphonique). Cela veut dire que les dfaillances tendent 
  tre bien localises et le rseau peut les contourner.

  Une fois que le paquet est arriv  destination, la machine utilise le
  numro de service pour le fournir au serveur Web. Le serveur Web peut
  savoir  qui rpondre en regardant l'adresse source du paquet. Quand
  le serveur Web renvoie ce document, il sera coup en plusieurs
  paquets. La taille des paquets varie en fonction du mdia de
  transmission du rseau et du type de service.



  1100..33..  TTCCPP eett IIPP

  Pour comprendre comment des transmissions de multiples paquets sont
  ralises, vous devez savoir que l'Internet utilise actuellement deux
  protocoles empils l'un sur l'autre.

  Le plus bas niveau, _I_P (Internet Protocol), sait comment recevoir des
  paquets individuels d'une adresse source vers une adresse destination
  (c'est pourquoi elles sont appeles adresses IP). Cependant, IP n'est
  pas fiable ; si un paquet est perdu ou jet, les machines source et
  destination ne le sauront jamais. Dans le jargon rseau, IP est un
  protocole _s_a_n_s _c_o_n_n_e_x_i_o_n _(_o_u _m_o_d_e _n_o_n _c_o_n_n_e_c_t__) ; l'expditeur envoie
  juste un paquet au destinataire et n'attend jamais un accus de
  rception.

  Cependant, IP est rapide et peu coteux. Quelquefois, rapide, peu
  coteux et non fiable c'est OK. Lorsque vous jouez en rseau  Doom ou
  Quake, chaque balle est reprsente par un paquet IP. Si quelques-unes
  sont perdues, c'est OK.

  Le niveau suprieur, _T_C_P (Transmission Control Protocol), fournit la
  fiabilit. Quand deux machine ngocient une connexion TCP (ce qu'elles
  font en utilisant IP), le destinataire doit envoyer des accuss de
  rception des paquets qu'il reoit  l'expditeur. Si l'expditeur ne
  reoit pas un accus de rception pour un paquet aprs un certain
  temps, il renvoie ce paquet. De plus, l'expditeur donne  chaque
  paquet TCP un numro de squence, que le destinataire peut utiliser
  pour r-assembler les paquets dans le cas o il sont arrivs dans le
  dsordre. (Cela peut arriver si les liens rseau se rtablissent ou
  cassent pendant une connexion.)

  Les paquets TCP/IP contiennent galement un checksum pour permettre la
  dtection de donnes altres par de mauvais liens. Ainsi, du point de
  vue de quelqu'un utilisant TCP/IP et des serveurs de noms, il
  ressemble  une voie fiable pour faire passer des flux d'octets entre
  des paires hte/numro de services. Les gens qui crivent des
  protocoles rseau ne doivent pas se soucier la plupart du temps de la
  taille des paquets, du r-assemblage des paquets, de la vrification
  d'erreurs, le calcul du checksum et la retransmission qui sont au
  niveau infrieurs.



  1100..44..  HHTTTTPP,, uunn pprroottooccoollee dd''aapppplliiccaattiioonn

  Maintenant revenons  notre exemple. Les navigateurs et les serveurs
  Web parlent un _p_r_o_t_o_c_o_l_e _d_'_a_p_p_l_i_c_a_t_i_o_n qui est au dessus de TCP/IP, en
  l'utilisant simplement comme une manire de passer des chanes
  d'octets dans les deux sens. Ce protocole est appel _H_T_T_P (Hyper-Text
  Transfer Protocol) et nous en avons dj vu une commande -- la
  commande GET utilise ci-dessus.

  Lorsque la commande GET arrive au serveur Web de sunsite.unc.edu avec
  comme numro de service 80, elle sera expdie  un _d__m_o_n _s_e_r_v_e_u_r qui
  coute le port 80. La plupart des services Internet sont implments
  par des dmons serveurs qui ne font rien d'autre qu'attendre sur des
  numros de port, rcolter et excuter les commandes entrantes.


  Cette conception de l'Internet a une rgle qui prime sur les autres,
  c'est que toutes les parties sont le plus simple possible et
  humainement accessible. HTTP, et ses compres (comme le Simple Mail
  Transfer Protocol, _S_M_T_P, qui est utilis pour transporter du courrier
  lectronique entre des machines) utilisent de simples commandes de
  texte qui se terminent par un retour chariot.


  C'est rarement inefficace ; dans certaines circonstances vous pouvez
  obtenir plus de rapidit en employant un protocole binaire fortement
  cod. Mais l'exprience a montr que le bnfice d'avoir des commandes
  qui sont faciles  dcrire et  comprendre l'emportent sur le gain
  marginal de l'efficacit que l'on peut esprer au prix de choses
  compliques et compactes.

  Par consquent, ce que le dmon serveur vous renvoie via TCP/IP est
  aussi du texte. Le dbut de la rponse ressemblera  quelque chose
  comme (quelques en-ttes ont t supprims) :


  HTTP/1.1 200 OK
  Date: Sat, 10 Oct 1998 18:43:35 GMT
  Server: Apache/1.2.6 Red Hat
  Last-Modified: Thu, 27 Aug 1998 17:55:15 GMT
  Content-Length: 2982
  Content-Type: text/html



  Ces en-ttes seront suivis d'une ligne vide et du texte de la page Web
  (aprs que la connexion sera rompue). Votre navigateur affichera
  simplement cette page. Les en-ttes indiquent -- en particulier, l'en-
  tte Type de Contenu (Content-Type) -- comment les donnes reues sont
  vraiment du HTML).

























  HOWTO Groupe d'Usagers Linux
  Kendall Grant Clark <mailto:kclark@cmpu.net>
  Version Franaise par Arnaud Launay, asl@launay.org
  v1.6.2, 24 Avril 1998

  Le HOWTO Groupe d'Usagers Linux est un guide sur la fondation, le
  fonctionnement, et le dveloppement d'un Groupe d'Usagers Linux (GUL).
  ______________________________________________________________________

  Table des matires
























































  1. Introduction

     1.1 Buts
     1.2 Autres sources d'informations

  2. Qu'est ce qu'un Groupe d'Usagers Linux ?

     2.1 Qu'est ce que Linux ?
     2.2 En quoi Linux est-il unique ?
     2.3 Qu'est ce qu'un groupe d'usagers ?
     2.4 En Rsum

  3. Que trouve-t-on comme GULs ?

     3.1 Listes de GULs
     3.2 Solidarit contre commodit

  4. Que fait un GUL ?

     4.1 Promotion de Linux
     4.2 Apprentissage de Linux
     4.3 Support Linux
        4.3.1 Les usagers
        4.3.2 Les consultants
        4.3.3 Les petites entreprises, organisations sans but lucratif, et coles
        4.3.4 Le dveloppement de logiciels gratuits
           4.3.4.1 Chris Browne : la philanthropie du logiciel gratuit
        4.3.5 Le Mouvement Linux
     4.4 Convivialit Linux

  5. Activits locales d'un GUL

     5.1 Les rencontres
     5.2 Ressources en ligne

  6. Suggestions Pratiques

     6.1 Organisations de soutien des GULs
     6.2 Fonder un GUL
     6.3 Faire fonctionner et dvelopper un GUL

  7. Implications lgales et politiques

     7.1 Implications Lgales
        7.1.1 Aux Etats-Unis
        7.1.2 Au Canada
     7.2 Implications Politiques
        7.2.1 Les gens ont des opinions diffrentes  propos des logiciels gratuits.
        7.2.2 Les organisations sans but lucratif et l'argent ne se mlangent pas trs trs bien.

  8. A propos de ce document

     8.1 Conditions d'Utilisation
     8.2 NdT: Dngation
     8.3 Nouvelles versions
     8.4 Veuillez contribuer  ce HOWTO
     8.5 Historique du document
     8.6 Remerciements


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  BBuuttss

  Le HOWTO Groupe d'Usagers Linux est destin  servir de guide sur la
  fondation, le fonctionnement, et le dveloppement d'un Groupe
  d'Usagers Linux (GUL).

  Linux est une implmentation d'Unix  distribution gratuite pour les
  ordinateurs personnels, les serveurs et les stations de travail. Il a
  t dvelopp sur les i386 et supporte maintenant les processeurs
  i486, Pentium, Pentium Pro, et Pentium II, ainsi que les clones des
  x86 par AMD, Cyrix, et autres. Il supporte galement de nombreuses
  machines SPARC, DEC Alpha, PowerPC/PowerMac, Motorola 68x0 Mac/Amiga.


  11..22..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonnss

  Si vous dsirez en apprendre plus sur Linux, le Linux Documentation
  Project <http://sunsite.unc.edu/LDP/> est un bon endroit pour
  dmarrer.

  Pour des informations gnrales sur les groupes d'usagers
  d'ordinateurs, voyez l'Association of PC Users Groups
  <http://www.apcug.org/>.


  22..  QQuu''eesstt ccee qquu''uunn GGrroouuppee dd''UUssaaggeerrss LLiinnuuxx ??



  22..11..  QQuu''eesstt ccee qquuee LLiinnuuxx ??

  Pour apprcier et comprendre totalement le rle significatif des GULs
  dans le Mouvement Linux, il est important de comprendre ce qui rend
  Linux unique parmi les nombreux autres systmes d'exploitation.

  Linux en tant que systme d'exploitation est trs efficace et trs
  puissant.  Mais, Linux en tant qu'iiddee sur la manire dont les
  logiciels devraient tre dvelopps est encore plus puissante. Linux
  est un systme d'exploitation ggrraattuuiitt; il est distribu sous la GNU
  Public License (GPL). Le code source est disponible gratuitement pour
  tous ceux qui le veulent, et il le sera toujours. Linux est dvelopp
  par un groupe de programmeurs non structur de par le monde, sous la
  direction technique de Linus Torvalds et d'autres dveloppeurs cls.
  Linux est un mouvement mondial sans structure centrale, bureaucratie,
  ou entit pour contrler, coordonner, ou diriger d'une queconque faon
  ses affaires.  Alors que cette situation cause pour une grande part
  l'attrait et de la qualit technique de Linux en tant que systme
  d'exploitation, elle peut rendre peu efficace la gestion des
  ressources humaines, et inoprants, voire mme nuisibles la promotion,
  les relations publiques, la formation et le perfectionnement des
  usagers.


  22..22..  EEnn qquuooii LLiinnuuxx eesstt--iill uunniiqquuee ??

  Cette structure lche ne changera probablement pas en ce qui concerne
  Linux en tant que projet logiciel. Et c'est d'ailleurs une bonne
  chose. Linux fonctionne prcisment parce que les gens sont libres
  d'aller et venir comme ils le veulent: ddeess pprrooggrraammmmeeuurrss lliibbrreess ssoonntt
  ddeess pprrooggrraammmmeeuurrss hheeuurreeuuxx,, qquuii ssoonntt ddeess pprrooggrraammmmeeuurrss eeffffiiccaacceess.

  Mais cette structure lche peut rendre la vie de l'usager de Linux
  moyen un peu complique -- surtout si cet usager n'est pas programmeur
  professionnel ou par vocation. Qui doit-on appeller pour le suivi, la
  formation ou le perfectionnement ? Comment savoir pour quelles
  utilisations Linux est le plus adapt ?
  Dans une large mesure, les GULs locaux donnent les rponses  ce type
  de questions. C'est pourquoi les GULs sont une partie cruciale du
  Mouvement Linux. Parce qu'il n'y a pas d'``agence rgionale'' de la
  Linux Corporation dans votre village, ville ou mtropole, le GUL local
  joue le mme rle qu'une agence rgionale pour une grande entreprise
  multi-nationale...

  Linux est unique car il n'a pas, ni n'est handicap par, une structure
  centrale ou une bureaucratie pour attribuer ses ressources, former ses
  usagers, ou fournir un support technique pour ses produits. Ces
  travaux sont ralis par de nombreux moyens : l'Internet, les
  consultants, les VARs, les compagnies de support, les universits et
  les grandes coles. Mais, de plus en plus, dans de nombreux endroits
  autour du globe, ceci est fait par un GUL local.


  22..33..  QQuu''eesstt ccee qquu''uunn ggrroouuppee dd''uussaaggeerrss ??

  Les groupes d'usagers d'ordinateurs, du moins aux Etats-Unis, ne sont
  pas un phnomne nouveau; en fait, ils ont jou un rle important dans
  l'histoire de l'ordinateur personnel. L'ordinateur personnel a volu
  en grande partie pour satisfaire la demande des lectroniciens, des
  radio-amateurs, et des autres groupes d'usagers amateurs, ainsi que
  celle des expositions et des salons, pour un accs personnel et bon
  march aux ressources informatiques. Bien sr, des gants comme IBM
  ont par la suite dcouvert que le PC tait quelque chose de bien et de
  rentable, mais l'engouement pour le PC vint du peuple, par le peuple,
  et pour le peuple.

  Aux Etats-Unis, les groupes d'usagers ont chang, et beaucoup pour le
  pire, avec le temps. Les problmes financiers du plus grand groupe
  d'usagers de tout les temps, la Boston Computer Society
  <http://www.bcs.org/> ont t mdiatiss; mais aux U.S. la plupart des
  grands groupes d'usagers de PC ont vu un dclin de leurs adhsions
  relles. A leur apoge, les groupes d'usagers amricains ont concentr
  leurs forces sur la production de journaux, la maintenance de
  logiciels et de librairies de disquettes, de rencontres, de
  manifestations, et, quelquefois, mme de BBS (Bulletin Board Systems).
  Avec l'avnement de l'Internet, toutefois, la plupart des services que
  les groupes d'usagers fournissaient autrefois, ont t transfr  des
  choses comme CompuServe, AOL, et le Web.

  L'essor de Linux, cependant, concida  avec et fut intensifi par la
  ``dcouverte'' par le grand public de l'Internet. Plus l'Internet
  devenait populaire, plus Linux le devenait galement : l'Internet a
  apport de nouveaux usagers, dveloppeurs, et vendeurs au Mouvement
  Linux.

  Ainsi, juste quand les groupes d'usagers de PC traditionnels
  dclinaient  cause de la popularit de l'Internet, cette popularit a
  propuls Linux en avant, crant une nouvelle demande pour de nouveaux
  groupes d'usagers ddis exclusivement  Linux. Pour ne donner qu'une
  indication des diffrences entre un GUL et un groupe d'usagers
  traditionnel, j'attire l'attention du lecteur sur un fait trange :
  les groupes d'usagers traditionnels ont d maintenir un contrle
  relativement serr sur les genres de logiciels que leurs usagers
  copiaient et vendaient lors des rencontres.  Alors que des copies
  illgales de logiciels commerciaux se faisaient certainement lors de
  ces rencontres, cette pratique tait officiellement dsapprouve, et
  pour cause.

  Au contraire, lors d'un salon d'un GUL, cet tat d'esprit est
  totalement hors sujet. Loin d'tre le genre de chose qu'un GUL doive
  dsapprouver, le copiage gratuit de Linux doit tre l'un des piliers
  d'un GUL. En fait, des anecdotes montrent que les groupes d'usagers
  traditionnels ont quelquefois besoin d'un temps d'adaptation pour
  comprendre que Linux peut tre copi gratuitement autant de fois qu'on
  en a besoin ou qu'on le dsire.


  22..44..  EEnn RRssuumm


  Afin que le Mouvement Linux continue  se dvelopper, la
  prolifration, le succs des GULs locaux, entre autres facteurs, est
  une ncessit absolue. En raison du statut unique de Linux, le GUL
  local doit fournir quelques unes des fonctions d'une ``agence
  rgionale'' de grandes compagnies d'informatique comme IBM, Microsoft,
  ou Sun. Les GULs peuvent et doivent perfectionner, aider et former les
  usagers Linux, coordonner les consultants Linux, promouvoir Linux en
  tant que solution informatique, et mme servir de liaison aux media
  locaux comme les journaux et la tlvision.


  33..  QQuuee ttrroouuvvee--tt--oonn ccoommmmee GGUULLss ??


  Etant donn que ce document est conu pour tre un guide non seulement
  pour le fonctionnement et le dveloppement des GULs mais galement
  pour leur fondation, il serait bon de dterminer quels GULs on peut
  trouver avant d'aller plus loin.


  33..11..  LLiisstteess ddee GGUULLss


  Il y a plusieurs listes de GULs disponibles sur le Web. Si vous
  dsirez trouver un GUL local, l'une des premires choses  faire est
  de dterminer o se situe le GUL le plus proche. _C_e _q_u_e _v_o_u_s _a_v_e_z _d_e
  _m_i_e_u_x _ _f_a_i_r_e _e_s_t _d_e _r_e_j_o_i_n_d_r_e _u_n _G_U_L _d__j_ __t_a_b_l_i _d_a_n_s _v_o_t_r_e _s_e_c_t_e_u_r
  _p_l_u_t__t _q_u_e _d_'_e_n _c_r__e_r _u_n _n_o_u_v_e_a_u_.

  A la mi-1997, il y avait des GULs dans les 50 Etats des Etats-Unis, le
  district de Columbia, et 26 autres pays, incluant l'Inde, la Russie,
  et la plupart des pays d'Europe de l'Est et de l'Ouest.

  Note: le plus grand march inexploit de l'informatique de la plante,
  la Chine, ne semble pas encore avoir de GUL, et l'Inde, le deuxime
  pays le plus peupl de la plante, n'en a que quelques uns.


    Trouver de groupes Linux partout (Finding Groups of Linux Users
     Everywhere) <http://www.ssc.com/glue/groups/>

    Projet de liste des GULs (LUG List Project)
     <http://www.nllgg.nl/lugww/>

    Enregistrement des LUGs (LUG Registry)
     <http://www.linux.org/users/index.html>

  Il apparat que la liste GLUE <http://www.ssc.com/glue/groups/> est
  plus complte pour les GULs amricains, tandis que le LUG List Project
  <http://www.nllgg.nl/lugww/> offre une couverture plus internationale.


  33..22..  SSoolliiddaarriitt ccoonnttrree ccoommmmooddiitt


  Mme si les listes de GULs sur le web sont bien  jour, il est
  probable qu'elles ne listent pas tous les GULs. En plus de la
  consultation de ces listes, je suggre, si vous considrez la
  fondation d'un GUL, que vous postiez un court message pour demander
  s'il existe un GUL local dans comp.os.linux.announce
  <news:comp.os.linux.announce>, comp.os.linux.misc
  <news:comp.os.linux.misc> ou une hirarchie rgionale Usenet
  approprie. S'il n'y a pas dj de GUL dans votre secteur, alors
  poster des messages  ces groupes avertira des membres potentiels de
  vos intentions. En France, postez un message dans
  fr.comp.os.linux.annonces <news:fr.comp.os.linux.annonces>.

  Si vous projetez de fonder un GUL local, vous devrez soigneusement
  comparer la solution commode et la solution solidaire. En d'autres
  termes, s'il y a dj un GUL dans votre ville, mais de l'autre ct,
  on peut prfrer lancer un nouveau groupe par commodit. Mais on peut
  prfrer rejoindre le groupe existant pour des raisons d'unit et de
  solidarit.  _D_e_s _e_f_f_e_c_t_i_f_s _s_u_p__r_i_e_u_r_s _s_i_g_n_i_f_i_e_n_t _p_r_e_s_q_u_e _t_o_u_j_o_u_r_s _u_n_e
  _p_u_i_s_s_a_n_c_e_, _u_n_e _i_n_f_l_u_e_n_c_e_, _e_t _u_n_e _e_f_f_i_c_a_c_i_t_ _s_u_p__r_i_e_u_r_e_s. Bien qu'il
  puisse tre agrable d'avoir deux groupes de 100 membres chacun, il y
  a certains avantages  avoir un seul groupe de 200 membres. Bien sr,
  si vous vivez dans une petite ville ou un village, un groupe vaut
  mieux que rien.

  Le fait est que lancer un GUL est tche ardue, qu'il faut entreprendre
  en considrant tous les facteurs importants, y compris quelque
  estimation de l'effet sur les autres groupes.


  44..  QQuuee ffaaiitt uunn GGUULL ??


  Les buts des GULs locaux sont aussi varis que les secteurs o ils
  fonctionnent. Il n'existe pas de moule pour les GULs, et ce document
  n'est pas destin  en proposer. Souvenez vous : Linux est libre de
  toute bureaucratie et de tout contrle centralis, et il en va de mme
  pour les GULs locaux.

  On peut cependant identifier un noyau de buts pour un GUL local:


    la promotion

    la formation

    la support

    la convivialit, le cercle d'amis

  Chaque GUL local combinera ces buts avec d'autres d'une faon
  particulire afin de satisfaire les besoins particuliers de ses
  adhrents.


  44..11..  PPrroommoottiioonn ddee LLiinnuuxx

  Le besoin de promouvoir l'utilisation de Linux est aussi naturel aux
  utilisateurs d'ordinateurs que le besoin de manger ou de dormir.
  Lorsqu'on trouve quelque chose qui marche, et qui marche bien, on a un
  besoin naturel d'en parler  autant de monde qu'on peut. Le rle des
  GULs dans la promotion de Linux ne peut pas tre surestim, surtout
  tant que l'acceptation commerciale  grande chelle de Linux, qu'il
  mrite tant, n'a pas encore t atteinte. C'est certes bnfique pour
  le Mouvement Linux chaque fois qu'un journaliste informatique crit
  une critique positive de Linux , a l'est autant chaque fois que des
  usagers de Linux satisfaits en parlent  leurs collgues, employs, ou
  employeurs.

  Il y a de la promotion efficace et il y a de la critique inefficace :
  en tant qu'usagers de Linux, nous devons constamment veiller 
  promouvoir Linux d'une faon qui reflte positivement  la fois le
  produit, ses crateurs et dveloppeurs, et nos collgues usagers. Le
  Linux Advocacy mini-HOWTO (
  <http://www.freenix.org/unix/linux/HOWTO/mini/Advocacy.html>),
  disponible sur le LDP, donne quelques suggestions utiles  cet gard.
  On ne dira jamais assez que la promotion est un aspect important de la
  mission d'un GUL local.

  Il viendra peut-tre un temps o la promotion de Linux sera largement
  dpasse parce que Linux aura plus ou moins gagn la guerre, le jour
  o la phrase ``on n'a jamais saqu personne pour avoir utilis Linux''
  deviendra une ralit. Jusque l, toutefois, le GUL local joue un rle
  indispensable dans la promotion de l'usage de Linux. C'est ainsi car
  son soutien est gratuit, bien intentionn, et renforc par le
  militantisme.  Si une personne vient  connatre Linux grce aux
  efforts d'un GUL local, alors cette personne, en tant que nouvel
  usager de Linux, a une longueur d'avance : _e_l_l_e _c_o_n_n_a__t _d__j_
  _l_'_e_x_i_s_t_e_n_c_e _d_'_u_n_e _o_r_g_a_n_i_s_a_t_i_o_n _q_u_i _l_'_a_i_d_e_r_a _ _i_n_s_t_a_l_l_e_r_, _c_o_n_f_i_g_u_r_e_r_,
  _e_t _m__m_e _m_a_i_n_t_e_n_i_r _L_i_n_u_x _q_u_e_l _q_u_e _s_o_i_t _l_'_o_r_d_i_n_a_t_e_u_r _q_u_'_e_l_l_e _p_r__v_o_i_t _d_e
  _l_u_i _d__d_i_e_r_.

  Les nouveaux usagers de Linux qui sont dj en contact avec un GUL
  local ont un plus par rapport  ceux dont l'intrt pour Linux a t
  provoqu par un journaliste informatique, mais qui n'ont personne vers
  qui se tourner pour les aider dans leur qute pour installer, lancer,
  et apprendre Linux.

  Il est, par consquent, important pour les GULs locaux de promouvoir
  Linux car leur soutien est efficace, militant, et gratuit.



  44..22..  AApppprreennttiissssaaggee ddee LLiinnuuxx

  Le rle d'un GUL local est non seulement de promouvoir l'utilisation
  de Linux, mais aussi de s'efforcer  entraner ses membres, ainsi que
  le public informatique du secteur,  utiliser Linux et ses composants
  associs. D'aprs mon exprience personnelle, la formation des usagers
  est le but le plus important qu'un GUL doive prendre en charge. Bien
  sr, ainsi que je l'ai dj montr, les GULs sont parfaitement libres
  de s'organiser et d'organiser leurs activits autour de n'importe
  lequel de ces buts (ou d'autres).  Je crois, cependant, que les GULs
  auront l'impact maximal sur le Mouvement Linux en formant et en
  entranant les usagers de Linux.

  Les GULs locaux peuvent choisir d'assumer la formation simplement
  parce qu'il n'y a pas d'autre entit locale par l'intermdiaire de
  laquelle un usager de Linux pourrait recevoir une formation technique.
  Alors que les universits, les grandes coles et les lyces se
  tournent de plus en plus vers Linux pour former leurs tudiants,  la
  fois efficacement et  bon march,  des systmes d'exploitation de
  type Unix, quelques usagers de Linux sont soit incapables, soit non
  dsireux de s'inscrire  des cours pour apprendre Linux. Pour ces
  usagers le GUL local est une ressource prcieuse pour le dveloppement
  ou la cration de comptences techniques sur les technologies modernes
  : l'administration de systmes Unix, la programmation systme, le
  support et la cration des technologies Internet et Intranet, etc.

  Par une dformation ironique, de nombreux GULs locaux se partagent
  mme la charge de la formation des travailleurs de grandes
  entreprises. Chaque salari de l'Acme Corp qui tend ses connaissances
  informatiques en participant  un GUL local est un salari de moins 
  qui l'Acme Corp devra soit payer, soit donner une formation. Mme si
  l'utilisation et la gestion d'un PC Linux  domicile n'est pas la mme
  chose que l'administration d'une base de donnes pour des socits,
  d'un centre d'appel ou d'un service d'une telle envergure, c'est  des
  annes lumires plus complexe, plus enrichissant et plus instructif
  que l'utilisation et l'administration d'un PC sous Windows 95  la
  maison. Comme Linux lui-mme progresse vers des choses comme les
  systmes de fichiers tenant un journal, une grande disponibilit, la
  possibilit du temps rel, et autres spcificits  la pointe du
  progrs d'Unix, la ligne dj floue entre Linux et les Unix ``rels''
  deviendra encore plus indistincte.

  Non seulement une telle formation est une sorte d'entranement des
  employs, mais elle servira galement, l'informatique devenant une
  partie vitale de l'conomie globale, de service rendu  la communaut.
  Dans la plupart des zones mtropolitaines des Etats-Unis, par exemple,
  il est possible pour un GUL local d'installer Linux dans les coles
  locales, les petites entreprises, les organisations communautaires et
  sociales, et d'autres environnements non relis aux grandes
  entreprises. Ceci accomplit la tche de la promotion de Linux et aide
  galement  informer le public sur Linux en tant que systme
  d'exploitation Unix. Etant donn que de plus en plus de ces sortes
  d'organisations tentent d'tablir une prsence sur l'Internet ou de
  fournir des accs modem  leurs employs, tudiants, et constituants,
  l'opportunit grandit pour un GUL local de participer  la vie de leur
  communaut en l'duquant sur un systme d'exploitation gratuit et
  disponible gratuitement. Cette sorte de service rendu permet 
  l'usager classique de Linux d'adopter cette sorte de gnrosit qui a
  caractris Linux, et la communaut des logiciels gratuits, depuis le
  tout dbut. La plupart des usagers de Linux ne peuvent programmer
  comme Linus Torvalds, mais nous pouvons tous offrir notre temps et nos
  capacits aux autres usagers de Linux, la communaut Linux, et la
  communaut proche dans laquelle nous travaillons et vivons.

  Linux va comme un gant  ces sortes d'organisations car le dployer ne
  ncessite pas de prendre des licences chres, ou de payer cher pour la
  maintenance ou la mise  jour. De plus, parce que Linux est
  techniquement lgant et conomique, il tourne trs bien sur toutes
  les sortes de machines que les entreprises mettent au rebut et que des
  organisations  but non lucratif ne sont que trop heureuses
  d'utiliser.  Ainsi que de plus en plus de gens le dcouvrent chaque
  jour, les vieux 486 prenant la poussire dans le grenier peuvent faire
  du vvrraaii ttrraavvaaiill si quelqu'un y installe Linux.

  De plus, la formation  Linux a un effet cumulatif sur les autres buts
  d'un GUL local, en particulier celui de promotion discut plus loin.
  Une meilleure formation Linux signifie une meilleure promotion de
  Linux. Plus il y a de personnes sur lesquelles un GUL peut compter
  pour raliser ses buts, plus la promotion devient simple, et donc,
  plus on peut en faire. Plus les usagers nouveaux et inexpriments
  d'un GUL local peuvent recommander et ventuellement former  Linux,
  plus le GUL peut devenir grand et efficace. En d'autres termes, si un
  GUL se focalise seulement sur la promotion de Linux au dtriment de
  l'ducation  Linux, les freins naturels  l'essor de l'organisation
  seront plus gnants. Si seulement deux ou trois pour cent des membres
  d'un GUL prennent sur eux d'aider les autres, la croissance du GUL
  sera ralentie. Une chose sur laquelle vous pouvez compter : _s_i _l_e_s
  _u_s_a_g_e_r_s _n_o_u_v_e_a_u_x _e_t _i_n_e_x_p__r_i_m_e_n_t__s _n_'_o_b_t_i_e_n_n_e_n_t _p_a_s _l_'_a_i_d_e _d_o_n_t _i_l_s
  _o_n_t _b_e_s_o_i_n _a_v_e_c _L_i_n_u_x _p_a_r _u_n _G_U_L _l_o_c_a_l_, _i_l_s _n_e _p_a_r_t_i_c_i_p_e_r_o_n_t _p_a_s _ _c_e
  _G_U_L _t_r__s _l_o_n_g_t_e_m_p_s.  Si un grand pourcentage des membres aide les
  autres, le GUL sera capable de grandir beaucoup plus. La formation 
  Linux est la cl de cette dynamique : la formation rend les nouveaux
  usagers Linux expriments.

  La formation gratuite  un Linux gratuit montre galement  quel point
  Linux est membre  part entire de la communaut des logiciels
  gratuits. Ainsi il semble appropri que les GULs locaux se focalisent
  non seulement sur la formation  Linux mais forment galement  tous
  les logiciels divers et les technologies qui existent autour de Linux.
  Ceci inclut, par exemple, la srie des programmes et utilitaires GNU,
  le serveur web Apache, l'implmentation XFree86 de X Window, TeX,
  LaTeX, etc. Heureusement la liste des logiciels gratuits qui tournent
  sous Linux est une liste longue et varie.

  Enfin, Linux est un systme d'exploitation auto-document ; en
  d'autres termes, si nous n'crivons pas la documentation, personne ne
  le fera pour nous. A cette fin, vrifiez que les membres du GUL sont
  bien au courant de l'existence du Linux Documentation Project
  <http://sunsite.unc.edu/LDP/>, qui peut tre trouv sur tous les
  miroirs du monde. Considrez la possibilit de fournir un miroir local
  du LDP pour la communaut Linux locale et pour les membres du GUL.
  N'oubliez pas de faire de publier --- par comp.os.linux.announce, le
  LDP, et d'autres sources pertinentes d'informations Linux --- toute
  documentation  ce sujet qui est dvelopp par le GUL : prsentations
  techniques, les cours, les FAQ (Foires Aux Questions) locales, etc. Il
  y a beaucoup de documentation Linux produites par les GULs qui ne
  profite pas  la communaut Linux mondiale parce que personne en
  dehors du GUL ne la connat.  Ne laissez pas gaspiller ces efforts des
  GULs : il est fort probable que si quelqu'un dans un GUL a une
  question ou un quelconque problme , alors des personnes des autres
  GULs tout autour du monde auront les mmes questions et problmes.


  44..33..  SSuuppppoorrtt LLiinnuuxx

  Bien sr pour le nnoouuvveeaauu dsespr le rle primaire d'un GUL local est
  le support Linux. Mais c'est une erreur que de supposer que le support
  Linux signifie seulement support _t_e_c_h_n_i_q_u_e pour les nouveaux usagers
  de Linux. Il peut et doit signifier beaucoup plus.

  Les GULs locaux ont l'opportunit de supporter:


    les usagers

    les consultants

    les entreprises, les associations sans but lucratif, et les coles

    le Mouvement Linux


  44..33..11..  LLeess uussaaggeerrss

  Le sujet de plainte le plus frquent des nouveaux usagers de Linux,
  une fois qu'ils ont russi  installer Linux, se trouve tre la courbe
  d'assimilation trop raide qui n'est pas du tout spcifique  Linux,
  mais qui est, plutt, une caractristique de tous les Unix modernes.
  Avec la raideur de la courbe d'assimilation, toutefois, vient la
  puissance et la flexibilit d'un systme d'exploitation complexe. Un
  GUL local est souvent la seule ressource qu'un nouvel usager de Linux
  a de disponible pour tenter d'adoucir la courbe d'assimilation.

  Mais mme si un nouvel usager de Linux ne le sait pas encore, il aura
  besoin de plus qu'un simple support technique : Linux et le monde des
  logiciels gratuits sont tous deux des cibles trs changeantes. Les
  GULs locaux sont un moyen d'information prcieux sur Linux et les
  autres logiciels gratuits. Non seulement il manque  Linux une
  bureaucratie centrale, mais il manque galement en grande partie de la
  sorte d'infrastructure journalistique dont les usagers d'autres
  systmes peuvent bnficier. Le Mouvement Linux dispose de ressources
  comme le Linux Journal <http://www.ssc.com/lj/> et la Linux Gazette
  <http://www.ssc.com/lg/>, mais beaucoup de nouveaux usagers de Linux
  ne connaissent pas ces ressources. De plus, de mme que les
  publications _m_e_n_s_u_e_l_l_e_s, ils sont souvent prims sur les corrections
  d'erreurs, les problmes de scurit, les patchs, les nouveaux noyaux,
  etc. C'est l que le GUL local en tant que source et moyen
  d'information  jour est si vital pour les usagers, tant nouveaux
  qu'expriments.

  Par exemple, jusqu' ce qu'un nouvel usager de Linux sache que les
  noyaux les plus rcents sont disponibles sur ftp.kernel.org
  <ftp://ftp.kernel.org> ou que le LLiinnuuxx DDooccuummeennttaattiioonn PPrroojjeecctt dispose
  gnralement de versions plus rcentes des HOWTOs qu'une distribution
  de Linux base sur CD, c'est au GUL local, en tant qu'entit de
  support primaire, d'tre le passage vers ces informations utiles et
  mise  jour.

  En fait il peut tre un peu trompeur de se focaliser sur le rle de
  support que les GULs locaux offrent aux nouveaux usagers : les usagers
  intermdiaires et expriments bnficient aussi de la profusion de
  trucs, astuces et secrets sur Linux utiles et  jour.  cause de la
  complexit de Linux, mme les usagers avancs apprennent souvent de
  nouveaux trucs ou techniques en s'impliquant simplement dans un GUL
  local. Quelquefois, ils apprennent de nouveaux paquetages dont ils ne
  connaissaient pas l'existence, quelquefois ils se rappellent juste
  cette commande cryptique pour vi qu'ils n'avaient pas utilis depuis
  le lyce.


  44..33..22..  LLeess ccoonnssuullttaannttss

  Il est, je pense, plutt vident de prtendre que les GULs locaux
  doivent tre impliqus dans l'aide aux nouveaux usagers de Linux.
  Aprs tout, s'ils ne sont pas supposs faire cel, que devraient-ils
  faire ? Ce qui est moins vident, c'est que le GUL local peut jouer un
  rle important dans le support local aux consultants Linux. Qu'ils
  fassent de la consultation pour Linux  plein temps ou  temps
  partiel, les consultants peuvent tre une part importante d'un GUL
  local. Comment le GUL peut-il les aider ?

  La rponse  cette question est juste la rponse  une autre question:
  que dsirent et veulent les consultant Linux ? _I_l_s _o_n_t _b_e_s_o_i_n _d_e
  _q_u_e_l_q_u_'_u_n _q_u_i _v_o_u_d_r_a_i_t _c_o_n_s_u_l_t_e_r_. Un GUL local offre le meilleur moyen
  pour ceux qui _o_f_f_r_e_n_t leurs conseils de trouver ceux qui _o_n_t _b_e_s_o_i_n de
  conseils pour Linux. Le GUL local peut mettre en relation de faon
  informelle fournisseurs et demandeurs de consultation, simplement en
  attirant toutes, ou la plupart des personnes intresses par Linux,
  dans un mme lieu et en leur permettant de se parler.  La manire dont
  les GULs s'en chargent nous occupera plus loin. Ce qui est important
  ici est de montrer que les GULs peuvent et doivent jouer galement ce
  rle. Le HOWTO Linux Consultants est un document important de ce point
  de vue, mais probablement seulement une fraction des conseillers Linux
  du monde entier,  plein temps ou non, sont enregistrs dans ce HOWTO.

  Cette relation est mutuellement bnfique. Les conseillers aident les
  GULs en leur fournissant un encadrement rompu tant  la technique
  qu'aux organisations, alors que les GULs aident les conseillers en les
  mettant en contact avec les personnes ncessitant leurs services. Les
  nouveaux usagers profitent et des GULs et des conseillers puisque
  leurs demandes de support simples ou de routine sont prises en charge
  _g_r_a_t_u_i_t_e_m_e_n_t par les GULs, et que leurs besoins complexes et les
  problmes --- de la sorte qui demandent videmment les services d'un
  conseiller payant --- peuvent tre pris en charge par les conseillers
  que le GUL local aide  contacter.

  La ligne entre les demandes de support requrant un conseiller et
  celles qui n'en ont pas besoin est quelquefois indistincte ; mais dans
  la plupart des cas la diffrence est claire. Tant qu'un GUL local ne
  dsire pas acqurir la rputation d'envoyer inutilement de nouveaux
  usagers aux conseillers --ceci tant une attitude grossire et trs
  anti-Linux-- il n'y a pas de raisons pour les GULs de ne pas aider 
  construire des contacts entre les usagers qui ont besoin des services
  des consultants et les professionnels qui offrent ces services.

  Veuillez vous rfrer au Linux Consultants HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/Consultants-HOWTO.html> de Martin
  Michlmayr pour une liste internationale des conseillers Linux.


  44..33..33..  LLeess ppeettiitteess eennttrreepprriisseess,, oorrggaanniissaattiioonnss ssaannss bbuutt lluuccrraattiiff,, eett
  ccoolleess

  Les GULs ont aussi l'opportunit de conseiller les petites entreprises
  et les organisations locales. Ce support prsente deux aspects. Tout
  d'abord, les GULs peuvent conseiller les entreprises et les
  organisations qui dsirent utiliser Linux comme part de leurs efforts
  d'informatisation et de dveloppement technologique. Ensuite, les GULs
  peuvent aider les entreprises et les organisations locales qui
  dveloppent pour Linux, satisfont les besoins des usagers de Linux,
  supportent ou installent Linux, etc.

  Le genre de support que les GULs peuvent offrir aux entreprises
  locales qui dsirent utiliser Linux comme systme pour leurs
  oprations informatiques n'est pas vraiment si diffrent de la sorte
  de support que les GULs donnent aux individus qui dsirent faire
  tourner Linux chez eux. Par exemple, compiler un noyau Linux ne change
  pas vraiment de la maison  l'entreprise. Le support des entreprises
  utilisant Linux, toutefois, peut signifier qu'un GUL se concentre sur
  les logiciels commerciaux tournant sous Linux, plutt que de se
  focaliser seulement sur les logiciels gratuits. Si Linux continue  se
  maintenir comme alternative informatique viable, alors il arrivera 
  rendre des vendeurs de logiciels dsireux d'crire pour et de porter
  sous Linux en tant que plateforme commercialement viable. Si les GULs
  locaux peuvent jouer un rle dans l'aide des usagers commerciaux 
  valuer des solutions commerciales Linux, alors de plus en plus de
  vendeurs de logiciels seront encourags  considrer Linux dans leur
  dveloppement et dans leurs plans.

  Ceci nous amne directement  l'autre sorte de support qu'un GUL local
  peut donner  une entreprise locale. Les GULs locaux peuvent servir de
  centre de diffusion pour les informations qui ne sont disponibles que
  dans trs peu d'autres endroits. Par exemple:


    Quel FAI est compatible Linux ?

    Y a-t-il des vendeurs de matriel locaux qui construisent des PCs
     Linux ?

    Quelqu'un vend-il des CDs Linux localement ?

  Maintenir et rendre publiques ce genre d'informations n'aide pas
  seulement les membres du GUL local, mais il aide galement les
  entreprises locales rceptives  Linux, et il les encourage 
  continuer  l'tre. Il peut mme, dans certains cas, aider 
  contribuer  une atmosphre comptitive dans laquelle les autres
  entreprises sont encourages  devenir galement rceptives  Linux.


  44..33..44..  LLee ddvveellooppppeemmeenntt ddee llooggiicciieellss ggrraattuuiittss

  Finalement, les GULs peuvent aussi supporter le Mouvement Linux en
  solicitant et en organisant des donations caritatives. Chris Browne
  <mailto:cbbrowne@hex.het> a creus cette voie plus que personne, et il
  contribue  ce qui suit.


  44..33..44..11..  CChhrriiss BBrroowwnnee :: llaa pphhiillaanntthhrrooppiiee dduu llooggiicciieell ggrraattuuiitt

  Une tape supplmentaire peut tre d'encourager financirement le
  soutien d'organisations lies  Linux. Avec les plusieurs millions
  <http://counter.li.org> d'usagers de Linux, il pourrait tre trs
  plausible pour des usagers reconnaissants de contribuer
  individuellement un peu. Etant donn les millions d'usagers, et la
  somme d'une centaine de dollars de ``reconnaissance'' par usager de
  Linux (100$ tant plus ou moins la somme _n_o_n dpense cette anne pour
  mettre  jour un OS Microsoft), cela pourrait ajouter des _c_e_n_t_a_i_n_e_s _d_e
  _m_i_l_l_i_o_n_s de dollars pour le dveloppement d'outils et d'applications
  amliors pour Linux.


  Un groupe d'usagers peut encourager ses membres  contribuer  divers
  ``projets de dveloppement''. Si il obtient un quelconque ``crdit
  fiscal pour donation'', cela peut encourager les membres  contribuer
  directement au groupe, en obtenant des dductions de taxes comme de
  juste, avec les contributions allant  d'autres organisations.


  Il est appropri, dans tous les cas, d'encourager les membres du GUL 
  contribuer directement aux organisations avec des projets et des buts
  qu'ils dsireraient soutenir individuellement.


  Cette section liste les candidats possibles. Aucun n'est explicitement
  recommand ici, mais la liste peut reprsenter une ``matire 
  penser'' intressante. Beaucoup sont enregistrs comme tant d'utilit
  publique aux Etats-Unis, et sont donc dductibles des taxes
  amricaines.


  Ici se trouvent les organisations dont les activits sont
  particulirement diriges vers le dveloppement de logiciels
  fonctionnant avec Linux:


    Linux International Project Sponsorship Fund
     <http://www.li.org/About/Fund/Welcome.html>

    Debian/Software In the Public Interest
     <http://www.debian.org/donations.html>

    Free Software Foundation <http://www.fsf.org/help/donate.html>

    Projet XFree86 <http://www.xfree86.org/donations.html>


  Les contributions  ces organisations ont un effet direct sur le
  support de cration de logiciels redistribuables gratuitement et
  utilisables sous Linux. Dollar pour dollar, de telles contributions
  ont certainement un effet plus grand sur la communaut Linux en d'un
  point de vue global que n'importe quelle autre dpense.


  Il y a aussi des organisations qui sont moins directement associes
  avec Linux qui peuvent nanmoins tre utiles, comme:


    League for Programming Freedom <http://www.lpf.org>


     Ce n'est pas une organisation spcifique  Linux ; ils sont
     impliqus dans des activits de promotion gnrale qui touchent les
     personnes impliques dans le dveloppement des logiciels.
     L'implication dans cette organisation reprsente quelque chose de
     proche  l'implication dans un groupe de ``lobbie politique''.


     Il y a quelque chose comme un ``biais USA''; il y a cependant des
     implications internationales, et la communaut internationale suit
     aussi souvent l'Amrique en informatique que vice-versa.


    Le Projet des fonds pour LaTeX3


     Le TeX Users Group (TUG) <http://www.tug.org> travaille sur la
     version ``gnration suivante'' du systme de publication LaTeX,
     connu sous le nom de LaTeX3. Linux est l'une des plateformes sur
     lesquelles TeX et LaTeX sont le mieux supports.

     Les donations pour le projet peuvent tre envoyes :


       TeX Users Group
       P.O. Box 1239
       Three Rivers, CA 93271-1239
       USA




  ou, pour ceux en Europe,


       UK TUG
       1 Eymore Close
       Selly Oaks
       Burmingham B29 4LB
       UK





    Projet Gutenberg <http://www.promo.net/pg/lists/list.html>


     Leur propos est de rendre gratuitement disponible sous forme
     lectronique les textes de livres libres de droits. Ce n'est pas
     directement une ``chose Linux'', mais a semble valoir le coup, et
     ils encouragent activement une indpendance vis--vis de la
     plateforme, ce qui rend leurs ``produits'' utilisables avec Linux.



  44..33..55..  LLee MMoouuvveemmeenntt LLiinnuuxx

  Je me suis rfr tout au long de ce HOWTO  quelque chose que
  j'appelle le MMoouuvveemmeenntt LLiinnuuxx. Il n'y a rellement pas de meilleur
  moyen pour dcrire le phnomne international Linux que de l'appeller
  un mouvement : ce n'est pas une bureaucratie, mais c'est organis ; ce
  n'est pas une entreprise, mais c'est important pour les entreprises
  tout autour du monde.  Le meilleur moyen pour un GUL local de
  supporter le mouvement Linux international est de travailler pour
  s'assurer que la communaut Linux locale est robuste, vibrante, et
  croissante. Linux est _d__v_e_l_o_p_p_ internationallement, ce qui est assez
  facile  voir en lisant /usr/src/linux/MAINTAINERS. Mais Linux est
  aussi _u_t_i_l_i_s_ internationalement. Et cette base d'usagers toujours
  croissante est la cl du succs continu de Linux. Et c'est l o le
  GUL local joue un rle incalculable.

  La puissance du Mouvement Linux international repose sur le simple
  fait que Linux offre une puissance informatique et une sophistication
  sans prcdent pour son cot et sa libert. Les cls sont valeur et
  indpendance de tout contrle propritaire. A chaque fois qu'une
  nouvelle personne, groupe, entreprise ou organisation a l'opportunit
  d'tre expos  la valeur intrinsque de Linux, le Mouvement Linux
  gagne en puissance et en nombre. Les GULs locaux peuvent rendre cela
  possible.


  44..44..  CCoonnvviivviiaalliitt LLiinnuuxx

  Le dernier but d'un GUL local que je mentionnerais ici est la
  convivialit.  C'est le but le plus difficile  discuter car il n'est
  pas vident de dire combien ou jusqu' quel point un GUL s'y implique.
  Alors qu'il serait trange d'avoir un GUL qui ne s'impliquerait pas
  dans les autres buts, il pourrait trs bien y avoir des GULs locaux
  quelque part dans le monde pour lesquelles la convivialit n'est pas
  une considration importante.

  Il semble, toutefois, que ds que deux ou trois usagers de Linux se
  retrouvent, la rigolade, et souvent, la bire seront au rendez-vous.
  Linus Torvalds a toujours eu un but persistant pour Linux : plus de
  plaisir.  Pour les programmeurs, les dveloppeurs du noyau, et les
  usagers de Linux, il n'y a rien de tel que de charger un nouveau
  noyau, d'en recompiler un ancien, de bidouiller un gestionnaire de
  fentre ou du code. C'est le plaisir profond de Linux qui maintient en
  place de nombreux GULs, et c'est la sorte de plaisir amne beaucoup de
  GULs  la convivialit.

  Par la ``convivialit'', j'entends ici d'abord le partage
  d'expriences, l'amiti, et de l'admiration et le respect mutuels. Il
  y a une autre signification, toutefois,  ce que les sociologues
  appellent la _c_o_n_v_i_v_i_a_l_i_t_. Dans tout mouvement, institution, ou
  communaut humaine, il y a besoin de processus ou de suite
  d'vnements par lesquels et grce auxquels, pour le mettre en termes
  Linuxiens, les nouveaux venus deviennent des experts. En d'autres
  termes, la convivialit vous transforme de ``l'un d'entre eux'' vers
  ``l'un d'entre nous''.

  Pour les forces armes des Etats-Unis et dans la plupart des pays, ce
  processus est appell camp d'entranement ou entranement de base.
  C'est le processus par lequel des civils sont transforms en soldats.
  Le Mouvement Linux a des besoins analogues. Il est important que les
  nouveaux usagers de Linux viennent  apprendre ce que signifie tre un
  usager de Linux, ce que l'on attend d'eux en tant que membre d'une
  communaut internationale, le vocabulaire spcifique du mouvement
  Linux, ses demandes et ses opportunits uniques. Ceci peut tre aussi
  simple que la manire dont les usagers de Linux d'une certaine rgion
  prononcent le mot ``Linux''. Ce peut tre aussi profond que les
  manires par lesquelles les usagers de Linux doivent promouvoir, et
  les manires par lesquelles ils doivent, ce qui est plus important,
  _r__g_u_l_e_r la promotion de Linux.

  La convivialit Linux, au contraire de la convivialit dans le ``monde
  rel'', peut apparatre sur des listes de discussions et sur Usenet,
  alors que l'efficacit du dernier est constamment remise en question
  prcisment par les usagers peu conviviaux. De mon point de vue, la
  convivialit donne et reue sont toutes deux rendus meilleures en
  compagnie d'tres humains rels, en chair et en os, et non par des
  voix dsincarns sur une liste de discussion ou un groupe Usenet.



  55..  AAccttiivviittss llooccaalleess dd''uunn GGUULL

  Dans la section prcdente je me suis attach exclusivement  ce que
  font les GULs et ce qu'ils devraient faire. Dans cette section je
  m'intresserais principalement aux stratgies pratiques pour accomplir
  ces buts.

  Il y a, en dpit d'avatars sans fin, deux piliers de l'acitivit des
  GULs : tout d'abord, ils se rencontrent dans l'espace physique;
  ensuite, ils communiquent dans le cyberspace. Tout ou presque tout de
  ce que font les GULs peut tre remarqu en termes de rencontres et de
  ressources en ligne.


  55..11..  LLeess rreennccoonnttrreess

  Comme je l'ai dit ci-dessus, les rencontres physiques sont synonymes
  des GULs et de la plupart des groupes d'usagers d'ordinateurs. Voil
  les sortes de rencontres des GULs :


    sociales

    prsentations techniques

    groupes informels de discussions

    commerce des groupes d'usagers

    installation de Linux

    configuration et chasse aux bugs

  Que font les GULs  ces rencontres ?


    Installation de Linux pour les nouveaux et les trangers

    Information des membres au sujet de Linux

    Comparaison de Linux avec les autres systmes d'exploitation

    Information des membres au sujet des logiciels qui tournent sous
     Linux

    Discussion des moyens par lesquels Linux peut tre recommand

    Discussion de l'importance du Mouvement des Logiciels Gratuits

    Discussion des affaires du groupe d'usagers

    Manger, boire, et prendre son pied


  55..22..  RReessssoouurrcceess eenn lliiggnnee

  L'essor commercial de l'Internet a grossirement coincid avec l'essor
  de Linux, et ce dernier doit en large partie quelque chose au premier.
  L'Internet a toujours t un atout important pour le dveloppement de
  Linux. Il n'en est pas autrement pour les GULs. La plupart des GULs
  ont des pages web si ce n'est des sites webs complets. En fait, je ne
  suis pas sr de savoir comment trouver un GUL local si ce n'est en
  cherchant sur le Web.

  Il est pertinent, alors, pour un GUL local d'utiliser toute
  technologie Internet qu'il estime approprie: sites Web, listes de
  diffusion, gopher, FTP, courrier lectronique, WAIS, finger, news,
  etc.  Comme le monde du commerce le dcouvre actuellement, l'Internet
  peut tre un moyen efficace pour faire de la publicit, pour informer,
  duquer, ou mme pour vendre. L'autre raison pour l'utilisation
  extensive des technologies Internet par les GULs est que l'essence
  mme de Linux est de _f_o_u_r_n_i_r une plateforme stable et riche pour le
  dploiement de ces technologies. Ainsi non seulement les GULs les GULs
  bnficient de, disons, l'tablissement d'un site Web car il avertit
  de son existence et aide  organiser ses membres, mais en dployant
  ces technologies, les membres du GUL fournissent une opportunit
  d'apprendre ces technologies et de voir Linux  l'oeuvre.

  Quelques GULs qui utilisent efficacement l'Internet:


    Atlanta Linux Enthusiasts <http://www.ale.org/>

    North Texas Linux Users Group <http://www.ntlug.org/>

    Boston Linux and Unix <http://www.blu.org/>

    Colorado Linux Users and Enthusiasts
     <http://spot.elfwerks.com/~clue/>

    BLUG - BHZ Linux Users Group (Brazil)
     <http://www.bhz.ampr.org/~linux/>

    Ottawa Carleton Linux Users Group <http://www.oclug.on.ca/>

    Provence Linux Users Group <http://www.pipo.com/plug/>

    Duesseldorf Linux Users Group <http://www.hsp.de/~dlug/>

    Linux User Group Austria <http://www.luga.or.at/>

    Israeli Linux Users Group <http://www.linux.org.il/>

    Tokyo Linux Users Group <http://www.twics.co.jp/~tlug/>

    Linux in Mexico <http://www.linux.org.mx/>

    Netherlands Linux Users Group (NLLGG) <http://www.nllgg.nl/>

    St. Petersburg Linux User Group
     <http://ethereal.ru/~mbravo/spblug/index.html>

    Linux User Group of Singapore <http://www.lugs.org.sg/>

    Victoria Linux User Group <http://www.linux.victoria.bc.ca/>

    Essex Linux User Group <http://www.epos.demon.co.uk/>

    Turkish Linux User Group <http://www.linux.org.tr/>

    Linux User Group of Rochester <http://www.lugor.org/>

    Korean Linux Users Group <http://www.linux-kr.org>


  Veuillez me faire savoir si votre GUL utilise l'Internet en tant que
  moyen important ou intressant; j'aimerais inclure votre groupe dans
  cette liste.




  66..  SSuuggggeessttiioonnss PPrraattiiqquueess

  Enfin, je dsire faire quelques trs pratiques, voire mondaines,
  suggestions pour tous ceux qui dsirent fonder, faire fonctionner, ou
  faire grandir un GUL.


  66..11..  OOrrggaanniissaattiioonnss ddee ssoouuttiieenn ddeess GGUULLss


  Il y a plusieurs organismes qui offrent une assistance aux GULs
  locaux.


     GGLLUUEE
        le ``Groups of Linux Users Everywhere'' est un programme de
        coordination et de soutien aux groupes d'usagers fond par le
        SSC, les mmes personnes qui publient le _L_i_n_u_x _J_o_u_r_n_a_l.  Le
        programme GLUE <http://www.ssc.com/glue/> est un moyen bon
        march pour un GUL local de fournir quelques bnfices  ses
        membres.


     LLiinnuuxx SSyysstteemmss LLaabbss
        LSL <http://www.lsl.com/> offrent leurs ensembles Tri-Linux
        (trois distributions Linux sur quatre CDs: Red Hat, Slackware,
        et Debian) aux GULs pour la revente avec un fort rabais.


     LLiinnuuxx MMaallll UUsseerr GGrroouupp PPrrooggrraamm
        Soutenu par WorkGroup Solutions, le Linux Mall User Group
        Program <http://www.LinuxMall.com/usergrp.program.html> offre
        une gamme d'avantages pour les Groupes d'Usagers participants.
        Les GULs sont galement libre de participer au Linux Mall's
        Referral Program <http://www.LinuxMall.com/mallrfr.html>.


     CClleevveellaanndd LLiinnuuxx UUsseerr''ss GGrroouupp
        Possde un domaine Internet, lug.net. Ils fourniront  votre GUL
        un nom de domaine sur lug.net: le-nom-de-votre-GUL-ou-
        ville.lug.net. Plus d'informations peuvent tre trouves sur
        LUG.NET <http://www.lug.net/> ou en crivant  Jeff Garvas.


     RReedd HHaatt SSooffttwwaarree''ss UUsseerr GGrroouupp PPrrooggrraamm
        Aident les GULs  se dvelopper et  grandir. Plus
        d'informations peuvent tre trouves sur le Red Hat Web site
        <http://www.redhat.com/redhat/rhug.html>.



  66..22..  FFoonnddeerr uunn GGUULL



    Dterminez le GUL le plus proche dj existant

    Annoncez vos intentions sur comp.os.linux.announce et sur la
     hirarchie rgionale approprie

    Annoncez votre intention o que se trouvent les usagers
     d'ordinateurs dans votre rgion: librairies, rencontres diverses,
     cybercafs, grandes coles et universits, entreprises,
     fournisseurs d'accs Internet, etc.


    Trouvez des entreprises ou des institutions amicales  Linux dans
     votre rgion qui pourraient peut-tre vous aider  constituer votre
     GUL

    Crez une liste de diffusion ou un moyen quelconque de
     communication entre les personnes qui expriment un intrt  former
     un GUL

    Demandez spcifiquement aux personnes cls une aide  la diffusion
     de votre intention de crer un GUL

    Sollicitez de la place sur un serveur Web pour mettre quelques
     pages HTML sur le groupe

    Commencez  chercher un endroit pour vos rencontres

    Prvoyez une rencontre initiale

    Discutez  cette runion pralable des buts du GUL


  66..33..  FFaaiirree ffoonnccttiioonnnneerr eett ddvveellooppppeerr uunn GGUULL



    Mettre les barrires de souscription au GUL le plus bas possible

    Faire du site Web du GUL une priorit: maintenir toutes les
     informations  jour, rendre facile  trouver les dtails sur les
     rencontres (qui, quoi, et o), et faire passer avant tout le
     contact et les mcanismes de rponse

    Installer Linux  qui le dsire

    Envoyer des notes, des messages, ou des publicits o que soient
     les usagers d'ordinateurs dans votre rgion

    Assurer une direction ddie

    Suivre le modle de _d_i_c_t_a_t_e_u_r _b__n__v_o_l_e appliqu par Linus pour la
     direction du groupe

    Portez les grandes dcisions devant les membres pour un vote

    Crer une liste de diffusion ddie au support technique, et
     demander aux 'gourous' d'y participer

    Programmer une mixture de prsentations avances et basiques,
     formelles et informelles

    Soutenir les efforts pour le dveloppement de logiciels par vos
     membres

    Trouver un moyen pour avoir de l'argent sans cotisations: par
     exemple, en vendant des marchandises Linux  vos membres et 
     d'autres personnes

    Envisagez d'accomplir les formalits lgales de dclaration du
     groupe (en France, association loi de 1901,  la Prfecture).

    Dterminer si votre lieu de rencontre risque de restreindre la
     croissance du GUL

    Prvoyez vos rencontres en conjonction avec les grands meetings,
     les expositions informatiques, ou tout autre vnement
     communautaire o des usagers d'ordinateurs -- c..d, des convertis
     potentiels  Linux -- pourraient probablement se trouver

    Elire la direction formelle du GUL le plus tt possible : quelques
     postes utiles pourraient tre Prsident, Trsorier, Secrtaire,
     Porte Parole (annonces gnrales, introductions de discours,
     remarques d'introduction et de clture, etc.), Coordinateur
     Publicitaire (qui s'occupe des envois par Usenet et courrier
     lectronique, et de la publicit locale), et Coordinateur du
     Programme (organise et prvoit les interlocuteurs aux rencontres du
     GUL)

    Donnez les moyens aux membres et aux autres de donner une
     information en retour sur la direction, les buts et les stratgies
     du GUL

    Aidez Linux et le dveloppement de Logiciels Gratuits en donnant un
     espace Web, une liste de diffusion, ou un site FTP

    Crez un site FTP pour les logiciels appropris

    Archivez tout ce que fait le GUL pour le site Web

    Sollicitez des ``cadeaux de bienvenue'' de la part des vendeurs
     Linux, compagnies, etc.  distribuer lors des rencontres

    Citez les sources quand il le faut

    Joignez la liste GLUE (Groups of Linux Users Everywhere) du SSC
     mais attention, ils demandent des frais d'inscription

    Soumettez les informations relatives  votre GUL  toutes les
     Listes de GULs

    Fates de la publicit pour vos rencontres dans les groupes Usenet
     appropris, dans les publications informatiques et les journaux
     locaux

    Composez des matriaux promotionnels, comme des fichiers
     Postscript, par exemple, afin que les membres puissent aider 
     faire connatre le GUL dans les librairies, les magasins
     d'informatiques, les lieux de travail, etc.

    Vrifiez que vous savez ce que les membres du GUL attendent des
     actions du GUL

    Prsentez des notices de presses aux mdias locaux au sujet de tout
     vnement du GUL inhabituel comme une Fte de l'Installation, le
     Net Day, etc.

    Utilisez les ressources et les membres du GUL pour aider les
     organisations  but non lucratif et les coles pour leurs besoins
     en informatique

    Recommandez largement mais de faon responsable l'utilisation de
     Linux

    Profitez au maximum des connaissances particulires des membres du
     GUL

    Maintenez de bonnes relations avec les vendeurs Linux, les
     compagnies, dveloppeurs, etc.

    Identifiez et contactez les consultants Linux de votre rgion

    Reliez vous aux dirigeants d'autres GULs dans votre rgion,
     dpartement, ou pays pour partager vos expriences, astuces, et
     ressources

    Maintenez les membres du GUL avertis de l'tat des logiciels Linux
     -- nouveaux noyaux, bugs, corrections, avertissements de scurit
     -- et de l'tat du monde Linux global -- nouveaux ports, problme
     de licences et de marques, l'endroit o Linus vit et travaille,
     etc.

    Avertissez le Linux Documentation Project (LDP) -- et toute autre
     source pertinente d'informations Linux -- sur la documentation que
     le GUL produit: prsentations techniques, cours, HOWTOs locaux,
     etc.


  77..  IImmpplliiccaattiioonnss llggaalleess eett ppoolliittiiqquueess


  77..11..  IImmpplliiccaattiioonnss LLggaalleess


  77..11..11..  AAuuxx EEttaattss--UUnniiss

  C'est une affaire complique que d'organiser lgalement un GUL local.
  Je n'en parlerais donc pas ici. Cependant, si vous tes intress par
  l'organisation lgale de votre GUL local, cette section vous
  prsentera quelques-unes des dmarches ncessaires.

  NNoottee:: cette section ne doit pas tre utilis en tant que conseil lgal
  comptent.  Ces dmarches ncessitent l'expertise d'un conseiller
  lgal comptent; vous devez, avant d'agir sur l'un des constats faits
  dans cette section, consulter un avocat.

  Il y a au moins deux status lgaux diffrents qu'un GUL local aux
  Etats-Unis peut obtenir:


  1. constitution en tant qu'organisation  but non lucratif

  2. exemption des taxes

  Mme si ces status diffrent d'un tat  l'autre, la plupart des tats
  permettent aux groupes d'usagers d'tre reconnus en tant
  qu'organisations  but non lucratif. Les bnfices de cette
  constitution pour un GUL local peuvent inclure des limitations de la
  responsabilit des membres et des volontaires du GUL, ainsi que des
  limitations ou mme l'exemption des taxes de franchise sur les
  entreprises, prleves par chaque tat.

  Alors que vous devrez consulter un conseiller lgal comptent avant de
  constituer votre GUL en tant qu'organisation  but non lucratif, vous
  pouvez probablement rduire vos frais lgaux si vous tes familiers
  avec les dmarches ncessaires avant de consulter un avocat. Je
  recommande la lecture du _N_o_n_-_L_a_w_y_e_r_s _N_o_n_-_P_r_o_f_i_t _C_o_r_p_o_r_a_t_i_o_n _K_i_t (ISBN
  0-937434-35-3).

  Quant au second status, l'exemption de taxes, il s'agit moins d'un
  status lgal que d'un jugement par l'Internal Revenue Service (NdT: le
  fisc amricain). Il est important pour vous de savoir que la
  constitution en tant qu'organisation  but non lucratif nnee vvoouuss aassssuurree
  ppaass que l'IRS dcidera que votre GUL sera exempt de taxes. Il est
  possible d'avoir une association  but non lucratif qui nnee ssooiitt ppaass
  exempte de taxes.

  L'IRS dispose d'un document relativement simple qui explique les
  critres et le processus d'exemption de taxes. Il s'agit de la
  PPuubblliiccaattiioonn 555577:: _T_a_x_-_E_x_e_m_p_t _S_t_a_t_u_s _f_o_r _Y_o_u_r _O_r_g_a_n_i_z_a_t_i_o_n. Il est
  disponible sous forme d'un fichier Adobe Acrobat sur le site web de
  l'IRS. Je recommande fortement la lecture de ce document aavvaanntt de
  remplir la demande de constitution en tant qu'organisation  but non
  lucratif. Alors que devenir une association  but non lucratif ne vous
  assure pas que votre GUL sera dclar exempt de taxes par l'IRS, il y
  a des moyens de constitution qui eemmppcchheerroonntt l'IRS de dclarer votre
  GUL exempt de taxes. Le _T_a_x_-_E_x_e_m_p_t _S_t_a_t_u_s _f_o_r _Y_o_u_r _O_r_g_a_n_i_z_a_t_i_o_n
  dfinit clairement les conditions ncessaires pour que votre GUL soit
  dclar exempt de taxes.

  Finalement, il y a des ressources disponibles sur l'Internet pour les
  organisations  but non lucratif et les exemptions de taxes. Une
  partie de ce matriel sera probablement adapt  votre GUL local.


  77..11..22..  AAuu CCaannaaddaa

  Merci  Chris Browne pour les commentaires suivants  propos de la
  situation au Canada.


  L'environnement fiscal canadien ressemble beaucoup  l'environnement
  amricain, dans le sens o le status d'``organisation charitable''
  confre des avantages fiscaux similaires aux donateurs proches de ceux
  obtenus par le status "sans but lucratif", alors qu'ils ncessitent de
  remplir le mme type de formulaires, afin que les autorits fiscales
  donnent et maintiennent le status certifi d'organisation charitable.


  77..22..  IImmpplliiccaattiioonnss PPoolliittiiqquueess

  Chris Browne <mailto:cbbrowne@hex.net> a  dire ce qui suit  propos
  des diffrentes sortes de dynamiques politiques inter-GUL qui voient
  souvent le jour.


  77..22..11..  LLeess ggeennss oonntt ddeess ooppiinniioonnss ddiiffffrreenntteess  pprrooppooss ddeess llooggiicciieellss
  ggrraattuuiittss..

  Les usagers de Linux sont trs diversifis. Ds que vous tentez d'en
  mettre beaucoup ensemble, il y a _q_u_e_l_q_u_e_s problmes qui peuvent
  apparatre. Il y a ceux qui sont proches de la radicalit politiques
  et qui croient que tout les logiciels devraient toujours tre
  ``gratuits''.  Parce que Caldera demande un peu trop d'argent pour
  leur distribution, et ne donnent pas tout leurs profits  _(_c_h_o_i_s_i_s_s_e_z
  _u_n_e _o_r_g_a_n_i_s_a_t_i_o_n _f_a_v_o_r_i_t_e_), ils doivent tre ``diaboliques''. Idem
  pour Red Hat ou S.u.S.E. Gardez en tte que ces trois compagnies ont
  fait et continuent  faire des contributions significatives aux
  logiciels gratuits.


  D'autres peuvent se dire qu'ils peuvent trouver un moyen quelconque
  pour exploiter la ``gratuit'' de la plateforme Linux pour leur
  bnfice et profit. Sachez que beaucoup d'usagers des variantes BSD
  UNIX considrent que _l_e_u_r_s licences qui _p_e_r_m_e_t_t_e_n_t aux entreprises de
  construire des versions personnelles ``prives'' de leurs OS sont
  prfrables  l'``enforced permanent freeness'' de la GPL telle
  qu'applique  Linux. Ne prsumez pas que toutes les personnes mettant
  en avant ce point de vue sont forcments des sangsues cupides.


  Si ces personnes sont mises ensemble quelque part, des dsaccords
  peuvent survenir.



  Les dirigeants doivent tre clairs sur les faits suivants:


    Il y a beaucoup d'opinions sur la GPL et sur la manire dont elle
     est suppose fonctionner. Il est facile de mal comprendre  la fois
     la GPL et les diffrentes licences alternatives.

    Linux bnficie de contributions de beaucoup d'endroits, et peut
     supporter quelques pique-assiettes, particulirement si cel
     encourage plus de personnes s'impliquer, permettant ainsi d'avoir
     encore plus de contributeurs.

    Plusieurs contributions significatives ont t faites  Linux par
     des entreprises commerciales. L'examen des sources du noyau Linux,
     et plus notablement de sous-systmes comme XFree86 et GCC, montre
     un nombre surprenant de contributeurs commerciaux.

    Commercial n'implique pas toujours ``mieux'', mais il n'implique
     pas non plus toujours ``pire''.


  Le principe essentiel peut tre tendu bien au-del ; les ``guerres de
  religions'' informatiques ont longtemps exist sur les vertus d'un
  systme par rapport  un autre, que ce soit (de nos jours) entre
  Linux, les autres variantes UNIX, et les OS Microsoft, ou entre les
  ``IBM PC'' et les divers systmes bass sur le Motorola 68000, ou
  entre les nombreux systmes 8 bits des annes 1970. Ou de KDE contre
  GNOME.


  Un dirigeant de GUL prudent veillera  aplanir les choses, plutt qu'
  les dvelopper. Les dirigeants de GUL _d_o_i_v_e_n_t avoir la peau dure.


  Il y _a_u_r_a des dsaccords tt ou tard lorsque 2 points de vues
  diffrents se croiseront, et les dirigeants devront tre capables de
  faire avec, en rsolvant les dsaccords au lieu d'en rajouter.


  77..22..22..  ttrrss ttrrss bbiieenn..  LLeess oorrggaanniissaattiioonnss ssaannss bbuutt lluuccrraattiiff eett
  ll''aarrggeenntt nnee ssee mmllaannggeenntt ppaass

  Il est important de faire trs attention en utilisant les finances
  d'une organisation sans but lucratif de quelque sorte qu'elle soit.
  Sur le march, o les profits sont le but immdiat, les gens ne
  s'inquitent pas beaucoup des 'dtails agaants' comme les
  dplacements possibles de sommes d'argents inexistantes.


  On ne peut pas en dire autant dans des organisations sans but
  lucratif.  Plusieurs personnes sont impliques pour des raisons de
  principe, et peuvent aisment donner une attention non ordinaire  des
  problmes mineurs. Et la possibilit d'une large participation  des
  rencontres d'affaire augmente la susceptibilit d'une attention non
  ordinaire au droulement des choses.


  Par consquent, il est probablement prfrable pour cela de  _n_e _p_a_s
  demander de droit d'entre pour le GUL, car cela procure une chose
  pour laquelle on peut raisonnablement demander des comptes. Les
  cotisations qui ne sont pas collectes ne peuvent pas, par le fait
  mme qu'ils n'existent pas, tre mal utilises.


  S'il y _a beaucoup d'argent et/ou d'autres ressources du mme genre par
  ci par l, il est important pour le groupe d'usager d'tre responsable
  de ces ressources pour ses membres.


  Dans un groupe vivant, en pleine croissance, il doit y avoir plus
  d'une personne implique. Dans les organisations sans but lucratif
  troubles, les informations financires sont souvent dtenues par
  quelqu'un qui ne cdera pas de bon gr le contrle des fonds.
  Idalement, il doit y avoir _u_n _p_e_u de rotation des charges dans un
  GUL, y compris celle du contrle des finances.


  Des rapports financiers rguliers devront tre disponibles pour tout
  ceux qui les dsireront. Un GUL qui maintient un 'status charitable'
  officiel pour les problmes de taxes devra prsenter au moins un
  rapport financier annuel aux autorits financires locales, ce qui
  reprsente un minimum de connaissances financires  la charge des
  membres.


  Avec la croissance des logiciels financiers sous Linux, il devrait
  tre possible de crer des rapports de faon rgulire. Avec la
  croissance de l'Internet, il devrait mme tre possible de publier ces
  rsultats sur le World Wide Web.


  88..  AA pprrooppooss ddee ccee ddooccuummeenntt

  88..11..  CCoonnddiittiioonnss dd''UUttiilliissaattiioonn

  Copyright (c) 1997 par Kendall Grant Clark. Ce document peut tre
  distribu sous les termes de la licence du LDP, sur
  http://sunsite.unc.edu/LDP/COPYRIGHT.html
  <http://sunsite.unc.edu/LDP/COPYRIGHT.html>.


  88..22..  NNddTT:: DDnnggaattiioonn

  Vous utilisez les informations contenues dans ce document  vos
  propres risques. Nous dclinons toute responsabilit quant  son
  contenu.  L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entirement  vos propres risques.

  Tous les droits sont dtenus par leurs propritaires respectifs, sauf
  mention contraire explicite. L'utilisation d'un terme dans ce document
  ne constitue pas une limitation  sa validit en tant que marque.

  Le fait de citer un produit ou une marque particulire ne constitue
  pas un endossement.

  Il est fortement conseill d'effectuer une sauvegarde de votre systme
  avant une installation importante ainsi qu' intervalles rguliers.


  88..33..  NNoouuvveelllleess vveerrssiioonnss

  Les nouvelles versions du Linux User Group HOWTO seront priodiquement
  postes sur divers sites WWW et FTP Linux, principalement sur la page
  principale de Kendall <http://www.ntlug.org/~kclark/> et sur le Linux
  Documentation Project <http://sunsite.unc.edu/LDP/>.


  Les nouvelles versions franaises se trouveront sur le web 
  http://www.freenix.org/unix/linux/HOWTO/User-Group-HOWTO.html
  <http://www.freenix.org/unix/linux/HOWTO/User-Group-HOWTO.html> et en
  ftp sur ftp://ftp.traduc.org/pub/HOWTO/FR/User-Group-HOWTO.gz
  <ftp://ftp.traduc.org/pub/HOWTO/FR/User-Group-HOWTO.gz>.
  88..44..  VVeeuuiilllleezz ccoonnttrriibbuueerr  ccee HHOOWWTTOO

  Je suis ouvert aux questions et envois sur ce document. Veuillez les
  envoyer  kclark@cmpu.net. _J_e _s_u_i_s _s_p__c_i_a_l_e_m_e_n_t _i_n_t__r_e_s_s_ _p_a_r _l_e_s
  _d_i_r_i_g_e_a_n_t_s _d_e_s _G_U_L_s _a_u_t_o_u_r _d_u _m_o_n_d_e.  J'aimerais inclure des exemples
  tirs de la ralit des choses dcrites ici.  J'aimerais galement
  ajouter une section sur les GULs en dehors des Etats-Unis, puisque ce
  HOWTO tel qu'il est maintenant est plutt centr sur les US. Veuillez
  me faire savoir si votre groupe fait des choses qui devraient tre
  mentionnes dans ce HOWTO.


  88..55..  HHiissttoorriiqquuee dduu ddooccuummeenntt


    1.0: sorti le 13 Juillet 1997

    1.1: expansion de la section sur les ressources en ligne

    1.3: ajout des Organisations de support des GULs et expansion des
     sections sur les issues lgales et organisationnelles

    1.3.1: dition gnrale pour la clart et la concision

    1.4: dition gnrale, ajout de nouvelles ressources GULs

    1.4.1: dition gnrale pour la clart

    1.5: ajout de quelques ressources, quelques discussions sur la
     documentation du GUL, et dition gnrale

    1.5.1: changement de la location Web de ce document et de l'adresse
     lectronique de l'auteur

    1.5.2: nouvelle license et nouveau copyright

    1.5.3: ditions diverses et rorganisations mineures

    1.6: ajout du matriel de Chris Browne: donations philantropiques
     pour Linux et considrations politiques du GUL

    1.6.1: additions trs mineures

    1.6.2: corrections mineures


  88..66..  RReemmeerrcciieemmeennttss

  Je voudrais remercier toutes les personnes excellentes que j'ai
  rencontr et avec qui j'ai travaill lorsque j'tais Prsident du
  Groupe d'Usagers Linux du Texas du Nord. Ils m'ont aid  m'inspirer 
  utiliser Linux  plein temps. Les meilleures choses  propos de Linux
  sont vraiment les gens que vous rencontrez.

  Je voudrais remercier spcialement Chris Browne
  <mailto:cbbrowne@hex.net> pour la description de la situation avec les
  organisations sans but lucratif et les groupes charitables au Canada,
  ses ides sur les donations financires en tant que moyen de
  participer  Linux et au mouvement des logiciels gratuits, et sur les
  diffrentes sortes de politiques qui peuvent grandir dans les GULs.

  De plus, les personnes suivantes ont fait des commentaires et des
  suggestions trs utiles:



    Hugo van der Kooij

    Greg Hankins

    Charles Lindahl

    Rick Moen

    Jeff Garvas

    James Hertzler























































  VAR HOWTO pour Linux
  Mr. Poet, <poet@linuxports.com> <mailto:poet@linuxports.com>
  - traduit par Jean-Christophe Fargette, jcfarget@club-inter
  net.fr <mailto:jcfarget@club-internet.fr>
  v2.84, 7 mars 1999

  Ce document contient une liste de noms de compagnies qui ne fabriquent
  pas de matriel ou de logiciel, mais compltent les produits exis
  tants. Ce Howto est maintenu par M. Poet <poet@linuxports.com>
  ______________________________________________________________________

  Table des matires






















































  1.  propos de ce document

  2. Information sur le Copyright

  3. Afrique du Sud

     3.1 Symphony Research (Pty) Ltd

  4. Allemagne

     4.1 bee Baastrup EDV-Entwicklung GmbH
     4.2 dcp, design+commercial partner GmbH
     4.3 GISMA EDV System & Service GmbH
     4.4 innominate Multifunktionale Serverlsungen und
     4.5 LINUXHAUS
     4.6 net Estate
     4.7 PRONETICS

  5. Argentine

     5.1 IWCC Argentina

  6. Australie

     6.1 IPAX Systems

  7. Autriche

     7.1 DEAS EDV-Lsungen G.m.b.H.
     7.2 Quant X EDV-Ges.m.b.H.

  8. Belgique

     8.1 ABV Computer sa/nv.
     8.2 BeFree SA.NV Belgium
     8.3 Better Access N.V.

  9. Brsil

     9.1 Dextra Solues em Informtica

  10. Canada

     10.1 Centurion Services
     10.2 dotcom Marketing Corporation
     10.3 Hard Data Ltd.
     10.4 Kwan's Research Laboratory
     10.5 Sound Software Ltd.

  11. tats-Unis

     11.1 ApeX Systems Integration Corp.
     11.2 ASL Workstations, Inc.
     11.3 Apache Digital Corporation
     11.4 BrainStorm Technologies
     11.5 The Computer Underground, Inc.
     11.6 DCG Computers Inc.
     11.7 Enterprise Computer Consulting
     11.8 International Technology Sales
     11.9 LAND-5 Corporation
     11.10 Linux Hardware Solutions, Inc.
     11.11 MicroUnix Systems
     11.12 Microway
     11.13 Net Express
     11.14 Pacific Internet
     11.15 Psytronics
     11.16 Sunset Systems
     11.17 SW Technology
     11.18 Telenet System Solutions, Inc.
     11.19 VA Research

  12. Finlande

     12.1 SOT - Oy Suomen Ohjelmistoty Ab

  13. France

     13.1 Alcve

  14. Hong Kong

     14.1 Genesis Systems Int'l Ltd.

  15. Pays-Bas

     15.1 Stone IT Services BV

  16. Pologne

     16.1 Emit Sp.z o.o.
     16.2 Polskie Sieci Teleinformatyczne S.A.

  17. Royaume-Uni

     17.1 Annex Technology Europe Ltd
     17.2 Definite Linux Systems
     17.3 Nene Information Systems
     17.4 D. Grant Crawley Limited


  ______________________________________________________________________

  11..   pprrooppooss ddee ccee ddooccuummeenntt


  Ceci est le Var Howto pour Linux. Ce Howto contient une liste de
  compagnies qui ne fabriquent pas de matriel ou de logiciel, mais
  compltent les produits existants. Ce complment peut prendre
  plusieurs formes comme l'installation de Linux sur un ordinateur, la
  configuration, ou la personnalisation des applications. Pour l'instant
  ce Var Howto contient seulement des compagnies qui vendent du matriel
  pr-configur destin  faire tourner Linux. Les compagnies offrant
  d'autres services sont invites  contacter le responsable
  poet@linuxports.com <poet@linuxports.com> pour tre dans la liste.


  Si vous contactez une des compagnies listes dans ce document,
  veuillez mentionner ce Var Howto pour Linux.


  Si vous voulez en savoir plus sur le Linux Documentation Project
  <http://metalab.unc.edu/LDP/ldp.html>, ou sur les HOWTOs pour Linux,
  contactez le responsable Tym Bynum <linux-howto@sunsite.unc.edu>



  Tim Bynum enverra la liste sur plusieurs newsgroups nationaux et
  internationaux tous les mois. Ce Var Howto peut aussi tre trouv sur
  le site Web http://var.cyrius.com <http://www.linuxports.com>. Les
  nouvelles versions du Var Howto seront toujours places sur ce site en
  premier. Vrifiez que la version que vous avez est la dernire mise 
  jour.
  Les compagnies vendant du matriel destin  Linux sont invites 
  remplir le formulaire suivant et  me contacter  poet@linuxports.com.
  Les compagnies offrant d'autres services doivent me contacter pour
  mettre au point un formulaire mieux adapt.




       Nom :
       Adresse :
       Tlphone :
       Fax :
       E-mail :
       URL :
       Responsable (Nom de la personne  contacter) :
       Architecture (Intel, Alpha, SPARC) :
       Distribution(s) de Linux (ex. Debian GNU, Red Hat, ...) :
       Expertise spciale :




  NNoottee dduu ttrraadduucctteeuurr::

  Le mot VAR signifie revendeur de produits modifis. Cela veut dire
  qu'une compagnie achte des produits  autre compagnie, complte ces
  produits (ex: support logiciel ou matriel) et les revend.



  22..  IInnffoorrmmaattiioonn ssuurr llee CCooppyyrriigghhtt


  Ce Howto est protg par le Copyright  1997, 1998 par Martin
  Michlmayr.


  Ce Howto est protg par le Copyright  1999 par Mr. Poet et
  LinuxPorts


  Des copies peuvent tre reproduites ou distribues sur n'importe quel
  support physique ou lectronique sans permission de l'auteur. Les
  traductions sont aussi permises, toutefois le nom du traducteur doit
  figurer sur le document.


  Des parties de ce Howto peuvent tre utilises sans le consentement
  pralable de l'auteur. Un travail driv ou une distribution partielle
  du Var Howto pour Linux doit tre accompagn d'une copie de ce fichier
  ou d'un lien vers ce document.


  L'auteur autorise et encourage la redistribution commerciale de ce
  document, mais il apprcierait qu'on l'en prvienne.


  En bref, nous souhaitons dvelopper une dissmination de ce document
  via autant de voies de communication que possible. Toutefois, nous
  souhaitons conserver le Copyright sur les documents HOWTOs, et
  souhaitons tre informs de tout projet de redistribution de ces
  HOWTOs.


  Nous voulons que toutes les informations fournies dans les HOWTOs
  soient davantage dissmines. Si vous avez des questions, contactez
  Tim Bynum, le coordinateur des HOWTOs de Linux linux-
  howto@sunsite.unc.edu.



  33..  AAffrriiqquuee dduu SSuudd




  33..11..  SSyymmpphhoonnyy RReesseeaarrcchh ((PPttyy)) LLttdd




       6 Woodlands Road
       Victoria 2192, Johannesburg
       Afrique du Sud






     TTllpphhoonnee ::
        +27 11 728 5742



     FFaaxx ::
        +27 11 492 1058



     EE--mmaaiill ::
        info@sr.co.za



     UURRLL ::
        http://sr.co.za <http://sr.co.za>



     CCoonnttaacctt ::
        Evan Summers



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Rseau TCP/IP, technologie clients limite



     DDeerrnniirree mmiissee  jjoouurr ::
        4 aot 1997
  44..  AAlllleemmaaggnnee


  44..11..  bbeeee BBaaaassttrruupp EEDDVV--EEnnttwwiicckklluunngg GGmmbbHH




       Mallinkrodtstrasse 7
       D-44145 Dortmund
       Allemagne






     TTllpphhoonnee ::
        +49 231 9812060



     FFaaxx ::
        +49 231 9812062



     EE--mmaaiill ::
        info@bee.de



     UURRLL ::
        http://www.bee.de <http://www.bee.de>



     CCoonnttaacctt ::
        Jrn Baastrup, Jrgen Stanke, Wiebke Schrader



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::

       Allemagne : DLD et S.u.S.E.

       International : Red Hat



     EExxppeerrttiissee ssppcciiaallee ::

       Serveurs Linux et stations de travail configurs

       Terminaux iX11-bee (stations de travail Linux sans disque)

       Stations de travail montables  partir de tiroirs extractibles
        pour les besoins des scientifiques

       Serveurs Linux de connexion bee, bas sur les cartes Cyclades et
        les cartes ICN ISDN
       Distribution de diffrents composants pour les utilisateurs de
        Linux.  Les cartes srie multi-ports Cyclades, cartes ICN ISDN,
        adaptateurs DPT SCSI, contrleurs RAID, cartes ``chien de
        garde'' du matriel Berkshire, adaptateurs graphiques ELSA pour
        les serveurs XFree86 et/ou le serveur X11 Xinside, logiciels
        commerciaux pour Linux.



     DDeerrnniirree mmiissee  jjoouurr ::
        6 mars 1997

  44..22..  ddccpp,, ddeessiiggnn++ccoommmmeerrcciiaall ppaarrttnneerr GGmmbbHH




       Alfredstr. 1
       D-22087 Hamburg
       Allemagne






     TTllpphhoonnee ::
        +49 40 2540850



     FFaaxx ::
        +49 40 25408599



     EE--mmaaiill ::
        info@dcp.de



     UURRLL ::
        http://www.dcp.de <http://www.dcp.de>



     CCoonnttaacctt ::
        Ottmar Rhrig, Frank Hellmann



     AArrcchhiitteeccttuurree ::
        Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Stations de travail haut de gamme avec un processeur Alpha  500
        MHz et Linux


     DDeerrnniirree mmiissee  jjoouurr ::
        5 aot 1997

  44..33..  GGIISSMMAA EEDDVV SSyysstteemm && SSeerrvviiccee GGmmbbHH




       Spitalgasse 23
       D-96450 Coburg
       Allemagne






     TTllpphhoonnee ::
        +49 9561 8824 x0



     FFaaxx ::
        +49 9561 8824 x24



     EE--mmaaiill ::
        a.huemmer@gisma.de



     UURRLL ::
        http://www.gisma.de <http://www.gisma.de> http://www.gisma-
        edv.com <http://www.gisma-edv.com>



     CCoonnttaacctt ::
        Andreas Hummer



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        S.u.S.E. avec quelques modifications



     EExxppeerrttiissee ssppcciiaallee ::
        Construit et configure des gros systmes pour Linux



     DDeerrnniirree mmiissee  jjoouurr ::
        5 mars 1998

  44..44..  iinnnnoommiinnaattee MMuullttiiffuunnkkttiioonnaallee SSeerrvveerrllssuunnggeenn uunndd

  IT-Dienstleistungen GbR


       Stresemannstrasse 128
       10117 Berlin
       Allemagne






     TTllpphhoonnee ::
        +49 30 202 90 477



     FFaaxx ::
        +49 30 202 90 249



     EE--mmaaiill ::
        info@innominate.de



     UURRLL ::
        http://innominate.de <http://innominate.de>



     CCoonnttaacctt ::
        Sascha Ottolski



     AArrcchhiitteeccttuurree ::
        Intel, Alpha et Anfrage



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Nous proposons des serveurs de communications ("Lingo")
        entirement configurs sur la base d'une distribution Linux de
        type "Red Hat".  Outre l'accs  Internet, Lingo permet la mise
        en relation de plusieurs lieux et postes de travail  distance
        par le biais de liaisons RNIS ou par modem. Lingo organise le
        trafic de courrier lectronique sur son lieu d'implantation
        mme, ou entre diffrents lieux ainsi qu' travers Internet. De
        plus, Lingo offre toute la palette des fonctionnalits d'un
        serveur de fichiers, d'impression, de communication orale et de
        fax pour tous types de clients en LAN et WAN.  travers ses
        fonctions de communication, Lingo permet de faire des conomies
        ou de matriser ses cots (statistiques  portant sur les
        liaisons RNIS, compatibilit au niveau IP, les fonctions de
        proxy et les connexions  Internet). Afin d'viter les accs
        illicites, Lingo dispose en outre de mcanismes de protection de
        type Firewall et de cryptage.





     EExxppeerrttiissee ssppcciiaallee ((eenn aalllleemmaanndd)) ::
        Wir bieten komplett konfigurierte Kommunikationsserver ("Lingo")
        auf der Basis von Red Hat Linux an.  Mit Lingo wird neben dem
        Zugang zum Internet auch die Anbindung mehrerer Standorte und
        Telearbeitspltze per ISDN oder Modem realisiert.  Lingo
        organisiert den EMail-Verkehr am Standort, zwischen den
        Standorten und ins Internet.  Auerdem bietet Lingo komplette
        File-, Print- Voice- und Fax-Serverfunktionalitt fr alle
        Clients im LAN und WAN.  Mit seinen Online-Funktionen hilft
        Lingo Kosten sparen (Auswertung der ISDN-Verbindungen, IP-
        Accounting, Proxy-Dienste, Offline-Surfen im Internet).  Zum
        Schutz vor unberechtigtem Zugriff verfgt Lingo auerdem ber
        mehrere Firewall-Schutzmechanismen und Online-Verschlsselung.




     DDeerrnniirree mmiissee  jjoouurr ::
        27 septembre 1997

  44..55..  LLIINNUUXXHHAAUUSS




       Ringbahnstrasse 13
       D-10711 Berlin
       Allemagne






     TTllpphhoonnee ::
        +49 30 890 944 63



     FFaaxx ::
        +49 30 890 944 64



     EE--mmaaiill ::
        info@linuxhaus.de



     UURRLL ::
        http://www.linuxhaus.de <http://www.linuxhaus.de>



     CCoonnttaacctt ::
        Jrg Frhbrodt



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Debian GNU/Linux, RedHat et S.u.S.E.
     EExxppeerrttiissee ssppcciiaallee ::
        Bases de donnes, Serveurs Internet et firewalls



     DDeerrnniirree mmiissee  jjoouurr ::
        25 octobre 1998

  44..66..  nneett EEssttaattee




       Am Bltenanger 8
       D-80995 Mnchen
       Allemagne






     TTllpphhoonnee ::
        +49 89 15820444



     FFaaxx ::
        +49 89 15820445



     EE--mmaaiill ::
        info@netestate.de



     UURRLL ::
        http://www.netesate.de <http://www.netestate.de>



     CCoonnttaacctt ::
        Michael Brunnbauer



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        net Estate possde sa propre distribution



     EExxppeerrttiissee ssppcciiaallee ::
        Serveurs Internet, serveurs proxy, serveurs courrier et news,
        firewalls



     DDeerrnniirree mmiissee  jjoouurr ::
        4 aot 1997

  44..77..  PPRROONNEETTIICCSS




       Mrkische Strasse 117
       D-44141 Dortmund
       Allemagne






     TTllpphhoonnee ::
        +49 231 557203 0



     FFaaxx ::
        +49 231 557203 27



     EE--mmaaiill ::
        sales@pronetics.de



     UURRLL ::
        http://www.pronetics.de <http://www.pronetics.de>



     CCoonnttaacctt ::
        Horst Hohmeier



     AArrcchhiitteeccttuurree ::
        Intel et PowerPC



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        GNU



     EExxppeerrttiissee ssppcciiaallee ::
        Serveurs Internet, serveurs proxy, serveurs courrier et news,
        firewalls



     DDeerrnniirree mmiissee  jjoouurr ::
        11 avril 1997

  55..  AArrggeennttiinnee


  55..11..  IIWWCCCC AArrggeennttiinnaa




  Libertidad 2472
  Florida, CP 1602
  Buenos Aires
  Argentine






     TTllpphhoonnee ::
        +54 1 791 9877, +54 1 781 9710



     FFaaxx ::
        +54 1 791 9877



     EE--mmaaiill ::
        godel@iwcc.com



     UURRLL ::
        http://www.iwcc.com.ar <http://www.iwcc.com.ar>



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat




     EExxppeerrttiissee ssppcciiaallee ::
        Serveurs Linux pour serveurs Internet, firewalls, ainsi que des
        produits spciaux appels Linux VNET. Connectez votre rseau LAN
        tout entier  Internet avec une adresse IP et une ligne
        tlphonique.




     DDeerrnniirree mmiissee  jjoouurr ::
        12 octobre 1997

  66..  AAuussttrraalliiee


  66..11..  IIPPAAXX SSyysstteemmss





       GPO Box 94A
       Melbourne, 3001
       Australie

     TTllpphhoonnee ::
        +61 3 9887 1984



     FFaaxx ::
        +61 3 9801 8533



     EE--mmaaiill ::
        info@ipax.com.au



     UURRLL ::
        http://www.ipax.com.au <http://www.ipax.com.au>



     CCoonnttaacctt ::
        Adam Neat



     AArrcchhiitteeccttuurree ::
        Intel et SPARC



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Administration de rseau, serveurs de fichiers, d'impression et
        de courrier pour rseaux LAN, personnalisation des bases de
        donnes, installation de systmes.



     DDeerrnniirree mmiissee  jjoouurr ::
        28 novembre 1997

  77..  AAuuttrriicchhee


  77..11..  DDEEAASS EEDDVV--LLssuunnggeenn GG..mm..bb..HH..





       Mariahlilfer Str. 74B
       A-1070 Wien
       Autriche






     TTllpphhoonnee ::
        +43 1 522 72 51 0

     FFaaxx ::
        +43 1 522 72 52



     EE--mmaaiill ::
        deas@deas.co.at



     UURRLL ::
        http://www.deas.co.at <http://www.deas.co.at>



     CCoonnttaacctt ::
        Andreas Gudorf <gudorf@deas.co.at>



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Principalement Red Hat et S.u.S.E. mais aussi Debian et DLD


     EExxppeerrttiissee ssppcciiaallee ::
        Firewall, Web, serveurs de fichiers et FTP


     DDeerrnniirree mmiissee  jjoouurr ::
        12 juillet 1998

  77..22..  QQuuaanntt XX EEDDVV--GGeess..mm..bb..HH..





       Hintnausdorf 14/1
       A-9300 St. Veit/Glan
       Autriche






     TTllpphhoonnee ::
        +43 4212 60040



     FFaaxx ::
        +43 4212 60044 20



     EE--mmaaiill ::
        support@quant-x.com



     UURRLL ::
        http://www.quant-x.at <http://www.quant-x.at>



     CCoonnttaacctt ::
        Wolfgang Dreyer



     AArrcchhiitteeccttuurree ::
        Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     DDeerrnniirree mmiissee  jjoouurr ::
        9 aot 1997

  88..  BBeellggiiqquuee


  88..11..  AABBVV CCoommppuutteerr ssaa//nnvv..





       rue Lambiotte 81
       B-1050 Bruxelles
       Belgique






     TTllpphhoonnee ::
        +32 2 2151234



     FFaaxx ::
        +32 2 7327482



     EE--mmaaiill ::
        bates@student.fsa.ucl.ac.be



     UURRLL ::
        http://web.arcadis.be/abv <http://web.arcadis.be/abv>



     CCoonnttaacctt ::
        James Bates



     AArrcchhiitteeccttuurree ::
        Intel et SPARC



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Serveur Odysse (driv de la version Slackware 3.2)



     EExxppeerrttiissee ssppcciiaallee ::
        Environnement complexe de rseaux : connexion, Internet,
        Intranet, ISDN, intgration avec Novell NetWare(3.11 ou plus) et
        avec IBM AS/400, et autres...



     DDeerrnniirree mmiissee  jjoouurr ::
        16 aot 1997


  88..22..  BBeeFFrreeee SSAA..NNVV BBeellggiiuumm





       4, rue d'Aineffe
       B-4317 Borlez Faimes
       Belgique






     TTllpphhoonnee ::
        +32 19 566115




     FFaaxx ::
        +32 19 567337




     EE--mmaaiill ::
        tech@befree.be




     UURRLL ::
        http://www.befree.be <http://www.befree.be>




     CCoonnttaacctt ::
        Alexandre J.D. Dulaunoy




     AArrcchhiitteeccttuurree ::
        Intel, Alpha et SPARC



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Red Hat et une distribution propre pour des
        systmes embarqus.



     EExxppeerrttiissee ssppcciiaallee ::
        Nous dveloppons vos applications critiques sous Linux. Nous
        construisons des inter-rseaux complexes avec radiophonie pour
        WAN et MAN. Nous avons d'autres systmes ou des serveurs ddis
         Linux pour le monde rel.  Nous fournissons un service "Open
        Source" sur toute la Belgique.


     DDeerrnniirree mmiissee  jjoouurr ::
        30 juin 1998

  88..33..  BBeetttteerr AAcccceessss NN..VV..





       Geldenaakse Vest 6
       B-3000 Leuven
       Belgique






     TTllpphhoonnee ::
        +32 16 298045



     FFaaxx ::
        +32 16 298046



     EE--mmaaiill ::
        jacko@ba.be



     UURRLL ::
        http://www.ba.be <http://www.ba.be>



     CCoonnttaacctt ::
        Jan Guldentops



     AArrcchhiitteeccttuurree ::
        Intel, Alpha et SPARC


     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux et Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Facilit de tests, connexion et configuration Internet et
        Intranet, scurit (VPN, firewalls, vrifications),
        dveloppement technique WEB, consultant en Informatique (en
        gnral) sur IT



     DDeerrnniirree mmiissee  jjoouurr ::
        30 juin 1997

  99..  BBrrssiill



  99..11..  DDeexxttrraa SSoolluueess eemm IInnffoorrmmttiiccaa




       Av. Jos de Souza Campos, 1815 cj. 1205
       13025-320 Campinas, SP
       Brsil






     TTllpphhoonnee::
        +55 19 251 3644


     FFaaxx::
        +55 19 253 0440


     EE--mmaaiill::
        staff@dextra.com.br


     UURRLL::
        http://www.dextra.com.br


     CCoonnttaacctt::
        Bill Coutinho


     AArrcchhiitteeccttuurree::
        Intel.


     DDiissttrriibbuuttiioonn LLiinnuuxx::
        Red Hat.


     EExxppeerrttiissee ssppcciiaallee::
        Firewalls et VPN, accs  Internet pour LANs, serveurs Intranet,
        serveurs d'impressions et disques pour LANs Windows, serveurs
        pour les Fournisseurs d'Accs  Internet (FAI).
     DDeerrnniirree mmiissee  jjoouurr::
        2 octobre 1998.



  1100..  CCaannaaddaa


  1100..11..  CCeennttuurriioonn SSeerrvviicceess




       9351 Blundell Road
       Richmond, BC V6Y 1K5
       Canada






     TTllpphhoonnee ::
        +1 604 279 1857



     FFaaxx ::
        +1 604 279 1800



     EE--mmaaiill ::
        jwalter@rogers.wave.ca



     UURRLL ::
        http://www.ipipeline.net/centurion
        <http://www.ipipeline.net/centurion>




     CCoonnttaacctt ::
        Jan Walter



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Red Hat et Slackware



     EExxppeerrttiissee ssppcciiaallee ::
        Intgration des systmes non Unix. Intranet, Internet, bases de
        donnes, courrier. Conception de serveurs




     DDeerrnniirree mmiissee  jjoouurr ::
        3 septembre 1997

  1100..22..  ddoottccoomm MMaarrkkeettiinngg CCoorrppoorraattiioonn




       #500-1168 Hamilton Street
       Vancouver, BC V6B 2S2
       Canada






     TTllpphhoonnee ::
        +1 604 664 7455



     FFaaxx ::
        +1 604 664 7465



     EE--mmaaiill ::
        info@dotcom.bc.ca



     UURRLL ::
        http://www.dotcom.bc.ca <http://www.dotcom.bc.ca>



     CCoonnttaacctt ::
        Graham TerMarsch graham@dotcom.bc.ca



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Serveurs Internet et Intranet, serveurs courrier et news,
        serveurs fax, stations de travail. Installation de serveurs WEB
        utilisant Apache configur pour un usage interne et externe avec
        des extensions pour le commerce lectronique et automatisation
        des systmes. Possibilit de dveloppement de logiciels
        personnaliss sur demande.



     DDeerrnniirree mmiissee  jjoouurr ::
        16 octobre 1997


  1100..33..  HHaarrdd DDaattaa LLttdd..




       11060 - 166 Avenue
       Edmonton, AB T5X 1Y3
       Canada






     TTllpphhoonnee ::
        +1 403 456 1510



     FFaaxx ::
        +1 403 456 1510



     EE--mmaaiill ::
        harddata@bigfoot.com



     CCoonnttaacctt ::
        Maurice Hilarius, Michal Jaegermann



     AArrcchhiitteeccttuurree ::
        Intel, Alpha et SPARC



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat et S.u.S.E.



     EExxppeerrttiissee ssppcciiaallee ::
        Samba, sous-systmes de disque de grande capacit et de haute
        performance, RAID, applications de bibliothques de donnes,
        systmes Digital Alpha, communication, applications en rseau et
        configuration.



     DDeerrnniirree mmiissee  jjoouurr ::
        3 novembre 1997

  1100..44..  KKwwaann''ss RReesseeaarrcchh LLaabboorraattoorryy




       Markham
       Ontario
       Canada



     EE--mmaaiill ::
        e_lib@hotmail.com



     UURRLL ::
        http://www.geocities.com/ResearchTriangle/5461
        <http://www.geocities.com/ResearchTriangle/5461>



     CCoonnttaacctt ::
        Derek Kwan



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Red Hat et Slackware



     EExxppeerrttiissee ssppcciiaallee ::
        Conception et optimisation des systmes d'aprs les besoins des
        utilisateurs.



     DDeerrnniirree mmiissee  jjoouurr ::
        28 novembre 1997

  1100..55..  SSoouunndd SSooffttwwaarree LLttdd..




       20 Abelard Avenue
       Brampton, ON L6Y 2K8
       Canada






     TTllpphhoonnee ::
        +1 905 452 0504



     FFaaxx ::
        +1 905 452 9754



     EE--mmaaiill ::
        sales@telly.org



     UURRLL ::
        http://www.telly.org/sound <http://www.telly.org/sound>
     CCoonnttaacctt ::
        Evan Leibovitch



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux



     EExxppeerrttiissee ssppcciiaallee ::
        EDI, Progress DB, intgration Internet, migration vers SCO/Unix.
        Partenaire agr de Caldera Business.



     DDeerrnniirree mmiissee  jjoouurr ::
        5 aot 1997

  1111..  ttaattss--UUnniiss


  1111..11..  AAppeeXX SSyysstteemmss IInntteeggrraattiioonn CCoorrpp..




       P.O. Box 338
       Apex, NC 27502-0338
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 919 468 8150



     FFaaxx ::
        +1 919 468 5288



     EE--mmaaiill ::
        apex@2boot.com



     UURRLL ::
        http://www.apex.com <http://www.apex.com>



     CCoonnttaacctt ::
        Joe Ferguson



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat, Slackware et S.u.S.E.



     EExxppeerrttiissee ssppcciiaallee ::
        Personnalise les systmes, tlcommunication, industrie



     DDeerrnniirree mmiissee  jjoouurr ::
        28 fvrier 1998

  1111..22..  AASSLL WWoorrkkssttaattiioonnss,, IInncc..




       2342 Shade Tree Lane
       San Jose, CA 95131
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 408 923 3837



     FFaaxx ::
        +1 408 923 4615



     EE--mmaaiill ::
        info@aslab.com



     UURRLL ::
        http://www.aslab.com <http://www.aslab.com>



     CCoonnttaacctt ::
        Jeff Nguyen



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Craftworks et Red Hat


     EExxppeerrttiissee ssppcciiaallee ::
        Personnalise les serveurs et les stations de travail avec
        jusqu' 4Go de mmoire et supporte RAID niveaux 0, 1 et 5. Des
        tiroirs extractibles personnaliss sont aussi disponibles.



     DDeerrnniirree mmiissee  jjoouurr ::
        6 mars 1997

  1111..33..  AAppaacchhee DDiiggiittaall CCoorrppoorraattiioonn




       777 Main Ave. Suite 211
       Durango, CO 81301
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 970 259 8153



     FFaaxx ::
        +1 970 259 8145



     EE--mmaaiill ::
        info@apache.com



     UURRLL ::
        http://www.apache.com <http://www.apache.com>



     CCoonnttaacctt ::
        Mark Wauchope



     AArrcchhiitteeccttuurree ::
        Intel, Alpha et SPARC



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Red Hat et Slackware



     EExxppeerrttiissee ssppcciiaallee ::
        Service spcialis dans les configurations innd, httpd, ftpd,
        telnetd, sendmail, POP3, radius, procmail, etc. Trs utile pour
        les Fournisseurs d'Accs  Internet et les administrateurs
        rseau.


     DDeerrnniirree mmiissee  jjoouurr ::
        4 aot 1997

  1111..44..  BBrraaiinnSSttoorrmm TTeecchhnnoollooggiieess




       5836 Florrence Boulevard
       Omaha, NE 68110
       tats-Unis d'Amrique






     TTllpphhoonnee::
        +1 402 690 7306


     FFaaxx::
        +1 402 733 8499


     EE--mmaaiill::
        info@bstc.net


     UURRLL::
        http://www.bstc.net


     CCoonnttaacctt::
        Brian Roberson


     AArrcchhiitteeccttuurree::
        Intel.


     DDiissttrriibbuuttiioonn LLiinnuuxx::
        Red Hat.


     EExxppeerrttiissee SSppcciiaallee::
        Solutions compltes (logiciels et matriels) pour maitrser la
        puissance de Linux dans votre actuel systme informatique.
        Spcialiss dans les Fournisseurs d'Accs  Internet (FAI),
        besoins LAN/WAN, administration de systmes, formation gnrale.


     DDeerrnniirree mmiissee  jjoouurr::
        1 octobre 1998.


  1111..55..  TThhee CCoommppuutteerr UUnnddeerrggrroouunndd,, IInncc..




       1357 West Lane Avenue, Suite 210
       Columbus, OH 43221
       tats-Unis d'Amrique


     TTllpphhoonnee::
        +1 614 485 0506, +1 888 485 5865


     EE--mmaaiill::
        president@tcu-inc.com


     UURRLL::
        http://www.tcu-inc.com


     CCoonnttaacctt::
        Mark Nielsen


     AArrcchhiitteeccttuurree::
        Intel.


     DDiissttrriibbuuttiioonn LLiinnuuxx::
        Caldera OpenLinux, Debian GNU, Red Hat et  S.u.S.E.


     EExxppeerrttiissee ssppcciiaallee::
        Rseaux, programmation et intgration de Linux dans des
        environements multi-systmes.


     DDeerrnniirree mmiissee  jjoouurr::
        1 octobre 1998.


  1111..66..  DDCCGG CCoommppuutteerrss IInncc..




       4 Sanborn Road, Suite 2
       Londonderry, NM 03053
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 603 421 1800



     FFaaxx ::
        +1 603 421 0911



     EE--mmaaiill ::
        sjg@dcginc.com



     UURRLL ::
        http://www.dcginc.com <http://www.dcginc.com>


     CCoonnttaacctt ::
        Stephen J.Gaudet



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Debian GNU et Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Systmes personnaliss utilisant Linux ou Digital Unix



     DDeerrnniirree mmiissee  jjoouurr ::
        9 aot 1997

  1111..77..  EEnntteerrpprriissee CCoommppuutteerr CCoonnssuullttiinngg




       327 E Main Street Suite E
       Jackson, OH 45640
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 740 286 0151



     FFaaxx ::
        +1 740 286 7236



     EE--mmaaiill ::
        ecc@nternet.net



     CCoonnttaacctt ::
        Matt Borghese



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat et Slackware


     EExxppeerrttiissee ssppcciiaallee ::
        Configuration de serveurs Internet, serveurs de connexion mask
        IP et matriels ISP



     DDeerrnniirree mmiissee  jjoouurr ::
        12 dcembre 1997

  1111..88..  IInntteerrnnaattiioonnaall TTeecchhnnoollooggyy SSaalleess




       500 North Cary Algonguin Road
       Cary, IL 60013
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 847 639 0775



     FFaaxx ::
        +1 847 639 0710



     EE--mmaaiill ::
        rip@itsinfonet.com



     UURRLL ::
        http://www.itsinfonet.com <http://www.itsinfonet.com>



     CCoonnttaacctt ::
        Clarence Fleming



     AArrcchhiitteeccttuurree ::
        Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        International Technology Sales est un TOEM Digital (fabricant
        d'quipement technique) et un associ en affaires.

        Nous vendons des cartes Digital, des processeurs Alpha, des
        ordinateurs, systmes Digital et des produits Digital pour les
        rseaux.  En tant que vendeur agr de produits Digital, nous
        vendons des cartes et systmes pour l'utilisation de Linux.
        I.T.S. propose aussi un support  ses clients. I.T.S. vend aussi
        des produits Motorola et IBM, des services Internet et Intranet,
        la conception et l'hbergement de sites webs.



     DDeerrnniirree mmiissee  jjoouurr ::
        18 mars 1998

  1111..99..  LLAANNDD--55 CCoorrppoorraattiioonn




       9747 Businesspark Avenue
       San Diego, CA 92126
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 800 526 3885



     FFaaxx ::
        +1 619 566 3611



     EE--mmaaiill ::
        sales@land-5.com



     UURRLL ::
        http://www.land-5.com <http://www.land-5.com>



     CCoonnttaacctt ::
        David Licosati



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        RAID, tolrence erreurs


     DDeerrnniirree mmiissee  jjoouurr ::
        15 juillet 1998


  1111..1100..  LLiinnuuxx HHaarrddwwaarree SSoolluuttiioonnss,, IInncc..




       130 North Front Street
       Wilmington, NC 28401
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 888 LINUXHW, +1 910 251 9998



     FFaaxx ::
        +1 910 251 8832



     EE--mmaaiill ::
        info@linux-hw.com



     UURRLL ::
        http://www.linux-hw.com <http://www.linux-hw.com>



     CCoonnttaacctt ::
        Kit Cosper <cosper@linux-hw.com>



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux et Red Hat



     DDeerrnniirree mmiissee  jjoouurr ::
        3 novembre 1997

  1111..1111..  MMiiccrrooUUnniixx SSyysstteemmss




       15391 Turquoise Circle North
       Chino Hills, CA 91709
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 909 597 3592



     FFaaxx ::
        +1 909 393 5312



     EE--mmaaiill ::
        markjc@microux.com



     UURRLL ::
        http://www.microux.com <http://www.microux.com>



     CCoonnttaacctt ::
        Mark J. Carrozza



     AArrcchhiitteeccttuurree ::
        PowerPC



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Administration AIX 4.2



     DDeerrnniirree mmiissee  jjoouurr ::
        26 juin 1998

  1111..1122..  MMiiccrroowwaayy




       Research Park, Box 79
       Kingston, MA 02364
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 508 746 7341



     FFaaxx ::
        +1 508 746 4678


     EE--mmaaiill ::
        annf@microway.com



     UURRLL ::
        http://www.microway.com <http://www.microway.com>



     CCoonnttaacctt ::
        Ann Fried



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Nous avons des annes d'exprience dans le systme Unix et les
        hautes performances numriques des PC



     DDeerrnniirree mmiissee  jjoouurr ::
        13 aot 1997

  1111..1133..  NNeett EExxpprreessss




       3205 Isherwood Way
       Fremont, CA 94536
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 510 494 9493 (seulement pour les universits et le
        gouvernement)



     FFaaxx ::
        +1 510 790 2342



     EE--mmaaiill ::
        sales@netex.tdl.com tech@netex.tdl.com



     UURRLL ::
        http://www.tdl.com/~netex <http://www.tdl.com/~netex>
     CCoonnttaacctt ::
        Roland Baker



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Toutes les distributions disponibles



     EExxppeerrttiissee ssppcciiaallee ::
        Stations de travail Linux hautes performances et serveurs SMP
        pour les universits amricaines, le gouvernement amricain, les
        scientifiques, les ingnieurs et l'industrie des
        tlcommunications. Chssis avec tiroir extractible, serveurs
        Internet pr-configurs, matriel WAN sont disponibles. Notre
        site web contient des informations techniques sur la conception
        et la cration de systmes Linux  trs haute performance 
        partir du matriel PC. Visitez notre site web
        <http://www.tdl.com/~netex> pour plus d'informations.



     DDeerrnniirree mmiissee  jjoouurr ::
        8 aot 1997

  1111..1144..  PPaacciiffiicc IInntteerrnneett




       600 Corporate Pointe, Suite 100
       Culver City, CA 90230
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 310 410 9700



     FFaaxx ::
        +1 310 215 8071



     EE--mmaaiill ::
        sales@pacnet.com



     UURRLL ::
        http://www.pacnet.com <http://www.pacnet.com>




     CCoonnttaacctt ::
        Tania Hayek, Michael Boyer, Denise Schutte, Maria Lepisto,
        Natalie Jackson



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux et Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Systmes de Fournisseurs d'Accs  Internet (F.A.I.)



     DDeerrnniirree mmiissee  jjoouurr ::
        7 mars 1997

  1111..1155..  PPssyyttrroonniiccss




       99 Leroy Street
       Binghamton, NY 13905
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 607 724 3240



     FFaaxx ::
        +1 516 598 4619



     EE--mmaaiill ::
        info@psytronics.com



     UURRLL ::
        http://www.psytronics.com <http://www.psytronics.com>



     CCoonnttaacctt ::
        Jaron Rubenstein



     AArrcchhiitteeccttuurree ::
        Intel

     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Psytronics est un partenaire autoris de Red Hat Support et Red
        Hat Hardware. Nous proposons des stations de travail
        personnalises et des solutions matriels pour serveurs.



     DDeerrnniirree mmiissee  jjoouurr ::
        25 octobre 1998

  1111..1166..  SSuunnsseett SSyysstteemmss




       1328 East Barbarita Avenue
       Gilbert, AZ 85234
       tats-Unis d'Amrique





     TTllpphhoonnee ::
        +1 602 497 9335


     FFaaxx ::
        +1 602 497 8012


     EE--mmaaiill ::
        info@sunsetsystems.com



     UURRLL ::
        http://www.sunsetsystems.com <http://www.sunsetsystems.com>



     CCoonnttaacctt ::
        Rod Roark



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Slackware



     EExxppeerrttiissee ssppcciiaallee ::
        Nous sommes spcialiss dans les machines prconfigurs Linux 
        bas prix (commenant  500$ US), nous offrons une solution
        facile pour les dbutants et un gain de temps pour les
        utilisateurs plus expriments.
     DDeerrnniirree mmiissee  jjoouurr ::
        15 aot 1998


  1111..1177..  SSWW TTeecchhnnoollooggyy




       1701 North Greenville Suite 1106
       Richardson, TX 75081
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 972 907 0871



     FFaaxx ::
        +1 972 907 9339



     EE--mmaaiill ::
        sales@swt.com



     UURRLL ::
        http://www.swt.com <http://www.swt.com>



     CCoonnttaacctt ::
        Marvin Y. Wu



     AArrcchhiitteeccttuurree ::
        Intel, Alpha et SPARC



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Debian GNU et Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        SW Technology est une des premires compagnies qui proposent des
        machines avec Linux pr-install. Notre gamme de produits
        actuelle va de l'ordinateur portable au rseau avec des liaisons
        de transfert dont les taux se mesurent en Gigaoctets, qui
        fournissent les capacits de super-ordinateurs.



     DDeerrnniirree mmiissee  jjoouurr ::
        14 novembre 1997


  1111..1188..  TTeelleenneett SSyysstteemm SSoolluuttiioonnss,, IInncc..




       2480 Kruse Drive
       San Jose, CA 95131
       tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 408 383 0334 x102



     FFaaxx ::
        +1 408 383 0335



     EE--mmaaiill ::
        linux@tesys.com



     UURRLL ::
        http://www.tesys.com/linux <http://www.tesys.com/linux>



     CCoonnttaacctt ::
        Billy Bath <billy@tesys.com>



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Toutes les distributions disponibles



     EExxppeerrttiissee ssppcciiaallee ::
        Tous nos systmes sont pr-tests et prts pour Internet y
        compris des sous-systmes RAID. Nos principaux clients sont les
        dveloppeurs sous Linux et les utilisateurs souhaitant du
        matriel solide et de haute facture.



     DDeerrnniirree mmiissee  jjoouurr ::
        7 novembre 1997

  1111..1199..  VVAA RReesseeaarrcchh





  1235 Pear Avenue, Suite 109
  Mountain View, CA 94043
  tats-Unis d'Amrique






     TTllpphhoonnee ::
        +1 888 LINUX 4U, +1 650 934 3666



     FFaaxx ::
        +1 650 964 7668 ou +1 650 964 7669



     EE--mmaaiill ::
        sales@varesearch.com



     UURRLL ::
        http://www.varesearch.com <http://www.varesearch.com>



     CCoonnttaacctt ::
        Tim O'Mahoney



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Debian GNU, Red Hat et S.u.S.E.



     EExxppeerrttiissee ssppcciiaallee ::
        Nous portons tous nos efforts sur des tests de performances sur
        le matriel, nous valuons les compatibilits et configurons les
        systmes pour obtenir un maximum de performances et de stabilit
        sous Linux



     DDeerrnniirree mmiissee  jjoouurr ::
        4 novembre 1997

  1122..  FFiinnllaannddee



  1122..11..  SSOOTT -- OOyy SSuuoommeenn OOhhjjeellmmiissttoottyy AAbb






  Hermiankatu 8 E
  FIN-33720 Tampere
  Finlande






     TTllpphhoonnee::
        +358 3 3165544


     FFaaxx::
        +358 3 3165959


     EE--mmaaiill::
        sales@sot.com


     UURRLL::
        http://www.sot.com


     CCoonnttaacctt::
        Santeri Kannisto <sk@sot.com>


     AArrcchhiitteeccttuurree::
        Intel.


     DDiissttrriibbuuttiioonn LLiinnuuxx::
        Red Hat Linux FI, SOT-linux.


     EExxppeerrttiissee SSppcciiaallee::
        Ordinateurs et serveurs bass sur la technologie Intel et
        dveloppement de logiciels pour Linux.


     DDeerrnniirree mmiissee  jjoouurr::
        1 octobre 1998.




  1133..  FFrraannccee


  1133..11..  AAllccvvee




       12, place Indira Gandhi
       92230 Gennevilliers
       France







     TTllpphhoonnee ::
        +33 1 47 33 82 84



     FFaaxx ::
        +33 1 47 33 76 98



     EE--mmaaiill ::
        ventes@alcove.fr



     UURRLL ::
        http://www.alcove.fr <http://www.alcove.fr>



     CCoonnttaacctt ::
        Christophe Le Bars, Lucien Petit



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Toutes les distributions disponibles



     EExxppeerrttiissee ssppcciiaallee ::
        Serveurs Internet et Intranet, serveurs proxy, serveurs courrier
        et news, firewalls, serveurs fax et stations de travail.



     DDeerrnniirree mmiissee  jjoouurr ::
        4 fvrier 1998

  1144..  HHoonngg KKoonngg



  1144..11..  GGeenneessiiss SSyysstteemmss IInntt''ll LLttdd..




       7/F., Honytex Building
       22 Ashley Road, T.S.T. Kowloon
       Hong Kong





     TTllpphhoonnee ::
        +852 2815 0728



     FFaaxx ::
        +852 2815 0729



     EE--mmaaiill ::
        info@genesis.com.hk



     UURRLL ::
        http://www.genesis.com.hk <http://www.genesis.com.hk>



     CCoonnttaacctt ::
        Gyver Lo



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Serveurs Web



     DDeerrnniirree mmiissee  jjoouurr ::
        30 mai 1998

  1155..  PPaayyss--BBaass


  1155..11..  SSttoonnee IITT SSeerrvviicceess BBVV




       Lassuslaan 105
       NL-3723 LJ Bilthoven
       Pays-Bas






     TTllpphhoonnee ::
        +31 30 22 87 995



     FFaaxx ::
        +31 30 22 87 997




     EE--mmaaiill ::
        linux@stonebv.com



     UURRLL ::
        http://www.stonebv.com <http://www.stonebv.com>



     CCoonnttaacctt ::
        Martijn Smit



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Red Hat et S.u.S.E.



     EExxppeerrttiissee ssppcciiaallee ::
        Solutions Internet et Intranet



     DDeerrnniirree mmiissee  jjoouurr ::
        30 janvier 1997

  1166..  PPoollooggnnee



  1166..11..  EEmmiitt SSpp..zz oo..oo..




       Koszarowa 48/9
       51-149 Wroclaw
       Pologne






     TTllpphhoonnee ::
        +48 71 721848



     FFaaxx ::
        +48 71 721733



     EE--mmaaiill ::
        kontakt@emit.com.pl



     UURRLL ::
        http://www.emit.com.pl <http://www.emit.com.pl>



     CCoonnttaacctt ::
        Ian Carr-de Avelon



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Security corrige et personnalise



     EExxppeerrttiissee ssppcciiaallee ::
        Scurise le transfert des donnes et de l'argent lectronique



     DDeerrnniirree mmiissee  jjoouurr ::
        2 octobre 1997

  1166..22..  PPoollsskkiiee SSiieeccii TTeelleeiinnffoorrmmaattyycczznnee SS..AA..




       ul. Zaolzianska 11
       41-800 Zabrze
       Pologne






     TTllpphhoonnee ::
        +48 32 276 14 30



     FFaaxx ::
        +48 32 276 01 75



     EE--mmaaiill ::
        amadloch@netpol.pl



     UURRLL ::
        htpp://www.netpol.pl <http://www.netpol.pl>



     CCoonnttaacctt ::
        Andrzej Madloch


     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Toutes les versions disponibles



     EExxppeerrttiissee ssppcciiaallee ::
        Connexion et configuration Internet et Intranet, systmes
        Fournisseur d'Accs Internet (ISP), serveurs et stations de
        travail configurs pour Linux, terminaux X11 (sans disque ou
        uniquement avec un lecteur de disquettes) , serveurs de
        connexion et routeurs sous Linux, scurit (firewalls, VPN),
        Samba, mulateur de serveurs Novell, configuration de serveur
        courrier, distribution d'Equinox et BOCA cartes srie multi-
        ports, conseils gnral IT et Linux.



     EExxppeerrttiissee ssppcciiaallee ((eenn ppoolloonnaaiiss)) ::
        Instalacja i konfiguracja serwerow Internetowych i
        Intranetowych, Instalacja i konfiguracja Linux'a jako routera
        internetowego, Systemy dla Providerow Internetu Skonfigurowane
        serwery i stacje robocze z systemem Linux X-Terminale (komputery
        z Linux bez dysku twardego), serwery i routey dostepowe bazujace
        na systemie Linux.  Bezpieczenstwo (firewall, Virtualne Sieci
        Prywatne, sprawdzanie bezpieczenstwa). Emulator serwera Novell,
        nie musisz kupowac Novella, konfiguracja serwerow pocztowych na
        Linuxie, sprzedaz kart wieloportowych Equinox i Boca, konsulacje
        z systemu Linux i IT.




     DDeerrnniirree mmiissee  jjoouurr ::
        17 mars 1998

  1177..  RRooyyaauummee--UUnnii



  1177..11..  AAnnnneexx TTeecchhnnoollooggyy EEuurrooppee LLttdd




       9 Horseshoe Park
       Reading, RG8 7JW
       Royaume-Uni






     TTllpphhoonnee ::
        +44 118 984 1207



     FFaaxx ::
        +44 118 984 1217

     EE--mmaaiill ::
        linux@annex.co.uk



     UURRLL ::
        http://www.annex.co.uk <http://www.annex.co.uk>



     CCoonnttaacctt ::
        Alastair Martin alastair@annex.co.uk, Alex Butcher
        alex@annex.co.uk



     AArrcchhiitteeccttuurree ::
        Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppcciiaallee ::
        Systmes Alpha/Linux pr-configurs, systmes UDB, systmes
        21164A, support pour passer les logiciels Intel vers Alpha.



     DDeerrnniirree mmiissee  jjoouurr ::
        4 aot 1997

  1177..22..  DDeeffiinniittee LLiinnuuxx SSyysstteemmss




       264 Ripon Road
       Stevenage
       Herts, SG1 4NF
       Royaume-Uni






     TTllpphhoonnee::
        +44 800 956 7213


     FFaaxx::
        +44 1438 311993


     EE--mmaaiill::
        info@ukpost.com


     UURRLL::
        http://definite.ukpost.com


     CCoonnttaacctt::
        Jason Clifford


     AArrcchhiitteeccttuurree::
        Intel et Alpha.


     DDiissttrriibbuuttiioonn LLiinnuuxx::
        Debian GNU, Red Hat, Slackware et S.u.S.E.


     EExxppeerrttiissee ssppcciiaallee::
        Rseaux et intgration avec d'autres systmes. Scurit des
        rseaux.


     DDeerrnniirree mmiissee  jjoouurr::
        1 octobre 1998.



  1177..33..  NNeennee IInnffoorrmmaattiioonn SSyysstteemmss




       32 Glasgow Street
       Northampton, NN5 5BL
       Royaume-Uni






     TTllpphhoonnee ::
        +44 7020 953494 (Ce numro est automatiquement redirig, mais si
        vous avez un oprateur en ligne, demandez Timothy Peters)



     FFaaxx ::
        +44 7020 953496



     EE--mmaaiill ::
        sales@nisys.demon.co.uk



     UURRLL ::
        http://www.nisys.demon.co.uk <http://www.nisys.demon.co.uk>



     CCoonnttaacctt ::
        Timothy Peters <tim@nisys.demon.co.uk>



     AArrcchhiitteeccttuurree ::
        Intel et Alpha


     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Linux Pro, Red Hat et Slackware



     EExxppeerrttiissee ssppcciiaallee ::
        Revendeur britanique pour la galerie marchande de Linux et les
        cartes sries multi-ports Cyclades.



     DDeerrnniirree mmiissee  jjoouurr ::
        12 aot 1997

  1177..44..  DD.. GGrraanntt CCrraawwlleeyy LLiimmiitteedd




       7 Owen Road
       Rainhill, Merseyside, L35 0PJ
       Royaume-Uni






     TTllpphhoonnee ::
        +44 151 289 9250



     FFaaxx ::
        +44 151 289 7895



     EE--mmaaiill ::
        enquiry@dgc-nms.co.uk



     CCoonnttaacctt ::
        Grant Crawley



     AArrcchhiitteeccttuurree ::
        Intel, Sparc, Alpha, MIPS, PowerPC et StrongARM



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        ARMLinux, Caldera OpenLinux, Extreme Linux, Red Hat, Slackware,
        S.u.S.E et TurboLinux.



     EExxppeerrttiissee ssppcciiaallee ::
        Nous sommes spcialiss dans les logiciels et matriels pour les
        utilisateurs de Linux dans le Royaume-Uni et  travers toute
        l'Europe. RAID, firewalls, serveurs Internet, serveurs Intranet,
        tout ceci n'est qu'un exemple de tous les produits et services
        que nous offrons. Pour plus de renseignements, visitez notre
        site internet pour consulter les dernires nouveauts.
     DDeerrnniirree mmiissee  jjoouurr ::
        1 octobre 1998
































































  HOWTO Comment migrer de VMS  Linux
  Auteur : Guido Gonzato et Mike Miller
  Traducteur : Dimitri Ara
  v1.1.3, 17 Septembre 1999

  Ce HOWTO est destin  toutes les personnes qui utilisent VMS et qui
  ont maintenant besoin ou envie de passer  Linux, le clone libre
  d'Unix.  Nous effectuerons la transition --- je l'espre, sans douleur
  --- en comparant les commandes et les outils disponibles sur ces deux
  systmes.
  ______________________________________________________________________

  Table des matires





















































  1. Introduction

     1.1 Pourquoi Linux ?
     1.2 Commandes et fichiers comparables

  2. Petite introduction

     2.1 Fichiers
     2.2 Rpertoires
     2.3 Programmes
     2.4 Visite guide

  3. diter des fichiers

  4. TeXer

  5. Programmer

     5.1 Fortran
     5.2 Utiliser
     5.3 Scripts
     5.4 C

  6. Graphiques

  7. Mail et outils pour Internet

  8. Sujets avancs

     8.1 Droits et proprit
     8.2 Multitche : processus et tches (
     8.3 Fichiers, deuxime
     8.4 Files d'impression

  9. Configurer

  10. Programmes utiles

     10.1 Visionneur de fichiers :
     10.2 Numros de version sous Linux
     10.3 Archiver : tar et gzip

  11. Exemples du monde rel

  12. Astuces dont on ne peut se passer

  13. Lire des bandes VMS depuis Linux

     13.1 Introduction
     13.2 Les bases
     13.3 Quelques dtails
     13.4 Commentaires sur la taille des blocks

  14. La fin

     14.1 Copyright
     14.2 Avertissement


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn




  11..11..  PPoouurrqquuooii LLiinnuuxx ??


  Vous avez entendu dire qu'Unix est difficile et vous tes hsitant 
  la perspective d'abandonner VMS ?  Pas de panique. Linux, l'un des
  meilleurs clones d'Unix, n'est pas plus difficile  utiliser que VMS.
  En fait, je le trouve mme plus facile.  D'ailleurs, la plupart des
  gens trouve Linux beaucoup plus puissant et versatile que VMS
  (videmment les aficionados de VMS ne sont pas de cet avis).

  Linux et VMS sont tous les deux de bons systmes d'exploitation et
  accomplissent essentiellement les mmes taches. Cependant, les outils
  de Linux sont  mon humble avis suprieurs. Leur syntaxe est souvent
  plus concise et ils ont souvent les quelques fonctionnalits de plus
  qui font la diffrence et permettent de gagner du temps (vous
  entendrez souvent que VMS et Unix ont des philosophies diffrentes).
  De plus, Linux est disponible sur les PC alors que ce n'est pas le cas
  de VMS (les derniers PC tant d'ailleurs plus puissants que les VAX).
  Et, cerise sur le gteau, les excellentes performances des nouvelles
  cartes graphiques transforment votre tite bote Linux, grce  X, en
  une puissante station de travail graphique bien souvent plus rapide
  qu'une machine spcialement prvue pour cette tche.

  J'ai plusieurs raisons de croire que la combinaison Pentium/Linux est
  prfrable  celle de VAX/VMS, mais ces prfrences sont strictement
  personnelles et vous ne serez peut-tre pas d'accord. Vous en
  dciderez de vous-mme dans quelques mois.

  Je prends en hypothse que vous tes une tudiant ou un chercheur 
  l'universit et que vous utilisez rgulirement VMS pour les tches
  suivantes :


    crire des papiers avec TeX/LaTeX ;

    programmer en Fortran ;

    faire des graphiques ;

    utiliser Internet ;

    etc.

  Dans la section suivante je vais vous expliquer comment faire ces
  tches sous Linux en utilisant votre exprience de VMS. Mais avant
  tout vrifiez que :


    Linux et le _S_y_s_t__m_e _X _W_i_n_d_o_w sont correctement installs ;

    vous avez un administrateur systme pour s'occuper des dtails
     techniques (s'il-vous-plat, demandez de l'aide  eux, pas  moi
     :-) ;

    votre _s_h_e_l_l --- l'quivalent de DCL --- est bash (demandez  votre
     administrateur).

  Notez que ce HOWTO n'est pas suffisant pour faire de vous un linuxien
  pur et dur : il contient seulement le strict ncessaire pour vous
  permettre de commencer. Vous devriez en apprendre plus sur Linux pour
  pouvoir en tirer le maximum (fonctionnalits avances de bash,
  programmation, expressions rgulires, etc.).

  Les documents du _L_i_n_u_x _D_o_c_u_m_e_n_t_a_t_i_o_n _P_r_o_j_e_c_t (projet de documentation
  de Linux), disponibles sur metalab.unc.edu:/pub/Linux/docs/LDP, sont
  une importante source d'informations.
  NDT : je vous suggre galement de lire le _G_u_i_d_e _d_u _r_o_o_t_a_r_d d'ric
  Dumas et plus gnralement tout ce que l'on peut trouver sur
  http://www.freenix.fr/linux et http://www.traduc.org.

  Et maintenant, c'est parti !


  11..22..  CCoommmmaannddeess eett ffiicchhiieerrss ccoommppaarraabblleess


  Ce tableau compare les commandes les plus utilises sous VMS et Linux.
  Gardez  l'esprit que leur syntaxe est souvent trs diffrente ; pour
  plus de dtails allez faire un tour dans les sections suivantes.





















































  VMS                           Linux                   Notes
  -------------------------------------------------------------------------------
  @COMMAND                      command                    (doit tre excutable)
  COPY fichier1 fichier2        cp fichier1 fichier2
  CREATE/DIR [.rpertoire]      mkdir rpertoire           (seulement un par un)
  CREATE/DIR [.rp1.rp2]       mkdirhier rp/rp
  DELETE fichier                rm fichier
  DIFF fichier1 fichier2        diff -c fichier1 fichier2
  DIRECTORY                     ls
  DIRECTORY [...]fichier        find . -name fichier
  DIRECTORY/FULL                ls -al
  EDIT fichier                  vi fichier,            (vous n'allez pas l'aimer)
                                emacs fichier,                   (compatible EDT)
                                jed fichier                (idem --- mon prfr)
  FORTRAN prog.for              g77 prog.f,        (pas besoin de lier avec LINK)
                                f77 prog.f,
                                fort77 prog.f
  HELP commande                 man commande     (la commande doit tre prcise)
                                info commande
  LATEX fichier.tex             latex fichier.tex
  LOGIN.COM                     .bash_profile,                    (fichier cach)
                                .bashrc                                    (idem)
  LOGOUT.COM                    .bash_logout                               (idem)
  MAIL                          mail,                                (un peu cru)
                                elm,                             (beaucoup mieux)
                                pine                            (encore meilleur)
  PRINT fichier.ps              lpr fichier.ps
  PRINT/QUEUE=laser fichier.ps  lpr -Plaser fichier.ps
  PHONE utilisateur             talk utilisateur
  RENAME fichier1 fichier2      mv fichier1 fichier2      (ne marche pas avec des
                                                              fichiers multiples)
  RUN progname                  programme
  SEARCH fichier "motif"        grep motif fichier
  SET DEFAULT [-]               cd ..
  SET DEFAULT [.rp.rp]        cd rp/rp
  SET HOST machine              telnet machine,            (pas exactement pareil)
                                rlogin machine
  SET FILE/OWNER_UIC=paul       chown paul fichier        (compltement diffrent)
  SET NOBROADCAST               mesg
  SET PASSWORD                  passwd
  SET PROT=(perm) fichier       chmod perm fichier       (compltement diffrent)
  SET TERMINAL                  export TERM=          (la syntaxe est diffrente)
  SHOW DEFAULT                  pwd
  SHOW DEVICE                   du, df
  SHOW ENTRY                    lpq
  SHOW PROCESS                  ps -ax
  SHOW QUEUE                    lpq
  SHOW SYSTEM                   top
  SHOW TIME                     date
  SHOW USERS                    w
  STOP                          kill
  STOP/QUEUE                    kill,                        (pour les processus)
                                lprm                   (pour supprimer un travail
                                                         de la file d'impression)
  SUBMIT commande               commande &
  SUBMIT/AFTER=dure commande   at dure commande
  TEX fichier.tex               tex fichier.tex
  TYPE/PAGE fichier             more fichier
                                less fichier                     (beaucoup mieux)




  Bien sr, les diffrences des deux systmes ne se limitent pas aux
  noms des commandes. Continuez donc  lire.

  22..  PPeettiittee iinnttrroodduuccttiioonn


  Voila ce que vous devez absolument savoir avant de vous loguer pour la
  premire fois. Dtendez-vous, il y a relativement peu de chose.


  22..11..  FFiicchhiieerrss



    Les noms des fichiers sous VMS on la forme
     fichier.extension.version.  Sous Linux, le numro de version
     n'existe pas (c'est une grosse limitation mais on peut la compenser
     par d'astucieux moyens : jetez un oeil  la section ``Numros de
     version sous Linux'') ; les noms des fichiers sont normalement
     limits  255 caractres et peuvent contenir autant de points que
     vous le dsirez. Par exemple, C_est.un.FICHIER.txt est un nom de
     fichier valide.

    Linux fait la distinction entre les majuscules et les minuscules.
     Ainsi, FICHIER.txt et fichier.txt sont deux fichiers diffrents et
     ls est une commande alors que LS n'en est pas une.

    Un fichier dont le nom commence par un point est un fichier cach
     (ce qui veut dire qu'il ne sera normalement pas affich quand on
     listera les fichiers du rpertoire) alors qu'un fichier dont le nom
     finit par un tilde ( ~ ) reprsente une sauvegarde de fichier (ou
     _b_a_c_k_u_p).

  Maintenant, voici un tableau prsentant les correspondances entre les
  commandes de VMS et celle de Linux en ce qui concerne la gestion des
  fichiers.




       VMS                                     Linux
       ---------------------------------------------------------------------

       $ COPY fichier1.txt; fichier2.txt;      $ cp fichier1.txt fichier2.txt
       $ COPY [.rp]fichier.txt;1 []           $ cp rp/fichier.txt .
       $ COPY [.rp]fichier.txt;1 [-]          $ cp rp/fichier.txt ..
       $ DELETE *.dat.*                        $ rm *dat
       $ DIFF fichier1 fichier2                $ diff -c fichier1 fichier2
       $ PRINT fichier                         $ lpr fichier
       $ PRINT/queue=imprimante fichier        $ lpr -Pimprimante fichier
       $ SEARCH *.tex.* "gologie"             $ grep gologie *tex




  Regardez en plus loin dans le document pour avoir d'autres exemples.
  Si vous voulez vous attaquer aux notions de droits, de propritaires
  et aux sujets avancs, reportez vous  la section ``Sujets avancs''.


  22..22..  RRppeerrttooiirreess



    Les noms des rpertoires sous VMS sont de la forme
     [pre.rp.sousrp]. L'quivalent sous Linux est :
     /pre/rp/sousrp/.  Le pre de tous les rpertoires est le
     rpertoire racine appel / ; il contient d'autres rpertoires comme
     /bin, /usr, /tmp, /etc, et bien d'autres.
    Le rpertoire /home contient les rpertoires _h_o_m_e (NDT :  home 
     signifie  maison ) des utilisateurs : par exemple, /home/pierre,
     /home/paul et ainsi de suite. Quand un utilisateur se logue, il
     commence dans son rpertoire _h_o_m_e ;  c'est l'quivalent de
     SYS$LOGIN. Il y a un raccourci pour le rpertoire _h_o_m_e : le tilde
     ( ~ ). Ainsi, cd ~/tmp est quivalent , disons, cd
     /home/paul/tmp.

    Les noms des rpertoires sont soumis aux mmes rgles que ceux des
     fichiers. En plus de cela, chaque rpertoire a deux entres
     spciales : l'une est . : elle reprsente le rpertoire lui-mme
     (comme []) ; l'autre, .., reprsente le rpertoire parent (comme
     [-]).

  Et maintenant quelques autres exemples :




       VMS                                     Linux
       ---------------------------------------------------------------------

       $ CREATE/DIR [.rpertoire]              $ mkdir rpertoire
       $ CREATE/DIR [.dir1.dir2.dir3]          $ mkdirhier rp1/rp2/rp3
          non/disponible                       $ rmdir rpertoire
                                               (si le rpertoire est vide)
                                               $ rm -R rpertoire
       $ DIRECTORY                             $ ls
       $ DIRECTORY [...]fichier.*.*            $ find . -name "fichier*"
       $ SET DEF SYS$LOGIN                     $ cd
       $ SET DEF [-]                           $ cd ..
       $ SET DEF [pre.rp.sousrp]            $ cd /pre/rp/sousrp
       $ SET DEF [.rp.sousrp]                $ cd rp/sousrp
       $ SHOW DEF                              $ pwd




  Si vous voulez en savoir plus sur les droits, les propritaires, ou
  tout simplement en savoir plus tout court, sautez  la section
  ``Sujets avancs''.


  22..33..  PPrrooggrraammmmeess



    Les commandes, les programmes compils et les scripts _s_h_e_l_l
     (quivalent des fichiers de commandes de VMS) n'ont pas forcment
     une extension comme .EXE or .COM et peuvent s'appeler comme bon
     vous semble. Les fichiers excutables sont marqus d'un astrisque
     ( * ) lorsque vous excutez ls -F.

    Pour lancer un fichier excutable, il suffit de taper son nom (pas
     de RUN, ni de PROGRAM.EXE, ni encore de @COMMAND). Il est donc
     ncessaire que le fichier soit situ dans un rpertoire du _p_a_t_h,
     qui est une liste de rpertoires. En gnral, le _p_a_t_h contient des
     rpertoires comme /bin, /usr/bin, /usr/X11R6/bin, etc. Si vous
     crivez vos propres programmes, placez-les dans un rpertoire de
     votre _p_a_t_h (pour savoir comment, reportez-vous  la section
     ``Configurer''). Vous pouvez aussi lancer un programme en indiquant
     son chemin complet, par exemple /home/paul/donnes/monprog ou
     ./monprog si le rpertoire courant n'est pas dans le _p_a_t_h.

    Les options des commandes sont passes sur la ligne de commande
     grce  OPTION= sous VMS et grce  -_u_n_e___o_p_t_i_o_n ou --_u_n_e___o_p_t_i_o_n
     sous Linux, _u_n_e___o_p_t_i_o_n tant une lettre, diffrentes lettres
     combines ou un mot. En particulier, l'option -R (rcursif) de
     plusieurs commandes de Linux permet de faire la mme chose que le
     [...] de VMS.

    Vous pouvez lancer plusieurs commandes sur la ligne de commande :



       $ commande1 ; commande2 ; ... ; commande





    Toute la flexibilit de Linux repose sur deux fonctionnalits
     (l'une n'existe pas sous VMS, l'autre est mal implmente) : la
     redirection des entrs/sorties et les _p_i_p_e_s. (Pour tre sincre,
     j'ai entendu que les versions rcentes de IDL supportent la
     redirection et les _p_i_p_e_s mais je n'ai pas ces versions.) La
     redirection sous VMS n'est qu'un effet de bord (souvenez vous de
     l'option /OUTPUT=) ou une tche fastidieuse comme



       $ DEFINE /USER SYS$OUTPUT OUT
       $ DEFINE /USER SYS$INPUT IN
       $ RUN PROG





  dont l'quivalent sous Linux (Unix) est simplement :



       $ prog < in > out





  Utiliser des _p_i_p_e_s est tout simplement impossible sous VMS mais ils
  jouent un rle cl sous Unix. En voici un exemple typique :



       $ monprog < donnes | filtre1 | filtre2 >> rsultat.dat 2> erreurs.log &





  Traduisons. Le programme monprog utilise le fichier donnes comme
  entre, sa sortie est canalise (grce  |) vers le programme filtre1
  qui l'utilise en tant qu'entre et la traite. La sortie rsultante est
  canalise (_p_i_p__e) vers filtre2 pour tre encore une fois traite.  La
  sortie finale est ajoute (grce  >>) au fichier rsultat.dat, et les
  messages d'erreurs sont redirigs (grce  2>) vers le fichier
  errors.log.  Tout ceci est excut en arrire-plan (grce au &  la
  fin de la ligne de commande). Pour en savoir plus  ce sujet,
  reportez-vous  la section ``Exemples''.



  Pour le multitche, les files, et tout ce qui s'y rapporte, reportez-
  vous  la section ``Sujets avancs''.


  22..44..  VViissiittee gguuiiddee


  Maintenant vous tes prt pour essayer Linux. Entrez votre identifiant
  et votre mot de passe. Attention, Unix distingue les minuscules des
  majuscules. Ainsi, si votre login et votre mot de passe sont pierre et
  Mon_Code, ne tapez _p_a_s Pierre ou mon_code.

  Une fois que vous tes logu, le prompt s'affiche. Il y a des chances
  pour que se soit quelque chose du genre nom_de_la_machine:$. Si vous
  voulez le changer ou lancer des programmes automatiquement, vous
  devrez diter le fichier cach .profile ou .bash_profile (jetez un
  oeil aux exemples dans la section ``Configurer''). C'est l'quivalent
  de LOGIN.COM.

  Appuyer sur alt + F1, alt + F2, ..., alt + F6 permet de changer de
  console virtuelle. Quand une console virtuelle est occupe avec une
  application plein cran, vous pouvez changer de console et continuer 
  travailler.  Essayez et loguez-vous sur une autre console virtuelle.

  Maintenant, vous voulez peut-tre lancer le _S_y_s_t__m_e _X _W_i_n_d_o_w (que nous
  appellerons maintenant X). X est un environnement graphique similaire
  au DECWindows --- en fait, ce dernier drive de X. Tapez la commande
  startx et attendez quelques secondes ; vous verrez probablement
  s'ouvrir un xterm ou un autre mulateur de terminal, et peut-tre une
  barre de boutons (cela dpend de la manire dont votre administrateur
  systme a configur votre machine Linux). Cliquez sur le menu (essayez
  les deux boutons de la souris) pour voir les menus.

  Quand vous utilisez X, vous devez appuyez sur ctrl + alt + F1, ...,
  ctrl + alt + F6 pour accder au mode texte (console). Essayez. Quand
  vous tes dans une console, vous pouvez revenir  X en appuyant sur
  alt + F7. Pour quitter X, suivez les instructions de votre menu ou
  appuyez sur ctrl + alt + backspace.

  Tapez la commande suivante pour obtenir une liste du contenu du
  rpertoire courant (incluant les fichiers cachs) :



       $ ls -al




  Appuyez sur shift + page up pour faire dfiler l'cran vers le haut.
  Maintenant, pour obtenir de l'aide sur la commande ls tapez



       $ man ls




  Appuyez sur q pour quitter. Pour finir notre tour d'horizon, tapez
  exit pour quitter votre session. Si maintenant vous voulez teindre
  votre PC, appuyez sur ctrl + alt + suppr et attendez quelques secondes
  (n'teignez _j_a_m_a_i_s votre PC tant que Linux tourne ; cela peut causer
  des dommages dans le systme de fichier).


  Si vous pensez que vous tes prt pour travailler, allez-y. Mais si
  j'tais vous, je passerais d'abord par la section ``Sujets avancs''.


  33..  ddiitteerr ddeess ffiicchhiieerrss


  EDT ne tourne pas sous Linux, mais il y a beaucoup d'autres diteurs
  disponibles. Le seul qui soit sr d'tre prsent sur tout systme Unix
  est vi --- oubliez-le, votre administrateur en a srement install un
  meilleur. L'diteur le plus populaire est probablement emacs, qui peut
  muler EDT jusqu' un certain degr ; jed est un autre diteur qui
  permet l'mulation de EDT.

  Ces deux diteurs sont particulirement utiles pour diter des sources
  de programmes puisque qu'ils ont deux fonctionnalits inconnue de
  EDT : la coloration syntaxique et l'indentation automatique. De plus,
  vous pouvez compilez vos programmes  partir de l'diteur (grce  M-x
  compile sous emacs --- pour comprendre la notation  M-x compile 
  lisez la suite ; en cas d'erreur de  syntaxe, le curseur se
  positionnera tout seul sur la ligne en question. Je parie que vous ne
  voudrez plus jamais utiliser EDT aprs.

  Si vous avez emacs, lancez-le. Tout d'abord vous devez comprendre le
  systme de notation de combinaison de touche d'emacs. C dsigne
  contrle et M la touche mta (en gnral alt ou chap).  Maintenant,
  tapez M-x edt-emultation-on. M-x permet de lancer des commandes avec
  emacs comme ctrl + z avec EDT.  partir de maintenant, emacs fait
  comme s'il tait EDT  part pour quelques commandes :


    n'appuyez _p_a_s sur ctrl + z pour lancer une commande. Si vous l'avez
     fait, vous avez stopp emacs. Tapez fg pour reprendre votre session
     emacs ;

    appuyez sur C-h ? pour obtenir de l'aide ou sur C-h t pour lancer
     un tutoriel ;

    pour sauver un fichier, appuyez sur C-x C-s ;

    pour quittez, appuyez sur C-x C-c ;

    pour insrez un nouveau fichier dans un buffer (pour ouvrir un
     fichier, en gros), appuyez sur C-x C-f, et ensuite C-x b pour
     changer de buffer.

  Si vous avez jed, demandez  votre administrateur de le configurer
  comme il faut. L'mulation est active ds que vous le lancez. Utilisez
  les mme touches que sur EDT et appuyez sur chap ? h pour obtenir
  l'aide. Les commandes sont lances de la mme manire que dans emacs.
  De plus, il y a quelques raccourcis pratiques faisant dfaut  EDT ;
  vous pouvez en plus configurer ces raccourcis clavier. Demandez 
  votre administrateur.

  Vous pouvez aussi utilisez un autre diteur avec une interface
  compltement diffrente. emacs en mode natif est un choix courant. Un
  autre diteur populaire est joe qui peut muler d'autres diteurs
  comme emacs lui-mme (en tant mme plus facile  utiliser) ou
  l'diteur DOS. Lancez l'diteur sous le nom jmacs ou jstar et appuyez
  respectivement sur ctrl + x h ou ctrl + j pour obtenir l'aide en
  ligne. emacs et jed sont _b_e_a_u_c_o_u_p plus puissants que ce bon vieux EDT.





  44..  TTeeXXeerr


  TeX et LaTeX sont identiques  leurs homologues de VMS --- seulement
  plus rapides :-), mais les outils pour manipuler les fichiers .dvi
  et .ps sont bien suprieurs :


    Pour compiler un fichier TeX faites comme d'habitude tex file.tex.

    Pour convertir un fichier .dvi en .ps, tapez dvips -o fichier.ps
     fichier.dvi.

    Pour visualiser un fichier .dvi, tapez lors d'une session X xdvi
     fichier.dvi &. Cliquez sur la page pour zoomer. Ce programme est
     intelligent : si vous ditez et lancez TeX pour produire une
     nouvelle version de votre fichier .dvi, xdvi actualisera
     l'affichage.

    Pour visualiser un fichier .ps, taper lors d'une session X
     ghostview fichier.ps &. Cliquez sur la page pour zoomer. Le
     document entier ou des pages slectionns peuvent tre imprims. Un
     programme plus rcent et meilleur permet galement de faire a :
     gv ;

    Pour imprimer un fichier .ps on utilise gnralement la commande
     lpr fichier.ps. Cependant si l'imprimante postscript s'appelle, par
     exemple,  ps  (demandez  votre administrateur systme), il
     faudra faire lrp -Pps fichier.ps. Pour plus d'informations au sujet
     des files d'impressions, allez  la section ``Files
     d'impressions''.


  55..  PPrrooggrraammmmeerr


  Programmer sous Linux est _b_e_a_u_c_o_u_p plus agrable : il existe un grand
  nombre d'outils qui rendent la programmation plus facile et plus
  rapide. Par exemple, la torture qu'est le cycle dition, sauvegarde,
  sortie de l'diteur, compilation, rdition, etc. peut tre raccourci
  en utilisant des diteurs comme emacs ou jed, comme nous l'avons vu au
  dessus.


  55..11..  FFoorrttrraann


  Il n'y a pas de relle diffrence pour le fortran, mais sachez qu'au
  moment o j'cris ces lignes, les compilateurs (libres) ne sont pas
  totalement compatibles avec ceux de VMS ; attendez-vous  quelques
  problmes mineurs (en fait, le compilateur de VMS utilise des
  extensions qui ne sont pas standard). Jetez un oeil  /usr/doc/g77/DOC
  ou /usr/doc/f2c/d2c.ps pour plus de dtails.

  Votre administrateur a sans doute install soit le compilateur natif
  g77 (bien, mais, au jour de la version 0.5.21, toujours pas
  parfaitement compatible avec le Fortran de DEC), soit le traducteur de
  Fortran en C, f2c, et un des ses front-ends qui font de lui une
  imitation de compilateur natif. D'aprs mon exprience, le paquetage
  yaf77 est celui qui donne les meilleurs rsultats.

  Pour compiler un source en Fortran avec g77, ditez le et sauvez le
  avec l'extension .f, et faites



  $ g77 monprog.f




  Cela va crer par dfaut un excutable appel a.out (vous n'avez pas 
  effectuer les liens). Pour donner  l'excutable un nom diffrent et
  faire quelques optimisations :



       $ g77 -O2 -o monprog monprog.f




  Mfiez-vous des optimisations ! Demandez  votre administrateur
  systme de lire la documentation fournie avec le compilateur et de
  vous dire s'il y a des problmes.

  Pour compiler une sous-routine :



       $ g77 -c masub.f




  Un fichier masub.o sera cr. Pour lier cette sous-routine  un
  programme, vous devrez faire



       $ g77 -o monprog monprog.f masub.o




  Si vous avez plusieurs sous-routines externes et que vous voulez crer
  une bibliothque, faites



       $ cd sousroutines/
       $ cat *f > mabib.f ; g77 -c mabib.f




  Le fichier mabib.o cr pourra alors tre li  vos programmes.

  Pour finir, pour lier une bibliothque externe appele, disons,
  liblambda.so , utilisez



       $ g77 -o monprog monprog.f -llambda




  Si vous avez f2c, vous n'aurez qu' utiliser f77 ou fort77  la place
  de g77.


  Un autre outil de programmation utile est make. Il est dcrit ci-
  dessous.


  55..22..  UUttiilliisseerr mmaakkee


  make est un outil pour grer la compilation de programmes diviss en
  plusieurs fichiers sources.

  Supposons que vous ayez des fichiers sources contenant vos routines
  appels fichier_1.f, fichier_2.f et fichier_3.f, et un fichier source
  principal qui utilise ces routines appel monprog.f. Si vous compilez
  votre programme  la main, quand vous modifierez un fichier source
  vous allez devoir chercher quel fichier dpend de quel fichier, et les
  recompiler en tenant compte des dpendances.

  Plutt que de devenir fou, je vous propose d'crire un _m_a_k_e_f_i_l_e. C'est
  un fichier texte qui contient les dpendances entre les sources :
  quand un source est modifi, seuls les sources qui dpendent du
  fichier modifi seront recompiles.

  Dans notre cas, le _m_a_k_e_f_i_l_e ressemblerait  ceci :


  ______________________________________________________________________

  # Voici le Makefile
  # Attention : appuyez sur la touche tabulation quand  <TAB> 
  # est crit ! C'est trs important : n'utilisez pas d'espace  la place.

  monprog: monprog.o fichier_1.o fichier_2.o fichier_3.o
  <TAB>g77 -o monprog monprog.o fichier_1.o fichier_2.o fichier_3.o
  # monprog dpend de quatre fichiers objets

  monprog.o: monprog.f
  <TAB>g77 -c monprog.f
  # monprog.o dpend de son fichier source

  fichier_1.o: fichier_1.f
  <TAB>g77 -c fichier_1.f
  # fichier_1.o dpend de son fichier source

  fichier_2.o: fichier_2.f fichier_1.o
  <TAB>g77 -c fichier_2.f fichier_1.o
  # fichier_2.o dpend de son fichier source et d'un fichier objet

  fichier_3.o: fichier_3.f fichier_2.o
  <TAB>g77 -c fichier_3.f fichier_2.o
  # fichier_3.o dpend de son fichier source et d'un fichier objet

  # fin du Makefile
  ______________________________________________________________________



  Enregistrez ce fichier sous le nom Makefile et tapez make pour
  compiler votre programme. Vous pouvez aussi l'appeler monprog.mak et
  taper make -f monprog.mak. Et bien sr, si vous voulez en savoir
  plus : info make.


  55..33..  SSccrriippttss sshheellll



  Les scripts _s_h_e_l_l sont les quivalents des fichiers de commandes de
  VMS et, pour changer, sont beaucoup plus puissants.

  Pour crire un script, tout ce que vous avez  faire est d'crire un
  fichier au format ASCII contenant les commandes, l'enregistrer et le
  rendre excutable (chmod +x fichier). Pour le lancer, tapez son nom
  (prcd de ./ s'il n'est pas dans le _p_a_t_h).

  crire des scripts avec bash est un sujet tellement vaste qu'il
  ncessiterait un livre entier, et je ne ne vais pas m'attarder sur le
  sujet. Je vais juste vous donner un exemple plus ou moins
  comprhensible et, je l'espre, utile,  partir duquel vous pourrez
  comprendre quelques rgles de base.


  ______________________________________________________________________
  #!/bin/sh
  # exemple.sh
  # Je suis un commentaire.
  # Ne modifiez pas la premire ligne, elle doit tre prsente.
  echo "Ce systme est : `uname -a`" # utilise la sortie de la commande
  echo "Mon nom est $0" # variable interne
  echo "Vous m'avez donn les $# paramtres suivants : "$*
  echo "Le premier paramtre est : "$1
  echo -n "Quel est votre nom ? " ; read votre_name
  echo remarquez la diffrence : "Salut $votre_name" # cit avec "
  echo remarquez la diffrence : 'Salut $votre_name' # cit avec '
  REPS=0 ; FICHIERS=0
  for fichier in `ls .` ; do
    if [ -d ${fichier} ] ; then # si le fichier est un rpertoire
      REPS=`expr $REPS + 1`  # REPS = REPS + 1
    elif [ -f ${fichier} ] ; then
      FICHIER=`expr $FICHIER + 1`
    fi
    case ${fichier} in
      *.gif|*jpg) echo "${fichier}: fichier graphique" ;;
      *.txt|*.tex) echo "${fichier}: fichier texte" ;;
      *.c|*.f|*.for) echo "${fichier}: fichier source" ;;
      *) echo "${fichier}: fichier quelconque" ;;
    esac
  done
  echo "Il y a ${REPS} rpertoires et ${FICHIERS} fichiers"
  ls | grep "ZxY--!!!WKW"
  if [ $? != 0 ] ; then # valeur de sortie de la dernire commande
    echo "ZxY--!!!WKW n'a pas t trouv"
  fi
  echo "a suffit... tapez 'man bash' si vous voulez plus d'informations."
  echo "Note du traducteur : 'info bash' est plus complet."
  ______________________________________________________________________




  55..44..  CC


  Linux est un excellent environnement pour la programmation en C. Si
  vous connaissez le C, voici quelques conseils pour vous dbrouiller
  sous Linux. Pour compiler le clbre hello.c vous utiliserez le
  compilateur gcc, qui est standard dans le monde de Linux et qui a la
  mme syntaxe que g77 :



       $ gcc -O2 -o hello hello.c

  Pour lier une bibliothque  un programme, ajoutez l'option
  -lbibliothque.  Par exemple pour lier la bibliothque math et
  optimiser faites



       $ gcc -O2 -o mathprog mathprog.c -lm




  (L'option -lbibliothque force gcc  lier la bibliothque
  /usr/lib/libbibliothque.a ; ainsi -lm lie /usr/lib/libm.a.)

  Quand votre programme est divis en plusieurs fichiers sources, vous
  aurez besoin du programme make dcrit juste au dessus.

  Vous pouvez obtenir de l'aide sur quelques fonctions de la libc dans
  la section 3 des pages man. Par exemple :



       $ man 3 printf




  Il existe beaucoup de bibliothques disponible. Parmi les premires
  que vous voudrez probablement utiliser, il y a ncurses, qui permet de
  grer quelques effets du mode texte et svgalib pour faire du
  graphisme.


  66..  GGrraapphhiiqquueess


  Parmi la masse de paquetages de graphiques disponibles, gnuplot sort
  du lot pour sa puissance et sa facilit d'utilisation. Crez tout
  d'abord deux fichiers de donnes : 2D-data.dat (deux donnes par
  ligne) et 3D-data.dat (trois par ligne). Puis, sous X, lancez gnuplot.

  Exemple d'un graphe en 2D :



       gnuplot> set title "mon premier graphe"
       gnuplot> plot '2D-data.dat'
       gnuplot> plot '2D-data.dat' with linespoints
       gnuplot> plot '2D-data.dat', sin(x)
       gnuplot> plot [-5:10] '2D-data.dat'




  Exemple d'un graphe en 3D (chaque  ligne  de _x valeurs est suivie
  d'une ligne vide) :



       gnuplot> set parametric ; set hidden3d ; set contour
       gnuplot> splot '3D-data.dat' using 1:2:3 with linespoints





  Un fichier de donnes d'une seule colonne (une srie de temps par
  exemple) peut aussi tre dessin comme un graphe en 2D :



       gnuplot> plot [-5:15] '2D-data-1col.dat' with linespoints




  ou en 3D (avec des lignes vides dans le fichier comme au dessus) :



       gnuplot> set noparametric ; set hidden3d
       gnuplot> splot '3D-data-1col.dat' using 1 with linespoints




  Pour imprimez un graphe, si la commande pour imprimer sur votre
  imprimante postscript est lpr -Pps fichier.ps, faites



       gnuplot> set term post
       gnuplot> set out '| lpr -Pps'
       gnuplot> replot




  Tapez ensuite set term x11 pour rafficher sur votre serveur X. Ne
  soyez pas dconcert : la dernire impression se lancera seulement
  quand vous quitterez gnuplot.

  Pour plus d'informations, tapez help ou regardez le rpertoire des
  exemples (/usr/lib/gnuplot/demos/) s'il existe.


  77..  MMaaiill eett oouuttiillss ppoouurr IInntteerrnneett


  Du fait qu'Internet est n sur des machines Unix, on trouve plein
  d'applications de qualit et facile d'utilisation sous Linux. En voici
  quelques-unes :


    Mail : utilisez elm ou pine (NDT : mutt est trs bien aussi) pour
     grer votre courrier. Ces deux programmes ont une aide en ligne.
     Pour des messages courts, vous pouvez utilisez mail (mail -s
     "Salut" utilisateur@quelquepart < msg.txt). Vous prfrez peut-tre
     d'autres programmes comme xmail ou quivalent.

    Newsgroups : utilisez tin ou slrn. Ils sont tous les deux trs
     intuitifs.

    FTP : en plus de l'invitable ftp, demandez  votre administrateur
     d'installer l'excellent ncftp ou un mme un client graphique comme
     xftp.

    WWW : netscape, xmosaic, chimera et arena sont des browsers
     graphiques ; lynx quant  lui utilise la console et est rapide et
     pratique.


  88..  SSuujjeettss aavvaannccss


  L, le jeu devient coriace. Apprenez a, et ensuite vous pourrez dire
  que vous  connaissez quelque chose  Linux  ;-)


  88..11..  DDrrooiittss eett pprroopprriitt


  Les fichiers et les rpertoires ont des droits et des propritaires,
  comme sous VMS. Si nous ne pouvez pas lancer un programme, ne pouvez
  pas modifier un fichier ou ne pouvez pas accder  un rpertoire,
  c'est parce vous n'avez pas les droits adquats pour le faire et/ou
  parce que le fichier ne vous appartient pas. Regardez l'exemple
  suivant :



       $ ls -l /bin/ls
       -rwxr-xr-x   1 root     bin         27281 Aug 15  1995 /bin/ls*




  Le premier champ indique les droits du fichier ls. Il y a trois types
  de proprit : le propritaire, le groupe et les autres (comme le
  propritaire, le groupe et le reste du monde sous VMS) et trois
  droits : lecture, criture et excution.

  De gauche  droite, - est le type du fichier  (- dsigne un fichier
  ordinaire, d un rpertoire, l un lien, etc.) ; rwx sont les droits du
  propritaire (lecture, criture, excution) ;  r-x sont les droits du
  groupe du propritaire (lecture, excution) ; r-x sont les droits pour
  tous les autres utilisateurs (lecture, criture).

  Pour changer les droits d'un fichier :



       $ chmod <quiXdroit> <fichier>




  Avec _q_u_i reprsentant u (ce sont alors les droits du propritaire qui
  sont affects), g (ceux du groupe) ou o (ceux des  autres ). X est
  soit + (dans ce cas il donne les droits), soit - (il les enlve). Et
  _d_r_o_i_t est r, w ou x. Voici un exemple :



       $ chmod u+x fichier




  Cela permet de rendre le fichier excutable pour le propritaire. Il
  existe un petit raccourci chmod +x fichier.



       $ chmod go-wx fichier



  L, on enlve les droits d'criture et d'excution au groupe et aux
  autres (donc  tout le monde sauf au propritaire).



       $ chmod ugo+rwx fichier




  Tous les droits sont donns  tout le monde.

  Une manire plus courte de prciser les droits se base sur les
  nombres : rwxr-xr-x peut tre exprim par 755 (chaque lettre
  correspond  un bit : --- vaut 0, --x 1, -w- 2, etc).

  Pour un rpertoire, rx signifie que vous pouvez vous placer dans ce
  rpertoire et w que vous pouvez effacer un fichier dans ce rpertoire
  (en tenant compte des droits du fichier videmment) ou le rpertoire
  lui-mme. Tout a n'est qu'une petit partie du sujet : man est votre
  ami.

  Pour changer le propritaire d'un fichier :



       $ chown <utilisateur> <fichier>




  Pour rsumer, voici un tableau :



       VMS                             Linux
       ------------------------------------------------------------------------------

       SET PROT=(O:RW) fichier.txt     $ chmod u+rw fichier.txt
                                       $ chmod 600 fichier.txt
       SET PROT=(O:RWED,W) fichier     $ chmod u+rwx fichier
                                       $ chmod 700 fichier
       SET PROT=(O:RWED,W:RE) fichier  $ chmod 755 fichier
       SET PROT=(O:RW,G:RW,W) fichier  $ chmod 660 fichier
       SET FILE/OWNER_UIC=JOE fichier  $ chown joe fichier
       SET DIR/OWNER_UIC=JOE [.dir]    $ chown joe rep/






  88..22..  MMuullttiittcchhee :: pprroocceessssuuss eett ttcchheess (( jjoobbss ))


  En voici plus  propos de la manire de lancer les programmes. Il n'y
  a pas de file d'attente sous Linux ; le multitche est gr trs
  diffremment. Voici  quoi ressemble une ligne de commande typique :



       $ commande -s1 -s2 ... -sn par1 par2 ... parn < entre > sortie &




  Maintenant, voyons comment marche le multitche. Les programmes qui
  tournent en avant-plan (_f_o_r_e_g_r_o_u_n_d) ou arrire-plan (_b_a_c_k_g_r_o_u_n_d) sont
  appels des processus.


    Pour lancer un processus en arrire plan :



       $ programme [option] [< entre] [> sortie] &
       [1] 234





  Le shell vous donne le numro de _j_o_b (le premier nombre ; regardez ci-
  dessus) et le PID (le numro du processus). Chaque processus est iden
  tifi par son PID.

  Pour voir combien de processus sont lancs :



       $ ps -ax





  La liste des processus actifs va tre affiche.

    Pour tuer un processus :



       $ kill <PID>





  Vous aurez peut-tre besoin de tuer un processus quand vous ne savez
  pas le quitter de la bonne manire... ;-) Parfois, une processus sera
  seulement tu par une des commandes suivantes :



       $ kill -15 <PID>
       $ kill -9 <PID>





  En plus de a, le shell vous permet de stopper ou de suspendre
  temporairement un processus, envoyer un processus en arrire-plan ou
  en ramener un en avant-plan. Dans ce contexte, les processus sont
  appeles jobs.


    Pour voir combien de _j_o_b_s sont actifs :




  $ jobs





  Les _j_o_b_s sont identifs par le nombre que le shell leur donne et non
  pas par leur PID.

    Pour stopper un processus qui tourne en avant-plan appuyez sur
     ctrl + c. (a ne marche pas toujours.)

    Pour suspendre un processus tournant en avant-plan appuyez sur
     ctrl + z (Idem.)

    Pour envoyer un processus suspendu en arrire-plan (qui devient
     alors un _j_o_b) :



       $ bg <job>





    Pour envoyer un _j_o_b en avant-plan :



       $ fg <job>





    Pour tuer un _j_o_b :



       $ kill %<job>






  88..33..  FFiicchhiieerrss,, ddeeuuxxiimmee


  Voici plus d'information sur les fichiers.


    _s_t_d_i_n, _s_t_d_o_u_t et _s_t_d_e_r_r : sous Unix, tous les composants du systme
     sont assimils  des fichiers. Les commandes et les programmes
     puisent leur entre dans un  fichier  appel _s_t_d_i_n (l'entre
     standard : gnralement le clavier), redirigent leur sortie vers un
      fichier  appel _s_t_d_o_u_t (gnralement l'cran) et leurs erreurs
     vers un  fichier  appel _s_t_d_e_r_r (gnralement l'cran).

     En utilisant < et > vous redirigez l'entre et la sortie vers un
     fichier diffrent. De plus, >> ajoute la sortie  un fichier  la
     place de l'craser ; 2> redirige les messages d'erreur (_s_t_d_e_r_r) ;
     2>&1 redirige _s_t_d_e_r_r vers _s_t_d_o_u_t, alors que 1>&2 redirige _s_t_d_o_u_t
     vers _s_t_d_e_r_r. Il y a un  trou noir  appel /dev/null : tout ce qui
     est redirigez vers lui disparat.
    Jokers/ : sur la ligne de commande * correspond  (et dsigne) tous
     les fichiers sauf ceux qui sont cachs ; .* correspond  tous les
     fichiers cachs ; *.* correspond seulement ceux qui ont un  .  au
     milieu de leur nom suivi par d'autres caractres ; l*c correspondra
       loc  et  luc  ; *c* correspondra   piocher  et  picorer
     . % devient ?.  Il existe galement un autre joker : []. Par
     exemple : [abc]* dsigne les fichiers commenant par a, b ou c ;
     *[I-N123] dsigne les fichier finissant par I, J, K, L, M, N, 1, 2
     ou 3.

    mv (RENAME) ne permet pas de renommer plusieurs fichiers d'un coup.
     Ainsi, mv *.xxx *.yyy ne marchera pas.

    Utilisez cp -i et mv -i pour tre prvenu quand un fichier va tre
     cras.


  88..44..  FFiilleess dd''iimmpprreessssiioonn


  Vos fichiers  imprimer sont placs dans une file comme sous VMS.
  Quand vous lancez une commande d'impression, vous aurez peut-tre 
  prciser le nom de l'imprimante. Par exemple



       $ lpr fichier.txt # ce fichier est plac dans la file de l'imprimante standard
       $ lpr -Plaser fichier.ps # celui dans celle de l'imprimante  laser 




  Pour grer la file d'impression utilisez les commandes suivantes :



       VMS                                     Linux
       ------------------------------------------------------------------------------

       $ PRINT fichier.ps                      $ lpr fichier.ps
       $ PRINT/QUEUE=laser fichier.ps          $ lpr -Plaser fichier.ps
       $ SHOW QUEUE                            $ lpq
       $ SHOW QUEUE/QUEUE=laser                $ lpq -Plaser
       $ STOP/QUEUE                            $ lprm <numro de job>





  99..  CCoonnffiigguurreerr


  Votre administrateur systme a d vous fournir certains fichier de
  configuration comme .xinitrc, .bash_profile et .inputrc. Ceux que vous
  voudrez peut-tre modifier sont :


    .bash_profile ou .profile : ce fichier est lu par le shell au
     moment du login. C'est l'quivalent de LOGIN.COM.

    .bash_logout : celui-ci est lu en fin de session. C'est
     l'quivalent de LOGOUT.COM.

    .bashrc : il est lu par les shells non interactifs


    .inputrc : ce fichier configure les rles des touches du clavier et
     le comportement du shell.

  Pour vous donner un exemple, j'ai inclus une partie mon
  .bash_profile :


  ______________________________________________________________________
  # $HOME/.bash_profile

  # on ne redfinit pas le path si ce n'est pas ncessaire
  echo $PATH | grep $LOGNAME > /dev/null
  if [ $? != 0 ]
  then
    export PATH="$PATH:/home/$LOGNAME/bin"  # ajoute mon rpertoire au path
  fi

  export PS1='LOGNAME:\w\$ '
  export PS2='Continued...>'

  # alias

  alias bin="cd ~/bin" ; alias cp="cp -i" ; alias d="dir"
  alias del="delete" ; alias dir="/bin/ls $LS_OPTIONS --format=vertical"
  alias ed="jed" ; alias mv='mv -i'
  alias u="cd .." ; alias undel="undelete"

  # Quelques fonctions utiles

  inst() # installe un tarball gzip dans le rpertoire courant
  {
    tar xvfz $1
  }
  cz() # liste le contenu d'une archive .zip
  {
    unzip -l $*
  }
  ctgz() # liste le contenu d'un tarball gzip
  {
    for fichier in $* ; do
      tar tfz ${fichier}
    done
  }
  tgz() # cre une archive .tgz  la zip.
  {
    nom=$1 ; tar cvf $1 ; shift
    tar -rf ${nom} $* ; gzip -S .tgz ${nom}
  }
  ______________________________________________________________________



  Et voici mon .inputrc :













  ______________________________________________________________________
  # $HOME/.inputrc
  #
  # Ce fichier est lu par bash et dfinit les fonctions attachs aux touches
  # par le shell ; ce qui suit permet d'avoir un comportement courant pour
  # les touches <it/fin/, <it/home/ (la touche au dessus de fin), <it/suppr/
  # et les caractres accentus.
  # Pour plus d'information, man readline.

  "\e[1~": beginning-of-line
  "\e[3~": delete-char
  "\e[4~": end-of-line

  set bell-style visible
  set meta-flag On
  set convert-meta Off
  set output-meta On
  set horizontal-scroll-mode On
  set show-all-if-ambiguous On

  # (F1 .. F5) sont "\e[[A" ... "\e[[E"

  "\e[[A": "info "
  ______________________________________________________________________




  1100..  PPrrooggrraammmmeess uuttiilleess



  1100..11..  VViissiioonnnneeuurr ddee ffiicchhiieerrss :: lleessss


  Vous utiliserez un tel programme tous les jours, c'est pourquoi je
  vais vous donner quelques astuces pour l'utiliser au mieux. Avant
  tout, demandez  votre administrateur de configurer less pour qu'il
  puisse afficher non seulement des fichiers textes mais aussi les
  fichiers compresss, les archives, etc.

  Comme les dernires versions de TYPE, less vous permet de vous
  dplacer dans le fichier dans les deux directions. Il accepte aussi
  plusieurs commandes qui sont lances en appuyant sur une touche. Les
  plus utiliss sont :


    tout d'abord, appuyez sur q pour quitter ;

    h pour obtenir l'aide ;

    g pour aller au dbut du fichier, G  la fin, un nombre suivi de g
     pour aller  cette ligne (par exemple 125g), un nombre suivi de %
     pour aller  ce pourcentage du fichier ;

    /motif recherche vers l'avant le motif ; n recherche vers l'avant
     la l'occurrence suivante ; ?pattern et N font la mme chose vers
     l'arrire ;

    m suivi d'une lettre marque la position courante (par exemple ma) ;

    :e ouvre un autre fichier ;

    !commande excute un shell.


  1100..22..  NNuummrrooss ddee vveerrssiioonn ssoouuss LLiinnuuxx


  Hlas, Linux ne supporte toujours pas les numros de version
  nativement.  Cependant, on peut rgler ce problme de deux manires.
  La premire est d'utiliser RCS (Revision Control System) qui vous
  permet de garder la trace des prcdentes versions d'un fichier. RCS
  est trait dans _L_e _m_i_n_i_-_H_o_w_t_o _R_C_S.

  La seconde est d'utiliser un diteur qui sait traiter les numros de
  version.  emacs ou joe feront l'affaire. Pour emacs, ajoutez ces
  lignes dans votre .emacs.


  ______________________________________________________________________
  (setq version-control t)
  (setq kept-new-versions 15) ;;; ou toute autre valeur
  (setq kept-old-versions 15)
  (setq backup-by-copying-when-linked t)
  (setq backup-by-copying-when-mismatch t)
  ______________________________________________________________________



  Pour jed, vrifiez que vous avez une version suprieure  la 0.98.7.
  Le patch pour les numros de version est disponible sur
  http://ibogeo.df.unibo.it/guido/slang/backups.sl


  1100..33..  AArrcchhiivveerr :: ttaarr eett ggzziipp


  Sous Unix il existe quelques applications trs rpandues qui sont
  utiliss pour archiver et compresser des fichiers. tar est utilis
  pour faire des archives (c'est  dire un regroupement de fichiers).
  Pour faire une archive :



       $ tar -cvf <archive.tar> <fichier> [fichier...]




  Pour extraire des fichiers d'une archive :



       $ tar -xpvf <archive.tar> [fichier...]




  Pour lister le contenu d'une archive :



       $ tar -tf <archive.tar> | less




  Les fichiers peuvent tre compresss en utilisant compress ou gzip.
  compress est aujourd'hui obsolte et on n'utilise plus que gzip.


       $ compress <fichier>
       $ gzip <fichier>




  Ceci crera un fichier compress avec l'extension .Z (pour compress)
  ou .gz (pour gzip). Ces programmes ne font pas d'archives mais
  compressent des fichiers individuellement. Pour dcompresser utilisez



       $ compress -d <fichier.Z>
       $ gzip -d <fichier.gz>




  Faites un tour du ct de leurs pages man.

  Les utilitaires unarj, zip et unzip sont aussi disponibles.

  Les fichier avec l'extension .tar.gz ou .tgz (archivs par tar, puis
  compresss par gzip) sont trs communs dans le monde Unix. Voici
  comment lister le contenu d'une telle archive :



       $ tar -ztf <fichier.tar.gz> | less




  Pour extraire les fichiers  partir d'un .tar.gz :



       $ tar -zxf <fichier.tar.gz>





  1111..  EExxeemmpplleess dduu mmoonnddee rreell


  Le principe central d'Unix est qu'il existe plusieurs commandes
  simples qui peuvent tre lies ensemble grce aux _p_i_p_e_s et aux
  redirections pour accomplir des tches plus compliques. Regardez les
  exemples suivants (je n'expliquerai que les plus compliqus ; pour les
  autres, reportez vous aux sections prcdentes ou aux pages man).


    ls est trop rapide et je ne peux pas lire le nom de tous les
     fichiers.



       $ ls | less





    J'ai un fichier qui contient une liste de mots. Je veux les trier
     dans l'ordre inverse et les imprimer.
       $ cat fichier.txt | sort -r | lpr





    Mon fichier de donnes contient des doublons. Comment les effacer ?



       $ sort fichier.dat | uniq > nouveaufichier.dat





    J'ai un fichier appel papier.txt ou papier.tex ou quelques choses
     dans le genre mais je ne m'en rappelle plus. Comment le retrouver ?



       $ find ~ -name "papier*"





  Expliquons. find est une commande trs utile qui liste tous les
  fichier dans une arborescence (qui commence  partir du rpertoire
  _h_o_m_e dans ce cas). Sa sortie peut-tre filtre selon plusieurs
  critres comme par exemple -name.

    J'ai un fichier texte qui contient le mot  entropie  dans ce
     rpertoire. Existe-t-il quelque chose de comparable  SEARCH ?

     Bien sr, essayez cela :



       $ grep -l 'entropie' *





    Quelque part, j'ai un fichier texte qui contient le mot  entropy 
     et j'aimerai le retrouver. Sous VMS j'aurais utilis search entropy
     [...]*.*.*, mais grep n'est pas rcursif.



       $ find . -exec grep -l "entropy" {} \; 2> /dev/null





  find . sort tous les noms des fichiers  partir du rpertoire courant,
  -exec grep -l "entropy" lance une commande sur chacun des fichiers
  (reprsents par {}), \ termine la commande). Si vous pensez que la
  syntaxe est horrible... vous avez raison :-)

  Vous auriez aussi pu crire le script suivant :



  ______________________________________________________________________
  #!/bin/sh
  # rgrep: grep rcursif
  if [ $# != 3 ]
  then
    echo "Utilisation : rgrep <paramtres> <motif> <rpertoire>"
    exit 1
  fi
  find $3 -name "*" -exec grep $1 $2 {} \; 2> /dev/null
  ______________________________________________________________________



  Voici l'explication. grep marche comme SEARCH et combin avec find
  nous obtenons le meilleur des deux mondes.

    J'ai un fichier qui a deux lignes d'en-tte et qui a ensuite _n
     donnes par ligne, pas ncessairement espaces de la mme manire.
     Je veux extraire la deuxime et le cinquime champs de chaque
     ligne. Dois-je crire un programme en Fortran ?

     Nan. Ceci est plus rapide :



       $ awk 'NL > 2 {print $2, "\t", $5}' fichier.dat > nouveaufichier.dat





  awk est en fait un langage de programmation. Pour chaque ligne  par
  tir de la troisime, on affiche le second et le cinquime champ en les
  sparant par une tabulation. Apprenez  vous servir de awk --- il vous
  fera gagner beaucoup de temps.

    J'ai tlcharg le ls-lR.gz d'un FTP. Pour chaque sous rpertoire,
     il y a une ligne  total _x , avec _x la taille en Kilo-octets du
     rpertoire. J'aimerais avoir le total de toutes ces valeurs.



       zcat ls-lR.gz | awk ' $1 == "total" { i += $2 } END {print i}'





  zcat sort le contenu du fichier .gz. La sortie est envoye vers awk
  dont je vous recommande chaudement de lire la page man.

    J'ai crit un programme en Fortran, monprog, pour calculer un
     paramtre  partir d'un fichier de donnes. Je voudrais le lancer
     sur des centaines de fichiers et avoir la liste des rsultats, mais
     c'est une calamit de demander chaque fois le nom du fichier. Sous
     VMS, j'aurais crit un long fichier de commande. Et sous Linux ?

     Un script trs court. Faites votre programme pour qu'il cherche le
     programme mesdonnes.dat et pour qu'il afficher le rsultat sur
     l'cran (stdout) et crivez ensuite ce petit script :






     ___________________________________________________________________
     #!/bin/sh
     # monprog.sh: lance la mme commande sur plusieurs fichiers
     # usage: monprog.sh *.dat
     for fichier in $*  # pour tous les paramtres (e.g. *.dat)
     do
       # ajouter le nom du fichier dans rsultat.dat
       echo -n "${fichier}:    " >> rsultats.dat
       # copie le paramtre courant dans mesdonnes.dat et lance monprog
       # et ajoute le sortie  rsultats.dat
       cp ${fichier} mesdonnes.dat ; monprog >> rsultats.dat
     done
     ___________________________________________________________________



    Je veux remplacer  gologie  par  gophysique  dans tous mes
     fichiers textes. Dois-je les diter manuellement ?

     Nan. crivez ce script :


     ___________________________________________________________________
     #!/bin/sh
     # remplace $1 par $2 dans $*
     # utilisation : remplace "vieux-motif" "nouveau-motif" fichier [fichier...]
     VIEUX=$1           # premier paramtre
     NOUVEAU=$2         # second
     shift ; shift      # enlever les deux premier paramtres ; les suivants sont
                        # les noms des fichiers
     for fichier in $*  # pour tous les fichier donns en paramtres
     do
     # remplace toutes les occurrences de VIEUX par NOUVEAU et sauve cela
     # dans un fichier temporaire
       sed "s/$VIEUX/$NOUVEAU/g" ${fichier} > ${fichier}.nouveau
     # renommer le fichier temporaire
       /bin/mv ${fichier}.new ${fichier}
     done
     ___________________________________________________________________



    J'ai des fichier contenant des donnes. Je ne connais pas leur
     taille et je dois enlever leur avant-dernire et leur avant-avant-
     dernire lignes. Heu...  la mimine ?

     Bien sr que non :


     ___________________________________________________________________
     #!/bin/sh
     # prune.sh: efface les n-1me et n-2me ligne de fichiers
     # utilisation : prune.sh fichier [fichier...]
     for fichier in $*   # pour chaque paramtre
     do
       LIGNES=`wc -l $fichier | awk '{print $1}'`  # nombre de ligne dans fichier
       LIGNES=`expr $LIGNES - 3`                   # LIGNES = LIGNES - 3
       head -n $LIGNES $fichier > $fichier.new     # sort les premires lignes
                                                   # de LIGNES
       tail -n 1 $fichier >> $fichier.new          # ajoute la dernire ligne
     done
     ___________________________________________________________________



  NDT : il est tout de mme beaucoup plus lgant d'utiliser ed :
  ______________________________________________________________________
  #!/bin/sh
  # prune.sh: efface les n-1me et n-2me ligne de fichiers
  # utilisation : prune.sh fichier [fichier...]
  for fichier in $*   # pour chaque paramtre
  do
    printf '$-2,$-1d\nw\nq\n' | ed -s $fichier
  done
  ______________________________________________________________________



  J'espre que ces exemples vous auront ouvert l'apptit.


  1122..  AAssttuucceess ddoonntt oonn nnee ppeeuutt ssee ppaasssseerr



    La compltion de commande : l'appui sur la touche tabulation quand
     vous tapez une commande va complter la ligne de commande. Par
     exemple, disons que vous devez taper less
     un_nom_de_fichier_trs_long. Il vous suffira de taper less un puis
     d'appuyer sur tabulation (si vous avez plusieurs fichier qui
     commencent par les mmes caractres tapez-en assez pour rsoudre
     l'ambigut).

    Faire dfiler l'cran vers le haut : en appuyant sur Shift-Page_up
     vous pouvez faire dfiler l'cran vers le haut de quelques pages
     (le nombre de page dpend de la mmoire vido de votre PC).

    Rtablir l'cran : s'il vous arrive de faire un more ou un cat sur
     un fichier binaire votre cran pourra se retrouver plein de
     symboles bizarres. Pour arranger les choses,  l'aveuglette tapez
     reset ou cette squence de caractres : echo ctrl-v Echap c Entre.

    Copier du texte sur la console : demandez  votre administrateur
     d'installer gpm, un driver pour la souris en mode texte. Cliquez et
     glissez pour slectionner du texte et ensuite appuyez sur le bouton
     droit pour coller le texte slectionn. a marche entre plusieurs
     consoles virtuelles.

    Copier du texte sous X : cliquez et glissez pour slectionnez le
     texte dans un xterm et cliquez ensuite sur le bouton du milieu (ou
     les deux boutons) pour coller.


  1133..  LLiirree ddeess bbaannddeess VVMMSS ddeeppuuiiss LLiinnuuxx

  (Cette section a t crite par Mike Miller)


  1133..11..  IInnttrroodduuccttiioonn


  De temps en temps vous pourrez tre amen  lire des bandes
  enregistres  partir d'une machine sous VMS (ou des bandes
  enregistres pour tre lisibles sous VMS et les systmes Unix). En
  gnral, c'est assez facile pour les bandes DECFILES11A.

  Bien que l'on puisse lire ceci comme une partie d'un mini-HOWTO Linux,
  je crois que les informations ici prsentes sont appliquables  tout
  systme Unix -- j'ai fait cela avec Linux et les systmes Unix d'HP,
  de SUN et de DEC. La principale dpendance  la plate-forme est le nom
  des fichiers priphriques qui peuvent varier d'un systme  l'autre,
  et les options de mt pour spcifier le nom du priphrique (par
  exemple, mt -f avec Linux et mt -t sur HPUX 9).

  Avertissement : j'ai seulement essay cela avec des lecteurs de bande
  Exabyte 8 mm SCSI. Si vous avez lu d'autres formats (vous avez encore
  des lecteurs 9 pistes qui tranent quelque part ?), faites-le moi
  savoir et je les ajouterai.


  1133..22..  LLeess bbaasseess


  Pour lire une bande qui a t crite avec la commande copy de VMS (ou
  une commande compatible) tout ce que vous devez savoir est que, pour
  chaque fichier effectif, il y aura trois fichiers de donnes sur la
  bande : une entte, les donnes et une terminaison. L'entte et la
  terminaison sont intressantes car elles contiennent des informations
  sur le fichier tel qu'il tait sous VMS. Le fichier de donnes est...
  le fichier de donnes.  Chacun de ces fichiers peut tre extrait de la
  bande avec la commande dd. La bande peut tre positionne en utilisant
  la commande mt.

  Prenons un exemple. J'ai une bande VMS. Les deux premiers de ses
  fichiers taient appels ce66-2.evt et ce66-3.evt sur le systme VMS.
  Le label de la bande est c66a2.

  Si j'excute les commandes suivantes


  ______________________________________________________________________
  $ dd if=$TAPE bs=16k of=entte1
  $ dd if=$TAPE bs=16k of=donne1
  $ dd if=$TAPE bs=16k of=terminaison1
  $ dd if=$TAPE bs=16k of=entte2
  $ dd if=$TAPE bs=16k of=donne2
  $ dd if=$TAPE bs=16k of=terminaison2
  ______________________________________________________________________



  je me retrouve avec six fichiers : entte1, donne1, terminaison1,
  entte2, donne2 et terminaison2. La syntaxe ici est if="fichier
  d'entre", bs="taille des blocs" et of="fichier de sortie". TAPE doit
  tre une variable d'environnement contenant le nom du priphrique de
  votre lecteur de bande --- par exemple /dev/nts0 si vous utilisez le
  premier disque SCSI sous Linux.

  Si vous aviez voulu rcuprer le second fichier, mais pas le premier,
  sous son non d'origine, vous n'auriez pas eu  vous proccuper de
  l'entte :


  ______________________________________________________________________
  $ mt -f $TAPE fsf 4
  $ dd if=$TAPE bs=16k of=ce66-2.evt
  $ mt -f $TAPE fsf 1
  ______________________________________________________________________



  Notez le 4. Il permet de sauter trois fichiers pour le premier fichier
  et un pour l'entte du deuxime. Le second mt saute la seconde
  terminaison et positionne la bande au dbut du prochain fichier : la
  troisime entte. Vous pouvez aussi utilisez mt pour sauter des
  fichiers en arrire (bsf), rembobiner (rewind) ou dcharger la bande
  (offline, rewoffl).

  1133..33..  QQuueellqquueess ddttaaiillss


  Les fichiers d'enttes et de terminaisons contiennent des donnes
  ASCII en majuscules utilises par VMS pour stocker des informations
  sur le fichier comme par exemple la taille des blocs. Ils contiennent
  aussi le nom du fichier, ce qui peut tre utile si vous voulez faire
  des scripts qui lisent automatiquement des fichiers ou recherchent un
  fichier particulier. La premire entte de la bande est un peu
  diffrente des suivantes.

  L'en-tte du premier fichier de la bande (comme par exemple dans
  l'exemple ci-dessus) dbute par la chane  VOL1 . Suit le nom de
  volume.  Dans notre exemple, le fichier entte1 commence par
   VOL1C66A2 . Vient ensuite une srie d'espace termine par un
  chiffre. Aprs, on trouve la chane  HDR1  qui indique que l'on a 
  faire  un fichier d'entte. Les caractres qui suivent immdiatement
  la chane  HDR1  forment le nom du fichier VMS.  Dans l'exemple,
  cette chane est  HDR1CE66-2.EVT . Le prochain champ est le nom du
  volume.

  Le champs initial des autres fichiers (c'est--dire tous sauf le
  premier de la bande) est quelque peu diffrent.   VOL1  n'est pas
  prsent. Le reste est identique.  Un autre champ utile est le
  septime. Il se termine par  DECFILES11A . C'est un signe de
  conformit au standard DEC Files11A.



       Champ                Entte initiale                  Enttes suivantes
       1                    VOL1 + nom du volume             HDR1 + nom du fichier
       2                    HDR1 + nom du fichier            Nom du volume
       3                    Nom du volume                    ...
       4                    ...                              ...
       5                    ...                              ...
       6                    ...                              DECFILES11A
       7                    DECFILES11A




  Pour une documentation complte sur le format de l'entte et de la
  terminaison, voyez la documentation DEC FILES11 (sur le mur
  gris/orange --- demandez  votre communaut VMS locale :-).


  1133..44..  CCoommmmeennttaaiirreess ssuurr llaa ttaaiillllee ddeess bblloocckkss


  Dans l'exemple, j'ai utilis une taille de bloc de 16 ko. Sur un
  systme Unix, il n'y a pas de taille de bloc associe  un fichier sur
  un disque alors que, sous VMS, chaque fichier  une taille de bloc
  spcifique. Cela veut dire que la taille du bloc importe peu sous
  linux... sauf que cela  rend la lecture des bandes plus complique. Si
  vous avez des difficults pour trouver la taille du bloc et pour lire
  une bande, vous pouvez essayer de rgler la taille de bloc matrielle
  de votre lecteur de bande en utilisant mt -f $TAPE setblk 0. La
  syntaxe exacte de l'option setblk (et sa disponibilit) dpend de la
  version de mt, de l'interface matrielle de votre lecteur de bande et
  de votre environnement Unix.

  (Merci  Wojtek Skulski pour avoir signal l'option setblk.)




  1144..  LLaa ffiinn



  1144..11..  CCooppyyrriigghhtt


  Sauf indication contraire, les droits d'auteur des HOWTO Linux sont
  dtenus par leurs auteurs respectifs. Les HOWTO Linux peuvent tre
  reproduits et distribus, en totalit ou en partie, sur tout mdia
  physique ou lectronique dans la mesure o ce copyright est prserv
  dans chaque copie. La distribution commerciale en est autorise et
  encourage. L'auteur apprcierait toutefois qu'on lui notifie
  individuellement ce genre de distribution.

  Le prsent copyright doit couvrir toute traduction, compilation et
  autre travail driv des HOWTO Linux. C'est--dire qu'il est interdit
  d'imposer des restrictions de diffusion allant au del du prsent
  copyright  des ouvrages inspirs, ou incorporant des passages, de
  HOWTO Linux. Sous certaines conditions, des exceptions  ces rgles
  seront tolres : contactez le coordinateur des HOWTO  l'adresse
  donne ci-dessous.

  Pour rsumer, nous souhaitons une diffusion aussi large que possible
  de ces informations. Nanmoins, nous entendons garder la proprit
  intellectuelle (copyright) des HOWTO, et apprcierions d'tre informs
  de leur redistribution.

  Pour toute question plus gnrale, merci de contacter le coordinateur
  des HOWTO, Guylhem Aznar,  l'adresse lectronique linux-
  howto@sunsite.unc.edu par email.


  1144..22..  AAvveerrttiisssseemmeenntt


  Ce travail a t crit d'aprs l'exprience que nous avons eue au
  _S_e_t_t_o_r_e _d_i _G_e_o_f_i_s_i_c_a _o_f _B_o_l_o_g_n_a _U_n_i_v_e_r_s_i_t_y (Italie), ou un VAX 4000 a
  t remplac par un Pentium tournant sous Linux. La plupart de mes
  collgues sont des utilisateurs de VMS, et certains d'entre eux l'ont
  abandonn pour Linux.

  Le _H_O_W_T_O _C_o_m_m_e_n_t _m_i_g_r_e_r _d_e _V_M_S _ _L_i_n_u_x a t crit par Guido Gonzato
  et Mike Miller qui a crit la partie sur la lecture des bandes VMS.
  Merci beaucoup  mes collgues et amis qui m'ont aid  dfinir les
  besoins et les habitudes de l'utilisateur lambda de VMS, et
  particulirement au Dr. Warner Marsocchi.

  S'il vous plat, aidez moi  amliorer ce HOWTO. Je ne suis pas un
  expert de VMS et je n'en serai jamais un. C'est pourquoi vos
  suggestions et reports de bogues seront plus que bienvenus.

  Amusez-vous bien,

  Guido =8-)











  HOWTO de l'diteur Vim (Vi amlior, avec coloration syntax
  ique)
  Al Dev (Alavoor Vasudevan) alavoor@yahoo.com;
  Version franaise par Arnaud Launay, asl@launay.org
  v1.0, 14 Octobre 1999

  Ce document est un guide pour configurer trs rapidement l'diteur Vim
  sur les systmes Linux ou Unix. Les informations prsentes ici aug
  menteront la productivit du programmeur puisque l'diteur Vim sup
  porte la coloration syntaxique et les fontes grasses qui augmentent la
  lisibilit du code.  Les informations de ce document s'appliquent 
  tous les systmes d'exploitation sous lesquels Vim fonctionne,
  c'est--dire Windows 95/NT, et toutes les versions d'Unix telles que
  Linux, FreeBSD, Solaris, HPUX, AIX, SCO, Sinix, BSD, SCO, etc.
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Configurez les fichiers d'initialisation de vim

     2.1 Paramtres du Xdefaults
     2.2 Fichier vimrc d'exemple
     2.3 Fichier gvimrc d'exemple

  3. Fichier d'initialisation de la coloration syntaxique

  4. Usage de Vim

  5. Aide de Vim en ligne

  6. Pages web de Vim et liens Vim

  7. Autres formats de ce document



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  L'diteur Vim signifie Vi Improved (Vi amlior). Vi est l'diteur
  le plus populaire et le plus puissant du monde Unix. Un bon diteur
  augmentera la productivit du programmeur. Vim supporte la coloration
  syntaxique du code ainsi que diffrentes fontes, normales ou grasses.

  Pour utiliser Vim, installez les paquetages rpm suivants sous redhat -

  ______________________________________________________________________
          rpm -i vim*.rpm
  Ou comme ceci -
          rpm -i vim-enhanced*.rpm
          rpm -i vim-X11*.rpm
          rpm -i vim-common*.rpm
          rpm -i vim-minimal*.rpm
  ______________________________________________________________________


  Vous pouvez voir la liste des fichiers vim que rpm a install par





  ______________________________________________________________________

          rpm -qa | grep ^vim | awk '{print "rpm -ql " $1 }' | /bin/sh | less
  ______________________________________________________________________


  Et regardez la sortie en utilisant j, k, CTRL+f, CTRL+D, CTRL+B,
  CTRL+U ou les touches flches, page up/down. Voyez aussi man less.

  Pour les autres versions d'unix, rcuprez les fichiers sources:

  ______________________________________________________________________

          zcat vim.tar.gz | tar -xvf -
          cd vim-5.5/src
          ./configure --enable-gui=motif
          make
          make install
  ______________________________________________________________________



  Pour Windows 95/NT, rcuprez les fichiers zip et installez-les en
  cliquant sur setup.


  22..  CCoonnffiigguurreezz lleess ffiicchhiieerrss dd''iinniittiiaalliissaattiioonn ddee vviimm

  Pour permettre la coloration syntaxique, vous devez copier le fichier
  vimrc dans votre rpertoire personnel. Il ajoutera galement le menu
  Syntax pour la commande gvim. Vous pouvez cliquer sur le menu Syntax
  et slectionner le langage appropri, comme C++, Perl, Java, SQL,
  ESQL, etc.

  ______________________________________________________________________
  cd $HOME
  cp /usr/doc/vim-common-5.3/gvimrc_example  ~/.gvimrc
  cp /usr/doc/vim-common-5.3/vimrc_example  ~/.vimrc
  ______________________________________________________________________


  Les commentaires du .vimrc commencent avec les apostrophes (").  Vous
  pouvez personnaliser vim en ditant le fichier $HOME/.vimrc et en
  rajoutant les lignes suivantes :

  ______________________________________________________________________
  "set guifont=9x15bold
  set guifont=8x13bold
  "set guifont=7x14bold
  "set guifont=7x13bold
  ______________________________________________________________________


  Le compteur tabstop est le nombre d'espaces que TAB ajoutera lorsque
  vous diterez sous vim. Le compteur shiftwidth est le nombre
  d'espaces qui dcaleront les lignes en tapant les commandes vi ">>" ou
  "<<". Rfrez vous au tutorial de Vim pour plus de dtails.  Pour met
  tre en place tabstop et shiftwidth :

  ______________________________________________________________________
  set tabstop=4
  set shiftwidth=4
  set nowrapscan
  set ignorecase
  ______________________________________________________________________

  22..11..  PPaarraammttrreess dduu XXddeeffaauullttss

  Vous pouvez configurer quelques unes des proprits de Vim dans le
  fichier Xdefaults.

   AATTTTEENNTTIIOONN:: _N_e _m_e_t_t_e_z _p_a_s VViimm**ggeeoommeettrryy, il coincerait les menu gvim,
  utilisez plutt VViimm..ggeeoommeettrryy  la place.

  ditez votre $HOME/.Xdefaults et ajoutez les lignes suivantes :

  ______________________________________________________________________
  ! GVim super couleurs.
  Vim*useSchemes:         all
  Vim*sgiMode:            true
  Vim*useEnhancedFSB:     true
  Vim.foreground:         Black
  !Vim.background:        lightyellow2
  Vim*background:         white
  ! N'utilisez PAS Vim*geometry, il coincerait les menu gvim,
  ! utilisez Vim.geometry. Un astrisque entre Vim et geometry n'est pas autoris.
  ! Vim.geometry: widthxheight
  Vim.geometry:           88x40
  !Vim*font:              -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-15-*5
  Vim*menuBackground: yellow
  Vim*menuForeground: black
  ______________________________________________________________________


  Vous devrez relancer le gestionnaire X pour que vos changements soient
  effectifs.

  Vous pouvez aussi diter votre fichier  /.gvimrc pour changer les
  couleurs de fond :

  ______________________________________________________________________
          gvim $HOME/.gvimrc
  ______________________________________________________________________




  22..22..  FFiicchhiieerr vviimmrrcc dd''eexxeemmppllee

  Le fichier d'exemple de vim-5.5/runtime/vimrc_example est celui-ci :






















  " Un exemple de fichier vimrc.
  "
  " Mainteneur: Bram Moolenaar <Bram@vim.org>
  " Dernires modifications : 9 Sep 1999
  "
  " Pour l'utiliser, copiez le dans
  "     pour Unix et OS/2 :  ~/.vimrc
  "            pour Amiga :  s:.vimrc
  " pour MS-DOS and Win32 :  $VIM\_vimrc

  set nocompatible        " Utilise les dfauts Vim (bien mieux !)
  set bs=2                " autorise l'effacement de tout en mode insertion
  set ai                  " toujours utiliser l'autoindentation
  set backup              " Conserver un fichier de sauvegarde
  set viminfo='20,\"50 " Lit/crit un fichier .viminfo, ne sauve pas plus
                          " de 50 lignes de registres
  set history=50          " Conserve 50 lignes d'historique des commandes
  set ruler               " Montre toujours la position du curseur

  " Pour l'interface Win32: retirez l'option 't' de 'guioptions': pas d'entres menu tearoff
  " let &guioptions = substitute(&guioptions, "t", "", "g")

  " N'utilise pas le mode Ex, utilise Q pour le formatage
  map Q gq

  " p en mode Visuel remplace le texte slectionn par le registre "".
  vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>

  " Active la coloration syntaxique lorsque le terminal dispose de couleurs
  " Active aussi la coloration de la dernire chane recherche.
  if &t_Co > 2 || has("gui_running")
    syntax on
    set hlsearch
  endif

  " Ne lance la partie suivante que si le support des autocommandes a t inclus
  " lors de la compilation
  if has("autocmd")

   " Dans les fichiers textes, toujours limiter la longueur du texte  78
   " caractres
   autocmd BufRead *.txt set tw=78

   augroup cprog
    " Supprime toutes les autocommandes cprog
    au!

    " Lors du dbut d'dition d'un fichier :
    "   Pour les fichiers C et C++ active le formatage des
    "   commentaires et l'indentation C
    "   Pour les autres fichiers, dsactive les.
    "   Ne pas changer l'ordre, il est important que la ligne
    "   avec * arrive avant.
    autocmd FileType *      set formatoptions=tcql nocindent comments&
    autocmd FileType c,cpp  set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
   augroup END

   augroup gzip
    " Supprime toutes les autocommandes gzip
    au!

    " Active l'dition des fichiers gzipps
    " Active le mode binaire avant de lire le fichier
    autocmd BufReadPre,FileReadPre        *.gz,*.bz2 set bin
    autocmd BufReadPost,FileReadPost      *.gz call GZIP_read("gunzip")
    autocmd BufReadPost,FileReadPost      *.bz2 call GZIP_read("bunzip2")
    autocmd BufWritePost,FileWritePost    *.gz call GZIP_write("gzip")
    autocmd BufWritePost,FileWritePost    *.bz2 call GZIP_write("bzip2")
    autocmd FileAppendPre                 *.gz call GZIP_appre("gunzip")
    autocmd FileAppendPre                 *.bz2 call GZIP_appre("bunzip2")
    autocmd FileAppendPost                *.gz call GZIP_write("gzip")
    autocmd FileAppendPost                *.bz2 call GZIP_write("bzip2")

    " Aprs la lecture du fichier compress : Dcompresse le texte dans le
    " buffer avec "cmd"
    fun! GZIP_read(cmd)
      let ch_save = &ch
      set ch=2
      execute "'[,']!" . a:cmd
      set nobin
      let &ch = ch_save
      execute ":doautocmd BufReadPost " . expand("%:r")
    endfun

    " Aprs l'criture du fichier compress : compresse le fichier crit avec "cmd"
    fun! GZIP_write(cmd)
      if rename(expand("<afile>"), expand("<afile>:r")) == 0
        execute "!" . a:cmd . " <afile>:r"
      endif
    endfun

    " Avant l'ajout au fichier compress : Dcompresser le fichier avec "cmd"
    fun! GZIP_appre(cmd)
      execute "!" . a:cmd . " <afile>"
      call rename(expand("<afile>:r"), expand("<afile>"))
    endfun

   augroup END

   " Ce qui suit est dsactiv, car il change la liste de sauts. On ne peut utiliser
   " CTRL-O pour revenir en arrire dans les fichiers prcdents plus d'une fois.
   if 0
    " Lors de l'dition d'un fichier, saute toujours  la dernire position du curseur.
    " Ceci doit se trouver aprs les commandes de dcompression.
     autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" | endif
   endif

  endif " has("autocmd")





  22..33..  FFiicchhiieerr ggvviimmrrcc dd''eexxeemmppllee

  L'exemple de gvimrc de vim-5.5/runtime/gvimrc_example ressemble 
  celui-ci :















  ______________________________________________________________________
  " Un exemple de fichier gvimrc.
  " Ces commandes sont excutes lors du lancement de l'interface graphique.
  "
  " Mainteneur :        Bram Moolenaar <Bram@vim.org>
  " Dernires modifications : 2 Fv 1999
  "
  " Pour l'utiliser, copiez le dans
  "      pour Unix et OS/2 :  ~/.gvimrc
  "             pour Amiga :  s:.gvimrc
  "  pour MS-DOS and Win32 :  $VIM\_gvimrc

  " Passe les commandes externes par un tuyau au lieu d'un pseudo-tty
  "set noguipty

  " Active la fonte X11  utiliser
  " set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1

  " Rend la ligne de commande de 2 lignes plus grande
  set ch=2

  " Permet le shift-insert fonctionnel comme dans les Xterm
  map <S-Insert> <MiddleMouse>
  map! <S-Insert> <MiddleMouse>

  " Ne fait ceci que pour Vim de version 5.0 et ultrieure.
  if version >= 500

    " J'aime avoir des chanes claires dans les commentaires C
    let c_comment_strings=1

    " Active la coloration syntaxique.
    syntax on

    " Active la coloration de la chane recherche.
    set hlsearch

    " Pour la version Win32, on a "K" qui cherche le keyword dans un fichier d'aide
    "if has("win32")
    "  let winhelpfile='windows.hlp'
    "  map K :execute "!start winhlp32 -k <cword> " . winhelpfile <CR>
    "endif

    " Cache le pointeur de souris lorsque l'on tape
    set mousehide

    " Utilise des couleurs sympathiques
    " Le fond pour le texte normal est en gris clair
    " Le texte sous la dernire ligne est en gris sombre
    " Le curseur est gris
    " Les constantes ne sont pas soulignes mais ont un fond lgrement plus clair
    highlight Normal guibg=grey90
    highlight Cursor guibg=Green guifg=NONE
    highlight NonText guibg=grey80
    highlight Constant gui=NONE guibg=grey95
    highlight Special gui=NONE guibg=grey95

  endif
  ______________________________________________________________________







  33..  FFiicchhiieerr dd''iinniittiiaalliissaattiioonn ddee llaa ccoolloorraattiioonn ssyynnttaaxxiiqquuee

  Au lieu d'utiliser un menu "Syntax" vous pouvez lire manuellement le
  fichier de syntaxe. ditez le fichier avec gvim et donnez la commande
  so  : (en mode d'chappement). Par exemple :

  ______________________________________________________________________
          gvim foo.pc
          :so $VIM/syntax/esqlc.vim
  ______________________________________________________________________


  Les fichiers de syntaxe sont dans /usr/share/vim/syntax/*.vim. Vim
  supporte plus de 120 fichiers de syntaxe diffrents !


  44..  UUssaaggee ddee VViimm

  Vous pouvez utiliser Vim sous deux modes, l'un avec interface
  graphique et l'autre sans. Pour utiliser l'interface graphique
  utilisez la commande :

  ______________________________________________________________________
          gvim foo.cpp
  ______________________________________________________________________


  Pour utiliser le mode non-graphique utilisez :

  ______________________________________________________________________
          vim foo.cpp
  ou le mode ancien
          vi foo.cpp
  ______________________________________________________________________




  55..  AAiiddee ddee VViimm eenn lliiggnnee

  Voyez les pages de manuel en ligne. Au prompt unix, tapez 'man vim' et
  'man gvim'.

  Ou lors d'une session gvim tapez :help pour obtenir la page d'aide.


  66..  PPaaggeess wweebb ddee VViimm eett lliieennss VViimm

  La page principale de vim se trouve sur  <http://www.vim.org>, et son
  site miroir aux US est sur  <http://www.us.vim.org>.

  La FAQ Vim est sur  <http://www.grafnetix.com/~laurent/vim/faq.html>
  et sur  <http://www.vim.org/faq>.

  La page Vim d'Eli se trouve sur
  <http://www.netusa.net/~eli/src/vim.html>.

  La page des amoureux de Vi sur  <http://www.cs.vu.nl/~tmgil/vi.html>.

  Le guide de rfrence sur Vim sur
  <http://scisun.sci.ccny.cuny.edu/~olrcc/vim/>.

  Les listes de diffusion Vim sont sur
  <http://www.findmail.com/listsaver/vimannounce.html> et
  <http://www.vim.org/mail.html>.

  Les archives des listes sont conserves sur:

    <http://www.egroups.com/group/vim>

    <http://www.egroups.com/group/vimdev>

    <http://www.egroups.com/group/vimannounce>

  Les macros Vim sont sur
  <http://www.grafnetix.com/~laurent/vim/macros.html>.


  77..  AAuuttrreess ffoorrmmaattss ddee ccee ddooccuummeenntt

  Ce document est publi sous 10 formats diffrents, nommment - DVI,
  Postscript, Latex, LyX, GNU-info, HTML, RTF(Rich Text Format), Plain-
  text, pages man Unix et SGML.

    Vous pouvez obtenir ce document howto sous la forme d'une archive
     tar en html, dvi, postscript et sgml de :
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/> ou
     <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/other-formats/>

    Le format texte plein est sur :
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> ou
     <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO>

    Les traductions dans d'autres langages comme franais, allemand,
     espagnol, chinois, japonais sont sur
     <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO> ou
     <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO> Toute aide de votre
     part pour traduire ce document dans d'autres langages est la
     bienvenue.

     Ce document est crit en utilisant un outil nomm SGML tools qui
     peut tre obtenu de : <http://www.xs4all.nl/~cg/sgmltools/> Pour
     compiler le source vous obtiendrez les commandes suivantes comme :

    sgml2html vim-howto.sgml     (pour gnrer un fichier html)

    sgml2rtf  vim-howto.sgml     (pour gnrer un fichier RTF)

    sgml2latex vim-howto.sgml    (pour gnrer un fichier latex)

  Ce document se trouve sur :

    <http://sunsite.unc.edu/LDP/HOWTO/VIM-HOWTO.html>

  Vous pouvez aussi trouver ce document sur les sites miroirs suivants :

    <http://www.caldera.com/LDP/HOWTO/VIM-HOWTO.html>

    <http://www.WGS.com/LDP/HOWTO/VIM-HOWTO.html>

    <http://www.cc.gatech.edu/linux/LDP/HOWTO/VIM-HOWTO.html>

    <http://www.redhat.com/linux-info/ldp/HOWTO/VIM-HOWTO.html>

    D'autres sites miroirs prs de vous ( l'chelle du rseau) peuvent
     se trouver sur <http://sunsite.unc.edu/LDP/hmirrors.html>
     slectionnez un site et allez voir le fichier /LDP/HOWTO/VIM-
     HOWTO.html.

  Afin de voir un document au format dvi, utilisez le programme xdvi. Le
  programme xdvi se trouve dans le paquetage tetex-xdvi*.rpm de la
  Redhat Linux qui peut se trouver dans ControlPanel | Applications |
  Publishing | TeX.


               Pour lire un document dvi utilisez la commande :
                       xdvi -geometry 80x90 howto.dvi
               Et redimmensionnez la fentre avec une souris. Voyez la page man de
               xdvi. Pour naviguer utilisez les flches, les touches page up, down,
               ou galement les lettres 'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' pour
               monter, descendre, centrer, page suivante, page prcdente, etc. Pour
               supprimer le menu expert appuyez sur 'x'.




  Vous pouvez lire le fichier postscript avec le programme 'gv'
  (ghostview) ou Le programme ghostscript est dans le paquetage
  ghostscript*.rpm et le programme gv dans gv*.rpm, qui se trouvent sous
  ControlPanel | Applications | Graphics. Le programme gv est beaucoup
  plus agrable  utiliser que ghostscript. Ghostscript et gv sont aussi
  disponibles sous d'autres plateformes comme OS/2, Windows 95 et NT.


               Pour lire le document postscript utilisez la commande :
                       gv howto.ps

               Pour utiliser ghostscript lancez :
                       ghostscript howto.ps




  Vous pouvez lire le document en html en utilisant Netscape Navigator,
  Microsoft Internet explorer, Redhat Baron ou tout autre navigateur
  web.

  Vous pouvez lire la sortie LaTeX ou LyX en utilisant LyX ou vim.






























  Virtual Services Howto
  Brian Ackerman, brian@nycrc.net
  Adaptation franaise Julien Garnault judge@club-internet.fr
  v2.1, 15 Aout 1998

  Ce document a t crit pour rpondre au nombre grandissant de ques
  tions sur la manire de rendre un service virtuel.
  ______________________________________________________________________

  Table des matires
























































  1. Introduction

     1.1 Pr-requis
     1.2 But
     1.3 Commentaires
     1.4 Historique des changements
     1.5 Copyright/Distribution

  2. IP aliasing

  3. Virtuald

     3.1 Comment a marche
     3.2 inetd
     3.3 Fichier de Configuration
     3.4 Le code source de virtuald

  4. Scripts shell

     4.1 virtfs
     4.2 Virtexec
     4.3 Notes

  5. DNS

  6. Syslogd

     6.1 Problme
     6.2 Solution
        6.2.1 Syslogd.init
     6.3 Plusieurs syslod
        6.3.1 Un par disque
        6.3.2 Un par domaine

  7. FTP virtuel

     7.1 Inetd
     7.2 Les FTP anonymes
     7.3 Utilisateurs de FTP Virtuel

  8. Web virtuel

     8.1 Lancement avec virtuald
        8.1.1 Non recommand
        8.1.2 Inetd
        8.1.3 Httpd.conf
        8.1.4 Configuration
        8.1.5 Httpd.init
     8.2 Lancer Apache avec VirtualHost
        8.2.1 Access.conf
        8.2.2 Httpd.conf
        8.2.3 Srm.conf
        8.2.4 Httpd.init
     8.3 Descripteurs de fichiers : limite de capacit
        8.3.1 Attention
        8.3.2 Plusieurs serveur Apache
     8.4 Hberger plusieurs serveurs avec une IP
        8.4.1 conomiser des IP
        8.4.2 Inconvnient
     8.5 Plus d'informations

  9. Mail virtuel avec Pop

     9.1 Problme
     9.2 Solution
     9.3 Solution pour Sendmail
        9.3.1 Introduction
        9.3.2 Crer un fichier de configuration Sendmail
        9.3.3 dition du fichier de configuration
        9.3.4 Distribution locale par Sendmail
        9.3.5 Sendmail et les domaines virtuels : la bidouille (pre8.8.6)
        9.3.6 Sendmail et les domaines virtuels : Nouvelle fonction (POST8.8.6)
        9.3.7 Sendmail.init
        9.3.8 Configuration d'inetd
     9.4 Solution pour Qmail
        9.4.1 Introduction
        9.4.2 Installation des domaines virtuels
        9.4.3 Installation de l'utilisateur matre du domaine
        9.4.4 Tcpserver
        9.4.5 Qmail.init
        9.4.6 Source
        9.4.7 Source
     9.5 Remerciements

  10. Samba Virtuel

     10.1 Mise en place
     10.2 Inetd
     10.3 Smb.init

  11. Le reste

  12. Conclusion

  13. FAQ



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  PPrr--rreeqquuiiss

  Crer une machine pour des services virtuels n'est pas du tout
  difficile. Cependant, des connaissances basiques ne sont pas
  suffisantes. De plus, ce document n'est pas destin  vous expliquer
  comment configurer une machine sous Linux.


  Afin que vous puissiez comprendre ce HOWTO, nous supposerons que les
  documents suivants vous sont tout  fait familiers :


    Compiler un noyau Linux et ajouter le support de l'IP aliasing IP
     alias mini-HOWTO

    Installer et configurer des priphriques rseau NET-3 HOWTO

    Installer inetd NET-3 HOWTO

    Compiler et installer divers paquetages de logiciels en rseau
     comme Le site de Sendmail Le site d'Apache La FAQ de Wu-Ftpd

    Mettre en place le DNS DNS HOWTO

  Si vous n'tes pas certain de la marche  suivre pour effectuer une
  des actions prcdentes, il est FORTEMENT recommand que vous suiviez
  les liens proposs pour vous familiariser avec tous ces paquetages. Je
  ne rpondrai  AUCUN mail concernant les points prcdents. Veuillez
  s'il vous plat rediriger toute question  l'auteur du HOWTO
  appropri.
  11..22..  BBuutt

  Le but des services virtuels est de permettre  une seule machine de
  reconnatre de multiples adresses IP sans avoir de multiples cartes
  rseau. L'IP aliasing est une option du noyau qui vous permet
  d'assigner plus d'une adresse IP  chaque priphrique rseau. Le
  noyau multiplexe (les change trs rapidement) en tche de fond et
  l'utilisateur a l'impression d'avoir plusieurs cartes rseau dans sa
  machine.



  Ce multiplexage permet  de multiples domaines (www.domaine1.com,
  www.domaine2.com, etc.) d'tre logs sur la mme machine pour le mme
  cot que pour un seul domaine. Malheureusement, la plupart des
  services (ftp, web, courrier lectronique) n'ont pas t conus pour
  grer de multiples domaines. Afin de les faire fonctionner
  correctement, vous devrez modifier  la fois les fichiers de
  configuration et le code source. Ce document dcrit comment raliser
  ces modifications pour la mise en place d'une machine virtuelle.


  Un dmon est galement ncessaire afin de faire fonctionner les
  services virtuels. Le code source de ce dmon (virtuald) est fourni
  plus loin dans ce document.


  11..33..  CCoommmmeennttaaiirreess

  Ce document va grossir au fur et  mesure que les paquetages seront
  mis  jour et que le code source ou que les modifications proposes
  changeront. Si quelque partie de ce document n'est pas claire,
  envoyez-moi vous questions ou suggestions. Afin que je n'aie pas 
  chercher dans le HOWTO en entier, assurez vous s'il vous plat que les
  commentaires soient aussi spcifiques que possible et incluent la
  section o se trouve le point discutable. Il est important que tout
  mail ait un champ Subject: contenant VIRTSERVICES HOWTO. Tout autre
  mail sera considr comme du mail personnel, et tous mes amis savent
  que je ne lis pas tout le temps mon mail personnel et il risque donc
  d'tre effac avec le leur.


  Veuillez galement noter que mes exemples ne sont pas autre chose que
  des exemples, et ne doivent pas tre recopis tels quels. Il se peut
  que vous ayez  insrer vos propres valeurs. Si vous rencontrez des
  problmes, envoyez moi un mail, contenant tous les fichiers de
  configuration pertinents et les messages d'erreur que vous avez obtenu
  lors de l'installation. Je vous renverrai mes suggestions.


  11..44..  HHiissttoorriiqquuee ddeess cchhaannggeemmeennttss

  V1.0 Document initial.


  V1.1 Correction d'une erreur dans la section sur le web virtuel.


  V1.2 Correction de la date.


  VV22..00

  Mise  jour des liens html.


  Mise  jour de la section Web.

  Nouvelle option pour sendmail.

  Nouvelle option pour Qmail.

  Mise  jour de la section Syslogd.

  Mise  jour de la section FTP.

  Option par dfaut de Virtuald.

  Nouvelle section Samba.

  Mise  jour de la FAQ.


  VV22..11

  Tous les paths ont t changs pour /usr/local.

  Ajout de l'option de compilation VERBOSELOG.

  Correction d'un bug de setuid/setgid dans virtmailfilter.

  Correction du bug de execl dans virtmailfilter

  Correction du bug de captalization dans virtmailfilter.

  Suppression du code mbox de virtmailfilter/virtmaildelivery.

  Ajout d'une section tcpserver.init pop pour Qmail

  Ajout de la question alias domain name  la FAQ.

  Correction de virtmailfilter pour envoyer le rpertoire home 
  virtmaildelivery.


  11..55..  CCooppyyrriigghhtt//DDiissttrriibbuuttiioonn

  Ce document est Copyright (c) 1997 par The Computer Resource Center
  Inc.


  Une copie de ce document peut tre reproduite ou distribue sur
  n'importe quel support physique ou lectronique sans la permission de
  l'auteur. De la mme faon, les traductions sont autorises sans
  permission expresse si elle incluent un mot disant qui l'a traduit
  (NdT : voir le dbut du document pour mes coordonnes). Une
  redistribution commerciale est autorise et encourage. Dans ce cas
  cependant, faites-en part  Computer Resource Center.


  Vous pouvez utiliser des extraits de ce document sans accord de
  l'auteur,  condition que l'oeuvre drive contienne une copie de ce
  document ou un pointeur vers une copie de ce document.


  Vous avez la permission d'effectuer des copies ainsi que de les
  distribuer  condition que le paragraphe sur le copyright ainsi que
  cette note soient prservs sur toutes les copies.


  En bref, nous dsirons promouvoir la dissmination de cette
  information par quelque moyen que ce soit. Cependant, je dsire
  conserver le copyright sur ce document, et aimerait tre tenu au
  courant de tous les plans de redistribution de ce HOWTO.


  22..  IIPP aalliiaassiinngg


  L'IP aliasing est une option du noyau qui doit tre mise en place afin
  de pouvoir faire tourner des services virtuels sur une machine. Il
  existe dj un mini-HOWTO expliquant l' IP aliasing.  Rfrez vous 
  ce document pour toute question concernant la mise en place de cette
  option.


  33..  VViirrttuuaalldd

  33..11..  CCoommmmeenntt aa mmaarrcchhee

  Toute connexion rseau est compose de deux paires adresse IP/port.
  L'API (Applications Program Interface, ou Interface de Programmation
  d'Applications) pour la programmation rseau est nomme l'API Sockets.
  La socket agit comme un fichier ouvert, et vous pouvez envoyer ou
  recevoir des donnes  travers une connexion rseau en lisant ou en
  crivant dans la socket. Il existe une fonction, getsockname, qui
  retourne l'adresse IP de la socket locale. Virtuald utilise
  getsockname pour dterminer sur quel adresse IP de la machine locale
  la connexion a t faite. Virtuald lit un fichier de configuration
  pour rcuprer le rpertoire associ  cette adresse IP. Il va
  utiliser chroot sur ce rpertoire et prendre en compte la connexion au
  service. Chroot change le rpertoire / (le rpertoire root) vers un
  nouveau point, de sorte que tout ce qui est au dessus de ce rpertoire
  devienne inaccessible pour le programme. Ainsi, chaque adresse IP se
  voit assign un systme virtuel de fichiers. Pour le programme rseau,
  ceci est transparent, et le programme va se comporter comme si de rien
  n'tait. Virtuald, en conjonction avec un programme comme inetd, peut
  tre utilis pour virtualiser n'importe quel service.


  33..22..  iinneettdd

  Inetd est un super serveur rseau qui coute sur de multiples ports
  et, lorsqu'il reoit une demande de connexion (par exemple, une
  requte POP), inetd ralise la connexion et l'envoie au programme
  spcifi. Cela vite de faire tourner des serveurs pour rien lorsqu'il
  n'y a aucune demande pour eux


  Un fichier /etc/inetd.conf standard ressemble  ceci :


  ftp stream tcp nowait root /usr/sbin/tcpd \
          wu.ftpd -l -a
  pop-3 stream tcp nowait root /usr/sbin/tcpd \
          in.qpop -s



  Un fichier /etc/inetd.conf virtualis ressemble  ceci :


  ftp stream tcp nowait root /usr/bin/virtuald virtuald /virtual/conf.ftp wu.ftpd -l -a
  pop-3 stream tcp nowait root /usr/bin/virtuald virtuald /virtual/conf.pop in.qpop -s




  33..33..  FFiicchhiieerr ddee CCoonnffiigguurraattiioonn

  Chaque service se voit attribu un fichier de configuration qui
  contrlera quelles IPs et quels rpertoires sont autoriss pour ce
  service. Vous pouvez avoir un fichier de configuration principal ou de
  nombreux fichiers de configuration si vous dsirez que chaque service
  se voit attribuer une liste de domaines diffrents. Un fichier de
  configuration ressemble  ceci :


  # C'est un commentaire, comme le sont les lignes blanches

  # Format IP "ESPACE" dir "PAS D'ESPACES"
  10.10.10.129 /virtual/foo.bar.com
  10.10.10.130 /virtual/bar.foo.com
  10.10.10.157 /virtual/boo.la.com




  33..44..  LLee ccooddee ssoouurrccee ddee vviirrttuuaalldd

  Ceci est un code source en C du programme virtuald. Compilez-le et
  installez-le dans /usr/local/bin avec les permissions 0755,
  l'utilisateur root, et le groupe root. La seule option de compilation
  est VERBOSELOG qui active ou dsactive l'option de log.








































  #include <netinet/in.h>
  #include <sys/socket.h>
  #include <arpa/inet.h>
  #include <stdarg.h>
  #include <unistd.h>
  #include <string.h>
  #include <syslog.h>
  #include <stdio.h>

  #define BUFSIZE 8192
  int getipaddr(char **ipaddr)
  {
          struct sockaddr_in virtual_addr;
          static char ipaddrbuf[BUFSIZE];
          int virtual_len;
          char *ipptr;
          virtual_len=sizeof(virtual_addr);
          if (getsockname(0,(struct sockaddr *)&virtual_addr,&virtual_len)        {
                  syslog(LOG_ERR,"getipaddr: getsockname failed: %m");
                  return -1;
          }
          if (!(ipptr=inet_ntoa(virtual_addr.sin_addr)))
          {
                  syslog(LOG_ERR,"getipaddr: inet_ntoa failed: %m");
                  return -1;
          }
          strncpy(ipaddrbuf,ipptr,sizeof(ipaddrbuf)-1);
          *ipaddr=ipaddrbuf;
          return 0;
  }

  int iptodir(char **dir,char *ipaddr,char *filename)
  {
          char buffer[BUFSIZE],*bufptr;
          static char dirbuf[BUFSIZE];
          FILE *fp;

          if (!(fp=fopen(filename,"r")))
          {
                  syslog(LOG_ERR,"iptodir: fopen failed: %m");
                  return -1;
          }
          *dir=NULL;
          while(fgets(buffer,BUFSIZE,fp))
          {
                  buffer[strlen(buffer)-1]=0;
                  if (*buffer=='#' || *buffer==0)
                          continue;
                  if (!(bufptr=strchr(buffer,' ')))
                  {
                          syslog(LOG_ERR,"iptodir: strchr failed");
                          return -1;
                  }
                  *bufptr++=0;
                  if (!strcmp(buffer,ipaddr))
                  {
                          strncpy(dirbuf,bufptr,sizeof(dirbuf)-1);
                          *dir=dirbuf;
                          break;
                  }
                  if (!strcmp(buffer,"default"))
                  {
                          strncpy(dirbuf,bufptr,sizeof(dirbuf)-1);
                          *dir=dirbuf;
                          break;
                  }
          }
          if (fclose(fp)==EOF)
          {
                  syslog(LOG_ERR,"iptodir: fclose failed: %m");
                  return -1;
          }
          if (!*dir)
          {
                  syslog(LOG_ERR,"iptodir: ip not found in conf file");
                  return -1;
          }
          return 0;
  }
  int main(int argc,char **argv)
  {
          char *ipaddr,*dir;
          openlog("virtuald",LOG_PID,LOG_DAEMON);
  #ifdef VERBOSELOG
          syslog(LOG_ERR,"Virtuald Starting: $Revision: 1.49 $");
  #endif
          if (!argv[1])
          {
                  syslog(LOG_ERR,"invalid arguments: no conf file");
                  exit(0);
          }
          if (!argv[2])
          {
                  syslog(LOG_ERR,"invalid arguments: no program to run");
                  exit(0);
          }
          if (getipaddr(&ipaddr))
          {
                  syslog(LOG_ERR,"getipaddr failed");
                  exit(0);
          }
  #ifdef VERBOSELOG
          syslog(LOG_ERR,"Incoming ip: %s",ipaddr);
  #endif
          if (iptodir(&dir,ipaddr,argv[1]))
          {
                  syslog(LOG_ERR,"iptodir failed");
                  exit(0);
          }
          if (chroot(dir)<0)
          {
                  syslog(LOG_ERR,"chroot failed: %m");
                  exit(0);
          }
  #ifdef VERBOSELOG
          syslog(LOG_ERR,"Chroot dir: %s",dir);
  #endif
          if (chdir("/")<0)
          {
                  syslog(LOG_ERR,"chdir failed: %m");
                  exit(0);
          }
          if (execvp(argv[2],argv+2)<0)
          {
                  syslog(LOG_ERR,"execvp failed: %m");
                  exit(0);
          }

          closelog();

          exit(0);
  }
  44..  SSccrriippttss sshheellll

  44..11..  vviirrttffss

  Chaque domaine doit avoir une arborescence de rpertoires. Puisque
  vous utilisez chroot, vous aurez besoin de copies multiples des
  librairies, binaires, fichiers de configuration, etc. J'utilise le
  rpertoire /virtual/domaine1.com pour chaque domaine que je cre.

  Je comprends bien que cela reprsente du gaspillage d'espace disque,
  mais l'espace disque est meilleur march qu'une nouvelle machine ou
  que des cartes rseau. Si vous dsirez rellement sauver de l'espace
  disque, vous pouvez faire des liens, afin qu'une seule copie de chaque
  binaire soit prsente.  Le systeme de fichiers que j'utilise prend un
  peu plus de 2Mo. Le script essaye de copier tous les fichiers du
  systme de fichiers principal pour que ce soit le plus identique
  possible.



  Voici un fichier virtfs d'exemple :













































  #!/bin/bash

  echo '$Revision: 1.49 $'

  echo -n "Saisissez le nom de domaine : "
  read domain

  if [ "$domain" = "" ]
  then
          echo Vous n'avez rien saisi : on arrte l
          exit 0
  fi

  leadingdir=/virtual

  echo -n "Saisissez le nom du rpertoire contenant les domaines (dfaut: $leadingdir): "
  read ans

  if [ "$ans" != "" ]
  then
          leadingdir=$ans
  fi

  newdir=$leadingdir/$domain

  if [ -d "$newdir" ]
  then
          echo Le rpertoire $newdir existe dj
          exit 0
  else
          echo Nouveau rpertoire : $newdir
  fi

  echo Cration de $newdir
  mkdir -p $newdir

  echo Cration de bin
  cp -pdR /bin $newdir

  echo Cration de dev
  cp -pdR /dev $newdir

  echo Cration de dev/log
  ln -f /virtual/log $newdir/dev/log

  echo Cration d'etc
  mkdir -p $newdir/etc
  for i in /etc/*
  do
          if [ -d "$i" ]
          then
                  continue
          fi
          cp -pd $i $newdir/etc
  done

  echo Cration de etc/skel
  mkdir -p $newdir/etc/skel

  echo Cration de home
  for i in a b c d e f g h i j k l m n o p q r s t u v w x y z
  do
          mkdir -p $newdir/home/$i
  done

  echo Cration de home/c/crc
  mkdir -p $newdir/home/c/crc
  chown crc.users $newdir/home/c/crc

  echo Cration de lib
  mkdir -p $newdir/lib
  for i in /lib/*
  do
          if [ -d "$i" ]
          then
                  continue
          fi
          cp -pd $i $newdir/lib
  done

  echo Cration de proc
  mkdir -p $newdir/proc

  echo Cration de sbin
  cp -pdR /sbin $newdir

  echo Cration de tmp
  mkdir -p -m 0777 $newdir/tmp
  chmod +t $newdir/tmp

  echo Cration de usr
  mkdir -p $newdir/usr

  echo Cration de usr/bin
  cp -pdR /usr/bin $newdir/usr

  echo Cration de usr/lib
  mkdir -p $newdir/usr/lib

  echo Cration de usr/lib/locale
  cp -pdR /usr/lib/locale $newdir/usr/lib

  echo Cration de usr/lib/terminfo
  cp -pdR /usr/lib/terminfo $newdir/usr/lib

  echo Cration de usr/lib/zoneinfo
  cp -pdR /usr/lib/zoneinfo $newdir/usr/lib

  echo Cration de usr/lib/\*.so\*
  cp -pdR /usr/lib/*.so* $newdir/usr/lib

  echo Cration de usr/sbin
  cp -pdR /usr/sbin $newdir/usr

  echo Lien de usr/tmp vers /tmp
  ln -s /tmp $newdir/usr/tmp

  echo Cration de var
  mkdir -p $newdir/var

  echo Cration de var/lock
  cp -pdR /var/lock $newdir/var

  echo Cration de var/log
  mkdir -p $newdir/var/log

  echo Cration de var/log/wtmp
  cp /dev/null $newdir/var/log/wtmp

  echo Cration de var/run
  cp -pdR /var/run $newdir/var

  echo Cration de var/run/utmp
  cp /dev/null $newdir/var/run/utmp

  echo Cration de var/spool
  cp -pdR /var/spool $newdir/var

  echo Lien de var/tmp vers /tmp
  ln -s /tmp $newdir/var/tmp

  echo Cration de var/www/html
  mkdir -p $newdir/var/www/html
  chown webmast.www $newdir/var/www/html
  chmod g+s $newdir/var/www/html

  echo Cration de var/www/master
  mkdir -p $newdir/var/www/master
  chown webmast.www $newdir/var/www/master

  echo Cration de var/www/server
  mkdir -p $newdir/var/www/server
  chown webmast.www $newdir/var/www/server

  exit 0




  44..22..  VViirrtteexxeecc


  Afin d'excuter des commandes dans un environnement virtuel, vous
  devez utiliser chroot sur ce rpertoire puis lancer la commande. J'ai
  crit un script shell nomm virtexec se chargeant de ces oprations,
  pour n'importe quelle commande :
































  #!/bin/sh

  echo '$Revision: 1.49 $'

  BNAME=`basename $0`
  FIRST4CHAR=`echo $BNAME | cut -c1-4`
  REALBNAME=`echo $BNAME | cut -c5-`

  if [ "$BNAME" = "virtexec" ]
  then
          echo Vous ne pouvez pas lancer virtexec directement. Il FAUT un lien symbolique
          exit 0
  fi

  if [ "$FIRST4CHAR" != "virt" ]
  then
          echo Le lien ne pointe pas sur une fonction virtuelle
          exit 0
  fi

  list=""
  num=1
  for i in /virtual/*
  do
          if [ ! -d "$i" ]
          then
                  continue
          fi
          if [ "$i" = "/virtual/lost+found" ]
          then
                  continue
          fi
          list="$list $i $num"
          num=`expr $num + 1`
  done

  if [ "$list" = "" ]
  then
          echo Je ne trouve pas d'environnement virtuel
          exit 0
  fi

  dialog --clear --title 'Virtexec' --menu Pick 20 70 12 $list 2> /tmp/menu.$$
  if [ "$?" = "0" ]
  then
          newdir=`cat /tmp/menu.$$`
  else
          newdir=""
  fi
  tput clear
  rm -f /tmp/menu.$$

  echo '$Revision: 1.49 $'

  if [ ! -d "$newdir" ]
  then
          echo Le nouveau rpertoire $newdir N'EXISTE PAS
          exit 0
  else
          echo Nouveau rpertoire : $newdir
  fi

  echo bname: $BNAME

  echo realbname: $REALBNAME

  if [ "$*" = "" ]
  then
          echo arguments: aucun
  else
          echo args: $*
  fi

  echo Changement de rpertoire vers $newdir
  cd $newdir

  echo Lancement de $REALBNAME

  chroot $newdir $REALBNAME $*

  exit 0



  Veuillez noter que vous devez disposer du programme dialog sur votre
  systme pour que ce script fonctionne. Pour utiliser virtexec, crez
  un lien symbolique d'un programme vers celui-ci. Par exemple :


  ln -s /usr/local/bin/virtexec /usr/local/bin/virtpasswd
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtvi
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtpico
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtemacs
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtmailq



  A prsent, si vous tapez virtvi ou virtpasswd ou encore virtmailq,
  cela vous permettra d'diter un fichier, changer le mot de passe d'un
  utilisateur, ou vrifier la file d'attente de mail sur votre systme
  virtuel. Vous pouvez crer autant de liens vers virtexec que vous le
  dsirez. Cependant, notez bien que si votre programme ncessite une
  librairie partage, celle-ci doit se trouver sur le systme de
  fichiers virtuel, ainsi que les binaires.


  44..33..  NNootteess

  J'installe tous les scripts dans /usr/local/bin. Tout ce que je ne
  dsire pas mettre sur le systme de fichiers virtuel, je le place dans
  /usr/local. Le script ne touche  rien dans ce rpertoire lors de la
  copie. Les fichiers ne devant pas chevaucher plusieurs systmes de
  fichiers virtuels doivent tre supprims. Par exemple, ssh est
  install sur mon systme, et je n'ai pas voulu que les clefs prives
  soient disponibles sur tous les systmes de fichier. J'ai donc
  supprim le fichier des systmes de fichiers virtuels aprs avoir
  lanc virtfs. Je change galement le resolv.conf et supprime tout ce
  qui contient le nom d'un autre domaine, pour des raisons lgales. Par
  exemple, les fichiers /etc/hosts et /etc/HOSTNAME.


  Les programmes pour lesquels je fais un lien symbolique vers virtexec
  sont :


    virtpasswd -- changer le mot de passe d'un utilisateur

    virtadduser -- ajouter un utilisateur

    virtdeluser -- supprimer un utilisateur


    virtsmbstatus -- consulter l'tat de samba

    virtvi -- diter un fichier

    virtmailq -- vrifier la mailq

    virtnewaliases -- reconstruire la table des alias mail


  55..  DDNNSS

  Vous pouvez configurer le DNS normalement. Vous pouvez consulter le
  DNS HOWTO.


  66..  SSyyssllooggdd

  66..11..  PPrroobbllmmee

  Syslog est l'outil de _l_o_g_g_i_n_g couramment utilis sur les systmes
  UNIX. C'est un dmon qui ouvre un fichier spcial appel FIFO. Une
  FIFO est un fichier spcial, se comportant comme une file d'attente.
  Tout ce qui y est crit "ressortira" en lecture. Le dmon syslog
  attend les donnes en lecture. Il existe des fonctions C pour crire
  dans les FIFO. Si vous utilisez ces fonctions C dans vos programmes,
  la sortie ira vers syslod.

  Souvenez vous que vous avez utilis chroot et que la FIFO que syslog
  lit /dev/log ne se trouve pas dans l'environnement virtuel. Cela
  implique qu'aucun des environnements virtuels ne pourra utiliser
  syslog. Nous ne pouvons pas tout simplement copier le fichier, puisque
  les programmes utiliseraient /dev/log au lieu du nouveau que nous
  aurions cr.


  66..22..  SSoolluuttiioonn


  Syslog peut scruter d'autres FIFO si vous le lui dites en ligne de
  commande. Lancez donc syslog avec l'argument :


  syslog -p /virtual/log



  Faites alors un lien de /dev/log vers /virtual/log (un lien
  symbolique) :


  ln -sf /virtual/log /dev/log



  Puis liez toutes les copies de /dev/log vers ce fichier avec la
  commande (attention, c'est un lien NON symbolique) :


  ln /virtual/log /virtual/domain.com/dev/log



  Le script virtfs ci-dessus le fait pour vous. Puisque /virtual est un
  disque entier, et que les /dev/log sont lis, ils ont le mme numro
  d'inode et pointent vers les mmes donnes. Le chroot ne peut pas
  empcher cela, et donc tous vos /dev/log virtuels vont  prsent
  fonctionner. Notez galement que tous les messages de toutes les
  machines virtuelles seront crits dans un mme fichier. Cependant,
  vous pouvez crire des programmes pour filtrer les donnes.


  66..22..11..  SSyyssllooggdd..iinniitt

  Cette version du fichier syslog.init refait les liens vers les
  /dev/log  chaque fois que vous le lancez. Voici un syslog.init
  modifi :


  #!/bin/sh

  # Source function library.
  . /etc/rc.d/init.d/functions

  case "$1" in
    start)
          echo -n "Starting dev log: "
          ln -sf /virtual/log /dev/log
          echo done
          echo -n "Starting system loggers: "
          daemon syslogd -p /virtual/log
          daemon klogd
          echo
          echo -n "Starting virtual dev log: "
          for i in /virtual/*
          do
                  if [ ! -d "$i" ]
                  then
                          continue
                  fi
                  if [ "$i" = "/virtual/lost+found" ]
                  then
                          continue
                  fi
                  ln -f /virtual/log $i/dev/log
                  echo -n "."
          done
          echo " done"
          touch /var/lock/subsys/syslog
          ;;
    stop)
          echo -n "Shutting down system loggers: "
          killproc syslogd
          killproc klogd
          echo
          rm -f /var/lock/subsys/syslog
          ;;
    *)
          echo "Usage: syslog {start|stop}"
          exit 1
  esac

  exit 0




  66..33..  PPlluussiieeuurrss ssyysslloodd

  66..33..11..  UUnn ppaarr ddiissqquuee

  Si vous manquez de place sur un systme de fichiers, et que vous devez
  sparer vos domaines virtuels en plusieurs disques, rappellez-vous que
  les liens (non symboliques) ne peuvent pas passer  travers plusieurs
  disques. Ce qui implique de devoir lancer un syslogd pour chaque
  groupe de domaine par disque.  Par exemple, si vous avez 13 domaines
  sur /virtual1 et 15 sur /virtual2, vous devrez faire un lien pour les
  13 domaines sur /virtual1/log et lancer syslogd avec
   syslogd -p /virtual1/log , ainsi qu'un lien pour les 15 domaines sur
  /virtual2/log et lancer  syslogd -p /virtual2/log .


  66..33..22..  UUnn ppaarr ddoommaaiinnee

  Si vous ne voulez pas centrer les logs sur un seul endroit, vous
  pouvez aussi lancer un syslogd par domaine. Cela donne des pertes de
  processus ID, donc je ne le recommande pas, mais c'est facile  mettre
  en oeuvre. Vous devriez modifier votre fichier syslod.init pour lancer
  syslogd par  chroot /virtual/domain1.com syslogd  pour chaque domaine.
  Ceci lancera syslogd dans le  chroot et les logs se trouveront dans
  /virtual/domain1.com/var/log au lieu d'tre tous rassembls dans
  /var/log.  N'oubliez pas de lancer syslod normalement  syslod  pour le
  systme principal ainsi qu'un logger pour le noyau  klogd .


  77..  FFTTPP vviirrttuueell

  77..11..  IInneettdd

  Wu-ftpd intgre en standard le support des domaines virtuels.
  Cependant, vous ne pouvez pas utiliser des fichiers de mot de passe
  diffrents pour chaque domaine. Par exemple, si bob@domaine1.com et
  bob@domaine2.com dsirent tous les deux un compte, vous devrez donner
   l'un des deux le nom bob2 ou demander  un des utilisateurs de
  choisir un autre nom de login. Puisque vous disposez  prsent de
  systmes de fichiers diffrents pour chaque domaine, vous disposez de
  fichiers de mot de passe diffrents et ce problme disparat. Vous
  n'avez qu' crer un script virtnewuser et virtpasswd de la faon qui
  est explique ci-dessus, et tout fonctionnera.


  Les entres pour wu-ftp dans inetd.conf sont :


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp wu.ftpd -l -a




  77..22..  LLeess FFTTPP aannoonnyymmeess

  Ils ne sont pas affects par la presence de virtuald.  Pour un
  utilisateur anonyme, crer l'utilisateur FTP dans
  /virtual/domain1.com/etc/passwd comme vous le feriez d'habitude.


  ftp:x:14:50:Anonymous FTP:/var/ftp:/bin/false




  Puis l'installation du rpertoire anonyme du FTP. Vous avez des
  fichier de mot de passe spars, donc vous pouvez restreindre
  n'importe quel domaine  un FTP avec un compte anonyme.  Notez que
  comme le serveur  un  chroot  dans le rpertoire /virtual/domain1.com
  vous n'avez pas a prfixer de chemins avec.


  77..33..  UUttiilliissaatteeuurrss ddee FFTTPP VViirrttuueell

  Wu-ftpd supporte quelque chose qui s'appelle un groupe d'invit (guest
  group).  a permet de crer diffrentes zones FTP pour chaque
  utilisateur. Le serveur FTP fait un  chroot  vers la zone specifie,
  donc, l'utilisateur ne peut sortir du rpertoire. Si vous crez un
  utilisateur dans un domaine virtuel, il ne sera pas capable de voir le
  systme de fichiers Systme.


  Ajouter le group guest au fichier /virtual/domain1.com/etc/ftpaccess.


  Crer une entre dans /virtual/domain1.com/etc/passwd avec  chroot et
  le rpertoire home de dpart spar par  /./  :


  guest1:x:8500:51:Guest FTP:/home/g/guest1/./incoming:/bin/false




  Puis installer le home du guest comme vous feriez pour un FTP anonyme.
  Vous avez des fichiers de mots de passe separs pour chaque domaine,
  donc vous pouvez spcifier quel domaine dispose d'un compte guest et
  les utilisateurs qui sont des utilisateurs guest dans un domaine.
  Notez que depuis que le serveur FTP est
   chroot  vers le repertoire /virtual/domain1.com vous n'avez pas 
  prfixer de chemin.


  88..  WWeebb vviirrttuueell

  88..11..  LLaanncceemmeenntt aavveecc vviirrttuuaalldd

  88..11..11..  NNoonn rreeccoommmmaanndd

  Apache supporte en standard la gestion des domaines virtuels. C'est
  d'ailleurs le seul programme pour lequel je recommande d'utiliser le
  systme de gestion des domaines virtuels fourni avec. Lorsque vous
  lancez un programme par l'intermdiaire d'inetd, il y a un cot
  supplmentaire, puisque le programme doit dmarrer  chaque fois qu'il
  y a une demande de connexion, et vous obtenez des temps de rponse
  beaucoup plus longs, inacceptables pour le web. Apache intgre
  galement un mcanisme pour stopper les connexions lorsqu'elles sont
  trop nombreuses.


  Comme il est simplement indiqu ci-dessus, rendre virtuel Apache avec
  virtuald est une tres mauvaise ide. Le but de virtuald est de combler
  la lacune des serveurs qui n'ont pas leur propre systeme interne pour
  faire ce travail. Virtuald n'est pas fait pour remplacer du bon code
  qui remplit dj la tche.


  Ce qui suit ne restera pas ici, c'est pour expliquer  ceux qui sont
  assez idiots pour le faire.


  88..11..22..  IInneettdd

  ditez /etc/inetd.conf




  vi /etc/inetd.conf # Ajouter cette ligne
  www stream tcp nowait www /usr/local/bin/virtuald \
          virtuald /virtual/conf.www httpd -f /var/www/conf/httpd.conf




  88..11..33..  HHttttppdd..ccoonnff

  ditez /var/www/conf/httpd.conf


  vi /var/www/conf/httpd.conf # O l'emplacement des fichiers de configuration d'Apache
  Il doit y avoir :
  ServerType standalone

  Remplacez-le par :
  ServerType inetd




  88..11..44..  CCoonnffiigguurraattiioonn

  Ensuite, configurez chaque cas du serveur Apache comme si vous n'aviez
  qu'un seul domaine.


  88..11..55..  HHttttppdd..iinniitt

  Un fichier httpd.init n'est pas ncssaire si le serveur est lanc par
  inetd.


  88..22..  LLaanncceerr AAppaacchhee aavveecc VViirrttuuaallHHoosstt

  Apache a trois fichiers de configuration  access.conf ,  httpd.conf et
  srm.conf . De nouvelles versions d'Apache ont rendues les trois
  fichiers de configuration inutiles. Ainsi, je trouve que sparer en
  trois sections la configuration la rend plus simple  grer, donc je
  garderai ce style dans le HOWTO.


  88..22..11..  AAcccceessss..ccoonnff

  Ce fichier de configuration est utilis pour contrler l'accs aux
  rpertoires dans la structure du rpertoire web. Voici un exemple de
  fichier de configuration qui montre comment avoir plusieurs options
  pour chaque domaine.

















  # /var/www/conf/access.conf: Configuration des accs globaux

  # Les options sont herites du rpertoire prcedent
  # Mettre les options par dfaut pour le rpertoire principal
  <Directory />
  AllowOverride None
  Options Indexes
  </Directory>

  # Crer un rpertoire proteg par mot de passe pour un domaine
  <Directory /virtual/domain1.com/var/www/html/priv>
  AuthUserFile /var/www/passwd/domain1.com-priv
  AuthGroupFile /var/www/passwd/domain1.com-priv-g
  AuthName PRIVSECTION
  AuthType Basic
  <Limit GET PUT POST>
  require valid-user
  </Limit>
  </Directory>

  # Crer un autre domaine Server Side Include (SSI)
  <Directory /virtual/domain2.com/var/www/html>
  Options IncludesNOEXEC
  </Directory>




  88..22..22..  HHttttppdd..ccoonnff

  Ce fichier de configuration est utilis pour contrler les options
  principales du serveur Apache. Voici un exemple de fichier de
  configuration qui montre comment avoir diffrentes options pour chaque
  domaine.
































  # /var/www/conf/httpd.conf: Fichier de configuration principal du serveur

  # Dbut: Section principale
  ServerType standalone

  # Numro du port
  Port 80

  # Log des clients avec le nom et l'IP
  HostnameLookups on

  # Utilisateur qui lance le serveur
  User www
  Group www

  # Emplacement des fichiers de config, erreurs et log
  ServerRoot /var/www

  # Processus ID du serveur dans ce fichier
  PidFile /var/run/httpd.pid

  # Informations du processus interne du serveur
  ScoreBoardFile /var/www/logs/apache_status

  # Les options du Timeout et KeepAlive
  Timeout 400
  KeepAlive 5
  KeepAliveTimeout 15

  # Nombre de Serveur  lancer
  MinSpareServers 5
  MaxSpareServers 10
  StarsServers 5
  MaxClients 150
  MaxRequestsPerChild 30

  # Fin: Section de configuration principale

  # Dbut: Section de l'hbergement virtuel

  # Indique au serveur d'accepter les connexions pour IP:Port
  # Il y a une ligne pour chaque IP ncessaire donc, vous pouvez ignorer certains
  # domaines
  Listen 10.10.10.129:80
  Listen 10.10.10.130:80

  # La commande VirtualHost permet de spcifier un autre domaine virtuel sur le
  # serveur. La plupart des options d'Apache peuvent tre spcifies dans cette
  # section.
  <VirtualHost www.domain1.com>

  # E-mail  laquelle sont envoyes les erreurs
  ServerAdmin webmaster@domain1.com

  # Endroit o sont mis les documents du domaine virtuel
  DocumentRoot /virtual/domain1.com/var/www/html

  # Nom du serveur
  ServerName www.domain1.com

  # Fichiers de Log relatifs  l'option ServerRoot
  ErrorLog logs/domain1.com-error_log
  TransferLog logs/domain1.com-access_log
  RefererLog logs/domain1.com-referer_log
  AgentLog logs/domain1.com-agent_log

  # Utiliser les scripts CGI dans ce domaine
  ScriptAlias /cgi-bin/ /var/www/cgi-bin/domain1.com/
  AddHandler cgi-script .cgi
  AddHandler cgi-script .pl
  </VirtualHost>

  <VirtualHost www.domain2.com>

  # E-mail  laquelle sont envoyes les erreurs
  ServerAdmin webmaster@domain2.com

  # Endroit o sont mis les documents du domaine virtuel
  DocumentRoot /virtual/domain2.com/var/www/html

  # Nom du Serveur
  ServerName www.domain2.com

  # Fichiers de Log relatifs  l'option ServerRoot
  ErrorLog logs/domain2.com-error_log
  TransferLog logs/domain2.com-access_log
  RefererLog logs/domain2.com-referer_log
  AgentLog logs/domain2.com-agent_log

  # Pas de script CGI pour ce domaine
  </VirtualHost>
  # Fin: Section de l'hebergement virtuel




  88..22..33..  SSrrmm..ccoonnff

  Ce fichier de configuration est utilis pour contrler comment sont
  servies les demandes et comment sont formatts les rsultats. Vous
  n'avez pas besoin d'diter quoi que ce soit ici pour les domaines
  virtuels. Le fichier de configuration de base d'Apache doit
  fonctionner.


  88..22..44..  HHttttppdd..iinniitt

  Rien de spcial n'est  faire dans ce fichier. Utilisez la version de
  base qui est fournie avec Apache.


  88..33..  DDeessccrriipptteeuurrss ddee ffiicchhiieerrss :: lliimmiittee ddee ccaappaacciitt

  88..33..11..  AAtttteennttiioonn

  Cela s'applique seulement  la version standalone du serveur Apache.
  Un serveur qui se lance au travers d'inetd n'intervient pas avec les
  autres domaines et  accs  toute la table des descripteurs de
  fichiers.


  Chaque fichier de log qu'ouvre Apache est un autre descripteur de
  fichier pour le processus. Il y a une limite de 256 descripteurs de
  fichier par processus au coeur du systeme Linux. Depuis que vous avez
  plusieurs domaines, vous utilisez plus de descripteurs de fichiers. Si
  vous avez trop de domaines tournant sur un processus du serveur
  Apache, vous pouvez engorger cette table. Cela peut impliquer que
  certains logs ne fonctionneront pas et que certains CGI seront
  interrompus.



  88..33..22..  PPlluussiieeuurrss sseerrvveeuurr AAppaacchhee

  Si vous prvoyez cinq descripteurs de fichiers par domaine, vous
  pouvez avoir 50 domaines tournant sur votre serveur Apache sans
  problmes. Mais, si votre serveur a des problmes, vous pouvez crer
  /var/www1 avec un serveur Apache qui s'occupe des domaines 1  25 et
  /var/www2 avec un autre serveur qui s'occupe des domaines 26  50.
  Ainsi, chaque serveur aura son propre fichier de configuration,
  d'erreurs et de log. Chaque serveur doit tre configur separement
  avec ses propres directives de Listen et VirtualHost. Et n'oubliez pas
  de lancer plusieurs serveurs dans votre fichier httpd.ini.


  88..44..  HHbbeerrggeerr pplluussiieeuurrss sseerrvveeuurrss aavveecc uunnee IIPP

  88..44..11..  ccoonnoommiisseerr ddeess IIPP

  La version 1.1 du protocole HTTP (HyperText Transfer Protocol) inclue
  une fonction qui communique le nom du serveur au client. Ce qui
  implique que le client n'a pas besoin de rechercher le nom du serveur
   partir de son adresse IP. Comme a, deux serveurs virtuels peuvent
  avoir la mme adresse IP et tre deux site Web diffrents. La
  configuration d'Apache est la mme qu'avant,  part que vous n'avez
  pas besoin de mettre plusieurs directives Listen comme les deux
  domaines ont la mme IP.


  88..44..22..  IInnccoonnvvnniieenntt

  Le seul problme est que virtuald utilise les adresses IP pour
  distinguer les domaines. Dans sa forme actuelle Virtuald ne serait pas
  capable de  chroot vers un rpertoire de mail (spool) pour chaque
  domaine. Donc, les mails ne peuvent etre reus que sur une IP et il
  n'y aurait plus un rpertoire spool pour chaque domaine. Tous les
  clients d'un serveur web partageant une IP devront se partager le meme
  repertoire spool. Ce qui signifierait que dupliquer les noms
  d'utilisateurs serait encore une solution. Enfin, c'est le prix 
  payer pour conomiser une IP.


  88..55..  PPlluuss dd''iinnffoorrmmaattiioonnss

  Ce HOWTO montre seulement comment implmenter le support virtuel sur
  le serveur Web Apache.  La plupart des serveur Web utilisent une
  interface similaire. Pour plus d'informations sur l'hbergement de web
  virtuel, consultez le WWW-HOWTO, la documentation d'Apache sur le Site
  d'Apache, ou la documentation sur ApacheWeek.


  99..  MMaaiill vviirrttuueell aavveecc PPoopp

  99..11..  PPrroobbllmmee

  Le support du mail virtuel est une demande toujours grandissante.
  Sendmail affirme qu'il supporte le mail virtuel. En fait, il se
  contente d'tre  l'coute de mail pour diffrents domaines. Vous
  pouvez alors demander  faire suivre le mail quelque part. Cependant,
  si vous le faites suivre sur la machine locale et que vous avez du
  mail pour bob@domaine1.com et bob@domaine2.com, ils vont atteindre la
  mme bote. C'est un problme puisque les bob sont deux personnes
  diffrentes, avec du courrier lectronique diffrent.





  99..22..  SSoolluuttiioonn

  Vous pouvez vous assurer que chaque nom d'utilisateur est unique en
  utilisant une numrotation des noms d'utilisateurs : bob1, bob2,
  etc... Vous pourriez galement hacker le mail et le pop pour que ces
  conversions soient invisibles, mais cela peut devenir dsordonn. Le
  mail sortant  pour domaine domaineprincipal.com et vous dsirez que
  chaque mail envoy dans chaque sous-domaine ait une adresse From:
  diffrente.


  J'ai deux solutions. L'une fonctionne avec sendmail et l'autre avec
  Qmail. La solution avec sendmail devrait fonctionner avec une
  installation standard de sendmail. Cependant elle partage toutes les
  limitations tablies dans sendmail. Il est ncessaire aussi qu'un
  sendmail ait t lanc en mode de file d'attente (queue mode) pour
  chaque domaine. Avoir 50 ou plus processus sendmail en mode de file
  d'attente qui se rveillent toutes les heures peut ajouter des
  contraintes sur une machine.


  La solution pour Qmail ne requiert pas plusieurs exemplaires de Qmail
  et peut n'utiliser qu'un seul rpertoire de file d'attente. Il a
  besoin d'un autre programme puisque que Qmail ne se fonde pas sur
  virtuald. Je crois qu'une procdure similaire peut tre faite avec
  Sendmail. Cependant, Qmail se prte plus aisment  cette solution.


  Je ne cautionne aucun des deux programmes en particulier.
  L'installation de Sendmail est un peu moins complexe mais Qmail est
  pobablement le plus puissant des deux paquetages de serveur Mail.


  99..33..  SSoolluuttiioonn ppoouurr SSeennddmmaaiill

  99..33..11..  IInnttrroodduuccttiioonn

  Chaque systme de fichiers virtuel fournit  chaque domaine un fichier
  /etc/passwd. Cela signifie que bob@domaine1.com et bob@domaine2.com
  sont des utilisateurs diffrents dans des fichiers /etc/passwd
  diffrents, donc le mail ne constituera aucun problme. Ils possdent
  galement chacun un spool de mail, donc les botes aux lettres seront
  des fichiers diffrents sur des systme de fichiers virtuels
  diffrents.


  99..33..22..  CCrreerr uunn ffiicchhiieerr ddee ccoonnffiigguurraattiioonn SSeennddmmaaiill

  Crez  /etc/sendmail.cf  comme vous le feriez d'habitude avec m4 :


  divert(0)
  VERSIONID(`tcpproto.mc')
  OSTYPE(linux)
  FEATURE(redirect)
  FEATURE(always_add_domain)
  FEATURE(use_cw_file)
  FEATURE(local_procmail)
  MAILER(local)
  MAILER(smtp)






  99..33..33..  ddiittiioonn dduu ffiicchhiieerr ddee ccoonnffiigguurraattiioonn

  ditez /virtual/domain1.com/etc/sendmail.cf pour l'adapter  votre
  domaine virtuel :


  vi /virtual/domain1.com/etc/sendmail.cf


  Approximativement  la ligne 86 il doit y avoir :

  #Dj$w.Foo.COM


  Remplacez-le avec :

  Djdomain1.com




  99..33..44..  DDiissttrriibbuuttiioonn llooccaallee ppaarr SSeennddmmaaiill

  ditez /virtual/domain1.com/etc/sendmail.cw

  vi /virtual/domain1.com/etc/sendmail.cw
  mail.domain1.com
  domain1.com
  domain1
  localhost




  99..33..55..  SSeennddmmaaiill eett lleess ddoommaaiinneess vviirrttuueellss :: llaa bbiiddoouuiillllee ((pprree88..88..66))

  Cependant, sendmail ncessite un changement mineur de son code source.
  Sendmail utilise un fichier nomm /etc/sendmail.cw qui contient tous
  les noms de machine pour lequel il distribuera le mail localement au
  lieu de le faire suivre  une autre machine. Sendmail fait une
  vrification interne de toutes les interfaces rseau de la machine
  pour initialiser cette liste avec les adresses IP locales. Cela
  prsente un problme si vous envoyez des mails entre deux domaines
  virtuels de la mme machine. Sendmail pensera que l'autre domaine
  virtuel est une adresse locale et il distribuera le mail localement.
  Par exemple, bob@domaine1.com envoie un mail  fred@domaine2.com.
  Puisque le sendmail de domaine1.com pense que domaine2.com est une
  adresse locale, il va envoyer ce mail  domaine1.com et ne l'enverra
  jamais  domaine2.com. Vous avez  modifier sendmail (ce que j'ai fait
  sans problme sur la version 8.8.6) :


  vi v8.8.5/src/main.c


  Vers la ligne 494 vous devriez remplacer la ligne :

  load_if_names();


  Par :

  /* load_if_names(); Comment puisque cela casse les domaines virtuels */



  Notez que cette modification n'est ncessaire que si vous dsirez
  envoyer du mail entre des domaines virtuels, ce qui est probable, je
  pense.


  Cela corrigera le problme. Cependant, l'adaptateur rseau principal
  eth0 n'est pas supprim. Ainsi, si vous envoyez un mail depuis une
  adresse IP virtuelle vers une adresse sur eth0 de la mme machine, il
  sera dlivr localement. Pour cela, j'utilise une adresse IP bidon
  virtuel1.domaine.com (10.10.10.157). Je n'envoie jamais de mail  cet
  hte, les domaines virtuels non plus. C'est aussi l'adresse IP que
  j'utiliserai pour me connecter sur la machine via ssh, pour vrifier
  si le systme fonctionne.


  99..33..66..  SSeennddmmaaiill eett lleess ddoommaaiinneess vviirrttuueellss :: NNoouuvveellllee ffoonnccttiioonn
  ((PPOOSSTT88..88..66))

  Depuis la version 8.8.6 de Sendmail, il existe une option qui
  dsactive le chargement des interfaces rseaux supplmentaires. Ce qui
  implique la NON ncssit de toucher au code source. Elle s'appelle
  DontProbeInterfaces .


  Editer /virtual/domain1.com/etc/sendmail.cf

  vi /virtual/domain1.com/etc/sendmail.cf


  Ajouter la ligne :

  O DontProbeInterfaces=True




  99..33..77..  SSeennddmmaaiill..iinniitt

  Sendmail ne peut pas tre lanc tel quel, vous allez devoir le lancer
   travers inetd. C'est un moyen inefficace qui implique un temps de
  rponse plus long, mais si vous avez un site tellement occup pour que
  la diffrence soit importante, alors vous devriez utiliser une machine
  ddie  ce site. Notez que vous ne de devez PAS utiliser l'option
  -bd. Notez galement que vous devez lancer sendmail -q pour chaque
  domaine que vous grez. Le nouveau fichier sendmail.init est le
  suivant :




















  #!/bin/sh

  # Source function library.
  . /etc/rc.d/init.d/functions

  case "$1" in
    start)
          echo -n "Starting sendmail: "
          daemon sendmail -q1h
          echo
          echo -n "Starting virtual sendmail: "
          for i in /virtual/*
          do
                  if [ ! -d "$i" ]
                  then
                          continue
                  fi
                  if [ "$i" = "/virtual/lost+found" ]
                  then
                          continue
                  fi
                  chroot $i sendmail -q1h
                  echo -n "."
          done
          echo " done"
          touch /var/lock/subsys/sendmail
          ;;
    stop)
          echo -n "Stopping sendmail: "
          killproc sendmail
          echo
          rm -f /var/lock/subsys/sendmail
          ;;
    *)
          echo "Usage: sendmail {start|stop}"
          exit 1
  esac

  exit 0




  99..33..88..  CCoonnffiigguurraattiioonn dd''iinneettdd

  Pop devrait s'installer normalement, sans effort supplmentaire. Vous
  n'avez qu' modifier l'entre pour pop dans le fichier inetd.conf pour
  utiliser le dmon virtuald. Pour sendmail et pop, cela donne :


  pop-3 stream tcp nowait root /usr/bin/virtuald \
          virtuald /virtual/conf.pop in.qpop -s
  smtp stream tcp nowait root /usr/bin/virtuald \
          virtuald /virtual/conf.mail sendmail -bs




  99..44..  SSoolluuttiioonn ppoouurr QQmmaaiill

  99..44..11..  IInnttrroodduuccttiioonn

  Cette solution prend la responsabilit de distribution du qmail-local,
  donc l'utilisation des fichiers .qmail dans les rpertoire home des
  domaines virtuels ne marcheront pas. Cependant, chaque domaine aura
  toujours un utilisateur matre par domaine qui contrlera les aliasing
  du domaine. Deux programmes externes seront utiliss pour le fichier
  .qmail-default  des matres de domaine.  Le mail passera par ces deux
  programmes afin de distribuer le courrier  chaque domaine.


  Deux programmes sont necssaires, car l'un deux est lanc avec le
  setuid root.  C'est un petit programme qui se change en un utilisateur
  non administrateur et lance le second programme. Consultez le site le
  plus proche relatif  la scurit pour une discussion sur le pourquoi
  est-ce ncessaire.


  Cette solution se passe de virtuald. Qmail est assez flexible pour ne
  pas avoir besoin d'une configuration virtuald gnerale. La conception
  de Qmail utilise l'enchanement de programmes pour distribuer les
  mails. Cette conception facilite l'insertion d'une section virtuelle
  dans le processus de distribution de Qmail sans altrer une
  installation standard de Qmail.


  Depuis que vous utilisez Qmail, tout nom de domaine non qualifi sera
  dvelopp en utilisant le serveur principal. C'est d au fait que vous
  n'avez pas un Qmail pour chaque domaine. Donc, soyez sr que vos
  clients (Eudora, elm, mutt, etc.) puissent developper tous vos noms de
  domaines non qualifis.


  99..44..22..  IInnssttaallllaattiioonn ddeess ddoommaaiinneess vviirrttuueellss

  Qmail doit tre configur de manire  accepter les mails pour chaque
  domaine que vous dsservez. Tapez la commande suivante :


  echo "domain1.com:domain1" >> /var/qmail/control/virtualdomains




  99..44..33..  IInnssttaallllaattiioonn ddee ll''uuttiilliissaatteeuurr mmaattrree dduu ddoommaaiinnee

  Ajouter  votre fichier  /etc/passwd  principal l'utilisateur domain1.
  Je choisirais le shell /bin/false pour que le matre du domaine ne
  puisse se connecter.  Cet utilisateur sera capable d'ajouter des
  fichier .qmail et tous les mails passeront par ce compte. Notez que
  les noms d'utilisateurs ne peuvent faire que 8 caractres et les noms
  de domaines peuvent tre plus long. Les caractres restants seront
  ignors. Ce qui implique, que les utilisateurs domain12 et domain123
  seraient le mme utilisateur et Qmail pourra tre perturb. Donc,
  attention  votre convention pour nommer les utilisateurs matres des
  domaines.


  Crer les fichiers .qmail du matre de domaine avec les commandes
  suivantes. Ajoutez les autres alias systme au mme endroit. Par
  exemple, webmaster ou hostmaster.


  echo "user@domain1.com" > /home/d/domain1/.qmail-mail-daemon
  echo "user@domain1.com" > /home/d/domain1/.qmail-postmaster
  echo "user@domain1.com" > /home/d/domain1/.qmail-root



  Crez le fichier .qmail-default du matre de domaine. Il filtre tous
  les mails du domaine virtuel.

  echo "| /usr/local/bin/virtmailfilter" > /home/d/domain1/.qmail-default




  99..44..44..  TTccppsseerrvveerr

  Qmail a besoin d'un pop spcial qui supporte le format maildir. Le
  programme pop doit tre rendu virtuel. L'auteur de Qmail recommande
  d'utiliser  tcpserver (un remplacement  inetd) avec Qmail, donc mes
  exemples utilisent tcpserver et NON inetd.


  Tcpserver n'a pas besoin de fichier de configuration. Toutes les
  informations peuvent etre passes par une ligne de commande. Ci-
  dessous, se trouve le fichier tcpserver.ini que vous devez utiliser
  pour le dmon mail et le serveur pop :


  #!/bin/sh

  . /etc/rc.d/init.d/functions

  QMAILDUSER=`grep qmaild /etc/passwd | cut -d: -f3`
  QMAILDGROUP=`grep qmaild /etc/passwd | cut -d: -f4`

  # Regarder comment nous tions appells.
  case "$1" in
    start)
          echo -n "Starting tcpserver: "
          tcpserver -u 0 -g 0 0 pop-3 /usr/local/bin/virtuald \
                  /virtual/conf.pop qmail-popup virt.domain1.com \
                  /bin/checkpassword /bin/qmail-pop3d Maildir &
          echo -n "pop "
          tcpserver -u $QMAILDUSER -g $QMAILDGROUP 0 smtp \
                  /var/qmail/bin/qmail-smtpd &
          echo -n "qmail "
          echo
          touch /var/lock/subsys/tcpserver
          ;;
    stop)
          echo -n "Stopping tcpserver: "
          killall -TERM tcpserver
          echo -n "killing "
          echo
          rm -f /var/lock/subsys/tcpserver
          ;;
    *)
          echo "Usage: tcpserver {start|stop}"
          exit 1
  esac

  exit 0




  99..44..55..  QQmmaaiill..iinniitt

  Vous pouvez utiliser le script standard de Qmail.init fourni. Qmail
  est livr avec une trs bonne documentation dcrivant comment le
  mettre en place.




  99..44..66..  SSoouurrccee

  Vous avez besoin de deux autres programmes pour que votre serveur mail
  virtuel fonctionne avec Qmail. Ce sont virtmailfilter et
  virtmaildelivery.  Ceci est le code source en C de virtmailfilter. Il
  doit tre install dans /usr/local/bin avec les permissions 4750,
  l'utilisateur root et le groupe nofiles.



























































  #include <sys/wait.h>
  #include <unistd.h>
  #include <string.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <ctype.h>
  #include <pwd.h>

  #define VIRTPRE                 "/virtual"

  #define VIRTPWFILE              "etc/passwd"
  #define VIRTDELIVERY            "/usr/local/bin/virtmaildelivery"
  #define VIRTDELIVERY0           "virtmaildelivery"

  #define PERM                    100
  #define TEMP                    111
  #define BUFSIZE                 8192

  int main(int argc,char **argv)
  {
          char *username,*usernameptr,*domain,*domainptr,*homedir;
          char virtpath[BUFSIZE];
          struct passwd *p;
          FILE *fppw;
          int status;
          gid_t gid;
          pid_t pid;

          if (!(username=getenv("EXT")))
          {
                  fprintf(stdout,"environment variable EXT not set\n");
                  exit(TEMP);
          }

          for(usernameptr=username;*usernameptr;usernameptr++)
          {
                  *usernameptr=tolower(*usernameptr);
          }

          if (!(domain=getenv("HOST")))
          {
                  fprintf(stdout,"environment variable HOST not set\n");
                  exit(TEMP);
          }

          for(domainptr=domain;*domainptr;domainptr++)
          {
                  if (*domainptr=='.' && *(domainptr+1)=='.')
                  {
                          fprintf(stdout,"environment variable HOST has ..\n");
                          exit(TEMP);
                  }
                  if (*domainptr=='/')
                  {
                          fprintf(stdout,"environment variable HOST has /\n");
                          exit(TEMP);
                  }

                  *domainptr=tolower(*domainptr);
          }

          for(domainptr=domain;;)
          {
                  snprintf(virtpath,BUFSIZE,"%s/%s",VIRTPRE,domainptr);
                  if (chdir(virtpath)>=0)
                          break;
                  if (!(domainptr=strchr(domainptr,'.')))
                  {
                          fprintf(stdout,"domain failed: %s\n",domain);
                          exit(TEMP);
                  }

                  domainptr++;
          }

          if (!(fppw=fopen(VIRTPWFILE,"r+")))
          {
                  fprintf(stdout,"fopen failed: %s\n",VIRTPWFILE);
                  exit(TEMP);
          }

          while((p=fgetpwent(fppw))!=NULL)
          {
                  if (!strcmp(p->pw_name,username))
                          break;
          }

          if (!p)
          {
                  fprintf(stdout,"user %s: not exist\n",username);
                  exit(PERM);
          }

          if (fclose(fppw)==EOF)
          {
                  fprintf(stdout,"fclose failed\n");
                  exit(TEMP);
          }

          gid=p->pw_gid;
          homedir=p->pw_dir;

          if (setgid(gid)<0 || setuid(p->pw_uid)<0)
          {
                  fprintf(stdout,"setuid/setgid failed\n");
                  exit(TEMP);
          }

          switch(pid=fork())
          {
                  case -1:
                          fprintf(stdout,"fork failed\n");
                          exit(TEMP);
                  case 0:
                          if (execl(VIRTDELIVERY,VIRTDELIVERY0,username,homedir,NU                        {
                                  fprintf(stdout,"execl failed\n");
                                  exit(TEMP);
                          }
                  default:
                          if (wait(&status)<0)
                          {
                                  fprintf(stdout,"wait failed\n");
                                  exit(TEMP);
                          }
                          if (!WIFEXITED(status))
                          {
                                  fprintf(stdout,"child did not exit normally\n");                        }
                          break;
          }

          exit(WEXITSTATUS(status));
  }
  99..44..77..  SSoouurrccee

  Ceci est le code source de virtmaildelivery. Il doit etre install
  dans /usr/local/bin avec les permissions 0755, l'utilisateur root et
  le groupe root.





























































  #include <sys/stat.h>
  #include <sys/file.h>
  #include <stdlib.h>
  #include <string.h>
  #include <unistd.h>
  #include <stdio.h>
  #include <errno.h>
  #include <time.h>

  #define TEMP                    111
  #define BUFSIZE                 8192
  #define ATTEMPTS                10

  int main(int argc,char **argv)
  {
          char *user,*homedir,*dtline,*rpline,buffer[BUFSIZE],*p,mail[BUFSIZE];
          char maildir[BUFSIZE],newmaildir[BUFSIZE],host[BUFSIZE];
          int fd,n,nl,i,retval;
          struct stat statp;
          time_t thetime;
          pid_t pid;
          FILE *fp;

          retval=0;

          if (!argv[1])
          {
                  fprintf(stdout,"invalid arguments: need username\n");
                  exit(TEMP);
          }

          user=argv[1];

          if (!argv[2])
          {
                  fprintf(stdout,"invalid arguments: need home directory\n");
                  exit(TEMP);
          }

          homedir=argv[2];

          if (!(dtline=getenv("DTLINE")))
          {
                  fprintf(stdout,"environment variable DTLINE not set\n");
                  exit(TEMP);
          }
          if (!(rpline=getenv("RPLINE")))
          {
                  fprintf(stdout,"environment variable RPLINE not set\n");
                  exit(TEMP);
          }

          while (*homedir=='/')
                  homedir++;
          snprintf(maildir,BUFSIZE,"%s/Maildir",homedir);
          if (chdir(maildir)<0)
          {
                  fprintf(stdout,"chdir failed: %s\n",maildir);
                  exit(TEMP);
          }

          time(&thetime);
          pid=getpid();
          if (gethostname(host,BUFSIZE)<0)
          {
                  fprintf(stdout,"gethostname failed\n");
                  exit(TEMP);
          }

          for(i=0;i<ATTEMPTS;i++)
          {
                  snprintf(mail,BUFSIZE,"tmp/%u.%d.%s",thetime,pid,host);
                  errno=0;
                  stat(mail,&statp);
                  if (errno==ENOENT)
                          break;

                  sleep(2);
                  time(&thetime);
          }
          if (i>=ATTEMPTS)
          {
                  fprintf(stdout,"could not create %s\n",mail);
                  exit(TEMP);
          }

          if (!(fp=fopen(mail,"w+")))
          {
                  fprintf(stdout,"fopen failed: %s\n",mail);
                  retval=TEMP; goto unlinkit;
          }

          fd=fileno(fp);

          if (fprintf(fp,"%s",rpline)<0)
          {
                  fprintf(stdout,"fprintf failed\n");
                  retval=TEMP; goto unlinkit;
          }

          if (fprintf(fp,"%s",dtline)<0)
          {
                  fprintf(stdout,"fprintf failed\n");
                  retval=TEMP; goto unlinkit;
          }

          while(fgets(buffer,BUFSIZE,stdin))
          {
                  for(p=buffer;*p=='>';p++)
                          ;

                  if (!strncmp(p,"From ",5))
                  {
                          if (fputc('>',fp)<0)
                          {
                                  fprintf(stdout,"fputc failed\n");
                                  retval=TEMP; goto unlinkit;
                          }
                  }

                  if (fprintf(fp,"%s",buffer)<0)
                  {
                          fprintf(stdout,"fprintf failed\n");
                          retval=TEMP; goto unlinkit;
                  }
          }

          p=buffer+strlen(buffer);
          nl=2;
          if (*p=='\n')
                  nl=1;

          for(n=0;n<nl;n++)
          {
                  if (fputc('\n',fp)<0)
                  {
                          fprintf(stdout,"fputc failed\n");
                          retval=TEMP; goto unlinkit;
                  }
          }

          if (fsync(fd)<0)
          {
                  fprintf(stdout,"fsync failed\n");
                  retval=TEMP; goto unlinkit;
          }

          if (fclose(fp)==EOF)
          {
                  fprintf(stdout,"fclose failed\n");
                  retval=TEMP; goto unlinkit;
          }

          snprintf(newmaildir,BUFSIZE,"new/%u.%d.%s",thetime,pid,host);
          if (link(mail,newmaildir)<0)
          {
                  fprintf(stdout,"link failed: %s %s\n",mail,newmaildir);
                  retval=TEMP; goto unlinkit;
          }

  unlinkit:
          if (unlink(mail)<0)
          {
                  fprintf(stdout,"unlink failed: %s\n",mail);
                  retval=TEMP;
          }

          exit(retval);
  }




  99..55..  RReemmeerrcciieemmeennttss

  Merci  Vicente Gonzalez (vince@nycrc.net) pour son aide qui a rendu
  possible la solution pour Qmail. Vous pouvez certainement crire a
  Vince, pour le remercier, ainsi que lui poser vos questions et
  commentaires a propos de Qmail, le reste concernant ce HOWTO devant
  m'tre adress.


  1100..  SSaammbbaa VViirrttuueell

  1100..11..  MMiissee eenn ppllaaccee

  L'installation de Samba Virtuel est trs simple. Soyez sr que les
  fichiers suivants soit installs correctement :


    /virtual/domain1.com/etc/smb.conf FICHIER

    /virtual/domain1.com/var/lock/samba REPERTOIRE

    /virtual/domain1.com/var/log/ REPERTOIRE

    /usr/local/bin/virtsmbstatus SYMLINK /usr/local/bin/virtexec

  1100..22..  IInneettdd

  ditez /etc/inetd.conf


  vi /etc/inetd.conf


  Ajoutez cette ligne :

  netbios-ssn stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.smbd smbd




  1100..33..  SSmmbb..iinniitt

  Un fichier smb.init n'est pas ncessaire tant que le serveur est lanc
  via inetd.


  1111..  LLee rreessttee


  Tout autre service devrait suivre une procdure similaire :


    Lancer virtfs pour ajouter le binaire et les librairies au systme
     de fichiers virtuel ;

    L'ajouter dans /etc/inetd.conf ;

    Crer un fichier /virtual/conf.service ;

    Crer tout script virtuel manquant.


  1122..  CCoonncclluussiioonn

  Voici tout ce dont vous avez besoin. J'espre que cet article rpond 
  vos attentes. Vous pouvez utiliser l'email  Computer Resource Center
  pour tout commentaire (NdT : en anglais bien sr). Si vous avez une
  question, ou si vous me proposez une mise  jour, faites-le moi savoir
  et je l'ajouterai.


  Ce document a rencontr un grand intret. Je remercie toutes les
  personnes qui m'ont envoy des questions et qui m'ont aid  former ce
  document pour obtenir l'intrt des utilisateurs. Avant de me poser
  des questions, je vous recommande de lire la FAQ pour voir si cela n'a
  pas dj t demand. Merci encore.  Brian


  1133..  FFAAQQ

  QQ11. J'ai cr un sendmail.init et syslogd.init. Je les ai mis dans
  /usr/local/bin et essay de les lancer, mais ils me donnent des
  erreurs.


  RR11. Ces fichiers sont appells scripts d'initialisation. Ils sont
  lancs par le programme init quand votre ordinateur dmarre. Ils ne
  vont pas avec les binaires de /usr/local. Consultez le Guide de
  l'Administrateur Systme Linux (Linux System Administrators Guide) ou
  le Guide pour Bien Dmarrer avec Linux (Linux Getting Started Guide)
  pour des informations sur la manire d'utiliser les scripts
  d'initialisation du systme.


  QQ22. J'ai mis ces lignes dans /etc/sendmail.cf :


  divert(0)
  VERSIONID(`tcpproto.mc')
  OSTYPE(linux)
  FEATURE(redirect)
  FEATURE(always_add_domain)
  FEATURE(use_cw_file)
  FEATURE(local_procmail)
  MAILER(local)
  MAILER(smtp)



  Et j'obtiens une sortie vraiment trange. Pourquoi ?


  RR22. Vous ne devez pas mettre ces lignes directement dans
  /etc/sendmail.cf.  Le fichier sendmail.cf a t crit pour que
  sendmail le comprenne facilement et est difficile  lire aux humains.
  Ainsi, pour le rendre facile  configurer, nous utilisons un programme
  appell
   m4  et ses capacits de macros pour crer le fichier  sendmailf.cf .
  Les lignes FEATURE sont en fait des macros qui se dveloppent par
  rapport  la configuration de Sendmail. Lisez la documentation de
  sendmail pour savoir comment configurer sendmail avec cette mthode.
  Aussi, notez que vous crez un fichier /etc/sendmail.cf principal et
  le script virtfs le copie sur /virtual/domain1.com/etc/sendmail.cf.
  Puis, vous ditez ce sendmail.cf pour l'adapter  votre domaine.


  QQ33. Ou puis-je trouver virtuald, qu'est-ce donc et comment
  l'utiliser ?


  RR33. Virtuald est un programme en C que j'ai crit pour lancer un
  service virtuel. Il est inclus dans ce HOWTO. Vous le compilez comme
  un programme C normal :
   make virtuald . Le binaire rsultant est plac dans /usr/local/bin.
  Ajoutez les lignes ncessaires  /etc/inetd.conf pour utiliser
  virtuald comme une facade vers un programme serveur.


  QQ44. Dialog n'est pas install sur mon systme ?


  RR44. Dialog est un programme qui permet d'avoir des fentres dans vos
  scripts shell. Il est ncssaire pour faire fonctionner mon script
  shell virtuel.  Vous pouvez trouver une copie de dialog sur metalab.
  Il ne devrait pas y avoir de problmes pour le compiler et
  l'installer.


  QQ55. Comment puis-je savoir si le syslogd virtuel marche ?


  RR55.  Quand virtuald est lanc, il doit envoyer le message suivant 
  syslogd (/var/log/messages) :



  Nov 19 17:21:07 virtual virtuald[10223]: Virtuald Starting: $Revision: 1.49 $
  Nov 19 17:21:07 virtual virtuald[10223]: Incoming ip: 204.249.11.136
  Nov 19 17:21:07 virtual virtuald[10223]: Chroot dir: /virtual/domain1.com



  Le message du  chroot  est envoy par virtuald une fois l'appel
  systme
   chroot  effectu. Si ce message apparat, alors le syslogd virtuel
  fonctionne. Si le service que vous rendez virtuel logue les messages
  par syslogd et que vous les voyez, c'est aussi un signe que le syslod
  virtuel fonctionne correctement.


  Noter que si vous n'avez pas mis l'option VERBOSELOG lors de la
  compilation, Virtuald ne loguera pas du tout. Le seul moyen de savoir
  si le syslogd virtuel marche dans ce cas l, c'est de voir si un dmon
  qui rend un service virtuel indpendamment, logue quelque chose avec
  syslogd.


  QQ66. Comment puis-je installer des quotas  travers un systme de
  fichiers virtuel ?


  RR66. Vous l'installez comme vous le feriez d'habitude. Aller voir le
  Quota mini-HOWTO.  Cependant, vous devez tre sr qu'il n'y ait pas de
  conflits d'uid entre les domaines. S'il y'a des conflits, les
  utilisateurs devront partager un quota.  Prparez un intervalle d'uid
  qui auront le quota activ et dites aux domaines qu'ils ne peuvent
  avoir d'utilisateurs dans cet intervalle,  part ceux qui sont retenus
  pour avoir un quota.


  QQ77. Que fait cette notation "\" dans toutes les entres du
  inetd.conf ?


  RR77. C'est juste une mthode pour couper une ligne d'un fichier de
  configuration en deux lignes. J'ai fait a pour que les lignes
  puissent avoir un retour  la ligne de manire  obtenir une meilleure
  prsentation. Vous pouvez ingorer le "\" et les rejoindre en une
  seule.


  QQ88. Quand je lance  passwd  ou n'importe quel programme concernant les
  logins, le systme me renvoie  permission denied .  Quand je lance FTP
  ou  su  le systme me renvoi
   no modules loaded for service XXX . Pourquoi ?


  RR88. Ce sont les messages d'erreur de PAM. J'ai crit les scripts avant
  que PAM ne sorte. Mon script virtfs ne copie pas  /etc/pam.d ,
   /usr/lib/cracklib_dict.* ,  /lib/security  ou n'importe quel fichier
  dont PAM a besoin. PAM en a besoin pour fonctionner. Si vous ditez
  mon script virtfs pour copier ces fichiers, il n'y aura plus de
  problmes.


  QQ99. Est-ce que virtuald peut fonctionner avec les hosts.allow et
  hosts.deny de tcpd ?


  RR99. Oui, il peut, mais avec quelques modifications.


  D'abord, le code source doit tre chang en deux endroits.


  Il faut insrer ces lignes l o les arguments sont analyss.


          if (!argv[3])
          {
                  syslog(LOG_ERR,"invalid arguments: no program to run");
                  exit(0);
          }



  La ligne d'excution doit remplacer :


          if (execvp(argv[2],argv+2)<0)



  par :


          if (execvp(argv[2],argv+3)<0)



  Deuximement, les lignes du fichier  inetd.conf  :


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp tcpd wu.ftpd -l -a



  Troisimement, diter les fichier
  /virtual/domain1.com/etc/hosts.allow et
  /virtual/domain1.com/etc/hosts.deny pour mettre vos paramtres.


  QQ1100. Est-ce que mon serveur virtuel peut lancer des CGI ?


  RR1100. Bien sr, mais je vous recommande de mettre le rpertoire
   /cgi-bin   un endroit en dehors du  chroot , o vous seul avez
  accs. Par exemple, /var/www/cgi-bin/domain1.com. Donner l'accs aux
  cients  /cgi-bin leur donne la possibilit de lancer des programmes
  sur votre serveur. C'est un gros trou de scurit. Soyez prudent. Je
  ne laisse aucun CGI tourner sur mon systme sans que je n'ai pas
  personnellement cherch d'ventuels bugs.


  QQ1111. Mes fichiers de configuration sont diffrents de vos exemples.
  Que dois je faire ?


  RR1111 Il y a deux styles de configuration : System V et BSD. Les
  exemples fournis dans ce HOWTO sont bass sur les fichiers de
  configuration System V.  Les services virtuels marchent aussi bien sur
  l'autre systme. Pour des informations sur la mthode pour configurer
  vos fichier de style BSD, consultez l'origine de votre distribution ou
  le site LDP le plus prs.



  QQ1122. Je vous ai envoy un mail et n'ai pas reu de rponses ou alors
  elles ont pris un long moment avant de me parvenir. Pourquoi ?


  RR1122. Vous n'avez srement pas mis VIRTSERVICES HOWTO dans le sujet.
  Sachez que je suis un administrateur rseau, et que parmi mes 20
  heures par jour, j'administre mes machines virtuelles et celles de mes
  clients. Un mail qui est proprement adress aura toujours une rponse
  dans les deux ou trois jours suivants. Les mails mal adresss ne
  seront pas filtrs vers ma bote aux lettres pour VIRTSERVICES, et
  peuvent m'tre inconnus pendant plusieurs jours, voir semaines.


  QQ1133. Est-ce que virtuald marche avec une connection a 100Mbit ?


  RR1133. La vitesse d'une carte rseau est totalement indpendante du fait
  que virtuald fonctionne ou pas. Vrifiez que votre serveur tourne sous
  10Mbit et que votre carte 100Mbit fonctionne normalement sans un
  serveur virtuel.


  QQ1144. Est-ce que je dois utiliser la  table virthost  de sendmail ?


  RR1144. Non, c'est une fonctionnalit de Sendmail qui reoit les
  informations pour plusieurs domaines. Virtuald donne  chaque Sendmail
  son propre environnement
   chroot . Installez Virtuald et configurez sendmail comme vous le
  feriez  l'habitude pour chaque domaine.


  QQ1155. Puis-je installer un telnet virtuel sur ma machine ? Et est-il
  possible de crer un compte root virtuel, pour que les client puissent
  administrer leur propre domaine ?


  RR1155. Ces questions reviennent souvent, et pour etre honnte, j'en ai
  un peu marre de les entendre. La rponse, qui est dans ce document,
  est que n'importe quel service lanc par inetd peut tre rendu
  virtuel, donc rien ne vous empche de le faire. Rien,  part le bon
  sens.  Cependant, les bnfices que vous pouvez avoir sont fortement
  altrs par le prix de la securit de votre machine virtuelle (ainsi
  que les sites que vous tes supposs hberger d'une manire
  rsponsable). Voici quelques exemples :


    Afin de duper une session telnet entrante vous devez modifier le
     noyau, pour avoir plusieurs proccessus, rinitialiser votre adresse
     IP source pour les connections sortantes, duper  gethostname  pour
     qu'il utilise le nom de domaine virtuel et non celui du systme,
     etc.  Si vous tes un utilisateur avanc, hackez le kernel. Pour un
     dbutant, je ne le recommande pas.

    En autorisant les utilisateurs  venir sur votre machine en telnet,
     vous les autorisez  lancer des programmes dangereux. Et ceux qui
     savent hacker peuvent prendre les privilges root et causer des
     dommages sur votre systme.

    Donner un accs root en telnet sur une machine virtuelle est trs
     mauvais.  Un utilisateur root virtuel peut quand mme lire les
     fichiers des pripheriques , ce qui annule le  chroot , peut
     teindre le systme et tuer les autres processus sur le systme.

    Telnet est un service rseau non scuris. Des mots de passes sont
     envoys en clair par le rseau. Si un utilisateur avec de mauvaises
     intentions rcupre ce mot de passe, il ou elle peut utiliser les
     attaques mentionnes ci-dessus pour nuire  votre systme.

    Votre environnement virtuel devra tre plus gros. Vous aurez besoin
     de plus de librairies, plus de fichiers de configuration, et plus
     d'excutables. Un disque de 6Go peut tre trs vite rempli.


  Comme quoi, c'est une trs mauvaise ide d'autoriser des connections
  sur une machine virtuelle. Si vous le permettez, tous les sites
  hebergs sur cette machine seront en danger. Si vous voulez autoriser
  un propritaire de site  administrer ses utilisateurs, vous devez
  alors crire (pas de script) le programme ncessaire pour lancer un
  processus virtuel qui l'autorise  les ajouter, effacer ou modifier en
  se connectant par ssh. Ceci devra tre compltement excut par menus,
  vous ne devrez jamais autoriser de consoles, ou d'accs root. Afin
  d'accomplir ceci, vous devrez changer le propritaire des fichiers
  concerns de root  un autre utilisateur.  Si c'est fait de cette
  maniere, c'est assez securis pour tre incorpor dans une machine
  virtuelle. Il ne sera jamais acceptable d'autoriser des connections
  root en telnet ou ssh. Le faire, serait simplement une invitation au
  dsastre. S'il y avait une raison de le faire, le site devrait tre
  hberg sur une machine ddie, o le risque serait juste pour lui.
  Aucun administrateur responsable ne ferait autrement et donc je ne
  perdrai pas plus de temps sur cette question.


  QQ1166. Y a-t-il un rpm, tar, site web, liste de diffusion, etc. associ
   virtuald et au Virtual-Services HOWTO ?


  RR1166. Pour le moment il n'y a rien de tout ceci. Ce HOWTO est la seule
  source d'information sur tout ce que j'ai fait concernant ce projet.
  Je trouve ce HOWTO assez informatif, rendant le besoin d'autres
  renseignements superflu.


  QQ1177. Quand j'essaye de lancer virtexec en tant que simple utilisateur,
  j'ai  chroot: operation not permitted . Pourquoi ?


  RR1177.  chroot  est un appl systme restreint au root. Seulement le
  super utilisateur peut l'executre. Le script virtexec lance le
  programme
   chroot  ce qui implique le besoin d'tre root pour le lancer.


  QQ1188. J'ai mis en place pop et sendmail, mais la rcuperation des mails
  ne semble pas marcher. D'o cela vient-il ?


  RR1188. Certains programmes pop prennent comme emplacement des fichiers
  mail
   /usr/spool/mail . Je sais que  qpop  doit etre dit manuellement
  pour rsoudre ce problme. Soit vous recompilez les sources de votre
  programme, soit vous faites un lien symbolique de
  /virtual/domain1.com/usr/spool  vers
   /virtual/domain1.com/var/spool .


  QQ1199. Je n'ai pas utilis le programme mentionn dans votre HOWTO,
  j'utilise le programme XXX. Il ne marche pas. Pourquoi ?


  RR1199. J'ai essay de faire des exemples le plus gnerique possible pour
  chaque serveur. Je sais que certaines personnes ont leur version
  favorite de chaque serveur. Envoyez-moi le plus d'informations
  possible, et j'essaierai de trouver une solution  votre problme et
  je l'incluerai dans la FAQ.  L'information la plus importante est de
  me dire ou trouver la version du programme que vous utilisez (sous la
  forme ftp://ftp.domain.com/subdir/subdir/file.tgz).


  QQ2200. Quand je lance virtexec il dit  symlink not a virt function .
  Qu'est-ce que cela veut dire et comment le rparer ?


  RR2200. Virtexec est programme pour lequel les arguments sont les quatres
  premiers caractres, et il lance le nom restant dans l'environnement
  virtuel.  Par exemple,  virtpasswd  lance  passwd . Si les quatres
  premiers caracteres ne sont pas  virt , il se plaint et sort un
  message d'erreur. Virtexec est crit en script shell et devrait tre
  trs simple  porter.  Rfrez vous aux pages de manuels de bash ou du
  shell que vous utilisez pour vos question sur la programmation de
  script shell.


  QQ2211. J'ai une question  propos de Qmail, Samba, Apache, etc. qui n'a
  aucun rapport avec la mise en place de virtuald ou l'interface entre
  le paquetage et virtuald.


  RR2211. Tous les paquetages dcris ici sont pleinement documents.
  Certains ont un site web comme  www.nom_du_paquetage.org  qui leur est
  entirement ddi. S'il vous plait consultez ces documents  propos de
  ce genre de questions.


  QQ2222. J'ai plusieurs alias de domaines pointant sur domain1.com mais
  les mails continuent  tre renvoys aux alias. D'o est-ce que ca
  vient ?

  AA2222. Virtmaildelivery compte sur les variables d'environnement qui lui
  sont passes pour dterminer quel rpertoire /virtual/domain1.com
  utiliser pour distribuer le courrier. Il ne fait pas de recherche DNS
  pour dterminer l'adresse du mail.  Puis, si l'adresse est
  submail.mail.domain1.com , virtmaildelivery essayera en premier cette
  adresse puis  mail.domain1.com  et puis
   domain1.com . Il essaye dans cet ordre, jusqu' ce qu'une concordance
  ait lieu o qu'il ne reste plus de noms de domaines.


  De toutes facons, si vous avez des alias de domaines qui ne sont pas
  des sous-domaines d'un autre, vous devez crer des liens symboliques
  comme :


  cd /virtual
  ln -s domain1.com domain1alias.com



  De cette manire, virtmaildelivery sera tromp en pensant que ces
  mmes rpertoires existent mme si l'un d'eux est un lien symbolique
  et le mail pourra tre distribu 
   user@domain1.com  ou  user@domain1alias.com . Notez que
   virtexec  listera les deux rpertoires des domaines dans la bote de
  dialogue quand vous le lancerez. Vous pouvez choisir n'importe lequel,
  mais ce sera le mme systme de fichier.





































































  Linux WWW-HOWTO
  Wayne Leister, n3mtr@qis.net;
  Version Franaise par Arnaud Launay, asl@launay.org
  v0.82, 19 Novembre 1997.

  Ce document contient des informations sur la mise en place de services
  WWW sous Linux ( la fois serveur et client). Il n'est pas prvu pour
  tre un manuel dtaill mais une vue d'ensemble et un bon pointeur
  vers des informations complmentaires.
  ______________________________________________________________________

  Table des matires






















































  1. Introduction

     1.1 Copyright
     1.2 Echos
     1.3 Nouvelles versions de ce document

  2. Configurer un client WWW

     2.1 Survol

  3. Lynx

     3.1 O l'obtenir ?

  4. Emacs-W3

     4.1 O l'obtenir ?

  5. Netscape Navigator/Communicator

     5.1 Des versions et des options diffrentes.
     5.2 O l'obtenir ?
     5.3 Installation

  6. Lancer un server WWW

     6.1 Survol

  7. Apache

     7.1 O l'obtenir ?
     7.2 Compiler et Installer
     7.3 Configurer
     7.4 Hberger des serveurs web virtuels
        7.4.1 Hbergement virtuel bas IP
        7.4.2 Hbergement virtuel par IP partage
     7.5 Scripts CGI
     7.6 Rpertoires Web des Utilisateurs
     7.7 Mode dmon contre mode Inetd
     7.8 Autoriser les commandes put et delete
     7.9 Authentification de l'Utilisateur / Contrle des Accs
     7.10 su-exec
     7.11 Imagemaps
     7.12 SSI/XSSI
     7.13 Systme modulaire

  8. Ajouts au serveur web

  9. FAQ (Foire Aux Questions)

  10. Documents plus avancs

     10.1 Livres de chez O'Reilly & Associates
     10.2 Internet Request For Comments (RFC)


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  La plupart des gens sont passs sous Linux car ils cherchaient une
  plateforme vritablement _a_d_a_p_t__e _ _l_'_I_n_t_e_r_n_e_t.  De plus, des
  institutions, des universits, des organisations  but non lucratif,
  et de petites entreprises dsirent lancer des sites internets  peu de
  frais. C'est ici que le WWW-HOWTO intervient. Ce document explique
  comment configurer les clients et les serveurs pour la plus grande
  audience du net - _L_e _W_o_r_l_d _W_i_d_e _W_e_b.


  Tous les prix indiqus dans ce document sont en dollars US. Ce
  document suppose que vous utilisez Linux sur une plateforme Intel. Les
  instructions et les produits disponibles peuvent varier de plateforme
  en platerforme. Il y a de nombreux liens pour charger les logiciels
  dans ce document. Utilisez autant que possible un site miroir pour
  charger plus rapidement et maintenir faible l'encombrement du serveur
  principal.


  Le gouvernement US interdit aux compagnies US d'exporter de
  l'encryption de plus de 40 bits de long. Par la mme, les compagnies
  US creront deux versions de leurs logiciels. La version destine au
  march intrieur supportera 128 bits, et la version d'export ne
  supportera que 40 bits. Ceci s'applique aux butineurs web et aux
  serveurs supportant les transactions scurises. L'autre nom des
  transactions scurises est le Secure Socket Layer (SSL).  Nous nous
  rfrerons  ces transactions comme SSL pour le reste du document.


  11..11..  CCooppyyrriigghhtt

  Ce document est Copyright (c) 1997 par Wayne Leister.

  L'auteur original tait Peter Dreuw (toute version avant 0.8).


  Cette documentation est libre, vous pouvez la redistribuer et/ou la
  modifier selon les termes de la Licence Publique Gnrale GNU publie
  par la Free Software Foundation (version 2 ou bien toute autre version
  ultrieure choisie par vous).

  Cette documentation est distribue car potentiellement utile, mais
  SSAANNSS AAUUCCUUNNEE GGAARRAANNTTIIEE, ni explicite ni implicite, y compris les
  garanties de ccoommmmeerrcciiaalliissaattiioonn ou dd''aaddaappttaattiioonn ddaannss uunn bbuutt ssppcciiffiiqquuee.
  Reportez-vous  la Licence Publique Gnrale GNU pour plus de dtails.

  Vous pouvez obtenir une copie de la Licence Publique Gnrale GNU en
  crivant  la Free Software Foundation <http://www.fsf.org>, Inc., 675
  Mass Ave, Cambridge, MA 02139, tats-Unis.

  Les marques dposes sont proprits de leurs propritaire respectif.


  11..22..  EEcchhooss

  Tout cho est le bienvenu. Je ne clame pas tre un expert.  Une partie
  des informations provient de sites web mal crits; il est trs
  probable qu'il y ait des erreurs et des omissions. Cependant, vrifiez
  que vous avez la dernire version avant d'envoyer des corrections; ce
  pourrait tre fix dans la version suivante (voyez la section qui suit
  pour savoir o trouver la dernire version). Envoyez vos ractions 
  n3mtr@qis.net.


  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document peuvent tre rcupres au
  format texte sur Sunsite 
  <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/WWW-HOWTO> et sur la
  plupart des sites mirroirs Linux. Vous pouvez voir la dernire version
  HTML sur le web   <http://sunsite.unc.edu/LDP/HOWTO/WWW-HOWTO.html>.
  Il y a aussi des versions HTML disponibles sur Sunsite sous forme
  d'archive tar.
  22..  CCoonnffiigguurreerr uunn cclliieenntt WWWWWW

  Le chapitre qui suit est ddi  la configuration des navigateurs.
  Vous tes libres de me contacter si votre navigateur favori n'est pas
  prsent ici. Dans cette version du document seul un petit nombre de
  navigateurs ont leur propre section, mais je vais essayer de tous les
  inclure (tous ceux que je peux trouver) dans la section Survol.  Dans
  le futur ces navigateurs auront chacun leur propre section.

  L'information de survol est destin  vous aider  vous dcider en
  faveur d'un navigateur, et vous donne les informations principales sur
  chaque navigateur. La section dtails est destin  vous aider 
  installer, configurer, et maintenir chaque navigateur.

  Personnellement, je prfre Netscape; c'est le seul navigateur qui
  offre les dernires nouveauts en HTML. Par exemple, les Frames, Java,
  Javascript, les feuilles de styles, les layers, et les transactions
  scurises. Rien n'est plus dsagrable que de tenter de visiter un
  site web et de s'apercevoir que vous ne pouvez le voir parce que votre
  navigateur ne supporte pas quelque chose de nouveau.

  Cependant j'utilise Lynx lorsque je n'ai pas envie de lancer le
  monstre X-Window/Netscape.


  22..11..  SSuurrvvooll


     ````NNaavviiggaattoorr//CCoommmmuunniiccaattoorr''''
        Netscape Navigator est le seul navigateur mentionn ici qui peut
        utiliser les dernires nouveauts HTML. Quelques unes de ces
        extensions sont le Java, le Javascript, les mises  jour
        automatiques, et les layers. Il est aussi capable de lire les
        news et le courrier. Mais c'est un gros mangeur de ressources;
        il prend beaucoup de temps processeur et de mmoire. Il utilise
        galement un cache spar pour tous les utilisateurs, ce faisant
        utilisant de l'espace disque. Netscape est un produit
        commercial.  Les compagnies ont une priode d'essai de 30 jours,
        mais il n'y a pas de limite pour les individus. Je voudrais
        cependant vous encourager  vous enregistrer pour supporter
        Netscape dans leurs efforts contre Microsoft (et qu'est ce que
        c'est que $40US). Mon sentiment est que, si Microsoft gagne,
        nous serons obligs d'utiliser MS Internet Explorer sur une
        plateforme Windows :(


     ````LLyynnxx''''
        Lynx est le plus petit navigateur web. C'est le roi des
        navigateurs en mode texte. Il est gratuit et son code source est
        disponible sous les termes de la GNU public license. Il est en
        mode texte, mais dispose de nombreuses options.


     KKffmm
        Kfm fait partie de K Desktop Environment (KDE). KDE est un
        systme qui tourne au-dessus de X-Window. Il vous donne de
        nombreuses spcificits comme le copier - coller, les sons, une
        corbeille et une apparence unifie. Kfm est le K File Manager,
        mais c'est aussi un navigateur web. Ne soyez pas tonn par son
        nom, pour un produit jeune il est trs utilisable en tant que
        navigateur. Il supporte dj les frames, les tableaux, les
        chargements par ftp, la navigation dans les archives tar, et
        beaucoup d'autres. La version actuelle de Kfm est la 1.39, et
        elle est gratuite. Kfm peut-tre utilis sans KDE, mais vous
        aurez besoin des librairies utilises par KDE. Pour plus
        d'informations sur KDE et Kfm, visitez le site web de KDE 
        <http://www.kde.org>.


     ````EEmmaaccss''''
        Emacs est un programme qui fait tout. C'est un traitement de
        texte, un lecteur de news, un lecteur de courrier, et un
        navigateur web. Son chemin pour apprendre est trs raide, car
        vous devez apprendre ce que font toutes les touches. La version
        X-Window est plus facile  utiliser, car la plupart des
        fonctions sont sur des menus.  Un autre inconvnient est qu'il
        est principalement bas sur du texte. (il peut afficher des
        images si vous l'utilisez depuis X-Window). Il est galement
        gratuit, et le code source est disponible sous la licence
        publique GNU.


     NNCCSSAA MMoossaaiicc
        Mosaic est un navigateur X-Window dvelopp par le National
        Center for Supercomputing Applications (NCSA) de l'universit de
        l'Illinois. Le NCSA a pass quatre ans sur ce projet et a
        maintenant boug vers d'autres choses. La dernire version est
        la 2.6 qui a t lanc le 7 Juillet 1995. Le code source est
        disponible pour toute utilisation non-commerciale. Spyglass Inc.
        <http://www.spyglass.com> possde les droits commerciaux sur
        Mosaic. C'est un navigateur X-Window solide, mais il lui manque
        les dernires nouveauts du HTML. Pour plus d'informations
        visitez la page NCSA Mosaic 
        <http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/>. Ce logiciel
        peut-tre charg  partir de
        <ftp://ftp.ncsa.uiuc.edu/Mosaic/Unix/binaries/2.6/Mosaic-
        linux-2.6.Z>.


     AArreennaa
        Arena tait un navigateur X-Window conceptuel pour le W3C (World
        Wide Web Consortium) lorsqu'ils testaient le HTML 3.0. C'est
        pourquoi il supporte tous les standards HTML 3.0 comme les
        feuilles de style et les tableaux. Le dveloppement a t
        effectu par Yggdrasil Computing, dans l'ide d'en faire un
        navigateur X-Window totalement libre. Mais le dveloppement a
        t stopp en fvrier 1997 avec la version 0.3.11. Une partie
        seulement du standard HTML 3.2 a t implmente. Le code source
        est disponible sous la license publique GNU. Pour plus
        d'informations voyez le site web 
        <http://www.yggdrasil.com/Products/Arena/>. Il peut tre charg
        de  <ftp://ftp.yggdrasil.com/pub/dist/web/arena/>.


     AAmmaayyaa
        Amaya est le navigateur X-Window conceptuel pour le W3C pour le
        HTML 3.2. Toutefois il supporte tous les standards HTML 3.2. Il
        supporte galement quelques unes des nouveauts du HTML 4.0. Il
        supporte les tableaux, les formulaires, les cartes d'images du
        client, la publication, les images gifs, jpegs et png. C'est 
        la fois un navigateur et un outil d'apprentissage. La dernire
        version publique est la 1.0 beta. La version 1.1 beta est en
        tests internes et doit sortir bientt. Pour plus d'informations
        voyez le site d'Amaya   <http://www.w3.org/Amaya/>.  Il peut
        tre charg de  <ftp://ftp.w3.org/pub/Amaya-LINUX-
        ELF-1.0b.tar.gz>.


     RReedd BBaarroonn
        Red Baron un navigateur X-Window conu par Red Hat Software.  Il
        est distribu avec la distribution officielle Red Hat Linux. Je
        n'ai pas pu avoir beaucoup plus d'informations sur lui, mais je
        sais qu'il supporte les frames, les formulaires et le SSL. Si
        vous utilisez Red Baron, aidez moi  remplir cette section. Pour
        plus d'informations visitez le site Red Hat 
        <http://www.redhat.com>.


     CChhiimmeerraa
        Chimera est un navigateur X-Window basique. Il supporte quelques
        unes des spcificits du HTML 3.2. La dernire version est la
        2.0 alpha 6 du 27 aot 1997. Pour plus d'informations visitez le
        site de Chimera   <http://www.unlv.edu/chimera/>.  Chimera peut
        tre charg sur <ftp://ftp.cs.unlv.edu/pub/chimera-
        alpha/chimera-2.0a6.tar.gz>.


     QQwweebb
        Qweb est encore un autre navigateur X-Window basique. Il
        supporte les tableaux, les formulaires, et les cartes des images
        ct serveur. La dernire version est la 1.3. Pour plus
        d'informations visitez le site Qweb 
        <http://sunsite.auc.dk/qweb/>.  Les sources sont disponibles sur
        <http://sunsite.auc.dk/qweb/qweb-1.3.tar.gz>.  Les binaires sont
        disponibles en format Red Hat RPM 
        <http://sunsite.auc.dk/qweb/qweb-1.3-1.i386.rpm>.


     GGrraaiill
        Grail est un navigateur X-Window dvelopp par la Corporation
        for National Research Initiatives (CNRI). Grail est entirement
        crit en Python, un langage interprt orient objet. La
        dernire version est la 0.3 du 7 Mai 1997. Il supporte les
        formulaires, les marque-pages, l'historique, les frames, les
        tableaux, et beaucoup de choses du HTML 3.2.


     IInntteerrnneett EExxpplloorreerr
        Il y a des rumeurs, comme quoi Microsoft porterait Internet
        Explorer sur diverses plateformes Unix - peut-tre Linux. Si
        c'est exact ils prennent le temps de le faire. Si vous
        connaissez quelque chose de plus sr, envoyez moi un mail.


  A mon humble avis, la plupart des logiciels ci-dessus sont
  inutilisables pour apprcier srieusement le web. Je n'essaye pas de
  discrditer les auteurs, je sais qu'ils ont travaill trs dur sur ces
  projets. Imaginez simplement, si toutes ces personnes avaient
  travaill en commun sur un seul projet, nous aurions peut-tre un
  navigateur gratuit qui pourrait rivaliser avec Netscape et Internet
  Explorer.

  A mon avis, sur tous ces navigateurs, Netscape et Lynx sont les
  meilleurs.  Les suivants pourraient tre Kfm, Emacs-W3 et Mosaic.



  33..  LLyynnxx

  Lynx est des plus petits (environ 600 ko d'excutable) et des plus
  rapides des navigateurs disponibles.  et probablement le browser web
  le plus rapide actuellement disponible.  Il n'utilise pas autant de
  bande passante ni de ressources systme car il affiche uniquement en
  mode texte. Il peut-tre utilis sur toute console, terminal ou xterm.
  Vous n'aurez pas besoin d'un _s_y_s_t__m_e _X_-_W_i_n_d_o_w ni de mmoire
  supplmentaire pour faire tourner ce petit browser.


  33..11..  OO ll''oobbtteenniirr ??

  Les deux distributions Red Hat et Slackware incluent Lynx. C'est
  pourquoi je ne vous ennuierai pas avec les dtails sur la compilation
  et l'installation de Lynx.

  La dernire version est la 2.8rel.2, et peut tre obtenue sur
  <http://www.slcc.edu/lynx/fote/> ou sur tout serveur ftp miroir comme
  ftp://ftp.lip6.fr dans /pub/linux/sunsite/apps/www/browsers/.

  Pour plus d'informations sur Lynx essayez l'une de ces url:

     LLyynnxx LLiinnkkss
        <http://www.crl.com/~subir/lynx.html>

     LLyynnxx PPaaggeess
        <http://lynx.browser.org>

     LLyynnxx HHeellpp PPaaggeess
        <http://www.crl.com/~subir/lynx/lynx_help/lynx_help_main.html>
        (les mmes que celle donnes par lynx --help et ? dans lynx).

  Note: les pages d'aides de Lynx ont rcemment dmnag. Si vous avez
  une version ancienne de Lynx, vous devrez changer votre lynx.cfg (dans
  /usr/lib) pour pointer sur la nouvelle adresse (plus haut).

  Je pense que la spcificit la plus importante de Lynx par rapport 
  tous les autres navigateurs web est sa capacit de rcupration
  automatique des fichiers.N'importe qui peut crire un script qui
  rcuprera tout document, fichier ou n'importe quoi d'autre via des
  url _h_t_t_p, _F_T_P, _g_o_p_h_e_r, _W_A_I_S, _N_N_T_P ou _f_i_l_e_:_/_/ - et les sauver sur le
  disque.  De plus, toute personne peut entrer des donnes dans les
  formulaires HTML en mode batch en redirigeant simplement l'entre
  standard et en utilisant l'option _-_p_o_s_t___d_a_t_a.

  Pour en savoir plus les spcificits exceptionnelles de Lynx regardez
  juste les fichiers d'aide et les pages de man. Si vous utilisez une
  option spciale de Lynx que vous dsireriez voir ajouter  ce
  document, fates le moi savoir.


  44..  EEmmaaccss--WW33

  Il y a diffrentes versions d'Emacs. Les deux les plus populaires sont
  GNU Emacs et XEmacs. GNU Emacs vient de la Free Software Foundation,
  et est l'Emacs original. Il est principalement orient vers les
  terminaux en mode texte, mais il peut tourner sous X-Window. XEmacs
  (au dpart par Lucid Emacs) est une version qui tourne uniquement sous
  X-Window. Il dispose de nombreuses spcificits de type X-Window (de
  meilleurs menus, ...).


  44..11..  OO ll''oobbtteenniirr ??

  Les deux distributions Red Hat et Slackware incluent GNU Emacs.

  Le GNU emacs le plus rcent est le 19.34. Il ne semble pas avoir de
  site web. Le site FTP original est 
  <ftp://ftp.gnu.ai.mit.edu/pub/gnu/>; il y a un mirroir pour la France
  sur  <ftp://ftp.lip6.fr/pug/gnu/>.

  La dernire version de XEmacs est la 20.2. Le site FTP de XEmacs est 
  <ftp://ftp.xemacs.org/pub/xemacs>. Pour plus d'informations sur XEmacs
  allez voir leurs pages web   <http://www.xemacs.org>.


  Les deux sont disponibles sur tous mirroir des archives Linux, par
  exemple  ftp://ftp.lip6.fr/pub/linux/sunsite/apps/editors/emacs/


  55..  NNeettssccaappee NNaavviiggaattoorr//CCoommmmuunniiccaattoorr


  55..11..  DDeess vveerrssiioonnss eett ddeess ooppttiioonnss ddiiffffrreenntteess..

  Netscape Navigator est le roi des navigateurs WWW. Netscape Navigator
  peut quasiment tout faire. Mais d'un autre ct, c'est un des
  programmes les plus gourmand en mmoire et en ressources que j'ai pu
  voir.

  Il y a 3 versions diffrentes de ce programme:

  Netscape Navigator contient le navigateur web, netcaster (le client
  push) et un programme basique de courrier.

  Netscape Communicator contient le navigateur web, un diteur web, un
  programme avanc de courrier, un lecteur de news, netcaster (le client
  push), et un utilitaire pour les confrences de groupes.

  Netscape Communicator Pro contient tout ce qu'a Communicator plus un
  calendrier group, l'mulation des terminaux IBM, et des options pour
  la gestion  distance (les administrateurs peuvent mettre  jour des
  milliers de copies de Netscape  partir de leur sige).

  En addition  ces trois versions il y a deux autres options que vous
  pouvez choisir.

  La premire est l'installation complte ou basique. L'installation
  complte vous installe tout. L'installation de base vous en donne
  suffisamment pour commencer. Vous pouvez charger les composants
  supplmentaires lorsque vous en avez besoin (comme le support
  multimedia et netscaster). Ces composants peuvent tre installs par
  l'utilitaire 'smart update' de Netscape (aprs l'installation allez
  dans 'help->software updates'). Actuellement, l'installation complte
  n'est pas disponible pour Linux.

  La seconde option est l'import ou l'export. Si vous habitez les US ou
  le Canada vous pouvez choisir la version d'import. Cel vous donnera
  l'encryption plus solide de 128 bits pour les transactions scurises
  (SSL).  La version d'export dispose seulement d'une encryption 40
  bits, et est la seule version autorise en dehors des US et du Canada.

  La dernire version de Netscape Navigator/Communicator/Communicator
  Pro est la 4.03. Il y a deux versions diffrentes pour Linux, une pour
  l'ancienne srie des noyaux 1.2 et une pour les nouveaux 2.0. Si vous
  n'avez pas de noyau 2.0 je vous suggre de le mettre  jour; il y a de
  nombreuses nouveauts dans le nouveau noyau.

  Des beta version sont galement disponibles. Si vous essayez une
  version beta, elles expireront gnralement plus ou moins un mois
  aprs !


  55..22..  OO ll''oobbtteenniirr ??


  Le meilleur moyen pour obtenir des logiciels de Netscape est d'aller
  le chercher par leur site web   <http://www.netscape.com/download/>.
  Ils ont des menus pour vous guider dans votre slection. Lorsqu'on
  demande une version Linux, on rfrence par rapport au noyau (la
  plupart des gens doivent maintenant utiliser le 2.0). Si vous n'tes
  pas sr de la version du noyau que vous avez vous pouvez lancer 'cat
  /proc/version'. Chercher sur le site web est le seul moyen d'obtenir
  les versions d'import.

  Si vous dsirez une version export vous pouvez la charger directement
  des serveurs FTP de Netscape. Leurs serveurs FTP sont galement plus 
  jour. Par exemple la premire fois que j'ai crit ceci, l'interface
  web n'avait pas encore la version non-beta 4.03 pour Linux, mais elle
  tait sur le site FTP.  Voici les liens vers les versions d'export
  pour Linux 2.0:

  Netscape Navigator 4.03 est 
  <ftp://ftp.netscape.com/pub/communicator/4.03/shipping/english/unix/linux20/navigator_standalone/navigator-
  v403-export.x86-unknown-linux2.0.tar.gz>

  Netscape Communicator 4.03 pour Linux 2.0 (noyau) est 
  <ftp://ftp.netscape.com/pub/communicator/4.03/shipping/english/unix/linux20/base_install/communicator-
  v403-export.x86-unknown-linux2.0.tar.gz>

  Communicator Pro 4.03 pour Linux n'tait pas disponible au moment o
  j'cris ces lignes.

  Ces url changeront lorsque de nouvelles versions sortiront. Si ces
  liens ne fonctionnent pas vous pouvez les trouver en pchant sur le
  site FTP  <ftp://ftp.netscape.com/pub/communicator/>.

  Ces serveurs sont souvent trs chargs. Il vaut mieux attendre hors
  des heures de bureau ou choisir un site mirroir. Soyez prpar 
  attendre, ces archives sont grosses. Navigator pse environ 8 megs, et
  l'installation de base de Communicator est de 10 megs.


  55..33..  IInnssttaallllaattiioonn

  Cette section explique comment installer la version 4 de Netscape
  Navigator, Communicator, et Communicator Pro.

  Tout d'abord dcompactez l'archive dans un rpertoire temporaire.
  Lancez ensuite le script ns-install (tapez ./ns-install).  Crez
  ensuite un lien symbolique du binaire /usr/local/netscape/netscape sur
  /usr/local/bin/netscape (tapez ln -s /usr/local/netscape/netscape
  /usr/local/bin/netscape).  Enfin, attribuez  une variable
  d'environnement $MOZILLA_HOME pour tout le systme la valeur
  /usr/local/netscape, de faon  ce que Netscape puisse trouvez ses
  fichiers. Si vous utilisez bash en tant que shell, ditez votre
  /etc/profile et ajoutez les lignes:



       export MOZILLA_HOME="/usr/local/netscape"




  Aprs l'avoir install le logiciel peut se mettre automatiquement 
  jour avec smart update.  Lancez juste Netscape en tant que super-
  utilisateur et allezz  help->software updates. Si vous avez
  simplement pris l'installation basique, vous pouvez galement
  installer les composants Netscape de l.

  Note: Ceci ne supprimera pas vos anciennes versions de Netscape, vous
  devez les supprimer manuellement en supprimant le binaire Netscape et
  le fichier des classes Java (pour la version 3).




  66..  LLaanncceerr uunn sseerrvveerr WWWWWW

  Cette section contient des informations sur les diffrents serveurs
  http et les outils additionnels comme les langages de scripts pour les
  programmes CGI, etc. Il y a plusieurs douzaines de serveurs web, j'ai
  seulement couvert ceux qui sont pleinement fonctionnels. Comme
  certains sont des programmes commerciaux, je ne peux pas les tester.
  La plupart des informations de la section de prsentation ont t
  rcupres sur divers sites web.  S'il y a des informations
  incorrectes ou manquantes, veuillez me le faire savoir.


  Pour une documentation plus technique des mcanismes du http, voyez
  les RFCs mentionnes dans le chapitre "Documents plus avancs" de ce
  HOWTO.

  Je prfre utiliser le serveur Apache. Il a la plupart des options que
  vous avez jamais dsir et il est gratuit ! J'admets que cette section
  est fortement oriente vers Apache. J'ai dcid de concentrer mes
  efforts sur la section Apache plutt que le ngliger par rapport 
  tous les autres serveurs web. Je pourrais couvrir d'autres serveurs
  web dans le futur.


  66..11..  SSuurrvvooll


     CCeerrnn hhttttppdd
        Ce fut le premier serveur web. Il a t dvelopp par le
        European Laboratory for Particle Physics (CERN). Le CERN httpd
        n'est plus support. Le serveur CERN httpd est connu pour avoir
        quelques bugs tranges, pour tre lent et mangeur de ressources.
        La dernire version est la 3.0.  Pour plus d'informations
        visitez la page mre du CERN httpd 
        <http://www.w3.org/Daemon/Status.html>. Il peut tre charg sur
        <ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/httpd-3.0.term.tpz>
        (non, ce n'est pas une erreur, l'extension est actuellement .tpz
        sur le site; ce devrait probablement tre .tgz).


     NNCCSSAA HHTTTTPPdd
        Le serveur NCSA HTTPd est le pre d'Apache (le dveloppement a
        donn naissance  deux serveurs diffrents). Toutefois les
        fichiers de configuration sont trs similaires. le NCSA HTTPd
        est gratuit et le code source est disponible. Ce serveur n'est
        pas couvert par ce document, cependant la lecture de la section
        Apache peut vous donner quelques tuyaux.  Le serveur NCSA ft
        populaire, mais la plupart des gens l'ont remplac par Apache.
        Apache est un essai de remplacement du serveur NCSA (mme
        fichiers de configuration), et il fixe plusieurs limites du
        serveur NCSA. Le serveur NCSA HTTPd compte pour 4.9% (en chute
        libre) de tous les serveurs web (source Septembre 1997, Netcraft
        survey <http://www.netcraft.com/survey/>).  La dernire version
        est la 1.5.2a. Pour plus d'informations voyez le site du NCSA 
        <http://hoohoo.ncsa.uiuc.edu>.


     ````AAppaacchhee''''
        Apache est le roi de tous les serveurs web. Apache et ses
        sources sont gratuits. Apache est modulaire, aussi il est facile
        d'y ajouter des caractristiques. Apache est trs flexible et
        dispose de trs, trs nombreuses caractristiques. Apache et ses
        drivs ralisent 44% de tous les domaines web (50% su vous
        comptez tous les drivs).  Il y a plus de 695.000 serveurs
        Apache actifs (source Septembre 1997, Netcraft survey
        <http://www.netcraft.com/survey/>).
        La version officielle d'Apache ne contient pas le SSL, mais il y
        a deux drivs qui l'incluent. Stronghold est un produit
        commercial qui est bas sur Apache. Il est vendu $995; une
        version plus conomique est disponible pour $495 (base sur une
        vieille version d'Apache).  Stronghold est le numro deux des
        serveurs scuriss derrire Netscape (source C2 net
        <http://www.c2.net/products/stronghold> et Netcraft survey
        <http://www.netcraft.com/survey/>).  Pour plus d'informations
        voyez le site de Stronghold 
        <http://www.c2.net/products/stronghold/>. Il a t dvelopp
        hors des US, il est donc disponible avec du SSL en 128 bits
        partout.

        Apache-SSL est une implmentation gratuite de SSL, mais pas pour
        une utilisation commerciale dans les US (RSA a une license US
        sur la technologie SSL). Il peut tre utilis pour une
        utilisation non-commerciale aux US si vous le reliez avec la
        librairie gratuite RSAREF. Pour plus d'informations voyez le
        site   <http://www.algroup.co.uk/Apache-SSL/>.


     NNeettssccaappee FFaasstt TTrraacckk SSeerrvveerr
        Fast Track a t dvelopp par Netscape, mais la version Linux
        est mise sur le march par Caldera. Le site de Caldera le liste
        en tant que "Fast Track for OpenLinux". Je ne suis pas sr qu'il
        tourne seulement sous Caldera OpenLinux ou si toute distribution
        Linux peut le faire (crivez moi si vous connaissez la rponse).
        Les serveurs Netscape comptent pour 11.5% (en chute libre) de
        tous les serveurs web (source Septembre 1997
        <http://www.netcraft.com/survey/>).  Le serveur est vendu $295.
        Il est galement inclus avec la distribution Caldera OpenLinux
        Standard qui est vendue $399 (version ducation: $199.50).  Les
        pages web parlent d'une interface d'administration simple et
        pratique et d'une configuration rapide en 10 minutes. Le serveur
        supporte le SSL en 40 bits. Pour obtenir les 128 bits SSL vous
        aurez besoin du Netscape Enterprise Server. Malheureusement il
        n'est pas disponible pour Linux :( La dernire version
        disponible pour Linux est la 2.0 (la version 3 est en beta, mais
        elle n'est pas encore disponible pour Linux).  Pour l'acheter,
        allez sur le site web de Caldera 
        <http://www.caldera.com/products/netscape/netscape.html>. Pour
        plus d'informations voyez la page Fast Track 
        <http://www.netscape.com/comprod/server_central/product/fast_track/>


     WWNN WN dispose de nombreuses caractristiques qui le rende
        attractif.  Tout d'abord il est plus petit que les serveurs
        CERN, NCSA HTTPd, Apache. Il dispose galement de nombreuses
        options intgres qui ncessiteraient sinon des CGI. Par exemple
        la recherche sur le site, des intgrs du ct du serveur. Il
        peut galement dcompresser/compresser des fichiers en
        transparence avec son option de filtrage. Il peut galement
        rcuprer une partie seulement d'un fichier avec son option
        d'chelle. Il est distribu sous licence publique GNU. La
        version actuelle est la 1.18.3. Pour plus d'informations voyez
        le site de WN   <http://hopf.math.nwu.edu/>.


     AAOOLLsseerrvveerr
        AOLserver est dvelopp par America Online. Je dois admettre que
        j'ai t surptis par les options offertes par un serveur web
        venant de chez AOL. En addition aux options standard, il
        supporte la connectivit des bases de donnes. Les pages peuvent
        interroger une base de donnes par les commandes Structured
        Query Language (SQL). La base de donnes est accessible au
        travers du Open Database Connectivity (ODBC). Il dispose
        galement d'un moteur de recherche et des scripts TCL. Si cel
        ne vous suffit pas, vous pouvez ajouter votre module par la
        Application Programming Interface (API), en C. J'ai mme oubli
        de mentionner le support pour 40 bits SSL. Et vous obtenez tout
        ceci gratuitement ! Pour plus d'informations voyez le site du
        AOLserver   <http://www.aolserver.com/server/>.


     ZZeeuuss SSeerrvveerr
        Zeus Server a t dvelopp par Zeus Technology. Ils se
        rclament comme ayant le serveur web le plus rapide (d'aprs la
        batterie de tests WebSpec96). Le serveur peut tre configur et
        contrl par un navigateur web ! Cela limite l'encombrement du
        processeur et de la mmoire pour les scripts CGI, et il
        s'excute dans un environnement scuris (quelle que soit la
        signification de cette expression). Il supporte galement les
        serveurs virtuels sans limitation. Il est vendu $999 pour la
        version standard. Si vous dsirez le serveur scuris (SSL) le
        prix grimpe  $1699. Ils sont bas hors des US, la technologie
        128 bits SSL est donc disponible partout. Pour plus
        d'informations voyez le site de Zeus Technology 
        <http://www.zeus.co.uk>. Le site web US se trouve sur
        <http://www.zeus.com>.  Je vous prviens qu'ils sont trop srs
        d'eux  propos de leur serveur le plus rapide. Mais ils
        n'apparaissent mme pas dans le top des serveurs web de la
        Netcraft Surveys.


     CCLL--HHTTTTPP
        CL-HTTP est l'abrg de Common Lisp Hypermedia Server. Si vous
        tes un programmeur Lisp ce serveur est pour vous. Vous pouvez
        crire vos scripts CGI en Lisp. Il a une fonction de
        configuration base sur le web. Il supporte galement toutes les
        options standards des serveurs. CL-HTTP est gratuit et le code
        source est disponible. Pour plus d'informations voyez le site
        web de CL-HTTP   <http://www.ai.mit.edu/projects/iiip/doc/cl-
        http/home-page.html> (ne pouvaient-ils rendre cette url plus
        longue ?).


  Si vous avez un dessein commercial (site web d'une compagnie, ou ISP),
  je vous recommanderais fortement l'utilisation d'Apache. Si vous
  regardez plus  une configuration simple qu' des options avancs,
  alors le Zeus Server est fait pour vous. J'ai galement entendu dire
  que le Netscape Server est facile  configurer. Si vous avez une
  utilisation interne, vous pouvez tre un peu plus flexible. Mais 
  moins que l'un d'entre eux dispose d'une option que vous devez
  utiliser, je vous recommanderai nanmoins l'utilisation de l'un des
  trois pr-cits.

  Il s'agit seulement d'une liste partielle de tous les serveurs
  disponibles.  Pour une liste plus complte visitez Netcraft 
  <http://www.netcraft.com/survey/servers.html> ou Web Compare 
  <http://webcompare.internet.com>.


  77..  AAppaacchhee

  La version actuelle d'Apache est la 1.2.4. La version 1.3 est en test.
  Le site principal d'Apache est   <http://www.apache.org/>. Une autre
  bonne source d'information est Apacheweek 
  <http://www.apacheweek.com/>. La documentation d'Apache est bonne, je
  ne rentrerai donc pas dans les dtails de la configuration d'apache.
  La documentaion est sur le site web et galement incluse dans les
  sources (au format HTML). Il y a galement des fichiers textes inclus
  dans les sources, mais la version HTML est meilleure. La documentation
  doit devenir bien meilleure depuis que le Apache Documentation Project
  a t lanc. Pour l'instant la plupart des documents sont crits par
  les dveloppeurs. Sans vouloir discrditer les dveloppeurs, ils sont
  un peu difficiles  comprendre si vous ne connaissez pas la
  terminologie.


  77..11..  OO ll''oobbtteenniirr ??

  Apache est inclus dans les distributions Red Hat, Slackware, et
  OpenLinux.  Cependant il se peut que ce ne soit pas la dernire
  version, ce sont des binaires trs fiables. La mauvaise nouvelle est
  que vous aurez  vivre avec leurs choix de rpertoires (qui sont
  totalement diffrents les uns des autres et de ceux par dfaut
  d'Apache).

  Le source est disponible sur le site web d'Apache 
  <http://www.apache.org/dist/>.  Les binaires sont galement
  disponibles au mme endroit.  Vous pouvez aussi obtenir les binaires
  de sunsite   <ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/> et
  pour la France sur
  <ftp://ftp.lip6.fr/pub/linux/sunsite/apps/www/servers/>.  Et pour ceux
  d'entre vous qui utilisent une Red Hat le dernier fichier RPM se
  trouve gnralement dans le rpertoire des contributions 
  <ftp://ftp.redhat.com/pub/contrib/i386/>.

  Si votre serveur doit desservir un dessein commercial, il est
  hautement recommand que vous obteniez les sources  partir du site
  web d'Apache et de le compiler vous mme. L'autre option est
  d'utiliser un binaire qui provient d'une distribution majeure, par
  exemple Slackware, Red Hat, ou OpenLinux. La principale raison en est
  la scurit. Un binaire inconnu peut avoir une "sortie cache" pour
  les hackers, ou une correction instable peut crasher votre systme.
  Ceci vous donnera galement plus de contrle sur les modules compils,
  et vous autorisera  changer les rpertoires par dfaut. Il n'est pas
  difficile de compiler Apache, et vous ne serez pas un rel utilisateur
  de Linux tant que vous ne compilerez pas vos programmes ;)


  77..22..  CCoommppiilleerr eett IInnssttaalllleerr

  Tout d'abord dcompactez l'archive dans un rpertoire temporaire.
  Ensuite placez vous dans le rpertoire src. Editez alors le fichier
  Configuration si vous dsirez ajouter des modules spciaux. Les
  modules les plus communment utiliss sont dj inclus. Il n'y a pas
  besoin de changer les rgles ou le makefile pour Linux. Lancez ensuite
  le script shell Configure (./Configure). Vrifiez qu'il vous dit que
  vous utilisez une plateforme Linux et gcc en tant que compilateur.
  Ensuite vous pouvez diter le fichier httpd.h pour changer les
  rpertoires par dfaut.  L'emplacement du serveur (o sont conservs
  les fichiers de configuration) par dfaut est /usr/local/etc/httpd/,
  mais vous pouvez le changer pour juste /etc/httpd/. Et le rpertoire
  principal du serveur (o sont conserves les pages HTML) par dfaut
  est /usr/local/etc/httpd/htdocs/, mais j'apprcie le rpertoire
  /home/httpd/html (le dfaut de Red Hat pour Apache). Si vous devez
  utiliser su-exec (voir les options spciales plus bas) vous pouvez
  galement dsirer changer le rpertoire. Le rpertoire principal peut
  galement tre chang  partir des fichiers de config. Mais il est
  galement bon de le compiler, juste au cas o Apache ne puisse trouvez
  ou lire les fichiers de configuration. Tout le reste doit tre chang
   partir des fichiers de configuration.  Lancez enfin make pour
  compiler Apache.

  Si vous avez des problmes au sujet de fichiers include manquants,
  vrifiez les points suivants. Vrifiez que vous avez les enttes du
  noyau (fichiers include) installs pour votre version du noyau.
  Vrifiez galement que vous avez ces liens symboliques installs:


       /usr/include/linux doit tre un lien sur /usr/src/linux/include/linux
       /usr/include/asm doit tre un lien sur /usr/src/linux/include/asm
       /usr/src/linux doit tre un lien sur les sources de Linux (ex.linux-2.0.30)




  Les liens peuvent tre crs avec ln -s, cel fonctionnera comme la
  commande cp  part qu'il fera un lien ((ln -s SOURCE DESTINATION).

  Lorsque make a termin il doit y avoir un excutable nomm httpd dans
  le rpertoire. Il est ncessaire de le dplacer dans un rpertoire
  bin.  /usr/sbin ou /usr/local/sbin seraient de bons choix.

  Copiez les sous-rpertoires conf, logs, et icons des sources vers
  l'emplacement du serveur. Renommez ensuite trois des fichiers du sous-
  rpertoire conf pour vous dbarasser de l'extension -dist ((ex.
  httpd.conf-dist devient httpd.conf).

  Il y a aussi divers programmes de support qui sont inclus avec Apache.
  Ils sont dans le rpertoire support et doivent tre compils et
  installs sparment/ La plupart d'entre eux peuvent tre crs en
  utilisant le makefile de leur rpertoire (ce qui est fait lorsque vous
  lancez le script principal Configure). Vous n'avez besoin d'aucun
  d'entre eux pour utiliser Apache, mais certains rendent le travail des
  administrateurs plus simple.


  77..33..  CCoonnffiigguurreerr

  Maintenant vous devez avoir quatre fichiers dans votre sous-rpertoire
  conf de l'emplacement du serveur. Le fichier httpd.conf met en place
  le daemon du serveur (numro de port, utilisateur, etc). Le srm.conf
  donne l'arborescence pour les documents principaux, les actions
  spciales, etc. Le access.conf donne les cas basiques pour l'accs.
  Finalement, le mime.types dit au serveur que type mime il doit envoyer
  au navigateur pour quelle extension.

  Les fichiers de configuration sont assez bien documents (ils sont
  pleins de commentaires), tant que vous comprenez le langage. Vous
  devriez les lire attentivement avant de mettre votre serveur en
  marche. Chaque option de configuration est couvert dans la
  documentation Apache.

  Le fichier mime.types n'est pas rellement un fichier de
  configuration.  Il est utilis par le serveur pour traduire les
  extensions des fichiers en types mime  envoyer au navigateur. La
  plupart des types mime communs sont dj dans le fichier. La majorit
  des gens ne devrait pas diter ce fichier.  Au cours du temps, plus de
  types mime seront ajouts pour supporter de nouveaux programmes. La
  meilleure chose  faire est de prendre un nouveau fichier mime.types
  (et peut-tre une nouvelle version du serveur)  ce moment l.

  Souvenez vous toujours que lorsque vous changez les fichiers de
  configuration vous devrez relancer Apache ou lui envoyer le signal
  SIGHUP avec kill pour que les changements prennent effet. Vrifiez que
  vous envoyez le signal au process parent et non aux process enfants.
  Le parent a gnralement le chiffre id le plus faible. L'id du process
  du parent est galement dans le fichier httpd.pid du rpertoire log.
  Si vous envoyez accidentellement le signal  un des process enfants,
  le process stoppera et le parent le relancera.


  Je ne vous conduirai pas le long des chemins de la configuration
  d'Apache.  A la place je parlerai des problmes spcifiques, des choix
   faire, et des options spciales.

  Je recommande chaudement que tous les utilisateurs lisent les trucs
  sur la scurit dans la documentation Apache. Elle est galement
  disponible sur le site web d'Apache 
  <http://www.apache.org/docs/mics/security_tips.html>.


  77..44..  HHbbeerrggeerr ddeess sseerrvveeuurrss wweebb vviirrttuueellss

  L'hbergement virtuel existe lorsqu'un seul ordinateur dispose de plus
  d'un nom de domaine. L'ancienne mthode tait d'avoir une adresse IP
  pour chaque site virtuel. La nouvelle mthode utilise uniquement une
  adresse IP, mais cel ne fonctionne pas correctement avec les
  navigateurs qui ne supportent pas le HTTP 1.1.

  Ma recommandation pour le commerce est de conserver un hbergement
  virtuel bas sur plusieurs IP jusqu' ce que la majorit des gens
  disposent de navigateurs supportant HTTP 1.1 (donnez leur un an ou
  deux). Ceci vous donne galement une illusion plus complte de
  l'hbergement virtuel. Alors que les deux mthodes peuvent vous donner
  des possibilits de courrier virtuel (est ce que quelqu'un peut
  confirmer?), seul l'hbergement virtuel bas IP peut galement vous
  donner un serveur FTP virtuel.

  S'il s'agit d'un club ou d'une page personnelle, vous pouvez
  considrer l'hbergement virtuel par IP lie.  Ce devrait tre moins
  cher que l'hbergement bas IP et vous sauverez de prcieuses
  addresses IP.

  Vous pouvez galement mlanger les hbergements virtuels par IP fixes
  et par IP partages sur le mme serveur. Pour plus d'information sur
  l'hbergement virtuel voyez Apacheweek sur
  <http://www.apacheweek.com/features/vhost>.


  77..44..11..  HHbbeerrggeemmeenntt vviirrttuueell bbaass IIPP

  Pour cette mthode chaque site virtuel dispose de sa propre adresse
  IP. En dterminant l'adresse IP  laquelle la requte tait envoye,
  Apache et d'autres programmes peuvent dire quel domaine desservir.
  C'est un incroyable gain d'adresses IP. Prenez par exemple les
  serveurs o est conserv mon domaine virtuel. Ils ont plus de 35.000
  comptes virtuels, ce qui signifie 35.000 adresses IP. Pourtant je
  crois qu'aux derniers comptes ils avaient moins de 50 serveurs rels.

  La configuration se fait en deux parties. La premire consiste 
  obtenir de Linux l'acceptation de plus d'une adresse IP. La seconde
  est de configurer apache pour servir les sites virtuels.

  La premire tape dans la configuration pour l'acceptation par Linux
  de multiples adresses IP est de crer un nouveau noyau. Ceci
  fonctionne mieux avec la srie des noyaux 2.0 (ou suprieure). Vous
  devrez inclure le support pour "IP networking" et "IP aliasing". Si
  vous avez besoin d'aide pour la compilation du noyau voyez le kernel
  howto <http://sunsite.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>, ou sa
  version franaise sur
  <http://www.freenix.org/unix/linux/HOWTO/Kernel-HOWTO.html>.

  Vous devrez ensuite configurer chaque interface au lancement. Si vous
  utilisez la distribution Red Hat akirs ceci peut tre fait  partir du
  panneau de contrle. Lancez X-Window en tant que super-utilisateur,
  vous devriez voir un panneau de contrle. Double-cliquez sur "network
  configuration" (configuration rseau). Allez ensuite sur le panneau
  des interfaces et choisissez votre carte rseau. Ensuite cliquez sur
  alias en bas de l'cran. Rentrez les informations et cliquez sur
  "done". Ceci devra tre fait pour chaque site virtuel / adresse IP.

  Si vous utilisez une autre distribution vous pouvez avoir  le faire
  manuellement. Vous pouvez simplement mettre les commandes dans le
  fichier rc.local de /etc/rc.d (en ralit vous devriez les mettre avec
  toutes celles concernant le rseau). Vous devrez avoir une commande
  ifconfig et route pour chaque priphrique. Les adresses en alias sont
  divises sous le priphrique principal. Par exemple eth0 aurait les
  alias eth0:0, eth0:1, eth0:2, etc. Voici un exemple de configuration
  d'un alias:


       ifconfig eth0:0 192.168.1.57
       route add -host 192.168.1.57 dev eth0:0




  Vous pouvez galement ajouter une adresse de broadcast et un netmask 
  la commande ifconfig. Si vous avez beaucoup d'alias vous pouvez
  vouloir faire une boucle pour le rendre plus simple. Pour plus
  d'informations voyez le IP alias mini howto <http://sun
  site.unc.edu/LDP/HOWTO/mini/IP-Alias.html> ou sa version franaise 
  <http://www.freenix.org/unix/linux/HOWTO/mini/IP-Alias.html>.

  Vous devrez ensuite configurer votre domain name server (DNS) pour
  desservir ces nouveaux domaines. Et si vous ne possdez pas dj les
  noms de domaine, vous devrez contacter l'Internic
  <http://www.internic.net> pour enregistrer les noms de domaines. Voyez
  le DNS-howto pour plus d'informations sur la configuration de votre
  DNS.

  Dernirement vous devrez configurer Apache de manire  desservir
  correctement le domaine virtuel. Ceci se fait dans le fichier de
  configuration httpd.conf prs de la fin. Ils vous donnent un exemple
  sur la faon de procder. Toutes les commandes spcifiques au site
  virtuel sont placs entre les marqueurs virtualhost. Vous pouvez
  mettre  peu prs n'importe quelle commande ici.  Gnralement vous
  devrez placer diffrents rpertoires pour le serveur, le rpertoire
  script, et les fichiers de log. Vous pouvez avoir un nombre quasi-
  illimit de sites virtuels en ajoutant plus de marqueurs virtualhost.

  Dans de rares cas vous pouvez avoir  lancer des serveurs spars si
  une directive est ncessaire pour un site virtuel, mais n'est pas
  accept dans les marqueurs du site virtuel. Ceci se fait en utilisant
  la directive bindaddress. Chaque serveur aura un nom des fichiers de
  configuration diffrents. Chaque serveur rpondra seulement  une
  seule adresse IP, spcifie par la directive bindaddress. C'est un
  gain incroyable de ressources systme.


  77..44..22..  HHbbeerrggeemmeenntt vviirrttuueell ppaarr IIPP ppaarrttaaggee

  C'est une nouvelle mthode pour l'hbergement virtuel. Elle utilise
  une adresse IP simple, tout en conservant les adresses IP pour les
  vrais machines (et pas les virtuelles). Dans le mme exemple utilis
  plus haut ces 30.000 sites virtuels utiliseraient seulement 50
  adresses IP (une pour chaque machine).  Ceci est fait en utilisant le
  nouveau protocole HTTP 1.1. Le navigateur dit au serveur quel site il
  dsire lorsqu'il envoie la demande. Le problme est que les
  navigateurs qui ne supportent pas HTTP 1.1 obtiendront la page
  principale des serveurs, qui peut tre configure pour donner la liste
  des sites virtuels disponibles. Ceci ruine la totale illusion de
  l'hbergement virtuel. L'illusion que vous avez votre propre serveur.
  La configuration est bien plus simple que pour l'hbergement virtuel
  bas sur IP. Vous aurez toujours besoin d'obtenir votre domaine 
  partir de l'Internic et de configurer votre DNS. Cette fois-ci le DNS
  pointe sur la mme adresse IP que le domaine original. Ensuite Apache
  se configure comme prcdemment. Puisque vous utilisez la mme adresse
  IP dans les marqueurs virtualhost, Apache sait que vous dsirez
  l'hbergement virtuel par IP partage.

  Il y a diffrentes choses  faire pour les anciens navigateurs. Je
  vais vous expliquer la meilleure. Tout d'abord vous devrez crer vos
  pages principales pour un serveur virtuel (soit bas IP, soit par IP
  partage). Ceci libre la page principale pour un lien listant tous
  vos sites virtuels. Ensuite vous devrez crer une sortie cache pour
  les anciens navigateurs. On le ralise en utilisant la directive
  ServerPath pour chaque site virtuel de la directive virtualhost. Par
  exemple en ajoutant ServerPath /monsite/  www.monsite.com, les
  anciens navigateurs pourront accder au site par
  www.monsite.com/monsite/. Ensuite mettez dans la page par dfaut du
  serveur principal un message qui les incitera poliment  obtenir un
  nouveau navigateur, et listera les liens sur toutes les sorties
  caches des sites qye vous hbergez sur cette machine. Lorsqu'un
  ancien navigateur accdera au site ils seront renvoys  la page
  principale, et auront un lien sur la page correcte. Les nouveaux
  navigateurs ne verront jamais la page principale et iront directement
  sur les sites virtuels. Vous devez vous rappeler de conservez tous vos
  liens relatifs entre les sites web, car les pages seront demandes 
  partir de deux URL diffrentes (www.monsite.com et
  www.monsite.com/monsite/).

  J'espre que je ne vous ai pas perdu ici, mais ce n'est pas d'une
  comprhension simple. Aprs tout, vous devriez peut-tre considrer
  l'hbergement bas IP. Une explication trs similaire se trouve sur le
  site web d'apache   <http://www.apache.org/manual/host.html>.

  Si quelqu'un dispose d'un pointeur sympathique pour l'hbergement par
  IP partage, j'aimerais le connatre. Il serait agrable de connatre
  le pourcentage de navigateurs qui supportent le HTTP 1.1, et d'avoir
  une liste des navigateurs et des versions qui supportent HTTP 1.1.


  77..55..  SSccrriippttss CCGGII

  Il existe deux mthodes diffrentes pour donner  vos utilisateurs la
  possibilit d'utiliser des scripts CGI. La premire est de dclarer
  tout fichier se terminant par .cgi comme script CGI. La seconde est de
  crer des rpertoires de scripts (gnralement nomms cgi-bin). Vous
  pouvez galement utiliser les deux mthodes. Quelque soit la mthode
  utilise vos scripts doivent tre excutable par n'importe qui (chmod
  711). En donnant  vos utilisateurs l'accs aux scripts vous crez un
  gros risque de scurit. Fates proprement votre travail afin de
  minimiser les risques concernant la scurit.

  Je prfre la premire mthode, spcialement pour les scripts
  complexes.  Ceci vous autorisera  mettre les scripts dans n'importe
  quel rpertoire.  J'aime mettre mes scripts au mme endroit que les
  pages web qui s'en servent. Pour les sites avec beaucoup de script,
  ceci est beaucoup mieux que d'avoir un rpertoire plein de scripts. La
  configuration est simple. Tout d'abord supprimez le commentaire du
  marqueur .cgi  la fin du fichier srm.conf. Ensuite vrifiez que tous
  vos rpertoires ont les marqueurs option ExecCGI ou All dans le
  fichier access.conf.

  Crer un rpertoire de scripts est considr comme plus sr.  Pour
  crer un rpertoire de scripts vous utilisez la directive ScriptAlias
  dans le fichier srm.conf. Le premier argument est l'Alias, et le
  second le rpertoire rel. Par exemple ScriptAlias /cgi-bin/
  /usr/httpd/cgi-bin/ rend le rpertoire /usr/httpd/cgi-bin capable
  d'excuter les scripts. Ce rpertoire sera utilis mme si quelqu'un
  demande le rpertoire /cgi-bin/. Pour des raisons de scurit vous
  devez galement changer les proprits du rpertoire pour Options
  none, AllowOveride none dans le fichier access.conf (supprimer
  simplement les commentaires de l'exemple donn). Egalement ne placez
  pas vos rpertoires de scripts en tant que sous rpertoire de vos
  rpertoires de pages web. Par exemple si vous servez les pages 
  partir de /home/httpd/html/, ne crez pas le rpertoire de scripts en
  tant que /home/httpd/html/cgi-bin; au lieu de a mettez le dans
  /home/httpd/cgi-bin.

  Si vous dsirez que vos utilisateurs disposent de leurs propres
  rpertoires de scripts vous pouvez utiliser de multiples commandes
  ScriptAlias. Les sites virtuels doivent avoir cette commande
  ScriptAlias dans leurs directives virtualhost.  Est ce que quelqu'un
  connat un moyen simple pour autoriser les utilisateurs  avoir leur
  propre rpertoire cgi-bin sans utiliser des commandes individuelles
  ScriptAlias ?


  77..66..  RRppeerrttooiirreess WWeebb ddeess UUttiilliissaatteeuurrss

  Il y a deux diffrentes mthodes pour s'occuper des rpertoires web
  des utilisateurs. La premire est d'avoir un sous-rpertoire dans les
  rpertoires des utilisateurs (gnralement public_html).  La seconde
  est d'avoir une aborescence entirement diffrente pour les
  rpertoires web.  Pour ces deux mthodes vrifiez les options d'accs
  aux rpertoires dans le fichier access.conf.

  La premire mthode est configure par dfaut dans apache. Lorsqu'une
  demande pour /~bob/ arrive, Apache regarde dans le rpertoire
  public_html du rpertoire principal de bob. Vous pouvez changer le
  rpertoire avec la directive UserDir dans le fichier srm.conf. Ce
  rpertoire doit lisible et excutable par tout le monde.  Cette
  mthode cre un risque pour la scurit car Apache le rpertoire
  principal eds utilisateurs doit tre excutable par toute personne
  afin qu'Apache puisse y accder.

  La seconde mthode est facile  configurer. Vous devez juste changer
  la directive UserDir dans le fichier srm.conf. Il y a beaucoup de
  formats diffrents; vous pouvez voir la documentation d'Apache pour
  clarification. Si vous que chaque utilisateur dispose de son propre
  rpertoire sous /home/httpd/, vous utiliserez UserDir /home/httpd.
  Ensuite lorsqu'une demande arrivera pour /~bob/ Apache la traduira
  pour /home/httpd/bob/. Ou si vous avez un sous-rpertoire dans le
  rpertoire de bob vous pouvez utiliser UserDir /home/httpd/*/html.
  Ceci traduira en /home/httpd/bob/html/ et vous autorisera galement 
  avoir un rpertoire de script (par exemple /home/httpd/bob/cgi-bin/).


  77..77..  MMooddee ddmmoonn ccoonnttrree mmooddee IInneettdd

  Il y a deux mthodes par lesquelles apache peut tourner. L'une est un
  dmon qui tourne tout le temps (Apache appelle ceci standalone). La
  seconde est celle du super-serveur inetd.

  Le mode dmon est de loin suprieur au mode inetd. Apache est
  configur pour le mode dmon par dfaut. La seule raison d'utiliser le
  mode d'inetd est pour les applications trs peu utilises, comme les
  tests de scripts en interne, l'Intranet d'une petite compagnie, etc.
  Le mode inetd conomisera de la mmoire car apache ne sera charg que
  lorsqu'il sera demand. Seul le dmon inetd restera en mmoire.

  Si vous n'utilisez pas trs souvent apache vous pouvez juste vouloir
  le conserver en mode dmon et le lancer lorsque vous en avez besoin.
  Ensuite vous pouvez le supprimer lorsque vous avez termin (soyez sr
  de bien supprimer le processus parent et non pas un des enfants).

  Pour configurer le mode inetd vous devrez diter quelques fichiers.
  Tout d'abord /etc/services regardez si http est dj prsent. S'il n'y
  est pas alors ajoutez ceci:


       http    80/tcp




  Le placer juste aprs 79 (finger) serait un bon endroit. Ensuite vous
  devez diter le fichier /etc/inetd.conf  et ajouter la ligne pour
  Apache:


       http    stream  tcp     nowait  root    /usr/sbin/httpd httpd




  Changez le chemin si vous avez Apache  un autre endroit. et le second
  httpd n'est pas une erreur; le dmon inetd en a besoin. Si vous
  n'utilisez gnralement pas le dmon inetd, vous pouvez vouloir com
  menter toutes les autres lignes du fichier afin de ne pas activer les
  autres services (FTP, finger, telnet, et beaucoup d'autres choses qui
  sont gnralement lances par ce dmon).

  Si le dmon inetd est dj lanc (inetd), alors vous devez lui envoyer
  le signal SIGHUP (par kill; voyez la page de manuel de kill pour plus
  d'infos) ou relancer l'ordinateur pour que les changements soient
  effectifs.  Si vous n'avez pas lanc inetd alors vous pouvez le lancer
  manuellement. Vous devez galement l'ajouter  vos fichiers
  d'initialisation afin qu'il soit charg au lancement (le fichier
  rc.local serait un bon choix).


  77..88..  AAuuttoorriisseerr lleess ccoommmmaannddeess ppuutt eett ddeelleettee

  Les nouveaux outils de publication web supportent cette nouvelles
  mthodes d'envoi des pages web par http ( la place de FTP). Certains
  de ces produits ne supportent mme plus le FTP! Apache le supporte,
  mais il manque d'un script pour se charger des requtes. Le script
  peut tre un gros trou de scurit, soyez certain de ce que vous
  fates avant de tenter d'en crire ou d'en installer un.

  Si quelqu'un connat un script qui fonctionne fates le moi savoir et
  j'incluerai l'adresse ici.

  Pour plus d'informations voyez l'article d'Apacheweek 
  <http://www.apacheweek.com/features/put>.


  77..99..  AAuutthheennttiiffiiccaattiioonn ddee ll''UUttiilliissaatteeuurr // CCoonnttrrllee ddeess AAccccss

  Il s'agit de l'une de mes options prfres. Elle vous autorise 
  protger un rpertoire ou un fichier par un mot de passe sans utiliser
  de scripts CGI. Il vous autorise galement  interdire ou  autoriser
  l'accs sur la base de l'adresse IP ou du nom de domainde du client.
  C'est une spcificit trs intressante pour laisser les crtins hors
  de votre messagerie et des vos livres d'or (vous avez l'IP ou le nom
  de domaine  partir de vos fichiers de log).


  Pour autoriser l'authentification de l'utilisateur le rpertoire doit
  avoir AllowOverrides AuthConfig dans le fichier access.conf. Pour
  autoriser le contrle d'accs (par domaine ou adresse IP)
  AllowOverrides Limit doit tre mis pour ce rpertoire.

  La configuration du rpertoire oblige le placement d'un fichier
  .htaccess dans le rpertoire. Pour l'authentification de l'utilisateur
  il est galement utilis avec un .htpasswd et optionnellement un
  fichier .htgroup. Ces fichiers peuvent tre partages pour de
  multiples fichiers .htaccess si vous le dsirez.

  Pour des raisons de scurit je recommande que chacun utilise ces
  directives dans leur fichier access.conf:



       <files ~ "/\.ht">
       order deny,allow
       deny from all
       </files>




  Si vous n'tes pas l'administrateur du systme vous pouvez galement
  l'ajouter dans votre fichier .htaccess si AllowOverride Limit est
  configur pour votre rpertoire. Cette directive interdira  quiconque
  de regarder dans vos fichiers de contrle d'accs (.htaccess,
  .htpasswd, etc).

  Il y a de nombreux types de fichiers et d'options qui peuvent tre
  utiliss avec le contrle d'accs. Toutefois il n'est pas de la
  comptence de ce document de dcrire ces fichiers. Pour les
  informations sur la configuration de l'authentification des
  utilisateurs voyez l'article d'Apacheweek 
  <http://www.apacheweek.com/features/userauth> ou les pages de la NCSA
   <http://hoohoo.ncsa.uiuc.edu/docs-1.5/tutorials/user.html>.


  77..1100..  ssuu--eexxeecc

  su-exec lance les scripts CGI en tant qu'utilisateur du propritaire.
  Normalement ils sont lancs en tant qu'utilisateur du serveur web
  (gnralement nobody). Ceci autorise les utilisateurs  accder 
  leurs propres fichiers CGI sans les rendre autoriss en criture (un
  trou de scurit). Mais si vous ne fates pas attention vous pouvez un
  trou encore plus gros en utilisant le code su-exec. Celui-ci effectue
  des contrles de scurit avant d'excuter les scripts, mais si vous
  le configurez de manire incorrecte vous aurez un trou de scurit.

  Le code su-exec n'est pas pour les amateurs. Ne l'utilisez pas si vous
  ne savez pas ce que vous fates. Vous pouvez terminer par un gros
  problme de scurit o vos utilisateurs peuvent obtenir des accs
  super-utilisateurs pour votre systme. Ne modifiez pas le code
  quelqu'en soit la raison. Lisez attentivement toute la documentation.
  Le code su-exec est intentionnellement difficile  configurer afin
  d'viter l'utilisation par des amateurs (tout doit tre fait  la
  main, il n'y a pas de script d'installation).

  Le code su-exec se trouve dans le rpertoire support des sources. Tout
  d'abord vous devez diter le fichier suexec.h pour votre systme.
  Ensuite vous devez compiler le code su-exec avec cette commande:


       gcc suexec.c -o suexec

  Copiez ensuite l'excutable suexec dans le rpertoire appropri.
  Apache le place par dfaut dans /usr/local/etc/httpd/sbin/. Ceci peut
  tre chang en ditant le fichier httpd.h dans les sources d'Apache et
  en recompilant Apache. Apache regardera seulement dans ce rpertoire,
  Il ne cherchera pas ailleurs. Ensuite le fichier doit tre chang pour
  la possession par le super-utilisateur (chown root suexec) et les per
  missions doivent tre changes (chmod 4711 suexec).  Enfin relancez
  Apache, il doit vous donner un message sur la console indiquant que
  su-exec est utilis.

  Les scripts CGI doivent tre mis en excutable par tous comme
  d'habitude.  Ils seront automatiquement lancs par le possesseur du
  script CGI. Si vous changez les permissions les scripts CGI ne
  fonctionneront pas. Si le rpertoire ou le fichier est en criture par
  tous ou par un groupe le script ne fonctionnera pas. Les scripts
  possds par les utilisateurs systme ne doivent pas tre lancs
  (root, bin, etc.). Pour les autres conditions de scurit qui doivent
  tre remplies voyez la documentation de su-exec. Si vous avez des
  problmes voyez le fichier de log de su-exec nomm cgi.log.

  Su-exec ne fonctionne pas si vous lancez Apache par inetd, il
  fonctionne seulement en mode dmon. Ceci sera fix dans la prochaine
  version car il n'y aura pas de mode inetd. Si vous aimez jouer avec le
  code source, vous pouvez diter le fichier http_main.c. Vous pouvez
  rire de la ligne o Apache annonce qu'il utilise le su-exec wrapper
  (ceci est faussement marqu sur l'avant de toute sortie).

  Lisez attentivement la documentation d'Apache sur su-exec. Elle est
  inclue dans les sources et est disponible sur le site web d'Apache 
  <http://www.apache.org/docs/suexec.html>.


  77..1111..  IImmaaggeemmaappss

  Apache peut grer des cartes d'images du ct du serveur. Ce que l'on
  appelle "Imagemaps" sont les images des pages web qui envoient les
  utilisateurs  divers emplacements, dpendant de l'endroit o ils
  cliquent.  Pour utiliser les imagemaps vrifiez que le module imagemap
  est install (c'est un des modules par dfaut). Ensuite vous devez
  supprimer le commentaire de la ligne .map  la fin du fichier
  srm.conf.  Maintenant tous les fichiers se terminant en .map seront
  des fichiers d'imagemap. Les fichiers imagemap dlimitent diffrentes
  aires sur l'image renvoyant vers des liens spars. Apache utilise des
  fichiers d'aires au format standard NCSA. Voici un exemple utilisant
  un fichier d'aire dns une page web:


       <a href="/map/mapfile.map">
       <img src="picture.gif" ISMAP>
       </a>




  Dans cette exemple mapfile.map est le fichier d'aires, et picture.gif
  est l'image cliquable.

  Il y a de nombreux programmes qui peuvent gnrer des fichiers d'aires
  compatibles NCSA ou vous pouvez les crer vous-mme. Pour une
  discussion plus dtaille sur les imagemaps et les fichiers d'aires
  voyez l'article d'Apacheweek 
  <http://www.apacheweek.com/features/imagemaps>.




  77..1122..  SSSSII//XXSSSSII

  Les Server Side Includes (SSI) ajoutent un contenu dynamique  des
  pages web qui sinon seraient statiques. Les en-ttes sont ajouts dans
  les pages web en tant que commentaires. Le serveur web les excute
  ensuite et passe les rsultats au serveur web. SSI peut ajouter des
  en-ttes et des notes de pieds aux documents, ajouter la date 
  laquelle le document a t modifi pour la dernire fois, excuter une
  commande systme ou un script CGI. avec le tout nouveau eXtended
  Server Side Includes (XSSI) vous pouvez faire bien plus. XSSI ajoute
  les variables et les instructions de contrle du flux (if, else, etc).
  C'est quasiment comme avoir un langage de programmation avec lequel on
  peut travailler.

  L'analyse syntaxique de tous les fichiers pour les commandes SSI
  utiliserait beaucoup de ressources systme. Cependant vous devez
  distinguer les fichiers HTML normaux de ceux qui contiennent les
  commandes SSI. Ceci se fait gnralement en changeant l'extension des
  fichiers HTML utilisant SSI.  Gnralement on utilise l'extension
  .shtml.

  Pour faire fonctionner SSI/XSSI vrifiez tout d'abord que le module
  des en-ttes est install. Editez ensuite srm.conf et supprimez les
  commentaires des directives AddType et AddHandler pour les fichiers
  .shtml. Finalement vous devez configurer Options Includes pout tous
  les rpertoires o vous dsirez lancer des fichiers SSI/XSSI. Ceci se
  fait dans le fichier access.conf. Maintenant tous les fichiers avec
  l'extension .shtml seront analyss pour les commandes SSI/XSSI.

  Un autre moyen de faire fonctionner les en-ttes est d'utiliser la
  directive XBitHack. Si vous la mettez en marche il regardera si le
  fichier est excutable par l'utilisateur. Si il l'est et que Options
  Includes est autoris pour le rpertoire, alors le fichier sera trait
  comme un fichier SSI. Ceci fonctionne seulement pour les fichiers dont
  le type mime est text/html (fichiers .html .htm). Ceci n'est pas la
  mthode prfre.

  Il y a un risque pour la scurit en autorisant SSI  excuter des
  commandes systmes et des scripts CGI. Toutefois il est possible de
  bloquer cette possibilit avec la directire Option IncludesNOEXEC au
  lieu de Option Includes dans le fichier access.conf. Toutes les autres
  commandes SSI fonctionneront encore.

  Pour plus d'informations voyez la documentation d'Apache mod_includes
  qui se trouve dans les sources. Il est galement disponible sur le
  site web   <http://www.apache.org/docs/mod/mod_include.html>.

  Pour une discussion plus dtaille de l'implmentation SSI/XSSI voyez
  l'article d'Apacheweek   <http://www.apacheweek.com/features/ssi>.

  Pour plus d'informations sur les commandes SSI voyez la documentation
  de la NCSA 
  <http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html>.

  Pour plus d'informations sur les commandes XSSI allez sur
  <ftp://pageplus.com/pub/hsf/xssi/xssi-1.1.html>.


  77..1133..  SSyyssttmmee mmoodduullaaiirree

  Apache peut tre tendu pour supporter quasiment tout avec les
  modules.  Il y a beaucoup de modules qui existent dj. Seul les
  modules d'intrt gnral sont inclus avec Apache. Pour les liens vers
  les modules existants allez voir le


  Apache Module Registry  <http://www.zyzzyva.com/module_registry/>.

  Pour les informations sur la programmation des modules voyez
  <http://www.zyzzyva.com/module_registry/reference/>


  88..  AAjjoouuttss aauu sseerrvveeuurr wweebb

  Dsol, cette section n'a pas encore t crite.

  A venir bientt: mSQL, PHP/FI, cgiwrap, Fast-cgi, MS frontpage
  extentions, et beaucoup d'autres.


  99..  FFAAQQ ((FFooiirree AAuuxx QQuueessttiioonnss))

  Il n'y a pas de question frquemment poses - pour l'instant...


  1100..  DDooccuummeennttss pplluuss aavvaannccss



  1100..11..  LLiivvrreess ddee cchheezz OO''RReeiillllyy && AAssssoocciiaatteess

  A mon avis O'Reilly & Associates ditent les meilleures rfrences
  techniques de la plante. Ils concentrent leurs efforts sur des sujets
  comme l'Internet, Unix et la programmation. Ils commencent tout
  doucement avec beaucoup d'exemples et lorsque vous terminez le livre
  vous tes un expert.  Je pense que vous pouvez arrter mme si vous
  avez seulement lu la moiti du livre. Ils ajoutent galement un peu
  d'humour  des sujets qui sinon seraient lassants.

  Ils disposent d'excellents livres sur HTML, PERL, la programmation
  CGI, Java, JavaScript, C/C++, Sendmail, Linux et beaucoup d'autres. De
  plus les sujets changeant rapidement (comme le HTML) sont mis  jour
  et rviss tout les six mois environ. Visitez donc le site web
  d'O'Reilly & Associates <http://www.ora.com/> ou arrtez vous chez
  votre libraire local pour plus d'informations.

  Et rappellez vous que s'il n'est pas marqu O'Reilly & Associates sur
  la couverture, c'est probablement quelqu'un d'autre qui l'a crit.


  1100..22..  IInntteerrnneett RReeqquueesstt FFoorr CCoommmmeennttss ((RRFFCC))


    RFC1866 written by T. Berners-Lee and D. Connolly, "Hypertext
     Markup Language - 2.0", 11/03/1995

    RFC1867 writtenm by E. Nebel and L. Masinter, "Form-based File
     Upload in HTML", 11/07/1995

    RFC1942 written by D. Raggett, "HTML Tables", 05/15/1996

    RFC1945 by T. Berners-Lee, R. Fielding, H. Nielsen, "Hypertext
     Transfer Protocol -- HTTP/1.0", 05/17/1996.

    RFC1630 by T. Berners-Lee, "Universal Resource Identifiers in WWW:
     A Unifying Syntax for the Expression of Names and Addresses of
     Objects on the Network as used in the World-Wide Web", 06/09/1994

    RFC1959 by T. Howes, M. Smith, "An LDAP URL Format", 06/19/1996



  Serveur Web de Base de Donnees mSQL / perl HOWTO
  par Oliver Corff,
  version francaiseNicolas Caillaud
  v0.1, 17 September 1997

  Ce  Mini HOWTO, tres largement inspire de l'article de Michael Schilli
  Gebunkert : Datenbankbedienung mit Perl und CGI, publie dans le  maga-
  zine  informatique  allemand  iX du mois d'aout 1997, explique comment
  construire une base de donnees client/server SQL sur le Web, utilisant
  HTML pour l'interface utilisateur.

  11..  AA pprrooppooss ddee ccee DDooccuummeenntt

  11..11..  LLeecctteeuurrss ccoonncceerrnneess

  Ce  document  devrait etre utile a ceux qui veulent mettre en place un
  serveur de base de donnees sur le Web, mais qui ne  savent  pas  quels
  logiciels  sont  necessaires,  ni  comment  les  installer. Il fournit
  toutes les informations utiles pour  faire  fonctionner  une  base  de
  donnees  SQL sur un serveur Web ; il _n_e rentre _p_a_s dans les details de
  la programmation CGI,  ni  n'explique  le  langage  SQL.  D'excellents
  ouvrages  existent  sur  ces  sujets,  et  le  but  de ce document est
  seulement de fournir  une  plate-forme  sur  laquelle  un  utilisateur
  pourra etudier la programmation CGI et le langage SQL.

  Pour  faire  tourner un systeme SQL sur une petite echelle (et non pas
  l'exemple  classique  du  systeme  de  reservation  d'une   importante
  compagnie  aerienne, ou le systeme de gestion de base de donnees d'une
  mission spatiale), il suffit d'avoir les  logiciels  decrits  dans  ce
  document,  et la documentation les accompagnant. Le manuel utilisateur
  de  msql  (la  base  de  donnees  decrite  ici)  fournit  suffisamment
  d'informations  sur SQL pour vous permettre de construire votre propre
  base.

  Le lecteur doit savoir comment recuperer des fichiers par ftp s'il n'a
  pas  les  CD-ROM  adequats,  et  comment  construire des executables a
  partir des fichiers sources. En tout etat de cause, toutes les  etapes
  decrites  dans  ce  document  ont  ete testees sur un systeme reel, et
  devraient fonctionner sur le systeme du lecteur.

  11..22..  CCoonnvveennttiioonnss ttyyppooggrraapphhiiqquueess

  Une commande utilisateur :

  # make install

  Affichage d'un programme :

       Program installed. Read README for details on how to start.

  Exemple de fichier de code :

  ______________________________________________________________________
  # Un commentaire
  char lettre;
  ______________________________________________________________________

  22..  IInnttrroodduuccttiioonn

  On peut raisonnablement supposer que des bases de donnees contenant de
  gros  volumes  de  donnees, ou un schema relationnel complique (comme,
  par exemple, une base lexicale pour un langage  parle),  doivent  etre
  accessibles a beaucoup d'utilisateurs a la fois. De meme, il doit etre
  possible d'utiliser diverses plates-formes materielles et  logicielles
  existantes  pour  construire le systeme final.  Pour reduire les couts
  de mise en oeuvre, une seule partie du systeme a reellement besoin  de
  puissance  :  le  serveur  de  la  base  de  donnees  ;  les  stations
  utilisateurs doivent seulement afficher des donnees  et  accepter  des
  commandes utilisateurs, mais le traitement proprement dit est fait sur
  une seule machine, justifiant ainsi le terme "base de donnees client -
  serveur".   De  plus,  l'interface  utilisateur  doit  etre  facile  a
  configurer, et requerir le moins de traitement possible sur le client.

  Les  elements  suivants  (protocoles,  logiciels  et plus generalement
  concepts) sont utilises pour construire  un  systeme  conforme  a  ces
  criteres :

     LLiinnuuxx
        est  le  systeme  d'exploitation. Il s'agit d'une implementation
        stable d'Unix, multi-utilisateurs,  multi-taches,  avec  support
        reseau  complet (TCP/IP entre autres). A part le cout du support
        et de la transmission, il est gratuit et  livre  sous  forme  de
        distributions,  qui  incluent  generalement  l'indispensable, du
        Systeme d'Exploitation lui-meme au traitement de  texte,  outils
        de   developpement  logiciel,  langage  de  script,  generateurs
        d'interfaces, etc.

     HHTTMMLL
        Le langage HTML (HyperText Markup  Language)  est  utilise  pour
        construire   des   interfaces  de  systemes  reseaux  comme  des
        Intranets, des serveurs Web (WWW). HTML est  extremement  simple
        et  peut etre genere a partir de n'importe quel editeur de texte
        ASCII.

     NNaavviiggaatteeuurrss
        Les navigateurs sont des applications en mode texte (par exemple
        Lynx) ou en mode graphique (par exemple Mosaic, Netscape, Arena,
        etc.) destinees a la lecture et a l'affichage de documents HTML.
        C'est le seul logiciel directement manipule par l'utilisateur de
        la base de donnees.  Grace aux  navigateurs,  on  peut  afficher
        differents  types  de  donnees (texte ou images), et communiquer
        avec des serveurs HTTP (voir plus loin), heberges par a peu pres
        n'importe  quel modele d'ordinateur sur lequel un navigateur est
        disponible.

     SSeerrvveeuurrss HHTTTTPP
        Un serveur HTTP fournit  l'acces  a  une  zone  de  l'ordinateur
        contenant  les  donnees  publiques  d'un reseau.  Il supporte le
        protocole   HTTP   et   fournit   l'information   demandee   par
        l'utilisateur.

     SSQQLL
        SQL  (Structured  Query Language) est un langage de manipulation
        de donnees dans une base relationnelle. Sa  grammaire  est  tres
        simple   et   constitue  un  standard  largement  supporte  dans
        l'industrie. Les bases de donnees SQL  sont  au  coeur  meme  du
        concept  classique  de  base  de  donnees  Client - Serveur. Des
        systemes SQL reconnus existent, comme Oracle, Informix,  etc.  ;
        on  trouve  aussi  des  bases  comme  msql,  mysql,  postgresql,
        pratiquement gratuites lorsqu'elles sont utilisees dans un cadre
        scolaire ou universitaire.

     CCGGII
        CGI  (Common Gateway Interface) est l'interface de programmation
        entre le systeme supportant les  donnees  (dans  notre  cas,  le
        systeme  SQL)  et  le  protocole  reseau  (HTML,  bien sur). Les
        interfaces CGI peuvent etre construites en utilisant beaucoup de
        langages  de  programmation,  dont  l'un des plus populaires est
        perl.

     PPeerrll
        Perl est un langage de  script  particulierement  puissant,  qui
        combine  les  avantages  du  C,  des  differents  shells, et des
        langages de manipulations de flux comme awk ou sed. Par exemple,
        perl  possede  de  nombreux  modules  de manipulation de base de
        donnees SQL.

  33..  PPrroocceedduurree dd''iinnssttaallllaattiioonn

  33..11..  MMaatteerriieell rreeqquuiiss

  Aucune supposition ne peut etre faite sur les besoins en materiel d'un
  serveur de base de donnees. Cela depend trop du nombre d'utilisateurs,
  du  type  d'application,  de  la  charge  du  reseau,  etc.  Dans   un
  environnement  comprenant  peu  d'utilisateurs  et  un  trafic  reseau
  faible, un 486 ou equivalent, avec 16 MO de memoire  vive,  peut  etre
  suffisant.  Linux,  le  systeme  d'exploitation,  est tres efficace en
  termes de ressources, et peut fournir suffisamment de  puissance  pour
  faire  tourner un grand nombre d'applications en meme temps. Bien sur,
  un processeur plus puissant et plus de memoire vive signifient plus de
  puissance, mais la quantite de memoire vive est plus importante que le
  processeur. Plus le systeme a de memoire vive, moins il est oblige, en
  cas  de besoin, de swapper les processus les plus gourmands en memoire
  sur le disque.

  Avec un systeme equipe de 32 MO de memoire vive et d'un bus  PCI,  les
  recherches et operations de tri peuvent etre faites sans avoir recours
  au(x) fichier(s) d'echange (swap), donnant d'excellents resultats.

  L'installation decrite dans cet article a ete faite sur un IBM  686  a
  133MHz,  avec 32 MO de memoire vive et un disque dur IDE de 1.2 GO. La
  suite  du  document  presente  les   etapes   indispensables   a   une
  installation complete.

  33..22..  LLooggiicciieell

  Les  logiciels decrits dans cet article sont disponibles sur Internet,
  ou sur CD-ROM. Les produits suivants sont utilises :

  +o  Distribution Red Hat 4.2, parue pendant l'ete 1997, disponible  sur
     CD-ROM  (Red  Hat  Linux  PowerTools : 6 CD-ROM complets et prets a
     etre  utilises)  ou  sur  Internet,   sur   le   site   de   RedHat
     <http://www.redhat.com> ;

  +o  Base  de  donnees  SQL  msql  :  disponible  en  deux versions. Les
     differences entre ces deux versions resident dans le nombre maximum
     de  transactions  supporte,  l'interface  d'administration, etc. La
     version la plus ancienne, 1.0.16,  est  disponible  sur  les  sites
     miroirs de Sunsite. L'executable au format ELF peut etre trouve sur
     Sunsite, ou sur CD-ROM (en l'occurrence le disque 4 de  l'InfoMagic
     Linux  Developper's Resource, ensemble de 6 CD-ROM, decembre 1996),
     ou chez InfoMagic. La version la plus  recente,  2.0.1,  peut  etre
     obtenue  directement  de la page Web d'Hughes, en Australie, ou sur
     de nombreux sites miroirs dans le monde ;

  +o  Perl du CPAM : The Comprehensive Perl Archive Network. Sur  le  CD-
     ROM WalnutCreek, ISBN 1-57176-077-6, mai 1997 ;

  +o  L'exemple  de  programme  CGI  de Michael Schilli, dans le magazine
     informatique iX d'aout 1997, pages 150-152, disponible par ftp.

  33..33..  IInnssttaallllaattiioonn ddee ll''OOSS

  Linux est installe a partir de la distribution Red Hat Linux 4.2. Pour
  reussir  a  l'installer,  la  machine  doit avoir un lecteur de CD-ROM
  accessible a partir de MSDOS, un lecteur de CD-ROM bootable,  ou  bien
  encore  une  disquette  de  boot preparee selon les instructions du CD
  Linux.

  Pendant l'installation, l'utilisateur peut selectionner et  configurer
  de  nombreux  paquetages  logiciels.  Il  convient de selectionner les
  suivants :

  +o  support du protocole TCP/IP

  +o  le serveur http Apache

  +o  le langage Perl

  +o  le systeme XWindow

  +o  les navigateurs Arena (graphique) et Lynx (mode texte).

  Tous ces paquetages sont fournis avec la distribution Linux.  Si  vous
  ne  les  installez  pas maintenant, vous pourrez le faire plus tard en
  utilisant glint, le gestionnaire graphique  de  paquetages  logiciels.
  Assurez-vous  d'etre  connecte comme utilisateur root lorsque vous les
  installerez.

  Il n'est pas du ressort  de  cet  article  de  decrire  l'installation
  reseau,  ni  la  procedure  d'initialisation.  Pour cela, consultez la
  documentation en ligne (pages de manuel, HTML,  texinfo)  et  imprimee
  (Bible Linux, etc.).

  La  procedure d'installation de Red Hat est tres au point et necessite
  peu d'interaction de la part de l'utilisateur,  en  dehors  des  choix
  courants  (les noms de machines, par exemple). Une fois l'installation
  terminee, le systeme est pret a tourner.

  L'installation de XWindow n'est pas obligatoire pour le serveur,  mais
  cela  rend  les  acces  locaux et les tests plus faciles. La procedure
  d'installation de XWindow peut etre conduite par differents programmes
  ;  XF86Setup  offre le plus de facilite d'auto-test, et demande peu de
  connaissance des menus details (la programmation de  l'horloge  video,
  etc.).  La  seule  contrainte  est  que  le  logiciel  puisse detecter
  l'adaptateur video.  Des cartes graphiques acceleratrices  bon  marche
  (comme  les  cartes  basees  sur  le  chip  Trio S64, avant le S64UV+)
  fonctionnent sans aucun probleme.

  A partir de maintenant, nous supposons que le systeme tourne,  et  que
  Apache,  Perl et XWindow ont ete installes avec succes. Nous supposons
  de meme que les fichiers et structure de  repertoires  sont  tels  que
  definis dans l'installation. Enfin, nous laissons le nom de la machine
  tel quel, et pour le  moment,  supposons  que  c'est  localhost.  Nous
  utiliserons  ce  nom  pour  tous les tests d'installation ; des que le
  systeme fonctionnera, le veritable nom pourra etre ajoute.  Notez  que
  l'installation  reseau  suppose  d'editer le fichier /etc/hosts, entre
  autres. Cela peut etre pris en charge par les outils  d'administration
  fournis a l'utilisateur root.

  33..44..  LLee sseerrvveeuurr HHTTTTPP

  Le  serveur  HTTP fourni avec Linux est Apache, httpd pour le systeme.
  La page de manuel (man httpd) explique comment installer  et  demarrer
  le  demon http (donc http_d) mais, comme il a ete indique plus haut, si
  l'installation s'est  bien  passee,  le  serveur  HTTP  doit  tourner.
  Verifiez  l'arborescence  des  repertoires : le repertoire /home/httpd
  doit exister, avec trois sous-repertoires : ../cgi-bin/, ../html/  and
  ../icons/.   Dans  ../html/, vous devez trouver un fichier index.html.
  Plus tard, nous modifierons  ou  remplacerons  ce  fichier  par  notre
  propre  index.html.  Toute  la  configuration  se fait dans le fichier
  /etc/httpd/conf/.  Le systeme est correctement preconfigure et ne doit
  pas etre modifie, si l'installation s'est faite sans probleme.

  33..55..  LLeess nnaavviiggaatteeuurrss

  Il  existe  trois  types  de  navigateurs disponibles sous Linux : les
  logiciels purement textuels, comme  Lynx,  des  logiciels  simples  et
  experimentaux  comme  Arena  (gratuit)  et  des logiciels commerciaux,
  comme Netscape (partagiciel !)  avec support de  Java  integre.  Alors
  que Lynx et Arena sont fournis avec Linux, Netscape doit etre recupere
  par d'autres sources. Netscape est disponible sous  forme  de  fichier
  binaire  precompile  pour  Linux  sur architecture ix86 et tourne "tel
  quel" une fois l'archive decompressee.

  33..55..11..  CCoonnffiigguurraattiioonn ddee LLyynnxx

  Une fois Lynx demarre, il cherche une 'URL par  defaut'  qui  n'existe
  pas  toujours  si  le systeme n'a pas d'acces Internet permanent. Pour
  changer  cette  URL  par  defaut  (ainsi  que  d'autres   details   de
  configuration),    l'administrateur    doit    editer    le    fichier
  /usr/lib/lynx.cfg. Ce fichier  est  gros,  environ  57000  octets,  et
  contient  des informations quelquefois contradictoires. Il etablit son
  propre repertoire dans /usr/local/lib. Au debut du fichier figure  une
  ligne  commencant par STARTFILE. Remplacez cette ligne par la suivante
  :  STARTFILE:http://localhost,  en  vous  assurant  qu'il  n'y  a  pas
  d'espace en trop :
  ______________________________________________________________________
  # STARTFILE:http://www.nyu.edu/pages/wsn/subir/lynx.html
  STARTFILE:http://localhost
  ______________________________________________________________________

  Apres  avoir  enregistre le fichier, Lynx doit maintenant ouvrir notre
  index.html s'il est lance sans argument.

  33..55..22..  CCoonnffiigguurraattiioonn dd''AArreennaa

  S'il est lance sans argument, Arena  recherche  son  URL  par  defaut.
  Cette URL est codee en dur dans l'executable, mais peut etre redefinie
  en utilisant la variable  d'environnement  WWW_HOME.  L'administrateur
  systeme  peut  placer la ligne suivante dans le fichier /etc/profile :
  WWW_HOME="http://localhost". Cette variable doit etre  exportee,  soit
  par  l'ajout  de la ligne adequate (export WWW_HOME), soit en ajoutant
  WWW_HOME a la ligne d'export courante :

  ______________________________________________________________________
  WWW_HOME="http://localhost"
  export WWW_HOME
  ______________________________________________________________________

  A la prochaine connexion, la nouvelle  URL  par  defaut  d'Arena  sera
  connue du systeme.

  33..55..33..  IInnssttaallllaattiioonn eett CCoonnffiigguurraattiioonn ddee NNeettssccaappee

  Netscape  etait  un  produit commercial, et n'est donc pas inclus dans
  les anciennes distributions Linux. Neanmoins,  il  est  telechargeable
  par  Internet,  ou  accessible  a  partir de certaines compilations de
  logiciels sur CD-ROM. Netscape est fourni sous la  forme  de  fichiers
  binaires  precompiles pour les plates-formes les plus courantes. Avant
  de   l'installer,   il   est   utile   de    creer    le    repertoire
  /usr/local/Netscape,  dans lequel l'archive sera decompactee. Tous les
  fichiers doivent rester a cette place (sauf  la  bibliotheque  Java  :
  suivez  les instructions du fichier README fourni avec les binaires de
  Netscape),  et  il  suffira  de  creer   un   lien   symbolique   avec
  /usr/local/bin par la commande :

  # ln -s /usr/local/Netscape/netscape .

  depuis le repertoire /usr/local/bin/.

  Netscape  est  maintenant  pret a etre utilise, et peut etre configure
  par le menu "Options". Dans "General Preferences", il y  a  un  onglet
  intitule  "Appearance",  avec un champ de saisie "Home Page Location".
  Tapez http://localhost, et n'oubliez pas de  sauvegarder  les  options
  (par  le  menu "Options" -- "Save Options") avant de quitter Netscape.
  Au prochain demarrage, Netscape presentera la page d'accueil d'Apache.

  33..66..  LLeess nnaavviiggaatteeuurrss aavveecc AAppaacchhee

  Faites maintenant le premier test d'Apache avec un navigateur : lancez
  simplement l'un des navigateurs disponibles, et il affichera  la  page
  d'accueil  Apache  :  Red  Hat Linux Web Server. Cette page indique la
  localisation  des  fichiers  et   d'autres   informations   concernant
  l'installation  du  serveur  http.   Si  cette  page ne s'affiche pas,
  verifiez que les fichiers cites plus haut sont bien en place et que la
  configuration  du  navigateur  est  correcte.  Fermez  les fichiers de
  configuration avant de demarrer de nouveau le navigateur. Si tous  les
  fichiers  sont  installes  et  que  le  navigateur semble correctement
  configure, examinez la configuration du reseau.  Ou  bien  le  nom  de
  votre   machine   est   different   de   celui  specifie  lors  de  la
  configuration, ou bien la configuration reseau n'est pas correcte.  Il
  est  particulierement  important  que /etc/hosts contienne au moins la
  ligne suivante :

  ______________________________________________________________________
  127.0.0.1                     localhost localhost.localdomain
  ______________________________________________________________________

  qui suppose que vous pouvez vous connecter localement. Vous pouvez  le
  verifier  en lancant une commande reseau qui reclame un nom de machine
  comme argument, comme telnet localhost (en supposant que  telnet  soit
  installe).  Si  cela  ne  fonctionne pas, la configuration reseau doit
  etre controlee avant de continuer l'intallation.

  33..77..  LLaa BBaassee ddee ddoonnnneeeess eett ssoonn iinnssttaallllaattiioonn

  L'installation  de  la  base  de  donnees  demande  a  peine  plus  de
  preparation  que  les  etapes  precedentes. Il y a quelques moteurs de
  base de donnees SQL disponibles, avec des contraintes d'administration
  et d'execution differentes ; l'un des plus simples est msql, dit aussi
  "Mini-SQL", ecrit par David Hughes.  Msql  est  un  "partagiciel".  En
  fonction de la version utilisee, les sites commerciaux sont redevables
  de 250 US$, voire plus, les utilisateurs prives d'au moins 65 US$,  et
  seules  les  institutions  scolaires  et  les  entreprises  a  but non
  lucratif peuvent utiliser ce logiciel librement. Les termes exacts des
  droits  figurent  dans  la  documentation  de  la base de donnees. Les
  elements donnees ici ne sont qu'indicatifs.

  Tout d'abord, voici en quelques mots pourquoi l'auteur a choisi  msql.
  Il y a tout d'abord une experience personnelle.  Alors qu'il cherchait
  une base de donnees, l'auteur a trouve que msql etait la plus facile a
  installer et a maintenir, et qu'elle couvrait un ensemble suffisamment
  large du langage SQL pour convenir a une utilisation classique.  C'est
  seulement  en ecrivant ces lignes que l'auteur a decouvert cette eloge
  dans la DBI FAQ d'Alligator Descartes (la FAQ interface perl aux bases
  de donnees) :

       Du  point de vue de l'auteur, si le volume de donnees est relativement
       faible, les tables contenant moins d'1 million de lignes,  avec  moins
       de 1000 tables dans une base donnee, alors msql constitue une solution
       parfaitement acceptable. Cette base de donnees est  tres  bon  marche,
       extraordinairement solide, et offre un excellent support, ...

  Mqsl  est  disponible en deux versions, msql-1.0.16 et msql-2.0.1, qui
  different par leurs performances (cela  n'est  sensible  que  sur  des
  petits  projets) et les logiciels les accompagnant (la version la plus
  recente dispose de plus d'outils, de son  propre  langage  de  script,
  etc.).   Nous   decrirons   les  deux  versions  de  msql,  car  leurs
  installations se distinguent par quelques aspects.

  33..77..11..  IInnssttaallllaattiioonn ddee mmssqqll--11..00..1166

  Msql est disponible sous forme de sources et de  binaires  precompiles
  au format ELF. L'utilisation des binaires ELF rend l'installation plus
  simple,  car  l'archive  msql-1.0.16.ELF.tgz  contient  une  copie  de
  l'arborescence d'installation, pour que les repertoires soient generes
  correctement lors du decompactage dans le repertoire /.

  Si vous decidez de compiler msql-1.0.16 vous-meme, et que vous  voulez
  utiliser  le  paquetage MsqlPerl plutot que l'interface DBI (voir plus
  loin  une  presentation  detaillee  des  difference  entre  les   deux
  strategies),  alors attendez-vous a ce que MsqlPerl rapporte, lors des
  tests  d'installation,  des  erreurs  dans  msql.  Dans  ce  cas,  une
  correction  sera  necessaire, expliquee dans la documentation MsqlPerl
  (fichier patch.lost.tables). En  l'occurrence,  il  faut  inclure  les
  trois  lignes  suivantes dans msqldb.c, apres la ligne 1400, contenant
  entry->def = NULL; :

       *(entry->DB) = 0;
       *entry->table) = 0;
       entry->age = 0;

  Cette partie de code doit maintenant etre la suivante :

  ______________________________________________________________________
        freeTableDef(entry->def);
        safeFree(entry->rowBuf);
        safeFree(entry->keyBuf);
        entry->def = NULL;
        *(entry->DB) = 0;
        *entry->table) = 0;
        entry->age = 0;
  ______________________________________________________________________

  La  compilation  de  msql  comprend  plusieurs  etapes.  Apres   avoir
  decompacte   l'archive   contenant  les  sources,  il  faut  creer  un
  repertoire destination. Cela se fait avec la commande suivante :

  # make target

  Si tout se passe bien, le systeme repond avec

       Build of target directory for Linux-2.0.30-i486 complete

  Vous pouvez maintenant aller dans le  repertoire  que  vous  venez  de
  creer, et taper d'abord la commande

  # ./setup

  La  sequence  ./  est  necessaire pour s'assurer que la commande setup
  executee est bien celle du repertoire courant, et non  une  autre  qui
  aurait  le  meme  nom.  On va maintenant vous poser quelques questions
  concernant le repertoire source,  et  la  localisation  du  repertoire
  d'installation.  Une  fois  que  ces questions ont eu leur reponse, le
  systeme  lance  quelques  tests  pour  verifier  que   les   logiciels
  necessaires  (compilateurs,  utilitaires  divers, etc.) sont presents,
  puis finalement repond

       Ready to build mSQL.

       You may wish to check "common/site.h" although the defaults should  be
       fine. When you're ready, type "make all" to build the software

  Il faut alors taper

  # make all

  Si tout fonctionne comme prevu, nous devons alors lire :

       make2 : leaving directory '/usr/local/Minerva/src/msql' <-- msql done

       Make of mSQL complete.  You should now install mSQL using make install

       NOTE : mSQL cannot be used free of charge at commercial sites.  Please
       read the doc/License file to see what you have to do.

       make1 : Leaving directory '/usr/local/Minerva/src'

  Tous  les binaires doivent etre accessibles, par exemple en creant des
  liens  symboliques  dans  /usr/local/bin/.   Deplacez-vous   dans   ce
  repertoire et tapez la commande

       # ln -s /usr/local/Minerva/bin/* .

  apres quoi les liens sont correctement construits.

  33..77..22..  TTeesstt ddee  mmssqqll--11

  Apres   l'installation,  il  est  maintenant  possible  de  tester  le
  fonctionnement de la base de donnees. Avant toutes choses, le  serveur
  doit  etre  demarre. L'administrateur systeme, grace aux privileges du
  compte utilisateur root, lance la commande

  # msqld &

  (n'oubliez pas d'ajouter le &, sinon msql ne tournerait pas  en  tache
  de fond.), apres quoi le message suivant doit apparaitre :

       mSql Server 1.0.16 starting ...

       Warning : Couldn't open ACL file : No such file or directory
       Without an ACL file global access is Read/Write

  Ce  message  indique  que  tout  fonctionne  correctement,  a  part la
  configuration des  droits  d'acces.  Pour  le  moment,  il  suffit  de
  demarrer le serveur msql a partir d'un shell, mais vous pourrez par la
  suite vouloir le demarrer automatiquement  au  lancement  du  systeme.
  Cette  commande  doit  alors  etre  ajoutee  dans  un  des  scripts du
  repertoire rc.d. Seul l'administrateur systeme peut lancer la premiere
  commande typique d'une base de donnees (creation de la premiere table)
  :

  # msqladmimn create inventur

  msql repond alors Database "inventur" created. Comme preuve supplemen-
  taire,   vous  pouvez  constater  que  le  repertoire  /usr/local/Min-
  erva/msqldb/ contient maintenant le repertoire ../inventur, vide  pour
  l'intant.  Vous  pouvez  manipuler  la  nouvelle  base avec les outils
  d'administration, qui sont decrits en  detail  dans  la  documentation
  msql.

  33..77..33..  IInnssttaallllaattiioonn ddee mmssqqll--22..00..11

  Une  nouvelle  version,  plus  puissante, du serveur mSQL d'Hugues est
  maintenant  disponible.  Son  installation  est  un  peu   differente.
  Installer  msql-2  de  zero  necessite  les  etapes  suivantes. Copiez
  l'archive a l'endroit  ou  vous  souhaitez  l'installer,  par  exemple
  /usr/local/msql-2/, puis decompressez-la :

  # tar xfvz msql-2.0.1.tar.gz

  Positionnez vous a la racine de l'arborescence d'installation et tapez

  # make target

  Placez vous dans le repertoire targets et verifiez le  type  de  votre
  machine.  Il  devrait  y avoir un nouveau sous-repertoire Linux-_(_v_o_t_r_e
  _v_e_r_s_i_o_n_)_-_v_o_t_r_e _c_p_u_). Allez dans ce repertoire et  lancez  l'utilitaire
  de configuration qui s'y trouve :

  # ./setup

  Il  y  a aussi un fichier site.mm qui peut etre edite. Peut-etre avez-
  vous deja utilise le repertoire /usr/local/Minerva/ et  souhaitez-vous
  le  conserver intact ? Dans ce cas, changez la ligne INST_DIR=... pour
  indiquer le  repertoire  destination  qui  vous  convient.  Sinon,  ne
  changez rien.

  Maintenant, vous pouvez contruire la base de donnees :

  # make
  # make install

  Si tout marche bien, vous verrez ce message :

       [...]

       Installation of mSQL-2 complete.

       *********
       **  This is the commercial, production release of mSQL-2.0
       **  Please see the README file in the top directory of the
       **  distribution for license information.
       *********

  Une   fois  que  tout  est  installe  correctement,  vous  devez  vous
  preoccuper de certains details d'administration.  C'est  ici  que  les
  differences  avec  msql-1 commencent. D'abord, un utilisateur msql est
  cree, et est responsable de l'administration de la base de donnees.

  # adduser msql

  Maintenant, vous devez changer les proprietaire et groupe de tous  les
  fichiers dans le repertoire de mSQL en tapant :

  # cd /usr/local/Minerva
  # chown -R msql:msql *

  Enfin,   vous  pouvez  creer  les  liens  symboliques  pour  tous  les
  executables de la base de donnees dans /usr/local/bin/ en  lancant  la
  commande :

  # ln -s /usr/local/Minerva/bin/* .

  33..77..44..  TTeesstt ddee mmssqqll--22

  Demarrez maintenant le serveur de la base en tapant la commande msql2d
  &, vous devriez obtenir cette reponse :

       Mini SQL Version 2.0.1
       Copyright (c) 1993-4 David J. Hugues
       Copyright (c) 1995-7 Hughes Technologies Pty. Ltd.
       All rights reserved.

            Loading configuration from '/usr/local/Minerva/msql.conf'.
            Server process reconfigured to accept 214 connections.
            Server running as user 'msql'.
            Server mode is Read/Write.

       Warning : no ACL file. Using global read/write access.

  Tout est parfait. La base est compilee et installee, et  nous  pouvons
  maintenant  continuer  avec  les  modules perl puisqu'ils demandent la
  presence d'un serveur de base de donnees operationnel pour les  tests.

  Au  fait,  ce  moment  est  bien choisi pour imprimer la documentation
  complete livree avec msql-2.0.1 :

  # gzip -d manual.ps
  # lpr manual.ps

  Nous pouvons maintenant poursuivre la mise en  place  des  interfaces,
  mais  il est judicieux de laisser le nouveau serveur SQL tourner: cela
  ne fera que faciliter les tests des bibliotheques d'interface.

  33..88..  LLeess ddiiffffeerreenntteess IInntteerrffaacceess :: DDBBII//mmSSQQLL,, MMssqqllPPeerrll,, eett LLiittee

  Une  phrase  frequemment citee dans le Camel Book (la documentation de
  reference de perl) affirme  qu'il  y  a  toujours  plusieurs  manieres
  d'obtenir un resultat avec perl. Helas, cela est vrai aussi avec notre
  application. Il y a trois methodes pour acceder a une base de  donnees
  msql  par  l'intermediaire  de  CGI.  Tout d'abord, la question est de
  savoir s'il faut ou non utiliser perl. Dans le  premier  cas  (suppose
  dans   ce  document),  il  y  a  encore  le  choix  entre  deux  types
  completement differents d'interface. Si nous n'employons pas perl,  il
  reste  la  solution  d'employer  le  langage  de script propre a msql,
  appele Lite, qui est relativement proche du langage C, en plus simple.

  33..88..11..  DDBBII eett DDBBDD--mmSSQQLL

  Au  moment  de  la  redaction  de  ce document, c'est l'utilisation de
  l'interface generique de base de donnees appelee DBI qui est preferee.
  DBI  a quelques avantages. Elle fournit un controle d'acces standard a
  de nombreuses base  de  donnees  commerciales,  et  ce  avec  le  meme
  ensemble  de  commandes.  La  base de donnees en fonctionnement sur un
  systeme donne est  alors  interrogee  par  une  interface  qui  masque
  efficacement   les  caracteristiques  specifiques  de  cette  base  au
  programmeur.  Ainsi,  DBI  fournit  une   passerelle   pratique   pour
  travailler  avec differentes bases de differents auteurs. Avec un seul
  script, il est possible de communiquer avec plusieurs bases de donnees
  differentes.  Le lecteur interesse peut consulter la DBI-FAQ pour plus
  de details. Il y a cependant un inconvenient : l'interface DBI est  en
  cours  de  developpement et aligne les versions a une allure galopante
  (quelques fois avec plusieurs mises a jour par  mois).  De  meme,  les
  pilotes  de  bases  de donnees sont frequemment mis a jour, et peuvent
  etre bases sur des versions specifiques  de  l'interface  de  base  de
  donnees. Les utilisateurs faisant une premiere installation doivent se
  limiter aux numeros de version donnes dans ce document,  car  d'autres
  versions  peuvent  poser des problemes de compilation et de test, dont
  la resolution n'est pas une affaire de neophyte.

  33..88..22..  MMssqqllPPeerrll

  MsqlPerl est une bibliotheque  permettant  l'acces  direct  a  msql  a
  partir  de  programmes  ecrits en perl. Elle n'utilise pas l'interface
  DBI et est tres compacte. Bien qu'elle fonctionne tres bien  avec  les
  deux  versions  de  msql,  son usage n'est pas conseille par rapport a
  l'interface DBI, qui tend a  se  generaliser.  Neanmoins,  suivant  le
  systeme,  c'est  une alternative interessante, car la bibliotheque est
  petite et facile a installer. Notamment, il y a  moins  de  dependance
  par  rapport aux numeros de version que celles constatees entre DBI et
  les pilotes de base de donnees.

  33..88..33..  LLee llaannggaaggee ddee ccoommmmaannddee pprroopprree ddee mmssqqll :: LLiittee

  Enfin, msql-2 fournit son  propre  langage  de  commande  :  Lite.  Ce
  langage   est   proche   du  C,  assaini  et  complete  avec  quelques
  fonctionnalites du type 'shell' (d'une  certaine  maniere,  c'est  une
  version  specialisee  de  perl).  Lite  est  un langage simple et bien
  documente dans le manuel msql-2. Le paquetage msql-2  livre  aussi  en
  exemple un application utilisant Lite.

  Nous  ne  decrirons pas ici Lite, car il est trop specifique de msql-2
  (et deja documente !), et parce que le  lecteur  est  cense  avoir  un
  certain  interet  pour perl, et en avoir de bonnes notions. Neanmoins,
  il est recommande d'y jeter un coup  d'oeil  :  il  peut  s'averer  la
  solution  ideale dans un environnement ne mettant en oeuvre que msql-2
  (en supposant donc qu'aucune autre base n'est utilisee),  grace  a  sa
  simplicite.

  33..99..  LLaa ssoolluuttiioonn ssttaannddaarrdd :: DDBBII eett DDBBDD--mmssqqll

  Nous  supposons  que  perl  a ete installe pendant la configuration du
  systeme, ou en utilisant le gestionnaire de paquetage  mentionne  plus
  haut.  Aucun  detail supplementaire ne sera donne ici. Neanmoins, nous
  allons d'abord tester si notre version de perl est recente :

  # perl -v

  perl doit repondre avec le message suivant :

       This is perl, version 5.003 with EMBED
               Locally applied patches:
                 SUIDBUF - Buffer overflow fixes for suidperl security

               built under linux at Apr 22 1997 10:04:46
               + two suidperl security patches

       Copyright 1987-1996, Larry Wall
       [...]

  Jusque la, tout va bien. L'etape suivante  consiste  a  installer  les
  bibliotheques  generales  perl  pour  les  bases  de donnees (DBI), le
  pilote msql (DBD-mSQL) et CGI. Le pilote CGI est necessaire dans  tous
  les cas. Les archives suivantes sont utilisees :

  1. DBI-0.8.1.tar.gz

  2. DBD-mSQL-0.65.tar.gz

  3. CGI.pm-2.31.tar.gz (ou plus recent>

  Une  precision  est necessaire ici pour les debutants : le test decrit
  ici  fonctionne  tres  bien  a  condition  d'utiliser  _e_x_a_c_t_e_m_e_n_t  les
  versions   recommandees  de  logiciels  ;  des  combinaisons  d'autres
  versions peuvent echouer a un moment ou a un autre.  Le  deboguage  de
  combinaisons de versions incompatibles est une affaire de specialistes
  des interfaces d'appel. Quelquefois, seule une methode change  de  nom
  alors  qu'elle  fait la meme chose, mais d'autres fois, les structures
  internes changent de maniere significative.  Donc,  encore  une  fois,
  tenez-vous  en  aux numeros indiques de versions si vous ne voulez pas
  de probleme, et ce meme si vous constatez que les versions ont  encore
  change  dans  l'intervalle. Il est normal de voir les versions evoluer
  rapidement, et vous devez vous attendre a des problemes en  installant
  d'autres versions que celles conseillees ici.

  Il  est tres important que le pilote de base pour mSQL (DBD-mSQL) soit
  installe _a_p_r_e_s l'interface generique DBI.

  Nous commencons par creer le repertoire _/_u_s_r_/_l_o_c_a_l_/_P_e_r_l_M_o_d_u_l_e_s car  il
  est  important  de  conserver l'arborescence initiale de perl intacte.
  Nous pourrions aussi choisir un autre nom de  repertoire  ;  cela  n'a
  strictement  aucune  importance, malheureusement aucune recommandation
  n'est faite dans les fichiers README des differents modules perl.  Une
  fois    recopiees    les    archives    precedemment    citees    dans
  /usr/local/PerlModules, nous les decompactons en tapant

       # tar zxvf [archive-file]

  pour chacune des trois archives. N'oubliez pas d'indiquer le vrai  nom
  de  l'archive  a  la  commande tar. Le processus d'installation de ces
  trois archives est tres  standard  ;  seuls  les  messages  de  sortie
  concernant les etapes les plus importantes sont reproduits ici.

  33..99..11..  IInnssttaallllaattiioonn ddee ll''iinntteerrffaaccee ppeerrll ddee bbaassee ddee ddoonnnneeeess DDBBII

  L'interface de la base de donnees doit avoir ete  installee  avant  le
  pilote  specifique a la base. Le decompactage de l'archive DBI cree le
  repertoire  /usr/local/PerlModules/DBI-0.81/.  Placez-vous   dans   ce
  repertoire.  Il  y  a  un fichier README (que vous devriez lire) et un
  makefile specifique pour perl. Maintenant, tapez la commande

  # perl Makefile.PL

  Le systeme doit repondre avec un long message dont la partie  la  plus
  importante figure ci-dessous :

       [...]
       MakeMake (v5.34)
       Checking if your kit is complete ...
       Looks good
            NAME => q[DBI]
            PREREQ_PM => { }
            VERSION_FROM => q[DBI.pm]
            clean => { FILES=>q[$(DISTVNAME) /] }
            dist => { DIST_DEFAULT=>q[clean distneck disttest [...]
       Using PERL=/usr/bin/perl

       WARNING! By default new modules are installed into your 'site_lib' directories. Since site_lib directories
       come after the normal library directories you MUST delete old DBI files and directories from your 'privlib'
       and 'archlib' directories and their subdirectories.

       Writing Makefile for DBI

  Comme le programme l'indique, tout va bien, et nous pouvons poursuivre
  avec l'etape suivante :

  # make

  Si aucun message d'erreur n'apparait (les traces detaillees  affichees
  sur  l'ecran  _n_e sont _p_a_s un message d'erreur), nous pouvons tester la
  librairie nouvellement installee avec la commande

  # make test

  Sur l'affichage, guettez les lignes suivantes  (vous  pouvez  toujours
  revenir en arriere avec la touche [Shift]-[PgUp]) :

       [...]
       t/basics............ok
       t/dbidrv............ok
       t/examp.............ok
       All tests successful.
       [...]
       DBI test application $Revision: 1.20 $
       Switch: DBI-0.81 Switch by Tim Bunce, 0.81
       Available Drivers: ExampleP, NullP, Sponge
       ExampleP: testing 2 sets of 5 connections:
       Connecting... 1 2 3 4 5
       Disconnecting...
       Connecting... 1 2 3 4 5
       Disconnecting...
       Made 10 connections in 0 seconds ( 0.00 usr  0.00 sys = 0.00 cpu)

       test.pl done

  La  derniere  etape est l'installation de tous les fichiers dans leurs
  repertoires respectifs. La commande suivante s'en occupe :

  # make install

  Il n'y a plus rien a faire.  Si  pour  quelque  raison  que  se  soit,
  l'installation  echoue  et  que vous vouliez la recommencer, n'oubliez
  pas de taper d'abord la commande

  # make realclean

  Cela  supprimera  toutes  les  traces  laissees  par   la   precedente
  installation.  Vous  pouvez  aussi supprimer les fichiers installes en
  copiant le contenu de l'ecran (montre ici abrege)

       Installing /usr/lib/perl5/site_perl/i386-linux/./auto/DBI/DBIXS.h
       Installing /usr/lib/perl5/site_perl/i386-linux/./auto/DBI/DBI.so
       Installing /usr/lib/perl5/site_perl/i386-linux/./auto/DBI/DBI.bs
       [...]
       Writing /usr/lib/perl5/site_perl/i386-linux/auto/DBI/.packlist
       Appending installation info to /usr/lib/perl5/i386-linux/5.003/perllocal.po

  dans un fichier, en remplacant Installing par rm. Si vous avez appelle
  ce fichier uninstall vous pouvez alors taper

  # . uninstall

  ce qui effacera les derniers fichiers installes.

  33..99..22..  LLee ppiilloottee mmssqqll ddee ppeerrll :: DDBBDD--mmSSQQLL

  Le  pilote  msql  pourra  etre  installe seulement _a_p_r_e_sl'installation
  reussie de l'interface perl generique de base de donnees.

  Les etapes de l'installation  sont  pratiquement  les  memes  que  les
  precedentes, donc commencez par taper

  # perl Makefile.PL

  La,  le  systeme doit repondre avec un avertissement vous demandant de
  lire la  documentation  accompagnant  le  logiciel.   Ensuite,  il  va
  detecter  ou  se  trouve  msql,  et  vous  demande quelle version vous
  utilisez :

  $MSQL_HOME not defined. Searching for mSQL...
  Using mSQL in /usr/local/Hughes

  -> Which version of mSQL are you using [1/2]?

  Entrez la version correcte. Quelques lignes de texte suivent.  Guettez
  les suivantes :

       Splendid! Your mSQL daemon is running. We can auto-detect your configuration.

       I've auto-detected your configuration to be running on port: 1114

  Vous pouvez maintenant tester le pilote en tapant

  # make test

  Encore  une  fois,  plusieurs  lignes  sont  affichees.  Si  elles  se
  terminent par

       Testing: $cursor->func( '_ListSelectedFields' )/ This will fail.
            ok: not a SELECT in msqlListSelectedFields!
       Re-testing: $dbh->do( 'DROP TABLE testaa' )
            ok
       *** Testing of DBD::mSQL complete! You appear to be normal! ***

  tout va bien, et vous pouvez lancer l'installation du pilote en tapant

  # make install

  Vous etes pret a continuer et pouvez sauter le paragraphe suivant.

  33..1100..  LL''iinntteerrffaaccee MMssqqllPPeerrll

  Si  vous decidez d'utiliser l'interface globale MsqlPerl, aucun pilote
  particulier n'est necessaire ;  seule  l'archive  MsqlPerl-1.15.tar.gz
  est utilisee, puisque, comme cela a deja ete dit, MsqlPerl fournit une
  interface directe entre perl et le serveur de base  de  donnees,  sans
  utiliser l'interface DBI. L'installation et le test sont tres faciles.

  Apres avoir tape perl Makefile.PL, l'utilitaire make peut etre active.
  Vous  devez  d'abord  indiquer  ou  se  trouve  mSQL.  S'il  est  dans
  /usr/local/Minerva/, la reponse par defaut peut etre validee.

  Ensuite, tapez make test. Avant cela, vous devez vous assurer qu'il  y
  a  bien une base nommee test et que vous avez les droits d'ecriture et
  lecture dessus. Cela peut etre fait avec

  # msqladmin create test

  33..1111..  BBiibblliiootthheeqquuee CCGGII ddee ppeerrll

  L'installation de l'interface CGI de perl est la plus simple des trois
  etapes. Lancez les commandes dans l'ordre donne, et voila :

  # perl Makefile.PL
  # make
  # make install

  Contrairement  aux autres pilotes, cette interface n'a pas d'option de
  test (# make test), alors que les autres modules _d_o_i_v_e_n_t  etre  testes
  dans tous les cas.

  Un  sous-repertoire  avec  les  exemples  CGI est cree. Vous pouvez en
  copier le contenu vers /home/httpd/cgi-bin/ et utiliser un  navigateur
  pour jouer avec les scripts.

  33..1122..  CChheecckk--lliisstt ddee ll''iinnssttaallllaattiioonn

  Nous avons effectue les etapes suivantes, dans cet ordre:

  1. Installation de Linux avec support reseau

  2. Installation d'un serveur http, par exemple Apache

  3. Installation d'un navigateur, par exemple Arena, Lynx ou Netscape

  4. Installation d'un serveur SQL, par exemple msql

  5. Installation d'une interface perl SQL convenable

  6. Installation des fichiers CGI

  A  la fin, vous devez faire un peu de menage. Toutes les arborescences
  des sources msql et les  modules  perl  peuvent  etre  detruites  sans
  inconvenient  (cependant,  vous  ne  devriez pas detruire les fichiers
  archives !) puisque les binaires et la documentation  sont  maintenant
  dans des repertoires differents.

  44..  UUnn eexxeemmppllee ddee BBaassee ddee DDoonnnneeeess

  Apres   avoir   termine  la  procedure  d'installation,  nous  pouvons
  maintenant lancer l'application donnee en exemple. En fonction  de  la
  version  de  msql  installee  et  de  l'interface  perl utilisee, nous
  devrons modifier un peu ce programme.

  Tout   d'abord,   le   fichier   index.html,   dans   le    repertoire
  /home/httpd/html/   doit   etre  modifie  pour  appeler  l'application
  exemple. Nous pouvons mettre notre  base  (que  nous  pouvons  appeler
  database.cgi ou inventur.cgi) dans /home/httpd/html/test.

  Nous  ajoutons  une  ligne  parmi  les  suivantes  dans  index.html (a
  choisir, bien sur, en fonction des choix d'installation) :

  ______________________________________________________________________
  <LI>Test the <A HREF="test/database.cgi">Database, DBI:DBD-mSQL style!</A>
  <LI>Test the <A HREF="test/inventur.cgi">Database, MsqlPerl style!</A>
  ______________________________________________________________________

  Vous ne devez  en  principe  choisir  qu'une  seule  des  deux  lignes
  precedentes,  mais  vous  pouvez, si vous avez installe les deux types
  d'interface, laisser les deux  lignes  telles  quelles.  Vous  pourrez
  alors comparer les performances.

  44..11..  AAddaappttaattiioonn ddee ll''eexxeemmppllee ddee ssccrriipptt ppoouurr MMssqqllPPeerrll

  Il est necessaire d'indiquer, dans notre exemple de script, qu'il faut
  utiliser l'interface MsqlPerl.  La  modification  doit  etre  faite  a
  plusieurs  endroits.  D'abord, au debut du fichier, il faut changer la
  clause use :

       # use DBI;                 # Generisches Datebank-Interface
       use Msql;

  Ensuite, a la ligne 27, MsqlPerl n'exige pas la  mention  d'un  pilote
  particulier  :

       # $dbh = DBI->connect($host, $database, '', $driver) ||
       $dbh = Msql->connect($host, $database) ||

  A  partir  de  la  ligne 33 et pour tout le script, changez toutes les
  occurrences de do par query :

       # $dbh->do("SELECT * FROM hw") || db_init($dbh);
       $dbh->query("SELECT * FROM hw") || db_init($dbh);

  Enfin, dans le  laius  MsqlPerl,  la  ligne  207  peut  etre  mise  en
  commentaire :

       # $sth->execute || msg("SQL Error: $sth->errstr);

  De  plus,  il peut etre necessaire de remplacer tout les appels errstr
  tels que celui de la ligne precedente par errmsg. Cela  depend  de  la
  version utilisee.

  Apres ces modifications, le script doit tourner correctement.

  44..22..  AAddaappttaattiioonn ddee ll''eexxeemmppllee ppoouurr mmssqqll--22

  La  syntaxe  SQL  a  subi  des  changements durant le developpement de
  msql-2.  Le  script  original   n'executera   pas   les   instructions
  d'initialisation  de  la  table,  aux lignes 45 -- 48. Le modificateur
  primary key n'est plus compris par msql-2, et doit etre supprime :

         $dbh->do(<<EOT) || die $dbh->errstr;   # Neue Personen-Tabelle
             create table person (
       # We do not need the 'primary key' modifier anymore in msql-2!
       #           pn    int primary key,    # Personalnummer
                   pn    int,                # Personalnummer
                   name  char(80),           # Nachname, Vorname
                   raum  int                 # Raumnummer
                 )
       EOT
         $dbh->do(<<EOT) || die $dbh->errstr;   # Neue Hardware-Tabelle
             create table hw (
       # We do not need the 'primary key' modifier anymore in msql-2!
       #           asset   int primary key,    # Inventurnummer
                   asset   int,                # Inventurnummer
                   name    char(80),           # Bezeichnung
                   person  int                 # Besitzer
                 )
       EOT

  Malheureusement,  ce  script  particulier  acceptera  maintenant   les
  enregistrements   avec   des   numeros   personnels  identiques  ;  le
  modificateur msql-1 primary key etait justement la pour  eviter  cela.
  La documentation msql2 indique comment utiliser la clause CREATE INDEX
  pour creer des entrees uniques.

  55..  CCoonncclluussiioonn

  Si vous avez installe msql-2 sur votre systeme, vous  pouvez  regarder
  les  exemples  de programmes ecrits avec Lite, le langage de script de
  msql-2.

  Chaque  version  de  msql  est  livree  avec   un   minimum   d'outils
  d'administration,  qui permettent a l'utilisateur de creer et detruire
  des tables (msqladmin) et  d'examiner  la  structure  de  la  base  de
  donnees (relshow).

  Msql   deuxieme  generation  (c'est-a-dire  msql-2)  possede  quelques
  utilitaires  de  plus  :  msqlimport  et  msqlexport.  Ils  permettent
  d'inserer  et  d'extraire  des  donnees de la base SQL, a partir de et
  vers des fichiers. Ces utilitaires peuvent etre utilises pour, _e_n  _u_n_e
  _s_e_u_l_e  _p_a_s_s_e,  charger ou extraire de grandes quantites de donnees, et
  cela sans que l'utilisateur ait a se soucier d'ecrire _u_n_e _s_e_u_l_e  ligne
  de perl, de SQL, ni meme de n'importe quoi.

  Si  vous  voulez ecrire votre propre script perl de gestion de base de
  donnees,  vous  trouverez  suffisamment  d'aide  dans   les   fichiers
  d'exemples,  et  dans  la  volumineuse  documentation en ligne qui est
  livree avec le module DBI.

  Dans tous les cas, vous etes maintenant prets a  publier  vos  donnees
  sur votre reseau, et meme sur le Web.

  Le HOWTO d'XFree86 sous Linux
  Eric S. Raymond
  _a_d_a_p_t_a_t_i_o_n  _f_r_a_n_c_a_i_s_e  :  Pierre Vassellerie (Pierre.Vassel-
  lerie@obspm.fr)
  v5.2f1, 12 Novembre 1997

  Ce document va vous permettre d'obtenir, installer, et configurer  pas
  a  pas  la version 3.3 de XFree86 - le portage pour Linux du systeme X
  Window (X11R6) - sur votre systeme Linux.

  11..  IInnttrroodduuccttiioonn

  11..11..  XX--WWiinnddooww

  Le systeme X Window est un environnement graphique  tres  imposant  et
  tres  puissant  (certains  diront trop imposant et bien trop complexe)
  pour les systemes Unix. Le systeme X Window original a  ete  developpe
  par le MIT; depuis les distributeurs ont fait de X un standard de fait
  dans le marche des plates-formes UNIX. Ainsi, partout dans  le  monde,
  presque  chaque  station  de travail fonctionnant sous un systeme UNIX
  utilise une variante de l'environnement graphique X Window.

  Une adaptation du systeme  X  Window  version  11  release  6  du  MIT
  (X11R6), pour les systemes UNIX sur machine 80386/80486/Pentium, a ete
  developpee par une equipe de programmeurs  conduite  a  l'origine  par
  David  Wexelblat  <dwex@XFree86.org>. Ce programme, connut sous le nom
  de XFree86, est disponible pour les systemes System V/386, 386BSD,  et
  autres  implementations  d'UNIX  pour x86, incluant Linux. Il contient
  l'ensemble  des  sources   et   binaires   necessaires   a   son   bon
  fonctionnement,  ainsi  que  l'ensemble  des  manuels en lignes et des
  utilitaires de base.

  Une information plus complete sur XFree86 est disponible sur  le  site
  Web de XFree86 :  <http://www.XFree86.org>.

  Ce  document  va  vous  permettre d'installer et configurer simplement
  XFree86 sur  votre  systeme  Linux,  mais  vous  devrez  consulter  la
  documentation  livree avec XFree86 (fichiers textes, pages de manuels,
  etc...), dont vous trouverez  les  references  ici,  afin  de  pouvoir
  preciser  par  vous  meme certains details de cette configuration. Par
  contre, utiliser et mettre a votre gout le systeme X  Window  va  bien
  au-dela  de  l'objectif  de  ce  document.   A cette fin, vous devriez
  acquerir ou consultez l'un des nombreux  ouvrages  sur  le  systeme  X
  Window.

  11..22..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  Si vous n'avez encore jamais entendu parler de Linux jusqu'ici, sachez
  qu'il existe de nombreuses sources d'information sur  ce  systeme.  Le
  meilleur endroit est la page Web du Projet de Documentation pour Linux
  <http://sunsite.unc.edu/LDP>. Vous trouverez la derniere version de ce
  document       (en       version       anglaise)      a      l'adresse
  <http://sunsite.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>.  Mais  sur   le
  serveur Freenix  <http://www.freenix.fr>, vous pourrez aussi consulter
  sa traduction.

  11..33..  NNoouuvveelllleess vveerrssiioonnss dduu pprreesseenntt ddooccuummeenntt

  Les nouvelles versions  du  XFree86  HOWTO  pour  Linux  sont  postees
  regulierements  sur  news:fr.comp.os.linux.annonces.  Elles sont aussi
  diffusees    sur    plusieurs    sites    Web     et     FTP,     dont
  <http://www.freenix.fr/XFree86-HOWTO.html>.

  11..44..  CCoommmmeennttaaiirreess eett ccrriittiiqquueess

  Si  vous  avez  des questions ou des remarques a propos de ce document
  (et non pas des questions sur XFree86), n'hesitez pas  a  expedier  un
  message   a   Pierre   Vassellerie.  Vos  commentaires,  critiques  et
  suggestions sont les bienvenus. Si certaines sections de  ce  document
  vous  semblent  incompletes, obsoletes ou mal concues faites m'en part
  afin que je puisse effectuer des corrections  pour  dans  les  futures
  versions.

  S'il vous plait, _n_e _m_'_e_n_v_o_y_e_z _p_a_s de questions a propos de votre carte
  video ou de votre moniteur. Cet HOWTO  a  pour  but  d'etre  un  guide
  rapide  et  facile  a  lire pour une installation _n_o_r_m_a_l_e de XFree86 a
  l'aide du nouvel outil de configuration. Si vous  avez  des  problemes
  lors de votre configuration, consultez le XFree86 Video Timings HOWTO,
  <http://sunsite.unc.edu/LDP/HOWTO/XFree86-Video-Timings-HOWTO.html>.
  Ce  document  (en  anglais)  explique  tout  ce qu'il faut savoir pour
  resoudre ces problemes.

  22..  MMaatteerriieellss ccoommppaattiibblleess

  La compatibilite d'XFree86 avec  une  carte  donnee  depend  en  regle
  generale  de  l'ensemble  des  circuits ("chipset") utilises par cette
  derniere.  La documentation de votre carte  specifie  generalement  la
  liste  des circuits utilises. Si vous etes sur le point d'acquerir une
  nouvelle carte video  ou  d'acheter  un  nouvel  ordinateur,  insistez
  aupres  du  vendeur pour savoir quel est le fabricant, le modele et le
  circuit de la carte video. Si vous avez deja acquis votre carte  video
  et  qu'une  de ces informations vous manque, n'hesitez pas a contacter
  votre revendeur, en general il  sera  tres  heureux  de  pouvoir  vous
  renseigner,  et  sinon  appelez un autre revendeur. Si votre revendeur
  vous raconte que la carte est "une carte SVGA  standard"  et  "qu'elle
  devrait  fonctionner"  sur  votre  systeme,  expliquez  lui  que votre
  systeme ne supporte pas tous les types de circuits  video.   N'hesitez
  pas  a  mentionner  Linux  et  XFree86  car  il y a de plus en plus de
  revendeurs qui connaissent ces logiciels (il se peut que le votre  ait
  meme  approfondi  la  question),  et  faites  lui  comprendre  que ces
  "details" sont pour vous primordiaux.

  Vous pouvez aussi determiner quel est le type de cicuit video  utilise
  par  votre  carte  a  l'aide  du  programme  SuperProbe inclus dans la
  distribution de XFree86.

  La version 3.3 de XFree86  (Juillet  1997)  est  compatible  avec  les
  circuits video suivants :

  +o  circuits non accelerateurs :

  +o  Tseng ET3000, ET4000AX, ET4000/W32, ET6000

  +o  Western Digital/Paradise PVGA1

  +o  Western   Digital  WD90C00,  WD90C10,  WD90C11,  WD90C24,  WD90C30,
     WD90C31, WD90C33

  +o  Genoa GVGA

  +o  Trident TVGA8800CS,  TVGA8900B,  TVGA8900C,  TVGA8900CL,  TVGA9000,
     TVGA9000i,  TVGA9100B,  TVGA9200CX, TVGA9320, TVGA9400CX, TVGA9420,
     TGUI9420DGi, TGUI9430DGi, TGUI9440AGi, TGUI9660XGi, TGUI9680

  +o  ATI 18800, 18800-1, 28800-2, 28800-4,  28800-5,  28800-6,  68800-3,
     68800-6,   68800AX,   68800LX,   88800GX-C,  88800GX-D,  88800GX-E,
     88800GX-F, 88800CX, 264CT, 264ET, 264VT, 264VT2, 264GT

  +o  NCR 77C22, 77C22E, 77C22E+

  +o  Cirrus Logic  CLGD5420,  CLGD5422,  CLGD5424,  CLGD5426,  CLGD5428,
     CLGD5429,   CLGD5430,   CLGD5434,   CLGD5436,  CLGD5440,  CLGD5446,
     CLGD5462,  CLGD5464,  CLGD6205,   CLGD6215,   CLGD6225,   CLGD6235,
     CLGD6410, CLGD6412, CLGD6420, CLGD6440

  +o  OAK OTI067, OTI077, OTI087

  +o  Avance Logic ALG2101, ALG2228, ALG2301, ALG2302, ALG2308, ALG2401

  +o  Chips  &  Technologies  65520,  65530,  65540, 65545, 65520, 65530,
     65540, 65545, 65546, 65548, 65550, 65554

  +o  MX MX68000, MX680010

  +o  Video 7/Headland Technologies HT216-32

  +o  SiS 86C201, 86C202, 86C205

  +o  ARK Logic ARK1000PV, ARK1000VL, ARK2000PV, ARK2000MT

  +o  RealTek RTG3106

  +o  Alliance AP6422

  +o  Matrox MGA2064W and Mystique cards

  +o  NVidia/SGS Thomson NV1, STG2000

  +o  circuits accelerateurs :

  +o  8514/A (and true clones)

  +o  ATI Mach8, Mach32, Mach64

  +o  Cirrus CLGD5420, CLGD5422, CLGD5424, CLGD5426, CLGD5428,  CLGD5429,
     CLGD5430,   CLGD5434,   CLGD5436,   CLGD5440,  CGLD5446,  CLGD5462,
     CLGD5464.

  +o  S3 86C911, 86C924, 86C801, 86C805, 86C805i, 86C928, 86C864, 86C964,
     86C732, 86C764, 86C765, 86C868, 86C968, 86C325, 86C988

  +o  Western Digital WD90C31, WD90C33, WD90C24A

  +o  Weitek P9000

  +o  IIT AGX-014, AGX-015, AGX-016

  +o  IBM XGA-2

  +o  Tseng ET4000/W32, ET4000/W32i, ET4000/W32p, ET6000

  +o  Ark Logic ARK1000PV, ARK1000VL, ARK2000PV, ARK2000MT

  +o  MGA2064W

  Les  cartes  video utilisant ces circuits sont supportees sur tous les
  types de bus, y compris VLB et PCI.

  Tous les circuits cites ci-dessus sont exploites en mode 256  couleurs
  par  le  serveur  XF86_SVGA et en monochrome par XF86_Mono.  Seuls les
  circuits de Avance Logic, MX et Video 7 sont  uniquement  exploitables
  en mode 256 couleurs. Par ailleurs, si votre carte possede suffisament
  de  memoire,  plusieurs  des  circuits  ci-dessus   vous   permettrons
  d'utiliser   des   modes   en  16  ou  32  bits  par  pixel  (et  plus
  specifiquement  les  cartes  Mach32,  P9000,   S3   et   Cirrus).   La
  configuration par defaut etant generalement de 8 bits par pixel (c'est
  a dire 256 couleurs).

  Le serveur monochrome fonctionne sur toute carte  VGA  ainsi  que  les
  cartes  monochrome  Hercules,  Hyundai  HGC-1280,  Sigma  LaserView et
  Apollo.  Sur la carte Compaq AVGA, seuls 64ko de  memoire  video  sont
  utilises  par  le  serveur monochrome, et la carte Compaq GVGA n'a pas
  encore ete testee avec plus de 64k.

  Cette liste de materiels va sans doute s'accroitre au fur et a  mesure
  que  le  temps  passe,  et  chaque nouvelle mise a jour de ce document
  contiendra la liste complete des circuits video supportes par XFree86.
  En  attendant la prochaine version de ce document, vous pouvez trouvez
  sur le site de XFree86 <http://www.XFree86.org> la liste des  circuits
  supportes ainsi que certaines mises a jour.

  L'un  des problemes rencontres par les developpeurs de XFree86 est que
  certains fabricants de  cartes  video  utilisent  des  mecanismes  non
  standards  dans la determination des frequences d'horloges necessaires
  pour faire  fonctionner  la  carte.  Certains  de  ces  fabricants  ne
  fournissent  meme pas de documents decrivant les specifications utiles
  a  la  programmation  de  la  carte  ou  alors  les   subordonnent   a
  l'acquisition  de  licences limitant la diffusion de ces informations.
  Ceci impliquerait alors  une  restriction  a  la  libre  diffusion  du
  logiciel XFree86, ce que les developpeurs du projet XFree86 ne peuvent
  tolerer. Ceci a longtemps ete le probleme avec les  cartes  fabriquees
  par  Diamond, mais a l'annonce de la version 3.1 de XFree86, Diamond a
  commence a collaborer avec l'equipe de developpement a la  realisation
  de  pilotes  gratuits pour ces cartes. Ceci prouve que l'avis officiel
  du XFree Project publie dans les precedentes versions de ce document a
  eu un impact sur le fabricant Diamond.

  La  configuration  machine  minimale suggeree est un 486 ayant au mois
  8Mo de memoire vive, et une carte video  basee  sur  un  des  circuits
  presents dans la liste ci-dessus. Pour de meilleures performances nous
  vous conseillons d'avoir une carte ayant un circuit  rapide  comme  le
  S3.   Avant de vous lancer tete baissee dans l'achat d'une telle carte
  (relativement chere), verifiez tout de meme si  votre  carte  actuelle
  n'est pas supportee.

  De  plus  n'hesitez  pas a tenir compte des benchmarks comparatifs des
  differentes cartes video qui sont regulierement postes sur les groupes
  de news USENET comp.windows.x.i386unix <news:comp.windows.x.i386unix>,
  comp.os.linux.x      <news:comp.os.linux.x>,        <comp.benchmarks>,
  <comp.sys.ibm.pc.hardware.video>  par  Farrel  McKay.  Ils  sont aussi
  disponibles sur le Web a l'adresse  <http://www.goof.com/xbench>.

  Votre machine necessite un minimum de 4Mo de RAM physique et  de  16Mo
  de  RAM  virtuelle  totale  (par exemple 8Mo de RAM physique et 8Mo de
  swap disque).  Souvenez-vous que plus  vous  aurez  de  RAM  physique,
  moins  votre  systeme  swapera  sur disque quand la memoire disponible
  diminuera. Les  disques  ayant  des  temps  d'acces  et  des  taux  de
  transferts  plus  lents  que la RAM, les performances de votre systeme
  chuteront tres rapidement  si  la  memoire  venait  a  manquer.  C'est
  pourquoi  il  est recommande d'avoir au moins 8Mo de RAM physique afin
  de pouvoir faire tourner  XFree86  confortablement.  Un  systeme  avec
  seulement  4Mo  de RAM sera a peu pres 10 fois plus lent qu'un systeme
  ayant 8Mo de RAM ou plus (il se peut meme que certains serveurs  X  ne
  puissent fonctionner avec si peu de memoire).

  33..  IInnssttaallllaattiioonn ddee XXFFrreeee8866

  Soit  vous  possedez  une  distribution  complete  de Linux (sur CD ou
  disquettes) et donc une distribution complete et compilee de XFree86 y
  est comprise. Dans ce cas, passez directement a la fin de ce chapitre.
  Soit vous devez recuperer l'ensemble de la  distribution  par  FTP  et
  dans ce cas ce chapitre vous concerne.

  Les  distributions binaires (programmes prets a l'emploi) des versions
  d'XFree86 destinees a Linux se trouvent sur les sites de  ftp  anonyme
  suivants :

  +o  site                                                        XFree86
     <ftp://ftp.xfree86.org/pub/XFree86/current/binaries/Linux-ix86>

  +o  serveur de l'IBP <ftp.lip6.fr:/pub/X11/XFree86/binaries/Linux>

  +o  serveur                tsx-11                du                 MIT
     <tsx-11.mit.edu:/pub/linux/packages/X11/XFree86-3.3/binaries/Linux>

  +o  sunsite     de     l'universite     de     Caroline     du     Nord
     <sunsite.unc.edu:/pub/Linux/X11/XFree86-3.3>

  Avant de faire quoi que ce soit, lancer le script preinst.sh. Celui-ci
  vous  dira  ce  dont  vous  avez  besoin  avant  de  continuer   votre
  installation.

  L'un des serveurs suivant est necessaire :

     XX333388551144..ttggzz
        Serveur pour carte basee sur 8514.

     XX3333AAGGXX..ttggzz
        Serveur pour carte basee sur AGX.

     XX3333II112288..ttggzz
        Serveur pour carte basee sur Number Nine Imagine 128.

     XX3333MMaacchh3322..ttggzz
        Serveur pour carte basee sur Mach-32 .

     XX3333MMaacchh6644..ttggzz
        Serveur pour carte basee sur Mach-64.

     XX3333MMaacchh88..ttggzz
        Serveur pour carte basee sur Mach-8.

     XX3333MMoonnoo..ttggzz
        Serveur pour modes monochromes.

     XX3333PP99KK..ttggzz
        Serveur pour carte basee sur P9000.
     XX3333SS33..ttggzz
        Serveur pour carte basee sur S3.

     XX3333SS33VV..ttggzz
        Serveur  pour  carte  basee  sur S3 ViRGE et ViRGE/VX (considere
        comme beta).

     XX3333SSVVGGAA..ttggzz
        Serveur pour carte SVGA.

     XX3333WW3322..ttggzz
        Serveur pour carte basee sur ET4000/W32.

  Si vous ne savez lequel choisir, prennez le serveur  SVGA16  (celui-ci
  est  necessaire  au fonctionnement de l'outil d'auto-configuration que
  nous verrons apres).

  Tous les fichiers suivants sont indispensables :

     pprreeiinnsstt..sshh
        Script de pre-installation.

     ppoossttiinnsstt..sshh
        Script de post-installation.

     XX3333bbiinn..ttggzz
        Le reste des binaires.

     XX3333ccffgg..ttggzz
        Fichiers de configuration de xdm, xinit and fs.

     XX3333ddoocc..ttggzz
        Documentations.

     XX3333mmaann..ttggzz
        Manuels.

     XX3333ffnnttss..ttggzz
        Les fontes de base 75dpi, misc et PEX.

     XX3333lliibb..ttggzz
        Les librairies partagees et les utilitaires qui vont avec.

     XX3333sseett..ttggzz
        L'utilitaire XF86Setup

     XX3333VVGG1166..ttggzz
        Serveur pour les cartes VGA/EGA

  Les fichiers suivants sont optionnels :

     XX3333ff110000..ttggzz
        Les fontes en 100 dpi.

     XX3333ffccyyrr..ttggzz
        Les fontes cyrilliques

     XX3333ffnnoonn..ttggzz
        Autres fontes (Chinois, Japonais, Coreen, Hebreu)

     XX3333ffssccll..ttggzz
        Les fontes redimensionnables (Speedo, Type1).

     XX3333ffssrrvv..ttggzz
        Serveur de fontes et fichiers de configuration.
     XX3333pprroogg..ttggzz
        Les  fichiers  d'en-tete,  les  fichiers  de  configuration   et
        certaines librairies.

     XX3333llkkiitt..ttggzz
        Le serveur X LinkKit.

     XX3333llkk9988..ttggzz
        Le serveur X PC98 LinkKit.

     XX3333nneesstt..ttggzz
        Le serveur X Nested.

     XX3333pprrtt..ttggzz
        Le serveur X print.

     XX3333vvffbb..ttggzz
        Le serveur X Virtual framebuffer.

     XX3333ppss..ttggzz
        La version PostScript de la documentation.

     XX3333hhttmmll..ttggzz
        La version HTML de la documentation.

  Le  repertoire  ou  se  situe  la  distribution  de  XFree86  contient
  generalement  un  ou  plusieurs  fichiers  RELNOTES   et   des   notes
  d'installation  concernant la derniere version. Lisez-les lorsque vous
  avez besoin de details.

  Les seules choses a faire pour installer XFree86  sont  d'obtenir  les
  fichiers ci-dessus, de creer le repertoire /usr/X11R6 (en etant root),
  et de decompresser-detarer  les  fichiers  sous  /usr/X11R6  avec  une
  commande du style :

               gzip -dc X33bin.tgz | tar xfB -
          ou
               tar zxvf X33bin.tgz si vous possedez le tar GNU

  ATTENTION:  ces  fichiers  sont  compresses relativement au repertoire
  /usr/X11R6 et doivent donc etre decompresses sous celui-ci.

  Verifiez que le repertoire /usr/X11R6/bin est bien dans  votre  chemin
  d'acces aux binaires (variable d'environnement PATH). Pour cela editez
  le fichier de profil par defaut /etc/profile (si vous  utilisez  bash,
  ksh,  sh  ou  un  autre shell du type Korn) ou /etc/csh.login (si vous
  utilisez csh, tcsh ou un autre shell du type C), ou bien votre fichier
  de profil personnel /etc/.bashrc ou /etc/.cshrc.

  Vous  devez  aussi  verifier que /usr/X11R6/lib peut etre localise par
  ld.so, l'editeur de lien dynamique. Pour cela ajoutez la ligne :

              /usr/X11R6/lib

  a votre fichier /etc/ld.so.conf et lancez  /sbin/ldconfig  en  passant
  root.

  44..  CCoonnffiigguurraattiioonn ddee XXFFrreeee8866

  44..11..  CCoonnffiigguurraattiioonn nnoorrmmaallee

  Configurer XFree86 afin de pouvoir utiliser correctement votre souris,
  clavier, moniteur et carte video tenait, il y a encore  peu  d'un  art
  obscure,  necessitant  de  taper un fichier de configuration complexe.
  Depuis les versions 3.2 et 3.3 vous  rendent  les  choses  extremement
  simples. Vous n'avez plus qu'a lancer le programme XF86Setup.

  Ce programme s'appuie sur le fait que tout nouveau materiel video pour
  PC peut exploiter les modes EGA/VGA des moniteurs. Il lance le serveur
  de      base      SVGA16     afin     d'obtenir     le     mode     de
  plus-petit-denominateur-commun  :  640x480.  Ensuite  il  execute   un
  programme  interactif  afin de vous permettre de saisir l'ensemble des
  parametres relatifs a votre souris, ecran,  clavier,  carte  video  et
  ceux  specifiques  a  votre serveur. L'ensemble du processus est ainsi
  realise sans aucune difficulte.

  Une des remarques a garder a l'esprit, est le fait  que  les  nouveaux
  claviers sont ce que le programme XF86Setup appelle Generic 102-key PC
  (intl) plutot que Generic 101-key PC. Si  vous  saisissez  le  mauvais
  parametre  (101)  la partie droite de votre clavier (pave numerique et
  touches associees) arretera de fonctionner.

  Si vous n'etes pas certain de votre type de moniteur, vous pouvez  les
  essayer  les  uns  apres  les  autres  dans  leur ordre de succession.
  Parcourez de haut en bas (les choix situes le plus haut sont ceux  qui
  reclament  les frequences les plus faibles a votre carte video et donc
  ceux qui demandent moins a votre materiel, et ont donc moins de risque
  de  l'endommager).  Si de legeres distortions (image un peu trop large
  ou trop etroite,  ou  mal  centree)  apparaissent,  ce  n'est  pas  un
  probleme;  vous aurez ensuite la possibilite d'affiner les reglages de
  votre configuration.

  Puis,  quand  le  programme  lancera  xvidtune  pour  vous   permettre
  d'affiner  votre  mode  video, ne vous laissez pas destabiliser par le
  message d'erreur.  Les moniteurs a  multi-frequences  sont  bien  plus
  difficiles a endommager que leurs ancetres a frequence fixe.

  44..22..  CCaa nnee mmaarrcchhee ttoouujjoouurrss ppaass !!

  Souvent,  il  arrive  que ca ne fonctionne pas correctement au premier
  demarrage du serveur X. Dans la plupart des cas, ceci  est  du  a  une
  erreur  dans  le fichier de configuration XF86Config. Generalement les
  frequences pour le moniteur sont inadequates, ou les horlages pour  la
  carte  video  sont  incorrectes.  Les  problemes mineurs peuvent etres
  corriges a l'aide de xvidtune; un ecran totalement  deforme  necessite
  generalement  un  retour sous XF86Setup afin de choisir un moniteur de
  moindre performances.

  Si votre ecran a des effets de roulement ou de  flou,  c'est  que  vos
  frequences pour moniteur sont inadaptees. Soyez aussi certain que vous
  avez specifie le bon circuit de carte  video,  ainsi  que  les  autres
  options  de  la  partie Device du fichier XF86Config. Soyez absolument
  certains que vous utilisez le bon serveur X et que le lien  symbolique
  /usr/X11R6/bin/X pointe bien vers ce serveur.

  Si,  malgre  tout,  votre  serveur  s'obstine  a  ne  pas  fonctionner
  correctement, utilisez la commande :
              X > /tmp/x.out 2>&1

  Tuez alors le serveur X a l'aide de la combinaison  de  touches  ctrl-
  alt-backspace,  et  examinez  le  contenu  du  fichier  /tmp/x.out. Le
  serveur X y aura mis tout les messages d'erreurs  et  d'avertissement,
  comme  par exemple le fait que l'horloge que vous avez specifiee n'est
  pas generable par votre carte.

  Souvenez   vous   que   vous   pouvez   utiliser   les    combinaisons
  ctrl-alt-numeric  +  et  ctrl-alt-numeric - pour changer a la volee la
  resolution de votre serveur en fonction de ce  que  vous  aurez  entre
  dans  la  ligne  Modes  de la section Screen. Si le mode ayant la plus
  haute resolution ne  semble  pas  marcher,  tentez  de  passer  a  une
  resolution inferieure.

  Vous  pouvez  aussi  jouer  sur  les boutons de reglage horizontaux et
  verticaux de votre moniteur (si ceux-ci existent !). Ceci est  souvent
  necessaire  au  demarrage  du  serveur X. Ainsi, si votre ecran semble
  decale legerement sur la droite,  vous  pouvez  effectuer  ce  reglage
  manuellement.

  Le groupe le news USENET comp.windows.x.i386unix est entierement dedie
  aux   discussions   concernant   XFree86,   ainsi   que   le    groupe
  comp.os.linux.x.   Il  peut  etre  interessant  de  regarder  quelques
  messages relatifs a votre carte video et a sa configuration  car  vous
  etes rarement le premier a avoir un probleme.

  44..33..  AAmmeelliioorraattiioonn ddee llaa ccoonnffiigguurraattiioonn

  Vous  devrez modifier "a la main" votre configuration X afin d'obtenir
  des performances optimales si votre moniteur peut fonctionner en  mode
  1600x1200  (le  mode le plus eleve que XF86Setup puisse configurer est
  1280x1024).

  Si vous desirez effectuer  ces  modifications,  consultez  le  XFree86
  Video    Timings    HOWTO     <http://sunsite.unc.edu/LDP/HOWTO/video-
  modes.html>.

  44..44..  UUttiilliisseerr 6655553366 ccoouulleeuurrss ((eenn 1166 bbiittss ddoonncc))

  Par default, X utilise seulement un codage des couleurs sur 8 bits, ce
  qui permet donc d'avoir au plus 256 couleurs. Afin de contourner cette
  limitation, de nombreuses applications alloue  leur  propre  table  de
  couleurs,  ce  qui  a  pour  effet de changer brutalement les couleurs
  quand votre curseur de souris passe d'une application a une autre. Par
  exemple, le browser Web Arena alloue sa propre table de couleurs.

  Si  vous  desirez  utilisez des applications graphiques complexes, 256
  couleurs ne seront surement pas suffisantes. Vous devez alors utiliser
  un  codage  des  couleurs  sur au moins 16 bits, ce qui vous permettra
  d'utiliser 65536 couleurs. Ceci est possible en lancant X par :

  ______________________________________________________________________
      startx -- -bpp 16
  ______________________________________________________________________

  ou en mettant

  ______________________________________________________________________
      exec X :0 -bpp 16
  ______________________________________________________________________

  dans votre fichier .xserverrc. mais attention toutes les  applications
  ne fonctionnent pas avec des couleurs codees sur 16 bits.

  Augmenter  le  nombre  de couleurs a pour effet de demander a la carte
  video de transferer plus de donnees dans un meme  laps  de  temps.  Si
  votre carte video n'y arrive pas, diminuez la resolution ou le taux de
  rafraichissement. Par defaut XFree86 reduit  la  resolution.  Si  vous
  desirez   conserver   votre   resolution   et   diminuer  le  taux  de
  rafraichissement, vous devez inserer une nouvelle ligne Modeline  dans
  le  fichier  XF86Config  definissant  la  resolution  avec  un taux de
  rafraichissement plus faible. Par exemple remplacez la ligne

       Modeline "1024x768"  75  1024 1048 1184 1328 768 771 777 806 -hsync -vsync

  par

       Modeline "1024x768"  65  1024 1032 1176 1344 768 771 777 806 -hsync -vsync.

  Le nombres magiques 75 et 65 sont respectivement les frequences d'hor-
  loges  que  vous trouvez ecrit dans le fichier .X.err par X. Consultez
  le fichier monitors dans la documentation de XFree86, afin de  trouver
  les  Modelines  correspondant  a une frequence maximale pour que votre
  carte video puissent generer des couleurs sur 16 bits.

  55..  LLaanncceemmeenntt ddee XXFFrreeee8866

  Si votre fichier XF86Config est correct, vous etes donc pare a  lancer
  le  serveur X et a y jetter un oeil. Premierement, verifiez encore que
  /usr/X11R6/bin est bien dans votre variable PATH.

  La commande pour lancer XFree86 est :

       startx

  Celle-ci est un script lancant xinit avec certains parametres (ceci au
  cas  ou  vous  seriez  habituer  a  lancer xinit sur d'autres systemes
  UNIX).

  Cette commande va demarrer le serveur X puis executer les commandes se
  trouvant dans le fichier .xinitrc dans votre repertoire d'acceuil.  le
  demarrage du serveur X. Si ce fichier n'existe  pas,  le  fichier  par
  defaut /usr/X11R6/lib/X11/xinit/xinitrc sera utilise.

  Un fichier standard .xinitrc ressemble a :

  #!/bin/sh

  xterm -fn 7x13bold -geometry 80x32+10+50 &
  xterm -fn 9x15bold -geometry 80x34+30-10 &
  oclock -geometry 70x70-7+7 &
  xsetroot -solid midnightblue &

  exec twm

  Ce  script  va  lancer  deux clients xterm, un oclock, et mettre comme
  couleur  de  fond  du  midnightblue.  Il  va  alors  lancer  twm,   le
  gestionnaire de fenetres. Remarquez que twm est lance par une commande
  shell exec; ceci a pour effet de remplacer le processus xinit  par  le
  processus twm. Une fois que vous quitterez twm le serveur X s'arretera
  de lui-meme. Pour quitter twm, utilisez le menu du  bouton  1  lorsque
  vous  etes  sur  le _b_u_r_e_a_u. Vous aurez alors la possibilite de choisir
  Exit twm.

  Soyez certain que la derniere commande du  fichier  .xinitrc  commence
  par  exec  et  qu'elle  n'est  pas  mise  en tache de fond (pas de et-
  commercial  en  fin  de  ligne).  Sinon  le  serveur  X  s'arrreterait
  immediatement apres la fin de l'execution du script .xinitrc.

  Vous pouvez aussi utiliser la combinaison de touche ctrl-alt-backspace
  pour "tuer" le serveur X et quitter le systeme de fenetrage.

  La  configuration  ci-dessus  est  tres,  tres  simple.  De   nombreux
  programmes  et  configurations  peuvent  etre  lancees dans le fichier
  .xinitrc, comme par exemple, le  gestionnaire  de  fenetres  fvwm  qui
  permet  d'avoir  un  "bureau" virtuel de grande taille, de choisir les
  couleurs, fontes, tailles et positions des fenetres, et  tout  ce  que
  vous pouvez desirer secretement (si, si, meme cela).

  Si   vous  etes  novice  avec  l'environnement  X  Window,  nous  vous
  recommandons chaudement de consulter  un  livre  comme  _T_h_e  _X  _W_i_n_d_o_w
  _S_y_s_t_e_m_:  _A  _U_s_e_r_'_s  _G_u_i_d_e.  Utiliser  et  configurer  X  est bien plus
  complique que ce que nous pouvons aborder ici. Consultez les pages  de
  manuels de xterm, oclock, et twm afin de prendre un bon depart.

  66..  NNoottiiccee lleeggaallee

  Ce document est sous copyright 1996 de Eric S. Raymond pour la version
  anglaise et de Pierre Vassellerie pour la version francaise. Vous etes
  autorise  a utiliser, diffuser et reproduire gratuitement ce document,
  tant que :

  +o  La mention des copyrights est conservee,  et  la  presente  section
     preservee   dans  son  integralite  sur  toute  copie  complete  ou
     partielle.

  +o  Vous ne supprimez et ne modifiez ni le  numero  de  version  ni  la
     date.

  +o  Vous  ne  supprimez  et ne modifiez pas le pointeur vers la version
     Web courante.

  +o  Vous ne faites aucun resume, modification ou nouvelle version de ce
     document.

     Ces  restrictions  ont  pour  unique  but  de  proteger les lecteur
     eventuels contre des versions incompletes ou  inadaptees.  Si  vous
     pensez que vous avez une bonne raison de faire des modifications ou
     une nouvelle  version  contactez  l'auteur  :  Eric  S.  Raymond  a
     esr@thyrsus.com.

  77..  RReemmeerrcciieemmeennttss

  La  premiere version de ce document a ete realisee par Matt Welsh dans
  les profondes et obscures abysses du temps. Merci, Matt !

  Merci aux relecteurs.

  De plus, si vous desirez m'envoyer  vos  remerciements,  ainsi  qu'aux
  autres  traducteurs  des  HOWTO,  ceux-ci seront les bienvenus et nous
  encouragerons a continuer notre laborieux travail.

  XFree86 Video Timings HOWTO
  Eric S. Raymond <mailto:esr@thyrsus.com>
  Traduction franaise de Philippe Andersson reprise par Guil
  laume Allgre <mailto:Guillaume.Allegre@imag.fr>
  Version 4.4, 13 mars 2000

  Comment dfinir une ligne de mode pour votre couple carte
  graphique/moniteur sous XFree86.  La distribution XFree86 comprend
  maintenant les lments requis pour configurer la plupart des combi
  naisons standard. Le but principal de ce document est de vous appren
  dre  mettre au point une ligne de mode personnalise pour un moniteur
   haute performance ou du matriel trs inhabituel.  Il vous aidera
  aussi  utiliser kvideogen pour gnrer les modelines, et xvidtune
  pour effectuer le rglage fin d'un mode standard qui n'est pas encore
  optimal pour votre moniteur.
  ______________________________________________________________________

  Table des matires
















































  1. Mise en garde

  2. Introduction

  3. Outils de calcul automatique

  4. Comment fonctionnent les crans vido

  5. Principes fondamentaux relatifs  votre cran et votre carte graphique

     5.1 Les frquences de synchronisation du moniteur
     5.2 La bande passante vido du moniteur
     5.3 La frquence pilote (
     5.4 Que contrlent ces donnes de base

  6. Comprendre les spcifications de base

     6.1 A propos de la bande passante
     6.2 Frquences de synchronisation et frquence de rafrachissement

  7. Concessions lors de la configuration du systme

  8. Exigences en terme de mmoire

  9. Calcul de la taille de trame

  10. Magie noire et impulsions de synchronisation

     10.1 Synchronisation horizontale
     10.2 Synchronisation verticale

  11. Synthse

  12. Usage du moniteur en surcapacit

  13. Utilisation des modes entrelacs

  14. Questions et rponses

  15. Rsoudre les problmes affectant l'image

     15.1 L'image est dcentre vers la gauche ou la droite
     15.2 L'image est dcentre vers le haut ou le bas
     15.3 L'image est trop grande dans les deux directions
     15.4 L'image est trop large (ou trop troite) horizontalement
     15.5 L'image est trop grande (ou trop petite) verticalement

  16. Reprsentation graphique des capacits du moniteur

  17. Crdits



  ______________________________________________________________________

  11..  MMiissee eenn ggaarrddee


  L'utilisation des informations reprises ci-dessous se fait
  EXCLUSIVEMENT A VOS RISQUES ET PERILS.  Piloter votre moniteur en
  dehors des limites fixes par les spcifications du fabricant peut
  prsenter un danger pour votre matriel et pour vous-mmes.  Lisez la
  section ``Usage du moniteur en surcapacit'' pour un avertissement
  dtaill. Tout dommage inflig  votre personne ou  votre moniteur d
   un usage en surcapacit est votre problme.

  La plus rcente version de ce HOWTO est disponible  la page du Linux
  Documentation Project <http://metalab.unc.edu/LDP>.

  Prire de transmettre vos commentaires, critiques, et suggestions (en
  anglais)  esr@snark.thyrsus.com <mailto:esr@thyrsus.com>, ou en
  franais au traducteur. S'il vous plat, _n_'_e_n_v_o_y_e_z _p_a_s de courrier
  lectronique implorant une solution miracle  vos problmes de
  moniteur personnels, dans la mesure o agir de la sorte ne servira
  qu' perdre mon temps et  vous frustrer -- tout ce que je sais  ce
  sujet est contenu ici.


  22..  IInnttrroodduuccttiioonn


  Le serveur XFree86 permet aux utilisateurs de configurer leur sous-
  systme vido, ce qui favorise une utilisation optimale du matriel
  existant.  Le but de ce guide est de vous apprendre  crer vos propre
  valeurs d'horloge pour faire le meilleur usage de votre carte vido et
  moniteur.

  Nous prsenterons une mthode pour obtenir une configuration de base
  utilisable, ensuite nous vous montrerons comment, au dpart de celle-
  ci, vous pouvez vous livrer  des expriences pour dterminer un
  ensemble de valeurs qui l'adapte  vos prfrences.

  Si vous disposez dj d'un mode qui fonctionne presque (en
  particulier, si l'un des modes VESA pr-dfinis vous donne une image
  stable mais dcentre vers la gauche ou la droite, trop petite, ou
  trop grande) vous pouvez passer immdiatement  la section intitule
  ``Rsoudre les problmes affectant l'image''.  Celle-ci vous apprendra
  diverses manires de manipuler les valeurs d'horloge en vue d'obtenir
  certains rsultats prcis.

  Ne partez pas du principe que vous allez avoir de fastidieux
  ajustements de modes  faire, juste parce qu' votre premier lancement
  de X aprs installation, vous obtenez un cran brouill. Il se peut
  que presque toutes les lignes de modes soient bonnes, mais que le
  serveur utilise par dfaut justement celle qui ne convient pas  votre
  matriel.  Au lieu de dsesprer, essayez de basculer de mode en mode
  avec CTRL-ALT-KP+.  Si certains donnent de bons rsultats, essayez de
  les commenter tous sauf un 640x480, et vrifiez que ce mode
  fonctionne. Si c'est le cas, dcommentez aussi une paire d'autres
  modes, par exemple un 800x600 et un 1024x768  une frquence que votre
  moniteur devrait aussi grer.

  Bientt la configuration sera trs facile. De nombreux modules pilotes
  de la toute rcente version 4.0 d'XFree86 supportent le systme DDC
  VESA (pour _D_i_s_p_l_a_y _D_a_t_a _C_h_a_n_n_e_l : canal de donnes d'affichage).  Ce
  systme permet  l'cran de dclarer  XFree86 les lignes de mode
  qu'il est capable de supporter. Ainsi, avec XFree 4.0 et un moniteur
  rcent, vous avez de bonnes chances de n'avoir aucune configuration 
  faire.


  33..  OOuuttiillss ddee ccaallccuull aauuttoommaattiiqquuee

  Si vous avez un moniteur relativement rcent (1996 au moins) qui
  supporte les spcifications PnP, vous avez une chance de lire les
  caractristiques du moniteur et de calculer automatiquement les lignes
  de mode avec le programme read-edid
  <http://altern.org/vii/programs/linux/read-edid/>.

  A partir de la version 3.2, XFree86 s'accompagne du programme
  XXFF8866SSeettuupp(1) qui simplifie grandement la cration interactive d'un
  mode graphique valable, sans devoir manipuler directement les valeurs
  d'horloge vido.  Ainsi, dans la plupart des cas, il ne devrait pas
  vous tre ncessaire de calculer un mode graphique de base.
  Malheureusement, XXFF8866SSeettuupp(1) a ses limites ; il ne connat que les
  modes graphiques standards jusqu' 1280x1024.  Si vous disposez d'un
  moniteur  trs haute performance capable d'afficher 1600x1200 ou
  plus, il vous faudra malgr tout encore calculer votre mode graphique
  de base vous-mmes.

  Il y a un utilitaire KDE appel KVideoGen
  <http://without.netpedia.net/kvideogen/> qui calcule des lignes de
  mode  partir des caractristiques du moniteur et de la carte. J'ai
  bien gnr des lignes de modes avec, mais je ne les ai pas testes.
  Notez que ses paramtres "refresh rate" horizontal et vertical sont la
  mme chose que les frquences de synchronisation HSF et VSF que nous
  dcrivons plus loin. Le nombre "horizontal sync pulse" semble tre la
  largeur de l'impulsion de synchronisation en microsecondes, HSP.  Si
  vous ne connaissez pas votre "horizontal sync pulse", il vaut mieux
  laisser la valeur par dfaut.

  Les versions rcentes de XFree86 comprennent un outil appel
  xxvviiddttuunnee(1) que vous trouverez sans doute trs utile pour tester et
  affiner les modes graphiques.  Il commence par un avertissement
  effrayant relatif aux possibles consquences d'un usage abusif.  Si
  vous accordez  ce document une attention scrupuleuse et apprenez ce
  qui se cache derrire les jolies valeurs dans les crans de xvidtune,
  vous serez capables d'utiliser ce programme efficacement et en toute
  confiance.

  Si xxvviiddttuunnee(1) est prsent, il vous sera possible d'essayer de
  nouveaux modes "au vol", sans modifier votre fichier de configuration
  X, sans mme redmarrer votre serveur X.  Dans le cas contraire,
  XFree86 vous permet d'utiliser des raccourcis clavier pour
  slectionner parmi les diffrents modes dfinis dans Xconfig (voyez
  XFree86.man pour de plus amples dtails).  Exploitez cette capacit
  pour vous viter des ennuis !  Lorsque vous souhaitez tester un
  nouveau mode, donnez-lui un nom unique et ajoutez-le  la _f_i_n de votre
  liste de raccourcis.  Gardez toujours un mode que vous savez bon comme
  dfaut, de faon  avoir une position de repli si le mode en cours de
  test ne marche pas.

  A la fin de ce document, vous trouverez un script modeplot que vous
  pourrez utiliser pour produire un graphe analogique des modes
  disponibles. Ce n'est pas directement utile pour gnrer des lignes de
  mode, mais a peut vous aider  comprendre les relations qui
  permettent de les dfinir.


  44..  CCoommmmeenntt ffoonnccttiioonnnneenntt lleess ccrraannss vviiddoo

  Savoir comment fonctionne l'cran est essentiel pour comprendre
  quelles valeurs placer dans les diffrents champs du fichier Xconfig.
  Le serveur XFree86 utilise ces valeurs pour obtenir le contrle de
  plus bas niveau sur l'cran.

  L'cran cre une image  partir de ce qu'on peut considrer comme une
  srie de points.  Ces points sont juxtaposs de gauche  droite pour
  crer des lignes.  Ces lignes sont  leur tour juxtaposes de haut en
  bas pour crer l'image.  Les points mettent de la lumire lorsqu'ils
  sont frapps par les faisceaux d'lectrons  l'intrieur du tube
  cathodique, un par couleur.  Pour faire en sorte que le faisceau
  frappe tous les points pendant une dure gale, le faisceau balaye
  l'cran suivant un itinraire immuable, appele _t_r_a_m_e.

  Nous avons crit "ce qu'on peut considrer comme une srie de points"
  car les points de la trame ne correspondent pas aux points de
  phosphores physiques. Ils sont beaucoup plus gros, et regroupent
  beaucoup de points de phosphore. Ils doivent l'tre, car autrement
  l'affichage souffrirait d'un svre effet de moir. Les points de la
  trame correspondent rellement  l'chantillonnage du signal
  analogique du pilote vido, et sont affichs sous la forme d'une
  grille de points simplement parce que les pics et les valles du
  signal sont espacs suffisamment rgulirement et finement.

  Le trac de cet itinraire commence dans le coin suprieur gauche,
  traverse l'cran vers la droite en une ligne horizontale, et s'arrte
  momentanment au bord droit.  Le faisceau est alors envoy du ct
  gauche de l'cran, mais une ligne plus bas.  Cette nouvelle ligne est
  parcourue de gauche  droite juste comme la premire.  Ce schma est
  rpt jusqu' ce que la dernire ligne de l'cran ait t parcourue.
  A ce moment, le faisceau est renvoy du coin infrieur droit au coin
  suprieur gauche, et la manoeuvre recommence.

  Il existe une variante de ce schma, que l'on appelle mode entrelac
  (_i_n_t_e_r_l_a_c_i_n_g) : dans ce cas, seule une ligne sur deux est parcourue
  pendant la premire demi-trame et les autres sont traites lors d'un
  deuxime parcours de demi-trame.

  Le dpart du faisceau dans le coin suprieur gauche de l'cran est
  appel le dbut de trame.  La trame se termine lorsque le faisceau
  retrouve sa position de dpart venant du coin infrieur droit.  Une
  trame se compose de toutes les lignes que le faisceau a parcourues
  entre le haut et le bas de l'cran.

  Si le faisceau d'lectrons tait allum en permanence pendant son
  parcours de la trame, tous les points de l'cran seraient illumins.
  Il n'y aurait pas de marges noires autour de la zone affichable.  Aux
  bords de l'cran, l'image serait distordue car il est difficile de
  contrler le faisceau  cet endroit.  De faon  rduire cette
  distorsion, les points en dehors de la zone affichable ne sont pas
  illumins par le faisceau, mme si celui-ci peut tre dirig dans leur
  direction.  Ceci explique que la taille de la zone affichable soit
  infrieure  la surface totale de l'cran.

  Un autre concept important  comprendre est ce qu'il advient du
  faisceau lorsqu'aucun point n'est illumin  ce moment dans la zone
  affichable.  Le temps pendant lequel le faisceau aurait pu illuminer
  les marges latrales de la zone affichable est utilis pour renvoyer
  le faisceau du ct droit au ct gauche en le faisant passer  la
  ligne suivante.  De la mme faon, le temps pendant lequel le faisceau
  aurait pu illuminer les marges infrieure et suprieure de la zone
  affichable est utilis pour dplacer le faisceau du coin infrieur
  droit de l'cran au coin suprieur gauche.

  Le rle de la carte graphique est de gnrer les signaux qui
  commanderont  l'cran d'allumer ou d'teindre le faisceau d'lectrons
  pour chaque point, crant ainsi l'image.  La carte contrle aussi le
  moment o l'cran dplace le faisceau du ct droit au dbut de la
  ligne suivante en mettant ce que l'on appelle le signal de
  synchronisation horizontale (_h_o_r_i_z_o_n_t_a_l _s_y_n_c _p_u_l_s_e).  Un signal de
  synchronisation horizontale est mis  la fin de de chaque ligne.  La
  carte graphique met aussi un signal de synchronisation verticale
  (_v_e_r_t_i_c_a_l _s_y_n_c _p_u_l_s_e) qui commande  l'cran de renvoyer le faisceau
  dans le coin suprieur gauche.  Un signal de synchronisation verticale
  est mis  la fin de chaque trame.

  De courts temps de pause sont ncessaires immdiatement avant et aprs
  l'mission des signaux de synchronisation horizontale et verticale de
  faon  ce que la position du faisceau puisse se stabiliser.  Sinon,
  l'image ne sera pas stable.

  Pour plus d'informations, il y a une page (en anglais) TV and Monitor
  Deflection Systems
  <http://fribble.cie.rpi.edu/~repairfaq/REPAIR/F_deflfaq.html>.

  Dans une section ultrieure, nous reviendrons sur ces bases avec des
  dfinitions, des formules et des exemples pour vous aider  les
  utiliser.


  55..  ggrraapphhiiqquuee PPrriinncciippeess ffoonnddaammeennttaauuxx rreellaattiiffss  vvoottrree ccrraann eett vvoottrree
  ccaarrttee


  Il y a quelques principes fondamentaux qu'il vous faut comprendre
  avant de bricoler une entre dans le fichier XF86config.  Ceux-ci
  sont :


    les options relatives aux frquences de synchronisation horizontale
     et verticale de votre moniteur

    la bande passante de votre moniteur

    les frquences d'horloge pilotes de votre carte graphique, ou _d_o_t
     _c_l_o_c_k_s



  55..11..  LLeess ffrrqquueenncceess ddee ssyynncchhrroonniissaattiioonn dduu mmoonniitteeuurr

  La frquence de synchronisation horizontale reprsente simplement le
  nombre de fois par seconde que l'cran peut parcourir une ligne
  horizontale ; c'est, de toutes, la valeur la plus importante
  concernant votre moniteur.  La frquence de synchronisation verticale
  reprsente le nombre de fois par seconde que le moniteur peut dplacer
  le faisceau verticalement.

  Les frquences de synchronisation seront gnralement fournies  la
  page "spcifications techniques" du manuel de votre moniteur.  La
  frquence de synchronisation verticale est typiquement exprime en Hz
  (cycles par seconde), la valeur horizontale en kHz (kilo-cycles par
  seconde).  Les plages de valeurs se situent habituellement entre 50 et
  150 Hz verticalement, et entre 31 et 135 kHz horizontalement.

  Si vous avez un moniteur dit multi-frquences (_m_u_l_t_i_s_y_n_c), ces
  frquences seront donnes sous forme de plages.  Certains moniteurs,
  spcialement les modles bas de gamme, ne supportent qu'une srie de
  frquences fixes.  Ceux-ci peuvent aussi tre configurs, mais votre
  marge de manoeuvre sera srieusement limite par les caractristiques
  physiques du moniteur.  Choisissez la plus haute paire de frquences
  pour obtenir la meilleure rsolution.  Et soyez prudents --- essayer
  de piloter un moniteur dont les frquences sont fixes  une frquence
  suprieure  celle pour laquelle il a t conu peut aisment
  l'endommager.

  Des versions prcdentes de ce guide traitaient de faon fort lgre
  l'utilisation de moniteurs multi-frquences en surcapacit, les
  poussant au-del du maximum nominal de leur frquence de
  synchronisation verticale dans le but d'obtenir de meilleures
  performances.  D'autres arguments ont depuis lors t ports  notre
  connaissance, incitant  la prudence en ce domaine ; nous reviendrons
  sur ce sujet dans la section ``Usage du moniteur en surcapacit'' ci-
  dessous.





  55..22..  LLaa bbaannddee ppaassssaannttee vviiddoo dduu mmoonniitteeuurr


  La page des spcifications techniques du votre manuel de votre
  moniteur devrait mentionner sa bande passante.  Si ce n'est pas le
  cas, jetez un oeil  la rsolution maximale annonce pour le moniteur.
  En premire approximation, voici une table de conversion de rsolution
  en estimation de bande passante (il s'agit donc de limites suprieures
  approximatives pour la frquence pilote (_d_o_t _c_l_o_c_k) que vous pouvez
  utiliser) :



               640x480                 25
               800x600                 36
               1024x768                65
               1024x768 interlaced     45
               1280x1024               110
               1600x1200               185




  Au demeurant, cette table n'a rien de magique ; ces valeurs sont
  simplement les frquences pilotes les plus basses par rsolution dans
  la base de donnes des modes standard XFree86 (exception faite de la
  dernire, que j'ai extrapole).  La bande passante de votre moniteur
  peut en ralit tre plus leve que le minimum requis pour sa
  rsolution maximale, aussi ne craignez pas d'essayer une frquence
  pilote de quelques MHz suprieure.

  Notez aussi que la bande passante doit rarement tre prise en ligne de
  compte aux frquences pilotes infrieures  65 MHz environ.  Avec une
  carte SVGA et la plupart des moniteurs haute rsolution, vous ne
  pourrez mme pas approcher la limite de la bande passante de votre
  moniteur.  En voici quelques exemples :



               Marque                          Bande passante vido
               ------                          --------------------
               NEC 4D                           75 Mhz
               Nano 907a                        50 Mhz
               Nano 9080i                       60 Mhz
               Mitsubishi HL6615               110 Mhz
               Mitsubishi Diamond Scan         100 Mhz
               IDEK MF-5117                     65 Mhz
               IOCOMM Thinksync-17 CM-7126     136 Mhz
               HP D1188A                       100 Mhz
               Philips SC-17AS                 110 Mhz
               Swan SW617                       85 Mhz
               Viewsonic 21PS                  185 Mhz




  Mme les moniteurs bas de gamme n'ont en gnral pas de contrainte
  terrible au niveau de leur bande passante aux rsolutions annonces.
  Le NEC Multisync II en est un exemple parfait --- si l'on en croit les
  spcifications du constructeur, il ne parvient mme pas  afficher en
  800x600.  Il affichera au maximum en 800x560.  Pour des rsolutions si
  basses, il n'est pas ncessaire de disposer de hautes frquences
  pilotes ou une large bande passante ; le mieux que vous puissiez faire
  sera probablement 32 Mhz ou 36 Mhz, l'un comme l'autre ne s'cartant
  pas trop de la bande passante annonce du moniteur : 30 Mhz.

  A ces deux frquences pilotes, il se peut que l'image affiche ne soit
  pas aussi nette qu'elle devrait l'tre, mais certainement d'une
  qualit tolrable. Il serait plus agrable, bien sr, que le NEC
  Multisync II dispose d'une bande passante vido suprieure  36 Mhz,
  par exemple.  Mais ceci n'est pas indispensable pour des tches de
  base comme l'dition de texte, pour autant que l'cart ne soit pas 
  ce point important qu'il occasionne une forte distorsion de l'image
  (vos yeux vous le feraient sentir immdiatement si cela devait tre le
  cas).


  55..33..  LLaa ffrrqquueennccee ppiilloottee (( ddoott cclloocckk )) ddee llaa ccaarrttee ggrraapphhiiqquuee


  La page "spcifications techniques" du manuel de votre carte graphique
  mentionne sans doute le _d_o_t _c_l_o_c_k maximum de la carte (c'est  dire,
  le nombre total de pixels que la carte peut envoyer  l'cran par
  seconde).

  Si vous ne possdez pas cette information, le serveur X la trouvera
  pour vous.  Les versions rcentes des serveurs X supportent tous une
  option --probeonly qui imprime cette information et termine sans
  rellement dmarrer X ni changer le mode vido.

  Si cette option n'est pas supporte dans votre cas, ne perdez pas
  espoir.  Mme si X bloque votre moniteur, il mettra une ligne de
  valeurs d'horloge et d'autres informations vers la sortie erreur
  standard (_s_t_d_e_r_r).  Si vous re-dirigez cela vers un fichier, les
  informations devraient y tre conserves, mme s'il vous faut
  redmarrer la machine pour obtenir  nouveau l'accs  la console.

  Les rsultats de cette dtection du matriel ou les messages de
  dmarrage devraient ressembler  l'un des exemples suivants :

  Si vous utilisez XFree86 :































  Xconfig: /usr/X11R6/lib/X11/Xconfig
  (**) stands for supplied, (--) stands for probed/default values
  (**) Mouse: type: MouseMan, device: /dev/ttyS1, baudrate: 9600
  Warning: The directory "/usr/andrew/X11fonts" does not exist.
           Entry deleted from font path.
  (**) FontPath set to "/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/"
  (--) S3: card type: 386/486 localbus
  (--) S3: chipset:   924
                      ---
      Chipset -- le modle prcis du processeur (ici, un ancien masque du 86C911)

  (--) S3: chipset driver: s3_generic
  (--) S3: videoram:  1024k
                      -----
           Taille de la mmoire RAM tampon de trame embarque

  (**) S3: clocks:  25.00  28.00  40.00   3.00  50.00  77.00  36.00  45.00
  (**) S3: clocks:   0.00   0.00  79.00  31.00  94.00  65.00  75.00  71.00
                    ------------------------------------------------------
                              Frquences pilotes autorises en MHz

  (--) S3: Maximum allowed dot-clock: 110MHz
                                      ------
                                 Largeur de bande
  (**) S3: Mode "1024x768": mode clock =  79.000, clock used =  79.000
  (--) S3: Virtual resolution set to 1024x768
  (--) S3: Using a banksize of 64k, line width of 1024
  (--) S3: Pixmap cache:
  (--) S3: Using 2 128-pixel 4 64-pixel and 8 32-pixel slots
  (--) S3: Using 8 pages of 768x255 for font caching



  Si vous utilisez SGCS ou X/Inside X :


  WGA: 86C911 (mem: 1024k clocks: 25 28 40 3 50 77 36 45 0 0 79 31 94 65 75 71)
  ---  ------       -----         --------------------------------------------
   |     |            |              Frquences pilotes autorises en MHz
   |     |            +-- Taille de la mmoire RAM tampon de trame embarque
   |     +-- Modle du processeur
   +-- Nom du serveur



  Note : effectuez ce test sur votre machine lorsqu'elle n'est pas
  charge (si possible).  Dans la mesure o X est une application, ses
  boucles de temporisation peuvent tre perturbes par de l'activit sur
  le disque, rendant les valeur mentionnes ci-dessus imprcises.
  Effectuez le test plusieurs fois et veillez  ce que ces valeurs se
  stabilisent ; si cela ne se produit pas, liminez autant de processus
  actifs que ncessaire.  Le processus dmon qui pilote votre souris
  risque trs fort de vous causer des problmes (il s'agit de _g_p_m pour
  les utilisateurs Linux, de _m_o_u_s_e_m_g_r pour les utilisateurs de SVr4).

  De faon  viter toute imprcision lors de la dtection des
  frquences d'horloge, vous pouvez simplement copier la liste de
  frquences et la placer dans votre fichier XF86config comme valeur de
  la proprit "Clocks" --- ceci supprime la boucle de temporisation et
  fournit  X une liste prcise des valeurs d'horloge qu'il peut
  utiliser.  En utilisant les donnes de l'exemple ci-dessus, cela
  donnerait :




  wga
          Clocks  25 28 40 3 50 77 36 45 0 0 79 31 94 65 75 71



  Sur des systmes dont la charge de travail varie fortement, ceci peut
  vous aider  viter de mystrieux checs au dmarrage de X.  Il peut
  arriver que X dmarre, obtienne une mauvaise temporisation  cause de
  la charge excessive du systme, et ne soit ds lors pas capable de
  trouver une frquence correspondante dans sa base de donnes de
  configuration --- ou choisisse la mauvaise !


  55..44..  QQuuee ccoonnttrrlleenntt cceess ddoonnnneess ddee bbaassee


  Les plages de frquences de synchronisation de votre moniteur, ainsi
  que la frquence pilote de votre carte graphique, dterminent la
  rsolution maximale qu'il vous sera loisible d'atteindre.  Mais c'est
  le rle du pilote de priphrique d'exploiter le potentiel de votre
  quipement.  Du matriel de qualit suprieure sans un pilote d'une
  comptence gale est un gaspillage d'argent.  D'un autre ct, avec un
  pilote de priphrique flexible et du matriel moins puissant, vous
  pouvez gagner un peu de marge de manoeuvre par rapport aux contraintes
  physiques.  Telle est la philosophie qui prsida  la conception de
  XFree86.

  Il vous faudra slectionner une frquence d'horloge adapte  la bande
  passante vido de votre moniteur.  Vous bnficierez ici d'une large
  marge de manoeuvre, cependant --- certains moniteurs ont une capacit
  relle suprieure de 30% par rapport  leur bande passante nominale.
  Le risque ici est de dpasser la frquence de synchronisation
  verticale annonce du moniteur ; nous discuterons ceci en dtail plus
  loin.

  Cette connaissance de la bande passante vous permettra d'effectuer des
  choix plus avertis entre diverses configurations possibles. Elle peut
  en effet influencer les qualits visuelles de votre cran
  (spcialement la prcision dans les petits dtails).


  66..  CCoommpprreennddrree lleess ssppcciiffiiccaattiioonnss ddee bbaassee


  Cette section explique la signification des spcifications mentionnes
  prcdemment, ainsi que certains autres lments qu'il vous sera utile
  de connatre.  Tout d'abord, quelques dfinitions.  A ct de chaque
  terme dfini est mentionn entre parenthses le nom de la variable que
  nous utiliserons pour le reprsenter dans nos formules.


     ffrrqquueennccee ddee ssyynncchhrroonniissaattiioonn hhoorriizzoonnttaallee ((HHSSFF -- _h_o_r_i_z_o_n_t_a_l _s_y_n_c
        _f_r_e_q_.)
        Nombre de parcours horizontaux par seconde (voir ci-dessus).


     ffrrqquueennccee ddee ssyynncchhrroonniissaattiioonn vveerrttiiccaallee ((VVSSFF -- _v_e_r_t_i_c_a_l _s_y_n_c _f_r_e_q_.)
        Nombre de parcours verticaux par seconde (voir ci-dessus).
        Principalement important comme limite suprieure pour la
        frquence de rafrachissement.


     ffrrqquueennccee ppiilloottee ((DDCCFF -- _d_r_i_v_i_n_g _c_l_o_c_k _f_r_e_q_. _= _d_o_t _c_l_o_c_k)
        La frquence du cristal ou VCO de votre carte graphique --- le
        nombre maximum de points par seconde qu'elle peut mettre.

     bbaannddee ppaassssaannttee vviiddoo ((VVBB -- _v_i_d_e_o _b_a_n_d_w_i_t_h)
        La frquence la plus leve que vous puissiez appliquer 
        l'entre vido de votre moniteur en conservant une chance
        raisonnable d'obtenir une image intelligible. Si vous vous
        reprsentez le signal mis par votre carte graphique comme une
        succession rapide d'tats allums/teints, sa frquence la plus
        basse est gale  la moiti de DCF, de sorte qu'en thorie, la
        bande passante n'a de sens qu' partir de DCF/2.  Pour obtenir 
        l'cran un affichage suffisamment net des petits dtails,
        cependant, vous ne souhaiterez pas qu'elle soit de loin
        infrieure  votre DCF maximale ; il vaudrait mme mieux qu'elle
        lui soit suprieure.


     lloonngguueeuurr ddee ttrraammee ((HHFFLL,, VVFFLL))
        La longueur de trame horizontale (HFL - _h_o_r_i_z_o_n_t_a_l _f_r_a_m_e _l_e_n_g_t_h)
        est le nombre de tics  l'horloge de votre carte graphique dont
        le canon  lectrons de votre moniteur a besoin pour parcourir
        une ligne horizontale, _e_n _c_e _c_o_m_p_r_i_s _l_e_s _m_a_r_g_e_s _g_a_u_c_h_e _e_t _d_r_o_i_t_e
        _i_n_a_c_t_i_v_e_s.  La longueur de trame verticale (VFL - _v_e_r_t_i_c_a_l _f_r_a_m_e
        _l_e_n_g_t_h) est le nombre de lignes parcourues dans l'image _e_n_t_i__r_e,
        en ce compris les marges infrieure et suprieure inactives.


     ffrrqquueennccee ddee rraaffrraacchhiisssseemmeenntt ddee ll''ccrraann ((RRRR -- _r_e_f_r_e_s_h _r_a_t_e)
        Le nombre de fois par seconde que votre image est redessine
        (ceci est aussi appel la "frquence de trame" - _f_r_a_m_e _r_a_t_e).
        Plus cette frquence est leve, meilleur est l'cran, dans la
        mesure o cela diminue l'effet de clignotement.  60 Hz est bon,
        mais le standard VESA (72 Hz) est meilleur.  Calculez-la sur
        base de la formule suivante :


                  RR = DCF / (HFL * VFL)




     Notez que le produit au dnominateur n'est _p_a_s gal  la rsolution
     visible du moniteur, mais typiquement lgrement plus grand.  Nous
     entrerons dans les dtails de ceci plus loin.

     Les frquences pour lesquelles sont gnralement mentionns les
     modes dits entrelacs (comme "87Hz Interlaced") sont en fait des
     frquences de demi-trame : un cran de ce type semble avoir une
     frquence de rafrachissement suprieure aux autres modles de sa
     catgorie, mais chaque ligne individuelle n'est rafrachie qu'une
     fois sur deux.

     Dans le cadre de nos calculs, nous prendrons en compte la frquence
     de rafrachissement d'un moniteur entrelac par trame complte,
     c'est--dire 43.5 Hz dans l'exemple cit plus haut. La qualit d'un
     mode entrelac est meilleure que celle d'un mode non-entrelac 
     frquence de rafrachissement par trame complte gale, mais
     dfinitivement plus mdiocre que le mode non-entrelac
     correspondant  la frquence de rafrachissement par demi-trame.


  66..11..  AA pprrooppooss ddee llaa bbaannddee ppaassssaannttee


  Les fabricants de moniteurs aiment vanter la large bande passante
  offerte par leur matriel car elle dtermine la nettet des
  transitions d'intensit et de couleur  l'cran.  Une large bande
  passante signifie que de plus petits dtails seront visibles.

  Votre moniteur utilise des signaux lectroniques pour offrir  vos
  yeux l'image qu'ils contemplent.  Des signaux de ce type se prsentent
  toujours sous la forme d'une onde une fois que l'information digitale
  a t convertie en un signal analogique.  Ils peuvent tre perus
  comme une combinaison de nombreuses ondes plus simples, chacune ayant
  une frquence fixe, pour la plupart dans la bande des Mhz, par
  exemple, 20 Mhz, 40 Mhz, voire mme 70 Mhz.  La bande passante de
  votre moniteur n'est autre, en fait, que le signal analogique de plus
  haute frquence qu'il peut grer sans distorsion.

  Dans le cas qui nous occupe, la bande passante vido est
  essentiellement importante comme limite suprieure approximative au
  niveau des frquences pilotes qu'il vous est possible d'utiliser.


  66..22..  FFrrqquueenncceess ddee ssyynncchhrroonniissaattiioonn eett ffrrqquueennccee ddee rraaffrraacchhiisssseemmeenntt


  Chaque ligne parcourue horizontalement  l'cran n'est que la partie
  visible d'un parcours de toute la longueur de la trame.  A tout
  moment, il n'y a en fait qu'un seul point actif  l'cran, mais avec
  une frquence de rafrachissement suffisamment leve, la persistance
  rtinienne de vos yeux vous permet de percevoir l'image complte.

  Voici quelques schmas qui vous aideront :


       _______________________
      |                       |     La frquence de synchronisation horizontale
      |->->->->->->->->->->-> |     reprsente le nombre de fois
      |                      )|     par seconde que le faisceau d'lectrons
      |<-----<-----<-----<--- |     du moniteur peut parcourir
      |                       |     un chemin semblable  celui-ci
      |                       |
      |                       |
      |                       |
      |_______________________|
       _______________________
      |        ^              |     La frquence de synchronisation verticale
      |       ^ |             |     reprsente le nombre de fois par
      |       | v             |     seconde que le faisceau d'lectrons du
      |       ^ |             |     moniteur peut parcourir un chemin
      |       | |             |     semblable  celui-ci
      |       ^ |             |
      |       | v             |
      |       ^ |             |
      |_______|_v_____________|



  Souvenez-vous que le balayage de la zone affichable (_r_a_s_t_e_r _s_c_a_n)
  adopte en ralit la forme d'un zigzag trs serr ; cela signifie que
  le faisceau se dplace de gauche  droite et en mme temps de haut en
  bas.

  Nous comprenons maintenant comment frquence pilote (_d_o_t _c_l_o_c_k) et
  taille de trame sont lies  la frquence de rafrachissement.  Par
  dfinition, un hertz (Hz) quivaut  un cycle par seconde.  Ainsi, si
  votre longueur de trame horizontale est reprsente par HFL et votre
  longueur de trame verticale par VFL, il vous faut alors (HFL * VFL)
  tics pour couvrir l'entiret de l'cran.  Puisque votre carte met
  DCF tics par seconde par dfinition, il s'ensuit bien entendu que le
  (les) canon(s)  lectrons de votre moniteur peuvent parcourir l'cran
  de gauche  droite et retour et de haut en bas et retour DCF / (HFL *
  VFL) fois par seconde.  Ceci reprsente la frquence de
  rafrachissement de votre cran, car c'est le nombre de fois que le
  contenu de votre cran peut tre mis  jour (donc _r_a_f_r_a__c_h_i) par
  seconde !

  Il vous est ncessaire d'intgrer ce concept si vous voulez pouvoir
  mettre sur pied une configuration qui sacrifie de la rsolution pour
  gagner de la stabilit (rduction de l'effet de clignotement) de la
  manire qui vous convienne le mieux.

  Pour ceux d'entre vous qui comprennent mieux un petit dessin qu'un
  long discours, en voici un :


          RR                                      VB
           |   min HSF                     max HSF |
           |    |             R1        R2  |      |
  max VSF -+----|------------/----------/---|------+----- max VSF
           |    |:::::::::::/::::::::::/:::::\     |
           |    \::::::::::/::::::::::/:::::::\    |
           |     |::::::::/::::::::::/:::::::::|   |
           |     |:::::::/::::::::::/::::::::::\   |
           |     \::::::/::::::::::/::::::::::::\  |
           |      \::::/::::::::::/::::::::::::::| |
           |       |::/::::::::::/:::::::::::::::| |
           |        \/::::::::::/:::::::::::::::::\|
           |        /\:::::::::/:::::::::::::::::::|
           |       /  \:::::::/::::::::::::::::::::|\
           |      /    |:::::/:::::::::::::::::::::| |
           |     /     \::::/::::::::::::::::::::::| \
  min VSF -+----/-------\--/-----------------------|--\--- min VSF
           |   /         \/                        |   \
           +--/----------/\------------------------+----\- DCF
             R1        R2  \                       |     \
                            min HSF                |    max HSF
                                                   VB



  Ce graphique traduit les capacits d'un moniteur classique.  Sur l'axe
  des x sont places les frquences pilotes (DCF), sur l'axe des y les
  frquences de rafrachissement (RR). La rgion noircie du diagramme
  reprsente les capacits du moniteur : chaque point  l'intrieur de
  cette rgion est un mode graphique possible.

  Les lignes marques `R1' et `R2' symbolisent une rsolution fixe
  (telle 640x480) ; le but de leur prsence est de montrer comment une
  rsolution donne peut tre obtenue par l'utilisation de nombreuses
  combinaisons diffrentes de frquences pilotes et de frquences de
  rafrachissement. La ligne R2 reprsentera donc une plus haute
  rsolution que R1.

  Les frontires haute et basse de la rgion noircie sont de simples
  lignes horizontales qui reprsentent les valeurs limites de la
  frquence de synchronisation verticale (min VSF et max VSF). La bande
  passante vido (VB) est une limite suprieure  la frquence pilote et
  apparat donc comme une ligne verticale limitant la rgion noircie sur
  la droite.

  Au chapitre ``Reprsentation graphique des capacits du moniteur'',
  vous trouverez un programme qui vous aidera  tablir un diagramme
  semblable  celui-ci (mais beaucoup plus joli, enrichi du style
  graphique X) pour votre moniteur personnel.  Ce chapitre couvrira
  aussi ce sujet fascinant : comment dduire les limites rsultant des
  frquences de synchronisation horizontale minimum et maximum.



  77..  CCoonncceessssiioonnss lloorrss ddee llaa ccoonnffiigguurraattiioonn dduu ssyyssttmmee


  Il existe une autre faon de formuler l'quation dveloppe plus haut



               DCF = RR * HFL * VFL




  C'est--dire que vous considrez votre frquence pilote comme fixe.
  Vous pouvez ensuite convertir ces points par seconde que vous venez
  d'conomiser en frquence de rafrachissement, rsolution horizontale,
  ou rsolution verticale.  Si l'un de ces paramtres augmente, l'un ou
  les deux autres doivent diminuer.

  Notez, cependant, que votre frquence de rafrachissement ne peut
  excder la frquence de synchronisation verticale maximum de votre
  moniteur.  Ainsi, pour tout moniteur  une frquence pilote donne, il
  existe un produit de longueurs de trame minimum (HFL * VFL) en dessous
  duquel vous ne pourrez le faire descendre.

  Lorsque vous choisirez vos paramtres, souvenez-vous de ceci : si vous
  prenez une valeur de RR trop basse, vous serez gns par un effet de
  clignotement.

  Il n'est pas recommand de faire descendre votre frquence de
  rafrachissement en dessous des 60 Hz.  Ceci reprsente la frquence
  d'oscillation des tubes fluorescents ; si vous tes sensibles  ceux-
  ci, il vous faudra de prfrence conserver les 72 Hz, le standard
  ergonomique VESA.

  L'effet de clignotement est trs prouvant pour les yeux, bien que
  l'oeil humain soit adaptable et que la tolrance individuelle au
  phnomne varie fortement.  Si vous faites face  votre moniteur  un
  angle de 90%, que vous utilisez une couleur de fond sombre et une
  couleur en fort contraste pour l'avant-plan, et que vous vous
  contentez d'une intensit basse  moyenne, il se *peut* qu'une
  frquence de rafrachissement aussi basse que 45 Hz vous semble
  confortable.

  Et maintenant le test qui tue : ouvrez un xterm ayant un fond de
  couleur blanche et un avant-plan noir avec la commande xterm -bg white
  -fg black et modifiez sa taille de faon  ce qu'il recouvre
  l'entiret de la zone affichable.  Rglez ensuite votre moniteur aux
  3/4 de son intensit maximum, et dtournez votre regard du moniteur.
  Essayez de le regarder en biais (de faon  forcer l'utilisation des
  cellules rtiniennes priphriques, plus sensibles).  Si vous ne
  percevez aucun effet de clignotement, ou si vous considrez celui-ci
  tolrable, cela signifie que la frquence de rafrachissement vous
  convient.  Dans le cas contraire il serait prfrable que vous
  configuriez une frquence de rafrachissement plus leve, car ce
  clignotement  la limite du perceptible fatiguera terriblement vos
  yeux et causera des maux de tte, mme si l'image semble parfaite en
  vision normale.

  Dans le cas des modes entrelacs, l'importance du clignotement dpend
  de plus de facteurs diffrents tels la rsolution verticale choisie et
  le type d'image affich.  Il ne vous reste qu' procder  vos propres
  expriences.  Quoi qu'il en soit, je ne vous conseille pas de
  descendre beaucoup sous la limite des 85 Hz (frquence par demi-
  trame).


  Partons du principe que vous avez choisi une frquence de
  rafrachissement reprsentant un minimum acceptable.  Vous aurez alors
  quelqu'espace de manoeuvre dans le choix de vos HFL et VFL.


  88..  EExxiiggeenncceess eenn tteerrmmee ddee mmmmooiirree


  La mmoire tampon de trame (_f_r_a_m_e_-_b_u_f_f_e_r _R_A_M) disponible peut limiter
  la rsolution qu'il vous sera possible d'obtenir sur des crans
  couleur ou  niveaux de gris.  Cela ne joue sans doute pas de rle par
  contre sur des crans qui ne peuvent afficher que deux couleurs, noir
  et blanc sans dgrad de gris.

  Pour des images en 256 couleurs, un octet de mmoire vido est
  ncessaire pour chaque point visible  afficher.  Ce byte contient
  l'information qui dfinit quel mlange de rouge, vert et bleu est
  utilis pour son point.  Pour calculer la quantit de mmoire requise,
  multipliez le nombre de points visibles par ligne par le nombre de
  lignes visibles.  Pour un cran d'une rsolution de 1024x768, cela
  ferait 1024 x 768 = 786432, ce qui correspond au nombre de points
  visibles sur l'cran.  Cela reprsente aussi,  raison d'un byte par
  point, le nombre de bytes de mmoire vido requise sur votre carte
  graphique.

  Ainsi, vos exigences en terme de mmoire seront typiquement de (HR *
  VR)/1024 Ko de VRAM, arrondis  l'unit suprieure (nous arriverions 
  768K exactement dans l'exemple prcdent).  Si vous disposez de plus
  de mmoire qu'il n'est strictement ncessaire, il vous sera possible
  d'utiliser l'excdant par la cration d'un cran virtuel d'une
  superficie suprieure  celle de votre cran physique.

  Cependant, si votre carte graphique n'est quipe que de 512K, il ne
  vous sera pas possible d'atteindre cette rsolution.  Mme si vous
  possdez un bon moniteur,  dfaut d'une quantit suffisante de
  mmoire vido, votre ne pourrez exploiter pleinement les capacits de
  votre cran.  D'un autre ct, si votre carte SVGA est dote d'un Mga
  de RAM, mais que votre cran ne peut afficher plus de 800x600, les
  hautes rsolutions sont malgr tout hors de votre porte (voyez la
  section ``Utilisation des modes entrelacs'' pour une solution
  possible).

  Ne vous faites pas de soucis si vous disposez de plus de mmoire que
  ncessaire ; XFree86 en fera bon usage en vous permettant de faire
  drouler votre zone affichable (voyez la documentation du fichier
  Xconfig concernant la paramtrisation de la taille de l'cran
  virtuel).  Souvenez-vous aussi qu'une carte quipe de 512 Ko de
  mmoire ne dispose pas en ralit de 512000 octets, mais bien de 512 x
  1024 = 524288 octets.

  Si vous utilisez X/Inside avec une carte S3, et que vous acceptez de
  vous contenter de 16 couleurs (4 bits par pixel), vous pouvez employer
  le paramtre _d_e_p_t_h _4 dans Xconfig et effectivement doubler la
  rsolution que votre carte pourra grer.  Les cartes S3, par exemple,
  offrent normalement 1024x768x256.  Vous pouvez les convaincre de vous
  donner 1280x1024x16 en forant la profondeur d'image  4 bits.


  99..  CCaallccuull ddee llaa ttaaiillllee ddee ttrraammee


  Avertissement : cette mthode a t dveloppe pour les moniteurs
  multi-frquences (_m_u_l_t_i_s_y_n_c).  Elle s'appliquera sans doute aussi aux
  moniteurs  frquence fixe, mais c'est sans garantie !


  Commencez par diviser DCF par la plus haute valeur de HSF disponible
  pour obtenir une longueur de trame horizontale.

  Par exemple, supposons que vous possdiez une carte graphique SVGA de
  type Sigma Legend dont la frquence pilote est de 65 MHz, et que votre
  moniteur ait une frquence de synchronisation horizontale de 55 kHz.
  La valeur (DCF / HSF) est alors de 1181 (65 MHz = 65000 kHz; 65000/55
  = 1181).

  Et maintenant notre premire astuce de magie noire.  Il vous faut
  arrondir le rsultat obtenu au plus proche multiple de 8.  Cela
  s'explique par l'architecture du contrleur VGA en usage sur les
  cartes SVGA et S3 ; ce dernier utilise un registre sur 8 bits, aprs
  dcalage  gauche de 3 bits, pour reprsenter une valeur qui
  normalement occupe 11 bits.  D'autre modles de carte comme l'ATI
  8514/A n'exigent sans doute pas cet arrondi, mais nous ne sommes pas
  sr et l'utiliser ne peut pas nuire.  Aussi, arrondissez la longueur
  de trame horizontale utilisable vers le bas pour obtenir 1176.

  Ce rsultat (DCF / HSF arrondi  un multiple de 8) reprsente la
  valeur minimum de HFL utilisable.  Il est possible d'obtenir de plus
  grandes valeurs de HFL (et donc, probablement, plus de points
  horizontaux sur l'cran) en jouant sur la frquence de synchronisation
  pour diminuer HSF.  Mais le revers de la mdaille se manifestera par
  un effet de clignotement de plus basse frquence et donc plus
  perceptible.

  En rgle gnrale, 80% de la longueur de trame horizontale est
  disponible pour la rsolution horizontale, autrement dit la partie
  visible du parcours horizontal du faisceau (ceci tient compte,
  globalement, des marges et du temps de renvoi -- c'est--dire le temps
  requis par le faisceau pour se dplacer du ct droit de l'cran au
  ct gauche, sur la ligne affichable suivante).  Dans cet exemple,
  cela reprsente 944 tics d'horloge.

  Ds lors, pour donner  votre image ses proportions normales de 4:3,
  fixez la rsolution verticale aux 3/4 de la valeur que vous venez
  juste de calculer pour la rsolution horizontale.  Toujours dans notre
  exemple, cela reprsente 708 tics d'horloge.  Pour obtenir votre VFL
  en tant que tel, multipliez ce chiffre par 1.05, ce qui vous donne 743
  tics.

  Ce rapport 4:3 n'est revtu d'aucun pouvoir magique ; rien ne vous
  empche de dfinir des proportions qui s'cartent de la Rgle d'Or si
  cela doit vous permettre d'exploiter au mieux votre espace affichable.
  Le seul avantage de ces proportions classiques est de faciliter le
  calcul de la hauteur et largeur de trame  partir de la taille
  diagonale : multipliez simplement la diagonale par 0.8 pour obtenir la
  largeur et par 0.6 pour obtenir la hauteur.

  Ainsi, nous avons HFL=1176 et VFL=743.  Si nous divisons 65 MHz par le
  produit de ces deux valeurs, nous obtenons une frquence de
  rafrachissement -- parfaitement saine -- de 74.4 Hz.  Excellent !
  Mieux que le standard VESA !  Et vous obtenez une surface affichable
  de 944 x 708, soit plus que les 800 par 600 que vous attendiez
  probablement.  Pas mal du tout !

  Il est mme possible d'augmenter encore la frquence de
  rafrachissement, la poussant presque jusqu' 76 Hz, en exploitant le
  fait que les moniteurs supportent souvent une frquence de
  synchronisation horizontale suprieure de 2 kHz environ  leur maximum
  annonc, et en diminuant quelque peu VFL (c'est--dire, en utilisant
  moins de 75% de 944 dans l'exemple ci-dessus).  Mais avant de vous
  lancer dans cette tentative d'usage en surcapacit, si vous vous y
  dcidez, soyez _s__r que le canon  lectrons de votre moniteur accepte
  des frquences allant jusqu' 76 Hz en mode vertical.  (Le trs
  rpandu NEC 4D, par exemple, ne le supporte pas.  Il ne va que jusqu'
  75 Hz VSF).  (Reportez-vous  la section ``Usage du moniteur en
  surcapacit'' pour une discussion plus gnrale de ce sujet. )

  Jusqu'ici, la majeure partie de ce que nous avons expos n'est que
  simple arithmtique et connaissance de base des crans d'affichage.
  Pas besoin de la moindre magie noire !


  1100..  MMaaggiiee nnooiirree eett iimmppuullssiioonnss ddee ssyynncchhrroonniissaattiioonn


  OK, vous venez de calculer les valeurs de HFL/VFL pour la frquence
  pilote que vous avez choisie, vous avez trouv une frquence de
  rafrachissement acceptable, et vrifi que vous disposiez d'une
  quantit suffisante de mmoire VRAM.  Passons maintenant  la vraie
  magie noire : il vous faut dterminer o et quand placer vos signaux
  de synchronisation.

  Les signaux de synchronisation contrlent en fait les frquences de
  balayage horizontale et verticale du moniteur.  Les valeurs HSF et VSF
  que vous avez extraites des spcifications techniques sont des
  quantits nominales, approximatives pour les frquences de
  synchronisation maximum.  L'impulsion de synchronisation prsente dans
  le signal de la carte graphique fournit au moniteur sa vitesse
  d'excution effective.

  Vous souvenez-vous des deux schmas prsents ci-dessus ? Seule une
  partie du temps requis pour que le faisceau balaye une trame complte
  est utilis pour construire l'image affiche (autrement dit, votre
  rsolution).


  1100..11..  SSyynncchhrroonniissaattiioonn hhoorriizzoonnttaallee


  En fonction de notre dfinition prcdente, il faut HFL tics d'horloge
  pour effectuer le parcours d'une ligne horizontale.  Appelons HR
  (_h_o_r_i_z_o_n_t_a_l _r_e_s_o_l_u_t_i_o_n) le nombre de tics accomplis en mode visible
  (c'est--dire la rsolution horizontale de votre cran).  Il s'ensuit,
  par dfinition, que HR < HFL.  Pour rester pratique, supposons que les
  deux quantits dmarrent au mme instant comme illustr ci-aprs :


    |___ __ __ __ __ __ __ __ __ __ __ __ __
    |_ _ _ _ _ _ _ _ _ _ _ _                |
    |_______________________|_______________|_____
    0                       ^               ^     unit : tic
                            |   ^       ^   |
                            HR  |       |  HFL
                            |   |<----->|   |
                            |<->|  HSP  |<->|
                            HGT1         HGT2



  Maintenant, nous voudrions obtenir un signal de synchronisation de
  longueur HSP comme illustr ci-dessus, c'est--dire entre la fin des
  tics d'horloge utiliss  l'affichage de l'image et la limite des tics
  consacrs  la trame complte.  Pourquoi cela ?  Parce que si nous
  parvenons  ce rsultat, l'image affiche ne sera pas dplace 
  gauche ou  droite.  Elle occupera sa place assigne sur l'cran,
  recouvrant le centre de la zone affichable.

  Qui plus est, il est prfrable de conserver environ 30 tics "de
  scurit" (_g_u_a_r_d _t_i_m_e) de part et d'autre de l'impulsion de
  synchronisation.  Ces valeurs sont reprsentes par HGT1 et HGT2.
  Dans une configuration typique HGT1 != HGT2, mais si vous tes en
  train de construire une configuration  partir de zro, il vaudra
  mieux que vous commenciez vos expriences avec des valeurs gales
  (c'est--dire, avec l'impulsion de synchronisation centre).

  Le symptme d'une impulsion de synchronisation mal place consiste en
  un dplacement de l'image sur l'cran, l'une des marges largie 
  l'extrme tandis que l'autre ct de l'image est rflchi sur la paroi
  latrale du tube, ce qui rsulte en une ligne blanche  la limite de
  la zone affichable et une bande d'image "fantme" du ct intrieur de
  cette ligne.  Une impulsion de synchronisation verticale excessivement
  mal place peut aller jusqu' provoquer un saut cyclique de l'image
  similaire  ce qu'on observe sur un poste de tlvision dont on aurait
  drgl le bouton d'ajustement vertical (c'est en fait le mme
  phnomne qui est  l'oeuvre ici).

  Si vous avez de la chance, la largeur des signaux de synchronisation
  de votre moniteur sera documente  la page des spcifications
  techniques.  Dans le cas contraire, c'est ici que l'on entre dans la
  vraie magie noire...

  Pour cette section-ci, il vous faudra en partie procder par essais et
  erreurs.  Mais la plupart du temps, vous pouvez sans danger partir du
  principe qu'une impulsion de synchronisation a une dure d'environ 3.5
   4.0 microsecondes.

  Toujours pour rester concret, supposons qu'HSP vaille 3.8
  microsecondes (ce qui, soit dit en passant, n'est pas une mauvaise
  valeur de dpart lorsque l'on exprimente).

  Dans cette hypothse, sur base de la frquence pilote de 65 Mhz
  mentionne plus haut, nous obtenons que HSP est gal  247 tics
  d'horloge (= 65 * 10^6 * 3.8 * 10^-6) [souvenez-vous : Mga=10^6,
  micro=10^-6].

  Certains fabricants aiment mentionner leurs paramtres de tramage
  horizontal sous forme de dure plutt que de largeur exprime en
  pixels.  Vous pourriez chez eux rencontrer les termes suivants :


     dduurree uuttiillee ((HHAATT -- _H_o_r_i_z_o_n_t_a_l _A_c_t_i_v_e _T_i_m_e)
        Equivalent  HR, mais en millisecondes.  HAT * DCF = HR.


     dduurree ddee sseerrvviiccee ((HHBBTT -- _H_o_r_i_z_o_n_t_a_l _B_l_a_n_k_i_n_g _T_i_m_e)
        Equivalent  (HFL - HR), mais en millisecondes.  HBT * DCF =
        (HFL - HR).


     ffeennttrree aavvaanntt ((HHFFPP -- _H_o_r_i_z_o_n_t_a_l _F_r_o_n_t _P_o_r_c_h)
        Synonyme d'HGT1.


     dduurree ddee ssyynncchhrroonniissaattiioonn
        Synonyme d'HSP.


     ffeennttrree aarrrriirree ((HHBBPP -- _H_o_r_i_z_o_n_t_a_l _B_a_c_k _P_o_r_c_h)
        Synonyme d'HGT2.






  1100..22..  SSyynncchhrroonniissaattiioonn vveerrttiiccaallee


  En nous rfrant  l'illustration prcdente, comment placerons-nous
  les 247 tics d'horloge comme indiqu dans le graphe ?

  Toujours sur base du mme exemple, nous avons HR gal  944 et HFL
  gal  1176.  La diffrence entre les deux est 1176 - 944 = 232 <
  247 !  De toute vidence, il nous faudra ici procder  quelques
  ajustements.  Que peut-on faire ?

  La premire tape est de porter 1176  1184, et de rduire 944  936
  (choix des arrondis aux multiples de 8 -- n.d.t.).  Maintenant la
  diffrence = 1184 - 936 = 248. Hmm, on approche.

  Ensuite, au lieu d'utiliser 3.8, nous prendrons 3.5 pour calculer
  HSP ; ce qui nous donne 65 * 3.5 = 227.  C'est dj beaucoup mieux.
  Mais 248 n'est pas beaucoup plus lev que 227.  Il est normalement
  requis de laisser environ 30 tics d'horloge entre HR et le dbut de
  SP, et la mme remarque est valable entre la fin de SP et HFL.  ET ces
  valeurs doivent tre multiples de huit !  Sommes-nous dans l'impasse ?

  Non.  Procdons comme suit, 936 % 8 = 0, (936 + 32) % 8 = 0 galement.
  Mais 936 + 32 = 968, 968 + 227 = 1195, 1195 + 32 = 1227.  Hmm... ceci
  n'a pas l'air trop mal.  Mais ce n'est pas un multiple de huit, aussi
  arrondissons-le  1232.

  Des ennuis potentiels se profilent hlas  l'horizon car l'impulsion
  de synchronisation n'est plus situe juste au milieu de l'espace h -
  H.  Heureusement, grce  l'aide de notre calculette nous trouvons que
  1232 - 32 = 1200 est aussi un multiple de 8 et que (1232 - 32) - 968 =
  232, ce qui correspondrait  utiliser une impulsion de synchronisation
  d'une dure de 3.57 microsecondes, une valeur qui est encore
  raisonnable.

  En plus, 936 / 1232 ~ 0.76 ou 76%, ce qui ne s'loigne pas trop des
  80%, il ne devrait donc pas y avoir de problme.

  Qui plus est, l'usage de la longueur de trame horizontale prsente
  requiert de notre moniteur qu'il effectue sa synchronisation 
  52.7 kHz (= 65 MHz / 1232) ce qui se situe dans les limites de ses
  capacits.  Pas de problme.

  Sur base des rgles gnrales mentionnes plus haut, notre nouvelle
  rsolution verticale sera de 936 * 75% = 702.  Notre nouvelle longueur
  de trame verticale vaudra 702 * 1.05 = 737.

  Frquence de rafrachissement de l'cran = 65 MHz / (737 * 1232) =
  71.6 Hz.  Cette valeur est toujours excellente.

  La reprsentation de l'impulsion de synchronisation verticale est trs
  semblable :


     |___ __ __ __ __ __ __ __ __ __ __ __ __
     |_ _ _ _ _ _ _ _ _ _ _ _                |
     |_______________________|_______________|_____
     0                      VR              VFL     units : tics
                             ^   ^       ^
                             |   |       |
                             |<->|<----->|
                              VGT    VSP




  Nous commenons l'impulsion de synchronisation juste aprs la fin des
  cycles verticaux consacrs  l'affichage rel de donnes.  VGT est
  l'intervalle de scurit (_v_e_r_t_i_c_a_l _g_u_a_r_d _t_i_m_e) requis pour l'impulsion
  de synchronisation.  La plupart des moniteurs supportent sans broncher
  une valeur de VGT de 0 (pas d'intervalle de scurit) et nous tirerons
  parti de cette possibilit dans cet exemple.  Un petit nombre,
  cependant, ncessitent l'emploi d'un intervalle de scurit de 2 ou 3
  tics, et cela ne cause gnralement pas grand tort de les ajouter.

  Revenons  notre exemple : puisque, suivant la dfinition du concept
  de longueur de trame, un tic (ou cycle) vertical reprsente le temps
  ncessaire pour dessiner une trame HORIZONTALE complte, il s'ensuit
  dans notre exemple qu'il vaut 1232 / 65 MHz = 18.95 s.

  L'exprience prouve qu'une impulsion de synchronisation verticale
  devrait se situer quelque part entre 50 s et 300 s.  En guise
  d'illustration, prenons 150 s, ce qui correspond  8 tics d'horloge
  verticaux (150 s / 18.95 s ~ 8).

  Certains fabricants aiment mentionner leurs paramtres de tramage
  vertical sous forme de dure plutt que de largeur exprime en pixels.
  Vous pourriez chez eux rencontrer les termes suivants :


     dduurree uuttiillee ((VVAATT -- _V_e_r_t_i_c_a_l _A_c_t_i_v_e _T_i_m_e)
        Equivalent  VR, mais en millisecondes.  VAT * VSF = VR.

     dduurree ddee sseerrvviiccee ((VVBBTT -- _V_e_r_t_i_c_a_l _B_l_a_n_k_i_n_g _T_i_m_e)
        Equivalent  (VFL - VR), mais en millisecondes.  VBT * VSF =
        (VFL - VR).

     ffeennttrree aavvaanntt ((VVFFPP -- _V_e_r_t_i_c_a_l _F_r_o_n_t _P_o_r_c_h)
        Synonyme de VGT.

     dduurree ddee ssyynncchhrroonniissaattiioonn
        Synonyme de VSP.

     ffeennttrree aarrrriirree ((VVBBPP -- _V_e_r_t_i_c_a_l _B_a_c_k _P_o_r_c_h)
        Une seconde temporisation de scurit aprs l'impulsion de
        synchronisation verticale.  Souvent nulle.


  1111..  SSyynntthhssee


  La Table des Modes Vido du fichier Xconfig contient des squences de
  nombres, chaque ligne dfinissant de faon complte un mode opratoire
  du serveur X.  Les champs sont groups en quatre sections,  savoir
  respectivement le nom, la frquence pilote, les paramtres horizontaux
  et les paramtres verticaux.

  La section consacre au nom ne contient qu'un champ, le nom du mode
  vido dfini par le reste de la ligne.  Il sera fait rfrence  ce
  nom dans les lignes "Modes" de la section de configuration du pilote
  de carte graphique du fichier Xconfig.  Le champ nom peut tre omis si
  la valeur nom d'une ligne prcdente s'applique  la ligne courante.

  La section de la ligne de mode consacre  la frquence pilote ne
  contient que ce champ-l (c'est la quantit que nous avions baptise
  DCF).  La valeur place dans ce champ spcifie quelle frquence pilote
  a t utilise pour gnrer les valeurs des sections suivantes.

  La section des paramtres horizontaux se compose de quatre champs qui
  dfinissent comment chaque ligne horizontale de l'cran doit tre
  construite.  Le premier champ de la section contient le nombre de
  points par ligne qui seront illumins pour crer l'image (la quantit
  que nous avons appele HR).  Le second champ de la section (SH1)
  dcrit le point o commencera l'impulsion de synchronisation
  horizontale.  Le troisime champ (SH2) dcrit le point o se terminera
  cette impulsion de synchronisation.  Le quatrime champ dfinit la
  longueur de trame horizontale totale (HFL).

  La section des paramtres verticaux contient aussi quatre champs.  Le
  premier champ contient le nombre de lignes visibles qui apparatront
  sur l'cran (VR).  Le second champ (SV1) indique le numro de la ligne
  o commencera l'impulsion de synchronisation verticale.  Le troisime
  champ (SV2) dfinit le numro de ligne o se terminera cette impulsion
  de synchronisation.  Le quatrime champ contient la longueur de trame
  verticale totale (VFL).

  Exemple :


            #Nom de mode  horloge  valeurs horizontales  valeurs verticales

            "752x564"     40       752 784 944 1088      564 567 569 611
                          44.5     752 792 976 1240      564 567 570 600




  (Note : la version de base de X11R5 ne permet pas l'emploi de
  frquences pilotes fractionnaires.)

  Pour Xconfig, toutes les valeurs dont nous venons de parler - le
  nombre de points illumins sur une ligne, le nombre de points sparant
  ceux qui sont illumins du dbut de l'impulsion de synchronisation, le
  nombre de points reprsentant la dure de cette impulsion, et le
  nombre de points situs aprs la fin de l'impulsion de synchronisation
  - sont additionns pour fournir le nombre de points par ligne.  Le
  nombre de points horizontaux doit tre divisible par huit.

  Exemple de valeurs horizontales : 800 864 1024 1088

  Cette ligne exemplative comporte le nombre de points illumins (800)
  suivi par la coordonne horizontale du point o commence l'impulsion
  de synchronisation (864), suivi par la coordonne horizontale du point
  o finit cette impulsion (1024), suivi par la coordonne horizontale
  du dernier point sur la ligne (1088).

  Remarquez en plus que chacune des valeurs horizontales (800, 864,
  1024, et 1088) sont divisibles par huit !  Les valeurs verticales ne
  sont pas frappes de la mme exigence.

  Le nombre de lignes comprises entre le sommet de la zone affichable et
  le bas de celle-ci compose la trame.  Le signal d'horloge de base, en
  ce qui concerne la trame, est la ligne.  Un certain nombre de lignes
  composeront l'image.  Aprs que la dernire ligne illumine ait t
  affiche, un dlais correspondant  un nombre prcis de lignes sera
  respect avant que l'impulsion de synchronisation verticale soit
  mise.  Cette impulsion durera alors pour quelques lignes, et
  finalement les dernires lignes de la trame, correspondant au dlais
  requis aprs l'impulsion, seront traces.  Les valeurs qui dfinissent
  ce mode opratoire sont fournies d'une manire semblable  l'exemple
  suivant.

  Exemple de valeurs verticales : 600 603 609 630

  Cet exemple dfinit une image compose de 600 lignes visibles, o
  l'impulsion de synchronisation verticale dbute sur la 603me ligne et
  se termine sur la 609me, et compose d'un total global de 630 lignes.

  Remarquez que les valeurs verticales ne doivent pas ncessairement
  tre divisibles par huit !

  Revenons  l'exemple sur lequel nous travaillions.  Suivant ce que
  nous venons d'exposer, tout ce qu'il nous reste  faire est de placer
  nos rsultats dans le fichier Xconfig selon le format suivant :



       <nom>   DCF     HR  SH1 SH2   HFL   VR  SV1 SV2 VFL




  o SH1 reprsente le tic de dbut de l'impulsion de synchronisation
  horizontale et SH2 son tic final ; de la mme manire, SV1 reprsente
  le tic initial de l'impulsion de synchronisation verticale et SV2 son
  tic final.

  Pour dfinir ces valeurs, souvenez-vous de la discussion relative  la
  magie noire et aux impulsions de synchronisation que nous avons tenue
  plus haut. SH1 est le point qui marque le front avant de l'impulsion
  de synchronisation horizontale ; donc, SH1 = HR + HGT1. SH2 reprsente
  le front arrire ; donc, SH2 = SH1 + HSP. De la mme manire, SV1 = VR
  + VGT (mais VGT vaut la plupart du temps 0) et SV2 = SV1 + VSP.



       #nom     frq.   valeurs horizontales   valeurs verticales   drapeau
       936x702  65      936 968 1200 1232      702 702 710 737




  Aucun drapeau (_f_l_a_g) spcial n'est ncessaire ici ; il s'agit d'un
  mode non-entrelac.  Maintenant nous avons rellement termin.


  1122..  UUssaaggee dduu mmoonniitteeuurr eenn ssuurrccaappaacciitt


  Il vous est _f_e_r_m_e_m_e_n_t _d__c_o_n_s_e_i_l_l_ de tenter d'imposer  votre moniteur
  l'usage d'une frquence de balayage suprieure s'il s'agit d'un
  moniteur  frquence fixe.  Votre cran peut tout simplement finir
  grill !  Avec un moniteur multi-frquences en surcapacit, il peut
  survenir des problmes potentiellement plus subtils, dont il est bon
  que vous soyez conscients.

  Par contre, utiliser une frquence pilote suprieure  la bande
  passante maximum du moniteur est relativement inoffensif. C'est le
  dpassement des frquences maximales de synchronisation qui est
  problmatique. Les moniteurs modernes ont des circuits de protection
  qui teignent l'cran aux frquences dangereuses, mais ne comptez pas
  trop dessus. En particulier, il y a des vieux moniteurs
  multifrquences (comme le Multisync II) qui n'utilisent qu'un
  transformateur horizontal.  Ces moniteurs n'offrent pas tellement de
  protection contre leur usage en surcapacit. Mme s'il y a forcment
  des circuits de rgulation haute tension (qui ne sont pas ncessaires
  dans un moniteur  frquences fixes), ils ne couvriront pas forcments
  tous les intervalles de frquences possibles, particulirement dans
  les modles bon march.  Il n'y a pas seulement des risques pour les
  circuits, mais cela risque aussi d'acclrer le vieillissement de la
  couche de phosphore, et d'augmenter la dose de radiation (dont les
  rayons X) mise par le moniteur.


  Cependant, la valeur qui est la source principale des problmes est la
  frquence d'oscillation (_s_l_e_w _r_a_t_e) - la "pente" des signaux vido - 
  la sortie de la carte graphique, et cela ne dpend normalement pas de
  la frquence pilote courante, mais (si le constructeur de votre carte
  se proccupe de ces questions) est li  la frquence pilote maximum
  supporte par la carte.

  Aussi, soyez prudents...


  1133..  UUttiilliissaattiioonn ddeess mmooddeess eennttrreellaaccss

  (Cette section est de en majeure partie  David Kastrup
  <mailto:dak@pool.informatik.rwth-aachen.de>)

  A une frquence pilote donne, un cran entrelac manifestera un effet
  de clignotement considrablement moins perceptible qu'un cran non-
  entrelac, si les circuits verticaux de votre moniteur sont capables
  de supporter cette frquence de faon stable.  C'est la raison pour
  laquelle ces modes entrelacs furent invents au dpart.

  Les modes entrelacs doivent leur mauvaise rputation au fait que leur
  qualit est infrieure au mode non-entrelac quivalent  la mme
  frquence de balayage verticale, VSF (celle qui est gnralement
  mentionne dans les publicits). Mais ils sont certainement d'une
  qualit suprieure  la mme frquence de balayage horizontale, et
  c'est l que se situent les limites dcisives de votre couple
  moniteur/carte graphique.

  A une _f_r__q_u_e_n_c_e _d_e _r_a_f_r_a__c_h_i_s_s_e_m_e_n_t donne (ou frquence de demi-
  trame, ou VSF) l'affichage entrelac manifestera un clignotement plus
  fort : un affichage entrelac  90 Hz sera d'une qualit infrieure 
  un affichage non-entrelac  90 Hz. Il ne ncessitera, cependant, que
  la moiti de la bande passante vido et la moiti de la frquence de
  balayage horizontale. Si vous le comparez  un mode non-entrelac  la
  mme frquence pilote et aux mmes frquences de balayage, vous le
  trouverez de loin suprieur : 45 Hz non-entrelac est intolrable.
  Avec 90 Hz entrelac, j'ai travaill des annes sur mon Multisync 3D
  ( 1024x768) et j'en suis tout  fait satisfait. J'ai l'impression
  qu'il vous faudrait au moins du 70 Hz non-entrelac pour atteindre un
  niveau de confort quivalent.

  Voici quelques lments auxquels il vous faudra prter attention,
  cependant : n'employez les modes entrelacs qu' des rsolutions
  leves, de sorte que les lignes illumines alternativement soient
  proches les unes des autres. Vous avez aussi la possibilit de jouer
  sur la largeur et la position de l'impulsion de synchronisation pour
  obtenir le positionnement des lignes le plus stable. Si des lignes
  successives sont claires et fonces, l'entrelacement va vous "sauter 
  la figure". J'utilise un programme qui emploie une configuration de
  points semblable pour l'arrire-plan d'un menu (il s'agit d'XCept --
  aucun autre programme  ma connaissance ne fait cela, heureusement).
  Je slectionne toujours un mode 800x600 avant d'utiliser XCept parce
  que cela fait rellement mal aux yeux autrement.

  Pour la mme raison, utilisez au moins des polices 100 dpi, ou toute
  autre police dont les barres horizontales font au moins deux lignes
  d'paisseur (dans le cas de hautes rsolutions, cela n'a pas de sens
  d'utiliser quoi que ce soit d'autre de toute faon).

  Et bien sr, n'utilisez jamais de mode entrelac si votre matriel est
  capable de supporter l'emploi d'un mode non-entrelac  la mme
  frquence de rafrachissement.

  Si, au contraire, vous remarquez qu' certaines rsolutions vous
  poussez soit le moniteur soit la carte graphique jusqu' ses limites,
  et que vous obtenez un clignotement dsagrable ou une image dlave
  (signe que vous saturez la bande passante disponible), peut-tre
  souhaiterez-vous essayer d'obtenir la mme rsolution par l'emploi
  d'un mode entrelac. Ceci bien sr n'a de sens que si le VSF de votre
  moniteur n'est pas encore proche de sa limite.

  La mise au point d'un mode entrelac est facile : procdez exactement
  comme pour un mode non-entrelac. Il suffit de prendre en compte deux
  lments supplmentaires : il vous faut un nombre total impair de
  lignes verticales (la dernire valeur de votre ligne de mode), et
  lorsque vous spcifiez le drapeau "Interlace", la frquence de trame
  verticale relle pour votre moniteur est double. Il faut que votre
  moniteur supporte une frquence de trame de 90 Hz si le mode que vous
  spcifiez semble tre du 45 Hz, le drapeau "Interlace" mis  part.

  En guise d'exemple, ceci est ma ligne de mode pour du 1024x768
  entrelac : mon Multisync 3D supporte jusqu' 90 Hz vertical et 38 kHz
  horizontal.



       ModeLine "1024x768" 45 1024 1048 1208 1248 768 768 776 807 Interlace




  Les deux limites sont pour ainsi dire atteintes avec ce mode. Mais si
  vous spcifiez le mme mode, en omettant simplement le drapeau
  "Interlace", vous vous situez toujours  la limite de la capacit
  horizontale du moniteur (et,  strictement parler, un poil en dessous
  de la limite infrieure de la frquence de balayage verticale), tandis
  que vous souffrirez d'un insupportable effet de clignotement de
  l'image.

  Quelques rgles de base : si vous avez mis au point un mode qui
  n'exploite que la moiti de la capacit verticale de votre moniteur,
  changez le nombre total de lignes en une valeur impaire et ajoutez le
  drapeau "Interlace". La qualit de l'image devrait s'en trouver
  grandement amliore dans la majorit des cas.

  Si vous utilisez un mode non-entrelac qui par ailleurs dpasse les
  spcifications de votre moniteur tandis que la frquence de balayage
  verticale se situe  30% ou plus en dessous du maximum support par
  votre cran, mettre au point manuellement un mode entrelac (qui
  offrira sans doute une rsolution lgrement suprieure) peut fournir
  de meilleurs rsultats, mais je ne peux rien promettre.


  1144..  QQuueessttiioonnss eett rrppoonnsseess


  Q. L'exemple prsent plus haut met en scne une taille d'cran non
  standard. Puis-je l'utiliser ?

  R. Pourquoi pas ?  Il n'y a absolument AUCUNE raison qui vous force 
  vous cantonner aux tailles habituelles 640x480, 800x600, ou mme
  1024x768.  Les serveurs XFree86 vous offrent normment de libert
  lors de la configuration de votre matriel.  Il faut gnralement deux
  ou trois essais pour obtenir la bonne.  L'objectif  garder en ligne
  de mire est une frquence de rafrachissement leve tout en
  conservant une zone affichable de taille raisonnable. Ne visez pas une
  rsolution leve si c'est au prix d'un clignotement qui vous ruinera
  les yeux !

  Q. Est-ce l la seule rsolution utilisable compte tenu d'une
  frquence pilote de 65 MHz et d'un HSF de 55 kHz ?
  R. Pas du tout !  Nous vous exhortons au contraire  suivre la
  procdure gnrale dcrite plus haut et  vous livrer  quelques
  expriences afin d'obtenir une configuration qui vous plaise
  rellement.  Vous livrer  ces expriences peut vous apporter
  normment de plaisir.  La plupart des configurations risquent de ne
  produire qu'une horrible neige, mais en pratique un cran moderne
  multi-frquences n'est pas si facile  endommager.  Soyez sr,
  cependant, que votre moniteur peut supporter la frquence de trame que
  vous voulez lui infliger avant de l'utiliser pour un temps
  considrable.

  Mais mfiez-vous des moniteurs  frquence fixe !  Ce type de
  manipulations hasardeuses peut les endommager trs rapidement. Soyez
  sr que vous utilisez une frquence de rafrachissement supporte lors
  de _c_h_a_q_u_e tentative.

  Q. Vous n'avez fait mention que de deux rsolutions standard. Dans le
  fichier Xconfig, de nombreuses rsolutions standard sont disponibles.
  Pouvez-vous me dire s'il y a une raison pour moi de chipoter avec les
  valeurs de synchronisation ?

  R. Tout  fait !  Prenez par exemple le "standard" 640x480 mentionn
  dans le fichier Xconfig actuel.  Il exploite une frquence pilote de
  25 Mhz, les longueurs de trame sont de 800 et 525 ce qui nous donne
  une frquence de rafrachissement d'environ 59.5 Hz. Pas trop mal.
  Mais 28 MHz est une frquence pilote gnralement disponible sur
  nombre de cartes SVGA.  Si vous utilisiez celle-ci pour gnrer du
  640x480, suivant la procdure illustre plus haut, vous obtiendriez
  des longueurs de trame de 812 (arrondi  808) et 505.  La frquence de
  rafrachissement est maintenant porte  68 Hz, ce qui reprsente une
  amlioration significative par rapport  la configuration standard.

  Q. Pourriez-vous rsumer ce qui a t expos jusqu'ici ?

  R. En bref :

  1. pour toute frquence pilote donne, une augmentation de la
     rsolution maximum se paye par une diminution de la frquence de
     rafrachissement, ce qui induira un effet de clignotement accru.

  2. si l'obtention d'une rsolution leve s'avre ncessaire et si
     votre moniteur la supporte, essayez de vous procurer une carte SVGA
     qui fournisse une frquence pilote (ou DCF) compatible. Plus elle
     est leve, meilleur sera le rsultat !


  1155..  RRssoouuddrree lleess pprroobbllmmeess aaffffeeccttaanntt ll''iimmaaggee


  OK, ainsi donc vous disposez maintenant des valeurs ncessaires  la
  configuration de X.  Vous les avez places dans votre fichier Xconfig,
  en choisissant pour le mode un champ "nom" qui l'identifie comme un
  test.  Vous dmarrez X, vous utilisez les touches d'accs rapide pour
  sauter au nouveau mode, ... et l'image ne semble pas correcte.  Que
  faites-vous ?  Ci-dessous se trouve une liste de distorsions d'image
  vido frquentes et la faon d'y remdier.

  (Rsoudre ces distorsions mineures est rellement la situation o
  xxvviiddttuunnee(1) brillera de tous ses feux.)

  Vous _d__p_l_a_c_e_r_e_z l'image en modifiant les coordonnes temporelles de
  l'impulsion de synchronisation.  Vous _a_g_i_r_e_z _s_u_r _s_a _t_a_i_l_l_e en jouant
  sur la longueur de trame (n'oubliez pas de dplacer l'impulsion de
  synchronisation en consquence, de faon  la maintenir  la mme
  position relative, sinon altrer la taille de l'image dplacera aussi
  celle-ci).  Voici quelques recettes plus spcifiques :
  Les positions horizontale et verticale sont indpendantes.  Par cela,
  nous entendons que dplacer l'image horizontalement n'affecte pas sa
  position verticale, et rciproquement.  Cependant, il n'en va pas tout
   fait de mme pour la taille.  Alors que le fait de modifier la
  taille horizontale n'affecte en rien la dimension verticale et vice
  versa, la quantit globale de changement qui peut tre apport dans
  les deux directions peut tre limit.  En particulier, si votre image
  est trop large dans les deux sens il vous faudra probablement adopter
  une frquence pilote plus leve pour la faire rtrcir.  Dans la
  mesure o cela se traduira par une augmentation de la rsolution
  utilisable, c'est rarement un problme !


  1155..11..  LL''iimmaaggee eesstt ddcceennttrree vveerrss llaa ggaauucchhee oouu llaa ddrrooiittee

  Pour y remdier, dplacez l'impulsion de synchronisation horizontale.
  C'est--dire, incrmentez ou dcrmentez (par un multiple de 8) les
  deux valeurs mdianes de la section des donnes horizontales qui
  dterminent les limites antrieure et postrieure de l'impulsion de
  synchronisation horizontale.

  Si l'image est dcentre vers la gauche (la marge droite tant trop
  large, vous souhaitez faire glisser l'image vers la droite)
  dcrmentez les valeurs.  Si l'image est dcentre vers la droite
  (marge gauche trop large, vous voulez faire glisser l'image vers la
  gauche) incrmentez les coordonnes de l'impulsion de synchronisation.


  1155..22..  LL''iimmaaggee eesstt ddcceennttrree vveerrss llee hhaauutt oouu llee bbaass

  Pour rsoudre ce problme, dplacez l'impulsion de synchronisation
  verticale.  A savoir, incrmentez ou dcrmentez les deux valeurs
  mdianes de la section des donnes verticales qui dterminent les
  limites antrieure et postrieure de l'impulsion de synchronisation
  verticale.

  Si l'image est dcentre vers le haut (marge infrieure trop large,
  vous souhaitez faire glisser l'image vers le bas) dcrmentez les
  valeurs.  Si l'image est dcentre vers le bas (marge suprieure trop
  large, vous souhaitez faire glisser l'image vers le haut) incrmentez
  les valeurs.


  1155..33..  LL''iimmaaggee eesstt ttrroopp ggrraannddee ddaannss lleess ddeeuuxx ddiirreeccttiioonnss

  Passez  une frquence d'horloge suprieure sur la carte. Si vous
  disposez de nombreux modes diffrents dans votre fichier de
  configuration, il est possible que l'un de ceux qui exploitent une
  frquence infrieure ait t activ par erreur.


  1155..44..  LL''iimmaaggee eesstt ttrroopp llaarrggee ((oouu ttrroopp ttrrooiittee)) hhoorriizzoonnttaalleemmeenntt

  Pour remdier  cela, augmentez (ou diminuez) la longueur de trame
  horizontale.  C'est--dire, modifiez la quatrime valeur de la
  premire section des coordonnes temporelles.  Pour viter de dplacer
  l'image par la mme occasion, dplacez aussi l'impulsion de
  synchronisation (deuxime et troisime valeurs) de la moiti de la
  diffrence, de faon  la conserver  la mme position relative.


  1155..55..  LL''iimmaaggee eesstt ttrroopp ggrraannddee ((oouu ttrroopp ppeettiittee)) vveerrttiiccaalleemmeenntt

  Pour rsoudre ce problme, augmentez (ou diminuez) la longueur de
  trame verticale.  C'est--dire, modifiez la quatrime valeur dans la
  deuxime section des coordonnes temporelles.  Pour viter de dplacer
  l'image, n'oubliez pas de dplacer aussi l'impulsion de
  synchronisation (deuxime et troisime valeurs) de la moiti de la
  diffrence, pour la garder  la mme position relative.

  Toute distorsion qui ne peut tre limine en combinant ces techniques
  est probablement la preuve d'un problme plus profond, comme une
  erreur dans les calculs ou une frquence pilote suprieure aux limites
  du moniteur.

  En dernier lieu, souvenez-vous que si vous augmentez l'une des
  longueurs de trame, vous diminuerez du mme coup votre frquence de
  rafrachissement, et rciproquement.

  Occasionnellement, vous pouvez corriger les petites distorsions
  d'image en jouant sur les rglages de votre moniteur. Le dfaut de
  cette mthode est que si vous vous loignez trop des rglages d'usine
  pour rgler les problmes du mode graphique, vous pouvez vous
  retrouver avec une image inutilisable en mode texte. Il vaut mieux
  rgler vos lignes de modes.


  1166..  RReepprrsseennttaattiioonn ggrraapphhiiqquuee ddeess ccaappaacciittss dduu mmoonniitteeuurr


  Pour tracer le diagramme d'un mode moniteur, il vous faudra le
  programme gnuplot (un langage libre de trac graphique pour plate-
  formes de type UNIX) et l'outil modeplot, un fichier de commandes
  shell/gnuplot qui tracera le diagramme sur base des caractristiques
  de votre moniteur, fournies comme options sur la ligne de commande.

  Ci-dessous se trouve une copie de modeplot :



































  #!/bin/sh
  #
  # modeplot -- cre un graphe X des modes moniteurs disponibles
  #
  # Invoquez `modeplot -?' pour afficher les options de contrle.
  #

  # Description du moniteur. Bande passante en MHz, frquences horizontales
  # en kHz et frquences verticales en Hz.
  TITLE="Viewsonic 21PS"
  BANDWIDTH=185
  MINHSF=31
  MAXHSF=85
  MINVSF=50
  MAXVSF=160
  ASPECT="4/3"
  vesa=72.5       # frq. de rafrachissement min. recommande VESA

  while [ "$1" != "" ]
  do
          case $1 in
          -t) TITLE="$2"; shift;;
          -b) BANDWIDTH="$2"; shift;;
          -h) MINHSF="$2" MAXHSF="$3"; shift; shift;;
          -v) MINVSF="$2" MAXVSF="$3"; shift; shift;;
          -a) ASPECT="$2"; shift;;
          -g) GNUOPTS="$2"; shift;;
          -?) cat <<EOF
  options de contrle de modeplot :

  -t "<description>"  nom du moniteur            dfaut : "Viewsonic 21PS"
  -b <nn>                 bande passante en MHz      dfaut : 185
  -h <min> <max>          HSF min & max (kHz)        dfaut : 31 85
  -v <min> <max>          VSF min & max (Hz)         dfaut : 50 160
  -a <aspect ratio>       proportions de l'image     dfaut : 4/3
  -g "<options>"      options  transmettre  gnuplot

  La prsence des paramtres -b, -h et -v est requise, -a, -t, -g sont
  optionnels.  Vous pouvez utiliser -g pour transmettre un nom de
  priphrique  gnuplot de faon  ce que (par exemple) les sorties
  produites par modeplot puissent tre rediriges vers une imprimante.
  Voyez gnuplot(1) pour de plus amples dtails.

  L'outil modeplot a t conu par Eric S. Raymond <esr@thyrsus.com> sur
  base d'une analyse et d'un code original par Martin Lottermoser
  <Martin.Lottermoser@mch.sni.de>

  Voici modeplot $Revision: 1.13 $
  EOF
                  exit;;
          esac
          shift
  done

  gnuplot $GNUOPTS <<EOF
  set title "$TITLE Mode Plot"

  # Nombres magiques.  Malheureusement, le graphe est trs sensible  toute
  # modification de ceux-ci, et ils pourraient tre loin de la vrit dans
  # le cas de certains moniteurs.  Il nous faut dterminer des valeurs afin
  # d'obtenir mme une approximation du diagramme de mode. Ces valeurs
  # proviennent d'une comparaison de nombreux exemples fournis dans la base
  # de donnes ModeDB.
  F1 = 1.30       # facteur de conversion rsol. horiz. -> largeur de trame
  F2 = 1.05       # facteur de conversion rsol. vertic. -> hauteur de trame

  # Dfinition de fonctions
  # (multiplier par 1.0 force l'arithmtique en nombres rels)
  ac = (1.0*$ASPECT)*F1/F2
  refresh(hsync, dcf) = ac * (hsync**2)/(1.0*dcf)
  dotclock(hsync, rr) = ac * (hsync**2)/(1.0*rr)
  resolution(hv, dcf) = dcf * (10**6)/(hv * F1 * F2)

  # Place les lgendes le long des axes
  set xlabel 'DCF (MHz)'
  set ylabel 'RR (Hz)' 6  # Place la lgende juste au-dessus de l'axe des Y

  # Gnre le diagramme
  set grid
  set label "VB" at $BANDWIDTH+1, ($MAXVSF + $MINVSF) / 2 left
  set arrow from $BANDWIDTH, $MINVSF to $BANDWIDTH, $MAXVSF nohead
  set label "max VSF" at 1, $MAXVSF-1.5
  set arrow from 0, $MAXVSF to $BANDWIDTH, $MAXVSF nohead
  set label "min VSF" at 1, $MINVSF-1.5
  set arrow from 0, $MINVSF to $BANDWIDTH, $MINVSF nohead
  set label "min HSF" at dotclock($MINHSF, $MAXVSF+17), $MAXVSF + 17 right
  set label "max HSF" at dotclock($MAXHSF, $MAXVSF+17), $MAXVSF + 17 right
  set label "VESA $vesa" at 1, $vesa-1.5
  set arrow from 0, $vesa to $BANDWIDTH, $vesa nohead # style -1
  plot [dcf=0:1.1*$BANDWIDTH] [$MINVSF-10:$MAXVSF+20] \
    refresh($MINHSF, dcf) notitle with lines 1, \
    refresh($MAXHSF, dcf) notitle with lines 1, \
    resolution(640*480,   dcf) title "640x480  " with points 2, \
    resolution(800*600,   dcf) title "800x600  " with points 3, \
    resolution(1024*768,  dcf) title "1024x768 " with points 4, \
    resolution(1280*1024, dcf) title "1280x1024" with points 5, \
    resolution(1600*1280, dcf) title "1600x1200" with points 6

  pause 9999
  EOF



  Une fois que vous tes sr d'avoir correctement install modeplot et
  le programme gnuplot, il vous faudra runir les caractristiques
  suivantes de votre moniteur :


    bande passante vido (VB)

    gamme de frquences de synchronisation horizontale (HSF)

    gamme de frquences de synchronisation verticale (VSF)

  Le programme de trac doit faire quelques suppositions
  simplificatrices qui ne sont pas ncessairement correctes.  C'est la
  raison pour laquelle le diagramme rsultant n'est qu'une description
  relativement grossire. Ces suppositions sont les suivantes :


  1. Toutes les rsolutions n'ont qu'un seul rapport de proportions
     prdfini AR = HR/VR.  Les rsolutions standard ont AR = 4/3 ou AR
     = 5/4.  Le programme modeplot suppose 4/3 par dfaut, Mais il vous
     est possible de modifier cela.

  2. Pour les modes pris en compte, les longueurs de trames horizontale
     et verticale sont des multiples fixs des rsolutions horizontale
     et verticale, respectivement :




          HFL = F1 * HR
          VFL = F2 * VR




  En premire approximation, prenez F1 = 1.30 et F2 = 1.05 (voyez la
  section ``Calcul de la taille de trame'').

  Maintenant considrez une frquence de synchronisation particulire,
  HSF.  Sur base des prsupposs que nous venons de mentionner, la
  valeur que prendra la frquence pilote DCF dterminera dj la
  frquence de rafrachissement RR, c'est--dire que pour toute valeur
  de HSF il y a une fonction RR(DCF).  Celle-ci peut s'obtenir comme
  suit.

  La frquence de rafrachissement est gale  la frquence pilote
  divise par le produit des longueurs de trame :



               RR = DCF / (HFL * VFL)          (*)




  D'autre part, la longueur de trame horizontale est gale  la
  frquence pilote divise par la frquence de synchronisation
  horizontale :



               HFL = DCF / HSF                 (**)




  Il est possible de rduire VFL  HFL au moyen des deux suppositions
  mentionnes plus haut :



               VFL = F2 * VR
                   = F2 * (HR / AR)
                   = (F2/F1) * HFL / AR        (***)




  En insrant (**) et (***) dans (*) nous obtenons :



               RR = DCF / ((F2/F1) * HFL**2 / AR)
                  = (F1/F2) * AR * DCF * (HSF/DCF)**2
                  = (F1/F2) * AR * HSF**2 / DCF




  Pour des valeurs fixes de HSF, F1, F2 et AR, cette formule se traduit
  par une hyperbole dans notre diagramme.  Si nous traons deux courbes
  de ce type pour les frquences de synchronisation horizontale minimum
  et maximum nous obtenons les deux limites restantes de la rgion des
  solutions permises.

  Les lignes droites qui traversent la rgion des capacits reprsentent
  des rsolutions particulires. Ceci est bas sur (*) et la deuxime
  supposition :



               RR = DCF / (HFL * VFL) = DCF / (F1 * HR * F2 * VR)




  En traant ainsi des droites pour chacune des rsolutions qui vous
  intressent, vous pourrez immdiatement extraire du graphe les
  relations possibles entre rsolution, frquence pilote et frquence de
  rafrachissement dont le moniteur est capable. Remarquez que ces
  lignes ne dpendent pas des caractristiques relles du moniteur, mais
  bien de notre seconde supposition.

  L'outil modeplot vous offre une manire trs simple de faire cela.
  Tapez modeplot -? pour afficher ses options de contrle. Une
  invocation usuelle ressemble  ceci :



               modeplot -t "Swan SW617" -b 85 -v 50 90 -h 31 58




  Le paramtre -b spcifie la bande passante vido ; -v et -h
  dfinissent les gammes de frquences de synchronisation horizontale et
  verticale.

  Lorsque vous consulterez le graphique produit par modeplot, conservez
  toujours prsent  l'esprit le fait qu'il n'offre qu'une description
  approximative. Par exemple, il ignore les limitations imposes  HFL
  dues  ce qu'une largeur d'impulsion de synchronisation minimum est
  requise, et sa prcision ne peut dpasser celle de nos suppositions.
  Il ne peut ds lors remplacer un calcul dtaill (incluant une
  certaine dose de magie noire) tel celui que nous avons prsent dans
  la section ``Synthse''. Il devrait, cependant, vous offrir une
  meilleure perception de ce qui est possible et des concessions que
  cela implique.


  1177..  CCrrddiittss


  L'anctre primordial de ce document est d  Chin Fang
  <mailto:fangchin@leland.stanford.edu>

  Eric S. Raymond <mailto:esr@snark.thyrsus.com> a retravaill,
  rorganis, et largement r-crit l'original de Chin Fang dans le but
  de le comprendre.  Au cours de cette opration, il y a inclus la plus
  grande part d'un autre Howto crit par Bob Crosson
  <mailto:crosson@cam.nist.gov>.

  Les informations consacres aux modes entrelacs sont en grande partie
  des  David Kastrup <mailto:dak@pool.informatik.rwth-aachen.de>

  Nicholas Bodley <mailto:nbodley@alumni.princeton.edu> a corrig et
  clarifi la section sur le fonctionnement des crans.

  Payne Freret <mailto:payne@freret.org> a corrig quelques erreurs
  mineures sur la conception des moniteurs.

  Martin Lottermoser <mailto:Martin.Lottermoser@mch.sni.de> a apport
  l'ide d'utiliser gnuplot pour gnrer des diagrammes de mode et a
  ralis l'analyse mathmatique qui soutend modeplot.  La version de
  modeplot telle qu'elle est actuellement distribue a t repense et
  gnralise par ESR  partir du code gnuplot original de Martin pour
  un cas prcis.




























































  The Linux 3Dfx HOWTO
  Bernd Kreimeier (bk@gamers.org)
  v1.03, 12 Luglio 1997

  Questo documento descrive il supporto del chip acceleratore grafico
  3Dfx per Linux. Elenca l'hardware supportato, descrive come configu
  rare i driver e risponde alle domande pi frequenti. Lo scopo  quello
  di portare i nuovi utenti al successo il pi velocemente possibile e
  di ridurre cos il traffico nei newsgroup e nelle mailing list Usenet.
  Documentazione tradotta da Piero Boato (pboato@dsi.unive.it).

  1.  Introduzione

  Questo  il Linux 3Dfx HOWTO. Vuole essere una rapida guida su tutto
  quello che c' da sapere per installare e configurare il supporto per
  3Dfx sotto Linux. Qui si trovano le risposte alle domande pi
  frequenti sia riguardo lo specifico supporto per 3Dfx sia riguardo la
  grafica 3D sotto Linux in generale. Inoltre ci sono alcuni riferimenti
  ad altre fonti di informazione su svariati argomenti collegati alla
  grafica 3D generata a computer da acceleratori hardware.

  Queste informazioni sono valide solo per Linux installato su
  piattaforme Intel. Alcune informazioni possono essere applicabili
  anche su altre architetture, ma non ho esperienza o informazioni
  dirette. Sono da applicare solamente su schede basate sulla tecnologia
  3Dfx, ogni altro acceleratore grafico non rientra nel contesto di
  questa documentazione.

  1.1.  Riconoscimenti

  La maggior parte delle informazioni contenute in questa documentazione
  sono state fornite dalle persone coinvolte nella trasposizione della
  Glide per Linux e nel suo processo di beta test. Daryll Strauss ha
  fatto la trasposizione, Paul J. Metzger ha modificato il driver Mesa
  Voodoo (scritto da David Bucciarelli) per Linux, Brian Paul lo ha
  integrato con la sua famosa libreria Mesa. Riguardo alla Mesa
  accelerata per Voodoo Graphics (tm) un ringrazziamento particolare va
  a Henri Fousse e Charlie Wallace. La gente alla 3Dfx, in particolar
  modo Gary Sanders e Gary McTaggart, ha fornito molto materiale, come
  ha fatto Ross Q. Smith della Quantum3D.

  Grazie al pacchetto SGML-Tools (conosciuto anche come Linuxdoc-SGML),
  questo HOWTO  disponibile in diversi formati, tutti generati dallo
  stesso file sorgente. Per informazioni sull'SGML-Tools vedi la sua
  homepage all'indirizzo web.inter.NL.net/users/C.deGroot/sgmltools/.

  3Dfx, il logo 3Dfx Interactive, Voodoo Graphics (tm), e Voodoo Rush
  (tm) sono marchi registrati dalla 3Dfx Interactive, Inc. Glide, TexUS,
  Pixelfx e Texelfx sono marchi registrati dalla 3Dfx Interactive, Inc.
  OpenGL  un marchio registrato dalla Silicon Graphics. Obsidian  un
  marchio registrato dalla Quantum3D. Gli altri nomi di prodotti sono
  marchi registrati dai rispettivi proprietari e con ci sono da
  considerarsi propriamente riconosciuti.

  1.2.  Storia delle Revisioni


     Versione 1.03
        Prima versione resa pubblica.


  1.3.  Nuove Versioni di Questa Documentazione

  Puoi trovare la versione pi aggiornata di questa documentazione
  presso www.gamers.org/dEngine/xf3D/.

  Le nuove versioni di questa documentazione verranno postate nel
  newsgroup comp.os.linux.answers. Inoltre saranno depositate in vari
  siti per l'ftp anonimo che archiviano questo tipo di informazioni come
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/.

  Le versioni ipertestuali di questo e di altri Linux HOWTO sono
  disponibili su molti siti World-Wide-Web, compreso
  sunsite.unc.edu/mdw/mdw.html. La maggior parte delle distribuzioni di
  Linux su CD-ROM includono gli HOWTO, spesso nella directory /usr/doc/,
  inoltre presso alcuni rivenditori si pu acquistarne una copia
  stampata.

  Se si fa una traduzione di questo documento in un'altra lingua, me lo
  si faccia sapere che accenner qui alla sua esistenza.

  1.4.  Commenti e Correzioni

  Confido in te, lettore, per far s che questo HOWTO sia utile. Se si
  hanno suggerimenti, correzioni o commenti, per piacere me li si
  spedisca (bk@gamers.org), e io cercher di inserirli nella prossima
  revisione. Per piacere si aggiunga HOWTO 3Dfx al soggetto della
  lettera, cos procmail lo scaricher nell'apposita cartella.

  Prima di mandare bug report o domande, per favore si legga per intero
  questo HOWTO e si inviino informazioni dettagliate sul problema.

  Se si publica questa documentazione in un qualche CD-ROM o in altro
  supporto fisico,  sar apprezzata una copia in omaggio. Mi si scriva
  per il mio indirizzo postale. Inoltre si consideri la possibilit di
  una donazione al Linux Documentation Project come contributo al
  mantenimento della documentazione gratuita per Linux. Per maggiori
  informazioni si contatti il coordinatore dei Linux HOWTO, Greg Hankins
  (gregh@sunsite.unc.edu).

  1.5.  Politica di Distribuzione

  Copyright (C) 1997 Bernd Kreimeier.

  Questo HOWTO  una documentazione gratuita; si pu ridistribuirlo e/o
  modificarlo secondo le specifiche della GNU General Public License
  publicata dalla Free Software Foundation; presenti nella versione 2
  della License, o (a scelta) in qualche versione seguente.

  Questa documentazione viene distribuita nella speranza che possa
  essere utile, ma senza alcuna garanzia; senza anche l'implicita
  garanzia di commerciabilit o di adeguatezza ad uno scopo particolare.
  Si veda la GNU General Public License per maggiori particolari.

  Si pu ottenere una copia della GNU General Public License scrivendo
  alla Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
  02139, USA.


  2.  Tecnologia degli Acceleratori Grafici

  2.1.  Principi

  Questa sezione descrive molto velocemente la tecnologia degli
  acceleratori grafici per computer, in modo da aiutare a capire i
  concetti usati in seguito. Se se ne vuole sapere di pi si pu
  consultare un libro su OpenGL.

  Fondamentalmente, la grafica 3D su computer richiede spesso un gran
  numero di calcoli per ogni singolo pixel dello schermo. Questo  vero
  soprattutto per quelle applicazioni che devono rappresentare un mondo
  poligonale nei vari frame di un'animazione interattiva. Anche a basse
  risoluzioni come 320x200, ci richiede una capacit di calcolo
  superiore a quella che pu essere fornita anche dal PC pi potente.

  Per superare questo collo di bottiglia, alcune societ hanno
  progettato, costruito e venduto processori dedicati alle operazioni
  necessarie per la grafica 3D. Purtroppo praticamente nessuno dei
  produttori di schede ha finora offerto alcun supporto per Linux.
  Fortunatamente, il produttore dei chipset Voodoo Graphics (tm) e
  Voodoo Rush (tm), 3Dfx, ha deciso di supportare l'uso delle schede
  basate sul Voodoo Graphics (tm) con Linux. Ci che si prefigge questa
  documentazione  di descrivere il supporto attualmente disponibile.

  2.2.  Configurazioni Hardware (Add-on)

  Gli acceleratori grafici si trovano in formati diversi: o come schede
  PCI capaci di passare attraverso il segnale video di una scheda VGA
  (possibilmente un acceleratore 2D o video), o come schede PCI che
  generano grafica sia VGA sia 3D (rimpiazzando totalmente il vecchio
  controller VGA). Le schede 3Dfx basate sul Voodoo Graphics (tm)
  appartengono alla prima categoria. Entreremo nel merito in seguito.

  Se non ci sono conflitti hardware, qualsiasi scheda acceleratrice pu
  essere presente sotto Linux senza interferire, ma per accedere
  all'acceleratore, si deve disporre di un driver.

  2.3.  Limiti di Prestazioni

  2.3.1.  Limiti di fill rate

  La grafica accelerata dall'hardware  limitata nelle prestazioni per
  diversi motivi. Un tipico collo di bottiglia  il fill rate: il numero
  totale di pixel che l'hardware pu generare in condizioni ottimali in
  un determinato tempo - ad es. circa 40 Mpixel/secondo. Data una
  risoluzione di 640x480 e nessuna sovrascrittura, l'hardware non pu
  generare pi di 130 frame/secondo.

  Il numero di sovrascritture dipende dall'attuale profondit della
  scena (quanti poligoni interseca un raggio passante per un pixel) e
  dall'efficienza dell'algoritmo di determinazione delle superfici
  visibili usato dall'applicazione. Disegnare ogni pixel due volte
  significa 65 frame/secondo, una sovrascrittura pari a 2 (disegnare
  ogni pixel tre volte) ti porta a circa 43 frame/secondo.

  2.3.2.  Perdita di refresh

  Inoltre, probabilmente si utilizzeranno due buffer, invertendo il
  buffer in primo piano con quello nascosto non appena il frame 
  completato. Qui entra in gioco la velocit di refresh del monitor: si
  pu invertire i buffer soltanto durante il periodo di refresh. Se la
  propria applicazione salta un periodo di refresh a 60Hz ad ogni frame,
  il frame rate effettivo scender a 30Hz (un frame ogni due refresh).
  Perdere due periodi di refresh porter a 20Hz.

  2.3.3.  Limiti di primitive

  Se la propria scena non  molto dettagliata (solo pochi poligoni, ma
  molto grandi, con molte sovrascritture), l'applicazione sar
  probabilmente limitata dal fill rate -  possibile fornire altre
  primitive (linee, triangoli, poligoni) all'hardware, ma la generazione
  dei pixel non pu essere in alcun modo accelerata.

  Invece, se la propria applicazione rappresenta un infinit di piccoli
  triangoli o poligoni, probabilmente ci si ritrover limitati dalla
  generazione delle primitive. Dato una banda passante del PCI di 33MHz
  per 32bit, o 132 MB/sec, e un pacchetto di dati per triangolo di 3
  vertici (9 coordinate, ognuna a 16bit, pi 3 colori, ognuno a 24bit),
  e un frame rate di 20Hz, si potranno trasferire circa 240K
  triangoli/frame - senza contare i dati delle texture, gli accessi al
  disco e le altre operazioni.

  2.4.  Caratteristiche dell'Accelerazione Hardware

  Le operazioni di rendering solitamente supportate dagli acceleratori
  hardware che si rispettino sono:

    Texture mapping con correzione prospettica

    Alpha-blending, Nebbia

    Anti-aliasing

    Filtering bi-lineare delle texture

    Livello di dettaglio (LOD) MIP mapping

    Correzione a livello sub-pixel

    Ombreggiatura Gouraud basata sui poligoni e modulazione delle
     texture

    Double buffering

    Buffering di profondit, stencil buffer

  Solitamente, l'hardware permette un aumento della risoluzione dello
  schermo (dato che il rendering esclusivamente software  limitato a
  320x200 pixel per i frame rate interattivi), il filtraggio avanzato,
  la traslucenza reale del canale alpha, e l'uso di frame buffer a
  colori reali a 16bpp o 24bpp.

  2.5.  Cenni sull'Architettura Voodoo Graphics (tm)

  Solitamente, il maggior collo di bottiglia si riscontra nell'accesso
  alla memoria delle texture e ai buffer di profondit e dei fotogrammi.
  Per ogni pixel nello schermo, ci sono almeno uno (mappatura in
  vicinanza), quattro (bi-lineare) o otto (tri-lineare) accessi in
  lettura alla memoria delle texture, pi una lettura/scrittura al
  buffer di profondit e una lettura/scrittura al buffer dei fotogrammi.

  L'architettura Voodoo Graphics (tm) separa la memoria delle texture da
  quella dei buffer dei fotogrammi e di profondit suddividendo il
  rendering in due stadi separati, con due unit distinte (il pixelfx e
  il texelfx), ognuna con il proprio collegamento alla memoria
  corrispondente. Questo permette un fill rate superiore alla media, a
  discapito della gestione della memoria (p.es. la memoria dedicata ai
  frame non utilizzata non pu essere usata per il caching delle
  texture).

  Inoltre, un Voodoo Graphics (tm) pu usare due TMU (unit di gestione
  delle texture o texelfx), ed infine, due Voodoo Graphics (tm) possone
  essere collegati per accedere allo stesso RAMDAC con un meccanismo
  chiamato Scan-Line Interleaving (SLI). In parole povere SLI significa
  che ogni pixelfx disegna una riga di schermo ogni due, il che riduce
  l'impatto della banda passante sulla memoria destinata ai frame di
  ogni pixelfx.

  3.  Installazione

  Configurare Linux per supportare gli acceleratori 3Dfx richiede i
  seguenti passi:


  1. Installare la scheda.

  2. Installare la distribuzione Glide.

  3. Compilare, linkare e/o lanciare le applicazioni.

  Le sezioni seguenti trattano ognuno di questi passi in dettaglio.

  3.1.  Installare la Scheda

  Per installare l'hardware si seguano le istruzioni del produttore o o
  lo si lasci fare al rivenditore. Non dovrebbe essere necessario
  modificare le impostazioni degli IRQ o del canale DMA, dato che il
  Plug&Pray (tm) o quelle predefinite dalla fabbrica dovrebbero
  funzionare. Le schede add-on qui descritte sono dispositivi mappati in
  memoria e non usano IRQ. L'unico tipo di conflitto da evitare  la
  sovrapposizione di memoria con altri dispositivi.

  Dato che 3Dfx non sviluppa o vende nessuna scheda direttamente, 
  inutile contattarla per qualche problema.

  3.1.1.  Risoluzione dei problemi di installazione hardware

  Per verificare l'installazione e la mappatura della memoria, si esegua
  cat /proc/pci. L'output dovrebbe contenere qualcosa come

  ______________________________________________________________________
    Bus  0, device  12, function  0:
      VGA compatible controller: S3 Inc. Vision 968 (rev 0).
        Medium devsel.  IRQ 11.
        Non-prefetchable 32 bit memory at 0xf4000000.

    Bus  0, device   9, function  0:
      Multimedia video controller: Unknown vendor Unknown device (rev 2).
        Vendor id=121a. Device id=1.
        Fast devsel.  Fast back-to-back capable.
        Prefetchable 32 bit memory at 0xfb000000.
  ______________________________________________________________________


  per una Diamond Monster 3D affiancata ad una Diamond Stealth-64.
  Inoltre un cat /proc/cpuinfo /proc/meminfo pu essere utile per sco
  vare un conflitto e/o mandare un bug report.

  Con i kernel attuali, probabilmente si avr un avviso in fase di boot
  simile a questo

  ______________________________________________________________________
  Jun 12 12:31:52 hal kernel: Warning : Unknown PCI device (121a:1).
  Please read include/linux/pci.h
  ______________________________________________________________________


  che pu essere tranquillamente ignorato. Se si ha una scheda non molto
  comune o si incappati in una nuova revisione, si dovrebbe prendersi
  l'onere di seguire le avvertenze  in /usr/include/linux/pci.h e man
  dare tutte le informazioni necessarie a linux-pcisupport@cao-
  vlsi.ibp.fr.

  Se si incontra un qualche problema con la scheda, si dovrebe provare a
  verificare se il supporto DOS e/o Win95 o NT funziona. Probabilmante
  non si ricever alcuna risposta utile da un fabbricante di schede per
  un bug report o una richiesta riguardanti Linux. Anzi, avendo avuto a
  che fare con il sistema di supporto e-mail di Diamond, non mi aspetto
  nessuna risposta utile anche per gli altri sistemi operativi.

  3.1.2.  Configurare il kernel

  Non c' bisogno di alcuna configurazione del kernel, fin tanto che il
  supporto PCI  abilitato. Si pu consultare il Linux Kernel HOWTO per
  i dettagli sulla compilazione del kernel.

  3.1.3.  Configurare i device

  I driver correnti non hanno (ancora) bisogno di device speciali. Si
  differenziano cos dallo sviluppo degli altri driver (p.es. i driver
  sonori, che usano /dev/dsp e /dev/audio). Il driver usa il device
  /dev/mem che dovrebbe sempre essere disponibile. Di conseguenza, si
  deve usare setuid o i diritti di root per accedere alla scheda
  acceleratrice.

  3.2.  Disposizione dei Monitor

  Le schede add-on sono utilizzabili in due modi. Si pu sia far passare
  il segnale video dalla propria scheda VGA attraverso la scheda
  accelerata e poi allo schermo, sia usare due schermi
  contemporaneamente. Si faccia riferimento al manuale fornito dal
  costruttore della scheda per i dettagli. Entrambe le configurazioni
  sono state provate con la scheda Monster 3D.

  3.2.1.  Soluzione a schermo singolo

  Questa configurazione permette di controllare l'operativit di base
  della scheda acceleratrice - se il segnale video non viene trasmesso
  al monitor  possibile che ci sia un guaso hardware.

  Si ricorda che il segnale video pu deteriorarsi sensibilmente se
  passa attraverso la scheda video. Fino ad un certo punto questo 
  inevitabile. Comunque, in alcune recensioni si sono lamentati della
  scarsa efficenza dei cavi forniti a.es. con la Monster 3D e a
  giudicare da quello che ho testato, non ci sono stati cambiamenti.

  Ci sono altre pecche nella configurazione ad un solo schermo. Passare
  dalla modalit VGA a quella accelerata far cambiare la risoluzione e
  la frequenza di aggiornamento, anche se si usa una risoluzione di
  640x480 p.es. con X11. Inoltre, se si sta usanto X11, la propria
  applicazione  responsabile della gestione di tutti gli eventi della
  tastiera e del mouse, quindi si potrebbe rimanere bloccato a causa di
  un cambio di contesto o esposizione sullo schermo dell'X11 (che 
  completamente invisibile quando viene usata la modalit accelerata).
  Si potrebbe usare la modalit SVGA in console invece dell'X11.

  Se si usa la configurazione ad un solo monitor e si cambia spesso
  modo, ci si ricordi che il proprio monitor potrebbe non gradire questo
  tipo di utilizzo.

  3.2.2.  Soluzione a due schermi

  La scheda acceleratrice non ha bisogno del segnale d'ingresso VGA.
  Invece di far passare l'output video attraverso la scheda
  acceleratrice, si pu attaccare un secondo monitor alla sua uscita e
  usarli entrambi contemporaneamente. Questa soluzione  pi costosa, ma
  d risultati migliori, dato che lo schermo principale funzioner
  sempre in alta risoluzione senza la perdita di qualit del segnale che
  la soluzione passante comporta. Inoltre si pu usare X11 e
  l'accelerazione a schermo intero in parallelo, facilitando lo sviluppo
  e il debugging.

  Il problema  che la scheda accelerata non produce alcun segnale video
  quando non viene utilizzata. Di conseguenza, ogni volta che
  l'accelerazione grafica termina, pu attivarsi lo screensave/powersave
  hardware del monitor, se esiste. Anche in questo caso, il proprio
  hardware potrebbe non gradire di essere trattato in questo modo. Si
  dovrebbe usare

  ______________________________________________________________________
  setenv SST_DUALSCREEN 1
  ______________________________________________________________________


  per forzare un output video continuo in questa configurazione.

  3.3.  Installare la Distribuzione Glide

  Il driver e la libreria Glide sono forniti come un unico archivio
  compresso. Si usino tar e gzip per scompattarlo e si seguano le
  istruzioni nel README e nell'INSTALL che accompagnano la
  distribuzione. Si legga ed esegua lo script di installazione.
  L'installazione copia tutto in /usr/local/glide/include,lib,bin e
  imposta l'ld.conf a cercare l. Dove installare la distribuzione e
  impostare l'ld.conf sono due azioni indipendenti. Se non si esegue
  l'impostazione dell'ld.conf allora si avr bisogno
  dell'LD_LIBRARY_PATH.

  Se si vogliono compilare le proprie applicazioni grafiche, sar
  necessario installare gli header file in una locazione accessibile in
  fase di compilazione. Se non si vuole usare l'installazione vista
  sopra (cio si decide per un'altra locazione), ci si assicuri che ogni
  applicazione possa accedere alle librerie condivise in esecuzione o si
  otterr un risultato del tipo can't load library 'libglide.s.

  3.3.1.  Usare il programma detect

  Nella distribuzione c' il programma bin/detect (il sorgente non 
  disponibile). Si deve lanciarlo come root, ed si otterr qualcosa di
  simile

  ______________________________________________________________________
  slot  vendorId   devId   baseAddr0  command  description
  ----  --------  ------  ----------  -------  -----------
    00    0x8086  0x122d  0x00000000   0x0006  Intel:430FX (Triton)
    07    0x8086  0x122e  0x00000000   0x0007  Intel:ISA bridge
    09    0x121a  0x0001  0xfb000008   0x0002  3Dfx:video multimedia adapter
    10    0x1000  0x0001  0x0000e401   0x0007  ???:SCSI bus controller
    11    0x9004  0x8178  0x0000e001   0x0017  Adaptec:SCSI bus controller
    12    0x5333  0x88f0  0xf4000000   0x0083  S3:VGA-compatible display co
  ______________________________________________________________________


  come risultato. Se non si possiedono i diritti di root, il programma
  se ne verr fuori con

  ______________________________________________________________________
  Permission denied: Failed to change I/O privilege. Are you root?
  ______________________________________________________________________


  L'output potr tornare utile per un bug report.

  3.3.2.  Usare i programmi di test

  All'interno della distribuzione Glide si pu trovare una directory con
  i programmi di test. Si noti che questi programmi sono sotto il
  copyright della 3Dfx e sono legalmente usabili solo se hai comprato
  una scheda con chipset 3Dfx. Si veda il file LICENSE nella
  distribuzione o il loro sito web www.3dfx.com per i dettagli.


  Si raccomanda di compilare e linkare i programmi di test anche se
  nella distribuzione ci sono i binari. Nota che alcuni programmi
  richiedono che altri file della distribuzione, come alpha.3df, siano
  disponibili nella stessa cartella. Tutti i programmi di test usano una
  risoluzione di 640x480. Alcuni richiedono la pressione di pi tasti
  come input, altri chiederanno solamente Press A Key To Begin Test. Si
  faccia attenzione alla perdita del contesto di input se si sta
  eseguendo in contemporanea X11 sullo stesso schermo.

  Si consulti il README.test per una lista del programmi, e per altri
  dettagli.


  4.  Risposte Alle Domande Pi Frequenti

  Le sezioni seguenti rispondono ad alcune delle domande che sono state
  poste nei newsgroup e mailing list Usenet. Le FAQ sono state suddivise
  per comodit in pi parti, vale a dire

    FAQ: Requisiti?

    FAQ: Voodoo Graphics (tm)? 3Dfx?

    FAQ: Glide?

    FAQ: Glide e SVGA?

    FAQ: Glide e XFree86?

    FAQ: Glide vs. OpenGL/Mesa?

    FAQ: Quake?

    FAQ: Risoluzione dei problemi?

  Ogni sezione elenca alcune domande e risposte, a cui si possono
  ricondurre la maggior parte dei problemi.


  5.  FAQ: Requisiti?

  5.1.  Quali sono i requisiti di sistema?

  Un PC Linux con PCI 2.1 o seguente, un monitor con risoluzione 640x480
  o maggiore e una scheda acceleratrice 3D basata sul 3Dfx Voodoo
  Graphics (tm). Funziona su P5 o P6, con o senza MMX.

  5.2.  Funziona con Linux-Alpha?

  Attualmente non ci sono distribuzioni Linux Glide per le piattaforme
  diverse dalla i586. Dato che i sorgenti della Glide non sono
  pubblicamente disponibili, si devono aspettare i binari. Quantum3D ha
  annunciato il supporto per DEC Alpha per la seconda met del 97. Per
  piacere si contatti Daryll Strauss se si  interessati al supporto di
  questo progetto.

  5.3.  Quali chipset sono supportati?

  Attualmente sotto Linux  supportata la pi recente revisione dei
  chipset 3Dfx Voodoo Graphics (tm). I chipset Voodoo Rush (tm) non sono
  tuttora supportati.

  5.4.  Quali schede sono supportate?

  Questa sezione elenca le schede che attualmente si sanno funzionare
  sotto Linux. Non ci sono schede ufficialmente supportate, dato che
  3Dfx non vende alcuna scheda. Queste informazioni sono basate
  sull'ultimo kernel di Linux disponibile al momento di scrivere, ed
  elencano le schede che sono state testate, pi le schede che
  dovrebbero funzionare, ma che non sono state provate.

   importante sottolineare che il supporto Linux per una data scheda
  non richiede solamente un driver per la componente acceleratrice 3D.
  Se una scheda integra anche la parte VGA, allora sar necessario anche
  il supporto per Linux SVGA e per XFree86. Attualmente,  preferibile
  la soluzione con scheda add-on, dato che ti permette di scegliere una
  scheda grafica normale ben supportata da Linux. Ci sono altri aspetti
  discussi in seguito.

  Sono state testate le seguenti configurazioni:

    Diamond Monster 3D con Diamond Stealth 64 3240XL

    Orchid  Righteous 3D con una scheda grafica basata sul S3-968

    Quantum3D Obsidian 50-4220

  Queste sono le configurazioni esistenti delle schede Obsidian, la
  maggior parte delle quali non sono ancora state testate, ma comunque
  dovrebbero funzionare.

     Obsidian 50-2200
        1 pixelfx con 2MB di frame buffer memory, 1 texelfx con 2MB di
        texture memory

     Obsidian 50-2400
        1 pixelfx con 2MB di frame buffer memory, 1 texelfx con 4MB di
        texture memory

     Obsidian 50-4400
        1 pixelfx con 4MB di frame buffer memory, 1 texelfx con 4MB di
        texture memory

     Obsidian 50-2220
        1 pixelfx con 2MB di frame buffer memory, 2 texelfx con 2MB di
        texture memory ciascuno, per un totale di 4MB di texture memory

     Obsidian 50-4220
        1 pixelfx con 4MB di frame buffer memory, 2 texelfx con 2MB di
        texture memory ciascuno, per un totale di 4MB di texture memory.
        Questa configurazione era l'originale "Obsidian Pro" che era
        stata usata per il 3DS Plug-in Project (ora fatto con la
        Datapath Realistorm). Datapath era solito chiamarla "Pro VR".

     Obsidian 50-4440
        1 pixelfx con 4MB di frame buffer memory, 2 texelfx con 4MB di
        texture memory ciascuno, per un totale di 8MB di texture memory.
        Questa configurazione  il nuovo obiettivo per il 3DS Plug-in
        Project (ora fatto con la Datapath Realistorm).

     Obsidian 50-2440
        1 pixelfx con 2MB di frame buffer memory, 2 texelfx con 4MB di
        texture memory ciascuno, per un totale di 8MB di texture memory.

     Obsidian 100-2440
        aka 2440-SLI, aka XS-100, o semplicemente "SLI".


        Due schede PCI, ognuna con 1 pixelfx con 2MB di frame buffer
        memory e 2 texelfx con 4MB di texture memory ciascuno, per un
        totale di 8MB di texture memory per scheda. Le texture devono
        essere memorizzate su entrambe le schede, cos ci non equivale
        a 16MB di texture memory. L'uscita video scan line interleaved
        permette di raddoppiare il fill rate.

  Il pacchetto commerciale con software aggiuntivo per Autodesk 3DS MAX
  chiamato Obsidian 3DS, originariamente usava 50-4220 ed ora  dis
  tribuito assieme ad una scheda 50-4440.

  Le seguenti schede non sono ancora state testate:

    Deltron RealVision Flash 3D

  Con l'attuale Glide 2.4, le seguenti schede basate sul Voodoo Rush
  (tm) non dovrebbero funzionare con Linux:

    Hercules Stingray 128/3D

    Intergraph Intense 3D Rush

  Dato che il chipset Voodoo Rush (tm) supporta operazioni in finestra,
  viene usato su schede VGA accelerate, che richiedono un supporto per
  XFree86 o Linux SVGA non ancora disponibile.

  Le schede non basate sui chipset 3Dfx (e.g. prodotte da S3, Matrox,
  3Dlabs, Videologic) non funzionano con i driver 3Dfx e esulano dagli
  scopi di questa documentazione.

  5.5.   supportata la Hercules Stingray 128/3D?

  In questa scheda, l'acceleratore 2D  montato su una scheda PCI e il
  chipset Voodoo Rush (tm) su una scheda figlia. Attualmente questa
  scheda non  supportata n dalla Linux Glide, n dai server accelerati
  XFree86. Tuttavia il server SVGA XFree86 funziona secondo quanto
  riportato nella mailing list di Mesa.  Supporta gli 8, i 16 e i 32
  bpp.

  ______________________________________________________________________
  # device section settings
  Chipset "AT24"
  Videoram 4032

  # videomodes tested by Oliver Schaertel
  #  25.18  28.32  for 640 x 480   (70hz)
  #  61.60         for 1024 x 786  (60hz)
  #  120           for 1280 x 1024 (66hz)
  ______________________________________________________________________


  Attualmente non c' supporto per il Voodoo Rush (tm). Varrebbe la pena
  tentare, ma siccome il produttore non ha fornito alcuna scheda di
  prova, ci si deve arrangiare.

  Per quanto riguarda il componente VGA collegato al Voodoo Rush (tm), 
  un acceleratore della Alliance Semiconductor's ProMotion-AT3D
  multimedia. Il supporto XFree86 per l'AT3D/AT24 non sar accelerato
  prima della XFree86 4.0, che  lungi a venire.

  5.6.   supportata la Intergraph Intense 3D Rush?

  Sebbene questa scheda sia integrata in un'unica scheda, 
  sostanzialmente la stessa combinazione di chipset (AT3D, Voodoo Rush
  (tm)), cos vale lo stesso discorso fatto in precedenza per la
  Hercules Stingray. Da quanto ha detto David E. Anderson della
  Intergraph, per il momento non hanno intenzione di fornire alcun
  supporto per Linux.


  6.  FAQ: Voodoo Graphics (tm)? 3Dfx?

  6.1.  Chi  3Dfx?

  3Dfx  un industria di San Jose produttrice di acceleratori grafici 3D
  per giochi arcade, console, e schede per PC. Il loro sito ufficiale 
  www.3dfx.com. 3Dfx non vende direttamente alcuna scheda, ma hanno una
  societ associata, la Quantum3D. Si veda la loro home page al sito
  www.quantum3d.com per maggiori informazioni.

  6.2.  Che cos'e il Voodoo Graphics (tm)?

  Il Voodoo Graphics (tm)  un chipset prodotto dalla 3Dfx. Viene usato
  nelle schede acceleratrici per PC. Si veda la sezione dell'HOWTO
  sull'hardware supportato.

  C' un nuovo chipset, il Voodoo Rush (tm), che attualmente non 
  supportato sotto Linux.

  6.3.  Dove posso trovare altre informazioni sul Voodoo Graphics (tm)?

  C' una FAQ della 3Dfx, che dovrebbe essere disponibile al loro sito
  web. Si possono trovare informazioni commerciali nei seguenti siti:

    www.3dfx.com

    www.quantum3d.com

    www.orchid.com

    www.diamondmm.com

    www.deltrontech.com



  7.  FAQ: Glide? TexUS?

  7.1.  Che cos' Glide?

  Glide  un API proprietaria pi i driver per accedere
  all'accelerazione grafica 3D hardware basata sui chipset prodotti
  dalla 3Dfx. Glide  stato progettato ed implementato per DOS, Windows
  e Macintosh, ed  stato convertito per Linux da Daryll Strauss.

  7.2.  Che cos' TexUS?

  Nella distribuzione  libtexus.so, che  l'Interactive Texture Utility
  Software di 3Dfx.  una libreria di eleborazione delle immagine ed
  alcune utility per preparare le immagini per essere usate con la
  libreria Interactive Glide di 3Dfx. Tra le caratteristiche di TexUS ci
  sono la conversione dei formati dei file, la creazione di MIPmap e il
  supporto per l'Interactive Narrow Channel Compression delle texture di
  3Dfx.

  L'utility texus di TexUS legge le immagini in alcuni dei formati pi
  diffusi (TGA, PPM, RGT), genera MIPmap e scrive le immagini come file
  di texture 3Dfx Interactive (vedi a.es. alpha.3df, incluso nella
  distribuzione) o come file immagine per essere controllati. Per i
  dettagli sui parametri di texus e sulle API, si veda la documentazione
  di TexUS.

  7.3.  Glide  freeware?

  No. Glide non  n GPL n soggetta a qualche altra licenza pubblica.
  Si veda il file LICENSE nella distribuzione per i dettagli. Glide
  viene fornita solo in formato binaro e non si dovrebbe usare o
  distribuire alcun file se non quelli rilasciati pubblicamente, se non
  si ha firmato un NDA. La distribuzione Glide inclusi i sorgenti dei
  programmi di test sono sotto il copyright della 3Dfx.

  Lo stesso discorso va fatto per tutti i sorgenti presenti nella
  distribuzione Glide. Secondo le parole della 3Dfx: Questi non sono di
  pubblico dominio, ma possono essere distribuiti liberamente solo ai
  posessori di prodotti 3Dfx. Niente scheda, niente codice!

  7.4.   disponibile il sorgente della Glide?

  No. Il sorgente della Glide  reso disponibile solo in base ad uno
  speciale accordo e un NDA con 3Dfx.

  7.5.  La Linux Glide  supportata?

  Attualmente la Linux Glide non  supportata. Essenzialmente, viene
  fornita sotto le stesse restrizioni della DLL GLQuake.

  Comunque, 3Dfx vuole fornire il maggior supporto possibilie, e sta
  iniziando a muoversi in questa direzione. Per il prossimo periodo, si
  dovr far riferimento al newsgroup 3Dfx (vedere sotto).

  Inoltre, la pagina web della Quantum3D riporta che il supporto Linux
  (per la Obsidian)  previsto sia per l'architettura Intel sia per
  quella AXP nella seconda met del 97.

  7.6.  Dove posso postare le domande su Glide?

  Ci sono alcuni newsgroups attualmente disponibili sul server NNTP
  news.3dfx.com gestiti dalla 3Dfx. Questi gruppi USENET sono dedicati
  alla 3Dfx e a Glide in generale e principalmente forniscono assistenza
  per DOS, Win95 e NT. L'attuale elenco :

  ______________________________________________________________________
  3dfx.d3d.drivers
  3dfx.events
  3dfx.game.titles
  3dfx.games.glquake
  3dfx.glide
  3dfx.glide.linux
  3dfx.oem.products.diamond.monster3d
  3dfx.oem.products.hercules.stingray128-3d
  3dfx.oem.products.orchid.righteous3d
  3dfx.oem.products.quantum3d.obsidian
  3dfx.oem.products.realvision.flash3d
  3dfx.products
  3dfx.test
  ______________________________________________________________________


  Per piacere si usi news.3dfx.com/3dfx.glide.linux per tutte le domande
  relative alla Linux Glide.

  Una mailing list dedicata alla Linux Glide  in preparazione
  (probabilmente sar disponibile ad agosto inoltrato). Si spedisca una
  lettera a majordomo@gamers.org, senza alcun soggetto, e con info
  linux-3dfx come corpo del messaggio per avere informazioni sulle
  direttive di posting, l'archivio di hypermail e su come iscriversi
  alla lista o averne, quando disponibile, il compendio.

  7.7.  Dove spedire i bug report?

  Attualmente si deve fare riferimento al newsgroup (vedere sopra), che
   news.3dfx.com/3dfx.glide.linux. Non c' nessun supporto e-mail
  ufficiale attivato. Per le domande non specificatamente riguardanti la
  Linux Glide, ci si assicuri di usare un altro newsgroup.

  7.8.  Chi la sta mantenendo?

  3Dfx nominer presto un mantenitore ufficiale. Attualmente, il
  mantenitore non ufficiale della conversione per Linux della Glide 
  Daryll Strauss. Per favore si postino i bug report nel newsgroup (v.
  sopra). Se si crede di aver trovato un bug non riportato
  precedentemente, per piacere si scriva a Daryll all'indirizzo
  daryll@harlot.rb.ca.us.

  7.9.  Come posso contribuire alla Linux Glide?

  Si possono inviare dettagliati bug report. Un'altra possibilit 
  fornire programmi d'esempio da includere nella distribuzione. Un altro
  grande contributo potrebbe essere aggiungere del codice ai sorgenti
  del driver Mesa Voodoo basato sulla Glide. Si vedano la sezione sul
  Mesa Voodoo in seguito.

  7.10.  Devo usare la Glide?

  S. Dato che per il momento non ci sono altri driver Voodoo Graphics
  (tm) disponibili per Linux.

  7.11.  Dovrei programmare usando l'API della Glide?

  Dipende dall'applicazione che si ha intenzione di sviluppare. La Glide
   un API proprietaria che  in parte simile alla OpenGL o alla Mesa,
  in parte contiene funzioni disponibili come estensioni di qualche
  implementazione di OpenGL e in parte contiene funzioni non
  riscontrabili da nessuna altra parte se non nella Glide.

  Se si vuole usare l'API OpenGL, si deve usare Mesa (vedere sotto).
  Mesa, o meglio il driver Mesa Voodoo, propone una API che si rif
  all'API OpenGL, molto ben documentata e largamente usata. Comunque, il
  driver Mesa Voodoo  in versione alpha primitiva, quindi se lo si usa
  si devono accettarne le scarse prestazioni e il mancato supporto di
  alcune funzioni.

  In breve, la scelta  personale - se si cercano le massime prestazioni
  e si accettano i problemi di portabilit ad hardware non-3Dfx, La
  Glide non  una cattiva scelta. Se si tiene al mantenimento, l'OpenGL
  potrebbe essere la scelta miglior a lungo termine.

  7.12.  Qual' la versione attuale?

  La versione della Linux Glide che sar resa pubblica  la 2.4, dato
  che  la prossima release della Glide per DOS/Windows.

  Nota che questo HOWTO  stato scritto basandosi sulla Linux Glide
  2.3.1, dato che la Glide 2.4 non  ancora stata rilasciata e che la
  conversione per Linux della Glide 2.4 non  ancora stata terminata.
  Visto che l'API non cambier e visto che non ci sono variazioni
  pianificate per la distribuzione Linux Glide, questa documentazione
  ricoprir ancora la maggior parte dei problemi.

  7.13.  La Linux Glide  identica alla DOS/Windows Glide?

  La versione della Linux Glide che verr resa pubblica sar la 2.4,
  seguendo la release della DOS/Windows Glide 2.4. L'API e
  l'implementazione si suppongono essere identiche.

  La Glide 2.2  stata portata in Linux nell'Aprile 1997. La conversione
  della Glide 2.3.1  stata fatta nel Giugno 1997. Entrambe prive di una
  ottimizzazione chiave per l'impostazione dei triangoli, che sar
  inclusa nella release 2.4 della Linux Glide. Le conversioni precedenti
  non sono state rese disponibili pubblicamente e sono state usate solo
  per il beta test.

  7.14.  Dove trovo informazioni sulla Glide?

  Ci sono esaurienti informazioni disponibili da 3Dfx. Si pu scaricarle
  dalla loro home page a www.3dfx.com/software/download_glide.html. Sono
  gratuite, presumendo che tu abbia comprato una scheda basata
  sull'hardware 3Dfx. Per favore si leggano il regolamento di licenza.

  Come inizio, si pu cercare qualcosa dei seguenti testi:

    Glide Release Notes

    Glide Programming Guide

    Glide Reference Manual

    Glide Porting Guide

    TexUs Texture Utility Software

    ATB Release Notes

    Installing and Using the Obsidian

     Sono disponibili come documenti Microsoft Word, e fanno parte della
     distribuzione Glide per Windows, cio del file d'archivio
     autoscompattante. Per scaricarli separatamente dovrebbe essere
     disponibile la copia postscript a www.3dfx.com. Nota che il numero
     della release non  sempre sintonizzato con quello della Glide.

  7.15.  Dove trovare alcuni demo per Glide?

  Si possono trovare i sorgenti di demo per Glide all'interno della
  distribuzione (i programmi di test) e alla home page della 3Dfx. Il
  problema con quest'ultimi  che alcuni richiedono ATB. Per portare
  questi demo sotto Linux, dev'essere completamente riscritto la
  gestione degli eventi.

  Inotre, possono essere utili alcuni dei sorgenti delle demo per OpenGL
  che accompagnano Mesa e GLUT. Anche se l'API della Glide  diverso
  dall'API OpenGL, entrambi mirano alla stessa hardware rendering
  pipeline.


  8.  FAQ: Glide e SVGA?

  Non si dovrebbero avere problemi a lanciare le applicazioni basate
  sulla Glide utilizzando la modalit VGA sia a schermo singolo sia a
  schermo doppio. Potrebbe essere una buona idea utilizzare una
  risoluzione di 640x480 anche in modalita SVGA, se si sta utilizzando
  una configurazione a schermo singolo.

  9.  FAQ: Glide e XFree86?


  9.1.  Funziona con XFree86?

  Sostanzialmente, l'hardware Voodoo Graphics (tm) non si interessa di
  X. L'X server inoltre non noter che il segnale video generato
  dall'hardware VGA non giunge al monitor nella configurazione a schermo
  singolo. Se la propria applicazione non  stata scritta facendo
  attenzione all'X, il passaggio della Glide alla modalit a schermo
  intero pu causare dei problemi (vedi la sezione Risoluzione dei
  Problemi). Se non interessa il sovraccarico di lavoro che comporta
  scrivere un'applicazione sotto X11, si potrebbe usare la console in
  modalit SVGA.

  Riassumendo: s, funziona sotto XFree86, ma no, non  cooperante se
  non si scrivono le applicazioni accortamente.

  9.2.  Funziona solo a schermo intero?

  Vedi sopra. L'hardware Voodoo Graphics (tm) non  conscio di un
  ambiente a finestre, e nemmeno lo  la Linux Glide.

  9.3.  Cosa mi dici sulla GLX per XFree86?

  Ci sono un paio di problemi.

  L'hardware Voodoo Graphics (tm) attualmente supportato e l'attuale
  revisione della Linux Glide funzionano solamente a schermo intero, e
  non sono predisposte per condividere un framebuffer (buffer video,
  memoria video) con un ambiente a finestre. Cos GLX o qualsiasi altra
  integrazione con l'X11 non  ancora possibile.

  Il Voodoo Rush (tm) potrebbe essere capace di cooperare con XFree86
  (dato che la parte SVGA della scheda funziona con il server SVGA di
  XFree86), ma non  ancora supportato dalla Linux Glide, cos come non
   ancora supportato dai server S3 o dagli altri server XFree86.

  Inoltre GLX  legato a OpenGL o, nel caso di Linux, a Mesa. Il gruppo
  di XFree86 attualmente sta lavorando per integrare Mesa con i loro X
  server. GLX  in fase beta, XFree86 3.3 ha qualche "aggancio" per GLX.
  Si veda la pagina su GLX di Steve Parker a
  www.cs.utah.edu/~sparker/xfree86-3d/ per le informazioni pi recenti.
  Attualmente Mesa usa ancora la sua emulazione GLX con Linux.

  10.  FAQ: Glide versus OpenGL/Mesa?

  10.1.  Glide  OpenGL?

  No, Glide  un API proprietaria di 3Dfx con alcune caratteristiche
  specifiche per il Voodoo Graphics (tm) e il Voodoo Rush (tm). Una
  OpenGL per 3Dfx  in preparazione (vedi sotto). Alcune caratteristiche
  della Glide potrebbero richiedere le EXTensioni a OpenGL, alcune delle
  quali si trovano gi in altre implementazioni (a.es. le texture
  paletizzate).

  La cosa pi simile all'OpenGL accelerato dall'hardware per Linux che
  si pu attualmente trovare  Mesa di Brian Paul assieme al driver Mesa
  Voodoo di David Bucciarelli (vedi sotto).

  10.2.  Mesa funziona con 3Dfx?

  Dalla release 2.3 Beta3, Mesa funziona con la Linux Glide 2.2,
  similmente a Mesa con Glide per DOS/Windows. Ci sono patch Mesa 2.3b3
  per la Linux Glide 2.3.1. Le seguenti versioni di Mesa funzioneranno
  con la Linux Glide 2.4; fin tanto che l'API non cambier, dovrebbero
  essere sufficienti le patch Mesa 2.3b3. La distribuzione Glide non fa
  parte della distribuzione Mesa.

  Potrebbe essere necessario scaricare l'archivio della libreria Mesa da
  l sito FTP iris.ssec.wisc.edu.

  10.3.  Dove ottengo altre informazioni su OpenGL?

  Si usi la porta di accesso alle info su OpenGL di Mark Kilgard a
  reality.sgi.com/mjk_asd/opengl-links.html, e si proceda da l.

  10.4.  Dove ottengo informazioni su Mesa?

  La home page di Mesa  www.ssec.wisc.edu/~brianp/Mesa.html. C' un
  archivio della mailing list di Mesa a www.iqm.unicamp.br/mesa/. Questa
  lista non  dedicata a 3Dfx e Glide, ma se si  interessati ad usare
  l'hardware 3Dfx per accelerare Mesa,  un buon punto di partenza.

  10.5.  Dove ottengo informazioni su Mesa Voodoo?

  Per le ultime informazioni sul driver Mesa Voodoo mantenuto da David
  Bucciarelli (tech.hmw@plus.it) si veda la home page a www-
  hmw.caribel.pisa.it/fxmesa/.

  10.6.  C' una OpenGL commerciale per Linux e 3Dfx?

  3Dfx ha pubblicamente annunciato un'implementazione di OpenGL per
  Windows per quest'anno (seconda met del '97). Non si sa quando questa
  sar disponibile anche per Linux.

  Di OpenGL realizzate da terze parti, sono a conoscenza di tre
  prodotti:

    MetroLink MetroOpenGL

    XInside OpenGL

    Evans & Sutherland OpenGL

  L'ultima viene distribuita da Portable Graphics, ed  una
  trasposizione pura e semplice della OpenGL reference software
  implementation, con un kit di linkaggio per una vecchia revisione
  degli X server di XFree86. Portable Graphics non ha mai promesso un
  supporto hardware. Per quel che ne so, questo prodotto non  pi
  disponibile.

  Gli altri due hanno promesso il supporto per gli acceleratori
  hardware, ma entrambi sono legati ad una trasposizione proprietaria
  degli X server ed entrambi non supportano alcuna accelerazione 3D, per
  quel che ne so.

  10.7.  Cosa mi dici di GLUT?

  La distribuzione GLUT di Mark Kilgard  un posto molto valido per
  ottenere applicazioni d'esempio e molti utili programmi. La si trova a
  reality.sgi.com/mjk_asd/glut3/, e si pu prendererla comunque. La
  release attuale  GLUT 3.4.

  Comunque, visto che GLUT gestisce il double buffer, finestre, eventi
  ed altre operazioni intimamente legati all'hardware e al sistema
  operativo, una Voodoo-GLUT richiede alcune modifiche specifiche. C'
  una alpha release disponibile come parte della pi recente
  distribuzione Mesa (David Bucciarelli, Henri Fousse).

  11.  FAQ: Ma Quake?

  11.1.  Cosa mi dici della Quake GL?

  La DLL rilasciata da 3Dfx  disponibile solo per Windows. Supporta un
  sottoinsieme di OpenGL specifico per Quake (Vedi
  http://www.cs.unc.edu/~martin/3dfx.html per un elenco non ufficiale
  dei code path supportati. No, questa DLL non  stata portata sotto
  Linux. No, non c' alcuna versione di Quake basata sulla Glide,
  neanche per Windows. Non ho alcuna notizia su una glQuake per Linux.



  12.  FAQ: Risoluzione dei problemi

  12.1.  Questo hardware  stato testato?

  Si vedano i requisiti hardware scritti prima, c' un elenco di
  hardware che  stato provato e che funziona.

  12.2.  Failed to change I/O privilege?

  Si deve essere root, o rendere setuid la propria applicazione per
  lanciare un'applicazione basata su Glide. A causa del DMA, il driver
  accede a /dev/mem, che non  accessibile in scrittura da alcuno se non
  da root, per validi motivi. Vedi il README della distribuzione Glide
  per Linux.

  12.3.  Funziona senza i privilegi di root?

  Ci sono casi particolari in cui, ovviamente, l'uso di setuid diventa
  un problema. Attualmente ci sono soluzioni in preparazione, che
  richiedono cambiamenti all'interno della libreria stessa.

  12.4.  Le immagini sono distorte (schermo singolo)?

  Se si sta usando la configurazione analogica passante, il normale
  schermo SVGA o X11 pu apparire considerevolmente male. Si pu provare
  ad utilizzare un miglior cavo di connessione di quello fornito con la
  scheda acceleratrice (quelli venduti con la Diamond Monster 3D sono
  solitamente peggiori di quelli distribuiti assieme alla Orchid
  Righteous 3D), ma fino ad un certo punto  inevitabile che ci sia una
  perdita di segnale a causa del percorso di trasmissione aggiuntivo.

  Se l'immagine a pieno schermo 640x480 creata dalla scheda
  acceleratrice risulta distorta, ci pu indicare un problema hardware
  reale. Si deve contattare il costruttore della scheda, non 3Dfx per i
  dettagli, dato che la qualit del segnale video non ha niente a che
  fare con l'acceleratore - il costruttore della scheda sceglie il
  RAMDAC, i driver d'uscita e gli altri componenti responsabili.

  12.5.  L'ultimo frame  ancora l (schermo singolo o doppio)?

  Si  terminata la propria applicazione con Ctrl-C o non  terminata
  correttamente. La scheda acceleratrice fornir all'infinito l'attuale
  contenuto del framebuffer come segnale video finch non le verr detto
  altrimenti.

  12.6.  Si attiva il powersave (schermo doppio)?

  Quando l'applicazione termina nella configurazione a due schermi, la
  scheda acceleratrice non fornisce pi alcun segnale video. Perci il
  powersave si attiva ogni volta. Per evitarlo, si usi

  ______________________________________________________________________
  setenv SST_DUALSCREEN 1
  ______________________________________________________________________



  12.7.  La mia macchina sembra stallare (X11, schermo singolo)?

  Se stai utilizzando X quando lanci una applicazione Glide,
  probabilmente si  mosso il mouse fuori dalla finestra e gli input
  della tastiera non raggiungono pi l'applicazione.

  Se l'applicazione  progettata per funzionare concorrentemente con
  X11, si potrebbe o ingrandire la finestra a pieno schermo o usare le
  funzioni XGrabPointer e XGrabServer per reindirizzare tutti gli input
  all'applicazione mentre l'X server non pu accedere al monitor. Si
  noti che il catturare tutti gli input con XGrabPointer e XGrabServer
  non qualifica l'applicazione come well-behaved (ovvero che si comporta
  bene con X), e che il tuo programma pu bloccare l'intero sistema.

  Se si ha questo problema senza utilizzare X, ci si assicuri che non ci
  siano conflitti hardware (vedi sotto).

  12.8.  La mia macchina stalla (schermo singolo o doppio)?

  Se il sistema non risponde ad alcun input (si stanno usando due
  monitor e ci si accorge della perdita di fuoco (focus), si potrebbe
  essere in presenza di un conflitto hardware pi o meno subdolo. Si
  veda la sezione Risoluzione dei problemi all'installazione per i
  dettagli.

  Se non c' alcun ovvio conflitto di indirizzi, ci possono essere
  ancora altri problemi (v. sotto). Se si sta scrivendo del proprio
  codice, la ragione pi comune di stallo  che non si  fatto lo snap
  dei vertici.  Vedi la sezione sullo snapping nella documentazione
  della Glide.

  12.9.  La mia macchina stalla (uso una scheda VGA S3)?

   possibile che ci sia un problema di sovrapposizione di regioni di
  memoria tipico delle S3. Ci sono alcune informazioni ed una patch al
  problema nominato S3 nel sito web della 3Dfx, ma queste si applicano
  solo a Windows. Da come l'ho capito, la causa del problema  che certe
  schede S3 (le pi vecchie revisioni della Diamond Stealth S3 968)
  riservano piu spazio di memoria di quello che effettivamente usano,
  cos la Voodoo Graphics (tm) deve essere mappata in una differente
  locazione. Comunque, questo non  stato riportato come un probblema
  sotto Linux, e pu essere specifico di Windows.

  12.10.  Nessun conflitto di indirizzi, ma stalla comunque?

  Se si sta usando una scheda madre con un supporto PCI non-standard o
  incompleto, si pu provare a mischiare un po' le schede. Sto usando un
  ASUS TP4XE che ha il fatidico "Media Slot" modificato, a.es lo slot4
  PCI ha un connettore addizionale per le schede composite SCSI/Sound
  prodotte dalla ASUS, ed ho avuto grossi problemi quando ho installato
  una Diamond Monster 3D in quello slot. Il sistema ha funzionato senza
  problemi quando ho messo la scheda in uno degli slot regolari.

  12.11.  Compile/link error: grSstWinOpen()?

  (Errore di compilazione/linkaggio: grSstWinOpen()?)

  Dato che la Linux Glide sar la versione 2.4, questo errore non
  dovrebbe verificarsi. Questa funzione non era disponibile nella Glide
  e quindi anche nella Linux Glide 2.2; le successive non sono mai state
  rese pubbliche.


  12.12.  Compile/link error: grSstOpen()?

  (Errore di compilazione/linkaggio: grSstOpen()?)

  Il sorgente della propria applicazione  basato sulla Glide 2.2 e
  questa funzione  stata eliminata nella Glide 2.3. Non essendo pi
  disponibile non pu essere usata con la Linux Glide 2.4. Al suo posto
  si usi la funzione grSstWinOpen.

  Dato che l'integrazione della Linux Glide con Mesa era basata
  originariamente sulla Glide 2.2, le versioni precedenti di Mesa
  possono produrre errori in fase di compilazione. La release Mesa-2.3b3
   stata aggiornata per essere usata con la Linux Glide 2.3.1; ci si
  assicuri di avere sia la distribuzione che l'aggiornamento, o
  preferibilmente una nuova revisione di Mesa.


  12.13.  Cannot open shared object file?

  (Impossibile aprire il file oggetto condiviso?)


  ______________________________________________________________________
  test25: error in loading shared libraries
  libglide2x.so: cannot open shared object file: No such file or directory
  ______________________________________________________________________


  Se, per una qualche ragione, si ha ancora un file binario compilato
  per una versione differente della Linux Glide o se c' un'inconsis
  tenza nell'impostazione del proprio ldconfig, il programma non trover
  la libreria condivisa. Si controlli il nome (a.es. libglide2x.so) ed
  ci si assicuri di usare le opzioni corrette quando si compila e linka
  - a.es. -lglide potrebbe non funzionare con l'installazione di
  default.

  Si noti che il nome delle revisioni della Linux Glide segue la
  convenzione usata nella distribuzione 3Dfx Windows, non la convenzione
  classica di Linux.


  12.14.  Problemi di compilazione con Mesa

  Ci si assicuri di settare USE_GLIDE_FULLSCREEN in fxmesa.h. Si
  controlli che le opzioni del linker (a.es. -lglide) corrispondano al
  nome della libreria Linux Glide installata (a.es. -lglide2x invece).
  Ci si assicuri di usare gli aggiornamenti alla release Mesa-2.3b3 o
  seguenti, dato che tutte le release Mesa fino alla 2.3b3 sono basate
  sulla Linux Glide 2.2. Vedi sopra.


  12.15.  Mesa funziona, ma non accede alla scheda?

  Ci si assicuri di aver ricompilato tutte le librerie (compresi i
  toolkit che i programmi dimostrativi usano - si ricorda che GLUT non
  supporta ancora il Voodoo Graphics (tm)) e di aver rimosso le vecchie
  librerie, si lanci ldconfig e/o si imposti il proprio LD_LIBRARY_PATH
  correttamente. Mesa supporta pi driver in parallelo (puoi usare X11
  SHM, off screen rendering e Mesa Voodoo in contemporanea), e si
  potrebbe dover creare e cambiare contesto esplicitamente (si veda la
  funzione MakeCurrent) se il Voodoo Graphics (tm) non  la scelta
  predefinita.
















  Linux AX25-HOWTO, Amateur Radio.
  Terry Dawson, VK2KTJ, terry@perf.no.itg.telstra.com.au
  v1.5, 17 Ottobre 1997

  Linux  forse l'unico sistema operativo al mondo che offra un supporto
  nativo standard per il protocollo AX.25, utilizzato in tutto il mondo
  dai radioamatori per il packet radio. Questo documento ha lo scopo di
  spiegare come installare e configurare questo supporto.

  Traduzione di Nico Alberti IZ4APS@IK4MGV.PR.IEMR.ITA.EU
  albertin@usa.net





  1.  Note sulla traduzione italiana.


  Ho affrontato il lavoro di traduzione di questo HOWTO principalmente
  perch  la parte pi interessante di documentazione sull'uso di Linux
  in ambiente radioamatoriale, e quindi credo che sia la prima fonte di
  informazioni tecniche per chi ne vuol sapere di pi sulla
  comunicazione radio digitale con questo sistema operativo. Tuttavia
  nel documento vengono affrontati svariati problemi di configurazione
  di schede e protocolli per alcuni dei quali non ho l'enorme esperienza
  e capacit tecnica dell'autore (un eufemismo per dire che ne so
  veramente poco :-) ). Pur avendo cercato di produrre il miglior lavoro
  di traduzione possibile compatibilmente con le mie capacit, 
  possibile che la traduzione di certi argomenti non sia chiara o che
  addirittura non sia all'altezza della situazione. In questi casi vi
  prego di farmi pervenire tutte le correzioni e i suggerimenti che
  riterrete opportuni, in modo da rendere questo lavoro pi completo
  possibile.



  Va inoltre notato che la grande mole dei dati forniti e il fatto che
  questo documento sia relativamente recente fa s che la  disposizione
  degli argomenti non sia forse la migliore, rendendo pi complessa la
  comprensione dei concetti pi impegnativi; l'autore, tuttavia, lavora
  continuamente su nuove versioni di questo documento che risultano
  sempre pi complete ed esaurienti.







  2.  Introduzione.


  Questo documento era originariamente un'appendice dell'HAM-HOWTO, ma 
  diventato troppo grande per essere gestito in quel modo. AX.25 HOWTO
  descrive come installare e configurare il supporto nativo AX.25,
  NetRom e Rose per Linux. Vengono descritte alcune tipiche
  configurazioni che possono essere usate come modelli di partenza.



  L'implementazione in Linux dei protocolli di rete per radioamatori 
  molto flessibile, ma per coloro che non hanno particolare familiarit
  con questo sistema operativo il processo di configurazione pu
  apparire complesso e laborioso; infatti occorre un po' di tempo per
  capire tutto l'insieme. Configurare il proprio sistema pu apparire
  un'operazione molto difficile se non ci si  prima documentati sul
  funzionamento di Linux in generale, del resto non si pu pretendere di
  passare a Linux da un altro sistema operativo senza prima documentarsi
  su Linux stesso.



  2.1.  Modifiche rispetto alla versione precedente.


  Aggiunte:
          la pagina Web di Joerg Reuters
          la sezione "Ulteriori Informazioni"
          la configurazione di ax25ipd.

  Correzioni/Aggiornamenti:

          Modificati i pty con valori tali da evitare possibili conflitti.

          Aggiornate le versioni dei moduli e delle ax25-utils

  Da Fare:
          Correggere la parte relativa alle schede SCC, perch
          probabilmente  sbagliata.

          Espandere la sezione dedicata alla programmazione.





  2.2.  Dove reperire nuove versioni di questo documento (in inglese).


  La fonte migliore  da un archivio del Linux Documentation Project.
  In particolare il Linux Documentation Project gestisce un server Web
  nel quale  presente

  l'AX25-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/AX25-HOWTO.html>.
  Questo documento  presente inoltre in vari formati presso
  sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/docs/howto/>.


  Si pu sempre contattare l'autore, ma dato che passa le nuove versioni
  del documento direttamente al coordinatore del LDP,  probabile che
  non sia in grado di darvi versioni pi aggiornate di quella presente
  nell'archivio.


  2.3.  Documenti correlati.


  C' un sacco di documentazione che tratta del networking in Linux in
  generale e che raccomando calorosamente di leggere poich sar di
  grande aiuto e sostegno nello sforzo di capire pi a fondo
  l'argomento.


  Sono le seguenti (in inglese):

  The HAM-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/HAM-HOWTO.html>,

  The NET-3-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/NET-3-HOWTO.html>,

  The Ethernet-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/Ethernet-
  HOWTO.html>,
  e:

  The Firewall-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/Firewall-
  HOWTO.html>


  Informazioni pi generali possono essere reperite in altri HOWTO Linux
  <http://sunsite.unc.edu/LDP/HOWTO/>


  3.  Linux e i protocolli per Packet Radio.

  Il protocollo AX.25 offre la possibilit di lavorare o meno in modo
  connesso, ed  usato sia da solo in collegamenti punto-punto, che per
  trasporto di altri protocolli come il TCP/IP e NetRom



  La sua struttura  simile all'AX.25 level 2, con alcune estensioni che
  lo rendono pi adatto all'ambito radioamatoriale.


  Il protocollo NetRom rappresenta un tentativo di realizzare un
  protocollo di rete completo e usa AX.25 al livello pi basso come
  protocollo dati. Presenta un livello di rete che  una forma adattata
  di AX.25 e offre il routing dinamico e l'alias dei nodi.



  Il protocollo Rose fu concepito ed implementato da Tom Moulton W2VY
  come un'implementazione del livello di pacchetto di AX.25 che viene
  usato a sua volta a livello dati, funzionando anche a livello di rete.
  L'indirizzamento in Rose  costituito da un numero a 10 cifre.  Le
  prime quattro rappresentano il Codice Identificativo dei Dati di rete
  (Data Network Identification Code) (DNIC) come indicato dalla
  Raccomandazione CCIT X.121 Appendice B. Maggiori informazioni sul
  protocollo Rose si possono trovare sul RATS Web server
  <http://www.rats.org/>.


  Alan Cox  stato lo sviluppatore del primo supporto AX.25 per il
  kernel di Linux, che  stato successivamente preso in carico da
  Jonathon Naylor <g4klx@g4klx.demon.co.uk> che ha aggiunto anche il
  supporto per NetRom e Rose. Il supporto per il protocollo DAMA  stato
  sviluppato da Joerg, DL1BKE, jreuter@poboxes.com mentre il supporto
  per il Baycom e il SoundModem  stato aggiunto da Thomas Sailer,
  <sailer@ife.ee.ethz.ch>. Il supporto e lo sviluppo delle utility
  software per AX.25  ora gestita da Terry Dawson, autore di queste
  note.


  Linux supporta i TNC (Terminal Node Controllers) in modo KISS,
  l'Ottawa PI card, la Gracilis PacketTwin card  e le altre schede SCC
  basate su Z8530 attraverso l'apposito driver, nonch il modem Baycom
  seriale e parallelo. Il nuovo driver soundmodem di Thomas Sailer
  permette l'utilizzo come modem della SoundBlaster e delle schede
  sonore basate sul chipset crystal.


  Il pacchetto User contiene un semplice PMS (Personal Message System),
  un beacon, un programma a linea di comando per effettuare connessioni,
  `listen' un esempio su come catturare tutti i pacchetti AX.25 a
  livello di interfaccia e programmi per configurare il protocollo
  NetRom. E' incluso anche un programma tipo server AX.25 per gestire ed
  instradare connessioni AX.25 e un demone NetRom che svolge la maggior
  parte del lavoro di supporto per questo protocollo.
  3.1.  Come tutto si combina assieme.


  Quella di Linux  un'implementazione di AX.25 piuttosto nuova. Sebbene
  somigli in molti modi a quella di NOS, BPQ o altre implementazioni
  AX.25, non  uguale a nessuna di queste. L'AX.25 di Linux  in grado
  di essere configurato in modo tale da poter comportarsi praticamente
  come altre implementazioni, ma il processo di configurazione  del
  tutto diverso.


  Per aiutarvi a capire a cosa occorra pensare mentre si effettua la
  configurazione, questa sezione descrive alcune delle caratteristiche
  strutturali dell'implementazione AX.25 e come  questa si inserisce nel
  contesto dell'intera struttura di Linux.

  Diagramma semplificato dei livelli dei protocolli di rete


       -----------------------------------------------
       | AF_AX25 | AF_NETROM |  AF_INET    | AF_ROSE |
       |=========|===========|=============|=========|
       |         |           |             |         |
       |         |           |    TCP/IP   |         |
       |         |           ----------    |         |
       |         |   NetRom           |    | Rose    |
       |         -------------------------------------
       |            AX.25                            |
       -----------------------------------------------




  Questo diagramma illustra con chiarezza come NetRom, Rose e TCP/IP
  lavorino sopra l'AX.25, ma che ognuno di questi sia considerato come
  un diverso protocollo a livello applicazione.

  I nomi `AF_' sono semplicemente quelli dati alla `Address Family' di
  ognuno di questi, quando si scrivono programmi che li utilizzano. Si
  noti l'implicita dipendenza dalla configurazione della parte AX.25
  presente in quelle di NetRom Rose o del TCP/IP.



  Moduli software presenti nell'implementazione di rete di Linux

  ------------------------------------------------------------------------------------
   Utente  | Programmi |   call   node    ||  Demoni  | ax25d  mheardd
           |           |   pms    mheard  ||          | inetd  netromd
  ------------------------------------------------------------------------------------
           | Socket    | open(), close(), listen(), read(), write(), connect()
           |           |
           |           |--------------------------------------------------------------
           |           |    AF_AX25   |  AF_NETROM  |  AF_ROSE   |  AF_INET
           |--------------------------------------------------------------------------
  Kernel   | Protocolli|    AX.25     |   NetRom    |     Rose    |  IP/TCP/UDP
           |--------------------------------------------------------------------------
           | Devices   |    ax0,ax1   |  nr0,nr1    | rose0,rose1 | eth0,ppp0
           |--------------------------------------------------------------------------
           | Drivers   |  Kiss   PI2   PacketTwin   SCC   BPQ     | slip ppp
           |           |      Soundmodem      Baycom              | ethernet
  ------------------------------------------------------------------------------------
  Hardware | Scheda PI2, Scheda PacketTwin, Scheda SCC, Porta Seriale, Scheda Ethernet
  ------------------------------------------------------------------------------------
  -------

  Questo diagramma  un po' pi esteso di quello precedente e vuole
  mostrare la relazione che intercorre tra le applicazioni utente, il
  kernel e l'hardware. In particolare si nota il rapporto esistente tra
  le interfacce di programmazione delle applicazioni (API) a livello di
  Socket, i moduli relativi ai vari protocolli, i device di rete del
  kernel e l'hardware.

  Ogni cosa in questo diagramma dipende da ci che  indicato sotto di
  lui, quindi in generale le parti da configurare devono essere fatte
  dal basso verso l'alto. Se, per esempio, si vuole far funzionare il
  programma call occorre configurare l'hardware, poi assicurarsi che il
  kernel abbia l'opportuno device driver, che sia stata creata
  l'opportuno device di rete e che il kernel  includa il protocollo
  desiderato che a sua volta possa essere utilizzato dal programma call.
  La stesura di questo documento ricalca a grandi linee quest'ordine.



  4.  I componenti software per AX.25/NetRom/Rose.


  Il software per AX.25  costituito da tre componenti: il kernel, gli
  strumenti (tools) di configurazione di rete e i programmi di utilit.


  Il kernel di Linux, dalla versione 2.0.0 in poi include i driver per
  AX.25, NetRom, Z8530 SCC, schede PI e i driver PacketTwin. Questi
  driver, nelle versioni 2.1.* del kernel sono stati significativamente
  migliorati; sfortunatamente i kernel con questa versione contengono
  codice non molto stabile e ci non li rende adatti per un sistema che
  non sia di test. Per ovviare a questo problema Jonathon Naylor ha
  preparato un kit di aggiornamento in grado di garantire gi sul kernel
  2.0.28 le caratteristiche dei kernel 2.1.*. Questo kit  molto
  semplice da installare e permette di disporre di diversi miglioramenti
  non presenti nel kernel standard, come ad esempio il supporto per
  Rose.



  4.1.  Dove reperire il kernel, i tools e i programmi di utilit.



  4.1.1.  I sorgenti del kernel:

  I sorgenti del kernel si possono trovare nel loro solito posto presso:
  ftp.kernel.org


       /pub/linux/kernel/v2.0/linux-2.0.31.tar.gz




  La versione corrente dell'aggiornamento per AX.25  disponibile su:
  ftp.pspt.fi


       /pub/linux/ham/ax25/ax25-module-14e.tar.gz







  4.1.2.  Gli strumenti (tools) di configurazione di rete:

  L'ultima versione alfa degli strumenti standard di configurazione di
  rete AX.25 e NetRom per Linux si trova presso: ftp.inka.de


       /pub/comp/Linux/networking/net-tools/net-tools-1.33.tar.gz





  L'ultimo pacchetto ipfwadm si trova su: ftp.xos.nl


       /pub/linux/ipfwadm/





  4.1.3.  Le AX25 utility:


  Ci sono due diverse famiglie di AX25-utilities. Una  per i kernel
  2.0.* e l'altra funziona sia per per i kernel 2.1.*  che quelli
  2.0.*+moduleXX. Il numero di versione delle ax25-utils   quello del
  kernel pi vecchio col quale queste funzionano, quindi occorre usare
  quello adatto al vostro kernel.  Quelle che seguono sono combinazioni
  kernel-ax25-utils funzionanti.  bisogna usare una di queste, perch
  altre non funzioneranno del tutto o in parte.



       Kernel Linux             AX25 Utility
       ----------------------   -------------------------
       linux-2.0.29             ax25-utils-2.0.12c.tar.gz **
       linux-2.0.28+module12    ax25-utils-2.1.22b.tar.gz **
       linux-2.0.30+module14c   ax25-utils-2.1.42a.tar.gz
       linux-2.0.31+module14d   ax25-utils-2.1.42a.tar.gz
       linux-2.1.22 ++          ax25-utils-2.1.22b.tar.gz
       linux-2.1.42 ++          ax25-utils-2.1.42a.tar.gz




  Nota: la serie delle  ax25-utils-2.0.* (indicate sopra con '**' ) 
  ora obsoleta e non pi supportata. Questo documento  relativo alle
  configurazioni indicate sopra. Dato che ci sono delle differenze tra
  una versione e l'altra, la maggior parte delle informazioni date in
  questo documento saranno relative all'ultima versione dei programmi.


  Le AX.25 utility si trovano su: ftp.pspt.fi
  <ftp://ftp.pspt.fi/pub/linux/ham/ax25/>

  o su: sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>


  5.  Installazione del software per AX.25/NetRom/Rose.


  Per installare correttamente il supporto per AX.25 sulla vostra
  macchina Linux, occorre configurare ed installare un kernel
  appropriato e poi installare le corrispondenti utility AX.25

  5.1.  La compilazione del kernel.


  Se avete gi familiarit col processo di compilazione del Kernel
  potete saltare questa sezione; state ben attenti, comunque a
  selezionare le opzioni appropriate, che verranno trattate diffusamente
  qua sotto.


  Il posto usuale in cui si decomprime il sorgente kernel  la directory
  /usr/src, nella quale viene creata una sottodirectory linux. Per fare
  ci occorre essere loggati come root ed eseguire una serie di comandi
  come questi:



       # mv linux linux.old
       # cd /usr/src
       # tar xvfz linux-2.0.31.tar.gz
       # tar xvfz /pub/net/ax25/ax25-module-14e.tar.gz
       # patch -p0 </usr/src/ax25-module-14/ax25-2.0.31-2.1.47-2.diff
       # cd linux




  Dopo aver decompresso il sorgente del kernel ed applicato
  l'aggiornamento, occorre eseguire lo script di configurazione e
  scegliere le opzioni che permettono al kernel di adattarsi al vostro
  hardware, e le funzionalit che volete che siano implementate nel
  kernel stesso. Per fare ci usate il comando:




       # make menuconfig




  Oppure potete usare:



       # make config




  Descriver il metodo di configurazione a menu (menuconfig) perch 
  pi comodo e semplice nella scelta delle opzioni, ma potete usare
  anche l'altro, se vi trovate pi a vostro agio.


  In entrambi i casi vi verranno proposte una serie di opzioni alle
  quali dovete rispondere `Y' (s) o `N' (no) (potreste anche voler
  rispondere `M' se siete intenzionati ad usare i moduli del kernel, ma
  per semplicit supponiamo che non lo siate).


  Le opzioni pi importanti per la parte di configurazione relativa
  all'AX.25 sono:




  Code maturity level options  --->
      ...
      [*] Prompt for development and/or incomplete code/drivers
      ...
  General setup  --->
      ...
      [*] Networking support
      ...
  Networking options  --->
      ...
      [*] TCP/IP networking
      [?] IP: forwarding/gatewaying
      ...
      [?] IP: tunneling
      ...
      [?] IP: Allow large windows (not recommended if <16Mb of memory)
      ...
      [*] Amateur Radio AX.25 Level 2
      [?] Amateur Radio NET/ROM
      [?] Amateur Radio X.25 PLP (Rose)
      ...
  Network device support  --->
      [*] Network device support
      ...
      [*] Radio network interfaces
      [?] BAYCOM ser12 and par96 driver for AX.25
      [?] Soundcard modem driver for AX.25
      [?] Soundmodem support for Soundblaster and compatible cards
      [?] Soundmodem support for WSS and Crystal cards
      [?] Soundmodem support for 1200 baud AFSK modulation
      [?] Soundmodem support for 4800 baud HAPN-1 modulation
      [?] Soundmodem support for 9600 baud FSK G3RUH modulation
      [?] Serial port KISS driver for AX.25
      [?] BPQ Ethernet driver for AX.25
      [?] Gracilis PackeTwin support for AX.25
      [?] Ottawa PI and PI/2 support for AX.25
      [?] Z8530 SCC KISS emulation driver for AX.25
      ...



  Le opzioni che ho indicato con `*' sono quelle alle quali si deve
  rispondere `Y'. Il resto dipende da che hardware avete e quali altre
  opzioni volete includere. Alcune di queste saranno descritte pi
  avanti in dettaglio, per cui se non sapete ancora che funzionalit
  implementare, andate avanti nella lettura e ritornate su questo
  argomento pi tardi.



  Dopo aver completato la configurazione del kernel dovreste essere in
  grado di compilarlo senza problemi:



       # make dep
       # make clean
       # make zImage




  Assicuratevi di spostare il file del kernel arch/i386/boot/zImage nel
  posto in cui lo ritenete pi opportuno, di editare il vostro file
  /etc/lilo.conf e rieseguire lilo per essere sicuri che il nuovo boot
  di Linux avvenga con nuovo kernel.
  5.1.1.  Una parola sui moduli del Kernel.


  Suggerisco di non compilare alcun driver come modulo, poich cos
  facendo non si guadagna in altro che in complessit. Molti hanno
  incontrato problemi tentando di far funzionare le parti modularizzate,
  non perch il software abbia dei problemi, ma perch l'uso dei moduli
  rende pi complessa la fase di installazione e configurazione del
  sistema.


  Se comunque avete scelto di compilare qualche componente come moduli,
  occorre dare questi comandi:



       # make modules
       # make modules_install




  per installare opportunamente i vostri moduli.


  Occorrer inoltre aggiungere/modificare le seguenti voci nel vostro
  file /etc/conf.modules in modo che il programma kerneld sappia come
  gestire i moduli in modo corretto.



       alias net-pf-3     ax25
       alias net-pf-6     netrom
       alias net-pf-11    rose
       alias tty-ldisc-1  slip
       alias tty-ldisc-3  ppp
       alias tty-ldisc-5  mkiss
       alias bc0          baycom
       alias nr0          netrom
       alias pi0a         pi2
       alias pt0a         pt
       alias scc0         optoscc    (o uno degli altri drivers scc)
       alias sm0          soundmodem
       alias tunl0        newtunnel
       alias char-major-4 serial
       alias char-major-5 serial
       alias char-major-6 lp





  5.1.2.  Le novit dei kernel 2.0.*+ModuleXX o 2.1.*


  I kernel 2.1.* presentano una versione migliorata di quasi tutti i
  protocolli e drivers. I miglioramenti pi significativi sono:

     modularizzazione
        i protocolli e i driver sono stati modularizzati in modo che li
        possiate aggiungere o togliere con insmod e rmmod. Questo riduce
        il fabbisogno di memoria del kernel per moduli usati poco
        frequentemente e rende  pi semplici lo sviluppo e la ricerca di
        errori. Come detto, per, rende anche un po' pi complessa la
        configurazione.

     Tutti i driver sono driver di rete
        tutti i device di rete come Baycom, SCC, PI, Packettwin
        eccetera, si presentano come normali interfacce di rete, come ad
        esempio il driver ethernet; non sono pi come dei TNC kiss. Un
        nuovo programma di  utilit chiamato net2kiss consente
        all'occorrenza di creare un'interfaccia kiss per questi device


     Correzione di bug
        Sono stati corretti molti problemi e aggiunte nuove
        funzionalit, tra cui il protocollo Rose  una delle pi
        significative.



  5.2.  I programmi di configurazione della rete (nettools).


  Una volta compilato il kernel, occorre compilare i nuovi programmi di
  configurazione della rete. Questi permettono di modificare la
  configurazione dei device di rete e di aggiungere voci di
  instradamento (route) alla tabella di instradamento (routing table).


  La nuova versione alfa del pacchetto standard net-tools include il
  supporto per AX.25 e NetRom. Io l'ho testato e sembra funzionare
  correttamente.


  5.2.1.  Un'aggiunta per correggere alcuni bug e avere il supporto per
  Rose.


  Il pacchetto standard net-tools-1.33.tar.gz ha alcuni piccoli bachi
  nel supporto dei protocolli AX.25 e NetRom. Ho dunque realizzato una
  piccola correzione per risolverli e aggiungere nel contempo il
  supporto per il protocollo Rose.


  Potete scaricarla da: zone.pspt.fi
  <ftp://zone.pspt.fi/pub/linux/ham/ax25/net-tools-1.33.rose.tjd.di
  ff.gz>.



  5.2.2.  Come compilare la versione standard di net-tools.


  Non dimenticate di leggere il file Release e di seguire le istruzioni
  in esso contenute. I comandi per compilare sono:



       # cd /usr/src
       # tar xvfz net-tools-1.33.tar.gz
       # zcat net-tools-1.33.rose.tjd.diff.gz | patch -p0
       # cd net-tools-1.33
       # make config




  A questo punto vi verranno fatte una serie di domande per effettuare
  la configurazione simili a quelle trovate nel kernel.  Assicuratevi di
  includere il supporto per tutti i protocolli che volete usare. Se non
  sapete cosa rispondere ad una particolare domanda, rispondete `Y'.
  Alla fine della compilazione occorre fare:



       # make install




  per installare il programma correttamente




  Se siete intenzionati ad usare funzioni di IP firewall, vi occorrono i
  pi recenti strumenti di amministrazione di firewall presenti nel
  pacchetto ipfwadm. Questo tool sostituisce il vecchio ipfw che non
  funziona coi nuovo kernel.


  Ho compilato ipfwadm coi seguenti comandi:


       # cd /usr/src
       # tar xvfz ipfwadm-2.0beta2.tar.gz
       # cd ipfwadm-2.0beta2
       # make install
       # cp ipfwadm.8 /usr/man/man8
       # cp ipfw.4 /usr/man/man4





  5.3.  I programmi AX.25.


  Una volta compilato in nuovo kernel e fatto il reboot con questo,
  occorre compilare i programmi per l'utente. Per compilarli e
  installarli occorre dare una sequenza di comandi simili a questi:



       # cd /usr/src
       # tar xvfz ax25-utils-2.1.42a.tar.gz
       # cd ax25-utils-2.1.42a
       # make config
       # make
       # make install




  Questi file verranno installati come scelta predefinita sotto la
  directory /usr nei direttori bin, sbin, etc e man.



  Se sulla vostra macchina non sono mai state installati i programmi per
  AX.25, dovete dare anche il comando:


       # make installconf



  per installare anche alcune configurazioni di esempio nella directory
  /etc/ax25/ su cui provare a mettere le mani.



  Se durante la compilazione vi escono messaggi del tipo:

  gcc -Wall -Wstrict-prototypes -O2 -I../lib -c call.c
  call.c: In function `statline':
  call.c:268: warning: implicit declaration of function `attron'
  call.c:268: `A_REVERSE' undeclared (first use this function)
  call.c:268: (Each undeclared identifier is reported only once
  call.c:268: for each function it appears in.)



  dovete controllare con la massima attenzione di avere il pacchetto
  ncurses installato correttamente sul vostro sistema. Lo script di
  configurazione cerca le ncurses nelle directory standard, ma alcune
  installazioni le installano in modo non corretto per cui non  in
  grado di trovarle.



  6.  Due parole prima di partire sui nominativi, indirizzi e simili.


  Ogni porta AX.25 e NetRom sul vostro sistema deve avere un
  nominativo/ssid associato ad essa. Queste sono configurate nei file di
  configurazione che saranno descritti in dettaglio tra poco.


  Alcune implementazioni AX.25 come NOS e BPQ permettono per, di
  configurare lo stesso nominativo/ssid sulla stessa porta AX.25 e
  NetRom, ma per ragioni tecniche un po' complesse, Linux non lo
  consente; questo, alla fine, non  un grosso problema, come potrebbe
  sembrare a prima vista.



  Occorre dunque tenere a mente le seguenti cose, mentre si configura il
  proprio sistema:



  1. Ogni porta AX.25 e NetRom deve essere configurata con un singolo
     nominativo/ssid

  2. Il TCP/IP usa il nominativo/ssid della porta usata per ricevere o
     trasmettere dati, cio quella configurata per l'interfaccia AX.25
     al punto 1.

  3. Il NetRom usa il nominativo/ssid  specificato nel proprio file di
     configurazione, ma esso viene usato solo quando si parla con un
     altra stazione NetRom; questo non  il nominativo/ssid che useranno
     gli utenti AX.25 che intendono usare il vostro `nodo' NetRom. Ne
     parleremo pi diffusamente tra un po'.

  4. Il Rose usa di default il nominativo/ssid  delle porte AX.25,
     eccetto il caso che il nominativo per Rose sia stato espressamente
     settato col comando `rsparms'. In questo caso il Rose utilizzer il
     nominativo/ssid  scelto per tutte le porte.

  5. Altri programmi, come `ax25d' possono usare ogni nominativo/ssid
     per ascoltare, e ci pu essere duplicato su diverse porte.

  6. Se si effettua un attenta operazione di routing, si pu usare, se
     si vuole, lo stesso indirizzo IP su tutte le porte.


  6.1.  Il significato di T1, T2, N2 eccetera.


  Non tutte le implementazioni AX.25 sono quelle di un TNC2. Linux usa
  una nomenclatura che si differenzia leggermente da quella di chi ha
  fatto packet solamente con un TNC. La tabella che segue dovrebbe
  essere d'aiuto per capire ognuna delle variabili di configurazione, in
  modo da poterne capire il significato quando se ne parler di nuovo
  pi avanti.



       -------------------------------------------------------------------
       Linux  | TAPR TNC | Descrizione
       -------------------------------------------------------------------
       T1     | FRACK    | Tempo di attesa prima di ritrasmettere
              |          | un frame non confermato (senza acknowledge)
       -------------------------------------------------------------------
       T2     | RESPTIME | Tempo minimo di attesa di ricezione
              |          | di un altro frame prima dell'invio
              |          | della conferma.
       -------------------------------------------------------------------
       T3     | CHECK    | Periodo di attesa prima di inviare un segnale
              |          | che controlli se il collegamento  ancora attivo.
       -------------------------------------------------------------------
       N2     | RETRY    | Quante volte ritrasmettere un frame prima
              |          | di considerare interrotta la connessione.
       -------------------------------------------------------------------
       Idle   |          | Periodo di inattivit della connessione
              |          | prima di essere interrotta.
       -------------------------------------------------------------------
       Window | MAXFRAME | Massimo numero di frame trasmessi senza
              |          | avere conferma di ricezione.
       -------------------------------------------------------------------





  6.2.  Parametri configurabili durante il funzionamento.

  I kernel 2.1.* e 2.0.* +moduleXX hanno la nuova propriet di poter
  cambiare durante il funzionamento parametri che precedentemente non
  era possibile modificare. Se si controlla con attenzione la directory
  /proc/sys/net/ si possono notare diversi file con nomi che descrivono
  diversi parametri della configurazione della rete. Ognuno dei file
  nella directory /proc/sys/net/ax25/ rappresenta una porta AX.25
  configurata.  Il nome del file si riferisce al nome della porta.



  La struttura dei file in /proc/sys/net/ax25/<portname>/  la seguente:










  Nome File             Significato           Valori             Default
  ip_default_mode       Modo IP di default    0=DG 1=VC                0
  ax25_default_mode     Modo AX.25 di default 0=Normale 1=Esteso       0
  backoff_type          Backoff               0=Lineare 1=Esponenziale 1
  connect_mode          Modo Connesso         0=No 1=S                1
  standard_window_size  Finestra Standard     1  <= N <= 7             2
  extended_window_size  Finestra Estesa       1  <= N <= 63            32
  t1_timeout            Valore di T1          1s <= N <= 30s           10s
  t2_timeout            Valore di T2          1s <= N <= 20s           3s
  t3_timeout            Valore di T3          0s <= N <= 3600s         300s
  idle_timeout          Valore di Idle        0m <= N                  20m
  maximum_retry_count   N2                    1  <= N <= 31            10
  maximum_packet_length Lunghezza frame AX.25 1  <= N <= 512           256



  Nella tabella T1, T2 e T3 sono dati in secondi, mentre quello di Idle
   in minuti. Si noti, per, che i valori usati nell'interfaccia sysctl
  sono dati in unit interne, dove il tempo in secondi  moltiplicato
  per 10 in modo da avere una risoluzione di 1/10 di secondo. Ponendo
  pari a zero i valori che lo permettono (come T3 e Idle) li si
  disabilita.



  La struttura dei file in /proc/sys/net/netrom/  la seguente:

  Nome File                      Valori                  Default
  default_path_quality                                   10
  link_fails_count                                       2
  network_ttl_initialiser                                16
  obsolescence_count_initialiser                         6
  routing_control                                        1
  transport_acknowledge_delay                            50
  transport_busy_delay                                   1800
  transport_maximum_tries                                3
  transport_requested_window_size                        4
  transport_timeout                                      1200





  La struttura dei file in /proc/sys/net/rose/ la seguente:


  Nome File                      Valori                  Default
  acknowledge_hold_back_timeout                          50
  call_request_timeout                                   2000
  clear_request_timeout                                  1800
  link_fail_timeout                                      1200
  maximum_virtual_circuits                               50
  reset_request_timeout                                  1800
  restart_request_timeout                                1800
  routing_control                                        1
  window_size                                            3





  Per modificare un parametro, tutto ci che occorre  scrivere il
  valore desiderato nel file stesso; ad esempio per controllare e
  modificare la grandezza della finestra Rose, si pu usare ad esempio:


  # cat /proc/sys/net/rose/window_size 3
  # echo 4 >/proc/sys/net/rose/window_size
  # cat /proc/sys/net/rose/window_size 4





  7.  Configurazione di una porta AX.25.


  Ogni applicazione che fa uso del protocollo AX.25 legge un file di
  configurazione per sapere i parametri delle varie porte AX.25 attivate
  sulla macchina Linux. Il file in questione  /etc/ax25/axport e
  occorre che vi sia una voce per ognuna delle porte attive.


  7.1.  Creazione del device di rete AX.25.


  Il device di rete  ci che viene manipolato quando si usa il comando
  `ifconfig'. E' l'oggetto attraverso il quale il kernel di Linux
  spedisce e riceve i dati. Quasi sempre un device di rete ha una porta
  fisica ad esso associato, ma vi sono casi in cui ci non  necessario.
  Il device di rete fa riferimento direttamente a un device driver.



  Nel codice AX.25 di Linux ci sono diversi device driver. Il pi comune
   probabilmente il driver KISS, ma ci sono anche i driver SCC, Baycom
  e SoundModem.


  Ogni device driver, quando viene lanciato, crea un device di rete.


  7.1.1.  Creazione di un device KISS

  Opzioni di compilazione del Kernel:


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Serial port KISS driver for AX.25




  Probabilmente la configurazione pi comune  quella con un TNC KISS su
  una porta seriale. Visto che occorre partire col TNC in modo KISS,
  dopo averlo connesso alla porta seriale, lo si pu configurare con
  programmi di comunicazione come minicom o seyon.





  Per creare un device KISS si usa il programma kissattach. Nella sua
  forma pi semplice si pu usare questo programma come segue:



  # /usr/sbin/kissattach /dev/ttyS0 radio
  # kissparms -p radio -t 100 -s 100 -r 25




  Il comando kissattach crea in device di rete di tipo KISS. I device di
  questo tipo hanno nome `ax[0-9]'. La prima volta che si usa kissattach
  viene creato `ax0', la seconda `ax1' e cos via. Ogni device KISS ha
  associato una porta seriale.



  Il comando kissparms permette di modificare i parametri di un device
  KISS


  In particolare nell'ultimo esempio viene creato un device KISS usando
  il device della porta seriale `/dev/ttyS0' e la voce nel file
  /etc/ax25/axports con una porta chiamata `radio' che viene configurata
  inoltre con un txdelay e uno slottime di 100 millisecondi, nonch con
  un valore di ppersist pari a 25


  Per maggiori informazioni potete far riferimento alle pagine man


  7.1.1.1.  Configurazione di un TNC Dual Port


  L'utility mkiss inclusa in ax25-utils permette di usare entrambi i
  modem di un TNC dual port. La configurazione  piuttosto semplice e
  consiste nel prendere un singolo device seriale connesso ad un singolo
  TNC multiporta e facendolo apparire come diversi device connessi
  ognuno ad un TNC single port. Questa operazione va fatta prima di ogni
  configurazione della parte AX.25. I device sui quali si effettua la
  configurazione AX.25 sono interfacce pseudo-TTY, (/dev/ttyq*), e non
  gli effettivi device seriali.

  I device pseudo-TTY creano una specie di tunnel detto pipe attraverso
  il  quale possono parlarsi i programmi che devono colloquiare con i
  device TTY.  Ogni pipe  composta da una parte master e da una parte
  slave. La parte master  in genere chiamata `/dev/ptyq*', mentre
  quella slave  chiamata `/dev/ttyq*'. C' una relazione uno a uno tra
  master e slave, quindi, ad esempio, /dev/ptyq0  la parte master di
  una pipe che ha /dev/ttyq0 come slave.  Occorre aprire per prima la
  parte master di una pipe. mkiss sfrutta questo meccanismo per dividere
  una singola porta seriale in diversi device.




  Esempio: nel caso di un TNC dual port connesso alla porta seriale
  /dev/ttyS0 a 9600 bps, i comandi



       # /usr/sbin/mkiss -s 9600 /dev/ttyS0 /dev/ptyq0 /dev/ptyq1
       # /usr/sbin/kissattach /dev/ttyq0 port1
       # /usr/sbin/kissattach /dev/ttyq1 port2




  creano due device pseudo-tty ognuna delle quali si comporta come un
  TNC single port. A questo punto si pu usare /dev/ttyq0 e /dev/ttyq1
  come se fossero dei normali device seriali con un TNC connesso. Questo
  significa che si dovr usare kissattach per ognuna di essi, come
  descritto nell'esempio sopra per le porte AX.25 chiamate port1 e
  port2. Non si deve usare kissattach sulla porta seriale vera poich
  viene usata dal programma mkiss.



  Il programma mkiss ha diversi argomenti opzionali che possono essere
  usati:

     -c aggiunge un byte di checksum per ogni frame KISS; la maggior
        parte delle implementazioni non supporta questa opzione, che 
        invece presente in quella di G8BPG

     -s <velocit>
        modifica la velocit della porta seriale.

     -h abilita l'handshaking hardware sulla porta seriale; 
        disabilitata di default poich quest'opzione non  supportata
        dalla maggior parte delle implementazioni KISS.

     -l abilita il logging delle informazioni nel file syslog.


  7.1.2.  Creazione di un device Baycom.

  Opzioni di compilazione del Kernel:


       Code maturity level options  --->
           [*] Prompt for development and/or incomplete code/drivers
       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] BAYCOM ser12 and par96 driver for AX.25




  Thomas Sailer, <sailer@ife.ee.ethz.ch>, a dispetto del luogo comune
  che non funzioni bene(?), ha sviluppato il supporto Linux per i modem
  Baycom. Il suo driver supporta il modem seriale Ser12 e i modem
  paralleli Par96 e PicPar.  Maggiori informazioni sui modem possono
  essere reperite presso il Baycom Web site <http://www.baycom.de/>.



  Il primo passo da compiere  quello di determinare gli indirizzi di
  I/O della porta seriale o parallela alla quale  connesso il Baycom.
  Una volta fatto, si possono usare queste informazioni per configurare
  il driver.



  Il driver Baycom, alla configurazione, crea dei device di rete
  chiamati bc0, bc1, bc2 ecc.


  L'utility sethdlc permette di configurare i parametri del driver, cosa
  che pu essere fatta anche nella linea di comando di insmod al
  caricamento del modulo di controllo del Baycom

  Segue una piccola configurazione di esempio che:

  Disabilita il driver seriale per COM1 (per evitare conflitti, visto
  che accede alla stessa porta fisica del Baycom) e configura il driver
  Ser12 per un Baycom connesso a COM1 con il rilevamento software di
  portante (DCD) attivato.


       # setserial /dev/ttyS0 uart none
       # insmod hdlcdrv
       # insmod baycom mode="ser12*" iobase=0x3f8 irq=4




  Installa un Baycom Parallelo su LPT1 usando il rilevamento DCD
  hardware.



       # insmod hdlcdrv
       # insmod baycom mode="par96" iobase=0x378 irq=7 options=0




  Questo modo di configurare il driver per Baycom in realt non  molto
  consigliato, visto che l'utility sethdlc funziona senza problemi anche
  con un solo dispositivo connesso.



  Le pagine man di sethdlc contengono tutti i dettagli relativi a questo
  comando, tuttavia si forniscono un paio di esempi per illustrare gli
  aspetti pi importanti di questo tipo di configurazione. Gli esempi
  presuppongono che sia gi stato caricato il modulo per il supporto del
  Baycom coi comandi


       # insmod hdlcdrv
       # insmod baycom




  o che il kernel sia stato compilato col supporto Baycom al suo
  interno.


  Configurazione del device driver bc0 come modem Baycom parallelo su
  LPT1 con DCD software:


       # sethdlc -p -i bc0 mode par96 io 0x378 irq 7





  Configurazione del device driver bc1 come modem Baycom seriale su COM1
  :


       # sethdlc -p -i bc1 mode "ser12*" io 0x3f8 irq 4


  7.1.3.  Configurazione dei parametri dei accesso al canale AX.25.


  I parametri di accesso al canale AX.25 sono equivalenti ai parametri
  KISS ppersist, txdelay e slottime. La loro modifica si effettua ancora
  una volta col comando sethdlc .


  Segue un esempio; per maggiori informazioni la pagina man relativa a
  sethdlc  il posto  pi indicato dove reperire le informazioni pi
  dettagliate.


  Configurazione del device bc0 con TxDelay di 200 mS, SlotTime di 100
  mS, PPersist di 40 in modalit half duplex:



       # sethdlc -i bc0 -a txd 200 slot 100 ppersist 40 half




  Si noti che i valori di temporizzazione sono in millisecondi.


  7.1.3.1.  Configurazione del Kernel AX.25 per l'uso con un modem Bay
  com


  Il driver Baycom crea dei device di rete standard che il codice del
  Kernel AX.25  in grado di sfruttare. La configurazione 
  sostanzialmente la stessa di quella per una scheda PI o PacketTwin.


  Il primo passo  quello di configurare il device con un nominativo
  AX.25. L'utility ifconfig pu essere utile allo scopo.


       # /sbin/ifconfig bc0 hw ax25 VK2KTJ-15 up




  assegna al device Baycom bc0 il nominativo AX.25 VK2KTJ-15.  In
  alternativa sarebbe possibile usare il comando axparms, ma
  occorrerebbe sempre l'uso di ifconfig per attivare il device.


       # ifconfig bc0 up
       # axparms -setcall bc0 vk2ktj-15





  Il passo successivo  quello di creare una voce nel file
  /etc/ax25/axports come si farebbe per ogni altro device. La voce nel
  file axports  associata col device di rete configurato per il
  nominativo ad esso legato. La voce nel file axports che ha il
  nominativo con il qual si  configurato il devide BayCom  quella che
  verr usata per riferirlo.


  A questo punto si user il nuovo device AX.25 come ogni altro; lo si
  potr configurare per l'uso col TCP/IP, aggiungerlo ad ax25d e usarci
  sopra NetRom e Rose a proprio piacimento.


  7.1.4.  Creazione di un device SoundModem.

  Opzioni di compilazione del Kernel:


       Code maturity level options  --->
           [*] Prompt for development and/or incomplete code/drivers
       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Soundcard modem driver for AX.25
           [?] Soundmodem support for Soundblaster and compatible cards
           [?] Soundmodem support for WSS and Crystal cards
           [?] Soundmodem support for 1200 baud AFSK modulation
           [?] Soundmodem support for 4800 baud HAPN-1 modulation
           [?] Soundmodem support for 9600 baud FSK G3RUH modulation




  Thomas Sailer ha sviluppato un nuovo driver per il kernel che permette
  l'uso come modem della scheda audio che, una volta connessa
  direttamente alla radio, pu essere usata per fare packet. L'autore
  raccomanda di usare per lo meno un 486DX2/66 con questo sistema,
  poich tutta la parte di elaborazione del segnale digitale  compiuta
  dalla CPU del calcolatore.



  Attualmente il driver emula i modem 1200 bps AFSK, 4800 HAPN e 9600
  FSK (compatibile G3RUH). Le uniche schede audio attualmente supportate
  sono quelle compatibili SoundBlaster e WindowsSoundSystem.  Questo
  sistema richiede un circuito addizionale, per poter far pilotare dalla
  scheda audio il PTT della radio; per sapere come realizzarlo si pu
  andare alla Thomas's SoundModem PTT circuit web page
  <http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html>. Sono
  possibili diverse opzioni che spaziano dal recuperare l'uscita audio
  della scheda, usare l'uscita di una porta parallela o di una porta
  midi. Esempi di circuito sono sul sito di Thomas Sailer.



  Quando viene configurato, il driver SoundModem crea dei device di rete
  chiamati: sm0, sm1, sm2.

  Nota: il driver SoundModem usa le stesse risorse de driver sonoro di
  Linux, per cui se si vuole usare il modem, occorre accertarsi che il
  driver sonoro non sia installato.  Si puo naturalmente compilare
  entrambi i driver come moduli in modo da inserirli e rimuoverli a
  piacimento.



  7.1.4.1.  Configurazione della scheda audio.


  Il driver SoundModem non inizializza la scheda audio, per cui occorre
  utilizzare l'apposito programma `setcrystal' presente nelle ax25-utils
  che pu essere usato con schede basate sul chipset Crystal (con altre
  schede occorrer usare altri programmi per inizializarle).
  La sua sintassi  piuttosto semplice:


       setcrystal [-w wssio] [-s sbio] [-f synthio] [-i irq] [-d dma] [-c
       dma2]




  Quindi, volendo configurare una SoundBlaster all'indirizzo base di i/o
  0x388, irq 10 e dma 1 si user:


       # setcrystal -s 0x388 -i 10 -d 1




  Mantre per una scheda WindowSoundSystem all'indirizzo base di i/o
  0x534, irq 5 e dma 3 si user:



       # setcrystal -w 0x534 -i 5 -d 3




  Il parametro [-f synthio] modifica l'indirizzo del sintetizzatore,
  mentre [-c dma2] serve per settare il secondo canale DMA per
  permettere operazioni in full duplex



  7.1.4.2.  Configurazione del driver SoundModem.


  Una volta configurata la scheda audio occorre configurare il driver,
  indicandogli l'indirizzo della scheda e che tipo di modem emulare.


  L'utility sethdlc permette di configurare il driver con questi
  parametri o, se si ha solo una scheda audio installata, si pu
  specificarne i parametri dalla linea di comando di insmod quando si
  carica il modulo SoundModem.


  L'esempio seguente configura la SoundBlaster nel modo gi visto
  precedentemente ed in modo da emulare un modem a 1200 bps:


       # insmod hdlcdrv
       # insmod soundmodem mode="sbc:afsk1200" iobase=0x220 irq=5 dma=1




  Non  in effetti il modo migliore per effettuare le modifiche dato
  che, come detto gi precedentemente, l'utility sethdlc funziona senza
  particolari problemi con una o pi device.


  Le pagine man di sethdlc contengono tutti i dettagli relativi a questo
  comando, tuttavia si forniscono un paio di esempi per illustrare gli
  aspetti pi importanti di questo tipo di configurazione. Gli esempi
  presuppongono che sia gi stato caricato il modulo SoundModem coi
  comandi:



       # insmod hdlcdrv
       # insmod soundmodem




  o che il kernel sia stato compilato con incluso il driver.


  Configurazione della scheda WindowsSoundSystem configurata come negli
  esempi precedenti e settata in modo da emulare un modem G3RUH 9600
  compatible come device sm0 usando la porta parallela all'indirizzo
  0x378 per pilotare il Push-To-Talk della radio.


       # sethdlc -p -i sm0 mode wss:fsk9600 io 0x534 irq 5 dma 3 pario 0x378




  Configurazione del driver per supportare la SoundBlaster configurata
  come negli esempi precedenti e settata in modo da emulare un modem
  4800 bps HAPN come device sm1 usando la porta seriale all'indirizzo
  0x2f8 per pilotare il Push-To-Talk della radio.



       # sethdlc -p -i sm1 mode sbc:hapn4800 io 0x388 irq 10 dma 1 serio
       0x2f8




  Configurazione del driver per supportare la SoundBlaster configurata
  come negli esempi precedenti e settata in modo da emulare un modem
  1200 bps AFSK come device sm1 usando la porta seriale all'indirizzo
  0x2f8 per pilotare il Push-To-Talk della radio.



       # sethdlc -p -i sm1 mode sbc:afsk1200 io 0x388 irq 10 dma 1 serio
       0x2f8




  7.1.4.3.  Configurazione dei parametri dei accesso al canale canale
  AX.25.


  I parametri di accesso al canale AX.25 sono equivalenti ai parametri
  KISS ppersist, txdelay e slottime. La loro modifica si effettua ancora
  una volta col comando sethdlc .



  Seguono un paio di esempi; per maggiori informazioni la pagina man
  relativa a sethdlc  il posto  pi indicato dove reperire le
  informazioni pi dettagliate.



  Configurazione del device sm0 con TxDelay di 100 mS, SlotTime di 50
  mS, PPersist di 120 in modalit full duplex:




       # sethdlc -i sm0 -a txd 100 slot 50 ppersist 128 full




  Si noti che i valori di temporizzazione sono in millisecondi.


  7.1.4.4.  Messa a punto del driver e del livello audio.


  Per ogni modem radio  molto importante che i livelli audio siano
  settati correttamente e il SoundModem non fa eccezione. Thomas Sailer
  ha per questo scritto alcne utility che facilitano questo compito,
  chiamate smdiag e smmixer.


     smdiag
        fornisce due tipi di visualizzazione del segnale in ingresso:
        come osilloscopio e con un diagramma ad occhio.


     smmixer
        permette di effettuare l modifica del livello audio in ricezione
        ed in trasmissione.


  Per lanciare l'utility smdiag per il device SoundModem sm0 in modalit
  'diagramma ad occhio' si usa il comando:


       # smdiag -i sm0 -e





  Per lanciare l'utility smmixer per il device SoundModem sm0 si usa il
  comando:



       # smmixer -i sm0






  7.1.4.5.  Configurazione del Kernel AX.25 per l'uso con SoundModem


  Il driver Baycom crea dei device di rete standard che il codice del
  Kernel AX.25  in grado di sfruttare. La configurazione 
  sostanzialmente la stessa di quella per una scheda PI o PacketTwin.



  Il primo passo  quello di configurare il device con un nominativo
  AX.25. l'utility ifconfig pu essere utile allo scopo.
       # /sbin/ifconfig bc0 hw ax25 VK2KTJ-15 up




  assegna al device SoundModem sm0 il nominativo AX.25 VK2KTJ-15. In
  alternativa sarebbe possibile usare il comando axparms, ma
  occorrerebbe sempre l'uso di ifconfig per attivare il device.




       # ifconfig sm0 up
       # axparms -setcall sm0 vk2ktj-15






  Il passo successivo  quello di creare una voce nel file
  /etc/ax25/axports come si farebbe per ogni altro device. La voce nel
  file axports  associato col device di rete configurato per il
  nominativo ad esso legato; verr usata quella col nominativo assegnato
  al device SoundModem.



  A questo punto si user il nuovo device AX.25 come ogni altro; lo si
  potr configurare per l'uso col TCP/IP, aggiungerlo a ax25d e usarci
  sopra NetRom o Rose a proprio piacimento.



  7.1.5.  Creazione di un device per scheda PI.

  Opzione di compilazione del Kernel:


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Ottawa PI and PI/2 support for AX.25





  Il device driver per schede PI crea dei device chiamati `pi[0-9][ab]'.
  La prima scheda PI sar indicata come `pi0', la seconda  `pi1',
  eccetera. Le lettere `a' e `b' si riferiscono rispettivamente alla
  prima e alla seconda interfaccia fisica delle schede PI. Se si 
  compilato il Kernel in modo da includere il driver per la scheda e
  questa  stata riconosciuta dal sistema in modo esatto, si pu usare
  il seguente comando per configurare il device di rete:



       # /sbin/ifconfig pi0a hw ax25 VK2KTJ-15 up




  Questo comando configura ed attiva la prima porta della prima scheda
  PI assegnandole il nominativo VK2KTJ-15. Per usare il dispositivo,
  tutto ci che serve a questo punto  di inserire una voce nel file
  /etc/ax25/axports col medesimo nominativo/ssid.


  Il driver per la scheda PI  stato scritto da David Perry,
  <dp@hydra.carleton.edu>


  7.1.6.  Creazione di un device PacketTwin.

  Opzioni di compilazione del Kernel:


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Gracilis PackeTwin support for AX.25




  Il device driver per la scheda PacketTwin crea i device `pt[0-9][ab]';
  la prima scheda PacketTwin localizzata nel calcolatore sar indicata
  come `pt0', la seconda `pt1' e cos via, mentre`a' and `b' fanno
  riferimento alla prima e alla seconda interfaccia fisica della scheda
  PacketTwin. Una volta compilato il kernel con incluso il driver per la
  scheda PacketTwin, se quest'ultima  stata correttamente riconosciuta,
  si possono usare i seguenti comandi per configurare i device di rete:



       # /sbin/ifconfig pt0a hw ax25 VK2KTJ-15 up





  Questo comando configura e attiva la prima porta della prima scheda
  PacketTwin col nominativo VK2KTJ-15. Per usare il device, tutto ci
  che occorre fare  confiurare una voce nel proprio file
  /etc/ax25/axports con il medesimo nominativo/ssid.



  Il driver per schede PacketTwin  stato scritto da Craig Small VK2XLZ,
  <csmall@triode.apana.org.au>.


  7.1.7.  Creazione di un generico device SCC.

  Opzioni di compilazione del Kernel:


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Z8530 SCC KISS emulation driver for AX.25

  Joerg Reuter, DL1BKE, jreuter@poboxes.com ha sviluppato il supporto
  generico per le schede basate sullo Z8530 SCC. Il suo driver permette
  il supporto di diversi tipi di queste schede e offre una modalit di
  utilizzo simile a quella di un TNC KISS.



  7.1.7.1.  Reperire e compilare i programmi di configurazione.


  Sebbene il driver sia incluso nella distribuzione standard del Kernel,
  Joerg Reuter distribuisce versioni pi recenti del suo driver assieme
  ad una collezione di programmi che ne aiutano la configurazione.



  I programmi di configurazione possono essere scaricati dalla pagina
  web di Joerg <http://www.rat.de/jr/>

  o da:

  db0bm.automation.fh-aachen.de


       /incoming/dl1bke/




  o:

  insl1.etec.uni-karlsruhe.de


       /pub/hamradio/linux/z8530/




  o:

  ftp.ucsd.edu


       /hamradio/packet/tcpip/linux
       /hamradio/packet/tcpip/incoming/






  Troverete diverse versioni; va scelta quella che maggiormente si
  adatta alla versione di Kernel che si intende usare.


  z8530drv-2.4a.dl1bke.tar.gz   2.0.*
  z8530drv-utils-3.0.tar.gz    2.1.6 o superiore





  I seguenti comandi mi hanno permesso di compilare ed installare il
  pacchetto per la versione 2.0.30 del kernel

  # cd /usr/src
  # gzip -dc z8530drv-2.4a.dl1bke.tar.gz | tar xvpofz -
  # cd z8530drv
  # make clean
  # make dep
  # make module         # Se volete avere il driver compilato come modulo
  # make for_kernel     # Se volete avere il driver incluso nel kernel
  # make install





  Dopo aver completato quest'operazione dovreste avere tre nuovi
  programmi installati nella vostra directory /sbin: gencfg, sccinit e
  sccstat. Questi permetteranno di configurare il driver per la scheda.


  Verr anche creato nella directory /dev un un gruppo di device
  speciali chiamati scc0-scc7; questi saranno trattati in dettaglio pi
  avanti e saranno i device `KISS' da utilizzare.


  Se scegliete l'opzione 'make for_kernel' occorrre ricompilare il
  kernel. Per far s che venga incluso il supporto per il driver z8530
  occorre rispondere `Y' alla domanda `Z8530 SCC kiss emulation driver
  for AX.25' che viene fatta dalla procedura di configurazione del
  kernel, ossia quando si d il comando `make config'.


  Se invece avete fatto 'make module', occorre che il nuovo file scc.o
  sia messo nella directory /lib/modules, ma non occorre ricompilare il
  kernel. Si ricordi di usare il comando insmod per caricare il modulo
  prima di provare a configurarlo.


  7.1.7.2.  Configurazione del driver per la propria scheda.


  Il driver per scheda SCC z8530  stato concepito per garantire la
  massima flessibilit e di supportare il maggior numero di schede.
  Questa flessibilit porta per come conseguenza una configurazione
  piuttosto impegnativa.


  Nel paccheto  fornita un'esauriente documentazione che va letta in
  caso di difficolt. In particolare, maggiori informazioni si possono
  trovare in doc/scc_eng.doc or doc/scc_ger.doc. In questo documento
  vengono ripresi i concetti fondamentali, ma si invita a consultare i
  file indicati nel caso si richieda un livello di dettaglio maggiore.


  Il file di configurazione principale  /etc/z8530drv.conf e viene
  letto dal programma sccinit, Questo file   diviso in due parti:
  configurazione dei parametri hardware e configurazione del canale. Una
  volta adattato opportunamente questo file alle vostre esigenze, basta
  aggiungere



       # sccinit





  nel file rc che configura la rete, e il driver sar inizializzato nel
  modo indicato dal file di configurazione. Questa operazione va fatta
  prima di provare ad usare il driver, naturalmente.



  7.1.7.2.1.  Configurazione dei parametri hardware.


  La prima sezione  divisa in due sottoparti, ognuna delle quali
  rappresenta la configurazione per un chip 8530 ed  costituita da una
  lista di parole chiave con valori associati. In questo file si possono
  specificare fino a quattro chip SCC di default. Il valore #define
  MAXSCC 4 nel file scc.c pu essere aumentato se si desidera il
  supporto per un numero maggiore di chip.


  Le parole chiave possibili e i relativi argomenti sono:


     chip
        serve per separare le sottosezioni. Non usa argomenti.


     data_a
        specifica l'indirizzo della porta dati per il canale `A' dello
        z8530. L'argomento  un numero esadecimale, ad esempio 0x300


     ctrl_a
        specifica l'indirizzo della porta di controllo per il canale `A'
        dello z8530. L'argomento  un numero esadecimale, ad esempio
        0x304


     data_b
        specifica l'indirizzo della porta dati per il canale `B' dello
        z8530. L'argomento  un numero esadecimale, ad esempio 0x301


     ctrl_b
        specifica l'indirizzo della porta di controllo per il canale `A'
        dello z8530. L'argomento  un numero esadecimale, ad esempio
        0x305

     irq
        specifica l'IRQ (l'interupt) usata dalla scheda SCC 8530
        descritta in questa sottosezione. L'argomento  un intero, ad
        esempio 5


     pclock
        specifica la frequenza del clock al pin PCLK dell'8530.
        L'argomento  un intero che indica la frequenza in Hz, ed 
        fissato di default a 4915200 se si omette questa parola chiave.


     board
        specifica il tipo particolare di scheda SCC 8530.  L'argomento 
        una stringa alfanumerica che pu assumere i seguenti valori:


        PA0HZP
           scheda PA0HZP SCC


        EAGLE
           Scheda Eagle

        PC100
           scheda DRSI PC100 SCC

        PRIMUS
           scheda PRIMUS-PC (DG9BL)

        BAYCOM
           scheda BayCom (U)SCC

     escc
        questa parola chiave  opzionale; viene usata per abilitare il
        supporto per i chip Extended SCC (ESCC) come l'8580, 85180 o
        85280. L'argomento  una stringa di caratteri i cui unici valori
        ammessi sono `yes' oppure `no', che  il valore didefault.


     vector
        questa parola chiave  opzionale; specifica l'indirizzo del
        `vector latch' (conosciuto pure come "intack port") per le
        schede PA0HZP. Ci pu essere solo un vector latch per tutti i
        chip e il valore di default  0


     special
        questa parola chiave  opzionale; specifica l'indirizzo del
        registro per funzioni speciali presente su diverse schede SCC.
        Il valore di default  0


     option
        questa parola chiave  opzionale e il suo valore di default  0
        (sic, n.d.t.).


  Seguono alcuni configurazioni d'esempio per le schede pi comuni:


     BayCom USCC


          chip    1
          data_a  0x300
          ctrl_a  0x304
          data_b  0x301
          ctrl_b  0x305
          irq     5
          board   BAYCOM
          #
          # SCC chip 2
          #
          chip    2
          data_a  0x302
          ctrl_a  0x306
          data_b  0x303
          ctrl_b  0x307
          board   BAYCOM




     Scheda PA0HZP SCC


     chip 1
     data_a 0x153
     data_b 0x151
     ctrl_a 0x152
     ctrl_b 0x150
     irq 9
     pclock 4915200
     board PA0HZP
     vector 0x168
     escc no
     #
     #
     #
     chip 2
     data_a 0x157
     data_b 0x155
     ctrl_a 0x156
     ctrl_b 0x154
     irq 9
     pclock 4915200
     board PA0HZP
     vector 0x168
     escc no




     Scheda DRSI SCC


          chip 1
          data_a 0x303
          data_b 0x301
          ctrl_a 0x302
          ctrl_b 0x300
          irq 7
          pclock 4915200
          board DRSI
          escc no




  Se con NOS si ha gi una configurazione funzionante per la vostra
  scheda, si pu usare il comando gencfg per convertire i comandi del
  driver NOS di PE1CHL in una forma che possa andare bene nel file di
  configurazione del driver z8530.



  Per usare gencfg basta invocare il comando con gli stesi parametri
  usati per il driver di PE1CHL in NET/NOS. Per esempio il comando:


       # gencfg 2 0x150 4 2 0 1 0x168 9 4915200




  generer un abbozzo di configurazione per la scheda OptoSCC.


  7.1.7.3.  Configurazione del canale



  La sezione di configurazione del canale  quella nella quale si
  specificano tutte gli altri parametri associati con la porta che si
  sta configurando. Anche questa  divisa in due sottosezioni che
  rappresentano ciascuna una porta logica, quindi , visto che ogni
  scheda SCC 8530 ne supporta due, saranno presenti due sottosezioni per
  ogni sottosezione nella parte dei parametri hardware.


  Queste parole chiave sono scritte anche nel file /etc/z8530drv.conf

  e devono apparire dopo la sezione dei parametri hardware.


  L'ordine in cui queste appaiono  molto importante, ma quello in cui
  sono presentate qui dovrebbe andare bene.

     device
        questa parola chiave deve apparire all'inizio della definizione
        della porta e specifica il nome del device file speciale al
        quale si applica il resto dei parametri di configurazione; ad
        esempio /dev/scc0


     speed
        questa parola chiave specifica la velocit dell'interfaccia in
        bit al secondo: ad esempio 1200


     clock
        questa parola chiave specifica da dove recuperare il clock per i
        dati. I valori consentiti sono:


        dpll
           normali operazioni in half duplex

        external
           il modem fornisce il proprio clock per le operazioni di Rx/TX


        divider
           usa il divider full duplex se installato.

     mode
        questa parola chiave specifica il tipo di codifica da adottare
        per la rappresentazione dei dati. I valori consentiti sono nrzi
        or nrz


     rxbuffers
        specifica il numero di buffer di ricezione per cui allocare
        memoria. L'argomento  un intero, ad esempio 8.

     txbuffers
        specifica il numero di buffer di trasmissione per cui allocare
        memoria. L'argomento  un intero, ad esempio 8.


     bufsize
        specifica la dimensione dei buffer di ricezione e trasmissione.
        L'argomento  in byte e rappresenta la lunghezza totale del
        frame, compreso l'header AX.25 (non solo la parte dati). Questa
        parola chiave  opzionale e il suo valore di default  384



     txdelay
        rappresenta il parametro KISS di ritardo nella trasmissione;
        l'argomento  un intero ed esprime una grandezza in ms.

     persist
        rappresenta il parametro KISS di persist e il suo argomento  un
        intero.

     slot
        rappresenta il parametro KISS di tempo di slot; l'argomento  un
        intero ed esprime una grandezza in ms.

     tail
        rappresenta il parametro KISS di tail; il suo argomento  un
        intero ed esprime una grandezza in ms.

     fulldup
        rappresenta il flag KISS che indica se la trasmissione  in full
        duplex; l'argomento  un intero e i valori ammessi sono: 1==Full
        Duplex, 0==Half Duplex.

     wait
        rappresenta il parametro KISS di tempo di wait; l'argomento  un
        intero ed esprime una grandezza in ms.

     min
        rappresenta il parametro KISS 'min'; l'argomento  un intero ed
        esprime una grandezza in secondi.

     maxkey
        rappresenta il parametro KISS indicante il tempo massimo di
        keyup; l'argomento  un intero ed esprime una grandezza in
        secondi.

     idle
        rappresenta il parametro KISS di tempo di idle; l'argomento  un
        intero ed esprime una grandezza in ms.

     maxdef
        rappresenta il parametro KISS 'maxdef'; l'argomento  un intero.

     group
        rappresenta il parametro KISS di valore di gruppo; l'argomento 
        un intero.

     txoff
        rappresenta il parametro KISS di tempo di 'txoff'; l'argomento 
        un intero ed esprime una grandezza in ms.

     softdcd
        rappresenta il parametro KISS 'softdcd'; l'argomento  un
        intero.

     slip
        rappresenta il flag KISS 'slip'; l'argomento  un intero.


  7.1.7.4.  Uso del driver.

  Per usare il driver basta semplicemente utilizzare i device /dev/scc*
  come se si avesse un device seriale tty con un TNC KISS connesso ad
  esso. Per esempio, per configurare la parte di networking del kernel
  di Linux per l'uso di una scheda SCC, si pu fare in questo modo:



  # kissattach -s 4800 /dev/scc0 VK2KTJ




  Si pu anche usare NOS per effettuare la configurazione nello stesso
  modo. Da JNOS, per esmpio, si pu fare:



       attach asy scc0 0 ax25 scc0 256 256 4800





  7.1.7.5.  sccstat  e sccparam .

  Per la diagnosi di eventuali problemi, si pu usare il programma
  sccstat per mostrare la configurazione corrente di un device SCC. Per
  usarlo si pu dare il comando:



       # sccstat /dev/scc0




  in questo modo verranno mostrati un sacco di informazioni sulla
  configurazione e sul comportamento della porta SCC /dev/scc0.


  Il comando sccparam permette di cambiare  la configurazione dopo il
  boot del sistema. La sua sintassi  molto simile al comando NOS param,
  quindi, ad esempio, per settare a 100 ms il valore di txtail si puo
  fare:



       # sccparam /dev/scc0 txtail 0x8





  7.1.8.  Creazione di un device ethernet BPQ.

  Opzioni di compilazione del Kernel:



       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] BPQ Ethernet driver for AX.25





  Linux supporta compatibilit Ethernet BPQ. Questo permette di
  trasportare il protocollo AX.25 su una LAN Ethernet e di connettere
  sulla rete locale la macchina Linux con altre macchine BPQ.


  I device di rete BPQ hanno nome `bpq[0-9]'. Il device `bpq0' 
  associato com il device `eth0', `bpq1' con `eth1' e cos via.

  La configurazione  abbastanza semplice. Prima di tutto occorre che il
  proprio kernel sia stato compilato per supportare la scheda Ethernet
  da utilizzare e che si sia gi verificato il corretto funzionamento di
  quest'ultima con Linux. Per maggiori informazioni si pu fare
  riferimento all'Ethernet-HOWTO <Ethernet-HOWTO.html>.

  Per configurare il supporto BPQ occorre dotare di un nominativo AX.25
  il device Ethernet col seguente comando:



       # /sbin/ifconfig bpq0 hw ax25 vk2ktj-14 up




  Ancora una volta si ricordi che il nominativo specificato deve essere
  presente anche nel file /etc/ax25/axports che si intende usare per
  questa porta.


  7.1.9.  Configurazione del nodo BPQ per il colloqio con il supporto
  AX.25 di Linux.

  A differenza dell'implementazione standard di BPQ Ethernet che usa
  normalmente un indirizzamento multicast, in Linux si adotta il normale
  indirizzamento broadcast; il file NET.CFG per il driver BPQ ODI
  dovrebbe perci essere modificato per assomigliare a questo:



       LINK SUPPORT

               MAX STACKS 1
               MAX BOARDS 1

       LINK DRIVER E2000                    ; o altre MLID che si adattino
                                            ; alla vostra scheda

               INT 10                       ;
               PORT 300                     ; per adattarsi alla vostra
               scheda

               FRAME ETHERNET_II

               PROTOCOL BPQ 8FF ETHERNET_II ; richiesto per BPQ - pu
               cambiare
               PID

       BPQPARAMS                            ; opzionale - richiesto solo se
                                            ; non si vuole usare l'indirizzo
                                            ; di default

               ETH_ADDR  FF:FF:FF:FF:FF:FF  ; indirizzo di default






  7.2.  Creazione del file /etc/ax25/axports .

  /etc/ax25/axports  un semplice file di testo, da creare con un
  editor. Il suo formato  il seguente:



       portname  callsign  baudrate  paclen  window  description




  dove:


     portname
         il nome che viene dato alla porta.

     callsign
         il nominativo AX.25 che si vuole assegnare alla porta.

     baudrate
         la velocit con la quale si vuol far comunicare la porta col
        proprio TNC.

     paclen
         la grandezza massima del pacchetto che si vuole che la porta
        usi per le trasmissioni AX.25.

     window
         il parametro di finestra AX.25 (K), cio il valore di MAXFRAME
        di molti TNC.

     description
         la descrizione della porta.

  La mia  la seguente:



       radio    VK2KTJ-15       4800        256     2       4800bps 144.800
       MHz
       ether    VK2KTJ-14       10000000    256     2       BPQ/ethernet
       device




  Si ricordi di usare un nominativo/ssid univoco per ogni porta AX.25
  che si crea.  Occorre creare, dunque, una voce per ogni device AX.25
  che si vuole utilizzare (KISS, SCC, PI, PT, Baycom o SoundModem che
  sia). I device di rete sono associati alle porte attraverso il
  nominativo/ssid, per questo esso deve essere univoco.


  7.3.  Configurazione del routing AX.25.

  E' possibile configurare i digipeater da utilizzare per raggiungere un
  host specifico, operazione che risulta utile sia per le operazioni
  AX.25 che basate su IP.  Il comando axparms permette di effettuare
  questa operazione; le pagine man sono sempre la fonte migliore di
  informazioni su questo comando, ma un semplice esempio pu essere:




  # /usr/sbin/axparms -route add radio VK2XLZ VK2SUT




  Questo comando indica che il percorso per VK2XLZ deve avvenire tramite
  il digipeater VK2XLZ sulla porta AX.25 chiamata radio.


  8.  Configurazione di un'interfaccia AX.25 per TCP/IP.

  E' molto semplice configurare una porta AX.25 per il trasporto del
  TCP/IP. Se si ha un'interfaccia KISS ci sono due metodi per
  configurare un indirizzo IP. Il comando kissattach possiede un opzione
  che permette di configurarlo; ma il metodo pi convenzionale che usa
  il comando ifconfig funzioner per tutti i tipi d'interfaccia.

  Quindi, modificando l'esempio fatto per il KISS:


       # /usr/sbin/kissattach -i 44.136.8.5 -m 512 /dev/ttyS0 radio
       # /sbin/route add -net 44.136.8.0 netmask 255.255.255.0 ax0
       # /sbin/route add default ax0




  si crea un'interfaccia AX.25 con un indirizzo IP 44.136.8.5 e una MTU
  di 512 byte. Comunque occorre sempre usare ifconfig per configurare,
  se necessario, gli altri parametri.

  Se si hanno altri tipi di interfaccia occorre usare sempre ifconfig
  per configurare l'indirizzo IP, i dettagli di netmask per la porta e
  aggiungere un percorso (route) attraverso la porta stessa, cos come
  si fa per ogni altra interfaccia TCP/IP.  L'esempio che segue 
  riferito ad un device per una scheda PI, ma funziona altrettanto bene
  per ogni altro device di rete AX.25:



       # /sbin/ifconfig pi0a 44.136.8.5 netmask 255.255.255.0 up
       # /sbin/ifconfig pi0a broadcast 44.136.8.255 mtu 512
       # /sbin/route add -net 44.136.8.0 netmask 255.255.255.0 pi0a
       # /sbin/route add default pi0a




  I comandi visti sopra sono tipici delle configurazioni a cui sono
  abituati gli utenti di NOS o dei suoi derivati, o di ogni altro
  software TCP/IP. Si noti che il percorso tipico (default route) pu
  non essere richiesto nella propria configurazione, se ci sono altri
  device configurati.

  Per testare il tutto, si provi un ping o un telnet verso un host
  locale.



       # ping -i 5 44.136.8.58




  Si noti l'uso dell'argomento `-i 5' per ping per mandare gli impulsi
  ogni 5 secondi, invece che ogni secondo come scelta predefinita.
  9.  Configurazione di una porta NetRom.

  Il protocollo NetRom usa e si appoggia alle porte AX.25 create in
  precedenza; per configurarlo su un'interfaccia AX.25 occorre
  modificare due file: uno descrive l'interfaccia NetRom, e l'altro
  quali porte AX.25 verranno usate per trasportare questo protocollo.
  Si possono configurare pi porte NetRom, ognuna col proprio nominativo
  e alias, usando la stessa procedura.


  9.1.  Configurazione di /etc/ax25/nrports

  Il primo file  /etc/ax25/nrports. Questo file descrive le porte
  NetRom pressapoco come /etc/ax25/axports descrive le porte AX.25. Ogni
  device NetRom che si vuole creare deve essere descritto all'interno di
  /etc/ax25/nrports. Normalmente una macchina Linux avr configurato un
  unico device NetRom che usa un certo numero delle porte AX.25
  definite, ma in alcune situazioni, come ad esempio nei BBS, si
  potrebbero volere diversi alias NetRom.

  Questo file  formattato nel seguente modo:



       name callsign  alias  paclen   description




  Dove:

     name
         il nome con cui si fa riferimento alla porta.

     callsign
         il nominativo che verr usato dal traffico NetRom di questa
        porta. Nota: questa non  quell'indirizzo al quale si connettono
        gli utenti per avere un accesso di tipo node. (Il programma node
         descritto pi avanti). Questo nominativo/ssid dovrebbe essere
        unico e non dovrebbe apparire in alcun altro punto dei file
        /etc/ax25/axports o /etc/ax25/nrports

     alias
         l'alias NetRom assegnato a questa porta.

     paclen
         la grandezza massima dei frame netRom trasmessi dalla porta.

     description
         una descrizione libera della porta.

  Un tipico esempio potrebbe essere il seguente:



       netrom  VK2KTJ-9        LINUX   236     Linux Switch Port




  In questo modo viene creata una porta NetRom, conosciuta dal resto
  della rete NetRom come `LINUX:VK2KTJ-9'.

  Questo programma viene usato da programmi come call


  9.2.  Configurazione di /etc/ax25/nrbroadcast

  Questo file pu contenere diverse voci; una per ogni porta AX.25
  attraverso la quale si vuol far passare traffico NetRom ed 
  formattato nel seguente modo:



       axport min_obs def_qual worst_qual verbose




  Dove:

     axport
         il nome dela porta ricavato dal file /etc/ax25/axports. Se per
        una porta non  presente una voce in /etc/ax25/nrbroadcasts
        significa che da questa non transiter traffico NetRom.

     min_obs
         il valore minimo di obsolescenza per la porta.

     def_qual
         il valore di default della qualit per la porta.

     worst_qual
         il peggior valore di qualit consentito per la porta; ogni
        route al di sotto di questo livello sar ignorata.

     verbose
         un flag che indica se da questa porta avvengono broadcast del
        routing NetRom completi, o solo di avvertimento per il nodo
        stesso.

  Un esempio pu essere il seguente:



       radio    1       200      100         1





  9.3.  Creazione del device di rete NetRom

  Una volta pronti i due file, occorre creare il device NetRom con un
  metodo molto simile a quello usato per creare i device AX.25. In
  questo caso si usa il comando nrattach, che funziona pressapoco nello
  stesso modo di axattach, ad eccezione del fatto che crea dei device di
  rete NetRom chiamati `nr[0-9]'. Anche in questo caso, per primo verr
  creato il device `nr0', poi `nr1' eccetera. Per creare il device di
  rete per la porta NetRom definita in precedenza si user:



       # nrattach netrom




  Questo comando inizializzer il device NetRom (nr0) chiamato netrom e
  configurato nel modo definito dai parametri del file
  /etc/ax25/nrports.

  9.4.  Lancio del demone NetRom

  Il kernel di Linux gestisce tutto il protocollo NetRom, ad eccezione
  di alcune funzioni. Il demone NetRom gestisce le tavole di
  indirizzamento (routing tables) e genera la trasmissione del routing
  NetRom. Il demone NetRom viene lanciato dal comando:



       # /usr/sbin/netromd -i




  A questo punto il file /proc/net/nr_neigh dovrebbe cominciare a
  riempirsi di informazioni relative ai nodi NetRom adiacenti.

  Si ricordi di mettere il comando /usr/sbin/netromd nei propri file rc,
  in modo che il demone venga lanciato ogni volta che si fa ripartire il
  sistema.


  9.5.  Configurazione del routing NetRom.

  Volendo configurare degli instradamenti NetRom statici per degli host
  specifici si pu usare il comando nrparms; ancora una volta si rimanda
  alle pagine man relative, non prima di dare un esempio che puo essere
  il seguente:


       # /usr/sbin/nrparms -nodes VK2XLZ-10 + #MINTO 120 5 radio VK2SUT-9




  Questo comando abilita una route NetRom per #MINTO:VK2XLZ-10
  attraverso VK2SUT-9 sulla porta AX.25 chiamata `radio'.


  Si possono creare manualmente voci per nuovi host vicini usando sempre
  il comando nrparms. Ad esempio:



       # /usr/sbin/nrparms -routes radio VK2SUT-9 + 120




  questo comando crea VK2SUT-9 come nodo NetRom adiacente con qualit
  120; questa voce sar statica e quindi non sar cancellata
  automaticamente.


  10.  Configurazione di un interfaccia NetRom per TCP/IP.

  Il processo di configurazione di un interfaccia NetRom per TCP/IP 
  quasi del tutto identica a quella di un interfaccia AX.25 per TCP/IP.

  Anche in questo caso occorre specificare indirizzo ip e mtu nella
  linea di comando di nrattach, o usare i comandi ifconfig e route, ma
  occorre aggiungere manualmente le voci arp per gli host verso i quali
  si vuole creare una route, poich non c' nessun meccanismo che
  permetta alla propria macchina di sapere quale indirizzo NetRom usare
  per raggiungere un particolare host IP.

  Per questo, per creare un device nr0 con indirizzo IP 44.136.8.5, mtu
  di 512 e configurata nel modo descritto nel file /etc/ax25/nrports per
  la porta NetRom chiamata netrom, si user il comando:



       # /usr/sbin/nrattach -i 44.136.8.5 -m 512 netrom
       # route add 44.136.8.5 nr0




  oppure una cosa simile alla seguente sequenza di comandi:



       # /usr/sbin/nrattach netrom
       # ifconfig nr0 44.136.8.5 netmask 255.255.255.0 hw netrom VK2KTJ-9
       # route add 44.136.8.5 nr0




  Per ogni host IP che si voglia ragiungere via NetRom occorre dunque
  indicare route e arp. Per raggiungere un host con indirizzo IP
  44.136.80.4 all'indirizzo NetRom BBS:VK3BBS tramite un nodo NetRom con
  nominativo VK2SUT-0 si useranno i seguenti comandi:



       # route add 44.136.80.4 nr0
       # arp -t netrom -s 44.136.80.4 vk2sut-0
       # nrparms -nodes vk3bbs + BBS 120 6 sl0 vk2sut-0




  Gli argomenti di nrparms `120' e `6' sono rispettivamente i valori
  NetRom di qualit e obsolescence count per la route.


  11.  Configurazione di una porta Rose.

  Il protocollo packet Rose  simile al livello tre delle specifiche
  X.25. Il suo supporto nel kernel di Linux  una versione modificata
  dell'Implementazione Rose FPAC
  <http://fpac.lmi.ecp.fr/f1oat/f1oat.html>.

  Il Rose usa le porte AX.25 che sono presenti nel sistema e si appoggia
  a questo protocollo.  Per configurare il Rose occorre creare un file
  di configurazione che descrive le porte Rose che si vogliono creare;
  per ogni porta la procedura  la stessa.


  11.1.  Configurazione di /etc/ax25/rsports

  Il file nel quale si configurano le interfacce Rose 
  /etc/ax25/rsports. In esso vengono descritte le porte Rose pi o meno
  nello stesso modo in cui il file /etc/ax25/axportsdescrive le porte
  AX.25.

  Questo file  formattato nel seguente modo:




  name  addresss  description




  dove:

     name
         il nome con il quale ci si riferisce alla porta

     address
         l'indirizzo Rose a dieci cifre che si vuole assegnare alla
        porta.

     description
         una descrizione libera della porta.

  Un esempio potrebbe essere il seguente:



       rose  5050294760  Porta Rose




  Si noti che, a meno di specificare diversamente, il Rose usa il
  nominativo/ssid di default configurato su ogni porta AX.25.

  Per configurare un nominativo/ssid da far usare al Rose su ogni porta,
  si usa il comando rsparms come segue:



       # /usr/sbin/rsprams -call VK2KTJ-10




  Questo esempio fa s che la macchina usi il nominativo VK2KTJ-10 in
  tutte le porte AX.25 configurate per traffico Rose.


  11.2.  Creazione di un device di rete Rose.

  Una volta creato il file /etc/ax25/rsports si possono creare i device
  Rose allo stesso modo in cui sono stati creati i device AX.25.  In
  questo caso si usa il comando rsattach, che crea i device di rete
  chiamati `rose[0-5]'. La prima volta viene creato `rose0', la seconda
  `rose1' e cos via. Ad esempio:



       # rsattach rose




  Questo comando inizializza il device Rose (rose0) configurato nel modo
  descritto nel file /etc/ax25/rsports per la porta chiamata `rose'.


  11.3.  Configurazione del routing Rose

  Attualmente il protocollo Rose supporta solo l'instradamento statico.
  L'utiliity rsparms permette di configurare la tabella di routing Rose
  per Linux.

  Ad esempio:


       # rsparms -nodes add 5050295502 radio vk2xlz




  aggiunge una route al nodo Rose 5050295502 attraverso una porta AX.25
  chiamata `radio' nel file /etc/ax25/axports, per un host col nomina
  tivo VK2XLZ.

  Le route possono essere specificate con una mask per includere diverse
  destinazioni in un unica voce. La sintassi  la seguente:


       # rsparms -nodes add 5050295502/4 radio vk2xlz




  che  identica all'esempio precedente, ad eccezione del fatto che si
  applica ad ogni destinazione che ha un indirizzo che inizia con le
  quattro cifre 5050. Una forma alternativa per questo comando :


       # rsparms -nodes add 5050/4 radio vk2xlz




  che  probabilmente il modo pi chiaro.


  12.  Effettuazione di chiamate AX.25/NetRom/Rose.

  Una volta configurate le interfacce AX.25, NetRom e Rose, si  in
  grado di effettuare chiamate di prova.

  Nelle AX25 Utilities  incluso un programma chiamato `call' che  un
  programma di terminale per AX.25, NetRom e Rose.

  Una semplice chiamata AX.25 sar del tipo


       /usr/bin/call radio VK2DAY via VK2SUT




  Una semplice chiamata NetRom ad un nodo con alias SUNBBS sar fatta
  con;


       /usr/bin/call netrom SUNBBS




  Una seplice chiamata Rose verso HEARD al nodo 5050882960 sar fatta
  nel seguente modo:



  /usr/bin/call rose HEARD 5050882960




  Nota: occorre specificare a call su quale porta si vuole effettuare la
  chiamata, poich lo stesso nodo di destinazione potrebbe essere
  raggiungible su ogni porta configurata.


  call  un programma di terminale a linea di comando per effettuare
  chiamate AX.25. Riconosce linee che iniziano con `~' come comandi.  Il
  comando `~.' terminer la connessione.

  Si faccia riferimento alle pagine man relative in /usr/man per
  maggiori informazioni.


  13.  Configurare Linux per accettare connessioni Packet.

  Linux  un sistema operativo molto potente  offre un elevato grado di
  flessibilit nella sua configurazione. Questa flessibilit porta come
  effetto collaterale una relativa complicatezza nell'operazione di
  configurazione. Quando si configura una macchina Linux per accettare
  connessioni AX.25, NetRom o Rose occorre farsi diverse domande. La pi
  importante  "cosa voglio che gli utenti vedano quando mi connetto?".
  Molti hanno sviluppato belle applicazioncine che possono offrire
  servizi agli utenti che si connettono; alcune sono semplici come il
  programma pms, altre pi complesse come node (entrambi presenti nelle
  AX25 utilities). Alternativamente si potrebbe dare agli utenti un
  account e un nome di login, oppure potreste aver scritto un vostro
  programma, come un database customizzato, o un gioco al quale volete
  che gli utenti si connettano. Qualunque soluzione scegliate, dovete
  informare il software AX.25 su quale programma lanciare quando accetta
  connessioni AX.25.

  Il demone ax25d  simile a inetd che viene comunemente usato per
  accettare connessioni TCP/IP su macchine unix. Il compito di ax25d 
  quello di raccogliere e gestire i tentativi di connesisone AX.25.
  Quando ne sente uno controlla un file di configurazione per stabilire
  quale programma lanciare e connetterlo al chiamante. Poich ax25d  lo
  strumento standard per accettare connessioni AX.25, NetRom e Rose,
  verr descritto come configurarlo.


  13.1.  Creazione del file /etc/ax25/ax25d.conf .

  Questo  il file di configurazione per ax25d

  Ad una prima occhiata pu apparire un po' criptico, ma presto si nota
  come in pratica sia molto semplice, evitando una piccola trappola.

  Il formato generale del file ax25d.conf  il seguente:













  # Questo  un commento ed  ignorato dal progamma ax25d.
  [nome_porta] || <nome_porta> || {nome_porta}
  <peer1>    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name>
  <argomenti>
  <peer2>    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name>
  <argomenti>
  parameters window T1 T2 T3 idle N2 <mode>
  <peer3>    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name>
  <argomenti>
     ...
  default    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name>
  <argomenti>




  Dove:

     #  all'inizio di una riga indica che questa  un commento e
        dev'essere ignorata da ax25d.

     <nome_porta>
         il nome della porta AX.25, NetRom o Rose come specificato nei
        file /etc/ax25/axports, /etc/ax25/nrports o /etc/ax25/rsports.
        Il nome della porta  circondato da parentesi quadre `[]' se 
        una porta AX.25, acute `<>' se NetRom, o graffe `{}' se Rose.
        Esiste una forma alternativa per questo campo, che consiste nel
        far precedere il nome della porta da `nominativo/ssid via' per
        indicare che si vogliono accettare chiamate al nominativo/ssid
        attraverso quest'interfaccia. L'esempio dovrebbe rendere pi
        chiaro il tutto.

     <peer>
         il nominativo del nodo a cui si applica questa particolare
        configurazione. Se non si specifica un ssid, questa
        configurazione sar applicata a tutti i ssid del nominativo.

     window
         il parametro AX.25 "Window" (K) conosciuto anche come MAXFRAME
        che si applica in questa configurazione.

     T1  il valore di tempo di ritrasmissione del frame (T1) espresso
        in mezzi secondi.

     T2  il tempo, espresso in secondi, che il software AX.25 attende
        per un altro frame in ingresso, prima di mandare una risposta.

     T3  il tempo di inattivit espressa in secondi, prima che il
        software AX.25 interrompa la sessione.

     idle
         il valore di idle espresso in secondi.

     N2  il numero di ritrasmissioni consecutive che possono essre
        fatte prima di interrompere la connessione.

     <mode>
        fornisce un meccanismo per stabilire alcuni tipi di permessi. I
        modi sono abilitati o disabilitati fornendo una combinazione di
        caratteri, ognuna rappresentante un permesso. I caratteri
        possono essere scritti sia in maiuscolo che in minuscolo, in un
        unico blocco, senza spazi.

        u/U
           UTMP                   - Attualmente non supportato.

        v/V
           Validate call          - Attualmente non supportato.

        q/Q
           Quiet                  - Non viene fatto il log della
           connessione

        n/N
           check NetRom Neighbour - Attualmente non supportato.

        d/D
           Disallow Digipeaters   - La connessione dev'essere diretta,
           non effettuata tramite digipeater.

        l/L
           Lockout                - Non permette la connessione.

        */0
           marker                 - Mette un marker, non vengono settati
           i modi.

     <uid>
         l'identificativo col quale deve deve essere lanciato il
        programma che supporta la connessione.

     <cmd>
         il path completo del comando da lanciare, senza specificare
        argomenti.

     <cmd-name>
         il testo che deve apparire in un ps come nome del comando
        lanciato (normalmente  lo stesso valore di <cmd>, per senza
        path.

     <arguments>
        sono gli argomenti da passare a <cmd> quando viene lanciato.
        Possono essere passate utili informazioni con i seguenti token:

        %d Nome della porta sulla quale si  ricevuta la connessione.

        %U Nominativo AX.25 del chiamante senza ssid e scritto in
           maiuscolo.

        %u Nominativo AX.25 del chiamante senza ssid e scritto in
           minuscolo.

        %S Nominativo AX.25 del chiamante con ssid e scritto in
           maiuscolo.

        %s Nominativo AX.25 del chiamante con ssid e scritto in
           minuscolo.

        %P Nominativo AX.25 del nodo dal quale  venuta la chiamata,
           senza ssid e in maiuscolo.

        %p Nominativo AX.25 del nodo dal quale  venuta la chiamata,
           senza ssid e in minuscolo.

        %R Nominativo AX.25 del nodo dal quale  venuta la chiamata, con
           ssid e in maiuscolo.

        %r Nominativo AX.25 del nodo dal quale  venuta la chiamata, con
           ssid e in minuscolo.

  Occorre una sezione nel formato visto sopra per ogni interfaccia
  AX.25, NetRom o Rose dalla quale si vogliano accettare connessioni.
  Nel paragrafo ci sono due tipi speciali di linee, uno inizia con la
  stringa `parameters'  l'altro con la stringa `default' (c'
  differenza). Queste servono per funzioni speciali.

  Lo scopo delle linee `default' dovrebbe essere ovvio; queste regolano
  il comportamento di quelle connessioni  per le quali non sono
  specificate regole. In assenza di una regola di `default', ogni
  connessione che non  riconducibile ad una regola definita, sar
  rifiutata e il chiamante disconnesso senza alcun messaggio.

  La linea `parameters' assolve un compito pi sottile, qui sta la
  trappola menzionata precedentemente. In ogni campo di ogni definizione
  per una regola di connessione, si pu usare il carattere `*' per dire
  `usa i valori di default'. La linea `parameters'  quella che
  definisce questi valori. Lo stesso software del kernel ha alcuni
  valori di default che posono essere usati se non li si specifica con
  la linea `parameters' La trappola  che questi valori di default si
  applicano solo alle regole sotto la linea `parameters'. Si possono
  avere diverse linee `parameters' in modo da creare gruppi di
  configurazioni di default. E' importante notare che `parameters' non
  permette di settare i valori dei campi `uid' o `command'.


  13.2.  Un semplice esempio di file ax25d.conf .

  Ok, a questo punto si impone un esempio chiarificatore:



       # ax25d.conf di VK2KTJ - 03/02/97
       # Questo file di configurazione usa le porte definite precedentemente

       # <peer> Win T1  T2  T3  idl N2 <mode> <uid> <exec>
       <argv[0]>[<args....>]

       [VK2KTJ-0 via radio]
       parameters 1    10  *  *  *   *   *
       VK2XLZ     *     *  *  *  *   *   *    root  /usr/sbin/axspawn
       axspawn %u +
       VK2DAY     *     *  *  *  *   *   *    root  /usr/sbin/axspawn
       axspawn %u +
       NOCALL     *     *  *  *  *   *   L
       default    1    10  5 100 180 5   *    root  /usr/sbin/pms pms -a -o
       vk2ktj

       [VK2KTJ-1 via radio]
       default    *     *    *   *   *   0    root /usr/sbin/node node

       <netrom>
       parameters 1    10  *  *  *   *   *
       NOCALL     *     *  *  *  *   *   L
       default    *     *  *  *  *   *   0        root /usr/sbin/node node

       {VK2KTJ-0 via rose}
       parameters 1    10  *  *  *   *   *
       VK2XLZ     *     *  *  *  *   *   *    root  /usr/sbin/axspawn
       axspawn %u +
       VK2DAY     *     *  *  *  *   *   *    root  /usr/sbin/axspawn
       axspawn %u +
       NOCALL     *     *  *  *  *   *   L
       default    1    10  5 100 180 5   *    root  /usr/sbin/pms pms -a -o
       vk2ktj

       {VK2KTJ-1 via rose}
       default    *     *    *   *   *   0    root /usr/sbin/node node radio

  Questo esempio dice che chiunque voglia connettersi col nominativo
  `VK2KTJ-0' ascoltato sulla porta AX.25 chiamata `radio' sottostar
  alle seguenti regole:

  Chiunque abbia il nominativo col valore `NOCALL' non viene fatto
  entrare; si noti l'uso del modo `L'.

  La linea parameters modifica due parametri rispetto a quelli di
  default del kernel (Window e T1) e verr lanciato il programma
  /usr/sbin/axspawn per loro. Ogni copia di /usr/sbin/axspawn lanciata
  in questo modo apparir come axspawn in una lista ps. Le due linee
  successive danno le regole per due stazioni che riceveranno questi
  permessi.

  L'ultima linea nel paragrafo costituisce la regola  che sar applicata
  a tutti gli altri (compresi VK2XLZ e VK2DAY se usano un ssid diverso
  da -1).  Questa definizione imposta implicitamente tutti i parametri e
  fa s che il programma pms sia lanciato con un argomento che indica
  che funziona su una connessione AX.25, e che il nominativo utilizzato
  per rispondere  VK2KTJ. (Si veda il paragrafo `Configurazione del
  PMS' per maggiori dettagli).

  La configurazione successiva accetta connessioni a VK2KTJ-1 tramite la
  porta radio e lancia il programma node per chiunque.

  Poi c' una configurazione NetRom (si noti l'uso delle parentesi acute
  "< >"). Questa  pi semplice: stabilisce che chiunque si connetta
  alla porta dal nome `netrom' far partire il programma node, a meno
  che non abbia nominativo `NOCALL', nel qual caso viene disconnesso.

  Le ultime due configurazioni sono per le connessioni Rose; la prima
  per chi chiama `vk2ktj-0', l'altra per chi chiama `VK2KTJ-1'
  all'indirizzo di nodo Rose della macchina. Queste funzionano
  esattamente allo stesso modo; si noti l'uso delle parentei graffe per
  caratterizzarle come porte Rose.

  L'esempio sopra illustrato  piuttosto banale, ma penso che chiarisca
  sufficientemente le caratteristiche significative della sintassi del
  file di configurazione. Una descrizione approfondita di quest'ultima
  si pu trovare nelle pagine man di ax25d.conf. Un esempio pi
  dettagliato  incluso, invece, nelle ax25-utils.


  13.3.  Lanciare ax25d

  Una volta approntati i due file di configurazione, si pu lanciare
  ax25d col comando;



       # /usr/sbin/ax25d




  Una volta fatto questo, i corrispondenti dovrebbero essere in grado di
  effettuare connessioni AX.25 alla vostra macchina Linux. Si ricordi di
  mettere il comando ax25d nei propri file rc, in modo che venga
  lanciato ogni volta che la macchina viene fatta ripartire.


  14.  Configurazione del programma node.

  node  stato sviluppato da Tomi Manninen <tomi.manninen@hut.fi> e si
  basa sul programma PMS.  Rende disponibili le funzionalit di nodo in
  modo piuttosto completo e flessibile, permettendo agli utenti, una
  volta connessi, di fare connessioni in uscita di tipo Telnet, AX.25,
  NetRom e Rose, nonch di ottenere informazioni con Finger, Nodes,
  Heard eccetera. Si pu inoltre configurare il nodo in modo da far
  eseguire qualunque comando Linux in modo piuttosto semplice.

  Node viene normalmente lanciato dal programma ax25d, per quanto possa
  essere eseguito anche da linea di comando oppure lanciato dal
  programma TCP/IP inetd per permettere agli utenti di fare telnet sulla
  vostra macchina.


  14.1.  Creazione del file /etc/ax25/node.conf .

  Il file node.conf  dove viene scritta la configurazione principale
  del nodo. E' un semplice file di testo ed  formattato nel seguente
  modo:


















































  # /etc/ax25/node.conf
  # file di configurazione del programma node(8).
  #
  # Le linee che iniziano con '#' sono commenti e vengono ignorate.
  # Hostname
  # Specifica il nome della macchina che fa da nodo.
  hostname        radio.gw.vk2ktj.ampr.org

  # Rete Locale
  # Permette di specificare cosa dev'essere considerato 'locale'
  # per il controllo dei permessi usando nodes.perms.
  localnet        44.136.8.96/29

  # Occultamento di porte
  # Se viene specificato, questo parametro permette di rendere le porte
  # invisibili agli utenti. Le porte qui elencate non saranno riportate
  # dal comando (P)orts.
  hiddenports     rose netrom

  # Identificazione del nodo.
  # Questo apparir al prompt del nodo.
  NodeId          LINUX:VK2KTJ-9

  # Porta NetRom
  # Questo  il nome della porta NetRom che verr usata per
  # le connessioni NetRom in uscita dal nodo.
  NrPort          netrom

  # Node Idle Timeout
  # Specifica il tempo di idle in secondi per le connessioni fatte
  # a questo nodo (cio quanto possono rimanere inattive prima che la
  # connessione venga interrotta.
  idletimout      1800

  # Connection Idle Timeout
  # Specifica il tempo di idle in secondi per le connessioni fatte
  # attraverso questo nodo.
  conntimeout     1800

  # Riconnessione
  # Specifica se gli utenti debbano essere riconnessi al nodo
  # se la loro connessione remota si interrompe, o se debbano essere
  # definitivamente disconnessi.
  reconnect       on

  # Alias dei comandi
  # Permette di rendere semplici dei comandi di nodo pi articolati.
  alias           CONV    "telnet vk1xwt.ampr.org 3600"
  alias           BBS     "connect radio vk2xsb"

  # Aliases dei comandi esterni
  # Permette di eseguire dei comandi esterni all'interno del nodo.
  # La sintassi :
  # extcmd <nomecmd> <flag> <userid> <comando>
  # Flag == 1  l'unica funzione implementata.
  # <comando>  formattato sullo stile di ax25d.conf
  extcmd          PMS     1       root    /usr/sbin/pms pms -u %U -o VK2KTJ

  # Logging
  # Stabilisce la quantit di informazioni che vengono scritte nel log.
  # 3 per il maggior numero di informazioni, 0 per disabilitare il log.
  loglevel        3

  # Il carattere di escape
  # 20 = (Control-T)
  EscapeChar      20
  14.2.  Creazione del file /etc/ax25/node.perms

  node consente di assegnare permessi agli utenti. Questi permessi
  permettono di stabilire quali utenti, ad esempio, sono autorizzati a
  far uso di opzioni come i comandi (T)elnet e (C)onnect.  Il file
  node.perms viene usato per stabilire questo genere di permessi e
  contiene cinque campi chiave; in ognuno di questi un asterisco `*'
  serve per indicare qualunque cosa e viene usato per creare le regole
  di default.


     utente
        Il primo campo rappresenta il nominativo o l'utente al quale
        devono applicarsi i permessi. Ogni ssid viene ignorato, quindi
        basta mettere il nominativo semplice.

     metodo
        Vengono concessi permessi anche ai protocolli o ai metodi di
        accesso.  Per esempio si pu permettere l'uso dell'opzione
        (C)onnect agli utenti connessi via AX.25 o NetRom, ma impedirlo
        agli altri. Il secondo campo perci, permette di selezionare a
        quale metodo di accesso deve applicarsi la regola di accesso.  I
        metodi di accesso sono i seguenti:


          metodo  descriztione
          ------  -----------------------------------------------------------
          ampr    L'utente  connesso via telnet da un indirizzo amprnet (44.0.0.0)
          ax25    L'utente  connesso tramite AX.25
          host    L'utente ha lanciato node dalla linea di comando
          inet    L'utente  connesso via telnet da un indirizzo non-locale e non-amprnet
          local   L'utente  connesso via telnet da un host 'locale'
          netrom  L'utente  connesso tramite NetRom
          rose    L'utente  connesso tramite rose
          *               L'utente  connesso in un modo qualunque.




     porta
        Volendo  possibile controllare i permessi per gli utenti AX.25
        porta per porta; questo permette di determinare cosa gli utenti
        sono in grado di fare a seconda della porta alla quale sono
        connessi. Se si sfrutta questa funzionalit (che funziona solo
        per le connessioni AX.25), il terzo campo contiene il nome della
        porta.

     password
        Si pu opzionalmente configurare il nodo in modo che chieda una
        password alla connessione. Questo pu essere utile per
        proteggere utenti con un livello di accesso particolarmente
        elevato; in questo campo, se presente,  contenuto il valore
        della password che dev'essere fornita.

     permessi
        Il campo permessi  l'ultimo per ciascuna voce nel file. Il
        valore che contiene  a campi di bit (ogni opzione 
        rappresentata da un bit pi o meno settato a seconda che venga
        pi o meno concesso il permesso per essa). La lista delle
        opzioni che possono essere controllate, e del relativo valore in
        bit  il seguente:





     valore  descrizione
     -----   -------------------------------------------------
      1      Login consentito.
      2      (C)onnessione AX25 consentita.
      4      (C)onnessione NetRom consentita.
      8      (T)elnet verso host locali consentiti.
      16     (T)elnet verso host amprnet (44.0.0.0) consentiti.
      32     (T)elnet verso host non-locali e non-amprnet consentiti.
      64     (C)onnessione AX25 consentita anche su porte occultate.
      128    (C)onnessione Rose consentita.




     Per stabilire una regola particolare, occorre sommare i valori dei
     singoli permessi che si vuole dare e mettere il numero risultante
     nel quinto campo.

  Un file nodes.perms potrebbe essere il seguente:



       # /etc/ax25/node.perms
       #
       #L'operatore del nodo  VK2KTJ, ha password 'secret' e ha tutti
       #i permessi per tutti i tipi di connessione
       vk2ktj  *       *       secret  255

       # Ai seguenti nominativi  impedito connettersi
       NOCALL  *       *       *       0
       PK232   *       *       *       0
       PMS     *       *       *       0

       # Agli utenti INET  impedito connettersi.
       *       inet    *       *       0

       # Gli utenti AX.25, NetRom, Local, Host e AMPR possono fare (C)onnect
       # e (T)elnet a host locali e ampr, ma non ad altri indirizzi IP.
       *       ax25    *       *       159
       *       netrom  *       *       159
       *       local   *       *       159
       *       host    *       *       159
       *       ampr    *       *       159





  14.3.  Configurazione di node  per funzionare da ax25d

  Il programma node viene lanciato di solito dal programma ax25d. Per
  fare questo occorre aggiungere delle particolari regole al file
  /etc/ax25/ax25d.conf. Nella configurazione che adotto, voglio
  permettere agli utenti di scegliere se connettersi a node o ad altri
  servizi. ax25d consente di fare questo attraverso l'intelligente
  creazione di alias delle porte. Ad esempio, data la configurazione di
  ax25d presentata sopra, si vuole configurare node in modo che venga
  lanciato per tutti gli utenti che si connettono a VK2KTJ-1. Per fare
  questo si aggiunge questo al file /etc/ax25/ax25d.conf:


       [vk2ktj-1 via radio]
       default    *     *    *   *   *   0    root /usr/sbin/node node



  Questo dice che il kernel di Linux risponder ad ogni richiesta di
  connessione al nominativo `VK2KTJ-1' sulla porta chiamata `radio' lan
  ciando il programma node


  14.4.  Configurazione di node  per funzionare da inetd

  Se si vuole che i propri utenti siano in grado di fare telnet su una
  porta della macchina e avere accesso a node, lo si pu fare piuttosto
  facilmente. La prima cosa da decidere e a quale porta gli utenti si
  devono connettere.

  Occorre modificare due file.

  In /etc/services occorre aggiungere:


       node    3694/tcp        #OH2BNS's node software




  a in /etc/inetd.conf va aggiunto:


       node    stream  tcp     nowait  root    /usr/sbin/node node




  Una volta fatto questo, facendo ripartire il programma inetd, ogni
  utente connesso via telnet alla porta 3694 della macchina ricever la
  richiesta di login, l'eventuale richiesta di password e sar connesso
  a node.


  15.  Configurazione di axspawn

  Il programma axspawn permette alle stazioni connesse via AX.25 di
  loggarsi sulla macchina Linux. Pu essere lanciato da ax25d in modo
  simile a quanto visto per node. Per permettere ad un utente l'accesso
  alla propria macchina occorre aggiungere una linea simile alla
  seguente nel proprio file /etc/ax25/ax25d.conf:


       default * * * * * 1 root /usr/sbin/axspawn axspawn %u




  Se la line finisce con un carattere +, l'utente che si connette deve
  battere invio prima che gli venga concesso il login. Di default la
  scelta  di non attendere input dall'utente.

  Ogni singola configurazione host che segue queste righe lancia axspawn
  alla connessione del corrispondente. Alla partenza, axspawn controlla
  che la linea di comando che gli viene passata corrisponda ad un
  nominativo valido, toglie lo ssid e infine controlla il file
  /etc/passwd per vedere se quell'utente ha un account configurato sulla
  macchina. Se esiste e la password  "" (null) o +, l'utente  subito
  fatto entrare; se esiste una password da fornire, viene invitato a
  digitarla. Se non esiste un'account corrispondente all'utente in
  /etc/passwd, si pu configurare axspawn affinch ne crei
  automaticamente uno.


  15.1.  Creazione del file /etc/ax25/axspawn.conf

  E' possibile modificare il comportamento di axspawn agendo sul file di
  configurazione /etc/ax25/axspawn.conf che  formattato nel seguente
  modo:


       # /etc/ax25/axspawn.conf
       #
       # permette la creazione automatica di account utente
       create    yes
       #
       # uso di utente guest (ospite) se sopra si  scelto "no" o se tutto
       # fallisce. Disabilita con "no"
       guest     no
       #
       # nome o group id degli utenti creati automaticamente
       group     ax25
       #
       # primo user id da usare
       first_uid 2001
       #
       # user id massimo
       max_uid   3000
       #
       # dove creare la home directory dei nuovi utenti
       home      /home/ax25
       #
       # shell dell'utente
       shell     /bin/bash
       #
       # lega lo user id al nominativo per le chiamate in uscita
       associate yes




  Gli otto parametri di configurazione di axspawn hanno il seguente
  significato:


     #  indica una linea di commento

     create
        se questo campo  settato a yes, axspawn tenter di creare
        automaticamente un account per ogni utente che si connetta e non
        sia gi presente nel file /etc/passwd

     guest
        questo campo indica il nome dell'account che sar usato per gli
        utenti che non hanno un account se create  settato a no e che
        di solito  ax25 o guest.

     group
        questo campo indica il nome del gruppo per gli account deli
        utenti che sono creati automaticamente se non sono presenti nel
        file /etc/passwd

     first_uid
         il numero del primo userid che sar utilizzato per la
        creazione automatica degli utenti.

     max_uid
         il valore massimo dell'userid che verr usato nella creazione
        di nuovi utenti.

     home
         la home directory dei nuovi utenti.

     shell
         la login shell usata dai nuovi utenti.

     associate
        indica se le connessioni AX.25 in uscita fatte dagli utenti
        collegati devono essere fatte usando il loro nominativo o quello
        della macchina.


  16.  Configurazione di pms

  Il programma pms  l'implementazione di un semplice programma di
  messaggistica. Sviluppato in origine da Alan Cox,  stato
  successivamente ampliato da Dave Brown <dcb@vectorbd.com>. Allo stadio
  attuale  ancora molto semplice, visto che supporta solo l'invio di
  messaggi solo al gestore del sistema e di ricavare alcune informazioni
  sul sistema, ma Dave  al lavoro per espandere le sue funzionalit e
  renderlo pi utile.

  Una volta che il programma  stato compilato ed installato occorre
  creare un paio di semplici file per far s che gli utenti abbiano
  alcune informazioni sul sistema e modificare le voci opportune nel
  file ax25d.conf, in modo che,alla connessione, agli utenti si presenti
  il PMS.



  16.1.  Creazione del file /etc/ax25/pms.motd .

  Il file /etc/ax25/pms.motd contiene il `messaggio del giorno' che
  verr inviato a chi si connette dopo lo header usuale del BBS.


  16.2.  Creazione del file /etc/ax25/pms.info .

  Anche /etc/ax25/pms.info  un semplice file di testo, nel quale si
  possono mettere informazioni pi dettagliate sulla configurazione
  della propria stazione, che viene inviato all'utente in risposta al
  comando Info dal prompt PMS>.


  16.3.  Associazione di nominativi AX.25 con gli utenti di sistema.

  Quando un utente connesso manda posta ad un nominativo AX.25, pms si
  aspetta che questo sia mappato o associato con un reale utente creato
  sulla vostra macchina. Questo  descritto in una sezione a parte.


  16.4.  Aggiunta di PMS in /etc/ax25/ax25d.conf

  L'aggiunta di pms al proprio file ax25d.conf  un'operazione molto
  semplice, tuttavia c' una piccola cosa da tenere in considerazione.
  Dave ha aggiunto la possibilit di fornire al programma pms attraverso
  la linea di comando la possibilit di gestire in diversi modi la fine
  di una linea di testo. AX.25 e NetRom, per convenzione, si aspettano
  che la fine della linea di testo sia indicata dal comando di ritorno a
  capo e dall'avanzamento di linea (carriage return, linefeed), mentre
  nei sistemi Unix standard si usa solo il comando di nuova linea
  (newline). Quindi per esempio, se si vuole aggiungere una voce per
  indicare il lancio del programma pms come azione di default per ogni
  connessione, si aggiunge una linea di questo tipo:


       default  1  10 5 100 5   0    root  /usr/sbin/pms pms -a -o vk2ktj




  che lancia il programma pms, indicandogli che deve gestire una
  connessione AX.25 e che il gestore del bbs  vk2ktj. Si vedano le
  pagine man relative, per indicare al programma altri tipi di
  connessione


  16.5.  Test del PMS.

  Per testare il PMS, si pu dare il seguente comando dal prompt della
  shell:

  # /usr/sbin/pms -u vk2ktj -o vk2ktj


  Sostituire il proprio nominativo con quello dell'autore, in modo che
  il comando lanci il pms indicandogli che deve usare la convenzione
  Unix per il comando di fine linea e che l'utente che si connette 
  vk2ktj. In questo modo ci si trova nella stessa situazione di un
  utente remoto che si connette.

  In aggiunta a questo si pu provare a far connettere altri nodi alla
  propria macchina in modo da controllare che le impostazioni in
  ax25d.conf siano correttie.


  17.  Configurazione dei programmi user_call .

  I programmi `user_call' sono in realt: ax25_call,`rose_call' e
  netrom_call. Sono molto semplici e sono concepiti per essere chiamati
  da ax25d per automatizzare le connessioni a host remoti, anche se
  nulla vieta di usarli in script della shell o con altri demoni come il
  programma node.

  A causa della loro semplicit, non trattano in alcun modo i dati che
  gestiscono, quindi ad esempio il problema della fine-linea deve essere
  gestito dall'utente.

  Iniziamo con un esempio su come si possano impiegare. Immaginiamo di
  avere una piccola rete a casa composta da una macchina Linux che
  funziona come gateway radio  e da un'altra macchina, diciamo un nodo
  BPQ connesso via ethernet.

  Normalmente, se si vuole che gli utenti che si connettono via radio
  possano raggiungere il nodo BPQ, occorre che la prima macchina funga
  da digipeater, oppure che gli utenti possano connettersi al nodo Linux
  e poi connettersi all'altra macchina da l.  Il programma ax25_call
  pu semplificare quest'operazione se viene chiamato dal programma
  ax25d.

  Supponiamo che il nodo BPQ abbia il nominativo VK2KTJ-9 e che la
  macchina Linux abbia la porta AX.25/ethernet chiamata `bpq';
  immaginiamo anche che questa abbia una porta radio chiamata `radio'.

  Una voce nel file /etc/ax25/ax25d.conf del tipo:


       [VK2KTJ-1 via radio]
       default    * * * *   *   *  *
                       root /usr/sbin/ax25_call ax25_call bpq %u vk2ktj-9


  abilita gli utenti alla connessione diretta a `VK2KTJ-1' che sarebbe
  in realt il demone ax25d, che li connette automaticamente a
  `VK2KTJ-9' attraverso l'interfaccia `bpq' con una connessione AX.25

  C' tutta una serie di altre possibili configurazioni che si possono
  provare. Le utility `netrom_call' e `rose_call' funzionano in modo
  simile. Un amatore ha usato questa utility per rendere pi semplici le
  connessioni ad una BBS remota. Poich Normalmente gli utenti
  dovrebbero inserire una lunga stringa di connessione per fare la
  chiamata, ha creato una voce che fa apparire la BBS come se attraverso
  di essa di fosse in una rete locale dove ax25d fa da proxy per la
  connessione alla macchina remota.


  18.  Configurazione dei comandi di uplink e downlink di Rose

  Se l'implementazione ROM di Rose  familiare, non sar difficile
  orientarsi tra i metodi coi quali gli utenti AX.25 effettuano chiamate
  su una rete Rose. Se un nodo Rose ha il nominativo VK2KTJ-5 e l'utente
  AX.25 vuole connettersi a VK5XXX al nodo Rose 5050882960, deve dare il
  comando:



       c vk5xxx v vk2ktj-5 5050 882960




  Sul nodo remoto, VK5XXX vedr una connessione in entrata dal
  nominativo locale dell'utente AX.25 propagata dal nominativo del nodo
  Rose remoto.

  L'implementazione Rose di Linux non supporta questa funzionalit nel
  kernel, tuttavia vi sono due programmi che svolgono questa funzione,
  che sono rsuplnk e rsdwnlnk.


  18.1.  Configurazione del downlink Rose

  Per configurare la propria macchina Linux perch accetti connessioni
  Rose e stabilisca collegamenti AX.25 per nominativi diversi da quelli
  locali occorre aggiungere una voce nel proprio file.
  /etc/ax25/ax25d.conf. Di solito si configura questa voce come scelta
  di default per ogni connessione Rose entrante. Ad esempio si pu
  decidere di gestire localmente chiamate Rose a destinazioni come
  NODE-0 o HEARD-0, e di passare le altre chiamate al comando rsdwnlink,
  assumendo che siano utenti AX.25.  Una tipica configurazione pu
  dunque essre:



       #
       {* via rose}
       NOCALL   * * * * * *  L
       default  * * * * * *  - root  /usr/sbin/rsdwnlnk rsdwnlnk 4800
       vk2ktj-5
       #




  con questa configurazione, ogni connessione al nodo Linux con un
  nominativo di destinazione che non sia specificato esplicitamente,
  sar convertita in una connessione AX.25 dalla porta chiamata 4800
  usando come digipeater VK2KTJ-5.
  Per configurare la propria macchina Linux affinch accetti le
  connessioni AX.25 allo stesso modo di un nodo ROM Rose occorre
  aggiungere le voci opportune nel proprio file /etc/ax25/ax25d.conf che
  assume un aspetto simile a questo:



       #
       [VK2KTJ-5* via 4800]
       NOCALL   * * * * * *  L
       default  * * * * * *  - root  /usr/sbin/rsuplnk rsuplnk rose
       #




  Si noti la speciale sintassi per il nominativo locale. il carattere
  `*' indica che l'applicazione dovrebbe essere invocata se il
  nominativo  presente nel percorso digipeater di una connessione.

  Questa configurazione permette ad un utente AX.25 di effettuare
  connessioni Rose usando l'esempio presentato nell'introduzione. Ogni
  connessione che tenti di usare VK2KTJ-5 come digipeater sulla porta
  AX.25 chiamata 4800 sar gestita dal comando rsuplnk


  19.  Associare nominativi AX.25 con utenti Linux.

  Ci sono diverse situazioni in cui  desiderabile associare un
  nominativo con un account utente di Linux, ad esempio quando diversi
  radioamatori condividono la stessa machina Linux e vogliono usare il
  proprio nominativo per effettuare chiamate, oppure quando utenti del
  PMS vogliono fare un talk con un particolare utente della macchina.

  Il software AX.25 permette di gestire l'associazione tra utenti e
  nominativi (se n' gi parlato nella sezione dedicata al PMS). Questa
  associazione viene fatta tramite il comando axparms. Ad esempio:


       # axparms -assoc vk2ktj terry




  associa il nominativo AX.25 vk2ktj con l'utente terry della macchina
  Linux. In questo modo la posta di vk2ktj del PMS sar inviata
  all'account Linux terry.

  Si rammenti di mettere queste associazioni nel proprio file rc, in
  modo che siano disponibili ad ogni reboot.

  Nota non bisogna associare un nominativo con l'accont di root, in
  quanto ci potrebbe interferire con la configurazione di altri
  programmi.


  20.  I file in /proc .

  La directory /proc presenta diversi file che sono in relazione con il
  kernel AX.25 e NetRom. Questi sono di solito utilizzati dalle utility
  AX25, ma essendo scritti in forma leggibile, pu essere interessante
  dar loro un'occhiata. Il formato che viene usato  facilmente
  comprensibile, quindi non  neccessario andare molto in dettaglio per
  la loro descrizione.


     /proc/net/arp
        contiene le lista delle mappatture ARP (Address Resolution
        Protocol)di indirizzi IP in indirizzi di protocollo a livello
        MAC. Questi possono essere AX.25, ethernet o qualche altro
        protocollo a livello MAC.

     /proc/net/ax25
        contiene una lista dei socket AX.25 aperti.  Questi possono
        essere in attesa di una connessione oppure sessioni attive.

     /proc/net/ax25_bpqether
        contiene le mappature dei nominativi di tipo AX.25 su ethernet
        BPQ.

     /proc/net/ax25_calls
        contiene le mappature degli userid Linux nei confronti dei
        nominativi configurate dal comando axparms -assoc.

     /proc/net/ax25_route
        contiene informazioni per i percorsi AX.25 da effettuare tramite
        digipeater.

     /proc/net/nr
        contiene una lista di socket NetRom aperti.  Questi possono
        essere in attesa di una connessione, oppure collegamenti attivi.

     /proc/net/nr_neigh
        contiene informazioni riguardo i nodi NetRom vicini (NetRom
        neighbours) conosciuti dal programma.

     /proc/net/nr_nodes
        contiene informazioni riguardo i nodi NetRom conosciuti dal
        programma.

     /proc/net/rose
        contiene una lista di socket Rose aperti.  Questi possono essere
        in attesa di una connessione, oppure collegamenti attivi.

     /proc/net/rose_nodes
        contiene informazioni riguardo percorsi ai nodi Rose vicini
        (Rose Neighbours).

     /proc/net/rose_neigh
        contiene una lista di nodi Rose vicini (Rose Neighbours).

     /proc/net/rose_routes
        contiene una lista di tutte le connessioni Rose stabilite.


  21.  Programmazione di rete per AX.25, NetRom e Rose.

  Il vantaggio pi grande nell'usare un'implementazione dei protocolli
  packet per radioamatori  probabilmente la facilit con cui si possono
  sviluppare applicazioni e programmi che li sfruttino.

  Sebbene la programmazione di applicativi di rete in Unix vada al di l
  degli scopi di questo documento, si descriveranno gli elementi
  essenziali per utilizzare i protocolli AX.25, NetRom e Rose
  all'interno dei vostri programmi.


  21.1.  Le famiglie degli indirizzi.

  La programmazione di rete per AX.25, NetRom e Rose , in Linux,
  piuttosto simile a quella per TCP/IP, visto che la differenza maggiore
  sta nelle diverse famiglie di indirizzi.
  I nomi delle famiglie degli indirizzi per AX.25, NetRom e Rose sono
  rispettivamente AF_AX25, AF_NETROM e AF_ROSE.


  21.2.  I file header.

  Occorre sempre includere i file header `ax25.h', nonch `netrom.h' o
  `rose.h' se avete a che fare con questi protocolli. Le impostazioni
  iniziali saranno simili alle seguenti:

  Per AX.25:


       #include <ax25.h>
       int s, addrlen = sizeof(struct full_sockaddr_ax25);
       struct full_sockaddr_ax25 sockaddr;
       sockaddr.fsa_ax25.sax25_family = AF_AX25




  Per NetRom:


       #include <ax25.h>
       #include <netrom.h>
       int s, addrlen = sizeof(struct full_sockaddr_ax25);
       struct full_sockaddr_ax25 sockaddr;
       sockaddr.fsa_ax25.sax25_family = AF_NETROM;




  Per Rose:


       #include <ax25.h>
       #include <rose.h>
       int s, addrlen = sizeof(struct sockaddr_rose);
       struct sockaddr_rose sockaddr;
       sockaddr.srose_family = AF_ROSE;





  21.3.  Trattamento dei nominativi ed esempi.

  Nella libreria lib/ax25.a delle AX.25-utilities vi sono routine che
  effettuano la conversione e il trattamento dei nominativi, anche se
  naturalmente potete scriverne di vostre.

  Le utility user_call sono eccellenti esempi su cui impostare il vostro
  lavoro; spendendoci su un po' di tempo si comprende come il novanta
  percento del lavoro consiste nel riuscire ad aprire il socket. Per la
  verit effettuare la connessione  semplice,  la preparazione che
  richiede tempo.

  Gli esempi sono semplici a sufficienza da non creare confusione. In
  caso di dubbi  buona cosa rivolgerli alla mailing list linux-hams,
  dove senz'altro ci sar qualcuno che vi dar una mano.





  22.  Alcune semplici configurazioni.

  Vengono ora presentati esempi delle configurazioni pi tipiche.
  Devono essere prese come spunto, visto che ci sono tanti modi di
  configurare reti, quanto il numero di reti stesso, ma possono comunque
  essere d'ispirazione.


  22.1.  Piccola LAN Ethernet con macchina Linux che fa da router verso
  una LAN radio.

  Molti hanno delle piccole reti locali a casa e vogliono connettere le
  macchine di quella rete alla rete radio. Questa  il tipo di
  configurazione che uso a casa. Ho fatto in modo di avere un blocco di
  indirizzi a me allocato che per comodit posso catturare in una
  singola route e che uso per la mia LAN domestica. Il vostro numeratore
  IP per la vostra zona vi assister in questo se volete farlo anche
  voi. Gli indirizzi per la rete locale Ethernet formano un sottoinsieme
  degli indirizzi della LAN radio; quella che segue  la configurazione
  che adotto:



                                                 .      .   .    .    . .
         ---                                .
          | Rete          /---------\     .    Rete
          | 44.136.8.96/29|         |    .     44.136.8/24        \ | /
          |               | Router  |   .                          \|/
          |               |         |  .                            |
          |          eth0 | Linux   |  .  /-----\    /----------\   |
          |---------------|         |-----| TNC |----| Radio    |---/
          |   44.136.8.97 |    e    |  .  \-----/    \----------/
          |               |         | sl0
          |               | Server  | 44.136.8.5
          |               |         |    .
          |               |         |     .
          |               \_________/       .
         ---                                     .      .   .    .    . .




























  #!/bin/sh
  # /etc/rc.net
  # Questa configurazione rende disponibile una porta KISS AX.25
  # e un device Ethernet.

  echo "/etc/rc.net"
  echo "  Sto configurando:"

  echo -n "    loopback:"
  /sbin/ifconfig lo 127.0.0.1
  /sbin/route add 127.0.0.1
  echo " fatto."

  echo -n "    ethernet:"
  /sbin/ifconfig eth0 44.136.8.97 netmask 255.255.255.248 \
                  broadcast 44.136.8.103 up
  /sbin/route add 44.136.8.97 eth0
  /sbin/route add -net 44.136.8.96 netmask 255.255.255.248 eth0
  echo " fatto."

  echo -n "    AX.25: "
  kissattach -i 44.136.8.5 -m 512 /dev/ttyS1 4800
  ifconfig sl0 netmask 255.255.255.0 broadcast 44.136.8.255
  route add -host 44.136.8.5 sl0
  route add -net 44.136.8.0 window 1024 sl0

  echo -n "    Netrom: "
  nrattach -i 44.136.8.5 netrom

  echo "  Routing:"
  /sbin/route add default gw 44.136.8.68 window 1024 sl0
  echo "    default route."
  echo done.

  # end




  /etc/ax25/axports


       # nome  nominativo     velocit paclen  window  descrizione
       4800    VK2KTJ-0        4800    256     2       144.800 MHz




  /etc/ax25/nrports


       # name  nominativo      alias   paclen  descrizione
       netrom  VK2KTJ-9        LINUX   235     Linux Switch Port




  /etc/ax25/nrbroadcast


       # ax25_name     min_obs def_qual        worst_qual      verbose
       4800            1       120             10              1




    Occorre che IP_FORWARDING sia abilitato nel vostro kernel.

    Quando necessario fare riferimento ai file di configurazione AX.25
     presentati nelle sezioni precedenti.

    Ho scelto di usare un indirizzo IP per la mia porta radio che non
     fa parte del blocco usato per la mia rete. Ci non  obbligatorio,
     per quella porta si sarebbe potuto tranquillamente usare anche
     44.136.8.97

    44.136.8.68  il mio gateway locale di incapsulamento IPIP, e per
     questo vi punto la mia route di default.

    Ogni macchina sulla mia rete Ethernet ha una route:


       route add -net 44.0.0.0 netmask 255.0.0.0 \
               gw 44.136.8.97 window 512 mss 512 eth0




  L'uso dei parametri mss e window permette di ottimizzare le connes
  sioni sia dal lato radio che da quallo Ethernet.

    Sulla macchina router vengono fatti girare smail, http, ftp ed
     altri demoni in modo che questi servizi vengano resi disponibili ad
     entrambe le reti.

    La macchina che funge da router  un piccolo 386DX20 con un disco
     fisso da 20Mb ed una installazione di Linux minimale.


  22.2.  Configurazione del gateway di incapsulamento IPIP.

  Linux oggi  utilizzato spessissimo per i gateway di incapsulamento
  TCP/IP in tutto il mondo. Il driver per il tunnelling supporta route
  di incapsulamento multiple rendendo obsoleto il vecchio demone ipip.
  Una configurazione tipica  la seguente:



                                                 .      .   .    .    . .
         ---                                .
          | Rete          /---------\     .    Rete
          | 154.27.3/24   |         |    .     44.136.16/24       \ | /
          |               | Gateway |   .                          \|/
          |               |         |  .                            |
          |          eth0 | Linux   |  .  /-----\    /----------\   |
       ---|---------------|         |-----| TNC |----| Radio    |---/
          |   154.27.3.20 | IPIP    |  .  \-----/    \----------/
          |               |         | sl0
          |               |         | 44.136.16.1
          |               |         |    .
          |               |         |     .
          |               \_________/       .
         ---                                     .      .   .    .    . .




  I file di configurazione che si usano sono:




  # /etc/rc.net
  # Questa  una semplice configurazione che rende disponibile una
  # porta radio KISS AX.25, un device Ethernet e sfrutta il tunnel
  # driver del kernel per effettuare l'incapsulamento/deincapsulamento
  # IPIP
  #
  echo "/etc/rc.net"
  echo "  Configurazione:"
  #
  echo -n "    loopback:"
  /sbin/ifconfig lo 127.0.0.1
  /sbin/route add 127.0.0.1
  echo " fatto."
  #
  echo -n "    ethernet:"
  /sbin/ifconfig eth0 154.27.3.20 netmask 255.255.255.0 \
                  broadcast 154.27.3.255 up
  /sbin/route add 154.27.3.20 eth0
  /sbin/route add -net 154.27.3.0 netmask 255.255.255.0 eth0
  echo " fatto."
  #
  echo -n "    AX.25: "
  kissattach -i 44.136.16.1 -m 512 /dev/ttyS1 4800
  /sbin/ifconfig sl0 netmask 255.255.255.0 broadcast 44.136.16.255
  /sbin/route add -host 44.136.16.1 sl0
  /sbin/route add -net 44.136.16.0 netmask 255.255.255.0 window 1024
  sl0
  #
  echo -n "    tunnel:"
  /sbin/ifconfig tunl0 44.136.16.1 mtu 512 up
  #
  echo fatto.
  #
  echo -n "Routing ... "
  source /etc/ipip.routes
  echo fatto.
  #
  # end.




  e:



       # /etc/ipip.routes
       # Questo file  generato dallo script munge
       #
       /sbin/route add -net 44.134.8.0 netmask 255.255.255.0 tunl0 gw
       134.43.26.1
       /sbin/route add -net 44.34.9.0 netmask 255.255.255.0 tunl0 gw
       174.84.6.17
       /sbin/route add -net 44.13.28.0 netmask 255.255.255.0 tunl0 gw
       212.37.126.3
          ...
          ...
          ...




  /etc/ax25/axports



  # nome  nominativo     velocit paclen  window  descrizione
  4800    VK2KTJ-0        4800    256     2       144.800 MHz




  Alcuni punti su cui soffermarsi:


    Il nuovo tunnel driver usa il campo gw nella tabella di routing al
     posto del parametro pointopoint per specificare l'indirizzo del
     gateway IPIP remoto. Questo  il motivo per cui ora sono supportate
     route multiple per ciascun'interfaccia.

    Si possono configurare due device di rete con lo stesso indirizzo.
     In quest'esempio sia sl0 che tunl0 sono stati configurati con
     l'indirizzo IP della porta radio; in questo modo il gateway remoto
     vede l'indirizzo corretto nei datagrammi incapsulati che il gateway
     locale gli invia.

    I comandi di routing usati per generare le route incapsulate
     possono essere generate da una versione modificata dello script
     munge che viene riportato pi sotto. I comandi di routing vengono
     scritti in un file separato e letto usando il comando bash
     source/etc/ipip.routes (supponendo di aver chiamato
     /etc/ipip.routes il file in questione). Il file deve essere nel
     formato delle route di NOS.

    Si noti l'uso dell'argomento window nel comando route. Settando
     opportunamente questo parametro si migliorano le prestazioni del
     collegamento radio.


  Ecco il nuovo script tunnel-munge:
































  #!/bin/sh
  #
  # Da: Ron Atkinson <n8fow@hamgate.cc.wayne.edu>
  #
  #  Questo script  basato sullo script 'munge' scritto da Bdale N3EUA
  #  per il demone IPIP, modificato da Ron Atkinson N8FOW. Il suo scopo
  #   quello di convertire un file di gateway nel formato NOS di KA9Q
  #  (chiamato di solito 'encap.txt') nel formato delle tabelle di
  #  routing di Linux per il tunnel driver IP
  #
  #       Uso: File dei gateway su stdin, file nel formato Linux su stdout.
  #             esempio:  tunnel-munge < encap.txt > ampr-routes
  #
  # NOTA: Prima di usare questo script assicurarsi di controllare ed
  #       eventualmente cambiare i seguenti parametri:
  #
  #     1) Cambiare le sezioni 'Route locali e 'Altre route
  #        dell'utente' con le route presenti nella vostra area
  #        (rimuovete le mie!)
  #     2) Sulla riga di fgrep assicurarsi di cambiare l'indirizzo IP
  #        con il VOSTRO indirizzo di gateway internet. Se non si
  #        effettua questa operazione si rischiano seri routing loop.
  #     3) L'interfaccia ha nome di default 'tunl0'. Assicurarsi che
  #        questa assunzione  sia corretta sul vostro sistema.

  echo "#"
  echo "# Tabella di routing con IP tunnelling generata da $LOGNAME il
  `date`"
  echo "# dallo script tunnel-munge v960307."
  echo "#"
  echo "# Route locali"
  echo "route add -net 44.xxx.xxx.xxx netmask 255.mmm.mmm.mmm dev sl0"
  echo "#"
  echo "# Altre route dell'utente"
  echo "#"
  echo "# route remote"

  fgrep encap | grep "^route" | grep -v " XXX.XXX.XXX.XXX" | \
  awk '{
          split($3, s, "/")
          split(s[1], n,".")
          if      (n[1] == "")        n[1]="0"
          if      (n[2] == "")        n[2]="0"
          if      (n[3] == "")        n[3]="0"
          if      (n[4] == "")        n[4]="0"
          if      (s[2] == "1")       mask="128.0.0.0"
          else if (s[2] == "2")       mask="192.0.0.0"
          else if (s[2] == "3")       mask="224.0.0.0"
          else if (s[2] == "4")       mask="240.0.0.0"
          else if (s[2] == "5")       mask="248.0.0.0"
          else if (s[2] == "6")       mask="252.0.0.0"
          else if (s[2] == "7")       mask="254.0.0.0"
          else if (s[2] == "8")       mask="255.0.0.0"
          else if (s[2] == "9")       mask="255.128.0.0"
          else if (s[2] == "10")      mask="255.192.0.0"
          else if (s[2] == "11")      mask="255.224.0.0"
          else if (s[2] == "12")      mask="255.240.0.0"
          else if (s[2] == "13")      mask="255.248.0.0"
          else if (s[2] == "14")      mask="255.252.0.0"
          else if (s[2] == "15")      mask="255.254.0.0"
          else if (s[2] == "16")      mask="255.255.0.0"
          else if (s[2] == "17")      mask="255.255.128.0"
          else if (s[2] == "18")      mask="255.255.192.0"
          else if (s[2] == "19")      mask="255.255.224.0"
          else if (s[2] == "20")      mask="255.255.240.0"
          else if (s[2] == "21")      mask="255.255.248.0"
          else if (s[2] == "22")      mask="255.255.252.0"
          else if (s[2] == "23")      mask="255.255.254.0"
          else if (s[2] == "24")      mask="255.255.255.0"
          else if (s[2] == "25")      mask="255.255.255.128"
          else if (s[2] == "26")      mask="255.255.255.192"
          else if (s[2] == "27")      mask="255.255.255.224"
          else if (s[2] == "28")      mask="255.255.255.240"
          else if (s[2] == "29")      mask="255.255.255.248"
          else if (s[2] == "30")      mask="255.255.255.252"
          else if (s[2] == "31")      mask="255.255.255.254"
          else                    mask="255.255.255.255"

  if (mask == "255.255.255.255")
          printf "route add -host %s.%s.%s.%s gw %s dev tunl0\n"\
                  ,n[1],n[2],n[3],n[4],$5
  else
          printf "route add -net %s.%s.%s.%s gw %s netmask %s dev tunl0\n"\
                  ,n[1],n[2],n[3],n[4],$5,mask
   }'

  echo "#"
  echo "# default the rest of amprnet via mirrorshades.ucsd.edu"
  echo "route add -net 44.0.0.0 gw 128.54.16.18 netmask 255.0.0.0 dev
  tunl0"
  echo "#"
  echo "# fine"





  22.3.  Configurazione del gateway di incapsulamento AXIP

  Molti gateway radioamatoriali per Internet incapsulano l'AX.25, NetRom
  e Rose oltre che il tcp/ip. L'incapsulamento di frame AX.25 in
  datagrammi IP viene descritta nell'RFC-1226 da Brian Kantor. Nel 1991
  Mike Westerhof ha scritto un'implementazione del demone di
  incapsulamento dell'AX.25 per Unix, che viene proposta per Linux nelle
  ax25-utils in una versione leggermente migliorata.

  Un geteway di incapsulamento AXIP prende i frame AX.25, ne ricava
  l'indirizzo AX.25 di destinazione e in base a questo determina a quale
  indirizzo IP inviarli, dopo averli incapsulati in datagrammi tcp/ip,
  che vengono mandati all'indirizzo  di destinazione. Inoltre permette
  anche il percorso inverso, accettando datagrammi tcp/ip che contengono
  frame AX.25. Questi vengono estratti e trattati come se fossero
  pervenuti direttamente da una porta AX.25. Per distinguere i
  datagrammi che contengono frame AX.25, li si marca con un protocol id
  uguale a 4 (o 94 anche se questo  ora sconsigliato), come descritto
  dalla RFC-1226.

  Il programma ax25ipd incluso nelle ax-25utils gestisce un'interfaccia
  KISS sulla quale si possono far transitare pacchetti AX.25 ed
  un'interfaccia tcp/ip. Viene configurato tramite il file di
  configurazione /etc/ax25/ax25ipd.conf.


  22.3.1.  Opzioni di configurazione di AXIP.

  Il programma ax25ipd possiede due modi principali di funzionamento: il
  modo "digipeater" e il modo "tnc". Nel modo "tnc" il demone viene
  considerato come un tnc KISS, gli si passano frames KISS incapsulati
  in modo che li trasmetta, mentre nel modo "digipeater" si comporta,
  appunto, come un digipeater AX.25. Tra questi due modi vi sono delle
  sottili differenze.

  Nel file di configurazione si stabiliscono le "route" o le
  corrispondenze tra i nominativi AX.25 e gli indirizzi IP degli host ai
  quali si vogliono mandare i pacchetti AX.25. Ogni route possiede delle
  opzioni che verranno spegate pi avanti.

  Altre opzioni che vengono configurate sono:

  la tty che il demone ax25ipd apre e la sua velocit (di solito 
  un'estremit di una pipe)

  che nominativo usare in modo "digipeater"

  l'intervallo di emissione e il testo trasmesso dal beacon.

  se si vuole incapsulare i frame AX.25 in datagrammi IP oppure UDP/IP.
  Quasi tutti i gateway AXIP usano l'IP encapsulation, ma alcuni sono
  dietro a firewall che non permettono il passaggio a datagrammi col
  protocol id dell'AXIP, costringendoli ad usare UDP/IP.  Quale che sia
  la scelta, deve essere uguale a quella dell'host TCP/IP dall'altra
  parte del collegamento.


  22.3.2.  Un tipico esempio di /etc/ax25/ax25ipd.conf .











































  #
  # file di configurazioen ax25ipd per la stazione floyd.vk5xxx.ampr.org
  #
  # Selezione del tipo di trasporto. 'ip' permette la compatibilit
  # con la maggior parte dei gateway
  #
  socket ip
  #
  # Indicazione del tipo di modalit (digi or tnc)
  #
  mode tnc
  #
  # Se si  scelta la modalit digi, occorre definire un nominativo.
  # Se si  in modo tnc, il nominativo  attualmente opzionale, ma ci
  # pu cambiare in future (2 nominativi se si usano due porte kiss)
  #
  #mycall vk5xxx-4
  #mycall2 vk5xxx-5
  #
  # In modalit digi si pu indicare un alias. (2 se si usano due porte
  # kiss)
  #
  #myalias svwdns
  #myalias2 svwdn2
  #
  # Si manda l'identificativo ogni 540 secondi ...
  #
  #beacon after 540
  #btext ax25ip -- tncmode rob/vk5xxx -- Gateway sperimentale AXIP
  #
  # Porta seriale, o pipe connessa a kissattach in questo caso.
  #
  device /dev/ttyq0
  #
  # Velocit del device
  #
  speed 9600
  #
  # loglevel 0 - nessun output
  # loglevel 1 - solo informazioni di configurazione
  # loglevel 2 - principali eventi ed errori
  # loglevel 3 - principali eventi ed errori, nonch la traccia dei
  #              frame AX.25
  # loglevel 4 - tutti gli eventi
  # log 0 per il momento, con syslog ancora non fuziona ....
  #
  loglevel 2
  #
  # Se siamo in modalit digi, ci dev'essere un vero tnc,
  # quindi uso param per settare i suoi parametri ....
  #
  #param 1 20
  #
  # Definizione degli indirizzi di broadcast. Ognuno degli indirizzi
  # indicati sar inoltrato ad ogni route in grado di effettuare il
  # broadcast.
  broadcast QST-0 NODES-0
  #
  # definizione delle route ax.25
  # il formato  route (nominativo/carattere jolly) (ip dell'host di
  # destinazione) Se il ssid  zero la regola si applica a tutti i ssid.
  #
  # route <destcall> <destaddr> [flags]
  #
  # I flag validi sono
  #         b  - permette il transito dei broadcast attraverso questa
  #              route
  #         d  - indica che questa  la route di default
  #
  route vk2sut-0 44.136.8.68 b
  route vk5xxx 44.136.188.221 b
  route vk2abc 44.1.1.1
  #
  #





  22.3.3.  Uso di ax25ipd


     Occorre creare le voci opportune nel file
        /etc/ax25/axports:"


          # /etc/ax25/axports
          #
          axip    VK2KTJ-13       9600    256     AXIP port
          #





     Va usato il comando kissattach per creare la porta da
        utilizzare:"


          /usr/sbin/kissattach /dev/ptyq0 axip





     Si lancia il programma ax25ipd:


          /usr/sbin/ax25ipd &





     Per testare il link AXIP link:


          call axip vk5xxx





  22.3.4.  Alcune note riguardo le route e i loro flag

  Col comando "route" si specifica dove si vuole inoltrare i propri
  pacchetti incapsulati. Quando il demone ax25ipd riceve un pacchetto
  dalla sua interfaccia, confronta il nominativo di destinazione con
  tutti quelli presenti nella tabella di routing. Se lo trova, il
  pacchetto AX.25 viene incapsulato in un datagramma IP e poi trasmesso
  all'indirizzo IP indicato.

  Ci sono due flag che si possono aggiungere ad ogni comando di route
  nel file ax25ipd.conf:

     b  il traffico che ha come destinazione gli indirizzi definiti
        dalla parola chiave "broadcast" devono essere trasmessi
        attraverso questa route.

     d  ogni pacchetto il cui indirizzo non compare in alcuna route deve
        essere trasmessa attraverso questa route.

  Il flag di broadcast  molto utile, poich permette di inviare
  informazioni destinate a tutte le stazioni, a molte destinazioni AXIP.
  Normalmente le route AXIP sono di tipo punto-punto ed incapaci di
  gestire pacchetti di tipo 'broadcast'.


  22.4.  Collegare NOS e Linux con un pipe device.

  Molti radioamatori utilizzano alcune versioni di NOS sotto Linux,
  poich hanno a disposizione tutte le funzionalit a cui sono abituati;
  a molti di questi piacerebbe che il loro NOS potesse colloquiare col
  kernel di Linux in modo di poter mettere a disposizione le
  funzionalit del sistema operativo agli utenti che si collegano via
  radio con NOS.

  Brandon S. Allbery, KF8NH, ha fornito queste informazioni, che
  consentono di interconnettere il NOS con Linux tramite il device pipe.

  Poich sia Linux che NOS supportano il protocollo slip,  possibile
  connettere i due creando un link di tipo slip. E' possibile realizzare
  questo collegamento realizzando in collegamento tra due porte seriali
  della stessa macchina collegate in loopback con un cavo, ma questa
  realizzazione risulterebbe lenta e costosa. Linux, al contrario,
  fornisce una funzionalit tipica dei sistemi Unix chiamata 'pipe'. I
  pipe sono degli 'pseudo-device' che sono visti dai programmi come
  normali device tty, ma che in realt fungono da collegamento verso un
  altro pipe. Per usare i pipe il programma chiamante deve attivare il
  pipe master e, successivamente, il programma chiamato deve fare lo
  stesso col pipe slave.  Una volta aperte le due porte, i programmi
  possono comunicare tra loro semplicemente scrivendo caratteri sul
  device pipe, esattamente come se fossero normali terminali seriali.

  Per usare questa funzionalit per connettere il kernel di Linux con
  una copia di NOS od altri programmi, occorre per prima cosa scegliere
  il pipe da usare. I pipe trovano nella directory /dev; le parti master
  del pipe sono chiamate ptyq[1-f], mentre quelle slave sono ttyq[1-f].
  Si ricordi che vanno sempre in coppia, per cui se si sceglie
  /dev/ptyqf come parte master, occorre scegliere /dev/ttyqf come parte
  slave.

  Una volta scelta una coppia di device pipe da usare, la parte master
  va allocata al kernel Linux, mentre la parte slave va assegnata a NOS;
  occorre quindi allocare un indirizzo unico per NOS, se non si  gi
  provveduto a farlo.

  I pipe si configurano come se fossero device seriali, per cui per
  creare il collegamento slip dal kernel Linux, si possono usare i
  seguenti comandi:








  # /sbin/slattach -s 38400 -p slip /dev/ptyqf &
  # /sbin/ifconfig sl0 broadcast 44.255.255.255 pointopoint 44.70.248.67 /
          mtu 1536 44.70.4.88
  # /sbin/route add 44.70.248.67 sl0
  # /sbin/route add -net 44.0.0.0 netmask 255.0.0.0 gw 44.70.248.67




  In questo esempio al kernel Linux  stato assegnato l'indirizzo IP
  44.70.4.88, mentre NOS usa l'indirizzo 44.70.248.67.  Il comando route
  nell'ultima riga indica al kernel Linux di instradare, attraverso il
  collegamento slip creato dal comando slattach, tutti i datagrammi
  indirizzati verso amprnet.  Normalmente questi comandi vanno messi nel
  file /etc/rc.d/rc.inet2 immediatamente dopo tutti gli altri comandi di
  configurazione della rete, in modo che il collegamento slip sia creato
  alla partenza del sistema.  Nota: non c' alcun vantaggio nell'uso del
  comando cslip al posto di slip, anzi , con cslip si avverte un calo di
  prestazioni poich, essendo un collegamento virtuale, il tempo
  impiegato per comprimere gli header  superiore di quello che viene
  impiegato per trasmettere i datagrammi non compressi.

  Per configurare la parte NOS dall'altra parte del collegamento si pu
  usare la seguente configurazione:



       # si pu chiamare l'interfaccia come si vuole, in questo caso la si 
       # chiamata "linux" per comodit
       attach asy ttyqf - slip linux 1024 1024 38400
       route addprivate 44.70.4.88 linux




  Questi comandi creano una porta slip chiamata `linux' attraverso la
  parte slave del pipe che lo collega al kernel di Linux, ed un comando
  di route per farla funzionare. Una volta fatto partire NOS, si deve
  essere in grado di eseguire ping e telnet da Linux a NOS e viceversa.
  Se ci non si verificasse, controllare con attenzione soprattutto la
  corretta configurazione degli indirizzi e del pipe.



  23.  Dove trovare maggiori informazioni su.... ?

  Poich questo documento suppone che si abbia gi maturato una certa
  esperienza col packet radio, nel caso fosse necessario ho raccolto un
  elenco di altre fonti di informazione che possono risultare utili.



  23.1.  Packet Radio

  Informazioni generali sul packet radio si possono trovare su questi
  siti:

  American Radio Relay League <http://www.arrl.org/>,

  Radio Amateur Teleprinter Society <http://www.rats.org/>

  Tucson Amateur Packet Radio Group <http://www.tapr.org/>




  23.2.  Documentazione sui protocolli


  AX.25, NetRom - Jonathon Naylor ha raccolto una serie di documenti
  riguardo i protocolli usati nel packet radio. Questa documentazione 
  stata raccolta nel file ax25-doc-1.0.tar.gz
  <ftp://ftp.pspt.fi/pub/ham/linux/ax25/ax25-doc-1.0.tar.gz>



  23.3.  Documentazione sull'hardware


  Informazioni sulla scheda PI2 possono essere reperite presso l' Ottawa
  Packet Radio Group <http://hydra.carleton.ca/>.

  Informazioni sull'hardware del Baycom si trovano alla Baycom Web Page
  <http://www.baycom.de/>.


  24.  Discussioni riguardo i radioamatori e Linux.

  Si possono trovare diversi luoghi di discussione riguardanti i
  radioamatori e Linux, come ad esempio i newsgroup comp.os.linux.*, o
  la mailing list HAMS presso vger.rutgers.edu (il luogo di discussione
  principale per l'uso del TCP/IP tra i radioamatori), oppure anche il
  canale #linpeople della rete irc linuxnet.

  Per iscriversi alla mailing list linux-hams occorre mandare un
  messaggio a:


       Majordomo@vger.rutgers.edu




  con la riga:


       subscribe linux-hams




  nel corpo del messaggio. Il titolo del messaggio stesso viene igno
  rato.

  I messaggi della mailing list linux-hams sono archiviati presso:

  zone.pspt.fi <http://zone.pspt.fi/archive/linux-hams/> e
  zone.oh7rba.ampr.org <http://zone.oh7rba.ampr.org/archive/linux-
  hams/>.  Siete invitati a controllare questi archivi prima di mandare
  quesiti alla mailing list, poich a molte domande  gi stata data
  un'esauriente risposta.

  Per iscriversi al tcp-group mandare una mail a:


       listserver@ucsd.edu




  con la riga:

  subscribe tcp-group




  nel testo del messaggio.

  Nota: Ricordate che il tcp-group serve principalmente per la
  discussione sull'uso di protocolli avanzati, come il tcp/ip in campo
  radioamatoriale. Le domande esclusivamente su Linux non devono essere
  formulate in quest'area.



  25.  Riconoscimenti.

  Le seguenti persone (qui elencate senza un particolare ordine) hanno
  contribuito in un modo o nell'altro (magari anche senza saperlo) alla
  stesura di questo documento: Jonathon Naylor, Thomas Sailer, Joerg
  Reuter, Ron Atkinson, Alan Cox, Craig Small, John Tanner, Brandon
  Allbery, Hans Alblas, Klaus Kudielka, Carl Makin.


  26.  Copyright.

  AX25-HOWTO, informazioni sull'installazione e la configurazione di
  alcuni dei pi importanti pacchetti software per il supporto AX.25
  sotto Linux. Copyright (c) 1996 Terry Dawson. Traduzione italiana di
  Nico Alberti

  Questo programma  free software; la distribuzione e l'utilizzo di
  questo documento sono vincolati dai termini indicati nella versione 2
  (o da qualunque versione successiva) della GNU General Public License
  pubblicata dalla Free Software Foundation.

  Questo documento viene distribuito con l'intento di essere utile, ma
  SENZA ALCUNA GARANZIA, compreso quella implicita di FUNZIONALITA' o di
  UTILITA' PER UN PARTICOLARE UTILIZZO. Vedere la GNU General Public
  License per ulteriori dettagli.

  Assieme a questo documento dovreste aver ricevuto una copia della GNU
  General Public License; se ci non fosse vi preghiamo di scrivere alla

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.

  The AX25-HOWTO, information on how to install and configure some of
  the more important packages providing AX25 support for Linux.
  Copyright (c) 1996 Terry Dawson.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the:

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.

  Linux Access HOWTO
  Michael De La Rue,  access-howto@ed.ac.uk
  v2.9, 28 Marzo 1997

  Il Linux Access HOWTO tratta dell'uso della tecnologia adattativa con
  Linux, in particolare, come usare la tecnologia adattativa per rendere
  Linux accessibile a chi non potrebbe altrimenti usarlo. Tratta anche
  delle aree in cui Linux pu essere usato all'interno di soluzioni di
  tecnologia adattativa pi generale.

  1.  Introduzione

  Lo scopo di questo documento  di raccogliere tutte le informazioni
  sull'uso di Linux da parte di persone che hanno difficolt
  particolari, che possano essere superate con aiuti specifici, sia
  software che hardware.  In altre parole, i ciechi, chi  parzialmente
  privo della vista, i sordi e gli invalidi fisici. Questo documento
  viene aggiornato con la scoperta di nuove tecnologie o informazioni.


  Il problema pi grande  che, a tutt'oggi, pochissime di queste
  persone usano Linux anche a causa delle difficolt che implica. Ci
  significa che lo sviluppo non sta tenendo conto delle necessit
  particolari, e quindi il sistema sta diventando sempre pi difficile
  da usare. Spero che questo HOWTO risolva il problema.


  Per favore mandate qualsiasi commento, informazione aggiuntiva, o
  offerta di collaborazione a access-howto@ed.ac.uk Questo indirizzo
  potrebbe in futuro diventare una mailing list, o essere
  automaticamente dato ad un'altra persona che si occupi della
  manutenzione dell'HOWTO, quindi per favore non usatelo per la posta
  personale.


  Potete anche contattarmi via posta normale a



       Linux Access HOWTO
       23 Kingsborough Gardens
       Glasgow G12 9NH
       Scotland
       U.K.




  e piano piano girer il mondo fino ad arrivare a me. La posta
  eletronica ci mette settimane in meno.



  Posso essere contattato personalmente usando miked@ed.ac.uk.  Dato che
  uso dei filtri su tutta la posta che ricevo, per favore usate l'altro
  indirizzo tranne che per la posta personale. Fare in questo modo vi
  porter con pi probabilit ad una risposta appropriata.


  Nota del traduttore: tutte le comunicazioni che riguardano aspetti
  della traduzione vanno inviati a me ( eugenia.franzoni@pg.infn.it ).
  Potete contattare me anche se avete contributi da fare all'autore, e
  non conoscete l'inglese. Io li tradurr e glieli mander al pi presto
  possibile (compatibilmente con i miei impegni ;-)


  1.1.  Policy di distribuzione


       L'ACCESS-HOWTO  copyright (c) 1996 Michael De La Rue



       La policy di distribuzione viene riportata in lingua originale.



       A verbatim copy may be reproduced or distributed in any medium physi
       cal or electronic without permission of the author.  Translations are
       similarly permitted without express permission if it includes a notice
       on who translated it.



       Short quotes may be used without prior consent by the author.  Deriva
       tive work and partial distributions of the UUCP-HOWTO must be accompa
       nied with either a verbatim copy of this file or a pointer to the ver
       batim copy.



       Commercial redistribution is allowed and encouraged; however, the
       author would appreciate being notified of any such distributions (as a
       courtesy).



       In short, we wish to promote dissemination of this information through
       as many channels as possible. However, we do wish to retain copyright
       on the HOWTO documents.



       We further want that ALL information provided in the HOWTOs is dissem
       inated.  If you have questions, please contact Greg Hankins, the Linux
       HOWTO coordinator, at gregh@sunsite.unc.edu.





  2.  Paragone di Linux con altri sistemi operativi.

  2.1.  Paragone generale

  Il posto migliore per trovare informazioni a tale proposito  in
  documenti come il `Linux Info Sheet', le `Linux Meta FAQ' e le `Linux
  FAQ' (vedere ``Documentazione su Linux'').  Una delle principali
  ragioni di usare Linux per una persona con problemi di vista  il suo
  supporto di rete insito nel sistema, che d pieno accesso a Internet.
  Pi in generale, gli utenti vengono attirati dall'ambiente di sviluppo
  completo incluso nel sistema.


  2.2.  Disponibilit di tecnologia adattativa

  Non esiste quasi niente disponibile in commercio specificamente per
  Linux. Esiste una quantit notevole di software gratuito che pu
  essere utile per l'adattamento, come ad esempio un sintetizzatore di
  voce e alcuni pacchetti software di controllo vocale. Esistono anche
  un buon numero di pacchetti gratuiti che supportano determinati
  terminali braille, ad esempio.
  2.3.  Usabilit inerente

  Linux ha il grande vantaggio su Windows che la maggior parte del suo
  software  basato sulla linea di comando. Questo sta cambiando, e
  quasi tutto  ora disponibile con un'interfaccia grafica. Comunque,
  dato che  in origine un sistema operativo per i programmatori,
  vengono ancora scritti programmi testuali che ricoprono quasi tutte le
  aree di interesse.  Per gli invalidi fisici, ci significa che 
  facile costruire programmi che servano alle loro esigenze. Per chi ha
  problemi alla vista, dovrebbe rendere semplice e utile l'uso di un
  sintetizzatore vocale o di un terminale braille nel prossimo futuro.


  Il sistema di console virtuali multiple rende Linux un sistema
  operativo multi-tasking per persone con problemi alla vista.


  Il sistema di finestre usato da Linux (X11)  corredato da molti
  strumenti di programmazione, e dovrebbe essere adattabile. Comunque,
  in pratica, i programmi adattativi disponibili fino ad ora sono pi
  primitivi di quelli su Macintosh o Windows. Sono, comunque,
  completamente gratuiti (invece di costare centinaia di sterline), e la
  qualit sta visibilmente migliorando.


  In linea di principio dovrebbe esser possibile mettere insieme un
  sistema Linux completo ed utilizzabile da una persona handicappata
  alla vista per circa  $500 (PC di poco valore + scheda audio).  Il
  paragone da fare  con le migliaia di dollari per gli altri sistemi
  operativi (software di lettura dello schermo / hardware di
  sintetizzazione vocale). Devo ancora controllare. Non credo che
  funzioni in pratica, dato che i sintetizzatori vocali disponibili per
  Linux non sono sufficientemente buoni. Per una persona invalida
  fisicamente, c' la limitazione della spesa dell'hardware di input.


  3.  Persone con problemi alla vista.

  In questa sezione user due categorie: le persone che hanno parte
  della vista e che hanno bisogno di aiuto per vedere / decifrare
  /seguire il testo e quelle che non possono usare nessun tipo di
  interfaccia grafica.


  3.1.  Vedere lo schermo con la vista bassa

  Ci sono problemi diversi che rientrano in questa categoria. Spesso un
  semplice ingrandimento  utile, ma non basta. Talvolta non si riesce a
  seguire il moto, o non si trova il cursore se non si muove. Ne
  derivano una gamma di tecniche, la maggior parte delle quali sono
  aggiunte ad X in questo periodo.


  3.1.1.  SVGATextMode

  Questo programma  utile per aumentare la visibilit del normale
  schermo di testo fornito da Linux. Fornisce pieno accesso ai modi
  possibili di una scheda grafica SVGA. Ad esempio, il testo pu essere
  reso pi grande in modo che appaiano sullo schermo solo 50 per 15
  caratteri (normalmente sono 80 per 25). Non esiste modo semplice per
  zoomare su sezioni di schermo, ma quando  necessario lo si pu
  ridimensionare.




  3.1.2.  X windows

  Ci sono molti modi di migliorare X windows. Non sono stati uniti in un
  insieme coerente di caratteristiche, ma se impostate in modo adeguato
  possono risolvere molti problemi.


  3.1.2.1.  Diverse risoluzioni di schermo

  Il server X pu essere impostato a diverse risoluzioni. Una semplice
  pressione di tasto pu far ruotare tra di esse rendendo pi semplice
  vedere del testo poco distinguibile.

  Nel file /etc/XF86Config, c' un'entrata nella sezione Screen con una
  linea che comincia con "Modes". Se, ad esempio, si imposta questa
  linea a


       Modes       "1280x1024" "1024x768" "800x600" "640x480" "320x240"




  con ogni modo impostato correttamente (cosa che richiede un monitor
  ragionevolmente buono per i modi a pi alta risoluzione), si possono
  avere quattro livelli di ingrandimento dello schermo, e si pu ruotare
  tra di essi usando

  Ctrl+Alt+Pi_del_tastierino e Ctrl+Alt+Meno_del_tastierino


  Muovendo il mouse all'interno dello schermo si vedranno diverse parti
  dello schermo stesso. Per ulteriori dettagli su come impostare questa
  caratteristica vedere la documentazione che accompagna il server X
  XFree86.



  3.1.2.2.  Ingrandimento dello schermo

  Ci sono due programmi di ingrandimento dello schermo che io conosco:
  xmag, che ingrandisce una porzione dello schermo alla dimensione
  desiderata ma  molto primitivo. L'altro  xzoom.  In precedenza
  dicevo che ci doveva essere qualcosa di meglio di xmag, beh, eccolo.
  Vedere ``xzoom''.



  3.1.2.3.  Cambiamento dei font dello schermo.

  Nei programmi scritti per X dovrebbe essere sempre possibile cambiare
  font. Semplicemente si pu rendere abbastanza grande da poterlo
  vedere.  In genere si pu farlo mettendo una linea nel file .Xdefaults
  che dovrebbe essere nella vostra home directory. Mettendo le linee
  corrette si pu cambiare il font dei programmi; ad esempio


  Emacs.font: -sony-fixed-medium-r-normal--16-150-75-75-c-80-iso8859-*



  Per vedere quali font sono disponibili, usate il programma xfontsel
  sotto X.



  Ci dovrebbe essere un modo per cambiare le cose ad un livello pi
  basso, in modo che tutti i programmi usino un font ingrandito. Si pu
  fare rinominando i font, e dicendo ai programmi che generano i font di
  usare un diverso livello di ingrandimento. Se qualcuno riesce a farlo
  funzionare correttamente, per favore mandatemi i dettagli di come ci
  siete riusciti.


  3.1.2.4.  Cursori a croce ecc..

  Per chi ha problemi a seguire il cursore ci sono parecchi strumenti
  utili:


    cursori a croce (linee orizzontali e verticali dal bordo dello
     schermo)

    cursori lampeggianti (lampeggiano quando si preme un tasto)


  Non esiste software per questo scopo. Ho provato veramente a trovare
  qualcosa; deve esistere da qualche parte. Sarebbe facile scrivere che
  ne sono sicuro


  Per ora il meglio che si possa fare  cambiare la bitmap del cursore.
  Fate un file bitmap come volete, e un altro della stessa grandezza, ma
  completamente nero. Convertiteli in formato XBM e avviate


          xsetroot -cursor cursorfile.xbm black-file.xbm



  in realt, se capite le maschere, il file black-file non ha bisogno di
  essere completamente nero, ma cominciate con un file cos. Il file
  .Xdefaults controlla i cursori usati dalle applicazioni correnti.


  3.1.3.  Produrre stampe ingrandite

  Fare delle stampe ingrandite con Linux  piuttosto semplice. Ci sono
  diverse tecniche.


  3.1.3.1.  LaTeX / TeX

  Il LaTeX  un sistema di preparazione di documenti estremamente
  potente.  Pu essere usato per produrre documenti stampati in formato
  ingrandito di quasi qualsiasi natura. Anche se  abbastanza complicato
  da imparare, molti documenti vengono prodotti usando il LaTeX o il suo
  predecessore TeX.



  questo produrr del testo ragionevolmente grande



       \font\magnifiedtenrm=cmr10 at 20pt  % setup a big font
       \magnifiedtenrm
       questo \`e del testo grande
       \bye



  Per altri dettagli, vedere il libro sul LaTeX disponibile in tutte le
  librerie che tengono libri sui computer.


  3.1.4.  Come avere in output del testo ingrandito.

  Quasi tutte le stampanti per Linux usano il postscript, e con Linux ci
  si possono usare  quasi tutte le stampanti. Io ho come output del
  materiale sull'insegnamento con testo ingrandito usando una normale
  stampante ad aghi Epson.

  Potete suggerire altri strumenti per generare del testo ingrandito?
  Quale word processor si pu consigliare?


  3.2.  Ausili per chi non pu usare l'output visuale

  Per chi non pu usare in nessun modo uno schermo normale ci sono due
  alternative: il Braille e i sintetizzatori vocali. Naturalmente per
  chi ha anche problemi all'udito, i sintetizzatori vocali non sempre
  sono utili, quindi il braille sar sempre importante.

  Se potete scegliere, quale scegliere? E' un argomento di dibattito
  `vigoroso'. La sintesi vocale  veloce da usare, abbastanza a buon
  mercato e specialmente buono per le applicazioni testuali (come
  leggere un documento lungo come questo). Come problemi ci sono che si
  deve avere un ambiente silenzioso, possibilmente con delle cuffie per
  lavorare senza disturbare gli altri e per evitare di essere ascoltati
  dagli altri (cosa non disponibile per tutti i sintetizzatori vocali).

  Il Braille  migliore per le applicazioni in cui  importante una
  disposizione precisa (ad esempio i fogli elettronici). Pu anche
  essere in qualche modo pi utile se si vuole controllare l'inizio di
  una frase quando si arriva alla fine. Il Braille , comunque, molto
  pi costoso e pi lento per la lettura. Ovviamente, pi si legge in
  Braille pi veloci si diventa.  Il Braille di grado II  difficile da
  imparare, ma  conveniente, dato che  molto pi veloce. Ci significa
  che se non usate il Braille per un po' di tempo, non potrete mai
  scoprire il suo pieno potenziale e decidere da voi. Comunque, basti
  questo su un argomento cos controverso.

  basato su un originale di James Bowden jrbowden@bcs.org.uk


  3.2.1.  Terminali Braille

  I terminali Braille sono normalmente una o due linee di Braille.  Dato
  che di solito sono al massimo di 80 caratteri, e pi facilmente di 40,
  sono in qualche modo limitati. Ne conosco due tipi


    Terminali Braille guidati via hardware.

    Terminali Braille guidati via software.


  Il primo tipo funziona solo quando il computer  in modo testo e legge
  la memoria dello schermo direttamente. Vedere la sezione ``terminali
  braille guidati via hardware''.


  Il secondo tipo di terminali Braille  simile, in molti modi, ad un
  normale video terminale del tipo che Linux supporta automaticamente.
  Sfortunatamente, hanno bisogno di software specifico per essere
  utilizzabili.

  Per questo ci sono due pacchetti. Il primo, BRLTTY, funziona con
  diversi tipi di terminale Braille, e gli autori sono disponibili ad
  aggiungerne altri, a mano a mano che sono disponibili pi
  informazioni. Al momento BRLTTY supporta la serie CombiBraille della
  Tieman B.V., la serie ABT3 della Alva B.V. e le serie PowerBraille e
  Navigator della Telesensory Systems Inc.  L'uso del Braille Lite della
  Blazie Engineering  ostacolato, ma il supporto pu essere rinovato su
  richiesta.  Vedere la sezione ``Terminali Braille guidati via
  software''.


  L'altro pacchetto che conosco  il Braille Enhanced Screen. Non ne ho
  ancora visto una versione. Dovrebbe permettere l'accesso utente ad un
  terminale braille con molte caratteristiche utili come la possibilit
  di far girare diversi programmi in diversi `terminali virtuali'
  contemporaneamente.


  3.2.2.  Sintesi vocale

  La sintesi vocale trasforma (normalmente) il testo ASCII in output
  parlato. E' possibile averne un'implementazione sia hardware che
  software. Sfortunatamente, i sintetizzatori vocali gratuiti di Linux
  sono, notoriamente, non abbastanza buoni da poter essere usati come
  unico mezzo di output.


  L'alternativa sono i sintetizzatori vocali hardware. L'unico che io
  conosca  il DECtalk della Digital, che viene usato con emacspeak.
  Usando emacspeak  abbastanza facile avere pieno accesso a tutte le
  capacit di Linux, incluso il normale uso della shell, un browser WWW
  e molte altre caratteristiche simili, come la posta elettronica. Anche
  se quando controlla dei programmi che non capisce funge semplicemente
  da lettore di testo (simile a quello della IBM per il PC), con quelli
  che capisce pu fornire un controllo molto pi sofisticato.  Vedere la
  sezione  ``Emacspeak'' per altre informazioni su emacspeak.


  3.2.3.  Utilizzo dell'output da console

  All'avvio, Linux normalmente invia tutti i messaggi allo schermo
  normale (visuale). Questo comportamento potrebbe essere cambiato da
  chiunque conosca a livello base la programmazione di un kernel. Ci
  significa che  impossibile per la maggior parte dei dispositivi
  braille ricevere le informazioni su cosa sta facendo Linux prima che
  il sistema operativo sia a pieno regime.


  E' solo a questo stadio che si pu avviare il programma necessario per
  l'accesso. Se viene usato il programma BRLTTY e lo si avvia il prima
  possibile nel processo di avvio, da quel punto i messaggi sullo
  schermo possono venire letti dal terminale, cosa che rende difficile,
  ma non impossibile, l'amministrazione di un sistema Linux per una
  persona priva della vista.


  Esiste un sistema braille che pu usare direttamente la console, che
  si chiama Braillex. E' progettato per leggere direttamente dalla
  memoria schermo. Sfotrunatamente il normale scroling del terminale
  intralcia l'uso di questo sistema. Se si usa un kernel successivo al
  1.3.75, basta digitare linux no-scroll al prompt di LILO per evitare
  automaticamente lo scrolling. Se avete una versione successiva di
  Linux, guardate la sezione ``Terminali Braille a memoria di schermo''



  L'altra cosa nota da fare  usare il suono per evidenziare quando ogni
  stadio della procedura di avvio  stato terminato. (Suggerimento di
  T.V.Raman)


  3.2.4.  Riconoscimento ottico dei caratteri

  Esiste un programma di riconoscimento ottico dei caratteri per Linux.
  Ha bisogno di esercizio per poter riconoscere il font particolare che
  dovr usare, e non ho idea di quanto sia buono. Per principio, se 
  abbastanza buono, dovrebbe permettere alle persone prive della vista
  di leggere in qualche modo i normali libri (l'accuratezza dell'OCR non
   mai abbastanza alta...).


  Pi dettagli sono i benvenuti. Deve essere messo in esercizio, cosa
  che potrebbe renderlo inutile?


  3.3.  Cominciare ad imparare ad usare Linux

  Cominciare ad imparare linux pu sembrare difficile e scoraggiante per
  chi non ha nozioni di informatica o per chi viene dal dos.  Le
  seguenti cose possono essere d'aiuto:


    Imparare ad usare Linux (o UNIX) sul sistema di qualcun altro prima
     di configurare il proprio.

    Controllare inizialmente linux da un terminale testo/audio che
     conoscete. Se prevedete di usare il controllo vocale, vi servir
     conoscere emacs per prima cosa.

    Se gi conoscete l'MS-DOS, leggete il Dos2Linux Mini HOWTO come
     aiuto per fare la conversione (vedere ``Gli HOWTO di Linux'').

  Esiste un documento scritto da  Jim Van Zance (jrv@vanzandt.mv.com)
  che copre questa parte in maggior dettaglio. Nel momento in cui state
  leggendo questo documento probabilmente sar disponibile da qualche
  parte in rete, o potete chiederlo direttamente a Jim.




  3.4.  Scrittura Braille

  Linux dovrebbe essere la piattaforma perfetta da cui usare una
  stampante braille. Ci sono molti strumenti di formattazione rivolti in
  modo specifico ai dispositivi a larghezza fissa. Un embosser Braille
  pu essere semplicemente connesso alla porta seriale usando il
  meccanismo di stampa standard di Linux.  Per ulteriori informazioni
  vedere il Linux Printing HOWTO.


  Esiste un pacchetto software gratuito che fa da traduttore multilingue
  di grado due, disponibile per Linux dalla ``Federazione Nazionale
  Ciechi'' americana. SI chiama NFBtrans. Vedere la sezione ``traduttore
  NFB'' per ulteriori dettagli.


  4.  Problemi di udito

  Per la maggior parte delle cose non ci sono molti problemi nell'uso di
  un computer per una persona con problemi all'udito.  Quasi tutto
  l'output  visivo. Ci sono alcune situazioni in cui  usato per anche
  l'output sonoro. Per queste situazioni, il problema si pu qualche
  volta aggirare usando invece l'outpu visivo.


  4.1.  Campane visive

  Per tradizione, i computer fanno `bip' quando qualche programma gli
  invia un codice speciale. Generalmente viene usato per attirare
  l'attenzione sul programma e per poco pi. La maggior parte delle
  volte,  possibile rimpiazzare il suono facendo lampeggiare l'intero
  schermo (o emulatore di terminale). Come farlo  per molto variabile.


     xterm
        per gli xterm, si pu cambiare l'impostazione premendo il
        pulsante centrale del mouse mentre si preme il tasto control, o
        inserendo una linea con `XTerm*visualBell: true' (senza
        virgolette naturalmente) nel file .Xdefaults nella vostra home
        directory.


     the console
        Per la console  leggermente pi complesso.  Leggete il mini-
        HOWTO sulle Visual Bell di Alessandro Rubini per i dettagli, che
         disponibile con tutto il resto della documentazione Linux
        (vedere la sezione ``altri documenti su Linux'').  Per la
        maggior parte la configurazione deve essere fatta in base
        all'applicazione, o cambiando lo stesso kernel di Linux.


  5.  Problemi fisici

  Molti di questi problemi devono essere trattati singolarmente.  Le
  necessit dell'individuo, i modi che possono usare per generare
  l'input e altri fattori variano tanto che tutto quello che pu essere
  fornito da questo HOWTO  un insieme generale di puntatori a software
  ed esperienze utili.


  5.1.  Impossibilit di usare un mouse o un altro tipo di puntatore.

  Una mobilit limitata pu rendere molto difficile usare un mouse.  Per
  alcune persone la track-ball  una soluzione ottima, ma per altre
  l'unico possibile dispositivo di input  la tastiera (o qualcosa che
  simuli una tastiera). Per l'uso normale di Linux non dovrebbe essere
  un problema (ma leggete la sezione ``far funzionare la tastiera''), ma
  per chi usa X, pu causare dei problemi non indifferenti in alcune
  circostanze.

  Fortunatamente, il manager di finestre fvwm  stato disegnato per
  essere usato senza un puntatore, e la maggior parte delle cose si
  possono fare lo stesso. Per dire la verit faccio anche io cos quando
  perdo il mouse (non me lo chiedete) o semplicemente quando voglio solo
  usare la tasiera. fvwm  incluso in tutte le distribuzioni di Linux
  che io conosca. In realt l'uso di altri programmi dipende dalla loro
  capacit di accettare la pressione dei tasti. Molti programmi X lo
  fanno per tutte le funzioni.  Molti no. Credo che i "tasti del mouse
  appiccicosi", che dovranno uscire in una prossima versione di X,
  debbano rendere possibile l'uso della maggior parte dei programmi.


  5.1.1.  Impossibilit di usare la tastiera

  Che non pu usare la tastiera normalmente pu usarne una attraverso un
  comando mosso con la testa o con la bocca, che richiede delle chiamate
  di configurazione speciali che sono, per quanto ne sappia, impossibili
  al momento su Linux. Comunque, questo supporto dovrebbe essere
  disponibile tra poco, dato che il software necessario per implementare
  le parti principali di questa procedura  gi stato scritto, ed 
  nella fase di test.

  A questo punto, ci dovrebbe essere un programma che mostrer una
  tastiera sullo schermo, ed accetter input da un qualche tipo di
  puntatore, come, ad esempio, i movimenti dell'occhio.


  5.2.  Riconoscimento vocale

  Il riconoscimento vocale  uno strumento potentissimo per abilitare
  all'uso del computer. Conosco due sistemi di riconoscimento per Linux:
  il primo  ears, che viene descritto come ``riconoscimento non
  ottimale, ma buono per il gioco. Verr migliorato'', il secondo 
  AbbotDemo ``Un sistema di riconoscimento vocale continuo, ed
  indipendente da chi parla'', che potrebbe essere pi interessante,
  anche se non  disponibile per uso commerciale senza delle
  disposizioni particolari.  Per ulteriori dettagli controllare la Linux
  Software map (vedere la sezione ``altri documenti Linux'').


  5.3.  Far funzionare la tastiera

  5.3.1.  Eliminare l'Auto Repeat

  Per eliminare la ripetizione dei tasti sulla console Linux, date
  questo comando (credo debba essere dato una volta per ogni console: un
  buon posto dove metterlo sono i file di login .profile o .login nella
  vostra home directory).


  setterm -repeat off




  Per eliminare l'auto repeat sul server X, potete usare il comando


  xset -r




  che si pu mettere nel file che viene letto quando si avvia X (spesso
  .xsession o .xinit con qualche tipo di configurazione)


  Conviene dare un'occhiata a entrambi questi comandi per trovare altri
  modi di cambiare il comportamento della console.


  5.3.2.  Tasti "appiccicosi"

  Su Linux non sono disponibili tasti appiccicosi in nessuna forma, per
  quanto ne sappia io. Per la console normale avrebbero bisogno di
  cambiamenti al codice del kernel. Non sarebbe una cosa estremamente
  difficile, ma ci vorrebbe qualcuno con noizioni di programmazione di
  kernel per farlo.


  Per X windows sotto Linux, il codice gi esiste, ma non  disponibile
  per i normali utenti. Dato che i `normali utenti' comprende me, non
  posso confermare che sar utilizzabile.

  5.3.3.  Hardware di input non convenzionale

  Esiste un gran numero di dispositivi da considerare per l'input, come
  i touch screen e i puntatori a controllo oculare. La maggior parte di
  essi necessitano di un `device driver' scritto appositamente. Non 
  estremamente difficile scriverli se la documentazione  disponibile,
  ma c' bisogno di qualcuno con buona conoscenza del C. Per favore
  guardate la Linux Kernel Hackers guide e l'altro materiale a cui si fa
  riferimento per ulteriori informazioni. Una volta impostato il device
  driver, dovrebbe essere possibile usare questi dispositivi come un
  normale muose.


  5.3.4.  Controllo dell'hardware fisico da Linux

  Il gruppo di interesse4 principale in questo campo  il Linux Lab
  Project.  In genere, pu essere controllata la maggior parte
  dell'hardware GPIB (un'interfaccia standard per l'equipaggiamento
  scientifico, nota anche come bus IEEE).


  6.  Suggerimenti per la programmazione

  Molti degli argomenti di cui vale la pena parlare sono gli stessi se
  si sta scrivendo del software progettato per essere utile per
  l'accesso che se si cerca di seguire un buon metodo di progettazione.


  6.1.  Cercate di rendere semplice l'uso di interfaccie multiple

  Se il vostro software  utilizzabile solo attraverso un'interfaccia
  grafica, sar molto difficile renderlo utilizzabile da qualcuno che
  non vede. Se  utilizzabile solo attraverso un'interfaccia a linea di
  comando, chi non pu usare la tastiera avr delle difficolt.

  Prevedete delle scorciatoie da tastiera, insieme all'uso del normale
  puntatore di X (generalmente il mouse). Potrete quasi certamente
  supporre che il vostro utente sia capace di generare delle pressioni
  di tasto da dare come input all'applicazione.


  6.2.  Rendete configurabile il software

  Se  semplice cambiare le font, sar facile impostare una font che sia
  facile da leggere. Se si pu cambiare lo schema dei colori, i
  daltonici avranno pi possibilit di poter usare il programma. Se si
  possono cambiare con facilit le font, chi ha problemi alla vista
  trover pi utile il vostro software.


  6.3.  Provate il software sugli utenti

  Se fate provare il vostro software a diverse persone, ognuno con
  diversi problemi di accesso, ci saranno pi possibilit che vi
  facciano presenti problemi specifici. Naturalmente, non sar una cosa
  pratica per chiunque, ma potete sempre chiedere del feedback.


  6.4.  Rendete chiaro l'output

  Se possibile, mettete in chiaro cosa sono le diverse parti del vostro
  programma. Formattate i messaggi di errore in modo che sia possibile
  identificarli in maniera specifica. Sotto X, accertatevi che ogni
  parte della vostra finestra abbia un nome, in modo da renderlo
  identificabile da qualsiasi software di lettura dello schermo.

  7.  Altre informazioni

  7.1.  Documentazione su Linux

  La documentazione su Linux  critica per l'uso di Linux, e la maggior
  parte dei documenti qui menzionati dovrebbero essere inclusi nelle
  versioni recenti di Linux, da qualsiasi fonte che io conosca.

  Se volete prendere la documentazione da Internet, ecco alcuni siti di
  esempio, che dovrebbero essere mirrorati sui principali siti FTP del
  mondo.


    ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/

    tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/

    sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/


  7.1.1.  Il Linux Info Sheet

  E' una spiegazione semplice ed efficace di cosa sia Linux. E' una
  delle cose che dovreste distribuire quando volete spiegare perch
  volete Linux e perch  utile.

  Il Linux Info Sheet  disponibile su WWW a
  <http://sunsite.unc.edu/mdw/HOWTO/INFO-SHEET.html> ed in altri mirror.



  7.1.2.  Le Linux Meta FAQ

  E' una lista di risorse di informazione, molto pi completa di questa.
  Le Meta FAQ sono disponibili su WWW a
  <http://sunsite.unc.edu/mdw/HOWTO/META-FAQ.html> ed in altri mirror.


  7.1.3.  La Linux Software Map

  E' la lista di software disponibile per Linux su Internet.  Molti dei
  pacchetti elencati in questo documento sono stati trovati con questa
  lista. La LSM  disponibile con un motore di ricerca interno da
  <http://www.boutell.com/lsm/>.  E' disponibile anche come unico file
  di testo in tutti i siti FTP nominati nella sezione ``Documentazione
  su Linux''.


  7.1.4.  I Linux HOWTO

  Gli HOWTO sono la documentazione principale su Linux. Questo Access
  HOWTO ne  un esempio.

  Il sito principale del Linux Documentation Project che produce questo
  tipo di informazioni   <http://sunsite.unc.edu/mdw/linux.html>.  Ci
  sono anche molti editori che pubblicano howto in libri. Contattate il
  rivenditore locale di Linux per ulteriori dettagli.

  I Linux HOWTO si trovano nella directory HOWTO in tutti i siti FTP
  nominati nella sezione ``Documentazione su Linux''.


  7.1.5.  Le Linux FAQ

  Si tratta di una lista di FAQ (`Frequently Asked Questions' , cio
  `Domande pi comuni') con le risposte, che dovrebbero risolvere molti
  problemi comuni. La lista di FAQ  disponibile da
  <http://www.cl.cam.ac.uk/users/iwj10/linux-faq/> come anche in tutti i
  siti FTP nominati nella sezione ``Documentazione su Linux''.


  7.2.  Mailing List

  Esiste un gran numero di mailing list specializzate in informazioni su
  argomenti di accesso correlati ai computer. Per favore mandatemi gli
  indirizzi di qualsiasi lista di questo tipo che si occupi di Linux.


  7.2.1.  La Linux Access List

  E' una lista generale (in inglese) in cui si discute dei problemi di
  accesso a Linux. E' progettata `per supplire alle necessit degli
  utenti e degli sviluppatori di Linux che siano disabili o che vogliano
  aiutare a rendere Linux pi accessibile'. Per iscrivervi mandate
  un'email a majordomo@ssv1.union.utah.edu e nel CORPO (non nel subject)
  mettete:



       subscribe linux-access <indirizzo>





  7.2.2.  La Linux Blind List

  E' una mailing list (in inglese) che tratta dell'uso di Linux per gli
  utenti ciechi. C' anche una lista di software utile ed importate che
  viene raccolta nell'archivio della lista. Per iscrivervi mandate
  un'email a <blinux-list-request@goldfish.cube.net> con nel subject
  subscribe.  La lista  moderata.



  7.3.  WWW

  La World Wide Web , per sua natura, in continuo cambiamento. Se state
  leggendo una versione vecchia di questo documento,  probabile che
  qualcuno di questi indirizzi non sia pi valido. La versione originale
  che mantengo su WWW non dovrebbe essere vecchia pi di due settimane,
  quindi riferitevi a quella, per favore. User MOMspider per
  controllare che i link non scompaiano.

  La documentazione su Linux  disponibile a
  <http://sunsite.unc.edu/mdw/linux.html>

  Il Linux Access On the Web
  <http://www.tardis.ed.ac.uk/~mikedlr/access/> con tutte le versione
  dell'HOWTO si trova a
  <http://www.tardis.ed.ac.uk/~mikedlr/access/HOWTO/>.  Preferibilmente,
  per, downloadatelo da uno dei siti Linux principali.  Se ho troppo
  traffico dovr chiudere queste pagine e spostarle da qualche altra
  parte.

  La pagina WWW di Emacspeak
  <http://www.research.digital.com/CRL/personal/raman/emacspeak/emacspeak.html>

  La pagina WWW non ufficiale di BRLTTY
  <http://www.sf.co.kr/t.linux/new/brltty.html>


  Yahoo (uno dei principali cataloghi di Internet)
  <http://www.yahoo.com/Society_and_Culture/Disabilities/Adaptive_Technology/>

  Il Linux Lab Project  <http://www.fu-berlin.de/~clausi/>


  7.4.  Fornitori

  Ecco un fornitore per il Braillex in Gran Bretagna


  Alphavision Limited




  7.5.  Produttori

  7.5.1.  Alphavision

  Credo che siano produttori? La RNIB li elenca come fornitori, ma altri
  mi dicono che sono loro a produrre il Braillex.


  Alphavision Ltd
  Seymour House
  Copyground Lane
  High Wycombe
  Bucks HP12 3HE
  England
  U.K.

  Phone: +44 1494-530 555




  7.5.1.1.  Prodotti AT della Alphavision supportati da Linux


    Braillex


  7.5.2.  Blazie Engineering

  Il Braille Lite era supportato nella versione originale di BRLTTY.
  Non lo  pi nelle versioni attuali. Se ne avete uno e volete usarlo
  con Linux dovrebbe essere possibile usando questa versione del
  software.


  Blazie Engineering
  105 East Jarrettsville Rd.
  Forest Hill, MD 21050
  U.S.A.

  Tel: +1 (410) 893-9333
  FAX:   +1 (410) 836-5040
  BBS:   +1 (410) 893-8944
  E-Mail <htmlurl url="mailto:info@blazie.com" name="info@blazie.com">
  WWW <url url="http://www.blazie.com/">





  7.5.2.1.  Prodotti AT della Blazie


    Braille Lite (non pi supportato)



  7.5.3.  Digital Equipment Corporation


  Digital Equipment Corporation
  P.O. Box CS2008
  Nashua
  NH 03061-2008
  U.S.A

  Ordini: +1 800-722-9332
  Informazioni tecniche: +1 800-722-9332
  FAX :  +1 603-884-5597
  WWW <url url="http://www.digital.com/">




  7.5.3.1.  Prodotti AT della DEC supportati da Linux


    DECTalk Express


  7.5.4.  Kommunikations-Technik Stolper GmbH


  KTS Stolper GmbH
  Herzenhaldenweg 10
  73095 Albershausen
  Germany

  Tel: +49 7161 37023
  Fax:   +49 7161 32632




  7.5.4.1.  Prodotti AT della KTG supportati da Linux


    Brailloterm


  8.  Pacchetti software

  I riferimenti contenuti in questa sezione sono presi direttamente
  dalla Linux Software Map, che potete trovare in tutti i siti standard
  per la documentazione Linux, e che elenca quasi tutto il software
  disponibile per Linux.


  8.1.  Emacspeak

  Emacspeak  la parte software di un'interfaccia vocale a Linux.
  All'interno di emacspeak pu essere usato un qualsiasi altro programma
  testo, come un browser WWW, telnet o un altro editor. La differenza
  principale tra emacspeak ed un normale software di lettura per i
  sistemi operativi come il DOS  che ha anche moltissime altre
  caratteristiche. E' basato sull'editor testuale emacs.
  Un editor di testo  un programma che permette di cambiare il
  contenuto di un file; ad esempio aggiungere delle informazioni ad una
  lettera. Emacs  in realt molto di pi di un semplice editor di
  testo, e non potete immaginare quanto sia pi utile. Dall'interno di
  emacs si possono far girare altri programmi, facendo in modo che
  qualsiasi output generi sembri apparire all'interno dell'emulatore di
  terminale di emacs. Il vantaggio quindi  che Emacspeak pu capire
  quello che si trova all'interno dello schermo, ed interpretare in
  maniera intelligente il significato di, ad esempio, un calendario, che
  altrimenti sembrerebbe semplicemente un insieme confusionario di
  numeri. Il creatore del pacchetto riesce a gestire completamente la
  sua macchina Linux, facendo tutta l'amministrazione dall'interno di
  emacs.



       B.Begin3
       Titolo:           Emacspeak
       Versione:        3.52
       Immesso il:    04JUL95

       Descrizione:     Emacspeak, un'estensione di emacs per fornire completo
                         feedback vocale per i non vedenti.
                          Ha bisogno di un sintetizzatore vocale.
                           Io sono privo della vista
                            ed uso al momento Emacspeak sul mio portatile.
                             Nota: non siete limitati al solo uso di emacs --
                              emacspeak fornisce accesso a qualsiasi cosa voi
                               possiate fare da un terminale.
       Parole chiave:        Accesso vocale, Lettura dello schermo,
           Accesso per utenti privi della vista
       Auore:          raman@crl.dec.com (T. V. Raman)
       Mantenuto da:  raman@crl.dec.com (T. V. Raman)
       Sito primario:    ftp://crl.dec.com:/pub/digital/emacspeak
                                         85K emacspeak-3.52.tar.gz
                                                 150K sounds.tar
       Sito alternativo: http://www.research.digital.com/CRL/personal/raman/emacspeak/emacspeak.html
       Sito originale:   Implementato originariamente per Linux
       Piattaforme:       Dectalk Synthesizer, GNU Emacs 19, TCLX (Extended TCL)
       Policy di copia:  GPL
       End





  8.2.  BRLTTY

  E' un programma per gestire un terminale Braille su porta seriale.

  22 Marzo 1996: Gli autori sperano di rendere pubblica la prima
  versione ufficiale, la versione 1.0, nei prossimi mesi. Questa
  versione supporter i display della serie ABT3 della Alva B.V. e della
  serie PowerBraille Navigator della Telesensory Systems Inc., ma non
  sar pi supportato il Braille Lite della Blazie Engineering., dato
  che non  realmente progettato per essere un display Braille, e quindi
  non ha le caratteristiche necessarie. Nel frattempo, se avete un
  display Alva o TSI e volete usare BRLTTY, contattate il mantainer,
  Nikhil Nair <nn201@cus.cam.ac.uk>.







  Begin3
  Titolo:          BRLTTY - Software di accesso per Unix per i non vedenti
                            che usano un terminale Braille
  Versione:       0.22, 22SEP95
  Immesso il:     24SEP95
  Descrizione:    BRLTTY  un daemon che fornisce accesso ad una console
                  Unix per i non vedenti, usando un display Braille morbido
                  (vedere il file README per una spiegazione completa).

                  BRLTTY funziona solo con applicazione in modo testo.

                  Speriamo che questo sistema sar allargato al supporto
                  di altri display Braille, e possibilmente anche di altre
                  piattaforme Unix-like.
  Parole chiave:  braille console accesso non vedenti ciechi
  Autore:         nn201@cam.ac.uk (Nikhil Nair)
                  jrbowden@bcs.org.uk (James Bowden)
  Maintainer:     nn201@cam.ac.uk (Nikhil Nair)
  Sito primario:  sunsite.unc.edu /pub/Linux/utils/console
                  30kb brltty-0.22.tar.gz (comprende il file README)
                   5kb brltty-0.22.README
  Sito alternativo:
  Sito originale:
  Piattaforme:    Linux (kernel 1.1.92 o successivo), senza X.
                  CombiBraille della Tieman T.V. (25/45/85 cell),
                  (senza supporto per l'interfaccia parallela o per
                  il sintetizzatore vocale incluso;
                  Braille Lite della Blazie Engineering (non raccomandato).
  Policy di copia: GPL
  End





  8.3.  Rsynth

  E' un sintetizzatore vocale elencato nella Linux Software Map.
  Apparentemente non funziona abbastanza bene da essere usato da una
  persona priva della vista. Usate l'hardware al suo posto, o
  miglioratelo...  un sintetizzatore vocale gratuito sarebbe veramente
  utile.


  8.4.  xocr

  xocr  un pacchetto che implementa il riconoscimento ottico dei
  caratteri per Linux. Come per Rsynth, non credo che sia accettabile
  per l'uso come unico mezzo di input da parte di una persona priva
  della vista. Sospetto che l'algoritmo usato comporti che ci sia
  bisogno di qualcuno che controlli che stia leggendo in maniera
  corretta.  Spero vivamente di sbagliarmi.


  8.5.  xzoom

  xzoom  un ingranditore per lo schermo, dello stesso tipo di xmag, ma
  abbastanza migliore da poter essere molto utile per una persona con
  problemi alla vista. Gli svantaggi principali di xzoom sono che non
  pu ingrandire sotto se stesso, che alcuni dei tasti di controllo non
  sono compatibili con fvwm, il normale manager di finestre di Linux, e
  che la sua configurazione di default non funziona in rete (cosa che
  pu essere per superata con un p di sacrificio di velocit).  A
  parte questo,  ottimo. Ha un ingrandimento continuo, cosa che
  permette, ad esempio, di scorrere un documento su e gi, tenendo la
  sezione in vista ingrandita. In alternativa, si pu spostare una
  finestrina per lo schermo, ingrandendone i contenuti e facendovi
  cercare l'area che volete vedere.  xzoom  disponibile anche come rpm
  dai normali siti RedHat, cosa che lo rende molto semplice da
  installare per chi usa il sistema rpm (come chi ha installato la
  RedHat).



       Begin3
       Titolo:         xzoom
       Versione:       0.1
       Immesso il:     30 Mar 1996
       Descrizione:    xzoom pu ingrandire (di un numero intero di volte), ruotare
                       (di un multiplo di 90 gradi) e riprodurre specularmente
                       lungo l'asse X o Y aree dello schermo di X11 e mostrarle
                       nella sua finestra.
       Parole chiave:  X11 zoom ingrandire ingrandimento xmag
       Autore:         Itai Nahshon <nahshon@best.com>
       Maintainer:     Itai Nahshon <nahshon@best.com>
       Sito primario:  sunsite.unc.edu
                       probabilmente in /pub/Linux/X11/xutils/xzoom-0.1.tgz
       Piattaforme:    Linux+11. Supporto solo per profondit di 8-bit.
                       Provato solo su Linux 1.3.* con il driver XSVGA 3.1.2.
                       Ha bisogno dell'estensione XSHM.
       Policy di copia: Free
       End





  8.6.  NFBtrans

  nfbtrans  un programma di traduzione braille multi-grado, distribuito
  dalla Federazione Nazionale per i Non Vedenti negli U.S.A.  E'
  distribuito gratuitamente con la speranza che qualcuno lo migliori.
  Le lingue supportate sono l'inglese, l'americano, lo spagnolo, il
  russo, l'esperanto, il tedesco, l'ebreo biblico e il greco biblico,
  anche se altre lingue possono essere aggiunte semplicemente
  aggiungendo una tavola di traduzione. Sono coperte anche alcune forme
  del linguaggio informatico e matematico. Sono riuscito a compilarlo
  sotto Linux, anche se, non avendo una stampante braille disponibile al
  momento, non ho potuto provarlo.

  NFBtrans  disponibile da <ftp://nfb.org/ftp/nfb/braille/nfbtrans/>.
  Dopo averlo scaricato, dovrete compilarlo.


  8.6.1.  Compilazione di NFBtrans sotto Linux

  Ho mandato questa patch al maintainer di NFBtrans, che dice che lo ha
  incluso, quindi se avete una versione successiva alla 740
  probabilmente non dovrete fare niente di speciale. Semplicemente
  seguite le istruzioni incluse nel pacchetto.



          unzip -L NFBTR740.ZIP   #o qualsiasi nome file abbiate
          mv makefile Makefile



  Poi salvate la parte seguente in un file (ad esempio patch-file)



  *** nfbpatch.c.orig     Tue Mar 12 11:37:28 1996
  --- nfbpatch.c  Tue Mar 12 11:37:06 1996
  ***************
  *** 185,190 ****
  --- 185,193 ----
      return (finfo.st_size);
    }                /* lunghezza del file */

  + #ifndef linux
  + /*  sicuro assumere che tutte le versioni di linux abbiano usleep - credo.
  + in ogni caso dovrebbe funzionare lo stesso */
    #ifdef SYSVR4
    void usleep(usec)
      int usec;
  ***************
  *** 195,200 ****
  --- 198,204 ----
    }                /* usleep */

    #endif
  + #endif

    void beep(count)
      int count;




  e date



       patch < patch-file




  poi digitate



       make




  e il programma dovrebbe compilarsi.


  9.  Hardware

  9.1.  Terminali Braille guidati dalla memoria dello schermo

  Si tratta di terminali braille che possono leggere direttamente la
  memoria dello schermo, in normale modo testo. E' possibile usarlo in
  modo che lavori con la console, anche nell'installazione.  In ogni
  caso, ha un problema con lo scorrimento del normale kernel di Linux, e
  bisogna installare una patch. Vedere ``Fare una patch al kernel per
  l'uso di Braillex e Brailloterm''.


  9.1.1.  Braillex

  Il Braillex  un terminale progettato per leggere direttamente dalla
  memoria di schermo, superando cos i problemi che si hanno con i
  programmi DOS che si comportano in modo strano. Se lo potete vedere
  sullo schermo, questo terminale dovrebbe essere in grado di mostrarlo
  in braille.  Sotto Linux, sfortunatamente, la gestione dello schermo 
  fatta in maniera diversa che nell'MS-DOS, cosicch in qualche modo
  questa parte andava modificata.

  Per fare funzionare questo terminale, dovete applicare la patch
  riportata qui sotto, nella sezione ``Patch per il kernel''.  Una volta
  fatto questo, il Braillex doventa uno dei modi pi efficaci per usare
  Linux, dato che permette di avere tutte le informazioni normalmente
  disponibili ad una persona che possa leggerle. Altri terminali non
  cominciano a funzionare finch il sistema operativo non sia avviato
  completamente.

  Il Braillex  disponibile con due disposizioni di celle braille (80x1
  o 40x2) e c' un modello, l'IB 2-D, che ha anche una barra verticale
  che d delle informazioni su tutte le linee dello schermo (usando 4
  punti programmabili per linea dello schermo).


  Prezzo: 8,995 UKP (sterline inglesi) o 11495 UKP per il 2-D
  Produttore: Alphavision Limited (UK)
  Distributori: ????




  9.1.2.  Brailloterm

  ``Cos' Brailloterm?


  E' un display braille con refresh, prodotto dalla KTS Kommunikations-
  Technik Stolper GmbH.  Ha 80 celle braille in una singola linea. Ogni
  cella ha 8 punti combinati (su/gi) che rappresentano un carattere.
  Per default, il Brailloterm mostra la linea in cui si trova il
  cursore. Si possono usare le funzioni di Brailloterm per vedere
  qualsiasi linea sullo schermo.''

  Jose Vilmar Estacio de Souza <jvilmar@embratel.net.br>


  Jose poi continua dicendo che il terminale pu usare anche la porta
  seriale sotto DOS, ma che ha bisogno di uno speciale programma.  non
  so se quelli per Linux funzionerebbero.


  Come con Braillex, c' bisogno di una patch per far funzionare il
  kernel. Vedere la sezione ``Patch per il kernel''.


  Prezzo: circa 23.000,- DM /  $ 15.000,
  Produttore: Kommunikations-Technik Stolper GmbH
  Distributori: ????





  9.1.3.  Patch per il kernel per Braillex e Brailloterm

  Probabilmente funziona anche per qualsiasi altro terminale che legge
  direttamente dalla memoria dello schermo sotto MS-DOS.  Scrivetemi per
  confermare qualsiasi altro terminale che funzioni cos.



  Mi dicono che questa patch funzioni con tutti i kernel versione 1.2.X.
  Dovrebbe funzionare anche con i kernel dalla versione 1.1.X alla
  1.3.72, con un solo warning da patch (ho controllato che la patch
  funziona almeno con l'1.3.68). Dalla 1.3.75 la patch non  pi
  necessaria dato che il kernel pu essere configurato in modo che
  elimini lo scrolling usando `linux no-scroll' al prompt di LILO.
  Vedere il Boot Prompt HOWTO per ulteriori dettagli.



       *** drivers/char/console.c~     Fri Mar 17 07:31:40 1995
       --- drivers/char/console.c      Tue Mar  5 04:34:47 1996
       ***************
       *** 601,605 ****
         static void scrup(int currcons, unsigned int t, unsigned int b)
         {
       !       int hardscroll = 1;

               if (b > video_num_lines || t >= b)
       --- 601,605 ----
         static void scrup(int currcons, unsigned int t, unsigned int b)
         {
       !       int hardscroll = 0;

               if (b > video_num_lines || t >= b)




  Per applicarla:


  1. Salvate il testo qui sopra in un file (ad esempio patch-file)

  2. Spostatevi nella directory driver/char della sorgente del kernel

  3. digitate


                       patch < patch-file





  4. Compilate normalmente il kernel


  Con l'applicazione di queste patch dovreste essere in grado di usare
  il terminale braille normalmente per leggere la console Linux.


  Detto in parole, la patch significa semplicemente `sostituisci l'1 con
  uno 0 nella prima linea della funzione scrup che dovrebbe essere
  vicino alla linea 603 nel fiel drivers/char/console.c'. La cosa
  principale di patch  che il programma capisce una cosa del genere, e
  che sa come indovinare cosa fare quando gli sviluppatori Linux
  cambiano le cose in quel file.


  Se volete usare un kernel moderno con lo scrolling completamente
  disabilitato, (invece della soluzione data al prompt di avvio che ho
  gi detto) usate la patch qui sotto. Non funziona per i kernel
  precedenti all' 1.3.75.


       *** console.c~  Fri Mar 15 04:01:45 1996
       --- console.c   Thu Apr  4 13:29:48 1996
       ***************
       *** 516,520 ****
         unsigned char has_wrapped;          /* tutta la memoria video sono
       dati di fg_console */
         static unsigned char hardscroll_enabled;
       ! static unsigned char hardscroll_disabled_by_init = 0;

         void no_scroll(char *str, int *ints)
       --- 516,520 ----
         unsigned char has_wrapped;          /* tutta la memoria video sono
       dati di fg_console */
         static unsigned char hardscroll_enabled;
       ! static unsigned char hardscroll_disabled_by_init = 1;

         void no_scroll(char *str, int *ints)






  9.2.  Teminali Braille guidati via software

  Il principio di operazione di questi terminali  molto vicino a quello
  di un terminale CRT come il VT100. Si connettono ad una porta seriale
  e il computer deve avviare un programma che gli manda l'output.  Al
  momento ce ne  uno solo che conosco (BRLTTY, vedere la sezione
  ``BRLTTY'') e uno di cui si hanno notizie incerte per Linux (Braille
  enhanced screen... ancora nessun dettaglio).


  9.2.1.  CombiBraille

  E' questo il terminale braille raccomandato per l'uso con le versioni
  0.22BETA del software BRLTTY. Ne esistono tre versioni, con 25, 45 o
  85 celle braille.


  Prezzo: circa 4600 UKP per il modello a 45 celle...
  Produttore: Tieman B.V.
  Distributori: Concept Systems, Nottingham, England (telefono +44 115 925 5988)




  9.2.2.  Display della Alva B.V. e della Telesensory Systems Inc.

  Saranno supportati nella prossima versione 1.0 di BRLTTY.


  9.2.3.  Braille Lite

  E' pi un computer portatile che un terminale. Pu, comunque, essere
  usato con la versione 0.22 di BRLTTY (non con le successive) come se
  fosse un normale terminale braille. Sfortunatamente, molte delle
  caratteristiche disponibili con il CombiBraille non possono essere
  usate con il Braille Lite. Ci significa che dovrebbe essere evitato
  per l'uso con Linux, se possibile.


  Prezzo: $3,395.00
  Produttore: Blazie Engineering
  Distributori: ????

  9.3.  Sintetizzatori vocali

  I sintetizzatori vocali normalmente vengono connessi alla porta
  seriale del PC. Le caratteristiche utili comprendono


    etichette in Braille sulle parti

    pi tipi di voce per permettere di leggere parti diverse di un
     documento in modo diverso

    uso di cuffie (non su tutti i modelli)


  9.3.1.  DECTalk Express

  E' un sintetizzatore vocale hardware. E' raccomandato per l'uso con
  Emacspeak e infatti la gamma DECTalk sono gli unici sintetizzatori
  vocali che funzionino con emacspeak al momento. Questo sintetizzatore
  ha tutte le caratteristiche utili che conosco. L'unico svantaggio di
  cui sappia  il prezzo.


  Prezzo: $1195.00
  Produttore: Digital Equipment Corporation

  Distributori: Molti.  Vorrei avere dei dettagli di quelli con supporto
          specifico per Linux, o che facciano spedizioni internazionali
          o che siano degni di nota. Altrimenti per favore contattate le
          organizzazioni locali.
          La stessa Digital o le pagine WWW di Emacspeak.




  10.  Ringraziamenti

  La maggior parte di questo documento  stata creata da diverse fonti
  di informazioni su Internet, molte trovate con Yahoo e Altavista,
  compresa la documentazione sulla maggior parte dei pacchetti software
  nominati nel testo.

  T.V. Raman, l'autore di Emacspeak, ha fornito commenti ed
  informazioni, e mi ha messo in contatto con altre persone che
  conosceva su Internet.

  Kenneth Albanowski <kjahds@kjahds.com> ha fornito la patch necessaria
  per il Brailloterm.

  Roland Dyroff della S.u.S.E. GmbH (distributori di Linux e creatori
  del S.u.S.E. Linux (inglese/tedesco)) hanno controllato KTS Stolper
  GmbH dietro una mia richiesta ed hanno ricavato alcuni dettagli
  sull'hardware ed informazioni sul Brailloterm.

  La maggior parte dei controlli su questo documento sono stati fatti da
  James Bowden, jrbowden@bcs.org.uk e Nikhil Nair nn201@cus.cam.ac.uk,
  gli autori di BRLTTY che hanno suggerito un gran numero di correzioni
  e informazioni su alcuni argomenti.

  Molte altre persone hanno contribuito con commenti ed informazioni.
  Gli specifici contributi sono menzionati all'interno del documento.

  Non c' dubbio che voi possiate aver dato un contributo e che io non
  l'abbia menzionato. Non vi preoccupate,  stato un errore. Mi
  dispiace.  Semplicemente ditemelo e io vi aggiunger alla prossima
  versione.


































































  Assembly HOWTO
  Franois-Ren Rideau rideau@ens.fr
  v0.4l, 16 Novembre 1997

  Questo  il Linux Assembly HOWTO.  Questo documento descrive come pro
  grammare in assembly utilizzando strumenti di programmazione LIBERI,
  concentrandosi sullo sviluppo per o sul sistema operativo Linux su
  piattaforme i386.  Il materiale incluso potrebbe essere o meno appli
  cabile ad altre piattaforme hardware e/o software.  Contributi
  riguardo a queste sarebbero ben accetti.  parole chiave: assembly,
  assembler, libero, macro, preprocessore, asm, inline, 32-bit, x86,
  i386, gas, as86, nasm.  Traduzione di Matteo De Luigi
  (giotto@maya.dei.unipd.it).

  1.  INTRODUZIONE

  1.1.  Legal Blurp

  Copyright  1996,1997 by Franois-Ren Rideau.  This document may be
  distributed under the terms set forth in the LDP license at
  <http://sunsite.unc.edu/LDP/COPYRIGHT.html>.


  1.2.  NOTA IMPORTANTE

  C' da aspettarsi che questo sia l'ultimo rilascio di questo documento
  da parte mia.

  C' un candidato al ruolo di curatore, ma finch l'HOWTO non diventa
  ufficialmente suo, accetter suggerimenti e critiche.

  Siete in particolare invitati a porre domande, a rispondere alle
  domande, a correggere le risposte date, ad aggiungere nuove risposte
  alle FAQ, a fornire riferimenti ad altro software, ad indicare errori
  o lacune nelle pagine al responsabile attuale.  Se qualcuno di voi 
  motivato, potrebbe perfino DIVENTARE IL RESPONSABILE DELLE FAQ.  In
  una parola, contribuite!

  Per contribuire, per favore contattate chiunque sembri curare
  l'Assembly-HOWTO.  I curatori attuali sono: Franois-Ren Rideau
  <mailto:rideau@clipper.ens.fr> ed ora Paul Anderson
  <mailto:paul@geeky1.ebtech.net>.



  1.3.  Prima di cominciare

  Questo documento intende rispondere alle domande pi frequenti delle
  persone che programmano o vogliono programmare in assembly a 32 bit
  per x86 utilizzando assemblatori liberi, specialmente sotto il sistema
  operativo Linux.  Potrebbe inoltre rimandare ad altri documenti circa
  assemblatori non liberi, non per x86 o non a 32 bit, anche se questo
  non  il suo scopo principale.

  Poich l'interesse principale della programmazione in assembly
  consiste nel realizzare le viscere dei sistemi operativi, degli
  interpreti, dei compilatori e dei giochi, laddove un compilatore C non
  riesce a fornire l'espressivit richiesta ( abbastanza raro che si
  tratti di una questione di prestazioni), ci interesseremo
  principalmente di questo tipo di software.






  1.3.1.  Come usare questo documento

  Questo documento contiene risposte ad alcune domande poste di
  frequente.  In molte occasioni, vengono forniti URL di alcuni archivi
  di software o documentazione.  Per favore, notate che gli archivi di
  maggiore utilit hanno dei mirror e che accedendo ad un mirror pi
  vicino da un lato evitate ad Internet traffico non necessario e
  dall'altro risparmiate tempo prezioso.  In particolare, ci sono dei
  grandi depositi sparsi per tutto il mondo che fanno il mirror anche di
  altri archivi di pubblico interesse.

  Dovreste imparare ad annotarvi quali sono questi posti vicino a voi
  (dal punto di vista della rete).

  Talvolta, la lista dei mirror si trova in un file o in un messaggio di
  login. Siete pregati di seguire i consigli.  Altrimenti, dovreste
  interrogare archie circa il software di cui siete alla ricerca...

  La versione pi recente di questi documenti risiede ad

  <http://www.eleves.ens.fr:8080/home/rideau/Assembly-HOWTO> oppure
  <http://www.eleves.ens.fr:8080/home/rideau/Assembly-HOWTO.sgml>

  ma anche ci che si trova negli archivi degli HOWTO di Linux dovrebbe
  essere abbastanza aggiornato (io non ho modo di saperlo):

  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/> (?)

  Una traduzione in francese di questo HOWTO pu essere trovata dalle
  parti di:

  <ftp://ftp.ibp.fr/pub/linux/french/HOWTO/>



  1.3.2.  Documenti correlati


    Se non sapete cos' il software libero, siete pregati di leggere
     attentamente la Licenza Pubblica Generale GNU, che viene usata in
     tantissimo software libero ed  un modello per la maggior parte
     delle licenze per questo tipo di programmi.  Si trova di solito in
     un file chiamato COPYING, con una versione per le librerie in un
     file chiamato COPYING.LIB.  Anche qualche pubblicazione della FSF
     (free software foundation) potrebbe esservi d'aiuto.

    In particolare, il software libero pi interessante  disponibile
     con sorgenti che possono essere consultati e corretti.  Talvolta 
     persino possibile prendere in prestito del codice.  Leggete con
     cura le licenze specifiche ed agite in conformit ad esse.

    C' una FAQ per comp.lang.asm.x86 che risponde a domande generiche
     circa la programmazione in assembly su x86 e a domande circa alcuni
     assemblatori commerciali in ambiente DOS a 16 bit.  Alcune
     riguardano la programmazione libera in asm a 32 bit, cos potreste
     essere interessati a leggere queste FAQ...

     <http://www2.dgsys.com/~raymoon/faq/asmfaq.zip>

    Esistono FAQ e documentazione riguardanti la programmazione sulla
     vostra piattaforma preferita, qualunque essa sia, che dovreste
     consultare per questioni specifiche alla piattaforma stessa non
     direttamente correlate alla programmazione in assembler.



  1.4.  Storia

  Ogni versione contiene alcune correzioni e rettifiche di poco conto
  che non  necessario menzionare ogni volta.

     Versione 0.1    23 apr 1996
        Francois-Rene Far Rideau <rideau@ens.fr> crea e pubblica il
        primo mini-HOWTO, perch Non ne posso pi di rispondere sempre
        alle stesse domande su comp.lang.asm.x86

     Versione 0.2    4 mag 1996
        *

     Versione 0.3c   15 giu 1996
        *

     Versione 0.3f   17 ott 1996
        Trovata l'opzione -fasm per abilitare l'assemblatore inline di
        GCC senza le ottimizzazioni -O

     Versione 0.3g   2 nov 1996
        Creata la storia del documento. Aggiunti i riferimenti nella
        sezione sulla compilazione incrociata.  Aggiunta la sezione
        circa la programmazione dell'I/O sotto Linux (video in
        particolare).

     Versione 0.3h   6 nov 1996
        maggiori informazioni sulla compilazione incrociata. Vedere
        devel/msdos su sunsite.

     Versione 0.3i   16 nov 1996
        NASM sta diventando molto affidabile.

     Versione 0.3j   24 nov 1996
        Riferimento alla traduzione in francese.

     Versione 0.3k   19 dic 1996
        Cosa? Mi ero dimenticato di fare riferimento a Terse???

     Versione 0.3l   11 gen 1997
        *

     Versione 0.4pre1        13 gen 1997
        Il mini-HOWTO in formato testo viene trasformato in un completo
        HOWTO linuxdoc-sgml, per vedere come sono gli SGML tools.

     Versione 0.4    20 gen 1997
        Primo rilascio dell'HOWTO come tale.

     Versione 0.4a   20 gen 1997
        Aggiunta la sezione ringraziamenti.

     Versione 0.4b   3 feb 1997
        Spostato NASM: ora  prima di AS86

     Versione 0.4c   9 feb 1997
        Aggiunta la sezione avete bisogno dell'assembly?

     Versione 0.4d   28 feb 1997
        Annuncio prematuro di un nuovo responsabile dell'Assembly-HOWTO.

     Versione 0.4e   13 mar 1997
        Rilascio per DrLinux

     Versione 0.4f   20 mar 1997
        *
     Versione 0.4g   30 mar 1997
        *

     Versione 0.4h   19 giu 1997
        ancora aggiunte a come NON usare l'assembly; aggiornamenti su
        NASM, GAS.

     Versione 0.4i   17 luglio 1997
        informazioni sull'accesso al modo a 16 bit da Linux.

     Versione 0.4j   7 settembre 1997
        *

     Versione 0.4k   19 ottobre 1997
        *

     Versione 0.4l   16 novembre 1997
        rilascio per LSL, sesta edizione.

        Questo  ancora un altro ultimo-rilascio-di-Far-prima-che-un-
        altro-curatore-gli-subentri (?)




  1.5.  Ringraziamenti

  Vorrei ringraziare le seguenti persone, in ordine di apparizione:

    Linus Torvalds <mailto:sepolto.vivo@nella.posta> per Linux

    Bruce Evans <mailto:bde@zeta.org.au> per bcc da cui  estratto as86

    Simon Tatham <mailto:anakin@poboxes.com> e Julian Hall
     <mailto:jules@earthcorp.com> per NASM

    Jim Neil <mailto:jim-neil@digital.net> per Terse

    Tim Bynum <mailto:linux-howto@sunsite.unc.edu> perch mantiene gli
     HOWTO

    Raymond Moon <mailto:raymoon@moonware.dgsys.com> per le sue FAQ

    Eric Dumas <mailto:dumas@excalibur.ibp.fr> per la sua traduzione in
     francese del mini-HOWTO ( una cosa triste per l'autore originale
     essere francese e scrivere in inglese)

    Paul Anderson <mailto:paul@geeky1.ebtech.net> e Rahim Azizarab
     <mailto:rahim@megsinet.net> per l'aiuto, se non per aver rilevato
     l'HOWTO.

    Tutte le persone che hanno dato il loro contributo con idee,
     commenti e supporto morale.




  2.  AVETE BISOGNO DELL'ASSEMBLY?

  Beh, non vorrei interferire con ci che state facendo, ma ecco alcuni
  consigli derivanti da una esperienza ottenuta faticosamente.





  2.1.  Pro e contro



  2.1.1.  I vantaggi dell'assembly

  L'assembly pu esprimere cose molto a basso livello:

    potete accedere a registri e ad I/O dipendenti dalla macchina.

    potete controllare l'esatto comportamento di codice in sezioni
     critiche che potrebbe comportare il bloccarsi di hardware o I/O.

    potete trasgredire le convenzioni del vostro compilatore abituale,
     il che potrebbe permettere alcune ottimizzazioni (come ad esempio
     violare temporaneamente le regole per il garbage collecting,
     threading, ecc).

    ottenere accesso a modi di programmazione insoliti del vostro
     processore (ad esempio codice a 16 bit per l'avvio o l'interfaccia
     BIOS sui PC Intel).

    potete costruire interfacce tra frammenti di codice che usano
     convenzioni incompatibili (ad esempio prodotti da compilatori
     diversi o separati da una interfaccia a basso livello).

    potete produrre codice ragionevolmente veloce per cicli stretti per
     far fronte ad un compilatore non-ottimizzante di qualit scadente
     (ma dopotutto sono disponibili compilatori ottimizzanti liberi!).

    potete produrre codice ottimizzato a mano che risulta ottimo per la
     vostra particolare configurazione hardware, ma non per quella di
     chiunque altro.

    potete scrivere del codice per il compilatore ottimizzante del
     vostro nuovo linguaggio ( qualcosa che poche persone fanno, ed
     anche loro non lo fanno molto spesso).




  2.1.2.  Gli svantaggi dell'assembly

  L'assembly  un linguaggio molto a basso livello (pi in basso c'
  solo la codifica a mano delle istruzioni in codice binario).

  Ci significa:

    All'inizio  lungo e tedioso da scrivere.

     notevolmente soggetto ad errori.

    Gli errori saranno molto difficili da scovare.

     molto difficile da comprendere e modificare, in altre parole da
     mantenere.

    Il risultato  decisamente non portabile verso altre architetture,
     esistenti o future.

    Il vostro codice verr ottimizzato solo per una certa
     implementazione di una stessa architettura: ad esempio, tra le
     piattaforme compatibili Intel, avere CPU diverse o differenti
     configurazioni (ampiezza del bus, velocit e dimensioni relative di
     CPU/cache/RAM/bus/dischi, presenza di FPU, estensioni MMX, ecc.)
     pu richiedere tecniche di ottimizzazione radicalmente diverse.  I
     tipi di CPU comprendono gi Intel 386, 486, Pentium, PPro, Pentium
     II; Cyrix 5x86, 6x86; AMD K5, K6.  Inoltre, continuano ad apparire
     nuovi tipi, perci non aspettatevi che questo elenco o il vostro
     codice siano aggiornati.

    Il vostro codice potrebbe inoltre non essere portabile verso
     piattaforme con sistemi operativi differenti ma con la stessa
     architettura per la mancanza di strumenti adeguati (beh, GAS pare
     funzionare su tutte le piattaforme; a quanto sembra, NASM funziona
     o pu essere reso funzionante su tutte le piattaforme Intel).

    Perdete pi tempo su pochi dettagli e non potete concentrarvi sulla
     progettazione algoritmica su piccola e grande scala che, come 
     noto, porta il maggior contributo alla velocit del programma.  Per
     esempio, potresete perdere del tempo per scrivere in assembly delle
     primitive molto veloci per la manipolazione di liste o matrici,
     quando sarebbe bastato utilizzare una tabella hash per accelerare
     molto di pi il vostro programma. Magari, in un altro contesto,
     sarebbe servito un albero binario, o qualche struttura ad alto
     livello distribuita su un cluster di CPU.

    Un piccolo cambiamento nell'impostazione algoritmica potrebbe far
     perdere ogni validit a tutto il codice assembly gi esistente.
     Perci o siete pronti a (ed in grado di) riscriverlo tutto, oppure
     siete vincolati ad una particolare impostazione algoritmica.

    Per quanto riguarda il codice che non si scosta troppo da quello
     che  presente nei benchmark convenzionali, i compilatori
     ottimizzanti commerciali permettono di ottenere prestazioni
     migliori rispetto all'assembly manuale (beh, ci  meno vero
     sulle architetture x86 rispetto alle architetture RISC e forse meno
     vero per compilatori largamente disponibili/liberi; comunque, per
     codice C tipico, GCC se la cava discretamente).

    E in ogni caso, come dice il moderatore John Levine su
     comp.compilers, i compilatori rendono decisamente pi facile
     utilizzare strutture dati complesse, non si stancano a met strada
     e ci si pu aspettare che generino codice abbastanza buono.
     Inoltre provvederanno a propagare correttamente trasformazioni di
     codice attraverso tutto il (lunghissimo) programma quando si
     tratter di ottimizzare codice tra i confini delle procedure e dei
     moduli.



  2.1.3.  Valutazioni

  Tutto sommato, potreste notare che nonostante l'uso dell'assembly sia
  talvolta necessario (o semplicemente utile, in alcuni casi), sar il
  caso che:

    minimizziate l'uso del codice assembly;

    incapsuliate questo codice in interfacce ben definite;

    facciate generare automaticamente il vostro codice assembly da
     strutture espresse in un linguaggio a pi alto livello rispetto
     all'assembly stesso (ad esempio le macro dell'assembly inline di
     GCC);

    facciate tradurre in assembly questi programmi da strumenti
     automatici;

    facciate ottimizzare questo codice, se possibile;


    tutti i punti di cui sopra, cio scriviate (un'estensione ad) un
     backend per un compilatore ottimizzante.

  Anche nei casi in cui l'assembly  necessario (ad esempio, nello
  sviluppo di sistemi operativi), scoprirete che non ne serve poi molto
  e che i principi precedenti continuano a valere.

  A questo riguardo, date un'occhiata ai sorgenti del kernel di Linux:
  poco assembly, giusto lo stretto necessario, il che ha come risultato
  un sistema operativo veloce, affidabile, portabile e mantenibile.
  Anche un gioco di successo come DOOM  stato scritto quasi
  completamente in C, con solo una minuscola parte scritta in assembly
  per renderlo pi veloce.



  2.2.  Come NON usare l'assembly



  2.2.1.  Procedura generale per ottenere codice efficiente

  Come dice Charles Fiterman su comp.compilers circa il confronto tra
  codice assembly generato a mano o automaticamente,

  L'uomo dovrebbe sempre vincere, ed eccone i motivi:

    Primo passo: l'uomo scrive il tutto in un linguaggio ad alto
     livello.

    Secondo passo: provvede ad un profiling per trovare i punti in cui
     si perde pi tempo.

    Terzo passo: fa produrre al compilatore codice assembly per quelle
     piccole sezioni di codice.

    Quarto passo: le perfeziona a mano cercando piccoli miglioramenti
     rispetto al codice generato dalla macchina.

  L'uomo vince perch sa usare la macchina.



  2.2.2.  Linguaggi con compilatori ottimizzanti

  I linguaggi quali ObjectiveCAML, SML, CommonLISP, Scheme, ADA, Pascal,
  C, C++, tra gli altri, dispongono di compilatori ottimizzanti liberi
  che ottimizzeranno il grosso dei vostri programmi (e spesso otterranno
  risultati migliori rispetto all'assembly manuale anche per cicli
  stretti), permettendovi nel frattempo di concentrarvi su dettagli pi
  ad alto livello, il tutto senza vietarvi di ottenere qualche punto
  percentuale di prestazioni in pi nella maniera espressa sopra, una
  volta che il vostro progetto avr raggiunto un'impostazione stabile.

  Certo, ci sono anche compilatori ottimizzanti commerciali per la
  maggior parte di quei linguaggi!

  Alcuni linguaggi hanno compilatori che producono codice C, che pu
  essere ulteriormente ottimizzato da un compilatore C.  LISP, Scheme,
  Perl e molti altri fanno parte di questa categoria.  La velocit 
  abbastanza buona.





  2.2.3.  Procedura generale per accelerare il vostro codice

  Per quanto riguarda l'accelerazione del vostro codice, dovreste
  restringerla alle parti di un programma che uno strumento di profiling
  ha decisamente identificato come un collo di bottiglia.

  Perci, se identificate qualche porzione di codice come troppo lenta,
  dovreste:

    prima di tutto provare ad usare un algoritmo migliore;

    poi provare a compilarla invece di interpretarla;

    poi provare ad abilitare e raffinare l'ottimizzazione per il vostro
     compilatore;

    poi dare al compilatore dei consigli su come ottimizzare
     (informazione sui tipi in LISP; uso di register con GCC; un mucchio
     di opzioni nella maggior parte dei compilatori, ecc.);

    infine, se  il caso, ripiegate sulla programmazione assembly.

  Come ultima cosa, prima che vi riduciate a scrivere assembly, dovreste
  ispezionare il codice generato, per controllare che il problema
  risieda proprio nella cattiva generazione del codice, visto che
  potrebbe anche non essere cos: il codice generato dal compilatore
  potrebbe essere migliore di quanto avreste potuto fare voi,
  specialmente sulle moderne architetture multi-pipelined!  Le parti
  lente di un programma potrebbero essere intrinsecamente tali.  I pi
  grossi problemi sulle architetture moderne con processori veloci sono
  dovuti a ritardi di accesso alla memoria, cache-miss, TLB miss, e page
  fault; l'ottimizzazione sui registri diventa inutile, ed otterrete
  risultati migliori riprogettando le strutture dati ed il threading per
  ottenere una miglior localit nell'accesso alla memoria.  Potrebbe
  forse essere d'aiuto un approccio completamente diverso al problema.


  2.2.4.  Ispezione del codice generato dal compilatore

  Ci sono molte ragioni per ispezionare il codice assembly generato dal
  compilatore.  Ecco cosa potete fare con tale codice:

    controllate se il codice generato pu essere migliorato in maniera
     ovvia con assembly manuale (o con le opportune opzioni per il
     compilatore).

    Quando  il caso, partite da codice generato e modificatelo, invece
     di ripartire da zero.

    Pi in generale, utilizzate il codice generato come stub da
     modificare. In questo modo, almeno, viene gestito correttamente il
     modo in cui le vostre routine assembly si interfacciano col mondo
     esterno.

    Rintracciare dei bug nel vostro compilatore (raramente, si spera).

  Il modo canonico per far generare codice assembly  invocare con il
  flag -S il vostro compilatore.  Ci funziona con la maggior parte dei
  compilatori UNIX, compreso il compilatore C di GNU (GCC), ma nel
  vostro caso le cose potrebbero andare diversamente.  Nel caso di GCC,
  con l'opzione -fverbose-asm verr prodotto codice assembly pi
  comprensibile.  Certo, se volete ottenere buon codice assembly, non
  dimenticate di dare i soliti consigli e le solite opzioni per
  l'ottimizzazione!


  3.  ASSEMBLATORI



  3.1.  Assembly inline di GCC

  Il noto compilatore GNU C/C++ (GCC), un compilatore ottimizzante a
  32-bit alla base del progetto GNU, supporta l'architettura x86
  abbastanza bene, e fornisce la possibilit di inserire codice assembly
  nei programmi C, in modo tale che l'allocazione dei registri pu
  essere o specificata o lasciata a GCC.  GCC funziona sulla maggior
  parte delle piattaforme disponibili, tra le quali sono degne di nota
  Linux, *BSD, VSTa, OS/2, *DOS, Win*, ecc.


  3.1.1.  Dove trovare GCC

  Il sito originale di GCC  il sito FTP di GNU
  <ftp://prep.ai.mit.edu/pub/gnu/> in cui si trova anche tutto il
  software applicativo del progetto GNU che  stato rilasciato.

  Versioni configurate e precompilate per Linux possono essere trovate
  in <ftp://sunsite.unc.edu/pub/Linux/GCC/>.  Esistono un sacco di
  mirror FTP di entrambi i siti in tutte le parti del mondo, cos come
  copie su CD-ROM.

  Recentemente, lo sviluppo di GCC si  biforcato.  Maggiori notizie
  sulla versione sperimentale, egcs, presso
  <http://www.cygnus.com/egcs/>.

  Dovreste trovare dei sorgenti adattati per il vostro sistema operativo
  preferito e dei binari precompilati ai soliti siti FTP.

  La versione pi comune per DOS si chiama DJGPP e pu essere trovata
  nelle directory con questo nome nei siti FTP.  Vedere:

  <http://www.delorie.com/djgpp/>


  C' anche una versione di GCC per OS/2 chiamata EMX, che funziona
  anche sotto DOS ed include molte routine di libreria per l'emulazione
  di UNIX.  Date un'occhiata dalle parti di:

  <http://www.leo.org/pub/comp/os/os2/gnu/emx+gcc/>

  <http://warp.eecs.berkeley.edu/os2/software/shareware/emx.html>

  <ftp://ftp-os2.cdrom.com/pub/os2/emx09c/>



  3.1.2.  Dove trovare documentazione per l'assemblatore inline di GCC

  La documentazione di GCC include file di documentazione in formato
  texinfo.  Potete compilarli con TeX e poi stampare il risultato,
  oppure convertirli in .info e sfogliarli con emacs, oppure ancora
  convertirli in .html o (con gli strumenti appropriati) in tutto ci
  che volete, oppure semplicemente leggerli cos come sono.

  Di solito i file .info si trovano in ogni buona installazione di GCC.

  La sezione corretta da cercare : C Extensions::Extended Asm::

  La sezione Invoking GCC::Submodel Options::i386 Options:: potrebbe
  anch'essa rivelarsi utile.  In particolare, d i vincoli sui nomi dei
  registri specifici per l'i386: abcdSDB corrispondono rispettivamente
  a: %eax, %ebx, %ecx, %edx, %esi, %edi, %ebp (nessuna lettera per
  %esp).

  La DJGPP Games resource (non solo per hacker dei giochi) ha questa
  pagina apposta per l'assembly:

  <http://www.rt66.com/~brennan/djgpp/djgpp_asm.html>

  Infine, c' una pagina web chiamata DJGPP Quick ASM Programming
  Guide che tratta URL, FAQ, sintassi asm AT&T per x86, alcune
  informazioni sull'asm inline e la conversione dei file .obj/.lib:

  <http://remus.rutgers.edu/~avly/djasm.html>

  GCC dipende da GAS per l'assembling e segue la sua sintassi (vedere in
  seguito); se usate l'asm inline, badate bene:  necessario che i
  caratteri percento siano protetti dall'espansione per poter essere
  passati a GAS.  Vedere la sezione su GAS in seguito.

  Potete trovare un sacco di esempi utili nella sottodirectory
  linux/include/asm-i386/ dei sorgenti del kernel di Linux.



  3.1.3.  Invocare GCC per fargli trattare correttamente l'assembly
  inline

  Assicuratevi di invocare GCC con il flag -O ( oppure -O2, -O3, ecc.)
  per abilitare le ottimizzazioni e l'assembly inline.  Se non lo fate,
  il vostro codice potrebbe venire compilato ma non essere eseguito
  correttamente!!!  In realt (lodi smisurate a Tim Potter,
  timbo@mohpit.air.net.au)  sufficiente utilizzare il flag -fasm (e
  forse -finline-functions) che attiva solo una parte di tutte le
  funzionalit abilitate da -O.  Cos, se avete problemi a causa di bug
  nelle ottimizzazioni della vostra particolare versione/implementazione
  di GCC, potete comunque usare l'asm inline.  In maniera analoga, usate
  -fno-asm per disabilitare l'assembly inline (perch dovreste?).

  Pi in generale, buoni flag di compilazione per GCC sulla piattaforma
  x86 sono

  ______________________________________________________________________
          gcc -O2 -fomit-frame-pointer -m386 -Wall
  ______________________________________________________________________



  -O2  il giusto livello di ottimizzazione. Ottimizzare oltre produce
  codice che  parecchio pi grande, ma solo di poco pi veloce; tale
  sovraottimizzazione potrebbe essere utile solo per cicli stretti (se
  ce ne sono), che potreste comunque realizzare in assembly; se ne
  sentite la necessit, fatelo solo per le poche routine che ne hanno
  bisogno.

  -fomit-frame-pointer consente al codice generato di evitare la stupida
  gestione del frame pointer, il che rende il codice pi piccolo e
  veloce e libera un registro per ulteriori ottimizzazioni.  Ci
  preclude il comodo utilizzo degli strumenti per il debugging (gdb), ma
  nel momento in cui usate questi strumenti, non  che vi importi poi
  molto delle dimensioni e della velocit.

  -m386 produce codice pi compatto, senza alcun rallentamento
  misurabile (notate che codice piccolo significa anche meno I/O per il
  disco ed esecuzione pi rapida), ma forse sui suddetti cicli stretti
  potreste apprezzare -mpentium per il GCC speciale che ottimizza per
  pentium (sempre che abbiate come obiettivo proprio una piattaforma
  pentium).

  -Wall abilita tutti gli avvisi e vi aiuta a scovare errori stupidi ed
  ovvii.

  Per ottimizzare ancora di pi, l'opzione -mregparm=2 e/o il
  corrispondente attributo per le funzioni vi potrebbero essere utili<,
  ma potrebbero porre un sacco di problemi qualora doveste fare un link
  con codice estraneo...

  Notate che potete rendere questi flag quelli predefiniti modificando
  il file /usr/lib/gcc-lib/i486-linux/2.7.2.2/specs o dovunque esso si
  trovi nel vostro sistema (meglio non aggiungere -Wall in quella sede,
  comunque).



  3.2.  GAS

  GAS  l'assemblatore GNU, su cui fa affidamento GCC.



  3.2.1.  Dove trovarlo

  Lo trovate nello stesso posto dove avete trovato GCC, in un pacchetto
  denominato binutils.



  3.2.2.  Cos' la sintassi AT&T

  Poich GAS  stato concepito per supportare un compilatore UNIX a 32
  bit, esso utilizza la notazione standard AT&T, che assomiglia molto
  alla sintassi degli assemblatori standard per m68k ed  standard nel
  mondo UNIX.  Questa sintassi non  n peggiore n migliore della
  sintassi Intel.   semplicemente diversa.  Una volta che ci si 
  abituati, la si trova molto pi regolare della sintassi Intel, anche
  se un po' noiosa.

  Ecco le cose a cui prestare maggiore attenzione quando si ha a che
  fare con la sintassi di GAS:

    I nomi dei registri hanno % come prefisso, cosicch i registri sono
     %eax, %dl e cos via invece di solo eax, dl, ecc.  Ci fa s che
     sia possibile includere simboli C esterni direttamente nel sorgente
     assembly, senza alcun rischio di confusione e senza alcun bisogno
     di orribili underscore anteposti.

    L'ordine degli operandi  la sorgente (o sorgenti) per prima e la
     destinazione per ultima, che  l'opposto della convenzione Intel di
     avere prima la destinazione e le sorgenti per ultime.  Quindi, ci
     che nella sintassi intel  mov ax,dx (carica il contenuto del
     registro dx nel registro ax) diventer mov %dx, %ax nella sintassi
     AT&T.

    La lunghezza dell'operando  specificata tramite un suffisso al
     nome dell'istruzione.  Il suffisso  b per byte (8 bit), w per word
     (16 bit) e l per long (32 bit). Ad esempio, la sintassi corretta
     per l'istruzione menzionata poco fa sarebbe stata movw %dx,%ax.
     Comunque, gas non richiede una sintassi AT&T rigorosa, quindi il
     suffisso  opzionale quando la lunghezza pu essere ricavata dai
     registri usati come operandi, altrimenti viene posta a 32 bit per
     default (con un avviso).


    Gli operandi immediati sono indicati con il prefisso $, come in
     addl $5,%eax (somma il valore long 5 al registro %eax).

    L'assenza di prefisso in un operando indica che  un indirizzo di
     memoria; perci movl $pippo,%eax mette l'indirizzo della variabile
     pippo nel registro %eax, mentre movl pippo,%eax mette il contenuto
     della variabile pippo nel registro %eax.

    L'indicizzazione o l'indirezione  ottenuta racchiudendo il
     registro indice o l'indirizzo della cella di memoria di indirezione
     tra parentesi, come in testb $0x80,17(%ebp) (esegue un test sul bit
     pi alto del valore byte all'offset 17 dalla cella puntata da
     %ebp).


  Esiste un programma per aiutarvi a convertire programmi dalla sintassi
  TASM alla sintassi AT&T. Date un'occhiata a

  <ftp://x2ftp.oulu.fi/pub/msdos/programming/convert/ta2asv08.zip>

  GAS ha una documentazione esauriente in formato TeXinfo, che trovate
  nella distribuzione dei sorgenti (e forse altrove).  Potete sfogliare
  le pagine .info estratte con emacs o con ci che pi vi aggrada.
  C'era un file chiamato gas.doc o as.doc dalle parti del pacchetto
  sorgente di GAS, ma  stato incorporato nella documentazione in
  TeXinfo.  Certo, in caso di dubbio, la documentazione definitiva sono
  i sorgenti stessi!  Una sezione che vi interesser particolarmente 
  Machine Dependencies::i386-Dependent::


  Ancora, i sorgenti di Linux (il kernel del sistema operativo) si
  rivelano buoni esempi; date un'occhiata ai seguenti file sotto
  linux/arch/i386:

  kernel/*.S, boot/compressed/*.S, mathemu/*.S

  Se state scrivendo qualcosa tipo un linguaggio, un pacchetto per i
  thread, ecc.  potreste anche guardare come si comportano altri
  linguaggi (OCaml, gforth, ecc.) o pacchetti per i thread
  (QuickThreads, MIT pthreads, LinuxThreads, etc), o quel che .

  Infine, limitarsi a compilare un programma C in assembly potrebbe
  mostrarvi la sintassi del genere di istruzioni che vi interessano.
  Vedere la precedente sezione ``Avete bisogno dell'assembly?''.




  3.2.3.  Modo a 16 bit limitato

  GAS  un assemblatore a 32 bit, il suo compito  quello di supportare
  un compilatore a 32 bit.  Attualmente ha solo un supporto limitato per
  il modo a 16 bit, che consiste nell'anteporre i prefissi per i 32 bit
  alle istruzioni, cosicch scrivete codice a 32 bit che gira nel modo a
  16 bit su una CPU a 32 bit.  In entrambi i modi supporta l'uso dei
  registri a 16 bit, ma non l'indirizzamento a 16 bit.

  Utilizzate le direttive .code16 e .code32 per passare da un modo
  all'altro.  Notate che un'istruzione di assembly inline
  asm(".code16\n") consentir a GCC di produrre codice a 32 bit che
  girer in real mode!

  Mi  stato detto che la maggior parte del codice necessario per
  supportare pienamente la programmazione nel modo a 16 bit  stata
  aggiunta a GAS da Bryan Ford (si prega di confermare), tuttavia non si
  trova in nessuna delle distribuzioni che ho provato, fino a
  binutils-2.8.1.x ... sarebbero gradite maggiori informazioni su questo
  argomento.

  Una soluzione economica  quella di definire macro (vedere in seguito)
  che in qualche modo producono la codifica binaria (con .byte) solo per
  le istruzioni del modo a 16 bit di cui avete bisogno (quasi nessuna se
  usate il codice a 16 bit come sopra e se potete supporre con certezza
  che il codice girer su una CPU x86 in grado di gestire i 32 bit).
  Per trovare la codifica corretta, potete ispirarvi ai sorgenti degli
  assemblatori in grado di gestire i 16 bit.


  3.3.  GASP

  GASP (GAS Preprocessor)  il Preprocessore per GAS.  Aggiunge macro e
  dei costrutti sintattici carini a GAS.



  3.3.1.  Dove trovare GASP

  GASP si trova assieme a GAS nell'archivio binutils di GNU.



  3.3.2.  Come funziona

  Funziona come un filtro, in modo molto simile a cpp e programmi
  analoghi.  Non ho alcuna idea sui dettagli, ma assieme ad esso trovate
  documentazione relativa in texinfo, perci limitatevi a sfogliarla (in
  .info), stamparla, sviscerarla.  GAS con GASP mi sembra un comune
  assemblatore con macro.


  3.4.  NASM

  Il progetto Netwide Assembler sta producendo un ulteriore
  assemblatore, scritto in C, che dovrebbe essere abbastanza modulare
  per supportare eventualmente tutte le sintassi ed i formati di oggetto
  conosciuti.


  3.4.1.  Dove trovare NASM

  <http://www.cryogen.com/Nasm>

  Le release binarie, nel vostro solito mirror di sunsite, sotto
  devel/lang/asm/.  Dovrebbero inoltre essere disponibili come .rpm o
  .deb nei contrib delle vostre distribuzioni RedHat/Debian.


  3.4.2.  Cosa fa

  Nel momento in cui questo HOWTO viene scritto, la versione corrente di
  NASM  0.96.

  La sintassi  in stile Intel.   integrato del supporto per le macro.
  I formati di file oggetto supportati sono bin, aout, coff, elf, as86,
  (DOS) obj, win32, rdf (il loro formato specifico).

  NASM pu essere usato come backend per il compilatore libero LCC (sono
  inclusi i file di supporto).

  Di certo NASM si evolve troppo rapidamente perch questo HOWTO possa
  essere aggiornato.  A meno che voi stiate usando BCC come compilatore
  a 16 bit (il che esula dagli scopi di questo HOWTO sulla
  programmazione a 32 bit), dovreste usare NASM invece di, ad esempio,
  ASM o MASM, perch  attivamente supportato online e gira su tutte le
  piattaforme.

  Nota: con NASM trovate anche un disassemblatore, NDISASM.

  Il suo parser scritto a mano lo rende molto pi veloce di GAS anche
  se, ovviamente, non supporta tre fantastiliardi di architetture
  differenti.  Se volete generare codice per x86, dovrebbe essere
  l'assemblatore da scegliere.


  3.5.  AS86

  AS86  un assemblatore 80x86 a 16 e 32 bit, parte del compilatore C di
  Bruce Evans (BCC).  Segue fondamentalmente la sintassi Intel, anche se
  ne discosta leggermente per quanto riguarda le modalit di
  indirizzamento.


  3.5.1.  Dove procurarsi AS86

  Una versione decisamente superata di AS86  distribuita da HJLu
  semplicemente per compilare il kernel di Linux, in un pacchetto
  chiamato bin86 (versione corrente: 0.4), disponibile in ogni archivio
  di GCC per Linux.  Tuttavia non consiglio a nessuno di usarlo per
  qualcosa che non sia compilare Linux. Questa versione supporta solo
  una versione modificata del formato per file oggetto di minix, che non
   supportata dalle binutils GNU o altro e che ha qualche bug nel modo
  a 32 bit, quindi fareste proprio meglio a tenerla solo per compilare
  Linux.

  Le versioni pi recenti realizzate da Bruce Evans (bde@zeta.org.au)
  sono pubblicate assieme alla distribuzione FreeBSD.  Beh, lo erano:
  non sono riuscito a trovare i sorgenti dalla distribuzione 2.1 in poi
  :( Quindi, metto i sorgenti da me:

  <http:///www.eleves.ens.fr:8080/home/rideau/files/bcc-95.3.12.src.tgz>

  Il progetto Linux/8086 (conosciuto anche come ELKS) sta in qualche
  modo mantenendo bcc (anche se non credo che abbiano incluso le patch
  per i 32 bit).  Date un'occhiata dalle parti di
  <http://www.linux.org.uk/Linux8086.html> <ftp://linux.mit.edu/>.

  Tra l'altro, queste versione pi recenti, contrariamente a quelle di
  HJLu, supportano il formato GNU a.out per Linux, cosicch  possibile
  il linking tra il vostro codice ed i programmi Linux e/o l'utilizzo
  dei soliti strumenti dal pacchetto GNU binutil per manipolare i vostri
  dati.  Questa versione pu coesistere senza alcun danno con quella
  precedente (vedere la domanda relativa in seguito).

  BCC, versione del 12 marzo 1995 e precedenti, esegue i push ed i pop
  di segmenti soltanto a 16 bit, il che  non poco seccante quando si
  programma nel modo a 32 bit.

  Una patch  disponibile nel progetto Tunes
  <http://www.eleves.ens.fr:8080/home/rideau/Tunes/> alla sottopagina
  files/tgz/tunes.0.0.0.25.src.tgz nella directory decompressa LLL/i386/
  La patch dovrebbe anche essere disponibile direttamente da
  <http://www.eleves.ens.fr:8080/home/rideau/files/as86.bcc.patch.gz>
  Bruce Evans ha accettato questa patch, cos se un giorno ci sar da
  qualche parte una versione pi recente di bcc, la patch dovrebbe
  essere stata inclusa.



  3.5.2.  Come invocare l'assemblatore?

  Ecco la voce nel Makefile di GNU per usare bcc allo scopo di
  trasformare asm .s in oggetto .o ed ottenere un listato .l :


  ______________________________________________________________________
  %.o %.l:        %.s
          bcc -3 -G -c -A-d -A-l -A$*.l -o $*.o $<
  ______________________________________________________________________



  Togliete %.l, -A-l e -A$*.l se non volete alcun listato.  Se volete
  qualcos'altro invece di un a.out GNU, potete consultare la
  documentazione di bcc circa gli altri formati supportati e/o
  utilizzare objcopy dal pacchetto delle GNU binutils.


  3.5.3.  Dove trovare documentazione

  La documentazione  quella che  inclusa nel pacchetto bcc.  Da
  qualche parte nel sito di FreeBSD sono inoltre disponibili le pagine
  di manuale.  In caso di dubbi, i sorgenti stessi sono spesso una buona
  documentazione: non  molto ben commentata, ma lo stile di
  programmazione  chiaro.  Potreste provare a vedere come as86 
  utilizzato in Tunes 0.0.0.25...



  3.5.4.  E se non riesco pi a compilare Linux con questa nuova ver
  sione?

  Linus  sepolto vivo nella posta e la mia patch per compilare Linux
  con as86 a.out per Linux non ce l'ha fatta ad arrivargli (!).  Ora,
  questo non dovrebbe avere importanza: limitatevi a tenere il vostro
  as86 dal pacchetto bin86 in /usr/bin e lasciate che bcc installi
  l'as86 buono come /usr/local/libexec/i386/bcc/as dove dovrebbe
  risiedere.  Non avrete mai bisogno di chiamare esplicitamente questo
  as86 buono, perch bcc fa tutto come si deve, compresa la
  conversione dal formato a.out di Linux quando viene invocato con le
  opzioni corrette; limitatevi perci ad assemblare usando bcc come
  frontend, non fatelo direttamente con as86.



  3.6.  ALTRI ASSEMBLATORI

  Queste sono altre scelte possibili, non convenzionali, nel caso in cui
  le precedenti non vi abbiano soddisfatto (perch?).  Non le consiglio
  nei casi comuni (?), ma potrebbero rivelarsi molto utili se
  l'assemblatore deve essere integrato nel software che state
  progettando (ad esempio un sistema operativo o un ambiente di
  sviluppo).




  3.6.1.  L'assemblatore Win32Forth

  Win32Forth  un sistema ANS FORTH a 32 bit libero che gira sotto
  Win32s, Win95, Win NT.  Include un assemblatore libero a 32 bit (con
  sintassi prefissa o postfissa) integrato nel linguaggio FORTH.  La
  gestione delle macro  realizzata con la piena potenza del linguaggio
  FORTH; comunque, l'unico contesto di input e di output supportato 
  Win32Forth stesso (nessuna creazione di file .obj ; certo, potreste
  aggiungerla voi stessi).  Lo trovate qui:
  <ftp://ftp.forth.org/pub/Forth/win32for/>



  3.6.2.  Terse

  Terse  uno strumento di programmazione con LA sintassi
  dell'assemblatore pi compatta per la famiglia x86!

  Vedere  <http://www.terse.com>.  Si dice che ce ne sia un clone libero
  da qualche parte.  Sarebbe stato abbandonato in seguito a pretese
  infondate secondo le quali la sintassi apparterrebbe all'autore
  originale.  Vi invito a continuarne lo sviluppo, nel caso la sintassi
  vi interessi.



  3.6.3.  Assemblatori non liberi e/o non a 32 bit.

  Potete trovare pi informazioni a riguardo, assieme alle basi della
  programmazione assembly per x86, nelle FAQ di Raymond Moon per
  comp.lang.asm.x86 <http://www2.dgsys.com/~raymoon/faq/asmfaq.zip>

  Va notato che tutti gli assemblatori che si basano sul DOS dovrebbero
  funzionare sotto l'emulatore di DOS per Linux ed altri emulatori
  analoghi cosicch, se ne possedete gi uno, potete continuare ad
  usarlo in un vero sistema operativo.  Alcuni assemblatori recenti per
  DOS supportano anche COFF e/o altri formati di file oggetto che sono
  supportati dalla libreria GNU BFD, cos potete usarli insieme ai
  vostri strumenti liberi a 32 bit, magari usando GNU objcopy (che fa
  parte delle binutils) come filtro di conversione.




  4.  METAPROGRAMMAZIONE E MACRO

  La programmazione in assembly  una scocciatura, tranne che per
  sezioni critiche dei programmi.

  Dovreste usare gli strumenti appropriati per il compito giusto, quindi
  non scegliete l'assembly quando non  adatto; C, OCAML, perl, Scheme
  potrebbero essere una scelta migliore per la maggior parte della
  vostra programmazione.

  Comunque, ci sono casi in cui questi strumenti non consentono un
  controllo sufficientemente accurato della macchina e l'assembly
  risulta utile o addirittura necessario.  In questi casi, vi sar utile
  un sistema di macro e metaprogrammazione che permetter di ridurre
  ogni struttura ricorrente in una definizione riutilizzabile molte
  volte, il che consente una programmazione pi sicura, la propagazione
  automatica delle modifiche alla struttura stessa, ecc.

  Un assemblatore liscio  spesso insufficiente, anche quando si
  sviluppano semplicemente piccole routine per un linking con il C.


  4.1.  Cosa  integrato nei pacchetti menzionati

  S, lo so che questa sezione non contiene molte informazioni
  aggiornate.  Sentitevi liberi di contribuire ci che scoprite sulla
  vostra pelle...



  4.1.1.  GCC

  GCC permette (e richiede) che voi specifichiate vincoli sui registri
  nel vostro codice assembly inline cosicch l'ottimizzatore ne  sempre
  al corrente; perci il codice assembly inline, in realt, non  per
  forza costituito da codice esatto, ma da strutture.

  Potete poi inserire il vostro assembly in macro di CPP ed in funzioni
  C inline, cos si pu usare come una qualsiasi macro o funzione C.  Le
  funzioni inline assomigliano molto alle macro, ma il loro uso risulta
  talvolta pi pulito.  Badate che in tutti questi casi si avr una
  duplicazione di codice, quindi in questo codice asm dovrebbero essere
  definite solo etichette locali (del tipo 1:).  Comunque, una macro
  permetterebbe che il nome di una etichetta non definita localmente
  venga passato come parametro (oppure utilizzate metodi aggiuntivi di
  metaprogrammazione).  Inoltre, propagare codice asm inline diffonder
  potenziali bug presenti in esso, state quindi doppiamente attenti ai
  vincoli sui registri in situazioni simili.

  Infine, il linguaggio C stesso pu essere considerato una buona
  astrazione rispetto al linguaggio assembly, il che vi solleva dalla
  maggior parte dei problemi legati all'assembling.

  Fate attenzione: alcune ottimizzazioni riguardanti il passaggio di
  argomenti a funzioni tramite registri possono rendere dette funzioni
  inadatte ad essere chiamate da routine esterne (ed in particolare da
  quelle scritte a mano in assembly) nel modo standard; l'attributo
  asmlinkage potrebbe impedire ad una routine di preoccuparsi di tale
  flag di ottimizzazione; guardatevi i sorgenti del kernel per gli
  esempi.



  4.1.2.  GAS

  GAS fornisce del supporto per le macro, come  spiegato in dettaglio
  nella documentazione texinfo.  GCC, oltra a riconoscere i file .s come
  assembly grezzo da inviare a GAS, riconosce anche i file .S come
  file da passare attraverso CPP prima di mandarli a GAS.  Ancora una
  volta, guardate i sorgenti di Linux per gli esempi.


  4.1.3.  GASP

  Aggiunge tutti i tipici trucchetti delle macro a GAS.  Consultate la
  sua documentazione texinfo.


  4.1.4.  NASM

  Anche NASM ha del supporto per le macro.  Date un'occhiata alla
  documentazione relativa.  Se avete qualche idea brillante, potreste
  voler contattare gli autori, dal momento che lo stanno sviluppando
  attivamente.  Nel frattempo, date un'occhiata ai filtri esterni
  presentati in seguito.


  4.1.5.  AS86

  Ha un po' di semplice supporto per le macro, ma non sono riuscito a
  trovare della documentazione.  I sorgenti sono molto chiari perci se
  siete interessati dovreste capirli facilmente.  Se le capacit di base
  non vi bastano, dovreste usare un filtro esterno (vedere in seguito).



  4.1.6.  ALTRI ASSEMBLATORI


    Win32FORTH: CODE ed END-CODE sono delle macro che non commutano dal
     modo interpretazione al modo compilazione, cosicch avete pieno
     accesso alla potenza del FORTH durante l'assembling.

    TUNES: non funziona ancora, ma Scheme  un vero linguaggio ad alto
     livello che consente metaprogrammazione arbitraria.



  4.2.  Filtri esterni

  Qualunque sia il supporto per le macro del vostro assemblatore, o
  qualunque linguaggio utilizziate (perfino il C!), se secondo voi il
  linguaggio non  sufficientemente espressivo, potete far passare i
  file attraverso un filtro esterno con una regola come questa nel
  Makefile:


  ______________________________________________________________________
  %.s:    %.S altre_dipendenze
              $(FILTRO) $(OPZIONI_DEL_FILTRO) < $< > $@
  ______________________________________________________________________





  4.2.1.  CPP

  CPP non  molto espressivo, ma  sufficiente per le cose facili, 
  standard ed  chiamato in modo trasparente da GCC.

  Per fare un esempio delle sue limitazioni, non si possono dichiarare
  oggetti in modo tale che i distruttori vengano chiamati
  automaticamente al termine del blocco di dichiarazione; non avete
  diversion o regole di visibilit (scoping), ecc.

  CPP si trova assieme ad ogni compilatore C. Se ve la siete cavata
  senza averne uno, non preoccupatevi di procurarvi GCC (anche se mi
  chiedo come abbiate fatto).


  4.2.2.  M4

  M4 vi d tutta la potenza delle macro, con un linguaggio Turing-
  equivalente, ricorsione, espressioni regolari, ecc.  Potete farci
  tutto ci che CPP non riesce a fare.

  Date un'occhiata a macro4th/This4th da
  <ftp://ftp.forth.org/pub/Forth/> in Reviewed/ ANS/ (?), o le sorgenti
  di Tunes 0.0.0.25 come esempi di un utilizzo avanzato delle macro con
  m4.  Comunque, il suo scomodo sistema di protezione dall'espansione vi
  obbliga ad utilizzare per le macro uno stile basato sulla ricorsione
  in coda con passaggio di continuazione esplicito (explicit
  continuation-passing) se volete una uso avanzato delle macro (il che
  ricorda TeX. A proposito, qualcuno ha provato ad usare TeX per le
  macro di qualcosa di diverso dalla composizione tipografica?).  Questo
  comunque NON  peggio di CPP, il quale non permette n il quoting n
  la ricorsione.  La versione giusta di m4 da procurarsi  GNU m4 1.4 (o
  successiva, se esiste), la quale ha il maggior numero di funzionalit
  ed il minor numero di bug o limitazioni rispetto alle altre.  m4 
  progettato per essere lento per tutto tranne gli utilizzi pi
  semplici, il che potrebbe andare ancora bene per la maggior parte dei
  programmi assembly (non state scrivendo programmi in assembly da
  milioni di righe, vero?).



  4.2.3.  Macro con i vostri filtri

  Potete scrivervi dei semplici filtri per l'espansione delle macro con
  i soliti strumenti: perl, awk, sed, ecc.  Si fa in fretta ed avete il
  controllo su tutto.  Ma ovviamente, la potenza nella gestione delle
  macro bisogna guadagnarsela con fatica.



  4.2.4.  Metaprogrammazione

  Invece di usare un filtro esterno che espande le macro, un modo
  alternativo di procedere  quello di scrivere programmi che scrivono
  parti di altri programmi (o interi programmi).

  Ad esempio, potreste utilizzare un programma che dia in uscita codice
  sorgente

    per generare tavole precalcolate di seno/coseno/quant'altro,

    per estrarre una rappresentazione in forma sorgente di un file
     binario,

    per inserire le vostre bitmap nel codice compilato di routine di
     visualizzazione rapide,

    per estrarre documentazione, codice di
     inizializzazione/conclusione, tabelle di descrizione cos come
     codice ordinario dagli stessi file sorgenti,

    per avere codice assembly personalizzato, generato da uno script
     perl/shell/scheme che si occupa di elaborazione generica.

    per propagare dati definiti in un punto solo verso vari pezzi di
     codice e tabelle con riferimenti incrociati.

    ecc.

  Pensateci!



  4.2.4.1.  Backend da compilatori esistenti

  Compilatori come SML/NJ, Objective CAML, MIT-Scheme, ecc.  hanno il
  loro backend generico per gli assemblatori che potreste o meno voler
  usare se intendete generare semiautomaticamente del codice partendo
  dai linguaggi relativi.



  4.2.4.2.  Il New-Jersey Machine-Code Toolkit

  C' un progetto per costruire, usando il linguaggio di programmazione
  Icon, una base per produrre codice che manipola l'assembly. Date
  un'occhiata dalle parti di <http://www.cs.virginia.edu/~nr/toolkit/>





  4.2.4.3.  Tunes

  Il progetto Tunes OS sta sviluppando il suo assemblatore come
  un'estensione al linguaggio Scheme, come parte del suo processo di
  sviluppo.  Al momento non  ancora in grado di girare, tuttavia ogni
  aiuto  bene accetto.

  L'assemblatore manipola alberi di sintassi simbolici, cos pu
  ugualmente servire come base per un traduttore di sintassi assembly,
  un disassemblatore, un backend comune per assemblatore/compilatore,
  ecc.  Inoltre tutta la potenza di un vero linguaggio, Scheme, lo rende
  insuperato per quanto riguarda le macro e la metaprogrammazione.

  <http://www.eleves.ens.fr:8080/home/rideau/Tunes/>





  5.  CONVENZIONI DI CHIAMATA




  5.1.  Linux



  5.1.1.  Linking a GCC

   il modo preferito.  Controllate la documentazione di GCC e gli
  esempi dai file .S del kernel di Linux che passano attraverso gas (non
  quelli che passano attraverso as86).

  Gli argomenti a 32 bit vengono posti sullo stack (push) in ordine
  inverso rispetto alla sintassi (per cui vi si accede prelevandoli
  nell'ordine corretto) sopra l'indirizzo di ritorno a 32 bit.  %ebp,
  %esi, %edi, %ebx sono salvati dalla funzione chiamata, gli altri dalla
  funzione chiamante; per contenere il risultato si usa %eax, oppure
  %edx:%eax per risultati a 64 bit.

  Stack FP: non ne sono certo, ma penso che il risultato vada in st(0) e
  che l'intero stack sia salvato dalla funzione chiamante.  Notate che
  GCC ha delle opzioni per modificare le convenzioni di chiamata
  riservando registri, per mettere argomenti nei registri, per non fare
  supposizioni sulla presenza dell'FPU, ecc.  Controllate le pagine
  .info i386 .

  Fate attenzione: in questo caso dovete dichiarare l'attributo decl per
  una funzione che seguir le convenzioni di chiamata standard di GCC
  (non so cosa faccia con le convenzioni di chiamata modificate).
  Leggete le pagine info di GCC nella sezione: C Extensions::Extended
  Asm::




  5.1.2.  ELF ed a.out : problemi.

  Alcuni compilatori C antepongono un underscore prima di ogni simbolo,
  mentre altri non lo fanno.

  In particolare, GCC a.out per Linux effettua questa anteposizione,
  mentre GCC ELF per Linux no.


  Se avete bisogno di gestire insieme entrambi i comportamenti, guardate
  come fanno i pacchetti esistenti.  Ad esempio, procuratevi dei vecchi
  sorgenti di Linux, Elk, qthreads, o OCAML...

  Potete inoltre far ignorare la rinominazione implicita C->asm
  inserendo istruzioni come

  ______________________________________________________________________
          void pippo asm("pluto") (void);
  ______________________________________________________________________


  per essere sicuri che la funzione C pippo venga chiamata davvero
  pluto in assembly.

  Notate che il programma di utilit objcopy, dal pacchetto binutils,
  dovrebbe permettervi di trasformare i vostri oggetti a.out in oggetti
  ELF e forse anche viceversa, in alcuni casi.  Pi in generale,
  effettuer un gran numero di conversioni di formato dei file.




  5.1.3.  Linux: chiamate di sistema dirette

  Ci  espressamente NON consigliato, poich le convenzioni cambiano di
  tanto in tanto o tra varianti del kernel (vedere L4Linux), inoltre si
  perde la portabilit, comporta un lavoro di scrittura massiccio, si ha
  ridondanza con gli sforzi di libc ED INOLTRE preclude estensioni e
  correzioni apportate a libc come, ad esempio, il pacchetto zlibc, che
  provvede ad una trasparente decompressione al volo di file compressi
  con gzip.  Il metodo convenzionale e consigliato per chiamare i
  servizi di sistema di Linux , e rimarr, quello di passare attraverso
  la libc.

  Gli oggetti condivisi dovrebbero mantenere la vostra roba entro
  dimensioni contenute.  E se proprio volete binari pi piccoli,
  utilizzate #!  e scaricate sull'interprete il fardello che volete
  togliere dai vostri binari.

  Ora, se per qualche ragione non volete fare un link alla libc,
  procuratevi la libc stessa e capite come funziona!  Dopotutto,
  aspirate a sostituirla, no?

  Potreste inoltre dare un'occhiata a come il mio eforth 1.0c
  <ftp://ftp.forth.org/pub/Forth/Linux/linux-eforth-1.0c.tgz> lo fa.

  Anche i sorgenti di Linux tornano utili, in particolare l'header file
  asm/unistd.h, che descrive come effettuare le chiamate di sistema...

  Fondamentalmente, generate un int $0x80, con il numero associato a
  __NR_nomedellasyscall (da asm/unistd.h) in %eax, ed i parametri (fino
  a cinque) in %ebx, %ecx, %edx, %esi, %edi rispettivamente.  Il
  risultato viene restituito in %eax, dove un numero negativo  un
  errore il cui opposto  ci che libc metterebbe in errno.  Lo stack
  utente non viene toccato, cos non  necessario averne uno valido
  quando effettuate una chiamata di sistema.



  5.1.4.  I/O sotto Linux

  Se volete effettuare dell'I/O sotto Linux, o si tratta di qualcosa di
  molto semplice che non richiede l'arbitraggio del sistema operativo, e
  allora dovreste consultare l'IO-Port-Programming mini-HOWTO, oppure ha
  bisogno di un driver di periferica nel kernel, nel qual caso dovreste
  provare ad approfondire le vostre conoscenze sull'hacking del kernel,
  sullo sviluppo di driver di periferica, sui moduli del kernel, ecc.,
  per i quali ci sono altri eccellenti HOWTO e documenti del LDP.

  In particolare, se ci che vi interessa  la programmazione della
  grafica, allora partecipate al progetto GGI:
  <http://synergy.caltech.edu/~ggi/> <http://sunserver1.rz.uni-
  duesseldorf.de/~becka/doc/scrdrv.html>

  Comunque, in tutti questi casi, fareste meglio ad usare l'assembly
  inline di GCC con le macro da linux/asm/*.h piuttosto che scrivere
  file sorgenti completamente in assembly.


  5.1.5.  Accedere a driver a 16 bit da Linux/i386

  Ci  teoricamente possibile (dimostrazione: guardate come DOSEMU
  riesca a garantire ai programmi un accesso a porte hardware in modo
  selettivo), ed ho anche sentito voci secondo le quali qualcuno da
  qualche parte ci sarebbe di fatto riuscito (nel driver PCI?  Roba per
  l'accesso VESA? ISA PnP? Non so).  Se avete informazioni pi precise a
  riguardo, siate i benvenuti.  Comunque, buoni posti in cui cercare
  maggiori informazioni sono i sorgenti del kernel di Linux, i sorgenti
  di DOSEMU (ed altri programmi nel DOSEMU repository
  <ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/>), e sorgenti di vari
  programmi a basso livello sotto Linux...  (forse GGI se supporta
  VESA).  Fondamentalmente, dovete usare la modalit protetta a 16 bit o
  il modo vm86.

  Il primo  pi semplice da mettere in piedi, ma funziona solamente con
  codice educato (well-behaved) che non utilizza l'aritmetica dei
  segmenti o indirizzamento assoluto degli stessi (segmento 0 in
  particolare), a meno che non ci si trovi nel caso in cui tutti i
  segmenti utilizzati possano essere preparati in anticipo nella LDT.

  Il secondo permette pi compatibilit con i comuni ambienti a 16
  bit, ma richiede una gestione pi complessa.

  In entrambi i casi, prima di poter saltare al codice a 16 bit, dovete

    fare un mmap di tutti gli indirizzi assoluti utilizzati nel codice
     a 16 bit (come ROM, buffer video, zone su cui agir il DMA ed I/O
     memory-mapped) da /dev/mem allo spazio indirizzi del vostro
     processo.

    preparare la LDT e/o il monitor per il modo vm86

    ottenere gli opportuni permessi di I/O dal kernel (vedere sopra)

  Ancora una volta, leggete con cura i sorgenti dei contributi al DOSEMU
  repository menzionato sopra, in particolare quei mini-emulatori per
  far girare ELKS e/o semplici programmi .COM sotto Linux/i386.


  5.2.  DOS

  La maggior parte dei DOS extender viene fornita con
  dell'interfacciamento a servizi DOS.  Leggete la loro documentazione a
  riguardo, ma spesso si limitano a simulare int $0x21 e simili, cos vi
  comportate come se foste in modo reale (dubito che abbiano qualcosa
  di pi di stub ed estensioni per lavorare con operandi a 32 bit; molto
  probabilmente si limiteranno a riportare l'interrupt nel gestore del
  modo reale o del vm86).

  Documentazione su DPMI e affini (e molto pi) pu essere trovata in
  <ftp://x2ftp.oulu.fi/pub/msdos/programming/>
  Anche DJGPP viene fornito con il proprio
  derivato/sottoinsieme/sostituto di glibc.

   possibile la compilazione incrociata da Linux a DOS, guardate nella
  directory devel/msdos/ del vostro mirror locale dell'area FTP di
  sunsite.unc.edu Date anche un'occhiata al DOS extender MOSS dal
  progetto Flux in Utah.

  Altri documenti e FAQ sono molto DOS-centrici.  Noi non consigliamo di
  sviluppare per DOS.



  5.3.  Winzozz e compagnia bella

  Ehi, questo documento riguarda solo il software libero.  Telefonatemi
  quando Winzozz diventa libero, o ci si possono usare strumenti di
  sviluppo liberi!

  Beh, dopotutto ci sono: Cygnus Solutions <http://www.cygnus.com> ha
  sviluppato la libreria cygwin32.dll per far girare i programmi GNU su
  piattaforme Micrashoft.  Cos potete usare GCC, GAS, tutti gli
  strumenti di GNU e molte altre applicazioni UNIX.  Date un'occhiata
  alla loro homepage.  Io (Far) non intendo dilungarmi sulla
  programmazione di WinnaNanna ma sono certo che potete trovare un sacco
  di documentazione a riguardo praticamente ovunque...



  5.4.  Un sistema operativo tutto vostro.

  Essendo il controllo ci che attrae molti programmatori all'assembly,
  il desiderio di sviluppare sistemi operativi  spesso ci che li porta
  all'(o deriva dall') hacking in assembly.  Va notato che ogni sistema
  che permette lo sviluppo di se stesso potrebbe essere considerato un
  sistema operativo, anche se magari gira sopra ad un sistema
  sottostante che fornisce multitasking o I/O (in modo molto simile a
  Linux sopra Mach o OpenGenera sopra UNIX), ecc.

  Quindi, per rendere pi facile il debugging, potreste voler sviluppare
  il vostro sistema operativo prima come processo che gira sopra a
  Linux (nonostante la lentezza), quindi usare il Flux OS kit
  <http://ww.cs.utah.edu/projects/flux/> (che consente l'utilizzo di
  driver di Linux e BSD nel vostro OS) per renderlo autonomo.  Quando il
  vostro sistema  stabile, resta ancora del tempo per scrivere dei
  driver per l'hardware tutti vostri, se la cosa vi fa proprio piacere.

  Questo HOWTO non si occuper di argomenti quali il codice per il boot
  loader ed entrare nel modo a 32 bit, gestire gli interrupt, i
  fondamenti degli orrori intel modo protetto o V86/R86, la
  definizione di un vostro formato per i file oggetto e le convenzioni
  di chiamata.  Il luogo principale in cui trovare informazioni
  attendibili a riguardo sono i sorgenti di sistemi operativi o
  bootloader gi esistenti.  Ci sono un sacco di riferimenti in questa
  pagina WWW:
  <http://www.eleves.ens.fr:8080/home/rideau/Tunes/Review/OSes.html>



  6.  COSE DA FARE E RIFERIMENTI



    riempire le sezioni incomplete.


    aggiungere ulteriori riferimenti a software e documentazione.

    aggiungere esempi facili dal mondo reale per illustrare la
     sintassi, la potenza e le limitazioni di ogni soluzione proposta.

    chiedere aiuto in giro per questo HOWTO.

    trovare qualcuno che ha del tempo per subentrarmi nel mantenimento.

    che sia il caso di spendere qualche parola sull'assembly su altre
     piattaforme?

    Alcuni riferimenti (in aggiunta a quelli gi presenti nel resto
     dell'HOWTO)

    i manuali del pentium
     <http://www.intel.com/design/pentium/manuals/>

    bug nelle CPU della famiglia x86 <http://www.xs4all.nl/~feldmann>

    hornet.eng.ufl.edu per programmatori assembly
     <http://www.eng.ufl.edu/ftp>

    ftp.luth.se <ftp://ftp.luth.se/pub/msdos/demos/code/>

    FAQ del modo protetto <ftp://zfja-gate.fuw.edu.pl/cpu/protect.mod>

    Pagina dell'assembly 80x86
     <http://www.fys.ruu.nl/~faber/Amain.html>

    Courseware <http://www.cit.ac.nz/smac/csware.htm>

    programmazione di giochi
     <http://www.ee.ucl.ac.uk/~phart/gameprog.html>

    esperimenti di programmazione solo in assembly sotto Linux
     <http://bewoner.dma.be/JanW>

    E ovviamente, utilizzate i vostri strumenti di ricerca su Internet
     per cercare ulteriori informazioni e ragguagliatemi su qualunque
     cosa interessante troviate!


  .sig dell'autore:

  --    ,                                         ,           _ v    ~  ^  --
  -- Fare -- rideau@clipper.ens.fr -- Francois-Rene Rideau -- +)ang-Vu Ban --
  --                                      '                   / .          --
  Join the TUNES project for a computing system based on computing freedom !
                   TUNES is a Useful, Not Expedient System
  WWW page at URL: http://www.eleves.ens.fr:8080/home/rideau/Tunes/















  Bash Prompt HOWTO
  Giles Orr, giles@interlog.com
  v0.60, 07 gennaio 1999

  Viene discusso come creare e controllare il prompt del terminale e di
  xterm, compresa l'uso delle sequenze di escape standard per ottenere
  il nome utente, la directory di lavoro corrente, l'ora, ecc. Vengono
  esposti ulteriori suggerimenti su come modificare le barre di titolo
  di xterm, usare funzioni esterne per fornire informazioni sul prompt e
  su come usare i colori ANSI.

  1.  Introduzione

  1.1.  Prerequisiti

  Avrete bisogno di Bash.  La versione fornita con quasi tutte le
  distribuzioni Linux  la 1.14.7 (al momento della stesura di questo
  documento, Novembre 98), che  una shell ben conosciuta e affidabile.
  Bash  ora disponibile nella versione 2.0+: oramai ho utilizzato Bash
  2.0 per qualche tempo, ma quasi tutto il codice qui presentato
  dovrebbe funzionare con la 1.14.7. Se dovessi essere a conoscenza di
  un problema, ne far menzione. Potete controllare la vostra versione
  di Bash digitando echo $BASH_VERSION al prompt. Sulla mia macchina,
  risponde con 2.02.1(1)-release.


  Sarebbe utile, ma non essenziale, esperienza nella programmazione
  shell: pi ne sapete, pi sarete in grado di creare prompt complessi.
  In questo tutorial presuppongo una conoscenza di base della
  programmazione shell e delle utility Unix. Comunque, le mie stesse
  capacit nella programmazione shell sono limitate, cos fornisco molti
  esempi e spiegazioni che possono apparire superflue ad un esperto
  programmatore shell.



  1.2.  Come Usare Questo Documento

  Includo molti esempi e spiegazioni. Parti diverse saranno utili in
  varia misura a persone diverse. Questo documento  diventato
  abbastanza lungo e leggerlo tutto in una volta sarebbe difficile -
  leggete solamente le sezioni che vi servono, tornate indietro quando
  necessario.


  1.3.  Traduzioni

  Al momento in cui scrivo (6 gennaio 99), sono in lavorazione
  traduzioni in giapponese (Akira Endo, akendo@t3.rim.or.jp) e tedesco
  (Thomas Keil, thomas@h-preissler.de). Molte grazie ad entrambi!  Gli
  URL verranno inclusi quando le traduzioni saranno disponibili.


  1.4.  Problemi

  Questa  una lista di problemi che ho notato nel programmare i prompt.
  Non iniziate a leggere qui, e non lasciate che questa lista vi
  scoraggi - questi sono principalmente dettagli minori. Controllate qui
  se vi scontrate con qualche cosa di strano.


    Molte funzionalit di Bash (come i calcoli matematici all'interno
     di $(()) fra gli altri) sono opzioni definite in fase di
     compilazione. Se state usando una distribuzione binaria come quelle
     fornite con una distribuzione standard di Linux, tutte queste
     funzionalit dovrebbero essere gi definite in fase di
     compilazione. Ma se state lavorando sul sistema altrui, vale la
     pena ricordarsene se qualcosa non funziona come vi aspettate. Vi
     sono alcune note su questo in Learning the Bash Shell, p.260-262.

    Lo screen manager "screen" non funziona sempre bene con i colori
     ANSI. Sfortunatamente non sono un esperto di screen. La mia attuale
     versione di screen (una molto recente) sembra funzionare bene in
     tutti i casi, ma ho visto occasioni in cui screen ha ridotto tutti
     i colori del prompt al colore di primo piano standard negli X
     terminal. Questo non sembra essere un problema nella consolle.

    I file Xdefault possono reimpostare i colori. Cercate in
     ~/.Xdefaults linee che fanno riferimento a XTerm*background e
     XTerm*foreground (o forse XTerm*Background e XTerm*Foreground).

    Uno dei prompt menzionati in questo documento usa l'output di
     "jobs" - come gi discusso, l'output di "jobs" verso un pipe non
     funziona in Bash 2.02.

    Le sequenze di escape ANSI per il movimento del cursore non sono
     tutte implementate in tutti gli X terminal. Questo  discusso in
     una sezione a parte.

    Alcune pseudo-immagini carine possono essere create usando i font
     VGA piuttosto che i font standard di Linux. Sfortunatamente, questi
     effetti sono pessimi se non usate font VGA, e non c' modo di
     scoprire all'interno di un terminale quali font sta usando.

    Bash 2.0+  disponibile e include alcune nuove funzionalit e
     cambia un po' il comportamento. Cose che funzionano sulla 1.14.7
     non funzionano necessariamente sulla 2.0+, o vice versa.


  1.5.  Inviatemi Commenti e Suggerimenti

  Questa  anche per me una "esperienza didattica". Sono arrivato a
  saperne un bel po' su cosa pu essere fatto per creare prompt Bash
  interessanti e utili, ma ho bisogno dei vostri suggerimenti per
  correggere e migliorare questo documento. Ho provato a controllare i
  miei suggerimenti con versioni differenti di Bash (principalmente
  2.02, che uso, e 1.14.7, che  molto usata), ma fatemi sapere se
  trovate delle incompatibilit.


  L'ultima versione di questo documento dovrebbe essere sempre
  disponibile su http://www.interlog.com/~giles/bashprompt.html.  Per
  favore dategli un'occhiata e lasciate pure un e-mail a
  giles@interlog.com con suggerimenti.


  Uso gli HOWTO del Linux Documentation Project quasi esclusivamente in
  formato HTML, cos quando converto questo documento da SGML, HTML 
  l'unico formato che controllo interamente. Se ci sono problemi con
  altri formati, potrei non saperlo e gradirei una nota a riguardo.


  1.6.  Crediti

  Nel produrre questo documento, ho preso in prestito molto dal lavoro
  del progetto Bashprompt su http://bash.current.nu/.  Altre fonti usate
  includono l'xterm Title mini-HOWTO di Ric Lister, reperibile su
  http://sunsite.unc.edu/LDP/HOWTO/mini/Xterm-Title.html, Ansi Prompts
  di Keebler, reperibile su
  http://www.ncal.verio.com/~keebler/ansi.html, How to make a Bash
  Prompt Theme di Stephen Webb, reperibile su
  http://bash.current.nu/bash/HOWTO.html e X ANSI Fonts di Stumpy,
  reperibile su http://home.earthlink.net/~us5zahns/enl/ansifont.html.


  Sono state anche di immenso aiuto diverse conversazioni e e-mail di
  Dan, un collega del Georgia College & State University, le cui
  conoscenze di UNIX superano di molto le mie. Egli mi ha dato numerosi
  ed eccellenti suggerimenti, le sue idee hanno portato ad alcuni prompt
  interessanti.



  Tre libri che sono stati utili nel prorammare i prompt sono Linux in a
  Nutshell di Jessica Heckman Perry (O'Reilly, 1997), Learning the Bash
  Shell di Cameron Newham e Bill Rosenblatt (O'Reilly, 2nd. ed., 1998) e
  Unix Shell Programming di Lowell Jay Arthur (Wiley, 1986.  Questa  la
  prima edizione, la quarta  uscita nel 1997).


  1.7.  Copyright e Liberatoria

  This document is copyright 1998-1999 by Giles Orr. You are encouraged
  to redistribute it. You may not modify this document (see the section
  on contacting me: I have so far been incorporating all changes
  recommended by readers). Please contact me if you're interested in
  doing a translation: that's one modification I can live with.

  This document is available for free, and, while I have done the best I
  can to make it accurate and up to date, I take no responsibility for
  any problems you may encounter resulting from the use of this
  document.

  Ovvero:

  Questo documento  sotto il copyright di 1998-1999 by Giles Orr. Siete
  incoraggiati a ridistribuirlo. Non potete modificare questo documento
  (vedete la sezione su come contattarmi: fino ad ora ho incluso tutti
  cambiamenti raccomandati dai lettori). Per piacere contattatemi se
  siete interessati a fare una traduzione:  una modifica che posso
  tollerare.


  Questo documento  disponibile gratuitamente e, mentre ho fatto il mio
  meglio per renderlo accurato e aggiornato, non mi assumo nessuna
  responsabilit per alcun problema in cui vi possiate imbattere come
  risultato dell'uso di questo documento.


  2.  Bash e i Prompt Bash

  2.1.  Cosa  Bash

  Discendente dalla Bourne Shell, Bash  un progetto GNU, la "Bourne
  Again SHell".  l'interfaccia a linea di comando standard su molte
  macchine Linux. Eccelle in interattivit, nel supportare modifica,
  completamento e richiamo della linea di comando. Supporta anche prompt
  configurabili - molti lo sanno, ma non sanno quanto si pu fare.


  2.2.  Quali sono i vantaggi di modificare il prompt?

  La maggior parte dei sistemi Linux hanno un prompt predefinito in un
  colore (di solito grigio) che dice il vostro nome utente, il nome
  della macchina su cui lavorate e qualche indicazione sulla directory
  di lavoro corrente. Queste sono tutte informazioni utili, ma si pu
  fare molto di pi con il prompt: ogni genere di informazione pu
  essere visualizzata (numero di tty, ora, data, carico della macchina,
  numero di utenti, uptime ...) e il prompt pu utilizzare colori ANSI,
  per farlo apparire interessante, o per fare s che certe informazioni
  siano evidenti.  anche possibile manipolare la barra del titolo di un
  Xterm per visualizzare alcune di queste informazioni.



  2.3.  Perch darsi tante noie?

  Oltre che essere bello,  spesso utile tenere traccia delle
  informazioni di sistema. Una idea che so piace a molti  la
  possibilit di mettere su macchine differenti prompt con colori
  differenti. Se avete diversi Xterm aperti su macchine differenti, o se
  tendete a dimenticare su quale macchina state lavorando e a cancellare
  file sbagliati, troverete questa un ottima maniera per ricordare su
  che macchina vi trovate.


  2.4.  Il Primo Passo

  L'aspetto del prompt viene controllato dalla variabile della shell
  PS1. Le continuazioni di un comando sono indicate dalla stringa PS2,
  che pu essere modificata con esattamente gli stessi metodi qui
  discussi - poich controllarla  esattamente uguale e non 
  altrettanto "interessante", modificher primcipalmente la stringa PS1.
  (Ci sono anche le stringhe PS3 e PS4. Queste non vengono mai viste
  dall'utente medio - si veda la pagina di manuale di Bash se si 
  interessati al loro scopo). Per modificare l'aspetto del prompt,
  dovete cambiare la variabile PS1. Per fare esperimenti, potete
  cambiare la stringa PS1 direttamente al prompt e vedere immediatamente
  i risultati (questo influenza solo la sessione corrente e i
  cambiamenti spariscono quando fate log-out). Se volete rendere
  permanente un cambiamento del prompt, modificate il file ~/.bashrc e
  aggiungete l la nuova definizione di PS1. Se avete permessi di root,
  potete guardare in /etc/profile e modificare la linea "PS1=". Sappiate
  che in alcune distribuzioni (almeno la Redhat 5.1) /etc/bashrc resetta
  le stringhe PS1 e PS2.


  Prima di cominciare,  importante ricordare che la stringa PS1 viene
  salvata nell'ambiente. Se la modificate alla linea di comando, il
  prompt cambier di conseguenza. Prima di fare dei cambiamenti, potete
  salvare il prompt corrente in un'altra variabile d'ambiente:



       [giles@nikola giles]$ SAVE=$PS1
       [giles@nikola giles]$





  Il prompt pi semplice sarebbe un singolo carattere, come:



       [giles@nikola giles]$ PS1=$
       $ls
       bin   mail
       $





  Questo dimostra il modo migliore per fare esperimenti con semplici
  prompt, digitarli alla linea di comando. Si noti che il testo digitato
  dall'utente appare immediatamente dopo il prompt: io preferisco usare



       $PS1="$ "
       $ ls
       bin   mail
       $





  che inserisce uno spazio dopo il prompt, rendendolo pi leggibile. Per
  ripristinare il prompt originale, semplicemente richiamate la
  variabile che avete salvato:



       $ PS1=$SAVE
       [giles@nikola giles]$





  2.5.  Sequenza di Escape dei Prompt Bash

  Vi sono molte sequenze di escape offerte dalla shell Bash da inserire
  nel prompt. Dalla pagina di manuale di Bash 2.02:


































  Quando eseguita in modalit interattiva, bash mostra il prompt
  primario quando  pronta per leggere un comando e il prompt
  secondario PS2 quando  necessario ulteriore input per
  completare il comando. Bash permette di personalizzare queste stringhe
  di prompt inserendo vari caratteri di escape speciali che vengono
  interpretati come segue:
         \a     il carattere ASCII beep (07)
         \d     la data nel formato "Giorno-della-settimana Mese Data"
                (e.g., "Tue May 26")
         \e     un carattere di escape ASCII (033)
         \h     l'hostname fino al primo `.'
         \H     l'hostname
         \n     il carattere "newline"
         \r     il carattere "carriage return"
         \s     il nome della shell, il nome base di $0
                (la parte che segue lo slash finale)
         \t     l'ora corrente nel formato 24-ore HH:MM:SS
         \T     l'ora corrente nel formato 12-ore HH:MM:SS
         \@     l'ora corrente nel formato 12-ore am/pm
         \u     lo username dell'utente corrente
         \v     la versione di bash (e.g., 2.00)
         \V     la release di bash, versione + patchlevel
                (e.g., 2.00.0)
         \w     la directory di lavoro corrente
         \W     il nome di base della directory di lavoro corrente
         \!     il numero cronologico (history number) di questo comando
         \#     il numero di questo comando
         \$     se l'UID effettivo  0, un #, altrimenti un $
         \nnn   il carattere corrispondente al numero ottale nnn
         \\     un backslash
         \[     comuncia una sequenza di caratteri non stampabili, che
                potrebbero essere usati per inserire una sequenza di
                controllo del terminale nel prompt
         \]     termina la sequenza di caratteri non stampabili





  Continuando da dove avevamo interrotto:



       [giles@nikola giles]$ PS1="\u@\h \W> "
       giles@nikola giles> ls
       bin   mail
       giles@nikola giles>





  Questo  simile al prompt predefinito su molte distribuzioni Linux.
  Volevo un apparenza leggermente differente, cos l'ho cambiato a:



       giles@nikola giles> PS1="[\t][\u@\h:\w]\$ "
       [21:52:01][giles@nikola:~]$ ls
       bin   mail
       [21:52:15][giles@nikola:~]$





  2.6.  Impostare Permanentemente le Stringhe PS?

  Varie persone e distribuzioni impostano le loro stringhe PS? in posti
  diversi. I posti pi comuni sono /etc/profile, /etc/bashrc,
  ~/.bash_profile e ~/.bashrc. Johan Kullstam (johan19@idt.net) scrive:



       La stringa PS1 dovrebbe essere impostata in
       .bashrc. questo perch le shell bash non interattive resettano
       PS1. La pagina di manuale di bash dice come la presenza o l'assenza di
       PS1  un buon modo di sapere se ci si trova in una sessione
       bash interattiva oppure non-interattiva (e.g. uno script).

       Il modo in cui mi sono accorto di questo  che startx 
       uno script bash. Questo significa che startx annuller il
       vostro prompt. Quando impostate PS1 in .profile (o .bash_profile),
       fate login alla consolle, fate partire X con startx, il vostro PS1
       viene annullato nel processo lasciandovi con il prompt predefinito.

       Una soluzione  di lanciare xterm e rxvt con l'opzione -ls per
       forzarli a leggere .profile. Ma ogni volta che viene invoca una shell
       mediante uno shell-script non interativo PS1 viene perduto. system(3)
       usa sh -c che se sh  bash distrugger
       PS1. Un modo migliore  mettere la definizione di PS1 in
       .bashrc . questo viene letto ogni volta bash parte ed  dove le
       cose interattive - come PS1 - dovrebbero restare.

       Quindi dovrebbe essere sottolineato che PS1=..blabla.. dovrebbe stare
       in .bashrc e non in .profile.





  Ho provato a duplicare il problema che spiega, e ne ho incontrato uno
  diverso: la mia variabile PROMPT_COMMAND (che verr introdotta pi
  tardi)  stata distrutta. Le mie conoscenze in quest'area sono un po'
  vaghe, cos mi associo a quanto dice Johan.


  3.  Comandi Esterni

  3.1.  PROMPT_COMMAND

  Bash fornisce un'altra variabile d'ambiente chiamata PROMPT_COMMAND.
  Il contenuto di questa variabile viene eseguito come un normale
  comando Bash appena prima che Bash visualizzi il prompt.



       [21:55:01][giles@nikola:~] PS1="[\u@\h:\w]\$ "
       [giles@nikola:~] PROMPT_COMMAND="date +%H%M"
       2155
       [giles@nikola:~] d
       bin   mail
       2156
       [giles@nikola:~]





  Ci che  accaduto sopra  che ho cambiato PS1 in modo da non
  includere pi la sequenza di escape \t, cos da visualizzare l'ora in
  un formato che mi piace di pi. Ma l'ora compare in una linea diversa
  dal prompt. Aggiustando questo con echo -n ... (come mostrato sotto)
  funziona con Bash 2.0+, ma sembra non funzonare con Bash 1.14.7:
  apparentemente il prompt viene ottenuto in maniera differente e il
  metodo seguente causa una sovrapposizione del testo.



       2156
       [giles@nikola:~] PROMPT_COMMAND="echo -n [$(date +%H%M)]"
       [2156][giles@nikola:~]$
       [2156][giles@nikola:~]$ d
       bin   mail
       [2157][giles@nikola:~]$ unset PROMPT_COMMAND
       [giles@nikola:~]





  echo -n ... controlla l'output del comando date e sopprime il
  carattere newline finale, permettendo al prompt di apparire tutto su
  una riga. Alla fine ho usato il comando unset per rimuovere la
  variabile d'ambiente PROMPT_COMMAND.


  Si noti che uso la convenzione $(<comando>) per la sostituzione dei
  comandi: ovvero:



       $(date +%H%M)





  significa "sostituisci qui l'output del comando date +%H%M". Questo
  funziona in Bash 2.0+. In qualche versione pi vecchia di Bash,
  precedente alla 1.14.7, potreste dovere usare i backquote (`date
  +%H%M`). I backquote possono essere usati in Bash 2.0+, ma stanno
  venendo via via rimpiazzati in favore di $(), che si annida meglio.
  Continuer ad utilizzare questa convenzione in questo documento. Se
  state usando una versione precedente di Bash, potete di solito
  sostituite dei backquote dove vedete $(). Se la sostituzione di
  comandi  preceduta da "\" (cio \$(comando) ), usate dei backslash
  davanti ad entrambi i backquote (cio \'comando\' ).


  3.2.  Comandi Esterni nel Prompt

  Potete anche usare l'output di normali comandi Linux direttamente nel
  prompt.  Ovviamente, non dovrete inserire molto materiale altrimenti
  creer un prompt molto grande. Dovrete anche inserire un comando
  veloce, perch verr eseguito ogni volta che il prompt appare sullo
  schemo e ritardi nell'apparire del prompt mentre state lavorando
  possono essere molto fastidiosi. (Differentemente dall'esempio
  precedente, a cui assomiglia molto, questo funziona anche con Bash
  1.14.7).



       [21:58:33][giles@nikola:~]$ PS1="[\$(date +%H%M)][\u@\h:\w]\$ "
       [2159][giles@nikola:~]$ ls
       bin   mail
       [2200][giles@nikola:~]$

   importante notare il backslash prima del segno dollaro della
  sostituzione di comando. Senza di esso, il comando esterno viene
  eseguito esattamente una volta: quando la stringa PS1 viene letta
  nell'ambiente. Per questo prompt, ci significherebbe mostrare lo
  stesso orario indipendentemente da quanto il prompt viene utilizzato.
  Il backslash protegge il contenuto di $() dall'interpretazione
  immediata della shell, cos "date" viene chiamato ogni volta che il
  prompt viene generato.


  Linux viene fornito con molti piccoli programmi di utilit come date,
  grep, o wc che consentono di manipolare informazioni. Se vi trovate a
  creare complesse combinazioni di questi programmi all'interno di un
  prompt, potrebbe essere pi semplice fare voi stessi uno shell script
  e chiamarlo dal prompt. Per assicurare che le variabili della shell
  siano espanse al momento giusto negli shell script bash sono spesso
  necessarie delle sequenze di escape (come visto sopra con il comando
  date): questo viene elevato ad un altro livello all'interno della
  linea del prompt PS1 ed evitare ci creando degli shell script  una
  buona idea.


  Un esempio di un piccolo shell script usato all'interno di un prompt
  viene dato a seguire:



       #!/bin/bash
       #     lsbytesum - somma il numero di byte in un elenco di directory
       TotalBytes=0
       for Bytes in $(ls -l | grep "^-" | cut -c30-41)
       do
           let TotalBytes=$TotalBytes+$Bytes
       done
       TotalMeg=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc)
       echo -n "$TotalMeg"






  A volte l'ho usato come una funzione (molto pi efficiente -
  sfortunatamente, spiegare in dettaglio le funzioni va oltre lo scopo
  di questo documento), altre come uno shell script nella mia directory
  ~/bin, che  nel mio path. Usata in un prompt:



       [2158][giles@nikola:~]$ PS1="[\u@\h:\w (\$(lsbytesum) Mb)]\$ "
       [giles@nikola:~ (0 Mb)]$ cd /bin
       [giles@nikola:/bin (4.498 Mb)]$





  3.3.  Cosa Mettere nel Prompt

  Avrete notato che io metto il nome della macchina, l'ora e la
  directory corrente nella maggioranza dei miei prompt. Ad eccezione
  dell'ora queste sono cose molto standard da mettere nel prompt, l'ora
   l'aggiunta pi comune dopo queste. Ma cosa includere nel prompt 
  interamente una questione di gusto personale. Questi sono esempi da
  persone che conosco per aiutare a darvi delle idee.

  Il prompt di Dan  minimale ma efficace, particolarmente per via del
  modo in cui funziona.



       [giles@nikola:~]$ cur_tty=$(tty | sed -e "s/.*tty\(.*\)/\1/")
       [giles@nikola:~]$ echo $cur_tty
       p4
       [giles@nikola:~]$ PS1="\!,$cur_tty,\$?\$ "
       1095,p4,0$





  A Dan non piace avere la directory corrente che pu ridimensionare
  drasticamente il prompt come ci si muove nell'albero delle directory,
  cos ne tiene traccia a mente (o digita "pwd"). Lui ha imparato Unix
  con csh e tcsh, cos usa molto la command history (qualcosa che molti
  di noi, viziati da bash, non facciamo), cos la prima cosa nel prompt
   l'history number. La seconda cosa sono i caratteri significativi del
  tty (l'output di "tty" viene tagliato con sed), una cosa che pu
  essere utile per gli utilizzatori di "screen". La terza cosa  il
  valore di uscita dell'ultimo comando/pipeline (si noti che questo
  viene reso inutile da ogni comando eseguito all'interno del prompt -
  potreste per ottenerlo salvando il valore in una variabile e
  rimettendolo poi a posto). In fine, lo "\$"  un carattere dollaro per
  un normale utente e cambia in un cancelletto ("#") se l'utente  root.


  Torben Fjerdingstad ha scritto per dirmi che spesso sospende dei job e
  poi se ne dimentica, cos usa il prompt per ricordarsi dei job
  sospesi:



       [giles@nikola:~]$ function jobcount {
       > jobs|wc -l| awk '{print $1}'
       > }
       [giles@nikola:~]$ export PS1='\W[`jobcount`]# '
       giles[0]# man ls &
       [1] 4150

       [1]+  Stopped (tty output)    man ls
       giles[1]#





  Torben usa awk per togliere gli spazi vuoti dall'output di wc, mentre
  io avrei usato sed oppure tr - non perch siano meglio, ma perch mi
  sono pi familiari. Vi sono probabilmente anche altri modi. Torben
  delimita la stringa PS1 con apostrofi (single quote), questo evita che
  Bash interpreti immediatamente i backquote, cos lui non deve farli
  precedere da "\" come ho menzionato.


  NOTA: C' un noto bug in Bash 2.02 che fa s che il comando jobs
  (integrato nella  shell) non restituisca nulla ad un pipe. Se provate
  quanto sopra con Bash 2.02, otterrete sempre "0" indipendentemente da
  quanti job avete sospesi. Chet Ramey, uno dei manutentori di Bash, mi
  dice che questo sar corretto in v2.03.



  3.4.  Ambiente e Funzioni Bash

  Come menzionato prima, PS1, PS2, PS3, PS4 e PROMPT_COMMAND sono tutti
  salvati nell'ambiente Bash. Per quelli di noi che hanno precedente
  esperienza con DOS, l'idea di maneggiare grosse porzioni di codice
  nell'ambiente  terrificante, perch l'ambiente DOS era piccolo e
  proprio non cresceva bene. Vi sono probabilmente limiti pratici su
  cosa pu e cosa dovrebbe essere messo nell'ambiente, ma non so quali
  siano; stiamo probabilmente parlando di un paio di ordini di grandezza
  in pi di quanto gli utenti DOS siano abituati. Come dice Dan:


  "Nella mia shell interattiva ho 62 alias e 25 funzioni. La mia regola
  generale  che se ho bisogno di qualcosa solamente per uso interattivo
  e pu essere scritta in bash ne faccio una funzione (presumendo che
  non possa essere espressa facilmente con un alias). Se queste persone
  hanno problemi di memoria non dovrebbero usare bash. Bash  uno dei
  programmi pi grossi che faccio girare nella mia Linux box (a parte
  Oracle). Lancia top qualche volta e premi 'M' per ordinare per memoria
  occupata - vedrai quanto bash  vicino alla cima della lista. Caspita,
   pi grosso di sendmail! D loro di prendere qualcosa come ash".


  Credo che quel giorno stesse usando solo la consolle: girando X e le
  applicazioni X, ho molte cose pi grosse di Bash. Ma l'idea  la
  stessa: l'ambiente  qualcosa da utilizzare senza preoccuparsi di
  riempirlo troppo.



  Rischio la censura da parte dei guru di Unix quando dico questo (per
  crimine di ipersemplificazione): le funzioni sono in pratica piccoli
  shell script che vengono caricati nell'ambiente per motivi di
  efficienza. Citando ancora Dan: "Le funzioni shell sono efficienti
  quanto pi possibile. Approssimativamente  l'equivalente di eseguire
  uno shell script bash/bourne eccetto che nessun I/O di file 
  necessario perch la funzione  gi in memoria. Le funzioni shell sono
  tipicamente caricate da .bashrc o .bash_profile a seconda che le si
  voglia solo nella shell iniziale o anche nelle sottoshell. Se
  confronti questo con l'esecuzione di uno shell script: la shell fa un
  fork, il processo figlio apre il file e fa un exec, potenzialmente il
  path viene esaminato, il kernel apre il file e esamina sufficienti
  byte da determinare come eseguire il file, nel caso di uno shell
  script una shell deve essere avviata con il nome dello script come
  argomento, la shell allora apre il file, legge e esegue i comandi.
  Diversamente, con una funzione shell, tutto fuorch l'esecuzione dei
  comandi pu essere considerato overhead non necessario".


  4.  Manipolazioni della Barra del Titolo di Xterm

  Posso essere usate dele sequenze di escape non stampabili per produrre
  effetti interessanti nei prompt. Per usare queste sequenze di escape,
  dovete includerle fra \[ e \], dicendo a Bash di ignorare questo
  materiale nel calcolare la dimensione del prompt. Se non si includono
  questi delimitatori si fa in modo che il cursore appaia nel posto
  sbagliato perch la sua effettiva dimensione  sconosciuta. Le
  sequenze di escape devono anche essere precedute da \033[ prima della
  versione 2 di Bash oppure da \033[ o \e[ in versioni successive.


  Se cercate di cambiare la barra del titolo dell'Xterm con il prompt
  quando siete alla consolle, produrrete spazzatura. Per evitare questo,
  testate la variabile d'ambiente XTERM per sapere se il prompt si
  trover in un Xterm.

       function proml
       {
       case $TERM in
           xterm*)
               local TITLEBAR='\[\033]0;\u@\h:\w\007\]'
               ;;
           *)
               local TITLEBAR=''
               ;;
       esac

       PS1="${TITLEBAR}\
       [\$(date +%H%M)]\
       [\u@\h:\w]\
       \$ "
       PS2='> '
       PS4='+ '
       }





  Questa  una funzione che pu essere incorporata in ~/.bashrc. Il nome
  della funzione potrebbe quindi essere chiamato per eseguire la
  funzione. La funzione, come la stringa PS1, viene salvata
  nell'ambiente. Una volta che la stringa PS1 viene impostata dalla
  funzione, potete rimuovere la funzione dall'ambiente con unset proml.
  Dal momento che il prompt non pu cambiare da quando sta in un Xterm a
  quando sta alla consolle, la variabile TERM non viene testata ogni
  volta che il prompt viene generato. Ho usato i marcatori di
  continuazione (i backslash) nella definizione del prompt, per
  consentire di scriverlo su pi righe. Questo migliora la leggibilit
  rendendo pi facile modificarlo e fare un debug.


  Lo definisco come una funzione perch cos  come il pacchetto
  Bashprompt (discusso pi avanti in questo documento) tratta i prompt:
  non  la sola maniera di farlo, ma funziona bene. Via via che i prompt
  che utilizzate diventano pi complessi, diventa sempre pi
  sconveniente digitarli al prompt e pi pratico metterli in qualche
  sorta di file di testo. In questo caso, per testare questo prompt,
  salvate quendo sopra come un file di testo chiamato "proml". potete
  lavorare come segue:



       [giles@nikola:/bin (4.498 Mb)]$ cd     -> Andate dove volete salvare il prompt
       [giles@nikola:~ (0 Mb)]$ vi proml      -> Modificate il file del prompt
       ...                                    -> Inserite il testo dato sopra
       [giles@nikola:~ (0 Mb)]$ source proml  -> Leggete la funzione del prompt
       [giles@nikola:~ (0 Mb)]$ proml         -> Eseguite la funzione del prompt





  Il primo passo nel creare questo prompt  di controllare se la shell
  che stiamo facendo partire  in un xterm o no: se lo , la variabile
  della shell (${TITLEBAR}) viene definita. Essa consiste delle sequenze
  di escape appropriate e \u@\h:\w, che mettono
  <utente>@<macchina>:<directory di lavoro> nella barra del titolo di
  Xterm. Questo  particolarmente utile con Xterm minimizzati,
  rendendoli identificabili pi rapidamente. Il resto del materiale in
  questo prompt dovrebbe essere gi noto dai precedenti prompt che
  abbiamo creato.
  Il solo inconveniente di manipolare la barra dell'Xterm in questo modo
  avviene quando vi loggate in un sistema su cui non avete predisposto
  il trucchetto della barra del titolo: l'Xterm continuer a mostrare
  l'informazione del precedente sistema su cui c'era il trucco.


  5.  Sequenze di escape ANSI: Colori e Movimenti del Cursore

  5.1.  Colori

  Come menzionato prima, i caratteri di escape non stampabili devono
  essere racchiusi da \[\033[ e \]. Per le sequenze di escape, devono
  anche essere seguiti da m minuscola.


  Se provate i prompt seguenti in un xterm e trovate che non vedete i
  colori menzionati, controllate nel file ~/.Xdefaults (e possibilmente
  gli altri con simile funzione) le linee come "XTerm*Foreground:
  BlanchedAlmond". Questo pu essere commentato mettendo un punto
  esclamativo ("!") davanti.  Ovviamente questo dipender anche da che
  emulatore di terminale state usando. Questo  il posto pi probabile
  in cui i colori del vostro terminale possono essere reimpostati.


  Per includere del testo blu nel prompt:



       PS1="\[\033[34m\][\$(date +%H%M)][\u@\h:\w]$ "




  Il problema con questo prompt  che il colore blu che inizia con il
  codice-colore 34 non viene mai cambiato nuovamente al normale colore,
  cos il testo digitato dopo il prompt  ancora nel colore del promot.
  Questa  una tonalit di blu scura, unendola con il codice bold
  (grassetto) potrebbe aiutare:



       PS1="\[\033[1;34m\][\$(date +%H%M)][\u@\h:\w]$\[\033[0m\] "





  Il prompt  ora blu chiaro e termina cambiando il colore nuovamente a
  nulla (quale che fosse il colore di primo piano che avevate prima)


  Questo sono i restanti valori dei colori:



       Nero           0;30     Grigio Scuro  1;30
       Blu            0;34     Blu Chiaro    1;34
       Verde          0;32     Verde Chiaro  1;32
       Ciano          0;36     Ciano Chiaro  1;36
       Rosso          0;31     Rosso Chiaro  1;31
       Viola          0;35     Viola Chiaro  1;35
       Marrone        0;33     Giallo        1;33
       Grigio Chiaro  0;37     Bianco        1;37



  Potete anche impostare i colori dello sfondo usando 44 per uno sfondo
  blu, 41 per uno sfondo rosso, ecc. Non ci sono colori dello sfondo in
  grassetto (bold). Possono essere usate delle combinazioni, come testo
  Rosso Chiaro su uno sfondo Blu: \[\033[44;1;31m\], sebbene impostare i
  colori separatamente sembra funzionare meglio (cio
  \[\033[44m\]\[\033[1;31m\]). Gli altri codici disponibili includono 4:
  Sottolineatura, 5: Lmpeggiante, 7: Negativo, e 8: Nascosto.


  In oltre: Molti (incluso me stesso) si oppongono fermamente
  all'attributo "blink". Fortunatamente, non funziona in ogni emulatore
  di terminale che conosco - ma funziona alla consolle. E, se vi state
  chiedento (come ho fatto io) "A cosa serve un attributo 'Nascosto'?!"
  - l'ho visto usato in un esempio di uno shell script (non un prompt)
  per permettere di digitare una password senza visualizzarla sullo
  schermo.


  Basato su un prompt chiamato "elite2" nel pacchetto Bashprompt (che ho
  modificato per funzionare meglio su una consolle standard, piuttosto
  che con i font speciali di xterm richiesti per vedere bene
  l'originale), questo  un prompt che ho usato molto:




       function elite
       {

       local GRAY="\[\033[1;30m\]"
       local LIGHT_GRAY="\[\033[0;37m\]"
       local CYAN="\[\033[0;36m\]"
       local LIGHT_CYAN="\[\033[1;36m\]"

       case $TERM in
           xterm*)
               local TITLEBAR='\[\033]0;\u@\h:\w\007\]'
               ;;
           *)
               local TITLEBAR=""
               ;;
       esac

       local GRAD1=$(tty|cut -d/ -f3)
       PS1="$TITLEBAR\
       $GRAY-$CYAN-$LIGHT_CYAN(\
       $CYAN\u$GRAY@$CYAN\h\
       $LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
       $CYAN\#$GRAY/$CYAN$GRAD1\
       $LIGHT_CYAN)$CYAN-$LIGHT_CYAN(\
       $CYAN\$(date +%H%M)$GRAY/$CYAN\$(date +%d-%b-%y)\
       $LIGHT_CYAN)$CYAN-$GRAY-\
       $LIGHT_GRAY\n\
       $GRAY-$CYAN-$LIGHT_CYAN(\
       $CYAN\$$GRAY:$CYAN\w\
       $LIGHT_CYAN)$CYAN-$GRAY-$LIGHT_GRAY "
       PS2="$LIGHT_CYAN-$CYAN-$GRAY-$LIGHT_GRAY "
       }





  Io definisco i colori come variabili temporanee della shell per
  leggibilit.  pi facile lavorarci. La variablie "GRAD1"  un
  controllo per determinare in che terminale ci si trova, come il
  controllo per determinare se ci si trova su un Xterm,  sufficiente
  farlo una sola volta. Il prompt che vedrete ha questo aspetto, ma a
  colori:



       --(giles@nikola)-(75/ttyp7)-(1908/12-Oct-98)--
       --($:~/tmp)--





  Per aiutarmi a ricordare quali colori sono disponibili, ho scritto lo
  script seguente che visualizza tutti i colori sullo schermo:



















































  ______________________________________________________________________
  #!/bin/bash
  #
  #   Questo file stampa molti codici-colore sul terminale per
  #   mostrare quali sono disponibili. Ogni linea e` un colore su sfondo
  #   nero o grigio, con il colore nel mezzo. E` verificato che funziona con
  #   sfondo bianco, nero e verde (2 dic 98).
  #
  echo "  On Light Gray:        On Black:"
  echo -e "\033[47m\033[1;37m  White        \033[0m\
   1;37m \
  \033[40m\033[1;37m  White        \033[0m"
  echo -e "\033[47m\033[37m  Light Gray   \033[0m\
     37m \
  \033[40m\033[37m  Light Gray   \033[0m"
  echo -e "\033[47m\033[1;30m  Gray         \033[0m\
   1;30m \
  \033[40m\033[1;30m  Gray         \033[0m"
  echo -e "\033[47m\033[30m  Black        \033[0m\
     30m \
  \033[40m\033[30m  Black        \033[0m"
  echo -e "\033[47m\033[31m  Red          \033[0m\
     31m \
  \033[40m\033[31m  Red          \033[0m"
  echo -e "\033[47m\033[1;31m  Light Red    \033[0m\
   1;31m \
  \033[40m\033[1;31m  Light Red    \033[0m"
  echo -e "\033[47m\033[32m  Green        \033[0m\
     32m \
  \033[40m\033[32m  Green        \033[0m"
  echo -e "\033[47m\033[1;32m  Light Green  \033[0m\
   1;32m \
  \033[40m\033[1;32m  Light Green  \033[0m"
  echo -e "\033[47m\033[33m  Brown        \033[0m\
     33m \
  \033[40m\033[33m  Brown        \033[0m"
  echo -e "\033[47m\033[1;33m  Yellow       \033[0m\
   1;33m \
  \033[40m\033[1;33m  Yellow       \033[0m"
  echo -e "\033[47m\033[34m  Blue         \033[0m\
     34m \
  \033[40m\033[34m  Blue         \033[0m"
  echo -e "\033[47m\033[1;34m  Light Blue   \033[0m\
   1;34m \
  \033[40m\033[1;34m  Light Blue   \033[0m"
  echo -e "\033[47m\033[35m  Purple       \033[0m\
     35m \
  \033[40m\033[35m  Purple       \033[0m"
  echo -e "\033[47m\033[1;35m  Pink         \033[0m\
   1;35m \
  \033[40m\033[1;35m  Pink         \033[0m"
  echo -e "\033[47m\033[36m  Cyan         \033[0m\
     36m \
  \033[40m\033[36m  Cyan         \033[0m"
  echo -e "\033[47m\033[1;36m  Light Cyan   \033[0m\
   1;36m \
  \033[40m\033[1;36m  Light Cyan   \033[0m"
  ______________________________________________________________________




  5.2.  Movimenti del Cursore

  Le sequenze di escape ANSI permettono di muovere il cursore a piacere
  sullo schermo. Questo  pi utile per interfacce utente a tutto
  schermo generate da shell script, ma possono essere usate anche nei
  prompt. Le sequenze di escape di movimento sono le seguenti:



       - Posizione del cursore:
         \033[<L>;<C>H
         mette il cursore alla linea L e colonna C.
       - Muove il cursore su N linee:
         \033[<N>A
       - Muove il cursore gi N linee:
         \033[<N>B
       - Muove il cursore avanti N colonne:
         \033[<N>C
       - Muove il cursore indietro N colonne:
         \033[<N>D

       - Salva la posizione del cursore:
         \033[s
       - Ripristina la posizione del cursore:
         \033[u





  Gli ultimi due codici NON SONO supportati da molti emulatori di
  terminale. Gli unici che so che lo fanno sono xterm e nxterm - anche
  se la maggior parte degli emulatori di terminale sono basati sul
  codice di xterm. Da quanto ho potuto vedere rxvt, kvt, xiterm, e Eterm
  non li supportano. Sono supportati alla consolle.


  Provate a digitare le seguenti linee di codice al prompt (cosa fa  un
  po' pi chiaro se il prompt  alcune linee gi nel terminale quando lo
  digitate): echo -en "\033[7A\033[1;35m BASH \033[7B\033[6D". Questo
  dovrebbe muovere il cursore sette linee su per lo schermo, stampare la
  parola " BASH ", e poi tornare dov'era per produrre un normale prompt.
  Questo non  un prompt:  solo una dimostrazione di come muovere il
  cursore sullo schermo, usando il colore per evidenziare quanto viene
  fatto.


  Salvate questo in un file chiamato "clock":






















  ______________________________________________________________________
  #!/bin/bash

  function prompt_command {
  let prompt_x=$COLUMNS-5
  }

  PROMPT_COMMAND=prompt_command

  function clock {
  local       BLUE="\[\033[0;34m\]"
  local        RED="\[\033[0;31m\]"
  local  LIGHT_RED="\[\033[1;31m\]"
  local      WHITE="\[\033[1;37m\]"
  local  NO_COLOUR="\[\033[0m\]"
  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

  PS1="${TITLEBAR}\
  \[\033[s\033[1;\$(echo -n \${prompt_x})H\]\
  $BLUE[$LIGHT_RED\$(date +%H%M)$BLUE]\[\033[u\033[1A\]
  $BLUE[$LIGHT_RED\u@\h:\w$BLUE]\
  $WHITE\$$NO_COLOUR "
  PS2='> '
  PS4='+ '
  }
  ______________________________________________________________________





  Questo prompt  piuttosto semplice, ma tiene un orologio nell'angolo
  in alto a destra del terminale (anche se il terminale viene
  ridimensionato). Questo NON funzioner negli emulatori di terminale
  che, come ho menzionato, non accettano i codici per salvare e
  ripristiare la posizione del cursore. Se provate ad usare questo
  prompt in uno di quegli emulatori di terminale, l'orologio apparir
  correttamente, ma il prompt verr intrappolato nella seconda linea del
  terminale.



  Vedi anche ``Il Prompt Orologio Inutile ed Elegante'' per un uso pi
  esteso di questi codici.


  5.3.  Muovere il Cursore Con tput

  Come molte cose in Unix, c' pi di un modo per raggiungere gli stessi
  fini. Una utility chiamata "tput" pu essere usata anche per spostare
  il cursore sullo schermo, o per ottenere informazioni sullo stato di
  un terminale. "tput", per posizionare il cursore,  meno flessibile
  delle sequenze di escape ANSI: si pu muovere il cursore solo ad una
  posizione assoluta, non si pu relativamente alla sua posizione
  corrente. Non uso "tput", quindi non intendo spiegarlo in dettaglio.
  Digitate "man tput" e ne saprete quanto me.



  6.  Caratteri Speciali: Sequenze di Escape Ottali

  Oltre i caratteri che si digitano sulla tastiera, ci sono molti altri
  caratteri che possono essere stampati sullo schermo. Ho creato uno
  script per permettervi di controllare cosa mette a disposizione il
  font che state usando. Il comando principale che avrete bisogno di
  usare  per utilizzare questi caratteri  "echo -e". L'opzione "-e"
  dice ad echo di abilitare l'interpretazione dei caratteri protetti con
  backslash. Cosa si vede quando guardate 200-400 ottale  molto diverso
  con un font VGA da quello che si vede con un font Linux standard.
  Siate avvisati che queste sequenze di escape hanno effetti strani sul
  terminale, e non ho tentato di prevenire che facciano quello che
  fanno. I caratteri linedraw e block (ai quali molti di noi sono
  diventati familiari con Word Perfect) e che sono usati molto dal
  progetto Bashprompt, sono fra 260 e 337 ottale.



















































  ______________________________________________________________________
  #!/bin/bash

  #   Script: escgen

  function usage {
     echo -e "\033[1;34mescgen\033[0m <lower_octal_value> [<higher_octal_value>]"
     echo "   Octal escape sequence generator: print all octal escape sequences"
     echo "   between the lower value and the upper value.  If a second value"
     echo "   isn't supplied, print eight characters."
     echo "   1998 - Giles Orr, no warranty."
     exit 1
  }

  if [ "$#" -eq "0" ]
  then
     echo -e "\033[1;31mPlease supply one or two values.\033[0m"
     usage
  fi
  let lower_val=${1}
  if [ "$#" -eq "1" ]
  then
     #   If they don't supply a closing value, give them eight characters.
     upper_val=$(echo -e "obase=8 \n ibase=8 \n $lower_val+10 \n quit" | bc)
  else
     let upper_val=${2}
  fi
  if [ "$#" -gt "2" ]
  then
     echo -e "\033[1;31mPlease supply two values.\033[0m"
     echo
     usage
  fi
  if [ "${lower_val}" -gt "${upper_val}" ]
  then
     echo -e "\033[1;31m${lower_val} is larger than ${upper_val}."
     echo
     usage
  fi
  if [ "${upper_val}" -gt "777" ]
     then
     echo -e "\033[1;31mValues cannot exceed 777.\033[0m"
     echo
     usage
  fi

  let i=$lower_val
  let line_count=1
  let limit=$upper_val
  while [ "$i" -lt "$limit" ]
  do
     octal_escape="\\$i"
     echo -en "$i:'$octal_escape' "
     if [ "$line_count" -gt "7" ]
     then
        echo
        #   Put a hard return in.
        let line_count=0
     fi
     let i=$(echo -e "obase=8 \n ibase=8 \n $i+1 \n quit" | bc)
     let line_count=$line_count+1
  done
  echo
  ______________________________________________________________________


  Potete anche usare xfd per mostrare tutti i caratteri un un font X,
  con il comando "xfd -fn <fontname>". Facendo clic su un carattere
  vengono date molte informazioni circa quel catattere, incluso il suo
  valore ottale. Lo script dato sopra sar utile alla consolle e se non
  siete sicuri del nome del font corrente.


  7.  Il Pacchetto Bash Prompt

  7.1.  Disponibilit

  Il pacchetto Bash Prompt  disponibile qui http://bash.current.nu, ed
   il lavoro di molte persone, coordinate da Rob Current (aka
  BadLandZ). Il pacchetto  in versione beta, ma offre una maniera
  semplice di usare prompt multipli (o temi), permette di impostare il
  prompt per shell di login e per sottoshell (cio mettere stringhe PS1
  in (~/.bash_profile e ~/.bashrc). La maggior parte dei temi usano i
  set di caratteri estesi VGA, quindi hanno un brutto aspetto a meno che
  siano usati con font VGA (che non sono presenti su molti sistemi).


  7.2.  Cambiare il Font di Xterm

  Per usare alcuni dei prompt pi attraenti nel pacchetto Bash Prompt,
  dovete prendere e installare installare i font che supportano il set
  di caratteri richiesto dai prompt. Ci si riferise ad essi come "Font
  VGA", ma non mi  chiara la distinzione fra essi e i font gi
  distribuiti presenti con Linux - sebbene chiaramente supportano set di
  caratteri differenti. I font per Xterm standard supportano un alfabeto
  esteso, inclusi molti caratteri accentati. Nei font VGA, questo
  materiale viene rimpiazzato da caratteri grafici - blocchi, punti,
  linee. Se qualcuno pu spiegare questo pi in dettaglio mi mandi un e-
  mail e includer qui una spiegazione.


  Ottenere e installare questi font  un processo un po' contorto.
  Prima, recuperate i/il font. Poi, assicuratevi che siano file .pcf o
  .pcf.gz. Se sono file .bdf, informatevi sul comando "bdftopcf" (cio
  leggete la man page). Mettete i file .pcf o .pcf.gz nella directory
  /usr/X11R6/lib/X11/fonts/misc (questa  la directory corretta per
  RedHat 5.1 e Slackware 3.4, potrebbe essere differente su altre
  distribuzioni). Fate "cd" su quella directory ed eseguite il comando
  "mkfontdir". Quindi eseguite "xset fp rehash". A volte  una buona
  idea andare nel file fonts.alias nella stessa directory e creare dei
  nomi alternativi pi corti per i font.


  Per usare i nuovi font, lanciate l'Xterm che pi vi piace con
  l'opzione appropriata, che pu essere trovata nella man page o usando
  il parametro "--help" alla linea di comando. Alcuni Xterm comuni
  dovrebbero essere usati come segue:



       xterm -font <fontname>


       OPPURE

       xterm -fn <fontname> -fb <fontname-bold>
       Eterm -f <fontname>
       rxvt -fn <fontname>




  I font VGA sono disponibili alla Stumpy's ANSI Fonts su
  http://home.earthlink.net/~us5zahns/enl/ansifont.html (da cui ho preso
  in prestito molto nello scrivere questo documento).




  8.  Caricare un Prompt Differente

  8.1.  Caricare un Prompt Differente, Pi Tardi

  Le spiegazione in questo HOWTO hanno mostrato come creare variabili di
  ambiente PS1, oppure come incorporare quelle stringhe PS1 e PS2 in
  funzioni che potrebbero essere create da ~/.bashrc o come un tema dal
  pacchetto bashprompt.


  Usando il pachetto bashprompt, si deve digitare bashprompt -i per
  vedere una lista dei prompt disponibili. Per impostare il prompt in
  shell di login future (principalmente la consolle, ma anche telnet e
  Xterm, dipende da come sono configurati i vostri Xterm), si deve
  digitare bashprompt -l nometema. bashprompt quindi modifica il vostro
  ~/.bash_profile per chiamare il tema richiesto alla partenza.  Per
  impostare il prompt in future sottoshell (solitamente Xterm, rxvt,
  ecc.), si deve digitare bashprompt -s nometema, e bashprompt modifica
  il vostro file ~/.bashrc per chiamare il tema richiesto alla partenza.


  8.2.  Caricare un Prompt Differente, Immediatamente

  Potete cambiare il prompt nel terminale corrente (usando la funzione
  esempio "elite" di cui sopra) digitando source elite seguito da elite
  (assumendo che il file funzione elite sia nella directory corrente).
  Questo  un po' poco pratico e vi lascia con un'altra funzione (elite)
  nel vostro spazio ambiente - se volete ripulire l'ambiente, dovreste
  digitare anche unset elite. Questo sembrerebbe un candidato ideale per
  un piccolo shell script, ma uno script in questo caso non funziona
  perch lo script non pu modificare l'ambiente della shell corrente:
  pu solo cambiare l'abiente della sottoshell in cui gira. Come lo
  script termina, la sottoshell sparisce e cos i cambiamente fatti
  all'ambiente. Cosa pu cambiare le variabili d'ambiente della shell
  corrente sono le funzioni d'ambiente.  Il pacchetto bashprompt mette
  una funzione chiamato "callbashprompt" nell'ambiente e, sebbene non
  sia documentata, pu essere chiamata per caricare al volo qualsiasi
  tema bashprompt. Guarda nella directory dei temi che ha installato (il
  tema che chiamate deve essere l), interpreta la funzione richiesta,
  carica la funzione e poi elimina la funzione, mantenendo wuindi
  l'ambiente in ordine. "callbashprompt" non  pensata per essere usata
  cos e non controlla eventuali errori, ma tenendo questo a mente,
  funziona piuttosto bene.


  9.  Caricare il Colori del Prompt Dinamicamente

  9.1.  Un esempio che dimostra il concetto

  Questa  una dimostrazione del concetto piuttosto che un prompt
  attraente: cambiare i colori all'interno di un prompt dinamicamente.
  In questo esempio, il colore dell'hostname cambia in funzione del
  carico (come un avvertimento).






  #!/bin/bash
  #   "hostloadcolour" - 17 ottobre 98, Giles
  #
  #   Qui l'idea e` di cambiare il colore dell'hostname nel prompt, a
  #   seconda del valore del carico.

  # THRESHOLD_LOAD e` il valore del carico per un minuto (moltiplicato
  # per cento) al quale volete che il prompt cambi da COLOUR_LOW a
  # COLOUR_HIGH

  THRESHOLD_LOAD=200
  COLOUR_LOW='1;34'
            # blu chiaro
  COLOUR_HIGH='1;31'
            # rosso chiaro

  function prompt_command {
  ONE=$(uptime | sed -e "s/.*load average: \(.*\...\), \(.*\...\), \(.*\...\)/\1/" -e "s/ //g")
  #   A quanto pare, "scale" in bc non funziona con la moltiplicazione,
  #   ma funziona con la divisionone.
  ONEHUNDRED=$(echo -e "scale=0 \n $ONE/0.01 \nquit \n" | bc)
  if [ $ONEHUNDRED -gt $THRESHOLD_LOAD ]
  then
      HOST_COLOUR=$COLOUR_HIGH
          # rosso chiaro
  else
      HOST_COLOUR=$COLOUR_LOW
          # blu chiaro
  fi
  }

  function hostloadcolour {

  PROMPT_COMMAND=prompt_command
  PS1="[$(date +%H%M)][\u@\[\033[\$(echo -n \$HOST_COLOUR)m\]\h\[\033[0;37m\]:\w]$ "
  }





  Usando il vostro editor preferito, salvate queso in un file chiamato
  "hostloadcolour". Se avete il pacchetto Bashprompt installato, Questo
  funzioner come un tema. Se no, digitate source hostloadcolour e poi
  hostloadcolour. In entrambi i modi, "prompt_command" diventa una
  funzione nel vostro ambiente. Se esaminate il codice, noterete che i
  colori ($COLOUR_HIGH e $COLOUR_LOW) sono impostati usanto solo un
  codice del colore parziale, cio "1;34" invece di "\[\033[1;34m\]",
  che avrei preferito. Non sono stato in grado di farlo funzionare con
  il codice completo. Siete pregati di farmi sapere se doveste
  riuscirvi.



  10.  Prompt di Esempio

  10.1.  Un Prompt "Leggero"









  function proml {
  local BLUE="\[\033[0;34m\]"
  local RED="\[\033[0;31m\]"
  local LIGHT_RED="\[\033[1;31m\]"
  local WHITE="\[\033[1;37m\]"
  local LIGHT_GRAY="\[\033[0;37m\]"
  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

  PS1="${TITLEBAR}\
  $BLUE[$RED\$(date +%H%M)$BLUE]\
  $BLUE[$LIGHT_RED\u@\h:\w$BLUE]\
  $WHITE\$$LIGHT_GRAY "
  PS2='> '
  PS4='+ '
  }





  10.2.  Elite dai Temi Bashprompt

  Si noti che questo necessita di un font VGA.




       # Creato da KrON da windowmaker su IRC
       # Cambiato da Spidey 08/06
       function elite {
       PS1="\[\033[31m\]\332\304\[\033[34m\](\[\033[31m\]\u\[\033[34m\]@\[\033[31m\]\h\
       \[\033[34m\])\[\033[31m\]-\[\033[34m\](\[\033[31m\]\$(date +%I:%M%P)\
       \[\033[34m\]-:-\[\033[31m\]\$(date +%m)\[\033[34m\033[31m\]/\$(date +%d)\
       \[\033[34m\])\[\033[31m\]\304-\[\033[34m]\\371\[\033[31m\]-\371\371\
       \[\033[34m\]\372\n\[\033[31m\]\300\304\[\033[34m\](\[\033[31m\]\W\[\033[34m\])\
       \[\033[31m\]\304\371\[\033[34m\]\372\[\033[00m\]"
       PS2="> "
       }





  10.3.  Un Prompt per il "Power User"

  Io in realt uso questo prompt, ma si ottengono notevoli ritardi
  quando il prompt appare su una macchina monoutente PII-400, quindi non
  raccomando di usarlo su un P-100 multiutente o altro... Guardatelo per
  cercare idee, piuttosto che per usarlo in pratica.










  ______________________________________________________________________

  #!/bin/bash
  #----------------------------------------------------------------------
  #       POWER USER PROMPT "pprom2"
  #----------------------------------------------------------------------
  #
  #   Creato nell'agosto 98, Ultima Modifica 9 novembre 98 da Giles
  #
  #   Problema: quando load va giu', dice "1.35down-.08", eliminare il
  #   segno negativo


  function prompt_command
  {
  #   Crea la variabile TotalMeg: somma delle dimensioni dei file
  #   visibile nella directory corrente
  local TotalBytes=0
  for Bytes in $(ls -l | grep "^-" | cut -c30-41)
  do
      let TotalBytes=$TotalBytes+$Bytes
  done
  TotalMeg=$(echo -e "scale=3 \nx=$TotalBytes/1048576\n if (x<1) {print \"0\"} \n print x \nquit" | bc)

  #      Questo viene usato per calcolare il differenziale del valore
  #      del carico fornito dal comando "uptime". "uptime" fornisce medie di
  #      carico per 1, 5 r 15 minuti.
  #
  local one=$(uptime | sed -e "s/.*load average: \(.*\...\), \(.*\...\), \(.*\...\)/\1/" -e "s/ //g")
  local five=$(uptime | sed -e "s/.*load average: \(.*\...\), \(.*\...\), \(.*\...\).*/\2/" -e "s/ //g")
  local diff1_5=$(echo -e "scale = scale ($one) \nx=$one - $five\n if (x>0) {print \"up\"} else {print \"down\"}\n print x \nquit \n" | bc)
  loaddiff="$(echo -n "${one}${diff1_5}")"

  #   Conta file visibili:
  let files=$(ls -l | grep "^-" | wc -l | tr -d " ")
  let hiddenfiles=$(ls -l -d .* | grep "^-" | wc -l | tr -d " ")
  let executables=$(ls -l | grep ^-..x | wc -l | tr -d " ")
  let directories=$(ls -l | grep "^d" | wc -l | tr -d " ")
  let hiddendirectories=$(ls -l -d .* | grep "^d" | wc -l | tr -d " ")-2
  let linktemp=$(ls -l | grep "^l" | wc -l | tr -d " ")
  if [ "$linktemp" -eq "0" ]
  then
      links=""
  else
      links=" ${linktemp}l"
  fi
  unset linktemp
  let devicetemp=$(ls -l | grep "^[bc]" | wc -l | tr -d " ")
  if [ "$devicetemp" -eq "0" ]
  then
      devices=""
  else
      devices=" ${devicetemp}bc"
  fi
  unset devicetemp

  }

  PROMPT_COMMAND=prompt_command

  function pprom2 {

  local        BLUE="\[\033[0;34m\]"
  local  LIGHT_GRAY="\[\033[0;37m\]"
  local LIGHT_GREEN="\[\033[1;32m\]"
  local  LIGHT_BLUE="\[\033[1;34m\]"
  local  LIGHT_CYAN="\[\033[1;36m\]"
  local      YELLOW="\[\033[1;33m\]"
  local       WHITE="\[\033[1;37m\]"
  local         RED="\[\033[0;31m\]"
  local   NO_COLOUR="\[\033[0m\]"

  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

  PS1="$TITLEBAR\
  $BLUE[$RED\$(date +%H%M)$BLUE]\
  $BLUE[$RED\u@\h$BLUE]\
  $BLUE[\
  $LIGHT_GRAY\${files}.\${hiddenfiles}-\
  $LIGHT_GREEN\${executables}x \
  $LIGHT_GRAY(\${TotalMeg}Mb) \
  $LIGHT_BLUE\${directories}.\
  \${hiddendirectories}d\
  $LIGHT_CYAN\${links}\
  $YELLOW\${devices}\
  $BLUE]\
  $BLUE[${WHITE}\${loaddiff}$BLUE]\
  $BLUE[\
  $WHITE\$(ps ax | wc -l | sed -e \"s: ::g\")proc\
  $BLUE]\
  \n\
  $BLUE[$RED\$PWD$BLUE]\
  $WHITE\$\
  \
  $NO_COLOUR "
  PS2='> '
  PS4='+ '
  }
  ______________________________________________________________________




  10.4.  Un Prompt Largo Quanto il Terminale

  Un amico si  lamentato perch non gli piaceva che il prompt cambiasse
  continuamente di dimensione perch c'era $PWD all'interno, cos ho
  scritto questo prompt che adatta la sua dimensione all'esatta
  larghezza dal terminale.
















  ______________________________________________________________________

  #!/bin/bash

  #   termwide prompt
  #      Giles - creato il 2 novembre 98
  #
  #   Qui l'idea e` di avere la linea superiore di questo prompt di due
  #   linee sempre della larghezza del terminale. Questo viene fatto
  #   calcolando la larghezza degli elementi di testo e riempendo come
  #   appropriato o troncando a destra $PWD.
  #

  function prompt_command {

  TERMWIDTH=${COLUMNS}

  #   Calcola la larghezza del prompt:

  hostnam=$(echo -n $HOSTNAME | sed -e "s/[\.].*//")
  #   "whoami" e "pwd" includono un carattere "carriage return" finale
  usernam=$(whoami)
  let usersize=$(echo -n $usernam | wc -c | tr -d " ")
  newPWD="${PWD}"
  let pwdsize=$(echo -n ${newPWD} | wc -c | tr -d " ")
  #   Aggiunge tutti gli accessori sotto ...
  let promptsize=$(echo -n "--(${usernam}@${hostnam})---(${PWD})--" \
                   | wc -c | tr -d " ")
  let fillsize=${TERMWIDTH}-${promptsize}
  fill=""
  while [ "$fillsize" -gt "0" ]
  do
     fill="${fill}-"
     let fillsize=${fillsize}-1
  done

  if [ "$fillsize" -lt "0" ]
  then
     let cut=3-${fillsize}
     sedvar=""
     while [ "$cut" -gt "0" ]
     do
        sedvar="${sedvar}."
        let cut=${cut}-1
     done
     newPWD="...$(echo -n $PWD | sed -e "s/\(^${sedvar}\)\(.*\)/\2/")"
  fi
  }

  PROMPT_COMMAND=prompt_command

  function termwide {

  local GRAY="\[\033[1;30m\]"
  local LIGHT_GRAY="\[\033[0;37m\]"
  local WHITE="\[\033[1;37m\]"
  local NO_COLOUR="\[\033[0m\]"

  local LIGHT_BLUE="\[\033[1;34m\]"
  local YELLOW="\[\033[1;33m\]"

  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

  PS1="$TITLEBAR\
  $YELLOW-$LIGHT_BLUE-(\
  $YELLOW\${usernam}$LIGHT_BLUE@$YELLOW\${hostnam}\
  ${LIGHT_BLUE})-${YELLOW}-\${fill}${LIGHT_BLUE}-(\
  $YELLOW\${newPWD}\
  $LIGHT_BLUE)-$YELLOW-\
  \n\
  $YELLOW-$LIGHT_BLUE-(\
  $YELLOW\$(date +%H%M)$LIGHT_BLUE:$YELLOW\$(date \"+%a,%d %b %y\")\
  $LIGHT_BLUE:$WHITE\$$LIGHT_BLUE)-\
  $YELLOW-\
  $NO_COLOUR "

  PS2="$LIGHT_BLUE-$YELLOW-$YELLOW-$NO_COLOUR "

  }
  ______________________________________________________________________




  10.5.  Il Prompt Orologio Inutile ed Elegante

  Questo  probabilmente il pi attraente (e inutile) prompt che abbia
  mai creato. Poich gli emulatori di terminale non implementano il
  salvataggio e ripristino della posizione del cursore, l'alternativa
  per mettere un orologio nell'angolo in alto a destra e di ancorare il
  prompt nella parte inferiore del terminale. Questo deriva dall'idea
  del prompt ampio quanto il terminale di cui sopra, disegnando una
  linea nella parte destra dello schermo dal prompt all'orologio. 
  richiesto un font VGA.


  Nota: qui c' una sostituzione strana, che potrebbe non venir stampata
  correttamente quando viene convertita da SGML ad altri formati: ho
  dovuto sostituire il carattere screen con \304 - normalmente avrei
  introdotto solo la sequenza "\304", ma in questo caso era necessario
  per fare questa sostituzione.
























  ______________________________________________________________________

  #!/bin/bash

  #   Questo prompt richiede i font VGA. Il prompt e` ancorato in basso
  #   al terminale, riempie la larghezza del terminale e disegna una linea
  #   sul lato destro del terminale per collegarsi all'orologio
  #   nell'angolo in alto a destra del terminale.

  function prompt_command {
  #   Calcola la larghezza del prompt:
  hostnam=$(echo -n $HOSTNAME | sed -e "s/[\.].*//")
  #   "whoami" e "pwd" includono il carattere "carriage return" finale
  usernam=$(whoami)
  newPWD="${PWD}"
  #   Aggiunge tutti gli accessori sotto ...
  let promptsize=$(echo -n "--(${usernam}@${hostnam})---(${PWD})-----" \
                   | wc -c | tr -d " ")
  #   Trova quanto aggiungere fra user@host e PWD (o quanto rimuovere
  #   da PWD)
  let fillsize=${COLUMNS}-${promptsize}
  fill=""
  #   Riempie la linea se il prompt non e` largo quanto il terminale:
  while [ "$fillsize" -gt "0" ]
  do
     fill="${fill}"
     # La A con la dieresi (apparira` come una lunga linea se state
     # usando un font VGA) e` \304, ma l'ho "tagliata" e poi "incollata"
     # perche' Bash farebbe solo una sostituzione - che in questo caso e`
     # mettere $fill nel prompt.
     let fillsize=${fillsize}-1
  done
  #   Tronca a destra PWD se il prompt e` piu` largo del terminale:
  if [ "$fillsize" -lt "0" ]
  then
     let cutt=3-${fillsize}
     sedvar=""
     while [ "$cutt" -gt "0" ]
     do
        sedvar="${sedvar}."
        let cutt=${cutt}-1
     done
     newPWD="...$(echo -n $PWD | sed -e "s/\(^${sedvar}\)\(.*\)/\2/")"
  fi
  #
  #   Crea l'orologio e la barra lungo il lato destro del terminale
  #
  local LIGHT_BLUE="\033[1;34m"
  local     YELLOW="\033[1;33m"
  #   Posiziona il cursore per stampare l'orologio:
  echo -en "\033[2;$((${COLUMNS}-9))H"
  echo -en "$LIGHT_BLUE($YELLOW$(date +%H%M)$LIGHT_BLUE)\304$YELLOW\304\304\277"
  local i=${LINES}
  echo -en "\033[2;${COLUMNS}H"
  #   Stampa linee verticali lungo il lato del terminale:
  while [ $i -ge 4 ]
  do
     echo -en "\033[$(($i-1));${COLUMNS}H\263"
     let i=$i-1
  done

  let prompt_line=${LINES}-1
  #   Questo e` necessario perche' facendo \${LINES} all'interno di una
  #   espressione matematica Bash (come $(())) sembra non funzionare.
  }

  PROMPT_COMMAND=prompt_command

  function clock3 {
  local LIGHT_BLUE="\[\033[1;34m\]"
  local     YELLOW="\[\033[1;33m\]"
  local      WHITE="\[\033[1;37m\]"
  local LIGHT_GRAY="\[\033[0;37m\]"
  local  NO_COLOUR="\[\033[0m\]"

  case $TERM in
      xterm*)
          TITLEBAR='\[\033]0;\u@\h:\w\007\]'
          ;;
      *)
          TITLEBAR=""
          ;;
  esac

  PS1="$TITLEBAR\
  \[\033[\${prompt_line};0H\]
  $YELLOW\332$LIGHT_BLUE\304(\
  $YELLOW\${usernam}$LIGHT_BLUE@$YELLOW\${hostnam}\
  ${LIGHT_BLUE})\304${YELLOW}\304\${fill}${LIGHT_BLUE}\304(\
  $YELLOW\${newPWD}\
  $LIGHT_BLUE)\304$YELLOW\304\304\304\331\
  \n\
  $YELLOW\300$LIGHT_BLUE\304(\
  $YELLOW\$(date \"+%a,%d %b %y\")\
  $LIGHT_BLUE:$WHITE\$$LIGHT_BLUE)\304\
  $YELLOW\304\
  $LIGHT_GRAY "

  PS2="$LIGHT_BLUE\304$YELLOW\304$YELLOW\304$NO_COLOUR "

  }
  ______________________________________________________________________






























  Linux Benchmarking HOWTO
  di Andr D. Balsa, andrewbalsa@usa.net
  v0.12, 15 agosto 1997

  Il Linux Benchmarking HOWTO discute alcune questioni relative al
  benchmarking ("misura delle prestazioni") di sistemi Linux e presenta
  un semplice strumento di benchmarking ed un modulo a questo associato
  che consente di fornire informazioni significative per il benchmarking
  in un paio d'ore. Probabilmente aiuter anche a diminuire la quantit
  di articoli inutili in comp.os.linux.hardware ...  Traduzione di Gian
  luca Pecoraro (atahualpa@altavista.net).

  1.  Introduzione


  "What we cannot speak about we must pass over in silence."

       Ludwig Wittgenstein (1889-1951), filosofo austriaco


  Benchmarking significa misurare la velocit con la quale un computer
  esegue un processo, in una maniera tale da consentire il confronto tra
  differenti combinazioni di hardware e software.  Ci non include la
  facilit, l'estetica, considerazioni ergonomiche o qualsiasi altro
  giudizio soggettivo.

  Il Benchmarking  un processo tedioso e ripetitivo e necessita
  dell'attenzione ai dettagli. Molto spesso i risultati non sono quelli
  che ci si aspettava, e sono soggetto di interpretazione (che
  attualmente pu essere la parte pi importante di una procedura di
  benchmarking).

  Infine il benchmarking implica fatti e dati, non opinioni e
  approssimazioni.


  1.1.  Perch il benchmarking  cos importante?


  Oltre alle ragioni spiegate nel BogoMips Mini-HOWTO (sezione 7,
  paragrafo 2), ci si trova a volte a confrontarsi con un budget
  limitato e un minimo di prestazioni richieste per il suo sistema
  Linux. In altre parole, quando ci si pongono le seguenti domande:

    Come massimizzo le prestazioni per un dato budget?

    Come riduco i costi per un dato livello minimo di prestazioni?

    Come ottengo il miglior rapporto prezzo/prestazioni (entro un dato
     budget o una data richiesta di prestazioni?)

  Si dovr esaminare, confrontare e/o produrre benchmark. Minimizzare i
  costi senza un tetto minimo di prestazioni richiesto di solito implica
  il mettere assieme una macchina con rimasugli (quel vecchio 386SX-16
  che sta da qualche parte nel garage andr bene) e non richiede
  benchmark, e massimizzare le prestazioni senza un limite di costi non
   una situazione realistica (a meno che non si voglia mettere un
  sistema Cray nel proprio soggiorno - gli alimentatori rivestiti in
  pelle attorno sembrerebbero simpatici, no?)

  Il benchmarking di per se  senza senso, una perdita di tempo e soldi;
  ha solo senso quando  parte di un processo di decisione, p.es. se si
  deve fare una scelta tra due o pi alternative.

  Di solito un altro parametro nel processo di decisione  il costo, ma
  potrebbe anche essere la disponibilit, il servizio, la compatibilit,
  decisioni strategiche o altre caratteristiche misurabili e razionali
  di un computer. Quando si confrontano, p.es. le prestazioni di
  differenti versioni del kernel di linux, la stabilit  quasi sempre
  pi importante della velocit.


  1.2.  Considerazioni non valide per il benchmarking


  Spesso si leggono nei newsgroup e nelle mailing list, sfortunatamente:

  1. Reputazione del costruttore (non misurabile e senza senso).

  2. Quote di mercato del costruttore (senza senso e irrilevanti).

  3. Parametri irrazionali (p.es. la superstizione o il pregiudizio:
     compreresti un processore etichettato 171717ZAP e colorato di
     rosa?)

  4. Valori percepiti (senza senso, non misurabili e irrazionali).

  5. Presenza di una forte campagna pubblicitaria: questo  uno dei
     peggiori, penso. Io personalmente sono cresciuto con i logo "XXX
     inside" o "kkkkkws compatibile" (ora "aaaaaPowered  entrato a far
     parte della truppa - chi sar il prossimo ?). A mio modesto avviso,
     i miliardi di dollari spesi in queste campagne sarebbero meglio
     utilizzati dai team di ricerca nel progetto di processori nuovi,
     pi veloci, (economici :-) senza-bug . Nessuna massiccia campagna
     pubblicitaria potr rimuovere un bug nel coprocessore in virgola
     mobile di un nuovo processore che hai appena montato sulla tua
     scheda madre, ma il cambio con un processore riprogettato lo
     farebbe.

  6. Le opinioni del tipo "Tu hai per quello che paghi" sono solo
     quello: opinioni. Fornite i fatti per favore.


  2.  Procedure di benchmarking e interpretazione dei risultati



  Qualche raccomandazione semi-ovvia

  1. Prima di tutto, identificare i propri obiettivi nel benchmarking.
     Cosa si sta esattamente tentando di testare? In che modo il
     processo di benchmarking ci aiuter nel prendere una decisione?
     Quanto tempo e risorse si  intenzionati ad impiegare nei propri
     sforzi di benchmarking?

  2. Usare strumenti standard. Usare una versione recente ma stabile del
     kernel, le attuali gcc e libc ed un banco di test standard. In
     breve usare l'LBT (vedere pi avanti)

  3. Dare una completa descrizione del setup (vedere il modulo LBT pi
     avanti).

  4. Provare a isolare una singola variabile. Il Benchmark comparativo 
     pi informativo del benchmark "assoluto".  Non lo ripeter mai
     abbastanza.

  5. Verificare i propri risultati. Fare i propri benchmark pi di una
     volta e verificare le variazioni nei risultati, se ce ne sono.
     Variazioni inspiegate invalideranno i risultati.

  6. Se si pensa che i propri sforzi nel benchmarking produrrano
     informazioni utili, condividerle con la comunit Linux in una
     maniera precisa e concisa.

  7. Per favore ci si dimentichi dei BogoMips. Mi sono ripromesso di
     implementare un giorno un ASIC davvero veloce con il ciclo dei
     BogoMips dentro. Poi vedremo quello che vedremo!



  2.1.  Capire le scelte di benchmarking


  2.1.1.  Benchmark sintetici contro applicazioni


  Prima di spendere un bel po' di tempo nei processi di benchmarking va
  fatta una scelta di base fra benchmark "sintetici" e "applicazioni"
  benchmark.

  I benchmark sintetici sono spesso progettati per misurare le
  performance di una singola componente di un sistema, di solito
  impiegando questa componente alla sua massima capacit. Un esempio ben
  conosciuto di benchmark sintetico  la Whetstone suite,
  originariamente programmata nel 1972 da Harold Curnow in FORTRAN (o
  era ALGOL?) e ancora largamente usata ai giorni nostri. La suite
  Whetstone misurer le prestazioni dell'unit in virgola mobile di una
  CPU.

  La maggiore critica che pu essere fatta ai benchmark sintetici,  che
  non rappresentano le prestazioni di un sistema nelle situazioni della
  vita reale. Prendiamo ad esempio la suite Whetstone: il ciclo
  principale  molto corto e entrer facilmente nella cache primaria di
  una CPU, tenendo la pipeline dell'unit in virgola mobile
  costantemente riempita in modo tale da esercitare l'FPU alla sua
  massima velocit. Non possiamo davvero criticare la Whetstone suite se
  ricordiamo che  stata programmata pi di 25 anni fa (e le date della
  progettazione risalgono ancora a prima!), ma noi dobbiamo essere
  sicuri di interpretare i suoi risultati con attenzione, quando ci
  troviamo a testare un moderno microprocessore.

  Un altro punto molto importante circa i benchmark sintetici  che, in
  teoria, loro ci possono dire qualcosa rispetto ad uno specifico
  aspetto del sistema che stiamo provando, indipendentemente da tutti
  gli altri aspetti: un benchmark sintetico per il troughtput di una
  scheda Ethernet pu avere lo stesso o similare risultato che esso sia
  effettuato su un 386SX-16 con 4MB di Ram o su un Pentium 200 MMX con
  64 MB di RAM. Altrimenti, un test potrebbe misurare le prestazioni
  generali della combinazione di CPU/Scheda Madre/Bus/Scheda
  Ethernet/Sottosistema di memoria/DMA: non molto utile dato che il
  cambio del microprocessore causerebbe un impatto molto pi grande
  rispetto al cambio della scheda di rete Ethernet (questo, ovviamente,
  prendendo per scontato che stiamo usando la stessa combinazione di
  kernel e driver, cosa che potrebbe causare una variazione ancora pi
  grande)!

  Infine uno degli errori pi comuni  fare la media di alcuni benchmark
  sintetici e affermare che quella media  una buona rappresentazione
  della vita reale per ogni dato sistema.

  Questo  un commento dei benchmark sull'unit in virgola mobile
  riproposto con il permesso del sito web della Cyrix Corp.:


       "Una unit in virgola mobile (FPU) accelera il software pro
       gettato per usare il calcolo matematico in virgola mobile:
       tipicamente programmi CAD, fogli elettronici, giochi 3D e
       applicazioni di disegno. Fatto sta, che oggi molte tra le
  pi popolari applicazioni per pc fanno uso di entrambe le
  istruzioni in virgola mobile e intere. Come risultato, Cyrix
  ha scelto di enfatizzare il "parallelismo" nella proget
  tazione dei processori 6x86 per velocizzare le prestazioni
  dei software che mischiano questi due tipi di istruzioni.




       Il modello di eccezione del floating point x86 permette alle
       istruzioni intere di iniziare e completarsi mentre un
       istruzione in virgola mobile  ancora in elaborazione. In
       contrasto, una seconda istruzione in virgola mobile non pu
       iniziare la sua esecuzione mentre una precedente istruzione
        ancora in esecuzione. Per rimuovere questo limite alle
       prestazioni, il 6x86 pu specularmente iniziare fino a quat
       tro istruzioni in virgola mobile alla FPU nel chip mentre
       continua ad iniziare ed eseguire istruzioni intere. Per
       esempio, in una sequenza di codice con due istruzioni in
       virgola mobile (FLT) seguite da sei istruzioni intere (INT)
       seguite da due FLT, il processore 6x86 pu inizare ad
       eseguire tutte e dieci le istruzioni con l'appropriata unit
       di esecuzione prima ancora del completamento dell'esecuzione
       del primo FLT. Se nessuna delle istruzioni fallisce (il caso
       tipico), l'esecuzione continua con entrambe le unit intera
       ed a virgola mobile che completano in parallelo le
       istruzioni. Se uno degli FLT fallisce (caso atipico), la
       capacit di esecuzione speculativa del 6x86 permette che lo
       stato del processore sia restaurato in una maniera che sia
       compatibile con il modello di eccezione dell'x86.



       L'esame dei test di benchmark rivela che i benchmark sin
       tetici dell'unit in virgola mobile usano un 'code stream'
       in pura virgola mobile che non si trova nelle applicazioni
       del mondo reale. Questo tipo di benchmark non trae vantaggio
       dalle possibilit di esecuzione speculativa dei processori
       6x86. Cyrix crede che i benchmark non sintetici basati sulle
       applicazioni del mondo reale riflettano meglio le attuali
       prestazioni che gli utenti otterranno. Le applicazioni del
       mondo reale contengono funzioni intere e a virgola mobile
       miste, e quindi beneficieranno della capacit di esecuzione
       speculativa del 6x86"


  Cos la recente moda nel benchmarking  di scegliere applicazioni
  comuni ed usare queste per provare le prestazioni di un computer
  completo. Per esempio, SPEC, l'organizzazione no-profit che ha
  progettato le ben conosciute suite di benchmark SPECINT e SPECFP ha
  lanciato un progetto per una nuova suite di benchmark applicativo. Ma
  ancora  molto difficile che certi benchmark commerciali includeranno
  mai codice Linux.

  Ricapitolando, i benchmark sintetici sono validi fino a che si
  capiscono i loro obiettivi e le loro limitazioni. I benchmark
  applicativi rifletteranno meglio le prestazioni di un computer nel suo
  insieme, ma nessuno  disponibile per Linux.


  2.1.2.  Benchmark di alto livello contro quelli di basso livello


  I benchmark di basso livello misureranno direttamente le prestazioni
  dell'hardware: il clock del processore, i cicli di DRAM e SRAM, il
  tempo medio di accesso del disco rigido, la latenza, il tempo di
  stepping da traccia a traccia, ecc ... Questo pu essere utile nel
  caso si compri un sistema e si vuole vedere con quali componenti 
  stato costruito, ma una maniera migliore di controllare questo sarebbe
  di aprire il case, elencare i numeri di serie di tutti i componenti, e
  poi ottenere le caratteristiche per ogni componente sul web.

  Un altro uso dei benchmark di basso livello  di controllare che il
  driver del kernel sia correttamente configurato per una specifica
  componente hardware: se si hanno le caratteristiche dichiarate dal
  produttore per quel componente si possono confrontare i risultati dei
  benchmark di basso livello con quelle ...

  I benchmark di alto livello tengono maggiormente conto delle
  prestazioni della combinazione di hardware/driver e sistema operativo
  per un aspetto specifico di un sistema, per esempio, le prestazioni di
  input&output, o anche le prestazioni di una singola applicazione
  rispetto alla combinazione di hardware/driver e sistema operativo,
  p.es. un benchmark di Apache su sistemi differenti.

  Ovviamente tutti i benchmark di basso livello sono sintetici. I
  benchmark di alto livello possono essere sintetici o applicativi.


  2.2.  Benchmark standard disponibili per Linux


  A mio modesto avviso un semplice test che ognuno pu fare
  nell'aggiornare qualsiasi componente del suo sistema Linux  di
  lanciare la compilazione del kernel prima e dopo l'aggiornamento di
  hardware e/o software e confrontare i tempi di compilazione. Se tutte
  le altre condizioni sono tenute costanti allora il test  valido come
  una misura delle prestazioni nella compilazione e si pu essere
  tranquilli nel dire che:

       "Cambiare A in B porta ad un miglioramento delle prestazioni
       di x % nella compilazione del kernel di Linux sotto tale e
       tali condizioni".



  Ne pi, ne meno!

  Dal momento che la compilazione  un processo molto usuale sotto
  linux, e dal momento che esercita molte funzioni che vengono
  esercitate dai normali benchmark (eccetto le prestazioni in virgola
  mobile), esso costituisce un test individuale abbastanza buono. In
  molti casi, comunque, i risultati da test a test non possono essere
  riprodotti da altri utenti Linux perch ci sono variazioni nelle
  configurazioni hardware/software e cos questo tipo di test non pu
  essere usato come "unit campione" per confrontare sistemi dissimili
  (a meno che non ci accordiamo su un kernel standard da compilare -
  vedi pi avanti).

  Sfortunatamente, non ci sono strumenti di benchmarking specifici per
  Linux, eccetto forse i Byte Linux Benchmarks che sono una versione
  leggermente modificata dei Byte Unix Benchmarks che datano Maggio 1991
  (Trasposizione Linux di Jon Tombs, autori originali Ben Smith, Rick
  Grehan e Tom Yager).

  C' un sito web centrale per i Byte Linux Benchmarks.

  Una versione migliorata e aggiornata dei Byte Unix Benchmarks   stata
  messa assieme da David C.Niemi. Questa  chiamata UnixBench 4.01 per
  evitare confusioni con le versioni precedenti. Questo  ci che David
  scrisse circa i suoi mods:

  "Gli originali e leggermente modificati BYTE Unix benchmarks
  sono rotti in un numero tale di modi che fanno di loro un
  indicatore stranamente non stabile delle performance del
  sistema. Intenzionalmente ho fatto sembrare i miei valori
  indice molto differenti per evitare confusioni con i vecchi
  benchmarks."



  David ha messo su una mailing list basata su majordomo per discutere
  del benchmark su Linux e sistemi operativi concorrenti. Per
  partecipare si invii "subscribe bench" nel corpo di un messaggio a
  majordomo@wauug.erols.com <mailto:majordomo@wauug.erols.com>.  Il
  Washington Area Unix User Group  anche in procinto di mettere su un
  Sito Web per i benchmark Linux.

  Inoltre recentemente, Uwe F. Mayer, mayer@math.vanderbilt.edu
  <mailto:mayer@math.vanderbilt.edu> ha portato la BYTE Bytemark suite
  in Linux. Questa  una moderna suite attentamente assemblata da Rick
  Grehan del BYTE Magazine per testare CPU, FPU e memoria su un moderno
  computer (questi sono benchmark strettamente orientati alle
  prestazioni del processore, n l'I/O n le performance del sistema
  sono tenute in conto).

  Uwe ha anche messo online un Sito Web con un database di risultati per
  la sua versione dei Linux BYTEmark benchmarks.

  Mentre si cerca per benchmark sintetici per Linux, si noter che
  sunsite.unc.edu ha disponibili diversi strumenti di benchmarking. Per
  testare la velocit relativa dei server X e delle schede grafiche, la
  suite xbench-0.2 di Claus Gittinger  disponibile da sunsite.unc.edu,
  ftp.x.org e altri siti. Xfree86.org si rifiuta (saggiamente) di
  rendere disponibile o raccomandare alcun benchmark.

  L'XFree86-benchmarks Survey  un sito web con database di risultati di
  x-bench.

  Per il troughput puro I/O dei dischi il programma hdparm (incluso con
  molte distribuzioni, altrimenti disponibile da sunsite.unc.edu)
  misurer la velocit di trasferimento se avviato con le opzioni -t e
  -T. Ci sono molti altri strumenti liberamente disponibili su Internet
  per provare vari aspetti delle prestazioni di un sistema Linux.


  2.3.  Collegamenti e riferimenti


  comp.benchmarks.faq di Dave Sill  ancora il punto di riferimento
  standard per il benchmarking. Non  specifico per Linux, ma la lettura
   raccomandata per chiunque si voglia impegnare seriamente nel
  benchmarking.  disponibile da un grande numero di FTP e siti web ed
  elenca 56 differenti benchmark, con links agli FTP o siti web che li
  rendono disponibili. Alcuni dei benchmark listati sono commerciali
  (SPEC per esempio).

  Quindi non andr oltre nell'esaminare ognuno dei benchmark menzionati
  in comp.benchmarks.faq, ma c' almeno una suite di basso livello di
  cui voglio parlare: la lmbench suite, di Larry McVoy.  Citando David
  C. Niemi:


       "Linus e David Miller la usano molto perch fa molte utili
       misurazioni di basso livello e pu anche misurare il
       throughput di rete e la latenza se si hanno 2 sistemi da
       testare.

  Un Sito FTP piuttosto completo per benchmark liberamente disponibili 
  stato messo su da Alfred Aburto. La Whetstone suite usata nell'LBT pu
  essere trovata a questo sito.

  C' una FAQ in pi parti di Eugene Miya che viene postata regolarmente
  su comp.benchmarks;  un eccellente punto di riferimento.


  3.  The Linux Benchmarking Toolkit (LBT)


  Proporr uno strumento base per testare sistemi Linux. Questa  una
  versione preliminare di un Linux Benchmarking Toolkit, da essere
  espansa e migliorata. Prendetela per come , cio una proposta. Se si
  pensa che questa non sia una valida suite di test, si  invitati a
  mandare una e-mail con le proprie critiche e saranno apportati i
  cambiamenti e migliorie se possibile. Prima di entrare nell'argomento,
  comunque,  consigliabile leggere questo HOWTO e i punti di
  riferimento menzionati: critiche informate sono le benvenute, vuoto
  criticismo no.


  3.1.  Razionale

  Questo  solo il buonsenso:

  1. Non dovrebbe prendere un giorno intero per andare. Quando si va al
     benchmarking comparativo, nessuno vuole spendere giorni tentando di
     immaginare il pi veloce setup per un dato sistema. Idealmente
     l'intero set di benchmark dovrebbe prendere circa 15 minuti per
     completarsi su una macchina media.

  2. Tutto il codice sorgente utilizzato per il programma deve essere
     liberamente disponibile su internet per ovvie ragioni.

  3. I benchmark dovrebbero provvedere semplici indici che rispecchino
     le performance misurate.

  4. Ci dovrebbe essere un misto di benchmark sintetici e applicativi

  5. Ogni benchmark sintetico dovrebbe impiegare il relativo
     sottosistema alla sua massima capacit.

  6. I risultati dei benchmark sintetici non dovrebbero essere unificati
     in un unico indice (che non rispetta l'intera idea che c' dietro i
     benchmark sintetici, con considerevole perdita di informazioni).

  7. I benchmark applicativi dovrebbero consistere in processi eseguiti
     comunemente in un sistema Linux



  3.2.  Selezione dei benchmark


  Ho selezionato cinque differenti suite di benchmarking, tentando il
  pi possibile di eliminare overlap nei test:

  1. Compilazione del Kernel 2.0.0 (configurazione di default) usando
     gcc.

  2. Whetstone suite versione 10/03/97 (ultima versione di Roy
     Longbottom).

  3. xbench-0.2 (con parametri di esecuzione veloce).

  4. UnixBench benchmarks versione 4.01 (risultati parziali).

  5. BYTE Magazine's BYTEmark benchmarks beta release 2 (risultati
     parziali).


  Per i test 4 e 5, "(risultati parziali)" significa che non tutti i
  risultati prodotti da questi benchmark vanno considerati.


  3.3.  Durata dei test


  1. Kernel 2.0.0, compilazione: da 5 a 30 minuti, dipende dalle reali
     performance del sistema.

  2. Whetstone: 100 secondi.

  3. Xbench-0.2: < 1 ora.

  4. UnixBench benchmarks versione 4.01: approssimativamente 15 minuti.

  5. BYTE Magazine's BYTEmark benchmarks: approssimativamente 10 minuti.


  3.4.  Commenti


  3.4.1.  Compilazione Kernel 2.0.0:


    Cos':  l'unico benchmark applicativo in LBT.

    Il codice  largamente disponibile (p.es. finalmente troverete un
     uso per i vostri vecchi cd di linux).

    Molti utenti Linux ricompilano il kernel abbastanza spesso, cos 
     una misura significante delle performance generali del sistema

    Il kernel  grosso e gcc usa un bel po' di memoria: ci attenua il
     miglioramento che si potrebbe avere grazie alla cache di secondo
     livello svolgendo piccoli test

    Svolge frequenti operazioni di I/O col disco

    Procedura del test: prendi il sorgente originale di un kernel
     2.0.0, compilalo con le opzioni di default (make config e premendo
     Invio ripetutamente). Il tempo riportato dovrebbe essere il tempo
     speso nella compilazione p.es. dopo che si  digitato make zImage e
     non includendo make dep, make clean. Notare che l'architettura di
     default per il kernel  la i386, perci se  compilato su un altra
     architettura, gcc dovrebbe essere impostato come cross-compile, con
     i386 come architettura di destinazione.

    Risultati: tempo di compilazione in minuti e secondi (per favore, 
     inutile riportare le frazioni di secondo).



  3.4.2.  Whetstone:


    Cos': misura le prestazioni pure dell'unit in virgola mobile con
     un corto ciclo. Il sorgente (in C)  abbastanza leggibile ed 
     molto facile vedere quali operazioni in virgola mobile ne prendono
     parte.
    Test pi corto del LBT :-).

     un "vecchio classico" test: punti di riferimento sono
     disponibili, i suoi limiti sono ben conosciuti.

    Procedura del test: il pi nuovo sorgente in C dovrebbe essere
     ottenuto dal sito Aburto. Compilarlo e eseguirlo in modalit doppia
     precisione. Specificare gcc e -O2 come precompilatore e opzioni del
     precompilatore.

     Risultati: un indice delle prestazioni dell'unit in virgola
     mobile in MWIPS.



  3.4.3.  Xbench-0.2:


    Cos': misura le prestazioni dell'X server.

    La misura xStones fornita da xbench  una media pesata di numerosi
     test riferiti come indice ad una vecchia Sun station con un display
     in bianco e nero. Hmmm... non  inappuntabile come test dei moderni
     X server, ma  ancora il miglior strumento che abbia trovato.

    Procedura del test: compilare con -O2. Specifichiamo qualche
     opzione per una esecuzione pi veloce: ./xbench -timegoal 3 >
     results/name_of_your_linux_box.out. Per avere un punteggio in
     xStones, dobbiamo eseguire uno script awk; il modo pi semplice 
     di digitare make summary.ms. Controllare il file summary.ms: il
     punteggio in xStone del sistema  nell'ultima colonna della linea
     con cui hai specificato il nome della propria macchina durante il
     test.

    Risultati: le prestazioni di X misurate in xStones.

    Nota: questo test, cos com'  obsoleto. Dovrebbe essere
     ricodificato



  3.4.4.  UnixBench versione 4.01:


    Cos': misura le prestazioni totali di Unix. Questo test impegner
     le prestazioni di I/O e le prestazioni di multitasking del kernel

    Ho scartato tutti i risultati dei test aritmetici, tenendo solo i
     risultati relativi al sistema.

    Procedura di test: compilare con -O2. Eseguire con ./Run -1 (esegue
     ogni test una sola volta). Si troverano i risultati in
     ./results/report file. Calcolare il significato geometrico di EXECL
     THROUGHPUT, FILECOPY 1, 2, 3, PIPE THROUGHPUT, PIPE-BASED CONTEXT
     SWITCHING, PROCESS CREATION, SHELL SCRIPTS e gli indici di SYSTEM
     CALL OVERHEAD.

    Risultati: un indice di sistema.


  3.4.5.  BYTE Magazine's BYTEmark benchmarks:


    Cos': fornisce una buona misurazione delle prestazioni del
     processore. Questo  un estratto dalla documentazione: "questi
     benchmark hanno la funzione di mostrare il limite superiore teorico
     di CPU, FPU e architettura di memoria di un sistema. Non possono
     misurare il video, i dischi o il throughput della rete (questi sono
     dominio di un'altro set di benchmark). Si dovrebbe, comunque, usare
     il risultato di questi test come una parte di un processo di
     misurazione di un sistema, non come tutto il processo."

    Ho scartato i test in virgola mobile dal momento dal momento che il
     test dei Whetstone  pi rappresentativo delle prestazioni in
     virgola mobile.

    Ho diviso i test interi in due parti: quelli pi rappresentativi
     delle prestazioni di memoria-cache-CPU e i test interi della CPU.

    Procedura del test: compilare con -O2. Eseguire il test con
     ./nbench > myresults.dat o simile. Poi da myresults.dat, calcolare
     la media geometrica degli indici della prova STRING SORT,
     ASSIGNMENT e BITFIELD ; questo  l'indice di memoria ; calcolare la
     media geometrica degli indici della prova di NUMERIC SORT, IDEA,
     HUFFMAN and FP EMULATION ; questo  l'indice intero.

    Risultati: un indice di memoria e un indice intero calcolato come
     spiegato.



  3.5.  Miglioramenti possibili

  La suite ideale di benchmark dovrebbe terminare in qualche minuto, con
  benchmark sintetici che provino ogni sottosistema separatamente e
  benchmark applicativi che forniscano risultati per diverse
  applicazioni. Dovrebbero anche generare automaticamente un rapporto
  completo e eventualmente spedirlo via e-mail ad un database centrale
  sul web.

  Qui non siamo davvero interessati alla portabilit, ma dovrebbe almeno
  funzionare su tutte le recenti (> 2.0.0) versioni e sapori (i386,
  Alpha, Sparc...) di Linux.

  Se qualcuno ha un idea circa il benchmarking delle prestazioni di rete
  in una maniera semplice e facile, con un test breve (meno di 30 minuti
  per impostarlo ed eseguirlo), per favore mi contatti.


  3.6.  Modulo LBT

  Dopo i test, la procedura di benchmarking non sarebbe completa senza
  un modulo che descrivesse il setup, che cos dovrebbe essere (seguendo
  le linee guida di comp.benchmarks.faq):


  ______________________________________________________________________
  LINUX  BENCHMARKING TOOLKIT REPORT FORM
  ______________________________________________________________________













  ______________________________________________________________________
  CPU
  ==
  Produttore:
  Modello:
  Frequenza di clock:
  Produttore della scheda madre:
  Modello della sk.madre:
  Chipset della sk.madre:
  Tipo di bus:
  Freq. di clock del bus:
  Cache totale:
  Tipo e velocit della cache:
  SMP (numero di processori):
  ______________________________________________________________________



  ______________________________________________________________________
  RAM
  ====
  Totale:
  Tipo:
  Velocit:
  ______________________________________________________________________



  ______________________________________________________________________
  Disco
  ====
  Produttore:
  Modello:
  Capienza:
  Interfaccia:
  Driver/Settaggi:
  ______________________________________________________________________



  ______________________________________________________________________
  Scheda video:
  ===========
  Produttore:
  Modello:
  Bus:
  Tipo di Video RAM:
  Totale di Video RAM:
  Produttore X server:
  Versione X server:
  Scelta del chipset nell'X server:
  Risoluzione/freq di refresh verticale:
  Profondit di colore:
  ______________________________________________________________________



  ______________________________________________________________________
  Kernel
  =====
  Versione:
  Dimensione file di swap:
  ______________________________________________________________________



  ______________________________________________________________________
  gcc
  ===
  Versione:
  Opzioni:
  versione libc:
  ______________________________________________________________________



  ______________________________________________________________________
  Note al test
  ==========
  ______________________________________________________________________



  ______________________________________________________________________
  RISULTATI
  ========
  Tempo di compilazione del kernel 2.0.0
  Tempo di compilazione: (minuti e secondi)
  Whetstones: risultati in MWIPS.
  Xbench: risultati in xstones.
  Unixbench Benchmarks 4.01: indice di systema
  BYTEmark: INDEX intero
  BYTEmark: INDICE di memoria
  ______________________________________________________________________



  ______________________________________________________________________
  Commenti*
  =========
  * Questo campo  incluso per possibili interpretazioni dei risultati,
  e come specificato  opzionale. Potrebbe essere la parte pi
  significativa del proprio report, specialmente se si stanno
  effettuando benchmark comparativi.
  ______________________________________________________________________




  3.7.  Test delle prestazioni della rete

  Provare le prestazioni di una rete  un'ardua sfida dal momento che
  include almeno due macchine, un server ed un client, quindi il doppio
  del tempo per impostarlo e molte molte variabili da controllare,
  ecc... Su una rete ethernet, penso che la migliore scelta sarebbe il
  pacchetto ttcp. (da espandere)


  3.8.  Test degli SMP (Multi processori simmetrici)

  I test degli SMP sono un'altra sfida ed ogni benchmark
  specificatamente progettato per testare l'SMP avr un lungo tempo per
  dimostarsi valido nelle impostazioni della vita reale, dal momento che
  gli algoritmi che possono prendere vantaggio dall'SMP sono difficili
  da progettare. Sembra che le ultime versioni del kernel (> 2.1.30 
  successive) faranno un multiprocessing "fine-grained". Ma non ho
  informazioni maggiori in questo momento.

  Secondo David Niemi, " ... shell8[parte degli Unixbench 4.01
  benchmaks] svolge un buon lavoro nel confrontare combinazioni simili
  di hardware e sistemi operativi nei modi SMP e UP"

  4.  Esempi di esecuzione e risultati

  L'LBT  stato eseguito sulla mia macchina di casa, un sistema Linux di
  classe Pentium con il quale ho scritto questo HOWTO. Qui c' il modulo
  di report LBT per il mio sitema


  LINUX  BENCHMARKING TOOLKIT REPORT FORM



  CPU



  ==



  Produttore: Cyrix/IBM



  Modello: 6x86L P166+



  Frequenza di clock: 133 MHz



  Produttore scheda madre: Elite Computer Systems (ECS)



  Sk. madre: P5VX-Be



  Chipset: Intel VX



  Tipo di bus: PCI



  Frequenza di clock del bus: 33 MHz



  Cache totale: 256 KB



  Cache tipo/velocit: Pipeline burst 6 ns



  SMP (numero di processori): 1



  RAM


  ====



  Totale: 32 MB



  Tipo: EDO SIMMs



  Velocit: 60 ns



  Disco



  ====



  Produttore: IBM



  Modello: IBM-DAQA-33240



  Grandezza: 3.2 GB



  Interfaccia: EIDE



  Driver/Settaggi: Bus Master DMA modo 2



  Scheda video



  ===========



  Produttore: Generica S3



  Modello: Trio64-V2



  Bus: PCI



  Tipo Video RAM: EDO DRAM

  Totale Video RAM: 2 MB



  Produttore X server: XFree86



  Versione X server: 3.3



  Scelta chipset dell'X server: S3 accellerato



  Risoluzione/rinfresco verticale: 1152x864 @ 70 Hz



  Profondit di colore: 16 bit



  Kernel



  =====



  Versione: 2.0.29



  File di swap: 64 MB



  gcc



  ===



  Versione: 2.7.2.1



  Opzioni: -O2



  versione libc: 5.4.23



  Note del test



  ==========

  Carico molto basso. I seguenti risultati sono stati ottenuti abilitando alcune delle speciali features del Cyrix/IBM 6x86
  abilitate con il programma setx86: fast ADS,  fast IORT, Enable DTE, fast LOOP, fast Lin. VidMem.



  RISULTATI



  ========



  Kernel Linux 2.0.0 Tempo di compilazione: 7m12s



  Whetstones: 38.169 MWIPS.



  Xbench: 97243 xStones.



  BYTE Unix Benchmarks 4.01 INDICE di sistema: 58.43



  BYTEmark integri INDICE: 1.50



  BYTEmark INDICE memoria: 2.50



  Commenti



  =========



  Questo  un sistema molto stabile con prestazioni omogenee, ideale per l'uso di casa e/o lo sviluppo in Linux. Riporter al pi presto i risultati con un processore 6x86MX appena ne avr uno fra le mani!




  5.  Trappole e inesattezze del benchmarking


  Dopo aver messo insieme questo HOWTO ho iniziato a comprendere come le
  parole "trappole" e "inesattezze" siano cos spesso associate al
  benchmarking...


  5.1.  Paragonando mele e arance


  O dovrei dire Apple e PC? Questa  una disputa cos vecchia e ovvia
  che non andr avanti nei dettagli. Dubito che il tempo che impieghi
  Word a caricarsi su un Mac confrontato con un medio Pentium sia la
  misura reale di qualcosa. Lo stesso vale per il confronto tra il tempo
  di boot di Linux e Windows NT, ecc ... Provare a confrontare il pi
  possibile macchine identiche con una singola modifica.


  5.2.  Informazioni incomplete


  Un singolo esempio illustrer questo errore molto comune. Spesso si
  legge in comp.os.linux.hardware le seguenti frasi, o simili: "Ho
  appena montato il processore XYZ a nnn MHz e ora compilare il kernel
  di linux prende solo x minuti" (poni pure XYZ , nnn e x come meglio
  credi). Questo  irritante, perch nessun altra informazione  data,
  ad.es. non sappiamo neanche l'ammontare della RAM, la dimensione dello
  swap, gli altri processi in esecuzione nello stesso momento, la
  versione del kernel, i moduli selezionati, il tipo di hard disk, la
  versione di gcc, ecc...  consigliato di usare il modulo di report LBT
  che utilizza almeno una maschera di raccolta dati standard.


  5.3.  Hardware/software proprietario


  Un ben conosciuto produttore di processori una volta pubblic i
  risultati dei benchmarks prodotti da una speciale, personalizzata
  versione di gcc. A parte le considerazioni etiche, questi risultati
  erano senza senso, dal momento che il 100% della comunit Linux
  continuerebbe ad usare la versione standard di gcc. Lo stesso vale per
  l'hardware proprietario. Il Benchmarking  molto pi utile quando si
  rapporta a hardware comune e software libero (nel significato GNU/GPL
  di libero).


  5.4.  Rilevanza


  Stiamo parlando di Linux, giusto? Cos ci dobbiamo scordare dei
  benchmark prodotti su altri sistemi operativi (questo  un caso
  speciale della trappola "Confrontare mele e arance" spiegata prima).
  Allo stesso modo, se si  intenzionati a testare le prestazioni di un
  server Web, non citare le prestazioni dell'unit in virgola mobile, o
  altre informazioni irrilevanti. In molti casi meno  meglio. Allo
  stesso modo, non c' bisogno di menzionare gli anni del tuo gatto, il
  tuo stato d'animo mentre stavi effettuando il test, ecc...


  6.  FAQ (Domande Frequenti)


     D1.
        C' un qualsiasi indice di merito per i sistemi Linux?

     A: No, fortunatamente nessuno  ancora venuto fuori con una
        misurazione Lhinuxstone (tm). E se ce ne fosse uno, non avrebbe
        molto senso: i sistemi Linux sono usati per tanti differenti
        compiti, dal server web pesantemente caricato alla workstation
        grafica per uso individuale. Nessun singolo indice di merito pu
        descrivere le prestazioni di un sistema Linux in differenti
        situazioni.

     D2.
        Quindi perch non una dozzina di indici riassumenti le
        prestazioni di diversi sistemi Linux?

     A: Sarebbe la situazione ideale. Vorrei vedere ci diventare
        realt. Nessun volontario per un Linux Benchmarking Project? Con
        un sito web e un database completo e ben progettato?

     D3.
        ... BogoMips ...?

     A: I BogoMips non hanno niente a che fare con le prestazioni del
        sistema. Leggere il BogoMips Mini-HOWTO.

     D4.
        Qual  il miglior benchmark per Linux?

     A: Dipende da quale aspetto prestazionale di linux si vuole
        misurare. Ci sono differenti benchmark per misurare la rete
        (p.es i transfer rate), i file server (NFS), l'I/O dei dischi,
        le prestazioni sui calcoli in virgola mobile e interi, grafica,
        3D, larghezza di banda della memoria del processore, prestazioni
        CAD, tempo di transazione, prestazioni SQL, prestazioni del
        server Web, prestazioni in tempo reale, prestazioni del CD-ROM,
        prestazioni di Quake (!), ecc ... AFAIK nessuna suite di
        benchmark esiste per linux che supporti tutti questi test.

     D5.
        Qual  il processore pi veloce sotto Linux?

     A: Il pi veloce in quale processo? Se si  molto orientati alla
        masticazione di numeri, un processore Alpha ad alta frequenza di
        clock (600 MHz in su) dovrebbe essere pi veloce di nessun
        altro, dal momento che gli Alpha sono stati progettati proprio
        per fornire questo tipo di prestazioni. Se, dall'altro lato, si
        vuole mettere assieme un server news davvero veloce,  probabile
        che la scelta di un veloce sottosistema di dischi rigidi e molta
        RAM risulter in un migliore aumento di prestazioni che un
        cambio di processore per la stessa somma di $.

     D6.
        Fammi riformulare l'ultima domanda, allora: c' un processore
        che  il pi veloce per applicazioni generiche?

     A: Questa  una domanda trabocchetto ma ha una sola e semplice
        risposta: NO. Si pu sempre disegnare un sistema veloce anche
        per applicazioni generiche, indipendentemente dal processore. Di
        solito, restando uguali tutte le altre cose, una pi alta
        frequenza di clock risulter in maggiori prestazioni del sistema
        (e anche pi mal di testa). Tirando fuori un vecchio processore
        a 100Mhz da una motherboard (di solito non) aggiornabile, e
        inserendo dentro la versione a 200Mhz, si dovrebbe sentire una
        grande differenza. Certamente con solo 16 MB di RAM, lo stesso
        investimento sarebbe stato molto pi saggiamente speso in DIMMs
        aggiuntive ...

     D7.
        Ma allora la frequenza di clock influenza le prestazioni di un
        sistema?

     A: Per molti processi, eccetto per i loop NOP vuoti (a proposito,
        questi stanno per essere rimossi dai moderni compilatori
        ottimizzanti), una maggiorazione nella frequenza di clock non
        darebbe un aumento lineare delle prestazioni. Molti piccoli
        programmi che fanno un uso intensivo del processore entrano
        interamente nella cache primaria del processore (la cache L1,
        usualmente 16 o 32K) e avranno un aumento di prestazioni
        equivalente all'aumento della frequenza di clock, ma molti
        "veri" programmi sono molto pi larghi di ci, hanno cicli che
        non entrano nella cache L1, condividono la cache di secondo
        livello (L2) con altri processi, dipendono da componenti esterni
        e daranno un incremento di prestazioni molto minore. Questo 
        perch la cache L1 funziona alla stessa frequenza di clock del
        processore, mentre molte cache di secondo livello e tutti gli
        altri sottosistemi (DRAM per esempio) funzionano in maniera
        asincrona a minore frequenza di clock.

     D8.
        OK, poi, un ultima domanda su questa questione: qual  il
        processore con il miglior rapporto tra prezzo e prestazioni per
        un uso generico di Linux?

     A: Definire un "Linux di uso generico" non  una cosa facile! Per
        ogni particolare applicazione, c' sempre un processore con IL
        MIGLIORE rapporto prezzo/prestazioni in ogni momento, ma cambia
        abbastanza frequentemente cos come i produttori rilasciano
        nuovi processori, cos rispondere Processore XYZ a nnn Mhz
        sarebbe una risposta valida solo in quel momento. Comunque il
        prezzo di un processore  insignificante se paragonato al prezzo
        dell'intero sistema che si sta assemblando. Cos, davvero, la
        questione dovrebbe come si pu massimizzare il rapporto tra
        prezzo e prestazioni di un dato sistema? E la risposta a questa
        domanda dipende fortemente dal minimo di prestazioni richieste
        e/o dal prezzo massimo stabilito per la configurazione che si
        sta considerando. A volte l'hardware comune non soddisfa le
        prestazioni minime richieste e costosi sistemi RISC sarebbero la
        sola alternativa. Per l'uso di casa si raccomanda un sistema
        bilanciato e omogeneo per tutte le prestazioni (ora vai ad
        immaginare che cosa io intendo per bilanciato e omogeneo :-); la
        scelta di un processore  una decisione importante, ma non pi
        che scegliere il tipo di disco fisso e la capacit, il
        quantitativo di RAM, la scheda video, ecc ...

     D9.
        Quando un aumento delle prestazioni  considerato
        "significativo"?

     A: Vorrei rispondere che innanzittutto ogni variazione sotto all'1%
        non  significativa (potrebbe essere descritta come
        "marginale"). Noi umani, difficilmente percepiamo la differenza
        tra due sistemi con un 5% di differenza nel tempo di risposta.
        Certamente alcuni benchmarkers "hard-core" non sono umani e ti
        diranno confrontando un sistema con indici di sistema 65.9 e
        66.5 che il secondo  sicuramente molto pi veloce.

     D10.
        Come posso ottenere "significativi" aumenti nelle prestazioni al
        costo minore?

     A: Dal momento che molti codici sorgenti per Linux sono disponibili
        gratuitamente, l'esame attento e il ridisegno algoritmico delle
        subroutine chiave potrebbe aumentare in alcuni casi le
        prestazioni. Se ci si trova ad avere a che fare con un progetto
        commerciale e non ci si vuole addentrare profondamente nello
        sviluppo in codice C si dovrebbe chiamare un consulente Linux.
        Vedere il Consultants-HOWTO.



  7.  Copyright, riconoscimenti e varie


  7.1.  Come  stato scritto questo documento:


  Il primo passo  stato leggere la sezione 4 di "Writing and submitting
  a HOWTO" dell'HOWTO Index di Tim Bynum.

  Non conoscevo assolutamente niente di SGML o LaTeX, ma sono stato
  tentato di usare un pacchetto automatico di generazione dopo aver
  letto i vari commenti sugli SGML-Tools. Comunque inserire i tags
  manualmente in un documento mi ricorda i giorni che assemblai a mano
  un programma monitor da 512 byte per un, ora defunto, processore a
  8bit, cos sono entrato in possesso dei codici sorgenti di LyX, li ho
  compilati, ed ho usato il suo modo LinuxDoc. Combinazione altamente
  raccomandata: LyX e SGML-Tools.


  7.2.  Copyright


  The Linux Benchmarking HOWTO is copyright (C) 1997 by Andr D. Balsa.
  Linux HOWTO documents may be reproduced and distributed in whole or in
  part, in any medium physical or electronic, as long as thqs copyright
  notice is retained on all copies. Commercial redistribution is allowed
  and encouraged; however, the author would like to be notified of any
  such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible.  However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu via email.


  7.3.  Nuove versioni di questo documento


  Le nuove versioni del Linux Benchmarking-HOWTO saranno depositate su
  sunsite.unc.edu e siti mirror.  Sono disponibili altri formati, come
  una versione Postscript e dvi, nella directory other-formats. Il Linux
  Benchmarking-HOWTO  pure dispononibile per client WWW come Grail, un
  Web browser scritto in Python. Sar pure inviato regolarmente a
  comp.os.linux.answers.


  7.4.  Commenti e critiche

  Sono richiesti suggerimenti, correzioni e aggiunte. Si cercano
  contributi e riscontri. Non si cercano flame.

  Posso sempre essere raggiunto a andrewbalsa@usa.net.


  7.5.  Riconoscimenti


  David Niemi, l'autore della suite Unixbench, ha provato di essere una
  fonte inesauribile di informazioni e di (valide) critiche.

  Voglio anche ringraziare Greg Hankins uno dei maggiori contributori al
  pacchetto SGML-tools, Linus Torvalds e l'intera comunit Linux. Questo
  HOWTO  il mio modo per ringraziare.




  7.6.  Disclaimer


  Your mileage may, and will, vary. Be aware that benchmarking is a
  touchy subject and a great time-and-energy consuming activity.


  7.7.  Marchi registrati


  Pentium e Windows NT sono marchi registrati rispettivamente da Intel e
  Microsoft.

  BYTE e BYTEmark sono marchi registrati da McGraw-Hill, Inc.

  Cyrix e 6x86 sono marchi registrati da Cyrix Corporation.

  Linux non  un marchio registrato, e spero che mai lo sar. :)
















































  Beowulf HOWTO
  Jacek Radajewski and Douglas Eadline
  v1.1.1, 22 Novembre 1998

  Questo documento introduce l'architettura Beowulf per Supercomputer e
  fornisce informazioni di base sulla programmazione parallela, insieme
  a link ad altri documenti pi specifici e pagine web.  Documentazione
  tradotta dall'HackLab di Firenze (hacklab@firenze.linux.it).

  1.  Introduzione

  1.1.  Liberatoria

  Non ci possiamo assumere alcuna responsabilit per qualsiasi
  informazione sbagliata contenuta in questo documento, n per qualsiasi
  danno provocato dal suo uso.


  1.2.  Copyright

  Copyright  1997 - 1998 Jacek Radajewski e Douglas Eadline.  La
  possibilit di distribuire e modificare questo documento  garantita
  dalla GNU General Public Licence.


  1.3.  Note su questo HOWTO

  Jacek Radajewski inizi a lavorare su questo documento nel Novembre
  del 1997 e fu subito aiutato da Douglas Eadline. Dopo pochi mesi il
  Beowulf HOWTO divenne troppo grande e nell'Agosto 1998 venne diviso in
  tre documenti: il Beowulf HOWTO, il Beowulf Architecture Design HOWTO,
  and the Beowulf Installation and Administration HOWTO. La versione
  1.0.0 del Beowulf HOWTO venne rilasciato al Linux Documentation
  Project l'11 Novembre 1998. Noi speriamo che questo sia solo l'inizio
  di ci che dovrebbe diventare un completo Beowulf Documentation
  Project.


  1.4.  Note sugli autori


    Jacek Radajewski lavora come Amministratore di Rete e sta studiando
     per la laurea in informatica all'Universit di Southern Queensland,
     in Australia. Il suo primo approccio con Linux avvenne nel 1995 e
     fu subito amore a prima vista. Jacek ha costruito il suo primo
     cluster Beowulf nel Maggio del 1997 e sta giocando con questa
     tecnica da allora, cercando continuamente di trovare nuovi e
     migliori modi per impostare il tutto. Pu essere contattato
     all'indirizzo jacek@usq.edu.au

    Douglas Eadline, Ph.D.  il Presidente e Direttore della Ricerca a
     Paralogic, Inc., Bethlehem, PA, USA. Ha studiato come Chimico
     Fisico/Analitico e si  interessato ai computer fin dal 1978 quando
     costru il suo primo computer per usarlo con le strumentazioni
     chimiche.  I suoi attuali interessi sono Linux, i cluster Beowulf e
     gli algoritmi paralleli. Pu essere raggiunto all'indirizzo
     deadline@plogic.com


  1.5.  Riconoscimenti

  La stesura del Beowulf HOWTO  stato un processo lungo ed  finalmente
  completo, grazie a molte persone. Voglio ringraziare le seguenti
  persone per il loro aiuto e i loro contributi a questo HOWTO.


    Becky per il suo amore, supporto e comprensione.

    Tom Sterling, Don Becker e altre persone alla NASA che hanno
     iniziato il progetto Beowulf.

    Thanh Tran-Cong e la Facolt di Ingegneria e Controllo per aver
     reso disponibile per gli esperimenti la macchina Beowulf topcat.

    Il mio tutor Christopher Vance per molte grandi idee.

    Il mio amico Russell Waldron per le grandi idee, il suo interesse
     generale nel progetto e l'aiuto.

    Il mio amico David Smith per aver controllato questo documento.

    Le molte persone della lista Beowulf che mi hanno dato feedback e
     idee.

    Tutte le persone curatrici del sistema operativo Linux e di tutti i
     programmi di software libero usati su topcat e altre macchine
     Beowulf.


  2.  Introduzione


  Via via che le prestazioni dei computer comuni e dell'hardware di rete
  crescono, e il loro prezzo cala, diventa via via sempre pi facile
  costruire sistemi di calcolo parallelo dai componenti di facile
  reperibilit invece che comprare tempi CPU sui Supercomputer molto
  costosi. In effetti il rapporto costo e prestazioni di una macchina di
  tipo Beowulf  dalle tre alle dieci volte migliore che nei
  tradizionali Supercomputer. L'architettura Beowulf  scalabile, 
  facile da realizzare e si deve pagare solo l'hardware in quanto gran
  parte del software  gratuito.


  2.1.  A chi  indirizzato questo HOWTO?

  Questo HOWTO  adatto per persone che abbiano un po' di esperienza con
  il sistema operativo Linux. La conoscenza della tecnologia Beowulf o
  la comprensione di sistemi operativi pi complessi e concetti di
  networking non  essenziale, ma qualche esperienza con il calcolo
  parallelo potrebbe essere utile (d'altronde dovresti avere qualche
  ragione per leggere questo documento). Questo HOWTO non risponde a
  tutte le domande che potrebbero sorgere su Beowulf, ma noi speriamo
  che possa darti buone idee e guidarti nella giusta direzione. Lo scopo
  di questo HOWTO  di dare informazioni iniziali, link e riferimenti a
  documenti pi avanzati.


  2.2.  Cos' un Beowulf?


  Famed was this Beowulf: far flew the boast of him, son of Scyld, in
  the Scandian lands.  So becomes it a youth to quit him well with his
  father's friends, by fee and gift, that to aid him, aged, in after
  days, come warriors willing, should war draw nigh, liegemen loyal: by
  lauded deeds shall an earl have honor in every clan.



  Beowulf  il pi  antico poema epico scritto in inglese arrivato fino
  a noi.  la storia di un eroe di grande forza e coraggio che sconfisse
  un mostro chiamato Grendel. Vai a ``Storia'' per saperne di pi
  dell'eroe Beowulf.
  Probabilmente ci sono tante definizioni di Beowulf quante sono le
  persone che realizzano o usano le caratteristiche dei Supercomputer
  Beowulf. Alcuni dicono che possono essere chiamati Beowulf solo i
  computer realizzati allo stesso modo della macchina originale della
  NASA. Altri invece vanno all'estremo e chiamano Beowulf tutti i
  sistemi di workstation che fanno girare codice parallelo. La mia
  definizione di Beowulf sta da qualche parte nel mezzo fra questi due
  modi di vedere ed  basata su molti messaggi della lista Beowulf:



  Beowulf  un'architettura a multicomputer che pu essere usata per
  calcoli paralleli.  un sistema che normalmente consiste di un nodo
  server e uno o pi nodi client connessi via Ethernet o altri tipi di
  rete.  un sistema costruito usando componenti hardware comuni, come
  qualunque PC che pu far girare Linux, normali adattatori Ethernet e
  switch. Non contiene alcun componente hardware speciale ed 
  facilmente realizzabile. Beowulf utilizza inoltre software comune come
  il sistema operativo Linux, Parallel Virtual Machine (PVM) e Message
  Passing Interface (MPI). Il nodo server controlla tutto il cluster e
  fornisce i file ai nodi client.  anche la console del cluster e il
  gateway con il mondo circostante. Grandi macchine Beowulf possono
  avere pi di un nodo server e  possibilmente altri nodi dedicati a
  compiti particolari, come per esempio console o stazioni di
  monitoraggio. In molti casi i nodi client in un sistema Beowulf sono
  dedicati al lavoro per il Beowulf, pi sono dedicati meglio . I nodi
  sono configurati e controllati dal nodo server, e fanno solo ci che
  gli viene detto. In una configurazione disk-less (senza dischi), i
  nodi client non conoscono nemmeno il loro indirizzo IP n il nome
  finch il server glielo comunica. Una delle differenze principali fra
  il Beowulf e il Cluster di Workstation (COW)  il fatto che Beowulf si
  comporta pi come una macchina singola che le molte workstation. In
  molti casi i client non hanno tastiere o monitor, e vi si accede solo
  via login remoto o possibilmente terminali seriali.  Un nodo Beowulf
  pu essere pensato come un pacchetto composto da CPU e memoria che pu
  essere inserito nel cluster, proprio come una CPU o un modulo di
  memoria possono essere infilati in una scheda madre.



  Beowulf non  un nuovo pacchetto software, un nuovo tipo di rete o
  l'ultima versione di sviluppo del kernel. Beowulf  un tecnica di
  clustering di computer con Linux per formare un supercomputer
  parallelo virtuale.  Inoltre ci sono molti pacchetti software come
  modifiche al kernel, le librerie PVM e MPI e programmi di
  configurazione che rendono l'architettura Beowulf pi veloce, pi
  facile da configurare e molto pi usabile; si pu creare una macchina
  di classe Beowulf usando distribuzioni Linux standard senza alcun
  software addizionale. Se avete due computer Linux in rete che
  condividono al limite il file system /home via NFS e permettono di
  eseguire shell remote (rsh), allora si pu pensare di avere una
  semplice macchina Beowulf composta da due nodi.


  2.3.  Classificazione


  I sistemi Beowulf sono stati realizzati da una gran variet di parti.
  Per favorire le prestazioni sono stati usati alcuni componenti non
  comuni (cio prodotti da una singola ditta). Per contare i differenti
  sistemi e per rendere la spiegazione delle macchine un po' pi
  semplice, noi proponiamo questo semplice schema di classificazione:


  BEOWULF DI CLASSE I:

  Questa classe di macchine costruita interamente da componenti comuni
  di facile reperibilit. Noi useremo il test di certificazione di
  "Computer Shopper" per definire i componenti comuni di facile
  reperibilit (Computer Shopper  una rivista/catalogo mensile spessa
  un pollice di sistemi e componenti per PC). Il test  questo:

  Un Beowulf di CLASSE I  una macchina che pu essere realizzata da
  componenti trovabili in almeno 3 cataloghi pubblicitari a carattere
  nazionale o globale.

  I vantaggi di un sistema di CLASSE I sono:

    l'hardware  reperibile da molte fonti (bassi prezzi e facile
     manutenzione)

    non c' dipendenza da un singolo rivenditore di hardware

    supporto dei driver dei prodotti Linux

     basato normalmente su standard (SCSI, Ethernet, ecc.)

  Gli svantaggi di un sistema di CLASSE I sono:

    maggiori prestazioni possono richiedere un hardware di CLASSE II

  Beowulf di CLASSE II

  Un Beowulf di CLASSE II  semplicemente qualsiasi macchina che non
  soddisfa il test di certificazione di Computer Shopper. Questa non 
  una cosa brutta.  semplicemente una classificazione della macchina.

  I vantaggi di un sistema di CLASSE II sono:

    Le prestazioni possono essere abbastanza buone!

  Gli svantaggi di un sistema di CLASSE II sono:

    il supporto dei driver pu variare

    dipendenza da un singolo rivenditore hardware

    possono essere molto pi costosi di un sistema di CLASSE I.

  Una CLASSE non  necessariamente migliore dell'altra, Tutto dipende
  dalle tue necessit e dal tuo budget. Questa classificazione serve
  solo a rendere la spiegazione dei sistemi Beowulf un po' pi breve. La
  sezione  ``Progetto del sistema'' ti pu aiutare a determinare che
  tipo di sistema si adatta alle tue necessit.





  3.  Uno sguardo all'architettura



  3.1.  A cosa assomiglia?


  Io credo che il miglior modo per descrivere l'architettura del
  supercomputer Beowulf  quello di usare un esempio molto simile al
  Beowulf reale ma molto familiare a molti amministratori di sistema.
  L'esempio pi vicino ad una macchina Beowulf  un laboratorio Unix con
  un server e un certo numero di client. Per essere ancora pi precisi
  user come esempio il laboratorio di computer DEC Alpha per laureandi
  della facolt di Scienze dell'USQ. Il computer server si chiama beldin
  e le macchine client sono chiamate scilab01, scilab02, scilab03, fino
  a scilab20. Tutti i client hanno installata una copia locale del
  sistema operativo Digital Unix 4.0 ma condividono la directory degli
  utenti /home e la directory /usr/local dal server via NFS (Network
  File System). Ogni client ha una voce per il server e una per ognuno
  degli altri client nel suo file /etc/hosts.equiv, cos che ogni client
  pu eseguire una shell remota (rsh) in tutti gli altri. La macchina
  server  anche server NIS per tutto il laboratorio, cos che tutti gli
  account sono comuni in tutte le macchine. Una persona pu sedersi
  davanti alla console di scilab02 ed avere la stessa configurazione
  come se si fosse fatto il login nel server o nel client scilab15. La
  ragione per la quale tutti i client hanno lo stesso look and feel 
  che il sistema operativo  installato e configurato allo stesso modo
  su tutte le macchine e che sia /home che /usr/local sono fisicamente
  sul server e condivise da tutti i client via NFS. Per maggiori
  informazioni a proposito di NIS e NFS guardate i relativi HOWTO a NIS
  e NFS.



  3.2.  Come usare gli altri nodi?


  Ora che abbiamo un'idea circa l'architettura del sistema, diamo
  un'occhiata a come possiamo utilizzare i cicli di CPU disponibili nei
  computer del laboratorio. Ogni persona pu fare il login in ogni
  macchina, e far girare un programma nella sua directory home, ma pu
  anche distribuire il lavoro su macchine differenti semplicemente
  eseguendo shell remote. Per esempio, mettiamo che vogliamo calcolare
  la somma delle radici quadrate di tutti gli interi compresi fra 1 e
  10.  Scriviamo un programma chiamandolo sigmassqrt (vedi ``Codice
  sorgente'') che fa proprio questo. Per calcolare la somma delle radici
  quadrate dei numeri da 1 a 10 noi eseguiamo:


  [jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 10 22.468278

  real    0m0.029s
  user    0m0.001s
  sys     0m0.024s



  Il comando time ci permette di controllare il tempo trascorso per
  completare l'altro comando. Come possiamo vedere, questo esempio ha
  necessitato solo una frazione di secondo (0,029 sec), ma cosa
  succederebbe se io volessi conoscere la somma delle radici quadrate
  degli interi compresi fra 1 e 1 000 000 000 (un miliardo)? Riproviamo
  e ricontrolliamo il tempo necessario.


  [jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 1000000000
  21081851083600.559000

  real    16m45.937s
  user    16m43.527s
  sys     0m0.108s



  Questa volta il tempo di esecuzione  decisamente maggiore. L'ovvia
  domanda che sorge  cosa possiamo fare per abbreviare il tempo di
  esecuzione di questo programma? Come possiamo cambiare il modo in cui
  si esegue questo programma per ridurne il tempo di esecuzione? L'ovvia
  risposta  quella di dividere il lavoro in una serie di sotto-compiti
  e di farli girare in parallelo su tutti i computer. Noi possiamo
  dividere il calcolo di una grossa addizione in 20 parti, calcolare una
  serie di radici quadrate e farli girare su ogni nodo. Quando tutti i
  nodi finiscono il calcolo e restituiscono i loro risultati, i 20
  numeri possono essere sommati per ottenere il risultato finale. Prima
  di far girare questo programma noi faremo una named pipe che verr
  usata da tutti i processi per scrivere il loro risultato.


  [jacek@beldin sigmasqrt]$ mkfifo output
  [jacek@beldin sigmasqrt]$ ./prun.sh & time cat output | ./sum
  [1] 5085
  21081851083600.941000
  [1]+  Done                    ./prun.sh

  real    0m58.539s
  user    0m0.061s
  sys     0m0.206s




  Il tempo che otteniamo  di circa 58,5 secondi. Questo  il tempo
  trascorso dall'inizio del programma fino alla restituzione all'interno
  della pipe dei risultati di tutti i nodi. Il tempo cos calcolato non
  include la somma finale dei venti numeri, ma questo tempo  molto
  breve e pu essere trascurato. Possiamo cos vedere che c' un
  notevole miglioramento eseguendo questo programma in parallelo. In
  effetti il programma parallelo ha girato 17 volte pi velocemente, che
   un buon risultato avendo incrementato di 20 volte il numero di CPU
  coinvolte.  Lo scopo di questo esempio  quello di far vedere il
  metodo pi semplice di realizzare codice parallelo concorrente. In
  pratica per esempi cos semplici sono rari ma vengono usate altre
  tecniche (le API PVM e PMI) per ottenere il parallelismo.


  3.3.  In cosa Beowulf  differente da un COW ?


  Il laboratorio di computer descritto sopra  un perfetto esempio di un
  Cluster di Workstation (COW). E allora cosa ha tanto di speciale
  Beowulf e in cosa  diverso da un COW? La verit  che non c' una
  grande differenza, ma Beowulf ha alcune caratteristiche peculiari.
  Innanzitutto in molti casi i nodi client di un cluster Beowulf non
  hanno tastiere, mouse, schede video n monitor. Tutti gli accessi ai
  nodi client sono realizzati in remoto dal nodo server, nodi che
  fungono solo da console o da un terminale seriale. Poich non c'
  bisogno per i nodi client di accedere a computer al di fuori del
  cluster, n per computer esterni al cluster di accedere direttamente
  ai nc,  pratica comune dotare i nc di IP privati come gli indirizzi
  compresi in 10.0.0.0/8 o 192.168.0.0/16 (vedi RFC 1918
  http://www.alternic.net/rfcs/1900/rfc1918.txt.html). Normalmente
  l'unica macchina connessa all'esterno con una seconda scheda di rete 
  il nodo server. Il modo pi comune per usare un sistema di questo tipo
   di usare la console del ns, oppure di entrare in telnet o shell
  remota dal computer personale. Una volta sul ns, gli utenti possono
  modificare e compilare il loro codice e anche suddividere i loro
  programmi su tutti i nodi del cluster. In molti casi i COW sono usati
  per calcoli paralleli la notte e durante i fine settimana quando gli
  utenti non usano effettivamente i computer per i compiti di tutti i
  giorni, utilizzando cos cicli idle di CPU. Beowulf d'altra parte 
  una macchina dedicata normalmente solo al calcolo parallelo e
  ottimizzato per questo scopo. Beowulf inoltre ha un miglior rapporto
  fra prezzo e prestazioni poich  realizzato da componenti di facile
  reperibilit e usa normalmente software gratuito. Beowulf ha inoltre
  un'immagine pi da sistema singolo cosa che aiuta gli utenti a vedere
  un cluster Beowulf come una singola workstation


  4.  Progetto del sistema


  Prima di acquistare dell'hardware,  sempre una buona idea prendere in
  considerazione il progetto del sistema che si intende realizzare.
  Fondamentalmente ci sono due questioni relative al progetto di un
  sistema Beowulf: il tipo di nodi (cio di computer) da usare e il modo
  in cui tali nodi sono connessi. C' una questione relativa al
  software, che pu influire sulle decisioni che riguardano l'hardware:
  la libreria di comunicazione (API). Nel seguito di questo documento
  verr fatta una discussione pi dettagliata riguardo all'hardware e al
  software di comunicazione.



  Anche se il numero di possibilit non  elevato, quando si costruisce
  un Beowulf, ci sono comunque alcune importanti decisioni di progetto
  da prendere. Poich la scienza (o l'arte) della "computazione
  parallela" ha molte interpretazioni differenti, qui di seguito ne
  viene data un'introduzione. Se non ti piace leggere materiale di
  rassegna, puoi saltare questa sezione, ma sei vivamente invitato a
  leggere la sezione ``Fattibilit'' prima di prendere le decisioni
  finali relative all'hardware.


  4.1.  Una breve rassegna sulla computazione parallela


  Questa sezione fornisce una rassegna sui concetti della computazione
  parallela.  NON  una descrizione completa n esauriente della scienza
  e tecnologia della computazione parallela.  una breve descrizione
  delle questioni che possono essere importanti per un progettista o per
  un utente Beowulf.



  Mentre progetti e costruisci il tuo Beowulf, molte delle questioni che
  vengono descritte sotto diventeranno importanti nel processo delle tue
  decisioni. A causa della natura dei suoi componenti, un supercomputer
  Beowulf richiede che si prendano attentamente in considerazione molti
  fattori che adesso vengono a essere sotto il nostro controllo. In
  generale, non  cos difficile comprendere le questioni relative alla
  computazione parallela. In realt, una volta che le questioni sono
  comprese, le tue aspettative saranno pi realistiche e avrai una
  maggiore probabilit di successo. A differenza del "mondo
  sequenziale", in cui la velocit del processore  considerato il solo
  fattore che ha la massima importanza, la velocit dei processori nel
  "mondo parallelo"  solo uno dei vari fattori che determineranno le
  prestazioni e l'efficienza del sistema complessivo.




  4.2.  I metodi della computazione parallela


  La computazione parallela pu assumere molte forme. Dal punto di vista
  dell'utente  importante considerare vantaggi e svantaggi di ciascuna
  metodologia. La sezione seguente tenta di dare diverse prospettive sui
  metodi della computazione parallela e indica dove va a cadere una
  macchina Beowulf all'interno di questo continuum.


  4.2.1.  Perch pi di una CPU?


   importante rispondere a questa domanda. Usare 8 CPU per eseguire un
  word processor suona un po' "over-kill" -- e in effetti lo . Ma cosa
  dire di un server web, una base di dati, un programma di rendering o
  uno schedulatore di progetti? Forse pi CPU potrebbero essere d'aiuto.
  E cosa dire di una simulazione complessa, un codice che studia la
  dinamica dei fluidi, o un'applicazione di estrazione di dati? In
  queste situazioni, pi CPU sono sicuramente d'aiuto. In effetti,
  sistemi con CPU multiple vengono usati per risolvere sempre pi
  problemi.



  Generalmente la successiva domanda : "Perch ho bisogno di due o
  quattro CPU? Aspetter semplicemente il chip iper-turbo 986." Ci sono
  varie ragioni:


  1. Grazie all'uso di sistemi operativi multi-tasking,  possibile fare
     pi cose alla volta. Questo  un "parallelismo" naturale che 
     facilmente sfruttato da pi CPU a basso costo.

  2. La velocit dei processori va raddoppiando ogni 18 mesi, ma cosa
     dire delle velocit delle RAM e degli hard disk? Purtroppo, queste
     velocit non stanno aumentando velocemente cos come quelle delle
     CPU.  Si tenga presente che la maggior parte delle applicazioni
     richiedono "accessi in memoria fuori cache" e accessi agli hard
     disk. Un modo per aggirare alcune di queste limitazioni consiste
     nel fare pi cose in parallelo.

  3. Le previsioni indicano che le velocit dei processori non
     continueranno a raddoppiare ogni 18 mesi dopo l'anno 2005. Per
     poter mantenere questa tendenza ci sono alcuni ostacoli molto ardui
     da superare.

  4. A seconda dell'applicazione, la computazione parallela pu
     velocizzare l'esecuzione di un fattore da 2 a 500 volte (in qualche
     caso anche di pi). Tali performance non sono disponibili usando un
     singolo processore. Anche i supercomputer che un tempo usavano
     processori molto veloci, adesso sono costruiti utilizzando pi CPU
     reperibili comunemente.

  Se hai bisogno di velocit - sia a causa di un problema di limiti
  della computazione che di un problema di limiti nell'I/O, vale la pena
  considerare il parallelismo. Poich la computazione parallela 
  implementata in vari modi, per risolvere il tuo problema con il
  parallelismo dovranno essere prese alcune decisioni molto importanti.
  Queste decisioni possono avere effetti decisivi sulla portabilit, la
  performance e il costo della tua applicazione.



  Prima di entrare nei dettagli tecnici, diamo uno sguardo a un
  "problema di computazione parallela" reale, usando un esempio con il
  quale abbiamo familiarit: l'attesa in lunghe code a un negozio.


  4.2.2.  Il negozio della computazione parallela


  Immaginiamo un grande negozio con 8 registratori di cassa raggruppati
  insieme nella parte anteriore del negozio.  Assumiamo che ogni
  cassiere/registratore corrisponda a una CPU e ogni cliente a un
  programma di computer. La dimensione del programma di computer (il
  carico di lavoro) corrisponde alla dimensione della spesa del cliente.
  Per illustrare i concetti della computazione parallela possono essere
  usate le seguenti analogie.



  4.2.2.1.  Sistema operativo Single-tasking


  Un solo registratore di cassa  aperto (in uso) e deve servire ogni
  cliente, uno alla volta.


  Esempio relativo ai computer: MS DOS



  4.2.2.2.  Sistemi operativi Multi-tasking:


  Un solo registratore di cassa  aperto, ma adesso viene servita solo
  una parte di una spesa per volta, si passa al prossimo cliente e si
  serve una parte della sua spesa. I clienti "sembrano" muoversi lungo
  la coda insieme, ma se oltre a te non ci sono altri clienti, verrai
  servito pi velocemente.


  Esempio relativo ai computer: UNIX, NT utilizzante una singola CPU



  4.2.2.3.  Sistemi operativi Multitasking con pi CPU:


  Adesso apriamo pi registratori di cassa nel negozio. Ogni cliente pu
  essere servito da un registratore di cassa separato e la coda pu
  muoversi pi velocemente. Questa viene chiamata SMP - Multi-
  elaborazione simmetrica (Symmetric Multi-processing). Sebbene ci siano
  pi registratori di cassa aperti, continuerai a non muoverti lungo la
  coda pi velocemente del caso in cui ci sei solo tu e un solo
  registratore di cassa.


  Esempio relativo ai computer: UNIX e NT con pi CPU



  4.2.2.4.  Thread su un sistema operativo multitasking con pi CPU:


  Se "spezzi" gli articoli della tua spesa, puoi muoverti pi
  velocemente sulla coda usando pi registratori di cassa allo stesso
  tempo.  Innanzitutto, dobbiamo ipotizzare un gran guadagno, perch il
  tempo investito nello "spezzare la spesa" deve essere riguadagnato
  usando pi registratori di cassa. In teoria, dovresti muoverti lungo
  la coda "n" volte pi veloce di prima, dove "n"  il numero di
  registratori di cassa.  Quando i cassieri hanno bisogno dei totali
  parziali, possono scambiarsi velocemente informazioni guardando e
  parlando a ogni altro registratore di cassa "locale". Possono anche
  curiosare ai registratori di cassa vicini per cercare informazioni di
  cui hanno bisogno per lavorare pi velocemente. Comunque, c' un
  limite al numero di registratori di cassa che possono trovarsi in un
  punto del negozio.

  La legge di Amdal, inoltre, limiter la velocit dell'applicazione
  alla porzione sequenziale del programma pi lenta.
  Esempio relativo ai computer: UNIX oppure NT con extra CPU sulla
  stessa scheda madre che eseguono programmi multi-threaded.



  4.2.2.5.  Invio di messaggi su sistemi operativi multitasking con pi
  CPU:


  Al fine di migliorare la performance, il negozio aggiunge 8
  registratori di cassa sul retro del negozio. Poich i nuovi
  registratori di cassa sono lontani da quelli che si trovano sul
  davanti, i cassieri devono chiamare questi al telefono per comunicare
  i loro totali parziali. Tale distanza aggiunge un sovraccarico (di
  tempo) alla comunicazione tra cassieri, ma se le comunicazioni sono
  minimizzate, ci non costituisce un problema. Se fai una spesa davvero
  molto grande, tale da richiedere tutti i registratori di cassa,
  allora, come avveniva prima, la velocit pu essere aumentata usando
  tutti i registratori di cassa allo stesso tempo, e il sovraccarico va
  riconsiderato. In qualche caso, il negozio pu avere singoli
  registratori di cassa (o gruppi isolati di registratori di cassa)
  sparsi per il negozio: ogni registratore di cassa (o isola) deve
  comunicare via telefono. Poich tutti i cassieri possono comunicare
  l'un l'altro attraverso il telefono, non  molto importante dove si
  trovano.

  Esempio relativo ai computer: una o pi copie di UNIX o NT con pi CPU
  sulla stessa o su differenti schede madri, che comunicano attraverso
  messaggi.

  Gli scenari descritti sopra, sebbene non esatti, sono una buona
  rappresentazione dei vincoli posti sui sistemi paralleli. A differenza
  di sistemi con singola CPU (o registratore di cassa), qui va presa in
  considerazione la possibilit di comunicazione tra diverse CPU.


  4.3.  Architetture per la computazione parallela


  Di seguito vengono presentati i metodi e le architetture comuni della
  computazione parallela. Sebbene la presente trattazione non sia
  sicuramente esauriente,  sufficiente per comprendere le questioni
  fondamentali relative a un progetto Beowulf.


  4.3.1.  Architetture Hardware


  Ci sono fondamentalmente due modi in cui viene messo insieme
  l'hardware dei computer paralleli:


  1. Macchine con memoria locale che comunicano mediante messaggi
     (clusters Beowulf)

  2. Macchine con memoria condivisa che comunicano attraverso la memoria
     (macchine SMP)

  Un tipico Beowulf  un insieme di macchine con singola CPU, connesse
  usando fast Ethernet ed , pertanto, una macchina a memoria locale.
  Una macchina SMP a 4 vie  una macchina a memoria condivisa e pu
  essere usata per fare computazioni parallele - applicazioni parallele
  che comunicano usando la memoria condivisa. Proprio come nell'esempio
  dell'analogia negozio-computer, le macchine a memoria locale
  (registratori di cassa individuali) possono essere scalati a grandi
  numeri di CPU, mentre il numero di CPU in macchine a memoria condivisa
  (il numero di registratori di cassa che si possono mettere in un
  punto) pu essere limitato a causa di conflitti nell'accesso alla
  memoria.

   possibile, comunque, connettere molte macchine a memoria condivisa
  per creare una macchina a memoria condivisa "ibrida". Queste macchine
  ibride "appaiono" all'utente come una grande macchina SMP singola e
  sono spesso chiamate macchine NUMA (accesso in memoria non uniforme),
  perch la memoria globale vista dal programmatore e condivisa da tutte
  le CPU pu avere differenti ritardi. A qualche livello, comunque, una
  macchina NUMA deve "inviare messaggi" tra gruppi di memorie localmente
  condivise.

   anche possibile connettere macchine SMP come nodi di computazione a
  memoria locale. Le tipiche schede madri della CLASSE I hanno 2 o 4 CPU
  e sono usate spesso come un mezzo per ridurre il costo del sistema
  complessivo. Lo schedulatore interno di Linux determina come queste
  CPU ottengono le risorse condivise. L'utente non pu (a questo punto)
  assegnare uno specifico task a uno specifico processore SMP. L'utente
  pu, comunque, iniziare due processi indipendenti oppure un processo
  multithreaded e aspettarsi un aumento di performance rispetto a un
  sistema avente una singola CPU.


  4.3.2.  Architetture API software


  Ci sono fondamentalmente due modi per "esprimere" la concorrenza in un
  programma:


  1. Usare l'invio di messaggi tra processori

  2. Usare i thread del sistema operativo


  Esistono altri metodi, ma questi due sono quelli pi largamente usati.
   importante ricordare che l'espressione della concorrenza non 
  necessariamente controllata dall'hardware sottostante. Sia lo scambio
  di messaggi che i thread possono essere implementati su SMP, NUMA-SMP
  e cluster - sebbene, come spiegato sotto, l'efficienza e la
  portabilit sono questioni importanti.




  4.3.2.1.  Messaggi


  Storicamente, la tecnologia dello scambio di messaggi rifletteva il
  modello dei primi computer paralleli a memoria locale. I messaggi
  richiedono un'operazione di copia dei dati, mentre i thread,
  corrispondentemente, usano dati. I ritardi e le velocit alle quali i
  messaggi possono essere copiati sono i fattori limitanti dei modelli a
  scambio di messaggi. Un messaggio  piuttosto semplice: qualche dato e
  un processore destinatario. Le API comuni per lo scambio di messaggi
  sono PVM oppure MPI. Lo scambio di messaggi pu essere implementato
  efficientemente usando i thread, quindi i messaggi funzionano bene sia
  su macchine SMP che tra cluster di macchine. Il vantaggio nell'uso dei
  messaggi su una macchina SMP, invece del normale uso dei thread,  che
  se decidi in futuro di usare cluster,  facile aggiungere macchine o
  scalare le tue applicazioni.




  4.3.2.2.  Thread


  I thread del sistema operativo sono stati sviluppati poich i progetti
  di SMP (multi-elaborazione simmetrica) a memoria condivisa
  consentivano una comunicazione e sincronizzazione molto veloci, tra
  parti concorrenti di un programma. I thread funzionano bene su sistemi
  SMP perch la comunicazione avviene attraverso la memoria condivisa.
  Per questa ragione l'utente deve isolare i dati locali da quelli
  globali, altrimenti i programmi non gireranno nel modo corretto. A
  differenza dei messaggi, con i thread una buona parte di copiatura pu
  essere evitata, perch i dati sono condivisi dai processi (thread).
  Linux supporta i thread POSIX. Il problema con i thread  che 
  difficile estenderli oltre una macchina SMP e poich i dati sono
  condivisi dalle CPU, le questioni relative alla coerenza delle cache
  pu contribuire al sovraccarico.  Estendere i thread oltre i limiti
  della SMP in modo efficiente richiede la tecnologia NUMA che  costosa
  e non supportata da Linux in forma nativa. I thread sono stati
  implementati sopra i messaggi
  ((http://syntron.com/ptools/ptools_pg.htm)), ma i thread implementati
  usando i messaggi sono spesso inefficienti.



  Riguardo alla performance si pu affermare quanto segue:



                 performance di       performance di un         scalabilit
                 una macchina SMP     cluster di macchine
                 ----------------     -------------------       -----------
  messaggi       buona                ottima                    ottima

  thread         ottima               scarsa*                   scarsa*

  * richiede una tecnologia NUMA costosa.




  4.3.3.  Architettura dell'applicazione


  Per poter eseguire un'applicazione in parallelo su pi CPU, occorre
  suddividerla in parti concorrenti. Un'applicazione progettata per una
  singola CPU, non verr eseguita pi velocemente di un'applicazione per
  singola CPU su una macchina multiprocessore.

  Ci sono alcuni strumenti e compilatori che possono suddividere i
  programmi, ma parallelizzare il codice, non  un'operazione
  "plug'n'play". A seconda del tipo di applicazione, parallelizzare il
  codice pu essere facile, estremamente difficile o addirittura
  impossibile, in base alle dipendenze dell'algoritmo.



  Prima di affrontare la questione del software, occorre introdurre il
  concetto di Fattibilit.


  4.4.  Fattibilit


  Molte domande relative all'elaborazione parallela, hanno la stessa
  risposta:

  "Dipende dall'applicazione"



  Prima di addentrarsi nel problema, c' un'importante distinzione da
  fare - la differenza tra CONCORRENTE e PARALLELO.  Per il gusto della
  discussione definiremo cos questi due concetti:



  CONCORRENTI: parti di un programma che possono essere eseguite
  indipendentemente.



  PARALLELE:  parti CONCORRENTI di un programma eseguite da processori
  diversi nello stesso momento.



  La distinzione  molto importante, poich la CONCORRENZA  una
  propriet del programma, mentre il PARALLELISMO  una propriet della
  macchina.  Idealmente un'esecuzione parallela dovrebbe risultare in
  prestazioni pi veloci. Il fattore limitante nelle prestazioni
  parallele  la velocit di comunicazione e la latenza fra i nodi (la
  latenza esiste anche con applicazioni i cui thread sono eseguiti su
  CPU diverse, a causa della necessit di controllare la coerenza della
  cache - cache coherency).  Molti dei comuni benchmark paralleli sono
  altamente paralleli, quindi latenza e comunicazione non costituiscono
  colli di bottiglia. Questo tipo di problema pu essere chiamato
  "ovviamente parallelo". Altre applicazioni non sono cos semplici ed
  eseguire parti CONCORRENTI del programma in PARALLELO potrebbe causare
  un rallentamento del programma, vanificando cos ogni miglioramento di
  prestazioni ottenuto nelle parti CONCORRENTI del programma. In altre
  parole, il tempo di comunicazione impiegato deve essere proporzionato
  con quello impiegato nell'elaborazione, altrimenti l'esecuzione
  PARALLELA di parti CONCORRENTI  inefficiente.



   compito del programmatore determinare quali parti CONCORRENTI del
  programma devono essere eseguite in PARALLELO e quali NO. La risposta
  a ci determiner l'EFFICIENZA dell'applicazione. Il grafico che
  segue, riassume la situazione per il programmatore:






















           | *
           | *
           | *
   % di    | *
   appli-  |  *
   cazione |  *
           |  *
           |  *
           |    *
           |     *
           |      *
           |        ****
           |            ****
           |                ********************
           +-----------------------------------
            tempo di comunicazione/tempo di elaborazione




  In un perfetto computer parallelo, il rapporto fra comunicazione e
  elaborazione sarebbe uguale, e tutto ci che fosse CONCORRENTE
  potrebbe essere implementato in PARALLELO. Sfortunatamente computer
  paralleli reali, incluse macchine con memoria condivisa, sono soggette
  agli effetti descritti nel grafico. Chi progetta un Beowulf, tenga in
  mente questo grafico, perch l'efficienza dell'elaborazione parallela
  dipende dal rapporto fra tempo di comunicazione e tempo di
  elaborazione per UNO SPECIFICO COMPUTER PARALLELO. Le applicazioni
  possono essere portabili fra computer paralleli, ma non c' garanzia
  che saranno efficienti su una piattaforma differente.



  IN GENERALE, NON ESISTE UN PROGRAMMA PARALLELO PORTABILE ED
  EFFICIENTE.



  C' ancora un'altra conseguenza del grafico di cui sopra. Poich
  l'efficienza dipende dal rapporto comunic./elab., cambiare un solo
  componente del rapporto non significa, necessariamente, che
  un'applicazione sar pi veloce. Un processore pi veloce, mantenendo
  la stessa velocit di comunicazione, potrebbe non avere effetti
  visibili sul programma. Per esempio, raddoppiando o triplicando la
  velocit della CPU, mantenendo la stessa velocit di comunicazione,
  potrebbe far s che alcune porzioni che prima erano eseguite in
  PARALLELO, adesso siano pi efficienti se eseguite SEQUENZIALMENTE.
  Quindi, adesso potrebbe essere pi veloce eseguire le parti che prima
  erano PARALLELE, come SEQUENZIALI.  Inoltre, una inefficiente
  esecuzione di porzioni parallele, impedir all'applicazione di
  raggiungere la sua massima velocit. Quindi l'aggiunta di un
  processore pi veloce potrebbe rallentare l'applicazione (impedendo
  alla nuova CPU di raggiungere la sua massima velocit, per
  quell'applicazione).



  SOSTITUIRE LA CPU CON UNA PI VELOCE, POTREBBE RALLENTARE
  L'APPLICAZIONE.



  In conclusione, quindi, per sapere se usare o no un'architettura
  parallela, occorre avere un po' di intuito circa l'adeguatezza di una
  particolare macchina per un'applicazione.  Occorre tener presente
  svariati fattori, incluso la velocit della CPU, il compilatore, le
  "message passing API", la rete, ecc. Inoltre occorre tener presente
  che l'aver tracciato lo schema di un'applicazione non  tutto.

   possibile identificare una porzione del programma in cui  richiesta
  una pesante elaborazione, ma non  possibile conoscerne il costo in
  termini di comunicazione. Potrebbe essere che, per un certo sistema, i
  costi di comunicazione rendano inefficiente l'esecuzione in parallelo
  del codice.



  Una nota finale su un malinteso comune. Spesso viene detto che un
  programma  PARALLELIZZATO, ma in realt solo le parti CONCORRENTI lo
  sono. Per tutte le ragioni dette sopra, il programma non 
  PARALLELIZZATO. Un'efficiente PARALLELIZZAZIONE  una propriet della
  macchina.



  4.5.  Scrittura e porting di software parallelo


  Una volta stabilita la necessit della computazione parallela e quindi
  di costruire un Beowulf, potrebbe essere una buona idea ripensare
  all'applicazione in base a quanto detto precedentemente.



  In generale ci sono due cose che possono essere fatte:

  1. Andare avanti e costruire un Beowulf di classe I e quindi adattare
     ad esso l'applicazione. O eseguire applicazioni parallele che
     sappiamo funzioneranno su tale Beowulf (ma attenzione alla
     portabilit e all'efficienza di cui sopra).

  2. Studiare le applicazioni che verranno eseguite sul Beowulf e fare
     alcune stime sul tipo di hardware e software di cui c' bisogno.

  In altri casi, in qualche momento, occorrer prendere in
  considerazione i fattori relativi all'efficienza.

  In generale possono essere fatte tre cose:

  1. Determinare le parti concorrenti di un programma

  2. Stimare efficientemente le porzioni parallele

  3. Descrivere le parti concorrenti

  Esaminiamole una per una


  4.5.1.  Determinare le parti concorrenti di un programma


  Questo passo  spesso considerato come "parallelizzazione del
  programma".  Le decisioni sulle parallelizzazioni, verranno prese nel
  passo 2. In questo passo occorre determinare le data dependencies.



  Da un punto di vista pratico, le applicazioni possono esporre due tipi
  di concorrenza: pesanti elaborazioni (macina numeri, "number
  crunching") e I/O (database). Sebbene in molti casi la concorrenza di
  elaborazione e I/O sono ortogonali, ci sono applicazioni che li
  richiedono entrambi.  Esistono alcuni strumenti che possono effettuare
  una analisi di concorrenza sulle applicazioni esistenti.  La maggior
  parte di questi strumenti sono progettati per il FORTRAN. Due sono le
  ragioni per cui viene utilizzato il FORTRAN: storicamente la maggior
  parte di applicazioni che effettuano numerosi calcoli sono state
  scritte in FORTRAN ed  pi facile da analizzare. Se non ci sono
  strumenti disponibili, questo passo pu essere complicato, per le
  applicazioni esistenti.




  4.5.2.  Stima dell'efficienza parallela


  Senza l'aiuto di strumenti, questo passo pu richiedere prove ed
  errori, o solo provare formulare delle ipotesi. Per ogni specifica
  applicazione occorre provare a determinare se ha dei limiti di CPU
  (legati all'elaborazione) o di hard disk (legati all'I/O). Le esigenze
  di Beowulf possono differire in base alle necessit. Per esempio un
  problema legato all'elaborazione pu aver bisogno di poche CPU molto
  veloci e una rete molto veloce, mentre un problema legato all'I/O pu
  funzionare meglio con pi CPU pi lente e una fast Ethernet.



  Questa raccomandazione, in genere,  una sorpresa per molte persone,
  perch  un luogo comune che i processori pi veloci sono sempre
  meglio.  Questo  vero se si dispone di un budget illimitato, i
  sistemi reali possono avere vincoli di costo che occorre valutare. Per
  i problemi legati all'I/O, c' una regola poco conosciuta (chiamata
  Legge Eadline-Dedkov) che  abbastanza utile:



  Poich due computer paralleli con lo stesso indice di prestazioni per
  la somma delle CPU, quello che ha i processori pi lenti (e
  probabilmente una corrispondente rete di comunicazione pi lenta fra i
  processori) avr prestazioni migliori per quelle applicazioni che
  fanno largo uso di I/O.



  Mentre la profondit di questa regola va oltre lo scopo di questo
  documento, potrebbe essere interessante scaricare il documento
  Performance Considerations for I/O-Dominant Applications on Parallel
  Computers (Postscript format 109K)
  (ftp://www.plogic.com/pub/papers/exs-pap6.ps)



  Una volta determinato il tipo di concorrenza dell'applicazione,
  occorre stimare quanto possa essere efficiente in parallelo. Vedere la
  sezione ``Software'' per una descrizione degli strumenti Software.



  In assenza di strumenti, occorre provare ad ipotizzare la propria
  strada, in questa fase. Se un'elaborazione che richiede molta cpu pu
  essere misurata in minuti e i dati possono essere trasferiti in
  secondi, allora potrebbe essere una buona candidata per la
  parallelizzazione. Occorre ricordare, per, che se un loop di 16
  minuti viene suddiviso in 32 parti, il trasferimento dei dati richiede
  diversi secondi per parte, allora le cose potranno essere difficili.
  Si raggiunger un punto in cui i ritorni sono ridotti.


  4.5.3.  Descrizione delle parti concorrenti di un programma

  Ci sono diversi modi per descrivere le parti concorrenti di un
  programma:


  1. Esecuzione parallela esplicita

  2. Esecuzione parallela implicita

  La maggiore differenza fra le due  che l'esplicita  determinata
  dall'utente, mentre l'implicita  determinata dal compilatore.


  4.5.3.1.  In pratica l'utente deve specificatamente modificare il
  codice sorgente per un computer parallelo. L'utente deve aggiungere
  messaggi usando PVM oMPI o aggiungere thread usando i thread POSIX
  (occorre ricordare, per, che i thread non si possono muovere fra
  piastre madri SMP).  Metodi espliciti


  I metodi espliciti sono i pi difficili da implementare e da mettere
  sotto debug. Gli utenti, in genere, includono chiamate a funzioni
  esplicite in sorgenti standard FORTRAN 77 o C/C++. Alla libreria MPI
  sono state aggiunte alcune funzioni per rendere pi facili da
  implementare alcuni metodi paralleli standard (ad es. le funzioni
  scatter/gather). Inoltre  possibile usare librerie standard scritte
  per computer paralleli. Occorre considerare sempre, per il rapporto
  fra portabilit ed efficienza).



  Per ragioni storiche, la maggior parte dei sorgenti di programmi che
  effettuano pesanti calcoli ("number crunching") sono scritti in
  FORTRAN.  Per questo motivo, il FORTRAN ha il supporto maggiore
  (strumenti, librerie, ecc.) per l'elaborazione parallela. Molti
  programmatori, adesso, utilizzano il C o riscrivono in C vecchie
  applicazioni scritte in FORTRAN con l'idea che il C permetter
  un'esecuzione pi veloce.  Questo  vero, dal momento che il C 
  quanto di pi vicino ad un linguaggio macchina universale, ma ha anche
  alcuni svantaggi.  L'utilizzo di puntatori, in C, rende estremamente
  difficile determinare le dipendenze fra i dati. Se avete un programma
  FORTRAN e pensate di parallelizzarlo, NON CONVERTITELO IN C!



  4.5.3.2.  Metodi Impliciti


  Sono quelli in cui l'utente lascia alcune (o tutte) decisioni di
  parallelizzazione al compilatore. Esempi sono FORTRAN 90, High
  Performance FORTRAN (HPF), Bulk Synchronous Parallel (BSP) e un'intera
  collezione di altri metodi che sono sotto sviluppo.



  I metodi impliciti richiedono che l'utente fornisca alcune
  informazioni circa la natura concorrente dell'applicazione, ma il
  compilatore, poi, prender la decisione di come eseguire, questa
  concorrenza, in parallelo.  Questi metodi forniscono alcuni livelli di
  portabilit ed efficienza, ma non c' ancora alcun "modo perfetto" per
  descrivere un problema concorrente per un'elaborazione parallela.




  5.  Risorse per Beowulf



  5.1.  Per cominciare



    La mailing list di Beowulf.  Per iscriversi mandare un messaggio a
     beowulf-request@cesdis.gsfc.nasa.gov con la parola subscribe nel
     corpo del messaggio.

    La homepage di Beowulf http://www.beowulf.org

    Extreme Linux http://www.extremelinux.org

    Extreme Linux Software di Red Hat http://www.redhat.com/extreme



  5.2.  Documentazione



    L'ultima versione del Beowulf HOWTO
     http://www.sci.usq.edu.au/staff/jacek/beowulf.

    Costruire un sistema Beowulf
     http://www.cacr.caltech.edu/beowulf/tutorial/building.html

    I link di Jacek su Beowulf
     http://www.sci.usq.edu.au/staff/jacek/beowulf.

    Beowulf Installation and Administration HOWTO (DRAFT)
     http://www.sci.usq.edu.au/staff/jacek/beowulf.

    Linux Parallel Processing HOWTO
     http://yara.ecn.purdue.edu/~pplinux/PPHOWTO/pphowto.html



  5.3.  Documenti cartacei



    Chance Reschke, Thomas Sterling, Daniel Ridge, Daniel Savarese,
     Donald Becker, and Phillip Merkey A Design Study of Alternative
     Network Topologies for the Beowulf Parallel Workstation.
     Proceedings Fifth IEEE International Symposium on High Performance
     Distributed Computing, 1996.
     http://www.beowulf.org/papers/HPDC96/hpdc96.html


    Daniel Ridge, Donald Becker, Phillip Merkey, Thomas Sterling
     Becker, and Phillip Merkey. Harnessing the Power of Parallelism in
     a Pile-of-PCs.  Proceedings, IEEE Aerospace, 1997.
     http://www.beowulf.org/papers/AA97/aa97.ps


    Thomas Sterling, Donald J. Becker, Daniel Savarese, Michael R.
     Berry, and Chance Res. Achieving a Balanced Low-Cost Architecture
     for Mass Storage Management through Multiple Fast Ethernet Channels
     on the Beowulf Parallel Workstation.  Proceedings, International
     Parallel Processing Symposium, 1996.
     http://www.beowulf.org/papers/IPPS96/ipps96.html

    Donald J. Becker, Thomas Sterling, Daniel Savarese, Bruce Fryxell,
     Kevin Olson. Communication Overhead for Space Science Applications
     on the Beowulf Parallel Workstation.  Proceedings,High Performance
     and Distributed Computing, 1995.
     http://www.beowulf.org/papers/HPDC95/hpdc95.html



    Donald J. Becker, Thomas Sterling, Daniel Savarese, John E.
     Dorband, Udaya A. Ranawak, Charles V.  Packer. BEOWULF: A PARALLEL
     WORKSTATION FOR SCIENTIFIC COMPUTATION.  Proceedings, International
     Conference on Parallel Processing, 95.
     http://www.beowulf.org/papers/ICPP95/icpp95.html

    Papers at the Beowulf site
     http://www.beowulf.org/papers/papers.html




  5.4.  Software


    PVM - Parallel Virtual Machine
     http://www.epm.ornl.gov/pvm/pvm_home.html



    LAM/MPI (Local Area Multicomputer / Message Passing Interface)
     http://www.mpi.nd.edu/lam

    BERT77 - FORTRAN conversion tool http://www.plogic.com/bert.html

    Beowulf software from Beowulf Project Page
     http://beowulf.gsfc.nasa.gov/software/software.html

    Jacek's Beowulf-utils ftp://ftp.sci.usq.edu.au/pub/jacek/beowulf-
     utils

    Beowulfatch - cluster monitoring tool
     http://www.sci.usq.edu.au/staff/jacek/Beowulfatch




  5.5.  Macchine Beowulf


    Avalon  composto da 140 processori Alpha, 36 GB di RAM ed 
     probabilmente la pi veloce macchina Beowulf, viaggiando a 47,7
     Gigaflop e si trova al 114 posto della lista dei 500 computer pi
     veloci. http://swift.lanl.gov/avalon/

    Megalon-A Massively PArallel CompuTer Resource (MPACTR)   composto
     da 14 nodi CPU Pentium Pro quadriprocessore 200 e da 14 GB di RAM.
     http://megalon.ca.sandia.gov/description.html

    theHIVE - Highly-parallel Integrated Virtual Environment  un altro
     veloce Supercomputer Beowulf.  theHIVE  composto da 64 nodi, 128
     CPU per un totale di 4 GB RAM. http://newton.gsfc.nasa.gov/thehive/

    Topcat  una macchina molto pi piccola e consiste di 16 CPU e da
     1,2 GB di RAM. http://www.sci.usq.edu.au/staff/jacek/topcat

    MAGI cluster - questo  un sito molto interessante con molti link
     interessanti. http://noel.feld.cvut.cz/magi/
  5.6.  Altri siti interessanti



    SMP Linux http://www.linux.org.uk/SMP/title.html

    Paralogic - Buy a Beowulf http://www.plogic.com


  5.7.  Storia


    Leggende - Beowulf  http://legends.dm.net/beowulf/index.html

    Le avventure di Beowulf
     http://www.lnstar.com/literature/beowulf/beowulf.html


  6.  Codice sorgente


  6.1.  sum.c


  /* Jacek Radajewski jacek@usq.edu.au */
  /* 21/08/1998 */

  #include <stdio.h>
  #include <math.h>

  int main (void) {

    double result = 0.0;
    double number = 0.0;
    char string[80];


    while (scanf("%s", string) != EOF) {

      number = atof(string);
      result = result + number;
    }

    printf("%lf\n", result);

    return 0;

  }




  6.2.  sigmasqrt.c













  /* Jacek Radajewski jacek@usq.edu.au */
  /* 21/08/1998 */

  #include <stdio.h>
  #include <math.h>

  int main (int argc, char** argv) {

    long number1, number2, counter;
    double result;

    if (argc < 3) {
      printf ("usage : %s number1 number2\n",argv[0]);
      exit(1);
    } else {
      number1 = atol (argv[1]);
      number2 = atol (argv[2]);
      result = 0.0;
    }

    for (counter = number1; counter <= number2; counter++) {
      result = result + sqrt((double)counter);
    }

    printf("%lf\n", result);

    return 0;

  }





  6.3.  prun.sh































  #!/bin/bash
  # Jacek Radajewski jacek@usq.edu.au
  # 21/08/1998

  export SIGMASQRT=/home/staff/jacek/beowulf/HOWTO/example1/sigmasqrt

  # $OUTPUT must be a named pipe
  # mkfifo output

  export OUTPUT=/home/staff/jacek/beowulf/HOWTO/example1/output

  rsh scilab01 $SIGMASQRT         1  50000000 > $OUTPUT < /dev/null&
  rsh scilab02 $SIGMASQRT  50000001 100000000 > $OUTPUT < /dev/null&
  rsh scilab03 $SIGMASQRT 100000001 150000000 > $OUTPUT < /dev/null&
  rsh scilab04 $SIGMASQRT 150000001 200000000 > $OUTPUT < /dev/null&
  rsh scilab05 $SIGMASQRT 200000001 250000000 > $OUTPUT < /dev/null&
  rsh scilab06 $SIGMASQRT 250000001 300000000 > $OUTPUT < /dev/null&
  rsh scilab07 $SIGMASQRT 300000001 350000000 > $OUTPUT < /dev/null&
  rsh scilab08 $SIGMASQRT 350000001 400000000 > $OUTPUT < /dev/null&
  rsh scilab09 $SIGMASQRT 400000001 450000000 > $OUTPUT < /dev/null&
  rsh scilab10 $SIGMASQRT 450000001 500000000 > $OUTPUT < /dev/null&
  rsh scilab11 $SIGMASQRT 500000001 550000000 > $OUTPUT < /dev/null&
  rsh scilab12 $SIGMASQRT 550000001 600000000 > $OUTPUT < /dev/null&
  rsh scilab13 $SIGMASQRT 600000001 650000000 > $OUTPUT < /dev/null&
  rsh scilab14 $SIGMASQRT 650000001 700000000 > $OUTPUT < /dev/null&
  rsh scilab15 $SIGMASQRT 700000001 750000000 > $OUTPUT < /dev/null&
  rsh scilab16 $SIGMASQRT 750000001 800000000 > $OUTPUT < /dev/null&
  rsh scilab17 $SIGMASQRT 800000001 850000000 > $OUTPUT < /dev/null&
  rsh scilab18 $SIGMASQRT 850000001 900000000 > $OUTPUT < /dev/null&
  rsh scilab19 $SIGMASQRT 900000001 950000000 > $OUTPUT < /dev/null&
  rsh scilab20 $SIGMASQRT 950000001 1000000000 > $OUTPUT < /dev/null&



































  CD-Writing HOWTO
  Winfried Trmper <truemper@guug.de>
  v2.8.15, 09 Aprile 2000

  Questo documento spiega come masterizzare CD-ROM sotto Linux.

  1.  Introduzione

  Molta gente usa Linux per masterizzare perch  facile e sicuro.
  Niente a che vedere con schermate blu e niente mal di testa per
  problemi di incompatibilit hardware-software. Se lo si imposta nel
  modo giusto funziona e basta. Questo HOWTO spiega come configurare il
  sistema, come scrivere i dati sul CD e presenta alcune applicazioni un
  po' esotiche gentilmente fattemi notare dai lettori.


  1.1.  Copyright, license and terms of usage (IN LINGUA ORIGINALE)

  Copyright Winfried Trmper 1996-2000 All rights reserved.

  Redistribution and use, with or without modification, are permitted
  provided that the name of the author may not be used to endorse or
  promote products derived from this software without specific prior
  written permission. In this sense, translations are welcome and need
  not to be authorized by me.

  The author disclaims all warranties with regard to this document,
  including all implied warranties of merchantability and fitness for a
  certain purpose; in no event shall the author be liable for any
  special, indirect or consequential damages or any damages whatsoever
  resulting from loss of use, data or profits, whether in an action of
  contract, negligence or other tortious action, arising out of or in
  connection with the use of this document.

  Short: read and use at your own risk.


  1.2.  Disponibilit

  Come editore di questo documento principalmente io raccolgo quello che
  altre persone mi riportano.  Non sono uno sviluppatore di sofware n
  un esperto di hardware, quindi per problemi specifici con hardware o
  software dovreste chiedere a qualcun altro. Quello che invece  sempre
  utile  riportare soluzioni per problemi non ancora trattati
  nell'HOWTO.

  Ricevo parecchie centinaia di e-mail riguardanti il CD-Writing-HOWTO
  ogni anno. Cercate di essere pazienti con me, non sempre posso
  rispondere entro poche ore. Comunque leggo ogni cosa immediatamente e
  la metto nella mia coda CDR. Prima di chiedere qualcosa assicuratevi
  di conoscere la versione pi aggiornata di questo documento, sempre
  disponibile all'indirizzo  <http://www.guug.de/~winni/linux/>.

  1.3.  Letture suggerite

  Potreste aver bisogno del manuale della vostra distribuzione per
  vedere come installare un nuovo kernel.  Non sarei di molto aiuto in
  sitazioni come queste.

  Le CD-R FAQ <http://www.fadden.com/cdrfaq/> sono delle FAQ generali a
  proposito dei CD registrabili (CD-R), dei masterizzatori e del
  software richiesto.

  Siccome i masterizzatori possono anche essere usati come normali
  lettori potrebbe interessarvi il CD-ROM HOWTO di Linux, o anche lo
  SCSI HOWTO e il Kernel HOWTO.
  1.4.  Terminologia ... laser al massimo ... fuoco!


  CD-ROM significa Compact Disc Read Only Memory, un sistema di
  memorizzazione dati che si avvale di un laser per rilevare la presenza
  di buchi microscopici sulla superficie argentata e riflettente di un
  disco (la colorazione argentata deriva dalla presenza di uno strato di
  alluminio). I buchi rappresentano i bit dell'informazione e sono cos
  piccoli che su un disco ce ne stanno qualche miliardo. Quindi il CD 
  un supporto di memorizzazione di massa.

  Il termine CD-R  un'abbreviazione di CD-ROM registrabile e si
  riferisce a un CD che non ha quei buchini microscopici sulla
  superficie.  Invece dello strato di alluminio ha una speciale
  pellicola colorata entro la quale possono essere "incisi" i buchi.
  Questo si pu fare dando al laser che normalmente viene solo riflesso
  una potenza leggermente superiore in modo che sia in grado di
  praticare delle incisioni. Questa operazione pu essere fatta solo una
  volta su di un CD-R, sebbene alcune aree possano essere lasciate
  libere per essere scritte in un secondo momento, creando un CD detto
  multisessione.

  I CD-ROM riscrivibili (in breve: CD-RW) sono stati sviluppati per
  ovviare alle limitazioni dei CD-R. In questo caso il laser pu non
  solo incidere i "buchi" sul supporto ma pu anche "fondere" la
  superficie del supporto riportandola allo stato originale. Ci 
  possibile perch il laser in realt non pratica incisioni sul
  supporto, che andrebbe distrutto in una nuvoletta di fumo.
  Un'analogia ragionevole per questa tecnologia  riscontrabile nel
  gioco dell'hockey sul ghiaccio: scivolando sul ghiaccio il giocatore
  (laser) lascia dei graffi. I segni sul ghiaccio (supporto CD-RW) sono
  la registrazione di quello che  accaduto sul ghiaccio durante un
  round. Fra i tempi le macchine Zamboni si muovono sul ghiaccio e
  riempiono i graffi fondendo la parte pi superficiale del ghiaccio
  (Zamboni  il nome delle macchine pulitrici negli stadi di hockey). In
  questo modo i segni sul ghiaccio vengono eliminati e pu inizare il
  nuovo tempo. Il termine scientifico per (evaporazione, condensazione,)
  fusione e congelamento  "cambiamento di fase", da cui il nome di
  "periferiche a cambiamento di fase" per i masterizzatori CD-RW.

  Questo mini-HOWTO si occupa della scrittura di CD-R. Benvenuto a
  bordo, capitano.


  1.4.1.  Adaptor contro Adapter

  La dizione pi frequente all'interno dei sorgenti del kernel 
  "adapter" che batte "adaptor" per 4283 a 154.  Importante notare che
  le opzioni per i moduli e gli alias ne sono influenzate come in
  "scsi_hostadapter". Quindi, per mantenere una dizione coerente
  attraverso gli esempi di configurazione e il testo, io seguir la
  convenzione "adapter" infischiandomene della dizione ufficiale.  (Io
  invece non mi ricordo la convenzione che uso, forse perch non ne uso
  nessuna quindi prendete come buoni "controller" e "adattatore" come
  sinonimi di "adaptor" / "adapter" NdT :-)


  1.5.  Masterizzatori supportati

  I masterizzatori USB non sono al momento supportati. A parte questi
  pi o meno tutti nuovi masterizzatori IDE/ATAPI e SCSI funzionano
  sutto Linux.  Infatti i drive pi nuovi sono praticamente tutti MMC
  compatibili (MMC = MultiMedia Commands NdT) e quindi supportati. Se la
  versione SCSI di un particolare masterizzatore funziona,  molto
  probabile che funzioni anche la sua versione IDE/ATAPI e viceversa.
  Comunque, certa gente si sente molto meglio leggendo il modello esatto
  del proprio masterizzatore in una lista di compatibilit e questo  il
  motivo per cui non elimino tutta questa pappardella dall'HOWTO.


  Qui di seguito invece c' una lista dei masterizzatori che funzionano
  con cdrecord:




























































  Acer:           CDRW 4432A, CDRW 6206A, CD-R/RW 6X4X32
  BTC:            BCE 621E (IDE)
  Compro:         CW-7502, CW-7502B
  Creative:       RW 4224E, MK 4211
  Delta:          OME-W 141
  Dysan:          CRW-1622
  Elite:          Elite b444.41
  Goldstar:       CED-8041B
  Grundig:        CDR 100 IPW
  Guillemot:      Maxi CD-R 4X/8X
  HP:             SureStore 4020i, SureStore 6020i,
                  C4324, C4325
                  CD-writer+ 7100, 7200i, 7500e, 8100i, 8110i, 8200i Plus,
                                    8250i, 9100i, 9110i, 9200e, 9210
  Hi-Val:         CDD 2242, CDD-3610,
  Iomega:         ZIPCD 4x650
  JVC:            XR-W 2001, XR-W 2010, XR-W 2040, XR-W 2042, XR-RW 2224,
                         YR 2626
  Kiss:           CDRW (non  specificato il modello)
  Kodak:          PCD 200, PCD 225, PCD 260, PCD 600
  Matsushita:     Matsushita  il nome giapponese di Panasonic, si veda l
  Memorex:        CRW-620, CDR-622, CRW-1622, CRW-2224, CDRW-4420
  Microboards:    PlayWrite 2000, PlayWrite 4000 RW, PlayWrite 4001 RW
  MicroNet:       MasterCD Plus 4x4, MasterCD Plus 4x6
  Mitsubishi:     CDRW-226
  Mitsumi:        CR-2401-TS, CR-2600 TE,  CR-2801 TE,
                  CR-4801 TE, CR-4802 TE, CR-4804 TE
  Nomai:          680.RW
  Olympus:        CDS 615E, CDS 620E
  Optima:         DisKovery 650 CD-R
  OTI:            CDRW 965, CDRW 975 (Socrates 1.0)
  Panasonic:      CW-7502, CW-7503, CW-7582
  Philips:        CDD-521/10, CDD-522
                  CDD-2000, CDD-2600, CDD-3600, CDD-3610
                  Omniwriter 26, Omniwriter 26A
  Pinnacle:       RCD-100, RCD-1000, RCD-5020, RCD-5040
  Pioneer:        DW-S114X
  Plasmon:        CDR 480, CDR 4220, RF-4100,
                  RF-4102, CDR 4400
  Plextor:        CDR PX-24 CS, PX-412 C, PX-R412 C
                  PX-R 810Ti, PX-R 820T, PX-W 4220Ti, PX-W 8220T, PX-W 8432T
                  Plexwriter RW 4/2/20
  Procom:         PCDR 4
  REC:            820s
  Ricoh:          RO-1420C+, MP 1420C, MP 6200S, MP 6201S, MP 7040A, MP-7060A
  Samsung:        SW-204
  Sanyo:          CRD-R24S
  Smart and
  Friendly:       CD-RW 226, CD-R 1002, CD-R 1002/PRO, CD-R 1004,
                  CD-R 2004, CD-R 2006 PLUS, CD-R 2006 PRO, CD-RW 2224,
                  CD-R 4000, CD-R 4006, CD-R 4012, CD-RW 4424A
                  CD-R 8020, CD-R 8220
  Sony:           CDRX 100E, CDRX 120E, CDRX 140S-RP,
                   CDU 920S, CDU 924, CDU 926S, CDU 928E, CDU 948S
  Taiyo Yuden:    EW-50
  TEAC:           CD-R50S, CD-R55S, CDR-55S, CDR-55K,
                CDR-56S-400, CD-R56S-600, R56S-614
                (NDT, CDR-58S)
  Traxdata:     CRW 2260,
                  CDR 4120, CDR 4120 Pro, CDRW 4260, CDRW 4424, CDR 4800
  Turtle Beach:   2040R
  Waitec:         wt 2036, wt 2444ei
  WPI (Wearnes):  CDRW-622, CDR-632P
  YAMAHA:         CDR-100, CDR 102, CDR-200, CDR-200t,
                  CDR-200tx
                  CDR-400, CDR-400c, CDR-400t, CDR-400tx, CDR-400Atx,
                  CDW-2216E, CRW-2260, CRW-2260t,
                  CRW-4250tx, CRW-4260t, CRW-4260tx, CRW-4261, CRW-4416S,
                  CRW-6416S, CRW-8424E



  Tabella 1: Masterizzatori supportati sotto Linux


  Una lista dettagliata dei modelli che funzionano o non funzionano
  sotto vari dialetti Unix  disponibile on-line presso:
  <http://www.guug.de:8080/cgi-bin/winni/lsc.pl>.

  Se il tuo masterizzatore non  uno di quelli supportati puoi comunque
  usare Linux per creare un'immagine per il CD. Potrebbe essere una
  buona idea siccome la maggior parte dei software per DOS non supporta
  le estensioni RockRidge. In ogni caso ti servir comunque un software
  per DOS per masterizzare l'immagine.



  1.6.  "Caratteristiche" supportate

  Ci sono 2 specie di utility che ti serviranno per masterizzare: i
  driver hardware e i formattatori di dati. I driver hardware hanno
  queste caratteristiche:



       Supported Feature   cdwrite-2.1     cdrecord-1.6    cdrdao
       ----------------------------------------------------------
       IDE/ATAPI               no              s             s
       Parallel Port           no              s             s
       CD-RW                   no              s             s
       Audio CD                s              s             s
       Data CD-ROM             s              s           in parte
       Multisession         in parte           s             no
       TAO (Track at once)     s              s             s
       DAO (Disk at once)      no              no             s


       Tabella 2:


  cdwrite  un vecchio software che menziono solo per completezza.  Ti
  conviene usare cdrecord che supporta molto pi hardware e ha molte pi
  qualit. L'obiettivo principale di cdrdao  la creazione di CD audio
  senza i 2 secondi di silenzio fra le tracce (scrittura in modalit
  disc-at-once). Le utility classificate come formattatori di dati
  servono per organizzare i dati sul supporto ("per creare il
  filesystem")




       Capacit        mkisofs         mkhybrid
       --------------------------------------------
       ISO 9660          s              s
       RockRidge         s              s
       El Torito         s              s
       HFS               no              s
       Joliet            s              s
       Multisessione     s              s
       CD-Extra          s              s


  Tabella 3:


  La differenza pi ovvia fra il filesystem ISO9660 e Extended-2  che
  non si possono modificare i file una volta che sono stati scritti. Le
  limitazioni del filesystem ISO-9660 sono:


    solo 8 livelli di sottodirectory (contate dalla directory di pi
     alto livello del CD) (meglio usare le estensioni RockRidge per
     aumentare questo numero)

    lunghezza massima dei nomi di file: 32 caratteri

    650 MB di capacit

  RockRidge  un'estensione che consente nomi di file pi lunghi e una
  gerarchia di directory pi profonda per i filesystem ISO-9660.
  Leggendo un CD-ROM con estensioni RockRidge con Linux appaiono tutte
  le propriet conosciute del file come possessore, gruppo, permessi,
  collegamenti simbolici (simile ad un filesystem Unix).  Queste
  estensioni non sono disponibili se si legge il CD-ROM sotto DOS o
  sistemi Windows.

  El Torito El Torito serve per la creazione di CD-ROM bootabili.  Anche
  il BIOS del tuo PC deve supportare questa caratteristica. Diciamo che,
  pi o meno, i primi 1.44 (o 2.88 se supportato) Mbyte del CD-ROM
  contengono l'immagine di un floppy che hai preparato. Il BIOS
  considera questa immagine come un floppy di boot e da essa lo effettua
  (di conseguenza, durante l'avvio di questo floppy virtuale, il drive
  originario A: (/dev/fd0) potrebbe non essere accessibile).

  HFS permette a un macintosh di leggere il CD-ROM come se fosse un
  volume HFS (il filesystem nativo di MacOS).

  Joliet introduce nomi di file lunghi (fra le altre cose) per le nuove
  versioni di Windows (95, 98, NT). Che io sappia sotto DOS o Windows
  3.11 ci si pu scordare i nomi di file lunghi.

  La sezione 2.8 indica la disponibilit di questo software.



  1.7.  Mailing List

  Se vuoi puoi unirti al team di sviluppo (con l'intenzione di aiutare
  attivamente), manda un'e-mail a cdwrite-request@other.debian.org e
  metti nel corpo del messaggio la parola subscribe.


  2.  Impostare il sistema Linux per masterizzare

  Questa sezione pu essere applicata ai seguenti tipi di
  masterizzatori: SCSI, IDE/ATAPI e per porta parallela.  I
  masterizzatori USB non sono supportati, almeno alla volta del Marzo
  2000.  Masterizzatori non-SCSI richiedono driver di compatibilit, che
  li fanno sembrare vere periferiche SCSI. Da una parte una strategia
  unificante come questa  semplice ("tutto  SCSI"), in quanto al
  livello del programma  possibile condividere la propria conoscenza
  con altri utenti, indipendentemente dal loro tipo di masterizzatore.
  Per contro, dovrete riconfigurare applicazioni come i lettori di Audio
  CD o l'utility di mount per rispecchiare i cambiamenti apportati al
  nome del driver. Per esempio, se il vostro masterizzatore ATAPI era
  prima identificato dal file /dev/hdc, dopo aver attivato i driver di
  compatibilit SCSI dovrete riferirvi ad esso come /dev/scd0.

  Dopo aver impostato correttamente il tuo hardware e il sistema Linux,
  il comando cdrecord -scanbus dovrebbe mostrare una lista delle
  periferiche disponibili sui vostri bus SCSI. Lo scopo di questo
  capitolo  di guidarti nell'impostazione del tuo sistema in modo che
  l'output del comando sia del tipo:



       shell> cdrecord -scanbus
       Cdrecord release 1.7a1 Copyright (C) 1995-1998 Jrg Schilling
       scsibus0:
               0,0,0) 'Quantum ' 'XP34300         ' 'F76D' Disk
               0,1,0) 'SEAGATE ' 'ST11200N        ' '8334' Disk
               0,2,0) *
               0,3,0) 'TOSHIBA ' 'MK537FB/        ' '6258' Disk
               0,4,0) 'WANGTEK ' '5150ES SCSI 36  ' 'ESB6' Removable Tape
               0,5,0) 'EXABYTE ' 'EXB-8500-85QUE  ' '0428' Removable Tape
               0,6,0) 'TOSHIBA ' 'XM-3401TASUNSLCD' '3593' Removable CD-ROM
               0,7,0) *
       scsibus1:
               1,0,0) 'Quantum ' 'XP31070W        ' 'L912' Disk
               1,1,0) *
               1,2,0) *
               1,3,0) 'TEAC    ' 'CD-R55S         ' '1.0H' Removable CD-ROM
               1,4,0) 'MATSHITA' 'CD-R   CW-7502  ' '4.02' Removable CD-ROM
               1,5,0) *
               1,6,0) 'YAMAHA  ' 'CDR400t         ' '1.0d' Removable CD-ROM
               1,7,0) *


       Lista1: lettura periferiche sul bus SCSI


  L'esempio  di Jrg Schilling e indica un totale di 4 masterizzatori.
  Notate che l'opzione -scanbus riporta anche altre periferiche, come
  normali CD-ROM e dischi fissi. L'ultima colonna indica la descrizione
  SCSI della periferica, dalla quale non  possibile distinguere i CD-
  ROM normali dai masterizzatori.  Comunque la descrizione del prodotto
  spesso d dei suggerimenti nella forma di una R, -R o -RW.



  2.1.  Introduzione Veloce

  Questa sezione  un tentativo di fornire una descrizione veloce e
  comprensibile della configurazione.  Non tutte le possibilit sono
  analizzate, ma, insomma, arrangiatevi un poco!  Prima di tutto,
  controllate la versione indicata dal comando uname. Dovrebbe essere
  qualcosa del tipo 2.0.X oppure 2.2.Y, dove X  maggiore di 36 e Y di
  11. Se avete in esecuzione versioni pi vecchie oppure serie 2.1.* o
  1.*.* dovrete arrangiarvi. La lista a seguire indica una serie di
  comandi con cui potrete inziare. I comandi creano i device file
  all'interno della directory /dev e cercano di caricare alcuni moduli.













  test `whoami` = 'root' || echo "Devi essere root per eseguire i comandi."
  cd /dev/
  umask -S u=rwx,g=rwx,o-rwx
  ./MAKEDEV loop || for i in 0 1 2 3 4 5 6 7; do mknod loop$i c 7 $i; done
  ./MAKEDEV sg   || for i in 0 1 2 3 4 5 6 7; do mknod sg$i  c 21 $i; done
  for i in ide-scsi scsi_mod sg sr_mod loop
  do
      modprobe $i || grep $i /proc/modules || echo "Forse manca il driver $i."
  done
  cdrecord -scanbus


  Lista: creazione dei device file e caricamento dei moduli


  L'accesso all'hardware  di solito implementato sotto Linux attraverso
  i file di periferica.  Quindi prima di ogni altra cosa  necessario
  controllare che essi esistano nella directory /dev.  Ancora nessuno mi
  ha dato un motivo ragionevole per cui questo procedimento non sia
  stato automatizzato attraverso tecniche come il device filesystem
  (devfs). Il devfs  ormai disponibile da anni, supporta uno schema di
  denominazione pi sicuro (!) e pi chiaro, e inoltre permette ai file
  di periferica di apparire automaticamente nella directory /dev.
  Alcune persone pensano che il devfs non sia la soluzione perfetta,
  per non se ne escono con idee migliori, nemmeno con qualcosa di
  comparabile e, per ultimo, niente di disponible e testato. Cominciamo
  ad usare devfs!  ( <http://www.atnf.CSIRO.AU/~rgooch/linux/kernel-
  patches.html>)

  Leggete il prossimo capitolo se non vi sono i moduli necessari nel
  vostro sistema oppure consultate la documentazione della vostra
  distribuzione.  Se lavorate in modalit testo (console), il
  caricamento dei moduli potrebbe causare la stampa di alcuni messaggi
  sullo schermo.  Se lavorate in modalit grafica (X11, KDE, Gnome),
  potrete vedere questi messaggi tramite il comando dmesg.  Per caricare
  i moduli avete la possibilit di elencarli in un file di
  configurazione come /etc/modules oppure far girare i demoni kerneld
  oppure kmod che caricheranno i moduli necessari per voi quando il
  kernel ne avr la necessit.

  Persone con masterizzatori SCSI possono saltare il resto di questa
  sezione visto che cdrecord molto probabilmente riconoscer il loro
  hardware. Se non  questo il caso mandatemi un'e-mail con le
  informazioni sulla vostra configurazione, di modo che possa migliorare
  la sezione sui masterizzatori SCSI.

  E ora per quelli che posseggono masterizzatori IDE/ATAPI.  Come
  scritto nel capitolo precedente, dovrete caricare il driver di
  emulazione ide-scsi.  Ma questo driver pu solo accedere al vostro
  masterizzatore se non vengono caricati ulteriori driver.  In altre
  parole dovrete dire al normale driver IDE di lasciar stare il vostro
  masterizzatore, di modo che il driver ide-scsi possa appropriarsene.



       hda = IDE bus/connector 0 master device
       hdb = IDE bus/connector 0 slave  device
       hdc = IDE bus/connector 1 master device
       hdd = IDE bus/connector 1 slave  device


       Tabella: nomi file di periferica per hardware IDE/ATAPI


  La tabella qui sopra indica la relazione fra i nomi dei device file e
  la posizione delle periferiche sui bus IDE.  Il nome del device file
  rappresentante il vostro masterizzatore deve essere passato come
  opzione al driver nel kernel di Linux.  Esempio: hdb=ide-scsi.  Questa
  impostazione dovrebbe essere posizionata in lilo.conf oppure
  chos.conf, se il driver  compilato staticamente nel kernel, che  la
  scelta pi comune.  Le prossime due liste indicano configurazioni di
  esempio. Tutte le altre varianti come hdb=ignore oppure hdb=none non
  faranno quello che vi serve. "Ignore" significa di non effettuare il
  test automatico della periferica e "none" bloccher l'accesso alla
  periferica.



       image=/boot/zImage-2.2.14
         label=Linux
         read-only
         append="hdb=ide-scsi"


       Lista: Configurazione di esempio per lilo (/etc/lilo.conf)




       linux "Linux 2.1.14" {
               image=/boot/zImage-2.0.37
               cmdline= root=/dev/hda5 readonly hdb=ide-scsi
       }


       Lista: Configurazione di esempio per chos (/etc/chos.conf)


  Se il driver per i CD-ROM IDE/ATAPI viene caricato come modulo, allora
  tutto quello scritto qui sopra non far per voi alcuna differenza, ma
  assicuratevi di includere le opzioni indicate nella prossima lista.
  Le ultime tre linee di questa lista sono generalmente suggerite per
  automatizzare al massimo il caricamento dei moduli necessari.  Se non
  fate girare il demone per il caricamento automatico dei moduli, allora
  aggiungete i nomi dei moduli al file /etc/modules.conf (oppure a
  quello specifico della vostra distribuzione).



       options ide-cd ignore=hdb            # indica al modulo ide-cd di ignorare hdb
       alias scd0 sr_mod                    # carica sr_mod all'accesso di scd0
       pre-install sg     modprobe ide-scsi # prima di sg, carica ide-scsi
       pre-install sr_mod modprobe ide-scsi # prima di sr_mod, carica ide-scsi
       pre-install ide-scsi modprobe ide-cd # prima di ide-scsi, carica ide-cd


       Lista: Configurazione di esempio per /etc/modules.conf


  Se usate il masterizzatore anche come lettore CD ricordatevi che
  dovrete accedere al masterizzatore attraverso il file di periferica
  /dev/scdX ove X=0,...,8.  Potete indirizzare il puntatore simbolico
  cdrom all'attuale nome del file di periferica. La lista qui di seguito
  indica il comando per ottenere questo, prendendo come esempio scd0.



       cd /dev && rm cdrom && ln -s scd0 cdrom


       Lista: Impostare cdrom come nome simbolico per scd0

  Se invece avete anche un CDROM IDE potrete continuare ad usarlo nel
  solito modo.


  2.2.  Compilazione dei moduli del kernel mancanti.

  Il Kernel di Linux pu essere equipaggiato con driver per varie cose.
  I driver possono essere compilati staticamente nell'immagine del
  kernel oppure come moduli che possono essere caricati a richiesta.

  Questo metodo  il migliore per quei drive che non sono essenziali per
  il funzionamento del sistema, dal momento che il kernel risulter pi
  piccolo e veloce. Comunque alcuni driver sono essenziali per
  l'inizializzazione del sistema. Se, per esempio, hai installato il
  sistema su di un hard-disk IDE  necessario avere il supporto per
  questa periferica compilato nel kernel e non come modulo.


  Vi sono 3 diversi tipi di masterizzatori: SCSI, IDE/ATAPI e quelli
  esterni per porta parallela. La Tabella 4 spega come configuarare il
  Kernel di Linux per questi tipi di hardware. La prima colonna della
  tabella  la sezione del menu di configurazione, dove si trovano le
  impostazioni.  La seconda colonna  una descrizione della
  caratteristica (presa dal menu di configurazione del kernel).La terza
  indica il nome del modulo risultante. Le colonne denominate SCSI, IDE
  e PP contengono le opzioni necessarie per l'hardware associato
  (PP=porta parallela).



       Sez.  Descrizione                 Modulo   SCSI  IDE   PP
       ------------------------------------------------------------
       BLOCK  Enhanced IDE/MFM/RLL...                     Y
       BLOCK  IDE/ATAPI CDROM             ide-cd          M
       BLOCK  SCSI hostadaptor emulation  ide-scsi        M
       BLOCK  Loopback device             loop       M    M     M

       PARIDE Parallel port IDE device    paride               Y/M
       PARIDE Parallel port ATAPI CD-ROMs                       M
       PARIDE Parallel port generic ATAPI                       M
       PARIDE (select a low-level driver)                       Y

       SCSI   SCSI support                scsi_mod  Y/M  Y/M
       SCSI   SCSI CD-ROM support         sr_mod    Y/M  Y/M
       SCSI     Enable vendor-specific               Y    Y
       SCSI   SCSI generic support        sg        Y/M  Y/M
       SCSI   (select a low-level driver)            Y

       FS     ISO 9660 CDROM filesystem   iso9660   Y/M  Y/M   Y/M
       FS     Microsoft Joliet cdrom...   joliet     Y    Y     Y


       Tabella 4:


  Y vuol dire S, cio indica di infilare quella brutta bestia nel
  kernel.  M significa MODULO, quindi questa opzione diverr un modulo.
  Con Y/M puoi decidere fra entrambe (l'ordine indica la scelta con meno
  problemi potenziali). Non serve modificare impostazioni mancanti, anzi
  lasciarle stare migliora le possibilit che quello che salter fuori
  funzioni (se prima funzionava perch non dovrebbe farlo ancora?).

  Specialmente in ambienti misti SCSI e ATAPI  meglio compilare la
  maggior parte delle caratteristiche come moduli.


  La periferica loopback  opzionale, serve per testare l'immagine prima
  di scriverla sul supporto.

  Per poter leggere i CD-ROM serve il supporto per il filesystem
  ISO-9660, che include automaticamente le Estensioni RockRidge. Se vuoi
  avere anche le estensioni MS Joliet, compila il driver come modulo e
  caricalo quando ti serve.

  In ogni caso ti occorre un driver di basso livello per l'hardware.
  Basso livello si riferisce al driver che interagisca direttamente con
  la periferica.  Per periferiche SCSI e porta parallela esistono molti
  driver di basso livello, descritti qui di seguito.

  L'installazione del kernel risultate va al di l degli scopi di questo
  HOWTO.  Consultate la documentazione della vostra distribuzione.

  Utenti di RedHat Linux attenzione: dovrete compilare nel kernel le
  opzioni "Ramdisk support" e "Initial ramdisk".  Inoltre dovrete
  generare un nuovo ramdisk con i nuovi moduli con un comando del tipo:
  "mkintrd --preload ide-cd initrd-2.2.14.img  2.2.14".


  2.2.1.  Note particolari per Kernel sino alla v2.2.9


  Possessori di masterizzatori ATAPI attenzione: se il kernel riconosce
  la vostra periferica come ATAPI durante l'avvio del sistema, non ci
  sar verso di farla funzionare con Linux. Se il driver IDE/ATAPI si
  appropria della periferica lo SCSI (al di sopra dell'emulazione) non
  la pu pi toccare. Ricompilare il kernel con la roba per il CD-ROM
  come modulo e funzioner tutto (vedi tabella sopra).

  Con i kernel sino alla versione 2.2.9, non abilitare
  CONFIG_SCSI_MULTI_LUN ('probe for multiple luns') insieme al supporto
  ide-scsi allo stesso tempo, c' un bug ide-scsi che non lo permette.


  Alcuni utenti hanno riportato dei problemi con binari precompilati e
  la versione 2.2. Questo  un problema del kernel di Linux. Soluzioni:

    Potrebbe sparire se ricompili cdrecord in modo che si adegui alle
     nuove dichiarazioni di linux/include/scsi/sg.h.  Questi valori
     devono essere uguali a quelli del kernel in funzione per via
     dell'interfaccia utente sg, che non  propriamente una meraviglia.

    Potrebbe essere colpa di un driver sg che non riesce ad allocare
     sufficiente memoria per usare la modalit DMA (versioni del Kernel
     sino alla 2.2.5).



  2.2.2.  Masterizzatori SCSI


  Assicurati che il masterizzatore sia riconosciuto dal BIOS del
  computer.  Non  molto intelligente proseguire se il PC non accetta
  l'hardware (il fatto che non lo sputi fuori non  abbastanza; deve
  dirtelo esplicitamente con un messaggino sullo schermo).

  Se pensi di connettere una periferica SCSI alla porta parallela (da
  non confondere con i drive IDE per porta parallela), ti serve uno
  speciale cavo attivo e un driver particolare. Dai un'occhiata a
  <http://www.torque.net/parport/parscsi.html> per saperne di pi.



  2.2.2.1.  Periferiche SCSI generiche

  I file di periferiche /dev/sd* e /dev/sr* per gli hard-disk e CD-ROM
  SCSI sono limitati a trasferimenti di dati a blocchi. Quindi sono
  molto veloci e adatti per conservare i dati. Pilotare il laser di un
  masterizzatore  giusto un attimo pi complicato e serve qualcosa di
  pi che non un trasferimento di dati a blocchi. Per mantenere le
  periferiche sd* e sr* pulite e veloci  stato introdotto un nuovo tipo
  di periferica SCSI, chiamato Periferica SCSI generica. Dal momento che
  qualsiasi cosa pu essere fatta su una periferica SCSI usando questa
  interfaccia significa che non  limitata ad un solo uso - da qui il
  nome generica.

  Allo stesso modo di tutte le altre periferiche puoi trovarle nella
  directory /dev (per convenzione):



       shell> cd /dev
       shell> ls sg*
       sg0  sg1  sg2  sg3  sg4  sg5  sg6  sg7




  Se i file non sono presenti creali con lo script /dev/MAKEDEV:



       shell> cd /dev/
       shell> ./MAKEDEV sg




  Se la tua distribuzione Linux non contiene lo script /dev/MAKEDEV,
  crea i file di periferica manualmente con questo ciclo:



       for i in 0 1 2 3 4 5 6 7
       do
               mknod /dev/sg$i c 21 $i
       done






  2.2.3.  Masterizzatori per porta parallela


  Mi spiace ma non ho idea di come funzionino, se ti interessa leggi
  questa pagina: <http://www.torque.net/parport/paride.html> oppure il
  file locale /usr/src/linux/Documentation/paride.txt.




  2.3.  Procurarsi il software per masterizzare

  Un elenco di aggeggi utili alla produzione di CD-ROM  disponibile
  presso:
  <http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdb.html>.

  2.3.1.  Utility a riga di comando

  Per generare i prototipi per i CD-R serve almeno uno di questi
  pacchetti (richiesti solo per CD-ROM di dati):


       <ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs/> (mkisofs)

       <ftp://ftp.ge.ucl.ac.uk/pub/mkhfs> (mkhybrid)


  Il software per la scrittura dei prototipi  invece il seguente:


       <ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/> (cdrecord)

       <http://www.ping.de/sites/daneb/cdrdao.html> (cdrdao)



  Non fare caso alla pagina man di un vecchio mkisofs che afferma che 
  necessaria la versione 1.5 di cdwrite. Usa cdrecord e lascia perdere.
  Nota che le versioni pi nuove del pacchetto cdrecord contengono una
  versione avanzata di mkisofs e alcuni altri programmini utili nella
  directory misc/ come readcd e isosize, che non si trovano da altre
  parti.


  2.3.2.  Interfacce grafiche (opzionali)

  I front-end sono davvero dei front-end sotto Linux. Cio, ti servono
  comunque le utility a riga di comando ma le puoi usare in un modo pi
  gradevole da vedersi.

  X-Cd-Roast  un pacchetto dedicato a una facile creazione di CD sotto
  Linux.  Combina utility a riga di comando come cdrecord e mkisofs in
  una simpatica interfaccia grafica.


       <http://www.fh-muenchen.de/home/ze/rz/services/pro
       jects/xcdroast/e_overview.html>


  BurnIT  un front-end scritto in JAVA per cdrecord, mkisofs e
  cdda2wav-0.95, praticamente un pacchetto completo per la scrittura di
  CD per la piattaforma Unix.  disponibile presso:


       <http://sunsite.auc.dk/BurnIT/>


  CD-Tux  un frontend basato su interfaccia a caratteri per i programmi
  mkisofs e cdrecord.  "Un'ambiente facile da usare per fare
  praticamente qualsiasi cosa a un CD, con supporto per i colori
  attraverso la famosa libreria NCURSES.  E fa tutto questo con un
  eseguibile sotto i 75K."


       <http://www.datadictator.co.za/cdtux/>







  3.  Scrittura dei CD-R


       "Se anche ti trasformi in fumo non credo smetter di diver
       tirmi mentre bruci." (Imperatore romano Nerone mentre bruci
       ava i suoi CD classici, 64A.C.  Non aveva capito molto.)



  La scrittura dei CD-R si fa in 2 passi sotto Linux:


    impacchettare i dati desiderati (file, musica o entrambi) in un
     file con formato speciale usando le utility mkisofs/mkhfs

    scrivere questo file su CD-R usando cdrecord

  Questo capitolo descrive i passi per la creazione di CD audio e dati
  in maggior dettaglio.



  3.1.  Scrivere CD-ROM (solo dati)

  Attenzione, mettere insieme il software di solito  una cosa pi lunga
  di quanto uno non si aspetti. Stai attento perch file mancanti non
  possone essere aggiunti una volta scritto e finalizzato il CD.


  Tieni sempre in mente che una parte dello spazio libero del CD deve
  essere usato per mantenere le informazioni del filesystem ISO9660.  Di
  solito questo occupa non molti megabyte: per dare un'idea diciamo che
  620MB di dati ci stanno di sicuro su un CD-R da 650MB,




  3.1.1.  Creare un'immagine del successivo CD-ROM

  Prima di usare qualsiasi supporto (tipo floppy, hard-disk o CD) questo
  deve avere un filesystem (in lingua DOS: essere formattato). Il
  filesystem  responsabile di organizzare e incorporare i file che
  dovrebbero essere scritti sul supporto.

  Le solite utility per creare filesystem su partizioni dell'hard disk
  scrivono su di esse un filesystem vuoto, che viene poi montato e
  riempito con dei file quando servono all'utente.  Allora, un CD-R 
  scrivibile una sola volta, giusto? Possiamo scriverci sopra un
  filesystem vuoto, quindi formattarlo, ma poi resterebbe vuoto a vita.
  Questo  vero anche per i CD-RW visto che non si possono cambiare
  settori arbitrari, ma bisogna cancellare l'intero contenuto.

  Dunque, quello che ci serve  un aggeggio che crei un filesystem
  mentre copiamo i file sul CD. L'utility si chiama mkisofs. Un uso
  tipico  simile a questo:



       mkisofs  -r   -o cd_image   private_collection/
                     `---------'   `-----------------'
                          |               |
                    file immagine   directory sorgente




  L'opzione '-r' imposta i permessi dei file perch siano leggibili da
  tutti sul CD e attiva le estensioni Rock Ridge. Questo  quello che si
  vuole di solito e l'uso dell'opzione  raccomandato a meno di non
  sapere esattamente quello si sta facendo (Attento: senza '-r' il punto
  di montaggio si becca i permessi di private_collection!).

  mkisofs cercher di mappare tutti i nomi di file nel formato 8.3 usato
  dal DOS per assicurare la massima compatibilit. In caso di conflitti
  per i nomi (file diversi hanno lo stesso nome 8.3), vengono usati dei
  numeri nei nomi e informazioni a proposito del nome scelto sono
  stampate sullo STDERR (che poi  lo schermo, di solito).  Niente
  panico: sotto Linux non vedrete mai questi nomi in formato 8.3 perch
  Linux usa le estensioni Rock Ridge che contengono le informazioni dei
  file originali (permessi, nome ecc.).

  Magari ora ti stai chiedendo perch diavolo non spedire l'output di
  mkisofs direttamente al masterizzatore. Per 3 ottimi motivi:


    mkisofs non sa certo come pilotare i masterizzatori.

    A volte  utile testare l'immagine prima di scriverla.

    Su macchine lente non sarebbe sicuro (v. sezione 4.).

  Il metodo per scrivere CD-R in un unico passo verr descritto pi
  avanti.

  Si potrebbe anche pensare di creare una partizione extra per fare
  tutto questo e scrivere l'immagine sulla partizione invece che su un
  file.  Non sono d'accordo su questa strategia perche se per caso
  scrivi sulla partizione sbagliata (perch hai scritto male il
  comando), puoi anche perdere l'intero sistema Linux (insomma: a me 
  successo). In pi  uno spreco di spazio su disco perch l'immagine
  del CD  un dato temporaneo che pu essere cancellato dopo aver
  scritto il CD. Comunque, usare partizioni grezze ti risparmierebbe il
  tempo di cancellare file di 650MB.  (Se hai spazio su disco
  sufficiente una partizione extra ti permette di risparmiare il tempo
  di cancellazione dell'immagine.)



  3.1.2.  Testare l'immagine del CD

  Linux ha la possibilit di montare file come se fossero partizioni.
  Questa capacit  utilissima per controllare che la disposizione delle
  directory e i permessi sull'immagine siano ottimali. Anche se i dischi
  non costano molto il processo di scrittura  comunque abbastanza lungo
  e se non altro potresti evitare di perdere tempo con un veloce test.

  Per montare il file cd_image creato prima sulla directory /cdrom
  impartisci il comando



       mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /cdrom




  Ora puoi ispezionare i file sotto /cdrom - essi appaiono esattamente
  come se fossero su un vero e proprio CD. Per smontare l'immagine del
  CD basta dire umount /cdrom. (ATTENZIONE: Se usi kernel di Linux pi
  vecchi della v. 2.0.31 l'ultimo file su /cdrom potrebbe non essere
  completamente leggibile. Usa kernel pi recenti come la v. 2.0.36.
  L'opzione -pad di cdrecord si applica ai soli CD audio; per poterla
  usare anche con mkisofs  necessario una patch, la cui utilit  pi o
  meno quella di applicare un upgrade a un kernel senza bug.)

  Nota:

       alcune antiche versioni di mount non sono in grado di usare
       i device loopback. Se hai ancora una versione cos vecchia
       forse  ora di aggiornare il sistema.


       Parecchia gente ha gi chiesto di inserire in questo HOWTO
       informazioni su come procurarsi le pi recenti utility
       mount.  Io rifiuto sempre. Se la tua distribuzione Linux ha
       una versione troppo vecchia di mount: riportalo come un bug.
       Se la tua distribuzione di Linux non  facilmente
       aggiornabile: riportalo come un bug.

       Se avessi incluso tutte le informazioni necessarie per
       aggirare i bug in distribuzioni Linux mal progettate questo
       HOWTO sarebbe stato mooolto pi lungo e difficile da
       leggere.




  3.1.3.  Scrittura dell'immagine sul CD

  Non c' pi molto da fare. Se non hai gi provato a farlo  ora di
  dare il comando



       cdrecord -scanbus




  Questo ti indicher a quali periferiche SCSI  collegato il tuo
  masterizzatore.  Tutti gli altri metodi per individuare le
  informazioni cos gentilmente stampate da cdrecord sono stati rimossi
  da questo HOWTO (specialmente lo schema di denominazione per
  periferiche SCSI generiche, in qualche modo pericoloso).

  Prima di mostrarti l'ultimo comando, lascia che ti avverta di una
  cosa: i masterizzatori hanno bisogno di essere alimentati con un
  flusso di dati costante in quanto hanno solo dei piccoli buffer per i
  dati.  Dunque il processo di scrittura del CD non deve essere
  interrotto oppure ti risulter un CD inusabile.  facile interrompere
  il processo di scrittura cancellando un grosso file. Per esempio,
  mettiamo il caso che tu voglia cancellare un file di 650MB: il kernel
  deve aggiornare informazioni per circa 650.000 blochhi sull'hard-disk
  (mettendo il caso che tu abbia una dimensione di blocco pari a 1KByte
  per il tuo filesystem).  Questa operazione ha bisogno di un po' di
  tempo ed  facile che rallenti l'attivit del disco abbastanza perch
  il flusso di dati si interrompa per alcuni secondi.  Comunque, leggere
  la posta, navigare sul web o persino compilare un kernel generalmente
  non interrompono il processo su macchine moderne.  (NDT: in generale,
  se avete un po' di cognizione, non fatevi troppi problemi ad usare la
  macchina. Vi faccio il mio esempio: io ho un sistema SCSI e durante
  una copia diretta, posto di aver assegnato un buffer di 20MB al
  processo di scrittura, il mio k6-2 350MHZ non viene usato per pi del
  3%. Capite come ci non costituisca un grosso sforzo per la macchina.)

  Tieni presente che nessun masterizzatore pu riposizionare il laser e
  riprendere da una posizione precisa sul CD se viene disturbato. Quindi
  anche forti vibrazioni oppure shock meccanici probabilmente
  distruggeranno il CD in fase di scrittura.

  OK, se sei mentalmente preparato, indossa una tunica nera, moltiplica
  l'ID SCSI del masterizzatore per la sua revisione ANSI e accendi tante
  candele quant' il risultato, recita 2 versi dell'ASR-FAQ (newsgroup
  alt.sysadmin.recovery) e infine scrivi:



       shell> SCSI_BUS=0   # dalla lista 1 "scsibus0:"
       shell> SCSI_ID=6    # dalla lista 1 "TOSHIBA XM-3401"
       shell> SCSI_LUN=0
       shell> cdrecord -v speed=2 dev=$SCSI_BUS,$SCSI_ID,$SCSI_LUN \
                          -data  cd_image

       # come sopra ma pi in breve:
       shell> cdrecord -v speed=2 dev=0,6,0  -data  cd_image




  Per una maggiore comprensibilit la coordinate del masterizzatore sono
  memorizzate in 3 variabili d'ambiente chiamate SCSI_BUS, SCSI_ID,
  SCSI_LUN.  L'opzione -data non  obbligatoria ma viene impostata per
  rendere la riga di comando comparabile a quella usata per scrivere CD
  audio.

  Se vuoi usare cdrecord per riscrivere un CD-RW devi usare l'opzione
  "blank=..." per cancellare il vecchio contenuto. Fatti un favore,
  leggi la pagina man per maggiori informazioni su come svuotare un CD-
  RW.

  In tempi in cui tutti escluso me (escludete pure anche me NDT) hanno a
  casa una macchina a 400 MHZ si pu in genere passare l'output di
  mkisofs direttamente a cdrecord:



       shell> IMG_SIZE=`mkisofs -R -q -print-size private_collection/  2>&1 \
         | sed -e "s/.* = //"`
       shell> echo $IMG_SIZE
       shell> [ "0$IMG_SIZE" -ne 0 ] && mkisofs -r  private_collection/  \
       |cdrecord  speed=2  dev=0,6,0
                   tsize=${IMG_SIZE}s  -data  -
       #     non dimenticare la s --^         ^-- leggi i dati da STDIN




  Il primo comando  un'esecuzione mirata a determinare la dimensione
  dell'immagine ( necessaria la versione di mkisofs della distribuzione
  di cdrecord perch questo funzioni). Pu darsi che il tuo
  masterizzatore non richieda di conoscere la dimensione dell'immagine
  da scrivere, in tal caso  possibile saltare questo passo.  La
  dimensione stampata deve essere passata come parametro tsize a
  cdrecord ( mantenuta nella variabile d'ambiente IMG_SIZE). Il secondo
  comando  una sequenza di cdrecord e mkisofs accoppiati con una pipe.



  3.2.  Scrittura di CD audio


  La procedura per i CD audio  molto simile ai passi descritti sopra.
  Le due differenza principali sono che i CD audio consistono di tracce
  che sono organizzate in immagini separate. Quindi se vuoi avere dieci
  tracce su un CD devi anche preparare dieci immagini.  (NDT: con cdrdao
  non  necessaria la creazione di file immagine multipli) L'altra
  differenza  che il formato delle immagini non  ISO-9660 (o un altro
  filesystem a scelta) ma  "campionamenti a 16 bit stereo in formato
  PCM a 44100 campionamenti/sec (44.1kHz)".

  Una utility per convertire i tuoi file audio nel formato richiesto 
  sox.  Il suo utilizzo  immediato



       shell> sox  killing-my-software.wav  killing-my-software.cdr




  Questo comando converte la canzone killing-my-software dal formato WAV
  al formato CDR-audio. Dai un'occhiata alla pagina man di sox per
  maggiori dettagli a proposito dei formati e delle estensioni per i
  nomi di file che sox riconosce.  Siccome la conversione ha bisogno di
  molto spazio su disco  stata implementata in cdrecord la capacit di
  scrivere formati WAV e AU senza bisogno di conversione manuale, a
  patto che i file sonori abbiano estensione .wav o .au (e ovviamente
  siano in qualit "stereo, 16 bit, 44.1kHz").

  Cdrecord scrive le immagini come tracce audio, se l'opzione -audio 
  specificata. Le altre opzioni sono identiche a quelle usate per
  scrivere CD di dati (a meno di esigenze particolari). Ecco tre esempi
  che effettuano la stessa operazione, ma leggono le tracce da formati
  di file sonori diversi:



       shell> cdrecord -v speed=2 dev=0,6,0  -audio  track1.cdr track2.cdr...
       shell> cdrecord -v speed=2 dev=0,6,0  -audio  track1.wav track2.wav...
       shell> cdrecord -v speed=2 dev=0,6,0  -audio  track1.au  track2.au...




  Un caso speciale  rappresentato dai file MPEG Layer 3 che possono
  essere convertiti nel formato richiesto con il comando "mpg123 -cdr -s
  track1.mp3 > track1.cdr".  L'opzione -cdr assicura che la traccia sia
  codificata nel modo corretto (vedi sopra).  La conversione da WAV a
  MPEG pu essere fatta con LAME per i file WAV (estrarre le tracce da
  un CD audio con cdda2wav e codificarle in MP3 con LAME). Per creare un
  CD audio da un insieme di file MP3  possibile usare la seguente
  sequenza di comandi:



       for I in *.mp3
       do
           mpg123 -cdr -s $I | cdrecord -audio -pad -swab -nofix -
       done
       cdrecord -fix




  In dipendenza della velocit della tua macchina pu essere necessario
  abbassare la velocit di scrittura a "speed=1" (opzione di cdrecord).
  Se usi "speed=4" significa che la macchina deve essere in grado di
  riprodurre file MP3 a velocit quadrupla. mpg123 ha bisogno di molto
  tempo di CPU!  Se non sei sicuro prova prima una simulazione con
  -dummy (mantiene il laser spento).  Al momento i CD prodotti avranno 2
  secondi di pausa fra la tracce audio.  Se il tuo masterizzatore
  supporta la scrittura in modalit "disc-at-once" (DAO), puoi provare
  le nuove versioni di cdrecord per sbarazzarti delle pause.


  3.2.1.  DAO

  Se vuoi evitare le pause fra le tracce audio  necessario usare la
  modalit di scrittura disk-at-once e non la track-at-once prima
  descritta. Il supporto per il DAO attualmente  pi avanzato in
  cdrdao. Dai un'occhiata alla sua homepage per maggiori dettagli.
  Utilizzando il parametro read-cd di cdrdao sarai persino in grado di
  creare copie 1:1 di CD audio.


  3.3.  CD-ROM in modalit mista (Mixed Mode)


  Non c' pi molto da dire. Basta indicare il tipo delle (successive)
  immagini con le opzioni -data e -audio



       cdrecord  -v dev=0,6,0  -data  cd_image  -audio  track*.cdr







  4.  Caro Winfried,...

  In altre parole questa  la sezione di solito chiamata "frequently
  asked questions with answers". Se hai dei problemi con il tuo partner,
  i tuoi bambini o il cane puoi inserirli nella sezione, sempre che
  abbiano a che fare con la scrittura di CD-R o anche solo se si tratta
  di situazioni divertenti.


  4.1.  Quanto  sensibile il processo di scrittura?

  Prova. Usa l'opzione -dummy per effettuare una simulazione con
  cdrecord.  Fai quello che vuoi e osserva se il processo viene
  interrotto o meno.

  Se alimenti cdrecord direttamente da mkisofs tieni presente che
  processi che occupano molto il disco come l'aggiornamento del database
  locate mettono in pericolo il flusso di dati e quindi la salute del
  tuo CD; meglio controllare che non vengano lanciati dal cron o anacron
  mentre stai masterizzando.


  4.2.  La frammentazione ha un cattivo impatto sul flusso?

  Di solito  cos bassa che il suo impatto non  visibile.  Comunque 
  piuttosto facile costruire casi patologici di frammentazione, che
  abbassino il trasferimento degli hard disk sotto i 100 kbytes/secondo.
  Basta non farlo. :-)

  S, i file sull'hard disk vengono frammentati durante gli anni. Pi
  questo accade velocemente pi il filesystem si riempie. Lascia sempre
  un 10% o 20% di spazio libero e non dovresti avere problemi nella
  scrittura di CD.


  Se non ne sei sicuro dai un'occhiata ai messaggi stampati al boot, la
  percentuale di frammentazione  stampata mentre vengono controllati i
  filesystem. Puoi controllare questo valore con il comando molto
  rischioso:



       shell> e2fsck -n  /dev/sda5        # '-n' is important!
       [robaccia-lascia perdere]
       /dev/sda5: 73/12288 files (12.3% non-contiguous)




  In questo esempio la frammentazione  molto alta - ma ci sono solo 73
  file molto piccoli su questo filesystem (usati in /tmp) quindi il
  valore non  allarmante.

  Vi  un'utility in fase sperimentale chiamata e2defrag per
  deframmantare filesystem extended-2. La versione corrente non funziona
  ancora abbastanza bene per essere usata anche solo in ambienti
  privati. Se vuoi veramente deframmentare il tuo filesystem, crea una
  copia di backup (meglio due), fai pratica nel ripristino dei dati e
  crea un nuovo filesystem (distruggendo il vecchio) e ripristina i
  dati.  In due parole questa  la tecnica pi sicura.


  4.3.  Posso tenere un'immagine su un filesystem UMSDOS?

  Certo. L'unico filesystem che non  abbastanza veloce per masterizzare
   il network filesystem (NFS).

  Anch'io usavo UMSDOS per condividere lo spazio su disco fra Linux e
  DOS/Win su un PC (486/66) dedicato alla masterizzazione.


  4.4.  Non c' qualche modo per aggirare le limitazioni ISO-9660?

  S. Puoi mettere su un CD qualsiasi filesystem vuoi. Ma altri sistemi
  operativi diversi da Linux non saranno in grado di usarlo.

  Ecco un esempio passo a passo:


    Crea un file vuoto di 650MB


       dd if=/dev/zero of="empty_file" bs=1024k count=650





    Crea un filesystem extended-2 su questo file


       shell> /sbin/mke2fs  -b 2048  empty_file
       empty_file is not a block special device.
       Proceed anyway? (y,n) y





    Monta questo file vuoto con le loopback-devices

  mount -t ext2 -o loop=/dev/loop1 empty_file /mnt





    Copia i file che ti servono su /mnt e poi smontalo

    Usa cdrecord su empty_file (che ora non  pi vuoto) come se fosse
     un'immagine ISO-9660

  Se vuoi aggiungere un CD come questo in /etc/fstab ne devi
  disabilitare il controllo, cio per esempio:


       /dev/cdrom  /cdrom  ext2  defaults,ro  0 0




  Il primo 0 significa che il disco non deve essere incluso nei dump, il
  secondo (importante) indica di non controllare la presenza di errori
  al boot (fsck troverebbe degli errori sul CD).



  4.5.  Come copio le tracce da CD Audio?

  Ci sono parecchi pacchetti software. Il pi nuovo si chiama
  "cdparanoia" e puoi scaricarlo da:


       <http://www.mit.edu/afs/sipb/user/xiphmont/cdpara
       noia/index.html>



  Oppure puoi usare una combinazione di "cdda2wav" e "sox", disponibili
  presso sunsite e i suoi mirror:


       <ftp://sun
       site.unc.edu/pub/Linux/apps/sound/cdrom/cdda2wav0.71.src.tar.gz>

       <ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/sox-11gamma-
       cb3.tar.gz>


  Con cdda2wav puoi copiare un intervallo specifico (oppure un'intera
  traccia) da un CD Audio e convertire il risultato in un file .wav. sox
  al contrario riconverte i file .wav nel formato cdda tipico dei CD
  audio dimodoch possano essere scritti su un CD-R con cdrecord. Di
  solito non  necessario usare sox perch le nuove versioni di cdrecord
  hanno gi il supporto per i file .au e .wav.


  4.6.  Come controllo la presenza di periferiche SCSI dopo il boot?

  Il file drivers/scsi/scsi.c contiene queste righe:







  /*
   * Usage: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
   * with  "0 1 2 3" replaced by your "Host Channel Id Lun".
   * Consider this feature BETA.
   *     CAUTION: This is not for hotplugging your peripherals. As
   *     SCSI was not designed for this you could damage your
   *     hardware !
   * However perhaps it is legal to switch on an
   * already connected device. It is perhaps not
   * guaranteed this device doesn't corrupt an ongoing data transfer.
   */




  (NDT: In pratica il comando "aggiunge" al sistema una nuova periferica
  indicata dalle coordinate HA, CH, ID, LUN. Occhio, per! Primo: questa
  funzione  ancora una beta; Secondo: SCSI non  USB e quindi non  una
  buona idea collegare delle periferiche "a caldo". L'ho visto fare con
  successo, ma non  una garanzia... Questa funzione  stata ideata per
  aggiungere periferiche gi collegate e anche in questo caso non 
  sicura al 100%)

  Tieni presente che dovrebbe essere usata solo per aggiungere
  periferiche alla fine della catena. Se la inserisci nel mezzo rompi le
  scatole al meccanismo di assegnazione dei nomi (directory /dev) e
  potresti distruggere tutti i tuoi dati.


  4.7.   possibile creare una copia 1:1 di un CD di dati?

  S. Tieni presente per che qualsiasi errore di lettura dell'originale
  (per polvere o graffi) si ripercuoter in una copia difettosa.

  (NDT: spiacente ma non  vero nella maggior parte dei casi. CD che
  presentano incongruenze fra "user data" e Error Correction Codes/Error
  Detection Codes non possono essere replicati esattamente (qualcuno ha
  detto Playstation?) in quanto il firmware del lettore corregge
  automaticamente questi "errori". In pratica non  possibile
  leggere/scrivere quello che si vuole sul CD ma 280 byte di ogni
  settore devono essere una funzione dei 2048 di dati. Si tratta di 4
  byte per l'individuazione degli errori e 276 byte per la loro
  correzione. Una copia 1:1  possibile con cdrdao e il driver generic-
  mmc-raw, che supporta per limitazioni fisiche solo una ristretta
  quantit di hardware.  Se non hai capito niente di questo dai
  un'occhiata alle specifiche SCSI-2 e tanti auguri).

  Primo caso: hai un masterizzatore e un lettore CD-ROM separato. Se
  impartisci il comando



       cdrecord -v dev=0,6,0 speed=2 -isosize /dev/scd0




  puoi estrarre un flusso di dati dal lettore /dev/scd0 e scriverlo
  direttamente tramite il masterizzatore che ha ID=3 a velocit 2X.
  (NDT: in questo caso si effettua una copia di "cooked data", cio si
  copia solo l'area di dati utente in ogni settore. L'altro caso
  possibile  la copia di "raw data" in cui vengono copiate dal CD le
  seguenti aree:

    2048 bytes User Data

    4 bytes Error Detection Code

    8 bytes Zero

    276 bytes Error Correction Code )

  Secondo caso: non hai un lettore CD-ROM separato. Mi sa che devi usare
  il masterizzatore per creare l'immagine del CD-ROM:



       dd if=/dev/scd0 of=cdimage




  Questo comando legge il contenuto del CD dalla periferica
  corrispondente a /dev/scd0 e lo scrive nel file "cdimage". Il
  contenuto di questo file  identico a quello generato da mkisofs,
  quindi  possibile procedere come descritto precedentemente nel
  capitolo (cio usare il file cdimage come input per cdrecord). Se ti
  interessa avere un indice dell'avanzamento del processo e altre
  cosucce carine da vedersi puoi usare sdd di Jrg Schilling.

  Se si presentano errori installa una versione recente di cdrecord che
  contiene lo strumento "readcd" (presente nella directory misc/). D
  gli stessi risultati di dd, ma ripete la lettura del settore pi volte
  in caso di errori.  (NDT: per chi usa cdrdao  disponibile un'opzione
  'read-cd' che legge il contenuto del disco e ne salva la struttura in
  un file (la Table Of Contents) che verr poi utilizzato nel processo
  di scrittura per replicare la struttura del CD originale.)


  4.8.  Linux pu leggere i CD-ROM Joliet?

  S. I kernel pi nuovi (2.0.36 e oltre) hanno il suppporto per il
  formato Joliet. Ricordati di usare le parole chiave iso9660 e joliet
  (che poi  solo un'estensione) nel file /etc/fstab. Per maggiori
  dettagli, visita la pagina <http://www-
  plateau.cs.berkeley.edu/people/chaffee/joliet.html>.



  4.9.  Come posso leggere/montare CD-ROM con il masterizzatore?

  Allo stesso modo che con il lettore. Niente trucchi. Tieni presente
  che devi usare le periferiche scd (SCSI CDROM) per montare i CD-ROM in
  lettura anche se possiedi un CD-ROM ATAPI (ricorda che hai configurato
  le tue periferiche ATAPI con l'emulazione SCSI). Per esempio nel file
  /etc/fstab potresti mettere:



       /dev/scd0  /cdrom  iso9660  ro,user,noauto  0  0






  4.10.  E per far stare ancora pi dati su di un CD-R?

  Usa bzip2 invece di gzip o pkzip. Ti fa risparmiare fino al 30% di
  spazio per file pi grandi di 100KB. Scaricatelo all'indirizzo


       <http://www.muraroa.demon.co.uk/>



  Invece di masterizzare un vero CD audio puoi convertire i file .wav in
  .mp3 e piazzarli su un CD ISO9660 come normalissimi file. Generalmente
  la compressione MPEG III ha un'efficienza di 1:10.  Ovviamente lo
  stereo non pu leggere dei file... questo  il rovescio della
  medaglia. Per potresti sempre usare l'hard-disk per la prossima
  festa; con 18GB puoi avere a disposizione 3000-4000 titoli (NDT: e non
  dimenticarti di invitarmi! :).

  Un compressore MPEG III  disponibile presso:

       <http://www.stud.ifi.uio.no/~larsi/other/8hz-
       mp3-cheng.tar.gz>



  Un riproduttore MPEG-III  disponibile presso:

       <http://homepages.uni-tuebingen.de/stu
       dent/michael.hipp/mpg123/>



  Per la voce campionata potresti ridurne le dimensioni usando la "GSM
  lossy speech compression":


       <ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/>

       <http://kbs.cs.tu-berlin.de/~jutta/toast.html>



  (NDT: per chi quando ha letto il titolo della sezione ha subito
  pensato a un buon vecchio e sano oversize (della serie: scrivi finch
  c' plastica) ho buone notizie: in generale i driver non sono
  schizzinosi quindi se il masterizzatore  fisicamente in grado di
  effettuare oversize non ci sono problemi. Che io sappia i driver che
  lo permettono sono : Teac-CDR50/55, generic-mmc di cdrdao e cdrecord.
  Secondo la documentazione di cdrdao QUALSIASI masterizzatore
  utilizzabile con il driver generic-mmc-raw dovrebbe essere in grado di
  effettuare oversize, il firmware non dovrebbe essere in grado di
  impedirlo).


  4.11.  Come creo dei CD di boot?

  Devi avere un floppy da 1.44 MB bootabile. Creane l'esatta immagine
  con il comando



       dd if=/dev/fd0 of=boot.img bs=18k




  Piazza l'immagine nella directory che contiene la tua collezione di
  file (o anche in una sottodirectory, fai tu...). Passa a mkisofs il
  nome del file con l'opzione '-b' e in pi usa '-c'. Per maggiori
  informazioni leggiti il file README.eltorito nella distribuzione di
  mkisofs.

  Un'applicazione interessante per un CD di boot personalizzato  un
  ambiente DOS o Windows a prova di virus. Cos puoi risparmiare i soldi
  per un hard-disk (se hai una rete e usi samba per rendere disponibili
  dei file utente su un fileserver). Il giornale di informatica tedesco
  C't ha un articolo a tal proposito nel numero 11/99, pagina 206 (
  <http://www.heise.de/>).

  Alcuni dettagli sul CD-ROM di boot della RedHat li trovi presso:
  <http://www.channel1.com/users/rodsmith/rhjol-technical.html>.


  4.12.  Come posso rendere i CDROM scrivibili come un Hard Disk?

  S. C' un filesystem di overlay per Linux che puoi montare al di
  sopra del CD-ROM e che intercetta tutte le operazioni di scrittura. I
  file nuovi e quelli modificati sono memorizzati da qualche altra
  parte, ma all'utente sembra proprio di averli modificati. Per maggiori
  informazioni dai un'occhiata a:
  <http://home.att.net/~artnaseef/ovlfs/ovlfs.html>.

  Se non ne hai abbastanza devi solo aspettare che Linux supporti il
  filesystem UDF, oppure rimboccati le maniche e dai una mano:
  <http://trylinux.com/projects/udf/>.  Al momento  supportata la sola
  lettura a causa di limitazioni dei driver per CDROM nel kernel.


  4.13.   possibile usare pi masterizzatori allo stesso tempo?

  S. E' stato testato con 3 masterizzatori 6x funzionanti a piena
  velocit su di un PC con processore a 233 Mhz, un controller SCSI a
  singolo canale e kernel 2.2.12.  Ti serve o una versione recente del
  Kernel (2.2.12 o superiore) oppure una patch per avere pi buffer nel
  driver SCSI generico
  <ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha>; funziona per
  versioni sino alla 2.2.5.



  4.14.  Quale supporto  il migliore?

  La risposta a questa domanda era obsoleta ed  stata rimossa. La
  domanda in s viene mantenuta per avere uno schema di numerazione
  costante.


  4.15.  E a proposito di Solaris, *BSD, AIX, HP-UX, ecc.?

  Solo il cap.2  specifico per Linux. Puoi applicare i capitoli 3 e 4
  anche ad altri sistemi operativi. Guarda i file README.NetBSD,
  README.aix, README.hpux, README.next, README.solaris, README.sunos,
  README.vms o README.xxxBSD dalla distribuzione di cdrecord.


  4.16.  Dove posso mantenere permanentemente la configurazione locale?

  Hai due possibilit. Usare il file di configurazione per cdrecord
  oppure uno shell-wrapper come quello indicato qui sotto. Questo script
  per la shell legge un file di configurazione, nel quale sono indicate
  le opzioni e i parametri per cdrecord riga per riga. I nomi sono
  esattamente gli stessi che sulla riga di comando, ma senza essere
  preceduti da -. I commenti sono possibili. Esempio:





  # be verbose
  v
  # set the speed of the writer
  speed=2
  # the device-coordinates in the form BUS,ID,LUN
  dev=0,6,0




  I file di configurazione per lo script sono all'interno di
  /etc/cdrecord e devono essere indicati nella riga di comando. Esempio:
  se vuoi riferirti alla configurazione /etc/cdrecord/mywriter.cfg,
  allora devi impartire il comando "cdrecord.sh mywriter.cfg -audio
  track1...". Ogni parametro dopo mywrite.cfg  passato a cdrecord.



       #! /bin/bash

       CFGDIR="/etc/cdrecord"

       CFG="$1"
       shift
       ARGS_LEFT="$@"

       if [ ! -f "$CFGDIR/$CFG" ]
       then
           echo "Configuration file $CFGDIR/$CFG not found. Exiting."
           exit 1
       fi

       while read LINE
       do
           case $LINE in
               \#*|"") continue;;
           esac
           old_IFS="$IFS"
           IFS="$IFS="
           set -- $LINE
           IFS="$old_IFS"
           O_NAME="$1"
           O_VALUE=""
           while shift
           do
               case $1 in
                   "") continue;;
               esac
               O_VALUE="$1"
           done

           if [ -z "$O_VALUE" ]
           then
               O_CDRECORD="$O_CDRECORD -$O_NAME "
               continue
           fi
           O_CDRECORD="$O_CDRECORD $O_NAME=$O_VALUE "

       done < "$CFGDIR/$CFG"

       set -x    #DEBUG
       exec cdrecord $O_CDRECORD $ARGS_LEFT
       echo "Execution of cdrecord failed."



  4.17.  Come faccio a leggere le informazioni del CD?

  Da qualche parte dopo i primi 32k sul CD vi  un blocco contenente le
  informazioni sul CD. Puoi estrarre queste informazioni con questo
  script:



       #! /bin/bash

       RD=/dev/cdrom
       for i in 32768,7   32776,32 32808,32 32958,128 33086,128 33214,128 \
                33342,128 33470,32 33581,16 33598,16  33615,16  33632,16
       do
           old_IFS="$IFS"
           IFS=","
           set -- $i
           IFS="$old_IFS"
           OFFSET=$1
           LENGTH=$2
           echo "*`dd if=$RD bs=1 skip=$OFFSET count=$LENGTH   2> /dev/null`#"
       done






  4.18.  E a proposito dei riscrivibili?

  Per riscrivere un supporto CD-RW specifica il parametro blank=fast a
  cdrecord.  Tutto qui. Dai un'occhiata alla pagina man di cdrecord per
  maggiori dettagli su questo parametro.


  4.19.  Come creo un CD multisessione?

  Per prima cosa l'immagine per un CD multisessione deve essere
  formattata con il filesystem ISO9660 e le estensioni RockRidge. In pi
  devi usare l'opzione -multi di cdrecord se vuoi ancora aggingere nuove
  sessioni. Quindi, almeno per la prima devi usare l'opzione -multi.

  Le immagini per la seconda e successive sessioni sono un poco pi
  difficili da generare. Mkisofs deve sapere dove inizia lo spazio
  libero sul CD. ti puoi procurare questa informazione con l'opzione
  -msinfo di cdrecord (ecco un esempio).



       shell> NEXT_TRACK='cdrecord -msinfo dev=0,6,0'
       shell>: echo $NEXT_TRACK
       shell> mkisofs -R -o cd_image2 -C $NEXT_TRACK -M /dev/scd5
                 private_collection/ \




  Per maggiori informazioni leggi il file README.multi incluso nella
  distribuzione di cdrecord.


  4.20.  Devo usare il controller SCSI che mi  stato venduto insieme al
  masterizzatore?

  Molte specifiche di masterizzatori indicano di usare un bus SCSI
  separato se i dati viaggiano da un CD-ROM verso un masterizzatore, e
  ho potuto constatarlo in questa occasione.

  Controller Adaptec 2940UW SCSI, 24x SCSI CD-ROM e masterizzatore 4x4
  SCSI.  Quando mi  arrivato il masterizzatore aveva nella scatola il
  suo controller ISA-SCSI che poteva pilotare una sola periferica. Ho
  pensato di lasciarlo stare e di usare il mio controller Adaptec per
  ogni cosa.  Ho notato che spesso mi capitavano svuotamenti del buffer
  durante la scrittura a 4X, ma da quando ho iniziato ad usare il
  controller ISA-SCSI i problemi sono scomparsi. Conosco altre 2 persone
  (che usano controller Adaptec 2940) che hanno avuto esattamente gli
  stessi problemi, durante la scrittura "al volo". Non ho mai avuto
  problemi di questo tipo passando dall'HD al masterizzatore sullo
  stesso bus.



  4.21.  Come masterizzare da rete?

  Di solito un trasferimento via FTP  sufficientemente veloce per
  sostenere una scrittura a 4X, anche su una ethernet a 10 Mbit. Potete
  usare cdrecord in coppia con un client ftp attraverso una fifo.  Prima
  create una fifo chiamata cdimage:



       mkfifo cdimage
       ftp other.host.org
       get cdimg cdimage




  Quindi trattate la fifo come una normale immagine, per es. con il
  comando:



       cdrecord dev=0,1,0 speed=2 cdimage




  Il vostro client ftp si accorger che cdrecord vuole leggere dal file
  e inizier il trasferimento dati.


  4.22.  Sento degli scricchiolii alla fine di ogni traccia

  Dovete utilizzare la modalita disk-at-once (DAO) per eliminarli.


  4.23.  Come ci si pu organizzare per permettere ad un utente normale
  la scrittura dei CD?

  Potete rendere setuid l'eseguibile di cdrecord. Questo per potrebbe
  essere un rischio per la sicurezza.  Impostare i permessi sui file di
  periferica non aiuta in quanto cdrecord manda comandi privilegiati
  attraverso l'interfaccia SCSI generica.



       which cdrecord
       chown root.root /usr/bin/cdrecord
       chmod 4111 /usr/bin/cdrecord


  4.24.  La mia variante di Unix  supportata?

  Probabilmente s. Compilate cdrecord per la vostra piattaforma e date
  il comando "cdrecord -scanbus". Leggete i file README.* per la vostra
  versione di Unix che sono distribuiti con i sorgenti di cdrecord.
  Comunque, non tutte le versioni di Unix possono leggere le estensioni
  RockRidge, Joliet o HFS.



  4.25.  Dove posso procurarmi gli standard "Yellow Book" e "Orange
  Book"?

  Potete ottenere le specifiche stampate dalla Philips ma sono molto
  costose.



  4.26.  Sto cercando delle informazioni sulla scrittura di Video-CD
  sotto Linux.

  Anch'io.



  4.27.   pi facile impostare un sistema IDE o SCSI?

  Per quanto riguardo la scrittura di CDR sotto Linux, i masterizzatori
  SCSI sono leggermente pi facili da impostare.  E si dice che abbiano
  una migliore gestione degli errori. Se questo compensi il costo
  maggiore non  una domanda cui sia possibile rispondere in generale.


  4.28.  Come posso effettuare l'overburn di un CD usando {cdrecord,cdr
  dao}?

  Effettuare l'overburn di un CD non  niente di speciale.  a tuo
  rischio provare a far stare i dati sul CD, ma questo  tutto. Non vi 
  alcun limite ai 650MB nel software sotto Linux.


  4.29.  Cosa far cdrecord quando non vi sar input disponibile sulla
  pipe?

  Terminer la scrittura. Quindi  possibile accoppiare il vostro
  strumento di backup preferito a cdrecord tramite una pipe, come "bru
  -size=640m -f - |cdrecord dev=0,1,0 speed=2 -".  importante prestare
  molta attenzione alle opzioni dello strumento di backup.


  4.30.  Vi  l'equivalente di ignore=hdX per l'emulazione ide-scsi?

  Non saprei come fare, ma chiunque  il benvenuto per aggiungere questa
  caratteristica ai sorgenti del kernel di Linux.


  4.31.  Quante volte posso utilizzare un CD-RW prima che divenga difet
  toso?

  Buona domanda.


  4.32.  Quale formato di CD posso scegliere per renderlo indipendente
  dalla piattaforma?


  Un CD-ROM che debba essere letto su molti sistemi pu solo usare il
  formato semplice ISO9660.  Questo significa stupidi nomi file in
  formato 8.3 dal vecchio MS-DOS e senza alcuna estensione HFS
  (Macintosh), Joliet (Microsoft) o RockRidge (Unix pi recenti).  Non
  vi  alcuna estensione per nomi di file pi lunghi che possa essere
  letta da tutti i sistemi operativi.


  4.33.   possibile la multisessione per tracce audio?

  I lettori di CD Audio sono in grado di gestire solamente le tracce
  audio memorizzate nella prima sessione. In altre parole, se aggiungete
  tracce in sessioni successive, queste non verranno lette dal vostro
  stereo. Scrivere una seconda sessione pu essere utile per nascondere
  una traccia dati al lettore. In questo modo potete evitare che vi sia
  una traccia di silenzio, come accade nel caso di CD con tracce audio e
  dati mescolate.

  NDT: Per quanto riguarda i dischi con tracce audio e dati esistono 2
  possibilit.

  1. CD-Extra: una prima sessione contenente le tracce audio, una
     seconda contenente dati. Gli stereo leggeranno solamente le tracce
     audio, mentre con un lettore CDROM sar visibile la traccia dati.

  2. CD Mixed Mode: una traccia dati seguita da tracce audio nella prima
     sessione.  possibile che uno stereo tenti di riprodurre la traccia
     dati, con conseguente rischio di rovinare le casse.

     L'uomo comune, provvisto di cervello come dotazione di serie, usa
     adottare la prima possibilit :-).


  4.34.  Sento degli scricchiolii alla fine di ogni traccia audio.

  Utilizza la modalit di scrittura DAO (Disc At Once) per i tuoi CD
  audio e non ci saranno pi problemi.


  5.  Risoluzione di problemi

  Ricordati sempre che puoi usare i CD bruciati come sottobicchieri. :-)


  5.1.  Non va niente: sotto Linux

  Controlla che il masterizzatore funzioni con il software in dotazione
  (=sotto un altro sistema operativo). In pratica:


    Il controller riconosce il masterizzatore come periferica SCSI?

    Il driver software riconosce il masterizzatore?

    Si riesce a creare un CD con il software a corredo?

  Se non funziona un bel niente anche sotto altri sistemi operativi ci
  sono dei conflitti hardware oppure devi mettere mano alla garanzia.
  Se invece funziona e usi loadlin per bootare Linux ecco il tuo
  problema.  Loadlin effettua un boot veloce con la maggior parte
  dell'hardware gi inizializzato e questo pu confondere il kernel di
  Linux.




  5.2.  Messaggio d'errore: No read access for 'dev=0,6,0'.

  Sotto Linux, alcune versioni della libreria C sono incompatibili
  (bacate) cosicch un'applicazione linkata con una versione non
  funziona con un'altra.  Un tipico errore provocato da eseguibili
  precompilati  simile a questo:



       [root@Blue /dev]# cdrecord -eject dev=0,6,0
       cdrecord: No such file or directory. No read access for 'dev=0,6,0'.





  5.3.  Non funziona: sotto DOS e compagnia

  Prova a usare Linux.  veramente un macello installare e configurare
  driver SCSI sotto DOS. E Linux sarebbe troppo complicato? Ha!


  5.4.  Errori SCSI nella fase di scrittura

  Generalmente sono causati da:


    Mancanza di disconnessione/riconnessione al bus SCSI

    Raffreddamento insufficiente

    Hardware difettoso (dovrebbe essere riconosciuto dalla 5.1.)

  In varie circostanze le periferiche SCSI si disconnettono e
  riconnettono (elettronicamente) dal bus SCSI. Se non lo fanno (guarda
  i parametri del controller e del kernel) alcuni masterizzatori danno
  errori nella fase di scrittura o finalizzazione del CD.  Specialmente
  il driver SCSI NCR 53c7,8xx ha questa caratteristica disabilitata per
  default, quindi magari dagli un'occhiata per prima cosa:



       NCR53c7,8xx SCSI support                  [N/y/m/?] y
          always negotiate synchronous transfers [N/y/?] (NEW) n
          allow FAST-SCSI [10MHz]                [N/y/?] (NEW) y
          allow DISCONNECT                       [N/y/?] (NEW) y





  5.5.  I CD appena scritti non sono leggibili su alcuni lettori.

  Alcune persone hanno riportato l'esistenza di problemi nella
  riproduzione di CD scritti da loro stessi.  I lettori pi vecchi e i
  caricatori da auto hanno dei problemi nella lettura di CD-R, anche se
  questa situazione non  molto frequente.  Quasi sempre invece il
  problema si pone con i CD-RW dal momento che il loro coefficiente di
  riflessione del laser  inferiore a quello dei CD-R, quindi, a maggior
  ragione, non al livello dei CD "Silver" stampati in fabbrica.


  6.  Ringraziamenti



  Molti ringraziamenti vanno a i lettori di questo HOWTO, che
  contribuiscono attivamente ai suoi contenuti. Siccome io non ho avuto
  fisicamente accesso a un masterizzatore per diversi anni, informazioni
  su impostazioni reali ed esperienze varie sono sempre state di gran
  valore per me.


     Doug Alcorn <doug@lathi.net>
        ha aiutato a migliorare l'utilizzo di kernel nuovi


     Kalle Andersson <kalle@sslug.dk>
        Come creare CD audio direttamente da mp3.


     Alan Brown <alan@manawatu.net.nz>

     Rick Cochran <rick@msc.cornell.edu>
        suggerimento a proposito della (dis)connessione nel chip NCR


     Robert Doolittle <bob.doolittle@sun.com>
        ottimi argomenti per escludere cdwrite dall'HOWTO


     Markus Dickebohm <m.dickebohm@uni-koeln.de>

     Thomas Duffy <tduffy@sgi.com>
        grossa revisione di sintassi e semantica


     Jos van Geffen <jos@tnj.phys.tue.nl>
        ha notato il problema nella 4.9.


     Bernhard Gubanka <beg@ipp-garching.mpg.de>
        ha notato la necessit di una versione decente di mount per
        usare le loopback-devices


     Stephen Harris <sweh@mpn.com>
        suggerimenti sulla scrittura di CD audio


     Janne Himanka <shem@oyt.oulu.fi>
        indirizzo per la patch del kernel per leggere CDROM Joliet


     Stephan Noy <stnoy@mi.uni-koeln.de>
        informazioni ed esperienza nella scrittura di CD audio


     Don H. Olive <don@andromeda.campbellsvil.edu>
        URL di mkhybrid


     Jesper Pedersen <jews@imada.ou.dk>

     Pierre Pfister <pp@uplift.fr>
        mi ha aiutato a sviluppare il capitolo sulle copie 1:1


     Daniel A. Quist <dquist@cs.nmt.edu>
        informazioni su masterizzatori IDE e versioni nuove del kernel


     Martti.Rahkila@hut.fi
        Ha riportato il problema di masterizzatori pre-inizializzati
        durante il boot via loadlin.


     Dale Scheetz <dwarf@polaris.net>

     Joerg Schilling <schilling@fokus.gmd.de>
        informazioni su cdrecord


     Martin Schulze <joey@Infodrom.North.DE>
        informazioni per la mailing list di cdwrite


     Gerald C Snyder <gcsnyd@loop.com>
        volontario per la masterizzazione di un filesystem ext2 (vedi
        4.4)


     Art Stone <stone@math.ubc.ca>
        per l'idea di mettere filesystem non ISO-9660 sul CD


     The Sheepy One <kero@escape.com>
        ha suggerito di usare i CD bruciati come sottobicchieri


     Erwin Zoer <ezoer@wxs.nl>

     Dave Forrest  <dforrest@virginia.edu>
        ha sistemato il problema della dizione di "adapter"


  Inoltre vorrei ringraziare le seguenti persono per avermi fatto notare
  degli errori di grammatica: Bartosz Maruszewski
  <B.Maruszewski@zsmeie.torun.pl>, Ian Stirling <ian@opus131.com>, Brian
  H. Toby.


  7.  Note sulla traduzione e suggerimenti

  Traduzione Italiana di Corbelli Giuseppe.  Ho cercato di mantenere un
  tono "scherzoso e alla buona" per rendere pi piacevole la lettura
  senza pregiudicare i contenuti. Spero di esserci riuscito.  Per
  suggerimenti e schifezze che potrei aver scritto infamatemi pure a
  questo indirizzo: <cowo@lugbs.linux.it>

  Suggerimenti vari:

    Usate cdrdao, non solo cdrecord. Ha meno opzioni ma scrive in DAO,
      stabile,  disponibile in forma precompilata e pu essere
     facilmente pilotato tramite CUE Sheet (CDRWin vi dice niente?). Con
     2 comandi fa copie dirette o con immagine di qualsiasi disco. Dalla
     versione 1.1.3 include anche la libreria Paranoia per DAE,
     acquisendo dunque la piena capacit di estrazione audio digitale.
     Il sito WEB  il seguente :
     <http://www.ping.de/sites/daneb/download/>

    Se dovete solo copiare un CD lavorate sotto la shell senza X e
     utilizzate dd per creare l'immagine con un comando tipo:


       [root@braveheart cdrdao]#dd if=/dev/sr0 of=/tmp/nomefile bs=2048
       conv=notrunc,noerror

  La dimensione di bs (block size)  relativa alla dimensione dei dati
  utente all'interno del settore fisico del CD e l'opzione noerror con
  sente di ignorare gli errori di lettura pi leggeri.

  Oppure, meglio ancora, il programmino readcd presente nelle ultime
  distribuzioni di cdrecord. In alternativa sg_dd2048 o sg_dd2352 da
  <http://www.torque.net/sg>

  Un esempio con cdrdao  il seguente:


       [root@braveheart cdrdao]#cdrdao copy --device 0,2,0 --source-device 0,1,0 --driver generic-mmc
       --fast-toc --on-the-fly --speed 8 --buffers 80 -v 3 --paranoia-mode 0




  per una copia diretta a 8X senza correzione Jitter e con un FIFO di 10
  secondi in memoria.

    Per creare raccolte mkisofs  necessario, ma per non morire di
     vecchiaia   meglio un front-end grafico tipo X-CDRoast, che
     trovate all'indirizzo :  <http://www.fh-muenchen.de/rz/xcdroast>

    Applicate la patch di cui si parlava prima, reperibile
     all'indirizzo <ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha> in
     quanto la gestione di accessi multipli al driver sg 
     effettivamente poco efficiente e ci ha un pessimo impatto sulle
     copie dirette.  Questo vale solo per kernel "vecchi", a mia
     conoscenza precedenti alla v.2.2.5

    Linux con l'emulazione SCSI  manna dal cielo per i masterizzatori
     IDE.

    In questo periodo si parla tanto di modalit di scrittura RAW. 
     pi o meno la scoperta dell'acqua calda. Anche cdrdao ha da almeno
     un anno un driver di scrittura/lettura RAW quindi pu essere usato
     al posto di programmi tanto strombazzati.

  Fine del Linux CD-Writing HOWTO (puoi smettere di leggere).


























  The Linux CD-ROM HOWTO
  Jeff Tranter, tranter@pobox.com
  v1.14, 24 marzo 1999

  Questo documento descrive come installare, configurare e usare i let
  tori CD-ROM sotto Linux. Contiene una lista dell'hardware supportato e
  risponde a un gran numero di domande. L'intenzione  di portare i
  nuovi utenti a risolvere i loro problemi velocemente e ridurre il
  traffico nei newsgroup Usenet e nelle mailing list.

  1.  Introduzione


  Questo  il Linux CD-ROM HOWTO.  inteso come un riferimento veloce
  che copra tutto ci che serve sapere per installare e configurare
  l'hardware per il CD-ROM sotto Linux.  Viene data risposta alle
  Frequently Asked Questions (domande frequenti, o FAQ) e sono dati
  riferimenti ad altre fonti di informazioni legate alle applicazioni
  per CD-ROM e alle tecnologie relative a esse.


  1.1.  Crediti


  Molte di queste informazioni provengono dalla documentazione e dai
  sorgenti forniti con il kernel di Linux, dalle FAQ dei newsgroup
  Internet alt.cdrom e da utenti Linux.

  Grazie al pacchetto SGML Tools, questo HOWTO  disponibile in svariati
  formati, tutti generati da un comune file sorgente.


  1.2.  Nuove versioni di questo documento


  Nuove versioni di questo documento saranno inviate periodicamente al
  newsgroup comp.os.linux.answers. Saranno anche depositate su vari siti
  FTP che permettono l'accesso anonimo che archiviano tali informazioni,
  compreso  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/>.

  Le versioni ipertestuali di questo e altri HOWTO di Linux sono
  disponibili su molti siti Web, compreso
  <http://metalab.unc.edu/LDP/HOWTO/>. Molte distribuzioni su CD-ROM
  includono gli HOWTO, spesso nella directory /usr/doc, ed  possibile
  acquistarne versioni cartacee da molti editori. Qualche volta gli
  HOWTO reperibili in questi modi non sono aggiornati. Se la data di
  questo HOWTO  di pi di sei mesi fa, allora probabilmente 
  disponibile una nuova copia su Internet.

  Prego notare che, a causa della natura dinamica di Internet, tutti i
  collegamenti Web e ftp elencati in questo documento sono soggetti a
  cambiamenti.

  Questo HOWTO  stato tradotto in italiano da Germano Rizzo,
  germano@geocities.com.

  Traduzioni di questo documento sono disponibili in molte altre lingue:

  Cinese:  <http://www.linux.org.tw/CLDP/CDROM-HOWTO.html>

  Francese:  <http://www.freenix.org/unix/linux/HOWTO/>

  Giapponese:  <http://jf.linux.or.jp/JF/JF.html/>

  Polacco:  <http://www.jtz.org.pl/Html/CDROM-HOWTO.pl.html>

  Spagnolo:  <ftp://ftp.insflug.org/es>

  Svedese:  <http://www.swe-doc.linux.nu/>

  La maggior parte delle traduzioni di questo e altri HOWTO di Linux
  possono anche essere reperite a
  <http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/> e
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/>.


  1.3.  Commenti e critiche


  Faccio affidamento sui lettori, per rendere questo HOWTO quanto pi
  utile possibile. Se avete qualsiasi suggerimento, correzione o
  commento, per favore inviatelo a me, tranter@pobox.com, e prover ad
  incorporarlo nella prossima revisione.

  Ho anche intenzione di rispondere a questioni generiche sui CD-ROM
  sotto Linux meglio che posso. Prima di fare ci, per favore leggete
  tutte le informazioni in questo HOWTO e poi inviatemi informazioni
  dettagliate sul problema. Per favore, non chiedetemi alcunch sull'uso
  di drive CD-ROM sotto sistemi operativi diversi da Linux.

  Se pubblicate questo documento su un CD-ROM o in forma cartacea,
  apprezzerei una copia omaggio; scrivetemi per avere il mio indirizzo
  di posta ordinaria. Considerate anche la possibilit di fare una
  donazione al Linux Documentation Project per aiutare a supportare la
  documentazione gratuita e libera per Linux. Contattate il coordinatore
  dei Linux HOWTO, Tim Bynum (linux-howto@metalab.unc.edu), per maggiori
  informazioni.


  1.4.  Modalit di distribuzione


  Copyright (c) 1995-1999 di Jeff Tranter. Questo documento pu essere
  distribuito nei termini stabiliti nella licenza LDP in
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.


  2.  La tecnologia CD-ROM



  "Il CD-ROM  un dispositivo di memorizzazione a sola lettura e il
  sistema dei compact disc audio  disponibile come un pacchetto di
  media per dati digitali a quello scopo. Per suonare CD audio,
  prego inserire lo spinotto delle cuffie."
  --- da un manuale di istruzioni di un CD-ROM



  Non fatevi prendere dal panico! Il mondo della tecnologia CD-ROM non 
  caotico come questo manuale di istruzioni.

  CD-ROM sta per Compact Disc Read-Only Memory (memoria a sola lettura
  basata su compact disc), un dispositivo di memorizzazione di massa che
  utilizza un laser ottico per leggere avvallamenti microscopici sullo
  strato metallizzato di un disco di policarbonato.  Lo stesso formato 
  utilizzato per i Compact Disc Audio. Grazie all'elevata capacit di
  memorizzazione, all'affidabilit e al basso costo, il CD-ROM sta
  diventando un dispositivo dalla popolarit sempre maggiore.

  La capacit di memorizzazione di un disco CD-ROM  di circa 650
  megabyte, equivalente a pi di 500 dischetti da 3,5" ad alta densit o
  approssimativamente a 250000 pagine scritte.

  I drive di prima generazione (conosciuti come a singola velocit),
  fornivano un transfer rate (velocit di trasferimento) di circa 150
  kilobyte al secondo. I fabbricanti di hardware poi introdussero la
  doppia velocit (300 KB/sec), la quadrupla (600 KB/sec), e cos via. I
  drive odierni possono operare a velocit superiori a 40 volte la
  singola, sebbene la massima velocit possa essere raggiunta solo in
  certe porzioni della superficie del disco.

  La maggior parte dei drive CD-ROM usano come interfaccia o la SCSI
  (Small Computer Systems Interface), o l'ATAPI enhanced IDE, oppure
  un'interfaccia proprietaria del produttore. Tipicamente, supportano la
  riproduzione di CD audio per mezzo di una presa per cuffie o
  dell'output di linea. Alcuni CD permettono anche di leggere i
  pacchetti di dati dai CD audio in forma digitale.

  I CD-ROM sono solitamente formattati con il filesystem ISO-9660
  (conosciuto in passato come High Sierra).  Questo formato pone
  restrizioni sui nomi dei file, limitandoli allo standard MS-DOS (8+3
  caratteri). Le estensioni Rock Ridge usano campi non definiti
  dall'ISO-9660 per supportare nomi dei file pi lunghi e informazioni
  addizionali proprie di UNIX (ad es., propriet e permessi dei file,
  link simbolici, ecc.). Microsoft ha definito delle estensioni
  proprietarie per il filesystem ISO chiamate Joliet che supportano nomi
  lunghi usando la codifica di caratteri UNICODE 16-bit.

  Il PhotoCD  uno standard sviluppato da Kodak per archiviare immagini
  fotografiche come dati digitali su CD-ROM. Con un software
  appropriato,  possibile vedere le immagini sul computer, manipolarle,
  o inviarle a una stampante. Altre informazioni possono essere aggiunte
  in un secondo momento; questa caratteristica  conosciuta come
  multisessione.

  I registratori CD (CD-R, comunemente detti masterizzatori) permettono
  la scrittura su speciali CD ``gold'' che possono poi essere letti da
  qualsiasi drive CD-ROM. I dati possono essere scritti una sola volta,
  anche se usando la multisessione nuovi dati possono essere aggiunti al
  disco. Questi drive stanno diventando sempre pi accessibili a tutti.

  I drive CD-RW (read/write, lettura e scrittura) supportano CD che
  possono essere registrati pi volte. Sono dischi speciali che non
  possono essere letti dai drive CD-ROM pi vecchi, anche se i drive CD-
  RW stessi possono leggere CD normali.

  I DVD-ROM espandono la capacit di immagazzinamento di un CD fino a 17
  gigabyte. Sono comunemente usati come supporto per distribuire film
  completi compressi usando il formato MPEG-2. La decompressione MPEG
  avviene di solito usando hardware video dedicato.


  3.  Hardware supportato


  Questa sezione elenca i drive CD-ROM e le loro interfacce attualmente
  supportate da Linux. Le informazioni qui riportate sono basate sul pi
  recente kernel di Linux stabile, che al momento di questo scritto era
  la versione 2.2.4.

  Inoltre, queste informazioni sono valide solo per Linux su piattaforme
  Intel; la maggior parte di esse sono tuttavia valide anche per altre
  architetture.




  3.1.  Drive CD-ROM ATAPI


  ATAPI (ATA Packet Interface)  un protocollo per controllare
  dispositivi di memorizzazione di massa.  costruito sull'interfaccia
  ATA (AT Attachment), il nome ufficiale standard ANSI per l'interfaccia
  IDE, sviluppata per gli hard disk. ATAPI  comunemente usata per hard
  disk, drive CD-ROM, dispositivi a nastro, ed altri dispositivi.
  Attualmente il tipo pi popolare di interfaccia, offre molte delle
  funzionalit della SCSI, senza il bisogno di costosi controller o
  cavi.

  Il kernel di Linux ha un driver di dispositivo che dovrebbe funzionare
  per ogni CD-ROM ATAPI. Alcune case che producono drive compatibili
  sono Aztech, Mitsumi, NEC, Sony, Creative Labs e Vertos. Se avete
  acquistato di recente un drive CD-ROM, specialmente se a quadrupla
  velocit o superiore,  quasi sicuro che sia IDE/ATAPI o SCSI.

  Linux ha anche una modalit IDE SCSI emulation (emulazione IDE
  dell'interfaccia SCSI) nel kernel che fa apparire al software un
  dispositivo IDE/ATAPI come fosse SCSI, permettendo di usare un driver
  di dispositivo SCSI al posto dell'originale driver ATAPI. Questo 
  utile se avete un dispositivo ATAPI per il quale non  stato scritto
  alcun driver dedicato (per esempio, un PC-CD ATAPI o un drive CDR); in
  seguito potete quindi usare questa emulazione assieme a un appropriato
  driver di dispositivo SCSI.


  3.2.  Drive CD-ROM SCSI


  SCSI (Small Computer Systems Interface)  un formato diffuso per i
  drive CD-ROM. I suoi principali vantaggi sono un transfer rate
  ragionevolmente alto, la possibilit di collegare pi dispositivi e il
  supporto di svariate architetture di computer. Alcuni svantaggi sono
  legati alla necessit di schede controller e di cavi relativamente
  costosi.

  Qualsiasi drive CD-ROM SCSI con dimensioni dei blocchi di 512 o 2048
  byte dovrebbe funzionare sotto Linux; questi includono la stragrande
  maggioranza di drive CD-ROM sul mercato.

  Avrete anche bisogno di una scheda controller SCSI supportata; si veda
  lo SCSI HOWTO per maggiori informazioni sulle interfacce hardware.

  Notate che alcuni CD-ROM comprendono un controller SCSI proprietario
  con un'interfaccia modificata non pienamente compatibile con lo
  standard SCSI (per esempio, potrebbe non supportare l'aggiunta di
  ulteriori dispositivi sul bus). Questi, con ogni probabilit, non
  funzioneranno sotto Linux.


  3.3.  Drive CD-ROM con interfacce proprietarie


  Sono disponibili molti drive CD-ROM che usano interfacce proprietarie;
  l'interfaccia  spesso fornita su una scheda audio. Sono anche
  disponibili semplici schede d'interfaccia equivalenti a quelle fornite
  sulle schede audio. Questi drive generalmente tendono a essere meno
  costosi e ingombranti dei drive SCSI. I loro svantaggi stanno nella
  mancanza di standard fissi e di espandibilit.

  Notate che spesso ci si riferisce erroneamente alle interfacce
  proprietarie come interfacce IDE, perch come gli hard disk IDE, usano
  un'interfaccia semplice basata sul bus PC/AT. Per aggiungere
  confusione alla confusione, alcuni produttori, tra cui  pi evidente
  Creative Labs, producono molti tipi diversi di drive CD-ROM e offrono
  interfacce SCSI, ATAPI e proprietarie sulle loro schede audio.

  La tabella seguente elenca i drive CD-ROM con interfaccia proprietaria
  che sono supportati da Linux. Driver per ulteriori dispositivi possono
  essere disponibili nei pi recenti kernel di sviluppo o come patch per
  il kernel. Questi ultimi possono essere spesso reperiti su
  <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cdrom/>. Leggete anche
  i file di documentazione inclusi nella distribuzione del kernel, di
  solito installati in /usr/src/linux/Documentation/cdrom, per avere le
  informazioni pi aggiornate.


         Drive CD-ROM con interfacce proprietarie

  Produttore      Modello         Driver Kernel   Note
  ------          -----           -------------   --------
  Panasonic       CR-521          sbpcd           Nota 1
  Panasonic       CR-522          sbpcd           Nota 1
  Panasonic       CR-523          sbpcd           Nota 1
  Panasonic       CR-562          sbpcd           Nota 1
  Panasonic       CR-563          sbpcd           Nota 1
  Creative Labs   CD-200          sbpcd
  IBM             ISA Esterno     sbpcd           Nota 2
  Longshine       LCS-7260        sbpcd
  Teac            CD-55A          sbpcd
  Sony            CDU-31A         cdu31a
  Sony            CDU-33A         cdu31a
  Sony            CDU-535         sonycd535       Nota 3
  Sony            CDU-531         sonycd535
  Aztech          CDA268-01A      aztcd           Nota 4
  Orchid          CDS-3110        aztcd
  Okano/Wearnes   CDD110          aztcd
  Conrad          TXC             aztcd
  CyCDROM         CR520ie         aztcd
  CyCDROM         CR940ie         aztcd
  GoldStar        R420            gscd            Nota 5
  Philips/LMS     CM206           cm206           Nota 6
  Mitsumi         CRMC LU005S     mcd/mcdx        Nota 7, 8
  Mitsumi         FX001           mcd/mcdx        Nota 7, 8
  Optics Storage  Dolphin 8000AT  optcd
  Lasermate       CR328A          optcd
  Sanyo           H94A            sjcd
  vari            vari            isp16           Nota 9



  Note:


  1. Questi drive possono essere venduti sotto i nomi Creative Labs,
     Panasonic, Matsushita o Kotobuki.

  2. Questo drive ha la stessa meccanica interna del Panasonic CR- 562.

  3. Venduto anche sotto il nome di Procomm.

  4. Questo driver  solo per il CDA268-01A. Altri modelli, inclusi il
     CDA268-03I e il CDA269-031SE, non hanno bisogno di interfaccia
     proprietaria e dovrebbero usare il driver IDECD (ATAPI) del kernel.

  5. Pu anche essere venduto come parte del Reveal Multimedia Kit.

  6. Il Philips CM205 non  supportato da questo driver, ma c' un
     driver in fase alpha separato disponibile su ftp://metalab.unc.edu
     in /pub/Linux/kernel/patches/cdrom/lmscd0.4.tar.gz
  7. Pu anche essere venduto sotto il nome di Radio Shack.

  8. Ci sono due driver disponibili. ``mcd''  quello originale, e
     ``mcdx''  un driver nuovo con pi caratteristiche supportate (ma
     forse meno stabile).

  9. Questo driver funziona con i drive CD-ROM collegati all'interfaccia
     presente sulle schede audio ISP16, MAD16 o Mozart.

  Se un drive elencato non  supportato dal vostro kernel, probabilmente
  avrete bisogno di aggiornare quest'ultimo a una nuova versione.

  Se il vostro drive non  uno dei modelli elencati, in particolare se 
  stato acquistato di recente o se  a quadrupla velocit o superiore,
  probabilmente usa l'interfaccia IDE/ATAPI descritta in una precedente
  sezione. L'errore pi comune tra gli utilizzatori di CD-ROM sotto
  Linux  quello di credere che qualsiasi drive connesso a una scheda
  SoundBlaster usi per forza il driver SBPCD. Creative Labs e la maggior
  parte degli altri produttori non vendono pi drive con interfacce
  proprietarie, seguono piuttosto l'interfaccia IDE/ATAPI standard.


  3.4.  Drive su porta parallela


  Ci sono dispositivi di memorizzazione esterni, inclusi drive CD-ROM,
  che sono connessi alla porta parallela dei personal computer. In molti
  casi il dispositivo internamente usa un'interfaccia IDE unita a un
  adattatore che interfaccia il bus interno IDE alla porta parallela del
  PC.

  Linux ha un driver IDE per la porta parallela che supporta la maggior
  parte dei dispositivi per questa presa. Attualmente, supporta
  dispositivi dei seguenti produttori (ma anche molti dispositivi `senza
  marca' e cloni compatibili coi seguenti): ATEN, Avatar, DataStor,
  Fidelity International Technology, Freecom, Hewlett-Packard, Imation,
  KT Technology, KingByte Information Corp., Maxell, MicroSolutions,
  OnSpec, Shuttle Technology, SyQuest e ValuStore.

  Informazioni aggiuntive possono essere reperite su
  <http://www.torque.net/parport/>.


  3.5.  Driver alternativi


  C' un driver del kernel alternativo disponibile per i drive
  Panasonic/Matsushita CR-56x scritto da Zoltan Vorosbaranyi. Pu essere
  scaricato da  <ftp://ftp.honlap.net/pub/linux/pcd/pcd-0.30.tar.gz>.


  4.  Installazione


  L'installazione di un CD-ROM sotto Linux si compone dei seguenti
  passi:


  1. Installare l'hardware

  2. Configurare e compilare il kernel di Linux

  3. Creare i file di dispositivo e impostare i parametri del boot

  4. Avviare il kernel

  5. Montare il dispositivo

  La prossima sezione coprir ognuno di questi punti in dettaglio.


  4.1.  Installare l'hardware


  Seguite le istruzioni del produttore per installare l'hardware o
  fatelo fare al vostro rivenditore. I dettagli varieranno a seconda che
  il drive sia esterno o interno e in base del tipo dell'interfaccia
  utilizzata.  Non ci sono requisiti di installazione particolari per
  Linux. Potrete aver bisogno di cambiare i jumper (ponticelli) sul
  drive o sulla scheda d'interfaccia per un corretto funzionamento;
  alcuni driver del kernel includono file di documentazione che
  forniscono queste informazioni.

  Come spiegato nel file ide-cd, i CD-ROM ATAPI dovrebbero essere
  impostati come ``single'' o ``master'', e non ``slave'' quando c'
  solo un dispositivo attaccato all'interfaccia (sebbene questa
  restrizione non si applichi pi ai kernel pi recenti).


  4.2.  Configurare e compilare il kernel di Linux


  Se state installando da zero Linux da CD-ROM probabilmente starete
  usando un disco di boot e/o root fornito come parte della
  distribuzione Linux. Se possibile, dovreste usare un disco di boot con
  i driver del kernel propri del vostro drive CD-ROM. Se non riuscite a
  trovare un disco di boot con i driver CD-ROM necessari, ci sono
  parecchie strade per risolvere il problema:


  1. Fate il boot direttamente da CD-ROM (se supportato dal PC e dal CD
     di Linux)

  2. Installate direttamente dalla rete

  3. Avviate il DOS e installate i file di Linux sull'hard disk

  4. Avviate il DOS e create un insieme di dischetti da cui installare
     Linux

  5. Trovate qualcuno che vi possa fare un disco di boot con i driver
     richiesti

  Il Linux Installation HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/Installation-HOWTO.html> contiene
  ulteriori informazioni sull'installazione di Linux. Se avete
  acquistato Linux su CD-ROM, probabilmente troverete allegate delle
  istruzioni di installazione (quel piccolo libretto nella custodia del
  CD, o qualche file sul CD stesso).

  Una volta che Linux  stato installato, la maggior parte degli utenti
  vorranno compilare il loro kernel personalizzato, di solito per uno di
  questi motivi:


    per supportare un drive CD-ROM o un altro dispositivo

    per aggiornarsi a una nuova versione del kernel

    per liberare risorse di memoria riducendo al minimo la dimensione
     del kernel

  Dovreste dare un'occhiata al Linux Kernel HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html> per avere
  maggiori dettagli sulla compilazione del kernel. Menzioner solo
  alcuni particolari specifici per i drive CD-ROM.

  Ovviamente, avrete bisogno di attivare il supporto per il vostro drive
  CD- ROM quando lanciate un ``make config''.

  Se avete un drive CD-ROM ATAPI, dovrete rispondere yes (s) alle
  domande:



       Enhanced IDE/MFM/RLL disk/cdrom/tape support (CONFIG_BLK_DEV_IDE)
       [Y/n/?]
       Include IDE/ATAPI CDROM support (CONFIG_BLK_DEV_IDECD) [Y/n/?]




  Per drive CD-ROM SCSI, abilitate queste opzioni:



       SCSI support (CONFIG_SCSI) [Y/n/m/?]
       SCSI CDROM support (CONFIG_BLK_DEV_SR) [Y/n/m/?]




  Abilitate anche il supporto per l'adattatore SCSI quando viene
  richiesto, per esempio:



       Adaptec AHA152X/2825 support (CONFIG_SCSI_AHA152X) [Y/n/m/?]




  Per drive CD-ROM con interfaccia proprietaria, abilitate il driver
  appropriato. Potete usare la tabella precedente per determinare il
  driver da usare per il vostro modello.

  Virtualmente tutti i CD-ROM usano il file system ISO-9660, perci
  dovete abilitare anche:



       ISO 9660 CDROM filesystem support (CONFIG_ISO9660_FS) [Y/n/m/?]




  Sebbene non sia richiesto per far funzionare il CD-ROM, se avete una
  scheda audio supportata da Linux a questo punto potreste anche voler
  abilitare e configurare il driver del kernel per il supporto audio. Il
  Sound HOWTO <http://metalab.unc.edu/LDP/HOWTO/Sound-HOWTO.html> pu
  essere un riferimento valido.

  Dovete quindi seguire la procedura normale per compilare il kernel e
  installarlo. Non fate il boot del nuovo kernel finch non avete creato
  tutti i file di dispositivo richiesti e non avete impostato i
  parametri di boot come descritto nella prossima sezione.


  Il filesystem ISO-9660 e quasi tutti i driver CD-ROM possono essere
  compilati come moduli del kernel caricabili. Questa modalit permette
  ai driver del kernel di essere caricati e scaricati senza riavviare il
  kernel, liberando memoria. Raccomando di avviare l'installazione del
  CD-ROM dapprima usando driver compilati all'interno del kernel. Nella
  documentazione dei moduli e nel Kernel HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html> potete trovare
  descritto come usare i moduli.

  Se un drive elencato non  supportato dal vostro kernel, probabilmente
  avrete bisogno di aggiornare quest'ultimo a una nuova versione.

   possibile che vi serva usare un driver che  distribuito
  separatamente dai sorgenti del kernel. Di nuovo, il Kernel HOWTO
  <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html> spiega come
  farlo.

  Notate che c' una modalit di configurazione del kernel basata su
  menu, richiamata da ``make menuconfig'' e una configurazione grafica
  basata su X11 richiamata da ``make xconfig''. Tutti e tre i metodi di
  configurazione offrono l'aiuto in linea.


  4.3.  Creare i file di dispositivo e impostare i parametri del boot


  Il kernel usa i file di dispositivo (device file) per identificare
  quale driver di dispositivo (device driver) usare. Se state avviando
  una distribuzione Linux standard, potete aver gi creato i file
  necessari durante l'installazione. Nella Slackware, per esempio, c'
  uno strumento di setup basato su menu che comprende l'impostazione del
  CD-ROM, e la maggior parte dei sistemi hanno uno script /dev/MAKEDEV.
  Se non usate uno di questi metodi, raccomando almeno di verificare i
  file di dispositivo rispetto alle informazioni di questa sezione.

  Potete creare i file di dispositivo avviando i comandi di shell
  indicati per il vostro tipo di drive. Questo dovrebbe essere fatto
  come utente root. Nota che alcune distribuzioni Linux possono usare
  nomi di dispositivi CD-ROM leggermente diversi da quelli elencati qui.

   raccomandabile anche la creazione di un link simbolico al
  dispositivo CD-ROM per renderlo pi facile da ricordare. Per esempio,
  per un drive CD-ROM IDE che  il dispositivo secondario
  sull'interfaccia secondaria, il link potrebbe essere creato usando



       # ln -s /dev/hdd /dev/cdrom




  Se volete riprodurre CD audio, dovrete impostare la protezione sul
  file di dispositivo (il file vero, non il link simbolico a esso) per
  permettere a tutti gli utenti di leggerlo, per esempio



       # chmod 664 /dev/hdd
       # ls -l /dev/hdd
       brw-rw-r--   1 root     disk      22,  64 Feb  4  1995 /dev/hdd





  Quando avviate Linux, i driver di dispositivo tentano di determinare
  se sono presenti i dispositivi appropriati, tipicamente provando
  indirizzi specifici. Molti dei driver provano automaticamente su
  diversi indirizzi, ma a causa delle differenze nella configurazione,
  di possibili conflitti o di limitazioni hardware, alcune volte hanno
  bisogno di aiuto per identificare gli indirizzi e altri parametri. La
  maggior parte supporta una opzione nella riga di comando del kernel
  per ottenere queste informazioni. Questo pu essere fatto
  interattivamente o, pi comunemente, configurato nel boot loader. Con
  LILO, per esempio, dovreste aggiungere un comando append come il
  seguente al file /etc/lilo.conf:



       append = "sbpcd=0x230,SoundBlaster"




  Controllate la documentazione di LILO per maggiori informazioni.

  Nella prossima sezione discuter argomenti specifici per particolari
  driver di dispositivo, inclusi file di dispositivo, parametri di boot,
  e le caratteristiche supportate da quei driver. Probabilmente vi
  servir solo leggere la sezione specifica al vostro particolare tipo
  di drive. I file di documentazione sono di solito rintracciabili nella
  directory /usr/src/linux/Documentation/cdrom.


  4.3.1.  Il driver Sbpcd



                     Principale autore: Eberhard Moenkeberg (emoenke@gwdg.de)
                Supporto multisessione: s (ma non tutti i drive)
           Supporto per drive multipli: s
        Supporto per moduli caricabili: s
                   Legge i frame audio: s (ma solo CR-562, CR-563 e CD-200)
                          Auto-probing: yes
                   File di dispositivo: /dev/sbpcd, numero primario 25
                File di configurazione: sbpcd.h
  Opzioni di configurazione nel Kernel: Matsushita/Panasonic CDROM support?
             File della documentazione: sbpcd



  Questo driver accetta una linea di comando del kernel nella forma:



       sbpcd=<indirizzo io>,<tipo di interfaccia>




  Dove il primo parametro  l'indirizzo base del dispositivo (per
  esempio 0x230) e il secondo  uno tra ``SoundBlaster'', ``LaserMate''
  o ``SPEA''.  Leggete il file sbpcd.h per suggerimenti su che tipo di
  interfaccia utilizzare. L'uso di sbpcd=0 disabilita la prova
  automatica (auto-probing), disabilitando il driver.

  Il file di dispositivo pu essere creato utilizzando:




  # mknod /dev/sbpcd b 25 0




  Sono supportati fino a quattro drive per controller. I successivi tre
  driver sul primo controller useranno il numero secondario di
  dispositivo da 1 a 3. Se avete pi di un controller, aggiungete
  dispositivi con numero primario 26, 27 e 28, fino a un massimo di
  quattro controller (questo fa 16 drive in totale; si spera siano
  abbastanza per la maggior parte degli utenti :-).

  Leggete il file sbpcd per maggiori informazioni su questo driver.

  Se avete acquistato un drive CD-ROM di recente, non credete che se 
  connesso a una SoundBlaster  debba per forza usare questo driver. La
  maggior parte dei CD-ROM venduti dalla Creative Labs sono ora
  EIDE/ATAPI.


  4.3.2.  Il driver Sonycdu535



                     Principale autore: Ken Pizzini (ken@halcyon.com)
                Supporto multisessione: no
           Supporto per drive multipli: no
        Supporto per moduli caricabili: s
                   Legge i frame audio: no
                          Auto-probing: no
                   File di dispositivo: /dev/sonycd535, numero primario 24
                File di configurazione: sonycd535.h
  Opzioni di configurazione nel Kernel: Sony CDU535 CDROM support?
             File della documentazione: sonycd535



  Questo driver accetta una linea di comando del kernel nella forma:



       sonycd535=<indirizzo io>




  dove il parametro  l'indirizzo base del controller (per esempio
  0x320). In alternativa potete impostare l'indirizzo nel file
  sonycd535.h e compilarlo al suo interno.

  Il file di dispositivo pu essere creato utilizzando:



       # mknod /dev/sonycd535 b 24 0




  Alcune distribuzioni Linux usano /dev/sonycd per questi dispositivi.
  Versioni pi vecchie del driver usavano come numero primario 21;
  assicuratevi che il vostro file di dispositivo sia corretto.

  Questo driver era dapprima distribuito come una patch, ma ora  parte
  del kernel standard. Leggete il file sonycd535 per maggiori
  informazioni su questo driver.
  4.3.3.  Il driver Cdu31a



                     Principale autore: Corey Minyard (minyard@-rch.cirr.com)
                Supporto multisessione: s
           Supporto per drive multipli: no
        Supporto per moduli caricabili: s
                   Legge i frame audio: s
                          Auto-probing: no
                   File di dispositivo: /dev/cdu31a, numero primario 15
                File di configurazione: cdu31a.h
  Opzioni di configurazione nel Kernel: Sony CDU31A/CDU33A CDROM support?
             File della documentazione: cdu31a



  Questo driver accetta una linea di comando del kernel nella forma:



       cdu31a=<indirizzo io>,<interrupt>,PAS




  Il primo numero  l'indirizzo I/O base della scheda (ad es. 0x340). Il
  secondo  il numero di interrupt da usare (0 significa usare un I/O
  gestito in polling). Il terzo parametro opzionale  ``PAS'' se il
  drive  connesso a una scheda audio Pro Audio Spectrum 16, altrimenti
  va tralasciato.

  Se il driver  caricato come modulo, usa un formato lievemente
  diverso. Quando caricate il driver usando i comandi modprobe o insmod,
  i parametri prendono la forma:



       cdu31a_port=<indirizzo io> cdu31a_irq=<interrupt>




  L'indirizzo I/O  richiesto, mentre il numero di interrupt 
  opzionale.

  Il file di dispositivo pu essere creato utilizzando:



       # mknod /dev/cdu31a b 15 0




  Leggete il file cdu31a per maggiori informazioni su questo driver.

  Leggete anche la pagina Web scritta da Jeffrey Oxenreider
  (zureal@infinet.com) che copre molti problemi comuni con questi drive.
  Pu essere trovata a
  <http://lemures.shinma.symix.com/~zureal/cdu31a.html>.





  4.3.4.  Il driver Aztcd



                     Principale autore: Werner Zimmermann (zimmerma@rz.fht-esslingen.de)
                Supporto multisessione: s
           Supporto per drive multipli: no
        Supporto per moduli caricabili: s
                   Legge i frame audio: no
                          Auto-probing: no
                   File di dispositivo: /dev/aztcd0, numero primario 29
                File di configurazione: aztcd.h
  Opzioni di configurazione nel Kernel: Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support?
             File della documentazione: aztcd



  Questo driver accetta una linea di comando del kernel nella forma:



       aztcd=<indirizzo io>




  dove il parametro  l'indirizzo I/O base della scheda (per esempio
  0x340).

  Il file di dispositivo pu essere creato utilizzando:



       # mknod /dev/aztcd0 b 29 0




  Nota che questo driver  solo per il CDA268-01A. Altri modelli,
  compresi il CDA268-03I e il CDA269-031SE non sono proprietari e usano
  il driver IDECD (ATAPI) del kernel.

  Si veda il file aztcd per maggiori informazioni su questo driver.


  4.3.5.  Il driver Gscd



                     Principale autore: Oliver Raupach (raupach@nwfs1.rz.fh-hannover.de)
                Supporto multisessione: no
           Supporto per drive multipli: no
        Supporto per moduli caricabili: s
                   Legge i frame audio: no
                          Auto-probing: no
                   File di dispositivo: /dev/gscd0, numero primario 16
                File di configurazione: gscd.h
  Opzioni di configurazione nel Kernel: Goldstar R420 CDROM support?
             File della documentazione: gscd



  Questo driver accetta una linea di comando del kernel nella forma:



  gscd=<indirizzo io>




  specificando l'indirizzo I/O base della scheda (per esempio 0x340).

  Il file di dispositivo pu essere creato utilizzando:



       # mknod /dev/gscd0 b 16 0




  Leggete il file gscd e il sito Web  <http://linux.rz.fh-
  hannover.de/~raupach/> per maggiori informazioni su questo driver.


  4.3.6.  Il driver Mcd



                             Principale autore: Martin  (martin@bdsi.com)
                Supporto multisessione: no
           Supporto per drive multipli: no
        Supporto per moduli caricabili: s
                   Legge i frame audio: no
                          Auto-probing: no
                   File di dispositivo: /dev/mcd, numero primario 23
                File di configurazione: mcd.h
  Opzioni di configurazione nel Kernel: Standard Mitsumi CDROM support?
             File della documentazione: mcd



  Questo  il driver pi vecchio di quelli Mitsumi;  stato disponibile
  per un certo tempo. Potreste provare il driver pi recente mcdx, che
  ha alcune caratteristiche in pi ma potrebbe essere meno stabile.

  Questo driver accetta una linea di comando del kernel nella forma:



       mcd=<indirizzo io>,<irq>




  specificando l'indirizzo I/O base della sceda (per esempio 0x340) e il
  numero di richiesta IRQ usato.

  Il file di dispositivo pu essere creato utilizzando:



       # mknod /dev/mcd b 23 0




  Vedi il file mcd per maggiori informazioni su questo driver.



  4.3.7.  Il driver Mcdx



                     Principale autore: Heiko Schlittermann
                Supporto multisessione: s
           Supporto per drive multipli: s
        Supporto per moduli caricabili: s
                   Legge i frame audio: no (non supportato dall'hardware)
                          Auto-probing: no
                   File di dispositivo: /dev/mcdx0, numero primario 20
                File di configurazione: mcdx.h
  Opzioni di configurazione nel Kernel: Experimental Mitsumi support?
             File della documentazione: mcdx



  Questo  un driver nuovo per i drive Mitsumi. Il pi vecchio e forse
  pi stabile driver mcd  ancora disponibile.

  Questo driver accetta una linea di comando del kernel nella forma:



       mcdx=<indirizzo io>,<irq>




  specificando l'indirizzo base I/O della scheda (ad es. 0x340) e il
  numero di richiesta IRQ usato.

  Il file di dispositivo pu essere creato utilizzando:



       # mknod /dev/mcdx0 b 20 0




  Se avete acquistato di recente un drive CD-ROM Mitsumi, non date per
  scontato che usi questi driver. I nuovi drive Mitsumi sono ora
  compatibili EIDE/ATAPI e usano il driver idecd del kernel.

  Si veda il file mcdx per maggiori informazioni su questo driver.


  4.3.8.  Il driver Cm206



                     Principale autore: David A. van Leeuwen (david@tm.tno.)
               Supporto Multi-sessione: s
           Supporto per drive multipli: no
        Supporto per moduli caricabili: s
                   Legge i frame audio: no
                          Auto-probing: s
                   File di dispositivo: /dev/cm206cd, numero primario 32
                File di configurazione: cm206.h
  Opzioni di configurazione nel Kernel: Philips/LMS CM206 CDROM support?
             File della documentazione: cm206




  Questo driver accetta una linea di comando del kernel nella forma:



       cm206=<indirizzo io>,<interrupt>




  ove il primo numero  l'indirizzo base I/O della scheda (per esempio
  0x340). Il secondo  il canale d'interrupt.

  Il file di dispositivo pu essere creato utilizzando:



       # mknod /dev/cm206cd b 32 0




  Consultate il file cm206 per maggiori informazioni su questo driver.


  4.3.9.  Il driver Optcd



                     Principale autore: Leo Spiekman (spiekman@dutette.et.tudelft.nl)
                Supporto multisessione: s
           Supporto per drive multipli: no
        Supporto per moduli caricabili: s
                   Legge i frame audio: no
                          Auto-probing: no
                   File di dispositivo: /dev/optcd0, numero primario 17
                File di configurazione: optcd.h
  Opzioni di configurazione nel Kernel: Experimental Optics Storage ... CDROM support?
             File della documentazione: optcd



  Questo driver accetta una linea di comando del kernel nella forma:



       optcd=<indirizzo io>




  per fornire l'indirizzo I/O base della scheda (per esempio 0x340).

  Il file di dispositivo pu essere creato utilizzando:



       # mknod /dev/optcd0 b 17 0




  Si veda il file optcd per maggiori informazioni su questo driver.




  4.3.10.  Il driver Sjcd



                     Principale autore: Vadim V. Model (vadim@rbrf.msk.su)
                Supporto multisessione: no
           Supporto per drive multipli: no
        Supporto per moduli caricabili: s
                   Legge i frame audio: no
                          Auto-probing: no
                   File di dispositivo: /dev/sjcd, numero primario 18
                File di configurazione: sjcd.h
  Opzioni di configurazione nel Kernel: Experimental Sanyo H94A CDROM support?
             File della documentazione: sjcd



  Questo driver accetta una linea di comando del kernel nella forma:



       sjcd=<indirizzo io>,<interrupt>,<DMA>




  indicando l'indirizzo base, l'interrupt e il canale DMA da usare (per
  esempio sjcd=0x340,10,5).

  Il file di dispositivo pu essere creato utilizzando:



       # mknod /dev/sjcd b 18 0




  Consultare il file sjcd per maggiori informazioni su questo driver.


  4.3.11.  Il driver Paride



                     Principale autore: Grant R. Guenther (grant@torque.net)
               Supporto Multi-sessione: no
           Supporto per drive multipli: s
        Supporto per moduli caricabili: s
                   Legge i frame audio: no
                          Auto-probing: s
                   File di dispositivo: /dev/pcd0, numero primario 46
                File di configurazione: bpcd.h
  Opzioni di configurazione nel Kernel: Parallel port IDE device support?
             File della documentazione: paride.txt



  Questo  un driver per vari tipi di dispositivi di memorizzazione che
  si collegano alla porta parallela. Normalmente il driver riconoscer
  automaticamente il dispositivo per porta parallela. La documentazione
  descrive i parametri da usare nel caso il riconoscimento automatico
  fallisca.

  Il file di dispositivo pu essere creato utilizzando:

       # mknod /dev/pcd0 b 46 0




  Vedi il file /usr/src/linux/Documentation/paride.txt per maggiori
  informazioni su questo driver. Nota che questo sostituisce il vecchio
  driver bpcd che era presente nei vecchi kernel.


  4.3.12.  Il driver SCSI



                     Principale autore: David Giller
                Supporto multisessione: s (dipende dal drive)
           Supporto per drive multipli: s
        Supporto per moduli caricabili: s
                   Legge i frame audio: no
                          Auto-probing: s
                   File di dispositivo: /dev/scd0, numero primario 11
                File di configurazione: cdrom.h
  Opzioni di configurazione nel Kernel: SCSI CDROM support?
             File della documentazione: scsi.txt



  Ci sono opzioni da riga di comando del kernel specifiche per ogni tipo
  di controller SCSI. Vedi lo SCSI HOWTO per maggiori informazioni.

  Sono supportati drive multipli (fino al limite del numero massimo di
  dispositivi sul bus SCSI). Create i file di dispositivo con il numero
  primario impostato a 11 e il secondario a partire da zero:



       # mknod /dev/scd0 b 11 0
       # mknod /dev/scd1 b 11 1




  Mentre il driver del kernel in s e per s non supporta la lettura di
  audio digitale, alcuni drive SCSI ne hanno la possibilit e
  funzioneranno con programmi come cdda2wav (che usano l'interfaccia
  generica SCSI del kernel).

  Si veda anche la disamina dell'emulatore SCSI per IDE pi sopra in
  questo documento.


  4.3.13.  Il driverIDECD














                     Principale autore: Scott Snyder
                            (snyder@fnald0.fnal.gov)
                Supporto multisessione: s
           Supporto per drive multipli: s
        Supporto per moduli caricabili: no
                   Legge i frame audio: s (sui drive che supportino tale funzione)
                          Auto-probing: s
                   File di dispositivo: /dev/hd{a,b,c,d}, numero primario 22
                File di configurazione: cdrom.h
  Opzioni di configurazione nel Kernel: Include support for IDE/ATAPI CDROMs?
             File della documentazione: ide-cdgscd



  Questo  il driver per i CD-ROM ATAPI. Accetta una linea di comando
  del kernel nella forma:



       hdx=cyls,heads,sects,wpcom,irq
         o
       hdx=cdrom




  dove hdx pu essere uno tra {hda,hdb,hdc,hdd} o semplicemente hd, per
  il drive ``successivo'' nella sequenza. Solo i primi tre parametri
  sono richiesti (cyls,heads,sects). Per esempio, hdc=1050,32,64
  hdd=cdrom.

  Convincere il driver IDE a riconoscere il vostro CD-ROM pu essere
  difficoltoso, specialmente se avete pi di due dispositivi su pi di
  un controller. Di solito tutto ci che serve  passare le giuste
  opzioni da riga di comando usando LILO. Il file
  /usr/src/linux/Documentation/cdrom/ide-cd spiega come fare.  Leggetelo
  con attenzione.

  I kernel di Linux pi recenti hanno un migliore supporto per
  dispositivi IDE multipli. Se avete problemi con un vecchio kernel,
  aggiornarlo pu aiutare.

  Alcuni controller IDE hanno problemi hardware che il driver del kernel
  pu aggirare. Potete aver bisogno di passare parametri aggiuntivi al
  driver per abilitare queste modalit. Si veda la documentazione per
  maggiori dettagli.


  4.4.  Avviare il kernel


  Adesso potete riavviare il nuovo kernel. Controllate i messaggi di
  boot cercandone uno come il seguente, che indica che il CD-ROM  stato
  trovato dal driver (il messaggio varier a seconda del tipo di drive):



       hdd: NEC CD-ROM DRIVE:282, ATAPI CDROM drive




  Se i messaggi passano troppo veloci per essere letti, potete
  riguardarli usando dmesg o tail /var/log/messages.


  Se il drive non viene trovato, c' un problema. Consultate la sezione
  sulla risoluzione di problemi.


  4.5.  Montare il dispositivo


  Per montare (mount) un CD-ROM, inserite un disco nel drive, e avviate
  il comando mount come root (l'esempio seguente d per scontato che
  abbiate creato un link simbolico al file di dispositivo come descritto
  prima e che esista una directory vuota /mnt/cdrom):



       # mount -t iso9660 -r /dev/cdrom /mnt/cdrom




  Si pu ora accedere al CD nella cartella /mnt/cdrom.

  Ci sono altre opzioni per il comando mount che potete aver bisogno di
  usare. Si veda la pagina man mount(8) per maggiori dettagli.

  Potete aggiungere una voce a /etc/fstab per montare automaticamente un
  CD-ROM al boot o per specificare i parametri da usare quando viene
  montato; consultate la pagina man fstab(5).

  Nota che per riprodurre CD audio non occorre montarli.

  Per smontare (unmount) un CD-ROM, usate il comando umount come root:



       # umount /mnt/cdrom




  Il disco pu essere smontato solo se nessun processo sta attualmente
  accedendo al drive (incluso se hanno le loro directory di default
  settate sul drive stesso). Potete quindi espellere il disco. La
  maggior parte dei drive hanno un pulsante di espulsione; c' anche un
  programma eject che permette di espellere il CD-ROM via software.

  Nota che non si dovrebbe espellere un disco mentre  montato (questo
  pu essere possibile o no a seconda del tipo di drive). Alcuni CD-ROM
  possono automaticamente espellere un CD-ROM quando viene smontato e
  caricare il carrello quando viene montato (potete disabilitare questa
  funzione compilando il kernel o usando un comando software).

   possibile che dopo aver riprodotto un CD audio non siate pi in
  grado di montare un CD-ROM. Dovete allora mandare un comando CD audio
  ``STOP'' (usando un programma per la riproduzione di CD) prima di
  riprovare a montare. Questo problema sembra presentarsi solo col
  driver SBPCD.

  I kernel pi recenti supportano un automounter basato sul kernel che
  fornisce un montaggio trasparente all'utente di media rimovibili,
  inclusi i CD-ROM. Potete trovare gli strumenti che servono su
  <ftp://ftp.kernel.org/pub/linux/daemons/autofs/>.





  4.6.  Risoluzione di problemi


  Se incontrate ancora problemi dopo aver seguito le istruzioni
  nell'HOWTO, qui ci sono alcune cose che potete controllare. I
  controlli sono elencati in ordine crescente di complessit. Se un
  controllo non d esito positivo, risolvete il problema prima di
  passare al successivo.


  4.6.1.  avete compilato Passo 1: assicuratevi di stare realmente
  avviando il kernel che


  Controllate la data del kernel per vedere se state avviando quello che
  avete compilato col supporto per CD-ROM. Potete farlo col comando
  uname:



       % uname -a
       Linux fizzbin 2.2.4 #1 Tue Mar 232 11:23:21 EST 1999 i586 unknown




  o visualizzando il file /proc/version:



       % cat /proc/version
       Linux version 2.2.4 (root@fizzbin) (gcc version 2.7.2.3) #1 Tue
       Mar 23 11:23:21 EST 1999




  Se la data non corrisponde a quando avete compilato il kernel, ne
  state avviando uno vecchio. Vi siete ricordati di riavviare? Se usate
  LILO, l'avete reinstallato (tipicamente lanciando/sbin/lilo)? Se state
  facendo il boot da floppy, ne avete creato uno nuovo e lo state
  usando?


  4.6.2.  compilati Passo 2: assicuratevi che i driver del kernel appro
  priati siano


  Potete verificare quali driver sono compilati nel kernel consultando
  /proc/devices:



       % cat /proc/devices
       Character devices:
        1 mem
        2 pty
        3 ttyp
        4 ttyS
        5 cua
        7 vcs

       Block devices:
        3 ide0
       22 ide1

  Per prima cosa cercate il vostro driver di dispositivo CD-ROM. Quelli
  elencati sopra sono tutti dispositivi a blocchi, in questo caso
  possiamo vedere che il driver idecd con numero primario 22 era
  presente.

  Assicuratevi anche che il supporto per il filesystem ISO-9660 sia
  compilato, guardando in /proc/filesystems:



       % cat /proc/filesystems
               ext2
       nodev   proc
       nodev   devpts
               vfat
               iso9660




  Potete anche vedere quali indirizzi di porta i/o sono utilizzati da un
  driver con il file /proc/ioports:



       howto % cat /proc/ioports
        ...
       0230-0233 : sbpcd
        ...




  Se qualcuno dei driver che pensavate di aver compilato nel kernel non
   visualizzato, allora qualcosa  andato storto al momento di
  configurare o compilare il kernel. Ricominciate il processo di
  installazione, cominciando dalla configurazione e compilazione del
  kernel.


  4.6.3.  Passo 3: il kernel ha trovato il drive al momento del boot?


  Assicuratevi che il dispositivo CD-ROM sia stato trovato quando il
  kernel si  avviato. Se i messaggi sono passati troppo velocemente,
  potete di solito richiamarli usando il comando dmesg:



       % dmesg




  o



       % tail /var/log/messages




  Se il driver non  stato trovato allora qualcosa  andato storto.
  Assicuratevi che l'alimentazione sia collegata e che tutti i cavi
  siano inseriti correttamente. Se il vostro drive ha jumper hardware
  per l'indirizzamento, controllate che siano impostati correttamente
  (per esempio come drive 0 se avete un solo drive). I CD-ROM ATAPI
  devono essere impostati come ``single'' o ``master'' e non come
  ``slave'' quando un solo dispositivo  collegato a una interfaccia. Se
  il drive funziona sotto DOS allora potete essere relativamente certo
  che l'hardware sia impostato correttamente.

  Molti driver del kernel usano l'auto-probing, ma alcuni no, e in ogni
  caso la prova automatica non  sempre attendibile. Potete aver bisogno
  di provare numerosi valori differenti se non siete sicuro
  dell'indirizzo di I/O o degli altri parametri. LILO pu essere (e di
  solito lo ) configurato per permettere di inserire i parametri
  manualmente al boot.

  Un'altra possibilit  che abbiate usato il driver del kernel
  sbagliato per il tuo drive CD-ROM. Certa documentazione pu riferirsi
  a interfacce proprietarie come IDE, portando alcuni a credere,
  sbagliando, di essere in possesso di drive ATAPI.

  Un'altra possibilit  che il vostro drive (o scheda di interfaccia)
  sia uno dei tipi ``compatibili'' che richiedono inizializzazione dal
  driver DOS. Provate ad avviare DOS e caricare il driver per DOS
  fornito dal produttore. Poi riavviate Linux facendo un soft boot con
  Control-Alt-Canc.

  Se il vostro drive non  nominato in questo documento,  possibile che
  non ci siano driver disponibili per esso sotto Linux. Potete
  controllare presso alcuni dei riferimenti elencati alla fine di questo
  documento per avere assistenza.


  4.6.4.  Passo 4: potete leggere dati dal drive?


  Provate a leggere dal drive CD-ROM. L'immissione dei seguenti comandi
  dovrebbe provocare l'accensione della spia di attivit (se presente) e
  nessun errore dovrebbe essere riportato. Usate il file di dispositivo
  appropriato per il drive e assicuratevi che un CD-ROM sia inserito;
  usate Control-C per uscire.



       # dd if=/dev/cdrom of=/dev/null bs=2048
       ^C
       124+0 records in
       124+0 records out




  Se questo funziona, allora il kernel comunica col drive e potete
  passare al punto 5.

  Altrimenti, una possibile causa  il file di dispositivo. Assicuratevi
  che il file nella directory  /dev abbia i numeri primario e secondario
  corretti come elencato prima per il vostro tipo di driver.
  Controllate che i permessi per tale file ne permettano la lettura e
  scrittura.

  Una possibilit remota  che abbiate un problema hardware. Provate il
  drive sotto un altro sistema operativo, se possibile, per determinare
  se questo  il vostro caso.




  4.6.5.  Passo 5: potete montare il drive?


  Se potete leggere dal drive ma non montarlo, prima verificate di aver
  compilato nel kernel il supporto per il filesystem ISO-9660 leggendo
  /proc/filesystems, come descritto prima.

  Assicuratevi di aver montato il drive con le opzioni ``-t iso9660'' e
  ``-r'' e che nel lettore sia inserito un CD-ROM ISO9660 (non un CD
  audio) che sapete essere valido. Normalmente dovete montare i drive
  solo come utente root.

  Assicuratevi che il mount point esista e sia una directory vuota.

  Se state montando automaticamente il CD-ROM al boot, assicuratevi di
  avere le voci corrette nel file /etc/fstab.

  Se state eseguendo il demone syslog, ci pu essere un messaggio di
  errore dal kernel che non riuscite a vedere. Usate il comando
  ``dmesg'':



       % dmesg
       SBPCD: sbpcd_open: no disk in drive




  Ci potrebbero anche essere messaggi di errore registrati in qualche
  file in /var/log, a seconda di come  configurato il sistema.


  4.6.6.  Fare il debug per problemi audio


  Se il drive funziona coi CD-ROM, ma non riproduce CD audio, queste
  possono essere alcune possibili soluzioni.

  Vi serve un programma per riprodurre CD audio. Alcune applicazioni
  possono essere difettose, o possono non essere compatibili col vostro
  drive. Provate altre applicazioni e/o ricompilatele. Un buon posto
  dove cercare software pu essere
  <ftp://metalab.unc.edu/pub/Linux/apps/sound/cdrom/>.

  Pochi drive CD-ROM non supportano la riproduzione di CD audio.
  Controllate i file di documentazione o i sorgenti per vedere se questo
   il vostro caso.

  Controllate se l'audio pu essere riprodotto mediante la presa per
  cuffie sul frontalino del drive. Se  cos, probabilmente il problema
   legato alla scheda audio. Usate un programma mixer per impostare il
  dispositivo di input e i livelli di volume. Assicuratevi di aver
  installato il cavo di collegamento dal drive CD-ROM alla scheda.
  Assicuratevi anche che il driver del kernel per la scheda audio sia
  installato e funzionante (si veda il Sound HOWTO).


  4.6.7.  Quando tutto il resto fallisce


  Se avete ancora problemi, qui ci sono alcuni suggerimenti finali su
  soluzioni che potete ancora provare:



    Rileggete con attenzione questo HOWTO

    Leggete i riferimenti posti alla fine di questo documento,
     specialmente i file sorgente del kernel rilevanti

    Inviate via e-mail una domanda a uno tra comp.os.linux o altri
     newsgroup usenet

    Inviate una domanda a una mailing list di Linux

    Provate a usare il kernel pi recente

    Contattate il vostro rivenditore

    Contattate il produttore del drive CD-ROM

    Inviate una e-mail al gestore del driver del kernel che vi
     interessa (guardate nel file /usr/src/linux/MAINTAINERS)

    Speditemi una e-mail

    Avviate emacs e digitate Esc-x doctor :-)


  5.  Applicazioni


  Questa sezione elenca brevemente alcune delle molte applicazioni
  legate ai CD-ROM disponibili sotto Linux. Controllate la Linux
  Software Map per le ultime versioni e i siti dove procurarsele.


  5.1.  Riproduttori CD audio


  Sono disponibili molti programmi per riprodurre CD audio, per mezzo
  della presa per le cuffie o di una scheda audio collegata.


     workman
        Un riproduttore grafico che funziona sotto X11 e supporta un
        database dei CD e molte altre caratteristiche.

     workBone
        Un riproduttore interattivo in modalit testo.

     xcdplayer
        Un semplice riproduttore basato su X11.

     cdplayer
        Un riproduttore molto semplice basato su linea di comando.

     xmcd
        Un riproduttore basato su X11/Motif.

     xmitsumi
        Un altro riproduttore basato su X11 per driver Mitsumi.

     xplaycd
        Un altro riproduttore basato su X11, con cui viene fornito un
        mixer sonoro e un VU meter.

     cdtool
        Strumenti da linea di comando per riprodurre CD.


  Alcune di queste applicazioni sono programmate usando uno specifico
  file di dispositivo per il CD-ROM (per esempio /dev/cdrom).  Potreste
  essere in grado di passare il file corretto come parametro o creare un
  link simbolico nella directory /dev. Se inviate l'output del CD alla
  scheda audio, potreste voler usare un programma mixer per regolare i
  settaggi del volume o selezionare l'input CD-ROM per la registrazione.


  5.2.  PhotoCD


  I PhotoCD usano un filesystem ISO-9660 che contiene file di immagini
  in un formato proprietario. Non tutti i drive CD-ROM ne supportano la
  lettura.

  Il programma hpcdtoppm di Hadmut Danisch converte i file PhotoCD nel
  portable pixmap format (PPM). Pu essere ottenuto da
  <ftp://ftp.gwdg.de/pub/linux/hpcdtoppm> o come parte delle PBM
  (portable bit map) utilities, disponibili su molti siti archivio
  (cercare ``pbm'' o ``netpbm'').

  Il programma photocd di Gerd Knorr (kraxel@cs.tu-berlin.de) pu
  convertire immagini PhotoCD in file Targa o Windows/OS2 bitmap.

  Lo stesso autore ha scritto il programma xpcd, uno strumento basato su
  X11 per gestire immagini PhotoCD. Potete selezionare le immagini con
  un mouse, visionare un'anteprima dell'immagine in una piccola
  finestra, e caricare l'immagine in una delle cinque possibili
  risoluzioni. Potete anche selezionare una parte dell'immagine e
  caricare solo quella parte. Cercate questi pacchetti su
  <ftp://ftp.cs.tu-berlin.de/pub/linux/Local/misc/>.

  Anche il programma di manipolazione delle immagini ImageMagick
  supporta i file PhotoCD.  disponibile su
  <ftp://ftp.x.org/contrib/applications/ImageMagick/>.


  5.3.  Mkisofs


  Il pacchetto mkisofs di Eric Youngdale permette di creare un
  filesystem ISO-9660 su una partizione dell'hard disk. Questa pu poi
  essere utilizzata nella creazione e verifica del filesystem per
  masterizzarlo su CD-R.

  Gli strumenti per scrivere dati su drive CD-ROM registrabili tendono a
  essere specifici per ogni produttore. Essi richiedono inoltre di
  scrivere i dati senza interruzioni, per cui un sistema operativo
  multitasking come Linux non  propriamente indicato.


  5.4.  Le ISO-9660 Utilities


  Ci sono alcune utility per verificare il formato dei dischi ISO- 9660;
  potete trovarle utili per controllare CD sospetti. Il pacchetto pu
  essere reperito su  <ftp://ftp.cdrom.com/pub/unixfreeware/archive/>.
  Sono state scritte da Bill Siegmund e Rich Morin.


  6.  Risposte alle domande pi frequenti (FAQ)





  6.1.  Come fa un utente non-root a montare e smontare dischi?


  La maggior parte dei comandi mount supportano l'opzione user. Se
  aggiungete una voce come la seguente in /etc/fstab:



       /dev/sbpcd  /mnt/cdrom   iso9660     user,noauto,ro




  allora un utente normale sar abilitato a montare e smontare il drive
  con questi comandi:



       % mount /mnt/cdrom
       % umount /mnt/cdrom




  Di default il disco sar montato con alcune opzioni che aiutano ad
  aumentare la sicurezza (per esempio i programmi non possono essere
  eseguiti, i file di dispositivo sono ignorati). Se questo  troppo
  restrittivo potete usare opzioni aggiuntive (per esempio l'opzione
  ``exec'' abiliter l'esecuzione dei programmi). Controllate la pagina
  man mount(8) per maggiori dettagli.

  Un altro metodo  di procurarsi il pacchetto usermount che permette a
  utenti non-root di montare e smontare dispositivi rimovibili come
  floppy o CD-ROM, ma restringe l'accesso ad altri dispositivi (come le
  partizioni di un hard disk).  disponibile sui maggiori siti archivio.

  Il sito archivio ftp.cdrom.com contiene il file sorgente mount.c che
  permette di montare/smontare (solo) CD-ROM come utente normale. Si
  avvia come un eseguibile setuid.


  6.2.  occupato) quando smonto un CD-ROM?  Perch ottengo il messaggio
  ``device is busy'' (il dispositivo 


  Il disco non pu essere smontato se qualche processo sta accedendo al
  drive. Questo comprende i processi che hanno la propria directory di
  default impostata nel filesystem montato. Se non siete in grado di
  identificare il processo che usa il disco, potete usare il comando
  fuser, come indicato nell'esempio seguente.



       % umount /cdrom
       umount: /dev/hdd: device is busy
       % fuser -v /cdrom
                            USER       PID ACCESS COMMAND
       /mnt/cdrom           tranter    133 ..c..  bash




  Su alcuni sistemi avete bisogno di essere root quando avviate il
  comando fuser per vedere i processi degli altri utenti.


  6.3.  Come posso esportare un CD-ROM su altri host con NFS?


  Dovrete aggiungere una voce nel file /etc/exports. Gli utenti su altre
  macchine saranno quindi in grado di montare il drive.  Si veda la
  pagina man exports(5) per dettagli.


  6.4.  Posso fare il boot di Linux da CD-ROM?


  Quando installate Linux da zero il metodo pi comune  utilizzare un
  disco di boot. Alcune distribuzioni permettono di avviare un kernel
  Linux su CD direttamente da DOS.

  Se possedete un disco CD-ROM, il BIOS e il drive CD-ROM corretti,
  ossia se sono tutti e tre predisposti, potete fare il boot
  direttamente da CD.  L'ultima versione di mkisofs supporta la
  creazione di tali dischi usando lo standard El Torito per CD
  avviabili.


  6.5.  Come posso leggere audio digitale da un CD audio?


  Heiko Eissfeldt (heiko@colossus.escape.de) e Olaf Kindel hanno scritto
  una utility che legge dati audio e li salva in file sonori in formato
  .wav.  Il pacchetto si chiama cdda2wav.tar.gz e pu essere reperito su
  metalab.unc.edu.

  Un'altra utility per estrarre audio digitale  cdparanoia disponibile
  a  <http://www.mit.edu/afs/sipb/user/xiphmont/cdparanoia>.

  Poich i drive CD-ROM cambiano molto velocemente,  difficile elencare
  quali modelli supportino la lettura di dati digitali. La cosa migliore
  che potete fare  procurarvi gli ultimi pacchetti di cdda2wav o
  cdparanoia e leggerne la documentazione.

  Per maggiori informazioni su questo argomento, si veda il sito Web
  http://www.tardis.ed.ac.uk/~psyche/cdda/ e le FAQ di alt.cd-rom
  elencate nella sezione ``riferimenti''.


  6.6.  Perch il comando find non funziona correttamente?


  Su dischi ISO-9660 senza le estensioni Rock Ridge, occorre aggiungere
  l'opzione -noleaf al comando find. Si veda la pagina man find(1) per
  maggiori dettagli.

  (Nella mia esperienza virtualmente tutti i recenti CD di Linux usano
  le estensioni Rock Ridge, quindi questo problema dovrebbe presentarsi
  molto raramente.)


  6.7.  Linux supporta drive CD-ROM registrabili?


  Il pacchetto X-CD-Roast per Linux  un front-end grafico per usare
  registratori di CD. Il pacchetto pu essere reperito su
  metalab.unc.edu in /pub/Linux/utils/disk-management/xcdroast-
  0.95.tar.gz

  Si veda anche il Linux CD-Writing HOWTO, che si trova su
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/CD-Writing-HOWTO> o
  <http://metalab.unc.edu/LDP/HOWTO/CD-Writing-HOWTO.html>.
  6.8.  (filesystem a sola lettura) quando monto un CD-ROM?  Perch
  ottengo il messaggio ``mount: Read-only file system''


  Il CD-ROM  un supporto a sola lettura. Con alcuni kernel vecchi era
  possibile montare un CD-ROM in lettura/scrittura; i tentativi di
  scrivere dati sul CD erano semplicemente ignorati. Dalla versione
  1.1.33 questo  stato corretto cosicch ora i CD-ROM possono essere
  montati in sola lettura (per esempio, usando l'opzione -r).


  6.9.  Perch il carrello del drive si apre quando chiudo il sistema?


  Il driver sbpcd supporta l'espulsione automatica del CD quando viene
  smontato. In alcuni vecchi kernel questo era il comportamento
  predefinito. Se chiudete il sistema, un CD montato sar smontato,
  causando l'espulsione.

  Questa caratteristica  inserita per facilitare il cambio dei dischi.
  Se il carrello  aperto quando montate o leggete un CD, verr chiuso
  automaticamente.

  Ho trovato che questo costituisce un problema per alcuni programmi
  (per esempio cdplay e workbone). Dal kernel 1.1.60 potete controllare
  questa caratteristica via software. Un programma di esempio  incluso
  nel file di documentazione di sbpcd (o usate il programma eject).
  Potete anche controllare il comportamento predefinito modificando il
  file sorgente del kernel sbpcd.h.


  6.10.  Ho un CD ``speciale'' che non riesco a montare


  Tale CD ``speciale''  probabilmente un disco XA (come tutti i PhotoCD
  o uno eventualmente creato in questa modalit con un masterizzatore).
  La maggior parte dei driver CD-ROM del kernel di Linux non supportano
  dischi XA, sebbene si possa trovare una patch per aggiungere questo
  supporto in uno dei siti archivio.

  Il driver sbpcd supporta l'XA. Se usate questo driver potete vedere se
  un disco  XA con la seguente procedura: andate nel file sbpcd.c e
  abilitate la visualizzazione della ``Table of Contents'' (TOC, sotto
  DBG_TOC). Compilate, installate il nuovo kernel e avviatelo. Ogni
  volta che montate un disco, le informazioni sulla TOC saranno stampate
  (o sulla console o in un file di log). Se il primo valore visualizzato
  nell'header della TOC  ``20'', allora si tratta di un disco XA. Quel
  byte  ``00'' nei dischi normali.  Se la TOC mostra diverse tracce,
  anche questo  un segnale che si tratta di un disco XA.

  (Grazie a Eberhard Moenkeberg per queste informazioni)

  Altre possibilit per un CD illeggibile sono:


  1. Il disco non usa un filesystem ISO-9660 (per esempio, alcuni usano
     SunOS o HFS)

  2.  un CD audio

  3. Il CD  danneggiato o difettoso

  4.  stato messo nel drive capovolto :-)



  6.11.  I drive CD-ROM multi-disco funzionano con Linux?


  Molti utenti hanno riportato successi con CD-ROM multi-disco SCSI a
  caricamento automatico.  Probabilmente avrete bisogno di abilitare
  l'opzione di configurazione del kernel ``Probe all LUNs on each SCSI
  device'' (``prova tutti i LUN su ogni dispositivo SCSI'', questo non 
  necessario se il vostro caricatore di CD  gi noto al driver SCSI.
  Date un'occhiata a /usr/src/linux/drivers/scsi.c).

  Almeno un utente ha anche dovuto aumentare il valore del timeout SCSI
  nel driver del kernel. Un sintomo di questo  un messaggio di errore
  del tipo ``wrong fs type, bad option, bad superblock on /dev/sr5, or
  too many mounted file systems'' (tipo sbagliato di filesystem, opzione
  errata, superblock non valido su /dev/sr5, o troppi filesystem
  montati) quando si prova a montare un CD-ROM per la prima volta,
  mentre un secondo tentativo subito dopo ha successo. Per alzare il
  timeout aumentate il valore di IOCTL_TIMEOUT all'inizio di
  /usr/src/linux/drivers/scsi/sr_ioctl.c e ricompilate il kernel.  Mi si
  dice che un valore di 10000 al posto del predefinito 3000 funziona col
  NEC Multispin 4Xc.

  Potrebbe essere necessario creare file speciali a blocchi in pi,
  cosicch tutti i LUN possano essere acceduti.  richiesto un file di
  dispositivo per ogni LUN. Cos, per un caricatore a 7 dischi, devono
  essere presenti da /dev/sr0 a /dev/sr6 (di pi se avete drive CD-ROM
  SCSI in pi). Per creare questi file speciali eseguite mknod /dev/sr?
  b 11 ? come root dove ? sta per il numero richiesto.

  Mi dicono che funzionano i caricatori Nakamichi MBR-7 7, NEC Multispin
  4Xc e Pioneer 12.

  Sono pure disponibili caricatori a pi dischi EIDE/ATAPI. Il kernel ha
  il supporto per alcuni drive usando la funzione CDROM_SELECT_DISC di
  ioctl. Il file di documentazione del driver del kernel include i
  sorgenti per un programma per selezionare gli alloggiamenti del
  caricatore da attivare, o potete usare varie utility come il programma
  eject descritto pi sopra.


  6.12.  denied'' (/cdrom: permesso negato) Ricevo un messaggio di
  errore che dice ``/cdrom: Permission


  Alcuni CD hanno i permessi dei file della root directory impostati in
  modo tale da permettere solo all'utente root di leggerli.  Questo  un
  errore da parte del produttore del CD e un reale inconveniente. Una
  eventualit pi comune  il fatto che alcuni file o directory non
  siano leggibili da tutti. Alcune persone hanno creato una patch per i
  loro kernel per aggirare il problema.

  Si veda anche, a riguardo, la domanda sui file nascosti, pi oltre in
  questo documento.


  6.13.  l'IDE CD?  Come posso interpretare i messaggi di errore del
  kernel per


  Cosa significa quando ricevo un messaggio dal driver IDE CD-ROM tipo
  ``hdxx: code: xx key: x asc: xx ascq: x''?

  Questo  un messaggio di stato/errore dal drive IDE CD-ROM. Di
  default, il driver IDECD visualizza le informazioni in forma criptica
  al posto di sprecare spazio del kernel con messaggi di errore. Potete
  cambiare l'impostazione per visualizzare i messaggi di errore completi
  andando in /usr/src/linux/drivers/block/ide-cd.c, cambiando il valore
  di VERBOSE_IDE_CD_ERRORS to 1 e ricompilando il kernel.


  6.14.  Come posso stabilire che velocit ha il mio CD-ROM?


  Questo  un modo. Il comando che segue misura quanto ci vuole per
  leggere 1500K di dati da un CD:



       % time -p dd if=/dev/cdrom of=/dev/null bs=1k count=1500
       1500+0 records in
       1500+0 records out
       real 5.24
       user 0.03
       sys 5.07




  Il transfer rate di un drive a singola velocit  di 150 kilobytes al
  secondo, per cui dovrebbe impiegarci circa 10 secondi. A doppia
  velocit 5, a quadrupla 2,5, ecc.

  Il tempo ``real'' sopra indicato  probabilmente il miglior numero da
  guardare -- in questo caso indica un drive a doppia velocit. Potete
  aumentare la quantit di dati per effettuare misurazioni pi accurate
  (nel caso ve lo stiate chiedendo, i dati letti non vanno nella cache).
  Dovrete probabilmente avviare il comando un po' di volte e fare la
  media.

  Ho scritto un piccolo programma in C che misura e riporta il transfer
  rate di un CD-ROM; posso inviarvelo su richiesta.


  6.15.  installato Il mio CD-ROM ha smesso di funzionare dopo che Linux
   stato


  Il sintomo di solito indica che il boot disk che avete usato per
  l'installazione riconosceva il drive CD-ROM, ma dopo che Linux  stato
  installato su un hard disk o su un altro floppy e riavviato non lo
  riconosce pi.

  Il motivo pi comune  che con alcune distribuzioni Linux il kernel
  installato sull'hard disk non  necessariamente lo stesso che si trova
  sul dischetto di boot. Potreste aver selezionato un disco di boot che
  si adattava al vostro hardware CD-ROM, mentre il kernel installato
  potrebbe essere un kernel ``generico'' a cui manca il supporto CD-ROM.
  Potete verificare questo seguendo le linee-guida per la risoluzione
  dei problemi discusse pi sopra in questo documento.

  La soluzione  ricompilare il kernel, assicurandosi che i driver per
  il drive CD-ROM e ogni altro driver richiesto (per esempio il
  controller SCSI, il filesystem ISO-9660) siano inclusi. Consultate il
  Kernel HOWTO <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html> se
  non sapete come fare.

  Se avete passato qualche opzione da linea di comando al disco di boot
  (per esempio ``hdc=cdrom'') avrete bisogno di aggiungerle al file di
  configurazione del programma di boot (tipicamente /etc/lilo.conf).



  6.16.  Ci sono file ``nascosti'', in un CD, che non riesco a leggere


  Alcuni CD hanno file con il bit ``hidden'' (nascosto) impostato.
  Normalmente questi file non sono visibili. Se montate il CD con
  l'opzione ``unhide'' allora i file dovrebbero essere accessibili
  (questo non sembra essere documentato da altre parti).


  6.17.  Dove sono documentate le API per i CD-ROM?


  Se volete scrivere le vostre applicazioni, come un riproduttore di CD
  audio, dovrete padroneggiare le interfacce di programmazione di
  applicazioni (API) fornite da Linux.

  Originariamente i driver del kernel per i CD-ROM usavano le loro
  proprie funzioni ioctl() per supportare funzionalit specifiche per
  ogni drive. I file header come /usr/include/linux/sbpcd.h descrivono
  queste funzioni. Poich molti driver erano basati su altri driver, le
  interfacce, sebbene non identiche, hanno molto in comune.

  Pi recentemente c' stata un'iniziativa portata avanti da David van
  Leeuwen (david@tm.tno.nl) per standardizzare le API per drive CD- ROM,
  individuando e adottando del codice comune e assicurandosi che tutti i
  driver si comportino allo stesso modo.  Questo  documentato nel file
  /usr/src/linux/Documentation/cdrom/cdrom-standard.tex.  Molti driver
  del kernel supportano questo standard. Dal kernel 2.0 tutti i driver
  CD-ROM si sono conformati a questa API.

  Il mio libro Linux Multimedia Guide, si addentra un po' nell'argomento
  di programmare per i drive CD-ROM, specialmente per funzioni audio. Si
  veda la fine della sezione Riferimenti.


  6.18.  Perch non vedo i nomi lunghi in questo CD-ROM per Windows?


  Se avete un CD-ROM che ha nomi di file lunghi sotto Windows ma non
  sotto Linux, pu essere stato formattato usando il filesystem
  proprietario Joliet di Microsoft. Si veda la prossima domanda per una
  soluzione.


  6.19.   supportato il filesystem Joliet di Microsoft?


  Microsoft ha creato un'estensione al formato ISO chiamata Joliet.
  Aggiunge il supporto per nomi di file lunghi codificati usando il
  formato UNICODE 16-bit.

  Dalla versione 2.0.34 il kernel di Linux prevede il supporto per le
  estensioni Joliet. Dovete abilitare tale supporto nel kernel.

  Se volete visualizzare i nomi di file con caratteri del linguaggio
  nativo correttamente, dovete abilitare nel kernel il supporto per
  l'appropriato set di caratteri NLS ISO8859.


  6.20.  Linux supporta gli ``enhanced'' CD?


  Alcuni CD audio sono ``enhanced'' (migliorati) con dati aggiuntivi.
  Tipicamente troverete che questi CD hanno le solite tracce audio
  insieme con una traccia dati che pu essere montata come un filesystem
  ISO9660.
  Un CD enhanced che ho potuto esaminare aveva applicazioni Microsoft
  Windows e Apple Macintosh (che ovviamente non funzionavano
  direttamente sotto Linux, sebbene abbia avuto un parziale successo
  avviando l'applicazione Windows con l'emulatore WINE). C'erano anche
  alcune immagini GIF che potevano essere visualizzate usando un
  programma standard come xv e alcune animazioni in formato QuickTime,
  eseguibili con xanim. Era un CD multisessione, di cui alcuni drive CD-
  ROM molto vecchi non supportano la lettura. Sul disco v'era un file
  readme.txt contenente delle FAQ sugli Enhanced CD.


  6.21.  Linux supporta i DVD-ROM?


  I DVD-ROM compatibili SCSI e ATAPI dovrebbero funzionare sotto Linux
  per la lettura di dischi formattati col filesystem ISO-9660. In altre
  parole funzioneranno come un lettore CD-ROM (eventualmente molto pi
  capiente).

  Molti dischi DVD-ROM usano il filesystem UDF. Al momento della stesura
  questo documento, questo aspetto era ancora in fase sviluppo. Le patch
  per il kernel sono disponibili su
  <http://trylinux.com/projects/udf/>.

  Comunque, non sono a conoscenza di alcun supporto per riprodurre video
  DVD codificati in MPEG-2 sia via software sia in unione a un decoder
  hardware. Apparentemente la documentazione per il formato di codifica
  pu essere ottenuta solo ad alto costo e sottostando a un accordo di
  non diffusione. Un altro aspetto  che la decodifica MPEG tipicamente
  usa hardware proprietario per il quale i produttori potrebbero non
  essere diaposti a rilasciare le specifiche per la programmazione.
  Questi fattori possono precludere la produzione di qualsiasi software
  per i video DVD per linux che voglia essere disponibile gratuitamente
  e liberamente.


  6.22.  Linux supporta i CD-RW?


  I CD-RW che rispettano le specifiche SCSI ed ATAPI dovrebbero
  funzionare sotto Linux per dischi formattati con un filesystem ISO-
  9660. Questo include la possibilit di scrivere sul disco.

  Molti dischi CD-RW usano il filesystem UDF. Al momento della stesura
  di questo documento, questo aspetto era ancora in sviluppo. Le patch
  per il kernel sono disponibili su
  <http://trylinux.com/projects/udf/>.


  7.  Riferimenti


  Ho gi nominato i file di documentazione, di solito installati in
  /usr/src/linux/Documentation/cdrom. Sono una miniera d'oro di
  informazioni utili.

  Le seguenti FAQ Usenet sono inviate periodicamente a news.answers e
  archiviate su siti FTP Internet come  <ftp://rtfm.mit.edu/>:


    alt.cd-rom FAQ

    comp.periphs.scsi FAQ

    Enhanced IDE/Fast-ATA/ATA-2 FAQ

  Molti altri HOWTO di Linux hanno informazioni utili sui CD-ROM:


    SCSI HOWTO <http://metalab.unc.edu/LDP/HOWTO/unmaintained/SCSI-
     HOWTO.html>

    Hardware Compatibility HOWTO
     <http://metalab.unc.edu/LDP/HOWTO/Hardware-HOWTO.html>

    Sound HOWTO <http://metalab.unc.edu/LDP/HOWTO/Sound-HOWTO.html>

    Kernel HOWTO <http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>

    Distribution HOWTO <http://metalab.unc.edu/LDP/HOWTO/Distribution-
     HOWTO.html>

    CD Writing HOWTO <http://metalab.unc.edu/LDP/HOWTO/CD-Writing.html>

  Almeno una dozzina di societ vendono distribuzioni Linux su CD-ROM;
  molte di esse sono elencate nel Distribution HOWTO.

  I seguenti newsgroup Usenet trattano argomenti correlati ai CD-ROM:


    comp.publish.cdrom.hardware

    comp.publish.cdrom.multimedia

    comp.publish.cdrom.software

    comp.sys.ibm.pc.hardware.cd-rom

    alt.cd-rom

    alt.cd-rom.reviews

  Anche i newsgroup comp.os.linux rappresentano valide fonti di
  informazioni, specifiche per Linux.

  Un grosso archivio di informazioni sui CD-ROM e sul software si trova
  a  <ftp://ftp.cdrom.com/pub/cdrom/>.

  Potete trovare un documento di FAQ sui dispositivi IDE e ATA a
  <ftp://rtfm.mit.edu/pub/usenet/news.answers/pc-hardware-faq/enhanced-
  IDE/> e a  <http://www.seagate.com/techsuppt/faq/faqlist.html>.

  Western Digital, la societ che per prima ha usato il protocollo IDE,
  mette a disposizione informazioni su di esso nel proprio sito FTP a
  <ftp://fission.dt.wdc.com/pub/standards/atapi>.

  Potete trovare un sito Web dedicato al multimedia a
  <http://viswiz.gmd.de/MultimediaInfo/>. Creative Labs ha il suo sito
  Web a  <http://www.creaf.com/>.

  La Linux Software Map (LSM)  un riferimento inestimabile per reperire
  software per Linux. La LSM pu essere trovata in vari siti FTP
  anonimi, come  <ftp://metalab.unc.edu/pub/Linux/docs/LSM/> (conosciuto
  in passato come sunsite). Ci sono anche molti siti Web che mantengono
  un database delle applicazioni Linux. Uno di essi 
  <http://www.freshmeat.net>.

  La mailing list di Linux ha un gran numero di ``canali'' dedicati ad
  argomenti diversi. Per individuare a quale unirsi, inviate un'e-mail a
  majordomo@vger.rutgers.edu con la parola ``help'' come corpo del
  messaggio.

  Il Linux Documentation Project ha prodotto numerosi libri su Linux,
  tra cui Linux Installation and Getting Started.  Questi sono
  liberamente disponibili via FTP anonimo presso i maggiori archivi
  Linux o possono essere acquistati in copie stampate (N.d.T: per
  versioni in italiano di alcuni di essi, verificate il sito ILDP).

  Per finire, un suggerimento spudorato: se desiderate saperne molto di
  pi sul multimedia sotto Linux (specialmente le applicazioni e la
  programmazione per CD-ROM e schede audio), date un'occhiata al mio
  libro Linux Multimedia Guide, ISBN 1-56592-219-0, edito da O'Reilly
  and Associates. Assieme all'edizione originale in inglese, sono ora in
  stampa traduzioni in Francese e Giapponese. Per maggiori dettagli,
  chiamate dal Nord America il numero 800-998-9938 o consultate la
  pagina Web  <http://www.ora.com/catalog/multilinux/noframes.html> o la
  mia home page  <http://www.pobox.com/~tranter/>.



















































Senza nessuna precisazione, i documenti Linux HOWTO hanno il copyright
dei loro rispettivi autori. I documenti Linux HOWTO possono essere
riprodotti e distribuiti, completi o in parte, con ogni mezzo fisico o
elettronico, purch siano tutti accompagnati da questo copyright.
Distribuzioni commerciali sono permesse ed incoraggiate; comunque
l'autore desidera essere avvisato di ogni simile distribuzione.

Tutte le traduzioni, derivazioni o lavori incorporanti qualsiasi Linux
HOWTO devono essere mantenuti sotto questo avviso di copyright. Per
questo non  possibile produrre un lavoro derivante da un HOWTO ed
imporre restrizioni aggiuntive alla sua distribuzione. Eccezioni a
questa regola possono essere concesse a certe condizioni; contattare il
coordinatore dei Linux HOWTO all'indirizzo riportato sotto.

In breve vogliamo promuovere la disseminazione di queste informazioni
attraverso pi canali possibili. Comunque vogliamo mantenere il
copyright nei documenti HOWTO, e possibilmente essere avvisati di ogni
progetto di ridistribuzione degli HOWTO.

Se si hanno domande, contattare Greg Hankins, il coordinatore dei Linux
HOWTO, all'indirizzo email gregh@sunsite.unc.edu, o al +1 404 853 9989.

Per le versioni italiane degli HOWTO rivolgersi a Michele Dalla Silvestra
(dalla@psico.unipd.it) o Eugenia Franzoni (eugenia@stud.unipg.it).
  Configuration HOWTO
  Di Guido Gonzato, guido@ibogeo.df.unibo.it
  Versione 1.3.7, 6 Settembre 1999.

  Lo scopo di questo HOWTO  quello di rendere la configurazione del
  vostro nuovo sistema Linux pi veloce e pi semplice. Qui troverete un
  insieme di configurazioni per le applicazioni pi comuni, cos potrete
  cominciare a lavorare con un sistema facile da usare.

  1.  Introduzione



  1.1.  Perch questo HOWTO


  Ho installato Linux su molti PC e ho notato che le distribuzioni
  attuali sono ottime ma, purtroppo, mancano di alcune configurazioni di
  base. Molti programmi funzionano subito, ma altri no. Inoltre, ho
  notato che le solite domande continuano a essere poste su c.o.l.setup.

  Per cercare di porre rimedio a questa situazione e per avere un
  memorandum per le nuove installazioni, mi sono scritto un elenco di
  cose da fare che ho poi espanso fino a trasformarlo in questo HOWTO.
  Qui troverete alcuni esempi di configurazioni per i programmi pi
  comuni, il che dovrebbe farvi risparmiare un bel po' di tempo e
  lavoro.

  Alcuni degli esempi di configurazione in questo HOWTO dipendono in
  qualche modo dalla distribuzione. Ho accesso solo a macchine Red Hat
  5.2, con kernel 2.0.36, quindi non prendete per oro colato i miei
  suggerimenti se avete altre distribuzioni. Non dovrebbe comunque
  essere difficile adattare i miei suggerimenti ad altri distributori.

  Questo HOWTO non  in grado, n ha lo scopo di sostituire gli altri.
  La lettura della documentazione e degli HOWTO ripaga sempre, quindi
  siete comunque invitati a farlo. Se vi rendete conto che qualcosa non
   chiaro, fate riferimento all'HOWTO corrispondente. Permettetemi di
  ricordarvi che il luogo giusto per cercare aiuto relativo alla
  configurazione di Linux  Usenet, per esempio
  <news:comp.os.linux.setup>. Vi prego, di non chiedere direttamente il
  mio aiuto perch sono molto impegnato.

   possibile reperire questo documento, incluse alcune traduzioni,
  all'indirizzo <http://metalab.unc.edu/mdw/HOWTO>. Qui si possono
  trovare anche tutti i riferimenti agli altri HOWTO. La versione pi
  aggiornata  disponibile all'indirizzo
  <http://ibogeo.df.unibo.it/guido/Configuration>.



  1.2.  Cosa configureremo


  Le configurazioni hardware di un PC sono infinite, ma una  molto
  comune: un PC con un disco fisso suddiviso in tre partizioni (una per
  DOS/Windows, una per Linux e una partizione di swap), scheda audio,
  modem, drive CD--ROM, stampante, mouse. Il drive Zip in versione per
  la porta parallela  inoltre assai diffuso. Questa macchina 
  possibilmente parte di una rete mista basata su Windows e Linux dove
  ha la funzione di server.

  Presumer che questo  l'hardware che volete configurare, ma 
  semplice adattare i consigli e gli esempi che vi dar per altre
  configurazioni.  implicito che dovrete essere root per
  modificare/configurare/manipolare il sistema.
  E ora, rimbocchiamoci le maniche.



  2.  Setup generale del sistema




  2.1.  Alcune informazioni sulla sicurezza


  Anche prima dell'avvio del sistema, dovreste decidere il livello di
  sicurezza che desiderate implementare. Innanzitutto, non connettete la
  macchina alla rete se non avete ancora deciso cosa fare.

  La sicurezza  un argomento cos ampio che va oltre l'abito di questo
  HOWTO.  Due buoni punti di partenza sono la Linux Security
  Administrator's Guide all'indirizzo  <http://www.seifried.org/lasg> e
  la Linux Security Guide all'indirizzo
  <http://nic.com/~dave/Security>. Dovreste almeno tenere in
  considerazione le seguenti fasi: l'utilizzo delle password di
  protezione (Shadow Password HOWTO), che limitano l'accesso alla
  macchina (vedere la sezione ``Limitazione dell'accesso di rete''),
  mediante la shell di sicurezza ( <http://www.cs.hut.fi/ssh/>) o la
  password di sicurezza remota ( <http://srp.stanford.edu/srp/>). Buona
  fortuna.



  2.2.  Il logbook


  Per ottenere un'installazione corretta,  essenziale che sappiate
  esattamente quello che accade alla vostra macchina, quali pacchetti
  sono stati installati, quali sono stati rimossi o modificati e cos
  via. Quindi, la prima cosa da fare prima di manipolare il computer 
  quella di iniziare un ``logbook''. In questo file  possibile prendere
  nota di tutti gli spostamenti fatti come root. Nel mio logbook c' una
  sezione in cui elenco tutti i file di sistema modificati, .rpms
  aggiuntivi e i .tar.gz che ho installato. Tenendo la traccia delle
  varie operazioni, dovreste essere in grado di ottenere di nuovo
  un'installazione originale.

  Fate una copia di backup dei file di sistema che modificate. Ancora
  meglio, utilizzate RCS.  Sarete in grado di tenere traccia di tutte le
  modifiche. Non lavorate mai come root senza registrare ogni mossa.



  2.3.  Tastiera


  Se vi siete persi questo passaggio durante l'installazione o avete
  cambiato tastiera, dovrete:


    scegliere un'adeguata mappa di tastiera da /usr/lib/kbd/keytables/;
     ad esempio, it.map seleziona la tastiera italiana;

    modificare il file /etc/sysconfig/keyboard in modo che appaia:
     KEYTABLE="/usr/lib/kbd/keytables/it.map";

    per impostare il tasso di ripetizione e il ritardo della tastiera,
     aggiungete questa linea a /etc/rc.d/rc.sysinit (Red Hat) o
     /etc/rc.d/rc.boot (Caldera) o /etc/rc.d/boot (S.u.S.E):
       /sbin/kbdrate -s -r 16 -d 500  # o come preferite





  Per caricare la nuova mappa di tastiera, date il comando
  /etc/rc.d/init.d/keytable start.  Per quanto riguarda altre
  impostazioni relative ai tasti speciali, troverete istruzioni pi
  avanti.

  Per abilitare NumLock per default, aggiungete queste linee a
  /etc/rc.d/rc.sysinit:



       for tty in /dev/tty[1-9]*; do
         setleds -D +num < $tty
       done




  2.4.  Floppy di boot e di ripristino


  Create due floppy di boot per il sistema appena installato. La
  distribuzione pu includere un comando per la creazione di tale
  floppy. In caso contrario, questi comandi fanno al vostro caso:



       #~ dd if=/boot/vmlinuz-2.0.36-0.7 of=/dev/fd0  # usa l'immagine del kernel
       #~ rdev /dev/fd0 /dev/hda2                     # la partizione di Linux




  Inoltre, fate in modo di avere pronti almeno un paio di floppy di
  ripristino. Potete trovare un'ampia scelta di dischi di ripristino
  all'indirizzo  <ftp://metalab.unc.edu/pub/Linux/system/recovery>.  Se
  non sapete quale scegliere, vi consiglio di provare Tomsbtrt.



  2.5.  Kernel


  Io credo che a questo punto la cosa pi sensata sia farsi un kernel su
  misura.  molto semplice, ma per ogni dubbio leggetevi il file README
  in /usr/src/linux/ o il Kernel HOWTO. Suggerimenti:


    considerate le vostre necessit con attenzione.  pi produttivo
     scegliere una configurazione per il kernel, applicare le patch e
     compilare una volta per tutte, piuttosto che riconfigurare e
     ricompilare ogni mese; questo vale specialmente se la vostra Linux
     box  un server. Non dimenticate di aggiungere il supporto per
     l'hardware che potreste aggiungere in futuro (ad es. SCSI, Zip,
     schede di rete, ecc.). L'uso dei moduli  sempre la scelta
     migliore;

    se il vostro PC  basato su CPU Cyrix che non viene riconosciuta
     come tale dal kernel, ci sono delle patch per incrementarne le
     prestazioni.  Informazioni su
       <http://www.linuxhq.com/patch/20-p0591.html> ;
    gli utenti di portatili possono aumentare le leggibilit dello
     schermo LCD. Una volta suggerivo di applicare una patch al kernel,
     ma ora credo che SVGATextMode (vedere la sezione ``SVGATextMode'')
     sia la soluzione migliore. Per chi vuole, comunque, la patch ``Big
     Cursor'' si trova all'indirizzo
       <http://www.linuxhq.com/patch/20-p0239.html> ;

    ancora per gli utenti di portatili: se volete usare un modem/fax
     PCMCIA, non compilate il supporto seriale come modulo, ma
     direttamente nel kernel. In caso contrario, il modem PCMCIA non
     funzioner;

    se usate schede PCMCIA, compilate anche i relativi moduli; inoltre,
     non dimenticate di modificare /etc/pcmcia/network.opts se usate una
     schedina di rete;

    se modprobe vi d quei fastidiosi messaggi di errore indicando che
     alcuni moduli non ci sono, dovete correggere /etc/conf.modules. Ad
     esempio, se non usate i moduli ipx e appletalk, aggiungete queste
     linee:



       alias net-pf-4 off
       alias net-pf-5 off





    per risparmiare tempo la prossima volta che compilerete il kernel,
      consigliabile salvare la configurazione su file e mettere
     quest'ultimo al sicuro. Attenzione per: se fate l'upgrade del
     kernel, questo file sar quasi certamente inutile, perch non
     contiene le funzionalit del nuovo kernel.



  2.6.  Blocco di sendmail


  Su alcuni sistemi, sendmail blocca la macchina per un paio di minuti
  in fase di boot. Si distinguono due casi: 1) il PC non  direttamente
  connesso a Internet, 2) lo , e ha un indirizzo IP fisso.  Correzione
  per il caso 1: assicuratevi che /etc/hosts contenga una linea con
  scritto



       127.0.0.1 localhost




  Nel secondo caso, il blocco avviene se /etc/hosts contiene questa
  linea:



       127.0.0.1   localhost   host_name




  che dovrete modificare cos:

       127.0.0.1    localhost
       w.x.y.z      host_name




  Vedete anche alla sezione ``Hostname''.



  2.7.  Prestazioni del disco fisso


  Le prestazioni del vostro disco fisso possono essere notevolmente
  migliorate con l'uso accorto di hdparm(8). Se la vostra distribuzione
  di Linux non lo include, lo troverete su
  <ftp://sunsite.unc.edu/pub/Linux/system/hardware> ; cercate un file
  chiamato hdparm-X.Y.tar.gz.

  Non c' una formula valida per tutti, poich molti dettagli dipendono
  dal disco fisso e dal controller. Visto che si rischia di danneggiare
  il filesystem, leggete la man page con attenzione prima di usare certe
  opzioni. Come minimo, potrete aggiungere a /etc/rc.d/rc.sysinit la
  linea seguente:



       /sbin/hdparm -c1 /dev/hda  # primo drive IDE




  che abilita il supporto per l'I/O (E)IDE a 32-bit. Per quanto riguarda
  l'opzione ``-m'', ecco cosa mi ha scritto l'autore di hdparm, Mark
  Lord:


       (...) se il tuo sistema usa componenti di due anni fa [<
       1997], andr tutto bene. Se sono precedenti a questa data,
       *potrebbero* esserci dei problemi (poco probabilmente).  I
       chip che hanno dato realmente problemi sono stati il CMD0646
       e il RZ1000, usati *su vasta scala* sulle schede madre dei
       486 e dei (precedenti) 586 circa 2 0 3 anni fa.


  Per le macchine recenti, queste impostazioni dovrebbero funzionare
  bene:



       /sbin/hdparm -c1 -A1 -m16 -d1 /dev/hda






  2.8.  Drive Zip per porta parallela


  Per usare il drive Zip (versione parallela), potete usare il driver
  standard fornito con i kernel recenti (2.x.x). Durante la
  configurazione del kernel, assicuratevi di includere il supporto per
  lo SCSI generico e per i dischi SCSI. Tenete presente che ci possono
  essere conflitti tra la stampante e il drive Zip se usano la stessa
  porta parallela, quindi compilate il supporto per entrambi come
  moduli.  disponibile un driver ppa alternativo all'indirizzo
  <http://www.torque.net/~campbell>.

  I dischi Zip sono venduti preformattati sulla partizione /dev/sda4.
  Per abilitare lo Zip, aggiungere queste linee a /etc/rc.d/rc.sysinit:



       # Abilita il drive Zip
       /sbin/modprobe ppa




  e lo Zip pu essere montato tramite /etc/fstab come mostrato di
  seguito o tramite Mtools aggiungendo questa linea a /etc/mtools.conf:



       drive z: file="/dev/sda4" exclusive




  inoltre, il comando mzip vi consente di estrarre il disco, effettuare
  la query dello stato, proteggere in scrittura e con password i dischi
  Zip; vedere man mzip per dettagli.  La home page di Mtools 
  all'indirizzo <http://linux.wauug.org/pub/knaff/mtools>.



  2.9.  Driver di dispositivi


  Alcuni dispositivi in /dev (o meglio, collegamenti ai veri driver)
  possono essere assenti. Controllate a quali dispositivi corrispondono
  il mouse, il modem e il CD--ROM, poi fate:



       ~# cd /dev
       /dev# ln -s ttyS0 mouse; ln -s ttyS1 modem; ln -s hdb cdrom; ln -s sda4 zip




  Dritta: in molti portatili, il mouse  /dev/psaux: tenetelo presente
  quando installate X11.

  Se volete, assegnate chmod 666 a questi dispositivi per renderli
  accessibili a tutti gli utenti.



  2.10.  Scheda audio


  Tutto ci che possiedo  una vecchia Sound Blaster 16. Anche se avete
  a disposizione qualcosa di diverso, potete fare riferimento a quanto
  segue.

  Ho compilato il supporto per la scheda audio come modulo (sb.o).
  Quindi ho messo queste linee in /etc/conf.modules:



  options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330
  alias sound sb




  Per attivare l'audio, accertatevi che venga richiamato modprobe sound
  in /etc/rc.d/rc.sysinit. In alternativa, scaricate il tool sndconfig
  dal sito Web di RedHat.



  2.11.  Messaggi di login


  Se volete personalizzare i messaggi di login, controllate se il vostro
  /etc/rc.d/rc.local sovrascrive /etc/issue e /etc/motd (RedHat lo fa).
  Se li sovrascrive, dateci sotto con l'editor.

  Se desiderate un messaggio di login colorato, potete adattare il
  rc.local inserendo linee simili a quelle riportate:



       # immette un vero carattere di escape invece di ^[. Per fare questo:
       # emacs: ^Q ESC   vi: ^V ESC   joe:  ` 0 2 7   jed: ` ESC
       ESC="^["  # un vero carattere di escape
       BLUE="$ESC[44;37m"
       NORMAL="$ESC[40;37m"
       CLEAR="$ESC[H$ESC[J"

       > /etc/issue
       echo "$CLEAR" >> /etc/issue
       echo "$BLUE   Welcome to MyServer (192.168.1.1)   " >> /etc/issue
       echo "$NORMAL " >> /etc/issue
       echo "" >> /etc/issue






  2.12.  Hostname


  Impartire il comando hostname nuovo_host_name non basta. Per evitare
  il problema del blocco di sendmail, seguite queste istruzioni (valide
  solo per una macchina non collegata a Internet permanentemente):


    modificate /etc/sysconfig/network e cambiate l'hostname qui
     contenuto (ad es. nuovo_host_nome.localdomain);

    modificate /etc/HOSTNAME in modo appropriato;

    aggiungete il nuovo hostname in questa linea in /etc/hosts:



       127.0.0.1  nuovo_host_name.locadomain nuovo_host_name






  2.13.  Mouse


  I servizi di gpm sono utili per il taglia e incolla in modalit testo,
  e per usare il mouse in alcune applicazioni. Per Red Hat, controllate
  se avete un file chiamato /etc/sysconfig/mouse e che ci sia scritto:



       MOUSETYPE="Microsoft"
       XEMU3=yes




  Inoltre, dovete avere un file /etc/rc.d/init.d/gpm, dove aggiungerete
  parametri addizionali. Nel mio ho inserito:



       ...
              daemon gpm -t $MOUSETYPE -d 2 -a 5 -B 132 # mouse a due bottoni
       ...




  Ovviamente, accertatevi che la configurazione sia quella giusta per il
  vostro mouse. Dritta: in molti portatili, MOUSETYPE  ``PS/2''.

  Per Caldera, per abilitare il mouse basta aggiungere in fondo a
  /etc/rc.d/rc.boot:



       /usr/bin/gpm




  Per S.u.S.E., i parametri per gpm sono in /etc/rc.config; per Debian,
  si modifica /etc/gpm.conf.

  Se volete usare i menu in console con Ctrl-tasto, configurate anche
  gpm-root. Modificate il menu di default in /etc/gpm-root.conf , quindi
  lanciate gpm-root da /etc/rc.d/rc.sysinit (AQVD).



  2.14.  Punti di mount


   comodo avere dei punti di mount per il floppy, altri dispositivi e
  directory esportate da NFS. Ad esempio, potreste fare:



       ~# cd /mnt
       /mnt# mkdir floppy ; mkdir cdrom ; mkdir win ; mkdir zip ; mkdir server




  che crea i punti di mount per il floppy in formato DOS/Windows, un
  floppy extra, il CD--ROM, la partizione Windows, il drive Zip per la
  porta parallela e una directory NFS.
  Ora modifiacte il file /etc/fstab e aggiungete queste linee:



       /dev/fd0        /mnt/floppy     auto            user,noauto 0 1
       /dev/cdrom      /mnt/cdrom      iso9660         ro,user,noauto 0 1
       /dev/zip        /mnt/zip        vfat            user,noauto,exec 0 1
       /dev/hda1       /mnt/win        vfat            user,noauto 0 1
       server:/export  /mnt/server     nfs             defaults




  Come  ovvio, dovete usare il dispositivo giusto nel primo campo. I
  kernel recenti hanno il supporto nativo per le partizioni fat32;
  oppure troverete informazioni e una patch per il kernel all'indirizzo
  <http://bmrc.berkeley.edu/people/chaffee/fat32.html> .  man mount per
  ulteriori informazioni.

  Notate il tipo di filesystem ``auto'' della prima linea. Consente di
  montare sia i floppy ext2 sia quelli vfat (DOS/Windows). Potreste
  trovare pi conveniente mtools.



  2.15.  Lilo(8) e LOADLIN.EXE


  Molti utenti vogliono poter usare sia Linux che DOS/Windows, e
  scegliere al boot quale sistema operativo lanciare; questa
  impostazione dovrebbe avvenire in fase di installazione, ma se nel
  caso fate come segue. Supponiamo che /dev/hda1 contenga DOS/Windows e
  che /dev/hda2 contenga Linux.



       ~# fdisk
       Using /dev/hda as default device!

       Command (m for help):a
       Partition number (1-4): 2

       Command (m for help):w
       ~#




  Cos si rende attiva la partizione di Linux. Scrivetevi quindi questo
  semplice /etc/lilo.conf:
















  boot = /dev/hda2
  compact                # pu essere in conflitto con "linear"
  delay = 100            # 10 secondi
  linear                 # elimina il problema "1024 cylinder"
  # message = /boot/bootmesg.txt  # scrivetene uno, se volete
  root = current
  image = /boot/vmlinuz  # fa partire Linux per default dato che rappresenta la prima entry
    label = linux
    read-only
  #  append="mem=128M"   # per avere pi memoria di 64 MB
  other = /dev/hda1
    table = /dev/hda
    label = dos




  Ora date il comando /sbin/lilo e siete a posto. Visto che LILO  un
  passaggio cruciale dell'installazione, vi consiglio caldamente di
  leggervi comunque la sua documentazione.

  Per fare partire Linux senza resettare, mettete LOADLIN.EXE in una
  directory (nella partizione DOS!) compresa nel path del DOS; poi
  copiate il kernel nella directory (ad esempio) C:\TEMP\VMLINUZ.
  Questo semplice file .BAT fa partire Linux:



       rem   linux.bat
       smartdrv /C
       loadlin c:\temp\vmlinuz root=/dev/hda2 ro




  Se usate Windows 9x, impostate le propriet di questo file .BAT in
  modo che parta in modalit MS--DOS.



  2.15.1.  Trucco per la sicurezza


  Un consiglio: fare una copia del MBR prima di installare Linux pu
  salvarvi dai guai. Usate restorrb (incluso nel pacchetto FIPS) prima
  dell'installazione o un floppy di ripristino e date questo comando:



       rescue:~# dd if=/dev/hda of=MBR bs=512 count=1




  e poi fate almeno due copie del file MBR su altrettanti floppy. Se
  dovesse capitare il disastro, potrete recuperare il MBR originale con
  il comando:



       rescue:~# dd if=/mnt/MBR of=/dev/hda bs=446 count=1





  presumendo che il floppy che contiene MBR sia montato sotto /mnt. In
  alternativa, usate un floppy di ripristino DOS o Windows e date il
  comando FDISK /MBR.



  2.16.  Mail Capability


  Di sicuro vorrete leggere anche i messaggi di posta scritti in HTML o
  che contengono formati di file esotici. Assicuratevi di avere due
  file: /etc/mime.types e /etc/mailcap. Il primo elenca tipi di file e
  l'estensione associata, come ad esempio:



       application/postscript          ps eps
       image/jpeg                      jpe jpeg jpg
       text/html                       html




  mentre il secondo spiega al client mail come mostrare quel particolare
  file.

  Vi potrebbe arrivare posta da gente che usa Microsoft Outlook, i cui
  messaggi sono in formato MIME multi--part. Queste due linee, aggiunte
  in /etc/mailcap, dovrebbero rendere leggibili quei messaggi:



       text/plain; less %s; needsterminal
       text/html; lynx -force_html %s; needsterminal






  2.17.  Configurazione della stampante


  Le distribuzioni che conosco hanno un programma di configurazione per
  la stampante (printtool, yast o magicfilter); se non ce l'avete, ecco
  come implementare una semplice configurazione manuale.

  Supponiamo che abbiate una stampante non-PostScript (e non ``per
  Windows''!)  con cui volete stampare semplice testo (ad es., sorgenti
  C) e file PostScript tramite Ghostscript, che deve essere gi
  installato.

  Configurare la stampante richiede alcuni passaggi:


    controllate qual  il dispositivo parallelo: provate



       ~# echo "hello, world" > /dev/lp0
       ~# echo "hello, world" > /dev/lp1





  e segnatevi quale funziona.

    create due directory di spool:



       ~# cd /var/spool/lpd
       /var/spool/lpd/# mkdir raw ; mkdir postscript





    se la vostra stampante, come molte inkjet, presenta l'``effetto
     scalinata'', vi servir un filtro. Provate a stampare due linee di
     testo con



       ~# echo "prima linea" > /dev/lp1 ; echo "seconda linea" > /dev/lp1





  e se l'output  cos:



       prima linea
                  seconda linea





  salvate questo script col nome /var/spool/lpd/raw/filter:



       #!/bin/sh
       # Questo file elimina l'"effetto scalinata"
       awk '{print $0, "\r"}'





  e rendetelo eseguibile con chmod 755 /var/spool/lpd/raw/filter.

    fate un filtro per l'emulazione PostScript. Scrivete il filtro
     seguente col nome /var/spool/lpd/postscript/filter:














  #!/bin/sh

  DEVICE=djet500
  RESOLUTION=300x300
  PAPERSIZE=a4
  SENDEOF=

  nenscript -TUS -ZB -p- |
  if [ "$DEVICE" = "PostScript" ]; then
          cat -
  else
          gs -q -sDEVICE=$DEVICE \
                  -r$RESOLUTION \
                  -sPAPERSIZE=$PAPERSIZE \
                  -dNOPAUSE \
                  -dSAFER \
                  -sOutputFile=- -
  fi

  if [ "$SENDEOF" != "" ]; then
          printf "\004"
  fi





  (in questo esempio, si presume l'utilizzo di una stampante HP DeskJet.
  Adattate lo script alla vostra stampante.)

    infine, aggiungete queste linee in /etc/printcap:



       # /etc/printcap
       lp|ps|PS|PostScript|djps:\
               :sd=/var/spool/lpd/postscript:\
               :mx#0:\
               :lp=/dev/lp1:\
               :if=/var/spool/lpd/postscript/filter:\
               :sh:
       raw:\
               :sd=/var/spool/lpd/raw:\
               :mx#0:\
               :lp=/dev/lp1:\
               :if=/var/spool/lpd/raw/filter:\
               :sh:





  Per configurazioni pi complesse, il Printing-HOWTO vi aspetta.

  Se utilizzate printtool, il dispositivo GSDEVICE scelto da Printtool
  funziona, ma non  necessariamente il migliore per la vostra
  stampante. Potreste dover modificare il file postscript.cfg; ad
  esempio, ho cambiato GSDEVICE da cdj500 a djet500 e ora le stampe sono
  molto pi veloci.



  2.18.  SVGATextMode



  Questa utility, reperibile all'indirizzo
  <ftp://tsx-11.mit.edu/pub/linux/sources/sbin> , serve per cambiare il
  font e la risoluzione in modalit testo, nonch la forma del cursore.
  Gli utenti che usano lettere accentate (ci siamo anche noi italiani)
  le possono quindi abilitare nelle applicazioni in console, mentre gli
  utenti di portatili possono ingrandire il cursore per renderlo pi
  visibile.

  Modificate il file /etc/TextConfig o /etc/TextMode, iniziando con la
  definizione VGA di default. Per abilitare le lettere accentate,
  assicuratevi di avere queste linee nell'opzione ``LoadFont'':



       Option "LoadFont"
       FontProg "/usr/bin/setfont"
       FontPath "/usr/lib/kbd/consolefonts"
       FontSelect "lat1-16.psf"   8x16 9x16 8x15 9x15
       FontSelect "lat1-14.psf"   8x14 9x14 8x13 9x13
       FontSelect "lat1-12.psf"   8x12 9x12 8x11 9x11
       FontSelect "lat1-08.psf"   8x8  9x8  8x7  9x7




  Quando avete fatto, provate la configurazione col comando SVGATextMode
  "80x34x9" e se tutto funziona bene, togliete i warning da
  /etc/TextMode ed aggiungete questa linea in /etc/rc.d/rc.sysinit
  (AQVD):



       # SVGATextMode
       /usr/sbin/SVGATextMode "80x34x9"




  Da notare che il cursore a blocco funziona solo con alcuni modi
  schermo; su una delle mie macchine, "80x32x9".



  3.  Compiti di amministrazione comuni


  Ci sono cos tante cose da fare e cos poco tempo! Ecco che inizia il
  divertimento. Questa sezione  dedicata alla rete, anche se molti
  altri task vi aspettano.

  La rete  un argomento talmente vasto che non pu essere trattato
  esaurientemente qui. Dovete fare riferimento al NET-3 HOWTO e alla
  documentazione sulle impostazioni dei servizi di rete della maggior
  parte delle distribuzioni. In questo caso verranno trattati solo pochi
  punti.

  Ecco un breve elenco di servizi che potreste installare: attivit
  cronologiche e sincronizzate, quali calendari o promemoria, Http,
  Samba, accesso telnet/ssh, ftp anonimo, server POP/IMAP, servizi
  NFS...






  3.1.  Configurazione di rete


  Anche se il metodo vero e proprio per avviare i servizi di rete della
  distribuzione pu essere molto pi complesso, lo script che segue
  dovrebbe essere sufficiente perch possiate iniziare:



       #!/bin/sh

       # net-up.sh: imposta l'accesso di rete

       DEVICE=eth0
       IPADDR=192.168.1.100
       NETMASK=255.255.255.0
       NETWORK=192.168.1.0
       GATEWAY=192.168.1.1

       ifconfig $DEVICE $IPADDR netmask $NETMASK up
       route add -net $NETWORK netmask $NETMASK $DEVICE
       route add default gw $GATEWAY




  Questo script  utile per attivare l'accesso di rete quando utilizzate
  un disco di ripristino.  Ovviamente, questo consente solo l'utilizzo
  di ping, ftp e telnet verso l'esterno.



  3.2.  Condivisione di Internet


  Si tratta di uno dei task pi utili per un server Linux. Attualmente,
  la maggior parte dei kernel di stock dispongono del firewall IP, di
  masquerade e di invio attivati per default. Se avete dei dubbi,
  consultate IP-Masquerade mini-HOWTO per apprendere come abilitarli.
  Installate quindi ipfwadm (kernel 2.0.x;
  <http://www.xos.nl/linux/ipfwadm/>) o ipchains (kernel 2.2.x;
  <http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html>).
  Non dimenticate di attivare i moduli dei kernel per i servizi
  necessari, ad esempio per ftp verr aggiunta questa linea a
  /etc/rc.d/rc.sysconfig:



       /sbin/modprobe ip_masq_ftp




  Altri moduli sono in genere disponibili in /lib/modules/KERNEL-
  VERSION/ipv4.

  L'attivazione del masquerade IP per altre macchine della rete locale 
  molto semplice. Innanzitutto, controllate gli script di
  inizializzazione della rete (/etc/sysconfig/network dovrebbe essere la
  collocazione corrette) per comprendere se contengono la linea
  FORWARD_IPV4=true. Viene utilizzata per impostare
  /proc/sys/net/ipv4/ip_forward a 1 quando il sottosistema di rete viene
  attivato.

  Aggiungete queste linee a /etc/rc.d/rc.sysinit:

       # default: i pacchetti non possono raggiungere l'esterno
       /sbin/ipfwadm -F -p deny
       # consente a tutte le macchina della rete locale di raggiungere Internet
       /sbin/ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0
       # in alternativa, lo consente solo a queste due macchine
       # /sbin/ipfwadm -F -a m -S 192.168.1.100/24 -D 0.0.0.0/0
       # /sbin/ipfwadm -F -a m -S 192.168.1.101/24 -D 0.0.0.0/0




  Se utilizzate un kernel della serie 2.2.x, servitevi di ipfwadm-
  wrapper invece di ipfwadm per iniziare in modo rapido.

  Ora dovete disporre di qualcosa che consenta alle macchine client di
  contattare il provider. Io utilizzo Mserver (
  <http://cpwright.villagenet.com/mserver/>). Modificate
  etc/mserver.conf; le uniche voci che dovrete modificare sono
  ``checkhost'', ``shadow'' e ``cname''. Definite quindi le connessioni.
  Ovviamente, installate uno dei client disponibili sulle macchine
  client.




  3.3.  Limitazione dell'accesso di rete


  Supponiamo di connetterci a Internet tramite il protocollo PPP. Dopo
  esserci connessi, la macchina pu diventare vulnerabile agli attacchi.
  Inserite questa linea in /etc/hosts.allow:



       # consente l'accesso solo al localhost
       ALL: 127.




  e questa linea in /etc/hosts.deny:



       # nega l'accesso a tutti
       ALL: ALL




  Se siete in una rete con accesso diretto a Internet, fareste meglio a
  disabilitare finger, telnet e possibilmente gli altri servizi per
  motivi di sicurezza.  Utilizzate ssh invece di telnet. Il file da
  modificare  /etc/inet.conf. In alternativa, potete limitare l'accesso
  di rete immettendo questa linea in /etc/hosts.allow:



       in.telnetd: 192.168.1., .another.trusted.network
       in.ftpd: 192.168.1., .another.trusted.network




  e questa in /etc/hosts.deny:

       in.telnetd: ALL
       in.ftpd: ALL






  3.4.  Esportazioni NFS


   cosa comune esportare le directory principali sul server. Si pone un
  problema se UID e GID non sono coerenti in macchine diverse.  Se
  l'utente guido dispone di UID/GID uguali a 500 su server e UID/GID
  uguali a 512 su client, una configurazione utile pu essere:



       # /etc/exports
       /tmp            my.client.machine(rw)
       /home/guido     my.client.machine(rw,map_static=/etc/nfs/client.map)




  In /etc/nfs/client.map verr inserita:



       # /etc/nfs/client.map
       # NFS mapping for client
       #       remote          local
       uid     512             500

       gid     512             500







  3.5.  Server del nome


  Non ancora disponibile.



  4.  Configurazione software


  Questi sono i file di configurazione che stiamo per personalizzare:
  /etc/profile /etc/bashrc .bashrc .bash_profile .bash_logout .inputrc
  .less .lessrc .xinitrc .fvwmrc .fvwm2rc95 .Xmodmap .Xmodmap.num
  .Xdefaults .jedrc .abbrevs.sl .joerc .emacs

  Non aggiungete utenti prima di completare la configurazione; metterete
  infatti i file dot in /etc/skel.



  4.1.  bash(1)



  Questo  forse il programma pi importante dopo il kernel. Per
  personalizzare bash, questi sono i file principali da modificare:


    /etc/bashrc contiene gli alias e le funzioni valide per l'intero
     sistema;

    /etc/profile contiene le variabili d'ambiente per l'intero sistema
     e i programmi di avvio;

    $HOME/.bashrc contiene gli alias e le funzioni dell'utente;

    $HOME/.bash_profile contiene le variabili d'ambiente e i programmi
     di avvio dell'utente;

    $HOME/.inputrc contiene definizioni di tasti e altri elementi.

  Qui sotto ci sono esempi di questi file. Primo, il pi importante:
  /etc/profile. Viene usato per configurare molte caratteristiche in una
  macchina Linux, come vedrete nelle sezioni seguenti. Fate attenzione
  agli apici inversi!













































  ______________________________________________________________________
  # /etc/profile

  # Variabili di ambiente globali e programmi di avvio
  # Le funzioni e gli alias vanno in /etc/bashrc

  # Questo file imposta queste caratteristiche:
  #
  #   o path
  #   o prompt
  #   o alcune variabili d'ambiente
  #   o ls a colori
  #   o il comportamento di less
  #   o backspace in rxvt
  #
  # Gli utenti possono sovrascrivere queste impostazioni e/o aggiungerne altre
  # nel loro $HOME/.bash_profile

  # imposta un path decente
  PATH="$PATH:/usr/X11R6/bin:$HOME/bin:."

  # avvisa l'utente: login o non-login shell. Se e' di login, il prompt e'
  # colorato in blu; altrimenti in magenta. Il prompt di root e' rosso.
  # Per una spiegazione dei codici, vedi il Colour-ls mini HOWTO.
  USER=`whoami`
  if [ $LOGNAME = $USER ] ; then
    COLOUR=44  # blu
  else
    COLOUR=45  # magenta
  fi

  if [ $USER = 'root' ] ; then
    COLOUR=41  # rosso
    PATH="$PATH:/usr/local/bin"
  fi

  ESC="\033"
  PROMPT='\h'    # hostname
  STYLE=';1m'    # grassetto
  # PROMPT='\u'  # nomeutente
  # STYLE='m'    # testosemplice
  PS1="\[$ESC[$COLOUR;37$STYLE\]$PROMPT:\[$ESC[37;40$STYLE\]\w\\$ "
  PS2="> "

  # niente core dump, per piacere
  ulimit -c 0

  # imposta umask
  if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
    umask 002
  else
    umask 022
  fi

  # alcune variabili
  USER=`id -un`
  LOGNAME=$USER
  MAIL="/var/spool/mail/$USER"  # sendmail, postfix, smail
  # MAIL="$HOME/Mailbox"        # qmail
  NNTPSERVER=news.myisp.it      # inserite il vostro qui
  VISUAL=jed
  EDITOR=jed
  HOSTNAME=`/bin/hostname`
  HISTSIZE=1000
  HISTFILESIZE=1000
  export PATH PS1 PS2 USER LOGNAME MAIL NNTPSERVER
  export VISUAL EDITOR HOSTNAME HISTSIZE HISTFILESIZE

  # abilita ls a colori
  eval `dircolors /etc/DIR_COLORS -b`
  export LS_OPTIONS='-F -s -T 0 --color=yes'

  # personalizza less
  LESS='-M-Q'
  LESSEDIT="%E ?lt+%lt. %f"
  LESSOPEN="| lesspipe.sh %s"
  LESSCHARDEF=8bcccbcc13b.4b95.33b. # mostra i colori in ls -l | less
  PAGER=less
  export LESS LESSEDIT LESSOPEN VISUAL LESSCHARDEF

  # aggiusta il backspace per rxvt/xterm
  CTRL_H="\010"
  NULL_STRING=" $CTRL_H" # spazio + backspace
  if [ "$NULL_STRING" != "" ] ; then
    stty erase ^?
  else
    stty erase ^H
  fi

  # imposta il titolo xterm title: path completo
  case $TERM in
    xterm*)
      PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
      ;;
  esac

  for i in /etc/profile.d/*.sh ; do
    if [ -x $i ]; then
      . $i # attenzione - le variabili e gli alias potrebbero sovrapporsi!
    fi
  done

  # se c' fortune, lancialo
  if [ -x /usr/games/fortune ] ; then
    echo ; /usr/games/fortune ; echo
  fi
  ______________________________________________________________________



  Questo  un esempio di /etc/bashrc:





















  ______________________________________________________________________
  # /etc/bashrc

  # Funzioni e alias globali
  # Le variabili d'ambiente vanno in /etc/profile
  # Inserite qui le definizioni PS1 se si verificano problemi.

  export CDPATH="$CDPATH:~"

  # alias comuni
  alias cp='cp -i'
  alias l=less
  alias ls="ls $LS_OPTIONS"
  alias mv='mv -i'
  alias rm='rm -i'
  alias rmbk='/bin/rm -f .*~ *~ *aux *bak *log *tmp 2> /dev/null'
  alias u='cd ..'
  alias which="type -path"
  alias x=startx

  # Alcune funzioni utili
  c ()    # cd per la nuova directory ed elenco del contenuto
  {
    cd $1 ; ls
  }

  inst()  # Installa un archivio .tar.gz nella directory corrente
  {
    if [ $# != 0 ]; then tar zxvf $1; fi
  }

  cz()    # Elenca il contenuto di un archivio .zip
  {
    if [ $# != 0 ]; then unzip -l $*; fi
  }

  ctgz()  # Elenca il contenuto di un archivio .tar.gz
  {
    for file in $* ; do
      tar ztf ${file}
    done
  }

  tgz()   # Crea un archivio .tgz alla zip.
  {
    if [ $# != 0 ]; then
      name=$1.tar; shift; tar -rvf ${name} $* ; gzip -9 ${name}
    fi
  }

  crpm()  # elenca le informazioni in un file .rpm
  {
    if [ $# != 0 ]; then rpm -qil $1 | less; fi
  }
  ______________________________________________________________________



  Questo  un esempio di .bashrc:







  ______________________________________________________________________
  # $HOME/.bashrc
  # Prendi le definizioni globali

  if [ -f /etc/bashrc ]; then
    . /etc/bashrc
  fi

  # questo serve per avvisare l'utente che si trova in non-login shell
  if [ "$GET_PS1" = "" ] ; then
    COLOUR=45; ESC="\033"; STYLE=';1m';  # STYLE='m'
    USER=`whoami`
    export PS1="\[$ESC[$COLOUR;37$STYLE\]$USER:\[$ESC[37;40$STYLE\]\w\\$ "
  fi

  # alias personali
  alias backup='tar -Mcvf /dev/fd0'
  alias dial='eznet up myisp'
  alias f='cd ~/fortran'
  alias hangup='eznet down'
  alias lyx='lyx -width 580 -height 450'
  alias restore='tar -M -xpvf /dev/fd0'

  # funzioni personali
  xj()    # Lancia xjed e un file in background
  {
    xjed $1 &
  }
  ______________________________________________________________________



  Questo  un esempio di .bash_profile:


  ______________________________________________________________________
  # $HOME/.bash_profile

  # Variabili di ambiente e programmi di avvio utente
  # Questo file contiene impostazioni personalizzati che si sovrappongono
  # a quelli in /etc/profile

  # Prendi gli alias e le funzioni
  if [ -f ~/.bashrc ]; then
    GET_PS1="NO"  # non cambiare il colore del prompt
    . ~/.bashrc
  fi

  # imposta alcune directory di default
  export CDPATH="$CDPATH:$HOME:$HOME/testi:$HOME/testi/geologia"
  ______________________________________________________________________



  Questo  un esempio di .inputrc:











  ______________________________________________________________________
  # $HOME/.inputrc

  # combinazioni di tasti
  "\e[1~": beginning-of-line
  "\e[3~": delete-char
  "\e[4~": end-of-line
  # (F1 .. F5) are "\e[[A" ... "\e[[E"
  "\e[[A": "info \C-m"

  set bell-style visible         # non fare beep
  set meta-flag On               # permetti input a 8-bit (ad esempio le lettere accentate)
  set convert-meta Off           # non togliere l'ottavo bit
  set output-meta On             # mostra i caratteri a 8-bit correttamente
  set horizontal-scroll-mode On  # scorri la linea di comando se e' lunga
  set show-all-if-ambiguous On   # dopo aver premuto TAB
  ______________________________________________________________________



  Per fare funzionare i tasti backspace e delete in xterm e altre
  applicazioni X11, bisogna inoltre:


    mettere questo nel vostro .xinitrc:



       usermodmap=$HOME/.Xmodmap
       xmodmap $usermodmap





    e nel vostro .Xmodmap dovrete inserire:



       keycode 22 = BackSpace
       keycode 107 = Delete





  questo adatta la modalit console.

    Per sistemare xterm, inserite questo nel vostro .Xdefaults:



       xterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n\
               <Key>Delete:        string(0x1b) string("[3~")\n\
               <Key>Home:          string(0x1b) string("[1~")\n\
               <Key>End:           string(0x1b) string("[4~")\n\
               Ctrl<Key>Prior:     string(0x1b) string("[40~")\n\
               Ctrl<Key>Next:      string(0x1b) string("[41~")

       nxterm*VT100.Translations: #override <Key>BackSpace: string(0x7F)\n\
               <Key>Delete:        string(0x1b) string("[3~")\n\
               <Key>Home:          string(0x1b) string("[1~")\n\
               <Key>End:           string(0x1b) string("[4~")\n\
               Ctrl<Key>Prior:     string(0x1b) string("[40~")\n\
               Ctrl<Key>Next:      string(0x1b) string("[41~")

  rxvt  un po' pi complicato da sistemare, perch alcune opzioni si
  danno in fase di compilazione. Vedete il /etc/profile qui sopra.

  Ulteriori informazioni nelle pagine man di bash(1) e readline(3).

  Non vi aspettate che tutte le applicazioni funzionino! Con joe in
  xterm, ad esempio, alcuni tasti non funzionano; lo stesso vale per
  alcune versioni di rxvt.



  4.2.  ls(1)


  ls pu mostrare a colori i contenuti delle directory, per evidenziare
  i diversi tipi di file. Per abilitare questa caratteristica, servono
  un paio di linee come in /etc/profile qui sopra. Questo per non
  funziona in alcune versioni di rxvt; dovrete usare xterm.  Sembra che
  rxvt abbia un bug che gli impedisce in alcuni casi di ereditare
  correttamente le variabili di ambiente.

  Caldera ha un ls che non supporta i colori, ma c' un comando color-ls
  che  la stessa cosa. Inserite in /etc/bashrc:



       alias ls="color-ls $LS_OPTIONS"






  4.3.  less(1)


  Con questo eccellente pager si leggono non solo file di testo, ma
  anche file compressi con gzip, archivi tar e zip, pagine man e altro
  ancora. La sua configurazione richiede alcuni passaggi:


    per abilitare i tasti cursore, scrivetevi questo file .lesskey (
     un semplice file ASCII) nella vostra directory principale:



       ^[[A   back-line
       ^[[B   forw-line
       ^[[C   right-scroll
       ^[[D   left-scroll
       ^[OA   back-line
       ^[OB   forw-line
       ^[OC   right-scroll
       ^[OD   left-scroll
       ^[[6~  forw-scroll
       ^[[5~  back-scroll
       ^[[1~  goto-line
       ^[[4~  goto-end
       ^[[7~  goto-line
       ^[[8~  goto-end





  quindi lanciate il comando lesskey. Si tratta di sequenze di escape
  per terminali vt100. Questa consente di creare un file binario chiam
  ato .less contenente le definizioni dei tasti.


    scrivetevi questo script col nome /usr/local/bin/lesspipe.sh:


     ___________________________________________________________________
     #!/bin/sh
     # Preprocessore per 'less'. Viene usato quando questa variabile di ambiente
     #  impostata:   LESSOPEN="|lesspipe.sh %s"

     lesspipe() {
       case "$1" in
       *.tar) tar tf $1 2>/dev/null ;; # Vedi i file .tar e .tgz
       *.tgz|*.tar.gz|*.tar.Z|*.tar.z) tar ztf $1 2>/dev/null ;;
       *.Z|*.z|*.gz) gzip -dc $1  2>/dev/null ;; # Vedi i file compressi
       *.zip) unzip -l $1 2>/dev/null ;; # Vedi gli archivi
       *.arj) unarj -l $1 2>/dev/null ;;
       *.rpm) rpm -qpil $1 2>/dev/null ;;
       *.cpio) cpio --list -F $1 2>/dev/null ;;
       *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.man) FILE=`file -L $1`
         FILE=`echo $FILE | cut -d ' ' -f 2`
         if [ "$FILE" = "troff" ]; then
           groff -s -p -t -e -Tascii -mandoc $1
         fi ;;
       *) file $1 | grep text > /dev/null ;
         if [ $? = 1 ] ; then # non e' un file di testo di qualche tipo
           strings $1
         fi ;;
       esac
     }

     lesspipe $1
     ___________________________________________________________________



  e rendetelo eseguibile con chmod 755 lesspipe.sh.

    inserite le variabili necessarie, che sono gi presenti nel file
     /etc/profile visto prima. La variabile LESSCHARSET dipende dal
     fatto che io vivo in Italia e quindi uso il set di caratteri ISO
     8859/1.  Gli amici americani, giapponesi, russi e altri fanno
     meglio a non impostarla.



  4.4.  emacs(1)


  Uso emacs di rado, quindi ho solo un paio di dritte.  Alcune versioni
  di emacs non sono preconfigurate per i colori e l'evidenziazione della
  sintassi. Scrivete quanto segue nel vostro .emacs:



       (global-font-lock-mode t)
       (setq font-lock-maximum-decoration t)




  Funziona solo in X11. Inoltre, per abilitare le lettere accentate
  dovrete aggiungere:

       (standard-display-european 1)




  Lascio a voi la lettura di tutta la documentazione di emacs per
  scoprire come adattarlo ai vostri gusti; potenzialmente, ce n' per
  mesi di smanettamenti. Il Dotfile Generator (Sezione ``Software per la
  configurazione'') vi pu dare una mano.



  4.5.  joe(1)


  Alcune versioni di joe non funzionano a colori in console, e non vanno
  nemmeno certi tasti speciali. Una soluzione svelta (ma inelegante) per
  il primo problema  questa:



       ~$ export TERM=vt100
       ~$ joe myfile
          (modificate il vostro file)
       ~$ export TERM=linux




  Per fare in modo che i tasti speciali funzionino, modificate .joerc,
  .jstarrc o l'emulazione che preferite; potete partire dai file di
  configurazione in /usr/lib/joe. Fate riferimento alla quarta sezione
  (binding dei tasti) che abilita i tasti Home e End:



       bol ^[ [ 1 ~    Go to beginning of line
       eol ^[ [ 4 ~    Go to end of line




  Scoprite le sequenze di escape desiderate digitando cat seguito dai
  tasti speciali.


  4.6.  jed(1)


  Questo  il mio editor preferito: fa quello che mi serve,  pi snello
  e pi facile da configurare di emacs ed emula altri editor molto bene.
  Presso la mia universit, molti usano jed in emulazione EDT, l'editor
  di sistema di VMS.

  I file di configurazione sono .jedrc e /usr/lib/jed/lib/*; il primo
  pu essere adattato dal file jed.rc che sta nella directory appena
  indicata.


    per fare usare i tasti speciali a jed, create un file di nome
     /usr/lib/jed/lib/defaults.sl contenente una sola linea:



       () = evalfile("linux");

    se xjed apparentemente non riconosce il tasto DEL, aggiungete
     queste linee nel vostro .jedrc:



       #ifdef XWINDOWS
         x_set_keysym (0xFFFF, 0, "\e[3~");
         setkey (`delete_char_cmd'', "\e[3~");
       #endif





    modificate /usr/lib/jed/lib/linux.sl e scrivete le due linee
     Info_Directory = "/usr/info"; e UCB_Mailer = "/bin/mail";;

    configurare jed per fargli emulare EDT (o altri editor) 
     semplicissimo: dovete solo cambiare un paio di linee nel vostro
     .jedrc. Se volete usare il tasto `+' del tastierino numerico per
     cancellare parole anzich un singolo carattere, aggiungete in
     .jedrc:



       unsetkey("\eOl");
       unsetkey("\eOP\eOl");
       setkey("edt_wdel", "\eOl");
       setkey("edt_uwdel", "\eOP\eOl");





  dopo la linea con scritto () = evalfile("edt");.

    per fare usare a xjed il tastierino numerico per l'emulazione EDT,
     inserite quanto segue in .Xmodmap:



       keycode 77  = KP_F1
       keycode 112 = KP_F2
       keycode 63  = KP_F3
       keycode 82  = KP_F4
       keycode 86  = KP_Separator





    la scelta dei colori per xjed si fa aggiungendo linee come le
     seguenti in .Xdefaults:



       xjed*Geometry: 80x32+150+50
       xjed*font: 10x20
       xjed*background: midnight blue
       # eccetera...






    la funzionalit delle abbreviazioni fa risparmiare un sacco di
     tempo.  Scrivete un file come questo col nome $HOME/.abbrevs.sl:
     (potete modificare questo nome inserendo variable Abbrev_File =
     "/usr/lib/jed/abbrev.sl"; in .jedrc)



       create_abbrev_table ("Global", "0-9A-Za-z");
       define_abbrev ("Global", "GG", "Guido Gonzato");
       create_abbrev_table ("TeX", "\\A-Za-z0-9");
       define_abbrev ("TeX", "\\beq", "\\begin{equation}");
       define_abbrev ("TeX", "\\eeq", "\\end{equation}");
       % and so on...





  quindi digitate ESC x abbrev_mode per abilitarlo. Se volete avere le
  abbreviazioni attivate per default, aggiungete queste entry in .jedrc:



       define text_mode_hook ()
       {
         set_abbrev_mode (1);
       }
       %
       define fortran_hook ()
       {
         set_abbrev_mode (1);
         use_abbrev_table ("Fortran");
       }
       % e cosi' via...







  4.7.  pine(1)


  Modificate la configurazione globale in /usr/lib/pine.conf, tenendo in
  considerazione almeno i campi seguenti: user-domain, smtp-server e
  nntp-server. Notate che inbox-path dipende dal vostro MTA: se
  utilizzate sendmail o postfix, sar var/spool/mail/$USER; con Qmail,
  /home/$USER/Mailbox (ma la root user /var/qmail/alias/Mailbox.



  4.8.  minicom(1)


  Gli utenti possono servirsi di minicom se non  stata creata una
  configurazione globale dalla root. Ricordatevi di farlo.



  4.9.  efax(1)


  Questo programma  forse il pi comodo per una semplice gestione dei
  fax.   necessario modificare lo script /usr/bin/fax; molto semplice,
  ma ci sono un paio di stranezze che mi hanno procurato qualche
  grattacapo:


    per scoprire se il modem  di classe 1, 2 o 2.0, utilizzate minicom
     o un programma simile per eseguire il comando at+fclass=?. La
     risposta potrebbe essere simile a 0,1,2; 1 e 2 sono le classi
     supportate dal modem;

    DIALPREFIX: in Italia (e forse anche altri Paesi) non basta mettere
     `T' o `P'. Inserite invece `ATDT' o `ATDP';

    INIT and RESET: queste stringhe contengono gli inizializzatori `-i'
     e `-k', necessari per efax. Se volete aggiungere un comando AT,
     mettetelo nella stringa appropriata senza `AT' ma col prefisso `-i'
     o `-k'. Per esempio, per aggiungere `ATX3' a INIT, dovrete mettere
     `-iX3'.

  Dopo questa operazione, ci sono alcuni permessi da stabilire per fare
  in modo che gli utenti non-root inviino e ricevano fax. Le directory
  /var/lock e /var/spool/fax devono essere modificabili.  Per fare
  questo, create il gruppo faxusers, aggiungetevi gli utenti e digitate:



       ~# chown root.faxusers /var/lock
       ~# mkdir /var/spool/fax
       ~# chown root.faxusers /var/spool/fax; chmod g+w /var/spool/fax






  4.10.  Ghostscript


  Questo tool essenziale pone un piccolo intralcio. A causa delle note
  regole di esportazione degli Stati Uniti, l'utility pdf2ps non
  funziona in file .pdf crittografati. Ma questo non importa: digitate
  nel browser l'indirizzo
  <http://www.ozemail.com.au/~geoffk/pdfencrypt>, scaricate il file
  pdf_sec.ps e sostituitelo al file con lo stesso nome che  disponibile
  con la distribuzione di Ghostscript.



  4.11.  TeX e programmi accessori


  Presumendo che abbiate la distribuzione teTeX, ecco un paio di
  cosette:


    scaricate altri pacchetti LaTeX dal sito mirror CTAN pi vicino, ad
     esempio  <ftp://ftp.dante.de/pub/tex>. Aggiungete i file a
     /usr/share/texmf/tex/latex, quindi eseguite il comando texhash per
     fare in modo che teTeX riconosca il nuovo pacchetto;

    per configurare la sillabazione, modificate il file
     /usr/lib/texmf/texmf/tex/generic/config/language.dat ed eseguite i
     comandi:



       ~# texconfig init ; texconfig hyphen

    per personalizzare dvips, il file da modificare 
     /usr/share/texmf/dvips/config/config.ps. Attenzione, i campi
     riguardanti la risoluzione di default toccano anche xdvi; se vi
     succede che quest'ultimo cerca di ricreare i font ogni volta che lo
     fate partire, aggiungete in .Xdefault la linea



       XDvi*mfmode:





  Questo dovrebbe aiutare.

    per includere immagini PostScript che si trovano nelle
     sottodirectory, potete espandere il path di ricerca di TeX per
     includere le sottodirectory. Mettete questo comando in
     .bash_profile:



       export TEXINPUTS="$HOME/figures::./figures"





  che fa in modo che TeX cerchi in $HOME/figures prima delle directory
  di default e in ./figures dopo le directory di default.



  4.12.  Evitate PPProblemi!


  Si d per scontato che il vostro kernel abbia il supporto per i
  protocolli PPP e TCP/IP, che il loopback sia abilitato e che
  disponiate gi del pacchetto pppd correttamente installato e magari
  impostato suid root. Ovviamente, il vostro ISP deve supportare il
  protocollo PPP.

  Ci sono due modi per fare funzionare il PPP: 1) configurazione
  manuale, e 2) un programma di configurazione che faccia tutto lui.
  Qualunque opzione scegliate, dovrete avere queste informazioni a
  portata di mano:


    il numero di telefono del vostro ISP;

    l'indirizzo del server del nome, delle mail e delle news del vostro
     ISP;

    il dominio del vostro ISP;

    i vostri username e password.

  La configurazione manuale  un fastidio. Si tratta di modificare vari
  file e scrivere degli script; non  troppo difficile, ma  facile fare
  errori e i nuovi utenti ne sono spesso spaventati. Il PPP HOWTO vi
  attende. In alternativa, ci sono programmi che vi richiedono le
  informazioni elencate qui sopra e fanno il lavoro per voi.

  Gnome  KDE includono, rispettivamente, gnome-ppp e kppp che sono
  molto semplici da installare. In alternativa, suggerisco che diate
  un'occhiata a un paio di tool basati su testo semplice, wvdial ed
  eznet.  Dovete fornire loro il numero di telefono dell'ISP, il vostro
  username, la vostra password ed  fatta. Le relative home page sono
  disponibili agli indirizzi  <http://www.worldvisions.ca/wvdial> e
  <http://www.hwaci.com/sw/eznet>. Entrambi sono molto utili, ma
  preferisco l'ultimo.



  4.12.1.  Partire in fretta con eznet


  Prima di tutto, create un file /etc/resolv.conf come questo:



       nameserver w.x.y.z




  dove inserirete l'indirizzo del name server del vostro provider. Per
  creare un account con eznet, eseguite questo comando:



       #~ eznet add service=VOSTRO_ISP user=NOME password=PASSWORD phone=NUMERO




  che crea il file /var/eznet/eznet.conf della root.root con permessi
  600; modificatelo in 666 se desiderate che tutti lo possano leggere.
  Quindi provate a chiamare con eznet up VOSTRO_ISP. Se il modem non
  prende la linea, aggiungete questo comando:



       #~ eznet change VOSTRO_ISP init0=atx3




  Per finire la connessione, il comando  eznet down. Tutto qui!



  4.12.2.  Partire in fretta con wvdial


  L'installazione di wvdial  ancora pi breve. Digitate wvdialconf
  /etc/wvdial.conf, quindi modificate il file risultante per includere
  il vostro username, la password e il numero di telefono. Provate
  wvdial e tenete le dite incrociate. Per finire la connessione,
  arrestatela con Ctrl-C.



  4.13.  POP Client


  Per ricevere la posta dal server POP3, si usa un client POP come
  fetchpop o fetchmail; quest'ultimo  il pi avanzato, ma richiede
  l'esecuzione di sendmail. Si tratta di una specie di sovrapposizione
  nelle macchine con specifiche minime. Si trovano su
  <ftp://metalab.unc.edu/pub/Linux/system/mail/pop> .
  Per configurare questi client:


    fetchpop: la prima volta che lo lanciate, vi verranno chieste delle
     informazioni. Rispondete alle domande e siete a posto. fetchpop
     deve essere utilizzato con lo switch -r se il server POP3 del
     vostro ISP non implementa il comando LAST in modo corretto.

    fetchmail: adattate questo esempio di file .fetchmailrc:



       # $HOME/.fetchmailrc
       poll mbox.supernet.edu with protocol pop3;
         user pippo there with password _Loo%ny is pippo here





  Un utente mi ha scritto per dirmi che aggiungendo ``smtphost local
  host'' alla seconda linea, le prestazioni sono molto migliorate.

  Dovete impostare i permessi di questo file con chmod 600 .fetchmailrc,
  altrimenti fetchmail si rifiuter giustamente di partire. Questo esem
  pio  molto semplice; ci sono possibilit di configurazione infinite.
  Verificatele all'indirizzo  <http://www.ccil.org/~esr/fetchmail>.



  4.14.  Sistema X Window (XFree86)



  4.14.1.  Configurare il server X


  Andiamo, non  pi difficile come una volta... Tutte le principali
  distribuzioni forniscono un programma di configurazione per X11 (ad
  es.  XConfigurator, sax, XF86Setup o almeno xf86config). Ormai
  l'installazione del server X  pressoch automatica, ma certe schede
  video possono fare i capricci. In questi casi, seguo questo metodo che
  ha sempre funzionato:


    assicuratevi che il server per la VGA sia installato;

    andate su  <ftp://ftp.XFree86.org/pub/XFree86/current/binaries> ,
     cd nella sottodirectory di Linux che vi riguarda e scaricate i file
     XVERSIONEbin.tgz, XVERSIONEset.tgz e tutti i server.  Il primo di
     questi archivi contiene il SuperProbe pi aggiornato;

    decomprimete XVERSIONEbin.tgz in una directory temporanea,
     spostatevi in essa ed eseguite il comando ./SuperProbe. Se la
     vostra scheda video viene riconosciuta,  molto probabile che
     riuscirete a configurarla; altrimenti, peccato.

    installate i server e XVERSIONEset.tgz partendo da /usr/X11R6/,
     quindi eseguite XF86Setup.

  Anche se ha sempre funzionato per me, potreste avere diversa fortuna.
  Attenzione che spesso X11 non parte perch avete scelto impostazioni
  troppo elevate per il monitor! Iniziate con impostazioni di base, ad
  es. 800x600 e 256 colori, poi provate ad aumentarle. Attenzione:
  queste operazioni sono pericolose e potreste danneggiare il monitor!

  4.14.2.  Il tastierino numerico


  Abbiamo visto prima come fare funzionare alcuni tasti speciali. Il
  file .Xmodmap funziona bene se vogliamo usare Xjed, ma rende
  inutilizzabile il tastierino numerico. Servir quest'altro file, che
  chiameremo .Xmodmap.num:



       ! Le definizioni si trovano in <X11/keysymdef.h>

       keycode 77  = Num_Lock
       keycode 112 = KP_Divide
       keycode 63  = KP_Multiply
       keycode 82  = KP_Subtract
       keycode 86  = KP_Add
       keycode 79  = KP_7
       keycode 80  = KP_8
       keycode 81  = KP_9
       keycode 83  = KP_4
       keycode 84  = KP_5
       keycode 85  = KP_6
       keycode 87  = KP_1
       keycode 88  = KP_2
       keycode 89  = KP_3
       keycode 90  = KP_0
       keycode 91  = KP_Decimal




  Assicuratevi che /etc/X11/XF86Config non contenga queste tre linee:



         ServerNumLock
         Xleds
         XkbDisable




  e nel caso, mettetele in un commento. Per riabilitare il tastierino,
  si d il comando xmodmap .Xmodmap.num.



  4.14.3.  Login grafico con xdm


  Per ottenere il login in modalit grafica, si deve modificare il file
  /etc/inittab, che dovrebbe includere una linea come questa:



       x:5:respawn:/usr/bin/X11/xdm -nodaemon




  5  il runlevel che corrisponde alla modalit X11 (S.u.S.E. usa 4).
  Modificate la linea che stabilisce il runlevel di default (di solito 
  2 o 3), inserendo il valore qui sopra:


       id:5:initdefault:




  Il numero di colori si specifica in /etc/X11/xdm/Xserver (AQVD):



       :0 local /usr/X11R6/bin/X :0 -bpp 16 vt07  # primo server X, colori a 65 kb
       :1 local /usr/X11R6/bin/X :1 -bpp 32 vt08  # secondo server X, true colour




  Se avete gi il file .xinitrc, copiatelo nel file .xsession e rendete
  eseguibile quest'ultimo con chmod +x .xsession. Ora eseguite il
  comando telinit 5 e siete a posto!



  4.14.4.  Window Manager


  Una volta che il server X funziona, ci sono infinite possibilit di
  configurazione; dipende dal window manager che volete usare, e ce ne
  sono decine tra cui scegliere. Quasi sempre, si tratta di modificare
  uno o pi file ASCII nella vostra home directory; in altri casi non si
  deve modificare nulla e si utilizzano appositi programmini, o
  addirittura un apposito menu.

  Alcuni esempi:


    fvwm e derivati: copiate il file /etc/X11/fvwm/system.fvwmrc (o
     altro) nella vostra home col nome adeguato, leggetelo e provate.
     Potreste perdere molto tempo prima di ottenere quello che
     desiderate;

    WindowMaker: possiede diversi file di configurazione che risiedono
     in $HOME/GNUstep, oltre a un ottimo programmino di configurazione;

    KDE e Gnome: qui non  necessario modificare nulla, e si configura
     il tutto da menu.

  In breve: se non vi dispiace modificare dei file di configurazione,
  scegliete icewm, fvwm*, blackbox etc; se invece non  di vostro
  gradimento, la scelta  limitata attualmente a KDE, Gnome, WindowMaker
  e XFCE.

   importante avere un buon file .xinitrc. Un esempio:















  #!/bin/sh
  # $HOME/.xinitrc

  usermodmap=$HOME/.Xmodmap
  xmodmap $usermodmap

  xset s noblank  # disattiva lo screen saver
  xset s 300 2    # screen saver che parte dopo 5 minuti
  xset m 10 5     # imposta l'accelerazione del mouse

  rxvt -cr green -ls -bg black -fg white -fn 7x14 \
    -geometry 80x30+57+0 &

  if [ "$1" = "" ] ; then  # default
    WINMGR=wmaker
  else
    WINMGR=$1
  fi

  $WINMGR




  Per quanto non mi sembra che sia strettamente necessario, rendetelo
  eseguibile con chmod +x .xinitrc.

  Questo .xinitrc consente di scegliere il window manager: provate


       $ startx startkde # o altro




  (non funziona in alcune versioni di S.u.S.E.).



  4.14.5.  Impostazioni di default per le applicazioni X11


  Scoprite dove si trova la directory app-defaults (dovrebbe essere in
  /usr/X11R6/lib/X11/app-defaults). Numerose applicazioni conservano qui
  un file di configurazione.



  4.15.  Configurazione per gli utenti


  Quando avete finito di configurare i file dot, copiateli nella
  directory /etc/skel come gi detto alla Sezione ``Configurazione
  software''.



  4.16.  Creazione di .rpms


  rpm  un metodo talmente utile per il controllo dei pacchetti che sono
  riluttante a installare gli archivi .tar.gz, ma solo in pochi casi
  speciali (ad esempio, per la sicurezza). Ogni volta che installate un
  tarball, considerate di trasformarlo in un archivio .rpm, quindi
  reinstallatelo; fate riferimento al RPM HOWTO. Inoltre, se utilizzate
  le versioni di gcc aggiornate, quali egcs o pgcc, pu essere
  consigliabile immettere quanto segue in /etc/rpmrc:



       optflags: i386 -O2 -mpentium






  4.17.  Fare l'upgrade


  Se fate l'upgrade, oltre ai soliti backup dovrete ricordarvi di
  salvare alcuni file addizionali. Alcuni potrebbero essere
  /etc/X11/XF86Config, /usr/bin/fax, tutto quello che avete messo in
  /usr/local, la configurazione del kernel, l'intero /etc e la posta in
  /var/spool/mail.

   quindi il momento di fare l'upgrade (in rari casi, downgrade!) delle
  applicazioni della distribuzione e di aggiungere ulteriori pacchetti.
  Mantenete un elenco di questi ultimi.



  5.  Software per la configurazione


  Diversi programmi rendono Linux pi semplice da configurare. Alcuni
  stanno diventando pi o meno standard: Red Hat, Caldera e altre
  distribuzioni forniscono utility come printtool, netcfg, usertool,
  ecc. S.u.S.E. fornisce un elaborato programma di configurazione del
  sistema chiamato YAST. Altri programmi utili sono:


    The Dotfile Generator: buona applicazione per X11 con moduli per
     configurare emacs, bash, procmail e altri. La sua home page 
     all'indirizzo  <http://www.imada.ou.dk/~blackie/dotfile> ;

    Linuxconf: il massimo dei programmi di configurazione. Pu fare
     tutto, sia in console che sotto X11. Andate subito a vederlo
     all'indirizzo
       <http://www.solucorp.qc.ca/linuxconf> .



  6.  Fine




  6.1.  Copyright (in inglese)


  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at tjbynum@sunsite.unc.edu via email.



  6.2.  Commenti e critiche


  Forse pi ancora di altri HOWTO, questo ha bisogno dei vostri
  suggerimenti, critiche e contributi. Tutto  benvenuto, anzi
  necessario. Se pensate che manchi qualcosa o che ci siano errori,
  mandatemi un'email. Se avete una distribuzione diversa da
  Redhat/Mandrake e i vostri file di configurazione sono diversi dai
  miei o collocati in altre directory, comunicatemelo, e io aggiunger i
  vostri suggerimenti. Il mio scopo  quello di rendere il lavoro con
  Linux il pi semplice possibile.

  Linux ha un numero enorme di programmi, quindi non posso includere
  suggerimenti per ciascuno. Cercate di mantenere i vostri suggerimenti
  nell'ambito dei programmi ``pi ragionevoli''; lascio
  l'interpretazione di questo concetto al vostro buon senso.



  6.3.  Liberatoria


  ``Configuration HOWTO''  stato scritto da Guido Gonzato,
  guido@ibogeo.df.unibo.it.  I miei sentiti ringraziamenti vanno a tutti
  gli altri autori di HOWTO e di man page, il cui lavoro ho saccheggiato
  senza vergogna; e a tutte le persone che mi hanno inviato
  suggerimenti.

  Questo lavoro  distribuito senza garanzie. Mi sono sforzato di
  scriverlo con la massima accuratezza, ma usate le informazioni qui
  contenute a vostro rischio. Non sar responsabile in alcun caso di
  danni provocati da questo documento.

  Spero che troviate utile questo mio lavoro. Ogni volta che installo
  una macchina Linux, io lo trovo utilissimo...

  Ciao,

  Guido   =8-)














  DNS HOWTO
  Nicolai Langfeldt janl@linpro.no
  Versione 2.2.1, 18 luglio 1999

  Come diventare un piccolo amministratore DNS.  Traduzione di Federico
  Cossu (f.cossu@trident.nettuno.it), flug-firenze.

  1.  Preambolo

  Parole-chiave: DNS, bind, bind-4, bind-8, named, dialup, ppp, slip,
  isdn, Internet, domain, name, hosts, resolving, caching.


  Questo documento fa parte del Linux Documentation Project.


  1.1.  Note legali

  (C)opyright 1995-1999 Nicolai Langfeldt. Do not modify without
  amending copyright, distribute freely but retain copyright message.


  (C)opyright 1995-1999 Nicolai Langfeldt. Non modificare senza emendare
  il copyright, si pu distribuire liberamente ma includendo il
  messaggio di copyright.


  1.2.  Crediti e richieste di aiuto

  Voglio ringraziare Arnt Gulbrandsen al quale ho provocato qualche
  disagio a causa di questo lavoro e che ha provveduto a fornire utili
  suggerimenti. Voglio anche ringraziare le numerose persone che mi
  hanno mandato in email suggerimenti e note.




  Questo non sar mai un documento finito. Vi prego di mandarmi delle
  email se avete incontrato problemi o successi, questo contribuir a
  migliorare l'HOWTO. Cos vi prego di mandare commenti e/o domande o
  soldi a janl@math.uio.no. Nel caso in cui mandaste delle email e
  attendiate delle risposte per favore assicuratevi che il return-
  address sia corretto e operatvo.  Inoltre, per favore leggete la
  sezione ``Domande e risposte'' prima di scrivermi. Un'altra cosa,
  comprendo solo il norvegese e l'inglese.


  Se vi venisse in mente di tradurre questo HOWTO fatemelo sapere in
  modo che possa tener traccia delle lingue in cui  stato pubblicato, e
  in modo che possa avvisarvi quando l'HOWTO  stato aggiornato.


  1.3.  Dediche

  Questo HOWTO  dedicato a Anne Line Norheim Langfeldt. Anche se lei
  non lo legger mai poich non  quel tipo di ragazza.


  2.  Introduzione

  DNS  il Domain Name System. DNS converte i nomi delle macchine negli
  indirizzi IP che queste macchine hanno nella rete. In pratica fa
  corrispondere i nomi agli indirizzi e viceversa, e in pi fa qualche
  altra cosa. Questo HOWTO spiega come definire questa corrispondenza
  (mapping) usando un sistema Linux. Il "mapping"  semplicemente
  un'associazione tra due cose, in questo caso si tratta del nome di una
  macchina, come ftp.linux.org, e il numero IP (o indirizzo) della
  stessa macchina 199.249.150.4.


  DNS , per i non iniziati (voi ;-), una delle aree pi opache
  dell'amministrazione di rete. Questo HOWTO cercher di rendere pi
  chiare alcune cose. Esso descrive come impostare un semplice name
  server DNS. Partendo da un server "caching only" per poi avviarsi
  all'impostazione di un server DNS primario per un dominio. Per
  configurazioni pi complesse date uno sguardo alla sezione ``Domande e
  Risposte'' di questo documento. Se non fosse descritto qui avrete
  bisogno di leggere la Vera Documentazione.  Torner pi tardi su in
  che cosa consista questa Vera Documentazione nell'``ultimo capitolo''


  Prima che cominciate dovrete configurare la vostra macchina in modo
  che possa fare "telnet" dentro e fuori di essa, e che possa
  connettersi con successo alla rete, e in particolar modo dovreste
  poter fare telnet 127.0.0.1 e ottenere la vostra stessa macchina
  (provate subito!). Avrete anche bisogno di un buon /etc/nsswitch.conf
  (oppure /etc/host.conf), e dei file /etc/resolv.conf e /etc/hosts come
  punto di partenza, finch non spiegher la loro funzione. Se non avete
  gi tutto questo impostato e funzionante il NET-3-HOWTO e il PPP-HOWTO
  spiegano come farlo. Leggeteli.


  Quando dico "la vostra macchina" intendo la macchina sulla quale state
  cercando di impostare il DNS. Nessun'altra macchina che potreste avere
   coinvolta nel vostro lavoro.


  Assumer che non siate dietro un qualche tipo di firewall che blocca
  le richieste di nomi. Se invece lo siete, avrete bisogno di una
  speciale configurazione. Guardate la sezione ``Domande e Risposte''.


  Il servizio di risoluzione dei nomi su Unix  fatto da un programma
  chiamato named. Questo fa parte del pacchetto ``bind'' che 
  coordinato da Paul Vixie dell'Internet Software Consortium. Named 
  incluso in molte distribuzioni Linux e usualmente  installato come
  /usr/sbin/named. Se avete named probabilmente potrete usarlo; se non
  l'avete potrete prendere i binari da un qualunque sito ftp su Linux,
  altrimenti prenderete i pi recenti e grandiosi sorgenti da
  ftp.isc.org:/isc/bind/src/cur/bind-8/. Questo HOWTO  riferito alla
  versione 8 di bind. Le vecchie versioni dell'HOWTO che riferiscono a
  bind 4 sono ancora disponibili presso
  http://www.math.uio.no/~janl/DNS/ nel caso utilizzaste bind 4.  Se la
  man page di named fa riferimento (per precisione alla fine, nella
  sezione FILES) a named.conf avete bind 8, se fa riferimento a
  named.boot avete bind 4. Se avete il 4 e siete coscienti del problema
  sicurezza dovreste aggiornare alla versione 8.


  DNS  un database distribuito sulla rete (net-wide). Fate attenzione a
  cosa ci metterete dentro. Se ci metterete spazzatura, voi e gli altri
  ne ricaverete solo quella. Mantenete il vostro DNS snello e
  consistente e cos otterrete un buon servizio da esso. Imparate ad
  usarlo, ad amministrarlo, a risolverne eventuali problemi, e
  diventerete un altro buon amministratore che impedisce alla rete di
  cadere sulle proprie ginocchia a causa della cattiva manutenzione.


  In questo documento dichiaro nettamente una manciata di cose che non
  sono prorpio corrette (sono comunque delle mezze verit). Tutto ci
  nell'interesse della semplificazione. Le cose, probabilmente ;-)
  funzioneranno se crederete a quello che dico.
  Suggerimento: Fate una copia di backup di tutti i file che vi chieder
  di modificare e che gi avete, cosicch possiate tornare operativi
  dopo aver visto che nulla funzionava.


  3.  Un name server caching only

  Una prima pugnalata alla configurazione del DNS, molto utile per gli
  utenti dial-up


  Un name server caching only trover le risposte alle richieste di nomi
  e ricorder le risposte quando la prossima volta ne avrete bisogno.
  Questo abbrevier signficativamente il tempo di attesa per le volte
  successive, specialmente se avete una connessione lenta.


  Prima di tutto vi occorre un file chiamato /etc/named.conf.  Questo
  viene letto quando named parte. Per adesso dovrebbe contenere
  semplicemente:


  ______________________________________________________________________
  // File di configurazione per un name server caching only

  options {
          directory "/var/named";

          // Decommentatare questa cosa potrebbe aiutare se di deve passare
          // attraverso un firewall e le cose non funzionano bene

          // query-source port 53;
  };

  zone "." {
          type hint;
          file "root.hints";
  };

  zone "0.0.127.in-addr.arpa" {
          type master;
          file "pz/127.0.0";
  };
  ______________________________________________________________________




  La linea `directory' dice a named dove guardare per i file.  Tutti i
  file nominati in seguito saranno relativi a questa directory.  Perci
  pz  una directory sotto /var/named, ovvero /var/named/pz. /var/named
   la giusta directory in accordo con il Linux File system Standard.


  In questo  citato il file chiamato /var/named/root.hints.
  /var/named/root.hints dovrebbe contenere questo: (Se avete intenzione
  di fare copia e incolla di questo file da una versione elettronica di
  questo documento per favore notate che non ci devono essere spazi
  vuoti all'inizio del file, ovvero tutte le linee devono cominciare con
  un carattere non-blank (non deve essere il carattere "spazio").
  Alcuni software per il processing dei documenti inseriranno spazi
  all'inizio delle linee, causando confusione. In questo caso rimuovete
  i 2 spazi vuoti iniziali)



  ______________________________________________________________________
  ;
  ; There might be opening comments here if you already have this file.
  ; If not don't worry.
  ;
  .                     6D IN NS        G.ROOT-SERVERS.NET.
  .                     6D IN NS        J.ROOT-SERVERS.NET.
  .                     6D IN NS        K.ROOT-SERVERS.NET.
  .                     6D IN NS        L.ROOT-SERVERS.NET.
  .                     6D IN NS        M.ROOT-SERVERS.NET.
  .                     6D IN NS        A.ROOT-SERVERS.NET.
  .                     6D IN NS        H.ROOT-SERVERS.NET.
  .                     6D IN NS        B.ROOT-SERVERS.NET.
  .                     6D IN NS        C.ROOT-SERVERS.NET.
  .                     6D IN NS        D.ROOT-SERVERS.NET.
  .                     6D IN NS        E.ROOT-SERVERS.NET.
  .                     6D IN NS        I.ROOT-SERVERS.NET.
  .                     6D IN NS        F.ROOT-SERVERS.NET.

  G.ROOT-SERVERS.NET.     5w6d16h IN A    192.112.36.4
  J.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.10
  K.ROOT-SERVERS.NET.     5w6d16h IN A    193.0.14.129
  L.ROOT-SERVERS.NET.     5w6d16h IN A    198.32.64.12
  M.ROOT-SERVERS.NET.     5w6d16h IN A    202.12.27.33
  A.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.4
  H.ROOT-SERVERS.NET.     5w6d16h IN A    128.63.2.53
  B.ROOT-SERVERS.NET.     5w6d16h IN A    128.9.0.107
  C.ROOT-SERVERS.NET.     5w6d16h IN A    192.33.4.12
  D.ROOT-SERVERS.NET.     5w6d16h IN A    128.8.10.90
  E.ROOT-SERVERS.NET.     5w6d16h IN A    192.203.230.10
  I.ROOT-SERVERS.NET.     5w6d16h IN A    192.36.148.17
  F.ROOT-SERVERS.NET.     5w6d16h IN A    192.5.5.241
  ______________________________________________________________________




  Questo file descrive i root name server nel mondo. Esso cambia col
  tempo e deve essere aggiornato se necessario. Leggete la sezione
  ``Manutenzione'' per sapere come fare.



  La sezione successiva in named.conf  l'ultima zone.  Spiegher il suo
  utilizzo nell'ultimo capitolo, per adesso create solo un file chiamato
  127.0.0 nella subdirectory pz: (Ancora, se fate copia e incolla
  rimuovete gli spazi iniziali)


  ______________________________________________________________________
  @               IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                                  1       ; Serial
                                  8H      ; Refresh
                                  2H      ; Retry
                                  1W      ; Expire
                                  1D)     ; Minimum TTL
                          NS      ns.linux.bogus.
  1                       PTR     localhost.
  ______________________________________________________________________




  Poi, avrete bisogno di un /etc/resolv.conf che somiglia vagamente a
  questo: (togliete gli spazi!)

  ______________________________________________________________________
  search sottodominio.proprio-dominio.edu proprio-dominio.edu
  nameserver 127.0.0.1
  ______________________________________________________________________




  La linea `search' specifica su quali domini deve avvenire la ricerca
  per ogni nome di host al quale volete collegarvi. La linea nameserver
  specifica l'indirizzo del vostro nameserver, in questo caso la vostra
  stessa macchina poich  qui che named lavora (127.0.0.1  corretto,
  non importa se la macchina ha gi un altro indirizzo). Se volete
  inserire pi name server mettete una linea `nameserver' per ognuno di
  essi. (Nota: named non legge mai questo file, il risolutore che usa
  named invece s.)


  Vediamo cosa fa questo file: se un client cerca la macchina pippo,
  allora il primo tentativo che verr fatto sar
  pippo.sottodominio.proprio-dominio.edu, poi pippo.proprio-dominio.edu
  e infine pippo. Se un client cerca sunsite.unc.edu, il primo tentativo
  sar sunsite.unc.edu.sottodominio.proprio-dominio.edu, poi
  sunsite.unc.edu.proprio-dominio.edu e infine sunsite.unc.edu. Potreste
  non voler mettere troppi domini nella linea di ricerca, si impiega del
  tempo a provarli tutti.


  L'esempio assume che voi facciate parte del dominio
  sottodominio.proprio-dominio.edu, quindi, probabilmente, la vostra
  macchina sar propria-macchina.sottodominio.proprio-dominio.edu. La
  linea di ricerca non dovrebbe contenere il vostro TLD (Top Level
  Domain, `edu' in questo caso). Se avete spesso bisogno di collegarvi a
  host in un altro dominio, potete aggiungere questo dominio in una
  linea di ricerca come questa: (Ricordate di togliere gli spazi
  iniziali, se presenti)


  ______________________________________________________________________
  search sottodominio.proprio-dominio.edu proprio-dominio.edu altro-dominio.com
  ______________________________________________________________________



  e cos via. Ovviamente dovrete metterci domini reali.  Per favore
  notate l'assenza del punto alla fine dei nomi di dominio.  Questo 
  importante.


  In seguito, a seconda della versione di libc che avete ci sar bisogno
  di sistemare /etc/nsswitch.conf o /etc/host.conf.  Se avete gi
  nsswitch.conf sar questo che sistemerete, altrimenti sar host.conf.


  /etc/nsswitch.conf


  Questo  un grosso file che specifica dove ottenere diversi tipi di
  dati, da quale file o database. Solitamente all'inizio contiene utili
  commenti, che dovreste leggere. Poi cercate la linea che comincia per
  `hosts:', si dovrebbe leggere:





  ______________________________________________________________________
  hosts:      files dns
  ______________________________________________________________________



  (avete ricordato cosa fare degli eventuali spazi iniziali, vero? non
  lo dir pi.)


  Se non ci fosse una tale linea (che comincia per `hosts:') dovrete
  metterla. Questa linea dice che i programmi devono per prima cosa
  guardare nel file /etc/hosts, dopo devono usare il DNS in accordo con
  resolv.conf.


  /etc/host.conf


  Probabilmente contiene numerose linee, una di queste dovrebbe
  cominciare con order e somigliare a questa:


  ______________________________________________________________________
  order hosts,bind
  ______________________________________________________________________




  Se la linea `order' non ci fosse la dovrete aggiungere. Questa linea
  dice alle routine predisposte alla risoluzione dei nomi che devono per
  prima cosa guardare nel file /etc/hosts, dopo devono chiedere al name
  server (che voi avete indicato in resolv.conf all'indirizzo
  127.0.0.1).


  3.1.  Far partire named

  Adesso  ora di far partire named. Se state usando una connessione
  dial-up, per prima cosa collegatevi. Fate `ndc start', e premete
  return, senza opzioni. Se non funziona provate `/usr/sbin/ndc start'.
  Se non va leggete la sezione ``Domande e Risposte''. Se andate a
  leggere il file che contiene il log di sistema (usualmente chiamato
  /var/adm/messages, controllate anche la directory /var/log e un altro
  file da controllare in questa  syslog) quando named parte (fate tail
  -f /var/log/messages) dovreste leggere qualcosa di simile a:


  (le linee che terminano per \ continuano sulla linea successiva)



       Feb 15 01:26:17 roke named[6091]: starting.  named 8.1.1 Sat Feb 14 \
         00:18:20 MET 1998 ^Ijanl@roke.uio.no:/var/tmp/bind-8.1.1/src/bin/named
       Feb 15 01:26:17 roke named[6091]: cache zone "" (IN) loaded (serial 0)
       Feb 15 01:26:17 roke named[6091]: master zone "0.0.127.in-addr.arpa" \
         (IN) loaded (serial 1)
       Feb 15 01:26:17 roke named[6091]: listening [127.0.0.1].53 (lo)
       Feb 15 01:26:17 roke named[6091]: listening [129.240.230.92].53 (ippp0)
       Feb 15 01:26:17 roke named[6091]: Forwarding source address is [0.0.0.0].1040
       Feb 15 01:26:17 roke named[6092]: Ready to answer queries.




  Se ci sono messaggi d'errore significa che c' un problema.  Named
  dir il nome del file scorretto (uno tra named.conf e root.hints spero
  :-)). Uccidete named e tornate indietro per controllare quel file.


  Adesso potete testare la vostra configurazione. Usate nslookup per
  esaminare il vostro lavoro.



       $ nslookup
       Default Server:  localhost
       Address:  127.0.0.1

       >





  Se corrisponde a quello che vedete significa che sta funzionando.
  Altrimenti tornate indietro e ricontrollate tutto. Ogni volta che
  cambiate il file named.conf dovete far ripartire named con il comando
  ndc restart.


  Adesso potete immettere una interrogazione (query). Cercate di fare il
  look-up di macchine vicine a voi. pat.uio.no  vicina a me,
  all'universit di Oslo:



       > pat.uio.no
       Server:  localhost
       Address:  127.0.0.1

       Name:    pat.uio.no
       Address:  129.240.130.16





  nslookup adesso ha chiesto al vostro named di cercare la macchina
  pat.uio.no. Poi contatta una delle macchine name server indicate nel
  file root.hints, e chiede loro la strada per arrivarci.  Potrebbe
  essere necessario un po' di tempo prima che sia disponibile il
  risultato, come potrebbe essere necessario cercare in tutti i domini
  elencati in /etc/resolv.conf.


  Se lo chiederete nuovamente otterrete questo:



       > pat.uio.no
       Server:  localhost
       Address:  127.0.0.1

       Non-authoritative answer:
       Name:    pat.uio.no
       Address:  129.240.2.50




  Notate la linea ``Non-authoritative answer:'' che abbiamo ottenuto
  questa volta. Significa che named non  uscito sulla rete per fare la
  richiesta: l'informazione era gi nella cache. Ma questa informazione
  (memorizzata nella cache) potrebbe essere non aggiornata (scaduta).
  Verrete informati di questa possibilit (molto piccola) con il
  messaggio `Non-authorative answer:'. Quando nslookup risponde in
  questo modo alla seconda richiesta per uno stesso host  sicuro che
  named ha messo nella cache l'informazione e che sta funzionando. Si
  esce da nslookup dando il comando `exit'.


  3.2.  Migliorarlo ancora

  Nelle reti grosse, ben organizzate, accademiche o relative a ISP
  (Internet Service Provider) scoprirete che a volte le persone che
  lavorano sulla rete mettono a punto una gerarchia di impiego dei
  server DNS, che aiuta ad alleggerire il carico sulla rete interna e
  sui server esterni. Non  facile capire se vi trovate dentro o fuori
  una rete.  Comunque non  importante e usando il server DNS del vostro
  provider come ``forwarder''  farete in modo che le risposte alle
  vostre richieste siano pi veloci e meno pesanti per la vostra rete.
  Se usate un modem questa pu essere una piccola vittoria. Tanto per
  fare un esempio assumeremo che il vostro provider di rete (network
  provider) abbia due name server e che voglia farveli usare, con numeri
  IP 10.0.0.1 e 10.1.0.1. Allora nel vostro file named.conf, all'interno
  della sezione d'apertura chiamata ``options'' inserite queste linee:


  ______________________________________________________________________
             forward first;
             forwarders {
                  10.0.0.1;
                  10.1.0.1;
              };
  ______________________________________________________________________




  C' anche un trucco carino per le macchine dial-up che usano i
  forwarder,  descritto nella sezione ``Domande e Risposte''.


  Fate ripartire il vostro name server e testatelo con nslookup.
  Dovrebbe funzionare bene.


  3.3.  Congratulazioni

  Adesso sapete come impostare una versione con cache di named.
  Prendetevi una birra, del latte o qualunque cosa vi piaccia per
  celebrare l'evento.


  4.  Un semplice  dominio

  4.1.  Ma prima un po' di teoria

  Prima di iniziare veramente con questa sezione vi proporr un po' di
  teoria e un esempio su come il DNS lavora. E voi dovrete leggerlo
  perch vi sar utile. Se non ne avete voglia dovrete almeno dargli uno
  sguardo veloce. Fate invece attenzione alle parti che dovrebbero
  andare nel vostro file named.conf.



  DNS  un sistema gerarchico, strutturato ad albero. L'apice  indicato
  come `.' e pronunciato `root'. Al di sotto di . c' un gran numero di
  Top Level Domains (TLD), i pi noti sono ORG, COM, EDU and NET, ma ce
  ne sono molti altri. Proprio come in un albero esso ha la radice e si
  dirama verso l'esterno. Se avete qualche conoscenza d'informatica
  riconoscerete nel DNS un albero di ricerca, e scoprirete nodi, nodi-
  foglia e spigoli.


  Quando comincia la ricerca di una macchina la richiesta procede
  ricorsivamente nella gerarchia, iniziando dall'apice. Se volete
  trovare prep.ai.mit.edu il vostro name server dovr prima scoprire
  quale name server gestisce edu. Esso dunque chiede a uno dei .  server
  (sa gi quali sono i server .  ,  a questo che serve il file
  root.hints), e il . fornisce una lista dei server edu:



       $ nslookup
       Default Server:  localhost
       Address:  127.0.0.1





  Iniziate a interrogare un name server:



       > server c.root-servers.net.
       Default Server:  c.root-servers.net
       Address:  192.33.4.12




  Impostate il tipo di interrogazione (query type) su NS (name server
  records):



       > set q=ns




  interrogate su edu:



       > edu.




  Il . finale qui  significativo, dice a nslookup che la nostra
  richiesta  relativa a edu  direttamente sotto a . (e non sotto un
  altro dominio presente nel search, questo velocizza la ricerca)







  edu     nameserver = A.ROOT-SERVERS.NET
  edu     nameserver = H.ROOT-SERVERS.NET
  edu     nameserver = B.ROOT-SERVERS.NET
  edu     nameserver = C.ROOT-SERVERS.NET
  edu     nameserver = D.ROOT-SERVERS.NET
  edu     nameserver = E.ROOT-SERVERS.NET
  edu     nameserver = I.ROOT-SERVERS.NET
  edu     nameserver = F.ROOT-SERVERS.NET
  edu     nameserver = G.ROOT-SERVERS.NET
  A.ROOT-SERVERS.NET      internet address = 198.41.0.4
  H.ROOT-SERVERS.NET      internet address = 128.63.2.53
  B.ROOT-SERVERS.NET      internet address = 128.9.0.107
  C.ROOT-SERVERS.NET      internet address = 192.33.4.12
  D.ROOT-SERVERS.NET      internet address = 128.8.10.90
  E.ROOT-SERVERS.NET      internet address = 192.203.230.10
  I.ROOT-SERVERS.NET      internet address = 192.36.148.17
  F.ROOT-SERVERS.NET      internet address = 192.5.5.241
  G.ROOT-SERVERS.NET      internet address = 192.112.36.4





  Questo significa che tutti i server ROOT-SERVERS.NET risolvono EDU.,
  cos potremo interrogare uno qualunque di essi. Continueremo a usare
  il C. Adesso vogliamo sapere chi risolve il prossimo livello del
  nostro nome di dominio: mit.edu.:



       > mit.edu.
       Server:  c.root-servers.net
       Address:  192.33.4.12

       Non-authoritative answer:
       mit.edu nameserver = W20NS.mit.edu
       mit.edu nameserver = BITSY.mit.edu
       mit.edu nameserver = STRAWB.mit.edu

       Authoritative answers can be found from:
       W20NS.mit.edu   internet address = 18.70.0.160
       BITSY.mit.edu   internet address = 18.72.0.3
       STRAWB.mit.edu  internet address = 18.71.0.151




  steawb, w20ns e bitsy risolvono mit.edu, ne sceglieremo uno e lo
  interrogheremo sul prossimo livello ancora: ai.mit.edu:



       > server W20NS.mit.edu.




  I nomi di host non sono case sensitive, ma io uso il mouse per
  tagliare e incollare cos come vengono dallo schermo.







  Server:  W20NS.mit.edu
  Address:  18.70.0.160

  > ai.mit.edu.
  Server:  W20NS.mit.edu
  Address:  18.70.0.160

  Non-authoritative answer:
  ai.mit.edu      nameserver = ALPHA-BITS.AI.MIT.EDU
  ai.mit.edu      nameserver = GRAPE-NUTS.AI.MIT.EDU
  ai.mit.edu      nameserver = TRIX.AI.MIT.EDU
  ai.mit.edu      nameserver = MUESLI.AI.MIT.EDU
  ai.mit.edu      nameserver = LIFE.AI.MIT.EDU
  ai.mit.edu      nameserver = BEET-CHEX.AI.MIT.EDU
  ai.mit.edu      nameserver = MINI-WHEATS.AI.MIT.EDU
  ai.mit.edu      nameserver = COUNT-CHOCULA.AI.MIT.EDU
  ai.mit.edu      nameserver = MINTAKA.LCS.MIT.EDU

  Authoritative answers can be found from:
  AI.MIT.EDU      nameserver = ALPHA-BITS.AI.MIT.EDU
  AI.MIT.EDU      nameserver = GRAPE-NUTS.AI.MIT.EDU
  AI.MIT.EDU      nameserver = TRIX.AI.MIT.EDU
  AI.MIT.EDU      nameserver = MUESLI.AI.MIT.EDU
  AI.MIT.EDU      nameserver = LIFE.AI.MIT.EDU
  AI.MIT.EDU      nameserver = BEET-CHEX.AI.MIT.EDU
  AI.MIT.EDU      nameserver = MINI-WHEATS.AI.MIT.EDU
  AI.MIT.EDU      nameserver = COUNT-CHOCULA.AI.MIT.EDU
  AI.MIT.EDU      nameserver = MINTAKA.LCS.MIT.EDU
  ALPHA-BITS.AI.MIT.EDU   internet address = 128.52.32.5
  GRAPE-NUTS.AI.MIT.EDU   internet address = 128.52.36.4
  TRIX.AI.MIT.EDU internet address = 128.52.37.6
  MUESLI.AI.MIT.EDU       internet address = 128.52.39.7
  LIFE.AI.MIT.EDU internet address = 128.52.32.80
  BEET-CHEX.AI.MIT.EDU    internet address = 128.52.32.22
  MINI-WHEATS.AI.MIT.EDU  internet address = 128.52.54.11
  COUNT-CHOCULA.AI.MIT.EDU        internet address = 128.52.38.22
  MINTAKA.LCS.MIT.EDU     internet address = 18.26.0.36





  Quindi muesli.ai.mit.edu  un nameserver per ai.mit.edu:



       > server MUESLI.AI.MIT.EDU
       Default Server:  MUESLI.AI.MIT.EDU
       Address:  128.52.39.7





  Adesso cambio il tipo di interrogazione (query): abbiamo trovato il
  name server e quindi vogliamo chiedere tutto ci che muesli sa a
  proposito di prep.ai.mit.edu.









  > set q=any
  > prep.ai.mit.edu.
  Server:  MUESLI.AI.MIT.EDU
  Address:  128.52.39.7

  prep.ai.mit.edu CPU = dec/decstation-5000.25    OS = unix
  prep.ai.mit.edu
          inet address = 18.159.0.42, protocol = tcp
            ftp  telnet  smtp  finger
  prep.ai.mit.edu preference = 1, mail exchanger = gnu-life.ai.mit.edu
  prep.ai.mit.edu internet address = 18.159.0.42
  ai.mit.edu      nameserver = beet-chex.ai.mit.edu
  ai.mit.edu      nameserver = alpha-bits.ai.mit.edu
  ai.mit.edu      nameserver = mini-wheats.ai.mit.edu
  ai.mit.edu      nameserver = trix.ai.mit.edu
  ai.mit.edu      nameserver = muesli.ai.mit.edu
  ai.mit.edu      nameserver = count-chocula.ai.mit.edu
  ai.mit.edu      nameserver = mintaka.lcs.mit.edu
  ai.mit.edu      nameserver = life.ai.mit.edu
  gnu-life.ai.mit.edu     internet address = 128.52.32.60
  beet-chex.ai.mit.edu    internet address = 128.52.32.22
  alpha-bits.ai.mit.edu   internet address = 128.52.32.5
  mini-wheats.ai.mit.edu  internet address = 128.52.54.11
  trix.ai.mit.edu internet address = 128.52.37.6
  muesli.ai.mit.edu       internet address = 128.52.39.7
  count-chocula.ai.mit.edu        internet address = 128.52.38.22
  mintaka.lcs.mit.edu     internet address = 18.26.0.36
  life.ai.mit.edu internet address = 128.52.32.80





  E cos partendo da . abbiamo scoperto i name server successivi per
  ogni livello nel nome di dominio. Se usavate il vostro server DNS
  invece di tutti questi altri, il vostro named avrebbe naturalmente
  messo nella propria cache tutte le informazioni trovate durante la
  ricerca, e per un bel pezzo non le avrebbe pi richieste.


  Nell'analogo albero ogni ``.'' del nome rappresenta un punto di
  diramazione. E le parti che stanno tra i ``.'' sono i nomi dei singoli
  rami dell'albero.


  Abbiamo scalato l'albero scegliendo un nome a piacere
  (prep.ai.mit.edu), prima abbiamo scoperto la radice (.) e poi siamo
  andati alla ricerca del prossimo ramo da scalare, nel nostro caso edu.
  Una volta trovato questo, l'abbiamo scalato passando per il server che
  conosceva questa parte di nome. Dopo abbiamo ricercato il ramo mit
  sopra il ramo edu (per avere mit.edu) e abbiamo scalato anch'esso
  sfruttando il server che conosceva mit.edu.  Ancora, abbiamo cercato
  ai.mit.edu come prossimo ramo, e per scalarlo abbiamo sfruttato il
  server che lo conosceva. Adesso siamo arrivati al giusto server, al
  giusto punto di diramazione. L'ultimo passo da fare  scoprire
  prep.ai.mit.edu, ma  molto semplice. In informatica solitamente si
  dice che prep  una foglia dell'albero.



  Un dominio poco discusso in precedenza  in-addr.arpa.  Anch'esso 
  gestito come i domini normali. in-addr.arpa ci permette di ricavare il
  nome dell'host quando abbiamo il suo indirizzo.  Una cosa importante
  da notare qua  che gli indirizzi IP sono scritti in ordine inverso
  nel dominio in-addr.arpa. Se avete un indirizzo di una macchina:
  192.128.52.43 named procede come nell'esempio prep.ai.mit.edu: scopre
  il server arpa.. Scopre il server in-addr.arpa., scopre il server
  192.in-addr.arpa., scopre il server 128.192.in-addr.arpa., scopre il
  server 52.128.192.in-addr.arpa.. Scopre i record richiesti per
  ricavare il nome di 43.52.128.192.in-addr.arpa..  Geniale ehh?? (dite
  `S') Tuttavia, a livello teorico, la conversione dei numeri potr
  risultare difficoltosa per anni.


  Ho detto una bugia. DNS non funziona precisamente come ho descritto.
  Ma comunque in maniera simile a questa.


  4.2.  Il nostro dominio

  Adesso definiremo il nostro dominio. Stiamo per creare il dominio
  linux.bogus e per definire le macchine in esso. Utilizzo nomi di
  dominio completamente fasulli per essere sicuro di non disturbare
  nessuno. (Nessuno l fuori.)


  Un'ultima cosa prima di iniziare: non tutti i caratteri sono permessi
  nei nomi degli host. Siamo limitati ai caratteri dell'alfabeto
  inglese: a-z, numeri: 0-9 e al carattere '-' (dash, trattino).
  Ricordatevelo. Maiuscole e minuscole hanno lo stesso valore per il
  DNS, cos pat.uio.no  identico a Pat.UiO.No.



  Abbiamo gi iniziato questa parte con questa linea in named.conf:


  ______________________________________________________________________
  zone "0.0.127.in-addr.arpa" {
          type master;
          file "pz/127.0.0";
  };
  ______________________________________________________________________




  Per favore notate in questo file l'assenza del `.' alla fine dei nomi
  del dominio. Questo significa che ora definiremo la zona 0.0.127.in-
  addr.arpa, che siamo il master server per essa e che essa  descritta
  nel file chiamato pz/127.0.0. Abbiamo gi impostato questo file:


  ______________________________________________________________________
  @               IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                                  1       ; Serial
                                  8H      ; Refresh
                                  2H      ; Retry
                                  1W      ; Expire
                                  1D)     ; Minimum TTL
                          NS      ns.linux.bogus.
  1                       PTR     localhost.
  ______________________________________________________________________




  Per favore notate in questo file il `.' alla fine di tutti i nomi di
  dominio completi, in contrasto col file named.conf di prima. Alcune
  persone hanno l'abitudine di iniziare ogni file relativo a una zona
  con una direttiva $ORIGIN, ma questo  superfluo.  L'origine (che
  appartiene alla gerarchia del DNS) di un file zona  specificata nella
  sezione delle zone nel file named.conf, in questo caso  0.0.127.in-
  addr.arpa.


  Questo `file di zona' contiene 3 `record di risorse' (RR): un RR SOA,
  un RR NS e un RR PTR. SOA  l'acronimo di Start Of Authority (Inizio
  dell'Autorit). La `@'  una notazione speciale che indica l'origine,
  e poich la colonna `dominio' di questo file dice 0.0.127.in-addr.arpa
  la prima linea in realt significa:



       0.0.127.in-addr.arpa.   IN      SOA ...






  NS  il RR Name Server. Non c' la '@' all'inizio di questa linea: 
  implicita perch l'ultima linea comincia con la '@'. Questo fa
  risparmiare un po' di battute sulla tastiera. In questo modo la line
  NS pu essere scritta:



       0.0.127.in-addr.arpa.   IN      NS      ns.linux.bogus





  Essa dice al DNS quale macchina  il name server per il dominio
  0.0.127.in-addr.arpa:  appunto ns.linux.bogus.  consuetudine
  associare a `ns' la parola name server, analogamente ai web server che
  di solito sono associati a www.qualcosa; il nome pu per essere
  qualunque.

  E alla fine il record PTR dice che l'host all'indirizzo 1 nella
  sottorete tt/0.0.127.in-addr.arpa/, ovvero 127.0.0.1  chiamato
  localhost.


  Il record SOA  il preambolo di tutti i file di zona, e deve esisterne
  esattamente uno in ogni file di zona. Questo record descrive la zona,
  da dove esso viene (una macchina chiamata ns.linux.bogus), chi 
  responsabile per i suoi contenuti (hostmaster@linux.bogus, dovrete
  inserire il vostro indirizzo e-mail qui), quale  la versione del file
  di zona (serial: 1), e altre cose che riguardano il server DNS
  secondario o quello che fa da cache. Per il resto dei campi (refresh,
  retry, expire e minimum) usate pure i valori indicati in questo HOWTO
  e sarete a posto.


  Adesso fate ripartire named (il comando  ndc restart) e usate
  nslookup per esaminare cosa avete fatto:










  $ nslookup

  Default Server:  localhost
  Address:  127.0.0.1

  > 127.0.0.1
  Server:  localhost
  Address:  127.0.0.1

  Name:    localhost
  Address:  127.0.0.1




  si ottiene localhost da 127.0.0.1, bene. Ora per il nostro scopo
  principale, il dominio linux.bogus, inserite una nuova 'zona' in
  named.conf:


  ______________________________________________________________________
  zone "linux.bogus" {
          notify no;
          type master;
          file "pz/linux.bogus";
  };
  ______________________________________________________________________




  Notate ancora l'assenza del `.' finale nel nome del dominio nel file
  named.conf.


  Nel file di zona linux.bogus metteremo dei dati completamente fasulli:


  ______________________________________________________________________
  ;
  ; File di zona per linux.bogus
  ;
  ; File di zona completo
  ;
  @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                          199802151       ; numero di serie, data di oggi + # di serie di oggi
                          8H              ; refresh, secondi
                          2H              ; retry, secondi
                          1W              ; expire, secondi
                          1D )            ; minimum, secondi
  ;
                  NS      ns              ; Indirizzo Inet del name server
                  MX      10 mail.linux.bogus     ; Mail Exchanger Primario
                  MX      20 mail.friend.bogus.   ; Mail Exchanger Secondario
  ;
  localhost       A       127.0.0.1
  ns              A       192.168.196.2
  mail            A       192.168.196.4
  ______________________________________________________________________




  Bisogna notare due cose a proposito del record SOA. ns.linux.bogus
  deve essere una macchina effettiva con un record A. Non  legale avere
  un record CNAME per la macchina indicata nel record SOA. Il suo nome
  non deve essere per forza `ns', pu essere un qualsiasi nome legale di
  host. La seconda cosa, hostmaster.linux.bogus deve essere interpretato
  come hostmaster@linux.bogus, questo dovr essere un alias per un
  indirizzo email vero, o una mailbox, purch la/le persona/e che
  mantengono il DNS leggano la posta frequentemente.  Ogni mail che
  riguarda il dominio sar spedita all'indirizzo indicato in questo
  record. Il nome non deve essere per forza `hostmaster', potr essere
  un normale indirizzo email, di solito ci si aspetta che `hostmaster'
  funzioni a dovere (cio che la posta indirizzata ad esso arrivi da
  qualche parte).


  C' un nuovo tipo di RR in questo file, MX o RR Mail eXchanger.  Esso
  indica ai sistemi adibiti allo smistamento della posta dove mandarla,
  quando  ad esempio indirizzata a qualcuno@linux.bogus; nel nostro
  caso si tratta di mail.linux.bogus o mail.friend.bogus.  Il numero che
  precede ogni nome di macchina indica la priorit del RR MX. Il RR con
  il numero pi basso (10)  quello che indica il mail server al quale,
  se possibile, deve essere mandata la posta per primo.  Se non
  funzionasse la posta potr essere spedita a un server con un numero
  pi alto, un mail server secondario, ovvero mail.friend.bogus che
  appunto ha priorit 20 nel nostro caso.


  Fate ripartire named con ndc restart. Esaminate i risultati con
  nslookup:



       $ nslookup
       > set q=any
       > linux.bogus
       Server:  localhost
       Address:  127.0.0.1

       linux.bogus
               origin = ns.linux.bogus
               mail addr = hostmaster.linux.bogus
               serial = 199802151
               refresh = 28800 (8 hours)
               retry   = 7200 (2 hours)
               expire  = 604800 (7 days)
               minimum ttl = 86400 (1 day)
       linux.bogus     nameserver = ns.linux.bogus
       linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus
       linux.bogus     preference = 20, mail exchanger = mail.friend.bogus
       linux.bogus     nameserver = ns.linux.bogus
       ns.linux.bogus  internet address = 192.168.196.2
       mail.linux.bogus        internet address = 192.168.196.4





  Con un accurato esame scoprirete un bug (un errore). La linea



       linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus




   sbagliata. Dovrebbe essere:


       linux.bogus     preference = 10, mail exchanger = mail.linux.bogus





  Ho deliberatamente fatto quest'errore in modo che impariate da esso
  :-). Cercando nel file di zona scopriremo che alla linea



                       MX      10 mail.linux.bogus     ; Mail Exchanger Primario




  manca un punto. Oppure che ha un 'linux.bogus' di troppo. Se un nome
  di macchina non finisce con il punto nel file di zona, l'origine viene
  aggiunta alla sua fine causando il doppione linux.bogus.linux.bogus.
  Dunque sia:


  ______________________________________________________________________
                  MX      10 mail.linux.bogus.    ; Mail Exchanger Primario
  ______________________________________________________________________



  oppure


  ______________________________________________________________________
                  MX      10 mail                 ; Mail Exchanger Primario
  ______________________________________________________________________



   corretto. Io preferisco il secondo modo perch  pi breve da
  scrivere. Ci sono alcuni esperti di bind che non approvano, altri
  invece s. Quindi in un file di zona il dominio dovrebbe essere
  scritto per intero e fatto terminare da un `.' o dovrebbe essere
  escluso del tutto, in questo caso verrebbe sostituito dall'origine.


  Devo stressarvi con la storia del file named.conf, non ci devono
  essere `.' alla fine dei nomi di dominio. Non avete idea di quante
  volte un `.' di troppo (o la sua assenza) abbia ingarbugliato le cose
  e confuso delle indiavolate persone.



  Dunque ecco qua il nuovo file di zona, con qualche informazione extra
  messa nel modo giusto:













  ______________________________________________________________________
  ;
  ; File di zona per linux.bogus
  ;
  ; Il file di zona completo
  ;
  @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                          199802151       ; # di serie, data di oggi + # di serie di oggi
                          8H              ; refresh, secondi
                          2H              ; retry, secondi
                          1W              ; expire, secondi
                          1D )            ; minimum, secondi
  ;
                  TXT     "Linux.Bogus, il proprio consulente DNS"
                  NS      ns              ; Indirizzo Inet del name server
                  NS      ns.friend.bogus.
                  MX      10 mail         ; Mail Exchanger Primario
                  MX      20 mail.friend.bogus. ; Mail Exchanger Secondario

  localhost       A       127.0.0.1

  gw              A       192.168.196.1
                  HINFO   "Cisco" "IOS"
                  TXT     "Il router"

  ns              A       192.168.196.2
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "Pentium" "Linux 2.0"
  www             CNAME   ns

  donald          A       192.168.196.3
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "i486"      "Linux 2.0"
                  TXT     "DEK"

  mail            A       192.168.196.4
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "386sx" "Linux 1.2"

  ftp             A       192.168.196.5
                  MX      10 mail
                  MX      20 mail.friend.bogus.
                  HINFO   "P6" "Linux 2.1.86"
  ______________________________________________________________________




  Ci sono un sacco di nuovi RR qua: HINFO (Host Information)  composto
  da due parti,  buona cosa dividerle entrambe con le virgolette. La
  prima parte indica l'hardware o la CPU della macchina, e la seconda
  parte il software o il S(istema)O(perativo) della macchina.  La
  macchina chiamata `ns' ha una CPU Pentium e Linux 2.0 come SO. CNAME
  (Canonical Name)  un modo per dare a ogni macchina diversi nomi. Cos
  www  un alias per ns.


  L'utilizzo del record CNAME  un po' controverso. Ma  bene seguire la
  regola per cui un record MX, CNAME o SOA non dovrebbero mai riferirsi
  a un record CNAME, dovrebbero far rifimento soltanto a qualcosa che
  abbia un record A, cio non  auspicabile avere


  ______________________________________________________________________
  foobar          CNAME   www                     ; NO!
  ______________________________________________________________________



  ma  corretto avere


  ______________________________________________________________________
  foobar          CNAME   ns                      ; S!
  ______________________________________________________________________




   anche consigliabile assumere che un CNAME non  un nome di host
  legale per un indirizzo email: webmaster@www.linux.bogus  un
  indirizzo email illegale generato dall'impostazione errata di cui
  sopra.  Anche se per voi funziona, qualche amministratore di server di
  posta vi far rispettare questa regola.  Il modo per impedire tutto
  questo  usare un record A (o anche un record tipo MX):


  ______________________________________________________________________
  www             A       192.168.196.2
  ______________________________________________________________________




  Alcuni maghi-dell'architettura-di-bind raccomandano di non usare CNAME
  per nulla. Ma la discussione sul perch o sul perch no va oltre
  questo HOWTO.


  Ma coma potrete notare, questo HOWTO e molti siti non seguono questa
  regola.


  Caricate il nuovo database facendo ndc reload, questo imporr a named
  di rileggere i suoi file.



       $ nslookup
       Default Server:  localhost
       Address:  127.0.0.1

       > ls -d linux.bogus





  Questo fa s che vengano elencati tutti i record, risulta cos:










  [localhost]
  $ORIGIN linux.bogus.
  @                       1D IN SOA       ns hostmaster (
                                          199802151       ; serial
                                          8H              ; refresh
                                          2H              ; retry
                                          1W              ; expiry
                                          1D )            ; minimum

                          1D IN NS        ns
                          1D IN NS        ns.friend.bogus.
                          1D IN TXT       "Linux.Bogus, your DNS consultants"
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
  gw                      1D IN A         192.168.196.1
                          1D IN HINFO     "Cisco" "IOS"
                          1D IN TXT       "Il router"
  mail                    1D IN A         192.168.196.4
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "386sx" "Linux 1.0.9"
  localhost               1D IN A         127.0.0.1
  www                     1D IN CNAME     ns
  donald                  1D IN A         192.168.196.3
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "i486" "Linux 1.2"
                          1D IN TXT       "DEK"
  ftp                     1D IN A         192.168.196.5
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "P6" "Linux 1.3.59"
  ns                      1D IN A         192.168.196.2
                          1D IN MX        10 mail
                          1D IN MX        20 mail.friend.bogus.
                          1D IN HINFO     "Pentium" "Linux 1.2"





   buono. Come potete vedere somiglia un sacco allo stesso file di
  zona. Vediamo cosa dice per www da solo:



       > set q=any
       > www.linux.bogus.
       Server:  localhost
       Address:  127.0.0.1

       www.linux.bogus canonical name = ns.linux.bogus
       linux.bogus     nameserver = ns.linux.bogus
       linux.bogus     nameserver = ns.friend.bogus
       ns.linux.bogus  internet address = 192.168.196.2





  In altre parole, il vero nome diwww.linux.bogus  ns.linux.bogus, e vi
  da qualche informazione a proposito di ns, abbastanza per connettervi
  ad esso se voi foste un programma.



  Ora siamo a met strada.


  4.3.  La zona inversa (reverse zone)

  Adesso i programmi possono convertire i nomi di linux.bogus negli
  indirizzi a cui vorrebbero connettersi. Ma c' bisogno anche della
  zona inversa, un DNS tale da poter covertire un indirizzo in un nome.
  Questo nome  utile a un sacco di server di diversi tipi (FTP, IRC,
  WWW e altri) per decidere se colloquiare con voi o meno, e se si,
  anche quanta priorit dovr essere assegnata loro.  Per un pieno
  accesso a tutti i servizi su Internet  richiesta una zona inversa.


  Mettete questo in named.conf:


  ______________________________________________________________________
  zone "196.168.192.in-addr.arpa" {
          notify no;
          type master;
          file "pz/192.168.196";
  };
  ______________________________________________________________________




   esattamente come per 0.0.127.in-addr.arpa, e i contenuti sono
  simili:


  ______________________________________________________________________
  @       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                          199802151 ; # di serie, data di oggi + # di serie di oggi
                          8H      ; Refresh
                          2H      ; Retry
                          1W      ; Expire
                          1D)     ; Minimum TTL
                  NS      ns.linux.bogus.

  1               PTR     gw.linux.bogus.
  2               PTR     ns.linux.bogus.
  3               PTR     donald.linux.bogus.
  4               PTR     mail.linux.bogus.
  5               PTR     ftp.linux.bogus.
  ______________________________________________________________________




  Adesso fate ripartire named (ndc restart) e esaminate ancora il lavoro
  con nslookup :


  ______________________________________________________________________
  > 192.168.196.4
  Server:  localhost
  Address:  127.0.0.1

  Name:    mail.linux.bogus
  Address:  192.168.196.4
  ______________________________________________________________________



  pare OK, elencate tutto per fare un esame accurato:


  ______________________________________________________________________
  > ls -d 196.168.192.in-addr.arpa
  [localhost]
  $ORIGIN 196.168.192.in-addr.arpa.
  @                       1D IN SOA       ns.linux.bogus. hostmaster.linux.bogus. (
                                          199802151       ; serial
                                          8H              ; refresh
                                          2H              ; retry
                                          1W              ; expiry
                                          1D )            ; minimum

                          1D IN NS        ns.linux.bogus.
  1                       1D IN PTR       gw.linux.bogus.
  2                       1D IN PTR       ns.linux.bogus.
  3                       1D IN PTR       donald.linux.bogus.
  4                       1D IN PTR       mail.linux.bogus.
  5                       1D IN PTR       ftp.linux.bogus.
  @                       1D IN SOA       ns.linux.bogus. hostmaster.linux.bogus. (
                                          199802151       ; serial
                                          8H              ; refresh
                                          2H              ; retry
                                          1W              ; expiry
                                          1D )            ; minimum
  ______________________________________________________________________




  Sembra buono! Se il vostro output non viene simile a questo guardate i
  messaggi d'errore nel vostro syslog. Ho spiegato come farlo all'inizio
  del capitolo.


  4.4.  Qualche parola di avvertimento

  Ci sono delle cose che a questo punto vorrei aggiungere. I numeri IP
  usati negli esempi sono stati presi dai blocchi delle "reti private",
  cio non  permesso usarli esplicitamente su Internet. Per questo sono
  comodi da usare in un HOWTO. La seconda cosa riguarda la linea notify
  no;. Dice a named che non deve notificare al suo server secondario
  (slave, schiavo) quando riceve un aggiornamento di uno dei suoi file
  di zona. In bind-8 named pu notificare agli altri server quando
  riceve un aggiornamento dei file di zona. Questo  utile nell'uso
  comune, ma per gli esperimenti privati con le zone questa possibilit
  deve essere esclusa, non vogliamo che i nostri esperimenti inquinino
  Internet vero??


  E naturalmente, questo dominio  veramente fasullo, e cos tutti gli
  indirizzi in esso. Per un vero esempio tratto dalla vita reale leggete
  il prossimo capitolo.


  4.5.  Perch non funziona il lookup inverso (reverse lookup)

  Ci sono un paio di ``grattacapi'' che possono essere normalmente
  evitati quando si fa il lookup sempre degli stessi nomi (o dei nomi
  per cui lo si fa pi spesso) quando si imposta la zona inversa. Prima
  che andiate avanti c' bisogno che il lookup inverso funzioni bene sul
  vostro nameserver. Se cos non fosse, tornate indietro e mettetelo a
  posto prima di continuare.


  Discuter due problematiche del lookup inverso viste dall'esterno
  della vostra rete:


  4.5.1.  La zona inversa non  delegata

  Quando chiedete a un provider di servizi un dominio e un intervallo di
  indirizzi di rete, il dominio  normalmente delegato di conseguenza.
  Una delega  quel record NS che tiene assieme il tutto, che vi
  permette di passare da un nameserver all'altro come  stato spiegato
  nella sezione teorica di sopra. L'avete letta vero? Se la zona inversa
  non vi funziona tornate indietro e leggetela. Ora.


  Anche la zona inversa deve essere delegata. Se avete ottenuto la rete
  192.168.196 con il dominio linux.bogus dal vostro provider di servizi,
  loro dovranno mettere un record NS nella vostra zona inversa cos come
  per la vostra zona di forward.  Se seguirete la catena partendo da in-
  addr.arpa fino alla vostra rete, probabilmente troverete
  un'interruzione nella catena.  Molto probabilmente a livello del
  vostro service provider.  Una volta scoperta l'interruzione contattate
  il provider e chiedetegli di correggere l'errore.


  4.5.2.  Vi hanno dato una sottorete classless

  Questo sarebbe un argomento un po' avanzato, ma le sottoreti classless
  (senza classe) ormai sono molto comuni e probabilmente ne avete una a
  meno che non siate un'azienda di media grandezza.


  Una sottorete classless  ci che oggi manda avanti Internet.  Qualche
  anno fa si  fatto molto rumore a causa della scarsit di numeri IP.
  Le brillanti persone che lavorano al IETF (l'Internet Engineering Task
  Force, sono loro che mantengono la funzionalit di Internet) unirono
  le loro menti e risolsero il problema. Ma bisogna pagare un prezzo. Il
  prezzo  che avrete meno che una sottorete di classe ``C'' e qualche
  cosa potrebbe non funzionare. Leggete per favore Ask Mr. DNS at
  http://www.acmebw.com/askmrdns/00007.htm per una buona spiegazione e
  per come trattare il problema.


  L'avete letto? Non sto per spiegarlo quindi leggetelo.


  La prima parte del problema  costituita dal fatto che il vostro ISP
  deve capire la tecnica descritta da Mr. DNS. Non tutti i piccoli ISP
  hanno una chiara visione di questa. Se sar il caso dovrete spiegar
  loro come fare ed essere insistenti. Ma anche voi assicuratevi di aver
  capito bene prima ;-). A questo punto loro imposteranno una buona zona
  inversa sui loro server, e voi potrete esaminarla correttamente con
  nslookup.


  La seconda e ultima parte del problema  costituita dal fatto che voi
  dovete comprendere la tecnica. Se non siete sicuri rileggetela ancora.
  Dopo potrete impostare le zone inverse della vostra sottorete
  classless come descritto da Mr. DNS.


  Nei dontorni c' un'altra trappola in agguato. I vecchi risolutori non
  sono abilitati a sfruttare il trucco del CNAME nella catena della
  risoluzione e falliranno nel tentativo di risolvere inversamente
  (reverse-resolving) la vostra macchina. Questo problema pu portare ad
  assegnare al servizio una scorretta classe di accesso, all'accesso
  negato o a qualcosa del genere.  Se inciampaste in un servizio di
  questo tipo l'unica soluzione (che io conosca)  che il vostro ISP
  inserisca direttamente nel suo file di zona truccato (il file relativo
  alla vostra zona classless) il vostro record PTR anzich il record
  CNAME truccato ( un modo per ingannare il DNS e per fargli accettare
  qualcosa per cui non  preparato).


  Altri ISP offriranno diversi modi per risolvere questo problema, come
  dei form via web (Web-based) che permettono di inserire i vostri dati
  sulla zona inversa, oppure con altri sistemi "automagici".


  5.  Esempio di un vero dominio

  Dove si elencano alcuni veri file di zona


  Gli utenti mi hanno suggerito di includere un esempio reale di un
  dominio funzionante come l'esempio di tutorial.


  Utilizzo questo esempio col permesso concessomi da David Bullock di
  LAND-5. Questi file risalgono al 24 Settembre 1996, successivamente
  vennero da me modificati perch si adattassero alle restrizioni di
  bind 8 e perch comprendessero delle estensioni. Questo implica che
  quello che leggerete qua differisce un po' da quello che otterreste
  facendo una query sul nameserver di LAND-5.


  5.1.  /etc/named.conf (o /var/named/named.conf)

  Qui troveremo le sezioni relative alle due zone inverse richieste: la
  rete 127.0.0, e la sottorete LAND-5 206.6.177. Poi c' la linea
  relativa alla zona di forward per land-5, land-5.com. Si noti come i
  file siano stati sistemati nella directory chiamata zone anzich in pz
  come ho fatto in questo HOWTO.






























  ______________________________________________________________________
  // Boot file for LAND-5 name server

  options {
          directory "/var/named";
  };

  zone "." {
          type hint;
          file "root.hints";
  };

  zone "0.0.127.in-addr.arpa" {
          type master;
          file "zone/127.0.0";
  };

  zone "land-5.com" {
          type master;
          file "zone/land-5.com";
  };

  zone "177.6.206.in-addr.arpa" {
          type master;
          file "zone/206.6.177";
  };
  ______________________________________________________________________




  Se aveste intenzione di usare queste righe nel vostro named.conf (ma
  solo per gioco) PER FAVORE mettete ``notify no;'' nelle sezioni
  relative alle due zone land-5 cos da evitare incidenti.


  5.2.  /var/named/root.hints

  Tenete a mente che questo  un file dinamico, e quello che c' qua
  sar vecchio.  meglio che ne procuriate uno recente, con dig, come
  verr presto spiegato.

























  ______________________________________________________________________
  ; <<>> DiG 8.1 <<>> @A.ROOT-SERVERS.NET.
  ; (1 server found)
  ;; res options: init recurs defnam dnsrch
  ;; got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10
  ;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
  ;; QUERY SECTION:
  ;;      ., type = NS, class = IN

  ;; ANSWER SECTION:
  .                     6D IN NS        G.ROOT-SERVERS.NET.
  .                     6D IN NS        J.ROOT-SERVERS.NET.
  .                     6D IN NS        K.ROOT-SERVERS.NET.
  .                     6D IN NS        L.ROOT-SERVERS.NET.
  .                     6D IN NS        M.ROOT-SERVERS.NET.
  .                     6D IN NS        A.ROOT-SERVERS.NET.
  .                     6D IN NS        H.ROOT-SERVERS.NET.
  .                     6D IN NS        B.ROOT-SERVERS.NET.
  .                     6D IN NS        C.ROOT-SERVERS.NET.
  .                     6D IN NS        D.ROOT-SERVERS.NET.
  .                     6D IN NS        E.ROOT-SERVERS.NET.
  .                     6D IN NS        I.ROOT-SERVERS.NET.
  .                     6D IN NS        F.ROOT-SERVERS.NET.

  ;; ADDITIONAL SECTION:
  G.ROOT-SERVERS.NET.     5w6d16h IN A    192.112.36.4
  J.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.10
  K.ROOT-SERVERS.NET.     5w6d16h IN A    193.0.14.129
  L.ROOT-SERVERS.NET.     5w6d16h IN A    198.32.64.12
  M.ROOT-SERVERS.NET.     5w6d16h IN A    202.12.27.33
  A.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.4
  H.ROOT-SERVERS.NET.     5w6d16h IN A    128.63.2.53
  B.ROOT-SERVERS.NET.     5w6d16h IN A    128.9.0.107
  C.ROOT-SERVERS.NET.     5w6d16h IN A    192.33.4.12
  D.ROOT-SERVERS.NET.     5w6d16h IN A    128.8.10.90
  E.ROOT-SERVERS.NET.     5w6d16h IN A    192.203.230.10
  I.ROOT-SERVERS.NET.     5w6d16h IN A    192.36.148.17
  F.ROOT-SERVERS.NET.     5w6d16h IN A    192.5.5.241

  ;; Total query time: 215 msec
  ;; FROM: roke.uio.no to SERVER: A.ROOT-SERVERS.NET.  198.41.0.4
  ;; WHEN: Sun Feb 15 01:22:51 1998
  ;; MSG SIZE  sent: 17  rcvd: 436
  ______________________________________________________________________




  5.3.  /var/named/zone/127.0.0

  Solo lo stretto necessario, il record obbligatorio SOA, e un record
  che mette in corrispondenza 127.0.0.1 con localhost. Entrambi sono
  richiesti. Non deve esserci nient'altro in questo file. Probabilmente
  non ci sar mai bisogno di aggiornare questo file, a meno che non
  cambino gli indirizzi del nameserver o hostmaster.










  ______________________________________________________________________
  @               IN      SOA     land-5.com. root.land-5.com. (
                                  199609203       ; Serial
                                  28800   ; Refresh
                                  7200    ; Retry
                                  604800  ; Expire
                                  86400)  ; Minimum TTL
                          NS      land-5.com.

  1                       PTR     localhost.
  ______________________________________________________________________




  5.4.  /var/named/zone/land-5.com

  Qui possiamo vedere il record obbligatorio SOA e i record NS
  richiesti. Si pu vedere che  presente un nameserver secondario in
  ns2.psi.net. Questo  come dovrebbe essere,  bene avere sempre un
  server secondario fuori dalla vostra rete che faccia da backup. Si pu
  notare anche la presenza di un host principale (master host) chiamato
  land-5 che si prende cura della maggior parte dei servizi Internet, e
  questo  fatto tramite i record CNAME (alternativamente si possono
  usare i record A).


  Come si pu vedere dal record SOA, il file di zona comincia con
  land-5.com, la persona da contattare  root@land-5.com.  Anche
  hostmaster  spesso utilizzato per il responsabile di zona.  Il numero
  seriale  nel formato standard yyyymmdd (aaaammgg) con il numero che
  indica il giorno (todays serial number) a seguire. Questa  forse la
  sesta versione del file di zona del 20 settembre 1996.  Ricordate che
  il serial number deve essere incrementato in maniera monotonica, qui
  c' solo una cifra per i todays serial #, cos dopo 9 volte che si 
  editato il file bisogna aspettare il giorno successivo prima che si
  possa editarlo di nuovo. Comunque considerate che si possono usare 2
  cifre.




























  ______________________________________________________________________
  @       IN      SOA     land-5.com. root.land-5.com. (
                          199609206       ; serial, todays date + todays serial #
                          8H              ; refresh, seconds
                          2H              ; retry, seconds
                          1W              ; expire, seconds
                          1D )            ; minimum, seconds
                  NS      land-5.com.
                  NS      ns2.psi.net.
                  MX      10 land-5.com.  ; Primary Mail Exchanger
                  TXT     "LAND-5 Corporation"

  localhost       A       127.0.0.1

  router          A       206.6.177.1

  land-5.com.     A       206.6.177.2
  ns              A       206.6.177.3
  www             A       207.159.141.192

  ftp             CNAME   land-5.com.
  mail            CNAME   land-5.com.
  news            CNAME   land-5.com.

  funn            A       206.6.177.2

  ;
  ;       Workstations
  ;
  ws-177200       A       206.6.177.200
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177201       A       206.6.177.201
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177202       A       206.6.177.202
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177203       A       206.6.177.203
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177204       A       206.6.177.204
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177205       A       206.6.177.205
                  MX      10 land-5.com.   ; Primary Mail Host
  ; {Many repetitive definitions deleted - SNIP}
  ws-177250       A       206.6.177.250
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177251       A       206.6.177.251
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177252       A       206.6.177.252
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177253       A       206.6.177.253
                  MX      10 land-5.com.   ; Primary Mail Host
  ws-177254       A       206.6.177.254
                  MX      10 land-5.com.   ; Primary Mail Host
  ______________________________________________________________________




  Esaminando i nameserver di land-5 scoprirete che gli host hanno un
  nome del tipo ws_numero. Con le ultime versioni di bind-4 named ha
  iniziato a porre delle restrizioni sui caratteri che potevano essere
  usati nei nomi di host. In questo HOWTO io ho sostituito '-' (dash,
  trattino) con '_' (underline) in modo da uniformarmi alle regole di
  bind-8 per i nomi di host.



  Un'altra cosa da notare  che le workstation non hanno nomi
  individuali, ma un prefisso seguito dalle ultime due parti del numero
  IP. Usare delle convenzioni simili pu semplificare significativamente
  la manutenzione, ma pu risultare impersonale e in effetti potrebbe
  anche irritare i vostri clienti.


  Vediamo anche che funn.land-5.com  un alias per land-5.com, ma ci 
  fatto tramite un record A, non con un record CNAME. Questo  un buon
  modo di procedere.


  5.5.  /var/named/zone/206.6.177

  Commenter questo file pi sotto.


  ______________________________________________________________________
  @               IN      SOA     land-5.com. root.land-5.com. (
                                  199609206       ; Serial
                                  28800   ; Refresh
                                  7200    ; Retry
                                  604800  ; Expire
                                  86400)  ; Minimum TTL
                          NS      land-5.com.
                          NS      ns2.psi.net.
  ;
  ;       Servers
  ;
  1       PTR     router.land-5.com.
  2       PTR     land-5.com.
  2       PTR     funn.land-5.com.
  ;
  ;       Workstations
  ;
  200     PTR     ws-177200.land-5.com.
  201     PTR     ws-177201.land-5.com.
  202     PTR     ws-177202.land-5.com.
  203     PTR     ws-177203.land-5.com.
  204     PTR     ws-177204.land-5.com.
  205     PTR     ws-177205.land-5.com.
  ; {Many repetitive definitions deleted - SNIP}
  250     PTR     ws-177250.land-5.com.
  251     PTR     ws-177251.land-5.com.
  252     PTR     ws-177252.land-5.com.
  253     PTR     ws-177253.land-5.com.
  254     PTR     ws-177254.land-5.com.
  ______________________________________________________________________




  La zona inversa costituisce quella fase della configurazione che causa
  pi grane. Essa serve a ricavare il nome di un host dall'indirizzo IP
  di una macchina. Esempio: voi siete un server IRC e accettate
  connessioni dai client IRC. Inoltre siete un server IRC Norvegese a
  volete che queste connessioni provengano da client Norvegesi o da
  altre nazioni Scandinave. Quando ricevete una richiesta di connessione
  da un client la libreria C  in grado di dirvi il numero IP della
  macchina che sta tentando la connessione, poich il numero IP del
  client  contenuto in ogni pacchetto che attraversa la rete. A questo
  punto potrete chiamare una funzione chiamata gethostbyaddr che ricava
  il nome di un host a partire dal suo indirizzo IP. Gethostbyaddr
  interrogher un server DNS, il quale attraverser il DNS in cerca
  della macchina. Supponiamo che il client si connetta da
  ws-177200.land-5.com. La libreria C presente nel server ricava il
  numero IP del client che tenta la connessione, in questo caso 
  206.6.177.200. Per scoprire il nome di questa macchina bisogna prima
  scoprire 200.177.6.206.in-addr.arpa. Il server DNS trover prima i
  server arpa., poi trover i server in-addr.arpa., seguendo il percorso
  inverso passando per 206, poi per 6 e alla fine trover il server
  responsabile per la zona 177.6.206.in-addr.arpa presso LAND-5.  Da
  questo finalmente si potr ricavare che in 200.177.6.206.in-addr.arpa
  c' un record ``PTR  ws-177200.land-5.com'', e questo significa che il
  nome associato a 206.6.177.200  ws-177200.land-5.com. Come  stato
  detto per la spiegazione della ricerca (looking up) di
  prep.ai.mit.edu, anche questa  leggermente fittizia.


  Riprendiamo l'esempio del server IRC. Il server IRC accetta
  connessioni solo da paesi Scandinavi, ovvero *.no, *.se, *.dk il nome
  ws-177200.land-5.com non corrisponde a nessuno di questi ovviamente, e
  il server negher la connessione. Se non ci fosse la corrispondenza
  inversa (reverse mapping) di 206.2.177.200 tramite la zona in-
  addr.arpa il server sarebbe incapace di scoprire il nome e avrebbe
  dovuto comparare 206.2.177.200 con *.no, *.se e *.dk, senza trovare
  nessuna corrispondenza.


  Alcune persone vi diranno che il mapping del lookup inverso 
  importante solo per i server, o per nulla importante. Non  cos:
  molti server ftp, news, IRC e anche qualche server http (WEB) non
  accetteranno connessioni da macchine per le quali non riescono a
  trovare il nome. E cos il mapping inverso diventa di fatto
  obbligatorio.



  6.  Manutenzione

  Mantenerlo operativo


  C' un altro compito di manutenzione che dovete fare sui named, oltre
  a quello di tenerli operativi. Consiste nel mantenere aggiornato il
  file root.hints. Il modo pi semplice  usare dig, fate partire dig
  senza argomenti, otterrete root.hints in accordo col quello che c'
  sul vostro server. Poi fate una richiesta a uno dei root server
  elencati con dig @rootserver. Vedrete che l'output somiglier
  terribilmente al file root.hints. Salvatelo in un file (dig @e.root-
  servers.net . ns >root.hints.new) e rimpiazzate il vecchio root.hints
  con questo.



  Ricordate di fare reload di named dopo aver rimpiazzato il cache file.


  Questo script mi  stato mandato da Al Longyear, pu essere fatto
  partire automaticamente per aggiornare root.hints, impostate una riga
  nel crontab che lo faccia partire una volta al mese e dimenticatelo.
  Lo script assume che il vostro sistema di posta funzioni e che l'alias
  di posta `hostmaster' sia definito. Dovrete editarlo perch si
  conformi alle vostre esigenze.








  ______________________________________________________________________
  #!/bin/sh
  #
  # Update the nameserver cache information file once per month.
  # This is run automatically by a cron entry.
  #
  # Original by Al Longyear
  # Updated for bind 8 by Nicolai Langfeldt
  # Miscelanious error-conditions reported by David A. Ranch
  # Ping test suggested by Martin Foster
  #
  (
   echo "To: hostmaster <hostmaster>"
   echo "From: system <root>"
   echo "Subject: Automatic update of the root.hints file"
   echo

   PATH=/sbin:/usr/sbin:/bin:/usr/bin:
   export PATH
   cd /var/named

   # Are we online?  Ping a server at your ISP
   case `ping -qnc 1 some.machine.net` in
     *'100% packet loss'*)
          echo "The network is DOWN. root.hints NOT updated"
          echo
          exit 0
          ;;
   esac

   dig @e.root-servers.net . ns >root.hints.new 2>&1

   case `cat root.hints.new` in
     *NOERROR*)
          # It worked
          :;;
     *)
          echo "The root.hints file update has FAILED."
          echo "This is the dig output reported:"
          echo
          cat root.hints.new
          exit 0
          ;;
   esac

   echo "The root.hints file has been updated to contain the following
  information:"
   echo
   cat root.hints.new

   chown root.root root.hints.new
   chmod 444 root.hints.new
   rm -f root.hints.old
   mv root.hints root.hints.old
   mv root.hints.new root.hints
   ndc restart
   echo
   echo "The nameserver has been restarted to ensure that the update is complete."
   echo "The previous root.hints file is now called
  /var/named/root.hints.old."
  ) 2>&1 | /usr/lib/sendmail -t
  exit 0
  ______________________________________________________________________



  Qualcuno di voi potrebbe aver notato che il file root.hints 
  disponibile anche in ftp da Internic. Per favore, non usate ftp per
  aggiornare root.hints, il metodo sopra descritto  molto pi
  amichevole per la rete, e per Internic.


  7.  Convertire dalla versione 4 alla versione 8

  Questa era originariamente una sezione sull'uso di bind 8, scritta da
  Davie E. Smith (dave@bureau42.ml.org). L'ho rivista in modo da
  conformarla al nuovo nome della sezione.


  Non c' molto. Eccetto che per l'uso di named.conf al posto di
  named.boot, tutto  identico. E bind8  fornito con uno script perl
  che converte i file vecchio stile nel nuovo. Esempio di named.boot
  (vecchio stile) per un name server che fa solo da cache (caching-
  only):


  ______________________________________________________________________
  directory /var/named
  cache   .                                     root.hints
  primary 0.0.127.IN-ADDR.ARPA                    127.0.0.zone
  primary localhost                               localhost.zone
  ______________________________________________________________________



  Dalla linea di comando, nella directory bind8/src/bin/named (si assume
  che abbiate la distribuzione dei sorgenti. Se avete il pacchetto dei
  binari lo script sar da qualche parte, comunque non so esattamente
  dove dovrebbe stare. -ed-), digitate:


  ______________________________________________________________________
  ./named-bootconf.pl < named.boot > named.conf
  ______________________________________________________________________



  Il quale crea named.conf:
























  ______________________________________________________________________
  // generated by named-bootconf.pl

  options {
          directory "/var/named";
  };

  zone "." {
          type hint;
          file "root.hints";
  };

  zone "0.0.127.IN-ADDR.ARPA" {
          type master;
          file "127.0.0.zone";
  };

  zone "localhost" {
          type master;
          file "localhost.zone";
  };
  ______________________________________________________________________




  Questo script funziona per tutto ci che potrebbe stare dentro un file
  named.boot, sebbene non aggiunga tutti i miglioramenti e le nuove
  opzioni di configurazione che bind8 supporta. Qui c' un named.conf
  pi completo, che fa le stesse cose ma che  appena pi efficiente.


  ______________________________________________________________________
  // This is a configuration file for named (from BIND 8.1 or later).
  // It would normally be installed as /etc/named.conf.
  // The only change made from the `stock' named.conf (aside from this
  // comment :) is that the directory line was uncommented, since I
  // already had the zone files in /var/named.

  options {
          directory "/var/named";
          datasize 20M;
  };

  zone "localhost" IN {
          type master;
          file "localhost.zone";
  };

  zone "0.0.127.in-addr.arpa" IN {
          type master;
          file "127.0.0.zone";
  };

  zone "." IN {
          type hint;
          file "root.hints";
  };
  ______________________________________________________________________




  Trovate questo file nella distribuzione di bind8, nella directory
  bind8/src/bin/named/test, insieme a copie dei file di zona, che
  possono essere prese e usate immediatamente.
  I formati dei file di zona e root.hints sono identici, cos come i
  comandi per aggiornarli.



  8.  Domande e risposte

  Per favore leggete questa sezione prima di scrivermi in email.


  1. Il mio named vuole il file named.boot


     State leggendo l'HOWTO sbagliato. Leggete per favore la vecchia
     versione di questo HOWTO, che tratta bind 5, presso
     http://www.math.uio.no/~janl/DNS/



  2. Come si usa il DNS dall'interno di un Firewall?



     Un indizio: forward only; probabilmemte avrete bisogno anche della
     riga


     ___________________________________________________________________
       query-source port 53;

     ___________________________________________________________________



  all'interno della parte ``options'' del file named.conf come suggerito
  nella sezione-esempio ``Un name server caching only.''



  3. Come fare in modo che il DNS distribuisca un servizio attraverso
     gli indirizzi disponibili, tipo www.sito.occupato per ottenere un
     effetto di bilanciamento, o simile??



     Create numerosi record A per www.sito.occupato e usate bind 4.9.3 o
     successivo. Poi sar bind a far ruotare le risposte. Non funziona
     con le precedenti versioni di bind.


  4. Voglio impostare il DNS su una intranet (chiusa). Cosa devo fare?


     Cancellerete il file root.hints e farete solo i file di zona.
     Questo significa anche che non dovrete aggiornare i file di hint
     tutte le volte.


  5. Come si imposta un name server secondario (slave)?


     Se il server primario/master ha indirizzo 127.0.0.1 mettete una
     linea come questa nel file named.conf del vostro secondario:



     ___________________________________________________________________
       zone "linux.bogus" {
             type slave;
             file "sz/linux.bogus";
             masters { 127.0.0.1; };
       };

     ___________________________________________________________________



  Potrete elencare numerosi master server alternativi, la zona pu
  essere copiata da dentro la lista masters, separata da ';'.


  6. Vorrei bind in esecuzione quando mi disconnetto dalla rete.


     Ci sono quattro articoli che riguardano questo:


    Specifico per bind 8, Adam L. Rice mi ha mandato questa email, su
     come far funzionare tranquillamente il DNS su una macchina dial-up:




       Ho scoperto che con le ultime versioni di BIND questo [<em/mischiare i
       file, -ed/] non  pi necessario. C' una direttiva "forward" oltre a
       quella "forwarders" che controlla come queste vengono
       usate. L'impostazione di default  "forward first", la quale prima
       chiede a ognuno dei forwarder, e poi se il tentativo fallisce, prova
       da sola a fare il lavoro seguendo un normale approccio. Questo
       implica un normale comportamento di gethostbyname() e impiega una
       quantit spropositata di tempo quando il link non  attivo. Ma se
       "forward only"  l'impostazione scelta, allora BIND si blocca quando
       non riesce a ottenere una risposta dai forwarders, e gethostbyname()
       si ferma immediatamente. Quindi in questo caso non c' bisogno di
       smanettare con i file di /etc e di far ripartire il server.

       Per quanto mi riguarda, ho solo aggiunto le linee

       forward only;
       forwarders { 193.133.58.5; };

       nella sezione opzioni { } del mio file named.conf. Tutto ci funziona
       veramente bene. L'unico svantaggio  che questo riduce un software
       incredibilmente complicato per il DNS allo stato di una stupida cache.
       In un certo senso, io vorrei solo far fuzionare una stupida cache al
       posto del DNS, ma ci non sembra essere altro che un pezzo di software
       disponibile per Linux.






    Ho ricevuto questa mail da Ian Clark <ic@deakin.edu.au> dove egli
     spiega come affronta il problema:







  Faccio partire named sulla mia macchina che fa servizio di 'Masquerading'
  (mascheramento). Ho due file root.hints, uno chiamato root.hints.real che
  contiene i veri nomi dei root server e l'altro chiamato root.hints.fake
  che contiene...

  ----
  ; root.hints.fake
  ; this file contains no information
  ----

  Quando vado off line copio il file root.hints.fake su root.hints e
  faccio ripartire named.

  Quando vado on line copio root.hints.real su root.hints e faccio
  ripartire named.

  Tutto ci viene eseguito da ip-down e ip-up rispettivamente.

  La prima volta che faccio una richiesta (query) off line, named non
  avendo dettagli su di essa lascia una riga simile a questo messaggio...

  Jan 28 20:10:11 hazchem named[10147]: No root nameserver for class IN

  con la quale posso convivere.

  Questo per me funziona certamente. Posso usare il nameserver per le
  macchina locali quando sono fuori dalla rete senza il ritardo del
  timeout per i nomi di dominio esterni e mentre sono collegato alla rete
  le richieste (query) per i domini esterni funzionano normalmente.





    Ho ricevuto anche informazioni su come bind intergisce con NFS e
     con il portmapper su una macchina generalmente offline da Karl-Max
     Wanger:



       Sono abituato a eseguire il mio named su tutte le mie macchine che
       solo occasionalmente sono connesse a Internet via modem. Solo il
       nameserver fa da cache, esso non ha un'area di autorit e chiede
       qualunque cosa ai nameserver del file root.cache. Come  prassi comune
       con Slackware, viene fatto partire prima di nfsd e mountd.

       Con una delle mie macchine (un notebook Libretto 30), avevo il problema
       che qualche volta avrei voluto fare il mount di essa da un altro sistema
       connesso alla mia rete locale, ma la maggior parte delle volte non
       funzionava. Avevo lo stesso effetto usando indistintamente PLIP, una
       scheda ethernet PCMCIA o il PPP su una interfaccia seriale.

       Dopo qualche supposizione e esperimento scoprii che apparentemente
       named incasinava il processo di registrazione con portmapper che nfsd
       e mountd devono fare all'avvio (faccio partire questi demoni all'avvio
       come al solito). Eseguire named dopo nfsd e mountd elimina completamente
       questo problema.

       Anche se non ci sono svantaggi da attendersi da una sequenza di boot cos
       modificata, vorrei consigliare a tutti di farla in questo modo per prevenire
       potenziali problemi.





    Infine, ci sono delle informazioni stile HOWTO su questo argomento
     presso Ask Mr. DNS at http://www.acmebw.com/askmrdns/#linux-dialup.
     Siccome sono a proposito di bind 4, dovrete adattare quello che
     dice a bind 8.



  7. Il caching name server memorizza la sua cache? C' un modo per
     controllare la dimensione della cache?


     La cache  completamente immagazzinata in memoria, non verr mai
     scritta sul disco in nessuna occasione. Ogni volta che si blocca
     named (con il comando 'kill') la cache  persa. La cache non 
     controllabile in alcun modo. Named la gestisce in accordo a qualche
     semplice regola e basta. Non potete controllare la cache o la sua
     dimensione in nessun modo per nessuna ragione. Se questo non vi
     andasse bene potrete sempre cercare di modificare named andando ad
     agire sul codice sorgente di esso. Non  comunque un'operazione
     raccomandabile.


  8. Named salva la cache fra un riavvio e l'altro? Posso fare in modo
     che la salvi?


     No, named non salva la cache quando si ferma. Questo significa che
     la cache deve essere ricostituita ogni volta che fermate e fate
     ripartire named. Non c' modo di salvare la cache in un file.  Se
     questo non vi andasse bene potrete sempre cercare di modificare
     named andando ad agire sul codice sorgente di esso. Non  comunque
     un'operazione raccomandabile.


  9. Come si ottiene un dominio? Io vorrei impostare il mio dominio
     chiamato (ad esempio) linux-rules.net. Come posso avere il dominio
     che vorrei mi fosse assegnato?


     Contattate per favore il vostro provider di servizi di rete. Loro
     sapranno aiutarvi in questo. Sappiate che in molte parti del mondo
     ci sar bisogno di pagare per avere un dominio.




  9.  Come diventare un grande amministratore DNS

  Documentazione e strumenti


  Esiste della vera documentazione. Sia online che su carta stampata.
  La lettura di buona parte di essa  necessaria per fare il passo
  dall'amministratore DNS a tempo perso a quello a tempo pieno. Su carta
  stampata il libro  DNS and BIND di C. Liu and P. Albitz edito dalla
  O'Reilly & Associates, Sebastopol, CA, ISBN 0-937175-82-X.  Io l'ho
  letto,  eccellente, anche se basato su bind 4, ma questo non  un
  grosso problema. C' anche una sezione sul DNS sul libro TCP/IP
  Network Administration, di Craig Hunt edito dalla O'Reilly..., ISBN
  0-937175-82-X. Un altro ``must'' per la Buona amministrazione DNS (e
  buono per qualsiasi altra cosa)  Zen and the Art of Motorcycle
  Maintenance (Lo Zen e l'arte della manutenzione della motocicletta) di
  Robert M. Pirsig :-) Disponibile come ISBN 0688052304 e altri.



  Online troverte della roba presso  <http://www.dns.net/dnsrd/> (DNS
  Resources Directory),  <http://www.isc.org/bind.html>; una FAQ, un
  manuale di riferimento (BOG; Bind Operations Guide) oltre che
  documenti, definizioni di protocolli e trucchi (hacks) sul DNS (di
  questi, la maggior parte, se non tutti, e alcune delle RFC elencate
  sotto, sono anche contenuti nella distribuzione di bind).  Io non ho
  letto tutto, e infatti non sono un amministratore DNS a tempo pieno.
  Arnt Gulbrandsen invece ha letto la BOG ed  rimasto meravigliato da
  essa :-). Il newsgroup comp.protocols.tcp-ip.domains  relativo al
  DNS. Inoltre come aggiunta a tutto questo ci sono numerose RFC sul
  DNS, le pi importanti sono probabilmente queste:



     RFC 2052
        A. Gulbrandsen, P. Vixie, A DNS RR for specifying the location
        of services (DNS SRV), ottobre 1996


     RFC 1918
        Y. Rekhter, R. Moskowitz, D. Karrenberg, G. de Groot, E. Lear,
        Address Allocation for Private Internets, 29/02/1996.


     RFC 1912
        D. Barr, Common DNS Operational and Configuration Errors,
        28/02/1996.


     RFC 1912 Errors
        B. Barr Errors in RFC 1912, this is available at
        <http://www.cis.ohio-state.edu/~barr/rfc1912-errors.html>


     RFC 1713
        A. Romao, Tools for DNS debugging, 03/11/1994.


     RFC 1712
        C. Farrell, M. Schulze, S. Pleitner, D. Baldoni, DNS Encoding of
        Geographical Location, 01/11/1994.


     RFC 1183
        R. Ullmann, P. Mockapetris, L. Mamakos, C. Everhart, New DNS RR
        Definitions, 08/10/1990.


     RFC 1035
        P. Mockapetris, Domain names -- implementation and
        specification, 11/01/1987.


     RFC 1034
        P. Mockapetris, Domain names -- concepts and facilities,
        11/01/1987.


     RFC 1033
        M. Lottor, Domain administrators operations guide, 11/01/1987.


     RFC 1032
        M. Stahl, Domain administrators guide, 11/01/1987.


     RFC 974
        C. Partridge, Mail routing and the domain system, 01/01/1986.
































































  From DOS/Windows to Linux HOWTO
  di Guido Gonzato <guido@ibogfs.cineca.it>
  Versione 1.2.4. 29 Dicembre 1997.

  Questo HOWTO e' dedicato a tutti gli utenti DOS che hanno deciso di
  passare a Linux, il clone Unix per PC 386 e superiori. Date le analo
  gie tra DOS e Unix, lo scopo di questo lavoro e' di aiutare il lettore
  a trasportare le sue conoscenze di DOS nell'ambiente Linux, cosi' da
  poter lavorare da subito.

  1.  Introduzione



  1.1.  Linux fa per voi?


  Volete passare dal DOS a Linux? Benissimo, ma attenzione: potrebbe non
  esservi utile. Credo che ``il computer migliore'' o ``il migliore
  sistema operativo'' non esistano: dipende dall'uso che se ne fa. Ecco
  perch non credo che Linux sia la soluzione migliore per tutti,
  nonostante sia tecnicamente superiore a molti sistemi operativi
  commerciali. Avrete grandi benefici da Linux se vi serve sw per la
  programmazione, Internet, TeX... sw tecnico in generale, ma se vi
  serve soprattutto sw commerciale, o se non vi piace l'idea di studiare
  i comandi, e' meglio lasciare perdere.

  Linux non e' (per ora) facile da usare o da configurare come Windows o
  il Mac, quindi siate preparati a smanettare un po'. Nonstante questi
  avvertimenti, sono sicuro al 100% che se appartienete alla giusta
  categoria di utenti troverete in Linux il vostro Nirvana informatico.
  E comunque Linux e DOS/Windows possono convivere sulla stessa
  macchina.

  Prerequisiti per questo howto: daro' per scontato che


    conoscete i principali comandi e concetti del DOS;

    Linux, e magari anche X Window System, e' correttamente installato;

    la vostra shell---l'equivalente di COMMAND.COM---e' bash;

    capite che questo lavoro e' solo un inizio. Per maggiori
     informazioni, guardatevi ``Linux Installation and Getting Started''
     di Matt Welsh e/o ``Linux User Guide'' di Larry Greenfield
     (sunsite.unc.edu:/pub/Linux/docs/LDP).

  Questo howto sostituisce il vecchio mini--howto di uguale titolo.


  1.2.  Si', fa per me. Spiegami


  Avete installato Linux e i programmi che vi servono. Vi siete fatti un
  account (se non l'avete fatto, scrivete adduser subito!) e Linux sta
  girando. Avete inserito nome e password e ora state guardando lo
  schermo e pensate: ``Beh, e adesso?''

  Adesso, non disperate. Siete quasi pronti per fare le stesse cose che
  facevate col DOS, e molte altre in piu'. Se steste lavorando col DOS
  anzich con Linux, ora fareste una di queste cose:


    eseguire programmi e creare, copiare, visualizzare, cancellare,
     stampare e rinominare files;
    spostarsi tra directory, crearne di nuove, cancellarle, elencarne i
     contenuti;

    formattare floppy e copiarci file su/da;

    sistemare AUTOEXEC.BAT e CONFIG.SYS;

    scrivere i vostri .BAT files e/o programmi in QBasic o C/Pascal;

    il rimanente 1%.

  Sarete contenti di sapere che queste cose si fanno con Linux in un
  modo molto simile al DOS. Sotto DOS, l'utente medio usa solo pochi tra
  i 100 e passa comandi disponibili; lo stesso vale per Linux, almeno
  fino ad un certo punto.

  Alcune cose da aver chiare prima di proseguire:


    primo, come uscire da Linux. Se si vede una schermata non grafica,
     premere CTRL--ALT--DEL, aspettare che il sistema dica che tutto e'
     a posto, poi spegnere pure. Se si sta lavorando sotto X Window
     System, prima premere CTRL--ALT--BACKSPACE, poi CTRL--ALT--DEL. Non
     spegnere mai il PC direttamente: si potrebbe danneggiare il
     filesystem;

    a differenza del DOS, Linux ha meccanismi di sicurezza, a causa
     della sua natura multiutente. I file e le directory hanno dei
     permessi, e quindi ad alcuni l'utente normale non puo' accedere
     (vedi la sezione ``Permessi''). Solo l'utente il cui nome di login
     e' ``root'' puo' fare cio' che vuole (root e' l'amministratore di
     sistema. Se usate Linux sul vostro PC, sarete anche root). Il DOS,
     al contrario, vi lascia cancellare tutto l'hard disk per sbaglio;

    siete incoraggiati a sperimentare, giocare, provare: di certo male
     non fa. Potete ottenere aiuto in questo modo:


    per ottenere aiuto sui ``comandi interni'' della shell, scrivete
     help;


    per ottenere aiuto su un comando, scrivete man command che richiama
     la pagina di manuale (man page) del comando in questione. In
     alternativa, scrivete info command che richiama, se c'e', la pagina
     info relativa al comando. Info e' un sistema di documentazione ad
     ipertesti, non molto intuitivo da usare le prime volte. Potete
     provare inoltre a dare i comandi whatis command o apropos command e
     premere `q' per uscire.


    buona parte della potenza e flessibilita' di Unix derivano dai
     semplici concetti di redirezione e piping, piu' potenti che non
     sotto DOS. Semplici comandi possono essere combinati per eseguire
     operazioni complesse. Usate questa caratteristica!

    convenzioni: <...> indica qualcosa che deve essere specificato,
     mentre [...] indica qualcosa di opzionale. Esempio:



       $ tar -tf <file.tar> [> redir_file]




  file.tar deve essere specificato, mentre la redirezione su redir_file
  e' opzionale.

    d'ora in avanti ``LMP'' significa ``leggere la man page per
     ulteriori informazioni''.


  1.3.  Per l'impaziente


  Volete partire subito? Date un'occhiata a questa tabella:




       DOS                     Linux                   Note
       ------------------------------------------------------------------------------

       BACKUP                  tar -Mcvf device dir/   totalmente diversi
       CD dirname\            cd dirname/             quasi la stessa sintassi
       COPY file1 file2        cp file1 file2          idem
       DEL file                rm file                 attenzione - niente undelete
       DELTREE dirname         rm -R dirname/          idem
       DIR                     ls                      non proprio la stessa sintassi
       DIR file/s              find . -name file       totalmente diverso
       EDIT file               vi file                 credo che non vi piacera'
                               emacs file              questo e' migliore
                               jstar file              quasi come l'editor del DOS
       FORMAT                  fdformat,
                               mount, umount           sintassi molto diversa
       HELP command            man command             stessa filosofia
       MD dirname              mkdir dirname/          quasi la stessa sintassi
       MOVE file1 file2        mv file1 file2          idem
       NUL                     /dev/null               idem
       PRINT file              lpr file                idem
       PRN                     /dev/lp0,
                               /dev/lp1                idem
       RD dirname              rmdir dirname/          quasi la stessa sintassi
       REN file1 file2         mv file1 file2          non per file multipli
       RESTORE                 tar -Mxpvf device       sintassi diversa
       TYPE file               less file               molto migliore
       WIN                     startx                  un mondo a parte!




  Se vi serve di piu' che una tabella di comandi, leggetevi le prossime
  sezioni.



  2.  File e programmi



  2.1.  File: nozioni preliminari


  Linux ha un file system---intendendo con cio' ``la struttura delle
  directory e dei file in esse contenuti''---molto simile a quello del
  DOS. I file hanno dei nomi che seguono certe regole, sono messi in
  directory, alcuni sono eseguibili, e tra questi ultimi molti hanno
  degli switch. Inoltre, ci sono i caratteri wildcards, la redirezione e
  il piping. Ci sono solo alcune piccole differenze:


    sotto DOS, i nomi dei file seguono la regola dell'8.3; per esempio,
     ILMIOFIL.TXT. Sotto Linux si puo' fare meglio. Se avete installato
     Linux con un filesystem come ext2 o umsdos, potete usare nomi piu'
     lunghi, e con piu' di un punto: per esempio,
     Ecco.un_NOME_molto.LUNGO. Notare che ho usato lettere maiuscole e
     minuscole: infatti...

    maiuscole e minuscole sono considerate diverse. Quindi,
     FILENAME.tar.gz e filename.tar.gz sono due file diversi.  ls e' un
     comando, LS e' un errore;

    gli utenti di Windows 95 possono usare i nomi di file lunghi con
     Linux, naturalmente. Se il nome di un file contiene spazi (pratica
     sconsigliata ma possibile), bisogna racchiudere il nome del file
     tra apici quando vi ci si riferisce. Per esempio:



       $ # questo comando crea una directory di nome "I miei file vecchi"
       $ mkdir "I miei file vecchi"
       $ ls
       I miei file vecchi      bin     tmp





  Alcuni caratteri non dovrebbero ma possono essere usati; tra gli
  altri, !*$&. Non vi spiego come.

    non ci sono estensioni obbligatorie come .COM ed .EXE per i
     programmi, o .BAT per i file batch. I files eseguibili sono
     contrassegnati da un asterisco '*' alla fine del loro nome quando
     si da' il comando ls -F. Per esempio:



       $ ls -F
       Direttorio/   cindy.jpg    cjpg*    lettera.txt    script*    vecchio~





  I files  cjpg* e script* sono eseguibili---``programmi''.  Sotto DOS,
  i file di backup hanno il nome che finisce in .BAK, sotto Linux finis
  cono con una tilde '~'. Inoltre, un file il cui nome inizia con un
  punto viene considerato un file nascosto. Per esempio, il file
  .io.sono.nascosto non apparira' dopo il comando ls.

    gli switch dei programmi DOS si ottengono con /switch, con i
     programmi Linux si ottengono con -switch or --switch. Esempio: dir
     /s  diventa ls -R. Notare che molti programmi DOS, come PKZIP o
     ARJ, hanno gli switch in stile Unix.

  Ora potete saltare alla sezione ``Tradurre i comandi dal DOS a
  Linux'', ma se fossi in voi continuerei a leggere.


  2.2.  Link simbolici


  Unix ha un tipo di file che il DOS non ha: il link simbolico. Questo
  e' un puntatore ad un file o directory, e puo' essere usato al posto
  del file o directory a cui punta; e' molto simile ai colegamenti di
  Windows 95. Esempi di link simbolici sono /usr/X11, che punta a
  /usr/X11R6; /dev/modem, che punta a /dev/cua0 o /dev/cua1.

  Per fare un link simbolico:



       $ ln -s <file_o_dir> <nomelink>




  Esempio:



       $ ln -s /usr/doc/g77/DOC g77manual.txt




  Ora potete riferirvi a g77manual.txt al posto di /usr/doc/g77/DOC.
  Ecco come appaiono i link quando date ls:



       $ ls -F
       g77manual.txt@
       $ ls -l
       (various things...)           g77manual.txt -> /usr/doc/g77/DOC






  2.3.  Permessi e Proprieta'


  I file e le directory DOS hanno i seguenti attributi: A (archivio), H
  (hidden, nascosto), R (read-only, solo lettura), and S (system, file
  di sistema). Solo H e R hanno senso sotto Linux: i files nascosti
  iniziano con un punto, e per quanto riguarda l'attributo R, continuate
  a leggere.

  Sotto Unix un file ha dei ``permessi'' e un proprietario, che
  appartiene ad un ``gruppo''. Guardate questo esempio:



       $ ls -l /bin/ls
       -rwxr-xr-x  1  root  bin  27281 Aug 15 1995 /bin/ls*




  Il primo campo contiene i permessi del file /bin/ls, che appartiene a
  root, gruppo bin. Tralasciando le altre informazioni (il libro di Matt
  Welsh e' li' per quello), ricordate che -rwxr-xr-x significa (da
  sinistra a destra):

  - e' il tipo di file (- = file normale, d = directory, l = link,
  etc.); rwx sono i permessi per il proprietario del file (read, write,
  execute); r-x sono i permessi per il gruppo cui il proprietario del
  file appartiene (non spieghero' il concetto di gruppo, ne potete fare
  a meno finch siete principianti ;-) r-x sono i permessi per tutti gli
  altri utenti (read, execute).
  Anche la directory /bin ha dei permessi: vedi la sezione ``Permessi
  delle directory'' per ulteriori dettagli. Ecco perch non potete
  cancellare il file /bin/ls, a meno che non siate root: non avete i
  permessi necessari. Per cambiare i permessi di un file, il comando e':



       $ chmod <whoXperm> <file>




  dove who e' u (user, cioe' proprietario), g (group, gruppo), o (other,
  altri), X e' + o -, perm e' r (read, lettura), w (write, scrittura), o
  x (execute, esecuzione). Esempi:



       $ chmod u+x file




  setta il permesso di esecuzione per il proprietario. Scorciatoia:
  chmod +x file.



       $ chmod go-rw file




  toglie i permessi di lettura e scrittura per tutti tranne il
  proprietario.



       $ chmod ugo+rwx file




  da' a tutti i permessi di lettura, scrittura ed esecuzione.



       # chmod +s file




  rende un file ``setuid'' o ``suid'': ciascuno lo puo' eseguire con i
  permessi del proprietario. Di solito si incontrano file ``suid root''.

  Una maniera piu' breve di riferirsi ai permessi e' con i numeri: rwxr-
  xr-x puo' essere espresso con 755 (ogni lettera corrisponde a un bit:
  --- e' 0, --x e' 1, -w- e' 2, -wx e' 3...). Sembra difficile, ma con
  un po' di pratica capirete il concetto.

  root, essendo il cossiddetto superutente, puo' cambiare i permessi di
  ogni file. C'e' molto di piu' sull'argomento---LMP.




  2.4.  Convertire i comandi dal DOS a Linux


  Alla sinistra, i comandi DOS; a destra, i corrispondenti comandi
  Linux.



       COPY:           cp
       DEL:            rm
       MOVE:           mv
       REN:            mv
       TYPE:           more, less, cat




  Operatori per la redirezione e il plumbing:  < > >> |

  Wildcards: * ?

  nul: /dev/null

  prn, lpt1:   /dev/lp0 or /dev/lp1; lpr

  - ESEMPI -



       DOS                                     Linux
       ---------------------------------------------------------------------

       C:\GUIDO>COPY JOE.TXT JOE.DOC           $ cp joe.txt joe.doc
       C:\GUIDO>COPY *.* TOTAL                $ cat * > total
       C:\GUIDO>COPY FRACTALS.DOC PRN         $ lpr fractals.doc
       C:\GUIDO>DEL TEMP                       $ rm temp
       C:\GUIDO>DEL *.BAK                     $ rm *~
       C:\GUIDO>MOVE PAPER.TXT TMP\          $ mv paper.txt tmp/
       C:\GUIDO>REN PAPER.TXT PAPER.ASC       $ mv paper.txt paper.asc
       C:\GUIDO>PRINT LETTER.TXT              $ lpr letter.txt
       C:\GUIDO>TYPE LETTER.TXT               $ more letter.txt
       C:\GUIDO>TYPE LETTER.TXT               $ less letter.txt
       C:\GUIDO>TYPE LETTER.TXT > NUL         $ cat letter.txt > /dev/null
               n/a                             $ more *.txt *.asc
               n/a                             $ cat section*.txt | less




  Note:


    * e' migliore sotto Linux: * prende tutti i file tranne quelli
     nascosti; .* tutti i file nascosti (ma anche la directory corrente
     `.'  e la directory genitrice `..'); *.* prende tutti i file che
     hanno un `.' nel mezzo o che finiscono per punto; p*a prende sia
     `pera' che `palla'; *l* prende sia `mela' che `filo';

    usando more, premere SPAZIO per leggere il file, `q' o CTRL-C per
     uscire. less e' piu' intuitivo, si possono usare i tasti freccia;

    non c'e' UNDELETE, quindi pensarci bene prima di cancellare un
     file;

    oltre a < > >> del DOS, Linux ha 2> per redirigere i messaggi di
     errore (stderr); inoltre, 2>&1 redirige stderr su stdout, mentre
     1>&2 redirige stdout su stderr;

    Linux ha un altro wildcard: la coppia []. Uso: [abc]* prende i file
     che cominciano con a, b, c; *[I-N,1,2,3] prende i file che
     finiscono con I, J, K, L, M, N, 1, 2, 3;

    non c'e' un RENAME alla DOS; cioe', mv *.xxx *.yyy non funziona.
     Potete usare questo script; dettagli alla sezione ``Shell
     Scripts''.


     ___________________________________________________________________
     #!/bin/sh
     # ren: rename multiple files according to several rules

     if [ $# -lt 3 ] ; then
       echo "usage: ren \"pattern\" \"replacement\" files..."
       exit 1
     fi

     OLD=$1 ; NEW=$2 ; shift ; shift

     for file in $*
     do
       new=echo ${file} | sed s/${OLD}/${NEW}/g
       mv ${file} $new
     done
     ___________________________________________________________________



  Attenti pero': non e' equivalente al REN del DOS, poich usa le ``reg
  ular expressions'' che non conoscete ancora. In breve, se volete cam
  biare le estensioni dei file, scrivete: ren ``htm$'' ``html'' *htm.
  Non dimenticate il $.

    usare cp -i e mv -i per essere avvisati se un file sta per essere
     sovrascritto.


  2.5.  Programmi: Multitasking e Sessioni


  Per far partire un programma, si scrive il suo nome come col DOS. Se
  la directory (Sezione ``Directories'') dove il programma risiede e'
  nel PATH (Sezione ``Files di inizializzazione''), il programma parte.
  Eccezione: sotto Linux, un programma che sta nella directory corrente
  non parte se la directory non e' inclusa nel PATH. Scappatoia: se prog
  e' il programma, scrivere ./prog.

  Questa e' una tipica linea di comando:



       $ command -s1 -s2 ... -sn par1 par2 ... parn < input > output




  dove -s1, ..., -sn sono gli switch del programma, par1, ..., parn sono
  gli argomenti del programma. Si possono dare piu' comandi sulla stessa
  linea:




  $ command1 ; command2 ; ... ; commandn




  Tutto qui per quanto riguarda i programmi, ma e' facile fare dei passi
  avanti. Uno dei vantaggi di Linux e' il multitasking: puo' far girare
  piu' programmi (d'ora in poi, processi) allo stesso tempo. Si possono
  lanciare programmi in background e continuare a lavorare. Inoltre,
  Linux mette a disposizione piu' sessioni di lavoro contemporanee: e'
  come avere tanti computer allo stesso tempo!


    Per passare di sessione in sessione (1..6) nelle console virtuali:



       $ ALT-F1 ... ALT-F6





    Per far partire un'altra sessione nella stessa console virtuale
     senza lasciare quella corrente:




       $ su - <loginname>





  Esempio:




       $ su - root





  Questo e' utile, tra l'altro, per usare i floppy (Sezione ``Flop
  pies''): normalmente, solo root lo puo' fare.

    Per chiudere una sessione:



       $ exit





  Se ci sono dei job sospesi (vedi piu' avanti) si viene avvisati.

    Per lanciare normalmente un processo in primo piano:




  $ progname [-switches] [parameters] [< input] [> output]





    Per lanciare un processo in background, aggiungere una `e
     commerciale'




       $ progname [-switches] [parameters] [< input] [> output] &
       [1] 123





  la shell identifica i processi dando loro un numero (es. [1]; vedi
  sotto) e un PID (123 nel nostro esempio).

    Per vedere quanti processi ci sono:



       $ ps -a





  Questo comando da' una lista dei processi attualmente in esecuzione.

    Per uccidere (terminare) un processo:



       $ kill <PID>





  Potreste dover uccidere un processo se non sapete come uscirne normal
  mente...  ;-). A volte, un processo si puo' uccidere solo con:



       $ kill -SIGKILL <PID>





  Oltre a questo, la shell consente di fermare o sospendere un processo,
  mandare un processo in background, e portare un processo dal back
  ground in primo piano. In questo contesto, i processi sono chiamati
  `job'.

    Per vedere quanti job ci sono:



       $ jobs

  qui i job sono identificati dal loro numero, non dal PID.

    Per fermare un job che gira in primo piano (non sempre funziona):



       $ CTRL-C





    Per sospendere un processo che gira in primo piano (idem):



       $ CTRL-Z





    Per mandare in background un processo sospeso:



       $ bg <job>





    Per portare un job in primo piano:



       $ fg <job>





    Per uccidere un job:



       $ kill <%job>





  dove <job> puo' essere 1, 2, 3, ...  Usando questi comandi si puo'
  formattare un disco, zippare dei files, compilare un programma e
  decompattare un archivio tutto allo stesso tempo, e ancora avere il
  prompt a disposizione. Provate a farlo col DOS! E provate con Windows,
  giusto per vedere la differenza in performance.


  2.6.  Eseguire programmi su computer remoti


  Per eseguire un programma su un computer remoto il cui indirizzo IP e'
  remote.bigone.edu, si fa:


       $ telnet remote.bigone.edu




  Dopo il login, si fa partire il programma. Ovviamente, bisogna avere
  uno shell account sul computer remoto.

  Se avete X11, si possono far girare anche applicazioni X sul computer
  remoto, e queste verranno visualizzate sul vostro schermo. Siano
  remote.bigone.edu il computer remoto e local.linux.box il vostro PC.
  Per far girare da local.linux.box un programma X che sta su
  remote.bigone.edu, si fa:


    far partire X11 ed un xterm o equivalente emulatore di terminale,
     poi digitare:



       $ xhost +remote.bigone.edu
       $ telnet remote.bigone.edu





    dopo il login, digitare:



       remote:$ DISPLAY=local.linux.box:0.0
       remote:$ progname &





  (invece di DISPLAY..., potreste dover scrivere: setenv DISPLAY
  local.linux.box:0.0. Dipende dalla shell remota.)

  Et voila! Ora progname parte su remote.bigone.edu e viene visualizzato
  sulla vostra macchina.  pero' meglio non provarci tramite modem,
  perch e' assolutamente troppo lento.



  3.  Usare le directory



  3.1.  Directory: nozioni preliminari


  Abbiamo visto le differenze tra i file sotto DOS e sotto Linux. Per
  quanto riguarda le directory, sotto DOS la directory principale e' \,
  sotto Linux e' /. In maniera analoga, le directory sono separate da \
  sotto DOS e da / sotto Linux. Esempio:



       DOS:    C:\PAPERS\GEOLOGY\MID_EOC.TEX
       Linux:  /home/guido/papers/geology/mid_eocene.tex



  Come al solito, .. e' la directory genitrice, . e' la directory
  corrente. Ricordate che il sistema non vi lascia fare cd, rd o md
  ovunque si vuole. Ogni utente ``risiede'' in una sua directory
  chiamata 'home', che viene assegnata dall'amministratore di sistema.
  Per esempio, sul mio PC la mia home directory e' /home/guido.


  3.2.  Permessi delle directory


  Anche le directory hanno i permessi. Quanto visto in Sezione
  ``Permessi'' vale anche per le directory (user, group, e other). Per
  una directory, rx significa che potete fare cd nella directory, e w
  significa che potete cancellare i file nella directory, o la directory
  stessa. Per esempio, per impedire ad altri utenti di curiosare in
  /home/guido/text:



       $ chmod o-rwx /home/guido/text





  3.3.  Tradurre i comandi dal DOS a Linux




       DIR:            ls, find, du
       CD:             cd, pwd
       MD:             mkdir
       RD:             rmdir
       DELTREE:        rm -R
       MOVE:           mv




  - ESEMPI -

























  DOS                                     Linux
  ---------------------------------------------------------------------

  C:\GUIDO>DIR                           $ ls
  C:\GUIDO>DIR FILE.TXT                  $ ls file.txt
  C:\GUIDO>DIR *.H *.C                   $ ls *.h *.c
  C:\GUIDO>DIR/P                         $ ls | more
  C:\GUIDO>DIR/A                         $ ls -l
  C:\GUIDO>DIR *.TMP /S                  $ find / -name "*.tmp"
  C:\GUIDO>CD                            $ pwd
          n/a - vedi nota                 $ cd
          idem                            $ cd ~
          idem                            $ cd ~/temp
  C:\GUIDO>CD \OTHER                    $ cd /other
  C:\GUIDO>CD ..\TEMP\TRASH                    $ cd ../temp/trash
  C:\GUIDO>MD NEWPROGS                   $ mkdir newprogs
  C:\GUIDO>MOVE PROG ..                  $ mv prog ..
  C:\GUIDO>MD \PROGS\TURBO                     $ mkdir /progs/turbo
  C:\GUIDO>DELTREE TEMP\TRASH           $ rm -R temp/trash
  C:\GUIDO>RD NEWPROGS                   $ rmdir newprogs
  C:\GUIDO>RD \PROGS\TURBO                     $ rmdir /progs/turbo




  Note:


  1. quando usate rmdir, la directory da cancellare deve essere vuota.
     Per cancellare una directory e tutto il suo contenuto, usate rm -R
     (a vostro rischio e pericolo).

  2. il carattere '~' e' una scorciatoia per il nome della home
     directory. I commandi cd o cd ~ portano nella home directory
     ovunque voi siate; il comando cd ~/tmp vi porta in
     /home/la_vostra_home/tmp.

  3. cd - ``annulla'' l'ultimo cd.


  4.  Floppy, hard disk, e cosi' via



  4.1.  Gestire i dispositivi


  Forse non ci avete mai pensato, ma il comando DOS FORMAT A: fa molte
  piu' cose di quanto sembri. Infatti, quando date il comando FORMAT
  quello 1) formatta fisicamente il disco; 2) crea la directory A:\
  (crea un filesystem); 3) rende il disco accessibile all'utente (= fa
  il cosiddetto ``mount'').

  Questi tre passaggi si fanno separatamente con Linux. Si possono usare
  floppy formattati da DOS, ma ci sono altri formati che di solito e'
  meglio usare (il filesystem DOS non consente di usare i nomi lunghi
  per i file.)

  Ecco come si prepara un floppy (bisogna essere root):


    per formattare un floppy standard da 1.44: (A:):


       # fdformat /dev/fd0H1440

    per creare un filesystem:


       # mkfs -t msdos -c /dev/fd0H1440





  Per creare un filesystem MS-DOS, usate msdos invece di ext2.  Prima di
  usare il disco, bisogna ``montarlo''.

    per montare il floppy:


       # mount -t ext2 /dev/fd0 /mnt




  oppure


       # mount -t msdos /dev/fd0 /mnt





  Ora si puo' accedere ai file del floppy. Quando si ha finito, prima di
  estrarre il floppy bisogna ``smontarlo''.

    per smontare il floppy:


       # umount /mnt





  Ora potete estrarre il disco. Ovviamente, eseguire fdformat e mkfs
  solo per floppy nuovi, non per quelli gia' preparati. Se volete usare
  il floppy B:, basta sostituire fd1H1440 e fd1 al posto di fd0H1440 e
  fd0 negli esempi visti sopra.

  Tutto quello che facevate con A: o B: si fa ora usando /mnt.  Esempi:




       DOS                                     Linux
       ---------------------------------------------------------------------

       C:\GUIDO>DIR A:                        $ ls /mnt
       C:\GUIDO>COPY A:*.*                    $ cp /mnt/* .
       C:\GUIDO>COPY *.ZIP A:                 $ cp *.zip /mnt
       C:\GUIDO>A:                            $ cd /mnt
       A:>_                                    /mnt/$ _




  Se non vi piace questa faccenda di montare/smontare i dischi, usate la
  suite mtools: si tratta di un insieme di comandi equivalenti a quelli
  del DOS, ma che iniziano con la `m': mformat, mdir, mdel e cosi' via.
  Funzionano anche con i nomi lunghi, ma si perdono i permessi dei file.
  Usate questi comandi come usereste quelli DOS, e siete a posto.

  Inutile dire che quanto visto per i floppy vale anche per altri
  dispositivi; per esempio, si possono montare un altro disco fisso o un
  lettore di CD-ROM.  Ecco come si monta il CD-ROM:



       # mount -t iso9660 /dev/cdrom /mnt




  Questa era la maniera ``ufficiale'' di montare i dischi, ma c'e' un
  trucchetto. Dover essere root per usare un floppy e' una scocciatura,
  quindi per consentire ad ogni utente di accedervi si puo' fare cosi':


    come root, date questi comandi:



       ~# mkdir /mnt/a: ; mkdir /mnt/a ; mkdir /mnt/cdrom
       ~# chmod 777 /mnt/a* /mnt/cd*
       ~# # assicuratevi che il device del CD-ROM e' quello giusto
       ~# chmod 666 /dev/hdb ; chmod 666 /dev/fd*





    aggiungere in /etc/fstab le linee seguenti:


       /dev/cdrom      /mnt/cdrom  iso9660 ro,user,noauto          0       0
       /dev/fd0        /mnt/a:     msdos   user,noauto             0       0
       /dev/fd0        /mnt/a      ext2    user,noauto             0       0





  Ora per montare un floppy DOS, uno in formato ext2 e un CD-ROM si fa
  semplicemente:



       $ mount /mnt/a:
       $ mount /mnt/a
       $ mount /mnt/cdrom




  /mnt/a, /mnt/a: e /mnt/cdrom sono accessibili da tutti. Ricordate che
  consentire a tutti di montare dischi in questo modo e' un grosso
  problema di sicurezza, se la cosa vi puo' interessare.



  4.2.  Fare il backup


  Ora che sapete come gestire i dispositivi, due righe per vedere come
  si fa il backup. Ci sono molti programmi per questo scopo, ma il
  minimo necessario che si puo' fare per un backup multivolume su floppy
  e' quanto segue (diventate root):



       # tar -M -cvf /dev/fd0H1440 /dir_to_backup




  Assicuratevi di avere un floppy formattato nel drive, e altri pronti a
  disposizione. Per fare il restore, inserite il primo floppy nel drive
  e immettete:



       # tar -M -xpvf /dev/fd0H1440






  5.  E Windows?


  L'``equivalente'' di Windows e' l'ambiente grafico X11. A differenza
  di Windows o del Mac, X11 non e' stato progettato per la facilita'
  d'uso o per risultare attraente, ma per fornire capacita' grafiche
  alle workstation UNIX.  Ecco le differenze principali:


    Windows ha sempre lo stesso look and feel, X11 no: e' di gran lunga
     piu' configurabile. L'aspetto generale di X11 e' dato da un
     componente importantissimo chiamato ``window manager''; ce ne sono
     molti tra cui scegliere. I piu' comuni sono fvwm, semplice ma
     gradevole ed efficiente in termini di memoria, fvwm2-95 e The Next
     Level che danno a X11 un aspetto simile a Windows 95, piu' molti
     altri.  Alcuni sono davvero bellissimi;

    il window manager puo' essere configurato in modo tale che una
     finestra si comporta come quelle di Windows: cliccate su di essa
     per portarla in primo piano. In alternativa, si puo' fare in modo
     che una finestra sia in primo piano quando il puntatore del mouse
     e' sopra di essa.  Questa caratteristica (``focus'') e molte altre
     si modificano adattando uno o piu' file di configurazione. Leggete
     la documentazione del vostro window manager;

    i programmi di X11 sono scritti usando speciali librerie (``widget
     set''); ce ne sono svariate, e quindi i programmi possono avere un
     aspetto diverso. I piu' elementari usano i widget Athena (aspetto
     2--D; xdvi, xman, xcalc), altri usano Motif (netscape), altri
     ancora usano Tcl/Tk, XForms, Qt ed altri ancora.  Alcuni di questi
     widget set danno ai programmi un aspetto simile a quello dei
     programmi Windows;

    questo riguardava il ``look'' dei programmi, ma il ``feel''?
     Purtroppo, tutti i programmi si comportano in modo diverso. Per
     esempio, se selezionate una linea di testo e premete BACKSPACE vi
     aspettereste che la linea scomparisse, vero? Questo non funziona
     con i programmi Athena, ma funziona con quelli Motif, Qt e Tcl/Tk;

    barre di scorrimento, ridimensionamento, iconizzazione: anche
     queste cose dipendono dal window manager e dal widget set. Ci
     sarebbero troppe cose da dire, quindi ve ne indichero' solo una,
     poco intuitiva. Quando usate le applicazioni Athena, le barre di
     scorrimento si spostano usando il tasto centrale del mouse, oppure
     i tasti destro e sinistro insieme;

    i programmi non hanno un'icona per default, ma ne possono avere
     tante. Dipende dal window manager. Il desktop e' chiamato ``root
     window'' e se ne modifica l'aspetto con programmi come xsetroot o
     xloadimage;

    la clipboard puo' contenere solo testo e si comporta in modo
     strano.  Quando del testo viene selezionato, e' anche
     automaticamente copiato nella clipboard: spostatevi in un altro
     punto e premete il tasto centrale per copiarlo nella nuova
     locazione. C'e' un programma, xclipboard, che fornisce buffer
     multipli per la clipboard;

    drag and drop e' un'opzione ed e' supportato solo da alcuni
     programmi.

  Per risparmiare memoria, e' meglio usare applicazioni che usano gli
  stessi widget set, ma e' difficile da fare in pratica. C'e' un
  progetto chiamato K Desktop Environment che vuole rendere X11 coerente
  nel look and feel come lo e' Windows; attualmente e' solo in beta ma,
  credetemi, e' meraviglioso. Rendera' l'interfaccia di Windows una cosa
  di cui vergognarsi. Puntate il vostro browser su http://www.kde.org.



  6.  Configurare il sistema



  6.1.  File di inizializzazione


  Due file importanti sotto DOS sono AUTOEXEC.BAT e CONFIG.SYS, e
  vengono usati al momento del boot per inizializzare il sistema,
  settare le variabili d'ambiente come PATH e FILES, e magari lanciare
  un programma o batch file. Sotto Linux ci sono tanti file di
  inizializzazione, e con molti di questi e' meglio non pasticciare
  finch non si sa esattamente cosa si sta facendo. Vi diro' comunque
  quali sono i piu' importanti:




       FILES                                   NOTES

       /etc/inittab                            non toccare!
       /etc/rc.d/*                             idem




  Se tutto quello che vi serve e' settare il PATH o qualche altra
  variabile, o se volete cambiare i messaggi di login o lanciare un
  programma subito dopo il login, date un'occhiata ai seguenti:










  FILES                                   NOTES

  /etc/issue                              setta i messaggi pre-login
  /etc/motd                               setta i messaggi post-login
  /etc/profile                            setta PATH e altre variabili, etc.
  /etc/bashrc                             setta alias e funzioni globali
  /home/your_home/.bashrc                 setta i vostri alias e funzioni
  /home/your_home/.bash_profile  oppure
  /home/your_home/.profile                setta il vostro environment, etc.




  Se l'ultimo file esiste (notare che e' un file nascosto), verra' letto
  dopo il login e i suoi comandi vengono eseguiti.

  Esempio: date un occhio a questo .profile:


  ______________________________________________________________________
  # Io sono un commento
  echo Environment:
  printenv | less   # equivalente del comando SET sotto DOS
  alias d='ls -l'   # facile capire cos'e' un alias
  alias up='cd ..'
  echo "Ti ricordo che il path e' " $PATH
  echo "Oggi e' `date`"  # usa l'output del comando 'date'
  echo "Buongiorno " $LOGNAME
  # Questa e' una "funzione della shell":
  ctgz() # Lista i contenuti di un archivio .tar.gz.
  {
    for file in $*
    do
      gzip -dc ${file} | tar tf -
    done
  }
  # fine di .profile
  ______________________________________________________________________



  $PATH e $LOGNAME, avete indovinato, sono variabili d'ambiente. Ce ne
  sono molte altre con cui giochicchiare; LMP di programmi come less o
  bash.



  6.2.  File di inizializzazione dei programmi


  Sotto Linux, praticamente tutto puo' essere personalizzato. Molti
  programmi hanno uno o piu' file di inizializzazione che potete
  modificare, spesso sotto forma di  .nome_del_programmarc nella vostra
  home. I primi che vorrete modificare sono:


     .inputrc: usato da bash per definire i tasti.

     .xinitrc: usato da startx per initializzare X Window System.

     .fvwmrc: usato dal window manager fvwm. Un esempio e' in:
     /usr/lib/X11/fvwm/system.fvwmrc

     .Xdefault: usato da rxvt, un emulatore di terminale per X, e altri
     programmi.

  Per tutti questi e gli altri che prima o poi incontrerete, LMP.



  7.  Un po' di programmazione



  7.1.  Shell script: super file .BAT


  Se usavate i file .BAT per creare diminutivi di lunghe linee di
  comando (io lo facevo spesso), questo si puo' ottenere inserendo degli
  alias in profile o .profile. Ma se i vostri .BAT erano piu' complessi,
  vi piacera' il linguaggio di scripting della shell: e' potente come il
  QBasic, se non di piu'. Ha variabili, strutture come while, for, case,
  if... then... else, e molte altre caratteristiche: puo' essere una
  buona alternativa ad un ``vero'' linguaggio di programmazione.

  Per scrivere un file script---l'equivalente di un .BAT file sotto
  DOS---non si fa altro che scrivere un file ASCII contenente le
  istruzioni, lo si salva e poi lo si rende eseguibile col comando
  chgmod +x <scriptfile>. Per eseguirlo si scrive il suo nome.

  Attenzione pero'. L'editor di sistema si chiama vi, e ho visto che
  molti nuovi utenti lo trovano molto difficile da usare. Non spieghero'
  come usarlo perch non mi piace e non lo uso; consultate ``Linux
  installation...'' di Matt Welsh, a pag. 109. (Fareste meglio a
  procurarvi un altro editor come joe o emacs per X.) Basti dire che:


    per inserire del testo, premete 'i' e poi il testo;

    per uscire da vi senza salvare, premete ESC e poi :q!

    per salvare e uscire, premete ESC e poi :wq

  Scrivere script sotto bash e' un argomento cosi' vasto che
  richiederebbe un libro per conto suo, e non daro' spiegazioni ma solo
  un esempio piuttosto completo di shell script, dal quale potrete
  intuire le regole di base:

























  ______________________________________________________________________

  #!/bin/sh
  # esempio.sh
  # Io sono un commento
  # non cambiate la prima linea, deve restare cosi' com'e'
  echo "Questa macchina e': `uname -a`" # usa l'output del comando
  echo "Il mio nome e' $0" # variabile interna
  echo "Mi hai dato i seguenti $# argomenti: " $*
  echo "Il primo argomento e': " $1
  echo -n "Come ti chiami? " ; read nome
  echo guarda la differenza: "ciao $nome" # meccanismo di quoting con "
  echo guarda la differenza: 'ciao $nome' # meccanismo di quoting con '
  DIRS=0 ; FILES=0
  for file in `ls .` ; do
    if [ -d ${file} ] ; then # se file e' una directory
      DIRS=`expr $DIRS + 1`  # DIRS = DIRS + 1
    elif [ -f ${file} ] ; then
      FILES=`expr $FILES + 1`
    fi
    case ${file} in
      *.gif|*jpg) echo "${file}: file grafico" ;;
      *.txt|*.tex) echo "${file}: file di testo" ;;
      *.c|*.f|*.for) echo "${file}: file sorgente" ;;
      *) echo "${file}: file generico" ;;
    esac
  done
  echo "ci sono ${DIRS} directories e ${FILES} files"
  ls | grep "ZxY--!!!WKW"
  if [ $? != 0 ] ; then # exit code dell'ultimo comando
    echo "non ho trovato ZxY--!!!WKW"
  fi
  echo "basta cosi'... scrivi 'man bash' se vuoi altre informazioni."
  ______________________________________________________________________





  7.2.  Programmare in C


  Sotto Unix, il linguaggio di programmazione per eccellenza e' il C, vi
  piaccia o no. Ci sono anche molti altri linguaggi a disposizione
  (FORTRAN, Pascal, Lisp, Basic, Perl, awk...).

  Dato per scontato che conosciate il C, ecco qui un paio di linee guida
  per quelli di voi che sono stati viziati dal Turbo C++ o analogo
  compilatore. Il compilatore C di Linux si chiama gcc e non ha tutte
  quelle cose che di solito accompagnano un compilatore per DOS: niente
  IDE, aiuto in linea, debugger integrato e cosi' via.  solo un
  compilatore a linea di comando, molto potente ed efficiente. Per
  compilare il classico hello.c si fa cosi':



       $ gcc hello.c




  che produce di default un eseguibile chiamato a.out. Per dargli un
  nome diverso:



  $ gcc -o ciao hello.c




  Per linkare una libreria al programma, si aggiunge lo switch
  -l<libname>. Per esempio, per linkare la libreria matematica:



       $ gcc -o mathprog mathprog.c -lm




  (Lo switch -l<libname> fa linkare a gcc la libreria
  /usr/lib/lib<libname>.a; quindi -lm linka /usr/lib/libm.a).

  Finora, tutto bene. Ma se il vostro programma e' composto da molti
  file sorgenti, vi servira' l'utility make. Supponiamo che avete
  scritto un parser per espressioni: il sorgente si chiama parser.c e
  #include due file header, parser.h e xy.h. Volete usare le routine di
  parser.c in un programma, diciamo calc.c, che a sua volta #include
  parser.h. Che casino! Cosa bisogna fare per compilare calc.c?

  Dovrete scrivere un cosiddetto makefile, che insegna al compilatore
  quali sono le dipendenze tra sorgenti e files oggetto. Nel nostro
  caso:


  ______________________________________________________________________

  # Questo e' makefile, usato per compilare calc.c
  # Premere il tasto <TAB> dove indicato

  calc: calc.o parser.o
  <TAB>gcc -o calc calc.o parser.o -lm
  # calc dipende da due files oggetto: calc.o e parser.o

  calc.o: calc.c parser.h
  <TAB>gcc -c calc.c
  # calc.o dipende da due files sorgenti

  parser.o:  parser.c parser.h xy.h
  <TAB>gcc -c parser.c
  # parser.o dipende da tre files sorgenti

  # end of makefile.
  ______________________________________________________________________



  Salvate questo file come makefile e scrivete make per compilare il
  programma; in alternativa, salvatelo come calc.mak e scrivete make -f
  calc.mak. Ovviamente, LMP. Potete ottenere aiuto sulle funzioni del C,
  che sono illustrate da pagine man, sezione 3; per esempio,



       $ man 3 printf




  Ci sono tantissime librerie disponibili; tra le prime che vorrete
  usare ci sono ncurses, per gestire effetti in modo testo, e svgalib,
  per fare grafica. Se vi sentite abbastanza coraggiosi da affrontare la
  programmazione sotto X, procuratevi XForms (
  bloch.phys.uwm.edu/pub/xforms) e/o una delle tante librerie che
  rendono facile la programmazione sotto X. Date un'occhiata a
  http://www.xnet.com/~blatura/linapp6.html .

  Molti editor possono fungere da IDE; emacs e jed, ad esempio, hanno
  l'evidenziazione della sintassi, l'indent automatico e altre cose.
  Oppure, prendete il programma rhide da
  sunsite.unc.edu:/pub/Linux/devel/debuggers/. E' un clone della IDE
  Borland, e probabilmente vi piacera'.



  8.  Il rimanente 1%



  8.1.  Usare tar  & gzip


  Sotto Unix ci sono alcune applicazioni usatissime per archiviare e
  comprimere i file. tar e' usato per fare archivi---e' come PKZIP ma
  non comprime, archivia soltanto. Per fare un nuovo archivio:



       $ tar -cvf <archive_name.tar> <file> [file...]




  Per estrarre files da un arhivio:



       $ tar -xpvf <archive_name.tar> [file...]




  Per listare il contenuto di un archivio:



       $ tar -tf <archive_name.tar> | less




  I file si comprimono con compress, che e' obsoleto e non dovrebbe
  essere piu' usato, o con gzip:



       $ compress <file>
       $ gzip <file>




  che crea un file file compresso con estensione .Z (compress) o .gz
  (gzip). Questi programmi comprimono solo un file alla volta. Per
  decomprimere, scrivete


       $ compress -d <file.Z>
       $ gzip -d <file.gz>




  LMP.

  Ci sono anche unarj, zip e unzip (PK??ZIP compatibile). I files con
  estensione .tar.gz o .tgz (archivi fatti con tar e compressi con gzip)
  sono comuni nel mondo Unix come i files .ZIP sotto DOS. Per listare i
  contenuti di un file .tar.gz:



       $ gzip -dc <file.tar.gz> | tar tf - | less





  8.2.  Installare le applicazioni


  Prima di tutto: installare nuove applicazioni e' compito di root.
  Alcune applicazioni Linux sono distribuite come archivi .tar.gz o
  .tgz, fatti in modo da poter essere scompattati dalla directory / col
  seguente comando:



       # gzip -dc <file.tar.gz> | tar xvf -




  oppure, in modo equivalente,



       $ tar -zxf <file.tar.gz>




  I file vengono decompressi nella directory giusta, che viene creata
  sul momento. Gli utenti della distribuzione Slackware hanno il
  programmino pkgtool; un altro e' rpm, disponibile per tutte le
  distribuzioni grazie a Red Hat.

  Altri package non possono essere installati da /; tipicamente,
  l'archivio contiene una directory chiamata nome_programma/ e tanti
  files e/o sottodirectories sotto nome_programma/. Una regola e' quella
  di installare questi programmi da /usr/local. Inoltre, altri programmi
  sono distribuiti come sorgenti in C o C++ che vanno compilati per fare
  gli eseguibili. In molti casi, basta dare make; ovviamente vi servira'
  il compilatore gcc.


  8.3.  Trucchi indispensabili


  Command completion: premere <TAB> mentre si scrive un comando al
  prompt completa la linea di comando. Esempio: dovete scrivere gcc
  nome_file_molto_lungo.c; scrivendo gcc nome<TAB> e' sufficiente. (Se
  avete altri file che cominciano con gli stessi caratteri, scrivete
  altre lettere per risolvere l'ambiguita').

  Backscrolling: premendo SHIFT + PAG UP (tasto grigio) consente di fare
  lo scroll all'indietro dello schermo, a seconda di quanta memoria
  video avete;

  Resettare lo schermo: puo' capitare di fare more o cat di un file
  binario, e come conseguenza lo schermo potrebbe riempirsi di
  schifezze.  Per rimettere a posto, battere alla cieca reset o questa
  sequenza di caratteri: echo CTRL-V ESC c RETURN;

  Incollare il testo: per la console, vedete sotto; in X, fate click e
  trascinate per selezionare il testo in una finestra xterm, poi premete
  il tasto di mezzo (o i due bottoni insieme se non avete tre tasti) per
  incollare il testo selezionato altrove. C'e' anche il programma
  xclipboard (purtroppo solo per il testo); non fatevi confondere dal
  suo lentissimo tempo di risposta;

  Usare il mouse: installate gpm, un mouse driver per la console.  Fate
  click e trascinate per selezionare il testo, poi fate click col tasto
  destro per incollare il testo selezionato. Funziona anche tra diverse
  VC.

  Messaggi dal kernel: date un occhio a /var/adm/messages o
  /var/log/messages come root per vedere i messaggi del kernel, compresi
  i messaggi in fase di boot. Anche il comando dmesg e' molto utile.



  8.4.  Programmi e comandi utili


  Ovviamente, questa lista riflette i miei gusti e le mie necessita'
  personali.  Prima di tutto, dove trovarli: sapete tutti come usare la
  rete, archie ed ftp, quindi vi daro' solo gli indirizzi piu'
  importanti che riguardano Linux: sunsite.unc.edu, tsx-11.mit.edu, e
  nic.funet.fi. Usate il vostro mirror piu' vicino.


    at serve per eseguire comandi e programmi ad un'ora o data
     specifica;

    awk e' un linguaggio di programmazione, semplice ma potente, per
     manipolare file di dati (e non solo). Per esempio, se avete un file
     di dati a piu' campi chiamato data.dat,



       $ awk '$2 ~ "abc" {print $1, "\t", $4}' data.dat





  scrive i campi 1 e 4 di ogni linea in data.dat il cui secondo campo
  contiene ``abc''.

    delete-undelete fanno quello che il loro nome suggerisce;

    df da' informazioni sui dischi montati;

    dosemu consente di far girare molte (anche se non tutte)
     applicazioni DOS, incluso Windows 3.x se ci smanettate un bel po';

    file <filename> dice che cos'e' filename (file ASCII, eseguibile,
     archivio, etc.);
    find (vedi anche Sezione ``Directories'') e' uno dei comandi piu'
     utili e potenti. Si usa per trovare file che rispondono a certi
     criteri ed eseguire azioni su si essi.  Uso generale di find:



       $ find <directory> <espressione>





  dove <espressione> include criteri di ricerca ed azioni da eseguire.
  Esempi:



       $ find . -type l -exec ls -l {} \;





  trova i file che sono link simbolici e mostra a cosa puntano.



       $ find / -name "*.old" -ok rm {} \;





  trova i files che corrispondono al pattern e li cancella, chiedendo
  prima il permesso di farlo.



       $ find . -perm +111





  trova i file i cui permessi corrispondono con 111 (eseguibile).



       $ find . -user root





  trova i files che appartengono a root. Ci sono molte altre possi
  bilita', LMP.

    gnuplot e' un bel programma per il plotting scientifico;

    grep trova pattern in file di testo. Per esempio,




       $ grep -l "geology" *.tex

  lista tutti i files *.tex che contengono la parola ``geology''. La
  variante zgrep agisce su file gzippati. LMP;

    joe e' un buon editor. Lanciandolo come jstar si ottengono le
     stesse combinazioni di tasti di WordStar e dei suoi discendenti,
     compresi l'editor del DOS e quello dei linguaggi Borland;

    less e' probabilmente il migliore visualizzatore di file di testo,
     e se configurato consente di visualizzare archivi gzip, tar e zip;

    lpr <file> stampa un file in background. Per controllare lo stato
     della coda di stampa, usate lpq; per cancellare un file dalla coda
     di stampa, usate lprm;

    mc e' un bellissimo file manager;

    pine e' un buon programma per la posta elettronica;

    script <script_file> copia su script_file tutto quello che appare
     sullo schermo fino a quando non date il comando exit.  Utile per il
     debugging;

    sudo permette di eseguire alcuni dei compiti solitamente concessi
     solo a root (es. formattare e montare dischi; LMP);

    tcx comprime files eseguibili mantenendoli eseguibili;

    uname -a da' informazioni sul sistema;

    zcat e zless sono utili per visualizzare file gzippati senza
     decomprimerli. Per esempio:



       $ zless textfile.gz
       $ zcat textfile.gz | lpr





    I seguenti comandi risultano spesso utili: bc, cal, chsh, cmp, cut,
     fmt, head, hexdump, nl, passwd, printf, sort, split, strings, tac,
     tail, tee, touch, uniq, w, wall, wc, whereis, write, xargs, znew.
     LMP.


  8.5.  Estensioni di file e programmi collegati


  Potrete incontrare tantissime estensioni di file. A parte le piu'
  esotiche (ad es. fonts, etc.), ecco una lista:


    1 ... .8: man page. Procuratevi man.

    arj: archivio fatto con arj. unarj per estrarre i file.

    dvi: output file prodotto da TeX (vedi sotto). xdvi per
     visualizzare; dvips per convertire in un file .ps (postscript)

    gif: file grafico. Procuratevi seejpeg o xpaint.

    gz: file compresso con gzip.


    info: file info (una specie di alternativa alle man pages.).
     Procuratevi info.

    jpg, jpeg: file grafico. Procuratevi seejpeg.

    lsm: Linux Software Map file.  un file ASCII contenente la
     descrizione di un package.

    ps: file postscript. Per visualizzare o stampare, usare gs e,
     opzionalmente, ghostview.

    tgz, tar.gz: archivio fatto con tar e poi compresso con gzip.

    tex: file di testo da comporre con TeX, un potente programma di
     impaginazione. Procurarsi tex, disponibile in molte distribuzioni;
     attenti alla distribuzione NTeX, che ha dei font corrotti ed e'
     parte di Slackware fino alla versione 96.

    texi: file texinfo (vedi .info). Procuratevi texinfo.

    xbm, xpm, xwd: file grafici. Procuratevi xpaint.

    Z: file compresso con compress.

    zip: archivio fatto con zip. Procuratevi zip e unzip.


  9.  La fine, per ora


  Congratulazioni! Ora avete un po' di conoscenza di Unix e siete pronti
  per iniziare a lavorare. Ricordate che la vostra conoscenza del
  sistema e' ancora limitata, e che dovreste fare pratica per usare
  Linux senza problemi. Ma se tutto quello che dovete fare e' prendere
  un po' di programmi e darci sotto, sono sicuro che quanto ho incluso
  e' sufficiente.

  Sono certo che usare Linux vi piacera' e continuerete ad imparare cose
  nuove---lo fanno tutti. Scommetto, inoltre, che non ritornerete al
  DOS!  Spero di essere stato chiaro e di aver reso un buon servizio ai
  miei 3 o 4 lettori.


  9.1.  Copyright


  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.


  If you have questions, please contact Greg Hankins, the Linux HOWTO
  coordinator, at gregh@sunsite.unc.edu via email.


  9.2.  Disclaimer


  ``Dal DOS a Linux HOWTO'' e' stato scritto da Guido Gonzato,
  guido@ibogfs.cineca.it. Ringraziamenti vanno a Matt Welsh, autore di
  ``Linux Installation e Getting Started'', a Ian Jackson, autore di
  ``Linux frequently asked questions with answers'', a Giuseppe Zanetti,
  autore di ``Linux'', a tutti quelli che mi hanno mandato mail di
  suggerimenti, e specialmente a Linus Torvalds e GNU che ci hanno dato
  Linux.

  Questo documento viene fornito ``as is''. Mi sono sforzato di
  scriverlo con la massima accuratezza, ma usate le informazioni qui
  contenute a vostro rischio. Non saro' responsabile in alcun caso di
  danni provocati da questo documento.

  Ogni forma di feedback e' benvenuta. Per richieste, suggerimenti,
  flames etc.  contattatemi pure.

  Divertitevi con Linux e godetevi la vita,

  Guido   =8-)








































  Linux Distribution HOWTO
  Eric S. Raymond <esr@thyrsus.com>
  v6.3, 8 maggio 1999

  Con questo documento si intende facilitare ai nuovi utenti di questo
  sistema la scelta della distribuzione di Linux da adottare ed altres
  aiutare gli utenti gi esperti a mantenere aggiornata la loro
  conoscenza della rosa di scelte disponibili. L'autore non intende man
  tenere una lista completa di tutte le distribuzioni Linux esistenti su
  tutte le piattaforme e si limiter ad analizzare le principali dis
  tribuzioni in lingua inglese per processori Intel e compatibili.
  Traduzione di Federico Lucifredi <flucifredi@acm.org>, ottobre 1999.

  1.  Introduzione

  Non esiste una singola distribuzione di Linux - esistono molteplici
  distribuzioni di tale sistema operativo disponibili via FTP anonimo o
  su CD-ROM.

  Questo documento si prefigge lo scopo di fornire brevi descrizioni
  delle distribuzioni in lingua inglese disponibili su CD-ROM e di
  fornire indicazioni al lettore sul come e dove procurarsi ulteriori
  informazioni in merito. Una distribuzione in lingua tedesca era
  mantenuta da Marco Budde ma sembra non essere pi disponibile.
  L'autore non  a conoscenza di distribuzioni basate su lingue diverse
  da quelle inglese e tedesca.

  Questo documento non ha la pretesa di essere esaustivo: vi sono altre
  distribuzioni di Linux oltre a quelle qui elencate. Per la natura
  stessa del software Open Source,  sufficiente per qualcuno cambiare
  qualcosa nella sua installazione di Linux e rendere queste modifiche
  disponibili ad altri per creare una nuova ``distribuzione''. Un
  documento come questo deve stabilire qualche sorta di limite nel campo
  che si intende coprire e l'autore ha scelto la disponibilit su CD
  come tale criterio. Tale criterio non rappresenta assolutamente la
  definizione  di distribuzione Linux.  Esistono numerose distribuzioni
  minori che offrono cose che le distribuzioni principali non
  forniscono, non ultima la compattezza della distribuzione stessa.

  Come si  gi detto in precedenza, esistono numerose distribuzioni di
  Linux che non vengono elencate in questo documento. Se il lettore 
  associato con lo sviluppo di una distribuzione disponibile su CD-ROM
  che non viene elencata in questa sede, veda il paragrafo ``Come
  sottoporre aggiunte e/o correzioni a questo HOWTO'' verso la fine di
  questo documento. Sottoporre nuovo materiale all'autore  semplice e
  dovrebbe richiedere meno di cinque minuti del vostro tempo.

  Per una pi completa lista delle distribuzioni disponibili si veda la
  Linux HQ Distributions List <http://www.linuxhq.com/dist-index.html>.

  Liberatoria: L'autore non fornisce nessuna garanzia sulla correttezza
  delle informazioni, dei prezzi o dei dettagli relativi alle modalit
  d'ordine forniti in questo documento. Si controlli il campo ``ultimo
  aggiornamento'' per verificare quanto tale informazione sia corrente e
  si faccia riferimento alla home-page del produttore per ottenere
  informazioni aggiornate. Inoltre, qualora non sia espressamente
  dichiarato diversamente, le stesse distribuzioni di Linux non
  provvedono ASSOLUTAMENTE NESSUNA GARANZIA.

  L'autore cerca di restare legato a fatti oggettivi in questo HOWTO, ma
  egli non  scevro da opinioni in materia. Se tali opinioni risultano
  di vostro interesse le potete trovare nel paragrafo ``Raccomandazioni
  dell'autore''.

  Disclosure: Io (Eric S. Raymond) non ho nessuna forma di connessione
  finanziaria con alcun produttore di una distribuzione Linux n ho
  accettato qualsiasi forma di remunerazione o omaggio da tali
  produttori -- eccezion fatta per una copia gratuita del del loro
  prodotto a scopo di recensione (e per una T-shirt dalla Red Hat).


  1.1.  Nuove versioni di questo documento

  Questo documento viene postato regolarmente ogni mese nel newsgroup
  comp.os.linux.answers ed  archiviato in un certo numero di siti FTP,
  tra i quali ricordiamo metalab.unc.edu sotto la directory
  pub/Linux/docs/HOWTO.


  L'ultima versione rilasciata di questo documento  inoltre accessibile
  sul World Wide Web all'URL
  <http://metalab.unc.edu/mdw/HOWTO/Distribution-HOWTO.html>.

  La traduzione italiana  disponibile nel sito dell'Italian LDP (ILDP)
  <www.pluto.linux.it/ildp/index.html> (NdT).

  L'autore incoraggia commenti e domande su questo documento e pu
  essere contattato via e-mail all'indirizzo esr@snark.thyrsus.com.
  Evitate di contattare l'autore con richieste di aiuto nello scegliere
  una specifica distribuzione o con domande su Linux in generale a meno
  che non intendiate assumerlo come consulente -- l'autore non ha
  abbastanza tempo per rispondere a tali richieste e questo documento
  rappresenta uno sforzo nel raccogliere tutto ci che egli potrebbe
  comunque consigliarvi.


  1.2.  Recenti modifiche

  Yggdrasil Plug-And-Play e Craftworks Linux non sembrano essere pi
  disponibili per la vendita. DOSLINUX  stato rimosso a causa della sua
  natura specialistica.


  1.3.  Panoramica del mercato

  Un tempo (1993 circa), una distribuzione di Linux era qualcosa che si
  scaricava da Internet su alcuni floppy. L'installazione era un
  processo estremamente laborioso e frustrante.

  In seguito entrarono in scena i primi drive CD-ROM economici e i CD-
  ROM rappresentano il mezzo ideale per archiviare economicamente grandi
  volumi di software di sistema. Esiste ora una piccola industria che
  vive sulle distribuzioni commerciali di Linux e siccome questi
  distributori dispongono di risorse economiche che vengono impiegate
  nel fornire supporto ai clienti e in marketing, queste societ
  dominano il mercato delle distribuzioni di Linux in maniera sempre
  crescente. Debian  l'ultima distribuzione non commerciale che
  mantiene una significativa quota di mercato e persino in questo caso
  sembra che la distribuzione si diffonda principalmente a mezzo CD-ROM.

  La maggior parte delle distribuzioni disponibili su CD-ROM (ivi
  incluse Slackware, Yggdrasil e Red Hat) sono tuttora disponibili per
  il download tramite FTP sul sito dei rispettivi produttori. Ma se
  avete a disposizione un drive CD-ROM e siete disposti a spendere
  qualche dollaro vi si apre una maggiore scelta di distribuzioni e
  opzioni di supporto (e vi ritroverete inoltre in possesso di
  utilissima documentazione cartacea).  Per maggiori dettagli
  sull'installazione di Linux, si veda il Linux Installation HOWTO,
  <http://metalab.unc.edu/mdw/HOWTO/Installation-HOWTO.html>.

  I prezzi delle distribuzioni su CD-ROM salgono dai circa 20 dollari
  fino a un massimo di 50 (e la differenza di prezzo rappresenta una
  reale differenza di valore).  Alcuni produttori offrono abbonamenti a
  prezzo speciale che si traducono in un ridotto costo finale per CD per
  coloro che eseguono regolari aggiornamenti durante il periodo di
  abbonamento.

  Il prezzo mostra una stretta correlazione con la qualit del prodotto
  (come ci si dovrebbe aspettare in un mercato molto competitivo).
  L'autore consiglia di affrontare la spesa necessaria per l'acquisto di
  una distribuzione ufficiale in quanto il maggior prezzo si traduce in
  una pi semplice installazione e amministrazione del sistema.

  La scelta di quale distribuzione adottare risulta ora molto pi
  semplice di quanto fosse un tempo. Tra il 1995 e il '96 il mercato 
  stato seriamente scosso e alcune delle distribuzioni commerciali sono
  emerse come dominanti mentre altre sono rimaste prive di aggiornamento
  o sono addirittura scomparse. La selezione tra le distribuzioni non
  commerciali ad uso generale  stata persino pi severa con Debian
  unico supersite in questa categoria.

  Come risultato di tutto questo il mercato su tre livelli delle
  distribuzioni (produttori principali di distribuzioni, editori di
  distribuzioni a "valore aggiunto" e assemblatori di CD contenenti
  molteplici distribuzioni)  praticamente collassato. Per essere
  competitivo nel 1997 un produttore (commerciale o non) deve essere in
  grado di offrire un ragionevole livello di supporto ai suoi clienti e
  comportarsi come un produttore di distribuzioni primario
  indipendentemente dal fatto che lo sia effettivamente. Coloro che
  desiderano una distribuzione sempre all'ultimo grido troveranno
  difficile adottare una delle distribuzioni minori per la maggior
  lentezza degli aggiornamenti.



  1.4.  Raccomandazioni dell'autore

  Nella sezione precedente ho illustrato i fatti -- in questa illustrer
  le mie opinioni (decidete voi quanto valore attribuirvi -- e ricordate
  cosa si dice dei consigli non richiesti). Non esiste sostituto per
  l'esame sul campo e i dati contenuti in questa guida sono mirati ad
  aiutarvi in tale analisi. Le mie osservazioni in questa sezione del
  documento hanno la funzione principale di illustrarvi quali siano le
  mie inclinazioni piuttosto che l'indicarvi in che modo procedere.

  Yggdrasil ha dominato il mercato delle distribuzioni su CD sin dal suo
  inizio, nel 1993.  Yggdrasil ha praticamente fondato il mercato su CD
  e ha stabilito gli standard a cui tutti i produttori entrati nel
  mercato in seguito hanno dovuto conformarsi.  L'autore aveva al tempo
  adottato Yggdrasil ed era solito raccomandarlo come sostituto di
  software di sistema commerciale basato su System V per la sua miglior
  documentazione, la sua dotazione di applicazioni e la sua illuminata
  politica di destinare parte degli utili al supporto del software
  libero e di inviare copie gratuite della distribuzione agli autori di
  freeware. Purtroppo Yggdrasil non ha rilasciato una nuova versione
  della sua distribuzione dal 1995 ed  stata oramai esclusa dal
  mercato.

  L'autore ha ora adottato Red Hat Linux ed  piuttosto soddisfatto
  della sua scelta.  Nell'opinione del suddetto la technologia RPM da un
  vantaggio tecnico alla distribuzione Red Hat su tutti gli altri
  distributori. Red Hat ha fatto le scelte commerciali migliori al
  momento pi appropriato ed  al momento da considerarsi il leader di
  mercato.

  Se siete ideologicamente legati all'uso di una distribuzione non
  commerciale, Debian sembra essere al momento l'unica scelta possibile
  -- l'unica rimasta in questo campo ancora dotata di un serio team di
  sviluppo alle sue spalle.

  Le opinioni espresse dall'autore non vanno lette come una
  dichiarazione di approvazione incondizionata: molte distribuzioni sono
  state ottimizzate per scopi e necessit differenti e i vostri scopi
  possono essere serviti meglio da altre distribuzioni (questo risulta
  particolarmente vero se voi siete principalmente utenti DOS e come
  l'autore apprezzate la predisposizione all'installazione in dual boot
  e all'inizializzazione da DOS di certe distribuzioni).

  Le posizioni di dominio in questa industria sono estremamente
  volatili. Per il giorno in cui voi leggerete questo documento RedHat e
  Debian potrebbero aver perso la loro leadership a causa di nuovi, pi
  agguerriti, concorrenti.


  2.  Distribuzioni

  Tutte le distribuzioni di seguito elencate sono disponibili su CD-ROM
  (alcune tra quelle non commerciali sono disponibili solamente su
  raccolte di CD-ROM contenenti copie intere dei principali archivi). La
  maggior parte di queste distribuzioni sono disponibili gratuitamente
  in rete -- ma le distribuzioni ufficiali ottenute tramite questi
  canali non sono provviste di supporto da parte del produttore.

  In ordine alfabetico:


  2.1.  Caldera OpenLinux


     Produttore:
        Caldera, Inc.
        633 South 550 East
        Provo, Utah 84606

        E-mail: info@caldera.com
        WWW:  <http://www.caldera.com>
        FTP:  <ftp://ftp.caldera.com>
        Telefono: (801)-377-7678
        Fax: (801)-377-8752


     Descrizione rilasciata dal produttore:
        Caldera rilascia OpenLinux in tre versioni differenti: OpenLinux
        Lite, OpenLinux Base e OpenLinux Standard.

        OpenLinux Lite  la versione liberamente disponibile di
        OpenLinux e include un periodo di prova di 90 giorni per il
        desktop environment integrato sviluppato da Caldera -- le
        versioni Base e Standard ne includono la versione completa.
        OpenLinux Lite  disponibile tramite il sito ftp di Caldera
        oltre a essere disponibile su CD-ROM presso il produttore per il
        solo costo della spedizione. Degna di nota la popolarit di
        OpenLinux preso gli editori che ne ha spesso causato la scelta
        come stabile piattaforma Linux disponibile commercialmente da
        includere in libri e altro software.

        La versione Base di OpenLinux contiene tutto ci che viene
        fornito con la versione Lite e costituisce inoltre una
        distribuzione completa e di facile installazione che include il
        desktop integrato sviluppato da Caldera, applicazioni Internet
        sia client che server e connettivit intranet.  Oltre alla
        documentazione completa OpenLinux Base include Netscape
        Navigator.

        La versione Standard di OpenLinux aggiunge a quanto gi
        disponibile nella versione base diverse applicazioni commerciali
        come Netscape FastTrack Web server, Netscape Navigator Gold e
        tool di html-authoring, il database ADABAS D, la suite integrata
        StarOffice, Caldera OpenDos e un netware client oltre a svariati
        tool di amministrazione.

        Tutte le versioni elencate di Caldera OpenLinux sono attualmente
        disponibili nella release 1.2.

        Con Caldera OpenLinux diventa possibile esplorare un nuovo mondo
        informatico con la potenza di una workstation UNIX nel vostro
        PC!  L'uso del kernel Linux permette a Caldera di offrirvi un
        sistema dotato delle prestazioni e della stabilit di sistemi
        del costo di migliaia di dollari. Openlinux porta sul vostro
        desktop:

       Multitasking reale che vi permette di eseguire diverse
        applicazioni sia grafiche che in modo testo in contemporanea.
        Nessuna applicazione pu causare il crash di un'altra come
        accade sotto sistemi operativi meno robusti.

       Il kernel 2.0 garantisce eccellenti prestazioni TCP/IP, device
        driver caricabili e un pi efficiente impiego delle risorse del
        vostro sistema.

       Il programma di installazione guidato da menu e in grado di
        rilevare l'hardware a disposizione rende l'installazione
        estremamente semplice sulla maggior parte dei sistemi. La guida
        Getting Started include una procedura che illustra come
        procedere nell'installazione del sistema passo per passo.

        Nessun'altra distribuzione di Linux include una interfaccia
        grafica completa e integrata dotata di strumenti di
        configurazione, drag and drop e applicazioni preconfigurate. Il
        Caldera Desktop facilita la gestione dei file e dei programmi di
        uso comune per accesso immediato.  Il desktop integrato
        fornisce:

       Drag-and-drop.

       Editor grafico.

       Accesso rapido a svariati, potenti strumenti di configurazione.

       Una barra delle icone configurabile, layout personalizzati e
        impostazione delle preferenze.

       Gestione dei file via drag and drop e menu grafici.


     Ordini:
        Via email (con chiave PGP), telefono, fax o posta ordinaria.
        Dettagli completi sono disponibili al sito
        <http://www.caldera.com/mpro/orinfo/orderinfo.html>.


     Supporto clienti:
        Caldera  tra le poche distribuzioni Linux a offrire supporto
        via email e telefono. OpenLinux Base include il solo supporto
        via email, mentre la versione Standard include anche il supporto
        telefonico -- il supporto include 5 ``incident calls'' nei primi
        trenta giorni d'uso del prodotto. Non viene fornito alcun
        supporto per la versione Lite.

        Le versioni Base e Standard includono la licenza completa per il
        Caldera Deskop mentre la versione Lite include una licenza di
        prova limitata a 90 giorni.


     Ultima data di rilascio:
        Maggio 1998 (?)


     Ultima revisione di questa recensione:
        13 agosto 1998


  2.2.  Debian Linux


     Produttore:
        Software in the Public Interest, Inc.  PO Box 1326
        Boston, Ma. 02117 USA

        E-mail: info@debian.org
        WWW:  <http://www.debian.org>
        FTP:  <ftp://ftp.debian.org/debian>


     Descrizione rilasciata dal produttore:
        Debian Linux  il risultato del lavoro di volontari inteso a
        creare una distribuzione non commerciale di Linux di alta
        qualit. Debian Linux 2.0  un sistema operativo UNIX-
        compatibile completo per il PC. Il sistema adotta il formato ELF
        per i programmi e si basa sulla libc6, a differenza delle
        precedenti versioni che impiegavano libc5.  Debian Linux 
        attualmente disponibile per le architetture x86 e m68k con
        versioni Alpha e SPARC previste per la release 2.1. Il porting
        sulle architetture ARM, PPC e UltraSparc  attualmente in corso.

        Debian Linux  un sistema facile da aggiornare composto
        principalmente da software liberamente distribuibile proveniente
        da molteplici fonti. Il supporto per le password shadow 
        disponibile anche se  da considerarsi sperimentale nella
        versione 1.1. Si possono ottenere anche pacchetti non liberi,
        che rendono Debian un sistema un sistema completo.

        Tra i vantaggi di Debian Linux elenchiamo la facilit degli
        aggiornamenti, le dipendenze tra i pacchetti ben definite e il
        suo sviluppo aperto.  Debian Linux  attualmente la sola
        distribuzione sviluppata cooperativamente da molti individui
        tramite Internet, nello stesso spirito in cui Linux e altri
        progetti open source vengono gestiti. Pi di 400 package
        mantainer lavorano nella gestione di pi di 1500 pacchetti e
        nello sviluppo della distribuzione. Un sofisticato sistema di
        bug tracking permette agli utenti di riferire errori nel
        software e difetti nella sicurezza del sistema che vengono
        rapidamente analizzati dalla comunit Debian.  Quando si giunge
        alla soluzione del problema, viene rilasciata una nuova versione
        del pacchetto su noti server ftp.

        Debian  una distribuzione estremamente dinamica: snap-shot
        release divengono disponibili ogni tre mesi mentre gli archivi
        ftp vengono aggiornati quotidianamente.

        Per maggiori informazioni su Debian Linux si vedano i file
        disponibili sul sito  <ftp://ftp.debian.org/debian/doc/> oppure
        si visiti la Debian homepage all'URL  <http://www.debian.org/>.

        Se siete interessati a entrare a far parte di questo progetto
        siete invitati a sottoscrivere le mailing list debian-
        user@lists.debian.org o debian-devel@lists.debian.org inviando
        un messaggio di posta elettronica a debian-user-
        request@lists.debian.org (o rispettivamente debian-devel-
        request) ponendo la parola ``help'' come soggetto del messaggio.


     Reperibilit:
        Debian Linux  disponibile via FTP anonimo al sito
        <ftp://ftp.debian.org/debian/> e in molteplici mirror (per la
        lista completa si veda il sito < url
        url="http://www.debian.org/ftplist.html">)


     Ultima data di rilascio:
        24 luglio 1998 (2.0)


     Ultima revisione di questa recensione:
        13 agosto 1998


  2.3.  Linux Pro


     Produttore:
        WorkGroup Solutions, Inc.
        P.O. Box 460190
        Aurora, CO 80046-0190

        Telefono: (303)-699-7470
        Fax: (303)-699-2793
        E-mail: info@wgs.com (ordini)
        FTP:  <ftp://ftp.wgs.com/pub2/wgs>


     Descrizione rilasciata dal produttore:
        Il manifesto di WGS Linux Pro  diverso da quello di tutte le
        altre distribuzioni correntemente sul mercato: essa si prefigge
        la penetrazione di Linux nel mercato commerciale. Tutto questo
        estende la comunit di utenti Linux e aiuta Linux a diventare il
        sistema operativo e non semplicemente un sistema operativo.

        WGS Linux Pro consiste in un CD-ROM principale per il quale
        selezioniamo la miglior distribuzione di Linux disponibile alla
        quale applichiamo bug fix e modifiche minori. Questo CD spesso
        contiene versioni diverse dalla pi recente release disponibile,
        in una ricerca delle versioni pi stabili disponibili.
        Congiuntamente il produttore fornisce supporto tecnico e
        contratti di assistenza -- per questa ragione WGS Linux 
        considerata una distribuzione di Linux primaria. Una opzione
        disponibile  un set di CD-ROM aggiuntivi contenenti tutto il
        software pi recente, ivi incluse copie correnti degli archivi
        tsx-11, metalab e RedHat. Praticamente tutto il software
        disponibile in qualunque altra distribuzione pu essere reperito
        in questi CD -- nuovo software viene costantemente aggiunto a
        questi CD non appena diventa disponibile. Un'altra opzione
        (inclusa con Linux Pro+)  un manuale contenente il Linux
        Documentation Project e molto altro!

        La versione corrente  la 4.0a basata sul kernel 1.2.13 (il
        kernel 2.0.x  disponibile nel CD e pu essere installato a
        scelta).




     Reperibilit:
        All'url  <http://www.wgs.com>  disponibile una lista dei
        prodotti WGS unitamente alle ultime informazioni sulla
        distribuzione.


     Ordini:
        WGS Linux  disponibile presso rivenditori in tutto il mondo e
        sar presto disponibile presso il sito ftp della WGS.

        Il produttore  a disposizione dei clienti via telefono, fax ed
        E-mail per ordini e richieste di ulteriori informazioni. Il
        produttore accetta ordini sulle seguenti carte di credito:
        American Express, Visa, Discover e MasterCard.


     Varie:
        Maggiori informazioni sono disponibili sul sito Web del
        produttore.

        WGS pubblica una E-mail newsletter gratuita su Linux e FlagShip
        che pu essere ricevuta su richiesta.

        Altri prodotti distribuiti dalla WGS includono Motif, Flagship e
        una serie di libri mirati a rendere l'uso di Linux un'esperienza
        pi facile e gratificante.


     Ultima data di rilascio:
        1 ottobre 1996.


     Ultima revisione di questa recensione:
        13 marzo 1997


     Commento dell'autore:
        La distribuzione  descritta dal produttore come basata su "Red
        Hat 3.03 plus".


  2.4.  Red Hat Linux


     Produttore:
        Red Hat Software
        3201 Yorktown Rd, Suite 123 DeKalb Center
        Durham, NC 27713

        Telefono: (800) 546-7274 o (919) 572-6500
        Fax: (919) 572-6726
        E-mail: redhat@redhat.com
        WWW:  <http://www.redhat.com>
        FTP:  <ftp://ftp.redhat.com>


     Descrizione rilasciata dal produttore:
        La distribuzione Red Hat 6.0  basata sul kernel 2.2 ed 
        disponibile per le piattaforme Alpha, Intel e SPARC.

        Quattro innovazioni nella procedure di installazione rendono Red
        Hat la pi facile distribuzione di Linux da installare mai
        rilasciata.  Il processo di installazione viene eseguito sotto
        X-Window per la maggior parte e lo script per la creazione di
        boot disk, unitamente alle capacit del processo di
        installazione di salvare le configurazioni correnti per X-Window
        e per la rete TCP/IP rendono l'installazione una passeggiata.
        L'installazione via ftp consente l'installazione del sistema
        attraverso la rete e richiede il download preventivo
        dell'immagine di soli 3 floppy -- il resto del processo 
        automatico. Infine, L'installazione include supporto per
        periferiche PCMCIA, rendendo l'installazione di Red Hat su
        portatili semplice quanto l'installazione su macchine di classe
        desktop.

        Dopo aver installato Red Hat Linux una volta non sar mai pi
        necessario ripetere l'operazione: il nuovo sistema di packaging
        RPM  sufficentemente sofisticato da permettere l'aggiornamento
        di un sistema gi installato senza richiedere un nuovo
        partizionamento del disco o il backup di tutti i file.


     Ordini:
        Red Hat  disponibile presso la Red Hat Software e la maggior
        parte dei distributori di prodotti Linux. Contattate la Red Hat
        Software per i dettagli sul come completare il vostro ordine --
         altres possibile ordinare Red Hat presso il sito Web del
        produttore. Il prezzo al pubblico per la versione Intel  di
        49,95 US$. Per le versioni SPARC e Alpha il prezzo  di 99.95
        US$.


     Ultima data di rilascio:
        10 marzo 1999


     Ultima revisione di questa recensione:
        7 giugno 1999.


     Commento dell'autore:
        Il pezzo forte di questa distribuzione  RPM, il Red Hat Package
        Manager.  Questo software permette di installare e rimuovere
        applicazioni e componenti del sistema, ivi inclusi il kernel e
        le basi stesse del sistema.  RPM  stato adottato da
        praticamente tutte le altre distribuzioni con l'eccezione di
        Debian Linux.



  2.5.  Trans-Ameritech Linuxware


     Produttore:
        Trans-Ameritech
        2342A Walsh Avenue
        Santa Clara, CA 95051

        E-mail: info@trans-am.com
        WWW: http://www.trans-am.com
        Telefono: (408)-727-3883
        Fax: (408)-727-3882
        BBS: (408)-980-9840


     Descrizione rilasciata dal produttore:
        Dall'inizio del 1997 Trans-Ameritech ha pubblicato dieci
        versioni della sua distribuzione di Linux. Tradizionalmente,
        Trans-Ameritech ha stabilito nuovi standard nel combinare la
        facilit d'uso con procedure di installazione semplici persino
        per utenti alle prime armi. LinuxWare  un sistema flessibile e
        di facile installazione orientato sia verso un pubblico
        interessato a imparare UNIX che verso un pubblico di utenti
        esperti.


       Utenti nuovi a Linux apprezzeranno il programma di setup basato
        su Windows.

       Al fine di minimizzare la possibilit di conflitti hardware
        molteplici kernel vengono forniti per differenti configurazioni.
        Essi possono essere impiegati sia durante l'installazione che
        per la normale operazione del sistema.

       Molteplici documenti sono forniti come documentazione in linea
        per un rapido riferimento, ivi inclusi i file del Linux
        Documentation Project nei formati sorgente, dvi e ps.

        Tra le molte applicazioni sono incluse:


       Programma di configurazione di X-Window basato su M$ Windows

       Compilatori C/C++, Pascal e Ada come pure traduttori dal
        Fortran.

       Supporto di networking TCP/IP, UUCP, SLIP, CSLIP, PPP

       Accesso a Internet con binari e sorgenti per FTP, Telnet, News e
        E-mail

       Molteplici terminali e l'ambiente X-Windows

       Versioni Gnu e internazionale del correttore ortografico ispell

       Applicazioni di comunicazione term, minicom, Seyon (sotto X-
        Windows)

       Editor: elvis( clone di vi), joe, jove, Emacs

       Il visualizzatore PostScript ghostscript

       GNU Smalltalk e la Smalltalk interface per X-Window

       TCL/Tk

       Programmi per ingegneri elettrici e utenti ham

       Impaginazione: TeX, LaTeX, xdvi, dvips, Metafont, groff

       Andrew: word processor multimediale con supporto di hyperlink

       Supporto dell'invio e ricezione di fax su modem delle classi 1 e
        2

       DOOM

        Tutti i sorgenti sono disponibili sul CD-ROM. I sorgenti pi
        usati non sono compressi e possono venire impiegati direttamente
        dal CD.

        Un filesystem Linux non compresso  disponibile come riferimento
        e per la conversione dello spazio su disco --  possibile
        eseguire certi programmi direttamente da CD-ROM. Una libreria di
        riferimento  presente oltre a esaurienti pagine man.

        Principalmente a uso degli entusiasti, sono inclusi i sorgenti
        non compressi di FreeBSD e netBSD.
        Questa distribuzione  destinata principalmente ad utenti
        Windows e DOS che desiderano una pi semplice transizione a un
        sistema di maggior complessit piuttosto che a utenti UNIX
        esperti.


     Ordini:
        Ordini via E-mail vengono accettati all'indirizzo order@trans-
        am.com

        Il prezzo della versione corrente di LinuxWare 2.5  di
        US$19.95.

        Il prezzo per l'aquisto della combinazione di LinuxWare 2.5,
        Supplement 5 e Supplement 4 (combinazione ``Ultimate
        LinuxWare'')  di US$30.

        Se desiderate inviare un ordine tramite carta di credito
        (Trans_Ameritech accetta VISA, MC, AmEx, Discovery), ricordate
        di includere il vostro numero di carta, data di scadenza e il
        vostro indirizzo completo. Il costo di spedizione all'interno
        degli USA  di 5 dollari (first class US mail), mentre tale
        costo sale a 8 dollari per il CD base e a 12 per la combinazione
        del CD e i vari Supplement se abitate al di fuori degli Stati
        Uniti.

        Abbonamenti annuali (per un massimo di 4 release) sono
        disponibili per un prezzo complessivo di 80 us$ a cui va
        aggiunto il costo di  quattro spedizioni.


     Varie:
        per qualsiasi richiesta di informazioni il produttore  a vostra
        disposizione agli indirizzi info@trans-am.com e order@trans-
        am.com.


     Ultima data di rilascio:
        Gennaio 1997 (Supplement 5)"

     Ultima revisione di questa recensione:
        13 agosto 1998


  2.6.  Slackware


     Produttore:
        Walnut Creek CDROM
        4041 Pike Lane, Suite D
        Concord, CA  94520

        E-mail: info@cdrom.com (informazioni), order@cdrom.com (ordini),
        support@cdrom.com (supporto tecnico).


     Descrizione rilasciata dal produttore:
        Ftp.cdrom.com  l'origine ufficiale di Slackware Linux. La
        distribuzione Slackware ufficiale consiste in un set di quattro
        CD. La versione corrente  la slackware 96, basata sul kernel
        2.0.34.

        Slackware Linux  una distribuzione di Linux completa per
        sistemi basati sull'architettura ix86 che includano un CD-ROM
        drive e un floppy drive.

     Reperibilit:
        WWW:  <http://www.cdrom.com/titles/os/slack96.htm>
        FTP:  <ftp:ftp.cdrom.com/pub/linux/slackware>


     Ordini:
        Il costo del set di CD-ROM presso la Walnut Creek  di US$39.95.


     Ultima data di rilascio:
        Luglio 1998 (3.5)"

     Ultima revisione di questa recensione:
        13 agosto 1998.


  2.7.  S.u.S.E.


     Produttore:
        S.u.S.E., Inc.
        458 Santa Clara Ave
        Oakland CA 94610 USA

        E-mail: info@suse.com
        WWW:  <http://www.suse.com>
        FTP:  <ftp://ftp.suse.com>
        Telefono: +1-510-835-7873 Fax: +1-510-835-7875 fax


     Descrizione rilasciata dal produttore:
        S.u.S.E. Linux offre a utenti di tutti i livelli di esperienza
        una rapida e semplice via di ingresso nel mondo di Linux e UNIX.
        Risorse come l'installazione guidata da CD-ROM, un dischetto di
        boot modulare, un manuale di 400 pagine e il programma di
        amministrazione YaST consentono una rapida installazione (e
        manutenzione) del sistema.

        Inoltre, S.u.S.E. offre una vasta gamma di X-server con il
        supporto delle periferiche grafiche pi recenti. Questi server
        vengono implementati in collaborazione con il team XFree86 (tm).
        Si veda la pagina seguente per maggiori dettagli
        <http://www.suse.de/XSuSE>.

        Novit in S.u.S.E. Linux 5.3:


       Kernel 2.0.35

       KDE 1.0

       GIMP 1.0

       SaX (programma di configurazione di XF86 sviluppato da S.u.S.E.)

        Altre caratteristiche di rilievo:


       Linux e oltre 875 pacchetti software, ivi inclusi i sorgenti ed
        un live file system su 4 CD-ROM

       Guida all'uso di 400 pagine

       Archivi in formato RPM; i pacchetti in formato TGZ sono comunque
        installabili

       Boot compatibile con System V, conformit con il file system
        standard

       Programma di installazione e amministrazione di sistema YaST per
        la configurazione di rete, connessioni ISDN, stampanti e di X-
        window

       X server sviluppati da S.u.S.E. con supporto delle periferiche
        grafiche pi recenti

       Amministrazione di file system, utenti e gruppi di utenti

       Configurazione automatica di molteplici Window Manager

       Sistema di online help

       Modalit demo avviabile da CD-ROM o da partizione DOS


     Ordini:
        S.u.S.E. Linux pu essere scaricata al seguente sito ftp
        <ftp://ftp.suse.com/pub/SuSE-Linux>.  Il costo del CD-ROM
        ufficiale (che include supporto)  di US$ 49.95; S.u.S.E.
        accetta ordini a mezzo telefono, sito web (secure server
        disponibile), fax o per posta. Il costo di un "abbonamento"  di
        US$ 34.95 per release.

        S.u.S.E. distribuisce inoltre OSF Motif 2.1 per $129.95 (il
        prezzo della versione aggiornamento deve tutt'ora essere
        annunciato).


     Supporto:
        Ogni release di S.u.S.E. Linux aquistata include 60 giorni di
        assistenza per l'installazione. Si veda la pagina Web della
        S.u.S.E. per ulteriori informazioni e condizioni di contratto.


     Ultima data di rilascio:
        Indeterminata."

     Ultima revisione di questa recensione:
        13 agosto 1998 (5.3)


  3.  Come sottoporre aggiunte e/o correzioni a questo HOWTO

  L'autore incoraggia chiunque mantenga una distribuzione di Linux o un
  servizio di ordine per posta a sottoporre informazioni sul loro
  servizio per l'inclusione in questo HOWTO.  facile e divertente e non
  ci sono nemmeno stacchi pubblicitari! Si veda il prossimo paragrafo di
  questo documento per una lista di siti ove questo documento 
  attualmente reperibile.


  3.1.  Che informazioni inviare

  L'autore desidera particolarmente ricevere informazioni sui seguenti
  argomenti:


    Distribuzioni Linux complete disponibili a mezzo ftp, uucp o a
     mezzo posta. Per distribuzione completa ci si riferisce a software
     sufficiente a creare un completo sistema Linux a partire da zero.


    Prodotti disponibili esclusivamente a mezzo posta. Se il vostro
     software  disponibile via ftp anonimo  altamente probabile che
     gli utenti riescano a raggiungerlo. Esempi di prodotti disponibili
     esclusivamente per l'ordine sono Motif e qualunque altro software
     commerciale che sia stato oggetto di porting su Linux.

    Qualunque altro prodotto specificamnte relativo a Linux come libri
     e documentazione, T-shirt e curiosit varie. N.B.: questo  il
     Linux Distribution HOWTO, non un catalogo di cose carine collegate
     a Linux. Qualunque cosa voi vendiate deve essere (a) molto utile,
     (b) estremamente originale, oppure (c) molto divertente per essere
     elencata in questo documento.

  Qualora l'autore si trovi a ricevere una notevole mole di informazioni
  riguardanti prodotti marginali al mercato delle distribuzioni Linux
  egli prender in considerazione la possibilit di creare un documento
  specifico sull'argomento.


  3.2.  Come inviare informazioni

  Se desiderate sottoporre informazioni per l'inclusione in questo
  HOWTO, inviate un e-mail all'indirizzo esr@snark.thyrsus.comcontenente
  le informazioni seguenti. Questo formato non  analizzato da una
  macchina: ciascun campo pu avere qualunque lunghezza voi desideriate
  ma l'autore preferirebbe mantenere ciascuna recensione al di sotto
  delle 50 linee di testo.

     Nome:
        Nome del servizio o della distribuzione


     Produttore:
         Nome della societ, persona o altro che distribuisce o gestisce
        il servizio o la distribuzione. Si includano l'indirizzo
        postale, E-mail, il numero di telefono e, se possibile, un
        indirizzo Web.


     Descrizione rilasciata dal produttore:
         Descrizione della distribuzione o del servizio da voi fornito.
        Se l'oggetto in questione  una distribuzione, includete
        informazioni su che software vi  incluso e in quali versioni,
        una descrizione generale del processo di installazione,
        requisiti di sistema e via discorrendo.


     Reperibilit in rete:
         indicate un indirizzo di rete (solitamente ftp o Web) ove il
        vostro software  posto a disposizione del pubblico per il
        download.


     Ordini:
        Informazioni sul come ordinare la vostra distribuzione o
        acquistare il vostro prodotto/servizio. Si prega di includere
        informazioni quali il prezzo e le modalit di pagamento.


     Supporto:
        Informazioni sull'assistenza resa disponibile per i vostri
        clienti.


     Varie:
        Qualunque informazione che sia ritenuta degna di nota per
        potenziali utenti.


     Last data di rilascio:
        Ultima data di rilascio della versione corrente.  Inserire
        inoltre la frequenza d'aggiornamento stimata.


  3.3.  Criteri generali

  Per favore mantenete le vostre recensioni il pi possibile brevi. Se
  ritenete che sia necessario includere informazioni per esteso
  includete un riferimento ad un sito ftp oppure un indirizzo E-mail al
  quale scrivere per ottenere maggiori dettagli. Le recensioni sono
  intese solamente come indicazioni su ove sia possibile reperire
  informazioni complete in materia.

  Se molteplici servizi o prodotti sono forniti o gestiti dalla stessa
  societ o persona, si noti che comunque risulta necessario compilare
  recensioni separate per ogni servizio o prodotto.

  L'autore pu ritenere necessario modificare le vostre recensioni per
  renderle maggiormente concise o per eliminare informazioni ritenute a
  suo giudizio irrilevanti. Con l'esclusione di questi due casi, le
  recensioni dovrebbero rimanere immutate.

  Nell'atto di sottoporre recensioni l'autore della recensione
  conferisce implicitamente l'autorizzazione all'autore del Distribution
  HOWTO di utilizzare tale materiale in altri contesti, quali i libri
  pubblicati dal Linux Documentation Project ed altri documenti
  elettronici. A titolo di esempio, materiale estratto dal Distribution
  HOWTO pu essere incluso in un libro su Linux. Se desiderate che le
  vostre recensioni non vengano incluse in documenti o materiali diversi
  dal Distribution HOWTO siete pregati di notificare l'autore di tale
  desiderio.


  4.  Questioni legali


  4.1.  Licenza d'uso (in inglese)

  This document is copyright 1997 by Eric S. Raymond. You may use,
  disseminate, and reproduce it freely, provided you:


    Do not omit or alter this copyright notice.

    Do not omit or alter or omit the version number and date.

    Do not omit or alter the document's pointer to the current WWW
     version.

    Clearly mark any consdensed, altered or versions as such.

  These restrictions are intended to protect potential readers from
  stale or mangled versions.  If you think you have a good case for an
  exception, ask me.


  4.2.  Ringraziamenti

  Questo documento  stato creato da Bill Riemers. Matt Welsh ha
  mantenuto la seconda versione ed Erik Troan ne ha mantenuto la terza.


  Durante il gennaio del 1995 Eric Raymond, ancora all'oscuro
  dell'esistenza di questo documento, inizi la stesura di una FAQ di
  natura simile (la non pi mantenuta ``PC-clone UNIX Software Buyer's
  Guide'', che riguardava principalmente sistemi UNIX nella categoria di
  System V e BSD).

  Durante il marzo del 1995 Eric ha discusso con Erik la possibilit di
  cooperare a un documento congiunto. All'inizio di aprile dello stesso
  anno, Erik ha iniziato a lavorare per la Red Hat software e
  desiderando evitare un conflitto di interessi, ha trasferito la
  gestione del documento a Eric.  Erik ha quindi provveduto a inserire
  molte nuove informazioni e diversi nuovi campi nelle recensioni.

  In conseguenza di tutto ci, questo documento si pu considerare una
  cooperazione seriale (nell'originale inglese, il soggetto "I" viene
  riferito a Erik mentre il plurale "we" viene usato collettivamente con
  riferimento a tutti gli autori -- NdT).

  Gli autori ringraziano calorosamente tutti gli utenti Linux e i
  navigatori in rete che hanno contribuito informazioni e commenti su
  questo documento.













































  Emacs Beginner's HOWTO
  Jeremy D. Zawodny, jzawodn@wcnet.org
  v1.7, 14 ottobre 1999

  Questo documento introduce gli utenti Linux all'editor Emacs. Si
  assume una minima familiarit con vi o un editor similare. La versione
  pi recente di questo documento  normalmente disponibile da
  http://www.wcnet.org/jzawodn/emacs/ Traduzione a cura di Giovanni
  Benedetti (<bened@tin.it).

  1.  Introduzione

  1.1.  Copyright

  Copyright  1998 - 1999 Jeremy D. Zawodny. Permission to distribute
  and modify this document is granted under the GNU General Public
  License. An on-line copy is available at
  http://www.gnu.org/copyleft/gpl.html

  ovvero:


  Copyright  1998 - 1999 Jeremy D. Zawodny. Il permesso di distribuire
  e modificare questo documento  concesso sotto la GNU General Public
  License. Una copia on-line  disponibile a
  http://www.gnu.org/copyleft/gpl.html


  1.2.  Pubblico e Intenti

  Questo documento  indirizzato agli utenti Linux interessati ad
  imparare qualcosa riguardo Emacs ed a provarlo. Il tutto di fatto 
  iniziato come un estratto di un breve corso che ho dovuto dare ad un
  incontro a Toledo in un Linux User Group locale:
  http://www.talug.org/.  poi un po' cresciuto come risultato
  dell'utile scambio che ho ricevuto dalla comunit. Vedere la sezione
  Crediti per dettagli.


  Detto questo, non c' praticamente niente di specifico su Linux in
  questo documento. Tutto   in effetti applicabile a tutti i tipi di
  Unix e perfino ad Emacs funzionante su Microsoft Windows. Ma dato che
  questo documento fa parte del Linux Documentation Project, considero
  importante dire che  stato scritto per gli utenti Linux, anche perch
  di fatto, lo  stato.


  E infine, quelli di voi che preferiscono il nome GNU/Linux al posto
  del semplice ``Linux'' (leggere http://www.gnu.org/gnu/linux-and-
  gnu.html per capire perch uno potrebbe preferirlo) accetteranno
  volentieri di sostituire mentalmente GNU/Linux in tutte le occorrenze
  di Linux in questo documento. Nonostante non sia in disaccordo con le
  ragioni e lo spirito dietro questa idea, non mi sento obbligato a
  scrivere GNU/Linux.


  1.3.  Che cos' Emacs?

  Emacs  una cosa diversa a seconda delle persone. A seconda a chi lo
  chiedi, potresti ottenere una qualsiasi delle seguenti risposte:


    Un editor di testo

    Un client per la posta

    Un lettore di news

    Un Word Processor

    Una religione

    Un ambiente di sviluppo integrato

    Qualsiasi cosa tu voglia esso sia!


  Ma per i nostri scopi, pretendiamo solo che sia un editor di testo, un
  editor di testo sorprendentemente flessibile comunque. Scaveremo pi a
  fondo nella questione pi avanti. Emacs  stato scritto da Richard
  Stallman (fondatore della Free Software Foundation:
  http://www.fsf.org/ e del progetto GNU http://www.gnu.org/) che ancora
  oggi lo mantiene.


  Emacs  uno dei pi popolari e potenti editor di testo usato in Linux
  (e Unix).  secondo in popolarit solo a vi.  conosciuto per il suo
  enorme insieme di funzionalit, la possibilit di essere facilmente
  personalizzato e la mancanza di bug. Il suo grande insieme di
  funzionalit e la possibilit di essere personalizzato sono di fatto
  il risultato di come Emacs sia stato progettato e implementato. Senza
  entrare in tutti i dettagli, semplicemente far notare che Emacs non 
  ``soltanto un editor''.  un editor scritto principalmente nel
  linguaggio di programmazione Lisp. Nel cuore di Emacs c'
  un'interprete Lisp con funzionalit complete scritto in C. Solo le
  parti pi basilari e a basso livello di Emacs sono scritte in C. La
  maggior parte dell'editor  di fatto scritto in Lisp. Quindi, in un
  certo senso, Emacs ha un intero linguaggio di programmazione
  ``incorporato'' che potete usare per personalizzare, estendere e
  cambiare il suo ambiente.


  Emacs  anche uno dei pi vecchi editor in giro. Il fatto che sia
  stato usato da migliaia di programmatori negli ultimi 20 (?) anni,
  significa che ci sono molti pacchetti aggiuntivi (add-on) disponibili.
  Questi add-on vi permettono di far fare a Emacs cose che Stallman non
  aveva probabilmente nemmeno sognato essere possibili quando inizi a
  lavorare su Emacs. Altro su questo argomento si trova in una sezione
  pi avanti.


  Ci sono molti altri siti Web e documenti che danno una migliore
  visione globale di Emacs, la sua storia e gli avvenimenti relativi.
  Piuttosto che tentare di riprodurre qui molto di tutto questo, vi
  suggerisco di dare un'occhiata in alcuni dei posti elencati nella
  sezione ``Altre risorse'' in questo documento.


  1.3.1.  Piattaforme e Versioni

   importante notare che ci sono di fatto due differenti editor Emacs:
  GNU Emacs e XEmacs. Ambedue provengono dallo stesso eredit e
  condividono la maggior parte delle stesse caratteristiche. Questo
  documento  relativo al GNU Emacs (versione 20.3, specificatamente) ma
  molto di quello che leggerete qui si applica altrettanto bene a XEmacs
  e alle prime versioni di GNU Emacs. In questo documento mi riferir
  semplicemente a ``Emacs''. Quando lo far, tenetevi questo in mente.





  1.3.2.  Ottenere Emacs

  Ottenere Emacs  facile. Se state usando una versione popolare di
  distribuzione Linux, tipo Debian, RedHat, Slackware o una qualsiasi
  delle altre, Emacs  probabilmente in un pacchetto (package) opzionale
  che potete installare dal supporto della vostra distribuzione (CD-Rom,
  floppy, etc.). Altrimenti, potete ottenere il codice sorgente di Emacs
  e compilarlo da soli. Visitate il sito Web di GNU per l'esatta
  locazione: http://www.gnu.org/software/emacs/emacs.html


  2.  Far girare Emacs

  2.1.  Avviare e Chiudere Emacs

  Come nuovi utenti, vorrete probabilmente lanciare Emacs giusto per
  fare un giro al suo interno e provarlo. Una volta dentro Emacs se
  voleste uscire, tuttavia, potreste non essere in grado di capire che
  cosa fare. Quindi se non avete mai usato Emacs prima, dategli
  un'occhiata ora. Al prompt della vostra shell, digitate emacs e
  premete invio. Emacs dovrebbe avviarsi. Se non lo fa, potrebbe non
  essere installato o non essere nel vostro path.


  Una volta che avete visto Emacs, avete bisogno di sapere come uscire.
  I tasti chiave per lasciare Emacs sono C-x C-c. La notazione C-x
  significa: tenere premuto il tasto Ctrl e premere il tasto x. In
  questo caso, dovrete poi ancora tenere premuto il tasto Ctrl e premere
  il tasto c per raggiungere lo scopo.


  I tasti chiave usati in Emacs vi possono sembrare insoliti, strani e
  forse perfino scomodi all'inizio, specialmente se siete un utente di
  vi. Al contrario di vi, Emacs non ha modalit separate per editare il
  testo e inviare comandi.


  Per riassumere: emacs avvier Emacs. C-x C-c far uscire da Emacs.


  2.1.1.  Che cosa vedrete

  Quando Emacs si sar avviato riempir interamente una finestra di X (o
  lo schermo se lo state lanciando da una console invece che nel sistema
  X-Window). Vedrete dei men in alto, del testo nella parte principale
  dello schermo e un paio di linee in fondo.


  Sar simile a questo disegno in ASCII:


  +----------------------------------------------------------------------+
  |Buffers Files Tools Edit Search Mule Help                             |
  |                                                                      |
  |Welcome to GNU Emacs, one component of a Linux-based GNU system.      |
  |                                                                      |
  |                                                                      |
  |                                                                      |
  | ...                                                                  |
  |                                                                      |
  |---1:---F1  *scratch*         (Lisp Interaction)--L1--All-------------|
  |For information about the GNU Project and its goals, type C-h C-p.    |
  +----------------------------------------------------------------------+



  NOTA: Emacs normalmente riempie l'intera finestra/schermo. Ho
  ristretto l'esempio sopra per salvare spazio qui. Vedrete anche un
  messaggio di benvenuto in Emacs, quando lo avviate per la prima volta.
  L'ho omesso in questo esempio e sostituito con ``...''. Il messaggio
  di benvenuto semplicemente identifica l'esatta versione di Emacs che
  state usando e vi indirizza all'aiuto in linea e cose del genere.


  2.1.1.1.  La barra dei men

  La linea pi in alto nell'interfaccia Emacs  un men. Se state usando
  X, lo riconoscerete come un normale men a discesa a cui potete
  accedere usando il mouse. Altrimenti per accedere ai men avrete
  bisogno di usare le scorciatoie da tastiera (non trattate qui).


  2.1.1.2.  La barra di stato (Status Bar) e il Mini-buffer

  Delle ultime due linee in basso nell'interfaccia Emacs, quella
  superiore  essenzialmente una barra di stato. Contiene informazioni
  sul buffer in cui state lavorando, in quale modalit (mode) si trova
  Emacs e varie altre cose. Per ora, prendete solo atto che la barra 
  l.


  La linea inferiore  chiamata mini-buffer.  separato dal buffer
  principale dalla barra di stato di cui abbiamo appena parlato. Potete
  pensare al mini-buffer come la ``riga di comando'' (command-line) di
  Emacs.  dove appaiono i comandi che date a Emacs ed  dove vengono
  visualizzati i messaggi di stato in risposta a quello che fate.


  Troverete che a quella che ho chiamato barra di stato nella
  documentazione allegata a Emacs si fa normalmente riferimento come
  linea della modalit (mode line).  dove Emacs mostra informazioni
  relative alla/alle modalit corrente che potreste star usando e altre
  cose tipo la data e l'ora corrente, il numero di riga, la dimensione
  del file e quasi tutto quello che potreste voler vedere l.


  2.2.  Un po' di terminologia

  Questa sezione copre le cose pi basilari della terminologia Emacs che
  incontrerete quando userete e leggerete di Emacs.


  2.2.1.  Buffer e File

  A differenza di alcuni editor, quando aprite un file in Emacs questo
  non sta ``aperto'' tutto il tempo in cui lavorate con esso. Al
  contrario, Emacs legge il file in un buffer in memoria. Mentre state
  editando il buffer e lavorando con i dati, niente  cambiato sul
  disco. Solo quando di fatto salvate il buffer, allora il file sul
  disco viene aggiornato. Ci sono vantaggi e svantaggi con questo
  approccio ma  importante solo che capiate che lavora in questo modo.


  Come conseguenza, vedrete il termine ``buffer'' usato nella
  documentazione Emacs, nelle modalit, nei package e cos via.
  Considerate che buffer significa ``una copia del file che si trova
  attualmente in memoria''. Oh,  importante notare che un buffer non
  deve sempre essere riferito ad uno specifico file sul disco. Spesso
  Emacs creer dei buffer come risultato dei comandi che lancerete.
  Questi buffer potranno contenere il risultato dei comandi, una lista
  di selezioni da cui scegliere e cos via.

  2.2.2.  Point e Region (Punto e Regione)

  In gergo di Emacs, sentirete o vedrete spesso riferimenti al point. In
  termini generali il point  il cursore. La reale distinzione fra il
  point e il cursore probabilmente non  importante quando comincerete a
  usare Emacs. Ma se siete curiosi, pensate al riguardo in questa
  maniera. Il cursore  la rappresentazione visiva del point. Il cursore
   sempre ``su'' una particolare posizione del carattere nel buffer
  corrente. Il point, invece, vive nello spazio fra i caratteri che si
  trovano nel buffer. Quindi potreste dire che se il cursore si trova
  sulla lettera `h' nella parola ``the'' allora il point  tra la `t' e
  la `h'.


  Come molti editor moderni, Emacs permette di effettuare operazioni
  (indentazione, controllo ortografico, riformattazione, taglia, copia,
  incolla ...) su una porzione del buffer corrente. Potete evidenziare
  (o ``marcare'') un blocco di testo usando la tastiera o il mouse e poi
  eseguire operazioni solo sul blocco selezionato di testo. In Emacs,
  quel blocco di testo  chiamato una region (regione).


  2.2.3.  Finestre

  Okay, questo sar un po' confuso per chi non abbia usato prima una
  interfaccia grafica (GUI). Ricordate che Emacs fu sviluppato molto
  prima che le interfacce GUI e i gestori di finestre (window manager)
  diventassero popolari.


  Una finestra in Emacs  un area dello schermo nel quale  visualizzato
  un buffer. Quando Emacs viene avviato per la prima volta, avete una
  finestra sul vostro schermo. Alcune funzioni di Emacs (tipo l'help e
  la documentazione) spesso aprono (temporaneamente) una finestra
  aggiuntiva nella vostra schermata di Emacs.


  Le finestre di Emacs non hanno niente a che fare con le finestre X nel
  senso delle GUI. Potete aprire finestre X addizionali per mostrare i
  buffer di Emacs, magari per confrontare due file fianco a fianco.
  Queste nuove finestre X sono chiamate frame (riquadri) in gergo Emacs.
  Continuate a leggere.


  2.2.4.  Riquadri (Frame)

  In Emacs, un frame  una finestra X separata nel quale viene mostrato
  un buffer di Emacs. Ma entrambe fanno parte della stessa sessione di
  Emacs. Il comportamento  qualcosa di simile (ma non troppo) a quello
  che succede se premete Alt+N in Netscape Navigator.


  2.3.  Basi dell'uso della tastiera

  Questa sezione copre l'uso basilare della tastiera per Emacs. Come con
  ogni editor potente, tutto quello che potete fare con Emacs  giusto
  qualche tasto chiave pi avanti.


  Se siete un utente vi, le nozioni sull'uso dei tasti k, j, l, h per
  spostarsi su alla riga superiore, gi di una riga, avanti di un
  carattere e indietro di un carattere, probabilmente ora tornano utili.
  In realt, vi ci potrebbero esser volute poche ore oppure settimane di
  pratica, prima di poter navigare confortevolmente in un file usando le
  varie combinazioni di tasti disponibili in vi.

  Emacs non  diverso. Ci sono tasti e comandi diversi da imparare. Come
  con vi, avete solo bisogno di padroneggiare le cose basilari per
  ritrovarvi con molto lavoro fatto. Dopo, con il passare del tempo,
  potrete lentamente espandere la vostra conoscenza e trovare strade pi
  veloci per fare le cose.


  2.3.1.  Tasti di comando (Meta, Esc, Control e Alt)

  Come imparerete presto, Emacs fa un uso intensivo di combinazioni di
  pi tasti. Dato che non  un editor modale come vi, non dovete
  preoccuparvi di essere in ``modalit comandi'' o ``modalit
  inserimento'' prima di provare a muovere il cursore o eseguire un
  comando. Al contrario, dovete solo premere la giusta combinazione di
  tasti e (normalmente) Emacs far quello che gli  stato detto.


  I tasti di cui Emacs fa maggiore uso sono normalmente abbreviati nella
  documentazione come C (per Control o Ctrl) e M per (Meta). Mentre le
  pi moderne tastiere di PC hanno uno o pi tasti etichettati come
  Ctrl, poche ne hanno uno etichettato come Meta. Potrete mentalmente
  sostituire sia Esc che Alt al tasto Meta. Nella maggior parte delle
  configurazioni standard, entrambi, Esc e Alt, faranno essenzialmente
  le stesse cose.


  Quindi quando vedete un riferimento, in qualsiasi documentazione
  relativa a Emacs, a C-x f significa ``premere control-x e poi f''. E
  se vedrete un riferimento a qualcosa del tipo M-x shell significa
  ``premere alt-x e digitare la parola shell''.


  Un comando veramente utile per chi inizia  M-x apropos o C-h a.
  apropos cercher nella documentazione in linea di Emacs tutte le
  funzioni e cercher l'espressione regolare che digiterete. Questo, ad
  esempio,  un ottimo modo per scoprire tutti i comandi relativi a un
  frame. Semplicemente digitate C-h a e poi frame.


  2.3.2.  Muoversi in un Buffer

  Ora che sapete che cosa significano tutte quelle simpatiche
  abbreviazioni, ecco qui una lista delle combinazioni di tasti pi
  comuni per muoversi in un buffer:


  Tasti           Azione
  -----------------------------------
  C-p         Su di una riga
  C-n         Gi di una riga
  C-f         Avanti di un carattere
  C-b         Indietro di un carattere
  C-a         Inizio di una riga
  C-e         Fine di una riga
  C-v         Gi di una pagina
  M-v         Su di una pagina
  M-f         Avanti di una parola
  M-b         Indietro di una parola
  M-<         Inizio del buffer
  M->         Fine del buffer
  C-g         Chiude l'operazione corrente
  -----------------------------------




  E, come potevate aspettarvi, i tasti cursore (o tasti freccia)
  funzionano normalmente come vi aspettavate. Il vostro tasto Backspace
  potrebbe non funzionare invece. Ma questa  un'altra storia. :-(


  2.3.3.  Comandi essenziali

  Okay, ora che sapete come spostarvi in un buffer, che cosa ne pensate
  di aprire e salvare file? Ricercare? Ecco alcuni comandi base.


  Prima di saltare dritto su questi comandi, ho bisogno di puntualizzare
  brevemente come questi lavorano.


  Tutti i ``tasti di comando'' in Emacs (quelli che sono M-x qualcosa o
  C-qualcosa) sono di fatto giusto delle scorciatoie a delle funzioni
  che fanno parte di Emacs. Potete chiamare una qualsiasi di queste
  funzioni digitando M-x funzione-nome e premendo Enter. Potete anche
  usare le scorciatoia da tastiera per questa funzione (se ne ha una).


  Per esempio, la funzione di Emacs che salva un buffer su disco 
  chiamata save-buffer. Per default  anche vincolata a C-x C-s. Quindi,
  potete usare sia la scorciatoia da tastiera per salvare il buffer
  corrente, sia digitare M-x save-buffer per raggiungere esattamente lo
  stesso risultato.


  Tutte le funzioni pi comuni hanno delle scorciatoie da tastiera per
  default. Alcune di esse sono elencate qui sotto.


  Tasti           Funzione           Descrizione
  -------------------------------------------------------------------
  C-x C-s     save-buffer        Salva il buffer corrente su disco
  C-x u       undo               Annulla l'ultima operazione
  C-c C-f     find-file          Apre un file dal disco
  C-s         isearch-forward    Cerca avanti una stringa
  C-r         isearch-backward   Cerca indietro una stringa
              replace-string     Cerca e rimpiazza una stringa
              replace-regexp     Cerca e rimpiazza usando regexp
  C-h t       help-with-tutorial Usa la guida interattiva
  C-h f       describe-function  Mostra aiuto per una funzione
  C-h v       describe-variable  Mostra aiuto per una variabile
  C-h x       describe-key       Mostra che cosa fa una sequenza di tasti
  C-h a       apropos            Cerca aiuto per una stringa/regexp
  C-h F       view-emacs-FAQ     Mostra le FAQ di Emacs
  C-h i       info               Legge la documentazione di Emacs
  C-x r m     bookmark-set       Imposta un segnalibro. Utile nelle ricerche
  C-x r b     bookmark-jump      Salta ad un segnalibro.
  -------------------------------------------------------------------




  Quando proverete molte di queste funzioni, noterete che molte vi
  chiedono di inserire qualcosa al prompt. Lo faranno sempre nel mini-
  buffer. Questo  simile all'uso dei comandi : in vi o la maggior parte
  dei comandi che usereste nella vostra shell Unix favorita.


  Emacs ha letteralmente centinaia di funzioni incorporate disponibili.
  La lista riportata sopra  un campione minimo che rappresenta quelle
  che io uso regolarmente. Vedere l'aiuto in linea per un pi completo
  elenco delle funzioni disponibili ed una documentazione pi completa
  su quelle che ho menzionato sopra.


  2.3.4.  Completamento con Tab

  Come molte shell Unix popolari (bash, csh, tcsh, ...) Emacs offre il
  completamento del comando tramite il tasto Tab. Di fatto, il
  completamento del comando in bash venne preso a modello dopo che in
  Emacs, quindi se usate questa caratteristica in bash vi troverete
  subito bene.


  Come esempio, provate M-x search e poi premete Tab. Emacs aggiunger
  un trattino per indicare che ci sono molti possibili completamenti ma
  questi hanno tutti un trattino come carattere successivo. Premete Tab
  una volta ancora e Emacs mostrer una lista delle possibili
  corrispondenze da da cui voi potete scegliere. Notate che far questo
  in una nuova finestra. Temporaneamente divider il vostro schermo in
  due finestre: una che contiene il buffer che state editando e l'altra
  che contiene la lista dei possibili completamenti per ``search-''.
  Potete premere C-g per uscire fuori dal processo di selezione e
  chiudere la nuova finestra.


  2.4.  Tutorial, Aiuto e Info

  Emacs ha un tutorial in linea che vi accompagna attraverso le
  caratteristiche di base dell'editing e delle funzioni che ognuno
  dovrebbe conoscere. Spiega anche come usare le altre funzionalit di
  aiuto in Emacs.


  Io vi raccomando caldamente di spendere un po' di tempo nel consultare
  a fondo il tutorial se pensate di sforzarvi seriamente per imparare
  Emacs. Come mostrato nella tabella sopra riportata, potete entrare nel
  tutorial tramite C-h t. Il tutorial  una auto-guida e aiuta le
  persone che hanno appena iniziato con Emacs.


  Se state facendo girare Emacs in X, vedrete che il men pi a destra
  nella barra dei men  etichettato con Help. Come esplorerete il men
  di Help noterete che certe voci hanno delle scorciatoie da tastiera e
  che queste sono elencate a destra nel men.


  Infine, per vedere l'intero volume della documentazione disponibile
  per Emacs, dovreste provare M-x info o C-h i che lancia Info, il
  browser per la documentazione di Emacs.


  3.  Modalit di Emacs

  Le modalit (mode) di Emacs sono differenti ambienti e funzionalit
  che potete attivare o disattivare (o personalizzare, ovviamente) per
  usarle in circostanze diverse. Le modalit sono quello che rende un
  editor (Emacs) ugualmente utile per scrivere documentazione,
  programmare in una variet di linguaggi (C, C++, Perl, Python, Java e
  molti altri), creare una home page, inviare E-Mail, leggere i
  newsgroup Usenet, tenere traccia dei vostri appuntamenti e perfino
  giocare dei giochi.


  Le modalit di Emacs sono semplicemente delle librerie di codice Lisp
  che estendono, modificano o migliorano Emacs in qualche modo.


  3.1.  Modalit Primarie vs. Modalit Secondarie

  Ci sono fondamentalmente due tipi di modalit disponibili: Primarie
  (Major) e Secondarie (Minor). La distinzione non  la cosa pi facile
  da afferrare finch non avrete lavorato con un po' di queste, ma
  lasciatemici provare a dare una spiegazione.


  In un dato momento pu essere attivata solamente una modalit
  primaria. Invece nello stesso momento possono essere attive molte
  modalit secondarie. Le modalit primarie tendono ad essere specifiche
  di un linguaggio o di un compito, mentre le modalit secondarie sono
  delle utility pi piccole e meno specifiche che riguardano molti
  compiti.


  Suona come qualcosa di astratto, quindi proviamo con un esempio. C'
  una modalit che io uso abbastanza spesso quando devo scrivere dei
  vecchi e semplici file di testo. Si chiama text-mode. Questa modalit
  fu progettata per scrivere testo in forma libera come in un file
  README. Capisce come identificare parole e paragrafi e in generale si
  assicura di fare quello che mi aspetto quando uso i normali tasti di
  navigazione in un documento.


  Quando sto scrivendo testo per uso umano, normalmente voglio che abbia
  un bell'aspetto. Dovrebbe essere allineato in maniera appropriata ad
  un valore ragionevole e cos via. Per abilitare l'allineamento devo
  solo attivare la modalit secondaria auto-fill. Questo modalit cerca
  di fare la Cosa Giusta quando continuo a scrivere e raggiungo la fine
  della riga. Il fatto che sia una modalit secondaria significa che pu
  lavorare  con diverse modalit primarie. La mia accezione di ``Cosa
  Giusta'' da fare quando raggiungo la fine della riga  diversa quando
  sono in text-mode da quando sono in java-mode, per esempio. Io non
  voglio che il mio codice Java sia allineato come se fosse testo in
  inglese. Ma io voglio che i blocchi di commenti nel mio codice Java
  siano allineati! La modalit auto-fill  intelligente abbastanza da
  capire il tutto.


  Gli autori delle varie modalit di Emacs hanno fatto un ottimo lavoro
  nell'assicurarsi che cose che dovrebbero funzionare come modalit
  secondarie siano delle modalit secondarie.


  Se riguardate al disegno in ASCII della schermata di Emacs, noterete
  che la linea di modo identifica la/le modalit in cui Emacs si trova.
  Nell'esempio, era in una modalit chiamata ``Lisp Interaction'' che 
  la modalit di default.  in realt utile solamente se state per
  scrivere codice Lisp. (Ma dato che la maggior parte di Emacs  scritta
  in Lisp, perch no?)


  3.2.  Le Modalit di Programmazione

  Primo e in primo luogo, Emacs  stato disegnato da un programmatore
  per programmatori. Ci sono modalit di alta qualit disponibili per
  quasi ogni linguaggio di programmazione pi diffuso a cui potete
  pensare (e perfino per qualcuno non cos diffuso). Qui descriver solo
  brevemente alcuni di essi.


  La maggior parte delle modalit condividono alcune caratteristiche
  comuni. Normalmente, alcune o tutte delle cose seguenti:


    Forniscono un'evidenziazione a colori della sintassi del
     linguaggio.

    Forniscono un indentazione automatica e formattazione del codice
     del linguaggio.

    Forniscono un aiuto (del linguaggio) sensibile al contesto.

    Si interfacciano automaticamente con il vostro debugger.

    Aggiungono dei men specifici del linguaggio alla barra dei men.


  In pi, ci sono delle modalit non specifiche di un linguaggio che
  aiutano per scopi che sono comuni nella programmazione in molti
  linguaggi. Cose del tipo interfacciamento per il vostro controllo di
  versione del software, aggiunta automatica di commenti al vostro
  codice, creazione di Makefile, aggiornamento di Change Logs e cos
  via.


  Quando aggiungete tutte queste modalit e considerando la maturit e
  la stabilit del codice di Emacs, questi sar abbastanza ben
  comparabile agli Integrated Development Environments (IDE) commerciali
  sul mercato per linguaggi come C++ e Java. E, ovviamente,  gratuito.


  3.2.1.  C/C++/Java

  Dato che la sintassi del C, C++ e Java sono abbastanza simili, c' una
  modalit di Emacs che tratta tutti e tre i linguaggi (lo stesso per
  Objective-C e IDL).  veramente un maturo e completo package ed 
  incluso nella distribuzione di Emacs. Questa modalit si chiama cc-
  mode o CC Mode.


  Per maggiori dettagli o per scaricare la versione pi recente,
  visitate http://www.python.org/emacs/.


  3.2.2.  Perl

  Ci sono di fatto due modalit per l'editing del codice Perl in Emacs.
  Il primo si chiama perl-mode (come vi potevate aspettare) e il secondo
   cperl-mode. Non ho una buona padronanza di questa storia e del
  perch ci sono due modalit (i documenti non lo dicono), ma
  sembrerebbe che perl-mode fosse la modalit originale per editare il
  codice Perl in Emacs. Sembra avere meno servizi del cperl-mode e manca
  l'abilit di riconoscere alcuni costrutti estrosi del linguaggio Perl.


  Personalmente, io uso e raccomando cperl-mode il quale sembra essere
  abbastanza attivamente mantenuto ed ha quasi tutte le funzionalit che
  potrei mai volere. Potete trovare l'ultima release qui:
  ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs.


  Ma non prendete le mie parole come definitive. Provateli entrambi e
  usate quello che meglio soddisfa le vostre necessit.


  3.2.3.  Python

  Anche per Python (un altro linguaggio di scripting molto popolare) 
  disponibile una modalit Emacs. Per quel che posso dire io, non 
  distribuito con GNU Emacs ma  distribuito con XEmacs. Comunque
  funziona abbastanza bene in ambedue gli editor.


  Potete ottenere il python-mode dal sito web ufficiale di Python
  http://www.python.org/emacs/python-mode/.


  3.2.4.  Altro

  Ci sono molte molte altre modalit di editing disponibili per aiutare
  i programmatori. Queste modalit aiutano con cose tipo:


    Script della shell (Bash, sh, ksh, csh, ...)

    Awk, Sed, Tcl, ...

    I Makefile

    Change Logs

    Documentazione

    Debugging


  E ancora di pi. Guardate l'ultima sezione di questo documento per
  maggiori informazioni per trovare altre modalit e add-in.


  3.3.  Editoria

  Le fantasiose modalit di Emacs non sono limitate solo a quelli che
  scrivono codice. Anche persone che scrivono documentazione (di
  qualsiasi tipo) possono beneficiare di un'ampia scelta di modalit di
  Emacs.


  3.3.1.  Controllo ortografico ( ispell  mode)

  Gli autori di molti tipi di documenti hanno bisogno di effettuare ogni
  tanto il controllo ortografico. Se avete GNU ispell installato, potete
  digitare M-x ispell ed effettuare il controllo ortografico sul buffer
  corrente. Se ispell trova parole che non conosce, vi avvisa con una
  lista di possibili rimpiazzi e vi permette di selezionarne uno (o
  nessuno). Le sue funzionalit equivalgono ai controllori ortografici
  in molti pacchetti software diffusi, non gratuiti.


  3.3.2.  HTML ( html-helper  mode)

  Se vi trovate a dover scrivere file HTML una volta ogni tanto (oppure
  molte volte), potreste provare html-helper-mode.  disponibile da
  http://www.santafe.edu/~nelson/tools/ oltre alla documentazione e
  altra roba correlata.


  Come il suo nome suggerisce, html-helper-mode fornisce molte cose per
  aiutare quelle persone che ancora scrivono HTML a mano (alla vecchia
  maniera).


  3.3.3.  TeX ( tex-mode )

  Quando state scrivendo documenti in TeX,  spesso di aiuto avere Emacs
  che aggiunge alcuni colori ed evidenzia le barre inverse, parentesi
  graffe ed altri caratteri. tex-mode si occupa di questo per voi.


  Sebbene non scriva pi molto direttamente in TeX, quando l'ho fatto,
  questa modalit si  rivelata abbastanza utile nel rendere i miei
  sorgenti in TeX un po' pi leggibili.


  3.3.4.  SGML ( sgml-mode )

  Il documento che state leggendo  stato scritto in SGML (e
  probabilmente convertito nel formato in cui lo state leggendo). sgml-
  mode fornisce tutte le basi per i documenti SGML: validazione,
  evidenziazione, marcatore avanti, marcatore indietro e molto altro. 
  una parte standard di Emacs.


  3.4.  Altre modalit

  Ovviamente, ci sono molte altre utili modalit per rendere la vita pi
  facile. Ecco giusto un campione delle pi diffuse:


  3.4.1.  Controllo di versione ( vc  mode)

  La modalit vc si interfaccia con la maggior parte dei pi diffusi
  controllori di versione dell'ultim'ora (RCS, SCCS, CVS) per rendere
  veramente facile il controllo dei file dentro e fuori, gestire release
  e cos via.  una parte standard di Emacs ed  documentata nella
  documentazione di Emacs.


  3.4.2.  Modalit Shell

  Perch spostarsi in un'altra finestra X o in una console virtuale solo
  per far girare pochi comandi della shell? Fatelo da dentro Emacs e
  evitatevi il problema. :-)


  M-x shell lancer una shell dentro a un buffer di Emacs. Potete fare
  con questo buffer la maggior parte di quello che potreste fare al
  prompt di una normale shell (eccetto che lanciare programmi a tutto
  schermo come vi o pine) poich Emacs dialoga con la vostra vera shell
  dietro le quinte.


  Questa  una parte standard di Emacs, di nuovo, quindi la troverete
  documentata nella documentazione di Emacs.


  3.4.3.  Telnet e FTP

  Perch spostarsi in un'altra finestra X o in una console virtuale solo
  per far girare telnet o FTP? Fatelo da dentro Emacs e evitatevi il
  problema. (Non avete ancora notato il modello?)


  Similmente a lanciare una shell all'interno di Emacs, potete fare
  telnet e ftp. Provate M-x telnet o M-x ftp per sperimentarlo da soli.
  Vedere la documentazione per tutti i grumosi dettagli.


  3.4.4.  Man

  Perch spostarsi in un'altra finestra X o in una console virtuale solo
  per leggere una pagina man? Fatelo da dentro Emacs e evitatevi il
  problema. (Smetto! Lo prometto.)


  Similmente a lanciare una shell all'interno di Emacs, potete leggere
  le pagine man. Provate M-x man per sperimentarlo da soli. Vedere la
  documentazione per altre informazioni.


  3.4.5.  Ange-FTP

  Citando la documentazione di ange-ftp:


       Questo pacchetto tenta di dare accesso a file e directory
       usando FTP dall'interno di GNU Emacs nel modo pi semplice e
       trasparente possibile. Un sottoinsieme delle comuni routine
       di gestione dei file sono state estese per interagire con
       FTP.



  Questo significa che potete trattare i file in una macchina remota
  come se fossero in locale. Quindi se avete bisogno di editare un file
  su un computer remoto, dite semplicemente a Emacs di aprirlo (usando
  una sintassi leggermente diversa per il percorso) ed egli si occuper
  di tutti i dettagli di collegamento e rintracciamento del file. Dopo,
  quando salvate il file con C-x C-s, ange-ftp intercetta il salvataggio
  e scrive il file sulla macchina remota.


  La sintassi leggermente diversa per il percorso  qualcosa di
  simile... Un file chiamato ``miofile'', in una directory ``user'', su
  una macchina chiamata ``my.host.org'' pu essere aperto aprendo (C-x
  f) il file con:


       /user@my.host.org:~user/miofile



  Anche questo  parte della distribuzione standard di Emacs, quindi
  potete trovare la sua documentazione nella documentazione di Emacs.


  Grazie a Etienne Grossmann (etienne@anonimo.isr.ist.utl.pt) per
  l'esempio sopra riportato.


  4.  Personalizzare Emacs

  Di fatto tutta la personalizzazione di Emacs viene fatta tramite
  codice Lisp. Potete modificare variabili che influenzano il modo in
  cui Emacs opera o potete aggiungere nuove funzioni a Emacs (o
  sovrascrivere funzioni esistenti, rimpiazzandole con altre vostre).


  4.1.  Personalizzazione temporanea

  Mentre starete sperimentando la personalizzazione di Emacs,
  probabilmente vorrete farlo in un modo che sia temporaneo. Se fate
  qualcosa di orribilmente sbagliato, avrete solo da uscire da Emacs con
  C-x C-c e rilanciarlo di nuovo. Una volta che avrete capito quali
  cambiamenti rendere permanenti, potrete aggiungerli al vostro file
  molto personale .emacs in modo che possa avere effetto ogni volta che
  avvierete Emacs. Questo viene discusso nella prossima sezione.

  4.1.1.  Assegnazione di variabili

  Le personalizzazioni pi semplici si ottengono cambiando il valore di
  una variabile in Emacs. Il codice listato per fare questo appare
  simile a questo:


  (setq nome-variabile nuovo-valore)




  Dove nome-variabile  il nome della variabile e nuovo-valore  il
  valore che vorreste dare alla variabile (in gergo Lisp, state legando
  una variabile ad un valore). La funzione setq in lisp  analoga agli
  operatori di assegnamento (normalmente =) in altri linguaggi di
  programmazione.


  NOTA: Qui sto passando sopra a molti dettagli per amor di semplicit.
  Potreste anche vedere me o altri, usare le funzioni Lisp set e perfino
  setq-default. Se siete veramente curiosi, dateci un'occhiata nei testi
  di riferimento di Emacs Lisp.


  Diamo un'occhiata alla riga presa dal mio file .emacs


  (setq-default transient-mark-mode t)




  La variabile transient-mark-mode controlla se una  (region) diventa
  evidenziata o no quando la marco. In molte applicazioni GUI, se
  cliccate e trascinate il mouse per selezionare una parte di testo,
  questi diventa evidenziato in video inverso o in altri colori. Emacs
  far la stessa cosa se la variabile transient-mark-mode  impostata
  (ad un valore non-nil).


  Un valore COME?


  Okay. Breve digressione. La maggior parte dei linguaggi di
  programmazione hanno diverse opinioni sui valori vero/valso. In C/C++
  un valore  considerato vero se  un valore non-zero. In Perl, un
  valore non-nullo o non-zero  vero. In Lisp, si applica la stessa idea
  ma i nomi e i simboli sono differenti.


  Vero  normalmente scritto come t e falso (o null)  scritto come nil.
  Come in altri linguaggi, tuttavia, qualsiasi valore non-nil 
  considerato vero.


  Per ottenere la descrizione completa di che cosa fa transient-mark-
  mode, potete usare l'aiuto in linea. Digitate C-h v o M-x describe-
  variabile e poi transient-mark-mode. Se siete pigri come me, potete
  avvalervi del completamento del nome della variabile usando il tasto
  Tab. Digitate solo una parte del nome della variabile e premete il
  tasto Tab. Se avete digitato abbastanza lettere del nome in modo che
  Emacs possa gi identificarlo univocamente, vedrete l'intero nome
  completarsi per voi.


  Un'altra variabile che le persone spesso impostano  fill-column.
  Questa dice ad Emacs quanto largo lo schermo deve essere per eseguire
  l'allineamento (e auto-fill-mode rispetta questo valore). Per
  impostare il valore su qualcosa di assurdo, potete digitare:


  (setq fill-column 20)




  Ma questo di fatto non far niente. Avete bisogno di dire a Emacs di
  valutare l'espressione che avete digitato. Per fare questo, portate il
  puntatore (cursore) alla fine dell'espressione e poi digitate  C-x C-
  e, il quale chiama la funzione eval-last-sexp nel caso non siate
  sicuri. Quando fate questo, notate che 20 (o qualsiasi valore avete
  usato) vi viene mostrato nel mini-buffer alla base dello schermo.
  Questo  giusto il valore ritornato dall'espressione che avete
  valutato.


  Giusto per provare che funziona, digitate una frase o due. Se avete
  auto-fill-mode abilitato (probabilmente non lo avete), noterete il
  testo allineato alla colonna marcata 20. Altrimenti, dopo che avrete
  digitato qualcosa, digitate M-q che chiama la funzione fill-paragraph.
  Questo eseguir l'allineamento del testo.

  4.1.2.  Associazioni di file

  Potete configurare Emacs per fare automaticamente qualcosa quando
  aprite un file di un tipo particolare (come certe GUI che lanciano
  automaticamente una specifica applicazione se cliccate sull'icona di
  un particolare file). Per esempio, io potrei volere che
  automaticamente Emacs entrasse in text-mode ogni volta che io apro un
  file con estensione .txt. Beh!, questo gi succede. :-) Allora diciamo
  a Emacs di entrare sempre in text-mode quando si apre un file chiamato
  ``README''.


  (setq auto-mode-alist (cons '("README" . text-mode) auto-mode-alist))




  Eh?


  Senza immergersi dentro tanti comandi Lisp che in effetti non avete
  bisogno di conoscere (ma che non vi farebbe male imparare), diciamo
  solo che la variabile auto-mode-alist contiene una lista di coppie.
  Ciascuna coppia contiene un'espressione regolare ed un nome di
  modalit di Emacs. Se un file che aprite coincide con l'espressione
  regolare (in questo caso, la stringa README) Emacs avvia la modalit
  che avete specificato.


  La strana sintassi riportata sopra  perch noi stiamo di fatto
  aggiungendo un altra coppia a quella lista delle modalit. E voi non
  vorreste giusto assegnare qualcosa a auto-mode-alist senza assicurarvi
  che i valori che gi contiene non vengano persi.


  E se io voglio che Emacs entri automaticamente in html-helper-mode
  ogni volta che apro un file che finisce con .html o .htm, lo
  aggiunger al mio file .emacs:

  (setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist))
  (setq auto-mode-alist (cons '("\\.htm$" . html-helper-mode) auto-mode-alist))




  Le possibilit sono veramente infinite.


  4.2.  Usare un file .emacs

  Dopo che avrete speso un po' di tempo con Emacs e avrete un'idea
  basilare di che cosa la personalizzazione pu fare per voi, vorrete
  probabilmente personalizzare un po' di cose in maniera permanente (o
  almeno finch non cambiate idea). Se vi ritrovate ad usare Emacs
  quotidianamente, noterete anche che il vostro file .emacs diventa
  sempre pi grande con il passare del tempo. Questa  una Buona Cosa
  perch significa che avete capito come fare in modo che Emacs lavori
  nel modo in cui voi volete che lavori.  una vergogna che tanti
  prodotti software non vi diano la possibilit di fare questo.


  Nel caso non lo abbiate ancora indovinato, ogni volta che avviate
  Emacs, questi cerca un file chiamato .emacs nella vostra directory
  home. Il vostro file .emacs si trova dove dovreste mettere qualsiasi
  codice Lisp che volete lanciare automaticamente e che include qui il
  tipo di personalizzazione che abbiamo gestito.


  Un altro esempio dal mio file .emacs:


  (setq inhibit-startup-message t)




  La variabile inhibit-startup-message controlla se Emacs mostra o no il
  messaggio di benvenuto quando si avvia. Dopo un po', mi sono stufato
  di vederlo (perch sapevo gi come trovare o non trovare l'help),
  quindi ho cercato un modo per disattivarlo.


  Come esercizio, provate a creare un file .emacs da soli e ad
  aggiungergli la riga riportata sopra. Poi uscite e riavviate Emacs di
  nuovo. Non dovreste pi vedere il messaggio di benvenuto.


  Spesso quando leggerete riguardo una modalit di Emacs (o un package),
  la documentazione suggerir di aggiungere del codice al vostro file
  .emacs in modo da far lavorare la modalit o il package in un modo
  particolare.


  Le FAQ di GNU Emacs (C-h F) contengono delle cose relative ai file
  .emacs che potreste trovare utili.


  4.3.  Il package Customize

  A mano a mano che Emacs  cresciuto in popolarit e ha continuato ad
  evolversi, qualcuno evidentemente deve essersi detto ``ci deve essere
  un modo migliore per i nuovi utenti di personalizzare il loro Emacs.''
  E nacque customize.


  Customize fornisce un modo pi intuitivo di personalizzare parti di
  Emacs. Per provarlo, visitate il sottomen Customize nel vostro men
  Help, o digitate M-x customize.


  Customize raggruppa le personalizzazioni in gruppi logici come
  ``Editing'', ``Programming'', ``Files'' e cos via. Alcuni gruppi
  contengono dei sottogruppi.


  Se fate dei cambiamenti usando l'interfaccia di customize, Emacs
  salver i cambiamenti nel vostro file .emacs. Questo  piuttosto
  pratico, perch potete facilmente controllare (e cambiare) i
  cambiamenti che customize fa per voi.


  Io non uso l'interfaccia Customize, quindi non posso dirvi molto altro
  al riguardo..


  4.4.  Visualizzazione in X Windows

  Come qualsiasi applicazione X ben fatta, Emacs rispetta le vostre
  risorse X. Questo significa che potete controllare i colori iniziali,
  la geometria e altre cose specifiche di X, come potete farlo di solito
  con un xterm, nxterm, o altro.


  Ecco qui la parte pi importante del mio file ~/.Xdefaults:


  emacs*Background: DarkSlateGray
  emacs*Foreground: Wheat
  emacs*pointerColor: Orchid
  emacs*cursorColor: Orchid
  emacs*bitmapIcon: on
  emacs*font: fixed
  emacs.geometry: 80x25




  Consultate la vostra pagina man su X per maggiori dettagli riguardo le
  risorse X.


  Chris Gray (cgray4@po-box.mcgill.ca) inoltra nota:


       In Debian, il file ~/.Xdefaults non sembra essere usato.
       Comunque, gli utenti Debian possono mettere quello che hanno
       stabilito in /etc/X11/Xresources/emacs e potranno avere i
       simpatici colori che avevano quando usavano RedHat.



  5.  Package diffusi

  In aggiunta alle molte modalit diverse disponibili per Emacs, ci sono
  anche molti package add-on. Li ho chiamati package perch sono
  qualcosa di pi che solo nuove modalit. Questi spesso includono delle
  utility extra o sono cos grandi che chiamarli modalit non gli rende
  giustizia. In altri casi ancora, questi sono software che estendono o
  integrano altre modalit e package di Emacs. La distinzione non 
  pienamente chiara, ma va bene lo stesso.

  5.1.  VM (Mail)

  Per citare la FAQ di VM:


       VM (View Mail)  un sottosistema Emacs che permette di leg
       gere e disporre della posta all'interno di Emacs. I comandi
       esistenti permettono di fare le normali cose che ci si
       aspetta da un agente client di posta, tipo generare reply,
       salvare messaggi in cartelle, cancellare messaggi e cos
       via. Ci sono altri comandi avanzati per scopi come far sgor
       gare e creare riassunti, inoltro di messaggi e organiz
       zazione della presentazione di messaggi in accordo con vari
       criteri.



  Quando ho cominciato ad usare Emacs, ho provato VM per un po' di
  tempo. L'ho trovato essere un ottimo rimpiazzo di Pine, Elm o per la
  maggior parte di altri programmi di posta. Ma non ho voluto usare
  programmi diversi per leggere posta e news. VM  ad oggi attivamente
  sviluppato e ben supportato.


   disponibile qui: http://www.wonderworks.com/vm/.


  5.2.  Gnus (Mail e News)

  Per citare il manuale di GNUS:


       Gnus  un laboratorio di lettura di messaggi. Vi d la pos
       sibilit di accedere a quasi tutto come se fosse un news
       group. Potete leggere la posta, scorrere fra le directory,
       fare ftp (potete perfino leggere le news con esso!)



       Gnus cerca di dare pieni poteri alle persone che leggono le
       news nello stesso modo in cui Emacs d pieni poteri alle
       persone che editano testo. Gnus non crea limiti a quello che
       l'utente pu essere in grado di fare. Gli utenti sono incor
       aggiati ad estendere Gnus a comportarsi come loro vogliono
       che si comporti. Un programma non deve controllare le per
       sone; la gente deve essere autorizzata a fare quello che
       vuole usando (o abusando) del programma.



  GNUS  quello che attualmente uso per mail e news (come alludevo
  sopra). GNUS  anche attivamente sviluppato e ben supportato ad oggi.


   disponibile qui: http://www.gnus.org/.


  5.3.  BBDB (Un rollodex)

  BBDB  un insidioso database da Grande Fratello, un programma tipo-
  rollodex per Emacs che funziona con la maggior parte dei package pi
  popolari di posta per Emacs Mail (VM e GNUS inclusi).


   disponibile qui: http://pweb.netcom.com/~simmonmt/bbdb/index.html.

  5.4.  AucTeX (un altra modalit TeX)

  AucTeX  un'altra modalit per editare file TeX.


  Per citare il sito web di AucTeX:


       AUC TeX  un package ampliabile che supporta scrittura e
       formattazione di file TeX per la maggior parte delle vari
       anti di GNU Emacs. Sono supportate la maggior parte dei
       package macro, incluso AMS TeX, LaTeX e TeXinfo.



   disponibile qui: http://sunsite.auc.dk/auctex/.


  6.  Altre risorse

  Questa sezione copre libri, siti web, newsgroup, mailing list e altri
  posti in cui potete trovare ulteriori informazioni riguardo Emacs.


  6.1.  Libri

  Ci sono alcuni libri veramente buoni per imparare Emacs. In aggiunta a
  questi, troverete che anche molti libri su Linux e Unix contengono un
  capitolo o due riguardo Emacs (e vi).


  6.1.1.  Learning GNU Emacs

  (Imparare GNU Emacs)


  Autori: Debra Cameron, Bill Rosenblatt, Eric S. Raymond


  Editore: O'Reilly & Associates - http://www.ora.com/


  Potete comprarlo con uno sconto da Amazon.com tramite il loro
  programma Associates:
  http://www.amazon.com/exec/obidos/ASIN/1565921526/


  Commento: Questo  probabilmente il miglior libro da cui iniziare.
  Dopo aver letto l'HOWTO e scorso le FAQ, questo libro serve come una
  guida esauriente e molto accessibile.


  6.1.2.  Writing GNU Emacs Extensions

  (Scrivere estensioni per GNU Emacs)


  Autore: Bob Glickstein


  Editore: O'Reilly & Associates - http://www.ora.com/


  Potete comprarlo con uno sconto da Amazon.com tramite il loro
  programma Associates::
  http://www.amazon.com/exec/obidos/ASIN/1565922611/
  Commento: Dopo che avrete usato Emacs per un po' e avrete deciso che
  vi piacerebbe una modalit vostra o forse provare qualche
  personalizzazione avanzata, questo sar il libro per voi. Nonostante
  non provi ad insegnare il Lisp, contiene comunque una breve
  introduzione al linguaggio.


  6.1.3.  Programming in Emacs Lisp: An Introduction

  (Programmare in Emacs Lisp: Un'introduzione)


  Autore: Robert J. Chassell


  Dal file README:


       Questa  una introduzione elementare alla programmazione in
       Emacs Lisp per persone che non sono programmatori e per chi
       non  necessariamente interessato alla programmazione, ma
       per chi vuole personalizzare o estendere il loro ambiente di
       lavoro.



  Potete scaricare il manuale nella sua interezza via FTP anonimo dal
  server GNU FTP: ftp://prep.ai.mit.edu/gnu/emacs/.


  Potete acquistare una buona versione stampata da Amazon.com tramite il
  loro programma Associates:
  http://www.amazon.com/exec/obidos/ASIN/1882114418/jeremydzawodny/.


  Commento: Questo  un buon manuale introduttivo per Emacs Lisp, anche
  se non siete un programmatore con grandi pretese.


  6.1.4.  The GNU Emacs Lisp Reference Manual

  (Il manuale di riferimento di GNU Emacs)


  Autore: Richard Stallman


  Editore: The Free Software Foundation - http://www.fsf.org/


  Potete scaricare il manuale nella sua interezza via FTP anonimo dal
  server GNU FTP: ftp://prep.ai.mit.edu/gnu/emacs/.


  Commento: Questa  la guida definitiva al linguaggio di programmazione
  Emacs Lisp.


  6.2.  Siti Web

  6.2.1.  EMACSulation

  EMACSulation  una rubrica scritta da Eric Marsden che appare nella
  rivista on-line Linux Gazette che si trova a
  http://www.linuxgazette.com/. La rubrica pi recente al momento in cui
  scrivo si trova a http://www.linuxgazette.com/issue39/marsden.html.
  Cercare alla fine dell'articolo per i collegamenti a quelle
  precedenti.


  6.3.  Newsgroup

  Cercate dal vostro fornitore locale di news dei newsgroup che
  contengano la stringa ``emacs'' e ne troverete probabilmente molti.
  Quelli che il mio server pubblica sono


    comp.emacs

    comp.emacs.sources

    gnu.emacs

    gnu.emacs.bug

    gnu.emacs.help

    gnu.emacs.sources


  6.4.  Mailing List

  La sola mailing list dedicata a Emacs che io conosco per ora  la NT-
  Emacs list.  una lista per persone che usano la versione per
  Micro$oft Windows di Emacs. Vedere le FAQ di NT-Emacs
  http://www.cs.washington.edu/homes/voelker/ntemacs.html per maggiori
  informazioni.


  6.5.  L'Emacs Lisp Archive

  Dal README dell'Emacs Lisp Archive:


       Gli archivi Emacs Lisp su ftp.cis.ohio-state.edu contengono
       vari pezzi e pacchetti di codice Emacs Lisp.  Emacs Lisp 
       il linguaggio usato per estendere l'editor GNU Emacs pubbli
       cato dalla Free Software Foundation.  Nonostante molto
       codice Emacs Lisp sia incluso nella distribuzione GNU Emacs,
       molte persone hanno scritto dei pacchetti per interfacciarsi
       con altri sistemi, per supportare meglio l'editing del lin
       guaggio di programmazione che loro usano, per aggiungere
       nuove funzionalit, o per cambiare l'ambiente di default di
       Emacs.  La maggior parte del contenuto di questo archivio 
       stato scritto da singole persone e pubblicamente distribuito
       su Internet attraverso le mailing list info-emacs o info-
       gnu-emacs o i newsgroup comp.emacs, gnu.emacs, o
       gnu.emacs.sources.



  Gli archivi sono disponibili tramite FTP anonimo da
  ftp://ftp.cis.ohio-state.edu/pub/emacs-lisp/.


  NOTA: Per quello che posso dire, l'Emacs Lisp Archive sta lentamente
  diventando un po' datato. Vedo che vi appaiono molto pochi package
  nuovi (o aggiornamenti), sebbene sappia che ne esistono. Questi
  vengono in realt inviati al newsgroup comp.emacs.sources
  (correggetemi pure se questo  sbagliato).


  7.  Crediti

  Le seguenti persone hanno contribuito al successo di questo documento.


    Robert Vollmert rvollmer@gmx.net

    Larry Brasfield larrybr@seanet.com

    Etienne Grossmann etienne@anonimo.isr.ist.utl.pt

    Thomas Weinell kf6mli@amsat.org

    Adam C. Finnefrock adam@bigbro.biophys.cornell.edu

    Chris Gray cgray4@po-box.mcgill.ca

    Robert J. Chassell bob@rattlesnake.com

    Isaac To kkto@csis.hku.hk

    Matteo Valsasna valsasna@elet.polimi.it

    Tijs van Bakel smoke@casema.net










































  Linux Ethernet-HOWTO
  by Paul Gortmaker
  v2.7, 5 maggio 1999

  Questo  Ethernet Howto, una raccolta di informazioni su quali dispos
  itivi Ethernet possono essere usati con Linux e su come configurarli.
  Si noti che questo Howto si concentra sull'aspetto hardware e sui
  driver a basso livello delle schede Ethernet e non tratta l'aspetto
  software di cose come ifconfig e route.  Si veda il Network Howto per
  tali informazioni. Traduzione a cura di Lorenza Romano
  (titti@dei.unipd.it) e Giovanni Bortolozzo (borto@pluto.linux.it).

  1.  Introduzione


  Ethernet-Howto tratta delle schede che si dovrebbero e non si
  dovrebbero acquistare; di come configurarle, di come usarne pi di una
  e di altri problemi e quesiti frequenti. Comprende informazioni
  dettagliate sull'attuale livello di supporto di tutte le pi comuni
  schede Ethernet disponibili.

  Non comprende l'aspetto software delle cose, che  trattato nel NET-3
  Howto.  Si noti anche che quesiti generali, non specifici su Linux,
  riguardanti Ethernet, non trovano (o almeno non dovrebbero trovare)
  risposta qui. Per quesiti di quel tipo, si vedano le eccellenti
  informazioni nelle FAQ di comp.dcom.lans.ethernet, che possono essere
  scaricate via FTP da rtfm.mit.edu come tutte le altre FAQ dei
  newsgroup.

  Questa revisione tratta i kernel stabili fino alla versione 2.2.7
  compresa.

  Ethernet-Howto  di:

       Paul Gortmaker, p_gortmaker@yahoo.com


  Fonte principale di informazioni per la versione iniziale di Ethernet-
  Howto, disponibile esclusivamente in formato ASCII,  stato:

       Donald J. Becker, becker@cesdis.gsfc.nasa.gov


  che dovremmo ringraziare per aver scritto la grande maggioranza dei
  driver attualmente disponibili per Linux  per le schede Ethernet. 
  anche l'autore dell'originario NFS server. Grazie Donald!

  Questo documento  Copyright (c) 1993-1999 di Paul Gortmaker.  Si
  vedano la liberatoria e le informazioni sulla copia alla fine di
  questo documento (``copyright'') per informazioni circa la
  ridistribuzione e le solite questioni legali ``non siamo responsabili
  per ci che riuscirai a rompere...''.


  1.1.  Nuove versioni di questo documento


  Nuove versioni di questo documento possono essere reperite
  all'indirizzo:

  Ethernet-HOWTO <http://metalab.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html>

  o per chi desidera usare FTP e/o procurarsi formati non HTML:

  Sunsite HOWTO Archive <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/>

  Questo  il sito ufficiale, ma il documento pu anche essere trovato
  nei diversi mirror WWW/ftp. Gli aggiornamenti vengono fatti appena
  nuove informazioni e/o driver diventano disponibili. Se la copia che
  si sta leggendo  vecchia di pi di 6 mesi, si dovrebbe controllare
  per vedere se  disponibile una copia aggiornata.

  Questo documento  disponibile in diversi formati (postscript, dvi,
  ASCII, HTML, ecc.).  Personalmente consiglio di leggerlo in HTML
  (attraverso un browser WWW) o in formato Postscript/dvi. Entrambi
  contengono riferimenti incrociati che non sono inclusi nel formato
  ASCII.



  1.2.  Come usare Ethernet-Howto

  Poich questa guida sta diventando sempre pi grande, probabilmente
  non si vuole sprecare il resto del pomeriggio leggendola per intero. E
  la buona notizia  che non la si deve leggere tutta. Le versioni HTML
  e Postscript/dvi hanno un indice che aiuter senz'altro a trovare ci
  di cui si ha bisogno molto pi velocemente.

  Pu essere che si stia leggendo questo documento perch non si riesce
  a far funzionare le cose e non si sa cosa controllare o verificare. La
  sezione ``AIUTO -- Non funziona!''  rivolta ai nuovi utenti di Linux
  e metter nella direzione giusta.

  Tipicamente gli stessi problemi e quesiti sono posti pi e pi volte
  da diverse persone. Pu essere che il proprio problema specifico sia
  una delle Frequently Asked Questions (domande frequenti) e trova
  risposta nella sezione FAQ di questo documento (``Sezione FAQ'').
  Tutti dovrebbero dare un'occhiata a questa sezione prima di inviare
  una richiesta di aiuto.

  Se non si possiede una scheda Ethernet, allora si dovr in primo luogo
  scegliere una scheda (``Che scheda si dovrebbe acquistare...'').

  Se si possiede gi una scheda Ethernet, ma non si  sicuri di poterla
  usare con Linux, allora si dovr leggere la sezione che contiene
  informazioni specifiche su ogni produttore e le relative schede
  (``Informazioni specifiche su...'').

  Se si  interessati ad alcuni degli aspetti tecnici dei driver dei
  dispositivi per Linux, allora si pu dare una scorsa alla sezione
  contenente questo tipo di informazioni (``Informazioni tecniche'').


  1.3.  AIUTO -- Non funziona!


  Okay, niente panico. Questa sezione vi condurr per mano nel processo
  che consente di far funzionare le cose anche se non si hanno
  precedenti conoscenze di Linux o sull'hardware Ethernet.

  La prima cosa da fare  scoprire il modello della propria scheda
  cosicch si possa determinare se Linux ha un driver per quella
  particolare scheda. Generalmente schede diverse sono controllate in
  modo diverso dal computer ospite e il driver per Linux (se ne esiste
  uno) contiene queste informazioni per il controllo in un formato che
  permette a Linux di utilizzare la scheda.  Se non si ha un manuale o
  qualcosa del genere che dia informazioni sul modello della scheda,
  allora si pu provare la sezione di aiuto sulle schede misteriose (si
  veda la sezione ``Identificare una scheda sconosciuta'').

  Ora che si sa che tipo di scheda si possiede, si leggano da cima a
  fondo i dettagli a essa relativi nella sezione sulle specifiche delle
  schede (``Informazioni specifiche su...'') che elenca in ordine
  alfabetico i produttori di schede, i numeri identificativi dei modelli
  e se c' o meno un driver per Linux.  Se  catalogata come ``Non
  supportata'' ci si pu pressoch arrendere qui. Se non si riesce a
  trovare la propria scheda nell'elenco, si controlli per vedere se il
  suo manuale la cataloga come ``compatibile'' con un altro tipo di
  scheda conosciuto. Ci sono per esempio centinaia se non migliaia di
  schede diverse costruite per essere compatibili con il progetto
  originario NE2000 della Novell.

  Assumendo che si sia scoperto che esiste un driver per Linux per la
  propria scheda,  ora necessario trovarlo e farne uso.  Solo perch
  Linux ha un driver per la propria scheda ci non significa che esso
  sia compreso in ogni kernel (il kernel  il nucleo del sistema
  operativo, la prima cosa caricata all'avvio e contiene, tra le altre
  cose, i driver per le diverse parti hardware).  A seconda di chi ha
  prodotto la particolare distribuzione di Linux che si sta usando ci
  possono essere solo alcuni kernel precompilati e un grosso insieme di
  driver sotto forma di piccoli moduli separati, oppure un sacco di
  kernel, che coprono un enorme insieme di combinazioni di driver
  incorporati.

  Molte distribuzioni di Linux adesso contengono un gruppo di piccoli
  moduli, i diversi driver. I moduli necessari tipicamente vengono
  caricati in un secondo tempo nel processo di avvio o su richiesta non
  appena serve un driver per accedere ad un particolare dispositivo.
  Occorrer inserire questo modulo nel kernel dopo che  stato avviato.
  Si vedano le informazioni fornite con la propria distribuzione
  sull'installazione e l'uso dei moduli, oltre alla sezione sui moduli
  in questo documento (``Usare i driver Ethernet come moduli'').

  Se non si  trovato n un kernel precompilato con il proprio driver,
  n il driver in forma modulare,  probabile che si possieda una scheda
  rara e si dovr compilare il proprio kernel includendo il driver. Una
  volta installato Linux, la compilazione di un kernel su misura non 
  affatto difficile. Essenzialmente si risponde s o no a cosa si vuole
  che il kernel contenga e poi gli si dice di compilarlo. Esiste un
  Kernel-Howto che aiuter a far questo.

  A questo punto si dovrebbe essere riusciti in qualche modo ad avviare
  un kernel con il proprio driver incorporato o a caricare il driver
  come modulo. Poich circa la met dei problemi che ha la gente 
  dovuta al non avere caricato il driver n in un modo n nell'altro,
  ora si potrebbe scoprire che le cose funzionano.

  Se non funziona ancora allora  necessario verificare che il kernel
  stia effettivamente rilevando la scheda. Per fare questo, dopo che il
  sistema si  avviato e sono stati caricati tutti i moduli, fatto il
  login, digitare dmesg | more.  Questo permetter di rivedere i
  messaggi che il kernel ha fatto scorrere sullo schermo durante il
  processo di avvio. Se la scheda  stata rilevata si dovrebbe vedere da
  qualche parte in quell'elenco, un messaggio del driver della propria
  scheda che inizia con eth0 e cita il nome del driver e i parametri
  hardware per i quali  stata configurata (configurazione degli
  interrupt, indirizzo delle porte di input/output, ecc.).  Nota: Linux
  all'avvio elenca tutte le schede PCI installate nel sistema, senza
  badare ai driver disponibili, non si scambi questo per la rilevazione
  dei driver che avviene pi tardi.

  Se non si vede un messaggio di identificazione del driver di questo
  tipo, allora il driver non ha rilevato la propria scheda e questo  il
  motivo per il quale le cose non funzionano. Si vedano le FAQ
  (``Sezione FAQ'') per il da farsi se la propria scheda non viene
  rilevata. Nel caso si possieda una scheda NE2000 compatibile, nella
  sezione FAQ vi sono anche alcuni suggerimenti specifici per fare in
  modo che la scheda venga rilevata.
  Se la scheda viene rilevata ma il messaggio di rilevamento riporta un
  errore di qualche tipo, come un conflitto di risorsa, probabilmente il
  driver non sar inizializzato correttamente e la scheda continuer a
  non essere utilizzabile. Anche i pi comuni messaggi di errore di
  questo tipo sono elencati nella sezione FAQ insieme ad una soluzione.

  Se il messaggio di rilevamento sembra corretto, confrontare bene le
  risorse della scheda riportate dal driver con quelle per le quali la
  scheda  fisicamente configurata (attraverso dei piccoli ponticelli di
  colore nero sulla scheda o attraverso delle utilit software fornite
  dal produttore). Queste devono corrispondere esattamente.  Per esempio
  se la scheda  configurata per IRQ 15 e il driver riporta nei messaggi
  di avvio IRQ 10, le cose non funzioneranno. La sezione FAQ tratta i
  casi pi comuni di driver che non rilevano correttamente le
  informazioni di configurazione delle diverse schede.

  A questo punto si  riusciti a far s che la propria scheda sia
  rilevata con tutti i parametri corretti e, se tutto va bene, le cose
  funzionano. Altrimenti si ha o un errore di configurazione software o
  un errore di configurazione hardware. Un errore di configurazione
  software  il non configurare correttamente gli indirizzi di rete
  usando i comandi ifconfig e route e dettagli su come fare queste cose
  sono esaurientemente descritti nel Network HowTo e nella ``Network
  Administrator Guide''. Probabilmente entrambi si trovano nel CD-ROM
  che si  usato per l'installazione.

  Un errore di configurazione hardware si ha quando un qualche conflitto
  di risorsa o errore di configurazione (che il driver non ha rilevato
  in fase di avvio) impedisce alla scheda di funzionare correttamente.
  Ci pu essere osservato in parecchie situazioni diverse. (1) Si ha un
  messaggio di errore quando ifconfig tenta di aprire il dispositivo per
  usarlo, del tipo ``SIOCSFFLAGS: Try again''. (2) Il driver riporta
  messaggi d'errore su eth0 (li si pu vedere usando dmesg | more) o
  strane incongruenze ogniqualvolta prova a mandare o ricevere dati. (3)
  Digitando cat /proc/net/dev appaiono numeri diversi da zero in una
  delle colonne errs, drop, fifo, frame o carrier corrispondenti a eth0.
  (4) Digitando cat /proc/interrupts appare un numero di interrupt nullo
  per la scheda.  Anche la maggior parte dei tipici errori di
  configurazione hardware sono discussi nella sezione FAQ.

  Bene, se si  arrivati a questo punto e le cose non funzionano ancora,
  si legga la sezione FAQ di questo documento, si legga la sezione sulle
  specifiche dei produttori che descrive la propria scheda, e se ancora
  non funziona allora si dovrebbe riccorrere all'invio di una richiesta
  di aiuto ad un opportuno newsgroup. Se si invia la richiesta, si
  descrivano dettagliatamente tutte le informazioni del caso tipo la
  marca della scheda, la versione del kernel, i messaggi del driver
  all'avvio, l'output di cat /proc/net/dev, una chiara descrizione del
  problema e naturalmente cosa si  gi provato a fare per far
  funzionare le cose.

  Sorprenderebbe sapere quante persone inviano cose inutili del tipo
  ``Pu aiutarmi qualcuno? La mia scheda Ethernet non funziona'' e
  nient'altro.  I lettori dei newsgroup tendono a ignorare queste
  richieste stupide, mentre una descrizione dettagliata del problema pu
  consentire a un ``Linux-guru'' di individuare immediatamente il
  problema.




  2.  Che scheda si dovrebbe acquistare per Linux?


  La risposta a questa domanda dipende molto da cosa si intende
  esattamente fare con la propria connessione di rete e quanto traffico
  dovr sostenere.

  Se si prevede un singolo utente che occasionalmente faccia una
  sessione FTP o una connessione WWW, allora probabilmente anche una
  vecchia scheda ISA a 8 bit far al proprio caso.

  Se si intende installare un server e si vuole che l'overhead della CPU
  per la trasmissione e ricezione dei dati sia mantenuto al minimo,
  probabilmente si deve considerare una delle schede PCI che usano un
  chip con capacit di bus-mastering, per esempio il chip tulip (21xxx)
  della DEC o il chip Pcnet-PCI della AMD.

  Se si  in una situazione intermedia tra le due citate, una qualsiasi
  delle schede a basso costo PCI o ISA a 16 bit con driver stabili andr
  bene.


  2.1.  E quali sono i driver stabili?


  Per schede ISA a 16 bit, i seguenti driver sono piuttosto maturi e non
  si dovrebbero avere problemi se si acquista una scheda che li
  utilizza:

  SMC-Ultra/EtherEZ, SMC-Elite (WD80x3), 3c509, Lance, NE2000.

  Ci non significa che tutti gli altri driver non siano stabili. Si d
  il caso che quelli sopra siano i pi vecchi e i pi utilizzati fra
  tutti i driver per Linux e questo li rende l'alternativa pi sicura.

  Si noti che alcune schede madri economiche possono avere problemi con
  il bus-mastering fatto dalle schede Lance ISA e che alcuni cloni
  NE2000 possono avere problemi a essere rilevati all'avvio.

  I driver PCI per Linux pi comunemente usati sono probabilmente quelli
  per le Vortex/Boomerang (3c59x/3c9xx) della 3Com, il tulip (21xxx)
  della DEC e la EtherExpressPro 100 dell'Intel.  Anche le diverse
  schede clone della NE2000 PCI sono estremamente comuni, ma l'acquisto
  di un clone di questa scheda non  raccomandato a meno che spendere il
  meno possibile non sia pi importante che avere una scheda moderna
  concepita per elevate prestazioni.



  2.2.  Schede a 8 bit e schede a 16 bit a confronto

  Probabilmente non  pi possibile acquistare una scheda ISA a 8 bit
  nuova, ma per i prossimi anni ne salterranno fuori molte, e a prezzi
  molti bassi, ai raduni in cui avvengono scambi di pezzi per computer.
  Questo le render popolari per i sistemi ``Ethernet casalinghi''.
  Quanto sopra  valido adesso anche per le schede ISA a 16 bit visto
  che ora sono le schede PCI a essere molto comuni.

  Alcune schede a 8 bit che forniscono adeguate prestazioni per un uso
  dal leggero al medio sono la wd8003, la 3c503 e la ne1000.  La 3c501
  fornisce prestazioni scadenti; queste povere reliquie dei tempi XT,
  vecchie di 12 anni, dovrebbero essere evitate (si mandino ad Alan, le
  colleziona...).

  Il canale dati a 8 bit non nuoce cos tanto alle prestazioni: ci si
  pu aspettare di scaricare via ftp da un host veloce da 500 a 800kB/s
  con una scheda a 8 bit wd8003 (su un bus ISA veloce).  Se la maggior
  parte del proprio traffico di rete  verso siti remoti allora il collo
  di bottiglia nel percorso sar altrove e la sola differenza in
  velocit di cui ci si accorger  durante l'attivit di rete nella
  propria sottorete.
  2.3.  Schede Ethernet (VLB/EISA/PCI) a 32 bit


  Si noti che una rete a 10Mbps tipicamente non giustifica la richiesta
  di una interfaccia a 32 bit.  Si veda ``I/O programmato vs. ...'' sul
  perch avere una scheda Ethernet a 10Mbps su un bus ISA a 8 MHz
  realmente non  un collo di bottiglia. Anche se avere la scheda
  Ethernet su un bus veloce non significher necessariamente
  trasferimenti pi veloci, ci di solito comporter una riduzione del
  carico della CPU e questo  un vantaggio per sistemi multi utente.

  Naturalmente per reti a 100Mbps, che sono attualmente una
  consuetudine, l'interfaccia a 32 bit  una cosa di cui non si pu fare
  a meno per far uso dell'intera banda.

  La AMD offre i chip a 32 bit PCnet-VLB e PCnet-PCI.  Si veda ``AMD
  PCnet-32'' per informazioni sulle versioni a 32 bit del chip LANCE /
  PCnet-ISA.

  Il chip 21xxx PCI ``tulip'' della DEC  un'altra alternativa per i pi
  esigenti (si veda ``DEC 21040'').  Molti produttori realizzano schede
  che usano questo chip e il prezzo di queste schede senza nome  di
  solito abbastanza conveniente.

  Un'altra possibilit sono le schede PCI `Vortex' e `Boomerang' della
  3Com e il prezzo  abbastanza conveniente se si riesce a procurarsene
  una con un contratto di valutazione, finch dura (si veda
  ``3c590/3c595'').

  Anche le schede PCI EtherExpress Pro 10/100 della Intel si dice
  funzionino bene con Linux (si veda ``EtherExpress'')

  Parecchi produttori di cloni hanno iniziato a fare NE2000 PCI basate
  su chip RealTek o Winbond. Anche queste schede sono supportate dal
  driver per Linux ne2000 per i kernel versione v2.0.31 e pi recenti.
  Comunque si trae profitto solo dalla interfaccia bus pi veloce visto
  che la scheda usa ancora l'antichissima interfaccia driver ne2000.
  Dalla versione v2.0.34 (e superiori)  disponibile anche un driver
  separato specifico per queste schede PCI ne2k-pci.c che  pi
  efficiente del driver ISA ne.c.


  2.4.  Schede e driver a 100Mbps disponibili


  La lista dell'hardware a 100Mbps attualmente supportato  la seguente:
  schede con chip DEC 21140; schede 3c595/3c90x Vortex; le
  EtherExpressPro10/100B; le PCnet-FAST; le SMC 83c170 (epic100) e le HP
  100VG ANY-LAN.

  Per ciascun tipo si dia un'occhiata alle informazioni specifiche sui
  produttori presenti in questo documento. Pu essere necessario dare
  un'occhiata anche a uno di questi:




  Linux and 100Mbs Ethernet
  <http://cesdis.gsfc.nasa.gov/linux/misc/100mbs.html>

  Donald's 100VG Page
  <http://cesdis.gsfc.nasa.gov/linux/drivers/100vg.html>

  Dan Kegel's Fast Ethernet Page <http://alumni.caltech.edu/~dank/fe/>


  2.5.  100VG e 100BaseT a confronto


  100BaseT  molto pi importante di 100VG e il seguente messaggio
  promazionale di Donald tratto da una delle sue news informative pi
  vecchie inviate su comp.os.linux riassume abbastanza bene la
  situazione: Per coloro che non ne sono al corrente, esistono due
  standard Ethernet a 100Mbs in competizione, 100VG (conosciuto anche
  come 100baseVG e 100VG-AnyLAN) e 100baseT (con tipi di cavo 100baseTx,
  100baseT4 e 100baseFx).  Lo standard 100VG  entrato per primo sul
  mercato e penso sia stato strutturato meglio rispetto al 100baseTx.
  Facevo il tifo affinch vincesse ma certamente non vincer. HP e altri
  hanno fatto parecchie scelte sbagliate:

  1) Rinviando lo standard cos da poter favorire IBM e supportare i
  frame token ring. Ci sembr una buona idea all'epoca visto che
  avrebbe consentito alle imprese che usavano token ring di aggiornare
  senza che i loro manager dovessero ammmettere di aver fatto un errore
  molto costoso commissionando la tecnologia sbagliata. Ma non ci si
  guadagn nulla visto che i due tipi di frame non potevano coesistere
  su una rete, il token ring  un pantano di complessit e comunque IBM
  pass a 100baseT.

  2) Producendo esclusivamente schede ISA e EISA (un modello PCI  stato
  annunciato solo recentemente). Il bus ISA  troppo lento per 100Mbs ed
  esistono relativamente poche macchine EISA. All'epoca VLB era comune,
  veloce e conveniente e PCI una alternativa fattibile. Ma il buon senso
  ``tradizionalista'' riteneva che i server si sarebbero fermati ai pi
  costosi bus EISA.

  3) Non inviandomi un databook. S questa mossa  stata la vera ragione
  del fallimento di 100VG :-). Ho richiesto ovunque informazioni di
  programmazione e tutto ci che ho potuto ottenere  stata una brochure
  a colori dalla AT&T, di qualche pagina, su carta patinata, che
  descriveva quanto meraviglioso fosse il chipset Regatta.



  2.6.  Tipi di cavo che la propria scheda dovrebbe supportare

  Se si sta allestendo una piccola rete ``personale'', si dovr
  probabilmente usare thinnet ovvero cavi Ethernet sottili. Cio la
  versione con connettori standard BNC.  La thinnet o cablaggio Ethernet
  sottile (cavo coassiale RG-58) con connettori BNC (di metallo, da
  spingere e girare per chiudere)  chiamata tecnicamente 10Base2.

  Stanno diventando comuni anche moltissime schede Ethernet in una
  versione ``mista'' (combo) per soli $10-$20 in pi. Queste schede
  hanno incorporato sia il transceiver per il doppino intrecciato
  (twisted pair) che per thinnet, consentendo di cambiare idea in
  seguito.

  Il cavo a doppino intrecciato e connettori RJ-45 (giant phone jack --
  connettore telefonico gigante)  chiamato tecnicamente 10BaseT. Lo si
  pu sentir chiamare anche UTP (Unshielded Twisted Pair -- doppino
  intrecciato non schermato).

  La pi datata thick (spessa) Ethernet (cavo coassiale da 10mm), che si
  trova solo nelle installazioni pi vecchie,  chiamata 10Base5. La
  spina a 15 pin, a forma di lettera D, che si trova su alcune schede
  Ethernet (il connettore AUI)  usato per connettere transceiver
  esterni e thick Ethernet.

  Installazioni aziendali estese useranno probabilmente 10BaseT
  piuttosto che 10Base2. 10Base2 non offre alcuna possibilit di
  aggiornamento a una 100Base-qualsiasi.
  Si veda ``Cavi, coassiali,...'' per altre informazioni riguardanti i
  diversi tipi di cavi Ethernet.



  3.  Domande frequenti

  Ecco alcuni dei quesiti posti pi frequentemente a proposito dell'uso
  di Linux con una connessione Ethernet. Alcuni dei quesiti pi
  specifici sono classificati in ``base al costruttore''.  Pu essere
  che il quesito per il quale si ha bisogno di una risposta sia gi
  stato posto da qualcun altro (e abbia trovato risposta!), perci anche
  se non si trova la risposta qui, probabilmente si pu trovare ci che
  di cui si ha bisogno in un archivio di news come Dejanews
  <http://www.dejanews.com>.


  3.1.  Driver alpha -- come procurarseli e come usarli

  Ho sentito che  disponibile un driver aggiornato oppure un driver
  preliminare o alpha (sperimentale) per la mia scheda. Dove posso
  procurarmelo?

  Il ``pi nuovo dei nuovi'' driver pu essere trovato sul sito FTP di
  Donald: cesdis.gsfc.nasa.gov nell'area /pub/linux/. Qui le cose
  cambiano abbastanza frequentemente perci si cerchi bene. In
  alternativa, per localizzare il driver che si sta cercando, pu essere
  pi facile usare un browser WWW all'indirizzo:

  Don's   Linux Home Page <http://cesdis.gsfc.nasa.gov/linux/>

  (ci si guardi dai browser WWW che fanno il ``munge'' (NdT munge:
  trasformare in modo imperfetto le informazioni [dal Jargon Lexicon])
  del sorgente sostituendo i TAB con spazi e cos via -- se si  incerti
  usare ftp o almeno un URL FTP per scaricare).

  Ora, se il driver  realmente un alpha o pre-alpha, lo si tratti come
  tale. In altre parole, non si reclami perch non si capisce cosa
  farne. Se non si riesce a capire come installarlo allora probabilmente
  non lo si dovrebbe provare. Anche se mette fuori uso la propria
  macchina, non si reclami. Si mandi invece un rapporto ben documentato
  del bug o, ancora meglio, una patch!

  Si noti che alcuni dei driver sperimentali/alpha ``utilizzabili'' sono
  stati inclusi nell'albero dei sorgenti del kernel standard.  Una delle
  prime cose che verranno chieste quando si esegue make config 
  ``Prompt for development and/or incomplete code/drivers'' (proposta
  per il codice o driver in fase di sviluppo o incompleti).  Si dovr
  rispondere ``Y'' (s) per richiedere l'inclusione di un qualche driver
  alpha/sperimentale.


  3.2.  Come usare pi di una scheda Ethernet per macchina


  Cosa  necessario fare affinch Linux possa utilizzare due schede
  Ethernet?

  La risposta a questo quesito dipende se si sta/stanno usando il/i
  driver come modulo caricabile o direttamente compilato nel kernel.
  Adesso moltissime distribuzioni di Linux usano driver modulari. Ci
  evita di dover distribuire un mucchio di kernel ciascuno contenente un
  insieme diverso di driver.  Si usa invece un singolo kernel di base e
  i driver necessari per un particolare sistema utente vengono caricati
  una volta che l'avvio del sistema  arrivato al punto tale da poter
  accedere ai file dei moduli dei driver (memorizzati di solito in
  /lib/modules/).

  Con il driver come modulo: Nel caso di driver PCI, in genere il modulo
  rileva automaticamente tutte le schede installate di quello specifico
  modello. Comunque il rilevamento di una scheda non  una operazione
  sicura per schede ISA, perci di solito  necessario fornire
  l'indirizzo base di I/O della scheda affinch il modulo sappia dove
  guardare.  Questa informazione  memorizzata nel file
  /etc/conf.modules.

  Come esempio si consideri un utente che ha due schede ISA NE2000, una
  a 0x300 ed una a 0x240 e le righe da mettere nel file
  /etc/conf.modules:


          alias eth0 ne
          alias eth1 ne
          options ne io=0x240,0x300



  Come agisce: se l'amministratore (o il kernel) fa un modprobe eth0
  oppure un modprobe eth1 allora dovrebbe essere caricato il driver ne.o
  sia per eth0 che per eth1. Inoltre quando  caricato il modulo ne.o,
  dovrebbe esserlo con le opzioni io=0x240,0x300 cosicch il driver sa
  dove cercare le schede. Si noti che 0x  importante, cose del tipo
  300h, comunemente usate nel mondo DOS, non funzionano. Cambiando
  l'ordine di 0x240 e 0x300 si cambier quale scheda fisica finir in
  eth0 e quale in eth1.

  Per gestire pi schede, molti driver modulari ISA possono accettare
  diversi valori di I/O separati da virgole, come in questo esempio.
  Comunque, alcuni driver (pi vecchi?), come il modulo 3c501.o,
  attualmente sono in grado di gestire solo una scheda per modulo
  caricato.  In questo caso si pu caricare il modulo due volte per far
  s che entrambe le schede siano rilevate.  Il file /etc/conf.modules
  dovrebbe presentarsi cos:


          alias eth0 3c501
          alias eth1 3c501
          options eth0 -o 3c501-0 io=0x280 irq=5
          options eth1 -o 3c501-1 io=0x300 irq=7



  In questo esempio l'opzione -o  stata usata per dare a ogni istanza
  del modulo un nome univoco, poich non  possibile caricare due moduli
  con lo stesso nome.   anche usata l'opzione irq= per specificare la
  configurazione IRQ hardware della scheda (questo metodo pu essere
  usato anche con moduli che accettano valori di I/O separati da
  virgole, ma  meno efficiente poich il modulo finisce per essere
  caricato due volte anche se non sarebbe realmente necessario).

  Come esempio finale, si consideri un utente con una scheda 3c503 a
  0x350 e una SMC Elite16 (wd8013) a 0x280.  Avranno:


          alias eth0 wd
          alias eth1 3c503
          options wd io=0x280
          options 3c503 io=0x350




  Per le schede PCI, tipicamente sono necessarie solamente le righe
  alias per correlare le interfacce ethN con l'appropriato nome del
  driver, poich l'I/O base di una scheda PCI pu essere rilevato in
  modo sicuro.

  I moduli disponibili sono tipicamente memorizzati in
  /lib/modules/`uname -r`/net dove il comando uname -r fornisce la
  versione del kernel (es. 2.0.34).  Si pu guardare l per vedere quale
  corrisponde alla propria scheda.  Una volta che si hanno le
  impostazioni corrette nel proprio file conf.modules, si pu collaudare
  il tutto con:


          modprobe ethN
          dmesg | tail



  dove `N'  il numero dell'interfaccia Ethernet che si sta collaudando.

  Con il driver compilato nel kernel: Se si ha il driver compilato nel
  kernel, allora tutto quel che serve per usare pi schede Ethernet lo
  si ha gi.  Comunque si noti che al momento, per default, solo una
  scheda Ethernet  rilevata automaticamente.  Ci aiuta a evitare
  possibili blocchi all'avvio causati dal rilievo di schede ``ombrose''.

  (Nota: dagli ultimi kernel 2.1.x, i rilievi al boot sono stati
  separati in sicuri ed insicuri, in modo che tutti quelli sicuri (es.
  PCI e EISA) trovino automaticamente tutte le loro schede.  Nei sistemi
  con pi di una scheda Ethernet e almeno una scheda ISA, sar ancora
  necessario fare una delle cose che seguono.)

  Ci sono due modi per abilitare l'auto-rilevamento della seconda (e la
  terza, e...) scheda.  Il metodo pi semplice  di passare al momento
  dell'avvio, degli argomenti al kernel, solitamente usando LILO.  Il
  rilevamento della seconda scheda pu essere ottenuto con un semplice
  argomento di boot come ether=0,0,eth1.  In questo caso eth0 e eth1
  saranno assegnate nell'ordine in cui sono rilevate le schede al boot.
  Diciamo che si vuole che la scheda a 0x300 sia eth0 e quella a 0x280
  sia eth1, allora si potrebbe usare


       LILO: linux ether=5,0x300,eth0 ether=15,0x280,eth1


  Il comando ether= accetta pi della terna IRQ, I/O e nome mostrata
  sopra.  Si veda la sezione ``Passare argomenti Ethernet...'' per la
  sintassi completa, i parametri specifici delle schede e dritte su
  LILO.

  Questi argomenti di boot possono essere resi permanenti cosicch non
  si debba reinserirli ogni volta.  Si veda l'opzione di configurazione
  di LILO append nel manuale di LILO.

  Il secondo metodo (non raccomandato)  di modificare il file Space.c e
  sostituire la voce 0xffe0 per l'indirizzo I/O con uno zero.  La voce
  0xffe0 dice di non cercare quel dispositivo -- rimpiazzandola con uno
  zero si abiliter l'autorilevamento di quel dispositivo.

  Si noti che, se si intende usare Linux come gateway tra due reti, si
  dovr ricompilare un kernel abilitando l'IP forwarding (inoltro degli
  IP).  Solitamente usare un vecchio AT/286 con un software del tipo
  ``kbridge''  una soluzione migliore.

  Se si sta leggendo questa cosa mentre si naviga in rete, si potrebbe
  guardare il mini-howto che Donald ha nel suo sito WWW. Si veda
  Multiple Ethercards
  <http://cesdis.gsfc.nasa.gov/linux/misc/multicard.html>.


  3.3.  Il comando ether=  non  servito a niente. Perch?

  Come descritto sopra, il comando ether= funziona solo per driver
  compilati nel kernel.  Adesso molte distribuzioni usano i driver in
  forma modulare, perci il comando ether=  usato ancora raramente
  (certa documentazione pi vecchia non  ancora stata aggiornata per
  riportare questo cambiamento). Se si vogliono adoperare le opzioni per
  un driver Ethernet modulare si devono fare modifiche al file
  /etc/conf.modules.

  Se si sta usando un driver compilato nel kernel e si  aggiunto un
  comando ether= al proprio file di configurazione LILO, si noti che
  esso non avr effetto fino a che non si riesegue lilo per eseguire il
  file di configurazione aggiornato.



  3.4.  Problemi con schede NE1000/NE2000 (e cloni)

  Problema: Una scheda clone PCI NE2000 non  rilevata all'avvio usando
  una versione del kernel v2.0.x.

  Causa: Il driver ne.c, fino alla versione del kernel v2.0.30, conosce
  solo il numero identificativo PCI delle schede clone basate su RealTek
  8029. Da allora, molti altri hanno distribuito cloni PCI NE2000 con
  diversi numeri identificativi PCI, perci il driver non li rileva.

  Soluzione: La soluzione pi facile consiste nell'aggiornare il kernel
  di Linux alla versione v2.0.31 (o pi recente). Essa  a conoscenza
  dei numeri identificativi di circa cinque diversi chip PCI NE2000 e li
  rileva automaticamente all'avvio o nella fase di caricamento del
  modulo. Se si aggiorna alla versione 2.0.34 (o pi recente) esiste un
  driver specifico NE2000 solo PCI che  leggermente pi piccolo e pi
  efficiente del driver originario ISA/PCI.

  Problema: Una scheda clone PCI NE2000 si presenta come una ne1000
  (scheda a 8 bit!) all'avvio o quando si carica il modulo ne.o per la
  versione v2.0.x, perci non funziona.

  Causa: Alcuni cloni PCI non implementano l'accesso byte wide (perci
  non sono realmente compatibili NE2000 al 100%). Ci fa pensare al
  sistema che siano schede NE1000.

  Soluzione:  necessario aggiornare il kernel alla versione v2.0.31 (o
  pi recente) come descritto sopra.  Adesso il driver controlla che non
  si verifichi questo problema hardware.

  Problema: Una scheda PCI NE2000 ha prestazioni orribili, anche se si
  riduce la dimensione della finestra come descritto nella sezione
  ``Suggerimenti per le prestazioni''.

  Causa: Le specifiche per il chip 8390 originale, progettato e
  commercializzato pi di dieci anni fa, osservavano che per ottenere la
  massima affidabilit, era necessaria una lettura fittizia dal chip
  prima di ogni operazione di scrittura. Il driver ha i mezzi per farlo
  ma  stato disabilitato per default sin dai tempi dei kernel v1.2. Un
  utente ha riferito che riabilitare questa 'mis-feature' ha migliorato
  le prestazioni ottenute con un clone economico PCI NE2000.

  Soluzione: Visto che questa soluzione  stata riportata da una sola
  persona, non ci si illuda troppo. La riabilitazione della lettura
  prima della scrittura si ottiene semplicemente modificando il file del
  driver in linux/drivers/net/, togliendo il commento alla riga
  contenente NE_RW_BUGFIX e poi ricompilando il kernel o il modulo come
  al solito. Se funziona si invii una e-mail che descrive la differenza
  di prestazioni e il tipo  di scheda/chip che si possiede (la stessa
  cosa pu essere fatta anche per il driver ne2k-pci.c).

  Problema: Il driver ne2k-pci.c, con una scheda PCI NE2000, riporta
  messaggi di errore del tipo timeout waiting for Tx RDC e non funziona
  bene.

  Causa:  La propria scheda e/o il collegamento tra la scheda e il bus
  PCI non pu gestire l'ottimizzazione I/O a long word usata in questo
  driver.

  Soluzione: Prima di tutto, si controllino le impostazioni disponibili
  nel BIOS/CMOS setup per vedere se alcune di quelle correlate alla
  temporizzazione del bus PCI, sono troppo stringenti per ottenere
  operazioni affidabili.  Altrimenti, l'uso del driver ISA/PCI ne.c (o
  la rimozione di #define USE_LONGIO dal driver ne2k-pci.c) dovrebbe
  permettere di usare la scheda.

  Problema: Una scheda ISA Plug and Play NE2000 (per esempio RealTek
  8019) non  rilevata.

  Causa: Le specifiche originarie NE2000 (e perci il driver per Linux
  NE2000) non hanno il supporto per il Plug and Play.

  Soluzione: Si usi il disco di configurazione DOS fornito con la scheda
  per disabilitare PnP e per assegnare la scheda ad uno specifico
  indirizzo di I/O e IRQ. Si aggiunga una riga a /etc/conf.modules del
  tipo options ne io=0xNNN dove 0xNNN  l'indirizzo di I/O in formato
  esadecimale a cui la scheda  stata assegnata (ci assume che si stia
  usando un driver modulare; se non  cos si usi all'avvio un argomento
  ether=0,0xNNN,eth0).  Pu accadere anche che si debba entrare nel
  BIOS/CMOS setup e contrassegnare l'IRQ come Legacy-ISA al posto di
  PnP. In alternativa, se  necessario lasciare PnP abilitato per la
  compatibilit con qualche altro sistema operativo, si consideri il
  pacchetto isapnptools. Si provi man isapnp per capire se  gi
  installato nel proprio sistema. Se non lo , si dia un'occhiata al
  seguente URL:

  ISA PNP Tools <http://www.roestock.demon.co.uk/isapnptools/>


  Problema: Un driver NE*000 riporta `not found (no reset ack)' durante
  il rilevamento all'avvio.

  Causa: Ci  collegato alla modifica vista in precedenza.  Dopo la
  verifica iniziale che un 8390  all'indirizzo di I/O rilevato, si
  effettua la riinizializzazione (reset).  Quando la scheda ha
  completato tale operazione, si suppone dichiari (acknowlodge) che 
  completata. La propria scheda non lo fa e cos il driver assume che
  nessuna scheda NE sia presente.

  Soluzione: Si pu dire al driver che si possiede una scheda scadente
  specificando al momento dell'avvio il valore esadecimale 0xbad,
  solitamente non usato, per mem_end (NdT: si noti che ``bad'' significa
  letteralmente ``cattivo, brutto, scarso, ecc.'').  Quando si usa
  0xbad, si deve anche fornire un I/O base diverso da zero per la
  scheda.  Per esempio, una scheda a 0x340 che non dichiara il
  completamento del reset dovrebbe usare qualcosa del tipo:


       LILO: linux ether=0,0x340,0,0xbad,eth0


  Ci permette che il rilevamento della scheda continui anche se la pro
  pria scheda non effettua l'ACK del reset. Se si sta usando il driver
  come modulo, allora si pu fornire l'opzione bad=0xbad proprio come si
  fornisce l'indirizzo di I/O.


  Problema: Una scheda NE*000 blocca la macchina al primo accesso alla
  rete.

  Causa: Questo problema  stato riportato per kernel a partire dalla
  versione 1.1.57 fino alla corrente. Sembra confinato a poche schede
  clone configurabili via software. Apparentemente sie aspettano di
  essere inizializzate in qualche modo speciale.

  Soluzione: Diverse persone hanno riferito che l'esecuzione del
  programma DOS di configurazione software e/o l'uso del driver per DOS
  forniti con la scheda prima di fare il boot ``a caldo'' di Linux (cio
  usando loadlin o con il ``saluto a tre dita'' (CTRL-ALT-CANC))
  consente alla scheda di funzionare. Ci indicherebbe che queste schede
  necessitano di essere inizializzate in un modo particolare,
  leggermente diverso da ci che fa l'attuale driver per Linux.

  Problema: Una scheda Ethernet NE*000 a 0x360 non viene rilevata.

  Causa: La propria scheda ha uno spazio degli indirizzi di I/O ampio
  0x20, il che la fa entrare in collisione con la porta parallela a
  0x378.  Altri dispositivi che possono essere l sono il secondo
  controller del floppy (se in dotazione) a 0x370 e il controller
  secondario IDE a 0x376--0x377.  Se la/le porta/e sono gi assegnate ad
  un altro driver, il kernel non permette che avvenga il rilevamento.


  Soluzione: Si sposti la propria scheda ad un indirizzo del tipo 0x280,
  0x340, 0x320 o si compili senza il supporto per la stampante su porta
  parallela.

  Problema: La rete ``scompare'' ogniqualvolta si stampa qualcosa
  (NE2000).

  Causa: Il problema  lo stesso visto sopra, ma si ha un kernel pi
  vecchio che non verifica la sovrapposizione delle regioni di I/O. Si
  usi la stessa soluzione vista prima e ancora meglio ci si procuri un
  nuovo kernel.

  Problema: NE*000 ethercard probe at 0xNNN: 00 00 C5 ... not found.
  (invalid signature yy zz)

  Causa: Prima di tutto, si ha una scheda NE1000 o NE2000 all'indirizzo
  0xNNN?  Se s, l'indirizzo hardware riportato ha l'aria di essere uno
  valido?  Se s, allora si possiede un clone NE*000 disgraziato. Si
  suppone che tutti i cloni NE*000 abbiano il valore ox57 nei byte 14 e
  15 della PROM SA sulla scheda. La propria scheda non ce l'ha -- essa
  ha invece 'yy zz'.

  Soluzione: Ci sono due modi di aggirare l'ostacolo. Il pi facile
  consiste nell'usare un valore di mem_end 0xbad come descritto sopra
  per il problema `no reset ack'. Ci consentir di bypassare il
  controllo della firma, sempre che si fornisca anche un valore I/O base
  diverso da zero. Questa soluzione non richiede di ricompilare il
  kernel.

  Il secondo metodo (per hacker) comporta la modifica delle stesso
  driver e la ricompilazione del proprio kernel (o modulo). Il driver
  (usr/src/linux/drivers/net/ne.c) contiene un elenco ``Hall of Shame''
  (Ndt: gioco di parole con ``Hall of Fame''; ``fame''= famoso,
  ``shame''=vergogna, disonore) pressappoco alla riga 42. Questo elenco
   usato per rilevare cloni disgraziati. Per esempio, le schede DFI
  usano ``DFI'' nei primi 3 byte della PROM al posto di usare 0x57 nei
  byte 14 e 15 (come dovrebbero fare).

  Problema: La macchina si blocca durante l'avvio giusto dopo il
  messaggio `8390...' oppure `WD....'. La rimozione della NE2000 risolve
  il problema.

  Soluzione: Si cambi l'indirizzo base della propria NE2000 con qualcosa
  del tipo 0x340. In alternativa si pu usare l'argomento di boot
  ``reserve='' in combinazione con l'argomento ``ether='' per tutelare
  la scheda da rilievi di altri driver di dispositivi.

  Causa: Il proprio clone NE2000 non  un clone abbastanza buono. Una
  NE2000 effettiva  un abisso senza fondo che intrappola ogni driver
  che stia facendo l'autorilevamento nel suo spazio.  Spostare la NE2000
  ad un indirizzo meno popolare la porta fuori dalla portata di altri
  rilievi automatici, consentendo alla macchina di avviarsi.

  Problema: La macchina si blocca all'avvio durante il rilevamento SCSI.

  Causa:  lo stesso problema visto precedentemente, si cambi
  l'indirizzo della scheda Ethernet o si usino gli argomenti di boot
  reserve/ether.

  Problema: La macchina si blocca all'avvio durante il rilevamento della
  scheda sonora.

  Causa: No, in realt ci avviene durante il rilevamento SCSI
  ``silenzioso'' ed  lo stesso problema visto precedentemente.

  Problema: NE2000 non rilevata all'avvio -- nessun tipo di messaggio.

  Soluzione: Non esiste una ``soluzione magica'' visto che possono
  essere parecchie le cause per cui non  stata rilevata. Il seguente
  elenco dovrebbe aiutare a risolvere i possibili problemi.

  1) Si compili un nuovo kernel che includa solo i driver dei
  dispositivi di cui si ha bisogno. Si verifichi che si stia davvero
  avviando il kernel nuovo. Dimenticare di eseguire lilo, eccetera pu
  portare ad avviare quello vecchio (si guardi attentamente l'ora e la
  data di compilazione riportati all'avvio).  Suona ovvio, ma l'abbiamo
  fatto tutti in passato. Ci si assicuri che il driver sia
  effettivamente incluso nel nuovo kernel cercando nel file System.map
  cose tipo ne_probe.

  2) Si guardino attentamente i messaggi all'avvio. Davvero non accenna
  mai al fatto che sta facendo un rilevamento ne2k, per esempio `NE*000
  probe at 0xNNN: not found (blah blah)' o fallisce proprio
  silenziosamente? C' una grossa differenza.  Si usi dmesg|more per
  rivedere i messaggi di avvio dopo aver fatto il login o si digiti
  Shift-PgUp per scorrere il contenuto dello schermo dopo che l'avvio si
   completato e appare il prompt del login.

  3) Dopo l'avvio si esegua un cat /proc/ioports e si verifichi che
  l'intero spazio di I/O richiesto dalla scheda sia libero. Se si parte
  da 0x300, il driver n2ek richieder 0x300-0x31f.  Se un qualsiasi
  altro driver di dispositivo ha occupato anche solo una porta da
  qualche parte in quell'intervallo, il rilevamento non avr luogo a
  quell'indirizzo e continuer silenziosamente al prossimo degli
  indirizzi rilevati. Un caso frequente  avere il driver lp che riserva
  0x378 o il secondo canale IDE che riserva 0x376, il che impedisce al
  driver ne il rilevamento in 0x360-0x380.

  4) Allo stesso modo come sopra per cat /proc/interrupts. Ci si
  assicuri che nessun altro dispositivo abbia occupato l'interrupt per
  il quale  stata impostata la scheda. In questo caso, il rilevamento
  avviene e il driver Ethernet protesta rumorosamente all'avvio perch
  non riesce a ottenere la linea IRQ desiderata.

  5) Se si  ancora perplessi del fallimento silenzioso del driver,
  allora lo si modifichi aggiungendo alcuni printk() al rilevamento.
  Per esempio con il ne2k si potrebbero aggiungere/rimuovere righe
  (contrassegnate rispettivamente con un '+' o  '-') in
  linux/drivers/net/ne.c tipo:


  ______________________________________________________________________
      int reg0 = inb_p(ioaddr);

  +    printk("NE2k probe - now checking %x\n",ioaddr);
  -    if (reg0 == 0xFF)
  +    if (reg0 == 0xFF) {
  +       printk("NE2k probe - got 0xFF (vacant I/O port)\n");
          return ENODEV;
  +    }
  ______________________________________________________________________



  Perci esso produrr messaggi di output per ogni indirizzo di porta
  che esamina e si potr capire se l'indirizzo della propria scheda 
  stato o no rilevato.

  6) Ci si pu anche procurare il diagnostico ne2k nel sito ftp di Don
  (pure citato nell'howto) e vedere se  in grado di rilevare la propria
  scheda dopo che si  avviato Linux. Si usi l'opzione `-p 0xNNN' per
  dirgli dove cercare la scheda (l'indirizzo di default  0x300 e non va
  a guardare da nessun'altra parte a differenza del rilevamento
  all'avvio).  L'output risultante quando trova una scheda sar qualcosa
  del tipo:


  ______________________________________________________________________
  Checking the ethercard at 0x300.
    Register 0x0d (0x30d) is 00
    Passed initial NE2000 probe, value 00.
  8390 registers: 0a 00 00 00 63 00 00 00 01 00 30 01 00 00 00 00
  SA PROM  0: 00 00 00 00 c0 c0 b0 b0 05 05 65 65 05 05 20 20
  SA PROM 0x10: 00 00 07 07 0d 0d 01 01 14 14 02 02 57 57 57 57

  NE2000 found at 0x300, using start page 0x40 and end page 0x80.
  ______________________________________________________________________



  I propri valori register e PROM saranno probabilmente diversi. Si noti
  che tutti i valori PROM sono duplicati per una scheda a 16 bit,
  l'indirizzo Ethernet (00:00:c0:b0:05:65) appare nella prima riga e la
  firma ripetuta 0x57 appare alla fine della PROM.

  L'output risultante quando non c' nessuna scheda installata a 0x300
  sar qualcosa del tipo:









  ______________________________________________________________________
  Checking the ethercard at 0x300.
    Register 0x0d (0x30d) is ff
    Failed initial NE2000 probe, value ff.
  8390 registers: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  SA PROM      0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  SA PROM 0x10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

   Invalid signature found, wordlength 2.
  ______________________________________________________________________



  I valori 0xff si presentano poich quello  il valore restituito
  quando si legge una porta di I/O libera.  Si possono vedere dei valori
  diversi da 0xff anche se si ha qualche altro tipo di hardware nella
  regione rilevata.

  7) Si provi a fare un warm boot di Linux da un dischetto di avvio per
  DOS (attraverso loadlin) dopo aver eseguito il driver per DOS o il
  programma di configurazione forniti. Pu essere che faccia una qualche
  `magia' extra (cio non standard) per inizializzare la scheda.

  8) Si provi il packet driver di Russ Nelson ne2000.com per vedere se
  almeno questo riesce a rilevare la propria scheda -- se no, allora le
  cose non vanno bene. Esempio:


       A:> ne2000 0x60 10 0x300


  Gli argomenti sono: il vettore degli interrupt software, l'IRQ
  hardware e l'I/O base. Lo si pu trovare in un qualsiasi archivio
  msdos nel file pktdrv11.zip.  La versione attuale pu essere pi
  recente della 11.



  3.5.  Problemi con le schede SMC Ultra/EtherEZ e WD80*3


  Problema: Si ottengono messaggi tipo il seguente:


          eth0: bogus packet size: 65531, status=0xff, nxpg=0xff



  Causa: C' un problema di memoria condivisa.

  Soluzione: La causa pi comune  dovuta a macchine PCI che non sono
  configurate per mappare dispositivi nella memoria ISA.  Perci si
  finisce per leggere la RAM del PC (tutti valori 0xff) invece della RAM
  della scheda che contiene i dati provenienti dal pacchetto ricevuto.

  Altri tipici problemi facili da risolvere sono: i conflitti di scheda,
  avere la cache o la ``shadow ROM'' abilitata per quella regione o
  avere il proprio bus ISA che va ad una velocit superiore agli 8 MHz.
  Si trovano anche un numero sorprendente di guasti di memoria sulle
  schede Ethernet, perci si esegua un programma di diagnostica nel caso
  in cui se ne possieda uno per la propria scheda.

  Problema: La scheda SMC EtherEZ non funziona nella modalit a memoria
  non condivisa (PIO).


  Causa: Le versioni pi vecchie del driver Ultra supportavano la scheda
  solo nella modalit a memoria condivisa.

  Soluzione: Il driver a partire dalla versione del kernel 2.0 supporta
  anche la modalit ad I/O programmato. Si aggiorni alla versione v2.0 o
  pi recente.

  Problema: Le vecchie wd8003 e/o le wd8013 configurabili con i
  ponticelli ottengono sempre l'IRQ sbagliato.

  Causa: Le vecchie schede wd8003 e i cloni wd8013 configurabili con i
  ponticelli non possiedono la EEPROM dalla quale il driver pu leggere
  l'impostazione dell'IRQ. Se il driver non  in grado di leggere l'IRQ
  allora esso prova a scoprirlo automaticamente con auto-IRQ. Se l'auto-
  IRQ restituisce il valore zero, il driver non fa altro che assegnare
  IRQ 5 a una scheda a 8 bit o IRQ 10 a una scheda a 16 bit.

  Soluzione: Si eviti il codice di auto-IRQ e si comunichi al kernel
  qual  l'IRQ per il quale la scheda  stata configurata nel proprio
  file di configurazione dei moduli (o mediante una argomento di boot
  per i driver compilati nel kernel).

  Problema: La scheda SMC Ultra  rilevata come wd8013, ma l'IRQ e
  l'indirizzo base della memoria condivisa sono sbagliati.

  Causa: La scheda Ultra assomiglia molto a una wd8013 e se il driver
  Ultra non  presente nel kernel, il driver wd pu scambiare la Ultra
  per una wd8013. Il rilevamento della Ultra avviene prima del
  rilevamento della wd perci questo di solito non accade. La Ultra
  memorizza l'IRQ e l'indirizzo base della memoria in un modo diverso
  nella EPROM, da cui i valori contraffatti riportati.

  Soluzione: Si ricompili il kernel con solo i driver di cui si ha
  bisogno. Se si ha una commistione di schede ultra e wd nella stessa
  macchina e si stanno usando i moduli allora si carichi per primo il
  modulo ultra.


  3.6.  Problemi con le schede 3Com

  Problema: La 3c503 si prende l'IRQ N, ma questo serve per una qualche
  altro dispositivo che ha bisogno dell'IRQ N (per esempio il driver del
  CDROM, il modem, ecc.). Si pu risolvere la cosa senza ricompilare il
  kernel?

  Soluzione: Il driver della 3c503 cerca una linea di IRQ libera
  nell'ordine {5, 9/2, 3, 4} e dovrebbe scegliere una linea che nessuno
  sta usando. Il driver decide quando la scheda  attivata con ifconfig.

  Se si sta usando un driver modulare, si possono usare dei parametri
  del modulo per impostare molte cose, incluso il valore dell'IRQ.

  Ci che segue imposta l'IRQ9, la locazione base 0x300, <valori
  ignorati> e if_port #1 (il transceiver esterno).




       io=0x300 irq=9 xcvr=1


  In alternativa, se il driver  compilato nel kernel,  possibile
  fissare gli stessi valori all'avvio passando i parametri attraverso
  LILO.


       LILO: linux ether=9,0x300,0,1,eth0


  Ci che segue imposta l'IRQ3, la ricerca della locazione base, <valori
  ignorati> e il transceiver di default if_port #0 (il transceiver
  interno).


       LILO: linux ether=3,0,0,0,eth0


  Problema: 3c503: configured interrupt X invalid, will use autoIRQ.

  Causa: La sheda 3c503 pu usare solo uno degli IRQ{5, 2/9, 3, 4} (solo
  queste linee sono connesse alla scheda). Se si passa un valore di IRQ
  che non appartiene al precedente insieme, si otterr il messaggio
  sopra indicato.  Di solito non  necessario specificare un valore di
  interrupt per la 3c503. La 3c503 effettuer l'autoIRQ quando viene
  usato ifconfig e sceglie uno degli IRQ{5, 2/9, 3, 4}.

  Soluzione: Si usi uno degli IRQ validi elencati sopra oppure si
  abiliti l'autoIRQ ma senza specificare la linea IRQ in alcun modo.

  Problema: I driver per la 3c503 forniti non utilizzano la porta AUI
  (thicknet). Come si pu optare per essa al posto della porta thinnet
  di default?

  Soluzione: La porta 3c503 AUI pu essere selezionata al momento
  dell'avvio per i driver compilati nel kernel e all'inserzione del
  modulo per i driver modulari.  La selezione avviene impostando ad 1 il
  bit meno significativo della variabile attualemente non usata
  dev->rmem_start, cosicch un parametro all'avvio tipo:


       LILO: linux ether=0,0,0,1,eth0


  dovrebbe funzionare per i driver compilati nel kernel.

  Per specificare la porta AUI quando si carica il driver come modulo 
  sufficiente aggiungere xcvr=1 alla riga delle opzioni del modulo
  insieme con i propri valori di I/O e IRQ.


  3.7.  FAQ non specifiche su una particolare scheda



  3.7.1.  Linux e schede Ethernet ISA di tipo Plug and Play


  Per ottenere i migliori risultati (e il minimo rompimento) si
  raccomanda di usare il programma (di solito DOS) fornito con la
  propria scheda per disabilitare il meccanismo PnP e impostarla
  definitivamente a un indirizzo di I/O e un IRQ. Ci si assicuri che
  l'indirizzo di I/O che si utilizza sia rilevato all'avvio o, se si
  usano i moduli, si fornisca l'indirizzo sotto forma di opzione io= in
  /etc/conf.modules.  Pu darsi che si debba anche entrare nel BIOS/CMOS
  setup e contrassegnare l'IRQ come Legacy-ISA al posto di PnP (se il
  proprio computer ha questa opzione).

  Si noti che non  necessario avere DOS installato per eseguire un
  programma di configurazione basato su DOS. Di solito  sufficiente
  avviare da un dischetto DOS ed eseguire i programmi dal dischetto
  fornito.  Si pu anche scaricare gratuitamente OpenDOS e FreeDOS.

  Se si necessita, per la compatibilit con qualche altro sistema
  operativo, che sia abilitato il PnP, allora con Linux si dovr usare
  il pacchetto isapnptools per configurare ogni volta la(e) scheda(e)
  all'avvio.  Ci si dovr ancora assicurare che l'indirizzo di I/O
  scelto per la scheda sia rilevato dal driver o fornito sotto forma di
  opzione io=.


  3.7.2.  La scheda Ethernet non  rilevata all'avvio


  Di solito la causa di ci e che si sta usando un kernel che non
  include il supporto per la propria particolare scheda. Per un kernel
  modulare ci significa che non si  richiesto di caricare il modulo di
  cui si ha bisogno o che  necessario specificare al modulo un
  indirizzo come opzione.

  Se si sta usando un kernel basato sui moduli per esempio quelli
  installati dalla maggior parte delle distribuzioni Linux, allora si
  provi a usare l'utilit di configurazione della distribuzione, per
  selezionare il modulo adatto alla propria scheda. Per le schede ISA 
  una buona idea determinare l'indirizzo di I/O della scheda e
  aggiungerlo come opzione (per esempio io=0x340) se l'utilit di
  configurazione ne richiede qualcuna.  Se non c' alcuna utilit di
  configurazione allora si dovr aggiungere il nome corretto del modulo
  (e le opzioni) al file /etc/conf.modules -- si veda man modprobe per
  maggiori dettagli.

  Se si sta usando un kernel precompilato che  parte della
  distribuzione, allora si controlli la documentazione per vedere che
  kernel si  installato e se  stato compilato con il supporto per la
  propria scheda.  Se non lo  stato, allora o si prova a procurarsene
  uno con il supporto per la propria scheda, oppure se ne compili uno su
  misura.

  Solitamente  una buona cosa compilare il proprio kernel con solo i
  driver di cui si ha bisogno, poich questa cosa non solo riduce la
  dimensione del kernel (risparmiando memoria RAM preziosa per le
  applicazioni!) ma riduce anche il numero di rilevamenti che possono
  incasinare hardware ``sensibile''.  Compilare un kernel non  cos
  complicato come sembra.  Si deve solo rispondere s o no a una serie
  di domande su quali driver si vogliono, e lui fa tutto il resto.

  Un'altra causa importante  l'avere un altro dispositivo che usa una
  parte dello spazio di I/O di cui ha bisogno la propria scheda.  Molte
  schede usano uno spazio di I/O di 16 o 32 byte.  Se la propria scheda
   impostata a 0x300 ed usa 32 byte. allora il driver chieder la
  regione 0x300-0x31f.  Se un qualsiasi altro dispositivo ha registrato
  anche solo una porta da qualche parte in quell'intervallo, il
  rilevamento non avr luogo a quell'indirizzo e il driver continuer
  silenziosamente con il prossimo indirizzo fra quelli che prova.
  Quindi, dopo il boot, si faccia cat /proc/ioports per verificare che
  l'intero spazio d'I/O che la scheda richiede  libero.

  Un altro problema  l'avere la propria scheda impostata con i
  ponticelli a un indirizzo di I/O che non viene controllato di default.
  L'elenco di tali indirizzi per ogni driver si trova facilmente proprio
  dopo i commenti iniziali nel sorgente del driver.  Anche se
  l'impostazione I/O della propria scheda non  nell'elenco degli
  indirizzi controllati, la si pu fornire al boot (per i driver
  compilati nel kernel) con il comando ether= come descritto in
  ``Passare argomenti  Ethernet...''.  I driver modulari possono fare
  uso dell'opzione io= in /etc/conf.modules per specificare un indirizzo
  che non  controllato di default.


  3.7.3.  ifconfig  mostra un indirizzo di I/O sbagliato per la scheda


  No, non lo fa.  Lo si sta solamente interpretando in modo scorretto.
  Questo non  un bug e i numeri riportati sono corretti.  Capita solo
  che in alcune schede basate su 8390 (wd80x3, smc-ultra, ecc.) il chip
  8390 in realt risiede a un offset rispetto alla prima porta di I/O
  assegnata.  Questo  il valore salvato in dev->base_addr ed  ci che
  ifconfig riporta.  Se si vuole vedere l'intero intervallo di porte che
  la propria scheda usa, allora si provi cat /proc/ioports che dar i
  numeri che ci si aspetta.


  3.7.4.  La macchina PCI rileva la scheda ma il driver ma no


  Alcuni BIOS PCI potrebbero non abilitare tutte le schede PCI
  all'accensione, specialmente se  attivata l'opzione ``PNP OS'' del
  BIOS.  Questa mis-feature  per supportare la versione corrente di
  Window che ancora usa alcuni driver in real mode.  Si disabiliti
  questa opzione oppure si provi ad aggiornare a un driver pi recente
  che abbia il codice per abilitare una scheda disabilitata.


  3.7.5.  Le schede ISA a memoria condivisa non funzionano in una
  macchina PCI ( 0xffff )


  Questa cosa solitamente si presenta come una serie di letture di
  valori 0xffff.  Nessun tipo di scheda a memoria condivisa potr
  funzionare in una macchina PCI finch non si configuri correttamente
  il BIOS PCI.  Lo si deve impostare per permettere l'accesso in memoria
  condivisa dal bus ISA alla regione di memoria che la propria scheda
  cerca di usare. Se non si capisce quali impostazioni sono appropriate
  allora si chieda al proprio fornitore o all'esperto di computer
  locale. Per i BIOS AMI, solitamente c' una sezione ``Plug and Play''
  dove ci dovrebbero essere delle impostazioni tipo ``ISA Shared Memory
  Size'' e ``ISA Shared Memory Base''.  Per le schede come la wd8013 e
  la SMC Ultra, si modifichi la dimensione predefinita da ``Disabled'' a
  16kB e si metta l'indirizzo della memoria condivisa della propria
  scheda nell'altra impostazione.


  3.7.6.  Sembra che la scheda invii dati ma non riceve niente


  Si faccia un cat /proc/interrupts.  Il totale corrente del numero di
  eventi di interrupt generati dalla propria scheda sar nell'elenco
  dato dal comando precedente.  Se  a zero e/o non aumenta quando si
  prova a usare la scheda allora probabilmente c' un conflitto di
  interrupt con un altro dispositivo installato nel computer
  (indifferentemente dal fatto che l'altro dispositivo abbia o meno un
  driver installato/disponibile). Si cambi l'IRQ di uno dei due
  dispositivi a un IRQ libero.



  3.7.7.  Supporto per Asynchronous Transfer Mode (ATM)


  Werner Almesberger sta lavorando al supporto ATM per Linux. Sta
  lavorando con la scheda ENI155p della Efficient Networks ENI155p
  (Efficient Networks <http://www.efficient.com/>) e la scheda ZN1221
  della Zeitnet (Zeitnet <http://www.zeitnet.com/>).


  Werner sostiene che il driver per la ENI155p  abbastanza stabile,
  mentre quello per la ZN1221 non  ancora finito.

  Si veda lo stato attuale dei driver al seguente URL:

  Linux ATM Support <http://lrcwww.epfl.ch/linux-atm/>


  3.7.8.  Supporto per Gigabyte Ethernet


  C' un qualche supporto per gigabyte Ethernet sotto Linux?

  S, attualmente ce ne sono almeno due.  Un driver per l'adattatore
  Gigabit Ethernet PCI G-NIC della Packet Engines  disponibile nei
  kernel v2.0 e v2.2.  Per maggiori dettagli, supporto e driver
  aggiornati, si veda:

  http://cesdis.gsfc.nasa.gov/linux/drivers/yellowfin.html

  Il driver acenic.c disponibile nei kernel v2.2 pu essere usato con la
  scheda Gigabit Ethernet AceNIC della Alteon e con altre schede basate
  su Tigon come la 3c985 della 3Com.  Il driver dovrebbe funzionare
  anche con la GA620 della NetGear, ma la cosa non  ancora stata
  verificata.


  3.7.9.  Supporto FDDI

  C' il supporto FDDI per Linux?

  S. Larry Stefani ha scritto un driver per v2.0 usando le schede DEFEA
  (FDDI EISA) e DEFPA (FDDI PCI) della Digital.  Era stato incluso nel
  kernel v2.0.24.  Attualmente non sono supportate altre schede.


  3.7.10.  Supporto Full Duplex


  Il Full Duplex mi dar i 20MBps? Linux lo supporta?

  Cameron Spitzer ha scritto quanto segue sulle schede 10Base-T full
  duplex: Se se ne connette una a uno switched hub full duplex e il
  proprio sistema  abbastanza veloce e non sta facendo molto altro, pu
  mantenere la connessione occupata in entrambe le direzioni.  Non ci
  sono cose tipo 10BASE-2 o 10BASE-5 full duplex.  Il full duplex
  funziona disabilitando il rilevamento delle collisione
  nell'adattatore. Questo  il motivo per cui non lo si pu fare con un
  cavo coassiale; la LAN in questo modo non funzionerebbe. Il 10BASE-T
  (interfaccia RJ45) usa fili separati per la trasmissione e la
  ricezione cos  possibile utlizzare entrambe le direzioni nello
  stesso momento.  Lo switching hub si fa carico del problema delle
  collisioni.  La frequenza dei segnali  10Mbps.

  Quindi come si pu vedere si sar in grado di ricevere e trasmettere
  solo a 10Mbps e cos non ci si aspetti un incremento delle prestazioni
  di un fattore 2. Che sia o meno supportato, la cosa dipende dalla
  scheda e forse anche dal driver.  Alcune schede possono fare l'auto
  negoziazione, altre hanno bisogno del supporto da parte del driver e
  per altre ancora  necessario che l'utente selezioni un'opzione nella
  configurazione EEPROM della scheda.  Comunque solamente utilizzatori
  seri/pesanti noteranno la differenza tra le due modalit.




  3.7.11.  Schede Ethernet per Linux su macchine SMP

  Se si spendono soldi in pi su un computer multi processore (MP)
  allora si comperi anche una buona scheda Ethernet.  Per i kernel v2.0
  non  veramente necessario, ma lo  sicuramente per quelli v2.2.  La
  maggior parte delle schede pi vecchie non intelligenti (per esempio
  progetti per bus ISA PIO e memoria condivisa) non furono mai pensate
  considerando in alcun modo l'uso con macchina MP.  La tendenza attuale
   di comperare una scheda intelligente di progettazione moderna e
  assicurarsi che il driver sia stato scritto (o aggiornato) per gestire
  le operazioni MP (le parole chiave sono ``progettazione moderna'': le
  NE2000 PCI sono semplicemente un progetto di 10 anni fa adattato a un
  bus moderno).  La presenza del testo spin_lock nei sorgenti del driver
   un buona indicazione che il driver  stato scritto per gestire le
  operazioni MP.  Si veda sotto per i dettagli completi su perch di
  dovrebbe acquistare una buona scheda per l'uso MP (e cosa accade se
  non lo si fa).

  Nei kernel v2.0, solo un processore alla volta era permesso ``in
  modalit kernel'' (ovvero poteva cambiare i dati del kernel e/o
  eseguire device driver). Quindi dal punto di vista della scheda (e del
  driver associato) non c'era niente di diverso rispetto ad operazioni
  uni-processore (UP) e le cose funzionavano come prima (questo era il
  modo pi semplice di ottenere una versione MP di Linux funzionante: un
  unico grosso lock (blocco, semaforo) attorno a tutto il kernel
  permette l'accesso ad un solo processore alla volta. In questo modo si
  sa che non si avranno due processori che provano a cambiare la stessa
  cosa allo stesso tempo!).

  Lo svantaggio nel permettere un solo processore alla volta in modalit
  kernel  che si ottengono prestazioni di tipo MP solamente se si
  eseguono programmi indipendenti e che fanno calcoli pesanti.  Se i
  programmi fanno un sacco di input/output (I/O) come la lettura e la
  scrittura di dati su disco o attraverso la rete, allora tutti i
  processori tranne uno saranno in stallo in attesa che le loro
  richieste di I/O siano completate mentre l'unico processore in
  esecuzione in modalit kernel freneticamente prova a eseguire tutti i
  device driver per soddisfare le richieste di I/O.  Il kernel diventa
  il collo di bottiglia e poich c' solo un processore in modalit
  kernel, le prestazioni di una macchina MP in presenza di I/O pesante,
  in questo caso detoriorano velocemente verso quelle di una macchina a
  singolo processore.

  Poich questa cosa  chiaramente inferiore al caso ideale
  (specialmente per server di file/WWW, router, ecc.) i kernel v2.2
  hanno un lock pi fine. Ci significa che pi di un processore alla
  volta pu essere in modalit kernel. Invece di un unico grosso lock
  attorno all'intero kernel, ci sono un sacco di piccoli lock che
  proteggono i dati critici dall'essere manipolati da pi di un
  processore alla volta, per esempio un processore pu eseguire il
  driver della scheda di rete, mentre nello stesso momento un altro
  esegue il driver il disco.

  Okay, con tutto questo bene in mente, ecco qui le insidie: il lock pi
  fine significa che si pu avere un processore che prova a inviare dati
  attraverso un driver Ethernet mentre un altro prova ad accedere allo
  stesso driver/scheda per fare qualcos'altro (per esempio ottenere le
  statiche della scheda per il comando cat /proc/net/dev). Oops, le
  statistiche della propria scheda sono state appena inviate attraverso
  il cavo, mentre invece si volevano i dati per le proprie statistiche.
  S, si  un po' confusa la scheda chiedendole di fare due (o pi!)
  cose alla volta ed  probabile che mandi in crash la propria macchina
  mentre ci prova.

  Quindi il driver che funzionava per UP non  pi abbastanza buono:
  necessita di essere aggiornato con i lock che controllano l'accesso
  alla scheda cosicch i tre processi di ricezione, trasmissione e
  manipolazione dei dati di configurazione siano serializzati al grado
  necessario alla scheda per funzionare stabilmente. La parte strana qui
   che un driver non ancora aggiornato con lock per operazioni MP
  stabili, sembrer probabilmente funzionare su macchine MP in presenza
  di un leggero carico di rete, ma provocher il crash della macchine o
  almeno esibir uno strano comportamento quando due (o pi!) processori
  proveranno a fare pi di uno di questi tre processi nello stesso
  momento.

  Un driver Ethernet aggiornato per MP richieder (al minimo) un lock
  attorno al driver che limiti l'accesso ai punti d'ingresso del kernel
  nel driver in maniera ``uno alla volta, prego''.  Con questa cosa, le
  cose saranno serializzate cosicch l'hardware sottostante dovrebbe
  essere trattato come se fosse usato in una macchina UP, e quindi
  dovrebbe essere stabilee. Lo svantaggio  che un unico lock attorno
  all'intero driver Ethernet ha le stesse implicazioni negative sulle
  prestazioni dell'avere un unico grosso lock attorno a tutto il kernel
  (ma su scala pi piccola), ovvero si pu avere un solo processore alla
  volta che usa la scheda.  [Nota tecnica: L'impatto sulle prestazioni
  pu anche includere un incremento nelle latenze degli interrupt se i
  lock che  necessario aggiungere sono del tipo irqsave e sono tenuti
  per un lungo periodo di tempo.]

  Possibili miglioramenti a questa situazione possono essere fatti in
  due modi.  Si pu provare a minimizzare il tempo tra quando si fa il
  lock e quando lo si rilascia, e/o si pu implementare un lock pi fine
  all'interno del driver (per esempio un lock attorno all'intero driver
  sarebbe eccessivo se invece fosse necessario solamente un lock o due
  per proteggere contro l'accesso simultaneo a una coppia di
  registri/impostazioni delicati della scheda).

  Comunque, per le pi vecchie schede     non intelligenti che non sono
  mai state progettate pensando all'uso MP, nessuno di questi
  miglioramenti pu essere realizzato.  Peggio ancora le schede non
  intelligenti tipicamente richiedono che il processore sposti dati tra
  la scheda e la memoria del computer, cosicch nel caso peggiore il
  lock sar mantenuto per tutto il tempo necessario per spostari ogni
  pacchetto da 1.5kB sul bus ISA.

  Le pi moderne schede intelligenti tipicamente spostano i dati
  direttamente da e nella memoria del computer senza nessun aiuto da
  parte di un processore.  Questa  una grande vittoria, poich il lock
   mantenuto allora solo per il breve tempo che il processore impiega
  per dire alla scheda dove prendere/mettere nella memoria il prossimo
  pacchetto di dati.  Inoltre le schede pi moderne tendono meno a
  richiedere un grosso unico lock attorno all'intero driver.



  3.7.12.  Schede Ethernet per Linux su piattaforma PCI Alpha/AXP


  Dalla versione v2.0, solo i driver 3c509, depca, de4x5, pcnet32 e
  tutti quelli 8390 (wd, smc-ultra, ne, 3c503, ecc.) sono stati resi
  ``indipendenti dall'architettura'' cos da poter funzionare su sistemi
  basati su CPU DEC Alpha.  Possono funzionare anche altri driver PCI
  aggiornati presenti nella pagina WWW di Donald poich sono stati
  scritti appositamente indipendenti dall'architettura.

  Si noti che le modifiche richieste per rendere un driver indipendente
  dall'architettura non sono cos complicate.  Si deve solo fare quanto
  segue:



    moltiplicare tutti i valori relativi ai jiffies per HZ/100 per
     tener conte del diverso valore di HZ che usa l'Alpha.  (timeout=2;
     diventa timeout=2*HZ/100;)

    sostituire tutti deriferimenti dei puntatori nella memoria di I/O
     (da 640k a 1MB) con le appropriate chiamate readb() writeb()
     readl() writel() calls, come mostrato in questo esempio.


  ______________________________________________________________________
  -       int *mem_base = (int *)dev->mem_start;
  -       mem_base[0] = 0xba5eba5e;
  +       unsigned long mem_base = dev->mem_start;
  +       writel(0xba5eba5e, mem_base);
  ______________________________________________________________________



  -sostituire tutte le chiamate memcpy() che hanno la memoria I/O come
  sorgente o destinazione con le appropriate memcpy_fromio() o
  memcpy_toio().

  I dettagli sulla gestione degli accessi alla memoria in maniera
  indipendente dall'architettura sono documentati nel file
  linux/Documentation/IO-mapping.txt fornito con i kernel recenti.


  3.7.13.  Ethernet per Linux su hardware SUN/Sparc

  Per le informazioni pi aggiornate sulla roba Sparc, si provi il
  seguente URL:

  Linux Sparc <http://www.geog.ubc.ca/sparc>

  Si noti che qualche hardware Ethernet Sparc     riceve il suo
  indirizzo MAC dal computer ospite, e quindi ci si pu ritrovare con
  pi interfacce allo stesso indirizzo MAC.  Se si ha bisogno di mettere
  pi di una interfacia nella stessa rete, allora si usi l'opzione hw di
  ifconfig per assegnare un indirizzo MAC univoco.

  Le questioni riguardati il porting dei driver PCI su piattaforma Sparc
  sono simili a quelle citate sopra per la piattaforma AXP. Inoltre ci
  possono essere un po' di questione relative all'endian, poich la
  Sparc  big endian mentre AXP e ix86 sono little endian.


  3.7.14.  Ethernet per Linux su altro hardware

  Ci sono parecchie altre piattaforme hardware sulle quali pu girare
  Linux, come Atari/Amiga (m68k).  Come nel caso Sparc  meglio
  controllare nel sito ufficiale del port di Linux per quella
  piattaforma per vedere cosa attualmente  supportato (sono benvenuti
  link ai suddetti siti -- inviatemeli!)


  3.7.15.  Connettere 10 o 100 BaseT senza un hub

  Possono connettere assieme sistemi basati su 10/100BaseT (RJ45) senza
  un hub?

  Senza altri dispositivi/marchingegni si possono collegare facilmente 2
  macchine, ma non di pi.  Si veda ``Doppino   intrecciato'', che
  spiega come farlo.  E no, non si pu far su un hub semplicemente
  incrociando un po' di fili assieme e qualcos'altro.   praticamente
  impossibile gestire bene il segnale di collisione senza duplicare
  l'hub.
  3.7.16.  SIOCSIFxxx: No such device

  Ricevo un sacco di messaggi `SIOCSIFxxx: No such device' al boot,
  seguiti da un `SIOCADDRT: Network is unreachable'.  Cosa c' che non
  va?

  Il proprio dispositivo Ethernet non  stato rilevato al boot o
  all'inserzione del modulo e quando sono eseguiti ifconfig e route non
  hanno nessun dispositivo con cui lavorare.  Si usi dmesg | more per
  rivedere i messaggi di boot e vedere se c' un qualche messaggio sul
  rilevamento della scheda Ethernet.


  3.7.17.  SIOCSFFLAGS: Try again

  Ricevo `SIOCSFFLAGS: Try again' quando eseguo `ifconfig'. Eh?

  Qualche altro dispositivo si  preso l'IRQ che la propria scheda
  Ethernet prova ad usare e quindi questa non pu usarlo.  Non si deve
  necessariamente riavviare per risolvere ci, poich alcuni dispositivi
  si prendono l'IRQ solo quando ne hanno bisogno e poi lo rilasciano
  quando hanno fatto. Esempi sono alcuni schede sonore, porte seriali,
  driver per floppy disk, ecc.  Si pu digiare cat /proc/interrupts per
  vedere quali interrupt sono attualmente in uso.  La maggior parte dei
  driver per schede Ethernet per Linux si prendono l'IRQ solo quando
  sono attivate per l'uso con `ifconfig'.  Se si riesce a far s che
  l'altro dispositivo rilasci la linea IRQ richiesta allora si dovrebbe
  essere in grado di `Try again' (riprovare) con ifconfig.


  3.7.18.  Usare `ifconfig' e Link UNSPEC con l'indirizzo hardware
  00:00:00:00:00:00

  Quando eseguo ifconfig senza alcun argomento, mi dice che LINK 
  UNSPEC (invece di 10Mbs Ethernet) e dice anche che il mio indirizzo
  hardware  di tutti zeri.

  Questo  perch si sta usando una versione del programma `ifconfig'
  pi recente della versione del kernel.  Questa nuova versione di
  ifconfig non  in grado di riportare queste propriet quando usata con
  un kernel pi vecchio.  Si pu o aggiornare il proprio kernel, tornare
  a una versione pi vecchia di `ifconfig' oppure semplicemente ignorare
  la cosa.  Il kernel conosce l'indirizzo hardware e non gli interessa
  se ifconfig non pu leggerlo.

  Si possono ricevere strane informazioni se il programma ifconfig che
  si sta usando  molto pi vecchio del proprio kernel.


  3.7.19.  Enorme numero di errori in RX e TX

  Quando eseguo ifconfig senza alcun argomento, mi dice che ho un enorme
  numero di errori sia nei pacchetti ricevuti che trasmessi.  Tutto
  sembra funzionare bene. Cosa c' che non va?

  Si guardi bene. Dice RX packets grande numero PAUSE errors 0 PAUSE
  dropped 0 PAUSE overrun 0.  E la stessa cosa per la colonna TX. Quindi
  i grandi numeri che si vedono sono il numero totale di pacchetti che
  la propria macchina ha ricevuto e trasmesso.  Se ancora si trova la
  cosa confusa, si provi invece ad usare cat /proc/net/dev.


  3.7.20.  Voci in /dev/  per le schede Ethernet

  Ho /dev/eth0 come link (collegamento) a /dev/xxx.  giusto?

  Contrariamente a ci che si  sentito, i file in /dev/* non sono
  utilizzati. Si pu cancellare qualsiasi /dev/wd0, /dev/ne0 e voce
  simile.


  3.7.21.  Linux e i ``trailer''

  Dovrei disabilitare i trailer quando uso `ifconfig' con la mia scheda?

  Non si possono disabilitare i trailer e nemmeno si dovrebbe volerlo
  fare. I `trailer' sono degli stratagemmi (hack) per evitare la copia
  dei dati negli strati di rete.  L'idea era di usare un banale header
  di dimensione fissata `H', mettere le informazioni dell'header di
  dimensione variabile alla fine del pacchetto e allocare tutti gli `H'
  byte del pacchetto prima dell'inizio della pagina.  Sebbene fosse una
  buona idea, in pratica ha mostrato di non funzionare bene.  Se
  qualcuno suggerisce l'uso di `-trailers', si noti che  l'equivalente
  del sangue delle capre sacrificali.  Non sar niente per risolvere il
  problema, ma se il problema si risolve da solo allora qualcuno pu
  affermare una profonda conoscenza delle arti magiche.



  3.7.22.  Accesso a basso livello al dispositivo Ethernet

  Come posso accedere a basso livello al dispositivo Ethernet in Linux,
  senza passare attraverso TCP/IP e company?


  ______________________________________________________________________
          int s=socket(AF_INET,SOCK_PACKET,htons(ETH_P_ALL));
  ______________________________________________________________________



  Questo consente di avere un socket che riceve qualsiasi tipo di
  protocollo. Si facciano chiamate recvfrom() a questo socket e lui
  riempir sockaddr con il tipo di dispositivo nel campo sa_family e il
  nome del dispositivo nell'array sa_data. Non so chi abbia
  originariamente inventato SOCK_PACKET per Linux (c' da anni) ma  una
  cosa superba.  Si pu usare anche per inviare roba grezza attraverso
  chiamate sendto(). Naturalmente per fare entrambe le cose si deve
  avere l'accesso come root.


  4.  Suggerimenti per le prestazioni

  Ecco qua un po' di trucchi che si possono usare se si soffre di una
  basso throughput Ethernet o per guadagnare un po' di velocit nei
  trasferimenti ftp.

  Il programma ttcp.c  un buon test per misurare la velocit di
  throughput.  Un altro modo comunemente usato  di fare un ftp> get
  grosso_file /dev/null dove   grosso_file  >1MB e risiede nel buffer
  di Tx della macchina (si faccia il `get' almeno due volte, poich la
  prima volta si appronter la cache del buffer nella macchina di
  trasmissione).  Si deve mettere il file nella cache del buffer perch
  non si  interessati ad includere nella misura la velocit di accesso
  ai file dal disco.  Questo  anche il motivo per cui si inviano i dati
  in ingresso a /dev/null piuttosto che dentro il disco.


  4.1.  Concetti generali

  Anche una scheda a 8 bit  in grado di ricevere pacchetti back-to-back
  (uno dietro l'altro) senza alcun problema.  Le difficolt nascono
  quando il computer non riesce a estrarre i pacchetti ricevuti dalla
  scheda abbastanza velocemente da far spazio ai pacchetti in arrivo.
  Se il computer non libera abbastanza velocemente la memoria della
  scheda dai pacchetti gi ricevuti, la scheda non avr spazio per
  mettere i nuovi pacchetti.

  In questo caso o si scartano (drop) i nuovi pacchetti oppure si
  scrivono sopra a quelli gi ricevuti (overrun).  In entrambi i casi si
  interrompe seriamente il flusso regolare del traffico
  causando/richiedendo la ritramissione e degradando seriamente le
  prestazioni anche di un fattore 5!

  Le schede con a bordo pi memoria possono fare la ``bufferizzazione''
  di pi pacchetti e quindi gestire grossi picchi (burst) di pacchetti
  back-to-back senza perderne nessuno.  D'altra parte ci significa che
  la scheda non necessita pi di una bassa latenza dal computer riguardo
  all'estrazione dei pacchetti dal buffer per evitare la perdita di
  pacchetti.

  La maggior parte delle schede a 8 bit hanno un buffer da 8kB e la
  maggior parte di quelle a 16 ne hanno uno da 16kB.  La maggior parte
  dei driver di Linux riserva 3kB del buffer per due buffer Tx, quindi
  nel caso di una scheda a 8 bit rimangono solo 5kB di spazio per la
  ricezione. Questo spazio  sufficiente solo per tre pacchetti Ethernet
  a dimensione massima (1500 byte).


  4.2.  Schede ISA e velocit del bus ISA

  Come menzionato in precedenza, se i pacchetti sono rimossi abbastanza
  velocemente dalla scheda allora la condizione di drop/overrun non
  avverr anche se la dimensione del buffer per i pacchetti Rx 
  piccola.  Il fattore che determina la frequenza con la quale i
  pacchetti sono rimossi dalla scheda e messi nella memoria del computer
   la velocit del percorso dati che collega le due, ovvero la velocit
  del bus ISA (se la CPU  un vecchio e lento 386sx-16 allora anche
  questo avr la sua influenza).

  Il clock del bus ISA raccomandato  circa 8Mhz, ma molte schede madri
  e dispositivi periferici possono essere fatti funzionare a frequenze
  pi elevate. La frequenza di clock per il bus ISA solitamente pu
  essere impostata nel CMOS setup, selezionando un divisore della
  frequenza di clock della scheda madre/CPU.  Alcune schede madri ISA e
  PCI/ISA possono non avere questa opzione e quindi si  incastrati
  nelle impostazioni di fabbrica.

  Per esempio, ecco qui alcune velocit di ricezione misurate dal
  programma TTCP su un 486 a 40Mhz, con una scheda a 8 bit WD8003EP, a
  diverse velocit del bus ISA.


  ______________________________________________________________________
          Velocit bus ISA (MHz)     Rx TTCP (kB/s)
          ----------------------    --------------
          6.7                       740
          13.4                      970
          20.0                      1030
          26.7                      1075
  ______________________________________________________________________



  Voglio vedere chi riesce a far meglio di 1075kB/s con una qualsiasi
  scheda Ethernet a 10Mb/s usando TCP/IP.  Comunque, non ci si aspetti
  che qualsiasi sistema funzioni a velocit del bus ISA molto elevate.
  La maggior parte dei sistemi non funzioneranno correttamente a
  velocit superiori a 13MHz (inoltre, in alcuni sistemi PCI la velocit
  del bus ISA  fissata a 8 Mhz, cosicch l'utente finale non ha la
  possibilit di incrementarla).

  Oltre a una velocit di trasferimento pi elevata, si trarr anche
  beneficio da una riduzione nell'uso della CPU dovuta alla durata
  minore dei cicli di memoria e di I/O (si noti che anche i dischi fissi
  e le schede video presenti nel bus ISA mostreranno solitamente un
  aumento delle prestazioni dovuto all'incremento della velocit del bus
  ISA).

  Ci si assicuri di fare un back up dei propri dati prima di fare
  esperimenti con velocit del bus ISA superiori agli 8Mhz e di
  controllare accuratamente che tutte le periferiche ISA funzionino
  correttamente dopo aver fatto qualsiasi incremento alla velocit del
  bus.


  4.3.  Impostare la finestra TCP di ricezione (TCP Rx Window)


  Ancora una volta, le schede con poca memoria RAM a bordo e percorsi
  dati tra la scheda e la memoria del computer relativamente lenti
  avranno problemi.  L'impostazione predefinita per la finestra di
  ricezione TCP  di 32kB, il che significa che un computer veloce nella
  sottorete a cui appartiene la propria macchina, pu scaricare in
  quest'ultima 32kB di dati senza fermarsi per controllare se tutti sono
  stati ricevuti correttamente.

  Le versioni recenti del comando route hanno la possibilit di
  impostare al volo la dimensione di questa finestra.  Solitamente la
  riduzione della dimensione di questa finestra  necessaria solo per la
  rete locale, poich i computer che sono dietro ad un paio di router e
  gateway sono abbastanza `bufferizzati' da non porre problemi.  Un
  esempio d'uso potrebbe essere:


  ______________________________________________________________________
          route add <qualcosa> ... window <dim_fin>
  ______________________________________________________________________



  dove dim_fin  la dimensione della finestra che si vuole usare (in
  byte).  Una scheda 3c503 a 8 bit su un bus ISA che va a 8Mhz o meno
  dovrebbe funzionare bene con una dimensione della finestra di circa
  4kB.  Una finestra troppo grande causer drop e overrun dei pacchetti
  e una riduzione drastica del throughput.  Si pu verificare lo stato
  operativo facendo cat /proc/net/dev che mostrer tutte le situazioni
  di drop/overrun avvenute.


  4.4.  Incrementare le prestazioni NFS

  Alcuni hanno scoperto che l'uso di una scheda a 8 bit in client NFS
  causa prestazioni pi povere di quelle che ci si aspetta, quando si
  usa la dimensione dei paccheti NFS di 8kB (nativa della Sun).

  Una possibile causa per questa cosa potrebbe essere la differente
  dimensione del buffer a bordo tra schede a 8 e 16 bit.  La dimensione
  massima di un pacchetto Ethernet  circa 1500 byte.  Affinch arrivi
  un pacchetto NFS di 8kB ci vogliono circa sei pacchetti back to back
  Ethernet di dimensione massima.  Sia le schede a 8 bit che quelle a 16
  non hanno problemi a ricevere pacchetti back to back.  Il problema
  sorge quando la macchina non rimuove in tempo i pacchetti dal buffer
  della scheda e il buffer va in overflow.  E nemmeno il fatto che le
  schede a 8 bit necessitano di un ulteriore ciclo di bus ISA per ogni
  trasferimento aiuta.  Quel che si pu fare se si ha una scheda a 8 bit
   di impostare la dimensione del trasferimento NFS a 2kB (o anche 1kB)
  o provare a incrementare la velocit del bus ISA per far s che il
  buffer della scheda venga ripulito pi velocemente. Ho scoperto che
  una vecchia scheda WD8003E a 8MHz (senza altro carico di sistema) pu
  sostenere grosse ricezioni a dimensioni NFS di 2kB, ma non a 4kB, dove
  le prestazioni si degradano di un fattore tre.

  D'altra parte, se l'opzione predefinita di mount  di usare la
  dimensione di 1kB e si ha almeno una scheda isa a 16 bit, si trover
  un incremento significativo nel passare a 4kB (o anche 8kB).


  5.  Informazioni specifiche su rivenditori, produttori e modelli

  Nel seguito sono elencate molte schede in ordine alfabetico per nome
  del rivenditore (produttore) e poi identificativo del prodotto.  Oltre
  all'ID di ciascun prodotto, ci potr essere ``Supportata'', ``Semi
  supportata'' oppure ``Non supportata''.

  Supportata significa che esiste un driver per la scheda e molti lo
  stanno usando felicemente e sembra quindi abbastanza affidabile.

  Semi supportata significa che esiste un driver, ma  vera almeno una
  delle descrizioni seguenti: (1) Il driver e/o l'hardware ha dei bug
  che possono provocare prestazioni scadenti, fallimenti di connessione
  e persino crash.  (2) Il driver  nuovo e la scheda  poco comune e
  quindi il driver  stato poco usato/collaudato e il suo autore ha
  quindi ricevuto pochi riscontri. Ovviamente la (2)  preferibile alla
  (1) e la descrizione di ciascuna scheda/driver dovrebbe chiarire quale
  delle due valga.  In entrambi i casi, probabilmente sar necessario
  rispondere `Y' (s) alla domanda ``Prompt for development and/or
  incomplete code/drivers?'' quando si lancia make config.

  Non supportata significa invece che attualmente non  disponibile
  alcun driver per quella scheda.  Ci pu essere dovuto alla mancanza
  d'interesse nell'hardware che  raro/poco comune, o al fatto che il
  produttore non vuole rilasciare la documentazione sull'hardware
  necessaria per scrivere un driver.

  Si noti che la differenza tra ``Supportata'' e ``Semi supportata'' 
  abbastanza soggettiva ed  basata sui commenti degli utenti osservati
  nei messaggi inviati ai vari newsgroup e mailing list (dopo tutto, 
  impossibile per una persona sola collaudare tutti i driver con tutte
  le schede per ogni versione del kernel!!!).  Quindi si faccia
  attenzione perch pu succedere che si trovi una scheda segnata come
  semi-supportata, che nel proprio caso funziona perfettamente (il che 
  bene), oppure una scheda indicata come supportata, che in realt d
  una serie infinita di problemi (il che non  proprio bene).

  Dopo lo stato, c' il nome che il driver ha nel kernel di Linux.
  Questo  anche il nome del modulo del driver che si potrebbe usare
  nella riga alias eth0 nome_driver presente nel file di configurazione
  dei moduli /etc/conf.modules.



  5.1.  3Com

  Se non si  sicuri di cosa sia la propria scheda, ma si pensa che sia
  una scheda 3Com, probabilmente lo si pu scoprire dal numero di
  assemblaggio. La 3Com ha un documento `Identifying 3Com Adapters By
  Assembly Number' (ref 24500002) che molto probabilmente far al
  proprio caso.  Si veda ``Informazioni tecniche dalla 3Com'' per
  maggiori informazioni su come ottenere documenti dalla 3Com.
  Si noti inoltre che la 3Com ha un sito FTP con diverse cose carine:
  ftp.3Com.com.

  Quelli che leggono questo documento tramite un browser WWW, possono
  provare a vedere anche nel sito WWW della 3Com.


  5.1.1.  3c501

  Stato: Semi supportata, Nome del Driver: 3c501

  Questa obsoleta scheda a 8 bit dell'et della pietra  veramente
  troppo ``demente'' per poter essere usata.  La si eviti come la peste.
  Non si compri questa scheda, nemmeno per scherzo.  Le sue prestazioni
  sono orribili ed ha un sacco di problemi.

  Per quelli che non sono ancora convinti, la 3c501 pu solamente fare
  una cosa alla volta: mentre sta rimuovendo un pacchetto dal buffer non
  pu ricevere un altro pacchetto, nemmeno pu riceverne uno mentre sta
  caricando un pacchetto trasmesso.  Questa cosa andava bene per le reti
  composte da computer basati su 8088 dove l'elaborazione di un
  pacchetto e la risposta richiedevano decine di millisecondi, ma le
  reti moderne inviano pacchetti back-to-back (uno dopo l'altro)
  praticamente per qualsiasi transazione.

  L'autoIRQ funziona, non  usato il DMA, l'autoprobe cerca solo a 0x280
  e a 0x300 e il livello di debug  impostato con il terzo argomento al
  momento del boot.

  Ancora una volta, l'uso della 3c501  vivamente sconsigliato!  Ancora
  di pi con un kernel con l'IP multicast, ci si inchioder mentre si
  ascoltano tutti i pacchetti multicast.  Si vedano i commenti in cima
  al codice sorgente per ulteriori dettagli.


  5.1.2.  EtherLink II, 3c503, 3c503/16

  Stato: Supportata, Nome del driver: 3c503 (+8390)

  La 3c503 non ha un ``EEPROM setup'' e quindi non  necessario eseguire
  nessun programma di diagnostica/setup prima di usare la scheda con
  Linux.  L'indirizzo della memoria condivisa della 3c503  impostato
  usando i ponticelli in comune con l'indirizzo della PROM di boot.  Ci
  confonde molta gente che ha familiarit con altre schede ISA, dove di
  solito si lascia sempre il ponticello impostato per ``disabilitare'' a
  meno che non si abbia una PROM di boot.

  Queste schede dovrebbero andare alla stessa velocit delle WD80x3 a
  pari larghezza di bus, ma in realt sono un po' pi lente.  Queste
  schede Ethernet hanno anche un modalit ad I/O programmato che non usa
  le funzionalit offerte dal 8390 (gli ingegneri della 3Com hanno
  scoperto troppi bachi!).  Il driver 3c503 di Linux funziona anche con
  la 3c503 in modalit I/O programmato, ma  pi lento e meno affidabile
  rispetto alla modalit a memoria condivisa.  Inoltre la modalit ad
  I/O programmato non viene ben collaudata quando vengono aggiornati i
  driver.  Non si dovrebbe usare la modalit in I/O programmato a meno
  che non se ne abbia bisogno per compatibilit con MS-DOS.

  La linea IRQ della 3c503  impostata nel software, con nessun
  suggerimento da parte della EEPROM.  Diversamente dal driver MS-DOS,
  quello per Linux ha la funzionalit di autoIRQ: usa la prima linea IRQ
  libera fra {5,2/9,3,4}, selezionandola ogni volta che la scheda 
  configurata con ifconfig (versioni pi vecchie del driver selezionano
  l'IRQ all'avvio).  La chiamata ioctl() in `ifconfig' restituir EAGAIN
  se non c' alcuna linea IRQ disponibile.

  Alcuni problemi comuni che la gente ha con la 503 sono discussi in
  ``Problemi con...''.

  Se si intende usare questo driver come modulo caricabile probabilmente
  si dovrebbe vedere ``Utilizzare i driver Ethernet come moduli'' per
  informazioni specifiche sui moduli.

  Si noti che alcune vecchie workstation diskless (senza dischi) 386
  hanno gi una 3c503 (fatta dalla 3Com e venduta sotto nome diverso,
  come `Bull') ma l'ID di produzione non  un ID 3Com e quindi non sar
  rilevata.  Maggiori dettagli possono essere trovati nel pacchetto
  Etherboot, di cui si avr comunque bisogno per avviare queste macchine
  diskless.


  5.1.3.  Etherlink Plus 3c505

  Stato: Semi supportata, Nome del driver: 3c505

   un driver che era stato scritto da Craig Southeren
  geoffw@extro.ucc.su.oz.au.  Queste schede usano anche il chip i82586.
  Non ci sono poi tante schede di questo tipo in giro.   incluso nel
  kernel standard, ma viene dichiarato come driver alpha.  Si veda la
  sezione ``Driver alpha'' per importanti informazioni sull'uso con
  Linux di driver Ethernet in alpha-test.

  Se si ha intenzione di usare una di queste schede si dovrebbe leggere
  anche il file /usr/src/linux/drivers/net/README.3c505.  Contiene
  diverse opzioni che si possono abilitare o disabilitare.


  5.1.4.  Etherlink-16 3c507

  Stato: Semi supportata, Nome del driver: 3c507

  Questa scheda usa uno dei chip Intel e lo sviluppo del driver 
  strettamente legato allo sviluppo del driver per la Ether Express
  dell'Intel.  Il driver  incluso nel kernel standard, ma come driver
  sperimentale.  Si veda la sezione ``Driver alpha'' per importanti
  informazioni sull'uso con Linux di driver Ethernet in alpha-test.


  5.1.5.  Etherlink III, 3c509 / 3c509B

  Stato: Supportata, Nome del driver: 3c509

  Questa scheda  piuttosto economica e ha buone prestazioni per essere
  una ISA senza bus-master.  Gli svantaggi sono che la 3c509 originale
  richiede una latenza di interrupt molto bassa.  La 3c509B non dovrebbe
  soffrire dello stesso problema, poich ha un buffer pi grande (vedere
  sotto).  Queste schede usano i trasferimenti PIO, analogamente a una
  scheda ne2000 e quindi, in confronto, una scheda a memoria condivisa
  come una wd8013 sar pi efficiente.

  La 3c509 originale ha un buffer per i pacchetti piccolino (4kB totali,
  2kB Rx, 2k Tx), cosicch qualche volta il driver perde dei pacchetti
  se gli interrupt sono mascherati troppo a lungo.  Per minimizzare
  questo problema, si pu provare a non mascherare gli interrupt durante
  i trasferimenti dei dischi IDE (si veda man hdparm) e/o a incrementare
  la velocit del proprio bus ISA cosicch i trasferimenti dei dischi
  IDE terminino prima.

  Il pi recente modello 3c509B ha 8kB sulla scheda e il buffer pu
  essere diviso in 4/4, 5/3 o 6/2 per Rx/Tx.  Questa impostazione 
  modificabile con l'utilit di configurazione DOS ed  salvata nella
  EEPROM.  Questo dovrebbe alleviare il suddetto problema della 3c509
  originale.

  Gli utilizzatori della 3c509B dovrebbero usare l'utilit DOS fornita
  per disabilitare il supporto plug and play e per impostare il tipo di
  uscita di cui si ha bisogno.  Il driver per Linux attualmente non
  supporta la ``Autodetect media setting'', quindi si deve selezionare
  10Base-T, 10Base-2 oppure AUI.  Si noti che per disabilitare
  completamente il PnP, si dovrebbe fare un 3C5X9CFG /PNP:DISABLE e poi
  farlo seguire da un reset della macchina per assicurarsi che abbia
  avuto effetto.

  Alcuni chiedono delucidazioni sulle impostazioni ``Server or
  Workstation'' e ``Highest Modem Speed'' presenti nella utilit di
  configurazione sotto DOS.  Donald scrive Questi sono solo degli hint
  ai driver e il driver di Linux non usa questi parametri: ottimizza
  sempre per la massima velocit di trasferimento piuttosto che per la
  bassa latenza (`Server').  La bassa latenza era di importanza critica
  per i vecchi throughput IPX non-windowed.  Per ridurre la latenza il
  driver MS-DOS per la 3c509 disabilita gli interrupt per alcune
  operazioni, bloccando gli interrupt per la porta seriale.  Da qui la
  necessit dell'impostazione `modem speed'.  Il driver per Linux
  rimuove la necessit di disabilitare gli interrupt per lunghi periodi
  di tempo operando solo su interi pacchetti, ad esempio non cominciando
  a trasmettere un pacchetto finch non sia stato completamente
  trasferito nella scheda.

  Si noti che il rilevamento della scheda ISA usa un metodo diverso
  rispetto a quello di molte schede.      In sostanza, si chiede alla
  scheda di rispondere inviando dati ad una ID_PORT (le porte da 0x100 a
  0x1ff con intervalli di 0x10).  Questo rilevamento implica che una
  scheda particolare sar sempre rilevata per prima in una
  configurazione con pi 3c509 ISA.  La scheda con il pi basso
  indirizzo Ethernet hardware alla fin fine sar sempre la eth0.  Questa
  cosa non dovrebbe preoccupare nessuno, tranne quelli che vogliono
  assegnare un indirizzo hardware da 6 byte a una particolare
  interfaccia.  Se si hanno pi schede 3c509, la cosa migliore 
  aggiungere i comandi ether=0,0,ethN senza specificare la porta di I/0
  (ovvero si usi I/O=zero) e permettere al rilevamento di determinare
  quale scheda  la prima.  L'uso di un valore I/O non nullo assicura
  solamente che non saranno rilevate tutte le schede, quindi non lo si
  faccia.

  Se questa cosa veramente vi risulta noiosa, si dia un'occhiata
  all'ultimo driver di Donald, in quanto si pu essere in grado di usare
  un valore 0x3c509 nei campi dell'indirizzo di memoria inutilizzati per
  ordinare il rilevamento ed adattarlo alle proprie necessit.


  5.1.6.  3c515

  Stato: Supportata, Nome del driver: 3c515

  Questa scheda, nome in codice ``CorkScrew'',  la scheda a 100Mbps ISA
  offerta dalla 3COM.  Un driver relativamente nuovo di Donald  incluso
  nei kernel v2.2.  Per informazioni pi aggiornate, probabilmente si
  dovrebbe guardare nella pagina relativa alla Vortex:

  Vortex <http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html>



  5.1.7.  3c523

  Stato: Semi supportata, Nome del driver: 3c523


  Questa scheda su bus MCA usa l'i82586. Chris Beauregard ha modificato
  il driver ni52 per farlo funzionare con queste schede.  Il driver pu
  essere trovato nell'albero dei sorgenti dei kernel v2.2.

  Maggiori dettagli possono essere trovati nella pagina di MCA-Linux a
  http://glycerine.cetmm.uni.edu/mca/.


  5.1.8.  3c527

  Stato: Non supportata.

  S, un'altra scheda MCA.  No, non risquote molto interesse.  Se si 
  impelagati con l'MCA maggior fortuna la si ha con la 3c529.


  5.1.9.  3c529

  Stato: Supportata, Nome del driver: 3c509

  Questa scheda in realt usa lo stesso chipset della 3c509.  Molto
  prima che il supporto MCA fosse aggiunto al kernel, Donald ha messo un
  hook nel driver della 3c509 che cerca le schede MCA dopo aver provato
  a rilevare quelle EISA e prima di cercare le ISA.  Il codice di
  rilevamento richiesto  incluso nel driver distribuito con i kernel
  v2.2.  Maggiori dettagli nella pagina di MCA-Linux a

  http://glycerine.cetmm.uni.edu/mca/


  5.1.10.  3c562

  Stato: Supportata, Nome del driver: 3c589 (distribuito separatamente)

  Questa scheda PCMCIA  la combinazione di una scheda Ethernet 3c589B
  con un modem.  All'utente finale il modem appare come un modem
  normalissimo.  La sola difficolt  far s che i due driver di Linux
  condividano lo stesso interrupt.  C' il supporto per alcuni nuovi
  registri e un po' per la condivisione degli interrupt hardware.  Si
  deve usare un kernel v.2.0 o pi recenti che ha il supporto per la
  condivisione degli interrupt.


  Grazie ancora a Cameron per aver fornito a David Hinds un campione di
  questo prodotto e la documentazione.  Il supporto lo si cerchi nel
  pacchetto PCMCIA di David.

  Si veda la sezione ``Supporto PCMCIA'' per maggiori informazioni sui
  chipset PCMCIA, abilitatori di socket, ecc.


  5.1.11.  3c575

  Stato: Sconosciuto.

   in sviluppo un driver per questa scheda PCMCIA e si spera che in
  futuro sia incluso nel pacchetto PCMCIA di David.  Per sapere lo stato
  attuale  meglio controllare nel pacchetto PCMCIA.



  5.1.12.  3c579

  Stato: Supportata, Nome del driver: 3c509


  La versione EISA della 509.  La versione EISA attuale usa lo stesso
  chip a 16 bit invece che un interfaccia a 32 bit, quindi l'incremento
  di prestazioni non  meraviglioso.  Ci si assicuri che la scheda sia
  configurata per la modalit di indirizzamento EISA.  Si legga la
  sezione precedente sulla 3c509 per informazioni sul driver.


  5.1.13.  3c589 / 3c589B

  Stato: Semi-supportata, Nome del driver: 3c589

  Molti stanno usando questa scheda PCMCIA da un po' di tempo.  Si noti
  che il supporto non  (al momento) incluso nell'albero dei sorgenti
  del kernel.  La ``B'' nel nome significa la stessa cosa che nel caso
  della 3c509.

  Sono disponibili dei driver nel sito ftp di Donald e nel pacchetto
  PCMCIA di David Hinds.  Sar necessario avere anche un controller
  PCMCIA supportato.  Si veda la sezione ``Supporto PCMCIA'' per
  maggiori informazioni su driver, chipset, abilitatori di socket
  PCMCIA, ecc.


  5.1.14.  3c590 / 3c595

  Stato: Supportate, Nome del driver: 3c59x

  Queste schede ``Vortex'' sono per macchine a bus PCI: '590  l'offerta
  3Com per i 10Mbps mentre la '595  l'offerta per i 100Mbs.  Si noti
  inoltre che si pu usare la '595 come una '590 (cio in modalit a
  10Mbps).  Il driver  incluso nei sorgenti del kernel v2.0, ma 
  continuamente aggiornato.  Se si hanno problemi con il driver nel
  kernel v2.0, si pu trovare un driver pi aggiornato partendo dall'URL
  seguente:

  Vortex <http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html>

  Si noti che in giro si sono due diverse schede 3c590: i primi modelli
  con 32kB di memoria sulla scheda e gli ultimi modelli che hanno solo
  8kB di memoria.   possibile che non si sar in grado di trovare una
  nuova 3c59x sul mercato ancora per molto, poich  stata sostituita
  con la 3c90x.  Se si vuole comprarne una usata da qualcuno, si provi a
  trovare la versione con 32kB.  La 3c595 ha 64kB, in quanto non si pu
  andare molto lontano con soli 8kB a 100Mbps!

  Un ringraziamento a Cameron Spitzer e Terry Murphy della 3Com per aver
  inviato schede e documentazione a Donald cosicch ha potuto scrivere
  il driver.

  Donald ha messo su una mailing list per il supporto al driver Vortex.
  Per unirsi alla lista, si faccia semplicemente:

  echo subscribe | /bin/mail linux-vortex-request@cesdis.gsfc.nasa.gov



  5.1.15.  3c592 / 3c597

  Stato: Supportate, Nome del driver: 3c59x

  Queste sono le versioni EISA della serie di schede 3c59x.  Le
  3c592/3c597 (altrimenti note come Demon) dovrebbero funzionare con il
  driver vortex discusso in precedenza.



  5.1.16.  3c900 / 3c905 / 3c905B

  Status: Supportate, Nome del driver Name: 3c59x

  Queste schede (altrimenti note come `Boomerang' o EtherLink III XL)
  sono state realizzate per prendere il posto delle schede 3c590/3c595.

  Il supporto per la revisione `B' (Cyclone)  stato aggiunto solo di
  recente.  Per usare questa scheda con i vecchi kernel v2.0, si deve
  ottenere il driver 3c59x.c aggiornato dal sito di Donald a:

  Vortex-Page <http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html>

  Per qualsiasi dubbio si veda la pagina WWW suddetta.  Donald ha messo
  su una mailing list per il supporto del driver Vortex, annunci, ecc.
  Per unirsi alla lista, si faccia semplicemente:

  echo subscribe | /bin/mail linux-vortex-request@cesdis.gsfc.nasa.gov


  5.1.17.  3c985

  Stato: Supportata, Nome del driver: acenic

  Questo driver di Jes Sorensen  disponibile nei kernel v2.2.  Supporta
  diverse altre schede Gigabit oltre al modello 3Com.


  5.2.  Accton



  5.2.1.  Accton MPX

  Stato: Supportata, Nome del driver: ne (+8390)

  Non ci si faccia ingannare dal nome.  Questa  una scheda compatibile
  con la NE2000 e dovrebbe funzionare con il driver ne2000.


  5.2.2.  Accton EN1203, EN1207, EtherDuo-PCI

  Stato: Supportata, Nome del driver: de4x5, tulip

  Questa  un'altra implementazione del chip PCI 21040 della DEC.  La
  scheda EN1207 ha il 21140 e ha pure un connettore 10Base-2, che si 
  dimostrato causare un po' di problemi a qualcuno nella selezione di
  quel mezzo.  Per altri ha funzionato bene usando la scheda con 10Base-
  T e 100Base-T.  Quindi come per qualsiasi acquisto, la si dobrebbe
  provare assicurandosi di poterla restituire nel caso non funzioni.

  Si veda ``DEC 21040'' per maggiori informazioni su queste schede e la
  situazione attuale del driver.


  5.2.3.  Accton EN2209 Parallel Port Adaptor (EtherPocket)

  Stato: Semi supportata, Nome del driver: ?

   disponibile un driver per questi adattatori su porta parallela ma
  non fa ancora parte dei sorgenti del kernel 2.0 e 2.1.  Si deve
  scaricare il driver da:

  http://www.unix-ag.uni-siegen.de/~nils/accton_linux.html


  5.2.4.  Accton EN2212 PCMCIA Card

  Stato: Semi supportata, Nome del driver: ?

  David Hinds stava lavorando su un driver per questa scheda e quindi
  per conoscere lo stato attuale la cosa migliore  quindi quella di
  controllare l'ultima release del suo pacchetto PCMCIA.


  5.3.  Allied Telesyn/Telesis



  5.3.1.  AT1500

  Stato: Supportata, Nome del driver: lance

  Questa  una serie di schede Ethernet a bassa costo che usa la
  versione 79C960 del chip LANCE dell'AMD. Sono schede bus-master e
  quindi fra le pi veloci schede Ethernet per bus ISA disponibili.

  Informazioni sulla selezione del DMA e la numerazione del chip possono
  essere trovate in ``AMD LANCE''.

  Informazioni tecniche aggiuntive sulle schede Ethernet basate su AMD
  LANCE possono essere trovate nella sezione ``Note su AMD...''.


  5.3.2.  AT1700

  Stato: Supportata, Nome del driver: at1700

  Si noti che per accedere a questo driver durante il make config si
  deve ancora rispondere `Y' alla domanda iniziale ``Prompt for
  development and/or incomplete code/drivers?''.  Ci  dovuto
  semplicemente allo scarso responso avuto sulla stabilit del driver a
  causa della relativa rarit della scheda.  Se si hanno problemi con il
  driver distribuito assieme al kernel, pu interessare un driver
  alternativo reperibile a:

  http://www.cc.hit-u.ac.jp/nagoya/at1700/

  La serie di schede Ethernet AT1700 della Allied Telesis sono basate
  sul chip MB86965 della Fujitsu.  Questo chip usa un'interfaccia ad I/O
  programmato e una coppia di buffer di trasmissione di dimensione
  fissa.  Ci permette l'invio back-to-back di piccoli gruppi di
  pacchetti, con una breve pausa durante lo scambio dei buffer.

  Una caratteristica unica  l'abilit di pilotare un cavo STP (Shielded
  Twisted Pair - doppino intrecciato schermato) da 15 Ohm comunemente
  utilizzato per il Token Ring, oltre ai cavi UTP (unshielded twisted
  pair - doppino intrecciato non schermato) da 100 Ohm del 10baseT.
  Della scheda ne esiste pure una versione per fibra ottica (AT1700FT).

  Il chip Fujitsu utilizzato nella AT1700 ha un difetto di
  progettazione: pu essere reinizializzato completamente solo operando
  un ciclo completo di alimentazione della macchina.  Premendo solamente
  il pulsante di reset non si inizializza l'interfaccia.  Questo non
  sarebbe tanto male, tranne per il fatto che pu essere rilevata in
  modo affidabile solo quando  stata reinizializzata.  La
  soluzione/work-around  di spegnere la macchina se il kernel ha
  problemi a rilevare l'AT1700.




  5.3.3.  AT2450

  Stato: Supportata, Nome del driver: pcnet32

  Questa  la versione PCI della AT1500 e non soffre dei problemi cha ha
  la scheda PCI 79c970 della Boca.  Informazioni sulla selezione del DMA
  e la numerazione del chip possono essere trovate nella sezione ``AMD
  LANCE''.

  Ulteriori informazioni tecniche sulle schede Ethernet basate sul LANCE
  dell'AMD possono essere trovate nella sezione ``Note su AMD...''.


  5.3.4.  AT2500

  Stato: Semi supportata, Nome del driver: rtl8139

  Questa scheda usa il chip 8139 della RealTek.  Si veda la sezione
  ``RealTek 8139''.


  5.3.5.  AT2540FX

  Stato: Semi supportata, Nome del driver: eepro100

  Questa scheda usa il chip i82557 e quindi pu/potrebbe funzionare con
  il driver eepro100.  Se la si prova si  invitati ad inviare un
  rapporto cosicch queste informazioni possano essere aggiornate.


  5.4.  AMD / Advanced Micro Devices


  Carl Ching dell'AMD  stato talmente gentile da fornire descrizioni
  molto dettagliate su tutti i pi importati prodotti Ethernet dell'AMD
  che mi hanno aiutato a chiarire un po' questa sezione.


  5.4.1.  AMD LANCE (7990, 79C960/961/961A, PCnet-ISA)

  Stato: Supportata, Nome del driver: lance

  In realt non ci sono schede Ethernet dell'AMD.  Probabilmente si sta
  leggendo questa sezione perch le sole cose che si possono leggere
  sopra la propria scheda dicono AMD e uno dei numeri suddetti.  Il 7990
   il chip `LANCE' originale, ma molte cose (tra cui questo documento)
  fanno riferimento a tutti questi chip simili come chip `LANCE'
  (...incorrettamente potrei aggiungere).

  Questi numeri fanno riferimento a chip dell'AMD che sono il cuore di
  molte schede Ethernet.  Per esempio la AT1500 della Allied Telesis (si
  veda la sezione ``AT1500'') e la NE1500/2100 (si veda la sezione
  ``NE1500'') usano questi chip.

  Il 7990/79c90  stato da tempo rimpiazzato da nuove versioni.  Il
  79C960 (detto anche PCnet-ISA) essenzialmente contiene il nucleo della
  79c90, assieme a tutto l'altro hardware di supporto, che permette una
  soluzione Ethernet in un unico chip.  Il 79c961 (PCnet-ISA+)  una
  versione Plug and Play senza ponticelli della '960.  L'ultimo chip
  della serie ISA  il 79c961A (PCnet-ISA II), che aggiunge piene
  funzionalit full duplex.  Tutte le schede con uno di questi chip
  dovrebbero funzionare con il driver lance.c, ad eccezione di quelle
  veramente vecchie che usano il 7990 originale in una configurazione a
  memoria condivisa.  Queste vecchie schede possono essere identificate
  dalla mancanza di jumper per il canale DMA.

  Un problema comune  la ricezione del messaggio `busmaster arbitration
  failure'.  Questo  mostrato quando il driver LANCE non pu accedere
  al bus dopo che  passato un ragionevole intervallo di tempo (5us).
  Solitamente indica che l'implementazione del bus-master della scheda
  madre ha problemi o qualche altro dispositivo sta intasando il bus,
  oppure c' un canale DMA in conflitto.  Se il proprio BIOS ha
  l'opzione GAT (che sta per Guaranteed Access Time -- tempo di accesso
  garantito) si provi ad attivare/alterare questa impostazione per
  vedere se  di qualche aiuto.

  Si noti inoltre che il driver cerca una scheda valida solo in questi
  indirizzi: 0x300, 0x320, 0x340, 0x360 e qualsiasi indirizzo fornito
  con l'argomento di boot ether=  ignorato silenziosamente (questa cosa
  verr corretta).  Quindi per ora ci si assicuri che la propria scheda
  sia configurata per uno dei suddetti indirizzi I/O.

  Il driver dovrebbe funzionare ancora bene anche se sono installati pi
  di 16 MB di memoria, in quanto, quando serve, sono usati i `bounce-
  buffer' in memoria bassa (i.e. qualsiasi dato sopra il 16 MB  copiato
  dentro un buffer sotto il 16 MB prima di essere dato alla scheda
  perch lo trasmetta).

  Il canale DMA pu essere impostato con i bit meno significativi
  dell'altrimenti inutilizzato valore di dev->mem_start (PARAM_1) (si
  veda ``PARAM_1'').  Se non impostato  rilevato abilitando a turno
  tutti i canali DMA liberi e controllando se l'inizializzazione ha
  successo.

  La scheda HP-J2405A  un eccezione: con questa scheda  facile leggere
  i valori impostati nella EEPROM per IRQ e DMA.

  Si veda la sezione ``Note su AMD...'' per maggiori informazioni su
  questi chip.


  5.4.2.  AMD 79C965 (PCnet-32)

  Stato: Supportata, Nome del driver: pcnet32

  Questa  la PCnet-32: una versione bus-master a 32 bit del chip LANCE
  originale per sistemi VL-bus e local bus.  Sebbene questi chip possano
  funzionare con il driver lance.c standard,  disponibile anche una
  versione a 32 bit (pcnet32.c) che non si preoccupa mai delle
  limitazioni ai 16 MB associati con il bus ISA.


  5.4.3.  AMD 79C970/970A (PCnet-PCI)

  Stato: Supportata, Nome del driver: pcnet32

  Questa  la PCnet-PCI: simile alla PCnet-32, ma progettata per i
  sistemi basati su bus PCI.  Si vedano le informazioni sulla PCnet-32.
  Si noti che  necessario compilare un kernel abilitando il supporto
  per il PCI.  La '970A aggiunge al progetto originale della '970 il
  supporto per il full duplex oltre ad altre caratteristiche.

  Si noti che l'implementazione Boca della 79C970 fallisce su macchine
  Pentium veloci.   un problema hardware, in quanto affligge anche gli
  utenti DOS.  Si veda la sezione sulla Boca per maggiori dettagli.


  5.4.4.  AMD 79C971 (PCnet-FAST)

  Stato: Supportata, Nome del driver: pcnet32


  Questo  il chip a 100Mbit per sistemi PCI della AMD, che supporta
  anche le operazioni full duplex.   stato introdotto nel giugno 1996.


  5.4.5.  AMD 79C972 (PCnet-FAST+)

  Stato: Sconosciuto, Nome del driver: pcnet32

  Questa dovrebbe funzionare proprio come la '971 ma la cosa non 
  ancora stata confermata.


  5.4.6.  AMD 79C974 (PCnet-SCSI)

  Stato: Supportata, Nome del driver: pcnet32

  Questa  la PCnet-SCSI, che in pratica viene trattata come una '970
  dal punto di vista Ethernet.  Si vedano anche le informazioni
  precedenti.  Non mi si chieda se  supportata la parte SCSI del chip:
  questo  Ethernet-HowTo, non lo SCSI-HowTo.


  5.5.  Ansel Communications



  5.5.1.  AC3200 EISA

  Stato: Semi-supportata, Nome del driver: ac3200

  Si noti che per accedere a questo driver durante il make config si
  deve ancora rispondere `Y' alla domanda iniziale ``Prompt for
  development and/or incomplete code/drivers?''.  Questa cosa 
  semplicemente dovuta allo scarso responso da parte degli utenti sulla
  stabilit del driver a causa della relativa rarit della scheda.

  Questo driver  incluso nel kernel attuale con un driver in alpha
  test.   basata sul comune chip NS8390 usato nelle schede ne2000 e
  wd80x3.  Si veda la sezione ``Driver sperimentali'' in questo
  documento per importanti informazioni riguardanti i driver
  sperimentali.

  Se la si usa, lo si faccia sapere ad uno di noi, poich il riscontro
  da parte degli utenti  stato basso, anche se il driver  nel kernel
  gi a partire dalla versione 1.1.25.

  Se si intende utilizzare questo driver come modulo caricabile
  probabilmente si dovrebbe vedere la sezione ``Usare i driver Ethernet
  come moduli'' per informazioni specifiche sui moduli.


  5.6.  Apricot



  5.6.1.  Apricot Xen-II On Board Ethernet

  Stato: Semi supportata, Nome del driver: apricot

  Questa scheda Ethernet on board usa un chip i82596 bus-master.  Pu
  essere solo all'indirizzo I/O 0x300.  Guardando nei sorgenti del
  driver, sembra anche che l'IRQ sia fissato via hardware al 10.

  Le prime versioni di questo driver avevano la tendenza a pensare che
  qualsiasi cosa presente a 0x300 fosse una NIC apricot.  Da allora
  l'indirizzo hardware  verificato per evitare questi falsi rilievi.
  5.7.  Arcnet

  Stato: Supportata, Nome del driver: arcnet (arc-rimi, com90xx,
  com20020)

  Con il costo ormai veramente basso e le migliori prestazioni di
  Ethernet,  possibile che molti posti diano via gratis il loro
  hardware Arcnet, il che risulta in un sacco di sistemi domestici con
  Arcnet.

  Un vantaggio di Arcnet  che tutte le schede hanno la medesima
  interfaccia cosicch un unico driver funziona per tutte.  Hanno pure
  una gestione degli errori e quindi si pu supporre che non perdano mai
  pacchetti (bellissimo per il traffico UDP!).

  Il driver arcnet di Avery Pennarun  nel kernel dalla versione 1.1.80.
  Il driver arcnet usa `arc0' come nome invece del solito `eth0' dei
  dispositivi Ethernet.  Segnalazioni di bug e racconti di successo
  possono essere inviati a:

  apenwarr@foxnet.net

  Nel kernel standard ci sono file d'informazioni sull'impostazione dei
  ponticelli e suggerimenti generali.

  Si pu supporre che il driver funzioni anche con le schede ARCnet a
  100Mbs!


  5.8.  AT&T


  Si noti che la StarLAN della AT&T  una tecnologia orfana, come la
  LattisNet della SynOptics e non pu essere usata in un ambiente
  10Base-T standard, senza un hub che le `parla' entrambe.


  5.8.1.  AT&T T7231 (LanPACER+)

  Stato: Non supportata.

  Queste schede StarLAN usano un interfaccia simile a quella del chip
  i82586.  Ad un certo punto Matthijs Melchior
  (matthijs.n.melchior@att.com) si era messo a giocare con il driver
  3c507 e quasi aveva qualcosa di funzionante.  Non ho sentito pi
  niente da allora.


  5.9.  Boca Research


  S, fanno molto pi che solo schede seriali multiporta. :-)


  5.9.1.  Boca BEN (ISA, VLB, PCI)

  Stato: Supportata, Nome del driver: lance, pcnet32

  Questa schede sono basate sui chip PCnet dell'AMD.  Gli acquirenti
  accorti dovrebbero essere avvisati che molti utenti hanno avuto un
  sacco di problemi con queste schede VLB/PCI.  Sono stati colpiti
  specialmente i possessori di sistemi Pentium veloci.  Si noti che
  questo non  un problema del driver, in quanto colpisce anche gli
  utenti DOS/Win/NT.  Il numero del supporto tecnico della Boca  (407)
  241-8088 e pu essere raggiunto anche a 75300.2672@compuserve.com.  Le
  vecchie schede ISA non sembra soffrano dello stesso problema.
  Donald ha fatto un test comparativo tra una scheda PCI della Boca e
  una implementazione PCnet/PCI simile della Allied Telsyn e ha rilevato
  che i problemi dipendono dall'implementazione Boca del chip PCnet/PCI.
  Si pu accedere ai risultati di questi test nel server www di Don.

  Linux at CESDIS <http://cesdis.gsfc.nasa.gov/linux/>

  La Boca sta offrendo una `warranty repair' (ripazione in garanzia) per
  i possessori di tali schede che consiste nell'aggiunta di un
  condensatore, ma sembra che la cosa non funzioni al 100% per molte
  persone, sebbene aiuti un po'.

  Se ancora si  convinti di comprare una di queste schede, allora
  almeno si provi ad ottenere una garanzia incondizionata di
  restituzione entro 7 giorni, cosicch se non funziona bene nel proprio
  sistema, la si pu sempre restituire.

  Per ulteriori infomazioni generali sui chip della AMD si veda ``AMD
  LANCE''.

  Informazioni tecniche ulteriori sulle schede Ethernet AMD LANCE
  possono essere trovate nella sezione ``Note su AMD...''.


  5.10.  Cabletron


  Donald scrive: S, un'altra di quelle compagnie che non vuole
  rilasciare le sue informazioni per la programmazione.  Hanno aspettato
  mesi prima di confermare che tutte le loro informazioni erano
  proprietarie, sprecando deliberatamente il mio tempo.  Se si pu si
  evitino queste schede come la peste.  Si noti che ad alcuni che hanno
  telefonato alla Cabletron sono state dette cose del tipo `un certo D.
  Becker sta lavorando su un driver per Linux' -- facendo sembrare che
  io lavori per loro.  Questo NON  vero.


  Apparentemente la Cabletron ha cambiato la sua politica riguardo le
  informazioni per la programmazione (come la Xircom) da quando Donald
  ha fatto quei commenti parecchi anni fa: si mandi una email a
  support@ctron.com se si vuole verificare questa cosa o chiedere le
  infomazioni per la programmazione.  Comunque, a questo punto, c' una
  richiesta minima per driver modificati/aggiornati per le vecchie
  schede E20xx e E21xx.


  5.10.1.  E10**, E10**-x, E20**, E20**-x

  Stato: Semi supportate, Nome del driver: ne (+8390)

  Queste sono praticamente dei cloni delle NEx000 che si dice funzionino
  con i driver standard NEx000, grazie a un controllo specifico durante
  il rilevamento.  Se ci sono dei problemi, difficilmente possono essere
  risolti, poich non sono disponibili le informazioni per la
  programmazione.


  5.10.2.  E2100

  Stato: Semi supportata, Nome del driver: e2100 (+8390)

  Ancora, non si pu fare molto quando le informazioni per la
  programmazione sono proprietarie.  Le E2100 ha un pessimo progetto.
  Ogniqualvolta mappa la sua memoria condivisa durante un trasferimento
  di pacchetti, la mappa dentro un'intera regione di 128K!  Ci
  significa che in quella regione non si pu usare con sicurezza un
  altro dispositivo gestito a memoria condivisa, nemmeno un'altra E2100.
  Funzioner per maggior parte del tempo, ma tutto un tratto non lo far
  pi (s, questo problema pu essere evitato disabilitando gli
  interrupt mentre si trasferiscono i pacchetti, ma quasi certamente si
  perderanno colpi di clock).  Inoltre, se si mal programma la scheda o
  si ferma la macchina proprio al momento sbagliato, nemmeno il bottone
  di reset sar utile. Si deve spegnere la macchina e lasciarla spenta
  per almeno 30 secondi.

  La selezione del mezzo  automatica, ma volendo lo si pu imporre con
  i bit meno significativi del parametro dev->mem_end.  Se veda
  ``PARAM_2''.  Gli utilizzatori dei moduli possono specificare un
  valore xcvr=N come options nel file /etc/conf.modules.

  Inoltre, non si scambi la E2100 per un clone della NE2100.  La E2100 
  un NetSemi DP8390 a memoria a condivisa, ``rozzamente'' simile alla
  demente della WD8013, mentre la NE2100 (e la NE1500) usano un AMD
  LANCE con bus-mastering.

  Nel kernel standard  incluso un driver per la E2100.  Comunque,
  poich non sono disponibili informazioni per la programmazione, non si
  aspettino le correzioni di eventuali bachi.  Non se ne usi una a meno
  che non la si possegga gi.

  Se si ha intenzione di usare questo driver come modulo caricabile
  probabilmente si dovrebbe vedere la sezione ``Usare i driver Ethernet
  come moduli'' per infomazioni specifiche sui moduli.


  5.10.3.  E22**

  Stato: Semi supportata, Nome del driver: lance

  Secondo le infomazioni in un bollettino tecnico della Cabletron,
  queste schede usano il chip PC-Net dell'AMD (si veda ``AMD PC-Net'') e
  dovrebbero quindi funzionare con il driver lance generico.


  5.11.  Cogent


  Ecco come e dove possono essere raggiunti:


          Cogent Data Technologies, Inc.
          175 West Street, P.O. Box 926
          Friday Harbour, WA 98250, USA.

          Cogent Sales
          15375 S.E. 30th Place, Suite 310
          Bellevue, WA 98007, USA.

          Supporto tecnico:
          Telefono (360) 378-2929 tra le 8 e 17 PST
          Fax (360) 378-2882
          Compuserve GO COGENT
          Bulletin Board Service (360) 378-5405
          Internet: support@cogentdata.com




  5.11.1.  EM100-ISA/EISA

  Stato: semi supportata, Nome del driver: smc9194

  Queste schede usano il chip SMC 91c100 e potrebbero funzionare con il
  driver per SMC 91c92, ma la cosa non  ancora stata verificata.


  5.11.2.  Cogent eMASTER+, EM100-PCI, EM400, EM960, EM964

  Stato: Supportate, Nome del driver: de4x5, tulip

  Queste sono un'altra implementazione del DEC 21040 che quindi dovrebbe
  funzionare tranquillamente con il driver standard per il 21040.

  La EM400 e la EM964 sono schede a quattro porte che usano un bridge
  DEC 21050 e 4 chip 21040.

  Si veda ``DEC 21040'' per maggiori informazioni su queste schede e la
  situazione attuale.


  5.12.  Compaq


  La Compaq non  veramente in affari per la costruzione di schede
  Ethernet, ma un sacco di loro sistemi hanno controller Ethernet
  integrati nella scheda madre.


  5.12.1.  Compaq Deskpro / Compaq XL (Embedded AMD Chip)

  Stato: Supportati, Nome del driver: pcnet32

  Le macchine come quella della serie XL hanno un chip PCI 79c97x
  dell'AMD nella scheda madre che pu essere usato con il driver LANCE
  standard.  Ma prima di usarlo, si devono utilizzare alcuni trucchetti
  per far s che il BIOS PCI si metta in un posto dove Linux lo possa
  vedere.  Frank Maas  stato cos gentile da fornire i dettagli
  operativi:

  Il problema con questa macchina Compaq  che la directory PCI 
  caricata in memoria alta, in un punto che il kernel di Linux non pu
  (non vuole) raggiungere.  Risultato: la scheda non  mai rilevata e
  nemmeno usabile (altro effetto: non funziona nemmeno il mouse).  Il
  workaround (come descritto approfonditamente in http://www-
  c724.uibk.ac.at/XL/)  di caricare MS-DOS, lanciare un piccolo driver
  che ha scritto la Compaq e poi caricare il kernel di Linux usando
  LOADLIN.  Ok, vi do il tempo per dire `yuck, yuck', ma per ora questo
   il solo metodo che conosco.  Il driver semplicemente sposta la
  directory PCI nel posto dov' di solito (e dove Linux la pu
  trovare).

  Ulteriori informazioni generali sui chip AMD possono essere trovate in
  ``AMD LANCE''.


  5.12.2.  Compaq Nettelligent/NetFlex (Embedded ThunderLAN Chip)

  Stato: Supportata, Nome del driver: tlan

  Questi sistemi usano un chip ThunderLAN della Texas Instruments.
  Informazioni sul driver ThunderLAN possono essere trovare in
  ``ThunderLAN''.


  5.13.  Danpex



  5.13.1.  Danpex EN9400

  Stato: Supportata, Nome del driver: de4x5, tulip

  Ecco un'altra scheda basata sul chip 21040 della DEC, che si dice
  funzioni bene e che costa relativamente poco.

  Si veda ``DEC 21040'' per maggiori informazioni su queste schede e
  l'attuale situazione del driver.


  5.14.  D-Link



  5.14.1.  DE-100, DE-200, DE-220-T, DE-250

  Stato: Supportata, Nome del driver: ne (+8390)

  Alcune delle prime schede D-Link non avevano la firma (signature) 0x57
  nella PROM, ma il driver ne2000 ne  conscio.  Per quanto riguarda le
  schede configurabili via software, si pu scaricare il programma di
  configurazione da www.dlink.com.  Le schede DE2** erano le
  maggiormente segnalate per avere errori spuri di mismatch
  nell'indirizzo di trasferimento con le prime versioni di Linux.  Si
  noti che esistono anche schede della Digital (DEC) chiamate DE100 e
  DE200, ma la somiglianza finisce qui.


  5.14.2.  DE-520

  Stato: Supportata, Nome del driver: pcnet32

  Questa  una scheda PCI che usa la versione PCI del chip LANCE
  dell'AMD.  Informazioni sulla selezione del DMA e la numerazione del
  chip possono essere trovate nella sezione ``AMD LANCE''.

  Ulteriori informazioni tecniche sulle schede Ethernet basate sul LANCE
  dell'AMD le si pu trovare nella sezione ``Note su AMD...''.


  5.14.3.  DE-528

  Stato: Supportata, Nome del driver: ne, ne2k-pci (+8390)

  Apparentemente la D-Link ha cominciato a fare anche cloni PCI della
  NE2000.



  5.14.4.  DE-530

  Stato: Supportata, Nome del driver: de4x5, tulip

  Questa  un'implementazione del chip DEC 21040 ed  riportato che
  funziona con il driver generico tulip per il 21040.

  Si veda la sezione ``DEC 21040'' per maggiori informazioni su queste
  schede e sullo stato attuale del driver.


  5.14.5.  DE-600

  Stato: Supportata, Nome del driver: de600


  Ai possessori di un portatile e a tutti quelli che vorrebbero un
  metodo veloce per mettere il loro computer su Ethernet piacer usare
  questa schede.  Il driver  incluso nei sorgenti del kernel standard.

  Il driver  stato scritto da Bjorn Ekwall bj0rn@blox.se.  Ci si
  aspetti una velocit di trasferimento di circa 180kb/s da questa
  scheda attraverso la porta parallela.  Si dovrebbe leggere il file
  README.DLINK nell'albero dei sorgenti del kernel.

  Si noti che il nome del device da passare a ifconfig ora  eth0 e non
  pi il dl0 usato in precedenza.

  Se la propria porta parallela non  all'indirizzo standard 0x378
  allora si deve ricompilare.  Bjorn scrive: Poich il driver DE-620
  prova a spremere anche l'ultimo microsecondo dal ciclo, ho reso l'irq
  e l'indirizzo delle costanti piuttosto che delle variabili.  Questo
  consente di ottenere una velocit usabile, ma significa anche che non
  si possono modificare questi assegnamenti p.es. da lilo; si _deve_
  ricompilare....  Si noti inoltre che alcuni portatitili implementano
  la porta parallela on board a 0x3bc che  dove erano/sono le porte
  parallele sulle schede monocromatiche.


  5.14.6.  DE-620

  Stato: Supportata, Nome del driver: de620

  Analoga alla DE-600, con solo due formati d'uscita.   Bjorn ha scritto
  un driver per questo modello per le versioni del kernel pari e
  superiori alla 1.1.  Si vedano le informazioni precedenti sulla
  DE-600.


  5.14.7.  DE-650

  Stato: Semi supportata, Nome del driver: de650 (?)

  Alcuni hanno usato questa scheda PCMCIA per abbastanza tempo nei loro
  computer portatili.  In pratica  un 8390, come una NE2000.  Si
  suppone che anche la scheda PCMCIA LinkSys e la IC-Card Ethernet siano
  dei cloni della DE-650.  Si noti che al momento questo driver non 
  parte del kernel standard, e quindi si devono applicare alcune patch.

  Si veda ``Supporto PCMCIA'' in questo documento e, se si pu, si dia
  un'occhiata a:

  Don's PCMCIA Stuff <http://cesdis.gsfc.nasa.gov/linux/pcmcia.html>


  5.15.  DFI



  5.15.1.  DFINET-300 e DFINET-400

  Stato: Supportate, Nome del driver: ne (+8390)

  Ora queste schede sono rilevate (sin dal 0.99pl15) grazie a Eberhard
  Moenkeberg emoenke@gwdg.de che ha notato che usano `DFI' nei primi 3
  byte della PROM, invece di usare 0x57 nei byte 14 e 15, che  quello
  che fanno tutte le schede NE1000 e NE2000 (la 300  un pseudo-clone
  della NE1000 a 8 bit e la 400 lo  della NE2000).




  5.16.  Digital / DEC



  5.16.1.  DEPCA, DE100/1, DE200/1/2, DE210, DE422

  Stato: Supportate, Nome del driver: depca

  Nel file sorgente `depca.c'  inclusa della documentazione, che
  comprende informazioni su come usare pi di una di queste schede in
  una macchina.  Si noti che la DE422  una scheda EISA.  Queste schede
  sono tutte basate sul chip LANCE dell'AMD.  Si veda la sezione ``AMD
  LANCE'' per maggiori informazioni.  Possono essere usate sino ad un
  massimo di due schede ISA, perch possono essere impostate solamente
  per gli indirizzi di I/O base 0x300 e 0x200.  Se si intende farlo, si
  leggano le note nel file sorgente del driver depca.c nell'albero dei
  sorgenti del kernel standard.

  Questo driver funzioner anche sulle macchine basate su CPU Alpha e ci
  sono diverse ioctl() con le quali l'utente pu giocare.


  5.16.2.  Digital EtherWorks 3 (DE203, DE204, DE205)

  Stato: Supportata, Nome del driver: ewrk3

  Queste schede usano un chip proprietario della DEC, invece del chip
  LANCE utilizzato nelle prime schede come la DE200.  Queste schede
  supportano sia la memoria condivisa che l'I/O programmato, sebbene
  raggiungano una calo di prestazioni del 50% se si usa la modalit PIO.
  La dimensione della memoria condivisa pu essere impostata a 2kB, 32kB
  o 64kB, ma con questo driver sono state testate solamente le prime due
  dimensioni.  David dice che le prestazioni sono virtualmente identiche
  tra il modo a 2kB e quello a 32kB.  Maggiori informazioni (tra cui
  l'uso del driver come modulo caricabile) sono presenti all'inizio del
  file sorgente ewrk3.c e anche nel file README.ewrk3.  Ambedue i file
  sono nella distribuzione standard del kernel.  Questo driver ha il
  supporto per le CPU Alpha, come il depca.c.

  Il driver standard ha diverse chiamate ioctl() interessanti che
  possono essere usate per ottenere ed azzerare le statistiche sui
  pacchetti, leggere/scrivere la EEPROM, cambiare l'indirizzo hardware e
  cose cos.  Gli smanettoni possono vedere il codice sorgente per
  maggiori informazioni su queste possibilit.

  David ha scritto anche un programma di configurazione per questa
  scheda (sulla falsa riga del programma DOS NICSETUP.EXE) assieme con
  altri strumenti.  Possono essere trovati in praticamente tutti i siti
  FTP di Linux nella directory /pub/Linux/system/Network/management (si
  cerchi il file ewrk3tools-X.XX.tar.gz).


  5.16.3.  DE425 EISA, DE434, DE435, DE500

  Stato: Supportate, Nome del driver: de4x5, tulip

  Queste schede si basano sul chip 21040 menzionato sotto.  La DE500 usa
  il chip 21140 per fornire connessioni Ethernet a 10/100Mbs.  Si deve
  leggere la sezione sul 21040 qui sotto per ulteriori informazioni.  Ci
  sono alcuni opzioni da passare in compilazione per le schede non DEC
  che usano questo driver.  Si veda il file README.de4x5 per i dettagli.

  Tutte le schede Digital rileveranno automaticamente il mezzo (tranne,
  temporaneamente, la DE500 a causa di un brevetto).


  Questo driver  pronto anche per le CPU Alpha e pu essere caricato
  come modulo.  Gli utenti possono raggiungere l'interno del driver
  attraverso chiamate ioctl. Si vedano gli strumenti 'ewrk3' e il
  sorgente de4x5.c per informazioni su come farlo.


  5.16.4.  DEC 21040, 21041, 2114x, Tulip

  Stato: Supportate, Nome del driver: de4x5, tulip

  Il DEC 21040  una soluzione Ethernet bus-mastering in un unico chip,
  simile al chip PCnet dell'AMD.  Il 21040  progettato specificatamente
  per l'architettura di bus PCI.  La nuova scheda PCI EtherPower della
  SMC usa questo chip.  Per le schede basate su questo chip  possibile
  scegliere tra due driver.  C' il driver DE425 discusso in precedenza
  e driver generico `tulip' per il 21040.

  Attenzione: Sebbene la propria scheda possa essere basata su questo
  chip, nel proprio caso i driver potrebbero non funzionare.  David C.
  Davies scrive:

  Non c' alcuna garanzia che il `tulip.c' o il `de4x5.c' funzionino
  con una qualsiasi scheda basata sui DC2114x oltre a quelle per cui
  sono stati scritti.  PERCH??  Perch c' un registro, il General
  Purpose Register (CSR12) che (1) nel DC21140A  programmabile da
  qualsiasi produttore e tutti lo fanno in modo differente (2) nei
  DC21142/3 c' ora un registro di controllo SIA (a la DC21041).  Il
  solo piccolo raggio di speranza  che riusciamo a decodificare la SROM
  per aiutare l'impostazione nel driver.  Comunque, questa non  una
  soluzione garantita in quanto alcuni produttori (per esempio la scheda
  SMC 9332) non seguono le raccomandazioni Digital Semiconductor sul
  formato di programmazione della SROM.

  In termini meno tecnici, ci significa che se non si  sicuri che una
  scheda sconosciuta con un chip DC2114x funzioner con i driver per
  Linux, allora ci si assicuri di porterla restituire dove la si 
  comprata prima di pagare.

  Nella maggior parte delle ultime schede EtherPower della SMC al posto
  del 21040 si pu trovare il pi aggiornato chip 21041.  Il 21140  per
  supportare il 100Base-? e funziona con i driver per Linux per il chip
  21040.  Per usare il driver de4x5 di David con una scheda non DEC, si
  deve guardare il file README.de4x5 per i dettagli.

  Donald ha usato le schede EtherPower-10/100 della SMC per sviluppare
  il driver `tulip'.  Si noti che il driver presente nel albero standard
  dei sorgenti al momento non  la versione pi aggiornata.  Se si hanno
  problemi con questo driver, ci si dovrebbe procurare la versione pi
  nuova dal sito ftp/WWW di Donald.

  Tulip Driver <http://cesdis.gsfc.nasa.gov/linux/drivers/tulip.html>

  Questo URL contiene anche un elenco (non esaustivo) delle diverse
  schede/vendor che usano il chip 21040.

  Si noti inoltre che il driver tulip al momento  ancora considerato un
  driver sperimentale (si veda la sezione ``Driver sperimentali'') e
  dovrebbe essere trattato come tale.  Per usarlo, si dovr modificare
  il file arch/i386/config.in e decommentare la riga per il supporto
  CONFIG_DEC_ELCP.

  Donald ha messo su anche una mailing list per gli annunci sul driver
  tulip, ecc.  Per unirsi alla lista si digiti:

  echo subscribe | /bin/mail linux-tulip-request@cesdis.gsfc.nasa.gov

  5.17.  Farallon

  La Farallon vende gli adattatori e i transceiver EtherWave.  Questo
  dispositivo permette di mettere in daisy chain diversi dispositivi
  10baseT.


  5.17.1.  Farallon Etherwave

  Stato: Supportato, Nome del driver: 3c509

   riportato che questo driver sia un clone del 3c509 che include il
  transceiver EtherWave.  La gente l'ha usata con successo con Linux e
  l'attuale driver 3c509.  Sono troppo costose per l'uso comune, ma sono
  una grande opzione in casi speciali.  I prezzi degli hublet partono da
  $125, e la Etherwave aggiunge $75-$100 al prezzo della scheda


  5.18.  Fujitsu


  Diversamente da molti costruttori di chip di rete, la Fujitsu ha fatto
  e venduto anche alcune schede di rete basate sui loro chip.


  5.18.1.  Fujitsu FMV-181/182/183/184

  Stato: Supportato, Nome del driver: fmv18x

  Secondo quel che afferma il driver, queste schede sono semplicemente
  un'implementazione del MB86965 della Fujitsu, il che le rende molto
  simili alle schede AT1700 della Allied Telesis.


  5.19.  Hewlett Packard


  Le schede 272** usano l'I/O programmato, similmente alle schede
  NE*000, ma la porta del trasferimento dei dati pu essere `spenta'
  quando non vi si accede, evitando problemi con i driver che fanno
  l'autorilevamento.

  Grazie a Glenn Talbott per l'aiuto fornito nel chiarire la confusione
  in questa sezione a proposito dei numeri di versione dell'hardware HP.


  5.19.1.  27245A

  Stato: Supportata, Nome del diver: hp (+8390)

  Una 10BaseT a 8 Bit basata sul 8390, non  raccomandata per tutte
  quelle ragioni delle 8 bit.  stata riprogettata un paio di anni fa
  per essere altamente integrata e ci ha causato alcune modifiche nei
  tempi di inizializzazione che affliggono solo i programmi di test, non
  i driver LAN (la nuova scheda non  `pronta' subito dopo si entra ed
  esce dalla modalit loopback).

  Se si intende usare questo driver come modulo caricabile probabilmente
  si dovrebbe vedere la sezione ``Usare i driver Ethernet come modulo''
  per informazioni specifiche sui moduli.


  5.19.2.  HP EtherTwist, PC Lan+ (27247, 27252A)

  Stato: Supportate, Nome del driver: hp+ (+8390)

  La HP PC Lan+  diversa dalla scheda HP PC Lan standard.  Questo
  driver  stato aggiunto all'elenco dei driver del kernel standard
  durante il ciclo di sviluppo del v1.1.x.  Pu essere fatta funzionare
  in modalit PIO come una ne2000, o in modalit a memoria condivisa
  come una wd8013.

  La 47B  una scheda a 16 bit 10BaseT con AUI a 16 Bit basata su 8390 e
  la 52A  una 16 bit ThinLan con AUI basata su 8390.  Queste schede
  hanno una RAM da 32K per la bufferizzazione dei pacchetti da
  trasmettere/ricevere invece dei soliti 16KB e entrambe offrono il
  rilievo automativo del connettore LAN.

  Se si intende usare questo driver come modulo caricabile probabilmente
  si dovrebbe vedere la sezione ``Usare i driver Ethernet come modulo''
  per informazioni specifiche sui moduli.


  5.19.3.  HP-J2405A

  Stato: Supportata, Nome del driver: lance

  Queste schede costano meno e sono un po' pi veloci delle
  27247/27252A, ma mancano di alcune caratteristiche quali AUI, la
  connettivit ThinLAN e il boot PROM socket.  Sono una versione del
  LANCE abbastanza generica, ma piccole diversit nel progetto le
  rendono incompatibili con il driver `NE2100' generico.  Il supporto
  speciale per queste schede (comprensivo della lettura del canale DMA
  dalla scheda)  incluso grazie alle informazioni fornite da Glenn
  Talbott dell'HP.

  Ulteriori informazioni tecniche sulle schede basate su LANCE possono
  essere trovate nella sezione ``Note su AMD...''


  5.19.4.  HP-Vectra On Board Ethernet

  Stato: Supportata, Nome del driver: lance

  L'HP-Vectra ha un chip PCnet dell'AMD sulla piastra madre.
  Informazioni sulla selezione del DMA e la numerazione del chip possono
  essere trovate nella sezione ``AMD LANCE''.

  Ulteriori informazioni tecniche sulle schede basate su LANCE possono
  essere trovate nella sezione ``Note su AMD...''


  5.19.5.  Schede HP 10/100 VG Any Lan (27248B, J2573, J2577, J2585,
  J970, J973)

  Stato: Supportate, Nome del driver: hp100

  Questo driver supporta anche alcuni dei prodotti VG della Compex.
  Poich il driver supporta schede ISA, EISA e PCI, quando si esegue
  make config sui sorgenti del kernel lo si trova nella sezione relativa
  alle schede ISA.


  5.19.6.  HP NetServer 10/100TX PCI (D5013A)

  Stato: Supportata, Nome del driver: eepro100

  Apparentemente queste sono semplicemente delle schede EtherExpress Pro
  10/100B dell'Interl rimarchiate.  Si veda la sezione su Intel per
  maggiori informazioni.


  5.20.  IBM / International Business Machines



  5.20.1.  IBM Thinkpad 300

  Stato: Supportato, Nome del driver: znet

   compatibile con la Z-note della Zenith basata su Intel.  Si veda
  ``Z-note'' per maggiori informazioni.

  Suppongo che questo sito abbia un esauriente elenco di cosette utili
  per le nuove versioni del ThinkPad.  Ancora non l'ho verificato
  personalmente.

  Thinkpad-info <http://peipa.essex.ac.uk/html/linux-thinkpad.html>

  Quelli che non possono usare un browser WWW, provino a
  peipa.essex.ac.uk:/pub/tp750/


  5.20.2.  IBM Credit Card Adaptor for Ethernet

  Stato: Semi-supportato, Nome del driver: ? (distribuito separatamente)

  Molti stanno usando questa scheda PCMCIA con Linux.  Valgono le solite
  cose, come la necessit di avere nel proprio portatile un chipset
  PCMCIA supportato e che si deve applicare una patch al kernel standard
  per il supporto PCMCIA.

  Si veda ``Supporto PCMCIA'' in questo documento e se si pu si dia
  un'occhiata a:

  Don's PCMCIA Stuff <http://cesdis.gsfc.nasa.gov/linux/pcmcia.html>



  5.20.3.  IBM Token Ring

  Stato: Semi supportata, Nome del driver: ibmtr

  Il supporto per il token ring richiede molto pi che la sola scrittura
  di un driver per i dispositivi.  Richiede anche la scrittura delle
  routine di instradamento per il token ring.   nella scrittura di
  queste ultime che si perde la maggior parte del tempo.

  Peter De Schrijver ha speso un po' di tempo sul Token Ring.  Ha
  lavorato con schede Token Ring ISA e MCA dell'IBM.

  L'attuale codice per il token ring  stato incluso all'inizio dello
  sviluppo dei kernel della serie 1.3.x.

  Peter dice che  stato originariamente testato su schede MCA 16/4
  Megabit Token Ring, ma dovrebbe funzionare con altre schede basate sul
  chip Tropic.


  5.21.  Schede Ethernet ICL



  5.21.1.  ICL EtherTeam 16i/32

  Stato: Supportata, Nome del driver: eth16i


  Questo driver l'ha scritto Mika Kuoppala (miku@pupu.elt.icl.fi) ed 
  stato introdotto verso il kernel 1.3.4x.  Usa il chip MB86965 della
  Fujitsu, usato anche nelle schede at1700.


  5.22.  Schede Ethernet Intel

  Si noti che la nomenclatura delle diverse schede Intel  ambigua e
  confusa al massimo.  Se si hanno dubbi, si veda il numero i8xxxx sul
  chip principale della scheda oppure, per le schede PCI, si usino le
  informazioni sul PCI nella directory /proc e poi si confronti con i
  numeri elencati qui.


  5.22.1.  Ether Express

  Stato: Supportata, Nome del driver: eexpress

  Questa scheda usa il i82586 dell'Intel.  Le prime versioni di questo
  driver (nei kernel v1.2) erano classificate come sperimentali e non
  funzionavano bene per la maggior parte della gente.  Quelli che
  l'hanno provato dicono che il driver nei kernel v2.0 sembra funzionare
  molto meglio, sebbene il driver sia ancora sperimentale e un po'
  problematico sulle macchine pi veloci.

  I commenti all'inizio del sorgente del driver elencano alcuni problemi
  (e correzioni!) associati con queste schede.  Il trucchetto di
  rimpiazzare nel driver tutti gli outb con outb_p si dice abbia
  funzionato per pi di un utente.


  5.22.2.  Ether Express PRO/10

  Stato: Supportata, Nome del driver: eepro

  Bao Chau Ha ha scritto un driver per queste schede incluso nei primi
  kernel v1.3.x.  Pu funzionare anche con alcuni sistemi Ethernet
  integrati della Compaq basati sul chip i82595.


  5.22.3.  Ether Express PRO/10 PCI (EISA)

  Stato: Semi supportata, Nome del driver: ? (distribuito separatamente)

  John Stalba (stalba@ultranet.com) ha scritto un driver per la versione
  PCI.  Queste schede usano il chip d'interfaccia PLX9036 PCI con un
  chip i82596 LAN controller della Intel.  Se la propria scheda ha il
  chip i82557, allora non si possiede questa scheda ma piuttosto la
  versione discussa dopo e quindi si deve usare il driver EEPro100.

  Si pu ottenere il driver sperimentale per la propria scheda PCI
  PRO/10 assieme alle instruzioni per usarlo a:

  EEPro10 Driver <http://www.ultranet.com/~stalba/eep10pci.html>

  Se si ha una scheda EISA, probabilmente si dovr lavorare un po' sul
  driver per tener conto delle differenze (PCI vs. EISA) nei meccanismi
  di rilievo usati nei due casi.



  5.22.4.  Ether Express PRO 10/100B

  Stato: Supportata, Nome del driver: eepro100


  Si noti che questo driver non funzioner con le vecchie schede 100A.
  I numeri dei chip elencati nel driver sono i82557/i82558.  Per
  aggiornamenti del driver e/o supporto sul driver, si veda

  EEPro-100B Page
  <http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html>

  Per iscriversi alla mailing list relativa a questo driver, si faccia:

  echo subscribe | /bin/mail linux-eepro100-request@cesdis.gsfc.nasa.gov

  Apparentemente Donald ha firmato un accordo di non-disclosure che dice
  che lui non pu effettivamente rivelare il codice sorgente del driver!
  Che cosa dire di questa insulsaggine da parte di Intel?



  5.23.  Kingston


  La Kingston fa diverse schede, tra cui schede basate su NE2000+, AMD
  PCnet e DEC tulip.  La maggior parte di queste schede dovrebbero
  funzionare bene con i rispetti driver.  Si veda la pagina web della
  Kingston <http://www.kingston.com>

  La KNE40 basata sul 21041 tulip della DEC si dice funzioni bene con il
  driver tulip generico.



  5.24.  LinkSys


  La LinkSys ha fatto una manciata di diversi cloni NE2000, alcuni sono
  schede ISA semplici, altre ISA plug-and-play e altri ancora sono cloni
  PCI della ne2000 basati su uno dei chip PCI ne2000 supportati.
  Semplicemente ci sono troppi modelli per elencarli tutti qui.

  Le LinkSys sono ``Linux-friendly'' e c' pure una pagina WWW specifica
  per il supporto di Linux e hanno anche la parola Linux stampata sulla
  scatola di alcuni dei loro prodotti.  Si veda:

  http://www.linksys.com/support/solution/nos/linux.htm



  5.24.1.  Schede LinkSys Etherfast 10/100.

  Stato: Supportate, Nome del driver: tulip

  Si noti che queste schede sono state sottoposte a parecchie
  `revisioni' (ovvero sono stati usati diversi chip) tutte sotto lo
  stesso nome.  La prima usava il chip della DEC.  La seconda revisione
  usava il PNIC 82c168 PCI della Lite-On e il supporto per questo era
  stato aggiunto al supporto per il driver tulip standard (dalla
  versione 0.83).  Ulteriori informazioni sul PNIC sono disponibili a:

  http://cesdis.gsfc.nasa.gov/linux/drivers/pnic.html

  Altre informazioni sulle diverse versioni di queste schede possono
  essere trovate nella pagina WWW della LinkSys menzionata in
  precendenza.




  5.24.2.  LinkSys Pocket Ethernet Adapter Plus (PEAEPP)

  Stato: Supportata, Nome del driver: de620

  Questo  un clone (o supposto tale) nel DE-620 e si dice funzioni bene
  con quel driver.  Si veda ``DE-620'' per maggiori informazioni.


  5.24.3.  LinkSys PCMCIA Adaptor

  Stato: Supportato, Nome del driver: de650 (?)

  Questa  una versione rimarchiata del DE-650.  Si veda ``DE-650'' per
  maggiori informazioni.


  5.25.  Microdyne



  5.25.1.  Microdyne Exos 205T

  Stato: Semi supportata, Nome del driver: ?

  Un'altra scheda basata sul chip i82586. Dirk Niggemann dirk-
  n@dircon.co.uk ha scritto un driver che lui classifica come ``pre-
  alpha'' e vorrebbe che la gente testasse.  Gli si scriva per maggiori
  dettagli.


  5.26.  Mylex


  La Mylex pu essere raggiunta ai seguenti numeri, nel caso qualcuno
  voglia chiedere qualcosa.


          MYLEX CORPORATION, Fremont
          Sales:  800-77-MYLEX, (510) 796-6100
          FAX:    (510) 745-8016.



  Hanno anche un sito web: Mylex WWW Site <http://www.mylex.com>


  5.26.1.  Mylex LNE390A, LNE390B

  Stato: Supportata, Nome del driver: lne390 (+8390)

  Queste sono delle schede EISA piuttosto vecchie che fanno uso di
  un'implementazione a memoria condivisa simile alla wd80x3.  Nella
  serie attuale 2.1.x del kernel  presente un driver per queste schede.
  Ci si assicuri di impostare l'indirizzo della memoria condivisa sotto
  il primo MB o oltre il pi alto indirizzo della memoria RAM
  fisicamente installata nella macchina.


  5.26.2.  Mylex LNP101

  Stato: Supportata, Nome del driver: de4x5, tulip

  Questa  una scheda PCI basata sul chip 21040 della DEC.  
  selezionabile con uscita 10BaseT, 10Base2 e 10Base5.  Si  verificato
  che la scheda LNP101 funziona con il driver 21040 generico.

  Si veda la sezione sul chip 21040 (``DEC 21040'') per maggiori
  informazioni.


  5.26.3.  Mylex LNP104

  Stato: Semi supportata, Nome del driver: de4x5, tulip

  La LNP104 usa il chip 21050 della DEC per gestire quattro porte
  10BaseT indipendenti.  Dovrebbe funzionare con i driver 21040 recenti
  che sanno come condividere gli IRQ, ma nessuno ha ancora riportato di
  averci provato (a quanto ne so).


  5.27.  Novell Ethernet, NExxxx e cloni associati


  Il prefisso `NE' viene da Novell Ethernet.  La Novell ha seguito il
  progetto pi economico del databook della National Semiconductor e
  vende i diritti di produzione Eagle, solo per immettere sul mercato
  schede Ethernet a prezzi ragionevoli (la ormai ubiqua scheda NE2000).


  5.27.1.  NE1000, NE2000

  Stato: Supportata, Nome del driver: ne (+8390)

  La ne2000  ora il nome generico del progetto base fatto attorno al
  chip 8390 della NatSemi.  Usano l'I/O programmato piuttosto che la
  memoria condivisa, il che comporta maggiore facilit di installazione
  ma prestazioni un po' pi basse e un po' di problemi.  Alcuni dei
  problemi pi comuni che capitano con le schede NE2000 sono elencati in
  ``Problemi con...''.

  Alcuni cloni della NE2000 usano il chip `AT/LANTic' 83905 della
  National Semiconductor, che offre una modalit a memoria condivisa
  simile a quella della wd8013 e la configurazione via software della
  EEPROM.  La modalit a memoria condivisa permette un minor utilizzo
  della CPU (cio  pi efficiente) rispetto alla modalit ad I/O
  programmato.

  In generale non  una buona idea mettere un clone della NE2000
  all'indirizzo I/O 0x300 perch praticamente tutti i driver di
  dispositivo cercano l al boot.  Alcuni cloni NE2000 ``poveri'' non la
  prendono bene ad essere rilevati in aree sbagliate e risponderanno
  bloccando la macchina.  Inoltre anche 0x320 non va bene perch i
  driver SCSI rilevano a 0x330.

  Donald ha scritto un progamma di diagnostica per NE2000 (ne2k.c) che
  va bene per tutte le schede ne2000.  Si veda la sezione ``Programmi
  diagnostici'' per maggiori informazioni.

  Se si intende usare questo driver con modulo caricabile probabilmente
  si dovrebbe vedere la sezione ``Usare i driver Ethernet come moduli''
  per informazioni specifiche sui moduli.


  5.27.2.  NE2000-PCI (RealTek/Winbond/Compex)

  Stato: Supportata, Nome del driver: ne, ne2k-pci (+8390)

  S, che ci si creda o no, la gente sta facendo schede PCI basate su
  progetto dell'interfaccia dell'ne2000 che ha ormai pi di 10 anni.  Al
  momento praticamente tutte queste schede sono basate sul chip 8029
  della RealTek, o sul chip 89c940 della Winbond.  Anche le schede
  Compex, KTI, VIA e Netvin apparentemente usano questi chip, ma hanno
  un diverso ID PCI.

  L'ultimo kernel v2.0 ha il supporto per rilevare automaticamente tutte
  queste schede ed usarle (se si sta usando un kernel v2.0.34 o pi
  vecchio, lo si dovrebbe aggiornare per assicurarsi che la propria
  scheda sia rilevata).  Ora ci sono due driver tra cui scegliere:
  l'originale driver ISA/PCI ne.c o quello relativamente nuovo solo PCI
  ne2k-pci.c.

  Per usare il driver ISA/PCI originale si deve rispondere `Y'
  all'opzione `Other ISA cards' quando si lancia make config perch in
  realt si sta usando lo stesso driver NE2000 che usano le schede ISA
  (la qual cosa dovrebbe suggerire che queste schede non sono cos
  intelligenti come pu essere, ad esempio, una PCNet-PCI o una DEC
  21040...).

  Il nuovo driver solo PCI differisce dal driver ISA/PCI nel fatto che
  tutto il supporto per le vecchie schede a 8 bit NE1000  stato rimosso
  e che i dati sono spostati da e nella scheda in blocchi pi grandi,
  senza alcuna pausa tra un'operazione e l'altra che le vecchie NE2000
  ISA richiedono per operare in maniera affidabile.  Il risultato  un
  driver pi efficiente, ma non ci si ecciti troppo in quanto le
  differenze non saranno cos ovvie nel funzionamento normale (se si
  vuole veramente la massima efficenza assieme ad un basso utilizzo
  della CPU, allora una NE2000 PCI  semplicemente una scelta povera).
  Aggiornamenti del driver e ulteriori informazioni possono essere
  trovate a:

  http://cesdis.gsfc.nasa.gov/linux/drivers/ne2k-pci.html

  Se si possiede una scheda PCI NE2000 che non  rilevata dalla versione
  pi recente del driver, si contatti il manutentore del driver NE2000
  citato nel file /usr/src/linux/MAINTAINERS e gli si spedisca l'output
  di cat /proc/pci e dmesg dimodoch possa aggiungere il supporto per la
  scheda.

  Si noti inoltre che diversi prodottori di schede sono noti per
  attaccare l'etichetta `NE2000 Compatible' sulle scatole dei loro
  prodotti anche se sono completamente differenti (e.g. PCNet-PCI o
  RealTek 8139).  Se si  in dubbio si controlli il numero del chip
  principale con quelli in questo documento.


  5.27.3.  NE-10/100

  Stato: Non supportata.

  Queste sono delle schede ISA a 100Mbps basate sui chip DP83800 e
  DP83840 della National Semiconductor.  Attualmente non c' alcun
  driver che le supporta n nessuno ha ancora detto che sta lavorando su
  un driver.  Apparentemente non  disponibile la documentazione sul
  chip ad eccezione di un file PDF che non fornisce abbastanza dettagli
  per scrivere un driver.


  5.27.4.  NE1500, NE2100

  Stato: Supportate, Nome del driver: lance

  Queste schede usano il chip LANCE 7990 originale dell'AMD e sono
  supportate usando il driver lance di Linux.  I cloni NE2100 pi nuovi
  usano il chip aggiornato PCnet-ISA dell'AMD.

  Alcune delle prime versioni del driver lance avevano problemi con la
  determinazione della linea IRQ attraverso l'autoIRQ     delle schede
  Novell/Eagle 7990.  Teoricamente questa cosa ora  stata corretta.  Se
  non lo fosse, allora si specifichi l'IRQ usando LILO e si renda noto
  che questo  ancora un problema.

  Informazioni sulla selezione del DMA e la numerazione del chip possono
  essere trovate nella sezione ``AMD LANCE''.

  Ulteriori informazioni tecniche sulle schede basate su LANCE si
  trovano nella sezione ``Note su AMD...''


  5.27.5.  NE/2 MCA

  Stato: Semi supportata, Nome del driver: ne2

  C'erano anche un po' di schede NE2000 microchannel fatte da diverse
  compagnie.  Questo driver, disponibile nei kernel v2.2, rilever le
  seguenti schede MCS: Novell Ethernet Adapter NE/2, Compex ENET-16 MC/P
  e Arco Ethernet Adapter AE/2.


  5.27.6.  NE3200

  Stato: Non supportata

  Questa vecchia scheda EISA usa un 80186 a 8Mhz assieme con un i82586.
  Nessuno sta lavorando su un driver in quanto non ci sono n
  informazioni disponibili sulla scheda n una reale richiesta per un
  driver.


  5.27.7.  NE3210

  Stato: Supportata, Nome del driver: ne3210 (+8390)

  Questa scheda EISA  completamente diversa dalla NE3200, poich usa un
  chip 8390 della Nat Semi.  Il driver pu essere trovato nell'albero
  dei sorgenti del kernel v2.2.  Ci si assicuri si impostare l'indirizzo
  della memoria condivisa sotto il primo MB o superiore all'indirizzo
  pi alto della RAM fisica installata nella macchina.


  5.27.8.  NE5500

  Stato: Supportata, Nome del driver: pcnet32

  Queste sono semplicemente delle schede con il chip PCnet-PCI ('970A)
  dell'AMD.  Maggiori informazioni sulle schede basate su LANCE/PCnet
  possono essere trovate nella sezione ``AMD LANCE''.



  5.28.  Proteon



  5.28.1.  Proteon P1370-EA

  Stato: Supportata, Nome del driver: ne (+8390)

  Apparentemente questa  un clone NE2000 e funziona bene con Linux.


  5.28.2.  Proteon P1670-EA

  Stato: Supportata, Nome del driver: de4x5, tulip

  Questa  un'altra scheda PCI basata sul chip Tulip della DEC.  Si dice
  funzioni bene con Linux.

  Si veda la sezione sul chip 21040 (``DEC 21040'') per maggiori
  informazioni sul driver.



  5.29.  Pure Data



  5.29.1.  PDUC8028, PDI8023

  Stato: Supportata, Nome del driver: wd (+8390)

  Le serie di schede PDUC8028 e PDI8023 della Pure Data si dice
  funzionino, grazie a uno speciale codice di rilevamento fornito da
  Mike Jagdis jaggy@purplet.demon.co.uk.  Il supporto  integrato con il
  driver WD.


  5.30.  Racal-Interlan


  La Racal Interlan pu essere raggiunta via WWW a www.interlan.com.
  Credo che in passato fosse conosciuta anche come MiCom-Interlan.


  5.30.1.  ES3210

  Stato: Semi supportata, Nome del driver: es3210

  Questa  una scheda EISA a memoria condivisa basata su 8390.  Con il
  kernel v2.2  distribuito un driver sperimentale e si dice funzioni
  bene, ma il rilevamento EISA dell'IRQ e dell'indirizzo della memoria
  condivisa non senbra funzionare bene con (almeno) le prime revisioni
  della scheda (comunque questo problema non  ristretto al solo mondo
  Linux...).  In quel caso, si devono fornire tali informazioni al
  driver.  Per esempio, per una scheda all'IRQ 5 e memoria condivisa a
  0xd0000 che usa un driver modulare, si aggiuga options es3210 irq=5
  mem=0xd0000 a /etc/conf.modules.  Oppure con il driver compilato nel
  kernel, all'avvio si passi ether=5,0,0xd0000,eth0.  L'I/O base 
  rilevato automaticamente e quindi dovrebbe essere usato il valore 0.


  5.30.2.  NI5010

  Stato: Semi supportata, Nome del driver: ni5010

  Solitamente ci si doveva procurare separatamente il driver per queste
  vecchie schede a 8 bit della MiCom-Interlan, ma ora  distribuito con
  i kernel v2.2 come driver sperimentale.


  5.30.3.  NI5210

  Stato: Semi supportata, Nome del driver: ni52

  Anche questa scheda usa uno dei chip dell'Intel.  Michael Hipp ha
  scritto un driver e ora  incluso nel kernel standard come driver
  `alpha'.  Michael vorrebbe sentire dei commenti dagli utenti che
  posseggono questa scheda.  Si veda ``Driver sperimentali'' per
  conoscere importanti informazioni sull'uso dei driver Ethernet
  sperimentali.

  5.30.4.  NI6510 (non EB)

  Stato: Semi supportata, Nome del driver: ni65

  C' anche un driver per la NI6510 basata su LANCE ed  sempre stato
  scritto da Michael Hipp.  Anche questo  un driver sperimentale.  Per
  qualche ragione questa scheda non  compatibile con il driver LANCE
  generico.  Si veda ``Driver sperimentali'' per conoscere importanti
  informazioni sull'uso dei driver Ethernet sperimentali.


  5.30.5.  EtherBlaster (aka NI6510EB)

  Stato: Supportata, Nome del driver: lance

  Dal kernel 1.2.23, al driver LANCE generico  stato aggiunto un
  controllo per la firma 0x52, 0x44 specifica della NI6510EB.  Comunque
  alcuni hanno riportato che questa firma non  la stessa per tutte le
  schede NI6510EB, il che fa s che il driver LANCE non rilevi la
  scheda.  Se questo succede, si pu cambiare il controllo (verso la
  riga 322 in lance.c) a printk() cosicch stampi i valori per la
  propria scheda e poi usarli come default invece di 0x52, 0x44.

  Usando il driver lance, probabilmente le schede dovrebbero essere
  usate in modalit ad `alte prestazioni' e non in compatibilit NI6510.


  5.31.  RealTek



  5.31.1.  Adattatore pocket RealTek RTL8002/8012 (AT-Lan-Tec)

  Stato: Supportato, Nome del driver: atp

  Questo  un adattatore pocket generico e a basso costo, venduto dalla
  AT-Lan-Tec e (probabilmente) da molti altri fornitori.  Nel kernel
  standard  presente un driver.  Si noti che le informazioni pi
  importanti sono contenute nel file sorgente del driver `atp.c'.

  Si noti che nelle prime versioni di questo driver il nome di device da
  passare a ifconfig non era eth0 bens atp0.


  5.31.2.  RealTek 8009

  Stato: Supportata, Nome del driver: ne (+8390)

  Questa  un clone ISA della NE2000 e si dice funzioni bene con il
  driver NE2000 di Linux.  Dal sito WWW della RealTek
  (http://www.realtek.com.tw) o via FTP dallo stesso sito pu essere
  scaricato il programma rset8009.exe.


  5.31.3.  RealTek 8019

  Stato: Supportata, Nome del driver: ne (+8390)

  Questa  la versione Plug and Pray della scheda precedente.  Si usi il
  software per DOS per disabilitare il Pnp ed abilitare la
  configurazione senza ponticelli; si configuri la scheda ad un
  indirizzo I/O ed a un'IRQ ragionevoli e si dovrebbe essere pronti per
  partire (se si usa il driver come modulo, non si dimentichi di
  aggiungere l'opzione io=0xNNN a /etc/conf.modules).  Dal sito WWW
  della RealTek (http://www.realtek.com.tw) o via FTP dallo stesso sito
  pu essere scaricato il programma rset8009.exe.
  5.31.4.  RealTek 8029

  Stato: Supportata, Nome del driver: ne, ne2k-pci (+8390)

  Questa  una impletazione PCI a singolo chip di un clone NE2000.
  Diversi vendor adesso vendono schede con questo chip.  Si veda la
  sezione ``NE2000-PCI'' per informazioni sull'uso di una qualsiasi di
  queste schede.  Si noti che questo  un progetto di pi di 10 anni fa
  semplicemente adattato al bus PCI.  Le prestazioni non saranno molto
  migliori rispetto a quelle dell'eqivalente modello ISA.


  5.31.5.  RealTek 8129/8139

  Stato: Semi-supportate, Nome del driver: rtl8139

  Una soluzione Ethernet PCI a chip singolo della RealTeak.  Un driver
  per le schede basate su questo chip  stato incluso nella release
  v2.0.34 di Linux.  Al momento nei kernel v2.2 se si vuole avere
  accesso a questo driver si deve rispondere `Y' quando viene chiesto se
  si vogliono i driver sperimentali.  Per maggiori informazioni si veda:

  http://cesdis.gsfc.nasa.gov/linux/drivers/rtl8139.html



  5.32.  Sager



  5.32.1.  Sager NP943

  Stato: Semi supportata, Nome del driver: 3c501

  Questa  semplicemente un clone della 3c501, con un diverso prefisso
  S.A. nella PROM.  Suppongo che sia talmente demente quanto la 3c501
  originale.  Il driver cerca l'ID della NP943 e poi la tratta
  semplimente come un 3c501.  Si veda la sezione ``3Com 3c501'' per
  tutte le ragioni per le quali veramente non si deve usare una di
  queste schede.


  5.33.  Schneider & Koch



  5.33.1.  SK G16

  Stato: Supportata, Nome del driver: sk_g16

  Questo driver  stato incluso nei kernel v1.1 ed  stato scritto da
  PJD Weichmann e SWS Bern.  Sembra che la SK G16 sia simile alla
  NI6510, per il fatto che  basata sulla prima edizione del chip LANCE.
  Ancora una volta, sembra che pure questa scheda non funzioni con il
  driver LANCE generico.


  5.34.  SEEQ



  5.34.1.  SEEQ 8005

  Stato: Supportata, Nome del driver: seeq8005


  Questo driver  stato incluso nei primi kernel v1.3 ed  stato scritto
  da Hamish Coleman.  Nel driver sono incluse pochissime informazioni
  sulla scheda e quindi ci sono pure poche informazioni da mettere qui.
  Se si hanno domande, probabilmente la cosa migliore  di scrivere a
  hamish@zot.apana.org.au.


  5.35.  SMC (Standard Microsystems Corp.)


  La divisione Ethernet della Western Digital  stata acquisita dalla
  SMC molti anni fa, quando la wd8003 e wd8013 erano i prodotti di
  punta.  Da allora la SMC ha continuato a fare schede ISA basate
  sull'8390 (Elite16, Ultra, EtherEZ) e ha aggiunto alla gamma anche
  diversi prodotti PCI.

  Informazioni per contattare la SMC:

  SMC / Standard Microsystems Corp., 80 Arkay Drive, Hauppage, New York,
  11788, USA.  Supporto tecnico telefonico: 800-992-4762 (USA) o
  800-433-5345 (Canada) o 516-435-6250 (Altri nazioni).  Richieste di
  documentazione: 800-SMC-4-YOU (USA) o 800-833-4-SMC (Canada) o
  516-435-6255  (Altre nazioni).  Supporto tecnico via E-mail:
  techsupt@ccmail.west.smc.com. Sito FTP: ftp.smc.com.  Sito WWW: SMC
  <http://www.smc.com>.


  5.35.1.  WD8003, SMC Elite

  Stato: Supportate, Nome del driver: wd (+8390)

  Queste sono le versioni ad 8 bit della scheda.  Il chip 8003 a 8 bit 
  leggermente meno costoso, ma vale solo se destinato ad un uso leggero.
  Si noti che alcune schede senza EEPROM (cloni con i ponticelli o
  schede we8003 veramente vecchie) non hanno modo di riportare la linea
  IRQ utilizzata.  In questo caso,  usato auto-irq e se fallisce, il
  driver assegna l'IRQ 5 senza dire niente.  Dal sito FTP della SMC si
  possono scaricare i dischetti di configurazione/driver.  Si noti che
  alcune delle versioni pi recenti del rpogramma `SuperDisk' della SMC
  falliranno nel rilevare le veramente vecchie schede senza EEPROM.  Il
  file SMCDSK46.EXE sembra essere una buona scelta a tutto tondo.
  Inoltre le impostazioni dei ponticelli per tutte le loro schede si
  possono trovare in un file testo ASCII nel summenzionato archivo.
  L'ultima (migliore?) versione pu essere ottenuta da ftp.smc.com.

  Poich questo sono in pratica analoghe alle loro controparti a 16 bit
  (WD8013 / SMC Elite16), si dovrebbe vedere la sezione successiva per
  maggiori informazioni.



  5.35.2.  WD8013, SMC Elite16

  Stato: Supportate, Nome del driver: wd (+8390)

  Negli anni sono stati aggiunti al progetto altri registri e una EEPROM
  (le prime schede wd8003 sono apparse circa 10 anni fa!).  I cloni
  solitamente vanno sotto il nome `8013' e tipicamente usano un progetto
  senza EEPROM (con i ponticelli).  Gli ultimi modelli delle schede SMC
  montano un chip 83c690 della SMC invece dell'originale DP8390 della
  National presente nelle prime schede.  Il progetto a memoria condivisa
  rende queste schede un po' pi veloci delle schede PIO, specialmente
  con pacchetti pi grossi.  Pi importante, dal punto del vista del
  driver, si evitano cos un po' di bachi nella modalit ad I/O
  programmato dell'8390, permettendo accessi multi-thread sicuri al
  buffer dei pacchetti e non si ha il registro dati dell'I/O programmato
  che pianta la macchina durante il controllo al boot.

  Le schede non EEPROM che non possono leggere l'IRQ selezionato
  proveranno a fare l'auto-irq e se falliscono assegneranno
  silenziosamente l'IRQ 10 (le versioni a 8 bit assegnano l'IRQ 5).

  Le schede con a bordo dimensioni di memoria non standard la possono
  specificare all'avvio (o come opzione in /etc/conf.modules se si usano
  i moduli).  La dimensione standard della memoria  di 8kB per le
  schede a 8 bit e 16kB per quelle a 16 bit.  Per esempio, le schede pi
  vecchie WD8003EBT potevano essere impostate attraverso i ponticelli
  per 32kB di memoria.  Per usare appieno questa RAM, si dovrebbe usare
  qualcosa di simile a (con I/O=0x280 e IRQ 9):

  ______________________________________________________________________
          LILO: linux ether=9,0x280,0xd0000,0xd8000,eth0
  ______________________________________________________________________



  Si veda anche ``Problemi dell'8013'' per alcuni dei problemi pi
  comuni e le risposte alle domande pi frequenti.

  Se si intende usare questo driver come modulo caricabile probabilmente
  si dovrebbe vedere la sezione ``Usare i driver Ethernet come modulo''
  per informazioni specifiche sui moduli.


  5.35.3.  SMC Elite Ultra

  Stato: Supportata, Nome del driver: smc-ultra (+8390)

  Questa scheda Ethernet  basata sul chip 83c790 della SMC che ha un
  po' di nuove caratteristiche rispetto al 83c690.  Sebbene possieda una
  modalit simile alle schede SMC pi vecchie, non  completamente
  compatibile con i vecchi driver WD80*3-  Comunque in questa modalit
  condivide la maggior parte del codice con gli altri driver 8390 anche
  se funziona leggermente pi veloce rispetto ad un clone WD8013.

  Poich parte della Ultra sembra una 8013, il controllo per la Ultra si
  suppone trovi una Ultra prima che il controllo per la wd8013 abbia la
  possibilit di indentificarla in maniera errata.

  Donald ha riferito che  possibile scrivere un driver separato per la
  modalit `Altego' della Ultra che permette di concatenare la
  trasmissione al costo di un uso inefficiente dei buffer di ricezione,
  ma probabilmente ci non avverr.

  Gli utilizzatori di adattatori host SCSI bus master prendano nota: Nel
  manuale distribuito con Interactive UNIX,  riportato che un bug nella
  SMC Ultra causer corruzione dei dati con dischi SCSI utilizzati
  attraverso un adattatore host aha-154X. Questa cosa affligge
  probabilmente anche le schede aha-154X compatibili, come le schede
  BusLogic e gli adattatori host AMI-Fastdisk SCSI.

  La SMC ha riconosciuto che il problema si presenta con Interactive e
  con vecchie versioni dei driver per Windows NT.   un conflitto
  hardware con le prime versioni della scheda che pu essere aggirato
  nel progetto del driver.  Il driver Ultra attuale protegge da questo
  abilitando la memoria condivisa solo durante il trasferimento con la
  scheda.  Ci si assicuri che la propria versione del kernel sia almeno
  1.1.84 e che la versione riportata dal driver al boot sia almeno smc-
  ultra.c:v1.12, altrimenti si  vulnerabili.

  Se si intende usare questo driver come modulo caricabile probabilmente
  si dovrebbe vedere la sezione ``Usare i driver Ethernet come modulo''
  per informazioni specifiche sui moduli.


  5.35.4.  SMC Elite Ultra32 EISA

  Stato: Supportata, Nome del driver: smc-ultra32 (+8390)

  Questa scheda EISA ha molto in comune con la sua controparte ISA.  Un
  driver funzionante (e stabile)  incluso sia nei kernel v2.0 che
  v.2.2.  Grazie a Leonard Zubkoff per aver acquistato alcune di queste
  schede dimodoch sia stato possibile aggiungerne il supporto per
  Linux.


  5.35.5.  SMC EtherEZ (8416)

  Stato: Supportata, Nome del driver: smc-ultra (+8390)

  Questa scheda usa il chip 83c795 della SMC e supporta le specifiche
  Plug 'n Play.  Ha anche una modalit SMC Ultra compatibile, che le
  permette di essere usata con il driver Ultra per Linux. Per migliori
  risultati si usi il programma fornito dalla SMC (disponibile nel loro
  sito www/ftp) per disabilitare il PnP e configurarla per la modalit a
  memoria condivisa.  Si vedano le informazioni precedenti per alcune
  note sul driver Ultra.

  Per i kernel v1.2, la scheda ha dovuto essere configurata per l'uso a
  memoria condivisa.  Comunque i kernel v2.0 possono usare la scheda in
  modalit a memoria condivisa o I/O programmato.  La modalit a memoria
  condivisa  leggermente pi veloce e usa anche meno risorse di CPU.


  5.35.6.  SMC EtherPower PCI (8432)

  Stato: Supportata, Nome del driver: de4x5, tulip

  NB: La EtherPower II  una scheda completamente diversa. Si veda
  sotto!  Queste schede sono un'implementazione base del 21040 della
  DEC, cio un unico grosso chip e una coppia di transceiver.  Donald ha
  usato una di queste schede per lo sviluppo del driver 21040 generico
  (meglio noto come tulip.c).  Grazie a Duke Kamstra, ancora una volta,
  per aver fornito una scheda sulla quale fare lo sviluppo.

  Alcune delle ultime revisioni di questa scheda usano il pi recente
  chip 21041 della DEC, che pu causare problemi con versioni pi
  vecchie del driver tulip. Se si hanno problemi ci si assicuri di usare
  l'ultima versione del driver, che potrebbe non essere ancora stata
  inclusa nell'attuale albero dei sorgenti del kernel.

  Si veda ``DEC 21040'' per ulteriori dettagli sull'uso di una di queste
  schede e sullo stato attuale del driver.

  Apparentemente, l'ultima revisione delle scheda, la EtherPower-II usa
  il chip 9432.  Al momento non  chiaro se questa funzioner con il
  driver attuale.  Come sempre, se non si  sicuri, si verifichi di
  poter restituire la scheda se non funziona con il driver per Linux
  prima di pagarla.


  5.35.7.  SMC EtherPower II PCI (9432)

  Stato: Semi supportata, Nome del driver: epic100

  Queste schede, basate sul chip 83c170 della SMC, sono completamente
  differenti da quelle basate sul TULIP.  Un nuovo driver  stato
  incluso nei kernel v2.0 e v2.2 per supportare queste schede.  Per
  ulteriori dettagli si veda:

  http://cesdis.gsfc.nasa.gov/linux/drivers/epic100.html



  5.35.8.  SMC 3008

  Stato: Non supportata.

  Queste schede a 8 bit sono basate sul Fujitsu MB86950, che  un'antica
  versione del MB86965 usato dal driver at1700 per Linux.  Russ dice che
  probabilmente si pu metter su un driver guardando il codice at1700.c
  e il suo packet driver DOS per la scheda Tiara (tiara.asm). Non sono
  molto comuni.


  5.35.9.  SMC 3016

  Stato: Non Supportata.

  Queste sono scheda 8390 a 16 bit ad I/O mappato, molto simili ad una
  generica scheda NE2000.  Se si riescono ad ottenere le specifiche
  dalla SMC, allora il porting del driver NE2000 probabilmente sar
  abbastanza facile.  Non sono molto comuni.


  5.35.10.  SMC-9000 / SMC 91c92/4

  Stato: Supportata, Nome del driver: smc9194

  La SMC9000  una scheda VLB basata sul chip 91c92.  Il 91c92 sembra
  essere presente anche su un po' di schede di altre marche, ma 
  abbastanza poco comune.  Erik Stahlman (erik@vt.edu) ha scritto questo
  driver presente nei kernel v2.0, ma non nei pi vecchi kernel v1.2.
  Si dovrebbe essere in grado di mettere il driver nell'albero dei
  sorgenti v1.2 con poche difficolt.


  5.35.11.  SMC 91c100

  Stato: Semi supportata, Nome del driver: smc9194

  Si pensa che il driver SMC 91c92 funzioni per le schede basate su
  questo chip 100Base-T, ma al momento la cosa non  stata verificata.


  5.36.  Texas Instruments



  5.36.1.  ThunderLAN

  Stato: Supportata, Nome del driver: tlan

  Questo driver gestisce i molti dispositivi Ethernet built-in della
  Compaq, compresi i gruppi NetFlex e Netelligent.  Supporta anche i
  prodotti Olicom 2183, 2185, 2325 e 2326.


  5.37.  Thomas Conrad





  5.37.1.  Thomas Conrad TC-5048


  Questa  un'altra scheda PCI basata sul chip 21040 della DEC.

  Si veda la sezione sul chip 21040 (``DEC 21040'') per maggiori
  informazioni.


  5.38.  VIA


  Probabilmente non si vedr mai una scheda di rete VIA, in quanto la
  VIA costruisce diversi chip usati da altri per costruire le loro
  schede Ethernet.  Hanno un sito WWW a:

  http://www.via.com.tw/


  5.38.1.  VIA 86C926 Amazon

  Stato: Supportato, Nome del driver: ne, ne2k-pci (+8390)

  Questo chip  quanto offre la VIA come PCI-NE2000.  Si pu scegliere
  tra il driver ne.c per ISA e PCI o il driver solo per PCI ne2k-pci.c.
  Si veda la sezione sul PCI-NE2000 per ulteriori informazioni.


  5.38.2.  VIA 86C100A Rhine II (and 3043 Rhine I)

  Stato: supportato, Nome del driver: via-rhine

  Questo driver relativamente nuovo pu essere trovato negli attuali
  kernel 2.0 e 2.1.   un miglioramento rispetto al chip NE2000 86C926
  nel fatto che supporta i trasferimenti bus master, ma gli stretti
  requisiti sull'allineamento al bit 32 del buffer limitano i benefici
  guadagnati da ci.  Per maggiori dettagli e driver aggiornati si veda:

  http://cesdis.gsfc.nasa.gov/linux/drivers/via-rhine.html



  5.39.  Western Digital


  Si veda la sezione ``SMC'' per informazioni sulle schede SMC (la SMC
  ha comprato la divisione delle schede di rete della Western Digital
  molti anni fa).


  5.40.  Winbond


  La Winbond in realt non costruisce e vende schede complete al
  pubblico, piuttosto costruisce soluzioni Ethernet su un unico chip che
  altre compagnie comprano e mettono nelle loro schede PCI con il loro
  nome che poi vendono nei negozi.


  5.40.1.  Winbond 89c840

  Stato: Semi supportato, Nome del driver: winbond-840

  Questo driver attualmente non  distribuito con il kernel, poich  in
  fase di test.   disponibile a:

  http://cesdis.gsfc.nasa.gov/linux/drivers/test/winbond-840.c


  5.40.2.  Winbond 89c940

  Stato: Supportato, Nome del driver: ne, ne2k-pci (+8390)

  Questo chip  uno dei due pi comunemente presenti sulle schede ne2000
  PCI a basso costo vendute da un sacco di costruttori.  Si noti che
  questo  sempre un progetto vecchio di dieci anni adattato ad un bus
  PCI.  Le prestazioni non saranno tanto migliori rispetto a quelle
  dell'equivalente modello ISA.


  5.41.  Xircom


  Per lungo tempo, la Xircom non ha voluto rilasciare la informazioni di
  programmazione necessarie per scrivere un driver, a meno che non si
  firmasse per averle.  Apparentemente abbastanza utenti Linux li hanno
  subbissati di richieste di supporto per il driver (affermano di
  supportate tutti i pi popolari sistemi operativi di rete...) e quindi
  hanno cambiato la loro politica e hanno permesso il rilascio di
  documentazione senza dover firmare un accordo di non rivelazione.  Ad
  alcuni hanno detto che avrebbero rilasciato il codice sorgente del
  driver SCO, mentre ad altri hanno detto che non forniscono pi
  informazioni su prodotti `obsoleti' come i primi modelli PE.  Se si 
  interessati e si vogliono verificare da s queste cose, si pu
  contattare la Xircom al 1-800-874-7875, 1-800-438-4526 o
  +1-818-878-7600.


  5.41.1.  Xircom PE1, PE2, PE3-10B*

  Stato: Non supportate.

  Non per dare tante speranze, ma se si ha uno di questi adattatori per
  porta parallela, si pu riuscire ad usarlo nell'emulatore DOS con i
  driver per DOS forniti dalla Xircom.  Si deve permettere a DOSEMU di
  accedere alla propria porta parallela e probabilmente si dovr giocare
  un po' con SIG (Silly Interrupt Generator di DOSEMU).


  5.41.2.  Schede PCMCIA Xircom

  Stato: Semi-supportate, Nome del driver: ????

  Per alcune delle schede PCMCIA della Xircom esistono dei driver
  disponibili nel pacchetto PCMCIA di David Hinds.  Si veda in questo
  per informazioni pi aggiornate.


  5.42.  Zenith



  5.42.1.  Z-Note

  Stato: Supportata, Nome del driver: znet

  L'adattatore di rete built-in Z-Note  basato su un i82593 dell'Intel
  ed usa due canali DMA.  Esiste un driver (sperimentale?)  nell'attuale
  versione del kernel.   Come tutti gli adattatori pocket e per
  notebook, quando si esegue make config lo si trova nella sezione
  `Pocket and portable adaptors'.  Si noti che il ThinkPad 300 dell'IBM
   compatibile con Z-Note.
  5.43.  Znyx



  5.43.1.  Znyx ZX342 (DEC 21040 based)

  Stato: Supportata, Nome del driver: de4x5, tulip

  Si ha la scelta fra due driver per le schede basate su questo chip.
  C' un driver DE425 scritto da David e il driver generico per 21040
  che ha scritto Donanld.

  Si noti che dal 1.1.91, David ha aggiunto una opzione di compilazione
  che pu permettere alle schede non DEC (come quella della Znyx) di
  funzionare con il suo driver.  Si veda il file README.de4x5 per i
  dettagli.

  Si veda la sezione ``DEC 21040'' per maggiori informazioni su queste
  schede e la situazione attuale del driver.


  5.44.  Identificare una scheda sconosciuta


  Bene, e cos l'amico del vicino del cugino di vostro zio ha un
  fratello che ha trovato una vecchia scheda Ethernet ISA in un case AT
  che usava come gabbia per criceti di suo figlio.  In qualche modo
  questa scheda vi  capitata tra le mani e la volete  usare con Linux,
  ma nessuno ha idea di che scheda sia e non c' alcuna documentazione.

  Per prima cosa, si cerchi un qualsiasi numero del modello che potrebbe
  essere un indizio.  Qualsisi numero di modello che contiene 2000
  potrebbe essere un clone della NE2000.  Qualsiasi scheda con 8003 o
  8013 da qualche parte sar una scheda Western/Digital WD80x3 o una SMC
  Elite o un clone di una di esse.


  5.44.1.  Identificare il Network Interface Controller

  Si cerchi il chip pi grosso nella scheda. Sar il network controller
  (NIC) e la maggior parte pu essere identificata dal numero.  Se si sa
  quale NIC c' sulla scheda, quanto segue pu aiutare ad scoprire che
  scheda .

  Probabilmente il NIC ancora pi comune  il DP8390 della National
  Semiconductor, noto anche come NS32490, DP83901, DP83902, DP83905 e/o
  DP83907.  E questi sono solo quelli fatti dalla National! Altre
  compagnie, come la Winbond e la UMC, costruiscono cloni del DP8390 e
  del DP83905, come il Winbond 89c904 (clone del DP83905) e l'UMC 9090.
  Se la scheda ha su una qualche forma di 8390, allora  possibile che
  sia un clone della ne1000 o della ne2000.  Le seconde schede pi
  comuni basate su 8390 sono le schede wd80x3 e cloni.  Le schede con un
  DP83905 possono essere configurate come una ne2000 o come una wd8013.
  Le versioni pi nuove delle schede wd80x3 genuine e delle SMC Elite
  hanno un 83c690 al posto del DP8390 originale.  Le schede SMC Ultra
  hanno un 83c790 ed usano un driver leggermente diverso dalle schede
  wd80x3.  Le schede SMC EtherEZ hanno un 83c795 ed usano lo stesso
  driver della SMC Ulta.  Tutte le schede con BNC basate su una qualche
  versione di 8390 o di un suo clone solitamente avranno un chip DIP a
  16 pin 8392 (o un 83c692, o un ???392) molto vicino al connettore BNC.

  Un altro NIC comune presente sulle schede pi vecchie  l'Intel
  i82586.  Le schede che hanno questo NIC includono le 3c505, 3c507,
  3c523, Intel EtherExpress-ISA, Microdyne Exos-205T e la Racal-Interlan
  NI5210.

  Il NIC LANCE originale dell'AMD era numerato AM7990 e le revisioni pi
  nuove includono i 79c960, 79c961, 79c965, 79c970 e 79c974.  La maggior
  parte delle schede con uno di questi funzioner con il driver LANCE di
  Linux, ad eccezione delle vecchie schede Racal-Interlan NI6510 che
  hanno il loro driver apposito.

  Le schede PCI pi nuove che hanno un DEC 21040, 21041, 21140 o un
  numero simile sul NIC dovrebbero essere in grado di usare il driver
  tulip o il de4x5.

  Altre schede PCI che hanno un grosso chip marchiato RTL8029 o 89C940 o
  86C926 sono cloni ne2000 e il driver nelle versioni di Linux 2.0 e
  superiori dovrebbe automaticamente rilevarle al boot.


  5.44.2.  Identificare l'indirizzo Ethernet

  Ogni scheda Ethernet ha il suo indirizzo personale ed unico a sei
  byte.  I primi tre byte di quell'indirizzo sono gli stessi per ogni
  scheda fatta da un particolare costruttore.  Per esempio tutte le
  schede SMC partono con 00:00:c0.  Gli ultimi tre sono assegnati dal
  costruttore univocamente ad ogni scheda che produce.

  Se la propria scheda ha un etichetta che d tutti i 6 byte del suo
  indirizzo si pu risalire al costruttore dai primi tre.  Comunque 
  pi comune vedere solo gli ultimi tre byte stampati su un'etichetta
  attaccata alla PROM che non dir niente.

  Si pu determinare a quale rivenditore  stato assegnato un
  determinato indirizzo dall'RFC 1340.  Apparentemente in giro ci sono
  anche elenchi pi aggiornati.  Si provi a fare una ricerca WWW o FTP
  di EtherNet-codes o Ethernet-codes e qualcosa si trover.


  5.44.3.  Suggerimenti per provare ad usare una scheda sconosciuta


  Se non si  ancora sicuri di che scheda sia ma si  un po' ristretta
  la cerchia delle possibilit, allora si pu compilare un kernel con
  una serie di driver al suo interno e vedere se uno di essi rileva
  automaticamente la scheda al boot.

  Se il kernel non rileva la scheda, potrebbe essere che la scheda non 
  configurata ad uno degli indirizzi che i driver controllano quando
  cercano una scheda.  Se questo  il caso, si pu provare a scaricare
  scanport.tar.gz da un sito ftp di Linux e vedere se pu scoprire a che
  indirizzo  configurata.  Scansiona lo spazio I/O ISA da 0x100 a 0x3ff
  cercando dispositivi che non sono registrati in /proc/ioports.  Se
  trova un dispositivo sconosciuto ad un qualche indirizzo particolare,
  si pu esplicitamente indirizzare il controllo a quell'indirizzo con
  un comando ether= al boot.

  Se si  riusciti a far rilevare la scheda, allora solitamente si pu
  scoprire cosa fanno i ponticelli combiandone uno alla volta e vedendo
  a quale I/O base e IRQ la scheda viene poi rilevata.  Le impostazioni
  dell'IRQ possono essere determinate anche seguendo le tracce sul retro
  della scheda da dove sono saldati i ponticelli.  Contando i contatti
  dorati nel retro della scheda partendo dalla parte della scheda con la
  linghetta di metallo si troveranno gli IRQ 9, 7, 6, 5, 4, 3, 10, 11,
  12, 15, 14 rispettivamente nei contatti 4, 21, 22, 23, 24, 25, 34, 35,
  36, 37, 38.  Le schede a 8 bit hanno solo fino al contatto 31.

  I ponticelli che sembra non facciano niente solitamente servono per
  selezionare l'indirizzo di memoria della ROM di boot opzionale.  Altri
  ponticelli posizionati nei pressi dei connettorei BNC o RJ-45 o AUI
  solitamente servono per selezionare il mezzo d'uscita.  Tipicamente
  questi sono anche vicino allo `scatolotto nero' del convertitore di
  tensione marchiato YCL, Valor o Fil-Mag.

  Un bella collezione di impostazioni di ponticelli per diverse schede
  pu essere trovata a:

  Ethercard Settings <http://www.slug.org.au/NIC/>



  5.45.  Driver per i dispositivi non Ethernet


  Ci sono alcuni altri driver nei sorgenti di Linux che si presentano ai
  programmi di rete come dispositivi simil-Ethernet, anche se non sono
  veramente Ethernet.  Per completezza sono qui brevemente elencati.

  dummy.c -- Lo scopo di questo driver  di fornire un dispositivo al
  quale far puntare un instradamento, ma che non trasmette realmente
  pacchetti.

  eql.c -- Load Equalizer (Equalizzatore di carico), schiavizza pi
  dispositivi (solitamente modem) e bilancia il carico di trasmissione
  tra essi presentandoli come un unico dispositivo ai programmi di rete.

  ibmtr.c -- IBM Token Ring, che non  veramente Ethernet.  Broken-Ring
  necessita dell'instramento source e di altre brutte cose.

  loopback.c -- Dispositivo loopback al quale vanno tutti i pacchetti
  destinati alla macchina e partenti da questa.  Essenzialmente sposta
  semplicemente il pacchetto dalla coda TX nella coda RX.

  pi2.c -- Interfacce PI e PI2 dell'Ottawa Amateur Radio Club.

  plip.c - Parallel Line Internet Protocol, permette a due computer di
  inviarsi pacchetti attraverso le porte parallele connesse in maniera
  point-to-point (punto a punto).

  ppp.c -- Point-to-Point Protocol (RFC1331), per la trasmissione dei
  datagrammi multiprotocollo su una connessione Point-to-Point Link
  (solitamente modem).

  slip.c -- Serial Line Internet Protocol, permette a due computer di
  inviarsi pacchetti attraverso le porte seriali (solitamente via modem)
  connesse in maniera point-to-point (punto a punto).

  tunnel.c -- Fornisce un tunnel IP attraverso il quale si pu
  incanalare il traffico di rete in maniera trasparente tra le
  sottoreti.

  wavelan.c -- Un transceiver radio tipo Ethernet controllato da un
  coprocessore Intel 82586 usato su altre schede Ethernet come la Intel
  EtherExpress.


  6.  Cavi, coassiali, doppini intrecciati

  Se si sta mettendo su una nuova rete, si dovr decidere se usare thin
  Ethernet (cavo coassiale RG58 con connettori BNC) o 10baseT (cavi tipo
  telco a doppini intrecciati con connettori `telefonici' RJ-45 a otto
  vie).  La vecchia thick Ethernet, con cavi RG-5 a N connettori, 
  obsoleta e si vede poco in giro.

  Si veda ``Tipi di cavi...'' per una panoramica introduttiva ai cavi.
  Si noti inoltre che la FAQ di comp.dcom.lans.ethernet contiene un
  sacco di informazioni utili sui cavi e robe simili.  Si faccia FTP a
  rtfm.mit.edu e si cerchi nella directory /pub/usenet-by-hierarchy/ la
  FAQ di quel newsgroup.


  6.1.  Thin Ethernet (thinnet)


  Il cavo thin Ethernet  abbastanza economico.  Se si vuole farsi da
  soli i cavi, l'RG58A a solid-core costa $0.27/m mentre l'RG58AU
  stranded   a $0.45/m.  I connettori BNC twist-on costano meno di due
  dollari l'uno e altri pezzi vari sono attrettanto economici.  
  essenziale terminare correttamente ciascun capo del cavo con
  terminatori da 50 Ohm, che costano due dollari alla coppia.  
  altrettanto vitale che il cavo non sia formato da pi spezzoni: il
  connettore a `T' dev'essere attaccato direttamente alle schede
  Ethernet.

  Ci sono due svantaggi principali ad usare la thinnet.  Il primo  che
   limitata a 10Mb/sec: i 100Mb/sec richiedono il doppino intrecciato.
  Il secondo svantaggio che se si ha un grande anello di macchine
  connesse assieme e qualche testone interrompe l'anello staccando un
  cavo da un connettore a T, l'intera rete va gi perch vede
  un'impedenza infinita (circuito aperto) invece dei 50 Ohm richiesti
  come terminazione.  Si noti che si pu rimuovere la T stessa dalla
  scheda senza uccidere l'intera sottorete, purch non si stacchino i
  cavi dalla T.  Naturalmente questa cosa disturber la macchina dalla
  quale si  tolto il connettore a T 8-) Se se si sta facendo una
  piccola rete di due macchine, sono ancora necessari sia il connettore
  a T che i terminatori da 50 Ohm: non si pu semplicemente connettere
  le due macchine assieme!


  Ci sono anche dei simpatici sistemi di cavi che apparentemente
  sembrano un unico cavo, ma in realt il cavo fa un giro da parte a
  parte dentro il rivestimento esterno, dando al cavo quella tipica
  sezione ovale.  Nel punto dove torna indietro l'anello  messo un
  connettore BNC che si pu connettere alla propria scheda.   Quindi si
  ha l'equivalente di due cavi e un BNC a T, ma in questo caso 
  impossibile per l'utilizzatore rimuovere un cavo da un lato della T e
  disturbare la rete.



  6.2.  Doppino intrecciato (twisted pair)


  Le reti a doppini intrecciati necessitano di hub (concentratori)
  attivi, che costano attorno ai $50 e il costo reale del semplice cavo
  pu essere pi alto di quello necessario per la thinnet.  Si pu
  tranquillamente ignorare quelli che dicono che si pu usare il
  cablaggio telefonico gi esistente visto che dove c'  una rara
  installazione.

  D'altra parte, tutte le specifiche Ethernet a 100Mb/sec usano doppini
  intrecciati e sono usati pure nella maggior parte delle nuove
  installazioni.  Inoltre, Russ Nelson aggiunge che Le nuove
  installazioni dovrebbero usare cavi di categoria 5.  Qualsiasi altra
  cosa spreca il proprio tempo, in quanto un 100Base-qualsiasi
  richieder cavi categoria 5.

  Se si sta solamente connettendo macchine,  possibile evitare l'uso di
  un hub, scambiando le coppie Rx e Tx (1-2 e 3-6).

  Se si guarda il connettore RJ-45 (come se lo si stesse connettendo
  nella propria bocca) con il gancetto di bloccaggio in alto, allora i
  pin sono numerati da 1 a 8 da sinistra verso destra.  L'uso dei pin 
  il seguente:


          Numero Pin              Assegnamento
          ----------              ------------
          1                       Output Data (+)
          2                       Output Data (-)
          3                       Input Data (+)
          4                       Riservato per l'uso telefonico
          5                       Riservato per l'uso telefonico
          6                       Input Data (-)
          7                       Riservato per l'uso telefonico
          8                       Riservato per l'uso telefonico



  Se si vuole fare un cavo, quanto segue vi torner utile.  Le coppie di
  segnali differenziali devono essere nella stessa coppia intrecciata
  per ottenere la minima impendenza/perdita richiesta di un cavo UTP.
  Se si guarda la tabella precedente, si vedr che 1+2 e 3+6 sono i due
  insiemi di coppie di segnali differenziali.  Non 1+3 e 2+6!!!!!!  A
  10MHz e basse distanze, si pu ancora far qualcosa con questi errori.
  Ma non ci si pensi nemmeno lontanamente a 100Mhz.

  Per un normale cavo con terminazioni `A' e `B', si deve usare la
  mappatura diretta pin a pin, con l'ingresso e l'uscita che usano
  ciascuna una coppia di doppini intrecciati (per esigenze di
  impedenza). Questo significa che 1A va a 1B, 2A a 2B, 3A a 3B e 6A a
  6B. I cavetti che collegano 1A-1B e 2A-2B devono essere un doppino
  intrecciato. Ed anche i cavetti che collegano 3A-3B e 6A-6B devono
  essere un'altro doppino intrecciato.

  Ora se non si ha un hub e si vuole fare un `null cable', quel che si
  deve fare  rendere l'ingresso di `A' l'uscita di `B' e l'uscita di
  `A' l'ingresso di `B', senza cambiare la polarit. Questo significa
  connettere 1A a 3B (out+ di A a in+ di B) e 2A a 6B (out- A a in- B).
  Queste due connessioni devono essere un doppino intrecciato.
  Trasportano quel che la scheda/spina `A' considera l'uscita e quel che
   visto come ingresso dalla scheda/spina `B'. Poi si connetta 3A a 1B
  (in+ A a out+ B) e si connetta anche 6A a 2B (in- A a out- B). Anche
  queste due connessioni devono essere un doppino intrecciato.
  Trasportano quel che la scheda/spina `A' considera ingresso e quel che
  la scheda/spina `B' considera uscita.

  Quindi se si considera un normale cavo per avere un cavo `null', si
  tagli via uno dei capi, si scambino di posto i doppini intrecciati di
  Rx e Tx nella nuova spina e la si chiuda. Niente di complicato. Si
  deve semplicemente portare il segnale Tx di una scheda nel Rx
  dell'altra e viceversa.

  Si noti che prima che il 10BaseT fosse ratificato come standard,
  c'erano altri formati di rete che usavano connettori RJ-45 e lo stesso
  schema di connessione appena visto.  Esempi sono la LattiNet della
  SynOptics e la StarLAN dell'AT&T.  In alcuni casi (come con le prime
  schede 3c503) si potevano impostare dei ponticelli per far s che la
  scheda dialogasse con hub di diverso tipo, ma la maggior parte delle
  schede progettate per questi vecchi tipi di reti non funzioneranno con
  le reti/hub 10BaseT (si noti che se la scheda ha anche una porta AUI,
  allora non c' alcuna ragione per non usarla assieme con un
  transceiver da AUI a 10BaseT).


  6.3.  Thick Ethernet

  La thick Ethernet  praticamente obsoleta e solitamente  usata solo
  per mantenere la compatibilit con un'installazione preesistente.  Si
  pu fare uno strappo alle regole e connettere thick e thin Ethernet
  assieme con un connettore passivo N-to-BNC da 3 dollari, spesso la
  miglior soluzione per espandere una thicknet gi esistente.  In questo
  caso una soluzione corretta (ma pi costosa) sarebbe di usare un
  ripetitore (repeater).

  7.  Configurazione del software e diagnotici


  In molti casi, se la configurazione viene fatta via software e salvata
  poi in una EEPROM, si dovr avviare DOS e usare il programma per DOS
  fornito dal rivenditore per impostare IRQ, I/O, indirizzo di memoria e
  altre robette della scheda.  D'altra parte  auspicabile che questa
  sia una cosa che si dovr fare solo una volta.  Se non si ha il
  software per DOS della propria scheda, si provi a guardare nel sito
  WWW del produttore.  Se non si conosce il nome del sito si provi ad
  indovinarlo, per esempio `www.produttore.com' dove `produttore'  il
  nome del produttore della propria scheda.  Questa cosa funziona per la
  SMC, la 3Com e molti molti altri produttori.

  Per alcune schede esistono le versioni Linux delle utilit di
  configurazione e sono qui elencate.  Donald ha scritto alcuni piccoli
  programmi per Linux di diagnostica per le schede.  La maggior parte di
  questi sono il prodotto finale di strumenti di debug che ha creato
  durante la scrittura dei diversi driver.  Non ci si aspettino
  interfacce a menu carine.  Per poterli usare nella maggioranza dei
  casi sar necessario leggere il codice sorgente.  Anche se per la
  propria particolare scheda non esiste un diagnostico, si possono
  ottenere comunque alcune informazioni digitando semplicemente cat
  /proc/net/dev (assumendo che all'avvio la propria scheda sia stata
  almeno rilevata).

  In tutti i casi, si dovr usare la maggior parte di questi programmi
  come root (per permettere l'I/O nelle porte) e prima di farlo 
  consigliabile disattivare la scheda Ethernet usando ifconfig eth0
  down.


  7.1.  Programmi di configurazione per le schede Ethernet



  7.1.1.  Schede WD80x3


  Per quanti hanno schede wd80x3, c' il programma wdsetup che pu
  essere trovato nel file wdsetup-0.6a.tar.gz nei siti ftp su Linux.
  Non  mantenuto attivamente e non  aggiornato da un po' di tempo.  Se
  nel proprio caso funziona, allora bene; se non funziona, si usi la
  versione DOS che si dovrebbe aver ricevuto con la scheda.  Se non si
  ha la versione DOS, si sar felici di sapere che i dischetti
  aggiornati di configurazione e dei driver possono essere scaricati dal
  sito ftp della SMC.  Natualmente, si deve possedere una scheda con la
  EEPROM per usare questo programma.  Le vecchie, ma proprio vecchie,
  schede wd8003 e alcuni cloni del wd8013 per configurare la scheda
  usano dei ponticelli.


  7.1.2.  Schede Digital/DEC


  La scheda Digital EtherWorks 3 pu essere configurata in maniera
  simile che con il programma DOS NICSETUP.EXE.  David C. Davies ha
  scritto, assieme al driver, questo progrmma e altri strumenti per la
  EtherWorks 3.  Si cerchi nella directory
  /pub/linux/system/Network/management nel sito FTP su Linux pi vicino,
  il file chiamato ewrk3tools-X.XX.tar.gz.


  7.1.3.  Schede NE2000+ o AT/LANTIC


  Alcune implementazioni del DP83905 della National Semiconductor (come
  le AT/LANTIC e le NE2000+) sono configurabili via software (si noti
  che queste schede emulano anche una wd8013!).  Per configurare queste
  schede si pu scaricare il file /pub/linux/setup/atlantic.c dal server
  ftp di Donald, cesdis.gsfc.nasa.gov.  Inoltre, con tutte queste schede
  sembra funzionare anche il programma per le schede DP83905 della
  Kingston, poich non fa controlli sul tipo di rivenditore prima di
  permetterne l'uso.  Si segua l'URL seguente: Kingston Software
  <http://www.kingston.com/download/etherx/etherx.htm> e si scarichi
  20XX12.EXE e INFOSET.EXE.

  Si faccia attenzione quando si configurano schede NE2000+, poich
  alcune impostazioni errate possono causare problemi.  Un esempio
  tipico  l'abilitazione accindentale della ROM di boot nella EEPROM
  (anche se la ROM non  installata) con una impostazione che va in
  conflitto con la scheda VGA.  Il risultato  che il computer
  semplicemente fa beep quando lo si accende e sullo schermo non succede
  niente.

  Solitamente si pu risolvere questa situazione nel modo seguente.  Si
  rimuova la scheda dalla macchina e poi si riavvii e si entri nel menu
  di configurazione del BIOS.  Si cambi la voce `Display Adapter' in
  `Not Installed' e si imposti il disco di avvio di default in `A:' (il
  proprio lettore di floppy).  Si cambi anche la voce `Wait for F1 if
  any Error' in `Disabled'.  In questo modo, il computer dovrebbe
  avviarsi senza l'intervento dell'utente.  Ora si crei un dischetto DOS
  avviabile (`format a: /s /u') e si copi dentro il floppy il programma
  default.exe dell'archivio 20XX12.EXE suddetto.  Poi si digiti echo
  default > a:autoexec.bat in modo tale che il programma che reimposta i
  valori predefiniti della scheda sia eseguito automaticamente quando si
  avvia da questo dischetto.  Si spenga la macchina, si reinstalli la
  scheda ne2000+, si inserisca il nuovo dischetto di boot e la si
  riaccenda.  Probabilmente far ancora beep, ma alla fine si dovrebbe
  vedere la lucetta del floppy che si accende quando finalmente fa il
  boot.  Si aspetti un paio di minuti che il floppy si fermi, il che
  indica che ha finito di eseguire il programma default.exe e poi si
  spenga il computer.  Dopo lo si riaccenda ancora e teoricamente si
  dovrebbe avere ancora un display che funziona, permettendo cos di
  risistemare le impostazioni del BIOS e modificare i valori della
  EEPROM della scheda come si vuole.

  Si noti che se non si ha DOS sotto mano, si pu fare tutto quello
  sopra con un dischetto di avvio di Linux che lancia automaticamente il
  programma atlantic di Donald (con le giuste opzioni d'avvio) invece
  che con un dischetto di avvio di DOS che lancia automaticamente il
  programma default.exe.


  7.1.4.  Schede 3Com


  La famiglia di schede Etherlink III della 3Com (p.es. 3c5x9) pu
  essere configurata usando un'altra utilit di configurazione di
  Donald.  Per configurarle si pu scaricare il file
  /pub/linux/setup/3c5x9setup.c dal server ftp di Donald,
  cesdis.gsfc.nasa.gov (si noti che il programma DOS di configurazione
  3c5x9B pu avere pi opzioni pertinenti alla nuova serie ``B'' della
  famiglia Etherlink III).


  7.2.  Programmi diagnostici per schede Ethernet


  Tutti i programmi diagnostici scritti da Donald possono essere
  ottenuti da questo URL:

  Ethercard Diagnostics
  <ftp://cesdis.gsfc.nasa.gov/pub/linux/diag/index.html>

  Allied Telesis AT1700: si cerchi il file /pub/linux/diag/at1700.c su
  cesdis.gsfc.nasa.gov.

  Cabletron E21XX: si cerchi il file /pub/linux/diag/e21.c su
  cesdis.gsfc.nasa.gov.

  P PCLAN+: si cerchi il file /pub/linux/diag/hp+.c su
  cesdis.gsfc.nasa.gov.

  Intel EtherExpress: si cerchi il file /pub/linux/diag/eexpress.c su
  cesdis.gsfc.nasa.gov.

  Schede NE2000: si cerchi il file /pub/linux/diag/ne2k.c su
  cesdis.gsfc.nasa.gov.  C' ancora una versione PCI per gli ormai
  comuni cloni della NE2000-PCI.

  RealTek (ATP) Pocket adaptor: si cerchi il file /pub/linux/diag/atp-
  diag.c su cesdis.gsfc.nasa.gov.

  Tutte le altre schede: si provi a digitare cat /proc/net/dev e dmesg
  per vedere quali informazioni utili possiede il kernel sulla scheda in
  oggetto.


  8.  Informazioni tecniche

  Queste informazioni saranno utili a quanto vogliono capire un po'
  meglio come funziona la loro scheda, oppure vogliono giocare con il
  driver o anche provare a fare il loro driver personale per una scheda
  che attualmente non  supportata.  Se non si cade in queste categorie,
  allora si pu pure saltare questa sezione.


  8.1.  I/O programmato, memoria condivisa e DMA a confronto

  Se gi si ricevono e inviano pacchetti back-to-back (NdT letteralmente
  ``uno dopo l'altro''), non si possono mettere altri bit nel cavo.
  Ogni scheda Ethernet moderna pu ricevere pacchetti back-to-back.  I
  driver per Linux per DP8390 (wd80x3, SMC-Ultra, 3c503, ne2000, ecc.)
  arrivano abbastanza vicino all'invio di pacchetti back-to-back (il
  limite  dato dalla reale latenza degli interrupt) e l'hardware 3c509
  e AT1500 non ha problemi ad inviare automaticamente pacchetti back-to-
  back.

  Il bus ISA pu fare 5.3MB/sec (42Mb/sec), che sembra pi che
  sufficiente per una Ethernet a 10Mbps.  Nel caso di schede a 100Mpbs,
  chiaramente  necessario un bus pi veloce per sfruttare la larghezza
  di banda della rete.


  8.1.1.  I/O programmato (Programmed I/O) (es. NE2000, 3c509)

  Pro: Non usa nessuna risorsa di sistema riservata, solo alcuni
  registri di I/O e non ha il limite dei 16M.

  Contro: Solitamente pi bassa  la velocit di trasferimento, pi la
  CPU attende senza far niente, e l'accesso ai pacchetti interleaved 
  solitamente difficile se non impossibile.


  8.1.2.  Memoria condivisa (Shared memory) (es. WD80x3, SMC-Ultra,
  3c503)

  Pro: Pi veloce e semplice dell'I/O programmato e inoltre permette
  l'accesso casuale ai pacchetti. Dove possibile, i driver per Linux
  calcolano il checksum dei pacchetti IP in ingresso non appena sono
  copiati fuori dalla scheda. Tale cosa risulta in un'ulteriore
  riduzione dell'uso della CPU rispetto ad una equivalente scheda PIO.

  Contro: Usa maggiore spazio di memoria (molto grande per gli utenti
  DOS, essenzialmente non problematico sotto Linux) e usa ancora
  parecchio la CPU.


  8.1.3.  Accesso diretto alla memoria (DMA) di tipo slave (normale)
  (non per Linux!)

  Pro: Libera la CPU durante il reale trasferimento dei dati.

  Contro: Il controllo delle condizioni al contorno, l'allocazione di
  buffer contigui e la programmazione dei registri DMA la rende la
  tecnica pi lenta fra tutte.  Inoltre satura facilmente un canale DMA
  e richiede buffer allineati in memoria bassa.


  8.1.4.  Accesso diretto alla memoria (DMA) di tipo bus master (es.
  LANCE, DEC 21040)

  Pro: Libera la CPU durante il trasferimento dei dati, pu legare
  assieme i buffer, nel bus ISA pu richiede una piccola (nulla) perdita
  del tempo di CPU. La maggior parte dei driver per Linux bus-master
  usano lo schema `copybreak' nel quale i grossi pacchetti sono messi
  direttamente dalla scheda nel buffer di rete del kernel, e i pacchetti
  piccoli sono copiati invece dalla CPU che li carica in cache per le
  eleborazioni successive.

  Contro: (Applicabile solamente alle schede per bus ISA) Per la scheda
  sono necessari buffer in memoria bassa e di canali DMA. Qualsiasi
  dispositivo bus-master avr problemi con altri dispositivi non bus-
  master che si appropriano del bus, come alcuni primitivi adattatori
  SCSI. Alcuni chipset delle schede madri mal progettati hanno problemi
  con il bus-master. Una ragione per non usare alcun tipo di dispositivo
  DMA  un processore 486 progettato come rimpiazzo di un 386: questi
  processori devono scaricare la loro cache ad ogni ciclo di DMA (fra
  questi ci sono Cx486DLC, Ti486DLC, Cx486SLC, Ti486SLC, ecc.)


  8.2.  Scrivere un driver


  La sola cosa che serve per usare una scheda Ethernet con Linux  il
  driver appropriato.  Per questo  essenziale che i costruttori
  rilascino le informazioni tecniche di programmazione al pubblico senza
  che qualcuno debba vendersi per vita per averle.  Un buon esempio
  sulla possibilit di ottenere documentazione (oppure se non si sta
  scrivendo codice, sulla possibilit che qualcun'altro scriver quel
  driver di cui si ha veramente bisogno)  la disponibilit del packet
  driver Crynwr (nato Clarkson). Russ Nelson guida questa operazione ed
   stato molto d'aiuto nel supportare lo sviluppo dei driver per Linux.
  I net-surfer possono provare questo URL per vedere il software di
  Russ.


  Russ Nelson's Packet Drivers <http://www.crynwr.com/crynwr/home.html>

  Avuta la documentazione si pu scrivere un driver per la propria
  scheda e usarlo per Linux (almeno in teoria).  Si tenga presente che
  alcuni dei vecchi hardware che erano stati pensati per macchine di
  tipo XT non funzioneranno molto bene in un ambiente multitasking come
  Linux.  L'uso di uno di questi comporter non pochi problemi se la
  propria rete deve sostenere un traffico ragionevole.

  La maggior parte delle schede ha dei driver per le interfacce MS-DOS
  come NDIS o ODI, ma questi sono inutili per Linux.  Molti hanno
  suggerito di fare il link direttamente di questi o utilizzare una
  traduzione automatica, ma queste sono cose praticamente impossibili.
  I driver MS-DOS si aspettano di essere in modalit a 16 bit e si
  basano su `interrupt software', cose che sono entrambe incompatibili
  con il kernel di Linux.  Questa incompatibilit  in realt una
  caratteristica di Linux, in quanto alcuni driver per Linux sono spesso
  decisamente migliori delle loro controparti MS-DOS. La serie `8390'
  dei driver, per esempio usa un buffer di trasmissione ping-pong, che
  ora  stato introdotto anche nel mondo MS-DOS.

  (Buffer Tx di tipo ping-pong significa usare almeno due buffer di
  pacchetti per i pacchetti da trasmettere.  Uno  caricato mentre la
  scheda sta trasmettendo l'altro.  Il suo contenuto viene poi trasmesso
  non appena  conclusa la trasmissione dell'altro e cos via.  In
  questo modo, la maggior parte delle schede sono in grado di inviare
  continuamente pacchetti back-to-back nel cavo.)

  OK. Quindi si  deciso che si vuole scrivere un driver per la scheda
  Ethernet CippaLippa, poich si possiedono le informazioni di
  programmazione e nessuno l'ha ancora fatto (... queste sono le due
  condizioni principali ;-) Si dovrebbe partire dallo scheletro per un
  driver di rete fornito assieme ai sorgenti di Linux.  Pu essere
  trovato nel file /usr/src/linux/drivers/net/skeleton.c in tutti i
  kernel recenti.  Si dia un'occhiata anche alla Kernel Hackers Guide, a
  questo indirizzo: KHG
  <http://www.redhat.com:8080/HyperNews/get/khg.html>



  8.3.  Interfaccia dei driver verso il kernel


  Ecco alcune note sulle funzioni che si dovranno scrivere se si crea un
  nuovo driver.  Si leggano queste cose assieme allo scheletro del
  driver citato prima per aiutarsi a chiarire un po' le cose.


  8.3.1.  Probe (rilevamento)


   chiamata all'avvio per controllare l'esistenza della scheda.  Meglio
  se si pu farlo non intrusivamente leggendo dalla memoria, ecc.  Pu
  anche leggere dalle porte I/O.  La scrittura iniziale nelle porte di
  I/O durante il probe non  una buona cosa in quanto pu uccidere un
  altro dispositivo.  Una parte dell'inizializzazione del dispositivo 
  fatta qui (allocando lo spazio I/O, IRQ, riempendo i campi di
  dev->???, ecc).  Si deve sapere a quali porte di I/O o zone di memoria
  pu essere configurata la scheda, come abilitare la memoria condivisa
  (se usata), come selezionare/abilitare la generazione degli interrupt,
  ecc.





  8.3.2.  Interrupt handler (gestore dell'interrupt)


   chiamato dal kernel quando la scheda genera un interrupt.  Ha il
  compito di determinare perch la scheda lo ha generato e comportarsi
  di conseguenza.  Le usuali condizioni di interrupt sono la ricezione
  di dati, il completamento della trasmissione, la segnalazione di
  condizioni d'errore.  Si deve conoscere ogni bit di stato
  dell'interrupt di una qualche importanza in modo da portersi
  comportare di conseguenza.


  8.3.3.  Funzione transmit


   collegata a dev->hard_start_xmit() ed  chiamata dal kernel quando
  ci sono alcuni dati che il kernel vuole depositare nel dispositivo.
  Mette i dati nella scheda e avvia la trasmissione.  Si deve sapere
  come raccogliere i dati, come metterli dentro la scheda (copia della
  memoria condivisa, trasferimento PIO, DMA?) e il posto giusto dove
  metterli.  Poi si deve sapere come dire alla scheda di inviare i dati
  nel cavo e (possibilmente) sollevare un interrupt quando ha fatto.
  Quando l'hardware non pu accettare ulteriori pacchetti dovrebbe
  impostare il flag dev->tbusy.  Quando  disponibile dello spazio,
  solitamente durante un interrupt per il completamento della
  trasmissione, dev->tbusy dovrebbe essere liberato e i livelli pi
  elevati informati con mark_bh(INET_BH).


  8.3.4.  Funzione receive


   chiamata dall'interrupt handler del kernel quando ci sono dei dati
  nella scheda.  Toglie i dati dalla scheda, li impacchetta in un
  sk_buff e informa il kernel che i dati sono l, dimodoch questo possa
  fare una netif_rx(sk_buff).  Si deve sapere come abilitare la
  generazione di un interrupt sulla ricezione di dati, come controllare
  qualsiasi bit di stato della ricezione e come togliere i dati dalla
  scheda (ancora memoria condivisa, PIO, DMA, ecc.).


  8.3.5.  Funzione open


   collegata a dev->open ed  chiamata dagli strati di rete quando
  qualcuno fa ifconfig eth0 up per attivare il dispositivo ed abilitarlo
  per la Rx/Tx di dati.  Qualsiasi inizializzazione speciale che non
  viene fatta nella sequenza di probe (abilitare la generazione degli
  IRQ, ecc.) dovrebbe andare qui.


  8.3.6.  Funzione close (opzionale)


  Questa mette la scheda in uno stato decente quando qualcuno fa
  ifconfig eth0 down.  Dovrebbe liberare gli IRQ e i canali DMA se
  l'hardware lo permette e disabilitare qualsiasi cosa che possa far
  risparmiare corrente (come il transceiver).


  8.3.7.  Funzioni varie


  Cose come una funzione di reinizializzazione, cosicch se le cose
  vanno male, il driver pu provare, come ultima risorsa, a ripristinare
  la scheda.  Solitamente  fatto quando una trasmissione va in time out
  o cose simili.  Pu essere utile anche una funzione per leggere i
  registri di statistica delle scheda (se ce li ha).


  8.4.  Informazioni tecniche dalla 3Com


  Se si  interessati a lavorare su un driver per una scheda 3Com, si
  possono ottenere informazioni tecniche direttamente dalla 3Com.
  Cameron  stato talmente gentile da spiegarci come averle:

  Gli adattatori Ethernet della 3Com sono documentati per chi vuole
  scrivere un driver nei nostri `Technical Reference' (TR).  Questi
  manuali descrivono le interfacce di programmazione delle schede ma non
  parlano della diagnostica, programmi d'installazione, ecc. tutte
  quelle cose che interessano all'utilizzatore finale.

  I TR sono distribuiti dal dipartimento di marketing della Network
  Adapter Division.  Per far funzionare le cose in maniera efficiente,
  la distribuzione  centralizzata in una cosa detta `CardFacts'.
  CardFacts  un sistema telefonico automatizzato.  Se lo si chiama con
  un telefono a toni pu inviare fax dove si richiede.  Per ottenere un
  TR, si chiami CardFacts al 408-727-7021.  Gli si chieda il
  ``Developer's Order Form'' (modulo d'ordine per sviluppatori),
  documento numero 9070.  Si tenga sotto mano il proprio numero di fax
  quando si chiama.  Si compili il modulo d'ordine e lo si invii via fax
  al 408-764-5004.  I manuali sono spediti con il servizio ``2nd Day''
  della Federal Express.

  Alcuni pensano che diamo via troppo facilmente i manuali e cercano
  prove per dire il sistema  troppo costoso e che occupa troppo tempo e
  sforzi.  Da tempo, i nostri clienti sono sempre stati contenti di
  questa cosa e non ci sono mai stati problemi nonostante le quantit di
  richieste che riceviamo.  Abbiamo bisogno della loro continua
  cooperazione e riserbo per mantenere le cose cos.


  8.5.  Note sulle schede basate su PCnet / LANCE di AMD


  Il chip LANCE (Local Area Network Controller for Ethernet) era
  l'offerta originale dell'AMD e da allora  stato rimpiazzato dal chip
  `PCnet-ISA', noto anche come 79C960.  Si noti che il nome `LANCE' 
  stuck e alcuni ancora fanno riferimento ai nuovi chip con il vecchio
  nome.  Dave Roberts della Network Products Division di AMD  stato
  talmente gentile da fornire le seguenti informazioni riguardo questo
  chip:

  Funzionalmente,  equivalente a una NE1500. L'insieme dei registri 
  indentico a quello del vecchi LANCE con le aggiunte dell'architettura
  1500/2100.  I vecchi driver per 1500/2100 funzioneranno anche con il
  PCnet-ISA.  L'architettura degli NE1500 e degli NE2100 in pratica  la
  stessa.  Inizialmente la Novell l'ha chiamata 2100, ma hanno poi
  provato a distinguere tra le schede per il coassiale e le 10Base-T.
  Qualsiasi cosa che era solamente 10Base-T  stata numerata
  nell'intervallo 1500.  Questa  la sola differenza.

  Molte compagnie offrono prodotti basati su PCnet-ISA, incluse HP,
  Racal-Datacom, Allied Telesis, Boca Research, Kingston Technology,
  ecc.  Le schede in pratica sono le stesse se non per il fatto che
  alcuni costruttori hanno aggiunte le caratteristiche `jumperless'
  (senza ponticelli) che permettono la configurazione via software.  La
  maggior parte non l'ha fatto.  L'AMD offre un progetto standard per
  una scheda che usa il chip PCnet-ISA e molti costruttori usano il
  nostro progetto senza modifiche.  Questo significa che chiunque voglia
  scrivere dei driver per la maggior parte delle schede basate su PCnet-
  ISA pu semplicemente prendere il data-sheet dall'AMD.  Si chiami il
  nostro centro di distribuzione della documentazione al (800)222-9323 e
  si chieda del data sheet per il Am79C960, il chip PCnet-ISA.  
  gratis.

  Un modo veloce per capire se la scheda  una di quelle basate sul
  progetto standard,  quello di osservarla.  Se  una standard,
  dovrebbe avere un grosso chip, un cristallo, una piccola PROM
  d'indirizzo IEEE, probabilmente un socket per una ROM di boot e un
  connettore (1, 2 o 3 a seconda dei mezzi supportati).  Si noti che se
   una scheda per cavo coassiale, avr anche un po' di roba per il
  trasceiver, ma dovrebbe essere nei pressi del connettore e ben
  distante dal PCnet-ISA.

  Una nota per gli aspiranti hacker  che differenti implementazioni del
  LANCE effettuano il `restart' (riavvio) in modi diversi.  Alcune
  riprendono da dove sono state interrotte, mentre altre ripartono
  dall'inizio, come se fossero state inizializzate.


  8.6.  Multicast e modalit promiscua


  Un'altra delle cose a cui ha lavorato Donald  l'implementazione degli
  ``agganci'' (hook) per il multicast e la modalit promiscua
  (promiscuous mode). Tutti i driver ISA rilasciati (cio non ALPHA) ora
  supportano la modalit promiscua.

  Donald scrive: Inizierei con il parlare della modalit promiscua, che
  concettualmente  facile da implementare.  Per la maggior parte
  dell'hardware semplicemente si deve impostare un bit di registro e da
  allora si riceveranno tutti i pacchetti che passano su quel cavo.
  Beh, non  proprio cos facile: per alcune schede si deve disabilitare
  la scheda (potenzialmente perdendo alcuni pacchetti), riconfigurarla e
  poi riabilitarla.  OK, visto che questo  facile, adesso passo a
  qualcosa che non  proprio cos ovvia: il multicast.  Pu essere fatto
  in due modi:


  1. Usando la modalit promiscua e un filtro di pacchetti come il
     Berkeley packet filter (BPF).  Il BPF  un linguaggio stack di
     pattern matching (ricerca delle corrispondenze), dove si scrive un
     programma che raccoglie gli indirizzi ai quali si  interessati.
     Il suo vantaggio  che  molto generale e programmabile.  Lo
     svantaggio  che non c' un metodo generale per il kernel per
     evitare di attivare la modalit promiscua e far passare ogni
     pacchetto che attraversa il cavo su ognuno dei filtri di pacchetti
     registrati.  Si veda ``Il Berkeley Packet Filter'' per maggior
     informazioni.

  2. Usare il filtro multicast su scheda che hanno la maggior parte
     delle schede.

  Immagino che dovrei elencare quel poco che mettono a disposizione le
  schede o i chip:



  Chip/scheda  Promiscua  Filtro multicast
  -----------------------------------------
  Seeq8001/3c501  S     Filtro binario (1)
  3Com/3c509      S     Filtro binario (1)
  8390            S     Hash a sei bit con Autodin II (2) (3)
  LANCE           S     Hash a sei bit con Autodin II (2) (3)
  i82586          S     Hash a sei bit con Hidden Autodin II (2) (4)

  1. Queste schede affermano di avere un filtro, ma  un semplice s/no:
     accetta tutti i pacchetti multicast o non accettare i pacchetti
     multicast.

  2. AUTODIN II  il polimonio di CRC (codice ciclico a ridonadanza)
     standard di Ethernet.  In questo schema, degli indirizzi multicast
     viene calcolata l'hash e vengono poi ricercati in una tabella hash.
     Se  abilitato il bit corrispondente del pacchetto, allora questo 
     accettato.  I pacchetti Ethernet sono progettati in modo che
     l'hardware per fare questa cosa sia banale: semplicemente si
     memorizzano i sesti bit del circuito CRC (comunque necessario per
     il controllo degli errori) dopo i primi sei otteti (l'indirizzo di
     destinazione) e li si usa per indicizzare nella tabella hash (sei
     bit: una tabella a 64 bit).

  3. Questi chip usano la hash a sei bit e la tabella dev'essere
     calcolata e caricata dall'host.  Questo significa che il kernel
     deve contenere il codice per il CRC.

  4. Il 82586 usa la hash a sei bit internamente, ma calcola da solo la
     tabella di hast dall'elenco degli indirizzi multicast da accettare.

  Si noti che nessuno di questi chip fa un filtraggio perfetto e c'
  ancora bisogno di un modulo a livello intermedio per fare il
  filtraggio finale.  Si noti pure che in tutti i casi si deve mantenere
  un'elenco completo degli indirizzi multicast accettati per ricalcolare
  la tabella di hash quando cambia.


  8.7.  Berkeley Packet Filter (BPF)

  L'idea diffusa fra gli sviluppatori  che le funzionalit BPF non
  dovrebbero essere fornite dal kernel, ma dovrebbero essere in una
  libreria di compatibilit (si spera poco usata).

  Per quelli che non lo conoscono, il BPF (Berkeley Packet Filter --
  filtro dei pacchetti di Berkeley)  un meccanismo per specificare agli
  strati di rete del kernel i pacchetti ai quali si  interessati. 
  implementato come un interprete specializzato di un linguaggio stack
  costruito dentro il codice di rete a basso livello. Un'applicazione
  passa un programma scritto in questo linguaggio al kernel ed il kernel
  esegue il programma su ciascun pacchetto in ingresso. Se il kernel ha
  pi applicazioni BPF, ogni programma  eseguito su ogni pacchetto.

  Il problema  che  difficile dedurre dal programma di filtraggio dei
  pacchetti a quale tipo di pacchetti l'applicazione  veramente
  interessata, e quindi la soluzione generale  di eseguire sempre il
  filtro. Si immagini un programma che registra un programma BPF per
  raccogliere il flusso a bassa velocit inviato ad un indirizzo
  multicast. La maggior parte delle schede hanno un filtro hardware per
  indirizzi multicast implementato come una tabella di hash a 64 voci
  che ignora i pacchetti multicast maggiormente non voluti. Quindi c'
  la possibilit di rendere questa operazione poco costosa. Ma con il
  BPF il kernel deve passare l'interfaccia in modalit promiscua,
  ricevere _tutti_ i pacchetti e farli passare attraverso il filtro.
  Questa cosa funziona, ma quel che  difficile  darne conto al
  processo che ha richiesto i pacchetti.


  9.  Networking con computer portatili

  Ci sono diversi modi per mettere il proprio portatile in una rete. Si
  pu usare il codice di SLIP (e andare alla velocit delle porte
  seriali); si pu prendere un portatile con gi al suo interno uno slot
  PCMCIA; si pu prendere un portatile con una docking station e
  attaccarci una scheda Ethernet ISA; oppure si pu usare un adattatore
  Ethernet su porta parallela.


  9.1.  Usare SLIP

  Questa  la soluzione pi economica, ma considerevoltemente la pi
  difficoltosa. Inoltre non permetter velocit di trasmissione molto
  elevate. Poich lo SLIP non centra con le schede Ethernet non sar
  discusso ulteriormente qui. Si veda il NET-2 HOWTO.


  9.2.  Supporto PCMCIA

  Si provi a determinare esattamente l'hardware che si possiede (cio
  costruttore della scheda, costruttore del chip del controller PCMCIA)
  e poi si chieda nel canale LAPTOPS. Non ci si aspetti che le cose sia
  poi cos semplici.  Si dovranno fare un po' di cose a mano, applicare
  patch al kernel, ecc.  Forse un giorno si sar in grado di scrivere
  semplicemente `make config' 8-)

  Al momento, i due chipset PCMCIA supportati sono il Databook TCIC/2 e
  l'Intel i82365.

  A tsx-11.mit.edu ci sono diversi programmi nella directory
  /pub/linux/packages/laptops/ che potrebbero tornare utili. Si va da
  driver per schede Ethernet PCMCIA a programmi che comunicano con il
  chip del controller PCMCIA. Si noti che questi driver sono solitamente
  legati ad uno specifico chip PCMCIA (l'Intel 82365 e il TCIC/2)

  Per le schede compatibili con NE2000, alcuni hanno avuto successo
  semplicemente configurando la scheda sotto DOS e poi avviando Linux
  dalla riga di comando del DOS con loadlin.

  La situazione sembra buona per quelli che vogliono il supporto PCMCIA,
  in quanto sono stati fatti dei progressi sostanziali. Il pioniere in
  questi sforzi  David Hinds. Il suo ultimo pacchetto per il supporto
  PCMCIA pu essere ottenuto da:

  PCMCIA Package <ftp://cb-iris.stanford.edu/pub/pcmcia>

  Si cerchi un file tipo pcmcia-cs-X.Y.Z.tgz dove X.Y.Z sar il numero
  dell'ultima versione. Questo sar probabilmente depositato anche nel
  sito FTP tsx-11.mit.edu.

  Si noti che l'abilitatore PCMCIA di Donald funziona come processo a
  livello utente mentre quella di David Hinds  una soluzione a livello
  kernel. Si sar meglio serviti dal pacchetto di David in quanto 
  maggiormente usato e in continuo sviluppo.


  9.3.  Schede Ethernet ISA nella docking station

  Le docking station per i portatili costano circa 250 dollari e
  forniscono due slot ISA a piena grandezza, due porte seriali e una
  porta parallela. La maggior parte delle docking station sono
  alimentate direttamente dalle batterie del portatile e solo alcune
  permettono l'aggiunta di batterie addizionali se si usano schede ISA
  corte. Si pu cos aggiungere una scheda Ethernet poco costosa e
  gioire delle prestazioni di una Ethernet a piena velocit.


  9.4.  Adattatori pocket (su porta parallela)

  Anche gli adattori Ethernet `pocket' possono soddisfare le proprie
  necessit. Si noti che la velocit di trasferimento non sar affatto
  elevata (forse picchi di 200kB/s?) a causa delle limitazioni
  dell'interfaccia su porta parallela.

  Inoltre ci si deve collegare alla presa di alimentazione sulla parete.
  Qualche volta si pu evitare di attaccare l'adattatore alla presa,
  comprando o facendosi un cavo per prendere l'alimentazione dalla porta
  per la tastiera del portatile (si veda ``alimentazione dalla
  tastiera'').

  Si veda ``DE-600 / DE-620'' e ``RealTek'' per due adattatori pocket
  supportati.



  10.  Miscellanea


  Tutta quella roba che non ci stava bene da nessun'altra parte  stata
  messa qui.  Potrebbe non essere rilevante e potrebbe non essere
  d'interesse generale, ma  comunque qui.


  10.1.  Passare al kernel argomenti Ethernet


  Ci sono due comandi generici che possono essere passati al kernel al
  momento del boot: ether e reserve.  Questa cosa pu essere fatta con
  LILO, loadlin o qualsiasi altra utilit di boot che accetta argomenti
  opzionali.

  Per esempio, se il comando fosse `blah' e si aspettasse 3 argomenti
  (diciamo 123, 456 e 789) allora, con LILO, si potrebbe usare:

  LILO: linux blah=123,456,789

  Per maggiori informazioni sugli argomenti di boot (e un elenco
  completo) si veda il BootPrompt-HOWTO
  <http://metalab.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html>.


  10.1.1.  Il comando ether


  L'argomento ether=  usato in congiunzione a driver direttamente
  compilati dentro al kernel.  Non ha assolutamente alcun effetto su
  driver compilati come moduli.  Nella sua forma pi generale, pu
  essere qualcosa di simile:


       ether=IRQ,IND_BASE,PARAM_1,PARAM_2,NOME


  Tutti gli argomenti sono opzionali.  Il primo argomento non numerico 
  intrepretato come NOME.

  IRQ: ovvio.  Un valore di IRQ di `0' (solitamente il valore
  predefinito) significa autoIRQ.   accidentale che l'impostazione
  dell'IRQ sia prima di quella dell'ind_base: questa cosa verr corretta
  non appena cambier qualcos'altro.

  IND_BASE: altrettanto ovvio.  Il valore `0' (solitamente quello
  predefinito) indica di rilevare una scheda nell'elenco di indirizzi
  spefici per quella scheda.

  PARAM_1: Originariamente usato come valore per ridefinire l'indirizzo
  iniziale della memoria per una scheda Ethernet a memoria condivisa,
  come la WD80*3.  Alcuni driver usano i 4 bit meno significativi di
  questo valore per impostare il livello dei messaggi di debug.  0:
  predefinito, 1-7: livello 1..7 (con 7 si ottiene il massimo della
  verbosit), 8: livello 0 (nessun messaggio).  Inoltre, il driver LANCE
  usa i 4 bit meno significativi di questo valore per selezionare il
  canale DMA. Altrimenti usa auto-DMA.

  PARAM_2: Il driver 3c503 usa questo valore per selezionare tra il
  transceiver interno ed esterno.  0: predefinito/interno, 1: AUI
  esterno.  La scheda E21XX della Cabletron usa i 4 bit meno
  significativi di PARAM_2 per selezionare il mezzo d'uscita.
  Altrimenti lo rileva automaticamente.

  NOME: Seleziona il dispositivo di rete a cui fa rifemento il valore.
  Il kernel standard usa i nomi `eth0', `eth1', `eth2' e `eth3' per le
  schede Ethernet attaccate sul bus e `atp0' per gli adattatori Ethernet
  `pocket' su porta parallela.  Il driver arcnet come nome usa `arc0'.
  L'impostazione predefinita  per il rilevamento di un'unica scheda
  Ethernet, la `eth0'.  L'abilitazione di pi schede  possibile
  solamente impostando esplicitamente il loro indirizzo base usando
  questi parametri di LILO.  Il kernel 1.0 trattava le schede Ethernet
  basate su LANCE in modo speciale.  Gli argomenti di LILO erano
  ignorati e alle schede LANCE erano sempre assegnati i nomi `eth<n>'
  partendo da `eth0'.   Ulteriori schede Ethernet non LANCE dovevano
  essere esplicitamente assegnate a `eth<n+1>', e il rilevamento
  standard di `eth0' doveva essere disabilitato con qualcosa di simile a
  `ether=0,-1,eth0' (s, questo  un bug).


  10.1.2.  Il comando reserve


  Questo comando di lilo  usato proprio come il precedente `ether=',
  ovvero  accodato al nome di avvio selezionato in lilo.conf.


       reserve=IO-base,estensione{,IO-base,estensione...}


  In alcune macchine pu essere necessario impedire ai driver di
  dispositivo di controllare la presenza di dispositivi (auto probing)
  in regioni specifiche.  Ci pu essere dovuto ad hardware mal
  progettato che causa il congelamento del boot (come alcune schede
  Ethernet), ad hardware che viene mal identificato, ad hardware il cui
  stato  cambiato da un rilevamento precedente, o semplicemente ad
  hardware che non vuole essere inizializzato dal kernel.

  L'argomento di boot reserve indirizza questo problema specificando la
  regione di una porta I/O che non dovrebbe essere controllata. Tale
  regione viene riservata nella tabella di registrazione delle porte del
  kernel come se vi si fosse gi rilevato un dispositivo.  Si noti che
  questo meccanismo non dovrebbe essere necessario nella maggior parte
  della macchine.  Sar necessario usare questo comando solo quando c'
  un problema o un caso particolare.

  Le porte I/O nella regione specificata sono protette dai controlli dei
  dispositivi.  Questa cosa si  resa necessaria quando alcuni driver si
  piantavano su una NE2000 o mal identificavano altri dispositivi come
  propri.  Un driver di dispositivo corretto non dovrebbe controllare
  una regione riservata a meno che qualche altro argomento di boot non
  specifici esplicitamente di farlo.  La maggior parte dei driver ignora
  la tabella di registrazione delle porte se gli viene passato un
  indirizzo specifico.

  Per esempio, la riga di boot


       LILO: linux  reserve=0x300,32  ether=0,0x300,eth0


  impedisce a tutti i device driver, tranne a quelli della scheda
  Ethernet, di controllare la regione 0x300-0x31f.

  Come al solito, c' un limite di 11 parametri come in tutti i comandi
  di boot, quindi si possono specificare solo 5 regioni riservate per
  ciascun comando keyword.  Possono essere specificati pi reserve se si
  hanno richieste insolitamente complicate.


  10.2.  Usare un driver Ethernet come modulo


  La maggior parte delle distribuzioni di Linux utilizzano ora dei
  kernel con pochissi driver al loro interno.  I driver sono piuttosto
  forniti come gruppo di moduli indipendenti caricabili dinamicamente.
  Questi driver modulari sono tipicamente caricati dall'amministratore
  con il comando modprobe(8) o in alcuni casi sono automaticamente
  caricati dal kernel attraverso `kerneld' (nei 2.0) o `kmod' (nei 2.1)
  che a loro volta chiamano modprobe.

  La propria distribuzione pu offrire uno strumento grafico carino per
  l'impostazione dei moduli Ethernet.  Se possibile prima si dovrebbe
  provare a usare quello.  La descrizione che segue fornisce le
  informazioni che stanno sotto a qualsiasi programma di configurazione
  e indica cosa quei programmi vanno a modificare.

  Le informazioni che controllano quali moduli sono usati e quali
  opzioni sono passate a ciascun modulo sono solitamente salvate nel
  file /etc/conf.modules.  Le due opzioni principali di interesse per le
  schede Ethernet che saranno usate in questo file sono alias e options.
  Il comando modprobe consulta questo file per le informazioni sui
  moduli.

  I moduli stessi sono tipicamente salvati in una directory chiamata
  /lib/modules/`uname -r`/net dove il comando uname -r restituisce la
  versione del kernel (e.g. 2.0.34).  Si pu andare l per vedere quale
  modulo corrisponde alla propria scheda.

  La prima cosa che ci deve essere nel proprio file conf.modules 
  qualcosa che dice a modprobe quale driver usare per l'interfaccia di
  rete eth0 (e per eth1 e per...).   Per questa cosa si dovr usare il
  comando alias.  Per esempio, se si ha una scheda ISA EtherEZ della SMC
  che usa il modulo del driver smc-ultra.o, si deve creare alias per
  questo driver che corrisponda a eth0, aggiungendo la riga:


          alias eth0 smc-ultra



  L'altra cosa di cui si pu aver bisogno  una riga options che indica
  quali opzioni devono essere usate con un particolare modulo (o alias
  di modulo).  Continuando con l'esempio di prima, se si usa solamente
  la riga alias con nessuna riga options, il kernel avviser (si veda
  dmesg) che l'auto rilevamento di una scheda ISA non  una buona idea.
  Per venir a capo di questo problema, si aggiunga un'altra riga che
  dice al modulo a quale indirizzo I/O base  configurata la scheda, ad
  esempio l'indirizzo esadecimale 0x280.


          options smc-ultra io=0x280


  La maggior parte dei moduli ISA accettano parametri come io=0x340 e
  irq=12 sulla riga di comando di insmod. Fornire questi parametri 
  RICHIESTO o almeno CALDAMENTE CONSIGLIATO per evitare il rilevamento
  della scheda.  Diversamente dai dispositivi PCI e EISA, non c' alcun
  modo sicuro per fare l'auto rilevamento della maggior parte dei
  dispositivi ISA e quindi lo si dovrebbe evitare quando si usa un
  driver come modulo.

  Un elenco di tutte le opzioni che ciascun modulo accetta pu essere
  trovata nel file:

  /usr/src/linux/Documentation/networking/net-modules.txt

  Si raccomanda la sua lettura per trovare quali opzioni si possono
  usare con la propria scheda.  Si noti che alcuni moduli supportano un
  elenco di valori separati da virgola.  Solitamente questo  il caso di
  moduli che sono in grado di gestire pi dispositivi con un unico
  modulo, come tutti i driver basati su 8390 e il driver PLIP.  Per
  esempio:


  ______________________________________________________________________
          options 3c503 io=0x280,0x300,0x330,0x350 xcvr=0,1,0,1
  ______________________________________________________________________



  Con la riga precedente si avr un unico modulo che controlla quattro
  schede 3c503, con la scheda 2 e 4 che usano il tranceiver esterno.
  Non si aggiungano spazi attorno a `=' o alle virgole.

  Si noti inoltre che un modulo occupato non pu essere rimosso.  Ci
  significa che si dovr fare ifconfig eth0 down (disattivare la scheda
  Ethernet) prima di rimuovere il modulo.

  Il comando lsmod mostrer quali moduli sono caricati e se sono in uso,
  mentre il comando rmmod pu essere usato per rimuoverli.


  10.3.  Documentazione correlata


  La maggior parte dei queste informazioni provengono da messaggi che ho
  salvato dai gruppi comp.os.linux, che si sono dimostrati una
  insostituibile fonte di informazioni.  Altre informazioni utili
  provengono da un gruppo di piccoli file di Donald stesso.
  Naturalmente, se si sta impostando una scheda Ethernet, allora sar
  bene leggere il NET-2 Howto in modo che si possa realmente configurare
  il software che la user.  Inoltre, se ci si diverte a fare un po'
  l'hacker, si possono sempre trovare alcune informazioni addizionali
  nei file sorgente dei driver.  Solitamente prima che cominci il codice
  c' sempre un paragrafo o due che descrive i punti importanti.

  A quanti cercano informazioni che non sono in alcun modo specifiche su
  Linux (per esempio, cos' 10BaseT, cos' AUI, cosa fa un hub, ecc.)
  suggerisco caldamente di rivolgersi a newsgroup come
  comp.dcom.lans.ethernet e/o comp.sys.ibm.pc.hardware.networking.  Gli
  archivi dei newsgroup come quelli a dejanews.com possono essere una
  insostituibile fonte di informazioni.  Si possono prendere le FAQ da
  RTFM (che conserva tutte le FAQ dei newsgroup) al l'URL seguente:

  Usenet FAQs <ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/>

  Si pu anche dare un'occhiata alla cosiddetta `Ethernet-HomePage', che
   all'URL seguente:

  Ethernet-HomePage <http://wwwhost.ots.utexas.edu/ethernet/ethernet-
  home.html>



  10.4.  Liberatoria e copyright (in inglese)


  This document is not gospel. However, it is probably the most up to
  date info that you will be able to find. Nobody is responsible for
  what happens to your hardware but yourself. If your ethercard or any
  other hardware goes up in smoke (...nearly impossible!)  we take no
  responsibility. ie. THE AUTHORS ARE NOT RESPONSIBLE FOR ANY DAMAGES
  INCURRED DUE TO ACTIONS TAKEN BASED ON THE INFORMATION INCLUDED IN
  THIS DOCUMENT.

  This document is Copyright (c) 1993-1997 by Paul Gortmaker.
  Permission is granted to make and distribute verbatim copies of this
  manual provided the copyright notice and this permission notice are
  preserved on all copies.

  Permission is granted to copy and distribute modified versions of this
  document under the conditions for verbatim copying, provided that this
  copyright notice is included exactly as in the original, and that the
  entire resulting derived work is distributed under the terms of a
  permission notice identical to this one.

  Permission is granted to copy and distribute translations of this
  document into another language, under the above conditions for
  modified versions.

  A hint to people considering doing a translation.  First, translate
  the SGML source (available via FTP from the HowTo main site) so that
  you can then generate other output formats.  Be sure to keep a copy of
  the original English SGML source that you translated from! When an
  updated HowTo is released, get the new SGML source for that version,
  and then a simple diff -u old.sgml new.sgml will show you exactly what
  has changed so that you can easily incorporate those changes into your
  translated SMGL source without having to re-read or re-translate
  everything.

  If you are intending to incorporate this document into a published
  work, please make contact (via e-mail) so that you can be supplied
  with the most up to date information available. In the past, out of
  date versions of the Linux HowTo documents have been published, which
  caused the developers undue grief from being plagued with questions
  that were already answered in the up to date versions.


  10.5.  Chiusura


  Se in questo documento si  trovato un qualsiasi errore madornale o
  informazione non aggiornata, mi si mandi una e-mail.   grande ed 
  facile non accorgersi di qualcosa.  Se si  inviata una mail per una
  modifica e non  stata inclusa nella versione successiva, non si esiti
  a scrivere ancora, in quanto potrebbe essersi persa tra la marea di
  SPAM e junk mail che ricevo.

  Grazie!

  Paul Gortmaker, p_gortmaker@yahoo.com




  Firewalling and Proxy Server HOWTO
  Mark Grennan, markg@netplus.net
  v0.4, 8 Novembre 1996

  Questo documento si propone di insegnare le basi dei sistemi firewall
  e di fornire alcuni dettagli sull'impostazione del filtering e del
  proxy firewall su un PC basato su Linux. All'indirizzo http://okcfo
  rum.org/~markg/Firewall-HOWTO.html  disponibile una versione HTML di
  questo documento.

  1.  Introduzione

  Il Firewall-HOWTO originale  stato scritto da David Rudder,
  drig@execpc.com. Vorrei ringraziarlo per avermi consentito di
  aggiornare il suo lavoro.

  I Firewall hanno raggiunto una grande popolarit recentemente come
  ultima novit in fatto di Sicurezza in Internet. Come accade per tutte
  le cose che hanno successo, insieme alla fama sono iniziate le
  incomprensioni. Questo HOWTO spiegher i concetti base su a cosa  un
  firewall, come impostarne uno, cosa sono i proxy server, come
  impostare i proxy server e le applicazioni di questa tecnologia al di
  fuori delle cose strettamente connesse con la sicurezza.


  1.1.  Commenti

  Qualsiasi commento  pi che benvenuto. SIETE PREGATI DI COMUNICARE
  OGNI INESATTEZZA CONTENUTA IN QUESTO DOCUMENTO!!! Sono un essere
  umano, e come tale incline a commettere degli errori. Se ne
  riscontrate, renderli noti  nel mio interesse. Cercher di rispondere
  a tutte le e-mail, ma poich sono molto occupato, non offendetevi se
  non potr farlo.

  Il mio indirizzo email  markg@netplus.net.


  1.2.  Avvertenze

  NON SONO RESPONSABILE DI EVENTUALI DANNI CAUSATI DA AZIONI BASATE SUL
  CONTENUTO DI QUESTO DOCUMENTO. Deve essere visto come un'introduzione
  al modo di lavorare dei firewall e dei proxy server. Non sono, e non
  pretendo di esserlo, un esperto di sicurezza. Sono solo una persona
  che ha letto troppi libri e che ama i computer pi di molta altra
  gente. Vi prego di capire che sto scrivendo questo documento per
  aiutare la gente ad informarsi sull'argomento, ma non posso
  scommettere sull'accuratezza del suo contenuto.


  1.3.  Copyright (in inglese)

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator.


  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have any questions, please contact Mark Grennan at
  <markg@netplus.net>.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.


  Se non specificato diversamente, il copyright dei documenti HOWTO di
  Linux appartiene ai loro rispettivi autori. I documenti HOWTO di Linux
  possono essere riprodotti e distribuiti nella totalit o in parte, su
  ogni mezzo fisico o elettronico, purch questo messaggio sia contenuto
  in tutte le copie.  consentita e incoraggiata la ridistribuzione
  commerciale; tuttavia, all'autore piacerebbe ricevere informazioni su
  ciascuna di tali distribuzioni.

  Tutte le traduzioni, lavori derivati o lavori aggregati che contengono
  qualsiasi documento HOWTO di Linux devono essere ricoperti da questo
  messaggio di copyright. Ossia, non  possibile produrre un lavoro
  derivato da un HOWTO e imporre delle restrizioni addizionali alla sua
  distribuzione. Eventuali eccezioni a queste regole possono essere
  concesse sotto particolari condizioni; si prega di contattare il
  coordinatore degli HOWTO di Linux.

  In breve, desideriamo promuovere la diffusione di queste informazioni
  attraverso pi canali possibile. Tuttavia, vogliamo mantenere il
  copyright sui documenti HOWTO, e gradiremmo essere informati su
  qualsiasi intenzione di ridistribuire gli HOWTO.

  Per qualsiasi domanda, contattare Mark Grennan all'indirizzo
  <markg@netplus.net>.


  1.4.  Perch ho scritto questo documento

  Anche se durante gli ultimi anni si sono svolte molte discussioni
  relative al firewalling su comp.os.linux.*, ho trovato difficile
  reperire le informazioni necessarie per impostare un firewall. La
  versione originale di questo HOWTO  stata utile ma incompleta. Spero
  che questa versione del Firewall HOWTO di David Rudder possa fornire a
  chiunque le informazioni necessarie per creare un firewall funzionante
  in poche ore e non in alcune settimane.

  Sento anche di dover restituire qualcosa alla comunit di Linux.


  1.5.  Da fare


    Dare un po' di istruzioni sull'impostazione dei client

    Trovare un buon proxy server UDP che funzioni con Linux


  1.6.  Ulteriore documentazione


    Il NET-2 HOWTO


    L'Ethernet HOWTO

    Il Multiple Ethernet Mini HOWTO

    Networking with Linux

    Il PPP HOWTO

    TCP/IP Network Administrator's Guide di O'Reilly and Associates

    La documentazione per il TIS Firewall Toolkit

  Il sito web della Trusted Information System (TIS) contiene una grande
  quantit di documentazione sui firewall e materiale correlato:
  http://www.tis.com/.

  Inoltre, sto lavorando su un progetto di sicurezza chiamato Secure
  Linux. Sul sito web di Secure Linux sto raccogliendo tutte le
  informazioni, la documentazione e i programmi necessari per creare un
  sistema Linux affidabile. Inviatemi una email se desiderate ricevere
  delle informazioni.


  2.  Comprendere i Firewall

  Firewall (che significa letteralmente 'parafiamme', n.d.t.)  un
  termine utilizzato per una parte dell'automobile. In essa, i firewall
  sono degli oggetti fisici che separano il motore dai passeggeri.
  Servono per proteggere i passeggeri nel caso in cui il motore si
  incendi, fornendo nel contempo al guidatore la possibilit di accedere
  ai controlli del motore.

  Un firewall nei computer  un dispositivo che protegge una rete
  privata dalla parte pubblica (ossia dal resto di Internet).

  Un computer firewall, d'ora in poi denominato "firewall",  in grado
  di raggiungere sia la rete protetta, sia Internet. La rete protetta
  non pu raggiungere Internet, e Internet non pu raggiungere la rete
  protetta.

  Alcuni, per raggiungere Internet dall'interno della rete protetta,
  devono eseguire un telnet al firewall e da qui possono utilizzare
  Internet.

  La forma pi semplice di un firewall consiste in un sistema "dual
  homed" (ossia, un sistema con due connessioni di rete). Se ci si pu
  fidare completamente di TUTTI i propri utenti,  possibile configurare
  in modo semplice Linux (compilarlo disabilitando l'opzione di IP
  forwarding/gatewaying!) e fornire a tutti un account su di esso. In
  questo modo, gli utenti potranno collegarsi a tale sistema ed eseguire
  telnet, FTP, leggere la posta, e utilizzare ogni altro servizio
  fornito. Con questa impostazione, l'unico computer sulla propria rete
  privata che conosce tutto del mondo esterno  il firewall. Un altro
  sistema sulla propria rete protetta non necessita neanche di un
  instradamento predefinito ("default route").

  Questo va sottilineato: affinch il firewall suddetto funzioni CI SI
  DEVE POTER FIDARE DI TUTTI I PROPRI UTENTI! Per questo motivo non lo
  consiglio.


  2.1.  Svantaggi dei Firewall

  Il problema con i firewall filtranti deriva dal fatto che inibiscono
  l'accesso alla propria rete da Internet.  posibile accedere ai soli
  servizi sui sistemi che contengono dei filtri di passaggio ("pass
  filter"). Con un proxy server gli utenti possono connettersi al
  firewall e accedere a ogni sistema all'interno della rete privata a
  cui hanno accesso.

  Inoltre, stanno nascendo quasi ogni giorno nuove tipologie di client e
  server. Quando questo accade,  necessario trovare un nuovo modo per
  consentire un accesso controllato prima che il servizio possa essere
  utilizzato.


  2.2.  Tipi di Firewall

  Esistono due tipologie di firewall.


  1. Firewall IP o Filtranti - che bloccano tutto ad eccezione del
     traffico di rete selezionato.

  2. Proxy Server - che creano le connessioni di rete per voi.


  2.2.1.  Firewall IP Filtranti

  Un firewall filtrante IP funziona a livello di pacchetto.  progettato
  per controllare il flusso di pacchetti basandosi sulla sorgente, sulla
  destinazione, sulla porta e sull'informazione sul tipo di pacchetto
  contenuto in ciascun pacchetto.

  Questo tipo di firewall  molto sicuro ma  carente in ogni forma
  utile di registrazione delle attivit ("logging"). Pu bloccare
  l'accesso degli utenti al sistema privato ma non  in grado di dire
  chi ha eseguito l'accesso ai propri sistemi pubblici o chi ha usato
  Internet dall'interno.

  I firewall filtranti sono filtri assoluti. Se si vuole dare a qualcuno
  un accesso esterno ai propri server privati, non  possibile farlo
  senza dare a tutti l'accesso ai server.

  Linux ha nel kernel un software di filtraggio dei pacchetti a partire
  dalla versione 1.3.x.


  2.2.2.  Proxy Server

  I Proxy server consentono l'accesso indiretto a Internet attraverso il
  firewall. Il migliore esempio di come ci funziona  fornito dal caso
  di una persona che esegue un telnet a un sistema e da qui esegue
  nuovamente il telnet a un altro sistema. Tale processo  automatico
  solo con un proxy server. Quando ci si connette a un proxy server con
  il proprio software client, il proxy server avvia il suo software
  client (proxy) e fornisce i dati.

  Dal momento che i proxy server duplicano tutte le comunicazioni, sono
  in grado di mantenere il log di tutto quello che fanno.

  Un grande vantaggio dei proxy server consiste nel fatto che sono
  completamente sicuri, se configurati correttamente. Non consentiranno
  a qualcuno di attraversarli. Non ci sono instradamenti IP diretti.


  3.  Impostazione del Firewall

  3.1.  Requisiti hardware

  Nel nostro esempio, il computer  un 486-DX66 con 16 MB di memoria e
  500MB di partizione Linux. Questo sistema possiede due schede di rete:
  una connessa alla propria LAN privata, l'altra connessa alla LAN che
  chiameremo 'zona demilitarizzata' (DMZ). Alla DMZ  connesso un
  router, a sua volta connesso ad Internet.

  Questa  una configurazione abbastanza standard, comunque si potrebbe
  utilizzare una scheda di rete e un modem con PPP per connettersi ad
  Internet. Il punto  che il firewall deve avere due numeri di rete IP.

  Conosco molte persone che hanno a casa propria una piccola LAN con due
  o tre computer collegati ad essa. Si potrebbe pensare di mettere tutti
  i propri modem in un box Linux (magari un vecchio 386) e connetterli
  tutti ad Internet con un bilanciamento del carico (EQL). Con questa
  impostazione, quando solo una persona riceve dei dati ha a
  disposizione entrambi i modem duplicando quindi la velocit di
  trasferimento. :-)


  4.  Software per firewall

  4.1.  Pacchetti disponibili

  Se tutto quello che si desidera  un firewall filtrante,  necessario
  solamente Linux e i pacchetti di rete basilari. Un pacchetto che
  potrebbe non essere incluso nella propria distribuzione  l'IP
  Firewall Administration tool.

  (IPFWADM) Si trova su http://www.xos.nl/linux/ipfwadm/.

  Se si vuole impostare un proxy server sar necessario uno dei seguenti
  pacchetti:


  1. SOCKS

  2. TIS Firewall Toolkit (FWTK)


  4.2.  Confronto tra TIS Firewall Toolkit e SOCKS

  La Trusted Information System (http://www.tis.com) ha messo a
  disposizione un insieme di programmi studiati per facilitare il
  `firewalling'. I programmi fanno sostanzialmente le stesse cose fatte
  dal pacchetto SOCKS, ma con una strategia di progettazione differente.
  Mentre Socks ha un solo programma che copre tutte le transazioni con
  Internet, TIS fornisce un programma per ogni utility che intenda
  utilizzare il firewall.

  Per fare un paragone, utilizziamo l'esempio dell'accesso world wide
  web e Telnet. Con SOCKS, si imposta un file di configurazione e un
  demone.  Attraverso questo file e questo demone, sono abilitati sia
  telnet che WWW, come pure ogni altro servizio che non  stato
  disabilitato.

  Con il toolkit TIS, si imposta un demone per il WWW e uno per telnet,
  come pure un file di configurazione per ognuno di essi. Dopo aver
  fatto questo, altri accessi ad Internet sono proibiti se non impostati
  esplicitamente. Se non  stato fornito il demone per una utility
  specifica (come, ad esempio, talk), esiste un demone "plug-in", ma non
  pu essere considerato n cos flessibile, n cos semplice da
  impostare, come gli altri tool.

  Sebbene possa sembrare una cosa di poco conto, si tratta invece di una
  differenza sostanziale. SOCKS permette di essere 'trasandati'. Con un
  server SOCKS impostato con superficialit, qualcuno dall'interno
  potrebbe ottenete un accesso ad Internet maggiore di di quanto si
  desiderasse consentire. Con il toolkit TIS, le persone dall'interno
  avranno solo gli accessi desiderati dall'amministratore del sistema.

  SOCKS  pi semplice da impostare, pi facile da compilare e consente
  una flessibilit maggiore. Il tollkit TIS  pi sicuro se si vogliono
  regolamentare gli utenti all'interno della rete protetta. Entrambi
  forniscono protezione assoluta dall'esterno.

  Verr di seguito trattata l'installazione e l'impostazione di
  entrambi.


  5.  Preparazione del sistema Linux

  5.1.  Compilazione del kernel

  Si inizi con un'installazione pulita della propria distribuzione Linux
  (io ho utilizzato RedHat 3.0.3 e gli esempi qui riportati si basano su
  questa distribuzione). Meno software  stato installato, meno buchi,
  porte di servizio ("backdoor") e/o bachi ci saranno in grado di
  introdurre problemi di sicurezza nel proprio sistema; pertanto si
  installi solamente un insieme minimo di applicazioni.

  Si prenda un kernel stabile. Io ho utilizzato il kernel Linux 2.0.14
  per il mio sistema. Pertanto, questa documentazione si basa sulle sue
  impostazioni.

   necessario ricompilare il kernel Linux con le opzioni appropriate. A
  questo punto, sarebbe utile dare un'occhiata al Kernel HOWTO,
  all'Ethernet HOWTO, e il NET-2 HOWTO se non lo si ha ancora fatto.

  Di seguito sono riportate le releative impostazioni di rete, che so
  funzionanti nel 'make config';


  1. Sotto "General setup"

     a. Abilitare il "Networking Support"

  2. Sotto "Networking Options"

     a. Abilitare "Network firewalls"

     b. Abilitare "TCP/IP Networking"

     c. Disabilitare "IP forwarding/gatewaying" (A MENO CHE non si
        voglia usare il filtraggio IP)

     d. Abilitare "IP Firewalling"

     e. Abilitare "IP firewall packet loggin" (ci non  strettamente
        necessario ma  comunque una buona idea)

     f. Disabilitare "IP: masquerading" (non trattero questa cosa qui.)

     g. Abilitare "IP: accounting"

     h. Disbilitare "IP: tunneling"

     i. Disbilitare "IP: aliasing"

     j. Dibilitare "IP: PC/TCP compatibility mode"

     k. Disabilitare "IP: Reverse ARP"

     l. Abilitare "Drop source routed frames"

  3. Sotto "Network device support"

     a. Abilitare "Network device support"

     b. Abilitare "Dummy net driver support"

     c. Abilitare "Ethernet (10 or 100Mbit)"

     d. Selezionare la propria scheda di rete


  Ora  possibile ricompilare, reinstallare il kernel e riavviare il
  sistema. La propria scheda (o schede) di rete dovrebbe essere mostrata
  nella sequenza di avvio. Se questo non accade, consultare nuovamente
  gli altri HOWTO finch non funziona.


  5.2.  Configurazione di due schede di rete

  Se il proprio computer possiede due schede di rete, molto
  probabilmente ci sar bisogno di inserire un'istruzione "append" nel
  proprio file /etc/lilo.conf per descrivere l'IRQ e l'indirizzo di
  entrambe le schede. L'istruzione che io uso per lilo :

          append="ether=12,0x300,eth0 ether=15,0x340,eth1"




  5.3.  Configurazione degli indirizzi di rete

  Questa  una parte molto interessante. Devono essere prese alcune
  decisioni. Dal momento che non desideriamo che Intenet abbia accesso
  ad alcuna parte della rete privata, non abbiamo bisogno di utilizzare
  degli indirizzi reali. Esistono molti indirizzi internet messi da
  parte per le reti private. Dal momento che ognuno ha bisogno di pi
  indirizzi e questi indirizzi non possono attraversare Internet, si
  tratta di una buona scelta.

  Tra quelli messi da parte c' 192.168.2.xxx che utilizzeremo nei
  nostri esempi.

  Il proprio proxy firewall sar un membro di entrambe le reti, pertanto
  sar in grado di passare i dati da e verso la rete privata.


              199.1.2.10   __________    192.168.2.1
        _  __  _        \ |          | /           _______________
       | \/  \/ |        \| Firewall |/           |               |
      / Internet \--------|  System  |------------| Workstation/s |
      \_/\_/\_/\_/        |__________|            |_______________|



  Se si ha intenzione di utilizzare un firewall filtrante,  ancora
  possibile utilizzare questi numeri. Per affinch ci sia possibile si
  deve usare il mascheramento IP. Con questo processo il firewall
  inoltrer i pacchetti e li tradurr in indirizzi IP "REALI" per
  viaggiare su Internet.

   necessario assegnare alla scheda di rete l'indirizzo IP reale sul
  lato Internet, ed assegnare 192.168.2.1 alla scheda Ethernet sul lato
  interno. Questo sar il proprio indirizzo IP proxy/gateway. 
  possibile assegnare a tutte le altre macchine nella rete protetta dei
  numeri all'interno del range 192.168.2.xxx (da 192.168.2.2 a
  192.168.2.254).
  Dal momento che utilizzo Linux RedHat per configurare la rete
  all'avvio del sistema, ho aggiunto un file 'ifcfg-eth1' nella
  directory /etc/sysconfig/network-scripts. Questo file viene letto
  durante il processo di boot per impostare la rete e le tabelle di
  instradamento.

  Il mio file ifcfg-eth1  una cosa del genere:


      #!/bin/sh
      #>>>Tipo di dispositivo: ethernet
      #>>>Dichiarazioni delle variabili:
      DEVICE=eth1
      IPADDR=192.168.2.1
      NETMASK=255.255.255.0
      NETWORK=192.168.2.0
      BROADCAST=192.168.2.255
      GATEWAY=199.1.2.10
      ONBOOT=yes
      #>>>Fine delle dichiarazioni delle variabili



   anche possibile utilizzare questi script per connettersi
  automaticamente via modem al proprio provider. Si dia un'occhiata allo
  script ipup-ppp.

  Se si ha intenzione di utilizzare un modem per le proprie connessioni
  Internet, il proprio indirizzo IP esterno verr assegnato dal provider
  al momento della connessione.


  5.4.  Verifica del funzionamento della rete

  Si inizi controllando con ifconfig e route. Se si possiedono due
  schede di rete l'output di ifconfig dovrebbe assomigliare a:


    #ifconfig
    lo        Link encap:Local Loopback
              inet addr:127.0.0.0  Bcast:127.255.255.255  Mask:255.0.0.0
              UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
              RX packets:1620 errors:0 dropped:0 overruns:0
              TX packets:1620 errors:0 dropped:0 overruns:0

    eth0      Link encap:10Mbps Ethernet  HWaddr 00:00:09:85:AC:55
              inet addr:199.1.2.10 Bcast:199.1.2.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0
              TX packets:0 errors:0 dropped:0 overruns:0
              Interrupt:12 Base address:0x310

    eth1      Link encap:10Mbps Ethernet  HWaddr 00:00:09:80:1E:D7
              inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0
              TX packets:0 errors:0 dropped:0 overruns:0
              Interrupt:15 Base address:0x350



  e la propria tabella di instradamento dovrebbe essere:




    #route -n
    Kernel routing table
    Destination     Gateway         Genmask         Flags MSS    Window Use Iface
    199.1.2.0       *               255.255.255.0   U     1500   0       15 eth0
    192.168.2.0     *               255.255.255.0   U     1500   0        0 eth1
    127.0.0.0       *               255.0.0.0       U     3584   0        2 lo
    default         199.1.2.10      *               UG    1500   0       72 eth0



  Nota: 199.1.2.0  il lato Internet di questo firewall e 192.168.2.0 
  il lato privato.

  Ora si provi a fare ping ad internet dal firewall. Io di solito
  utilizzo nic.ddn.mil come sito per il test. Si tratta ancora di un
  buon test, tuttavia  stato dimostrato che  meno affidabile di quanto
  sperassi. Se non funziona immediatamente, si tenti di eseguire il ping
  ad un paio di altri siti non connessi alla propria LAN. Se non
  funziona, significa che il proprio PPP non  impostato correttamente.
  Si rilegga il NET-2 HOWTO, e si ritenti.

  A questo punto, tentare il ping ad un host all'interno della rete
  protetta dal firewall. Tutti i computer dovrebbero essere in grado di
  eseguire il ping l'uno con l'altro. Se questo non accade, leggere
  nuovamente il NET-2 HOWTO e lavorare ancora un po' sulla rete.

  Ora si provi a fare ping all'indirizzo esterno del firewall
  dall'interno della rete protetta (NOTA: questo non  nessuno dei
  numeri IP 192.168.2.xxx). Se  stato possibile, non  stato
  disabilitato l'IP Forwarding.  Assicurarsi che ci sia quello che si
  desidera. Se lo si lascia abilitato sar necessario leggere anche il
  paragrafo relativo al filtraggio IP all'interno di questo documento.

  Adesso, tentare di eseguire il ping ad Internet dall'interno del
  proprio firewall. Utilizzare lo stesso indirizzo che prima funzionava
  (ossia, nic.ddn.mil). Ancora una volta, se l'IP Forwarding 
  disabilitato, questo tentativo non dovrebbe funzionare. Ma se 
  abilitato, dovrebbe farlo.

  Se  abilitato l'IP Forwarding e si sta utilizzando un indirizzo IP
  "REALE" (non 192.168.2.*) per la propria rete privata, e non si riesce
  ad eseguire il ping ad Internet sebbene lo si riesca a fare al lato
  Internet del proprio firewall, controllare se il router successivo
  stia in effetti instradando pacchetti per il proprio indirizzo privato
  (potrebbe accadere che il proprio provider lo debba fare per noi).

  Se si  assegnata la propria rete protetta a 192.168.2.*, nessun
  pacchetto pu essere instradato ad essa. Se si  abilitato il
  mascheramento IP, questa verifica dovrebbe funzionare.

  Ora il vostro sistema di base  impostato.


  5.5.  Sicurezza del Firewall

  Un firewall non  di nessuna utilit se lasciato aperto agli attacchi
  effettuabili attraverso un servizio non utilizzato. Un 'cattivone'
  potrebbe ottenere l'accesso al firewall e modificarlo secondo le
  proprie esigenze.

  Si inizi disabilitando di tutti i servizi non necessari. Si dia
  un'occhiata al file /etc/inetd.conf. Questo file controlla quello ci
  viene detto un "super server". Controlla una grande quantit di demoni
  del server e li avvia quando richiesto.


  Si disabiliti una volta per tutte netstat, systat, tftp, bootp e
  finger. Per disabilitare un servizio, mettere un # come primo
  carattere della linea del servizio. Una volta fatto, inviare un SIG-
  HUP al processo digitando il comando "kill -HUP <pid>", dove <pid> 
  il numero di processo di inetd. Ci far s che inetd rilegga il suo
  file di configurazione (inetd.conf) e si riavvii.

  Verificare l'impostazione eseguendo un telnet alla porta 15 sul
  firewall, la porta netstat. Se si ottiene l'output di netstat, non 
  stato riavviato correttamente inetd.


  6.  Impostazione del filtraggio IP (IPFWADM)

  Per iniziare, si dovrebbe aver abilitato l'IP Forwarding nel proprio
  kernel e il proprio sistema dovrebbe essere avviato ed eseguire il
  forwarding di qualsiasi cosa gli venga inviata. Le proprie tabelle di
  instradamento dovrebbero essere a posto e si dovrebbe essere in grado
  di accedere a qualsiasi cosa, sia dall'interno verso l'esterno, che
  dall'esterno verso l'interno.

  Ma dal momento che sta costruendo un firewall, si deve cominciare
  limitando quello a cui tutti hanno accesso.

  Nel mio sistema ho creato un paio di script per impostare la politica
  di forwarding e di accounting. Questi script vengono richiamati dagli
  script /etc/rc.d, pertanto il mio sistema viene configurato al momento
  dell'avvio.

  Di default il sistema di IP Forwarding nel kernel Linux inoltra tutto.
  Per questo motivo, il proprio script firewall dovrebbe iniziare con il
  negare l'accesso a tutto e reimpostare tutte le regole ipfw che
  c'erano l'ultima volta che  stato eseguito. Questo script permette di
  ottenere l'effetto desiderato.


    #
    # Imposta IP packet Accounting e Forwarding
    #
    #   Forwarding
    #
    # Di default NEGA tutti i servizi
    ipfwadm -F -p deny
    # Scarica tutti i comandi
    ipfwadm -F -f
    ipfwadm -I -f
    ipfwadm -O -f



  Ora abbiamo il firewall finale. Niente pu attraversarlo. Senza dubbio
  esistono dei servizi verso i quali  necessario l'inoltro (forward),
  pertanto seguono alcuni esempi che potrebbero essere utili.













    # Inoltro delle email al proprio server
    ipfwadm -F -a accept -b -P tcp -S 0.0.0.0/0 1024:65535 -D 192.1.2.10 25

    # Inoltro delle connessioni email verso server email esterni
    ipfwadm -F -a accept -b -P tcp -S 196.1.2.10 25 -D 0.0.0.0/0 1024:65535

    # Inoltro delle connessioni Web al proprio Web Server
    /sbin/ipfwadm -F -a accept -b -P tcp -S 0.0.0.0/0 1024:65535 -D 196.1.2.11 80

    # Inoltro delle connessioni Web a un Web Server esterno
    /sbin/ipfwadm -F -a accept -b -P tcp -S 196.1.2.* 80 -D 0.0.0.0/0 1024:65535

    # Inoltro del traffico DNS
    /sbin/ipfwadm -F -a accept -b -P udp -S 0.0.0.0/0 53 -D 196.1.2.0/24



   probabile che siate anche interessati all'avere un resoconto del
  traffico che passa attraverso il proprio firewall. Questo script conta
  ogni pacchetto. Si potrebbe aggiungere una riga o due per contare solo
  i pacchetti che vanno verso un singolo sistema.


    # Scarica tutte le regole di accounting correnti
    ipfwadm -A -f
    # Accounting
    /sbin/ipfwadm -A -f
    /sbin/ipfwadm -A out -i -S 196.1.2.0/24 -D 0.0.0.0/0
    /sbin/ipfwadm -A out -i -S 0.0.0.0/0 -D 196.1.2.0/24
    /sbin/ipfwadm -A in -i -S 196.1.2.0/24 -D 0.0.0.0/0
    /sbin/ipfwadm -A in -i -S 0.0.0.0/0 -D 196.1.2.0/24



  Se tutto quello che si voleva era un firewall filtrante, ci si pu
  fermare qui.


  7.  Installazione del Proxy Server TIS

  7.1.  Come ottenere il software


  Il TIS FWTK  disponibile presso ftp://ftp.tis.com/.

  Non ripetete il mio errore. Quando si esegue l'ftp dei file da TIS, SI
  LEGGA IL README. L'fwtk TIS si trova in una directory nascosta sul
  loro server. TIS richiede che si invii una email a fwtk-
  request@tis.com con sola la parola SEND  nel corpo del messaggio per
  sapere il nome di questa directory nascosta. Il loro sistema, quindi,
  invier in risposta il nome della directory (valida per 12 ore) per
  eseguire il download dei sorgenti.

  Mentre sto scrivendo questo documento TIS sta rilasciando la versione
  2.0 (beta) dell'FWTK. Questa versione sembra non avere problemi di
  compilazione (con alcune eccezioni) e tutto sembra funzionare per il
  meglio. Nel seguito verr trattata proprio questa versione. Quando
  verr rilasciato il codice finale, aggiorner l'HOWTO.

  Per installare l'FWTK, creare una directory fwtk-2.0 all'interno della
  propria directory /usr/src. Spostare la copia dell'FWTK
  (fwtk-2.0.tar.gz) in questa directory ed eseguire l'untar (tar zxf
  fwtk-2.0.tar.gz).

  L'FWTK non fa il proxy di documenti web SSL, ma esiste un'aggiunta
  scritta da Jean-Christophe Touvet.  disponibile presso
  ftp://ftp.edelweb.fr/pub/contrib/fwtk/ssl-gw.tar.Z. Touvet non
  supporta questo codice.

  Io sto usando una versione modificata che include l'accesso ai server
  news sicuri di Netscape scritta da Eric Wedel.  disponibile presso
  ftp://mdi.meridian-data.com/pub/tis.fwtk/ssl-gw/ssl-gw2.tar.Z.

  Nell'esempio verr utilizzata la versione di Eric Wedel.

  Per installarla, creare semplicemente una directory ssl-gw all'interno
  della propria directory /usr/src/fwtk-2.0 e metterci i file.

  Quando ho installato questo gateway, sono state necessarie alcune
  modifiche prima di poter essere compilato con il resto del toolkit.

  La prima modifica ha riguardato il file ssl-gw.c. Ho scoperto che non
  includeva un file include necessario.


    #if defined(__linux)
    #include        <sys/ioctl.h>
    #endif



  In secondo luogo, c'erano problemi con il Makefile. Ne ho copiato uno
  dalle altre directory gateway e ho sosrituito il nome del gateway con
  ssl-gw.


  7.2.  Compilazione dell'FWTK TIS

  La versione 2.0 dell'FWTK pu esere compilata molto pi facilmente
  rispetto alle versioni pi vecchie. Ho trovato un altro paio di cose
  da modificare prima di poter compilare correttamente la versione BETA.
  Si spera che queste modifiche siano fatte nella versione finale.

  Per correggere il tutto, si inizi spostandosi nella directory
  /usr/src/fwtk/fwtk e copiando il file Makefile.config.linux sul file
  Makefile.config.

  NON ESEGUIRE FIXMAKE. Le istruzioni dicono di farlo. Ma se viene
  fatto, roviner i makefile in ogni directory.

  Il problema dipende dal fatto che lo script sed aggiunge un '.' ' e un
  '' alla riga include di ogni Makefile. Questo script sed funziona.


    sed 's/^include[        ]*\([^  ].*\)/include \1/' $name .proto > $name



  Per continuare, bisogna modificare il file Makefile.config. Queste
  sono le due modifiche che dobbiamo fare.

  L'autore ha impostato la directory sorgente nella propria home
  directory. Stiamo compilando il codice in /usr/src, pertanto si
  dovrebbe cambiare la variabile FWTKSRCDIR.


    FWTKSRCDIR=/usr/src/fwtk/fwtk



  In secondo luogo, almeno qualche sistema Linux utilizza il database
  gdbm. Il Makefile.config usa dbm. Potreste aver bisogno di modificare
  questo. Io l'ho dovuto fare per RedHat 3.0.3.


    DBMLIB=-lgdbm



  L'ultimoa correzione riguarda l'x-gw. Il baco nella versione BETA
  risiede nel codice socket.c. Per sistemarlo, rimuovere le seguenti
  righe di codice.


    #ifdef SCM_RIGHTS  /* 4.3BSD Reno and later */
                         + sizeof(un_name->sun_len) + 1
    #endif



  Se  stato aggiunto ssl-gw alla propria directory sorgente FWTK, sar
  necessario aggiungerlo alla lista delle directory nel Makefile.


    DIRS=   smap smapd netacl plug-gw ftp-gw tn-gw rlogin-gw http-gw x-gw ssl-gw



  Ora eseguire make.


  7.3.  Installazione dell'FWTK TIS

  Eseguire make install.

  La directory di installazione di default  /usr/local/etc. Potrebbe
  essere sostituita (anch'io l'ho fatto) con una directory pi sicura.
  Ho deciso di modificare l'accesso a questa directory con 'chmod 700'.

  Ora non resta che configurare il firewall.


  7.4.  Configurazione dell'FWTK TIS

  Ora inizia il divertimento. Bisogna insegnare al sistema a chiamare
  questi nuovi servizi e a creare le tabelle per controllarli.

  Non ho intenzione di riscrivere il manuale di FWTK TIS in questo
  documento. Mostrer semplicemente le impostazioni che si sono
  dimostrate funzionanti, inoltre spiegher i problemi che ho
  riscontrato e come sono riuscito a superarli.

  I file che determinano i controlli sono tre.



     /etc/services
        Dice al sistema su quali porte si trova un servizio.

     /etc/inetd.conf
        Dice a inetd quale programma chiamare quando qualcuno "bussa"
        alla porta di un servizio.

     /usr/local/etc/netperm-table
        Dice ai servizi dell'FWTK a chi abilitare e a chi negare un
        servizio.


  Per fare in modo che l'FWTK funzioni, questi file dovrebbero essere
  modificati partendo dall'ultimo. La modifica dei file services senza
  che siano stati impostati correttamente il file inetd.conf o netperm-
  table potrebbe rendere il sistema inaccessibile.


  7.4.1.  Il file netperm-table

  Questo file controlla chi pu accedere ai servizi dell'FWTK TIS.
  Bisognerebbe considerare il traffico utilizzando il firewall da
  entrambe le parti. Gli utenti all'esterno della propria rete
  dovrebbero identificarsi prima di ottenere l'accesso, ma gli utenti
  dall'interno della propria rete potrebbero avere il permesso per
  attraversarlo semplicemente.

  Il firewall utilizza un programma denominato authsrv per mantenere un
  database degli user ID e delle password degli utenti. La sezione per
  l'autenticazione di netperm-table controlla dove risiede il database e
  chi pu accedervi.

  Ho avuto qualche problema nel chiudere l'accesso a questo servizio. Si
  noti che la riga premit-hosts mostrata utilizza un '*' per dare
  l'accesso a tutti. L'impostazione corretta per questa riga consiste in
  ''authsrv: premit-hosts localhost'' se siete in grado di renderla
  funzionante.


    #
    # Tabella di configurazione del Proxy
    #
    # Regole di autentificazione di server e client
    authsrv:      database /usr/local/etc/fw-authdb
    authsrv:      permit-hosts *
    authsrv:      badsleep 1200
    authsrv:      nobogus true
    # Applicazioni Client che usano il server di Autentificazione
    *:            authserver 127.0.0.1 114



  Per inizializzare il database, si faccia su a root ed si esegua
  ./authsrv nella directory /var/local/etc per creare il registro utenti
  amministrativo. Viene di seguito riportato una sessione d'esempio.

  Si invita a leggere la documentazione FWTK per imparare ad aggiungere
  utenti e gruppi.




















      #
      # authsrv
      authsrv# list
      authsrv# adduser admin "Auth DB admin"
      ok - user added initially disabled
      authsrv# ena admin
      enabled
      authsrv# proto admin pass
      changed
      authsrv# pass admin "plugh"
      Password changed.
      authsrv# superwiz admin
      set wizard
      authsrv# list
      Report for users in database
      user   group  longname           ok?    proto   last
      ------ ------ ------------------ -----  ------  -----
      admin         Auth DB admin      ena    passw   never
      authsrv# display admin
      Report for user admin (Auth DB admin)
      Authentication protocol: password
      Flags: WIZARD
      authsrv# ^D
      EOT
      #



  I controlli del gateway telnet (tn-gw) sono i primi da impostare.

  Nell'esempio, ho supposto che gli host all'interno della rete privata
  possano passare senza autenticarsi (permit-hosts 19961.2.*  -passok).
  Tuttavia, ogni altro utente deve inserire il proprio user ID e
  password per utilizzare il proxy (permit-hosts * -auth).

  Inoltre, consento a un altro sistema (196.1.2.202) di accedere
  direttamente al firewall senza passare attraverso il firewall stesso.
  Le due righe inetacl-in.telnetd definiscono questo. Pi avanti viene
  spiegato come sono richiamate queste righe.

  Il timeout Telnet dovrebbe essere mantenuto breve.


    # regole del gateway telnet:
    tn-gw:                denial-msg      /usr/local/etc/tn-deny.txt
    tn-gw:                welcome-msg     /usr/local/etc/tn-welcome.txt
    tn-gw:                help-msg        /usr/local/etc/tn-help.txt
    tn-gw:                timeout 90
    tn-gw:                permit-hosts 196.1.2.* -passok -xok
    tn-gw:                permit-hosts * -auth
    # Solo l'amministratore pu fare telnet direttamente al Firewal
    # tramite la Porta 24
    netacl-in.telnetd: permit-hosts 196.1.2.202 -exec /usr/sbin/in.telnetd



  I comandi r funzionano nello stesso modo di telnet.









    # regole gateway rlogin:
    rlogin-gw:    denial-msg      /usr/local/etc/rlogin-deny.txt
    rlogin-gw:    welcome-msg     /usr/local/etc/rlogin-welcome.txt
    rlogin-gw:    help-msg        /usr/local/etc/rlogin-help.txt
    rlogin-gw:    timeout 90
    rlogin-gw:    permit-hosts 196.1.2.* -passok -xok
    rlogin-gw:    permit-hosts * -auth -xok
    # Solo l'Amministratore pu eseguire direttamente il telnet al Firewall
    netacl-rlogind: permit-hosts 196.1.2.202 -exec /usr/libexec/rlogind -a



   consigliabile che nessuno possa accedere direttamente al firewall,
  incluso l'accesso in FTP. Pertanto, non mettere un server FTP sul
  proprio firewall.

  Inoltre, la riga permit-hosts consente a chiunque all'interno della
  rete protetta di accedere liberamente ad Internet, mentre tutti gli
  altri devono autenticarsi. Ai miei controlli sono stati aggiunti i log
  di ogni file inviato e ricevuto (-log { retr stor }).

  Il timeout ftp controlla quanto tempo ci vuole per far cadere una
  cattiva connessione come pure quanto a lungo rimane aperta una
  connessione senza attivit.


    # regole gateway ftp:
    ftp-gw:               denial-msg      /usr/local/etc/ftp-deny.txt
    ftp-gw:               welcome-msg     /usr/local/etc/ftp-welcome.txt
    ftp-gw:               help-msg        /usr/local/etc/ftp-help.txt
    ftp-gw:               timeout 300
    ftp-gw:               permit-hosts 196.1.2.* -log { retr stor }
    ftp-gw:               permit-hosts * -authall -log { retr stor }



  I web, gopher e browser basati su ftp sono stravolti dall'http-gw. Le
  prime due righe creano una directory per memorizzare i documenti ftp e
  web come passano attraverso il firewall. Ho reso questi file di
  propriet di root e li ho messi in una directory accessibile solo da
  root.

  La connessione Web dovrebbe essere breve. Viene effettuato un
  controllo sul tempo di attesa di un utente su una cattiva connessione.


    # regole gateway www e gopher:
    http-gw:      userid          root
    http-gw:      directory       /jail
    http-gw:      timeout 90
    http-gw:      default-httpd   www.afs.net
    http-gw:      hosts           196.1.2.* -log { read write ftp }
    http-gw:      deny-hosts      *



  L'ssl-gw  di fatto un semplice gateway "passatutto". Fare attenzione
  ad esso. In questo esempio consento a tutti all'interno della rete
  protetta di connettersi a qualsiasi server al di fuori della rete,
  fatta eccezione per gli indirizzi 127.0.0.* e 192.1.1.* e solo sulle
  porte da 443 a 563. Le porte da 443 a 563 sono conosciute come porte
  SSL.




    # regole gateway ssl:
    ssl-gw:         timeout 300
    ssl-gw:         hosts           196.1.2.* -dest { !127.0.0.* !192.1.1.* *:443:563 }
    ssl-gw:         deny-hosts      *



  Segue un esempio di come utilizzare il plug-gw per consentire
  connessioni a un server di news. Nell'esempio, si abilitano tutti gli
  utenti all'interno della rete privata a connettersi a un solo sistema
  e solo alla sua porta di news.

  La seconda riga consente agli utenti del server di news di ripassare i
  dati alla rete protetta.

  Dal momento che la maggior parte dei client si aspettano di restare
  connessi mentre gli utenti leggono le news, il timeout per un server
  di news dovrebbe essere lungo.


    # NetNews Pluged gateway
    plug-gw:        timeout 3600
    plug-gw: port nntp 196.1.2.* -plug-to 199.5.175.22 -port nntp
    plug-gw: port nntp 199.5.175.22 -plug-to 196.1.2.* -port nntp



  Il gateway finger  semplice. Chiunque dall'interno della rete
  protetta deve prima eseguire il login e quindi ottiene l'abilitazione
  a utilizzare il programma finger sul firewall. Tutti gli altri
  ricevono semplicemente un messaggio.


    # Abilitazione del servizio finger
    netacl-fingerd: permit-hosts 196.1.2.* -exec /usr/libexec/fingerd
    netacl-fingerd: permit-hosts * -exec /bin/cat /usr/local/etc/finger.txt



  Io non ho impostato i servizi Mail e X-windows pertanto non aggiungo
  degli esempi in merito. Se qualcuno possiede un esempio funzionante, 
  pregato di inviarmi una email.


  7.4.2.  Il file inetd.conf

  Di seguito viene riportato un file /etc/inetd.conf completo. Tutti i
  servizi non necessari sono stati commentati.  stato incluso il file
  completo per mostrare cosa disabilitare, come pure per mostrare come
  impostare i nuovi servizi firewall.
















    #echo stream  tcp  nowait  root       internal
    #echo dgram   udp  wait    root       internal
    #discard      stream  tcp  nowait  root       internal
    #discard      dgram   udp  wait    root       internal
    #daytime      stream  tcp  nowait  root       internal
    #daytime      dgram   udp  wait    root       internal
    #chargen      stream  tcp  nowait  root       internal
    #chargen      dgram   udp  wait    root       internal
    # FTP firewall gateway
    ftp-gw      stream  tcp  nowait.400  root  /usr/local/etc/ftp-gw  ftp-gw
    # Telnet firewall gateway
    telnet        stream  tcp  nowait      root  /usr/local/etc/tn-gw /usr/local/etc/tn-gw
    # local telnet services
    telnet-a    stream  tcp  nowait      root  /usr/local/etc/netacl in.telnetd
    # Gopher firewall gateway
    gopher        stream  tcp  nowait.400  root  /usr/local/etc/http-gw /usr/local/etc/http-gw
    # WWW firewall gateway
    http  stream  tcp  nowait.400  root  /usr/local/etc/http-gw /usr/local/etc/http-gw
    # SSL firewall gateway
    ssl-gw  stream  tcp     nowait  root /usr/local/etc/ssl-gw   ssl-gw
    # NetNews firewall proxy (using plug-gw)
    nntp    stream  tcp     nowait  root    /usr/local/etc/plug-gw plug-gw nntp
    #nntp stream  tcp     nowait  root    /usr/sbin/tcpd  in.nntpd
    # SMTP (email) firewall gateway
    #smtp stream  tcp     nowait  root    /usr/local/etc/smap smap
    #
    # Shell, login, exec e talk sono protocolli BSD.
    #
    #shell        stream  tcp     nowait  root    /usr/sbin/tcpd  in.rshd
    #login        stream  tcp     nowait  root    /usr/sbin/tcpd  in.rlogind
    #exec stream  tcp     nowait  root    /usr/sbin/tcpd  in.rexecd
    #talk dgram   udp     wait    root    /usr/sbin/tcpd  in.talkd
    #ntalk        dgram   udp     wait    root    /usr/sbin/tcpd  in.ntalkd
    #dtalk        stream  tcp     waut    nobody  /usr/sbin/tcpd  in.dtalkd
    #
    # Servizi dmail pop e imap
    #
    #pop-2   stream  tcp  nowait  root  /usr/sbin/tcpd    ipop2d
    #pop-3   stream  tcp  nowait  root  /usr/sbin/tcpd    ipop3d
    #imap    stream  tcp  nowait  root  /usr/sbin/tcpd    imapd
    #
    # Servizio UUCP Internet.
    #
    #uucp    stream  tcp  nowait  uucp  /usr/sbin/tcpd  /usr/lib/uucp/uucico -l
    #
    # Il servizio Tftp  fornito essenzialmente per l'avvio. La maggior
    # parte dei siti lo eseguono solo su macchine che si comportano come
    # "boot server". Non scommentare a meno che non si abbia *bisogno*
    # di usarlo.
    #
    #tftp dgram   udp     wait    root    /usr/sbin/tcpd  in.tftpd
    #bootps       dgram   udp     wait    root    /usr/sbin/tcpd  bootpd
    #
    # Finger, systat e netstat forniscono informazioni utente che
    # potrebbero essere preziose per potenziali "system crackers". Molti
    # siti scelgono di disabilitare alcuni o tutti questi servizi per
    # aumentare la sicurezza.
    #
    # cfinger  per il finger GNU, che attualmente non  in uso nel
    # Linux RHS
    #
    finger        stream  tcp  nowait  root   /usr/sbin/tcpd  in.fingerd
    #cfinger      stream  tcp  nowait  root   /usr/sbin/tcpd  in.cfingerd
    #systat       stream  tcp  nowait  guest  /usr/sbin/tcpd  /bin/ps -auwwx
    #netstat      stream  tcp  nowait  guest  /usr/sbin/tcpd  /bin/netstat -f inet
    #
    # Il servizio time viene utilizzato per la sincrinizzazione del clock.
    #
    #time stream  tcp  nowait  root  /usr/sbin/tcpd  in.timed
    #time dgram   udp  wait    root  /usr/sbin/tcpd  in.timed
    #
    # Autenticazione
    #
    auth          stream  tcp  wait    root  /usr/sbin/tcpd  in.identd -w -t120
    authsrv       stream  tcp  nowait  root  /usr/local/etc/authsrv authsrv
    #
    # Fine di inetd.conf




  7.4.3.  Il file /etc/services

  Quando un client si connette al firewall lo fa su una porta conosciuta
  (minore di 1024). Ad esempio. telnet si connette sulla porta 23. Il
  demone inetd sente questa connessione e cerca il nome di questo
  servizio nel file /etc/services. Quindi, richiama il programma
  assegnato al nome nel file /etc/inetd.conf.

  Alcuni dei servizi che stiamo creando non si trovano normalmente nel
  file /etc/services.  possibile assegnare alcuni di essi a una porta
  qualsiasi. Ad esempio, io ho assegnato la porta di telnet
  dell'amministratore (telnet-a) alla porta 24. Volendo, lo si pu
  assegnare alla porta 23. Affinch l'amministratore (ossia voi stessi)
  possa connettersi direttamente al firewall  necessario eseguire il
  telnet alla porta 24 e non alla 23 e se il file netperm-table viene
  impostato, come ho fatto io, sar possibile farlo solamente da un
  sistema all'interno della propria rete protetta.



    telnet-a        24/tcp
    ftp-gw          21/tcp           # questo nome  cambiato
    auth            113/tcp   ident  # Verifica dell'utente
    ssl-gw          443/tcp




  8.  Il Proxy Server SOCKS

  8.1.  Impostazione del Proxy Server

  Il proxy server SOCKS  disponibile su
  ftp://sunsite.unc.edu/pub/Linux/system/Network/misc/socks-linux-
  src.tgz.  In questa directory, esiste anche un esempio di file di
  configurazione denominato "socks-conf". Decomprimere ed eseguire
  l'untar dei file all'interno di una directory del proprio sistema, e
  seguire le istruzioni su come effettuare make. Personalmente ho avuto
  un paio di problemi durante make. Assicurarsi che i Makefile siano
  corretti.

   importante notare che il proxy server deve essere aggiunto in
  /etc/inetd.conf.  necessario aggiungere una riga:


    socks  stream  tcp  nowait  nobody  /usr/local/etc/sockd  sockd



  per dire al server di entrare in esecuzione quando richiesto.

  8.2.  Configurazione del Proxy Server

  Il programma SOCKS ha bisogno di due file di configurazione separati.
  Il primo per informare sugli accessi autorizzati, il secondo per
  instradare le richieste al proxy server appropriato. Il file di
  accesso dovrebbe essere localizzato sul server. Il file di
  instradamento dovrebbe trovarsi su ogni macchina Unix. I computer DOS
  e, presumibilmente, i Macintosh eseguiranno da se il proprio
  instradamento.


  8.2.1.  Il file di accesso

  Con socks 4.2c Beta, il file di accesso  denominato "sockd.conf".
  Dovrebbe contenere 2 righe, una riga permit e una riga deny. Ogni riga
  conterr tre campi:


    L'Identificatore (permit/deny)

    L'indirizzo IP

    Il modificatore di indirizzo

  L'identificatore  di tipo permit oppure deny.  consigliabile avere
  sia la riga permit, sia la riga deny.

  L'indirizzo IP  un indirizzo a 4 byte in una tipica notazione IP.
  Ossia, 192.168.2.0.

  Anche il modificatore di indirizzo  un tipico indirizzo IP
  rappresentato da un numero di 4 byte. Funziona come un netmask.
  Supponiamo che questo numero sia a 32 bit (1 o 0). Se il bit  un 1,
  il bit corrispondente dell'indirizzo che sta controllando deve essere
  uguale al corrispondente bit nel campo dell'indirizzo IP.

  Ad esempio, se la riga :


      permit 192.168.2.23 255.255.255.255



  saranno ammessi solo gli indirizzi IP i cui bit corrispondono
  192.168.2.23, ossia, solo 192.168.2.23. La riga:


      permit 192.168.2.0 255.255.255.0



  ammetter ogni numero all'interno del gruppo da 192.168.2.0 a
  192.168.2.255, l'intero dominio di Classe C. Non si dovrebbe avere la
  riga:


      permit 192.168.2.0 0.0.0.0



  dal momento che ammetter ogni indirizzo, indistintamente.

  Pertanto, prima di tutto abilitare tutti gli indirizzi che si vogliono
  abilitare, negare i restanti. Per ammettere tutti nel dominio
  192.168.2.xxx, le righe:

      permit 192.168.2.0 255.255.255.0
      deny 0.0.0.0 0.0.0.0



  funzioneranno correttamente. Notare "0.0.0.0" iniziale nella riga
  deny. Con un modificatore di 0.0.0.0, il campo dell'indirizzo IP non 
  rilevante. Tutti zero  la norma perch  semplice digitarli.

   consentito pi di una voce di ciascun tipo.

   anche possibile fornire o negare gli accessi a degli utenti
  specifici, tramite l'autentificazione ident. Non tutti i sistemi
  supportano ident, tra cui Trumpet Winsock, pertanto questo argomento
  non sar trattato in questa sede. Si veda la documentazione di socks
  per maggiori informazioni.


  8.2.2.  Il file di instradamento

  Il file di instradamento in SOCKS  infelicemente chiamato
  "socks.conf". Il nome  molto simile a quello del file di accesso,
  pertanto potrebbe essere facile confonderli.

  Il file di instradamento informa il client SOCKS su quando utilizzare
  socks e quando non farlo. Ad esempio, nella nostra rete, 192.168.2.3
  non avr bisogno di utilizzare socks per parlare con 192.168.2.1, il
  firewall, in quanto possiede una connessione diretta via Ethernet e
  definisce automaticamente 127.0.0.1, il loopback. Naturalmente non 
  necessario SOCKS per parlare a se stessi.

  Esistono tre voci:



    deny

    direct

    sockd

  Deny informa SOCKS su quando respingere una richiesta. Questo voce
  possiede gli stessi tre campi gi descritti per sockd.conf:
  identificatore, indirizzo e modificatore. Generalmente, dal momento
  che questo viene gestito anche da sockd.conf, il file di accesso, il
  campo del modificatore  impostato a 0.0.0.0. Se si vuole precludere
  se stessi dal chiamare qualsiasi posto, pu essere fatto in questo
  punto.

  La voce direct informa sugli indirizzi per i quali non deve essere
  utilizzato socks. Si tratta degli indirizzi che possono essere
  raggiunti senza il proxy server. Ancora una volta, abbiamo i tre
  campi: identificatore, indirizzo e modificatore. Il nostro esempio
  avrebbe:


      direct 192.168.2.0 255.255.255.0



  che permette di andare direttamente a qualsiasi cosa nella nostra rete
  protetta.

  La voce sockd informa il computer su quali host possiedono il demone
  di server socks. La sintassi :

    sockd @=<serverlist> <IP address> <modifier>



  Si noti la voce @=. Questa permette di impostare gli indirizzi IP di
  una lista di proxy server. Nel nostro esempio, viene utilizzato un
  unico proxy server.  Tuttavia,  possibile averne molti per consentire
  un carico maggiore e per avere a disposizione una ridondanza in caso
  di errore.

  I campi di indirizzo IP e di modificatore funzionano esattamente come
  negli altri esempi.



  8.2.3.  DNS da dietro un firewall

  L'impostazione del Domain Name Service da dietro un firewall  un
  compito relativamente semplice.  necessario solamente impostare il
  DNS sulla macchina con firewall. Quindi configurare ogni macchina
  dietro al firewall in modo che possa utilizzare questo DNS.


  8.3.  Lavorare con un Proxy Server

  8.3.1.  Unix

  Per fare in modo che le proprie applicazioni funzionino con il proxy
  server, devono essere ``SOCKettizzate''. Sono necessarie due diverse
  tipologie di telnet, una per la comunicazione diretta, una per la
  comunicazione tramite il proxy server. SOCKS fornisce delle istruzioni
  su come SOCKettizzare un programma, come pure un paio di programmi
  pre-SOCKettizzati. Se si utilizza una versione SOCKettizzata per
  andare direttamente da qualche parte, SOCKS si commuter
  automaticamente nella versione diretta. Per questo motivo, vogliamo
  rinominare tutti i programmi sulla rete protetta e sostituirli con i
  programmi SOCKettizzati. "finger" diventa "finger.orig", "telnet"
  diventa "telnet.orig" ecc. Bisogna informare SOCKS di ognuno di questi
  cambiamenti tramite il file include/socks.h.

  Alcuni programmi saranno in grado di gestire l'instradamento e la
  SOCKettizzazione per conto loro. Netscape  uno di questi.  possibile
  utilizzare un proxy server sotto Netscape inserendo l'indirizzo del
  server (192.168.2.1 nel nostro caso) nel campo SOCKS sotto i Proxy.
  Ogni applicazione avr bisogno di almeno qualche modifica,
  indipendentemente da come gestisce un proxy server.


  8.3.2.  MS Windows con Trumpet Winsock

  Trumpet Winsock viene gi distribuito con il supporto intrinseco per i
  server proxy. Nel menu di "setup", inserire l'indirizzo IP del server,
  e gli indirizzi di tutti i computer raggiungibili direttamente.
  Quindi, Trumpet gestir tutti i pacchetti in uscita.


  8.3.3.  Come far funzionare il Proxy Server con i pacchetti UDP

  Il pacchetto SOCKS funziona solamente con i pacchetti TCP, non con
  quelli UDP. Questa caratteristica lo rende leggermente meno utile.
  Molti programmi utili, come talk e Archie, utilizzano UDP. Esiste un
  pacchetto studiato per essere usato come un proxy server per pacchetti
  UDP denominato UDPrelay, di Tom Fitzgerald <fitz@wang.com>.
  Sfortunatamente, nel momento in cui viene scritto questo documento,
  non  compatibile con Linux.

  8.4.  Svantaggi dei Proxy Server

  Il proxy server , soprattutto, un dispositivo di sicurezza. Un suo
  utilizzo per aumentare l'accesso ad internet con indirizzi IP limitati
  causer molti svantaggi. Un proxy server consentir un maggior accesso
  dall'interno della rete protetta verso l'esterno, ma manterr
  l'interno completamente inaccessibile dall'esterno. Ci implica
  l'impossibilit di avere connessioni server, talk o archie oppure mail
  dirette verso i computer presenti all'interno. Questi svantaggi
  potrebbero sembrare irrilevanti, ma bisogna pensare ad essi in questi
  termini:


    Un report su cui state lavorando sul vostro computer  stato
     lasciato all'interno della rete protetta con firewall. Vi trovate a
     casa, e decidete di lavorarci ancora un po'. Ma questo non 
     possibile. Non potete raggiungere il vostro computer perch si
     trova al di l del firewall. Per prima cosa cercate di connettervi
     al firewall, ma dal momento che tutti hanno un accesso proxy
     server, nessuno ha impostato un account per voi.



    Vostra figlia va al college. Volete inviarle una email. Avete
     alcuni affari personali di cui parlare, e preferireste poter
     ricevere la posta direttamente sulla vostra macchina. Avete
     completa fiducia nell'amministratore del sistema, tuttavia si
     tratta di posta privata.



    L'incapacit di utilizzare i pacchetti UDP rappresenta un grande
     svantaggio dei proxy server. Immagino che le carateristiche UDP
     saranno disponibili a breve.

  FTP provoca un altro problema con un proxy server. Quando si riceve o
  si esegue un comando ls, il server FTP apre un socket sulla macchina
  client e invia le informazioni attraverso esso. Un proxy server non
  permetter di farlo, pertanto FTP non funziona molto bene.

  Inoltre, i proxy server sono lenti. A causa del sovraccarico maggiore,
  quasi ogni altro mezzo per ottenere questo accesso sar pi veloce.

  Sostanzialmente, se si possiedono gli indirizzi IP, e non ci si
  preoccupa della sicurezza, non utilizzare un firewall e/o i proxy
  server. Se non si possiedono gli indirizzi IP, e non ci si preoccupa
  della sicurezza, si potrebbe pensare di utilizare un emulatore IP,
  come Term, Slirp o TIA. Term  disponibile su ftp://sunsite.unc.edu,
  Slirp su ftp://blitzen.canberra.edu.au/pub/slirp, e TIA su
  marketplace.com. Questi pacchetti saranno pi veloci, consentiranno
  connessioni migliori e forniranno un livello maggiore di accesso alla
  rete interna da Internet. I proxy server vanno bene per le reti con
  molti host che si vogliono connettere alla rete esterna con una sola
  impostazione e con poco lavoro successivo.


  9.  Configurazioni avanzate

  Esiste un'altra configurazione di cui vorrei parlare prima di chiudere
  questo documento. Quelle che ho gi descritto probabilmente saranno
  sufficienti per la maggior parte delle persone. Tuttavia, ho
  intenzione di mostrare una configurazione pi avanzata in grado di
  chiarire alcune questioni. Se avete domande relativamente a quanto 
  stato descritto finora, o se siete semplicemente interessati alla
  versatilit dei proxy server e dei firewall, continuate la lettura.

  9.1.  Una rete ampia con enfasi sulla sicurezza

  Supponiamo, ad esempio, di voler mettere in rete il proprio sito. Si
  possiedono 50 computer e una sottorete di 32 (5 bit) numeri IP.
  Servono diversi livelli di accesso all'interno della rete. Pertanto, 
  necessario proteggere certe parti della rete dal resto.

  I livelli sono:

  1. Il livello esterno. Si tratta del livello disponibile a tutti.  il
     luogo dove si cercano nuovi volontari.

  2. Truppa. Questo  il livello di persone che hanno superato il
     livello esterno.  il luogo vengono istruiti sul governo diabolico
     e su come fabbricare delle bombe.

  3. Mercenari. Questo  il livello dove sono tenuti i piani veri. In
     questo livello sono memorizzate tutte le informazioni su come il
     governo del terzo mondo ha intenzione di conquistare il mondo, i
     piani che coinvolgono Newt Gingrich, Oklahoma City, i prodotti di
     bassa importanza e cosa  immagazzinato veramente nell'hangar
     dell'area 51.


  9.1.1.  Impostazione della rete

  I numeri IP sono costruiti in modo che:


    Un numero  192.168.2.255, che rappresenta l'indirizzo di
     trasmissione e non  utilizzabile.

    23 dei 32 indirizzi IP sono allocati a 23 macchine che saranno
     accessibili da Internet.

    Un IP extra va ad una Linux box sulla rete.

    Un IP extra va a un'altra Linux box sulla rete.

    Due IP vanno al router.

    Quattro sono lasciati liberi, ma ad essi sono assegnati nomi di
     dominio quali paul, ringo, john, e george, tanto per confondere un
     po' le idee.

    Le reti protette hanno entrambe gli indirizzi 192.168.2.xxx.

  Quindi, vengono costruite due reti separate, ognuna localizzata in
  posti diversi. L'istradamento pu avvenire tramite Ethernet a
  infrarossi in modo che sia completamente invisibile alle postazioni
  esterne.  Fortunatamente, ethernet a infrarossi funziona esattamente
  come ethernet normale.

  Queste reti sono entrambe connesse a uno dei box Linux tramite un
  indirizzo IP extra.

  Esiste in file server che connette le due reti protette. Questo perch
  i piani per conquistare il mondo coinvolgono alcune delle Truppe di
  livello pi alto. Il file server mantiene l'indirizzo 192.168.2.17
  della rete della Truppa e l'indirizzo 192.168.2.23 della rete dei
  Mercenari. Deve avere due indirizzi IP differenti poich possiede due
  diverse schede Ethernet. L'IP Forwarding   disabilitato.

  Il forwarding IP  disabilitato anche su entrambe le Linux box. Il
  router non inoltrer pacchetti destinati a 192.168.2.xxx se non gli
  viene richiesto esplicitamente di farlo, pertanto Internet non sar in
  grado di entrare. La ragione per cui disabilitare IP Forwarding  che
  in questo modo i pacchetti provenienti dalla rete della Truppa non
  saranno in grado di raggiungere la rete dei Mercenari, e viceversa.

  Il server NFS pu essere impostato in modo da offrire file diversi a
  reti diverse. Questo pu tornare utile, e un piccolo trucco con i link
  simbolici pu fare in modo che i file comuni possano essere condivisi
  con chiunque. L'utilizzo di questa impostazione e di un'altra scheda
  ethernet pu offrire questo unico file server a tutte e tre le reti.


  9.1.2.  Impostazione del Proxy

  Ora, dal momento che tutti e tre i livelli vogliono essere in grado di
  monitorare la rete per i propri scopi, tutti e tre hanno bisogno di un
  accesso alla rete. La rete esterna  connessa direttamente ad
  internet, pertanto in questo caso non dobbiamo preoccuparci dei proxy
  server. Le reti dei Mercenari e della Truppa si trovano al di l del
  firewall, pertanto  necessario impostare dei proxy server.

  Entrambe le reti hanno un'impostazione molto simile. Ad entrambe
  vengono assegnati gli stessi indirizzi IP. Inserir un paio di
  parametri, solo per rendere le cose pi interessanti.


  1. Nessuno pu utilizare il file server per l'accesso ad Internet.
     Questo espone il file server a virus e altri problemi, ed  molto
     importante, pertanto da evitare.

  2. Non verr consentito l'accesso della Truppa al World Wide Web. dal
     momento che sono in addestramento, questo potere di recuperare le
     informazioni potrebbe essere pericoloso.

  Pertanto, il file sockd.conf sul box Linux della Truppa conterr la
  riga:


      deny 192.168.2.17 255.255.255.255



  e sulla macchina Mercenari:


      deny 192.168.2.23 255.255.255.255



  Inoltre, il box Linux della Truppa conterr la riga:


      deny 0.0.0.0 0.0.0.0 eq 80



  che indica di negare l'accesso al tutte le macchine che cercano di
  accedere alla porta uguale (eq) a 80, la porta http. Questo continuer
  a consentire tutti gli altri servizi, ma nega solamente l'accesso a
  Web.

  Quindi, entrambi i file conterranno:


      permit 192.168.2.0 255.255.255.0


  per consentire a tutti i computer sulla rete 192.168.2.xxx di
  utilizzare questo proxy server fatta eccezione per quelli ai quali
  l'accesso  gi stato negato (cio, il file server e l'accesso a Web
  per la rete Truppa).

  Il file sockd.conf della Truppa avr il seguente formato:


      deny 192.168.2.17 255.255.255.255
      deny 0.0.0.0 0.0.0.0 eq 80
      permit 192.168.2.0 255.255.255.0



  e il file Mercenari:


      deny 192.168.2.23 255.255.255.255
      permit 192.168.2.0 255.255.255.0



  Questo dovrebbe configurare tutto correttamente. Ogni rete  isolata
  di conseguenza, con l'appropriato numero di interazioni.

  Ora siete pronti a conquistare il mondo!


  10.  Nota sulla traduzione

  La traduzione originale di questo HOWTO  opera della Apogeo
  <http://www.apogeonline.com/>, per il libro Linux HowTo (La bibbia di
  Linux) realizzato in collaborazione con il Pluto. L'Apogeo ha
  gentilmente concesso questa ed altre traduzioni ad ILDP per la sua
  diffusione elettronica.

  Conversione in SGML e correzione a cura di Giovanni Bortolozzo
  bortopluto.linux.it, cui vanno segnalati pure eventuali errori,
  incongruenze ecc.



























  The Linux Ftape-HOWTO
  Claus-Justus Heine, <heine@math1.rwth-aachen.de>
  v3.0, agosto 1998

  Questo HOWTO tratta dell'essenziale che si pu fare e che non si deve
  fare sotto Linux con il driver ftape per le unit a nastro per con
  troller floppy.  In particolare tratta della versione pi aggiornata,
  la ftape-4.02, disponibile al momento della stesura di questo docu
  mento.  Questo HOWTO va inteso come un primo passo di aiuto e fonte di
  informazione.  Il driver ftape interfaccia le unit compatibili
  QIC-40, QIC-80, QIC-3010 e QIC-3020, e le unit Iomega Ditto 2GB e
  Ditto Max.  Gli standard QIC-3010 e QIC-3020 sono anche conosciuti
  come ``Travan'' (TR-2 e TR-3).  Queste unit si collegano al con
  troller per disco floppy (FDC) che possono essere o un FDC interno o
  parte di alcune unit a nastro per controller floppy su porta paral
  lela.  Riferirsi alla sezione ``Unit supportate'' per ulteriori
  informazioni.  ftape non ricopre argomenti riguardanti unit a nastro
  SCSI o QIC-02.  Unit a nastro DAT sono tipicamente (sempre?) connesse
  ad un controller SCSI.  Questo non  l'unico documento HOWTO per
  Linux.   possibile ottenere una lista degli HOWTO dal Linux HOWTO
  Index, mentre i veri e propri HOWTO possono essere prelevati (via ftp)
  da sunsite.unc.edu:pub/Linux/doc/HOWTO (questo  il sito ``uffi
  ciale'') o via World Wide Web da the Linux Documentation Project home
  page.  Traduzione di Lorenzo Cappelletti, <L.Cappelletti@POBoxes.com>.

  1.  Legalese


  L'ftape-HOWTO per Linux pu essere riprodotto e ditribuito, per intero
  o in parte, ferme restando le seguenti condizioni:



        Copyright (c) 1993-1996 by Kai Harrekilde-Petersen Email:
       khp@dolphinics.no

       Copyright (c) 1996-1997 by Kevin Johnson Email: kjj@pobox.com

       Copyright (c) 1998 by Claus-Justus Heine Email:
       heine@math1.rwth-aachen.de




  Il ``Linux ftape-HOWTO''  un documento libero;  possibile riprodurlo
  e/o modificarlo sotto le condizioni della versione 2 (o, a seconda
  della propria opinione, di ogni altra versione successiva) della GNU
  General Public License come pubblicata dalla Free Software Foundation.

  Questo HOWTO  distribuito nella speranza che risulti utile, ma SENZA
  ALCUNA GARANZIA; neppure di COMMERCIABILIT o IDONEIT AD UN
  PARTICOLARE SCOPO.  possibile ridistribuire copie di GNU Ftape-HOWTO
  nei termini della GNU General Public License.

  L'autore incoraggia la distribuzione su larga scala di questo
  documento per usi personali o commerciali, fermo restando che il
  copyright di cui sopra rimanga intatto e che l'utilizzo sia conforme
  alla GNU General Public License.  In sostanza "possibile copiare e
  ridistribuire questo documento liberamente o mediante compenso.
  Nessun permesso esplicito  richiesto dall'autore per la riproduzione
  di questo documento con qualsiasi mezzo, fisico o elettronico.

  Da notarsi che lavori derivati e traduzioni di questo documento devono
  aderire alla GNU General Public License e il copyright originale deve
  rimanere intatto.  Se si contribuisce con nuovo materiale a questo
  documento, si deve rendere il codice sorgente (cio il sorgente SGML)
  disponibile per le proprie revisioni.  Si prega di rendere disponibili
  revisioni e aggiornamenti direttamente all'autore: contattare
  <heine@math1.rwth-aachen.de> a mezzo posta elettronica.  Questo
  permetter all'autore di unire gli aggiornamenti e di rendere
  disponibili revisioni organiche alla comunit Linux.

  L'autore incoraggia i distributori di software per Linux con ogni
  mezzo di utilizzare questo HOWTO come installazione e guida per
  l'utente.  Dato il copyright di cui sopra,  resa libera la stampa e
  la distribuzione di copie di questo documento con il proprio software.
  Cos facendo si potrebbe includere un breve ``supplemento
  all'installazione'' per la propria release o modificare le sezioni
  rilevanti di questa opera per riflettere il proprio prodotto.

  All'autore (ed al traduttore) farebbe piacere venire a conoscenza di
  ogni progetto di pubblicazione e distribuzione commerciale di questo
  HOWTO.  In questo modo possiamo assicurare un aggiornamento continuo
  con l'uscita delle nuove revisioni e, se una nuova versione fosse
  dietro l'angolo, ritardare la pubblicazione dell'HOWTO finch la nuova
  revisione non viene reasa disponibile.

  Se si sta distribuendo questo HOWTO commercialmente, donazioni,
  royalty e/o copie stampate sono particolarmente apprezzate dall'autore
  (e dal traduttore).  Contribuendo in questo modo, si dimostra il
  supporto per il ``free software'' e l'(Italian) Linux Documentation
  Project.

  Per domande o commenti, si prega di contattare l'autore all'indirizzo:


        heine@math1.rwth-aachen.de



  oppure il traduttore all'indirizzo:


        lency@dei.unipd.it




  Ricordo che non ci e` consentito rimuovere il testo originale inglese
  della licenza e che questo non ha alcun valore legale ma puramente
  informativo. Ecco quindi la versione originale.

  The Linux ftape-HOWTO is a free document; you may reproduce and/or
  modify it under the terms of version 2 (or, at your option, any later
  version) of the GNU General Public License as published by the Free
  Software Foundation.

  This HOWTO is distributed in thg hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  The author encourages wide distribution of this document for personal
  or commercial use, provided that the above copyright notice remains
  intact and the provisions of the GNU General Public License are
  adhered to.  The summary is that you may copy and distribute this
  document free of charge, or for a profit.  No explicit permission is
  required from the author for reproduction of this document in any
  medium, physical or electronic.

  Note that derivative works and translations of this document must be
  placed under the GNU General Public License, and the original
  copyright notice must remain intact.  If you have contributed new
  material to this document, you must make the source code (e.g., SGML
  source) available for your revisions.  Please make revisions and
  updates available directly to the author: Contact heine@math1.rwth-
  aachen.de via Internet e-mail.  This will allow the author to merge
  updates and provide consistent revisions to the Linux community.

  The author encourages distributors of Linux software in any medium to
  use the HOWTO as an installation and user guide.  Given the copyright
  above, you are free to print and distribute copies of this document
  with your software.  If doing so, you may wish to include a short
  ``installation supplement'' for your relecse, or modify the relevant
  sections of this book to reflect your product.

  The author would like to know of any plans to publish and distribute
  this HOWTO commercially.  In this way, we can ensure that you are kept
  up-to-date with new revisions.  And, should a new version be right
  around the corner, you might wish to delay your publication of the
  HOWTO until it is available.

  If you are distributing this HOWTO commercially, donations, royalties,
  and/or printed copies are greatly appreciated by the author.
  Contributing in this way shows your support for free software and the
  Linux Documentation Project.

  If you have questions or comments, please contact the author at

  heine@math1.rwth-aachen.de


  2.  Storia delle revisioni



     versione 3.0 (agosto, 1998)

       aggiunte alla lista dell'hardware supportato;

       nuova sezione sulle differenze fra le versioni di ftape;

       puntatore all'Ftape-FAQ e all'Ftape manual;

       aggiornamento all'ftape-4.02;

       aggiunte alle FAQ;

       aggiornate tutte le URL.


     versione 2.0 (marzo 15, 1997)

       aggiornamento all'ftape v2.11 e v3.xx;

       molti aggiornamenti.


     versione 1.9 (settembre 20, 1996)

       nuovi manutentori di ftape e dell'HOWTO;

       alcune correzzioni minori di formattazione e grammatica;

       aggiornamento per Linux v2.0;

       inizio dell'integrazione di alcune informazioni su ftape di
        Andrew Martin.
     versione 1.8 (maggio 22, 1996)

       modifica del copyright in GNU GPL v2;

       l'indirizzo e-mail del manutentore  cambiato;

       aggiornamento a ftape-2.08;

       ftape  ora una parte della distribuzione del kernel.


     versione 1.7.1 (febbraio 13, 1996)

       aggiornamento a ftape-2.06b.


     versione 1.7 (gennaio 28, 1996)

       aggiornamento a ftape-2.06 e modules-1.3.57.


     versione 1.6.2 (gennaio 23, 1996)

       aggiunta l'unit Connor TST3200R;

       aggiornate informazioni su FDC a 2Mbps.


     versione 1.6.1 (gennaio 16, 1996)

       Correzioni minori.


     versione 1.6 (gennaio 10, 1996)

       nuovo manutentore di ftape;

       aggiornamento a v2.05;

       aggiunte nuove unit.



  3.  Preliminari



  3.1.  Altre sorgenti di informazione



     ftape versione 3
        ftape-3.x viene fornito con un proprio manuale contenuto nel
        pacchetto ftape-3.04d e disponibile presso i siti abituali.
        Vedere ``Procurarsi Ftape''.


     ftape versione 4
        Anche ftape-4.x ha un pacchetto di documentazione chiamato
        ftape-doc disponibile presso gli stessi siti.  Questo HOWTO,
        allora, focalizzer la sua attenzione anche sull'ftape-4.x ed 
        inteso come un punto di partenza verso la documentazione
        disponibile.  Vedere ``Procurarsi Ftape''.



     ftape-tools
        Il pacchetto ftape-tools (che contiene preziose utility per
        ftape) viene fornito con un proprio manuale.  Vedere
        ``Procurarsi Ftape''.


     Ftape-FAQ
        Le Ftape-FAQ sono incluse testualmente in questo manuale, mentre
        versioni pi recenti posso essere visionate all'url
        http://www.correct.nl/~ftape.



  3.2.  Contatti


  Il manutentore del codice sorgente per l'ftape  Claus Heine
  <heine@math1.rwth-aachen.de>.  Possiede una pagina web all'indirizzo
  http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape/.

  Per problemi o domande su ftape  possibile mandare un messaggio alla
  mailing-list di Linux Tape utilizzando l'indirizzo linux-
  tape@vger.rutger.edu (vedere ``Seguire lo sviluppo di ftape'' pi
  avanti).  C'era anche un newsgroup che copiava i messaggi della
  mailing-list, ma  sparito un po' di tempo fa.

  Anch'io utilizzo un'unit a nastro ( il solo modo con cui eseguo dei
  backup con Linux :-).  Esito, per, a dare raccomandazioni su quale
  hardware comprare.  Riferirsi alla sezione ``Unit supportate'' e
  ``Unit non supportate'' per una lista di unit supportate e non
  supportate.

   meglio provare ad inviare un riassunto dei problemi riscontrati
  corredati da qualche rimedio, anche se solo parziale.   gradito un
  messaggio contenente una copia di tali rimedi anche alla mailing-list
  di Linux Tape raggiungibile all'indirizzo <linux-
  tape@vger.rutgers.edu>, cosicch possano essere aggiunti all'HOWTO e/o
  alle FAQ.

  Nel caso questo manuale facesse parte di una distribuzione su carta o
  su CD-ROM,  conveniente dare un'occhiata alla pagina principale
  del Linux Documentation Project, o via ftp all'indirizzo
  ftp://sunsite.unc.edu:/pub/Linux/doc/HOWTO, per vedere se esiste una
  versione pi recente.  Questo potrebbe potenzialmente far risparmiare
  un sacco di problemi.

  Nel caso mi si volesse spedire un messaggio, gradirei che venisse
  inserita la stringa ftape nella linea di ``Subject:''.  Questo aiuter
  ad assicurare che il messaggio non venga perso.  Comunque  meglio
  scrivere alla mailing-list di Linux Tape <linux-
  tape@vger.rutgers.edu>, invece di contattare me direttamente.



  3.3.  Cos' ftape


  ftape  un driver che controlla vari tipi di periferiche a nastro di
  basso costo da collegarsi al controller dell'unit floppy.

  ftape non  un programma di backup;  un driver di periferica che
  permette di utilizzare l'unit a nastro (cos come il driver per la
  SoundBlaster 16 permette di utilizzare la scheda sonora) attraverso il
  file di periferica /dev/[n]qft[0-3].


  ftape fu originariamente scritto da Bas Laarhoven <bas@vimec.nl>, con
  un piccolo aiuto da parte dei suoi amici per organizzare l'ECC
  (Error Correcting Code [codice per la correzione d'errore]).  ftape 
  protetto da copyright da parte di Bas sotto la GNU General Public
  License, che, in parole povere, dice: vai avanti e condividi questo
  con il mondo, basta che non impedisci ad altre persone di copiarselo
  ulteriormente.

  ftape  stato sottoposto a diversi cambiamenti da allora. Mentre la
  serie Linux-2.0.x del kernel contiene ancora l'ftape-2.08, la serie
  v2.1.x e presto la serie v2.2.*  arriveranno con l'ftape-3.x (magari
  anche con la ftape-4.02, ma ci non  ancora chiaro nel momento in cui
  sto scrivendo), che differisce in alcuni punti dal driver ftape-2.x.
  A partire dalla versione 3.00 il driver ftape  stato mantenuto da me
  (Claus-Justus Heine);  stato cambiato e migliorato in diversi ambiti
  ed  stato aggiunto supporto per nuovo hardware.

  ftape  abbastanza stabile e lo  stato per diverso tempo fino ad ora.
   sufficientemente sicuro per backup critici (ma  sempre una buona
  idea controllare i propri backup, cos da evitare spiacevoli sorprese
  prima o poi).

  ftape supporta tanto le unit conformi allo standard QIC-117 e ad uno
  degli standard QIC-80, QIC-40, QIC-3010 e QIC-3020, quanto le unit
  Iomega Ditto 2GB e Ditto Max, che non sono pi strettamente conformi
  agli standard QIC.

  ftape pu pilotare unit connesse all'FDC interno cos come certe
  unit a nastro per porta parallela.

  ftape non supporta n le unit QIC-02, IDE (ATAPI), n le unit SCSI.
  Le unit SCSI sono accessibili come /dev/[n]st[0-7] e sono supportate
  dal kernel attraverso i driver SCSI.  In caso di necessit, per le
  unit a nastro SCSI  possible leggere lo SCSI-HOWTO.  Le unit a
  nastro ATAPI sono supportate dal kernel a partire dalla versione
  1.3.46.  Vedere la sezione ``Unit supportate'' e ``Unit non
  supportate'' per una lista delle unit supportate e non supportate.



  3.4.  Note alla traduzione


  Nel testo originale si fa pesantemente riferimento a termini quali
  ``floppy tape drive'', ``device driver'' ed ``ftape driver'' per
  riferirsi alle varie parti hardware e software che compongono un
  sistema di backup in ambiente Linux.  Per non generare confusione,
  nella traduzione si  cercato di tenere ben distinte le varie
  componenti utilizzando i seguenti termini:

     Unit a nastro per controller floppy
        Il termine floppy tape driver sta ad indicare quelle unit a
        nastro da connettersi al controller per floppy.  Nel testo si
        utilizzeranno sinonimi pi brevi quali unit a nastro o unit.


     Driver ftape
        Si tratta del software vero e proprio, quello in grado di
        tradurre le richieste da parte dei programmi di backup in
        sequenze di comandi interpretabili dall'unit a nastro.
        Sinonimi usati correntemente nel testo sono driver, ftape,
        ftape-2.x, ftape-3.x ed ftape-4.x.


     File di periferica
        Il termine device driver indica i file speciali contenuti nella
        directory /dev attraverso i quali il driver ftape dialoga con
        l'unit.  Sinonimi di questo termine sono device e periferica.


  Per aiutare chi si avvicina per la prima volta a questo tipo di
  periferiche e per non disorientare chi, invece, ha gi familiarit con
  esse, si  deciso di tradurre tutti i termini tecnici relativi al
  mondo delle unit a nastro, ma di lasciare indicato fra parentesi
  quadre il relativo termine in lingua inglese.

  Commento a parte merita la sezione sulla compatibilit hardware.  Dal
  testo originale si pu comprendere come sia il risultato di un collage
  di informazioni provenienti da diverse persone.  Ho fatto del mio
  meglio per cercare di dare un significato alle frasi che compongono la
  sezione.





  4.  Come procurarsi e installare ftape




  4.1.  Come procurarsi ftape


  Le versioni v.2.0.x del kernel includono la versione 2.08 di ftape.
  Consiglio, pertanto, di procurarsi l'ultima versione del pacchetto
  contenete il codice sorgente completo per ftape.   una versione pi
  nuova, contiene file che non sono contenuti nella distribuzione del
  kernel v2.0.x e include documentazione molto migliore su come
  installare ftape.  Le versioni di kernel v2.1.x a sucessive contengono
  la versione 3.04 di ftape.


   consigliabile scaricare l'ultima versione stabile di ftape, cio la
  4.02 nel momento in cui sto scrivendo, disponible presso

  http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape/archives.html


  cos come presso

  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes/.

  Probabilmente  opportuno procurarsi anche i pacchetti ftape-doc e
  ftape-tools disponibili dagli stessi siti.

  Se, tuttavia, si vuole fare uso dell'ftape-2.08 che viene fornito con
  i kernel v2.0.x, si tenga presente che si  in possesso di una
  versione del driver veramente datata, che non supporta correttamente
  le unit QIC-3020 a 2Mbps, n le unit Ditto 2GB, n le unit Ditto
  Max o qualsiasi tipo di unit su porta parallela.  La sezione ``Unit
  supportate'' fornisce dettagliate informazioni a proposito di quali
  versioni di ftape supportano determinati hardware.


  4.2.  Differenze fra le versioni ftape-2. x , ftape-3. x  e ftape-4. x


  ftape-3.x e ftape-4.x fanno uso di un'interfaccia per file system che
  fu implementata per un gruppo di release chiamato zftape.  In effetti
  il modulo che implementa l'interfaccia VFS (Virtual File System) di
  ftape-3.x e anche di ftape-4.x  chiamata zftape.o e il suo codice
  sorgente C all'interno dell'albero del kernel si trova in
  [/usr/src/linux/]drivers/char/ftape/zftape/.

  ftape-2.x (cio la versione contenuta ancora nel kernel v2.0.x) usa
  un'altra interfaccia di file system che fu implementata dall'autore
  originale di ftape Bas Larhoven.


     Marcatori di file
        La differenza concettuale fra l'ftape-2.x e le versioni
        successive di ftape sta nel modo in cui i marcatori di file sono
        implementati.

        Le unit a nastro per controller floppy non hanno dei veri
        marcatori di file. (-- I marcatori di file sono usati per
        distinguere fra differenti backup se sono stati scritti pi
        backup sul nastro.  Le unit SCSI e QIC-150 hanno veri marcatori
        di file, cio fra due differenti backup ci sono delle regioni
        sul nastro nelle quali vengono scritti dati speciali in modo
        tale che la logica dell'unit possa rilevare tali marcatori
        quando il nastro viene avvolto a velocit (possibilmente+
        elevata sopra tali marcatori.--) Poich l'obiettivo
        dell'interfaccia del file system di ftape fu fin dal principio
        quello di provvedere ad un'interfaccia che potesse essere usata
        con le usuali utility per nastri presenti su sistemi Unix e
        simili (per esempio mt), gli sviluppatori di ftape cominciarono
        ad emulare i marcatori di file salvando le posizioni del nastro,
        che indicavano dove doveva trovarsi il marcatore del file, in
        determinati campi dei segmenti d'intestazione. (-- segmento
        d'intestazione [header segment] si riferisce ad una regione
        all'inizio del nastro grande due volte 29kB, che contiene alcune
        informazioni importanti circa il formato e la dimensione del
        nastro, e alcune informazioni di stato.--)

        Per gli standard QIC definivano gi una regione speciale nella
        quale salvare tali informazioni, il cosiddetto segmento della
        tabella di volume [volume table segment].  A partire
        dall'ftape-3.x questo segmento della tabella di volume viene
        sfruttato al posto dei campi di dati non utilizzati nel segmento
        d'intestazione.  Come risultato  possibile usare la propria
        cartuccia con differenti sistemi operativi nel senso che il
        programma di backup per Win o DOS capiranno che certe regioni
        del nastro sono gi occupate da dati, ed ftape-3.x e successivi
        rilevereranno le regioni utilizzate dai programmi per DOS e Win.
        Ci nonostante non  possibile estrarre un backup DOS sotto
        Linux, n estrarre un volume scritto da ftape sotto DOS, fatto
        salvo il caso in cui ci si sia cimentati nella scrittura di un
        software apposito per conto proprio.


     Interfaccia IOCTL
        Ci sono alcune differenze nell'interfaccia IOCTL (-- Questa
        interfaccia di controllo I/O  utilizzata, per esempio, da mt
        per riavvolgere il nastro, saltare al marcatore di file
        successivo o eseguire ogni altra operazione sul nastro.--) fra
        ftape-2.x e ftape-3.x e successivi.  Una dettagliata descrizione
        pu essere trovata nell'ftape-manual contenuto nel pacchetto
        ftape-doc.  Vedere la sezione ``Come procurarsi Ftape''.


     Formattazione
        La formattazione delle cartucce  supportata solo con ftape-3.x
        e successivi.  Conviene procurarsi il pacchetto ftape-tools che
        contiene il programma ftformat che si interfaccia con il driver
        per formattare le cartucce.  Vedere la sezione ``Come procurarsi
        Ftape''.  Il pacchetto ftape-tools viene distribuito con
        documentazione (pi o meno) dettagliata, cos il caso della
        formattazione delle cartucce non viene trattato in questo
        documento.


     Compressione
        ftape-3.x supportava una compressione software ``al volo'',
        trasparente all'utente.  Questa caratteristica (o baco) 
        sparita con ftape-4.x poich rendeva veramente molto difficili
        ulteriori miglioramenti riguardo all'affidabilit dei backup.
        Questo significa che ftape-4.x viene distribuito senza supporto
        alla compressione.

        Nonostante questo una decompressione di archivi compressi
        prodotti con ftape-3.x  supportata per evitare che programmi di
        backup pre-esistenti falliscano l dove un filtro a livello
        utente non  sufficiente a preservare la compatibilit.  Si
        pensi, per esempio, a taper che chiama autonomamente gli ioctl
        MTIOC, invece di affidarsi al programma mt per eseguire le
        operazioni sul nastro.

  L'ftape-manual presente nel pacchetto ftape-doc contiene informazioni
  molto pi dettagliate riguardanti l'interfaccia del file system di
  ftape, cos come contiene note implementative che esulano dallo scopo
  di questo HOWTO.  Vedere ``Come procurarsi Ftape'' per informazioni su
  come ottenere il manuale.



  4.3.  Installare il driver con i kernel v2.0. x  e precedenti


  La seguente sezione fornisce alcune utili informazioni
  sull'installazione della versione 4.x non ancora distribuita con
  l'albero dei sorgenti del kernel, ma che deve essere scaricata
  separatamente.  Vedere la sezione ``Procurarsi ftape'' sopra.

  Una volta scaricato il codice sorgente (probabilmente
  ftape-4.02-tar.gz), dare il comando tar dopo aver scelto in quale
  directory riporre il codice sorgente.  Io consiglio /usr/src/ o ~/src.
  Quando il file tar viene estratto, tutto il suo contenuto finir in
  una subdirectory ftape-4.02, cosicch alla fine si otterr,
  proseguendo con l'esempio dato, qualcosa del tipo /usr/src/ftape-4.02
  o ~/src/ftape-4.02.

  NOTA: non  possibile compilare ftape-4.02 nel kernel v2.0.x.  Invece
  bisogna configurare il kernel affinch non compili il driver ftape e
  seguire le istruzioni per l'installazione contenute nella
  distribuzione ftape-4.02 e installare l'ftape-4.02 come modulo.

  Leggere il file README.  La lettura di README  necessaria.  Si trova
  in cima all'albero, tanto per dire.  Se ci sono file specifici che
  README dice di leggere, conviene farlo.  Render il procedimento molto
  meno complicato.

  Non procedere con la compilazione del pacchetto finch non sono stati
  letti i file README appropriati ed il file INSTALL.

  Dopodich  necessario editare il file MCONFIG e configurare il
  pacchetto secondo le proprie specifiche hardware.  Il file MCONFIG
  contiene molte spiegazione, tanto che dovrebbe essere facile seguirlo.

  Ci nonostante molte opzioni della configurazione hardware possono
  essere specificate attraverso l'impostazione dei parametri letti nella
  fase caricamento del modulo, cos molti prametri specificati nel file
  MCONFIG possono mantenere le impostazioni di default senza che ci sia
  il bisogno di ricompilare il driver per cambiare l'indirizzo di I/O o
  il valore d'interrupt.  Il file INSTALL ed il file modules/insert
  contengono esempi su come specificare i parametri appropriati del
  modulo durante il suo caricamento da parte del kernel, quindi non mi
  inoltrer in maggiori dettagli.

  Se si sta usando un kernel linux-v1.3.x, sarebbe opportuno considerare
  un aggiornamento alla versione 2.0.x.  La versione 1.3.x era la
  release di sviluppo antecedente la release di produzione v2.0.x.




  4.4.  Installare il driver con kernel v2.1.x e successivi


  (* Forse ftape-4.02 verr incluso nel kernel v2.2.x, ma questo non 
  chiaro durante la stesura di questo documento.  Questo HOWTO verr
  rivisto appropriatamente quando ci sar chiaro.  Cos, per ora, 
  necessario riferirsi alla sezione precedente ``Installare il driver
  con i kernel v2.0.x e precedenti'' ed evitare il contenuto di questa
  sezione.  *)


  Il kernel di Linux v2.1.x e successivi contiene gi ftape-4.x cosicch
  non  necessario scaricare il pacchetto per il driver del kernel
  ftape-4.x.

  ftape-4.x, in quanto incluso nelle versioni v2.1.x del kernel, pu
  essere completamente configurato utilizzando i men di configurazione
  del kernel (o con make menuconfig o con make xconfig).   anche
  disponibile un aiuto in linea che documenta l'impostazione di ogni
  parametro che star a ripetere qui.

  Le impostazioni dei vari parametri disponibili al momento del boot o
  del caricamento del modulo sono spiegati nel file

  [/usr/src/linux/]Documentation/ftape.txt

  delle distribuzioni Linux-v2.1.x e successive del kernel.



  4.5.  Seguire lo sviluppo del driver ftape


  Nel caso si voglia seguire lo sviluppo del driver ftape,  possibile
  iscriversi alla mailing-list ``Linux Tape'' <linux-
  tape@vger.rutgers.edu>.  Per fare questo, spedire una e-mail che
  contenga ``subscribe linux-tape'' nel corpo del messaggio a
  <majordomo@vger.rutgers.edu>.  Ad iscrizione avvenuta, verr spedito
  un messaggio di benvenuto nel quale viene spiegato come postare
  effettivamente i messaggi e come uscire dalla lista.  Si prega di
  salvare questo messaggio in un posto sicuro.

  Vorrei far notare che io non ho, ripeto NON HO, alcun potere speciale
  concernente questa mailing-list.  Se ci si trova nei guai con la
  lista, non serve prendersi il disturbo per dirmelo.  Posso solo
  stringermi nelle spalle e risponderti con un po' della mia simpatia
  (ma questo non ti permetter di uscire dalla lista).






  4.6.  Utilizzare assieme ftape  e floppy


  Se si fa utilizzo dell'unit a nastro per controller floppy con un FDC
  standard, l'unit floppy e l'unit a nastro non possono essere
  utilizzate assieme, in quanto condividono lo stesso hardware, l'FDC,
  ed il floppy ed ftape non comunicano l'uno con l'altro.  Cos, se 
  montato un floppy e si prova ad accedere all'unit a nastro, ftape si
  lamenter del fatto che non riesce ad impadronirsi dell'IRQ6 e
  terminer.  Questo diventa un problema vero e proprio quando si crea
  un disco d'emergenza da utilizzare con ftape.  La soluzione consiste
  nel caricare il disco di boot/root in un ramdisk e poi smontare il
  floppy, oppure avere due controller floppy.




  5.  Cura e manutenzione del nastro e dell'unit a nastro




  5.1.  Formattazione


  Prima che un nastro possa essere utilizzato, deve essere formattato.
  Il processo di formattazione distribuisce l'informazione dei settori
  sul nastro.  Altre interfaccie a nastro non richiedono tipicamente la
  formattazione.  La ragione per la quale le unit a nastro per
  controller floppy la richiedono, risiede nel fatto che hanno bisongo
  di essere visti come dei floppy (piuttosto rozzo, ma che caspita...
  funziona :-)???



  5.1.1.   possibile formattare nastri sotto Linux?


  S,  possibile, se si utilizza ftape-3.04d o superiori.  Per
  formattare una cartuccia c' bisogno di uno strumento a livello utente
  chiamato ftformat come quello contenuto nella distribuzione di ftape-
  tools (vedere la sezione ``Procurarsi ftape'').

  Il pacchetto ftape-tools viene distribuito con un proprio manuale,
  cos non c' bisogno che ripeta qui come utilizzare ftformat.



  5.1.2.  Che programmi di formattazione  possibile utilizzare sotto
  DOS?


  I seguenti si sa che funzionano:


    il software (tape.exe) della Colorado Memory System

    Conner Backup Basics v1.1 e tutte le versioni Windows

    Norton Backup

    QICstream versione 2

    Tallgrass FileSecure v1.52


    Escom Powerstream 3.0 (qs3.exe -- QICstream v3?)

  Questi programmi  risaputo che contengono pi o meno errori:


    Conner Backup Basics 1.0

    il programma per nastri Colorado Windows

    CP Backup (spreca spazio su nastro, ma, a parte questo, va bene)

  Come regola generale, la maggior parte del software sotto DOS dovrebbe
  funzionare.  Il Conner Backup Basics v1.0 ha un parametro errato
  (qualcuno non era riuscito a leggere correttamente le specifiche
  QIC-80!), che  stato corretto nella versione 1.1.  Ci nonostante
  ftape riesce a rilevare questo inconveniente e ad aggirarlo.  Dennis
  T. Flaherty (<dennisf@denix.elk.miles.com>) ha detto che i proprietari
  del Conner C250MQ possono ottenere la nuova v1.1 chiamando la Conner
  al numero 1-800-4Conner (negli Stati Uniti) e chiedere l'aggiornamento
  (per il prezzo nominale del floppy).  La versione per Windows dovrebbe
  lavorare bene.  Alcune versioni del programma per nastri della
  Colorado sotto Windows hanno un errore dovuto ad uno scarto unitario
  nel numero dei segmenti.  ftape rileva ed aggira anche questo bug.

  Il Central Point Backup pu essere utilizzato, ma spreca prezioso
  spazio su nastro quando incontra una porzione danneggiata.

  NOTA: se si sta utilizzando un programma per la formattazione sotto
  DOS che non  stato menzionato qui, pregherei di spedirmi le
  informazioni pi rilevanti all'indirizzo <heine@math1.rwth-aachen.de>,
  affinch possa aggiornare la lista.



  5.2.  Ritensionamento


  I nastri QIC sono particolarmente sensibili alla tensione del nastro.
  Il motivo sta nel fatto che i nastri per le unit da connettere al
  controller floppy sono pre-formattati con informazioni sui settori,
  mentre per altri tipi di nastro le informazioni di sincronismo vengono
  scritte sul nastro, cos come avviene per i dati.  Se il nastro si
  tende e i campi per il sincronismo vanno fuori sincronismo, si
  otterranno degli errori in lettura.  Il problema  peggiore con i
  nastri pi lunghi.

   una buona idea ritensionare i nastri nuovi un po' di volte prima di
  utilizzarli e formattarli.  Si dovrebbe, inoltre, provare a
  ritensionare il nastro quando si cominciano ad avere degli errori di
  lettura.  Sarebbe anche una buona idea ritensionare il nastro prima di
  un backup.


  5.3.  Pulizia dell'unit


  Il rivestimento sul nastro  un composto di ossido.  Quando il nastro
  viene trascinato sopra la testina di lettura, ha la tendenza a
  depositarvi sopra una sottile quantit di residuo.  Si dovrebbe
  utilizzare periodicamente un pulisci-nastri seguendo le specifiche per
  l'unit in questione.  Pulisci-nastri dovrebbero essere disponibili
  presso qualsiasi rivenditore di nastri.

  Un'ulteriore nota sulla pulizia del nastro.   opportuno pulire
  l'unit dopo il primo uso di un nastro nuovo di zecca.  Un nastro
  nuovo di zecca lascer tipicamente un quantit abbastanza
  considerevole di residui la prima volta che viene utilizzato.

  Grazie a Neal Friedman per la spiegazione ed il suggerimento di
  inserire questa informazione nell'HOWTO.



  5.4.  Riparare le cartucce sbobinate [despooled]


  In rare occasioni pu accadere che l'unit a nastro non rilevi i
  marcatori di EOT (End Of Tape [fine del nastro]) correttamente.
  Questi marcatori sono semplicemente dei buchi nel nastro che vengono
  rilevati dall'unit con dei piccoli foto-transistor (o qualcosa di
  simile).

  Il manuale dell'unit a nastro in possesso fornir probabilmente
  opportuni accenni su come pulire questi rilevatori di EOT.

  Ci nonostante, se il rilevamento dell'EOT fallisce, l'unit a nastro
  ``sbobina'' la cartuccia in quanto il nastro non  incollato alle
  bobine, ma trattenuto solo per frizione.

  Ci sono dettagliate istruzioni su come aggiustare tali nastri
  sbobinati alla pagina Web di Iomega:

  http://www.iomega.com/support/techs/ditto/3006.html

  e alla pagina Web della Hewlett Packard:

  http://www.hp.com/isgsupport/cms/docs/lpg12020.html

  Se le pagine non dovessero trovarsi nell'esatta locazione data sopra,
  provare a girovagare un po' fra le pagine di HP o Iomega finch non si
  riesce a trovare le informazioni di cui si ha bisgono.





  6.  Hardware supportato



  6.1.  Unit a nastro supportate


  Tutte le unit che sono compatibili con lo standard QIC-117 e con uno
  tra gli standard QIC-30, 80, 3010 e 3020 dovrebbero funzionare
  correttamente.  Anche le unit QIC-WIDE e Travan sono supportate (TR-1
   semplicemente un QIC-80 con nastri da 8mm, mentre TR-2 e TR-3 sono
  anche conosciute come QIC-3010 e 3020 rispettivamente).  Le unit
  Iomega Ditto 2GB e Ditto Max sono ugualmente supportate nonostante non
  siano completamente conformi agli standard QIC.  Sono supportati anche
  alcune unit da collegare alla porta parallela.

  Alcuni commenti riportati pi avanti a proposito di potenziali
  problemi con determinate unit sono molto datati, ma non ho
  accessibilit a tutti i tipi di hardware e quindi non posso provarli
  tutti.

  Taluni resoconti riportati di seguito sono stati commentati da me
  (<heine@math1.rwth-aachen.de>) in questo modo:



  Questo  un commento.


  Attualmente la lista delle unit funzionanati con ftape :


     Alloy Retriever 250


     Archive 5580i, XL9250i


     Colorado DJ-10, DJ-20 (conosciuti anche come: Jumbo 120, Jumbo 250)


     Colorado 1400
        <kosowsky@bellini.harvard.edu> ha riportato un problema durante
        un backup 1G utilizzando taper.


     unit a nastro per porta parallela Colorado Trakkere

        Supporto aggiunto da Jochen Hoenicke
        <Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE>.


     HP Colorado T1000

          I problemi riferiti sono probabilmente ormai superati.
          In particolare lo zftape del quale si parla non esiste
          pi e il driver ftape  in realt l'ftape-2.08.


     Funziona con nastri 3M Travan 400M (TR-1) e nastri da 120M.  
     stato riscontrato che mt esce improvvisamente, mentre con backup
     che utilizzano tar funziona bene.  Con cpio si consiglia l'uso di
     ftape al posto di zftape.
     (<millner@millner.bevc.blacksburg.va.us>)

     Sono stati riscontrati problemi con zftape consistenti in un
     continuo arresto e partenza dell'unit
     (<75104.1756@compuserve.com>).  Sembra sia un problema del nastro
     che gira troppo velocemente per il computer; il buffer DMA viene
     svuotato prima che sia riempito nuovamente.  Le versioni pi
     recenti di zftape non eseguono questa operazione se si utilizza un
     programma di backup opportunamente veloce e un buffer DMA
     sufficientemente grande.
     (<millner@millner.bevc.blacksburg.va.us>).


     Conner C250MQ(T)
        Il 250Q sembra generi errori in scrittura e frequenti
        riposizionamenti. (Frank Stuess presso Nacamar Data
        Communications)


          Errori in scrittura non sono necessariamente causati
          dall'unit a nastro, ma anche da cartucce rovinate.
          Anche riposizionamenti frequenti possono essere causati
          da cartucce rovinate, ma possono essere causati anche da
          errori di overrun, indice di problemi di comunicazione
          fra il controller FDC e quello DMA.




     Conner TSM420R, TSM850R
        I modelli 400 e 800 funzionano solo con nastri TR-1.


          Non so se questo stava ad indicare che le unit citate
          non funzionano con le normali cartucce DC-2120 da 120MB o
          che i nastri TR-3 non possono essere letti.  Queste unit
          non erano state progettate per quest'ultimo tipo di nas
          tro. E allora?



     Conner TST3200R
        Funziona con nastri TR-3 ad 1Mbps (cio solo con capacit da
        1600M).  Funziona con nastri QIC-WIDE 400M (il Sony 5122?)
        (<chris@cs.wmich.edu>).  Funziona con nastri TR-3, QIC-3010 e
        QIC-3020.  Viene distribuito con un FDC da 2MB che utilizza il
        controller Promise 2300+ da 1Mbps (<kjh@pollux.usc.edu>).

        Sembra che il diver floppy non riesca pi a leggere dischi a
        bassa densit.  Bisogna perdere un po' di tempo con i canali
        IRQ, quelli degli indirizzi ed i canali DMA
        (<chris@yakkocs.wmich.edu>).


          Il TST3200R va bene con ftape.



     Conner TST800R
        Il TST800R funziona con nastri TR-1, Sony QW5122F (210M) e
        DC2120.


          Funziona bene con ftape, almeno fino all'ftape-2.07.
          L'ho utilizzato personalmente finch non si  colato un
          transistor dell'unit, probabilmente a causa di un sur
          riscaldamento precedente.



     Conner CTT3200

        Il CTT3200  probabilmente identico allo Iomega Ditto 3200.
        Funziona con il controller da 2Mbps fornito, ma sembra non
        funzionare sotto DOS su alcune macchine (<jmorris@dtx.net>).



     Conner 1.7G Tapestor (TSM1700R)

        Funziona con nastri di tipo QIC-WIDE (<pschmidt@slip.net>).
        Parzialmente lavora con QIS-3200.  Se si utilizza il controller
        HSC-2, il canale DMA deve essere cambiato (incrementato di 1
        -canale 2?- modificare il Makefile).  Successivamente 
        necessario modificare il Makefile di ftape per riflettere questo
        cambiamento.  Nonostante ci, ftape si comporta in maniera un
        po' bizzarra con questo (non viene fornito alcun numero di
        versione) (<ttait@tiac.net>).  Potrebbe non funzionare a 2Mbps
        (QIC-3020) con il controller HSC.  L'unit si ferma con un
        messaggio del tipo "dumb tape stop" che fino ad ora non  stato
        compreso.  (<ttait@tiac.net>).


          Nessuna informazione recente disponibile.

     Escom o Archive (Hornet) 31250Q


     Exabyte EXB-1500
        Funziona con nastri QIC-3010.


     Exabyte TR-3

     Irwin 80SX, Insight 80Mb


     Iomega 250


     Iomega Ditto Tape Insider 420, 1700


     Iomega Ditto Tape Insider 3200
        Questa  l'unit che utilizzo io.  Le impostazioni di default
        dei jumper non funzionano.  Lasciare invariati l'IRQ e
        l'indirizzo della porta di I/O (6 e 0x370, rispettivamente), ma
        cambiare il DMA da 3 a 2.  (Kevin Johnson <kjj@pobox.com>).


          Fare riferimento al file MCONFIG delle distribuzioni di
          ftape pi recenti per altri suggerimenti sulla porta di
          I/O, l'IRQ ed il canale DMA.


     Potrebbe essere necessario aggiungere {0x08882, 80,
     wake_up_colorado, "Iomega 3200"} al file vendors.h per le versioni
     di ftape pi vecchie.

     Sono stati riscontrati problemi con ftape 2.07 ed il kernel
     1.12.13.  Tra tutte le combinazioni possibili di acceleratori,
     etc., l'unit potrebbe essere accessibile (su alcuni sistemi) una
     volta sola (<erwin@box.nl>).  Inoltre, dopo il primo accesso, l'uso
     successivo del nastro restituisce un messaggio di protezioni in
     scrittura (<erwin@box.nl>, <M.J.Ammerlaan@dutiwy.twi.tudelft.nl>).

     C' stato anche un caso nel quale il nastro  stato sbobinato.


          Ci potrebbe essere stato causato da un sensore di EOT
          sporco e non  necessariamente un effettivo malfunziona
          mento hardware (tranne quando  il malfunzionamento a
          sporcare il sensore di EOT...).


     Un altro problema  stato riscontrato durante la creazione di
     archivi (con dd).  Pu partire bene, ma quando l'unit comincia ad
     utilizzare dd, si ferma ed il nastro viene riavvolto fino al
     principio.  Successivamente comincia a far girare il nastro in
     continuazione senza fermarsi.  Sembra che tutto ci accada quando
     il driver chiede al nastro di fermarsi.  Ci dovrebbe causare
     l'arretramento del nastro di 3 segmenti, ed invece viene riportato
     all'inizio.  Una correzione dell'errore  stata postata, ma il
     problema non  stato risolto.


          Dovrebbe essere stato aggiustato in qualche versione fra
          l'ftape-3.00 e l'ftape-4.00.  Sfortunatamente l'utile
          comando di fast-skipping (salto veloce) di tutte le unit
          a nastro per controller floppy  veramente scarno.
          Recenti versioni di ftape hanno aggirato il problema.
     Suggerisco di procurarsi l'ultima versione del driver
     ftape qualora si avesse esperienza di questo problema.



     Iomega Ditto 800 Insider
        Funziona con nastri TR1, TR2, o DC2120 (<klein@informatik.uni-
        rostock.de>).


     Iomega Ditto 2GB
        Supporto aggiunto da Jochen Hoenicke
        <Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE> all'ftape-3.xx e
        successivi.

        Non  possibile formattare cartucce, la scrittura  possibile
        solo con speciali cartucce Ditto 2GB (limite hardware, non  una
        mancanza di ftape).


     Iomega Ditto Max

     Iomega Ditto Max Pro
        Supportato a partire dall'ftape-4.00.  Grazie a Tim Jones
        <tjones@estinc.com>.

        Non  possibile formattare cartucce, la scrittura  possibile
        solo con speciali cartucce Ditto Max (limite hardware, non  una
        mancanza di ftape).

        Non sono stato in grado di far funzionare il Ditto Max con altri
        file di periferica all'infuori di /dev/[n]qft0.  Non so se
        questa  una caratteristica del Ditto Max o del controller Ditto
        EZ che ho collegato al Ditto Max.

        (* Non c' bisogno di comprare un Fitto Max Pro per utilizzare
        le cartucce da 5/10GB.  Con ftape non ci sono sostanziali
        differenze fra il Ditto Max e il Ditto Max Pro.  *)


     Iomega Ditto 800/3200/2GB/Max/Max Pro Easy (porta parallela)
        Supportato a partire dall'ftape-4.00 con il driver per FDC bpck-
        fdc.


     Mountain FS8000


     Reveal TB1400

         stato riferito che non funziona con il kernel 1.3.79 ed ftape
        (nessuna versione fornita) o con il kernel 1.2.13 e zftape 1.04
        (<colin@colina.demon.co.uk>).


          La versione del driver ftape appena menzionata  ormai
          vecchia.  Se tuttavia si possiede una tale ``bestia'',
          procurarsi una versione del driver ftape pi recente.



     Summit SE 150, SE 250


     Tallgrass FS300
        Con un Tallgrass FS300 e un AHA1542B  necessario aumentare il
        tempo di bus-on / bus-off del 1542B.  Antti Virjo
        (<klanvi@uta.fi>) dice che portare CMD_BUSON_TIME a 4 e
        CMD_BUSOFF_CMD a 12 in linux/drivers/scsi/aha1542.c permette di
        attuare il trucchetto.


     Teac 800


     Sistema di backup con unit a nastro Memorex


     Wangtek 3040F, 3080F


   sempre possibile controllare la lista pi recente delle unit
  riconosciute da ftape, guardando nel file vendors.h della
  distribuzione di ftape.

  Anche se non voglio garantire il buon funzionamento di un'unit
  piuttosto che un'altra,  stato detto che il Colorado DJ-20 
  piuttosto rumoroso, quando paragonato ad un, diciamo, Conner C250MQ.
  Per inciso,  stato detto che il Colorado  5-10 volte pi rumoroso
  del Conner. Ma, poich non ho mai avuto n l'uno n l'altro, non posso
  dirlo con certezza.


       Se possiedi un'unit a nastro che funziona bene, ma non 
       listata qui, o se hai delle correzioni per le informazioni
       riportate sopra, ti pregherei di spedire una mail al manu
       tentore dell'HOWTO (<heine@math1.rwth-aachen.de>).



  6.2.  Controller speciali supportati


  I controller ad alta velocit dedicati, supportati da ftape, sono i
  seguenti:


    Colorado FC-10, FC-20

    Mountain MACH-2

    Iomega Tape Accelerator II

    controller da 2Mbps (utilizzanti l'fdc i82078-1)

    il controller Iomega Ditto EZ 4Mbps PnP


  6.2.1.  Colorado FC-10, FC-20


  Il supporto per il controller FC-10  stato aggiunto alla versione
  1.12 del driver di ftape.  Vedere i file RELEASE-NOTES e Makefile
  nella distribuzione di ftape.  Dalla versione 2.03 di ftape, il
  controller FC-20 comincer a funzionare, ma solo ad 1Mb/s (controllare
  le note di release!).


  6.2.2.  Mountain MACH-2



  Il supporto per il controller MACH-2  stato aggiunto all'ftape-1.14d.


  6.2.3.  Iomega Tape Accelerator II


  Per usare lo Iomega Tape Accelerator II (da non confondersi con lo
  Iomega Ditto Dash!), utilizzare -DMACH2 e configurare correttamente i
  valori per l'indirizzo I/O di base, l'IRQ e il DMA.  Funziona (secondo
  prove empiriche fatte da Scott Bailey <sbailey@xcc.mc.xerox.com>)
  almeno con l'ftape-2.02.


  6.2.4.  Iomega Ditto Dash e altri controller da 2Mbps


  Lo Iomega Ditto Dash e tutti gli altri controller da 2Mbps usano il
  chip 82078-1 della Intel, che pu lavorare a 2Mbps.  Il chip 
  supportato pienamente a partire dall'ftape-3.00.


  6.2.5.  Controller Iomega Ditto EZ PnP


  Questo controller richiede l'utilizzo del cosiddetto pacchetto
  isapnptools per essere configurato.   disponibile presso

  http://www.roestock.demon.co.uk/isapnptools/

  Il controller produce troppi errori di overrun quando viene utilizzato
  alla massima velocit di 4Mbps.  N Tim Jones <tjones@estinc.com> n
  io <heine@math1.rwth-aachen.de> siamo stati in grado di trovare una
  macchina che potesse far lavorare il controller a 4Mbps.  3Mbps
  sembrano andare bene.

  Se il Ditto EZ viene configurato per utilizzare il DMA 2 (il canale
  DMA usato dal controller del floppy), il drive del floppy non
  funzioner pi.  Non  di alcuna utilit disabilitare il gate DMA dei
  controller (come nel caso di altri controller ad alta velocit), cos
  non pu esserci alcun aiuto nemmeno dalla modifica di ftape.



  6.3.  Unit a nastro non supportate



    Alcune unit per porta parallela non funzionano ancora. Altre vanno
     bene.

    Irwin AX250L / Accutrak 250. (non  un'unit QIC-80)

    IBM Internal Tape Backup Unit (identica all'unit Irwin AX250L)

    COREtape light

  L'Irwin AX250L (e l'IBM Internal Tape Backup Unit) non funziona con
  ftape.  Questo  dovuto al fatto che supporta solo il QIC-117, ma non
  lo standard QIC-80 (utilizza il formato proprietario della Irwin
  ``servoe (Rhomat)'').  Non so nulla del formato Rhomat, n dove
  trovare qualche informazione.  Mi dispiace.

  Il COREtape light non accetta i comandi di inizializzazione, ma ce ne
  stiamo occupando.  Questo problemino lascia l'unit inutilizzabile.


  6.4.  Utilizzare un'unit a nastro esterna con ftape


  Se si possiede un controller floppy provvisto di un connettore femmina
  DB37 fissato alla staffa (alcuni piedini servono per alimentare
  l'unit)  possibile utilizzarlo con ftape.  Va bene, questa frase non
  era proprio ovvia.  Proviamo in questo modo: alcuni FDC (quelli
  proprio vecchi) hanno un connettore DB37 sulla staffa per connettere
  unit floppy esterne.

  Se si costruisce un cavo adatto per collegare il connettore DB37 (del
  FDC) alla propria unit a nastro esterna,  possibile utilizzare ftape
  per controllare la propria unit.

  Ci  dovuto al fatto che dal punto di vista di un programma non c'
  differenza fra un connettore esterno ed uno interno.  Cos, dal punto
  di vista di ftape, sono identici.


    Pin 20-37: MASSA

    1: +12 Volt (ALIMENTAZIONE)

    2: +12 Volt ritorno (MASSA)

    3: +5 Volt ritorno (MASSA)

    4: +5 Volt (ALIMENTAZIONE)

    5: 2

    6: 8

    7: 10

    8: 12

    9: 14

    10: 16

    11: 18

    12: 20

    13: 22

    14: 24

    15: 26

    16: 28

    17: 30

    18: 32

    19: 34

  Il connettore per l'alimentazione  del tipo ``mini'', come quello
  delle unit floppy da 3.5".  L'idea  quella di collegare uno dei
  connettori per l'alimentazione della PSU (-- Si tratta
  dell'alimentatore interno al computer (N.d.T.)--) al connettore
  presente sulla scheda.  Se si intende utilizzare solo un cavo, ci si
  dovr procurare un cavo da 50 fili e utilizzare pi fili per
  l'alimentazione (e la massa, per ci che serve).
  Nessuno mi ha confermato che funzioni.  Fatemi sapere i risultati se
  ci provate.



  6.5.  Schede madri PCI ftape


  Sfortunatamente alcune schede madri PCI causano problemi quando si
  tenta di far girare ftape.  Alcune persone hanno avuto modo di provare
  che ftape non gira su computer con tecnologia PCI, mentre non fanno
  una grinza su di un normale 386DX con tecnologia ISA.  Se si presenta
  un problema come questo, fare riferimento al file README.PCI nella
  distribuzione di ftape.


       Un controller per floppy ha bisogno di un controller DMA su
       bus ISA per i suoi trasferimenti di memoria.  Sembra che il
       controller DMA ISA non ottenga il controllo sulla memoria
       abbastanza frequentemente su alcuni sistemi basati sul PCI.





  7.  Archiviare e ripristinare i dati


  Questa sezione descrive alcune semplici utilizzi di tar ed mt.  Altri
  esempi si possono trovare nell'ftape-manual del pacchetto ftape-doc.
  L'ftape-tools contiene alcuni semplici ambienti di test automatizzati
  tipo DejaGnu (-- Pacchetto per scrivere test automatizzati.--) Vedere
  la sezione ``Procurarsi Ftape'' per informazioni su dove scaricare
  questi pacchetti addizionali.


  7.1.  Scrivere un archivio su di un nastro


   possibile utilizzare ``tar'', ``ttdd'', ``cpio'' e ``afio''.  Ci
  sar bisogno di utilizzare ``mt'' per ottenere il massimo dalle
  potenzialit dai nastri e dal driver ftape.  Per cominciare consiglio
  tar, in quanto permette di archiviare molte directory e di estrarre
  successivamente file separati dall'archivio.  cpio crea archivi pi
  piccoli ed  generalmente pi flessibile di tar, ma gli mancano alcuni
  caratteristiche come l'etichettamento dei volumi.  afio crea backup
  nei quali ogni file  compresso individualmente e poi concatenato.
  Questo permette di accedere ai file ``dopo'' il punto di errore.  Se
  si utilizzano file archiviati con tar e compressi con gzip, tutti i
  dati dopo il punto di errore sono persi! (secondo me, questa  una
  buona ragione per non utilizzare la compressione sui backup).  Quale
  sia la scelta pi opportuna dipende dalla situazione e dalle
  caratteristiche diverse da programma a programma.  Consiglio di dare
  un'occhiata ad ogni programma ed a rivedere le opzioni che ognuno di
  essi fornisce.   possibile che questo HOWTO possa fornire maggiori
  dettagli al riguardo in futuro.

  Ci sono ulteriori link che puntano a programmi di backup all'indirizzo
  http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape/ nella sezione
  software della pagina.

  Per eseguire il backup del proprio albero dei sorgenti del kernel
  utilizzando tar, impartire i seguenti comandi (dove si assume che i
  sorgenti si trovino in /usr/src/linux):


          # cd /usr/src
          # tar cf /dev/ftape linux




  Questo non comprime i file, ma fa girare un po' il nastro.  Se si
  vuole la compressione (e si possiede il tar 1.11.2),  sufficiente
  aggiungere il flag -z (-- tar assume che il primo argomento sia
  un'opzione, cosicch il ``-'' non  necessario, cio i seguenti due
  comandi eseguono la stessa operazione: ``tar xzf /dev/ftape'' e ``tar
  -xzf /dev/ftape''--)

  cio: ``tar czf /dev/ftape linux ''.

  Per maggiori istruzione su come utilizzare tar, dd ed mt consultare le
  man-page e i file texinfo ottenuti con le rispettive distribuzioni.



  7.2.  Ripristinare un archivio


  Va bene, ora ripristiniamo il backup dei sorgenti del kernel
  effettuato alla sezione precedente ``Scrivere un archivio su di un
  nastro''.  Per fare questo digitare semplicemente:



               tar xf /dev/ftape




  Se si  utilizzata la compressione, si dovr digitare:



               tar xzf /dev/ftape




  Quando si utilizza la compressione, gzip si lamenter di dati
  ridondanti subito dopo la fine dell'archivio (e ci condurr ad un
  messaggio di ``broken pipe'').  Tutto ci pu essere tranquillamente
  ignorato.

  Per altri programmi di utilit, consultare la pagina di manuale.



  7.3.  Provare un archivio


  tar possiede un'opzione (-d) per rilevare le differenze fra due
  archivi.  Per testare il proprio backup dei sorgenti del kernel
  digitare:



               tar df /dev/ftape




  Se non si possiede la man-page di tar, non tutto  perduto (ancora);
  tar possiede un'opzione interna per listare i flag disponibili:
  provare con ``tar --help 2>&1 | less''.


  7.4.  Mettere pi di un backup su di un nastro


  Per mettere pi di un backup su di un nastro si deve possedere
  l'utility mt.  Probabilmente  gi installata sul sistema se si
  possiede una delle distribuzioni principali (cio Slackware o Debian).

  Programmi come tar e cpio generano un singolo archivio per il nastro
  (Tape ARchive) e non sanno nulla circa l'utilizzo di pi file o il
  posizionamento di un nastro.  Non fanno altro che leggere o scrivere
  su di un file di periferica.  mt sa perfettamente come muovere il
  nastro avanti ed indietro, ma non sa assolutamente come estrarre i
  dati dal nastro.  Come probabilmente si avr gi intuito, la
  combinazione di tar o cpio con mt permette il trucco.

  Utilizzando il device nqft[0-3] (nftape),  possibile posizionare il
  nastro con mt al posto giusto (``mt -f /dev/nqft0 fsf 2'' indica di
  andare avanti di due ``marcatori di file'', cio di due file tar) e
  poi utilizzare tar o cpio per leggere o scrivere i dati rilevanti.

  L'utilizzo pi comune delle periferiche non-riavvolgenti  quello di
  aggiungere un altro backup ad un nastro esistente.  Qui di seguito ci
  sono i passi dettagliati con una breve spiegazione per una
  comprensione migliore.


    Inserire il nastro nell'unit.  Su alcune unit questo potrebbe
     causare il riavvolgimento del nastro.

    Impartire un comando di ``fine nastro'' (End-of-Tape) alle
     periferiche non-riavvolgenti.



               mt -f /dev/n???? eof





  Il nastro dovrebbe essere ora posizionato alla fine dei dati (End-of-
  Data o EOD).  Il nastro non si muover finch:

    un programma non aprir la periferica;

    la periferica riavvolgente verr chiusa;

    il modulo di ftape verr rimosso dalla memoria kernel (rmmod);

    il nastro verr espulso.


     L'utilizzo di ``mt eof'' dovrebbe risultare pi veloce con i nastri
     QIC.

    L'operazione successiva comincer dal marcatore EOD.  Se si vuole
     intraprendere un'operazione di scrittura, questa aggiunger un
     nuovo ``file''.  Se si intraprende un'operazione di lettura, questa
     fallir con un EOF.  Il marcatore di EOD per molti formati di
     nastro , in effetti, due marcatori di EOF consecutivi, anche se,
     dalla versione 3.xx, ftape utilizza la tavola di volume, come
     specificato nello standard QIC-113, per emulare i marcatori di
     file, cosicch non ci sono due marcatori di file consecutivi nel
     punto di EOD.  La scrittura dei marcatori di EOF viene effettuata o
     dal driver o dall'hardware nel momento in cui riceve un close().


    Questo  il momento in cui vengono effettivamente scritti i dati
     sul nastro.

    Questo punto  importante.  Ora riavvolgere il nastro.  ftape
     mantiene nella propria cache alcune informazioni inerenti i
     segmenti di intestazione del nastro che vengono aggiornati solo
     quando il nastro viene riavvolto.  L'utilizzo della cache 
     necessario in quanto il riavvolgimento del nastro e l'aggiornamento
     dei segmenti di intestazione richiede una notevole quantit di
     tempo.  L'altra faccia della medaglia  che si perderanno
     informazioni se si esegue un'operazione di scrittura e non si
     riavvolge il nastro.



  7.5.  Aggiungere file ad un archivio


  C' un modo per espandere un archivio mettendo un file sul nastro e,
  successivamente. aggiungerne altri?

  No.  La documentazine di tar dice di utilizzare ``tar -Ar'', ma non
  funziona.  Questa  una limitazione del driver ftape corrente.



  7.6.  Eseguire il mount o l'unmount dei nastri


  Poich un nastro non ha un ``filesystem'' su di esso, non si esegue il
  mount o l'unmount di un nastro.  Per effettuare un backup, inserire
  semplicemente il nastro ed impartire i comandi di tar (o qualsiasi
  altro comando si utilizzi per accedere al nastro).






  8.  Creare un floppy di partenza in caso di emergenze per ftape


  (* Nel momento in cui scrivo (agosto 1998), ricordo di aver letto di
  diversi set di dischi d'emergenza sul news-group c.o.l.a.
  (comp.os.linux.announce).  Alcuni di quei pacchetti potrebbero
  effettivamente produrre un insieme di dischetti per le partenze
  d'emergenza pi sofisticato.   opportuno controllare di persona.  Io
  non ho provato a creare un dischetto di emergenza con le recenti
  versioni di ftape.  *)


  Questa sezione  stata scritta da Claus Tndering <ct@login.dknet.dk>.

  Una volta diventati felici possessori di un'unit a nastro e di
  diversi nastri pieni zeppi di backup, probabilmente verr spontaneo
  porsi questa domanda: Se qualcosa va storto e perdo completamente il
  contenuto del mio hard-disk, come faccio a ripristinare i miei file
  dal nastro?


  Ci di cui si ha bisogno  un disco floppy d'emergenza, che contenga
  abbastanza file da permettere la partenza di Linux e di ripristinare
  l'hard-disk dal nastro.

  La prima cosa da fare  leggere il ``The Linux Bootdisk HOWTO''
  scritto da Graham Chapman <grahamc@zeta.org.au>.  Questo documento
  contiene praticamente tutto ci che bisogna sapere per creare un kit
  di partenza con dischi floppy d'emergenza.  I paragrafi seguenti
  contegono alcune altre informazioni che renderanno la vita un po' pi
  semplice quando si seguiranno le procedure di Graham Chapman.


    Non c' effettivamente bisogno di /etc/init, /etc/inittab,
     /etc/getty e /etc/rc.d/* sul floppy.  Se Linux non trova /etc/init,
     far partire /bin/sh dalla console, cosa che va benissimo per
     ripristinare il sistema.  Cancellando questi file si guadagna dello
     spazio sul floppy, cosa di cui, probabilmente, si ha bisogno.

     meglio cercare un versione ridotta di /bin/sh.  Spesso 
     possibile trovarla sui floppy di boot che si ottengono con una
     distriuzione Linux.  Questo, ancora, permette di guadagnare
     ulteriore spazio.  Personalmente suggerisco ash, estremamente
     ridotta (circa 62kB) e gran parte compatibile con bash.

    L'/etc/fstab che verr incluso nel floppy dovrebbe assomigliare a
     qualcosa del genere:



       /dev/fd0        /               minix   defaults
       none            /proc           proc    defaults
       /dev/hda        /mnt            ext2    defaults





  Una volta fatto partire il sistema dal floppy, impartire il comando
  seguente:



       mount -av





    Assicurarsi che il driver per il floppy non sia montato quando si
     accede all'unit a nastro!  In caso contrario  possibile ottenere
     in risposta il seguente messaggio di errore:



        Unable to grab IRQ6 for ftape driver





  Questo significa che  necessario caricare il floppy in un ramdisk.

  La sfortunata conseguenza di questo  che i programmi necessari a
  ripristinare i file dal nastro non possono risiedere su di un floppy
  separato.  A questo punto si hanno due opzioni:

     1. Salvare tar (cpio, afio o qualsiasi altro programma di backup si
        utilizzi) sul floppy di root.  Qui  dove si sfrutta tutto lo
        spazio addizionale creato nei passi precedenti.

     2. Prima di cominciare a ripristinare il nastro, copiare tar (cpio,
        afio o quant'altro) sul proprio hard-disk e caricarli da l.


    Oltre ai programmi di backup, ci sar probabilmente bisogno anche
     di mt sul floppy di root.

    Assicurarsi che il device del nastro (tipicamente /dev/nqfto) sia
     presente sul floppy di root.

    Infine, provare il tutto! Ovviamente non consiglio di distruggere
     il contenuto dell'hard-disk per vedere se si  in grado di
     ripristinare tutto.  Consiglio, invece, di provare a far partire il
     sistema dai dischi di emergenza e di assicurasi di poter almeno
     listare il contenuto dei backup presenti sul nastro.




  9.  Domande poste frequentemente


  (* Questa  l'inclusione testuale della raccolta delle domande poste
  pi frequentemenete sull'Ftape, che sono mantenute da Johan De Wit e
  che possono essere visionate in rete all'indirizzo
  http://www.correct.nl/~ftape.  Poich l'SGML Linuxdoc non contiene le
  sotto-sotto-sezioni nell'indice, ho aggiunto la parola FAQ alle
  sezioni del documento FAQ originale.  *)

  Questa raccolta di FAQ potrebbe essere leggermente datata in quanto 
  stata fatta mentre la versione 3.04d del driver ftape era la pi
  recente.  Se qualche risposta data nelle FAQ contraddice ogni altra
  affermazione di questo HOWTO, si prega di non considerare la risposta
  della FAQ e di spedire a me (<heine@math1.rwth-aachen.de>), cos come
  al manutentore dell'Ftape-FAQ (Johan De Wit <jo@correct.nl>), una nota
  al riguardo.


  Nella lettura di questo documento  possibile incontrare riferimenti
  ai seguenti indirizzi:


    Il manutentore delle FAQ di Ftape:

     Johan De Wit <jo@correct.nl>


    Il manutentore di Ftape:

     Claus-Justus Heine   <claus@momo.math.rwth-aachen.de>


    L'home-page di Ftape:

     <http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape/>


    Mirror dell'home-page di Ftape:

     <http://www.torque.net/ftape/>

     Un ringraziamento va a:
     Grant R. Guenther <grant@torque.net>

     <http://www.info-systems.com/ftape/>

     Un ringraziamento va a:

     Jakob Curdes <jc@info-systems.com>

     <http://www.newwave.net/~joshg/ftape/>

     Un ringraziamento va a:

     Josh Goins <joshg@newwave.net>


    L'Ftape-HOWTO

     <http://sunsite.unc.edu/LDP/HOWTO>


    La mailing-list di Ftape:

     <linux-tape@vger.rutgers.edu>


  Ci sono sicuramente molte mancanze.  Non ci si faccia problemi a voler
  migliorare queste FAQ.  Il modo migliore per farlo  quello di mandare
  messaggi alla mailing-list di Ftape nel caso ci siano domande che non
  trovano risposta qui.

  Inoltre, se si sta gi leggendo regolarmente la mailing-list e si ha
  l'impressione che alcune domande vengano poste frequentemente, 
  possibile senza alcun problema spedire la domanda, con l'eventuale
  risposta, nel formato indicato qui sotto al manutentore delle FAQ di
  Ftape ed anche alla mailing-list di Ftape.

  Se si inviano messaggi relativi alle FAQ, si prega di non dimenticarsi
  di prependere la parola ``[FAQ]'' all'oggetto del proprio messaggio.
  Si prega di non aggiungere la parola ``FAQ'' all'oggetto se il
  messaggio non  inerente alle FAQ.

  Questo per ora  tutto.

  Claus-Justus Heine.



  10.  FAQ: domande relative alla Compilazione ed installazione di
  Ftape



  10.1.  Che versione di Ftape devo utilizzare?


  Sempre l'ultima versione stabile che si suppone sia disponibile agli
  indirizzi ftp://sunsite.unc.edu/pub/Linux/kernel/tapes e http://www-
  math.math.rwth-aachen.de/~LBFM/claus/ftape/.

  Nel momento in cui sto scrivendo, l'ultima versione stabile  la
  ftape-4.02.

  <risposta di Claus Heine>



  10.2.  Sto riscontrando problemi nel cercare di far girare l'unit XYZ
  con il kernel 2.0. xx  con il driver compilato staticamente.  Come
  faccio a rimediare?


  La versione predefinita di Ftape inclusa con i sorgenti del kernel
  2.0.xx  la 2.08 o la 2.09 ed  alquanto datata.  Si prega di
  aggiornare i driver di Ftape all'ultima versione disponibile all'home-
  page di Ftape.

  <risposta di Tim Jones>



  10.3.  Sto lavorando con Linux/SMP e il sistema si congela quando
  tento di accedere ai device di Ftape!


   necessario aggiungere -D__SMP__ alla variabile KERNEL_OPT nel file
  MCONFIG.  Nelle versioni di ftape pi aggiornate  sufficiente
  togliere il commento ad alcune linee presenti nel file MCONFIG.

  <risposta di Claus Heine>



  10.4.  Perch depmod  si lamenta di certi ``undefined symbols'' [sim
  boli indefiniti]?


  Si ignorino i messaggi d'errore di depmod.  Il problema  che i moduli
  di Ftape devono essere compilati senza la caratteristica del checksum
  di versione (cio CONFIG_MODVERSIONS) con i kernel 2.0.*;.  Questo non
  comporta alcun problema, anche quando i moduli vengono utilizzati con
  un kernel che supporta questa caratteristica; solo che depmod
  erroneamente si lamenta di certi simboli indefiniti.  Si ignorino le
  lamentele di depmod e si provi ad inserire i moduli nonostante queste
  lamentele:



        modprobe zftape




  Se non funziona, c' qualcosa di sbagliato.

  <risposta di Claus Heine>



  10.5.  insmod  dice che la versione del kernel  sbagliata.


  Il programma insmod pu confrontare la versione del kernel con la
  versione per la quale Ftape  stato compilato in due modi: pu
  direttamente comparare il numero di versione del kernel registrato nel
  modulo di Ftape con la versione del kernel che sta girando, oppure, se
  sia il kernel che Ftape sono stati compilati con i simboli di
  versione, confrontare la versione dei simboli utilizzati dal kernel.

  Se la versione di GCC  stata aggiornata alla v2.7.0 o successive, 
  necessario ricompilare le utility dei moduli con gcc v2.7.x.


  Versioni di insmod pi recenti permettono di ``forzare'' l'inserimento
  di un modulo nel kernel, anche se la stringa di versione non 
  corretta.

  <dall'Ftape-HOWTO>



  10.6.  insmod  dice che kernel 1.2.0 e 1.2.0 differiscono.


  Ci si  ricordati di applicare il patch ksyms.c al kernel?  Se non lo
  si  fatto, leggere il file README.linux-1.2 nella distribuzione dei
  sorgenti.

  <dall'Ftape-HOWTO>



  10.7.  Provando a compilare Ftape si ottiene l'errore:  modver
  sions.h: no such file or directory .


  Il file modversions.h viene creato quando il kernel  compilato con il
  flag di configurazione CONFIG_MODVERSIONS attivato.  Con questa
  opzione abilitata, il file verr creato durante il passo make dep.

  Un consiglio pi pratico: make mrproper rimuover
  /usr/include/linux/modversions.h.   necessario riconfigurare il
  kernel ed impartire un make dep per riottenere il file.

  <dall'Ftape-HOWTO>



  10.8.  In ogni caso, cosa sono questi ``versioned symbols'' [simboli
  di versione]?


  Rispondendo affermativamente al CONFIG_MODVERSIONS durante il make
  config, tutti i simboli esportati dal kernel, cio i simboli che i
  moduli caricabili possono ``vedere'', vengono aumentati per
  comprendere una somma di controllo attraverso i tipi dei parametri di
  chiamata/ritorno.  Ci permette ad insmod di rilevare se la
  definizione di una variabile o funzione nel kernel  cambiata dal
  tempo in cui Ftape  stato compilato.

  Questo assicura un alto grado di sicurezza, tale da evitare un
  tracollo del kernel nel caso si utilizzi un modulo vecchio con il
  proprio kernel.

  Se si abilita CONFIG_MODVERSIONS nel kernel, assicurarsi di aver tolto
  il commento da

  -DMODVERSIONS -include /usr/include/linux/modversions.h


  alla linea MODULE_OPT nel Makefile di Ftape.  Viceversa, se non si ha
  CONFIG_MODVERSIONS abilitato, assicurarsi di avere la linea commen
  tata.

  <dall'Ftape-HOWTO>




  10.9.  Mi sembra di avere sftape invece di zftape.  Quando lancio il
  comando ftmt status , ottengo una risposta che, nei documenti di
  Ftape, corrisponde a sftape ( /dev/qft0: Invalid argument ).  Perch?


  Ci sono (almeno) due possibili cause a questo problema:

    Tutte le versioni Ftape-3.*; precedenti alla 3.04 installano i
     moduli in /lib/modules/misc invece di /lib/modules/uname -r/misc.
     Poich modprobe cerca in /lib/modules/misc/ come ultima risorsa, ci
     potrebbe essere un vecchio modulo ftape.o disperso in
     /lib/modules/uname -r/misc che modprobe trova prima (``uname -r''
     sta per la versione del kernel).  In questo caso rimuovere il
     vecchio modulo ftape.o.

    Il proprio kernel ha il supporto per Ftape compilato. In questo
     caso riconfigurare il proprio kernel senza il supporto per Ftape
     (CONFIG_FTAPE), ricompilarlo ed installarlo.

  <risposta Claus Heins>



  10.10.  La mia scheda DASH/FC-20/Exabyte Accelerator funziona sotto
  Microsoft Windows, ma ottengo un errore di tipo ``unit non trovata''
  in var/log/messages/ quando provo ad utilizzarlo sotto Linux.


  Probabilmente si sta provando ad utilizzare le stesse impostazioni di
  IRQ e DMA dell'FDC installato.  Ci non funziona per le versioni di
  Ftape precedenti alla 3.03b.  Si prega di aggiornare il driver di
  Ftape all'ultima versione disponibile dall'home-page di Ftape.

  <risposta di Tim Jones>



  10.11.  I trasferimenti DMA di Ftape danno errori di ECC.


  Sono spiacente di dover dire che ci sono alcune schede SVGA e schede
  Ethernet che non decodificano correttamente i propri indirizzi.
  Questo tipicamente accade quando i buffer di Ftape si trovano
  nell'intervallo 0x1a0000-0x1c0000.  In qualche modo i cicli di
  scrittura DMA vengono rovinati ed ogni altro byte scritto ottiene un
  valore sbagliato (0xff).  Questi problemi si sono avuti sia con schede
  SVGA che schede Ethernet.  Siamo a conoscenza di almeno una (cattiva?)
  scheda VGA ATI 16bit che provoca questo.

  La soluzione pi semplice consiste nel mettere la scheda in uno slot
  ad 8bit (spesso non  abbastanza riconfigurare la scheda per
  trasferimenti ad 8bit).  Spostare il buffer di Ftape lontano
  dall'intervallo della VGA  solo una soluzione parziale.  Tutti i
  buffer DMA utilizzati in Linux possono avere questo problema!  Vorrei
  che fosse chiaro questo concetto: questo non ha niente a che fare con
  il software di Ftape.

  <dall'Ftape-HOWTO>



  10.12.  Aiuto!  Sto avendo dei `` dmaalloc() failed '' nel mio file di
  syslog.



  Si dovrebbe vedere questo solo se si sta tentando di eseguire un
  insmod con il modulo ftape.o.  Provare a lanciare prima swapout.
  Viene fornito con i sorgenti di Ftape distribuito singolarmente.  Non
  compare nei sorgenti di Ftape che vengono forniti con il kernel.

  Qui di seguito  riportato un esempio di come si possa impostare il
  file rc.local per un suo utilizzo.



       # Install the Floppy Tape Driver
       if [ -f /boot/modules/`uname -r`/misc/ftape.o ]; then
          echo Installing ftape for Linux `uname -r`
          swapout
          insmod /boot/modules/`uname -r`/misc/ftape.o
       fi




  Si noti che questo problema non compare se il driver di Ftape viene
  compilato nel kernel.

  <dall'Ftape-HOWTO>



  10.13.  Syslogd lavora in continuazione quando gira Ftape.


  Le opzioni in fase di compilazione NO_TRACE e NO_TRACE_AT_ALL in Ftape
  controllano l'ammontare dei log di sistema.  Aggiungere tutto quello
  che si ritiene opportuno alla linea FTAPE_OPT nel Makefile e
  ricompilare.

  <dall'Ftape-HOWTO>



  10.14.  Come posso cambiare il trace-level?


  Ci sono tre modi per fare questo (in ordine di preferenza personale).
  Quando ci arriveremo, qui ci sono i significati dei vari trace-level.


    0 bugs [bachi]

    1 + errors [errori]

    2 + warnings [avvertimenti]

    3 + information [informazioni]

    4 + more information [informazini ulteriori]

    5 + program flow [flusso del programma]

    6 + FDC/DMA info [informazioni FDC/DMA]

    7 + data flow [flusso dei dati]

    8 + everything else [qualsiasi altra cosa]



  1. Utilizzare insmod per cambiare trace-level: se si sta utilizzando
     il meccanismo dei moduli per caricare il driver di Ftape, 
     possibile specificare il trace-level come opzione del comando
     insmod.



       /sbin/insmod ftape.o tracing=<trace-level>





  2. Utilizzare mt per cambiare trace-level: il driver di Ftape ha un
     hack (-- taglio--) che permette all'opzione fsr di mt di venir
     utilizzata per impostare il trace-level.  zftape non ha questo
     hack.



       mt -f /dev/ftape fsr <trace-level>





  L'utilizzo del comando fsr in mt  un hack e probabilmente sparir o
  cambier col tempo.

  3. Ricompilare per cambiare trace-level: il file tracing.c contiene
     una linea int tracing = 3;.  Cambiare il 3 in ci che si ritiene
     opportuno e ricompilare.

  <dall'Ftape-HOWTO>



  10.15.  Sto avendo problemi con Ftape.  Sto utilizzando l'ultima ver
  sione di Ftape prelevata dall'home-page di Ftape e credo di aver indi
  viduato un bug vero.  Cosa devo fare?


  Controllare l'home-page di Ftape per una versione ancora pi recente.
  Poi controllare che le FAQ contenute nel pacchetto non riportino il
  problema riscontrato.  Successivamente provare a controllare che il
  manuale che arriva con la distribuzione di Ftape non menzioni i
  problema.

  Non c' bisogno di leggere l'intero manuale.  Pi semplicemente si
  cerchi nell'indice analitico una parola che possa riferirsi al proprio
  problema e leggere il paragrafo relativo.

  Se ancora si  convinti di aver trovato un baco, allora postare una
  domanda di carattere generale che descriva il problema nella mailing-
  list di Linux-Tape, ma non allegare tutto il log dell'errore di Ftape.
  Se ci siamo gi imbattuti nel problema in passato, faremo sapere dove
  si trova la soluzione.  Se, invece, non lo abbiamo mai visto, il
  manutentore di Ftape probabilmente richieder l'intero log d'errore
  (ottenuto dal proprio file dei messaggi di sistema).

  <risposta di Tim Jones>





  11.  FAQ: domande relative all'utilizzo di Ftape!



  11.1.  Quanto va veloce Ftape?


   possibile ottenere velocit di backup e ripristino abbastanza
  rispettabili con Ftape: con un Colorado DJ-20 ed un controller Adaptec
  1542CF sono state misurate delle velocit di trasferimento
  continuative di 4.25MB/min (senza compressione) con un archivio tar da
  70MB, mentre si stava confrontando l'archivio sul nastro con i dati su
  di un disco IDE.  La velocit di Ftape dipende fortemente dalla
  velocit di trasferimento del proprio FDC: l'AHA1542CF  un FDC di
  tipo "post-1991 82077" che permette di inviare 1Mb/s di dati
  all'unit.  Se si possiede un FDC che permette di spedire 500kb/s di
  dati, si otterr una velocit di trasferimento dimezzata (beh, ovvio).



  11.2.  Quando scrivo su alcuni dei miei nastri, sembra che perda un
  sacco di tempo a ``lustrarsi le scarpe'' o nel riposizionamento,
  invece di trasferire dati.  C' qualcosa che non va nel mio sistema?


  Ci sono stati un paio di casi di ``lustramento di scarpe''.  Questo
  accade quando il nastro sembra correre avanti ed indietro senza fine.
  Ci  stato notato con un Jumbo 250 (<74407.3051@compuserve.com>) e
  con uno Iomega 250 Ditto Insider (<tom@opus.cais.com>).  Nell'ultimo
  caso si stava utilizzando Linux ELF con hard-disk SCSI (connesso ad un
  Adaptec 1542cf).  Pregerei di contattarmi nel caso si abbia un
  aggiornamento al riguardo.

  <dall'Ftape-HOWTO>

  Probabilmente no.  Se si sta eseguendo il backup di un gran numero di
  file di dimensione inferiore ai 2kB, bisogner abituarsi a conviverci.
  In questo caso il riposizionamento  causato da un accesso
  spropositato al file system.  Se si sta eseguendo il backup di file di
  sistema normali, questo pu essere dovuto a sporco o stiratura del
  nastro della cartuccia.  Con una semplice ritensionatura del nastro
  tutto dovrebbe sparire.  Provare con



       ftmt -f /dev/zqft0 reten




  per ritensionare il nastro.  Se la ritensionatura non risolve il
  problema e accade solo con certi nastri, pu essere opportuno
  sostituire il nastro in questione.

  <risposta di Tim Jones>

  Se si utilizza afio come strumento di backup,  possibile fargli
  scrivere un gran numero di buffer in un colpo solo utilizzando il flag
  -c.  Utilizzare un valore opportuno in modo da fornire dati
  sufficienti per molti dei singoli passaggi punto-a-punto sopra il
  nastro.  Per il mio sistema, le seguanti impostazioni vanno abbastanza
  bene, in quanto fanno fermare il nastro, a sistema scarico, un numero
  di volte relativamente basso ad ogni passaggio:



  find /usr/local -xdev -print | afio -o -v -f -b 10240 -c 800 /dev/qft0




  Nel mio caso sto scrivendo 800x1024 byte per ogni scrittura sul
  nastro, cio cira 8MB.

  Non ho fatto molte esperienze con queste impostazioni, cos qualcuno
  potrebbe volerne cercare di migliori.

  Probabilemente altre utility di backup possono essere modificate per
  utilizzare una tecnica simile.

  <risposta di Michael Hamilton>

  Il tar di GNU non utilizza i buffer in questo modo.  Il programma di
  backup commerciale bru  in grado di trattare buffer multipli
  utilizzando memoria condivisa; questo funziona solo quando si sta
  scrivendo archivi compressi con bru (indipendentemente dal fatto che
  si stia utilizzando la compressione di Ftape).

  Un altro modo per sopperire al problema potrebbe essere quello di
  utilizzare pi buffer DMA nel driver Ftape del kernel:



       mt -f /dev/qft0 setdrvbuffer $((6*32786))




  $((6*32786)) dovrebbe venir espansa dalla propria shell quando se ne
  utilizzi una Bourne-compatibile.  Questo produce un impatto negativo
  sulla memoria di sistema: i buffer DMA di Ftape non possono essere
  utilizzati da nessun'altra parte del kernel, n da nessun'altra
  applicazione.  E la memoria contenente il kernel non pu essere messa
  nella partizione di swap.  Se si decidesse di utilizzare questo tipo
  di bufferizzazione multipla,  conveniente scaricare il driver non
  appena il suo utilizzo  terminato.

  <risposta di Claus Heine>


  11.3.  Devo far ripartire il mondo DOS per formattare i nastri?


  No, se si sta usando l'ultima versione dei driver di Ftape disponibile
  all'home-page di Ftape.

  Per formattare un nastro QIC-80, TR-1, TR-3, QICWide 3010 o 3020,
  procurarsi l'ultima versione di ftape e l'ultima versione del
  pacchetto ftape-tools (dallo stesso sito) e leggere la documentazione
  dell'utility ftformat inclusa nel pacchetto ftape-tools.

  (* Non provare a formattare nastri Ditto 2GB.  *)

  (* Non provare a formattare nastri Ditto Max o Max Pro.  *)

  <risposta di Tim Jones e Claus Heine>






  11.4.   possibile formattare nastri Ditto 2GB con ftape?


  Non  possibile formattare nastri Ditto 2GB con unit a nastro Ditto
  2GB, cos come non  assolutamente possibile riformattare nastri Ditto
  2GB in modo tale da poter essere utilizzati ancora da unit a nastro
  Ditto 2GB.

  Questa  una limitazione hardware dell'unit a nastro Ditto 2GB.  Non
  c' possibilit di aiuto a livello software, cio non  una mancanza
  di ftape.



  11.5.   possibile formattare nastri Ditto Max o Max Pro con ftape?


  No, il Ditto Max non pu formattare nastri.

  Questa  una limitazione hardware dell'unit a nastro Ditto 2GB.  Non
  c' possibilit di aiuto a livello software, cio non  una mancanza
  di ftape.



  11.6.  Ftape rileva pi settori danneggiati con nastri QIC-3020 di
  quanto non faccia DOS.


  Se si presta attenzione alla differenza, si noter che Ftape rileva
  sempre 2784 settori in pi di DOS.

  Il numero che Ftape riporta  corretto (ovviamente :-).  Tutti i
  nastri QIC-3020 correttamente formattati hanno 2784 settori in
  posizioni predefinite che sono marcati nella mappa dei settori
  danneggiati.  Quotando dalle specifiche:


       Le tracce 5,7,9,11,13,15,17,19,21,23,25 e 27 comprese nei 4
       segmenti o dell'EOT o del BOT sono disposte per aumentare i
       tassi d'errore per via delle hole imprints [impronte del
       buco?].  Per questo motivo queste regioni devono essere map
       pate come danneggiate nel momento della formattazione ed
       ascritte nella mappa dei settori danneggiati per indicare
       che tutti i settori all'interno dei segmenti identificati
       sono danneggiati.??


  Questo fornisce 12 tracce * 2 * 4 segmenti * 29 settori = 2784
  settori.

  Cos Ftape preferisce riportare il numero effettivo di settori che non
  possono essere utilizzati sul nastro, mentre DOS fornisce un numero
  pi ottimistico indicando una migliore qualit del nastro.  Il
  comportamento di Ftape, comunque, potrebbe cambiare in futuro per
  rilevare una formattazione corretta e mostrare due numeri separati.
  In ogni caso a questo, per ora, non  riservata un'alta priorit.

  I nastri QIC-3010 sono simili ai QIC-3020 al riguardo.

  <dall'Ftape-HOWTO>





  11.7.  Non ci sono problemi se non sento il nastro muoversi quando
  impartisco un comando fsf  o bsf  con mt ?


  No.  L'unit semplicemente aggiorna un contatore interno quando riceve
  questi comandi.  Il nastro dovrebbe muoversi alla posizione corretta
  con l'accesso in lettura o scrittura all'unit successivo.

  <dall'Ftape-HOWTO>



  11.8.  Perch il mio programma di backup XYZ  si lamenta di errori di
  tipo ``Invalid argument'' [argomento non valido]?


  zftape richiede che i dati vengano scritti come multipli della
  dimensione dei blocchi minima fissata.  Questo  un comportamento
  tipico per una periferica a nastro.  Ci sono tre modi per eliminare
  questi errori:

    impostare la dimensione dei blocchi di Ftape alla dimensione dei
     blocchi utilizzati dal programma di backup.  L'esempio sottostante
      applicabile ad afio:



       mt -f /dev/qft0 setblk 5120





    se non si vuole utilizzare la compressione di Ftape,  anche
     possibili usare:



       mt -f /dev/qft0 setblk 0





  per attivare la modalit di dimensione variabile dei blocchi di Ftape
  ed essere in grado di scrivere i dati sul nastro in porzioni arbi
  trarie (ma la compressione interna non funziona con questa
  impostazione).  Quando si avesse l'intenzione di utilizzare KBackup,
  questo  il solo modo per farlo lavorare assieme ad Ftape (perlomeno
  dovrebbe funzionare, ma non so con esattezza se lo fa).

    informare il proprio programma di backup circa la dimensione di
     default di 10kB dei blocchi di Ftape (che  anche il valore tipico
     per GNU tar).  Per afio  possibile utilizzare il seguente comando:



       afio -b 10k ...




   opportuno leggersi la sezione ``Tape blocks'' del manuale
  (utilizzare l'indice analitico per andare direttamente alla sezione
  relativa).

  Quando si utilizza la compressione interna di GNU tar con versione di
  GNU tar antecedente la tar-1.12,  necessario lanciare tar con
  l'opzione --block-compress impostata su re-block.  In caso contrario
  tar comprimer i dati che legge e li scriver in porzioni arbitrarie
  sul nastro.

  Eesempio:


       tar -czvf /dev/qft0 --block-compress /etc




  Attenzione: non si dovrebbe utilizzare la compressione interna di tar
  con grandi backup, in quanto ci produce un enorme blocco compresso
  del flusso di dati.  Se un tale archivio viene rovinato proprio
  all'inizio,  veramente difficile ripristinarlo.

  <risposta di Claus Heine>



  11.9.  Errori I/O e FDC: alcune spiegazioni.


  Se si ottengono i seguenti messaggi, questo  ci che fa per te!

    fdc-io.c (ft_handle_perpend) - Your FDC does not support QIC-3020
     [l'FDC non supporta il QIC-3020].

    Cannot write to /dev/qft0: I/O error [non posso scrivere su
     /dev/qft0: errore di I/O].

  La spiegazione:

  ``FDC'' significa ``Floppy Disk Controller'' [controllore per dischi
  floppy].  Il problema  che il proprio controller floppy deve essere
  in grado di supportare qualcosa chiamato ``perpendicular mode'' [modo
  perpendicolare], per essere in grado di leggere e scrivere cartucce
  QIC-3020/QIC-3010 (cio cartucce TR-3).  Per quanto ne sappia, tutti
  gli FDC che sono in grado di trasferire dati ad almeno 1Mb/s
  supportano anche il ``perpendicular mode'' (l'aggettivo
  ``perpendicolare'' si riferisce alla direzione della magnetizzazione
  delle particelle ferro magnetiche sul nastro).

  Questo significa che  necessario procurarsi un altro FDC.  Oppure
  dare un'occhiata in qualche negozio per computer e chiedere di una
  scheda di controllo I/O che sia in grado di supportare floppy da
  2.88MB (che implica un velocit di trasferimento di 1Mb/s ed il modo
  perpendicolare).

   possibile anche procurarsi i cosiddetti ``controller ad alta
  velocit'', che supportano anche trasferimenti da 2Mb/s.  Questi
  controller sono basati su un FDC Intel 82078.  Iomega vende tali
  schede sotto il nome di ``Ditto Dash''.  Penso che anche Exabyte venda
  i suoi controller da 2Mb/s separatamente, mentre Seagate fornisce
  l'unit TR-3 (cio TST-3200) con questi controller inclusi.

  <risposta di Claus Heine>






  11.10.  Perch ottengo errori del tipo  /dev/qft0: No such device 
  [/dev/qft0: nessun device come questo]?


  Supponiamo che il problema sia il seguente. Il modulo Ftape  caricato
  correttamente nel kernel:



       /usr/src/ftape-3.03b-970603# lsmod
        Module         Pages    Used by
        ftape             22          0




  ma accade che:


       $ ftmt -f /dev/qft0 status
       ftmt: /dev/qft0: No such device




  La soluzione:  necessario anche caricare il modulo zftape.o.  Con
  Ftape-3.* il modulo ftape.o non implementa l'interfaccia VFS.  Questo
   fatto da zftape.o.

  <risposta di Claus Heine>



  11.11.  Ottengo un ``device busy'' [periferica occupata] quando eseguo
  backup multipli su di un nastro utilizzando alcuni script.


  I messaggi di ``periferica occupata'' possono verificarsi mentre le
  file di periferica di Ftape sono ancora mantenute aperte da alcuni
  programmi.  Non appena la chiamata di sistema close() viene
  completata, il flag di occupato viene azzerato.  Potrebbe darsi che
  bru, o altri programmi, abbiano eseguito un fork di un figlio che
  ritarda a morire?

  S, questo riproduce il problema:


       tar -cvvzf /dev/nqft0 --block-compress ; mt rewind




   possibile omettere --block-compress se si sta utilizzando un
  versione di GNU tar pi recente.

  Comunque questo non  un baco di Ftape.  Sembra che il processo tar
  genitore esca prima che suo figlio abbia chiuso il device del nastro.
  So comunque, per aver studiato il codice di tar alcuni anni fa, che
  tar attende correttamente che il proprio genitore muoia.

  In ogni caso, il messaggio di occupato significa semplicemente che la
  variabile ``busy'' [occupato]  ancora mantenuta ad un valore logico 1
  (zftape/zftape-init.c), e questo significa semplicemente che c'
  ancora un processo in giro che tiene il device del nastro aperto.


  Penso di aver capito il motivo (solo nel caso di tar in quanto di
  questo ho il codice sorgente).

  Se si utilizza tar con la compressione abilitata, allora viene
  eseguito un fork di un figlio che diventer il compressore tramite
  l'esecuzione di gzip o qualcos'altro.  Prima della chiamata a
  execlp(), il figlio eseguir un fork di un nipote di suo padre tar.
  Questo nipote eseguir l'effettvo lavoro di I/O sul nastro.



       tar - fork() - scrive verso il figlio di tar
               |
         figlio di tar - fork() - gzip (eseguir un pipe al nipote di tar)
                           |
                     nipote di tar - apre l'archivio




  Ora, il genitore tar aspetta che suo figlio muoia.  gzip sicuramente
  non aspetta il nipote in quanto gzip  il risultato di un execlp().

  Ci che non so  se il nipote dovrebbe essere implicitamente aspettato
  dal genitore tar o se la funzione wait() aspetta anche i nipoti.

  Comunque questo sembra essere il problema: il genitore tar  uscito
  mentre suo nipote  ancora occupato a chiudere l'archivio.  In
  condizioni normali difficilmente si noter questo problema se la
  funzione close() viene portata a termine velocemente (cio file
  regolari, periferiche a blocchi e magari altri device per nastri?), ma
  non  un baco di Ftape, mentre lo  nei programmi di backup, nel
  kernel o forse nel codice d'uscita delle libc.

  Non so se le considerazione fatte in precedenza si possono essere
  applicate anche a bru.  Se non ci sono nipoti e il processo padre
  attende in maniera corretta suo figlio, allora non ci dovrebbero
  essere problemi.

  <risposta di Claus Heine>



  11.12.  Come faccio a... con tar ?


  Queste sono propriamente domande per tar: si prega di leggersi la
  pagina man e la pagina info realtive.  Se non sono installate sul
  sistema, provare con



       tar  --help 2>&1 | less




  Se la propria versione di tar  la v1.11.1 o precedente, si consideri
  l'opportunit di aggiornarla alla v1.11.8.  Questa versione pu
  chiamare GNU zip direttamente (cio supporta l'opzione -z) e possiede
  un elaborato help incluso.  Inoltre tutto pu essere compilato in
  ambiente Linux.

  <dall'Ftape-HOWTO>


  11.13.  Che dimensione per i blocchi devo utilizzare con tar ?


  Se si fa uso della compressione (ed anche pi in generale), pu
  tornare a proprio favore specificare a tar che deve spezzettare
  l'uscita in blocchi grossi.  Poich Ftape taglia i dati in blocchi da
  29kB, un ``-b58'' dovrebbe essere ottimo.

  Perch 29kB? mi sembra di sentir gridare.  Beh, lo standard QIC-80
  specifica che tutti i dati debbano essere protetti da un Error
  Correcting Code [codice per la correzione d'errore] (ECC).  Il codice
  specificato nello standard QIC-80  conosciuto come codice Reed-
  Solomon (R-S).  Il codice R-S considera 29 byte di dati e genera 3
  byte di parit.  Per aumentare le prestazioni del codice ECC, i byte
  di parit sono generati su 29 settori da 1kB.  Cos Ftape prende 29kB
  di dati, aggiunge 3kB di parit ECC e scrive 32kB sul nastro alla
  volta.  Per questa ragione Ftape scriver e legger sempre blocchi da
  32kB per essere in grado di rilevare (e correggere) eventuali errori.

  Se si possiede una spiccata curiosit e si vuole conoscere di pi, 
  possibile dare un'occhiata ai file ecc.c ed ecc.h per una spiegazione
  del codice e un riferimento a testi sui codici Reed-Solomon.

  <dall'Ftape-HOWTO>



  11.14.  Dove posso trovare i binari, i sorgenti e le pagine man  di
  tar , mt , cpio  e dd ?


  Tutti questo strumenti sono stati sviluppati dal progetto GNU ed i
  sorgenti (cos come le pagine man) possono essere prelevate da
  praticamente ogni sito ftp nel mondo (inclusi ftp.funet.fi,
  tsx-11.mit.edu, e sunsite.unc.edu).  In ogni caso possono essere
  prelevati dal sito ufficiale GNU: prep.ai.mit.edu
  [18.71.0.38]:/pub/gnu.  Le ultime versioni (ad oggi 12 settembre 1996)
  sono:



       cpio:   2.4.2 (cpio-2.4.2.tar.gz)
       dd:     3.13 (fileutils-3.13.tar.gz)
       mt:     2.4.2 (cpio-2.4.2.tar.gz)
       tar:    1.11.8 (tar-1.11.8.tar.gz)
       gzip:   1.2.4 (gzip-1.2.4.tar.gz)




  Tutto quanto pu essere compilato in ambiente Linux successivo alla
  versione v1.0.4, libc v4.5.19 e gcc v2.5.8.

  <dall'Ftape-HOWTO>



  11.15.  Se utilizzo la compressione dell'unit a nastro,  sbagliato
  sfruttare anche la compressione di zftape .  O sarebbe meglio non uti
  lizzare la compressione dell'unit e lasciare che faccia tutto zftape
  ?


  Non  cos sbagliato come utilizzare la compressione due volte (che
  sarebbe il caso in cui si utilizza la compressione dell'unit assieme
  alla compressione di ftape), ma non ha senso.  Non si guadagna un
  maggior compressione, ma solo cicli di CPU sprecati.

  La compressione dell'unit dovrebbe essere abbastanza sicura, in
  quanto l'unit comprime singoli file, a differenza di tar -czf..., che
  fa dell'intero flusso di dati un grande blocco compresso.  Questa,
  infatti,  una pessima idea con backup seri, in quanto un singolo byte
  rovinato all'inizio dell'archivio pu rendere inutilizzabile l'intero
  archivio, o, almeno, ne rende piuttosto difficoltoso un suo recupero.

  <risposta di Claus Heine>



  11.16.  Com' la compressione di zftape  a confronto di quella, dici
  amo, di gzip -9 ?


  gzip -9  migliore (cio si pu ottenere una maggiore compressione).
  La compressione di zftape  paragonabile al programma Un*x compress,
  ma dovrebbe essere pi veloce, e lo  rispetto a gzip.

  <risposta di Claus Heine>



  11.17.  Non utilizzo la compressione, ma sento che l'interfaccia
  zftape  se ne sta andando.  Cosa posso fare?


  Si utilizzi l'interfaccia zftape, senza caricare il modulo zft-
  compressor.  Il device allora diventa /dev/qft0.

  <risposta di Tim Jones>



  11.18.  Ftape dice  This tape has no 'Linux raw format'  [questo
  nastro non  nel ``formato elementare Linux''].


  Si ottiene questa lamentela se non si  cancellato il proprio nastro
  appena formattato.  Questo accade perch Ftape si aspetta un ``magic
  header'' [intestazione magica] sul nastro per sapere di essere in
  grado di interpretare il segmento di intestazione a suo modo (cio con
  i marcatori di file).  Per eliminare il problema, impartire il
  comando:


  mt -f /dev/nftape erase



  <dall'Ftape-HOWTO>



  11.19.  Posso scambiare nastri con qualcuno che utilizza il DOS?


  No.  Il software per DOS  conforme alle specifiche QIC-80 circa la
  disposizione del filesystem di DOS e non dovrebbe essere un grosso
  problema scrivere un programma che possa leggere e scrivere il formato
  DOS.  Infatti, scommetto che creare un'interfaccia utente graziosa
  sarebbe un problema pi grande.


  <dall'Ftape-HOWTO>



  11.20.  Come funziona mt eom  quando si comincia a sovrascrivere un
  nastro dalla met?


  Per inciso, EOM  l'acronimo di ``End Of recorded Media'' [fine del
  supporto di registrazione], la posizione esattamente dopo tutti i dati
  gi registrati sul nastro.

  Non si pu utilizzare i ``file'' del nastro come file di un ordinario
  filesystem.  In linea di principio, un nastro non permette nient'altro
  che aggiungere nuovi dati in coda all'EOM.  Ci nonostante, se ci si
  posiziona proprio nel mezzo dei dati gi registrati e si comincia a
  scrivere, allora l'unit prima cancella tutti i file successivi (cos
  da spostare l'EOM alla posizione effettiva) e poi comincia a scrivere.
  Cos il nuovo EOM, terminato il processo di scrittura, si trova dopo i
  dati appena registrati.  Una delle conseguenze di quanto sopra,  che,
  ovviamente, quella scrittura sul nastro nel mezzo dell'area gi
  registrata  distruttiva, nel senso che non solo sovrascrive il
  ``file'' sopra il quale la testina era posizionata, ma cancella anche
  tutti i file che seguono.

  <dall'Ftape-HOWTO>

  <risposta di Claus Heine>



  11.21.  Quando eseguivo dei backup prima di utilizzare taper , sotto
  ftape 2.0.29 la mia unit non supportava l'fsf, mentre sotto il nuovo
  zftape  lo supporta.  Perch dovrebbe e cos' esattamente l'fsf?


  Probabilmente non funzionava prima perch non si era utilizzato un



       mt -f /dev/rft0 erase




  prima di scrivere i dati sulla cartuccia.  Questo non  pi
  necessario.

  Ma ``mt fsf'', cosa significa?  Le unit a nastro non registrano i
  file in modo che si possa utilizzare un


  cp qualche_file /dev/la_mia_unit



  o in modo da essere capaci di montare un'unit a nastro cos come si
  monta un hard-disk.  Non  possibile fare altro con un'unit a nastro
  se non scrivere dati in maniera sequenziale su di essa.

  Poich queste  abbastanza scomodo, qualcuno ha inventato qualcosa che
   conosciuto con il nome di file mark o eof mark (eof  l'acronimo di
  ``End Of File'' [fine del file]).  Questi marcatori non separano i
  file di cui  stato fatto il backup sull'unit a nastro, ma separano
  solo i blocchi di dati (qualsiasi cosa i dati possano rappresentare).

  Normalmente i driver del kernel dell'unit a nastro si occupano di
  scrivere questi marcatori di file quando il device del nastro viene
  chiuso, cio con



       tar -cf /dev/nqft0 /bin
       tar -cf /dev/nqft0 /etc
       mt -f /dev/nqft0 rewind




  si otterrebbe un backup di tutti i file sotto /bin ed /etc.  Quando il
  primo tar termina, il driver del kernel si occuper della scrittura di
  un marcatore di file sul nastro alla posizione corrente e, quando
  termina il seconfo processo tar, un altro marcatore di file viene
  scritto sulla cartuccia in quella posizione.  Ora, il motivo di questi
  marcatori di file consiste nel fatto che  possibile saltare fra
  archivi differenti presenti sul nastro pi velocemente di come si
  potrebbe fare con un rilettura sequenziale dei dati.

  I comandi che fanno questo sono:

     mt fsf
        cvanzamento veloce al prossimo marcatore di file verso l'EOT
        (End Of Tape [fine del nastro]),


     mt bsf
        avanzamento veloce al prossimo marcatore di file verso il BOT
        (Begin Of Tape [inizio del nastro]).

  Cos, per estrarre il secondo archivio nell'esempio precedente, non 
  necessario rileggere il primo archivio, ma procedere come segue:



       mt -f /dev/nqft0 rewind
       mt -f /dev/nqft0 fsf
       tar -xvf /dev/nqft0




  <risposta di Claus Heine>



  11.22.  Qual' esattamente la differenza fra ftape  e zftape ?


  Quando Ftape era ancora giovane, c'erano due versioni dei driver per
  unit a nastro, una delle quali venne chiamata zftape per via della
  sua compressione interna eseguita al volo e trasparente all'utente.
  Se questa sia una caratteristica positiva od un baco (in quanto non
  strettamente necessario che sia fatta dal codice del kernel) 
  un'altra questione.  Comunque sia, l'interfaccia ioctl e l'uso dei
  marcatori di file forniti da zftape erano notevolmente superiore e con
  meno bachi.  Inoltre zftape permette di utilizzare cartucce a nastro
  per floppy con differenti sistemi operativi.  Beh, non  possibile
  scambiare dati, ma ftape non sovrascriver i volumi creati con il
  proprio programma Windoze e viceversa.

  Oggi giorno Ftape  il nome dell'intero pacchetto di driver per unit
  a nastro via controller floppy, ed ftape.o  il nome del file del
  modulo kernel che implementa il supporto hardware a basso livello.
  zftape ha cessato di esistere come un pacchetto separato, mentre la
  nuova versione di Ftape (da ftape-3.00) contiene un modulo zftape.o
  che si appoggia ad ftape.o (cio diventa necessario caricare entrambi
  i moduli per essere in grado di accedere alla propria unit) e
  implementa l'interfaccia del sistema di file e le caratteristiche
  avanzate della precedente versione di zftape.

  <risposta di Claus Heine>



  11.23.  Qual' la differenza fra una periferica riavvolgente ed una
  non-riavvolgente?


  Beh, i file delle periferiche a nastro riavvolgenti riavvolgono il
  nastro al BOT (Begin Of Tape [inizio del nastro]), cio



       tar -cvf /dev/qft0 /bin




  riavvolger la cartuccia quando il lavoro di tar  terminato.  Invece



       tar -cvf /dev/nqft0 /bin




  non riavvolger la cartuccia e lascier la testina di
  lettura/scrittura nella possizione corrente.

  Periferiche riavvolgenti dovrebbero essere utilizzate quando si
  effettuano backup singoli; periferiche non-riavvolgenti dovrebbero
  essere utilizzate quando si eseguono backup multipli, a meno che non
  ci sia bisogno di tutto lo spazio fino all'EOM (End Of recorded Media
  [fine del supporto di registrazione]) prima di aggiungere un altro
  archivio.

  Le periferiche non-riavvolgenti devono essere utilizzate quando si
  invia un qualsiasi comando di movimento all'unit a nastro, come



       mt -f /dev/nqft0 fsf




  perch, quando il processo mt termina, l'unit a nastro viene chiusa e
  ci comporta un riavvolgimento della cartuccia con le periferiche
  riavvolgenti.

  <risposta di Claus Heine>






  11.24.  C' qualcuno che potrebbe dirmi come utilizzare mt  per
  riavvolgere la mia unit TR-3 dopo aver registrato un archivio con
  zftape , cos da poterlo verificare?


  Beh, dipende.  Se il nastro  ancora posizionato all'interno del
  volume appena scritto, un ``mt bsf 1'' (o equivalentemente ``mt bsf'')
  far ritornare il nastro proprio all'inizio di quel volume (questo 
  il modo in cui tar --verify lavora).  Se il nastro  gi posizionato
  dopo il marcatore di file che indica la fine dell'ultimo volume
  scritto, allora  neccessario impartire un ``mt bsf 2''.

  La logica che sta dietro a tutto ci  la seguente: Il ``contatore
  MTBSF'' viene decrementato di tante unit quanti sono i marcatori di
  file contati, il nastro viene fermato e successivamente posizionato
  sull'EOT dell'ultimo marcatore di file saltato.  Questo significa che
  un mt bsf 2 posizioner il nastro esattamente all'inizio del
  precedente volume.

  <risposta di Claus Heine>



  11.25.  ``Non-riavvolgente'' significa che non si riavvolge automati
  camente, giusto?  Non sta ad indicare che sotto nessuna circostanza
  non si riavvolger, vero?  Ho provato ad utilizzare /dev/zqft0  ed il
  nastro  stato subito riavvolto.


  Corretto: ``auto-riavvolgente'' significa che il nastro viene
  riavvolto quando il file di periferica viene chiusa; ``non-
  riavvolgente'' sta ad indicare che il nastro non  automaticamente
  riavvolto quando la periferica viene chiusa (ma, ovviamente, 
  possibile utilizzare i comandi bsf ed fsf di movimento del nastro per
  posizionare la testina in qualsiasi posizione si desideri).

  <risposta di Claus Heine>



  11.26.  Qual' la differenza fra ci che mt  considera un record e ci
  che considera un file?


  Un record  il quantitativo minimo di byte che verranno accettati dal
  nastro in una singola operazione di lettura/scrittura (tranne che nel
  modo ``variable block size mode [modalit dimensione blocco
  variabile]'', per la quale dovrebbe rappresentare il quantitativo di
  dati effettivamente scritti in una singola operazione di scrittura).

  Per zftape ogni accesso per lettura o scrittura deve essere un
  multiplo di una dimensione di blocco fissa (fissa, ma regolabile con
  MTSETBLK).  La dimensione di blocco  un ``tape record [record del
  nastro]'' (come viene chiamata nella pagina di manuale di GNU mt) ed
  assume un valore di 10kB per zftape.

  Un ``file'' (nella terminologia delle pagine di manuale di mt)  un
  termine ben definito.  Sta ad indicare un'area del nastro fra due
  marcatori di file.  Questo non  un file come lo  quello di un
  filesystem, nel senso che possiede un nome, delle modalit di accesso,
  pu essere spostato o copiato con cp, mv, rm, etc.

  Al contrario,  semplicemente l'area del nastro che  stata registrata
  in una sessione di backup, la sua fine  marcata con un marcatore di
  file del nastro e il suo inizio  delimitato da un BOT o dal marcatore
  del ``file'' precedente.  Questi ``file'' di nastro sono oggetti che
  possono essere saltati con i comandi mt bsf ed mt fsf.

  <risposta di Claus Heine>



  11.27.  Riutilizzare nastri con zftape  senza riformattare il nastro.


  Proviamo a rispondere alle seguenti domande:

    C' un buon metodo per cancellare o rimuovere dati, o almeno volumi
     dal nastro, senza riformattarlo?

     possibile sovrascrivere l'ultimo volume di un nastro senza fare
     un disastro?

     possibile sovrascrivere gli ultimi volumi senza fare danni?

     possibile cancellare l'ultimo volume?

  Se si desidera ``cancellare'' un'intera cartuccia, digitare
  semplicemente:



       mt -f /dev/qft0 erase




  Questo canceller la tavola dei volumi (cio i marcatori di file).

  Con le versioni di ftape o zftape antecedenti la 3.x era possibile
  sovrascrivere volumi gi presenti sulla cartuccia.  Ho rimosso questa
  caratteristica in quanto mi  stato riferito che ha gi causato la
  perdita di dati con alcuni programmi di backup.

  Se, invece, si necessita di rimuovere alcuni volumi dal nastro, allora
  si deve utilizzare il programma



       vtblc




  che viene distribuito con il pacchetto ftape-tools scaricabile dallo
  stesso sito del pacchetto dei driver del kernel di ftape.  Si prega di
  fare riferimento alla documentazione contenuta nel pacchetto ftape-
  tools per maggiori informazioni.

  Se si desidera semplicemente riutilizzare vecchi nastri, allora 
  sufficiente impartire un



       mt rewind




  Se il nastro si trova al BOT (Begin Of Tape [inizio del nastro]),
  allora ogni accesso in scrittura al nastro canceller implicitamente
  tutti i marcatori di file e sovrascriver i dati gi presenti sul
  nastro.

  <risposta di Claus Heine>



  11.28.  Questo script permette di ottenere un semplice indice di un
  pacchetto zftape  utilizzando lo ioctl TIOCVOLINFO .


  Qui di seguito viene riportato un piccolo script in perl/bash che list
  il contenuto di una cartuccia utilizzando lo specifico ioctl
  ``volinfo'' di zftape.  Spero che permetta di capire come trattare
  questo tipo di esigenza.

  Ci che fondamentalmente fa :

  1. riavvolgere la cartuccia;

  2. impartire il comando volinfo



          claus@thales:~$ mt volinfo
          file number          = 1
          block size           = 10240
          physical space used  =  522.0 kilobytes
          real size of volume  =  520.0 kilobytes





  analizzandone il contenuto e posizionando i valori in varibili appro
  priate;

  3. saltare al volume successivo con mt fsf;

  4. uscire se questo produce un errore (EOD), oppure saltare al secondo
     passo.

  Lo script in Perl
























  ______________________________________________________________________
  #!/usr/bin/perl
  #
  #     Copyright (C) 1997 Claus-Justus Heine
  #
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
  # the Free Software Foundation; either version 2, or (at your option)
  # any later version.
  #
  # This program is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # GNU General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with this program; see the file COPYING.  If not, write to
  # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  #
  #   This script implements a simple contents listing for the zftape
  #   package using the MTIOCVOLINFO ioctl.
  #

  $version = <<EOT;
  listtape-1.0 -- a perl script to list the contents of a floppy tape cartridge
  under Linux using the zftape driver

  RCS \$Revision: 1.16 $
  RCS \$Date: 1999/04/05 20:18:16 $
  EOT

  $tapedev = "/dev/tape";
  $usage"= <<EOT;
  Usage: listtape [options ...]

  Mandatory or optional arguments to long options are mandatory or optional
  for short options too.

  -f, --file=FILE       Tape device to use. Default is  "/dev/tape".
  -h, --help            Print this help.
  -?                    Same as '-h'.
  --usage           Same as '-h'.
  -V, --version         Print version information.

  Author: Claus-Justus Heine <claus\@momo.math.rwth-aachen.de>
  EOT

  while ($ARGV[0] =~ /^-/) {
  $_ = shift;
  if (/--file/) {$_ = shift; $tapedev = $_; next;}
  if (/-f/) {$_ = shift; $tapedev = $_; next;}
  if (/--help/) { print $usage; exit 0; }
  if (/-h/) { print $usage; exit 0; }
  if (/--usage/) { print $usage; exit 0; }
  if (/-\?/) { print $usage; exit 0; }
  if (/--version/) { print $version; exit 0; }
  if (/-V/) { print $version; exit 0; }
  die $usage;
  }

  &open_tape($tapedev, "status");
  while(<FTMT>)
  {
  $online = 1 if (/.*online.*/);
  }

  if (! $online) { die "No cartridge present.\n"; }

  &mtop($tapedev, "rewind");

  printf "%11s%12s%20s%20s\n",
  "file number", "block size", "volume size", "tape space";

  while (1)
  {
  &open_tape($tapedev, "volinfo");
  while (<FTMT>) {
  if (/^file number\s*=\s*([0-9]*)$/) { $filenumber = $1; }
  if (/^block size\s*=\s*([0-9]*)$/) { $blocksize = $1; }
  if (/^physical space used\s*=\s*([[0-9]*.*)/) { $rawsize = $1; }
  if (/^real size of volume\s*=\s*([[0-9]*.*)/) { $size = $1; }
  }
  close(FTMT);
  if (&mtop($tapedev, "fsf 1") != 0) {
  &mtop($tapedev,"rewind");
  print "\nRemaining space: $rawsize\n";
  print "Tape block size: $blocksize\n";
  exit 0;
  }
  printf "%6d          %5d  %20s%20s\n",
      $filenumber, $blocksize, $size, $rawsize;
  }

  sub mtop
  {
  local ($tape, $operation) = @_;
  local ($exitval);
  system "ftmt -f $tape $operation > /dev/null 2>&1";
  }

  sub open_tape
  {
  local ($tape, $operation) = @_;
  local ($command);

  $command = "ftmt -f " . $tape . " " . $operation . " |";
  open(FTMT, $command) || die "Couldn't open $command -- $!\n";
  }
  ______________________________________________________________________




  Lo script in Bash


















  ______________________________________________________________________
  #! /bin/bash
  #
  #     Copyright (C) 1997 Claus-Justus Heine
  #
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
  # the Free Software Foundation; either version 2, or (at your option)
  # any later version.
  #
  # This program is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # GNU General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with this program; see the file COPYING.  If not, write to
  # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  #
  #   This script implements a simple contents listing for the zftape
  #   package using the MTIOCVOLINFO ioctl.
  #

  #
  # insert better option parsing here
  #
  TAPEDEV=${1-/dev/tape}

  if ! echo $TAPEDEV | grep "/dev/n"
  then
  TAPEDEV=/dev/n$(basename $TAPEDEV)
  fi

  if ! [ -c $TAPEDEV ]
  then
  echo $TAPEDEV is not a character device!  1>&2
  exit 1
  fi

  if ! mt -f $TAPEDEV rewind
  then
  echo Could not rewind $TAPEDEV - no cartridge present?  1>&2
  exit 1
  fi

  echo -e "\nContents of $TAPEDEV:\n"

  printf "%11s%12s%20s%20s\n" "file number" "block size" "volume size" "tape space"

  trap "rm -f /tmp/$0.$$" exit

  while true
  do
  if ! foo=$(mt -f $TAPEDEV volinfo |cut -f 2 -d =)
  then
  echo $TAPEDEV doesn\'t seem to be a floppy tape device 1>&2
  exit 1
  fi
  #
  # "echo foo | read foo" will not work as the "read foo" is executed in
  # another shell.
  #
  echo $foo > /tmp/$0.$$
  read file blksz used usedunit size sizeunit < /tmp/$0.$$
  if ! mt -f $TAPEDEV fsf 1 > /dev/null 2>&1
  then
  echo -e "\nRemaining space: $used $usedunit"
  echo -e "Tape block size: $blksz"
  if ! mt -f $TAPEDEV rewind
  then
      echo Rewind of $TAPEDEV failed 1>&2
      exit 1
  fi
  exit 0
  fi
  printf "%6d          %5d  %20s%20s\n"\
  $file $blksz "$size $sizeunit" "$used $usedunit"
  done
  ______________________________________________________________________



  <risposta di Claus Heine>



  12.  FAQ: Domande relative alle Unit e nastri



  12.1.  Chi sono i buoni produttori di nastri Travan?


  Ero lo UNIX Product Manager presso l'Archive Corp (prima della
  confusione Conner/Seagate) e realizzavamo test estensivi di supporti a
  nastro per la certificazione di compatibilit, inclusi
  ritensionamento, consistenza ``flaking'' e di lunghezza.  Dai
  risultati dei test, scegliemmo il meglio di questi prodotti
  manufatturieri, certificati su commessa di etichette private, come
  nostro supporto.  Qui di seguito  riportato l'ordine con cui
  selezionammo i rivenditori fino al 1995 (quando persi il contatto con
  il gruppo ATI):


     QIC

        1. 3M (ora conosciuto come Imation)

        2. QMaxell/Sony (in associazione)

        3. (BTW - Iomega utilizza supporti con etichetta privata della
           Sony)

     4MM

        1. Fuji

        2. Maxell/Sony (in associazione -  un trend?)

     8MM

        1. Fuji/Exabyte - che credemmo essere un prodotto OEM della Fuji
           (in associazione - cos tanto per un trend!)

        2. Sony

        3. Maxell

     DLT

        1. Maxell

        2. Sony

  Comunque avevamo altri venditori in lista che risultarono essere, in
  generale, una versione con etichetta privata di una delle etichette
  maggiori di cui sopra.  Le eccezioni furono Verbatim e DIC.  Entrambi
  i supporti di queste aziende ebbero delle discrepanze di tassi e
  lunghezza tali che non potemmo certificarli ed, anzi, avvertimmo i
  rivenditori indicando loro che non potevamo offrire alcun tipo di
  garanzia circa il risultato di un buon backup con l'utilizzo dei
  supporti prodotti da queste aziende.

  Inoltre, da quando vengono all'EST, ho trovato che i supporti Verbatim
  non valgono il prezzo che costano.  Avevamo 11 nastri di tipo R-Extra
  e QIC-Extra (QICXL) che risultarono inutilizzabili dopo poco meno di
  20 passaggi ognuno.

  Anche se questa  la mia opinione personale, essa  basata su nove
  anni di esperienza con problemi reali.  Consiglio vivamente Imation/3M
  per gli utenti QIC/Travan, supporti Fuji per gli utenti 4MM,
  Exabyte/Fuji per 8MM e supporti etichettati DEC per utenti DLT.

  <risposta di Tim Jones>


  12.2.  Dove posso ottenere gli standard QIC?


  Se si ha intenzione di aiutare nello sviluppo di Ftape od aggiungere
  alcune utility (per esempio un programma per la formattazione dei
  nastri), sar necessario procurarsi gli standard QIC appropriati.  Gli
  standard da ottenere sono: QIC-80, QIC-117, QIC-3010 e QIC-3020.
  QIC-117 descrive come i comandi vengano inviati all'unit a nastro
  (incluse le temporizzazioni), tanto che, probabilmente, non ce ne sar
  mai bisogno.  QIC-80/3010/3020 descrivono la parte a livello
  superiore, come lo strato nastro, il codice ECC, il filesystem
  standard.   possibile prelevare gli standard QIC da seguenti
  indirizzi:



       Quarter Inch Cartridge Drive Standards, Inc.
       311 East Carrillo Street
       Santa Barbara, California 93101
       Phone: (805) 963-3853
       Fax:   (805) 962-1541




  Oss.: sono sotto il nome di ``Freeman Associates, Inc'' nell'elenco
  telefonico.

  <dall'Ftape-HOWTO>



  12.3.  L'unit Iomega Ditto 2GB  supportata?


  S, se si sta utilizzando la versione di ftape 3.x o successive dei
  driver di Ftape dall'home-page di Ftape o da
  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes.


  <risposta di Tim Jones>

  Poich il Ditto 2GB  un nastro TR-3 (anche se pu salvare solo 1GB
  invece di 1.6GB come fanno le unit TR-3 regolari),  necessario
  utilizzare un FDC (FDC  l'acronimo di Floppy Disk Controller
  [controllore per disco floppy]) capace di trasferimenti da 1Mb/s.
  Nessun problema, invece, se si possiede una scheda acceleratrice (cio
  il controller Ditto Dash).  Altrimenti provare a comperare un FDC che
  dichiari di essere in grado di pilotare floppy da 2.88MB, in quanto
  questo implica che l'FDC sia in grado di trasferimenti da 1Mb/s.

  Ftape registra l'indice massimo dell'FDC nei file log del kernel in
  questo modo:


  ftape-ctl.c (ftape_init_drive) - Highest FDC supported data rate: 500 Kbps.



  <risposta di Claus Heine>



  12.4.  L'unit Iomega Ditto Max  supportata?


  S, se si sta utilizzando una versione 4.02 o successive come driver
  di Ftape dall'home-page di Ftape o da
  ftp://sunsite.unc.edu/pub/Linux/kernel/tapes.

  <risposta di Claus Heine>



  12.5.  L'unit Iomega Ditto Max Pro  supportata?


  S, ma se si desidera utilizzare le cartucce da 5GB (10GB con la
  compressione) non ce n' bisogno.  Con ftape non sembra ci sia alcuna
  differenza fra il Ditto Max e il Ditto Max Pro.

  <risposta di Claus Heine>



  13.  FAQ: Miscellanea!



  13.1.  Come ci si iscrive alla mailing-list di Ftape?


  Ci si pu iscrivere spedendo un messaggio di posta elettronica
  all'indirizzo



       majordomo@vger.rutgers.edu




  con l'unica linea nel corpo del messaggio



       subscribe linux-tape

  Si prega di salvare la risposta ottenuta da majordomo in un posto
  sicuro in quanto contiene istruzioni su come uscire dalla mailing-
  list.

  <risposta di Claus Heine>



  13.2.  Come uscire dalla mailing-list di Ftape?


  Spedire un messaggio di posta elettronica a



       majordomo@vger.rutgers.edu




  con l'unica linea nel corpo del messaggio



       unsubscribe linux-tape MIO@INDIRIZZO.E-MAIL




  dove MIO@INDIRIZZO.E-MAIL deve essere sostituito con l'indirizzo di
  posta elettronica utilizzato al momento della sottoiscrizione alla
  lista.  Notare che si deve aver ricevuto una e-mail con le istruzioni
  su come uscire dalla mailing-list nel momento in cui ci si  iscritti.

  <risposta di Claus Heine>



  13.3.  Link ad informazioni correlate.


  <http://www.uwsg.indiana.edu/usai/library/backups.html>

  Si stanno cercando altri link!!!







  14.  Eseguire il debug del driver di ftape




  14.1.  Il kernel/ ftape  si pianta quando faccio...  Questo  un baco?


  No, questa  una sua caratteristica :-)

  Seriamente, il buon software non si pianta.  Soprattutto il kernel non
  o non dovrebbe piantarsi.  Se il kernel si pianta quando si sta
  eseguendo ftape ed  possibile dimostrare che  proprio ftape a
  confondere le cose, riferirsi ad esso come ad un Bug That Should Be
  Fixed [baco da correggere.  Spedire una mail al manutentore
  (<heine@math1.rwth-aachen.de>) ed alla maling-list di Ftape.



  14.2.  Va bene,  un baco... cio, una caratteristica.  Come faccio a
  spedire un rapporto?


  Primo.  Assicurasi di essere in grado di riprodurre il problema.
  Errori spuri sono un spina nel sedere, in quanto sono praticamente
  impossibili da correggere :-/ La seguente  un breve lista di
  controllo:


    versione di kernel e patch applicati;

    versione di ftape;

    modello e produttore dell'unit a nastro;

    tipo di bus di espansione (EISA, ISA, PCI, o VL-bus);

    il modo in cui si  esposto il problema;

    cosa  andato storto sul proprio sistema;

    non cancellare il kernel ed il file ftape.o.  Potrei aver bisogno
     di provare alcune patch o un test differente sul sistema.

  Aumentare il trace-level a 4 o 5 ed eseguire ancora il comando che ha
  dato problemi (non farlo se si ha paura di perdere dati o di
  danneggiare il proprio hardware; non c' assolutamente alcuna garanzia
  n per i dati persi n per i danni all'hardware causati da ftape.
  Ricordarselo!).  Aumentando il trace-level oltre il 5, probabilmente
  non ha alcun senso, in quanto ci si ripercuote sulle temporizzazioni
  del driver in un modo tale da non farlo pi lavorare bene.  Estrarre i
  dati di debug dal file di log del kernel o da /proc/kmsg, a seconda di
  dove vengono raccolti.  Provare a dare un'occhiata a cosa ftape sputa
  fuori.  Il tutto dovrebbe risultare alquanto incomprensibile di primo
  acchito, ma  possibile estrarre informazioni utili dal file di log.
  Molti messaggi hanno un nome di funzione preposto per facilitare la
  localizzazione del problema.  Dare un'occhiata al codice sorgente e
  non solo gridare Al lupo!, senza averci provato.  Se la propria
  versione di kernel (o di ftape, per ci che importa)  ``vecchia'',
  quando confrontata con uno degli ultimi kernel, provare a prelevare un
  kernel pi recente (o anche l'ultima) e vedere se il problema sparisce
  sotto il nuovo kernel.  Quando si posta il proprio rapporto, includere
  le informazioni riguardanti la versioni di ftape, la versione del
  kernel, il tipo di bus di espansione (ISA, VL-bus, PCI o EISA),
  velocit del bus, controller floppy e tipo di unit a nastro.
  Riportare esattamente cosa si  fatto, cosa  accaduto al proprio
  sistema.  Alcune persone hanno potuto provare come ftape non giri su
  sistemi con bus PCI, mentre girava senza problemi su normali macchine
  con bus ISA basate su processore 386DX (vedere la sezione ``Schede
  madri PCI ftape'' su macchine PCI sopra),

  Inoltre si prega di pensare anche a quei poveri diavoli che
  effettivamente pagano per il loro accesso ad Internet (come me):
  evitare di postare un (enorme) file di log di ftape senza una ragione.
  Invece si potrebbe descrivere il problema e offrirsi di spedire il log
  alle parti interessate.

  Inviare il proprio bug a <linux-tape@vger.rutgers.edu>.  Se si vuole,
  si pu spedire una mail con il bug anche a <heine@math1.rwth-
  aachen.de>.

  15.  Contributi


  La seguente  una lista di persone distinte che hanno contribuito al
  documento HOWTO di ftape.  La lista  stata aggiunta recentemente da
  qualcuno che si  aggiunto a met cammino.  Le mie scuse pi sentite
  se ho innavvertitamente dimenticato qualcuno di importante nella
  lista.   possibile visionare un altro tentativo di raccolata di
  questo tipo di informazione nella ``Hall of Fame'' di Ftape.

  Johan De Wit <jo@correct.nl>: il manutentore delle FAQ di Ftape;

  Kevin Johnson <kjj@pobox.com>: il manutentore precedente dell'Ftape-
  HOWTO;

  Kai Harrekilde-Petersen <khp@dolphinics.no>: il manutentore precedente
  di ftape e dell'HOWTO;

  Andrew Martin <martin@biochemistry.ucl.ac.uk>: molte aggiunte
  all'HOWTO;

  Bas Laarhoven <bas@vimec.nl>: l'autore originale di ftape.












































  The Linux GCC HOWTO
  Daniel Barlow (dan@detached.demon.co.uk)
  v1.17, 28 Febbraio 1996

  Questo documento tratta la configurazione del compilatore C GNU e
  delle librerie di sviluppo sotto Linux, e fornisce una panoramica
  sulla compilazione, il link, l'esecuzione e la correzione (debug) dei
  programmi. La maggior parte del materiale contenuto nel documento 
  stato preso dal GCC-FAQ di Mitch D'Souza, che sostituisce, o dall'ELF-
  HOWTO (per la traduzione in italiano vedi [1]). Quella che state
  leggendo  la prima versione rilasciata pubblicamente (nonostante il
  numero). Ogni feedback  benvenuto.  Revisione e manutenzione della
  traduzione italiana: Andrea Girotto (andrea.girotto@usa.net)

  1.  Preliminari

  1.1.  Confronto tra ELF e a.out

  Lo sviluppo di Linux si trova attualmente in uno stato di continua
  evoluzione. Brevemente, esistono due formati di file binari che Linux
   in grado di eseguire, ed a seconda di come  stato costruito, un
  sistema potrebbe usare uno o l'altro dei due. Leggendo questo HOWTO si
  scoprir quale.



  Per riconoscere il tipo di un binario  possibile utilizzare l'utility
  file (ad esempio: file /bin/bash). Per un programma ELF, dar una
  risposta contenente ELF; per un programma a.out la risposta sar
  qualcosa del tipo Linux/i386.

  Le differenze tra ELF e a.out sono descritte ampiamente in questo
  documento. ELF  il formato pi recente, generalmente ritenuto il
  migliore.


  1.2.  Questioni amministrative

  Informazioni riguardo al copyright si trovano alla fine di questo
  documento, insieme a dovute avvertenze relative a certe stupide
  domande poste su Usenet, che, segnalando problemi inesistenti,
  rivelano un'ignoranza del linguaggio C.


  1.3.  Tipografia

  La versione in formato Postscipt, dvi, o html, di questo documento ha
  una maggiore variet tipografica rispetto a quella in solo testo. In
  particolare, i nomi di file, i comandi, l'output dei comandi e gli
  stralci di codice sorgente sono impostati con un carattere tipo
  macchina da scrivere, come pure sono state messe in evidenza le
  "variabili" ed altre parti che dovevano essere enfatizzate.

  Inoltre,  presente un utile indice. In dvi o postscript, la
  numerazione dell'indice corrisponde a quella dei paragrafi. In HTML si
  tratta di numeri assegnati sequenzialmente che rimandano ad altre
  parti del testo. Nella versione a solo testo, si tratta solo di
  numeri.  Si consiglia una versione avanzata piuttosto che quella in
  modalit testo.

  Negli esempi viene utilizzata la sintassi dell'interprete dei comandi
  (shell) Bourne (al posto di quella C). Gli utenti di C-shell potranno
  utilizzare il comando:



  % setenv FOO bar




  al posto di:



       $ FOO=bar; export FOO




  Se il prompt mostrato  # invece di $, il comando indicato
  probabilmente funzioner solo se digitato come root. Naturalmente, non
  si assumere alcuna responsabilit per qualsiasi cosa accada al sistema
  nell'utilizzo di questi esempi.


  2.  Dove ottenere quello che serve.

  2.1.  Questo documento.

  Questo documento fa parte della serie dei Linux HOWTO, pertanto si pu
  ottenere da tutti gli archivi di Linux HOWTO, come
  http://sunsite.unc.edu/pub/linux/docs/HOWTO/ (le traduzioni italiane
  sono disponibili presso [2]). La versione HTML in inglese pu anche
  essere trovata (probabilmente leggermente pi aggiornata) su
  http://ftp.linux.org.uk/~barlow/howto/gcc-howto.html (traduzione
  italiana [3]).


  2.2.  Ulteriore documentazione.

  La documentazione ufficiale di gcc si trova nella distribuzione
  sorgente (si veda sotto) sotto forma di file texinfo, e come file
  .info. Se si dispone di una connessione di rete veloce, un cd-rom o
  una buona dose di pazienza,  possibile eseguirne l'untar e copiare le
  parti rilevanti in /usr/info. In caso contrario, possono essere
  trovati presso ftp://tsx-11.mit.edu:/pub/linux/packages/GCC/, ma non
  necessariamente si tratter della versione pi recente.



  Esistono due sorgenti di documentazione per libc. La GNU libc contiene
  dei file info che descrivono piuttosto accuratamente la libc Linux,
  fatta eccezione per stdio. Inoltre, le pagine di manuale dell'archivio
  ftp://sunsite.unc.edu/pub/Linux/docs/ sono state scritte per Linux e
  descrivono numerose chiamate di sistema (sezione 2) e funzioni libc
  (sezione 3).


  2.3.  GCC

  La distribuzione ufficiale del GCC Linux pu sempre essere trovata in
  formato binario (gi compilato) all'indirizzo
  ftp://tsx-11.mit.edu:/pub/linux/packages/GCC/. Nel momento in cui
  viene scritto questo documento, la versione pi recente  la 2.7.2
  (gcc-2.7.2.bin.tar.gz).

   possibile ottenere la distribuzione sorgente pi recente di GCC
  fornita dalla Free Software Foundation dagli archivi
  ftp://prep.ai.mit.edu/pub/gnu/. I gestori del GCC Linux hanno reso
  molto semplice la compilazione dell'ultima versione - il programma di
  configurazione (configure) dovrebbe impostare tutto da solo. Si
  verifichi anche l'eventuale presenza di patch da applicare presso:
  ftp://tsx-11.mit.edu:/pub/linux/packages/GCC/.

  Per compilare qualcosa di non banale (ma anche alcune cose banali)
  sar necessario possedere anche quanto descritto nel paragrafo che
  segue.


  2.4.  Libreria C e header file

  Quello che si desidera a questo punto dipende da due fattori:


  1. se il proprio sistema  ELF oppure a.out

  2. quale dei due si desidera avere.

  Se si sta passando da libc 4 a libc 5, si raccomanda di leggere l'ELF-
  HOWTO, rintracciabile pi o meno nello stesso luogo in cui  stato
  trovato questo documento (traduzione italiana [1]).

  Da ftp://tsx-11.mit.edu:/pub/linux/packages/GCC/ sono disponibili:


     libc-5.2.18.bin.tar.gz
        Immagini di librerie condivise ELF, librerie statiche e file
        include per le librerie C e matematiche.


     libc-5.2.18.tar.gz
        Sorgenti per quanto descritto sopra. Sar necessario anche il
        pacchetto .bin. per gli header file. Se si  indecisi tra
        compilarsi in proprio la libreria C o utilizzare il formato
        binario, la scelta migliore consiste nell'usare il codice gi
        compilato. Nel caso in cui si desideri il supporto NIS o per le
        shadow password di dovr comunque gestirli in prima persona.


     libc-4.7.5.bin.tar.gz
        Immagini di libreria condivisa a.out e librerie statiche per la
        versione 4.7.5 della libreria C e simili.  Questo  stato
        studiato per coesistere con il pacchetto libc 5 sopra
        menzionato, ma  necessario solo se si desidera continuare a
        utilizzare o sviluppare programmi in formato a.out.


  2.5.



  Strumenti associati (as, ld, ar, strings, ecc.)

  Si possono trovare su ftp://tsx-11.mit.edu:/pub/linux/packages/GCC/,
  come ogni altra cosa sinora descritta. La versione corrente 
  binutils-2.6.0.2.bin.tar.gz.

  Le binutils sono disponibili unicamente in ELF, la versione corrente
  di libc si trova in ELF ed inoltre  meglio utilizzare la versione
  a.out di libc in congiunzione con una ELF. Lo sviluppo della libreria
  C si sta muovendo verso ELF: se non c' un particolare motivo per
  l'utilizzo di a.out, si consiglia di fare altrettanto.





  3.  Installazione e impostazione di GCC

  3.1.


  Versioni GCC

   possibile scoprire quale versione GCC si sta eseguendo digitando gcc
  -v alla richiesta dell'interprete comandi. Si tratta di un metodo
  piuttosto affidabile anche per scoprire se la propria impostazione 
  ELF o a.out. Il risultato potrebbe essere:



       $ gcc -v
       Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.7.2/specs
       gcc version 2.7.2




  Le cose da notare sono:


     i486
        Indica che il gcc  stato compilato per un processore 486 -
        altre possibilit sono 386 o 586. Tutti i processori possono
        eseguire il codice compilato per ciascuna delle altre versioni;
        la differenza consiste nell'ottimizzazione che non ha effetti
        sulle prestazioni in un 386, ma rende il codice eseguibile
        leggermente pi grande.


     box
        Non  affatto importante, potrebbe esserci qualcosa di diverso
        (come slackware o debian) o anche nulla (in tal caso, il nome di
        directory completa sar i486-linux). Se si esegue personalmente
        la compilazione di gcc,  possibile impostare questa
        caratteristica al momento della compilazione, a fini puramente
        estetici.


     linux
        In alternativa, potrebbe essere linuxelf o linuxaout, il
        significato varia a seconda della versione utilizzata, fatto che
        potrebbe confondere le idee.


        linux
           significa ELF se la versione  la 2.7.0 o seguente,
           altrimenti significa a.out.


        linuxaout
           significa a.out.  stato introdotto quando la definizione di
           linux  stata modificata da a.out in ELF, in modo che non sia
           possibile vedere un gcc linuxaout pi vecchio della versione
           2.7.0.


        linuxelf
            obsoleto. Si tratta generalmente di una versione di gcc
           2.6.3 impostata per produrre eseguibili ELF. Si noti che il
           gcc 2.6.3 contiene degli errori nella produzione di codice
           per ELF - si consiglia un aggiornamento.

     2.7.2
        numero della versione.

  In conclusione, si tratta di gcc 2.7.2 che produce del codice ELF.


  3.2.  Dov' finito?

  Se gcc  stato installato senza prestare attenzione, oppure se  stato
  ottenuto come parte di una distribuzione, potrebbe essere necessario
  scoprire dove si trova all'interno del filesystem. Le parti chiave
  sono:


    /usr/lib/gcc-lib/destinazione/versione/ (e sottodirectory) posto in
     cui si trova la maggior parte del compilatore, i programmi
     eseguibili che effettuano la compilazione, alcune librerie e file
     include specifici per la versione che si sta utilizzando.

    /usr/bin/gcc driver del compilatore - la parte che si esegue dalla
     riga di comando. Pu essere utilizzato con diverse versioni di gcc,
     a patto che siano state installate pi directory di compilatore
     (come descritto sopra). Per scoprire la versione predefinita,
     digitare gcc -v. Per forzare un'altra versione, digitare gcc -V
     versione. Ad esempio:



       # gcc -v
       Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.7.2/specs
       gcc version 2.7.2
       # gcc -V 2.6.3 -v
       Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.6.3/specs
       gcc driver version 2.7.2 executing gcc version 2.6.3





    /usr/destinazione/(bin|lib|include)/. Se sono stati installati pi
     destinazioni (target) (ad esempio, a.out ed elf, o un cross
     compilatore di qualche tipo), le librerie, le binutils (come as, ld
     o altri) e gli header file per destinazioni non native possono
     essere trovati in questa posizione. Se  stato installato un solo
     tipo di gcc, diverse parti di esso sono poste o in questa directory
     o, alternativamente, in /usr/(bin|lib|include).

    /lib/, /usr/lib e altre sono directory di libreria per il sistema
     nativo. Sar anche necessaria la directory /lib/cpp per molte
     applicazioni (ad esempio X ne fa un grande utilizzo) -  possibile
     copiarla da /usr/lib/gcc-lib/destinazione/versione/ o creare un
     collegamento (link) simbolico.



  3.3.  Dove si trovano gli header file?

  Indipendentemente dalla posizione in cui sono stati installati i
  propri, sotto /usr/local/include, esistono tre sorgenti principali
  degli header file in Linux:


    la maggior parte di /usr/include/ e relative subdirectory sono
     sostituiti con il pacchetto binario di libc da H. J. Lu.  In tali
     posizioni si potrebbero anche trovare file da altri sorgenti
     (librerie curses e dbm, ad esempio) specialmente se si sta
     utilizzando la distribuzione libc pi recente (che non contiene
     curses o dbm, come invece accadeva nelle pi vecchie).




    /usr/include/linux e /usr/include/asm (per i file <linux/*.h> e
     <asm/*.h>) dovrebbero essere link simbolici alle directory
     linux/include/linux e linux/include/asm nella distribuzione
     sorgente del kernel.  necessario installarli se si pensa di
     eseguire lo sviluppo di un qualsiasi programma non banale; non
     servono solo per la compilazione del kernel.

     Potrebbe essere anche necessario eseguire il make config nelle
     directory del kernel dopo aver scaricato i sorgenti. Molti file
     dipendono da <linux/autoconf.h> che potrebbe non esistere, e in
     alcune versioni di kernel, asm  un link simbolico che viene creato
     al momento del make config.  Pertanto, se si scaricano i sorgenti
     del kernel sotto /usr/src/linux:



       $ cd /usr/src/linux
       $ su
       # make config
       [rispondere alle domande. A meno che non si abbia intenzione di
        proseguire con la compilazione del kernel, la risposta non ha
        molta importanza]
       # cd /usr/include
       # ln -s ../src/linux/include/linux .
       # ln -s ../src/linux/include/asm .










    File come <float.h>, <limits.h>, <varargs.h>, <stdarg.h> e
     <stddef.h> variano a seconda della versione del compilatore,
     pertanto si trovano in /usr/lib/gcc-lib/i486-box-
     linux/2.7.2/include/ e posizioni simili.


  3.4.  Compilazione di cross compilatori

  3.4.1.  Linux come piattaforma di destinazione

  Supponendo di aver ottenuto il codice sorgente per gcc, solitamente 
  sufficiente seguire le istruzioni contenute nel file INSTALL di GCC.
  Un comando configure -target=i486-linux -host=XXX sulla piattaforma
  XXX seguito da un make dovrebbe funzionare. Si noti che saranno
  necessari gli include di Linux, gli include del kernel e sar
  necessario eseguire anche la compilazione del cross assembler e del
  cross linker dai sorgenti in
  ftp://tsx-11.mit.edu/pub/linux/packages/GCC/.


  3.4.1.1.  Linux come piattaforma sorgente, MSDOS come destinazione

  Apparentemente dovrebbe essere possibile utilizzando il pacchetto
  "emx" o l'extender "go". Si invita a dare un'occhiata a
  ftp://sunsite.unc.edu/pub/Linux/devel/msdos.
  L'autore, non ha ancora verificato le funzionalit e pertanto non pu
  dare alcuna garanzia in merito.


  4.  Il porting e la compilazione

  4.1.  Simboli definiti automaticamente

   possibile elencare i simboli definiti automaticamente dalla propria
  versione di gcc eseguendolo con l'opzione -v. Ad esempio:



       $ echo 'main(){printf("hello world\n");}' | gcc -E -v -
       Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.7.2/specs
       gcc version 2.7.2
       /usr/lib/gcc-lib/i486-box-linux/2.7.2/cpp -lang-c -v -undef
       -D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ELF__ -Dunix -Di386 -Dlinux
       -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386
       -D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386)
       -Amachine(i386) -D__i486__ -




  Se si sta scrivendo del codice che utilizza delle caratteristiche
  specifiche per Linux,  una buona idea includere le parti non
  portabili in



       #ifdef __linux__
       /* ... altro codice ... */
       #endif /* linux */




  Si utilizzi __linux__ per questo scopo, non semplicemente linux.
  Sebbene anche il secondo sia definito, non  conforme a POSIX.


  4.2.  Chiamata del compilatore

  La documentazione per le opzioni del compilatore  rappresentata dalla
  info page di gcc (in Emacs, si utilizzi C-h i quindi si selezioni la
  voce 'gcc'). Il proprio distributore potrebbe non aver incluso questa
  parte nel sistema, o la versione che si possiede potrebbe essere
  vecchia; la cosa migliore da fare in questo caso consiste nello
  scaricare l'archivio sorgente gcc da ftp://prep.ai.mit.edu/pub/gnu o
  da uno dei suoi siti mirror.

  La pagina di manuale gcc (gcc.1) di solito  obsoleta. Tentando di
  leggerla si trover questo avvertimento.


  4.2.1.

  Opzioni del compilatore

  L'output di gcc pu essere ottimizzato aggiungendo -On alla sua riga
  di comando, dove n rappresenta un intero opzionale. I valori
  significativi di n, ed il loro esatto effetto, variano a seconda della
  versione; tipicamente vanno da 0 (nessuna ottimizzazione) a 2 (molte
  ottimizzazioni) a 3 (moltissime ottimizzazioni).

  Internamente, gcc le traduce in una serie di opzioni -f e -m. 
  possibile vedere esattamente quale livello -O si lega a ogni opzione
  eseguendo gcc -v -Q (Q  un'opzione non documentata).  Ad esempio, -O2
  sul sistema dell'autore produce questo risultato:



       enabled:        -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks
                   -fexpensive-optimizations
                   -fthread-jumps -fpeephole -fforce-mem -ffunction-cse -finline
                   -fcaller-saves -fpcc-struct-return -frerun-cse-after-loop
                   -fcommon -fgnu-linker -m80387 -mhard-float -mno-soft-float
                   -mno-386 -m486 -mieee-fp -mfp-ret-in-387




  L'utilizzo di un livello di ottimizzazione maggiore di quanto previsto
  per il proprio compilatore (ad esempio, -O6) avr lo stesso risultato
  che utilizzare il livello pi alto che  in grado di supportare.
  Tuttavia, la distribuzione di codice impostato per la compilazione in
  questo modo non  una buona idea - se in versioni future saranno
  incorporate ulteriori ottimizzazioni, potrebbe accadere che
  interrompano il proprio codice.


  Gli utenti di gcc dalla versione 2.7.0 fino alla 2.7.2 dovrebbero
  notare che esiste un errore in -O2. In particolare, '-fstrenght-
  reduction' non funziona.  disponibile una patch per risolvere questo
  problema, che necessita della ricompilazione del gcc, altrimenti 
  sufficiente assicurarsi di usare sempre l'opzione -fno-strength-
  reduce.


  4.2.1.1.  Opzioni specifiche per il processore

  Esistono altre opzioni -m che non sono attivate da nessun -O, e si
  dimostrano utili in molti casi. Le principali sono -m386 e -m486, che
  indicano a gcc di favorire rispettivamente 386 o 486. Il codice
  compilato con una di queste due opzioni funzioner anche su macchine
  dell'altro tipo; il codice 486  pi voluminoso, ma non  pi lento se
  eseguito su 386.

  Attualmente non esiste un'opzione -mpentium o -m586.  Linus suggerisce
  di utilizzare -m486 -malign-loops=2 -malign-jumps=2 -malign-
  functions=2, per ottenere l'ottimizzazione del codice 486 ma senza i
  salti necessari per l'allineamento (di cui il pentium non ha bisogno).
  Michael Meissner (di Cygnus) dice:


       La mia impressione  che -mno-strength-reduce produca anche
       un codice pi veloce sull'x86 (si noti che non mi sto rifer
       endo all'errore relativo all'opzione '-fstrength-reduction':
       altra questione). Ci  dovuto alla carenza di registri
       dell'x86 (ed il metodo di GCC di raggruppare i registri in
       registri sparsi piuttosto che in altri registri non aiuta
       molto). 'strenght-reduce' ha come effetto l'utilizzo di reg
       istri addizionali per sostituire moltiplicazioni con
       addizioni.  Sospetto anche che -fcaller-saves possa causare
       una perdita di prestazioni.



       Un'altra considerazione consiste nel fatto che -fomit-frame-
       pointer possa o meno rappresentare un vantaggio. Da un lato,
       rende disponibile un altro registro per l'uso; tuttavia, il
  modo in cui x86 codifica il suo set di istruzioni comporta
  che gli indirizzi relativi di stack occupino pi spazio
  rispetto agli indirizzi relativi di frame; di conseguenza,
  sar disponibile ai programmi una quantit (leggermente)
  inferiore di Icache.  Inoltre, -fomit-frame-pointer implica
  il continuo aggiustamento del puntatore allo stack da parte
  del compilatore, dopo ogni chiamata, quando, con un frame,
  pu lasciare che lo stack esegua un accumulo per alcune
  chiamate.


  L'ultima parola su questo argomento viene ancora da Linus:


       Se si desidera ottenere prestazioni ottimali, non credete
       alle mie parole, effettuate delle prove. Esistono molte
       opzioni nel compilatore gcc, e pu darsi che un insieme par
       ticolare dia l'ottimizzazione migliore per la propria
       impostazione.



  4.2.2.  Internal compiler error: cc1 got fatal signal 11

  (Ovvero: "Errore interno del compilatore: cc1 ha ricevuto il segnale
  fatale 11").

  Il segnale 11  SIGSEGV, o 'segmentation violation'.  Solitamente
  significa che il programma ha confuso i puntatori e ha tentato di
  scrivere su una porzione di memoria che non possedeva. Potrebbe
  trattarsi di un errore di gcc.

  Tuttavia, gcc  ben verificato ed affidabile, nella maggior parte dei
  casi. Utilizza anche un gran numero di strutture dati complesse, e una
  grande quantit di puntatori. In breve,  il miglior tester di RAM tra
  quelli disponibili comunemente. Se non  possibile replicare l'errore
  - il sistema non si ferma nello stesso punto quando si riavvia la
  compilazione - molto probabilmente si tratta di un problema legato
  all'hardware (CPU, memoria, scheda madre o cache). Non lo si deve
  considerare un errore del compilatore solo perch il proprio computer
  supera i controlli di avvio del sistema o  in grado di eseguire
  Windows o qualunque altro programma; questi 'test' sono comunemente
  ritenuti, a ragione, di nessun valore.  Comunque  sbagliato ritenere
  che si tratti di un errore, perch una compilazione del kernel si
  blocca sempre durante `make zImage' -  logico che ci accada: `make
  zImage' probabilmente compila pi di 200 file. In genere si ricerca un
  bug in un insieme pi piccolo di cos.

  Se  possibile duplicare l'errore, e (ancora meglio) produrre un breve
  programma che lo dimostra,  possibile inviarlo come report di errori
  all'FSF, o alla mailing list di linux-gcc. Si faccia riferimento alla
  documentazione di gcc per i dettagli relativi alle informazioni
  effettivamente necessarie.


  4.3.  Portabilit

   stato detto che, in questi giorni, se non pu essere portato a
  Linux, allora  qualcosa che non vale la pena di possedere. :-)

  In generale, sono necessarie solo piccole modifiche per ottenere la
  conformit POSIX al 100% di Linux.  Sarebbe anche molto utile
  restituire agli autori ogni modifica al codice in modo che, in futuro,
  si possa ottenere un eseguibile funzionante tramite il solo comando
  'make'.

  4.3.1.  BSD (inclusi bsd_ioctl, demone e <sgtty.h>)

   possibile compilare il proprio programma con -I/usr/include/bsd ed
  eseguire il link con -lbsd (ossia, aggiungere -I/usr/include/bsd a
  CFLAGS e -lbsd alla riga LDFLAGS nel proprio Makefile). Non  pi
  necessario aggiungere -D__USE_BSD_SIGNAL se si desidera un
  comportamento dei segnali di tipo BSD, dal momento che questa
  caratteristica viene ottenuta automaticamente quando si ha
  -I/usr/include/bsd e l'include <signal.h>.


  4.3.2.  SIGIOT , SIGTRAP , SIGSYS  ecc) Segnali 'mancanti' ( SIGBUS ,
  SIGEMT ,

  Linux  conforme a POSIX. Quelli elencati nel seguito sono segnali non
  definiti in POSIX - ISO/IEC 9945-1:1990 (IEEE Std 1003.1-1990),
  paragrafo B.3.3.1.1:


       "I segnali SIGBUS, SIGEMT, SIGIOT, SIGTRAP, e SIGSYS sono
       stati omessi da POSIX.1 perch il loro comportamento dipende
       dall'implementazione e non  stato possibile classificarlo
       adeguatamente. Implementazioni conformi potranno contenere
       questi segnali, ma devono documentare le circostanze in cui
       sono rilasciati ed elencare ogni restrizione riguardante il
       loro rilascio."


  Il modo pi economico e scadente di gestire la cosa consiste nel
  ridefinire questi segnali in SIGUNUSED. Il modo corretto consiste
  nell'inserire il codice che li gestisce in appropriati #ifdef



       #ifdef SIGSYS
       /* ... codice SIGSYS non-posix .... */
       #endif





  4.3.3.  Codice K & R

  GCC  un compilatore ANSI; una grande quantit di codice esistente non
   ANSI. Non c' molto da fare per risolvere questo problema, oltre
  all'aggiungere -traditional alle opzioni del compilatore. Si invita a
  consultare l'info page di gcc.

  Si noti che -traditional ha altri effetti oltre a cambiare il
  linguaggio accettato da gcc. Ad esempio, attiva -fwritable-strings,
  che sposta le stringhe costanti nello spazio dati (dallo spazio di
  codice, dove non possono essere scritte).  Questo aumenta
  l'occupazione di memoria del programma.


  4.3.4.  Conflitto dei simboli di preprocessore con prototipi nel
  codice

  Uno dei problemi pi frequenti consiste nel fatto che alcune funzioni
  comuni sono definite come macro negli header file di Linux e il
  preprocessore si rifiuter di eseguire il parsing di definizioni
  prototipo simili. I pi comuni sono atoi() e atol().



  4.3.5.  sprintf()

  Soprattutto quando si esegue il porting da SunOS,  necessario essere
  consapevoli del fatto che sprintf(string, fmt, ...) restituisce un
  puntatore a stringhe, mentre Linux (seguendo ANSI) restituisce il
  numero di caratteri che sono stati messi nella stringa.


  4.3.6.  fcntl  e affini. Quali sono le definizioni di FD_* ?

  Le definizioni si trovano in <sys/time.h>. Se si sta utilizzando
  fcntl, probabilmente si vorr includere anche <unistd.h>.

  In genere, la pagina di manuale di una funzione elenca gli #include
  necessarie nella sua sezione SYNOPSIS.


  4.3.7.  Il timeout di select() .  Programmi in busy-waiting

  Una volta, il parametro timeout di select() era utilizzato a sola
  lettura. Gi allora, le pagine di manuale avvertivano:


       select() dovrebbe probabilmente restituire il tempo rima
       nente dal timeout originale, se esistente, modificando il
       valore del tempo. Questo potr essere implementato in ver
       sioni future del sistema. Pertanto, sarebbe sbagliato
       ritenere che il puntatore al timeout non sar modificato
       dalla chiamata select().


  Ora il futuro  arrivato. Di ritorno da una select(), l'argomento di
  timeout sar impostato al tempo rimanente che si sarebbe atteso se i
  dati non fossero arrivati. Se non  arrivato alcun dato, il valore
  sar zero, e le chiamate future utilizzando la stessa struttura
  timeout eseguiranno immediatamente il return.

  Per rimediare, in caso di errore, si metta il valore di timeout nella
  struttura ogni volta che si chiama select(). Si modifichi il codice
  come:


  ______________________________________________________________________
  struct timeval timeout;
  timeout.tv_sec = 1; timeout.tv_usec = 0;
  while (some_condition)
          select(n,readfds,writefds,exceptfds,&timeout);
  ______________________________________________________________________



  in


  ______________________________________________________________________
  struct timeval timeout;
  while (some_condition) {
          timeout.tv_sec = 1; timeout.tv_usec = 0;
          select(n,readfds,writefds,exceptfds,&timeout);
  }
  ______________________________________________________________________



  Alcune versioni di Mosaic evidenziavano questo problema. La velocit
  dell'animazione del globo rotante era inversamente correlata alla
  velocit con cui i dati giungevano dalla rete!


  4.3.8.  Chiamate di sistema interrotte

  4.3.8.1.  Sintomo

  Quando un programma viene interrotto utilizzando Ctrl-Z e poi viene
  riavviato - o in altre situazioni che generano dei segnali:
  interruzione con Ctrl-C, terminazione di un processo figlio ecc. - si
  ottengono messaggi del tipo "interrupted system call" o "write:
  unknown error".


  4.3.8.2.  Problema

  I sistemi POSIX controllano la presenza di segnali pi frequentemente
  rispetto a sistemi UNIX pi vecchi. Linux pu eseguire dei gestori di
  segnali:


    in modo asincrono (tramite un timer)

    al ritorno da ogni chiamata di sistema

    durante l'esecuzione delle seguenti chiamate di sistema: select(),
     pause(), connect(), accept(), read() su terminali, su socket, su
     pipe o su file in /proc, write() su terminali, su socket, su pipe o
     sulla line printer; open() su FIFO, su PTY o su linee seriali,
     ioctl() su terminali; fcntl() con il comando F_SETLKW; wait4(),
     syslog(), ogni operazione TCP o NFS.

  Per altri sistemi operativi potrebbe essere necessario includere in
  questa lista le chiamate di sistema creat(), close(), getmsg(),
  putmsg(), msgrcv(), msgsnd(), recv(), send(), wait(), waitpid(),
  wait3(), tcdrain(), sigpause(), semop().

  Se un segnale (per il quale il programma ha installato un gestore)
  avviene durante una chiamata di sistema, viene chiamato il gestore.
  Quando il gestore restituisce il controllo (alla chiamata di sistema),
  essa rileva che  stata interrotta e restituisce immediatamente -1 e
  errno = EINTR. Il programma non si aspetta che questo accada, pertanto
  si blocca.

   possibile scegliere tra due alternative, per rimediare.


    Per ogni gestore di segnali che viene installato, aggiungere
     SA_RESTART ai flag sigaction. Per esempio, modificare


     ___________________________________________________________________
     signal (sig_nr, my_signal_handler);
     ___________________________________________________________________



  in








  ______________________________________________________________________
  signal (sig_nr, my_signal_handler);
  { struct sigaction sa;
    sigaction (sig_nr, (struct sigaction *)0, &sa);
  #ifdef SA_RESTART
    sa.sa_flags |= SA_RESTART;
  #endif
  #ifdef SA_INTERRUPT
    sa.sa_flags &= ~ SA_INTERRUPT;
  #endif
    sigaction (sig_nr, &sa, (struct sigaction *)0);
  }
  ______________________________________________________________________



  Si noti che mentre questo viene applicato alla maggior parte delle
  chiamate di sistema,  necessario controllare EINTR personalmente
  riguardo a read(), write(), ioctl(), select(), pause() e connect() .
  Si veda sotto.

    Controllare EINTR esplicitamente.

  Seguono due esempi per read() e ioctl().

  Una parte di codice originale utilizzante read()


  ______________________________________________________________________
  int result;
  while (len > 0) {
          result = read(fd,buffer,len);
          if (result < 0) break;
          buffer += result; len -= result;
  }
  ______________________________________________________________________



  diventa


  ______________________________________________________________________
  int result;
  while (len > 0) {
          result = read(fd,buffer,len);
          if (result < 0) { if (errno != EINTR) break; }
          else { buffer += result; len -= result; }
  }
  ______________________________________________________________________



  e una parte di codice utilizzante ioctl()


  ______________________________________________________________________
      int result;
      result = ioctl(fd,cmd,addr);
  ______________________________________________________________________



  diventa


  ______________________________________________________________________
      int result;
      do { result = ioctl(fd,cmd,addr); }
      while ((result == -1) && (errno == EINTR));
  ______________________________________________________________________



  Si noti che in alcune versioni di Unix BSD il comportamento
  predefinito consiste nel riavviare le chiamate di sistema. Per
  ottenere l'interruzione delle chiamate di sistema  necessario
  utilizzare i flag SV_INTERRUPT o SA_INTERRUPT.


  4.3.9.  Stringhe scrivibili (il programma genera 'segmentation fault'
  in modo casuale)

  GCC ha una visione ottimistica dei suoi utenti, considerando le
  costanti stringa esattamente quello che sono - delle costanti.
  Pertanto, le memorizza nell'area del codice, dove possono essere
  inserite ed estratte dall'immagine di disco del programma (invece di
  occupare uno swapspace). Ne consegue che ogni tentativo di riscriverle
  causer 'segmentation fault'.

  Questo pu causare dei problemi a vecchi programmi che, per esempio
  eseguono una chiamata mktemp() con una stringa costante come
  argomento. mktemp() tenta di riscrivere il suo argomento.

  Per correggere,

    compilare con l'opzione -fwritable-strings, per fare in modo che
     gcc posizioni le costanti nello spazio dati, oppure

    riscrivere le parti che causano dei problemi per allocare una
     stringa non costante ed eseguire la strcpy dei dati in essa prima
     della chiamata.


  4.3.10.  Perch la chiamata execl()  fallisce?

  Probabilmente accade perch viene eseguita in modo errato. Il primo
  argomento per execl  il nome del programma da eseguire.  Il secondo e
  i successivi diventano l'array argv del programma che si sta
  chiamando. Ricordare che: argv[0] viene impostato anche per un
  programma eseguito senza argomenti. Pertanto si dovrebbe scrivere


  ______________________________________________________________________
      execl("/bin/ls","ls",NULL);
  ______________________________________________________________________



  e non solo


  ______________________________________________________________________
      execl("/bin/ls", NULL);
  ______________________________________________________________________



  L'esecuzione del programma senza nessun argomento  interpretata come
  un invito a stampare le sue dipendenze a librerie dinamiche, almeno
  utilizzando a.out. ELF si comporta diversamente.

  (Se si desidera questa informazione di libreria, esistono interfacce
  pi semplici; si veda il paragrafo relativo al caricamento dinamico, o
  la pagina di manuale per ldd).


  5.  Debugging e Profiling

  5.1.  Manutenzione preventiva (lint)

  Non esiste un lint ampiamente utilizzato per Linux, dal momento che la
  maggior parte della gente si accontenta degli avvertimenti che gcc pu
  generare. Probabilmente, quello pi utile  il -Wall opzione che
  significa 'Warnings, all' ma probabilmente ha un maggior valore
  mnemonico, se pensato come qualcosa contro cui si sbatte la testa
  (NdT. "wall" in inglese significa "muro").

  Esiste un lint di dominio pubblico disponibile su
  ftp://larch.lcs.mit.edu/pub/Larch/lclint. Putroppo non sono in grado
  di giudicare la sua validit.


  5.2.  Debugging

  5.2.1.  Come si ottengono le informazioni di debug in un programma?

   necessario compilare ed eseguire il link di tutte le sue parti con
  l'opzione -g, e senza -fomit-frame-pointer. Non  necessario
  ricompilarlo interamente, solo le parti di cui si esegue il debug.

  Nelle configurazioni a.out le librerie condivise sono compilate con
  -fomit-frame-pointer, con la quale gdb non funzioner. Questo perch
  l'opzione -g implica un link statico.

  Se il linker va in errore fornendo un messaggio che indica
  l'impossibilit di trovare libg.a, significa che non si possiede
  /usr/lib/libg.a, che consiste nella speciale libreria C abilitata al
  debugging. Tale libreria pu essere fornita nel pacchetto binario
  libc, oppure (in versioni di libreria C pi recenti) pu essere
  necessario ottenere il codice sorgente libc ed eseguire personalmente
  la compilazione.  Tuttavia,  possibile ottenere sufficienti
  informazioni per la maggior parte degli scopi semplicemente
  sostituendola con un collegamento simbolico con /usr/lib/libc.a.


  5.2.1.1.  Come eliminarle?

  Molto software GNU  impostato affinch la compilazione e il link
  siano eseguite con l'opzione -g, che determina la generazione di
  eseguibili molto voluminosi (e spesso statici). Questa non  una buona
  idea.

  Se il programma possiede uno script di configurazione `autoconf', 
  possibile disabilitare le informazioni di debugging controllando il
  Makefile. Naturalmente, se si sta utilizzando ELF, il link del
  programma viene eseguito in modo dinamico indipendentemente
  dall'impostazione -g, pertanto si pu semplicemente usare strip.


  5.2.2.  Software disponibile

  Molte persone utilizzano gdb, che pu essere ottenuto in forma
  sorgente dai siti di archivio GNU ftp://prep.ai.mit.edu/pub/gnu,
  oppure in formato binario da tsx-11
  (ftp://tsx-11.mit.edu/pub/linux/packages/GCC) o da sunsite. xxgdb  un
  debugger X basato su gdb (ossia,  necessario che sia installato gdb).
   possibile trovare i sorgenti presso
  ftp://ftp.x.org/contrib/xxgdb-1.08.tar.gz.

  Rick Sladkey ha eseguito il porting del debugger UPS. Pu essere
  eseguito anche sotto X, ma a differenza di xxgdb, non  un semplice
  front end X per un debugger basato su testo. Possiede diverse
  caratteristiche molto interessanti, e se si ha la necessit di
  eseguire diversi debug,  il caso di provarlo. La versione
  precompilata per Linux e i patch per i sorgenti UPS possono essere
  trovati in ftp://sunsite.unc.edu/pub/Linux/devel/debuggers/, mentre i
  sorgenti originali in ftp://ftp.x.org/contrib/ups-2.45.2.tar.Z.

  Un altro strumento utile per il debug  'strace', che visualizza le
  chiamate di sistema fatte da un processo. Questo strumento possiede
  anche molti altri utilizzi, inclusa la possibilit di sapere i nomi di
  file compilati, di cui non si possiede il sorgente; di esasperare i
  race condition in programmi che si sospettano contenerle, e in
  generale di imparare come funzionano le cose. La versione pi recente
  di strace (attualmente la 3.0.8) pu essere trovata in
  ftp://ftp.std.com/pub/jrs/.


  5.2.3.  Programmi background (demone)

  I programmi demone tipicamente eseguono presto la fork(), e terminano
  il programma chiamante. Questo rende la sessione di debug molto breve.

  Il modo pi semplice per aggirare questo ostacolo consiste
  nell'impostare un breakpoint per fork, e quando il programma si
  blocca, forzare la restituzione di 0.



       (gdb) list
       1               #include <stdio.h>
       2
       3               main()
       4               {
       5               if(fork()==0) printf("child\n");
       6               else printf("parent\n");
       7               }
       (gdb) break fork
       Breakpoint 1 at 0x80003b8
       (gdb) run
       Starting program: /home/dan/src/hello/./fork
       Breakpoint 1 at 0x400177c4

       Breakpoint 1, 0x400177c4 in fork ()
       (gdb) return 0
       Make selected stack frame return now? (y or n) y
       #0  0x80004a8 in main ()
       at fork.c:5
       5               if(fork()==0) printf("child\n");
       (gdb) next
       Step singolo fino all'uscita dalla funzione fork,
       che non contiene informazioni sul numero di riga.
       child
       7               }





  5.2.4.  Core file

  Quando Linux viene avviato, solitamente  configurato per non produrre
  core file. Se si desidera,  possibile utilizzare il comando interno
  dell'interprete comandi per riabilitarli: per shell compatibili C
  (come tcsh) corrisponde al comando



       % limit core unlimited




  mentre per interpreti comandi di tipo Bourne (sh, bash, zsh, pdksh)
  utilizzare



       $ ulimit -c unlimited




  Se si desidera una maggiore flessibilit nell'assegnazione dei nomi ai
  core file (nel caso, per esempio, di analisi post-mortem con un
  debugger che contiene errori)  possibile eseguire una piccola
  modifica al proprio kernel. Cercare in fs/binfmt_aout.c e
  fs/binfmt_elf.c il codice tipo:


  ______________________________________________________________________
    memcpy(corefile,"core.",5);
  #if 0
    memcpy(corefile+5,current->comm,sizeof(current->comm));
  #else
    corefile[4] = '\0';
  #endif
  ______________________________________________________________________



  e modificare gli 0 in 1.


  5.3.  Profiling

  Il profiling rappresenta un modo per esaminare le parti di un
  programma richiamate pi frequentemente o eseguite pi a lungo. 
  buona norma ottimizzare il codice e vedere dove viene perso del tempo.
   necessario compilare tutti i file oggetto sui quali si desiderano
  informazioni sul tempo di esecuzione con l'opzione -p, e per
  interpretare il file di output sar necessario anche gprof (dal
  pacchetto binutils). Si veda la pagina di manuale gprof per ulteriori
  dettagli.


  6.  Linking

  Questo paragrafo  piuttosto complicato a causa dei due formati binari
  incompatibili, la distinzione tra libreria statica e condivisa, e del
  sovraccarico del verbo 'link' che significa sia 'cosa accade dopo la
  compilazione', sia 'cosa accade quando viene richiamato un programma
  compilato' (e, di fatto, il sovraccarico del verbo 'load' in un senso
  simile ma opposto).

  Per ridurre in qualche modo la confusione, si user il termine
  `caricamento dinamico' (dynamic loading) per quello che accade durante
  l'esecuzione, argomento descritto nel prossimo paragrafo.  Potrebbe
  anche accadere di trovare il termine 'collegamento dinamico' (dynamic
  linking) con lo stesso significato, ma non in questo documento. Questo
  paragrafo, quindi, tratta esclusivamente il tipo di link che avviene
  alla fine di una compilazione.


  6.1.  Librerie condivise e statiche

  L'ultima fase della compilazione di un programma consiste nel
  'collegamento' (link), ossia nell'unire tutte le parti e vedere se
  manca qualcosa. Ovviamente esistono alcune cose che molti programmi
  hanno in comune - ad esempio, aprire file, ed il codice in grado di
  fare queste cose sono fornite sotto forma di librerie.  Nella maggior
  parte dei sistemi Linux si trovano in /lib e /usr/lib/.





  Quando si utilizza una libreria statica, il linker trova le parti
  necessarie ai moduli di programma e le copia fisicamente nel file di
  output eseguibile che viene generato. Al contrario, questo non avviene
  per le librerie condivise - in questo caso nell'output viene inserita
  una nota del tipo 'quando viene eseguito questo programma, 
  necessario caricare questa libreria'.  Ovviamente, le librerie
  condivise tendono a creare eseguibili di dimensioni minori; inoltre
  utilizzano una quantit inferiore di memoria e viene utilizzato meno
  spazio su disco. Il comportamento predefinito di Linux consiste
  nell'eseguire il collegamento di librerie condivise se esistono,
  altrimenti vengono utilizzate quelle statiche. Se si ottengono dei
  binari statici quando, al contrario, si vogliono quelli condivisi,
  controllare che i file di libreria condivisa (*.sa per a.out, *.so per
  ELF) si trovino dove dovrebbero essere e siano leggibili.

  Su Linux, le librerie statiche hanno nomi come libname.a, mentre le
  librerie condivise sono denominate libname.so.x.y.z dove x.y.z
  rappresenta il numero di versione. Le librerie condivise, inoltre,
  contengono spesso dei collegamenti che puntano ad esse, che risultano
  essere molto importanti, e (in configurazioni a.out) contengono dei
  file .sa associati. Le librerie standard sono disponibili sia in
  formato condiviso, sia in formato statico.

   possibile sapere quali librerie condivise sono richieste da un
  programma utilizzando ldd (List Dynamic Dependencies)



       $ ldd /usr/bin/lynx
               libncurses.so.1 => /usr/lib/libncurses.so.1.9.6
               libc.so.5 => /lib/libc.so.5.2.18




  Questo esempio mostra che il browser WWW 'lynx' dipende dalla presenza
  di libc.so.5 (la libreria C) e libncurses.so.1 (utilizzata per il
  controllo del terminale). Se un programma non ha dipendenze, ldd
  risponder 'statically linked' o 'statically linked (ELF)'.


  6.2.  Interrogazione delle librerie ('In quale libreria si trova
  sin()?')

  nm nome_libreria dovrebbe listare tutti i simboli per i quali esistono
  dei riferimenti in nome_libreria. Il comando funziona sia per librerie
  statiche che dinamiche. Si supponga di voler saper dov' definita
  tcgetattr(): si potrebbe utilizzare
       $ nm libncurses.so.1 |grep tcget
                U tcgetattr




  `U' significa 'undefined' - mostra che la libreria ncurses la utilizza
  ma non la definisce. In alternativa, si potrebbe usare



       $ nm libc.so.5 | grep tcget
       00010fe8 T __tcgetattr
       00010fe8 W tcgetattr
       00068718 T tcgetpgrp




  `W' significa 'weak', ossia che il simbolo  definito, ma in modo tale
  da poter essere sostituito da un'altra definizione in una libreria
  diversa. Una definizione 'normale' (come quella per tcgetpgrp) 
  indicata con una 'T'.




  Comunque la risposta breve alla domanda del titolo, consiste in
  libm.(so|a). Tutte le funzioni definite in <math.h> sono tenute nella
  libreria math; ne consegue che sar necessario eseguire il
  collegamento con l'opzione -lm quando si utilizza una di esse.


  6.3.  Ricerca dei file

  ld: Output file requires shared library `libfoo.so.1`
  (Ovvero: "ld: Il file di output richiede la libreria condivisa
  'libfoo.so.1'")

  La strategia di ricerca di un file per ld e simili varia a seconda
  della versione, ma l'unico punto che si pu ritenere predefinito 
  /usr/lib.  Se si vuole che le librerie vengano cercate in altre
  locazioni,  necessario specificare le loro directory tramite
  l'opzione -L in gcc o ld.

  Se non dovesse funzionare, controllare che i file necessari si trovino
  effettivamente in quelle directory. Per a.out, il collegamento con
  -lfoo fa in modo che ld cerchi libfoo.sa (condivisa) e, in caso di
  insuccesso, libfoo.a (statica). Per ELF, verr eseguita la ricerca di
  libfoo.so, quindi di libfoo.a.  libfoo.so  generalmente un
  collegamento simbolico a libfoo.so.x.


  6.4.  Compilazione delle proprie librerie

  6.4.1.  Controllo della versione

  Come qualunque altro programma, le librerie possono contenere errori
  che vengono riscontrati e risolti nel tempo. Inoltre, le librerie
  possono introdurre nuove caratteristiche, modificare l'effetto di
  altre esistenti, o rimuovere quelle vecchie. Questo potrebbe
  costituire un problema per i programmi che le utilizzano.

  Pertanto si  introdutto il concetto di versione della libreria. Tutte
  le modifiche che possono essere fatte a una libreria sono catalogate
  in 'minori' o 'maggiori', dove una modifica 'minore' non interrompe il
  funzionamento dei vecchi programmi che la utilizzano. La versione di
  una libreria pu essere dedotta dal suo nome di file (di fatto, questo
  non  vero per quanto riguarda ELF; nel seguito viene spiegato il
  motivo): libfoo.so.1.2 ha '1' come versione maggiore, e '2' come
  minore. Il numero di versione minore pu essere svariato - libc
  inserisce in esso il 'livello di patch', assegnando alle librerie nomi
  del tipo libc.so.5.2.18, e spesso sono utilizzate lettere, underscore,
  o quasi ogni altro carattere ASCII.

  Una delle differenze principali tra il formato ELF e a.out consiste
  nel modo in cui viene eseguita la compilazione delle librerie
  condivise. Per prima cosa viene descritto ELF, dal momento che  pi
  semplice.


  6.4.2.  ELF. Di cosa si tratta?

  ELF (Executable and Linking Format)  un formato binario
  originariamente sviluppato da USL (UNIX System Laboratories) e
  attualmente utilizzato in Solaris e System V Release 4. A seguito
  della sua aumentata flessibilit rispetto al pi vecchio formato a.out
  utilizzato da Linux, gli sviluppatori di librerie GCC e C hanno deciso
  lo scorso anno di utilizzare ELF come formato binario standard per
  Linux.


  6.4.2.1.  Uteriori dettagli

  Questo paragrafo  tratto dal documento '/news-
  archives/comp.sys.sun.misc'.


       ELF (Executable Linking Format)  il nuovo e migliorato for
       mato di file oggetto introdotto in SVR4. ELF  molto pi
       potente di COFF, nel fatto di essere estendibile
       dall'utente. ELF vede un file oggetto come una lista di
       sezioni arbitrariamente lunga (piuttosto che come un array
       di entit a lunghezza fissa), tali sezioni, a differenza di
       quanto accade in COFF, non si devono trovare in un luogo
       specifico e non devono essere in un ordine specifico ecc.
       Gli utenti possono aggiungere nuove sezioni ai file oggetto,
       se desiderano avere a disposizione nuovi dati. ELF, inoltre,
       possiede un formato di debugging molto pi potente denomi
       nato DWARF (Debugging With Attribute Record Format) -
       attualmente non supportato completamente su Linux (ma ci si
       sta lavorando). Una lista linkata di DIE (o Debugging Infor
       mation Entries) di DWARF costituisce la sezione .debug di
       ELF.  Invece di essere un insieme di piccoli record a dimen
       sione fissa, ogni DIE di DWARF contiene una lista di
       lunghezza arbitraria di attributi complessi ed  scritto
       come un albero di dati di programma. I DIE sono in grado di
       includere una quantit di informazioni di molto maggiore
       rispetto alla sezione .debug di COFF (come grafi di eredit
       del C++ ecc).



       L'accesso ai file ELF avviene tramite la libreria di accesso
       ELF SVR4 (Solaris 2.0 ?), che fornisce un'interfaccia sem
       plice e rapida alle parti pi complicate di ELF.  Uno dei
       vantaggi principali derivanti dall'utilizzo della libreria
       di accesso ELF consiste nel fatto che non sar mai neces
       sario vedere un file ELF come file Unix,  possibile
       eseguire l'accesso come file Elf *, dopo una chiamata
       elf_open() si eseguono chiamate elf_foobar() sulle sue com
       ponenti invece di occuparsi della sua immagine effettiva su
  disco (cosa che con COFF si faceva impunemente).



  I vantaggi e gli svantaggi di ELF, e le evoluzioni necessarie per
  eseguire l'upgrade di un sistema a.out per supportarlo, sono descritti
  nell'ELF-HOWTO e non ho intenzione di ripeterli qui. L'HOWTO dovrebbe
  essere disponibile nello stesso luogo in cui  stato trovato questo
  documento.


  6.4.2.2.  Librerie condivise di ELF

  Per eseguire la compilazione di libfoo.so come libreria condivisa, i
  passi di base hanno la seguente forma:



       $ gcc -fPIC -c *.c
       $ gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 *.o
       $ ln -s libfoo.so.1.0 libfoo.so.1
       $ ln -s libfoo.so.1 libfoo.so
       $ LD_LIBRARY_PATH='pwd':$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH




  Questi comandi genererano una libreria condivisa denominata
  libfoo.so.1.0, i collegamenti appropriati per ld (libfoo.so) e il
  caricamento dinamico (libfoo.so.1) per trovarla. Per eseguire un
  collaudo, si aggiunge la directory corrente a LD_LIBRARY_PATH.



  Quando si  sicuri che la libreria funziona, deve essere spostata, ad
  esempio, in /usr/local/lib, e devono essere creati appropriati
  collegamenti. Il collegamento da libfoo.so.1 a libfoo.so.1.0 
  mantenuto aggiornato da ldconfig, che nella maggior parte dei sistemi
  viene eseguito come parte del processo di avviamento. Il collegamento
  libfoo.so deve essere aggiornato manualmente.  Se si  scrupolosi
  nell'eseguire l'aggiornamento di tutte le parti di una libreria (ossia
  degli header file) contemporaneamente, la cosa pi semplice da fare
  consiste nel rendere libfoo.so -> libfoo.so.1, in modo che ldconfig
  mantenga correnti entrambi i collegamenti. In caso contrario, potrebbe
  in seguito verificarsi ogni genere di stranezza.



       $ su
       # cp libfoo.so.1.0 /usr/local/lib
       # /sbin/ldconfig
       # ( cd /usr/local/lib ; ln -s libfoo.so.1 libfoo.so )





  6.4.2.3.  Numerazione delle versioni, soname e symlink

  Ogni libreria ha un soname. Quando il linker trova uno di questi in
  una libreria in cui sta eseguendo una ricerca, nel binario viene
  incluso il soname in luogo del nome di file effettivo ricercato.
  Durante l'esecuzione, il loader dinamico cercher un file tramite il
  nome di soname, non con il nome di file/libreria. Pertanto, una
  libreria denominata libfoo.so potrebbe avere il soname libbar.so, di
  conseguenza tutti i programmi collegati ad essa, all'avvio,
  cercherebbero libbar.so.

  Sembra essere una caratteristica di poca importanza, invece  la
  chiave per capire come su un sistema possono coesistere diverse
  versioni della stessa libreria. Di fatto, la denominazione standard
  delle librerie in Linux consiste nel chiamare la libreria, ad esempio,
  libfoo.so.1.2, e assegnare ad essa il soname libfoo.so.1. Se aggiunta
  in una directory di libreria 'standard' (ossia, /usr/lib), ldconfig
  creer un collegamento simbolico libfoo.so.1 -> libfoo.so.1.2 in modo
  che sia possibile trovare l'immagine appropriata durante l'esecuzione.
   necessario anche un collegamento libfoo.so -> libfoo.so.1 affinch
  ld possa trovare il soname corretto da utilizzare durante il link.

  Pertanto, quando si risolve un errore nella libreria, o si aggiungono
  nuove funzioni (ogni modifica che non influenzi in modo negativo i
  programmi esistenti), si eseguir nuovamente la compilazione
  mantenendo lo stesso soname, e modificando il nome di file. Quando si
  inseriscono nella libreria delle modifiche che causerebbero
  l'interruzione dei programmi esistenti, incrementare semplicemente il
  numero nel soname - in questo caso, rinominare la nuova versione
  libfoo.so.2.0, e assegnarle il soname libfoo.so.2. Quindi, convertire
  il collegamento a libfoo.so in modo che punti alla nuova versione e
  tutto  a posto.

  Si noti che non  necessario dare un nome alle librerie, ma si tratta
  di una buona convenzione. ELF fornisce una flessibilit nel nominare
  le librerie in modi che potrebbero confondere, ma questo non significa
  che debba farlo per forza.

  Riassumendo: se si suppone di osservare la tradizione secondo cui gli
  aggiornamenti maggiori potrebbero distruggere la compatibilit e che
  quelli minori non lo fanno, eseguire il collegamento con



       gcc -shared -Wl,-soname,libfoo.so.major -o libfoo.so.major.minor




  e tutto funzioner alla perfezione.


  6.4.3.  a.out. Il formato tradizionale

  La facilit con cui si esegue la compilazione di librerie condivise 
  uno dei motivi principali per passare a ELF.  Detto questo,  ancora
  possibile utilizzare a.out. Si prenda
  ftp://tsx-11.mit.edu/pub/linux/packages/GCC/src/tools-2.17.tar.gz e si
  legga il documento di 20 pagine.


  6.4.3.1.  ZMAGIC e QMAGIC

  QMAGIC  un formato eseguibile proprio come i vecchi binari a.out
  (conosciuti anche come ZMAGIC), ma che lascia la prima pagina non
  mappata.  Questo consente che accada pi facilmente un riferimento
  NULL dal momento che non esiste alcun mapping nel range 0-4096. Come
  effetto collaterale, i binari saranno di dimensioni inferiori (di
  circa 1 K).

  I linker obsoleti supportano solamente ZMAGIC, quelli semi-obsoleti
  supportano entrambi i formati, mentre le versioni attuali supportano
  solo QMAGIC. In realt questo non ha importanza, dal momento che il
  kernel riesce ad eseguire entrambi i formati.

  Il proprio comando 'file' dovrebbe essere in grado di identificare se
  un programma  QMAGIC.


  6.4.3.2.  Posizione dei file

  Una libreria condivisa a.out (DLL)  formata da due file reali e da un
  collegamento simbolico. Per la libreria 'foo' utilizzata come esempio,
  questi file sarebbero libfoo.sa e libfoo.so.1.2; il collegamento
  simbolico sarebbe libfoo.so.1 e punterebbe all'ultimo di questi file.
  Ma a cosa servono?

  Durante la compilazione, ld ricerca libfoo.sa. Si tratta del file
  'matrice' della libreria, e contiene tutti i dati esportati e i
  puntatori alle funzioni richieste per il collegamento run time.

  Durante l'esecuzione, il loader dinamico cerca libfoo.so.1. Si tratta
  di un collegamento simbolico anzich di un file reale in modo che le
  librerie possano essere aggiornate con versioni pi recenti e corrette
  senza procurare danni a nessuna delle applicazioni utilizzanti la
  libreria in quel momento. Dopo che la nuova versione, ad esempio
  libfoo.so.1.3 -  stata introdotta, l'esecuzione di ldconfig commuter
  il collegamento affinch punti ad essa tramite un'operazione atomica,
  lasciando illeso ogni programma che stava utilizzando la vecchia
  versione.

  Le librerie DLL appaiono spesso pi grandi delle loro controparti
  statiche. Riservano spazio per future espansioni nella forma di
  'buchi' che possono essere creati senza occupare spazio su disco. Una
  semplice chiamata cp o l'utilizzo del programma makehole raggiunger
  questo scopo. Dopo la compilazione,  anche possibile rimuoverli, dal
  momento che gli indirizzi si trovano in locazioni fisse. Non tentare
  di rimuoverli dalle librerie ELF.


  6.4.3.3.  "libc-lite"?

  Un libc-lite  una versione ridotta della libreria libc per la quale 
  stata eseguita la compilazione in modo tale da stare su un floppy disk
  ed essere sufficiente per tutti i task Unix essenziali. Non include
  codice curse, dbm, termcap ecc.  Se il proprio /lib/libc.so.4 ha un
  collegamento con un lite lib, il sistema avvisa di sostituirlo con una
  versione completa.


  6.4.4.  Linking: problemi comuni

  Inviatemi i problemi derivanti dal linking! Anche se non potr fare
  niente per risolverli, ne scriver un resoconto dettagliato.


     Programmi eseguono il link statico anzich dinamico



        Controllare di avere i collegamenti corretti affinch ld possa
        trovare tutte le librerie condivise. Per ELF questo significa un
        collegamento simbolico libfoo.so per l'immagine, in a.out un
        file libfoo.sa.  Molte persone hanno riscontrato questo problema
        dopo il passaggio dai binutils ELF 2.5 ai 2.6 - la versione
        precedente ricercava le librerie condivise in un modo 'pi
        intelligente' pertanto non avevano bisogno di creare tutti i
        collegamenti. Il comportamento intelligente  stato eliminato
        per compatibilit con altre architetture, e perch molto spesso
        le sue supposizioni erano sbagliate e causando pi guai di
        quanti fossero i problemi risolti.
     Lo strumento DLL 'mkimage' non riesce a trovare libgcc


        Da libc.so.4.5.x e oltre, libgcc non  pi condivisa. Pertanto,
         necessario sostituire le occorrenze di '-lgcc' con 'gcc
        -print-libgcc-file-name'.

        Inoltre, bisogna cancellare tutti i file /usr/lib/libgcc*.
        Questo  molto importante.


     Messaggi __NEEDS_SHRLIB_libc_4 multiply defined
        Altra conseguenza del problema descritto al punto precedente.


     Messaggio ``Assertion failure'' quando si ricompila una DLL?
        Questo messaggio criptico molto probabilmente significa che uno
        degli slot della propria jump table  andato in overflow poich
         stato riservato troppo poco spazio nel file jump.vars
        originale.  possibile localizzare i colpevoli eseguendo il
        comando 'getsize' fornito nel pacchetto tools-2.17.tar.gz.
        Tuttavia, probabilmente l'unica soluzione consiste nel
        sostituire il numero di versione maggiore della libreria,
        forzandolo affinch sia impossibile tornare indietro.


     ld: output file needs shared library libc.so.4
        Questo accade solitamente quando si sta eseguendo il
        collegamento con librerie diverse da libc (come le librerie X),
        e si utilizza l'opzione -g sulla riga di link utilizzando anche
        -static.

        Gli stub .sa per le librerie condivise contengono solitamente un
        simbolo indefinito _NEEDS_SHRLIB_libc_4 che viene risolto da
        libc.sa. Tuttavia, con -g si finisce di eseguire il collegamento
        con libg.a o libc.a, il simbolo non viene mai risolto, portando
        all'errore sopra descritto.

        In conclusione, aggiungere -static quando si compila con
        l'opzione -g, oppure non eseguire il collegamento con -g. Molto
        spesso  possibile ottenere informazioni di debugging
        sufficienti compilando i file individuali con -g, ed eseguendo
        il collegamento senza questa opzione.



  6.5.  Loading dinamico

  Questo paragrafo  per il momento piuttosto breve, verr esteso in
  futuro.


  6.5.1.  Concetti

  Linux possiede delle librerie condivise, come si  visto diverse molte
  volte nell'ultimo paragrafo.  Gran parte del lavoro di associazione
  dei nomi a locazioni, che tradizionalmente era svolto al momento del
  link, deve essere ritardato al momento del load (caricamento).


  6.5.2.  Messaggi di errore

  I lettori sono pregati di inviare i proprii errori di link all'autore,
  che anche se non potr risolverli, comunque scriver un resoconto
  dettagliato.

      can't load library: /lib/libxxx.so, Incompatible version
        (solo in a.out) Questo significa che non si possiede la versione
        maggiore aggiornata della libreria xxx. Non  possibile
        semplicemente creare un collegamento simbolico ad un'altra
        versione che si possiede; nella migliore delle ipotesi questo
        causer un segfault nel proprio programma.  Si consiglia di
        ottenere una nuova versione. Una situazione simile in ELF
        produrr un messaggio del tipo



          ftp: can't load library 'libreadline.so.2'





      warning using incompatible library version xxx
        (solo in a.out) Si possiede una versione minore della libreria
        pi vecchia di quella posseduta dalla persona che ha compilato
        il programma in questione. Il programma funzioner comunque.
        Tuttavia, un aggiornamento non sarebbe una cattiva idea.



  6.5.3.  Controllo delle operazioni del loader dinamico

  Esistono diverse variabili di ambiente a che influenzano il
  comportamento del loader dinamico. La maggior parte di esse sono pi
  utili a ldd di quanto non lo siano per l'utente medio, e possono
  essere impostate eseguendo ldd con diverse opzioni. Includono


    LD_BIND_NOW --- normalmente, le funzioni non sono ricercate nelle
     librerie finch non vengono chiamate. L'impostazione di questa
     opzione attiva la ricerca  all'atto del caricamento della libreria,
     determinando un tempo di avviamento maggiore. Pu essere utile
     quando si vuole collaudare un programma per accertarsi che sia
     eseguito il link di tutte le parti.

    LD_PRELOAD --- pu essere impostato con un file contenente delle
     definizioni di funzioni da sovrapporre. Ad esempio, se si sta
     eseguendo un test delle strategie di allocazione della memoria, e
     si vuole sostituire 'malloc',  possibile scrivere la propria
     routine sostitutiva, compilarla come malloc.o e utilizzare i
     comandi



       $ LD_PRELOAD=malloc.o; export LD_PRELOAD
       $ programma_di_test





  LD_ELF_PRELOAD e LD_AOUT_PRELOAD sono simili, ma possono essere appli
  cati solo al tipo binario appropriato. Se LD_qualcosa_PRELOAD e
  LD_PRELOAD sono entrambi impostati, verr utilizzato quello pi speci
  fico.

    LD_LIBRARY_PATH --- elenco, separato da virgole, di directory in
     cui ricercare le librerie condivise. Non ha effetti su ld, ma solo
     durante l'esecuzione. Inoltre,  disabilitato per programmi che
     eseguono setuid o setgid. LD_ELF_LIBRARY_PATH e
     LD_AOUT_LIBRARY_PATH possono anche essere utilizzati per impostare
     la ricerca in modo differente per diversi tipi di binari.
     LD_LIBRARY_PATH non dovrebbe essere necessario nelle operazioni
     normali; piuttosto aggiungere le directory a /etc/ld.so.conf/ ed
     eseguire ldconfig.

    LD_NOWARN --- si applica solo ad a.out. Quando impostato (ossia con
     LD_NOWARN=true; export LD_NOWARN) evita che il loader fornisca i
     warning non fatali (come i messaggi per incompatibilit di versione
     minore).

    LD_WARN --- si applica solamente a ELF. Quando impostato, rende i
     messaggi, solitamente fatali, "Can't find library" dei semplici
     warning.  Non  molto utilizzato nelle operazioni normali, ma 
     importante per ldd.

    LD_TRACE_LOADED_OBJECTS --- si applica solamente a ELF, e fa in
     modo che i programmi credano di essere in esecuzione sotto ldd:



       $ LD_TRACE_LOADED_OBJECTS=true /usr/bin/lynx
               libncurses.so.1 => /usr/lib/libncurses.so.1.9.6
               libc.so.5 => /lib/libc.so.5.2.18






  6.5.4.  Scrivere programmi con il loading dinamico

  Questo  molto simile al funzionamento del supporto di loading
  dinamico di Solaris 2.x.  L'argomento  trattato ampiamente nel
  documento di programmazione ELF di H J Lu e nella pagina di manuale
  dlopen(3) manual page, che pu essere trovata nel pacchetto ld.so.
  Segue un semplice esempio:  necessario effettuare il link con -ldl



       #include <dlfcn.h>
       #include <stdio.h>

       main()
       {
           void *libc;
           void (*printf_call)();

           if(libc=dlopen("/lib/libc.so.5",RTLD_LAZY))
           {
               printf_call=dlsym(libc,"printf");
               (*printf_call)("hello, world\n");
           }

       }





  7.  Come contattare gli sviluppatori

  7.1.  Comunicazione degli errori

  Per prima cosa  necessario cominciare a circoscrivere il problema. 
  specifico di Linux, oppure accade con gcc su altri sistemi? 
  specifico della versione di kernel? Della versione di libreria?
  Sparisce se si esegue il link statico?  possibile ritagliare una
  piccola parte del programma che dimostra l'errore?

  Fatto questo, si  a conoscenza del/i programma/i in cui si trova
  l'errore. Per GCC, la procedura di comunicazione degli errori 
  spiegata nel file info. Per ld.so o per le librerie C o maths, inviare
  una mail a linux-gcc@vger.rutgers.edu. Se possibile, includere un
  breve e autonomo programma che possa dimostrare l'errore, e una
  descrizione sia di cosa si intendeva che facesse, sia di cosa fa
  effettivamente.


  7.2.  Aiuto nello sviluppo

  Se si desidera aiutare lo sviluppo di GCC o della libreria C, la prima
  cosa da fare consiste nell'unirsi alla mailing list linux-
  gcc@vger.rutgers.edu. Se si vuole semplicemente dare un'occhiata alle
  discussioni,  possibile consultare http://homer.ncm.com/linux-gcc/.
  La seconda cosa e le successive dipendono solo dalle vostre
  intenzioni!


  8.  Ultime cose

  8.1.  Ringraziamenti


       Only presidents, editors, and people with tapeworms have the
       right to use the editorial "we".  (Mark Twain)


  Ovvero

       Soli i presidenti, gli editori e la gente con il verme soli
       tario hanno il diritto di usare il "noi" editoriale.  (Mark
       Twain)


  Questo HOWTO si basa molto strettamente al GCC-FAQ di Mitchum DSouza;
  la maggior parte delle informazioni (per non dire una grande quantit
  di testo)  derivato direttamente da quel documento. Esperienze
  riferite all'autore all'interno di questo HOWTO potrebbero riferirsi
  anche a Mitchum DSouza; generalmente le frasi del tipo 'Non si  mai
  collaudato questa parte; non maledite l'autore se il vostro
  disco/sistema si  abbrustolito' possono essere applicate a entrambi.
  Inoltre hanno contribuito a questo documento (in ordine ASCII per
  nome): Andrew Tefft, Axel Boldt, Bill Metzenthen, Bruce Evans, Bruno
  Haible, Daniel Barlow, Daniel Quinlan, David Engel, Dirk Hohndel, Eric
  Youngdale, Fergus Henderson, H.J. Lu, Jens Schweikhardt, Kai Petzke,
  Michael Meissner, Mitchum DSouza, Olaf Flebbe, Paul Gortmaker, Rik
  Faith, Steven S. Dick, Tuomas J Lukka, e naturalmente Linus Torvalds,
  senza il quale l'intero lavoro non avrebbe avuto senso.  Vi prego di
  non sentirvi offesi se nella lista non compare il vostro nome e avete
  contribuito a questo documento (come HOWTO o come FAQ). Inviate mail
  ed sar eseguita la correzione.


  8.2.  Traduzioni

  Attualmente, non esistono traduzioni di questo documento Se desiderate
  farne una, siete liberi di farlo ma vi prego di farmelo sapere! Ci
  sono pochissime probabilit che io sia in grado di parlare la lingua
  in cui desiderate tradurre il documento, ma a parte questo sarei lieto
  di aiutarvi in qualsiasi modo.


  8.3.  Comunicazioni, opinioni, correzioni

  Sono benvenute inviate email all'indirizzo dan@detached.demon.co.uk.
  La chiave pubblica PGP (ID 5F263625)  disponibile dalle pagine web
  dell'autore http://ftp.linux.org.uk/~barlow/, se ci sono necessit di
  riservatezza.


  8.4.  Informazioni legali

  All trademarks used in this document are acknowledged as being owned
  by their respective owners.

  This document is copyright (C) 1996 Daniel Barlow
  dan@detached.demon.co.uk. It may be reproduced and distributed in
  whole or in part, in any medium physical or electronic, as long as
  this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.


  Tutti i marchi utilizzati in questo documento sono riconosciuti come
  appartenenti ai rispettivi proprietari.

  Questo documento ha copyright (C) 1996 di Daniel Barlow
  dan@detached.demon.co.uk. Pu essere riprodotto e distribuito
  completamente o in parte, su ogni mezzo fisico o elettronico, purch
  questo messaggio di copyright sia mantenuto in tutte le copie. 
  consentita e incoraggiata la ridistribuzione commerciale; tuttavia,
  l'autore gradirebbe essere informato su ciascuna di tali
  distribuzioni.

  Tutte le traduzioni, lavori derivati, o lavori aggregati che includono
  un qualunque documento Linux deve essere coperto da questo messaggio
  di copyright. Ossia, non  possibile produrre un lavoro derivato da un
  HOWTO e imporre delle restrizioni addizionali sulla sua distribuzione.
  Eccezioni a queste regole possono essere ammesse sotto particolari
  condizioni; si prega di contattare il coordinatore degli HOWTO di
  Linux all'indirizzo sotto riportato.

  In breve, desideriamo promuovere la diffusione di queste informazioni
  attraverso pi canali possibile. Tuttavia, desideriamo anche mantenere
  il copyright sui documenti HOWTO, e vorremmo essere informati se
  qualcuno ha intenzione di ridistribuire gli HOWTO.


  Se avete delle domande, contattate Tim Bynum, il coordinatore degli
  HOWTO di Linux, all'indirizzo linux-howto@sunsite.unc.edu tramite
  email.


  9.  Riferimenti in italiano

  Questa sezione riporta riferimenti a documenti italiani. Nel caso in
  cui un documento non sia ancora tradotto si rimanda al WEB server del
  Pluto.


    [1] http://www.pluto.linux.it/ildp/HOWTO/ELF-HOWTO.html

    [2] http://www.pluto.linux.it/ildp/ WEB server del PLUTO, sono
     disponibili anche le traduzioni di altri HOWTO.

    [3] http://www.pluto.linux.it/ildp/HOWTO/GCC-HOWTO.html


  10.  Indice Analitico




      -fwritable-strings
        ``39'' ``56''


      /lib/cpp
        ``16''


      a.out
        ``1''


      ar
        ``10''


      as
        ``8''


      <asm/*.h>
        ``19''


      atoi()
        ``40''


      atol()
        ``41''


      binaries too big
        ``63'' ``65'' ``77''


      cos()
        ``68''



      debugging
        ``59''


      dlopen()
        ``82''


      dlsym()
        ``83''


      documentazione
        ``4''


      EINTR
        ``52''


      elf
        ``0'' ``71''


      execl()
        ``57''


      fcntl
        ``47''


      FD_CLR
        ``44''


      FD_ISSET
        ``45''


      FD_SET
        ``43''


      FD_ZERO
        ``46''


      file
        ``2''


      <float.h>
        ``20''


      gcc
        ``6''


      gcc -fomit-frame-pointer
        ``61''


      gcc -g
        ``60''
      gcc -v
        ``14''


      gcc, errori (bug)
        ``15'' ``28'' ``29'' ``84''


      gcc, opzioni (flag)
        ``13'' ``25'' ``26''


      gdb
        ``64''


      header file
        ``17''


      chiamate a sistema interrotte
        ``51''


      ld
        ``9''


      LD_* variabili d'ambiente
        ``80''


      ldd
        ``81''


      libc
        ``7''


      libg.a
        ``62''


      libgcc
        ``79''


      <limits.h>
        ``21''


      lint
        ``58''


      <linux/*.h>
        ``18''


      pagine del manuale
        ``5''


      <math.h>
        ``70''
      maths
        ``69''


      mktemp()
        ``55''


      ottimizzazione
        ``27''


      QMAGIC
        ``76''


      segmentation fault
        ``30'' ``54''


      segmentation fault, in GCC
        ``33''


      select()
        ``50''


      SIGBUS
        ``34''


      SIGEMT
        ``35''


      SIGIOT
        ``36''


      SIGSEGV
        ``31'' ``53''


      SIGSEGV, in gcc
        ``32''


      SIGSYS
        ``38''


      SIGTRAP
        ``37''


      sin()
        ``67''


      soname
        ``73''


      sprintf()
        ``42''
      librerie collegate staticamente, in modo inatteso
        ``66'' ``78''


      <stdarg.h>
        ``23''


      <stddef.h>
        ``24''


      strings
        ``11''


      <sys/time.h>
        ``48''


      <unistd.h>
        ``49''


      <varargs.h>
        ``22''


      numeri di versione
        ``12'' ``74''


      cose misteriose
        ``72''


      ZMAGIC
        ``75''




























  Glibc 2 HOWTO
  Eric Green, ejg3@cornell.edu
  v1.5, 8 February 1998



  Questo HOWTO, glibc 2, riguarda l'installazione e l'uso della versione
  2 della libreria GNU C (libc 6) sui sistemi Linux.   Traduzione ital
  iana e manutenzione: Andrea Girotto (andrea.girotto@usa.net)

  1.  Introduzione.



  1.1.  Note su glibc 2.


  Glibc 2  l'ultima versione della libreria GNU C. Attualmente pu
  essere utilizzata senza modifiche su sistemi GNU Hurd e Linux i386,
  m68k, e sistemi alpha.  Nella versione 2.1 saranno supportate anche le
  macchine Linux PowerPC, MIPS, Sparc, Sparc 64 ed Arm.  In futuro il
  supporto verr esteso ad altre archittetture e sistemi operativi.

  Su Linux, glibc 2  usata come libc con versione principale 6,
  successiva di Linux libc 5.  Con questo si intende comunicare agli
  sviluppatori di sostituire libc 5.  A partire dalla versione 2.0.6,
  glibc  considerata qualit di produzione.  La versione 2.1 (attesa in
  un prossimo futuro) sar pronta per un diffuso uso con l'aggiunta di
  molti adattamenti e caratteristiche.

  Ci sono tre aggiunte opzionali disponibili per glibc 2:

     Crypt
        Il pacchetto UFC-crypt.   separato a causa di restrizioni per
        l'esportazione.

     LinuxThreads
        Implementazione dell'interfaccia Posix 1003.1c "pthread"

     Locale data
        Contiene i dati necessari per costruire i file dati locali da
        usare per le caratteristiche di internazionalizzazione di glibc.

  Si raccomandano caldamente i pacchetti crypt e LinuxThreads... non
  usandoli c' il rischio di essere incompatibili con le librerie di
  altri sistemi.  (Se si desidera non usarli,  necessario aggiungere
  l'opzione --disable-sanity-checks durante la configurazione.)


  1.2.  Note su questo documento.


  Questo HOWTO descrive come installare glibc 2 su un sistema Linux
  esistente.   pensato per utenti di sistemi Intel che usino libc 5 in
  ogni caso, utenti di altri sistemi e librerie diverse (come libc 1),
  dovrebbero essere in grado di utilizzare queste informazioni
  sostituendo i nomi di file corretti e i nomi delle architetture dove
  necessario.

  La copia pi recente (in inglese) di questo HOWTO pu essere trovata
  come parte di Linux Documentation Project <http://sunsite.unc.edu/LDP>
  oppure da  <http://www.imaxx.net/~thrytis/glibc/Glibc2-HOWTO.html>.
  Per la rispettiva versione italiana si veda: Italian Linux
  Documentatio Project <http://www.pluto.linux.it/ildp/>.


  1.3.  Modifiche recenti a questo documento.


  Differenze tra le versioni 1.5 ed 1.4:

    Indice aggiunto da Ed Bailey.

    Cambiato l'indirizzo email dell'autore.

  Differenze tra le versioni 1.4 e 1.3:

    Modificato lo stato corrente da sperimentale a distribuzione.

    Aggiornata la lista degli adattamenti in corso.

    Aggiornata l'ultima versione a 2.0.6



  2.  Scegliere il proprio metodo di installazione.


   possibile installare glibc in diversi modi.  Le librerie possono
  essere installate come test, usando le librerie esistenti come
  predefinite ma lasciando la possibilit di provare le nuove
  utilizzando opzioni diverse durante la compilazione dei programmi.
  Questo tipo di installazione rende facile una futura rimozione di
  glibc (tuttavia qualsiasi programma collegato con glibc non sar pi
  in grado di funzionare se le librerie dovessero essere eliminate).
  Usare glibc come libreria di test richiede la compilazione dai
  sorgenti.  Non ci sono distribuzioni in formato binario per questo
  tipo di configurazione.  L'installazione  descritta in ``Installare
  come libreria di test''.

  L'altro tipo di installazione descritto in questo documento  per
  l'uso di glibc come libreria primaria.  Tutti i nuovi programmi
  compilati sul sistema useranno glibc, tuttavia sar sempre possibile
  collegare programmi alla versione precedente usando differenti opzioni
  di compilazione.   possibile sia installare le librerie precompilate,
  sia compilare le librerie personalmente.  Se si desidera cambiare
  opzioni di ottimizzazione o di configurazione, o usare aggiunte che
  non siano distribuite come pacchetto binario,  necessario avere la
  distribuzione in codice sorgente per la compilazione.  Questa
  procedura di installazione  descritta in ``Installare come libreria C
  primaria''.

  Frodo Looijaard descrive un diverso modo di installare glibc.  Questo
  metodo implica l'installazione di glibc come libreria secondaria e la
  configurazione come compilatore incrociato per l'uso di glibc.  La
  procedura  pi complicata che l'installazione della libreria di test
  descritta in questo documento, ma consente una compilazione pi
  semplice quando si collega glibc.  Il metodo  descritto nel suo
  documento Installing glibc-2 on Linux
  <http://huizen.dds.nl/~frodol/glibc/>.

  Se si sta utilizzando la distribuzione Debian 1.3 ma non si desidera
  aggiornare ad una versione instabile di Debian per usare glibc, il
  documento Debian libc5 to libc6 Mini-HOWTO
  <http://www.gate.net/~storm/FAQ/libc5-libc6-Mini-HOWTO.html> descrive
  come usare i pacchetti Debian per il proprio sistema.

  Se si installa glibc 2 su un sistema importante, si potrebbe usare
  l'installazione di test.  Anche se non ci sono errori, alcuni
  programmi potrebbero aver bisogno di qualche modifica prima che
  possano essere compilati, come conseguenza di alterazioni dei
  prototipi alle funzioni e dei tipi.
  3.  Ottenere la libreria.


  La libreria glibc 2 consiste nel pacchetto glibc e tre altri
  opzionali, LinuxThreads, Locale, e Crypt.  Il sorgente pu essere
  trovato presso

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.6.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-linuxthreads-2.0.6.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-localedata-2.0.6.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.6.tar.gz>

  Saranno necessari 150 MB di spazio su disco per la compilazione
  completa e l'installazione.  La libreria base occupa circa 50 MB.

  Pacchetti binari per 2.0.6 non sono disponibili.  Le versioni binarie
  dei pacchetti 2.0.4 per i386 e m68k, e le versioni 2.0.1 per alpha
  sono disponibili:

    Intel x86:

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.4.bin.i386.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.4.bin.i386.tar.gz>

    Alpha:

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.1.bin.alpha-linux.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.1.bin.alpha-
     linux.tar.gz>

    m68k:

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-2.0.4-m68k-linux.bin.tar.gz>

    <ftp://prep.ai.mit.edu/pub/gnu/glibc-crypt-2.0.4-m68k-
     linux.bin.tar.gz>

  Ci sono restrizioni di esportazione per le aggiunte crittografiche.
  Utenti non Statunitensi possono recuperare una versione presso
  <ftp://ftp.ifi.uio.no/pub/gnu>.

  Se si utilizza una distribuzione Red Hat,  possibile avere gli rpm
  per glibc 2 da  <ftp://ftp.redhat.com/pub/redhat/>.  Glibc 2  la
  libreria primaria per la nuova distribuzione Red Hat 5.0.

  Se si utilizza una distribuzione Debian,  possibile avere i pacchetti
  per glibc 2 da  <ftp://ftp.debian.org/debian/dists/unstable/main/>.  I
  file sono nominati libc6.  Glibc 2 ora  parte del pacchetto base per
  la versione hamm di Debian, e sar la libc primaria quando Debian 2.0
  sar rilasciata.



  4.  Installare come libreria di test.


  Questa sezione descrive come installare glibc 2 come libreria di test.
  Qualsiasi cosa compilata sar collegata alle librerie esistenti a meno
  che non si usino alcuni parametri extra per il collegamento alle nuove
  librerie.  Pare che i percorsi siano compilati in pochi file, quindi
  probabilmente  necessario installare la libreria dalla versione
  sorgente.


  4.1.  Compilare ed installare.



  4.1.1.  Prerequisiti.



    Circa 150 MB di spazio libero

    GNU make 3.75

    gcc >= 2.7.2 (meglio 2.7.2.1)

    binutils 2.8.1 (per alpha  necessario ???)

    bash 2.0

    autoconf 2.12 (se si cambia configure.in)

    texinfo 3.11

  Su un i586@133 con 64 MB di RAM, sono necessarie circa 3 ore per
  compilare le librerie complete con le aggiunte.  Su un i686@200
  carico,  necessaria circa mezz'ora.


  4.1.2.  Estrarre i sorgenti.


   necessario estrarre i sorgenti dagli archivi cos che si possano
  compilare.  Il modo migliore per farlo :


        tar xzf glibc-2.0.6.tar.gz
        cd glibc-2.0.6
        tar xzf ../glibc-linuxthreads-2.0.6.tar.gz
        tar xzf ../glibc-crypt-2.0.6.tar.gz
        tar xzf ../glibc-localedata-2.0.6.tar.gz




  Questi comandi estrarranno le directory linuxthreads, crypt e locale
  data in glibc-2.0.6 dove configure potr trovare le rispettive
  aggiunte.


  4.1.3.  Configurazione.


  Nella directory glibc-2.0.6, se ne crea un'altra chiamata compile, e
  la si rende corrente.  Tutto il lavoro sar fatto in questa directory,
  cosa che semplificher la pulizia.  (Gli sviluppatori non sono ancora
  stati in grado di realizzare un 'make clean' perfetto.)


        mkdir compile
        cd compile




  Si esegue ../configure.  Per usare i pacchetti aggiuntivi,  neces
  sario specificarli con --enable-add-ons, ad esempio --enable-add-
  ons=linuxthreads,crypt,localedata.   anche necessario scegliere una
  directory di installazione.  /usr/i486-linuxglibc2  una buona scelta.
  Il comando per configure quindi sar:


        ../configure --enable-add-ons=linuxthreads,crypt,localedata --prefix=/usr/i486-linuxglibc2





  4.1.4.  Compilare ed installare.



  Per compilare e verificare, si esegue:


        make
        make check




  Se il comando 'make check' ha successo, installare la libreria:


        make install





  4.2.  Aggiornare il loader dinamico.




  1. Creare un collegamento dal nuovo ld.so a /lib/ld-linux.so.2:


        ln -s /usr/i486-linuxglibc2/lib/ld-linux.so.2 /lib/ld-linux.so.2




  Questa  la sola libreria la cui locazione  prefissata una volta che
  un programma sia stato collegato e l'uso di un riferimento in /lib
  faciliter l'aggiornamento a glibc come libreria C primaria, una volta
  che la versione stabile sia stata rilasciata.

  2. Modificare /etc/ld.so.conf.   necessario aggiungere un percorso
     alla directory lib dove le nuove librerie risiedono, che sar
     <prefix>/lib, come /usr/i486-linuxglibc2/lib per la scelta
     precedente.  Dopo aver corretto /etc/ld.so.conf, si esegue


        ldconfig -v






  4.3.  Configurare gcc.


  L'ultimo passo dell'installazione  aggiornare /usr/lib/gcc-lib in
  modo che gcc sappia come usare le nuove librerie.  Per prima cosa 
  necessario duplicare la configurazione esistente. Per verificare la
  configurazione corrente, si usa l'opzione -v:


        % gcc -v
        Reading specs from /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2/specs
        gcc version 2.7.2.2




  In questo caso,  i486-unknown-linux  il sistema e 2.7.2.2  la ver
  sione.   necessario copiare /usr/lib/gcc-lib/<system> nella nuova
  directory di test per il sistema:


        cd /usr/lib/gcc-lib/
        cp -r i486-unknown-linux i486-linuxglibc2




  Si rende corrente la nuova directory test di sistema e la directory di
  versione


        cd /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2




  e si corregge il file specs presente.  In questo file, si cambia
  /lib/ld-linux.so.1 a /lib/ld-linux.so.2.  Inoltre  necessario anche
  eliminare tutte le espressioni %{...:-lgmon} nel file, dal momento che
  glibc non usa la libreria gmon per il profiling.  Un esempio di file
  specs pu essere trovato nella sezione ``Esempio file specs''.


  4.4.  Aggiornare i collegamenti per header file.


   necessario creare collegamenti nella nuova directory di link alle
  altre directory include:


        cd /usr/i486-linuxglibc2/include
        ln -s /usr/src/linux/include/linux
        ln -s /usr/src/linux/include/asm
        ln -s /usr/X11R6/include/X11




  Alcune librerie come ncurses necessitano di avere i propri file posti
  in questa directory.  Si dovr copiare o collegare i file in questione
  da /usr/include.  (Probabilmente sar necessario ricompilarne alcune
  con glibc2 per farle funzionare.  In questi casi, basta compilare ed
  installare il pacchetto in /usr/i486-linuxglibc2.)



  4.5.  Verificare la propria installazione.


  Per verificare l'installazione, si crei il seguente programma in un
  file glibc.c:


        #include <stdio.h>

        main()
        {
            printf("hello world!\n");
        }




  e si compili con l'opzione "-b <directory base> -nostdinc -I<directory
  installazione>/include -I/usr/lib/gcc-lib/<nuova directory di sis
  tema>/<gcc version>/include":


        % gcc -b i486-linuxglibc2 -nostdinc -I/usr/i486-linuxglibc2/include
       -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include glibc.c -o glibc




  Si usi ldd per verificare che il programma  stato collegato con
  glibc2 e non la vecchia libc:


        % ldd glibc
        libc.so.6 => /usr/i486-linuxglibc2/lib/libc-2.0.6.so (0x4000d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)




  Se compila, i collegamenti risultano e l'output del programma quando
  eseguito  "hello world!" l'installazione ha avuto successo.





  5.  Installazione come libreria C primaria


  Questa sezione descrive l'installazione di glibc 2 come libreria
  primaria.  Qualsiasi nuovo programma compilato sar collegato con
  questa libreria, a meno che non si usino particolari opzioni per
  qualche altra versione.

  Se si dispone di una distribuzione Redhat o Debian, dopo aver
  prelevato i file rpm o deb appropriati, consultare le istruzioni per
  l'installazione. In questo caso si pu saltare la sezione che segue.



  5.1.  Compilare la libreria dai sorgenti.


  Questa sezione spiega come compilare glibc 2 e le aggiunte a partire
  dai sorgenti.  necessario compilare la libreria se si desidera
  cambiare opzioni di ottimizzazione o configurazione o usare un
  pacchetto di cui non si dispongano i binari.


  5.1.1.  Prerequisiti.



    Circa 150 MB di spazio libero su disco

    GNU make 3.75

    gcc >= 2.7.2 (meglio 2.7.2.1)

    binutils 2.8.1 (per alpha  necessario a ? )

    bash 2.0

    autoconf 2.12 (se si modifica configure.in)

    texinfo 3.11

  Su un i586@133 con 64 MB di RAM, sono necessarie circa 3 ore per
  compilare completamente librerie e aggiunte. Su un i686@200 "carico",
   necessaria circa mezzora.


  5.1.2.  Estrarre i sorgenti.


   necessario estrarre i sorgenti dagli archivi in modo da poterli
  compilare.  Il modo migliore per farlo :


        tar xzf glibc-2.0.6.tar.gz
        cd glibc-2.0.6
        tar xzf ../glibc-linuxthreads-2.0.6.tar.gz
        tar xzf ../glibc-crypt-2.0.6.tar.gz
        tar xzf ../glibc-localedata-2.0.6.tar.gz





  Questa sequenza di comandi dispone le directory linuxthreads, crypt, e
  localedata in glibc-2.0.6 dove  possibile configurare queste
  aggiunte.


  5.1.3.  Configurazione.


  Si crei una directory di nome compile in glibc-2.0.6, e la si renda
  directory corrente.  Tutto il lavoro sar fatto in questa directory,
  cosa che semplificher la pulizia.  (Gli sviluppatori non sono ancora
  stati in grado di realizzare un 'make clean' perfetto.)


       mkdir compile
       cd compile




  Si esegua ../configure.  Per usare i pacchetti aggiuntivi,  neces
  sario specificarli con  --enable-add-ons, come in --enable-add-
  ons=linuxthreads,crypt,localedata.  Probabilmente si desiderer anche
  specificare i percorsi dove debbano essere installati. Per adeguarsi
  alle distribuzioni standard di Linux, si specifichi --prefix=/usr.
  (Quando un prefisso di /usr  specificato su un sistema linux, config
  ure sa come sistemare i percorsi rimanenti per disporre libc.so e le
  altre librerie importanti in /lib.)  La linea completa di configu
  razione dovrebbe essere:


        ../configure --enable-add-ons=linuxthreads,crypt,localedata --prefix=/usr





  5.1.4.  Compilazione.


  Per compilare e verificare, si esegua:


        make
        make check







  5.2.  Prepararsi per l'installazione.


  Ora  necessario spostare alcuni file per prepararsi per la nuova
  libreria, a seconda che si stia installando dai sorgenti o dai binari.
  Ogni nuovo programma compilato sar collegato alla glibc, ma programmi
  vecchi che non sono collegati staticamente dipenderanno ancora dal
  libc 5, per questo non  possibile semplicemente sovrascrivere la
  vecchia versione.


  1. Creare una nuova directory per contenere i vecchi file:



         mkdir -p /usr/i486-linuxlibc5/lib






  2. I vecchi file di header devono essere rimosssi da /usr/include:


        mv /usr/include /usr/i486-linuxlibc5/include






  3. Creare una nuova directory per i file include ed assegnare i
     collegamenti per includere altre directory:



   mkdir /usr/include

   ln -s /usr/src/linux/include/linux /usr/include/linux
   ln -s /usr/src/linux/include/asm /usr/include/asm
   ln -s /usr/X11R6/include/X11 /usr/include/X11
   ln -s /usr/lib/g++-include /usr/include/g++






  I collegamenti potrebbero essere diversi a seconda della distribuzione
  di cui si dispone.  Ad esempio Slackware pone gli header g++ in
  /usr/local/g++-include, mentre Debian in /usr/include/g++, e collega
  /usr/lib/g++-include a /usr/include/g++.  Nell'ultimo caso, probabil
  mente si desiderer spostare la directory originale di nuovo in
  /usr/include.

  4. Ripristinare ogni file di header o collegamento extra.  Alcune
     librerie non standard come ncurses pongono i propri file in
     /usr/include oppure creano un link alla loro directory di include
     in /usr/include.   necessario ripristinare questi file e
     collegamenti al fine di poter usare correttamente le librerie
     extra.

  5. Aggiungere la nuova directory della libreria (ad esempio
     /usr/i486-linuxlibc5/lib) all'inizio del proprio file
     /etc/ld.so.conf.   necessario avere ld.so 1.8.8 (o pi recente)
     per evitare alcuni strani messaggi una volta che glibc sia
     installata.

  6. Spostare/copiare tutte le librerie C vecchie nella nuova directory.


        mv /usr/lib/libbsd.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libc.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libgmon.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libm.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libmcheck.a /usr/i486-linuxlibc5/lib
        mv /usr/lib/libc.so /usr/i486-linuxlibc5/lib
        mv /usr/lib/libm.so /usr/i486-linuxlibc5/lib
        cp /lib/libm.so.5.* /usr/i486-linuxlibc5/lib
        cp /lib/libc.so.5.* /usr/i486-linuxlibc5/lib





  libm.so.5 e libc.so.5 dovrebbero essere copiate e non spostate se /usr
   una partizione separata da /, in quanto sono necessarie per i pro
  grammi usati per far partire linux e devono risiedere nella partizione
  di root.

  7. Spostare i file /usr/lib/*.o nella nuova directory.


        mv /usr/lib/crt1.o /usr/i486-linuxlibc5/lib
        mv /usr/lib/crti.o /usr/i486-linuxlibc5/lib
        mv /usr/lib/crtn.o /usr/i486-linuxlibc5/lib
        mv /usr/lib/gcrt1.o /usr/i486-linuxlibc5/lib





  8. Aggiornare la propria cache dopo lo spostamento delle librerie


        ldconfig -v







  5.3.  Installare dal pacchetto binario.


  Se si sta installando glibc da codice binario precompilato, si deve:


        cd /
        gzip -dc glibc-2.0.bin.i386.tar.gz | tar tvvf -
        gzip -dc glibc-crypt-2.0.bin.i386.tar.gz | tar tvvf -
        ldconfig -v





  Con differenti archittetura o versione, sostituire i nomi di file
  adeguati.



  5.4.  Installare dai sorgenti.


  Per installare la libreria dai sorgenti, si esegua:


        make install
        ldconfig -v







  5.5.  Aggiornare i file specs di gcc.


  Il passo finale dell'installazione (sia nel caso di codice binario che
  sorgente)  di aggionrare il file specs di gcc, in modo da poter
  collegare correttamente i propri programmi. Per determinare quale file
  specs sia quello usato da gcc, si usi:


        % gcc -v
        reading specs from /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2/specs
        gcc version 2.7.2.2





  In questo caso i486-unknown-linux  il sistema, e 2.7.2.2 la versione.
   necessario copiare il file /usr/lib/gcc-lib/<system> nella vecchia
  directory di sistema
        cd /usr/lib/gcc-lib/
        cp -r i486-unknown-linux i486-linuxlibc5





  Andare nella directory originale e quella di versione


        cd /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.2





  per modificare il file specs presente in questa directory.  Nel file,
  si cambi /lib/ld-linux.so.1 in /lib/ld-linux.so.2.  Inoltre 
  necessario rimuovere tutte le espressioni %{...:-lgmon} presenti nel
  file, dal momento che glibc non usa la libreria gmon per il profiling.
  Un esempio di file specs pu essere trovato nella sezione ``Esempio di
  file specs''.



  5.6.  Controllare la propria installazione.


  Per verificare l'installazione, si crei il seguente programma in un
  file glibc.c:


        #include <stdio.h>

        main()
        {
            printf("hello world!\n");
        }





  e si compili il programma.


        % gcc glibc.c -o glibc





  Usando ldd  possibile verificare che il programma  stato collegato
  con glibc2 e non la vecchia libc:


        % ldd glibc
        libc.so.6 => /lib/libc.so.6 (0x4000e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)





  Se il programma si compila e genera "hello world!" quando eseguito,
  l'installazione  corretta.
  6.  Compilare con la libreria non primaria libc.


  Ci sono situazioni in cui si desidera usare una libreria alternativa
  con cui compilare i propri programmi.  Questa sezione spiega come
  raggiungere questo scopo, usando le directory ed i nomi di
  installazione degli esempi delle precedenti due sezioni.  Si ricordi
  di correggere i nomi secondo la propria configurazione.


  6.1.  Avviso per l'uso di libc non primarie.


  Prima di compilare un programma che sar usato nella fase di boot del
  sistema, si ricordi che se il programma  collegato dinamicamente ed 
  usato prima che le partizioni non root siano montate, tutte le
  librerie collegate dovranno essere presenti nella partizione di root.
  Seguendo il percorso di installazione della precedente sezione su come
  installare glibc come libreria primaria, la vecchia libreria 
  lasciata in /lib, che sar nella propria partizione di root.  Questo
  significa che tutti i programmi saranno in grado di funzionare durante
  la fase di boot.  Tuttavia se /usr  su una diversa partizione e si
  installa glibc come libreria di test in /usr/i486-linuxglibc2,
  qualsiasi nuovo programma compilato con glibc non funzioner fino a
  quando non si sia montata /usr.


  6.2.  Compilare programma con una glibc di test


  Per compilare un programma con una installazione di prova di glibc, 
  necessario impostare i percorsi di include a quelli di glibc.
  Specificando "-nostdinc" si negheranno i normali percorsi, e
  "-I/usr/i486-linuxglibc2/include" far puntare agli include di glibc.
  Sar anche necessario specificare gli include di gcc che si trovano in
  /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include (assumendo che si
  sia installata la libreria di test in i486-linuxglibc2 con versione di
  gcc 2.7.2.2).

  Per collegare un programma con una libreria di prova glibc, 
  necessario specificare la configurazione di gcc.  Questo si ottiene
  usando l'opzione "-b i486-linuxglibc2".

  Per la maggior parte dei programmi, si possono specificare queste
  nuove opzioni aggiungendole alle opzioni di makefile $CFLAGS e
  $LDFLAGS:


        CFLAGS = -nostdinc -I/usr/i486-linuxglibc2/include
       -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include -b i486-linuxglibc2
        LDFLAGS = -b i486-linuxglibc2





  Se si sta usando uno script di configurazione, si definiscano le vari
  abili d'ambiente $CFLAGS e $LDFLAGS (usando env/setenv per csh/tcsh, o
  set/export per sh/bash/etc) prima di eseguire configure.  I makefile
  generati in questo modo dovrebbero avere $CFLAGS e $LDFLAGS corretti.
  Non tutti i file di configurazione fanno riferimento a queste vari
  abili, quindi  necessario controllare l'esecuzione di configure e
  correggere manualmente i makefile se necessario.

  Se i programmi che si compilano eseguono solo gcc (e non direttamente
  cpp o binutils), si pu usare lo script che segue per evitare di
  scrivere tutte le opzioni:


        #!/bin/bash
        /usr/bin/gcc -b i486-linuxglibc2 -nostdinc \
                     -I/usr/i486-linuxglibc2/include \
                     -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include "$@"





  Si pu usare questo script invece di "gcc" per la compilazione.


  6.3.  Compilare programmi con libc 5 quando glibc  la libreria pri
  maria.


  Per compilare un programma con le vecchie librerie avendo installato
  glibc come libreria primaria,  necessario impostare i percorsi di
  inclusione ai vecchi include.  Specificando "-nostdinc" si nega
  all'accesso al percorso normale, e "-I/usr/i486-linuxlibc5/include"
  far puntare agli include di libc. Inoltre  necessario specificare
  "-I/usr/lib/gcc-lib/i486-linuxlibc5/2.7.2.2/include" per accedere a
  specifici include gcc.  Si ricordi di correggere questi percorsi sulla
  base dei nomi che si sono dati alle proprie directory e versione di
  gcc.

  Per collegare un programma con la propria vecchia libc,  necessario
  specificare la configurazione, ed  fatto con: "-b i486-linuxlibc5".

  Per la maggior parte dei programmi, si pu specificare le nuove
  opzioni aggiungedole alle opzioni di makefile $CFLAGS e $LDFLAGS:


        CFLAGS = -nostdinc -I/usr/i486-linuxlibc5/include
       -I/usr/lib/gcc-lib/i486-linuxlibc5/2.7.2.2/include -b i486-linuxlibc5
        LDFLAGS = -b i486-linuxlibc5





  Se si sta usando uno script di configurazione, si definiscano le vari
  abili d'ambiente $CFLAGS e $LDFLAGS (usando env/setenv per csh/tcsh, o
  set/export per sh/bash/etc) prima di eseguire configure.  I makefile
  generati in questo modo dovrebbero avere $CFLAGS e $LDFLAGS corretti.
  Non tutti i file di configurazione fanno riferimento a queste vari
  abili, quindi  necessario controllare l'esecuzione di configure e
  correggere manualmente i makefile se necessario.

  Se i programmi che si compilano eseguono solo gcc (e non direttamente
  cpp o binutils), si pu usare lo script che segue per evitare di
  scrivere tutte le opzioni:


        #!/bin/bash
        /usr/bin/gcc -b i486-linuxlibc5 -nostdinc \
                     -I/usr/i486-linuxlibc5/include \
                     -I/usr/lib/gcc-lib/i486-linuxlibc5/2.7.2.2/include "$@"





  Si pu usare questo script invece di "gcc" per la compilazione.



  7.  Compilare programmi C++.


  Libg++ usa alcune parti della libreria matematica, come pure il
  collegamento a libm.  Da momemnto che la libg++ esistente  stata
  compilata con la propria precedente libreria,  necessario ricompilare
  libg++ con glibc per avere una copia binaria.  L'ultima versione
  sorgente per libg++ insieme con la versione binaria compilata con
  glibc (per x86) pu essere trovata presso:
  <ftp://ftp.yggdrasil.com/private/hjl/>.


  7.1.  Installare libg++ per glibc configurata per test.


  Avendo installato glibc come libreria di test,  necessario installare
  i file nella directory dove risiede glibc (che  /usr/i486-linuxglibc2
  per gli esempi delle sezioni precedenti). Installando da un pacchetto
  in formato binario (cosa che l'autore consiglia in quanto non  mai
  riuscito a compilare con successo libg++ in questo modo),  necessario
  estrarre i file in una directory temporanea e spostare tutti i file da
  usr/lib/ in <directory di installazione>/lib/, da usr/include/ in
  <directory di installazione>/include/ (ricordarsi prima di rimuovere
  il link include/g++!), ed infine da usr/bin/ in <directory di
  installazione>/bin/.


  7.2.  Installare libg++ per glibc configurata come primaria.


  Avendo installato glibc come libreria primaria e volendo mantenere la
  possibilit di compilare programmi con la vecchia versione di libc, 
  necessario spostare - prima della nuova installazione - tutti i file
  nella directory di libc. Probabilmente il modo pi semplice per farlo
   di installare una copia di libg++ compilata per libc5 come nella
  sezione precedente, e poi installare normalmente glibc.


  7.3.  Compilare programmi C++ con libc non primaria.


  Per compilare programmi C++ con una libreria non primaria libc, 
  necessario specificare la directory di include g++ che negli esempi
  precedenti  /usr/i486-linuxglibc2/include/g++ per l'installazione di
  glibc come libreria di test e /usr/i486-linuxlibc5/include/g++ per
  l'installazione di glibc come libreria primaria. Normalmente si
  raggiunge questo scopo impostando la variabile $CXXFLAGS:


        CXXFLAGS = -nostdinc -I/usr/i486-linuxglibc2/include -I/usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include -I/usr/i486-linuxlibc5/include/g++ -b i486-linuxglibc2






  8.  Segnalare bug.


  Se si pensa che la libreria contenga un errore, per prima cosa si
  consulti il file FAQ.  possibile che altri abbiano avuto lo stesso
  problema e che ci sia una soluzione facile. Inoltre  necessario
  controllare la sezione "Tools consigliati per l'installazione della
  libraria GNU C" nel file "INSTALL" dal momento che alcuni sono bug dei
  tool e non della libreria.

  Una volta scoperto un errore  necessario sincerarsi che sia veramente
  un errore. Un buon modo  confrontare il comportamento della GNU con
  altre librerie C. Se  lo stesso, probabilmente non si tratta di un
  bug (ma non  detto), altrimenti una delle librerie quasi certamente 
  errata.

  Passo successivo, consultare il database di bug presso: http://www-
  gnats.gnu.org:8080/cgi-bin/wwwgnats.pl <http://www-
  gnats.gnu.org:8080/cgi-bin/wwwgnats.pl>. Verificare che il problema
  non sia gi stato segnalato. Sarebbe anche il caso di controllare il
  file BUGS distribuito con libc per vedere l'elenco dei bug conosciuti.

  Scovato un errore di cui si  certi, si cerchi di restringerlo al caso
  di test pi compatto possibile. Nel caso di una libreria C, dovrebbe
  essere possibile restringerlo ad una sola chiamata di libreria. Il
  compito non dovrebbe essere troppo difficile.

  Il passo finale consiste nello scrivere un semplice caso di test per
  segnalare l'errore. Comunicando il problema, si spedisce il test, i
  risultati ottenuti, i risultati attesi, quale si ritiene essere il
  problema se si ha una qualche opinione), il tipo di sistema, la
  versione della libreria GNU C, il compilatore GNU CC, e la versione
  delle binutils GNU che si sta usando. Si aggiungano anche i file
  config.status e config.make che si ottengono eseguendo configure; si
  troveranno nella directory corrente al momento in cui si esegue
  configure.

  Tutte le segnalazioni devono essere mandate usando lo script glibcbug
  fornito con la GNU libc all'indirizzo  <bugs@gnu.org> (l'indirizzo pi
  vecchio  <bugs@gnu.ai.mit.edu>  ancora operativo), oppure comunicate
  con l'interfaccia web di GNATS <http://www-gnats.gnu.org:8080/cgi-
  bin/wwwgnats.pl>.

  Suggerimenti e domande possono essere indirizzati all'indirizzo <bugs-
  glibc@prep.ai.mit.edu>. Se non si legge il newsgroup gnu.bug.glibc, 
  possibile iscriversi alla lista chiedendo a <bug-glibc-
  request@prep.ai.mit.edu>.

  Per favore NON si comunichino bug all'indirizzo <bug-
  gcc@prep.ai.mit.edu>.  Questa lista  per segnalare problemi per GNU
  CC. GNU CC e GNU C lib sono entit separate gestite da persone
  diverse.



  9.  Esempio di file specs.


  Si include un esempio di file spec per glibc 2, usato da gcc per la
  compilazione ed il collegamento.  Dovrebbe essere presente nella
  directory /usr/lib/gcc-lib/<nuova directory sistema>/<versione gcc>.
  Se si sta usando un sistema x86, probabilmente  possibile copiare
  esattamente questa sezione nel file.









   *asm:
   %{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}

   *asm_final:
   %{pipe:-}

   *cpp:
   %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}

   *cc1:
   %{profile:-p}

   *cc1plus:


   *endfile:
   %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s

   *link:
   -m elf_i386 %{shared:-shared}   %{!shared:     %{!ibcs:       %{!static:   %{rdynamic:-export-dynamic}      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}}   %{static:-static}}}

   *lib:
   %{!shared: %{pthread:-lpthread}  %{profile:-lc_p} %{!profile: -lc}}

   *libgcc:
   -lgcc

   *startfile:
   %{!shared:      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s}                        %{!p:%{profile:gcrt1.o%s}                    %{!profile:crt1.o%s}}}}    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}

   *switches_need_spaces:


   *signed_char:
   %{funsigned-char:-D__CHAR_UNSIGNED__}

   *predefines:
   -D__ELF__ -Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)

   *cross_compile:
   0

   *multilib:
   . ;






  10.  Miscellanea.

  10.1.  Altre informazioni.





  10.1.1.  Pagine web.



    FSF's GNU C Library Home Page
     <http://www.gnu.org/software/libc/libc.html>


    Using GNU Libc 2 with Linux <http://www.imaxx.net/~thrytis/glibc/>

    Installing glibc-2 on Linux <http://huizen.dds.nl/~frodol/glibc/>.

    Debian libc5 to libc6 Mini-HOWTO
     <http://www.gate.net/~storm/FAQ/libc5-libc6-Mini-HOWTO.html>.


  10.1.2.  Newgroups.



    comp.os.linux.development.system

    comp.os.linux.development.apps

    linux.dev.kernel

    gnu.bugs.glibc


  10.1.3.  Mailing lists.



     Lista Linux di discussione Glibc 2
        Questa lista  intesa per le discussioni tra utenti Linux che
        hanno installato glibc 2, le nuove librerie GNU C. Argomenti
        riguardano problemi di compatibilit e questioni relative la
        compilazione del codice in ambiente Linux/glibc.  Per iscriversi
         necessario scrivere a Majordomo@ricardo.ecn.wfu.edu includendo
        come messaggio: "subscribe glibc-linux <your email address>".


  10.2.  Riconoscimenti


  La maggior parte di queste informazioni  stata presa da GNU Libc web
  page <http://www.gnu.org/software/libc/libc.html>, dall'annuncio della
  glibc 2 e relativi commenti di Ulrich Drepper's
  <drepper@gnu.ai.mit.edu>.  Andreas Jaeger <aj@arthur.rhein-neckar.de>
  ha fornito parte della sezione riguardo la segnalazione di bug.

  Le seguenti persone hanno fornito segnalazioni ed informazioni su
  questo documento:

    Allex <allex@ms2.accmail.com.tw>

    Mark Brown <M.A.Brown-4@sms.ed.ac.uk>

    Ulrich Drepper <drepper@gnu.ai.mit.edu>

    Scott K. Ellis <ellis@valueweb.net>

    Aron Griffis <agriffis@coat.com>

    Andreas Jaeger <aj@arthur.rhein-neckar.de>

    Frodo Looijaard <frodol@dds.nl>

    Ryan McGuire <rmcguire@freenet.columbus.oh.us>

    Shaya Potter <spotter@capaccess.org>

    Les Schaffer <godzilla@futuris.net>

    Andy Sewell <puck@pookhill.demon.co.uk>

    Gary Shea <shea@gtsdesign.com>

    Stephane <sr@adb.fr>

    Jan Vandenbos <jan@imaxx.net>

  Traduzioni di questo documento sono fatte da:

    Cinese: Allex <allex@ms2.accmail.com.tw>

    Francese:  Olivier Tharan <tharan@int-evry.fr>

    Italiano:  Andrea Girotto <andrea.girotto@usa.net>

    Japanese:  Kazuyuki Okamoto <ikko-@pacific.rim.or.jp>



  10.3.  Segnalazioni.


  A parte la scrittura di questo HOWTO, la manutenzione della pagina
  glibc 2 for Linux <http://www.imaxx.net/~thrytis/glibc> e l'uso sulla
  propria macchina, l'autore non ha nulla a che fare con il progetto
  glibc.  Ogni segnalazione, correzione o proposta sar ben accetta,
  scrivendo a ejg3@cornell.edu <mailto:ejg3@cornell.edu>.


  10.4.  Copyright.

  Copyright (c) 1997 Eric Green.  Questo documento pu essere
  distribuito esclusivamente nei termini posti dalla licenza LDP.
































  Linux HAM-HOWTO, Amateur Radio.
  Terry Dawson, VK2KTJ, terry@perf.no.itg.telstra.com.au
  v2.3, 1 Aprile 1997

  Spero  che  questo documento possa aiutare i radioamatori a trovare e
  testare  i vari programmi che sono  stati scritti o tradotti per
  Linux. Si  spera anche che rendendo disponibili queste informazioni,
  un numero maggiore  di  operatori  scelga  Linux  come  piattaforma
  per  le loro sperimentazioni,  e  che  gli  sviluppatori  di  software
  usino questo sistema operativo per i loro programmi, rendendo ancora
  piu' importante il ruolo di Linux tra i radioamatori.

  1.  Introduzione.

  La realizzazione di questo documento e' stata motivata dai  commenti
  espressi nei vari gruppi di  discussione  su Linux a proposito  del
  numero dei radioamatori che utilizzavano  questo  sistema  operativo.
  E' ormai chiaro che Linux sta diventando una piattaforma piuttosto
  comune per lo sviluppo di applicazioni radioamatoriali.

  Questo documento originariamente era chiamato RADIOLINUX ma, essendo
  stato incluso nella collezione di HOWTO del Linux Documentation
  Project, e' stata rinominato HAM-HOWTO.

  Traduzione di Nico Alberti albertin@usa.net
  IZ4APS@IK4MGV.PR.IEMR.ITA.EU


  1.1.  Modifiche rispetto alla precedente versione


  Aggiunte:
          Specificata la data di ultimo aggiornamento per ogni inserimento.
          bpf - programma per il calcolo di filtri
          BayBox - BBS Packet
          digiinfo - digipeater information database
          Contest logging program
          Chirp contest logger
          bip
          pileup
          twclock
          DX Cluster watcher
          F6FBB BBS

  Correzioni/Aggiornamenti:
          Tutte le url ftp puntano ora alle directory invece che ai file
          CLX e praticamente tutto il resto.
          Aggiornato l'indirizzo del mirror di John Gotts.

  Da fare:
          trovare un modo di automatizzare la presentazione di queste informazioni.




  2.  Dove trovare le nuove versioni di questo documento (in inglese).

  Il Linux Documentation Project gestisce un server web nel quale questo
  documento vi appare come The HAM-HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html>.

  Dennis Boylan N4ZMZ dennis@nanovx.atl.ga.us lo rende disponibili in
  questi tre siti:

  www.com <http://www.com/linux/radio/index.html>, www.hboc.com
  <http://www.hboc.com/linux/index.html> and www.lan.com
  <http://www.lan.com/linux/index.html>.

  John Gotts N8QDW jgotts@engin.umich.edu lo rende disponibile a: www-
  personal.engin.umich.edu <http://www-
  personal.engin.umich.edu/~jgotts/linux/HOWTO/HAM/HAM-HOWTO.html>.

  Dan Todd dantodd@fusilli.ucdavis.edu lo distribuisce in questi tre
  siti:

  wheel.dcn.davis.ca <http://wheel.dcn.davis.ca/~dantodd/Linux/HAM-
  HOWTO.html>, e fusilli.ucdavis.edu
  <http://fusilli.ucdavis.edu/Linux/HAM-HOWTO.html>.

  Alan Hargreaves VK2KVF alan@dap.CSIRO.AU lo rende disponibile in
  Australia a: www.dap.csiro.au <http://www.dap.csiro.au/RadioLinux>.

  Il Radio Club di Tubingen ce l'ha nella sua DARC Home Page
  <http://www.neckar-alb.de/darc/welcome.html>

  Vi prego di farmi sapere se siete intenzionati a renderla disponibile
  da qualche altra parte. Mi piacerebbe che fosse anche su qualche
  server web accessibile via radio.


  3.  Software per satelliti.

  I seguenti programmi sono usati nella sperimentazione nel campo della

  comunicazione via satellite.


  3.1.  Software per stazioni di terra MicroSat


     Autore
        John Melton, G0ORX/N6LYT, g0orx@amsat.org e Jonathan Naylor
        G4KLX, g4klx@amsat.org

     Descrizione
        Programma per l'uso dei satelliti MicroSat.

     Stato
        BETA. E' stata rilasciata la versione 0.91

     Ultimo aggiornamento
        01 Apr 97

     Sistema richiesto
        Kernel con supporto del protocollo AX.25 versione 1.1.12 o
        successiva di Alan Cox. Il programma usa gli Athena Widgets ed
        ha un aspetto molto migliore con le librerie 3D.

     Dettagli
        Questo pacchetto permette l'uso di un TNC in modo KISS per
        comunicare direttamente con i satelliti della serie Microsat.
        Fornisce un interfaccia X-Windows basata sugli Athena Widgets, e
        permette un'ampia interazione col satellite. Il programma
        dovrebbe lavorare con ogni gestore di ambiente a finestre.

        Vengono forniti i seguenti programmi:

        xpb:
           visualizzatore delle trasmissioni captate

        xpg:
           programma di upload di file ftl0 e di messaggi
        xtlm:
           programma di visualizzazione della telemetria

        downloaded:
           visualizzatore della lista di file scaricati

        directory:
           visualizzatore della lista della directory

        message:
           applicazione per la preparazione dei messaggi

        viewtext:
           visualizzatore di file ASCII non compressi

        viewlog:
           mostra il contenuto di alcuni file di log

        xweber:
           programma speciale per scaricare le immagini da webersat

        phs:
           programma d'uso generico per eliminare l'header PACSAT


     Dove reperirlo.
        Il software di John e' disponibile presso: ftp.cs.nott.ac.uk
        <ftp://ftp.cs.nott.ac.uk/jsn/>  oppure ftp.amsat.org
        <ftp://ftp.amsat.org/amsat/software/Linux/> oppure ftp.funet.fi
        <ftp://ftp.funet.fi/pub/ham/satellite/pacsat/>. Alla data di
        redazione, la versione aggiornata e' microsat-0.91.tar.gz.
        Controllate l'eventuale presenza di versioni aggiornate.

     Licenza/Copyright
        GNU Public License. Liberamente ridistribuibile, nessuna
        garanzia.

     Contributo a cura di:
        John Melton, G0ORX/N6LYT, Alan Cox, GW4PTS, Jonathon Naylor,
        G4KLX


  3.2.  SatTrack - Programma per il tracking dei satelliti


     Name
        SatTrack

     Autore
        " Manfred Bester, DL5KR, manfred@ssl.berkeley.edu, (510)
        849-9922

     Descrizione
        Programma di tracking in tempo reale e di predizione delle
        orbite con grafica a colori X11.

     Stato
        La 4.0 e' una versione commerciale. La 3.1.5 e' l'ultima release
        disponibile gratuitamente.

     Ultimo aggiornamento.
        01 Apr 97

     Sistema richiesto
        Un terminale vt100 e/o un server X11. Un coprocessore matematico
        e' utile ma non essenziale per ottenere buone prestazioni.
     Dettagli
        SatTrack e' un programma di tracking satellitare che e' stato
        scritto in C su una workstation UNIX. Permette di avere due
        schermate aggiornate in tempo reale per uno o piu' satelliti e
        due differenti metodi di predizione orbitale. I controlli col
        cursore usati in entrambe le schermate sono compatibili con lo
        standard VT100, che permette al programma di funzionare da
        qualunque terminale. Una finestra grafica opzionale X Window
        mostra la visualizzazione della posizione dei satelliti con il
        tipico mappamondo. La predizione dell'orbita dei satelliti puo'
        essere eseguita interattivamente o in modo batch. In
        quest'ultimo caso tutti i parametri sono specificati da linea di
        comando. Il programma usa direttamente i dati per gli elementi
        kepleriani nel formato two-line NORAD/NASA (TLE).

        La versione attuale di SatTrack puo' fornire la posizione di un
        singolo satellite e/o visualizzare piu' satelliti per una
        singola stazione di terra. Puo' anche controllare appositi
        dispositivi della stazione di terra come antenne e apparecchi
        radio, e ha una modalita' di autotrack grazie alla quale puo'
        passare automaticamente al tracciamento di piu' satelliti
        specificati. Per la calibrazione, e' fornito anche il
        tracciamento del sole e della luna. Le release future
        comprenderanno nuove opzioni. SatTrack richiede circa 5 Mb di
        spazio su disco per la distribuzione completa con otto diverse
        mappe mondiali (2 stili, con 4 differenti dimensioni ciascuna,
        per adattarsi agli schermi e ai gusti di tutti) e meno di 1.5 Mb
        di memoria per funzionare. Maggiori informazioni possono essere
        ottenute alla SatTrack WWW Home Page
        <http://www.primenet.com/~bester/sattrack.html>.


      Dove e come averlo.
        La versione commerciale di SatTrack si trova alla: SatTrack WWW
        Home Page <http://www.primenet.com/~bester/sattrack.html>.

        La versione gratuita di SatTrack si trova presso: ftp.jvnc.net
        <ftp://ftp.jvnc.net/priv/kupiec/sattrack/> o su ftp.amsat.org
        <ftp://ftp.amsat.org/amsat/software/Linux/>.


     Licenza/Copyright
        Il software e' Copyright di Manfred Bester. Puo' essere usato
        senza particolari permessi per uso non commerciale e non-profit.
        Per applicazioni commerciali e' richiesta una licenza
        dall'autore. La 4.0 e' una versione commerciale completamente
        supportata.

     Contributo a cura di:
        Manfred Bester, DL5KR


  3.3.  Predict


     Autore
        John A. Magliacane, KD2BD, kd2bd@amsat.org

     Descrizione
        Un programma di tracking satellitare che permette di stabilire,
        attraverso il tracciamento della posizione del sole, i passaggi
        visibili dei satelliti.

        Completo e funzionante.


     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Predict e' un programma screen-oriented che usa le librerie
        ncurses-1.8.5 (o successive). Un terminale a colori e'
        consigliato ma non e' necessario.

     Dettagli
        Predict include il calcolo dell'azimut e dell'elevazione dei
        passaggi orbitali, fase orbitale, proiezione della posizione del
        satellita sulla superficie, inclinazione, numero dell'orbita e
        illuminazione del sole sulla base della data e dell'ora. Il
        programma e' semplice, veloce e facile da usare. Predict
        mantiene un  database per le orbite di 21 satelliti, che puo'
        essere aggiornato da tastiera o tramite file contenente i dati
        orbitali in formato NASA 2-line. Dato che questo programma opera
        in un ambiente multiuser, ogni utente mantiene il proprio
        database orbitale.

        Questo programma e' stato compilato usando il massimo valore di
        ottimizzazione per la massima velocita' di esecuzione ed e' in
        formato a.out per garantire la massima compatibilta'.

        Per installare fate in questo modo:


          # cd /
          # tar xvfz predict.tgz




     Dove reperirlo.
        Si puo' scaricare predict.tgz da: amsat.org
        <ftp://amsat.org/amsat/software/Linux/>

     Licenza/Copyright
        Questo programma e' fornito gratuitamente per uso non
        commerciale.

     Contributo a cura di
        John A. Magliacane, KD2BD


  3.4.  UO11


     Autore
        John A. Magliacane, KD2BD, kd2bd@amsat.org

     Descrizione
        Un semplice programma per decodificare la telemetria di UoSAT-
        OSCAR-11.

     Status
        Completo e funzionante.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        Un demodulatore FSK a 1200 baud per UoSAT-OSCAR-11 (tipo
        Bell-202), un ricevitore VHF-FM sintonizzabile a 145.825 MHz,
        una piccola antenna yagi, e un semplice programma di terminale
        che salvi i dati della telemetria a 1200 baud su un file di
        testo.

     Dettagli
        uo11 decodifica i dati telemetrici catturati dal programma di
        terminale, fa un controllo degli errori e applica una
        calibrazione dei dati ricevuti, in modo da generare un report di
        facile comprensione ed analisi. uo11 viene fornito gia'
        compilato (in formato a.out) e con associate le proprie pagine
        man.

        Per instllarlo occorre fare:


          # cd /
          # tar xvfz uo11.tgz




     Dove reperirlo.
        Si puo' scaricare uo11.tgz da: amsat.org
        <ftp://amsat.org/amsat/software/Linux/>

     Licenza/Copyright
        Questo programma e' fornito gratuitamente per uso non
        commerciale.

     Contributo a cura di
        John A. Magliacane, KD2BD


  3.5.  Dove


     Autore
        John A. Magliacane, KD2BD, kd2bd@amsat.org

     Descrizione
        Un semplice programma per decodificare la telemetria di DOVE-
        OSCAR-17.

     Stato
        Completo e funzionante.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        Un TNC (terminal node controller), un ricevitore VHF-FM
        sintonizzabile a 145.825 MHz, una piccola antenna yagi, e un
        semplice programma di terminale che salvi i dati della
        telemetria a 1200 baud su un file di testo.

     Dettagli
        dove decodifica i dati telemetrici catturati dal programma di
        terminale e applica una calibrazione dei dati ricevuti, in modo
        da generare un report di facile comprensione ed analisi. dove
        viene fornito gia' compilato (in formato a.out) e con associate
        le proprie pagine man.

        Per instllarlo occorre fare:


          # cd /
          # tar xvfz dove.tgz

     Dove reperirlo.
        Si puo' scaricare dove.tgz da: amsat.org
        <ftp://amsat.org/amsat/software/Linux/>

     Licenza/Copyright
        Questo programma e' fornito gratuitamente per uso non
        commerciale.

     Contributo a cura di
        John A. Magliacane, KD2BD


  3.6.  Kepgen


     Autore
        John A. Magliacane, KD2BD, kd2bd@amsat.org

     Descrizione
        Una semplice ma comoda utility che genera dei file informato
        NASA 2-line da dati kepleriani inseriti da tastiera.

     Stato
        Completo.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        kepgen e' un programma screen-oriented che usa le librerie
        ncurses-1.8.5 (o successive). Uno schermo a colori non e'
        indispensabile, anche se utile.

     Dettagli
        kepgen permette all'utente di creare dati kepleriani completi di
        checksum in formato NASA 2-line inserendo i dati orbitali da
        tastiera. kepgen e' nato dal bisogno di generare dati in formato
        2-line dai dati orbitali forniti dalle trasmissioni di WA3NAN
        durante le missioni Space Shuttle. I file cosi' generati possono
        essere letti praticamente da ogni programma di tracking
        satellitare. kepgen viene fornito gia' compilato (in formato
        a.out) e con associate le proprie pagine man.

        Per instllarlo occorre fare:


          # cd /
          # tar xvfz kepgen.tgz




     Dove reperirlo.
        Si puo' scaricare kepgen.tgz da: amsat.org
        <ftp://amsat.org/amsat/software/Linux/>

     Licenza/Copyright
        Questo programma e' fornito gratuitamente per uso non
        commerciale.

     Contributo a cura di
        John A. Magliacane, KD2BD




  4.  Software per l'automazione dello shack.

  Programmi per semplificare i lavori nello shack. Per esempio programmi
  per il controllo dei nuovi modelli di radio, programmi di log,
  database per le QSL, o per la rotazione dell'antenna.


  4.1.  FT-890 remote control


     Autore
        Emarit Ranu, KG0CQ, drranu@holly.ColoState.EDU

     Descrizione
        Un semplice programma per il controllo da Linux dello Yaesu
        FT-890 attraverso la sua porta CAT from linux.

     Stato
        Funzionante

     Ultimo aggiornamento.
        01 Apr 97

     Richieste di sistema
        Uno Yaesu FT-890, l'interfaccia FIF-232C o un suo equivalente
        autocostruito (Feb 1993 "QST", pagina 37). Linux, cavo seriale.

     Dettagli
        Il programma viene lanciato spegificando la porta seriale da
        usare. Una volta lanciato, il programma e' gestito da menu. Le
        versioni future supporteranno un'interfaccia X-Windows.

     Dove reperirlo.
        Attualmente il programma e' disponibile solamente dall'autore
        via email.

     Licenza/Copyright.
        Si possono fare una marea di copie; le uniche restrizioni sono
        che:

       Non si puo' far pagare nessuno per il programma.

       Non si possono distribuire copie modificate del programma.

       Si deve distribuire il file tar originale ricevuto dall'autore,
        compreso il file README.

     Contributo a cura di
        Emarit Ranu, KG0CQ


  5.  Packet Radio

  Programmi per fare packet radio ed utility associate.


  5.1.  F6FBB Packet BBS


     Autore
        Jean-Paul Roubelat, F6FBB, jpr@f6fbb.org

     Descrizione
        Completa BBS packet con interfaccia X11


     Stato
        La versione 7.00b45 e' una beta.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Kernel con supporto di rete AX.25/NetRom/Rose. Window system X11
        per la versione X11

     Dettagli
        Questo e' il porting su Linux del noto F6FBB PBBS. Questo
        programma supporta connessioni da AX.25, NetRom, Rose e TCP/IP e
        offre tutte le caratteristiche che ci si aspetta dal programma.
        L'interfaccia X11 fornisce un gradevole ambiente di lavoro per
        il sysop.

        C'e' una mailing list per F6FBB. Per iscriversi mandare un
        messaggio a majordomo@f6fbb.org con la linea `subscribe xfbb'
        nel body del messaggio. La mailing list ha i suoi archivi a
        zone.pspt.fi <http://zone.pspt.fi/archive/fbb/>.

     Dove reperirlo.
        Si puo' scaricare F6FBB dal suo home site presso: F6FBB Home
        Page <http://www.f6fbb.org/>.

     Licenza/Copyright.
        F6FBB e' gratuito per uso non commerciale.


  5.2.  DX Cluster Watcher


     Autore
        Pierluigi Guerzoni, IZ4AKO, iz4ako@ing49.unife.it

     Descrizione
        Mostra le info DX ascoltando in modo passivo le trasmissioni di
        un DX cluster.

     Statuo
        Versione 4, stabile.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Richiede un kernel col supporto del protocollo AX.25.

     Dettagli
        Il prorgamma DX cluster watcher resta in ascolto del traffico
        sulla frequenza di un DX cluster catturando le info DX senza
        peraltro doversi connettere effettivamente al nodo.

     Dove reperirlo.
        DX Cluster Watcher puo' essere scaricato dalla DX Cluster
        Watcher Home Page
        <http://ing49.unife.it/~iz4ako/project_inglese.html>.

     Licenza/Copyright.
        GNU GPL

     Contributo a cura di
        Pierluigi Guerzoni, IZ4AKO, iz4ako@ing49.unife.it


  5.3.  Digiinfo


     Autore
        Porting a cura di Mario Lorenz, DL5MLO, dl5mlo@vdazone.org

     Descrizione
        Un archivio di informazioni sulla rete packet radio.

     Stato
        La versione 2.5.1 e' stabile.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Nessuna in particolare.

     Dettagli
        digiinfo era un programa scritto inizalmente scritto per l'
        Atari da Karsten DC7OS. Digiinfo e'  un database che mostra
        informazioni sulla rete packet radio.

     Dove reperirlo
        digiinfo e il database allegato possono essere scaricati dal suo
        home site a: www.vdazone.org
        <http://www.vdazone.org/~dl5mlo/digiinfo/>.

     Licenza/Copyright
        ALAS, Amateur only license

     Contributo a cura di
        Mario Lorenz, DL5MLO, dl5mlo@vdazone.org


  5.4.  BayBox BBS


     Autore
        Flori Radlherr, DL8MBT, flori@t-online.de

     Descrizione
        Un BBS per Linux.

     Stato
        Versione 1.38, stabile.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Si raccomanda almento un 80486/33Mhz con 8MB di RAM

     Dettagli
        Sfortunatamente la documentazione e' in tedesco ed io non riesco
        a capirla molto bene. Il programma da' comunque l'impressione di
        essere un BBS che supporta le solite cose, tipo il forwarding,
        anche se le documentazione sembra invece suggerire che la
        versione per Linux supporti solo accesso via telnet. Questo non
        e' comunque una grossa limitazione, poiche' si puo' facilmente
        configurare una sessione di ax25d in modo che accetti
        connessioni AX.25/NetRom/Rose e che si agganci al BBS via
        telnet.

        Una migliore documentazione sarebbe vivamente apprezzata.

     Dove reperirlo
        Puoi scaricare BayBOX dal suo sito a: members.aol.com
        <http://members.aol.com/baybox/>

     Licenza/Copyright.
        Il software BayCom-Mailbox puo'essere liberamente usato e
        copiato solo in ambito radioamatoriale, ogni uso al di fuori di
        esso e' espressamente proibito. In ogni caso, il programma e'
        fornito "as is" ed e' privo di garanzie implicite od esplicite
        di corretto funzionamento.

     Contributo a cura di
        Iztok Saje, S52D, s52d@s55tcp.ampr.org


  5.5.  JNET


     Autore
        Takeshi Shoji, JF2CEX, taka@myk.ilc.or.jp

     Descrizione
        Una versione avanzata per Linux ed altre piattaforme del NOS di
        KA9Q.

     Stato
        E' stata rilasciata la versione stabile 961210.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        Nessuna in particolare, richiede un TNC KISS.

     Dettagli
        Questa e' un'altra versione attivamente supportata del NOS di
        KA9Q che e' stata portata su un gran numero di piattaforme ed
        offre alcuni miglioramenti che non sono presenti in altri
        derivati di NOS.

     Dove reperirlo.
        Si puo' scaricare la piu' recente versione di JNET dal suo home
        site a: www.myk.ilc.or.jp
        <http://www.myk.ilc.or.jp/~taka/software.html#jnetcex>.

     Licenza/Copyright.
        Non ne sono molto sicuro, ma penso che, come derivato di NOS,
        sia liberamente usabile dai radioamatori.

     Contributo a cura di
        Isao SEKI, http://www.prug.or.jp/people/jm1wbb


  5.6.  XNet


     Autore
        Richard R. Parry, W9IF, rparry@qualcomm.com

     Descrizione
        Analizzatore di traffico per reti AX.25.

     Stato
        Stabile, e' gia' stato rilasciato.


     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        TCL-7.5/Tk-4.1, TNC KISS.

     Dettagli
        Il pacchetto XNet fornisce una gran quantita' di strumenti che
        un controllore puo' usare per gestire ed analizzare il traffico
        AX.25. E' possibile visualizzare in modo grafico tutto il
        traffico ricevuto dal nodo monitor, in modo che l'osservatore
        possa controllare che non ci siano problemi. Sono disponibili
        inoltre altre informazioni come:

       Conteggio di pacchetti.

       Statistiche di nodo.

       Utilizzazione della rete.

        La rete e' raffigurata con le icone degli host e le linee di
        traffico tra essi. La rappresentazione grafica permette di
        sendersi immediatamente conto delle condizioni del traffico in
        quel momento.  Richard fornisce maggiori informazioni, nonche'
        degli esempi a: www.qualcomm.com
        <http://www.qualcomm.com/~rparry/xnet.html>.

     Dove reperirlo.
        Si puo' scaricare il programma da: www.qualcomm.com
        <http://www.qualcomm.com/~rparry/xnet/xnet-1.1.tar>

     Licenza/Copyright.
        XNET e' freeware. Puo' quindi essere liberamente distribuito.

     Contributo a cura di
        Richard Parry, W9IF


  5.7.  monax25


     Autore
        Skip Hansen, WB6YMH e Harold Price, NK6K.

     Mantenuto da
        Jonathon Naylor, jsn@cs.nott.ac.uk

     Descrizione
        monax25 offre diverse utility per raccogliere statistche
        sull'uso del canale AX.25

     Stato
        Versione 1.11, Stabile

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        KISS TNC.

     Detail
        Le utility di ax25mon sono state scritte originariamente per
        MSDOS. Questo pacchetto rappresenta la loro traduzione per
        Linux.


     Dove reperirlo.
        Il pacchetto `monax25' puo' essere scaricato dalla:
        sunsite.unc.edu ham applications directory
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>.

     Licenza/Copyright.
        Liberamente copiabile, anche se non sotto la licenza GPL.


  5.8.  splitscreen


     Autore
        Dave Brown, N2RJT, dcb@vectorbd.com

     Descrizione
        Programma tipo `ttylink' che permette di dividere lo schermo,
        fare lo scroll all'indietro e di effettuare log su file.

     Stato
        Versione 1.4.1, stabile.

     Ultimo aggiornamento
        01 Apr 97

     Richeste di sistema
        Richiede le librerie `ncurses'.

     Dettagli.
        splitscreen e' una implementazione unix del comando NOS ttylink.
        Permette di avere uno schermo diviso in due in modo da
        permettere all'utente di chattare piu' comodamente che con la
        solita interfaccia telnet. La possibilita' di scrollare
        all'indietro e di fare il log su file sono caratteristiche utili
        quando si usa splitscreen per accedere a servizi come convers.

     Dove reperirlo.
        `splitscreen' e' disponibile presso: sunsite.unc.edu ham
        applications directory
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>

     Licenza/Copyright.
        Publico Dominio


  5.9.  talk-ax25


     Autore
        Dave Brown, N2RJT, dcb@vectorbd.com

     Descrizione
        Berkeley `talk' client modificato per supportare Linux AX.25

     Stato
        Versione 960426, funzionante.

     Richieste di sistema
        Richiede le librerie `ncurses'.

     Dettagli.
        Il ptrogramma talk-ax25 e' una versione modificata del
        tradizionale programma 'talk' di Berkeley per l'uso con il
        protocollo AX.25 di Linux.


     Dove reperirlo.
        Il programma talk-ax25 e' disponibile presso: sunsite.unc.edu
        ham applications directory
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/> o presso:
        ftp.ucsd.edu <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/linux/>


     Licenza/Copyright.
        Come tutti i programmi di Berkeley e' liberamente distribuibile;
        i messaggi di copyright devono essere mantenuti.


  5.10.  7Plus per Linux


     Autore
        Axel Bauda, DG1BBQ, DG1BBQ@DB0CL.#HB.DEU.EU

     Descrizione
        Codificatore di file tipo Uuencode per la trasmissione di file
        finari da e verso le BBS.

     Richieste di sistema.
        Nessuna in particolare.

     Dettagli
        Questo programma permettere di codificare in 7plus i file binari
        in modo da poterli trasmettere all'interno di messaggi AX.25.

     Dove reperirlo.
        Il pacchetto `7pl217sr' e' disponibile presso: sunsite.unc.edu
        ham applications directory
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>.

     Licenza/Copyright.
        Hamware - Gratuito per uso radioamatoriale.


  5.11.  TNOS


     Autore
        Brian A. Lantz, brian@lantz.com

     Descrizione
        TNOS e' un derivato di NOS attivamente supportato, disponibile
        per DOS e Linux. Presenta parecchi miglioramenti che non sono
        presenti in altre versioni di NOS.

     Status
        Versione 2.21. Stabile.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        Un TNC kiss e il supporto slip a livello di kernel se si vuole
        sfruttare le potenzialita' di networking di Linux con TNOS.

     Dettagli
        Brian gestisce un web server contenente informazioni aggiornate
        su NOS presso: www.lantz.com
        <http://www.lantz.com/tnos/tnos.html>.

     Dove reperirlo.
        L'ultima versione di TNOS e' sempre disponibile presso:
        ftp.lantz.com <ftp://ftp.lantz.com/tnos/current/unix/>,
        sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>, o
        ftp.ucsd.edu <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/tnos/>.

     Licenza/Copyright.
        Gratuito per scopi educativi e per radioamatori.


  5.12.  N0ARY BBS Packet perr UN*X


     Autore
        Bob Arasmith, N0ARY, port su Linux (ed altre piattaforme) di Bob
        Proulx, KF0UW, rwp@fc.hp.com

     Descrizione
        Una BBS packet implementata sotto  UN*X

     Stato
        ALFA. Bob ha approntato la versione ARY-0.9 sia su Linux che su
        HP-UX. La versione successiva di N0ARY, la 4.0, e' stata
        rilasciata come versione alfa per test e sviluppo. Bob non e'
        stato ancora in grado di mettera on line e sta ancora usando la
        0.9 con le modifiche di KF0UW. Bob sta cercando di far
        interagire il programma col kernel AX.25 considerando questa la
        combinazione migliore.

     Ultimo aggiornamento.
        01 Apr 97

     Richieste di sistema.
        Installazione Linux, compilatore C, piu' radio e TNC.

     Dettagli
        Questa bbs ha un'interfaccia packet eccellente. Ha un set di
        comandi compatibile con la bbs RLI, in modo che gli utenti siano
        immediatamente in grado di usarla. Estende poi il set dei
        comandi con un'interfaccia basata su uno stile di linguaggio
        naturale (ad esempio "list at allus about KPC-3"). Sono
        supportati molti comandi simili a quelli della csh. Inoltre
        e'inclusa un'interfaccia per permettere un gateway tra packet e
        internet.

        Attualmente occorre modificare opportunamente il codice sorgente
        per la propria installazione, quindi e' richiesta un po' di
        abilita' nell'uso del linguaggio C.


     Dove reperirlo.
        Per una versione per Linux o per informazioni su questa versione
        mandare una mail a rwp@fc.hp.com. Per una versione per SunOS
        contattare bob@arasmith.com.  Questo programma non e'ancora
        pronto per una fase di distribuzione vera e propria, poiche' non
        ha ancora duperato la fase di sviluppo alfa.

        Una versione di questo programma e' disponibile presso:
        ftp.funet.fi <ftp://ftp.funet.fi/pub/ham/unix/packet/n0ary/>


     Licenza/Copyright.
        Copyright by Bob Arasmith, N0ARY, ma liberamente
        ridistribuibile.

     Contributo a cura di:
        Bob Proulx, KF0UW

  5.13.  LBBS - Linux BBS message gateway


     Autore
        Daryl L Miles, G7LED, dlm@frink.demon.co.uk

     Descrizione
        Un pacchetto per BBS progettato per lavorare sia col supporto
        nativo del AX.25 del kernel sia con Wampes.

     Statuo
        In fase di sviluppo ma funzionante.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Kernel con supporto AX.25 o il pacchetto Wampes package.
        sendmail, CNEWS.

     Dettagli
        Lo scopo di Daryl e' quello di sviluppare una piattaforma sulla
        quale i radioamatori possano creare un gateway tra la posta di
        un bbs packet e i servizi di email smtp di Linux. Non sono a
        conoscenza dell'esatto stato dei lavori, visto che la piu'
        recente versione che sia riuscito a trovare e' datata 30 giugno
        95. L'ultima versione supporta:

       MBL, FBB batching, FBB compresso, FBB compresso di tipo 1,
        forwarding con capacita' di restart, deferring e reject.

       Diversi meccanismi di trasporto di Linux, quali TCP, AX.25 a
        livello di kernel, nonche' Wampes, NetROM, AX25 e TCP.

       Un dialer per consentire connessioni attraverso nodi AX.25 o
        NetROM.

       White Pages

       Transient handling di tipo  A (messaggi ACK).

       Passaggio SMTP/NNTP<>BBS sfruttato pesantemente in modo che il
        front end dell'utente acceda direttamente allo spool NetNews per
        scaricare i post.

       Meccanismi di filtraggio dei messaggi.

       Swapping dei campi (come SWAP.SYS in FBB)

       Multiuser/connect.

        Per installarlo ho fatto:


          # cd /usr/src
          # mkdir LBBS
          # tar xvfz LBBS-0.1.6A.tar.gz
          # cd LBBS
          # ./Install.sh




     In questo modo viene creata la directory /usr/lbbs. Il file
     README.Setup suggerisce l'ordine con cui dev'essere configurata la
     BBS
     Dove reperirlo.
        Il pacchetto `LBBS' puo' essere prelevato da: ftp.ucsd.edu
        <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/linux/>.

     Licenza/Copyright.
        Liberamaente distribuibile solo per uso radioamatoriale non
        commerciale. Nessuna garanzia. Quando il software sara' stabile
        verra' adottata la licenza GPL.


  5.14.  Convertitore di messaggi da MBL/RLI a NNTP e email.


     Autore
        SM0OHI, pme@it.kth.se

     Descrizione
        Programma che convertira' i messaggi entranti dal formato
        MBL/RLI a quello NNTP o RFC-822.


     Stato
        In fase di sviluppo, non ancora rilasciato.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Sconosciute.

     Dettagli
        Questo programma dovrebbe essere idealmente concepito per coloro
        che vogliono realizzare un gateway di mail e news tra le reti
        tcp/ip convenzionali e la rete radioamatoriale.

     Dove reperirlo.
        Non ancora disponibile.

     Licenza/Copyright
        Sconosciuti.

     Contributo a cura di:
        SM0OHI


  5.15.  CLX. Programma per DX Cluster.


     Autore
        Franta Bendl, DJ0ZY, e Bernhard ("Ben") Buettner, DL6RAI,
        root@dl6rai.muc.de

     Descrizione
        Un sistema PacketCluster funzionante sotto Linux.

     Stato
        La versione attuale e' la 2.07

     Ultimo aggiornamento.
        01 Apr 97

     Richieste di sistema.
        Linux Kernel versione 2.0 o superiore, TCP/IP, SysV IPC.
        Richiede anche Perl e opzionalmente Expect.


     Dettagli.
        I nodi Packet Cluster sono in attivita' da circa sette anni. Il
        programma originale e' stato scritto da Dick Newell, AK1A, e
        funziona sotto DOS. CLX e' un sistema che emula un nodo Packet
        Cluster. Dall'esterno i comandi per l'utente e le opzioni sono
        pressoche' identiche; inoltre i nodi Packet Cluster remoti, che
        possono essere messi in rete, non vedono differenze tra un
        generico nodo PCL e CLX. Quindi si inserisce bene in una rete di
        nodi Packet Cluster preesistenti.

        CLX non e' un'applicazione destinata al singolo utente, e' un
        programma per un nodo di rete. Per questo non e' molto utile per
        il singolo radioamatore. I SysOp dei nodi Packet Cluster con un
        po' di conoscenze di Linux e di PCL, troveranno interessante
        questa applicazione.

        Seguono alcune caratteristiche di CLX.

       E' completamente compatibile con il protocollo PCxx  e dal punto
        di vista dell' utente. Permette il multitasking e di operare con
        priorita' diverse.

       Il programma intercetta gli spot DX che rimbalzano tra i nodi,
        senza generare messaggi continui; CLX e' in grado di eliminare
        le informazioni doppie. E' stato implementata una tecnica che
        permette di connettersi alla rete in punti diversi, in un modo
        che sarebbe stato detto un "Cluster loop". CLX riconosce i
        cosiddetti nodi "attivi" e "passivi". Il risultato e' che sono
        visibili piu' informazioni DX da parte degli utilizzatori di
        CLX.

       Possiede un interfaccia per estendere CLX con programmi ed
        applicazioni esterne.

       Ha un'estesa connettivita' realizzata tramite l'uso di stringhe
        di connessione. CLX puo' stabilire e mantenere praticamente ogni
        tipo di connessione usando TCP/IP, UUCP o altri programmi di
        comunicazione.

       CLX usa tecniche di programmazione moderne come la memoria
        condivisa per i dati in comune, lex e yacc per implementare il
        linguaggio dei comandi, librerie condivise per avere degli
        eseguibili di piccole dimensioni, chiamate di procedura remote
        per comunicazioni tra diversi processi.  Il programma e'
        strettamente modulare, con i propri processi dedicati per ogni
        task importante.

       Comprende diversi moduli eseguiti come processi separati.

     Dove reperirlo.
        Lo si puo' scaricare da ftp.funet.fi
        <ftp://ftp.funet.fi/pub/ham/unix/Linux/cluster>

        Ci sono cinque file che costituiscono il package:


          00Index
          clx_206.tgz
          clx.txt
          README
          (per me qui ce ne sono quattro n.d.t.)





     Licenza/Copyright.
        CLX (c) by Franta Bendl (DJ0ZY) ed e' disponibile gratuitamente
        per uso non commerciale. Gli autori vogliono sapere chi usa il
        loro prodotto, quindi prima che si possa veramente usare il
        programma, occorre chiedere una stringa di nominativo criptata
        da mettere nel file di configurazione. Occorre mandare una mail
        a clx_us@dl6rai.muc.de per ottenerla.

     Contributo a cura di
        Bernhard ("Ben") Buettner, DL6RAI


  5.16.  Programma di BBS DPBOX e di terminale DPTNT.


     Autore
        Mark Wahl, DL4YBG, DL4YBG@DB0GR.#BLN.DEU.EU,
        wahlm@berlin.snafu.de e Joachim Schurig, DL8HBS,
        DL8HBS@DB0GR.#BLN.DEU.EU, h0187akk@rz.hu-berlin.de

     Descrizione
        Una suite di programmi di terminale e di BBS per Linux.

     Stato
        Stabile e funzionante.

     Ultimo aggiornamento.
        01 Apr 97

     Richieste di sistema.
        Un TNC funzionante in modo host WA8DED o in modo KISS.

     Dettagli
        TNT e' un programma di terminale host ricchissimo di funzioni.
        Per compilarlo su Linux basta scompattarlo e dare il comando
        'make'. Permette il funzionamento sia in modo terminale
        alfanumerico che con X11 ed e' fornito di un'esauriente
        documentazione che descrive le sue caratteristiche in dettaglio.
        Le sue principali caratteristiche sono:

        Sessioni multiple:
           TNT supporta connessioni packet multiple su terminali
           virtuali tra i quali si puo' passare. Ogni sessione offre uno
           schermo diviso in modo da separare il testo trasmesso da
           quello ricevuto nonche' una linea di stato. I comandi possono
           essere impartiti sia dalla sessione di comando che da quelle
           di terminale usando una particolare sequenza di tasti. Ogni
           terminale virtuale puo' essere piu' grande dello schermo
           fisico.

        Cattura dei dati, trasferimento file e log
           Sono fornite diverse opzioni per salvare su disco i dati
           ricevuti. E' possibile salvare tutto o solamente cio' che e'
           stato trasmesso o ricevuto su un nuovo file o accodando i
           dati in un file esistente. E' possibile usare il protocollo
           'autobin' per trasmenttere o ricevere file binari

        Shell per accesso remoto
           E' possibile dotare di una shell gli utenti remoti in modo
           che possano accedere ai file o ai programmi sul proprio
           computer. Si puo' anche eseguire un programma e redirigere
           l'input/output su un canale in modo che gli utenti lo possano
           usare.

        Redirezione di dispositivi su un canale
           TNT permette di redirigere i dati da un canale ad un
           dispositivo come, ad esempio, un modem.

        Conversione dell'umlaut
           TNT, se necessario, converte l'umlaut.

        Remote mode
           Gli utenti remoti, se autorizzati, possono eseguire comandi
           sulla macchina locale.

        Socket mode
           Si puo' configurare TNT in modo che apra un socket su telnet
           in modo che gli utenti remoti possano lavorare come se
           fossero alla console della macchina. Questa modalita' e'
           anche utile se la macchina Linux risiede su una Ethernet e si
           vuole che gli altri terminali sulla rete usino la sua radio.

        Le nuove versioni supporteranno direttamente il kernel AX.25.

        DPBOX e' una BBS dalle interessanti caratteristiche, quali:

       Protocolli di forward F6FBB, W0RLI, TheBox.

       Gestione 8-bit trasparente dei messaggi con l'uso del protocollo
        AutoBIN.

       Dati del BBS compressi per risparmiare spazio su disco,
        forwarding e downloading.

       "Modo cattura" del traffico sulla frequenza del BBS.

       Trasmissione e ricezione di bollettini di tipo PACSAT.

       FIno a 200 utenti simultanei.


     Dove reperirlo.
        Il pacchetto `dptnt' puo' essere scaricato da: ftp.funet.fi
        <ftp://ftp.funet.fi/pub/ham/unix/packet/dptnt/>, o ftp.tapr.org
        <ftp://ftp.tapr.org/pub/tapr/software_lib/Linux/>, o
        ftp.ucsd.edu
        <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming/>.

        Le home page degli autori sono: DL4YBG
        <http://www.snafu.de/~wahlm/> and DL8HBS <http://hppool0.rz.hu-
        berlin.de/~h0187akk/>

     Licenza/Copyright
        TNT e DPBOXT sono coperti dalla licenza GNU. Il programma TFKISS
        e' coperto dalla licenza ALAS (una licenza tedesca per uso
        amatoriale), e DPBOX e' liberamente distribuibile per uso
        radiantistico.


  5.17.  IPIP encapsulation daemon.


     Nome
        IPIP encapsulation daemon di Mike Westerhof .

     Autore
        Mike Westerhof KA9WSB (codice originale),  successivamente Bdale
        Garbee N3EUA (port su BSD), poi Ron Atkinson N8FOW e John Paul
        Morrison (port su Linux), poi Bdale ci ha ancora messo su le
        mani su tutte le versioni (then Bdale rolled it all back
        together again).

     Descrizione
        Un daemon che permettera' di usare la propria macchina Linux
        come un gateway IPIP incapsulato. Nota: tutto questo non e'
        probabilmente piu' necessario nella maggior parte delle
        installazioni, poiche' i kernel recenti hanno un device che
        supporta l'incapsulamento.

     Stato
        Ron sta utilizzando questo programma, e le altre versioni hanno
        funzionato in modo piuttosto soddisfaciente.

     Ultimo aggiornamento.
        01 Apr 97

     Richieste di sistema.
        TNC in modo KISS e ogni versione di Linux che supporti i sockets
        RAW.

     Dettagli
        Se si e' gia' usato un gateway tra Internet e il proprio sistema
        packet radio, si e' probabilmente stati connessi da un gateway
        di incapsulazione di qualche tipo. La maggior parte usa NOS di
        KA9Q e il DOS, ma altri usano Unix e questo daemon. Permette di
        incapsulare IP dentro IP in modo da far propagare le connessioni
        IP dentro Internet. Il programma permette di connettere un TNC
        KISS alla propria macchina Linux e ricevere i datagrammi
        attraverso Internet da un simile gateway. Bdale ha inserito
        delle istruzioni di installazione nel package.

     Dove reperirlo
        Questo software e' disponibile presso il sito ftp col.hp.com
        <ftp:///col.hp.com/hamradio/packet/etc/ipip/ipip.tar.gz>.

     Licenza/Copyright
        Liberamente distribuibile; Bdale chiede di mandargli una
        cartolina o una QSL se si usa il programma e se piace.

     Contributo a cura di:
        Ron Atkinson, N8FOW, e Bdale Garbee, N3EUA

     Nota:
        Allo stadio attuale puo' essere preferibile usare il tunnel
        daemon del kernel.


  5.18.  AXIP encapsulation daemon.


     Nome
        AXIP encapsulation daemon di Mike Westerhof.

     Autore
        Mike Westerhof KA9WSB, port su Linux a cura di Ron Atkinson
        N8FOW.

     Descrizione
        Un daemon che permette di usare la macchina Linux come gateway
        incapsulante AXIP

     Stato
        Non propriamente testato, ma si pensa che lavori bene.

     Ultimo aggiornamento.
        01 Apr 97


     Richieste di sistema.
        TNC in modo KISS, e ogni versione di Linux che supporti i
        sockets RAW.

     Dettagli
        Questo daemon e' il partner di quello di incapsulamento IPIP.
        Permette di incapsulare i frames AX.25 in IP per trasportarli
        lungo Internet. Cio' risulta utile per linkare reti AX.25
        situate in aree remote. Ron ha fornito un Makefile per Linux e
        con quello il software viene compilato senza problemi sul mio
        sistema, che monta una versione recente del kernel. Ron ha anche
        scritto alcuni file README che forniscono i dettagli necessari
        per compilare il programma, e la documentazione descrive come
        configurarlo.

     Dove reperirlo.
        Questo programma e' disponibile presso: la directory di
        applicazioni per radioamatori di sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/ax25ip.tar.gz>.  Una
        versione migliorata di questo programma e' inclusa nelle
        versioni recenti delle utility AX.25. Fare riferimento all'
        AX25-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/AX25-HOWTO.html>
        per maggiori informazioni.

     Licenza/Copyright
        Liberamente distribuibile, avendo cura di non modificare il
        messaggio di copyright.

     Contributo a cura di:
        Ron Atkinson, N8FOW


  5.19.  Ping-Pong Convers Server


     Nome
        Convers Server per Linux di Fred Baumgartens.

     Autore
        Fred Baumgarten, DC6IQ, <dc6iq@insu1.etec.uni-karlsruhe.de> e
        Brian Lantz brian@lantz.com.

     Descrizione
        Questa e' una versione del server di conferenza che permette a
        piu' utenti di conversare tra loro. E' compatibile coi server di
        NOS che svolgono lo stesso compito, ma offre delle
        caratteristiche in piu' come il salvataggio/ripristino del Testo
        Personale e la possibilita' di specificare gli argomenti di
        ciascun canale. Brian Lantz ha fatto alcune modifiche
        arricchendolo di nuove caratteristiche.

     Stato
        E' utilizato in diversi e popolari convers server, appare molto
        stabile.

     Ultimo aggiornamento.
        01 Apr 97

     Richieste di sistema.
        Linux, GNU make, compilatore C.

     Detagli.
        Dettagliate istruzioni per l'installazione sono inclusi nel file
        INSTALL che e' incluso nella distribuzione.


     Dove reperirlo.
        Una distribuzione di questo programma si trova a sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/convers>. Il sito
        nativo del programma e' presso il server ftp a insu1.etec.uni-
        karlsruhe.de <ftp://insu1.etec.uni-
        karlsruhe.de/pub/hamradio/convers/convers>

     Licenza/Copyright.
        Presumibilmente il copyright e' di Fred Baumgarten (anche se non
        specificato) ma alcune porzioni di programma appaiono prive di
        restrizioni per l'uso non commerciale e la copia, a condizione
        di non alterare i messaggi di copyricht


  5.20.  RSPF Daemon


     Nome
        Daemon per Linux  per il routing RSPF - Radio Shortest Path
        First

     Autore
        Craig Small vk2xlz csmall@triode.apana.org.au

     Descrizione
        Un'implementazione per Linux del protocollo di instradamento
        Radio Shortest path First (all'incirca 'prima il percorso radio
        piu' corto'). Il daemon supporta la versione 2.2 del protocollo,
        che corregge diversi problemi e bug presenti nella 2.1

     Stato
        Alfa - funzionante, richiede che sia testato e che vengano
        riportati gli eventuali bug. La versione corrente e' la 0.08

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        Richiede il kernel con supporto AX.25 di Alan Cox

     Dettagli
        Questo programma permentte a Linux di divenire un router RFPF.
        Eliminando le peculiarita' della versione 2.1 per NOS, diviene
        di fatto incompatibile con quest'ultima, ma permette query
        locali o remote attraverso una sessione tcp per scopi
        diagnostici o di debug.

     Dove reperirlo.
        Le ultime versioni sono sempre disponibili presso
        sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/apps/ham/> o
        ftp.ucsd.edu <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming>
        o presso l'autore.

     Licenza/Copyright.
        GNU Public License versione 2.0

     Contributo a cura di:
        Craig Small, VK2XLZ


  5.21.  TTYLINK Daemon di Michael Westfall


     Nome
        ttylinkd - un daemon ttylink per Linux.

     Autore
        Michael Westfall, N6KUY, mwestfal@.csci.csusb.edu

     Descrizione
        Un daemon che accetta connessioni ttylink tcp/ip (porta 87) e le
        converte in richieste di talk per un utente sulla macchina host.
        Puo' essere configurato per l'uso congiunto con ax25d in modo
        che anche gli utenti connessi via AX.25 possano fare il talk.

     Stato
        Alfa, ma funzionante.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        Supporto del networking e del protocollo AX.25 se e' utilizzato.

     Dettagli
        Poiche' il protocollo talk non ha uno standard definito, il
        protocollo ttylink di NOS e' divenuto lo standard di fatto, per
        lo meno in campo amatoriale, per la comunicazione tramite
        tastiera su tcp/ip. Questo daemon permette alle macchine Linux
        di rispondere alle richieste di connessione di tipo ttylink


     Dove reperirlo.
        L'ultima versione di ttylink  puo' essere trovata presso:
        sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/apps/ham/> o
        ftp.ucsd.edu
        <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming>.

        Una versione piuttosto migliorata di questo software e' ora
        inclusa nell pacchetto AX25 utilities.

     Licenza/Copyright.
        GNU Public License vers 2.0


  6.  Codice Morse

  Software che ha a che fare con la trasmissione in Morse


  6.1.  Pileup


     Autore
        Richard Everitt G4ZFE richard@babbage.demon.co.uk. Basato su
        sccw di Steve Merrifield.

     Descrizione
        Programma per esercitarsi sul pileup in CW.

     Stato
        v1.0. Stabile, ma sono previsti ulteriori miglioramenti.

     Ultimo aggiornamento.
        01 Apr 97

     Richieste di sistema
        Scheda audio supportata da Linux

     Dettagli
        CW pileup trainer (simile a PED) basato sul programma sccw. Sono
        possibili fino a 9 stazioni chiamanti contemporaneamente; i
        nominativi sono presi dal log di M6A del CQ WW CW Contest del
        1996 per aggiungere un tocco di realismo.

        Ho dato /usr/dict/words in pasto al programma ed e' stato uno
        spasso, quindi anche se non si e' appassionati di Morse conviene
        provarlo giusto per vederlo.

     Dove reperirlo.
        Si puo' scaricare pileup dal suo home site presso: Pileup Home
        Page <http://www.babbage.demon.co.uk/pileup.html> o
        sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>

     Licenza/Copyright
        GNU GPL

     Contributo a cura di
        Richard Everitt G4ZFE richard@babbage.demon.co.uk.


  6.2.  bip


     Autore
        Marcin Skubiszewski, Marcin.Skubiszewski@inria.fr.  24 rue de
        l'Oasis, 92800 Puteaux, Francia

     Descrizione
        Programma per l'apprendimento del codice Morse (per diverse
        piattaforma Unix).

     Stato
        Versione di produzione.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        Lavora su diverse piattaforme Unix, compreso Linux dove lavora
        con o senza una scheda audio o X11.

     Dettagli
        bip offre un ampia quantita' di opzioni che lo rendono molto
        adatto all'apprendimento del CW. Puo' mandare testo da un file o
        in gruppi casuali di lettere, ma ha anche diverse altre
        funzioni. Alcune di loro sono:

       Morse compatibile con le specifiche ARLL

       Volume e tono regolabili

       Velocita' regolabile, include il metodo Farenheit.

       Funzione Jitter per simulare codice mandato manualmente.

     Dove reperirlo.
        Non disponibile on line, ma si puo' scrivere a
        Marcin.Skubiszewski@inria.fr per una copia del sorgente.

     Licenza/Copyright
        Shareware $10.

     Contributo a cura di
        Marcin Skubiszewski, Marcin.Skubiszewski@inria.fr.



  6.3.  cw2hex


     Autore
        G. Forrest Cook, WB0RIO, cook@stout.atd.ucar.edu

     Descrizione
        cw2hex converte testo ascii in Hex per le EPROM dei keyer.

     Stato
        La versione 1.1 e' testata e funzionante.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        Un programma di editing e gcc per compilare.

     Dettagli
        Questo programma converte del testo in caratteri Morse nel
        formato standard Intel HEX. Il file Hex puo' essere usato per
        programmare un'EPROM che puo' essere connessa ad un semplice
        circuito che genera i messaggi registrati. I possibili utilizzi
        vanno dai keyer ai beacon. Accluso vi e' uno schema circuitale
        per un keyer che puo' funzionare con questo software.

     Dove reperirlo.
        cw2hex puo' esser scaricato da www.atd.ucar.edu
        <http://www.atd.ucar.edu/homes/cook/software.html>

     Licenza/Copyright
        GNU Copyleft

     Contributo a cura di:
        G. Forrest Cook, WB0RIO


  6.4.  SoundCard CW


     Autore
        Steve Merrifield, VK3ESM, sjm@ee.latrobe.edu.au

     Descrizione
        Programma Linux per esercitarsi nel CW.

     Stato
        Completato

     Ultimo aggiornamento
        01 Apr 97

     sistema richiesto
        Scheda audio FM supportata da Linux.

     Dettagli
        Questo programma usa la scheda audio per generare codice Morse.
        Non usando le caratteristiche delle console virtuali per
        generare il suono, puo' essere utilizzato indifferentemente da
        X11 o da una virtual console. Tra le sue caratteristiche si
        segnalano:

       frequenza regolabile

       volume regolabile

       velocita' regolabile

       ritardo regolabile

       grandezza dei gruppi regolabile

       generazione di gruppi di lettere casuali

       permette di generare codice preso da un file di testo

     Dove reperirlo.
        Il programma puo' essere scaricato dal suo home site presso:
        livewire.ee.latrobe.edu.au
        <http://livewire.ee.latrobe.edu.au/~sjm/morse>.

     Copyright/Licenza
        Berkeley style copyright. Il programma puo' essrere liberamente
        usato a condizione che rimanga inalterata l'indicazione
        dell'autore

     Contributo a cura di:
        Steve Merrifield, VK3ESM


  6.5.  GW4PTS Morse trainer.


     Autore
        Alan Cox, GW4PTS, alan@lxorguk.ukuu.org.uk

     Descrizione
        Un programma di apprendimento del codice Morse che usa
        l'altoparlante interno del PC

     Stato
        stabile, va piutosto bene ma e' ancora da completare.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di Sistema
        Qualsiasi versione di Linux

     Dettagli
        Alan ha scritto questo piccolo programma impiegando solo un'ora.
        Permette di emettere segnali Morse a diverse velocita' e
        frequenze usando l'altoparlante interno del PC. Si puo'
        specificare il testo da trasmettere da file o da tastiera;
        inoltre il programma e' in grado di generare gruppi casuali di
        caratteri. Cosi' com'e' occorre lanciare il programma dalla
        Linux Virtual Console, poiche' si appoggia su certe chiamate del
        kernel per generare i suoni, e queste non funzionano cosi'
        facilmente da XTerm. Mentre emette i segnali, stampa il suono
        del codice del carattere (Di, Di Da ecc.). Alan spera che
        qualcuno prenda il mano il sorgente e aggiunga le cose listate
        nei commenti all'inizio del sorgente stesso.

     Dove reperirlo.
        Avendo avuto numerose richieste da persone che richiedevano
        questo programma, ho ottenuto il permesso da Alan di renderlo
        disponibile. Lo si puo' trovare presso sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/GW4PTS.morse.tar.gz>.

     Copyright/Licenza
        GNU Public License 2, liberamente ridistribuibile, nessua
        garanzia.
  6.6.  morse (alias superiormorse)


     Autore
        Joe Dellinger, joe@sep.stanford.edu, jdellinger@trc.amoco.com,
        joe@soest.hawaii.edu

     Descrizione
        Un programma di pratica del codice Morse per le workstation
        UNIX.

     Stato
        Piuttosto stabile, funziona piuttosto bene ma e' da terminare.

     Ultimo aggiornamento
        01 Apr 97

     Sistema richiesto
        Attualmente supporta X11, Sun4, HP, Indigo, e Linux

     Dettagli
        Presenta diverse opzioni, incluso un'utility per generare QSO di
        contenuto casuale, simili a quelli usati negli esami della FCC.

     Dove reperirlo:
        morse.tar.gz puo' essere scaricato da: sepftp.standford.edu
        <ftp://sepftp.stanford.edu/pub/UNIX_utils/morse/morse.tar.gz>.

     Licenza/Copyright
        Liberamente Ridistribuibile

     Contributo a cura di:
        Brian Suggs, AC6GV, e John Gotts


  7.  Software per AMTOR.

  Software correlato all'uso dell'AMTOR.


  8.  Software per PACTOR.

  Software correlato all'uso del PACTOR.


  9.  Software per televisione a scansione lenta (SSTV).

  Software correlato all'uso della SSTV.


  10.  Software per Facsimile.

  Software correlato all'uso del facsimile.


  11.  Software per la progettazione e l'autocostruzione.

  Software per facilitare il lavoro di progettazione e autocostruzione
  di "oggetti" di tipo radioamatoriale. Pacchetti per il progetto di
  Antenne, circuiti stampati, filtri e QSL sono buoni candidati per
  questa sezione.





  11.1.  oscope - Enhanced Software Oscillosope


     Autore
        Tim Witham, twitham@pcocd2.intel.com

     Descrizione
        `oscope'  e' un oscilloscopio digitale a 44kHz per /dev/dsp.  E'
        basato sul lavoro originale di Jeff Tranter che viene descritto
        piu' sotto, ma e' stato significativamente migliorato

     Stato
        Prima release definitiva.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Richiede una scheda sonora supportata dal kernel con risposta in
        frequenza 8800Hz - 44kHz, il pacchetto `libsx' per costruire il
        client X11 xoscope, la libreria `svgalib' per costruire oscope
        che e' console-based, il pacchetto `g3vga' per aggiungere del
        testo alla console, e un programma mixer per selezionare la
        sorgente d'ingresso e il suo livello.

     Dettagli
        Il pacchetto include oscope per le console SVGA e xoscope, un
        client X11. Tra le caratteristiche spicca il campionamento a 8
        bit di due canali a 44kHz, una scala tempi che va da 5 us/div a
        5ms/div, 5 misurazioni automatiche, funzioni matematiche
        incorporate ad esterne incluse somma, differenza, media e FFT,
        26 buffer di memoria, 8 segnali misurati contemporaneamente e
        possibilita' di caricamento/salvataggio di file.

     Dove reperirlo.
        Il pacchetto oscope puo' essere reperito sia presso
        www.bobsplace.com <http://www.bobsplace.com/~twitham/> che
        presso sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/>.

     Licenza/Copyright
        GNU Public License, liberamente distribuibile, nessuna garanzia.

     Contributo a cura di:
        Tim Witham


  11.2.  Oscilloscopio Software


     Autore
        " Jeff Tranter, Jeff_Tranter@Mitel.COM

     Descrizione
        Scope e' un semplice programma che emula un oscilloscopio.
        Mostra graficamente il voltaggio in funzione del tempo.

     Stato
        ALFA. Prima versione.

     Ultimo aggiornamento
        01 Apr 97

     Sistema richiesto
        Scheda audio con ingresso supportata dal kernel. SVGALIB e'
        usato per la parte grafica.
     Dettagli
        Scope usa il device /dev/dsp per prelevare l'audio dalla scheda
        sonora e visualizzarla sullo schermo come in un oscilloscopio.
        Jeff afferma che Scope e' stato scritto piu' per divertimento
        che per un uso serio.

     Dove e come ottenerlo.
        Si puo' ottenere il sorgente, il makefile e le pagine man di
        Scope a: sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/>

     Licenza/Copyright
        GNU Public License, liberamente redistribuibile, nessuna
        garanzia.


  11.3.  Tool per la progettazione di circuiti stampati.


     Autore
        Thomas Nau, Thomas.Nau@rz.uni-ulm.de

     Descrizione
        Un programma per la progettazione di circuiti stampati basato su
        X11.

     Stato
        Vers 1.4.1, stabile.

     Ultimo aggiornamento.
        01 Apr 97

     Richieste di sistema.
        Il sistema a finestre X11 e una versione recente di flex.

     Dettagli
        Il pacchetto pcb viene fornito con esaurienti istruzioni su come
        compilare e installare il software. Io l'ho compilato senza
        errori sotto X11R6. Viene fornito con i layout di diversi
        componeni standard, e il layout d'esempio che dimostra in modo
        esauriente le capacita' del pacchetto.

     Dove e come ottenerlo.
        Si puo' ottenere il programma pcb da: ftp.uni-ulm.de
        <ftp://ftp.uni-ulm.de/pub/pcb/current> or from: sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/>

     Licenza/Copyright
        GNU Public License


  11.4.  Tool di progettazione e di simulazione Chipmunk


     Autore
        Dave Gillespie daveg@synaptics.com e John Lazzaro
        lazzaro@cs.berkeley.edu

     Descrizione
        Programma di simulazione analogica o digitale.

     Stato
        vers 5.10, stabile.

     Ultimo aggiornamento.
        01 Apr 97
     Richieste di sistema
        Sistema a finestre X11 e precedenti (XFree86-2.x) librerie, solo
        8 bpp (256 colori)

     Dettagli
        Non l'ho ancora testato. E' una suite di prodotti per la
        progettazione e la simulazione di circuiti.

     Dove reperirlo.
        Si puo' avere il pacchetto Chipmunk dal suo sito presso:
        www.pcmp.caltech.edu <http://www.pcmp.caltech.edu/chipmunk/>.

     Licenza/Copyright
        GNU Public License modificata, Caltech specificamente non si
        assume responsabilita' per un eventuale funzionamento non
        corretto.


  11.5.  irsim


     Autore
        Dmitry Teytelman, dim@leland.stanford.edu

     Descrizione
        Un simulatore event-driven dei livelli logici assunti nei
        circuiti MOS.

     Stato
        Versione 9.2, definitiva.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        X-Windows.

     Dettagli
        irsim e' un simulatore per circuiri MOS basato su X11. Ha due
        modi di simulazione: switch nel quale ogni transistor viene
        modellato come un interruttore controllato in tensione, e linear
        dove viene adottato un modello del transistor caratterizzato da
        una resistenza in serie con un interruttore controllato in
        tensione e con una capacita' ad ogni nodo.

     Dove reperirlo.
        Si puo' scaricare il pacchetto irsim da: sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/>.

     Licenza/Copyright
        Liberamente ridistribuibile.


  11.6.  Spice vers. 3f4


     Autore
        University of California, Berkeley, port su Linux di
        Jeff@RyeHam.EE.Ryerson.Ca

     Descrizione
        Spice e' un simulatore di circuiti analogici.

     Stato
        Stabile.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Sconosciute.

     Dettagli
        Spice permette di progettare e testare circuiti in un ambiente
        di modellazione computerizzato per vedere il loro comportamento,
        senza dover toccare stagno e saldatore. Un file readme e'
        fornito nel pacchetto.  Per installare ho fatto cosi':


          # cd /usr/src
          # gzip -dc spice3f4.tar.gz | tar xvf -
          # cd spice3f4
          # ./utils/build linux
          # ./utils/build linux install





     Dove e come reperirlo.
        Si puo' avere la versione 3f4 di spice da: sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/spice3f4.tar.gz>

     Licenza/Copyright
        Copyright della Universita' di California, Berkeley. Liberamente
        ridistribuibile a patto di non essere nemico degli Stati Uniti.


  11.7.  svgafft - Spectrum analyser


     Autore
        Andrew Veliath, veliaa@rpi.edu

     Descrizione
        svgafft e' un analizzatore di spettro per Linux.

     Stato
        Alfa, ma comunque utilizzabile.

     Ultimo aggiornamento.
        10 Apr 97

     Richieste di sistema.
        Scheda audio supportata da Liux, svgalib, un 486DX33 o
        superiore.

     Dettagli
        svgafft usa il device /dev/dsp ed attualmente supporta la
        risoluzione di campionamento a 8 o a 16 bit sulle schede sonore
        supportate. La sua rappresentazione grafica ricorda quello di un
        analizzatore di spettro con picchi cadenti. Andrew sta lavorando
        ad una versione X-Motif che verra' rilasciata a breve.

     Dove reperirlo:
        Il pacchetto  svgafft e' reperibile presso tsx-11.mit.edu
        <ftp://tsx-11.mit.edu/pub/linux/ALPHA/svgafft/> e
        sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/sound/freqs/>.

     Licenza/Copyright
        GNU Public License.
     Contributo a cura di:
        Andrew Veliath


  11.8.  ObjectProDSP


     Autore
        Paul Budnik, Mountain Math Software, support@mtnmath.com

     Descrizione
        ObjectProDSP e' un applicativo object oriented per la
        progettazione, sviluppo ed implementazione del DSP (elaborazione
        digitale del segnale). Permette di progettare la propria rete
        DSP, effettua simulazioni con descrizione e plottaggi simili a
        quelli degli oscilloscopi in qualsiasi punto della rete.

     Stato
        Alfa versione 0.2.

     Ultimo aggiornamento.
        01 Apr 97

     Richieste di sistema
        XFree86 3.1.1 o superiore, g++ gcc 2.6.3 o superiore, 32Mb di
        memoria totale (reale+swap) raccomandati, 6Mb di spazio su disco
        per una configurazione minima, 40Mb per l'installazione
        completa.

     Dettagli
        Ci sono diversi file nel pacchetto ed un solo file binario dal
        quale raccomando di partire. C'e' inclusa un'esauriente
        documentazione dalla quale e' possibile reperire tutte le
        informazionei necessarie per l'installazione e il funzionemanto
        dell'applicazione.

     Dove reperirlo
        ObjectProDSP e' scaricabile da: sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/devel/opd>, tsx-11.mit.edu
        <ftp://tsx-11.mit.edu/pub/linux/packages/dsp>, o ftp.funet.fi
        <ftp://ftp.funet.fi/pub/Linux/util/electronics/opd>.  Prima di
        effettuare il download sappiate che nel pacchetto ci sono
        diversi file piuttosto grandi, quindi siate preparati.

     Licenza/Copyright.
        GNU Public License vers 2.0.E' disponibile anche una licenza
        commerciale.


  11.9.  bpf - calcolatore di filtri passa basso


     Autore
        G. Forrest Cook, WB0RIO, cook@stout.atd.ucar.edu

     Descrizione
        bpf e' utile nella progettazione dei filtri passa basso a due
        poli.

     Stato
        Stabile.

     Ultimo aggiornamento
        01 Apr 97


     Richieste di sistema
        E' un programma che funziona in modo testo. Richiede gcc per
        essere compilato.

     Dettagli
        bpf e' un programma dotato di una semplice interfaccia a testo
        che offre diverse modalita' di inserire dati. Dopo aver inserito
        i dati opportuni, viene presentato un diagramma del circuito in
        modo testo ed una lista dei valori dei componenti appropriati.
        Il programma sembra semplice, ed in effetti lo e', tuttavia e'
        piuttosto spiccio e utile da usare,

     Dove reperirlo.
        bpf.tar.Z puo' essere scaricato presso www.atd.ucar.edu
        <http://www.atd.ucar.edu/homes/cook/software.html>

     Licenza/Copyright
        GNU Copyleft


  12.  Software di training/educativo.

  Software per assistere nell'insegnamento o nel training per
  radioamatori.  Sono elencati in questa sezione i tutorial per il
  codice Morse, database per gli esami di teoria e programmi di
  apprendimento basato su computer (CBT).


  13.  Software di altro tipo.

  Software che non rientra in nessun altra categoria.


  13.1.  twclock - World Time Clock for Hams


     Autore
        Ted Williams, ted@bluestone.com

     Descrizione
        Un orologio mondiale progettato per i radioamatori.

     Stato
        Versione 1.0, stabile.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Se si viole ricompilarlo occorrono le librerie Motif, altrimenti
        basta X11.

     Dettagli
        Chiunque abbia la necessita' di sapere l'ora in una data parte
        del mondo, o sia stanco dell'aspetto del solito orologio
        troveranno interessante questo programma, implementato con i
        widgets Motif e che mostra l'ora delle principali citta' del
        mondo.

     Dove reperirlo.
        Si puo' scaricare il pacchetto twclock da sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>.

     Licenza/Copyright
        GNU GPL

  13.2.  Chirp - Contest Logger


     Autore
        Kenneth E. Harker, N1PVB, kharker@cs.utexas.edu

     Descrizione
        Programma di log per i Contest.

     Stato
        In fase di attivo sviluppo

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Richiede la libreria ncurses e i file di header per essere
        compilato.

     Dettagli
        Programma Linux per log dei contest. Kenneth lo sta sviluppando
        in modo da poterlo usare sul suo computer portatile durante i
        contest VHF oltre che per impratichirsi con la programmazione
        con ncurses. Il suo obiettivo e' quello di realizzare un contest
        logger 'general purpose ' aggiornabile dall'utente con nuovi
        tipi di contest. Supporta tutte le bande e i modi.

     Dove reperirlo.
        Una volta disponibile, la versione 1.0 sara' prelevabile dalla
        Chirp Home Page <http://www.cs.utexas.edu/users/kharker/chirp/>

     Licenza/Copyright
        Probabilmente GNU GPL.

     Contributo a cura di
        Kenneth E. Harker, N1PVB, kharker@cs.utexas.edu


  13.3.  Contest - Contest Logging Program


     Autore
        Carsten Wilderotter, carsten.wilderotter@student.uni-ulm.de

     Descrizione
        Programma di log per contest.

     Stato
        Versione 0.0.1, Alfa

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema
        Nessuna richiesta particolare.

     Dettagli
        Programma linux per la gestione dei contest.

     Dove reperirlo
        Il pacchetto contest puo' essere scaricato da: sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>

     Licenza/Copyright
        GNU GPL

  13.4.  Linux for HAMS CD-ROM


     Autore
        Bruce Perens, bruce@pixar.com

     Descrizione
        Una distribuzione completa di Linux su CD-ROM progettata
        specificamente per i radioamatori.

     Stato
        Non ancora disponibile.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        Hardware compatibile con Linux; alcuni programmi richiedono
        ovviamente dell'hardware supplementare (TNC ecc...) ma non
        dovrebbe essere richiesto software aggiuntivo.

     Dettagli
        Una distribuzione Linux completa e tagliata su misura per i
        radioamatori. Sara' inclusa un'installazione completa del
        sistema operativo piu' un'ampia gamma di software specifico per
        radioamatori tipo quello elencato in questo documento. Dettagli
        sull'operazione, nonche' gli ultimi aggiornamenti sono
        disponibili presso la LinuxForHams WWW page
        <http://www.rahul.net/perens/LinuxForHams>.  Bruce e' stato
        estremamente occupato dal progetto Debian e questo ha ridotto il
        suo tempo libero virtualmente a zero, tuttavia e' ancora
        fermamente intenzionato a portare a termine questo progetto.
        Perche' non lo aiuti offrendoti di produrre e mantenere uno dei
        tanti pacchetti Debian del progetto? Maggiori informazioni sono
        disponibili presso il Debian Web Site <http://www.debian.org/>.

     Dove reperirlo
        Non e' ancora disponibile. Maggiori dettagli verranno comunicati
        quando ci sara' il primo rilascio.

     Licenza/Copyright
        GNU Public License.

     Contributo a cura di:
        Bruce Perens


  13.5.  SunClock


     Autore
        " John Mackin, john@cs.su.oz.AU

     Descrizione
        Un orologio che mostra istantaneamente quali parti del globo
        sono esposte alla luce solare e quali no.

     Stato
        Rilasciato.

     Ultimo aggiornamento
        01 Apr 97

     Richieste di sistema.
        X-Windows.

     Dettagli
        sunclock e' un altro di quei gadgets che la maggior parte della
        gente ritiene carini ma che non hanno una gran utilita'. Io uso
        sunclock per ottenere una indicazione di massima dell'ora in
        ogni parte del mondo. Sotto forma di icona presenta una piccola
        proiezione di Mercatore. Quando viene massimizzata produce la
        stessa immagine, ovviamente piu' grande e con un po' piu' di
        dettaglio. Inoltre mostra la data, l'ora locale e UTC. Sunclock
        calcola matematicamente quali parti del globo sono illuminate
        dal sole e quali sono in ombra; assumendo la Terra senza
        atmosfera sembra un programma piuttosto preciso.

     Dove reperirlo.
        Non ho mai visto alcuna versione precompilata di sunclock, per
        cui si puo' interrogare il server archie piu' vicino. In ogni
        caso ho compilato sunclock senza alcun problema.

     Licenza/Copyright
        Public Domain e puo' essere liberamente copiato mantenendo
        intatte le note all'inizio di sunclock.c.


  13.6.  Xearth


     Autore
        Kirk Johnson, tuna@cag.lcs.mit.edu

     Descrizione
        Una Terra rotante per la finestra di root di X-windows. Presenta
        ombreggiature e opzioni per una vista geostatica e non
        geostatica. E' una versione moderna di sunclock ma richiede un
        po' piu' di potenza di calcolo.

     Stato
        Versione 1.0

     Ultimo aggiornamento
        01 Apr 97

     Sistema richiesto.
        X-Windows.

     Dettagli
        xearth e' un programma sofisticato che disegna una vista a
        colori della terra come verrebbe osservata dallo spazio oppure
        una rappresentazione di Mercatore.  Si hanno diverse opzioni per
        determinare il comportamento della vista; i dettagli sono
        disponibili presso la xearth Home Page
        <ttp://www.cs.colorado.edu/~tuna/xearth/index.html> e nella
        documentazione fornita nel pacchetto.

     Dove reperirlo.
        Il sorgente si puo' recuperare presso il suo home site a
        cag.lcs.mit.edu <ftp://cag.lcs.mit.edu/pub/tuna> e praticamente
        in ogni directory X11/contrib.

     Licenza/Copyright
        Copyright (C) 1989, 1990, 1993 by Kirk Lauritz Johnson. Il
        messaggio di copyright incluso stabilisce che xearth e'
        liberamente redistribuibile a patto di lasciare inalterato e
        incluso nella documentazione il messaggio di copyright.

     Contributo a cura di:
        Kirk Johnson.

  14.  Come contribuire a questa lista.

  Vorrei che questa lista fosse piu' completa e aggiornata possibile,
  quindi sarei lieto di conoscere ogni notizia di nuovi aggiornamenti di
  prodotti indicati o di programmi non presenti nell'elenco.

  Gradirei che le segnalazioni comprendessero almeno le seguenti
  informazioni:


     Nome
        Il nome del programma in questione.

     Autore
        Chi ha scritto il programma o lo ha portato su Linux. Un
        indirizzo email, o qualche altro modo di contattarlo e'
        essenziale.

     Descrizione
        Una descrizione di una riga di cio' che fa il programma.

     Stato
        Un'indicazione dello stato di svilupo delprogramma. Deve ancora
        essere testato? E' una versione stabile? E' ancora in fase di
        progetto?

     Richieste di sistema
        Di cosa ha bisogno il programma per funzionare? Richiede X-
        Windows? Ha bisogno di una scheda audio? Necessita di una
        particolare versione di kernel o altri programmi particolari?

     Dettagli
        Non sono dell'idea di includere una descrizione molto lunga per
        ogni programma, visto che richiederebbe un sacco di tempo per
        leggerla e per mantenerla aggiornata. E' preferibile includere
        informazioni su cio' che rende particolare questo programma,
        quali sono le caratteristiche piu' sorprendenti ecc.

     Dove reperirlo.
        Se il programma e' liberamente distribuibile, sarebbe bene
        includere gli indirizzi ftp degli archivi in cui si trova. Se il
        programma e' commerciale occorre includere il nome della
        societa' che lo produce, con indirizzo e numero di telefono. Se
        e' disponibile solo in altri mezzi, ad esempio per posta, allora
        servono dei dettagli su come fare per averlo.

     Licenza/Copyright
        Il programma e' Copyleft? Copyright? Shareware? Public Domain?
        Il suo uso e' legalmente limitato in qualche modo?

  Non ci si deve preoccupare se non si sanno tutti questi dettagli,
  mandatemi cio' che sapete e io mettero' nell'elenco quello che posso.
  Preferisco avere delle informazioni incomplete che
  nessun'informazione.

  Mandate ogni contributo a:

  terry@perf.no.itg.telstra.com.au

  Metterei anche un indirizzo di packet radio, ma non sono ancora
  completamente operativo dopo aver traslocato.





  15.  Discussioni relative ai radioamatori e Linux.

  Ci sono numerose aree di discussione relative al servizio di
  radioamatore e Linux. Sono nei newsgroup comp.os.linux.* e anche nella
  lista linux-hams su vger.rutgers.edu. Altri luoghi di discussione sono
  la mailing list tcp-group presso ucsd.edu (luogo di discussione sul
  tcp/ip per radioametori) Per associarsi alla mailing list linux-hams
  occorre mandare una mail a:


       Majordomo@vger.rutgers.edu




  with the line:


       subscribe linux-hams




  nel testo del messaggio. Il titolo viene ignorato.

  Per iscriversi al tcp-group mandare una mail a:


       listserver@ucsd.edu




  con la riga:


       subscribe tcp-group




  nel testo del messaggio.

  Nota: Ricordate che il tcp-group serve principalmente per la
  discussione sull'uso di protocolli avanzati, come il tcp/ip in campo
  radioamatoriale. Le domande esclusivamente su Linux non devono essere
  formulate in quest'area.


  16.  Copyright.

  HAM-HOWTO, introduzione ai programmi radioamatoriali disponibili sotto
  Linux e informazioni sulla configurazione di alcuni di essi.
  Copyright (c) 1995,1996,1997 Terry Dawson.  Traduzione italiana di
  Nico Alberti.

  La distribuzione e l'utilizzo di questo documento sono vincolati dai
  termini indicati nella versione 2 (o da qualunque versione successiva)
  della GNU General Public License pubblicata dalla Free Software
  Foundation.

  Questo documento viene distribuito con l'intento di essere utile, ma
  SENZA ALCUNA GARANZIA, compreso quella implicita di FUNZIONALITA' o di
  UTILITA' PER UN PARTICOLARE UTILIZZO. Vedere la GNU General Public
  License per ulteriori dettagli.

  Assieme a questo documento dovreste aver ricevuto una copia della GNU
  General Public License; se cio' non fosse vi preghiamo di scrivere
  alla

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.


  The HAM-HOWTO, an introduction to Amateur Radio software available for
  Linux and information on how to configure some of it.  Copyright (c)
  1995,1996,1997 Terry Dawson.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the:

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.







































  HOWTO HOWTO
  Mark F. Komarinski

  v0.13, 19 settembre 1999

  Aiutare un nuovo autore LDP a cominciare con strumenti, idee e conven
  zioni usate da LDP.  Traduzione di Mariani Dario <darkpand@uni.net>.


  1.  Introduzione

  1.1.  Cronologia

  Questo documento  stato iniziato il 26 Agosto 1999 da Mark F.
  Komarinski markk@cgipc.com dopo due giorni di frustrazione nel cercare
  di far funzionare gli strumenti necessari.  Se almeno un autore LDP
  viene aiutato da questo documento, ho fatto il mio lavoro.

  1.2.  Nuove versioni

  La versione pi recente di questo documento pu essere trovata sulla
  mia homepage http://www.cgipc.com/~markk <http://www.cgipc.com/~markk>
  nel suo sorgente SGML.  Altre versioni possono essere trovate in altri
  formati all'homepage di LDP http://www.linuxdoc.org/.

  1.2.1.  Cronologia delle versioni


     v0.25, 20 settembre 1999

       Corretti alcuni collegamenti errati

       Aggiunta la sezione per i nuovi autori

       Vari cambiamenti rispetto alla prima versione pubblica

       Dichiarazione di copyright ora inclusa al posto di una URL

     v0.12, 2 settembre 1999

       Completate la maggior parte delle sezioni

       Integrati dei cambiamenti dalla lista ldp-discuss

     v0.10, 27 agosto 1999

       Scritto fino alla sezione 3.4

       Aggiunto qualcosa allo schema

       Cambiata la locazione della mailing list di LDP a
        lists.debian.org da thepuffingroup.com.

     v0.01, 27 agosto 1999

       Prima versione, creata la pagina web, scritto un semplice
        sommario.

       Qualcosa di quello che ho scritto  da prendere con le pinze.
        Delle cose devono essere verificate.

  1.3.  Copyright e marchi registrati (in inglese)

  (c) 1999 Mark F. Komarinski


  This manual may be reproduced in whole or in part, without fee,
  subject to the following restrictions:


    The copyright notice above and this permission notice must be
     preserved complete on all complete or partial copies

    Any translation or derived work must be approved by the author in
     writing before distribution.

    If you distribute this work in part, instructions for obtaining the
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

    Small portions may be reproduced as illustrations for reviews or
     quotes in other works without this permission notice if proper
     citation is given.

  Exceptions to these rules may be granted for academic purposes: Write
  to the author and ask. These restrictions are here to protect us as
  authors, not to restrict you as learners and educators. All source
  code in this document is placed under the GNU General Public License,
  available via anonymous FTP from the GNU archive site
  <ftp://prep.ai.mit.edu/pub/GNU/COPYING>.

  1.4.  Riconoscimenti e ringraziamenti

  Grazie a tutti quelli che hanno mandato commenti mentre stavo
  scrivendo questo documento. Questo include Deb Richardson, Daniel
  Barlow e altri membri della lista ldp-discuss.

  Alcune sezioni sono state prese dall'HOWTO Index (disponibile in molte
  locazioni di LDP) e la documentazione degli sgmltools. Ci sono
  riferimenti agli sgmltools e a LDP altrove in questo documento.

  2.  Basi su LDP e SGML

  2.1.  LDP

  Il Linux Documentation Project (LDP) fu creato per dare ai nuovi
  utenti un modo per avere informazioni velocemente su di un particolare
  argomento.  Esso non solo contiene una serie di libri su
  amministrazione, reti e programmazione, ma anche un gran numero di
  lavori minori su argomenti individuali, scritti da chi vi ha lavorato.
  Per trovare qualcosa sulle stampanti, basta prendere il Printing
  HOWTO. Per trovare qualcosa sulle reti, basta prendere l'Ethernet
  HOWTO, e cos via.

  All'inizio, molti di questi lavori erano scritti in testo o HTML. Col
  passare del tempo, serviva un modo migliore per gestire questi
  documenti.  Un modo che permettesse di leggerlo da una pagina web, da
  un file di testo su un CD-ROM o anche da un PDA.  La risposta, appena
  esso usc, fu l'SGML.

  2.2.  SGML

  Lo Standard Generalized Markup Language (SGML)  un linguaggio basato
  sul testo marcato. In questo modo,  simile al Tex o al groff, o a
  HTML. La potenza di SGML  che, diversamente dal WYSIWYG (What You See
  Is What You Get, quello che vedi  quello che avrai), non vengono
  definite cose come colori, grandezza dei caratteri o un tipo di
  formattazione.  Invece, vengono definiti degli elementi (paragrafi,
  sezioni, elenchi numerati) e si lascia al processore SGML alla fine di
  preoccuparsi di posizione, colori, caratteri e cos via. L'HTML fa la
  stessa cosa, ed  attualmente un subset dell'SGML

  L'SGML, in verit,  composto da due parti. La prima  la Struttura,
  chiamata comunemente DTD o Document Type Definition. Il DTD definisce
  le relazioni tra ognuno degli elementi. Il LinuxDoc DTD, usato per
  creare questo documento, ne  un esempio. Il DTD d un aspetto comune
  ad ogni documento creato utilizzandolo. La seconda  il Contenuto,
  ovvero ci che viene prodotto dal processore SGML e alla fine visto
  dall'utente.  Questo paragrafo fa parte del Contenuto, ma ne farebbe
  parte anche un'immagine, una tabella, un elenco numerato e cos via.
  Il Contenuto  circondato da tag per separare ogni differente
  elemento.

  Col passare del tempo, il LinuxDoc DTD sta per essere sostituito dal
  DocBook DTD, usato da altri, dando cos all'LDP un aspetto coerente
  col resto della documentazione SGML. Quando questo accadr, sarete
  tenuti informati tramite questo HOWTO o sulle mailing list.  La
  differenza pi grande tra LinuxDoc e DocBook,  che DocBook assegna i
  tag a differenti tipi di contenuto (come comandi, nomi di file,
  directory e cos via) mentre LinuxDoc assegna i tag basandosi sul modo
  in cui il testo deve apparire (si pu enfatizzare il testo o farlo
  assomigliare ad una macchina da scrivere, per esempio).

  2.2.1.  Perch SGML invece di HTML o di altri formati?

  L'SGML fornisce pi della semplice formattazione. Si possono
  automaticamente costruire indici, sommari e collegamenti all'interno
  del documento o altrove. Il pacchetto sgmltools permette di esportare
  (lo chiamer formattare da ora in poi) l'SGML in formato LaTeX, info,
  testo, HTML e RTF.  Da questi formati di base, possono poi essere
  creati altri formati (DOC, PostScript e cos via).  L'SGML non soffre
  degli appesantimenti visti ultimamente nell'HTML. Non penso si vedr
  molto presto un tag <blink> nell'SGML. Questo rende il codice non solo
  semplice da formattare, ma anche semplice da scrivere. Programmi come
  LyX (al momento il mio editor WYSIWYM scelto) permette di scrivere in
  formato TeX, esportarlo come SGML e poi formattare l'SGML ad un
  qualsiasi formato scelto.

  Per finire, l'SGML si concentra pi sul modo in cui gli elementi
  funzionano invece che sul modo in cui appaiono. Una grossa
  distinzione, che permette di scrivere pi velocemente, in quanto non
  bisogna preoccuparsi della posizione dei paragrafi, grandezza dei
  caratteri, tipi di carattere e cos via.

  2.3.  Gli strumenti

  In questa sezione tratter alcuni degli strumenti di cui avrete
  bisogno o che vorrete usare per creare la vostra documentazione LDP.
  Li descriver qui e li definir meglio pi avanti, insieme alle
  istruzioni per l'installazione. Se utilizzate altri strumenti per
  aiutarvi nello scrivere materiale LDP, fatemelo sapere e aggiunger
  una nota per esso.

  2.3.1.  sgmltools

  Richiesti

  Il pacchetto sgmltools contiene gli strumenti SGML necessari per
  formattare l'SGML in uno dei formati di file suddetti. Contiene anche
  il LinuxDoc DTD, necessario per creare la documentazione LDP. Per
  creare solo documentazione SGML,  tutto quello che serve. Se si vuole
  formattare in formati quali TeX, bisogna prendere almeno questo
  pacchetto. Il pacchetto sgmltools  disponibile nelle distribuzioni,
  oppure all'indirizzo http://www.sgmltools.org/




  2.3.2.  TeX

  Opzionale

  TeX (che fa rima con blech!)  il linguaggio di markup scelto da
  molti, incluse le persone del mondo matematico. Ancora ricordo molti
  esami di Calcolo scritti in TeX.  anche uno dei primi linguaggi di
  markup che sia ancora in giro (un altro  il formato *roff utilizzato
  nelle pagine man).  Il TeX attualmente segue alcuni dei concetti
  dell'SGML. Comunque, esso compila i suoi file in DVI (DeVice
  Independent) che possono essere convertiti in un altro formato.
  Sfortunatamente, il DVI non pu essere facilmente convertito in altro
  che alcuni linguaggi di stampanti (PostScript, PCL), rendendo
  difficile utilizzarlo per generare codice HTML. TeX  disponibile su
  praticamente tutte le distribuzioni come LaTeX o TeTeX. Dovrebbero
  andar bene entrambi.

  2.3.3.  LyX

  Opzionale

  Il programma LyX  un WYSIWYM (What You See Is What You Mean, quello
  che vedi  quello che intendi) grafico e fornisce un collegamento
  molto utile tra una applicazione grafica e un formattatore facile da
  utilizzare e le a volte complesse regole dell'SGML. LyX,
  effettivamente, serve per scrivere documenti TeX e molte delle regole
  del TeX si applicano in LyX. Per esempio, mentre le sezioni sono
  numerate automaticamente, non si possono inserire facilmente spazi
  bianchi (spazi e tabulazioni).  contro lo scopo per cui il TeX 
  stato creato. Nello stesso modo, l'SGML spesso ignora gli stessi spazi
  bianchi. Il programma LyX pu leggere il LinuxDoc DTD e fornisce un
  documento modello per scrivere (o modificare) la propria
  documentazione LDP in modo familiare, senza dover utilizzare vi e
  ricordare quali sono i tag per fare un elenco puntato. LyX 
  disponibile all'indirizzo http://www.lyx.org/.

  Per chi utilizza KDE,  disponibile un port di LyX che utilizza le
  librerie Qt. Ulteriori informazioni possono essere trovate
  all'indirizzo http://www.devel.lyx.org/~ettrich/klyx.html.  Se
  utilizzate KLyX per scrivere SGML, per favore mandate una e-mail al
  mio indirizzo per farmi partecipe delle vostre esperienze con esso.

  3.  Cominciare

  Questa sezione mostra come venire coinvolto nello scrivere la propria
  documentazione LDP. Come ottenere e configurare gli strumenti,
  contattare LDP e distribuire le proprie conoscenze a tutti gli utenti
  Linux l fuori.

  3.1.  Per i nuovi autori

  Se siete nuovi di LDP e volete prendere un HOWTO non mantenuto o
  scrivere un nuovo documento HOWTO o mini-HOWTO, contattate il
  coordinatore degli HOWTO all'indirizzo linux-howto@metalab.unc.edu.
  Questo per essere sicuri che il coordinatore degli HOWTO sappia chi
  sta lavorando su quale documento. Notate anche che tutti gli HOWTO
  proposti devono essere in formato SGML (al momento utilizzando il
  LinuxDoc DTD). I mini-HOWTO proposti possono essere in formato SGML o
  HTML, ma solo quelli formattati in SGML potranno essere inclusi nelle
  versioni stampate degli HOWTO.

  3.2.  Le Mailing List

  Ci sono delle mailing list alle quali iscriversi per sapere come
  funziona LDP.  La prima  ldp-discuss@lists.linuxdoc.org, che  il
  maggiore gruppo di discussione di LDP. Per iscrivervi, mandate un
  messaggio con oggetto "subscribe" all'indirizzo ldp-discuss-
  request@lists.linuxdoc.org.  Per deiscrivervi, mandate una e-mail con
  oggetto "unsubscribe" a ldp-discuss-request@lists.linuxdoc.org.

  3.3.  Scaricare ed installare gli strumenti

  3.3.1.  sgmltools

  Scaricate il pacchetto sgmltools da http://www.sgmltools.org/ o
  direttamente dalla vostra distribuzione.  I file da sgmltools.org sono
  in codice sorgente, per cui dovete compilarli per la vostra macchina.
  Utilizzare un pacchetto precompilato per la propria distribuzione 
  pi semplice, in quanto non bisogna compilarlo e potenzialmente
  ricevere errori di compilazione ( cos, se non siete programmatori).

  Con la RedHat, gli sgmltools sono inclusi nella distribuzione.
  Altrimenti, potete scaricarli da ftp.redhat.com o un altro dei suoi
  mirror come parte della distribuzione principale.

  Se utilizzate la Debian, anche essa ha gli sgmltools nella
  distribuzione standard. Se non avete il pacchetto installato, potete
  utilizzare il comando apt-get per scaricare ed installare il pacchetto
  al posto vostro:


  ______________________________________________________________________
  # apt-get install sgml-tools

  ______________________________________________________________________



  Per maggiori informazioni sui pacchetti Debian, potete andare
  all'indirizzo http://www.debian.org/Packages/stable/text/sgml-
  tools.html.

  Se state compilando il codice sorgente, tutto quello che dovete fare
  :


   # tar -zxvf sgmltools-x.x.x.tar.gz
   # cd sgmltools-x.x.x
   # ./configure
   # make
   # make install




  Sostituite sgmltools-x.x.x con la versione attuale del pacchetto
  sgmltools che state utilizzando. Mentre sto scrivendo, la versione che
  supporta LinuxDoc  la 1.0.9. Quella che supporta il DocBook  la
  2.0.2.  Entrambe sono disponibili al sito web riportato sopra.

  Una volta che gli strumenti sono installati, sono disponibili una
  serie di comandi.

  sgmlcheck file.sgml - Controlla la sintassi di un dato documento.

  sgml2html file.sgml - Converte un file SGML in HTML. Crea un file
  file.html che contiene l'Indice, poi crea i file file-x.html, dove x 
  il numero della sezione.

  sgml2rtf file.sgml - Converte un file SGML in formato Rich Text Format
  (RTF).  Crea due file, il primo chiamato file.rtf che contiene la TOC
  (Indice), ed uno chiamato file-0.rtf, che contiene tutte le sezioni.
  sgml2txt file.sgml - Converte un file SGML in testo ASCII.  La TOC e
  tutte le sezioni sono messe tutte nel file file.txt.

  sgml2info file.sgml - blabla SGML blabla INFO, utilizzato dal comando
  info. Tutto l'output viene messo nel file file.info.

  sgml2latex file.sgml - blabla SGML blabla TeX.

  sgml2lyx file.sgml - SGML yadda LyX graphical editor.  Ottimo se si
  hanno SGML pre-generati e si vogliono convertire per l'uso con LyX.

  3.4.  Scrivere l'SGML a mano

  Come con HTML,  possibile scrivere SGML a mano, quando si conoscono i
  codici di marcatura (tag) che si vogliono utilizzare. Questa sezione
  illustrer pi tag possibile, con esempi pratici di ognuno. Un buon
  posto da dove iniziare pu essere il sorgente SGML di questo
  documento, che  disponibile all'indirizzo riportato
  nell'``Introduzione''.  Anche se SGML pu essere processato in modi
  diversi a seconda del formato del file in cui viene convertito,
  prover ad elencare delle cose da sapere durante la scrittura.

  3.4.1.  Iniziare

  Per iniziare un nuovo documento, create un nuovo file nel vostro
  editor ASCII preferito e iniziate con:


  <!doctype linuxdoc system>




  Questo definisce il tipo di documento (LinuxDoc nel caso nostro) che
  il processore SGML utilizzer in fase di formattazione del file nel
  formato di uscita. Questo tag non produce nulla in uscita.

  Poi bisogna chiudere il resto del lavoro nei tag <article> e
  </article>. Questi indicano l'inizio del contenuto (o articolo, eh?).
  Se si  familiari con l'HTML,  simile all'includere tutto il
  contenuto nei tag <html> e </html>.

  3.4.2.  Informazioni dell'intestazione

  La prima parte del contenuto dovrebbe contenere informazioni generali
  sul resto del contenuto. Vorrebbe essere simile alle prime pagine di
  un libro, dove troviamo titolo, autore, data di pubblicazione, indice,
  eccetera.

  Il titolo del contenuto  chiuso nei tag <title> e </title>. L'autore
   specificato nei tag <author> e </author>. La data usa i tag <date> e
  </date>.

  Le due sezioni rimanenti sono i tag <abstract> e </abstract>, che
  forniscono un sommario sul contenuto e il tag <toc>, che specifica la
  posizione della TOC.  La TOC viene generata automaticamente dal
  processore SGML. Vedremo le sezioni pi tardi.

  Ora, come appare tutto insieme? Preso questo bel pezzo di codice SGML
  (utilizzato per creare questo documento), si pu vedere:






  <!doctype linuxdoc system>
  <!-- LinuxDoc file was created by LyX 1.0 (C) 1995-1999 by <markk>
   Fri Aug 27 09:42:28 1999 -->
  <article>
  <title>HOWTO HOWTO</title>
  <author>Mark F. Komarinski</author>
  <date>27 Agosto 1999 </date>
  <abstract>Aiutare un nuovo autore LDP a cominciare con strumenti, idee, e
   convenzioni usate dall'LDP</abstract>
  <toc>




  Questo pezzo del contenuto ha creato la pagina principale che 
  possibile vedere guardando questo documento in formato RTF o HTML,
  mettendo tutte le informazioni in una pagina.

  3.4.3.  Sezioni

  Per costruire l'Indice, bisogna avere qualcosa con cui costruirlo.  Le
  sezioni nel caso dell'SGML sono l'equivalente dei capitoli nelle
  pubblicazioni tradizionali. Sono disponibili sezioni multiple e ogni
  sezione pu avere sottosezioni e ognuna di esse pu avere sottosezioni
  eccetera.

  Cominciare i documenti con le sezioni  comodo in quanto permette di
  creare una bozza degli argomenti principali da coprire. Poi si possono
  spezzare queste sezioni principali in sezioni gradatamente pi
  piccole, fino ad ottenere delle piccole parti di cui si pu scrivere
  in pochi piccoli paragrafi.  Ho cominciato cos a scrivere questo
  documento.

  Le sezioni sono uno dei pochi insiemi di tag SGML che non richiedono
  di essere chiusi. Non ci sono tag </sect>. E non c' bisogno di
  preoccuparsi della numerazione. Ci penser il processore a gestirla
  quando l'SGML verr formattato in un altro formato.

  Le sezioni cominciano con il tag <sect>. Per ogni tag <sect> viene
  cominciata una nuova sezione. La prima sezione viene numerata con il
  numero 1.

  Le sottosezioni (come 1.1) si creano con il tag <sect1>.  Anche esse
  cominciano con 1.

  Le sotto-sottosezioni (1.1.1) si creano con il tag <sect2>, ed anche
  esse cominciano con 1.

  Quando il processore SGML trova il tag <toc>, passa attraverso il
  resto del documento e costruisce l'Indice basato sul numero dei tag di
  sezione ivi contenuti. Le sezioni vengono numerate e elencate nella
  TOC e poi utilizzate nel resto del documento. Le sotto-sottosezioni
  (1.1.1) non vengono mostrate nella TOC, ma sono mostrate in testo
  enfatizzato se possibile.

  3.4.4.  Paragrafi normali

  Scrivere paragrafi del contenuto  proprio come l'HTML. Utilizzate un
  tag <p> per specificare una nuova riga e cominciate a scrivere.
  L'SGML ignora gli spazi bianchi come tabulazioni, spazi multipli e
  ritorni a capo. Quando l'SGML incontra un tag <p> inizia un nuovo
  paragrafo.  Il corretto SGML prevede un tag </p> per chiudere il
  paragrafo.



  3.4.5.  Testo modificato

  Ogni tanto potrebbe servire un poco di testo diverso dal resto, per
  evidenziare del codice o per un comando. Il testo enfatizzato va
  racchiuso con i tag <em> e </em>.  Il testo dattiloscritto va
  racchiuso con i tag <tt> e </tt>.

  3.4.6.  Liste

  Ci sono due modi per fare liste in SGML. Il primo  la lista numerata,
  dove ogni elemento della lista viene numerato (come le sezioni)
  cominciando con 1.


  1. Questo  il primo elemento della lista numerata.

  2. Questo  il secondo.

  3. Terzo.

  Il codice per la lista sopra appare cos;


  <enum>
  <item>Questo  il primo elemento della lista numerata.
  <item>Questo  il secondo.
  <item>Terzo.
  </enum>





  Il tag <enum> specifica che gli elementi seguenti saranno numerati.

  L'altro metodo di scrivere liste  la lista puntata, dove ogni
  elemento ha una stella, un cerchio, un punto o un altro metodo per
  puntare gli elementi.


    Questo  il primo elemento della lista puntata.

    Questo  il secondo.

    Terzo.

  Il codice sopra appare cos in SGML puro:


  <itemize>
  <item>Questo  il primo elemento della lista puntata.
  <item>Questo  il secondo.
  <item>Terzo.
  </itemize>




  Come potete vedere, il tag <item>  lo stesso per la lista numerata e
  quella puntata.

  Una terza forma di lista  la lista descrittiva. Essa ha un termine
  descritto e una frase che lo descrive.



     LDP
        The Linux Documentation Project

     SGML
        Standard Generalized Markup Language

  Il codice per creare le descrizioni sopra :


  <descrip>
   <tag>LDP</tag>The Linux Documentation Project
   <tag>SGML</tag>Standard Generalized Markup Language
   </descrip>




  Non  proprio uguale alle liste puntate o numerate, ma la lista 
  interamente racchiusa dai tag (<descrip> e </descrip>) ed ogni
  elemento della linea che  una parola definita va racchiusa nei tag
  <tag> e <tag>. Il resto della linea viene preso come la definizione
  della parola.

  3.4.7.  Testo riportato

  Delle volte serve stampare il testo nel modo in cui  scritto. Per far
  questo, vanno usati i tag <verb> e </verb> per racchiudere il
  paragrafo di testo da riportare. Spazi, ritorni carrello, ed altro
  testo (inclusi i caratteri speciali) sono riportati letteralmente fino
  al tag </verb>.


  Il testo seguente viene riportato letteralmente       .




  3.4.8.  URL

  Anche nell'SGML  possibile gestire Universal Resource Locator (URL)
  di ogni tipo. Notate che essi funzionano solamente quando esportati in
  HTML, ma ci possono essere degli usi per questo tag in altri formati
  (lo usa anche l'RTF?).

  Una URL non ha un tag di chiusura, ma mette queste informazioni tra il
  tag <url> stesso. Ecco una URL che punta alla pagina principale dell'
  LDP: http://www.linuxdoc.org/ <http://www.linuxdoc.org/>.  Ed ecco il
  codice per crearla:


  <url url="http://www.linuxdoc.org/" name="http://www.linuxdoc.org/">




  url="http://www.linuxdoc.org/" dice al browser dove andare, mentre i
  contenuti di name="http://www.linuxdoc.org/" dicono al browser cosa
  scrivere sullo schermo. In questo caso, i due sono simili, ma 
  possibile creare un tag URL che appare cos:


  <url url="http://www.linuxdoc.org/" name="LDP">




  E sulla pagina appare come: LDP <http://www.linuxdoc.org/>.

  3.4.9.  Riferimenti

  Mentre le URL sono ottime per collegarsi con i contenuti esterni al
  documento a cui si sta lavorando, non sono molto comode per collegarsi
  con il contenuto stesso. Per questo, si usano i tag <label> e <ref>.
  Il tag <label> crea un punto nel documento a cui riferirsi poi, come
  un segnalibro. Creare il tag <label>  semplice.  Posizionatevi nel
  punto al quale volete riferirvi poi, e inserite il seguente:


  <label id="Introduction">




  Avete ora creato un punto nel documento al quale potete riferirvi dopo
  come "Introduction". Questa etichetta attualmente appare in questo
  SGML all'inizio del documento. Quando volete riferirvi a quel punto
  pi tardi (ad esempio ``qui''), inserite il seguente tag:


  <ref id="Introduction" name="qui">




  e l'SGML inserir un collegamento chiamato "qui" (vedi sopra) che
  rimanda alla sezione "Introduzione".

  L'altro scopo dei riferimenti  l'indicizzazione. Siccome la
  documentazione LDP viene solitamente pubblicata su carta come una
  grande raccolta di documenti, serve un metodo per costruire l'indice
  in fondo al libro, basato su parole e oggetti.


  3.4.10.  Caratteri speciali

  Come in HTML, c' bisogno di fare l'escape di molti caratteri non-
  alfanumerici per impedire al processore SGML di interpretarli come
  codice SGML. Ecco una lista di codici SGML utilizzati. Altri sono
  nella Guida Utente sgmltools http://www.sgmltools.org/guide/guide.html
  <http://www.sgmltools.org/guide/guide.html>.


    Utilizzare &amp; per una e commerciale (&)

    Utilizzare &lt; per un segno di minore (<)

    Utilizzare &gt; per un segno di maggiore (>)

    Utilizzare &etago; per un segno di minore con uno slash (</)

    Utilizzare &dollar; per un segno di dollaro ($)

    Utilizzare &num; per un cancelletto (#)

    Utilizzare &percnt; per un segno di percentuale (%)

    Utilizzare &tilde; per una tilde (~)

    Utilizzare `` e '' per le citazioni, oppure &dquot; per "

    Utilizzare &shy; per un trattino di unione (ovvero, una indicazione
     che quello  un buon posto per spezzare una parola per il ritorno a
     capo).

  3.5.  Scrivere l'SGML utilizzando altri strumenti

  3.5.1.  LyX

  Mi sto ancora entusiasmando troppo per LyX. Okay, sono un poco
  obbiettivo verso questa applicazione perch mi piace veramente.
  Fornisce la potenza di scrivere in SGML con la facilit di un normale
  word processor. Non  un programma WYSIWYG, ma un'applicazione pi
  WYGIWYM (What You Get Is What You Mean, quello che ottieni  quello
  che intendi), in quanto quello che si vede sullo schermo non 
  necessariamente quello che si ottiene dopo che il processore SGML l'ha
  elaborato.

  Per creare un documento LinuxDoc con LyX, scaricate ed installate
  l'applicazione.  Assicuratevi di avere TeX e gli sgmltools installati
  (vedere ``Scaricare ed installare gli strumenti'' per maggiori
  informazioni).  Una volta finito, avviate LyX e selezionate "file->new
  from template..." Selezionate "Templates" poi fate click su
  linuxdoctemplate.lyx e avrete pronto un modello di documento, con la
  maggior parte delle informazioni di intestazione che dovrebbe avere un
  documento LDP.  Cambiate i dati per soddisfare i vostri bisogni
  (ovvero, inserite il Titolo, Autore, Data, Sommario, eccetera) e
  cominciate a scrivere. Il menu a comparsa nell'angolo in alto a destra
  pu essere utilizzato per selezionare tipi di contenuto (standard,
  liste puntate e numerate, sezioni). Il punto esclamativo viene
  utilizzato per enfatizzare il testo e potete o farci click sopra e
  cominciare a scrivere in modo enfatizzato oppure selezionare il testo
  con il mouse e farci click per enfatizzare il testo selezionato. Molte
  altre caratteristiche possono essere trovate sotto il menu Insert.
  Potete inserire url, riferimenti incrociati, elementi dell'indice e
  altri tipi di dato. Quando la documentazione  completata, potete
  salvarla in formato LyX, poi esportarla in LinuxDoc ed avere il file
  salvato con un'estensione .sgml. Questo file  poi pronto per essere
  verificato con sgmlcheck e convertito nei formati voluti.

  3.5.2.  Emacs

  Ho questa cosa su Emacs. Non lo uso e la cosa non mi irrita. Chiunque
  con pi esperienza di Emacs sarebbe molto utile.

  3.5.3.  Altri strumenti SGML

  Se ci sono altri strumenti SGML, anche commerciali, con le quali possa
  essere utilizzato il LinuxDoc DTD per creare la documentazione LDP,
  fatemelo sapere.

  3.6.  Le basi del CVS

  Al momento, l'LDP non ha un deposito condiviso per archiviare i
  contenuti online.  Speriamo che la cosa cambi. Ci sono alcune buoni
  ragioni per utilizzare CVS:


  1. Il CVS mantiene un backup off-site dei documenti. Nel caso cediate
     un documento ad un altro autore, lui pu recuperare il documento
     dal CVS e continuare. Nel caso ci fosse bisogno di tornare ad una
     versione precedente di un documento, anche esso pu essere
     recuperato.

  2.  comodo se ci sono molte persone che lavorano sullo stesso
     documento.  possibile farsi dire dal CVS quali cambiamenti sono
     stati fatti da un altro autore mentre stavate modificando la vostra
     copia e integrare quei cambiamenti.

  3. Tiene traccia dei cambiamenti fatti. Questi log (ed una data)
     possono essere inseriti automaticamente nel documento utilizzando
     dei tag speciali che vengono processati prima che il documento
     venga processato dal processore SGML.

  4. Fornisce un metodo per un programma di aggiornare automaticamente
     il sito web LDP con nuova documentazione appena viene scritta e
     proposta.

  3.7.  Distribuire la documentazione

  3.7.1.  Prima della distribuzione

  Prima di distribuire il codice a milioni di potenziali lettori ci sono
  dei passi da seguire.

  Primo, assicuratevi di controllare l'ortografia del documento. Nulla
  dice "S, sono stupido!" pi velocemente degli errori di scrittura
  nella terra di Internet. La maggior parte delle utilit che utilizzate
  per scrivere in SGML (emacs, LyX, altri editor di testi) hanno dei
  plug-in per fare un controllo ortografico. Altrimenti, c' sempre il
  programma ispell, installato in praticamente ogni distribuzione.
  Utilizzate anche il comando sgmlcheck degli sgmltools per verificare i
  tag SGML.

  Secondo, fate leggere a qualcuno la vostra documentazione per commenti
  e correttezza formale. La documentazione pubblicata da LDP deve essere
  il pi possibile corretta, in quanto ci sono milioni di utenti Linux
  che potrebbero leggerla. Se fate parte di una grossa mailing list che
  parla dello stesso soggetto, chiedete agli altri della lista di
  aiutarvi.

  Terzo, create un sito web dove poter distribuire la documentazione.
  Non  obbligatorio, ma  utile per le persone per trovare la locazione
  originale del vostro documento.

  3.7.2.  Copyright e Licenze

  Perch un documento LDP sia accettato dall'LDP, deve avere una licenza
  che permetta la libera distribuzione (come la birra) e pubblicazione.
  Come autore, potete detenere il copyright ed aggiungere altre
  restrizioni (per esempio, il dover approvare ogni traduzione o lavori
  derivati). Una licenza d'esempio  disponibile all'indirizzo
  http://www.linuxdoc.org/COPYRIGHT.html.  Se scegliete di utilizzare il
  copyright di quel documento, copiatelo semplicemente nel vostro codice
  sorgente in una sezione chiamata "Copyright e Licenze" o simile.
  Includete anche una dichiarazione di copyright propria (in quanto
  ancora lo possedete). Se siete un nuovo mantenitore per un HOWTO gi
  esistente, dovete includere la dichiarazione di copyright
  dell'autore/i precedente/i e le date in cui loro mantenevano il
  documento.

  3.7.3.  Proposta a LDP

  Quando il documento LDP  stato riletto da alcune persone e avete
  preso in considerazione i loro commenti, potete rilasciare il vostro
  documento a LDP in generale. Mandate una email a ldp-
  submit@lists.linuxdoc.org con il vostro sorgente. Entro 24 ore
  dovreste sapere se  stato accettato e inserito nel sito principale di
  LDP.

  4.  Suggerimenti di stile

  Questa non  (ancora) una veloce guida su come scrivere una buona
  documentazione, ma consideratela una manciata di consigli per aiutarvi
  nella scrittura.
    Siate chiari. Ognuno deve sapere di cosa state parlando.

    Usate degli esempi dove possibile. Fa vedere a tutti di cosa state
     parlando.

    Organizzate. Non saltate tra argomenti slegati tra loro nella
     stessa sezione.

  Potete trovare molti altri consigli dalla guida allo stile LDP situata
  all'indirizzo http://www.linuxdoc.org/HOWTO/LDP-Style-Guide.html.

  5.  FAQ su LDP

  5.1.  Voglio aiutare LDP. Come posso fare?

  Il modo pi facile  trovare qualcosa e documentarlo. Controllate
  anche gli HOWTO non mantenuti e guardate se c' un soggetto di cui
  sapete qualcosa e potete continuare a documentare.

  5.2.  la licenza del contenuto LDP?  Voglio pubblicare una raccolta di
  documenti LDP in un libro. Come 

  Guardate l'indirizzo http://www.linuxdoc.org/COPYRIGHT.html.

  5.3.  Ho trovato un errore in un documento LDP. Posso correggerlo?

  Contattate l'autore del documento o il coordinatore di LDP (e-mail?) e
  menzionate il problema e come pensate possa essere corretto.






































  The Linux HOWTO Index
  di Guylhem Aznar, guylhem@oeil.qc.ca e Greg Ferguson,
  gferg@sgi.com
  v3.9, giugno 2000

  Questo documento contiene un indice dei Linux HOWTO oltre ad altre
  informazioni sul progetto HOWTO.  Versione italiana a cura di Gio
  vanni Bortolozzo, (borto at pluto.linux.it).

  1.  Cosa sono i Linux HOWTO?

  I Linux HOWTO sono documenti che descrivono in dettaglio determinati
  aspetti della configurazione e l'uso di Linux. Per esempio, c'
  l'Installation HOWTO, che fornisce le istruzioni sull'installazione di
  Linux, il Mail Administrator HOWTO, che descrive come configurare ed
  installare il sistema di posta di Linux. Altri esempi possono essere
  il Net HOWTO ed il Printing HOWTO.

  Gli HOWTO sono dei documenti specifici - sul modello delle FAQ ma
  generalmente non sono strutturati come domande e risposte, anche se
  alcuni HOWTO contengono una sezione con le FAQ normalmente in fondo al
  documento.

  Gli HOWTO sono disponibili in vari formati: testo normale, PostScript,
  PDF, HTML e sgml.

  Oltre agli HOWTO, esistono moltissimi mini-HOWTO che trattano
  argomenti piccoli o specifici.



  2.  Dove si possono trovare i Linux HOWTO?


  Gli HOWTO possono essere prelevati via FTP anonimo dai seguenti siti
  Internet:


    ftp://metalab.unc.edu/pub/Linux/docs/HOWTO

    ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO

  cos come da diversi siti mirror.

  Potrete anche consultarli in linea in formato HTML
  <http://www.linuxdoc.org/LDP/HOWTO/> oppure prendere Linux-html-
  HOWTOs.tar.gz <http://metalab.unc.edu/pub/Linux/docs/HOWTO/other-
  formats/html/Linux-html-HOWTOs.tar.gz> per vederli comodamente sul
  proprio PC.  I file saranno estratti nella directory HOWTO/html.

  Molti siti mirror <http://www.linuxdoc.org/mirrors.html> copiano i
  file HTML degli HOWTO.

  www.linuxdoc.org viene utilizzato pesantemente, quindi possibilmente
  utilizzate un sito mirror.

  Un indice degli HOWTO circa all'inizio di ogni mese viene inviato al
  newsgroup comp.os.linux.answers. C' uno strumento chiamato
  NewstoHOWTO <ftp://metalab.unc.edu/pub/Linux/system/news/misc/> che
  riassembla i post.


  2.1.  Traduzioni degli HOWTO

  Le traduzioni degli HOWTO sono disponibili a metalab.unc.edu
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations> e nei mirror
  sparsi per il mondo. Attualmente ci sono:

    Cinese (zh)

    Coreano (ko)

    Croato (hr)

    Greco (el)

    Francese (fr)

    Giapponese (ja)

    Indonesiano (id)

    Italiano (it)

    Polacco (pl)

    Sloveno (sl)

    Spagnolo (es)

    Svedese (sv)

    Tedesco (de)

    Turco (tr)

  Se siete a conoscenza di altri progetti di traduzione, per favore
  fatemelo sapere e li includer in questa lista. Se siete interessati
  ad archiviare le vostre traduzioni su metalab.unc.edu, leggete la
  specifica sulla struttura delle directory a
  http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/Directory-
  Structure e contattate LDP.


  3.  Indice

  3.1.  HOWTO

  Sono attualmente disponibili i seguenti Linux HOWTO:


    3Dfx-HOWTO, The Linux 3Dfx HOWTO

     Aggiornato: febbraio 1998.  Descrive il supporto sotto Linux per il
     chip di accelerazione grafica 3Dfx.


    4mb-Laptops, 4mb Laptop HOWTO

     Aggiornato: aprile 2000.  Installare un sistma Linux completo su un
     portatile a "basse" specifiche (4mb di RAM, <=200mb di disco
     fisso).


    Access-HOWTO, Linux Access HOWTO

     Aggiornato: marzo 1997.  Tratta l'uso della tecnologia adattiva per
     rendere Linux accessibile a quanti non potrebbero altrimenti farlo.


    Adv-Routing-HOWTO, Linux 2.4 Advanced Routing HOWTO

     Aggiornato: maggio 2000.  Un approccio molto pratico a iproute2, al
     traffic shaping e un po' di netfilter.


    AI-Alife-HOWTO, Linux AI & Alife HOWTO

     Aggiornato: aprile 2000.  Informazioni e link su diverse
     applicazioni, librerie, ecc. relative all'AI che funzionano nella
     piattaforma Linux.


    Alpha-HOWTO, Brief Introduction to Alpha Systems and Processors

     Aggiornato: giugno 1997. Una breve panoramica su CPU, chipset e
     sistemi Alpha esistenti.


    Assembly-HOWTO, Linux Assembly HOWTO

     Aggiornato: maggio 2000.  Come programmare in linguaggio assembly
     usando strumenti di programmazione LIBERI, focalizzandosi sullo
     sviluppo per e sul sistema operativo Linux su piattaforma IA-32
     (i386).


    Astronomy-HOWTO, Linux Astronomy HOWTO

     Aggiornato: maggio 2000.  Il document contiene suggerimenti e
     risorse per utilizzare soluzioni Linux nell'ambito astronomico.


    AX25-HOWTO, Linux AX25-HOWTO, Amateur Radio

     Aggiornato: ottobre 1997.  Come installare e configurare il
     supporto per il protocollo packet radio AX.25 utilizzato dai radio
     amatori in giro per il mondo.


    Bash-Prompt-HOWTO, Bash Prompt HOWTO

     Aggiornato: dicembre 1999.  Discure come creare e controllare i
     prompt di terminali e xterm, utilizzando sequenze di escape
     standard per dare il nome utente, la directory di lavoro corrente,
     l'ora, ecc.


    Belgian-HOWTO, The Belgian HOWTO

     Aggiornato: febbraio 2000.  Come adattare Linux per gli utenti
     belgi; elenca gruppi di utenti, aziende e altre risorse su Linux in
     Belgio.


    Benchmarking-HOWTO, Linux Benchmarking HOWTO

     Aggiornato: agosto 1997.  Discute alcune questioni associate con il
     benchmarking di sistemi Linux e presenta un kit di strumenti
     basilari per il benchmarking.


    Beowulf-HOWTO, Beowulf HOWTO

     Aggiornato: novembre 1998.  Introduce l'architettura di
     supercomputer Beowulf e fornisce informazioni basilari sulla
     programmazione parallela, inclusi link a altri documenti pi
     specifici.
    Bootdisk-HOWTO, The Linux Bootdisk HOWTO

     Aggiornato: aprile 2000.  Come progettare e costruire i propri
     dischetti di boot/root per Linux.


    BootPrompt-HOWTO, The Linux BootPrompt HOWTO

     Aggiornato: maggio 1999.  Una compilation di tutti i possibili
     argomenti di boot che possono essere passati al kernel di Linux al
     momento del boot.  Include tutti i parametri del kernel e dei
     dispositivi.


    Busmouse-HOWTO, The Linux Busmouse HOWTO

     Aggiornato: febbraio 2000.  Come installare, configurare ed usare
     un busmouse sotto Linux.


    C++Programming-HOWTO, C++ Programming HOWTO

     aggiornato: giugno 2000.  Discute i metodi per evitare problemi di
     memoria in C++ ed inoltre aiuter a programmare correttamente in
     C++.  Applicabile a tutti i sistemi operativi.


    C-C++Beautifier-HOWTO, C-C++ Beautifier HOWTO

     Aggiornato: aprile 2000.  Aiuta a formattare (abbellire) programmi
     C/C++ in modo che siano pi leggibili e conformi agli standard di
     codifica del proprio sito.  Applicabile a tutti i sistemi
     operativi.


    Cable-Modem, Cable Modem Providers HOWTO

     Aggiornato: maggio 2000.  Risponde alle domande basilari sul come
     connettere la propria macchina Linux ad un cable modem o a un cable
     Internet provider.


    CD-Writing-HOWTO, CD-Writing HOWTO

     Aggiornato: maggio 2000.  Spiega come scrivere CR-ROM sotto Linux.


    CDROM-HOWTO, The Linux CD-ROM HOWTO

     Aggiornato: marzo 1999.  Come installare, configurare ed usare
     lettori CD-ROM sotto Linux.


    Chinese-HOWTO, Chinese HOWTO

     Aggiornato: giugno 1998.  Mostra come implementare il cinese su un
     sistema Linux, trattando pure quei problemi comuni che si
     incontrano mentre si usa il cinese, il modo per ottenerlo e come
     installare e configurare una variet di software per il cinese.


    Chroot-BIND-HOWTO, Chroot-BIND HOWTO

     Aggiornato: marzo 2000.  Descrive l'installazione del nameserver
     BIND 8 da eseguire usando chroot e come utente non-root, per
     fornire ulteriore sicurezza e minimizzare i potenziali effetti
     della compromissione della sicurezza.


    Commercial-HOWTO, Linux Commercial HOWTO

     Aggiornato: marzo 1999.  Un elenco di applicazioni e software
     commerciali offerti per Linux.


    Config-HOWTO, Configuration HOWTO

     Aggiornato: settembre 1999.  Si propone di rendere facile e veloce
     la regolazione fine del propria macchina Linux appena installata.
     Contiene un insieme di configurazioni per le applicazioni e i
     servizi pi comuni.


    Consultants-HOWTO, Linux Consultants HOWTO

     Aggiornato: settembre 1999.  Un elenco di aziende che forniscono
     supporto commerciale per Linux.


    CVS-RCS-HOWTO, CVS-RCS HOWTO for Linux (Source Code Control System)

     Aggiornato: giugno 2000.  Una guida pratica all'impostazione
     rapida del sistema di conrollo dei sorgenti CVS/RCS.


    Cyrillic-HOWTO, The Linux Cyrillic HOWTO

     Aggiornato: gennaio 1998.  Come configurare la propria macchina
     Linux per scrivere, vedere e stampare documenti in russo.


    Danish-HOWTO, The Linux Danish/International HOWTO

     Aggiornato: marzo 2000.  Come configurare Linux e le diverse
     applicazioni per lo standard danese, che comprende la tastiera, i
     font, la dimensione del foglio, ecc.


    Diald-HOWTO, Diald HOWTO

     Aggiornato: aprile 2000.  Mostra alcuni scenari tipici per iniziare
     velocemente ad usare Diald.  Rimpiazza il Diald mini-HOWTO.


    Diskless-HOWTO, Diskless Nodes HOWTO for Linux

     Aggiornato: aprile 2000.  Come impostare una macchina Linux
     diskless (senza dischi).


    Diskless-root-NFS-HOWTO, Root over nfs clients & server HOWTO

     Aggiornato: marzo 1999.  Come mettere su un server e configurare i
     client per il funzionanemnto diskless su una rete.


    Distribution-HOWTO, The Linux Distribution HOWTO

     Aggiornato: giugno 2000.  Intende aiutare i nuovi utenti a
     scegliere una distribuzione Linux e gli utenti esperti a tener
     traccia dello stato del mercato Linux.

    DNS-HOWTO, DNS HOWTO

     Aggiornato: febbraio 1999.  Come diventare un amministratore di DNS
     a tempo perso.


    DOS-Win-to-Linux-HOWTO, From DOS/Windows to Linux HOWTO

     Aggiornato: febbraio 1999.  Scritto per tutti gli utenti DOS e
     Windows che hanno deciso di passare a Linux.


    DOSEMU-HOWTO, The dosemu HOWTO

     Aggiornato: marzo 1997.  DOSEMU sta per DOS Emulation (Emulazione
     DOS) ed  un'applicazione che abilita il SO Linux ad eseguire molti
     programmi DOS.


    Ecology-HOWTO, Linux Ecology HOWTO

     Aggiornato: marzo 2000.  Discute come i computer Linux possano
     essere usati come mezzo per proteggere il nostro ambiente, usando
     le loro caratteristiche per risparmiare energia o carta.


    Emacs-Beginner-HOWTO, Emacs Beginner's HOWTO

     Aggiornato: ottobre 1999.  Introduce gli utenti Linux all'editor
     Emacs.


    Emacspeak-HOWTO, The Linux Emacspeak HOWTO

     Aggiornato: aprilee 1999.  Come un utente cieco pu usare Linux con
     un sintetizzatore vocale per rimpiazzare lo schermo.


    Enterprise-Java-for-Linux-HOWTO, Enterprise Java for Linux HOWTO

     Aggiornato: gennaio 1999.  Come configurare in Linux un ambiente
     Enterprise Java, che comprende JDK, un server web che supporta i
     servlet Java e l'accesso a database via JDBC, e che supporta
     Enterprise Java Beans (EJB).


    Esperanto-HOWTO, Linux-Esperanto-HOWTO

     Aggiornato: agosto 1999.


    Ethernet-HOWTO, Linux Ethernet HOWTO

     Aggiornato: maggio 1999.  Informazioni su quali dispositivi
     ethernet possono essere usati con Linux e su come configurarli (si
     concentra sull'aspetto hardware e dei driver a basso livello per le
     schede ethernet:; si veda il Network HOWTO per informazioni sulla
     configurazione software).


    Filesystems-HOWTO, Filesystems HOWTO

     Aggiornato: marzo 2000.  Sui filesystem e l'accesso ai filesystem.



    Finnish-HOWTO, Finnish HOWTO

     Aggiornato: febbraio 1996.  Come finlandensizzare Linux - Mappe
     di tastiera, fuso orario, impostazioni 8 bit clean per le
     applicazioni, ecc. (scritto in finlandese).


    Firewall-HOWTO, Firewall and Proxy Server HOWTO

     Aggiornato: febbraio 2000.  Pensato per descrivere le basi dei
     sistemi firewall e dare alcuni dettagli sull'impostazione sia dei
     firewall filtranti che dei proxy sui sistemi basati su Linux.


    Font-HOWTO, Font HOWTO

     Aggiornato: marzo 2000.  Fornisce una fonte ad ampio spettro dalla
     quale partire per qualsiasi se non tutte le questioni su Linux.


    Framebuffer-HOWTO, Framebuffer HOWTO

     Aggiornato: luglio 1999.  Come utilizzare i dispositivi framebuffer
     sotto Linux su diverse piattaforme.  Spiega inoltre come impostare
     la visualizzazione multi monitor.


    Francophones-HOWTO, Le Francophones-HOWTO : Linux & la langue
     franaise

     Aggiornato: dicembre 1999.


    From-PowerUp-To-Bash-Prompt-HOWTO, From Power Up To Bash Prompt

     Aggiornato: aprile 2000.  Una breve descrizione di quel che succede
     in un sistema Linux da quando si accende il computer a quando si fa
     il login e si arriva al prompt della bash.


    Ftape-HOWTO, Ftape HOWTO

     Aggiornato: agosto 1998.  Discute le cose essenziali da fare e da
     non fare con il driver ftape per i lettori di nastri sotto Linux.
     Si concetra sulla versione pi nuova del driver (ftape-4.02 quando
      stato scritto).


    GCC-HOWTO, The Linux GCC HOWTO

     Aggiornato: maggio 1999.  Discute come impostare il compilatore C e
     le librerie di sviluppo della GNU sotto Linux; d una panoramica
     sulla compilazione, il linking, l'esecuzione e il debugging dei
     programmi.


    German-HOWTO, German HOWTO

     Aggiornato: marzo 1997.  Discute le questioni di localizzazione di
     Linux specifiche per gli utenti tedesci (scritto in tedesco).


    Glibc2-HOWTO, Glibc 2 HOWTO

     Aggiornato: giugno 1998.  Tratta l'installazione e l'uso della
     versione 2 della libreria C della GNU (libc 6) in sistemi Linux.
    Hardware-HOWTO, Linux Hardware Compatibility HOWTO

     Aggiornato: settembre 1999.  Elenca la maggior parte dell'hardware
     supportato da Linux e aiuta a trovare i driver necessari.


    Hebrew-HOWTO, The Hebrew HOWTO

     Aggiornato: settembre 1995.  Come configurare la propria macchina
     Linux per usare i caratteri ebraici in X-Windows e nelle console
     virtuali.


    Hellenic-HOWTO, Hellenic HOWTO

     Aggiornato: agosto 1997.  Discute le questioni di localizzazione di
     Linux specifiche per gli utenti greci (scritto in greco).


    HOWTO-HOWTO, HOWTO HOWTO

     Aggiornato: giugno 2000.  Elenca strumenti, procedure e
     suggerimenti per gli autori degli HOWTO che gli aiuteranno a
     velocizzarsi e a scrivere.


    HOWTO-INDEX, The Linux HOWTO Index

     Aggiornato: giugno 2000.  Indice dei Linux HOWTO e altre
     informazioni sul progetto HOWTO.


    HP-HOWTO, > HP HOWTO - Utilisation and Configuration Guide of HP
     Products under Linux

     Aggiornato: aprile 2000.  Descrive l'uso con Linux e il software
     libero dei prodotti disponibili nel catalogo Hewlett-Packard (HP).


    INFO-SHEET, Linux Information Sheet

     Aggiornato: settembre 1998.  Fornisce le informazioni basilari sul
     sistema operativo Linux, tra cui una spiegazione di Linux,
     un'elenco delle caratteristiche, delle richieste e di alcune
     risorse.


    IngresII-HOWTO, Ingres II HOWTO

     Aggiornato: dicembre 1999.  Aiuta ad installare Ingres II
     Relational Database Management System sotto Linux.


    Installation-HOWTO, The Linux Installation HOWTO

     Aggiornato: maggio 2000.  Come ottenere ed installare il software
     Linux.   il primo documento che un nuovo utente di Linux dovrebbe
     leggere per poter cominciare.


    Intranet-Server-HOWTO, The Linux Intranet Server HOWTO

     Aggiornato: agosto 1997.  Come impostare una Intranet usando Linux
     come server per collegare assieme Unix, Netware, NT e Windows.


    IP-Masquerade-HOWTO, Linux IP Masquerade HOWTO

     Aggiornato: gennaio 2000.  Come abilitare su una macchina Linux la
     funzionalit di IP Masquerade.


    IPCHAINS-HOWTO, Linux IPCHAINS HOWTO

     Aggiornato: marzo 1999.  Come ottenere, installare e configurare il
     software di enhanced IP firewalling chains per Linux, ed alcune
     idee su come si potrebbe usarlo.


    IPX-HOWTO, Linux IPX HOWTO

     Aggiornato: maggio 1998.  Come ottenere, installare e configurare i
     diversi strumenti disponibili per il sistema operativo Linux che
     usano il supporto per il protocollo IPX del kernel di Linux.


    IR-HOWTO, Linux IR HOWTO

     Aggiornato: settembre 1999.  Un'introduzione a Linux e ai
     dispositivi a raggi infrarossi e su come usare il software fornito
     dal progetto Linux/IrDA.


    ISP-Hookup-HOWTO, ISP-Hookup HOWTO

     Aggiornato: marzo 1998.  Come usare Linux per connettorsi ad un
     Internet Service Provider attraverso una connessione TCP/IP via
     modem (sono trattati i fondamenti della connessione e
     dell'impostazione dell'IP, email e news).


    ISP-Setup-RedHat, "Pocket" ISP based on RedHat Linux

     Aggiornato: aprile 2000.  Discute l'impostazione di una macchina
     RedHat per dialin, virtual web hosting, virtual email, POP3 e ftp
     server.


    Italian-HOWTO, Linux Italian HOWTO

     Aggiornato: novembre 1998.  Tratta le questioni di localizzazione
     di Linux specifiche per gli utenti italiani (scritto in italiano).


    Java-CGI-HOWTO, Java CGI HOWTO

     Aggiornato: dicembre 1998.  Spiega come impostare il proprio server
     per permettere l'uso di programmi CGI scritti in Java e come usare
     Java per scrivere programmi CGI.


    JavaStation-HOWTO, Linux on the Sun JavaStation NC HOWTO

     Aggiornato: aprile 2000. Descrive come abilitare il sistema
     operativo Linux su Sun JavaStation NC.


    Jaz-Drive-HOWTO, Jaz-drive HOWTO

     Aggiornato: gennaio 2000.  Tratta la configurazione e l'uso dei
     lettori Jaz da 1Gb e 2Gb della Iomega sotto Linux.

    Kernel-HOWTO, The Linux Kernel HOWTO

     Aggiornato: giugno 1999.  Una guida dettagliata alla
     configurazione, compilazione e aggiornamento del kernel ed un'aiuto
     alla risoluzione dei problemi per i sistemi basati su ix86.


    Keyboard-and-Console-HOWTO, The Linux keyboard and console HOWTO

     Aggiornato: febbraio 1998. Contiene alcune informazioni sulla
     tastiera e la console di Linux (v2.0) e sull'uso dei caratteri non
     ASCII.


    KickStart-HOWTO, RedHat Linux KickStart HOWTO

     Aggiornato: gennaio 1999.  Descrive brevemente come usare il
     sistema KickStart di RedHat Linux per installare rapidamente un
     grosso numero di macchine Linux identiche.


    Kiosk-HOWTO, Kiosk HOWTO

     Aggiornato: ottobre 1999.  Fornisce una guida all'impostazione di
     chiosco WWW usando Linux, X11R6, FVWM2, Netscape Navigator 4.X e
     una trackball personalizzata.


    Kodak-Digitalcam-HOWTO, Kodak Digital Camera HOWTO

     Aggiornato: febbraio 2000.  Come far funzionare una telecamere
     digitale Kodak sotto GNU/Linux.


    Laptop-HOWTO, Linux Laptop HOWTO

     Aggiornato: dicembre 1999.  Contiene una rapida panoramica dei
     documenti relativi ai computer portatili (e che trattatano Linux),
     oltre ai metodi di installazione per i portatili (via PCMCIA, senza
     lettore CD, ecc.), alle caratteristiche dell'hardware dei portatili
     e alle configurazioni per diversi ambienti (di rete).


    Large-Disk-HOWTO, Large Disk HOWTO

     Aggiornato: febbraio 2000.  Tutto sulla geometria dei dischi e il
     limite di 1024 cilindri.


    LDAP-HOWTO, LDAP Linux HOWTO

     Aggiornato: febbraio 2000.  Informazioni sull'installazione, la
     configurazione, il funzionamento e la manutenzione di un server
     LDAP (Lightweight Directory Access Protocol) su una macchina Linux.


    Linux-From-Scratch-HOWTO, Linux From Scratch HOWTO

     Aggiornato: febbraio 2000.  Descrive il processo per la creazione
     completa del proprio sistema Linux partendo da una distribuzione di
     Linux gi installata ed utilizzando solamente i sorgenti del
     software di cui si ha bisogno.


    LinuxDoc+Emacs+Ispell-HOWTO, LinuxDoc+Emacs+Ispell HOWTO

     Aggiornato: febbraio 1998.  Indirizzato agli autori e ai traduttori
     di Linux HOWTO o qualsiasi altro documento per il Linux
     Documentation Project.  Fornisce delle indicazioni sull'uso di
     alcuni strumenti, fra cui Emacs e Ispell.


    Loopback-Encrypted-Filesystem-HOWTO, Loopback Encrypted Filesystem
     HOWTO

     Aggiornato: novembre 1999.  Spiega come impostare ed usare un
     filesystem che, quando montato da un utente, dinamicamente ed in
     maniera trasparente cripta il suo contenuto.


    LVM-HOWTO, Logical Volume Manager HOWTO

     Aggiornato: maggio 2000.  Un HOWTO molto pratico sul Linux LVM.


    Mail-Administrator-HOWTO, The Linux Electronic Mail Administrator
     HOWTO

     Aggiornato: gennaio 2000.  Descrive l'impostazione, la cura e il
     feed della posta elettronica (e-mail) sotto Linux.  Pensato
     principalmente per gli amministratori.


    Mail-User-HOWTO, The Linux Mail User HOWTO

     Aggiornato: maggio 1999.  Un'introduzione al mondo della posta
     elettronica (email) sotto Linux.  Si concentra sulle questioni a
     livello utente e su tipiche configurazioni per macchine Linux
     casalinghe e per piccole aziende connesse alla rete attraverso un
     ISP.


    Majordomo-MajorCool-HOWTO, Majordomo and MajorCool HOWTO

     Aggiornato: novembre 1999.  Intende guidare l'utente attraverso un
     installazione del software per mailing list Majordomo e di
     MajorCool (un utilit per gestire liste Majordomo attraverso script
     CGI).


    META-FAQ, Linux Meta-FAQ

     Aggiornato: ottobre 1997.  Principalmente un elenco di importanti
     fonti di informazione per Linux.  Si usino queste fonti per
     inpararne di pi su Linux o se si hanno problemi e serve aiuto.


    MGR-HOWTO, The MGR Window System HOWTO

     Aggiornato: maggio 1996.  Informazioni sull'installazione,
     configurazione ed esecuzione di MGR Window System.


    MILO-HOWTO, Alpha Miniloader HOWTO

     Aggiornato: dicembre 1996.  Descrive il Miniloader di Alpha Linux
     (noto anche come MILO), un programma per sistemi basati su Alpha
     che pu essere utilizzato per inizializzare la macchina e caricare
     Linux.



    MIPS-HOWTO, Linux/MIPS HOWTO

     Aggiornato: marzo 1999.  Descrive il port su MIPS del sistema
     operativo Linux, problemi comuni e loro soluzioni, disponibilit ed
     altro.


    Modem-HOWTO, The Linux Modem HOWTO

     Aggiornato: maggio 2000.  Aiuta a scegliere, connettere, risolvere
     i problemi e a capire i modem per un PC.


    MP3-HOWTO, The Linux MP3 HOWTO

     Aggiornato: aprile 2000.  Descrive l'hardware, il software e le
     procedure necessarie per codificare, suonare e canalizzare file
     sonori MP3 sotto Linux.


    Multi-Disk-HOWTO, HOWTO: Multi Disk System Tuning

     Aggiornato: novembre 1999.  Come usare al meglio dischi e
     partizioni multipli in un sistema Linux.


    MultiOS-HOWTO, Managing Multiple Operating Systems HOWTO

     Aggiornato: febbraio 2000.  Tratta le procedure per usare dischi
     fissi rimovibili per installare e gestire pi sistemi operativi
     alternativi, lasciando un unico disco fisso come dimora permanente
     e per proteggere il sistema operativo primario.


    Multicast-HOWTO, Multicast over TCP/IP HOWTO

     Aggiornato: marzo 1998.  Prova a trattare molti degli aspetti
     relativi al multicast su reti TCP/IP.


    Mutt-GnuPG-PGP-HOWTO, Mutt-i, GnuPG and PGP HOWTO

     Aggiornato: febbraio 2000.  Spiega brevemente come configurare
     Mutt-i, PGP e GnuPG nello loro diverse versioni (2.6.x, 5.x e
     GnuPG).


    NC-HOWTO, Linux Netstation mini-HOWTO

     Aggiornato: dicembre 1999.  Descrive come collegare un IBM
     Netstation alla propria rete locale utilizzando una macchina Linux
     come server.


    NCD-HOWTO, Linux NCD mini-HOWTO

     Aggiornato: settembre 1999.  Descrive come collegare un NCD
     ThinSTAR alla propria rete locale utilizzando una macchina Linux
     come server.


    Net-HOWTO, Linux Networking HOWTO

     Aggiornato: marzo 2000.  Informazioni sul networking per Linux
     (relivo solamente alla versione 4 del Linux Networking Kernel o pi
     specificatamente alle release del kernel 2.x e 2.2.x).
    NET3-4-HOWTO, Linux Networking HOWTO (Previously the Net-3 Howto)

     Aggiornato: agosto 1999. Descrive come installare e configurare il
     software di rete di Linux e gli stumenti associati.


    Networking-Overview-HOWTO, The Linux Networking Overview HOWTO

     Aggiornato: settembre 1999.  Una panoramica sulle capacit di rete
     del sistema operativo Linux; fornisce puntatori ad altre
     informazioni e dettagli implementativi.


    NFS-HOWTO, NFS HOWTO

     Aggiornato: ottobre 1999.  Come impostare client e server NFS.


    NIS-HOWTO, The Linux NIS(YP)/NYS/NIS+ HOWTO

     Aggiornato: marzo 1999.  Come configurare Linux come client NIS(YP)
     o NIS+ e come configurarlo come server NIS.


    Online-Troubleshooting-HOWTO, Online Troubleshooting Resources
     HOWTO

     Aggiornato: settembre 1999.  Indirizza gli utenti di Linux alle
     risorse disponibili su Internet, che forniscono accesso a
     moltissime utili informazioni relative a Linux, indispensabili per
     la risoluzione dei problemi.


    Optical-Disk-HOWTO, Linux - Optical Disk HOWTO

     Aggiornato: dicembre 1998.  Descrive l'installazione e la
     configurazione dei lettori di dischi ottici per Linux.


    Oracle-7-HOWTO, Oracle 7 Database HOWTO

     Aggiornato: agosto 1998.  Una guida all'installazione e alla
     configurazione di Oracle 7 Database Server su un sistema Linux.


    Oracle-8-HOWTO, Oracle (8) for Linux Installation HOWTO

     Aggiornato: aprile 2000. Una guida all'installazione e alla
     configurazione di Oracle 8i Enterprise Edition per Linux.


    PalmOS-HOWTO, Palm OS Desktop HOWTO

     Aggiornato: febbraio 1999.  Spiega come usare dispositivi Palm OS
     con un sistema Linux.


    Parallel-Processing-HOWTO, Linux Parallel Processing HOWTO

     Aggiornato: gennaio 1998.  Discute quattro approcci basilari
     all'elaborazione parallela disponibili agli utenti di Linux:
     sistemi Linux SMP, cluster di sistemi Linux in rete, esecuzione
     parallela tramite istruzioni multimediali (i.e. MMX) e processori
     paralleli su un sistema Linux.


    PCI-HOWTO, Linux PCI-HOWTO

     Aggiornato: marzo 1997.  Informazioni su cosa funziona con Linux e
     cosa no.


    PCMCIA-HOWTO, Linux PCMCIA HOWTO

     Aggiornato: dicembre 1999.  Come installare ed usare PCMCIA Card
     Services con Linux.


    PLIP-Install-HOWTO, PLIP Install HOWTO

     Aggiornato: novembre 1999.  Come installare un distribuzione
     GnuXXPIPELinux su un computer senza scheda Ethernet n cdrom, ma
     solamente un lettore di floppy e un server nfs remoto connesso
     attraverso un cavo parallelo null-modem.


    phhttpd-HOWTO, PHHTTPD

     Aggiornato: gennaio 2000.  phhttpd  un acceleratore HTTP.  Serve
     le fetch HTTP statiche veloci da un filesystem locale e passa le
     richieste dinamiche pi lente ad un server in attesa.


    PHP-HOWTO, PHP HOWTO

     Aggiornato: maggio 2000.  Come sviluppare programmi PHP e come
     migrare le applicazioni GUI di Windows 95 al pi potente PHP + HTML
     + DHTML + XML + Java applet + Javascript. Applicabile a tutti i
     sistemi operativi per i quali  disponibile PHP.


    Plug-and-Play-HOWTO, The Linux Plug-and-Play HOWTO

     Aggiornato: maggio 2000.  Come fare in modo che il proprio sistema
     Linux supporti il Plug-and-Play.


    Polish-HOWTO, Polish HOWTO

     Aggiornato: febbraio 1999.  Tratta le questioni di localizzazione
     di Linux specifiche per gli utenti polacchi (scritto in polacco).


    Portuguese-HOWTO, Portuguese HOWTO

     Aggiornato: dicembre 1999.  Tratta le questioni di localizzazione
     di Linux specifiche per gli utenti portoghesi (scritto in
     portoghese).


    PostgreSQL-HOWTO, Database-SQL-RDBMS HOWTO for Linux (PostgreSQL
     Object Relational Database System)

     Aggiornato: giugno 2000.  Una "guida pratica" all'impostazione
     rapida di un motore di database SQL e degli strumenti di
     interfaccia su un sistema Unix.


    PPP-HOWTO, Linux PPP HOWTO

     Aggiornato: marzo 1997.  Come connettere il proprio PC Linux ad un
     server PPP, come usare PPP per connettere assieme due LAN; fornisce
     un metodo per impostare il proprio computer Linux come server PPP.


    Printing-HOWTO, The Linux Printing HOWTO

     Aggiornato: febbraio 2000.  Una collezione di informazioni su come
     generare, fare l'anteprima, stampare ed inviare via fax qualsiasi
     cosa sotto Linux (e altri Unix in genere).


    Printing-Usage-HOWTO, The Linux Printing Usage HOWTO

     Aggiornato: febbraio 1998.  Come usare il sistema di stampa sotto
     Linux.


    Process-Monitor-HOWTO, Process Monitor HOWTO for Linux

     Aggiornato: aprile 2000.  Come monitorare i processi di Linux/Unix
     e riavviarli automaticamente se muoiono (senza alcun intervento
     manuale).


    Program-Library-HOWTO, Program Library HOWTO

     Aggiornato: aprile 2000.  Questo HOWTO per programmatori discute
     come creare ed usare librerie programma sotto Linux.  Queste
     includono le librerie statiche, condivise e caricate dinamicamente.


    Psion-HOWTO, Linux and Psion HOWTO

     Aggiornato: novembre 1999.  Come usare i palmari Psion con Linux.
     Non tratta l'esecuzione di Linux su un palmare Psion.


    Qmail-VMailMgr-Courier-imap-HOWTO, Qmail VMailMgr and Courier-Imap
     HOWTO

     Aggiornato: aprile 2000. Costruire un mail server che supporter il
     virtual domain hosting e fornir servizi smtp, pop3 e imap,
     utilizzando una potente alternativa a sendmail.


    Quake-HOWTO, Linux Quake HOWTO

     Aggiornato: agosto 1998.  Come installare, eseguire e risolvere i
     problemi di Quake, QuakeWorld e Quake II su un sistema Linux Intel.


    Reading-List-HOWTO, The Linux Reading List HOWTO

     Aggiornato: marzo 2000.  Elenca i libri che secondo l'autore
     possono essere di notevole aiuto a una persona che voglia imparare
     Unix (specialmente Linux) dalle cose pi generali sino alle pi
     specifiche.


    RedHat-CD-HOWTO, Burning a RedHat CD HOWTO

     Aggiornato: marzo 2000.  Come creare da una distribuzione Red Hat
     Linux i propri CD personali equivalenti a quelli disponibili a
     pagamento dalla Red Hat.



    Root-RAID-HOWTO, Root RAID HOWTO cookbook

     Aggiornato: marzo 1998.  Questo documento si tratta solo i VECCHI
     raidtools, le versioni 0.50 e precedenti.  I workaround e le
     soluzioni proposte in questo HOWTO sono state rese obsolete dai
     molti miglioramenti introdotti nella versioni 0.90 dei raidtools e
     le relatice patch per i kernel 2.0.37 e della serie 2.2.x e 2.3.x.
     Si pu trovare utile questa dettagliata descrizione se si intende
     utilizzare il root raid e usare initrd.

     descrizione originale: Un ricettario per creare un filesystem raid
     da montare come root e il relativo sistema di ripristino di ripiego
     usando initrd di Linux.  Istruzioni passo passo per i device md0
     sia di tipo raid1 che raid5.


    RPM-HOWTO, RPM HOWTO - RPM at Idle

     Aggiornato: novembre 1999.  RPM  RPM Package Manager.  un sistema
     di pacchetti aperto disponibile a tutti.  Permette agli utenti di
     prendere il codice sorgente di un nuovo software e impacchettarlo
     in formato sorgente e binario cosicch i binari possano essere
     facilmente installati e gestiti e i sorgenti possano essere
     ricompilati facilmente.  Mantiene pure un database di tutti i
     pacchetti e dei loro file che pu essere utilizzato per verificare
     pacchetti e interrogato per sapere informazioni sui file e/o sui
     pacchetti.


    SCSI-Programming-HOWTO,The Linux SCSI programming HOWTO

     Aggiornato: maggio 1996.  Tratta la programmazione dell'interfaccia
     SCSI generica di Linux.


    Secure-Programs-HOWTO, Secure Programming for Linux HOWTO

     Aggiornato: aprile 2000.  Fornisce un insieme di regole di progetto
     e di impletazione per scrivere programmi sicuri per sistemi Linux.


    Securing-Domain-HOWTO, Setting Up Your New Domain Mini HOWTO

     Aggiornato: dicembre 1999.  Illustra le cose che probabilmente si
     dovranno fare quando si vuole impostare una rete di computer sotto
     un proprio dominio.  Tratta la configurazione dei parametri di
     rete, dei servizi di rete e le impostazioni di sicurezza.


    Security-HOWTO, Linux Security HOWTO

     Aggiornato: marzo 2000.  Una panoramica generale sulle questioni di
     sicurezza che si presentano agli amministratori di sistemi Linux.


    Serbian-HOWTO, Serbian HOWTO

     Aggiornato: novembre 1998.  Tratta le questioni di localizzazione
     di Linux specifiche per gli utenti serbi (scritto in serbo).


    Serial-HOWTO, The Linux Serial HOWTO

     Aggiornato: maggio 2000.  Descrive le altre caratteristiche delle
     porte seriali, ovvero quelle che non dovrebbero gi essere state
     trattate in altri HOWTO.  Elenca le informazioni sulle schede
     seriali multiporta e contiene informazioni tecniche dettagliate
     sulle porte seriali.


    Serial-Programming-HOWTO, The Linux Serial Programming HOWTO

     Aggiornato: gennaio 1998.  Come programmare le comunicazioni con
     dispositivi su porta seriali su una macchina Linux.


    Shadow-Password-HOWTO, Linux Shadow Password HOWTO

     Aggiornato: aprilee 1996.  Come ottenere, installare e configurare
     la Linux password Shadow Suite.


    Slovenian-HOWTO, Slovenian HOWTO

     Aggiornato: febbraio 1999.  Tratta le questioni di localizzazione
     di Linux specifiche per gli utenti sloveni (scritto in sloveno).


    SMB-HOWTO, SMB HOWTO

     Aggiornato: aprile 2000.  Come usare il protocollo Server Message
     Block (SMB), chiamato anche protocollo Session Message Block,
     NetBIOS o LanManager, con Linux usando Samba.


    SMP-HOWTO, Linux SMP HOWTO

     Aggiornato: gennaio 2000.  Panoramica sulle principali questioni
     relative alla configurazione SMP sotto Linux.


    Software-Building-HOWTO, Building and Installing Software Packages
     for Linux

     Aggiornato: luglio 1999.  Una guida completa alla compilazione e
     installazione di distribuzioni di software Unix "generico" sotto
     Linux.


    Software-RAID-HOWTO, Software-RAID HOWTO

     Aggiornato: gennaio 2000 (ultima versione).  Come usare il Software
     RAID sotto Linux. Tratta una versione specifica del layer di
     Software RAID, chiamata 0.90 RAID layer fatta da Ingo Molnar ed
     altri.  Questo  il layer RAID che sar standard in Linux 2.4 ed 
     pure la versione usata dai kernel v2.2 distribuiti da alcuni
     rivenditori.  Il supporto 0.90 RAID  disponibile come patch per
     Linux 2.0 e Linux 2.2 ed  da molti considerato molto pi stabile
     del vecchio supporto RAID gi presente in questi kernel.


    Software-RAID-0.4x-HOWTO, Software-RAID HOWTO (prima
     implementazione)

     Aggiornato: novembre 1998.  Come usare il Software RAID sotto
     Linux. RAID sta per "Redundant Array of Inexpensive Disks".  Per
     gli utenti delle estensioni MD del kernel di Linux e degli
     strumenti associati.  Questo HOWTO tratta la prima implementazione.


    Software-Release-Practice-HOWTO, Software Release Practice HOWTO

     Aggiornato: giugno 2000.  Descrive le buone regole di rilascio per
     progetti open-source per Linux.


    Sound-HOWTO, The Linux Sound HOWTO

     Aggiornato: marzo 1999.  Descrive il supporto audio per Linux
     (hardware, configurazione, ecc).


    Sound-Playing-HOWTO, The Linux Sound Playing HOWTO

     Aggiornato: agosto 1998.  Elenca le applicazioni per Linux per
     suonare i vari formati sonori.


    Spanish-HOWTO, Spanish Linux HOWTO

     Aggiornato: agosto 1996.  Contiene informazioni su Linux per
     l'ambiente spagnolo, per sviluppare software con il supporto per lo
     spagnolo e su come entrare in contatto con la comunit Linux in
     Spagna (scritto in spagnolo).


    SRM-HOWTO, SRM Firmware HOWTO

     Aggiornato: marzo 2000.  Come avviare Linux/Alpha usando il
     firmware SRM, che  il firmware solitamente utilizzato per avviare
     DEC Unix (noto anche come OSF/1 e Tru64Unix) e OpenVMS.


    User-Authentication-HOWTO, User Authentication HOWTO

     Aggiornato: maggio 2000.  Spiega come sono salvate le informazioni
     sugli utenti e i gruppi, come sono autentificati gli utenti in un
     sistema Linux (PAM), e come rendere sicura l'autentificazione degli
     utenti nel proprio sistema.


    TclTk-HOWTO, The Linux Tcl and Tk HOWTO

     Aggiornato: novembre 1998.  Descrive l'approccio Linux a Tcl, un
     linguaggio di scripting.


    TeTeX-HOWTO, The teTeX HOWTO: The Linux-teTeX Local Guide

     Aggiornato: novembre 1998.  Tratta l'installazione e l'uso
     dell'implementazione teTeX di TeX e LaTeX, oltre ai pacchetti
     ausiliari come Ghostscript.


    Text-Terminal-HOWTO, The Linux Text-Terminal HOWTO

     Aggiornato: maggio 2000.  Spiega cosa sono i terminali testo, come
     funzionano, come si installano e configurano, e fornisce qualche
     informazione su come ripararli.


    Thai-HOWTO, The Linux Thai HOWTO

     Aggiornato: agosto 1998.  Come usare la lingua tailandese con
     Linux. Tratta l'impostazione dei font, della tastiera e di alcune
     applicazioni specifiche per il tailandese.


    Thinclient-HOWTO, Thin Client: New User Guide

     Aggiornato: novembre 1999.  Come convertire computer legacy poco
     costosi in veloci terminali.


    Tips-HOWTO, The Linux Tips HOWTO

     Aggiornato: giugno 1998.  Contiene tutti quei suggerimenti e
     trucchi cos difficili da trovare che fanno Linux un po' pi bello.


    Turkish-HOWTO, Turkish HOWTO

     Aggiornato: settembre 1999.  Tratta le questioni di localizzazione
     di Linux specifiche per gli utenti turchi (scritto in turco).


    UMSDOS-HOWTO, UMSDOS HOWTO

     Aggiornato: novembre 1995.  Spiega come usare in diverse
     configurazioni e come funziona Umsdos (un filesystem di Linux).


    Unicode-HOWTO, The Unicode HOWTO

     Aggiornato: ottobre 1999.  Come modificare il proprio sistema Linux
     per utilizzare UTF-8 come codifica testo.


    Unix-and-Internet-Fundamentals-HOWTO, The Unix and Internet
     Fundamentals HOWTO

     Aggiornato: marzo 2000.  Descrive le basi di funzionamento dei PC,
     dei sistemi operativi stile Unix e di Internet in un linguaggio non
     tecnico.


    UPS-HOWTO, The UPS HOWTO

     Aggiornato: novembre 1997.  Aiuta a connettere un gruppo di
     continuit ad una macchina Linux.


    User-Group-HOWTO, Linux User Group HOWTO

     Aggiornato: aprilee 1998.  Una guida per fondare, mantenere e far
     crescere un Linux User Group.


    UUCP-HOWTO, The Linux UUCP HOWTO

     Aggiornato: febbraio 1998.  Descrive l'impostazione, la cura e il
     feed di UUCP sotto Linux.


    VAR-HOWTO, Linux VAR HOWTO

     Aggiornato: agosto 1999.  Contiene un elenco di compagnie di
     servizio che non fanno hardware o creano pacchetto software, ma
     aggiungono valore ai prodotti esistenti.


    Vim-HOWTO, Vim Color Editor HOWTO (Vi Improved w/syntax color
     highlighting)

     Aggiornato: aprile 2000.  Una guida all'impostazione rapida
     dell'editor a colori Vim su sistemi Linux o Unix.


    Virtual-Services-HOWTO ,Virtual Services HOWTO

     Aggiornato: agosto 1998.  Come virtualizzare un servizio.


    VMailMgr-HOWTO, VMailMgr HOWTO

     Updated: April 2000.  Spiega come impostare VMmailMgr con Qmail per
     supportare i servizi di dominio virtuale pop3.


    VME-HOWTO, VME HOWTO

     Aggiornato: luglio 1998.  Mostra alla comunit dei sistemi embedded
     come usare Linux nei loro Pentium su VMEbus o altri bus PCI basati
     sul progetto del processore VMEbus.


    VMS-to-Linux-HOWTO, From VMS to Linux HOWTO

     Aggiornato: settembre 1999.  Dedicato a tutti quelli che hanno
     usato VMS e ora vogliono o devono passare a Linux.


    VPN-HOWTO, VPN HOWTO

     Aggiornato: dicembre 1999.  Come impostare una rete privata
     virtuale sotto Linux.


    VPN-Masquerade-HOWTO, Linux VPN Masquerade HOWTO

     Aggiornato: settembre 1999.  Come configurare un firewall Linux per
     mascherare traffico su reti private virtuali basate su IPsec e
     PPTP, permettendo di stabilire connessioni VPN senza compromettere
     la sicurezza e la flessibilit della connessione internet del
     proprio firewall Linux e permettendo di rendere disponile un server
     VPN che non ha un indirizzo IP registrato.


    Wacom-Tablet-HOWTO, Wacom Tablet HOWTO

     Aggiornato: marzo 2000.  Installazione (e non solo) delle tavolette
     grafiche Wacom sotto linux e/o xfree86.


    Wearable-HOWTO, Wearable HOWTO

     Aggiornato: marzo 2000.  Il nomadismo  una delle principali
     tendenze della nostra societ; ora la maggior parte delle gente pu
     lavorare con un computer portatile, ma pochi hanno fatto il passo
     successivo: vivere, o se si preferisce, indossare un computer.


    Winmodems-and-Linux-HOWTO, Winmodems-and-Linux HOWTO

     Aggiornato: aprile 2000.  Aiuta gli utenti che hanno un Winmodem a
     farlo funzionare sotto Linux.


    WWW-HOWTO, Linux WWW HOWTO

     Aggiornato: agosto 1999.  Informazioni sull'impostazione di servizi
     WWW sotto Linux (sia dal punto di vista server che client).


    WWW-mSQL-HOWTO, A mSQL and perl Web Server HOWTO

     Aggiornato: settembre 1997.  Come costruire un database
     client/server SQL usando WWW e HTML per l'interfaccia utente.


    XFree86-HOWTO, The Linux XFree86 HOWTO

     Aggiornato: aprile 2000.  Come ottenere, installare e configurare
     la versione 4.0 di XFree86, l'X Window System (X11R6) per sistemi
     Linux.


    XFree86-Touch-Screen-HOWTO, Linux Touch Screen HOWTO

     Aggiornato: dicembre 1999.  Come impostare un dispositivo di input
     a touch screen sotto XFree86.


    XFree86-Video-Timings-HOWTO, XFree86 Video Timings HOWTO

     Aggiornato: marzo 2000.  Come comporre una mode line di XFree86 per
     la propria conbinazione di scheda video e monitor.


    Xinerama-HOWTO, Using the Xinerama Extensions to MultiHead X V. 4.0

     Aggiornato: maggio 2000.  Come configurare XFree86 versione 4.0 con
     pi monitor e le estensioni Xinerama.


    XWindow-User-HOWTO, The X Window User HOWTO

     Aggiornato: settembre 1999.  Informazioni sulla configurazione
     dell'ambiente X Window per utenti Linux, oltre ad alcune dritte
     sull'ammistrazione di sistema per provare a venire a capo delle
     molte opzioni di configurazione e dettagli di X Window.



  3.2.  mini-HOWTO

  Sono disponibili i seguenti mini-HOWTO:


    3-Button-Mouse, The 3 Button Serial Mouse mini-HOWTO

     Aggiornato: maggio 1998. Come far funzionare correttamente sotto
     Linux un mouse seriale a 3 tasti.


    ADSL, ADSL HOWTO for Linux Systems

     Aggiornato: aprile 1999.  Come impostare un sistema Linux per
     funzionare con Asymmetric Digital Subscriber Loop (ADSL).


    ADSM-Backup, Linux ADSM mini-HOWTO

     Aggiornato: gennaio 1997.  Come installare ed usare un client per
     Linux/i386 del sistema commericiale di backup ADSM.

    Advocacy, Linux Advocacy mini-HOWTO

     Aggiornato: maggio 2000.  Suggerimenti su come la comunit Linux
     pu efficacemente difendere/sostenere l'uso di Linux.


    Alsa-sound, Alsa-sound-mini-HOWTO

     Aggiornato: novembre 1999.  Descrive l'installazione dei driver
     audio ALSA per Linux.


    Apache-mods,
     Apache+DSO+mod_ssl+mod_perl+php+mod_auth_nds+mod_auth_mysql+mod_fastcgi
     mini-HOWTO

     Aggiornato: aprile 2000.  Dettagli sull'installazione di un
     webserver basato su Apache configurato per gestire DSO e vari
     moduli utili tra cui mod_perl, mod_ssl e php.


    Apache+SSL+PHP+fp, Linux Apache SSL PHP/FI frontpage mini-HOWTO

     Aggiornato: luglio 1998.  Sulla costruzione di un webserver
     multipurpose che supporter il contenuto dinamico delle pagine web
     attraverso il linguaggio di scripting PHP/FI, la trasmissione
     sicura dei dati basata su SSL di Netscape, l'esecuzione sicura di
     CGI e le M$ Frontpage Server Extensions.


    Automount, Automount mini-HOWTO

     Aggiornato: aprile 1999.  Descrive l'automounter autofs e come
     configurarlo; si concentra su alcuni problemi da evitare.


    Backup-With-MSDOS, Backup-With-MSDOS mini-HOWTO

     Aggiornato: agosto 1997.  Come usare un lettore a nastro
     compatibile con Linux installato su una macchina MS-DOS per fare il
     back-up del filesystem di una macchina Linux.


    Battery-Powered, Battery Powered Linux Mini-HOWTO

     Aggiornato: dicembre 1997.  Come ridurre il consumo di energia di
     un sistema Linux regolando finemente alcuni dei suoi parametri di
     configurazione.


    Boca, Boca HOWTO

     Aggiornato: agosto 1997.  Come installare sotto Linux una scheda a
     16 porte seriali della Boca (Boca 2016).


    BogoMips, BogoMips mini-HOWTO

     Aggiornato: febbraio 2000.  Alcune informazioni, raccolte da varie
     fonti, sui BogoMips.


    Boot+Root+Raid+LILO, Boot + Root + Raid + Lilo : Software Raid
     mini-HOWTO

     Aggiornato: maggio 2000.  Un ricettario per impostare il root raid
     usando i raidtools 0.90 per raid avviabili montati nella root
     usando LILO standard.


    Bridge+Firewall, Linux Bridge+Firewall Mini-HOWTO

     Aggiornato: dicembre 1997. Un bridge  una linea di connessione
     intelligente fra due schede di rete.  Un firewall  un isolatore
     intelligente.


    Bridge+Firewall+DSL, Bridge + Firewall + DSL Mini-HOWTO

     Aggiornato: marzo 2000.  Configurare un sistema Linux con una
     connessione di rete DSL per operare come firewall e bridge.


    Bridge, Bridging mini-HOWTO

     Aggiornato: settembre 1998.  Descrive come impostare un bridge
     ethernet.


    BTTV-Mini-HOWTO-0.3, The BTTV Mini-HOWTO

     Aggiornato: febbraio 2000.  Descrive l'hardware, il software e le
     procedure necessarie per usare sotto Linux un frame grabber o una
     scheda di sintonizzazione TV basate sul chipset bt8x8.


    Bzip2, Bzip2 mini-HOWTO

     Aggiornato: agosto 1999.  Come usare il nuovo programma di
     compressione bzip2.


    call-back call-back mini HOWTO

     Aggiornato: marzo 2000.  Come configurare il call-back (richiamo)
     usando un sistema Linux e un modem.


    Cipe+Masq, The Linux Cipe+Masquerading mini-HOWTO

     Aggiornato: aprile 1999.  Come impostare una VPN usando Cipe su un
     firewall di masquerading sotto Linux.


    Clock, The Clock Mini-HOWTO

     Aggiornato: luglio 1999 Come impostare e mantenere sincronizzato
     l'orologio del proprio computer.


    Coffee, COFFEE-HOWTO

     Aggiornato: gennaio 1998.  S, Linux FA il caff e lo fa anche
     buono.


    Commercial-Port-Advocacy, Commercial Port Advocacy mini-HOWTO

     Aggiornato: dicembre 1999. Discute i metodi che possono essere
     usati per contattare le aziende di software commerciale per
     convincerle a portare i loro programmi su Linux.

    Compressed-TCP, Compressed TCP/IP-Sessions using SSH-like tools

     Aggiornato: aprile 2000.  Discute come comprimere il flusso di
     dati.


    Cyrus-IMAP, Install Cyrus IMAP Server mini-HOWTO

     Aggiornato: gennaio 1998.  Un po' di aiuto nell'installazione del
     Cyrus IMAP Server su una macchina Linux.


    DHCP, DHCP mini-HOWTO

     Aggiornato: novembre 1999.  Risponde alle domande basilari su come
     configurare la propria macchina Linux per funzionare come server o
     come client DHCP.


    Divert-Sockets-mini-HOWTO, Divert Sockets mini-HOWTO

     Aggiornato: febbraio 2000.  Descrive come ottenere, compilare e
     usare FreeBSD divert sockets sotto Linux 2.2.12.


    Domain-Setup-mini-HOWTO, Setting Up Your New Domain Mini-HOWTO

     Aggiornato: febbraio 2000.  Spiega le cose che probabilmente si
     dovranno fare per impostare una rete di computer sotto il proprio
     dominio.


    DPT-Hardware-RAID, Linux DPT Hardware RAID HOWTO

     Aggiornato: aprile 1999.  Come impostare il RAID hardware sotto
     Linux.


    Ext2fs-Undeletion, Linux Ext2fs Undeletion mini-HOWTO

     Aggiornato: febbraio 1999.  Presenta una discussione su come
     recuperare file cancellati da un Second Extended File System.


    Fax-Server, Linux simple fax printer server mini-HOWTO (faxsrv-
     mini-HOWTO)

     Aggiornato: novembre 1997.  Descrive in dettaglio uno dei modi pi
     semplici per impostare un fax server nella proprio sistema Linux.


    Font-Deuglification-mini-HOWTO, XFree86 Font Deuglification Mini
     HOWTO

     Aggiornato: novembre 1999.  Come sistemare i brutti e illegibili
     font di X Window.


    Firewall-Piercing, Firewall Piercing mini-HOWTO

     Aggiornato: novembre 1998.  Suggerimenti per usare ppp sopra il
     telnet per fare attivit di rete in maniera trasparente attraverso
     un firewall Internet.



    FTP, FTP mini-HOWTO

     Aggiornato: gennaio 2000.  Come usare i client e i server ftp.


    GIS-GRASS, GIS-GRASS mini-HOWTO

     Aggiornato: novembre 1997.  Come acquisire, installare e
     configurare un potente Sistema Informativo Geografico (GIS) di
     pubblico dominio: il Geographic Resources Analysis Support System
     (GRASS).


    Handspring-Visor, Handspring-Visor mini-HOWTO

     Aggiornato: aprile 2000.  Usare il Visor con Linux e la propria
     porta USB.


    Hard-Disk-Upgrade, Hard Disk Upgrade Mini HOWTO

     Aggiornato: aprile 2000.  Come copiare un sistema Linux da un disco
     fisso ad un altro.


    Home-Network-mini-HOWTO, Red Hat Linux 6.X as an Internet Gateway
     for a Home Network

     Aggiornato: gennaio 2000.  Un tutorial sulla configurazione di Red
     Hat 6 e le sue varianti per operare come un gateway internet per
     una piccola rete casalinga o aziendale.  Gli argomenti trattati
     comprendono masquerading, DNS, DHCP e principi di sicurezza.


    Install-From-ZIP, Linux Install From PPA-Zip drive mini-HOWTO

     Aggiornato: aprile 1998. Come installare Linux da un lettore zip su
     porta parallela utilizzando la distribuzione Slackware Linux.


    Intkeyb, mini-HOWTO for Linux (Unix) to setup international
     keyboards

     Aggiornato: aprile 2000.  Queste soluzioni xmodmap e kimap
     funzioneranno per chiunque voglia impostare una qualsiasi tastiera
     internazionale per (Debian, RedHat, Mandrake, Corel Linux) Linux,
     FreeBSD, OpenBSD, NetBSD e probabilmente qualsiasi Unix che usi
     Xfree86 and KDE.


    IO-Port-Programming, Linux I/O port programming mini-HOWTO

     Aggiornato: dicembre 1997.  Descrive la programmazione delle porte
     di I/O hardware e le attese per brevi periodi tempo nei programmi
     Linux in modalit utente su architetture Intel x86.


    IP-Subnetworking, IP Sub-Networking mini-HOWTO

     Aggiornato: marzo 1997.  Descrive perch e come creare delle
     sottoreti in una rete IP, cio usare un unico numero di rete di
     Classe A, B o C per operare correttamente su diverse reti
     interconnesse.



    IP-Alias, Setting Up IP Aliasing On A Linux Machine Mini-HOWTO

     Aggiornato: gennaio 1997.  Come configure ed usare l'IP aliasing su
     una macchina Linux.


    IPMasquerading+Napster, IPMasquerading+Napster mini-HOWTO

     Aggiornato: aprile 2000.  Presenta un modo per permettere agli
     utenti dietro un sistema di IPMasquerading di utilizzare Napster.


    ISP-Connectivity, ISP-Connectivity mini-HOWTO

     Aggiornato: novembre 1997.  Come configurare il PPP, connettersi al
     proprio ISP, configurare la posta e le news, ottenere un IP
     permanente (se disponibile), ottenere un nome di dominio e avere un
     sistema decente in poco pi di trenta minuti.


    Kerneld, The Linux kerneld mini-HOWTO

     Aggiornato: maggio 2000.  Spiega come usare kerneld con i kernel di
     Linux.


    LBX, The LBX mini-HOWTO

     Aggiornato: dicembre 1997.  LBX (Low Bandwidth X)  un'estensione
     del server X che effettua una compressione del protocollo X.  
     pensato per essere usato assieme ad applicazioni X e un server X
     separati da una connessione di rete lenta, per migliorare i tempi
     di visualizzazione e risposta.


    Leased-Line, Leased line mini-HOWTO

     Aggiornato: aprile 2000.  Configurare il proprio modem e pppd per
     usare una linea in affitto a due cavi a doppino intrecciato.


    LILO, Lilo mini-HOWTO

     Aggiornato: agosto 1998.  Lilo (LILO)  il caritore di Linux pi
     utilizzato per la versione per x86 di Linux.  Questo documento
     descrive alcune installazioni tipiche di Lilo.   pensato come
     supplemento alla Lilo User's Guide.


    Linux+DOS+Win95+OS2, The Linux ``Linux-DOS-Win95-OS2'' mini-HOWTO

     Aggiornato: novembre 1997. Presenta una procedura per far s che i
     4 sistemi operativi coesistano sullo stesso disco fisso.


    Linux+FreeBSD, The Linux+FreeBSD mini-HOWTO

     Aggiornato: marzo 2000.  Come usare Linux e FreeBSD sullo stesso
     sistema.


    Linux-Modem-Sharing Linux Modem sharing mini-HOWTO

     Aggiornato: febbraio 1997.  Descrive come configurare un sistema
     Linux per poter condividere un modem attaccato a questo sistema con
     altri sistemi su una rete TCP/IP.
    Linux+NT-Loader, NT OS Loader + Linux mini-HOWTO

     Aggiornato: settembre 1997.  Descrive l'uso del boot loader di
     Windows NT per avviare Linux.  Questa procedura  stata verificata
     con Windows NT 4.0 WS e Linux 2.0.


    Linux+Solaris, Linux+Solaris mini-HOWTO

     Aggiornato: aprile 2000.  Descrive come usare Solaris e Linux
     assieme su una macchina.  Tratta le questioni comuni come il
     multibooting e la condivisione dei file.


    Linux+Win95, Yes my Children, it CAN be DONE!

     Aggiornato: aprile 1996.  Installare sia Linux che Windows 95 sul
     proprio PC.


    Loadlin+Win95, The Loadlin+Win95 mini-HOWTO

     Aggiornato: marzo 1999.  Come usare Loadlin con Windows 95 per
     avviare Linux.


    Loopback-Root-FS, The Loopback Root Filesystem HOWTO

     Aggiornato: settembre 1999.  Come usare il device loopback di Linux
     per creare un'installazione di Linux sul formato di filesystem
     nativo che pu essere utilizzata in una partizione DOS senza
     ripartizionare.


    Mac-Terminal, The MacTerminal mini-HOWTO

     Aggiornato: novembre 1997.  Come configurare un Mac per usarlo come
     terminale Linux.


    Mail-Queue, Linux Mail-Queue mini-HOWTO

     Aggiornato: settembre 1997.  Le modifiche alla configurazione
     necessarie affinch sendmail distribuisca la posta locale ora;
     mentre mette da parte la posta remota in una coda finch non glielo
     si dice.


    Mail2News, Mail2News mini-HOWTO

     Aggiornato: luglio 1999.  Come fare il feed di una mailing list in
     un news server.


    Man-Page, The Linux Man Page mini-HOWTO

     Aggiornato: gennaio 2000.  Spiega quel che si dovrebbe tenere in
     mente quando si ha intenzione di scrivere documentazione in linea
     -- una cosiddetta pagina man -- che si vuole rendere accessibile
     attraverso il comando man(1).


    Modules, Linux Modules Installation mini-HOWTO

     Aggiornato: n/a Come impostare Linux con i moduli configurati e
     funzionanti.
    Multiboot-with-LILO, Win95 + WinNT + Linux multiboot using LILO
     mini-HOWTO

     Aggiornato: marzo 1998.  Come usare il boot multiplo tra Windows
     95, Windows NT e Linux.


    NCD-X-Terminal, NCD X terminal mini HOWTO

     Aggiornato: marzo 2000.  Come connettere un terminale X NCD ad un
     host Unix.


    Netrom-Node, Netrom-Node mini-Howto

     Aggiornato: ottobre 1998.  Come impostare il pacchetto
     ax25-utilities per radio amatori in modo che crei nodi Netrom per
     il programma Node e il software BBS di John-Paul Roubelat, F6FBB.


    Netscape+Proxy, HOWTO for inHouse IntraNet

     Aggiornato: agosto 1997.  Descrive le procedure per impostare una
     RETE (INTRANET) in casa.  Poi si potrebbe impostare la rete in modo
     tale che i client Netscape possano essere usati su QUALSIASI
     macchina per accedere ad internet...


    Netstation, Linux Netstation mini-HOWTO

     Aggiornato: febbraio 1998.  Come connettere un IBM Netstation alla
     propria rete locale usando una macchina Linux come server.


    News-Leafsite, News Leafsite mini-HOWTO

     Aggiornato: gennaio 1998.  Aiuter a configurare un piccolo sito
     "foglia" per le news di Usenet utilizzando il pacchetto software
     libero Leadnode.


    NFS-Root, NFS-Root mini-HOWTO

     Aggiornato: agosto 1997.  Come impostare una workstation Linux
     ``senza disco'', che monta il filesystem di root via NFS.


    NFS-Root-Client, NFS-Root-Client mini-HOWTO

     Aggiornato: febbraio 1999.  Come creare directory root su un server
     usato da client che montano via NFS la root.


    Offline-Mailing, Linux off-line mailing method (offline mailaddr
     with 1 account)

     Aggiornato: giugno 1998.  Usare offline il sistema di posta di
     linux, ricevendo la posta per pi utenti usando solo un indirizzo
     email e senza essere connessi 24 ore su 24.


    Partition-Rescue-mini-HOWTO, The Linux Partition-Rescue mini-HOWTO

     Aggiornato: gennaio 2000.  Descrive come recuperare la propria
     partizione Linux se M$-DOG l'ha cancellata.

    Partition, Linux Partition HOWTO

     Aggiornato: maggio 2000.  Insegna a pianificare e disporre lo
     spazio su disco per il proprio sistema Linux.


    Path, PATH HOWTO

     Aggiornato: novembre 1997.  Descrive alcuni trucci comuni e
     problemi con le variabili d'ambiente di Unix/Linux, specialmente
     con la variabile PATH.


    PLIP, LINUX PLIP mini-HOWTO

     Aggiornato: marzo 1998.  Dovrebbe permettere di configurare ed
     usare il Parallel Line Interface Protocol.


    Pre-Installation-Checklist, Linux pre-installation checklist

     Aggiornato: dicembre 1999.  Un memorandum che rende l'installazione
     di Linux un'esperienza piacevole.


    Process-Accounting, How To Enable Process Accounting on Linux

     Aggiornato: agosto 1997.  Descrive come abilitare l'accounting di
     sistema dei processi su un host Linux e l'uso dei diversi comandi
     per l'accounting.


    Programming-Languages, Programming Languages mini-HOWTO

     Aggiornato: gennaio 2000.  Un breve confronto dei principali
     linguaggi di programmazione per Linux e delle principali librerie
     per la creazione di interfacce utente grafiche (GUI) sotto Linux.


    Proxy-ARP-Subnet, ProxyARP Subnetting HOWTO

     Aggiornato: agosto 1997.  Discute l'uso del Proxy Address
     Resolution Protocol (ARP) con il subnetting in modo da creare una
     piccola rete di macchine visibile su un'altra sotto rete IP.


    Public-Web-Browser, The Linux Public Web Browser mini-HOWTO

     Aggiornato: gennaio 1998.  L'idea di base  di dare accesso web
     alla gente che lo desidera, limitando contemporaneamente la loro
     possibilit di fare danni.


    Qmail+MH, mini-HOWTO install qmail with MH

     Aggiornato: marzo 1998.  Esperienze di installazione che offrono
     qualche aiuto a chi desidera usare questa combinazione per l'email.


    Quota, Quota mini-HOWTO

     Aggiornato: agosto 1997.  Come abilitare la quota di filesystem su
     una macchina Linux, assegnando quote per utenti e gruppi, oltre
     all'uso dei vari comandi quota.


    RCS, The RCS mini-HOWTO

     Aggiornato: agosto 1997.  Tratta le basi dell'installazione e
     dell'uso di RCS, il GNU Revision Control System, sotto Linux.


    Remote-Boot, Linux Remote-Boot mini-HOWTO:  Configuring Remote-Boot
     Workstations with Linux, DOS, Windows 95/98 and Windows NT

     Aggiornato: febbraio 1999.  Come impostare una configurazioen
     server molto sicura e robusta per un cluster di PC, permettendo a
     ciascun client di scegliere all'avvio quale sistema operativo
     utilizzare.


    Remote-X-Apps, Remote X Apps mini-HOWTO

     Aggiornato: novembre 1999.  Come eseguire applicazione X remote.


    RPM+Slackware, RPM+Slackware Mini-Howto

     Aggiornato: aprile 1998.  Come installare e far funzionare
     correttamente RPM nella Slackware.


    Saving-Space, Saving Space mini-HOWTO

     Aggiornato: aprile 1999.  Indicazioni su come ridurre la propria
     installazione di Linux nel minor spazio possibile. Particolarmente
     indicato per gli utilizzatori di computer portatili.


    Secure-POP+SSH, Secure POP via SSH mini-HOWTO

     Aggiornato: settembre 1998.  Come impostare una connessione POP
     sicura usando ssh.


    Sendmail+UUCP, Sendmail+UUCP HOWTO

     Aggiornato: maggio 1998.  Come impostare una macchina senza accesso
     diretto ad Internet per instradare la posta tramite sendmail e UUCP
     ad un smart host (p.es. il proprio ISP).


    Sendmail-Address-Rewrite, sendmail address rewriting mini-HOWTO

     Aggiornato: maggio 1998.  Una breve descrizione su come impostare
     il file di configurazione di sendmail per l'accesso in dial-up
     degli utenti casalinghi.


    SLIP-PPP-Emulator, SLIP/PPP Emulator HOWTO

     Aggiornato: agosto 1997.  Descrive come far s che la propria
     macchina Linux possa connettersi ad un sito generico attraverso un
     emulatore di SLIP/PPP, come SLiRP o TIA.


    Small-Memory, Small Memory Mini-HOWTO

     Aggiornato: marzo 2000.  Come eseguire Linux su un sistema con poca
     memoria.


    Soundblaster-AWE, Sound Blaster AWE 32/64 HOWTO

     Aggiornato: gennaio 1998.  Come installare e configurare una scheda
     Sound Blaster 32 (SB AWE 32, SB AWE 64) della Creative Labs in un
     sistema Linux usando le AWE Sound Driver Extension scritte da
     Takashi Iwai.  Tratta anche alcuni strumenti e player speciali per
     la serie SB AWE.


    StarOffice, StarOffice 3.1 Mini-HOWTO

     Aggiornato: novembre 1999.  Informazioni sull'installazione di
     StarOffice 3.1 Office Suite della StarDivision.


    Swap-Space, Linux Swap Space Mini-HOWTO

     Aggiornato: dicembre 1999.  Come condividere la partizione di swap
     di Linux con Windows.


    Term-Firewall, Using Term to Pierce an Internet Firewall

     Aggiornato: luglio 1996.  Indicazione su come usare term per fare
     operazioni di rete attraverso un firewall TCP che si suppone non
     permetta di fare tali operazioni.


    TkRat, TkRat mini-HOWTO

     Aggiornato: settembre 1999.  Indicato per chiunque abbia intenzione
     di usare il proprio sistema Linux per inviare e ricevere posta
     elettronica.


    Token-Ring, Token-Ring mini-HOWTO

     Aggiornato: gennaio 1998.  Pensato per aiutare ad installare la
     patch per il kernel. Prova anche ad evidenziare alcune cose da
     cercare.


    TransparentProxy, Transparent Proxy with Squid mini-HOWTO

     Aggiornato: aprile 2000.  Fornisce informazioni su come impostare
     un server proxy HTTP trasparente usando solo Linux e squid.


    TT-Debian, TrueType Fonts in Debian mini-HOWTO

     Aggiornato: gennaio 2000.  Come configurare un sistema Debian per
     usare i font TrueType per la visualizzazione e la stampa.


    Ultra-DMA, The Linux Ultra-DMA Mini-Howto

     Aggiornato: novembre 1999.  Come usare con Linux i dischi fissi e
     le interfacce Ultra-DMA, detti anche Ultra-ATA, Ultra33 e Ultra66.


    Update, The Staying Updated mini-HOWTO

     Aggiornato: settembre 1999.  Come tenersi aggiornati e al passo con
     lo sviluppo che avviene nel mondo Linux.


    Upgrade, Upgrading Your linux Distribution mini-HOWTO

     Aggiornato: giugno 1996.  Suggerimenti e trucchi per
     l'aggiornamento dalla propria distribuzione Linux ad un'altra.


    VAIO+Linux, Linux on Sony VAIO mini-HOWTO

     Aggiornato: settembre 1998.  Questo documento spiega
     l'installazione di Linux su computer Sony VAIO.


    Visual-Bell, Visible bell mini-Howto

     Aggiornato: novembre 1997.  Come usare termcap per configurare un
     campanello visuale su un sistema e come disabilitare su richiesta
     il campanello udibile.


    VPN, The VPN HOWTO

     Aggiornato: agosto 1997.  Come impostare una Rete Privata Virtuale
     (Virtual Private Network).


    WordPerfect, WordPerfect Mini-howto

     Aggiornato: agosto 1997.  Discute come eseguire WordPerfect su
     Linux ed include una breve discussione su WordPerfect 7.0 beta.


    Wacom-USB-mini-HOWTO, Wacom Graphire USB Mini-HOWTO

     Aggiornato: giugno 2000. Come configurare una tavoletta Wacom
     Graphire USB per usarla con Linux.


    X-Big-Cursor, X11-big-cursor mini-HOWTO

     Aggiornato: agosto 1997.  Come usare cursori del mouse pi grandi
     con il sistema X window.


    XFree86-XInside, Linux XFree-to-Xinside mini-HOWTO

     Aggiornato: settembre 1997.  Come convertire una modeline di
     XFree86 in una di XInside/XiGraphics.


    Xterm-Title, How to change the title of an xterm

     Aggiornato: ottobre 1999.  Come usare le sequenze di escape per
     cambiare dinamicamente i titoli della finestra e dell'icona di un
     xterm.


    ZIP-Drive, Zip Drive Mini-HOWTO

     Aggiornato: gennaio 1999.  Fornisce una veloce guida di riferimento
     sull'impostazione e l'uso del lettore Iomega ZIP con Linux.


    ZIP-Install, Installing Linux on ZIP disk using ppa ZIP Drive Mini-
     Howto

     Aggiornato:  gennaio 1998.  Questo documento  utile solamente ai
     possessori della versione su porta parallela del lettore ZIP che
     vogliono avere una versione portatile o di backup del sistema Linux
     su un disco ZIP.



  3.3.  HOWTO speciali

  L'High Availability HOWTO, di Harald Milz <hm@seneca.muc.de> 
  disponibile a http://sunsite.unc.edu/pub/Linux/ALPHA/linux-ha/High-
  Availability-HOWTO.html.  Non  incluso nella collezione degli HOWTO
  perch contiene immagini e non pu essere distribuito in tutti i
  formati.

  Il Graphics HOWTO, di Michael J. Hammel <mjhammel@csn.net> 
  disponibile a http://www.graphics-muse.org/linux/lgh.html.  Non 
  incluso nella collezione degli HOWTO perch usa molte immagini, che
  non si convertono in altri formati.


  3.4.  HOWTO e mini-HOWTO non mantenuti

  Ci sono alcuni documenti non pi mantenuti a
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/unmaintained.  Sono ancora
  tenuti in circolazione in quanto avere documentazione vecchia qualche
  volta  meglio che non averne. Comunque, si dovrebbe essere consci che
  si sta leggendo della documentazione vecchia.

  Se la data di un documento  troppo vecchia, lo si consideri come non
  mantenuto.

  Comunque, ci sono delle eccezioni, come per i vecchi programmi (per
  es. UUCP HOWTO) per questioni non proprio calde (per es. AX-25
  HOWTO).


  4.  Scrivere e proporre un HOWTO

  Se si  interessati a scrivere o mantenere un HOWTO, PRIMA!!! si
  cerchi di contattarci a ldp-discuss@lists.linuxdoc.org.

  Se si vuole mantenere un HOWTO non pi mantenuto, si provi a
  contattare anche il vecchio autore.

  Si consulti HOWTO-HOWTO per informazioni dettagliate sulla scrittura e
  la proposta di un HOWTO.

  Ci sono alcune linee guida generali che si dovrebbe seguire quando si
  scrive un HOWTO:


    Si utilizzi una struttura ed organizzazione dell'HOWTO che sia
     coerente, e si scriva in modo chiaro.  Si ricordi che la maggior
     parte della gente che consulta gli HOWTO non parla l'inglese come
     lingua madre.


    Ci si assicuri che tutte le informazioni siano corrette. Non si sa
     mai abbastanza. Se si  in dubbio, ci si confronti, ma si metta in
     chiaro che si sta solo provando.

    Si controlli di usare la versione pi recente del software.
     Pertanto, ci si assicuri di includere le istruzioni complete su
     dove scaricare il software (sito FTP, percorso completo), la
     versione corrente e la data di rilascio del software.

    Si includa una sezione per le FAQ alla fine (se serve). Alcuni
     HOWTO hanno bisogno di una sezione FAQ o Problemi Comuni per
     fornire le informazioni che non si possono dare all'interno del
     testo normale.

    Gli HOWTO dovrebbero esserci proposti in SGML DocBook o linuxdoc.
     Si faccia riferimento a HOWTO-HOWTO per maggiori informazioni.

    Use other HOWTOs a model.  The SGML source to +       the HOWTOs is
     available on Linux FTP sites.  In addition, examine the +
     HOWTO-HOWTO, the +        LDP manifesto (and license guide), and
     the +       Using DocBook HOWTO
     <http://metalab.unc.edu/godoy/using-docbook/using-docbook.html>.

    Si usino gli altri HOWTO come modello. Il sorgente SGML dell'HOWTO
     lo si trova nei siti FTP Linux. Inoltre si dia una occhiata a
     HOWTO-HOWTO, al manifesto di LDP (e alle regole di licenza) e a
     Using DocBook HOWTO <http://metalab.unc.edu/godoy/using-
     docbook/using-docbook.html>.

    Ci si assicuri che il proprio nome, indirizzo email, data e numero
     di versione siano all'inizio del documento. Si possono anche
     includere indirizzi WWW ed email se volete. L'intestazione standard
     :


             Titolo
             Nome e email dell'autore
             Numero di versione e data



  per esempio:

          Linux HOWTO Index
          di Tim Bynum
          v2.10.29, 31 luglio 1997





    Infine, ci si prepari a ricevere domande e commenti sui propri
     scritti.  Ci sono centinaia di accessi al giorno alla collezione
     degli HOWTO da tutte le parti del mondo!

  Dopo che si  scritto l'HOWTO, si invii a noi il sorgente SGML a ldp-
  submit@lists.linuxdoc.org.

   importante che si passi attraverso di noi quando si pubblica
  l'HOWTO, visto che noi ci preoccupiamo di mantenere gli archivi ed
  abbiamo bisogno di sapere quali HOWTO sono stati scritti e di
  conoscere cosa si sta gi facendo.

  Poi, tutto ci che si dove fare  spedirci periodicamente le
  revisioni.


  5.  Copyright

  Copyright (c) 2000 by Guylhem Aznar / Greg Ferguson

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact the Linux HOWTO coordinator, at
  linux-howto@metalab.unc.edu via email.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.


  Copyright (c) 2000 di Guylhem Aznar / Greg Ferguson

  Se non diversamente specificato, i documenti Linux HOWTO hanno il
  copyright dei loro rispettivi autori. I documenti Linux HOWTO possono
  essere riprodotti e distribuiti, completi o in parte, con ogni mezzo
  fisico o elettronico, purch siano tutti accompagnati da questo
  copyright. Distribuzioni commerciali sono permesse ed incoraggiate;
  comunque l'autore desidera essere avvisato di ogni simile
  distribuzione.

  Tutte le traduzioni, lavori derivati o incorporanti qualsiasi Linux
  HOWTO devono essere mantenuti sotto questo avviso di copyright. Per
  questo non  possibile produrre un lavoro derivato da un HOWTO ed
  imporre restrizioni aggiuntive alla sua distribuzione. Eccezioni a
  questa regola possono essere concesse sotto certe condizioni;
  contattare il coordinatore dei Linux HOWTO all'indirizzo riportato
  sotto.

  In breve vogliamo promuovere la disseminazione di queste informazioni
  attraverso pi canali possibili. Comunque vogliamo mantenere il
  copyright nei documenti HOWTO, e possibilmente essere avvisati di ogni
  progetto di ridistribuzione degli HOWTO.

  Se si hanno domande, si contatti via email il coordinatore dei Linux
  HOWTO a linux-howto@metalab.unc.edu via email.

  Per le versioni in italiano si contattati Giovanni Bortolozzo,
  borto@pluto.linux.it, il coordinatore del progetto di ILDP per la
  traduzione dei Linux HOWTO.













  Linux Hardware Compatibility HOWTO
  Patrick Reijnen, <antispam.hardware_howto@antispam.reij
  nen.nl.com (remove both "antispam.")>
  Versione 99.3, 28 settembre 1999

  Questo documento elenca la maggior parte dei componenti hardware sup
  portati da Linux e consente di reperire i driver necessari.

  1.  Introduzione


  NOTA: l'USB non  ancora supportato da Linux.


  1.1.  Pagina introduttiva

  In questo documento, relativo alla compatibilit dei componenti
  hardware con Linux,  elencata la maggior parte dei componenti
  hardware (non solo sistemi con componenti incorporati) supportati da
  Linux. In questo modo, leggendo attentamente questo documento 
  possibile scegliere gli elementi per il proprio sistema Linux. Dato
  che l'elenco di componenti supportati da Linux  in continuo
  aggiornamento, questo documento non sar mai completo. Pertanto, il
  fatto che i componenti non sono menzionati in questo HOWTO significa
  che l'autore non  certo che siano supportati e che non  riuscito ad
  avere informazioni relative a un possibile supporto di tali elementi.

  Le sottosezioni intitolate ``Driver alpha e beta'' elencano i
  componenti hardware con driver alpha o beta in vari livelli di
  utilizzabilit. Si pu notare che alcuni driver esistono solo nei
  kernel alpha. Pertanto, se si riscontra che un elemento elencato come
  supportato non fa parte della versione del kernel di Linux in uso,
  effettuare l'aggiornamento.

  Alcune periferiche sono supportate solo da moduli binari il cui
  impiego  da evitare quando possibile. Questi componenti sono moduli
  compilati per UNA versione del kernel. Il codice sorgente per questi
  moduli NON  stato rilasciato. In questo modo  possibile evitare
  l'aggiornamento o il mantenimento del sistema.
  Linus Torvalds consiglia l'utilizzo dei moduli solo binari, ma che gli
  utenti devono essere a conoscenza del fatto che devono utilizzare
  sempre la versione del kernel che hanno in dotazione.
  Per informazioni sulla disponibilit del codice sorgente dei
  componenti, fare riferimento al sito Web all'indirizzo
  <http://www.kt.opensrc.org/kt19990211_5.html#10>.

  L'ultima versione di questo documento pu essere disponibile nel sito
  Web all'indirizzo  <http://users.bart.nl/~patrickr/hardware-
  howto/Hardware-HOWTO.html>, nel sito SunSite e in tutti i siti mirror.
  La traduzione di questo e di altri HOWTO di Linux  disponibile nei
  siti Web all'indirizzo
  <http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations> e
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations>.

  Se sono note alcune (in)compatibilit relative all'hardware Linux che
  non sono elencate in questo documento, inviare un messaggio
  all'autore.

  Se al termine della lettura di questo documento sono necessarie
  ulteriori informazioni, fare riferimento al sito Web ``Build Your Own
  PC'' all'indirizzo  <http://www.verinet.com/pc/>.

  Se si desidera disporre di un sistema Linux preconfigurato, fare
  riferimento al sito Web all'indirizzo
  <http://www.linuxresources.com/web/>.

  1.2.  Copyright

  Copyright 1997, 1998, 1999 Patrick Reijnen.

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free software Foundation; either version 2 of the
  license, or (at your option) any later version.

  This document is distributed in the hope that it will be useful, but
  without any warranty; without even the implied warranty of
  merchantability or fitness for a particular purpose. See the GNU
  General Public License for more details.  You can obtain a copy of the
  GNU General Public License by writing to the Free Software Foundation,
  Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  If you use this or any other Linux HOWTO's in a commercial
  distribution, it would be nice to send the authors a complimentary
  copy of your product.


  1.3.  Architetture di sistema

  Questo documento  unicamente relativo alle piattaforme Intel per
  Linux. Per altre piattaforme fare riferimento ai seguenti siti Web:

    ARM Linux
     <http://www.arm.uk.linux.org/>

    Linux/68k
     <http://www.clark.net/pub/lawrencc/linux/index.html>

    Linux/8086 (Il sottoinsieme incorporabile del kernel di Linux)
     <http://www.linux.org.uk/ELKS-Home/index.html>

    Linux/Alpha
     <http://www.azstarnet.com/~axplinux/>

    Linux/MIPS
     <http://www.linux.sgi.com>

    Linux/PowerPC
     <http://www.linuxppc.org/>

    Linux per Acorn
     <http://www.ph.kcl.ac.uk/~amb/linux.html>

    Linux per PowerMac
     <http://ftp.sunet.se/pub/os/Linux/mklinux/mkarchive/info/index.html>


  2.  Computer, schede madri, BIOS

  I bus ISA, VLB, EISA e PCI sono tutti supportati.



  2.1.  Sistema specifico/scheda madre/BIOS


    Sistemi IBM PS/2 MCA
     Sono supportati fin dalla versione 2.0.7 del kernel, ma solo per le
     versioni stabili. Per informazioni  possibile fare riferimento
     alla home page del sito Web Micro Channel Linux all'indirizzo
     <http://www.dgmicro.com/default.htm>. Il software per i sistemi MCA
      disponibile nel sito Web all'indirizzo
     <ftp://ftp.dgmicro.com/pub/linuxmca>. Le informazioni relative al
     sottosistema MCA SCSI sono disponibili nel sito Web all'indirizzo
     <http//www.uni-mainz.de/~langm000/linux.html>.

    La scheda madre EFA E5TX-AT ha un problema risolvibile con RedHat
     Linux 5.0 e probabilmente con altre versioni di Linux. Si riavvia
     spontaneamente durante la rilevazione dell'hardware. Per risolvere
     questo problema, aggiornare il BIOS alla versione 1.01.
     L'aggiornamento  disponibile nel sito Web all'indirizzo
     <http://www.efacorp.com/download/bios/e5tx103.exe>.

    La scheda madre Edom MP080 deve disporre del BIOS flash perch
     Linux funzioni. Senza questa caratteristica Linux verr riavviato
     durante la rilevazione dell'hardware. Per il BIOS flash fare
     riferimento al sito Web all'indirizzo
     <http://www.edom.com/tech/tech.htm> e
     <http://www.edom.com/download>

    La scheda madre Zida 6MLX con il chipset PII Intel LX  funziona
     solo con Linux quando la cache PII  disabilitata nel BIOS.
     L'aggiornamento del BIOS non risolve il problema. Il sintomo  un
     riavvio casuale durante o subito dopo l'avvio del sistema.

  Molte nuove schede PCI causano la visualizzazione di alcuni messaggi
  di errore durante l'avvio e la rilevazione dell'hardware PCI. La
  procedura presenta il seguente messaggio


      Warning : Unknown PCI device (8086:7100).  Please read include/linux/pci.h



  Indica di leggere il file pci.h. Da questo file deriva la seguente
  citazione


           PROCEDURA PER RILEVARE NUOVE PERIFERICHE PCI
      Si cerca di raccogliere informazioni relative alle nuove periferiche PCI, mediante
      la procedura di identificazione PCI standard. Se viene visualizzato un messaggio
      di avviso al momento dell'avvio, indicare
           - /proc/pci
           - la descrizione esatta dell'hardware. Cercare di scoprire
             quale periferica  sconosciuta. Potrebbe trattarsi del chipset della scheda madre,
             il ponte PCI-CPU o PCI-ISA.
           - Se non  possibile trovare le reali informazioni relative all'hardware nel
             manuale, provare a leggere il riferimento del chip sulla scheda.
           - Inviare quanto rilevato a linux-pcisupport@cao-vlsi.ibp.fr,
             e la periferica verr aggiunta all'elenco il pi presto possibile.

      PRIMA di inviare un messaggio, verificare le ultime versioni di Linux
      per accertarsi che il componente non sia gi stato aggiunto.

             Grazie
                   Frederic Potter



  In genere la scheda madre e le periferiche PCI sconosciute funzionano
  in modo corretto.


  2.2.  Componenti non supportati


    Supermicro P5MMA con BIOS versioni 1.36, 1.37 e 1.4. Linux non
     potr essere avviato con questa scheda madre. Una nuova versione
     beta del BIOS, che consente l'avvio di Linux,  disponibile nel
     sito Web all'indirizzo  <ftp.supermicro.com/mma9051.zip>

    Supermicro P5MMA98. Linux non verr avviato con questa scheda
     madre. Una nuova versione beta del BIOS, che consente l'avvio di
     Linux,  disponibile nel sito Web all'indirizzo
     <ftp.supermicro.com/a98905.zip>.

    DataExpert Corp. La scheda madre ExpertColor TX531 V1.0 con il
     chipset ACER M1531 (Data: 9729, TS6) e ACER M1543 (Data: 9732 TS6)
     sembra non presentare alcun errore di segmentazione riproducibile,
     alcun errore e blocco del kernel in corrispondenza di carichi
     pesanti e di accesso al nastro. Il problema sembra essere relativo
     al bus PCI del chipset ACER.


  3.  Portatili

  Per ulteriori informazioni su Linux e i computer portatili, il sito
  indicato di seguito  un buon punto di partenza.

    Homepage dei portatili Linux
     <http://www.cs.utexas.edu/users/kharker/linux-laptop/>

  Altre informazioni relative ai portatili sono disponibili nei siti
  indicati di seguito:


    Gestione dell'alimentazione avanzata
     <ftp://ftp.cs.unc.edu/pub/users/faith/linux/>

    Stato della batteria dei portatili
     <ftp://metalab.unc.edu/pub/Linux/system/power/>

    Cursore non lampeggiante
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/console/noblink-1.7.tar.gz>

    Altre informazioni di carattere generale
     <ftp://tsx-11.mit.edu/pub/linux/packages/laptops/>


  3.1.  Portatili particolari


    Compaq Concerto (driver a penna)
     <http://www.cs.nmsu.edu/~pfeiffer/>

    Compaq Contura Aero
     <http://domen.uninett.no/~hta/linux/aero-faq.html>

    IBM ThinkPad
     <http://peipa.essex.ac.uk/tp-linux/tp-linux.html>

    IBM Thinkpad serie 770
     <http://resources.inw.com/linux/thinkpad770>

    NEC Versa M e P
     <http://www.santafe.edu:80/~nelson/versa-linux/>

    Tadpole P1000
     <http://www.tadpole.com/support-trdi/plans/linux.html>

    Tadpole P1000 (altro tipo)

    TI TravelMate 4000M
     <ftp://ftp.biomath.jussieu.fr/pub/linux/TM4000M-mini-HOWTO.txt.Z>
    TI TravelMate 5100

    Toshiba Satellite Pro 400CDT
     <http://terra.mpikg-teltow.mpg.de/~burger/T400CDT-Linux.html>


  3.2.  PCMCIA


    PCMCIA
     <http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html>

  I driver delle schede PCMCIA supportano correntemente tutti i comuni
  controller PCMCIA, compresi i chipset Databook TCIC/2, Intel i82365SL,
  Cirrus PD67xx e Vadem VG-468.  Il controller Motorola 6AHC05GA,
  utilizzato in alcuni portatili Hyundai, non  supportato.  Vedere
  l'Appendice B per un elenco di schede PCMCIA supportate.



  4.  CPU/FPU

  I processori Intel/AMD/Cyrix 386SX/DX/SL/DXL/SLC e
  486SX/DX/SL/SX2/DX2/DX4 sono supportati, cos come i processori Intel
  Pentium, Pentium Pro e Pentium II, Pentium III (versioni regolare e
  Xeon) e Celeron. AMD K5 e K6 funzionano bene, anche se le versioni pi
  vecchie di K6 dovrebbero essere evitate perch contengono molti
  errori. Per ovviare a questo problema  possibile disattivare
  l'impostazione della cache interna all'avvio del BIOS. Anche AMD K6-2
  e K6-3 funzionano. Alcuni dei primi K6-2 a 300 Mhz hanno problemi con
  i chip di sistema. Cyrix 6x86 non funziona correttamente.

  Anche i processori IDT Winchip C6-PSME2006A sono supportati da Linux (
  <http://www.winchip.com>).

  Linux dispone di emulazione FPU incorporata se non  presente un
  coprocessore matematico.

  Il supporto sperimentale SMP (per pi CPU)  incluso nel kernel 1.3.31
  e nelle versioni pi recenti. Verificare la pagina Linux/SMP Project
  per i dettagli e gli aggiornamenti.

    Linux/SMP Project
     <http://www.linux.org.uk/SMP/title.html>

  Gli effetti multimediali avanzati incorporati in Cyrix MediaGX non
  sono supportati.

  Alcuni processori AMD 486DX delle versioni iniziali possono bloccarsi
  in determinate situazioni. Tutti i chip correnti dovrebbero funzionare
  e disporre di uno swap dei chip per le CPU di versioni precedenti non
  dovrebbe essere un problema.

  La serie ULSI Math*Co ha un errore nelle istruzioni FSAVE e FRSTOR che
  causa problemi con tutti i sistemi operativi in modalit protetta.
  Anche alcuni chip IIT e Cyrix di versioni non aggiornate possono
  presentare lo stesso problema.

  Nei kernel molto vecchi si possono verificare problemi con
  l'eliminazione di TLB nei chip UMC U5S. (1.1.x)


    Attivazione della cache nei processori Cyrix
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/CxPatch030.tar.z>


    Controllo della cache del software Cyrix
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/linux.cxpatch>

    Impostazioni del registro della CPU Cyrix 5x86
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cx5x86mod_1.0c.tgz>


  5.  Memoria

  Tutta la memoria DRAM, EDO e SDRAM pu essere utilizzata con Linux. 
  importante fare attenzione a una particolare situazione. In genere il
  kernel non supporta pi di 64 MB di memoria. Quando si aggiunge una
  quantit superiore a 64 MB di memoria  necessario aggiungere la
  seguente riga al file di configurazione LILO.


     append="mem=<number of Mb>M"



  Quindi quando si dispone di 96 MB di memoria la riga dovrebbe essere


     append="mem=96M"



  Non digitare un numero superiore al numero di MB realmente
  disponibile. In questo modo si potrebbero verificare interruzioni
  imprevedibili.


  6.  Schede video

  Linux funzioner con tutte le schede video in modalit testo. Le
  schede VGA non elencate probabilmente funzioneranno con driver mono
  VGA e/o VGA standard.

  Se si  alla ricerca di una scheda video economica per eseguire X,
  ricordare che le schede accelerate (ATI Mach, ET4000/W32p, S3) sono
  MOLTO pi veloci delle schede non accelerate o parzialmente accelerate
  (Cirrus, WD).

  ``32 bpp''  in realt un colore a 24 bit allineato sui limiti a 32
  bit. NON significa che le schede sono in grado di supportare un colore
  a 32 bit e visualizzano comunque 24 bit di colore (16.777.216 colori).
  Le modalit di pacchetti di pixel a 24 bit non sono supportate in
  XFree86 e, in questo modo, le schede che possono eseguire le modalit
  a 24 bit per ottenere risoluzioni pi elevate in altri sistemi
  operativi non sono in grado di effettuare tale operazione X mediante
  XFree86. Queste schede includono Mach32, Cirrus 542x, S3
  801/805/868/968, ET4000 e altre.

  Il supporto AGP (Accelerated Graphics Port)  in rapido sviluppo. La
  maggior parte degli X-server (entrambe le versioni commerciali e
  gratuite disponibili) sono in grado o meno di supportare l'AGP.


  6.1.  Schede video Diamond

  La maggior parte delle schede video Diamond  supportata dalle
  versioni correnti di XFree86. Le schede Diamond precedenti potrebbero
  non essere ufficialmente supportate da XFree86, ma  possibile ovviare
  a questo problema. Diamond sta supportando attivamente il progetto
  XFree86 Project.

  6.2.  SVGALIB (schede grafiche per le console)


    VGA

    EGA

    ARK Logic ARK1000PV/2000PV

    ATI VGA Wonder

    ATI Mach32

    Cirrus 542x, 543x

    OAK OTI-037/67/77/87

    S3 (supporto limitato)

    Trident TVGA8900/9000

    Tseng ET3000/ET4000/W32


  6.3.  XFree86 3.3.2



  6.3.1.  Schede accelerate


    ARK Logic ARK1000PV/VL, ARK2000PV/MT

    ATI Mach8

    ATI Mach32 (supportati 16 bpp per le schede con RAMDAC ATI68875,
     AT&T20C49x, BT481 e 2MB di RAM video)

    ATI Mach64 (supportati 16/32 bpp per schede con RAMDAC ATI68860,
     ATI68875, CH8398, STG1702, STG1703, AT&T20C408, 3D Rage II,
     interno, IBM RGB514)

    Chips & Technologies 64200, 64300, 65520, 65525, 65530, 65535,
     65540, 65545, 65546, 65548, 65550, 65554

    Cirrus Logic 5420, 542x/5430 (16 bpp), 5434 (16/32 bpp), 5436,
     544x, 546x, 5480, 62x5, 754x

    Diamond Viper 330

    Gemini P1 (chip ET6000)

    IBM 8514/A

    IBM XGA-I, XGA-II

    IIT AGX-010/014/015/016 (16 bpp)

    Matrox MGA2064W (Millennium)

    Matrox MGA1064SG (Mystique)

    Number Nine Imagine I128

    Oak OTI-087

    S3 732 (Trio32), 764 (Trio64), Trio64V+, 801, 805, 864, 866, 868,
     86C325 (ViRGE), 86C375 (ViRGE/DX), 86C385 (ViRGE/GX), 86C988
     (ViRGE/VX), 911, 924, 928, 964, 968

    Vedere l'Appendice A per un elenco di schede S3 supportate

    SiS 86c201, 86c202, 86c205

    Trident 9440, 96xx, Cyber938x

    Tseng ET4000/W32/W32i/W32p, ET6000

    Weitek P9000 (16/32 bpp)

    Diamond Viper VLB/PCI

    Orchid P9000

    Western Digital WD90C24/24A/24A2/31/33


  6.3.2.  Schede non accelerate


    Alliance AP6422, AT24

    ATI VGA serie Wonder

    Avance Logic AL2101/2228/2301/2302/2308/2401

    Cirrus Logic 6420/6440, 7555

    Compaq AVGA

    DEC 21030

    Genoa GVGA

    MCGA (320x200)

    MX MX68000/MX68010

    NCR 77C22, 77C22E, 77C22E+

    NVidia NV1

    Oak OTI-037C, OTI-067, OTI-077

    RealTek RTG3106

    SGS-Thomson STG2000

    Trident 8800CS, 8200LX, 8900x, 9000, 9000i, 9100B, 9200CXr,
     9320LCD, 9400CXi, 9420, 9420DGi, 9430DGi

    Tseng ET3000, ET4000AX

    VGA (VGA standard, 4 bit, lenta)

    Video 7 / Headland Technologies HT216-32

    Western Digital/Paradise PVGA1, WD90C00/10/11/30




  6.3.3.  Schede monocromatiche


    Hercules mono

    Hyundai HGC-1280

    Sigma LaserView PLUS

    VGA mono


  6.3.4.  Driver alpha e beta


    EGA (versione precedente, da c. 1992)
     <ftp://ftp.funet.fi/pub/Linux/BETA/Xega/>


  6.4.  X-Server S.u.S.E.

  S.u.S.E. sta creando una serie di X-server basata sul codice XFree-86.
  Questi server supportano nuove schede video e in queste versioni sono
  stati risolti tutti gli errori relativi agli X-server XFree86. S.u.S.E
  sta creando questi X-server in collaborazione con The XFree86 Project,
  Inc. Tali X-Server saranno disponibili nella prossima versione di
  XFree86 e possono essere presenti nel sito Web all'indirizzo
  <http://www.suse.de/index.html>. Gli X-Server S.u.S.E. sono
  correntemente disponibili per le schede video elencate di seguito.


    XSuSE, X-Server Elsa GLoria

    ELSA GLoria L, GLoria L/MX, Gloria S

    Schede video con il chip semiconduttore Alliance AT3D (anche AT25)

    Hercules Stingray 128 3D

    XSuSE, X-Server NVidia (supporto PCI e AGP, chipset NV1 e Riva128)

    ASUS 3Dexplorer

    Diamond Viper 330

    ELSA VICTORY Erazor

    STB Velocity 128

    XSuSE Matrox. Supporto per Mystique, Millennium, Millennium II e
     Millennium II AGP

    XSuSE Trident. Supporto per 9685 (incluso ClearTV) e il chipset
     Cyber pi aggiornato

    XSuSE Tseng. Supporto per W32, W32i ET6100 e ET6300.


  6.5.  X-server commerciali

  Gli X-server commerciali forniscono il supporto per le schede non
  compatibili con XFree86 e potrebbero fornire prestazioni migliori per
  le schede che sono supportate da XFree86. In generale, supportano un
  numero maggiore di schede rispetto a XFree86 e, per questo motivo,
  verranno elencate solo le schede che non sono supportate da XFree86.
  Contattare direttamente i fornitori o fare riferimento a Commercial
  HOWTO per ulteriori informazioni.


  6.5.1.  Xi Graphics, Inc


  Xi Graphics, Inc  <http://www.xig.com> (precedentemente nota come X
  Inside, Inc) mette a disposizione per l'acquisto tre prodotti X-
  server. Le schede supportate sono elencate in base al fabbricante:


    X-Server della scheda video accelerata

    3Dlabs

    300SX

    500TX Glint

    500MX Glint

    Permedia 4 MB/8 MB

    Permedia II 4 MB/8 MB

    Actix

    GE32plus 1 MB/2 MB

    GE32ultra 2 MB

    GraphicsENGINE 64 1 MB/2 MB

    ProSTAR 64 1 MB/2 MB

    Alliance

    ProMotion-3210 1 MB/2 MB

    ProMotion-6410 1 MB/2 MB

    ProMotion-6422 1 MB/2 MB

    ARK Logic

    ARK1000PV 1 MB/2 MB

    ARK1000VL 1 MB/2 MB

    ARK2000PV 1 MB/2 MB

    AST

    Manhattan 5090P (GD5424) 512 KB

    ATI

    3D Xpression 1 MB/2 MB

    3D Pro Turbo PC2TV 4 MB/8 MB

    3D Pro Turbo PC2TV 6144

    3D Xpression+ PC2TV 2 MB/4 MB


    3D Xpression+ 2 MB/4 MB

    ALL-IN-WONDER 4 MB/8 MB

    ALL-IN-WONDER PRO 4 MB/8 MB

    Graphics Ultra (Mach8) 1 MB

    Graphics Pro Turbo (Mach64/VRAM) 2 MB/4 MB

    Graphics Pro Turbo 1600 (Mach64/VRAM) 2 MB/4 MB

    Graphics Ultra Plus (Mach32) 2 MB

    8514/Ultra (Mach8) 1 MB

    Graphics Ultra Pro (Mach32) 1 MB 2 MB

    Graphics Vantage (Mach8) 1 MB

    VGA Wonder Plus 512 KB

    VGA Wonder XL 1 MB

    Video Xpression 1 MB

    XPERT@Play 4 MB/6 MB/8 MB

    XPERT@Work 4 MB/6 MB/8 MB

    Video Xpression 2 MB

    WinBoost (Mach64/DRAM) 2 MB

    WinTurbo (Mach64/VRAM) 2 MB

    Graphics Wonder (Mach32) 1 MB

    Graphics Xpression 1 MB/2 MB

    Rage II (SGRAM) 2 MB/4 MB/8 MB

    Rage II+ (SGRAM) 2 MB/4 MB/8 MB

    Rage Pro 2 MB/4 MB/8 MB

    Avance Logic

    ALG2101 1 MB

    ALG2228 1 MB/2 MB

    ALG2301 1 MB/2 MB

    Boca

    Voyager 1 MB/2 MB

    Vortek-VL 1 MB/2 MB

    Colorgraphic

    Dual Lightning 2 MB

    Pro Lightning, scheda 2 MB

    Quad Pro Lightning, scheda 2 MB

    Twin Turbo, scheda 1 MB/2 MB

    Chips & Technology

    64300 1 MB/2 MB

    64310 1 MB/2 MB

    65510 512 KB

    65520 1 MB

    65530 1 MB

    65535 1 MB

    65540 1 MB

    65545 1 MB

    65550 2 MB

    82C450 512 KB

    82C451 256 KB

    82C452 512 KB

    82C453 1 MB

    82C480 1 MB/2 MB

    82C481 1 MB/2 MB

    Cirrus Logic

    GD5402 512 KB

    GD5420 1 MB

    GD5422 1 MB

    GD5424 1 MB

    GD5426 1 MB/2 MB

    GD5428 1 MB/2 MB

    GD5429 1 MB/2 MB

    GD5430 1 MB/2 MB

    GD5434 1 MB/2 MB

    GD5436 1 MB/2 MB

    GD5440 1 MB/2 MB

    GD5446 1 MB/2 MB

    GD5462 2 MB/4 MB PCI e AGP

    GD5464 2 MB/4 MB PCI e AGP

    GD5465 2 MB/4 MB PCI e AGP

    GD54M30 1 MB/2 MB

    GD54M40 1 MB/2 MB

    Compaq

    ProLiant serie 512 KB

    ProSignia serie 512 KB

    QVision 1024 1 MB

    QVision 1280 1 MB/2 MB

    QVision 2000+ 2 MB

    QVision 2000 2 MB

    DEC

    DECpc XL 590 (GD5428) 512 KB

    Dell

    466/M & 466/ME (S3 805) 1 MB

    OnBoard ET4000 1 MB

    DGX (JAWS) 2 MB

    OptiPlex XMT 590 (Vision864) 2 MB

    Diamond

    Fire GL 1000 Pro 4 MB/8 MB

    Fire GL 1000 4 MB/8 MB

    Stealth 3D 2000 2 MB/4 MB

    Stealth 3D 3000XL 2 MB/4 MB

    Stealth 64 Graphics 2001 1 MB/2 MB

    Stealth 64 Graphics 2121XL 1 MB/2 MB

    Stealth 64 Graphics 2201XL 2 MB

    SpeedStar 1 MB

    SpeedStar 64 Graphics 2000 1 MB/2 MB

    SpeedStar 24 1 MB

    SpeedStar 24X 1 MB

    SpeedStar 64 1 MB/2 MB

    SpeedStar Hicolor 1 MB

    SpeedStar PCI 1 MB

    SpeedStar Pro 1 MB

    SpeedStar Pro SE 1 MB/2 MB

    Stealth 1 MB

    Stealth 24 1 MB

    Stealth 32 1 MB/2 MB

    Stealth 64 VRAM 2 MB/4 MB

    Stealth 64 DRAM 1 MB/2 MB

    Stealth 64 Video VRAM (175 MHz) 2 MB/4 MB

    Stealth 64 Video DRAM 1 MB/2 MB

    Stealth 64 Video VRAM (220 MHz) 2 MB/4 MB

    Stealth Hicolor 1 MB

    Stealth Pro 1 MB/2 MB

    Stealth SE 1 MB/2 MB

    Stealth 64 Video 2001TV 2 MB

    Stealth 64 Video 2121 1 MB/2 MB

    Stealth 64 Video 2121TV 1 MB/2 MB

    Stealth 64 Video 2201 2 MB

    Stealth 64 Video 2201TV 2 MB

    Stealth 64 Video 3200 2 MB

    Stealth 64 Video 3240 2 MB/4 MB

    Stealth 64 Video 3400 4 MB

    Viper 1 MB/2 MB

    Viper Pro 2 MB

    Viper Pro Video 2 MB/4 MB

    Viper SE 2 MB/4 MB

    ELSA

    VICTORY 3D 2 MB/4 MB

    WINNER 1000 1 MB/2 MB

    WINNER 1000AVI 1 MB/2 MB

    WINNER 1000ISA 1 MB/2 MB

    WINNER 1000PRO 1 MB/2 MB

    WINNER 1000TRIO 1 MB/2 MB

    WINNER 1000TRIO/V 1 MB/2 MB

    WINNER 100VL 1 MB

    WINNER 2000 2 MB/4 MB

    WINNER 2000AVI 2 MB/4 MB

    WINNER 2000AVI/3D 2 MB/4 MB

    WINNER 2000PRO 2 MB/4 MB

    WINNER 2000PRO/X 2 MB/4 MB/8 MB

    WINNER 3000-L 4 MB

    WINNER 3000-M 2 MB

    WINNER 3000-S 2 MB

    WINNER 1024 1 MB

    WINNER 1280, TLC34075 Palette 2 MB

    WINNER 1280, TLC34076 Palette 2 MB

    Gloria-XL

    Gloria-MX

    Gloria-L

    Synergy

    Everex

    ViewPoint 64P 1 MB/2 MB

    VGA Trio 64P 1 MB/2 MB

    Gateway

    Mach64, scheda (Mach64/VRAM) 2 MB

    Genoa

    5400 512 KB

    8500/8500VL 1 MB

    Phantom 32i 8900 2 MB

    Phantom 64 2 MB

    Hercules

    Dynamite 1 MB

    Dynamite Pro 1 MB/2 MB

    Dynamite Power 2 MB

    Dynamite 3D / GL

    Graphite 1 MB

    Stingray 64 1 MB/2 MB

    Stingray Pro 1 MB/2 MB

    Stringray 1 MB

    Terminator 3D 2 MB/4 MB

    Terminator 64/Video 2 MB

    Graphite Terminator Pro 2 MB/4 MB

    HP

    NetServer LF/LC/LE (TVGA9000i) 512 KB

    Vectra VL2 (GD5428) 1 MB

    Vectra XM2i (Vision864) 1 MB/2 MB

    Vectra XU (Vision864) 1 MB/2 MB

    IBM

    8514/A 1 MB

    PC 300 serie (GD5430) 1 MB

    PC 300 serie (Vision864) 1 MB/2 MB

    PC 700 serie (Vision864) 1 MB/2 MB

    PS/ValuePoint Performance serie (Vision864) 1 MB/2 MB

    VC550 1 MB

    VGA 256 KB

    XGA-NI 1 MB

    XGA 1 MB

    IIT

    AGX014 1 MB

    AGX015 1 MB/2 MB

    Integral

    FlashPoint 1 MB/2 MB

    Leadtek

    WinFast L2300 4 MB/8 MB

    Matrox

    Comet 2 MB

    Marvel II 2 MB

    Impression (MGA-IMP/3/A/H, MGA-IMP/3/V/H, MGA-IMP/3/M/H) 3 MB

    Impression Lite (MGA-IMP+/LTE/P) 2 MB

    Impression Plus Lite (MGA-IMP+/LTE/V) 2 MB

    Impression Plus (MGA-IMP+/P, MGA-IMP+/A) 2 MB/4 MB

    Impression Plus 220 (MGA-IMP+/P/H, MGA-IMP+/A/H) 2 MB/4 MB

    Impression Pro (MGA-PRO/4.5/V) 4,5 MB

    Millennium (MGA-MIL) 2 MB/4 MB/8 MB

    Millennium 220 (MGA-MIL) 2 MB/4 MB/8 MB

    Millennium PowerDoc (WRAM) 2 MB/4 MB/8 MB

    Millennium II (WRAM) 2 MB/4 MB/8 MB PCI e AGP

    Mystique (MGA-MYS) 2 MB/4 MB

    Mystique 220

    Ultima Plus (MGA-PCI/2+, MGA-VLB/2+) 2 MB/4 MB

    Ultima (MGA-ULT/2/A, MGA-PCI/2, MGA-VLB/2) 2 MB

    Ultima (MGA-ULT/2/A/H, MGA-ULT_2/M/H) 2 MB

    Ultima Plus 200 (MGA-PCI/4/200, MGA-VLB/4/200) 4 MB

    MaxVision

    VideoMax 2000 2 MB/4 MB

    Metheus

    Premier 801 1 MB

    Premier 928-1M 1 MB

    Premier 928-2M 2 MB

    Premier 928-4M 4 MB

    Micronics

    Mpower 4 Plus (Mach64) 1 MB

    MIRO

    miroCRYSTAL 10AD 1 MB

    miroCRYSTAL 12SD 1 MB

    miroCRYSTAL 12SD 2 MB

    miroCRYSTAL 20PV 2 MB

    miroCRYSTAL 20SD 2 MB

    miroCRYSTAL 20SV 2 MB

    miroCRYSTAL 22SD 2 MB

    miroCRYSTAL 40SV 4 MB

    miroCRYSTAL VR2000 2 MB/4 MB

    miroMAGIC 40PV 4 MB

    miroMAGIC plus 2 MB

    miroVIDEO 12PD 1 MB/2 MB

    miroVIDEO 20SD 2 MB

    miroVIDEO 20SV 2 MB

    miroVIDEO 20TD 2 MB

    miroVIDEO 22SD 2 MB

    miroVIDEO 40SV 4 MB

    NEC

    Versa P serie 1 MB

    Nth Graphics

    Engine/150 2 MB

    Engine/250 2 MB

    Number Nine

    GXE Level 10, AT&T 20C491 Palette 1 MB

    GXE Level 10, Bt485 or AT&T20C505 Palette 1 MB

    GXE Level 11 2 MB

    GXE Level 12 3 MB

    GXE Level 14 4 MB

    GXE Level 16 4 MB

    GXE64 1 MB/2 MB

    GXE64pro 2 MB/4 MB

    GXE64pro (-1600) 2 MB/4 MB

    Imagine 128 2 MB

    Image 128 (-1280) 4 MB

    Image 128 serie 2 (DRAM) 2 MB/4 MB

    Image 128 Pro (-1600) 4 MB/8 MB

    Image 128 serie 2 (VRAM) 2 MB/4 MB/8 MB

    Image 128 serie III (Revolution 3D) (WRAM) 8 MB/16 MB PCI e AGP

    Revolution 3D ``Ticket to Ride'' (WRAM) 8 MB/16 MB PCI e AGP

    9FX Motion331 1 MB/2 MB

    9FX Motion531 1 MB/2 MB

    9FX Motion771 2 MB/4 MB

    9FX Reality332 2 MB

    9FX Reality772 2 MB/4 MB

    9FX Reality 334 PCI e AGP

    9FX Vision330 1 MB/2 MB

    Oak Technology

    OTI-067 512 KB

    OTI-077 1 MB

    OTI-087 1 MB

    OTI-107 1 MB/2 MB

    OTI-111 1 MB/2 MB

    Orchid

    Farenheit 1280 Plus, ATT20C491 Palette 1 MB

    Farenheit 1280 1 MB

    Farenheit 1280 Plus, SC15025 Palette 1 MB

    Farenheit ProVideo 64 2 MB/4 MB

    Farenheit Video 3D 2 MB

    Kelvin 64 1 MB/2 MB

    Kelvin Video64 1 MB/2 MB

    P9000 2 MB

    Packard Bell

    Scheda madre serie 5000 1 MB

    Paradise

    8514/A 1 MB

    Scheda 24 1 MB

    Scheda Value 1 MB

    Bahamas 64 1 MB/2 MB

    Bali 32 1 MB/2 MB

    VGA 1024 512 KB

    VGA Professional 512 KB

    Pixelworks

    WhrilWIN WL1280 (110 MHz) 2 MB

    WhrilWIN WL1280 (135 MHz) 2 MB

    WhirlWIN WW1280 (110 MHz) 2 MB

    WhirlWIN WW1280 (135 MHz) 2 MB

    WhrilWIN WW1600 1 MB

    Radius

    XGA-2 1 MB

    Reveal

    VC200 1 MB

    VC300 1 MB

    VC700 1 MB

    S3

    ViRGE 2 MB/4 MB

    ViRGE/DX 2 MB/4 MB

    ViRGE/GX  2 MB/4 MB

    ViRGE/GX /2 2 MB/4 MB

    ViRGE/VX  2 MB/4 MB

    Trio32 1 MB/2 MB

    Trio64 1 MB/2 MB

    Trio64V+ 1 MB/2 MB

    Trio64V2/DX 1 MB/2 MB

    Trio64V2/GX 1 MB/2 MB

    801 1 MB/2 MB

    805 1 MB/2 MB

    Vision864 1 MB/2 MB

    Vision866 1 MB/2 MB

    Vision868 1 MB/2 MB

    911 1 MB

    924 1 MB

    928 1 MB

    928 2 MB/4 MB

    Sierra

    Falcon/64 1 MB/2 MB

    Sigma

    Legend 1 MB

    SPEA/V7

    Mercury P64 2 MB

    Storm Pro 4 MB

    ShowTime Plus 2 MB

    STB

    Evolution VGA 1 MB

    Horizon Plus 1 MB

    Horizon VGA 1 MB

    Horizon 64 1 MB/2 MB

    Horizon 64 Video 1 MB/2 MB

    Horizon Video 1 MB

    LightSpeed 2 MB

    LightSpeed 128 2 MB

    Nitro 3D 2 MB/4 MB

    Nitro 64 1 MB/2 MB

    Nitro 64 Video 1 MB/2 MB

    PowerGraph VL-24 1 MB

    PowerGraph X-24 1 MB

    PowerGraph 64 3D 2 MB

    PowerGraph 64 1 MB/2 MB

    PowerGraph 64 Video 1 MB/2 MB

    PowerGraph Pro 2 MB

    Velocity 3D 4 MB

    Velocity 64V 2 MB/4 MB

    Toshiba

    T4900CT 1 MB

    Trident

    TGUI9400CXi 1 MB/2 MB

    TGUI9420DGi 1 MB/2 MB

    TGUI9440 1 MB/2 MB

    TGUI9660 1 MB/2 MB

    TGUI9680 1 MB/2 MB

    TVGA8900B 1 MB

    TVGA8900C 1 MB

    TVGA8900CL 1 MB

    TVGA8900D 1 MB

    TVGA9000 512 KB

    TVGA9000i 512 KB

    TVGA9200CXr 1 MB/2 MB

    Tseng Labs

    ET3000 512 KB

    ET4000 1 MB

    ET6000 2 MB/4 MB

    VGA/16 (ISA) 1 MB

    VGA/16 (VLB) 1 MB/2 MB

    VGA/32 1 MB/2 MB

    ET4000/W32 1 MB

    ET4000/W32i 1 MB/2 MB

    ET4000/W32p 1 MB/2 MB

    VLSI

    VL82C975 (AT&T RAMDAC) 2 MB

    VL82C975 (BrookTree RAMDAC) 2 MB

    VL82C976 (Internal RAMDAC) 2 MB

    Western Digital

    WD90C00 512 KB

    WD90C11 512 KB

    WD90C24 1 MB

    WD90C26 512 KB

    WD90C30 1 MB

    WD90C31 1 MB

    WD90C33 1 MB

    WD9510-AT 1 MB

    Weitek

    P9100 2 MB

    P9000 2 MB

    W5186 1 MB

    W5286 1 MB


    X-server delle schede accelerate per portatili


    Broadax

    NP8700 (Cyber 9385)

    Chips & Technology

    65510 512 KB

    65520 1 MB

    65530 1 MB

    65535 1 MB

    65540 1 MB

    65545 1 MB

    65554 2 MB/4 MB

    65555 2 MB

    Cirrus Logic

    GD7541 1 MB/2 MB

    GD7543 1 MB/2 MB

    GD7548 2 MB

    Compaq

    LTE 5400 (Cirrus Logic CL5478)

    Presario 1090ES (NM 2093)

    Dell

    Latitude XPi 896 (NeoMagic 2070)

    Latitude XPi (NM 2070)

    Latitude XPi CD 1 MB (NM 2090)

    Latitude LM (NM 2160)

    Latitude CP (NM 2160)

    Inspiron 3000 (NM 2160)

    Digital (DEC)

    HiNote VP (NeoMagic 2090)

    Fujitsu

    Lifebook 435DX (NeoMagic 2093)

    Gateway 2000

    Solo 2300 (NeoMagic 2160)

    Solo 2300 SE (NM 2160)

    Solo 9100 (C&T 65554)

    Solo 9100XL (C&T 65555)

    Hewlett Packard

    OmniBook 800 (NM 2093)

    Hitachi

    Notebook E133T (NeoMagic 2070)

    IBM

    VGA 256 KB

    Thinkpad 380D (NeoMagic 2090)*

    Thinkpad 385ED (NeoMagic 2090)*

    Thinkpad 560E (Cyber 9382)

    Thinkpad 760XD (Cyber 9385)

    Thinkpad 770 (Cyber 9397)

    Micron

    TransPort XKE (NeoMagic 2160)

    Millenia Transport (Cirrus Logic GD7548)

    NEC

    Versa P serie 1 MB

    Versa 6230 2 MB (NeoMagic 2160)

    NeoMagic

    MagicGraph128 / NM2070 896

    MagicGraph128 / NM2070

    MagicGraph128V / NM2090

    MagicGraph128V+ / NM2097

    MagicGraph128ZV / NM2093

    MagicGraph128XD / NM2160

    Sony

    VAIO PCG-505 (NeoMagic 2097)

    Toshiba

    T4900CT 1 MB

    Tecra 740CDT (C&T 65554)

    Trident

    Cyber 9397

    Cyber 9385

    Cyber 9382

    Twinhead

    Slimnote 9166TH (Cyber 9385)

     * Numerosi clienti di XiG hanno confermato l'effettivo supporto.

    X-server delle schede accelerate multitestine


  6.5.2.  Metro-X 4.3.0

  Metro Link <sales@metrolink.com>

  Schede supportate:


  7.  Controller (disco rigido)

  Linux funzioner con i controller standard IDE, MFM e RLL. Quando si
  utilizzano i controller MFM/RLL  importante utilizzare ext2fs e le
  opzioni di controllo dell'errore di blocco durante la formattazione
  del disco.

  Le interfacce Enhanced IDE (EIDE) sono supportate con un numero
  massimo pari a due interfacce IDE e quattro dischi rigidi e/o di unit
  CD-ROM. Linux rilever queste interfacce EIDE:


    CMD-640 (supporto per le interfacce non appropriate nel kernel 2.2)

    DTC 2278D

    FGI/Holtek HT-6560B VLB (supporto per l'interfaccia secondaria nel
     kernel 2.2)

    RZ1000 (supporto per le interfacce non appropriate nel kernel 2.2)

    Triton I (82371FB) (con busmaster DMA)

    Triton II (82371SB) (con busmaster DMA)

  Anche i controller ESDI che emulano l'interfaccia ST-506 (MFM/RLL/IDE)
  funzioneranno. Il commento relativo al controllo dell'errore di blocco
  si applica anche a questi controller.

  Anche i controller XT generici a 8 bit funzioneranno.

  A partire dalla pre-patch-2.0.31-3  fornita l'interfaccia IDE/ATAPI.


  7.1.  Driver alpha e beta


    Interfacce UMC 8672 (sperimentali nel kernel 2.2)

    Scheda di interfaccia della cache Promise DC4030VL (supporto
     sperimentale nel kernel 2.2)


  8.  Controller (disco rigido RAID)


    Controller della cache Tekram D690CD IDE PCI (con memorizzazione
     nella cache e mirroring RAID livello 1)

  Scheda grafica                             Chipset della scheda
  ATI 3D RAGE                                3D RAGE
  ATI 3D RAGE II                             3D RAGE II
  ATI ALL-IN-WONDER PRO AGP                  3D RAGE PRO
  ATI ALL-IN-WONDER PRO PCI                  3D RAGE PRO
  ATI Graphics Pro Turbo                     Mach64
  ATI Graphics Ultra                         Mach8
  ATI Graphics Xpression                     Mach64
  ATI Mach32                                 Mach32
  ATI Mach64                                 Mach64
  ATI VGA STEREO-F/X                         ATI 28800
  ATI Winturbo PCI                           Mach64
  ATI XPERT@Play                             3D RAGE PRO
  ATI XPERT@Play AGP                         3D RAGE PRO
  ATI XPERT@Work                             3D RAGE PRO
  ATI XPERT@Work AGP                         3D RAGE PRO
  Diamond Fire GL 1000Pro                    PERMEDIA 2
  Diamond SpeedStar 24X                      Western Digital 90C31
  Diamond SpeedStar Pro SE                   Cirrus 5430
  Diamond Stealth 24                         S3 801
  Diamond Stealth 32                         ET4000/W32p
  Diamond Stealth 3D 2000                    S3 ViRGE
  Diamond Stealth 64                         S3 964, Bt485KPJ135
  Diamond Stealth 64 DRAM                    S3 Trio64
  Diamond Stealth 64 DRAM (SDAC)             S3 864, S3 SDAC
  Diamond Stealth 64 Graphics serie 2000     S3 864, S3 SDAC
  Diamond Stealth 64 Graphics 2200           S3 Trio64
  Diamond Stealth 64 VRAM                    S3 968, IBM RGB526CF22
  Diamond Stealth 64 Video serie 3000        S3 968, TI 3026-175
  Diamond Stealth 64 Video VRAM              S3 968, TI 3026-175
  Diamond Stealth Video (SDAC)               S3 868, S3 SDAC
  Diamond Stealth Video serie 2000           S3 868, S3 SDAC
  Diamond Viper (110 MHz RAMDAC)             P9000
  Diamond Viper (135 MHz RAMDAC)             P9000
  ELSA GLoria Synergy                        PERMEDIA 2
  ELSA Victory 3D                            S3 ViRGE
  ELSA WINNER 2000 Office AGP                PERMEDIA 2
  ELSA Winner 1000 TRIO/V                    S3 Trio64V+
  ELSA Winner 2000 AVI                       S3 968, TI 3026-175
  ELSA Winner 2000 PRO/X-2, -4               S3 968, TI 3026-220
  ELSA Winner 2000 PRO/X-8                   S3 968, IBM RGB528CF25
  EPS Apex L-200                             C&T 65550
  Generic                                    ATI 28800
  Generic                                    Alliance ProMotion
  Generic                                    Ark 2000
  Generic                                    Avance Logic 22xx/23xx/24xx
  Generic                                    Chips & Technologies
  Generic                                    Cirrus 5420
  Generic                                    Cirrus 5422/5424
  Generic                                    Cirrus 5426/5428
  Generic                                    Cirrus 5429
  Generic                                    Cirrus 5430
  Generic                                    Cirrus 5434
  Generic                                    Cirrus 5436
  Generic                                    Cirrus 5446
  Generic                                    Cirrus 5462
  Generic                                    Cirrus 5462/5465
  Generic                                    Cirrus 5480
  Generic                                    Cirrus 62x5
  Generic                                    Cirrus 6410/6412/6420/6440
  Generic                                    Cirrus 754x
  Generic                                    ET3000
  Generic                                    ET4000/W32P
  Generic                                    ET4000AX
  Generic                                    ET6000
  Generic                                    Mach32
  Generic                                    Mach64
  Generic                                    Mach8
  Generic                                    P9000
  Generic                                    PERMEDIA 2
  Generic                                    S3 864/868/924/928/964
  Generic                                    S3 968
  Generic                                    S3 Trio64
  Generic                                    S3 Trio64V+
  Generic                                    S3 ViRGE
  Generic                                    S3 ViRGE/GX/DX
  Generic                                    SiS 86c201/86c202/86c205
  Generic Trident                            TGUI9440
  Generic Trident                            TGUI96xx
  Generic                                    Trident8900
  Generic                                    VGA
  Generic                                    Western Digital SVGA
  Genoa Phantom 64                           S3 Trio64V+
  Genoa WindowsVGA 8500VL                    Cirrus 5426
  Hercules Dynamite 128/Video                ET6000
  Hercules Dynamite 3D/GL                    PERMEDIA 2
  Hercules Dynamite 3D/GL AGP                PERMEDIA 2
  Hercules Stingray                          Avance Logic 2301
  Hercules Stingray 128/3D                   Alliance ProMotion AT3D
  Hercules Stingray 64                       Ark 2000
  Hercules Terminator 3D                     S3 ViRGE/DX
  IBM VGA
  Matrox Marvel                              ET4000
  Matrox Marvel II                           ET4000
  Matrox Millennium                          MGA Storm
  Matrox Millennium II AGP                   MGA 2164, TI 3026-250
  Matrox Millennium II PCI (220 MHz)         MGA 2164, TI 3026-220
  Matrox Millennium II PCI (250 MHz)         MGA 2164, TI 3026-250
  Matrox Mystique                            MGA 1064
  Matrox Mystique 220                        MGA 1164
  Number Nine GXE64                          S3 864
  Number Nine Imagine 128                    Imagine 128
  Number Nine Imagine 128 serie 2            Imagine 128 serie 2
  Number Nine Motion 531                     S3 868
  Number Nine Motion 771                     S3 968
  Number Nine Revolution 3D                  Ticket to Ride
  Number Nine Vision 330                     S3 Trio64
  Orchid Kelvin 64                           Cirrus 5434
  SPEA Mirage Video                          S3 Trio64V+
  STB NITRO 3D                               S3 ViRGE/GX
  STB/Symmetric GLyder MAX-2                 PERMEDIA 2
  Sigma Designs VGA Legend                   ET4000
  Tech Source Raptor                         Imagine 128 serie 2
  Trident 64-Bit Providia 9685
  Trident 8900                               Trident 8900
  Trident 9440                               TGUI9440-2
  V PCI-53                                   Cirrus 5434

    Controller di mirroring del disco ARCO Inc. DupliDisk IDE
     Supporto per unit ATA, IDE, E-IDE e UDMA. I controller disponibili
     possono essere inseriti negli slot ISA e PCI e direttamente nel
     controller IDE. Inoltre, le unit Bay Mount a 3,5 e 5,25 pollici
     sono disponibili perch si adattino ai rispettivi alloggiamenti.
     Ulteriori informazioni sono disponibili nel sito Web all'indirizzo
     <http://www.arcoide.com>. Accertarsi di disporre almeno della
     versione 3.00 del firmware.

    Controller RAID Mylex
     Ulteriori informazioni sono disponibili nel sito Web all'indirizzo
     <http://www.dandelion.com/Linux/DAC960.html>

  9.  Controller (SCSI)

   importante maneggiare un controller SCSI con cura. Molti controller
  SCSI ISA economici sono progettati per le unit CD-ROM e non per altri
  componenti.  Questi controller SCSI di livello inferiore non sono
  migliori di IDE. Fare riferimento a SCSI HOWTO e fare attenzione alle
  cifre relative alle prestazioni prima di acquistare una scheda SCSI.


  9.1.  Supportati


    AMI Fast Disk (VLB/EISA) (compatibile BusLogic)

    Adaptec AVA-1502E (ISA/VLB) (AIC-6360) (AHA1520)

    Adaptec AVA-1505/1515 (ISA) (compatibile Adaptec AHA-152x)

    Adaptec AVA-1825 (VLB) (compatibile Adaptec AHA-152x)
     Questa scheda ha un componente SCSI, EIDE e una porta per l'unit
     disco floppy che funzionano correttamente.

    Adaptec AHA-1510/152x (ISA/VLB) (AIC-6260/6360)

    Adaptec AHA-154x (ISA) (tutti i modelli)

    Adaptec AHA-174x (EISA) (in modalit potenziata)

    Adaptec AHA-274x/274xT (EISA) (AIC-7771). Il modello 274xT 
     supportato fin dalla serie 2.1.x del kernel (AHA2740)

    Adaptec AHA-284x (VLB) (AIC-7770) (AHA2740)

    Adaptec AHA-2910B (PCI) (dalla serie 2.1.x del kernel)

    Adaptec AHA-2920 (PCI). Utilizzare il driver Future Domain. I
     parametri LILO sono necessari quando utilizzati per i dischi
     rigidi.

    Adaptec AHA-2920C (PCI)

    Adaptec AHA-2930/U/U2 (PCI)

    Adaptec AHA-2940/U/W/AU/UW/U2W/U2/U2B/U2BOEM (PCI) (AIC-7861,
     AIC-7871, AIC-7844, AIC-7881, AIC-7884). Alcuni di questi
     controller sono supportati solo dalla serie 2.1.x del kernel.
     (AHA2740)

    Adaptec AHA-2944D/WD/UD/UWD (PCI). Alcuni di questi controller sono
     supportati solo dalla serie 2.1.x del kernel. (AHA2740)

    Adaptec AHA-2950U2/U2B/U2W

    Adaptec AHA-3940/U/W/UW/AUW/U2W (PCI) (AIC-7872, AIC-7882) (dalla
     serie 1.3.6). Alcuni di questi controller sono supportati solo
     dalla serie 2.1.x del kernel.

    Adaptec AHA-3950U2B/U2D

    Adaptec AHA-3985U/W/UW (PCI) (AIC-7873, AIC-7883). Alcuni di questi
     controller sono supportati solo dalla serie 2.1.x del kernel.

    Controller Adaptec PCI con AIC-7850, AIC-7855, AIC-7860

    Controller delle schede Adaptec con AIC-777x (EISA), AIC-785x,
     AIC-786x, AIC-787x (PCI), AIC-788x (PCI), AIC-789x, AIC-3860.
     AIC-786x e AIC-789x sono supportati fin dalla serie 2.1.x del
     kernel.

    AdvanSys ABP510/5150 Bus-Master (ISA)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP5140 Bus-Master (ISA) PnP
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP5142 Bus-Master (ISA) PnP con floppy
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP920 Bus-Master (PCI)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP930/U Bus-Master (PCI/Ultra>)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP960/U Bus-Master (PCI/ULTRA) MAC/PC
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP542 Bus-Master (ISA) con floppy (singolo canale)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP742 Bus-Master (EISA) (singolo canale)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP842 Bus-Master (VL) (singolo canale)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP940/U Bus-Master (PCI/Ultra) (singolo canale)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP970/U Bus-Master (PCI/Ultra) MAC/PC (singolo canale)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP752 Dual Channel Bus-Master (EISA) (doppio canale)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP852 Dual Channel Bus-Master (VL) (doppio canale)
     <http://advansys.com/support/software/os/linux.htm>

    AdvanSys ABP950 Dual Channel Bus-Master (PCI) (doppio canale)
     <http://advansys.com/support/software/os/linux.htm>

    Always IN2000

    AMD AM53C974

    BusLogic FlashPoint LT/DL/LW/DW (BT-930(R), BT-920, BT-932(R),
     BT-950(R), BT-952(R))
     <http://www.dandelion.com/Linux/>

    Compaq Smart Array 2

    DPT PM2001, PM2012A (EATA-PIO)

    DPT serie Smartcache/SmartRAID Plus,III,IV (ISA/EISA/PCI)
     Si osservi il sito Web all'indirizzo  <http://www.uni-
     mainz.de/~neuffer/scsi/dpt/>(EATA-DMA)
     Le schede di queste serie sono PM2011, PM2021, PM2041, PM3021,
     PM2012B, PM2022, PM2122, PM2322, PM2042, PM3122, PM3222, PM3332,
     PM2024, PM2124, PM2044, PM2144, PM3224 e PM3334.

    DTC 3180/3280

    DTC 329x (EISA) (compatibile Adaptec 154x)

    Future Domain TMC-16x0, TMC-3260 (PCI)

    Future Domain TMC-8xx, TMC-950

    Chip Future Domain TMC-1800, TMC-18C50, TMC-18C30, TMC-36C70

    ICP-Vortex PCI-SCSI, controller dell'array del disco (sono
     supportati molti livelli RAID)
     Le patch per Linux 1.2.13 e 2.0.29 sono disponibili nel sito Web
     all'indirizzo  <ftp://icp-vortex.com/download/linux/>. I controller
     GDT6111RP, GDT6121RP, GDT6117RP, GDT6127RP, GDT6511RP, GDT6521RP,
     GDT6517RP, GDT6527RP, GDT6537RP e GDT6557RP sono supportati. 
     anche possibile utilizzare le pre-patch dalla 2.0.31-4 alla
     2.0.31-9.

    ICP-Vortex EISA-SCSI controller (sono supportati molti livelli
     RAID)
     Le patch per Linux 1.2.13 e 2.0.29 sono disponibili nel sito Web
     all'indirizzo  <ftp://icp-vortex.com/download/linux/>. I controller
     GDT3000B, GDT3000A, GDT3010A, GDT3020A e GDT3050A sono supportati.
      anche possibile utilizzare le pre-patch dalla 2.0.31-4 alla
     2.0.31-9.

    Iomega PPA3, scheda del bus host SCSI della porta parallela
     incorporata nell'unit ZIP.

    Initio Corp. INI-9090U INI-9100, INI-9100W/A/UW, INI-9200U/UW,
     INI-9400U/UW, INI-9520U/UW, INI-A100U2W

    Initio Corp. INIC-950

    Media Vision Pro Audio Spectrum 16 SCSI (ISA)

    Mylex (in precedenza BusLogic) serie W (PCI) (BT-948, BT-958,
     BT-958D)

    Mylex (in precedenza BusLogic) serie C (ISA/EISA/VLB/PCI) (BT-946C,
     BT-956C, BT-956CD, BT-445, BT-747C, BT-757C, BT-757CD, BT-545C,
     BT-540CF)

    Mylex (in precedenza Buslogic) serie S (ISA/EISA/VLB) (BT-445S,
     BT-747S, BT-747D, BT-757S, BT-757D, BT-545S, BT-542D, BT-742A,
     BT-542B)

    Mylex (in precedenza BusLogic) serie A (ISA/EISA) (BT-742A,
     BT-542B)

    NCR 5380, schede generiche

    NCR 53C400 (Trantor T130B) (utilizzare il supporto NCR 5380 SCSI
     generico)

    NCR 53C406a (Acculogic ISApport / Media Vision Premium 3D SCSI)

    NCR, chip 53C7x0 (il 53C710  supportato solo nella variante PCI)

    NCR, chip 53C810(A), 53C815, 53C820, 53C825(A), 53C860, 53C875,
     53C895 (il 53C895  supportato solo teoricamente)

    Qlogic / Control Concepts SCSI/IDE (FAS408) (ISA/VLB)

    Qlogic FASXXX/FASXX, serie di chip (ISA/VLB)


    QLogic IQ-PCI, IQ-PCI-10, IQ-PCI-D (PCI) (chip ISP1020)

    Quantum ISA-200S, ISA-250MG

    Seagate ST-01/ST-02 (ISA)

    SIIG Ultrawide SCSI Pro (chipset Initio). I driver e la patch del
     kernel sono disponibili nel sito Web all'indirizzo
     <http://www.initio.com/suse.htm>

    SoundBlaster 16 SCSI-2 (compatibile Adaptec 152x) (ISA)

    Tekram DC-390, DC-390W/U/F

    Trantor T128/T128F/T228 (ISA)

    UltraStor 14F (ISA), 24F (EISA), 34F (VLB)

    Western Digital WD7000 SCSI


  9.2.  Driver alpha e beta


    AMD AM79C974 (PCI) (controller Compaq, HP, Zeos SCSI integrato)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/AM53C974-0.3.tgz>

    Adaptec ACB-40xx SCSI-MFM/RLL bridgeboard
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/adaptec-40XX.tar.gz>

    Always Technologies AL-500
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/al500-0.2.tar.gz>

    Iomega PC2/2B
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/scsi/iomega_pc2-1.1.x.tar.gz>

    Ricoh GSI-8
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/gsi8.tar.gz>


  9.3.  Non supportati


    Adaptec AHA 2940UW Pro

    Adaptec, schede RAID AAA-13x

    Adaptec, schede della porta RAID AAA-113x

    Adaptec AIC-7810

    NCR chip 53C710 (ISA) (chip di versioni precedenti, ma ancora
     utilizzati in alcuni modelli Compaq)

    Schede DTC non compatibili Adaptec (327x, 328x)


  10.  Controller (I/O)

  Qualsiasi scheda standard seriale/parallela/joystick/combo. Linux
  supporta 8250, 16450, 16550 e 16550A UART. Possono essere utilizzate
  schede che supportano IRQ (IRQ > 9) non standard.

  Fare riferimento al documento ``Application Note AN-493'' di Martin S.
  Michael relativo ai semiconduttori della National. La sezione 5.0
  descrive in dettaglio le differenze tra NS16550 e NS16550A. In breve,
  NS16550 conteneva errori nei circuiti FIFO, ma i chip NS16550A delle
  versioni successive li hanno risolti. Tuttavia, esistevano pochi
  NS16550 prodotti da National e, in questo modo, dovrebbero essere
  correntemente molto rari. Molte delle parti ``16550'' delle schede
  moderne vere e proprie provengono dai numerosi fabbricanti delle parti
  compatibili, che potrebbero non utilizzare il suffisso ``A'' di
  National. Inoltre, alcune schede multiporte utilizzeranno chip 16552 o
  16554 o numerosi altri chip multiporta o multifunzione di National o
  di altri fornitori (in genere in un pacchetto importante saldato alla
  scheda, non un DIP a 40 pin). In generale, non  necessario
  preoccuparsi di questo problema se non si rileva un vecchio chip DIP
  National ``NS16550'' (no A) a 40 pin libero o in una vecchia scheda e,
  in questo caso,  necessario trattarla come 16450 (no FIFO) invece che
  come 16550A. Zhahai Stewart <zstewart@hisys.com>


  11.  Controller (multiporta)

  11.1.  Schede non intelligenti

  11.1.1.  Supportate


    AST FourPort e cloni (4 porte)

    Accent Async-4 (4 porte)

    Arnet Multiport-8 (8 porte)

    Bell Technologies HUB6 (6 porte)

    Boca BB-1004, 1008 (4, 8 porte) - nessun DTR, DSR e CD

    Boca BB-2016 (16 porte)

    Boca IO/AT66 (6 porte)

    Boca IO 2by4 (4 seriali / 2 parallele, utilizza l'IRQ 5)

    Computone ValuePort (4, 6, 8 porte) (compatibile AST FourPort)

    DigiBoard PC/X, PC/Xem, PCI/Xem, EISA/Xem, PCI/Xr (4, 8, 16 porte)

    Control Hostess 550 (4, 8 porte)

    PC-COMM 4-port (4 porte)

    SIIG I/O Expander 4S (4 porte, utilizza l'IRQ 4)

    STB 4-COM (4 porte)

    Twincom ACI/550

    Usenet Serial Board II (4 porte)

  Le schede non intelligenti in genere sono disponibili in due tipi, uno
  che utilizza indirizzi di porte COM standard e utilizzano IRQ 4 e uno
  compatibile AST FourPort e utilizza un blocco selezionabile di
  indirizzi e un singolo IRQ. (Gli indirizzi e gli IRQ sono impostati
  mediante setserial.) Se si dispone di una di queste schede, accertarsi
  di verificare a quali standard  conforme, dato che i prezzi non
  forniscono alcuna indicazione utile.




  11.2.  Schede intelligenti

  11.2.1.  Supportate


    Computone IntelliPort II (4/8/16 porte)
     <ftp://ftp.computone.com/pub/bbs/beta/ip2linux-1.0.2.tar.gz>

    Cyclades Cyclom-Y (basato su RISC, 8-32 porte) (ISA/PCI)
     <http://www.cyclades.com/>

    Cyclades-Z (livello elevato, 16-64 porte) (PCI)
     <http://www.cyclades.com/>

    DigiBoard PC/Xe (ISA), PC/Xi (EISA) e PC/Xeve
     <ftp://ftp.digibd.com/drivers/linux/>

    Equinox SST schede I/O seriali intelligenti
     <http://www.equinox.com>

    Hayes ESP versioni 1, 2 e 8 porte
     Incluse nel kernel dalla versione 2.1.15. Il driver per le versioni
     del kernel 2.0.x  disponibile nel sito Web all'indirizzo
     <http://www.nyx.net/~arobinso>

    Stallion EasyIO (ISA) / EasyConnection 8/32 (ISA/MCA) /
     EasyConnection 8/64 (PCI)
     Per le impostazioni degli switch DIP e i file di configurazione,
     fare riferimento al sito Web all'indirizzo
     <http://www.stallion.com>

    Stallion EasyConnection 8/64 (ISA/EISA) / ONboard (ISA/EISA/MCA) /
     Brumby (ISA)
     Il driver pi aggiornato  disponibile nel sito Web all'indirizzo
     <ftp://ftp.stallion.com/drivers/ata5/Linux/v544.tar.gz>


  11.2.2.  Driver alpha e beta


    Comtrol RocketPort (8/16/32 porte)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/serial/comtrol-1.04.tar.gz>
     (kernel 1.2.x). Un driver per i kernel 2.x pu essere disponibile
     nel sito Web all'indirizzo
     <http://ftp.leidenuniv.nl/linux/tsx-11/packages/comtrol/>

    DigiBoard COM/Xi
     Contattare Simon Park (si@wimpol.demon.co.uk) o Mark Hatle
     (fray@krypton.mankato.msus.edu). NOTA: l'autore indica che gli
     indirizzi di posta elettronica potrebbero non essere pi
     funzionanti.

    Moxa C102, C104, C168, C218 (8 porte), C320 (espandibile a
     8/16/24/32) e C320T
     <ftp://ftp.moxa.com.tw/drivers/linux/>

    RISCom/8

    Specialix SIO/XIO (modulare, da 4 a 32 porte)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/serial/sidrv.taz>

    Specialix IO8+
     Contattare devices@BitWizard.nl



  12.  Schede di rete

  Le schede Ethernet variano notevolmente in termini di prestazioni. In
  generale, pi recente  la progettazione, migliori sono le
  prestazioni. Alcune schede molto vecchie come 3Com 3c501 sono utili
  solo perch possono essere disponibili in heap semplici a 5 $
  ciascuno. Fare attenzione ai cloni, non tutti sono adeguati e i cloni
  non adatti causano spesso chiusure irregolari in Linux. Leggere
  Ethernet HOWTO, nel sito Web all'indirizzo
  <http://metalab.unc.edu/LDP/HOWTO/>, per descrizioni dettagliate su
  numerose schede.


  12.1.  Supportate

  12.1.1.  Ethernet

  Per le schede ethernet con la serie DECchip DC21x4x, il driver
  ``Tulip''  disponibile. Ulteriori informazioni relative a questo
  driver possono essere disponibili nel sito Web all'indirizzo
  <http://cesdis.gsfc.nasa.gov/linux/drivers/tulip.html>.


    3Com 3c501 -- evitarne l'utilizzo (driver 3c501)

    3Com 3c503 (driver 3c503), 3c505 (driver 3c505), 3c507 (driver
     3c507), 3c509/3c509B (ISA) / 3c579 (EISA)

    3Com Etherlink III Vortex Ethercards (3c590, 3c592, 3c595, 3c597)
     (PCI), 3Com Etherlink XL Boomerang (3c900, 3c905) (PCI) e Cyclone
     (3c905B, 3c980) Ethercards (driver 3c59x) e 3Com Fast EtherLink
     Ethercard (3c515) (ISA) (driver 3c515)
     Le versioni pi aggiornate di questi driver sono disponibili nel
     sito Web all'indirizzo
     <http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html>
     Evitare l'utilizzo della scheda 3c900 quando possibile dato che il
     driver non funziona in modo corretto per questa scheda.

    3Com 3ccfe575 Cyclone Cardbus (driver 3c59x)

    3Com 3c575 serie Cardbus (driver 3c59x) (TUTTE LE SCHEDE PCMCIA)

    AMD LANCE (79C960) / PCnet-ISA/PCI (AT1500, HP J2405A,
     NE1500/NE2100)

    AT&T GIS WaveLAN

    Allied Telesis AT1700

    Allied Telesis LA100PCI-T

    Allied Telesyn AT2400T/BT (modulo ``ne'')

    Ansel Communications AC3200 (EISA)

    Apricot Xen-II / 82596

    Cabletron E21xx

    Cogent EM110

    Crystal Lan CS8920, Cs8900
     <http://www.cirrus.com/private/drivers/ethernet/edrivers.html>

    Danpex EN-9400

    DEC DE425 (EISA) / DE434/DE435 (PCI) / DE450/DE500 (driver DE4x5)

    DEC DE450/DE500-XA (dc21x4x) (driver Tulip)

    DEC DEPCA ed EtherWORKS

    DEC EtherWORKS 3 (DE203, DE204, DE205)

    DEC QSilver's (driver Tulip)

    Digi International RightSwitch

    DLink DE-220P, DE-528CT, DE-530+, DFE-500TX, DFE-530TX
     Ulteriori informazioni sono disponibili nel sito Web all'indirizzo
     <http://www.dlink.ca/linux.html>

    Fujitsu FMV-181/182/183/184

    HP PCLAN (serie 27245 e 27xxx)

    HP PCLAN PLUS (27247B e 27252A)

    HP 10/100VG PCLAN (J2577, J2573, 27248B, J2585) (ISA/EISA/PCI)
     Ulteriori informazioni sono disponibili nel sito Web all'indirizzo
     <http://cesdis1.gsfc.nasa.gov:80/linux/drivers/100vg.html>

    ICL EtherTeam 16i / 32 (EISA)

    Intel EtherExpress

    Intel EtherExpress Pro

    KTI ET16/P-D2, ET16/P-DC ISA (funzionano senza ponticello e con
     opzioni di configurazione hardware)

    Macromate MN-220P (modalit PnP o NE2000)

    NCR WaveLAN

    NE2000/NE1000 (fare attenzione ai cloni)

    Netgear FA-310TX (chip Tulip)

    New Media Ethernet

    PureData PDUC8028, PDI8023

    SEEQ 8005

    SMC Ultra / EtherEZ (ISA)

    Serie SMC 9000

    SMC PCI EtherPower 10/100 (driver Tulip)

    SMC EtherPower II (driver epic100.c)

    Sun LANCE, schede (kernel 2.2 e versione pi aggiornata)

    Sun Intel, schede (kernel 2.2 e versione pi aggiornata)

    Schneider & Koch G16

    Western Digital WD80x3


    Zenith Z-Note / IBM ThinkPad 300 scheda incorporata

    Znyx 312 etherarray (driver Tulip)


  12.1.2.  ISDN


    Pagina Web di Linux ISDN
     Secondo l'autore sembra che questa pagina non sia pi disponibile.

    Gli strumenti ISDN4Linux sono disponibili nel sito Web
     all'indirizzo  <ftp://ftp.franken.de/pub/isdn4linux/v2.0>


    3Com Sonix Arpeggio
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/network/sonix.tgz>

    ASUSCOM Network Inc. Scheda PC ISDNLink 128K (HiSax)

    AVM A1 (HiSax)

    AVM B1 (avmb1)

    Combinet EVERYWARE 1000 ISDN
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/network/combinet1000isdn-1.02.tar.gz>

    Compaq ISDN S0 (ISA) (HiSax)

    Creatix PnP S0 (HiSax)

    Dr. Neuhaus Niccy PnP/PCI (HiSax)

    Dynalink IS64PH (HiSax)

    Eicon.Diehl Diva 2.0 (ISA/PCI) (interfaccia S0 e U, non versione
     PRO) (HiSax)

    Eicon.Diehl Diva Piccola (HiSax)

    Elsa Microlink PCC-16, PCF, PCF-Pro, PCC-8 (HiSax)

    ELSA QuickStep 1000/1000PCI/3000 (HiSax)

    Schede in base a HFC-2BS0 (HiSax)

    IBM Active 2000 (ISA) (act2000)

    ICN, schede ISDN (icn)

    Ith Kommunikationstechnik GmbH MIC 16 (ISA) (HiSax)

    ITK ix1-micro Rev.2 (HiSax)

    Octal PCBIT (pcbit)

    Sedlbauer Speed Card (HiSax)

    Teles SO-8/SO-16.0/SO-16.3/SO-16.3c/SO-16.4 e compatibili (HiSax)

    Traverse Technologie NETjet PCI S0 (HiSax)

    USR Sportster interno TA (HiSax)

     Le schede ISDN che emulano i modem standard o le schede Ethernet
     comuni non necessitano di alcun driver particolare per il
     funzionamento.


  12.1.3.  Frame relay


    Emerging Technologies Inc, schede di sincronizzazione (
     <http://www.etinc.com>)

    ET/5025 (1 porta, 8 bit ISA)

    ET/5025-16 (2 porte, 16 bit ISA)

    ET/5025-25 (2 porte, 16 bit ISA)

    ET/5025pq (4 porte, PCI)


  12.1.4.  Senza fili


    ZCOM WL2420 ISA
     Le informazioni relative al prodotto sono disponibili nel sito Web
     all'indirizzo  <http://www.zcom.com.tw>. I driver del kernel del
     file di oggetti sono disponibili nel sito Web all'indirizzo
     <www.boerde.de/~matthias/airnet/zcom_v12>


  12.1.5.  X25


    Emerging Technologies Inc, schede di sincronizzazione (
     <http://www.etinc.com>)

    ET/5025 (1 porta, 8 bit ISA)

    ET/5025-16 (2 porte, 16 bit ISA)

    ET/5025-25 (2 porte, 16 bit ISA)

    ET/5025pq (4 porte, PCI)


  12.1.6.  Schede portatili e tascabili


    Per ulteriori informazioni su Linux e sull'utilizzo della porta
     parallela, fare riferimento alla home page di Linux Parallel Port
     all'indirizzo  <http://www.torque.net/linux-pp.html> o
     <http://www.torque.net/parport/>. Fare riferimento all'Appendice C
     per un elenco completo di dispositivi di porte parallele
     supportate, a esclusione delle stampanti.


  12.1.7.  Senza slot


    SLIP/CSLIP/PPP (porta seriale)

    EQL (bilanciamento del carico IP seriale)

    PLIP (porta parallela) -- mediante un cavo LapLink o un cavo
     bidirezionale



  12.1.8.  ARCnet


    Funziona con tutte le schede ARCnet


  12.1.9.  TokenRing

  Si faccia riferimento al sito Web relativo alla rete token ring
  <http://www.linuxtr.net>



    3Com 3C619/B/C Tokenlink 16/4 (ibmtr)

    3Com 3C319 Velocity ISA (ibmtr)

    IBM, scheda token ring PCI

    IBM, scheda Wake on Lan TR

    IBM 16/4 TR, scheda 2 PCI, scheda 2 Wake on Lan, scheda 2 Wake on
     Lan Special

    IBM High Speedd 100/16/4, token ring

    IBM ISA 16/4, MCA 16/4 (ibmtr)

    IBM Tropic, schede chipset

    Olicom RapidFire 3139, 3140, 3141, 3540
     <http://www.olicom.com>

    Olicom OC-3136, OC-3137, OC-3138, OC-3129
     <http://www.olicom.com>

    Madge Smart 100/16/4 PCI, 16/4 PCI Mk3, 16/4 PCI Mk2
     <http://www.madge.com>

    Madge Presto PCI, 16/4 CardBus
     <http://www.madge.com>

    Syskonnect TR4/16(+) SK-4190 ISA, SK-4590 PCI, SK-4591 PCI (sktr)


  12.1.10.  FDDI


    DEC DEFEA (EISA) / DEFPA (PCI) (kernel 2.0.24 e versioni
     aggiornate)


  12.1.11.  Amateur radio (AX.25)


    Gracilis PackeTwin

    Ottawa PI/PI2

    La maggior parte delle schede HDLC generiche 8530


  12.1.12.  Schede PCMCIA



    Vedere l'Appendice B per un elenco completo o per un elenco di
     pagine Web di David Hinds all'indirizzo
     <http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html>


  12.2.  Driver alpha e beta

  12.2.1.  Ethernet


    Racal-Interlan NI5210 (chip i82586 Ethernet). Supporto potenziato
     nel kernel 2.2 e nelle versioni pi aggiornate

    Racal-Interlan NI6510 (chip am7990 lance). A partire dal kernel
     1.3.66 sono supportati oltre 16 MB di RAM.

    Racal-Interlan, scheda PCI (chip 97c970 di rete per PC AMD)


  12.2.2.  ISDN


    SpellCaster's Datacomute/BRI, Telecomute/BRI (ISA) (sc)


  12.2.3.  ATM


    Scheda Efficient Networks ENI155P-MF 155 Mbps ATM (PCI)
     <http://lrcwww.epfl.ch/linux-atm/>


  12.2.4.  Frame relay


    Sangoma S502, scheda frame relay a 56K
     <ftp://ftp.sovereign.org/pub/wan/fr/>


  12.2.5.  Senza cavi


    Proxim RangeLan2 7100 (ISA) / 630x (OEM mini-ISA)
     <http://www.komacke.com/distribution.html>


  12.3.  Non supportati


    3Com 3C359 Velocity XL PCI

    3Com 3C339 Velocity PCI

    IBM PCI LANStreamer, MCA LANStreamer, token ring

    Intel TokenExpress PRO, TokenExpress 16/4

    Schede Sysconnect / Schneider & Koch Token Ring (tutte)


  13.  Schede audio


  Ulteriori informazioni relative ai driver e alle schede audio sono
  disponibili nel sito Web all'indirizzo
  <http://www.opensound.com/ossfree> o
  <http://www.opensound.com/oss.html>.

  13.1.  Supportati


    4Front Technology Virtual Mixer (include SoftOSS)

    4Front Technology Virtual Synth (SoftOSS)

    6850 UART MIDI

    A-Plus Sound of Music (OPL3-SA)

    A-Trend Harmony 3Ds751 (PCI)

    AcerMagic S23

    Adlib FM synthesizer, scheda

    Adlib MSC 16 PnP (CS4235)

    AMD Interwave, scheda di riferimento

    ARC Probook

    Audio Excell DSP16

    Avance Logic, schede basate sul chip ALS-007.
     Il codice di questo chip  integrato nel driver Sound Blaster 16.
     Isapnptools deve essere utilizzato per la configurazione.

    AW32 Pro (R2.2-W2)

    AW35 (CS4237)

    AW37 Pro (CS4235)

    Aztech Sound Galaxy NX Pro, NX Pro 16, WaveRider 32+

    Aztech Washington

    BTC Mozart Sound System

    BTC-1831, scheda audio (Opti 1688)

    Bravo, scheda audio (Opti 82C930)

    Bull PowerPc, audio incorporato

    CDR4235-6/-8

    CS32-3DI

    Compaq Deskpro XL, audio integrato

    Creative EMU8000, aggiunta (PnP)

    Creative Phone Blaster 28.8/33.6

    Creative Sound Blaster 1.0 to 2.0

    Creative Sound Blaster Pro

    Creative Sound Blaster 16


    Creative Sound Blaster 16 ASP

    Creative Sound Blaster 16 PnP (dal tipo 1 al tipo 10)

    Creative Sound Blaster 16 Vibra

    Creative Sound Blaster 2.x

    Creative Sound Blaster 32/AWE

    Creative Sound Blaster 32/AWE PnP (dal tipo 1 al tipo 10)

    Creative Sound Blaster AWE64 (dal tipo 1 al tipo 7)

    Creative Sound Blaster AWE64 Gold (tipo 1 e tipo 2)

    Creative Sound Blaster PCI64/128

    Le schede Creative Sound Blaster AWE64/Gold e 16/32/AWE PnP devono
     essere attivate mediante isapnptools.

    Creative ViBRA16C/CL/S (tipo 1 e tipo 2) PnP

    Creative ViBRA16X PnP (solo half duplex)

    CrystaLake Crystal Clear serie 100

    Crystal Audio (CS4235)

    Crystal CRD4236B-1E

    Crystal CRD4237B-5/-8

    Crystal CSC0B35 (CS4236B)

    Crystal CX4237B-SIDE

    Crystal Onboard PnP Audio (CS4235)

    Dell Latidude, audio incorporato

    Diamond Crystal MM PC/104

    Digital AXP, audio incorporato

    ECHO-PSS, schede (Orchid SoundWave32, Cardinal DSP16)

    ESS 1868, 1869 (tipo 1 e tipo 2), 1878, 1879, 1968 PnP AudioDrive

    Ensoniq AudioPCI (ES1371)

    Ensoniq AudioPCI / SoundBlaster PCI (ES1370)

    Ensoniq Soundscape Elite

    Ensoniq Soundscape PnP (modello 1 e 2)

    Ensoniq Soundscape S-2000

    Ensoniq Soundscape VIVO, VIVO90

    Ensoniq ActionNote 880 C/CX

    Gallant, scheda audio (basata su SC-6000 e SC-66000)


    Gravis Ultrasound

    Gravis Ultrasound Extreme

    Gravis Ultrasound 16 bit, scheda figlia di campionamento

    Gravis Ultrasound MAX

    Gravis Ultrasound ACE

    Gravis Ultrasound PnP (con RAM), PnP Pro

    HP OmniBook 2100 (CS4236)

    Home Studio 64 (solo audio analogico)

    IBM Audio Feature (CS423x)

    Logitech SoundMan Games (supporto stereo SBPro, 44kHz)

    Logitech SoundMan Wave (Jazz16/OPL4)

    Logitech SoundMan 16 (compatibile PAS-16)

    MED3201, scheda audio

    Maxi Sound 32 PnP (solo audio analogico)

    Maxi Sound 64 Dynamic 3D (solo audio analogico)

    Media Sound SW/32 (non in modalit PnP)

    MediaTriX AudioTriX Pro, 3D XG

    Media Vision Premium 3D (Jazz16)

    Media Vision Pro Sonic 16 (Jazz)

    Media Vision Pro Audio Spectrum 16 (PAS-16)

    Media Vision Pro Audio Studio 16

    Media Vision Thunderboard

    Microsoft Windows, scheda audio di sistema (AD1848)

    MiroSound PCM!-pro

    MultiWave AudioWave Green 16

    Music Quest MIDI, scheda del connettore (MCC)

    Music Quest MQX-16, MQX-16S MIDI, scheda

    Music Quest MQX-32, MQX-32M MIDI, scheda

    Music Quest PC MIDI, scheda

    NEC Harmony

    Orchid SoundDrive 16EZ

    Pine PT201

    Primax SoundStorm FM 16, SoundStorm Wave

    Pro Audio Spectrum 16, Studio 16

    RME Digi32, Digi32 Pro, Digi32/8

    Reveal SC300

    Reveal WaveExtreme Pro (con RAM)

    Roland MPU IPC-T MIDI, scheda

    S3 SonicVibes

    Scheda audio generica basata su AD1815 (PnP)

    Scheda audio generica basata su CMI8330 (PnP)

    Scheda audio o scheda madre generica basata su Crystal CS4232 (non
     PnP)

    Scheda audio generica basata su Crystal CS4232 di Acer (modalit
     PnP)

    Scheda audio Crystal CS4232 dal tipo 1 al tipo 3 (modalit PnP)

    Scheda audio Crystal CS4235 tipo 1

    Scheda audio Crystal CS4236 (dal tipo 1 al tipo 3)

    Scheda audio o scheda madre basata su Crystal CS4236, (non PnP)

    Scheda audio Crystal CS4236A (tipo 1 e tipo 2), CS4236B

    Scheda audio o scheda madre Crystal CS4237, (non PnP)

    Scheda audio basata su Crystal CS4237B (tipo 1 e tipo 2)

    Scheda audio o scheda madre basata su Crystal CS4238, (non PnP)

    Scheda audio o scheda madre basate su ESS ES688, ES1688, ES1788,
     ES1868, ES1869, ES1887, ES1888

    Scheda audio generica Jazz16

    Scheda audio generica MAD16 (OPTi 82C928), MAD16 Pro, MAD16 Pro
     (duplex) (OPTi 82C929)

    Scheda audio generica Mozart (chip OAK OTI-601)

    Scheda audio generica OPTi 82C924, 82C925,  (PnP)

    Schede audio generiche OPTi 82C924 (non in modalit PnP).
     Utilizzare il driver MSS e gli strumenti isapnp.

    Scheda audio generica OPTi 82C930

    Scheda audio generica OPTi 82C931
     Fare riferimento al sito Web all'indirizzo
     <http://spoke.nols.com/~drees/opti931.html>

    Schede audio generiche Soundscape

    Schede audio generiche compatibili con il sistema audio Windows

    Schede audio generiche Yamaha OPL3-SA1 (YMF701)


    Schede audio generiche Yamaha OPL3-SA2 (YMF711) (tipo 1, tipo 3 e
     tipo 4)

    Schede audio generiche Yamaha OPL3-SA3 (YMF715)

    Scheda audio generica Yamaha OPL3-SAx (YMF715/YMF719) non-PnP

    Shark Mako

    Sharp PC8800

    Shuttle Sound System 48

    Spacewalker HOT-255 PCI 3D (PCI)

    TerraTec Maestro 32/96

    Terratec EWS64XL (solo audio)

    Terratec Sound System Base 1 (AD1816)

    Terratec Sound System Base 64 (AD1816)

    Tomato Sound System (OPTi 82C930)

    Trust Sound Expert De Luxe Wave 32

    Turtle Beach Classic/Tahiti/Monterey

    Turtle Beach Maui

    Turtle Beach Monte Carlo 928, Monte Carlo 929

    Turtle Beach Pinnacle/Fiji

    Turtle Beach Tropez, Tropez Plus (solo audio)

    Turtle Beach Daytona (solo audio)

    Wearnes Classic 16

    Yamaha Sound Edge SW20-PC

    Zefiro Acoustics ZA2 (NON CONSIGLIATA)

    Zenith Z-Player


    Il supporto di AWE32/64  stato reso disponibile a partire dal
     kernel serie 2.1.x (verificare l'HOWTO relativo alla SoundBlaster
     AWE di Marcus Brinkmann per dettagli sull'installazione).

    Modalit MPU-401 MIDI Intelligent (non attivarla avventatamente)

    MPU IPC-T

    MQX-32M

    MPU-401 MIDI UART solo porta stupida (non attivarla avventatamente)

    Sintetizzatori Yamaha FM (OPL2, OPL3, OPL3-SAx (dal kernel serie
     2.1.x) e OPL4)

  OSS supporta tutte le schede figlie MIDI inclusa Wave Blaster, TB Rio
  e Yamaha DB50XG. L'unico requisito necessario  costituito dal fatto
  che la scheda ``host'' deve essere supportata da OSS. Si pu notare
  che la scheda host deve essere configurata mediante soundconf. La
  scheda figlia sar automaticamente accessibile attraverso il MIDI
  della scheda host.


  13.2.  Driver alpha e beta


    4Front Tech. Dispositivo audio di loopback Waveloop

    Acer FX-3D (basato su AD1816)

    AVM Apex Pro card (basato su AD1816)

    Aztech AZT1008, AZT2320, AZT3000

    Aztech SC-16 3D (basato su AD1816)

    Creative Sound Blaster Vibra16x

    Creative Sound Blaster Live! e Live! Value Edition
     Creative Labs dispone di driver beta per questa scheda. Funzionano
     con i kernel 2.0.36 e 2.2.5 (e con la maggior parte dei kernel pi
     aggiornati di questa serie). I driver possono essere scaricati in
     corrispondenza dell'area di download del software nel sito Web
     all'indirizzo  <http://www.creativelabs.com>

    Highscreen Sound-Boostar 32 Wave 3D (basato su AD1816)

    Highscreen Sound-Boostar 16 (basato su AD1816)

    HP Kayak (basato su AD1816)

    IBM MWave

    Newcom SC-16 3D (basato su AD1816)

    Altoparlanti PC / Porta parallela DAC
     <ftp://ftp.informatik.hu-berlin.de/pub/os/linux/hu-sound/>

    Chipset Rockwell WaveArtist

    Sonorus STUDI/O

    SY-1816 (basato su AD1816)

    Terratec Base 1, Base 64 (basato su AD1816)

    Terratec EWS64S (basato su AD1816)

    Turtle Beach Malibu
     <ftp://ftp.cs.colorado.edu/users/mccreary/archive/tbeach/multisound/>

  Per le schede audio basate sul chip AD1816  necessario isapnptools
  per la configurazione.


  13.3.  Non supportate


    A-Trend Harmony 3DS724 (PCI)

    Actech PCI 388-A3D q

    Adaptec AME-1570

    Aureal Vortex (PCI)

    Cardinal DSP 16

    Contributo dei driver di livello inferiore

    Crystal CS4614 (PCI)

    Cyrix MediaGX, schede audio incorporate

    Diamond Monster Sound MX300

    Diamond Sonic Impact

    Dream 94PnP Home Studio

    EON Bach SP901 (A3D)

    ESS (PCI)

    ESS Maestro-1 (PCI), Maestro-2 (PCI)

    ESS Solo-1 (PCI)

    Echo Personal Sound System

    Schede audio generiche ALS007, ALS100

    Orchid NuSound 3D

    Orchid SoundWave 32

    Paradise DSP-16

    Quicknet Internet LineJACK

    Terratec XLerate (A3D)

    Turtle Beach Montego

    Turtle Beach TBS-2000

    Videologic SonicStorm

    Wearnes Beethoven ADSP-16

    Western Digital Paradise DSP-16

    Yamaha YMF724 (PCI)

  Il chip ASP della serie Sound Blaster 16 non  supportato. Il
  sintetizzatore AWE32 E-mu MIDI non  supportato.

  Nathan Laredo <laredo@gnu.ai.mit.edu> potr fornire driver AWE32 su
  richiesta. Si occupa anche di creare driver per la maggior parte
  dell'hardware se gli vengono inviati campioni gratuiti dell'hardware a
  disposizione.

  Le schede Sound Blaster 16 con DSP 4.11 e 4.12 causano un errore a
  livello di hardware che porta al verificarsi di blocchi durante
  l'esecuzione di audio MIDI e digitale contemporaneamente. Il problema
  pu verificarsi con le schede figlie Wave Blaster o i dispositivi MIDI
  collegati alla porta MIDI. Non esiste alcun rimedio noto.



  14.  Dischi rigidi

  Tutti i dischi rigidi funzionano se il controller  supportato.

  (Da SCSI HOWTO) Tutti i dispositivi SCSI ad accesso diretto con una
  dimensione del blocco di 256, 512 o 1024 byte dovrebbero funzionare.
  Altre dimensioni di blocco non funzioneranno.  (Si potr notare che
  questo problema pu essere spesso risolto modificando il blocco e/o le
  dimensioni dei settori mediante il comando MODE SELECT SCSI).

  Le unit IDE (EIDE) di grandi dimensioni hanno un buon funzionamento
  con i kernel pi aggiornati. La partizione di avvio deve essere
  collocata nei primi 1024 cilindri a causa delle limitazioni del BIOS
  del PC.

  Alcune unit Conner CFP1060S possono avere problemi con Linux ed
  ext2fs.  I sintomi sono costituiti da errori inode durante
  l'esecuzione di e2fsck e dalla corruzione dei file system.  Conner ha
  creato un aggiornamento del firmware per risolvere questo problema,
  contattare Conner al numero telefonico 1-800-4CONNER (Stati Uniti) o
  +44-1294-315333 (Europa).  necessario disporre della versione del
  microcodice, disponibile nell'etichetta dell'unit, al momento della
  chiamata.

   stato rilevato che molte unit Maxtor e Western Digital IDE non sono
  in grado di coesistere senza problemi nello stesso cavo IDE con le
  unit di altri fabbricanti. In genere una delle unit subisce
  interruzione durante le operazioni. La soluzione consiste nel
  connetterli a cavi IDE diversi.

  Alcune unit Micropolis hanno problemi con le schede Adaptec e
  BusLogic, contattare i fabbricanti delle unit per gli aggiornamenti
  del firmware se si sospetta il verificarsi di problemi.


    Driver di dispositivi multipli (RAID-0, RAID-1)
     <ftp://sweet-smoke.ufr-info-p7.ibp.fr/public/Linux/>


  14.1.  Non supportati

  Le unit disco rigido riportate di seguito non sono supportate da
  Linux. Leggere il report degli errori disponibile.


    NEC D3817, D3825, D3827, D3847
     ``Queste unit sono leggermente SCSI-2 non compatibili nei valori
     riportati in Mode Sense Page 3. In Mode Sense Page 3 tutte le unit
     NEC D38x7 indicano la rispettiva dimensione dei settori come pari a
     zero. Le unit NEC sono le prime unit mai riscontrate in
     precedenza che indicano la dimensione dei settori pari a zero.
     Sfortunatamente, il campo in Mode Sense Page 3 non  modificabile e
     non esiste alcun modo per aggiornare il firmware nella unit D38x7
     per correggere questo problema.''  I problemi sono menzionati per
     le versioni D3825 e D3827 (entrambi versioni aggiornate di 0407).
     La versione 0410 di queste due unit disco rigido sembra risolvere
     il problema.


  15.  Unit a nastro

  15.1.  Supportate


    Unit a nastro SCSI
     (Da SCSI HOWTO) Le unit che utilizzano blocchi di lunghezza fissa
     e variabile di dimensione pi piccola della lunghezza del buffer
     del driver (impostata a 32 kb nelle origini di distribuzione) sono
     supportate. Tutte le unit dovrebbero funzionare virtualmente.
     (Inviare un messaggio di posta elettronica se si  a conoscenza di
     qualsiasi unit non compatibile.)

    Seagate Sidewinder 50 AIT (nel controller RAID ICP 6527)

    Unit QIC-02

    Iomega Ditto interno (ftape 3.04c e versioni pi aggiornate)


  15.2.  Driver alpha e beta


    Unit QIC-117, QIC-40/80, QIC-3010/3020 (QIC-WIDE)
     La maggior parte delle unit a nastro che utilizzano il controller
     del disco floppy dovrebbero funzionare. Sono supportati anche
     numerosi controller dedicati (Colorado FC-10/FC-20, Mountain
     Mach-2, Iomega Tape Controller II)
     <ftp://metalab.unc.edu/pub/Linux/kernel/tapes>

    Unit a nastro ATAPI
     Per questi componenti  disponibile un driver alpha (ide-tape.c)
     nel kernel. Le unit a nastro ATAPI supportate sono

    Seagate TapeStor 8000

    Unit a nastro Conner CTMA 4000 IDE ATAPI Streaming


  15.3.  Non supportate


    Schede dei controller a nastro Emerald and Tecmar QIC-02 - Chris
     Ulrich <insom@math.ucr.edu>

    Unit che si connettono alla porta parallela (es. Colorado Trakker)

    Alcuni controller a nastro a velocit elevata (Colorado TC-15)

    Irwin AX250L/Accutrak 250 (non QIC-80)

    IBM Internal Tape Backup Unit (non QIC-80)

    COREtape Light


  16.  Unit CD-ROM

  Per ulteriori informazioni relative alle unit CD-ROM, verificare il
  relativo HOWTO nel sito Web all'indirizzo
  <http://metalab.unc.edu/LDP/HOWTO/>.


  16.1.  Supportate


  Unit CD-ROM comuni

    Unit CD-ROM SCSI
     (Da CD_ROM HOWTO) Qualsiasi unit CD-ROM SCSI con una dimensione di
     blocco di 512 o 2048 byte dovrebbe funzionare con Linux. Questa
     caratteristica  inclusa nella maggior parte delle unit CD-ROM sul
     mercato.
    Unit CD-ROM EIDE (ATAPI) (IDECD)
     Sono supportate quasi tutte le unit a velocit doppia, quadrupla e
     sestupla, incluse

    Mitsumi FX400

    Nec-260

    Sony 55E

  Unit CD-ROM proprietarie

    Aztech CDA268-01A, Orchid CDS-3110, Okano/Wearnes CDD-110, Conrad
     TXC, CyCDROM CR520ie/CR540ie/CR940ie (AZTCD)

    Creative Labs CD-200(F) (SBPCD)

    Funai E2550UA/MK4015 (SBPCD)

    GoldStar R420 (GSCD)

    IBM External ISA (SBPCD)

    Kotobuki (SBPCD)

    Lasermate CR328A (OPTCD)

    LMS Philips CM 206 (CM206)

    Longshine LCS-7260 (SBPCD)

    Matsushita/Panasonic CR-521/522/523/562/563 (SBPCD)

    MicroSolutions Backpack, portdrive parallela (BPCD)

    Mitsumi CR DC LU05S (MCD/MCDX)

    Mitsumi FX001D/F (MCD/MCDX)

    Optics Storage Dolphin 8000AT (OPTCD)

    Sanyo CDR-H94A (SJCD)

    Sony CDU31A/CDU33A (CDU31A)

    Sony CDU-510/CDU-515 (SOMYCD535)

    Sony CDU-535/CDU-531 (SONYCD535)

    Teac CD-55A SuperQuad (SBPCD)


  16.2.  Driver alpha e beta


    LMS/Philips CM 205/225/202
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cdrom/lmscd0.4.tar.gz>

    NEC CDR-35D (vecchio)
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cdrom/linux-
     neccdr35d.patch>

    Sony SCSI multisession CD-XA
     <ftp://tsx-11.mit.edu/pub/linux/patches/sony-multi-0.00.tar.gz>


    Driver della porta parallela
     <http://www.torque.net/linux-pp.html>



  16.3.  Note

  Tutte le unit CD-ROM dovrebbero funzionare in modo simile per la
  lettura dei dati. Esistono numerosi problemi di compatibilit con le
  utilit di riproduzione dei CD.  (In particolare con le unit NEC di
  livello inferiore pi aggiornate.) Alcuni driver alpha possono non
  disporre ancora di supporto audio.

  Le unit CD-ROM NEC precedenti (a singola velocit) possono causare
  problemi con i controller SCSI disponibili correntemente.

  PhotoCD (XA)  supportato. Il programma hpcdtoppm di Hadmut Danisch
  converte i file di PhotoCD nel formato portatile pixmap. Il programma
   disponibile nel sito Web all'indirizzo
  <ftp://ftp.gwdg.de/pub/linux/hpcdtoppm> o come parte delle utilit
  PBM.

  Inoltre, la lettura dei CD video  supportata nei kernel serie 2.1.3x
  e nelle versioni successive. Una patch  disponibile per il kernel
  2.0.30.

  Infine, la maggior parte dei IDE CD-ROM Changers sono supportati.


  17.  CD-writer

  Molti CD-writer sono supportati da Linux. Per un elenco aggiornato di
  CD-writer supportati, fare riferimento CD-Writing mini-HOWTO
  all'indirizzo  <http://metalab.unc.edu/LDP/HOWTO/CD-Writing-
  HOWTO.html>, verificare al sito Web all'indirizzo
  <http://www.shop.de/cgi-bin/winni/lsc.pl> o all'indirizzo
  <http://www.guug.de:8080/cgi-bin/winni/lsc.pl>. Cdwrite
  <ftp://metalab.unc.edu/pub/Linux/utils/disk-management/> e cdrecord
  <http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>
  possono essere utilizzati per la scrittura su CD. Il pacchetto X-CD-
  Roast per Linux  un dispositivo grafico front-end per i CD-writer. Il
  pacchetto  disponibile nel sito Web all'indirizzo
  <ftp://metalab.unc.edu/pub/Linux/utils/disk-
  management/xcdroast-0.96d.tar.gz>.


    Grundig CDR 100 IPW

    HP CD-Writer+ 7100

    HP SureStore 4020i

    HP SureStore 6020es/i

    JVC XR-W2010

    Kodak PCD 225

    Mitsubishi CDRW-226

    Mitsumi CR-2600TE

    Olympus CDS 620E

    Philips CDD-521/10,522,2000,2600,3610

    Pinnacle Micro RCD-5020/5040

    Plextor CDR PX-24CS

    Ricoh MP 1420C

    Ricoh MP 6200S/6201S

    Sanyo CRD-R24S

    Smart and Friendly Internal 2006 Plus 2.05

    Sony CDU 920S/924/926S

    Taiyo Yuden EW-50

    TEAC CD-R50S

    WPI(Wearnes) CDR-632P

    WPI(Wearnes) CDRW-622

    Yamaha CDR-100

    Yamaha CDR-200/200t/200tx

    Yamaha CDR-400t/400tx


  18.  Unit rimovibili

  Tutte le unit SCSI funzionano se il controller  supportato, incluse
  optical (MO), WORM, floptical, Bernoulli, Zip, Jaz, SyQuest, PD e
  altre.


    Panasonic MO (combina un'unit CD-ROM e un disco ottico
     rimovibile).  necessario impostare uno switch durante la
     configurazione del kernel per fare in modo che entrambe le parti
     funzionino contemporaneamente.

    Unit Zip della porta parallela
     <ftp://gear.torque.net/pub/>

    Porta parallela Avatar Shark-250
     <http://www.torque.net/parport/>

  Le unit rimovibili funzionano come le unit disco rigido e i dischi
  floppy, eseguendo semplicemente fdisk/mkfs e montando i dischi. Linux
  fornisce alle unit il blocco se tale caratteristica  supportata.
  Anche mtools pu essere utilizzato se i dischi sono nel formato MS-
  DOS.

  Le unit CD-ROM richiedono software speciale per funzionare. Leggere
  il relativo HOWTO.

  Linux supporta i dischi a 512 e a 1024 byte/settori. A partire dal
  kernel 2.1.32 Linux supporta anche 2048 byte/settori. Una patch del
  kernel 2.0.30  disponibile nel sito Web all'indirizzo
  <http://liniere.gen.u-tokyo.ac.jp/2048.html>.

  Il supporto a 2048 byte/settori  necessario per

    Unit disco M2513 magneto-ottiche


  A partire dalla pre-patch-2.0.31-3 delle unit ZIP interne IDE/ATAPI,
  floptical e PD sono supportate.

    LS-120 floptical

    PD-CD


  19.  Mouse

  19.1.  Supportati


    Mouse seriale Microsoft

    Mouse seriale Mouse Systems

    Mouse seriale Logitech Mouseman

    Mouse seriale Logitech

    ATI XL Inport busmouse

    C&T 82C710 (QuickPort) (Toshiba, TI Travelmate)

    Microsoft busmouse

    Logitech busmouse

    Mouse PS/2 (dispositivo ausiliario)


  19.2.  Driver alpha e beta


    Sejin J-mouse
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/console/jmouse.1.1.70-jmouse.tar.gz>

    MultiMouse -- utilizzare dispositivi mouse multipli come mouse
     singoli
     <ftp://metalab.unc.edu/pub/Linux/system/misc/MultiMouse-1.0.tgz>

    Microsoft Intellimouse



  19.3.  Note

  Anche i dispositivi touchpad come Alps Glidepoint funzionano, finch
  sono compatibili con un altro protocollo del mouse.

  I mouse Logitech pi aggiornati, a eccezione di Mouseman, utilizzano
  il protocollo Microsoft e funzionano tutti e tre i pulsanti. Anche se
  i mouse Microsoft hanno solo due pulsanti, il protocollo ne consente
  tre.

  La porta del mouse dei componenti ATI Graphics Ultra e Ultra Pro
  utilizza il protocollo Logitech busmouse. (Fare riferimento a Busmouse
  HOWTO per ulteriori dettagli.)


  20.  Modem

  Tutti i modem interni o i modem esterni connessi alla porta seriale
  dovrebbero funzionare. Purtroppo alcuni fabbricanti hanno creato solo
  modem per Windows 95. Controllare nell'Appendice E per l'hardware non
  compatibile con Linux. Inoltre, molti modem dispongono solo di
  programmi flash per Win95/NT. Questi modem non possono essere
  aggiornati in corrispondenza di Linux.

  Un numero ridotto di modem  fornito con il software DOS che scarica
  il programma di controllo in fase di esecuzione. Questi modem possono
  in genere essere utilizzati caricando il programma in DOS ed
  effettuando una avvio a caldo.  consigliabile evitare l'utilizzo di
  tali modem dato che non sar possibile usufruirne con hardware non per
  PC in futuro.

  Tutti i modem PCMCIA dovrebbero funzionare con driver PCMCIA.

  I modem fax necessitano di software fax appropriato per funzionare. 
  inoltre importante accertarsi che la parte fax del modem supporti
  Class 2 o Class 2.0. Sembra che in genere per il software fax in
  sistemi Unix il supporto per Class 1.0 non sia disponibile.

  Un'eccezione a questo fatto  il programma efax Linux che supporta i
  modelli di fax Class 1 e Class 2. In alcuni casi possono verificarsi
  alcuni problemi tecnici minori con i modem Class 1. Se  possibile
  scegliere  consigliabile disporre di un modem Class 2.


    Digicom Connection 96+/14.4+ -- Programma di download del codice
     DSP
     <ftp://metalab.unc.edu/pub/Linux/apps/serialcomm/smdl-
     linux.1.02.tar.gz>

    Motorola ModemSURFR interno a 56 Kb. Aggiungere una coppia di righe
     a RC.SERIAL per IRQ e porte se non sono standard.

    ZyXEL serie U-1496 -- ZyXEL 1.4, programma di controllo
     modem/fax/audio
     <http://www.pe1chl.demon.nl/ZyXEL/ZyXEL-1.6.tar.gz>

    ZyXEL serie Elite 2864 -- programma di controllo modem/fax/audio
     <http://www.pe1chl.demon.nl/ZyXEL/ZyXEL-1.6.tar.gz>

    ZyXEL Omni TA 128 -- programma di controllo modem/fax/audio
     <http://www.pe1chl.demon.nl/ZyXEL/ZyXEL-1.6.tar.gz>

  Anche le schede a pi modem sono supportate da Linux.

    Scheda a pi modem Moreton Bay RAStel
     Verificare il sito Web all'indirizzo
     <http://www.moreton.com.au/linux.htm> per i driver di Linux.

  Il modem indicato di seguito non  supportato

    Aztech MDP3858 56.6 (PCI)


  21.  Stampanti/plotter

  Tutte le stampanti e i plotter connessi alla porta parallela o seriale
  dovrebbero funzionare. Purtroppo alcuni fabbricanti hanno creato
  stampanti solo per Windows 95. Verificare l'Appendice E per l'hardware
  compatibile con Linux.

    HP serie LaserJet 4 - free-lj4, programma di controllo delle
     modalit di stampa
     <ftp://metalab.unc.edu/pub/Linux/system/printing/free-
     lj4-1.1p1.tar.gz>


    Interfaccia della porta parallela BiTronics
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/misc/bt-
     ALPHA-0.0.1.module.patch.gz>

    Epson Stylus Color 850. Utilizzare Magicfilter con uno dei filtri
     ``stylus800-filter'', ``stylus_color_360dpi-filter'' o
     ``stylus_color_720dpi-filter''.


  21.1.  Ghostscript

  Molti programmi di Linux danno come risultato file PostScript. Le
  stampanti non PostScript possono emulare PostScript Level 2 mediante
  Ghostscript.

    Ghostscript
     <ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/>


  21.1.1.  Stampanti che supportano Ghostscript 5.1


    Apple Imagewriter

    Apple, stampante a matrice di punti

    Apple StyleWriter 2x00 (bjc600)

    Brother HL-660 (ljet4)

    C. Itoh M8510

    Canon BubbleJet BJ10e, BJ20 (bj10e)

    Canon BubbleJet BJ100, BJ200, BJC-210 (solo B/W), BJC-240 (solo
     B/W), BJC-250 (solo B/W), BJC-70 (solo B/W) (bj200)

    Canon BubbleJet BJC-600, BJC-610, BJC-4000, BJC-4100 (solo B/W),
     BJC-4200, BJC-4300, BJC-4400, BJC-4550, BJC-210, BJC-450, MultiPASS
     C2500, BJC-240, BJC-70 (bjc600)

    Canon BubbleJet BJC-800, BJC-7000 (bjc800)

    Canon Bubblejet BJC-610 (uniprint)

    Canon LBP-8II, LIPS III

    DEC LA50/70/75/75plus

    DEC LN03, LJ250 (decl250)

    Epson 9 pin, 24 pin, serie LQ, AP3250

    Epson Stylus Color/Color II/400/500/600/800 (stcolor)

    Epson Stylus Color/Color II/500/600/800/1520 (uniprint)

    Fujitsu 3400,2400,1200

    HP 2563B

    HP DesignJet 650C

    HP DeskJet, Deskjet Plus (deskjet)


    HP Deskjet 500, Deskjet Portable (djet500)

    HP Deskjet 500C (cdeskjet)

    HP Deskjet 550C (uniprint)

    HP DeskJet 400/500C/520C/540C/690C/693C (cdj500)

    HP DeskJet
     550C/560C/600/660C/660Cse/682C/683C/693C/694C/695C/850/870Cse
     (cdj550)

    HP DeskJet 850/855/870Cse/870Cxi/890C/672C/680/1100C (cdj850)

    HP DeskJet 500C/510/520/5540C/693C solo in bianco e nero (cdjmono)

    HP DeskJet 600 (lj4dith)

    HP DeskJet 600/870Cse, LaserJet 5/5L/6L (ljet4)

    HP Deskjet 600/1200C/1600C (pjxl300)

    HP Deskjet 500/500C/510/520/540/550C/560C/850C/855C e altre
     stampanti PCL3
     <ftp:ftp.pdb.sni.de/pub/utilities/misc/hpdj-2.1.tar.gz>

    HP Deskjet serie 710, 720, 820 e 1000
     <http://www.httptech.com/ppa/>

    HP Paintjet (pjtest)

    HP Paintjet XL (pjxltest)

    HP PaintJet XL300 (pjxl300)

    HP LaserJet/Plus/II/III/4/5/6

    IBM 3853 Jetprinter a colori

    IBM Proprinter

    Imagen ImPress

    Lexmark Optra E+ (ljet4)

    Mitsubishi CP50 a colori

    NEC P6/P6+/P60

    NEC Pinwriter P2X (uniprint)

    NEC SuperScript 860 (ljetplus)

    Oki OL410ex LED (ljet4)

    Okidata MicroLine 182

    Ricoh 4081/6000 (r4081)

    SPARCprinter

    StarJet 48, stampante a getto di inchiostro

    Tektronix 4693d a colori a 2/4/8 bit


    Tektronix 4695/4696, plotter a getto di inchiostro

    Xerox XES, stampanti (2700, 3700, 4045 e cos via)


  21.1.2.  Driver alpha e beta


    Epson Stylus Color 440


  22.  Scanner

  Per il supporto degli scanner  disponibile il pacchetto SANE (Scanner
  Access Now Easy). Le informazioni sono disponibili nel sito Web
  all'indirizzo  <http://www.mostang.com/sane/>. Pu essere scaricato
  dal sito Web all'indirizzo  <ftp://ftp.mostang.com/pub/sane/>. Si
  tratta di un'interfaccia universale per gli scanner ed  fornita
  completa della documentazione e di numerosi frontend e backend.

  Ulteriori informazioni relative a scanner palmari possono essere
  disponibili nel sito Web all'indirizzo
  <http://www.willamowius.de/scanner.html>

  Molti scanner dispongono dei relativi pacchetti software specifici che
  includono i driver.


  22.1.  Supportati


    A4 Tech AC 4096 / AS 8000P (a4scan)
     <ftp://ftp.informatik.hu-
     berlin.de/pub/local/linux/a4scan/a4scan.tgz>

    Adara Image Star I
     <http://fb4-1112.uni-muenster.de/ffwd/>
     <ftp://fb4-1112.uni-muenster.de/pub/ffwd/mtekscan-0.2.tar.gz>

    Conrad Personal Scanner 64, P105, scanner palmari (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

    Epson GT-5500 (SANE epson)

    Epson GT-6000
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/ppic0.5.tar.gz>

    Escom Image Scanner 256 (SANE umax)

    Fujitsu, scanner SCSI-2
     contattare Dr. G.W. Wettstein <greg%wind.UUCP@plains.nodak.edu>

    Genius ColorPage-SP2
     <http://fb4-1112.uni-muenster.de/ffwd/>
     <ftp://fb4-1112.uni-muenster.de/pub/ffwd/mtekscan-0.2.tar.gz>

    Genius GS-B105G, scanner palmari (gs105
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs105-0.0.1.tar.gz>

    Genius, scanner palmari GeniScan GS-4500, GS-4500A (gs4500
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs4500-2.0.tar.gz>

    HighScreen Greyscan 256, scanner palmari (solo BW) (gs4500)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs4500-2.0.tar.gz>

    HP ScanJet II serie SCSI
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/hpscanpbm-0.3a.tar.gz>

    HP ScanJet IIc, IIcx, IIp, 3c, 4c, 4p, 5p, 5pse, plus
     <http://www.tummy.com/xvscan/>

    Linotype Hell Jade, Jade2 (SANE umax)

    Logitech, scanner palmari Scanman+, Scanman 32, Scanman 256
     (logiscan)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/logiscan-0.0.4.tar.gz>

    Microtek ScanMaker modelli E3, E6, II, IIXE, III e 35t
     <http://fb4-1112.uni-muenster.de/ffwd/>
     <ftp://fb4-1112.uni-muenster.de/pub/ffwd/mtekscan-0.2.tar.gz>
     Gli scanner E3 ed E6 sono supportati anche da
     <http://www.tummy.com/xvscan/>

    Mustek M105, scanner palmari (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

    Mustek, scanner palmari HT800 Turbo, Matador 105, Matador 256
     (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

    Mustek Paragon 6000CX
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/muscan-2.0.6.taz>

    Nikon Coolscan, film scanner SCSI 35mm
     <ftp://metalab.unc.edu/pub/Linux/apps/graphics/capture/coolscan-0.2.tgz>

    Nikon AX-210 (SANE umax)

    Pearl 256, scanner palmari (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

    Polaroid DMC (SANE dmc)

    Vobis/Highscreen Scanboostar Premium (SANE umax)

    UMAX, scanner SCSI
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/umax-0.5.5.tar.gz>

    UMAX Vista S6, S6E, T630, Supervista S-12 (SANE umax)

    UMAX S-6E, S-6EG, S-12, S-12G (SANE umax)

    UMAX Astra 600S, 610S, 1200S, 1220S (SANE umax)

    UMAX UC 630, 840, 1200S, 1200SE (SANE umax)

    UMAX UG 80, 630 (SANE umax)

    UMAX PSD, Gemini D-16 (SANE umax)

  NOTA: i driver Mustek funzionano solo con schede di interfaccia
  GI1904. Eric Chang eric.chang@chrysalis.org ha creato una patch per
  utilizzarli con le schede di interfaccia IF960.





  22.2.  Driver alpha e beta


    Abaton Scan 300/S (SANE abaton)

    Abaton Scan 300/GS (SANE abaton)

    Agfa Focus, Focus II (SANE agfafocus)

    Agfa Focus Color, Focus Color Plus (SANE agfafocus)

    Agfa Focus Lineart (SANE agfafocus)

    Agfa Arcus II (SANE microtek)

    Agfa StudioScan II, IIsi (SANE microtek)

    Agfa SnapScan 300, 310, 600 (SANE snapscan)

    Apple Scanner, OneScanner, ColorOneScanner (SANE apple)

    Artec/Ultima AT3, AT6, AT12 (SANE artec)

    Artec A6000C+ (SANE artec)

    Canon CanoScan 300, CanoScan 600, CanoScan 2700F (SANE canon)

    Genius Colorpage-Vivid+
     Le informazioni sono disponibili nel sito Web all'indirizzo
     <http://thor.prohosting.com/~chrordig/Primax/index.html>. Anche il
     driver  disponibile in questo sito.

    Genius, scanner palmari SCSI GS-4000, ScanMate/32, ScanMate/GS
     (gs4500)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/gs4500-2.0.tar.gz>

    HP ScanJet IIc, IIp, IIcx, 3c, 4c, 3p, 4p, 5p, 6100c, 6200c (SANE
     hp)

    HP PhotoSmart PhotoScanner (SANE hp)

    Kodak DC210 (SANE dc210)

    Kodak DC20, DC25 (SANE dc25)

    Microtek Scanmaker E2, E3, E6, II, IIG, IIHR, IISP, III, 35t+,
     600Z(S), 600G(S) (SANE microtek)

    Microtek ScanMaker E3plus, 330, 630, 636, X6 (SANE microtek2)

    Microtek Phantom 636 (SANE microtek2)

    Mustek MFC-600S, MFC-600CD, MFC-800S (SANE mustek)

    Mustek MFS-6000CX, MFS-6000SP, MFS-8000SP, MFS-1200SP, MFS-12000CX
     (SANE mustek)

    Mustek SE-6000SP, SE-12000SP (SANE mustek)

    Mustek, scanner palmari HT105, M800 (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

    Nework Scanny MM100
     Le informazioni sono disponibili nel sito Web all'indirizzo
     <http://thor.prohosting.com/~chrordig/Primax/index.html>. Anche il
     driver  disponibile in questo sito.

    Nikon LS-20, LS-30, LS-1000 (SANE Coolscan)

    Plustek OpticPro 4830P, OpticPro 4831P, OpticPro 9630P/PL, OpticPro
     600P, OpticPro FBIII, OpticPro FBIV (SANE plustek)
     Il driver sane  disponibile nel sito Web all'indirizzo
     <http://www.efn.org/~rick/plustek/>

    Primax Colorado Direct 300, Colorado Direct 600/30bit, Storm
     Totalscan
     Le informazioni sono disponibili nel sito Web all'indirizzo
     <http://thor.prohosting.com/~chrordig/Primax/index.html>. Anche il
     driver  disponibile in questo sito.

    Siemens S9036 (SANE agfafocus)

    Tamarack Artiscan 6000C, 8000C, 12000C (SANE tamarack)

    UMAX Vista-S8, UC-1260, Mirage IIse, PL-II (SANE umax)

    Vobis HighScan (SANE microtek2)

    Voelkner Personal Scanner 64, scanner palmari (scan-driver)
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/scan-
     driver-0.1.8.tar.gz>

    Vuego 310S (SANE snapscan)


  22.3.  Non supportati


    Acer, scanner. Acer non rilascia alcuna informazione di
     programmazione.

    Escom 256, scanner palmari (Primax Lector Premier 256)

    Genius, scanner palmari ScanMate/256, ScanMate/Color, EasyScan

    Mustek CG 8000, scanner palmari

    Primax Colorado Direct 9600, Colorado 1200p, Colorado USB 19200
     Le informazioni possono essere disponibili nel sito Web
     all'indirizzo
     <http://thor.prohosting.com/~chrordig/Primax/index.html>

    Trust Ami Scan, scanner palmari

    UMAX, scanner paralleli


  23.  Altri componenti hardware

  23.1.  Amateur radio

  Le schede riportate di seguito sono supportate:

    Controller Terminal Node basati su KISS

    Scheda Ottawa PI

    Scheda Gracilis PacketTwin

    Altre schede basate su Z8530 SCC

    Modem Baycom per le porte parallele e seriali

    Schede Soundblaster

    Schede audio basate sul chipset Crystal


  23.2.  Monitor (DPMS) relativi al protocollo per il risparmio ener
  getico VESA

  Il supporto per il risparmio energetico  incluso nel kernel di Linux.
  Utilizzare setterm per attivare il supporto nella console Linux e xset
  per attivare il supporto in corrispondenza di X.


  23.3.  Schermi tattili

  Il server Metro-X supporta i seguenti controller degli schermi
  tattili:

    Schermi tattili seriali Carrol Touch
     <http://www.carrolltouch.com>

    EloGraphics

    Lucas Deeco

    MicroTouch


  23.4.  Terminali nelle porte seriali

  I vecchi terminali possono facilmente essere utilizzati con Linux
  collegandoli alla porta seriale del sistema. I seguenti terminali
  verranno supportati:


    VT52

    VT100

    VT220

    VT320

    VT420


  23.5.  Joystick

  Il supporto dei joystick  disponibile nelle distribuzioni XFree86 pi
  aggiornate (3.3.x) e nelle versioni del kernel 2.1.xx e 2.2.xx. Per i
  kernel di versioni ancora precedenti sono utili i collegamenti
  riportati di seguito.


    Driver joystick
     Per informazioni, fare riferimento all'indirizzo
     <http://atrey.karlin.mff.cuni.cz/~vojtech/joystick>. Un archivio
     FTP  disponibile nel sito Web all'indirizzo
     <ftp://atrey.karlin.mff.cuni.cz/pub/linux/joystick>.

  I joystick correntemente supportati sono:

    Amiga in sistemi Amiga

    CH Flightstick Pro compatibili con due hat e due pulsanti
     aggiuntivi

    DirectPad Pro, Interfacce joystick delle porte parallele (
     <http://www.ziplabel.com/dpadpro/index.html>)

    FP Gaming Assasin 3D (
     <http://www.fpgaming.com/portfolio/assn3d.html>)

    Gamepad con 6 e 8 pulsanti

    Genius Flight2000 Digital F-23 (
     <http://www.genius.kye.de/english/product/game.html>)

    Gravis Blackhawk Digital (
     <http://www.gravis.com/products/js_blackhawkdigital.html>)

    Gravis GamePad Pro (
     <http://www.gravis.com/products/gp_gamepadpro.html>)

    Gravis Xterminator GamePad (
     <http://www.gravis.com/products/xterminator.html>)

    Logitech CyberMan 2 ( <http://www.cyberman2.de>)

    Logitech ThunderPad Digital (
     <http://www.logitech.ch/Game+Controllers/ThunderPadDigital.html>)

    Logitech WingMan Extreme Digital (
     <http://www.logitech.ch/Game+Controllers/WingManExtremeDigital.html>)

    MadCatz Panther ( <http://www.fpgaming.com/portfolio/panther.html>)

    MadCatz Panther XL (
     <http://www.fpgaming.com/portfolio/panthxl.html>)

    Microsoft SideWinder 3D Pro (
     <http://www.eu.microsoft.com/products/hardware/sidewinder/3Dpro/default.htm>)

    Microsoft SideWinder Force Feedback Pro (
     <http://www.eu.microsoft.com/products/hardware/sidewinder/force-
     feedback/default.htm>)

    Microsoft SideWinder GamePad (
     <http://www.eu.microsoft.com/products/hardware/sidewinder/gamepad/default.htm>)

    Microsoft SideWinder Precision Pro
     <http://www.eu.microsoft.com/products/hardware/sidewinder/precision-
     pro/default.htm>)

    Multisystem, joystick (Atari, Amiga, Commodore, Amstrad)

    Multisystem mediante l'interfaccia 0.8.0.2 hw

    Nintendo Entertainment System, gamepad (e il clone - SVI, Pegasus
     ...)

    PDPI Lightning L4 gamecard ( <http://www.pdpi.net>)

    Sega Genesis, gamepad (MegaDrive)

    Sega Master System, gamepad

    Sega Saturn, gamepad


    SNESKey, interfacce joystick delle porte parallele

    Sony PlayStation, gamepad

    Joystick standard con 2, 3 o 4 assi e fino a un massimo di 4
     pulsanti

    Super Nintendo Entertainment System, gamepad

    ThrustMaster FCS compatibili con hat aggiuntivo

    ThrustMaster Millenium 3D Inceptor (
     <http://www.thrustmaster.com/products/millennium.htm>)

    ThrustMaster Rage 3D (
     <http://www.thrustmaster.com/products/rage3d.htm>)

    TurboGraFX, interfaccia joystick delle porte parallele  (
     <http://www2.burg-halle.de/~schwenke/parport.html>)


  23.6.  Schede di acquisizione video, frame grabber, sintonizzatori TV

  Sono disponibili alcuni programmi che supportano i sintonizzatori TV.
  Sono:

    BTTV  <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

    Xawtv

    Xtvscreen

  Tutte le schede con Bt848/Bt848a/Bt849/Bt878/Bt879 e input comuni
  Composite/S-VHS sono supportate. Teletext e Intercast sono supportati
  (solo PAL) tramite la codifica di esempi nel software.


    Adlink 7200, dispositivo I/O digitale
     <ftp://metalab.unc.edu/pub/Linux/science/lab/adl7200-0.60.tar.gz>

    Adlink 7300A, dispositivo I/O digitale
     <ftp://ftp.systemy.it/pub/develop/adl7300-0.04.tar.gz>

    CMOS, kit per le video conferenze. La scheda video ha un chipset a
     Bt849.  fornito di macchina fotografica CCD.

    Data Translation DT2803

    Data Translation DT2851, frame grabber
     <ftp://metalab.unc.edu/pub/Linux/apps/video/dt2851-2.01.tar.gz>

    Data Translation DT3155
     <http://krusty.eecs.umich.edu/people/ncowan/linux/welcome.html>

    Diamond DTV2000 (basato su Bt848)

    Dipix XPG1000/FPG/PPMAPA (basato su TI C40 DSP). La maggior parte
     delle schede aggiuntive  supportata.
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html> or
     <http://www.atlantek.com.au/USERS/wes/linux/frame.html>. Il driver
      disponibile nel sito Web all'indirizzo
     <ftp://ftp.atlantek.com.au/pub/ldipix>

    Epix SVM


    Epix, serie Silicon Video MUX di schede video di frame grabbing
     <http://www.ssc.com/lj/issue13/npc13c.html>

    FAST Screen Machine II
     <ftp://metalab.unc.edu/pub/Linux/apps/video/ScreenMachineII.2.0.tgz>

    Hauppage Wincast TV PCI (basato su Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

    Imaging Technology ITI/IC-PCI
     <ftp://ftp.gom-online.de/pub/IC-PCI/icpci-0.3.2.tar.gz>

    ImageNation Cortex I
     <ftp://metalab.unc.edu/pub/Linux/apps/video/cortex.drv.1.1.tgz>

    ImageNation CX100
     <ftp://metalab.unc.edu/pub/Linux/apps/video/cxdrv-0.86.tar.gz>

    ImageNation PX500
     <ftp://ftp.systemy.it/pub/develop>

    ImageNation PXC200
     <ftp://ftp.systemy.it/pub/develop>

    Imaging Technology Inc., frame grabber IC-PCI
     <ftp://gandalf.expmech.ing.tu-bs.de/pub/driver/icpci-0.2.0.tar.gz>

    Matrix Vision MV-Delta
     <http://www.matrix-vision.de/>

    Matrox Meteor
     <ftp://metalab.unc.edu/pub/Linux/apps/video/meteor-1.4a.tgz>

    Matrox PIP-1024
     <http://www.powerup.com.au/~sobeyp/pip_tar.gz>

    MaxiTV/PCI (basato su ZR36120)
     <ftp://metalab.unc.edu/pub/Linux/kernel/misc-
     cards/zr36120-971127.tgz>

    Miro PCTV (basato su Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

    MuTech MV1000 PCI
     <ftp://metalab.unc.edu/pub/Linux/apps/video/mv1000drv-0.33.tgz>

    MuTech MV200
     <http://www.powerup.com.au/~sobeyp/mu_tar.gz>

    Philips PCA10TV (non pi in produzione)
     <ftp://ftp.il.ft.hse.nl/pub/tv1000/pctv1000.02.tgz>

    Pinnacle PCTV (basato su Bt848)

    Pro Movie Studio
     <ftp://metalab.unc.edu/pub/Linux/apps/video/PMS-grabber.3.0.tgz>

    Scheda video Quanta WinVision B&W
     <ftp://metalab.unc.edu/pub/Linux/apps/video/fgrabber-1.0.tgz>

    Quickcam
     <ftp://metalab.unc.edu/pub/Linux/apps/video/qcam-0.7c-5.tar.gz>

    Nomadic Technologies Sensus 700
     <http://www.robots.com/> per informazioni comuni. Alas, Nomadic
     Technologies ha rimosso la pagina relativa a Sensus 700.
    Smart Video Recorder III (basato su Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

    STB TV PCI Television Tuner (basato su Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

    Tekram C210 (basato su ZR36120)
     <ftp://metalab.unc.edu/pub/Linux/kernel/misc-
     cards/zr36120-971127.tgz>

    Video Blaster, Rombo Media Pro+
     <ftp://metalab.unc.edu/pub/Linux/apps/video/vid_src-0.7.tgz>

    VT1500, schede TV
     <ftp://metalab.unc.edu/pub/Linux/apps/video/vt1500-1.0.9.tar.gz>


  23.7.  Fotocamere digitali

  Attualmente sono disponibili cinque programmi che possono essere
  utilizzati in combinazione con le fotocamere digitali.

    Camediaplay ( <http://www.itojun.org/itojun.html>)
      possibile scaricarlo dal sito Web all'indirizzo
     <ftp://ftp.itojun.org/pub/digicam/C-400L/unix/>

    Photopc ( <http://www.average.org/digicam/>)
     Pu essere scaricato dal sito Web all'indirizzo
     <ftp://ftp.average.org/pub/photopc/>

    Qvplay ( <http://www.asahi-net.or.jp/~XG2K-HYS/index-e.html>)
     Pu essere scaricato dal sito Web all'indirizzo  <http://www.asahi-
     net.or.jp/~XG2K-HYS/qvplay-0.93.tar.gz>

    JCAM, un'applicazione Java che consente ai proprietari di
     fotocamere di accedere e scaricare immagini da un'ampia variet di
     fotocamere digitali note ( <http://www.jcam.com>)
     Pu essere scaricato dal sito Web all'indirizzo
     <http://www.jcam.com/jcam/download.shtml>

    gPhoto ( <http://www.gphoto.org>)
     Pu essere scaricato dal sito Web all'indirizzo
     <http://www.gphoto.org/download.php3>

  Photopc pu essere esteso con un frontend Tk grafico disponibile nel
  sito Web all'indirizzo
  <http://www.mediacity.com/~pwhite/Phototk/phototk.html>. Anche Qvplay
  pu essere esteso con un frontend Tk grafico, disponibile nel sito Web
  all'indirizzo
  <http://www.bekkoame.or.jp/~tormato/pub/qvplaytk-0.73c.tar.gz>


  23.7.1.  Supportate


    Agfa ePhoto, linea di macchine fotografiche (photopc, camediaplay,
     JCAM)
     <http://www.agfahome.com/ephoto/>

    Apple QuickTake 200 (JCAM)

    Casio QV10, QV-10A, QV-11, QV-30, QV-70, QV-100, QV-200, QV-300,
     QV-700, QV-770 (qvplay)
     <http://www.casio.com/digitalimaging/digital-
     results.cfm?ObjectGroup_ID=171>

    Casio QV-10A, QV-11, QV-30, QV-70, QV-100, QV-300, QV-700, QV-770
     (JCAM)

    Chinon ES-1000 (stesso hardware, protocollo e formato di immagini
     Kodak DC20) (JCAM)
     <http://www.planet-interkom.de/oliver.hartmann/dc20secr.htm>

    Epson ``Colorio Photo'' CP-100 (PhotoPC) (photopc, camediaplay)
     <http://www.epson.com/cam_scan/>

    Epson ``Colorio Photo'' CP-200 (PhotoPC 500) (photopc, camediaplay,
     JCAM)
     <http://www.epson.com/cam_scan/>

    Epson ``Colorio Photo'' CP-200 (PhotoPC 550) (JCAM)

    Epson ``Colorio Photo'' CP-500 (PhotoPC 600) (photopc, camediaplay,
     JCAM)
     <http://www.epson.com/cam_scan/>

    Epson ``Colorio Photo'' CP-500 (PhotoPC 700) (JCAM)

    Epson PhotoPC 550 (photopc, camediaplay)
     <http://www.epson.com/cam_scan/>

    Fuji DS-7, DX-5 (DS-10), DX-7 (DS-20), DX-9 (DS-30), DS-300, MX-700
     (JCAM)

    HP Photo Smart Digital Camera (Alcuni sostengono che sia
     supportato, mentre altri negano questo supporto.)

    Kodak DC-20, DC-25, DC-200/210 (JCAM)
     <http://www.planet-interkom.de/oliver.hartmann/dc20secr.htm>

    Olympus C-300L, C-320L, C-420L, C-800L, C-840L, C-1000L, C-1400L
     (JCAM)
     <http://www.olympusamerica.com/digital/dhome.html>

    Olympus ``Camedia'' C-400L (D-200L) (photopc, camediaplay, JCAM))
     <http://www.olympusamerica.com/digital/dhome.html>

    Olympus ``Camedia'' C-820L (D-320L) (photopc, camediaplay, JCAM))
     <http://www.olympusamerica.com/digital/dhome.html>

    Olympus C2000Z (photocd)

    Sanyo VPC-G200/G200EX (photopc, camediaplay)
     <http://www.sanyo.co.jp/AV/CEmedia_e/products/digicam/digicam.html>

    Sanyo DSC-V1 (VPC-G200E) (photopc, camediaplay)
     <http://www.sanyo.co.jp/AV/CEmedia_e/products/digicam/digicam.html>

    Sanyo DSC-X1 (VPC-X300) (JCAM)

    Sanyo DSC-X300 (photopc, camediaplay)
     <http://www.sanyo.co.jp/AV/CEmedia_e/products/digicam/digicam.html>

    Nikon Coolpix 600/900 (Coolpix 600 non provato) (photopc)
     <http://www.nikonusa.com/products/products.taf?id=128> e
     <http://www.nikonusa.com/products/products.taf?id=129>

    Sierra Imaging SD640 (photopc)
     <http://www.sierraimaging.com/support/supchimgex.html>

    Toshiba PDR-2 (non accertato: photopc)
     <http://www.toshiba.com/taisisd/dsc/indexj.htm>
  23.7.2.  Non supportate


    Casio QV-120, QV-5000SX, QV-7000SX

    Kodak DC40, DC50, DC120


  23.8.  UPS

  Sono supportate numerose altre UPS. Per saperne di pi fare
  riferimento al relativo HOWTO.


    APC SmartUPS
     <http://www.dyer.vanderbilt.edu/server/apcupsd>

    APC-BackUPS 400/600, APC-SmartUPS SU700/1400RM
     <http://www.dyer.vanderbilt.edu/server/apcupsd>

    Fenton PowerPal
     <ftp://megatec.com.tw/Rups2/UNIX/v3.0.1> per il download e i
     manuali. Informazioni relative al sito Web sono disponibili
     all'indirizzo  <http://www.fentonups.com/index2.htm>

    Fenton Tele-UPS
     <ftp://megatec.com.tw/Rups2/UNIX/v3.0.1> per il download e i
     manuali. Informazioni relative al sito Web sono disponibili
     all'indirizzo  <http://www.fentonups.com/index2.htm>

    Fenton PowerOn
     <ftp://megatec.com.tw/Rups2/UNIX/v3.0.1> per il download e i
     manuali. Informazioni relative al sito Web sono disponibili
     all'indirizzo  <http://www.fentonups.com/index2.htm>

    UPS con porta di monitoraggio RS-232 (pacchetto genpower)
     <ftp://metalab.unc.edu/pub/Linux/system/ups/genpower-1.0.1.tgz>

    MGE UPS
     <http://www.mgeups.com/download/softlib.htm> e
     <http://www.mgeups.com/download/software/linux/upsp.tgz>

    Un daemon per arrestare e riavviare i computer connessi alle UPS. 
     in grado di rilevare la rete e consente l'utilizzo della modalit
     server e client.
     <ftp://metalab.unc.edu/pub/Linux/system/ups/powerd-2.0.tar.gz>


  23.9.  Schede multifunzione



    Pro Audio Spectrum 16 SCSI / Scheda di interfaccia audio


  23.10.  Acquisizione dei dati

  Il sito relativo a Linux Lab Project raccoglie driver per l'hardware
  relativo all'acquisizione dei dati e gestisce alcune liste di
  distribuzione relative a tale argomento. L'autore non ha esperienza di
  acquisizione dei dati, quindi si consiglia di verificare il sito per
  disporre di ulteriori dettagli.


    Linux Lab Project
     <http://www.llp.fu-berlin.de/>
    CED 1401

    DBCC CAMAC

    IEEE-488, schede (GPIB, HPIB)

    Keithley DAS-1200

    National Instruments AT-MIO-16F / Lab-PC+


    Schede dei dispositivi analogici RTI-800/815 ADC/DAC
     contattare Paul Gortmaker <gpg109@anu.edu.au>


  23.11.  Interfacce dei timer watchdog


    Berkshire Products PC Watchdog Card (schede ISA rev. A e C)
     Fare riferimento al sito Web all'indirizzo
     <ftp://ftp.bitgate.com/pub/bitgate/pcwd> per disporre del programma
     watchdog per PC. Un driver  incluso nei kernel recenti. Ulteriori
     informazioni su questo prodotto sono disponibili nel sito Web
     all'indirizzo  <http://www.berkprod.com/wdog.htm>

    ICS WDT500-P
     <http://www.indcompsrc.com/products/data/html/wdt500-p.html>

    ICS WDT501-P (con e senza contagiri delle ventole)
     <http://www.indcompsrc.com/products/data/html/wdt500-p.html>

    Outsource Engineering & Manufacturing Inc. Basic Watchdog Timer
     Board (ISA)
     Le informazioni sono disponibili nel sito Web all'indirizzo
     <http://www.ctec.net/basicwdt>. I driver sono correntemente
     installati nei kernel 2.0.29, 2.0.33 e 2.0.36.


  23.12.  Varie


    Mattel Powerglove

    AIMS Labs RadioTrack FM radio card
     <ftp://metalab.unc.edu/pub/Linux/apps/sound/radio/radiotrack-1.1.tgz>

    Reveal FM Radio card
     <ftp://magoo.uwsuper.edu/docs/radio.html>

    Videotext, schede
     <ftp://metalab.unc.edu/pub/Linux/apps/video/videoteXt-0.6.tar.gz>


  24.  Fonti di informazione correlate


    Archivio delle domande frequenti relative all'hardware di Cameron
     Spitzer
     <ftp://ftp.rahul.net/pub/cameron/PC-info/>

    Guida ai fornitori di computer
     <http://guide.sbanetweb.com/>

    Informazioni relative all'ottimizzazione dei sistemi
     <http://www.dfw.net/~sdw/>

  25.  Ringraziamenti

  Grazie a tutti gli autori e ai collaboratori di altri HOWTO, molti
  elementi sono presi direttamente dalle loro opere, a FRiC, Zane Healy
  ed Ed Carp, gli autori originali di questo HOWTO e a chiunque abbia
  inviato aggiornamenti e commenti. I ringraziamenti particolari vanno a
  Eric Boerner e lilo (la persona, non il programma) per i controlli sul
  funzionamento. Grazie anche a Dan Quinlan per la conversione SGML
  originale.


  26.  Appendice A. Schede S3 supportate da XFree86 3.3.x.



  CHIPSET   RAMDAC            CLOCKCHIP   BPP   SCHEDA

  801/805   AT&T 20C490                    16    Actix GE 32 / 32+ 2Mb
                                                 Orchid Fahrenheit 1280(+)
  801/805   AT&T 20C490       ICD2061A     16    STB PowerGraph X.24
  801/805                                        Del S3 805
                                                 Miro Crystal 8S
                                                 Orchid Fahrenheit VA
                                                 VL-41
  805       S3 GENDAC                      16    Miro 10SD VLB/PCI
                                                 SPEA Mirage VLB
  801/805   SS2410            ICD2061A     8     Diamond Stealth 24 VLB/ISA
  801/805   AT&T 20C490       Ch8391       16    JAX 8231/8241, SPEA Mirage
  801/805   S3 GENDAC                            Miro Crystal 10SD
  805i                                           Actix GE 32i
                                                 ELSA Winner 1000 ISA
  928       AT&T 20C490                    16    Actix Ultra
  928       Sierra SC15025    ICD2061A     32    ELSA Winner 1000 ISA/VLB/EISA
  928       Bt485             ICD2061A     32    STB Pegasus VL
  928       Bt485             SC11412      16    SPEA(/V7) Mercury VLB
  928       Bt485             ICD2061A     32    #9 GXE Level 10/11/12
  928       Ti3020            ICD2061A     32    #9 GXE Level 14/16
  928                                            928Movie
                                                 Diamond Stealth Pro
                                                 ELSA Winner 1000TwinBus
                                                 ELSA Winner 1000VL
                                                 ELSA Winner 2000
                                                 Miro Crystal 16S
  864                         ICD2061A           Miro Crystal 20SD (BIOS 2.xx)
  864       AT&T 20C498       ICS2494      32    Miro (Crystal) 20SD (BIOS 1.xx)
  864       AT&T 20C498/      ICD2061A/    32    ELSA Winner 1000 PRO VLB/PCI
  864       STG1700           ICS9161            MIRO 20SD (BIOS 2.x)
                                                 ELAS Winner 1000 PRO
  864       STG1700           ICD2061A     32    Actix GE 64 VLB
  864       AT&T 20C498/      ICS2595      16    SPEA(/V7) Mirage P64 DRAM (BIOS 3.x)
            AT&T 21C498
  864       S3 86C716 SDAC                 32    ELSA Winner 1000 PRO
                                                 Miro 20SD (BIOS 3.x)
                                                 SPEA Mirage P64 DRAM (BIOS 4.x)
                                                 Diamond Stealth 64 DRAM
                                                 Genoa Phantom 64i
                                                 Miro Crystal 20SD VLB (BIOS 3.xx)
  864       ICS5342           ICS5342      32    Diamond Stealth 64 DRAM (some)
  864       SDAC                                 Diamond Stealth 64 Graphics 2001
  864       AT&T 20C498-13    ICD2061A     32    #9 GXE64 PCI
  864                                            ASUS Video Magic PCI V864
                                                 VidTech FastMax P20





  CHIPSET   RAMDAC            CLOCKCHIP   BPP   SCHEDA

  964                                            ELSA Winner 2000 PRO-2,4
                                                 spider Tarantula 64
  964       AT&T 20C505       ICD2061A     32    Miro Crystal 20SV PCI/40SV
  964       Bt485             ICD2061A     32    Diamond Stealth 64
  964       Bt9485            ICS9161A     32    SPEA Mercury 64
  964       Ti3020            ICD2061A     8     ELSA Winner 2000 PRO PCI
  964       Ti3025            Ti3025       32    #9 GXE64 Pro VLB/PCI
                                                 Miro Crystal 40SV
  964       IBM RGB                        32    Hercules Graphite Terminator 64
  868       S3 86C716 SDAC                 32    ELSA Winner 1000AVI
                                                 Miro Crystal 20SD PCI
  868       AT&T 29C409                          ELSA Winner 1000AVI
  868                                            Diamond Stealth Video DRAM
                                                 Diamond Stealth 64 Video 2120/2200
                                                 ELSA Winner 1000PRO/X
                                                 #9 FX Motion 531
                                                 VideoLogic GrafixStar 500
  968                                            Diamond Stealth 64 Video 3200
                                                 ELSA Gloria-4/8
                                                 ELSA Winner 2000AVI
                                                 ELSA Winner 2000PRO/X-2/X-4/X-8
                                                 Genoa VideoBlitz III AV
                                                 Hercules Graphite Terminator Pro 64
                                                 LeadTek WinFast S430
                                                 LeadTek WinFast S510
                                                 Miro Crystal 80SV
                                                 Miro Crystal 20SV
                                                 #9 FX Motion 771
                                                 VideoLogic GrafixStar 700
                                                 WinFast S430/S510
  968       TVP3026                        32    ELSA Winner 2000PRO/X
                                                 Diamond Stealth 64 Video VRAM
  968       IBM RGB                        32    Genoa VideoBlitz III AVI
                                                 Hercules Terminator Pro 64
                                                 STB Velocity 64 Video
                                                 #9 FX Motion 771
                                                 Diamond Stealth 64 Video 3240/3400
  968       TI RAMDAC                            Diamond Stealth 64 Video 3240/3400
  732       (Trio32)                       32    Diamond Stealth 64 DRAM SE
                                                 (tutte le schede basate su Trio32)
  764       (Trio64)                       32    SPEA Mirage P64 (BIOS 5.x)
                                                 Diamond Stealth 64 DRAM
                                                 Diamond Stealth 64 Graphics 2xx0
                                                 #9 FX Vision 330
                                                 STB PowerGraph 64
                                                 (tutte le schede basate su Trio64)

  NOTA: per i chipset ViRGE/VX,DX,GX,GX2  necessario XFree86 3.3.1 o
  versioni successive.  necessario utilizzare il server XF86_SVGA.


  27.  Appendice B. Schede PCMCIA supportate


  Queste schede sono supportate dal pacchetto PCMCIA di David Hinds e
  questo elenco  preso dalla pagina Web di questo autore (
  <http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html>).


  Le schede CardBus sono elencate alla fine di ciascuna sezione. Allo
  stato attuale, tutti i driver CardBus devono essere considerati
  sperimentali.  necessario fare attenzione che alcune schede abbiano
  le versioni delle CardBus a 16 bit con nomi molto simili.  Se la

  CHIPSET   RAMDAC        CLOCKCHIP   BPP   SCHEDA

            (Trio64V+)                       DSV3326
                                             Diamond Stealth 64 Video 2001
                                             DataExpert DSV3365
                                             ExpertColor DSV3365
                                             MAXColor S3 Trio64V+
                                             ELSA Winner 1000TRIO/V
                                             Hercules Terminator 64/Video
                                             #9 FX Motion 331
                                             STB Powergraph 64 Video
                                             VideoLogic GrafixStar 400
            (Trio64V2)                       ELSA Winner 1000/T2D
            (ViRGE)                          Canopus Co. Power Window 3DV
                                             DSV3325
                                             DataExpert DSV3325
                                             Diamond Multimedia Stealth 3D 2000
                                             Diamond Multimedia Stealth 3D 2000 PRO
                                             Diamond Stealth 3D 2000
                                             Diamond Stealth 3D 2000 PRO
                                             Diamond Stealth 3D 3000
                                             ELSA Victory 3D
                                             ELSA Victory 3DX
                                             ELSA Winner 3000-S
                                             Expertcolor DSV3325
                                             Hercules Terminator 64/3D
                                             LeadTek WinFast 3D S600
                                             MELCO WGP-VG4S
                                             #9 FX Motion 332
                                             Orchid Tech. Fahrenheit Video 3D
                                             STB systems Powergraph 3D
                                             WinFast 3D S600
            (ViRGE/DX)                       Hercules Terminator 3D/DX
            (ViRGE/GX)                       STB Nitro 3D
            (ViRGE/VX)                       ELSA Winner 2000AVI/3D
                                             ELSA Winner 3000
                                             ELSA Winner 3000-L-42/-M-22
                                             MELCO WGP-VX8
                                             STB Systems Velocity 3D
  911/924                                    Diamond Stealth VRAM
  924       SC1148 DAC

  versione di CardBus non  elencata come supportata in modo specifico,
  non ci si deve attendere che funzioni.



  27.1.  Schede Ethernet


    Le schede SMC, Megahertz e Ositech utilizzano il driver smc91c92_cs

    Le schede 3Com e Farallon utilizzano il driver 3c589_cs

    Le schede Fujitsu, TDK, RATOC, CONTEC, Eagle e Nextcom utilizzano
     il driver fmvj18x_cs

     Tutte le altre schede utilizzano il driver pcnet_cs.  probabile
     che anche altre schede NE2000 compatibili che non sono nell'elenco
     funzionino con pcnet_cs.



    3Com 3c589, 3c589B, 3c589C, 3c589D (3c589_cs)

    3Com Megahertz 3CCE589E, 3CXE589D, 3CXE589EC (3c589_cs)

    Accton EN2212, EN2216 EtherCard (pcnet_cs)

    Accton SOHO BASIC EN220 (pcnet_cs)

    Addtron Ethernet (pcnet_cs)

    AIBrain EPCM-T (pcnet_cs)

    Allied Telesis CentreCOM CE6001, LA-PCM, LA-PCM V2 (pcnet_cs)

    AmbiCom AMB8002, AMB8002T (pcnet_cs)

    AnyCom ECO Ethernet (pcnet_cs)

    Apollo RE450CT (pcnet_cs)

    Argosy EN210 (pcnet_cs)

    Asante FriendlyNet (pcnet_cs) (l'autore riporta il fatto che sembra
     che le nuove schede non funzionino)

    AST 1082 Ethernet (pcnet_cs)

    Billionton LNT-10TB, LNT-10TN (pcnet_cs)

    Califormia Access LAN Adapter

    CeLAN EPCMCIA (pcnet_cs)

    CNet CN30BC, CN40BC Ethernet (pcnet_cs)

    Compaq Ethernet Adapter (xirc2ps_cs)

    Compex/ReadyLINK Ethernet Combo (pcnet_cs)

    Compex Linkport Ethernet (pcnet_cs)

    COMPU-SHACK BASEline Ethernet (pcnet_cs)

    Connectware LANdingGear Adapter (pcnet_cs)

    Corega Ether PCC-T, PCM-T (pcnet_cs)

    CyQ've ELA-010 10baseT (pcnet_cs)

    CONTEC C-NET(PC)C (fmvj18x_cs)

    Danpex EN-6200P2 Ethernet (pcnet_cs)

    Datatrek NetCard (pcnet_cs)

    Dayna Communications CommuniCard E (pcnet_cs)

    Digital DEPCM-AA, PCP78-AC Ethernet (pcnet_cs)

    Digital EtherWORKS Turbo Ethernet (pcnet_cs)

    D-Link DE-650, DE-660 (pcnet_cs)

    DynaLink L10C Ethernet (pcnet_cs)

    Eagle NE200 Ethernet (fmvj18x_cs)


    Edimax Technology Ethernet Combo (pcnet_cs)

    EFA InfoExpress 205, 207 Combo (pcnet_cs)

    Eiger Labs EPX-ET10T2 Combo (pcnet_cs)

    Eiger Labs EPX-10BT, EPX-ET 10BT EPX-ET 10TZ (fmvj18x_cs)

    ELECOM Laneed LD-CDWA, LD-CDX, LD-CDNIA, LD-CDY, LD-CDF (pcnet_cs)

    EP-210 Ethernet (pcnet_cs)

    Epson Ethernet (pcnet_cs)

    EtherPRIME Ethernet (pcnet_cs)

    Explorer NE-10000 Ethernet (pcnet_cs)

    EZLink 4109 Ethernet (pcnet_cs)

    Farallon Etherwave, EtherMac (3c589_cs)

    Fiberline FL-4680 (pcnet_cs)

    Fujitsu FMV-J181, FMV-J182, FMV-J182A, FMV-J183 (fmvj18x_cs)

    Fujitsu Towa LA501, FMV-1080, FM50N-183 (fmvj18x_cs)

    Gateway 2000 Ethernet (pcnet_cs)

    Genius ME3000II Ethernet (pcnet_cs)

    Grey Cell Ethernet (pcnet_cs)

    GVC NIC-2000P Ethernet Combo (pcnet_cs)

    Hitachi HT-4840-11 EtherCard (fmvj18x_cs)

    Hypertec HyperNet (pcnet_cs)

    IBM CreditCard Ethernet Adapter (pcnet_cs)

    IC-Card Ethernet (pcnet_cs)

    Infotel IN650ct Ethernet (pcnet_cs)

    I-O Data PCLA/T, PCLA/TE (pcnet_cs)

    Katron PE-520 Ethernet (pcnet_cs)

    KingMax Technology EN10-T2 Ethernet (pcnet_cs)

    Kingston KNE-PCM/M, KNE-PC2, KNE-PC2T (pcnet_cs)

    KTI PE-520 Plus (pcnet_cs)

    LANEED LD-CDW Ethernet (pcnet_cs)

    LanPro EP4000A (pcnet_cs)

    Lantech Ethernet (pcnet_cs)

    Level One EPC-0100TB (pcnet_cs)

    Linksys EtherCard (pcnet_cs)

    Logitec LPM-LN10T, LPM-LN10BA, LPM-LN20T Ethernet (pcnet_cs)

    Longshine ShineNet LCS-8534TB Ethernet (pcnet_cs)

    Macnica ME-1 Ethernet (pcnet_cs)

    Maxtech PCN2000 Ethernet (pcnet_cs)

    Megahertz XJ10BT, XJ10BC, CC10BT Ethernet (smc91c92_cs)

    Melco LPC-TJ, LPC-TS, LPC-T, LPC2-T (pcnet_cs)

    Microdyne NE4200 Ethernet (pcnet_cs)

    Midori LANNER LT-PCMT (pcnet_cs)

    Micronet Etherfast Adapter (pcnet_cs)

    NDC Instant-Link (pcnet_cs)

    Network General ``Sniffer'' (pcnet_cs)

    New Media EtherLAN (nmclan_cs)

    New Media LanSurfer (pcnet_cs)

    New Media LiveWire (NON LiveWire+) (nmclan_cs)

    New Media BASICS Ethernet (smc91c92_cs)

    NextCom NC5310 (fmvj18x_cs)

    Novell/National NE4100 InfoMover (pcnet_cs)

    Ositech Four of Diamonds (smc91c92_cs)

    OvisLink Ethernet (pcnet_cs)

    Panasonic CF-VEL211P-B (pcnet_cs)

    Planet SmartCom 2000, 3500, ENW-3501-T, ENW-3502-T (pcnet_cs)

    Pretec Ethernet (pcnet_cs)

    PreMax PE-200 Ethernet (pcnet_cs)

    Proteon Ethernet (pcnet_cs)

    Ratoc REX-9822, REX-5588A/W, REX-R280 (fmvj18x_cs)

    Relia RE2408T Ethernet (pcnet_cs)

    Reliasys 2400A Ethernet (pcnet_cs)

    RPTI EP400, EP401 Ethernet (pcnet_cs)

    SCM Ethernet (pcnet_cs)

    Sky Link Express (pcnet_cs)

    SMC 8020BT EtherEZ (non EliteCard) (smc91c92_cs)

    SMC 8022 EZCard-10 (pcnet_cs)

    Socket Communications EA LAN Adapter (pcnet_cs)

    Socket Communications LPE Low Power Ethernet (pcnet_cs)

    SOHOware Ethernet (pcnet_cs)

    SuperSocket RE450T (pcnet_cs)

    Surecom Ethernet (pcnet_cs)

    SVEC PN605C (pcnet_cs)

    TDK LAC-CD02x, LAK-CD021, LAK-CD022A, LAK-CD021AX, LAK-CD021BX
     (fmvj18x_cs)

    Thomas-Conrad Ethernet (pcnet_cs)

    Trust Ethernet Combo (pcnet_cs)

    UNEX NexNIC MA010 (pcnet_cs)

    Volktek NPL-402CT Ethernet (pcnet_cs)

    Xircom CreditCard CE2 (xirc2ps_cs)


  27.2.  Schede Fast Ethernet (10/100baseT)

  I driver epic_cb e tulip_cb sono sperimentali e necessitano dei kernel
  2.2.x o di una versione successiva.


    3Com 3c574TX, 3CCFE574BT (3c574_cs)

    3Com 3c575TX, 3CCFE575BT, 3CXFE575BT CardBus (3c575_cb, problemi di
     prestazioni)

    Abocom LinkMate FE1000 (pcnet_cs)

    Accton Fast EtherCard-16 (xirc2ps_cs)

    Accton EN2220 CardBus (tulip_cb)

    Allied Telesyn AT-2800 (tulip_cb)

    AmbiCom AMB8100 (tulip_cb)

    AnyCom ECO Ethernet 10/100 (pcnet_cs)

    Apollo Fast Ethernet (pcnet_cs)

    Argosy EN220 (smc91c92_cs)

    Compaq Netelligent 10/100 (xirc2ps_cs)

    Compex Linkport TX (tulip_cb)

    COMPU-SHACK FASTline 10/100 (pcnet_cs)

    Corega FastEther PCC-TX (pcnet_cs)

    D-Link DFE-650 (pcnet_cs)

    D-Link DFE-660TX (tulip_cb)

    Dynalink L100C (smc91c92_cs)


    EXP ThinLan 100 (pcnet_cs)

    Fiberline Fast Ethernet (pcnet_cs)

    Hamlet FE1000 10/100 (pcnet_cs)

    Intel EtherExpress PRO/100 (xirc2ps_cs, 16 bit NON 32 bit)

    IO DATA PCET/TX (pcnet_cs)

    Kingston KNE-CB4TX (tulip_cb)

    KTI KF-C16 (pcnet_cs)

    Laneed LD-10/100CD (pcnet_cs)

    Lantech FastNet/TX (smc91c92_cs)

    LevelOne FPC-0100TX (pcnet_cs)

    LevelOne FPC-0101TX 10/100Mbps CardBus (tulip_cb)

    Linksys PCMPC100 EtherFast 10/100 (pcnet_cs)

    Linksys PCMPC200 EtherFast CardBus (tulip_cb)

    Logitec LPM-LN100TX (pcnet_cs)

    Melco LPC2-TX (pcnet_cs)

    Melco/SMC LPC-TX (smc91c92_cs)

    Microcom TravelCard 10/100 (pcnet_cs)

    Micronet, scheda EtherFast (pcnet_cs)

    NetGear FA410TXC (pcnet_cs)

    Ositech Seven of Diamonds (smc91c92_cs)

    Ositech Seven of Spades CardBus (epic_cb)

    Planet FNW-3600T (pcnet_cs)

    SMC EZ CardBus 10/100 Ethernet (tulip_cb)

    SVEC FD606 10/100 Ethernet (tulip_cb)

    TDK NetworkFlyer LAK-CB100X, LAK-CB100AX CardBus (tulip_cb)

    Toshiba IPC5008A, Advanced Network 10/100 (xirc2ps_cs)

    UMAX Technologies UMAX250 (tulip_cb)

    WiseCom WC-PC400 (smc91c92_cs)

    Xircom CBEII-10/100 (tulip_cb)

    Xircom CreditCard CE3 (xirc2ps_cs, le nuove schede potrebbero non
     funzionare)


  27.3.  Schede Token-ring

  Si dovrebbe almeno disporre del kernel 1.3.72

    3Com 3c389 Tokenlink Velocity (ibmtr_cs)

    3Com 3c689 TokenLink III (ibmtr_cs)

    IBM, scheda token ring (ibmtr_cs)

    IBM Turbo 16/4 Token Ring (ibmtr_cs)


  27.4.  Schede di rete senza fili


    Aironet, schede di rete senza fili PC4500, PC4800 (airco_cs) (Ben
     Reed breed@almaden.ibm.com)

    AT&T / NCR / Lucent WaveLAN versione 2.0 (wavelan_cs)

    DEC RoamAbout/DS (wavelan_cs)

    Harris, reti LAN senza fili PRISM/AM79C930 IEEE 802.11
     <http://www.absoval.com/linux-wlan> (Mark Mathews mark@absoval.com)

    Lucent, schede di rete senza fili WaveLAN/IEEE (wavelan2_cs)
     (Lucent Technologies betasupport@wavelan.com)

    Raylink, reti senza fili
     <http://world.std.com/~corey/raylink.html> (Corey Thomas
     corey@world.std.com)

    WaveLAN/IEEE, schede di rete senza fili  <http://www.fasta.fh-
     dortmund.de/users/andy/wvlan> (Andreas Neuhaus andy@fasta.fh-
     dortmund.de)

    Xircom CreditCard Netwave (netwave_cs)


  27.5.  ISDN


    Scheda Elsa MicroLink ISDN (elsa_cs) (Klaus Lichtenwalder
     Klaus.Lichtenwalder@WebForum.DE)

    Scheda MPS ISLINEnote ISDN (mpsuni_cs) (Detlef Glaschick
     glaschick@mps-software.de)

    Scheda Sedlbauer Speed Star ISDN (sedl_cs) (Marcus Niemann
     niemann@www-bib.fh-bielefeld.de)

    Scheda Teles ISDN (teles_cs) (Christof Petig ea0141@uni-
     wuppertal.de)


  27.6.  Schede modem e seriali

  Virtualmente tutte le schede modem, le schede delle semplici porte
  seriali e i modem dei cellulari digitali dovrebbero funzionare. Sono
  supportati anche i modem ISDN che emulano un UART standard.


    Advantech COMpad-32/85, duale seriale (serial_cs)

    Argosy, duale seriale (serial_cs)

    Black Box I114A RS-422/485 (serial_cs)


    National Instruments PCMCIA-232, PCMCIA-232/2, PCMCIA-232/4
     (serial_cs)

    National Instruments PCMCIA-485, PCMCIA-485/2 (serial_cs)

    Omega Engineering QSP-100 (serial_cs)

    Schede Quatech, IOTech duali RS-232 (serial_cs)

    Scheda Quatech quad RS-232 (serial_cs)

    Scheda Socket Communications duale RS-232 (serial_cs)

    Trimble Mobile GPS (serial_cs)


  27.7.  Schede di memoria

  Tutte le schede SRAM dovrebbero funzionare. Le schede flash non
  supportate possono essere lette ma non scritte.


    Epson 2MB SRAM

    IBM 8MB Flash (memory_cs)

    Intel serie 2, serie 2+ e Value serie 100 Flash (memory_cs)

    Maxtor MobileMax 16MB Flash (memory_cs)

    New Media SRAM

    RATOC, scheda SmartMedia (memory_cs)

    TDK Flash Memory SFM20W/C 20MB (memory_cs)


  27.8.  Schede SCSI

   importante fare attenzione. Molti fornitori, in particolare i
  fornitori di unit CD-ROM, sembrano cambiare i chip dei controller a
  piacere. In genere utilizzano un codice del prodotto diverso, ma non
  sempre: le schede di versioni precedenti New Media Bus Toaster
  supportate non sono facilmente distinguibili dalle schede Bus Toaster
  correnti non supportate.


    Adaptec APA-1450A, APA-1460, APA-1460A/B/C/D SlimSCSI (aha152x_cs)

    Adaptec SlimSCSI 1480 Cardbus (apa1480_cb, sperimentale, richiede
     il kernel 2.2.2.x o versioni successive)

    Scheda digitale SCSI II

    Eiger Labs SCSI (qlogic_cs)

    Epson SC200 (qlogic_cs)

    Future Domain SCSI2GO (fdomain_cs)

    IBM SCSI (fdomain_cs)

    Iomega, schede ZIP e JAZ (PPA3) (aha152x_cs)

    IO-DATA PCSC-II, PCSC-II-L

    IO-DATA CDG-PX44/PCSC CD-ROM

    Logitec LPM-SCSI2

    Logitec LCD-601 CD-ROM

    MACNICA mPS110, mPS110-LP SCSI (qlogic_cs)

    Melco IFC-SC2, IFC-DC

    Midori CN-SC43 (qlogic_cs)

    NEC PC-9801N-J03R (qlogic_cs)

    New Media Bus Toaster SCSI (solo per le schede di versioni
     precedenti) (aha152x_cs)

    New Media Toast 'n Jam (solo SCSI) (aha152x_cs)

    Noteworthy Bus Toaster SCSI (aha152x_cs)

    Panasonic KXL-D740, KXL-DN740A, KXL-DN740A-NB 4X CD-ROM

    Pioneer PCP-PR1W, PCP-PR2W CD-ROM

    Qlogic FastSCSI (qlogic_cs)

    Raven CD-Note 4X (qlogic_cs)

    RATOC REX-9530 SCSI-2 (qlogic_cs)

    Simple Technologies SCSI (fdomain_cs)

    Sony CD-ROM Discman PRD-250

    Taxan ICD-400PN

    Toshiba NWB0107ABK, SCSC200A, SCSC200B (qlogic_cs)


  27.9.  Schede ATA/IDE CD-ROM

  Si dovrebbe almeno disporre del kernel 1.3.72



    Argosy EIDE CD-ROM (ide_cs)

    Caravelle CD-36N (ide_cs)

    CNF CARDport CD-ROM (ide_cs)

    Creative Technology CD-ROM (ide_cs)

    Digital Mobile Media CD-ROM (ide_cs)

    EXP CD940 CD-ROM (ide_cs, Solo alcune funzionano)

    EXP Traveler 620 CD-ROM (ide_cs)

    H45 Technologies Quick 2x CD-ROM (ide_cs)

    H45 Technologies QuickCD 16X (ide_cs)

    IBM Max 20X CD-ROM (ide_cs)

    IO DATA CDP-TX4/PCIDE, CDP-TX6/PCIDE, CDV-HDN6/PCIDE (ide_cs)

    IO DATA CDP-TX10/PCIDE, CDP-FX24/CBIDE, MOP-230/PCIDE (ide_cs)

    IO DATA HDP-1G/PCIDE, HDP-1.6G/PCIDE (ide_cs)

    Microtech International MicroCD (ide_cs)

    Microtech Mii Zip 100 (ide_cs)

    NOVAC NV-CD410 (ide_cs)

    Sony PCGA-CD5 CD-ROM (ide_cs)

    TEAC IDE Card/II (ide_cs)


  27.10.  Schede multifunzione

  Si deve almeno disporre del kernel 1.3.73


    3Com 3c562, 3c562B/C/D, 3c563B/C/D (3c589_cs)

    3Com Megahertz 3CCEM556, 3CXEM556, 3CCEM556B (3c589_cs)

    3Com Megahertz 3CCFEM556 (3c574_cs)

    3Com 3CCFEM656B (3c575_cb, solo ethernet)

    Accton UE2218 (pcnet_cs)

    ActionTex ComNet 33.6 (pcnet_cs)

    AnyCom Fast Ethernet + 56K Combo (pcnet_cs)

    Asus, scheda combo (pcnet_cs)

    Billionton LM5LT-10B (pcnet_cs)

    Compaq Microcom CPQ550 Modem + 10/100 LAN (xirc2ps_cs)

    Dayna Communicard (pcnet_cs)

    D-Link DME336T, DMF560TX (pcnet_cs)

    Gateway Telepath Combo (smc91c92_cs)

    Grey Cell GCS3400 (pcnet_cs)

    GVC LAN modem (pcnet_cs)

    IBM Home and Away, Home and Away 28.8 (pcnet_cs)

    IO DATA PCEM-336T (pcnet_cs)

    Intel EtherExpress PRO/100 LAN/Modem (xirc2ps_cs)

    Linksys LANmodem 28.8 (PCMLM28), 33.6 (PCMLM336) (pcnet_cs)

    Linksys EtherFast LANmodem 56K (PCMLM56) (pcnet_cs)

    Megahertz/U.S. Robotics EM1144, EM3288, EM3336 (smc91c92_cs)

    Motorola Mariner (smc91c92_cs)

    Motorola Marquis (3c589_cs)

    Ositech Jack of Diamonds, Jack of Hearts (smc91c92_cs)

    Ositech Jack of Spades CardBus (epic_cb, sperimentale, richiede il
     kernel 2.2.x o versioni successive)

    Modem PREMAX LAN (pcnet_cs)

    Psion V.34 Gold Card (pcnet_cs)

    Psion Gold Card Netglobal 56K+10Mb (pcnet_cs)

    Rover ComboCard 33.6 (pcnet_cs)

    TDK 3000/3400/5670 (pcnet_cs)

    Telecom Device SuperSocket LM336 (pcnet_cs)

    Xircom CreditCard CEM28, CEM33, CEM56 (xirc2ps_cs)

    Xircom RealPort REM10BT, REM56G-100 (xirc2ps_cs)

    Xircom RBEM56G-100BTX, CBEM56G-100BTX (tulip_cb, sperimentale,
     richiede il kernel 2.2.x o versioni successive)


  27.11.  Unit delle schede ATA/IDE

  Queste unit sono supportate a partire dal kernel 1.3.72. Sono
  supportate le schede Flash-ATA e di supporto della rotazione. Le unit
  di versioni molto vecchie Western Digital 40MB non sono supportate,
  perch non conformi alle specifiche PCMCIA ATA.


  27.12.  Schede delle interfacce ATA/IDE



    Archos Zip100 MiniDrive (ide_cs)

    Microtech International XpressDock (ide_cs)

    DataStor Technology PCMCIA ATA/ATAPI Card (ide_cs)

    Creo DNBoy (ide_cs)

    GREYSTONE DD-25 (ide_cs)

    Shining Technology CitiDISK 250PE (ide_cs)

    Sicon Periperal Micro Mate (ide_cs)


  27.13.  Schede delle porte parallele

  Fare riferimento all'appendice relativa ai dispositivi delle porte
  parallele supportati.


  27.14.  Schede varie


    GemPlus GPR400, lettore di smart card
     <http://www.linuxnet.com/smartcard/code.html> (Wolf Geldmacher
     wgeldmacher@paus.ch)
    IBM Smart Capture (iscc_cs) (Koji Okamura oka@ec.kyushu-u.ac.jp)

    IBM Etherjet (cs89x0_cs) (Danilo Beuche danili@cs.uni-magdeburg.de)

    National Instruments DAQcard700
     <ftp://ftp.rtlinux.org/pub/rtlinux/sources/DAQCard700/> (Oleg
     Subbotin)

    Netwave AirSurfer Plus (asplus_cs)
     <http://ipoint.vlsi.uiuc.edu/wireless/asplus.html> (Jay Moorman
     jrmoorma@uiuc.edu)

    New Media Bus Toaster SCSI (nuova versione) (sym53c500_cs) (Tim
     Corner tcorner@via.at)

    New Media BASICS SCSI (sym53c500_cs) (Tim Corner tcorner@via.at)

    Nokia/InTalk ST-500A  <http://www.absoval.com/linux-wlan> (Mark
     Mathews mark@absoval.com)

    Proxim RangeLAN2 e Symphony, schede LAN senza fili
     <http://www.komacke.com/distribution.html> (Dave Koberstein
     davek@komacke.com)

    RATOC REX-9590 (iscc_cs) (Koji Okamura oka@nanotsu.kobe-u.ac.jp)

    Samsung MagicWave SWL-1000N  <http://www.absoval.com/linux-wlan>
     (Mark Mathews mark@absoval.com)

    Silicom SPE ethernet, SEM EtherModem, SES EtherSerial
     <http://www.silicom.co.il/linux.htm>

    SIMA TECH SCSI9000 (sym53c500_cs) (Tim Corner tcorner@via.at)

    SST 5136-DN-PC DeviceNet Interface (ss5136_cs)
     <http://www.gnofn.org/~marksu/dn5136man.html> (Mark Sutton
     Mark.Sutton@laitram.com)

    Trimble Mobile GPS (utilizza i driver seriali/modem)

    Y-E Data FlashBuster, scheda dell'unit disco floppy (floppy_cs)
     (David Bateman dbateman@eng.uts.edu.au)

    Zoom Telephonics ZoomAir 4000  <http://www.absoval.com/linux-wlan>
     (Mark Mathews mark@absoval.com)


  27.15.  In fase di progettazione

  Le seguenti schede sono in fase di progettazione:

    Roland SCP-55 MIDI (Toshiaki Nakatsu ir9k-nkt@asahi.net.or.jp)

    CyberRom CD-ROM (David Rowntree rowntree@dircon.co.uk)

    IO DATA PCSC-II (Katayama Nobuhiro kata-n@po.iijnet.or.jp)

    Macnica mPS-1x0 (Katayama Nobuhiro kata-n@po.iijnet.or.jp)

    Proxim RangeLAN/2
     <http://students.ou.edu/D/James.R.Duchek-1/rangelan2.html> (Jim
     Duchek jimducheck@primary.net

    TView Preso (Brenden Tuck friar@zendragon.com)


  27.16.  Non supportate


    Adaptec/Trantor APA-460 SlimSCSI

    Eiger Labs SCSI w/FCC ID K36

    New Media .WAVjammer e tutte le altre schede audio

    New Media LiveWire+

    Nikon CoolPix100

    Panasonic KXL-D720, KXL-D745, KXL-D783

    SMC 8016 EliteCard

    Xircom CE II Ethernet/Modem

    Xircom CE-10BT Ethernet


  28.  Appendice C. Dispositivi delle porte parallele supportati

  La porta parallela viene utilizzata sempre con maggiore frequenza per
  connettere dispositivi diversi dalle stampanti. Per supportare queste
  unit delle porte parallele, vengono creati driver per il
  funzionamento dei dispositivi. Questa appendice presenta i dispositivi
  per i quali viene creato il supporto della porta parallela.

  Le stampanti non sono presentate in questa appendice dato che non sono
  supportate dai progetti di supporto della porta parallela.

  Verificare inoltre le pagine di supporto di Linux Parallel Port per
  ulteriori informazioni  <http://www.torque.net/parport>. In questo
  sito  possibile trovare

    il sottosistema paride per i dispositivi IDE delle porte parallele
     ( <http://www.torque.net/parport/paride.html>)

    il supporto per i dispositivi SCSI delle porte parallele (
     <http://www.torque.net/parport/parscsi.html>)


  28.1.  Ethernet


    Accton EtherPocket, scheda

    AT-Lan-Tec/RealTek, scheda ethernet delle porte parallele

    D-Link DE600/DE620, scheda ethernet delle porte parallele


  28.2.  Dischi rigidi



    H45 Quick HD

    KingByte IDE/ATAPI, dischi

    KT Technologies PHd, disco rigido portatile

    MicroSolutions, dischi rigidi backpack

    SyQuest EZ-135

    SyQuest EZ-230

    SyQuest SparQ

    ValueStor, disco rigido esterno


  28.3.  Unit a nastro



    Hewlett-Packard Colorado Tracker 250 (tutte e eccezione di T1000e)

    Hewlett-Packard HP Colorado 5GB

    Iomega Ditto

    MicroSolutions backpack 8000t, 8000td


  28.4.  Unit CD-ROM



    Freecom Power CD

    Freecom Traveller CD-ROM

    H45 Quick CD

    Hewlett-Packard HP 7100e/7200e CD-R

    KingByte IDE/ATAPI CD-ROM

    MicroSolutions backpack CD-ROM. I modelli 163550 e le versioni
     successive sono supportate dal driver paride. Per i modelli 160550
     e 162550 sono disponibili driver separati.

    MicroSolutions, unit PD/CD backpack

    SyQuest SyJet


  28.5.  Unit rimovibili



    Avatar Shark 250

    Imation Superdisk

    Unit Iomega ZIP, ZIP Plus


  28.6.  Scheda IDE



    Arista ParaDrive, prodotti

    DataStor Commuter, dischi

    Fidelity International Technologies TransDisk, prodotti

    Freecom IQ Cable Parallel

    Shuttle Technology EPAT/EPEZ, scheda IDE della porta parallela

    Shuttle Technology EPIA, scheda IDE della porta parallela


  28.7.  Schede SCSI



    Adaptec APA-348 mini-SCSI pi cavo della scheda
     Driver disponibile nel sito Web all'indirizzo
     <http://www.torque.net/parpart/parscsi.html>

    Adaptec APA-358 mini-SCSI EPP pi cavo della scheda
     Driver disponibile nel sito Web all'indirizzo
     <http://www.torque.net/parpart/parscsi.html>

    Shuttle Technology EPSA-2, scheda SCSI della porta parallela
     Driver disponibile nel sito Web all'indirizzo
     <http://www.torque.net/parpart/parscsi.html>

    Shuttle Technology EPST, scheda SCSI della porta parallela
     Driver disponibile nel sito Web all'indirizzo
     <http://www.torque.net/parpart/parscsi.html>


  28.8.  Fotocamere digitali



    Connectix QuickCam


  28.9.  Schede delle porte parallele PCMCIA

  Il driver parport_cs richiede il kernel 2.2.x o versioni successive.


    Quatech SPP-100

    IOtech DBK35, WBK20A

  29.  Appendice D. Dispositivi Plug and Play

  Per coloro che hanno problemi relativi al funzionamento dei
  dispositivi Plug and Play, sono disponibili le utility ISA PnP create
  da Peter Fox. Di seguito viene riportata una citazione del README:


  Questi programmi consentono ai dispositivi ISA Plug-And-Play
  di essere configurati in un computer Linux.

  Questo programma  adatto per tutti i sistemi, che includono
  o meno un BIOS PnP.



  I comandi sono stati tratti dalle specifiche Plug and Play ISA
  versione 1.0a.

  Ulteriori informazioni sulle utility ISA PnP sono disponibili nel sito
  Web di Peter Fox:  <http://www.roestock.demon.co.uk/isapnptools/>


  Se si  conoscenza di hardware in genere non supportato da Linux che
  pu essere comunque utilizzato con l'aiuto di queste utilit, si 
  pregati di contattare l'autore. Un elenco di questi componenti
  hardware verr aggiunto a questa appendice.


  30.  Appendice E. Componenti hardware non compatibili con Linux

  Alcuni fabbricanti di hardware hanno creato dispositivi che sono
  compatibili solo con MS-Dos e Windows 95/98. Sembra che emulino parte
  dell'hardware in genere disponibile nei dispositivi tramite pacchetti
  software venduti con il dispositivo. Le specifiche di questi
  dispositivi non sono presentate agli utenti ed  pertanto impossibile
  creare driver per questi dispositivi. Di seguito viene riportato un
  elenco di dispositivi non compatibili con Linux.

   consigliabile evitare componenti hardware le cui indicazioni
  riportano che  necessario solo il sistema Windows.



    Stampanti

    Brother HL-820

    Canon LBP-465

    HP Deskjet serie 710, 720, 820 e 1000 Tali stampanti (anche se solo
     per Windows) sono supportate da Linux. Fare riferimento al sito Web
     all'indirizzo  <http://www.httptech.com/ppa/>. Attenzione: il
     supporto  ancora nella fase iniziale di sviluppo.

    Lexmark 1000, stampante a getto di inchiostro

    Lexmark 3200. Per Windows dispone di un driver di emulazione per
     HP500 e HP500C. In Linux questa stampante non funziona con il
     driver HP500 o HP500C.

    Lexmark 5000

    Lexmark CJ5000 (ColorJet)

    OkiData OkiPage 4w

    Sharp JX-9210

    Modem

    3Com 3CXM356/3CCM356 and 3CXM656/3CCM656 PCMCIA

    AOpen FM56-P e FM56-H

    AT&T/Lucent winmodem

    Boca Research 28.8, modem interno (modello MV34AI)

    Boca Research 33.6, modem interno (modello MV34)(Joe Harjung 
     diventato il responsabile della configurazione del modem per Win95
     e dell'avvio soft in Linux con il modem ancora in funzione. Filippo
     utilizza questo modem direttamente in Linux senza alcun problema e
     senza l'avvio soft da Windows. L'autore ritiene che le informazioni
     disponibili garantiscano il funzionamento dei modem Boca Research.)
     Il modem Boca Research 33.6 (modello M336I)  indicato come
     funzionante con Linux. L'unica operazione necessaria  la
     disattivazione del Plug and Play. Di seguito vengono riportate le
     specifiche relative al modem.
    Tre adesivi che indicano ``MC2920A-3.3'', ``E6030D 4035-01'' e
     ``1721 8011 A''

    Chip nella scheda

    Cirrus Logic CL-MD3450D-SC-B

    Cirrus Logic MD1724-11VC-D

    Datatronic VLM301-1

    Omron G5V-1 (2)

    AST (?) M628032-20E1

    Cirrus Logic CL-MD4450C-SC-A

    Abracon 23-040-20

    due posizioni vuote per chip aggiuntivi, una delle quali potrebbe
     essere Cirrus Logic CL-MD1724D

    4 ponticelli per la selezione della porta COM

    10 ponticelli per la selezione IRQ

    altri ponticelli non noti

    Compaq 192, scheda modem/seriale PCMCIA

    HP Fastmodem D4810B

    IBM Mwave, scheda (``Dolphin''). Questa scheda  una combinazione
     di audio, modem, fax, controllo della voce e dettatura. Il software
     sostituisce parte della funzionalit hardware per fare in modo che
     questo software possa essere caricato per un corretto
     funzionamento.

    Multiwave Innovation CommWave V.34 ( <http://www.multiwave.com/>)

    Megahertz XJ/CC2560 PCMCIA

    New Media Winsurfer, scheda modem/seriale PCMCIA

    Rockwell SoftK56

    US Robotics serie WinModem

    Zoltrix 33.6 Win HSP Voice/Speaker Phone

    Zoltrix Phantom 56K, modello FM-HSP56PCI, chipset PCTel (PCI)

  31.  Glossario


     AGP
        Accelerated Graphics Port. Un meccanismo di interconnessione del
        bus progettato per migliorare le prestazioni di applicazioni
        grafiche 3D. AGP  un bus dedicato dal sottosistema grafico al
        chipset logico principale.
        <http://www.euro.dell.com/intl/euro/r+d/r+dnews/vectors/vect_2-1/v2-1_agp.htm>

     ATAPI
        AT Attachment Packet Interface. Nuovo protocollo per il
        controllo dei dispositivi di memorizzazione globale simile ai
        protocolli SCSI. Si basa sull'interfaccia ATA (AT Attachment),
        il nome ufficiale ANSI Standard per l'interfaccia IDE sviluppata
        per le unit disco rigido. ATAPI  utilizzato in genere per i
        dischi rigidi, le unit CD-ROM, le unit a nastro e altri
        dispositivi.

     ATM
        Asynchronous Transfer Mode

     CDDA
        Compact Disk Digital Audio. Funzionalit dei CD-ROM/Writer di
        riprodurre brani audio.

     DMA
        Direct Memory Access

     EGA
        Enhanced Graphics Adapter

     EIDE
        Enhanced IDE

     EISA
        Extended Industry System Architecture

     FDDI
        Fiber Distributed Data Interface. Rete LAN ad anello a velocit
        elevata.

     IDE
        Integrated Drive Electronics. Ciascuna unit dispone di un
        controller incorporato.

     ISA
        Industry System Architecture

     ISDN
        Integrated Services Digital Network

     MCA
        MicroChannel Architecture

     MFM
        Modified Frequency Modulation

     MMX
        Multimedia Extensions. Aggiunte alle generazioni pi aggiornate
        di processori Intel Pentium. Offre una migliore qualit audio e
        video.

     PCI
        Pheripheral Component Interconnect. Bus a 32 bit progettato da
        Intel. Informazioni sono disponibili nel sito Web all'indirizzo
        <http://www.pcisig.com> e
        <http://infoserver.ee.siue.edu/~jbutter/EE580_1.html>.

     RAID
        Redudant Arrays of Inexpensive Disks. Lo scopo principale del
        RAID consiste nel combinare pi unit disco economiche e di
        piccole dimensioni in un array di unit disco che fa in modo che
        le prestazioni superino quelle di una costosa unit disco rigido
        di grandi dimensioni. Sono disponibili cinque tipi di
        architetture di array ridondanti, da RAID-1 a RAID-5. Un array
        di unit disco non ridondante  indicato come RAID-0. Alcuni
        sistemi RAID possono disporre di formati diversi.
        <http://www.uni-mainz.de/~neuffer/scsi/what_is_raid.html>

     PPA
        Printing Performance Architecture. Protocollo sviluppato da
        Hewlett Packard per le serie di stampanti Deskjet. Il protocollo
        sposta il livello inferiore dell'elaborazione dei dati al
        computer host invece che alla stampante. In questo modo 
        possibile utilizzare una stampante economica con una quantit
        minima di memoria, dotata di potenza di elaborazione e di un
        driver flessibile. Tuttavia, tutto questo va a scapito della
        compatibilit. La decisione di HP era quella di sviluppare
        driver solo per Windows 95 per questa stampante.

     RLL
        Run Length Limited

     SCSI
        Small Computer Systems Interface. Interfaccia standard definita
        per tutti i dispositivi di un computer. Rende possibile
        l'utilizzo di una scheda singola per tutti i dispositivi.
        <http://www.uni-mainz.de/~neuffer/scsi/what_is_scsi.html>

     SVGA
        Super Video Graphics Adapter

     UART
        Universal Asynchronous Receiver Transmitter

     USB
        Universal Serial Bus. Non ancora supportato da Linux.

     VGA
        Video Graphics Adapter

     VLB
        VESA Local Bus. Utilizzato in alcuni PC 486.

     WORM
        Write Once Read Many





























  Linux Information Sheet
  Michael K. Johnson <johnsonm@redhat.com>
  v4.14, 1 settembre 1998

  Questo documento fornisce semplici informazioni sul sistema operativo
  Linux, inclusa una introduzione a Linux, una lista di caratteristiche,
  requisiti hardware e risorse. Questo documento  stato tradotto da
  Giovanni Bortolozzo, <borto@pluto.linux.it>.

  1.  Introduzione a Linux

  Linux  una reimplementazione completamente gratuita delle specifiche
  POSIX, con estensioni SYSV e BSD (il che significa che sembra proprio
  come Unix, ma non  derivato dallo stesso codice di partenza),
  disponibile sia come codice sorgente sia in formato binario. Il suo
  copyright  posseduto da Linus Torvalds <torvalds@transmeta.com> e da
  altri collaboratori, ed  liberamente distribuibile nei termini della
  GNU General Public License (GPL). Una copia della GPL  inclusa nei
  sorgenti di Linux;  possibile ottenerne una copia anche da
  <ftp://prep.ai.mit.edu/pub/gnu/COPYING>.

  Linux, di per s,  solo il kernel del sistema operativo, la parte che
  controlla l'hardware, gestisce i file, suddivide i processi e cos
  via. Esistono diverse combinazioni di Linux con insiemi di utilit e
  applicazioni per formare un sistema operativo completo. Ognuna di
  queste combinazioni  detta una distribuzione di Linux. La parola
  Linux, sebbene in senso stretto si riferisca specificamente al kernel,
   largamente e correttamente usata per riferirsi all'intero sistema
  operativo costruito attorno al kernel Linux. Per un elenco e una breve
  descrizione delle diverse distribuzioni, si veda
  <http://sunsite.unc.edu/LDP/HOWTO/Distribution-HOWTO.html>.  Nessuna
  di queste distribuzioni  il ``Linux ufficiale''.

  Linux non  di pubblico dominio, non  nemmeno ``shareware''.  un
  software ``libero'', comunemente chiamato freeware o Open Source
  Software[tm] (si veda  <http://www.opensource.org>), e si possono
  distribuire o venderne copie, ma si devono includerne i sorgenti o
  renderli disponibili nello stesso modo con il quale si distribuiscono
  o si vendono gli eseguibili. Se si distribuisce una qualsiasi
  modifica, si  obbligati per legge a distribuire i sorgenti di queste
  modifiche. Si veda la GNU General Public License per i dettagli.

  Linux  ancora libero, come nella versione 2.0, e continuer a
  esserlo. La natura del copyright GNU, a cui Linux  soggetto,
  renderebbe illegale il fatto che non sia pi libero. Notare che: la
  parte `libera' implica l'accesso ai sorgenti indipendentemente
  dall'aspetto monetario;  perfettamente legale far pagare denaro per
  la distribuzione di Linux, a patto che venga distribuito anche il
  codice sorgente. Questa  una generalizzazione; per aspetti pi
  accurati, leggere la GPL.

  Linux gira su macchine 386/486/Pentium con bus ISA, EISA, PCI e VLB.
  MCA (bus della IBM) non  attualmente ben supportato, sebbene nella
  nuova versione in fase di sviluppo, la 2.1.x, il supporto sia stato
  inserito. Se siete interessati, guardate
  <http://glycerine.itsmm.uni.edu/mca>.

   in corso il port per diverse piattaforme Motorola 680x0 (attualmente
  usate in alcuni Amiga, Atari e macchine VME), che ora funziona
  abbastanza bene. Richiede un 68020 con MMU, un 68030, un 68040 o un
  68060 e richiede anche l'FPU. Per ora il supporto di rete e X non
  funzionano. Si veda  <news:comp.os.linux.m68k>.

  Linux funziona bene sulle CPU Alpha della DEC, supportando attualmente
  le piattaforme ``Jensen'', ``NoName'', ``Cabriolet'', ``Universal
  Desktop Box'' (meglio conosciuta come Multia). Per altre informazioni,
  si veda <http://www.azstarnet.com/~axplinux/FAQ.html>.

  Linux funziona bene su Sun SPARC e viene utilizzato gi su molte
  macchine sun4c, sun4m e sun4u, mentre il supporto per sun4  in fase
  di sviluppo. Red Hat Linux  (alla scrittura di questo testo) la sola
  distribuzione disponibile per SPARC; si veda
  <http://www.redhat.com/support/docs/rhl-sparc/>.

  Linux  in attiva fase di port per architetture PowerPC, incluse le
  macchine PowerMac (Nubus e PCI), Motorola, IBM e Be. Si veda
  <http://www.cs.nmt.edu/~linuxppc/> e  <http://www.linuxppc.org/>.

  Port su altre macchine, tra cui MIPS (si veda
  <http://linus.linux.sgi.com> e  <http://lena.fnet.fr/>) e ARM, sono in
  corso e stanno mostrando dei progressi. Non trattenete il fiato, ma se
  siete interessati e capaci di contribuire, potete trovare facilmente
  altri sviluppatori che vorrebbero lavorare con voi.

  Linux non  pi considerato in beta test da quando  stata rilasciata
  la versione 1.0 il 14 marzo 1994. C'erano ancora bug nel sistema, e
  nuovi bug salteranno fuori e saranno risolti col passare del tempo.
  Siccome Linux segue il ``modello a sviluppo aperto'', tutte le nuove
  versioni sono rilasciate al pubblico anche se non sono considerate
  ``prodotti di qualit''.  Comunque, per aiutare la gente a capire se
  sta prelevando una versione stabile o no,  stato adottato il seguente
  schema: le versioni n.x.y, dove x  un numero pari, sono le versioni
  stabili, e come vengono risolti bug viene incrementato y. Cos dalla
  versione 1.2.2 alla 1.2.3 ci fu la correzione di alcuni bug e non
  l'aggiunta di nuove caratteristiche. Le versioni n.x.y, dove x  un
  numero dispari, sono di qualit beta per soli sviluppatori, e possono
  quindi essere instabili e cadere (crash), ma hanno nuove
  caratteristiche aggiuntive. Non appena il kernel attualmente in
  sviluppo diviene stabile, verr ``congelato'' in uno nuovo kernel
  ``stabile'', e lo sviluppo continuer con una nuova versione del
  kernel. Si noti che la maggior parte dei rilasci del kernel Linux,
  beta o meno, sono relativamente robuste; in questo contesto
  ``stabile'' significa che ``cambia lentamente'' oltre a ``robusto''.

  La versione stabile attuale  la 2.0.35 (questa continua a cambiare a
  mano a mano che vengono aggiunti nuovi supporti hardware e corretti
  bug), ed  partito lo sviluppo dei kernel sperimentali 2.1.x. I
  sorgenti del kernel Linux contengono un file, Documentation/Changes,
  che spiega i cambiamenti di cui si deve essere consci quando si
  aggiorna la versione del kernel. Comunque, la stragrande maggioranza
  degli utenti di Linux semplicemente aggiornano periodicamente la loro
  distribuzione per avere una nuova versione del kernel.

  Molte versioni di Linux, beta o no, sono abbastanza stabili e si
  possono usare se fanno quel che vi serve. Un sito ha utilizzato un
  computer con la versione 0.97p1 (rilasciata nell'estate del 1992) per
  pi di 136 giorni senza nessun errore o crash (e avrebbe funzionato
  ancora pi a lungo se un operatore sbadato non avesse erroneamente
  staccato la spina dell'alimentatore principale...) Altri hanno
  segnalato uptime di oltre un anno. Un sito ha ancora un computer che
  usa Linux 0.99p15 da oltre 600 giorni.

  Una cosa da considerare  che Linux  sviluppato usando un modello
  aperto e distribuito, invece di un modello chiuso e centralizzato come
  molto altro software. Questo significa che la versione di sviluppo
  corrente  sempre pubblica (con un ritardo di una o due settimane) in
  modo che tutti possano usarla. Il risultato  che ogni volta una
  versione con nuove funzionalit viene rilasciata, quasi sempre
  contiene bug, ma con il rapido sviluppo esistente i bug sono trovati e
  corretti velocemente, spesso in ore, in quanto molta gente lavora per
  risolverli.

  Diversamente, il modello chiuso e centralizzato significa che una sola
  persona o un gruppo lavora al progetto, e solo loro rilasciano il
  software quando ritengono che funzioni bene. Spesso questo porta a un
  lungo intervallo tra le release, una lunga attesa per risolvere i bug
  e uno sviluppo lento. Certamente l'ultima release pubblica di tale
  software , a volte, di qualit superiore, ma la velocit di sviluppo
   generalmente molto inferiore.

  Per una discussione su questi due modelli, si legga ``The Cathedral
  and the Bazaar'' a
  <http://sagan.earthspace.net/~esr/writings/cathedral-bazaar/> di Eric
  Raymond.

  Al 1 settembre 1998, la versione stabile corrente di Linux  2.0.35, e
  quella in fase di sviluppo  2.1.119.


  2.  Caratteristiche di Linux


    Multitasking: pi programmi funzionano contemporaneamente.

    Multiutenza: pi utenti nella stessa macchina contemporaneamente (e
     senza licenze per coppie di utenti!).

    Multipiattaforma: funziona su varie CPU diverse, non solo Intel.

    Multiprocessore: il supporto per SMP  disponibile su piattaforme
     Intel e SPARC (ed  in sviluppo il supporto su altre piattaforme),
     e Linux viene usato in diverse applicazioni MP loosely-coupled, tra
     cui i sistemi Beowulf (si veda  <http://cesdis.gsfc.nasa.gov/linux-
     web/beowulf/beowulf.html>) e il supercomputer basato su SPARC
     Fujitsu AP1000+.

    Multithreading: ha supporto nativo nel kernel per thread di
     controllo multipli e indipendenti all'interno dello stesso spazio
     di memoria del processo.

    Funziona in modalit protetta nel chip 386.

    Protezione della memoria tra processi, in modo che un programma non
     possa mandare in crash l'intero sistema.

    Caricamento degli eseguibili a richiesta: Linux legge dal disco
     solo le parti di un programma che sono realmente usate.

    Condivisione pagine copy-on-write tra processi. Questo significa
     che pi processi possono usare la stessa memoria per funzionare.
     Quando uno tenta di scrivere in quella zona di memoria, quella
     pagina (un pezzo di memoria da 4Kb)  copiata in un altro posto.
     Copy-on-write ha due vantaggi: incrementa la velocit e diminuisce
     l'uso di memoria.

    Memoria virtuale con paginazione (non fa lo swap di interi
     processi) su disco: in una partizione separata o in un file del
     filesystem o in entrambi, con la possibilit di aggiungere nuove
     aree durante il normale funzionamento (sono chiamate aree di swap).
     Un massimo di 16 di queste aree di swap da 128 Mb (2GB nei kernel
     recenti) possono essere usate contemporaneamente, per un totale
     teorico di 2 Gb di spazio di swap disponibile.  semplice
     aumentarlo, se necessario, cambiando poche linee di codice
     sorgente.

    Memoria unificata per programmi utente e cache del disco, in modo
     che tutta la memoria possa essere usata per la cache e la cache
     possa essere ridotta quando funzionano programmi di grandi
     dimensioni.

    Collegamento (link) dinamico delle librerie condivise (DLL), e
     naturalmente anche di quelle statiche.

    Pu creare core per l'analisi post-mortem dei processi, permettendo
     l'uso di un debugger su un programma non solo mentre sta
     funzionando, ma anche dopo che  terminato in malo modo.

    Compatibile a livello sorgente con POSIX, SYSV e BSD.

    Attraverso un modulo di emulazione conforme a iBCS2, compatibile a
     livello di binari con SCO, SVR3 e SVR4.

    Il codice sorgente  disponibile in toto, compreso quello
     dell'intero kernel, dei driver, degli strumenti di sviluppo e dei
     programmi utente e tutti questi sono pure distribuibili
     liberamente. Diversi programmi commerciali vengono forniti per
     Linux senza i sorgenti ma tutto quello che  nato libero, compreso
     l'intero sistema operativo di base,  tuttora libero.

    Controllo POSIX dei processi.

    Pseudoterminali (pty).

    Emulazione 387 nel kernel in modo che i programmi non abbiano
     bisogno di una propria emulazione del coprocessore matematico.
     Qualsiasi computer che usa Linux appare possedere un coprocessore
     matematico. Naturalmente, se il proprio computer contiene gi una
     FPU, verr usata questa invece di emularla, e si pu anche
     compilare il proprio kernel togliendo l'emulazione matematica per
     guadagnare un po' di memoria.

    Supporto per molte tastiere nazionali o personalizzate, ed 
     abbastanza semplice aggiungerne dinamicamente una nuova.

    console virtuali multiple: pi sessioni in console con login
     indipendente ed  possibile passare da una all'altra premendo una
     combinazione di tasti (indipendente dall'hardware video). Sono
     allocate dinamicamente; se ne possono usare fino a 64.

    Supporto per parecchi filesystem comuni: tra cui minix, Xenix, e
     tutti i comuni filesystem System V, ed un proprio filesystem
     avanzato che offre filesystem fino a 4 TB, e nomi lunghi fino a 256
     caratteri.

    Accesso trasparente alle partizioni MS-DOS (o alle partizioni FAT
     di OS/2) tramite un filesystem speciale: non  necessario alcun
     comando speciale per usare una partizione MS-DOS, appare come un
     normale filesystem Unix (tranne che per quelle simpatiche
     restrizioni sui nomi dei file, permessi altro). Le partizioni
     compresse di MS-DOS 6 attualmente non funzionano a meno che non si
     applichi una patch (dmsdosfs). Il supporto per VFAT (WNT, Windows
     95) e FAT-32  disponibile in Linux 2.0.

    Filesystem speciale chiamato UMSDOS che permette di installare
     Linux su un filesystem DOS.

    Supporto in sola lettura di HPFS-2 per OS/2 2.1.

    Supporto per il filesystem HFS (Macintosh) disponibile
     separatamente come modulo.

    Filesystem per CD-ROM che legge tutti i formati standard di CD-ROM.


    Supporto di rete TCP/IP, compresi ftp, telnet, NFS, ecc.

    Server Appletalk.

    Client e server Netware.

    Client e server Lan Manager/Windows Native (SMB).

    Molti protocolli di rete: i protocolli di base disponibili nel
     l'ultimo kernel in sviluppo includono TCP, IPv4, IPv6, AX.25, X.25,
     IPX, DDP (Appletalk), Netrom, e altri. I protocolli di rete stabili
     compresi nei kernel stabili attualmente sono TCP, IPv4, IPX, DDP e
     AX.25.



  3.  Requisiti hardware

  3.1.  Configurazione minima

  Quella che segue probabilmente  la pi piccola configurazione
  possibile che permette di far funzionare Linux: 386SX/16, 1 MB di RAM,
  un floppy da 1.44 MB o 1.2 MB, una qualsiasi delle schede video
  supportate (+ ovviamente tastiera, monitor e cos via). Questa
  dovrebbe permettere di avviare Linux e di provare se funziona o meno
  nella macchina, ma non si sar in grado di fare niente altro di utile.
  Si veda  <http://rsphy1.anu.edu.au/~gpg109/mem.html> per altre
  configurazioni minime di Linux.

  Per poter fare qualcosa, sar necessario un po' di spazio su un disco
  fisso, da 5 a 10 MB dovrebbero essere sufficienti per un'installazione
  proprio minima (con solo i comandi pi importanti e forse una o due
  piccole applicazioni, come una programma di terminale). Questa 
  ancora una installazione molto ma molto limitata e molto scomoda a
  meno che le proprie applicazioni non siano proprio limitate.
  Generalmente non  raccomandata per farci niente se non un po' di test
  di funzionamento, e naturalmente per essere in grado di vantarsi del
  fatto che le risorse richieste sono veramente minime.


  3.2.  Configurazione usabile

  Se si ha intenzione di usare programmi intensi a livello
  computazionale, come gcc, X e TeX probabilmente si avr bisogno di un
  processore pi veloce di un 386SX/16, sebbene anche questo potrebbe
  essere sufficiente se si ha pazienza.

  In pratica, si avr bisogno di almeno 4 MB di RAM se non si usa X, e
  di 8 MB se lo si usa. Inoltre, se si vogliono avere pi utenti in
  contemporanea, o eseguire contemporaneamente pi programmi grossi
  (compilazioni, per esempio), si avr bisogno di pi di 4 MB di
  memoria. Funzioner comunque anche con meno memoria ma user la
  memoria virtuale (usando il disco fisso come una memoria lenta) ma
  sar cos lento da essere inutilizzabile. Se si usano pi programmi
  contemporaneamente, 16 MB riduranno considerevolmente le operazioni di
  swap. Se non si vuole fare swap in maniera apprezzabile durante il
  normale carico, 32 MB probabilmente saranno sufficienti. Se si usano
  assieme molte applicazioni che usano intensamente la memoria, saranno
  necessari 64 MB per evitare un sacco di swap. Naturalmente se si usano
  applicazioni fameliche in termini di memoria, bisogner aggiungerne.

  Lo spazio su disco di cui si ha bisogno dipende da quale software si
  vuole installare. L'insieme normale di utility Unix, shell e programmi
  di amministrazione dovrebbero stare abbondantemente in meno di 10 MB,
  con un po' di spazio libero per i file degli utenti. Per un sistema
  pi completo, si prenda Red Hat, Debian, o un'altra distribuzione e si
  faccia conto che saranno necessari dai 60 ai 600 MB, a seconda di cosa
  si sceglie di installare e di quale distribuzione si prende.  Si
  aggiunga lo spazio che si vuole riservare per i file degli utenti a
  questi totali. Con i prezzi correnti dei dischi fissi, se si sta per
  comperare una nuova macchina, non ha senso comperare un disco fisso
  troppo piccolo. Se ne prenda almeno uno da 2 GB, preferibilmente 4 GB
  o pi, e si vedr che non andr sprecato. Linux gestisce
  tranquillamente dischi fissi molto grandi come i recenti e popolari
  dischi IDE da 11 GB e SCSI da 18 GB.


  Si aggiunga pi memoria, pi spazio su disco, un processore pi veloce
  e altro a seconda delle proprie necessit, desideri e disponibilit
  economiche. In generale, una grossa differenza tra Linux e DOS  che
  in Linux l'aggiunta di memoria fa una grande differenza, mentre in DOS
  memoria in pi non fa poi molta differenza. Naturalmente ci ha a che
  fare con il limite dei 640KB, che sotto Linux non esiste.


  3.3.  Hardware supportato


     CPU
        Qualsiasi cosa in grado di eseguire programmi in modalit 386
        protetta. Tutti i modelli di 386, 486, Pentium, Pentium Pro,
        Pentium II e cloni di questi chip dovrebbero andar bene (i 286 e
        inferiori potrebbero un giorno essere supportati da un kernel
        pi piccolo detto ELKS (Embeddable Linux Kernel Subset), ma non
        ci si aspetti le stesse caratteristiche).  Una versione per CPU
        680x0 (con x = 2 con MMU esterna, 3, 4 e 6) che funziona su
        Amiga e Atari pu essere reperita a tsx-11.mit.edu nella
        directory 680x0.  Sono supportate molte macchine DEC Alpha,
        SPARC, e PowerPC. Sono in lavorazione anche i port su
        architetture ARM, StrongARM, e MIPS. Maggiori dettagli sono
        reperibili da qualche altra parte.


     Architetture
        Bus PCI, ISA, EISA e VLB.  Il supporto per MCA (la maggior parte
        dei PS/2 true blue)  incompleto ma sta migliorando (si veda
        sopra). I local bus (VLB e PCI) funzionano. Linux  molto pi
        esigente sull'hardware rispetto a DOS, Windows e in pratica
        molti altri sistemi operativi. Ci significa che alcuni
        componenti hardware, che potrebbe funzionare se usati con altri
        sistemi operativi meno esigenti, potrebbero dare problemi quando
        usati con Linux. Linux  un eccellente tester della memoria...


     RAM
        Fino a 1 GB su Intel; di pi su piattaforme a 64-bit. Alcuni
        (tra cui Linus) hanno notato che aggiungere RAM senza allo
        stesso tempo aggiungere anche cache ha estremamente rallentato
        le loro macchine, quindi se si aggiunge RAM e si trova che la
        propria macchina sia pi lenta, si provi ad aggiungere ancora
        cache. Alcune macchine possono fare il cache solo di una certa
        parte della memoria indipendentemente da quanta RAM  installata
        (64 MB  la dimensione di cui i chipset pi popolari possono
        fare la cache). Oltre i 64 MB sar necessario un parametro al
        boot con kernel 2.0.35 e precendenti, in quanto il BIOS non pu
        riportare pi di 64 MB. I recenti kernel 2.1.x e successivi sono
        in grado di rilevare tutta la memoria di un sistema.


     Dispositivi di immagazzinamento dati
        Sono supportati i drive AT generici (controller di HD EIDE, IDE
        e a 16 bit con MFM, RLL o ESDI), cos come lo sono i dischi
        fissi e i CD-ROM SCSI con un adattatore SCSI tra quelli
        supportati. Sono supportati anche i controller generici XT
        (controller a 8 bit con MFM o RLL). Adattatori SCSI supportati:
        Advansys, Adaptec 1542, 1522, 1740, e le serie 27xx e 29xx (con
        alcune eccezioni), Buslogic MultiMaster e Flashpoint, controller
        basati su NCR53c8xx, controller DPT, controller Qlogic ISP e
        FAS, Seagate ST-01 and ST-02, la serie Future Domain TMC-88x (o
        qualsiasi scheda basata sul chip TMC950) e TMC1660/1680,
        Ultrastor 14F, 24F and 34F, Western Digital wd7000 ed altri.
        Sono anche supportati i nastri SCSI, QIC-02 e alcuni QIC-80. A
        parte i cdrom IDE e SCSI, sono supportati anche parecchi
        dispositivi CD-ROM proprietari, tra cui Matsushita/Panasonic,
        Mitsumi, Sony, Soundblaster, Toshiba, ATAPI (EIDE), SCSI e
        altri. Per i modelli esatti si veda l'Hardware compatibility
        HOWTO. N.B. Questi elenchi sono incompleti, e lo saranno sempre.
        Chi vende le distribuzioni mantiene generalmente una lista molto
        pi aggiornata.


     Video
        In modo testo funzionano le VGA, EGA, CGA o Hercules (e
        compatibili). Per la grafica e X, c' il supporto (almeno) per
        VGA normale, alcune schede SVGA (molte delle schede basate su
        chipset Tseng, Paradise, e alcuni Trident), S3, 8514/A, ATI,
        Matrox ed Hercules (Linux usa il server X XFree86, il quale
        determina quali schede sono supportate. Una lista completa dei
        chipset supportati avrebbe occupato molto pi di una pagina. Si
        veda  <http://www.XFree86.org/>)


     Rete
        Il supporto Ethernet comprende 3COM 503/509/579/589/595/905 (le
        501/505/507 sono supportate ma non raccomandate), AT&T GIS (ne
        NCR) WaveLAN, molte schede basate su WD8390 e su WD80x3,
        NE1000/2000 e cloni, AC3200, Apricot 82596, AT1700, ATP,
        DE425/434/435/500, D-Link DE-600/620, DEPCA, DE100/101,
        DE200/201/202 Turbo, DE210, DE422, Cabletron E2100 (non
        raccomandata), Intel EtherExpress (non raccomandata),
        EtherExpress Pro, EtherExpress 100, DEC EtherWORKS 3, HP LAN, HP
        PCLAN/plus, molte schede basate su AMD LANCE, NI5210, ni6510,
        SMC Ultra, DEC 21040 (tulip), Zenith Z-Note ethernet. Tutte le
        schede Zircom e tutte le Cabletron diverse dalla E2100 non sono
        supportate, a causa nel rifiuto dei costruttori di fornire
        gratuitamente informazioni per programmarle.

        Il supporto FDDI attualmente comprende le schede DEFxx della
        DEC.

        Il supporto di rete Point-to-Point comprende PPP, SLIP, CSLIP e
        PLIP. Il supporto per il PPP  disponibile sia per dispositivi
        asincroni standard come i modem, sia per connessioni sincrone
        come ISDN.

         disponibile un supporto limitato per il Token Ring.


     Seriali
        Molte schede basate su UART 16450 e 16550, tra cui AST Fourport,
        Usenet Serial Card II e altre. Le schede intelligenti supportate
        comprendono la serie Cyclom della Cyclades (supportata dal
        costruttore), la serie Rocketport della Comtrol (supportata dal
        costruttore), Stallion (la maggior parte delle schede;
        supportate dal costruttore) e Digi (alcune schede; supportate
        dal costruttore).  supportato anche un po' di hardware per
        ISDN, frame relay e leased line.

     Altro hardware
        SoundBlaster, ProAudio Spectrum 16, Gravis Ultrasound, molte
        altre schede audio, molti (tutti?) tipi di bus mouse (Microsoft,
        Logitech, PS/2), ecc.


  4.  e altro software Un elenco incompleto di programmi portati su
  Linux

  Sono stati portati su Linux la maggior parte degli strumenti e dei
  programmi Unix, tra cui praticamente tutto il software della GNU e
  molti client per X da varie fonti. Attualmente, il port  pi
  difficile a dirsi che a farsi, in quanto molti programmi si compilano
  direttamente senza modifiche, o solo con modifiche minime, in quanto
  Linux segue abbastanza fedelmente le direttive POSIX. Non ci sono mai
  abbastanza applicazioni per un qualsiasi sistema operativo, ma Linux
  sta guadagnando sia in applicazioni per utenti finali che per server.
  Si contatti il produttore della propria applicazione Unix commerciale
  preferita e gli si chieda se ne hanno prodotto una versione per Linux.

  Ecco una lista incompleta di software che sicuramente funziona sotto
  Linux:


     Comandi Unix basilari:
        ls, tr, sed, awk e cosi via (se ne pensi uno, e probabilmente
        Linux ce l'ha).


     Strumenti di sviluppo:
        gcc, gdb, make, bison, flex, perl, rcs, cvs, prof.


     Linguaggi e ambienti:
        C, C++, Objective C, Java, Modula-3, Modula-2, Oberon, Ada95,
        Pascal, Fortran, ML, scheme, Tcl/tk, Perl, Python, Common Lisp e
        molti altri.


     Ambienti grafici:
        GNOME e KDE (desktop), X11R6 (XFree86 3.x), X11R5 (XFree86 2.x),
        MGR.


     Editor:
        GNU Emacs, XEmacs, MicroEmacs, jove, ez, epoch, elvis (GNU vi),
        vim, vile, joe, pico, jed e altri.


     Shell:
        bash (POSIX sh compatibile), zsh (compresa la modalit di
        compatibilit ksh) pdksh, tcsh, csh, rc, es, ash (shell
        praticamente sh compatibile usata come /bin/sh da BSD) e molte
        altre.


     Telecomunicazione:
        PPP, UUCP, SLIP, CSLIP, insieme completo di strumenti di
        comunicazione TCP/IP, kermit, szrz, minicom, pcomm, xcomm, term
        (esegue pi shell, redireziona l'attivit di rete e permette
        l'uso di applicazioni X remote, il tutto su una singola linea
        modem), Seyon (programma di comunicazione per X-Window molto
        popolare) e sono disponibili diversi pacchetti per fax e voice-
        mail (usando ZyXEL e altri modem). Naturalmente, sono supportati
        i login remoti via seriale e via rete.

     News e mail:
        C-news, innd, trn, nn, tin, smail, elm, mh, exmh, pine, mutt,
        ecc.


     Elaborazione testi:
        TeX, groff, doc, ez, LyX, Lout, Linuxdoc-SGML e altri.


     Giochi:
        Nethack, diversi Mud e giochi per X e moltissimi altri. Se se ne
        cerca uno, si veda tra tutti i giochi disponibili a tsx-11 e
        sunsite.

  Tutti questi programmi (e questi non sono neanche un centesimo di
  quanto  disponibile) sono disponibili gratuitamente. Inizia a
  diventare largamente disponibile anche moltissimo software
  commerciale; si chieda ai produttori del proprio software commerciale
  preferito se supportano Linux.


  5.  Chi usa Linux?

  Linux  disponibile liberamente e a nessuno viene richiesto di
  registrare le proprie copie a una qualsiasi autorit centrale, perci
   difficile sapere quanta gente usa Linux. Diverse aziende vivono solo
  vendendo e fornendo supporto per Linux e i newsgroup su Linux sono tra
  i pi letti in Internet, quindi il numero di utenti probabilmente va
  espresso in milioni, ma una stima veritiera  difficile da fare. La
  miglior ricerca di mercato attuale indica fra i 7.5 e gli 11 milioni
  di utenti.


  Comunque, un'anima coraggiosa, Harald T. Alvestrand
  Harald.T.Alvestrand@uninett.no, ha deciso di provare a contare gli
  utenti di Linux nel modo pi difficile: uno a uno.  Se si vuole essere
  annoverati fra gli utenti di Linux, allora si usi il form disponibile
  a  <http://counter.li.org/>. In alternativa, si pu spedire un
  messaggio a linux-counter@uninett.no con uno dei seguenti subject: `I
  use Linux at home' (uso Linux a casa), `I use Linux at work' (uso
  Linux al lavoro), o `I use Linux at home and at work' (uso Linux a
  casa e al lavoro).  Saranno accettate anche registrazioni tramite
  terzi; si chieda ad Harald per i dettagli.


  Harald pubblica mensilmente i suoi conteggi in
  <news:comp.os.linux.misc>; sono disponibili anche presso
  <http://counter.li.org/>.


  6.  Procurarsi Linux

  6.1.  In FTP Anonimo

  Per documentazione su Linux liberamente distribuibile, si veda il sito
  del Linux Documentation Project a
  <ftp://sunsite.unc.edu/pub/Linux/docs/LDP/> e
  <http://sunsite.unc.edu/LDP/>


  Si rimanga sintonizzati sul newsgroup <news:comp.os.linux.announce>
  per ulteriori sviluppi.

  Almeno i seguenti siti per ftp anonimo rendono disponibile Linux.


       Nome                           Indirizzo Numerico  Directory Linux
       =============================  ==================  ===============
       tsx-11.mit.edu                 18.172.1.2          /pub/linux
       sunsite.unc.edu                152.2.22.81         /pub/Linux
       ftp.funet.fi                   128.214.248.6       /pub/Linux
       net.tamu.edu                   128.194.177.1       /pub/linux
       ftp.mcc.ac.uk                  130.88.203.12       /pub/linux
       src.doc.ic.ac.uk               146.169.2.1         /packages/linux
       fgb1.fgb.mw.tu-muenchen.de     129.187.200.1       /pub/linux
       ftp.informatik.tu-muenchen.de  131.159.0.110       /pub/comp/os/linux
       ftp.dfv.rwth-aachen.de         137.226.4.111       /pub/linux
       ftp.informatik.rwth-aachen.de  137.226.225.3       /pub/Linux
       ftp.Germany.EU.net             192.76.144.75       /pub/os/Linux
       ftp.lip6.fr                    132.227.77.2        /pub/linux
       ftp.uu.net                     137.39.1.9          /systems/unix/linux
       wuarchive.wustl.edu            128.252.135.4       mirrors/linux
       ftp.win.tue.nl                 131.155.70.100      /pub/linux
       ftp.stack.urc.tue.nl           131.155.2.71        /pub/linux
       srawgw.sra.co.jp               133.137.4.3         /pub/os/linux
       cair.kaist.ac.kr                                   /pub/Linux
       ftp.denet.dk                   129.142.6.74        /pub/OS/linux
       NCTUCCCA.edu.tw                140.111.1.10        /Operating-Systems/Linux
       nic.switch.ch                  130.59.1.40         /mirror/linux
       sunsite.cnlab-switch.ch        193.5.24.1          /mirror/linux
       cnuce_arch.cnr.it              131.114.1.10        /pub/Linux
       ftp.monash.edu.au              130.194.11.8        /pub/linux
       ftp.dstc.edu.au                130.102.181.31      /pub/linux
       ftp.sydutech.usyd.edu.au       129.78.192.2        /pub/linux





  tsx-11.mit.edu e fgb1.fgb.mw.tu-muenchen.de sono i siti ufficiali del
  GCC per Linux. Alcuni siti fanno il mirror di altri siti. Si invita a
  usare il sito a voi pi vicino (in senso di rete) ogni qualvolta ci
  sia possibile.

  Almeno sunsite.unc.edu e ftp.informatik.tu-muenchen.de offrono servizi
  di ftpmail. Si invii un messaggio a ftpmail@sunsite.unc.edu o
  ftp@informatik.tu-muenchen.de per ottenere un aiuto.

  Se ci si  persi, si veda
  <http://sunsite.unc.edu/LDP/HOWTO/Distribution-HOWTO.html>, dove sono
  elencate diverse distribuzioni. Red Hat Linux e Debian sembrano al
  momento essere le distribuzioni pi popolari, almeno negli USA.


  6.2.  In CD-ROM

  La maggior parte della gente ormai installa Linux da CD-ROM. Le
  distribuzioni hanno ormai raggiunto centinaia di MB di software per
  Linux, e scaricarsele con un modem a 28.8 o una connesione ISDN
  richiede un sacco di tempo.


  Ci sono essenzialmente due modi per comperare una distribuzione Linux
  su CD-ROM: come parte di un archivio di siti FTP o direttamente dal
  produttore. Se si compra un archivio, spesso di avranno diverse
  distribuzioni tra cui scegliere, ma solitamente non  incluso il
  supporto. Quando si compra una distribuzione direttamente dal
  produttore, tipicamente si riceve solo una distribuzione, ma
  solitamente si riceve anche qualche forma di supporto, tipicamente
  supporto sull'installazione.


  6.3.  Altri modi per procurarsi Linux

  Ci sono molte BBS che hanno file su Linux. Un elenco di queste viene
  inviato di tanto in tanto in comp.os.linux.announce.  Si chieda ad
  amici e a gruppi di utenti, o si ordini una delle distribuzioni
  commerciali. Una lista di queste  contenuta nel Linux Distribution
  HOWTO, disponibile a  <http://sunsite.unc.edu/LDP/HOWTO/Distribution-
  HOWTO.html>, e postato regolarmente nel newsgroup
  <news:comp.os.linux.announce>.



  7.  Stato legale di Linux

  Sebbene Linux sia fornito con i sorgenti completi,  un software
  soggetto a copyright, non di pubblico dominio. Comunque  disponibile
  gratuitamente nei termini della GNU General Public License, anche
  detta ``copyleft''.  Si veda la GPL per maggiori informazioni. Ognuno
  dei programmi che girano sotto Linux ha il proprio copyright, sebbene
  molti di questi usino la GPL. X usa il copyright MIT X, e alcune
  utility sono sotto il copyright BSD. In qualsiasi caso, tutto il
  software nei siti FTP  liberamente distribuibile (altrimenti non
  dovrebbe essere l).


  8.  Notizie su Linux

  Circa quattro anni fa,  stata avviata una rivista mensile chiamata
  Linux Journal. Include articoli per qualsiasi livello di conoscenza, e
  vuole essere d'aiuto a tutti gli utenti di Linux. Un anno di
  abbonamento costa $22 per gli USA, $27 per Canada e Messico, e $32 per
  il resto del mondo, pagabili in valuta statunitense. Le richieste di
  abbonamento possono essere spedite via email a subs@ssc.com, oppure
  via fax allo +1-206-782-7191, o tramite telefono allo +1-206-782-7733,
  oppure spedite a Linux Journal, PO Box 85867, Seattle, WA 98145-1867
  USA.  SSC mette a disposizione una chiave per criptare le proprie mail
  in modo da proteggere il proprio numero di carta di credito; si faccia
  finger info@ssc.com per avere la chiave.

  Esistono diversi gruppi Usenet per discussioni su Linux, oltre a
  diverse mailing list. Si vedano le Linux FAQ per maggiori infomazioni
  sulle mailing list (si dovrebbe essere in grado di trovare le FAQ sia
  nei newsgroup sia nei siti FTP).

  Il newsgroup  <news:comp.os.linux.announce>  un newsgroup moderato
  per gli annunci su Linux (nuovi programmi, correzioni di bug, ecc).

  Il newsgroup  <news:comp.os.linux.answers>  un newsgroup moderato nel
  quale vengono inviate le Linux FAQ, i documenti HOWTO e altra
  documentazione.

  Il newsgroup  <news:comp.os.linux.admin>  un newsgroup non moderato
  per la discussione dell'amministrazione di sistemi Linux.

  Il newsgroup  <news:comp.os.linux.development.system>  un newsgroup
  non moderato specifico per le discussioni sullo sviluppo del kernel di
  Linux.  Le sole questioni sullo sviluppo di applicazioni che
  dovrebbero essere ivi discusse sono quelle intimamente associate con
  il kernel. Tutte le altre questioni sullo sviluppo sono probabilmente
  questioni generiche di sviluppo in Unix e dovrebbero invece essere
  dirette al gruppo comp.unix, a meno che non siano questioni su
  applicazioni veramente specifiche per Linux, nel qual caso dovrebbero
  essere dirette a comp.os.linux.development.apps.

  Il newsgroup  <news:comp.os.linux.development.apps>  un newsgroup non
  moderato specifico per le discussioni sullo sviluppo di applicazioni
  connesse con Linux. Non  per le discussioni su dove trovare
  applicazioni per Linux e nemmeno un forum di discussione su quali
  applicazioni piacerebbe vi fossero per Linux.

  Il newsgroup  <news:comp.os.linux.hardware>  per le domande
  specifiche sull'hardware per Linux.

  Il newsgroup  <news:comp.os.linux.networking>  specifico per lo
  sviluppo del supporto di rete in Linux e sulla sua configurazione.

  Il newsgroup  <news:comp.os.linux.x>  specifico per le questioni
  sull'X Window in Linux.

  Il newsgroup  <news:comp.os.linux.misc>  il rimpiazzo di
  comp.os.linux, ed  pensato per qualsiasi discussione che non
  appartenga a qualche altro newsgroup.

  In generale, non si faccia il post multiplo (``crosspost'') su pi
  newsgroup di Linux. Il solo crosspost che  appropriato  un post
  occasionale tra un gruppo non moderato e comp.os.linux.announce. Lo
  scopo della divisione del vecchio gruppo comp.os.linux in molti gruppi
   stato quello di ridurre il traffico in ognuno di essi.  Chi non
  segue questa regola verr brutalmente ripreso senza nessuna
  scusante...


  Linux  nel Web all'URL  <http://sunsite.unc.edu/LDP/>


  9.  Il futuro

  Dopo il rilascio di Linux 1.0, il lavoro si  concentrato su diversi
  miglioramenti. Linux 1.2 comprendeva incrementi nella velocit di
  accesso al disco, miglioramenti alle TTY, alla memoria virtuale,
  supporto per diverse piattaforme, quote su disco e molto altro. Linux
  2.0, l'attuale versione stabile, ha ancora altri miglioramenti e nuove
  caratteristiche, tra cui incremento delle prestazioni, diversi nuovi
  protocolli di rete, una delle pi veloci implementazioni di TCP/IP al
  mondo, e molto, molto altro. Prestazioni ancora migliori, ulteriori
  protocolli di rete e pi driver di dispositivi saranno disponibili con
  Linux 2.2.

  Anche se sono state scritte pi di 3/4 milioni di righe di codice nel
  kernel, c' ancora un sacco di codice da scrivere, e ancora altra
  documentazione. Si invita a sottoscrivere la mailing list linux-
  doc@vger.rutgers.edu se si vuole contribuire alla documentazione. Si
  invii una mail a majordomo@vger.rutgers.edu contenente una unica riga
  con la parola ``help'' nel corpo nel messaggio (NON come subject).


  10.  Questo documento

  Questo documento  mantenuto da Michael K. Johnson
  <johnsonm@redhat.com>. Si inviino a me le mail con qualsiasi commento,
  anche se piccolo. Non posso fare un buon lavoro di manutenzione di
  questo documento senza il vostro aiuto. Una copia pi o meno
  aggiornata di questo documento pu sempre essere trovata a
  <http://sunsite.unc.edu/LDP/>

  Prima traduzione di Michele Dalla Silvestra, <dalla@pluto.linux.it>.
  Aggiornamento e traduzioni successive a cura di Giovanni Bortolozzo,
  <borto@pluto.linux.it>. La versione pi aggiornata di questa
  traduzione pu sempre essere trovata a
  <http://www.pluto.linux.it/ildp/>.


  11.  Questioni legali

  I marchi sono registrati dai rispettivi possessori. Non si da alcuna
  garanzia sulle informazioni contenute in questo documento. L'uso e la
  distribuzione sono a proprio rischio.  Il contenuto di questo
  documento  di dominio pubblico ma, se lo si usa, si invita a essere
  corretti e a citarlo fra le proprie fonti.



























































  Linux IPCHAINS HOWTO
  Paul Russell, ipchains@rustcorp.com
  v1.0.7, 12 marzo 1999

  Questo documento intende descrivere come ottenere, installare e con
  figurare il software di ``enhanced IP firewalling chains'' per Linux,
  ed alcune idee su come si potrebbe usarlo.  Traduzione a cura di Gio
  vanni Bortolozzo borto at pluto.linux.it.

  1.  Introduzione

  Questo  il Linux IPCHAINS-HOWTO; si veda la Sezione ``Dove?'' per
  conoscere l'indirizzo del sito principale, che contiene l'ultima
  versione.  Si dovrebbe leggere anche il Linux NET-3-HOWTO. L'IP-
  Masquerading HOWTO, il PPP-HOWTO, l'Ethernet-HOWTO ed il Firewall
  HOWTO possono essere altre letture interessanti (come d'altronde lo
  possono essere le FAQ di alt.fan.bigfoot).


  Se interessa il filtraggio dei pacchetti (packet filtering), si legga
  la Sezione ``Perch?'', la Sezione ``Come?'' e si dia un'occhiata ai
  titoli nella sezione ``IP Firewalling Chains''.


  Se si sta operando la conversione da ipfwadm, si legga la Sezione
  ``Introduzione'', la sezione ``Come?'' e le appendici nella sezione
  ``Differenze tra ipchains e ipfwadm'' e nella sezione ``L'uso dello
  script `ipfwadm-wrapper'''.


  1.1.  Cos'?

  Il Linux ipchains  una riscrittura del codice di firewalling IPv4 di
  Linux (il quale era stato rubato principalmente da BSD) e una
  riscrittura di ipfwadm, che a sua volta era, almeno penso, una
  riscrittura di ipfw di BSD.   richiesto per amministrare il
  filtraggio dei pacchetti IP nelle versioni del kernel di Linux 2.1.102
  e superiori.


  1.2.  Perch?

  Il vecchio codice di firewalling di Linux non gestisce i frammenti
  (fragment), ha contatori a 32 bit (almeno su Intel), non permette di
  specificare protocolli diversi da TCP, UDP e ICMP, non pu rendere
  atomiche grosse modifiche, non pu specificare regole inverse, ha
  qualche scemata e pu risultare difficile da manipolare (rendendolo
  propenso a errori utente).


  1.3.  Come?

  Attualmente il codice fa parte del kernel a partire dalla versione
  2.1.102.  Per la serie dei kernel 2.0,  necessario scaricare una
  patch dalla pagina web.  Se il proprio kernel 2.0  pi recente della
  patch disponibile, una patch pi vecchia dovrebbe andare bene lo
  stesso; questa parte del kernel 2.0  piuttosto stabile (eg. la patch
  per il kernel 2.0.34 funziona bene sul kernel 2.0.35).  Poich la
  patch per il 2.0  incompatibile con le patch ipportfw e ipautofw, non
  raccomando di applicarla a meno che non si abbia veramente bisogno di
  alcune delle funzionalit che offre ipchains.





  1.4.  Dove?

  La pagina ufficiale  The Linux IP Firewall Chains Page
  <http://www.rustcorp.com/linux/ipchains>


  Esiste una mailing list per le segnalazioni di bug, discussione,
  sviluppo e uso.   possibile associarsi alla mailing list inviando un
  messaggio contente la parola ``subscribe'' a ipchains-request a
  rustcorp.com.  Per inviare mail alla lista si usi `ipchains' invece di
  `ipchains-request'.


  2.  Fondamenti di Packet Filtering

  2.1.  Cos'?

  Tutto il traffico attraverso una rete  inviato sotto forma di
  pacchetti.  Per esempio, lo scaricarsi questo documento (facciamo
  conto sia lungo 50k) fa s che si ricevano 36 o pi pacchetti da 1460
  byte ognuno (tanto per mettere un po' di numeri).


  L'inizio di ogni pacchetto specifica dove deve andare, da dove viene,
  il tipo del pacchetto ed altri dettagli amministrativi.  Questa parte
  iniziale del pacchetto  detta header (intestazione).  Il resto del
  pacchetto, contenente i dati reali da trasmettere, solitamente  detto
  body (corpo).


  Alcuni protocolli, come TCP, usato per il traffico web, mail e login
  remoti, usano il concetto di ``connessione'': prima di inviare un
  qualsiasi pacchetto con i dati reali, sono scambiati diversi pacchetti
  di impostazione (con intestazioni speciali) che dicono Voglio
  connettermi, OK e Grazie.  Poi sono scambiati i pacchetti
  normali.


  Un filtro di pacchetti (packet filter)  un pezzo di software che
  guarda l'intestazione dei pacchetti che passano e decide il destino
  dell'intero pacchetto.  Potrebbe decidere di proibire (deny) il
  pacchetto (ie. scartare il pacchetto come non fosse mai stato
  ricevuto), accettare (accept) il pacchetto (ie. lasciare che il
  pacchetto prosegua), o rifiutare (reject) il pacchetto (simile a
  proibire, ma comunica inoltre alla fonte del pacchetto quello che ha
  fatto).


  Sotto Linux, il filtraggio dei pacchetti  contenuto all'interno del
  kernel e ci sono alcune cosette divertenti che si possono fare con i
  pacchetti, ma il principio generale  sempre quello di guardare le
  intestazioni e di decidere la sorte dei pacchetti.


  2.2.  Perch?

  Controllo.  Sicurezza.  Vigilanza.



     Controllo:
        quando si usa una macchina Linux per connettere la propria rete
        interna a un'altra rete (Internet, ad esempio) si ha
        l'opportunit di permette un certo tipo di traffico e di
        proibirne dell'altro.  Per esempio, l'intestazione di un
        pacchetto contiene l'indirizzo della destinazione del pacchetto,
        e quindi si pu impedire ai pacchetti di andare verso una certa
        parte della rete esterna.  Un altro esempio: uso Netscape per
        accedere agli archivi di Dilbert.  Nella pagina ci sono avvisi
        pubblicitari di doubleclick.net e Netscape spreca il mio tempo
        scaricandoli pedissequamente.  Dicendo al filtro dei pacchetti
        di non permettere alcun pacchetto da o per l'indirizzo posseduto
        da doubleclick.net si risolve quel problema (anche se penso ci
        siano modi migliori per risolverlo).


     Sicurezza:
        quando la propria macchina Linux  la sola cosa tra il caos di
        Internet e la propria bella ed ordinata rete,  bene sapere che
        si pu limitare quel che viene a bussare alla propria porta.
        Per esempio, si potrebbe permettere a qualsiasi cosa di uscire
        dalla propria rete, ma certamente non si  ben disposti verso i
        cosiddetti ``Ping della Morte'' provenienti da estranei
        maliziosi.  Un altro esempio: si pu voler evitare che gli
        estranei possano fare telnet nella macchina, anche se tutti gli
        account hanno una password; oppure si vuole (come molti
        d'altronde) essere un semplice osservatore in Internet e non un
        server (volente o nolente): semplicemente non si permetta a
        nessuno di connettersi, facendo s che il filtro dei pacchetti
        rifiuti tutti i pacchetti entranti usati per instaurare una
        connessione.


     Vigilanza:
        talvolta una macchina mal configurata in una rete locale decide
        di emettere pacchetti per il mondo esterno.   bene dire al
        filtro dei pacchetti di informarvi se succede qualcosa di
        anormale; forse si pu fare qualcosa per risolverlo o forse si 
        solo curiosi per natura.


  2.3.  Come?

  2.3.1.  Un kernel con il filtraggio dei pacchetti

   necessario un kernel che possieda al suo interno il nuovo supporto
  per le "IP firewall chains" (catene firewall IP).   possibile sapere
  se il kernel attualmente in esecuzione ce l'ha cercando il file
  `/proc/net/ip_fwchains'.  Se esiste, allora c'.


  Se cos non ,  necessario compilare un kernel che supporti le catene
  firewall IP.  Per prima cosa si scarichino i sorgenti del kernel che
  si vuole.  Se si possiede un kernel versione 2.1.102 o superiore non
  si avr bisogno di una patch ( gi presente nel kernel).  Altrimenti
  si applichi la patch scaricabile dalla pagina web suddetta e si
  effettui la configurazione come spiegato dettagliatamente nel seguito.
  Se non si sa come farlo, niente panico: si legga il Kernel-HOWTO.



  Le opzioni di configurazione che sar necessario impostare per i
  kernel della serie 2.0 sono:


  ______________________________________________________________________
          CONFIG_EXPERIMENTAL=y
          CONFIG_FIREWALL=y
          CONFIG_IP_FIREWALL=y
          CONFIG_IP_FIREWALL_CHAINS=y
  ______________________________________________________________________

  Per i kernel delle serie 2.1 o 2.2:

  ______________________________________________________________________
          CONFIG_FIREWALL=y
          CONFIG_IP_FIREWALL=y
  ______________________________________________________________________




  Lo strumento ipchains dialoga con il kernel e lo istruisce su quali
  pacchetti filtrare.  A meno che non si sia dei programmatori, o
  particolarmente curiosi, questo  il solo modo con cui si controller
  il filtraggio dei pacchetti.


  2.3.2.  ipchains

  Il programma ipchains inserisce e cancella regole dalla sezione di
  filtraggio dei pacchetti del kernel.  Ci significa che qualsiasi cosa
  si imposti, sar persa al riavvio; si veda la sezione ``Rendere
  permanenti le regole'' per un metodo per assicurarsi che siano
  ripristinate all'avvio successivo di Linux.


  ipchains rimpiazza ipfwadm, usato per il vecchio codice di Firewall
  IP. Nel sito ftp di ipchains  disponibile una serie di script molto
  utili:

  ftp://ftp.rustcorp.com/ipchains/ipchains-scripts-1.1.2.tar.gz
  <ftp://ftp.rustcorp.com/ipchains/ipchains-scripts-1.1.2.tar.gz>


  Questo pacchetto contiene uno script shell chiamato ipfwadm-wrapper
  che permette di effettuare il filtraggio dei pacchetti come lo si
  faceva prima.  Probabilmente non si dovrebbe usare questo script a
  meno che non si voglia un metodo veloce per aggiornare un sistema che
  usa ipfwadm ( pi lento, non controlla gli argomenti, ecc.).  In tal
  caso, non  necessario proseguire la lettura di questo HOWTO.

  Si veda l'appendice ``Differeze tra ipchains e ipfwadm''  e
  l'appendice ``Usare lo script `ipfwadm-wrapper''' per maggiori
  dettagli.


  2.3.3.  Rendere permanenti le regole

  La configurazione corrente del firewall  immagazzinata nel kernel e
  quindi sar persa al riavvio.  Raccomando di usare gli script
  `ipchains-save' e `ipchains-restore' per rendere permanenti le regole.
  Per far ci, si impostino le proprie regole, poi (come root) si lanci:



       # ipchains-save > /etc/ipchains.rules
       #




  Si crei uno script come il seguente:





  #! /bin/sh
  # Script per controllare il filtraggio dei pacchetti

  # Se non ci sono regole, non fa niente.
  [ -f /etc/ipchains.rules ] || exit 0

  case "$1" in
      start)
          echo -n "Attivazione del filtraggio dei pacchetti:"
          /sbin/ipchains-restore < /etc/ipchains.rules || exit 1
          echo 1 > /proc/sys/net/ipv4/ip_forward
          echo "."
          ;;
      stop)
          echo -n "Disattivazione del filtraggio dei pacchetti:"
          echo 0 > /proc/sys/net/ipv4/ip_forward
          /sbin/ipchains -X
          /sbin/ipchains -F
          /sbin/ipchains -P input ACCEPT
          /sbin/ipchains -P output ACCEPT
          /sbin/ipchains -P forward ACCEPT
          echo "."
          ;;
      *)
          echo "Uso: /etc/init.d/packetfilter {start|stop}"
          exit 1
          ;;
  esac

  exit 0




  Ci si assicuri che sia eseguito abbastanza presto nella procedura di
  avvio.  Nel mio caso (Debian 2.1), ho creato un link simbolico
  chiamato `S39packetfilter' nella directory `/etc/rcS.d' (cos sar
  eseguito prima di S40network).


  3.  Sono confuso!  Instradamento, masquerading, portforwarding, ipaut
  ofw...

  Questo HOWTO  sul filtraggio dei pacchetti.  Ci significa decidere
  quando un pacchetto debba avere o meno il permesso di passare.
  Comunque, essendo Linux il campo giochi degli hacker, si vorr
  probabilmente fare qualcosina di pi.


  Un problema  che lo stesso strumento (``ipchains'')  usato per
  controllare anche il masquerading e il proxy trasparente, sebbene
  queste siano nozionalmente diverse dal filtraggio dei pacchetti
  (l'implementazione corrente di Linux innaturalmente le fonde insieme,
  dando l'impressione che siano strettamente collegate).


  Il masquerading ed il proxy sono trattati da altri HOWTO, mentre le
  caratteristiche auto forwading e port forwarding sono controllate da
  altri strumenti, ma poich la gente continua a domandarmene, includer
  un insieme di scenari comuni ed indicher quando ognuno possa essere
  applicato.  I meriti di sicurezza di ciascuna configurazione non
  saranno qui discussi.




  3.1.  Le tre linee guida di Rusty al masquerading

  Si assume che la propria interfaccia esterna si chiami `ppp0'.  Si usi
  ifconfig per scoprire qual' e si aggiusti il tutto a proprio gusto.



       # ipchains -P forward DENY
       # ipchains -A forward -i ppp0 -j MASQ
       # echo 1 > /proc/sys/net/ipv4/ip_forward





  3.2.  Promozione gratuita: WatchGuard

  I firewall si possono anche comprare.  Uno eccellente  il FireBox
  della WatchGuard.   eccellente perch mi piace,  sicuro,  basato su
  Linux e anche perch quelli della WatchGuard sovvenzionano il
  mantenimento di ipchains e del nuovo codice di firewall (atteso per il
  2.3).  In breve, la WatchGuard mi sta pagando da mangiare mentre
  lavoro per voi.  Quindi vi invito a considerare i loro prodotti.

  http://www.watchguard.com <http://www.watchguard.com>


  3.3.  Configurazioni comuni di firewall

  Supponiamo che si amministri il dominio littlecorp.com.  Si ha una
  rete interna e una sola connessione in dialup (PPP) verso Internet
  (firewall.littlecorp.com che  1.2.3.4).  Si usa Ethernet nella
  propria rete locale e la propria macchina personale si chiama
  "myhost".


  Questa sezione illustrer diversi arrangiamenti comuni.  Li si legga
  attentamente, perch sono subdolamente diversi uno dall'altro.


  3.3.1.  Rete privata: proxy tradizionale

  In questo scenario, i pacchetti provenienti dalla rete privata non
  traverseranno mai Internet e viceversa.  Gli indirizzi IP della rete
  privata dovranno essere assegnati secondo le Private Network
  Allocations del RFC1597 (ie. 10.*.*.*, 172.16.*.* or 192.168.*.*).


  Il solo modo nel quale ci si potr mai connettere ad Internet  di
  connettersi al firewall, che  la sola macchina in entrambe le reti
  che pu uscire dalla rete locale.  Per far questo si pu eseguire un
  programma (nel firewall) detto proxy (ci sono proxy per FTP, accesso
  al web, telnet, RealAudio, Usenet News e altri servizi).  Si veda il
  Firewall HOWTO.


  Qualsiasi servizio che si vuole sia accessibile da Internet deve
  essere nel firewall (si veda anche ``Servizi interni limitati'' nel
  seguito).


  Esempio: Permettere l'accesso web dalla rete privata ad Internet

  1. Alla rete privata sono assegnati gli indirizzi 192.168.1.*, e in
     particolare a myhost  assegnato il 192.168.1.100 e all'interfaccia
     Ethernet del firewall il 192.168.1.1.
  2. Nel firewall  installato e configurato un proxy web (eg. "squid"),
     ed  in funzione sulla porta 8080.

  3. Il Netscape sulla rete privata  configurato per usare la porta
     8080 del firewall come proxy.

  4. Nel rete privata non serve sia configurato il DNS.

  5. Il DNS deve essere configurato sul firewall.

  6. Nella rete privata non dev'essere configurato nessun instradamento
     predefinito (gateway).


  Netscape su myhost legge http://slashdot.org.

  1. Netscape si connette alla porta 8080 del firewall usando la porta
     1050 su myhost.  Chiede la pagina web di "http://slashdot.org".

  2. Il proxy cerca il nome "slashdot.org" ed ottiene 207.218.152.131.
     Apre una connessione con quell'indirizzo IP (usando la porta 1025
     sull'interfaccia esterna del firewall) e chiede al server web
     (porta 80) la pagina web.

  3. Come il proxy riceve la pagina web dalla sua connessione con il
     server web, copia i dati nella connessione del Netscape.

  4. Netscape mostra la pagina.

  ie.  Dal punto di vista di slashdot.org, la connessione  fatta dalla
  porta 1025 di 1.2.3.4 (l'interfaccia PPP del firewall) verso la porta
  80 di 207.218.152.131 (slashdot.org).  Dal punto di vista di myhost, 
  fatta dalla porta 1050 di 192.168.1.100 (myhost) verso la porta 8080
  di 192.168.1.1 (l'interfaccia Ethernet del firewall).



  3.3.2.  Rete privata: proxy trasparente

  In questo scenario i pacchetti dalla rete privata non traversano mai
  Internet e viceversa.  Gli indirizzi IP della rete privata dovranno
  essere assegnati secondo le Private Network Allocations del RFC1597
  (ie. 10.*.*.*, 172.16.*.* or 192.168.*.*).


  Il solo modo nel quale ci si potr mai connettere ad Internet  di
  connettersi al firewall, che  la sola macchina in entrambe le reti
  che pu uscire dalla rete locale.  Per far questo si pu eseguire un
  programma (nel firewall) detto proxy trasparente; il kernel invia i
  pacchetti al proxy trasparente invece di farli uscire (ie.
  imbastardisce l'instradamento).


  Il proxy fatto in modo trasparente significa che ai client non serve
  sapere che c' un proxy coinvolto.


  Qualsiasi servizio che si vuole sia accessibile da Internet deve
  essere nel firewall (si veda anche ``Servizi interni limitati'' nel
  seguito).


  Esempio: Permettere l'accesso web dalla rete privata ad Internet

  1. Alla rete privata sono assegnati gli indirizzi 192.168.1.*, e in
     particolare a myhost  assegnato il 192.168.1.100 e all'interfaccia
     Ethernet del firewall il 192.168.1.1.

  2. Nell firewall  installato un proxy web trasparente (credo esistano
     delle patch per squid per permettergli di funzionare in questo
     modo, oppure si usi "transproxy") ed  in funzione sulla porta
     8080.

  3. Usando ipchains al kernel  detto di redirigere  al proxy le
     connessioni dirette alla porta 80.

  4. Netscape nella rete privata  configurato per connettersi
     direttamente.

  5. Nella rete privata dev'essere configurato il DNS (ie. si deve
     eseguire anche un server DNS oltre al proxy sul firewall).

  6. Nella rete privata dev'essere configurato l'instradamento
     predefinito (gateway), in modo da inviare i pacchetti al firewall.


  Netscape su myhost legge http://slashdot.org.

  1. Netscape cerca il nome "slashdot.org" ed ottiene 207.218.152.131.
     Allora apre una connessione verso quell'indirizzo IP usando la
     porta locale 1050 e chiede la pagina web al server web (porta 80).

  2. Come i pacchetti da myhost (porta 1050) verso slashdot.org (porta
     80) passano attraverso il firewall, sono rediretti al proxy
     trasparente in attesa sulla porta 8080.  Il proxy trasparente apre
     una connessione (usando la porta locale 1025) verso la porta 80 di
     207.218.152.131 (che  dove stavano andando i pacchetti originali).

  3. Come il proxy riceve la pagina web dalla sua connessione con il
     server web, copia i dati nella connessione del Netscape.

  4. Netscape mostra la pagina.

  ie.  Dal punto di vista di slashdot.org, la connessione  fatta dalla
  porta 1025 di 1.2.3.4 (l'interfaccia PPP del firewall) verso la porta
  80 di 207.218.152.131 (slashdot.org).  Dal punto di vista di myhost, 
  fatta dalla porta 1050 di 192.168.1.100 (myhost) verso la porta 80 di
  207.218.152.131, ma in realt sta dialogando con il proxy trasparente.


  3.3.3.  Rete privata: masquerading

  In questo scenario i pacchetti dalla rete privata non traversano mai
  Internet e viceversa.  Gli indirizzi IP della rete privata dovranno
  essere assegnati secondo le Private Network Allocations del RFC1597
  (ie. 10.*.*.*, 172.16.*.* or 192.168.*.*).


  Invece di usare un proxy, usiamo una speciale caratteristica del
  kernel detta "masquerading" (mascheramento, travestimento).  Il
  masquerading riscrive i pacchetti non appena passano per il firewall,
  cos sembra sempre che provengano dal firewall stesso.  Poi riscrive
  le risposte in modo che sembri provengano dalle fonti originali.


  Il masquerading ha moduli separati per gestire protocolli "banali",
  come FTP, RealAudio, Quake, ecc.  Per protocolli veramenente difficili
  da gestire, la funzione di "auto forwarding" (inoltro automatico) ne
  pu gestire alcuni automaticamente impostando il port forwarding per
  l'insieme delle porte a loro relative: si veda ``ipportfw'' (kernel
  2.0) o ``ipmasqadm'' (kernel 2.1).

  Qualsiasi servizio che si vuole sia accessibile da Internet deve
  essere nel firewall (si veda anche ``Servizi interni limitati'' nel
  seguito).


  Esempio: Permettere l'accesso web dalla rete privata ad Internet

  1. Alla rete privata sono assegnati gli indirizzi 192.168.1.*, e in
     particolare a myhost  assegnato il 192.168.1.100 e all'interfaccia
     Ethernet del firewall il 192.168.1.1.

  2. Il firewall  impostato per "mascherare" qualsiasi pacchetto
     proveniente dalla rete privata e destinato alla porta 80 di un host
     Internet.

  3. Netscape  configurato per connettersi direttamente.

  4. Nella rete privata dev'essere configurato correttamente il DNS.

  5. Il firewall dovr essere l'instradamento predefinito (gateway) per
     la rete privata.

  Netscape su myhost legge http://slashdot.org.

  1. Netscape cerca il nome "slashdot.org", ed ottiene 207.218.152.131.
     Allora apre una connessione verso quell'indirizzo IP usando la
     porta locale 1050 e chiede la pagina web al server web (porta 80).

  2. Come i pacchetti da myhost (porta 1050) verso slashdot.org (porta
     80) passano attraverso il firewall, sono riscritti per apparire
     provenienti dall'interfaccia PPP del firewall (porta 65000).   Il
     firewall ha un indirizzo Internet valido (1.2.3.4) e quindi i
     pacchetti di risposta provenienti da slashdot.org vengono
     correttamente instradati indietro.

  3. Come i pacchetti da slashdot.org (port 80) verso
     firewall.littlecorp.com (porta 65000) arrivano, sono riscritti per
     andare alla porta 1050 di myhost.  Questa  la vera magia del
     masquerading: si ricorda quando riscrive pacchetti uscenti e cos
     pu riscriverli non appena arrivano le risposte.

  4. Netscape mostra la pagina.

  ie.  Dal punto di vista di slashdot.org, la connessione avviene dalla
  porta 65000 di 1.2.3.4 (l'interfaccia PPP del firewall) verso la porta
  80 di 207.218.152.131 (slashdot.org).  Dal punto di vista di myhost,
  la connessione  fatta dalla porta 1050 di 192.168.1.100 (myhost),
  verso la porta 80 di 207.218.152.131 (slashdot.org).



  3.3.4.  Rete pubblica

  In questo scenario la propria rete personale  parte di Internet: i
  pacchetti possono fluire senza modifiche tra le due reti.  Gli
  indirizzi IP della rete interna devono essere assegnati richiedendo un
  blocco di indirizzi IP, in modo che il resto della rete sappia come
  raggiungerla.  Ci implica una connessione permanente.


  In tal caso, il filtraggio dei pacchetti  usato per decidere quali
  pacchetti possono essere inoltrati tra la propria rete ed il resto di
  Internet, eg. per restringere il resto di Internet al solo accesso ai
  propri server web interni.


  Esempio: Permettere l'accesso web dalla rete privata verso Internet.

  1. Alla propria rete interna  assegnato un blocco di indirizzi IP che
     si  richiesto (diciamo 1.2.3.*).

  2. Il firewall  impostato per permettere tutto il traffico.

  3. Netscape  configurato per connettersi direttamente.

  4. Nella propria rete dev'essere configurato il DNS.

  5. Il firewall dovr essere l'instradamento predefinito (gateway) per
     la rete privata.

  Netscape su myhost legge http://slashdot.org.

  1. Netscape cerca il nome "slashdot.org" e ottiene 207.218.152.131.
     Apre poi una connessione verso quel indirizzo IP usando la porta
     locale 1050 e chiede la pagina al server web (porta 80).

  2. I pacchetti passano attraverso il proprio firewall, proprio come
     passano attraverso diversi altri router tra myhost e slashdot.org.

  3. Netscape mostra la pagina.

  ie.  C' solo una connessione: dalla porta 1050 di 1.2.3.100 (myhost)
  verso la porta 80 di 207.218.152.131 (slashdot.org).


  3.3.5.  Servizi interni limitati

  Ci sono un po' di trucchi che si possono usare per permettere ad
  Internet di accedere ai propri servizi interni, piuttosto che far
  girare i servizi sul firewall.  Funzioneranno solo con un approccio
  basato su proxy o masquerading per le connessioni esterne.


  L'approccio pi semplice  di usare un "dirottatore" che non  altro
  che un proxy dei poveri, che attenende la connessione su una data
  porta e poi apre una connessione ad una porta fissa di un host interno
  copiando i dati tra le due connessioni.  Un esempio  il programma
  "redir".  Dal punto di vista di Internet, la connessione  fatta verso
  firewall.  Dal punto di vista del server interno la connessione 
  fatta dall'interfaccia interna del firewall al server.


  Un altro approccio (che richiede un kernel 2.0 con la patch per
  ipportfw, oppure un kernel 2.1 o pi recente)  di usare il port
  forwarding del kernel.  Quest'ultimo fa lo stesso lavoro di "redir" ma
  in modo diverso: il kernel riscrive i pacchetti mentre passano,
  cambiando il loro indirizzo di destinazione e la porta per
  indirizzarli verso l'host interno e la relativa porta.  Dal punto di
  vista di Internet, la connessione  fatta verso il firewall.  Dal
  punto di vista del server interno  fatta una connessione diretta tra
  l'host Internet ed il server.


  3.4.  Ulteriori informazioni sul masquerading

  David Ranch ha scritto un eccellente nuovo HOWTO sul masquerading, che
  ha parecchi argomenti in comune con questo HOWTO.  Attualmente lo si
  pu trovare a

  http://www.ecst.csuchico.edu/~dranch/LINUX/index-LINUX.html#ipmasq


  Presto mi aspetterei di trovarlo sotto gli patrocinio del Linux
  Documentation Project, a http://www.metalab.unc.edu/LDP
  <http://www.metalab.unc.edu/LDP>


  L'home page ufficiale del Masquerading  a

  http://ipmasq.cjb.net <http://ipmasq.cjb.net>



  4.  IP Firewall Chains

  Questa sezione descrive tutto quello che bisogna veramente sapere per
  costruire un filtro di pacchetti che incontri le proprie esigenze.


  4.1.  Come passano i pacchetti attraverso i filtri

  Il kernel parte con tre elenchi di regole; questi elenchi sono detti
  firewall chains (catene firewall) o semplicemente chains (catene).  Le
  tre catene predefinite sono chiamate rispettivamente input (ingresso),
  output (uscita) e forward (inoltro).  Quando arriva un pacchetto
  (diciamo, attraverso la scheda Ethernet) il kernel usa la catena input
  per decidere il suo destino.  Se sopravvive a quel passo, allora il
  kernel decide dove mandare sucessivamente il pacchetto (ci  detto
  routing (instradamento)).  Se  destinato ad un'altra macchina,
  consulta la catena forward.  Alla fine, appena prima che il pacchetto
  esca, il kernel consulta la catena output.


  Una catena  una lista di regole.  Ogni regola dice ``se
  l'intestazione del pacchetto  fatta cos, allora questo  quello che
  si deve fare con il pacchetto''.  Se il pacchetto non soddisfa
  (verifica) una regola, allora viene consultata la successiva regola
  nella catena.  Alla fine, se non ci sono altre regole da consultare,
  il kernel guarda la policy (tattica) della catena per decidere cosa
  fare.  In un sistema conscio delle problematiche di sicurezza, questa
  tattica dice al kernel se rifiutare o proibire il pacchetto.


  Per gli amanti dell'arte ASCII, questa figura mostra il percorso
  completo di un pacchetto entrante in una macchina.


          ----------------------------------------------------------------
          |            ACCEPT/                              lo interface |
          v           REDIRECT                  _______                  |
  --> C --> S --> ______ --> D --> ~~~~~~~~ -->|forward|----> _______ -->
      h     a    |input |    e    {Routing }   |Chain  |     |output |ACCEPT
      e     n    |Chain |    m    {Decision}   |_______| --->|Chain  |
      c     i    |______|    a     ~~~~~~~~        |     | ->|_______|
      k     t       |        s       |             |     | |     |
      s     y       |        q       |             v     | |     |
      u     |       v        e       v            DENY/  | |     v
      m     |     DENY/      r   Local Process   REJECT  | |   DENY/
      |     v    REJECT      a       |                   | |  REJECT
      |   DENY               d       --------------------- |
      v                      e -----------------------------
     DENY


  Di seguito una descrizione di ogni stadio:



     Checksum:
        Questo  il test per verificare che il pacchetto non sia in
        qualche modo corrotto.  Se lo ,  rifiutato.


     Sanity:
        In realt c' una verifica di integrit del pacchetto prima di
        ogni catena firewall, ma quello della catena input  il pi
        importante.  Alcuni pacchetti malformati possono confondere il
        codice per il controllo delle regole, e quindi sono qui
        rifiutati (se ci avviene  stampato un messaggio nel syslog).


     input chain:
         la prima catena firewall contro la quale viene testato il
        pacchetto.  Se il verdetto della catena non  DENY o REJECT, il
        pacchetto prosegue.


     Demasquerade:
        Se il pacchetto  una risposta (reply) ad un precedente
        pacchetto "mascherato",  "demascherato" e passa direttamente
        alla catena output.  Se non si usa L'IP Masquerading si cancelli
        questo percorso dal diagramma.


     Routing decision:
        Il codice di instradamento esamina il campo di destinazione per
        decidere se questo pacchetto deve andare ad un processo locale
        (si veda Local process qui sotto) o inoltrato ad una macchina
        remota (si veda forward chain pi avanti)


     Local process:
        Un processo in esecuzione sulla macchina pu ricevere pacchetti
        dopo il passo di Routing Decision, e pu inviare pacchetti (che
        passano per il passo Routing Decision, e poi attraversano la
        catena output).


     lo interface:
        Se i pacchetti provenienti da un processo locale sono destinati
        ad un processo locale, attraverseranno la catena output con il
        campo interfaccia impostato a `lo', e poi ritornano attraverso
        la catena input sempre con interfaccia impostato a `lo'.
        L'interfaccia lo  solitamente chiamata interfaccia loopback.


     local:
        Se il pacchetto non era stato creato da un processo locale,
        allora  esaminata la catena forward, altrimenti il pacchetto va
        verso la catena output.


     forward chain:
        Questa catena  attraversata da qualsiasi pacchetto che provi a
        passare attraverso questa macchina per andare verso un'altra.


     output chain:
        Questa catena  attraversata da qualsiasi pacchetto un attimo
        prima di essere spedito fuori.




  4.1.1.  Usare ipchains

  Per prima cosa si controlli di avere la versione di ipchains a cui fa
  riferimento questo documento:



       $ ipchains --version
       ipchains 1.3.9, 17-Mar-1999





  Si noti che io raccomando la 1.3.4 (che non ha le opzioni lunghe, come
  `--sport'), o la 1.3.8 o superiori; queste sono molto stabili.


  ipchains ha una pagina man piuttosto dettagliata (man ipchains), e se
  servono ulteriori dettagli o particolari, si pu dare un'occhiata
  all'interfaccia di programmazione (man 4 ipfw), oppure al file
  net/ipv4/ip_fw.c nei sorgenti dei kernel 2.1.x, che sono (ovviamente)
  le fonti pi autorevoli.


  Nel pacchetto sorgente c' pure una eccellente scheda di riferimento
  rapido di Scott Bronson, in PostScript(TM) sia in formato A4 che US
  Letter.


  Ci sono parecchie cose diverse che si possono fare con ipchains.  Per
  prima cosa le operazioni per gestire intere catene.  Si parte con tre
  catene predefinite input, output e forward che non possono essere
  cancellate.


  1. Creare una nuova catena (-N).

  2. Cancellare una catena vuota (-X).

  3. Cambiare la tattica per una catena predefinita (-P).

  4. Elencare le regole in una catena (-L).

  5. Svuotare una catena delle sue regole (-F).

  6. Azzerare i contatori di pacchetti e byte per tutte le regole in una
     catena (-Z).

  Ci sono diversi modi per manipolare le regole in una catena:


  1. Aggiungere una nuova regola ad una catena (-A).

  2. Inserire in una posizione specifica una nuova regola in una catena
     (-I).

  3. Rimpiazzare una regola in una qualche posizione in una catena (-R).

  4. Cancellare da una posizione specifica una regola da una catena
     (-D).

  5. Cancellare da una catena la prima regola corrispondente (-D).

  Ci sono alcune operazioni per il masquerading, che, in mancanza di un
  posto migliore dove metterle, sono in ipchains:
  1. Elenca le connessioni attualmente mascherate (-M -L).

  2. Imposta i valori di timeout del masquerading (-M -S) (si veda anche
     ``Non posso impostare i timeout del masquerading!'').

  La funzione finale (e forse la pi utile) permette di controllare cosa
  succederebbe ad un dato pacchetto se volesse traversare una data
  catena.


  4.1.2.  Operazioni su una sola regola

  Questa  la ragione di sussistenza di ipchains: la manipolazione delle
  regole.  Molto probabilmente si useranno i comandi di aggiunta (-A) e
  cancellazione (-D).  Gli altri (-I per l'inserimento e -R per il
  rimpiazzo) sono semplici estensioni di questi concetti.


  Ogni regola specifica un insieme di condizioni che il pacchetto deve
  soddisfare, e cosa fare se il pacchetto le soddisfa (un "obiettivo").
  Per esempio, si possono voler proibire tutti i pacchetti ICMP
  provenienti dall'indirizzo 127.0.0.1.  Quindi in questo caso le nostre
  condizioni sono che il protocollo deve essere ICMP e che l'indirizzo
  di provenienza deve essere 127.0.0.1.  Il nostro obiettivo  `DENY'.


  127.0.0.1  l'interfaccia `loopback', presente anche se non si
  possiede una vera connessione di rete.  Si pu usare il programma
  `ping' per generare tali pacchetti (semplicemente invia un pacchetto
  ICMP di tipo 8 (echo request) al quale tutti gli host cooperativi
  dovrebbero rispondere obbligatoriamente con un pacchetto ICMP di tipo
  0 (echo reply)).  Ci lo rende molto utile per i test.



       # ping -c 1 127.0.0.1
       PING 127.0.0.1 (127.0.0.1): 56 data bytes
       64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.2 ms

       --- 127.0.0.1 ping statistics ---
       1 packets transmitted, 1 packets received, 0% packet loss
       round-trip min/avg/max = 0.2/0.2/0.2 ms
       # ipchains -A input -s 127.0.0.1 -p icmp -j DENY
       # ping -c 1 127.0.0.1
       PING 127.0.0.1 (127.0.0.1): 56 data bytes

       --- 127.0.0.1 ping statistics ---
       1 packets transmitted, 0 packets received, 100% packet loss
       #




  Si pu vedere che il primo ping ha successo (il `-c 1' dice a ping di
  inviare un solo pacchetto).


  Poi si  aggiunta alla catena `input' una regola che specifica che per
  i pacchetti provenienti da 127.0.0.1 (`-s 127.0.0.1') con protocollo
  ICMP (`-p ICMP') si dovr saltare a DENY (`-j DENY').


  Poi si  verificata la nostra regola, usando un secondo ping.  Ci sar
  una pausa prima che il programma si stanchi di aspettare una risposta
  che non arriver mai.

  Si pu cancellare la regola in due modi.  Per prima cosa, poich
  sappiamo che  la sola regola nella catena input, possiamo usare la
  cancellazione in base alla posizione, come in


               # ipchains -D input 1
               #




  per cancellare la regola numero 1 nella catena input.


  Il secondo modo  di ricopiare il comando -A precedente, rimpiazzando
  -A con -D.  Ci  utile quando si ha una complessa catena di regole e
  non si vuole star l a contarle per scoprire che quella che si vuole
  cancellare  la 37-esima.  In tal caso useremo:


               # ipchains -D input -s 127.0.0.1 -p icmp -j DENY
               #




  La sintassi di -D deve avere esattamente le stesse opzioni del comando
  -A (o -I oppure -R).  Se c' una multitudine di regole identiche nella
  stessa catena,  cancellata solo la prima.


  4.1.3.  Specificare il filtraggio

  Si  visto l'uso di `-p' per specificare il protocollo e di `-s' per
  specificare l'indirizzo di provenienza, ma ci sono altre opzioni che
  si possono usare per specificare le caratteristiche del pacchetto.
  Quel che segue  un compendio esaustivo.


  4.1.3.1.  Specificare gli indirizzi di provenienza e destinazione

  Gli indirizzi IP di provenienza (-s) e destinazione (-d) possono
  essere specificati in quattro modi.  Il modo pi comune  di usare il
  nome completo, come `localhost' o `www.linuxhq.com'.  Il secondo modo
   di specificare l'indirizzo IP, come ad esempio `127.0.0.1'.


  Il terzo ed il quarto modo permettono di specificare un gruppo di
  indirizzi IP, come ad esempio `199.95.207.0/24' o
  `199.95.207.0/255.255.255.0'.  Entrambi specificano un qualsiasi
  indirizzo IP tra 192.95.207.0 e 192.95.207.255 estremi inclusi; le
  cifre dopo `/' dicono quali parti dell'indirizzo IP sono
  significative.  I valori predefiniti sono `/32' o `/255.255.255.255'
  (corrispondenti a tutti gli indirizzi IP).  Per specificare nessun
  indirizzo IP pu essere usato `/0', come segue:


               # ipchains -A input -s 0/0 -j DENY
               #




  Questa cosa  raramente usata, in quanto il suo effetto  lo stesso
  che non specificare affatto l'opzione `-s'.

  4.1.3.2.  Specificare una negazione

  Molte opzioni, tra le quali `-s' e `-d', possono avere gli argomenti
  preceduti da `!' (pronunciato `not') per effettuare la corrispondenza
  con indirizzi NON uguali a quelli dati.  Per esempio, `-s ! localhost'
  corrisponde a qualsiasi pacchetto non proveniente da localhost.


  4.1.3.3.  Specificare un protocollo

  Il protocollo pu essere specificato con l'opzione `-p'.  Il
  protocollo pu essere un numero (se si conoscono i valori numerici dei
  protocolli IP) o un nome per i casi speciali di `TCP', `UDP' o `ICMP'.
  Non  importante come  scritto: vanno bene sia `tcp' che `TCP'.


  I nomi dei protocolli possono essere preceduti da un `!' per negarli,
  con ad esempio `-p ! TCP'.


  4.1.3.3.1.  Specificare porte UDP e TCP

  Nei casi particolari nei quali  specificato TCP o UDP come
  protocollo, ci pu essere un argomento aggiuntivo che indica la porta
  TCP e UDP, oppure un intervallo (inclusivo) di porte (si veda anche
  ``Gestire i frammenti'' nel seguito).  Un intervallo  rappresentato
  usando un carattere `:', come ad esempio `6000:6010', che copre 11
  numeri di porte da 6000 a 6010 estremi compresi.  Se  omesso il
  limite inferiore, il valore predefinito  0.  Se  omesso quello
  superiore, il suo valore predefinito  65535.  Quindi per specificare
  le connessioni TCP provenienti da porte inferiori alla 1024, la
  sintassi potrebbe essere `-p TCP -s 0.0.0.0/0 :1023'.  I numeri di
  porta possono essere specificati anche attraverso il nome, eg. `www'.


  Si noti che la specificazione pu essere preceduta da un `!', che la
  nega.  Quindi per specificare qualsiasi pacchetto TCP TRANNE i
  pacchetti WWW, si potrebbe specificare

  -p TCP -d 0.0.0.0/0 ! www



   importante realizzare che la specifica


  -p TCP -d ! 192.168.1.1 www



   molto diversa da

  -p TCP -d 192.168.1.1 ! www



  La prima specifica qualsiasi pacchetto TCP verso la porta WWW su
  qualsiasi macchina tranne la 192.168.1.1.  La seconda specifica
  qualsiasi connessione TCP verso qualsiasi porta di 192.168.1.1 tranne
  la porta WWW.


  Per finire, questo caso indica di escludere sia la porta WWW e che
  192.168.1.1:


  -p TCP -d ! 192.168.1.1 ! www




  4.1.3.3.2.  Specificare tipo e codice ICMP

  Anche ICMP permette argomenti opzionali, ma poich ICMP non ha le
  porte (ICMP ha un tipo e un codice) hanno un significato diverso.


  Possono essere specificati come nomi ICMP (si usi ipchains -h icmp per
  la lista di nomi) dopo l'opzione `-s', oppure come tipo e codice ICMP
  numerici, dove il tipo segue l'opzione `-s' e il codice segue
  l'opzione `-d'.


  I nomi ICMP sono piuttosto lunghi: basta usare solamente abbastanza
  lettere da rendere il nome distinguibile da ogni altro.


  Di seguito una piccola tabella dei pi comuni pacchetti ICMP:


       Numero  Nome                     Richiesto da

       0       echo-reply               ping
       3       destination-unreachable  qualsiasi traffico TCP/UDP.
       5       redirect                 per l'instradamento, se non sta girando
                                        il demone di instradamento
       8       echo-request             ping
       11      time-exceeded            traceroute




  Si noti che i nomi ICMP al momento non possono essere preceduti da
  `!'.


  NON NON NON si blocchino tutti i messaggi ICMP di tipo 3!  (si veda
  ``Pacchetti ICMP'' pi avanti).


  4.1.3.4.  Specificare un'interfaccia

  L'opzione `-i' specifica il nome di un'interfaccia.  Un'interfaccia 
  il dispositivo fisico dal quale entra o esce il pacchetto.  Si pu
  usare il comando ifconfig per avere un elenco delle interfacce che al
  momento sono `s' (ie. che al momento funzionano).


  L'interfaccia per i pacchetti in arrivo (ie. i pacchetti che stanno
  attraversando la catena input)  considerata essere l'interfaccia
  dalla quale entrano.  Logicamente, l'interfaccia per i pacchetti in
  partenza (i pacchetti che stanno attraversando la catena output) 
  l'interfaccia dalla quale usciranno.  Anche l'interfaccia per i
  pacchetti che passano per la catena forward  l'interfaccia dalla
  quale usciranno; a me sembra una decisione piuttosto arbitraria.


   perfettamente legale specificare un'interfaccia che al momento non
  esiste; la regola non sar mai soddisfatta finch l'interfaccia non
  viene attivata.  Ci  estremamente utile per le connessioni PPP in
  dial-up (solitamente l'interfaccia ppp0) e simili.

  Come caso speciale, un nome di intefaccia che termina con un `+'
  corrisponder a tutte le interfacce (che esistano o meno) che iniziano
  con quella stringa.  Per esempio, per specificare una regola che
  corrisponda a tutte le interfacce PPP, pu essere usata l'opzione -i
  ppp+.


  Il nome dell'interfaccia pu essere preceduto da un `!' per far s che
  sia soddisfatta da tutte le interfacce che NON corrispondono
  all'interfaccia (o alle interfacce) specificata.


  4.1.3.5.  Specificare solo pacchetti TCP SYN

  Talvolta  utile permettere connessioni TCP in una direzione, ma non
  nell'altra.  Per esempio, si pu voler permettere connessioni verso un
  server WWW esterno ma non le connessioni da quel server.


  L'approccio naive sarebbe quello di bloccare i pacchetti TCP
  provenienti da server.  Sfortunantamente, le connessioni TCP
  richiedono per funzionare che i pacchetti possono andare in entrambe
  le direzioni.


  La soluzione  di bloccare solo i pacchetti usati per richiedere una
  connessione.  Questi pacchetti sono chiamati pacchetti SYN (ok,
  tecnicamente sono pacchetti con il flag SYN impostato, e i campi FIN e
  ACK non attivati, ma li chiameremo lo stesso pacchetti SYN).  Non
  permettendo solamente questi pacchetti, si possono fermare i tentativi
  di connessione.


  Per questo viene usata l'opzione `-y':  valida solamente per regole
  che specificano TCP come loro protocollo.  Per esempio, per
  specificare un tentativo di connessione TCP da 192.168.1.1:

  -p TCP -s 192.168.1.1 -y




  Ancora una volta, questa opzione pu essere negata precedendola con un
  `!' che significa tutti pacchetti tranni quelli per iniziare la
  connessione.


  4.1.3.6.  Gestire i frammenti

  Qualche volta un pacchetto  troppo grande per passarci tutto intero
  nel cavo.  Quando questo succede, il pacchetto  diviso in frammenti
  (fragments), ed inviato come pacchetti multipli.  L'altro capo della
  connessione riassembla i pacchetti per ricostruire il pacchetto
  intero.


  Il problema con i frammenti  che alcune delle specificazioni suddette
  (in particolare porta d'origine, porta di destinazione, tipo ICMP,
  codice ICMP o flag SYN TCP) richiedono che il kernel sbirci nella
  parte iniziale del pacchetto, che  contenuta solo nel primo
  frammento.


  Se le propria macchina  la sola connessione ad una rete esterna,
  allora si pu dire al kernel di riassemblare tutti i frammenti che gli
  passano attraverso, compilando il kernel con l'opzione IP: always
  defragment posta a `Y'.  Ci evita il problema in maniera pulita.


  Diversamente,  importante capire come sono trattati i frammenti dalle
  regole di filtraggio.  Qualsiasi regola di filtraggio che chiede
  informazioni che non si hanno non verr soddisfatta.  Ci significa
  che il primo frammento  trattato come qualsiasi altro pacchetto.  Non
  lo saranno invece il secondo e i successivi frammenti.  Quindi una
  regola -p TCP -s 192.168.1.1 www (specificante una porta sorgente
  `www') non sar mai soddisfatta da un frammento (tranne al primo).  E
  neppure la regola opposta -p TCP -s 192.168.1.1 ! www.


  Comunque, si pu specificare una regola specifica per il secondo e i
  successivi frammenti, usando l'opzione `-f'.  Ovviamente in questa
  regola per i frammenti  illegale specificare una porta TCP o UDP, un
  tipo o un codice ICMP oppure l'opzione per il SYN TCP.


   pure legale specificare che una regola non si applica al secondo e
  ai successivi frammenti, precendendo il `-f' con `!'.


  Solitamente  considerata una cosa sicura lasciar passare il secondo e
  i successi frammenti, poich il filtraggio avr effetto sul primo
  frammento e quindi preverr la ricostruzione nell'host di
  destinazione.  Comunque, sono noti alcuni bug che permettono il crash
  di macchine semplicemente inviandogli frammenti.


  Una nota per i capoccioni della rete: i pacchetti malformati
  (pacchetti TCP, UDP o ICMP troppo corti affinch il codice di
  firewalling possa leggere le porte o il codice e tipo ICMP) sono
  trattati come frammenti.  Solo i frammenti TCP che iniziano alla
  posizione 8 sono esplicitamente scartati dal codice di firewall
  (dovrebbe apparire un messaggio nel syslog se succede questo).


  Come esempio, la regola seguente scarter qualsiasi frammento diretto
  a 192.168.1.1:




       # ipchains -A output -f -d 192.168.1.1 -j DENY
       #





  4.1.4.  Effetti collaterali del filtraggio

  OK, quindi ora si conoscono tutti i modi con i quali si pu creare una
  regola che corrisponda ad un pacchetto.  Se un pacchetto soddisfa una
  regola, succedono le seguenti cose:


  1. Il contatore di byte per quella regola  incrementato della
     dimensione del pacchetto (intestazione e tutto il resto).

  2.  incrementato il contatore di pacchetti per quella regola.

  3. Se la regola lo richiede, il pacchetto  registrato.


  4. Se la regola lo richiede,  cambiato il campo Type Of Service del
     pacchetto.

  5. Se la regola lo richiede, il pacchetto  marcato (non nei kernel
     della serie 2.0).

  6.  esaminata la regola obiettivo per decidere cosa fare dopo al
     pacchetto.


  Per variet, le esaminer in ordine di importanza.


  4.1.4.1.  Specificare un obiettivo

  Un obiettivo dice al kernel cosa farne di un pacchetto che soddisfa
  una regola.  ipchains usa `-j' (penso `jump-to' - salta a) per la
  specifica dell'obiettivo.  Il nome dell'obiettivo deve essere pi
  corto di 8 caratteri, ed  importante come  scritto: "RETURN" e
  "return" sono completamente diversi.


  Il caso pi semplice  quando non  specificato alcun obiettivo.
  Questo tipo di regola (spesso detta regola di `accounting' -
  contabilit)  utile con contare semplicemente un certo tipo di
  pacchetto.  Che questa regola sia o meno soddisfatta, semplicemente il
  kernel esamina la regola successiva nella catena.  Per esempio, per
  contare il numero di pacchetti da 192.168.1.1, si pu fare cos:


       # ipchains -A input -s 192.168.1.1
       #





  (Usando `ipchains -L -v' si possono vedere i contatori di byte e
  pacchetti associati con ciascuna regola).


  Esistono sei obiettivi speciali.  I primi tre, ACCEPT, REJECT e DENY
  sono piuttosto semplici.  ACCEPT permette che il pacchetto passi.
  DENY scarta il pacchetto come non fosse mai stato ricevuto.  REJECT
  scarta il pacchetto, ma (se non  un pacchetto ICMP) genera una
  risposta ICMP per la sorgente per dirle che la destinazione non 
  raggiungibile.


  Quella dopo, MASQ dice al kernel di mascherare il pacchetto.  Affinch
  ci funzioni, il proprio kernel dev'essere compilato con il supporto
  per l'IP Masquerading.  Per i dettagli si veda il Masquerading-HOWTO e
  l'appendice ``Differenze tra ipchains e ipfwadm''.  Questo obiettivo 
  valido solo per pacchetti che attraversano la catena forward.


  L'altro obiettivo principale  REDIRECT che dice al kernel di inviare
  un pacchetto ad una porta locale invece di dove era destinato ad
  andare.  Pu essere specificato solo per regole che specificano TCP o
  UDP come loro protocolli.  Opzionalmente, pu essere specificata una
  porta (nome o numero) dopo di `-j REDIRECT' che far s che quel
  pacchetto sia dirottato a quella particolare porta anche se era
  indirizzato ad un'altra porta.  Questo obiettivo  valido solo per
  pacchetti che attraversano la catena input.


  L'obiettivo finale speciale  RETURN che  identico all'uscita
  immediata dalla catena (si veda ``Impostare la tattica'' nel seguito).


  Qualsiasi altro obiettivo indica una catena definita dall'utente (come
  descritto in ``Operazione con intere catene'' nel seguito).  Il
  pacchetto inizier ad attraversare le regole in quella catena.  Se
  quella catena non decide il destino del pacchetto, allora, una volta
  che  terminata la traversata della catena, si riprende dalla regola
  successiva nella catena corrente.


   ora di un altro po' arte ASCII.  Si considerino due catene
  (sciocche): input (la catena predefinita) e Test (una catena definita
  dall'utente).


           `input'                           `Test'
          ------------------------------  ------------------------------
          | Regola1: -p ICMP -j REJECT |  | Regola1: -s 192.168.1.1    |
          |----------------------------|  |----------------------------|
          | Regola2: -p TCP -j Test    |  | Regola2: -d 192.168.1.1    |
          |----------------------------|  ------------------------------
          | Regola3: -p UDP -j DENY    |
          ------------------------------




  Si consideri un pacchetto TCP proveniente da 192.168.1.1 e destinato a
  1.2.3.4.  Entra nella catena input e viene controllato rispetto a
  Regola1: non la soddisfa. Soddisfa invece Regola2 il cui obiettivo 
  Test. Quindi la successiva regola ad essere esaminata  la prima di
  Test.  Regola1 in Test  soddisfatta ma non specifica un obiettivo,
  quindi Regola2  la prossima ad essere esaminata.  Questa non 
  soddisfatta e si  cos raggiunta la fine delle catena.  Si quindi
  ritorna alla catena input, dove si  appena esaminata Regola2 e quindi
  ora si esamina Regola3, che non viene soddisfatta.


  Quindi il percorso del pacchetto :

                                    v    ___________________________
           `input'                  |   /  `Test'                  v
          --------------------------|--/  -------------------------|----
          | Regola1                 | /|  | Regola1                |   |
          |-------------------------|/-|  |------------------------|---|
          | Regola2                 /  |  | Regola2                |   |
          |----------------------------|  -------------------------v----
          | Regola3                 /--+___________________________/
          --------------------------|---
                                    v




  Si veda la sezione ``Come organizzare le proprie regole di firewall''
  per alcuni metodi per usare efficacemente le catene definite
  dall'utente.


  4.1.4.2.  Registrazione dei pacchetti

  Questo  un effetto collaterale che pu avere una regola che viene
  soddisfatta: usando l'opzione `-l' si pu far s che il pacchetto che
  la soddisfa sia registrato.  Solitamente questa cosa non la si vuole
  per i pacchetti di routine, ma  una caratteristica utile se si
  vogliono cercare eventi eccezionali.


  Il kernel registra questa informazione come segue:



       Packet log: input DENY eth0 PROTO=17 192.168.2.1:53 192.168.1.1:1025
         L=34 S=0x00 I=18 F=0x0000 T=254




  Questo messaggio di registrazione  pensato per essere conciso e
  contiene informazioni tecniche utili solo ai guru del networking, ma
  pu essere utile anche al resto di noi.  Si suddivide cos:


  1. `input'  la catena che contiene la regola soddisfatta dal
     pacchetto, che ha causato il messaggio di log.

  2. `DENY'  quanto la regola dice di fare del pacchetto.  Se  `-'
     allora la regola non ha effetto sul pacchetto (una regola di
     accounting).

  3. `eth0'  il nome dell'interfaccia.  Poich la catena era la input,
     indica che il pacchetto  entrato da `eth0'.

  4. `PROTO=17' indica che il pacchetto era con protocollo 17.  Un
     elenco dei protocolli  dato in `/etc/protocols'.  I pi comuni
     sono 1 (ICMP), 6 (TCP) e 17 (UDP).

  5. `192.168.2.1' indica che l'indirizzo IP di provenienza era
     192.168.2.1.

  6. `:53' indica che porta di provenienza era la porta 53.  Cercando in
     `/etc/services' si veda che questa  la porta `domain' (ie.
     probabilmente  una risposta DNS).  Per UDP e TCP questo numero 
     la porta di provenienza.  Per ICMP,  il tipo ICMP.  Per gli altri,
     sar 65535.

  7. `192.168.1.1'  l'indirizzo IP di destinazione.

  8. `:1025' indica che la porta di destinazione era la 1025.  Per UDP e
     TCP questo numero  la porta di destinazione.  Per ICMP  il codice
     ICMP.  Per gli altri, sar 65535.

  9. `L=34' indica che il pacchetto era lungo 34 byte.

  10.
     `S=0x00' indica il campo Type of Service (lo si divida per 4 per
     ottenere il Type of Service usato da ipchains).

  11.
     `I=18'  l'ID IP.

  12.
     `F=0x0000'  l'offset a 16 bit del frammento pi i flag.  Un valore
     che cominci con `0x4' o `0x5' indica che il bit `Don't Fragment' 
     impostato.  `0x2' or `0x3' indicano che  impostato il bit `More
     Fragments'; sono da aspettarsi altri frammenti dopo di questo.  Il
     resto del numero  l'offset, diviso per 8, di questo frammento.

  13.
     `T=254'  il `Time To Live' (tempo di vita) del pacchetto.  
     diminuito di uno ad ogni hop, e solitamente parte a 15 o 255.

  14.
     `(#5)' ci pu essere un numero finale tra parentesi nei kernel pi
     recenti (forse dopo il 2.2.9).   il numero della regola che ha
     causato la registrazione del pacchetto.


  Nei sistema Linux standard, questo output del kernel  catturato da
  klogd (il demone di registrazione del kernel) che lo passa poi al
  syslogd (il demone di registrazione di sistema).  Il file
  `/etc/syslog.conf' controlla il comportamento di syslogd, specificando
  una destinazione per ogni `facility' (nel nostro caso la facility 
  "kernel") e `livello' (per ipchains, il livello usato  "info").


  Per esempio, il mio /etc/syslog.conf (Debian) contiene due righe
  corrispondenti a `kern.info':



       kern.*                          -/var/log/kern.log
       *.=info;*.=notice;*.=warn;\
               auth,authpriv.none;\
               cron,daemon.none;\
               mail,news.none          -/var/log/messages




  Indica che i messaggi sono duplicati in `/var/log/kern.log' e in
  `/var/log/messages'.  Per maggiori dettagli, si veda `man
  syslog.conf'.


  4.1.4.3.  Manipolare il `Type Of Service'

  Nell'intestazione IP ci sono quattro bit raramente usati, detti bit
  Type of Service (TOS - Tipo Di Servizio).  Influenzano il modo in cui
  sono trattati i pacchetti; i quattro bit sono "Minimum Delay" (Ritardo
  Minimo), "Maximum Throughput" (Massima Velocit di Trasmissione),
  "Maximum Reliability" (Massima Affidabilit) e "Minimum Cost" (Minimo
  Costo).  Solo ad uno di questo bit  permesso di essere impostato.
  Rob van Nieuwkerk, l'autore del codice di "maltrattamento" TOS, ne
  parla in questi termini:


       Per me  importante specialmente il "Minimum Delay".  L'ho
       attivato per i pacchetti "interattivi" nel mio router
       (Linux) a monte.  Io sono dietro una connessione modem a
       33k6.  Linux prioritizza i pacchetti in 3 code.  In questo
       modo ottengo accettabili prestazioni interattive mentre fac
       cio dei meri download (potrebbe andare ancora meglio se non
       ci fosse una coda cos grande nel driver della seriale, ma
       ora la latenza  mantenuta sotto gli 1.5 secondi).



  Nota: ovviamente, non si ha controllo sui pacchetti in arrivo; si pu
  controllare la priorit solamente dei pacchetti che lasciano la
  propria macchina.  Per negoziare le priorit con l'altro capo della
  connessione, deve essere usato un protocollo tipo RSVP (non so niente
  in proposito, quindi non chiedete a me).



  L'uso pi comune  di impostare le connessioni di controllo di telnet
  e ftp a "Minimum Delay" e quelle dati FTP a "Maximum Throughput".  Ci
  pu essere fatto come segue:



       ipchains -A output -p tcp -d 0.0.0.0/0 telnet -t 0x01 0x10
       ipchains -A output -p tcp -d 0.0.0.0/0 ftp -t 0x01 0x10
       ipchains -A output -p tcp -s 0.0.0.0/0 ftp-data -t 0x01 0x08





  L'opzione `-t' accetta altri due parametri addizionali, entrambi in
  esadecimale.  Questi permettono di far giochetti complessi con i bit
  TOS: con la prima maschera  fatta l'AND con i TOS correnti del
  pacchetto, e poi del risultato viene fatta l'XOR con la seconda.  Se 
  troppo confuso, allora si usi semplicemente la tabella seguente:



       Nome del TOS            Valore          Uso Tipico

       Minimum Delay           0x01 0x10       ftp, telnet
       Maximum Throughput      0x01 0x08       ftp-data
       Maximum Reliability     0x01 0x04       snmp
       Minimum Cost            0x01 0x02       nntp




  Andi Kleen puntualizza quanto segue:

       Forse potrebbe essere utile aggiungere riferimenti al para
       mentro txqueuelen di ifconfig alla discussione dei bit TOS.
       La lunghezza predefinita della coda del dispositivo, rego
       lata per le schede ethernet, per i modem  troppo lunga e fa
       s che lo schedulatore a 3 bande (le cui code sono basate
       sui TOS) funzioni in maniera subottima.   una buona idea
       impostarla ad un valore tra 4 e 10 per le connessioni via
       modem o ISDN a canale b singolo.  Questo  un problema dei
       kernel 2.0 e 2.1, ma mentre nei 2.1 esiste un'opzione di
       ifconfig (nei nettools recenti), nei 2.0  necessaria una
       patch ai sorgenti dei device driver.


  Quindi, per vedere i massimi benefici dalla manipolazione dei TOS
  nella connessioni PPP via modem, si usi `ifconfig $1 txqueuelen' nel
  proprio script /etc/ppp/ip-up.  Il numero da usare dipende dalla
  velocit del modem e dalla dimesione del buffer nel modem; Andi ci
  mostra ancora la direzione da seguire:


       Il miglior valore per una data configurazione si determina
       sperimentalmente.  Se la coda  troppo corta in un router
       allora saranno scartati i pacchetti.  Naturalmente si trag
       gono benefici anche senza la riscrittura dei TOS, solo che
       la riscrittura dei TOS aiuta a dare beneficio ai programmi
       non cooperativi (tutti i programmi standard di Linux sono
       cooperativi).





  4.1.4.4.  Marcare un pacchetto

  Ci permette una complessa e potente iterazione con la nuova
  implementazione di `Quality of Service' di Alexey Kuznetsov e con il
  forwading basato sulla marcatura degli ultimi kernel della serie 2.1.
  Dar maggiori informazioni non appena ne verr in possesso.  Questa
  opzione  ignorata nei kernel della serie 2.0.


  4.1.4.5.  Operazioni su un'intera catena

  Una caratteristica molto utile di ipchains  la possibilit di
  raggruppare regole collegate dentro catene.  Si possono chiamare le
  catene come si vuole a meno che il nome non sia in conflitto con le
  catene (input, output e forward) o gli obiettivi (MASQ, REDIRECT,
  ACCEPT, DENY, REJECT o RETURN) predefiniti.  Suggerisco di evitare in
  toto l'uso di etichette in maiuscolo, in quanto le potrei usare per
  estensioni future.  Il nome della catena pu essere lungo fino a 8
  caratteri.


  4.1.4.6.  Creare una nuova catena

  Suvvia creiamo una nuova catena!  Poich sono un tipo con un sacco di
  immaginazione, la chiamer test.



       # ipchains -N test
       #





  Tutto qua.  Ora le si possono mettere dentro le regole come spiegato
  in precedenza.


  4.1.4.7.  Cancellare una catena

  Anche cancellare una catena  semplice.



       # ipchains -X test
       #




  Perch `-X'?  Beh, tutte le altre lettere buone erano gi occupate.


  Ci sono un paio di restrizioni sulla cancellazione di una catena: deve
  essere vuota (si veda ``Svuotare una catena'' nel seguito) e non deve
  essre l'obiettivo di nessuna regola.  Non  possibile cancellare
  nessuna delle tre catene predefinite.


  4.1.4.8.  Svuotare una catena

  C' un modo semplice per svuotare una catena di tutte le regole,
  usando il comando `-F' (flush).


               # ipchains -F forward
               #





  Se non si specifica una catena, allora saranno svuotate tutte le
  catene.


  4.1.4.9.  Elencare le regole in una catena

  Si possono elencare tutte le regole in una catena usando il comando
  `-L' (list).



       # ipchains -L input
       Chain input (refcnt = 1): (policy ACCEPT)
       target     prot opt    source                destination           ports
       ACCEPT     icmp -----  anywhere              anywhere              any
       # ipchains -L test
       Chain test (refcnt = 0):
       target     prot opt    source                destination           ports
       DENY       icmp -----  localnet/24           anywhere              any
       #





  Il valore di `refcmt' mostrato per test  il numero di regole che
  hanno test come loro obiettivo.  Deve essere zero (e la catena essere
  vuota) prima che si possa cancellarla.


  Se  omesso il nome della catena, sono elencate tutte le catene, anche
  quelle vuote.


  Ci sono tre opzioni che possono accompagnare `-L'.  L'opzione `-n'
  (numeric)  molto utile in quanto previene ipchains dal tentativo di
  ricercare gli indirizzi IP, che (se si usa un DNS come fanno molti)
  causer parecchio ritardo se il proprio DNS non  configurato
  correttamente, o si sono filtrate tutte le richieste DNS.  Inoltre fa
  s che le porte siano mostrate come numeri piuttosto che con i loro
  nomi.


  L'opzione `-v' mostra tutti i dettagli delle regole, come i contatori
  di pacchetti e byte, le maschere TOS, l'interfaccia e la marcatura dei
  pacchetti.  Diversamente questi valori sono omessi.  Per esempio:



       # ipchains -v -L input
       Chain input (refcnt = 1): (policy ACCEPT)
        pkts bytes target     prot opt   tosa tosx  ifname    mark        source                destination           ports
          10   840 ACCEPT     icmp ----- 0xFF 0x00  lo                    anywhere              anywhere              any






  Si noti che i contatori di pacchetti e byte sono mostrati usando i
  suffissi `K', `M' o `G' rispettivamente per 1000, 1000000 e
  1000000000.  Usando l'opzione `-x' (espandi i numeri) verranno
  mostrati i numeri interi, senza preoccuparsi di quanto grandi siano.


  4.1.4.10.  Azzerare i contatori

   utile poter azzerare i contatori.  Ci pu essere fatto con
  l'opzione `-Z' (zero counters).  Per esempio:



       # ipchains -v -L input
       Chain input (refcnt = 1): (policy ACCEPT)
        pkts bytes target     prot opt   tosa tosx  ifname    mark        source                destination           ports
          10   840 ACCEPT     icmp ----- 0xFF 0x00  lo                    anywhere              anywhere              any
       # ipchains -Z input
       # ipchains -v -L input
       Chain input (refcnt = 1): (policy ACCEPT)
        pkts bytes target     prot opt   tosa tosx  ifname    mark        source                destination           ports
           0     0 ACCEPT     icmp ----- 0xFF 0x00  lo                    anywhere              anywhere              any
       #





  Il problema con questo approccio  che talvolta serve sapere il valore
  dei contatori un attimo prima di azzerarli.  Nell'esempio precedente,
  tra i comandi `-L' e `-Z' potrebbero essere passati degli altri
  pacchetti.  Per questa ragione, si possono usare `-L' and `-Z'
  assieme, per azzerare i contatori mentri li si legge.
  Sfortunatamente, se si fa cos, non si pu operare su una sola catena:
  si devono mostrare e azzerare tutte le catene in una volta.



       # ipchains -L -v -Z
       Chain input (policy ACCEPT):
        pkts bytes target     prot opt   tosa tosx  ifname    mark        source                destination           ports
          10   840 ACCEPT     icmp ----- 0xFF 0x00  lo                    anywhere              anywhere              any

       Chain forward (refcnt = 1): (policy ACCEPT)
       Chain output (refcnt = 1): (policy ACCEPT)
       Chain test (refcnt = 0):
           0     0 DENY       icmp ----- 0xFF 0x00  ppp0                  localnet/24           anywhere              any
       # ipchains -L -v
       Chain input (policy ACCEPT):
        pkts bytes target     prot opt   tosa tosx  ifname    mark        source                destination           ports
          10   840 ACCEPT     icmp ----- 0xFF 0x00  lo                    anywhere              anywhere              any

       Chain forward (refcnt = 1): (policy ACCEPT)
       Chain output (refcnt = 1): (policy ACCEPT)
       Chain test (refcnt = 0):
           0     0 DENY       icmp ----- 0xFF 0x00  ppp0                  localnet/24           anywhere              any
       #





  4.1.4.11.  Impostare la tattica

  Si  visto cosa succede quando un pacchetto raggiunge la fine di una
  catena predefinita quando si  discusso come un pacchetto cammina
  attraverso una catena in ``Specificare un obiettivo''.  In questo
  caso, la tattica (policy) di una catena determina il destino del
  pacchetto.  Solo le catene predefinite (input, output e forward) hanno
  delle tattiche, poich se un pacchetto cade fuori dalla fine di una
  catena definita dall'utente, la traversata riprende nelle catena
  precedente.


  La tattica pu essere una qualsiasi dei primi quattro obiettivi
  speciali: ACCEPT, DENY, REJECT o MASQ.  MASQ  valida solamente per la
  catena `forward'.


  Inoltre  importante notare che un obiettivo RETURN in una regola in
  una delle catene predefinite  utile per stabilire esplicitamente la
  tattica di una catena quando un pacchetto soddisfa una regola.


  4.1.5.  Operazioni sul masquerading

  Ci sono diversi parametri per l'IP Masquerading con i quali si pu
  giocare.  Sono inglobati in ipchains perch non valeva la pena
  scrivere uno strumento separato (anche se questa cosa cambier).


  Il comando per il masquerading IP  `-M', e pu essere combinato con
  `-L' per mostrare l'elenco delle connessioni attualmente mascherate, o
  con `-S' per impostare i parametri del masquerading.


  Il comando `-L' pu essere accompagnato da `-n' (mostra i numeri
  invece dei nomi degli host e delle porte) o `-v' (mostra i delta nelle
  sequenze di numeri per le connessioni mascherate, nel caso importi
  qualcosa).


  Il comando `-S' dovrebbe essere seguito da tre valori di timeout in
  secondi: per le sessioni TCP, per le sessioni TCP dopo un pacchetto
  FYN e per i pacchetti UDP.  Se non si vuole cambiare uno di questi tre
  valori, semplicemente si specifichi `0' come valore.


  I valori predefiniti sono elencati in
  `/usr/src/linux/include/net/ip_masq.h', e rispettivamente sono 15
  minuti, 2 minuti e 5 minuti.


  Il valore pi comune da cambiare  il primo, per FTP (si veda ``Incubi
  da FTP'' pi avanti).


  Si noti il problema nell'impostazione dei timeout descritto in ``Non
  riesco a impostare i timeout del masquerading!''.


  4.1.6.  Controllare un pacchetto

  Talvolta si vuole vedere cosa succede quando un certo pacchetto entra
  nella propria macchina, ad esempio per fare il debug delle catene
  firewall.  ipchains ha il comando `-C' per permetterlo, che usa le
  stesse routine che usa il kernel per la diagnosi dei pacchetti reali.


  Si specifica su quale catena verificare il pacchetto facendo seguire
  l'argomento di `-C' con il suo nome.  Mentre il kernel inizia la
  trasversata sempre dalla catena input, output oppure forward, per gli
  scopi di test si ha il permesso di cominciare la traversata da
  qualsiasi catena.


  I dettagli del `pacchetto' sono specificati usando le stessa sintassi
  usata per specificare le regole firewall.  In particolare, sono
  obbligatori un protocollo (`-p'), un indirizzo di provenienza (`-s'),
  un indirizzo di destinazione (`-d') e un'interfaccia (`-i').  Se il
  protocollo  TCP o UDP, allora devono essere specificati un unico
  indirizzo di provenienza ed un unico indirizzo di destinazione, mentre
  devono essere specificati un tipo e un codice ICMP per il protocollo
  ICMP (a meno che non sia specificata l'opzione `-f' per indicare una
  regola sui frammenti, nel qual caso queste opzioni sono illegali).


  Se il protocollo  TCP (e non  specificata l'opzione `-f' ), pu
  essere specificata l'opzione `-y' per indicare che il pacchetto di
  test avr il bit SYN impostato.


  Ecco qui un esempio di verifica di un pacchetto SYN TCP dalla porta
  60000 di 192.168.1.1 alla porta www di 192.168.1.2, in arrivo
  sull'interfaccia eth0 e che entra nella catena `input' (questa  la
  classica inizializzazione di una connessione WWW):



       # ipchains -C input -p tcp -y -i eth0 -s 192.168.1.1 60000 -d 192.168.1.2 www
       packet accepted
       #





  4.1.7.  Pi regole in una volta sola e controllare cosa succede

  Talvolta un'unica riga di comando pu aver effetto su pi regole.  Ci
  capita in due situazioni.  La prima: se si pu specificare un nome di
  host che viene risolto (usando il DNS) in diversi indirizzi IP,
  ipchains si comporter come se si fossero digitati pi comandi, uno
  per ogni combinazione di indirizzi.


  Quindi se il nome di host `www.foo.com' viene risolto in tre indirizzi
  IP e il nome di host `www.bar.com' viene risolto in due indirizzi IP,
  allora il comando `ipchains -A input -j reject -s www.bar.com -d
  www.foo.com' aggiunger sei regole alla catena input.


  Un altro modo per far s che ipchains effettui azioni multiple  di
  usare l'opzione `-b' (bidirezionale).  Questa opzione fa s che
  ipchains si comporti come se si fosse digitato due volte il comando,
  la seconda volta scambiando gli argomenti di `-s' e `-d'.  Quindi per
  evitare l'inoltro sia da che per 192.168.1.1, si potrebbe fare quanto
  segue:



       # ipchains -b -A forward -j reject -s 192.168.1.1
       #





  Personalmente, non gradisco molto l'opzione `-b'; se si vuole qualcosa
  di pi utile si veda ``Usare ipchains-save'' pi avanti.


  L'opzione `-b' pu essere usato con i comandi di inserimento (`-I'),
  cancellazione (`-D') (ma non le varianti che accettano un numero di
  regola), aggiunta (`-A') e verifica (`-C').


  Un'altra opzione utile  `-v' (verboso) che mostra esattamente quel
  che ipchains sta facendo con il comando dato.   utile se si ha a che
  fare con comandi che possono evere effetto su pi regole.  Per
  esempio, controlliamo il comportamento dei frammenti tra 192.168.1.1 e
  192.168.1.2.



       # ipchains -v -b -C input -p tcp -f -s 192.168.1.1 -d 192.168.1.2 -i lo
         tcp opt   ---f- tos 0xFF 0x00  via lo    192.168.1.1  -> 192.168.1.2    * ->   *
       packet accepted
         tcp opt   ---f- tos 0xFF 0x00  via lo    192.168.1.2  -> 192.168.1.1    * ->   *
       packet accepted
       #





  4.2.  Un utile esempio

  Ho una connessione PPP in dialup (-i ppp0).  Mi scarico le news (-p
  TCP -s news.virtual.net.au nntp) e la posta (-p TCP -s
  mail.virtual.net.au pop-3) ogni volta che mi connetto.  Uso il metodo
  FTP di Debian per aggiornare regolarmente la mia macchina (-p TCP -y
  -s ftp.debian.org.au ftp-data).  Navigo in rete attraverso il proxy
  del mio ISP mentre tutta la roba precedente  in funzione (-p TCP -d
  proxy.virtual.net.au 8080), ma odio le pubblicit da doubleclick.net
  nel Dilbert Archive (-p TCP -y -d 199.95.207.0/24 e -p TCP -y -d
  199.95.208.0/24).


  Non mi preoccupo della gente che prova a fare ftp nella mia macchina
  mentre sono online (-p TCP -d $LOCALIP ftp), ma non voglio che nessuno
  da fuori pretenda di avere un indirizzo IP della mia rete interna (-s
  192.168.1.0/24).  Ci  comunemente detto IP spoofing, e c' un modo
  migliore per proteggersi nei kernel 2.1 e superiori: si veda ``Come
  proteggersi dall'IP spoofing?''.


  Questa configurazione  piuttosto semplice, perch attualmente non ci
  sono altre macchine nella mia rete interna.


  Non voglio che nessun processo locale (ie. Netscape, lynx ecc.) si
  connetta a doubleclick.net:



       # ipchains -A output -d 199.95.207.0/24 -j REJECT
       # ipchains -A output -d 199.95.208.0/24 -j REJECT
       #





  Ora voglio impostare le priorit in diversi pacchetti in uscita (non
  ne vedo l'utilit di farlo nei pacchetti in ingresso).  Poich ho
  parecchie di questo regole, ha senso metterle tutte in un unica
  catena, chiamata ppp-out.



       # ipchains -N ppp-out
       # ipchains -A output -i ppp0 -j ppp-out
       #





  Ritardo minimo per il traffico web e per telnet.



       # ipchains -A ppp-out -p TCP -d proxy.virtual.net.au 8080 -t 0x01 0x10
       # ipchains -A ppp-out -p TCP -d 0.0.0.0 telnet -t 0x01 0x10
       #





  Minimo costo per i dati ftp, nntp e pop-3:



       # ipchains -A ppp-out -p TCP -d 0.0.0.0/0 ftp-data -t 0x01 0x02
       # ipchains -A ppp-out -p TCP -d 0.0.0.0/0 nntp -t 0x01 0x02
       # ipchains -A ppp-out -p TCP -d 0.0.0.0/0 pop-3 -t 0x01 0x02
       #





  Ci sono alcune restrizioni sui pacchetti in ingresso dall'interfaccia
  ppp0: creo una catena chiamata `ppp-in':



       # ipchains -N ppp-in
       # ipchains -A input -i ppp0 -j ppp-in
       #





  Ora, nessun pacchetto in ingresso da ppp0 dovrebbe affermare un
  indirizzo di provenienza di 192.168.1.*, e quindi li registro e li
  proibisco:



       # ipchains -A ppp-in -s 192.168.1.0/24 -l -j DENY
       #





  Permetto l'ingresso solo di pacchetti UDP per il DNS (eseguo un
  caching nameserver che inoltra tutte le richieste a 203.29.16.1,
  quindi mi aspetto risposte DNS solo da loro), ftp entrante e ritorno
  di dati ftp (che dovrebbero andare solo verso una porta soprao la
  1023, ma non verso le porte X11 attorno a 6000).



       # ipchains -A ppp-in -p UDP -s 203.29.16.1 -d $LOCALIP dns -j ACCEPT
       # ipchains -A ppp-in -p TCP -s 0.0.0.0/0 ftp-data -d $LOCALIP 1024:5999 -j ACCEPT
       # ipchains -A ppp-in -p TCP -s 0.0.0.0/0 ftp-data -d $LOCALIP 6010: -j ACCEPT
       # ipchains -A ppp-in -p TCP -d $LOCALIP ftp -j ACCEPT
       #





  Per finire, vanno bene i pacchetti local-to-local:



       # ipchains -A input -i lo -j ACCEPT
       #





  ora, la mia tattica di default per la catena input  DENY, quindi
  qualsiasi altra cosa viene scartata:



       # ipchains -P input DENY
       #





  NOTA: non imposterei le mie catene in questo ordine, in quanto i
  pacchetti potrebbero passare mentre le imposto.  La cosa pi sicura 
  di impostare per prima cosa la tattica a DENY, poi inserire le regole.
  Naturalmente, se le proprie regole necessitano di ricerche DNS per
  risolvere i nomi di host, potrebbero esserci problemi.


  4.2.1.  Usare ipchains-save

  Impostare le catene firewall proprio nel modo in cui le si vuole, e
  poi provare a ricordarsi i comandi usati in modo da porterlo fare
  anche la volta successiva  una cosa penosa.


  ipchains-save  uno script che legge l'impostazione corrente delle
  catene e la salva in un file.  Per ora vi lascio in fremente attesa di
  scoprire cosa fa ipchains-restore.


  ipchains-save pu salvare una catena o tutte le catene (se non 
  specificato un nome di catena).  La sola opzione attualmente permessa
   `-v' che stampa le regole (in stderr) mentre le salva.  Per le
  catene input, output e forward  salvata anche la tattica.


       # ipchains-save > my_firewall
       Saving `input'.
       Saving `output'.
       Saving `forward'.
       Saving `ppp-in'.
       Saving `ppp-out'.
       #





  4.2.2.  Usare ipchains-restore

  ipchains-restore ripristina le catene salvate con ipchains-save.
  Accetta due opzioni: `-v' che descrive ogni regola che viene aggiunta,
  e `-f' che forza lo svuotamento delle catene definite dall'utente se
  esistono, come descritto nel seguito.


  Se nell'input  trovata una catena definita dall'utente, ipchains-
  restore controlla se esiste gi.  Se esiste, sar chiesto se la catena
  debba essere svuotata (ripulita da tutte le regole) o se si debba
  saltare il ripristino di questa catena.  Se si specifica `-f' in riga
  di comando, non sar chiesto niente; la catena sar ripulita.


  Per esempio:



       # ipchains-restore < my_firewall
       Restoring `input'.
       Restoring `output'.
       Restoring `forward'.
       Restoring `ppp-in'.
       Chain `ppp-in' already exists. Skip or flush? [S/f]? s
       Skipping `ppp-in'.
       Restoring `ppp-out'.
       Chain `ppp-out' already exists. Skip or flush? [S/f]? f
       Flushing `ppp-out'.
       #





  5.  Miscellanea

  Questa sezione contiene tutte le informazioni e le FAQ che non sono
  riuscito a sistemare nella struttura precedente.


  5.1.  Come organizzare le proprie regole firewall

  Questa domanda richiede qualche riflessione.  Si pu provare ad
  organizzarle per ottimizzare la velocit (minizzare il numero di
  verifiche di regole per i pacchetti pi comuni) o per incrementare la
  gestibilit.


  Se si ha una connessione intermittente, diciamo una connessione PPP,
  si pu voler impostare la prima regola nella catena input a `-i ppp0
  -j DENY' al boot del sistema, e poi mettere qualcosa di simile a
  questo nello script ip-up:

       # Ricrea la catena `ppp-in'.
       ipchains-restore -f < ppp-in.firewall

       # Rimpiazza la regola DENY con un salto alla catena di gestione del ppp.
       ipchains -R input 1 -i ppp0 -j ppp-in





  Lo script ip-down potrebbe essere cos:



       ipchains -R input 1 -i ppp0 -j DENY






  5.2.  Cosa non filtrare

  Ci sono alcune cosette di cui bisogna essere consci prima di
  cominciare a filtrare tutto quello che non si vuole.


  5.2.1.  Pacchetti ICMP

  I pacchetti ICMP sono usati (tra le altre cose) per indicare
  fallimenti negli altri protocolli (come TCP o UDP).  In particolare i
  pacchetti `destination-unreachable' (destinazione irraggiungibile).
  Bloccare questi pacchetti significa che non si riceveranno mai gli
  errori `Host unreachable' o `No route to host'; qualsiasi connessione
  semplicemente attender una riposta che non arriver mai.  Ci 
  irritante, ma raramente fatale.


  Un problema peggiore  la regola dei pacchetti ICMP nel MTU discovery.
  Tutte le buone implementazioni TCP (inclusa quella di Linux) usano MTU
  discovery per provare a capire quale sia il pacchetto pi grosso che
  pu arrivare a destinazione senza essere frammentato (la
  frammentazione abbassa le prestazioni. specialmente quando vengono
  occasionalmente persi dei frammenti). MTU discovery lavora inviando
  pacchetti con il bit "Don't Fragment" impostato, inviando poi
  pacchetti pi piccoli se riceve un pacchetto ICMP che indica
  "Fragmentation needed but DF set" (`fragmentation-needed').  Questo 
  un pacchetto tipo `destination-unreachable', e se non viene mai
  ricevuto l'host locale non riduce l'MTU e le prestazioni saranno
  abissali o non esistenti.


  Si noti che  comune bloccare tutti i messaggi redirect ICMP (tipo 5);
  possono essere usati per manipolare l'instradamento (sebbene gli stack
  IP buoni abbiano delle protezioni), e quindi sono spesso visti un come
  po' rischiosi.


  5.2.2.  Connessioni TCP al DNS (nameserver)

  Se si sta provando a bloccare tutte le connessioni TCP in uscita, si
  ricordi che il DNS non sempre usa UDP; se la risposta dal server
  supera i 512 byte, il client usa una connessione TCP (ancora diretta
  alla porta numero 53) per ottenere i dati.


  Ci pu essere una trappola perch il DNS `praticamente funzioner' se
  si disabilitano tali trasferimenti TCP; comunque se lo si fa possono
  capitare strani lunghi ritardi e altri occasionali problemi DNS.


  Se le proprie interrogazioni DNS sono sempre dirette alla stessa fonte
  esterna (sia direttamente usando una riga nameserver in
  /etc/resolv.conf oppure usando un caching nameserver in modalit
  forward), allora si devono permettere solo le connessioni TCP alla
  porta domain di quel nameserver dalla porta domain locale (se si sta
  usando un caching nameserver) o da una porta pi alta (> 1023) se si
  sta usando /etc/resolv.conf.


  5.2.3.  Incubi da FTP

  FTP presenta un classico problema del filtraggio dei pacchetti.  FTP
  ha due modalit; quella tradizionale  detta modalit attiva e quella
  pi recente  detta modalit passiva.  I web browser solitamente usano
  la modalit passiva, mentre i programmi per FTP a riga di comando
  solitamente usano la modalit attiva.


  In modalit attiva, quando il sito remoto vuole inviare un file
  (oppure anche il risultato di un comando ls o dir) apre una
  connessione TCP verso la macchina locale.  Ci significa che non si
  possono filtrare queste connessioni TCP senza rompere l'FTP attivo.


  Se si ha la possibilit di usare la modalit passiva, allora bene; la
  modalit passiva crea connessioni dati dal client al server, anche per
  i dati in ingresso.  Altrimenti,  raccomandabile permettere
  connessioni TCP solamente verso porte superiori alla 1024 ma non tra
  6000 e 6010 (la 6000  usata per X-Windows).


  5.3.  Filtrare i Ping della Morte

  La macchine Linux sono ora immuni ai famosi Ping della Morte, che
  implicano l'invio di un pacchetto ICMP illegalmente grande che fa
  andare in overflow i buffer nello stack TCP del ricevente con effetti
  devastanti.


  Se vi vogliono proteggere macchine che potrebbero essere ancora
  vulnerabili, semplicemente si blocchino i frammenti ICMP.  Normalmente
  i pacchetti ICMP non sono abbastanza grandi da richiedere
  frammentazione, e quindi non si romper niente se non i grossi ping.
  Ho sentito (non confermato) che ad alcuni sistemi basta anche solo
  l'ultimo frammento di un pacchetto ICMP fuori misura per corromperli,
  e quindi non  raccomandabile bloccare solo il primo frammento.


  Sebbene i programmi exploit che ho visto usano tutti ICMP, non c'
  ragione per non usare frammenti TCP o UDP (o di un protocollo
  sconosciuto) per questi attacchi, e quindi bloccare i frammenti ICMP 
  solamente una soluzione temporanea.


  5.4.  Filtrare Teardrop e Bonk

  Teardrop e Bonk sono due attacchi (rivolti principalmente contro
  macchine Microsoft Windows NT) che si basano sulla sovrapposizione dei
  frammenti.  Le opzioni sono di far s che il proprio router Linux
  effettui la deframmentazione oppure disabilitare tutti i frammenti
  verso le macchine vulnerabili.
  5.5.  Filtrare i Fragment Bomb

  Si dice che alcuni stack TCP meno affidabili hanno problemi a gestire
  un largo numero di frammenti di pacchetti quando non ricevono mai
  tutti i frammenti.  Linux non ha questo problema.  Si possono filtrare
  tutti i frammenti (il che interrompe pure il loro uso legittimo)
  oppure compilare il kernel attivando `IP: always defragment' (solo se
  la propria macchina Linux  il solo instradamento possibile per questi
  pacchetti).


  5.6.  Cambiare le regole firewall

  Ci sono alcune questioni temporali coinvolte nella modifica delle
  regole firewall.  Se non si fa attenzione, si possono lasciar passare
  pacchetti mentre si fanno le modifiche.  L'approccio pi semplice  il
  seguente:



       # ipchains -I input 1 -j DENY
       # ipchains -I output 1 -j DENY
       # ipchains -I forward 1 -j DENY

       ... fare le modifiche ...

       # ipchains -D input 1
       # ipchains -D output 1
       # ipchains -D forward 1
       #




  Ci scarta tutti i pacchetti per la durata delle modifiche.


  Se le proprie modifiche sono ristrette ad una sola catena, si potrebbe
  creare una nuova catena con le nuove regole e poi rimpiazzare (`-R')
  la regola che punta alla vecchia catena con quella che punta a quella
  nuova: poi si pu cancellare la vecchia catena.  Questo rimpiazzo sar
  atomico.


  5.7.  Come proteggersi dall'IP Spoofing?

  L'IP spoofing  una tecnica nella quale un host invia pacchetti che
  affermano provenire da un altro host.  Poich il filtraggio dei
  pacchetti prende decisioni basandosi su questo indirizzo di
  provenienza, l'IP spoofing  utile solo con filtri di pacchetti un po'
  stupidi.   usato anche per nascondere l'identit dell'attaccante
  usando attacchi SYN, Teardrop, Ping della Morte e simili (non ci si
  preoccupi se non si sa cosa sono).


  Il miglior modo per proteggersi dall'IP spoofing  chiamato Source
  Address Verification (Verifica dell'Indirizzo di Provenienza), ed 
  fatto dal codice di instradamento e non dal firewall.  Si cerchi il
  file /proc/sys/net/ipv4/conf/all/rp_filter.  Se esiste, allora
  attivare il Source Address Verification ad ogni avvio  la giusta
  soluzione.  Per farlo, si inseriscano le righe seguenti da qualche
  parte nei propri script di inizializzazione, prima che sia
  inizializzata qualsiasi interfaccia di rete:



  # Questo  il metodo migliore: attivare il Source Address Verification
  # ed avere cos la protezione dallo spoof protection su tutte le
  # intefacce correnti e future.
  if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
    echo -n "Setting up IP spoofing protection..."
    for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
        echo 1 > $f
    done
    echo "done."
  else
    echo PROBLEMS SETTING UP IP SPOOFING PROTECTION.  BE WORRIED.
    echo "CONTROL-D will exit from this shell and continue system startup."
    echo
    # Start a single user shell on the console
    /sbin/sulogin $CONSOLE
  fi





  Se non si pu fare cos, si possono inserire manualmente delle regole
  per proteggere ogni interfaccia.  Ci richiede conoscenza su qualsiasi
  interfaccia.  I kernel 2.1 automaticamente rifiutano i pacchetti che
  affermano provenire dagli indirizzi 127.* (riservati per l'interfaccia
  loopbak locale lo).


  Per esempio, facciamo il caso che ci siano tre interfacce: eth0, eth1
  e ppp0.  Possiamo usare ifconfig per conoscere l'indirizzo e la
  netmask delle interfacce.  Diciamo che eth0 sia attaccata alla rete
  192.168.1.0 con netmask 255.255.255.0, eth1 sia attaccata alla rete
  10.0.0.0 con netmask 255.0.0.0 e che ppp0 connetta con Internet (dov'
  permesso qualsiasi indirizzo tranne quelli riservati come indirizzi IP
  privati).  Inseriremo allora le seguenti regole:



       # ipchains -A input -i eth0 -s ! 192.168.1.0/255.255.255.0 -j DENY
       # ipchains -A input -i ! eth0 -s 192.168.1.0/255.255.255.0 -j DENY
       # ipchains -A input -i eth1 -s ! 10.0.0.0/255.0.0.0 -j DENY
       # ipchains -A input -i ! eth1 -s 10.0.0.0/255.0.0.0 -j DENY
       #





  Questo approccio non  buono quanto l'approccio con il Source Address
  Verification, perch se cambia la propria rete, si devono cambiare le
  regole firewall.


  Se si usa un kernel della serie 2.0, si pu voler proteggere anche
  l'interfacia loopback, usando una regola come questa:



       # ipchains -A input -i ! lo -s 127.0.0.0/255.0.0.0 -j DENY
       #






  5.8.  Progetti avanzati

  Ho scritto una libreria (`libfw') che funziona dello spazio utente
  inclusa nei sorgenti.  Usa la possibilit offerta da IP Chains 1.3 e
  superiori di copiare un pacchetto nello spazio utente (usando
  l'opzione di configurazione IP_FIREWALL_NETLINK).


  Il valore marcato pu essere usato per specificare il paramentro
  Quality of Service per i pacchetti o per specificare come fare
  l'inoltro di porta dei pacchetti.  Non li ho mai usati, ma se si vuole
  scrivere qualcosa in proposito, mi si contatti.


  Usando questa libreria possono essere implementate nello spazio utente
  cose come la stateful inspection (preferisco il termine dynamic
  firewalling).  Un'altra idea interessante  il controllo dei pacchetti
  su base utente facendo delle ricerche in un demone nello spazio
  utente.  Questo dovrebbe essere abbastanza facile.


  5.8.1.  SPF: Stateful Packet Filtering

  ftp://ftp.interlinx.bc.ca/pub/spf <ftp://ftp.interlinx.bc.ca/pub/spf>
   il sito del progetto SPF di Brian Murrell, che fa il tracking delle
  connessioni nello spazio utente.  Aggiunge sicurezza significativa per
  siti a bassa banda.


  Attualmente c' poca documentazione, ma ecco qui un post nella mailing
  list nel quale Brian spiega un po' di cose:




       > Credo che faccia esattamente quello che voglio: installare un regola
       > temporanea di "arretramento" ("backward" rule) per permettere
       > l'ingresso dei pacchetti come fossero una risposta ad un richiesta
       > in uscita.

       Yup,  esattamente quello che fa.  Pi protocolli supporta, pi la
       regola di "arretramento" funziona bene.  Attualmente ha il supporto
       (vado a memoria, quindi scusate qualsiasi errore o omissione) per FTP
       (sia attivo che passivo, in ingresso e in uscita), RealAudio,
       traceroute, ICMP e ICQ basilare (ingresso da un server ICQ e
       connessioni TCP dirette, ma non c' ancora il supporto per le
       connessioni TCP dirette secondarie per altre cose come il
       trasferimento di file, ecc.).

       >  un rimpiazzo per ipchains o un supplemento?

        un supplemento.  Penso a ipchains come al motore per permettere o
       prevenire ai pacchetti di viaggiare attraverso la macchina Linux.  SPF
        il pilota che monitorizza costantemente il traffico e dice a
       ipchains come cambiare le sue tattiche per rispondere ai cambiamenti
       nel traffico.





  5.8.2.  L'ftp-data hack di Michael Hasenstein

  Michael Hasenstein della SuSE ha scritto una patch per il kernel che
  aggiunge a ipchains il tracking delle connessioni ftp.  Attualmente
  pu essere trovata a http://www.csn.tu-chemnitz.de/~mha/patch.ftp-
  data-2.gz <http://www.csn.tu-chemnitz.de/~mha/patch.ftp-data-2.gz>


  5.9.  Estensioni future

  Il firewalling ed il NAT sono in fase di riprogettazione per il 2.3.
  I piani e le discussioni sono disponibili nell'archivio delle liste
  netdev e ipchains-dev.  Queste estensioni dovrebbero chiarire
  parecchie questioni insolute sull'usabilit (veramente, il firewalling
  e il masquerading non dovrebbero essere cos difficili), e
  permetteranno la crescita di un firewalling maggiormente flessibile.


  6.  Problemi comuni


  6.1.  ipchains -L si pianta!

  Probabilmente si stanno bloccando le ricerche DNS; alla fine andr in
  timeout.  Si provi a passare l'opzione `-n' a ipchains, che sopprime
  la risoluzione dei nomi.



  6.2.  Masquerading/Forwarding non funziona!

  Ci si assicuri che sia abilitato l'inoltro dei pacchetti (nei kernel
  recenti  disabilitato per default, il che significa che i pacchetti
  non proveranno mai ad attraversare la catena `forward').  Si pu
  venirne a capo digitando (come root):



       # echo 1 > /proc/sys/net/ipv4/ip_forward
       #





  Se funziona, lo si pu mettere da qualche parte nei propri script di
  avvio cos che sia abilitato ogni volta; ovviamente  meglio impostare
  il proprio firewall prima di lanciare questo comando, altrimenti c'
  l'opportunit che scappino un po' di pacchetti.



  6.3.  -j REDIR non funziona!

  Si devono permettere i pacchetti di inoltro (si veda sopra) affinch
  funzioni il dirottamento; diversamente il codice di instradamento
  scarter i pacchetti.  Quindi se si sta usando solamente il
  dirottamento e non si usa il forwarding,  bene essere consci di
  questa cosa.


  Si noti che REDIR (sebbene sia nella catena input) non ha effetto
  sulle connessioni da un processo locale.


  6.4.  Non funzionano i caratteri jolly nelle interfacce!

  C' un bug nelle versioni 2.1.102 e 2.1.103 del kernel (e in alcune
  vecchie patch che ho prodotto) che faceva fallire i comandi ipchains
  che utilizzavano caratteri jolly per specificare interfacce (ad
  esempio -i ppp+).
  Ci  stato corretto nei kernel recenti e nella patch per il 2.0.34
  presente sul sito web.  Pu essere pure corretto a mano nei sorgenti
  del kernel modificando la riga 63 (pi o meno) di
  include/linux/ip_fw.h:



       #define IP_FW_F_MASK    0x002F  /* All possible flag bits mask   */





  Dovrebbe essere ``0x003F''.  Lo si corregga e si ricompili il kernel.


  6.5.  TOS non funziona!

  Questo  stato un mio errore: l'impostazione del campo Type of Service
  nei kernel dal 2.1.102 al 2.1.111 in realt non faceva niente.  Questo
  problema  stato corretto nel 2.1.112.


  6.6.  Non funzionano ipautofw e ipportfw!

  Per i 2.0.x,  vero; non ho il tempo per creare e mantenere una patch
  enorme per ipchains e ipautofw/ipportfw.


  Per i 2.1.x, si scarichi l'ipmasqadm di Juan Ciarlante da

  <htmlurl url="http://juanjox.linuxhq.com/"
          name="http://juanjox.linuxhq.com/">


  e lo si usi esattamente come si sarebbe usato ipautofw o ipportfw,
  tranne per il fatto che invece di ipportfw si usa ipmasqadm portfw, e
  invece di ipautofw si usa ipmasqadm autofw.


  6.7.  xosview si  rotto!

  Si aggiorni alla versione 1.6.0 o superiore, che non richiede nessuna
  regola firewall per i kernel 2.1.x.  Sembra che anche la release 1.6.1
  abbia questo problema; lo si segnali all'autore (non  un mio
  errore!).


  6.8.  Segmentation Fault con `-j REDIRECT'!

  Questo era un bug in ipchains versione 1.3.3.  Si aggiorni.



  6.9.  Non riesco ad impostare i timeout del masquerading!

  Ci  vero (per i kernel 2.1.x) fino al 2.1.123.  Nel 2.1.124, il
  tentativo di impostare i timeout del masquerading provoca un blocco
  del kernel (si modifichi return in ret = nella riga 1328 di
  net/ipv4/ip_fw.c).  Nel 2.1.125, funziona tutto.


  6.10.  Voglio dei firewall IPX!

  E cos molti altri, sembra.  Il mio codice gestisce solo IP,
  sfortunatamente.  D'altra parte c' anche qualcosa di buono: le cose
  per scrivere un firewall IPX ci sono tutte!  Basta semplicemente
  scrivere il codice; sar felice di aiutare dove possibile.


  7.  Un esempio pi serio

  Questo esempio  estratto dal tutorial scritto da me e Michael Neuling
  apparso in LinuxWorld nel Marzo 1999; non  il solo modo per risolvere
  il problema in esame, ma probabilmente  il pi semplice.  Spero lo si
  trovi interessante.



  7.1.  La situazione


    Rete interna con il masquerading (con diversi sistemi operativi)
     che chiameremo "GOOD".

    Server esposti in una rete separata (chiamata "DMZ" per
     Demilitarized Zone - Zona Demilitarizzata).

    Connessione PPP ad Internet (detta "BAD").




          Rete Esterna (BAD)
                  |
                  |
              ppp0|
           ---------------
           | 192.84.219.1|             Rete dei Server (DMZ)
           |             |eth0
           |             |----------------------------------------------
           |             |192.84.219.250 |             |              |
           |             |               |             |              |
           |192.168.1.250|               |             |              |
           ---------------          --------       -------        -------
                  | eth1            | SMTP |       | DNS |        | WWW |
                  |                 --------       -------        -------
                  |              192.84.219.128  192.84.219.129  192.84.218.130
                  |
         Rete Interna (GOOD)





  7.2.  Scopi


  Macchina per il filtraggio dei pacchetti:

      PING da/per qualsiasi rete
        Questo  veramente utile per sapere se una macchina  attiva.


      TRACEROUTE da/per qualsiasi rete
        Ancora, utile per la diagnotica.


      Accesso DNS
        Rende ping e DNS pi utili.


  All'interno di DMZ:


  Mail server

    SMTP verso l'esterno

    Accetta SMTP dall'interno e dall'esterno

    Accetta POP-3 dall'interno

  Name Server

    Invia richieste DNS all'esterno

    Accetta richieste DNS dall'interno, dall'esterno e dalla macchina
     per il filtraggio dei pacchetti.


  Server web

    Accetta connessioni HTTP dall'interno e dall'esterno

    Accesso rsync dall'interno


  Rete interna:

     Permettere WWW, ftp, traceroute, ssh verso l'esterno
        Queste sono cose abbastanza standard da permettere: alcuni
        iniziano permettendo di fare tutto alla rete interna, ma qui
        saremo un po' pi restrittivi.


      Permettere connessioni SMTP verso il mail server
        Ovviamente vogliamo poter inviare mail verso l'esterno.


      Permettere connessioni POP-3 verso il mail server
        Questo  il modo per leggere la propria posta.


      Permettere connessioni DNS verso il name server
        Vogliamo essere in grado di cercare i nomi esterni dei siti per
        il WWW, ftp, traceroute e ssh.


      Permettere connessioni rsync verso il server web
        Questo  il modo per sincronizzare il server web esterno con
        quello interno.


      Permettere connessioni WWW verso il server web
        Ovviamente, vogliamo poterci connettere al nostro server web
        esterno.


      Permettere il ping verso la macchina per il filtraggio dei pac
        chetti
        Questa  una pura cortesia: significa che si pu controllare se
        la macchina firewall  gi.





  7.3.  Prima del filtraggio dei pacchetti


    Anti-spoofing.


     Poich non c' nessun instradamento asimmetrico, semplicemente si
     pu attivare l'anti-spoofing per tutte le interfacce.




       # for f in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 1 > $f; done
       #





    Impostare le regole di filtraggio per proibire (DENY) tutto.


     Si permetter ancora il traffico locale su loopback, ma verr
     proibito tutto il resto.




       # ipchains -A input -i ! lo -j DENY
       # ipchains -A output -i ! lo -j DENY
       # ipchains -A forward -j DENY
       #





    Configurare le interfacce.


     Solitamente ci  fatto negli script di boot.  Ci si assicuri che i
     passi precedenti siano fatti prima che vengano configurate le
     interfacce, per prevenire l'infiltrazione di pacchetti prima di
     aver impostato le regole.


    Inserire moduli di masquerading per ciascun protocollo.

     Si devono inserire i moduli di masquerading per FTP, in modo che
     funzioni l'FTP sia attivo che passivo per la rete interna.




       # insmod ip_masq_ftp
       #





  7.4.  Filtraggio dei pacchetti per i pacchetti di passaggio

  Con il masquerading, la cosa migliore  filtrare nella catena forward.


  Si suddivida la catena forward in diverse catene utente a seconda
  delle interfacce di provenienza/destinazione; ci spacca in problema
  in tronconi gestibili pi facilmente.



       ipchains -N good-dmz
       ipchains -N bad-dmz
       ipchains -N good-bad
       ipchains -N dmz-good
       ipchains -N dmz-bad
       ipchains -N bad-good




  Una cosa comune da fare  di accettare (ACCEPT) errori ICMP standard,
  e quindi si crea una catena solo per loro.



       ipchains -N icmp-acc





  7.4.1.  Impostare i salti dalla catena forward

  Sfortunatamente,  nota solamente (nella catena forward) l'interfaccia
  d'uscita.  Quindi, per scoprire da quale interfaccia sia entrato un
  pacchetto useremo l'indirizzo di provenienza (l'anti spoofing previene
  indirizzi contraffatti).


  Si noti che si registra qualsiasi cosa che non soddisfa una di queste
  regole (ovviamente ci non dovrebbe mai succedere).



       ipchains -A forward -s 192.168.1.0/24 -i eth0 -j good-dmz
       ipchains -A forward -s 192.168.1.0/24 -i ppp0 -j good-bad
       ipchains -A forward -s 192.84.219.0/24 -i ppp0 -j dmz-bad
       ipchains -A forward -s 192.84.219.0/24 -i eth1 -j dmz-good
       ipchains -A forward -i eth0 -j bad-dmz
       ipchains -A forward -i eth1 -j bad-good
       ipchains -A forward -j DENY -l





  7.4.2.  Definire la catena icmp-acc

  I pacchetti che siano degli errori ICMP sono accettati, altrimenti il
  controllo passer alla catena chiamante.




       ipchains -A icmp-acc -p icmp --icmp-type destination-unreachable -j ACCEPT
       ipchains -A icmp-acc -p icmp --icmp-type source-quench -j ACCEPT
       ipchains -A icmp-acc -p icmp --icmp-type time-exceeded -j ACCEPT
       ipchains -A icmp-acc -p icmp --icmp-type parameter-problem -j ACCEPT


  7.4.3.  Da Good (interno) a DMZ (server)

  Restrizioni della rete interna:

    Permettere WWW, ftp, traceroute, ssh verso l'esterno

    Permettere SMTP verso il Mail server

    Permettere POP-3 verso il Mail server

    Permettere DNS verso il Name server

    Permettere rsync verso il Web server

    Permettere WWW verso il Web server

    Permettere il ping alla macchina filtro

  Si potrebbe fare il masquerading dalla rete interna nella DMZ, ma qui
  non si far.  Poich nessuno nella rete interna dovrebbe provare a
  fare cose brutte, registriamo qualsiasi pacchetto che venga proibito.




       ipchains -A good-dmz -p tcp -d 192.84.219.128 smtp -j ACCEPT
       ipchains -A good-dmz -p tcp -d 192.84.219.128 pop-3 -j ACCEPT
       ipchains -A good-dmz -p udp -d 192.84.219.129 domain -j ACCEPT
       ipchains -A good-dmz -p tcp -d 192.84.219.129 domain -j ACCEPT
       ipchains -A good-dmz -p tcp -d 192.84.218.130 www -j ACCEPT
       ipchains -A good-dmz -p tcp -d 192.84.218.130 rsync -j ACCEPT
       ipchains -A good-dmz -p icmp -j icmp-acc
       ipchains -A good-dmz -j DENY -l






  7.4.4.  Da Bad (esterno) a DMZ (server).



    Restrizioni di DMZ:

    Mail server

    SMTP verso l'esterno

    Accetta SMTP da interno ed esterno

    Accetta POP-3 dall'interno


    Name server

    Invia DNS verso l'esterno

    Accetta DNS da interno, esterno e dalla macchina per il filtraggio
     dei pacchetti


    Web server

    Accetta HTTP da interno e esterno

    Accesso rsync dall'interno


    Cose permesse dalla rete esterna verso DMZ

    Non si registrano le violazioni, in quanto possono succedere.



       ipchains -A bad-dmz -p tcp -d 192.84.219.128 smtp -j ACCEPT
       ipchains -A bad-dmz -p udp -d 192.84.219.129 domain -j ACCEPT
       ipchains -A bad-dmz -p tcp -d 192.84.219.129 domain -j ACCEPT
       ipchains -A bad-dmz -p tcp -d 192.84.218.130 www -j ACCEPT
       ipchains -A bad-dmz -p icmp -j icmp-acc
       ipchains -A bad-dmz -j DENY





  7.4.5.  Da Good (interno) a Bad (esterno).


    Restrizioni della rete interna:

    Permettere WWW, ftp, traceroute, ssh verso l'esterno

    Permettere SMTP verso il Mail server

    Permettere POP-3 verso il Mail server

    Permettere DNS verso il Name server

    Permettere rsync verso il Web server

    Permettere WWW verso il Web server

    Permettere il ping alla macchina filtro

    Molti permettono qualsiasi cosa dalla rete interna verso quella
     esterna. Qua facciamo un po' i fascisti.

    Registrazione delle violazioni.

    FTP passivo gestito dal modulo del masquerading



       ipchains -A good-bad -p tcp --dport www -j MASQ
       ipchains -A good-bad -p tcp --dport ssh -j MASQ
       ipchains -A good-bad -p udp --dport 33434:33500 -j MASQ
       ipchains -A good-bad -p tcp --dport ftp --j MASQ
       ipchains -A good-bad -p icmp --icmp-type ping -j MASQ
       ipchains -A good-bad -j REJECT -l





  7.4.6.  Da DMZ a Good (interno).



    Restrizioni della rete interna:


    Permettere WWW, ftp, traceroute, ssh verso l'esterno

    Permettere SMTP verso il Mail server

    Permettere POP-3 verso il Mail server

    Permettere DNS verso il Name server

    Permettere rsync verso il Web server

    Permettere WWW verso il Web server

    Permettere il ping alla macchina filtro


    Se si fa il masquerading dalla rete interna verso la DMZ,
     semplicemente si rifiuti qualsiasi pacchetto che proviene
     nell'altro senso.  Ovvero, si permettano solo i pacchetti che
     possono essere parte di una connessione gi stabilita.



       ipchains -A dmz-good -p tcp ! -y -s 192.84.219.128 smtp -j ACCEPT
       ipchains -A dmz-good -p udp -s 192.84.219.129 domain -j ACCEPT
       ipchains -A dmz-good -p tcp ! -y -s 192.84.219.129 domain -j ACCEPT
       ipchains -A dmz-good -p tcp ! -y -s 192.84.218.130 www -j ACCEPT
       ipchains -A dmz-good -p tcp ! -y -s 192.84.218.130 rsync -j ACCEPT
       ipchains -A dmz-good -p icmp -j icmp-acc
       ipchains -A dmz-bad -j DENY -l





  7.4.7.  Da DMZ a Bad (esterno).



    Restrizioni di DMZ:

    Mail server

    SMTP verso l'esterno

    Accetta SMTP da interno ed esterno

    Accetta POP-3 dall'interno


    Name server

    Invia DNS verso l'esterno

    Accetta DNS da interno, esterno e dalla macchina per il filtraggio
     dei pacchetti


    Web server

    Accetta HTTP da interno e esterno

    Accesso rsync dall'interno




  


       ipchains -A dmz-bad -p tcp -s 192.84.219.128 smtp -j ACCEPT
       ipchains -A dmz-bad -p udp -s 192.84.219.129 domain -j ACCEPT
       ipchains -A dmz-bad -p tcp -s 192.84.219.129 domain -j ACCEPT
       ipchains -A dmz-bad -p tcp ! -y -s 192.84.218.130 www -j ACCEPT
       ipchains -A dmz-bad -p icmp -j icmp-acc
       ipchains -A dmz-bad -j DENY -l





  7.4.8.  Da Bad (esterno) a Good (interno).



    Non si permette niente (non mascherato) dalla rete esterna verso
     quella interna


       ipchains -A bad-good -j REJECT





  7.4.9.  Filtraggio dei pacchetti per la macchina Linux stessa



    Se si vuole usare il filtraggio dei pacchetti sui pacchetti in
     ingresso alla macchina stessa,  necessario fare il filtraggio
     sulla catena input.  Si crei una catena per ogni interfaccia di
     destinazione:


       ipchains -N bad-if
       ipchains -N dmz-if
       ipchains -N good-if





    Creare dei salti a queste:



       ipchains -A input -d 192.84.219.1 -j bad-if
       ipchains -A input -d 192.84.219.250 -j dmz-if
       ipchains -A input -d 192.168.1.250 -j good-if





  7.4.9.1.  Interfaccia di Bad (esterno).



    Macchina per il filtraggio dei pacchetti:

    PING verso ogni rete

    TRACEROUTE verso ogni rete

    Accesso DNS


    L'interfaccia esterna riceve risposte anche per i pacchetti
     "mascherati" oltre ad errori ICMP per questi e a risposte al PING.



       ipchains -A bad-if -i ! ppp0 -j DENY -l
       ipchains -A bad-if -p TCP --dport 61000:65096 -j ACCEPT
       ipchains -A bad-if -p UDP --dport 61000:65096 -j ACCEPT
       ipchains -A bad-if -p ICMP --icmp-type pong -j ACCEPT
       ipchains -A bad-if -j icmp-acc
       ipchains -A bad-if -j DENY





  7.4.9.2.  Interfaccia di DMZ.



    Restrizioni della macchina per il filtraggio dei pacchetti:

    PING verso ogni rete

    TRACEROUTE verso ogni rete

    Accesso DNS


    L'interfaccia DMZ riceve risposte DNS, risposte al ping ed errori
     ICMP.



       ipchains -A dmz-if -i ! eth0 -j DENY
       ipchains -A dmz-if -p TCP ! -y -s 192.84.219.129 53 -j ACCEPT
       ipchains -A dmz-if -p UDP -s 192.84.219.129 53 -j ACCEPT
       ipchains -A dmz-if -p ICMP --icmp-type pong -j ACCEPT
       ipchains -A dmz-if -j icmp-acc
       ipchains -A dmz-if -j DENY -l





  7.4.9.3.  Interfaccia di Good (interno).



    Restrizioni della macchina per il filtraggio dei pacchetti:

    PING verso ogni rete

    TRACEROUTE verso ogni rete

    Accesso DNS


    Restrizioni della rete interna:


    Permettere WWW, ftp, traceroute, ssh verso l'esterno

    Permettere SMTP verso il Mail server

    Permettere POP-3 verso il Mail server

    Permettere DNS verso il Name server

    Permettere rsync verso il Web server

    Permettere WWW verso il Web server

    Permettere il ping alla macchina filtro


    L'interfaccia interna riceve ping, risposte al ping e errori ICMP.



       ipchains -A good-if -i ! eth1 -j DENY
       ipchains -A good-if -p ICMP --icmp-type ping -j ACCEPT
       ipchains -A good-if -p ICMP --icmp-type pong -j ACCEPT
       ipchains -A good-if -j icmp-acc
       ipchains -A good-if -j DENY -l





  7.5.  Per finire


    Cancellare le regole di bloccaggio:


       ipchains -D input 1
       ipchains -D forward 1
       ipchains -D output 1





  8.  Appendice: Differenze tra ipchains e ipfwadm

  Alcune di queste modifiche sono il risultato di modifiche nel kernel,
  e altre dipendono dal fatto che ipchains sembra differente da ipfwadm.



  1. Molti argomenti sono stati rimappati: le maiuscole ora indicano un
     comando e le minuscole indicano un'opzione.

  2. Sono supportate catene arbitrarie e quindi anche le catene
     predefinite ora hanno un nome invece di essere solamente un opzione
     (eg. `input' invece di `-I').

  3. L'opzione `-k' non c' pi: si usi `! -y'.

  4. L'opzione `-b' inserire/aggiunge/cancella veramente due regole,
     piuttosto che una singola regola `bidirezionale'.

  5. L'opzione `-b' pu essere passata a `-C' per fare due verifiche
     (una in ogni direzione).


  6. L'opzione `-x' a `-l'  stata rimpiazzata da `-v'.

  7. Non sono pi supportate porte di provenienza e destinazione
     multiple.  Spero che l'essere in grado di negare un intervallo di
     porte venga in aiuto in questi casi.

  8. Le interfacce possono essere specificate solamente attraverso il
     nome (non l'indirizzo).  Comunque, la vecchia semantica  stata
     silenzionamente cambiata nei kernel della serie 2.1.

  9. I frammenti sono esaminati, non lasciati passare automaticamente.

  10.
     Sono state rimosse le catene specifiche per l'accounting.

  11.
     Possono essere testati protocolli arbitrari su IP.

  12.
     Il vecchio comportamente del SYN e ACK matching (che in precedenza
     era ignorato per i pacchetti non TCP)  cambiato; l'opzione SYN non
      valida per regole non specifiche per il TCP.

  13.
     I contatori sono ora a 64 bit su macchine a 32 bit, non pi a 32
     bit.

  14.
     Ora sono supportate le opzioni inverse.

  15.
     Ora sono supportati i codici ICMP.

  16.
     Sono supportati i caratteri jolly nella specifica dell'interfaccia.

  17.
     Ora  controllata l'integrit delle manipolazioni TOS: il vecchio
     codice del kernel sileziosamente bloccava le manipolazioni
     (illegali) del bit TOS `Must Be Zero'; ipchains ora restituisce un
     errore se ci si prova, come anche per gli altri casi illegali.


  8.1.  Tabella di riferimento rapido

  [ Gli argomenti dei comandi sono in MAIUSCOLO, mentre gli argomenti
  delle opzioni in minuscolo ]


  Una cosa da notare, il masquerading  specificato da `-j MASQ'; 
  completamente diverso da `-j ACCEPT', e non  trattato come un mero
  effetto collaterale, diversamente da quanto fa ipfwadm.














  ===================================================================
  | ipfwadm      | ipchains                | Note
  -------------------------------------------------------------------
  | -A [both]    | -N acct                 | Crea una catena `acct'
  |              |& -I 1 input -j acct     | e fa s che i pacchetti
  |              |& -I 1 output -j acct    | in ingresso e in uscita
  |              |& acct                   | la traversino.
  -------------------------------------------------------------------
  | -A in        | input                   | Una regola senza tattica
  -------------------------------------------------------------------
  | -A out       | output                  | Una regola senza tattica
  -------------------------------------------------------------------
  | -F           | forward                 | Si usi questo come [catena]
  -------------------------------------------------------------------
  | -I           | input                   | Si usi questo come [catena]
  -------------------------------------------------------------------
  | -O           | output                  | Si usi questo come [catena]
  -------------------------------------------------------------------
  | -M -l        | -M -L                   |
  -------------------------------------------------------------------
  | -M -s        | -M -S                   |
  -------------------------------------------------------------------
  | -a tattica   | -A [catena] -j TATTICA  | (si veda anche -r e -m).
  -------------------------------------------------------------------
  | -d tattica   | -D [catena] -j TATTICA  | (si veda anche -r e -m).
  -------------------------------------------------------------------
  | -i tattica   | -I 1 [catena] -j TATTICA| (si veda anche -r e -m).
  -------------------------------------------------------------------
  | -l           | -L                      |
  -------------------------------------------------------------------
  | -z           | -Z                      |
  -------------------------------------------------------------------
  | -f           | -F                      |
  -------------------------------------------------------------------
  | -p           | -P                      |
  -------------------------------------------------------------------
  | -c           | -C                      |
  -------------------------------------------------------------------
  | -P           | -p                      |
  -------------------------------------------------------------------
  | -S           | -s                      | Accetta solo una porta o
  |              |                         | intervallo.
  -------------------------------------------------------------------
  | -D           | -d                      | Accetta solo una porta o
  |              |                         | intervallo.
  -------------------------------------------------------------------
  | -V           | <nessuna>               | Si usi -i [nome].
  -------------------------------------------------------------------
  | -W           | -i                      |
  -------------------------------------------------------------------
  | -b           | -b                      | Crea 2 regole.
  -------------------------------------------------------------------
  | -e           | -v                      |
  -------------------------------------------------------------------
  | -k           | ! -y                    | Non funziona finch non
  |              |                         | si specifica anche -p tcp.
  -------------------------------------------------------------------
  | -m           | -j MASQ                 |
  -------------------------------------------------------------------
  | -n           | -n                      |
  -------------------------------------------------------------------
  | -o           | -l                      |
  -------------------------------------------------------------------
  | -r [redirpt] | -j REDIRECT [redirpt]   |
  -------------------------------------------------------------------
  | -t           | -t                      |
  -------------------------------------------------------------------
  | -v           | -v                      |
  -------------------------------------------------------------------
  | -x           | -x                      |
  -------------------------------------------------------------------
  | -y           | -y                      | Non funziona finch non
  |              |                         | si specifica anche -p tcp.
  -------------------------------------------------------------------




  8.2.  Esempi di traduzione di comandi ipfwadm

  Vecchio comando: ipfwadm -F  -p deny

  Nuovo comando: ipchains -P forward DENY


  Vecchio comando: ipfwadm -F -a m -S 192.168.0.0/24 -D 0.0.0.0/0

  Nuovo comando: ipchains -A forward -j MASQ -s 192.168.0.0/24 -d
  0.0.0.0/0


  Vecchio comando: ipfwadm -I -a accept -V 10.1.2.1 -S 10.0.0.0/8 -D
  0.0.0.0/0

  Nuovo comando: ipchains -A input -j ACCEPT -i eth0 -s 10.0.0.0/8 -d
  0.0.0.0/0

  (Si noti che questi non sono equivalenti specificando l'interfaccia
  tramite l'indirizzo: si usi il nome di interfaccia.  In questa
  macchina 10.1.2.1 corrisponde a eth0).


  9.  Appendice: Usare lo script ipfwadm-wrapper.

  Lo script shell ipfwadm-wrapper dovrebbe essere un plug-in di
  rimpiazzo di ipfwadm per compatibilit all'indietro con ipfwadm 2.3a.


  La sola caratteristica che non posso veramente gestire  l'opzione
  `-V'.  Quando  usata,  mostrato un avviso.  Se  usata anche
  l'opzione `-W', l'opzione `-V'  ignorata.  Altrimenti, lo script
  prova a trovare il nome di interfaccia associato con quell'indirizzo,
  usando ifconfig.  Se fallisce (come nel caso di un'interfaccia non
  attiva) allora uscir con un messaggio d'errore.


  Questo avviso pu essere soppresso o cambiando il `-V' in un `-W',
  oppure direzionando lo standard output dello script a /dev/null.


  Se si trova un qualsiasi errore nello script, o una qualsiasi
  differenza tra il vero ipfwadm e questo script, invito a segnalarmi il
  bug: si invii un'email a ipchains@rustcorp.com con "BUG-REPORT" nel
  subject.  Prego si segnali la versione del vecchio ipfwadm (ipfwadm
  -h), la versione di ipchains (ipchains --version) e quella dello
  script ipfwadm wrapper script (ipfwadm-wrapper --version).  Si invii
  anche l'output di ipchains-save.  Grazie in anticipo.


  Se si mischia ipchains con questo script ipfwadm-wrapper lo si fa a
  proprio rischio e pericolo.

  10.  Appendice: Ringraziamenti.

  Molte grazie a Michael Neuling, che ha scritto la prima cosa
  rilasciabile del codice IP chains mentre lavorava per me.  Mi scuso
  pubblicamente per aver respinto la sua idea del result-caching, che
  Alan Cox propose un po' dopo e finalmente mi sono deciso a
  implementare, rendendomi conto dell'errore che avevo commesso.


  Grazie ad Alan Cox per il suo supporto tecnico via email 24 ore su 24
  ed il suo incoraggiamento.


  Grazie a tutti gli autori del codice ipfw e ipfwadm, specialmente a
  Jos Vos.  Standing on the shoulders of giants and all that...  Ci
  vale anche per Linus Torvalds oltre che a tutti gli hacker del kernel
  e dello userspace.


  Un ringraziamento ai diligenti beta tester e bughunter (cacciatori di
  bug), specialmente a Jordan Mendelson, Shaw Carruthers, Kevin Moule,
  Dr. Liviu Daia, Helmut Adams, Franck Sicard, Kevin Littlejohn, Matt
  Kemner, John D. Hardin, Alexey Kuznetsov, Leos Bitto, Jim Kunzman,
  Gerard Gerritsen, Serge Sivkov, Andrew Burgess, Steve Schmidtke,
  Richard Offer, Bernhard Weisshuhn, Larry Auton, Ambrose Li, Pavel
  Krauz, Steve Chadsey, Francesco Potort e Alain Knaff.

  Il tradottore vuole ringraziare Alvise Bellotti per la sue
  indispensabili correzioni e suggerimenti.





































  Linux IPX-HOWTO
  Kevin Thorpe, kevin@pricetrak.com
  v2.3, 06 Maggio 1998

  Scopo di questo documento  descrivere come ottenere, installare e
  configurare diversi strumenti disponibili per utilizzare il protocollo
  IPX per kernel Linux.  Revisione e manutenzione della traduzione ital
  iana: Andrea Girotto (andrea.girotto@usa.net).

  1.  Introduzione a questo documento

  Questo  il Linux IPX-HOWTO.  Insieme a questo,  consigliabile
  leggere (o aver letto) anche il documento NET-3-HOWTO di Linux.


  1.1.  Modifiche dalla versione precedente

  Cambio di autore Sentiti ringraziamenti a Terry Dawson per avermi
  ceduto questo documento e congratulazioni per essere diventato padre
  :-).

  Aggiunte Aggiunta una breve spiegazione di IPX: un tentativo di
  risposta alle numerose confuse domande poste sulle liste di
  discussione.

  Correzioni/ggiornamenti Nuova versione di ncpfs che supporta login
  NDS. Si tratta di beta test e potrebbe essere proibita nel proprio
  paese in seguito all'uso di una tecnologia coperta da registrazione.

  Aggiunta del supporto dei permessi (trustee permission) del server in
  mars_nwe.  Ancora in beta test.



  1.2.  Introduzione

  Paragonata ad altri sistemi operativi di tipo Unix l'implementazione
  di rete del kernel di Linux  innovativa.  La possibilit di seguire
  un nuovo approccio nello sviluppo del kernel, ha consentito il
  supporto (previa compilazione) di diversi protocolli non TCP/IP.  Il
  protocollo IPX  uno di questi.

  Il kernel Linux supporta solamente il protocollo IPX.  Non  ancora in
  grado di gestire protocolli come IPX/RIP, SAP o NCP, che sono
  implementati da altro software come documentato in questo HOWTO.

  Il supporto IPX fu sviluppato originariamente da Alan Cox
  (alan@lxorguk.ukuu.org.uk) ed  stato significativamente accresciuto
  da Greg Page (greg@caldera.com).


  2.  Avvertenza

  L'autore non conosce e non pu conoscere tutto lo scibile sul software
  di rete per Linux.  Si prega di accettare e considerare il fatto che
  questo documento probabilmente contiene errori.  Per informazioni pi
  dettagliate e accurate,  necessario leggere i file README inclusi con
  ogni software descritto.  Si tenter di mantenere questo documento il
  pi possibile esatto e aggiornato.  Le versioni del software
  corrispondono a quelle disponibili al momento in cui si scrive.

  N l'autore, n gli sviluppatori del software descritto sono in grado
  di offrire protezione nei confronti delle vostre azioni.  Qualora il
  software, anche se configurato come descritto in questo documento,
  dovesse causare dei problemi alla rete, la responsabilit  solo
  vostra.  Questo avvertimento  dovuto al fatto che il disegno e la
  configurazione di una rete IPX non sempre sono semplici e talvolta
  possono sorgere interazioni indesiderate con altri router o file
  server, causati da errori in fase di progettazione o configurazione.
  L'inserimento di questo avvertimento  stato richiesto da coloro che
  hanno imparato la lezione sulla propria pelle.


  3.  Documentazione

  Questo documento presume che si sappia compilare un kernel Linux con
  le opzioni di rete appropriate e che si conoscano i tool di rete
  basilari come ifconfig e route.  Per maggiori informazioni, si rimanda
  al documento NET-3-HOWTO, che descrive proprio questi argomenti.



  Altri documenti HOWTO, che potrebbero essere utili sono i seguenti.

     Ethernet-HOWTO
        Descrive i dettagli di configurazione di un dispositivo Ethernet
        per Linux.



     PPP-HOWTO
        Il supporto IPX  disponibile a partire dalle versioni 2.2.0d
        dell'implementazione PPP di Linux.





  3.1.  Nuove versioni di questo documento

  Se questa copia del documento ha pi di due mesi, si raccomanda
  caldamente di ottenere una nuova versione.  Il supporto di rete per
  Linux  in continua evoluzione, pertanto anche questo documento viene
  modificato molto spesso.


  3.1.1.  Risorse internazionali

  L'ultima versione rilasciata di questo documento pu sempre essere
  ottenuta tramite ftp anonimo da:

  ftp:/sunsite.unc.edu/pub/Linux/docs/HOWTO/IPX-HOWTO>/ o:
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/IPX-
  HOWTO{-html.tar,ps,dvi}.gz

  Tramite il World Wide Web dal Linux Documentation Project Web Server
  <http://sunsite.unc.edu/LDP/linux.html>, alla pagina: IPX-HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/IPX-HOWTO.html> o direttamente da
  me, <kevin@pricetrak.com>.  In alternativa, possono essere utilizzati
  i newsgroups: comp.os.linux.networking, comp.os.linux.answers e
  news.answers


  3.1.2.  Risorse italiane

  Questo documento e altri correlati sono disponibili presso i siti Ftp
  (ftp.pluto.linux.it) e Web del PLUTO (http://www.pluto.linux.it).





  3.2.  Feedback

  Si prega di inviare direttamente all'autore ogni commento (in inglese,
  NdT), aggiornamento o suggerimento, all'indirizzo
  <kevin@pricetrak.com>.  Prima verr ricevuta una segnalazione, prima
  sar possibile aggiornare e correggere questo documento.  Se dovessero
  esserci problemi, per favore scrivere direttamente all'autore in
  quanto molto raramente legge i gruppi di discussione.


  3.3.  Mailing list

  Esiste una mailing list per la discussione dei diversi pacchetti di
  software Linux IPX descritti in questo documento.   possibile
  iscriversi inviando un messaggio a: listserv@sh.cvut.cz con le parole
  ``add linware'' nel corpo del messaggio.  Per comunicare con la lista
  si deve scrivere a: linware@sh.cvut.cz.  L'autore consulta
  regolarmente questa lista.

  L'archivio della mailing list si trova all'indirizzo www.kin.vslib.cz,
  /hypermail/linware/ <http://www.kin.vslib.cz/hypermail/linware/>.


  4.  Alcuni dei termini utilizzati in questo documento

  Si useranno spesso i termini client e server.  Si tratta di concetti
  molto specifici, tuttavia in questo documento si  leggermente
  generalizzata la loro definizione, assegnandogli il seguente
  significato:


     client
        Macchina o programma che inizia un'azione o una connessione allo
        scopo di ottenere l'utilizzo di servizi o di dati.

     server
        Macchina o programma che accetta connessioni in entrata da
        macchine remote ed  in grado di fornire a esse servizi o dati.

  Queste definizioni non sono completamente esatte, tuttavia forniscono
  un modo per distinguere gli estremi dei sistemi peer to peer come SLIP
  o PPP, i quali, di fatto, non hanno veri e propri client e server.
  Altri termini che si troveranno sono i seguenti.


     Bindery
        Il bindery  un database specializzato in grado di memorizzare
        su un fileserver Novell informazioni riguardo la configurazione
        della rete.  I client di rete possono interrogare il bindery per
        ottenere informazioni circa i servizi disponibili,
        l'instradamento (routing) e altre informazioni utente.

     Tipo di trama (frame type)
        Termine utilizzato per descrivere il protocollo utilizzato per
        trasportare i datagrammi IPX (e IP) lungo i segmenti di una rete
        di tipo ethernet.  I quattro pi comuni sono:

        Ethernet_II
            una versione riveduta dello standard ethernet DIX
           originale.  A Novell  stato assegnato un identificativo di
           protocollo formale e questo significa che IPX e IP possono
           coesistere in un ambiente Ethernet_II.  Questo protocollo
           viene comunemente utilizzato in ambienti Novell e si tratta
           di una buona scelta.


        802.3
            un protocollo I.E.E.E. che definisce un meccanismo CSMA/CD
           (Carrier Sense Multiple Access with Collision Detection).  Si
           basa sullo standard Ethernet DIX originale, con una modifica
           rilevante: l'identificativo di protocollo (type field) 
           stato convertito in una lunghezza di campo (length field).
           Questo  il motivo per cui IPX non dovrebbe essere eseguito
           con questo protocollo.  IEEE 802.3  stato progettato per
           trasportare solo frame IEEE 802.2 ma esistono implementazioni
           che lo utilizzano per trasportare direttamente i frame e di
           fatto funzionano.  Si consiglia di evitarlo a meno che non si
           stia tentando di interagire con una rete gi configurata per
           esso.

        802.2
            un protocollo I.E.E.E. che definisce un insieme di
           procedure di Controllo Logico dei Link (Logical Link
           Control).  Fornisce un modo semplice per consentire la
           coesistenza di protocolli differenti, tuttavia  piuttosto
           limitato.  Novell utilizza un Service Address Point non
           ufficiale (una sorta di identificativo di protocollo) ma dal
           momento che anche tutti gli altri lo utilizzano, questo non
           ha ancora rappresentato un problema.

        SNAP
           acronimo di Sub Network Access Protocol.  Questo protocollo 
           progettato per funzionare su 802.3 e 802.2.  Espande le
           capacit di 802.2 e fornisce una compatibilit con i tipi di
           frame esistenti Ethernet ed Ethernet_II IPX

     IPX
        Internet Packet eXchange: protocollo utilizzato da Novell
        Corporation per fornire un supporto internetworking per i loro
        prodotti NetWare(tm).  IPX ha funzionalit simili al protocollo
        IP utilizzato in TCP/IP.

     Indirizzo di rete IPX
        Numero che identifica univocamente una particolare rete IPX.  La
        notazione comune per questo indirizzo  in esadecimale.  Un
        esempio pu essere: 0x23a91002.

     Rete interna IPX
        Rete IPX virtuale, poich non corrisponde a una rete fisica.
        Viene utilizzata per fornire un'identificazione e un
        indirizzamento univoco per un host IPX.  Solitamente,  utile
        per identificare gli host IPX che esistono in pi di una rete
        fisica IPX come i fileserver.  L'indirizzo  codificato nella
        stessa forma di una rete IPX fisica.

     RIP
        Routing Information Protocol: protocollo utilizzato per
        propagare automaticamente gli instradamenti (route) di rete in
        una rete IPX.   funzionalmente simile al RIP utilizzato in
        TCP/IP.

     NCP
        NetWare Core Protocol: protocollo di filesystem di rete
        (networked filesystem) progettato da Novell Corporation per il
        loro prodotto NetWare(tm).  Funzionalmente equivale a NFS
        utilizzato in TCP/IP.

     SAP
        Service Advertisement Protocol: protocollo progettato da Novell
        Corporation per pubblicizzare i servizi di rete in un ambiente
        NetWare(tm).

     Indirizzo hardware
        Numero che identifica in modo univoco un host all'interno di una
        rete fisica.  Ne sono esempio gli Indirizzi Ethernet.  Un
        indirizzo Ethernet viene generalmente codificato con sei valori
        esadecimali separati da un carattere "due punti" es.:
        00:60:8C:C3:3C:0F.

     instradamento (route)
         il percorso seguito dai pacchetti attraverso la rete per
        raggiungere la propria destinazione.


  5.  Breve discussione sulla topologia di rete IPX

  Questa  una spiegazione estremamente semplice per persone che non
  conoscono IPX. Reti estese probabilmente violano molte delle regole
  indicate, In reti IPX complesse si dovrebbe sempre consultare
  l'amministratore di rete.

  La rete IPX si risolve intorno a uno schema di reti numerate,
  diversamente da IP che pone maggior enfasi sulle interfacce. Una rete
   una collezione di materiale connesso allo stesso segmento LAN e che
  usa lo stesso tipo di trama. Diffenti tipi di trama sullo stesso
  segmento LAN sono trattati come reti separate.

  Ciascuna rete deve allocare un numero che sia univoco nell'intera
  interconnessione. Normalmente questo compito  assolto dal server
  Netware(tm), ma pu essere facilmente svolto da Linux. Ai client IPX
  viene dato questo numero dal server all'atto di partire, a loro  solo
  richiesto di conoscere il corretto tipo di trama.

  L'instradamento tra reti  normalmente effettuato ponendo due schede
  di rete sullo stesso server. Questo server mantiene tramite il
  protocollo RIP una tabella di instradamento per l'interconnessione.
  Periodicamente i server si scambiano questa tabella di instradamento.
  In breve tempo ciascun server 'scopre' la topologia dell'intera rete.

  Se si desidera usare solo i servizi di un server Netware esistente, si
  pu usare ipx_configure (sezione 7.1) per definire automaticamente le
  interfacce IPX tramite richieste broadcast cercando un server. Se
  fallisce, o se si desidera fornire servizi IPX, sar necessario
  definire manualmente le interfacce usando ipx_interface o mars_nwe.


  6.  I file correlati a IPX nel filesystem /proc

  All'interno del filesystem /proc sono presenti molti file correlati al
  supporto IPX di Linux:

     /proc/net/ipx_interface
        Contiene informazioni circa le interfacce IPX configurate sulla
        macchina.  Tali interfacce potrebbero essere state configurate
        manualmente, oppure rilevate e configurate automaticamente.

     /proc/net/ipx_route
        Contiene una lista di percorsi esistenti nella tabella di
        instradamento IPX.  Potrebbero essere stati aggiunti
        manualmente, oppure automaticamente tramite un demone di
        instradamento IPX.

     /proc/net/ipx
        Contiene una lista di socket IPX attualmente aperti per un
        utilizzo sulla macchina.



  7.  I tool IPX di Greg Page

  Greg Page (greg@caldera.com) della Caldera Incorporated, ha scritto
  molti strumenti per la configurazione IPX e ha fornito miglioramenti
  per il supporto IPX.

  I miglioramenti nel kernel consentono di configurare Linux come un
  bridge o router pienamente funzionale.  Il supporto IPX migliorato 
  gi presente nella distribuzione del kernel pertanto, probabilmente,
  lo possedete gi.  I tool di configurazione forniscono la possibilit
  di impostare i dispositivi di rete per supportare IPX, l'instradamento
  IPX e altre facilitazioni sotto Linux.  I tool di rete IPX per Linux
  sono disponibili presso: sunsite.unc.edu,
  /pub/Linux/system/filesystems/ncpfs/ipx.tgz.


  7.1.  I tool IPX in maggior dettaglio


     ipx_interface
        Viene utilizzato per aggiungere, cancellare o controllare
        manualmente la capacit di IPX verso un dispositivo di rete
        esistente.  Normalmente si tratta di un dispositivo di rete
        Ethernet per esempio, eth0.  Almeno un'interfaccia IPX deve
        essere definita come interfaccia primaria; si ottiene con
        l'opzione -p di questo comando.  Ad esempio, per abilitare il
        dispositivo Ethernet eth0 come interfaccia primaria IPX
        utilizzando il tipo di frame IEEE 802.2 e l'indirizzo di rete
        IPX 39ab0222, si utilizza il comando:



          # ipx_interface add -p eth0 802.2 0x39ab0222




     Se il tipo di trama differisce da quello dei server NetWare(tm)
     sulla rete, essi di proposito ignoreranno il computer. Se il tipo
     di trama  corretto ma il numero di rete differisce, essi
     ignoreranno comunque il computer ma segnaleranno frequentemente il
     fatto sulla console NetWare del server. L'ultima situazione  certo
     che suscita rimproveri dal proprio amministratore NetWare e
     potrebbe disabilitare i client NetWare esistenti.

     Se il sistema restituisce un messaggio di errore mentre si esegue
     questo programma e non  ancora stato configurato TCP/IP, allora
     sar necessario avviare manualmente l'interfaccia eth0 utilizzando
     il comando:



          # ifconfig eth0 up





     ipx_configure
        Abilita o disabilita la configurazione automatica delle
        interfacce e l'impostazione dell'interfaccia primaria.

        --auto_interface
           consente di impostare se i dispositivi di rete debbano essere
           configurati automaticamente come dispositivi IPX oppure no.

        --auto_primary
           consente di impostare se il software IPX debba selezionare
           automaticamente un'interfaccia primaria oppure no. Si sono
           riscontrati problemi usando questa opzione con client Windows
           95 connessi alla rete.

        Un esempio tipico consiste nell'abilitare sia la configurazione
        automatica delle interfacce che l'impostazione automatica di
        quella primaria, tramite:



          # ipx_configure -auto_interface=on -auto_primary=on





     ipx_internal_net
        Consente di configurare o ``deconfigurare'' un indirizzo di rete
        interna.  Tale indirizzo  opzionale, ma se viene configurato
        rappresenter sempre l'interfaccia primaria.  Per impostare
        l'indirizzo di rete IPX ab000000 sul nodo IPX 1, si utilizzer
        il comando:



          # ipx_internal_net add 0xab000000 1





     ipx_route
        Consente di modificare manualmente la tabella di instradamento
        IPX.  Ad esempio, per aggiungere un percorso alla rete IPX
        39ab0222 tramite un router il cui numero di nodo  00608CC33C0F
        sulla rete IPX 39ab0108, si pu utilizzare il comando:



          # ipx_route add 0x39ab0222 0x39ab0108 0x00608CC33C0F






  8.  Configurazione della macchina Linux come router IPX

  Se ci si trova nella situazione di dover interconnettere diversi
  segmenti IPX,  necessario utilizzare un router.  In ambiente Novell
  ci sono due tipi di informazioni che devono essere diffuse all'interno
  della rete.  Si tratta di ``network routing information'' propagate
  utilizzando Novell RIP, e ``service advertisement information''
  propagate utilizzando Novell SAP.  Affinch un router sia utile nella
  maggior parte delle situazioni,  necessario che supporti entrambi i
  protocolli.

  Linux fornisce supporto per entrambi i protocolli e si pu facilmente
  fare in modo che funzioni come un router completamente conforme a
  Novell.

  Il supporto IPX per il kernel gestisce il percorso dei pacchetti IPX
  attraverso le interfacce, secondo le regole codificate all'interno
  della tabella di instradamento IPX.  Linux ha bisogno di un programma
  per implementare RIP e SAP di Novell per assicurare che la tabella di
  instradamento IPX sia compilata correttamente e aggiornata
  periodicamente al fine di riflettere eventuali cambiamenti dello stato
  della rete.

  Volker Lendecke (lendecke@namu01.gwdg.de) ha sviluppato un demone di
  instradamento per questo scopo: ipxripd. Il pacchetto menzionato
  successivamente mars_nwe include un demone di instradamento
  alternativo.

   possibile trovare ipxripd presso sunsite.unc.edu,
  /pub/Linux/system/filesystems/ncpfs/ipxripd-0.7.tgz o presso il sito
  privato di Volker ftp.gwdg.de, /pub/linux/misc/ncpfs/ipxripd-0.7.tgz.

  I passi da seguire per configurare una macchina Linux affinch si
  comporti come router sono:


  1. Compilare il kernel con il supporto IPX, Ethernet e /proc.

  2. Ottenere, compilare e installare il programma demone ipxd.

  3. Avviare il nuovo kernel e assicurarsi che ognuna delle schede
     Ethernet sia stata correttamente rilevata e che non esistano
     conflitti di hardware.

  4. Abilitare il protocollo IPX su ciascuna delle interfacce
     utilizzando il comando ipx_interface precedentemente descritto
     (vedere ``ipx_interface'').

  5. Eseguire il programma demone ipxd.


  Si consideri la semplice rete illustrata di seguito:


   IPX Addr: 0x01000000  802.2
  |--------------------------|
                |
                \_________________________
                                          \          Linux Router
   IPX Addr: 0x02000000  802.2             \
  |--------------------------|              \   eth0/-----------\
                |                            \--====|           |
                \_________________________          | IPX route |
                                          \     eth1|  Table    |
   IPX Addr: 0x03000000  etherII           \----====|    ^      |
  |--------------------------|                      |    |      |
                |                               eth2|  IPXd     |
                \______________________________/====|           |
                                                    |  SAPd     |
   IPX Addr: 0x04000000  etherII                eth3|           |
  |--------------------------|                 /====|           |
                |                              |    \___________/
                \______________________________/



  La configurazione per la rete sopra riportata corrisponde a:







  # ipx_interface add eth0 802.2 0x0100000000
  # ipx_interface add eth1 802.2 0x0200000000
  # ipx_interface add eth2 etherii 0x0300000000
  # ipx_interface add eth3 etherii 0x0400000000
  # ipxd




  Dopo aver atteso qualche istante, controllando il file
  /proc/net/ipx_route, dovrebbe essere possibile osservare la presenza
  dei percorsi IPX rilevanti per la propria configurazione e di tutti
  quelli acquisiti da altri router nella rete.


  8.1.   necessario configurare una rete interna?

  Novell ha una caratteristica denominata rete interna, che viene
  utilizzata per semplificare l'instradamento nelle situazioni in cui un
  host  connesso a pi dispositivi di rete.  Pu essere utile in caso
  di un fileserver connesso a pi reti, poich imposta un solo percorso
  come indicazione per raggiungere il server, indipendentemente dalla
  rete su cui si sta lavorando.

  In caso di una configurazione senza un fileserver e nella quale la
  macchina agisca solo da router IPX, la questione non  altrettanto
  semplice.  Si  notato che la configurazione per IPX/PPP funziona
  ``meglio'' se viene implementata anche una rete interna.

   un'operazione semplice da fare ma pu richiedere la ricompilazione
  del kernel.   importante rispondere ``Y'', mentre si esegue make
  config, alla richiesta:



         ...
         ...
        Full internal IPX network (CONFIG_IPX_INTERN) [N/y/?] y
         ...
         ...




  Per configurare l'interfaccia della rete interna, utilizzare il
  comando ipx_internal_net descritto in precedenza nel paragrafo
  relativo agli ``strumenti di rete''.  La precauzione principale da
  prendere, consiste nell'assicurarsi che l'indirizzo IPX assegnato sia
  univoco nella rete e quindi che nessun'altra macchina, o rete, lo stia
  utilizzando.


  9.  Configurazione della propria macchina Linux come client NCP

   probabile che gli utenti di reti a tecnologia mista, comprendente
  protocolli IP e IPX, prima o poi desiderino che la propria macchina
  Linux possa accedere a dati memorizzati in un file server Novell sulla
  rete.  Novell offre da tempo un pacchetto NFS per i propri file server
  in grado di consentire questa funzione; tuttavia, nel caso di una
  piccola installazione, o se solo un ristretto numero di persone 
  interessato a tale funzionalit, non  facile giustificare il costo
  del pacchetto commerciale.

  Volker Lendecke lendecke@namu01.gwdg.de ha scritto un modulo che
  consente di montare volumi Novell sul file system Linux senza
  richiedere alcun prodotto addizionale per il file server.  Volker ha
  denominato il pacchetto ncpfs e ha tratto le informazioni necessarie
  principalmente dal libro ``Netzwerkprogrammierung in C'' di Manfred
  Hill e Ralf Zessin (ulteriori dettagli sul libro sono contenuti nel
  file README del pacchetto ncpfs).

  Il software consente a Linux di emulare una normale stazione di lavoro
  Novell per servizi di file.  Include anche una piccola utility che
  consente di stampare le code Novell (questo argomento  documentato
  nel paragrafo relativo al ``Client di Stampa'').  Il pacchetto ncpfs 
  in grado di lavorare con file server Novell a partire dalla versione
  3.x, mentre non funziona con Novell 2.x.  Il client ncpfs funziona
  anche con prodotti strettamente compatibili con Novell, ma
  sfortunatamente alcuni, pur dichiarandosi compatibili, non lo sono a
  sufficienza.  Per utilizzare ncpfs con Novell 4.x,  preferibile
  configurare il fileserver per operare in modalit di emulazione
  bindery. Il supporto NDS   una aggiunta piuttosto recente alla
  versione beta di ncpfs e per di pi in certi paesi  proibito a causa
  dell'inclusione di tecnologia protetta da brevetto.


  9.1.  Come ottenere ncpfs

  L'ultimo pacchetto ncpfs fu progettato per versioni del kernel fino
  alla 1.2.13 o superiore alla 1.3.71 (questo include la versione
  2.x.x).  Se il kernel in uso non rientra in queste categorie, 
  necessario eseguire un aggiornamento, operazione descritta in
  dettaglio nel Kernel-HOWTO.

  Il pacchetto ncpfs pu essere ottenuto tramite ftp anonimo con il sito
  di Volker presso ftp.gwdg.de in /pub/linux/misc/ncpfs/ oppure
  sunsite.unc.edu in /pub/Linux/system/filesystems/ncpfs

  o siti mirror.  La versione attuale nel momento in cui si scrive
  questo documento : ncpfs-2.0.11.tgz oppure ncpfs-2.2.0.tgz che
  aggiunge il supporto NDS.


  9.2.  Compilazione di ncpfs  per il kernel 1.2.13


     Compilazione di un kernel con supporto Ethernet e IPX
        La prima cosa da fare  assicurarsi che il proprio kernel sia
        stato compilato con l'abilitazione al supporto IPX.  Nella
        versione di kernel 1.2.13 basta assicurarsi di aver risposto "Y"
        alla domanda The IPX protocol, come illustrato nel seguito:

         ...
         ...
        Assume subnets are local (CONFIG_INET_SNARL) [y]
        Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n]
        The IPX protocol (CONFIG_IPX) [n] y
        *
        * SCSI support
         ...
         ...



     Ovviamente  necessario includere il driver relativo per la propria
     scheda Ethernet.  Per maggiori dettagli, si dovrebbe consultare
     l'Ethernet-HOWTO.

     A questo punto  possibile procedere alla compilazione del kernel.
     Al termine potrebbe essere necessario eseguire lilo per
     installarlo.

     Esecuzione del comando tar per il software ncpfs

        # cd /usr/src
        # tar xvfz ncpfs-2.0.10.tgz
        # cd ncpfs




     Controllo del Makefile
        Se si desidera utilizzare kerneld per caricare automaticamente
        il modulo ncpfs,  necessario togliere il commento alla riga che
        si riferisce a KERNELD all'interno del Makefile.  Se non si
        conosce il significato di questa azione, si dovrebbe leggere
        Kernel-HOWTO  per familiarizzare con la configurazione del
        modulo kernel.

     Esecuzione di make per il software ncpfs
        Il software dovrebbe poter essere compilato correttamente senza
        che siano necessari ulteriori configurazioni, tramite il
        comando:

        # make




     Copia dei tool IPX, se non ancora presenti
        Al termine dell'esecuzione di make, tutti gli strumenti
        necessari dovrebbero trovarsi nella directory ncpfs/bin.  
        possibile utilizzare il comando:



          # make install




     per installare i tool in directory scelte da Volker.  Se si sta
     lavorando su un sistema basato su ELF, si dovr eseguire nuovamente
     ldconfig -v per assicurarsi che venga trovata la libreria
     condivisa.


     Copia del modulo ncpfs.o se necessario
        Se si sta eseguendo la compilazione di un kernel 1.2.*, al
        termine dell'esecuzione di make, si trover un file denominato
        ncpfs.o nella directory ncpfs/bin.  Si tratta del modulo di
        kernel ncpfs, che dovrebbe essere copiato in luogo utile.  Sul
        sistema debian dell'autore,  stato copiato nella directory
        /lib/modules/1.2.13/fs ed ncpfs aggiunto al file /etc/modules in
        modo che venga eseguito automaticamente all'avvio del sistema.
        Per una diversa distribuzione, si dovrebbe scoprire dove sono
        localizzati i moduli per copiarlo in quella locazione; in ogni
        altro caso semplicemente copiarlo nella directory /etc.  Per
        caricare i moduli manualmente,  necessario utilizzare il
        comando:

        # insmod ncpfs.o






  9.3.  Come compilare ncpfs  per i kernel 1.3.71++/2.0.*

  Per l'ultima versione di ncpfs, si dovrebbe utilizzare un kernel
  1.3.71 o successivo; questo include i kernel 2.0.*.

  Se si ha intenzione di utilizzare un kernel di versione 1.3.71 o
  successivo, allora il codice del kernel ncpfs  stato incluso nella
  distribuzione standard.   sufficiente rispondere ``Y'' alla domanda:


       Networking options  --->
       ...
       ...
       <*> The IPX protocol
       ...
       Filesystems  --->
       ...
       ...
       <*> NCP filesystem support (to mount NetWare volumes)
       ...




  A questo punto  necessario seguire le istruzioni per la compilazione
  dei kernel 1.2.*, in modo da costruire i tool; tuttavia non ci sar un
  file modulo da installare.


  9.4.  Configurazione e utilizzo di ncpfs


     Configurazione del software di rete IPX
        Esistono due modi per configurare il software di rete IPX.  
        possibile configurare manualmente tutte le informazioni di rete
        IPX, oppure lasciare che il software determini da solo delle
        impostazioni ragionevoli, tramite il comando:



          # ipx_configure --auto_interface=on --auto_primary=on




     Questo comando dovrebbe funzionare nella maggior parte dei casi, ma
     se ci non accade, si invita a leggere il paragrafo ``Tools di
     IPX'' per configurare il software manualmente. Si sono notati
     problemi nell'usare questo comando su reti in cui erano presenti
     client Windows 95.


     Collaudo della configurazione
        Dopo la configurazione della rete IPX, dovrebbe essere
        disponibile il comando slist che elenca tutti i fileserver
        Novell presenti:

        # slist



     Se il comando slist fornisce un messaggio del tipo: ``ncp_connect:
     Invalid argument'' significa che il kernel probabilmente non
     supporta IPX.  Controllare che sia stato effettivamente avviato il
     kernel appropriato.  Quando si avvia il sistema, i messaggi di
     startup dovrebbero contenere informazioni riferite a IPX e ncpfs.
     Se, nonostante tutto, il comando slist non elenca i file server,
     allora si dovrebbe utilizzare il metodo manuale per la
     configurazione della rete.


     Montare un volume Novell(R)
        Se il software di rete IPX funziona correttamente, si dovrebbe
        essere in grado di montare un volume file server Novell
        all'interno del file system Linux.  Il comando ncpmount viene
        utilizzato per questo scopo, e richiede la specifica delle
        seguenti informazioni:

        1. Nome del fileserver.

        2. Identificativo di login nel fileserver.  Se esiste, deve
           essere specificata anche una password.

        3. Il punto di mount, ossia dove si desidera montare la
           condivisione.  Si tratter di una directory esistente sulla
           macchina.

        Esiste un comando equivalente ncpumount per smontare un file
        system NCP precedentemente montato.  I file system NCP saranno
        smontati in modo corretto se si esegue un normale shutdown della
        macchina; pertanto non bisogna preoccuparsi di eseguire il
        comando npcumount manualmente prima di arrestare il sistema con
        halt oppure shutdown.

        Esempio di comando per montare il file server ACCT_FS01, con
        login guest, senza password, corrispondente alla directory
        /mnt/Accounts:

        # ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n



     Si noti l'utilizzo dell'opzione -n per indicare che il login non
     richiede alcuna password.  Stesso login con password secret avrebbe
     forma:

     # ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -P secret



     Se non si specifica n l'opzione -n, n -P, allora il sistema
     richieder una password.


     Verifica del mount
        Se l'esecuzione  terminata con successo, tutte le unit
        accessibili all'utente specificato durante il login, saranno
        elencate come directory sotto il punto di mount. Dovrebbe anche
        essere possibile percorrere la struttura delle directory per
        trovare altri file.  Alternativamente si pu usare l'opzione -V
        per montare un singolo volume.

        NCP non fornisce uid (identificativo utente) o gid
        (identificativo di gruppo) per la propriet dei file, tutti i
        file avranno le autorizzazioni e le propriet assegnate alla
        directory che rappresenta il punto di mount, condizionate dai
        permessi concessi dal server Novell.  necessario tenerne conto
        quando si effettuano condivisioni tra utenti Linux.


     Configurazione per l'esecuzione automatica dei mount
        Se si ha la necessit di avere un mount NCP permanente, 
        possibile configurare i comandi precedentemente descritti
        all'interno di file rc, in modo che vengano eseguiti all'avvio
        del sistema.  Nel caso in cui la distribuzione utilizzata non
        fornisca un metodo per configurare IPX (come Debian), si
        consiglia di impostare i comandi nel file /etc/rc.local, se
        esiste.   possibile utilizzare comandi del tipo:


          #
          # Avvio del filesystem NCP
          /sbin/insmod /lib/modules/1.2.13/fs/ncpfs.o

          # Configurazione della rete IPX
          ipx_configure --auto_interface=on --auto_primary=on

          # login all'Accounting fileserver
          ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n

          #




     Un altro metodo di configurazione consiste nell'elencare nel file
     $HOME/.nwclient i mount NCP temporanei o specifici per l'utente che
     verranno eseguiti regolarmente.   possibile memorizzare specifiche
     in modo da impostarle senza doverle indicare ogni volta.  Il
     formato  molto semplice:



          # Il primo inserimento rappresenta il server "preferenziale" che verr
          # utilizzato ogni volta non sia specificato esplicitamente un server.
          #
          # Login utente TERRY al fileserver DOCS_FS01 con password "password"
          DOCS_FS01/TERRY password
          #
          # Login utente Guest al fileserver ACCT_FS01 senza password.
          ACCT_FS01/GUEST -




     Per attivare questi mount si pu utilizzare il comando:


          $ ncpmount /home/terry/docs




     per montare DOCS_FS01 con login TERRY sotto la directory
     /home/terry/docs.  Si noti che  stato utilizzato il fileserver
     DOCS_FS01 perch non ne  stato specificato alcun altro nel comando
     di mount.  Se fosse stato utilizzato il comando:



          $ ncpmount -S ACCT_FS01 /home/terry/docs




     allora sarebbe stato montato il fileserver ACCT_FS01 con login
     GUEST.

     Nota: affinch questo meccanismo funzioni, l'autorizzazione per il
     file $HOME/.nwclient deve essere 0600.  Potrebbe essere necessario
     utilizzare il comando:



          $ chmod 0600 $HOME/.nwclient




     Se anche degli utenti non root devono essere autorizzati a
     utilizzare questo meccanismo, allora il comando npcmount deve
     essere Set Userid Root.  Ne consegue che potrebbe essere necessario
     attribuirgli le autorizzazioni:



          # chmod 4755 ncpmount





     Collaudo dell'utility nsend.
        Il pacchetto include anche un utility per inviare messaggi a
        utenti Novell.  Il suo nome  nsend e viene utilizzato come di
        seguito riportato:


        # nsend rod hello there



     invia il messaggio ``hello there'' a un utente con login ``rod''
     sul file server ``primario'' (ossia il primo che appare nel proprio
     file
      .nwclient).   possibile specificare un altro file server con la
     stessa sintassi descritta per il comando ncpmount.


  10.  Configurazione della macchina Linux come server NCP

  Sono disponibili due pacchetti che consentono a Linux di fornire le
  funzionalit di un file server Novell.  Entrambi permettono di
  condividere file sulla propria macchina Linux con utenti che
  utilizzano il software client NetWare di Novell.  Gli utenti possono
  fare in modo che dei file system appaiano come dischi locali sulle
  proprie macchine, proprio come farebbero con un reale file server
  Novell.  Utilizzandoli entrambi,  possibile rendersi conto di quale
  dei due meglio soddisfa le proprie esigenze.


  10.1.  Il pacchetto mars_nwe

  Martin Stover (mstover@freeway.de) ha sviluppato mars_nwe per
  consentire a Linux di fornire ai client NetWare sia servizi di file,
  che servizi di stampa.

  Il nome mars_nwe significa Martin Stovers Netware Emulator.


  10.1.1.  Capacit di mars_nwe

  mars_nwe implementa un sottoinsieme del pi completo NCP Novell per
  servizi di file e di bindery basati su dischi o anche di stampa.
  Probabilmente contiene errori, tuttavia attualmente viene utilizzato
  da molte persone, pertanto il numero di errori  in continua
  diminuzione man mano che vengono rilasciate nuove versioni.


  10.1.2.  Come ottenere mars_nwe

   possibile ottenere mars_nwe da ftp.gwdg.de /pub/linux/misc/ncpfs/ o
  da sunsite.unc.edu /pub/Linux/system/filesystems/ncpfs/.

  La versione nel momento in cui questo documento viene scritto :
  mars_nwe-0.98.pl10.tgz.


  10.1.3.  Come compilare il pacchetto mars_nwe


     Compilazione di un kernel con supporto Ethernet e IPX
        Con un kernel di versione 1.2.13  sufficiente assicurarsi di
        aver risposto ``Y'' alla domanda: The IPX protocol e ``N'' alla
        domanda: Full internal IPX network, come di seguito descritto:

         ...
         ...
        The IPX protocol (CONFIG_IPX) [n] y
         ...
         ...
        Full internal IPX network (CONFIG_IPX_INTERN) [N/y/?] n
         ...
         ...



     In kernel pi recenti viene adottato un processo simile ma il testo
     del messaggio potrebbe essere leggermente diverso.

      anche necessario includere il driver appropriato per la propria
     scheda Ethernet.  Maggiori dettagli sono presenti in Ethernet-
     HOWTO.

     Dopo di che  possibile procedere con la compilazione del kernel.
     Ricordarsi, una volta terminata l'operazione, di eseguire lilo per
     installarlo.

     Esecuzione del comando tar per il pacchetto mars_nwe


          # cd /usr/src
          # tar xvfz mars_nwe-0.99.pl10.tgz





     Esecuzione del comando make per mars_nwe
        Si tratta di un'operazione molto semplice.  Il primo passo
        consiste nell'eseguire semplicemente make, che creer un file
        config.h.  Assicurarsi della presenza del file e modificarlo se
        necessario.  Il file consente di impostare oggetti come, per
        esempio, le directory di installazione o il numero massimo di
        sessioni e unit che il server sar in grado di supportare.  Gli
        inserimenti veramente importanti da guardare sono:




        FILENAME_NW_INI         locazione del file di inizializzazione
        PATHNAME_PROGS          percorso in cui trovare i programmi eseguibili
                                di supporto
        PATHNAME_BINDERY        percorso a cui indirizzare i file "bindery"
        PATHNAME_PIDFILES       directory in cui scrivere i file "pid"
        MAX_CONNECTIONS         numero massimo di connessioni simultanee ammesse
        MAX_NW_VOLS             numero massimo di unit che mars_nwe potr
                                supportare
        MAX_FILE_HANDLES_CONN   numero massimo di file aperti per connessione
        WITH_NAME_SPACE_CALLS   se si desidera supportare i client ncpfs
        INTERNAL_RIP_SAP        se si desidera che mars_nwe fornisca routing
                                rip/sap
        SHADOW_PWD              se si utilizzano shadow password.



     Le impostazioni predefinite dovrebbero andare bene, tuttavia 
     sempre meglio controllare.  Una volta fatto, con i comandi


          # make
          # make install




     si eseguiranno la compilazione dei server e l'installazione nelle
     directory appropriate.  Verr anche installato il file di
     configurazione /etc/nwserv.conf.


     Configurazione del server
        La configurazione  piuttosto semplice: consiste nel modificare
        il file /etc/nwserv.conf.  Il formato di questo file a prima
        vista appare enigmatico, ma in realt  molto lineare.  Il file
        contiene diverse istruzioni di configurazione composte da una
        sola riga.  Ogni riga  delimitata da spazi bianchi e inizia con
        un numero che indica l'argomento da impostare.  Tutti i
        caratteri che seguono un "#" sono considerati un commento, e
        pertanto ignorati.  Martin fornisce un esempio nel pacchetto, e
        di seguito viene riportato un altro semplificato per offrire una
        possibile alternativa.
























     # VOLUMI (max. 5)
     # Solo il volume SYS  obbligatorio. La directory contenente il volume SYS
     # deve contenere le directory: LOGIN, PUBLIC, SYSTEM, MAIL.
     # L'opzione "n" ignora le lettere maiuscole/minuscole.
     # L'opzione "k" converte tutti i nomi di file all'interno di richieste NCP
     # in lettere minuscole.
     # L'opzione "m" marca il volume come rimovibile (utile, ad esempio,
     # per cdrom).
     # L'opzione "r" imposta il volume come a sola lettura.
     # L'opzione "o" indica che il volume  un file system montato singolarmente.
     # L'opzione "P" consente di utilizzare i comandi come file.
     # L'opzione "O" consente l'utilizzo del namespace OS/2.
     # L'opzione "N" consente l'utilizzo del namespace NFS.
     #  predefinito l'uso delle maiuscole.
     # Sintassi:
     # 1 <Nome del Volume> <Percorso del Volume>   <Opzioni>

     1   SYS     /home/netware/SYS/              # SYS
     1   DATA    /home/netware/DATA/   k             # DATA
     1   CDROM   /cdrom                kmr       # CDROM

     # NOME DEL SERVER
     # Se non impostato, l'hostname Linux sar convertito in lettere maiuscole
     # e utilizzato.  opzionale, se non configurato verr utilizzato
     # l'hostname.
     # Sintassi:
     #       2 <Nome del Server>

     2   LINUX_FS01

     # INDIRIZZO DI RETE INTERNA
     # L'Indirizzo di Rete Interna IPX rappresenta una caratteristica che
     # semplifica il routing IPX per host che possiedono porte su pi di
     # una rete IPX.
     # Sintassi:
     #       3 <Internal Network Address> [<Node Number>]
     # oppure:
     #       3 auto
     #
     # Se si utilizza "auto", verr utilizzato il proprio indirizzo IP host.
     # NOTA: questo potrebbe essere pericoloso, pertanto assicurarsi di
     # assegnare alla propria rete un numero univoco.
     # Gli indirizzi sono esadecimali a 4byte ( necessario che inizino
     # con 0x).

     3       0x49a01010  1

     # DISPOSITIVI DI RETE
     # Questa riga configura la propria rete IPX. Se la propria rete IPX
     #  gi stata configurata, questo inserimento  superfluo. Corrisponde
     # all'utilizzo diipx_configure/ipx_interface prima di attivare il server.
     # Sintassi:
     #       4 <Numero di Rete IPX > <nome del device> <frametype> [<ticks>]
     #                         Frame types: ethernet_ii, 802.2, 802.3, SNAP
     4  0x39a01010  eth0  802.3  1


     # SALVATAGGIO DEGLI INSTRADAMENTI IPX DOPO LO SPEGNIMENTO DEL SERVER
     # Sintassi:
     #    5 <flag>
     #       0 = non salvare i route, 1 = salvare i route

     5 0

     # VERSIONE NETWARE
     # Sintassi:
     #    6 <versione>
     #      0 = 2.15, 1 = 3.11

     6 1

     # GESTIONE DELLA PASSWORD
     # i client Novell DOS reali supportano una caratteristica per criptare
     # la password quando viene modificata.  possibile scegliere se si
     # desidera che il proprio server supporti o meno questa caratteristica.
     # Sintassi:
     #       7 <flag>
     #       dove <flag> pu essere:
     #       0 per forzare la codifica della password. (I client non possono
     #         modificare la password)
     #       1 forza la codifica della password, consente la modifica delle
     #         password non criptate.
     #       7 consente password non criptate ma non password vuote.
     #       8 consente password non criptate, comprese password vuote.
     #       9 per password completamente non criptate (non funziona con OS/2).

     7 1

     # DIRITTI GID e UID MINIMALI
     # abilitazioni utilizzate per connessioni senza login. Tali abilitazioni
     # saranno utilizzate per i file nella propria connessione di server
     # primarie.
     # Sintassi:
     #       10 <gid>
     #       11 <uid>
     #       <gid> <uid> provengono da /etc/passwd, /etc/groups

     10  200
     11  201

     # PASSWORD DEL SUPERVISORE
     # Pu essere rimosso dopo aver avviato il server per la prima volta. Il
     # server cripter questa informazione nel file bindery dopo la sua esecuzione.
     # Si dovrebbe evitare di utilizzare l'utente "root", al contrario 
     # consigliabile usare un altro account per amministrare il fileserver mars.
     #
     # Questa riga viene letta e criptata all'interno dei file bindery del server,
     # pertanto  necessario che esista la prima volta che si avvia il server
     # per assicurarsi che la password non venga scoperta.
     #
     # Sintassi:
     #       12 <Login del Supervisore> <Username Unix> [<password>]

     12  SUPERVISOR  terry  secret

     # ACCOUNT UTENTE
     # Questo associa login NetWare ad account Unix. Le password sono
     # opzionali.
     # Sintassi:
     #       13 <Login Utente> <Username Unix> [<password>]

     13  MARTIN martin
     13  TERRY  terry

     # CONFIGURAZIONE DI LAZY SYSTEM ADMIN
     # Se esiste un grande numero di utenti e non  possibile utilizzare
     # mappe di utenti individuali di tipo 13,  possibile mappare
     # automaticamente i login a mars_nwe con nomi di utenti Linux.
     # TUTTAVIA, attualmente non esiste un modo per fare uso di password
     # di login Linux, pertanto, tutti gli utenti configurati in questo modo
     # utilizzeranno la password impostata in questo punto. Il consiglio  di
     # non farlo, a meno che la sicurezza non sia un optional.
     # Sintassi:
     #       15 <flag> <password comune>
     #   <flag> :    0   - non mappare gli utenti automaticamente
     #               1   - mappa automaticamente gli utenti non configurati
     #              99   - mappa automaticamente tutti gli utenti.

     15  0  duzzenmatta

     # CONTROLLO
     # se si imposta questo flag  mars_nwe si assicurer automaticamente
     # dell'esistenza di certe directory.
     # Sintassi:
     #       16 <flag>
     #       <flag> pu essere 0 per no, o 1 per s.

     16  0

     # CODE DI STAMPA
     # Questo associa le stampanti NetWare alle stampanti Unix. Le directory
     # per le code devono essere create manualmente prima di tentare la stampa.
     # Le directory per le code NON sono code lpd.
     # Sintassi:
     #       21 <nome della coda> <directory della coda> <unix_print_cmd>

     21  EPSON  SYS:/PRINT/EPSON lpr -h
     21  LASER  SYS:/PRINT/LASER lpr -Plaser


     # FLAG DI DEBUG
     # Normalmente non sono necessari, ma possono essere utili se si sta
     # eseguendo il debug di un problema.
     # Sintassi:
     #       <debug_item> <debug_flag>
     #
     #    100 = IPX KERNEL
     #    101 = NWSERV
     #    102 = NCPSERV
     #    103 = NWCONN
     #    104 = start NWCLIENT
     #    105 = NWBIND
     #    106 = NWROUTED
     #                 0 = disabilita il debug, 1 = abilita il debug

     100 0
     101 0
     102 0
     103 0
     104 0
     105 0
     106 0

     # ESECUZIONE DI NWSERV IN BACKGROUND E UTILIZZO DEL FILE DI LOG
     # Sintassi:
     #       200     <flag>
     #       0 = esegue NWSERV in foreground e non utilizza il file di log
     #       1 = esegue NWSERV in background e utilizza il file di log

     200  1

     # NOME DEL FILE DI LOG
     # Sintassi:
     #       201     <file di log>

     201  /tmp/nw.log

     # SCRITTURA SUL FILE DI LOG IN CODA O IN SOVRASCRITTURA
     # Sintassi:
     #       202     <flag>
     #       0 = scrive aggiungendo in coda ad un file di log esistente
     #       1 = sovrascrive un file di log esistente

     202  1

     # TEMPO DI SPEGNIMENTO DEL SERVER
     # Questa riga imposta quanto tempo deve passare dallo spegnimento del
     # server per lo spegnimento effettivo del server.
     # Sintassi:
     #       210     <tempo>
     #       in secondi (il valore predefinito  10)

     210  10

     # INTERVALLO DI ROUTING BROADCAST
     # Esprime il tempo in secondi tra broadcast del server
     # Sintassi:
     #       211     <tempo>
     #       in secondi (il default  60)

     211  60

     # INTERVALLO DI ROUTING LOGGING
     # Imposta quanti broadcast avvengono prima di effettuare la
     # registrazione delle informazioni di rete.
     # Sintassi:
     #       300     <numero>

     300  5

     # FILE DI LOG DEL ROUTING
     # Imposta il nome del file di registrazione del routing
     # Sintassi:
     #       301     <nomefile>

     301  /tmp/nw.routes

     # APPEND/SOVRASCRITTURA DEL FILE DI LOG DEL ROUTING
     # Imposta se si desidera scrivere aggiungendo in coda su un file di
     # log esistente, oppure se si vuole sovrascriverlo.
     # Sintassi:
     #       302     <flag>
     #       <flag> 0 per append, 1 per creazione/sovrascrittura

     302  1

     # TEMPO DI GUARDIA
     # Imposta il tempo per messaggi di guardia in grado di assicurare che
     # la rete sia ancora viva.
     # Sintassi:
     #       310     <valore>
     #       <valore> = 0 - invia sempre dei messaggi
     #                < 0 - (-ve) per disabilitare i messaggi
     #                > 0 - invia messaggi quando il traffico di rete
     #                      scende al di sotto di "n" ticks

     310  7

     # STATION FILE
     # Imposta il nome per i station file che determinano per quali
     # macchine il fileserver si comporter come fileserver primario.
     # La sintassi di questo file  descritta nella directory "examples"
     # del codice sorgente.
     # Sintassi
     #       400     <nomefile>


     400  /etc/nwserv.stations

     # GESTIONE DEL GET NEAREST FILESERVER
     # Imposta la gestione delle richieste "Get Nearest Fileserver" SAP.
     # Sintassi:
     #       401     <flag>
     #       <flag> pu essere: 0 - disabilita le richieste "Get Nearest
     #                              Fileserver".
     #                          1 - Il file "stations" contiene le stazioni
     #                              da escludere.
     #                          2 - Il file "stations" contiene le stazioni
     #                              da includere.

     401  2





     Avviamento del server
        Se il server  stato configurato in modo tale da aspettarsi che
        programmi esterni configurino la rete o forniscano funzionalit
        di instradamento, allora tali programmi devono essere eseguiti
        prima di avviare il server. Invece, supponendo che il server sia
        stato configurato affinch esso stesso configuri le interfacce e
        fornisca i servizi di instradamento, sar sufficiente il solo
        comando:


          # nwserv





     Collaudo del server
        Per controllare un server bisognerebbe in primo luogo collegarsi
        da un client NetWare sulla propria rete.  Quindi impostare un
        CAPTURE dal client ed eseguire una stampa.  Se entrambe queste
        operazioni hanno successo, allora il server  funzionante.


  10.2.  Il pacchetto lwared

  Ales Dryak (A.Dryak@sh.cvut.cz) ha sviluppato lwared per consentire a
  Linux di agire come fileserver basato su NCP.

  Ales ha chiamato il pacchetto lwared, abbreviazione per LinWare
  Daemon.


  10.2.1.  Capacit di lwared

  Il server lwared  in grado di fornire un sottoinsieme delle
  funzionalit complete di NCP Novell.  Comprende la messaggistica ma
  non fornisce alcuna funzionalit di stampa.  Attualmente non funziona
  molto bene con client Windows 95 o Windows NT.  Il server lwared si
  basa sulla presenza di programmi esterni per costruire e aggiornare le
  tabelle di instradamento e SAP di IPX.  Client che non si comportano
  correttamente possono causare problemi al server.   importante
  sottolineare che le funzionalit di traduzione dei filename non sono
  state incluse.

  Il server funziona per shell NETX e VLM NetWare.


  10.2.2.  Come ottenere lwared

  Il pacchetto lwared pu essere compilato per qualsiasi kernel
  successivo al 1.2.0, anche se  consigliata la versione 1.2.13 poich
  in tal modo non sono necessari patch per il kernel.  Alcune delle
  funzionalit IPX sono cambiate con kernel di versione 1.3.*: questo
  significa che sono necessari patch specifici per fare in modo che
  lwared funzioni correttamente.  Esistono patch appropriati per i nuovi
  kernel, pertanto se si deve utilizzare un kernel alpha dovrebbe essere
  possibile avere lwared correttamente funzionante.

  Il pacchetto lwared pu essere ottenuto tramite ftp anonimo da:
  klokan.sh.cvut.cz /pub/linux/linware/ o da: sunsite.unc.edu
  /pub/Linux/system/network/daemons o siti mirror.  La versione al
  momento in cui questo documento viene scritto : lwared-0.95.tar.gz.


  10.2.3.  Compilazione di lwared


     Esecuzione del comando tar per il pacchetto lwared
        Qualcosa del tipo:

        # cd /usr/src
        # tar xvpfz lwared-0.95.tar.gz




     Compilazione di un kernel con supporto Ethernet e IPX
        Coloro che utilizzano un kernel alpha 1.3.*, dovrebbero passare
        alla versione 1.3.17 o superiore poich le patch supportate sono
        state create per questa versione.  I kernel 1.3.*  pi vecchi
        della versione 1.3.17 richiederanno una installazione manuale
        delle patch (il file INSTALL contenuto nel pacchetto riporta
        alcune informazioni su come eseguire questa operazione).  Per
        installare le patch su un kernel 1.3.17 si pu digitare il
        comando:

        # make patch



     Il passo successivo all'applicazione delle patch, consiste
     nell'assicurarsi che sia stata eseguita la compilazione del kernel
     con abilitazione del supporto IPX.  In un kernel di versione 1.2.13
      sufficiente aver risposto ``Y'' alla domanda: ``The IPX
     protocol'', come illustrato nell'esempio che segue:

      ...
      ...
     Assume subnets are local (CONFIG_INET_SNARL) [y]
     Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n]
     The IPX protocol (CONFIG_IPX) [n] y
     *
     * SCSI support
      ...
      ...



     In kernel pi recenti il procedimento  analogo, tuttavia il testo
     del messaggio potrebbe essere leggermente diverso.
     Inoltre,  necessario includere il driver appropriato per la
     propria scheda Ethernet.  Maggiori informazioni in l'Ethernet-
     HOWTO.

     A questo punto  possibile procedere con la compilazione del
     kernel.  Non si dimentichi di eseguire lilo una volta terminata
     l'operazione.


     Compilazione e installazione di lwared
        Per compilare lwared controllare in primo luogo, e modificare se
        necessario, il file server/config.h.  Il file contiene diverse
        impostazioni che guideranno il comportamento del server.  I
        valori predefiniti dovrebbero essere corretti, tuttavia si
        dovrebbe controllare che le directory specificate per i file di
        log corrispondano alle impostazioni del proprio sistema.

        # make depend
        # make
        # make install



     Pu accadere che il comando ``make depend'' sembri non trovare il
     file float.h sul sistema, tuttavia dovrebbe funzionare comunque.
     Pu anche accadere che, effettuando la compilazione con gcc 2.6.3
     sia necessario modificare la riga:

     #include <net/route.h>



     con

     #include <net/if_route.h>



     all'interno di /lib/ipxkern.c poich, talvolta questo file ha un
     nome diverso.

     Il comando ``make install'' tenter di installare il server e i
     programmi del demone di routing all'interno della directory
     /usr/sbin, il programma lwpasswd in /usr/bin, i programmi di
     utilit IPX in /sbin e infine, le pagine di manuale verranno
     installate nella directory /usr/man.  Se qualcuna di queste
     locazioni non fosse disponibile nel sistema, sar necessario
     modificare il Makefile per impostare le directory destinazione.


  10.2.4.  Configurazione e utilizzo di lwared


     Configurazione della rete IPX
        La prima cosa da fare consiste nella configurazione delle
        interfacce Ethernet per supportare le reti IPX supportate dal
        proprio server.   necessario conoscere gli indirizzi di rete
        IPX per ciascuno dei propri segmenti LAN, quale dispositivo
        Ethernet (eth0, eth1 ecc.) si trova su ciascun segmento, quale
        tipo di trama (802.3, EtherII ecc.) viene utilizzata da ogni
        segmento LAN e quale indirizzo di Rete Interna deve essere
        utilizzato dal proprio server (fondamentale se il server offre
        servizi a pi di un segmento LAN).  Esempio di configurazione
        per un server su due segmenti dissimili con indirizzi di rete
        IPX 23a91300 e 23a91301 e indirizzo di rete interna bdefaced:

        # ipx_internal_net add BDEFACED 1
        # ipx_interface add eth0 802.3 23a91300
        # ipx_interface add eth1 etherii 23a91301




     Avvio dei demoni di instradamento
        Il kernel instrada i pacchetti IPX come pure per IP, tuttavia
        sono richiesti programmi aggiuntivi per gestire l'aggiornamento
        delle tabelle.  Nel caso di IPX, sono necessari due demoni,
        entrambi supportati da lwared: ipxripd gestisce le informazioni
        di instradamento e ipxsapd le informazioni di SAP.  Per avviare
        i demoni  sufficiente specificare la locazione in cui devono
        scrivere i propri messaggi di log:

        # ipxripd /var/adm/ipxrip
        # ipxsapd /var/adm/ipxsap




     Configurazione del server lwared
         necessario eseguire la configurazione manuale di due file per
        consentire il login al server lwared.  Tali file sono:

        /etc/lwpasswd
           In questo file vengono memorizzate le informazioni di account
           dell'utente.  Il programma lwpasswd  utilizzato per
           mantenerlo aggiornato.  La sua forma pi semplice del file
           /etc/lwpasswd :

           ales:
           terryd:
           guest:



        Si tratta di una semplice lista di identificativi di login,
        seguiti dal carattere ``:'' e dalla versione criptata della
        password.  Due importanti avvertimenti sono: l'assenza di
        password criptate significa che non ne esiste alcuna, gli utenti
        LinWare devono avere un account per Linux quindi ogni utente
        presente nel file /etc/lwpasswd deve apparire anche in
        /etc/passwd; l'utente root  l'unico in grado di modificare le
        password di un altro utente LinWare come di seguito indicato:

        # lwpasswd rodg
        Changing password for RODG
        Enter new password:
        Re-type new password:
        Password changed.




        /etc/lwvtab
           Si tratta delle tabelle relative al volume LinWare e in esse
           sono memorizzate le informazioni su directory da rendere
           disponibili agli utenti LinWare (la natura del file  simile
           a quella di /etc/exports di NFS).  Un semplice esempio del
           suo formato :




           SYS             /lwfs/sys
           DATA            /lwfs/data
           HOME            /home



        Il nome del Volume  seguito da spazi bianchi seguiti dalle
        directory Linux da esportare.  Ci deve essere almeno una riga
        relativa al volume SYS affinch un server possa avviarsi.  Se si
        desidera che i propri utenti DOS siano in grado di utilizzare il
        proprio server LinWare come server primario, allora deve essere
        installata una struttura standard per il volume SYS sotto la
        directory che viene esportato come volume SYS.  Dal momento che
        il copyright di questi file appartiene a Novell Corporation, 
        necessario possedere una licenza per il loro utilizzo.  Se gli
        utenti utilizzeranno un file server Novell come server primario,
        allora la licenza non  necessaria.


     Avvio del server lwared
        lwared viene avviato tramite il comando:

        # lwared



     Se il server  stato avviato come mostrato, il nome del server
     LinWare dipender dalla risposta dell'hostname Linux.  Se si
     desidera un nome diverso,  possibile indicarlo esplicitamente.  Ad
     esempio, il comando:

     # lwared -nlinux00



     avvia il server con nome linux00.


     Collaudo del server lwared
        La prima cosa da controllare  la presenza del proprio server
        LinWare nell'elenco fornito dal comando slist (eseguito su un
        client DOS della propria rete).  Il programma slist  presente
        nel volume SYS di un fileserver Novell, pertanto pu essere
        eseguire solo da una macchina gi collegata.  Se l'esito 
        negativo, controllare che ipxsapd e lwared siano entrambi in
        esecuzione.  Al contrario, se l'esito  positivo, si tenti la
        connessione al server e il mount di un volume, tramite:

        C:> attach linux00/ales
         ...
         ...
        C:> map l:=linux00/data:
        C:> l:



     A questo punto dovrebbe essere possibile lavorare con il nuovo
     disco proprio come con qualsiasi altro disco.  Le abilitazioni ai
     file corrisponderanno a quelle dell'account a Linux parallelo al
     proprio login LinWare.






  11.  Configurazione della macchina Linux come client di stampa Novell

  Il pacchetto npcfs contiene due piccoli programmi che consentono di
  indirizzare una stampa dalla propria macchina Linux verso una
  stampante collegata a un server di stampa Novell.  Il comando nprint
  permette spedire un file a una coda di stampa Netware.  Il comando
  pqlist fornisce la lista delle code di stampa disponibili.

  Per ottenere e installare questi comandi,  sufficiente seguire le
  istruzioni relative al client NCP descritte in precedenza.

  Entrambi i comandi richiedono che siano forniti il proprio username e
  password, qundi per facilitare le operazioni, a volte si preferisce
  realizzare qualche shell script.  Un esempio per i comandi potrebbe
  essere:


       # pqlist -S ACCT_FS01 -U guest -n
       # nprint -S ACCT_FS01 -q LASER -U guest -n filename.txt




  La sintassi per il login  simile a quella del comando ncpmount.
  Negli esempi sopra riportati si assume che il fileserver ACCT_FS01
  abbia un account ``guest'' senza password, che esista una coda di
  stampa di nome LASER e che l'utente ``guest'' sia in grado di eseguire
  stampe su di essa.

  Nella macchina Linux dell'autore c' un corto shell script per
  ciascuna stampante Novell. Questo pu essere usato come filtro di
  stampa per consentire la stampa usando lo spooler standard di Linux.


  12.  Configurazione di una macchina Linux come print server Novell

  Il pacchetto npcfs contiene un programma che consente alla macchina
  Linux di comportarsi come un server di stampa su una rete NetWare.
  Per sapere come ottenere ed eseguire la compilazione di tale
  programma, seguire le istruzioni contenute nel paragrafo relativo al
  ``Client NetWare''.  Alternativamente, il supporto  incluso nel
  pacchetto mars_nwe.



  12.1.  Prerequisiti

  La configurazione  piuttosto semplice ma si basa sul fatto che la
  configurazione di stampa sia gi stata completata e sia funzionante
  sotto Linux.  Questo argomento  trattato pi in dettaglio all'interno
  del Printing-HOWTO


  12.2.  Configurazione

  Quando si ha a disposizione una configurazione di stampa funzionante,
  e l'utility pserver  stata compilata e installata,  necessario
  aggiungere dei comandi per avviarla all'interno dei propri file rc.

  Il comando da utilizzare dipende da come si desidera che funzioni,
  tuttavia nella sua forma pi semplice il comando sar del tipo:



       # pserver -S ACCT_01 -U LASER -P secret -q LASERJET

  Questo comando richiede all'utility pserver di effettuare un login al
  file server ACCT_01 con username ``LASER'' e password ``secret'' e di
  prelevare dei job dalla coda di stampa LASERJET.  Quando viene
  ricevuto un job di stampa, il comando predefinito lpr lo invier al
  demone di stampa Linux. La coda di stampa deve gi essere definita sul
  fileserver e lo username deve avere privilegi per la coda.

  Alternativamente, sarebbe stato possibile utilizzare qualsiasi comando
  Linux per accettare e stampare il job.  L'opzione -c consente di
  specificare il corretto comando di stampa.  Ad esempio, il comando:



       # pserver -S ACCT_01 -U LASER -P secret -q LASERJET -c "lpr -Plaserjet"




  avrebbe il medesimo risultato dell'esempio precedente, ma il job
  verrebbe inviato alla configurazione laserjet del printcap in luogo di
  quella predefinita.


  13.  Panoramica sui comandi utente e di amministrazione di ncpfs

  Le versioni pi recenti del pacchetto ncpfs di Volker includono
  diversi comandi utente e di amministrazione.  I tool sono installati
  come parte del processo di installazione di ncpfs, pertanto se non
  fossero disponibili, si consiglia di seguire le istruzioni contenute
  nel paragrafo relativo ai "``Client Novell''" per eseguire
  compilazione ed installazione.

  Informazioni dettagliate sono presenti all'interno del manuale;
  tuttavia, nel seguito viene riportata una breve descrizione dei
  comandi.


  13.1.  Comandi utente


     ncopy
        Network Copy -- copia file in modo efficiente tramite l'utilizzo
        di una funzione NetWare in luogo di eseguire una copia
        attraverso la rete.

     nprint
        Network Print -- stampa un file indirizzato a una coda di stampa
        Netware di un server Netware.

     nsend
        Network Send -- invia messaggi ad altri utenti su un server
        Netware.

     nwbols
        List Bindery Objects -- elenca informazioni di bindery di un
        server Netware.

     nwboprops
        List Properties of a Bindery Object -- elenca le propriet di un
        oggetto bindery Netware.

     nwbpset
        Set Bindery Property -- imposta le propriet di un oggetto
        bindery Netware.


     nwbpvalues
        Print Netware Bindery Objects Property Contents -- stampa il
        contenuto di un oggetto bindery Netware.

     nwfsinfo
        Fileserver Information -- stampa le informazioni di base di un
        server Netware.

     nwpasswd
        Netware Password -- modifica la password di utenti Netware.

     nwrights
        Netware Rights -- visualizza i diritti associati a un
        determinato file o directory.

     nwuserlist
        Userlist -- fornisce l'elenco di utenti collegati a un file
        server Netware.

     pqlist
        Print Queue List -- visualizza il contenuto di una coda di rete
        Netware.

     slist
        Server List -- visualizza un elenco di file server Netware
        conosciuti.


  13.2.  Strumenti per la gestione


     nwbocreate
        Create a Bindery Object -- crea un oggetto bindery Netware.

     nwborm
        Remove Bindery Object -- cancella un oggetto bindary Netware.

     nwbpadd
        Add Bindery Property -- imposta il valore di una propriet
        esistente di un oggetto bindary Netware.

     nwbpcreate
        Create Bindery Property -- crea una nuova propriet per un
        oggetto bindary Netware esistente.

     nwbprm
        Remove Bindery Property -- elimina una propriet di un oggetto
        bindary Netware.

     nwgrant
        Grant Trustee Rights -- assegna diritti di amministrazione a una
        directory su un file server Netware.

     nwrevoke
        Revoke Trustee Rights -- rimuove diritti di amministrazione da
        una directory su un fileserver Netware.


  14.  Configurazione di PPP  per reti con supporto IPX

  Le nuove versioni per il demone PPP pppd di Linux consentono il
  trasporto dei pacchetti IPX attraverso un collegamento seriale PPP.  
  necessaria almeno la versione ppp-2.2.0d del demone.  Si faccia
  riferimento al PPP-HOWTO per informazioni dettagliate su dove
  trovarlo.  Quando si compila pppd  necessario abilitare il supporto
  IPX aggiungendo le due righe seguenti:
       IPX_CHANGE = 1
       USE_MS_DNS = 1




  al file: /usr/src/linux/pppd-2.2.0f/pppd/Makefile.linux.


     IPX_CHANGE
        configura il supporto IPX all'interno di PPP.

     USE_MS_DNS
        abilita le macchine Microsoft Windows 95 a eseguire Name
        Lookups.

  L'unica particolarit per farlo funzionare consiste nella
  configurazione.

  Esistono diversi modi per farlo, tuttavia ne verranno descritti solo
  due, entrambi non ancora verificati.  Pertanto, si consideri questo
  paragrafo come sperimentale, e chiunque ottenga dei risultati positivi
   invitato a comunicarlo.


  14.1.  Configurazione di un server IPX/PPP

  Innanzi tutto,  necessario configurare la propria macchina Linux come
  server IP/PPP.  Si tratta di un'operazione tutt'altro che difficile.
  Ancora una volta, si invita a seguire le istruzioni contenute in PPP-
  HOWTO  e si otterranno i risultati desiderati.  Dopo di che sono
  sufficienti modifiche minime per fare in modo che IPX funzioni con la
  stessa configurazione.


  14.1.1.  Primi passi

  Uno dei primi passi consiste nella configurazione della propria
  macchina Linux come router IPX come descritto in un paragrafo
  precedente.  Non sar necessario utilizzare il comando ipx_route per
  l'interfaccia ppp poich pppd stesso effettuer la configurazione come
  viene fatto per IP.  Nel momento in cui il demone ipxd entra in
  funzione, rilever automaticamente ogni nuova interfaccia IPX e
  propagher instradamenti per ognuna di esse.  In tal modo, i propri
  host dialup potranno essere automaticamente visti da altre macchine al
  momento della loro connessione.


  14.1.2.  Progettazione

  Quando la macchina lavora come server, sar propria responsabilit
  assegnare indirizzi di rete a ciascuna delle connessioni PPP nel
  momento in cui vengono stabiliti.   molto importante sapere che ogni
  connessione PPP sar una rete IPX e avr indirizzo di rete IPX
  univoco.  Questo significa che  necessario decidere come saranno
  allocati gli indirizzi e la loro corrispondenza.  Una semplice
  convenzione consiste nell'allocare un indirizzo di rete IPX a ogni
  dispositivo seriale che supporter IPX/PPP.   possibile allocare gli
  indirizzi di rete IPX in relazione all'identificativo di login
  dell'utente connesso, tuttavia in genere non esistono particolari
  motivi per farlo.

  Nel seguito si suppone che questo sia stato fatto, e che vengano usati
  due dispositivi seriali (modem).  Gli indirizzi assegnati in questo
  esempio sono:

       device IPX Network Address
       ------ -------------------
       ttyS0  0xABCDEF00
       ttyS1  0xABCDEF01





  14.1.3.  Configurazione di pppd  per il server

  Si esegua la configurazione del file /etc/ppp/options.ttyS0 nel modo
  seguente:



       ipx-network 0xABCDEF00
       ipx-node 2:0
       ipxcp-accept-remote




  e quella del file /etc/ppp/options.ttyS1:



       ipx-network 0xABCDEF01
       ipx-node 3:0
       ipxcp-accept-remote




  Questi comandi richiederanno a pppd di allocare alla connessione, nel
  momento in cui viene stabilita, gli indirizzi di rete IPX appropriati,
  di impostare il numero di nodo locale a 2 o 3 e lascer che il nodo
  remoto sovrascriva il proprio numero di nodo con quello che esso
  stesso conosce.  Si noti che ognuno degli indirizzi  composto da
  cifre esadecimali e che 0x  necessario all'inizio dell'indirizzo di
  rete, ma non all'inizio dell'indirizzo del nodo.  Esistono altri
  metodi per configurare le stesse informazioni.  Disponendo di un solo
  modem,  sufficiente modificare il file /etc/ppp/options.  In
  alternativa, queste informazioni possono essere passate a pppd tramite
  righe di comando.


  14.1.4.  Verifica della configurazione del server

  Per verificare la configurazione  necessario avere a disposizione un
  client del cui funzionamento si sia certi.  Quando il chiamante
  compone il numero, si collega e pppd viene avviato, esso assegner
  l'indirizzo di rete, comunicher al client il numero di nodo del
  server e negozier il numero di nodo del client.  Una volta completata
  questa operazione, e dopo che ipxd abbia rilevato la nuova
  interfaccia, il client dovrebbe essere in grado di stabilire le
  connessioni con gli host remoti.


  14.2.  Configurazione di un client IPX/PPP

  Durante la configurazione di un client, il fatto di configurare o meno
  la propria macchina Linux come router IPX dipende dall'avere o meno
  una LAN locale che si desidera funzioni come un router IPX.  Se si sta
  collegando una singola macchina (standalone) a un server IPX, non 
  necessario eseguire ipxd come descritto.  Una configurazione di questo
  tipo  molto pi semplice poich non devono essere configurati diversi
  dispositivi seriali.


  14.2.1.  Configurazione di pppd  per il client

  La configurazione pi semplice  quella che consente al server di
  fornire tutte le informazioni circa la configurazione della rete IPX.
  Tale configurazione sar compatibile con quella del server sopra
  descritta.   necessario aggiungere alcune opzioni al proprio file
  /etc/ppp/options:


       ipxcp-accept-network
       ipxcp-accept-remote
       ipxcp-accept-local




  Queste opzioni richiedono a pppd di comportarsi in modo completamente
  passivo e di accettare tutti i dettagli di configurazione dal server.
  Potrebbero essere forniti dei valori di default per i server che non
  forniscono dettagli aggiungendo le righe relative a ipx-network e ipx-
  node in modo analogo a quanto descritto per la configurazione del
  server.


  14.2.2.  Verifica del client IPX/PPP

  Per verificare il client  necessario collegarsi a un server del cui
  funzionamento si sia certi.  Dopo aver attivato il collegamento e dopo
  che pppd sia stato avviato, dovrebbe essere possibile vedere i
  dettagli IPX configurati sul proprio dispositivo ppp0 se si esegue il
  comando ifconfig.  Allo stesso modo, dovrebbe essere possibile
  utilizzare ncpmount.

  Non  certa la necessit di aggiungere manualmente gli instradamenti
  IPX in modo da poter raggiungere fileserver distanti.  Se qualche
  lettore  in grado di dare dei suggerimenti, sarebbero estremamente
  graditi.


  15.  Il tunnel IPX su IP

  Molto frequentemente si verifica la situazione in cui due Reti Locali
  (LAN) Novell sono in collegamento tramite un'unica connessione IP.  In
  questo caso ad esempio, com' possibile, giocare a DOOM per DOS in pi
  giocatori? Andreas Godzina (ag@agsc.han.de)  in grado di fornire una
  risposta che consiste in ipxtunnel.

  ipxtunnel incapsula pacchetti IPX con datagrammi TCP/IP, in modo che
  possano essere trasportati con una connessione TCP/IP.  ipxtunnel
  resta in ascolto e quando rileva un pacchetto IPX, lo ingloba in un
  datagramma TCP/IP e lo instrada verso l'indirizzo IP remoto
  specificato.  Affinch questo i procedimento funzioni, la macchina
  verso cui viene instradato l'IPX incapsulato deve necessariamente
  avere in esecuzione un copia della stessa versione di ipxtunnel.


  15.1.  Come ottenere ipxtunnel

  ipxtunnel pu essere ottenuto da sunsite.unc.edu
  /pub/Linux/system/network/daemons o siti mirror.


  15.2.  Compilare ipxtunnel

   possibile eseguire la compilazione di ipxtunnel tramite i comandi:


       # cd /usr/src
       # tar xvfz .../ipxtunnel.tgz
       # cd ipxtunnel
       # make





  15.3.  Configurazione di ipxtunnel

  La configurazione di ipxtunnel  molto semplice.  Si supponga che la
  macchina di un amico sia gau.somewhere.com e che la propria macchina
  sia denominata gim.sw.edu.  ipxtunnel utilizza il file di
  configurazione /etc/ipxtunnel.conf, che consente di specificare la
  porta UDP predefinita da utilizzare per la connessione TCP/IP alla
  quale verranno inviati i dati incapsulati, e su quali delle proprie
  interfacce locali ipxtunnel dove stare in ascolto e consegnare
  pacchetti IPX.

  Una configurazione molto semplice  riportata nell'esempio che segue:


       #
       # /etc/ipxtunnel.conf per gim.sw.edu
       #
       # Porta UDP da utilizzare: (valore predefinito 7666)
       port 7777
       #
       # Macchina remota a cui inviare i pacchetti IPX:
       # (nessun valore predefinito)
       remote gau.somewhere.com
       #
       # Interfacce locali su cui restare in ascolto di IPX:
       # (valore predefinito eth0)
       interface eth0
       interface eth1




  Ovviamente, l'altra macchina possieder un file di configurazione
  simile che definisce questa macchina come host remoto.


  15.4.  Verifica e utilizzo di ipxtunnel

  ipxtunnel si comporta come un ponte (bridge) IPX, quindi le reti IPX
  che si trovano a entrambi gli estremi della connessione dovrebbero
  essere parti della stessa.  Andreas non ha mai verificato il
  funzionamento di ipxtunnel in un ambiente davvero in grado di
  supportare servizi di file Novell, pertanto se qualche lettore dovesse
  realizzarlo  pregato di far sapere ad Andreas gli esiti della prova.

  Se ipxtunnel funziona,  possibile l'avvio delle macchine DOOM a
  entrambi gli estremi della connessione in modalit IPX.  Le due
  macchine dovrebbero essere in grado di vedersi.  Andreas ha utilizzato
  questo codice solo su linee a buona velocit e quindi non  in grado
  di fare affermazioni sulle prestazioni con connessioni a bassa
  velocit.  Ancora una volta, si invita a comunicare successi o
  insuccessi.
  16.  Supporto commerciale IPX per Linux



  16.1.  Network Desktop di Caldera

  La societ Caldera Inc. produce una distribuzione di Linux che
  caratterizza un insieme di miglioramenti supportati commercialmente,
  incluso il pieno supporto funzionale ai client NetWare Novell.  La
  distribuzione di base  la ben nota Red Hat Linux Distribution e
  Caldera vi ha aggiunto il proprio prodotto ``Network Desktop''.  Il
  supporto NetWare fornisce un client con piene caratteristiche NetWare
  Novell costruito sulla tecnologia della Novell Corporation.  Il client
  fornisce pieno accesso ai fileserver 3.x e 4.x e include
  caratteristiche come NetWare Directory Service (NDS) e crittografia
  RSA.

   possibile ottenere ulteriori informazioni e ordinare dei dettagli
  da: Caldera Inc Web Server (http://www.caldera.com/).

  Se si lavora in un ambiente Netware 4.x e/o NDS, il Caldera Netware
  Client rappresenta l'unica soluzione disponibile.

  Se un'applicazione ``industriale''  critica per il supporto Novell,
  allora sarebbe opportuno dare un'occhiata al prodotto della Caldera.


  17.  Alcune domande frequenti (FAQ)


     Dove si pu trovare il software IPX per Linux supportato commer
        cialmente?
        La Caldera Corporation offre un client con licenza e con pieno
        supporto Netware 3.x e 4.x.   possibile ottenere informazioni a
        riguardo dal Caldera Inc Web Server (http://www.caldera.com/).

     Il software IPX lavora con Arcnet/Token Ring/ ecc...?
        Il software IPX  in grado di lavorare con le interfacce Arcnet
        e Token Ring.  Non si hanno ancora notizie di tentativi con
        AX.25.  La configurazione  la stessa che per ethernet, tranne
        la necessit di sostituire i nomi di dispositivi appropriati in
        luogo di ``eth0'' e gli appositi indirizzi hardware dove
        necessario.

     Come si configura pi di un'interfaccia?
        Se la propria macchina contiene pi di un'interfaccia, non si
        dovrebbe usare la configurazione ``plug'n'play'', ma si dovrebbe
        utilizzare il comando ipx_interface per configurare ciascuna di
        esse manualmente.

     Come scegliere gli indirizzi IPX?
        Il networking IPX  simile, ma non identico, al networking IP.
        La differenza principale consiste nel modo di utilizzo degli
        indirizzi.  IPX non utilizza il concetto di ``subnetworking'',
        pertanto l'ordinamento delle associazioni esistenti tra
        indirizzi di rete e reti  differente.  Le regole sono molto
        semplici:

       Ogni indirizzo di rete IPX deve essere univoco su una rete
        geografica.  Questo include gli Indirizzi di Rete Interna.
        Molte organizzazioni che utilizzano IPX su una rete geografica
        avranno una sorta di indirizzamento standard che  utile
        seguire.

       Ogni indirizzo di host su una rete individuale deve essere
        univoco.  Questo significa che ogni host su ciascuna rete IPX
        deve avere un indirizzo assegnato in modo univoco.  Nel caso di
        una rete ethernet  molto semplice, dal momento che le schede
        stesse hanno un indirizzo univoco.  Nel caso di IPX/PPP bisogna
        assicurarsi di allocare indirizzi univoci a tutti gli host della
        rete, indipendentemente dall'estremo delle connessioni ai quali
        sono collegati.  Non  necessario che gli indirizzi degli host
        siano univoci lungo una rete geografica, dal momento che
        l'indirizzo di rete viene utilizzato insieme all'indirizzo
        dell'host per identificarlo in modo univoco.

     Quali sono i tipi di trama da utilizzare?
        Esistono molti ``frame type'' sui quali  possibile eseguire
        IPX.  I pi comuni sono descritti nel paragrafo ``termini
        comuni'' di questo documento (alla voce: ``tipo di frame'').  Se
        si sta installando la propria macchina su una rete esistente, si
        dovrebbero utilizzare quelli che sono gi in uso per avere la
        possibilit di interagire con gli altri host della rete, ma se
        l'installazione avviene su una rete completamente nuova e si
        desidera gestire traffico sia IPX, sia IP, allora deve essere
        utilizzato il frame type Ethernet_II.

     Le macchine Windows95 possono interferire con l'autorilevamento del
        tipo di frame?
        Apparentemente sembra accadere.  Si suggerisce di utilizzare la
        configurazione manuale (e si tratta comunque del metodo
        migliore) del tipo di frame in luogo di quella automatica.

     Perch appare il messaggio `invalid argument' durante la
        configurazione di IPX?
        Probabilmente non  in esecuzione un kernel in grado di
        supportare IPX.  Le possibili soluzioni consistono nel
        ricompilare il proprio kernel in modo da abilitare il supporto,
        oppure controllare nuovamente di aver utilizzato lilo per
        installare e avviare il nuovo kernel.

     Perch appare il messaggio `package not installed' durante la
        configurazione di IPX?
        Probabilmente non  in esecuzione un kernel in grado di
        supportare IPX.  Le possibili soluzioni consistono nel
        ricompilare il proprio kernel in modo da abilitare il supporto,
        oppure controllare nuovamente di aver utilizzato lilo per
        installare e avviare il nuovo kernel.

     Perch appare il messaggio `IPX support not in kernel' da pppd?
        Probabilmente IPX  stato compilato come modulo senza
        assicurarsi di averlo caricato prima di avviare pppd.

     Come eseguire l'esportazione NFS di un filesystem NCP montato?
        L'utilizzo di NFS per esportare un filesystem NCP richiede che
        il suo collegamento sia stato eseguito utilizzando l'opzione
        ncpmount -V.  Questa opzione consente di montare un solo volume
        di un fileserver anzich di tutti i volumi contemporaneamente.
        In questo modo, il proprio demone NFS consentir di esportare
        tale file system con le solite modalit.

     Perch il comando `slist' non funziona se la rete interna contiene
        mars_nwe?
         necessario abilitare ``get nearest server''.  Ossia, la riga
        401 nel file /etc/nwserv.conf dovrebbe essere 0 a meno che non
        esistano particolari motivi per non voler rispondere a ``get
        nearest servers''.  Se si desidera solamente che il comando
        ``slist'' funzioni senza rispondere a ogni richiesta ``get
        nearest server'', includere i propri numeri di rete interna e di
        nodo nel file /etc/nwserv.stations, quindi impostare la riga 401
        nel file /etc/nwserv.conf con il valore 2.

     Il pacchetto ncpfs funziona con mars_nwe?
        Il codice di Martin e Volker sta lentamente iniziando a
        convergere.  Versioni recenti di mars_nwe contengono un'opzione
        che consente il funzionamento con ncpfs.   necessario abilitare
        WITH_NAME_SPACE_CALLS nel file mars_nwe config.h.

     Esiste software per MSDOS gratuito funzionante con mars_nwe?
        Martin possiede un pacchetto distribuito insieme a mars_nwe che
        offre supporto client DOS gratuito per il server mars_nwe.  
        disponibile nello stesso sito del server, con nome
        mars_dosutils-0.01.tgz.  Include codice sorgente in C,
        compilabile con Borland(tm) C, per programmi come slist.exe,
        login.exe, map.exe ecc.


  18.  Copyright

  The IPX-HOWTO, a guide to software supporting the IPX protocol for
  Linux.  Copyright (c) 1995 Terry Dawson.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the:

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore legale.


  IPX-HOWTO (traduzione italiana
  <http://www.pluto.linux.it/ildp/HOWTO/IPX-HOWTO.html>), guida al
  supporto software del protocollo IPX per Linux.  Copyright (c) 1995
  Terry Dawson.

  Questo HOWTO  gratuito; pu essere distribuito e/o modificato sotto i
  termini della GNU General Public License come pubblicato dalla Free
  Software Foundation; sia la versione 2 della Licenza, sia ogni altra
  versione successiva.

  Questa documentazione viene distribuita con la speranza che possa
  essere utile, ma SENZA ALCUNA GARANZIA, senza neanche la garanzia
  implicita di COMMERCIABILITA' o IDONEITA' PER UNO SCOPO PARTICOLARE.
  Si faccia riferimento alla GNU General Public License per ulteriori
  dettagli.

  Copia della GNU General Public License dovrebbe essere allegata a
  questa documentazione; se cos non fosse, scrivere a:


       Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
       MA 02139, USA.


  19.  Varie e ringraziamenti

  Terry Dawson <terry@perf.no.itg.telstra.com.au> per il documento
  originale.

  David E. Storey (dave@tamos.gmu.edu) e Volker Lendecke
  (lendecke@namu01.gwdg.de) entrambi hanno dato una grande assistenza
  fornendomi informazioni per questo documento.  Gilbert Callaghan
  (gilbert@pokey.inviso.com), David Higgins (dave@infra.com) e Chad
  Robinson (chadr@brtgate.brttech.com) hanno contribuito alle
  informazioni sulla configurazione di IPX/PPP.  Bennie Venter (bjv@Gil-
  galad.paradigm-sa.com) ha contribuito fornendo utili informazioni
  relative ai tipi di frame.  Christopher Wall (vergil@idir.net) ha
  fornito utili suggerimenti per migliorare la leggibilit e il layout
  del documento.  Anche Axel Boldt (boldt@math.ucsb.edu) ha contribuito
  con utili suggerimenti.  Erik D. Olson (eriko@wrq.com) ha fornito
  utili informazioni sulla configurazione di PPP per IPX.  Brian King
  (root@brian.library.dal.ca) ha contribuito al paragrafo delle domande
  frequenti.

  ``NetWare''  un marchio registrato (registered trademark) di Novell
  Corporation.

  ``Caldera''  un marchio registrato (registered trademark) di Caldera
  Corporation.


  Saluti Kevin Thorpe.

  <kevin@pricetrak.com>




































  ISP-Hookup-HOWTO
  Egil Kvaleberg, egil@kvaleberg.no
  v1.26, 5 Marzo 1998

  Questo documento descrive come usare Linux per collegarsi a un Inter
  net Service Provider tramite una connessione TCP/IP via modem.  Oltre
  alla procedura basilare di chiamata e attivazione del collegamento, si
  descrive anche la gestione della posta e delle news.  Traduzione ital
  iana e manutenzione: Jose Luis Scanferlato (jls@acm.org).



  1.  Introduzione

  Questa descrizione  stata fatta per rispondere alcune delle domande
  di coloro che intendono configurare e usare Linux per collegarsi ai
  rispettivi ISP (Internet Service Provider) tramite collegamento
  telefonico.

  Per aiutare anche i meno esperti, si  tentato di coprire la maggior
  parte dei problemi incontrati. Questo creer inevitabilmente un certo
  grado di sovrapposizione con altri documenti Howto di Linux e libri
  del LDP. Questi documenti dovrebbero essere consultati per un maggiore
  approfondimento e dettagli.

  La maggior parte della documentazione esistente  diretta a utenti con
  una certa esperienza, e quindi i principianti avranno spesso problemi
  ad individuare le informazioni significative.

  Per semplificare, negli esempi che seguiranno, verranno usate le
  seguenti informazioni:


    User name: dirk

    Password: PrettySecret

    Internet service provider: acme.xz

    Email server: mail.acme.xz

    News server: news.acme.xz

    Name server: 193.212.1.0

    Numero di telefono: 12345678

  Il nostro dirk chiamer il suo computer roderick.

  Tutti i riferimenti della tabella precedente dovrebbero naturalmente
  essere sostituiti con i valori adatti all'Internet Provider che si
  desidera usare. Spesso, un minimo di cambiamenti sar sufficiente per
  quelli che hanno pi Internet Provider. Mi piacerebbe essere informato
  sui problemi che riscontrate in merito.


  1.1.  Copyright

  Copyright (c) 1996,1997,1998 by Egil Kvaleberg. Questo documento pu
  essere distribuito sotto le condizioni stabilite dalla licenza LDP da
  http://sunsite.unc.edu/LDP/COPYRIGHT.html





  1.2.  Disconoscimento

  L'autore non si assume nessuna responsabilit sul contenuto di questo
  documento. Usate i concetti, esempi e tutto quanto a vostro proprio
  rischio.

  Una delle molte possibili configurazioni verr descritta. Nel mondo
  Linux, normalmente esistono pi modi di ottenere una cosa. I paragrafi
  contenenti suggerimenti alternativi sono contraddistinti da
  ALTERNATIVA: Tenete anche in considerazione che i riferimenti FTP
  spesso cambiano man mano che arrivano nuove versioni.

  Saranno descritti soltanto programmi che sotto certe condizioni (per
  quanto ne so Io) possono essere usati o valutati per scopi privati. La
  maggior parte dei programmi sono disponibili con i rispettivi sorgenti
  sotto condizioni GNU o simile.


  1.3.  Traduzioni

  Oltre a questa, sono disponibili traduzioni di questo documento nelle
  seguenti lingue:

  Tedesco, da Cristoph Seibert: http://tech.appl-opt.physik.uni-
  essen.de/LinuX/german-howto/DE-ISP-Verbindung-HOWTO.html

  Coreano, da Kidong Lee: http://www.postech.ac.kr/~cessi/howto/ISP-
  Hookup/ISP-Hookup-HOWTO.html

  Francese, da Eric Jacoboni: http://www.minet.net/linux/HOWTO-fr/ISP-
  Hookup-HOWTO.html

  Polacco, da Piotr Pogorzelski: URL TBA

  Norvegese: http://www.kvaleberg.com/no-linux.html



  1.4.  Nuove versioni di questo documento

  L'ultima versione (in italiano) di questo documento, sar sempre
  reperibile nell'area WWW e FTP dell'Italian Linux Documentation
  Project (rispettivamente http://www.pluto.linux.it/ildp/ e
  ftp://ftp.pluto.linux.it/pub/ildp/ per la rete commerciale, e
  http://ildp.psy.unipd.it e ftp://ftp.psy.unipd.it/pub/pluto/ildp/ per
  la rete GARR e loro mirror elencati nel file
  ftp://ftp.pluto.linux.it/pub/pluto/MIRRORS.

  L'ultima versione (in inglese) di Linux ISP Hookup HOWTO sar
  periodicamente inviata sul newsgroup comp.os.linux.answers, ed  anche
  disponibile sui vari siti FTP dedicati a Linux, compreso
  sunsite.unc.edu.

  L'ultima versione (in inglese) di questo documento  disponibile in
  formato HTML a http://www.kvaleberg.com/ISP-Hookup-HOWTO.html


  1.5.  Commenti

  Ogni commento, segnalazione di errore, informazioni aggiuntive e
  critiche di ogni tipo possono essere indirizzati a:

  egil@kvaleberg.no

  http://www.kvaleberg.com/

  2.  Come mi collego al resto del mondo?

  Si assumer che avete installato il software essenziale di rete della
  vostra distribuzione Linux, e che avete definito quale porta seriale
  verr usata come

  La configurazione predefinita normalmente permetter l'accesso diretto
  a /dev/modem soltanto all'utente root.

  Per collegarsi ad un Internet Provider direttamente tramite un account
  di tipo shell, e per sperimentare con le sequenze di connessione,
  potete usare il programma molto semplice da usare.


  2.1.  La configurazione basilare

  La configurazione del sistema da usare in rete dovrebbe essere fatta
  da root. Prima di continuare, assicuratevi che il file seguente linea:



       ALL: ALL




  Ma normalmente vorreste autorizzare voi stessi, quindi aggiungete la
  seguente linea al file



       ALL: LOCAL




  Oppure:


       ALL: 127.0.0.1




  Notate che quanto segue  valido solo per un collegamento PPP con
  indirizzo IP dinamico. Nel caso abbiate una connessione fissa, ci
  saranno alcune differenze.

   carino avere un nome associato al sistema, un nome che l'utente pu
  scegliere a piacere. Scrivete questo nome nel file



       roderick




  Il passo successivo  specificare il name server in



       search .
       nameserver 193.212.1.0


  Il specificato con un indirizzo IP numerico, e sar diverso per ogni
  ISP. Se necessario, potete avere fino a tre server, uno per linea. I
  server verranno interrogati nella sequenza in cui sono elencati.

  Se volete utilizzare nomi come miosistema come abbreviazione di
  miosistema.acme.xz, dovete sostituire la prima linea con:



       search acme.xz





  Un minimo di configurazione  anche richiesto nel file bastare cos:



       127.0.0.1   localhost
       0.0.0.0     roderick




  fisso, dovranno sostituire 0.0.0.0 con l'indirizzo reale.

  Allo stesso modo, un


       loopback    127.0.0.0
       localnet    0.0.0.0





  Dovreste anche impostare il vostro dominio esterno in


       acme.xz




  Il nome utente e la password dell'account presso l'Internet Provider
  si deve specificare in


       dirk * PrettySecret




  Per i provider che usano CHAP invece di PAP il file da modificare 

  Finalmente, la parte fondamentale riguardante la procedura stessa di
  connessione deve essere specificata prima che PPP possa essere
  iniziato. Questo viene fatto nello script







  TIMEOUT 5
  "" ATZ
  OK ATDT12345678
  ABORT "NO CARRIER"
  ABORT BUSY
  ABORT "NO DIALTONE"
  ABORT WAITING
  TIMEOUT 45
  CONNECT ""
  TIMEOUT 5
  "name:" ppp





  Alcuni dettagli devono essere in qualche maniera tarati. Ovviamente,
  il primo da modificare  il numero telefonico indicato sulla terza
  linea. Altri dovranno sostituire la stringa di inizializzazione del
  modem ATZ con qualcosa di pi adatto al modem che stanno utilizzando.
  L'ultima linea indica che ci si aspetta un prompt che finisce per
  name:, e che la risposta dovrebbe essere ppp quando arriva.  Altri
  sistemi possono richiedere altre procedure di login.

  La composizione del numero telefonico e l'avvio del protocollo PPP
  vengono eseguiti con il seguente comando:



       exec pppd connect \
            'chat -v -f /etc/ppp/chatscript' \
             -detach crtscts modem defaultroute \
             user dirk \
             /dev/modem 38400




  A questo punto, dovremmo essere online, e rimanere collegati fino a
  quando il processo viene terminato tramite ctrl-C.  verranno aggiunti
  ai log di sistema. Per leggerli, digitate:



       tail /var/adm/messages






       dmesg





  Mentre PPP  su, avrete accesso diretto a Internet e potete usare
  programmi come ftp, ncftp, rlogin, telnet, finger ecc. Tutti questi
  programmi sono parte del software standard di rete.

  Altre informazioni riguardanti PPP sono disponibili da:

  /usr/lib/ppp/README.linux


  /usr/lib/ppp/README.linux-chat

  Per concludere, qualche parola aggiuntiva sulla sicurezza. Il file
  elenca tutti i servizi che il vostro sistema offre all'esterno.  Con
  il file abbiamo descritto, nessun tipo di accesso esterno sar
  permesso.  Per coloro che ne avranno bisogno, l'accesso deve essere
  esplicitamente autorizzato nel file traffico locale pu essere
  permesso da:



       ALL: LOCAL




  Guardate anche man 5 hosts_access.

  Un piccolo particolare: esiste una certa confusione sui nomi dei
  protocolli POP. Una definizione in praticamente tutto :



       pop2            109/tcp         pop-2           # PostOffice V.2
       pop3            110/tcp         pop-3 pop       # PostOffice V.3




  ALTERNATIVA: Invece di utilizzare flessibile. Ma non insieme a

  ALTERNATIVA: Quei fortunati che hanno una connessione TCP/IP
  permanente, per esempio tramite Ethernet possono tranquillamente
  ignorare tutto su PPP e piuttosto concentrarsi sulla configurazione
  della scheda di rete.

  ALTERNATIVA: Altri che non hanno la possibilit di usare PPP, ma
  possono invece utilizzare SLIP, per il quale esiste un supporto simile
  a quello di PPP. Un'altra possibilit  UUCP. Altri ancora potrebbero
  dover affidare lo scambio della posta e delle news tramite SOUP. Una
  descrizione di quest'ultimo pu essere trovata a:
  ftp://ftp.sol.no/user/bjorn/Linux-offline.tgz

  Il programma TERM  un'altra opzione. Fate riferimento al documento
  Term-HOWTO.


  3.  Come faccio a navigare ?

  Se pensate che il testo  la cosa pi importante potreste usare il
  browser Lynx.  disponibile da:

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-
  systems/lynx-2.3.bin2.tar.gz

  Se avete installato X potete anche usare uno dei vari browser grafici.
  Chimera pu essere trovato a:

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-
  systems/chimera-1.65.bin.ELF.tar.gz

  http://www.unlv.edu/chimera/

  Mosaic


  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-
  systems/Mosaic-2.7b1-aout.tgz

  ftp://ftp.NCSA.uiuc.edu/Web/Mosaic/Unix/binaries/2.6

  Netscape (aka.  Mozilla)

  ftp://sunsite.unc.edu/pub/Linux/system/Network/info-systems/netscape-
  v11b3.tar.gz

  ftp://ftp.cs.uit.no/pub/www/netscape

  Questi browser sono costantemente disponibili in nuove ed in vari modi
  eccitanti versioni.

  L'uso e valutazione di questi programmi  soggetto a certe condizioni.
  Siete pregati di osservarle.


  4.  Come faccio a inviare e ricevere posta elettronica?

  Prima di tutto, verificate che smista la posta interna ed esterna,
  bufferizzando la posta in uscita fino al momento in cui  possibile
  inoltrarla.


  Sendmail si basa sulla configurazione che trova in esempio adatto per
  gli utenti di un Internet Provider pu essere trovato a:
  ftp://ftp.sol.no/user/egilk/sendmail.cf. Questo esempio  basato su
  agente di consegna, ma pu essere modificato facilmente per usare

   certamente necessario avere un indirizzo di dominio ufficiale per la
  posta in uscita, cosa che viene specificata in


       # come chi mi maschero (null per non mascherarsi)
       DMacme.xz




  che il nome utente in locale  lo stesso che avete presso l'Internet
  Provider. Se avete un nome differente, basta specificare il nome com
  pleto:


       DMdick@acme.xz




  Sendmail  adesso configurato per spedire direttamente al
  destinatario. Per evitare lunghi e ripetuti collegamenti in quei casi
  dove la connessione presso il destinatario  lenta e irregolare,  di
  solito conveniente usare il vostro Internet Provider come
  ritrasmettitore (relay host). Questo pu essere specificato da DS:



       # "Smart" relay host (pu essere null)
       DSmail.acme.xz





  Ricordatevi che sendmail  un po' permaloso con i caratteri di
  tabulazione presenti in l'editor tabulatori rimangano intatti.

  La ricezione della posta elettronica pu essere effettuata con il
  protocollo POP3, che pu essere lanciato ogni volta che si stabilisce
  la connessione. Uno script per testare questo 



       sendmail -q
       popclient -3 -v mail.acme.xz -u dirk -p "PrettySecret" \
              -k -o /usr/spool/mail/dirk




  connessione PPP  stata attivata. Ricordatevi che questo script  solo
  di prova, quindi conviene assicurarsi che la mailbox non venga toccata
  durante la sua esecuzione. L'opzione -k, che sta per kept, indica che
  la posta rimane disponibile nella mailbox del vostro Internet
  Provider, e della quale voi ne ricevete una copia. Certamente,
  conviene disabilitare questa opzione una volta che avete la certezza
  che funziona correttamente.

  State attenti che la password verr mostrata sulla linea di comando.
  Notate anche che popclient sta diventando obsoleto, e che dovreste
  considerare invece l'uso di

  Una versione migliore e pi sicura di questo script pu essere
  prelevata da: ftp://ftp.sol.no/user/egilk/pop-script.tar.gz

  Questa versione dello script richiede che venga isntallato anche non
  vi pentirete mai.  gi compreso nelle maggiori distribuzioni,
  altrimenti potete prelevarlo da:
  ftp://sunsite.unc.edu/pub/Linux/system/Mail/mailhandlers/procmail-3.10-2.tar.gz

  Procmail  uno strumento semplice e flessibile che pu gestire la
  posta elettronica in ingresso in base ad una grande variet di
  criteri. Inoltre,  in grado di effettuare certe operazioni
  automaticamente come per esempio messaggi di risposta durante le
  vacanze.

  Notate che quando usate procmail direttamente come in questo caso la
  situazione  leggermente diversa da come viene descritta nella
  documentazione di procmail. Il .forward non  richiesto, e non avete
  neanche bisogno di .procmailrc.  Quest'ultimo  necessario solo se
  volete ordinare la posta.

  Come interfaccia utente per leggere e spedire posta elettronica potete
  adottare programmi come

  ALTERNATIVA: Fetchmail  diventato recentemente una alternativa
  migliorata di popclient. L'ultima versione  disponibile da:
  ftp://ftp.ccil.org/pub/esr/fetchmail/fetchmail-3.3.tar.gz

  ALTERNATIVA: Per un normale utente con accesso telefonico ad un
  Internet Provider, non  realmente necessario avere il demone sendmail
  attivo.  Per ridurre le richieste di risorse, e altri possibili
  problemi, conviene commentare il lancio di sendmail, che di solito si
  trova nel file /etc/rc.d/rc.M (varia a seconda della distribuzione che
  state usando).

  ALTERNATIVA: Al posto di sendmail potete usare il pi semplice
  descrizione di questo programma (come di tante altre cose menzionate
  in questo documento) nella Linux Network Administrator's Guide.

  ALTERNATIVA: Esiste anche un pacchetto di macro m4 per costruire un
  file installazione semplice potrebbe essere sufficiente modificare una
  configurazione gi esistente.

  ALTERNATIVA: Ci sono altri programmi pi semplici ma meno flessibili
  per gestire la posta. Pine, per esempio, pu funzionare in modo
  standalone se configurato adeguatamente.  Pu anche essere possibile
  usare nuove versioni di alcuni browser Web.

  ALTERNATIVA: Tanti sono molto entusiasti di utilizzare Emacs anche per
  la gestione della posta e delle news. Ulteriori informazioni possono
  essere trovate a: http://www.ifi.uio.no/~larsi/

  ALTERNATIVA: Un sostituto di popclient  pop-perl5.   disponibile da:
  ftp://sunsite.unc.edu/pub/Linux/System/Mail/pop-perl5-1.1.tar.gz


  5.  News

  5.1.  Come faccio a configurare un news-reader online?

  possibile leggere le news online.  Ci sono diversi programmi
  disponibili, due delle alternative semplici sono

  Per iniziare a leggere le news, il pi delle volte l'unica cosa
  necessaria in termini di configurazione  impostare NNTPSERVER (di
  solito una volta e tutte nel file



       export NNTPSERVER=news.acme.xz




  Per avere l'indirizzo del mittente (campo From), alcuni programmi
  possono richiedere:



       export NNTP_INEWS_DOMAIN=acme.xz






  5.2.  Come faccio a configurare un news-reader offline?

  news offline e quindi risparmiare sulla bolletta del telefono e
  ottenere una maggiore flessibilit,  necessario predisporre in
  qualche modo un news-spool locale. Questo richiede un po' di
  configurazione ed anche una certa quantit di spazio disco dedicata.
  Dopo l'installazione iniziale, le cose dovrebbero pi o meno girare da
  sole, con qualche intervento ogni tanto.

  In seguito verranno descritte due diverse soluzioni.


  5.3.  Come faccio a configurare C News?

  Questa soluzione  basata sul server delle news C News ed il
  protocollo NNTP. C News  stato originariamente progettato per una
  configurazione diversa, ma  abbastanza flessibile di adattarsi anche
  alla nostra situazione.  Si potrebbe anche usare il pi recente INN
  come server delle news, ma potrebbe richiedere un po' pi di risorse.
  In ogni caso, fate attenzione a non installare entrambi, dato che non
  convivono facilmente.

   cruciale che tutta la gestione delle news venga fatta dall'utente
  news, e che tutti i file di configurazione si trovino nella cartella
  effettuato il login come root, potete digitare su news; cd.

  I file di configurazione pi importanti sono:


     dei newsgroup attivi. Viene aggiornato su richiesta dal comando
     comp.os.linux.networking y.


     semplicemente indicare quello che desiderate nel campo
     Organization: dei vostri articoli, per esempio:



       Dirk Gently's Holistic Detective Agency





     nel nostro esempio essere impostato a acme.xz.


     del vostro sito nel thread Path:.  Nella impostazione qui
     descritta, usando vostro sistema, quindi potete impostare questo
     nome come volete a condizione che non sia gi in uso. In questo
     esempio useremo roderick.


    Il file e ulteriore distribuzione delle news. Assumeremo che il
     nostro Internet Provider aggiunga acme.xz al Path, e che questa 
     la nostra unica fonte di news.  L'esempio dato in realt dice che
     accetteremo qualsiasi cosa in arrivo, e che invieremo soltanto
     delle news fresche verso acme.xz che sono state originate nel
     nostro sito. In questa configurazione semplificata, si assume che
     tutti i gruppi arriveranno da una singola fonte. /all specifica la
     distribuzione, e deve essere indicata. La lettera F dice che (i
     puntatori ai) nuovi articoli in uscita saranno raccolti in un file.



       ME:all/all::
       acme/acme.xz:all,!junk/all:FL:





    Una cartella da creare per le news in uscita, nel nostro caso:



       mkdir /var/spool/news/out.going/acme





     controlla i posting nei gruppi moderati, anche se questo compito
     viene normalmente lasciato all'Internet Provider.

  C News necessita di un certo grado di manutenzione giornaliera, ma
  questo pu essere indicato una volta per tutte tramite il comando
  crontab -e news. La seguente impostazione pu essere modificata
  secondo le esigenze:



       # mantieni i batch entrante e uscente
       10,40 *  * * * /usr/lib/newsbin/input/newsrun

       # scadenza delle news, una volta al giorno
       30 0  * * * /usr/lib/newsbin/expire/doexpire

       # monitoraggio ed eventuali report
       00 2  * * sat /usr/lib/newsbin/maint/addmissing
       40 3  * * * /usr/lib/newsbin/maint/newswatch
       50 3  * * * /usr/lib/newsbin/maint/newsdaily




  ingresso e uscita (ogni mezz'ora), doexpire canceller gli articoli
  man mano che scadono (ogni notte alle 00:30), mentre gli ultimi tre
  comandi eseguono varie procedure di supervisione e correzione di
  errori.

  Occorre anche effettuare un po' di pulizia in caso di riavvio del
  sistema.  Come utente root, aggiungete la seguente linea al file
  /etc/rc.d/rc.local:



       su news -c /usr/lib/newsbin/maint/newsboot




  Le news possono essere raccolte da un server NNTP tramite il programma
  NewsX, prelevato da
  ftp://sunsite.unc.edu/pub/Linux/system/news/transport/newsx-0.9.tar.gz
  oppure da ftp://ftp.sol.no/user/egilk/newsx-0.9.tar.gz

  Configurare NewsX  abbastanza semplice.  L'installazione  un caso
  classico di:



       make
       su
       make install
       exit




  Con le impostazioni appena descritte, tutto quello che resta da fare 
  creare i gruppi che desiderate leggere usando il comando

  Per scaricare degli articoli, l'utente news deve eseguire i seguenti
  comandi (si assume che il collegamento tramite PPP o simile  gi su):






  newsrun
  newsx acme news.acme.xz
  newsrun





  L'opzione -d permette visualizzare continuamente dei messaggi sullo
  schermo. Per ulteriori informazioni, rivolgetevi alla documentazione
  di NewsX.

  NewsX si prender cura di inviare le news in uscita.

  Per controllare la cancellazione degli articoli man mano che scadono,
   necessario un file explist. I commenti spiegano le nostre
  intenzioni:



       # conserva lo storico per 14 giorni, nulla oltre i 120 giorni
       /expired/                       x       14      -
       /bounds/                        x       0-1-120 -

       # conserva questi per due mesi
       comp.sources,comp.os.linux.all  x       60      -

       # il rumore viene buttato via subito
       junk,control                    x       2       -

       # predefinito:  14 giorni, nessuna archiviazione
       all                             x       14      -




  ALTERNATIVA: In uno news-spool piccolo, normalmente non  necessario
  il newsgroup control.  Il traffico  enorme in confronto alla
  possibile convenienza. Il punto  che gli articoli saranno cancellati,
  e che i gruppi possono essere creati automaticamente.  Per assicurarsi
  che i messaggi di controllo che contengono newgroup non causino
  disordini, un file chiamato quello che permetteremo:



       comp.os.linux   tale@uunet.com  yv
       all             any             nq




  In questo esempio, tutti i gruppi sotto la gerarchia comp.os.linux
  verrano creati (y), e che l'utente news sar notificato (v). Tutto il
  resto verr ignorato (n) in completo silenzio (q).  L'ultima linea 
  sufficiente se volete creare tutto i gruppi manualmente.

  ALTERNATIVA: Al posto di NewsX potete usare suck.


  5.4.  Come faccio a configurare Leafnode?

  Una soluzione completamente differente  installare il pacchetto
  integrato permette la gestione di tutte le operazioni richieste per un
  news spool personale, ed  facile da configurare.  disponibile da
  http://www.troll.no/freebies/leafnode.html

  Per quanto riguarda C News, tutta la manutenzione delle news dovrebbe
  essere realmente eseguita dall'utente news.

  La cartella di lavoro di leafnode  /usr/lib/leafnode.  Per
  installare, digitare:



       cd /usr/lib/leafnode
       tar -xzvf leafnode-0.8.tgz
       cd leafnode-0.8
       make
       su
       make install




  Osservate in quanto segue che il prefisso /usr/local/sbin andrebbe
  sostituito da /usr/sbin se avete installato leafnode da un pacchetto.

  Mentre siete ancora nei panni di root, modificate la linea che
  controlla NNTP nel file /etc/inetd.conf:



       nntp  stream  tcp  nowait  news  /usr/sbin/tcpd /usr/local/sbin/leafnode




  Attivatelo con:


       killall -HUP inetd




  Ritornate come utente news digitando exit. Nel file
  /usr/lib/leafnode/config modificate la linea che definisce il server
  NNTP. Nel nostro caso:



       server = news.acme.xz




  Leafnode sar autosufficente aggiungendo il seguente comando tramite
  crontab -e come utente news:



       # scadenza delle news, una volta al giorno
       0 4 * * * /usr/local/sbin/texpire





  Anche lo scambio delle news viene fatto dall'utente news con il
  seguente comando (assumendo che PPP  attivo):


       /usr/local/sbin/fetch





  Quelli che desiderano leggere le news dovrebbero seguire la ricetta
  descritta in Come faccio a configurare un newsreader online?, eccetto
  che nella configurazione del server delle news si deve definire
  localmente, cio:



       export NNTPSERVER=localhost




  Questo sarebbe tutto quanto serve. Il primo fetch trasferir l'elenco
  dei newsgroup disponibili. In seguito, leafnode prender nota dei
  gruppi che vengono richiesti dagli utenti, e si adatter a questo la
  volta successiva che viene attivato.

  Si rende noto che leafnode ha qualche problema laddove sono richieste
  particolari autorizzazioni per NNTP.

  ALTERNATIVA: Al posto di leafnode potete usare nntpcache, disponibile
  da ftp://ftp.suburbia.net/pub/nntpcache/nntpcache.tgz.

  ALTERNATIVA: Un'altra alternativa  usare il newsreader pullslrn-pull.
  Il newsreader va compilato abilitando l'opzione spool.


  6.  Come faccio ad automatizzare la procedura di connessione?

  La gestione automatica della posta e delle news  abbastanza facile
  sotto Linux.

  Come primo e principale passo, si deve creare uno script iniziare il
  collegamento con l'Internet Provider. Spesso, basta una riga con il
  seguente comando:



       /usr/sbin/pppd







       connect "/usr/lib/ppp/chat -v -f /etc/ppp/chatscript"
       crtscts
       modem
       defaultroute
       asyncmap 00000000
       user dirk
       /dev/modem 38400




  Per chiudere il collegamento, usate la versione predefinita di


  Dopo aver verificato il funzionamento di questi script, si devono
  scrivere altri script che eseguiranno le diverse operazioni. Lo script
  per prelevare la posta  gi stato descritto precedentemente, ed
  assumeremo che si trova nel file /home/dirk/pop.

  Uno script per lo scambio della posta pu essere messo in /root/mail:



       #! /bin/sh
       #
       # scambia posta elettronica
       # 10 minuti di timeout:
       TIMEOUT=600
       DT=10

       # lancia sendmail:
       sendmail -q &

       # preleva la posta:
       su dirk -c /home/dirk/pop

       # attendi la fine di sendmail:
       t=0
       while ! mailq | grep -q "Mail queue is empty"; do
           t=$[$t+$DT]
           if [ $t -gt $TIMEOUT ] ; then
            echo "sendmail -q timeout ($TIMEOUT).."
            exit 1
           fi
           sleep $DT
       done

       exit 0




  Lo script per lo scambio delle news pu essere messo nel file
  /usr/lib/news/news:



       #!/bin/sh
       #
       # scambio delle news
       # viene eseguita come utente news:
       cd /usr/lib/news

       #aggiorna il batch di uscita (C News):
       /usr/lib/newsbin/input/newsrun < /dev/null

       #scambia le news:
       /usr/lib/newsbin/newsx acme news.acme.xz

       #e svuota il batch in ingresso:
       /usr/lib/newsbin/input/newsrun < /dev/null




  Adesso manca soltanto uno script per mettere insieme i diversi pezzi,
  e che pu essere messo nel file /root/news+mail:



  #!/bin/sh
  #
  # scambio della posta e delle news
  # viene eseguito come utente root
  #
  if ! /usr/lib/ppp/ppp-on; then
      exit 1
  fi
  trap "/usr/lib/ppp/ppp-off" 1 2 3 15

  #scambio della posta e news:
  /root/mail &
  su news -c ~news/news
  wait

  #chiude il collegamento
  /usr/lib/ppp/ppp-off

  #aggiorna il batch in ingresso (C News):
  su news -c /usr/lib/newsbin/input/newsrun < /dev/null &

  exit 0




   abbastanza semplice modificare lo script precedente per attivare la
  connessione solo quando c' della posta o delle news da spedire.
  Supponiamo di chiamarlo teniamo presente che il nome dello spool delle
  news in uscita deve essere aggiornato di conseguenza:



       #!/bin/sh
       #
       # scambio della posta e delle news, solo se ci sono messaggi in uscita
       # (C News spool)
       if [ -s /var/spool/news/out.going/acme/togo ] ||
           ! ( mailq | grep -q "Mail queue is empty"); then
            /root/news+mail
       fi




  L'unica cosa che manca  specificare quando dovrebbe accadere tutto
  ci. Questo viene fatto usando il comando crontab -e effettuare sempre
  lo scambio della posta e delle news alle 07:00 del mattino, e
  successivamente ogni 4 ore ma solo se ci sono messaggi da spedire



       00 7            * * *   /root/news+mail
       00 11,15,19,23  * * *   /root/news+mail.cond




  Verificate separatamente il corretto funzionamento di ogni componente
  prima di collegarli insieme. Successivamente potreste aggiungere molte
  altre operazioni, come per esempio sincronizzare la data e ora (usando
  (mirroring) di file WWW e FTP gestiti localmente verso il vostro
  Internet Provider (usando make e ftp).

  ALTERNATIVA: A seconda delle vostre preferenze, potete impostare le
  procedure al contrario. Ogni volta che la connessione PPP viene
  attivata, verr eseguito anche lo script aggiungere in questo script
  qualunque incantesimo sia necessario per effettuare lo scambio della
  posta e delle news. Usate man pppd per ulteriori dettagli.

  ALTERNATIVA:  anche possibile attivare automaticamente il
  collegamento PPP ogni volta che viene rilevato traffico di rete.
  Questa  in molti aspetti la soluzione pi elegante, ma dipende molto
  di una buona configurazione onde evitare frequenti (e costosi)
  collegamenti.  Altre informazioni possono essere trovate a
  http://www.dna.lth.se/~erics/diald.html.

  L'utility diald  disponibile da
  ftp://sunsite.unc.edu/pub/Linux/system/network/serial/diald-0.16.tar.gz.

  In questo sito potete anche trovare altre variazioni sul tema dei
  collegamenti PPP.


  7.  Parole finali

  7.1.  Altre cose che dovrei sapere?


    I diversi messaggi di errore nel sistema vengono normalmente
     gestiti tramite la posta interna. Per assicurarsi che questi
     messaggi siano letti, dovreste creare un file comando newaliases
     ogni volta che modificate questo file.  Un esempio che dovrebbe
     coprire la maggior parte delle eventualit :



       PostMaster: root
       ftp: root
       news: root
       usenet: root
       FaxMaster: root
       fax: root
       WebMaster: root
       MAILER.DAEMON: root







    Molti programmi per Linux sono reperibili da carico. Ma ci sono
     molti mirror quindi ogni volta che trovate un riferimento a
     ftp://sunsite.unc.edu/pub/Linux/ dovreste cercare un mirror pi
     vicino a Voi, per esempio ftp://ftp.nvg.unit.no/pub/linux/sunsite/.


    Nel caso stiate migrando da Yarn, dovrebbe essere possibile
     convertire le sue cartelle in cartelle standard usando il programma
     yarn2mf disponibile a ftp://ftp.sol.no/user/egilk/yarn2mf.zip


  8.  Informazioni specifiche su alcuni Internet Provider

  Alcune informazioni pi dettagliate su alcuni Internet Provider sono
  disponibili da una variet di siti:

  Demon Internet

  ftp://ftp.demon.co.uk/pub/unix/linux/Demon/slack3.0.help.tgz

  Netcom

  http://www.netcom.com/bin/webtech/NetCruiser/Operating_Systems/Linux/linux.cfg.html

  PowerTech, Telenor Online, Telia

  http://www.kvaleberg.com/no-isp.html

  Stanford

  http://www-leland.stanford.edu/~wkn/Linux/network/network.html

  MCI

  http://www.kvaleberg.com/linux-mci.html

  SISCOM

  http://www.siscom.net/support/linux_setup.htm

  AOL non  disponibile dato che utilizza un protocollo proprietario.

  Se avete delle informazioni su un Internet Provider non elencato qui,
  siete pregati di contattarmi.


  8.1.  Dove posso imparare di pi?

  Il libro intitolato Linux Network Administrator's Guide di Olaf Kirch
  del Linux Documentation Project  abbastanza obbligatorio per chiunque
  intenda configurare e mantenere qualsiasi cosa relazionata con TCP/IP
  e Internet (ftp://sunsite.unc.edu/pub/Linux/docs/linux-doc-
  project/network-guide/nag-1.0.ascii.tar.gz)

  La documentazione di ogni pacchetto software vi fornir tutta
  l'informazione che Vi serve, o almeno un riassunto. Le pagine man sono
  il primo posto dove guardare. Provate come esempio:



       man pppd




  Potete anche trovare della documentazione su alcuni programmi sotto la
  cartella sempre  bene strutturata.

  I seguenti HOWTO sono di particolare interesse:



    Installation-HOWTO per trovare delle informazioni basilari.

    NET-2-HOWTO  una descrizione molto completa sull'installazione e
     configurazione del software di rete. Molto di questo sar gi
     pronto se state usando una distribuzione standard di Linux come
     Slackware, Red Hat o Debian).  Ma molte sezioni sulla
     configurazione e risoluzione dei problemi valgono veramente la pena
     di leggere.

    Mail-HOWTO spiega come configurare i vari tool. Come appena detto,
     molto di questo sar gi pronto se avete installato una
     distribuzione standard di Linux.


    News-HOWTO spiega come configurare uno spool delle news
     convenzionale.

    Tiny-News documenta un pacchetto alternativo per la gestione delle
     news.

    PPP-HOWTO contiene una buona descrizione dei problemi che potete
     trovare con le connessioni PPP.

    Serial-HOWTO contiene tutto quello che Vi serve per configurare le
     porte seriali.

    Mail-Queue Vi racconta come configurare sendmail per accodare
     sempre la posta remota ma inoltrare immediatamente la posta locale.

  Red Hat ha una mailing list sull'argomento PPP. Per abbonarsi occorre
  inviare un messaggio a redhat-ppp-list-request con il subject


       subscribe





  8.2.  Ringraziamenti

  Le informazioni raccolte in questo documento provengono da diverse
  fonti. Ringrazio le seguenti persone che direttamente o indirettamente
  hanno contribuito:



       Adam Holt <holt@graphics.lcs.mit.edu>
       Arne Coucheron <arneco@oslonett.no>
       Arne Riiber <riiber@oslonett.no>
       Arnt Gulbrandsen <agulbra@troll.no>
       Bjorn Steensrud <bjornst@powertech.no>
       Gisle Hannemyr <gisle@a.sn.no>
       Hans Amund Rosbach <haro@sesam.dnv.no>
       Hans Peter Verne <hpv@ulrik.uio.no>
       Harald T Alvestrand <Harald.T.Alvestrand@uninett.no>
       Harald Terkelsen  <Harald.Terkelsen@adm.hioslo.no>
       Haavard Engum <hobbes@interlink.no>
       James Youngman <JYoungman@vggas.com>
       Johan S. Seland <johanss@sn.no>
       John Phillips <john@linux.demon.co.uk>
       Jorn Lokoy <jorn@oslonett.no>
       Kenneth Tjostheim <kenneth.tjostheim@asplanviak.no>
       Kjell M. Myksvoll <kjell.myksvoll@fou.telenor.no>
       Kjetil T. Homme <kjetilho@math.uio.no>
       Michael Meissner <meissner@cygnus.com>
       N J Bailey <N.J.Bailey@leeds.ac.uk>
       Nicolai Langfeldt <janl@math.uio.no>
       Ove Ruben R Olsen <Ove.R.Olsen@ub.uib.no>
       R. Bardarson <ronb@powernet.net>
       Steinar Fremme <steinar@fremme.no>
       Sverre H. Huseby <sverrehu@ifi.uio.no>
       Trond Eivind Glomsrod <teg@stud.imf.unit.no>
       Tommy Larsen <tommy@mix.hive.no>
       Yves Bellefeuille <yan@storm.ca>







































































  The Linux Installation HOWTO
  di Eric S. Raymond
  v4.22, 26 maggio 2000

  Questo documento descrive come ottenere e installare il software
  Linux.   il primo documento che un nuovo utente di Linux dovrebbe
  leggere per iniziare.  Traduzione a cura di Giovanni Bortolozzo
  <borto@pluto.linux.it>.

  1.  Introduzione



  1.1.  Scopo di questo documento


  Linux  un'implementazione di UNIX liberamente distribuibile che gira
  su personal computer economici ( stato sviluppato su 386 e ora gira
  su hardware 486, Pentium, PowerPC, Sun Sparc e DEC Alpha e anche nei
  mainframe IBM System 390!). Supporta un'ampia gamma di software,
  incluso X Window, Emacs, supporto di rete TCP/IP (SLIP incluso) e
  molte altre applicazioni.

  Questo documento presume che si sia gi sentito parlare di Linux e si
  voglia cimentarsi a installarlo.  Il documento  incentrato sulla
  piattaforma Intel, che  la pi popolare, ma molti dei consigli
  riportati si applicano anche a Power PC, Sparc e Alpha.


  1.2.  Altre fonti di informazione

  Se si  dei novizi di Linux, ci sono diverse fonti di informazione di
  base sul sistema.  Il miglior posto per trovarle  nella home page del
  Linux Documentation Project a  <http://www.linuxdoc.org>.  L si
  trover l'ultima e pi aggiornata versione di questo documento, come
  <http://www.linuxdoc.org/HOWTO/Installation-HOWTO.html>

  Probabilmente si dovrebbe cominciare dando un'occhiata alla risorse
  nella sezione General Linux Information, al Linux INFO-SHEET
  <http://www.linuxdoc.org/HOWTO/INFO-SHEET.html> e alle Linux META-FAQ
  <http://www.linuxdoc.org/HOWTO/META-FAQ.html>.  Il documento `Linux
  Frequently Asked Questions' contiene molte domande comuni (e le
  relative risposte!) su Linux:  una ``lettura di dovere'' per i nuovi
  utenti.

   possibile trovare aiuto per i problemi pi comuni nei newsgroup di
  Usenet comp.os.linux.help e comp.os.linux.announce.

  Il Linux Documentation Project sta scrivendo una serie di manuali su
  Linux, tutti liberamente distribuibili in rete e disponibili dalla
  home page di LDP.

  Il libro ``Linux Installation and Getting Started''  una guida
  completa su come procurarsi e installare Linux, oltre a spiegare come
  usare il sistema una volta installato.  Contiene un tutorial completo
  sull'uso e il funzionamento del sistema e molte pi informazioni di
  quelle qui contenute.  Gli si pu dare una scorsa o scaricarne una
  copia dalla home page di LDP.

   inoltre disponibile il documento, piuttosto tecnico, Guide to x86
  Bootstrapping <http://www.paranoia.com/~vax/boot.html>.  Questo
  documento  pi orientato verso NetBSD piuttosto che su Linux, ma
  contiene materiale utile sulla configurazione dei dischi e sui boot
  manager per le configurazioni multi-OS.


  Invito a non scrivermi chiedendomi aiuto sull'installazione.  Anche se
  avessi il tempo di gestire questo tipo di richieste, la risoluzione
  dei problemi via mail  molto meno efficiente del chiedere aiuto al
  proprio gruppo utenti Linux locale.  Si possono trovare informazioni
  sui diversi gruppi Linux locali in giro per il mondo nel sito di LDP
  <http://www.linuxdoc.org/>.


  1.3.  Nuove versioni di questo documento

  Le nuove versioni del Linux Installation HOWTO saranno periodicamente
  inviate nei newsgroup comp.os.linux.help, comp.os.linux.announce e
  news.answers.  Saranno pure depositate in diversi siti WWW e FTP su
  Linux, tra cui la home page di LDP.

  L'ultima versione di questo documento pu pure essere visionata nel
  World Wide Web attraverso l'URL
  <http://www.linuxdoc.org/HOWTO/Installation-HOWTO.html>.


  1.4.  Commenti e correzioni

  Se si hanno domande o commenti a proposito di questo documento, si
  scriva liberamente a Eric S. Raymond, a esr@thyrsus.com.  Qualsiasi
  suggerimento o critica  benvenuto.  Se si trovano errori in questo
  documento, me li si renda noti in modo che possa correggerli nella
  prossima versione. Grazie.

  Invito a non inviarmi domande su come risolvere i problemi hardware
  incontrati durante l'installazione.  Si consulti la guida ``Linux
  Installation and Getting Started'', lo si segnali al proprio
  rivenditore o si consulti il newsgroup comp.os.linux.setup.  Questo
  HOWTO  pensato per essere una guida rapida e indolore alla normale
  installazione:  in preparazione un altro HOWTO sui problemi hardware
  e la loro diagnosi.


  2.  Modifiche recenti


    Aggiunta la sezione `Compra, non compilare'.

    Aggiunto il materiale sul boot da CD-ROM.


  3.  L'opzione pi semplice: compra, non compilare

  Linux  ora sufficientemente maturo che adesso esistono alcuni
  rivenditori di sistemi che assemblano workstation, installando e
  configurando Linux e operando un intenso controllo prima di venderle.
  Se si hanno pi soldi che tempo, questi assemblatori forniscono un
  valido servizio assicurandosi che non vi venderanno dell'hardware
  difettato o che morir due giorni dopo essere uscito dalla scatola.

  Ci sono diversi marchi di questo tipo (ne fornir un elenco qui non
  appena ne so qualcosa di pi).  L'unica attrezzata in questo senso che
  conosco  la VA Research <http://www.varesearch.com>; nel 1998 sono
  diventato un membro del consiglio direttivo (Board of Directors) della
  VA. La VA costruisce workstation Linux di alto livello e qualit con
  un bel logo di Tux il pinguino davanti.  Hanno un intimo legame con la
  comunit Linux; SourgeForge, il sito della GNU e il progetto Debian
  vivono tutti su macchine in una delle loro stanze sul retro, e la
  macchina personale di Linus  una delle loro.

  Per quelli di noi senza un ricco budget, il resto di questo HOWTO
  spiega come installarsi Linux da soli.
  4.  Prima di cominciare

  Prima di poter installare Linux,  necessario assicurarsi che la
  propria macchina sia adatta a Linux e inoltre scegliere un Linux da
  installare.  La Linux Pre-installation checklist
  <http://members.tripod.com/~algolog/lnxchk.htm> pu tornare utile per
  organizzare i dati della configurazione prima di iniziare.


  4.1.  Requisiti hardware

  Che tipo di sistema  necessario per utilizzare Linux?  Questa  una
  buona domanda; gli effettivi requisiti hardware per il sistema
  cambiano periodicamente.  Il Linux Hardware-HOWTO,
  <http://www.linuxdoc.org/HOWTO/Hardware-HOWTO.html>, fornisce un
  elenco (pi o meno) completo dell'hardware supportato da Linux.  Il
  Linux INFO-SHEET,  <http://www.linuxdoc.org/HOWTO/INFO-SHEET.html>,
  fornisce un altro elenco. Per le versioni Intel,  richiesta una
  configurazione hardware simile alla seguente.

  Un qualsiasi processore 80386, 80486, Pentium o Pentium II andr bene.
  Cloni non Intel del 80386 e superiori generalmente funzionano.  Non 
  necessario un coprocessore matematico, sebbene sia una buona cosa
  averne uno.

  Sono supportate le architetture di bus ISA, EISA, VESA Local Bus e
  PCI.  L'architettura di bus MCA (presente nei modelli PS/2 dell'IBM) 
  minimamente supportata a partire dai kernel 2.1.x, ma potrebbe non
  essere ancora pronta per il debutto.

  Sono necessari almeno 4 megabyte di memoria.  Tecnicamente, Linux
  funzionerebbe con solamente 2 mega, ma la maggior parte delle
  installazioni e del software ne richiedono 4.  Pi memoria si ha, pi
  felici si sar.  Suggerisco un minimo assoluto di 16 megabyte se si ha
  intenzione di usare X-Window; 64  meglio.

  Naturalmente, sar necessario un disco fisso e un controller di disco
  AT standard.  Dovrebbero funzionare tutti i dischi e controller MFM,
  RLL e IDE.  Sono pure supportati molti dischi e adattatori SCSI; il
  Linux SCSI-HOWTO contiene maggiori informazioni sul supporto SCSI.  Se
  si sta assemblando un sistema appositamente per utilizzarlo con Linux,
  il piccolo costo aggiuntivo da sostenere per lo SCSI  ampiamente
  compensato considerate le migliori prestazioni e affidabilit che
  offre.

  Sar necessario un lettore di dischetti da 3.5".  Sebbene sotto Linux
  siano supportati anche i dischetti da 5.25", sono scarsamente usati e
  non si dovrebbe far conto su immagini di dischetti che ci stiano
  dentro (un Linux ridotto all'osso pu realmente funzionare su un unico
  dischetto, ma  solamente utile per l'installazione e la risoluzione
  dei problemi).

   inoltre necessaria una scheda video MDA, Hercules, CGA, EGA, VGA o
  Super VGA e un monitor.  In generale, se la propria scheda video e
  monitor funzionano sotto MS-DOS allora dovrebbero funzionare anche
  sotto Linux.  Comunque, se si desidera utilizzare il sistema X Window,
  esistono altre restrizioni sull'hardware video supportato.  Il Linux
  XFree86-HOWTO,  <http://www.linuxdoc.org/HOWTO/XFree86-HOWTO.html>,
  contiene maggiori informazioni sull'esecuzione di X e le sue
  richieste.

   desiderabile anche un lettore CD-ROM.  Se  ATAPI, SCSI o un vero
  IDE non si dovrebbero aver problemi a farlo funzionare (ma attenzione
  ai lettori economici pubblicizzati come interfacce "IDE" ma che non
  sono vere IDE).  Se il proprio CD-ROM usa una scheda di interfaccia
  proprietaria,  possibile che il kernel d'installazione che si intende
  utilizzare per il boot da dischetto non sia in grado di vederlo, e un
  CD-ROM inaccessibile blocca l'installazione.  Inoltre, non
  funzioneranno per niente i CD-ROM che si attaccano alla porta
  parallela.  Se si hanno dubbi, si consulti il Linux CD-ROM HOWTO,
  <http://www.linuxdoc.org/HOWTO/CDROM-HOWTO.html> per un elenco e i
  dettagli dell'hardware supportato.

  Le cosiddette schede senza ponticelli ``Plug'n'Play'' possono essere
  un problema.  Il loro supporto  in attivo sviluppo, ma non c' ancora
  niente nel kernel 2.0.35.  Fortunatamente questo sembra essere un
  problema solo con schede audio e Ethernet.

  Se si possiede una macchina che usa uno dei processori 68K della
  Motorola (tra cui le macchine Amiga, Atari e VMEbus), si veda la
  Linux/m68k FAQ a
  <http://www.clark.net/pub/lawrencc/linux/faq/faq.html> per
  informazioni sui requisiti minimi e stato del port.  Attualmente la
  FAQ dice che m68k Linux  stabile ed usabile quanto lo  la versione
  Intel.


  4.2.  Requisiti di spazio e coesistenza

  Nel proprio disco fisso si avr bisogno di spazio libero per Linux.
  L'ammontare dello spazio necessario dipende da quanto software si ha
  intenzione di installare.  Oggi la maggior parte delle installazioni
  richiede un'area su disco di circa un giga di spazio.  Ci comprende
  lo spazio per il software, la swap (usata come RAM virtuale nella
  macchina) e spazio libero per utenti, ecc.

   concepibile che si possa usare un sistema Linux minimo in 80 mega o
  meno (questo era piuttosto comune quando le distribuzioni di Linux
  erano pi piccole), ed  pure concepibile che si possano usare ben pi
  di due gig per tutto il software per Linux.  L'ammontare varia
  notevolmente a seconda della quantit di software che si installa e da
  quanto spazio richiede.  Se ne parlar meglio pi avanti.

  Linux coesister sul disco fisso con altri sistemi operativi, come MS-
  DOS, Microsoft Windows o OS/2 (infatti si pu accedere ai file di MS-
  DOS ed eseguire alcuni programmi MS-DOS sotto Linux).  In altre
  parole, quando si partiziona il proprio disco per Linux, MS-DOS o OS/2
  vivranno nelle loro partizioni e Linux nella sua.  Maggiori dettagli
  su questi sistemi ``dual-boot'' pi avanti.

  NON serve eseguire MS-DOS, OS/2 o qualsiasi altro sistema operativo
  per usare Linux.  Linux  un sistema operativo a parte completamente
  differente e non si affida ad altri SO per l'installazione e l'uso.

  La configurazione minima per Linux non  molto diversa da quella
  richiesta per la maggior parte dei sistemi MS-DOS o Windows 3.1
  venduti di questi tempi (ma  notevolmente minore di quella minima per
  Windows 95!).  Se si ha un 386 o un 486 con almeno 4 mega di RAM,
  allora si potr felicemente usare Linux.  Linux non richiede grosse
  quantit di spazio su disco, memoria o velocit del processore.  Matt
  Welsh, il primo autore di questo HOWTO, utilizzava Linux su un 386 a
  16 MHz (la macchina pi lenta che si possa prendere) con 4 mega di RAM
  ed era piuttosto contento.  Pi si vuole fare, pi memoria sar
  necessaria (e pi veloce dovr essere il processore).  Nella mia
  esperienza un 486 con 16 megabyte di RAM con su Linux d filo da
  torcere a diversi modelli di workstation molto costose.


  5.  Requisiti temporali

  Dall'inizio alla fine, l'installazione da CD-ROM di un Linux moderno
  ci si pu aspettare duri dai novanta minuti alle tre ore.
  5.1.  Scegliere una distribuzione di Linux

  Prima di poter installare Linux, si deve scegliere una delle
  ``distribuzioni'' di Linux disponibili.  Non esiste un'unica versione
  standard del software Linux: esistono molte versioni.  Ogni versione
  ha la sua documentazione e istruzioni sull'installazione.

  Le distribuzioni di Linux sono disponibili sia tramite FTP anonimo che
  ordinandole via posta su dischetti, nastro e CD-ROM.  Il Linux
  Distribution HOWTO,  <http://www.linuxdoc.org/HOWTO/Distribution-
  HOWTO.html>, include descrizioni di molte distribuzioni di Linux
  disponibili sia via FTP che via posta.

  Nel confuso e antico passato quando  stata scritta la prima versione
  di questo HOWTO (1992-93), molti si procuravano Linux per vie tortuose
  come lunghi download da Internet o da una BBS nelle loro macchine DOS;
  seguiti da un'elaborata procedura nella quale trasferivano quanto
  scaricato in diversi dischetti.  Uno di questi dischi era poi usato
  per avviare il sistema e installare tutti gli altri.  Con un po' di
  fortuna (e nessun dischetto rovinato) si finiva l'installazione
  parecchie ore dopo con un sistema Linux funzionante.  O anche no.

  Sebbene questo percorso sia ancora possibile (e si pu scaricare una
  qualsiasi delle diverse distribuzioni da
  <http://metalab.unc.edu/pub/Linux/distributions/>), non c' ora molta
  ragione per farlo.  Il modo pi facile  di comprare una delle
  distribuzioni ad alta qualit di Linux distribuite su CD-ROM, come Red
  Hat, Debian, Linux Pro o WGS.  Tipicamente queste sono disponibili a
  meno di 50 dollari nella pi vicina libreria o rivenditore di
  software, e vi eviteranno molte ore di scocciatura.

  Si possono pure comperare CD-ROM antologici come il Linux Developer's
  Resource set dell'Infomagic.  Tipicamente includono diversi
  distribuzioni di Linux e una copia recente dei maggiori siti su Linux,
  come metalab o tsx-11.

  Nel resto di questo HOWTO ci focalizzeremo sui passi necessari per
  installare da un CD-ROM antologico oppure una delle distribuzioni
  commerciali a basso costo che non includono un manuale installazione
  su carta.  Se il proprio Linux  accompagnato da un manuale cartaceo
  alcune parti di questo HOWTO possono fornire un utile background, ma
  si dovrebbe consultare il manuale per istruzioni di installazione pi
  dettagliate.


  6.  Panoramica dell'installazione


  Prima di installare  prudente raccogliere le informazioni di
  configurazione del proprio hardware.  Si prenda nota della marca e del
  modello di ciascuna scheda nella propria macchina; si collezionino i
  numeri degli IRQ e dei canali DMA.  Probabilmente queste informazioni
  non serviranno -- ma se capita che servono, non averle  molto brutto.

  Se si vuole configurare un sistema ``dual-boot'' (Linux e DOS oppure
  Windows o entrambi), si riarrangi (ripartizioni) il proprio disco per
  far posto a Linux.  Se si  avveduti, allora come prima cosa si far
  il backup di tutto!


  6.1.  Primi passi nell'installazione: la via facile

  Se si ha un CD-ROM EIDE/ATAPI (normale in questi giorni), si
  verifichino le impostazioni del BIOS della propria macchina per vedere
  se  in grado di fare il boot da CD-ROM.  Molte macchine costruite
  dopo la met del 1997 possono farlo.
  Se la propria  fra queste, si cambino le impostazioni in modo che sia
  controllato per primo il CD-ROM.  Solitamente ci  nel sottomenu
  'BIOS FEATURES' del menu di configurazione del BIOS.

  Poi si inserisca il CD-ROM di installazione.  Si riavvii.
  L'installazione  iniziata.

  Se si ha un CD-ROM SCSI spesso  possibile fare il boot da questo, ma
  in questo caso tale possibilit dipende di pi dal tipo di scheda
  madre e dal BIOS.  Chiunque ne capisca abbastanza da spendere un po'
  pi di soldi per un lettore CD-ROM SCSI, probabilmente ne sa
  abbastanza da capire se pu farlo.


  6.2.  Primi passi nell'installazione: la via difficile


  1. Creare i dischetti di installazione.

  2. Avviare un mini-Linux di installazione dai dischetti in modo tale
     da aver accesso al CD-ROM.


  6.3.  Continuare l'installazione


    Preparare i filesystem per Linux (se non si  ancora modificata la
     tabella delle partizioni lo si far a questo punto).

    Installare da CD-ROM una versione basilare di Linux.

    Avviare Linux dal disco fisso.

    (Opzionale) Installare dal CD-ROM gli altri pacchetti.


  6.4.  Parti basilari di un kit di installazione

  Ecco qui le parti basilari di una distribuzione installabile:


    I file README e FAQ.  Solitamente sono presenti nella directory
     principale del proprio CD-ROM e sono leggibili una volta montato il
     CD-ROM sotto Linux (a seconda di come  stato generato il CD-ROM,
     potrebbero essere visibili anche sotto DOS/Windows).   una buona
     idea leggere questi file non appena sono accessibili, per venire a
     conoscenza di importanti aggiornamenti o modifiche.

    Diverse immagini di bootdisk (dischetti di avvio/boot) (spesso in
     una sotto directory).  Se il proprio CD-ROM non  avviabile, il
     file da scrivere in un dischetto per creare il dischetto di avvio 
     uno di questi.  Si selezioner una delle suddette immagini di
     bootdisk, a seconda del tipo di hardware che si ha nel proprio
     sistema.

  La questione qui  che alcuni driver dell'hardware vanno in conflitto
  tra loro in modi strani, e invece di provare a fare il debug dei
  problemi hardware del proprio sistema  pi semplice usare un'immagine
  del disco di installazione con abilitati solo i driver di cui si ha
  bisogno (ci ha il bel effetto collaterale di rendere pi piccolo il
  proprio kernel).


    Un immagine del rescue disk (disco di ripristino).  Questo  un
     disco contenente un kernel basilare e gli strumenti per il
     ripristino da disastri nel caso qualcosa rovini il kernel o il
     blocco di avvio (boot block) del proprio disco fisso.

    RAWRITE.EXE.  un programma MS-DOS che scriver il contenuto di un
     file (come l'immagine di un disco di avvio) direttamente in un
     dischetto, senza preoccuparsi del formato.

  Se si intende creare i propri dischetti boot e root da un sistema MS-
  DOS si ha bisogno solo di RAWRITE.EXE.  Se invece si ha accesso a una
  workstation UNIX dotata di floppy, si possono creare da l i dischetti
  usando il comando `dd', o anche uno script fornito dal produttore.  Si
  veda la pagina man di dd(1) e si chieda assistenza a un guru UNIX
  locale.  C' un esempio di uso di dd pi avanti in questo documento.


    Il CD-ROM stesso.  Lo scopo del disco di boot  di rendere la
     propria macchina in grado di caricare il disco di root o di
     installazione, che a loro volta sono solo dei mezzi per preparare
     il proprio disco fisso e copiarci dentro porzioni del CD-ROM.  Se
     il proprio CD-ROM  avviabile, si pu fare il boot da questo e
     saltare direttamente alla preparazione del disco fisso.


  7.  L'installazione in dettaglio

  7.1.  Prepararsi per l'installazione

  Linux fa un uso pi efficace dell'hardware del PC rispetto a quanto ne
  fanno MS-DOS, Windows o NT, e per questo motivo  meno tollerante
  verso hardware mal configurato.  Ci sono alcune cose che si possono
  fare prima di cominciare per ridurre le possibilit di essere bloccati
  da uno di questi problemi.

  Per prima cosa, si raccolga qualsiasi manuale che si ha del proprio
  hardware (scheda madre, scheda video, monitor, modem, ecc.) e li si
  metta in un posto facile da raggiungere.

  Secondo, si raccolgano informazioni dettagliate sulla propria
  configurazione hardware.  Un modo semplice per farlo, se si usa MS-DOS
  5.0 o superiore,  di stampare un rapporto dalla utilit di
  diagnostica Microsoft mcd.exe (si possono lasciar perdere le parti
  relative ai TSR, ai driver, alla mappa della memoria, alle stringhe
  d'ambiente e alla versione del sistema operativo).  Tra le altre cose,
  ci garantir informazioni complete e corrette sulla propria scheda
  video e sul tipo di mouse, che saranno utili nella successiva
  configurazione di X.

  Terzo, si controlli la propria macchina per vedere se ci sono problemi
  di configurazione con l'hardware supportato che potrebbero causare un
  blocco irrecuperabile durante l'installazione di Linux.


    Un sistema DOS/Windows che usa dischi fissi e CD-ROM IDE pu
     funzionare anche se i ponticelli (jumper) master/slave dei dischi
     non sono correttamente impostati.  In questo modo Linux non
     funzioner!  Se si  nel dubbio si controllino tali ponticelli!

    Si ha qualche periferica hardware che non possiede n ponticelli di
     configurazione n memoria di configurazione non volatile?  Se 
     cos, queste per partire richiedono un'inizializzazione all'avvio
     attraverso una utilit MS-DOS e possono non essere facilmente
     accessibili da Linux.  Possono avere questo problema CD-ROM, schede
     audio, schede Ethernet e dispositivi a nastro a basso costo.
     Potrebbe essere possibile venirne a capo tramite un comando al
     prompt di avvio; si veda il Linux Boot Prompt HOWTO,
     <http://www.linuxdoc.org/HOWTO/BootPrompt-HOWTO.html> per i
     dettagli.
    Alcuni altri sistemi operativi permettono la condivisione di un IRQ
     tra un bus mouse e qualche altro dispositivo.  Linux non supporta
     questa cosa: infatti, se si prova si potrebbe bloccare la propria
     macchina.  Se si usa un bus mouse, si veda il Linux Bus Mouse
     HOWTO, <http://www.linuxdoc.org/HOWTO/Busmouse-HOWTO.html>, per i
     dettagli.

  Se possibile, ci si procuri il numero di telefono di un utente Linux
  esperto che si possa chiamare in caso di emergenza.  Nove volte su
  dieci non ce ne sar bisogno, ma d sicurezza averlo.

  Si tenga conto del tempo per l'installazione.  Ci vorranno circa una,
  due ore su un normale sistema per avere un sistema Linux completamente
  funzionante.  Anche pi di tre ore per un sistema dual-boot (hanno una
  maggiore incidenza di false partenze e blocchi).


  7.2.  Creare i dischetti di boot e root

  (Questo passo  necessario solo se non si pu fare il boot da un CD-
  ROM).

  Il proprio CD-ROM di Linux potrebbe contenere un programma d'aiuto che
  vi guider attraverso il processo di creazione dei dischetti di boot,
  di root e rescue attraverso dei prompt interattivi.  Potrebbe essere
  un programma di installazione MS-DOS (come il programma redhat.exe
  della Red Hat), uno script Unix o entrambi.

  Se si ha uno di questi programmi e lo si pu usare, si dovrebbe
  leggere il seguito di questa sotto sezione solo a titolo informativo.
  Si esegua il programma per fare la reale installazione: il suo autore
  certamente conosceva meglio di me la distribuzione specifica.

  Per informazioni pi dettagliate sulla creazione dei dischetti di
  boot, si veda il Linux Bootdisk HOWTO
  <http://www.linuxdoc.org/HOWTO/Bootdisk-HOWTO.html>.

  Il primo passo sar di scegliere un'immagine del dischetto di boot che
  vada bene con il proprio hardware.  Se lo si deve fare a mano,
  generalmente si trover che o (a) le immagini dei dischi di boot nel
  proprio CD-ROM sono chiamate in modo tale da aiutare a scegliere
  quello corretto oppure (b) c' un file indice l in zona che descrive
  ogni immagine.

  Poi si devono creare i dischetti dall'immagine di boot scelta e
  opzionalmente dalle immagini dei dischetti di ripristino.  Qui  dove
  entra il gioco il programma MS-DOS RAWRITE.EXE.

  Si devono avere due o tre dischetti formattati per MS-DOS ad alta
  densit (devono essere dello stesso tipo; ovvero, se il proprio
  lettore di dischetti  un lettore da 3.5", tutti i dischetti devono
  essere dischetti da 3.5" ad alta densit).  Si user RAWRITE.EXE per
  scrivere le immagini dei dischetti di boot nei floppy.

  Lo si lanci senza argomenti, in questo modo:


       C:\> RAWRITE


  Si risponda alle richieste per il nome del file da scrivere e del
  floppy in cui scrivere (come ad esempio A:). RAWRITE copier il file,
  blocco a blocco, direttamente nel dischetto.  Si usi RAWRITE anche per
  l'immagine del disco di root (come ad esempio COLOR144).  Quando lo si
   fatto, si hanno due dischetti: uno contenente il dischetto di boot,
  l'altro quello di root.  Si noti che questi due dischetti non saranno
  pi leggibili da MS-DOS (in un certo senso, sono dischetti
  ``formattati per Linux'').

  In un sistema UNIX si pu usare il comando dd(1) per fare la stessa
  cosa (per farlo, serve una workstation UNIX dotata di floppy,
  ovviamente). Per esempio, su una workstation Sun con il lettore di
  dischetti nel device /dev/rfd0, si pu usare il comando:



       $ dd if=bare of=/dev/rfd0 obs=18k




  Su alcune workstation si deve fornire l'argomento relativo alla
  dimensioni dei blocchi d'uscita ('l'argomento `obs') appropriato,
  altrimenti non funzioner.  Se si hanno problemi, la pagina man di
  dd(1) pu essere d'aiuto.

  Ci si assicuri di usare dischetti nuovi e senza errori.  I dischetti
  non devono contenere blocchi rovinati (bad block).

  Si noti che non serve far girare Linux o MS-DOS per poter installare
  Linux.  Comunque, l'uso di Linux o MS-DOS rende pi facile la
  creazione dei dischetti di boot e root dal proprio CD-ROM.  Se non si
  ha un sistema operativo nella propria macchina, si pu usare Linux o
  MS-DOS di qualcun'altro solo per le operazioni di creazione i
  dischetti, e poi usarli per l'installazione sulla propria macchina.


  7.3.  Ripartizionare i propri dischi DOS/Windows

  In molti sistemi, il disco fisso ha gi partizioni dedicate a MS-DOS,
  OS/2, ecc. Si deve cambiare la dimensione di queste partizioni per
  poter far spazio a Linux.  Se si intende creare un sistema dual-boot,
   fortemente raccomandata la lettura di uno o pi dei seguenti mini-
  HOWTO, che descrivono diverse configurazioni dual-boot.


    DOS-Win95-OS2-Linux mini-HOWTO,
     <http://www.linuxdoc.org/HOWTO/mini/Linux+DOS+Win95+OS2.html>.

    Linux+Win95 mini-HOWTO,
     <http://www.linuxdoc.org/HOWTO/mini/Linux+Win95.html>

    Linux+NT-Loader mini-HOWTO,
     <http://www.linuxdoc.org/HOWTO/mini/Linux+NT-Loader.html>

  Anche se non direttamente applicabili al proprio sistema, aiuteranno a
  capire le problematiche coinvolte.

  NOTA: Alcuni Linux si installeranno in una directory sulla partizione
  MS-DOS (questa cosa  diversa dall'installazione da una partizione MS-
  DOS).  In questo caso si usa il ``filesystem UMSDOS'', che permette di
  trattare una directory della partizione MS-DOS come un filesystem
  Linux.  In questo modo, non si deve ripartizionare il proprio disco.

  Suggerisco di usare questo metodo solo se il proprio disco ha gi
  quattro partizioni (il numero massimo supportato dal DOS) e
  ripartizionarlo sarebbe troppo problematico (per il proprio sistema
  Linux sar pi lento a causa del lavoro addizionale necessario per la
  traduzione dei nomi dei file).  Oppure, se si vuole provare Linux
  prima di ripartizionare, questo  un buon modo per farlo.  Ma nella
  maggior parte dei casi di dovrebbe ripartizionare, come descritto qui.
  Se si intende usare UMSDOS, occorre arrangiarsi, non verr qui
  documentato in dettaglio.  D'ora in poi, si assume di NON usare UMSDOS
  e che quindi si effettuer la ripartizione.

  Una partizione  semplicemente una sezione del disco fisso messa da
  parte per l'uso con un particolare sistema operativo.  Se si ha
  solamente MS-DOS, il proprio disco fisso probabilmente ha solamente
  una partizione, dedicata interamente a MS-DOS.  Per usare Linux,
  comunque, sar necessario ripartizionare il disco, in modo da avere
  una partizione per MS-DOS e una (o pi) per Linux.

  Le partizioni si dividono in tre tipi: primaria, estesa e logica.
  Brevemente, le partizioni primarie sono le quattro partizioni
  principali del disco.  Comunque, se si vogliono avere pi di quattro
  partizioni per disco, si deve rimpiazzare l'ultima partizione primaria
  con una partizione estesa, che pu contenere molte partizioni logiche.
  Non si immagazzinano i dati direttamente in una partizione estesa: 
  usata solo come contenitore per le partizioni logiche.  I dati sono
  immagazzinati solamente in partizioni primarie oppure in partizioni
  logiche.

  Per metterla in un altro modo, molti usano solo partizioni primarie.
  Comunque, se servono pi di quattro partizioni su un disco, si crea
  una partizione estesa.  Le partizioni logiche sono poi create sopra la
  partizione estesa, ed ecco fatto: pi di quattro partizioni per disco.

  Si noti che si pu facilmente installare Linux sul secondo disco nel
  proprio sistema (noto come D: a MS-DOS).  Semplicemente si specifichi
  il nome di device appropriato quando si creano le partizioni Linux.
  Ci  descritto in dettaglio nel seguito.

  Torniamo al ripartizionamento del disco.  Un tempo non c'era alcun
  modo di ridimensionare le partizioni senza distruggere i dati
  presenti.  Di questi tempi sono disponibili delle utilit di
  partizionamento che possono ridimensionare in maniera non distruttiva;
  conoscono la struttura dei filesystem, possono trovare lo spazio
  libero nel filesystem e possono spostare i dati dei file in giro per
  la partizione per spostare lo spazio libero dove necessario per poter
  effettuare correttamente il ridimensionamento.   ancora suggerito di
  fare un backup completo prima di usare uno di questi strumenti, in
  caso di errore del programma o umano.

  Sotto Linux GNU parted <http://www.gnu.org/software/parted> permette
  di creare, distruggere, ridimensionare e copiare partizioni.  Supporta
  i filesystem ext2, FAT16 e FAT32 e i dispositivi di swap di Linux;
  supporta anche le etichette per i dischi MS-DOS.  Parted  utile per
  fare spazio per nuovi sistemi operativi, riorganizzare l'uso del
  disco, copiare dati tra dischi fissi e creare immagini di dischi.  
  un programma relativamente nuovo, ma si dice funzioni bene e non
  rovini i dati.

  Sotto MS-DOS esiste un ripartizionatore non distruttivo di dischi
  chiamato FIPS.  Si veda a
  <http://metalab.unc.edu/pub/Linux/system/install>.  Con FIPS, un
  ottimizzatore di disco (come il Norton Speed Disk) e un po' di
  fortuna, si dovrebbe essere in grado di ridimensionare partizioni MS-
  DOS senza distruggere i dati presenti.

  Il metodo pi vecchio per ridimensionare una partizione, se non si ha
  uno di questi strumenti di ridimensionamento delle partizioni,  di
  cancellare la partizione (o le partizioni) e di ricrearle di
  dimensione minore.  Se si usa questo metodo, si deve assolutamente
  fare una copia di backup per poter salvare i propri dati.

  Il modo classico per modificare le partizioni  con il programam
  FDISK.  Per esempio, facciamo il caso di avere un disco fisso da 80
  mega, dedicato a MS-DOS.  Vorremo dividerlo in due: 40 mega per MS-DOS
  e 40 mega per Linux.  Per farlo, si lanci FDISK sotto MS-DOS, si
  cancelli la partizione da 80 mega e si ricrei una partizione MS-DOS da
  40 mega al suo posto.  Si pu poi riformattare la nuova partizione e
  reinstallare il proprio software MS-DOS dai backup.  40 megabyte del
  disco sono lasciati vuoti.  Pi tardi, si creino le partizioni Linux
  nella porzione non utilizzata del disco.

  In breve, si dovranno fare le seguenti cose per ridimensionare
  partizioni MS-DOS con FDISK:

  1. Fare un backup completo del sistema.

  2. Creare un dischetto MS-DOS avviabile, usando un comando tipo

       FORMAT /S A:


  3. Copiare i file FDISK.EXE e FORMAT.COM in questo dischetto, oltre
     alle altre utilit di cui si ha bisogno (per esempio, le utilit
     per ripristinare i dati dal backup).

  4. Riavviare usando il dischetto MS-DOS.

  5. Lanciare FDISK, possibilmente specificando il disco da modificare
     (come C: o D:).

  6. Usare le opzioni del menu di FDISK per cancellare le partizioni che
     si intende ridimensionare. Ci distrugger tutti i dati sulle
     partizioni in questione.

  7. Usare le opzioni del menu di FDISK per ricreare queste partizioni,
     di dimensioni minori.

  8. Uscire da FDISK e riformattare le nuove partizioni con il comando
     FORMAT.

  9. Ripristinare i file originali dal backup.

  Si noti che FDISK di MS-DOS offrir l'opzione di creare un ``disco
  logico DOS''.  Un disco logico DOS  semplicemente una partizione
  logica nel disco fisso.  Si pu installare Linux in una partizione
  logica, ma non si deve creare quella partizione logica con l'FDISK di
  MS-DOS.  Quindi, se attualmente si usa un disco logico DOS e si vuole
  installare Linux al suo posto, si dovrebbe cancellare il disco logico
  con l'FDSIK di MS-DOS, e (pi tardi) creare una partizione logica per
  Linux al suo posto.

  Il meccanismo usato per ripartizionare per OS/2 e altri sistemi
  operativi  simile.  Si veda la documentazione di questi sistemi
  operativi per i dettagli.


  7.4.  Creare partizioni per Linux

  Dopo aver ripartizionato il proprio disco,  necessario creare
  partizioni per Linux.  Prima di descrivere come farlo, si parler
  delle partizioni e dei filesystem sotto Linux.


  7.4.1.  Fondamenti sulle partizioni

  Linux richiede almeno una partizione, per il filesystem di root, che
  conterr il kernel di Linux.

  Si pu pensare a un filesystem come a una partizione formattata per
  Linux.  I filesystem sono usati per contenere i file.  Ogni sistema
  deve avere almeno un filesystem di root.  Comunque, molti utenti
  preferiscono usare diversi filesystem: uno per ogni parte principale
  dell'albero delle directory.  Per esempio, si pu voler creare un
  filesystem separato per contenere tutti i file sotto la directory /usr
  (si noti che nei sistemi UNIX, per delimitare le directory viene usata
  la barra diritta (`/') e non la barra inversa (`\')).  In questo caso
  si ha sia un filesystem di root che un filesystem per /usr.

  Ogni filesystem richiede una sua partizione.  Quindi se si usa sia un
  filesystem di root che uno per /usr, sar necessario creare due
  partizioni Linux.

  Inoltre, molti utenti creano una partizione di swap, usata come RAM
  virtuale.  Se si hanno, diciamo, 4 mega di memoria nella propria
  macchina e una partizione di swap da 10 megabyte, per quanto riguarda
  Linux si hanno 14 megabyte di memoria virtuale.

  Quando usa lo spazio di swap, Linux sposta la pagine di memoria
  inutilizzate nel disco, permettendo cos di eseguire
  contemporaneamente pi applicazioni nel sistema.  Comunque, poich
  tale operazione spesso  lenta, non  un rimpiazzo per della vera
  memoria RAM.  Ma le applicazioni che richiedono grosse quantit di
  memoria (come il sistema X Window) spesso fanno affidamento sulla swap
  se non si ha abbastanza RAM fisica.

  Praticamente tutti gli utenti di Linux impiegano una partizione di
  swap.  Se si hanno 4 mega di RAM o meno,  richiesta una partizione di
  swap per installare il software.  Una partizione di swap  fortemente
  raccomandata comunque, a meno di non avere una grande quantit di RAM
  fisica.

  La dimensione della partizione di swap dipende da quanta memoria
  virtuale serve.  Spesso viene suggerito di avere in totale almeno 16
  megabyte di memoria virtuale.  Quindi, se gi si hanno 8 mega di RAM
  fisica, si vorr creare una partizione di swap da 8 mega.  Si noti che
  le partizioni di swap non possono essere pi grandi di 128 megabyte.
  Quindi, se sono necessari pi di 128 mega di swap, si devono creare
  pi partizioni di swap.  Si possono avere in tutto 16 partizioni di
  swap.

  Si possono trovare maggiori informazioni sulla teoria della
  disposizione dello spazio di swap e del partizionamento del disco nel
  Linux Partition mini-HOWTO,
  <http://www.linuxdoc.org/HOWTO/mini/Partition.html>.

  Nota: in un sistema dual-boot  possibile, attraverso un piccolo
  trucco, condividere le partizioni di swap tra Linux e Windows 95.  Per
  i dettagli si veda il Linux Swap Space Mini-HOWTO,
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/unmaintained/mini/Swap-
  Space>.

  Tranello #1: se si ha un disco EIDE con una partizione che supera i
  504MB, il BIOS potrebbe non permettere di fare il boot del Linux l
  installato.  Quindi si mantenga la propria partizione di root sotto i
  504MB.  Questo non dovrebbe essere un problema per i controller dei
  dischi SCSI, che normalmente hanno il proprio BIOS firmware.  Per i
  dettagli tecnici, si veda il Large Disk Mini-HOWTO,
  <http://www.linuxdoc.org/HOWTO/mini/Large-Disk.html>.

  Tranello #2: Si stanno mischiando dischi IDE e SCSI?  Allora
  attenzione.  Il BIOS potrebbe non permettere il boot direttamente da
  un disco SCSI.




  7.4.2.  Dimensione delle partizioni

  Oltre alle partizioni di root e swap, si vorranno impostare una o pi
  partizioni per contenere il proprio software e home directory.

  Mentre, in teoria, si potrebbe far funzionare tutto in una unica
  grossa partizione di root, praticamente nessuno lo fa.  L'avere pi
  partizioni ha diversi vantaggi:


    Spesso abbassa il tempo richiesto per il controllo dei filesystem
     al boot.

    I file non possono crescere oltre i limiti delle partizioni.
     Quindi si possono usare i limiti delle partizioni come gabbia
     contro i programmi (come le news Usenet) che vogliono mangiarsi
     grosse fette di disco, per impedire che si approprino dello spazio
     necessario per il kernel e il resto delle applicazioni.

    Se mai si combiner qualcosa di brutto nel disco, formattare e
     ripristinare un'unica partizione  meno doloroso che dover rifare
     tutto da capo.

  Nei grossi dischi ora disponibili, una buona configurazione di base 
  di avere un piccola partizione di root (meno di 80 mega), una
  partizione /usr di medie dimensioni (fino a 300 mega) per contenere il
  software di sistema e una partizione /home che occupa il resto dello
  spazio disponibile per le home directory.

  Si possono fare anche cose pi elaborate.  Se si sa che si faranno
  girare le news Usenet, per esempio, si pu voler riservare una
  partizione solo per le news per poter cos controllare la massima
  utilizzazione del disco.  O creare una partizione /var per posta, news
  e file temporanei.  Ma nel regime odierno di dischi poco costosi e
  molto grandi queste complicazioni appaiono sempre meno necessarie per
  la prima installazione di Linux.  Specie la prima volta, si cerchi di
  mantenere le cose semplici.


  7.5.  Avviare il dischetto di installazione

  Il primo passo  di fare il boot dal dischetto di avvio che si 
  generato.  Normalmente si sar in grado di fare il boot senza toccare
  niente; il prompt di boot del kernel si riempir da solo dopo 10
  secondi.  Cos  come solitamente si far il boot da un disco IDE.

  Quel che realmente succede  questo: il dischetto di boot fornisce un
  sistema operativo in miniatura che (poich il disco fisso non  ancora
  stato preparato) usa una porzione della RAM disponibile come disco
  virtuale (chiamato, abbastanza logicamente, un `ramdisk').

  Il dischetto di boot carica nel ramdisk un piccolo insieme di file e
  strumenti di installazione che pi tardi si user per preparare il
  disco fisso e installarci un Linux utilizzabile dal CD-ROM.

  (In passato questo era un processo a due stadi, nel quale veniva
  utilizzato anche un secondo disco, detto `dischetto di root' (root
  disk); ci  cambiato quando sono stati introdotti i moduli del
  kernel).

  Specificando un argomento dopo il nome del kernel, si possono
  specificare, prima di avviare il kernel di Linux, diversi parametri
  hardware, come l'IRQ e l'indirizzo del proprio controller SCSI o la
  geometria del disco.  Ci pu essere necessario, per esempio, se Linux
  non rileva il controller SCSI o la geometria del disco.

  In particolare, molti controller SCSI senza BIOS richiedono che si
  specifichi un indirizzo di porta e un IRQ all'avvio. Analogamente, le
  macchine IBM PS/1, ThinkPad e ValuePoint non salvano la geometria del
  disco nel CMOS e quindi deve essere specificata all'avvio (pi tardi,
  si sar in grado di configurare il sistema in modo che fornisca da
  solo questi parametri).

  Si presti attenzione ai messaggi durante l'avvio del sistema.
  Elencheranno e descriveranno l'hardware che rileva la propria
  installazione di Linux.  In particolare, se si ha un controller SCSI,
  si dovrebbe vedere un elenco degli host SCSI rilevati.  Se si vede il
  messaggio:



       SCSI: 0 hosts




  allora non  stato rilevato alcun controller SCSI e a questo punto non
  c' modo di dire al kernel dove sta.

  Inoltre, il sistema mostrer informazioni sulle partizioni del disco e
  sui dispositivi rilevati.  Se manca qualcuna di queste informazioni
  oppure non  corretta si deve forzare il rilevamento dell'hardware.

  D'altra parte, se tutto va bene e sembra che il proprio hardware sia
  stato rilevato, si pu passare direttamente alla sezione seguente,
  ``Usare il dischetto di root''.

  Per forzare il rilevamento dell'hardware, si devono inserire i
  parametri appositi al prompt di boot, usando la seguente sintassi:



       linux <parametri...>




  Sono disponibili diversi parametri di questo tipo; nel seguito un
  elenco di alcuni dei pi comuni.  I dischetti di boot moderni di Linux
  spesso offrono la possibilit di vedere, prima di fare il boot, una
  schermata d'aiuto che descrive alcuni parametri del kernel.


    hd=cilindri,testine,settori Specifica la geometria del disco.
     Richiesto per sistemi come IBM PS/1, ValuePoint e ThinkPad.  Per
     esempio, se il proprio disco ha 683 cilindri, 16 testine e 32
     settori per traccia, si inserisca



       linux hd=683,16,32





    tmc8xx=memaddr,irq Specifica l'indirizzo e l'IRQ per il controller
     SCSI senza BIOS Future Domain TMC-8xx.  Per esempio,




  linux tmc8xx=0xca000,5





  Si noti che deve essere usato il prefisso 0x per tutti i valori speci
  ficati in esadecimale.  Ci  vero anche per tutte le opzioni
  seguenti.

    st0x=memaddr,irq Specifica l'indirizzo e l'IRQ per il controller
     SCSI senza BIOS Seagate ST02.

    t128=memaddr,irq Specifica l'indirizzo e l'IRQ per il controller
     SCSI senza BIOS Trantor T128B.

    ncr5380=port,irq,dma Specifica la porta, l'IRQ e il canale DMA per
     il generico controller SCSI NCR5380.

    aha152x=port,irq,scsi_id,1 Specifica la porta, l'IRQ e l'ID SCSI
     per i controller senza BIOS AIC-6260.  Questi includono i
     controller Adaptec 1510, 152x e la Soundblaster-SCSI.

  Se si hanno domande su queste opzioni d'avvio, invito a leggere il
  Linux SCSI HOWTO, che dovrebbe essere disponibile su qualsiasi
  archivio FTP di Linux (o da dove si  ottenuto questo documento).  Lo
  SCSI HOWTO illustra la compatibilit SCSI di Linux in maggior
  dettaglio.



  7.5.1.  Scegliere fra l'installazione EGA o X

  I vecchi Linux (tra cui Slackware) a questo punto presentavano il
  prompt di una shell e chiedevano di inserire, in un ordine
  prestabilito, i comandi di installazione.  Ci  ancora possibile, ma
  quelli pi nuovi partono lanciando un programma di installazione
  ``orientato allo schermo'' che prova a guidare interattivamente
  attraverso i vari passi, offrendo pure un sacco di aiuto in linea.

  Probabilmente verr offerta l'opzione di provare a configurare X
  adesso cosicch il programma di installazione possa andare in grafica.
  Se si sceglie questa strada, il programma di installazione far
  domande sul tipo di mouse e monitor posseduti prima di procedere
  nell'installazione.  Una volta installato Linux, queste impostazioni
  saranno salvate.  Pi avanti si sar in grado di regolare le
  prestazioni del proprio monitor, mentre a questo punto conviene
  impostare una semplice modalit SVGA 640x480.

  X non  necessario per l'installazione, ma (ammesso si sia superata la
  configurazione del mouse e del monitor) molti trovano l'interfaccia
  grafica pi semplice da usare.  E poich prima o poi sicuramente si
  dovr configurare X, provare adesso non  una cattiva idea.

  Si seguano semplicemente le istruzioni nel programma.  Vi porter
  attraverso i passi necessari per preparare il disco, creare account
  iniziali per gli utenti e installare i pacchetti software dal CD-ROM.

  Nelle sottosezioni che seguono si descriveranno alcune delle aree pi
  macchinose della sequenza di installazione come se le si facesse a
  mano.  Ci dovrebbe aiutare a capire cosa sta facendo il programma di
  installazione e perch lo fa.




  7.5.2.  Usare fdisk  e cfdisk

  Il primo passo dell'installazione una volta avviato il dischetto di
  root di Linux sar creare o modificare le tavole delle partizioni nei
  propri dischi.  Anche se prima si  usato FDISK per impostare le
  partizioni, ora si dovr rimettere mano alla tabella delle partizioni
  e inserire alcune informazioni specifiche per Linux.

  Per creare o modificare partizioni Linux, useremo la versione Linux
  del programma fdisk, o il suo fratello orientato allo schermo cfdisk.

  Generalmente il programma di installazione cercher una tabella di
  partizioni preesistente e offrir di eseguire su di essa fdisk o
  cfdisk.  Dei due, cfdisk  sicuramente pi facile da usare, ma la
  versioni correnti sono pure meno tolleranti nel caso di tabelle delle
  partizioni non esistenti o alterate.

  Quindi pu capitare (specialmente se si sta installando su
  dell'hardware vergine) che sia necessario avviare fdisk per portarsi
  ad uno stato che cfdisk pu gestire.  Si provi a lanciare cfdisk; se
  si lagna, si lanci fdisk (un buon modo per procedere se si sta
  costruendo un sistema con solo Linux e cfdisk si lagna,  di usare
  fdisk per cancellare tutte le partizioni esistenti e poi lanciare
  cfdisk per modificare la tavola vuota).

  Alcune note che si applicano sia a fdisk che a cfdisk.  Entrambi
  accettato un argomento che  il nome del disco nel quale si vuole
  creare una partizione Linux.  I nomi di device dei dischi fissi sono:


    /dev/hda Primo disco IDE

    /dev/hdb Secondo disco IDE

    /dev/sda Primo disco SCSI

    /dev/sdb Secondo disco SCSI

  Per esempio, per creare partizioni Linux su primo disco SCSI nel
  proprio sistema, si user (oppure il proprio programma di
  installazione potrebbe generarlo da una scelta in un menu) il comando:


       cfdisk /dev/sda


  Se si usa fdisk o cfdisk senza un argomento, assumeranno /dev/hda.

  Per creare partizioni Linux sul secondo disco del proprio sistema,
  semplicemente si specifichi /dev/hdb (per dischi IDE) oppure /dev/sdb
  (per dischi SCSI) quando si esegue fdisk.

  Le partizioni Linux non devono trovarsi necessariamente tutte nello
  stesso disco.   possibile creare, per esempio, una partizione per il
  filesystem di root su /dev/hda e una di swap su /dev/hdb.  Per poterlo
  fare semplicemente si esegua fdisk o cfdisk su ciascun disco.

  Sotto Linux alle partizioni  dato un nome a seconda del disco al
  quale appartengono.  Per esempio, la prima partizione sul disco
  /dev/hda  /dev/hda1, la seconda  /dev/hda2 e cos via.  Se si ha una
  qualsiasi partizione logica, questa  numerata a partire da /dev/hda5,
  /dev/hda6 e cos via.

  NOTA: Con fdisk o cfdisk di Linux non si dovrebbero creare o
  cancellare partizioni per sistemi operativi diversi da Linux.  Ovvero,
  non si creino o si cancellino partizioni MS-DOS con questa versione di
  fdisk; si usi invece la versione MS-DOS di FDISK.  Se si prova a
  creare partizioni MS-DOS con l'fdisk di Linux,  possibile che MS-DOS
  non riconosca la partizioni e non si avvii correttamente.

  Ecco qui un esempio d'uso di fdisk.  Qui, c'  una sola partizione MS-
  DOS che usa 61693 blocchi sul disco e il resto del disco  libero per
  Linux (sotto Linux un blocco  1024 byte, quindi 61693 blocchi sono
  circa 61 megabyte).  Si creeranno solo due partizioni in questo
  esempio, una di swap e l'altra di root.  Probabilmente si dovrebbe
  estendere il tutto a quattro partizioni Linux, in linea con le
  raccomandazioni di prima: una per la swap, una per il filesystem di
  root, una per il software di sistema e un'area per le home directory.

  Per prima cosa, si usi il comando ``p'' per vedere la tabella delle
  partizioni corrente.  Come si pu vedere, /dev/hda1 (la prima
  partizione su /dev/hda)  una partizione DOS di 61693 blocchi.


       Command (m for help):   p
       Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
       Units = cylinders of 608 * 512 bytes

            Device Boot  Begin   Start     End  Blocks   Id  System
         /dev/hda1   *       1       1     203   61693    6  DOS 16-bit >=32M

       Command (m for help):




  Poi, si usi il comando ``n'' per creare una nuova partizione. La
  partizione Linux sar di 80 mega.



       Command (m for help):  n
       Command action
           e   extended
           p   primary partition (1-4)
       p




  Qui  stato chiesto se si voleva creare una partizione estesa o
  primaria.  Nella maggior parte dei casi si vorranno usare partizioni
  primarie, a meno che non si abbia bisogno di pi di quattro partizioni
  su un disco.  Si veda la precedente sezione ``Ripartizionamento'' per
  maggiori informazioni.



       Partition number (1-4): 2
       First cylinder (204-683):  204
       Last cylinder or +size or +sizeM or +sizeK (204-683): +80M




  Il primo cilindro dovr essere il primo cilindro libero DOPO la fine
  dell'ultima partizione.  In questo caso, /dev/hda1 termina sul
  cilindro 203, quindi la nuova partizione deve iniziare al cilindro
  204.

  Come si vede, si  usata la notazione ``+80M'', che specifica una
  partizione da 80 mega.  Analogamente la notazione ``+80K'' specifica
  una partizione da 80 kylobyte e ``+80'' specifica una partizione di
  soli 80 byte.



       Warning: Linux cannot currently use 33090 sectors of this partition




  Se si vede questo avviso, lo si pu ignorare.   il rimasuglio di una
  vecchia restrizione che imponeva che i filesystem di Linux non
  potevano superare la dimensione di 64 mega.  Comunque, con i tipi di
  filesystem pi recenti, non  pi il caso di preoccuparsi... le
  partizioni possono ora essere grandi sino a 4 terabyte.

  Si crei poi la partizione di swap da 10 mega, /dev/hda3.



       Command (m for help): n
       Command action
           e   extended
           p   primary partition (1-4)
       p

       Partition number (1-4): 3
       First cylinder (474-683):  474
       Last cylinder or +size or +sizeM or +sizeK (474-683):  +10M




  Ancora, si veda il contenuto delle tabella delle partizioni.  Ci si
  assicuri di trascrivere da qualche parte le informazioni, specialmente
  la dimensione di ogni partizione in blocchi.  Queste informazioni
  serviranno pi tardi.



       Command (m for help): p
       Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
       Units = cylinders of 608 * 512 bytes

            Device Boot  Begin   Start     End  Blocks   Id  System
         /dev/hda1   *       1       1     203   61693    6  DOS 16-bit >=32M
         /dev/hda2         204     204     473   82080   83  Linux native
         /dev/hda3         474     474     507   10336   83  Linux native




  Si noti che la partizione di swap di Linux (la /dev/hda3)  di tipo
  ``Linux native''.   necessario cambiare il tipo della partizione di
  swap a ``Linux swap'' cosicch il programma di installazione la
  riconosca come tale.  Per farlo, si usi il comando ``t'' di fdisk:



       Command (m for help): t
       Partition number (1-4): 3
       Hex code (type L to list codes): 82




  Se si usa ``L'' per elencare i codici dei tipi, si vedr che 82  il
  tipo corrispondente a Linux swap.

  Per uscire da fdisk e salvare le modifiche nella tabella delle
  partizioni, si usi il comando ``w''. Per uscire  da fdisk SENZA
  salvare le modifiche, si usi il comando ``q''.

  Dopo essere usciti da fdisk, il sistema potrebbe chiedere di riavviare
  per assicurarsi che le modifiche abbiano effetto.  In genere non c'
  ragione per riavviare dopo aver usato fdisk: le versioni moderne di
  fdisk e cfdisk sono abbastanza sveglie da aggiornare le partizioni
  senza che sia necessario riavviare.


  7.5.3.  Passi dopo il ripartizionamento

  Dopo aver modificato le tabelle delle partizioni, il proprio programma
  di installazione dovrebbe darci un'occhiata e offrirsi di abilitare la
  partizione di swap.  Si risponda di s (viene chiesto, invece di farlo
  automaticamente, nel caso si abbia un sistema dual-boot e una delle
  proprie partizioni non Linux assomigli accidentalmente a una zona di
  swap).

  Successivamente il programma chieder di associare nomi di filesystem
  (come /, /usr, /var, /tmp, /home, /home2, ecc.) con ognuna delle
  partizioni non di swap che si intende usare.

  C' solo una regola veloce e rigida in tutto questo.  Ci deve essere
  un filesystem di root, chiamato /, e dev'essere avviabile.  Le altre
  partizioni di Linux le si pu chiamare come si vuole.  Ma ci sono
  alcune convenzioni sui nomi che probabilmente vi semplificheranno la
  vita pi tardi.

  In precedenza si  raccomandata un'impostazione basilare con tre
  partizioni: una piccola root, una partizione di medie dimensioni per
  il software di sistema e una grossa partizione per le home.
  Tradizionalmente, queste sarebbero chiamate /, /usr e /home.  Il
  controintuitivo nome `/usr' ha le sue ragioni storiche dai giorni in
  cui i sistemi Unix (molto pi piccoli) mettevano il software di
  sistema e le home directory degli utenti in un unica partizione.  Il
  funzionamento di buona parte del software dipende da questi nomi.

  Se si ha pi di un area per le home directory,  convenzione chiamarle
  /home, /home2, /home3, ecc.  Questo pu accadere se si ha pi di un
  disco fisico.  Nel mio sistema personale, per esempio, la struttura
  del filesystem appare cos:



       Filesystem         1024-blocks  Used Available Capacity Mounted on
       /dev/sda1              30719   22337     6796     77%   /
       /dev/sda3             595663  327608   237284     58%   /usr
       /dev/sda4            1371370    1174  1299336      0%   /home
       /dev/sdb1            1000949  643108   306130     68%   /home2




  Il secondo disco (sdb1) non  realmente dedicato completamente a
  /home2; non sono mostrate le partizioni di swap di sda e sdb.  Ma si
  pu vedere che /home  la pi grande area libera su sda e /home2 
  l'area utente di sdb.

  Se si vuole creare una partizione per l'area di scratch, spool, per i
  file temporanei, le mail e le news, la si chiami /var.  Altrimenti, si
  pu creare /usr/var e creare un link simbolico chiamato /var che ci
  punti (il programma di installazione potrebbe offrirsi di farlo).


  7.6.  Installare i pacchetti software

  Una volta create le partizioni, il resto dell'installazione dovrebbe
  essere praticamente automatico.  Il proprio programma di installazione
  (che sia in EGA o X) guider attraverso una serie di menu che
  permettono di specificare il CD-ROM dal quale installare, la
  partizione da usare e cos via.

  Qui non si entrer nello specifico di questo stadio di installazione.
   una delle parti che varia di pi tra le diverse distribuzioni di
  Linux (tradizionalmente i rivenditori competono per aggiungere valore
  a questa fase), ma  anche la parte pi semplice.  E i programmi di
  installazione sono molto ben documentati e con utili schermate di
  aiuto.


  7.7.  Dopo l'installazione dei pacchetti

  Dopo che l'installazione  completa, e se tutto  andato bene, il
  programma di installazione vi porter attraverso alcune scelte per
  configurare il sistema in vista del suo primo avvio da disco fisso.


  7.7.1.  LILO, il LInux LOader

  LILO (che significa ``LInux LOader'')  un programma che consente di
  avviare Linux (e gli altri sistemi operativi, come MS-DOS) dal vostro
  disco rigido.

  Pu darsi che il programma di installazione chieda di installare LILO
  sul disco rigido. A meno che non si usi OS/2, si risponda di s.  OS/2
  ha delle esigenze particolari, vedi ``Configurazione personalizzata di
  LILO''.

  Installare LILO come loader primario rende inutile l'uso di un
  dischetto di avvio: ad ogni avvio  possibile dire a LILO quale
  sistema operativo lanciare.


  7.7.2.  Come creare un dischetto di avvio (facoltativo)

  Si pu anche avere la possibilit di creare un ``dischetto di avvio
  standard'' da usare per avviare il sistema Linux appena installato
  (questo  un metodo vecchio e non molto comodo, che assume che
  normalmente si avvii il DOS, e si usi il dischetto di avvio per
  entrare in Linux).

  Per questo sar chiesto un dischetto ad alta densit vuoto e
  formattato per MS-DOS dello stesso tipo che si usa per fare il boot
  del sistema.  Semplicemente si inserisca il dischetto quando chiesto e
  sar creato un dischetto di avvio (non  lo stesso usato per
  l'installazione e i due non possono essere sostituiti l'uno
  all'altro!).


  7.7.3.  Miscellanea sulla configurazione del sistema

  La procedura di post-installazione pu anche portare attraverso
  diversi menu che permettono di configurare il proprio sistema.  Questi
  permettono di specificare il device del proprio modem e del mouse, il
  fuso orario, ecc.  Si seguano le opzioni dei menu.


  Pu essere chiesto anche di creare account utente o di specificare una
  password per l'account di root (l'amministratore).  Non sono cose
  complicate e si possono semplicemente seguire le istruzioni a video.


  8.  Avviare il nuovo sistema

  Se tutto  andato come previsto, si dovrebbe ora essere in grado di
  avviare Linux dal disco fisso usando LILO.  Alternativamente, si
  dovrebbe essere in grado di avviare tramite il dischetto di boot (non
  il dischetto di boot originale, ma il dischetto creato dopo aver
  installato il software).  Dopo l'avvio, si effettui il login come
  root.  Congratulazioni!  Si  preso possesso del proprio sistema
  Linux.

  Se si avvia usando LILO, si provi a tener premuto il tasto shift o il
  tasto control durante il boot.  Ci permetter di accedere al prompt
  di boot; si prema il tasto tab per vedere una lista di opzioni.  In
  questo modo  possibile avviare Linux, MS-DOS e quant'altro
  direttamente da LILO.


  9.  Dopo il primo avvio

  Si dovrebbe vedere la richiesta di login del nuovo Linux, appena
  avviato dal proprio disco fisso.  Congratulazioni!


  9.1.  Primi passi nell'amministrazione di sistema

  A seconda di come sono andate le varie fasi dell'installazione, a
  questo punto pu essere necessario creare account, cambiare il nome
  dell'host o (ri)configurare X.  Ci sono molte altre cose che si
  possono impostare e configurare, tra i cui dispositivi di backup, le
  connessioni SLIP/PPP a un fornitore di servizi Internet, ecc.

  Un buon libro sull'amministrazione di sistema UNIX sar d'aiuto
  (suggerisco Essential Systems Administration della O'Reilly and
  Associates).  Col passare del tempo imparerete tutto.  Per
  informazioni sugli altri aspetti della configurazione  bene leggere
  altri Linux HOWTO, come il NET-3-HOWTO e il Printing-HOWTO.


  9.2.  Configurazione personalizzata di LILO

  LILO  un boot loader che pu essere usato per scegliere tra Linux,
  MS-DOS e alcuni altri sistemi operativi all'avvio della macchina.  
  possibile che la propria distribuzione configuri automaticamente LILO
  durante la fase di installazione (a meno che non si usi OS/2, questo 
  quello che si dovrebbe aver fatto).  Se  cos, si pu saltare il
  resto di questo sezione.

  Se si  installato LILO come boot loader primario, gestir il primo
  stadio del processo di avvio per tutti i sistemi operativi presenti
  sul disco fisso.  Ci funziona bene se MS-DOS  il solo altro sistema
  operativo installato nel sistema.  Comunque, si pu voler usare anche
  OS/2 che dispone di un suo Boot Manager.  In questo caso, si deve
  usare il Boot Manager di OS/2 come boot loader primario e usare LILO
  solamente per avviare Linux (come boot loader secondario).

  Un importante problema per quanti usano sistemi EIDE: a causa di una
  limitazione del BIOS, il settore di boot di qualsiasi sistema
  operativo presente deve stare in uno dei primi due dischi fisici.
  Altrimenti LILO si bloccher dopo aver scritto "LI", e non c' modo di
  smuoverlo da l.

  Se si deve configurare manualmente LILO, occorre modificare il file
  /etc/lilo.conf.  Qui sotto viene presentato un esempio di un file di
  configurazione di LILO, dove la partizione di root di Linux  su
  /dev/hda2 e MS-DOS  installato su /dev/hdb1 (sul secondo disco
  fisso).



       # Dice a LILO di installarsi come boot loader primario su /dev/hda.
       boot = /dev/hda
       # L'immagine di boot da installare; probabilmente non serve cambiarla.
       install = /boot/boot.b

       # Sezione per avviare Linux.
       image = /vmlinuz       # Il kernel  in /vmlinuz
         label = linux        # Diamogli il nome "linux"
         root = /dev/hda2     # Usa /dev/hda2 come filesystem di root
         vga = ask            # Chiedi la modalit VGA
         append = "aha152x=0x340,11,7,1"  # Aggiungiamo queste cose alle
          # opzioni di avvio per rilevare il controller SCSI

       # Sezione per avviare MS-DOS
       other = /dev/hdb1      # Questa  la partizione MS-DOS
         label = msdos        # Diamogli in nome "msdos"
         table = /dev/hdb     # Tabella delle partizioni per il secondo disco




  Una volta modificato il file /etc/lilo.conf, come root si esegua
  /sbin/lilo.  Cos si installer LILO sul proprio disco.  Si noti che
  si deve rilanciare /sbin/lilo ogni volta che si compila il proprio
  kernel in modo da far s che il boot loader punti a quello giusto
  (qualcosa di cui adesso non ci si deve preoccupare pi di tanto, ma
  che  bene tenere a mente).

  Si noti come viene usata l'opzione append in /etc/lilo.conf per
  specificare i parametri di boot come abbiamo fatto quando si  avviato
  usando il dischetto di boot.

  Ora si pu riavviare il proprio sistema dal disco fisso.  Per default
  LILO avvier il sistema operativo che trova per primo nel file di
  configurazione, che in questo caso  Linux.  Per accedere a un menu di
  avvio, utile per selezionare l'altro sistema operativo, si tenga
  premuto lo shift o il ctrl durante l'avvio del sistema.  Si dovrebbe
  vedere un prompt come questo

       Boot:


  Si digiti qui il nome del sistema operativo da avviare (dato dalla
  riga label nel file di configurazione; in questo caso o linux oppure
  msdos), oppure si prema tab per avere una lista.

  Facciamo ora il caso che si voglia usare LILO come boot loader
  secondario; si vuole, ad esempio, avviare Linux dal Boot Manager di
  OS/2.  Per poter avviare una partizione Linux dal Boot Manager di OS/2
  sfortunatamente si deve creare la partizione usando l'FDISK di OS/2
  (non quello di Linux) e formattare la partizione come FAT o HPFS in
  modo che OS/2 la riconosca (ringraziate l'IBM).

  Per far s che LILO avvii Linux dal Boot Manager di OS/2, si deve
  solamente installare LILO nel proprio filesystem di root di Linux
  (nell'esempio di prima /dev/hda2).  In questo caso, il proprio file di
  configurazione di LILO dovrebbe essere qualcosa del tipo:

       boot = /dev/hda2
       install = /boot/boot.b
       compact

       image = /vmlinuz
         label = linux
         root = /dev/hda2
         vga = ask




  Si noti la modifica nella riga boot.  Dopo aver lanciato /sbin/lilo si
  dovrebbe essere in grado di aggiungere la partizione Linux al Boot
  Manager.  Questa procedura dovrebbe funzionare pure per i boot loader
  usati da altri sistemi operativi.


  10.  Questioni legali


  10.1.  Licenza d'uso (in inglese)

  This document is copyright 1998 by Eric S. Raymond. You may use,
  disseminate, and reproduce it freely, provided you:


    Do not omit or alter this copyright notice (you may translate it).

    Do not omit or alter or omit the version number and date.

    Do not omit or alter the document's pointer to the current WWW
     version.

    Clearly mark any condensed, altered or versions as such.

  These restrictions are intended to protect potential readers from
  stale or mangled versions.  If you think you have a good case for an
  exception, ask me.


  10.2.  Ringraziamenti

  Un sentito ringraziamento va a Matt D. Welsh, l'autore originale di
  questo HOWTO.  Io ho rimosso molto del contenuto specifico per
  Slackware e ho reindirizzato il resto del documento sull'installazione
  da CD-ROM, ma una parte sostanziale di quel che ha scritto  ancora
  presente.

  La versione 4.1  stata sostanzialmente migliorata da alcuni
  suggerimenti di David Shao <dshao@best.com>.















  The Linux Intranet Server HOWTO
  Pramod Karnad, karnad@indiamail.com
  v2.11, 7 Agosto 1997

  Questo documento descrive come impostare una intranet usando Linux
  come server per collegare insieme Unix, Netware, NT e Windows. Quindi,
  semplicemente stabilendo la connessione al vostro sistema Linux avrete
  accesso trasparente a tutte le piattaforme. Vengono fornite spie
  gazioni dettagliate su come installare HTTP utilizzando il server NCSA
  e come collegarsi a esso da client TCP/IP della Novell, Microsoft Win
  dows 3.1, WFWG, Win95 e WinNT e MacTCP sul PowerMac della Apple.
  Traduzione italiana e manutenzione: Jose Luis Scanferlato
  (jls@acm.org).

  1.  Introduzione

  In parole semplici, intranet  un termine descrittivo che viene usato
  per l'utilizzo delle tecnologie di Internet all'interno di un ente
  aziendale, piuttosto che per la connessione esterna alla rete globale
  Internet. Questa implementazione viene svolta in modo tale da
  distribuire le risorse informatiche di una organizzazione in modo
  trasparente e direttamente sulla scrivania di ogni individuo con
  minimo costo, tempo e fatica. Questo documento intende spiegare in
  parole semplici come impostare un'intranet usando strumenti software
  liberamente disponibili oppure che hanno un costo minimo.

  Questo documento assume che sappiate gi come installare TCP/IP sul
  vostro server Linux e come collegarlo fisicamente alla vostra LAN
  usando una scheda di rete Ethernet. Si presuppone che abbiate inoltre
  le conoscenze basilari dei sistemi Netware, WinNT e Mac. La
  configurazione del server Netware  stata illustrata usando come base
  la versione 3.1x. Potete anche usare INETCFG per ottenere lo stesso
  risultato. Dal lato client, la discussione riguarda Windows 3.1x,
  Windows for Workgroups, Windows 95, WinNT e Apple PowerMac.

  Negli esempi useremo gli indirizzi delle rete private (RFC-1918)
  172.16.0.0 e 172.17.0.0. Potete scegliere altri indirizzi a seconda
  delle vostre esigenze.




              Server      Server       Server
              Linux       Netware      WFWG/WinNT
             172.16.0.1   172.16.0.2   172.16.0.3
                |           |           |    172.16.0.0
          ------+-----+-----+--------+--+--------------
                      |              | 172.16.0.254
                    W/S 1          Router
                  172.16.0.5         | 172.17.0.254
                                     |
                           ----------+-------+--------
                      172.17.0.0             |
                                           W/S 2
                                         172.17.0.5





  1.1.  Cosa serve

  Prima di tentare di installare, dovete procurarvi il seguente
  software.


    Il software del server HTTP che potete prelevare da OneStep NCSA
     HTTPd Downloader sulla pagina
     http://hoohoo.ncsa.uiuc.edu/docs/setup/OneStep.html.

    Il client Netware della Novell, disponibile da
     http://support.novell.com/ (I file TCP/IP vengono distribuiti
     insieme al client).

    Il client TCP/IP della Microsoft, disponibile da
     http://www.microsoft.com/

    Il client Apple MacTCP, disponibile da http://www.apple.com/

    Un WWW Browser come Netscape da http://home.netscape.com/ o MS
     Internet Explorer da http://www.microsoft.com/ o NCSA Mosaic da
     http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/NCSAMosaicHome.html


  1.2.  Nuove versioni di questo documento

  L'ultima versione (in italiano) di questo documento, sar sempre
  reperibile nell'area WWW e FTP dell'Italian Linux Documentation
  Project (rispettivamente  http://www.pluto.linux.it/ildp/ e
  ftp://ftp.pluto.linux.it/pub/ildp/ per la rete commerciale, e
  http://ildp.psy.unipd.it e ftp://ftp.psy.unipd.it/pub/pluto/ildp/ per
  la rete GARR e loro mirror elencati nel file
  ftp://ftp.pluto.linux.it/pub/pluto/MIRRORS.

  L'ultima versione (in inglese) di Linux Intranet Server HOWTO sar
  periodicamente inviata sui newsgroup comp.os.linux.announce e
  comp.os.linux.help, ed  anche disponibile sui vari siti FTP dedicati
  a Linux, compreso sunsite.unc.edu.

  L'ultima versione (in inglese) di questo documento  disponibile in
  formato HTML a http://www.inet.co.th/cyberclub/karnadp/http.html.




  1.3.  Critiche e commenti

  Se avete delle domande o commenti su questo documento, potete
  contattare via E-mail Pramod Karnad, all'indirizzo
  karnad@indiamail.com. Suggerimenti, critiche e posta sono sempre
  benvenuti. Se trovate degli errori in questo documento, fatemelo
  sapere in modo di correggerli in una versione successiva. Grazie.


  2.  Installazione del server HTTP

  Quando prelevate il software avete due opzioni: ottenere i sorgenti e
  compilarli, oppure prendere gli eseguibili precompilati. Da NCSA sono
  disponibli gli eseguibili precompilati per Linux (ELF), ma non per
  versioni pi vecchie.


  2.1.  Preparativi per il prelievo del software

  Il server della NCSA vi guider attraverso i passi delle diverse
  opzioni di configurazione, e preparer i vari file per Voi. Ma prima
  di tentare il prelievo di HTTPd preparatevi a rispondere alle seguenti
  domande




  2.1.1.  Il sistema operativo

  Prima, dovete scegliere tra prelevare i sorgenti e la versione pre-
  compilata del software. Se il vostro sistema non compare nei menu,
  allora dovrete prelevare i sorgenti di default e compilarlo Voi
  stessi.

  Per verificare la versione di Linux che state usando, digitate il
  seguente comando


         linux:~$  uname -a




  La risposta del comando sar simile a questa


          linux:~$  uname -a
          Linux linux 2.0.29 #4 Tue Sep 13 04:05:51 CDT 1994 i586
          linux:~$




  La versione di Linux  2.0.29.

  I rimanenti parametri possono essere specificati prima del prelievo
  oppure configurati pi tardi modificando il file srm.conf nella
  cartella /usr/local/etc/httpd/conf. I nomi delle direttive attuali che
  appaiono nel file httpd.conf sono racchiuse tra parentesi quadre.
  L'unica eccezione  la direttiva DocumentRoot che compare nel file
  srm.conf


  2.1.2.  Tipo di processo (ServerType)

  Questo specifica come verr eseguito il server HTTPd sul vostro
  sistema. Il metodo consigliato  ``standalone''. In questo modo il
  demone HTTP sar costantemente in esecuzione. Se scegliete di caricare
  HTTPd sotto "inetd", l'eseguibile del server verr ricaricato in
  memoria a ogni richiesta, il che pu rallentare il vostro sistema.


  2.1.3.  Porta abbinata (Port)

  Questo specifica a quale porta viene abbinato il demone HTTPd per
  rispondere alle richieste HTTP sul vostro sistema. Se potete entrare
  come ``root'', usate 80 come default. Altrimenti usate qualsiasi
  valore compreso tra 1025 e 65535.


  2.1.4.  Identificativo utente del server (User)

  Questo  lo user id che il server assumer quando risponde alle
  richieste ed accede ai file. Questa domanda  significativa solo se il
  vostro server viene eseguito come ``standalone''.  Se non avete i
  diritti di root, usate semplicemente il vostro nome di utente. Se
  siete l'amministratore del sistema, potete creare un utente speciale
  in modo di controllare i diritti di accesso ai file.





  2.1.5.  Identificativo di gruppo del server (Group)

  Questo  il group id che il server utilizzer quando risponde alle
  richieste ed accede ai file. Come per l'identificativo utente del
  server,  significativo solo quando il server gira in modo
  ``standalone''.

  Se non avete i diritti di root, usate semplicemente il nome del vostro
  gruppo primario. Per trovare il nome del gruppo, usate il comando
  groups.


  2.1.6.  Indirizzo di posta elettronica dell'amministratore del server
  (ServerAdmin)

  Questo  l'indirizzo di posta elettronica dell'utente al quale si
  dovrebbe inviare i messaggi di segnalazione dei problemi sul server.
  Potete mettere la vostra e-mail personale.


  2.1.7.  Cartella di ubicazione del server (ServerRoot)

  Questa  la cartella dove risiede il server all'interno del vostro
  sistema. Se avete i diritti di root, usate la cartella consigliata
  /usr/local/etc/httpd. Se non avete i diritti di root, scegliete una
  sottocartella all'interno della propria cartella personale. Potete
  sapere il percorso della vostra cartella personale con il comando pwd.


  2.1.8.  Ubicazione dei file HTML (DocumentRoot)

  Questo  il posto dove si trovano i file HTML che saranno serviti.
  L'ubicazione predefinita  /usr/local/etc/httpd/htdocs. Potete in ogni
  caso impostarlo come la cartella personale dell'utente speciale che
  avete scelto come utente server (User), o una sottocartella della
  vostra cartella individuale se non potete effettuare il login come
  root.

  In caso di dubbio, usate le impostazioni predefinite. Adesso che avete
  risposto alle domande sopra elencate, potete scaricare HTTPd della
  NCSA dall'indirizzo
  http://hoohoo.ncsa.uiuc.edu/docs/setup/OneStep.html.  Dovreste anche
  leggere la documentazione di HTTPd reperibile da
  http://hoohoo.ncsa.uiuc.edu/docs/ prima di qualsiasi tentativo di
  installazione. Se intendete compilare i sorgenti, allora dovete
  modificare i makefile in tutte le sottocartelle dei percorsi support,
  src, cgi-src. Se la vostra versione di Linux si trova tra quelle
  supportate, allora dovrete soltanto digitare make linux sulla cartella
  principale, cio /usr/local/etc/httpd.


  2.2.  Compilazione di HTTPd

  La compilazione  semplice, basta digitare make linux al prompt dei
  comandi dalla cartella radice del server.  Nota: Gli utenti di
  versioni pre-ELF di Linux dovranno rimuovere il commento dalla linea
  #define NO_PASS nel file portability.h e impostare DBM_LIBS= -ldbm nel
  Makefile prima di compilare HTTPd.


  3.  Test del funzionamento di HTTPd

  Dopo aver installato HTTPd, effettuare il login come root e lanciare
  il programma digitando httpd &  (si assume che l'abbiate installato
  come standalone). Verificate se compare nella lista dei processi con
  il comando ps. Il modo pi semplice di provare HTTPd  usando telnet.
  Al prompt dei comandi di Linux digitate:


          linux:~$  telnet 172.16.0.1 80




  dove 80  la porta di default di HTTP. Se avete impostato il parametro
  ``Port'' con un valore diverso, allora sostituite quel valore. La
  risposta che riceverete sar simile a questa:


          Trying 172.16.0.1...
          Connected to linux.mydomain.
          Escape character is '^]'.




  Adesso digitando qualsiasi carattere e premendo Invio, avrete una
  risposta simile alla seguente:


          HTTP/1.0 400 Bad Request
          Date: Wed, 10 Jan 1996 10:24:37 GMT
          Server: NCSA/1.5
          Content-type: text/html

          <HEAD><TITLE>400 Bad Request < /TITLE> < /HEAD>
          <BODY><H1>400 Bad Request < /H1>
          Your client sent a query that this server could
          not understand.<P>
          Reason: Invalid or unsupported method.<P>
          < /BODY>




  A questo punto siamo pronti per collegarci a questo server utilizzando
  un altro PC e un Browser WWW.


  4.  Collegamento al server Linux

  Per favore osservate nel diagramma illustrato nel capitolo
  ``Introduzione'' lo schema d'indirizzamento usato. La workstation 1
  (W/S1) si trova sulla rete 172.16.0.0 e pu accedere direttamente al
  server Linux mentre la workstation 2 (W/S2) si trova sulla rete
  172.17.0.0 e ha bisogno di usare il gateway (router) 172.17.0.254 per
  raggiungere il server Linux. Le informazioni caratteristiche di questo
  gateway devono essere impostate durante la configurazione dei clienti
  solo su W/S2. Netware fa riferimento al gateway come 'ip_router'.

  User W/S2 per illustrare come configurare i client. Per configurare
  W/S1 occorre solo cambiare l'indirizzo IP da 172.17.0.5 a 172.16.0.5 e
  ignorare tutti i riferimenti al gateway/router.

  Se non avete un router potete saltare la seguente sezione e procedere
  con i paragrafi

    ``Configurazione del server Netware'' se usate un server Netware.

    ``Configurazione dei client MS   Windows'' se usate un client
     Microsoft.

  4.1.  Configurazione del server Linux

  Potete saltare questa sezione se non state usando un router.

  Il server Linux deve essere configurato per riconoscere il router e
  quindi permettere alla workstation 2 di raggiungere il server Web. Per
  questo occorre effettuare il login sul server Linux come root, e
  quindi digitare


          route add gw default 172.16.0.254




  Per usare il gateway automaticamente ogni volta che viene riavviato il
  server Linux, editate il file /etc/rc.d/rc.inet1 e modificate la linea
  contenente la definizione del gateway impostandola a GATEWAY =
  "172.16.0.254". Controllate che la linea che definisce il gateway non
  sia commentata.

  ALTERNATIVA: potete aggiungere degli instradamenti alle reti
  dall'altra parte del router. Potrebbe essere fatto come segue


          route add -net 172.17.0.0 gw 172.16.0.254




  Per aggiungere questo instradamento ogni volta che riavviate Linux,
  aggiungete il comando al file /etc/rc.d/rc.local.



  4.2.  Configurazione del server Netware

  Per configurare il server Netware sono richiesti i diritti del
  Supervisor o almeno del Console operator. Se non li avete, provate a
  chiedere al vostro Amministratore di Rete di aiutarvi con la
  configurazione.  Dal server abilitate sulla LAN il tipo di trama
  Ethernet_II digitando (oppure includendo) i seguenti comandi nel file
  AUTOEXEC.ncf.


          load NE2000 frame=Ethernet_II name=IPNET
          load TCPIP
          bind IP to IPNET addr=172.16.0.2 mask=FF.FF.FF.0




  A seconda della configurazione del vostro sistema potrebbe essere
  necessario specificare lo slot oppure il numero della scheda durante
  il caricamento del driver NE2000 (eg: load NE2000 slot=3 frame=.....).


  4.3.  Configurazione dei client Netware

  Sui PC avete le scelte di Win3.1, WFWG e Win95. La procedura
  d'installazione  diversa tra Win95 e le versioni precedenti se state
  usando i client a 32 bit di Microsoft o Novell. Se usate i client a 16
  bit, la procedura sar la stessa e quindi potete seguire le istruzioni
  di configurazione per Windows 3.x. Per installare il client a 32 bit
  per Win95 saltate direttamente alla sezione ``Windows 95''.

  4.3.1.  Windows 3.x

  Se state usando Win3.1 o WFWG potete installare il client Netware
  (VLMs) ed alcuni file aggiuntivi che sono forniti sul dischetto di
  TCP/IP, vale a dire TCPIP.exe, VTCPIP.386, WINSOCK.dll e WLIBSOCK.dll.

  Notate che il file WINSOCK.dll  diverso da quelli forniti con Win95 e
  Trumpet. Installate il Client Netware con il supporto per Windows.
  Copiate VTCPIP.386, WINSOCK.dll e WLIBSOCK.dll sotto la cartella
  SYSTEM e TCPIP.exe sotto la cartella NWCLIENT. Quindi modificate il
  file STARTNET.bat nella cartella NWCLIENT come segue:


          lsl
          ne2000     ---> il driver per la vostra scheda di rete
          c:\windows\odihlp.exe     ----> se state usando WFWG
          ipxodi
          tcpip        ---> aggiungete questa linea
          nwip         ---> se state usando Netware/IP
          vlm




  Create una sottocartella, diciamo \NET\TCP e copiate l dentro i file
  HOSTS, NETWORKS, PROTOCOLS e SERVICES da /etc presente sul vostro
  server Linux oppure la cartella SYS:ETC sul vostro server Netware.
  Editate la copia del file HOSTS e aggiungete una linea per il vostro
  nuovo server Linux. Questo rende possibile identificare il vostro
  server Linux come http://linux.mydomain/ invece di http://172.16.0.1/
  dal vostro browser WWW.


          127.0.0.1      localhost
          172.16.0.1      linux.mydomain




  Editate il file NET.cfg nella cartella NWCLIENT


























     Link Driver NE2000
         port 300
         int 3
         MEM D0000
         FRAME Ethernet_802.2

  ; ---- aggiungete queste linee ----

        FRAME Ethernet_II

     Protocol TCPIP
        PATH TCP_CFG C:\NET\TCP
        ip_address  172.17.0.5
        ip_netmask  255.255.255.0
        ip_router   172.17.0.254  ---> aggiungete l'indirizzo del vostro
                                  ---> gateway solo se dovete usarlo per
                                  ---> raggiungere il vostro server HTTP

     Link Support
        MemPool 6192     ---> il minimo  1024. Provate altri valori
        Buffers 10 1580  ---> anche questo pu essere tarato

  ;---------------------------------
  ; Potete aver bisogno di aggiungere linee come queste se state
  ; usando Netware/IP

     NWIP
        NWIP_DOMAIN_NAME  mydomain
        NSQ_BROADCAST   ON
        NWIP1_1 COMPATIBILITY   OFF
        AUTORETRIES     1
        AUTORETRY SECS  10





  Editate il file SYSTEM.ini sotto la cartella WINDOWS e aggiungete una
  linea per VTCPIP.386


          [386Enh]
          .....
          network=*vnetbios, vipx.386, vnetware.386, VTCPIP.386
          .....




  Riavviate il PC, eseguite STARTNET.bat e quindi potete usare il vostro
  browser favorito per accedere le vostre pagine Web. Non avete bisogno
  di effettuare il login su Netware e nemmeno di eseguire TCPMAN (nel
  caso usiate il Trumpet Winsock).


  4.3.2.  Windows 95

  Questa sezione spiega come installare il client a 32 bit sotto Win95.
  Come prima cosa bisogna installare quanto segue:

    Client per reti Netware (della Microsoft o Novell)

    Protocollo Microsoft TCP/IP

    Scheda di rete

  Per cominciare l'installazione, cliccate sull'icona Risorse del
  computer, Pannello di controllo, Rete. Cliccate su Aggiungi. Si aprir
  una finestra di dialogo con le voci: Client, Scheda, Protocollo e
  Servizio.  Per installare il Client per reti Novell:


  1. Doppio clic su Client

  2. Clic su Microsoft oppure Novell

  3. Doppio clic su Client per reti Netware

  Per installare il protocollo TCP/IP:


  1. Doppio clic su Protocollo

  2. Clic su Microsoft

  3. Doppio clic su TCP/IP

  Windows 95 installa di default molti altri protocolli automaticamente.
  Se non vi servono, potete rimuoverli selezionandoli e quindi premendo
  il bottone Rimuovi. Tipicamente Win95 installa i protocolli NetBEUI e
  IPX/SPX. Potete eliminare il protocollo NetBEUI, ma avrete bisogno di
  IPX/SPX se desiderate effettuare il login sul server Netware.

  Per configurare TCP/IP, cliccate su TCP/IP, quindi su Propriet e
  finalmente sulla scheda dell'indirizzo IP.


    Impostate l'indirizzo IP nell'apposita casella di testo a
     172.17.0.5 e la Subnet mask a 255.255.255.0.

    Selezionate la scheda Gateway.

    Impostate l'indirizzo del vostro gateway (router) nella casella
     Nuovo gateway a 172.17.0.254.

    Cliccate sul pulsante Aggiungi.

  L'indirizzo del gateway dovrebbe adesso comparire nella finestra dei
  gateway installati. Adesso cliccate su OK.

  Vi verr richiesto di riavviare il computer. Dopo il riavvio, sar
  possibile usare il browser per collegarsi al vostro server HTTP.


  4.4.  Configurazione dei client MS Windows

  Se intendete usare un client Microsoft per accedere alla vostra rete,
  questa sezione descrive come installare il protocollo TCP/IP per

    ``Windows for Workgroups (WFWG)''

    ``Windows 95''

    ``Windows NT 4.0''

  Nota: Per individuare il vostro server Linux come
  http://linux.mydomain/ invece di http://172.16.0.1/ dal vostro browser
  WWW e da tutti i comandi dalla Intranet  necessario editare il file
  hosts, aggiungendo una linea per ognuno dei vostri host (Netware,
  Unix, WinNT). I sistemi MS Windows hanno il file HOSTS file nella
  cartella \WINDOWS oppure \WINDOWS\SYSTEM a seconda della versione.
  Editate questo file ed aggiungete una linea per il vostro server Linux
  come segue:


          127.0.0.1      localhost
          172.16.0.1     linux.mydomain

          172.16.0.2     netware.mydomain
          172.16.0.3     winNT.mydomain
          172.16.0.5     ws_1





  4.4.1.  Windows for Workgroups

  Questa sezione spiega come installare il client a 32 bit sotto WFWG.
  Per cominciare, potete prelevare il driver TCP/IP per Windows dal sito
  Microsoft. La versione corrente  3.11b ed  disponibile da
  ftp://ftp.microsoft.com come tcp32b.exe. Accertatevi di aver caricato
  Win32s prima di tentare di caricare il driver TCP/IP-32bit.

  Dopo aver decompresso i file di TCP/IP su una cartella temporanea
  (diciamo C:\TEMP), verificate che sotto la cartella \WINDOWS\SYSTEM
  non esista una copia del file OEMSETUP.INF. Se c', rinominatela.
  Quindi copiate il file OEMSETUP.INF file dalla cartella TEMP sulla
  cartella \WINDOWS\SYSTEM. Se in precedenza avevate caricato qualsiasi
  altro stack TCP/IP sul vostro calcolatore, rimuoveteli prima di
  proseguire.

  Per eseguire o modificare le impostazioni di rete:



    cliccare sul pulsante Reti;

    cliccare Installare la rete di Microsoft Windows;

    scegliere il supporto per reti aggiuntive (se richiesto);

    cliccare OK.

  Se adesso vi viene chiesto di specificare la vostra scheda di rete,
  selezionate quella appropriata. Se non  cos, allora



    cliccate sul pulsante Adattatore di rete;

    selezionate una scheda (ad esempio NE2000);

    cliccate OK;

    cliccate il pulsante Protocollo;

    selezionate il protocollo MS TCP/IP-32

    cliccate OK


  Adesso  il momento di configurare il protocollo TCP/IP. Potete sempre
  riconfigurarlo evidenziando il protocollo TCP/IP visualizzato nella
  lista degli adattatori di rete e cliccando il pulsante Configura.



    Impostate l'indirizzo IP a 172.17.0.5

    Impostate la Subnet Mask box a 255.255.255.0

    Impostate l'indirizzo IP del gateway (router) nella casella del
     gateway di default a 172.17.0.254

  Cliccate OK. Vi sar chiesto di riavviare il computer. Dopo il
  riavvio, sar possibile usare il browser per collegarsi al server
  HTTP.


  4.4.2.  Windows 95

  Questa sezione spiega come installare il client Microsoft a 32 bit
  sotto Win95. Prima sar necessario installare quanto segue:


    Client per reti Microsoft

    Protocollo Microsoft TCP/IP

    Scheda di rete

  Per cominciare l'installazione, cliccate sull'icona Risorse del
  computer, Pannello di controllo, Rete. Cliccate su Aggiungi. Si aprir
  una finestra di dialogo con le voci: Client, Scheda, Protocollo e
  Servizio.  Per installare il client per Reti Microsoft:


  1. Doppio clic su Client

  2. Clic su Microsoft

  3. Doppio clic su Client per reti Microsoft

  Per installare il protocollo TCP/IP:


  1. Doppio clic su Protocollo

  2. Clic su Microsoft

  3. Doppio clic su TCP/IP

  Windows 95 di default installa alcuni protocolli automaticamente.
  Rimuovete quelli non necessari tramite il pulsante ``Rimuovi''.
  Tipicamente Win95 installa il protocollo Microsoft NetBEUI.

  Per configurare TCP/IP, cliccate su TCP/IP, cliccate su Propriet,
  cliccate sulla scheda ``Indirizzo IP''.  Impostate il vostro indirizzo
  IP nella casella 'Specifica l'indirizzo IP' a 172.17.0.5.  Impostate
  Subnet mask a 255.255.255.0.

  Selezionate la scheda Gateway.  Impostate l'indirizzo del vostro
  gateway (router) nella casella 'Nuovo gateway' a 172.17.0.254.
  Cliccate il pulsante Aggiungi.  Adesso l'indirizzo del gateway
  dovrebbe apparire nell'elenco dei gateway installati. Adesso cliccate
  OK.

  Dovreste ricevere l'indicazione di riavviare. Fatelo. Adesso dovreste
  essere in condizioni di usare il browser per collegarvi al vostro
  server HTTP.



  4.4.3.  Windows NT

  Questa sezione spiega come installare il client TCP/IP per WinNT 4.0.
  Avviate il Pannello di controllo/Rete. Selezionate la scheda `Schede
  di rete'.  Cliccate su Aggiungi per aggiungere una nuova scheda di
  rete (se non avete una).

  Scegliete la scheda di rete appropriata. Per aggiungere i protocolli
  Selezionate la scheda Protocolli. Cliccate su Aggiungi e selezionate
  il protocollo TCP/IP. Cliccate su OK

  Vi sar chiesto di configurare lo stack del protocollo TCP/IP. Potete
  sempre riconfigurarlo selezionando il protocollo TCP/IP e cliccando il
  pulsante ``Propriet''.



    Selezionate la scheda 'Indirizzo IP'

    Barrate la casella 'Specificare un indirizzo IP'

    Nella casella dell'indirizzo IP digitate 172.17.0.5

    Nella casella della Subnet Mask digitate 255.255.255.0

    Nella casella Default gateway, impostate l'indirizzo IP del vostro
     gateway (router) a 172.17.0.254

  Cliccate su OK. Il computer richieder il riavvio. Adesso potete usare
  qualsiasi browser per collegarvi al vostro server HTTP.


  4.5.  Configurazione di TCP/IP sul Macintosh

  Se state usando un Macintosh per accedere alla vostra rete, allora
  questa sezione spiega come installare MacTCP per i PowerMac.

  Nota: Per rendere possibile l'indirizzamento del server Linux come
  http://linux.mydomain/ invece di http://172.16.0.1/ dal browser WWW
  browser e da tutta la vostra intranet dovete modificare il file hosts.
  Il formato del file hosts  diverso da quello usato da Unix. Il file
  hosts del Mac  basato su RFC-1035. Potete aggiungere pi linee anche
  per ognuno dei vostri host (Netware, Unix, WinNT). Il MacOS tiene il
  suo file HOSTS nella cartella Preferences folder sotto System folder.
  Aprite questo file e aggiungete una linea per il vostro server Linux
  come segue:


         linux.mydomain    A  172.16.0.1

         netware.mydomain  A  172.16.0.2
         winNT.mydomain    A  172.16.0.3
         ws_1              A  172.16.0.5





  4.5.1.  MacTCP

  Questa sezione spiega come installare MacTCP. Come prima cosa dovete
  prelevare i file MacTCP dal sito Apple, oppure installarli
  dall'Internet Connection CD. Per configurare MacTCP, cliccate su Apple
  Menu/ Control Panels/ TCP/IP. Sullo schermo modificate l'impostazione
  'Connect via:' a 'Ethernet'

  Modificate la voce 'Configure' impostandolo a 'Manually'


    Nella finestra dell'indirizzo IP digitate 172.17.0.5

    Nella finestra della Subnet Mask digitate 255.255.255.0

    Nella finestra Router address impostate l'indirizzo del vostro
     gateway (router) a 172.17.0.254

  Cliccate su OK. Adesso dovreste essere in grado di collegarvi al
  server HTTP con il browser.


  5.  Impostazione dell'intranet

  Una intranet non pu essere completa senza condividere le risorse
  sulle diverse piattaforme. Avrete bisogno di supporto per altri
  filesystem in modo di poter accedere ai dati contenuti in essi. Questo
  documento fornisce istruzioni per collegare Linux con i seguenti
  filesystem popolari.

    ``Filesystem NCP per Netware''

    ``Filesystem SMB per Windows''

    ``Filesystem NFS per Unix''

  Questi filesystem possono essere compilati insieme al kernel di Linux
  oppure aggiunti come moduli, a seconda dalla versione di Linux. Se non
  avete molta familiarit nella compilazione del kernel, fate
  riferimento ai documenti Kernel HOWTO
  http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html e Module HOWTO
  http://sunsite.unc.edu/mdw/HOWTO/Module-HOWTO.html per compilare il
  kernel con moduli.



  5.1.  NCPFS

  Per condividere i file sul server Netware occorre il supporto per NCP
  (ncpfs). NCPFS funziona con le versioni del kernel 1.2.x e 1.3.71 o
  superiori. Non funziona con nessun kernel di versione precedente alla
  1.3.x. Non pu accedere i database NDS di Netware 4.x, ma  in grado
  di usare il bindery. Se state usando Netware 4.x, potete abilitare il
  supporto per il bindery per contenitori specifici usando il comando
  Set Bindery Context sulla console come segue:



         set Bindery Context = CORP.MYDOM;WEBUSER.MYDOM




  Nell'esempio di sopra, due contenitori hanno il supporto per il
  bindery abilitato.

  Vi occorrer scaricare le NCP filesystem utilities utilizzando l'URL
  ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/ncpfs.tgz
  (attualmente ncpfs-2.0.10) da Sunsite.





  5.1.1.  Installazione

  Per installare le utility ncpfs, digitate


          zcat ncpfs.tgz | tar xvf -




  per espandere i file sotto la loro propria cartella. In questo caso
  avrete una cartella ncpfs-2.0.10. Posizionatevi su questa cartella
  ncpfs prima di proseguire con l'installazione. Leggete il file README
  e modificate il Makefile se necessario.

  L'installazione di ncpfs dipende dalla versione del kernel che state
  usando. Per i kernel 1.2, dovete soltanto digitare 'make'.
  Successivamente, digitando 'make install' si installeranno gli
  eseguibili e le pagine del manuale.

  Se state usando il kernel 1.3.71 o pi recente, potreste aver bisogno
  di ricompilare il kernel. In questi casi, la porzione kernel di ncpfd
   gi inclusa nell'albero radice dei sorgenti. Per controllare se il
  kernel deve essere ricompilato digitate


          cat /proc/filesystems




  Dovrebbe visualizzare una riga indicando che il kernel conosce ncpfs.

  Se ncpfs non compare, potete sia ricompilare il kernel che aggiungere
  ncpfs come modulo. Per ricompilare il kernel digitate 'make config' e
  alla domanda sul

  The IPX protocol (CONFIG_IPX) [N/y/?]

  semplicemente rispondete 'y'. Probabilmente non avrete bisogno della
  rete interna completa che vi verr chiesta in seguito. Una volta che
  il kernel  stato correttamente installato, riavviate, controllate
  /proc/filesystems e se tutto  in ordine continuate con
  l'installazione delle ncpfs utilities. Ritornate alla cartella che
  contiene i file ncpfs scaricati, e digitate 'make'. Dopo che la
  compilazione  finita, digitate 'make install' per installare gli
  eseguibili e le pagine del manuale.


  5.1.2.  Montare NCPFS

  Per verificare l'installazione digitate


          ipx_configure --auto_interface=on --auto_primary=on




  e dopo una decina di secondi


          slist



  Dovreste essere in grado di vedere un elenco di server Netware. Adesso
  siete pronti per condividere i file del server Netware.

  Supponete che abbiamo bisogno di accedere a dei file HTML nalla
  cartella \home\htmldocs del volume VOL1: sul server MYDOM_NW. Vi
  suggerisco di creare un nuovo utente, diciamo 'EXPORT' con password
  'EXP123' su questo server, al quale diamo appropriati diritti
  d'accesso a questa cartella usando SYSCON oppure NWADMIN.

  Sul server Linux create una nuova cartella /mnt/MYDOM_NW. Quindi
  digitate il comando


          ncpmount -S MYDOM_NW -U EXPORT -P EXP123 /mnt/MYDOM_NW




  per montare il filesystem Netware. Digitando il comando


          ls /mnt/MYDOM_NW/vol1/home/htmldocs




  vi mostrer un elenco di tutti i file presenti in
  MYDOM_NW/VOL1:\HOME\HTMLDOCS (usando la notazione file di Netware). Se
  avete problemi, siete pregati di leggere il documento IPX HOWTO da
  http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html per ulteriori deluci
  dazioni sul sistema IPX.


  5.2.  SMBFS

  Per condividere file sul server Windows avrete bisogno del supporto
  per SMB (smbfs).

  Dovete scaricare le utility per il filesystem SMB da
  ftp://sunsite.unc.edu/pub/Linux/system/filesystems/smbfs/smbfs.tgz
  (attualmente smbfs-2.0.1) da Sunsite.


  5.2.1.  Installazione

  Per installare le utility smbfs, digitate


          zcat smbfs.tgz | tar xvf -




  per espandere i file dentro la propria cartella. In questo caso avrete
  una cartella smbfs-2.0.1. Posizionatevi su questa cartella prima di
  proseguire con l'installazione. Leggete il file README e modificate il
  Makefile se necessario.

  L'installazione di smbfs dipende dalla versione del kernel che state
  usando. Per i kernel 1.2, dovete soltanto digitare 'make'.
  Successivamente, digitando 'make install' si installeranno gli
  eseguibili e le pagine del manuale.

  Se state usando il kernel 2.0 o pi recente, potreste aver bisogno di
  ricompilare il kernel. In questi casi, la porzione kernel di ncpfd 
  gi inclusa nell'albero radice dei sorgenti. Per controllare se il
  kernel deve essere ricompilato digitate



          cat /proc/filesystems




  Dovrebbe mostrare una riga dicendo che il kernel conosce smbfs.

  Se smbfs non compare, potete sia ricompilare il kernel che aggiungere
  smbfs come modulo. Per ricompilare il kernel dovreste digitare 'make
  config' e quando vi viene chiesto se desiderate aggiungere il supporto
  per il filesystem SMB semplicemente rispondete di s. Una volta che il
  kernel  correttamente installato, riavviate, verificate
  /proc/filesystems e se tutto  in ordine procedete con l'installazione
  delle utility smbfs. Ritornate alla cartella che contiene i file di
  smbfs che avete scaricato, e digitate 'make'. Dopo che la compilazione
   finita, digitate 'make install' per installare le varie utility e le
  pagine del manuale.


  5.2.2.  Montare SMBFS

  A mo' di esempio, assumiamo che il server WinNT si chiami `MYDOM_NT' e
  condivida una cartella C:\PUB\HTMLDOCS con il nome di condivisione
  'HTMLDOCS' senza nessuna password. Sulla macchina Linux create una
  nuova cartella /mnt/MYDOM_NT.  Quindi digitate il comando


          smbmount //MYDOM_NT/HTMLDOCS /mnt/MYDOM_NT -n




  per montare il filesystem SMB condiviso da Windows. Se non funziona,
  provate con


          smbmount //MYDOM_NT/COMMON /mnt/MYDOM_NT -n -I 172.16.0.3




  Digitando il comando


          ls /mnt/MYDOM_NT




  Vi mostrer un elenco di tutti i file presenti su \\MYDOM_NT\PUB\HTML
  DOCS (usando la notazione per i nomi di file di Windows).



  5.3.  NFS

  Prima di tutto, occorre un kernel con il filesystem NFS sia compilato
  che disponibile come modulo.

  Supponete di avere un host Unix sul quale gira NFS con il nome
  MYDOM_UNIX e un indirizzo IP uguale a 172.16.0.4. Potete verificare
  quali sono le cartelle che sono esportate (condivise) da questo host
  digitando il comando



          showmount -e 172.16.0.4




  Una volta che conoscete le cartella esportate, potete montarle con un
  adeguato comando mount. Vi suggerisco di creare una cartella sotto
  `/mnt', diciamo 'MYDOM_UNIX' per usarla come punto di montaggio.



          mount -o rsize=1024,wsize=1024 172.16.0.4:/pub/htmldocs /mnt/MYDOM_UNIX




  I valori per rsize e wsize possono aver bisogno di essere modificati a
  seconda del vostro ambiente.

  Se avete dei problemi, siete pregati di leggere il documento NFS HOWTO
  da http://sunsite.unc.edu/mdw/HOWTO/NFS-HOWTO.html per ulteriori
  delucidazioni sul sistema NFS.



  6.  Accesso al sito Web

  Adesso che avete configurato il server HTTP, i client, e connesso il
  server Linux ad altri server, potete fare alcuni piccoli cambiamenti
  al server Linux per permettere l'accesso ai file system direttamente
  dal browser.


  6.1.  Accesso ai filesystem montati

  Per accedere alle cartelle montate nelle vostre pagine HTML avete due
  metodi:

    Create un collegamento in DocumentRoot
     (/usr/local/etc/httpd/htdocs) per fare riferimento alla cartella
     montata come segue


          ln -s /mnt/MYDOM_NW/vol1/home/htmldocs netware
                            oppure

          ln -s /mnt/MYDOM_NT    winNT
                            oppure

          ln -s /mnt/MYDOM_UNIX    unix




    editate il file srm.conf nella cartella /usr/local/etc/httpd/conf e
     aggiungete un nuovo alias.






    # Alias NomeFinto NomeReale
    Alias /icons/     /usr/local/etc/httpd/icons/

    # alias per il server Netware
    Alias /netware/   /mnt/MYDOM_NW/vol1/home/htmldocs/
    Alias /winNT/     /mnt/MYDOM_NT/
    Alias /unix/      /mnt/MYDOM_UNIX




  Quindi riavviate il demone HTTPd. Potete accedere ai documenti sul
  server Netware riferendovi a essi come http://linux.mydomain/net
  ware/index.htm per i file Netware ed in notazioni simili per gli
  altri.


  6.2.  Collegamento a Internet

  A questo punto potete collegare la vostra intranet a Internet per
  avere accesso a E-mail e tutte le buone cose che potete trovare l
  fuori. Spiegazioni pi dettagliate per stabilire il collegamento con
  il vostro Internet Provider possono essere trovate sui documenti ISP
  Hookup HOWTO (in Inglese) da http://sunsite.unc.edu/mdw/HOWTO/ISP-
  Hookup-HOWTO.html e Diald mini HOWTO su
  http://sunsite.unc.edu/mdw/HOWTO/mini/Diald.


  6.3.  Altri utilizzi

  Un server HTTP pu essere usato in un ufficio per dare accesso
  trasparente alle informazioni disponibili presso diversi server, su
  diverse postazioni e cartelle. I dati possono essere semplici
  documenti Word, fogli elettronici Lotus o complesse basi di dati.

  L'applicazione di questa tecnologia viene tipicamente utilizzata come
  segue:


    Pubblicazione di documenti istituzionali.


     Questi documenti possono essere notizie, relazioni annuali, mappe,
     risorse aziendali, listino prezzi, letteratura informativa sui
     prodotti, e qualsiasi altro documento che possa avere un
     determinato valore all'interno dell'organizzazione.


    Accesso a ricerche su elenco.


     Accesso veloce all'elenco telefonico dell'istituzione e simile.
     Questi dati possono essere mirrorati in un sito Web, oppure tramite
     script CGI, il server Web pu funzionare come un gateway che fa da
     back-end a programmi gi esistenti o nuovi. Questo significa che
     usando lo stesso meccanismo di accesso standard, le informazioni
     possono rendersi disponibili con maggior larghezza in un modo pi
     semplice. Questo significa che pu essere usato per creare
     un'interfaccia con RDBMS come Oracle e SyBase per generare
     informazioni in tempo reale. Ecco un elenco di siti con queste
     caratteristiche.



    Accesso Web --
     http://cscsun1.larc.nasa.gov/~beowulf/db/web_access.html
    Gateway CGI --
     http://www.w3.org/hypertext/WWW/RDBGate/Overview.html


    Pagine istituzionali/dipartimentali/individuali.


     Man mano che la cultura all'interno delle Istituzioni cambia sino
     al punto nel quale ogni Dipartimento si muove verso i propri
     obbiettivi individuali, la tecnologia Intranet fornisce il
     trasporto ideale per comunicare le nuove informazione ai
     Dipartimenti ed Individui. Potenti motori di ricerca forniscono i
     mezzi per trovare il gruppo o la persona che conosce le risposte
     alle continue domande che sorgono nel corso di ogni giornata di
     lavoro.


    Programmi semplici per gruppi di lavoro.


     Con il supporto dei moduli HTML, i siti possono fornire pagine di
     adesione, inchieste e semplice pianificazione delle attivit.


    Distribuzione del software.


     Gli amministratori possono usare la Intranet per distribuire
     aggiornamenti software immediatamente quando arrivano le richieste
     degli utenti che accedono dalla rete locale. Questo pu essere
     fatto grazie a Java, che permette la creazione e distribuzione
     trasparente di oggetti su richiesta piuttosto che soltanto dati e
     programmi. Questo  veramente possibile con pi facilit nelle
     nuove versioni di Linux che hanno il supporto Java pronto per
     l'uso.


    Posta elettronica.


     Con l'arrivo di nuovi prodotti per la gestione della posta
     elettronica su una Intranet, con metodi semplici e standard per
     allegare documenti, suoni, immagini e altri documenti multimediali,
     la posta elettronica rafforza la sua posizione come il metodo
     standard de facto per comunicare tra individui. La posta 
     essenzialmente una comunicazione tra individuo e individuo, oppure
     tra individuo e piccolo gruppo. Diversi strumenti software sono
     disponibili su piattaforme Linux per disporre un sistema di
     gestione della posta elettronica come sendmail, pop3d, imapd.


    Interfaccia utente.


     La tecnologia intranet sta evolvendo in modo cos veloce che gli
     strumenti software disponibili, in particolar modo HTML, possono
     essere usati per cambiare significativamente il modo nel quale
     interagiamo con i sistemi. Con HTML potete costruire una
     Interfaccia limitata solo dall'immaginazione del progettista. La
     bellezza di usare le intranet per un'interfaccia  la semplicit.
     Cliccando su di un hiperlink vi pu portare a un'altra pagina, che
     a sua volta pu far suonare una sveglia, eseguire una procedura di
     fine anno, o qualsiasi altra cosa fattibile da un programma.



  7.  Altre cose da fare

  Ecco un elenco di altre cose interessanti che si possono fare con il
  vostro server Intranet Linux. Tutto il software proposto  freeware o
  shareware.

    Esplorare il server Linux utilizzando le Risorse di Rete in Win95/
     NT; configurare un WINS come un server NBT. Guardate la pagina Web
     di SAMBA su http://lake.canberra.edu.au/pub/samba/samba.html

    Implementare un motore di ricerca sulla vostra Intranet.
     Collegatevi a ht://Dig su http://htdig.sdsu.edu/

    Usare CUSeeMe configurando un riflettore locale. Fate riferimento
     alla loro pagina alla Cornell University http://cu-
     seeme.cornell.edu/

    Installare una Conferenza Web. Usate COW da
     http://thecity.sfsu.edu/COW/

    Disporre una basi dati SQL. Fate riferimento alla Home Page di mSQL
     su http://Hughes.com.au/

    Installare un server FTP, Gopher, Finger, Bootp sul server Netware.
     Prelevateli da http://mft.ucs.ed.ac.uk/

    Emulare un server Netware. Date un'occhiata alle NCP Utilities da
     ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/

  Se trovate altre cose interessanti da fare con il vostro server
  intranet Linux, siete pregati di contattarmi via e-mail.


  8.  Riconoscimenti e note legali



  8.1.  Ringraziamenti

  Ringrazio il personale della NCSA per avermi fornito un'ottima
  documentazione, David Anderson e tutti gli altri che hanno provato
  questo HOWTO ed inviato i loro commenti. I dettagli su Netware/IP sono
  una cortesia di Romel Flores (rom@mnl.sequel.net).



  8.2.  Copyright

  This document is copyrighted  1996,1997 Pramod Karnad and distributed
  under the following terms:


    Linux HOWTO documents may be reproduced and distributed in whole or
     in part, in any medium physical or electronic, as long as this
     copyright notice is retained on all copies. Commercial
     redistribution is allowed and encouraged; however, the author would
     like to be notified of any such distributions.

    All translations, derivative works, or aggregate works
     incorporating any Linux HOWTO documents must be covered under this
     copyright notice.  That is, you may not produce a derivative work
     from a HOWTO and impose additional restrictions on its
     distribution. Exceptions to these rules may be granted under
     certain conditions; please contact the Linux HOWTO coordinator at
     the address given below.

    If you have questions, please contact Tim Bynum, the Linux HOWTO
     coordinator, at linux-howto@sunsite.unc.edu  Finger for phone
     number and snail mail address.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.


  Questo documento  copyright  1996,1997 Pramod Karnad e distribuito
  con le seguenti condizioni:


    I documenti Linux HOWTO possono essere riprodotti e distribuiti
     totalmente o parzialmente, su qualsiasi mezzo fisico o elettronico,
     a condizione che questo avviso rimanga in tutte le copie.
     Distribuzioni commerciali sono permesse ed incoraggiate; comunque
     l'autore vorrebbe essere notificato di ogni tipo di distribuzione

    Tutte le traduzioni, prodotti derivati e aggiuntivi che contengano
     qualsiasi documento Linux HOWTO dovranno essere coperti da questo
     copyright. Cio, non potete produrre un documento derivato da un
     HOWTO e imporre restrizioni aggiuntive sulla distribuzione.
     Eccezioni a queste regole possono essere concesse sotto certe
     condizioni; siete pregati di contattare il coordinatore dei Linux
     HOWTO all'indirizzo sottostante.

    Se avete delle domande, siete pregati di contattare Tim Bynum,
     coordinatore dei Linux HOWTO, linux-howto@sunsite.unc.edu




































  Linux Italian-HOWTO
  Marco Gaiarin (gaio@pluto.linux.it)
  Versione 1.2.2, 2 Gennaio 1999

  Questo HOWTO descrive in alcuni semplici passi come configurare il
  proprio sistema Linux per supportare pienamente la tastiera e la
  localizzazione italiana.  Inoltre si vuole in questo testo dare tutta
  una serie di informazioni sul mondo Linux in Italia.

  1.  Introduzione




       ``Perch scegliere UNIX?  A chi utilizza gi un PC o un Mac
       intosh potrebbe sorgere il dubbio che il computer a sua dis
       posizione sia gi sufficiente per tutte le esigenze
       descritte in precedenza e che, in fondo, UNIX non sia altro
       che uno dei tanti dinosauri destinati a morte certa.  Proba
       bilmente questo avverr (in fondo nulla  eterno), ma sola
       mente nel momento in cui tutti i personal computer saranno
       in grado di svolgere i compiti che, almeno per ora, sono ad
       esclusivo appannaggio di UNIX.''

       (da ``UNIX Flash'', ed. Apogeo)



  Questo testo non  una guida all'installazione, n un testo di
  introduzione a Linux. Se questo  il vostro primo approccio a Linux,
  perch lo avete appena installato o vi accingete a farlo, qui potete
  trovare solamente alcuni riferimenti ad altre pubblicazioni che vi
  possono aiutare.  In particolare consiglio gli ``AppuntiLinux''.

  Quindi, in questo testo si presume che:


    abbiate Linux installato e funzionante. Quello che di sicuro non
     troverete qui  una guida alla risoluzione di problemi hardware;

    abbiate una versione di Linux ``recente'', ovvero un kernel 2.0.0 o
     successivo, e tutte le nuove versioni delle utilit che occorrono
     per queste versioni di kernel;

    abbiate una minima conoscenza della organizzazione del filesystem e
     la padronanza dei principali comandi, nonch un'idea dei concetti
     di utente e utente ``root'';

    abbiate una minima conoscenza dell'uso dei programmi fondamentali,
     almeno un editor di testi.


  Se siete alle prime armi con Linux, lo avete appena installato, il
  consiglio che vi do  quello di mettere da parte questo HOWTO e farvi
  una certa cultura su UNIX in generale e su Linux.

  Potete trovare una miriade di informazioni (libri e documenti da
  leggere, forum di discussione, ``persone'' da incontrare) negli ultimi
  due capitoli di questo HOWTO.







  1.1.  Dove potete trovare sempre l'ultima versione...


  Dalla passata versione l'Italian HOWTO  stato ``snellito''; ormai non
  ci sono pi grossi problemi di localizzazione e ho quindi preferito
  spostare buona parte del materiale (la pi ``volatile'') sotto forma
  di contributi in un URL a parte.

  Trovate quindi l'ultimissima versione di questo testo, assieme a
  contributi e qualche curiosit, all'url
  <http://www.pluto.linux.it/ildp/IH>; in ogni caso l'Italian HOWTO  un
  documento ``ufficiale'' e quindi fa parte sia di ``ILDP'' che di LDP
  <http://sunsite.unc.edu/LDP>, con la conseguenza pratica che lo
  trovate ormai dappertutto, in tutti i formati disponibili (testo, html
  per leggere a video e PostScript per stamparlo comodamente),
  solitamente anche preinstallato dalla vostra distribuzione preferita.

  Inoltre l'autore  reperibile all'indirizzo gaio@pluto.linux.it.
  Oppure agli indirizzi 2:333/1016 (FidoNet), 61:3917/1 (PeaceLink),
  91:13/1 (PNet), 1907:393/104 (ScoutNet).

  Sono contentissimo di ricevere commenti e suggerimenti per questo
  testo, e invito tutti a segnalarmi eventuali errori, dimenticanze o ad
  inviarmi proposte e contributi.



  1.2.  Convenzioni tipografiche



    Questo  un programma(n) o file di configurazione del sistema.

     Il numero tra parentesi non  messo a caso. Vuol dire che quel
     programma  dotato di una man page (pagina di manuale),
     consultabile con il comando man n programma; per saperne di pi
     sulle man page potete consultare la ``sezione dedicata''.  Il fatto
     che scriva esplicitamente quel numero tra parentesi vuole essere un
     invito esplicito a leggere quella man page.

    Questo  un comando da impartire o un nome di file o directory.

    Questo  un [Tasto] sulla tastiera. Questa  una combinazione di
     tasti [Tasto1+Tasto2].

     Di solito, per comodit, eviter di scrivere le combinazioni di
     tasti con shift, perci al posto di [Shift+a] scriver il pi
     semplice [A].

    Questo  un termine nuovo, che va quindi ``metabolizzato''. Di
     solito tendo a essere chiaro, nel senso che dal contesto o dalle
     righe immediatamente successive se ne dovrebbe capire il
     significato.  Se non  cos, fatemelo sapere! ;)

    Ormai molto spesso parlo di pacchetti, ovvero di quegli archivi di
     programmi, file di configurazione e documentazione usati dalle
     moderne distribuzioni che permettono una agevole manutenzione
     (installazione, disinstallazione, configurazione) di un sistema
     Linux; il pacchetto ha un nome, che riporto, e delle informazioni
     di versione e tipo (.deb per Debian, .rpm per RedHat ad esempio)
     che invece solitamente non riporto perch implicite o inessenziali.





  1.3.  Note sui Link


  In questo testo ho cercato di porre molta attenzione ai link, di modo
  che la versione html sia piacevolmente fruibile.  Ma buona parte della
  documentazione a cui questo testo fa riferimento molto probabilmente 
  gi presente nel vostro disco o nel CD della vostra distribuzione
  Linux: prendete quindi tutti questi link con un po' di sale in zucca,
  e fate una ricerca locale prima di lanciarvi in estenuanti riferimenti
  a siti d'oltreoceano.

  Ad esempio tutti gli HOWTO sono solitamente gi presenti nella
  directory /usr/doc/HOWTO, compreso questo che state leggendo e le
  traduzioni in italiano (almeno in Debian); non saranno le ultime
  versioni, chiaro, ma solitamente sono pi che ottime.

  Uomo avvisato, mezzo salvato! ;)



  1.4.  Perch Debian?!


  L'Italian-HOWTO, pur cercando di essere il pi indipendente possibile
  dalla distribuzione, fa riferimento pesantemente a Debian
  <http://www.debian.org/>.

  Questa vuole essere una scelta ``tecnica'', perch ha una init SYSV,
  perch ha un sistema di pacchettizzazione e configurazione serio e
  funzionale, perch rispetta tutti gli standard che si sono via via
  creati all'interno della comunit Linux, perch  gi ora parzialmente
  in italiano e in futuro lo sar (si spera) totalmente, perch 
  l'unica ad avere come obiettivo l'internazionalizzazione.

  Ma vuole essere anche una scelta ``politica'', visto che Debian 
  l'unica distribuzione non commerciale e OpenSource
  <http://www.opensource.org/>, e credo quindi che meriti i miei due
  centesimi...  di Euro! ;)

  Debian e RedHat, in fondo, sono molto simili, quindi gli utenti RH (e
  distribuzioni RH-like come SuSE e Caldera) non dovrebbero trovarsi
  troppo a disagio, se non per la localizzazione quasi assente di queste
  distribuzioni.



  1.5.  Ringraziamenti


  Come sempre ringrazio Anna per l'affetto, mia mamma perch mi
  sopporta, il pap perch non si  ancora pentito di avermi dato il
  numero di carta di credito, Jacopo <http://www.dei.unipd.it/~cico>
  perch sopravvive alla mia arte (?!) culinaria, Luca
  <http://www.dei.unipd.it/~pavy> perch si lascia sfruttare ;), il
  PLUTO <http://www.pluto.linux.it/> e PeaceLink
  <http://www.peacelink.it/> che mi sopportano nonostante non faccia
  quasi niente, Leandes di Ps <http://www.fvg.peacelink.it/> e il
  Coordinamento Telematico di Azione Cattolica
  <http://users.iol.it/marcogaio/AC/CTAC-Map.html> (e in particolare
  Lindo <mailto:ascoli@ascu.unian.it>) che sopportano la mia continua
  rottura di scatole, l'Azione Cattolica di Cimpello/Praturlone
  <http://users.iol.it/marcogaio/AC> che deve tenersi un segretario che
  si dimentica tutto, rete FidoNet <http://www.fidoitalia.net/> che
  probabilmente si  beccata un bell'osso di sysop; e una caterva di
  altra gente che non ringrazio per decenza. ;)

  Ma una dedica particolare va a Maria Luisa, Stefano e il nuovo
  arrivato Alessandro (il mio primo nipotino! ;).  Ora spetta anche a me
  fare in modo che Alessandro possa vivere, da grande, in un mondo
  solidale, giusto, nonviolento, pulito.  In fondo la scelta 
  semplice... pensare solo a noi stessi, oppure lasciare questo mondo un
  po' meglio di come l'abbiamo trovato! ;)

  Dedico inoltre questo HOWTO a quattro pazzi di amici, che hanno scelto
  di fare la cosa pi difficile: cercare di vivere con la propria
  passione... sembra quasi una poesia ma  invero una ProSA
  <http://www.prosa.it/>! ;)



  1.6.  Traccia delle modifiche




     0.1b
        Prima versione, niente di pi che una traduzione/copiatura di
        altro materiale simile reperito in rete.


     0.2b
        Aggiunto il capitolo su Linux in Italia, qualche bugfix.


     0.4b
        Risistemazione generale, aggiunta del capitolo su ispell.


     0.6b
        Profondo lifting (ho tolto una marea di roba che si trova
        semplicemente in altri HOWTO), riscrittura del capitolo sulla
        localizzazione con aggiunta di informazioni sui vari progetti,
        aggiornamento del capitolo su ispell.  Questa vuole essere
        l'ultima versione beta ( un buon proposito ;).


     0.8b
        Niente di meno che una correzione della precedente versione, con
        qualche aggiunta. Questa  di sicuro l'ultima versione beta.


     1.0.0
        Il testo dovrebbe aver preso la sua struttura definitiva; 
        stato riorganizzato tutto e in particolare sono state aggiunte
        sezioni per libpaper, fortune in italiano e distribuzioni in
        italiano,  stata tolta la bibliografia in inglese; sono state
        inoltre riviste completamente le parti riguardanti la tastiera
        (aggiunta di xkbd), TeX (da NTeX a teTeX) e la locale;  stato
        aggiunto il crossreferencing all'interno del documento.


     1.2.2
        Versione riveduta e corretta (soprattutto gli URL, che in un
        anno cambiano parecchio! ;) del precedente; inizia il lavoro di
        ``potatura'' di buona parte del materiale, man mano che i
        problemi pi grossi (locale e tastiera) vengono risolti.  
        stato aggiunto il paragrafo (praticamente vuoto) per le future
        euroquestioni.




  1.7.  Copyright


  Per motivi spudoratamente legali, riporto come messaggio di copyright
  la versione ``originale'' in inglese. Trovate subito sotto la
  traduzione.


  This Howto is copyrighted by Marco Gaiarin and distributed as other
  Linux HOWTOs under the terms described below.

  Linux HOWTO documents may be reproduced and distributed in whole or in
  part, in any medium physical or electronic, as long as this copyright
  notice is retained on all copies. Commercial redistribution is allowed
  and encouraged; however, the author would like to be notified of any
  such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu. You may finger this
  address for phone number and additional contact information.


  Questo HOWTO  di Marco Gaiarin ed  distribuito come gli altri HOWTO
  di Linux sotto i termini descritti sotto.

  I documenti degli HOWTO di Linux possono essere riprodotti e
  distribuiti in tutto o in parte, con ogni mezzo fisico o elettronico,
  purch questo avviso di copyright sia mantenuto su tutte le copie. La
  distribuzione commerciale  permessa e incoraggiata; comunque
  all'autore piacerebbe essere avvisato di ogni distribuzione di questo
  tipo.

  Ogni traduzione, lavoro derivato o comprendente ogni documento degli
  HOWTO di Linux deve essere coperto sotto questo avviso di copyright.
  Cio non potete produrre un lavoro derivato da un HOWTO e imporre
  restrizioni aggiuntive sulla sua distribuzione. Eccezioni a queste
  regole possono essere garantite sotto certe condizioni; contattate il
  coordinatore degli HOWTO di Linux all'indirizzo indicato sotto.

  Se avete domande contattate Tim Bynum, il coordinatore degli HOWTO di
  Linux, a linux-howto@sunsite.unc.edu. Potete fare finger a questo
  indirizzo per il numero di telefono e altre informazioni per
  contattarlo.





  2.  La tastiera



  La gestione della tastiera di Linux  organizzata su pi ``strati'' o
  livelli di astrazione il cui numero, tre, non ci  di grande
  interesse.  Quello che interessa a noi  il risultato, ovvero una
  gestione della tastiera indipendente dall'hardware (ricordo che Linux
   un sistema operativo multipiattaforma e non funziona solo sui PC
  compatibili...) e facilmente riconfigurabile.

  Infatti  sufficiente modificare l'interfaccia tra uno strato e
  l'altro per ottenere gli effetti desiderati: nel nostro caso il
  perfetto funzionamento della tastiera italiana.


  2.1.  Console


  Per ottenere la configurazione della tastiera italiana in console 
  sufficiente impartire il comando loadkeys it.map; questo comando non
  fa altro che caricare la tabella di descrizione della tastiera
  (keymap, appunto) it.map al posto di quella di default ``inserita''
  nel kernel.

  Solitamente  la procedura di installazione che si preoccupa di
  chiedere all'utente quale tastiera usare e a inserire un comando come
  quello qui sopra in uno degli script di avvio del sistema.

  In Debian esiste il comando kbdconfig che permette di riconfigurare la
  tastiera senza editare a mano gli script di avvio, le altre
  distribuzioni avranno di sicuro sistemi simili...

  Questa Keymap inoltre supporta alcune aggiunte essenziali per i
  programmatori, come le parentesi graffe, il carattere tilde e il
  carattere apice inverso ottenuti premendo rispettivamente [AltGr+8],
  [AltGr+9], [AltGr+0] e [AltGr+'].

  Se si vuole indagare ulteriormente nella gestione della tastiera nella
  console Linux, si pu far riferimento ai comandi (e alle rispettive
  manpage) showkey(1)  dumpkey(1), oltre ovviamente al gi citato
  loadkey(1).


  2.1.1.  Keymap alternative


  Nonostante questa keymap sia gi molto buona, si sta cercando di fare
  meglio; in particolare Lorenzo Maria Catucci
  (lorenzo@argon.roma2.infn.it) sta lavorando a una serie di keymap per
  console e per X congruenti e possibilmente senza problemi.  Trovate le
  bozze di queste keymap nel sito dell'Italian HOWTO
  <http://www.pluto.linux.it/ildp/IH>.

  Nello stesso sito potete trovare inoltre delle keymap alternative che
  permettono di ``emulare'' la tastiera Amiga e cose simili...



  2.2.  XFree86


  Di recente (dalla versione 3.2 in poi...) XFree ha completamente
  cambiato la gestione della tastiera, aggiungendo una estensione che si
  chiama ``XKeyboard'' (o XKBD), e qualche astrusa voce in pi nel file
  di configurazione.  Il nuovo sistema  effettivamente migliore, ma
  talmente configurabile che c' voluto un annetto perch venisse
  metabolizzato e quindi venissero prodotte le keymap secondo queste
  nuove specifiche...

  Il problema vero  che xf86config(1) non riesce pi a gestire in fase
  di configurazione automatica la tastiera italiana (o meglio, per
  trovare uno straccio di riferimento all'Italia occorre muoversi per un
  po' tra complicate opzioni...), ma niente paura.

  Si pu benissimo completare la configurazione scegliendo una tastiera
  predefinita (come quella americana) e poi editare il file
  /etc/X11/XF86Config aggiungendo o modificando le informazioni:


  ______________________________________________________________________
          Section "Keyboard"

          [...]

          LeftAlt      Meta
          RightAlt     ModeShift

          # ovviamente se avete una tastiera W95
          # al posto di pc102 ci va pc104 (o pc105)!
          #
          Protocol     "Standard"
          XkbRules     "xfree86"
          XkbModel     "pc102"
          XkbLayout    "it"

          EndSection
  ______________________________________________________________________



  Le prime due righe, in particolare, servono ad avvisare X che abbiamo
  intenzione di usare [AltGr] come modificatore ModeShift per poter
  utilizzare, come siamo abituati, parentesi quadre, at e diesis.  (Non
  vi ricordate? Era una di quelle imbarazzanti domande che vi ha posto
  xf86config(1)...)

  Questa definizione di tastiera  leggermente diversa (come
  disposizione dei tasti ``nascosti'') di quella in console (ad esempio
  le parentesi graffe sono ora in [AltGr+7], [AltGr+0]).


  2.2.1.  XF86Setup(1)


  In alternativa  possibile usare il nuovo programma di configurazione
  di XFree, presente dalla versione 3.2 e seguenti, XF86Setup(1); la
  configurazione di X11  molto pi intuitiva con XF86Setup che con
  xf86config: per un novellino (ma anche non) pu essere utile anche
  perch permette di controllare al volo se le impostazioni sono
  corrette (da Giovanni Bortolozzo).  Inoltre XF86Setup supporta
  perfettamente la configurazione della tastiera con XKeyboard.

  Per poter utilizzare XF86Setup occorre installare il server VGA16 in
  aggiunta a quello appropriato per la propria scheda video.



  2.2.2.  Backspace e Delete


  Un problema noioso, che per non riguarda solo la tastiera italiana, 
  che in X gli effetti della pressione dei tasti BackSpace e Canc
  coincidono (ambedue fanno Del, ovvero cancellano il carattere sul
  cursore; o ambedue fanno BackSpace, ovvero cancellano il carattere
  alla sinistra del cursore, dipende di solito dal tasso di umidit
  dell'aria... ;-).

  Questo  un problema comune a tutti gli utenti Linux, e inoltre
  esistono ottimi documenti che spiegano come sistemare (o mettere una
  pezza) a questo problema; per puntatori vedi alla fine di questa
  sezione.

  Questo comportamento  dovuto in maggior parte da incompatibilit
  ``storiche'' tra librerie/applicazioni/metodi di programmazione, e
  anche in distribuzioni come Debian che hanno forzato una unica
  politica di accesso ai terminali (con il database terminfo(5)) il
  problema con alcune (vecchie) applicazioni rimane.

  Insomma,  un problema delle applicazioni e non di Linux.

  Per programmi (o sistemi) che usano ancora termcap(5)  molto
  probabile che occorra una correzione della definizione di xterm. Non 
  proprio il caso di inserire una cosa del genere in questo HOWTO, mal
  che vada nel sito dell'Italian-HOWTO
  <http://www.pluto.linux.it/ildp/IH>;  comunque pi corretto cercare
  una versione dell'applicazione compilata con terminfo oppure...
  cambiare applicazione! ;)

  Per comprendere meglio queste cose sono letture consigliate le manpage
  di termcap(5) e terminfo(5), oltre a quanto riportato alla fine di
  questa sezione.



  2.2.3.  MetroX e tastiera italiana


  Ho visto che pi persone hanno problemi con la tastiera sotto Metro-X,
  non so se intanto il problema  stato risolto, eventualmente
  segnalatemelo che elimino questa sezione.

  Per risolvere in modo pulito e definitivo il problema modificate
  questa sezione del file /etc/X11/XMetroconfig


  ______________________________________________________________________
  Section "Keyboard"
          LeftAlt         Meta
          RightAlt        ModeShift
          Protocol        "Standard"
          XkbKeymap       "xfree86(it)"# al posto di "metro(it)"
          XkbModel        "pc105"     # solo se avete i tasti W95
          XkbRules        "xfree86"
          XkbLayout       "it"
  EndSection
  ______________________________________________________________________



  Se prima di farlo guardate alla fine del file /var/log/Xerrors,
  scoprirete quale  il problema: mancano i file kbd della Metro (da
  Andrea Tuccia).


  2.2.4.  Keymap alternative


  Anche qui sono state raccolte una serie di keymap alternative a quelle
  ufficiali presenti nelle distribuzioni; trovate anche queste al sito
  <http://www.pluto.linux.it/ildp/IH>.

  Inoltre Dino Paganello mi segnala il programma xrus(1) che permette di
  fare lo switch al volo tra diverse descrizioni di tastiera (lui lo usa
  per passare la volo dalla tastiera americana a quella italiana).




  2.3.  Per maggiori informazioni


  Ulteriori informazioni, specialmente se si vuole migliorare la
  gestione della tastiera (aggiungere i tasti cursore in determinate
  applicazioni, macro ai tasti funzione, ...), si possono trovare in:


    Keyboard and Console HOWTO
     <http://sunsite.unc.edu/LDP/HOWTO/Keyboard-and-Console-HOWTO.html>.

    Config HOWTO <http://sunsite.unc.edu/LDP/HOWTO/Config-HOWTO.html>.
     (anche in versione italiana
     <http://www.pluto.linux.it/ildp/HOWTO/Config-HOWTO.html>).

    XFree86 HOWTO <http://sunsite.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>
     (anche in versione italiana
     <http://www.pluto.linux.it/ildp/HOWTO/XFree86-HOWTO.html>).

    Esiste inoltre la kbd.FAQ contenuta nel pacchetto del software di
     gestione della tastiera, e che dovrebbe essere gi stata installata
     da qualche parte nel vostro disco (di solito /usr/doc/kbd).

    Anne Baretta (anne@ibbnet.nl) ha creato delle pagine per aiutare la
     configurazione di BS/DEL; non le ho guardate, ma potrebbero essere
     un buon punto di partenza.  Le trovate su
     <http://www.ibbnet.nl/~anne/keyboard.html>.

    Esistono anche queste pagine
     <http://electron.et.tudelft.nl/~jdegoede/fixkeys.txt> per il
     problema BS/DEL; riporto questo URL solo per ribadire che questi
     non sono modi con cui  possibile affrontare (e tantomeno
     risolvere) il problema; testi del genere, che non hanno alla base
     un serio studio e soprattutto l'uso di terminfo, sono come una
     lobotomia come rimedio per il mal di testa.

     Magari funziona ma...





  3.  National Language Support (NLS)



  Di certo vi stupir sapere che lo standard POSIX, e quindi anche
  Linux, prevede il supporto delle regole nazionali per la gestione di
  set di caratteri, modo di scrivere data, ora, numeri in generale e
  quindi tutto quello che pu (informaticamente parlando) distinguere un
  paese dall'altro.

  Dalla versione 5.2.18 delle GNU libc, tutta la localizzazione 
  supportata anche da Linux.  Ma non basta avere installate delle
  moderne libc, occorre anche che questa sia stata compilata con
  determinate opzioni e occorre installare tutta una serie di file e
  directory che descrivono la ``locale'' Italia.  Insomma, compito non
  facile se la vostra distribuzione non ha gi il supporto per la
  localizzazione...

  Per poter influenzare Linux di modo che reagisca secondo la locale
  scelta, occorre modificare delle variabili d'ambiente. In ordine:




     LANG
         la variabile ``generale'' del gruppo, serve a definire una
        regola generale (il paese) con cui poi assegnare le variabili
        che vengono sotto. Una definizione delle variabili sottostanti
        annulla per quella di default definita da LANG.  Inoltre LANG
        influenza anche il programma ``man(1)'', ci torneremo poi.


     LC_COLLATE
        Influisce sulle regole di ordinamento alfabetico.


     LC_CTYPE
        Definisce il set di caratteri usato dal sistema.


     LC_MONETARY
        Definisce come devono essere scritte le valute, ovvero quale,
        tra virgola e punto,  il separatore di decimali e migliaia e
        viceversa; definisce inoltre il simbolo di valuta.


     LC_NUMERIC
        Separatore di decimali e migliaia, formattazione dei numeri.


     LC_MESSAGES
        Definisce i valori ``si'' e ``no''.


     LC_TIME
        Come stampare data e ora (questo influenza date(1) e programmi
        vari).


     LC_ALL
        Come LANG, solo che questa ignora i valori definiti per ogni
        singola variabile (forza tutto al suo valore).  Come spiegher
        in seguito, questa variabile non va usata a meno di non sapere
        perfettamente quello che si sta facendo.




  3.1.  La localizzazione in una riga...


  Pi semplicemente di quello che si crede, basta mettere nel proprio
  ~/.profile o /etc/profile per sh-type shells:


  ______________________________________________________________________
          export LANG=it_IT
  ______________________________________________________________________



  Oppure se avete c-type shells:


  ______________________________________________________________________
          setenv LANG it_IT
  ______________________________________________________________________



  Perch ``it_IT''?!  solo una convenzione, e il significato 
  ``lingua_PAESE''. Per fare un esempio potrebbe essere it_CH (Svizzera
  italiana).

  Come sempre la man page di locale(7)  lettura molto consigliata, come
  un giro per /usr/share/locale per vedere le locali disponibili.



  3.1.1.  Bug delle localizzazioni


  Solitamente si manifestano con errate definizioni degli alias di
  locale, quindi definizioni che dovrebbero essere equivalenti danno
  risultati completamente diversi; per rimediare a questo occorre
  prelevare le definizioni di locale aggiornate, o installarle (molte
  distribuzioni non le installano proprio).

  Pu anche essere che alcune distribuzioni non abbiano proprio il
  supporto per la locale, al che conviene cambiare distribuzione
  (l'alternativa  ricompilare a mano la libreria di sistema libc).



  3.1.2.  Bug delle applicazioni


  Anche qui, come per il problema BS/DEL, se qualcosa non funziona 
  colpa, quasi certamente, della applicazione.

  C' qui una specie di ``caverna degli orrori''... ;)))



  3.1.2.1.  Netscape


  Netscape, se vengono definite le variabili LC_NUMERIC e LC_MONETARY,
  si mette a stampare e salvare PostScript con punti al posto delle
  virgole e viceversa, con il risultato che qualsiasi interprete
  PostScript e in particolare gs(1) vanno in palla...

  Se capita, ricontrollate la vostra definizione di locale, e se avete
  fretta di stampare basta che definiate le variabili seguenti:


  ______________________________________________________________________
          LC_NUMERIC=posix
          LC_MONETARY=posix
  ______________________________________________________________________



  che forzano i valori di default (e permettono di stampare).

  Notare che se si  definita LC_ALL, queste due righe qui sopra vengono
  ignorate: per questo  bene NON definire la variabile LC_ALL.

   probabile che questo problema non sia solo di Netscape: se vi capita
  un problema simile, sapete ora come ``mettere una pezza'', ma avvisate
  l'autore del programma in questione della presenza di questo bug.





  3.1.2.2.  perl(1)


  Spesso perl(1) si lamenta della mancanza della locale; questo  dovuto
  sia a una non completa implementazione da parte della distribuzione,
  sia in parte a perl stesso che non riesce a gestire gli alias delle
  varie locali, e quindi riesce a ``seguire'' la variabile LANG solo se
  punta a una locale con una reale directory sul disco.

  Io sulla mia Debian non sono riuscito a riprodurre il problema (se non
  settando LANG a una locale inesistente ;) e quindi sospetto che tutto
  nasca da una difficile interazione tra localizzazione e perl stesso,
  che verr risolta sicuramente dalle prossime versioni di perl.

  RedHat 5.0 soffre di questo problema, che  stato corretto nella 5.1.



  3.2.  ...o quasi!


  Resta il problema di far capire alle applicazioni ``cattive'' che
  vogliamo avere i caratteri accentati. Questi hanno l'interessante
  propriet di essere lunghi 8 bit, mentre molti programmi ne
  considerano solo 7, perch  da 7 bit il codice ASCII
  internazionalmente riconosciuto.

  Queste note che scrivo dovrebbero presto finire in soffitta, visto che
  ormai le applicazioni che non gestiscono bene gli 8 bit o che non
  sanno reagire alla variabile LANG sono in via di estinzione.



  3.2.1.  Editor



  3.2.1.1.  Emacs 19


  Come sempre emacs  molto particolare. Avvisiamolo che vogliamo i
  caratteri accentati con:


  ______________________________________________________________________
          (standard-display-european t)
          (set-input-mode (car(current-input-mode))
          (nth 1 (current-input-mode)) 0)
  ______________________________________________________________________



  Aggiunto al nostro bravo ~/.emacs.


  3.2.1.2.  Emacs 20


  Emacs 20 include MULE, il supporto per l'internazionalizzazione; 
  quindi sufficiente mettere questo nel proprio ~/.emacs (o, per i
  SysAdmin che usano Debian e vogliono una configurazione site-wide, in
  /etc/emacs/site-start.el) per avere lettere accentate (e molto di pi
  :-) e dirgli che siamo in Europa Occidentale:



  ______________________________________________________________________
          (setq-default enable-multibyte-characters t)
          (set-language-environment 'Latin-1)
  ______________________________________________________________________



  A qualcuno potrebbe far piacere aggiungere questo:


  ______________________________________________________________________
          (load "iso-transl")
  ______________________________________________________________________



  che consente di inserire le lettere accentate (non solo italiane)
  digitando ``[Ctrl+x] [8] <ACCENTO> <LETTERA>'', tipo ``[Ctrl+x] [8]
  ["] [A]'' (grazie a Davide G. M. Salvetti).



  3.2.1.3.  joe(1)


  Basta editare il file di configurazione /etc/joe/joerc o nel proprio
  ~/.joerc di modo che comprenda la riga (con il ``-'' sulla colonna 1):


  ______________________________________________________________________
          -asis           Characters 128 - 255 shown as-is
  ______________________________________________________________________






  3.2.2.  Mail/News



  3.2.2.1.  pine(1)


  Basta scegliere il set di caratteri ISO-8859-1 dal menu di
  configurazione, seguendo le voci ``Setup'', poi ``Configure'' e infine
  ``character-set''; questo fa uscire le mail in codifica ``quoted-
  printable'' se contengono caratteri accentati (il che  bene ;).



  3.2.2.2.  tin(1)


  Tin  perfettamente localizzato, occorre solo scegliere il charset
  ISO-8859-1 per la visualizzazione nel menu di configurazione
  (attraverso [M]).



  3.2.2.3.  nn(1)


  Aggiungere la seguente riga nel file ~/.nn/init:

  ______________________________________________________________________
          set data-bits 8
  ______________________________________________________________________





  3.2.3.  readline(3)


  Readline, che  una libreria standard GNU per la gestione dell'input,
  nonostante sia giovane, pimpante e ben mantenuta, non arriva per
  definizione con il supporto per i caratteri accentati. Questa libreria
   usata dalla shell di default di linux bash(1), per citare una
  applicazione di larghissimo uso.  Non  da considerare un bug (questo
  comportamento forse  voluto per garantire il funzionamento anche sui
  vecchi terminali a 7 bit...) ma  chiaro che l'uso dei caratteri
  accentati deve essere forzato, ad esempio, se si vogliono usare nomi
  di file con lettere accentate.

  Per fortuna basta solo aggiungere nel proprio ~/.inputrc


  ______________________________________________________________________
          set meta-flag on
          set convert-meta off
          set output-meta on
  ______________________________________________________________________





  3.3.  Manpage


  Le manpage sono quelle pagine testuali che si richiamano con il
  comando man(1), e che rappresentano la documentazione online di ogni
  buon sistema UNIX, non solo di Linux.

  Il comando man  abbastanza intelligente da reagire se  definita la
  variabile LANG. In pratica man va a cercare le manpages prima in
  $MANPATH/$LANG e poi in $MANPATH se configurato correttamente,
  permettendo di leggere le pagine nella lingua preferita.

  Chiaramente c' gi chi sta traducendo le pagine; se vi sentite dei
  traduttori nati non vi resta che saltare al progetto ``ILDP'' per
  saperne di pi e collaborare.

  Le pagine gi tradotte possono essere tranquillamente installate
  manualmente, prelevando l'ultima versione da
  <ftp://ftp.pluto.linux.it/pub/pluto/ildp/man> e leggendo attentamente
  le istruzioni allegate.  Gli utenti Debian possono trovare nella loro
  distribuzione il pacchetto manpages-it gi pronto.




  3.4.  Catalogue


  Oltre tutto questo, c' una terza e importantissima funzione della
  NLS: i messaggi dei programmi nella lingua locale.


  Per farsi un'idea, agli utenti Linux non tocca editare i sorgenti di
  un programma, modificare a mano tutte le stringhe e poi ricompilare
  perch questo si presenti in corretto italiano. Esiste una ``prassi''
  di programmazione che permette di specificare un linguaggio di default
  ``compilato'' nell'eseguibile (di solito inglese, per compatibilit) e
  invece definire delle catalog, ovvero dei cataloghi di messaggi in un
  formato particolare, detto portable object, o pi brevemente po, che
  messi in una determinata directory vengono usati semplicemente al
  posto dei messaggi presenti nel programma.



  3.4.1.  Linux International


  Non c' da meravigliarsi che ci abbia pensato mamma GNU stessa a
  creare una organizzazione nonprofit, Linux International
  <http://www.li.org/> appunto, dedicata a questo, dobbiamo ammetterlo,
  immane lavoro di traduzione e aggiornamento.

  In particolare in questo sito vengono messe a disposizione della
  comunit UNIX internazionale una serie di liste in cui poter
  coordinarsi per la traduzione, una per ogni paese pi una serie di
  liste generiche di ``intracoordinamento''.

  Visto che tradurre i messaggi (catalogues) e tradurre manpage e HOWTO
  sono compiti molto simili, per non creare fastidiose sovrapposizioni i
  compiti sono stati divisi tra due ambiti.  Linux International in cui
  si definiscono le regole generali di traduzione e si traducono
  catalogues e programmi GNU ``ufficiali'', e ``ILDP'' che invece  pi
  legata al mondo Linux e maggiormente dedicata alla traduzione di
  documentazione (HOWTO e manpage) e anche alla sua produzione
  direttamente in Italiano.

  Pi avanti elenco le ``liste'' a cui ti puoi iscrivere per
  collaborare, oppure puoi dare una occhiata all'HOWTO messo a punto dal
  responsabile del team di traduzione italiano, Marco d'Itri, all'URL
  <http://www.linux.it/~md/IT-NLS-HOWTO>.

  Ti prego di NON, ripeto NON iniziare nessuna localizzazione senza
  prima aver sentito i ``colleghi'' di queste mailing list, il tuo
  lavoro potrebbe venir vanificato in un secondo per un banale doppione.



  3.5.  Per maggiori informazioni


  Ulteriori informazioni possono essere recuperate nei seguenti testi:


    Linux Danish/International HOWTO
     <http://sunsite.unc.edu/LDP/HOWTO/Danish-HOWTO.html>

      stato il primo HOWTO che ha trattato il tema della
     nazionalizzazione di Linux, ed  tuttora un riferimento. A dispetto
     del nome  pi ``International'' che ``Danish'' visto che  in
     inglese...

    Un giro per  <ftp://sunsite.unc.edu/pub/Linux/utils/nls> 
     consigliato ai programmatori. In particolare consiglio la lettura
     del file locale-tutorial-0.8.txt.gz.

    Come gi detto, il sito ufficiale GNU dove potete trovare
     informazioni sulla localizzazione GNU e le definizioni di locale
     pi aggiornate  <ftp://dkuug.dk/i18n>.
     In particolare se volete tentare l'installazione manuale delle
     definizioni di locale potete prendere il materiale che trovate a
     <ftp://dkuug.dk/i18n/WG15-collection> e, ovviamente, leggere
     attentamente la documentazione allegata o i succitati testi.

    Maggiori informazioni sul formato dei Portable Object e sullo stato
     delle traduzioni possono essere trovate al sito
     <ftp://alpha.gnu.ai.mit.edu/gnu/po/> oppure
     <ftp://svpop.com.dist.unige.it:/pub/Linux/gnu/po> che ne  un
     mirror.

    Un URL mitico al riguardo, ottimo punto di partenza per ricerche
     sulla internazionalizzazione, 
     <http://www.vlsivie.tuwien.ac.at/mike/i18n.html>. Le pagine sono
     curate da Michael Gschwind, e sono una miniera di link per
     approfondire.




  4.  Altre localizzazioni





  Qui si vogliono trattare quelle localizzazioni che sono un po' pi
  hardware-dipendenti, meno standard e in particolar modo che riguardano
  i PC compatibili.  Molto probabilmente molte di queste cose non si
  applicano alle altre piattaforme su cui gira Linux, ne chiedo venia.
  Ma o mi regalate un PPC, una Sparc, un Alpha, un A4000, un MAC, ...
  oppure se avete altre note per queste piattaforme da aggiungere
  fatemelo sapere. ;-)



  4.1.  Font in console


  Linux permette di cambiare il font standard presente nella ROM della
  scheda video, in modo da avere il set di caratteri ISO-8859-1 completo
  a disposizione. La cosa pu essere semplicemente ottenuta con uno
  script del genere, da eseguire al boot (in Debian basta copiarlo nella
  directory /etc/rc.boot e renderlo eseguibile):






















  ______________________________________________________________________
          #!/bin/sh

          # qualche variabile...
          #
          # font Latin1 (ISO-8859-1)
          CONSOLE_FONT=lat1u-16.psf
          # mappa nulla
          CONSOLE_MAP=trivial
          # console attive
          CONSOLE_NUM=64          # abbondiamo, v! ;)

          if [ -x /usr/bin/setfont ]; then
                  echo -n "Setting up ISO 8859-1 font"
                  setfont /usr/share/consolefonts/$CONSOLE_FONT
                  echo -n "."
                  mapscrn /usr/share/consoletrans/$CONSOLE_MAP
                  echo -n "."
                  N=1
                  while [ $N -le $CONSOLE_NUM ]; do
                          echo -ne '\033(B' > /dev/tty$N
                          let N=$N+1
                  done
                  echo ". done."
          fi
  ______________________________________________________________________



  Il primo comando carica un nuovo set di caratteri, il secondo permette
  di eseguire una traduzione ``al volo'' tra caratteri richiesti e
  voluti e il terzo rende attiva la nuova coppia tabella-tavola di
  traslazione in ogni console.

  Ad esempio di default non viene caricata nessuna tabella e viene
  eseguita la traduzione da Latin1 (quello che Linux vuole) a CP437
  (quello che il PC ha).  Ovviamente le manpages di setfont(1) e
  mapscrn(1) sono utili letture.



  4.1.1.  Debian


  Se si ha un sistema Debian 2.0 o seguenti semplicemente il file
  /etc/kbd/config  il posto dove mettere la mappa dei caratteri e il
  font da utilizzare: per l'italiano, la scelta giusta :


  ______________________________________________________________________
          CONSOLE_FONT=lat1u-16.psf
          CONSOLE_MAP=trivial
  ______________________________________________________________________



  (da Lorenzo Maria Catucci).



  4.1.2.  SVGATextMode


  Ma c' una soluzione pi elegante. Esiste un programma che si chiama
  SVGATextMode(8) che fa tutta una serie di operazioni sulla console
  testo molto simpatiche.
  Permette di definire dimensioni ``non standard'' per la console
  (diverse da 80x25, insomma), permette di alzare la frequenza di
  refresh del video di modo da stancare meno gli occhi, gestisce chipset
  avanzati...

  Ha un file di configurazione, /etc/TextConfig che ha una sintassi
  molto simile al file di configurazione di XFree e che permette in un
  sol colpo di definire il font da caricare. Ci penser poi il programma
  stesso ad attivare il font e renderlo disponibile.

  Basta modificare leggermente il file, facendo in modo che si presenti
  all'incirca come:


  ______________________________________________________________________
          [...]

          Option "LoadFont"
          FontProg "/usr/bin/setfont"
          FontPath "/usr/share/consolefonts"
          FontSelect "lat1u-16.psf"   8x16 9x16 8x15 9x15
          FontSelect "lat1u-14.psf"   8x14 9x14 8x13 9x13
          FontSelect "lat1u-12.psf"   8x12 9x12 8x11 9x11
          FontSelect "lat1u-08.psf"   8x8  9x8  8x7  9x7
          FontSelect "lat1u-08.psf"   8x32 9x32 8x31 9x31

          [...]
  ______________________________________________________________________



  e si ottengono magicamente i caratteri Latin1, e molto di pi.



  4.2.  Font in X


  Buona parte dei caratteri installati con X seguono lo standard Latin1,
  e idem i font PostScript normalmente reperibili (come quelli
  dell'ATM).

  Inoltre sta facendo la sua comparsa il primo font server TrueType; i
  font TrueType sono organizzati secondo un set di caratteri che  un
  soprainsieme del Latin1 (MicroSoft chiaramente fa sempre di testa sua,
  e mette caratteri dove lo standard lo vieta esplicitamente...), e
  quindi non dovrebbero dare problemi neanche loro.



  4.3.  Stampante e DOS


  Se stampate file DVI, PostScript o comunque in grafica, non ci sono
  problemi.  Ci penser il vostro programma per la stampa a convertire
  il vostro file nel formato matrice-di-punti pi consono alla vostra
  stampante.  Ma se volete stampare in puro testo, senza formattazioni?
  Resta, soprattutto per le stampanti ad aghi, il metodo pi veloce. Ma
  quanto  standard il set ISO-8859-1?

  ISO-8859-1  il set di caratteri di Unix in generale, di Windows,
  Amiga, OS/2. Mancano all'appello il DOS e Macintosh. Ma in DOS la
  CP850  in pratica il set Latin1, con i caratteri rimescolati un po'
  per essere compatibile verso il basso con la CP437.  Sentitevi liberi
  quindi da qualsiasi ``sindrome da 8 bit'', e usate tranquillamente
  questo set di caratteri.  Se dovete importare dei testi Linux in
  Macintosh, semplicemente usate il filtro per ``puro testo Windows'' o
  cose simili.

  Se volete stampare puro testo con le accentate da Linux, a questo
  punto non vi resta che provare una delle soluzioni seguenti:


    Se la vostra stampante supporta il set di caratteri ISO-8859-1,
     mettetela in quella modalit, e fatela finita una volta per tutte
     con le diatribe tra set di caratteri.

    Se la vostra stampante supporta la CP819, siete a cavallo visto che
     ``CP819''  il nome DOS del set di caratteri Latin1.

    Se la stampante supporta la CP850, mettetela in quella modalit e
     cercate il programma recode(1).  Si pu usare come
     recode latin1:cp850 file dove file  il file da convertire, che
     viene sovrascritto.  Per automatizzare la procedura si pu anche
     installare come filtro per la stampa.

    Se la stampante supporta solo CP437, o non volete/potete
     modificarla, non preoccupatevi, tanto comunque riuscite a stampare
     le cose ``normali'', come tutte le lettere accentate che trovate
     sulla tastiera e la lettera ``'' (questo perch, come gi detto
     CP850 e CP437 coincidono in corrispondenza di quei caratteri).

  Chiaramente, per le ultime tre soluzioni,  il caso di utilizzare
  anche da DOS (se avete un sistema dual boot) la CP819 o in mancanza
  d'altro la CP850; per configurare la gestione del set di caratteri
  DOS, leggete le manpage, hem (la forza dell'abitudine! O;) il manuale
  dei comandi COUNTRY e MODE CON.

  Inoltre se la confusione attorno alle sigle dei vari set di caratteri
  sale, potete anche leggere le man page ascii(7) e latin1(7).



  4.3.1.  Un esempio di filtro


  Per avere automaticamente la conversione, si pu utilizzare questo
  filtro:


  ______________________________________________________________________
          #!/bin/sh
          if /usr/local/bin/recode latin1:cp850
          then
                  exit 0
          else
                  exit -1
          fi
  ______________________________________________________________________



  potete salvare questo filtro come /usr/local/bin/iso2850 e poi dargli
  i permessi di esecuzione (chmod ugo+x /usr/local/bin/iso2850). Ora non
  vi resta che aggiungere nel file di configurazione delle stampanti
  /etc/printcap:






  ______________________________________________________________________
          # esempio di filtro, sostituire ``lp2'' con il device corretto
          # i file log e acct vanno creati se utilizzati, nei contesti
          # normali non serve sapere chi usa e quante pagine stampa ogni
          # utente! ;)
          #
          cp850|dos:\
          :lp=/dev/lp2:\
          :sd=/var/spool/lp2:\
          :lf=/var/spool/lp2/log:\
          :af=/var/spool/lp2/acct:\
          :if=/var/local/bin/iso2850:\
          :sh:
  ______________________________________________________________________



  Ora, se la stampante  impostata per usare la codepage 850, basta un
  bel lpr -Pcp850 nomefile per stampare un file latin1 con tutte le
  accentate al loro posto.



  4.4.  libpaper


  Libpaper  una piccola libreria e un programmino che dovrebbe
  ``standardizzare'' la gestione dei formati di carta sotto linux.  In
  pratica fornisce delle funzioni da linkare al proprio programma che
  permettono di usare delle informazioni sul formato di carta
  centralizzate (prese da /etc/papersize o dalla variabile d'ambiente
  PAPERSIZE.

  In Debian  installata di default e gs la usa. Potrebbe essere una
  cosa utile, e va incentivata.

  Maggiori informazioni le potete trovare alla manpage di paperconf(1),
  ovviamente se avete libpaper installata nel vostro sistema.



  4.5.  Per maggiori informazioni



    Tocca ripetermi, e citare nuovamente le pagine di Michael Gschwind,
     ovvero  <http://www.vlsivie.tuwien.ac.at/mike/i18n.html>.



  5.  Ispell





  Esiste un vocabolario italiano per ispell(1) che trovate all'URL
  <ftp://ftp.pluto.linux.it/pub/pluto/ildp/ispell/>.  Anche se non 
  ancora perfetto,  gi pi che funzionante e pu essere
  tranquillamente usato.

  Nella distribuzione Debian  gi presente il pacchetto iitalian che
  installa e configura correttamente il vocabolario, pronto all'uso.

  Se vuoi collaborare a migliorare il vocabolario o la tavola degli
  affissi (per sapere cos' man 5 ispell), esiste una mailing list (che
  scherzosamente chiamo IspellIT!), che coordina gli sforzi.  Trovi
  maggiori informazioni nella sezione dedicata alle ``liste''.




  5.1.  Ispell e Emacs


  Per forzare il riconoscimento del nuovo vocabolario in emacs, occorre
  aggiungere questo nel proprio ~/.emacs:


  ______________________________________________________________________
  (setq ispell-dictionary "italian")
  (setq ispell-dictionary-alist
          (append '(("italian"
                  "[AB-EF-IJ-OP-UV-Zab-ef-ij-op-uv-z]"
                  "[^AB-EF-IJ-OP-UV-Zab-ef-ij-op-uv-z]"
                  "[---']" t nil "~iso" iso-latin-1))
          ispell-dictionary-alist))
  (setq ispell-menu-map nil)
  (load-library "ispell")
  ______________________________________________________________________



  Questa definizione attiva l'Italiano di default (primo form), lo
  aggiunge alla lista e rigenera il men (nel caso che ispell fosse gi
  stato caricato, occorre forzarne la rigenerazione con gli ultimi due
  form).

  Se non si aggiunge l'ottavo elemento alla lista del terzo form (iso-
  latin-1 l sopra) ispell non funziona correttamente con Emacs 20 e
  MULE; e inoltre non va bene ``~list'' come settimo parametro ma ci
  vuole ``~iso'', come indicato l sopra (da Davide G. M. Salvetti).



  5.2.  Per maggiori informazioni



    Responsabile del progetto IspellIT!  Sandro Dentella
     (sandro@crcc.it), puoi contattare lui per ulteriori informazioni.

    Sembra che qualcun altro si stia divertendo con vocabolari e
     tabelle degli affissi, infatti c' un secondo vocabolario sulla cui
     qualit per non mi sbilancio, non conoscendolo.   possibile
     recuperarlo all'URL
     <http://www.mrg.dist.unige.it/~marco/ispell.html>.

    Inoltre anche un giretto per la Ispell Home Page <http://ficus-
     www.cs.ucla.edu/ficus-members/geoff/ispell.html> non  una cattiva
     idea.




  6.  TeX



  TeX non  una applicazione specifica per Linux, anzi, forse  una
  delle applicazioni utilizzabili nel maggior numero di sistemi... ma
  d'altro canto TeX  una delle applicazioni pi usate, e ho quindi
  ritenuto argomento ``critico'' il produrre documenti TeX correttamente
  localizzati.


  6.1.  Un po' di teoria...


  Il TeX  in pratica un linguaggio di programmazione. Scritto un file
  in un determinato formato, si pu compilare e quello che si ottiene 
  un file ``oggetto'', ovvero un file intermedio, in un formato detto
  DVI, ovvero DeVice Indipendent format, da cui si ottiene un file in
  linguaggio per le stampanti, di solito un file PostScript.

  TeX  un ottimo programma per l'impaginazione di libri. La sua nascita
  nel grande mondo del free software lo ha velocemente indirizzato verso
  le pubblicazioni tecniche, scientifiche ma anche quelle multilingue.
  Inoltre permette una potente gestione degli indici e dei riferimenti,
  nonch estensioni per la gestione dei riferimenti bibliografici.


  Un file sorgente di TeX  un file testo (come tutti i linguaggi di
  programmazione) con delle istruzioni aggiuntive (che iniziano per
  ``\'') che spiegano al programma come organizzare l'output.


  Come tutti i buoni compilatori, piano piano  stato dotato di
  librerie, chiamate package che ne estendono le funzionalit.  Le pi
  note sono il LaTeX, che definisce un insieme di stili tipografici per
  fare libri, articoli e lettere, con tutti gli elementi importanti di
  questi stili (titoli per libri e articoli, indirizzi per le lettere)
  gi predefiniti e pronti all'uso.  Esistono poi parecchie estensioni
  al LaTeX, le principali sono l'AMSLaTeX, che permette di ampliare di
  molto la gi completa gestione di equazioni matematiche del TeX (per
  la cronaca, quasi tutti i libri di matematica in commercio sono fatti
  in TeX) e Babel, che definisce la gestione di diverse lingue, anche
  contemporaneamente sullo stesso documento.

  Come per Linux stesso, di TeX ce n' uno solo, ma visto che ha bisogno
  comunque di librerie di font, programmi accessori... di distribuzioni
  ce ne sono tante.  Si prende in considerazione qui la distribuzione
  teTeX.



  6.1.1.  Il formato del file


  Un file TeX  composto da un preambolo che definisce lo ``stile'' con
  cui  impaginato il testo e da un corpo, che comprende sia il testo
  che le formattazioni. Il corpo  quello che va dal comando
  \begin{document} al comando \end{document}, quello che c' sopra  il
  preambolo, mentre quello che c' dopo viene ignorato.

  Nel preambolo vengono definite:



     Classe
        (o Stile, in LaTeX2.09) Definisce lo stile del documento, ovvero
        se deve essere un libro (book), lettera (letter), articolo
        (article), ...


     Opzioni
        definisce sia le opzioni interne, ovvero quelle delle varie
        classi (dimensione dei caratteri in punti, dimensione della
        carta, ...), sia i pacchetti (package) o stili aggiuntivi
        esterni, come il Babel stesso e il supporto per le accentate.


     Altro
        altre cose fanno parte del preambolo, come definizioni
        aggiuntive e strutture particolari, ma che ai fini del nostro
        studio sono inessenziali.


  La definizione  quindi del tipo:


  ______________________________________________________________________
          % Questo  il preambolo

          % Questa  la definizione della classe e le sue opzioni
          \documentclass[opz1, opz2, ...]{classe}

          % Questo  il caricamento dei pacchetti e le loro opzioni
          \usepackage[opz1, opz2, ...]{pacchetto1}
          \usepackage[opz1, opz2, ...]{pacchetto2}
                  .
                  .
                  .

          % Qui inizia il testo
          \begin{document}

          [...]

          \end{document}
  ______________________________________________________________________



  Si vede come nel LaTeX2e ci sia separazione logica tra le opzioni
  dello stile, o classe, e dei pacchetti aggiuntivi, cosa preferibile
  visto il proliferare di nuovi pacchetti e estensioni.



  6.2.  L'installazione TeX di Linux


  Tutta l'installazione del TeX di Linux si trova in /usr/lib/texmf e
  subdirectory.



  6.2.1.  Configurazione di teTeX


  Per la configurazione di teTeX  sufficiente eseguire il programma di
  utilit texconfig(1).  Le voci da (eventualmente) modificare sono:



     HYPEN
        permette di modificare le tabelle di sillabazione attive:
        selezionata questa opzione si entra automaticamente in un editor
        (di solito vi(1)) e occorre ``scommentare'' (eliminare il
        carattere di commento ``%'') di fronte alla riga italian
        ithyph.tex; dopo aver salvato il file ed essere usciti (con
        [Esc] [:] [w] [q] [Invio] se si tratta di vi) vengono
        automaticamente rigenerati i file di formato.
     MODE
        permette di scegliere la configurazione per la propria
        stampante: ATTENZIONE che questo non configura la stampa vera e
        propria, ma solo il modo di default con il quale vengono
        generati i font da dvips; quindi scegliete come valore la
        risoluzione maggiore che riuscite a ottenere dalla vostra
        stampante o da tutte le stampanti che usate con il vostro
        computer.


     XDVI
        permette di scegliere la dimensione di carta di default e fare
        delle prove di stampa e di resa;  sufficiente scegliere
        l'opzione ``a4''


     DVIPS
        permette di definire anche qui il formato della pagina, gli
        offset sulla pagina stessa (zone di non stampabilit), il modo e
        la stampante di default; permette di fare la stesa operazione
        per un certo numero di stampanti ulteriori.


  Alla fine di questa semplice operazione avrete la vostra installazione
  di TeX perfettamente funzionante.



  6.2.2.  Configurazione delle altre distribuzioni di TeX


  Per le altre distribuzioni di TeX presenti nelle vecchie distribuzioni
  di Linux occorre al contrario del teTeX, editare e ricompilare a mano
  i file di formato (pi o meno ;).  Non  una operazione semplice,
  troverete maggiori informazioni presso la documentazione allegata alla
  vostra distribuzione di TeX.



  6.2.2.1.  NTeX


  Una nota  da fare sulla distribuzione NTeX, che dalla versione 2.X.X
  e successive (non quindi quella contenuta nelle vecchie slackware...)
  contiene un programma di configurazione basato su una bella
  interfaccia grafica in Tcl-Tk. All'uscita dall'interfaccia grafica si
  ha un sistema TeX perfettamente funzionante e configurato,
  sillabazione compresa.

  C' da dire che le distribuzioni non usano pi NTeX, probabilmente
  perch NTeX  cresciuta oltre modo (pi di 160 MB, senza supporto per
  il giapponese!).  Il riassunto  che, almeno fino all'uscita di teTeX
  1.0 (che non ho idea come sar strutturato), NTeX rappresenta una
  alternativa per esperti, che hanno bisogno di supporto per lingue poco
  diffuse o oscure (da Stefano Miccoli).



  6.2.2.2.  teTeX di Slackware 3.3


  Attenzione che il teTeX fornito con la Slack 3.3 ha un'imprecisione:
  nel file italian.ldf di Babel devi definire a mano la traduzione per
  la parola ``Dimostrazione'' che  lasciata all'inglese ``Proof'' (se
  ti serve l'ambiente proof nei tuoi documenti) (da Enrico Cavalli).

  6.2.3.  La sindrome di Zio Paperone


  La tabella di sillabazione italiana presente nelle distribuzioni
  diverse da teTeX pu essere vecchia o sbagliata. Cercate nelle
  sottodirectory di /usr/lib/texmf il file hyphen.italian o ithyph.tex.
  Se  gi presente, controllate ( un file di testo, usate pure
  less(1)!!!) che NON sia la tabella di sillabazione di G. Patergnani.
  Questa soffre di quella che io scherzosamente chiamo ``sindrome di Zio
  Paperone'', ovvero tende a mandare a capo malamente i suoi nipoti (qu-
  i, qu-o, qu-a).

  Altrimenti, se la tabella non esiste o  quella del Patergnani,
  prendete il file aggiornati dai siti CTAN, uno per tutti
  <ftp://ftp.dante.de/>.



  6.3.  Produzione di elaborati TeX ben localizzati


  Ora, dopo tutte queste disquisizioni, abbiamo capito che c' bisogno
  di:



     A4 Ovvero per stampare decentemente sulla nostra stampante.


     InputEnc
        Ovvero il supporto per le lettere accentate direttamente
        all'interno del file LaTeX, per evitare di ricorrere a pesanti
        sequenze di comandi.


     Babel
        Per il supporto della sillabazione italiana e di altre cose
        simpatiche senza stravolgere completamente la configurazione del
        TeX.




  6.3.1.  Stampa di testi in inglese


  Piacerebbe avere l'opzione della dimensione del foglio A4 definita
  direttamente a livello di TeX, visto che  il nostro standard.  Questa
  operazione, anche se possibile,  sconsigliata. In TeX la
  formattazione di certi documenti dipende fortemente da margini e
  dimensione della carta.  Cambiare uno di questi parametri senza
  rivedere il layout del documento potrebbe portare a delle emerite
  schifezze (figure sovrapposte, ...).  Quindi, se vogliamo stampare dei
  testi in inglese, dobbiamo reperire i sorgenti in TeX, editare il
  file, aggiungendo nel preambolo l'opzione:


  ______________________________________________________________________
          \documentclass[opz1,opz2,...,a4paper]{classe}
  ______________________________________________________________________



  e magari controllare con un previewer come ghostview, prima di
  stampare, che l'output sia accettabile.

  6.3.2.  Composizione di testi in italiano


  Se invece stiamo costruendo un nuovo testo, e vogliamo che tutto
  funzioni alla perfezione,  sufficiente che il preambolo sia del tipo:


  ______________________________________________________________________
          \documentclass[opt1,opt2,...,italian,a4paper]{classe}
          \usepackage{babel}
          \usepackage[latin1]{inputenc}
  ______________________________________________________________________



   bene mettere l'opzione ``italian'' come globale, visto che potrebbe
  essere utilizzata da altri pacchetti.

  Inoltre per un maggiore ordine nella sillabazione, e molti altri buoni
  motivi (tra cui le guiellmots )  bene adoperare anche un:


  ______________________________________________________________________
          \usepackage[T1]{fontenc}
  ______________________________________________________________________



  che permette di utilizzare i nuovi font ``ec'' in luogo dei vecchi
  ``cm'' di Knuth (da Lorenzo Maria Catucci).




  6.4.  Per maggiori informazioni


  Se avete intenzione di stampare semplicemente dei file TeX, queste
  conoscenze sono sufficienti.

  Ulteriori informazioni possono essere reperite nella (nutrita!)
  documentazione che viene allegata alla distribuzione teTeX, e che
  potete trovare nella directory /usr/lib/texmf/doc oppure facendo
  riferimento al teTeX HOWTO <http://sunsite.unc.edu/LDP/HOWTO/TeTeX-
  HOWTO.html>, anche in versione italiana
  <http://www.pluto.linux.it/ildp/HOWTO/TeTeX-HOWTO.html>.

  Se invece avete intenzione di proseguire nella conoscenza del TeX,
  sono consigliabili, in particolare, i libri:


    Donald Knuth, The TeXbook, Addison-Wesley, 1992.

    Leslie Lamport, LaTeX User's Guide and Reference Manual, Addison-
     Wesley, 1994.

    Helmut Kopka, Patrick Daly, LaTeX Guide, Addison-Wesley, 1994.

    AMS-LaTeX Version 1.1 User Guide, American Mathematical Society,
     1991.

    Norman Walsh, Making  TeX Work, O'Reilly & Associates.

    Tobias Oetiker, The not so short Introduction to LaTeX2e (or
     LaTeX2e in 69 minutes).

     ovvero il file /usr/lib/texmf/doc/latex/general/lshort2e.dvi, da
     cui si impara pi che dal Lamport, risparmiando giorni di studio
     (da Lorenzo Maria Catucci).

  E in particolare in italiano...


    Gianni Gilardi, Il TeX, Introduzione al linguaggio e complementi
     avanzati, Zanichelli/Decibel.

    Claudio Beccari, LaTeX, Guida ad un sistema di editoria
     elettronica, Hoepli Milano.

    Marc Baudoin, Impara LaTeX!,
     <http://yamaha.cefriel.it:8080/~cannarsi/documents.html>.

     Si tratta di una traduzione di ``Apprends LaTeX!'', realizzato da
     Marc Baudoin e in uso in numerose scuole francesi nonch in vari
     laboratori di ricerca. Ha il pregio, oltre all'essere di libero
     dominio e in italiano, di permettere un apprendimento molto rapido
     di Latex e cominciare da subito a scrivere i propri documenti, come
     l'autore e io abbiamo avuto modo di constatare dal 94 (prima
     versione) ad oggi presso l'Ecole nationale superieure de techniques
     avancees.

      anche possibile scaricare la versione PostScript al sito:
     <ftp://ftp.pluto.linux.it/pub/ildp/misc/impara_latex/>.

    Davide G. M. Salvetti, TEX.ITA FAQ, <http://salve.home.ml.org/TeX-
     FAQ/TeX-FAQ.html>

     Sono le FAQ dell'area TEX.ITA di rete FidoNet, una ottima FAQ e un
     buon punto per iniziare successive ricerche.

    Esiste anche questo link
     <http://www.fi.infn.it/pub/tex/doc/html/latex.html>, anche se non
     ho avuto modo di vederlo e valutarne la qualit.

    Idem a sopra, Enrico Cherubini mi segnala questo link,
     <http://arena.sci.univr.it/~kevin/Download/various>.




  7.  Siamo in Europa, bellezza!


  Il che comporta che a breve dovremmo ``scalciare'' via dalla tastiera
  e dai nostri font alcune simboli per fare spazio ai nuovi arrivati (il
  simbolo dell'euro e dei centesimi di euro, in particolare).

  Gi che c'erano, sembra si stiano mettendo d'accordo (a livello di ISO
  <http://www.iso.org/>, International Standard Organization) per fare
  un unico font che vada bene a tutte le nazioni europee, comprese
  quelle che dovrebbero entrare a breve.  Si vocifera di un nuovo font
  ISO-8859-15 (soprannominato Latin0), e quindi  probabile che tra un
  po' toccher cambiare tutto...

  Ma noi aspettiamo fiduciosi! ;)


  7.1.  Per maggiori informazioni


  Questa sezione dovrebbe espandersi sempre pi, nei prossimi anni; per
  ora non mi sbilancio e lascio solo dei riferimenti ad altri documenti.
    Si possono trovare informazioni sul nuovo font ``europeo'' all'URL
     <http://www.iso.ch/cate/d29505.html>.

    Altre informazioni sui set di caratteri e affini possono essere
     recuperate all'URL  <http://czyborra.com/charsets>.

    Per il TeX appaiono i primi font con il simbolo, basta dare una
     occhiata a  <ftp://ftp.dante.de/tex-archive/fonts/euro>.



  8.  TimeZone


  La TimeZone, ovvero il fuso orario corretto per l'Italia  GMT-1
  d'inverno e GMT-2 d'estate, ovvero GMT-1 per l'ora solare e GMT-2 per
  l'ora legale.  Oppure MET o CET (Middle o Central Europe Time), che in
  aggiunta fanno anche il passaggio automatico ora legale/ora solare.
  Notare che MET  il vecchio nome caduto in disuso, e non dovrebbe
  essere usato.

  Ogni distribuzione ha il suo programmino per definire la timezone in
  maniera automatica. In Debian solitamente viene chiesto in fase di
  installazione, e non si pu sbagliare (l'unica opzione utilizzabile 
  Europe/Rome, evidentemente, e per fortuna, in Debian sono impermeabili
  alle ultime mode secessioniste ;).

  Di solito negli ambienti UNIX si preferisce impostare l'ora del CMOS a
  GMT e quindi avvisare clock(1) di questo con l'opzione ``-u ''; questo
  per di solito entra in conflitto con la gestione dell'ora di Windows,
  che invece insiste a modificare brutalmente l'ora CMOS.

  Vedete voi cosa  meglio fare, Debian in fase di installazione chiede
  quale delle due modalit usare di default e configura di conseguenza.
  Come sempre man clock per saperne di pi.



  8.1.  Q: ma perch Linux mi ha sbagliato il passaggio di fuso?!


  Faccio notare che nel '96 sono cambiate le regole per la
  determinazione del passaggio ora legale/ora solare. Le nuove regole
  dovrebbero essere presenti nelle nuove distribuzioni, o comunque
  reperibili in rete.


  8.2.  Q: ma perch ho l'ora impostata a CEST?


  Perch  estate, CEST sta per ``Central Europe Summer Time''. O
  meglio,  in vigore l'ora legale, ma  pi bello pensare all'estate!



  9.  Documentazione




  9.1.  Pubblicazioni offline (su carta... ;)


  Questa vuole essere una piccola bibliografia per chi inizia a
  conoscere Linux.

  Per l'utente medio sono pi che sufficienti i testi liberamente
  reperibili in rete, come i libri del LDP e gli HOWTO.  Per un utente
  pi attento pu essere utile un approfondimento, anche perch buona
  parte degli argomenti su Linux riguardano UNIX in generale, come
  l'amministrazione di sistema, la gestione di una rete e via dicendo.

  Ho rimosso la bibliografia in inglese, questo perch la sentivo poco
  consona a questo HOWTO; e poi oramai non  cos difficile trovare un
  buon testo su UNIX/Linux in Italiano. Se siete alla caccia di una
  buona bibliografia su UNIX potete dare una occhiatina alla FAQ
  dell'area di discussione di FidoNet UNIX.ITA nel sito
  <http://www.fidoitalia.net/echo/faq/unix/indice.htm>, oppure se
  cercate riferimenti a tutti i libri su Linux potete dare una occhiata
  anche a  <http://www.psci.net/~dbklem/books.html> o anche a
  <http://shell.nanospace.com/~markst/linux/>.

  Difficile fare invece un ``censimento'' di tutto il materiale
  reperibile in rete. Ho cercato, soprattutto, di mettere le fonti di
  informazioni pi importanti, o quelle pi vicine a noi.

  Questo elenco non aspira a essere completo, tutt'altro. Come sempre
  sono felicissimo di ricevere suggerimenti, correzioni e aggiunte.



  9.1.1.  Libri



    D. A. Tauber, Guida a Linux, McGraw-Hill Italia, ISBN:
     88-386-3406-8.

     Contiene un CD-ROM.

    Giuseppe Zanetti, LINUX - il sistema operativo free software per
     personal computer 386/486, edizioni Libreria Progetto, Padova,
     1996.

     Poco pi di 300 pagine, simpatica copertina a colori col logo di
     Linux creato da Rohde-Hass. Se volete contattare l'autore, scrivete
     a beppe@freddy.iperv.it.

     Ne  uscita una nuova versione che ho solo visto di sfuggita, ma
     che  visibilmente pi grossa della precedente; infatti  stato
     aggiunto un corposo capitolo sul TCP/IP.


    Luca Righi, LINUX, Jackson, 1996.

     Contiene un CD-ROM.

    Naba Barkakati, I segreti di Linux, Apogeo, 1996, 800 pp., ISBN:
     88-7303-191-9.

     Contiene un CD-ROM con Linux Slackware 3.0 e altre utility.

    Richard Petersen, Guida completa a Linux, McGraw Hill, 1996, 721
     pp.

      una guida completa completa! In allegato CD-ROM con distribuzione
     RedHat e Caldera Network Desktop. ;-) (da Daniele Sanna)

    Baffa, Calculli, Internet: manuale avanzato.

     Un buon libro che, a dispetto del titolo, parla quasi solo di
     Linux, e include un CD-ROM con la distribuzione Slakware.  (da
     Gianni Comoretto)

    Olaf Kirch, Linux guida per l'amministratore di rete, Jackson
     Libri.

      la traduzione del libro O. Kirch, Linux Network Administrator's
     Guide, O'Reilly & Associates.  Eccezionale. (da Ermenegildo Colpo)

    M.Welsh, L.Kaufman, Il Manuale di Linux, Jackson Libri.

     Traduzione del ``Running Linux'' di Welsh-Kaufman (da S. Crespi
     Reghizzi)

    Progetto ILDP, Linux HowTo, Apogeo, 1996, pp 960, ISBN
     88-7303-317-2.

     I piu' importanti Howto di Linux interamente in italiano, tradotti
     (buona parte) e revisionati (tutti) dal gruppo Pluto.  (NdR: la
     nuova edizione dei Linux HOWTO comprende, tra gli altri, anche il
     presente volume.)

    David Pitts, RedHat Tutto e Oltre, Apogeo e SAMS Publishing.

     Il libro fornisce informazioni su tutto ci che  il pacchetto
     Linux e suoi svariati utilizzi, trattando dettagliatamente tutto
     ci che riguarda la reti ed internet in particolare. Consigliato a
     chi si avvicina a Linux per la prima volta, ed anche ai pi
     esperti, per la precisione e la completezza con cui vengono
     trattati i vari argomenti, a mio giudizio un ottimo manuale di
     riferimento. Il linguaggio  di facile comprensione, aiutato da
     esempi e parti di codice ben spiegate (da Osvaldo Tulini).

    Witherspoon, Hall, Linux For Dummies, Apogeo.

     Linux For Dummies  al contrario un ottimo testo che spiega, in
     termini semplici e con un ``piglio'' tipicamente da bigino (chi non
     ne ha mai usato uno a scuola?), tutto quello che c' da sapere per
     far funzionare il sistema operativo in maniera decente.  L'utente
     inesperto, che grazie a quel libro riuscir a muoversi da solo nel
     sistema operativo, potr poi approfondire gli argomenti pi
     delicati (da Paolo Besser).

    Linux For Dummies -- Espresso, Apogeo.

     Veloce prontuario per le operazioni pi semplice e frequenti (da
     Fabio).


  9.1.2.  Riviste


  Sono ormai molte le riviste di informatica che hanno una rubrica fissa
  su Linux o che distribuiscono dei CD con materiale Linux; molto spesso
   il metodo pi semplice per venire in possesso di un CD con Linux.

  Non sono abbonato a nessuna di queste riviste, quindi le informazioni
  che sono qui presenti sono, per forza, approssimative; ricevo
  volentieri, quindi, integrazioni.


    Dev, Infomedia <http://www.infomedia.it>.

     Ha una rubrica fissa o comunque pubblica in ogni numero articoli su
     Linux, oltre a CD (da Marco d'Itri).


    Login, Infomedia <http://www.infomedia.it>.

     La rivista esiste da circa due anni e mezzo, e ogni anno pubblicano
     3 cd, di cui uno  sempre dedicato a una distribuzione Linux (da
     Marco Marongiu).

    Computer Programming, Infomedia <http://www.infomedia.it>.

     Spesso sono presenti articoli che trattano problemi di
     programmazione sotto Linux/UNIX.

    MC MicroComputer, Technimedia.

     Da sempre ha avuto ``l'AngoLinux'', ora la rubrica  stata ampliata
     (da Dario Burnelli).

    Computer Shopper.

      in edicola una nuova rivista (COMPUTER SHOPPER, in italiano)
     nella quale scrivo ogni mese una rubrica tutta per Linux (dovrebbe
     partire da zero con l'installazione per trattare via via argomenti
     pi tecnici).

     Se qualcuno l'ha avuta tra le mani, sappia che sono sempre
     interessato a ricevere commenti e soprattutto critiche sui pezzi
     (da Ubi, ubi@srd.it).

    Inter.Net.

     Pubblica spesso CD con distribuzioni Linux e altre cose che  un
     po' difficile reperire altrimenti.

     Volevo annunciare ai linuxiani in ascolto che ho iniziato a...
     scrivere qualcosa sulla rivista ``Inter.Net''. Dal numero di
     dicembre una prodigiosa firma in pi! :-)) (da Roberto Del Bianco)


    IoProgrammo <http://gol.diemme.it/ioprogrammo>.

     Idem a sopra, ogni tanto pubblica CD con materiale Linux.

    PC Inter@ctive, Mondadori Informatica.

     Abbiamo iniziato a dedicare uno spazio fisso a Linux sul nostro
     giornale: un esperimento, vediamo un po' le reazioni dei lettori
     (da Marco Mazzei).

    PC Action, Xenia On Line.

     Scrivo sulle riviste del gruppo Xenia Edizioni da molti anni ormai
     e, dopo mesi di trattative e rimandi, sono finalmente riuscito ad
     ``accaparrarmi'' un po' di spazio su PC ACTION e sul relativo CD da
     dedicare a Linux.

     Ogni suggerimento  ovviamente ben accetto, mandatemelo per favore
     alla casella di posta personale paolone@besser.it (da Paolo
     Besser).



  9.2.  Pubblicazioni online


  All'inizio c'era il nulla. Poi pian piano, i volenterosi, hanno
  cominciato a pubblicare delle FAQ (ovvero a raccogliere le domande
  fatte pi spesso in modo che non siano pi poste...).  Da questo
  stadio poi  partito un vero e proprio ``progetto editoriale'' su
  Linux.

  Ora, dopo parecchi anni, il ``panorama'' editoriale online su Linux 
  ricco e ben organizzato; punto di riferimento  LDP, ovvero Linux
  Documentation Project, il progetto internazionale di documentazione su
  Linux che ha realizzato un grande numero di documenti, dai veloci
  mini-HOWTO, ai seri HOWTO, fino a veri e propri libri come le guide.
  Tutto il materiale LDP  liberamente reperibile in rete. Il sito
  madre, come per molto altro materiale Linux,  sunsite
  <http://sunsite.unc.edu/>. Pi precisamente il materiale  disponibile
  in versione HTML online all'indirizzo  <http://sunsite.unc.edu/LDP/>,
  e negli altri formati all'url
  <ftp://sunsite.unc.edu/pub/Linux/docs/>. Molti siti, anche italiani,
  fanno il mirror di sunsite; ne trovate alcuni in fondo a questo HOWTO.




  9.2.1.  Italian Linux Documentation Project


  Con molta fantasia si chiama ILDP, ovvero Italian Linux Documentation
  Project il progetto, lanciato dal gruppo Pluto, di tradurre gli HOWTO.
  Partiti da questa idea iniziale, si  poi fatto molto di pi arrivando
  a tradurre le guide e perfino a creare dal nulla ottima
  documentazione.


    Sono stati tradotti un buon numero di HOWTO e ormai si  nella fase
     di ``mantenimento'' del materiale tradotto.  Il progetto ILDP
     comunque cerca volontari per tradurre e mantenere aggiornati gli
     HOWTO.

     Se vuoi collaborare, contatta il coordinatore Giovanni Bortolozzo
     (borto@pluto.linux.it).

    Sono state tradotte una quantit consistente di manpage, e anche
     qui si  ormai nella fase di mantenimento, almeno per quanto
     riguarda le sezioni ``critiche'' (1, user commands).

     Anche qui se vuoi collaborare contatta Alessandro Rubini
     (rubini@pop.systemy.it).

    Sono state tradotte la Guida dell'Utente
     <http://www.pluto.linux.it/ildp/guide/GuidaUtente> e si sta
     lavorando sulle altre guide, che trovate su
     <http://www.pluto.linux.it/ildp/guide>.

     stata creato ex-novo ``AppuntiLinux''.

  Per collaborare puoi inoltre iscriverti alle ``liste di discussione'',
  in particolare ``it'' e ``pluto-ildp''.

  Tutto il materiale tradotto  reperibile online all'indirizzo
  <http://www.pluto.linux.it/ildp/> e negli altri formati all'indirizzo
  <ftp://ftp.pluto.linux.it/pub/ildp/>, o comunque in uno dei numerosi
  mirror di questo sito che stanno nascendo come funghi.



  9.2.2.  AppuntiLinux


  AppuntiLinux <http://www.pluto.linux.it/ildp/AppuntiLinux/index.html>
   un ottimo esempio di documentazione autoprodotta, e rappresenta un
  testo da consigliare vivamente a chi si avvicina per la prima volta a
  Linux, visto che si configura come un ``corso'' che aiuta a muovere i
  primi passi in Linux.

  Potete trovare AppuntiLinux negli altri formati
  <ftp://ftp.pluto.linux.it/pub/ildp/AppuntiLinux> a questo URL.



  9.2.3.  Riviste/fanzine


  Sono riviste elettroniche (fanzine, da fan+magazine, giornaletti
  autoprodotti ``in casa'') di ottima qualit (mediamente), e alcune con
  una consolidata tradizione alle spalle.


    PLUTO Open Journal, Pluto User Group.

     Il PLUTO Open Journal  una rivista interamente in italiano e
     completamente gratuita. La rivista tratta argomenti inerenti Linux
     ed  completamente fatta da volontari di tutta Italia.

      consultabile on-line all'indirizzo URL:
     <http://www.pluto.linux.it/journal> e tutti i mirror PLUTO.  
     reperibile anche in versione .tar.gz per una comoda lettura off-
     line all'url  <ftp://ftp.pluto.linux.it/pub/pluto/journal> oppure
     (con una settimana di ritardo ;) in f'req al nodo FidoNet
     2:333/1016 (con estensione .tgz invece che .tar.gz per
     compatibilit con i sistemi DOS.

    Linux Gazette Edizione Italiana, LUGBari.

     LGEI, come tradisce il nome,  una fanzine su Linux in italiano che
     contiene per la maggior parte (ma non solo) articoli che sono una
     traduzione di quelli della Linux Gazzette statunitense.

      reperibile all'URL  <http://www.officine.it/lgei/>.

    LinuxFocus.

     All'URL  <http://mercury.chem.pitt.edu/~angel/LinuxFocus> potete
     trovare l'edizione italiana del magazine on-line ``LinuxFocus'' (da
     Seipse).

    AscoLinux Journal, LUG Ascoli.

     Il LUG Ascoli ha pubblicato sul Web il proprio giornale all URL
     <http://www.rinascita.it/ascolinux>.  Trattasi di AscoLinux
     Journal, una raccolta di articoli scritti in maniera molto
     ``leggera'' (con contenuti elementari, direi) da noi per far
     avvicinare i concittadini alle iniziative del LUG.  L'idea che
     vogliamo realizzare  quella di fare in modo che la gente, anche se
     non esperta di informatica, possa capire che cosa  possibile fare
     con linux, e in che modo si pu fare!

    LinuxValley Journal, LinuxValley.

     Altra fanzine, nata dallo scisma all'interno di LGEI;  reperibile
     all'URL  <http://www.linuxvalley.com/lvj>.






  9.3.  Distribuzioni in italiano


  Ebbene s, si pu cominciare a parlare di distribuzioni in Italiano!!!

  Ma sfogo la mia amarezza dicendo che solo Debian ha un approccio
  ``serio'' alla localizzazione di una distribuzione...  Mentre Debian
  ha creato un gruppo per l'internazionalizzazione e da questo dei
  gruppi locali uno per ogni lingua, e sta cercando di fornire una
  localizzazione completa (programma di installazione, documentazione,
  cataloghi dei programmi, vocabolario per ispell, ...) le distribuzioni
  commerciali spesso considerano ``distribuzione in Italiano'' una
  distribuzione in inglese, con localizzazione mancante o non
  funzionante, il programa di installazione con le descrizioni dei
  pacchetti in italiano e un manuale (sempre di installazione) in
  italiano.

  Contando che tutto il materiale italiano inserito in Debian  PLUTO o
  GNU, non c' scusante a questa, per me barbara, politica...


    Slackware, Infomagic <http://www.infomagic.com/>.

     pubblica in Italia un cofanetto con dei CD che ha la copertina in
     Italiano, e mi sembra il (breve) manualetto di installazione
     all'interno pure.  Non so che cosa ci sia in italiano oltre a
     queste cose, e chiedo conferme.

    Debian, Debian <http://www.debian.org/>.

     Oltre alla Debian ``pulita'', che gi contiene molte cose in
     Italiano (manpage, gli HOWTO, i PlutoJournal e il vocabolario per
     ispell), da una collaborazione tra ProSA S.r.L
     <http://www.prosa.it> e Athena S.r.L <http://www.mondolinux.com> 
     nata ``Athena Debian 2.0 Linux - powered by ProSA'', una Debian 2
     con installazione parzialmente semplificata e in italiano, che
     verr commercializzata con una copia su carta degli
     ``AppuntiLinux''.

     Per maggiori informazioni fate riferimento ai due URL qui sopra.

    Caldera, Caldera Inc. <http://www.caldera.com/>.

     tra poco dovrebbe uscire una versione di Caldera Open Linux Base
     con installazione e manuale in italiano, e tra un po' dovrebbe
     essere prodotto un corso interattivo (tutorial) in italiano.

    SuSE, SuSE <http://www.suse.com/>.

     Dopo la mitica Debian Pluto in Italiano  uscita la prima
     distribuzione commerciale in Italiano si tratta della ormai famosa
     SuSE 5.2 (falso, la prima  la Caldera, ndr).  Mi  arrivata ieri e
     ho prontamente installato, naturalmente il supporto italiano 
     limitato all'installazione e al sistema di gestione denominato
     Yast. Ci sono dei curiosi errori di traduzione, ma mai quanti
     quelli di sistemi pi blasonati quali AIX (hard disk = disco duro
     :-) (da Gabriele Paciucci).

     Ha un manuale in Italiano un po' ridotto (spiega l' installazione e
     poco altro), e poi c' la guida completa in Inglese che ti spiega
     tutti i perch e i per come. (da un anonimo S.u.S.E. Linux 5.1
     User).

    Red Hat, Red Hat Italia <http://www.redhat.it>.

     Ho dato un occhiata ieri sera all'installazione (sto aspettando un
     secondo PC per installarla): anche il setup  in inglese, devo dire
     che la guida all'installazione (cartacea)  tradotta piuttosto bene
     e  sembra esserci proprio tutto, un grosso aiuto soprattutto per
     chi ci si avvicina per la prima volta. (da Michele Ferritto)

     A una ispezione approfondita (grazie Ottavio Rizzo!) risulta che
     hanno tradotto il manuale di installazione e le descrizioni dei
     pacchetti, oltre ad aver integrato catalogues e HOWTO.

     Mancano stranamente manpage e vocabolario italiano di ispell.



  9.4.  Altro materiale in Italiano



  9.4.1.  Fortune in Italiano


  Esiste una collezione di ``fortune'' in italiano; le fortune sono
  frasi che vengono stampate automaticamente nella fase di login dal
  programma fortune(1).

  Maggiori informazioni si possono avere al sito
  <http://www.pluto.linux.it/~zuse/fortune.it> o scrivendo all'autore
  Andrea `Zuse' Balestrero <mailto:zuse@pluto.linux.it>.



  9.4.2.  Linux FAQ


  Con questa guida mi propongo di riunire all'interno di un unico
  documento in Italiano, informazioni che possano essere utili a coloro
  che vogliono avvicinarsi a questo ottimo sistema operativo e nello
  stesso tempo fornire delle notizie che possano essere utilizzate dai
  system integrator per giustificare la scelta di Linux all'interno di
  un'azienda.

  Una versione pi o meno aggiornata di questa guida  disponibile nei
  newsgroup it.faq e it.comp.linux e su
  <http://www.pluto.linux.it/ildp/FAQ> (da Marco Iannacone).




  10.  Linux in Italia



  Questo spazio vuole essere un tentativo di censimento della realt
  Linux in Italia, un tentativo perch questa  una realt in
  velocissimo movimento...


  10.1.  Associazioni, gruppi di utenti


  Il mondo Linux in Italia sta subendo una crescita impressionante, cosa
  che stupisce anche noi che... in queste cose ci crediamo!

  Oltre a ILS (che  una associazione vera e propria, con statuto,
  assemblea e quota associativa) e il PLUTO (che  il gruppo pi noto e
  attivo, gruppo che coordina le ``traduzioni'' e pubblica il
  ``PlutoJournal'' tra le altre cose...)  esistono una miriade di LUG
  locali sparsi per tutta Italia...


  10.1.1.  PLUTO


  Il Pluto, definito ricorsivamente come ``Pluto Linux/Lumen Utentibus
  Terrarum Orbis'',  nato nel 1992 per iniziativa di alcuni studenti e
  professori di Informatica dell'Universit di Padova.

  Da allora il Pluto  cresciuto in maniera esponenziale estendendosi su
  tutto il territorio nazionale ed oltre, e costituisce il pi grande e
  attivo LUG (Linux User Group) di lingua Italiana.

  Lo scopo del Pluto  di diffondere l'uso del Sistema Operativo Linux
  attraverso l'opera volontaria e non retribuita dei suoi membri/soci.
  Per conseguire il suo scopo, il Pluto:


    Sostiene e diffonde lo sviluppo del Software Free e della sua
     filosofia.

    Produce, traduce e diffonde la documentazione di Linux in lingua
     Italiana.

    Promuove corsi, dimostrazioni e manifestazioni per favorire la
     conoscenza di Linux.

  Ogni utente di Linux, senza restrizioni alcune, che si impegni a
  partecipare attivamente allo scopo del Pluto, diviene per questo
  membro del Pluto.

  Il Pluto  una organizzazione ``virtuale'' che vive in uno o pi siti
  connessi a Internet.  La comunicazione tra i membri avviene
  primariamente attraverso i mezzi elettronici messi a disposizione
  dalla sede, il newsgroup Usenet it.comp.linux.pluto, le mailing list
  pluto-*, canali IRC, pagine del World Wide Web, ecc.

  Maggiori informazioni possono essere reperite alle pagine ufficiali
  del PLUTO all'indirizzo  <http://www.pluto.linux.it/>.



  10.1.2.  ILS


  ILS  un'associazione culturale senza fini di lucro, che ha fra i suoi
  scopi primari la diffusione della cultura informatica in tutte le sue
  forme, con una particolare attenzione per il mondo del free software
  in generale e del software che viene rilasciato sotto la GNU General
  Public License.  ILS  composta da tutti coloro che volontariamente e
  senza percepire alcun profitto mettono a disposizione il proprio
  tempo, le proprie capacit e le proprie risorse al fine di realizzare
  una comunit virtuale basata sulla cultura informatica/telematica. ILS
  offre ai Soci i servizi di Internet e-mail e Usenet News, che sono
  compresi nella quota associativa annua di Lire 50.000.  Per maggiori
  informazioni chiamare la BBS della ILS al numero 019-862349, oppure
  mandare una mail a info@linux.it.

  Si pu anche fare riferimento per maggiori informazioni a
  <http://www.linux.it/>.





  10.1.3.  Altri LUG locali


  Esiste la mappa italiana dei LUG <http://www.linux.it/LUG>, ovvero
  delle pagine che contengono riferimenti a tutti i LUG nati qua e la in
  Italia.

  Consiglio a tutti quelli che hanno creato un LUG, o che ne hanno
  l'intenzione, di chiedere al manutentore (Lindo Nepi,
  ascoli@ascu.unian.it) di essere aggiunti a questa mappa.  Consiglio
  inoltre di iscriversi alla lista ``nuovi-lug'' per il coordinamento
  tra LUG e per lo scambio di esperienze, trovate le informazioni nella
  sezione dedicata alle ``liste di discussione''.




  10.2.  Aree di discussione pubbliche




  10.2.1.  Newsgroups




     comp.os.linux*
        Ovvero I newsgroup su Linux. Ultimamente sono diventati
        supertrafficati, e la qualit non  esaltante (per la maggior
        parte si cercano rimedi per qualche pezzo di hardware che non
        funziona). Da seguire assolutamente comp.os.linux.announce, che
        ``lancia'' tutti i nuovi software per linux.


     it.comp.linux
        Newsgroup italiano ufficiale su Linux. Valgono i discorsi fatti
        per la precedente gerarchia, con l'aggiunta della disponibilit
        tutta italiana (e in italiano) ad aiutare chi si affaccia per la
        prima volta nel grande mondo Linux.


     it.comp.linux.pluto
        Gli argomenti trattati dovrebbero essere attinenti a tutto ci
        che riguarda il gruppo PLUTO.


     it.comp.linux.setup
        Discussioni sulla configurazione e installazione di un sistema
        Linux.


     it.comp.linux.annunci
        Annunci importanti per la comunit Linux italiana.




  10.2.2.  Mailing List


  Le mailing list sono dei luoghi virtuali in cui  possibile
  confrontarsi e discutere, un po' come i newsgroup. Quello che
  veramente li distingue da questi  il fatto che  possibile avere un
  controllo pi stringente sull'accesso, e quindi evitare maggiormente
  il rumore di fondo.
  Per iscriversi a queste liste  sufficiente mandare un messaggio
  all'utente ``majordomo'' dell'indirizzo a cui appartengono le liste e
  inserire nel corpo del messaggio una riga con:


  ______________________________________________________________________
          subscribe nomelista email
  ______________________________________________________________________



  dove ``nomelista''  il nome della lista (quello che c' a sinistra
  del simbolo ``@''), e ``email'' il vostro indirizzo email.




     pluto-amiga@pluto.linux.it
        Linux e m68k, ovvero Linux su Mac, Atari, Amiga...


     pluto-arch@pluto.linux.it
        coordinamento progetti amiga, i386 e Sparc.


     pluto-devel@pluto.linux.it
        i Pluto Developers, ovvero lista in cui si discute sul free
        software e si sviluppa free software.


     pluto-fido@pluto.linux.it
        Linux e il mondo della FidoTech, ovvero come mettere su una BBS
        sotto Linux e conquistare il mondo (della FTN); ora questa lista
         in gate con le ECHO UNIX_BBS.ITA (FidoNet) e P_PLFTN (PNet).


     pluto-humor@pluto.linux.it
        per discussioni poco serie.


     pluto-i386@pluto.linux.it
        Linux su macchine PC, per ora discussioni su cosa far fare al
        proprio PC con linux...


     pluto-ildp@pluto.linux.it
        maliling list ufficiale del progetto ``ILDP''; occorre
        iscriversi a questa lista se si ha l'intenzione di tradurre
        qualche HOWTO o documento simile.


     pluto-journal@pluto.linux.it
        lista di coordinamento/redazione virtuale del ``Pluto Open
        Journal''


     pluto-meeting@pluto.linux.it
        per organizzare il meeting pluto.


     pluto-ong@pluto.linux.it
        Linux on the world, ovvero linux come strumento di networking a
        basso costo per i PVS.



     pluto-sparc@pluto.linux.it
        Linux su Sparc.


     pluto-soci@pluto.linux.it
        per tutti i soci pluto; questa lista  volutamente diffusa sotto
        altre forme in diversi net amatoriali e anche altro per
        permetterne la massima accessibilit.


     pluto-scical@pluto.linux.it
        Linux e calcolo scientifico.


     it@li.org
        lista per l'Italia del progetto ``Linux  International'';
        occorre iscriversi qui se si ha l'intenzione di tradurre qualche
        catalogo di messaggi, oppure qualche programma GNU.


     ispell-it@arci01.bo.cnr.it
        lista per la produzione di un vocabolario in italiano per
        ``ispell''.


  Per queste altre, che utilizzano il software SmartList, occorre invece
  mandare un messaggio all'indirizzo della lista con un ``-request''
  aggiunto prima del segno ``@'', e inserire nel corpo del messaggio una
  riga con un semplice:


  ______________________________________________________________________
          subscribe
  ______________________________________________________________________





     scuola@linux.it
        Linux e il mondo della scuola.


     com@linux.it
        Linux e il mondo commerciale. Questa mailing list  per tutte le
        ditte che vendono prodotti per Linux, consulenza su Linux,
        sistemi Linux e cose simili.


     linux-isp@linux.it
        Uso di Linux da parte di provider e simili.


     debian-it@linux.it
        doppione locale della precedente.


     nuovi-lug@linux.it
        Lista di coordinamento tra i LUG Italiani, e non solo per quelli
        nuovi (come sembra dire il nome).


     ppc@lists.linux.it
        Linux per la piattaforma PowerPC (linuxppc e mklinux).


     debian-italian@lists.debian.org
        lista ufficiale degli utenti Debian italiani.


     linux-italia@lists.cosmos.it
        Lo spirito della Mailing List  molto differente dal solito
        accademico ``RTFM'' (Read The Fucked Manual): a ogni domanda una
        risposta. Chi non sa chiede, chi sa mette a disposizione degli
        altri le proprie conoscenze.


  Infine per queste occorre mandare un messaggio all'utente ``listserv''
  del dominio a cui appartengono le liste e inserire nel corpo del
  messaggio una riga con:


  ______________________________________________________________________
          subscribe nomelista Nome Cognome
  ______________________________________________________________________



  dove ``nomelista''  il nome della lista (quello che c' a sinistra
  del simbolo ``@''), e ``Nome Cognome'' il vostro nome e cognome.



     linux-it@nis.garr.it
        Mailing list generale su linux.



  10.2.3.  FidoNet


  FidoNet  la mamma di tutte le reti in tecnologia (appunto) FidoNet,
  ed  la pi grossa rete amatoriale oggi esistente; veicola delle aree
  di discussione che sono, ai fini pratici, equivalenti ai newsgroup
  come tecnologia, ma molto pi simili alle mailing list come qualit
  dei contenuti.

  Per maggiori informazioni vi rimando a  <http://www.fidoitalia.net/>
  oppure alle aree locali di ogni buona BBS.



     UNIX.ITA
        L'area UNIX.ITA tratta di tutto quello che riguarda i sistemi
        operativi *IX, sia come filosofia generale che come applicazione
        a sistemi particolari, compresi - ma non limitati a - AIX, A/UX,
        Coherent, ESIX, Interactive, Linux, Minix, NetBSD, SCO-UNIX,
        SunOS, Ultrix, Xenix.  tollerato anche parlare dei vari
        pacchetti software che storicamente sono associati all'idea di
        ``ambiente aperto'', e che sono disponibili in sorgente, come ad
        esempio i programmi GNU. In via sperimentale,  permesso parlare
        di programmazione di rete Unix (leggasi socket, RPC e simili).
        L'area UNIX.ITA non tratta di TeX (esiste l'area TEX.ITA al
        proposito) e soprattutto non tratta di ``Internet at large'' e
        affini.  Per queste tematiche esiste l'area COMMS_RETI.ITA. Si
        invitano gli abituali frequentatori di UNIX.ITA a non rispondere
        in quest'area ai messaggi di questo genere: molto meglio una
        risposta in matrix comprendente anche l'invito a linkare l'altra
        area in questione. La parte di Internet che riguarda l'area
        comprende essenzialmente i server http (non i lettori) e i
        protocolli http, ftp e simili (non HTML).

        Moderatore:     Marco d'Itri, Fidonet: 2:332/206.10, md@linux.it



     TEX.ITA
        I temi della conferenza sono il linguaggio per la creazione di
        documenti TeX (con l'estensione LaTeX) ed il linguaggio per la
        creazione di font METAFONT, che a TeX  direttamente correlato.
        SGML, che , a titolo sperimentale, ammesso come tema di
        discussione in area (HTML escluso a meno di autorizzazione) e
        sulla possibilit di discutere di applicazioni correlate a
        (La)TeX, ad esempio AUC TeX e cos via.

        Moderatore:     Paolo Cascini, FidoNet: 2:332/101.12,
        laurgeo@udini.math.unifi.it



     COMMS_RETI.ITA
        Qui si tratta di reti geografiche e metropolitane, dei loro
        contenuti, strumenti protocolli e modalit di accesso.
        L'argomento pu portare facilmente, data la natura della
        principali di queste reti, Internet, a parlare di sistemi UNIX.
        Si ricorda che per questo argomento esiste un'area nazionale
        apposita.  Anche per la discussione sulle reti locali esiste
        un'altra area dedicata. Si invitano gli utenti a scrivere qui
        solo di reti geografiche e metropolitane e a spostare in matrix
        ogni comunicazione non attinente il soggetto della conferenza
        (ringraziamenti, saluti, insulti e divagazioni). Qualora un
        nuovo utente ponga una domanda a cui si  gi pi volte risposto
        in area o/e di cui si ritiene nota ai frequentatori la risposta,
        si prega di soddisfarne la richiesta in matrix e di inviare,
        sempre per questa via, copia della risposta al moderatore che
        provveder a inserirla nelle FAQ dell'area ( un buon
        proposito).

        Moderatore:     Federico Baraldi, Fidonet: 2:332/414.6,
        Federico.Baraldi@p6.f414.n332.z2.fidonet.org


     PLUTO.ITA
        I Plutini in FidoNet.

        Questa lista vuole essere punto di incontro dei soci PLUTO in
        FidoNet, ed infatti  posta in gateway con la lista pluto-soci.


     UNIX_BBS.ITA
        Linux alla conquista delle BBS

        Quest'area, dopo la fusione con la lista pluto-fido, dovrebbe
        diventare luogo privilegiato dove studiare nuove soluzioni
        software basate su Linux e software Open Source per le nostre
        care BBS/Gate, senza chiaramente rinunciare a tenere sottocchio
        quello che accade tutto intorno.

        Moderatore:     Io ;)


     LINUX_BBS
        Linux alla conquista delle BBS (internazionale).

        Idem a sopra, solo che quest'area  internazionale, e sta gi
        producendo FAQ a manetta.


     LINUX
        International LINUX Conference.

        Area internazionale ufficiale su Linux. Niente di speciale, a
        parte il fatto che si leggono i messaggi provenienti da Sud
        America e Giappone qualche settimana dopo che sono stati
        spediti...


     UNIX
        International UNIX Conference.

        Idem a sopra.


     SPUTNIK.500
        Area del LUG Siciliano.

        Area locale all'HUB 500 (Sicilia) su Linux creata appositamente
        come area di supporto per il gruppo SPUTNIK.




  10.2.4.  PNet


  Rete ``alternativa'' a FidoNet, pi piccola ( solo nazionale) ma non
  meno tecnicamente preparata.

  Per maggiori informazioni vi rimando a  <http://www.retepnet.it/>.




     P_UNIX
        Linux, Unix e affini.

        Discussioni sul sistema operativo Linux (software, hardware,
        compatibilit, sorgenti, etc) e confronto con altri sistemi
        operativi Unix-like


     P_PLUTO
        PLUTO in PNet.

        Gate con la mailing lists pluto-soci.


     P_PLFTN
        PNet, PLUTO e le BBS UNIX.

        Gate con la mailing lists pluto-fido.





  10.2.5.  EuroNet




     COMEON_LINUX.ITA
        Area di supporto ComeOn Linux!

        Per i suoi attivisti e per quanti vogliano collaborare.





  10.2.6.  PeaceLink


  Rete amatoriale ecopacifista, membro APC.  Per maggiori informazioni
  si pu vedere  <http://www.peacelink.it/>.




     PCK.PUB.PEACELINK_ARC
        Supporto tecnico PeaceLink.

        non  proprio un'area dedicata a Linux, ma  l'area di supporto
        tecnico tra gli utenti di PeaceLink e Linux  il sistema
        operativo ufficiale di rete e associazione PeaceLink.




  10.2.7.  ScoutNet


  Rete del movimento scout mondiale, maggiori informazioni si possono
  trovare al sito  <http://www.scoutnet.org/>.



     LINUX.GSI
        Il Gruppo Sperimentazione Informatica e Linux.

        Area del GSI per le discussioni sull'applicazione di Linux nelle
        attivit scout.




  10.2.8.  Rete packet AX25


  Il sistema operativo Linux  molto apprezzato nell'ambiente
  radioamatoriale in quanto utilizzato per far funzionare molti gateway
  tcp/ip che collegato la rete ax25 ham con la rete Internet.  Sulla
  rete radioamatoriale esistono delle aree ``Linux'' nelle quali
  confluiscono tutti i messaggi con indirizzo linux@ita linux@eu e
  linux@ww (da Valter Bruno, ik1qew).



  10.2.9.  IRC


  Se siete interessati a Linux, se lo conoscete abbastanza bene, molto
  bene o volete trovare un aiuto, se usate IRC, siete invitati a
  intervenire nel canale #linux-it di IRCNet.  Sono bene accetti utenti
  di qualsiasi livello, sia per dare che per ricevere informazioni in
  tempo reale (ottimo quando avete un problema urgente).  Pi persone ci
  sono, pi probabilit c' di trovare chi d risposte (da Enrico
  Cherubini).


  Ora il canale #linux-it ha anche un URL, ovvero
  <http://members.tripod.com/~DarkServer>.


  10.2.10.  Meeting




     Pluto Meeting
        Pi o meno due volte l'anno i Plutiani si ritrovano a parlare
        dei loro progetti e delle loro ambizioni. Almeno una di queste
        due riunioni  aperta a tutti, viene organizzata con tanto di
        conferenze e dimostrazioni e viene pubblicamente annunciata nei
        soliti canali.

        Ottimo punto di riferimento   <http://meeting.pluto.linux.it/>.




  10.3.  Siti Linux



  10.3.1.  Siti internet



    <ftp://tsx-11.mit.edu/pub/linux>

     Casa madre di buona parte del software Linux, amichevolmente
     chiamato semplicemente ``tsx''.


    <ftp://sunsite.unc.edu/pub/Linux>

     Idem come sopra, in pi sunsite rappresenta il sito dove guardare
     per primo se si va a caccia di informazioni e documentazione, anche
     questo chiamato ``sunsite'' e basta (basta la parola ;).


    <ftp://ftp.funet.fi/pub/linux>

     Uno dei pi grandi siti ftp al mondo, mirror di tante cose tra cui
     sunsite, tsx e casa madre dei kernel di Linux.

    <ftp://ftp.pluto.linux.it/>

     Casa madre di tutto quello prodotto dal gruppo Pluto, in
     particolare aggiornamenti della documentazione tradotta in italiano
     e Pluto Journal.

    <ftp://ftp.linux.it/>,  <ftp://svpop.com.dist.unige.it/>

     Casa madre di ILS, correntemente mirror completo di Debian e di
     molte altre cose relative a Linux, soprattutto relative all'uso di
     Linux in ambiente FTN (Ifmail-HOWTO e compagnia).


    <http://gnu.linux.it>

     Mirror italiano ufficiale di  <http://www.gnu.org>.



    <ftp://cnuce_arch.cnr.it/pub/Linux>

     Mirror ufficiale italiano di sunsite.


    <ftp://ftp.lnf.infn.it/packages/Linux/>

     Il sito dell'INFN che tra l'altro  mirror italiano di SuSE.



  10.3.2.  BBS



    OneWay BBS, +39 02 4491062, v.32bis,v.42bis, Milano, Fidonet
     2:331/333, Virnet

    DOC!, +39 041 5905472, ZyXEL19.2k,V.32b,V.42b, Mogliano Veneto
     (TV), Fidonet 2:333/704

    Sierra BBS, +39 06 39721568, ZyXEL19.2k,V.32b,V.42b, Roma, Fidonet
     2:335/336

    Aloha BBS, +39 0923 546164/7, V.32bis, V.42bis, Trapani, Fidonet
     2:335/519, MultiMediaNet

    Pappaconda on-line, +39 051 6233671, Zyxel 19.200, Bologna, Fidonet
     2:332/424

    ILS BBS, +39 019 862349, V32bis,V42bis, Savona, Internet (E-Mail,
     News)

     Praticamente la versione BBS di svpop.

    XCalBr8 BBS, +39 0535 780191 Fidonet 2:332/521 Sysop Andrea
     Baldoni.

     File per sysadm, sorgenti di dosemu60, doom, driver per Gravis,
     patch del kernel, sorgente completo del kernel.

    Eko BBS, +39 06 5215306, V.32bis, V.42bis, Roma, Fidonet  2:335/374

     Files: Slackware (Agosto95), Howto, LDP...

    cmb2000 BBS, +39 0332 820009, v.32bis, v.42bis, Varese
     Fidonet 2:331/134

     Files: Linux Slackware 3.0, IfMail-HowTo, MIT Sources, VuBbs.


    Universal Mind BBS, +39 0434 561305 , V.34+, Pordenone, Fidonet
     2:333/1016, Pnet 91:13/1, PeaceLink 61:3917/1, ScoutNet
     1907:393/104, Sysop Marco Gaiarin.

     Mirror (?!) di tutto quello prodotto per il PLUTO (soprattutto
     Pluto Journal), vario altro. Magic f'req ``PLUTO'' per la lista
     files Linux (appena implemento i magic! ;).

    Car Systems Service '93 BBS, +39 085 4492408, Creatix SG 2834,
     Montesilvano PE, Fidonet 2:335/626, Euronet 230:1027/0, VirNet
     9:395/0, Intelec Network 239:102/0, RIME 900:310/0, Eagle's Nest
     Network 145:1/0, IFDNet 14:5004/103, OS2Net 81:439/68, SysOp
     Stefano Brandimarte,

     Sorgenti del kernel costantemente aggiornati, patch, dosemu,
     XFree86, librerie e applicazioni varie.

































































  Java CGI HOWTO
  di David H. Silber dhs@orbits.com
  v0.4, 18 Novembre 1996

  Questo HOWTO spiega come configurare il vostro server per accogliere
  programmi CGI scritti in Java e come utilizzare Java per scrivere pro
  grammi. Nonostante gli HOWTO abbiano come obiettivo l'utilizzo di
  Linux come sistema operativo, questo documento si rivolge a tutti gli
  utilizzatori indipendentemente dalla versione di unix usata.  La
  traduzione italiana  stata curata da Luca Rossetti (lukaros@tin.it).

  1.  Introduzione

  A causa del metodo con cui Java  stato scritto, il programmatore non
  ha un accesso molto semplice alle variabili d'ambiente del sistema.
  Inoltre, per le modalit con cui il Java Development Kit (JDK)  stato
  costruito, per lanciare un programma  necessario utilizzare segnali
  multipli, cosa che non si addice molto alla metodologia di operazioni
  dello standard HTML forms/CGI.  Esistono vari metodi per eliminare
  queste limitazioni, ed io ho implementato uno di questi.  Il seguito
  di questo documento ne spiega tutti i dettagli.




  1.1.  Conoscenze necessarie

  Si assume che abbiate una conoscenza generale del linguaggio HTML e
  dei concetti legati al CGI e almeno una minima conoscenza del vostro
  server HTTP.  Dovreste anche conoscere la programmazione in Java o
  molto di quanto leggerete non avr granch senso.




  1.2.  Dove trovare questo Documento

  La versione pi recente di questo documento si pu trovare presso
  http://www.orbits.com/software/Java_CGI.html.




  1.3.  Il Pacchetto Software

  La versione pi recente del pacchetto software descritto pu essere
  scaricata mediante FTP anonimo presso
  ftp://ftp.orbits.com/pub/software/java_cgi-0.4.tgz.La distribuzione
  del pacchetto include anche un sorgente SGML di questo documento.

  Il pacchetto  distribuito nei termini della GNU Library General
  Public License.  Questo documento pu essere distribuito nei termini
  della nota di copyright degli HOWTO di Linux.

  Se utilizzate questo software, rendete disponibile un collegamento
  alla pagina http://www.orbits.com/software/Java_CGI.html, cosicch
  altre persone possano trovare le classi CGI Java.




  1.4.  Inserzione senza Pudore

  Questo documento vi proposto viene grazie a Stellar Orbits Technology
  Services.  (Visitate il nostro sito http://www.orbits.com/ per vedere
  di cosa ci occupiamo.)
  2.  Come Configurare il Vostro Server per lanciare Programmi Java CGI
  (con Spiegazioni)

  Questa sezione vi guider nella installazione dei miei pacchetti Java
  CGI con spiegazioni approfondite per farvi capire quali siano gli
  effetti di tutte le vostre azioni. Se volete solo installare i
  programmi e non vi interessano tutti i motivi ed i perch, saltate
  alla sezione ``Come Configurare il Vostro Server per lanciare
  Programmi Java CGI (forma abbreviata)''.




  2.1.  Requisiti di Sistema

  Questo software dovrebbe funzionare su un qualsiasi web server unix-
  like che ha il Java Development Kit installato. Io lo utilizzo su un
  sistema con Debian Linux che usa apache come demone HTTP. Se non
  dovesse funzionare sul vostro server, contattatemi presso
  dhs@orbits.com.

  Sfortunatamente, l'interprete run-time di Java sembra essere veramente
  ingordo di memoria -- potreste avere la necessit di installare
  qualche altro megabyte di RAM nel vostro server se vorrete usare
  estensivamente le capacit dei programmi Java CGI.




  2.2.  Il Software Add-On di Java CGI

  Il software di cui ho scritto il codice  chiamato Java CGI.  Potete
  scaricarlo dal sito ftp:
  ftp://www.orbits.com/pub/software/java_cgi-0.4.tgz.  (Il numero della
  versione potrebbe essere cambiato).




  2.3.  Come decomprimere il Pacchetto Sorgente

  Scegliete opportunamente una directory per decomprimere il pacchetto.
  (Se non avete ancora fissato un posto standard in cui installare i
  pacchetti software, suggerisco di utilizzare /usr/local/src.)  Per
  decomprimere il file contenente la distribuzione si utilizza il
  seguente comando:

  gzip -dc java_cgi-0.4.tgz | tar -xvf -


  Questo comando creer una directory chiamata java_cgi-0.4. All'interno
  di questa directory troverete tutti i file a cui far riferimento nel
  resto del documento.  (Se il numero della versione  cambiato, consul
  tate le istruzioni contenute nella distribuzione per continuare
  l'installazione).




  2.4.  Le Directory di Installazione

  A questo punto dovete decidere dove volete che i vostri programmi Java
  CGI risiedano.  Generalmente si mettono in una directory in parallelo
  con la directory cgi-bin.  Il mio server apache  configurato per
  usare /var/web/cgi-bin come directory cgi-bin, per cui uso
  /var/web/javacgi come la directory in cui inserire programmi Java.
  Probabilmente  meglio non mettere i vostri programmi Java CGI nelle
  directory esistenti nel CLASSPATH.  Modificate il Makefile per fare in
  modo che esso che si adatti alla configurazion del vostro sistema.
  Come root lanciate make install.  Questo compiler i programmi Java,
  modificate lo script java.cgi per fare in modo che si adatti al vostro
  sistema ed installi i programmi nei posti giusti.  Se invece volete
  avere la versione HTML di questo documento e una pagina HTML di test
  in aggiunta, lanciate make all.




  2.5.  Come Testare l'installazione.

  Assieme alla distribuzione trovere dei documenti HTML chiamati
  javacgitest.html, javaemailtest.html e javahtmltest.html.  Se avete
  installato tutto con make all come menzionato nella sezione
  precedente, i documenti saranno nella directory che avete specificato
  come WEBDIR nel Makefile.  Se non lo avete fatto, potrete lanciare
  make test per costruirli da javacgitest.html-dist, javaemailtest.html-
  dist e javahtmltest.html-dist.

  Quando siete sicuri che la vostra installazione sia andata a buon
  fine, potrete decidere se rimuovere CGI_Test.class, Email_Test.class e
  HTML_Test.class dalla vostra directory JAVACGI e javacgitest.html,
  javaemailtest.html e javahtmltest.html dalla vostra directory WEBDIR
  visto che essi mostrano alcune informazioni relative all'utente che
  sono normalmente disponibili solo al server.




  3.  Come Configurare il Vostro Server per lanciare Programmi Java CGI
  (forma abbreviata)


    Scaricate il pacchetto Java CGI dal sito ftp
     ftp://www.orbits.com/pub/software/java_cgi-0.4.tgz.  (Il numero
     della versione potrebbe essere cambiato).

    Decomprimete il file contenente la distribuzione utilizzando il
     comando:

     gzip -dc java_cgi-0.4.tgz | tar -xvf -


  (Se il numero della versione  cambiato, consultate le istruzioni con
  tenute nella distribuzione per continuare l'installazione).

    Controllate il contenuto del Makefile che troverete all'interno
     della directory java_cgi-0.4 appena creata e modificatelo
     opportunamente per il vostro sistema.

    Come root, lanciate make install.  Questo comando compiler i
     programmi Java, applicher le informazioni che avete specificato
     per il vostro sistema ed installer tutti i file.  Se invece
     desiderate consultare la documentazione in formato HTML e visionare
     un documento HTML di test, lanciate make all.

    Giunti a questo punto dovreste essere pronti per iniziare.






  4.  Come Eseguire un Programma Java CGI





  4.1.  Ostacoli quando si lanciano Programmi Java sotto il Modello CGI

  Esistono due problemi principali nel lanciare un programma Java da un
  server Web:




  4.1.1.  Non si possono lanciare programmi Java come normali
  eseguibili.

  Bisogna lanciare l'interprete run-time di Java e fornire la classe
  iniziale (programma da eseguire) in linea di comando.  Con un form
  HTML, non esiste nessuna precauzione nell'inviare una linea di comando
  al server web.




  4.1.2.  Con Java non si ha un accesso generale alle variabili d'ambi
  ente.

  Ogni variabile d'ambiente necessaria al programma Java deve essere
  passata esplicitamente.  Non esiste un metodo simile alla funzione C
  getenv().




  4.2.  Superare i Problemi lanciando Programmi Java CGI

  Per eliminare questi ostacoli, ho scritto un programma CGI di shell
  che fornisce le informazioni necessarie all'interprete Java.




  4.2.1.  Lo script java.cgi.

  Questo script di shell si occupa dell'interazione tra il demone HTTP
  daemon e il programma Java CGI che dovete usare.  Estrae il nome del
  programma che volete lanciare dai dati forniti al server e raccoglie
  tutti i dati d'ambiente in un file temporaneo.  Quindi lancia
  l'interprete run-time di Java con il nome del file di informazioni
  d'ambiente e il nome del programma aggiunto alla linea di comando.

  La spiegazione di come viene configurato ed installato lo script
  java.cgi si trova nella sezione ``Le Directory di Installazione''.




  4.2.2.  Come Utilizzare il java.cgi da un form HTML.

  I forms che usano i programmi Java CGI specificano delle azioni come
  di seguito formalizzato:

  <form action="/cgi-bin/java.cgi/CGI_Test" method="POST">


  Dove /cgi-bin/  la directory locale che avete specificato per i file
  binari CGI, java.cgi  il front-end di Java che permette di lanciare
  programmi Java sul Web e CGI_Test  un esempio del nome del programma
  Java da lanciare.




  5.  Utilizzo delle Classi Java.

  Attualmente sono supportate tre classi principali definite nelle
  sezioni ``CGI'', ``Email'' e ``HTML''.  Sto considerando di aggiungere
  le classi per trattare l'input e l'output MIME-formatted
  rispettivamente con MIMEin & MIMEout.

  Esistono anche classi di supporto e di test definite nelle sezioni
  ``CGI_Test'', ``Email_Test'' e ``HTML_Test''. L'utilizzo di queste
  classi  stato concepito con lo scopo di testare la vostra
  installazione.  Ciononostante possono essere utilizzate come punto di
  partenza per i vostri programmi in Java che fanno uso di questa
  libreria di classi.  La classe descritta nella sezione ``Text''  la
  superclasse per entrambe le classi Email e HTML.




  5.1.  CGI





  5.1.1.  Sintassi della Classe

  public class CGI




  5.1.2.  Descrizione della Classe

  La classe CGI mantiene la variabile d'ambiente ``CGI Information''
  impostata dal server web e il nome/valore inviato da un form quando si
  decide di selezionare l'azione submit.  Tutte le informazioni sono
  memorizzate in un oggetto della classe Properties.

  Questa classe  nel pacchetto ``Orbits.net''.




  5.1.3.  Sommario dei membri della Classe


  ______________________________________________________________________
          CGI()         //  Costruttore.
          getNames()    //  Prende la lista di nomi.
          getValue()    //  Prende il valore del form specificando il nome.
  ______________________________________________________________________







  5.1.4.  Vedi Anche

  CGI_Test.




  5.1.5.  CGI()


     Obiettivo
        Costruisce un oggetto che contiene i dati CGI disponibili.

     Sintassi
        public CGI()

     Descrizione
        Quando viene costruito un oggetto CGI, tutte le informazioni
        disponibili vengono assorbite ed immagazzinate localmente al
        nuovo oggetto.




  5.1.6.  getNames()


     Obiettivo
        Lista i nomi che sono definiti per avere valori corrispondenti.

     Sintassi
        public Enumeration getKeys ()

     Descrizione
        Fornisce la lista intera di nome per i quali sono definiti
        valori corrispondenti.

     Restituisce
        Una Enumerazione di tutti i nomi definiti.




  5.1.7.  getValue()


     Obiettivo
        Ricerca i valori associati al nome specificato.

     Sintassi
        public String getValue ( String name )

     Descrizione
        Questo metodo fornisce una corrispondenza tra nomi e valori
        inviati da un form HTML.

     Parametri

        name
           La chiave con la quale i valori vengono selezionati.

     Restituisce
        Una Stringa che contiene il valore.



  5.2.  CGI_Test

  Questa classe fornisce un esempio di come usare la classe CGI ed anche
  un programma di test che pu essere usato per avere la conferma che il
  pacchetto Java CGI funzioni correttamente.




  5.2.1.  Sommario dei membri della Classe


  ______________________________________________________________________
          main()      //  Programma main().
  ______________________________________________________________________






  5.2.2.  Vedi Anche

  CGI.




  5.2.3.  main()


     Obiettivo
        Fornire un metodo main().

     Sintassi
        public static void main( String argv[] )

     Descrizione
        Questo  il punto di ingresso del programma CGI che restituisce
        una lista delle coppie nomi/valori disponibili e il loro valore
        attuale.

     Parametri

        argv[]
           Argomenti passati al programma dallo script java.cgi.
           Attualmente inutilizzato.




  5.3.  Email





  5.3.1.  Sintassi della Classe

  public class Email extends Text






  5.3.2.  Descrizione della Classe

  I Messaggi sono costruiti con la classe Text e i metodi add*() e i
  metodi specifici e-mail-specific aggiunti a da questa classe. Quando
  completo, il messaggio viene inviato ai suoi destinatari.

  Questa classe  contenuta nel pacchetto ``Orbits.net''.




  5.3.3.  Sommario dei membri della Classe


  ______________________________________________________________________
          Email()      //  Costruttore.
          send()       //  Invia un messaggio e-mail.
          sendTo()     //  Aggiunge un destinatario al messaggio.
          subject()    //  Imposta il Subject del messaggio.
  ______________________________________________________________________






  5.3.4.  Vedi Anche

  Email_Test, Text.




  5.3.5.  Email()


     Obiettivo
        Costruisce un oggetto che conterr un messaggio email.

     Sintassi
        public Email()

     Descrizione
        Costruisce un messaggio vuoto da completare da parte dei metodi
        Email.

     Vedi Anche
        Text.




  5.3.6.  send()


     Obiettivo
        Invia un messaggio e-mail.

     Sintassi
        public void send ()

     Descrizione
        Formatta ed invia il messaggio.  Se non viene specificato un
        indirizzo di destinazione, non viene intrapresa alcuna azione.


  5.3.7.  sendTo()


     Obiettivo
        Aggiunge una destinazione per questo messaggio.

     Sintassi
        public String sendTo ( String address )

     Descrizione
        Aggiunge address alla lista delle destinazioni per questo
        metodo.  Non esiste limite al numero di destinatari che un
        messaggio e-mail pu  avere. Sono sicuro che costruendo una
        lista abbastanza grande, potreste fare in modo da superare la
        memoria oppure eccedere la dimensione della lista di parametri
        che il vostro Agente di Trasporto della Posta  in grado di
        accettare.

     Parametri

        address
           Una destinazione a cui inviare il messaggio.




  5.3.8.  subject()


     Obiettivo
        Imposta l'oggetto/subject per questo messaggio.

     Sintassi
        public void subject ( String subject )

     Descrizione
        Questo metodo imposta il testo per la riga Subject: di un
        messaggio email.  Se vengono chiamati pi di una volta, viene
        utilizzato il subject pi recente.

     Parametri

        subject
           Il testo della riga Subject: del messaggio.




  5.4.  Email_Test

  Questa classe fornisce sia un esempio di come utilizzare la classe
  Email sia un programma di test per verificare che il pacchetto Java
  CGI funzioni correttamente.




  5.4.1.  Sommario dei membri della Classe


  ______________________________________________________________________
          main()      //  Programma main().
  ______________________________________________________________________



  5.4.2.  Vedi Anche

  Email.




  5.4.3.  main()


     Obiettivo
        Fornisce un metodo main().

     Sintassi
        public static void main( String argv[] )

     Descrizione
        Questo  il punto di ingresso del programma CGI che restituisce
        una lista delle coppie nomi/valori disponibili e il loro valore
        attuale.  Invier anche questa lista agli indirizzi specificati
        nella variabile Email.

     Parametri

        argv[]
           Argomenti passati al programma dallo script java.cgi.
           Attualmente inutilizzato.




  5.5.  HTML





  5.5.1.  Sintassi della Classe

  public class HTML extends Text




  5.5.2.  Descrizione della Classe

  I Messaggi vengono costruiti con i metodi Text class add*() e dai
  metodi specifici-HTML aggiunti da questa classe.  Quando completo, il
  messaggio viene inviato alle sue destinazioni.

  Attualmente non esiste un controllo di errore per avere la conferma
  che i metodi di costruzione delle liste siano usati nell'ordine
  corretto: il programmatore deve prestare attenzione a non violare la
  sintassi HTML.

  Questa classe  nel pacchetto ``Orbits.net''.




  5.5.3.  Sommario dei membri della Classe





  ______________________________________________________________________
      HTML()                //  Costruttore.
      author()              //  Imposta il nome dell'autore del documento.
      definitionList()      //  Avvia una definition list.
      definitionListTerm()  //  Aggiunge un termine ad una definition list.
      endList()             //  Termina una lista.
      listItem()            //  Aggiunge una entrata ad una lista.
      send()                //  Invia un messaggio HTML.
      title()               //  Imposta il testo per il titolo del documento.
  ______________________________________________________________________






  5.5.4.  Vedi Anche

  HTML_Test, Text.




  5.5.5.  HTML()


     Obiettivo
        Costruisce un oggetto che contiene un messaggio HTML.

     Sintassi
        public HTML()

     Descrizione
        Costruisce un messaggio vuoto da completare con i metodi HTML.

     Vedi Anche
        Text.




  5.5.6.  author()


     Obiettivo
        Imposta il nome dell'autore del documento.

     Sintassi
        public void author ( String author )

     Descrizione
        Imposta il nome dell'autore del documento in author.

     Parametri

        author
           Il testo da usare come autore di questo messaggio.

     Vedi Anche
        title().






  5.5.7.  definitionList()


     Obiettivo
        Avvia una definition list.

     Sintassi
        public void definitionList ()

     Descrizione
        Avvia una definition list.  Una definition list  una
        particolare lista per la quale ogni elemento di ingresso della
        lista  term seguito dalla definizione text per quel termine.
        L'avvio di una definition list dovrebbe essere seguito dalla
        creazione di almeno un termine/testo e una chiamata al metodo
        endList().  Da notare che, attualmente, le liste non possono
        essere nidificate

     Vedi Anche
        definitionListTerm(), endList(), listItem().




  5.5.8.  definitionListTerm()


     Obiettivo
        Aggiunge un termine alla definition list.

     Sintassi
        public void definitionListTerm ()

     Descrizione
        Aggiunge un termine alla definition list.  Il testo
        dell'elemento lista corrente deve essere appeso al messaggio
        dopo che questo metodo viene chiamato e prima di un
        corrispondente metodo listItem venga chiamato.

     Vedi Anche
        definitionList(), listItem().




  5.5.9.  endList()


     Obiettivo
        Termina una lista.

     Sintassi
        public void endList ()

     Descrizione
        Termina una lista.  Questo metodo elimina una lista.  Da notare
        che al momento attuale, le liste non possono essere nidificate.

     Vedi Anche
        definitionList().






  5.5.10.  listItem()


     Obiettivo
        Aggiunge una voce nella lista.

     Sintassi
        public void listItem ()

        public void listItem ( String item )

        public boolean listItem ( String term, String item )

     Descrizione
        Aggiunge una voce alla lista.  Se viene usato il primo form, il
        testo dell'elemento lista corrente deve essere accodato al
        messaggio dopo che questo metodo viene chiamato e prima che
        venga chiamata ogni altra lista di metodi.  Nel secondo e terzo
        form, il testo item  specificato come un parametro al metodo
        invece di (o in aggiunta) essere accodato al messaggio.  Il
        terzo form  specifico per le definition lists e fornisce sia i
        termini che una definizione dell'ingresso della lista.

     Parametri

        item
           Il testo di questo ingresso di lista.

        term
           Il testo di questa parte del termine di ingresso della
           definition list.

     Vedi Anche
        definitionList(), definitionListTerm(), endList().




  5.5.11.  send()


     Obiettivo
        Invia un messaggio HTML.

     Sintassi
        public void send ()

     Descrizione
        Invia un messaggio HTML.




  5.5.12.  title()


     Obiettivo
        Imposta il testo per il titolo del documento.

     Sintassi
        public void title ( String title )

     Descrizione
        Imposta il testo per il titolo del documento.


     Parametri

        title
           Il testo del titolo del documento.

     Vedi Anche
        author().




  5.6.  HTML_Test

  Questa classe fornisce sia un esempio di come usare la classe HTML sia
  un programma di test che pu essere usato per avere la conferma che il
  pacchetto Java CGI funzioni correttamente.




  5.6.1.  Sommario dei membri della Classe


  ______________________________________________________________________
          main()      //  Programma main().
  ______________________________________________________________________






  5.6.2.  Vedi Anche

  HTML.




  5.6.3.  main()


     Obiettivo
        Fornire un metodo main().

     Sintassi
        public static void main( String argv[] )

     Descrizione
        Questo  il punto di ingresso del programma CGI che restituisce
        una lista delle coppie nomi/valori disponibili e il loro valore
        attuale.

     Parametri

        argv[]
           Argomenti passati al programma dallo java.cgi.  Attualmente
           inutilizzato.




  5.7.  Text



  5.7.1.  Sintassi delle Classi

  public abstract class Text




  5.7.2.  Descrizione delle Classi

  Questa classe  la superclasse delle classi Email e HTML.  I Messaggi
  sono costruiti con i metodi di questa classe poi completati e
  formattati con i metodi delle sottoclassi.

  Questa classe  contenuta nel pacchetto ``Orbits.text''.




  5.7.3.  Member Summary


  ______________________________________________________________________
          Text()            //  Costruttore.
          add()             //  Aggiunge testo a questo oggetto.
          addLineBreak()    //  Aggiunge un terminatore di riga.
          addParagraph()    //  Aggiunge un terminatore di paragrafo.
  ______________________________________________________________________






  5.7.4.  Vedi Anche

  Email, HTML.




  5.7.5.  add()


     Obiettivo
        Aggiunge del testo a questo elemento.

     Sintassi
        public void add ( char addition )

        public void add ( String addition )

        public void add ( StringBuffer addition )

     Descrizione
        Aggiunge addition ai contenuti di questo elemento di testo.

     Parameter

        addition
           Testo da aggiungere all'elemento di testo.

     Vedi Anche
        addLineBreak(), addParagraph().



  5.7.6.  addLineBreak()


     Obiettivo
        Forza una terminazione di riga nel punto esatto del testo.

     Sintassi
        public void addLineBreak ()

     Descrizione
        Aggiunge una terminazione di riga al testo nel punto attuale.

     Vedi Anche
        add(), addParagraph().




  5.7.7.  addParagraph()


     Obiettivo
        Comincia un nuovo paragrafo.

     Sintassi
        public void add ()

     Descrizione
        Cominicia un nuovo paragrafo in questo punto del testo.

     Vedi Anche
        add(), addLineBreak().




  6.  Piani Futuri


    Aggiungere alla classe Email:

     Email( int capacity )
        Usato quando conosciamo quanto spazio necessita al messaggio per
        essere allocato.

     sendTo( String [] address )
        Aggiunge una lista di destinazioni primarie al messaggio e-mail.

     sendCc( String address )
        Aggiunge una destinazione Carbon-Copy al messaggio e-mail.

     sendCc( String [] address )
        Aggiunge una lista di destinazioni Carbon-Copy al messaggio e-
        mail.

     sendBcc( String address )
        Aggiunge una destinazione Blind Carbon-Copy al messaggio e-mail.

     sendBcc( String [] address )
        Aggiunge una lista di destinazioni Blind Carbon-Copy al
        messaggio e-mail.

    Aggiungere alla classe HTML:

     HTML( int capacity )
        Usato quando conosciamo quanto spazio necessita al messaggio per
        essere allocato.

     public void unorderedList()
        Avvia una lista non-ordinata.

     public void orderedList()
        Avvia una lista ordinata.

     public void directoryList()
        Avvia una lista di directory.

     public void menuList()
        Avvia una lista di menu.

     void anchor( String anchorName )
        Specifica un anchor.

     void link( String url, String text )
        Specifica un link.

     void applet( String url, String altText )
        Specifica un link ad un applet.

    Permettere la nidificazione delle liste HTML.

    Aggiungere un codice a controllo di errore per rinforzare
     l'ordinamento corretto dei codici di formattazione delle liste
     HTML.

    Il posizionamento del file dei dati d'ambiente deve essere
     configurabile tramite la modifica del Makefile.

    Eliminare le coppie spurie di nomi/valori vuoti che appaiono nella
     lista quando si tratta il metodo di trasferimento di dati GET.

    Considerare di fare in modo che CGI implementi l'interfaccia
     java.util.Enumeration per fornire successivamente i nomi delle
     variabili.

    Aggiungere una classe Test, con la quale utilizzare ogni metodo di
     questo pacchetto.

    Documentare come CGI_Test, Email_Test e HTML_Test facciano
     affidamento l'uno sull'altro per fornire tests incrementali per
     obiettivi di debugging.

    Documentare come Test utilizzi ogni caratteristica disponibile in
     questo pacchetto.




  7.  Varianti





  7.1.  Varianti da 0.3 a 0.4


    Buttata fuori la classe HTML per fornire una minima funzionalit

    Scritta la classe HTML_Test e javahtmltest.html-dist.


    Aggiunti i metodi HTML per trattare con la definition list.




  7.2.  Varianti da 0.2 a 0.3


    Aggiunte le classi Text e Email.  Viene aggiunto anche l'HTML, ma 
     solo un inizio.

    Raccolte le varie classi in pacchetti.  Le classi principali sono
     in Orbits.net.*, la classe di supporto Text  in Orbits.text.Text.

    Cambiato CGItest in CGI_Test.

    Aggiunta la classe Email_Test.




  7.3.  Varianti da 0.1 a 0.2


    Le variabili d'ambiente vengono messe in un file temporaneo invece
     di essere stipate in linea di comando nell'interprete Java.  Le
     classi CGI e java.cgi sono state modificate.

    Il documento javacgitest.html diventa parte della distribuzione.

    I file di testo che sono modificati da make durante l'installazione
     vengono forniti con nomi che terminano con -dist.


































  Jaz-drive HOWTO
  Herbert S. DaSilva
  v1.8, 12 gennaio 2000

  Questo HOWTO si occupa della configurazione e dell'uso delle unit
  Iomega Jaz da 1 Gb e 2 Gb sotto Linux.  Traduzione a cura di Masetti
  Marco (marcomas@libero.it ).

  1.  Introduzione

  Iomega Jaz  un'unit disco rimovibile che supporta dischi con
  capacit di 1 o 2 Gigabyte.  Diversamente dalle unit Zip, Iomega Jaz
   disponibile solo come dispositivo SCSI (interno o esterno), quindi
  per queste unit sono richiesti una scheda di interfaccia SCSI e il
  driver.

  1.1.  Storia

  La gran parte di questo HOWTO si  evoluto a partire da quanto creato
  dal precedente autore, Bob Willmot, (pu essere contattato
  all'indirizzo bob@willmot.com), che ha mantenuto l'HOWTO fino alla
  versione 1.6, con l'aiuto e le informazioni fornite dalle seguenti
  persone:


    Grant Gunther, grant@torque.net

    Tom Poindexter, tpoindex@nyx.net

    Todd Woods, woods@cs.uiowa.edu

    Richard B. Melrose, rbm@math.mit.edu

    Phil Howard, phil@charon.milepost.com

    Rick Niess, rniess@ocean.st.usm.edu

  1.2.  Ultima versione

  L'ultima versione di questo documento pu essere reperita presso la
  mia homepage http://www.ultranet.com/~hsd/HOWTO/ dove potete trovare
  la versione HTML per la lettura con il browser, una versione
  PostScript adatta per la stampa e il sorgente SGML.  Altre versioni
  possono essere ottenute in formati differenti nella homepage di LDP
  http://www.linuxdoc.org/.

  1.2.1.  Storia delle versioni

  v1.8, 12 gennaio 2000

    Corretto un link HTTP errato

    Aggiunti chiarimenti relativi al codice di jaztool per le unit da
     2 Gb

  v1.7, 18 novembre 1999

    Conversione al formato SGML

    Aggiunte informazioni sulle unit da 2Gb

    Aggiunti esempi sulle voci di fstab

    Aggiornamenti generali


  Per qualsiasi commento/suggerimento/correzione scrivete a: Herb
  DaSilva indirizzo casa <mailto:hsd@ma.ultranet.com> o (se si necessita
  di una risposta urgente) indirizzo lavoro <mailto:herb@aoainc.com>.

  1.3.  Copyright e marchi registrati (in inglese)

  Copyright  2000,1999 Herbert S. DaSilva

  This manual may be reproduced in whole or in part, without fee,
  subject to the following restrictions:


    The copyright notice above and this permission notice must be
     preserved complete on all complete or partial copies

    Any translation or derived work must be approved by the author in
     writing before distribution.

    If you distribute this work in part, instructions for obtaining the
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

    Small portions may be reproduced as illustrations for reviews or
     quotes in other works without this permission notice if proper
     citation is given.

  Exceptions to these rules may be granted for academic purposes: Write
  to the author and ask. These restrictions are here to protect us as
  authors, not to restrict you as learners and educators. All source
  code in this document is placed under the GNU General Public License,
  available via anonymous FTP from the GNU archive site
  <ftp://prep.ai.mit.edu/pub/GNU/COPYING>.

  1.4.  Riconoscimenti e ringraziamenti

  Grazie a Stephan Burlot, stephan.burlot@edicom.ch, per aver
  puntualizzato l'errore (o la mancanza di chiarezza) riguardante la
  patch per il supporto ai 2 Gb del programma jaztool, corretto nella
  versione 1.8.

  I miei ringraziamenti vanno inoltre a Mark F. Komarinski per il suo
  "HOWTO-HOWTO" - Questo autore LDP  stato aiutato da Mark, hai fatto
  il tuo dovere. ;-)

  2.  Hardware Jaz

  2.1.  Le unit Jaz

  Le unit Jaz sono dei dispositivi SCSI e sono disponibili come unit
  esterne con interfaccia auto-terminante a 50-pin SCSI-2 oppure come
  unit interne, formato 3-1/2, con connettore a 50-pin.

  Sia la versione interna che quella esterna sono disponibili con
  capacit di 1 o 2 Gigabyte, quindi in tutto sono disponibili quattro
  tipi di unit Jaz.

  2.2.  I "dischi" dell'unit Jaz

  I dischi del Jaz sono simili a delle cartucce contenenti una pila di 3
  dischetti da 3.5". Da qui in poi user in modo intercambiabile i
  termini "cartucce" e "dischi".

  Le cartucce da 1 Gb e da 2 Gb appaiono simili, ma esiste una sottile
  differenza nella loro forma che impedisce ad una cartuccia da 2 Gb di
  essere completamente inserita in una unit da 1 Gb. Ovviamente, questo
  significa che non si possono utilizzare cartucce da 2 Gb nelle unit
  da un 1 Gb.

  Le unit Jaz da 2 Gb sono in grado di leggere, scrivere e formattare
  sia le cartucce da 2 Gb che da 1 Gb.

  2.3.  L'adattatore Host Jaz Jet

  Iomega vende un adattatore SCSI sotto il nome di Jaz Jet. Esistono e
  sono utilizzati per questa scheda almeno due chipset SCSI, per questa
  ragione, Jaz Jet non  necessariamente l'adattatore migliore che si
  possa acquistare se si ha bisogno di una unit Jaz. La cosa migliore 
  comprare la scheda che sai essere supportata dalla tua distribuzione
  Linux (vedi prossima sezione).

  Una delle schede Jaz Jet  basata sulla famiglia degli adattatori
  Adaptec 7800. Linux 2.0 la supporta con il driver aic7xxx che 
  incluso nella gran parte dei kernel che supportano lo standard SCSI
  2.x, forniti nella maggioranza delle distribuzioni Linux.

  L'altro adattatore  basato sul chipset Advanced Systems. Al momento
  del boot questa scheda dovrebbe fornire un messaggio simile a questo:

  Jaz Jet PCI SCSI adapter Copyright Advanced Systems 1996

  In base alla tua distribuzione Linux, per utilizzare questo adattatore
  potresti avere la necessit di ricompilare il kernel (con la variabile
  CONFIG_SCSI_ADVANSYS attivata).

  Personalmente non adoro le sorprese, cos se devo acquistare un scheda
  preferisco sceglierne una di qualit, con un connettore da 50-pin e
  che so essere supportata.

  2.4.  Altri adattatori Host SCSI

  Se utilizzi una scheda SCSI Ultra-Wide con connettore da 68-pin, avrai
  bisogno di un adattatore o di un altro cavo. Gli adattatori funzionano
  molto bene con l'unit Jaz, ma posso essere piuttosto costosi, quindi
  se ti appresti ad acquistare una scheda SCSI principalmente per
  connettere un'unit Jaz, la scelta migliore  una scheda con
  connettore da 50 pin.

  Se hai bisogno di qualche suggerimento, io preferisco l'Adaptec
  AHA-2930U -  economica, veloce e l'unit Jaz si collega, usando
  l'apposito cavo fornito, senza alcun problema. Sfortunatamente il
  supporto per questa scheda  abbastanza recente, quindi a meno che tu
  non abbia una distribuzione Linux aggiornata (kernel 2.2.x),
  probabilmente non sar supportata. Tuttavia sono disponibili delle
  patch per il driver aic7xxx dei kernel 2.0.36, che ne aggiungono il
  supporto. La AHA-2940U  una scelta altrettanto eccellente, supportata
  da pi tempo, per costosa.

  2.5.  Problemi con i driver del kernel

  Come sempre, prima di acquistare una scheda assicurati che la tua
  distribuzione Linux la supporti esplicitamente. Molti produttori, come
  Adaptec, hanno schede con numeri e lettere simili ad altre, che per
  usano chipset completamente diversi, e che quindi necessitano di
  driver completamente differenti.

  Come configurare il kernel di Linux per sfruttare la scheda SCSI 
  materia per un documento a parte, perci non la approfondir qui.

  Informazioni su come ricompilare il kernel possono comunque essere
  reperite nel file /usr/src/linux/README, oppure per i kernel della
  serie 2.x, nella directory /usr/src/linux/Documentation/ .  Se non
  riesci a trovare questi file, controlla di aver installato i sorgenti
  del kernel.

  Puoi anche consultare il Kernel-HOWTO di Brian Ward
  <http://metalab.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>

  3.  Riconoscimento dell'unit Jaz

  3.1.  Durante il test di Power-On

  Avendo un controller SCSI installato, al momento dell'accensione della
  macchina o del reset, e prima del boot del sistema operativo, il
  controller andr ad esaminare il bus SCSI verificando la presenza di
  eventuali dispositivi.

  Se la scheda SCSI  correttamente installata, e la tua unit Jaz 
  collegata e accesa, allora dovrebbe comparire sullo schermo qualcosa
  come "Iomega Jaz 1GB" oppure "Iomega Jaz 2GB".

  Se ci non avviene, allora non ha senso avviare Linux. Spegni il tuo
  PC e l'unit Jaz e controlla di nuovo che tutto sia a posto. In
  particolare, stacca i cavi e assicurati che nessuno dei pin sia
  piegato, poi riattaccali verificando la perfetta connessione.  Se hai
  pi dispositivi SCSI collegati controlla che abbiano tutti un ID
  diverso e che l'ultimo della catena sia terminato.

  Quando l'unit sar riconosciuta nel test di power-on sarai ormai a
  met strada.


  3.2.  Durante il boot

  Quando Linux effettua il boot il driver SCSI dovrebbe visualizzare
  informazioni circa l'adattatore SCSI e quali sono i dispositivi
  connessi al bus.

  I messaggi di boot variano a seconda del driver e dell'adattatore, e
  vengono registrati nel file /var/log/messages (oppure
  /var/adm/messages) proprio come appaiono sullo schermo durante la fase
  di boot.  Puoi anche rivedere i messaggi dell'ultimo boot dal prompt
  con il comando dmesg.

  Segue l'output ottenuto durante il boot del kernel, versione 2.0.36,
  il controller utilizzato  l'Adaptec 2940 (il driver usato  aic7xxx):























  (scsi0) <Adaptec AHA-2940A Ultra SCSI host adapter> found at PCI 14/0
  (scsi0) Narrow Channel, SCSI ID=7, 3/255 SCBs
  (scsi0) Warning - detected auto-termination
  (scsi0) Please verify driver detected settings are correct.
  (scsi0) If not, then please properly set the device termination
  (scsi0) in the Adaptec SCSI BIOS by hitting CTRL-A when prompted
  (scsi0) during machine bootup.
  (scsi0) Cables present (Int-50 NO, Ext-50 YES)
  (scsi0) Downloading sequencer code... 419 instructions downloaded
  scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.1.2/3.2.4
  <Adaptec AHA-2940A Ultra SCSI host adapter>
  scsi : 1 host.
  Vendor: iomega Model: jaz 2GB Rev: E.17
  Type: Direct-Access ANSI SCSI revision: 02
  Detected scsi removable disk sda at scsi0, channel 0, id 4, lun 0
  scsi : detected 1 SCSI disks total.
  (scsi0:0:4:0) Synchronous at 10.0 Mbyte/sec, offset 15.
  sda : READ CAPACITY failed.
  sda : status = 1, message = 00, host = 0, driver = 28
  sda : extended sense code = 2
  sda : block size assumed to be 512 bytes, disk size 1GB.



  Se non compare qualcosa di simile a queste linee, probabilmente il tuo
  kernel non  stato configurato correttamente (oppure hai sbagliato nel
  scegliere il kernel precompilato).

  Se la linea "scsi0 :" non appare, allora non hai configurato
  correttamente il driver. Alcuni driver comunque ti daranno dei
  suggerimenti su cosa  andato storto. Se non  stato assegnato un nome
  all'unit, probabilmente quando hai compilato il kernel, hai
  dimenticato di includere il supporto ai dispositivi SCSI.

  Nota l'errore READ CAPACITY failed. La maggior parte dei driver SCSI
  (come questo) riconoscono l'unit come rimovibile, e non vanno in
  confusione quando non possono leggere la tabella delle partizioni.
  Tuttavia, alcune schede SCSI non sono cos gentili. Se il tuo PC si
  blocca durante il boot, prova a effettuare il boot con una cartuccia
  inserita nell'unit.

  Consulta i file README presenti in /usr/src/linux/drivers/scsi e il
  Kernel HOWTO per altri suggerimenti di debugging.

  3.3.  Nome del dispositivo

  Nell'output della sezione precedente nota il nome grezzo del
  dispositivo SCSI, che in questo caso corrisponde a "sda", il nome
  completo  /dev/sda.  Tipicamente se l'unit Jaz  il solo disco SCSI
  del tuo sistema, il nome sar /dev/sda.  Se invece il tuo hard-disk
  primario  SCSI, o se la tua unit CD-ROM  SCSI, allora potrebbe
  essere sdb, sdc, etc.

  Qualsiasi nome abbia, hai bisogno di conoscerlo per poter accedere
  all'unit, come spiegato nella successiva sezione.

  4.  Usare un disco Jaz

  4.1.  Dischi formattati DOS

  I dischi dell'unit Jaz sono pre-formattati da Iomega come singola
  partizione con file-system DOS FAT16.  La partizione singola  di
  solito la quarta partizione del disco (per compatibilit con il Mac -
  il Mac richiede che i dati si trovino nella quarta partizione, mentre
  il PC non si cura della partizione in cui si trovano i dati).

  Linux  perfettamente in grado di leggere e scrivere su un file-system
  di tipo FAT16, quindi puoi usare il disco cos com'.  Per usarlo 
  comunque necessario montarlo, quindi la prima cosa da fare  creare un
  mount point.  In questo documento, noi monteremo tutte le nostre unit
  Jaz sotto /dos_jaz, perci crea questo mount point (per la maggior
  parte di questo tipo di lavori dovrai essere root).  Quello che quindi
  devi fare, e soltanto una volta, :

  mkdir /dos_jaz

  In una sezione precedente, ti ho detto che  necessario ricordarsi il
  nome grezzo del dispositivo SCSI. Ti servir adesso. Se la tua unit
  ha nome /dev/sda allora tutti questi esempi ti funzioneranno.  Se no,
  dovrai sostituire "sda" con l'ID di dispositivo della tua unit Jaz.
  Poich devi eseguire questi comandi come root, dovrai essere sicuro di
  conoscere i nomi corretti.

  Se usi il kernel 2.0, oppure hai aggiunto il supporto VFAT, puoi
  montare il disco Jaz, mantenendo i nomi lunghi sotto FAT16, in questo
  modo:

  mount -t vfat /dev/sda4 /dos_jaz

  Nota che sebbene VFAT ti permetta di utilizzare i nomi lunghi, questi
  sono ancora case in-sensitive, e bench 'ls' visualizzi i permessi,
  non puoi attualmente cambiarli in nessuno dei file.

  Se il formato "vfat" non  riconosciuto dal comando mount, allora usa
  questo comando:

  mount -t msdos /dev/sda4 /dos_jaz

  Una volta eseguito uno dei due comandi di mount, i file del disco
  compariranno sotto la directory /dos_jaz. Mentre il disco  montato
  non potrai espellerlo.

  Quando hai finito di usare il disco, puoi smontarlo con il comando:

  umount /dos_jaz

  Una volta smontato, per espellere la cartuccia premi il tasto presente
  davanti l'unit.

  4.2.  Ripartizionare il disco Jaz

  Siccome il disco Jaz  semplicemente un disco, pu essere
  ripartizionato e riformattato come un normale disco fisso. Per essere
  montato comunque devi conoscere quali numeri di partizione sono stati
  usati nella ripartizione.

  Per esempio, se la tabella della partizioni era vuota, ed una
  partizione singola  stata creata come prima partizione, i due comandi
  della precedente sezione diventeranno:

  mount -t vfat /dev/sda1 /dos_jaz

  e

  mount -t msdos /dev/sda1 /dos_jaz

  4.3.  Dischi Jaz nativi Linux

  I dischi Jaz nativi Linux permettono la memorizzazione dei file con i
  permessi e i nomi di file case-sensitive tipici dello standard Unix.
  L'unico svantaggio  che non possono essere usati su sistemi
  DOS/Windows.
  Un disco Jaz viene visto da Linux come fosse un hard-disk, per chi ha
  familiarit con i tool di gestione dei dischi di Linux, nulla di ci
  che seguir sar una sorpresa.

  Se vuoi cancellare un disco Jaz e creare un file-system nativo Linux
  su di esso dovrai usare fdisk sull'intero disco. Mi raccomando di
  essere particolarmente attento usando fdisk, specialmente se hai un
  hard-disk SCSI, non vorremmo che ti capitasse qualche "accidente". :-)
  In particolare se vuoi cancellare un disco Jaz assicurati, prima di
  ogni modifica, di operare sul dispositivo corretto. Nella maggior
  parte dei casi si usa:

  fdisk /dev/sda

  e quindi si elimina la partizione esistente (con il comando d). Poi si
  crea una nuova partizione con il comando n, la si rende partizione
  primaria numero 1 (usa tutti i cilindri), si usa w per scrivere la
  tabella della partizione sul disco e si chiude l'applicazione con q.

  Una volta che la partizione  stata creata, formattala con:

  mke2fs /dev/sda1

  (L'1  il numero che hai dato alla partizione con fdisk). Io
  preferisco creare un mount point separato per i dischi Jaz nativi
  Linux e questo lo vedrai tra poco quando parleremo di fstab. Comunque
  creiamo pure la mount point adesso e montiamo il disco:

  mkdir /jaz

  mount -t ext2 /dev/sda1 /jaz

  Come al solito, quando il disco Jaz  montato, non pu essere espulso.
  Quando hai terminato di usare il disco, smontalo con:

  umount /jaz

  Una volta smontato, per espellere la cartuccia premi il pulsante
  presente davanti l'unit.

  4.4.  Controllare i dischi nativi Linux

  Come le altre unit disco, una volta montato e smontato un disco Jaz
  un certo numero di volte, il sistema lo marcher come "sporco". Quando
  succede, dovresti ottenere un messaggio come il seguente:

  Mounting unchecked filesystem, /dev/sda1. Recommend running e2fsck.

  Quando vedi questo messaggio,  buona cosa controllare il disco.  Il
  disco prima di tutto deve essere smontato. Sfortunatamente, otterrai
  il messaggio "sporco" solo quando lo monti, perci puoi o controllare
  il disco quando lo stai usando oppure smontarlo, controllarlo e
  rimontarlo.  Per controllare il disco usa il seguente comando
  (assumendo che la partizione da controllare sia la prima):

  e2fsck /dev/sda1

  4.5.  Usare fstab per rendere tutto pi semplice

  Finora abbiamo operato come root per montare e smontare i dischi Jaz e
  abbiamo dovuto scrivere un po' per queste operazioni. Ora per
  aggiungendo un paio di voci al file /etc/fstab, possiamo rendere molto
  pi semplice l'utilizzo dell'unit Jaz.



  4.5.1.  Dischi formattati DOS

  Se hai dei dischi preformattati DOS e hai creato la mount point
  /dos_jaz, puoi aggiungere questa linea al file /etc/fstab:

  /dev/sda4 /dos_jaz vfat defaults,user,nosuid,noauto 0 0

  Con questa linea nella fstab, qualsiasi utente pu montare e smontare
  le cartucce Jaz formattate DOS con i seguenti comandi:

  mount /dos_jaz

  umount /dos_jaz

  Questo perch abbiamo segnalato a Linux, in fstab, l'ID del
  dispositivo Jaz e il tipo di file-system, in pi gli abbiamo dato
  l'opzione user per consentire a qualsiasi utente di montare e smontare
  il disco. Naturalmente, se la tua unit Jaz  un'altra invece di sda
  dovrai modificarla.  Questa linea non funzioner con le cartucce DOS
  che sono state ripartizionate, infatti  necessario introdurre
  un'altra voce nel file fstab che indichi una mount point separata (es.
  /dos_jaz2).

  4.5.2.  Dischi formattati Linux

  Se hai un disco formattato Linux e hai creato il mount point /jaz,
  puoi aggiungere questa linea in fstab:

  /dev/sda1 /jaz ext2 defaults,user,exec,nosuid,noauto 0 0

  Con questa linea in fstab, qualsiasi utente pu montare e smontare una
  cartuccia Jaz formato Linux con i seguenti comandi:

  mount /jaz

  umount /jaz

  Ancora una volta, noi segnaliamo a Linux, in fstab, l'ID del
  dispositivo Jaz e il tipo di file-system, in pi gli abbiamo dato
  l'opzione user per consentire a qualsiasi utente di montare e smontare
  il disco.  Qualche amministratore di sistema potrebbe non gradire
  l'opzione exec, in quanto ci sono rischi per la sicurezza a lasciare
  che qualsiasi utente possa eseguire file di origine sconosciuta
  dall'unit. Tuttavia la presenza dell'opzione nosuid rende questi
  rischi minimi.

  4.5.3.  Mount automatico al boot

  Entrambi gli esempi su fstab hanno abilitata l'opzione noauto, questa
  impedisce che il disco venga automaticamente montato nella fase di
  boot.  In genere, questa  una buona idea, in quanto se nessun disco 
  presente nell'unit Jaz al boot del computer, oppure se l'unit 
  spenta, si possono ottenere una serie di problemi dipendenti dal
  driver SCSI in uso.

  Se sei certo di voler montare l'unit Jaz al boot, rimuovi allora
  l'opzione noauto e assicurati, prima di ogni boot, che l'unit sia
  accesa e che una cartuccia sia inserita.  Nota che ci deve essere una
  sola voce in fstab per quanto riguarda l'unit Jaz auto-montante,
  altrimenti otterrai gli stessi problemi che si hanno non inserendo una
  cartuccia nell'unit.

  4.6.  Il disco "tools" del Jaz

  Con alcune unit Jaz, il software per utilizzare l'unit  fornito su
  una cartuccia Jaz invece che su un CD-ROM. Il "problema" con questi
  dischi  che la protezione software in scrittura  abilitata, quindi
  l'utente non pu cancellare il disco finch i tools non vengono
  installati almeno una volta.

  Ci sono diversi modi per recuperare il disco "tools" del Jaz:

    Installare i tools su un computer DOS/Windows.

    Usare un computer DOS/Windows con i tools Jaz gi installati e
     rimuovere la protezione con password.

    Usare una delle utilit Linux citate in una successiva sezione per
     rimuovere la protezione con password.

  Se hai accesso ad uno dei programmi che rimuovono la protezione con
  password, tutto quello di cui hai bisogno  della password usata da
  Iomega, che :

  APlaceForYourStuff

  Nota che le maiuscole sono importanti.

  5.  Utilit Linux per le unit Jaz

  5.1.  jaztool

  jaztool  un'utility scritta da Bob Willmot per supportare alcune
  caratteristiche delle unit Jaz (inclusi espulsione via software e
  protezione in scrittura). jaztool mi piace perch i comandi possono
  essere inclusi in comandi alias e negli script. Inoltre  facile da
  compilare e installare.

  Il sorgente originale di jaztool pu essere reperito presso
  http://www.willmot.com/jaztool/ e ne  fatto il mirror anche al mio
  sito http://www.ultranet.com/~hsd/HOWTO/index.shtml#jaztool

  Nota che per usare jaztool con le unit Jaz da 2Gb, devi modificare
  UNA linea di codice.  Modifica la linea 188 da:

  return(!strncasecmp(id,"IOMEGA JAZ 1GB",15));

  a:

  return(!strncasecmp(id,"IOMEGA JAZ",11));

  NOTA: Ci sono due spazi tra IOMEGA e JAZ nelle due linee di codice
  precedenti. SGML (o forse giusto HTML) apparentemente rimuovono gli
  spazi extra.

  Dopo aver compilato e installato jaztool, per poterlo utilizzare devi
  essere root altrimenti non funzioner.

  Io uso jaztool regolarmente, perci se hai qualche domanda sar felice
  di aiutarti.

  5.1.1.  Espellere una cartuccia

  Per espellere la cartuccia usa il seguente comando:

  jaztool /dev/sda eject

  Questa linea potrebbe sembrare lunga da scrivere, comunque  facile
  creare un buon alias come questo:

  alias jazej 'umount /jaz; jaztool /dev/sda eject'

  5.1.2.  Protezione con password

  Ci sono due modalit di protezione con password ed entrambe sono
  controllate tramite software. Una  la protezione in scrittura e
  l'altra  la protezione in lettura/scrittura. jaztool ti permette di
  sbloccare un disco protetto in scrittura, mentre la protezione
  lettura/scrittura non  supportata, in quanto sotto Linux, un
  dispositivo che non pu essere letto non pu essere nemmeno montato.

  Se la cartuccia  protetta in scrittura (come per esempio il disco Jaz
  tools), usa il seguente comando per sbloccarlo (il disco non deve
  essere montato):

  jaztool /dev/sda rw

  jaztool a questo punto si aspetter una password e se questa 
  corretta, il disco verr sbloccato ed espulso.  Questo deve accadere
  per permettere al driver SCSI di attivare la nuova modalit appena la
  cartuccia verr reinserita.

  Per rendere di nuovo il disco protetto in scrittura, usa il comando
  seguente:

  jaztool /dev/sda ro

  jaztool nuovamente si aspetter la password, quindi il disco verr
  bloccato ed espulso.

  Nota che jaztool non supporta la caratteristica del "Sprotetto fino ad
  espulsione" presente nel mondo Windows.  Se rimuovi la protezione con
  password, essa rimarr assente fino a successivo ripristino.

  5.2.  jaZip

  Se desideri una semplice e amichevole interfaccia grafica per
  controllare il tuo Jaz (e Zip!), esiste l'utilit jaZip.  Dai
  un'occhiata all'indirizzo: http://www.scripps.edu/~jsmith/jazip/

  Non ho mai usato jaZip, perci contatta l'autore direttamente per
  eventuali domande. Informazioni su come contattarlo si trovano sul
  sito web sopra citato.

  6.  Il boot dalla cartuccia Jaz

  6.1.  Problemi con il BIOS

  Se l'unit Jaz coesiste con altri hard-disk SCSI, la maggior parte dei
  BIOS vorranno effettuare il boot del disco SCSI con l'ID pi basso.
  L'unit Jaz pu essere impostata con ID 0-6 e tipicamente  venduta
  con l'ID SCSI preimpostata a 5. Alcuni BIOS individuano e saltano i
  dispositivi rimovibili come il Jaz. Se vuoi effettuare il boot dal Jaz
  e il tuo BIOS te lo consente, allora imposta il tuo hard-disk SCSI
  principale come Id 1 e poi modifica l'Id SCSI del Jaz da 5 a 0.

  In genere, l'unit Jaz convive con un hard-disk IDE e quasi tutti i
  BIOS vorranno effettuare il boot dal primo hard-disk IDE. Per
  effettuare il boot prima di tutto da un dispositivo SCSI, alcuni BIOS
  ti permettono comunque di modificare un'impostazione nel setup. Altri
  potrebbero richiedere di disabilitare le unit IDE sempre nel setup
  del BIOS.  Altri ancora potrebbero richiedere di staccare fisicamente
  le unit IDE o di disabilitare l'interfaccia IDE.

  6.2.  Installare Linux su una cartuccia Jaz

  Sebbene eseguire Linux su una cartuccia Jaz sia molto pi lento che
  non da un hard-disk, l'unit Jaz rappresenta un eccellente ERD
  (Emergency Repair Disk).  Inoltre  piacevole essere in grado di fare
  una scappatina in qualche nuovo sistema Linux o provare Linux su
  qualche altra macchina equipaggiata con un'unit Jaz.

  Il modo di gran lunga pi semplice per installare Linux su una
  cartuccia Jaz  quello di seguire le procedure di installazione della
  tua distribuzione Linux preferita, avendo come unica unit disco il
  Jaz. Se non sei completamente a tuo agio con LILO, questa  l'unica
  strada percorribile.

  Se vuoi effettuare una "installazione" dal tuo sistema in funzione,
  spesso si pu avere successo nel "costruire" un sistema bootabile
  dalla cartuccia Jaz.


    Partiziona l'unit e crea il file-system. Probabilmente avrai
     bisogno di creare anche una partizione di swap, ma se hai molta RAM
     forse no.  Monta la nuova root come /jaz e ogni ulteriore
     partizione dentro questa directory in modo appropriato.

    Copia tutti i file nelle directory relative. Assicurati che tutti i
     file contenuti in /dev siano copiati. Assicurati inoltre che tutti
     i permessi, le propriet e i group-id siano mantenuti.

    Modifica i file sulla cartuccia Jaz in modo tale che soddisfino le
     richieste per il boot da cartuccia. In particolare mi raccomando di
     modificare /jaz/etc/fstab in modo che la/le partizione/i vengano
     appropriatamente montate. Inoltre adatta anche /jaz/etc/lilo.conf.

    Ci sono due alternative per installare il boot loader LILO:

    Creare un floppy contenente l'immagine del kernel e usare rdev per
     far s che monti la cartuccia Jaz come root. Quando pronto, la
     prima volta effettua il boot da floppy, ed esegui LILO per rendere
     l'MBR del Jaz bootabile.

    Per installare l'MBR bootabile sulla tua cartuccia Jaz puoi
     eseguire LILO anche dal tuo sistema non-JAZ in funzione. Per
     informazioni complete su questa scelta consulta il LILO mini-HOWTO
     di Alessandro Rubini
     <http://metalab.unc.edu/mdw/HOWTO/mini/LILO.html>.

























  The Linux Kernel HOWTO
  Brian Ward, bri@cs.uchicago.edu
  v1.0, 5 giugno 1999

  Questa  una guida dettagliata alla configurazione, compilazione,
  aggiornamento e risoluzione dei problemi del kernel per sistemi basati
  su i386. Traduzione a cura di Giovanni Bortolozzo,
  borto@pluto.linux.it.

  1.  Introduzione


  Dovresti leggere questo documento? Beh, vedi se presenti uno dei
  seguenti sintomi:



    ``Arg! Questo pacchetto wizzo-46.5.6 dice che ha bisogno del kernel
     2.8.183 e io ho ancora l'1.0.9!''

    Nei kernel pi recenti c' un device driver che assolutamente devi
     avere.

    Non hai assolutamente idea di come compilare il kernel.

    ``La roba nel README  veramente l'intera storia?''

    L'hai preso, c'hai provato, ma non funziona.

    Hai bisogno di qualcosa da dare alla gente che insiste nel
     domandarti di installargli il loro kernel.


  1.1.  Per prima cosa leggi qua!

  Alcuni degli esempi in questo documento assumono che si abbia tar,
  find e xargs della GNU.  Sono abbastanza standard e quindi ci non
  dovrebbe causare problemi.   pure sottinteso che si possieda una
  certa conoscenza della struttura del filesystem del proprio sistema;
  se non la si conosce,  critico che si conservi una copia scritta
  dell'output del comando mount durante il normale funzionamento del
  sistema (o un listato di /etc/fstab, se si pu leggerlo).  Queste
  informazioni sono importanti, e non cambiano a meno che non si
  ripartizioni il disco, se ne aggiunga uno nuovo, si reinstalli il
  sistema o qualcos'altro di simile.


  Mentre redigevo questo documento, l'ultima versione del kernel di
  ``produzione'' era la 2.2.9, il che significa che i riferimenti e gli
  esempi corrispondono a quella release.  Anche se ho provato a rendere
  questo documento il pi possibile indipendente dalla versione, il
  kernel  costantemente in sviluppo e quindi se ci si procura una nuova
  versione, inevitabilmente ci saranno alcune differenze.  Si noti che
  ci non dovrebbe comunque creare grossi problemi, ma potrebbe creare
  un po' di confusione.


  Ci sono due versioni dei sorgenti del kernel Linux, ``produzione'' e
  ``sviluppo''.  Le versioni produzione sono le release con il numero
  secondario pari; 1.2.x era di produzione, come pure il 2.0.x e il
  2.2.x.  Al rilascio, questi kernel sono considerati versioni piuttosto
  stabili ed esenti da bug.  I kernel in sviluppo (2.1.x, 2.3.x, ecc.)
  sono intesi come kernel di test, per gente che vuole provare kernel
  nuovi e probabilmente molto bacati.  Si  avvisati.


  1.2.  Due parole sullo stile


  Il testo come questo  qualcosa che appare nel proprio schermo, un
  nome di un file, oppure qualcosa che pu essere digitato direttamente,
  come un comando o un'opzione a un comando (se si sta leggendo la
  versione testuale di questo documento non si noter alcuna
  differenza).  Comandi e altri input sono spesso messi tra virgolette
  (con ` '), il che causa il seguente classico problema di
  punteggiatura: se una di queste cose appare citata alla fine di una
  frase, la gente spesso digita un `.'  assieme con il comando, perch
  lo stile di citazione americano dice di mettere il punto dentro le
  virgolette.  Anche se il buon senso (e sfortunatamente questo assume
  che qualcuno con ``buon senso'' sia adotto al cosiddetto stile di
  citazione americano) dovrebbe dire di togliere prima il punto, molta
  gente semplicemente non se lo ricorda, e cos in questi casi l'ho
  messo fuori dalle virgolette. In altre parole, quando indico che si
  dovrebbe digitare ``make config'' scriver `make config', e non `make
  config.' (NdT: in italiano questo problema non si pone: il punto 
  comunque sempre messo fuori dalle virgolette.)



  2.  Domande importanti e relative risposte



  2.1.  Ad ogni modo, il kernel cosa fa?


  Il kernel Unix funge da mediatore tra i programmi e l'hardware. Per
  prima cosa si occupa della (o organizza le cose per la) gestione della
  memoria per tutti i programmi in esecuzione (processi), e assicura che
  tutti abbiano una giusta (o ingiusta, a seconda dei gusti) porzione
  dei cicli del processore. Inoltre fornisce una buona interfaccia
  abbastanza portabile per far dialogare i programmi con l'hardware.


  Ci sono certamente molte altre operazioni del kernel oltre a queste,
  ma queste funzioni basilari sono le pi importanti da conoscere.



  2.2.  Perch dovrei voler aggiornare il mio kernel?


  I kernel pi nuovi generalmente offrono la possibilit di dialogare
  con un maggior numero di tipi di hardware (ovvero, hanno pi device
  driver), possono avere una gestione migliore dei processi, possono
  girare pi velocemente delle versioni pi vecchie, possono essere pi
  stabili delle versioni precedenti e possono correggere alcuni sciocchi
  bug delle vecchie versioni.  La maggior parte della gente aggiorna il
  suo kernel perch vuole i device driver e le correzioni dei bug.



  2.3.  Che tipo di hardware supportano i nuovi kernel?


  Si veda l'Hardware-HOWTO.  In alternativa si pu dare una scorsa al
  file `config.in' nei sorgenti di Linux o scoprirlo quando si fa `make
  config'.  Quest'ultimo mostra tutto l'hardware supportato dalla
  distribuzione standard del kernel, ma non tutto quello che Linux
  supporta; molti device driver comuni (come i driver PCMCIA e alcuni
  driver di dispositivi a nastro) sono moduli caricabili mantenuti e
  distribuiti a parte.
  2.4.  Di che versione di gcc e libc ho bisogno?


  Linus consiglia nel file README incluso con i sorgenti del kernel una
  versione di gcc.  Se non si ha questa versione, la documentazione
  nella versione raccomandata di gcc dovrebbe dire se  necessario
  aggiornare la propria libc.  Questa non  una procedura difficile, ma
   importante seguire le istruzioni.



  2.5.  Cos' un modulo caricabile?


  Sono pezzi del codice del kernel non inclusi direttamente nel kernel.
  Si possono compilare separatamente e inserirli e toglierli da un
  kernel in esecuzione praticamente in qualsiasi momento.  Grazie a
  questa flessibilit, questo  ora il modo preferito per programmare
  certe caratteristiche del kernel.  Molti device driver popolari, come
  i driver PCMCIA e il driver per il dispositivo a nastro QIC-80/40,
  sono moduli caricabili.



  2.6.  Di quanto spazio ho bisogno sul disco?


  Dipende dalla particolare configurazione del proprio sistema.  Per
  prima cosa, i sorgenti compressi di Linux 2.2.9 sono quasi 14
  megabyte.  Molti li conservano anche dopo averli decompressi.  La
  decompressione e la compilazione con una configurazione normale,
  occupano fino ad altri 67 MB.



  2.7.  Quanto tempo ci mette?


  Con le macchine pi nuove la compilazione dura decisamente meno tempo
  che con quelle vecchie; un AMD K6-2/300 con un disco veloce pu creare
  un kernel 2.2.x in circa 4 minuti.  Se si ha intenzione di compilarne
  uno con i vecchi Pentium, 486 e 386 ci si prepari ad aspettare anche
  ore, giorni.

  Se ci crea problemi, e capita di poter compilare su una macchina pi
  veloce in giro per la rete,  possibile compilare il kernel nella
  macchina pi veloce (assumendo che si siano specificati i parametri
  giusti, che le proprie utility siano aggiornate e cos via) e poi
  trasferire l'immagine del kernel nella macchina pi lenta.



  3.  Come configurare realmente il kernel



  3.1.  Procurarsi i sorgenti


   possibile ottenere i sorgenti in ftp anonimo da ftp.kernel.org nella
  directory /pub/linux/kernel/vx.y, dove x.y sono la versione (es. 2.2)
  e, come menzionato in precedenza, quelli che finiscono con un numero
  dispari sono le release di sviluppo e possono essere instabili.
  Tipicamente il file si chiama linux-x.y.z.tar.gz, dove x.y.z  il
  numero della versione.  I siti solitamente conservano anche una
  versione con suffisso .bz2, che  stata compressa con bzip2 (questi
  file saranno pi piccoli e richiederanno di minor tempo per il
  trasferimento).

  La cosa migliore  usare ftp.xx.kernel.org dove xx  il codice della
  propria nazione; ad esempio ftp.it.kernel.org per l'Italia e
  ftp.us.kernel.org per gli Stati Uniti.



  3.2.  Decomprimere i sorgenti


  Si faccia il login (o si usi su) come `root', e si passi (con cd) in
  /usr/src.  Se si sono installati i sorgenti del kernel quando si 
  installato per la prima volta Linux (come fanno molti), l ci sar gi
  una directory chiamata `linux', che contiene l'intero vecchio albero
  dei sorgenti.  Se si ha spazio su disco e si vuole andare sul sicuro,
  si conservi quella directory.  Una buona idea  di scoprire quale
  versione gira nel proprio sistema e rinominare di conseguenza la
  directory.  Il comando `uname -r' mostra la versione del kernel
  corrente.  Quindi, se `uname -r' dice `1.0.9', si vorr rinominare
  (con `mv') `linux' in `linux-1.0.9'.  Se ci si sente abbastanza
  temerari, semplicemente si cancelli l'intera directory.  In ogni caso,
  ci si assicuri che non esista una directory `linux' in /usr/src prima
  di decomprimere il codice sorgente.


  Ora, in /usr/src, si decomprimano (``spacchettino'') i sorgenti con
  `tar zxpvf linux-x.y.z.tar.gz' (se si ha semplicemente un file .tar
  senza .gz alla fine, basta `tar xpvf linux-x.y.z.tar').  Il contenuto
  dei sorgenti scorrer sullo schermo.  Al termine, ci sar una nuova
  directory `linux' in /usr/src. Si faccia cd in linux e si dia
  un'occhiata al file README.  Ci sar una sezione etichettata
  `INSTALLING the kernel'.  Si seguano le istruzioni quando appropriate:
  link simbolici da sistemare, rimozione di vecchi file .o, ecc.

  Se si ha un file .bz2 e il programma bzip2 (si legga a proposito a
  http://www.muraroa.demon.co.uk/), si faccia questo:


       bz2cat linux-x.y.z.tar.bz2 | tar xvf -




  3.3.  Configurare il kernel


  Nota: Alcune parti di questa sezione sono reiterazioni/chiarificazioni
  di una sezione simile nel file README di Linus.


  Il comando `make config' lanciato in /usr/src/linux avvia uno script
  di configurazione che fa molte domande.  Richiede la bash, e quindi si
  verifichi che bash sia /bin/bash, /bin/sh oppure $BASH.


  Comunque, ci sono alcune alternative pi carine a `make config' e
  molto facilmente le si trover pi facili e comode da usare.  `make
  menuconfig'  probabilmente la pi usata.  Qualsiasi si scelga, 
  meglio che per prima cosa si familiarizzi con l'interfaccia poich pu
  capitare di doverci tornare prima di quanto si pensi.  Quelli che
  ``usano X'', possono provare `make xconfig' se hanno installato Tk
  (`click-o-rama' - Nat).  `make menuconfig'  per quelli che hanno le
  (n)curses e preferiscono un menu testuale.  Queste interfacce hanno un
  vantaggio piuttosto evidente: se ci si incasina e si fa una scelta
  sbagliata durante la configurazione,  semplice tornare indietro e
  sistemarla.


  Con `make menuconfig' e `make xconfig' le opzioni di configurazione
  appariranno in gerarchie.


  Alle domande si risponde tipicamente con `y' (s) o `n' (no).  I
  device driver tipicamente hanno un'opzione `m', che significa
  ``modulo'', intendendo che il sistema lo compiler, ma non
  direttamente dentro al kernel ma piuttosto come modulo caricabile.  Un
  modo pi comico per descriverla  come ``maybe'' (pu essere).  Alcune
  delle opzioni pi ovvie e non critiche non sono qui descritte e per
  una breve descrizione di alcune altre si veda la sezione ``Altre
  opzioni di configurazione''.  Con `make menuconfig', la barra
  spaziatrice attiva la selezione.


  Nei kernel 2.0.x e successivi, c' un'opzione `?', che fornisce una
  breve descrizione dei parametri di configurazione.  Le informazioni
  probabilmente sono le pi aggiornate.  Qui di seguito un elenco di
  alcune importanti caratteristiche (tra parentesi la gerarchia alla
  quale appartengono) seguite da una breve spiegazione.



  3.3.1.  Kernel math emulation (Processor type and features)


  Emulazione matematica a livello kernel (Tipo di processore e
  caratteristiche)

  Se non si ha un coprocessore matematico (si ha un semplice 386 o un
  486SX), si deve rispondere `y' a questa domanda.  Se si ha un
  coprocessore e si risponde comunque `y', non ci si preoccupi troppo: 
  comunque usato il coprocessore ed  ignorata l'emulazione.  Per
  qualsiasi macchina moderna, la risposta sar negativa, ma non ci si
  preoccupi se accidentalmente si risponde s; se non serve, non 
  usata.



  3.3.2.  Enhanced (MFM/RLL) disk and IDE disk/cdrom support (Block
  Devices)


  Supporto per dischi Enhanced (MFM/RLL) e dischi/cdrom IDE (Dispositivi
  a blocchi)

  Probabilmente si ha bisogno di questo supporto; significa che il
  kernel supporter i dischi fissi standard dei PC, che la maggior parte
  della gente ha.  Questo driver non comprende i dischi SCSI; vengono
  dopo nella configurazione.

  Poi verr chiesto del supporto per ``old disk-only'' (solo dischi
  vecchi) e dei driver ``new IDE'' (nuovi IDE).  Se ne scelga uno; la
  maggior differenza  che il vecchio driver supporta solo due dischi in
  una interfaccia, mentre il nuovo supporta una interfaccia secondaria e
  un lettore cdrom IDE/ATAPI.  Il nuovo driver  4k pi grande del
  vecchio e si suppone sia pure ``migliorato'', intendendo che a parte
  contenere un numero diverso di bug, potrebbe migliorare le prestazioni
  dei dischi, specialmente se si ha dell'hardware recente (di tipo
  EIDE).


  3.3.3.  Networking support (General Setup)


  Supporto di rete (Impostazioni generali)


  All'inizio, conviene rispondere semplicemente `y' se la propria
  macchina  in una rete come Internet o si vuole usare SLIP, PPP, term,
  ecc per avere l'accesso a Internet.  Comunque, poich molti pacchetti
  (come l'X Window system) richiedono il supporto di rete, si dovrebbe
  rispondere `y' anche se la propria macchina non risiede in una vera
  rete.  Pi tardi, verr chiesto se si vuole il supporto per il
  networking TCP/IP; ancora, si risponda `y' anche l a meno che non si
  sia assolutamente sicuri.



  3.3.4.  System V IPC (General Setup)


  IPC System V (Impostazioni generali)


  Una delle migliori definizioni di IPC (Interprocess Communication --
  Comunicazione Interprocessi)  nel glossario del Perl book.  Non  da
  sorprendersi se alcuni programmatori Perl l'adoperano per permettere
  ai processi di parlarsi l'un l'altro, come fanno molti altri programmi
  (DOOM, fra gli altri), e quindi non  una buona idea rispondere n a
  meno che non si sappia esattamente quello che si sta facendo.



  3.3.5.  Processor family (Processor type and features)

  (in older kernels: Use -m486 flag for 486-specific optimizations)


  Famiglia del processore (Tipo di processore e caratteristiche)
  (nei vecchi kernel: usare il flag -m486 per ottimizzazioni specifiche
  per il 486)


  Tradizionalmente, si traduceva in alcune ottimizzazioni per un
  particolare processore; il kernel girava bene anche su altri chip, ma
  era un po' pi grande.  Comunque, nei nuovi kernel questo non  pi
  vero, e quindi si pu specificare il processore per il quale si sta
  compilando il kernel.  Un kernel ``386'' funzioner per tutte le
  macchine.



  3.3.6.  SCSI support


  Supporto SCSI


  Se si posseggono dispositivi SCSI, si risponda `y'.  Saranno chieste
  ulteriori informazioni, come il supporto per CD-ROM, dischi e quale
  tipo di adattatore SCSI si possiede.  Si veda lo SCSI HOWTO per
  maggiori dettagli.





  3.3.7.  Network device support


  Supporto dei dispositivi di rete


  Se si ha una scheda di rete o si vuole usare SLIP, PPP o un adattatore
  per porta parallela per connettersi a Internet, si risponda `y'.  Lo
  script di configurazione chieder poi il tipo di scheda che si
  possiede e quale protocollo usare.



  3.3.8.  Filesystems


  Filesystem


  Lo script di configurazione chiede se si vuole il supporto per i
  seguenti filesystem:


  Standard (minix) -- Le distribuzioni pi nuove non creano filesystem
  minix e molti non lo usano pi, ma pu ancora essere una buona idea
  configurarlo.  Alcuni programmi per la creazione di ``dischi di
  ripristino'' (rescue disk) lo usano e molti floppy hanno ancora un
  filesystem minix, poich minix  meno doloroso da usare su un floppy.


  Second extended -- Questo  il filesystem standard di Linux.
  Sicuramente se ne ha uno di questo tipo e si deve rispondere `y'.


  msdos -- Se si vogliono usare partizioni MS-DOS del disco fisso,
  montare dischetti formattati in DOS, si risponda `y'.


  Sono disponibili diversi altri tipi di filesystem di altri sistemi
  operativi.


  /proc -- (un'idea dei Bell Labs, penso).  Uno non crea un filesystem
  proc in un disco;  un interfaccia filesystem al kernel e ai processi.
  Molti visualizzatori di processi (come `ps') lo usano.  Qualche volta
  si provi `cat /proc/meminfo' o `cat /proc/devices'.  Alcune shell (rc,
  in particolare) usano /proc/self/fd (noto come /dev/fd su altri
  sistemi) per l'I/O.  Si deve certamente rispondere `y' a questa
  domanda; molti strumenti importanti ne dipendono.


  NFS -- Se la propria macchina vive in una rete e si vogliono usare
  filesystem su altri sistemi con NFS, si risponda `y'.


  ISO9660 -- Presente nella maggior parte dei CD-ROM.  Se si ha un
  lettore CD-ROM e lo si vuole usare sotto Linux, si risponda `y'.



  3.3.8.1.  Ma io non so di quali filesystem ho bisogno!


  Ok, si digiti `mount'. L'output apparir simile a questo:


           blah# mount
           /dev/hda1 on / type ext2 (defaults)
           /dev/hda3 on /usr type ext2 (defaults)
           none on /proc type proc (defaults)
           /dev/fd0 on /mnt type msdos (defaults)




  Si guardi ogni riga; la parola dopo `type'  il tipo di filesystem.
  In questo esempio, i miei filesystem / e /usr sono second extended,
  sto usando /proc, e c' un dischetto montato usando il filesystem
  msdos (bleah).

  Si pu provare `cat /proc/filesystems' se si ha /proc attualmente
  abilitato; elencher i filesystem presenti nel kernel corrente.

  La configurazione di filesystem raramente usati e non critici pu
  causare un ingrossamento del kernel; si veda la sezione sui moduli per
  un modo di evitarlo e la sezione ``Trabocchetti'' per capire perch
  non  desiderabile un kernel grosso.



  3.3.9.  Character devices


  Dispositivi a caratteri


  Qui si abilita il driver per la propria stampante (parallela), per il
  busmouse, per il mouse PS/2 (molti portatili usano il protocollo del
  mouse PS/2 per le loro trackball), per alcuni dispositivi a nastro e
  altri dispositivi ``a carattere'' di questo tipo.  Si risponda `y'
  quando appropriato.


  Nota: gpm  un programma che permette l'uso di un mouse fuori
  dall'ambiente X per il cut and paste (``taglia e incolla'') tra le
  console virtuali.   piuttosto carino se si ha un mouse seriale,
  poich coesiste bene con X, ma sono necessari alcuni altri trucchi per
  gli altri tipi di mouse.



  3.3.10.  Sound


  Audio


  Se si desidera ardentemente di sentire biff abbaiare, si risponda `y'
  e si potr confessare tutto sulla propria scheda audio al programma di
  configurazione (una nota sulla configurazione della scheda audio:
  quando viene chiesto se si vuole installare la versione completa del
  driver, si pu rispondere `n' risparmiando un po' di memoria
  scegliendo solo le caratteristiche che si giudicano necessarie).


  Se si  seriamente interessati al supporto per la scheda audio, si dia
  un'occhiata sia al driver libero a http://www.linux.org.uk/OSS/ sia
  all'Open Sound System commerciale a http://www.opensound.com/.




  3.3.11.  Altre opzioni di configurazione


  Qui non sono state elencate tutte le opzioni di configurazione perch
  cambiano troppo spesso o sono piuttosto banali (per esempio, 3Com
  3C509 support per compilare il device driver per questa particolare
  scheda Ethernet).  Esista una lista esaustiva di tutte le opzioni (pi
  un metodo per metterle nello script Configure) in un lavoro avviato e
  mantenuto da Axel Boldt (boldt@math.ucsb.edu) e nel suo help in linea.
   pure disponibile come un unico grosso file in
  Documentation/Configure.help nel proprio albero dei sorgenti del
  kernel a partire dalla versione 2.0.



  3.3.12.  Kernel hacking


  >Dal README di Linus:


       i dettagli della configurazione ``kernel hacking'' solita
       mente risultano in un kernel pi grosso  pi lento (o
       entrambi) e possono pure rendere il kernel meno stabile con
       figurando alcune routine che provano attivamente a rompere
       il cattivo codice per trovare i problemi del kernel (kmal
       loc()).  Quindi probabilmente si dovrebbe rispondere `n'
       alla domanda nel caso di un kernel di ``produzione''.




  3.4.  E ora cosa? (Il Makefile)


  Dopo aver finito la configurazione, un messaggio comunica che il
  proprio kernel  stato configurato, e di ``controllare il Makefile di
  pi alto livello per ulteriori configurazioni'' (``check the top-level
  Makefile for additional configuration''), ecc.


  Quindi, si dia un'occhiata al Makefile.  Probabilmente non sar
  necessario modificarlo, ma non pu far male guardarlo.  Si possono
  pure cambiare le sue opzioni con il comando `rdev' una volta
  installato il nuovo kernel.  Se ci si perde guardando quel file, non 
  da preoccuparsi.



  4.  Compilare il kernel



  4.1.  Far pulizia e sistemare le dipendenze


  Quando termina lo script di configurazione, dice pure di fare `make
  dep' e (possibilmente) `clean'.  Quindi, si faccia il `make dep'. Ci
  assicura che tutte le dipendenze, come i file include, siano a posto.
  Non ci mette tanto, a meno che il proprio computer non sia piuttosto
  lento.  Per le vecchie versioni del kernel, quando terminava, si
  doveva fare un `make clean'.  Ci rimuoveva tutte i file oggetto e
  alcune altre cose che le vecchie versioni lasciano in giro.  In ogni
  caso, non si dimentichi questo passo prima di provare a ricompilare il
  kernel.

  4.2.  Tempo di compilazione


  Dopo il dep ed il clean, si pu fare `make bzImage' o `make bzdisk'
  (questa  la parte che richiede un tempo pi lungo).  `make bzImage'
  compiler il kernel, e lascer (tra le altre cose) un file in
  arch/i386/boot chiamato `bzImage'.  Questo  il nuovo kernel
  compresso.  `make bzdisk' fa la stessa cosa, ma piazza pure il nuovo
  bzImage su un dischetto che si spera sia stato messo nel driver
  ``A:''.  `bzdisk'  piuttosto comodo per verificare un nuovo kernel;
  se si pianta (o semplicemente non fa le cose giuste), semplicemente
  basta rimuovere il floppy e riavviare con il proprio vecchio kernel.
   pure un modo comodo di fare il boot se accidentalmente si cancella
  il proprio kernel (o altre cose ugualmente terribili).  Lo si pu pure
  usare per installare un nuovo sistema quando si  semplicemente
  scaricato il contenuto di un disco in un altro (``tutto questo e molto
  altro! ORA quanto vorresti pagare?'').


  Tutti i kernel ragionevolmente recenti sono compressi, da qui il `bz'
  di fronte al nome.  Un kernel compresso si decomprime da solo
  automaticamente quando eseguito.

  Nei kernel pi vecchi, non c'era l'opzione per costruire un bzImage;
  era semplicemente un zImage.  Quella opzione al momento  ancora
  disponibile ma comunque, data la dimensione del codice dei nuovi
  kernel, ora  pi o meno obbligatorio compilare un bzImage perch il
  vecchio metodo non riesce a gestire kernel troppo grossi.



  4.3.  Altre ``make''abilit


  `make mrproper' far un `clean molto pi accurato.  Qualche volta 
  necessario; si pu desiderare di farlo dopo aver applicato una patch.
  `make mrproper' canceller anche il file di configurazione e quindi
  conviene salvarselo (.config) se si vede che pu essere utile.


  `make oldconfig' prover a configurare il kernel da un vecchio file di
  configurazione; eseguir da solo tutto il processo `make config'.  Se
  non si  mai compilato un kernel prima o non si possiede un vecchio
  file di configurazione, allora probabilmente non lo si dovrebbe fare,
  in quanto molto probabilmente si vorr modificare la configurazione
  predefinita.


  Si veda la sezione sui moduli per una descrizione di `make modules'.



  4.4.  Installare il kernel


  Quando si ha un kernel che sembra funzionare nel modo desiderato,
  allora  il momento di installarlo.  Molti usano LILO (Linux Loader)
  per questo.  `make bzlilo' installer il kernel, vi lancer LILO e
  preparer tutto per il boot, MA SOLO se lilo  configurato nel proprio
  sistema nel modo seguente: il kernel  /vmlinuz, lilo  in /sbin e il
  proprio file di configurazione di lilo (/etc/lilo.conf)  in accordo
  con queste cose.


  Altrimenti,  necessario usare LILO direttamente.   un pacchetto
  abbastanza semplice da installare e da usare, ma ha la tendenza a
  confondere la gente con il file di configurazione.  Si dia un'occhiata
  al file di configurazione (/etc/lilo/config per le vecchie versioni
  oppure /etc/lilo.conf per quelle nuove) e si veda qual 
  l'impostazione corrente.  Il file di configurazione  simile a questo:



      image = /vmlinuz
          label = Linux
          root = /dev/hda1
          ...



  `image ='  impostato al kernel correntemente installato.  La maggior
  parte della gente usa /vmlinuz. `label'  usata da lilo per
  determinare quale kernel o sistema operativo avviare, e `root'  la /
  di quel particolare sistema operativo.  Si faccia una copia di backup
  del vecchio kernel e si copi il bzImage appena creato al suo posto (si
  dovr dire `cp bzImage /vmlinuz' se si usa `/vmlinuz').  Poi, si
  rilanci lilo: su un nuovo sistema si pu semplicemente lanciare
  `lilo', ma in uno vecchio si dovr fare /etc/lilo/install o
  addirittura /etc/lilo/lilo -C /etc/lilo/config.


  Se si vuol saperne di pi sulla configurazione di LILO, o non si ha
  LILO, si prenda la versione pi recente dal proprio sito ftp preferito
  e si seguano le istruzioni.


  Per avviare uno dei propri vecchi kernel dal disco fisso (un altro
  modo per salvarsi nel caso si facciano casini con il nuovo), si copino
  le righe che seguono `image = xxx' (compresa) alla fine del file di
  configurazione di LILO, e si modifichi `image = xxx' in `image = yyy',
  dove `yyy'  il percorso completo del file in cui si fatto il backup
  del kernel.  Poi si cambi `label = zzz' in `label = linux-backup' e si
  rilanci lilo.  Pu essere necessario mettere nel file di
  configurazione una riga che dice `delay=x', dove x  il numero di
  decimi di secondo che LILO dovr attendere prima di fare il boot,
  cosicch lo si pu interrompere (con il tasto shift, per esempio), e
  inserire l'etichetta della immagine di boot di backup (nel caso
  succedano cose non proprio piacevoli).



  5.  ``Rattoppare'' il kernel



  5.1.  Applicare una patch


  Gli aggiornamenti incrementali del kernel sono distribuiti come patch
  (``toppe'').  Per esempio, se si ha la versione 1.1.45 e si ha notizia
  che c' una `patch46.gz' in giro, significa che si pu aggiornare alla
  versione 1.1.46 applicando quella patch.  Prima pu essere una buona
  idea fare una copia di backup dell'albero dei sorgenti (`make clean' e
  poi `cd /usr/src; tar zcvf old-tree.tar.gz linux' creer un archivio
  compresso).


  Cos, continuando con l'esempio precedente, si supponga di avere
  `patch46.gz' in /usr/src. Si faccia cd in /usr/src e si faccia `zcat
  patch46.gz | patch -p0' (o `patch -p0 < patch46' se la patch non 
  compressa).  Si vedranno delle cose sfrecciare (o fluttuare, se il
  proprio sistema  abbastanza lento) che dicono che sta provando ad
  applicare dei pezzi (hunk) e quando ha o meno successo.  Solitamente
  questa azione  troppo veloce per poterla leggere e non si  troppo
  sicuri quando ha funzionato o meno, quindi pu essere un'idea usare
  l'opzione -s con patch, che dice a patch di riportare solo i messaggi
  d'errore.  Per cercare le parti che non sono andate a buon fine, si
  passi in /usr/src/linux e si cerchino i file con estensione .rej.
  Alcune versioni di patch (versioni pi vecchie che possono essere
  state compilate con un filesystem inferiore) lasciano i rifiuti
  (reject) con un estensione #.  Si pu usare `find' per la ricerca:

      find .  -name '*.rej' -print


  mostrer nello standard output tutti i file residenti nella directory
  corrente e in ogni sottodirectory con estensione .rej.


  Se tutto va a buon fine, di faccia un `make clean', `config', e `dep'
  come descritto nelle sezioni 3 e 4.


  Ci sono alcune altre opzioni per il comando patch.  Come menzionato
  prima, patch -s sopprimer tutti messaggi tranne quelli d'errore.  Se
  si conservano i sorgenti del kernel in un posto diverso da
  /usr/src/linux, patch -p1 (in quella directory) applicher
  correttamente la patch.  Altre opzioni di patch sono ben documentate
  nella pagina man.



  5.2.  Se qualcosa va storto


  (Nota: questa sezione fa riferimento principalmente a kernel piuttosto
  vecchi)


  Il problema pi frequente che era solito comparire era quando una
  patch modificava un file chiamato `config.in' e questo non sembrava
  pi essere a posto perch lo si era modificato per adattare le opzioni
  alla propria macchina.  Di questo ora si tiene conto, si potrebbe
  ancora incontrare con vecchie release.  Per correggerlo, si veda il
  file config.in.rej, e si veda cosa rimane della patch originale.  Le
  modifiche saranno tipicamente marcate con `+' e `-' all'inizio della
  riga.  Si vedano le righe l attorno e si ricordi se erano stato
  impostate a `y' o `n'. Ora si editi il config.in, e si cambi `y' in
  `n' e `n' in `y' quando appropriato.  Si faccia un

      patch -p0 < config.in.rej


  e se finisce con successo, allora si pu continuare con la configu
  razione e la compilazione.  Il file config.in.rej rimarr, ma si pu
  cancellarlo.


  Se si incontrano ulteriori problemi, si pu aver installato una patch
  ``fuori uso''.  Se patch dice `previously applied patch detected:
  Assume -R?' (rilevata una patch applicata precedentemente: assumo
  -R?), probabilmente si sta provando ad applicare una patch precedente
  al numero di versione corrente; se si risponde `y' prover a degradare
  i sorgenti e molto probabilmente fallir; sar quindi necessario
  prendere in blocco un nuovo albero dei sorgenti (che poteva non essere
  una cattiva idea sin dall'inizio).


  Per tornare indietro (disapplicare) di una patch, si usi `patch -R'
  sulla patch originale.


  La miglior cosa da fare quando le patch fanno realmente casino  di
  partire ancora da un albero dei sorgenti nuovo di zecca (per esempio,
  da uno dei file linux-x.y.z.tar.gz), e ricominciare.



  5.3.  Sbarazzarsi dei file .orig


  Gi dopo poche patch, i file .orig cominciano ad ammucchiarsi.  Per
  esempio, un albero 1.1.51 che ho ripulito l'ultima volta quand'era
  1.1.48: rimuovendo i file .orig ho recuperato oltre mezzo mega.

      find .  -name '*.orig' -exec rm -f {} ';'


  se ne occuper al vostro posto.  Le versioni di patch che usano # per
  i reject usano una tilde invece di .orig.

  Ci sono modi migliori per sbarazzarsi dei file .orig, che dipendono da
  GNU xargs:

      find .  -name '*.orig' | xargs rm


  o il metodo ``abbastanza sicuro ma un po' pi prolisso'':

      find . -name '*.orig' -print0 | xargs --null rm --





  5.4.  Altre patch


  Esistono altre patch (io le chiamo ``non standard'') oltre a quelle
  che distribuisce Linus.  Se le si applica, le patch di Linus
  potrebbero non funzionare correttamente e si dovr o tornare indietro,
  correggere i sorgenti o la patch, installare un nuovo albero dei
  sorgenti, o una combinazione di queste cose.  Ci pu divenire
  abbastanza frustrante, se non si vogliono modificare i sorgenti (con
  la possibit di risultati pessimi), si rimuovano le patch non standard
  prima di applicare quelle di Linus, o semplicemente si installi un
  nuovo albero.  Poi, si pu provare a vedere se le patch non standard
  funzionano ancora.  Se non lo fanno, o si resta con il vecchio kernel,
  giochicchiando con la patch e i sorgenti per farli funzionare, o si
  aspetta (probabilmente elemosinando) che esca una nuova versione della
  patch.


  Quanto comuni sono le patch che non sono nella distribuzione standard?
  Probabilmente se n' sentito parlare.  Ero avvezzo ad usare la patch
  noblink per le mie console virtuali perch odio il cursore
  lampeggiante (questa patch  -- o almeno era -- aggiornata
  frequentemente per le nuove release del kernel).  Con la maggior parte
  dei device driver sviluppati come moduli caricabili, la frequenza di
  patch ``non standard''  diminuita significativamente.




  6.  Pacchetti aggiuntivi

  Il proprio kernel linux ha molte caratteristiche che non sono spiegate
  negli stessi sorgenti del kernel; queste caratteristiche sono
  tipicamente utilizzate attraverso pacchetti esterni. Sono qui elencati
  alcuni dei pi comuni.



  6.1.  kbd


  La console di Linux probabilmente ha pi caratteristiche che meriti.
  Tra queste ci sono la possibilit di cambiare i font, rimappare la
  propria tastiera, cambiare modalit video (nei kernel pi nuovi), ecc.
  Il pacchetto kbd contiene programmi che permettono all'utente di fare
  tutto questo, oltre a numerosi font e mappe di tastiera per
  praticamente qualsiasi tastiera.   disponibile dagli stessi siti che
  conservano i sorgenti del kernel.



  6.2.  util-linux

  Rik Faith (faith@cs.unc.edu) ha messo assieme una grossa collezione di
  utility per Linux che per una strana coincidenza  stata chiamata
  util-linux.  Sono ora mantenute da Andries Brouwer (util-
  linux@math.uio.no).  Disponibili in ftp anonimo da sunsite.unc.edu in
  /pub/Linux/system/misc, contengono programmi come setterm, rdev, e
  ctrlaltdel, che sono importanti per il kernel.  Come dice Rik, non le
  si installi senza pensare; non  necessario installare tutto nel
  pacchetto, si potrebbero veramente causare seri problemi se lo si fa.



  6.3.  hdparm


  Come con molti pacchetti, questo era un tempo una patch per il kernel
  e un programma di supporto.  La patch  stata integrata nel kernel
  ufficiale e il programma per ottimizzare o giochicchiare con il
  proprio disco fisso  ora distribuito separatamente.



  6.4.  gpm

  gpm sta per general purpose mouse.  Questo programma permette di fare
  il cut and paste tra le console virtuali e altre cosette con un gran
  numero di tipi di mouse.



  7.  Alcuni trabocchetti



  7.1.  make clean

  Se il proprio nuovo kernel fa veramente cose strane dopo un upgrade,
  c' la possibilit che si sia dimenticato di fare make clean prima di
  compilare il nuovo kernel.  I sintomi possono essere qualsiasi, da
  crash senza motivo, a strani problemi di I/O fino a prestazioni
  pietose.  Ci si assicuri di fare anche un make dep.


  7.2.  Kernel grossi o lenti

  Se il proprio kernel si succhia un sacco di memoria,  troppo grande
  e/o ci mette un'eternit per compilarsi anche se si  preso il nuovo
  Quadbazillium-III/4400, probabilmente si sono configurate un sacco di
  cose non necessarie (device driver, filesystem, ecc).  Se non le si
  usa, non le si configuri, perch non fanno altro che occupare memoria.
  Il sintomo pi ovvio di un kernel cicciotto  il continuo swap tra la
  memoria e il disco; se il proprio disco sta facendo un sacco di rumore
  e non  uno di quei vecchi Fujitsu Eagles che sembrano jet che
  atterrano quando vengono spenti, si dia un'occhiata alla
  configurazione del kernel.


  Si pu scoprire quanta memoria sta usando il kernel prendendo il
  totale della memoria nella propria macchina e sottraendogli
  l'ammontare di ``total mem'' in /proc/meminfo o l'output del comando
  `free'.



  7.3.  La porta parallela non funziona/la mia stampante non funziona


  Le opzioni di configurazioni per i PC sono: primo, sotto la categoria
  `General Setup', si selezioni `Parallel port support' e `PC-style
  hardware'. Poi sotto a `Character devices', si selezioni `Parallel
  printer support'.

  Poi ci sono i nomi.  Linux 2.2 chiama il dispositivo della stampante
  in maniera differente dalle release precedenti.  Come risultato
  finale, se si aveva un lp1 sotto il proprio vecchio kernel,
  probabilmente  un lp0 in quello nuovo.  Si usi `dmesg' o si dia una
  scorsa ai log in /var/log per capire il problema.



  7.4.  Il kernel non si compila


  Se non si compila, allora probabilmente una patch ha fallito o i
  propri sorgenti sono in qualche modo corrotti.  Inoltre potrebbe non
  essere corretta la propria versione di gcc, o potrebbe essere essa
  stessa corrotta (per esempio, i file include potrebbero contenere
  degli errori).  Ci si assicuri che i link simbolici che Linus descrive
  nel README siano impostati correttamente. In generale, se un kernel
  standard non si compila, nel sistema c' qualcosa di seriamente
  sbagliato, ed  probabilmente necessaria la reinstallazione di alcuni
  strumenti.


  In alcuni casi, gcc pu andare in crash a causa di problemi hardware.
  Il messaggio d'errore  qualcosa di simile a ``xxx exited with signal
  15'' e in genere sembrer molto misterioso.  Probabilmente non lo
  menzionerei se non mi fosse successo una volta -- avevo della memoria
  cache difettata e il compilatore occasionalmente andava in palla a
  caso.  Si provi per prima cosa a reinstallare gcc se si  soggetti al
  problema.  Si dovrebbe essere sospettosi solo se il kernel si compila
  bene disabilitando la cache esterna, con un ammontare di RAM ridotto,
  ecc.


  Suggerire alla gente che il loro hardware ha dei problemi tende a
  disturbare i sonni.  Bene, non lo far pi.  C' una FAQ per questo --
   a http://www.bitwizard.nl/sig11/.

  7.5.  La nuova versione del kernel non fa il boot


  Non si  lanciato LILO o non lo si  configurato correttamente.  Una
  cosa che mi ha fregato una volta  stato un problema nel file di
  configurazione; diceva `boot = /dev/hda1' invece di `boot = /dev/hda'
  (questa cosa potrebbe essere un po' noiosa all'inizio ma una volta che
  si ha un file di configurazione funzionante, non sar pi necessario
  modificarlo).



  7.6.  Si  dimenticato di lanciare LILO oppure il sistema proprio non
  si avvia


  Ooops! La cosa migliore che si pu fare qui  di fare il boot da un
  dischetto o da un CDROM e preparare un altro dischetto avviabile (come
  farebbe `make zdisk').   necessario sapere dov' il proprio
  filesystem di root (/) e di quale tipo  (e.g. second extended,
  minix).  Nell'esempio seguente  necessario conoscere anche il
  filesystem in cui risiede il proprio albero dei sorgenti
  /usr/src/linux, il suo tipo e dov' normalmente montato.


  Nell'esempio seguente /  /dev/hda1 e il filesystem che contiene
  /usr/src/linux  /dev/hda3, normalmente montato in /usr.  Entrambi
  sono filesystem second extended.  L'immagine del kernel funzionante 
  in /usr/src/linux/arch/i386/boot ed  chiamata bzImage.


  L'idea  che se esiste un bzImage funzionante,  possibile usarlo per
  un nuovo dischetto.  Un'altra alternativa, che potrebbe o no
  funzionare bene (dipende dal modo in cui si  incasinato il proprio
  sistema)  discussa dopo l'esempio.


  Per prima cosa si avvii dalla combinazione di un boot e un root disk,
  oppure da un rescue disk, e si monti il filesystem che contiene
  l'immagine del kernel funzionante:



      mkdir /mnt
      mount -t ext2 /dev/hda3 /mnt



  Se mkdir dice che la directory esiste gi semplicemente si ignori
  l'errore.  Ora, si faccia cd nel posto dov'era il kernel funzionante.
  Si noti che

  /mnt + /usr/src/linux/arch/i386/boot - /usr = /mnt/src/linux/arch/i386/boot


  Si inserisca un dischetto formattato nel drive A: (non il proprio boot
  o root disk!), di scarichi l'immagine nel dischetto e lo si configuri
  per il proprio filesystem di root:



      cd /mnt/src/linux/arch/i386/boot
      dd if=bzImage of=/dev/fd0
      rdev /dev/fd0 /dev/hda1


  Si faccia cd in / e si smonti il filesystem /usr normale:


      cd /
      umount /mnt



  Ora si dovrebbe essere in grado di riavviare il proprio sistema
  normalmente da questo floppy.  Non si dimentichi di lanciare lilo (o
  correggere qualsiasi altra cosa che si  fatto di sbagliato) dopo aver
  riavviato!


  Come menzionato in precedenza c' un'altra alternativa comune.  Se
  capita di avere un'immagine funzionante del kernel in / (/vmlinuz per
  esempio), la si pu usare per un dischetto di boot.  Si suppongano
  tutte le condizioni precedenti e che la nostra immagine del kernel sia
  /vmlinuz, si facciano solamente le seguenti modifiche all'esempio
  precedente: si cambi /dev/hda3 in /dev/hda1 (nel filesystem /),
  /mnt/src/linux in /mnt, e if=bzImage in if=vmlinuz. La nota che spiega
  come derivare /mnt/src/linux pu essere ignorata.


  L'uso di LILO con dischi grossi (pi di 1024 cilindri) pu causare
  problemi.  Si veda il LILO mini-HOWTO o la documentazione per aver
  aiuto in proposito.



  7.7.  Dice `warning: bdflush not running'


  Questo pu essere un problema serio.  A partire dalle release del
  kernel dopo la 1.0 (attorno al 20 aprile 1994),  stato
  aggiornato/rimpiazzato un programma chiamato `update' che scarica
  periodicamente i buffer del filesystem.  Si prendano i sorgenti di
  `bdflush' (lo si dovrebbe trovare dove si sono presi i sorgenti del
  kernel) e lo si installi (probabilmente  meglio far funzionare il
  sistema con il vecchio kernel mentre lo si fa).  Si installa come
  `update' e dopo un riavvio, il nuovo kernel non dovrebbe pi
  protestare.



  7.8.  Non riesco a far funzionare il mio lettore CD-ROM IDE/ATAPI


  Piuttosto strano, ma un sacco di gente non riesce a far funzionare i
  loro lettori ATAPI, probabilmente perch ci sono un po' di cose che
  vanno storte.

  Se il proprio CD-ROM  il solo dispositivo in una particolare
  interfaccia IDE, dovrebbe essere impostato come ``master'' o
  ``single''.  Questo  l'errore pi comune.

  Creative Labs (per dirne una) ora ha messo interfacce IDE sulle sue
  schede audio.  Comunque, questo porta all'interessante problema che
  mentre alcuni hanno solo una interfaccia, molti hanno due interfacce
  IDE integrate nelle loro schede madri (solitamente all'IRQ15), cos 
  pratica comune rendere l'interfaccia della soundblaster una terza
  porta IDE (IRQ11).

  Ci causa problemi con Linux in quelle versioni 1.2.x che non
  supportano una terza interfaccia IDE (c' il supporto a partire da
  qualche parte nella serie 1.3.x, ma si ricordi che  in sviluppo ed
  inoltre non rileva automaticamente le interfacce).  Per andare a capo
  di questa cosa non si hanno molte scelte.

  Se si ha gi una seconda porta IDE,  possibile che non la si stia
  usando o che non abbia gi connessi due dispositivi.  Si tolga il
  lettore ATAPI dalla scheda audio e lo si metta nella seconda
  interfaccia.  Si pu poi disabilitare l'interfaccia della scheda
  audio, il che fa risparmiare anche un IRQ.

  Se non si ha una seconda interfaccia, si configuri (con i ponticelli)
  l'interfaccia della scheda audio (non la parte relativa alla scheda
  audio) come IRQ15, la seconda interfaccia.  Dovrebbe funzionare.



  7.9.  Dice strane cose a proposito di richieste di instradamento


  Ci si procuri una nuova versione del programma route e di qualsiasi
  altro programma per manipolare gli instradamenti.
  /usr/include/linux/route.h  (che in realt  un file in
  /usr/src/linux)  cambiato.



  7.10.  Il firewalling non funziona in 1.2.0

  Si aggiorni almeno alla versione 1.2.1.



  7.11.  ``Not a compressed kernel Image file''

  ``Non  un file Immagine del kernel compressa''

  Non si usi il file vmlinux creato in /usr/src/linux come propria
  immagine di boot; quello giusto  [..]/arch/i386/boot/bzImage.



  7.12.  Problemi con i terminali console dopo l'aggiornamento al 1.3.x

  Si cambi la parola dumb in linux nella voce termcap della console in
  /etc/termcap.  Si potrebbe dover pure creare una voce terminfo.



  7.13.  Non riesco pi a compilare quasi niente dopo l'upgrade del ker
  nel

  I sorgenti del kernel Linux includono numerosi file include (quelle
  robe che finiscono con .h) ai quali viene fatto riferimento dagli
  include standard in /usr/include.  Solitamente ne viene fatto
  riferimento in questo modo (dove xyzzy.h vorrebbe essere qualcosa in
  /usr/include/linux):

      #include <linux/xyzzy.h>


  Solitamente c' un link chiamato linux in /usr/include alla directory
  include/linux del propri sorgenti del kernel (in un sistema tipico
  /usr/src/linux/include/linux). Se non c' questo link, o punta in un
  posto sbagliato, la maggior parte delle cose non si compileranno
  affatto.  Se si  deciso che i sorgenti del kernel occupano troppo
  spazio su disco e li si  cancellati allora ovviamente il problema
  sar questo.  Un'altra cosa che potrebbe non andare bene sono i
  permessi dei file; se il proprio utente root ha una umask che per
  default non permette agli altri utenti di vedere i suoi file e si sono
  estratti i sorgenti del kernel senza l'opzione p (preserva i permessi
  dei file), quegli utenti non saranno in grado di usare il compilatore
  C.  Sebbene per correggere questa cosa si possa usare il comando
  chmod, probabilmente  pi facile riestrarre i file include.  Lo si
  pu fare nello stesso modo dei sorgenti completi all'inizio, aggiun
  gendo solamente un argomento.


      blah# tar zxvpf linux.x.y.z.tar.gz linux/include


  Nota: ``make config'' creer il link /usr/src/linux se non c'.



  7.14.  Incrementare i limiti

  I pochi comandi di esempio che seguono possono essere utili a quanti
  si domandano come incrementare alcuni limiti imposti dal kernel:

  echo 4096 > /proc/sys/kernel/file-max
  echo 12288 > /proc/sys/kernel/inode-max
  echo 300 400 500 > /proc/sys/vm/freepages





  8.  Note per l'aggiornamento alle versioni 2.0.x, 2.2.x

  I kernel delle versioni 2.0.x e 2.2.x introducono un po' di modifiche
  per l'installazione del kernel.  Il file Documentation/Changes
  nell'albero dei sorgenti del 2.0.x contiene informazioni per entrambe
  le versioni.  Molto probabilmente si dovranno aggiornare diversi
  pacchetti chiave, come gcc, libc e SysVInit, e forse modificare alcuni
  file di sistema.



  9.  Moduli

  I moduli caricabili del kernel possono far risparmiare memoria e
  facilitare la configurazione.  Lo scopo dei moduli  cresciuto fino a
  includere filesystem, driver per schede Ethernet, driver per
  dispositivi a nastro, driver per la stampante e altro.



  9.1.  Installare le utility per i moduli


  Le utility per i moduli sono disponibili nello stesso posto dove si
  sono presi i sorgenti del proprio kernel come modutils-x.y.z.tar.gz;
  si scelga il pi alto livello di patch x.y.z che sia minore o uguale a
  quello del proprio kernel corrente.  Le si decomprima con `tar zxvf
  modutils-x.y.z.tar.gz', si faccia cd nella directory creata (modutils-
  x.y.z), si legga il file README e si seguano le istruzioni di
  installazione (solitamente qualcosa di semplice, come make install).
  Ora si dovrebbero avere i programmi insmod, rmmod, ksyms, lsmod,
  genksyms, modprobe e depmod in /sbin.  Se si vuole si verifichino le
  utility con il driver di esempio ``hw'' nella directory insmod; si
  veda il file INSTALL in quella sottodirectory per i dettagli.


  insmod inserisce un modulo dentro un kernel in esecuzione.  I moduli
  solitamente hanno un'estensione .o; il driver di esempio summenzionato
   chiamato drv_hello.o, cos per inserirlo uno dovrebbe usare `insmod
  drv_hello.o'.  Per vedere i moduli che il kernel sta attualmente
  usando si usi lsmod.  L'output  simile a questo:

      blah# lsmod
      Module:        #pages:  Used by:
      drv_hello          1


  `drv_hello'  il nome del modulo, usa una pagina (4k) di memoria e al
  momento nessun'altro modulo del kernel ne dipende.  Per rimuovere
  questo modulo, si usi `rmmod drv_hello'.  Si noti che rmmod vuole un
  nome di modulo, non un nome di file; lo si prenda dall'elenco di
  lsmod.  Lo scopo delle altre utility per i moduli  documentato nelle
  relative pagine man.



  9.2.  Moduli distribuiti con il kernel

  Dalla versione 2.0.30, praticamente qualsiasi cosa  disponibile come
  modulo caricabile. Per usarli, per prima cosa ci si assicuri di non
  configurarli dentro il kernel; ovvero, non si risponda y ad essi
  durante il `make config'.  Si compili un nuovo kernel e si riavvii.
  Poi, si faccia ancora cd in /usr/src/linux e si esegua un `make
  modules'.  Questo compila tutti i moduli che si sono specificati nella
  configurazione del kernel e mette dei link a essi in
  /usr/src/linux/modules.  Li si pu usare direttamente da quella
  directory o eseguire `make modules_install', che li installa in
  /lib/modules/x.y.z, dove x.y.z  la versione del kernel.


  Questo pu essere utile specialmente con i filesystem.  Si potrebbero
  non usare frequentemente i filesystem minix o msdos.  Per esempio, se
  incappo in un dischetto msdos, potrei fare insmod
  /usr/src/linux/modules/msdos.o e poi rmmod msdos quando ho finito.
  Questa procedura fa risparmiare circa 50k di RAM nel kernel durante le
  normali operazioni.  Un piccola nota al contorno per il filesystem
  minix: si dovr sempre configurarlo direttamente dentro il kernel per
  l'uso nei dischetti di ripristino.



  10.  Suggerimenti e trucchi



  10.1.  Ridirezionare l'output dei comandi make o patch


  Se si vuole una registrazione di quel che hanno fatto i comandi `make'
  o `patch',  possibile ridirezionare l'output su un file.  Per prima
  cosa si scopra quale shell si usa: `grep root /etc/passwd' e si cerchi
  qualcosa di simile a `/bin/csh'.


  Se si usa sh o bash,

      (comando) 2>&1 | tee (file di output)


  piazzer una copia dell'output di (comando) nel file `(file di out
  put)'.

  Per csh o tcsh, si usi

      (comando) |& tee (file di output)




  Per rc (Nota: probabilmente non si usa rc) 

      (comando) >[2=1] | tee (file di output)





  10.2.  Installazioni condizionali del kernel


  Oltre a usare dischetti, ci sono diversi metodi per verificare un
  nuovo kernel senza toccare quello vecchio.  Diversamente da molte
  altre versioni di Unix, LILO ha la possibilit di avviare il kernel
  ovunque si trovi nel disco (se si ha un disco grande -- oltre i 500 MB
  -- invito a leggere la documentazione di LILO in quanto questo pu
  causare dei problemi).  Quindi, se si aggiunge qualcosa del tipo

      image = /usr/src/linux/arch/i386/boot/bzImage
          label = new_kernel


  alla fine del file di configurazione di LILO, si pu scegliere se
  avviare un kernel appena compilato senza toccare il vecchio /vmlinuz
  (dopo aver eseguito lilo, naturalmente).  Il modo pi semplice di dire
  a LILO di avviare un nuovo kernel  di premere il tasto shift
  all'avvio (quando viene mostrato LILO nello schermo e niente altro),
  che d l'accesso a un prompt.  A questo punto, si pu inserire
  `new_kernel' per avviare il nuovo kernel.

  Se si vogliono mantenere versioni differenti dell'albero dei sorgenti
  nel proprio sistema (attenzione, questa cosa pu occupare un sacco di
  spazio nel disco), il modo pi comune  di chiamarle /usr/src/linux-
  x.y.z, dove x.y.z  la versione del kernel.  Si pu poi
  ``selezionare'' un albero di sorgenti con un link simbolico; per
  esempio `ln -sf linux-1.2.2 /usr/src/linux' render l'albero 1.2.2
  quello corrente.  Prima di creare un link simbolico come questo, ci si
  assicuri che l'ultimo argomento di ln non sia una directory (se  un
  vecchio link simbolico non c' problema), altrimenti il risultato
  potrebbe non essere quello che ci si aspetta.



  10.3.  Aggiornamenti del kernel

  Russell Nelson (nelson@crynwr.com) riassume le modifiche nelle nuove
  versioni del kernel.  Sono corte e sarebbe bene darci un'occhiata
  prima di aggiornare.  Sono disponibili in ftp anonimo da
  ftp.emlist.com in pub/kchanges o tramite l'URL

      http://www.crynwr.com/kchanges








  11.  Altri HOWTO di rilievo che possono essere utili


    Sound-HOWTO: schede audio e utility

    SCSI-HOWTO: tutto sui controller e i dispositivi SCSI

    NET-2-HOWTO: networking

    PPP-HOWTO: networking PPP in particolare

    PCMCIA-HOWTO: sui driver per il portatile

    ELF-HOWTO: ELF: cos', convertirsi..

    Hardware-HOWTO: panoramica dell'hardware supportato

    Module mini-HOWTO: altro ancora sui moduli del kernel

    Kerneld mini-HOWTO: su kerneld

    BogoMips mini-HOWTO: nel caso si voglia fantasticare


  12.  Varie



  12.1.  Autore


  L'autore e il manutentore del Linux Kernel-HOWTO  Brian Ward
  (bri@cs.uchicago.edu). Invito a inviarmi qualsiasi commento, aggiunta
  e correzione (in particolare le correzioni sono le cose per me pi
  importanti).


  Si pu dare un'occhiata alla mia `home page' in uno di questi URL:

      http://www.math.psu.edu/bri/
      http://blah.math.tu-graz.ac.at/~bri/




  Anche se ho provato a essere il pi possibile sollecito con le mail,
  si ricordi che ne ricevo un sacco tutti i giorni, e quindi mi ci vuole
  un po' di tempo per rispondere.  Specialmente quando mi si invia una
  domanda, invito a sforzarsi di essere il pi possibile chiari e
  dettagliati nei propri messaggi. Se si sta scrivendo a proposito di
  hardware non funzionante (o qualcosa di simile), ho bisogno di
  conoscere qual  la configurazione hardware.  Se si riporta un errore,
  non si dica semplicemente ``ho provato questo ma mi ha dato un
  errore''; ho bisogno di sapere qual era l'errore.  Vorrei anche sapere
  quale versione del kernel, gcc e libc si sta usando.  Se mi si dice
  semplicemente che si usa questa o quella distribuzione, non mi si dice
  poi molto.  Non mi preoccupo se si fanno domande semplici; si ricordi
  che se non si chiede non si avr mai una risposta!  Voglio ringraziare
  tutti quelli che mi hanno dato un qualche riscontro.

  Se le domande non sono relative al kernel, o sono in una qualche
  lingua che non capisco, potrei non rispondere.


  Se mi si scrive e non si riceve risposta in un tempo ragionevole (tre
  settimane o pi), allora  possibile che io abbia cancellato
  accidentalmente il messaggio (spiacente).  Si riprovi.


  Ho ricevuto un sacco di mail su cose che in realt sono problemi
  hardware.  Vanno bene, ma si tenga in conto che non ho familiarit con
  tutto l'hardware esistente al mondo.  Uso processori AMD, controller
  SCSI Adaptec e Symbios e dischi SCSI IBM.


  La versione 0.1  stata scritta il 3 ottobre 1994.  Questo documento 
  disponibile nei formati SGML, PostScript, TeX, roff e testo.



  12.2.  Da fare

  La sezione ``Suggerimenti e trucchi''  un po' piccola.  Spero di
  espanderla con suggerimenti da altri.

  Cos  anche ``Pacchetti addizionali''.

  Sono necessarie pi informazioni sul debugging/recupero dai crash.


  12.3.  Contributi

   inclusa una piccola parte del README di Linus (opzioni di kernel
  hacking). (Grazie, Linus!)

  uc@brian.lunetix.de (Ulrich Callmeier): patch -s e xargs.

  quinlan@yggdrasil.com (Daniel Quinlan): correzioni e aggiunte in molte
  sezioni.

  nat@nat@nataa.fr.eu.org (Nat Makarevitch): mrproper, tar -p, molte
  altre cose

  boldt@math.ucsb.edu (Axel Boldt): ha raccolto le descrizioni delle
  opzioni di configurazione del kernel dalla rete; poi mi ha passato la
  lista.

  lembark@wrkhors.psyber.com (Steve Lembark): suggerimenti sui boot
  multipli.

  kbriggs@earwax.pd.uwa.edu.au (Keith Briggs): alcune correzioni e
  suggerimenti

  rmcguire@freenet.columbus.oh.us (Ryan McGuire): aggiunte sulle
  ``makeabilit''.

  dumas@excalibur.ibp.fr (Eric Dumas): traduzione in francese.

  simazaki@ab11.yamanashi.ac.jp (Yasutada Shimazaki): traduzione in
  giapponese.

  jjamor@lml.ls.fi.upm.es (Juan Jose Amor Iglesias): traduzione in
  spagnolo.

  mva@sbbs.se (Martin Wahlen): traduzione in svedese.

  jzp1218@stud.u-szeged.hu (Zoltan Vamosi): traduzione in ungherese.

  bart@mat.uni.torun.pl (Bartosz Maruszewski): traduzione in polacco.

  donahue@tiber.nist.gov (Michael J Donahue): errori di battitura,
  vincitore della ``sliced bread competition''.
  rms@gnu.ai.mit.edu (Richard Stallman): concetti/notizie di
  distribuzione sulla documentazione ``libera''.

  dak@Pool.Informatik.RWTH-Aachen.DE (David Kastrup): cose sull'NFS.

  esr@snark.thyrsus.com (Eric Raymond): diverse notizie piccanti.


  Anche la gente che mi ha spedito mail con domande e problemi mi 
  stata abbastanza utile.



  12.4.  Questioni legali (in inglese)


  Copyright  Brian Ward, 1994-1999.

  Permission is granted to make and distribute copies of this manual
  provided the copyright notice and this permission notice are preserved
  on all copies.


  Permission is granted to copy and distribute modified versions of this
  manual under the conditions for verbatim copying, provided that the
  derived work is distributed under the terms of a permission notice
  identical to this one. Translations fall under the catagory of
  ``modified versions.''


  Warranty: None.


  Recommendations: Commercial redistribution is allowed and encouraged;
  however, it is strongly recommended that the redistributor contact the
  author before the redistribution, in the interest of keeping things
  up-to-date (you could send me a copy of the thing you're making while
  you're at it). Translators are also advised to contact the author
  before translating. The printed version looks nicer. Recycle.



























  Large Disk HOWTO
  Andries Brouwer, aeb@cwi.nl
  v2.2m, 15 Febbraio 2000

  Notizie fondamentali sulla geometria dei dischi e sul limite dei 1024
  cilindri.  Traduzione di Gianluca Vezz, vezzu@tin.it.

  1.  La problematica

  Facciamo l'ipotesi di avere un disco che abbia pi di 1024 cilindri.
  Ipotizziamo inoltre di avere un sistema operativo che utilizzi la
  vecchia interfaccia all'I/O del disco fornita dall'INT13.  Avremo
  allora un problema perch tale interfaccia per indirizzare le
  operazioni di I/O su di un generico cilindro impiega un campo a 10
  bit, pertanto i cilindri dal 1024 in poi sono inaccessibili.

  Per fortuna Linux non utilizza le chiamate al BIOS, eliminando cos
  ogni eventuale problema alla radice.

  Purtroppo le cose non vanno bene in due casi:

  (1) Quando fate il boot Linux non sta ancora girando e quindi non pu
  preservarvi dai problemi derivanti dal BIOS.  Ci ha delle
  ripercussioni per LILO e per analoghi boot loader.

  (2)  necessario che tutti i sistemi operativi installati sullo stesso
  disco concordino sulla locazione delle partizioni. In altri termini,
  se utilizzate, sia Linux che, per esempio, DOS, entrambi i sistemi
  operativi devono interpretare la tabella delle partizioni nello stesso
  modo.  Ci comporta delle conseguenze per il kernel di Linux e per
  fdisk.

  Appresso si riporta una descrizione dettagliata di tutti gli argomenti
  pi importanti.  Prestate attenzione al fatto che come riferimento ho
  utilizzato la versione 2.0.8 del kernel.  Le altre versioni possono
  avere delle leggere differenze.




  2.  Sommario

  Hai appena acquistato un nuovo disco. Che fare adesso?  Bene, dal
  punto di vista software usi fdisk (o meglio ancora cfdisk) per creare
  le partizioni, poi mke2fs per creare il filesystem, e per finire mount
  per attaccare il nuovo filesystem a quello esistente.

  Circa un anno fa potevo scrivere: Non hai bisogno di leggere questo
  HOWTO perch non ci sono pi problemi con gli hard disk di grandi
  dimensioni attuali.  La maggior parte di quelli che sembrano essere
  problemi  dovuta agli utenti che pensano che ci possa essere un
  problema e quindi installano un gestore dei dischi, o entrano nella
  modalit avanzata di fdisk, o specificano esplicitamente la geometria
  del disco a LILO o la passano al kernel da riga di comando.

  Tuttavia, le tipologie di problemi pi comuni sono: (i) hardware
  obsoleto, (ii) presenza di sistemi operativi sullo stesso disco e
  qualche volta (iii) la fase di boot.

  Attualmente la situazione  peggiorata.  Probabilmente la versione
  2.3.21 e le succesive permetteranno di nuovo la gestione di tutti i
  tipi di dischi.

  Consigli:


  Dischi SCSI di grandi dimensioni: Linux li supporta sin dalle prime
  versioni.  Non  richiesta nessuna azione specifica.

  Dischi IDE di grandi dimensioni (superiori agli 8.4 GB): procurati un
  kernel stabile recente (2.0.34 o superiore).  Di norma tutto dovrebbe
  procedere bene, specialmente se sarete cos saggi da non chiedere al
  BIOS la traslazione del disco con la LBA o con accorgimenti simili.

  Dischi IDE di grandissime dimensioni (superiori ai 33.8 GB): vai alla
  sezione ``Problemi dei controller IDE con dischi di dimensioni oltre i
  34 GB''.  Se LILO si blocca in fase di boot specifica l'opzione
  ``linear'' nel file di configurazione /etc/lilo.conf.

  Ci sono dei problemi legati alla geometria che possono essere risolti
  fornendo esplicitamente la geometria al kernel/LILO/fdisk.

  Se utilizzate una versione datata di fdisk e vi d un avviso di
  ``overlapping'' partitions: ignorate i messaggi, oppure controllate
  con cfdisk che sia tutto a posto.

  Se pensate che la dimensione del vostro disco sia sbagliata fate
  attenzione a non confondere le ``unit di misura'' binarie con quelle
  decimali e tenete presente che lo spazio libero che df riporta in un
  disco vuoto  di qualche percento pi piccolo della dimensione della
  partizione perch c' dello spazio riservato alle funzionalit di
  amministrazione.


  Ora se pensate ancora che ci siano dei problemi o se pi semplicemente
  siete curiosi proseguite nella lettura.


  3.  Unit di Misura e Dimensioni

  Un kilobyte (kB) corrisponde a 1000 byte.  Un megabyte (MB)
  corrisponde a 1000 kB.  Un gigabyte (GB) corrisponde a 1000 MB.  Un
  terabyte (TB) corrisponde a 1000 GB.  Questa  la definizione delle
  unit di misura nel sistema internazionale (SI).  Tuttavia ci sono
  persone che considerano 1 MB=1024000 byte e parlano di dischetti da
  1.44 MB e altre che pensano che 1 MB=1048576 byte.  Nel presente
  documento seguir lo standard attuale e scriver Ki, Mi, Gi, Ti per
  indicare le unit binarie, cos che i floppy hanno dimensioni di 1440
  KiB (1.47 MB, 1.41 MiB), 1 MiB sono 1048576 byte (1.05 MB), 1 GiB sono
  1073741824 byte (1.07 GB) e 1 TiB sono 1099511627776 byte (1.1 TB).

  I produttori di hard disk seguono il sistema SI utilizzando quindi la
  notazione decimale.  I messaggi in fase di avvio di Linux e qualche
  programma come fdisk utilizzano i simboli MB e GB ad indicare
  l'utilizzo della notazione binaria o l'utilizzo di una notazione mista
  binaria/decimale.  Prima di dire d'avere un disco pi piccolo di
  quanto dichiarato dal costruttore calcolate la sua dimensione nelle
  unit decimali (o pi semplicemente in byte).

  A proposito della terminologia e delle abbreviazioni adottate per
  specificare le unit binarie, Knuth ha suggerito una notazione
  alternativa,nello specifico propone di utilizzare KKB, MMB, GGB, TTB,
  PPB, EEB, ZZB, YYB e di definirli come kilobyte esteso, megabyte
  esteso, ... yottabyte esteso.  Lui stesso ha scritto: `Prestate
  attenzione al fatto che raddoppiando le lettere si identifica sia la
  natura binaria che quella di grande dimensione'.  Questa  una buona
  proposta - `gigabyte esteso' suona meglio di `gibibyte'.  Per i nostri
  scopi la sola cosa importante  sottolineare che un megabyte contiene
  1000000 di byte e che  necessario utilizzare qualche altro termine ed
  abbreviazione se si sottointende qualcosa di diverso.


  3.1.  Dimensione dei Settori

  In questa trattazione si assume che un settore abbia dimensione pari a
  512 byte. Questa assunzione  quasi sempre vera, ma, per esempio,
  certi dischi MO (MagnetoOttici) utilizzano settori di 2048 byte.
  Quindi tutte le capacit elencate sopra devono essere moltiplicate per
  quattro (quando utilizzate fdisk su questi dischi controllate di avere
  la versione 2.9i o superiore e date l'opzione `-b 2048).


  3.2.  Dimensione del Disco

  Un disco con C cilindri, H testine e S settori per traccia ha C*H*S
  settori totali e pu memorizzare C*H*S*512 byte.  Per esempio, se
  l'etichetta del disco riporta C/H/S=4092/16/63 allora il disco ha
  4092*16*63=4124736 settori e pu contenere 4124736*512=2111864832 byte
  (2.11 GB).  C' un'accordo industriale per assegnare ai dischi pi
  grandi di 8.4 GB le dimensioni C/H/S=16383/16/63, cos la dimensione
  del disco non pu pi essere letta dalla terna di valori C/H/S
  riportata dal disco.


  4.  Accesso al Disco

  Per poter leggere o scrivere qualsiasi cosa su un disco occorre
  specificare una posizione sul disco stesso per esempio indicando il
  numero del settore o del blocco.  Se il disco  SCSI il numero del
  settore viene passato al controller SCSI ed  capito dal disco.  Se il
  disco  un IDE che utilizza la modalit LBA si ha la stessa cosa.  Ma
  se il disco  obsoleto, RLL o MFM o IDE senza supporto LBA allora
  l'hardware del disco si aspetta una terna (cilindro,testina,settore)
  per individuare il punto desiderato sul disco.

  La corrispondenza tra la numerazione lineare e la terna di tre cifre 
  di seguito mostrata.  Per un disco con C cilindri, H testine e S
  settori/traccia la posizione indicata dalla notazione come terna o CHS
  (c,h,s)  la stessa di quella indicata dalla notazione lineare o LBA
  c*H*S + h*S + (s-1) (la sottrazione di una unit  legata al fatto che
  nella notazione come terna i settori sono contati a partire da 1 e non
  da 0).

  Concludendo possiamo dire che per accedere ad un disco non SCSI
  obsoleto  necessario conoscerne la sua geometria ossia i valori C, H
  e S.


  4.1.  Accesso BIOS al Disco e il Limite dei 1024 cilindri

  Al contrario di altri sistemi Linux non utilizza il BIOS.  Il BIOS,
  antecedente all'LBA, fornisce le routine di I/O su disco attraverso
  l'INT13 che prevedono come ingresso la terna (c,h,s) (pi
  precisamente: AH seleziona la funzione da utilizzare, CH contiene gli
  8 bit bassi del numero dei cilindri, CL contiene nei bit 7-6 i due bit
  alti del numero dei cilindri e nei bit 5-0 il numero del settore, DH
  contiene il numero delle testine e DL contiene il numero
  identificativo del drive (80h or 81h). Questo spiega una parte dello
  schema della tavola delle partizioni).

  Noi abbiamo la terna CHS codificata su tre byte in cui 10 bit sono per
  il numero dei cilindri, 8 per le testine e 6 per il numero dei settori
  (numerati da 1 a 63).  Da ci risulta come il numero dei cilindri
  possa variare da 0 a 1023 e come il BIOS non sia in grado di
  indirizzare pi di 1024 cilindri.

  I programmi per DOS e Windows non sono stati modificati quando sono
  stati introdotti i dischi IDE con il supporto LBA cos sia il DOS che
  Windows continuano ad aver bisogno della geometria del disco solo per
  poter dialogare con il BIOS, pur non essendo necessaria per le
  operazioni di I/O.  Questo significa che Linux ha bisogno di conoscere
  la geometria del disco in quei sistemi ove sia richiesto il dialogo
  tra BIOS e altri sistemi operativi presenti, anche con un disco
  attuale.

  Questi problemi sono iniziati pi o meno circa quattro anni fa, quando
  apparvero dischi che non potevano essere indirizzati dalle funzioni
  dell'INT13 (perch i 10+8+6=24 bits della terna (c,h,s) non possono
  indirizzare pi di 8.5 GB) e fu quindi progettata una nuova
  interfaccia per il BIOS: la cosidetta INT13 Estesa dove DS:SI punta ad
  un Disk Address Packet di 16 byte che contiene un numero assoluto di
  inizio blocco di 8 byte.

  Molto lentamente il mondo Microsoft sta traghettando verso l'utilizzo
  delle funzioni fornite dall'INT13 Esteso.  Probabilmente fra pochi
  anni nessun sistema moderno equipaggiato con hardware moderno
  necessiter pi del concetto di "geometria del disco".


  4.2.  Storia del BIOS e dei limiti dell'IDE


     Specifiche ATA (per dischi IDE) - il limite dei 137 GB
        65536 cilindri (numerati da 0-65535), 16 testine (numerate da
        0-15), 255 settori/traccia (numerati da 1-255), corrispondono a
        267386880 settori (di 512 byte ciascuno) che equivalgono ad un
        massimo di 136902082560 byte (137 GB).  Questo non  un problema
        attuale (1999) ma lo diverr tra qualche anno.


     BIOS Int 13 - il limite degli 8.5 GB
        1024 cilindri (numerati da 0-1023), 256 testine (numerate da
        0-255), 63 settori/traccia (numerati da 1-63), corrispondono a
        8455716864 byte (8.5 GB).  Questo  un limite molto gravoso ai
        nostri giorni perch significa che il DOS non pu utilizzare i
        dischi di grosse dimensioni attuali.


     Il limite dei 528 MB
        Se gli stessi valori c,h,s sono utilizzati dalla chiamata
        all'INT 13 del BIOS e dal controller I/O IDE entrambe le
        limitazioni si sovrappongono permettendo l'accesso al massimo a
        1024 cilindri, 16 testine, 63 settori/traccia per una capacit
        totale di 528482304 byte (528MB), l'infame limite dei 504 MiB
        del DOS con i vecchi BIOS.  Questo problema si  sentito a
        partire dal 1993 circa e gli utenti sono ricorsi ai pi svariati
        trucchi sia hardware (LBA) sia firmware (traslazione del BIOS)
        sia software (gestori dei dischi).  Il concetto di 'traslazione'
         stato introdotto nel 1994: il BIOS pu usare una geometria per
        dialogare con il disco e un'altra, contraffatta, per dialogare
        con il DOS ed effettuare la conversione tra le due.


     Il limite dei 2.1 GB (Aprile 1996)
        Alcuni BIOS datati allocano solo 12 bit nella CMOS RAM per
        memorizzare il numero dei cilindri.  Come conseguenza il valore
        massimo rappresentabile  4095. Da ci deriva che sono
        indirizzabili solamente 4095*16*63*512=2113413120 byte.  Se si
        ha un disco pi grande si avr un blocco del sistema in fase di
        avvio.  Questo ha reso i dischi con la geometria 4092/16/63
        abbastanza diffusi.  Ancor'oggi molti dischi di grandi
        dimensioni hanno un jumper per fornire la geometria 4092/16/63
        Per ulteriori informazioni: over2gb.htm.  Altri BIOS non si
        bloccano ma rilevano un disco molto pi piccolo, ad esempio 429
        MB invece di 2.5 MB.




     Il limite dei 3.2 GB
        I BIOS Phoenix 4.03 e 4.04 avevano un baco che causava il blocco
        del sistema quando si impostavano nel setup della CMOS dischi
        con capacit superiori ai 3277 MB. Vedi: over3gb.htm.


     Il limite dei 4.2 GB (Feb 1997)
        La traslazione effettuata dal BIOS (ECHS= CHS Estesa, detta
        anche 'Supporto ai dischi di grandi dimensioni' o semplicemente
        'Large') ricorsivamente raddoppia il numero delle testine e
        contemporaneamente dimezza il numero dei cilindri passati al DOS
        finch il numero dei cilindri  al massimo 1024.  Il DOS e
        Windows95 non possono gestire 256 testine, e nel caso abbastanza
        comune in cui il disco fornisce 16 testine ci significa che
        questo meccanismo  utilizzabile per gestire al massimo
        8192*16*63*512=4227858432 byte (con una geometria contraffatta
        di 1024 cilindri, 128 testine e 63 settori/traccia).   da
        osservare che ECHS non modifica il numero dei settori per
        traccia, cos se non sono 63 la capacit gestibile sar ancora
        pi bassa.  Vedi: over4gb.htm.


     Il limite dei 7.9 GB
        Un po' furbescamente alcuni BIOS aggirano il problema precedente
        fissando a 15 il numero di testine ('ECHS rivisto') in modo da
        poter ottenere una geometria contraffatta con 240 testine.  Sono
        indirizzabili 1024*240*63*512=7927234560 byte.


     Il limite degli 8.4 GB

        Se il BIOS  in grado di utilizzare 255 testine e 63
        settori/traccia ('LBA assistita' o pi semplicemente 'LBA') pu
        indirizzare 1024*255*63*512=8422686720 byte, un po' meno del
        limite precedente di 8.5 GB questo perch le geometrie con 256
        testine sono da evitarsi (la traslazione utilizza come numero di
        testine H il primo valore della sequenza 16, 32, 64, 128, 255
        per il quale la  capacit totale sia minore od eguale a
        1024*H*63*512, quindi calcola il numero dei cilindri C come la
        capacit totale diviso per (H*63*512)).


     Il limite dei 33.8 GB  (Agosto 1999)

        Ci sono ulteriori difficolt con dischi di dimensioni superiori
        ai 33.8 GB.  Il problema sta nel fatto che i valori predefiniti
        di 16 testine e 63 settori/traccia corrispondoo ad un numero di
        cilindri maggiore di 65535, quantit che non  rappresentabile
        da una variabile di tipo short.  Attualmente molti BIOS non sono
        in grado di gestire tali unit(vedi per esempio: Aggiornamenti
        Asus per trovare versioni aggiornate del BIOS che supportino
        tali unit).  I kernel precedenti le versioni 2.2.14 / 2.3.21
        devono essere aggiornati.  Vedi ``Problemi dei controller IDE
        con dischi di dimensioni superiori ai 34 GB'' pi sotto.


  Per ulteriore materiale su questo argomento vedi: Breaking the
  Barriers ("Rompere le barriere"), e per ulteriori dettagli IDE Hard
  Drive Capacity Barriers ("Limiti della capacit degli HD IDE").


  I dischi superiori agli 8.4 GB riportano la loro geometria come
  16383/16/63.  Ci significa che la 'geometria'  obsoleta e che la
  capacit totale del disco non pu pi essere calcolata dalla
  geometria.



  5.  Avvio del sistema

  Quando il sistema viene inizializzato il BIOS legge il settore 0
  (definito come MBR - Master Boot Record) dal primo disco fisso (o dal
  floppy) e lancia il programma che vi trova - di solito un bootstrap
  loader.  Il loader residente nel settore 0 non ha i suoi driver per
  cui utilizza i servizi del BIOS. Ci significa che il kernel di Linux
  deve essere interamente contenuto nei primi 1024 cilindri per essere
  caricato.

  Questo problema si risolve molto semplicemente verificando che il
  kernel (e gli altri file utilizzati durante il boot, come le mappe dei
  file di LILO) sia in una partizione contenuta intieramente nei primi
  1024 cilindri del disco in modo che il BIOS vi possa accedere -
  probabilmente questo significa utilizzare il primo o il secondo disco.

  Create quindi una piccola partizione, diciamo di 10 MB, cos c'
  spazio per pi di un kernel, facendo attenzione che sia contenuta
  entro i primi 1024 cilindri del primo o del secondo disco.  Montatela
  in /boot cos LILO vi metter i file di cui necessita.



  5.1.  LILO e l'opzione `linear'


  Un altro problema  che sia il boot loader che il BIOS devono vedere
  la stessa geometria del disco.  LILO inoltra al kernel la richiesta di
  informazioni circa la geometria ma molte volte gli autori dei driver
  dei dischi hanno la brutta abitudine di utilizzare la tavola delle
  partizioni per desumere la geometria del disco invece di specificare a
  LILO qual  la geometria utilizzata dal BIOS.  Cos facendo spesso la
  geometria fornita dal BIOS non  corretta. In questi casi pu essere
  conveniente passare a LILO l'opzione `linear' in modo che non
  necessitando dei parametri della geometria durante la fase di
  inizializzazione del sistema (memorizza gli indirizzi lineari nelle
  mappe) faccia la conversione in indirizzi lineari all'avvio. Perch
  questa non  un'opzione predefinita?  Bene, occorre tener presente che
  il suo uso comporta un problema. LILO con l'opzione `linear' attivata
  non  in grado di conoscere il numero dei cilindri come conseguenza
  non pu generare nessun avvertimento se una parte del kernel si trova
  oltre il limite dei 1024 cilindri.  Alla fine vi potreste trovare con
  un sistema che non  in grado di avviarsi.


  5.2.  Un "bug" di LILO

  Le versioni di LILO inferiori alla v21 hanno un difetto: la
  conversione degli indirizzi effettuata durante la fase di avvio ha un
  "bug": quando il prodotto c*H  maggiore od eguale a 65536 si hanno
  degli errori di overflow durante il calcolo.  Per valori di H
  superiori a 64 si ha un limite pi stretto sui valori attribuibili a c
  rispetto al solito c < 1024; per esempio, con H=255 e con una versione
  datata di LILO si deve avere c < 258 (c=cilindro dove risiede
  l'immagine del kernel, H=numero delle testine del disco).




  5.3.  1024 cilindri non sono 1024 cilindri

  Tim Williams scrive: `Ho la mia partizione Linux nei primi 1024
  cilindri e tuttavia non c' verso di di avviarla. Quando l'ho
  ridimensionata a meno di 1 GB le cose sono andate a posto.'  Cosa pu
  essere? Bene, il disco in parola  un disco SCSI con un controller
  AHA2940UW che usa sia H=64, S=32 (ossia cilindri di 1 MiB = 1.05 MB)
  che H=255, S=63 (ossia cilindri di 8.2 MB) a seconda delle opzioni
  impostate nel firmware e nel BIOS.  Senza dubbio il BIOS assume la
  prima e trova il limite dei 1024 settori in corrispondenza di una
  capacit di 1 GiB mentre Linux utilizza la seconda e LILO trova il
  limite agli 8.4 GB.


  6.  Geometria dei dischi fissi, delle partizioni e 'sovrapposizione'

  Se utilizzate diversi sistemi operativi sul vostro disco fisso ognuno
  avr a disposizione una o pi partizioni. La posizione delle
  partizioni deve essere univoca per tutti i sistemi presenti onde
  evitare delle conseguenze catastrofiche.


  Il MBR contiene la tavola delle partizioni che descrive la posizione
  delle partizioni primarie. Nella tavola ci sono 4 campi per le 4
  partizioni primarie, ogni campo  descritto da una struttura del tipo



    struct partizione {
      char attiva;      /* 0x80: avviabile; 0: non avviabile */
      char inizio[3];   /* CHS del primo settore */
      char tipo;
      char fine[3];     /* CHS dell'ultimo settore */
      int partenza;     /* numero identificativo del settore a 32 bit
                           (si conta a partire da 0) */
      int lunghezza;    /* numero totale dei settori a 32 bit */
    };


  (dove CHS significa Cilindri/Testine/Settori - Cylinder/Head/Sector).

  la struttura d informazioni ridondanti. La posizione di una
  partizione si ricava dai campi inizio e fine entrambi a 24 bit e dai
  campi partenza e lunghezza questi ultimi a 32 bit.

  Linux utilizza solo i campi inizio e lunghezza, pu quindi gestire
  partizioni che abbiano meno di 2^32 settori (circa 2TiB).  Questa
  dimensione  sessanta volte pi grande dei dischi attualmente
  disponibili, probabilmente sar sufficiente per i prossimi otto anni e
  forse oltre.

  (Le partizioni possono essere molto grandi tuttavia c' un limite alla
  dimensione massima di un singolo file che nei sistemi a 32 bit non pu
  essere pi grande di 2GiB.)

  Il DOS utlizza i campi inizio e fine e la chiamata all'INT13 del BIOS
  per accedere al disco, pu quindi indirizzare dischi non pi grandi di
  8.4 GB pur effettuando la traslazione (le partizioni non possono
  superare i 2.1 GB perch occorre tener conto delle restrizioni imposte
  al filesystem dalla FAT16).  Lo stesso dicasi per Windows 3.11 e WfWG
  e Windows NT 3.*.

  Windows 95 ha il supporto per l'interfaccia all'INT13 Esteso e
  utilizza un tipo speciale di partizione (c, e, f invece di b, 6, 5)
  per indicare che tale partizione pu essere accessibile in questo
  modo.  Quando si utilizzano questi tipi di partizione i campi inizio e
  fine contengono delle informazioni fasulle (1023/255/63).  Windows 95
  OSR2 ha introdotto il fylesystem FAT32 (partizioni di tipo b o c) che
  permette partizioni di dimensioni al massimo di 2 TiB.

  A cosa sono dovute le stupidaggini che apprendiamo da fdisk circa la
  `sovrapposizione' delle partizioni quando in effetti non c' nulla di
  sbagliato?  Bene - qualche volta c' un `errore': se date un'occhiata
  ai campi inizio e fine di tali partizioni, come fa il DOS, queste si
  sovrappongono (tale `errore' non pu essere corretto perch i campi
  non possono memorizzare un numero di cilindri superiore a 1024 - ci
  sar sempre `sovrapposizione' non appena avrete pi di 1024 cilindri).
  Tuttavia, se voi date uno sguardo ai campi inizio e lunghezza, come fa
  Linux, e come fa anche Windows 95 nel caso di partizioni di tipo c, e
  o f allora tutto procede per il meglio.  Concludendo potete ignorare
  questi avvertimenti quando usate cfdisk e sul vostro disco 
  installato solo Linux.  Occorre prestare attenzione quando il disco 
  condiviso con il DOS.  Usate il comando cfdisk -Ps /dev/hdx e cfdisk
  -Pt /dev/hdx per controllare la tabella delle partizioni del disco
  /dev/hdx.




  7.  Traduzione e Gestori dei Dischi

  La geometria del disco (a testine, cilindri e tracce)  qualcosa che
  ci arriva dal tempo di MFM e RLL. In quel periodo la geometria
  corrispondeva ad una realt fisica. Oggigiorno, con le interfacce IDE
  o SCSI, nessuno  pi interessato a conoscere la geometria `reale' del
  disco.  Il numero di settori per traccia  variabile - ci sono pi
  settori per traccia nelle zone pi esterne del disco - cosicch non
  esiste un numero `reale' di settori per traccia.  Anzi  l'esatto
  opposto: il comando IDE INITIALIZE DRIVE PARAMETERS (91h) serve per
  richiedere al disco quante testine e settori per traccia pensa di
  avere.   abbastanza comune che i dischi di grandi dimensioni che
  hanno due testine comunichino al BIOS 15 o 16 testine mentre il BIOS
  ne riporta 255 all'utente.

  Per l'utente  meglio considerare un disco alla stregua di un vettore
  di settori numerati progressivamente 0,1,...., e lasciare al
  controller del disco il compito di localizzare i settori. La
  numerazione progressiva  definita LBA.

  Si riporta adesso il funzionamento logico.  Il DOS, o qualsiasi boot
  loader, dialoga con il BIOS utilizzando la notazione (c,h,s).  Il BIOS
  converte la (c,h,s) nella notazione LBA utilizzando la falsa geometria
  che l'utente sta utilizzando.  Se il disco accetta la LBA allora la
  utilizza nelle operazioni di I/O su disco.  Altrimenti, il BIOS la
  riconverte in (c',h',s') utilizzando la geometria falsa in uso e
  questi nuovi valori sono impiegati nell'I/O su disco.

   da rimarcare che c' un po' di confusione nell'utilizzo
  dell'espressione `LBA': come termine che descrive le possibilit di un
  disco significa `Linear Block Addressing' (al contrario
  dell'indirizzamento CHS), mentre come termine presente nel setup del
  BIOS descrive uno schema di traslazione che qualche volta viene
  definito come `assisted LBA' - cfr pi sotto ``Linux e il limite degli
  8 GiB dei controller IDE''.

  Se il controller non supporta la LBA ma  il BIOS ad effettuare la
  traduzione si ha un comportamento simile a quanto descritto sopra (nel
  setup del BIOS  spesso indicata come modalit `Large').  In questo
  caso il BIOS passa al sistema operativo la geometria (C',H',S') e
  utilizza (C,H,S) per dialogare con il controller del disco.  Di norma
  si ha che: S = S', C' = C/N e H' = H*N, dove N rappresenta la pi
  piccola potenza di due che assicura la validit della diseguaglianza
  C' <= 1024 (si spreca spazio a causa dell'arrotondamento dovuto al
  rapporto C' = C/N).  Anche in questo caso si possono indirizzare pi
  di 8.4 GB (7.8 GiB).

  (La terza opzione del setup  di solito `Normal', che non effettua
  nessuna traslazione).

  Se il BIOS non supporta n la modalit `Large' n la `LBA' si deve
  ricorrere a delle soluzioni software. Gestori del disco ("Disk
  Manager") come OnTrack o EZ-Drive sostituiscono con le loro routine di
  gestione del disco quelle del BIOS. Di solito vengono installati
  nell'MBR e nei settori seguenti (OnTrack definisce questi programmi
  come DDO: Dynamic Drive Overlay) in modo che vengono eseguiti prima
  del sistema operativo. Per questo motivo quando si inizializza il
  sistema da dischetto ci possono essere problemi.

  I risultati che si ottengono sono pi o meno gli stessi di quelli
  forniti da un BIOS che effettua la traduzione - ma, quando sono
  presenti pi sistemi operativi sullo stesso disco ci possono essere
  molti problemi derivanti dall'utilizzo dei disk manager.

  Linux  compatibile con OnTrack Disk Manager dalla versione 1.3.14 e
  con EZ-Drive da quella 1.3.29. Altri dettagli sono riportati appresso.


  8.  Traduzione dei dischi IDE operata dal kernel

  Se il kernel di Linux rileva la presenza di un disk manager su un
  disco IDE cerca di rimappare il disco nello stesso modo in cui l'ha
  mappato il disk manager, cos vede le stesse partizioni che ad esempio
  il DOS gestisce con OnTrack o EZ-Drive.  Tuttavia se si specifica la
  geometria da riga di comando NON viene effettuata la rimappatura del
  disco. Una riga di comando del tipo `hd=cilindri,testine,settori' fa
  perdere ogni compatibilit con il disk manager.

  Se tutto questo vi d fastidio e se conoscete qualcuno che pu
  ricompilarvi un nuovo kernel cercate il file linux/drivers/block/ide.c
  e cancellate dalla funzione ide_xlate_1024() il test: if
  (drive->forced_geom) {---;return 0;}.

  La rimappatura si fa, posto il prodotto H*C costante, variando il
  valore del numero di testine (4, 8, 16, 32, 64, 128, 255) finch si
  verifica C <= 1024 o H = 255.

  Il titolo dei paragrafi che seguono corrisponde alle stringhe che
  appaiono in fase di boot quando Linux rileva la presenza di un disk
  manager.  I tipi delle partizioni si devono intendere espressi in
  notazione esadecimale.


  8.1.  EZD

  EZ-Drive  rilevato perch assegna alla partizione primaria numero uno
  il tipo 55.  La geometria  rimappata come detto sopra. La tabella
  delle partizioni presente nel settore 0 non viene presa in
  considerazione perch viene letta quella presente nel settore 1.  Il
  numero dei blocchi del disco non  cambiato, l'operazione di scrittura
  sul settore 0  reindirizzata al settore 1.  Questo comportamento pu
  essere modificato ricompilando il kernel con:
   #define FAKE_FDISK_FOR_EZDRIVE  0  in ide.c.


  8.2.  DM6:DDO

  OnTrack DiskManager (sul primo disco)  rilevato perch assegna alla
  partizione primaria numero uno il tipo 54. La geometria  rimappata
  come detto sopra e tutto il disco  traslato di 63 settori (cos
  facendo il vecchio settore 63 diventa il nuovo settore 0).  Dopo
  questa operazione sul settore 0 viene letto un nuovo MBR (con la
  relativa tavola della partizioni). Naturalmente la traslazione dei
  settori  necessaria per creare lo spazio per il DDO, questo spiega
  perch negli altri dischi non si applica tale operazione.


  8.3.  DM6:AUX

  OnTrack DiskManager (sugli altri dischi)  rilevato perch assegna
  alla partizione primaria numero uno il tipo 51 o 53. La geometria 
  rimappata come detto sopra.


  8.4.  DM6:MBR

  Questa  una vecchia versione di OnTrack DiskManager rilevata da una
  firma e non da un assegnamento di tipo ad una partizione (si verifica
  che l'offset trovato nel 2 e 3 byte dell' MBR non sia maggiore di 430
  e che lo short trovato in questo offset sia eguale a 0x55AA, e inoltre
  che sia seguito da un byte di disparit).  La geometria, come nei casi
  precedenti,  rimappata come detto sopra.


  8.5.  PTBL

  Si possono dedurre le informazioni necessarie alla traduzione del
  disco utilizzando un test che verifica l'inizio e la fine della
  partizione primaria.  Se l'inizio e la fine di una partizione sono nei
  settori numero 1 e 63, rispettivamente e se le testine finali sono 31,
  63, 127 o 254 allora, considerato che  prassi terminare le partizioni
  entro le dimensioni di un cilindro, e dacch l'interfaccia IDE
  utilizza al massimo 16 testine, si pu presupporre che il BIOS abbia
  effettuato una traduzione e che la geometria del disco sia stata
  rimappata per utilizzare 32, 64, 128 o 255 testine, rispettivamente.
  Quando la geometria rilevata ha gi 63 settori per traccia e
  altrettante testine non viene effettuata la rimappatura (perch questo
  significa che probabilmente ne  gi stata fatta una).


  9.  Conclusioni

  Cosa significa tutto ci? Per gli utenti Linux una sola cosa: che
  devono verificare che LILO e fdisk utilizzino la geometria corretta.
  Per fdisk la geometria `corretta'  quella utilizzata dagli altri
  sistemi operativi installati sullo stesso disco mentre per LILO 
  quella che permette un'interazione senza errori con il BIOS in fase di
  inizializzazione (di solito i due aspetti coincidono).

  Come rileva la geometria fdisk? Interroga il kernel, utilizzando la
  funzione ioctl.h HDIO_GETGEO. L'utente  tuttavia in grado di forzare
  la geometria in modo interattivo o da linea di comando.

  Come rileva la geometria LILO?  Interroga il kernel utilizzando la
  ioctl HDIO_GETGEO.  Tuttavia l'utente pu forzare la geometria
  utilizzando l'opzione `disk=' nel file /etc/lilo.conf (cfr
  lilo.conf(5)).   possibile fornire a LILO l'opzione linear in modo da
  memorizzare nella mappa dei file i valori della LBA invece dei CHS e
  recuperer la geometria da utilizzare in fase di avvio mediante la
  funzione 8 dell'INT 13 per richiedere la geometria del disco.

  Com' in grado di rispondere il kernel?  Bene, prima di tutto,
  l'utente pu aver specificato una geometria esplicita fornendo le
  opzioni `hda=cyls,heads,secs' al kernel da riga di comando (cfr.
  bootparam(7)), probabilmtente di persona od indicando al "boot loader"
  di fornire tali valori al kernel.  Per esempio, si pu indicare a LILO
  di fornire tali informazioni opzionali aggiungendo una riga del tipo
  `append = "hda=cyls,heads,secs"' in /etc/lilo.conf (cfr.
  lilo.conf(5)).  D'altrocanto il kernel  in grado di congetturare una
  geometria utilizzando possibilmente i valori ottenuti dal BIOS o dai
  dispositivi hardware.

   possibile (a partire dalla versione 2.1.79) cambiare i valori della
  geometria congetturata dal kernel utilizzando il filesystem /proc.
  Per esempio:


       # sfdisk -g /dev/hdc
       /dev/hdc: 4441 cylinders, 255 heads, 63 sectors/track
       # cd /proc/ide/ide1/hdc
       # echo bios_cyl:17418 bios_head:128 bios_sect:32 > settings
       # sfdisk -g /dev/hdc
       /dev/hdc: 17418 cylinders, 128 heads, 32 sectors/track
       #




  9.1.  Calcolo dei parametri di LILO

  Qualche volta  utile impostare una precisa geometria da riga di
  comando: `hda=cyls,heads,secs'.  Quasi sempre si vuole un valore di
  secs=63, lo scopo di fornire tale valore  quello di specificare il
  valore heads (valori ragionevoli in questo periodo sono heads=16 e
  heads=255).  Quali valori si potrebbero specificare per cyls?  Quei
  valori che forniranno la capacit totale corretta di C*H*S settori.
  Per esempio, per un drive con 71346240 settori (36529274880 byte) si
  potrebbe calcolare C come 71346240/(255*63)=4441 (usando, e.g., il
  programma bc) e fornire quindi come parametri di avvio:
  hdc=4441,255,63.  Come si pu stabilire la capacit totale corretta?
  Per esempio:


       # hdparm -g /dev/hdc | grep sectors
        geometry     = 4441/255/63, sectors = 71346240, start = 0
       # hdparm -i /dev/hdc | grep LBAsects
        CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=71346240




  indica due modi per stabilire il numero totale si settori pari a
  71346240.  I messaggi del kernel:


       # dmesg | grep hdc
       ...
       hdc: Maxtor 93652U8, 34837MB w/2048kB Cache, CHS=70780/16/63
        hdc: [PTBL] [4441/255/63] hdc1 hdc2 hdc3! hdc4 < hdc5 > ...




  riportano (perlomeno) 34837*2048=71346176 settori e
  70780*16*63=71346240 settori (almeno). In questo caso il secondo val
  ore  quello corretto ma in generale entrambi sono arrotondati per
  difetto.  Questo  un buon modo per definire in maniera approssimata
  le dimensioni del disco quando hdparm non  disponibile.  Non asseg
  nate mai a cyls un valore troppo grande!  Nel caso di dischi SCSI il
  numero preciso dei settori  indicato dai messaggi forniti dal kernel
  all'avvio:
       SCSI device sda: hdwr sector= 512 bytes. Sectors= 17755792 [8669 MB] [8.7 GB]




  (MB e GB sono arrotondati, non per difetto, e in `notazione binaria').


  10.  Dettagli


  10.1.  Dettagli sui dischi IDE - le sette geometrie

  Il driver IDE pu determinare la geometria di un disco in quattro
  modi.  Il primo (G_user)  quello di passare le informazioni da linea
  di comando.  Il secondo (G_bios)  la lettura in fase di
  inizializzazione della Tavola dei Parametri del Disco nel BIOS (solo
  per il primo e il secondo disco) prima del passaggio alla modalit a
  32 bit.  Il terzo (G_phys) e il quarto (G_log) sono le risposte del
  controller IDE al comando IDENTIFY, sono rispettivamente la geometria
  `fisica' e `logica' del disco.

  Il driver ha bisogno di due valori per determinare la geometria: uno 
  dato da G_fdisk, ottenuto da una chiamata a HDIO_GETGEO ioctl, l'altro
  da G_used, che  utilizzato per le operazioni di I/O.  Sia G_fdisk che
  G_used sono inizializzati da G_user se vengono passati i valori,
  altrimenti da G_bios o da G_phys.  Se G_log ha un valore ragionevole
  questo viene assegnato a G_used.  Nel caso in cui G_used non sia
  ragionevole ma lo sia G_phys quest'ultimo valore sar assegnato a
  G_used. Per `valore ragionevole' si intende un numero di testine
  compreso tra 1 e 16.

  Per dirla in altri termini: i parametri passati da linea di comando
  forzano i valori del BIOS e determinano la geometria che vedr fdisk.
  Tuttavia se i parametri si riferiscono ad una geometria tradotta con
  pi di 16 testine l'I/O del kernel sar forzato dai valori ricavati
  dal comando IDENTIFY.

  Bisogna osservare che il G_bios  piuttosto inattendibile: per i
  sistemi inizializzati da un driver SCSI il primo ed il secondo disco
  possono essere SCSI e la geometria che il BIOS attribuisce a sda 
  quella usata dal kernel per hda.  Tuttavia, i dischi che non sono
  impostati nel Setup del BIOS non possono essere visti da quest'ultimo.
  Ci significa che, per esempio, in un sistema IDE dove non sia
  presente hdb le geometrie riportate dal BIOS per il primo e per il
  secondo disco siano attribuite a hda e hdc.



  10.2.  Dettagli sui dischi SCSI

  Per i dischi SCSI la situazione  diversa. Questi dischi utilizzano la
  LBA per cui determinare una `geometria'  del tutto irrilevante.  Il
  formato della tavole delle partizioni  praticamente lo stesso, fdisk
  deve crearsi una qualche geometria, utilizza HDIO_GETGEO, perch non 
  in grado di distinguere tra dischi IDE e SCSI.  Come si vedr in
  seguito ogni driver crea una sua geometria.  Veramente una grande
  confusione.

  Se non si utilizza il DOS  meglio evitare le impostazioni di
  traduzione estese ed utilizzare se possibile 64 testine, 32 settori
  per traccia (per gli esigenti pu andar bene 1MB per cilindro) cos
  facendo si evitano problemi se si cambia controller.  Alcuni driver
  (aha152x, pas16, ppa, qlogicfas, qlogicisp) sono cos legati ai limiti
  del DOS da non permettere l'utilizzo di pi di 8GiB anche nel caso in
  cui Linux sia il solo sistema installato. Questo  un baco.
  Qual  la geometria reale? La risposta pi facile  che non esiste.  E
  se anche esistesse voi non dovreste occuparvene e di sicuro MAI E POI
  MAI dovreste richiedere tali informazioni a fdisk, a LILO o al kernel.
  Questa  una cosa di cui di occupano il controller SCSI e il disco.
  Lasciatemelo ripetere: solo gli stupidi richiedono a fdisk/LILO/kernel
  la geometria di un disco SCSI.

  Tuttavia se siete persone curiose ed insistenti potete leggere tali
  valori dal disco stesso. Il comando READ CAPACITY d la capacit
  totale del disco; MODE SENSE riporta il numero di cilindri e testine
  nella Rigid Disk Drive Geometry Page (page 04, questi valori non
  possono essere modificati) e il numero di byte per settore e i settori
  per traccia nella Format Page (page 03).  Quest'ultimo valore dipende
  dalla formattazione ed  variabile, le tracce pi esterne hanno pi
  settori di quelle interne.  Il programma scsiinfo fornisce questi
  dati. Ci sono molti altri dettagli e difficolt da superare,  palese
  che nessuno utilizzer questo genere di informazioni (molto
  probabilmente nemmeno lo stesso sistema operativo).  Considerato che
  stiamo parlando di fdisk e di LILO i valori tipici sono:
  C/H/S=4476/27/171, valori questi che non possono essere utilizzati da
  fdisk perch la tabella delle partizioni riserva per la terna C/H/S
  rispettivamente 18, 8 e 6 bit.

  Ma allora come fa HDIO_GETGEO a ricavare tali valori?  Interrogando o
  il controller SCSI o facendo delle richieste appropriate al kernel.
  Qualche driver sembra pensare che le nostre richieste vogliano
  determinare la geometria reale mentre a noi interessa conoscere il
  valore dei parametri utilizzati da FDISK sia che si utilizzi DOS che
  OS/2 (o Adaptec AFDISK, ecc...)

   da sottolineare che fdisk utilizza il numero delle testine H e dei
  settori per traccia S per convertire i numeri dei settori LBA nel
  corrispondente indirizzo c/h/s; il numero dei cilindri C non riveste
  un ruolo importante in questa conversione.  Certi driver indicano che
  la capacit del drive  di almeno 1023*255*63 settori assegnando a
  C,H,S i seguenti valori:1023,255,63.  Cos facendo non si ottiene la
  vera dimensione del disco e si limita l'accesso ai primi 8GB a molte
  versioni di fdisk - un vero problema d'attualit.

  Nelle descrizioni a seguire con M si indica la capacit totale del
  disco, con C,H,S il numero di cilindri, testine e settori per traccia.
   sufficente ottenere i valori di H e S se si ricava C dalla relazione
  M / (H*S).

  I valori predefiniti di H e S sono rispettivamente 64 e 32.


     aha1740, dtc, g_NCR5380, t128, wd7000:
        H=64, S=32.


     aha152x, pas16, ppa, qlogicfas, qlogicisp:
        H=64, S=32 se C <= 1024, altrimenti H=255, S=63, C = min(1023,
        M/(H*S)). (C rappresenta un valore troncato, H*S*C non 
        un'approssimazione della capacit M.  Per questo molte versioni
        di fdisk si comportano in modo anomalo).  Il sorgente ppa.c
        utilizza M+1 invece di M per cui genera un messaggio d'errore
        dicendo che M  pi piccolo di 1 a causa di un baco in sd.c.


     advansys:
        H=64, S=32 se C <= 1024, se  abilitata l'opzione `> 1 GB' nel
        BIOS i valori assunti sono rispettivamente 255 e 63.



     aha1542:
        Richiede al controller quale delle due traduzioni possibili sta
        utilizzando e utilizza o H=255, S=63 o H=64, S=32. Nel primo
        caso durante il boot si ha il messaggio "aha1542.c: Using
        extended bios translation".


     aic7xxx:
        H=64, S=32 se C <= 1024, inoltre se viene utilizzato il
        parametro "extended" o si imposta il bit `extended' nella
        SEEPROM o nel BIOS i valori saranno: H=255, S=63.  L'opzione
        extended viene sempre impostata se non viene rilevata nessuna
        SEEPROM con il kernel 2.0.36 mentre con la versione 2.2.6 se non
        viene trovata la SEEPROM l'opzione  impostata solo se l'utente
        specifica in fase d'avvio il parametro "extended" (nel caso
        venga rilevata una SEEPROM tale parametro verr ignorato).
        Tutto ci significa che un sistema che funziona con il 2.0.36
        pu non avviarsi con il 2.2.6 (e richiedere l'opzione `linear'
        per LILO o il parametro `aic7xxx=extended' da passare al kernel
        al boot)


     buslogic:
        H=64, S=32 finch C >= 1024. Se si imposta la traduzione estesa
        nel controller si hanno due casi a seconda che sia verificata o
        meno la condizione M < 2^22: nel primo caso H=128, S=32
        altrimenti H=255, S=63.  Dopo aver effettuato la scelta della
        terna (C,H,S) viene letta la tabella delle partizioni e si
        verifica che il valore endH=H-1 appartenga ad una delle tre
        condizioni possibili (H,S) = (64,32), (128,32), (255,63). Sar
        utilizzata la coppia che soddisfa la condizione, tale scelta 
        segnalata da un messaggio durante il boot ("Adopting Geometry
        from Partition Table").


     fdomain:
        Ricava le informazioni sulla geometria o dalla tabella dei
        parametri BIOS del drive o dalla tavola delle partizioni.
        Utilizza i valori: H=endH+1, S=endS per la prima partizione,
        purch non sia vuota, oppure H=64, S=32 se M < 2^21 (1 GB),
        H=128, S=63 se M < 63*2^17 (3.9 GB) e H=255, S=63 in tutti gli
        altri casi.

     in2000:
        Utilizza la prima coppia di valori (H,S) = (64,32), (64,63),
        (128,63), (255,63) che verifica la condizione C <= 1024.
        Nell'ultimo caso il valore di C  troncato a 1023.


     seagate:
        Legge C,H,S dal disco (orrore!). Se C o S sono troppo grandi
        allora imposta S=17 e H=2 e raddoppia H finch C <= 1024.
        Significa che H sar impostato a zero nel caso in cui M >
        128*1024*17 (1.1 GB). Questo  un baco.


     ultrastor and u14_34f:
        Utilizza una coppia di valori (H,S) in funzione di come il
        controller mappa il disco.  ((H,S) = (16,63), (64,32), (64,63))


  Se il driver non specifica la geometria del disco possiamo richiedere
  i dati alla tabella delle partizioni oppure utilizzare tutta la
  capacit del disco.


  Diamo uno sguardo alla tabella delle partizioni.  Per convenzione le
  partizioni terminano in un cilindro esterno per cui dato fine =
  (endC,endH,endS) per una partizione qualsiasi si pone H = endH+1 e S =
  endS (ricordo che i settori si contano a partire da 1).  Il
  procedimento  descritto appresso in modo pi preciso.  Tra le
  partizioni non vuote si considera quella con il valore beginC pi
  grande.  Si controlla il valore end+1 di questa partizione, calcolato
  sia come somma di partenza con lunghezza sia ipotizzando che la
  partizione termini al confine di un cilindro.  Se entrambi i valori
  coincidono, o se endC = 1023 e la somma partenza+lunghezza  multiplo
  di (endH+1)*endS, allora la partizione  allineata sul confine di un
  cilindro. Si pongono H = endH+1 e S = endS. Nel caso in cui le
  verifiche siano negative o perch non ci sono partizioni o perch non
  hanno dimensioni note si utilizza la capacit del disco M.
  L'algoritmo  cos schematizzabile: porre H = M/(62*1024) (arrotondato
  all'intero superiore), S = M/(1024*H) (arrotondato all'intero
  superiore), C = M/(H*S) (arrotondato all'intero inferiore). I valori
  di (C,H,S) che si ottengono sono al massimo 1024 per C e 62 per S.


  11.  Linux e il limite degli 8 GiB dei controller IDE

  Il driver IDE di Linux ricava la geometria e la capacit di un disco
  (e molte altre cose) utilizzando una richiesta ATA IDENTIFY.

  Fino a poco tempo fa il driver non accettava il valore di lba_capacity
  restituito se questo era maggiore del 10% rispetto alla capacit
  calcolata come prodotto di C*H*S.  Ci nonostante grazie ad accordi
  tra i produttori di dischi IDE di grandi dimensioni (quelli con pi di
  16514064 settori) forniscono i valori: C=16383, H=16, S=63 per un
  totale di 16514064 settori (7.8 GB) indipendentemente dalla loro
  dimensione reale che forniscono alla lba_capacity.

  I kernel pi recenti (2.0.34, 2.1.90) conoscono il problema e si
  comportano di conseguenza. Se avete un kernel datato che vede
  solamente i primi 8 GB di un disco pi grande, e non volete
  aggiornarlo, provate a cambiare la funzione lba_capacity_is_ok in
  /usr/src/linux/drivers/block/ide.c come indicato:



              static in lba_capacity_is_ok (struct hd_driveid *id) {
                      id->cyls = id->lba_capacity / (id->heads * id->sectors);
                      return 1;
              }




  Per fare un aggiornamento meno brutale utilizzate il kernel 2.1.90.


  11.1.  Complicazioni del BIOS

  Come gi detto i dischi di grandi dimensioni forniscono la geometria
  C=16383, H=16, S=63 indipendentemente dalle dimensioni reali, mentre
  la dimensione reale  indicata dal valore della LBAcapacity.  Alcuni
  BIOS non la riconoscono, e traslano il 16383/16/63 in una terna con
  meno cilindri e pi testine, per esempio 1024/255/63 o 1027/255/63.
  Cos, il kernel non deve solo riconoscere la geometria 16383/16/63 ma
  anche quella generata da tali BIOS.  Dal kernel 2.2.2 questa
  operazione di riconoscimento funziona in modo corretto (prendendo dal
  BIOS i valori H e S e calcolando C =capacit/(H*S)).  Di norma questo
  problema si risolve impostando nei parametri del BIOS il disco come
  Normal (o, ancor meglio a None, non fornendo nessuna indicazione al
  BIOS).  Se questa strada non  percorribile perch dovete fare il boot
  da questo disco oppure avete una partizione DOS/Windows, e non 
  possibile aggiornare la versione del kernel alla 2.2.2 o superiori,
  passate al kernel i parametri durante il boot.

  Se il BIOS riporta la geometria 16320/16/63 ci  fatto per ottenere
  dopo la traduzione la terna 1024/255/63.

  Qui c' un ulteriore problema. Se il disco  stato partizionato usando
  una geometria traslata il kernel, durante la fase di avvio, potrebbe
  vedere tale geometria utilizzata nella tabella delle partizioni e
  riportare: hda: [PTBL] [1027/255/63].  Questa  una brutta faccenda
  perch ora il disco e di soli 8.4 GB. La versione 2.3.21 ha corretto
  questo problema tuttavia il passaggio dei parametri durante la fase di
  avvio pu essere d'aiuto.


  11.2.  Impostare il numero delle testine per mezzo dei ponticelli
  (Jumper)

  Molti dischi hanno dei ponticelli che permetto di selezionare una
  geometria a 15 o a 16 testine. La configurazione predefinita  quella
  a 16 testine.  A volte entrambe le geometrie indirizzano lo stesso
  numero di settori altre quella a 15 testine ne indirizza un numero
  inferiore.  C' una buona ragione come spiega Petri Kaukasoina per
  spiegare queste due opzioni: `Ho impostato un disco IBM Deskstar 16 GP
  (modello IBM-DTTA-351010) da 10.1 GiB per utilizzare 16 testine come
  da configurazione predefinita ma il mio vecchio PC (con BIOS AMI) non
  si avviava cos ho dovuto spostare il ponticello sull'opzione che d
  15 testine.  hdparm -i riporta RawCHS=16383/15/63 e LBAsects=19807200.
  Io utilizzo una configurazione 20960/15/63 per poter sfruttare tutta
  la capacit del disco.'  Per ulteriori informazioni su come
  ponticellare tali dischi visitate il sito:
  http://www.storage.ibm.com/techsup/hddtech/hddtech.htm.

  11.3.  Ridurre la capacit totale di un disco mediante l'uso dei pon
  ticelli

  Molti dischi hanno dei ponticelli che permettono di mostrare le
  dimensioni del disco pi piccole di quelle che sono.   un po' stupido
  a farsi e probabilmente nessun utente Linux vorrebbe mai utilizzare
  tale espediente ma alcuni BIOS non riescono a gestire i dischi di
  grandi dimensioni andando in "crash".  La soluzione pi comune 
  quella di non far vedere il disco all'avvio al BIOS, ma  possibile
  farlo solo se il disco non   quello di avvio.

  Il primo limite grave era il limite di 4096 cilindri (che corrisponde,
  con 16 testine e 63 settori/traccia a 2,11 GB).  Per esempio, il disco
  Fujitsu MPB3032ATU da 3.24 GB ha la geometria predefinita da
  6704/15/63 ma pu essere poticellato per fornire una geometria
  4092/16/63 e riportare di conseguenza una LBAcapacity di 4124736
  settori, in questo modo il sistema operativo non pu congetturare che
  la dimensione reale  pi grande.  In questi casi (con un BIOS che si
  "schianta" se riconosce la reale dimensione del disco  necessario
  ricorrere al ponticello)  necessario informare Linux sulle dimensioni
  del disco fornendo i parametri all'avvio.

  Questo  un caso sfortunato. Molti dischi possono essere
  "ponticellati" in modo da sembrare dischi da 2 GB e fornire quindi una
  geometria ridotta tipo 4092/16/63 o 4096/16/63 ma in grado di fornire
  il valore corretto della LBAcapacity.  Tali dischi sono in grado di
  lavorare bene e di utilizzare la capacit totale con Linux
  indipendentemente dalle impostazioni dei ponticelli.


  Un limite pi recente  quello dei ``33.8 GB''.  I kernel di Linux
  precedenti alla versione 2.3.21 devono essere aggiornati per poter
  gestire dischi IDE di dimensioni superiori a queste.  Alcuni dischi
  che superano tale limite possono essere ponticellati per sembrare dei
  dischi da 33.8 GB.  Per esempio l'IBM Deskstar (DPTA-353750) da 37.5
  GB pu essere ponticellato per sembrare un disco da 33.8 GB e fornire
  la geometria 16383/16/63 come un qualsiasi altro disco di grandi
  dimensioni, ma la LBAcapacity di 66055248 (che corrisponde a
  65531/16/63 o 4111/255/63).  Sfortunatamente i ponticelli sembrano
  essere troppo efficaci - non influenzano solo ci che il drive
  fornisce al sistema ma anche le operazioni di I/O: Petr Soucek
  comunica che questi parametri non sono d'aiuto nel caso di dischi
  d'avvio - ponticellando tali dischi ogni accesso ai settori oltre il
  settore 66055248 causa un errore di I/O.  Tuttavia con schede madri
  che montino il BIOS Award 4.51PG tali dischi possono essere utilizzati
  come dischi d'avvio ed inoltre in tutta la loro capacit.  Vedi anche:
  the BIOS 33.8 GB limit.



  12.  Il limite dei 65535 cilindri in Linux

  La chiamata HDIO_GETGEO memorizza il numero dei cilindri in una
  variabile di tipo short.  Questo vuol dire che se si hanno pi di
  65535 cilindri il loro valore verr troncato e (per una tipica
  configurazione SCSI com 1MiB di cilindri) un disco da 80 GiB apparir
  come uno da 16 GiB.  Una volta riconosciuto tale problema  facile
  evitarlo.

  12.1.  Problemi dei controller IDE con dischi di dimensioni superiori
  ai 34 GB

  I dischi superiori ai 33.8 GB non sono utilizzabili con i kernel
  precedenti alla versione 2.3.21.  Appresso si riportano i dettagli.
  Ipotizziamo l'acquisto di un nuovo disco IBM-DPTA-373420 con una
  capacit di 66835440 settori (34.2 GB).  I kernel ante 2.3.21
  riporterebbero una dimensione di 769*16*63 = 775152 settori (0.4 GB)
  che  una cosa spiacevole.  Se fornissimo i parametri hdc=4160,255,63
  da linea di comando non otterremmo alcun effetto - tale valori
  sarebbero ignorati.  Ma cosa succede? La funzione idedisk_setup()
  utilizza la geometria fornita dal disco (che  16383/16/63) e
  sovrascrive i valori specificati dall'utente da linea di comando che
  vengono utilizzati solo per impostare la geometria da passare al BIOS.
  La funzione current_capacity() o idedisk_capacity() ricalcola il
  numero dei cilindri come 66835440/(16*63)=66305 poich tale valore 
  memorizzato in una variabile short diviene 769.Fino a quando
  lba_capacity_is_ok() non distrugge id->cyls ogni sua chiamata
  successiva riporter il valore falso, di conseguenza la capacit del
  disco diviene 769*16*63.   disponibile un aggiornamento per diverse
  versioni del kernel.  Una "patch" per la versione 2.0.38 pu esere
  trovata presso: ftp.kernel.org.  Una "patch" per la versione 2.2.12
  pu essere trovata presso: www.uwsg.indiana.edu (potrebbero essere
  necessarie delle modifiche per eliminare i delimitatori del linguaggio
  html).  I kernel della serie 2.2.14 gestiscono tali dischi.  La serie
  2.3.* gestisce questi dischi a partire dalla versione 2.3.21.  
  possibile "risolvere" il problema a livello hardware utilizzando un
  ``ponticello'' (jumper) per impostare la dimensione di 33.8 GB.  In
  molti casi sar necessario un aggiornamento del ``BIOS'' se si vuole
  utilizzare tali dischi come dischi d'avvio del sistema.

  13.  Partizioni estese e logiche

  ``In precedenza'', abbiamo visto la struttura dell'MBR (settore 0): il
  codice del boot loader seguito da 4 voci della tavola delle partizioni
  da 16 byte ciascuna e dalla firma AA55.  Le voci della tavola delle
  partizioni di tipo 5 o F o 85 (Hex) hanno un significato speciale:
  descrivono le partizioni estese, che sono porzioni di disco che
  verranno ripartizionate in partizioni logiche (una partizione estesa
  non  che un contenitore di partizioni logiche e non pu essere
  utilizzata di per se stessa). Solo la posizione del primo settore di
  una partizione estesa  importante.  Questo primo settore contiene una
  tavola delle partizioni con quattro voci: una per la partizione
  logica, una per quella estesa e due inutilizzate.  In questo modo si
  ottiene una catena di tavole delle partizioni, sparse per il disco,
  dove la prima descrive tre partizioni primarie e una estesa mentre le
  tavole seguenti descrivono una partizione logica e la posizione della
  prossima tavola.

   importante capire questo: quando qualcuno fa qualcosa di stupido
  partizionando un disco si chiede: "I miei dati ci sono ancora?" La
  risposta : s. Ma, se si creano partizioni logiche verr riscritta la
  tavola delle partizioni che le descrive e ogni dato presente  perso.

  Il programma sfdisk mostrer l'intera catena. Ecco un esempio:


       # sfdisk -l -x /dev/hda

       Disk /dev/hda: 16 heads, 63 sectors, 33483 cylinders
       Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

          Device Boot Start     End   #cyls   #blocks   Id  System
       /dev/hda1          0+    101     102-    51376+  83  Linux
       /dev/hda2        102    2133    2032   1024128   83  Linux
       /dev/hda3       2134   33482   31349  15799896    5  Extended
       /dev/hda4          0       -       0         0    0  Empty

       /dev/hda5       2134+   6197    4064-  2048224+  83  Linux
           -           6198   10261    4064   2048256    5  Extended
           -           2134    2133       0         0    0  Empty
           -           2134    2133       0         0    0  Empty

       /dev/hda6       6198+  10261    4064-  2048224+  83  Linux
           -          10262   16357    6096   3072384    5  Extended
           -           6198    6197       0         0    0  Empty
           -           6198    6197       0         0    0  Empty
       ...
       /dev/hda10     30581+  33482    2902-  1462576+  83  Linux
           -          30581   30580       0         0    0  Empty
           -          30581   30580       0         0    0  Empty
           -          30581   30580       0         0    0  Empty

       #




   possibile costruire una tavola delle partizioni scorretta.  Molti
  kernel entrano in un loop se qualche partizione estesa punta a se
  stessa o ad una precedente nella catena.   possibile avere due
  partizioni estese in una tabella delle partizioni cos che la tabella
  si divida (questo capita per esempio con fdisk che non riconosce ogni
  5, F e 85 come partizioni estese e che crea una 5 dopo una F).
  Programmi non standard tipo fdisk possono risolvere queste situazioni
  anche se richiedono del lavoro manuale per riparare le partizioni.  Il
  kernel di Linux accetta una divisione nei livelli pi esterni.  In
  questo modo  possibile avere due catene di partizioni logiche.
  Talvolta pu essere utile - per esempio, si pu usare il tipo 5 che 
  visto dal DOS e il tipo 85, invisibile al DOS, cos che il DOS FDISK
  non vada in crash perch la partizione logica supera il cilindro 1024.
  Di solito si ha bisogno di sfdisk per eseguire queste operazioni.



  14.  Risoluzione dei problemi

  Molte persone pensano di avere problemi anche quando non ce ne sono.
  Oppure pensano che i loro problemi siano legati alla geometria del
  disco quando alla fine dei conti la geometria non c'entra nulla con il
  problema.  Tutto quello che ho esposto potr sembrare complicato ma
  maneggiare la geometria dei dischi  estremamente facile: non fate
  niente e tutto funzioner correttamente; o forse passate a LILO
  l'opzione `linear' se al boot non andate oltre a LI.  Guardate i
  messaggi del kernel al boot e ricordate: meno giocherellate con le
  geometrie (specificando il numero di testine e cilindri a LILO o a
  fdisk o dalla riga di comando al kernel) e pi possibilit avete che
  tutto funzioni.  Per dirla in poche parole, va gi tutto bene cos
  com' configurato in maniera predefinita.

  E ricordate che Linux non utilizza in nessuna riga di codice la
  geometria del disco per questo motivo non avrete problemi
  utilizzandolo dovuti alla geometria.  La geometria del disco 
  utilizzata solamente da LILO e da fdisk.  Di converso, se LILO
  fallisce l'inizializzazione del sistema ci pu essere un problema
  legato alla geometria.  Se sistemi operativi diversi non capiscono la
  tavola delle partizioni allora c' un problema legato alla geometria.
  Non c' nient'altro. In particolare se il montaggio delle periferiche
  ha dei problemi, state tranquili non sono legati alla geometria del
  disco ma a qualcos'altro.


  14.1.  ai dischi IDE una geometria errata.  Problema: avviando il sis
  tema da un disco SCSI viene assegnata

   possibile che un disco fornisca la sua geometria in modo errato.  Il
  kernel di Linux interroga il BIOS per conoscere la geometria di hd0 e
  hd1 (i driver del BIOS indicati come 80H e 81H) e assume che questi
  dati siano per hda e hdb.  Ma in un sistema SCSI, in cui i primi due
  dischi possono essere SCSI, pu succedere che al quinto disco, che 
  il primo disco IDE hda, sia assegnata la geometria di sda.  Questo
  tipo di problemi si risolvono facilmente fornendo i parametri della
  geometria `hda=C,H,S' in fase di inizializzazione o in /etc/lilo.conf.



  14.2.  Un non problema: dischi identici possono avere geometria
  diversa?

  `Posseggo due dischi eguali da 10 GB della IBM.  Tuttavia fdisk
  fornisce delle dimensioni diverse. Guarda:


       # fdisk /dev/hdb
       Disk /dev/hdb: 255 heads, 63 sectors, 1232 cylinders
       Units = cylinders of 16065 * 512 bytes

          Device Boot  Start      End   Blocks   Id  System
       /dev/hdb1           1     1232  9896008+  83  Linux native
       # fdisk /dev/hdd
       Disk /dev/hdd: 16 heads, 63 sectors, 19650 cylinders
       Units = cylinders of 1008 * 512 bytes

          Device Boot  Start      End   Blocks   Id  System
       /dev/hdd1           1    19650  9903568+  83  Linux native




  Cos' capitato?'

  Cosa sta succedendo? Bene, prima di tutto questi dischi sono entrambi
  da 10 giga: le dimensioni di hdb sono 255*63*1232*512 = 10133544960, e
  quelle di hdd 16*63*19650*512 = 10141286400, cos non c' nulla di
  errato e il kernel li vede entrambi come dischi da 10.1 GB.  Perch la
  differenza di dimensione?  dovuta al fatto che il kernel acquisisce i
  dati per i primi due dischi IDE da BIOS e il BIOS ha rimappato hdb in
  modo che abbia 255 testine (e 16*19650/255=1232 cilindri).
  L'arrotondamento ti costa almeno 8 MB.

  Se vuoi rimappare hdd devi passare, come fatto prima, i parametri
  `hdd=1232,255,63' al kernel in fase di inizializzazione.


  14.3.  Un non problema: fdisk vede molti blocchi in meno di df?

  fdisk ti dice quanti blocchi ci sono nel disco.  Se tu crei un
  filesystem sul disco, diciamo con mke2fs, allora questo filesystem ha
  bisogno di spazio per mantenere le informazioni relative a se stesso -
  di solito circa il 4% della dimensione del filesystem, di pi se il
  numero degli inode  alto. Per esempio:


       # sfdisk -s /dev/hda9
       4095976
       # mke2fs -i 1024 /dev/hda9
       mke2fs 1.12, 9-Jul-98 for EXT2 FS 0.5b, 95/08/09
       ...
       204798 blocks (5.00%) reserved for the super user
       ...
       # mount /dev/hda9 /somewhere
       # df /somewhere
       Filesystem         1024-blocks  Used Available Capacity Mounted on
       /dev/hda9            3574475      13  3369664      0%   /mnt
       # df -i /somewhere
       Filesystem           Inodes   IUsed   IFree  %IUsed Mounted on
       /dev/hda9            4096000      11 4095989     0%  /mnt
       #




  Abbiamo una partizione con 4095976 blocchi, creiamo un filesystem di
  tipo ext2 nella stessa, la montiamo e scopriamo che ha solo 3574475
  blocchi - 521501 blocchi (12%) sono "persi" perch dedicati agli inode
  e ad altre informazioni.   da osservare che la differenza tra il
  numero di blocchi totale 3574475 e il numero di blocchi disponibili
  per gli utenti 3369664  pari a 13 blocchi in pi dei 204798 riservati
  al root. Quest'ultimo numero pu esserre modificato utilizzando
  tune2fs.  Questa opzione `-i 1024'  ragionevole solo per sistemi che
  devono contenere molti piccoli file come le news e simili.  Il valore
  predefinito sarebbe:


       # mke2fs /dev/hda9
       # mount /dev/hda9 /somewhere
       # df /somewhere
       Filesystem         1024-blocks  Used Available Capacity Mounted on
       /dev/hda9            3958475      13  3753664      0%   /mnt
       # df -i /somewhere
       Filesystem           Inodes   IUsed   IFree  %IUsed Mounted on
       /dev/hda9            1024000      11 1023989     0%  /mnt
       #




  Ora solo 137501 blocchi (3.3%) sono usati per gli inode, cos abbiamo
  guadagnato rispetto a prima 384 MB (ogni inode accupa 128 byte).
  D'altro canto, questo filesystem pu contenere al massimo 1024000 di
  file (pi che sufficienti), contro i 4096000 (troppi) di prima.






























































  LinuxDoc+Emacs+Ispell-HOWTO
  di Philippe Martin (feloy@wanadoo.fr)

  27 Febbraio 1998

  Questo documento  dedicato a tutti coloro che scrivono o traducono
  gli HOWTO di Linux o qualunque altro documento per il Linux Documenta
  tion Project (anche ILDP, ovviamente!). Pu fornire loro suggerimenti
  su come usare i vari applicativi tra cui Emacs e Ispell. Traduzione a
  cura di Christopher Gabriel, cgabriel@pluto.linux.it, ultima revisione
  12 Ottobre 1998.


  1.

  Presentazione

  1.1.  Copyright

  Copyright Philippe Martin 1998
  You may redistribute and/or modify this document as long as you comply
  with the terms of the GNU General Public Licence, version 2 or later.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.




  Copyright Philippe Martin 1998
  Potete redistribuire e/o modificare questo documento nelle modalit e
  limiti come descritti nella Licenza Pubblica Generale GNU, versione 2
  o successive.



  1.2.

  Ringraziamenti

  Ringrazio vivamente Sbastien Blondeel, che mi ha chiesto molto sulla
  configurazione di Emacs. Le sue intelligenti domande mi hanno permesso
  di capire meglio certe cose e di renderle disponibili a voi attraverso
  questo documento.



  1.3.

  Commenti

  Non esitate a dirmi qualunque cosa che pensate possa rendere questo
  documento migliore. Esaminer le vostre critiche attentamente. Non
  esitate neppure a pormi domande riguardanti qualunque argomento
  trattato in questo documento. Sar molto felice di rispondervi, visto
  che molto probabilmente questo mi permetter di migliorare il mio
  lavoro  (-- Nota del traduttore: Se questo italiano  orribile, allora
  mandatele a me!--) .






  1.4.

  Versioni

  Questo documento prender in esame le seguenti versioni:


    Sgml-tools versione 0.99,


    Emacs versione 19.34,


    Ispell versione 3.1,


    Tutte le librerie di Emacs a cui fa riferimento questo documento
     sono distribuite con la versione di Emacs di cui sopra, ad eccetto
     di iso-sgml, che  fornito assieme a XEmacs, e psgml, che  una
     libreria a se stante.





  2.

  Introduzione

  2.1.

  SGML

  Standard Generalised Mark-up Language, o SGML,  un linguaggio per
  definire la tipologia di un documento.


  Per esempio, potete definire il tipo di documento ricetta, con una
  prima parte per la presentazione degli ingredienti, una seconda che
  introduce gli accessori, una terza che descrive le istruzioni passo
  passo per cuocere la torta, e una immagine finale che mostra il
  risultato, la torta pronta da mangiare.



  Questo  chiamato Document Type Definition (DTD), Definizione di Tipo
  di Documento. Non servir a descrivere l'aspetto del prodotto finale,
  definisce solamente cosa pu contenere.


  Per usare nuovamente lo stesso esempio, sono sicuro che leggendo la
  mia idea di ricetta, riconoscerete le vostre ricette, o le vostre
  preferite. In ogni caso, attualmente hanno aspetto differente: le mie
  hanno una piccola immagine di una tazza nell'angolo in alto a
  sinistra, e gli ingredienti elencati nel giardino posteriore, fra la
  piscina e il barbecue. Le vostre?



  Grazie a questa definizione standard, chiunque pu scrivere un
  documento, senza doversi preoccupare di come apparir al lettore.





  2.2.

  La tipologia LinuxDoc

  Questa tipologia  usata per scrivere, come potete avere indovinato,
  documenti relativi a Linux.


  Questi documenti sono usualmente strutturati in questo modo: un titolo
  di inizio, seguito dal nome dell'autore, la versione del documento e
  la data. Successivamente  presente una breve descrizione (non avete
  quindi bisogno di girellare per tutto il documento per capire di cosa
  si parla o per realizzare che quello che c' scritto non vi interessa
  ), poi l'indice che mostra la struttura di tutto il documento, che vi
  permette di accedere direttamente alla sezione che pi vi interessa.


   presente la lista dei capitoli, delle sezioni dei paragrafi.
  Attraverso questi, si pu inserire piccole parti di programmi,
  cambiare i font per enfatizzare parole o frasi, inserire liste, fare
  riferimenti ad altre parti del documento etc.


  Per scrivere questo tipo di documento, dovete specificare nel punto
  giusto il titolo, l'autore, la data, la versione, e ancora i capitoli
  e le sezioni, definire quando deve essere visualizzata una lista di
  oggetti, quali sono i suoi elementi etc.


  2.3.

  SGML-Tools

  Gli SGML-Tools permettono di creare dal documento con le vostre
  specifiche il risultato finale, nel formato che preferite. Se volete
  inserirlo nella vostra libreria privata, sceglierete PostScript. Se
  volete condividerlo attraverso il World Wide Web, sar allora HTML. Se
  dovete leggerlo con Windows, potete trasformarlo in RTF in modo tale
  da renderlo leggibile con qualunque Word Processor. Oppure potete
  utilizzare tutti e tre questi formati, cos sarete pronti a qualunque
  evenienza.

  Gli SGML-Tools sono disponibili via FTP anonimo a
  ftp://ftp.lip6.fr/pub/sgml-tools/



  3.

  Il vostro primo documento



  3.1.

  Da un documento di testo

  Se desiderate convertire un documento di solo testo in SGML per
  crearlo in altri formati, questo fa al caso vostro:


  1. Aggiungete le seguenti linee all'inizio del file:




             <!doctype linuxdoc system>
              <article>
               <title>Qui metteteci il titolo</title>
               <author>
                nome dell'autore, email dell'autore etc
               </author>
               <date>
                versione e data
               </date>






  2. Se volete aggiungere una breve descrizione del documento circondate
     il paragrafo con i tag <abstract> e </abstract>.



  3. Dopodich inserite il tag <toc>, che signifiva Table of Contents,
     ovvero l'Indice.



  4. All'inizio di ogni nuovo capitolo, sostituite la linea contenente
     il numero e il titolo del capitolo con:



            <sect>Titolo del nuovo Capitolo



  e aggiungete il tag </sect> all fine del capitolo stesso.



  Nota : Non dovete inserire il numero del capitolo, questo viene
  inserito automaticamente.



  5. Procede allo stesso modo per le sezioni. Dovete cancellare i loro
     numeri e circondate il titolo con il tag <sect1> e terminate con
     </sect1>.



  6. Potete definite fino a 4 livelli di sezione nidificati, usando
     <sectn> ande </sectn> dove n= 2, 3, o 4.


  7. All'inizio di ogni paragrafo, inserite il tag <p>.


  8. Se dovete enfatizzare alcune parti del testo, usate il tag <it> e
     </it> (italico), <bf> e </bf> (grassetto), o <tt> e </tt> (macchina
     da scrivere).



  9. Per inserire una lista come la seguente:



             Questa  una lista di quattro elementi:

              - qui va la prima linea
              - seguita dalla seconda
              - ancora un'altra, per favore
              - ok, basta cos.




  dovete sostituirla con:


          Questa  una lista di quattro elementi:
         <itemize>
         <item>qui va la prima linea
         <item>seguita dalla seconda
         <item>ancora un'altra, per favore
         <item> ok, basta cos.
         </itemize>






  10.
     Quando un intero blocco  parte di codice di un programma, e
     qualunque altra cosa deve essere evidenziata, tipo:


            <verb>
             10 REM Oh mio Dio cosa  questo?
             20 REM Penso che ormai sia scomparso!
             30 PRINT "Sono tornato baby";
             40 PRINT "per salvare il mondo."
             50 INPUT "Da chi? chi sei tu? ",M$
             60 IF M$="Bill" THEN PRINT "Verso la saggezza.":GOTO PARADISE
             70 ELSE PRINT "Non hai via di scampo...":GOTO RICHMOND
             </verb>






  11.
     In questo modo, il vostro documento SGML formattato avr un aspetto
     decente. Se lo volete rifinire ulteriormenete, potete leggervi il
     manuale utente degli SGML-Tools, che fornisco ulteriori dettagli
     sul tipo di documento LinuxDoc.





  4.

  Configurare Emacs



  4.1.

  Caratteri accentati

  Se volete scrivere documenti in francese o in qualunque altra lingua
  dell'Europa occidentale, avete bisogno del set di caratteri a 8-bit.
  Di seguito come configurare Emacs per fargli accettare questi
  caratteri.



  4.1.1.

  La visualizzazione di caratteri 8-bit

  Per permetter a Emacs di visualizzare caratteri a 8-bit, dovete
  aggiungere le seguenti linee nel vostro file .emacs:



         (standard-display-european 1)
         (load-library "iso-syntax")




  Se state usando Emacs su di un terminale che non ha il supporto per i
  caratteri 8-bit, potete usare la libreria iso-ascii ((load-library
  "iso-ascii")), che permette ad Emacs di visualizzare questo tipo di
  caratteri con la migliore approssimazione.



  4.1.2.

  Digitare caratteri 8-bit

  Se la vostra tastiera vi permette di digitare caratteri accentati,
  allora nessun problema. Se invece non  cos ecco alcuni rimedi:



  4.1.2.1.  La libreria iso-acc

  La libreria iso-acc di Emacs vi permette di digitare caratteri 8-bit
  da una tastiera a 7-bit.


  Per utilizzarla, inserite il seguente codice nel vostro file .emacs:


        (load-library "iso-acc")





  Quindi, mentre state usando Emacs e aprendo il file che volete
  editare, digitate Meta-x iso-accents-mode.


  Potete inserire la  della parola francese caf digitando ' e e.
  Solitamente potete inserire una lettera accentata digitando prima
  l'accento, e poi la lettera da accentare ( maiuscola o minuscola). I
  seguenti sono accenti che potete usare:





  ` : Grave


  ^ : Circonflesso


  " : Dieresi


  ~ : Tilde, cedilla, e altri casi particolari


  / : Per barrare una lettera etc.

  Se avete bisogno di uno di questi caratteri e non della lettera
  accentata, inseritelo facendo seguire uno spazio. Per esempio, per
  inserire l'lphant, premete l ' <spc> ' e l ' e ...


  Potete trovare tutte le combinazioni possibili nel file iso-acc.el.



  4.1.2.2.  Il tasto<Meta>

  Alcuni terminali vi permettono di digitare caratteri a 8-bit con il
  tasto<Meta> (oppure <Alt>). Per esempio, premendo <Meta-i> otterrete
  il carattere . Ma Emacs riserva al tasto <Meta> altri usi, e io so
  che non esiste nessuna libreria che permette di usarlo per i caratteri
  accentati.


  Questa  una soluzione:




        (global-set-key "\ei" '(lambda () (interactive) (insert ?\351)))
                           _                                      ___



  Una linea di questo genere, se inserita nel vostro .emacs, permetter
  di digitare  usando la combinazione <Meta>-i. Potete ridefinire in
  questo modo la combinazione che permetter di inserire i nel tasto
  giusto e 351 nel giusto codice (il collegamento con il codice viene
  estratto dalla tabella del set di caratteri ISO-8859-1).

  Attenzione! Qualche impostazione di localizzazione pu ridefinire
  queste combinazioni.



  4.1.3.

  La visualizzazione di caratteri SGML a 8-bit

  Lavorando con SGML, potete accentare i caratteri con delle macro. Per
  esempio, il tasto   &eacute;. Generalmente, le applicazioni che
  devono leggere SGML possono gestire caratteri a 8-bit e non c'
  bisogno di usare queste macro. Ma alcune di queste non sono in grado
  di farlo. Ma, visto che c' un modo per risolvere questo problema,
  sarebbe fastidioso vedere queste applicazioni non funzionare
  correttamente, no?


  La libreria iso-sgml vi permette di digitare caratteri accentati sotto
  Emacs, come normale, ma quando il file sar salvato su disco, allora
  questi caratteri saranno convertiti nel loro equivalente SGML.


   quindi molto semplice, grazie a questa libreria, digitare e
  rileggere il proprio documento con Emacs, e sarete sicuri che
  qualunque applicazione che non supporta i caratteri 8-bit potr
  accettarlo.


  Per usare questa libreria, dovete soltanto aggiungere le seguenti
  linee nel vostro file .emacs:



        (setq sgml-mode-hook
        '(lambda () "Default per SGML-mode"
         (load-library "iso-sgml")))






  4.2.

  Modalit SGML

  Una volta caricato un file che ha una estensione di tipo .sgml, Emacs
  entra automaticamente in modalit SGML, o sgml-mode. Se non  cos,
  potete sempre avviarla manualmente digitando Meta-x sgml-mode, oppure
  automaticamente aggiungendo queste righe nel vostro .emacs:


        (setq auto-mode-alist
        (append '(("\.sgml$"  . sgml-mode))
                  auto-mode-alist))



  Questa modalit vi permette di scegliere come inserire i caratteri a
  8-bit per esempi. Con Meta-x sgml-nome-8bit-mode (o la voce di menu
  SGML/Toggle 8-bit insertion), potete scegliere di digitare i caratteri
  a 8-bit cos come sono, oppure in forma SGML, per esempio &...;.  Per
  mette inoltre di nascondere o mostare i tag SGML, con Meta-x sgml-
  hide-tags e Meta-x sgml-show-tags.




  4.3.  Modalit PSGML

  La modalit PSGML aiuta moltissimo a editare documenti SGML con Emacs.


  La documentazione psgml-linuxdoc spiega come installare questa
  modalit e usarla con LinuxDoc.



  4.4.

  Miscellanea


  4.4.1.

  Modalit auto-fill

  In modalit normale, quando digitate un paragrafo e arrivate alla fine
  della linea, dovete usare il tasto <Invio> da soli per poter
  raggiungere la linea successiva, oppure la linea continuer per tutto
  il paragrafo.

  Se proseguite con alcune linee oltre una larghezza ragionevole, non
  sarete in grado di vedere il resto della linea con alcuni editors.


  La modalit auto-fill automatizza questa procedura, peraltro noiosa:
  quando arrivate a una determinata colonna (solitamente la
  settantesima), sarete automaticamente spostati nelle linea successiva.


  Il testo seguente descrive come utilizzare questa modalit, e
  impostare la larghezza delle vostre linee a 80:



         (setq sgml-mode-hook
               '(lambda () "Default per SGML mode."
                   (auto-fill-mode)
                   (setq fill-column 80)))






  5.

  Ispell

  Se volete controllare l'ortografia dei vostri documenti all'interno di
  Emacs, allora potete usare il pacchetto Ispell e la sua modalit
  Emacs.



  5.1.

  Impostare il dizionario predefinito

  Potete impostare Emacs in modo tale che quando un file viene caricato
  scelga automaticamente quale dizionario usare (potete selezionarne
  diversi). Il primo, sicuramente il pi importante,  il dizionario
  distribuito con Ispell. Potete scegliere fra varie lingue. Il secondo
   il vostro dizionario personale, dove Ispell inserir le parole che
  non pu trovare nel dizionario principale ma che devono essere
  ricordate.  Se desiderate usare come dizionario predefinito quello
  Francese che  distribuito con Ispell, e se volete usare il file
  .ispell-dico-perso, che si trova nella vostra directory home, come
  dizionario personale, inserite le seguenti linee nel vostro file
  .emacs:








         (setq sgml-mode-hook
         '(lambda () "Defaut per SGML mode."
         (setq ispell-personal-dictionary "~/.ispell-dico-perso")
         (ispell-change-dictionary "francais")
         ))






  5.2.

  Selezionare un dizionario  per determinati file

  Potreste avere qualche problema se non si fate la correzione
  ortografica dei vostri documenti sempre con la lingua. Se traducete
  documenti,  normale che passiate da un linguaggio (e dizionario)
  all'altro molto spesso.



  Non sono a conoscenza di una funzione Lisp che permetta di
  selezionare, sia automaticamente oppure con un click del mouse, il
  dizionario principale e quello personale associato al linguaggio che
  viene utilizzato (se qualcuno lo sa, per favore me lo dica!).


  In ogni caso,  possibile indicare, alla fine del file, quale
  dizionario volete che venga utilizzato per quel determinato documento.
   sufficiente aggiungere queste specifiche come commenti, in modo tale
  che Ispell possa leggerli quando viene avviata la correzione
  ortografica. Ecco un esempio per la lingua inglese:



        <!-- Local IspellDict: english -->
        <!-- Local IspellPersDict: ~/emacs/.ispell-english -->



  Se avete precedentemente definito, nel vostro file .emacs, che il
  vostro dizionario , per esempio, quello francese, allora potete
  aggiungere queste linee alla fine di ogni file scritto in inglese.




  5.3.

  Correzione ortografica dei vostri documenti

  Per eseguire la correzione ortografica del vostro documento, usate, in
  qualcunque punto del documento, il comando Meta-x ispell-buffer.
  Potete in ogni caso eseguire questo controllo in una singola sezione
  del documento:



    Marcare l'inizio della sezione con Ctrl-Spc (mark-set-command),


    Muovetevi fino alla fine della sezione da correggere,



    digitate Meta-x ispell-region.


  A questo punto Emacs avvia Ispell. Appena incontra una parola
  sconosciuta, questa viene mostrata evidenziata e aspetta che
  immettiate un comando:



    spazio accetta la parola, questa volta soltanto


    i accetta la parola e la inserisce nel dizionario personale


    a accetta la parola per questa sessione di Ispell


    A accetta la parola per questo file, e la inserisce nel dizionario
     personale


    r permette di correggere la parola manualmente


    R permette di correggere tutte le ricorrenze della parola che 
     stata corretta


    x arresta la correzione, e riporta il cursore dove si era lasciato
     inizialmente


    X arresta la correzione e lascia il cursore dove si trova,
     permettendo di correggere il file; sarete in grado di continuare la
     correzione in un secondo tempo usando Meta-x ispell-continue


    ? accede alla guida in linea.


     Se Ispell trova una o pi parole nel dizionario simili a quella
     sconosciuta, le mostrer in una piccola finestra, ognuna preceduta
     da un numero. Basta premere questo numero per sostituire la parola
     sbagliata con quella corrispondente.




  5.4.

  Dizionario personale VS dizionario nel file locale

  Il tasto i vi permette di inserire una parola nel vostro dizionario
  personale, come A permette di inserirla nel dizionario in file locale.


  Il dizionario nel file locale  una sequenza di parole inserite alla
  fine del file, come commento, rilette da Ispell ogni volta che viene
  eseguito sul quel file specifico. In questo modo  possibile accetare
  alcune parole nel file in questione, ma non in altri.


  Dal mio punto di vista credo che sia meglio che il dizionario
  personale venga utilizzato per parole che non sono contenute nel
  dizionario principale ma che sono tipiche del linguaggio (come le
  parole accentate), con in pi parole comuni come nomi propri o altre
  (come Linux), se non sono troppo simili ad altre presenti in quello
  principale; aggiungere troppe parole nel dizionario personale, come
  nomi propri, pu essere "pericoloso", poich possono essere viste come
  parole della lingua in uso (immaginate Ispell alle prese con qualcosa
  del genere: `When the going gets tof, the tof get going'). (-- Tof 
  l'abbreviazione francese per il nome proprio Christophe!.--)



  5.5.

  Correzione ortografica durante la digitazione

  Ispell pu controllare l'ortografia mentre state digitando il vostro
  documento. Dovete utilizzare ispell-minor-mode per questo. Per
  avviarlo o arrestarlo, digitate Meta-x ispell-minor-mode. Ispell
  emetter un beep ogni volta che digiterete una parola che non  nei
  due dizionari.



  Se questi beep vi stanno annoiando (oppure il vostro compagno di
  stanza si  stancato di voi.. ), potete rimpiazzarli con un flash
  sullo schermo, con il comando Meta-x set-variable RET visible-bell RET
  t RET. Potete anche aggiungere le seguenti linee nel vostro file
  .emacs e Emacs non parler mai pi:



         (setq visible-bell t)




  6.

  Trucchetti Sporchi

  6.1.

  Inserire automaticamente un header

  Emacs permette di associare delle procedure ad eventi specifici
  (aprire un file, salvarlo, avviare una nuova modalit etc ).



  La libreria autoinsert utilizza questa caratteristica: quando aprite
  un nuovo file con Emacs, questa libreria inserisce, dipendentemente
  dal tipo di file, un header standard.


  Nel nostro caso, questo header standard pu definire il tipo di
  documento (LinuxDoc), il titolo, l'autore, e la data.


  Descriver adesso due modi per fare questo. Potete creare un template
  che contenga le informazioni da inserire, oppure potete avviare una
  routine elisp.






  6.1.1.

  Inserendo un file

  Per prima cosa dovete permettere a Emacs di avviare la auto-insert
  quando un file viene aperto, quindi di leggere la libreria auto-insert
  che dichiara la auto-insert-alist che necessita di cambiamenti. Questa
  lista definisce gli header da inserire per ogni tipo di file. Per
  default, il file da inserire deve trovarsi nella cartella ~/insert/,
  ma  possibile definire la variabile auto-insert-directory se volete
  mettere i vostri file da qualche altra parte.


  Aggiungere le seguenti linee al vostro .emacs per il inserire il file
  ~/emacs/sgml-insert.sgml ogni volta che aprite un nuovo documento
  SGML:



        (add-hook 'find-file-hooks 'auto-insert)
        (load-library "autoinsert")
        (setq auto-insert-directory "~/emacs/")
        (setq auto-insert-alist
              (append '((sgml-mode .  "sgml-insert.sgml"))
                      auto-insert-alist))




  A questo punto potete scrivere nel file ~/emacs/sgml-insert.sgml il
  vostro header personalizzato, quindi riavviare Emacs e aprire qualche
  nuovo file .sgml. Emacs dovrebbe chiedervi la conferma per
  l'inserimento automatico, e se rispondete 'Yes', inserire il nuovo
  header.



  6.1.2.

  Avviando una routine

  Questo funziona come prima, ma invece di impostare la auto-insert-
  alist in un file da inserire, dovete impostare una funzione da
  eseguire. Questo  il procedimento, assumendo come esempio che volete
  scrivere una funziona in un file chiamato ~/emacs/sgml-header.el (non
   il caso di appesantire il vostro .emacs con questo tipo di funzioni,
  oppure diventer troppo grande):



        (add-hook 'find-file-hooks 'auto-insert)
        (load-library "autoinsert")
        (add-to-list 'load-path "~/emacs")
        (load-library "sgml-header")
        (setq auto-insert-alist
              (append '(((sgml-mode .  "SGML Mode") . insert-sgml-header))
                      auto-insert-alist))




  Troverete nella ``appendice'' un esempio di una funzione insert-sgml-
  header.



  7.

  Una funzione insert-sgml-header

  Questa funzione permette all'utente di inserire un header
  personalizzato in un documento per il Linux Documentation Project
  all'interno di un file. Pu essere richiamata automaticamente quando
  viene aperto un nuovo file, oppure in modo esplicito dall'utente.


  Questa funzione attende un input dell'utente attraverso il mini-
  buffer, per alcune informazioni, di cui alcune sono necessarie, altre
  invece no.

  Per prima cosa il titolo. Se non viene inserito, la funziona esce
  immediatamente, e niente viene inserito. Segue poi la data, l'autore,
  la sua email e home-page (le ultime due sono opzionali).

  Successivamente c' una richiesta per il nome del traduttore. Se non
  volete inserire niente, basta premere Invio, e nessun altra domanda
  circa un ipotetico traduttore verr richiesta. Se invece ne esiste
  uno, verr richiesta la sua email e home-page (come sempre opzionali).


  Questa funzione quindi inserir nel file corrente tutte le
  informazioni da voi inserite, inclusi naturalmente tutti i tag
  necessari. Inserir anche quelli per l'abstract e per il primo
  capitolo. Infine posizioner il cursore dove l'abstract deve essere
  inserito.





































  (defun insert-sgml-header ()
    "Inserisce gli header per un documento LinuxDoc"
    (interactive)
    (let (title author email home translator email-translator home-translator date
                starting-point)
      (setq title (read-from-minibuffer "Titolo: "))
      (if (> (length title) 0)
          (progn
            (setq date (read-from-minibuffer "Data: ")
                  author (read-from-minibuffer "Autore: ")
                  email (read-from-minibuffer "E-mail autore: ")
                  home (read-from-minibuffer "Home page autore: http://")
                  translator (read-from-minibuffer "Traduttore: "))
            (insert "<!doctype linuxdoc system>\n<article>\n<title>")
            (insert title)
            (insert "</title>\n<author>\nAutore: ") (insert author) (insert "<newline>\n")
            (if (> (length email) 0)
                (progn
                  (insert "<htmlurl url=\"mailto:")
                  (insert email) (insert "\" name=\"") (insert email)
                  (insert "\"><newline>\n")))
            (if (> (length home) 0)
                (progn
                  (insert "<htmlurl url=\"http://")
                  (insert home) (insert "\" name=\"") (insert home)
                  (insert "\">\n<newline>")))
            (if (> (length translator) 0)
                (progn
                  (setq email-translator (read-from-minibuffer "E-mail traduttore: ")
                        home-translator (read-from-minibuffer "Home page traduttore: http://"))
                  (insert "Traduzione : ")
                  (insert translator)
                  (insert "<newline>\n")
                  (if (> (length email-translator) 0)
                      (progn
                        (insert "<htmlurl url=\"mailto:")
                        (insert email-translator) (insert "\" name=\"")
                        (insert email-translator)
                        (insert "\"><newline>\n")))
                  (if (> (length home-translator) 0)
                      (progn
                        (insert "<htmlurl url=\"http://")
                        (insert home-translator) (insert "\" name=\"")
                        (insert home-translator)
                        (insert "\"><newline>\n")))))
            (insert "</author>\n<date>\n")
            (insert date)
            (insert "\n</date>\n\n<abstract>\n")
            (setq point-beginning (point))
            (goto-char point-beginning)
            ))))















  Loopback Encrypted Filesystem HOWTO
  Copyright di Ryan T. Rhea, rhear@cs.winthrop.edu
  v1.1, 29 novembre 1999

  Questo documento spiega come impostare e quindi usare un file system
  che, quando montato da un utente, cifra in maniera dinamica e traspar
  ente i suoi contenuti. Il file system viene conservato in un file
  regolare, che pu essere nascosto o nominato in modo non-evocativo
  cos che probabilmente passerebbe inosservato. Questo permette di con
  servare dati ad un alto livello di sicurezza.  Traduzione a cura di
  Isabella Ruocco e di Diego Buffa.  Ultima revisione 3 aprile 2000.

  1.  Prima di iniziare

  Questo procedimento richiede il codice sorgente del kernel, saper come
  compilare questo codice e un sacco di pazienza.  Raccomando caldamente
  di tenere pronto un disco di avvio.  Inoltre, siate sicuri di avere
  una copia prima di memorizzare permanentemente i vostri dati
  importanti sul file system cifrato - potrebbe danneggiarsi come
  qualsiasi altro file system.

  Dovrete applicare le patch come minimo fino alla versione 2.2.9 del
  kernel di linux prima di continuare. Ulteriori istruzioni su come
  applicare le patch si trovano nella sezione ``Dettagli'' pi avanti in
  questo documento.

  Il codice sorgente del kernel si pu trovare in:


       <ftp://ftp.kerneli.org/>


  C' un HOWTO sul procedimento della ricompilazione del kernel in:


       <http://metalab.unc.edu/LDP/HOWTO/>


  This document may be reproduced and distributed in whole or in part,
  without fee, subject to the following conditions:


    The copyright notice and this permission notice must be preserved
     complete on all complete or partial copies.

    Any translation or derived work must be approved by the author in
     writing before distribution.

    If you distribute this work in part, instructions for obtaining he
     complete version of this manual must be included, and a means for
     obtaining a complete version provided.

    All source code in this document is placed under the GNU General
     Public License, available via anonymous FTP from:


       <ftp://prep.ai.mit.edu/pub/gnu/COPYING/>


  (Questo documento pu essere riprodotto e distribuito per intero o in
  parte, senza alcuna tassa, a patto delle seguenti condizioni:


    La nota sul copyright e questa nota sul permesso devono essere
     mantenute interamente su tutte le copie parziali o complete.

    Qualunque traduzione o lavoro derivato devono essere approvati
     dall'autore per iscritto prima della distribuzione.

    Se distribuite in parte questo lavoro, devono essere incluse
     istruzioni per ottenere la versione completa di questo manuale, e
     deve essere fornito un modo per ottenere una versione completa.

    Tutto il codice sorgente in questo documento  sotto la licenza GNU
     General Public License, disponibile attraverso FTP anonimo da:


       <ftp://prep.ai.mit.edu/pub/gnu/COPYING/>)



  2.  Introduzione

  Il procedimento usa il dispositivo '/dev/loop*' (dove * pu essere 0-7
  sulla maggior parte delle installazioni) per montare un file system di
  loopback.  Lo stesso procedimento pu essere usato senza cifratura per
  tenere un file system linux su una partizione non-linux.  C' un HOWTO
  su questo nel sito LDP citato precedentemente.

  Si possono usare diversi tipi di cifratura, compresi XOR, DES,
  twofish, blowfish, cast128, serpent, MARS, RC6, DFC e IDEA.  Il
  programma 'losetup' (loopback setup ovvero impostazione del loopback)
   ci che associa il vostro file cifrato ad un file system e al suo
  tipo di cifratura. Secondo Alexander Kjeldaas, che mantiene
  kerneli.org e le patch internazionali sulla cifratura, DES e losetup
  sono attualmente incompatibili.  Questo  dovuto alle differenze nel
  modo in cui i due gestiscono i bit di parit.  Non ci sono progetti
  per supportare il DES poich  molto pi insicuro degli altri cifrari.

  Twofish, blowfish, cast128 e serpent hanno tutti una licenza libera
  per qualunque uso.  Gli altri potrebbero o meno avere restrizioni di
  licenza.  Molti di essi sono candidati per lo standard AES.  I
  finalisti forniranno in tutto il mondo l'uso senza royalty dei loro
  cifrari.

  Questo documento usa l'algoritmo serpent perch  forte e anche
  notevolmente veloce ed  liberamente distribuibile sotto la GPL.  In
  base alla sua documentazione, serpent usa un cifrario a blocchi di 128
  bit progettato da Ross Anderson, Eli Biham e Lars Knudsen.  Esso
  fornisce agli utenti il pi alto livello pratico di assicurazione che
  non verr trovato nessun attacco a scorciatoia. La documentazione su
  serpent, cos come il codice sorgente, si possono trovare in:


       <http://www.cl.cam.ac.uk/~rja14/serpent.html>


  Inoltre, questo documento presuppone che i cifrari siano compilati
  direttamente nel kernel. Potreste installarli come moduli, ma la tec
  nica non viene discussa in questo documento. Dovrete editare il file
  '/etc/conf.module'; il procedimento  discusso in dettaglio nell'HOWTO
  sulla compilazione del kernel citato in precedenza.


  3.  Sommario

  Ci sono molti passi coinvolti nel procedimento. Fornir ``Dettagli''
  per questi passi nel prossimo paragrafo.  Ho pensato che sarebbe stato
  carino fornire prima un sommario di riferimento (se voi avete
  esperienza con unix/linux probabilmente non avete bisogno comunque dei
  dettagli).  Sono riassunti come segue:

  1. Scaricate la pi recente patch internazionale sulla cifratura (io
     ho usato 'patch-int-2.2.10.4' quando questo documento  stato
     scritto) da:



       <http://ftp.kerneli.org/pub/kerneli/>




  2. Applicate la patch al kernel



  3. Eseguite 'config' (o 'menuconfig' o 'xconfig') per configurare il
     vostro 'MakeFile' per il nuovo kernel.  Le opzioni per abilitare la
     cifratura sono sparpagliate.  Prima di tutto, prima che vediate
     qualche altra opzione, dovete abilitare 'Prompt for development
     and/or incomplete code/drivers' sotto 'Code Maturity level
     options'.  Sotto 'Crypto options' abilitate 'crypto ciphers' e
     'serpent'.  Ancora una volta, questo documento presume che stiate
     usando serpent, ma provate quello che volete. Ricordate che DES 
     notoriamente incompatibile con 2.2.10.4 - potrebbe non essere mai
     supportato del tutto.  Ci sono molte opzioni importanti da
     selezionare sotto 'Block Devices'.  Queste includono 'Loopback
     device support', 'Use relative block numbers as basis for transfer
     functions (RECOMMENDED)', e 'General encryption support'. NON
     selezionate la cifratura 'cast 128' o 'twofish' qui. Notate anche
     che non avete bisogno di nessuna delle opzioni sulla cifratura
     sotto le varie categorie di rete. Non andr oltre nella
     configurazione del kernel,  fuori dagli intenti di questo
     documento e si pu trovare sul sito LDP.



  4. Compilate il nuovo kernel.



  5. Editate '/etc/lilo.conf' per aggiungere la nuova immagine del
     kernel. Eseguite 'lilo -v' per aggiungere il kernel al boot loader.



  6. Scaricate il sorgente per il pi recente pacchetto 'util-linux' (io
     ho usato 'util-linux-2.9v') da:



       <ftp://ftp.kernel.org/pub/linux/utils/util-linux/>




  7. Estraete il sorgente 'util-linux'.



  8. Applicate la patch corrispondente trovata nella vostra directory
     '/usr/src/linux/Documentation/crypto/'.



  9. Leggete ATTENTAMENTE il file 'INSTALL'! Questo pacchetto contiene i
     sorgenti per molti file dipendenti dal sistema (strumenti
     importanti come 'login', 'passwd', ed 'init').  Se non editate
     attentamente il file MCONFIG prima di compilare questi sorgenti
     tenete pronto un dischetto di avvio e/o un fucile perch il vostro
     sistema sar un po' confuso. Essenzialmente volete impostare quasi
     tutti i campi 'HAVE_*' uguali a 'yes' cos che gli strumenti
     importanti di autenticazione non vengano compilati e sovrascritti.
     Gli strumenti che volete ricompilare sono 'mount' e 'losetup' in
     modo da adattarli ai nuovi schemi di cifratura. Suggerisco di fare
     riferimento al paragrafo ``Dettali'' nel seguito per questo passo.



  10.
     Compilate ed installate il sorgente 'util-linux'



  11.
     Fate riavviare la macchina con il nuovo kernel.



  12.
     Editate '/etc/fstab', aggiungendo una voce per il vostro mount
     point come segue:




       ______________________________________________________________________
       /dev/loop0  /mnt/crypt  ext2  user,noauto,rw,loop 0 0
       ______________________________________________________________________






  13.
     Create la directory che conterr il vostro file system, come in
     '/mnt/crypt' sopra.



  14.
     Come utente, create il vostro file cifrato come segue:




       dd if=/dev/urandom of=/etc/cryptfile bs=1M count=10






  15.
     Eseguite losetup come segue:




       losetup -e serpent /dev/loop0 /etc/cryptfile


  Avete una sola possibilit per digitare la password, state attenti. Se
  volete fare una doppia verifica sulla vostra password, potete usare il
  comando:




       losetup -d /dev/loop0




  Questo disattiver il vostro dispositivo di loop.  Poi eseguirete
  nuovamente losetup per verificare la vostra password, come segue:




       losetup -e serpent /dev/loop0 /etc/cryptfile






  16.
     Create il vostro file system ext2 come segue:




       mkfs -t ext2 /dev/loop0






  17.
     Ora potete montare il file system cifrato con:




       mount -t ext2 /dev/loop0 /mnt/crypt






  18.
     Quando avrete finito, vorrete smontare  e proteggere il vostro file
     system come segue:




       umount /dev/loop0
       losetup -d /dev/loop0






  4.  Dettagli

  Applicare le patch al Kernel:

  Potete fare l'aggiornamento dalle distribuzioni '2.2.x' applicando le
  patch. Ciascuna patch rilasciata per '2.2.x' contiene correzioni dei
  bachi. Verranno aggiunte nuove caratteristiche al kernel Linux di
  sviluppo '2.3.x'. Per installare applicando le patch, prendete tutte
  le patch pi recenti e fate quanto segue:



       cd /usr/src
       gzip -cd patchXX.gz | patch -p0




  Ripetete xx, IN ORDINE, per tutte le versioni pi recenti rispetto a
  quella del vostro albero dei sorgenti corrente.

  La directory predefinita per il sorgente del kernel 
  '/usr/src/linux'.  Se il vostro sorgente  installato da qualche altra
  parte vi suggerirei di usare un collegamento simbolico da
  '/usr/src/linux'.



  Editate 'MCONFIG' per la compilazione del pacchetto 'util-linux':

  Quelle che seguono sono citazioni dal file 'MCONFIG' che ho usato per
  compilare il pacchetto 'util-linux'. Notate che questo  abbastanza
  specifico per la mia configurazione, che  vagamente basata su RedHat
  5.2. Il punto  assicurarsi che non sovrascriviate nessun importante
  strumento di sistema come 'login', 'getty', o 'passwd'. Comunque, ecco
  di seguito le righe importanti:






























  ______________________________________________________________________
  CPU=$(shell uname -m | sed s/I.86/intel/)

  LOCALEDIR=/usr/share/locale

  HAVE_PAM=no

  HAVE_SHADOW=yes

  HAVE_PASSWD=yes

  REQUIRE_PASSWORD=yes

  ONLY_LISTED_SHELLS=yes

  HAVE_SYSVINIT=yes

  HAVE_SYSVINIT_UTILS=yes

  HAVE_GETTY=yes

  USE_TTY_GROUP=yes

  HAVE_RESET=yes

  HAVE_SLN=yes

  CC=gcc
  ______________________________________________________________________





  Suggerimenti:

  Notate che potreste usare uno qualunque degli otto dispositivi di
  loopback, da 'dev/loop0' a '/dev/loop7'. Usate una directory non
  evocativa per il mount point.  Suggerirei di creare una cartella con
  permessi 700 dentro la vostra home directory.  Lo stesso vale per il
  file che contiene i dati. Io uso un nome di file come 'sysfile' o
  'config.data' nella cartella '/etc'.  Questo di solito passer
  inosservato.

  Ho creato degli script Perl molto semplici per montare e smontare il
  file system con un comando. Scrivete questi, rendeteli eseguibili
  (chmod u+x), e metteteli da qualche parte nel vostro percorso.



       ______________________________________________________________________
       #!/usr/bin/perl -w
       #
       #piccolo file di utilit per impostare un file system cifrato di loopback
       #Copyright 1999 di Ryan T. Rhea
       `losetup -e serpent /dev/loop0 /etc/cryptfile`;
       `mount /mnt/crypt`;
       ______________________________________________________________________




  Chiamate 'loop' lo script qui sopra, e poi potrete essere sulla strada
  buona con un comando ('loop') ed una password.


       ______________________________________________________________________
       #!/usr/bin/perl -w
       #
       #piccolo file di utilit per disattivare un fliesystem cifrato di loopback
       #Copyright 1999 di Ryan T. Rhea
       `umount /mount/crypt`;
       `losetup -d /dev/loop0`;
       ______________________________________________________________________




  Chiamate 'unloop' il secondo, e poi digitando 'unloop' si disattiver
  velocemente il vostro file system.




















































  Linux Meta-FAQ
  Michael K. Johnson <johnsonm@redhat.com>
  v4.7, 25 ottobre 1997

  Questa  la Meta-FAQ per Linux.   principalmente un elenco di fonti
  indispensabili di informazioni.  Si dia un'occhiata a queste fonti se
  si vuole imparare qualcosa di pi su Linux, oppure se si incontrano
  problemi e si ha bisogno di aiuto. Traduzione di Giuliano Natali,
  natali@trew.it e di Michele Dalla Silvestra, dalla@psico.unipd.it.
  Aggiornamento e mantenimento di Giovanni Bortolozzo,
  borto@pluto.linux.it.

  1.  Introduzione


     Che cos' Linux?
        Linux  un implementazione indipendente delle specifiche POSIX
        sui sistemi operativi, con estensioni SYSV e BSD, completamente
        scritto partendo da zero (il che significa che sembra e si
        comporta proprio come Unix). Non ha codice proprietario al suo
        interno. Linux  distribuibile liberamente nei termini della GNU
        General Public License.

        Linux funziona su PC compatibili IBM con bus ISA o EISA (incluse
        le varianti VLB e PCI) e su un processore 386 o superiore. Sono
        supportati anche alcuni computer Amiga e Atari con MMU, ovvero
        68020 con una MMU esterna, 68030, 68040 o 68060. Il supporto per
        il Digital Alpha  ormai stabile. Red Hat e Craftworks hanno
        distribuzioni di Linux per Alpha. Il supporto per Sparc 
        stabile, ed  disponibile Red Hat Linux per Sparc. Il supporto
        per PowerPC  in sviluppo per diverse piattaforme, compresi i
        Macintosh Nubus e PCI, Motorola Powerstack, IBM 830 e 850, e
        altre piattaforme. Il supporto per ARM, StrongARM e MIPS  quasi
        completo, ma non si trattenga il respiro. Si legga invece
        comp.os.linux.announce.

        Si veda il Linux INFO-SHEET per informazioni pi tecniche su
        questi port, e l'Hardware Compatibility HOWTO per informazioni
        pi esatte sui requisiti hardware.

        Il kernel di Linux  stato scritto da  Linus Torvalds
        <torvalds@transmeta.com> e da altri volontari. Molti dei
        programmi che girano sotto Linux sono generici freeware Unix,
        molti dei quali provengono dal progetto GNU.


     Il Linux INFO-SHEET
        Informazioni tecniche pi specifiche su Linux. Include
        riferimenti a informazioni sui vari port, un elenco di
        caratteristiche, informazioni su come procurarsi Linux e altro.


     I Linux HOWTO
        Sono in qualche modo come le FAQ, ma invece di rispondere alle
        domande pi frequenti, spiegano come svolgere operazioni comuni,
        come l'ordine di una versione di Linux, l'impostazione dei
        servizi di stampa sotto Linux, l'impostazione di un semplice
        feed UUCP, ecc. Si veda
        <http://sunsite.unc.edu/LDP/HOWTO/HOWTO-INDEX.html> o
        <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/> per le ultime
        versioni definitive di tutti gli HOWTO. Altri siti con copie
        aggiornate degli HOWTO sono ftp.cc.gatech.edu e tsx-11.mit.edu.

        Inoltre ci sono molti documenti brevi in formato libero detti
        ``mini-HOWTO''.  Questi documenti trattano argomenti specifici,
        come BogoMIPS o Color-ls.  Sono disponibili a
        <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/> e a
        <http://sunsite.unc.edu/LDP/HOWTO/HOWTO-INDEX.html>.


     Newsgroup su Linux
        Esistono diversi gruppi di discussione Usenet per Linux. Se si
        usa Linux,  una buona idea seguire almeno
        comp.os.linux.announce. Tale newsgroup  moderato da Lars
        Wirzenius. Per fare un post su questo newsgroup, si invii una
        mail a linux-announce@news.ornl.gov.  Si possono inviare domande
        su comp.os.linux.announce a Lars Wirzenius <wirzeniu@iki.fi>.

        Il newsgroup comp.os.linux.announce  un newsgroup moderato per
        gli annunci su Linux (nuovi programmi, correzioni di bug, ecc).

        Il newsgroup comp.os.linux.answers  un newsgroup moderato nel
        quale vengono inserite le Linux FAQ, i documenti HOWTO e altra
        documentazione.

        Il newsgroup comp.os.linux.setup  un newsgroup non moderato per
        discutere di problematiche sull'impostazione e configurazione di
        sistemi Linux.


        Il newsgroup comp.os.linux.admin  un newsgroup non moderato per
        la discussione dell'amministrazione di sistemi Linux.


        Il newsgroup comp.os.linux.development.system  un newsgroup non
        moderato specifico per le discussioni sullo sviluppo del kernel
        di Linux. Le sole questioni sullo sviluppo di applicazioni che
        dovrebbero essere ivi discusse sono quelle intimamente associate
        con il kernel. Tutte le altre questioni sullo sviluppo sono
        probabilmente questioni generiche di sviluppo in Unix e
        dovrebbero invece essere dirette al gruppo comp.unix, a meno che
        non siano questioni su applicazioni veramente specifiche per
        Linux, nel qual caso dovrebbero essere dirette a
        comp.os.linux.development.apps.

        Il newsgroup comp.os.linux.development.apps  un newsgroup non
        moderato specifico per le discussioni sullo sviluppo di
        applicazioni connesse con Linux. Non  per le discussioni su
        dove trovare applicazioni per Linux e nemmeno un forum di
        discussione su quali applicazioni piacerebbe vi fossero per
        Linux.

        Il newsgroup comp.os.linux.hardware  per le questioni
        specifiche sull'hardware per Linux.

        Il newsgroup comp.os.linux.networking  specifico per lo
        sviluppo del supporto di rete in Linux e sulla sua
        configurazione.

        Il newsgroup comp.os.linux.x  specifico per le questioni sull'X
        Window in Linux.

        Il newsgroup comp.os.linux.misc  un gruppo non moderato per
        qualsiasi discussione su Linux che non appartenga a qualche
        altro newsgroup.

        In generale, non si faccia il post multiplo (``crosspost'') su
        pi newsgroup di Linux. Il solo crosspost che  appropriato  un
        post occasionale tra un gruppo non moderato e
        comp.os.linux.announce. Lo scopo della divisione del vecchio
        gruppo comp.os.linux in molti gruppi  stato quello di ridurre
        il traffico in ognuno di essi.  Chi non segue questa regola
        verr brutalmente ripreso senza nessuna scusante...


     Altri newsgroup
        Non si assuma che tutte le proprie domande siano appropriate per
        i gruppi di discussione su Linux solo perch si sta usando
        Linux. La propria domanda riguarda la programmazione delle shell
        sotto un qualsiasi unix o clone? Allora si chieda in
        comp.unix.shell. Rigurda GNU Emacs? Allora si provi a chiedere
        in gnu.emacs.help. Inoltre, se non si conosce nessun altro
        gruppo in cui chiedere, ma si pensa ne esista uno, nel proprio
        post si chieda cortesemente se c' un altro gruppo che sarebbe
        pi appropriato per la propria domanda. Almeno i gruppi
        comp.unix.{questions,shell,programming,bsd,admin} e
        comp.windows.x.i386unix dovrebbero essere di una qualche utilit
        per un utente Linux.


     Il World-Wide Web
        Greg Hankins <gregh@cc.gatech.edu> mantiene la home page WWW del
        progetto Linux. L'URL   <http://sunsite.unc.edu/LDP/>


     Linux Journal
        Una rivista chiamata Linux Journal  stata lanciata diversi anni
        fa. Include articoli per tutti i livelli di conoscenza, ed 
        pensata per essere utile a tutti gli utenti Linux. L'abbonamento
        costa $22 per gli U.S., $27 per il Canada e Messico, e $32 per
        qualsiasi altra parte del mondo, tutti pagabili in valuta
        statunitense. Le richieste di abbonamento possono essere inviate
        via email a subs@ssc.com o via fax al (U.S.) 1-206-782-7191 o
        spedite a Linux Journal, PO Box 85867, Seattle, WA 98145-1867
        USA. SSC ha una chiave pubblica PGP se si desidera inviare via
        email il numero criptato della propria carta di credito: finger
        info@ssc.com.


     La Linux Software Map
        Informazioni sul software libero disponibile per Linux possono
        essere trovare nella Linux Software Map, che pu essere trovata
        a  <http://www.execpc.com/~lsm/>.



  2.  Procurarsi Linux

  2.1.  Siti FTP su Linux

  Una lista pi completa di siti FTP su Linux si trova nel Linux INFO-
  SHEET, che pu sempre essere reperito a
  <http://sunsite.unc.edu/LDP/HOWTO/INFO-SHEET.html>. Sono qui elencati
  i siti pi importanti; si invita a vedere l'INFO-SHEET per il sito a
  voi pi vicino (ci sono un sacco di mirror).



       nome                 indirizzo numerico   directory Linux
       ===================  ==================   ===============
       tsx-11.mit.edu       18.86.0.44           /pub/linux
       sunsite.unc.edu      152.2.22.81          /pub/Linux
       ftp.kernel.org       206.184.214.34       /pub/linux





  Questi siti sono i siti ``home'' principali per Linux dove vengono
  effettuati la maggior parte degli upload. Ci sono molti mirror: si
  invita a usare quello pi vicino (nel senso di rete).


  2.2.  Linux su mezzi fisici

  Linux  distribuito su mezzi fisici, principalmente CD-ROM, da diversi
  marchi commerciali. Si invita a leggere il Distribution HOWTO,
  regolarmente postato in comp.os.linux.announce, e disponibile a
  <http://sunsite.unc.edu/LDP/HOWTO/Distribution-HOWTO.html>.


  2.3.  AFS

  Linux  disponibile su AFS montando il volume project.linux da
  sipb.mit.edu.


  2.4.  Reti commerciali

  Compu$erve ha alcuni archivi su Linux.


  2.5.  Mailserver e altro

  Sunsite offre un servizio ftp-mail --- si mandi un email a
  <ftpmail@sunsite.unc.edu>.


  3.  Distribuzioni di Linux

  Linux  distribuito dal suo autore solo come un kernel. Altri hanno
  messo assieme le ``distribuzioni'' che accoppiano il kernel Linux con
  altre utility e applicazioni software per creare un pacchetto completo
  e funzionante.

  Ci sono diverse distribuzioni di Linux, disponibili in vari siti.
  Sunsite fa il mirror di molte di queste in
  <ftp://sunsite.unc.edu/pub/Linux/distributions/>. Le distribuzioni pi
  comunemente raccomandate e disponibili gratuitamente sono Red Hat
  <http://www.redhat.com> e Debian  <http://www.debian.org>.  Sono
  disponibili gratuitamente su Internet, e sono pure vendute su CD-ROM.

  Ci sono anche altre distribuzioni di Linux. I principali distributori
  commerciali di Linux mettono annunci nel Linux Journal.


  4.  Mailing-list su Linux

  Sono usate principalmente per discussioni tra gli sviluppatori di
  nuove caratteristiche e da chi effettua test sulle versioni di
  sviluppo.  Si vedano gli indirizzi nelle FAQ. Si invii una mail a
  majordomo@vger.rutgers.edu con la sola parola help nel corpo del
  messaggio, e si ricever una mail che spiega come abbonarsi a molte
  mailing list su Linux. Si salvi questa mail, in quanto spiega anche
  come rinunciare a una sottoscrizione a una lista, e se si inviano
  noiosi messaggi alla lista dicendo che non si riesce a togliersi dalla
  lista (perch non si sono seguite le istruzioni e non si  salvata la
  mail che diceva come farlo), si verr facilemente ripresi in malo modo
  perch si sta sprecando banda internazionale e soldi.





  5.  Documentazione per vari programmi

  Molti programmi vengono distribuiti con qualche documentazione, spesso
  in un file chiamato README o qualcosa del genere.  DECISAMENTE una
  buona idea leggerla con cautela.   noioso vedere (e rispondere) a
  domande che trovano risposta nella documentazione.  Molti programmi
  hanno inoltre delle ``pagine di manuale''; si usi il comando man
  nomeprogramma per ottenere la documentazione sul programma chiamato
  nomeprogramma.  Per ottenere aiuto sull'uso del programma man, si usi
  man man.

  Molte distribuzioni raccolgono anche altra documentazione sui
  programmi nella directory /usr/doc; la propria distribuzione dovrebbe
  includere le istruzioni su come accedere a tale documentazione.


  6.  Altra documentazione

  Il Linux Documentation Project sta lavorando su molta documentazione.
  Sono state rilasciate al pubblico gi pi di 3000 pagine di
  documentazione in formato libro, e sono state rilasciate altre 2000 e
  pi pagine di manuale. Si dia un'occhiata a
  <http://sunsite.unc.edu/LDP/> per la documentazione scritta da LDP.


  7.  Mantenere traccia delle versioni correnti

  Nuove versioni importanti di programmi e port sono solitamente
  annunciate in comp.os.linux.announce.


  8.  Questo documento

  L'ultima versione di questo documento dovrebbe essere sempre
  disponibile da  <http://sunsite.unc.edu/LDP/HOWTO/META-FAQ.html>.

  L'ultima traduzione di questo documento dovrebbe essere sempre
  disponibile da  <http://www.pluto.linux.it/ildp/HOWTO/META-FAQ.html>.


  9.  Questioni legali

  I marchi sono propriet dei rispettivi possessori. Soddisfazioni non
  assicurate. Nessuna garanzia su questo documento.

  Il contenuto di questo documento  stato reso disponibile al pubblico,
  ma se lo si cita, si invita a essere corretti e segnalare la fonte.

  Lars Wirzenius <wirzeniu@iki.fi> ha scritto la prima versione di
  questo documento; ora  mantenuto da Michael K. Johnson
  <johnsonm@redhat.com>.  Scrivetemi se avete domande su questo
  documento.














  The Linux MP3 HOWTO
  Di Philip Kerr, phil@websentric.com
  v1.10, 10 settembre 1999

  Questo documento descrive l'hardware, il software, e le procedure
  richieste per codificare e riprodurre i file sonori MP3 sotto Linux.
  Tradotto da Mariani Dario darkpand@uni.net

  1.  Introduzione.

  Questo documento descrive l'hardware, il software, e le procedure
  richieste per codificare e riprodurre i file sonori MP3 sotto Linux.


  2.  Copyright di questo documento

  This HOWTO is copyrighted 1999 Philip Kerr.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO co-ordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO co-
  ordinator, at linux-howto@metalab.unc.edu via email.


  3.  Dove trovare questo documento

  La versione ufficiale pi recente di questo documento pu essere
  ottenuta dal Linux Documentation Project
  <http://metalab.unc.edu/LDP/>.


  4.  Ringraziamenti.

  Nello scrivere questo HOWTO mi sono dovuto basare molto sul Sound-
  HOWTO di Jeff Tranter e sul Sound-Playing-HOWTO di Yoo C. Chung.

  Ringrazio molto gli autori degli altri HOWTO ai quali mi sono
  riferito:

  Linux System Administrators Guide di Lars Wirzenius.

  Linux Network Administrators Guide di Olaf Kirch.

  Multi Disk System Tuning HOWTO di Stein Gjoen.





  5.  Liberatoria.

  Use the information in this document at your own risk. I disavow any
  potential liability for the contents of this document. Use of the
  concepts, examples, and/or other content of this document is entirely
  at your own risk.

  All copyrights are owned by their owners, unless specifically noted
  otherwise.  Use of a term in this document should not be regarded as
  affecting the validity of any trademark or service mark.

  Naming of particular products or brands should not be seen as
  endorsements.  You are strongly recommended to take a backup of your
  system before major installation and backups at regular intervals.


  6.  Requisiti hardware e problemi di prestazioni

  L'elaborazione dell'audio digitale  una mansione ad alta occupazione
  di risorse che si affida pesantemente alle capacit di elaborazione e
  di I/O di un sistema. Raccomando fortemente una macchina di classe
  Pentium come minimo.

  Se si sta per codificare da una fonte audio analogica, una scheda
  audio PCI dar i risultati migliori. La differenza di prestazioni tra
  schede basate su ISA e PCI  sensibile, oltre i 132 Mbit/s per il PCI
  (dato ricavato dal PCI-HOWTO). Naturalmente, migliore la qualit della
  scheda audio in termini di rapporto segnale/rumore, migliore l'MP3
  codificato.  Ho usato la Sound Blaster PCI128 e sono appena passato ad
  una Sound Blaster Live Value; entrambe le schede danno buone
  prestazioni audio, ma la Live ha un rapporto segnale/rumore
  decisamente migliore, buono abbastanza per il lavoro audio semi-
  professionale. Ricordate la vecchia massima sull'elaborazione dei
  dati: immondizia in entrata, immondizia in uscita!

  Durante la registrazione dell'audio analogico su un disco fisso, pi
  comunemente chiamata registrazione diretta su disco o registrazione
  d2d, la velocit del disco e della sua interfaccia  critica. Se si
  utilizza un sistema IDE,  preferibile il modo 4 o UDMA in quanto
  hanno delle velocit di trasferimento quasi decenti.

  La soluzione ideale sarebbe quella di utilizzare un sistema SCSI in
  quanto i dischi e l'interfaccia hanno velocit di trasferimento
  decisamente migliori, un 5 Mbit/s sostenuto su SCSI 1 fino a 80 Mbit/s
  per l'ultra wide SCSI.  L'IDE pu avere picchi da 8.3 Mbit/s a 33
  Mbit/s per l'Ultra-ATA ma queste velocit sono picchi, le velocit di
  trasferimento medie sono minori. Se riuscite a trovare, o a
  permettervi, un disco AV SCSI, optate per quello. I dischi AV hanno il
  sistema di lettura/scrittura ottimizzato per trasferimenti continui di
  dati; gli altri dischi SCSI e IDE normalmente non possono sostenere
  trasferimenti di dati continui quando la testina si scalda.

  Naturalmente un disco con della cache dar risultati pi coerenti di
  uno senza cache, perch la cache funziona come un buffer se le testine
  si sollevano o se non pu gestire la velocit di trasferimento dei
  dati.

  Se il disco non supporta queste specifiche, la registrazione subir
  salti e rumori, dove il disco non riesce a registrare il segnale. Se
  state registrando eventi unici, come performance live, investite in un
  buon sottosistema dischi SCSI. Un'altra causa di salti d2d  un
  sistema pesantemente occupato.  Processi in background possono far
  saltare momentaneamente il sistema.   raccomandato avere attivati
  meno processi possibile sullo sfondo, specialmente sistemi di rete.
  Per informazioni sulla configurazione dei servizi di rete e sugli
  script di avvio, guardate le guide SAG e NAG.
  Anche la paginazione della memoria virtuale causa dei salti, per cui
  cercate di avere pi memoria fisica possibile, raccomando almeno 32
  mb, ma potrebbe servirne ancora di pi.

  Per chi vuole ottenere il pi possibile dal proprio sistema,
  ottimizzare il kernel probabilmente non fa del male.

  Se le specifiche hardware sopra daranno un sistema decente per
  codificare dati audio, non utilizzate sistemi minori, pi vecchi se 
  tutto quello a cui si ha accesso.

  Pu essere una sfida per gli amministratori di sistema ottimizzare un
  sistema vecchio per dare buoni risultati, ed il risultato finale sar
  probabilmente un sistema Linux pi contento.

  Un'altra cosa importante  il cablaggio audio. Cavi e connettori
  economici, di bassa qualit risulteranno in una bassa qualit delle
  registrazioni.  Se la vostra scheda audio ha la possibilit di usare
  connettori phono, a volte chiamati connettori RCA, usateli. Anche i
  contatti placcati in oro aiutano a mantenere la qualit audio, come il
  mantenere i cavi audio distanti dai cavi dati, in quanto ci potrebbero
  esserci delle interferenze tra di loro.

  Ma non dimenticate, spendere una fortuna sul miglior cablaggio audio 
  inutile se il resto del sistema non  stato ottimizzato.

  Per codificare gli mp3 da CD-ROM, la velocit o il tipo di lettore
  determiner il tempo utilizzato per leggere le informazioni grezze da
  esso.  Un lettore a singola velocit sar probabilmente troppo lento
  per tutti, tranne i pi pazienti.

  Il lettore di CD-ROM deve essere connesso alla scheda audio,
  utilizzando o il connettore interno, oppure prendendo l'output dalla
  presa per cuffie e mandandolo nella line-in sulla scheda.

  Per istruzioni dettagliate sulla configurazione delle schede audio, 
  ora un momento eccellente per leggere il Sound-HOWTO.


  7.  Requisiti software.

  Convertire l'audio in mp3  normalmente un processo a 2 stadi, prima
  l'audio  registrato in formato WAV, poi il WAV viene convertito in
  MP3.  Il formato dal quale si vuole convertire l'audio, CD o d2d,
  determiner di quali strumenti software si ha bisogno per produrre
  file WAV.

  Per codificare dall'input audio, avete bisogno di un programma che
  registri dall'input della scheda audio e salvi il risultato in WAV.
  Sotto sono mostrate alcune utilit.

  Wavrec

  Wavrec  distribuito come parte di wavplay, che pu essere scaricato
  da:

  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/>

  Per convertire dati CD audio in formato Wav, conociuto anche come CD
  ripping:

  CDDA2WAV

  <http://metalab.unc.edu/pub/Linux/apps/sound/cdrom/>


  Cdparanoia

  <http://www.xiph.org/>

  Per convertire i file WAV in formato MP3:

  Blade's MP3 Encoder

  <http://bladeenc.cjb.net>

  Per sentire un MP3 serve un riproduttore:

  Xmms (in precedenza chiamato X11Amp)

  <http://www.xmms.org>


  Xaudio

  <http://www.xaudio.com>

  Potrebbe servire anche un mixer; Xmixer funziona bene ed  incluso in
  quasi tutte le distribuzioni.


  8.  Configurare il sistema.

  Questa sezione descrive le basi della configurazione di Linux per
  registrare audio da una fonte analogica o CD-ROM.

  Per questa sezione mi sono basato sul mio sistema Linux Intel che
  utilizza una Redhat 5.2, ma dovrebbe essere ragionevolmente neutrale
  per quanto riguarda la distribuzione. Mi metter presto al lavoro
  sulla versione per piattaforma Sparc (se riuscite a utilizzare questo
  HOWTO su altro hardware, fatevi sentire).

  Naturalmente un requisito ragionevole  una scheda audio funzionante.
  A questo punto dell'HOWTO, vi invito a leggere l'eccellente Linux
  Sound HOWTO, di Jeff Tranter.  Dopo il quale  bene leggere il Linux
  Sound Playing HOWTO, di Yoo C.  Chung. Entrambi gli HOWTO sopra
  menzionati trattano i dettagli sul come far funzionare un sistema
  audio sotto Linux meglio di come possa farlo io.


  8.1.  Configurare per la cattura audio analogica.

  Per prima cosa, configurare l'audio. Ci sono molti modi di instradare
  l'audio prima che arrivi al sistema Linux, alcuni di quelli pi comuni
  sono:

  Line Out a Line In.  La maggior parte delle apparecchiature audio
  hanno prese per il Line output.  Il livello Line  uno standard che
  specifica quali voltaggi e correnti vengono messi in uscita
  dall'apparecchiatura audio. Se ricordo bene, sono 500mA per apparati
  domestici e semiprofessionali, e 750mA per quelli professionali.
  Suppongo che lo standard per la maggior parte delle schede audio sia
  di 500mA, ma alcune delle nuove Pro audio potrebbero uniformarsi allo
  standard pi elevato. Non dovrebbero esserci grosse differenze se non
  dovete registrare a livelli molto alti.

  L'output di livello Line  normalmente usato per connettere impianti
  HI-FI ad amplificatori, per cui cose come piastre per cassette,
  sintonizzatori radio, lettori cd, piastre DAT e lettori Mini-Disc
  dovrebbero poter essere connessi senza problemi. I giradischi possono
  dare pi problemi, leggete sotto per maggiori informazioni.

   possibile catturare audio da videoregistratori. Molti di essi hanno
  una Line out, o si pu ottenerne una da una presa scart se il
  videoregistratore ne ha una.

  Amplifier Tape out a Line in,  Line out a Amplifier Tape in. Questa
  configurazione essenzialmente rimpiazza un tradizionale registratore a
  cassette con un sistema Linux. Il Line out a Tape in permette di
  controllare il livello di registrazione.

  Mic a Mic in. I voltaggi generati dai microfoni sono molto minori di
  quelli utilizzati da apparati di livello Line. Se eravate dell'idea di
  inserire un microfono nella Line in, probabilmente non riuscirete mai
  a registrare nulla.

  ATTENZIONE! Fare il contrario, inserire un apparato di livello Line
  nel Mic in, pu danneggiare la scheda audio!!

  Giradischi a Mic in. Tristemente non ho nessuna informazione al
  momento. Se ricordo correttamente il giradischi dovrebbe venir
  connesso al Mic in, usa un meccanismo simile per registrare suoni ed
  ha voltaggi simili.

  Tastiere musicali e sintetizzatori dovrebbero venire connesse alla
  Line in, con chitarre connesse alla Line in tramite un DI (Direct
  Injection, usato per convertire il segnale a livello Line).

  Prima di collegare qualsiasi cosa alla scheda audio, assicurarsi che i
  controlli del volume siano portati al minimo, o, utilizzando
  microfoni, essi siano spenti o lontani dagli altoparlanti.


  8.2.  Prepararsi per la cattura di CD-ROM Audio.

  Configurare un sistema Linux per estrarre dati audio dal CD-ROM 
  ragionevolmente semplice.

  Se potete sentire una traccia eseguita dal CD-ROM attraverso gli
  altoparlanti o un amplificatore, connessi alla scheda audio, allora ci
  sono buone probabilit di poter registrare da l.


  8.3.  Configurazioni addizionali.

  Fare il login come al solito, poi, utilizzando un programma mixer
  impostare i volumi di registrazione abbastanza alti per fornire una
  qualit di registrazione decente, ma non troppo alti da distorcere il
  suono. Normalmente giudico a orecchio, dopo un poco riuscirete a
  riconoscere i migliori livelli per il vostro sistema.

  Raccomando o di chiudere tutti i servizi non necessari oppure passare
  al runlevel 1, a singolo utente, specialmente quando si codifica da
  una sorgente audio. Questo per assicurarsi che il minimo numero di
  servizi  sia in esecuzione e quindi minimizzare salti durante la
  registrazione.

  Ho installato un drive SCSI a parte, esclusivamente per registrarci
  audio, al quale mi riferir come /mnt/mp3. L'ho fatto principalmente
  per i guadagni in velocit utilizzando un drive SCSI. In pi,
  registrare su un drive dedicato, dove sei quasi sicuro che la testina
  non sta per spostarsi all'improvviso in un'altra parte del drive
  quando vi stai registrando audio,  meglio. :)

  Per dettagli su come configurare un sistema Linux con dischi rigidi
  multipli, una bella lettura del Multi-Disk-HOWTO, di Stein Gjoen pu
  essere utile.

  9.  Codificare dall'audio.

  Per prima cosa, assicuratevi di avere spazio sufficiente sul disco. In
  qualit CD, 44.1 Khz 16 bit stereo, 1 minuto occupa circa 5 Mb.

  Normalmente registro in qualit DAT, ovvero 48 Khz 16 Bit Stereo.

  Utilizzando waverec uso la seguente sintassi:

  /usr/local/bin/wavrec -t 60 -s 48000 -S /mnt/mp3/temp.wav

  La prima parte  un percorso assoluto a wavrec. L'opzione '-t 60'
  specifica la lunghezza della registrazione in secondi.

  La terza opzione, -s 48000, si riferisce alla qualit di campionamento
  in bit/s (48000 per la qualit DAT, 44100 per quella CD).

  L'ultima opzione  il percorso per il file di output.

  Per vedere tutte le opzioni, digitare waverec -help, o riferirsi alla
  sua pagina man.

  Questo produrr il file WAV. Poi dovremo codificarlo in formato MP3.

  Utilizzare bladeenc con la seguente riga di comando:

  /usr/local/bin/bladeenc [source file] [destination file] -br 256000

  L'opzione -br imposta il bit rate, in questo caso ho impostato il rate
  al massimo di 256 kbit/sec. Il percorso a bladeenc pu essere diverso
  nei vari sistemi.

  Per vedere tutte le opzioni, digitare bladeenc -help, attualmente 
  una opzione non valida, ma mostra la lista delle opzioni.


  10.  Codificare da CD-ROM.

  Ancora, verificare che lo spazio disponibile su disco sia sufficiente.

  Ho scritto un semplice script Perl che cattura e codifica tracce da un
  CD.
























  ______________________________________________________________________
  #!/usr/bin/perl

  if ($ARGV[0] ne "") {

  $count = 1;

  do {

  $cdcap = system("cdparanoia", $count, "/mnt/mp3/tmp/cdda.wav");
  $track = "$ARGV[1]/track".$count.".mp3";
  $benc = system("bladeenc  /tmp/cdda.wav $track -br 256000");
  $count++;

  }
  until $count > $ARGV[0];
  exit;
  }

  else {
  print "Usage cdriper [no of tracks] [destination directory]\n\n";
  }
  ______________________________________________________________________




  Le linee di maggior interesse sono

  $cdcap = system("cdparanoia", $count, "/mnt/mp3/tmp/cdda.wav");

  Questa linea richiama il programma per copiare le tracce, cdparanoia.
  Cdparanoia converte i dati grezzi del CD audio in formato WAV.

  Le opzioni fondamentali sono $count, che  il numero di tracce da
  copiare, e poi il percorso per il file WAV di output. Nel mio esempio
  andr in una directory tmp sul mio drive SCSI per gli MP3.

  Il file WAV viene poi convertito in MP3 utilizzando Bladeenc.

  Ho scritto questo script Perl per copiare un CD senza dover copiare e
  codificare ogni traccia, e senza dover usare il modo batch di
  Cdparanoia.  Questo riduce lo spazio su disco richiesto, a causa del
  fatto che il modo batch di Cdparanoia copia tutto il disco, e occupa
  fino a 600 Mega.

  Nota: Lo script mostrato sopra  molto semplice e non ha niente di
  elaborato, come test degli errori. Modificatelo per il vostro
  divertimento. :)


  11.  Riprodurre gli MP3

  Cos, sperabilmente, dovremmo avere dei file MP3 pronti da riprodurre.

  I due player MP3 pi famosi per Linux sono Xaudio e Xmms (conosciuto
  come X11Amp).

  Collegamenti alle homepage di entrambi i player possono essere trovati
  nella sezione 7.

  Ho basato questo HOWTO sul mio uso di xaudio, soprattutto perch posso
  utilizzarlo avviando o meno X.

  Il programma  shareware.

  Xaudio  una suite di programmi, dei quali i pi interessanti per noi
  sono xaudio e mxaudio.

  Dopo aver installato i file sul sistema,  possibile la scelta di
  avviare la versione a linea di comando, xaudio, oppure la versione X,
  mxaudio.

  Mxaudio ha una bella interfaccia, ed  semplice da utilizzare.

  Le opzioni di Xaudio possono essere viste avviando il programma con
  l'opzione -help (xaudio -h).

  Per riprodurre una traccia provare xaudio track.mp3

  Per riprodurre una intera directory, xaudio *.mp3

  Entrambi i programmi hanno dei file README.




  12.  Commenti.

  Nuovo hardware e software viene rilasciato ogni momento. Se utilizzate
  nuove versioni dell'hardware e/o software nominati in questo
  documento, o potete aggiungere qualcosa in questa area, prego mandate
  le vostre informazioni all'indirizzo phil@websentric.com e io le
  includer nella prossima versione.


  Felici MP3izzazioni!! :)



































  The Linux Mail User HOWTO
  Eric S. Raymond, <esr@thyrsus.com>
  v2.2, 7 maggio 1999

  Questo documento  un'introduzione al mondo della posta elettronica
  (email) sotto Linux.  Si focalizza sulle questioni a livello utente e
  su tipiche configurazioni per macchine Linux casalinghe e per piccole
  aziende connesse alla rete attraverso un ISP.   utile da leggere se
  si intende comunicare localmente o con siti remoti attraverso la posta
  elettronica.  Probabilmente non serve leggere questo documento se non
  si scambia posta elettronica con altri utenti sul proprio sistema e
  con altri siti.  Per informazioni sulla configurazione e l'amminis
  trazione della posta, si veda il Mail Administrator HOWTO.  Traduzione
  di Giovanni Bortolozzo, borto (at) pluto.linux.it.

  1.  Introduzione

  Lo scopo di questo documento  di spiegare come funziona l'email e di
  rispondere ad alcune delle domande che sembrano corrispondere alla
  definizione di domande poste pi di frequente a proposito del
  software di email sotto Linux.

  Le moderne distribuzioni di Linux forniscono, non appena installate,
  una impostazione preconfigurata ed usabile della posta elettronica,
  solitamente tramite l'ultima versione di sendmail-v8.  Questo HOWTO
  assumer che si possieda tale impostazione ed una connessione ad
  Internet funzionante.

  (Per informazioni su come impostare una connessione PPP o SLIP ad un
  ISP, si veda l'ISP Hookup HOWTO <http://metalab.unc.edu/LDP/HOWTO/ISP-
  Hookup-HOWTO.html>.)

  Di conseguenza, diversamente dalle versioni 1.x di Vince Skahan,
  questo HOWTO si focalizza sulle questioni utente e sull'architettura;
  molte parti relative a UUCP, sendmail IDA e altre importanti questioni
  precedenti sono state tagliate.


  1.1.  Nuove versioni di questo documento

  Questo documento sar inviato mensilmente nel newsgroup
  comp.os.linux.answers.  Si dovrebbe essere in grado di visionarne
  l'ultima versione sul World Wide Web a
  <http://metalab.unc.edu/LDP/HOWTO/Mail-User-HOWTO.html>.


  1.2.  Requisiti hardware per i programmi di email

  Per la posta sotto Linux non ci sono requisiti hardware specifici.  Se
  si possiede l'hardware necessario per connettersi ad Internet, questo
  pu supportare l'email attraverso quella connessione.


  1.3.  Sorgenti dei programmi di email

  Il software che sar necessario per il supporto email  probabilmente
  preinstallato nella propria distribuzione di Linux.  Si troveranno
  degli aggiornamenti sul Metalab Linux Archive
  <http://metalab.unc.edu/pub/Linux>, specialmente nella sottodirectory
  mail <http://metalab.unc.edu/pub/Linux/system/mail>.


  2.  Mail User Agent

  Questa sezione contiene informazioni relative agli agenti utente
  (mail user agent o MUA), termine che indica il software che l'utente
  vede e usa. Questo software fa affidamento sugli agenti di trasporto
  (mail transport agent o MTA) descritti nel Mail Administrator's HOWTO
  (il quale contiene pure la configurazione degli agenti utente e
  trucchi per la risoluzione dei problemi per gli amministratori).


  2.1.  Impostare il proprio editor per la posta

  Per fornire assistenza alla composizione della posta i mail user agent
  chiamano un qualche editor.  Quale sia l'editor predefinito dipende da
  alcune cose.  Molti rispettano una convenzione retaggio della
  preistoria di Unix; se esiste, il contenuto della variabile d'ambiente
  VISUAL  preso come il nome dell'editor preferito.  Se VISUAL non 
  impostata,  controllata la variabile EDITOR.

  Valori comuni per EDITOR comprendono vi e emacs.  Ma se si  come
  me, un tipo che ha sempre un Emacs in esecuzione, la cosa pi utile a
  cui impostare EDITOR  il valore emacsclient.  Lo si usi con le
  seguenti righe nel proprio file .emacs:


  ______________________________________________________________________
  (autoload 'server-edit "server" nil t)
  (server-edit)
  ______________________________________________________________________



  Il programma emacsclient, quando viene eseguito, prova a stabilire una
  comunicazione con un'istanza di Emacs che gi  in esecuzione e invia
  il file temporaneo contenente il messaggio di posta ad Emacs per
  poterlo modificare.  L'effetto di questa cosa  che quando il proprio
  mailer chiama l'editor, viene aperta una finestra di composizione
  della posta dentro al proprio Emacs.

  Quando si  pronti per restituire il file al mailer per la spedizione,
  si digiti C-x #.  Il buffer di posta scompare dalla schermata e
  l'istanza di emacsclient chiamata dal proprio mailer termina,
  restituendo il controllo al mailer.

   possibile avere pi istanze di emacsclient aperte contemporaneamente
  senza per questo confondere Emacs.  Comunque, chiamare un altro Emacs
  mentre  in esecuzione una sessione emacsclient pu confondere
  emacsclient tanto che dopo non sar pi in grado di trovare alcuna
  istanza.  Se questo succede, si chiudano tutte le istanze di Emacs e
  se ne riavvii solo una.


  2.2.  mutt

  Questo  quello che io uso e raccomando.   un discendente di elm ed
  ha per default comandi simili.  Pu essere un client POP3 e IMAP e
  include un supporto eccellente per MIME e PGP.  C' una home page di
  Mutt a http://www.mutt.org.

  Mutt rispetta la convenzione EDITOR/VISUAL.


  2.3.  elm

  Elm  stato il primo mailer moderno orientato allo schermo, ma 
  rimasto stagnante per anni ed ora  stato destituito da Mutt.  Alcune
  versioni di elm contengono il supporto per POP3.  Per maggiori
  informazioni, si vedano i sorgenti e le istruzioni di installazione di
  elm nella directory degli agenti utente di posta a Metalab
  <http://metalab.unc.edu/pub/Linux/system/mail>.  Ecco alcuni punti che
  talvolta ossessionano la gente:

  No, l'elm grezzo non supporta il PGP.  Ci sono alcune patch per il
  supporto del PGP, ma il supporto PGP di Mutt  superiore.  Se si vuole
  usare il PGP, io raccomando Mutt.

  Elm rispetta la convenzione EDITOR/VISUAL.


  2.4.  pine

  Pine  un agente utente progettato per i novizi; include la
  possibilit di leggere le news e supporto per il protocollo di posta
  remota IMAP.  Un sacco di gente lo consiglia per i nuovi utenti.  Io
  trovo che abbia un insieme di comandi piuttosto povero,
  configurabilit limitata e un editor nativo difficile da capire.
  Comunque possiede al suo interno un eccellente supporto per IMAP.  Se
  lo si vuole provare, la distribuzione  disponibile a
  http://www.washington.edu/pine.

  Pine rispetta la convenzione EDITOR/VISUAL.


  2.5.  Netscape

  Il browser Netscape ha al suo interno le funzionalit per gestire POP3
  e IMAP e quindi pu essere usato come agente utente per la posta.  Io
  non lo raccomando; non  specializzato per essere un MUA e quindi non
  offre molti servizi che i MUA reali hanno (come la gestione degli
  alias e del PGP).

  Netscape fornisce un proprio mini editor, lo stesso che si usa nel
  browser (e.g. per i campi testo nei form).


  2.6.  rmail/smail e vm di Emacs.

  Emacs ha un modo chiamato smail che pu spedire la posta e un altro
  chiamato rmail per leggerla.  Il modo smail pu essere abbastanza
  utile, poich si pu comporre la posta dentro un completo ambiente
  Emacs (ma si veda anche la discussione su ``emacsclient'' in questo
  documento).

  Il modo rmail, d'altra parte, non  raccomandato.  Ogni volta che lo
  si esegue, converte l'inbox nel formato BABYL; e questa cosa agli
  strumenti per la posta ordinari non piacer affatto (se succede, si
  lanci M-x unrmail dalla riga di comando di Emacs).

  Esiste un lettore di posta (mailreader) per emacs chiamato vm che
  scrive e legge le mailbox (caselle di posta) in formato V7 standard.
  Non  distribuito con GNU Emacs, ma si pu trovare la sua homepage a
  http://www.wonderworks.com/vm/.

  smail/rmail/vm di Emacs non rispettano la convenzione EDITOR/VISUAL.
  Invece, si usa l'Emacs nel quale sono inglobati.


  2.7.  BSD mail

  Se semplicemente si digita mail nella shell di Linux o di un
  qualsiasi altro Unix moderno, si invocher una qualche variante del
  programma BSD mail.  Ha un'interfaccia orientata alla riga
  originariamente progettata per l'uso sulle TTY. A questo punto,  solo
  di interesse storico.


  BSD Mail ha inventato la convenzione EDITOR/VISUAL.


  2.8.  Altri agenti utente

   noto che anche i seguenti funzionano sotto Linux.  Si consulti
  archie per trovarli...

    mush    - mail user's shell, molto potente per il filtraggio e il
     batch processing

    mh      - mail handler, solo un altro mail user agent

  Non ne so abbastanza su mh e mush per descriverli in dettaglio.
  Entrambi hanno un'interfaccia abbastanza complessa e sono pensati per
  utenti sofisticati.


  3.  Argomenti avanzati


  3.1.  Alias

  Un alias  un modo per impostare un indirizzo fittizio che
  semplicemente diriga la posta ad un altro indirizzo (unico).  Ci sono
  due tipi di alias: alias MUA e alias MTA.

  Un alias MUA  qualcosa che si imposta nel proprio MUA, una specie di
  scorciatoia personale.  Gli altri non saranno in grado di vedere ed
  usare tale alias.  Per esempio, si potrebbe scrivere


  ______________________________________________________________________
  alias esr       Eric S. Raymond <esr@thyrsus.com>
  ______________________________________________________________________



  nel proprio file di configurazione di mutt.  Questo dir a mutt che
  quando vede esr nella riga di indirizzo, si dovr comportare come se
  si fosse digitato esr@thyrsus.com.  Oppure si pu scrivere mutt
  esr e l'indirizzo espanso verr automaticamente inserito nella riga
  to.

  Un alias MTA  qualcosa che viene espanso dal proprio MTA; sar
  usabile da tutti, sia nella propria macchina che in altre.  Per creare
  alias MTA si modifica un file di sistema, solitamente, ma non sempre,
  /etc/aliases (la posizione dipende dal proprio MTA).  Potrebbe essere
  istruttivo dare un'occhiata al file /etc/aliases nel proprio sistema;
  dovrebbe contenere numerosi alias standard come postmaster.

  Il proprio MTA potrebbe permettere che la destinazione di un alias sia
  un nome di file, che sar trattato come una mailbox alla quale
  aggiungere le mail (questo  utile per archiviare le mail).  Pu pure
  permettere che la destinazione sia un programma, nel qual caso le mail
  a quell'alias saranno passate ad un istanza del programma nel suo
  standard input.


  3.2.  Forwarding

  Gli alias MTA solitamente richiedono i privilegi dell'amministratore
  per poter essere impostati.  Ma  desiderabile per gli utenti essere
  in grado di impostare il forwading (reinoltro) delle proprie mail
  senza l'intervento dell'amministratore.

  Per supportare questa cosa, la maggior parte degli MTA seguono
  l'esempio di sendmail e cercano un file chiamato .forward nella home
  directory dell'utente.  Il contenuto di questo file  interpretato
  come la destinazione di un alias al quale si vogliono ricevere tutte
  le proprie mail.  L'uso pi comune di questa possibilit  quello di
  redirigere tutta la posta in un account su un'altra macchina.


  3.3.  Risposta automatica

  Un altro uso comune del file .forward  quella di passare la posta ad
  un programma vacation.  Un programma vacation (vacanza) legge tutta
  la posta entrante e genera automaticamente una risposta
  preconfezionata; sono cos chiamati perch la forma pi comune di
  risposta preconfezionato  per informare il mittente che si  in
  vacanza e non si sar raggiungibili prima di una certa data.

  Non c' un programma vacation standard che sia universalmente usato.
  E questo per due buone ragioni: la prima  che tale programma  facile
  da scrivere come uno script shell di una regola di filtraggio (si veda
  sotto); e la seconda  che i programmi vacation non interagiscono bene
  con le mailing list.

  Ci si dovrebbe temporaneamente deiscrivere da tutte le mailing list
  prima di impostare la risposta automatica; altrimenti tutti i membri
  delle mailing list saranno sommersi dai messaggi del programma
  vacation.  Questo  considerato un comportamento molto maleducato e
  garantir un atteggiamento abbastanza gelido al ritorno.


  3.4.  Mailing list

  Una mailing list  un indirizzo fittizio che invia la posta a pi di
  un utente.

  Nella sua forma pi semplice, una mailing list  semplicemente un
  alias MTA con pi di un recipiente.  Alcune piccole mailing list sono
  mantenute in questo modo.  Sendmail viene in aiuto supportando una
  sintassi in /etc/aliases che include in contenuto di un dato file di
  mailing list come lato destinatario di un alias.  Qualcosa di simile a
  questo:


  ______________________________________________________________________
  admin-list:     ":include:/usr/home/admin/admin-list"
  ______________________________________________________________________



  con il vantaggio che il file admin-list pu risiedere da qualche parte
  nello spazio di utente senza privilegi (root  necessario solamente
  per impostare l'inclusione originale).  Alcuni altri MTA hanno
  possibilit simili.

  Queste semplici liste sono comunemente dette mail reflector
  (riflettori di posta).  Ci sono un paio di problemi con questi
  riflettori.  Il primo  che i messaggi di rimbalzo generati da
  tentativi di broadcast falliti arrivano a tutti gli utenti.  Un altro
   che tutte le iscrizioni e deiscrizioni devo essere fatte manualmente
  dall'amministratore della mailing list.

  Un tipo di software chiamato gestore di mailing list si  evoluto
  per risolvere questi ed altri problemi a loro legati.  La sua funzione
  pi importante  di permettere agli utenti della mailing list di
  iscriversi e deiscriversi senza passare per l'amministratore della
  lista.
  Un gestore di mailing list mantiene le proprie informazioni sulla
  lista di utenti e si aggancia all'MTA attraverso un alias di programma
  in /etc/aliases.  Per esempio, se la admin-list di prima passa
  attraverso il gestore di mailing list SmartList su un programma
  sendmail, una porzione del file /etc/aliases potrebbe essere simile a
  questa:


  ______________________________________________________________________
  admin-list: "|/usr/home/smartlist/bin/flist admin-list"
  admin-list-request: "|/usr/home/smartlist/bin/flist admin-list-request"
  ______________________________________________________________________



  Si noti che questa  una coppia di alias.   convenzione per le reali
  mailing list di avere un indirizzo di richiesta da usare per le
  richieste di iscrizione e deiscrizione degli utenti.   considerato
  scortese e ignorante inviare richieste di iscrizioni/deiscrizioni
  all'indirizzo principale di tale lista -- quindi non farlo.

  Il robot dietro all'indirizzo di richiesta pu offrire altre
  possibilit oltre all'iscrizione/deiscrizione.  Potrebbe rispondere a
  richieste di aiuto, permettere di sapere chi  iscritto alla list o
  dare un accesso automatico agli archivi della lista.  Pu pure
  permettere agli amministratori della lista di restringere l'invio di
  messaggi solo a membri noti, impostare la lista ad iscrivere
  automaticamente i non membri quando inviano per la prima volta un
  messaggio e impostare diverse opzioni sulle politiche di sicurezza.  I
  gestori delle mailing list si differenziano principalmente nel
  progetto e nella gamma di queste funzionalit secondarie.

  Sfortunatamente, il formato per inviare comandi ai robot delle mailing
  list non sono standard.  Alcuni si aspettano comandi nella riga
  oggetto, altri ignorano l'oggetto e si aspettano i comandi nel corpo
  del messaggio.  Si deve prestare attenzione alla mail di risposta che
  si ottiene quando ci si iscrive per la prima volta;  una buona idea
  salvare tali mail in una mailbox per riferimenti futuri.

  I pi importati gestori di mailing list da conoscere sono majordomo,
  listserv, listproc e smartlist; majordomo  il pi popolare con un
  margine considerevole.  Nel web esiste una lista
  <http://www.catalog.com/vivian/mailing-list-software.html> abbastanza
  completa di tali pacchetti.

  Per maggiori informazioni sui gestori delle mailing list, si
  consultino le risorse a List-Managers Mailing List
  <http://www.greatcircle.com/list-managers/>, tra cui la FAQ (nota:
  questa lista non  appropriata per domande su come fare le cose).


  3.5.  Filtrare la posta

  Un filtro per la posta  un programma che risiede tra l'utente e il
  suo agente di distribuzione locale (local delivery agent) e che
  automaticamente smista o rifiuta la posta prima che l'utente possa
  vederla.

  I filtri per la posta hanno diversi usi.  Il pi importante  il
  filtraggio degli spam, smistamento su diverse mailbox a seconda
  dell'argomento o del mittente e risposta automatica.

  Tipicamente, si imposta un filtraggio della posta mettendo un alias di
  programma per il programma di filtro nel proprio file .forward e
  scrivendo un file con le regole di filtraggio.  Il formato e la
  posizione delle regole di filtraggio variano a seconda del programma
  di filtraggio.

  Le caratteristiche dei tre maggiori filtri per la posta (procmail,
  mailagent e deliver) sono ben riassunte nella parte 3
  <http://www.faqs.org/faqs/mail/setup/unix/part3/index.html> dell'Email
  Software Survey di Chris Lewis.  Il pi popolare fra questi (a
  dispetto della sintassi piuttosto brutta delle sue regole)  procmail,
  universalmente presente nei sistemi Linux (e, infatti,  generalmente
  usato come agente di distribuzione locale di sistema).


  3.6.  Gestire gli spam

  Gli spam sono talvolta noti come UCE (Unsolicited Commercial Email)
  o `UBE' (Unsolicited Bulk Email).  Come indicano questi nomi,  una
  forma disgustosa di pubblicit che riempie la propria mailbox con
  lettere di nessun interesse (il termine spam proviene da una gag del
  Flying Circus dei Monty Python nella quale un coro di Vichinghi
  ripeteva all'infinito il cantico Spam spam spam spam...).

  La maggior parte degli spam sembrano essere solleciti per schemi
  piramidali, pubblicit pornografiche o (noiosi) tentativi di vendere
  programmi per inviare spam.  Alcuni spam (come il MAKE MONEY FAST o
  la cartolina hoax di Craig Shergold) sono stati cos persistenti da
  divenire leggendari.  Gli spam tendono ad essere sia verbosi che
  ignoranti.  Sono una perdita di tempo e un enorme spreco della
  larghezza di banda della rete.

  L'epidemia spam sembra aver raggiunto il picco a met del 1997 e poi
  ha cominciato lentamente a declinare, ma sono ancora una noia seria.
  Se si  inondati di spam, si rimanga educati.  Si dia un'occhiata alla
  pagina Fight Spam on the Internet! <http://spam.abuse.net/>.  La
  pagina Death To Spam!
  <http://www.mindworkshop.com/alchemy/nospam.html>  particolarmente
  efficace per i metodi per fermare o tracciare gli spam.


  4.  Altre fonti di informazione



  4.1.  USENET

  Esistono numerosi gruppi Usenet devoti alla questioni tecniche delle
  posta elettronica:


    comp.mail.elm Il sistema di posta ELM.

    comp.mail.mh Il sistema Rand Message Handling.

    comp.mail.mime Multipurpose Internet Mail Extensions.

    comp.mail.misc Discussioni generali sulla posta elettronica.

    comp.mail.multi-media Multimedia Mail.

    comp.mail.mush La Mail User's Shell (MUSH).

    comp.mail.sendmail L'agente BSD sendmail.

    comp.mail.smail L'agente di posta smail.

    comp.mail.uucp La posta in ambiente uucp.


  4.2.  Libri


  La seguente  un insieme non inclusivo di libri che possono aiutare...


    ``Sendmail" della O'Reilly and Associates  il riferimento
     definitivo su sendmail-v8 e sendmail+IDA.   un libro da avere
     per chiunque speri di ottenere qualcosa da sendmail senza impazzire
     nel processo.

    "The Internet Complete Reference" della Osborne  un buon libro di
     riferimento che spiega i diversi servizi disponibili su Internet ed
      una grande fonte di informazioni su news, posta e diverse altre
     risorse di Internet.

    "The Linux Networking Administrators' Guide" di Olaf Kirch di LDP 
     disponibile in rete ed  pure pubblicato (almeno) da O'Reilly e
     SSC.   una buona guida per imparare tutto quel che si pu
     immaginare di dover sapere sul networking di Unix.


  4.3.  Messaggi USENET periodici

  Come gi menzionato, il messaggio periodico di Chris Lewis sul
  software di email per Unix,  disponibile su
  <ftp://rtfm.mit.edu/pub/usenet/comp.mail.misc> nei file chiamati
  UNIX_Email_Software_Survey_*.  Una versione HTML  a
  http://www.faqs.org/faqs/mail/setup/unix/.  Comunque mentre scrivo
  questo documento nel 1999, tale messaggio non  stato seriamente
  aggiornato dal 1996.


  4.4.  Dove NON  cercare aiuto

  Non c' niente di speciale sulla configurazione e l'uso della posta
  sotto Linux, rispetto ad altri Unix.  Di conseguenza, quasi
  sicuramente NON  bene postare domande generiche sulla posta nei
  newsgroup comp.os.linux.*.

  A meno che il proprio messaggio non sia veramente specifico su Linux
  (ie, per piacere ditemi quali instradamenti sono gi compilati nella
  versione di smail 3.1.28 della SLS 1.03) si dovrebbe chiedere aiuto
  in uno dei newsgroup o mailing list indicate in precedenza.

  Lasciatemelo ripetere.

  Non c' virtualmente alcuna ragione di inviare ancora qualsiasi cosa
  relativa alla posta nella gerarchia comp.os.linux.  Esistono newsgroup
  nella gerarchia comp.mail.* per rispondere a TUTTE le vostre domande.

  Se si invia un messaggio in comp.os.linux.* con una domanda non
  specifica su Linux si sta cercando aiuto nel posto sbagliato.  Gli
  esperti di posta elettronica bazzicano nei posti indicati in
  precedenza e generalmente non nei gruppi su Linux.

  Inviare messaggi nella gerarchia Linux con domande non specifiche su
  Linux spreca il vostro e l'altrui tempo... e frequentemente vi ritarda
  l'ottenimento di una risposta alla vostra domanda.


  5.  Administrivia




  5.1.  Commenti e critiche


  (Questa sezione l'ha scritta Vince, ma la mia politica  la stessa.)

  Sono interessato a qualsiasi commento, sia positivo che negativo, sul
  contenuto di questo documento.  Mi si contatti se si trovano errori o
  omissioni ovvie.

  Leggo, ma necessariamente non rispondo, tutte le email che ricevo.
  Richieste per miglioramenti saranno considerate e attuate a seconda
  della combinazione giornaliera di tempo libero, merito della richiesta
  e pressione sanguigna :-)

  I flame finiranno bellamente in /dev/null quindi non preoccupatevi.

  In particolare, lo standard sul filesystem di Linux per i percorsi 
  una cosa in evoluzione.  Quanto c' in questo documento  qui solo a
  titolo illustrativo ed  basato sullo standard corrente al momento di
  scrivere quella parte del documento e sui percorsi usati nella
  distribuzioni o kit da me visti.  Invito a consultare la propria
  distribuzione di Linux per i percorsi da usare.

  Commenti riguardo il formato corrente del documento dovrebbero andare
  al coordinatore degli HOWTO - inviare una mail a linux-
  howto@metalab.unc.edu <mailto:linux-howto@metalab.unc.edu>).


  5.2.  Informazioni di copyright (in inglese)


  The Mail-HOWTO is copyrighted (c)1999 Eric S. Raymond.  Copyright is
  retained for the purpose of enforcing the Linux Documentation Project
  license terms.

  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author.  Translations
  are similarly permitted without express permission if it includes a
  notice on who translated it.

  Short quotes may be used without prior consent by the author.
  Derivative work and partial distributions of the Mail-HOWTO must be
  accompanied with either a verbatim copy of this file or a pointer to
  the verbatim copy.

  Commercial redistribution is allowed and encouraged; however, the
  maintainer would appreciate being notified of any such distributions
  (as a courtesy).

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents.

  We further want that all information provided in the HOWTOS is
  disseminated.  If you have questions, please contact the Linux HOWTO
  coordinator, at linux-howto@metalab.unc.edu.


  5.3.  Liberatoria standard

  Naturalmente, sconfesso qualsiasi potenziale affidabilit per il
  contenuto di questo documento.  L'uso dei concetti, esempi e/o altro
  contenuto di questo documento  interamente a proprio rischio.



  5.4.  Ringraziamenti

  Questo documento  stato originariamente scritto da Vince Skahan.  Io
  l'ho riscritto per il moderno mondo ISP-centrico nel quale UUCP  poco
  pi che un ricordo.

  Nel maggio 1999, il nome  stato cambiato da The Linux Electronic
  Mail HOWTO per evitare collisioni con il Mail HOWTO di Guylhem Aznar,
  che  diventato il Mail Administrator HOWTO.

























































  The Linux Modem-HOWTO
  David S.Lawyer
   <mailto:dave@lafn.org>
  v0.10, Maggio 2000

  Aiuto per selezionare, connettere, configurare, risolvere problemi e
  comprendere i modem in un PC. Vedere il Serial-HOWTO per dispositivi
  seriali multiporta.

  1.  Introduzione

  1.1.  Modem DSL, cable e ISDN in altri HOWTO

  Questo documento riguarda i modem convenzionali per PC, principalmente
  modem per il bus ISA. In ogni caso, ad ogni nuova versione sono
  aggiunte nuove informazioni sui modem per il bus PCI.

    modem DSL: vedere il mini-howto ADSL

    Cable-Modems-HOWTO (un tempo un mini-Howto di LDP)
     <http://www.cs.unm.edu/~vuksan/linux/Cable-Modem.html>

    ISDN Howto (non  un HOWTO di LDP)
     <http://sdb.suse.de/sdb/en/html/isdn.html>: driver per "Modem"
     ISDN. La maggior parte delle informazioni correlate sono in
     tedesco. Per un tutorial su ISDN vedere
     <http://public.swbell.net/ISDN/overview.html>.

  Vedere anche ``Appendice D:  Altri tipi di Modem''


  1.2.  Non compresi: modem PCMCIA, PPP

  Per i modem sul bus PCMCIA vedere il PCMCIA-HOWTO: dispositivi PCMCIA
  seriali e modem. Questo HOWTO non tratta PPP (usato per connettersi ad
  Internet via modem) o programmi di comunicazione. Mostra per come
  usare programmi di comunicazione per verificare che il vostro modem
  funzioni bene e possa eseguire delle chiamate telefoniche. Se volete
  usare un modem per connettervi ad Internet allora dovete impostare
  PPP. C' parecchia documentazione per PPP (incluso un PPP-HOWTO) ma
  potrebbe essere obsoleta o non applicabile alla vostra situazione.
  Parte di questa potrebbe essere trovata in /usr/doc/ppp o simile.


  1.3.  Copyright, liberatoria, marchi registrati e crediti

  1.3.1.  Copyright (in lingua originale)

  Copyright (c) 1998-2000 di David S. Lawyer  <mailto:dave@lafn.org>
  Please freely copy and distribute (sell or give away) this document in
  any format.  Forward any corrections and comments to the document
  maintainer.  You may create a derivative work and distribute it
  provided that you:


  1. Send your derivative work (in the most suitable format such as
     sgml) to the LDP (Linux Documentation Project) or the like for
     posting on the Internet.  If not the LDP, then let the LDP know
     where it is available.  Except for a translation, send a copy to
     the previous maintainer's url as shown in the latest version.

  2. License the derivative work in the spirit of this license or use
     GPL.  Include a copyright notice and at least a pointer to the
     license used.


  3. Give due credit to previous authors and major contributors.

     Se state considerando l'idea di derivare da questo un lavoro
     diverso da una traduzione, Vi  richiesto di discutere i vostri
     piani con l'attuale revisore(?)


  1.3.2.  Liberatoria


  Sebbene non ho l'intenzione di mettervi fuori strada, probabilmente ci
  sono parecchi errori in questo documento.  Vi invito a farmeli notare.
  poich questa  documentazione libera, dovrebbe essere ovvio che io
  non posso essere ritenuto legalmente responsabile per qualsiasi
  errore.



  1.3.3.  Marchi registrati

  Qualsiasi nome di marca (che inizia con lettera maiuscola) dovrebbe
  essere considerato come marchio registrato. Detti marchi registrati
  appartengono ai rispettivi proprietari.

  "Hayes"  un marchio registrato dalla Microcomputer Products Inc.  Uso
  "winmodem" per indicare qualsiasi modem che richiede MS-Windows e non
  nel senso di un marchio.


  1.3.4.  Crediti


  Quanto segue  solamente una rozza approssimazione di come  stata
  creato (fino al 2000) questo documento: circa 1/4 del materiale qui
  presente  stato preso tale quale dal Serial HOWTO versione 1.11 di
  Greg Hankins  <mailto:gregh@cc.gatech.edu> (con il suo permesso).
  Circa un altro quarto  stato preso sempre dal Serial HOWTO e
  revisionato.  La restante met  stata creata ex-novo dall'autore
  David S. Lawyer  <mailto:dave@lafn.org>.


  1.4.  Contattare l'autore

  Per favore non mandatemi e-mail chiedendomi quale modem acquistare o
  se un certo modem funzioner sotto Linux. Cercate nella vasta lista in
  ``Evitare: Software (interni) Modem''. Inoltre, per favore non
  chiedetemi come configurare un modem a meno che abbiate gi scorso
  questo HOWTO e non ci siate ancora riusciti.

  Per favore fatemi sapere circa qualsiasi errore in fatti, opinioni,
  logica, grammatica, chiarezza, link, ecc. Ma per prima cosa, se la
  data  pi vecchia di un mese, controllate di avere l'ultima versione.
  Per cortesia inviatemi qualsiasi altra informazione che pensate possa
  appartenere a questo documento.


  1.5.  Nuove versioni di questo HOWTO

  Nuove versioni del Modem-HOWTO escono ogni mese o quasi visto che la
  situazione dei modem va rapidamente cambiando (e visto che sto ancora
  imparando).  I vostri problemi potrebbero essere risolti nell'ultima
  versione. Sar disponibile da consultare e/o scaricare nei siti mirror
  di LDP. Per una lista di tali siti vedere
  <http://sunsite.unc.edu/LDP/mirrors.html>.  Se volete solo controllare
  velocemente la data dell'ultima versione andate a
  <http://metalab.unc.edu/LDP/HOWTO/Modem-HOWTO.html> e confrontatelo
  con la versione che state attualmente leggendo: v0.10, Maggio 2000.


  1.6.  Novit in questa versione

  Modem-Sharing (condivisione di modem) mini-howto, modem digitali,
  modem Newcom, in pi "no response to AT" (nessuna risposta ad AT) e
  "can't find modem" (non posso trovare il modem).


  1.7.  Cos' un modem ?

  Un modem  un dispositivo che consente di inviare segnali digitali
  attraverso una normale linea telefonica non predisposta per segnali
  digitali.  Se le linee telefoniche fossero tutte digitali un modem non
  sarebbe necessario. Esso consente al proprio computer di connettersi e
  comunicare con il resto del mondo. Quando si usa un modem, in genere
  si usa un programma di comunicazione, un browser web (che include un
  programma di comunicazione) per utilizzare il modem ed immettersi
  nella linea telefonica. Utenti esperti possono fare in modo che altri
  utenti siano in grado di connettersi tramite linea telefonica al loro
  computer ed usarlo. Questa procedura si chiama "dial-in".

  Ci sono due tipi principali di modem per un PC: esterni ed interni.

  Quelli esterni si collocano all'esterno del PC mentre quelli interni
  sono inseriti all'interno e non si vedono. I modem esterni si
  collegano al PC tramite una "porta seriale" situata nel retro del PC.
  Il modem interno  una scheda che si inserisce dentro al computer ed
  ha una "invisibile" porta seriale incorporata. Per un confronto pi
  dettagliato vedere ``Esterno contro Interno''.  Quindi quando si
  dispone di un modem interno, si dispone anche di una porta seriale
  dedicata (detta porta pu quindi essere usata solo con il modem e non
  con qualsiasi altro dispositivo tipo un altro modem od una stampante).
  In Linux, le porte seriali sono chiamate ttyS0, ttyS1, etc. (e
  corrispondono in genere rispettivamente a COM1, COM2, etc. in
  Dos/Windows).

  Non si deve confondere la porta seriale con l'"Universal Serial Bus"
  (USB) che usa uno speciale connettore modulare e potrebbe essere usato
  con i modem in futuro. Vedere ``Modem e Porte seriali: Nozioni di
  base'' per ulteriori dettagli sui modem e le porte seriali.

  I modem spesso includono la capacit di inviare fax (Fax Modem).
  Vedere ``Fax'' per una lista di software per i fax. I "Voice" modem
  possono funzionare come una segreteria telefonica e gestire voicemail.
  Vedere ``Voicemail''.



  1.8.  Installazione rapida

  1.8.1.  Installazione di modem esterni

  Con un cavo passante o modem, connettere il modem ad una porta seriale
  del PC. Assicurarsi di conoscere il nome della porta seriale: nella
  maggior parte dei casi COM1  ttyS0, COM2  ttyS1 ecc.  Potrebbe
  essere necessario consultare il men delle impostazioni del BIOS per
  determinarlo. Collegare il cavo di alimentazione per dare corrente al
  modem.  Vedere ``Per tutti i modem'' per successive istruzioni.


  1.8.2.  Modem interni (su bus ISA )

  (Per il bus PCI vedere ``Supporto al bus PCI in fase di
  completamento'' e ``Modem PCI''.)  Se il modem dice che funzioner
  solo sotto MS Windows, siete sfortunati.  Se avete gi due porte
  seriali, rendete il modem quale terza porta seriale (ttyS2 = COM3).
  Cercare un numero di IRQ libero da usare. Nel passato IRQ5 era spesso
  non usato ma oggi IRQ 5  usato anche dalle schede audio.  Poi
  impostare i ponticelli ("jumper") (o simili) del modem interno all'IRQ
  libero e ad un indirizzo di IO tipo 3E8 (ttyS2).

  "O simili" (nella frase precedente) pu essere un poco pi difficile.
  Se il modem ha un Plug and Play (PNP) per il bus ISA, possiamo ovviare
  usando il programma "isapnp" che  incluso negli "isapnptools". Vedere
  "man isapnp" o la FAQ per esso.  Vedere anche "Plug-and-play HOWTO".
  Con un BIOS PnP, dovreste essere in grado di dire al men di
  impostazione del CMOS che non avete un sistema operativo PNP e
  successivamente il BIOS potrebbe impostare un corretto IRQ e indirizzo
  di I/O nella scheda del modem. Se volete "forzare" il BIOS in modo che
  imposti un determinato IRQ e/o indirizzo IO, allora dovreste essere in
  grado di farlo usando Windows9x sullo stesso PC. Potrebbe impostare
  gli indirizzi nella memoria flash del BIOS PnP dove potranno essere
  usati per la configurazione con Linux cos come con Windows.
  Consultate il "Plug-and-play HOWTO" e cercate "forced" (forzato), che
  ricorre in diversi punti. Per Windows3.x potreste fare la stessa cosa
  usando ICU sotto Windows 3.x. Potrebbe anche esserci il modo di
  disabilitare il PnP usando il software (sotto Windows) fornito con il
  modem.


  Infine si deve anche cercare il file dove viene lanciato "setserial"
  ed aggiungere una riga che potrebbe essere qualcosa come: "setserial
  /dev/ttyS2 irq5".  Eccetto che per setserial v2.15 e successivi
  potreste (se la vostra distribuzione ve lo consente) semplicemente
  lanciare "setserial" da riga di comando ed il risultato sar salvato
  in un file di configurazione. Vedere ``Cos' setserial'' per maggiori
  informazioni. Vedere la successiva sottosezione ``Per tutti i Modem''
  per ulteriori istruzioni per una veloce installazione


  1.8.3.  Per tutti i modem

  Collegare il modem alla linea telefonica. Poi lanciare un programma di
  comunicazione tipo minicom ed aprire il menu di configurazione per la
  porta seriale. Assegnare una velocit di trasmissione (baud rate)
  alcune volte maggiore del bit rate del proprio modem. Vedere ``Tabella
  delle velocit'' per la velocit ideale da usare. Fornire il nome
  completo della porta seriale tipo /dev/ttyS1.  Impostare il controllo
  di flusso hardware (RTS/CTS). Ora occorre salvare le impostazioni ed
  uscire da minicom. Poi rilanciare minicom, digitare AT per vedere se
  il vostro modem  l e risponde con OK. Poi portarsi nell'elenco dei
  numeri da selezionare (dial directory) (o menu) e comporre un numero.


  2.  Modem per un PC con Linux

  2.1.  Esterni contro Interni

  Un modem per un PC pu essere sia interno che esterno. Quello interno
   installato all'interno del vostro PC (dovete rimuovere viti etc, per
  installarlo) e quello esterno si collega semplicemente ad un
  connettore di porta seriale sul PC. I modem interni sono meno costosi,
   meno probabile che subiscano perdite di dati a causa del
  sovraccarico del buffer, in genere consumano meno elettricit, e non
  occupano spazio sulla vostra scrivania.

  I modem esterni sono molto pi semplici da installare e richiedono
  minore configurazione. Hanno delle luci che possono fornire un indizio
  circa quello che sta accadendo, ed aiutare a risolvere i problemi.
  Anche il fatto che la porta seriale ed il modem possano essere
  fisicamente separati aiuta nella risoluzione di problemi. I modem
  esterni sono facilmente spostabili su un altro computer.

  Sfortunatamente la maggior parte dei modem esterni non hanno degli
  interruttori per spegnere l'alimentazione di corrente e probabilmente
  consumano un poco di corrente anche quando sono spenti (a meno di
  staccare la spina dal muro). Ogni watt che usano vi costa circa $1 per
  anno. Un altro possibile svantaggio di un modem esterno  che sarete
  forzati ad usare una porta seriale esistente che potrebbe anche non
  supportare una velocit di oltre 115.200k (sebbene fino al tardo 1998
  anche la maggior parte dei modem interni non la supportavano -ma
  alcuni s). Se un nuovo modem interno avesse una UART 16550 potrebbe
  mettere meno carico sulla CPU (ma quasi nessuno lo fa al tardo 1998).

  I modem interni presentano un particolare problema per Linux, ma
  funzioneranno bene come i modem esterni a patto che voi evitiate
  quell'alta percentuale di essi che funzionano solo sotto MS Windows,
  ed anche a patto che spendiate un poco di tempo (a volte molto tempo)
  per configurarli correttamente.  Alcuni dei modem che funzionano solo
  sotto MS Windows sono, sfortunatamente, non espressamente descritti
  come tali. Se ne comprate uno nuovo, assicuratevi di poterlo rendere e
  che possiate essere rimborsati se non funzioner sotto Linux.

  Visto che la maggior parte dei nuovi modem sono plug-and-play avete
  diversi modi per gestirli:

    Usare il programma "isapnp"

    Lasciare che la configurazione venga fatta dal BIOS PnP

    Modificare il kernel per creare un Linux PnP (attualmente non
     disponibile)

     Ciascuno dei metodi sopracitati ha degli svantaggi. La
     documentazione di isapnp  difficile da comprendere sebbene leggere
     il Plug-and-Play HOWTO (allo stato attuale incompleto) aiuti a
     comprendere. Se volete che sia il BIOS PnP ad eseguire la
     configurazione, tutto quello che dovete fare  assicurarvi che esso
     sappia che non avete un sistema operativo PnP. Ma potrebbe non
     eseguirla correttamente. Per scoprire quello che  stato fatto
     vedere ``Cos' impostato nell'hardware della mia porta  seriale?''.
     Modificare il kernel ha funzionato in passato, ma nessuna modifica
     sembra attualmente disponibile. Controllate il sito web per questo.

  Ci sono molti utenti di Linux che dicono che  molto pi semplice
  prendere un modem esterno e collegarlo.  Ma visto che le nuove
  periferiche oggi sono per la maggior parte PnP, potreste aver bisogno
  di gestirle, cos perch rimandare l'inevitabile? Comunque la
  soluzione pi vantaggiosa (e pi costosa)  quella di un modem esterno
  (se avete una porta seriale libera).


  2.2.  Modem esterni

  2.2.1.  Modem esterni PnP

  Molti modem esterni sono etichettati "Plug and Play" (PnP), ma
  dovrebbero funzionare bene anche come modem non PnP. Visto che in
  genere si collega il modem ad una porta seriale che ha i suoi propri
  numeri di IRQ ed indirizzi di IO, il modem non necessita di capacit
  PnP per impostarli. Comunque, la porta seriale stessa potrebbe
  necessitare di una configurazione (numero IRQ e indirizzo IO) a meno
  che la configurazione di default vada bene.

  Come pu un modem esterno essere chiamato PnP visto che non pu essere
  configurato tramite PnP? B, esso ha una speciale identificazione PnP
  costruita al suo interno che pu essere letta (attraverso la porta
  seriale) da un sistema operativo PnP. Sistemi operativi di questo tipo
  dovrebbero quindi sapere che voi avete un modem in una certa porta e
  dovrebbero anche conoscerne il numero di modello. Quindi potreste non
  avere bisogno di configurare i programmi applicativi dicendogli su
  quale porta sia il modem (tipo /dev/ttyS2 o COM3). Ma visto che non
  avete un sistema operativo PnP dovrete configurare il vostro programma
  applicativo manualmente fornendogli l'identificativo del /dev (tipo
  /dev/ttyS2).


  2.2.2.  Connessione ed installazione

  Connettere un modem esterno  facile, confrontato con la connessione
  della maggior parte degli altri disposivi ad una porta seriale che
  richiedono diversi tipi di cavi "null modem". I modem usano cavi
  diretti, senza pin incrociati. La maggior parte dei negozi di computer
  dovrebbero averne. Assicuratevi di avere il corretto genere. Se state
  il vostro computer usa una porta seriale B09 o B25, sar sempre
  maschio, ovvero il connettore sul cavo dovr essere femmina. Attaccate
  il vostro modem ad una delle vostre porte seriali. Se vi va bene
  accettare l'IRQ e l'indirizzo IO di default della porta alla quale lo
  state connettendo, dovreste essere pronti per lanciare il vostro
  programma di configurazione e configurare il modem stesso.


  2.2.3.  Cosa significano le luci (LED)


    TM Test del Modem

    AA (Auto Answer) Autorisposta (se attivata, il vostro modem
     risponder ad una chiamata in arrivo)

    RD  (Receive Data) linea di Ricezione Dati = RxD

    SD  (Send Data) linea di invio dati = TxB

    TR  (Terminal Ready) terminale pronto = DTR (impostato dal vostro
     PC)

    RI  (Ring indicator) indicatore di squillo (se attivo, qualcuno sta
     chiamando il vostro modem)

    OH (Off Hook) (se disattivo, il vostro modem ha appeso la
     comunicazione)

    MR (Modem Ready) modem pronto = DSR ??

    EC  (Error Correction) correzione di errore

    DC  (Data Compression) compressione dati

    HS  (High Speed) alta velocit (per questo modem)


  2.3.  Modem interni

  Un modem interno  installato in un PC rimuovendo il coperchio ed
  inserendo la scheda modem in un alloggiamento libero della scheda
  madre. Ci sono modem per alloggiamenti ISA ed altri per quelli PCI.
  Mentre i modem esterni si connettono alla porta seriale (tramite un
  corto cavo), i modem interni hanno la porta seriale costruita
  all'interno del modem. In altre parole, la scheda modem  sia una
  porta seriale che un modem.

  L'impostazione degli indirizzi IO ed IRQ per una porta seriale era un
  tempo effettuata dai "jumper" sulla scheda. Questi piccoli "cubetti"
  neri rettangolari di circa 5x4x2 mm si spingevano sopra i pin della
  scheda. I modem Plug-and-Play (in realt la parte porta seriale del
  modem) non usano i "jumper" per impostare gli indirizzi, ma invece
  sono configurati inviando comandi di configurazione ad essi (tramite
  lo spazio di indirizzo IO sul bus ISA all'interno del computer). Detti
  comandi di configurazione possono essere inviati da un BIOS PnP, dal
  programma isapnp (solo per il bus ISA) o da un sistema operativo PnP.
  La loro configurazione  parte del sistema operativo Window 95/98.
  Sotto Linux si ha una scelta di modi (nessuno dei quali  sempre
  facile) per configurare gli io-irq.


  1. Usare "isapnp" che potrebbe essere lanciato automaticamente ad ogni
     avvio

  2. Usare un BIOS PnP a s stante (che viene eseguito ad ogni avvio)

  3. Modificare Linux per renderlo un sistema operativo PnP


  2.4.  Software Modem (interni - la maggior parte winmodem)

  I software modem demandano la maggior parte (o quasi tutto) il lavoro
  del modem al chip del processore principale (CPU) del vostro computer
  (tipo un chip Pentium). Complessi programmi software proprietari
  (driver) svolgono questo compito sulla CPU. Vasta parte dei modem
  interni costruiti dopo la seconda met del 1998 non funzionano con
  Linux visto che sono software modem che funzionano solo sotto Windows
  e sono spesso chiamati "winmodem". Sebbene alcuni volontari fossero
  disponibili per cercare di scrivere driver Linux per questi modem, le
  specifiche non sono ancora state rese disponibili quindi questo non
  pu essere fatto. Prima del 2000 circa, nessun software modem poteva
  essere usato con Linux a causa della mancanza di driver per essi sotto
  Linux.

  Poi, finalmente, verso la fine del 1999, sembrava che due software
  modem  potessero funzionare sotto Linux, la Lucent Technologies
  forniva in via non ufficiale un codice binario Linux per supportare i
  suoi software modem PCI, ma  sono stati riportati dei bug nelle prime
  versioni.  PC-TEL introduceva un nuovo software modem per Linux. Ci
  saranno altre ditte che seguiranno questa strada per andare a creare
  dei "linmodem"? Per un elenco di modem che funzionano/non funzionano
  sotto Linux vedere elenco modem
  <http://www.o2.net/~gromitkc/winmodem.html>. Un progetto per far
  funzionare i winmodem sotto Linux si trova in  <http://linmodems.org>
  C' anche a disposizione una mailing list.  Ci sono altri tentativi in
  corso di reverse-engineering con almeno un'evidenza di un winmodem che
  sia stato fatto funzionare sotto Linux (ma non a piena funzionalit).
  Cos mentre state leggendo questo documento potrebbero esserci
  ulteriori linmodem.

  Se viene reso disponibile del codice per far lavorare un "winmodem"
  sotto Linux, allora si potrebbe chiamare "linumodem".  ancora un
  "winmodem"?. Forse s visto che funziona anche sotto MS Windows.  Il
  termine "Winmodem"  il marchio di fabbrica di un certo tipo di
  "winmodem".

  Ecco un'ulteriore pi precisa terminologia riguardante i software
  modem. HSP (Host Signal Processor) significa che il processore
  ospitante (il vostro chip CPU) crea il codice necessario per produrre
  il segnale elettrico sulla linea telefonica. Il modem in s crea
  semplicemente una qualsivoglia onda elettrica che la CPU gli dice di
  creare. Di contro, un modem "controllerless" pu creare le onde di sua
  iniziativa (ma non pu controllare il modem). Non contiene
  l'attrezzatura per gestire i byte che sono inviati o ricevuti Non pu
  comprimere stringhe di byte; non pu verificare errori; non pu
  comporre i pacchetti. In altre parole non pu controllare il modem ma
  invece deve essere la CPU a svolgere tutto questo lavoro usando il
  software. I Rockwell HCF (Host Controlled Family) fanno questo. Se il
  software che fa tutto questo potesse essere portato sotto Linux, dopo
  non ci sarebbe questo problema. A parte quanto sopra, un modem che non
  simula una porta seriale non funzioner sotto Linux.

  Come determinare se un modem interno funzioner sotto Linux?  Per
  prima cosa vedete se il nome o la descrizione di esso indica che
  trattasi di software modem: HSP, HCF, HSF, controllerless, host-
  controlled, host-based, e soft-... modem. Se  un software modem
  funzioner solo nei rari (fino ad ora) casi in cui sia disponibile un
  driver Linux. Se non conoscete il modello del modem ad avete anche
  Windows sul vostro Linux PC, cliccate sull'icona "Modem" del "Pannello
  di Controllo". Poi controllate l'elenco dei modem all'indirizzo web
  citato 4 paragrafi sopra. Se anche questo non funziona (o non 
  possibile fare), potete controllare la confezione (o il manuale) e
  cercare la sezione che dice qualcosa tipo "Minimum System
  Requirements" (Sistema minimo richiesto) o semplicemente "System
  Requirements" (Requisiti di sistema). Potrebbe essere stampato molto
  in piccolo.  Leggete attentamente. Se viene elencato Windows oppure
  una CPU Pentium come uno dei requisiti, allora probabilmente non
  funzioner sotto Linux.

  Altrimenti potrebbe funzionare sotto Linux se non viene esplicitamente
  indicato che dovete avere Windows. La scritta "designed for Windows"
  (progettato per Windows) potrebbe semplicemente voler dire che
  supporta interamente il plug-and-play Microsoft, il che va bene visto
  che Linux usa le stesse specifiche plug-and-play (ma  pi difficile
  configurarlo sotto Linux). L'essere "progettato per Windows" quindi
  non d indizi sul fatto che funzioni o meno sotto Linux. Potreste
  verificare il sito Web del produttore oppure chiedere informazioni
  tramite posta elettronica. Una volta ho visto una pagina web che
  dichiarava specificamente che un modello funzionava sotto Linux
  implicitamente dicendo che un altro modello non funzionava.

  A parte il problema di ottenere un driver, quali sono i pro e i contro
  di un software modem? Visto che il software modem usa la CPU per
  svolgere la maggior parte del suo lavoro, esso richiede meno parti
  elettroniche sulla scheda e quindi costa meno. Allo stesso tempo, la
  CPU  pesantemente impegnata dal modem, quindi il funzionamento
  generale potrebbe rallentare. Questo  particolamente vero se altri
  processi che impegnano la CPU intensamente sono in esecuzione allo
  stesso tempo.  Naturalmente se non state usando il software modem non
  c' alcun degrado di prestazioni. Vale la pena risparmiare sul prezzo
  per questo inconveniente? In alcuni casi s, specialmente se il modem
  viene usato raramente o non si hanno in esecuzione altri processi
  impegnativi per la CPU mentre si usa il modem. Questi sono quindi i
  casi in cui l'uso del software modem  economicamente giustificato.
  Quanto risparmiato sul costo del modem potrebbere essere usato per una
  migliore CPU che sar in grado di velocizzare un poco tutto l'insieme.
  Per i circuiti elettronici sulla scheda del modem possono svolgere il
  lavoro con pi efficacia rispetto ad una CPU. Cos se usate molto il
  modem  probabilmente meglio evitare i software modem (e quindi
  potreste usare una CPU meno potente :-).


  2.5.  Modem PCI

  Una scheda modem PCI  una di quelle che si inseriscono in un
  alloggiamento del bus PCI sulla scheda madre di un PC.
  Sfortunatamente, sembra che la maggior parte dei modem PCI non
  funzioni sotto Linux ma sono in atto dei tentativi di supportare
  alcuni di essi. Vedere ``Supporto del bus PCI in fase di
  completamento''


  2.6.  Quali modem interni potrebbero non funzionare sotto Linux


    ``Software Modem (interni)'' funzionano solo nei rari casi dove sia
     disponibile un driver Linux.

    ``Modem PCI'' la maggior parte non funziona sotto Linux

    ``Modem MWave e DSP'' potrebbero funzionare, ma solo se prima fate
     partire Windows/Dos ogniqualvolta accendete il PC.

    I modem con driver ``RPI (Rockwell)'' funzionano ma con prestazioni
     ridotte.


  2.6.1.  Modem MWave e DSP

  Questi modem usano i DSP (Digital Signal Processors) che sono
  programmati tramite algoritmi che devono essere scaricati dall'hard
  disk verso la memoria DSP appena prima di usare il modem.
  Sfortunatamente lo scaricamento viene spesso fatto da programmi
  Dos/Windows cos la cosa non si pu fare da Linux. I modem comuni che
  funzionano sotto Linux hanno spesso anche un DSP (e la cosa potrebbe
  essere menzionata nella confezione), ma il programma che lo lancia 
  situato all'interno del modem. Questo non  un modem DSP nel senso
  inteso da questa sezione e dovrebbe funzionare bene sotto Linux. Un
  esempio di modem DSP  l'Aptiva MWave dell'IBM.

  Se un modem DSP simula una porta seriale, allora  usabile da Linux
  che comunica con i modem attraverso la porta seriale. Se avete anche
  Dos/Windows sullo stesso PC potreste essere in grado di usare il
  modem: prima installate i driver sotto DOS (usando i driver DOS e non
  quelli Windows). Poi lanciate  Dos/Windows e caricate il driver per il
  modem in modo da programmare il DSP. Poi senza spegnere il computer,
  passate a Linux.

  Potreste scrivere un file "batch" (a dire il vero uno script) per fare
  questo. Ecco un esempio, ma dovete modificarlo per adattarlo alla
  vostra situazione.




       rem mwave  un file batch fornito dal costruttore del modem
       call c:\mww\dll\mwave start
       rem loadlin.exe  un programma DOS che carica Linux da DOS (Vedere Config-HOWTO).
       c:\linux\loadlin f:\vmlinuz root=/dev/hda3 ro





  Si potrebbe creare un icona sul desktop di Windows che punti a questo
  file batch, quindi impostare la propriet dell'icona su "Esegui in
  modalit MSDOS". Poi cliccando su questa icona si imposta il modem,
  quindi si passa a Linux.  Un altro modo possibile per caricare Linux
  dal DOS  premere CTL-ALT-CANC dicendo al sistema operativo di fare un
  reboot (a patto che abbiate impostato le cose in modo che possiate
  caricare direttamente Linux alla ripartenza del PC). Il modem rimane
  sulla stessa porta com (stesso indirizzo IO) che  stato usato sotto
  DOS.


  Il modem Newcom ifx necessita di una piccola modifica al kernel per
  farlo funzionare correttamente visto che la sua simulazione della
  porta seriale non  standard. La modifica ed altre informazioni per
  usare questo modem con Linux si trova in
  <http://maalox.pharmacy.ohio-state.edu/~ejolson/linux/newcom.html>.


  2.6.2.  Driver Rockwell (RPI)

  I modem che richiedono i driver Rockwell RPI (Protocollo di
  Interfaccia Rockwell) possono essere usati con linux anche il software
  driver funziona solo sotto Windows. Questo accade perch il software
  Windows di cui non si dispone, esegue solo compressione e correzione
  di errori. Se vi va bene usare un modem senza compressione dati e
  correzione errori, allora lo potete usare con Linux. Per fare questo
  dovete disabilitare il RPI inviando al modem (tramite stringa di
  inizializzazione) un comando "disabilita RPI" ogni volta che accendete
  il modem. Sul mio modem il comando  +HO. Non avere a disposizione la
  compressione dati potrebbe non essere poi quel gran svantaggio visto
  che la maggior parte dei grossi file che scaricate da Internet sono
  gi compressi ed ulteriori tentativi di compressione potrebbero
  tramutarsi in un piccolo rallentamento.


  3.  Modem Pool (Gruppi di modem), Modem digitali

  Un modem pool  un gruppo di modem sulla stessa scheda (come le schede
  modem multiporta) oppure molti modem su di un chassis esterno
  (qualcosa come un modem esterno). I modem possono essere analogici
  simili a quelli usati dai PC di casa o ufficio (non possono inviare a
  56k anche se sono "Modem a 56k"). Potrebbero anche essere "modem
  digitali" che possono inviare dati a 56k. Per 56k in realt intendo
  tutte le velocit sopra i 33,6k, visto che i modem a 56k non possono
  avere una vera velocit di 56k. I modem digitali richiedono una
  connessione digitale alla linea telefonica e non usano alcuna porta
  seriale. Tutti questi modem pools esigono l'installazione di driver
  speciali per loro.


  3.1.  Modem pool analogici, schede modem multiporta

  Essi sono parecchi modem analogici (quelli comuni da casa/ufficio)
  forniti sia su di una scheda plug-in che su di uno chassis esterno.
  Ogni come ha una porta seriale al suo interno.  C' in genere un
  sistema di condivisione di interrupt o di gestione di interrupt nella
  loro circuteria, quindi parecchio carico viene levato alla CPU. Notate
  che questi modem non sono modem digitali e quindi non saranno capaci
  di usare 56k quando vengono chiamati.

  Ecco un elenco di alcune ditte che costruiscono schede modem
  multiporta. In genere ci sono 8 modem per scheda. Le schede
  sottoelencate funzionano sotto Linux ed i siti web dovrebbero guidarvi
  ad un driver per esse.

  Schede modem multiporta:

    MultiModemISI di Multi-Tech Systems.  56K o 33.6K, PCI o ISA, 4 od
     8 porte.  ibridi ISDN/56K.
     <http://www.multitech.com/products/>

    RAStel di Moreton Bay Products. 56K PCI o ISA, 4 o 8 porte.  Anche
     2 modem + 2 porte seriali libere (?).
     <http://www.moretonbay.com.au/MBWEB/product/rastel/rastel.htm>

    RocketModem di Comtrol.  ISA 33.6K, 4 od 8 porte.
     <http://www.comtrol.com/SALES/SPECS/Rmodem.htm>
    AccelePort (RAS Family) di Digi.
     <http:/www.dgii.com/digi.cfm?p=940564.pi.prd.00000046>


  3.2.  Modem digitali

  I modem digitali sono molti diversi da quelli analogici che la maggior
  parte delle persone usano sui propri PC. Esse richiedono una
  connessione digitale alla linea telefonica e non usano porte seriali
  per interfacciarsi al computer. Invece, si interfacciano direttamente
  al PC tramite una scheda speciale (che potrebbe anche contenere il
  modem digitale). Essi sono in grado di inviare a 56k, cosa che i modem
  analogici non sono in grado di fare. Essi rappresentano spesso una
  componente dei "remote access servers" (server di accesso remoto) o
  "digital modem pools" (gruppi di modem digitali).

  I cavi che portano i segnali digitali dalla compagnia telefonica sono
  stati concepiti per alte larghezze di banda cos che gli stessi cavi
  possono portare diverse chiamate telefoniche. Questo viene fatto
  tramite il "time-division multiplexing". Cos il primo compito da
  eseguire  quello di separare le chiamate telefoniche ed inviare
  ciascuna di esse al proprio modem digitale. C' anche il compito da
  svolgere nella direzione opposta combinando tutte le singole chiamate
  in un'unica linea. Questi compiti sono svolti da qualcosa che 
  talvolta chiamata ".. concentrator"

  Il modem digitale trasporta il segnale digitale dalla compagnia
  telefonica e, dopo averlo elaborato, lo mette sul bus del PC
  (presumibilmente inviandolo in un buffer in memoria).  Allo stesso
  modo, gestisce l'invio di segnali digitali nella direzione opposta
  verso una linea telefonica digitale. Quindi esegue solomente una
  conversione digitale a digitale e non tratta dati analogici in alcun
  modo. Quindi non  veramente un modem visto che non modula nessuna
  portante analogica. Quindi il nome modem digitale  improprio ma esso
  svolge un compito che in precedenza spettava ai modem. Cos alcuni
  modem seriali definiscono se stessi come "digital signal processors"
  (processori di segnale digitale"), "remote access server" (server di
  accesso remoto) ecc. e potrebbero anche non menzionare mai la parola
  "modem". Questa  una terminologia tecnicamente corretta.

  Detti sistemi possono esser un server proprietario a se stante, uno
  chassis che contiene modem digitali che si connettono ad un PC tramite
  una speciale scheda di interfaccia, o semplicemente essere una scheda
  essi stessi. Digi definisce detta scheda un "remote access server
  concentrator adapter" (adattatore per concentratore di server di
  accesso remoto). Una descrizione non completa di quello che serve per
  diventare un ISP (Internet Service Provider) : Vedere Cosa mi serve
  per essere un ISP?.  an ISP?">. Cyclades promuove i propri prodotti
  quindi  consigliabile fare qualche confronto sui prezzi prima di
  comprare qualsiasi cosa.


  Prima di leggere questo


  4.  Nozioni di base Modem e porte seriali

  Non occorre capire le fondamenta per usare ed installare un modem. Ma
  esserne a conoscenza pu aiutare a capire cosa c' che non va quando
  sorgono dei problemi. Dopo avere letto questa sezione, se si vuole
  approfondire, conviene consultare la sezione ``Come funzionano i
  modem'' in questo documento (ancora incompleta). Maggiori dettagli
  sulla porta seriale (inclusa la maggior parte di questa sezione) potr
  essere trovata in Serial-HOWTO.


  4.1.  Il modem converte da digitale ad analogico (e viceversa)

  La maggior parte delle principali linee telefoniche sono gi digitali
  ma le linee che portano presso la vostra abitazione (o posto di
  lavoro) sono generalmente analogiche, il che vuol dire che sono state
  predisposte per trasmettere un'onda elettrica che  l'esatta replica
  dell'onda sonora generata dalla vostra voce. Un'onda elettrica di
  questo tipo  chiamata "analogica".  Se vista in un oscilloscopio
  sembra una curva sinusoidale di varia frequenza ed ampiezza.  Un
  segnale digitale assume invece una forma squadrata. Ad esempio 3 v
  (volt) potrebbe essere un bit con valore 1, e 0 v potrebbe
  corrispondere ad un bit di valore 0. Per la maggior parte delle porte
  seriali (usate dai modem esterni) +12 v equivale ad un bit 0, e -12 v
  ad un bit 1 (alcune porte hanno valori di + o - 5 v).

  Per inviare dati dal proprio computer attraverso la linea telefonica,
  il modem acquisisce il segnale digitale dal computer e lo converte in
  "analogico". Lo fa prima creando un'onda sinusoidale analogica, quindi
  "MODulandola". Visto che il risultato rappresenta comunque un dato
  digitale, potrebbe anche chiamarsi segnale digitale invece che
  analogico. Ma assomiglia ad un segnale analogico e quasi tutti lo
  chiamano analogico. Dall'altro capo della linea telefonica un altro
  modem "DEModula" questo segnale recuperando il segnale puro digitale
  originale. Mettete insieme l'inizio delle due parole sopracitate:
  "mod" e "dem" ed ecco l'origine della parola "modem" (ovviamente
  dovete togliere una delle due "d"). Un "modem"  quindi un MODulatore-
  DEModulatore.  Per sapere cos' la modulazione occorre consultare la
  sezione ``La modulazione in dettaglio''.


  4.2.  Cos' una porta seriale?

  4.2.1.  Introduzione alla seriale

  La porta seriale  un dispositivo di I/O (Input/Output).


  Visto che i modem hanno una porta seriale frapposta tra loro ed il
  computer,  necessario conoscere la porta seriale cos come il modem.

  La porta seriale  un dispositivo di IO (Inupt/Output). La maggior
  parte dei PC hanno due porte seriali. Ciascuna ha un connettore a 9
  pin (talvolta a 25 pin) sul retro del computer. I programmi per
  computer possono inviare dati (byte) al pin di trasmissione (output) e
  ricevere dati dal pin di ricezione (input). Gli altri pin servono per
  controlli e per la messa a terra.

  La porta seriale  molto di pi che un semplice connettore. Essa
  converte i dati da paralleli a seriali e cambia la rappresentazione
  elettrica dei dati.  All'interno del computer, i bit di dati scorrono
  parallelamente (usando diversi cavi allo stesso tempo). Il flusso
  seriale  uno scorrere di dati attraverso un solo cavo (cos come sul
  pin di trasmissione e ricezione del connettore seriale). Perch la
  porta seriale possa creare un flusso di questo tipo, deve convertire i
  dati da paralleli (all'interno del PC) a seriali (e viceversa).

  La maggior parte dell'elettronica della porta seriale si trova in un
  chip del computer (o in una sezione di un chip) conosciuto come UART.
  Per maggiori dettagli sugli UART consultare la sezione ``Cosa sono gli
  UART?  In che modo influenzano le prestazioni?''  Ma potreste volere
  prima finire questa sezione, cos da poter meglio capire come l'UART
  si pone all'interno dello schema globale delle cose.




  4.2.2.  Pin e cavi

  I vecchi PC usavano connettori a 25 pin ma in realt se ne usano circa
  9, per cui la maggior parte dei connettori attuali sono di soli 9 pin.
  Ognuno dei quali  generalmente connesso ad un cavo. Oltre ai due cavi
  usati per ricevere e trasmettere i dati, un altro pin (cavo)  la
  messa a terra. Il voltaggio di ogni cavo  misurato in relazione al
  cavo di terra. Quindi il numero minimo di cavi da usare per una
  trasmissione bilaterale di dati  3.  possibile anche fare a meno del
  segnale di terra ma con degradate prestazioni e talvolta con errori.

  Ci sono altri cavi che servono per effettuare solo dei controlli
  (invio di segnali) e non per inviare byte. Tutti questi segnali
  potrebbero essere condivisi da un unico cavo, ma, al contrario, esiste
  un cavo separato dedicato ad ogni tipo di segnale.  Alcuni (o tutti)
  questi cavi di controllo sono chiamati "linee di controllo del modem".
  Questi cavi di controllo sono impostati (on) a +12 volt oppure nello
  stato negativo (off) a -12 v. Uno di questi cavi segnala al computer
  di interrompere l'invio di dati attraverso la porta seriale. Al
  contrario, un altro cavo segnala al dispositivo connesso alla porta
  seriale di interrompere l'invio di dati al computer.  Se il
  dispositivo connesso  un modem, altri cavi possono segnalare al modem
  di appendere la comunicazione o dire al computer che la connessione
  alla linea telefonica  stata effettuata o che il telefono sta
  squillando (cio qualcuno sta tentando di connettersi). Vedere il
  Serial-HOWTO: Pinout and Signals per ulteriori dettagli


  4.2.3.  Il modem interno contiene una porta seriale

  Per un modem interno non si sono connettori a 9 pin, ma il
  comportamento  quasi esattamente come se i cavi summenzionati
  esistessero. Invece di un segnale a 12 volt attraverso un cavo che
  porta lo stato di una linea di controllo del modem, il modem interno
  usa semplicemente un bit di stato nella propria memoria (un registro)
  per determinare lo stato di questo cavo "virtuale".  La porta seriale
  dei modem interno  vista dal computer proprio come una porta seriale
  reale. Ivi inclusi anche i limiti di velocit che si possono impostare
  nelle porte seriali ordinarie come ad esempio 115200 bit per secondo.
  Sfortunatamente per Linux molti modem interni attuali non funzionano
  esattamente in questo modo ma invece usano un software (eseguito dalla
  CPU) per svolgere la maggior parte del lavoro del modem.
  Sfortunatamente, questo software  disponibile solo per i sistemi
  operativi MS Windows (non sono stati portati su Linux).  Quindi non
  potete usare la maggior parte di questi modem con Linux. Vedere
  ``Software Modem (interni)''.


  4.3.  Indirizzi IO & IRQ

  Poich il computer deve comunicare con ciascuna porta seriale, il
  sistema operativo deve sapere che ciascuna porta seriale esiste e dove
  essa si trovi (il suo indirizzo di I/O). Esso deve anche conoscere
  quale cavo (numero di IRQ) deve usare la porta seriale per richiedere
  i servizi della CPU del PC. Quindi ogni dispositivo di porta seriale
  deve immagazzinare nella propria memoria non volatile sia l'indirizzo
  di I/O che il suo Interrupt reQuest Number: IRQ. Vedere ``Interrupt''.
  Il bus PCI non funziona esattamente in questo modo visto che il bus
  PCI ha il suo proprio sistema di interrupt. Ma, visto che il BIOS che
  riconosce il PCI imposta i chip per mappare questi interrupt PCI come
  IRQ, praticamente si comporta proprio come descritto qui sopra ad
  eccezione del fatto che la condivisione degli interrupt  concessa (2
  o pi dispositivi possono usare lo stesso numero di IRQ).

  Gli indirizzi I/O non sono uguali agli indirizzi di memoria. Quando un
  indirizzo I/O viene immesso nel bus indirizzi (address bus) del
  computer, un altro cavo viene elettrificato.  Questo dice sia alla
  memoria principale di ignorare l'indirizzo, che a tutti i dispositivi
  che hanno indirizzi I/O (come le porte seriali) di controllare
  quell'indirizzo per vedere se combacia con quello del dispositivo. Se
  c' corrispondenza, allora il dispositivo di I/O legge il dato sul bus
  dati.


  4.4.  Nome: ttyS0, ttyS1, ecc.

  Le porte seriali sono etichettate come ttyS0, ttyS1, ecc.
  (generalmente corrispondenti a COM1, COM2, ecc. in DOS/Windows). La
  directory /dev ha un file speciale per ogni porta. Digitate "ls
  /dev/ttyS*" per vederli. Il fatto che possa esistere (ad esempio) un
  file ttyS3, non significa necessariamente che esista anche una
  corrispondente porta seriale fisica.  Quale di questi nomi (ttyS0,
  ttyS1, ecc.) si riferisca a quale porta seriale viene determinato come
  segue. Il driver seriale (software) mantiene una tabella che mostra
  quale indirizzi I/O corrisponde a quale ttyS. Questa mappatura di nomi
  (tipo ttyS1) riferita a indirizzi I/O (e IRQ) pu essere sia impostata
  che verificata dal comando "setserial". Vedere ``Cos' Setserial''.
  Questo non imposta gli indirizzi di IO e di IRQ sull'hardware stesso
  (che  impostato invece dai ponticelli o tramite software plug-and-
  play). Quindi quale porta fisica corrisponda ad esempio a ttyS1
  dipende sia da quello che il driver della seriale pensa (tramite
  setserial) che da quello che  impostato nell'hardware. Se viene fatto
  un errore, la porta fisica potrebbe non corrispondere ad alcun nome
  (tipo ttyS2) e quindi con pu essere usata. Vedere ``Dispositivi di
  porta seriale /dev/ttyS2, ecc.'' per ulteriori dettagli.


  4.5.  Interrupt

  I byte entrano dalla linea telefonica al modem, sono converiti da
  analogico a digitale dal modem, quindi passati attraverso la porta
  seriale verso la loro destinazione all'interno del vostro computer.
  Quando la porta seriale riceve un certo numero di byte (potrebbe
  essere impostata a 1, 4, 8 o 14) nel suo buffer FIFO, segnala alla CPU
  di recuperarli inviando un segnale elettrico noto come interrupt su di
  certo cavo generalmente usato solo da quella porta. Quindi il FIFO
  attende un certo numero di byte quindi genera un interrupt.

  Comunque questo interrupt potrebbe anche essere inviato se c' un
  inaspettato ritardo mentre si attende l'arrivo del prossimo byte
  (conosciuto come timeout).  Quindi se i byte sono ricevuti lentamente
  (come ad esempio se qualcuno digita su una tastiera di terminale)
  potrebbe essere generato un interrupt per ogni byte ricevuto.  Per
  alcuni chip UART la regola  questa: se si possono ricevere 4 byte di
  seguito, ma nessuno di questi 4 arriva, allora la porta smette di
  aspettare altri byte ed invia un interrupt per recuperare i byte
  attualmente nel FIFO. Naturalmente, se il FIFO  vuoto, non verr
  inviato nessun interrupt.

  Ogni interrupt (all'interno del computer)  contraddistinto da un
  numero (IRQ) e la porta seriale deve sapere quale conduttore usare per
  inviare il segnale.  Ad esempio, ttyS0 normalmente usa l'IRQ n. 4
  conosciuto come IRQ4 (o IRQ 4).  Una lista di questi interrupt ed
  altro pu essere trovata in "man setserial" (cercare "Configuring
  Serial Ports"). Gli interrupt sono inviati ogniqualvolta la porta
  seriale necessiti di ricevere l'attenzione della CPU.   importante
  fare questo periodicamente poich il buffer all'interno della porta
  seriale pu trattenere solo 16 (1 nelle vecchie porte seriali) byte in
  arrivo. Se la CPU non riesce a rimuovere prontamente i byte ricevuti,
  poi non esiste pi spazio libero per gli altri che stanno arrivando ed
  il piccolo buffer potrebbe sovraccaricarsi generando una perdita di
  byte di dati.
  Per un modem esterno non c' nessun modo (tipo controllo di flusso)
  per interrompere il flusso abbastanza rapidamente da prevenire questo.
  Per un modem interno il buffer FIFO a 16 byte si trova sulla stessa
  scheda ed un buon modem non ci andr a scrivere se questo  pieno.
  Quindi un buon modem interno non sovraccaricher il buffer da 16 byte
  ma potrebbe avere bisogno di usare ``Controllo di flusso da modem a
  modem'' per evitare che il modem stesso vada in sovraccarico. Questo
  rappresenta un vantaggio del modem interno rispetto ad un esterno.

  Gli interrupt sono inviati anche quando la porta seriale ha appena
  mandato 16 dei suoi byte dal piccolo buffer di trasmissione verso il
  cavo esterno.  In questo modo si fa spazio per 16 successivi byte da
  inviare all'esterno. L'interrupt notifica alla CPU il fatto cos che
  si possano immettere ulteriori byte nel piccolo buffer di trasmissione
  per essere inviati.  Ancora, quando una linea di controllo del modem
  cambia il proprio stato, viene inviato un interrupt.  I buffer sopra
  menzionati sono tutti buffer hardware. La porta seriale ha anche degli
  ampi buffer nella memoria principale. Questo verr spiegato pi tardi.

  Gli interrupt veicolano molte informazioni ma solo indirettamente.
  L'interrupt propriamente detto semplicemente dice ad un chip chiamato
  interrupt controller che una certa porta seriale necessita attenzione.
  L'interrupt controller poi invia il segnale alla CPU. La CPU attiva
  uno speciale programma per servire la porta seriale. Il programma
  viene chiamato routine di servizio di interrupt (interrupt service
  routine) che  parte del software del dispositivo seriale. Esso cerca
  di scoprire cosa  successo alla porta seriale, quindi svolge il
  compito come ad esempio il trasferimento di byte da (per) il buffer
  hardware della porta.  Questo programma pu facilmente scoprire cosa 
  accaduto poich la porta seriale ha dei registri che puntano indirizzi
  di I/O conosciuti dal software del driver seriale. Questi registri
  contengono informazioni sullo stato della porta seriale. Il software
  legge questi registri e ispezionandone il contenuto, scopre cosa 
  accaduto, quindi esegue l'azione appropriata.


  4.6.  Compressione di dati (da parte del Modem)

  Prima di continuare con le nozioni di base sulla porta seriale,
  occorre capire una certa cosa fatta dal modem: la compressione dei
  dati. In alcuni casi questo compito  in realt svolto dal software
  gestito dalla CPU del computer ma, sfortunatamente, al momento attuale
  questo software funzione solamente in ambiente MS Windows. Ci
  occuperemo quindi del caso in cui il modem stesso esegue la
  compressione poich questo  quello che accade cos che il modem possa
  funzionare in ambiente Linux.

  Per inviare dati pi velocemente attraverso le linee telefoniche uno
  potrebbero comprimere (codificare) i dati usando uno schema di
  codifica personalizzato, che esso stesso dipende dai dati. Il dato
  codificato  pi piccolo dell'originale (meno byte) e pu essere
  inviato attraverso Internet in minore tempo.  Questo processo 
  chiamato "compressione di dati".

  Se scaricate file da Internet, essi sono probabilmente gi compressi e
  non  possibile per il modem tentare di comprimerli ulteriormente. Il
  vostro modem pu riconoscere che quelli che stanno transitando sono
  dati gi compressi ed astenersi dal tentare di comprimerli ancora. Se
  state ricevendo dati che sono stati gi compressi dall'altro modem, il
  vostro modem li decomprimer e creer molti pi byte di quelli che
  sono stati spediti attraverso la linea telefonica. Quindi il flusso di
  dati dal vostro modem all'interno del vostro computer sar maggiore di
  quello dalla linea telefonica verso di voi. Il rapporto di questo
  flusso viene chiamato rapporto di compressione. Rapporti di
  compressione superiori a 4 sono possibili, ma non molto probabili.

  4.7.  Correzione d'errore

  Analogamente alla compressione dati, i modem potrebbero essere
  impostati per eseguire una correzione d'errore. Sebbene questo
  comporti un abbassamento del flusso di byte/secondo, il fatto che
  questa correzione d'errore tolga i bit di inizio e fine in realt
  accresce il flusso di bit/secondo.

  Per l'interfaccia della porta seriale con il mondo esterno, ogni byte
  composto da 8 bit ha 2 ulteriori bit aggiunti ad esso: un bit di
  inizio e un bit di stop.  Senza la correzione di errore, questi bit di
  inizio e stop extra generalmente passano attraverso il modem verso la
  linea telefonica. Ma quando la correzione d'errore  attivata, questi
  bit extra sono eliminati e i byte di 8 bit sono composti in pacchetti.
  Questo  pi efficiente e genera un flusso di bit/secondo pi alto a
  dispetto del fatto che c' qualche ulteriore byte aggiunto per
  l'intestazione dei pacchetti e per la correzione degli errori


  4.8.  Flusso di dati (velocit)

  I dati (byte che rappresentano caratteri, immagini, ecc.) passano dal
  vostro computer al vostro modem, quindi all'esterno verso la linea
  telefonica (e viceversa). I rapporti di flusso (come ad esempio 56k
  (56000) bit/secondo) sono chiamati (non correttamente) "velocit". Ma
  quasi tutti dicono "velocit" al posto di "rapporto di flusso". Se non
  c' compressione di dati il rapporto di flusso dal computer al modem
  dovrebbe essere circa lo stesso di quello che passa attraverso la
  linea telefonica.

  In realt ci sono due differenti velocit da considerare al vostro
  capo della linea telefonica.


    La velocit della linea telefonica stessa (velocit DCE) da modem-
     a-modem

    La velocit dalla porta seriale del vostro computer al vostro modem
     (velocit DTE)

  Quando si compone un numero per connettersi ad un altro modem
  all'altro capo della linea telefonica, il vostro modem spesso
  visualizza un messaggio tipo "CONNECT 28800" oppure "CONNECT 115200".
  Cosa significa?. B, potrebbe essere sia la velocit DCE che quella
  DTE. Se essa  maggiore di quella delle specifiche del modem, allora
  deve trattarsi della velocit da-modem-a-computer (DTE). Questo 
  l'esempio di "CONNECT 115200" mostrato in precedenza. 28800 deve
  trattarsi invece della  velocit da-modem-a-modem (DCE) visto che la
  porta seriale non ha questa velocit. Si potrebbe configurare il modem
  perch possa visualizzare entrambe le velocit. Alcuni modem
  visualizzano entrambe le velocit e visualizzano la velocit da modem-
  a-modem come (ad esempio): CARRIER 28800

  Se avete un modem interno non vi aspettereste che ci sia un limite di
  velocit DTE dal vostro modem al vostro computer visto che il modem
  risiede all'interno del computer ed  praticamente una parte di esso.
  Ma questo limite c' visto che il modem contiene al suo interno una
  porta seriale dedicata.

   importante capire che la velocit media  spesso minore di quella
  specificata, specialmente nella corta linea DTE (dal computer a
  modem). Attese (o tempi morti) generano una minore velocit media.
  Queste attese possono essere lunghe attese di forse un secondo a causa
  del ``Controllo  di flusso''. Di contro le attese possono anche essere
  molto brevi (tempi morti) corrispondenti a diversi micro-secondi che
  separano la fine di un byte e l'inizio dell'altro. In pi, i modem
  passano a velocit inferiori se le condizioni della linea telefonica
  sono meno che perfette.  Per una discussione riguardo quale sia la
  migliore velocit DTE vedere la sezione ``Quale velocit dovrei
  usare''.



  4.9.  Controllo di flusso

  Il controllo di flusso  la capacit di fermare il flusso dei byte in
  un cavo. Deve anche provvedere a fare ripartire il flusso senza
  perdere byte. Il controllo di flusso  necessario ai modem per
  consentire un salto nei rapporti di velocit.


  4.9.1.  Esempio di controllo di flusso

  Ad esempio, consideriamo il caso in cui voi connettiate il vostro
  modem esterno a 36.6k tramite un corto cavo alla vostra porta seriale.
  Il modem invia e riceve byte attraverso la linea telefononica e 36.6k
  bit per secondo (bps). Non esegue nessuna compressione dati o
  correzione di errore. Voi avete impostato la velocit della porta
  seriale a 115,200 bit/secondo (bps) e state inviando dati dal vostro
  computer alla linea telefonica. Quindi il flusso dal vostro computer
  al vostro modem attraverso il corto cavo  di 115.2k bps. In ogni caso
  il flusso da modem verso la linea telefonica  solo di 33.6k. Visto
  che il flusso di dati (115.2k) sta entrando nel modem pi velocemente
  del flusso di dati in uscita, il modem deve conservare il flusso in
  eccesso (115.2k -33.6k = 81.6k) in uno dei suoi buffer.  Questo buffer
  andrebbe fatalmente in sovraccarico (esaurirebbe lo spazio a
  disposizione) a meno che il flusso a 115.2k venga interrotto.

  Ecco che il controllo di flusso viene in soccorso. Quando il buffer
  del modem  quasi pieno, il modem invia un segnale di stop alla porta
  seriale. La porta seriale passa il segnale di stop al device driver ed
  il flusso a 115.2k bps viene fermato. Intanto il modem continua ad
  inviare dati a 33.6k bps recuperando i dati precedentemente accumulati
  nei suoi buffer.  Visto che ora non sta arrivando niente nel buffer,
  il livello di byte inizia a diminuire.  Quando non sono rimasti che
  pochi byte nel buffer, il modem invia un segnale di partenza alla
  porta seriale ed il flusso a 115.2k dal computer al modem riprende. In
  effetti, il controllo di flusso crea un rapporto di flusso medio (in
  questo caso 33.6k) che  significativamente inferiore a quello in
  entrata di 115.2k bps. Questo  il controllo di flusso "start-stop".

  Quello di cui sopra  un semplice esempio di flusso di controllo per
  il flusso da computer al modem, ma esiste anche il controllo di flusso
  usato nella direzione opposta: dal modem (od altro dispositivo) al
  computer. Ogni direzione di flusso coinvolge 3 buffer: 1. quello nel
  modem 2. quello nel chip UART (detto FIFO) 3. nella memoria
  principale, gestito dal driver seriale. Il controllo di flusso
  protegge alcuni buffer dal rischio di sovraccarico.  I piccoli buffer
  UART FIFO non sono protetti in questo modo ma dipendono invece da una
  veloce risposta agli interrupt che essi generano. FIFO significa
  "First In First Out" (il primo che entra  il primo che esce) e
  rappresenta quindi il modo in cui vengono gestiti i byte. Tutti e 3 i
  buffer usano la regola FIFO ma solo uno di essi si identifica anche
  con questo nome. Questa  l'essenza del controllo di flusso ma ci sono
  ancora ulteriori dettagli.

  Non dovreste averne bisogno spesso del controllo di flusso nella
  direzione modem - PC.  Per un complesso esempio di un caso dove 
  richiesto vedere "Complex Flow Control Example" nel Serial-HOWTO.  Ma
  se non avete una velocit impostata tra il modem ed il computer
  (velocit della porta seriale) sufficientemente alta, allora dovrete
  rallentare il flusso dal modem al PC. Per fare questo dovete fermare
  l'incombente flusso di byte dalla linea telefonica. Il vostro modem
  deve dire all'altro modem di interrompere l'invio.  Vedere ``Controllo
  di flusso da-modem-a-modem''


  4.9.2.  Controllo di flusso hardware contro il controllo di flusso
  software

  Se possibile,  meglio usare il flusso di controllo "hardware" che usa
  due linee dedicate di controllo del modem per inviare i segnali di
  "stop" e "start".  I modem moderni usano quasi sempre il controllo di
  flusso hardware tra il modem e la porta seriale

  Il controllo di flusso software usa le linee principali di ricezione e
  trasmissione per inviare i segnali di start e stop. Usa i caratteri di
  controllo ASCII DC1 (start) e DC3 (stop) a questo scopo. Essi sono
  semplicemente inseriti nel regolare flusso di dati. Il controllo di
  flusso software  non solo pi lento nel reagire ma anche non consente
  l'invio di dati binari a meno di prendere speciali preacauzioni. Visto
  che  probabile che dati binari possano contenere DC1 e DC3,
  particolari accorgimenti devono essere presi per distinguere tra un
  DC3 che significa uno stop del controllo di flusso ed un DC3 che 
  parte del codice binario. La stessa cosa per DC1.  Per far funzionare
  il controllo di flusso software con i dati binari occorre il supporto
  sia del modem (hardware) che del software.


  4.9.3.  Sintomi della mancanza di un controllo di flusso

  Conoscere la teoria del controllo di flusso pu essere di uso pratico.
  Per esempio usavo il mio modem per accedere ad Internet e tutto
  sembrava funzionare bene.  Ma dopo alcuni mesi ho provato ad inviare
  un grosso file dal mio PC al ISP ottenenendo un grande numero di
  errori e ritrasmissioni (ma alla fine con Kermit sono riuscito a
  spedire un grosso file dopo parecchi tentativi).  La ricezione
  nell'altra direzione (dal ISP a me) funzionava bene. Il problema
  risult essere nella disabilitazione del controllo di flusso. Il
  buffer del mio modem si sovraccaricava durante l'invio di grossi file
  visto che nessun segnale di "stop" era mai inviato al computer per
  interrompere l'invio di dati al modem. Non c'erano problemi nella
  direzione dal modem al mio computer visto che la capacit (diciamo
  115.2k) era sempre superiore del flusso attraverso la linea
  telefonica. La risoluzione consistette nell'abilitare il controllo di
  flusso inserendo un comando di attivazione del controllo di flusso
  nella stringa di inizializzazione del modem (avrebbe dovuto essere
  abilitato per default ma qualcosa era andato storto).


  4.9.4.  Controllo di flusso da-modem-a-modem

  Questo  il controllo di flusso dei dati inviati attraverso le linee
  telefoniche tra due modem. In pratica, esso esiste solo quando 
  attivata la correzione di errori. In verit, anche senza correzione di
  errore  possibile attivare il controllo di flusso software tra modem,
  ma esso potrebbe interferire con l'invio di dati binari cos non viene
  usato spesso.


  4.10.  Il percorso del flusso di dati; Buffer

  Sebbene sia stato detto molto in proposito, tra cui il controllo di
  flusso, un paio di buffer FIFO a 16 byte nelle porte seriali
  (nell'hardware) ed un paio di buffer pi ampi all'interno del modem,
  esistono ancora un altro paio di buffer. Essi sono degli ampi buffer
  (forse di 8k) nella memoria principale conosciuti anche come buffer di
  porta seriale. Quando un programma applicativo invia byte alla porta
  seriale (e al modem), essi vengono posti prima nel buffer di
  trasmissione della porta seriale nella memoria principale. La coppia
  consiste in questo buffer di trasmissione ed in quello di ricezione
  per il flusso di byte dalla parte opposta.


  Il device driver seriale estrae diciamo 16 byte dal buffer di
  trasmissione, un byte alla volta e li mette nel buffer di trasmissione
  da 16 byte della porta seriale per la trasmissione. Una volta in
  questo buffer, non c' modo di impedire che essi vengano trasmessi.
  Essi sono poi inviati al modem che dispone anch'esso di un buffer di
  dimensioni adeguate (diciamo 1k). Quando il device driver (che riceve
  ordini dal controllo di flusso) interrompe il flusso dei byte in
  uscita dal computer, interrompe in realt il flusso di byte in uscita
  dall'ampio buffer di trasmissione della memoria principale. Anche dopo
  che questo  accaduto ed il flusso verso il modem  stato fermato, un
  programma applicativo pu continuare a spedire i byte presenti nel
  buffer da 8k fino a che esso non si riempie.

  Quando  pieno, il programma applicativo non pu inviargli ulteriori
  byte (un istruzione di scrittura "write" in un blocco di programma in
  C) e l'applicazione si interrompe temporaneamente ed attende fino a
  che si libera un poco di spazio nel buffer.  Quindi uno stop
  esercitato dal controllo di flusso  in definitiva capace di fermare
  il programma che sta inviando i byte. Anche se questo programma si
  interrompe il computer non smette necessariamente di elaborare.
  Potrebbe passare ad eseguire altri processi mentre sta aspettando
  causa lo stop del controllo di flusso. Quello suindicato era un
  esempio ultrasemplificato visto che un'altra alternativa  quella di
  fare s che il programma applicativo stesso faccia qualcosa d'altro
  mentre sta attendendo di "scrivere"


  4.11.  I comandi del modem

  I comandi al modem sono inviati ad esso dal programma di comunicazione
  attraverso lo stesso conduttore usato per inviare dati. I comandi sono
  delle brevi stringhe ASCII. Esempi sono "AT&K3" per abilitare il
  controllo di flusso hardware (RTS/CTS) tra il computer ed il modem; e
  "ATDT5393401" serve per comporre il numero 5393401. Notate che tutti i
  comandi sono prefissati da "AT". Alcuni comandi come l'attivazione del
  controllo di flusso aiutano a configurare il modem. Altri comandi come
  il comporre un numero fanno veramente qualcosa. Ci sono circa un
  centinaio di differenti possibili comandi. Quando il vostro software
  di comunicazione parte, lancia una stringa di inizializzazione "init
  string" composta da comandi al modem per configurarlo. Tutti i comandi
  sono inviati sulla linea ordinaria dei dati prima che il modem
  componga un numero (o riceva una chiamata).


  Una volta che il modem  connesso ad un altro modem (modo on-line),
  tutto quello che il vostro computer manda al vostro modem va
  direttamente verso l'altro modem e non  interpretato dal modem come
  un comando. C' un modo per "fuggire" da questo modo operativo e
  tornare al modo comandi dove tutto quello che viene inviato al modem
  viene interpretato come un comando. Il computer invia semplicemente
  "+++" con un determinato periodo di tempo prima e dopo questo "+++".
  Se lo spazio temporale  corretto, il modem si pone in modo comandi.
  Un altro modo di fare questo  tramite un segnale ad una certa linea
  di controllo del modem.

  Ci sono svariate liste dei comandi modem su Internet. La sezione
  ``Siti Web'' ha dei collegamenti ad un paio di questi siti. Diversi
  modelli e marche di modem non usano esattemente lo stesso gruppo di
  comandi. Cos quello che va bene per un modem potrebbe non andare bene
  per un altro.  Alcuni comandi comuni (non si garantisce che funzionino
  su tutti i modem) sono elencati in questo HOWTO nella sezione ``Altri
  comandi modem''


  4.12.  Software seriale: il modulo del device driver

  Il device driver per la porta seriale  il software che fa funzionare
  la porta seriale. Viene ora fornito come modulo seriale. Questo modulo
  viene generalmente caricato automaticamente se necessario.  Il kernel
  2.2+ far questo. Nei kernel precedenti, dovete avere kerneld in
  esecuzione per far s che i moduli si autocaricano su richiesta.
  Altrimenti il modulo seriale necessita di essere esplicitamente
  elencato in etc/modules.  Prima che i moduli divenissero popolari con
  Linux, il driver seriale era generalmente costruito all'interno del
  kernel. Se esso  ancora incorporato nel kernel (potreste avere
  selezionato questa opzione quando avete compilato il kernel) non
  lasciate che il modulo seriale venga caricato. Se lo fate finirete con
  avere due driver seriali, viene rilevato che non potete usare le porte
  seriali ed otterrete un errore "I/O error" se tentate di aprirle.

  Quando il modulo seriale  caricato, visualizza un messaggio sullo
  schemo circa l'esistenza di porte seriali (spesso mostrando un IRQ
  errato). Ma una volta che il modulo  usato da setserial per dire al
  device driver qual' l'IRQ corretto, allora dovreste vedere una
  seconda schermata simile alla prima ma con il corretto IRQ, ecc.
  Vedere ``Cos' Setserial'' per ulteriori informazioni su setserial.

  Si potrebbe modificare il driver modificando il codice sorgente del
  kernel. La maggior parte del driver seriale si trova nel file
  serial.c. Per dettagli inerenti la scrittura di programmi per la porta
  seriale vedere Serial-Programming-HOWTO (attualmente in fase di
  revisione da parte di Vern Hoxie).




  5.  Configurazione: introduzione

  Se volete usare il modem solo in ambiente MS Windows/Dos, allora
  potete installare praticamente qualsiasi modem e tutto andr bene. In
  un ambiente Linux non  in genere cos facile a meno di usare un modem
  esterno. Tutti i modem esterni dovrebbero funzionare bene (anche se
  sono etichettati come "Plug and Play"), Ma anche la maggior parte dei
  nuovi modem interni sono Plug-and-Play (PnP) ed hanno porte seriali
  PnP. Se  un modem ISA potreste avere bisogno di usare il programma
  Linux "isapnp" per configurarle. Vedere il Plug-and-Play HOWTO per
  ulteriori informazioni.

  Visto che ogni modem ha una porta seriale associata la configurazione
  del modem si svolge in due parti:


    Configurazione del modem stesso: eseguita dal programma di
     comunicazione

    Configurazione della porta seriale del modem: eseguita solo
     "parzialmente" dal programma di comunicazione

  La maggior parte delle configurazioni di cui sopra (ma non
  necessariamente la maggior parte dello sforzo) sono svolte dal
  programma di cumunicazione che si usa con il modem come ad esempio
  minicom o seyon, wvdial (per PPP).  Se usate il modem per rendere
  disponibile il vostro computer dall'esterno, allora il programma getty
  che usate per presentare a chi si collega il prompt di login, sar di
  aiuto nella configurazione.  Vale a dire che per configurare il modem
  (e la maggior parte della porta seriale) dovete configurare il
  programma di comunicazione (tipo il PPP dialer o getty).

  Sfortunatamente la configurazione di cui sopra non esegue la
  configurazione a basso livello della porta seriale: l'impostazione dei
  suoi indirizzi IO ed IRQ sia nell'harware che nel driver. Se siete
  fortunati, la cosa potrebbe accadere automaticamente quando caricate
  Linux. L'impostazione nell'hardware veniva in precedenza svolta dai
  "jumper" ma oggi  fatta dal software Plug-and-Play.

  Ma c' un serio problema: Linux (almeno fino al tardo 1999) non  un
  sistema operativo plug-and-play ma dispone di strumenti Plug-and-Play
  che potreste usare per impostare la configuzione sebbene essi non
  siamo molto facili da usare.  Questo pu essere un difficile problema
  per voi. La prossima sezione elaborer pi approfonditamente questo
  aspetto.



  6.  Configurare la porta seriale

  6.1.  Supporto per il bus PCI in fase di completamento

  Il driver seriale del kernel 2.2 non contiene un supporto per il bus
  PCI. Ma i kernel 2.3 e 2.4 finalmente supporteranno alcune schede
  seriali PCI (e schede modem).  La maggior parte delle schede PCI
  necessitano di uno speciale supporto nel driver. Il driver legge il
  numero identificativo memorizzato nella scheda per determinare come (o
  se) supportare la scheda. Se avete una scheda PCI che siete convinti
  non sia un winmodem ma non funziona comunque, allora potreste essere
  d'aiuto per tentare di creare un driver per essa. Per fare questo
  dovrete contattare il curatore del serial driver, Theodeore (Ted) Y.
  Ts'o. Ma per prima cosa controllate l'elenco dei modem al sito
  <http://www.o2.net/~gromitkc/winmodem.html> per le ultime informazioni
  sui modem PCI e relativi argomenti.

  Inviategli tramite posta elettronica una copia dell'output di "lspci
  -vv" con complete informazioni circa il modello ed il costruttore del
  modem PCI (o della porta seriale). Egli cercher di approntarvi un
  driver di prova che potrebbe fare al caso vostro.  Dovrete
  recuperarlo, compilarlo e possibilmente ricompilare il vostro kernel.
  Poi dovrete testare il driver per vedere se funziona bene e fare una
  relazione dei risultati a Ted Ts'o. Se siete disposti a fare tutto
  quanto sopradescritto (e questa  l'ultima versione di questo HOW-TO)
  allora inviategli quanto richiesto a:  <mailto:tytso@mit.edu>.

  I modem PCI sono ben standardizzati. Alcuni usano la memoria
  principale per comunicare con il PC. Se vedete indirizzi esadecimali a
  8 cifre probabilmente non funzioneranno sotto Linux.  Alcuni
  richiedono particolari abilitazioni dell'IRQ. L'output di "lspci" pu
  aiutare a determinare se pu essere supportato. Se vedete una porta IO
  a 4 cifre e nessun indirizzo di memoria lungo, il modem potrebbe
  funzionare semplicemente dicendo a "setserial" l'IO della porta e
  l'IRQ. Alcune persono hanno fatto funzionare un modem PCI 3COM 3CP5610
  in questo modo



  6.2.  Introduzione alla configurazione

  Nella maggior parte dei casi, la configurazione viene eseguita
  automaticamente e voi non dovete fare nulla. Ma talvolta dovete
  configurare (o semplicemente volete controllare la configurazione). Se
   questo il caso, dovete per prima cosa sapere qualcosa circa le due
  parti necessarie per configurare la porta seriale sotto Linux.


  La prima parte (configurazione a basso livello)  assegnare un
  indirizzo IO, un IRQ ed un nome (tipo ttyS2). Questa coppia IO-IRQ
  deve essere impostata nell'hardware e deve anche essere passata al
  driver seriale. Potremo chiamare questa parte in breve come
  configurazione di "io-irq". setserial viene usato per informare il
  driver.  I metodi PnP, i jumper, ecc, sono usati per impostare
  l'hardware. Dettagli saranno forniti successivamente. Se dovete
  configurare ma non comprendete alcuni dettagli  poi facile avere dei
  guai.

  La seconda parte (configurazione ad alto livello) consiste
  nell'assegnare una velocit (tipo 38.4K bit/secondo), selezionare il
  controllo di flusso, ecc. Questo viene spesso fatto dai programmi di
  comunicazione come PPP, minicom, o da getty (che potreste lanciare
  sulla porta cos che altri possano collegarsi attraverso di essa). In
  ogni caso dovrete dire a questi programmi quale velocit volete, ecc.,
  usando un menu od un file di configurazione.  Questa configurazione di
  alto livello pu essere fatta anche con il programma stty. stty 
  anche utile per vedere lo stato corrente se avete dei problemi.
  Vedere anche la sezione "Stty" del Serial-HOWTO.

  Quando Linux parte, viene compiuto un tentativo per rilevare e
  configurare (a basso livello) alcune porte seriali. Quello che accade
  esattamente dipende dal vostro BIOS, hardware, distribuzione di Linux,
  ecc. Se le porte seriali funzionano bene, potrebbe non esserci bisogno
  di effettuare ulteriori configurazioni. I programmi applicativi
  tendono spesso ad eseguire una configurazione di alto livello, ma
  potrebbere richiedere informazioni che voi gli dovreste fornire. Con
  le porte seriali Plug-and-Play (spesso inserite in un modem interno),
  la situazione  diventata pi complessa. Ecco i casi in cui occorre
  eseguire una configurazione a basso livello (impostare gli indirizzi
  IRQ e IO):


    Volete usare pi di due porte seriali

    Installazione di una nuova porta seriale (come nel caso di un modem
     interno)

    Avete problemi con la porta seriale(i)

  Per i kernel 2.2+ dovreste essere capaci di usare pi di due porte
  seriali senza configurare a basso livello, condividendo gi interrupt.
  La cosa funziona solo se l'hardware seriale lo supporta e potrebbe
  essere altrettanto difficile che configurare a basso livello.  Vedere
  ``Condivisione di interrupt e i Kernel 2.2+''

  La configurazione a basso livello (impostare gli indirizzi IRQ e IO)
  sembra causare pi problemi (rispetto a quella ad alto livello),
  sebbene per la maggioranza sia completamente automatica e nessuna
  configurazione si debba effettuare. Quindi la quasi totalit di questa
  sezione verte su questo argomento. A meno che il driver seriale sappia
  il corretto indirizzo IRQ e IO la porta non funzioner per niente.
  Probabilmente non sar neanche individuata da Linux. Anche se essa
  fosse trovata, potrebbe lavorare in modo estremamente lento se l'IRQ 
  sbagliato. Vedere ``Estremamente lento: il testo appare sullo schermo
  lentamente e dopo lunghi ritardi''.

  Nel mondo Wintel, l'indirizzo IO ed IRQ sono chiamati "risorse" e
  quindi siamo configurando certe risorse. Ma ci sono molti altri tipi
  di "risorse" cos che il termine potrebbe avere molti altri
  significati. Ricapitolando, la configurazione a basso livello consiste
  nell'impostare due valori (un numero di IRQ e un indirizzo IO) in due
  posti:


  1. nei registri di memoria dell'hardware della porta seriale stessa

  2. nel device driver (spesso lanciando "setserial" in fase di boot)

  Potreste dare un occhiata ai messaggi di avvio (fase di boot). Essi
  sono in genere corretti. Ma se state avendo problemi, c' una buona
  probabilit che alcuni di questi messaggi non mostrino la corretta
  configurazione dell'hardware (e d'altronde non sono deputati a farlo).
  Vedere ``Indirizzi I/O e IRQ: Messaggi in fase di boot''.


  6.3.  Errori comuni commessi nel riconfigurare a basso livello

  Ecco alcuni degli errori pi comuni che possono compiere:

    comando setserial: Viene lanciato (senza l'opzione "autoconfig") e
     si pensa che abbia controllato l'hardware (non l'ha fatto).

    messaggi di setserial: Essi vengono visualizzati sullo schermo in
     fase di boot ed erroneamente si crede che il risultato mostri come
     l'hardware sia veramente configurato.

    /proc/interrupts: Quando il loro dispositivo seriale non  in uso
     essi non vedono l i suoi interrupt ed erroneamente concludono che
     la porta seriale non pu essere trovata (o che non abbia un
     interrupt impostato).

    /proc/ioports: Si pensa che questa mostri la configurazione
     dell'hardware mentre mostra solo gli stessi dati (che possono anche
     essere errati) di setserial.


  6.4.  Indirizzi I/O e IRQ: messaggi in fase di boot

  In molti casi le vostre porte verranno automaticamente configurate a
  basso livello in fase di boot (ma non sempre correttamente). Per
  vedere cosa sta succedendo, guardate i messaggi di avvio sullo
  schermo. Non trascurate di controllare i messaggi del BIOS prima che
  Linux venga caricato (nessun esempio mostrato qui). Questi messaggi
  BIOS possono essere arrestati premendo il tasto Pause. Usate Shift-
  PagSu per scorrere i messaggi dopo che sono passati sullo schermo.
  Shift-PagGi li scorrer nel senso opposto.  Il comando dmesg potrebbe
  esser usato ogniqualvolta si voglia vedere alcuni messaggi ma spesso
  ne mancano di importanti. Ecco un esempio di messaggi in fase di boot
  (cos come nel tardo 1999). Notate che ttyS00  lo stesso di
  /dev/ttyS0.



       Per prima cosa vedete quello che  stato rilevato (ma l'irq  solo un
       ipotesi):

       Serial driver version 4.27 with no serial options enabled
       ttyS00 at 0x03f8 (irq = 4) is a 16550A
       ttyS01 at 0x02f8 (irq = 3) is a 16550A
       ttyS02 at 0x03e8 (irq = 4) is a 16550A

       Pi tardi potete vedere quello che era stato salvato, ma anche questo
       non  necessariamente corretto:

       Loading the saved-state of the serial devices...
       /dev/ttyS0 at 0x03f8 (irq = 4) is a 16550A
       /dev/ttyS1 at 0x02f8 (irq = 3) is a 16550A
       /dev/ttyS2 at 0x03e8 (irq = 5) is a 16550A


  Notate che qui vi  un leggero disallineamento: il primo messaggio
  mostra ttyS2 a irq=4 mentre il secondo lo mostra a irq=5. Potreste
  anche avere solo il primo messaggio.  In molti casi l'ultimo messaggio
   quello corretto.  Ma se state avendo problemi il messaggio potrebbe
  fuorviarvi. Prima di leggere la spiegazione di tutta questa
  complessit nel resto di questa sezione, potreste semplicemente
  provare ad usare la vostra porta seriale e vedere se tutto va bene. Se
   il caso, potrebbe non essere essenziale leggere oltre.

  Il secondo messaggio deriva dal programma setserial che viene lanciato
  in fase di boot. Mostra quella che il device driver pensa sia la
  corretta configurazione. Ma questo potrebbe essere sbagliato. Ad
  esempio l'irq potrabbe essere in realt impostato a irq=8
  nell'hardware (entrambi i messaggi sono sbagliati). irq=5 potrebbere
  esistere  perch qualcuno ha incorrettamente impostato questo valore
  nel file di configurazione (o simile).  Il fatto che Linux talvolta
  prenda degli IRQ sbagliati dipende dal fatto che non verifica gli IRQ.
  Semplicemente assume quelli "standard" (primo messaggio) o accetta
  quello che gli si dice quando viene configurato (secondo messaggio).
  Nessuno di questi  necessariamente corretto. Se il driver seriale ha
  l'IRQ sbagliato, la porta seriale  molto lenta o non funziona per
  niente.

  Il primo messaggio  il risultato di Linux che verifica le porte
  seriali ma non verifica gli IRQ.  Se una porta viene mostrata in
  questa fase essa esiste ma il suo irq potrebbe essere sbagliato. Linux
  non controlla gli IRQ perch il farlo non  a prova di errore. Esso
  assume che gli IRQ sono come mostrato perch questi sono i valori
  "standard". Potreste controllare manualmente con setserial usando le
  opzioni autoconfig e auto_irq  ma non si garantisce che sia esatto.

  I dati mostrati nei messaggi del BIOS (che vedete per primi)  quello
  che  impostato nell'hardware. Se la porta seriale  Plug-and-Play PnP
  allora  possibile che isapnp venga lanciato e modifichi queste
  impostazioni.  Cercate dei messaggi in questo senso dopo che Linux 
  partito. L'ultimo messaggio relativo alla porta seriale mostrato
  nell'esempio di cui sopra dovrebbe coincidere con i messaggi del BIOS
  (che  possibile siano stati modificati da isapnp). Se sono diversi
  allora dovreste aver bisogno di cambiare le impostazioni nell'hardware
  della porta od usare setserial per dire al driver quello che 
  attualmente impostato nell'hardware.

  Inoltre, se avete porte seriali Plug-and-Play (PnP), Linux non le
  trover a meno che l'IRQ e l'IO siano stati impostati all'interno
  dell'hardware dal software PnP. Questa  una comune ragione per la
  quale i messaggi di avvio non mostrano una porta seriale che
  fisicamente esiste. L'harware del PC (un BIOS PnP) potrebbe
  automaticamente configurare a basso livello questo. La configurazione
  PnP sar spiegata pi avanti.


  6.5.  Quali sono l'indirizzo IO e l'IRQ correnti della mia porta seri
  ale?

  La sezione precedente indica come tentare di fare questo guardando i
  messaggi di avvio.  Se essi vi forniscono sufficienti informazioni,
  allra potreste anche saltare la lettura di questa sezione.  Se no
  allora ci sono alcuni altri modi per scoprirli.

  Ci sono davvero due risposte alla domanda "Quali sono i miei IRQ e
  IO?" 1. Quello che il device driver pensa che sia impostato (questo 
  quello che setserial in genere imposta e mostra). 2. Quello che in
  realt  impostato nell'hardware. Potrebbe essere gli stessi. Se non
  losono avrete problemi visto che il driver ha informazioni sbagliate
  circa la porta seriale fisica.  Se il driver ha l'IO sbagliato tenter
  di inviare dati ad una porta seriale inesistente o, ancora peggio, ad
  un dispositivo esistente che non  una porta seriale. Se ha l'IRQ
  sbagliato il driver non ricever le richieste di interrupt dalla porta
  seriale, causando una risposta molto lenta o mancante. Vedere
  ``Estremamente lento: il testo appare sullo schermo lentamente e dopo
  lunghi ritardi''.  Se ha il tipo sbagliato di UART potrebbero esserci
  problemi. Per determinare se entrambe le coppie di IRQ-IO sono
  identiche dovreste scoprire come sono impostati sia nel driver che
  nell'hardware.


  6.5.1.  Cosa pensa il device driver?

  Questo  facile da scoprire. Basta guardare ai messaggi di avvio o
  digitare "setserial -g /dev/ttyS*". Se tutto  a posto, allora quello
  che vedrete sar impostato anche nell'hardware. Ci sono alcuni
  ulteriori modi di trovare queste informazioni guardando dei "file"
  nella directory /proc. Una ragione importante per comprendere questi
  ulteriori modi  per avvisarvi che essi mostrano solo quello che il
  device driver pensa che sia. Alcuni vedono certi "file" nella
  directory /proc ed erroneamente pensano che quello che vedono sia
  quello che  impostato nell'hardware ma non  necessariamente cos.

  /proc/ioports mostrer gli indirizzi di IO che i driver stanno usando.
  /proc/interrupts mostra gli IRQ che sono stati usati dai driver dei
  processi attualmente in esecuzione (che hanno dispositivi aperti).
  Notate che in entrambi i casi di cui sopra potete solo vedere quello
  il driver pensa che sia e non necessariamente quello che  veramente
  impostato nell'hardware. /proc/interrupts mostra anche quanti
  interrupt sono stati invocati (spesso migliaia) per ogni dispositivo).
  Potete ricavare un indizio da questo perch se vedete un gran numero
  di interrupt invocati significa che c' un qualche hardware da qualche
  parte che sta usando quell'interrupt. Talvolta il vedere solo pochi
  interrupt non significa che quell'interrupt sia stato fisicamente
  generato da una qualche porta seriale.  Quindi se non vedete quasi
  interrupt per una porta che state cercando di usare, quell'interrupt
  potrebbe non essere stato impostato dall'hardware ad questo implica
  che il driver sta usando l'interrupt sbagliato. Per vedere
  /proc/interrupt per controllare su di un programma che state
  attualmente eseguendo (tipo "minicom") dovete mantenere il programma
  in esecuzione mentre controllate. Per fare questo cercate di saltare
  in una shell senza uscire dal programma.


  6.5.2.  Cos' impostato nell'hardware della mia porta seriale?

  Come scoprire quali indirizzi IO e IRQ sono realmente impostati nel
  dispositivo hardware? Forse i messaggi del BIOS vi danno alcune
  informazioni prima che Linux inizi il caricamento. Usate il tasto
  shift-PagSu per risalire attraverso i messaggi di avvio e cercate i
  primissimi che provengono dal BIOS. Questa era la situazione prima che
  Linux partisse. Setserial non pu modificarla ma isapnp o pciutils s.

  Un metodo brutale  cercare la rilevazione con setserial usando
  l'opzione "autoconfig".  Avrete bisogno di indovinare gli indirizzi
  per poterli poi verificare. Vedere ``Cos' setserial''. Per una porta
  seriale PCI, usate il comando "lspci" (per i kernel <2.2 guardate in
  /proc/pci). Se la vostra porta seriale  Plug-and-Play leggete le
  successive due sottosezioni.

  Per una porta impostata tramite jumper, ecco come essi sono impostati.
  Se la porta non  Plug-and-Play (PnP) ma  stata impostata usando un
  programma DOS, allora  impostata secondo quanto deciso da chi ha
  lanciato quel programma.



  6.5.3.  Cosa  impostato nell'hardware della mia porta seriale?

  Le porte PnP non mantengono la loro configurazione nell'hardware
  quando viene spento il PC. Questo  in contrasto con i jumper (non-
  PnP) che restano immutati anche quando si spegne la corrente. Se avete
  una porta ISA PnP, potrebbe raggiungere lo stato nella quale non abbia
  alcun indirizzo IRQ e IO e sia effettivamente disabilitata. Dovrebbe
  essere ancora possibile trovare la porta usando il programma pnpdump.

  Per il Plug-and-Play (PnP) sul bus ISA si potrebbe tentare con il
  programma pnpdump (che  parte di isapnptools). Se usate l'opzione
  --dumpregs dovrebbe informarvi circa gli effettivi indirizzi IO e IRQ
  impostati nella porta.

  Riguardo alle porte PnP controllarne la configurazione sotto
  DOS/Windows potrebbe non essere di molto aiuto. Windows mantiene le
  sue informazioni di configurazione nel suo Registro che non viene
  usato da Linux. Potrebbe fornire la memoria non volatile del BIOS di
  alcune informazioni ma potrebbe non essere in sicrono con quelle della
  configurazione corrente di Windows nel Registro ??. Se lasciate che un
  BIOS PnP faccia una configurazione automatica quando lanciate Linux
  (ed avete detto al BIOS che non avete un sistema operativo PnP quando
  fate partire Linux), allora Linux dovrebbe usare una qualsivoglia
  configurazione si trovi nella memoria non volatile del BIOS.


  6.6.  Scegliere gli IRQ seriali

  Se avete un vero Plug-and-Play impostato dove sia il sistema operativo
  che il BIOS PnP configurano tutti i vostri dispositivi, non
  sceglierete i vostri IRQ.  PnP determina quello che pensa sia meglio e
  li assegna. Ma se usate gli strumenti di Linux per il Plug-and-Play
  (isapnp e pcitools) allora dovete essere voi a sceglierli. Se gi
  conoscete quale IRQ volete usate potete saltare questa sezione a meno
  che non vogliate sapere che l'IRQ O ha un uso speciale (vedere il
  paragrafo seguente).


  6.6.1.  L'IRQ 0 non  un IRQ

  Sebbene IRQ 0 sia in realt il timer (nell'hardware), esso ha uno
  speciale significato nell'impostare una porta seriale con setserial.
  Esso dice al driver che non c' un interrupt per quella porta ed il
  driver allora user metodi di polling.  piuttosto inefficiente ma pu
  essere tentato se c' un conflitto di interrupt o degli interrupt sono
  male impostati. Il vantaggio di assegnarlo  che non avete bisogno di
  sapere quale interrupt  impostato nell'hardware. Dovrebbe essere
  usato solo come espediente temporaneo fino a che non siate in grado di
  trovare un vero interrupt da usare.


  6.6.2.  Condivisione di interrupt e i Kernel 2.2+

  La regola generale  che ogni dispositivo dovrebbe usare un IRQ unico
  e non condividerlo.  Ma ci sono situazioni dove la condivisione 
  permessa come nella maggior parte delle schede multi-porta. Anche
  quando  permesso, potrebbe essere non molto efficiente visto che ogni
  volta che viene invocato un interrupt condiviso, occorre effettuare un
  controllo per determinare da dove proviene. Sebbene quindi sia
  possibile,  meglio attribuire ad ogni dispositivo il proprio
  interrupt.

  Per i kernel precedenti il 2.2, gli IRQ seriali potevano essere
  condivisi tra di loro solo per la maggioranza delle schede multiporta.
  A partire dal kernel 2.2 gli IRQ seriali possono talvolta essere
  condivisi tra tutte le porte seriali. Per far s che la condivisione
  funzioni nel kernel 2.2 esso deve essere compilato con
  CONFIG_SERIAL_SHARE_IRQ e l'hardware della porta seriale deve
  supportare la condivisione (cos che se due seriali mettono due
  diversi voltaggi nello stesso cavo di interrupt, solo il voltaggio che
  significa "questo  un interrupt" prevarr). Quindi anche se avete il
  2.2,  meglio evitare la condivisione.


  6.6.3.  Quale IRQ scegliere?

  L'hardware seriale spesso ha solamente un numero limitato di IRQ che
  possono essere impostati. Inoltre voi non volete dei conflitti di IRQ.
  Cos non  che ci sia molta scelta. Il vostro PC di norma dovrebbe
  avere impostato ttyS0 e ttyS2 all'IRQ 4 e ttyS1 e ttyS3 all'IRQ 3.
  /proc/interrupts mostrer quali IRQ sono usati da programmi
  attualmente in esecuzione.  meglio non usare uno di questi. Prima che
  l'IRQ 5 venisse usato per le schede audio, era spesso usato per una
  porta seriale.

  Ecco come Greg (l'autore originale di Serial-HOWTO) ha impostato i
  suoi in /etc/rc.d/rc.serial. rc.serial  un file (uno script di shell)
  che viene lanciato in avvio (potrebbe avere un percorso diverso). Per
  versioni di "setserial" superiori a 2.15 non  pi fatto in questo
  modo, ma questo esempio mostra la scelta di IRQ.



        /sbin/setserial /dev/ttyS0 irq 3       # il mio mouse seriale
        /sbin/setserial /dev/ttyS1 irq 4       # il terminale dumb Wyse
        /sbin/setserial /dev/ttyS2 irq 5       # il mio modem Zoom
        /sbin/setserial /dev/ttyS3 irq 9       # il mio modem USR






  Assegnazioni di IRQ standard:

          IRQ  0    Timer channel 0 (Potrebbe significare "no interrupt".
                    Vedi sotto)
          IRQ  1    Tastiera
          IRQ  2    Cascade per il controller 2
          IRQ  3    porta seriale 2
          IRQ  4    porta seriale 1
          IRQ  5    porta parallela 2, scheda audio
          IRQ  6    Floppy
          IRQ  7    porta parallela 1
          IRQ  8    Real-time clock
          IRQ  9    Rediretto a IRQ2
          IRQ 10    non assegnato
          IRQ 11    non assegnato
          IRQ 12    non assegnato
          IRQ 13    coprocessore matematico
          IRQ 14    controller 1 di dischi fissi
          IRQ 15    controller 2 di dischi fissi





  Non esiste la "Cosa Giusta" da fare quando si scelgono gli interrupt.
  Semplicemente assicuratevi che esso non sia usato dalla scheda madre,
  o da qualsiasi altra scheda.  2, 3, 4, 5, 7, 10, 11, 12 o 15 sono
  scelte possibili. Notate che IRQ 2  la stessa cosa di IRQ 9. Potete
  invocare sia 2 che 9, il driver seriale  molto comprensivo. Se avete
  una scheda seriale molto vecchia potrebbe essere incapace di usare gli
  IRQ 8 e superiori.

  Accertatevi di non usare gli IRQ 1, 6, 8, 13 o 14!. Questi sono usati
  dalla vostra scheda madre. La farete molto scontenta se gli "rubate" i
  suoi IRQ.  Quando avete finito, ricontrollate /proc/interrupts mentre
  i programmi che usano gli interrupt sono in esecuzione ed assicuratevi
  che non vi siano conflitti.


  6.7.  Scegliere gli indirizzi -- Conflitti della scheda video con
  ttyS3

  L'indirizzo IO delle schede video IBM 8514 (ed altre simili)  0x?2e8
  dove ?  2, 4, 8 o 9. Questo pu causare conflitto (ma non dovrebbe se
  la porta seriale  ben concepita) con l'indirizzo IO di ttyS3 in
  0x02e8 se la porta seriale ignora lo 0 esadecimale iniziale (molte lo
  fanno). Queste sono cattive notizie se tentate di usare ttys3 a
  quell'indirizzo di IO.

  Nella maggioranza dei casi dovreste usare l'indirizzo predefinito se
  possibile.  Gli indirizzi mostrati rappresentano il primo indirizzo in
  un intervallo di 8 byte. Ad esempio 3f8 comprende in realt 3f8-3ff.
  Ogni dispositivo seriale (cos come altri tipi di dispositivi che
  usano indirizzi IO) abbisogna del proprio univoco intervallo di
  indirizzi.  Non dovrebbero esserci confilitti. Ecco gli indirizzi
  predefiniti per le porte seriali:



        ttyS0 indirizzo 0x3f8
        ttyS1 indirizzo 0x2f8
        ttyS2 indirizzo 0x3e8
        ttyS3 indirizzo 0x2e8






  6.8.  Impostare gli indirizzi IO e IRQ nell'hardware (per lo pi per
  PnP)

  Dopo che  impostato nell'hardware non dimenticate di assicurarvi che
  sia anche impostato nel driver usando setserial. Per porte seriali
  non-PnP essi sono impostati sia nell'hardware da jumper o facendo
  girare un programma DOS ("senza jumper") per impostarli (questo
  potrebbe disabilitare PnP). Il resto di questa sottosezione riguarda
  solo le porte seriali PnP. Ecco una lista dei possibili metodi per
  configurare una porta seriale:


    Usando un men di impostazioni CMOS per un BIOS PnP (in genere solo
     per i modem esterni su ttyS0 (Com1) e ttyS1 (Com2))

    Lasciando che un BIOS PnP configuri automaticamente una porta
     seriale PnP Vedere ``Usare un BIOS PnP per configurare I0-IRQ''

    Non facendo nulla se avete sia una porta seriale PnP ed un sistema
     operativo Linux PnP (vedere Plug-and-Play-HOWTO).

    Usando isapnp per una porta seriale PnP non-PCI

    Usando pciutils (pcitools) per il bus PCI


  Gli indirizzi di IO e IRQ devono essere impostati (da PnP) nei propri
  registri ogni volta che il sistema viene acceso visto che l'hardware
  PnP non tiene memoria di cosa era stato impostato prima che venisse
  spento il PC. Un semplice modo di fare questo  lasciare che il BIOS
  PnP sappia che voi non avete un sistema operativo PnP ed il BIOS
  automaticamente lo far ogni volta che si fa partire. Questo potrebbe
  causare problemi sotto Windows (che  un sistema operativo PnP) se voi
  lanciate Windows mentre il BIOS pensa che Windows non sia un sistema
  operativo PnP. Vedere il Plug-and-Play HOWTO.

  Il Plug-and-Play era concepito per automatizzare la configurazione io-
  irq, ma per Linux, allo stato attuale, ha reso la vita pi complicata,
  I kernel standard per Linux non supportano il plug-and-play molto
  bene. Se usate una patch al kernel di Linux per convertirlo a sistema
  operativo plug-and-play, allora tutto quanto di cui sopra dovrebbe
  essere gestito dal sistema operativo automaticamente. Ma quando volete
  usare questo per automatizzare la configurazione di dispositivi
  diversi dalla porta seriale, potreste scoprire che dovete comunque
  configurare i driver manualmente visto che molti driver Linux non sono
  scritti per supportare un sistema operativo Linux PnP. Se usate
  isapnptools od il BIOS per configurare plug-and-play questi metteranno
  semplicemente i due valori nei registri della sezione della porta
  seriale della scheda del modem e probabilmente dovrete comunque
  impostare setserial. Nulla di tutto questo  facile o  molto ben
  documentato all'inizio del '99. Vedere il Plug-and-Play-HOWTO e la FAQ
  di isapnptools.


  6.8.1.  Usare un BIOS PnP per configurare IO e IRQ

  Mentre la spiegazione su come usare un sistema operativo PnP o isapnp
  per configurare l'io-irq dovrebbe essere di corredo al relativo
  software, questo non  il caso se volete lasciare al BIOS PnP
  l'esecuzione di questa configurazione. Non tutti i BIOS PnP possono
  farlo. Il BIOS ha in genere un men CMOS per impostare le prime due
  porte seriali.  Questo men potrebbe essere difficile da trovare e per
  un BIOS "Award" si trova sotto "chipset feautures setup".  C' spesso
  ben poco tra cui scegliere. A meno di indicazioni diverse nei men,
  queste prime due porte vengono impostate agli indirizzi IO e IRQ
  standard.  Vedere ``Nomi e numeri dei dispositivi di porte seriali''.

  Che vi piaccia o no, quando accendete un PC, un BIOS PnP inizia ad
  eseguire la configurazione PnP (io-irq) dei dispositivi hardware.
  Potrebbe eseguire il lavoro parzialmente e lasciare il resto al
  sistema operativo PnP (che voi probabilmente non avete) o, se pensa
  che voi non abbiate il sistema operativo PnP, potrebbe configurare
  tutti i dispositivi PnP ma non configurare i device driver. Questo 
  quello che volete ma non  sempre facile scoprire cosa ha fatto
  esattamente il BIOS PnP.

  Se dite al BIOS che non avete un sistema operativo PnP, allora il BIOS
  PnP dovrebbe configurare tutte le porte seriali PnP, non solo le prime
  due. Un modo indiretto per controllare quello che fa il BIOS (se avete
  Windows 9x sullo stesso PC)  "forzare" una configurazione sotto
  Windows. Vedere il Plug-and-Play-HOWTO e cercare "forced".   pi
  facile usare il men CMOS BIOS che potrebbe ignorare quello che avete
  "forzato" sotto Windows. Potrebbe esserci un'opzione nel BIOS che pu
  impostare o disabilitare questa capacit di ignorare.

  Se aggiungete un nuovo dispositivo PnP, il BIOS dovrebbe cambiare la
  sua configurazione PnP per accoglierlo. Potrebbe anche cambiare gli
  io-irq di dispositivi esistenti, se necessario, per evitare qualsiasi
  conflitto. A questo scopo, tiene una lista dei dispositivi non PnP a
  patto che abbiate detto al BIOS che questo dispositivi non PnP sono
  configurati con io-irq. Un modo di dire questo al BIOS consiste nel
  lanciare un programma sotto DOS/Windows chiamato ICU.
  Ma come scoprire cosa ha fatto il BIOS cos che possiate impostare i
  device driver con queste informazioni? Il BIOS stesso pu fornire
  alcune informazioni, sia nei suoi men di setup o tramite messaggi
  sullo schermo quando accendete il computer. Vedere ``Cos' impostato
  nell'hardware della mia porta seriale ? ''

  6.9.  Passare gli indirizzi IRQ e IO a setserial

  Una volta che avete impostato gli indirizzi IO e IRQ nell'hardware (o
  fatto in modo che questo venga fatto dal PnP) avete bisogno anche di
  assicurarvi che il comando "setserial" venga lanciato ogni volta che
  viene lanciato Linux. Vedere la sottosezione ``Configurazione in fase
  di avvio''




  6.10.  Altre configurazioni

  6.10.1.  Configurare il flusso di controllo hardware (RTS/CTS)

  Vedere ``Controllo di flusso'' per una spiegazione. Si dovrebbe sempre
  usare il controllo di flusso hardware (ad eccezione di modem obsoleti
  che non l'hanno). Il vostro programma di comunicazione o "getty"
  dovrebbe avere una opzione per impostarlo (e se siete fortunati
  potrebbe gi essere stato abilitato per default). Occorre che sia
  impostato sia all'interno del modem (tramite la stringa di
  inizializzazione o per default) che nel device driver. Il vostro
  programma di comunicazione dovrebbe mettere a posto entrambi (se lo
  configurate correttamente).

  Se nessuna delle manovre sopradescritte consente l'attivazione del
  controllo di flusso hardware, dovete provvedere voi. Per il modem
  assicuratevi che esso sia impostato tramite stringa di
  inizializzazione o per default. Se dovete dire al device driver di
  farlo  meglio agire alla partenza mettendo un un file che viene
  lanciato in fase di avvio. Vedere la sottosezione ``Configurazione in
  fase di avvio''.  Dovete anche aggiungere quanto segue a tale file per
  ogni porta seriale (l'esempio  ttyS2) per la quale volete abilitare
  il flusso di controllo hardware:




       stty crtscts < /dev/ttyS2





  Se volete vedere se il controllo di flusso  abilitato eseguite quanto
  segue: in minicom (o simile) digitate AT&V per vedere come 
  configurato il modem e cercate &K3 che vuol dire controllo di flusso
  hardware. Poi controllate se il device driver lo rileva digitando stty
  -a < /dev/ttyS2.  Cercate "crtscts" (senza il segno meno che lo
  disabilita).


  7.  Configurazione del modem (esclusa la porta seriale)

  7.1.  Trovare il vostro modem

  Prima di usare molto tempo per configurare il vostro modem, dovete
  assicurarvi che esso possa essere trovato e che i comandi AT o simili
  possano essere ad esso inviati. Quindi suggerisco che voi prima
  eseguiate una semplice configurazione usando il programma di
  comunicazione che userete sulla porta per vedere se funziona. In caso
  affermativo, il modem  stato trovato. Altrimenti vedere ``Il modem 
  fisicamente presente ma non pu essere rilevato''.  Un winmodem
  potrebbe essere difficile da rilevare e non funzioner sotto Linux


  7.2.  Comandi AT

  Cos come per la porta seriale nella quale risiede un modem, anche il
  modem stesso richiede di essere configurato. Il modem si configura
  inviandogli dei comandi AT (o simili) sulla stessa linea seriale usata
  per inviare dati.  Essi sono brevi e criptici comandi ASCII, tutte le
  stringhe di comando sono prefissate dalle lettere AT. Ad esempio:
  ATZ&K3. Qui ci sono due comandi: Z e &K3.  Sfortunatamente ci sono
  molte diverse variazioni nel gruppo di comandi AT, cos che quello che
  funziona per un modem potrebbe non funzionare per un altro. Quindi non
  vi  garanzia che i comandi AT dati in questa sezione funzioneranno
  per tutti i modem.  Altro punto  che per far s che il modem reagisca
  alla stringa di comando AT, deve essere inviato un carattere di
  ritorno a capo alla fine della stringa.

  Dette stringhe di comando vengono automaticamente inviate al modem dai
  programmi di comunicazione o sono inviate direttamente da voi. La
  maggior parte dei programmi di comunicazione forniscono una schermata
  nella quale potete digitare i comandi direttamente al vostro modem.
  Questo  comodo per impostare il modem com' prima di spegnerlo senza
  dover ricordare ogni volta come lo si era impostato.

  Se avete un manuale per il vostro modem potrete probabilmente dare una
  scorsa al gruppo di comandi AT ivi indicati. Altrimenti potrete
  cercate di trovarli su Internet.  Potreste usare un motore di ricerca
  ed includere alcuni reali comandi nella stringa di ricerca per evitare
  di cercare siti che parlano semplicemente di questi comandi ma dei
  quali non offrono una lista. Potreste anche provare alcuni dei siti
  riportati nella sottosezione ``Siti Web''



  7.3.  Stringhe di inizializzazione: salvarle e richiamarle

  Gli esempi dati in questa sottosezione sono tratti dal gruppo di
  comandi AT Hayes.  Tutte le stringhe di comando devono essere
  prefissate dalle due lettere AT (ad esempio: AT&C1&D3). Quando un
  modem viene acceso, si autoconfigura automaticamente con una delle
  configurazioni che ha salvate nella sua memoria non volatile. Se la
  configurazione  soddisfacente, non c' altro da fare.

  Se non risulta soddisfacente, si potrebbe sia alterare la
  configurazione memorizzata o configurare il modem ogniqualvolta venga
  usato inviandogli un stringa di comandi nota come "init string"
  (stringa di inizializzazione). Generalmente un programma di
  comunicazione fa questo.  Quello che invia dipende da come avete
  configurato il programma di comunicazione o quale script avete scritto
  per esso se usate Kermit. Potete in genere modificare la init string
  che il vostro programma di comunicazione usa e cambiarla come vi pare.
  Talvolta il programma di comunicazione vi consente di selezionare il
  modello del vostro modem, quindi user una init string che pensa sia
  la pi adatta per quel modem.

  La configurazione che il modem usa quando viene acceso per la prima
  volta potrebbe essere rappresentata da una init string. Potreste
  pensare a questa come una stringa di default (chiamata profilo). Se il
  vostro programma di comunicazione invia al modem un'altra stringa
  (l'init string), allora questa stringa modificher la configurazione
  predefinita. Ad esempio se la init string contiene solo due comandi,
  allora solo queste due voci verranno cambiate.  Comunque, alcuni
  comandi richiamano un profilo memorizzato all'interno del modem cos
  che un singolo comando di questo tipo nella init string pu di
  conseguenza cambiare tutta quanta la configurazione.

  I modem moderni hanno alcuni profili diversi memorizzati tra i quali
  scegliere che si trovano nella memoria non-volatile (rimangono l
  anche quando spegnete il modem). Nel mio modem ci sono due profili
  impostati dalla ditta costruttrice (0 ed 1, nessuno dei quali pu
  essere cambiato) e due profili definiti dall'utente (0 ed 1) che
  l'utente pu impostare e memorizzare.  Il vostro modem potrebbe averne
  di pi. Quale di questi profili definiti dall'utente venga usato
  all'accensione depende da un altro valore memorizzato nel profilo. Se
  viene impartito il comando &Y0 allora verr usato il profilo 0 alla
  prossima accensione. Se invece troviamo un 1 invece che uno 0 allora
  il profilo 1 sar usato all'accensione.

  Ci sono anche comandi per richiamare (riusare) ciascuno dei 4 profili
  memorizzati.  Uno potrebbe mettere un comando di questo tipo nella
  init string. Naturalmente se verr richiamato lo stesso profilo cos
  come  stato automaticamente caricato all'accensione, non cambia nulla
  a meno che il profilo attivo sia stato modificato dopo l'accensione.
  Visto che potrebbe essere stato modificato,  una buona idea usare una
  specie di init string anche se non fa null'altro che richiamare un
  profilo memorizzato.

  Per richiamare un profilo salvato (usate 1 invece che 0 per il profilo
  1):
  Z0 recupera il profilo utente 0 e reimposta il modem (riappende, ecc.)
  &F0 recupera il profilo impostato dalla ditta costruttrice 0

  Una volta inviati i comandi al modem per configurarlo nel modo che
  volete (incluso richiamare il profilo della casa costruttrice per poi
  modificarlo un poco), potreste volere salvare questo come profilo
  definito dall'utente:
  &W0 salva la configurazione corrente nel profilo utente

  La maggior parte della gente non si preoccupa di salvare una buona
  configurazione nei propri modem ma, invece, inviano al modem una
  stringa pi lunga ogni volta che il modem viene usato. Un altro metodo
  consiste nel riprisitinare la configurazione di default della casa
  costruttrice all'inizio della stringa di inizializzazione, quindi
  modificarla leggermente aggiungendo qualche altro comando alla fine
  della init string. Agendo in questo modo, non c' pericolo di
  modificare il profilo definito dall'utente che viene caricato
  all'accensione

  Si pu anche scegliere una stringa di inizializzazione fornita da
  qualcun altro che sostenga che sia buona per il vostro modem ecc.
  Alcuni programmi di comunicazione hanno una libreria di stringhe di
  inizializzazione dalla quale scegliere. Il metodo pi difficile (e
  quello che vi insegner di pi riguardo ai modem)  studiare il
  manuale del modem e scrivere una stringa da soli.  Potrete poi salvare
  questa configurazione all'interno del modem cos che una stringa di
  inizializzazione non sar necessaria.  Una terza alternativa 
  iniziare con una stringa di inizializzazione che qualcun altro ha
  scritto, poi modificarla per adattarla alle vostre esigenze.

  Ora se guardate le init string usate dai programmi di comunicazione
  potreste vedere simboli che non sono comandi modem validi. Questi
  simboli sono comandi al programma di comunicazione stesso (tipo ~ che
  significa effettuare una breve pausa) e non sono inviati al modem





  7.4.  Altri comandi modem

  Una prossima edizione di questo HOWTO potrebbe contenere anche
  qualcosa di pi su questo ma il resto di questa sezione  per la
  maggior parte quello che si trova nel vecchio Serial-HOWTO. Tutte le
  stringhe devono iniziare con AT. Ecco alcuni codici AT Heyes che
  dovrebbero essere nella stringa (se non sono stati impostati usando le
  impostazioni predefinite del costruttore o da una configurazione
  salvata)



       E1       eco comandi ON
       Q0       riporta i codici di risposta
       V1       verbose ON
       S0=0     non rispondere mai (uugetty fa questo con l'opzione WAITFOR)




  Ecco alcuni altri codici riguardanti il controllo delle linee DCD e
  DSR del modem:


       &C1 DCD attivato solo dopo la connessione
       &S0 DSR sempre attivato




  Questi riguardano quello che fa il vostro modem quando inizia o
  finisce una comunicazione. Si potrebbe impostare anche quallo che fa
  DTR ma  pi complicato.


  Se il vostro modem non supporta un profilo salvato, lo potete
  impostare attraverso una stringa INIT in un file di configurazione (o
  simile).  Alcuni vecchi modem hanno degli interruttori DIP che variano
  le impostazioni dei registri. Assicuratevi che siano impostati
  anch'essi correttamente.


  Greg Hankins ha una libreria di impostazioni modem per diversi tipi.
  Se volete inviargli la vostra configurazione di lavoro fatelo a:
  <mailto:greg@cc.gatech.edu>. Potete recuperare queste impostazioni a
  ftp://ftp.cc.gatech.edu/pub/people/gregh/modem-configs.


  Note: perch il suo USR Courier V.34 si reinizializzi correttamente
  dopo che cade DTR, Greg Hankins ha dovuto impostare &D2 and S13=1
  (questo imposta il bit 0 del registro S13).  confermato che la cosa
  vale anche per gli USR Sportster V.34.


  Nota: alcuni Supra trattano DCD in modo diverso rispetto agli altri
  modem.  Se state usando un Supra, provate ad impostare &C0 e not &C1.
  Dovrete anche impostare &D2 per gestire DTR correttamente



  8.  Dispositivi di porta seriale /dev/ttyS2, ecc.

  Per creare dispositivi nella directory dei dispositivi vedere il
  Serial-HOWTO: "Creating Devices In the /dev directory".


  8.1.  Nomi e numeri dei dispositivi di porta seriali

  I dispositivi in Linux hanno numeri primari e secondari. Ogni porta
  seriale pu avere due possibili nomi, nella directory /dev: ttyS e
  cua. I loro driver si comportano in modo leggermente differente. Il
  dispositivo cua  disapprovato e potrebbe non essere pi usato in
  futuro. Vedere ``Il device cua''.


  Dos/Windows usano il nome COM mentre il programma setserial usa tty00,
  tty01 ecc. Non confondete questi con dev/tty0, /dev/tty1, ecc.  che
  sono usati per le console (il monitor del vostro PC) ma non sono porte
  seriali.  La tavola seguente  per il caso "standard" (ma il vostro
  potrebbe essere diverso"



                                                       indirizzo
       dos             prim. sec.          prim. sec.     IO
       COM1  /dev/ttyS0  4,  64;  /dev/cua0  5,  64      3F8
       COM2  /dev/ttyS1  4,  65;  /dev/cua1  5,  65      2F8
       COM3  /dev/ttyS2  4,  66;  /dev/cua2  5,  66      3E8
       COM4  /dev/ttyS3  4,  67;  /dev/cua3  5,  67      2E8




  Notate che tutte le distribuzioni dovrebbero avere dei dispositivi
  ttyS (e molte distribuzioni hanno anche l'obsoleto cua ). Potreste
  verificarlo digitando (non preoccupatevi se non trovate alcun obsoleto
  dispositivo cua):



       linux% ls -l /dev/cua*
       linux% ls -l /dev/ttyS*





  8.2.  Collegare con link ttySN a /dev/modem ?

  In alcune installazioni, saranno creati due dispositivi extra,
  /dev/modem per il vostro modem e /dev/mouse per il vostro mouse.
  Entrambi sono dei link simbolici agli appropriati dispositivi in /dev
  che avete specificato durante l'installazione (a meno che non abbiate
  un bus mouse, allora /dev/mouse punter al dispositivo del bus mouse).

  Ci sono state alcune discussioni riguardo a /dev/mouse  e /dev/modem.
  L'uso di questi link  sconsigliato. In particolare, se state pensando
  di usare il vostro modem per ricevere chiamate potreste avere problemi
  perch i file di lock potrebbero non funzionare correttamente se usate
  /dev/modem. Comunque, se cambiate o eliminate questi link, alcune
  applicazioni potrebbero necessitare di una riconfigurazione.



  8.3.  Il dispositivo cua

  Ad ogni dispositivo ttyS corrisponde un dispositivo cua. Ma il
  dispositivo cua  disapprovato, cos  meglio usare ttyS (a meno che
  cua sia richiesto).  C' differenza tra cua e ttyS ma un programmatore
  previdente pu fare s che una porta ttyS si comporti esattamente come
  una porta cua, cos non c' pi realmente bisogno di cua. A meno che
  alcuni vecchi programmi non richiedano l'uso di cua.
  Qual' la differenza? La differenza principale tra cua e ttyS si
  riferisce a quanto succede in un programma C quando un normale comando
  "open" cerca di aprire la porta. Se una porta cua  stata impostata
  per controllare i segnali di controllo del modem, la porta potrebbe
  essere aperta anche se il segnale di controllo DCD del modem dice che
  non  vero. Una astuta programmazione (aggiungendo lineee addizionali
  al programma) pu forzare una porta ttyS a comportarsi anch'essa in
  questo modo. Ma una porta cua pu essere ancora pi facilmente
  programmata per aprirsi per comporre una chiamata in uscita anche
  quando il modem non riesce ad identificare DCD (visto che nessuno ci
  ha chiamato e non c' portante). Ecco perch cua era una volta usata
  per chiamate in uscita e ttyS era usata per chiamate in entrata.

  A partire dal kernel 2.2, un messaggio di avvertimento verr immesso
  nel log del kernel quando si usa cua. Questo  il presagio che cua fra
  un poco sparir.


  9.  Degli interessanti programmi di cui dovreste essere a conoscenza

  9.1.  Cos' setserial ?

  Questa parte si trova in 3 HOWTO: Modem, Serial e Text-Terminal. Ci
  sono lievi differenze, in relatizione a quale HOWTO appaiono.


  9.1.1.  Introduzione

  Non usate mai setserial con i Laptop (PCMCIA).  setserial  un
  programma che vi permette di comunicare al software del device driver
  l'indirizzio IO della porta seriale, quale interrupt (IRQ)  impostato
  nell'hardware della porta quale tipo di UART avete, ecc. Pu anche
  mostrare come il driver sia attualmente impostato. In pi pu rilevare
  l'hardware per cercare di determinare il tipo di UART e l'IRQ. Ma ci
  sono seri limiti. Vedere ``Probing''. Notate che non si possono
  impostare l'IRQ, ecc. nell'hardware delle porte seriali PnP.

  Se avete solo una o due porte seriali, generalmente esse si
  imposteranno correttamente senza usare setserial. Altrimenti (o se ci
  sono problemi con la porta seriale) dovrete probabilmente avere a che
  fare con setserial. A parte la pagina di manuale di setserial, leggete
  anche le informazioni in /usr/doc/setserial.../ o
  /usr/share/doc/setserial.  Dovrebbero dirvi come setserial sia gestito
  nella vostra distribuzione di Linux.

  Setserial  spesso lanciato automaticamente in fase di avvio da uno
  script di shell allo scopo di assegnare IRQ, ecc. al driver. Setserial
  funziona solo se il modulo seriale  caricato (o se l'equivalente era
  compilato nel vostro kernel). Se doveste (per qualche ragione)
  scaricare il modulo seriale pi tardi, i cambiamenti precedentemente
  effettuati da setserial saranno persi dal kernel (ma non da
  /etc/serial.conf). Quindi setserial deve essere lanciato di nuovo per
  reimpostarli.  Oltre ad essere lanciato da uno script di avvio,
  qualcosa di simile a setserial viene lanciato quando il modulo seriale
  viene caricato. Quindi quando osservate i messaggi di avvio sullo
  schermo potrebbe sembrare che sia stato lanciato due volte ed in
  effetti si  verificato questo.

  Setserial pu impostare il tempo nel quale la porta continua ad
  operare dopo essere stata chiusa (per fare uscire qualsiasi carattere
  rimasto ancora nel suo buffer nella RAM principale).  Questo 
  necessario a basse velocit di baud (1200 o inferiori).  anche
  necessario a velocit pi alte se ci sono molte attese causate dal
  controllo di flusso. Vedere "closing wait" nella pagina di manuale.


  Setserial non imposta n l'IRQ n gli indirizzi IO nella porta seriale
  da solo. Questo compito viene svolto da "jumper" o dal plug-and-play.
  Dovete passare a setserial gli identici valori che sono stati
  impostati nell'hardware.  Non inventatevi dei valori che pensate
  possano andare bene da passare a setserial. Comunque, se sapete
  l'indirizzo I/O ma non conoscete l'IRQ potere ordinare a setserial di
  tentare di determinarlo.

  Potete vedere una lista di possibili comandi da usare digitando
  setserial senza parametri. Non verranno mostrati le opzioni a una
  lettera tipo -v per verboso (?), che dovreste in genere usare quando
  dovete risolvere dei problemi.  Notate che setserial chiama un
  indirizzo IO "porta". Se digitate

  setserial -g /dev/ttyS*


  vedrete alcune informazioni circa il modo in cui il device driver 
  configurato per le vostre porte. Aggiungete una "-v" all'opzione "-g"
  per saperne di pi sebbene poche persone avranno a che fare (o com
  prendere) queste informazioni aggiuntive visto che i valori pre
  definiti in genere funzionano bene. In casi normali l'hardware 
  impostato nello stesso modo in  cui "setserial" lo riporta, ma se
  avete problemi allore esiste una buona probabilit che "setserial" si
  stia sbagliando.  Infatti, potete lanciare setserial assegnando un
  indirizzo IO puramente fittizio, un qualsiasi IRQ e qualsiasi tipo di
  UART vi pare. Poi la prossima volta che digitate "setserial ... " ver
  ranno visualizzati questi falsi valori senza nessuna protesta. Natu
  ralmente il driver della porta seriale non funzioner correttamente (o
  non funzioner del tutto) con questi valori inventati.

  Mentre gli assegnamenti fatti da setserial sono persi quando il PC
  viene spento, un file di configurazione potrebbe reimpostarli (oppure
  una configurazione precedente) quando il PC viene acceso di nuovo.
  Nelle versioni pi recenti, quello che voi cambiate tramite setserial
  viene salvato automaticamente in un file di configurazione. Nelle
  versioni pi vecchie, il file di configurazione viene modificato solo
  se lo editate manualmente, quindi la configurazione rimane la stessa
  ad ogni avvio.  Vedere ``Script/file di configurazione''.



  9.1.2.  Rilevazione (probing)

  Con le opzioni appropriate, setserial pu rilevare (ad un dato
  indirizzo I/O) una porta seriale, ma dovete indovinare l'indirizzo di
  I/O. Se gli chiedete di rilevare /dev/ttyS2 per esempio, tenter di
  rilevarlo solo all'indirizzo nel quale pensa sia ttyS2 (2F8). Se dite
  a setserial che ttyS2 si trova ad un indirizzo diverso, allora dovrete
  rilevare a quell'indirizzo, etc. Vedere ``Rilevazione''.

  Lo scopo di questo  vedere se l c' una uart, e se s, quale IRQ
  abbia. Usate "setserial" come ultima risorsa visto che ci sono metodi
  pi veloci per farlo tipo wvdialconf per rilevare i modem, guardare i
  messaggi che compaiono per primi all'avvio, o usando pnpdump
  --dumpregs.  Per cercare di identificare l'hardware fisico usate i
  parametri -v (verbose) e il comando autoconfig per setserial. Se il
  messaggio che ne risulta mostra un tipo di uart come 16550A, allora
  tutto  a posto. Se invece mostra "unknown" (sconosciuto) per il tipo
  di uart, allora potrebbe non esserci una porta seriale a
  quell'indirizzo I/O. Alcune porte seriali a buon mercato non si
  identificano correttamente cosi se vedete "unknown" potreste comunque
  avere una porta seriale a quell'indirizzo.

  A parte l'auto-rilevazione per il tipo di uart, setserial pu anche
  auto-rilevare gli IRQ ma questo non sempre funziona correttamente. In
  versioni di setserial 2.15 e superiori, i risultati della vostra
  ultima prova di rilevazione possono essere salvati nel file di
  configurazione /etc/serial.conf che verr usato al prossimo avvio di
  Linux.  In fase di avvio, quando il modulo di serial si carica, una
  rilevazione per le UART viene fatta automaticamente ed i risultati
  visualizzati sullo schermo. Ma l'IRQ che mostra potrebbe essere
  errato. La seconda visualizzazione dello stesso  il risultato di uno
  script che in genere non esegue alcuna rilevazione e quindi non d
  informazioni attendibili riguardo a come l'harware sia effettivamente
  impostato. Mostra sono dati di configurazione che qualcuno ha scritto
  all'interno dello script o dati che sono stati salvati in
  /etc/serial.conf.

  Potrebbe essere che due porte seriali abbiano entrambe lo stesso
  indirizzo di IO impostato nell'hardware. Naturalmente ci non 
  consentito, ma talvolta accade comunque. La rilevazione identifica una
  porta seriale quando in realt ce ne sono due. Comunque, se hanno
  diversi IRQ, alla la rilevazione dell'IRQ potrebbe mostrare IRQ = 0.
  Per me accade questo solo se prima uso setserial per attribuire
  all'IRQ un valore fittizio.



  9.1.3.  Pu Linux configurare i dispositivi seriali "automagicamente"?

  S, ma ... La vostra distribuzione potrebbe gi avere fatto questo in
  fase di avvio.  Ma potreste volerli personalizzare.  facile da fare
  per setserial precedenti al 2.15. Semplicemente aggiungete alcune
  righe al file che lancia setserial all'avvio.  Vedere ``Vecchi metodi
  di configurazione: modificare uno script'' Ad esempio, per ttyS3
  dovreste aggiungere:



        /sbin/setserial /dev/ttyS3 auto_irq skip_test autoconfig



  al file che lancia setserial all'avvio.  Fate questo per ogni porta
  seriale che volete autoconfigurare. Assicuratevi di passare un nome di
  dispositivo che effettivamente esiste sulla vostra macchina.  In
  alcuni casi, questo non funzioner bene a causa dell'hardware, cos
  potreste volere assegnarli un irq e/o un tipo di uart ad esempio


  9.1.4.  Configurazione in fase di avvio

  Quando il kernel carica il modulo seriale (o se l'"equivalente modulo"
   incorporato al kernel) allora solo ttyS{0-3} sono auto-rilevate ed
  il driver viene impostato ad IRQ 4 e 3 (a prescindere dalle reali
  impostazioni dell'hardware). Potete vedere questo nei messaggi di
  avvio proprio come se setserial fosse stato lanciato. Se usate 3 o pi
  porte, questo potrebbe generare un conflitto di IRQ.

  Per risolvere detti conflitti passando a setserial i veri IRQ (o per
  altre ragioni) potrebbe esserci un file da qualche parte che lancia
  setserial di nuovo.  Questo accade all'inizio della fase di avvio
  prima che qualsiasi processo usi la porta seriale. In effetti, la
  vostra distribuzione potrebbe avere impostato le cose in modo che il
  programma setserial venga lanciato automaticamente da uno script di
  avvio in fase di boot. Ulteriori informazioni su come gestire questa
  situazione dovrebbero trovarsi in file chiamati "setserial.." o simile
  nella directory /usr/doc/ o /usr/share/doc/.



  9.1.5.  Script/file di configurazione

  Il vostro obbiettivo  modificare (o creare) uno script nel ramo /etc
  che lanci setserial in fase di avvio. La maggior parte delle
  distribuzioni forniscono un file di questo tipo (ma inizialmente
  potrebbe non risiedere nel ramo /etc). In pi, setserial 2.15 e
  superiore spesso hanno un file /etc/serial.conf che viene usato dallo
  script di cui sopra cos che non dovrete modificare direttamente lo
  script che lancia setserial. Inoltre semplicemente usando setserial da
  riga comandi (2.15 e superiore) potrebbe alterare questo file di
  configurazione.

  Quindi prima della versione 2.15 di setserial tutto quello che
  dovevate fare era modificare uno script. Dopo la 2.15 potreste avere
  bisogno di fare una delle seguenti cose: 1. modificare uno script. 2.
  modificare /etc/serial.conf. o 3. lanciare "setserial" da riga comandi
  il cui risultato sar l'immediata modifica di /etc/setserial.conf.
  Quali di queste cose dobbiate fare dipende sia dalla vostra specifica
  distribuzione, e da come l'avete impostata.

  Per di pi neppure serial.conf viene mai modificato. Invece si usa
  semplicemente setserial da riga comandi.


  9.1.6.  Modificare uno script (dopo la versione 2.15: forse no)

  Prima di setserial 2.15 (1999) non c'era un file /etc/serial.conf per
  configurare setserial.  Quindi dovrete scoprire il file che lancia
  "setserial" in fase di avvio e modificarlo.  Se non esiste dovrete
  crearne uno (o mettere i comandi in un file che viene lanciato nelle
  prime fasi di avvio). Se detto file viene correntemente usato,
  probabilmente si trova da qualche parte nel ramo /etc. Ma Redhat <6.0
  lo ha fornito in /usr/doc/setserial ma dovrete spostarlo nel ramo /etc
  prima di usarlo. Potreste usare "locate" per cercare di trovare un
  file di questo tipo. Ad esempio potreste digitare: locate "serial*".

  Lo script /etc/rc.d/rc.serial era comunemente usato in passato.

  Se un file di questo tipo viene fornito, dovrebbe contenere una serie
  di esempi "commentati".  Rendendo attivi e/o modificando alcuni di
  questi esempi, dovreste essere in grado di impostare tutto quanto
  correttamente. Assicuratevi di usare un percorso valido per setserial
  ed un valido nome di dispositivo. Potreste eseguire un test mandando
  in esecuzione questo file manualmente (basta digitare il suo nome da
  superuser) per vedere se funziona bene.  Testare in questo modo 
  molto pi veloce che eseguire ripetuti riavvii. Naturalmente potete
  anche testare un singolo comando di setserial semplicemente
  digitandolo sulla riga comandi.

  Se volete che setserial determini automaticamente la uart e l'IRQ per
  ttyS3 dovreste aggiungere qualcosa tipo:



       /sbin/setserial /dev/ttyS3 auto_irq skip_test autoconfig





  Fate ci per ogni porta seriale che volete auto configurare.
  Assicuratevi di fornire un nome di device che esiste veramente sulla
  vostra macchina.  In alcuni casi questo non funzioner correttamente a
  causa dell'hardware cos se sapete quali siano la uart e l'irq,
  potreste volerli assegnare esplicitamente con "setserial". Ad esempio:

       /sbin/setserial /dev/ttyS3 irq 5 uart 16550A  skip_test





  Per versioni 2.15 e superiori (a patto che la vostra distribuzione
  implementi la modifica, Redhat non l'ha fatto) potrebbe essere pi
  complicato da fare visto che il file che lancia setserial all'avvio,
  /etc/init.d/setserial o simile non era previsto che fosse modificato
  dall'utente. Vedere ``Nuovi metodi di configurazione usando
  /etc/serial.conf''.


  9.1.7.  Nuovi metodi di configurazione usando /etc/serial.conf

  Prima della versione 2.15 di setserial, il modo di configurare
  setserial era di modificare manualmente lo script di shell che
  lanciava setserial in fase di avvio, Vedere ``Modificare uno script
  (dopo la versione 2.15: forse no)''.  A partire dalla versione 2.15
  (1999) di setserial quest script di shell non viene modificato ma
  piuttosto prende i suoi dati da un file di configurazione:
  /etc/serial.conf. In pi non dovrete pi avere bisogno di modificare
  serial.conf poich usando il comando "setserial" da riga comandi
  potrebbe automaticamente fare s che serial.conf sia modificato in
  modo appropriato.

  Si intendeva agire in questo modo cos che voi non avete bisogno di
  modificare alcun file per impostare (o cambiare) setserial, cos che
  possa fare la cosa giusta ogni volta che Linux viene avviato. Ma ci
  sono delle trappole pericolose perch non  veramente "setserial" che
  modifica serial.conf. La confusione  moltiplicata poich diverse
  distribuzioni gestiscono la cosa in modo differente. In pi, voi
  potreste modficarlo cos da farlo lavorare in modo diverso.

  Quello che spesso accade  questo: Quando spegnete il vostro PC lo
  script che lancia "setserial" in fase di avvio viene di nuovo
  lanciato, ma questa volta esegue solo la parte che la situazione di
  "stop" dice di fare: Esso usa "setserial" per trovare qual  lo stato
  attuale di "setserial" e mette questo informazioni nel file
  serial.conf. Cos quando lanciate setserial per cambiare il file
  serial.conf, il cambiamento non avviene immediatamente, ma solo quando
  eseguite un normale spegnimento del PC.

  Ora potreste forse indovinare quale problema potrebbe sopraggiungere.
  Supponiamo che voi non spegniate normalmente (usando l'interruttore,
  ecc.) e che i cambiamenti non vengano salvati. Supponiamo che state
  sperimentando con "setserial" e dimentichiate di lanciarlo un'ultima
  volta per ripristinare lo stato originale (o fare in modo che gli
  errori vengano riportati al loro stato originale). In questo caso
  saranno salvate le vostre impostazioni "sperimentali".

  Se modificate manualmente serial.conf, allora la vostra modifica viene
  cancellata quando spegnete visto che viene ripristinato lo stato di
  setserial allo spegnimento. C' un modo di disabilitare il cambiamento
  di setserial in fase di spegnimento ed  quello di rimuovere
  "###AUTOSAVE###" o simile dalla prima riga di serial.conf. In almeno
  una distribuzione, la rimozione di "###AUTOSAVE###" dalla prima riga
  viene fatto automaticamente dopo la prima volta che si spegne il PC
  appena dopo l'installazione. Il file serial.conf dovrebbe contenere
  degli esempi "commentati" per aiutarvi.

  Il file pi comunemente usato per lanciare setserial all'avvio (in
  conformit con il file di configurazione)  ora /etc/init.d/setserial
  (Debian) o /etc/init.d/serial (Redhta), o ecc., ma normalmente non
  dovrebbe essere modificato. Per la 2.15 Redhat 6.0 ha semplicemente un
  file /usr/doc/setserial-2.15/rc.serial che dovete spostare in
  /etc/init.d/ se volete che setserial venga lanciato in fase di avvio.

  Per disabilitare una porta, usate setserial per impostarla "uart
  none". Il formato di /etc/serial.conf sembra che sia quello dei
  parametri digitati dopo "setserial" da riga comandi con una riga per
  ogni porta. Se non usate autosave, potreste modificare
  /set/serial.conf manualmente.

  BUG: Fino a luglio 1999 c'era un bug/problema visto che con
  ###AUTOSAVE### solo i parametri di setserial visualizzati da
  "setserial -Gg /dev/ttyS*" venivano salvati, ma gli altri parametri
  no.  Usate il flag -a con "setserial" per vedere tutti i parametri.
  Questo bug affligger solo una piccola minoranza di utenti visto che i
  parametri non salvati sono in genere OK per la maggior parte delle
  situazioni.  stato riportato come bug e potrebbe essere gi stato
  corretto.  Per fare s che le impostazioni correnti vengano salvate da
  setserial nel file di configurazione (serial.conf) senza spegnere il
  PC, fate quello che fareste normalmente quando spegnete: Lanciate lo
  script di shell /etc/init.d/{set}serial stop. Il comando "stop"
  salver la configurazione corrente ma la porta seriale continuer a
  funzionare bene.

  In alcuni casi potreste avere sia il nuovo che il vecchio metodo di
  configurazione installati ma si spera che solo uno di essi venga
  lanciato in fase di avvio. Debian classificava come obsoleti i file
  con "...pre-2.15".





  9.1.8.  IRQ

  Per default, sia ttyS0 che ttyS2 condividono l'IRQ 4, mentre ttys1 e
  ttyS3 condividono l'IRQ 3. Ma non  permessa la condivisione degli
  interrupt seriali, a meno di: 1. avere un kernel 2.2 o superiore, 2.
  si  compilato il supporto per questa cosa, e 3. il vostro hardware
  seriale lo supporta. Vedere ``Condivisione di interrupt e i Kernel
  2.2+'' Se avete solo due porte seriali ttyS0 e ttyS1, siete comunque a
  posto, visto che non esistono conflitti di condivisione di IRQ per
  dispositivi che non esistono.  Se aggiungete un modem interno e
  conservate ttyS0 e ttyS1, allora dovreste cercare di trovare un IRQ
  inutilizzato per assegnarlo al vostro device driver. Se IRQ 5 non 
  usato da una scheda audio, potrebbe essere adatto da usare per un
  modem. Per impostare l'IRQ nell'hardware potreste avere bisogno di
  usare isapnp, un BIOS PnP o modificare Linux per renderlo PnP. Per
  aiutarvi a determinare quale IRQ di "ricambio" potreste avere,
  digitate "man setserial" e cercate diciamo "IRQ 11".




  9.2.  Cos' isapnp ?

  isapnp  un programma per configurare i dispositivi Plug-and-Play
  (PnP) sul bus ISA inclusi i modem interni.  incluso in un pacchetto
  chiamato "isapnptools" ed include un altro programma, "pnpdump" che
  trova tutti i vostri dispositivi ISA PnP e vi mostra le opzioni per
  configurarli in un formato che potrebbe essere aggiunto al file di
  configurazione di PnP: /etc/isapnp.conf. Potrebbe anche essere usato
  con l'opzione --dumpregs per mostrare l'indirizzo IO e l'IRQ della
  porta seriale del modem correnti.  Il comando isapnp potrebbe essere
  incluso in un file di avvio cos che esso sia lanciato ogni volta che
  si accende il computer e quindi configuri i dispositivi ISA PnP. Si
  pu fare questa anche se il vostro BIOS non supporta il PnP. Vedere il
  Plug-and-Play-HOWTO.


  9.3.  Cos' wvdialconf?

  wvdialconf cercher di trovare quale porta seriale (ttyS?) ha un modem
  su di essa.  Crea anche un programma di configurazione per il
  programma wvdial. wvdial  usato per semplificare le chiamate in
  uscita verso un ISP (Internet provider) usando il protocollo PPP. Ma
  non avete bisogno di installare PPP per potere usare wvdialconf. Esso
  rilever solo modem che non sono in uso. Concepir anche
  automaticamente una stringa di inizializzazione "adatta" ma talvolta
  la creer sbagliata. Visto che il comando non ha opzioni,  semplice
  da usare ma dovete passargli il nome di un file nel quale mettere la
  stringa di inizializzazione (ed altri dati).  Ad esempio digitate:
  wvdialconf nome_del_mio_file_di_configurazione.


  9.4.  Cos' stty?

  stty  come setserial ma imposta il baud rate ed altri parametri della
  porta seriale. Digitando "stty -a < /dev/ttyS2" dovreste visualizzare
  come  configurata ttyS2.  La maggior parte delle impostazioni sono
  per cose che non dovreste mai avere bisogno di usare coi modem (tipo
  cose usate solo per terminali degli anni '70). Il vostro pacchetto di
  comunicazione dovrebbe automaticamente impostare tutta la corretta
  configurazione per i modem. Ma stty  talvolta utile per risolvere dei
  problemi.

  Due valori impostati da stty sono: 1. Flusso di controllo hardware
  tramite "crscts" e 2. Ignorare il segnale DCD da modem: "clocal". Se
  il modem non sta inviando segnali DCD e clocal  disabilitato (stty
  mostra -clocal), allora un programma potrebbe non essere in grado di
  aprire la porta seriale. Se la porta non si pu aprire il programma
  potrebbe bloccarsi, attendendo (spesso vanamente) per un segnale DCD
  dal modem.

  Minicom imposta clocal automaticamente quando viene lanciato quindi
  non ci sono problemi.  Ma la versione 6.0.192 di Kermit si pianta
  quando imposto -clocal e provo "set line...".  Se -clocal  impostato
  e non c' segnale DCD allora anche il comando "stty" si pianter e non
  c' modo di impostare clocal (a meno di lanciare minicom). Ma minicom
  reimposter -clocal laddove esista. Un modo di uscire da questo 
  usare minicom per inviare "AT&C" al modem (per ottenere il segnale
  DCD), quindi uscire da minicom senza resettare cos che il segnale DCD
  rimanga attivo. Poi si pu riusare stty.X


  10.  Provare il modem (effettuare una chiamata)

  10.1.  Siete pronti per effettuare una chiamata?

  Una volta che avete collegato il vostro modem e sapete quale porta
  seriale  attiva, siete pronti ad usarlo. Prima di provare ad accedere
  ad Internet o consentire che altri si colleghino al vostro computer,
  provate prima qualcosa di pi semplice come chiamare alcuni numeri per
  vedere se il vostro modem funziona bene. Se non sapete che numero
  chiamare, chiedete nei negozi di computer dei numeri di banche dati,
  ecc. oppure vedete se una libreria locale ha un numero di telefono per
  il suo catalogo in linea.

  Poi assicuratevi di essere pronti a telefonare. Sapete su quale porta
  seriale (tipo ttyS2) si trova il vostro modem? Avreste dovuto
  scoprirlo quando avete configurato l'io-irq della vostra porta
  seriale. Avete deciso quale velocit userete per questa porta? Vedere
  ``Tabella delle velocit '' per una scelta rapida oppure ``Che
  velocit dovrei usare con il mio modem?'' per ulteriori dettagli.  Se
  non avete idea di quale velocit impostare, impostatela un po'
  superiore a quella certificata del vostro modem. Ricordate anche che
  se vedete un men dove un opzione  "hardware flow control" (controllo
  di flusso hardware) e/o "RTS/CTS" o simili, selezionatela.  un cavo
  telefonico attivo quello collegato al vostro modem? Potreste
  connettere il cavo ad un vero telefono per controllare che produca il
  segnale di linea.

  Ora dovete selezionare un programma di comunicazione da usare per
  chiamare il numero. Fra questi programmi includiamo minicom, seyon (X-
  windows) e kermit.  Vedere la sezione ``Programmi di comunicazione''
  per notizie circa alcuni programmi di comunicazione. Un paio di esempi
  sono presentati pi avanti: ``Chiamare con Minicom'' e ``Chiamare con
  Kermit''.


  10.2.  Chiamare con minicom

  Minicom viene incluso nella maggior parte delle distribuzioni di
  Linux. Per configurarlo dovete esser collegati come root. Digitate
  "minicom -s" per configurarlo. Verranno direttamente visualizzati i
  men di configurazione.  Oppure potete anche digitare "minicom", poi
  digitare ^A per vedere la riga di stato in fondo. Essa invita a
  digitare ^A Z per un aiuto (se avete gi digitato ^A digitate solo z).
  Dal men di aiuto (help men) andate al men di Configurazione
  (Configuration menu).


  Non occorre impostare la maggior parte delle opzioni se si vuole
  semplicemente effettuare una chiamata. Per la configurazione dovete
  fornire due semplici voci: il nome della porta seriale connessa al
  modem (tipo /dev/ttyS2) e la velocit (tipo 115200). Questi valori si
  impostano nel men serial port.  Apritelo ed impostate i valori. Poi
  (se possibile) impostate il controllo di flusso hardware (RTS/CTS).
  Poi salvate. Quando digitate la velocit, dovreste anche vedere
  qualcosa tipo "8N1" che dovreste lasciare stare. Vuole dire: Byte da 8
  bit, Nessuna parit, 1 bit di stop aggiunto ad ogni byte. Se non
  trovate la velocit che desiderate, una velocit minore funzioner
  comunque per una prova.  Uscite (digitando return) quando avete finito
  e salvate la configurazione come default (dfl) usando il men.
  Potreste uscire da minicom e poi rilanciarlo per controllare se adesso
  trova la porta seriale ed inizializza il modem, oppure potete tornare
  all'help e dire a minicom di inizializzare il modem.

  Ora siete pronti per chiamare. Ma prima, dalla videata principale che
  ottenete dopo avere digitato "minicom", assicuratevi che ci sia un
  modem presente digitando AT poi premendo il tasto <enter>. Dovreste
  vedere un "OK". Se questo non accade c' qualcosa di sbagliato e sar
  impossibile tentare una chiamata.

  Se ricevete "OK" tornate all'help e selezionate l'elenco telefonico.
  Potete modificarlo e digitare un numero di telefono, ecc.
  nell'elenco, poi scegliete "dial" (componi) per chiamare. In
  alternativa, potete digitare il numero manualmente (selezionando
  "manual" poi digitando il numero sulla tastiera). Se non funziona
  annotate accuratamente ogni messaggio di errore visualizzato e cercate
  di scoprire cosa non va. Per vedere se minicom ha trovato il modem,
  semplicemente lanciatelo e digitate direttamente qualcosa. Tutti i
  comandi al modem devono essere prefissati da "AT". Scrivendo quindi
  semplicemente "AT" dovreste ricevere in risposta un "OK" dal modem.





  10.3.  Effettuare una chiamata con kermit

  Trovate l'ultima versione di kermit in
  http://www.columbia.edu/kermit/.  Ad esempio, diciamo che il vostro
  modem si trova in ttyS3 e la velocit  115200 bps. Dovreste fare
  questo:


       linux# kermit
       C-Kermit 6.0.192, 6 Sep 96, for Linux
        Copyright (C) 1985, 1996,
         Trustees of Columbia University in the City of New York.
       Default file-transfer mode is BINARY
       Type ? or HELP for help.
       C-Kermit>set line /dev/ttyS3
       C-Kermit>set carrier-watch off
       C-Kermit>set speed 115200
       /dev/ttyS3, 115200 bps
       C-Kermit>c
       Connecting to /dev/ttyS3, speed 115200.
       The escape character is Ctrl-\ (ASCII 28, FS)
       Type the escape character followed by C to get back,
       or followed by ? to see other options.
       ATE1Q0V1                    ; digitate questo poi Enter
       OK                          ; il modem dovrebbe rispondere cos




  Se il modem risponde correttamente ai comandi AT allora si deve
  supporre che il vostro modem funziona correttamente per quanto
  riguarda Linux. Ora provate a chiamare un altro modem digitando:


       ATDT7654321




  dove 7654321  un numero di telefono. Usate ATDP in luogo di ATDT se
  avete una linea ad impulsi. Se la chiamata esce, il modem sta funzio
  nando.

  Per tornare al prompt di kermit, tenete premuto il tasto Ctrl, premete
  la barra rovesciata, quindi rilasciate il tasto Ctrl, quindi premete
  il tasto C:


       Ctrl-\-C
       (Back at linux)
       C-Kermit>quit
       linux#




  Questo  stata una semplice prova usando un primitivo metodo di
  chiamata "a mano".  Il metodo abituale  lasciare che kermit componga
  il numero per voi con il suo database di modem interno e le sue
  capacit di composizione automatica, ad esempio usando un modem US
  Robotics (USR)





  linux# kermit
  C-Kermit 6.0.192, 6 Sep 1997, for Linux
   Copyright (C) 1985, 1996,
    Trustees of Columbia University in the City of New York.
  Default file-transfer mode is BINARY
  Type ? or HELP for help
  C-Kermit>set modem type usr        ; Seleziona il tipo di modem
  C-Kermit>set line /dev/ttyS3       ; Seleziona il dispositivo di comunicazione
  C-Kermit>set speed 115200          ; Imposta la velocit... di connessione
  C-Kermit>dial 7654321              ; Compone
   Number: 7654321
   Device=/dev/ttyS3, modem=usr, speed=115200
   Call completed.<BEEP>
  Connecting to /dev/ttyS3, speed 115200
  The escape character is Ctrl-\ (ASCII 28, FS).
  Type the escape character followed by C to get back,
  or followed by ? to see other options.

  Welcome to ...

  login:





  11.  Dial-in - ricevere chiamate

  11.1.  Introduzione

  Il dial-in  quando impostate il vostro PC cos che altri possano
  chiamare il vostro numero di telefono ed usare il vostro PC. Il "punto
  di vista"  il vostro PC.  Quando componete un numero esterno dal
  vostro PC state nel contempo facendo un dial-in in un altro computer
  (ma non potete fare il dial-in nel vostro proprio computer).

  Il dial-in funziona cos. Qualcuno con un modem compone il vostro
  numero telefonico. Il vostro modem risponde alla chiamata e si
  connette. Una volta che il chiamante  connesso, il vostro PC (tramite
  il programma getty) invia il processo di login per il  chiamante.  Il
  metodo originale era quello di inviare un prompt di login allo schermo
  del chiamante (login manuale). Ma un metodo pi moderno (se usate
  mgetty)  lanciare PPP (pppd) e lasciar fare al PPP il login al
  chiamante in modo automatico (non c' bisogno di digitare manualmente
  un nome o una password). Vedere il PPP-HOWTO (una nuova revisione 
  attesa tra poco) e la documentazione di mgetty per maggiori dettagli.

  Dopo che il chiamante si  collegato, egli usa il vostro PC. Usare il
  vostro PC significa che il chiamante ha un account di shell e pu
  usare il vostro PC proprio come se si fosse collegato tramite console
  (o terminale di testo).  Potrebbe anche significare che egli si pu
  connettere ad Internet attraverso il vostro PC (tramite PPP). Il
  programma che usate nel vostro PC per gestire il dial-in  chiamato
  getty o mgetty. Vedere ``A proposito di mgetty''

  Se vi aspettate che qualcuno sia in grado di collegarsi a 56k, non 
  possibile a meno che:

  1. Abbiate una connessione digitale alla compagnia telefonica tipo una
     linea trunkside-T1 o ISDN.

  2. Usiate modem digitali speciali (vedere ``Modem digitali'')

  3. Abbiate un "...concentrator" (concentratore) o simile per
     interfacciare i vostri modem digitali alle linee digitali della
     compagnia telefonica.
     Un "... concentrator" potrebbe essere chiamato anche "modem
     concentrator" oppure "remote access concentrator" (concentratore di
     accesso remoto) o potrebbe essere incluso in un "remote access
     server" (server di accesso remoto) che includa i modem digitali,
     ecc. Questo tipo di impostazioni vengono usate dagli Internet
     Service Provider (ISP).


  11.2.  Getty

  getty  il programma che lanciate per il dial-in. Non ne avete bisogno
  per chiamate verso l'esterno (dialout). Oltre a presentare un prompt
  di login, risponde anche al telefono.  Originariamente getty veniva
  usato per il login verso un computer da un terminale stupido.  
  attualmente usato per il login verso una console Linux. Ci sono alcuni
  programmi getty differenti con nomi leggermente diversi. Solo alcuni
  funzionano con i modem per il dialin.  Questo programma getty viene in
  genere lanciato in fase di boot. Deve essere chiamato dal file
  /etc/inittab. Potreste trovare un esempio in questo file di una
  chiamata a getty nel quale potreste avere bisogno di fare qualche
  piccola modifica.  Se usate un programma getty diverso da quello
  mostato nell'esempio, allora dovreste apportare delle modifiche
  importanti visto che le opzioni hanno diversi formati.


  Ci sono quattro diversi programmi getty tra cui scegliere che possono
  essere usati coi modem per il dialin: mgetty, uugetty, getty_em e
  agetty. Alcuni dettagli vengono forniti nelle sottosezioni seguenti.
  getty  il pi semplice (e pi debole) dei quattro ed alcuni lo
  considerano principalmente da usarsi con terminali di testo collegati
  direttamente. mgetty supporta fax e voice mail, invece uugetty no.
  mgetty si afferma manchi di alcune delle caratteristiche di ugetty.
  getty_em  una versione semplificata di ugetty. Quindi mgetty 
  probabilmente la vostra scelta migliore a meno che abbiate gi
  familiarit con ugetty (o troviate difficile reperire mgetty).  La
  sintassi per questi programmi getty differisce, cos assicuratevi di
  stare usando la sintassi corretta in /etc/inittab per qualsiasi getty
  usiate.



  11.2.1.  Mgetty

  mgetty fu scritto come rimpiazzo di uugetty che esisteva molto prima
  di mgetty. Entrambi si possono usare con i modem. Sebbene mgetty possa
  anche essere usato per terminali direttamente connessi, la
  documentazione per questa cosa  difficile da trovare e mgetty (a met
  1999) non supporta il controllo di flusso software ( usato da molti
  terminali) senza ricompilarlo. Questo difetto viene classificato come
  un bug.  Oltre a consentire login in dialup, mgetty fornisce supporto
  FAX ed autoriconoscimento del PPP. C' un programma addizionale
  chiamato vgetty che gestisce le caselle vocali per alcuni modem.  La
  documentazione per mgetty  buona (eccetto per le caselle vocali), e
  non necessita di supplementi. Per cortesia riferitevi ad essa per le
  istruzioni di installazione. Potete trovare le ultime informazioni su
  mgetty a http://www.leo.org/~doering/mgetty/ e
  <http://alpha.greenie.net/mgetty>


  11.2.2.  uugetty

  getty_ps contiene due programmi: getty viene usato per le console ed i
  terminali, e ugetty per i modem. Greg Hankins (gi autore del Serial-
  HOWTO) usava ugetty cos le sue considerazioni circa questo sono l
  incluse. Vedere ``Uugetty''.  Gli altri getty sono ben trattati dalla
  documentazione che li accompagna.
  11.2.3.  getty_em

  Questa  una versione semplificata di "uugetty". Fu scritta da Vern
  Hoxie dopo che fu completamente confuso dai complessi file di supporto
  che occorrono a getty_ps e uugetty.

  Fa parte della raccolta di utilit ed informazioni di Vern Hoxie
  reperibili tramite ftp da  <scicom.alphacdc.com/pub/linux>.  Il nome
  della raccolta  "serial_suite.tgz". Quando eseguite il login in
  "scicom" come anonimi, dovete usare il vostro indirizzo e-mail
  completo come password. Ad esempio: greg.hankins@cc.gatech.edu


  11.2.4.  agetty e mingetty

  agetty  una semplice e completamente funzionale implementazione di
  getty che meglio si adatta alle console virtuali od ai terminali
  piuttosto che per i modem. Ma, date determinate condizioni favorevoli,
  funziona bene anche con i modem (a meno che voi non eseguiate una
  chiamata quando agetty  in esecuzione in fase di attesa di chiamate).
  agetty nella distribuzione Debian viene semplicemente chiamata getty.

  mingetty  un piccolo getty che funzioner solo per le console
  (monitor), quindi non si pu usare con i modem per il dialin.


  11.3.  Cosa succede quando qualcuno ci chiama? (dial-in)

  Il chiamante lancia un certo programma di configurazione che compone
  il vostro numero di telefono ed il vostro telefono squilla. Ci sono
  due differenti modi nei quali il vostro PC pu rispondere al telefono.
  Un modo  che il modem risponda automaticamente alla chiamata. L'altro
  modo  che getty rilevi lo squillo ed invii un comando al modem che
  gli imponga di rispondere alla chiamata. Una volta che viene risposto
  alla chiamata, il vostro modem invia dei toni all'altro modem (e
  viceversa). I due modem negoziano il modo con il quale essi
  comunicheranno e quando finiscono il vostro modem invia un messaggio
  di "CONNECT" (connessione) o simile a getty. Quando getty riceve
  questo messaggio invia un prompt di login attraverso la porta seriale.
  Qualche volta getty invoca semplicemente un programma chiamato login
  per gestire il login. getty in genere viene lanciato in fase di boot
  ma deve aspettare fino a quando viene effettuata una connessione prima
  di fare partire il prompt di login.

  Ora ulteriori dettagli sui due modi di rispondere ad una chiamata.
  Impostando il registro S0 del modem a 3, il modem automaticamente
  risponde al terzo squillo. Se  impostato a 0 allora il modem
  risponder alla chiamata solo se getty gli invia il comando "A"
  (Risposta) mentre il telefono sta squillando. In realt il comando 
  "ATA" visto che tutti i comandi modem devono essere prefissati da
  "AT". Potreste pensare che sia meglio utilizzare la capacit del modem
  di rispondere automaticamente alla chiamata, ma in verit  meglio
  fare s che sia getty a rispondere. Se il modem non risponde
  automaticamente, si parla di risposta manuale (anche se getty la
  gestisce in modo automatico).

  Per il caso di risposta manuale, getty apre la porta in fase di boot e
  resta in ascolto. Quando il telefono squilla, un messaggio "RING"
  viene inviato a getty che sta ascoltando. Poi se getty vuole
  rispondere allo squillo, invia al modem il comando "ATA". Il modem poi
  esegue la connessione ed invia il messaggio "CONNECT ..." a getty che
  invia un prompt di login al chiamante.

  Nel caso della risposta automatica, viene usata la linea CD "Carrier
  detect" (Portante rilevata) che va dal modem alla porta seriale per
  rilevare quando viene fatta una connessione. Funziona cos. In fase di
  boot, getty cerca di aprire la porta seriale, ma fallisce visto che in
  genere non c' segnale CD dal modem. Allora il programma getty si
  ferma all'istruzione di apertura (open) nel programma fino a che il
  segnale CD compare. Quando un segnale CD arriva (forse ore dopo),
  allora la porta viene aperta e getty invia il prompt di login.  Mentre
  getty sta aspettando all'altezza dell'istruzione di apertura, altri
  processi possono essere lanciati visto che Linux  un sistema
  operativo multiprocessing.  Quello che fa "svegliare" getty  un
  interrupt che viene generato quando la linea CD dal modem pone il suo
  stato ad on.

  Potreste chiedervi come getty sia capace di aprire la porta seriale
  nel caso della risposta manuale visto che non vi  segnale CD. Bene,
  si pu scrivere un programma per forzare l'apertura della porta anche
  se non  presente un segnale CD.


  11.4.  Perch la risposta manuale  meglio

  La differenza tra i due modi di risposta si palesa quando il computer
   spento ma il modem sta ancora lavorando.  Nel caso manuale, il
  messaggio "RING" viene inviato a getty ma visto che il computer 
  spento, getty non  pronta, quindi non ci sar mai risposta al
  telefono.  Non ci sono addebiti telefonici quando non si risponde alla
  chiamata. Nel caso della risposta automatica, c' risposta alla
  telefonata ma non verr mai inviato un prompt di login visto che il
  computer  spento. La bolletta cresce mentre l'attesa continua.  Se la
  chiamata  gratuita, non fa molta differenza, sebbene possa essere
  frustrante attendere per un prompt di login che mai arriver. mgetty
  usa la risposta manuale.  uugetty pu fare questo tramite uno script
  di configurazione.


  11.5.  Callback

  Si definisce callback quando qualcuno per primo chiama il vostro
  modem. Poi voi ottenete un po' di informazioni dal chiamante e lo
  richiamate. Perch si vuole fare questo? Una ragione  risparmiare
  sulla bolletta se voi potete telefonare al chiamante con tariffe pi
  convenienti rispetto alle sue. Un altro  assicurarvi che il chiamante
  sia davvero colui che sostiene di essere. Se un chiamante vi contatta
  e dice di chiamare dal suo abituale numero telefonico, un modo per
  verificarlo  di effettuare una nuova chiamata a quel numero.

  C' un programma per Linux chiamato "callback" che funziona con
  mgetty.  Si trova in  <ftp://ftp.icce.rug.nl/pub/unix/>. Istruzioni
  passo-passo su come installarlo (e PPP) si trovano a
  <http://www.stokely.com/unix.serial.port.resources/callback.html>


  11.6.  Casella vocale (Voice Mail)

  La casella vocale  come una segreteria telefonica eseguita da un
  computer.  Per fare questo dovete avere un modem con il supporto
  "voice" ed il relativo software.  Invece di incidere i messaggi su
  nastro, essi vengono salvati in forma digitale sul disco.  Quando
  qualcuno vi chiama, ascolter un messaggio di benvenuto e poi pu
  lasciare un messaggio per voi. Sistemi pi avanzati possono avere
  caselle postali selezionabili dal chiamante e messaggi da fare
  ascoltare selezionabili dall'utente. Software gratuito  disponibile
  in Linux per la semplice risposta, ma non sembra essere ancora a
  disposizione per capacit pi avanzate.

  So di due diversi pacchetti di voicemail per Linux. Uno  minimale
  (vedere ``Voicemail Software'').  L'altro, pi avanzato, ma
  attualmente scarsamente documentato,  vgetty.  una aggiunta
  opzionale al ben documentato e largamente distribuito programma
  mgetty.  Supporta i comandi modem vocali tipo ZyXEL. Nella
  distribuzione Debian potete ottenere il pacchetto mgetty-voice in
  aggiunta al pacchetto mgetty e mgetty-doc.  La documentazione obsoleta
   stata rimossa da mgetty, ma quella messa al suo posto  latitante (a
  meno che voi usiate l'opzione -h (aiuto) quando lanciate certi
  programmi, ecc). Ma si potrebbero consultare i messaggi circa l'uso
  che vengono inviati nel newsgroup di mgetty. Vedere ``A proposito di
  mgetty'' e >.  Sembra che vgetty sia attualmente non molto stabile ma
  che venga usato con successo e che il suo sviluppo continui. Se questa
   l'ultima versione di questo HOWTO qualcuno che  familiare con
  vgetty mi faccia cortesemente sapere lo stato attuale delle cose.


  12.  Uugetty per dial-in (dal vecchio Serial-HOWTO)

  Sappiate che potreste usare mgetty come (migliore?) alternativa a
  uugetty.  mgetty  pi nuovo e pi famoso di uugetty.  Vedere ``Cos'
  getty?'' per un breve confronto tra questi 2 getty.


  12.1.  Installare getty_ps

  Visto che uugetty  parte di getty_ps dovete prima installare
  getty_ps. Se non lo avete procuratevi l'ultima versione da
  metalab.unc.edu:/pub/Linux/system/serial.  In particolare, se volete
  usare alte velocit (57600 and 115200 bps), dovete procurarvi la
  versione 2.0.7j o superiore. Dovrete anche avere libc 5.x o superiore.



  Per default, getty_ps sar configurato come Linux FSSTND (File System
  Standard) compatibile, il che significa che si trover in /sbin, ed i
  file di configurazione saranno chiamati /etc/conf.{uu}getty.ttySN.
  Questo non  ben chiaro dalla documentazione! Si aspetta che i file di
  lock vadano in /var/lock.  Assicuratevi di avere una directory
  /var/lock.

  Se non volete la compatibilit FSSTND, i file binari andranno in /etc,
  quelli di configurazione in /etc/default/{uu}getty.ttySN ed i file di
  lock in /usr/spool/uucp. Vi raccomando di agire in questo modo se
  state usando UUCP, visto che UUCP avr problemi se spostate i file di
  lock in posti dove non sa di doverli cercare.


  getty_ps pu anche usare syslogd per registrare messaggi.  Vedere le
  pagine di manuale per syslogd(1) e syslog.conf(5) per impostare
  syslogd, se gi non  in esecuzione.  I messaggi sono registrati con
  priorit LOG_AUTH, gli errori usano LOG_ERR e per il debugging si usa
  LOG_DEBUG.  Se non volete usare syslogd potete modificare tune.h nei
  file sorgente di getty_ps per usare invece un file di registrazione di
  messaggi, diciamo /var/adm/getty.log per default.


  Decidete se volete la compatibilit FSSTND e la capacit di syslog.
  Potrete anche scegliere una combinazione dei due. Modificate Makefile,
  tune.h e config.h per adeguarli alle vostre decisioni. Poi compilate
  ed installate in base alle istruzioni incluse nel pacchetto.

  Da questo punto in poi, tutti i riferimenti a getty faranno capo a
  getty_ps.  I riferimenti a uugetty si riferiranno a uugetty che viene
  incluso nel pacchetto getty_ps.  Queste istruzioni non funzioneranno
  per mgetty o agetty.



  12.2.  Impostare uugetty

  Con uugetty potreste chiamare l'esterno con il vostro modem mentre
  uugetty sta controllando la porta per eventuali login.  uugetty esegue
  degli importanti controlli di file lock.  Aggiornate /etc/gettydefs
  per includere una voce di riferimento al vostro modem. Per un aiuto
  sul significato delle voci che mettete in /etc/gettydef, vedere la
  "serial_suite" raccolta da Vern Hoxie. Come recuperarla  spiegato
  nella sezione ``A proposito di getty_em''. Quando avete finito di
  modificare /etc/gettydefs, potrete verificare l'esattezza della
  sintassi facendo:


       linux# getty -c /etc/gettydefs





  12.2.1.  I modem moderni

  Se avete dei modem con velocit di 9600 bps e superiori con
  compressione dati potete bloccare la vostra porta seriale con una sola
  velocit. Ad esempio:


       # 115200 fixed speed
       F115200# B115200 CS8 # B115200 SANE -ISTRIP HUPCL CRTSCTS #@S @L @B
       login: #F115200





  Se avete impostato il modem per un controllo di flusso hardware
  RTS/CTS dovete aggiungere a CRTSCTS alle voci:


       # 115200 fixed speed with hardware flow control
       F115200# B115200 CS8 CRTSCTS # B115200 SANE -ISTRIP HUPCL CRTSCTS
       #@S @L @B login: #F115200





  12.2.2.  Vecchi e lenti modem

  Se avete un modem lento (sotto i 9600 bps), allora invece di una sola
  riga per una singola velocit, avrete bisogno di parecchie righe per
  tentare velocit diverse. Notate che queste righe sono legate tra loro
  dalla ultima "parola" della riga come ad esempio #38400. Le righe
  vuote sono richieste dopo ogni voce













  # Voci Modem
  115200# B115200 CS8 # B115200 SANE -ISTRIP HUPCL #@S @L @B login: #57600

  57600# B57600 CS8 # B57600 SANE -ISTRIP HUPCL #@S @L @B login: #38400

  38400# B38400 CS8 # B38400 SANE -ISTRIP HUPCL #@S @L @B login: #19200

  19200# B19200 CS8 # B19200 SANE -ISTRIP HUPCL #@S @L @B login: #9600

  9600# B9600 CS8 # B9600 SANE -ISTRIP HUPCL #@S @L @B login: #2400

  2400# B2400 CS8 # B2400 SANE -ISTRIP HUPCL #@S @L @B login: #115200






  12.2.3.  Messaggio di login

  Se volete, potete far stampare a uugetty delle cosette interessanti
  nel messaggio di login. Negli esempi di Greg, egli ha il nome del
  sistema, la linea seriale, la velocit in bps corrente. Potete
  aggiungere altre cose:


              @B    La velocit in bps corrente (determinato quando viene visto @B)
              @D    La data corrente nel formato MM/GG/AA.
              @L    La linea seriale alla quale uugetty  attaccato
              @S    Il nome del sistema
              @T    L'ora corrente nel formato HH:MM:SS (24 ore).
              @U    Il numero degli utenti attualmente collegati. Si tratta del
                    conteggio del numero di voci nel file /etc/utmp file che
                    hanno un campo ut_name non vuoto
              @V    Il valore di VERSION, cos come risulta nei file di default
              Per visualizzare un singolo carattere '@' usate '\@' o '@@'.





  12.3.  Personalizzare uugetty

  Ci sono molti parametri da affinare per ogni porta che avete.  Essi
  sono implementati in file di configurazione separati per ogni porta.
  Il file /etc/conf.uugetty verr usato da tutte per tutti i riferimenti
  a uugetty e /etc/conf.uugetty.ttySN sar usato solo da quella porta.
  Esempi di file di configurazione possono essere trovati con i file
  sorgente di getty_ps, che sono inclusi in diverse distribuzioni di
  Linux. Per motivi di spazio non sono elencati qui.  Notate che se
  state usando vecchie versioni di uugetty (inferiori a 2.0.7e) o non
  state usando FSSTND, allora il file di default sar
  /etc/default/uugetty.ttySN. Il /etc/conf.uugetty.ttyS3 di Greg si
  presenta come segue:












  # configurazione di esempio di uugetty per un modem Hayes compatibile
  # per consentire chiamate modem dall'esterno
  #
  # riga da inizializzare
  INITLINE=ttyS3
  # timeout per disconnettere se inattivo ...
  TIMEOUT=60
  # stringa di inizializzazione del modem ...
  # formato: <expect> <send> ... (chat sequence)
  INIT="" AT\r OK\r\n
  WAITFOR=RING
  CONNECT="" ATA\r CONNECT\s\A
  # questa riga imposta il tempo da far trascorrere prima di inviare il
  # messaggio di login
  DELAY=1
  #DEBUG=010




  Aggiungete la seguente riga al vostro /etc/inittab, cos che uugetty
  sia eseguito sulla vostra porta seriale (sostituendo le informazioni
  corrette per il vostro ambiente - run-level (2345 o 345 ecc.)
  posizione del file di configurazione, porta, velocit e tipo di
  terminale predefinito)


       S3:2345:respawn:/sbin/uugetty -d /etc/default/uugetty.ttyS3 ttyS3 F115200 vt100




  Rilanciate init:


       linux# init q




  Per i parametri di velocit in /etc/inittab, usate la pi alta
  velocit in bps che il vostro modem pu supportare.

  Ora Linux controller la vostra porta seriale per individuare delle
  connessioni.  Componete il numero da un'altra macchina ed entrate nel
  vostro sistema Linux.

  uugetty ha molte altre opzioni, controllate la pagina di manuale per
  uugetty (spesso chiamato semplicemente getty) per una completa
  descrizione. Tra le altre, c' la capacit di scheduling ed anche di
  ringback automatica.


  13.  Che velocit dovrei usare con il mio modem?

  Per velocit si intende in verit il rapporto di flusso dei dati
  ("data flow rate") ma quasi tutti lo chiamano velocit. Per tutti i
  modem moderni non si ha la possibilit di scegliere la velocit che il
  modem usa sulla linea telefonica visto che viene scelta
  automaticamente come la pi alta possibile date le circostanze.  Ma
  voi avete la possibilit di scegliere che velocit sar usata nelle
  comunicazioni tra il modem e il vostro computer. Questa viene chiamata
  velocit "DTE" che  l'acronimo di Data Terminal Equipment (il vostro
  computer  un DTE). Dovete impostare questa velocit ad un valore
  abbastanza alto in modo che questa parte del tragitto compiuta dal
  segnale non costituisca un collo di bottiglia. L'impostazione per la
  velocit DTE  la velocit massima.  La maggior parte delle volte
  probabilmente operer ad una velocit inferiore.

  Per un modem esterno, la velocit DTE  la velocita (in bit per
  secondo) del flusso che scorre nel cavo tra il modem ed il PC. Per un
  modem interno,  concettualmente lo stesso, visto che il modem emula
  anche una porta seriale. Pu sembrare ridicolo avere un limite di
  velocit nella comunicazione tra un computer ed una scheda modem che 
  direttamente collegata all'interno del computer ad bus con una
  velocit notevolmente superiore. Ma sar cos fino a quando i modem
  interni includeranno una porta seriale dedicata che ha limiti di
  velocit (e velocit impostabili).


  13.1.  Velocit e compressione dati

  Che velocit scegliere? Se non fosse per la compressione dati si
  potrebbe scegliere una velocit DTE esattamente uguale a quella del
  modem. La compressione dati prende i byte inviati dal computer al
  modem e li codifica in un numero minore di byte. Ad esempio, se il
  flusso (velocit) dal PC al modem era di 20,000 byte/secondo (bps) ed
  il rapporto di compressione  di 2 a 1, allora solo 10,000
  byte/secondo usciranno verso la linea telefonica. Quindi per un
  rapporto di compressione di 2:1 occorre impostare una velocit doppia
  rispetto alla velocit massima del modem sulla linea telefonica. Se il
  rapporto di compressione  di 3 a 1, occorre impostarla tre volte pi
  veloce.


  13.2.  Dove imposto la velocit?

  La velocit DTE  normalmente impostata da un men nel vostro
  programma di comunicazione o da un'opzione data al comando getty se
  qualcuno vi chiama. Non potete impostare la velocit DCE modem-a-
  modem.


  13.3.  Non posso impostare una velocit sufficientemente elevata

  Dovete scoprire la velocit pi alta supportata dal vostro hardware.
  Alla fine del 1998 la maggior parte dell'hardware supportava velocit
  fino a 115.2 bps.  Pochi modem interni a 56K supportano i 230.4K bps.
  Recenti kernel di Linux supportano le alte velocit (superiori a
  115.2K) ma potreste avere difficolt nell'usarle per una o entrambe
  delle seguenti ragioni:


  1. Il programma applicativo (o stty) non accetta l'alta velocit.

  2. Setserial ha una velocit di default di 115,200 (ma questo default
     si pu cambiare facilmente)


  13.3.1.  Com' impostata la velocit nell'hardware: il divisore e il
  baud_base

  Ecco un'elenco dei divisori pi comunemente usati e delle loro
  velocit corrispondenti (assumendo una velocit massima di 115.200): 1
  (115.2K), 2 (57.6K), 3 (38.4K), 6 (19.2K), 12 (9.6K), 24 (4.8K), 48
  (2.4K), 96 (1.2K), ecc.  Il driver seriale imposta la velocit
  nell'hardware inviando al medesimo solamente un "divisore" (un numero
  intero positivo). Questo "divisore" divide la velocit massima
  dell'hardware, la velocit quindi risulta pi lenta (eccetto che per
  divisore 1 che ovviamente dice all'hardware di lavorare a velocit
  massima).

  In genere, se specificate una velocit di 115.2K (nel vostro programma
  di comunicazione o tramite stty) allora il driver seriale imposta
  l'hardware della porta a divisore 1 che ovviamente imposta la velocit
  massima. Se disponete di hardware con velocit massima di diciamo
  230.4K, allora specificando 115.2K risulter un divisore 1, quindi in
  realt avrete la velocit di 230.4K. Che  la velocit doppia di
  quanto avete impostato. In effetti, per qualsiasi velocit che
  impostate, la velocit reale sar raddoppiata. Se avete hardware che
  potrebbe andare a 460.8K, allora la velocit reale sarebbe il
  quadruplo di quella impostata.


  13.3.2.  Trucchetti per impostare la velocit

  Per correggere questi valori (ma non sempre il problema verr risolto)
  potreste usare "setserial" per modificare il baud_base alla vera
  velocit massima della vostra porta tipo 230.4K. Quindi se impostate
  la velocit (tramite la vostra applicazione o da stty) a 230.4K, verr
  usato un divisore 1 ed otterrete la stessa velocit di quella da voi
  impostata. PROBLEMA: stty e molti programmi di comunicazione (alla
  met del 1999) presentano ancora 115.2K quale velocit massima
  impostabile e non vi lasceranno impostarla a 230.4K, ecc.. Quindi in
  questi casi uno soluzione potrebbe essere non cambiare nulla con
  setserial, ma tenersi in mente che la velocit reale  sempre il
  doppio di quella che avete impostata.

  C' un altro trucco che non  molto meglio. Per usarlo impostate il
  baud_base (con setseria) alla velocit massima del vostro hardware.
  Questo corregge il conteggio cos che se impostate 115.2K avrete
  effettivamente quella velocit. Ora dovete per ancora scoprire come
  impostare una velocit pi alta se il vostro programma di
  comunicazione (o simile) non ve lo consente. Fortunatamente, setserial
  ha un modo per farlo: usate il parametro "spd_cust" con "divisor 1".
  Poi quando impostate la velocit a 38400 nel programma di
  comunicazione, il divisore verr impostato ad 1 nella porta ed operer
  alla massima velocit. Ad esempio:
  setserial /dev/ttyS2 spd_cust baud_base 230400 divisor 1
  Non cercate di usare "divisor" per altri scopi diversi dallo speciale
  uso illustrato qui sopra (con spd_cust).

  Se ci sono due o pi alte velocit che volete usare che il vostro
  programma di comunicazione non riesce ad impostare, allora non  cos
  facile come sopra descritto.  Ma si applicano gli stessi principi.
  Potreste mantenere la baud_base di default e tenere presente che
  quando impostate una velocit in realt impostate solo il divisore.
  Cos la vostra velocit reale sar sempre la vostra velocit massima
  divisa da qualunque divisore sia impostato nel driver seriale. Vedere
  ``Com' impostata la velocit nell'hardware: il divisore ed il
  baud_base''


  13.3.3.  La frequenza del cristallo non  il baud_base

  Notate che l'impostazione del baud_base  in genere molto inferiore
  rispetto a quella dell'oscillatore di cristallo nel hardware viste la
  frequenza del cristallo spesso si ottiene dividendo per 16
  nell'hardware per ottenere la vera velocit massima.  La ragione per
  la quale la frequenza del cristallo deve essere pi alt  che pu
  essere usata per ottenere diversi campioni di ogni bit per determinare
  se  un 1 o uno 0.






  13.4.  Tabella delle velocit

  Conviene avere almeno una UART 16650 per modem a 56K. ma pochi modem
  la supportano. Un'alternativa  avere una 16550 che  stata "truccata"
  per dare 230400 bps. Ecco alcune velocit consigliate per impostare la
  vostra linea seriale se la velocit del vostro modem :

    56K (V.90) usate 115200 bps o 230400 bps (percentualmente di poco
     pi veloce?)

    28.8K (V.34), 33.6K (V.34) usate 115200 bps

    14400 bps (V.32bis), con compressione dati V.42bis usate 57600 bps

    9600 bps (V.32), con compressione dati V.42bis usate 38400 bps

    modem minori di 9600 bps (V.32), impostate la velocit pi alta che
     il modem supporta.


  14.  Programmi di comunicazione ed utilit

  PPP  di gran lunga il pi usato.  usato per accedere ad Internet.
  Per chiamare librerie pubbliche, BBS, ecc. minicom  il pi popolare
  seguito da Seyon (solo per X-Windows) e Kermit.


  14.1.  Minicom contro kermit

  Minicom  solo un programma di comunicazione mentre Kermit  sia un
  programma di comunicazione che un protocollo di trasferimento file.
  Qualcuno potrebbe usare il protocollo Kermit in Minicom (a patto che
  si abbia installato Kermit sul PC). Minicom  basato sui men mentre
  Kermit  basato sulla riga comando (interattiva nello speciale prompt
  di Kermit). Mentre Kermit  un programma libero, la documentazione non
   tutta libera.  Non c' un manuale dettagliato fornito e viene
  suggerito di acquistare un libro come manuale. Comunque Kermit ha un
  aiuto in linea interattivo che dice tutto, ma manca di spiegazioni che
  guidino il principiante. I comandi possono essere messi in un file
  script cos che non si debbano ripetere ogni volta.  Kermit (inteso
  come programma di comunicazione)  pi potente di Minicom.

  Sebbene tutta la documentazione di Minicom sia libera, non  cos
  esaustiva come quella di Kermit. Visto che occorre un permesso per
  includere Kermit in una distribuzione commerciale e visto che la
  documentazione non  totalmente libera, alcune distribuzioni non
  includono Kermit. La mia opinione  che  pi facile impostare Minicom
  e c' meno da imparare.



  14.2.  Lista di software di comunicazione

  Ecco una lista di alcuni software di comunicazione dalla quale potrete
  scegliere. Se non sono presenti nella vostra distribuzione, dovrebbero
  essere disponibili via FTP. Gradirei commenti che paragonino i
  programmi di comunicazione.  Quelli meno popolari sono obsoleti?


  14.2.1.  I meno popolari


    ecu - un programma di comunicazione

    pcomm - programma di comunicazione tipo procomm con zmodem

    xc - pacchetto di comunicazione xcomm


  14.2.2.  I pi popolari



    programmi per collegarsi ad internet (ppp dialer) chat, wvdial

    minicom - programma di comunicazione tipo telix.  Supporta gli
     script, zmodem, kermit

    C-Kermit <http://www.columbia.edu/kermit/> - portabile, supporta
     gli script, comunicazioni seriali e TCP/IP incluso il trasferiemnto
     di file, la trascodifica del set di caratteri e supporta zmodem

    seyon - programma di comunicazione in ambiente X

    xc - programma di comunicazione in ambiente X


  14.2.3.  Fax



    efax un piccolo programma fax

    hylafax un programma fax basato sul modello client-server

    mgetty+fax gestisce quanto concerne il fax e il login per chiamate
     in entrata


  14.2.4.  Software per Voicemail



    mvm <http://www-internal.alphanet.ch/~schaefer/mvm/>  un VoiceMail
     minimale for Linux

    vgetty  un'estensione di mgetty che gestisce voicemail per alcuni
     modem.  Dovrebbe essere compreso in recenti release di mgetty.



  14.2.5.  Chiamate in entrata (Dial-in) (usa getty)



    mgetty+fax  per i modem ed  ben documentato (eccetto che per
     voicemail alla met del 1999). Gestisce anche i fax e risulta
     un'alternativa a uugetty.  Sta includendo capacit di voicemail
     (usando vgetty).  Vedere ``mgetty''

    uugetty  anch'esso per i modem.   parte del pacchetto ps_getty.
     Vedere ``getty_ps''


  14.2.6.  Altri



    callback voi chiamate un modem remoto, poi quel modem riappende e
     vi richiama (per risparmiare sulla bolletta).


    SLiRP e term forniscono un servizio tipo PPP che potete lanciare
     nello spazio utente su di un computer remoto con uno shell account
     Vedere ``term e SLiRP'' per ulteriori dettagli.

    ZyXEL  un programma di controllo per i modem ZyXEL U-1496.
     Gestisce chiamate, connessioni, richiamate di sicurezza, FAX e
     funzioni vocali di mailbox

    Software SLIP e PPP pu essere trovato in:
      ftp://metalab.unc.edu/pub/Linux/system/network/serial.

    Altre cose si possono trovare in:
     ftp://metalab.unc.edu/pub/Linux/system/serial e
     ftp://metalab.unc.edu/pub/Linux/apps/serialcomm o in uno dei molti
     mirror.  Queste sono le directory dove sono archiviati i programmi.


  14.3.  SLiRP e term

  SLiRP e term sono programmi che servono solo se avete un account shell
  in dial-up su di una macchina tipo Unix e volete avere l'equivalente
  di un account PPP (o simile) senza essere autorizzati ad averlo (forse
  perch non volete pagare per questo, ecc.).  SLiRP  pi popolare di
  term che  praticamente obsoleto.

  Per usare SLiRP installatelo nel vostro account nel computer remoto.
  Poi chiamate l'account e lanciate SLiRP sul remoto e PPP sul vostro PC
  locale.  Ora avete una connessione PPP attraverso la quale potete
  lanciare un browser web sul vostro PC tipo Netscape, ecc.  Potrebbero
  esserci alcuni problemi visto che SLiRP non  cos valido come un vero
  account PPP. Alcuni account potrebbero fornire SLiRP visto che esso fa
  risparmiare sugli indirizzi IP (non avete indirizzo IP mentre usate
  SLiRP).

  term  qualcosa di simile a SLiRP solo che dovete eseguire term sia
  sul computer locale che quello remoto. Non c' PPP sulla linea
  telefonica visto che term usa il suo proprio protocollo. Per usare
  term dal vostro PC vi occorrer una versione "term-aware" di ftp per
  eseguire ftp, ecc. Quindi  pi facile usare SLiRP visto che la
  versione normale di ftp funziona bene con SLiRP.  C' un Term HOWTO
  non aggiornato.


  15.  Cosa sono le UART?  In che modo influenzano le prestazioni?

  15.1.  Introduzione alle UART

  (Questa sezione  anche nel Serial-HOWTO)

  UART (Universal Asynchronous Receiver Transmitter) -
  ricevitore/trasmettitore asincrono universale - sono chip seriali
  sulla scheda madre del vostro PC (o su una scheda modem interna).  La
  funzione della UART pu anche essere svolta da un chip che fa anche
  altre cose. Sui computer pi vecchi come la maggior parte dei 486, i
  chip erano sulla scheda del controller I/O.  Alcuni computer pi
  vecchi hanno schede seriali dedicate.

  Scopo della UART  convertire i byte dal bus parallelo del PC in un
  flusso seriale di bit. Il cavo che esce dalla porta seriale  seriale
  ed ha solo un cavo per ogni direzione di flusso. La porta seriale
  invia un flusso di bit, un bit alla volta. Al contrario, il flusso di
  bit che entra dalla porta seriale via cavo esterno viene convertito in
  byte paralleli che il computer pu comprendere. Le UART trattano dati
  divisi in pezzi della dimensione di un byte, che per convenienza 
  anche la dimensione dei caratteri ASCII.

  Diciamo che avete un terminale collegato al vostro PC. Quando digitate
  un carattere, il terminale consegna quel carattere al proprio
  trasmettitore (che  anche una UART). Il trasmettitore invia quel byte
  alla linea seriale, un bit alla volta ad una velocit specifica. Dalla
  parte del PC, l'UART ricevente prende tutti i bit e ricostruisce
  (parallelizza) il byte e lo mette in un buffer.

  Oltre alla conversione tra seriale e parallelo, la UART esegue alcune
  altre cose come derivazione (effetto collaterale) dei suoi compiti
  primari. Il voltaggio usato per rappresentare i bit viene anch'esso
  convertito (cambiato). I bit extra (chiamati bit di start e stop) sono
  aggiunti ad ogni byte prima che venga trasmesso. Vedere la sezione
  "Voltage Waveshapes" del Serial HOWTO per dettagli. Inoltre, mentre il
  rapporto di flusso (in byte per secondo) sul bus parallelo all'interno
  del computer  molto alto, il rapporto di flusso in uscita dalla UART
  dalla parte della porta seriale  molto pi basso. L'UART ha un elenco
  fisso di rapporti (velocit) che pu usare come interfaccia per la sua
  porta seriale.


  15.2.  Due tipi di UART

  Ci sono due tipi principali di UART: UART "stupide" (dumb) e UART
  FIFO. Le UART "stupide" sono le 8250, 16450, le prime 16550 e le prime
  16650. Esse sono obsolete ma se imparate come lavorano,  poi facile
  comprendere come funzionano le moderne UART FIFO (le ultime 16550,
  16550A, 16c552, le ultime 16650 e 16750 e 16C950).

  Esiste un poco di confusione per quanto riguarda le 16550. I primi
  modelli avevano un bug e lavoravano correttamente solo come 16450 (non
  FIFO). I modelli pi recenti con questo bug corretto, vennero chiamate
  16550A, ma la maggior parte dei costruttori non fecero proprio il
  cambiamento di nome e continuarono a chiamarle 16550.

  La maggior parte delle 16550 in uso oggi sono come le 16550A. Linux la
  rilever come 16550A anche se il manuale dell'hardware (o l'etichetta)
  dicono che si tratta di una 16550. Una situazione simile esiste per le
  16650 (solo che  peggio visto che il costruttore sembra che non
  ammetta che c' qualcosa di sbagliato).  Linux rilever un'ultima
  16650 come una 16650V2. Se esso la rileva come una 16650 ci sono
  cattive notizio e verr usata come se avesse un buffer da un byte.


  15.3.  FIFO

  Per comprendere la differenza tra "stupide" (dumb) e FIFO (First In,
  First Out - Il primo che entra  il primo che esce) esaminiamo prima
  cosa succede quando una UART ha inviato o trasmesso un bute.  La UART
  stessa non pu fare nulla con i dati che passano attraverso di essa,
  semplicemente li riceve e li spedisce. Nella UART "stupide" originali,
  la CPU riceveva un interrupt dal driver seriale ogniqualvolta un byte
  veniva ricevuto o trasmesso. La CPU poi spostava il byte ricevuto dal
  buffer della UART in una qualche parte della memoria, oppure dava alla
  UART un altro byte da spedire.  Le UART 8250 e 16450 hanno un buffer
  di 1 byte. Ci significa che ogni volta che 1 byte viene inviato o
  ricevuto, la CPU riceveva un interrupt. A basse velocit di
  trasferimento, questo andava bene.  Ma ad alte velocit di
  trasferimento la CPU diventava cos impegnata a gestire la UART, che
  non aveva il tempo per soddisfare adeguatamete gli altri compiti.  In
  alcuni casi, la CPU non era pronta a servire le richieste di interrupt
  in tempo ed il byte era sovrascritto perch arrivava troppo
  velocemente.  Questo viene chiamato "overrun" o "overflow"
  (sovraccarico).

  Ecco dove le UART FIFO sono utili. I chip delle 16550A (o 16550) hanno
  un buffer FIFO di 16 byte. Questo significa che pu ricevere fino a 14
  byte (od inviarne 16) prima che debba inviare un interrupt alla CPU.
  Non solo essa pu attendere ulteriori byte, ma la CPU pu poi
  trasferirli tutti e 14 (o pi) in un colpo solo.  Questo  un
  vantaggio significativo rispetto alle altre UART, cha hanno buffer di
  1 solo byte. La CPU riceve meno interrupt ed  libera di fare altre
  cose. I dati non sono sono persi e tutti sono contenti. Notate che la
  soglia di interrupt dei buffer FIFO (livello di attivazione) pu
  essere impostata a meno di 14. 1, 4 e 8 sono altro possibili scelte.

  Mentre la maggior parte dei PC hanno delle 16550 con 16 byte di
  buffer, le UART migliori hanno buffer ancora pi grandi. Notate che
  l'interrupt viene inviato leggermente prima che il buffer si riempia
  del tutto (diciamo ad un "trigger level" di 14 byte per un buffer da
  16 byte). Questo consente di fare spazio a qualche alto byte da
  ricevere durante il tempo che trascorre mentre la richiesta di
  interrupt viene esaudita.  Il trigger level pu essere impostato a
  diversi valori consentiti dal software kernel.  Il trigger level di 1
  sar quasi come una UART "stupida" (a parte il fatto che comunque ha
  ancora spazio per altri 15 byte prima che venga inviato l'interrupt).

  Se digitate qualcosa mentre state visitando una BBS, i caratteri che
  digitate escono attraverso la porta seriale. I vostri caratteri
  digitati che si vedono sullo schermo sono quelli che sono stati
  riecheggiati dalla linea telefonica attraverso il vostro modem, quindi
  attraverso la vostra porta seriale verso lo schermo. Se si ha un
  buffer a 16 byte sulla porta seriale che trattiene i caratteri fino a
  che ne ha 14, dovrete digitare parecchi caratteri prima di poter
  vedere quello che avete digitato in precedenza.  (prima che essi
  appaiono sullo schermo). Questo pu creare confusione ma esiste un
  "timeout" per prevenire ci. Quindi normalmente si vede un carattere
  sullo schermo non appena lo si digita.

  Il "timeout" lavora in questo modo per il buffer della UART che
  riceve: se i caratteri arrivano uno di seguito all'altro, allora una
  richiesta di interrupt viene inviata solo quando il 14 carattere
  raggiunge il buffer. Ma se un carattere arriva ed il successivo non
  arriva subito dopo, viene richiesto un interrupt. Questo succede anche
  se non ci sono 14 caratteri nel buffer (potrebbe anche essercene solo
  uno).  Quindi quando quello che si digita passa attraverso questo
  buffer, esso si comporta come un buffer da 1 byte anche se in realt 
  un buffer da 16 byte (a meno che la velocit di battitura non sia
  centinaia di volte superiore al normale). Vi  un timeout anche per il
  buffer di trasmissione.



  15.4.  Numeri di modello di UART

  Ecco un elenco di UART.  TL  il Trigger Level

    8250, 16450, prime 16550: Obsolete con buffer da 1 byte

    16550, 16550A, 16c552: buffer da 16 byte  TL=1,4,8,14

    16650:  buffer da 32-byte. Velocit fino a 460.8 Kbps

    16750:  buffer da 64-byte per trasmissione, 56-byte per ricezione.
     Velocit fino a 921.6 Kbps

    Hayes ESP: buffer da 1K

  Quelle obsolete vanno bene solo per modem non superiori a 14.4.k (DTE
  con velocit fino a 38400 bps).  Per i modem moderni occorre almeno
  una 16550 (e non una delle prime 16550).  I modem V.90 56k potrebbero
  essere percentualmente di molto piu' veloci con una 16650
  (specialmente se si scaricano file non compressi). Il vantaggio
  principale della 16650  la maggiore dimensione del suo buffer visto
  che una velocit extra non  necessaria a meno che il rapporto di
  compressione del modem sia alto. Alcuni modem interni a 56k potrebbero
  essere provvisti di una 16550 ??

  Schede multiporta intelligenti e senza UART usano chip DSP per il
  buffering e il controllo addizionale, liberando la CPU ancora di pi.
  Ad esempio, le schede Cyclades Cyclom e Stallion EasyIO usano una
  Cirrus Logic CD1400 RISC UART, e molte schede usano CPU 80186 od anche
  CPU RISC speciali per gestire l'IO seriale.

  La maggioranza dei PC pi nuovi (486, Pentium o superiori) hanno una
  16550A (generalmente chiamata solo 16550). Se avete un qualcosa di
  veramente vecchio il chip pu essere scollegato in modo che ci si
  possa aggiornare acquistando un chip 16550A rimpiazzando la UART 16450
  esistente. Se le funzionalit sono state immesse in un altro tipo di
  chip, allora siete sfortunati. Se la UART  agganciata ad incastro,
  allora l'aggiornamento  facile (se siete in grado di trovare un
  rimpiazzo). Le nuove e le vecchie hanno i pin compatibili. Potrebbe
  essere pi praticabile acquistare semplicemente una nuova scheda
  seriale su Internet (alcuni negozi al dettaglio ne hanno a
  disposizione oggi).


  16.  Risoluzione di problemi

  16.1.  Il mio modem  fisicamente al suo posto ma non pu essere
  trovato

  I messaggi di errore potrebbero essere qualcosa del tipo "No modem
  detected" (nessun modem rilevato) , "Modem non responding" (il modem
  non risponde), o (strano) "You are already online" (Sei gi collegato)
  (da minicom). Se avete installato un modem interno (con la porta
  seriale inclusa nel modem) o ne state usando uno esterno e non sapete
  a che porta seriale sia connesso il problema  cercare la porta
  seriale.  Vedere ``La mia porta seriale  fisicamente presente ma non
  pu essere trovata''.  Questa sezione riguarda come scoprire quale
  porta seriale ha un modem ad essa connesso.

  C' un programma che cerca i modem sulle porte seriali comunemente
  usate chiamato "wvdialconf". Digitate semplicemente "wvdialconf <un-
  nuovo-nome-file>".  Verr creato il nuovo file come file di
  configurazione ma non avrete bisogno di esso a meno che non andiate ad
  usare "wvdial" per telefonare.  Vedere ``Cos' wvdialconf ?''.
  Sfortunatamente, se il vostro modem  in modalit "online data",
  wvdialconf visualizzer "No modem detected". Vedere ``Nessuna risposta
  ad AT''.


  Il vostro problema potrebbe essere dovuto ad un winmodem (o simile)
  che non pu essere usato con Linux.  Vedere ``Evitare la maggior parte
  dei software modem''. Il programma "setserial" potrebbe essere usato
  per identificare le porte seriali ma non rilever se ci sono modem
  collegati ad esse. Quindi  meglio provare ad usare prima
  "wvdialconf".

  Un altro modo di vedere se c' un modem su una porta  lanciare
  "minicom" sulla porta (dopo avere precedentemente impostato minicom
  sulla corretta porta seriale -- dovrete salvare le impostazioni,
  quindi uscire da minicom e farlo ripartire).  Poi digitate "AT" e
  dovreste vedere OK (o 0 se  impostato per restituire codici numerici
  di risultato ("digit result codes")).  I risultati potrebbero essere:

    Nessuna risposta. Vedere ``Nessuna risposta ad AT''


    Se ci vogliono parecchi secondi per ottenere una risposta (incluso
     anche solo il cursore che si sposta di una riga) allora vedere
     ``Estremamente lento: il testo appare sullo schermo lentamente e
     dopo lunghi ritardi''

    Alcuni strani caratteri appaiono, ma non in risposta ad AT. Questo
     con ogni probabilit significa che il vostro modem  ancora
     connesso a qualcosa dall'altra parte della line telefonica che sta
     inviando alcuni criptici pacchetti o simile.


  16.1.1.  Nessuna risposta ad AT

  Il modem dovrebbe inviarvi un "OK" in risposta al vostro "AT", che
  digitate al modem (usando minicom o simile). Se non vedete "OK" (e in
  parecchi casi non vedete neppure "AT" che avete digitato) il modem non
  sta rispondendo (dando per scontato che ci sia davvero un modem verso
  la porta sulla quale state digitando).

  Una ragione per la quale un vero modem non risponde  che si trova in
  modo "online data" dove non pu accettare alcun comando AT. Potrebbe
  essere in uso con un altro processo. Se detto processo  in esecuzione
  sulla porta, potreste vederlo digitando "ps -t ttyS2" o simile.
  Comunque il processo che sta usando la porta seriale (dove si trova il
  modem) potrebbe essere in esecuzione su di un terminale tipo
  /dev/ttyS1 e non sar individuato usando il comando sopracitato.

  Potreste stare usando il modem ed improvvisamente siete stati
  bruscamente disconnessi (come ad esempio "uccidendo" il processo con
  segnale 9). In quel caso il vostro modem non viene reimpostato a
  modalit comandi dove pu interagire con i comandi AT.  Ecco quindi il
  messaggio di minicom "You are already online, hangup first" (siete gi
  in linea, interrompete la comunicazione prima).  Bene, sembra che
  siate in linea ma potreste non essere collegati con nessuno attraverso
  la linea telefonica, wvdial visualizzer "modem not responding" (il
  modem non risponde) nella medesima situazione.

  Per risolvere questo problema come soluzione estrema spegnete e
  riavviate il computer. Un altro modo  inviare +++ al modem per dirgli
  di ritornare a modalit comandi dalla modalit in linea.  Da entrambe
  le parti della sequenza +++ deve esserci circa 1 secondo di ritardo
  (nulla inviato durante il "guard time"). Questo potrebbe non
  funzionare se un altro processo sta usando il modem visto che la
  sequenza +++ potrebbe essere attaccata ad altri caratteri inseriti
  prima o dopo il +++ (durante il "guard time"). Ironicamente, anche se
  la linea del modem fosse inattiva, inviandogli un inaspettato +++
  probabilmente si dar il via ad uno scambio di pacchetti (o simile)
  che violeranno il richiesto "guard time" cos che +++ non fa quello
  che voi avreste voluto. +++ in genere si trova nella stringa che viene
  chiamata "hangup string" (stringa di interruzione) cos se dite a
  minicom (o simile di interrompere la comunicazione) potrebbe
  funzionare. Un altro modo di fare questo  semplicemente quello di
  uscire da minicom e poi rilanciarlo.


  16.2.  Non posso avvicinarmi ai 56K dal mio modem a 56K

  Deve esserci un livello di disturbo molto basso sulla linea perch il
  modem possa solo avvicinarsi ai 56K. Alcune linee telefoniche sono
  cos cattive che le velocit ottenibili sono molto pi lente di 56K
  (tipo 28.8 od anche meno). Alcune volte telefoni supplementari
  connessi alla stessa linea possono causare problemi. Per controllare
  questo potreste cercare di connettere il vostro modem direttamente nel
  punto dove la linea telefonica si immette nell'edificio,
  disconnettendo qualsiasi altra cosa che quella linea alimenti (se
  nessuno ha qualcosa in contrario).
  16.3.  L'invio o lo scarico di file  lento o interrotto.

  Il controllo di flusso (per il PC e/o da modem a modem) potrebbe non
  essere abilitato. Per il caso dell'invio di file: Se avete impostato
  un'altra velocit DTE (tipo 115.2K) allora il flusso dal vostro modem
  al vostro PC potrebbe funzionare bene ma molto del flusso di invio
  nell'altra direzione non passer completamente a causa del collo di
  bottiglia della linea telefonica.  Questo risulter in molti errori e
  nel reinvio dei pacchetti. Potrebbe anche volerci un tempo oltremodo
  lungo per spedire un file. In alcuni casi, i file non arrivano
  neppure.

  Per il caso dello scarico di file: Se state scaricando dei grandi file
  non compressi o delle pagine web, (ed il vostro modem usa la
  compressione dei dati) oppure se avete impostata una bassa velocit
  DTE, allore lo scarico potrebbe essere interrotto a causa della
  mancanza del controllo di flusso.


  16.4.  Ricevendo una chiamata continuo a ricevere "line NNN of inittab
  invalid"

  Ovvero: riga NNN di inittab non valida

  Assicuratevi di usare la sintassi corretta per la vostra versione di
  init.  I diversi init esistenti usano sintassi differenti nel file
  /etc/inittab.  Assicuratevi di usare la sintassi corretta per la
  vostra versione di getty.



  16.5.  Continuo a ricevere ``Id "S3" respawning too fast: disabled for
  5 minutes''

  Id "S3"  solo un esempio. In questo caso cercate la riga che inizia
  con "S3" in /etc/inittab. Questa  la causa del problema. Assicuratevi
  che la sintassi per questa riga sia corretta, che il dispositivo
  (ttyS3) esista e che possa essere trovato.

  Assicuratevi che il vostro modem sia configurato correttamente.
  Guardate i registri E e Q.  Questo pu capitare quando il vostro modem
  sta "chiaccherando" con getty.


  Per uugetty, verificate che la sintassi del vostro /etc/gettydefs sia
  corretta eseguendo il seguente comando:


       linux# getty -c /etc/gettydefs





  Questo pu anche capitare quando l'inizializzazione di uugetty
  fallisce.  Vedere la sezione  ``uugetty non funziona ancora''.


  16.6.  Il mio modem  bloccato dopo che qualcuno ha agganciato, oppure
  uugetty non riparte

  Questo pu capitare quando il vostro modem non effettua il reset dopo
  che  caduto il DTR.  Greg Hankins ha visto i suoi led RD e SD
  impazzire quando questo  successo.  Dovete fare resettare il vostro
  modem. Molti modem Hayes compatibili fanno questo con &D3, ma sul suo
  USR Courier, ha dovuto impostare &D2 e S13=1.  Controllate il manuale
  del modem (se ne avete uno).


  16.7.  uugetty non funziona ancora

  Esiste un'opzione DEBUG all'interno di getty_ps. Modificate il vostro
  file di configurazione /etc/conf.{uu}getty.ttySN e aggiungete
  DEBUG=NNN.  Dove NNN  una delle seguenti combinazioni di numeri a
  seconda di quello che state cercando di debuggare:



       D_OPT   001            impostazione opzioni
       D_DEF   002            elaborazione file di default
       D_UTMP  004            elaborazione di utmp/wtmp
       D_INIT  010            inizializzazione della linea (INIT)
       D_GTAB  020            elaborazione del file gettytab
       D_RUN   040            altre diagnostiche di runtime
       D_RB    100            ringback debugging
       D_LOCK  200            elaborazione del lockfile di uugetty
       D_SCH   400            elaborazione schedule
       D_ALL   777            tutto




  Impostare DEBUG=010  un buon punto da cui partire.

  Se avete in esecuzione syslogd, le informazioni di debugging
  appariranno nei vostri file di log.  Se non avete in esecuzione
  syslogd le informazioni appariranno in /tmp/getty:ttySN per il
  debugging getty e /tmp/uugetty:ttySN per uugetty ed in
  /var/adm/getty.log. Controllate la informazioni di debugging e vedete
  cosa sta succedendo. Molto probabilmente, dovrete regolare alcuni
  parametri nel vostro file di configurazione e riconfigurare il modem.

  Potete anche provare mgetty. Alcune persone hanno avuto miglior
  fortuna con quest'ultimo.

  Change log: Apr. 00: 2 porte allo stesso indirizzo

  16.8.  Le seguenti sottosezioni sono sia nel Serial che nel Modem
  HOWTO:

  16.9.  La mia porta seriale  fisicamente l ma non pu essere trovata

  Se un dispositivo (tipo un modem) pare funzionare allora la porta
  seriale  stata trovaata.  Se non funziona per niente, allora occorre
  assicurarsi che la vostra porta seriale possa essere trovata.

  Controllate i men ed i messaggi del BIOS. Per i bus PCI usate lspci
  Se  una porta seriale PnP su bus ISA provate "pnpdump --dumpregs" e/o
  consultate il Plug-and-Play HOWTO. Usando "scanport" otterrete una
  esplorazione di tutte le porte sul bus ISA e potreste scopire una
  porta sconosciuta che potrebbe essere una porta seriale (ma la porta
  non viene verificata). Il PC potrebbe bloccarsi.  Potreste provare a
  rilevarla con setserial. Vedere ``Probing''. Se nulla sembra passare
  attraverso la porta, essa  potrebbe esserci ma avere un interrupt
  sbagliato.  Vedere ``Estremamente lento: il testo appare sullo schermo
  lentamente e dopo lunghi ritardi''

  Se due porta hanno lo stesso indirizzo IO allora la verifica indicher
  in modo errato solo una porta.  La rilevazione Plug-and-play trover
  entrambe le porte cos questo potrebbe essere un problema solo se
  almeno una delle porte non  Plug-and-play. Errori di tutti i tipi
  potrebbero verificarsi per i dispositivi che stanno "condividendo una
  porta" ma il fatto che ci siano due dispositivi sulla stessa porta non
  sembra essere stato rilevato (eccetto, si spera, da voi). Se gli IRQ
  sono diversi la rilevazione dell'IRQ con setserial potrebbe "scopire"
  questa situazione non riuscendo a rilevare un IRQ. Vedere
  ``Rilevamento''.



  16.10.  Estremamente lento: il testo appare sullo schermo lentamente e
  dopo lunghi ritardi

   probabilmente un conflitto od una errata impostazione di interrupt.
  Ecco alcuni sintomi di quello che potrebbe succedere la prima volta
  che cercate di usare un modem, terminale o stampante. In alcuni casi
  digitate qualcosa ma sullo schermo non appare nulla se non dopo
  parecchi secondi. Solo l'ultimo carattere digitato potrebbe apparire.
  Potrebbe anche essere solo un invisibile carattere di <return> cos
  tutto quel che noterete sar che il cursore scende di una riga) In
  altri casi dove dovrebbero comparire molti dati sullo schemo, sono un
  gruppo di circa 16 caratteri compare. Poi c' un'attesa di parecchi
  secondi per il prossimo gruppo di caratteri. Potreste anche ricevere
  messaggi di errore di "input overrun" (o trovarli nei file di log)

  Per ulteriori dettaglio sui sintomi e perch questo accade vedere il
  Serial-HOWTO sezione "Interrupt Problems Details".

  Se la cosa coinvolge anche dispositivi Plug-and-Play, vedere anche il
  Plug-and-Play HOWTO.

  Come veloce controllo per vedere se veramente si tratta di un problema
  di interrupt, impostate l'IRQ a zero con "setserial". Questo dice al
  driver di non usare gli interrupt ma il polling. Se sembra che questo
  risolva i problemi di "lentezza", allora si tratta di un problema di
  interrupt.  Dovreste comunque cercare di risolverlo visto che il
  polling usa esagerate risorse del computer.

  Cercare di trovare il conflitto di interrupt potrebbe non essere
  semplice visto che si suppone che Linux non consenta alcun conflitto
  di interrupt e di conseguenza vi invii un errore di ``/dev/ttys?:
  Device or resource busy (Dispositivo o risorsa impegnata)'' se pensa
  che stiate tentando di creare un conflitto. Ma un vero conflitto pu
  essere creato se "setserial" dispone di informazioni errate. Quindi
  usare "setserial" non far rilevare alcun conflitto (e neppure
  guardando in /proc/interrupts che basa le suo informazioni su
  "setserial"). Dovete quindi sapere quello che "setserial" pensa cos
  che possiate evidenziare quello che  sbagliato e cambiarlo quando
  avrete determinato quello che  veramente impostato nell'hardware.

  Quello che dovete fare  verificare come  impostato l'hardware
  controllando i "jumper" od usando software PnP per controllare le vere
  impostazioni dell'hardware. Per il PnP potete lanciare "pnpdump
  --dumpregs" (se  un bus ISA)  o "lspci" (bus PCI). Confrontate i
  risultati con quello che Linux pensa sia impostato nell'hardware.



  16.11.  Abbastanza lento: Mi aspettavo che fosse un poco pi veloce

  Una ragione potrebbe essere che qualunque cosa sia sulla porta seriale
  (tipo un modem, un terminale, una stampante) non funziona cos veloce
  come pensate che dovrebbe.  Un modem a 56k raramente funziona a 56k ed
  Internet spesso  congestionata ed ha colli di bottiglia che
  rallentano le cose. Se il modem dall'altra parte non ha una
  connessione digitale alla linea telefonica (ed usa uno speciale "modem
  digitale" non in vendita nella maggior parte dei negozi di computer),
  allora le velocit oltre i 33,6k non sono possibili.
  Un'altra possibile ragione  che il driver seriale pensa che abbiate
  una porta seriale obsoleta (UART 8250, 16450, o le prime 16550).
  Vedere ``Cosa sono le UART?''.  Usate "setserial -g /dev/ttyS*".  Se
  mostra qualsiasi cosa meno di 16550A, allora  probabilmente proprio
  questo il problema.  Se invece "setserial" lo identifica cos
  sbagliando, modificatela. Vedere ``Cos' Serial?'' per maggiori
  informazioni. Naturalmente se avete veramente una porta obsoleta,
  mentire a setserial su questo non far altro che peggiorare le cose.



  16.12.  La schermata di avvio mostra IRQ sbagliati per le porte seri
  ali.

  Linux non esegue nessuna identificazione di IRQ in avvio. Quando il
  modulo di setserial si carica esegue semplicemente una rilevazione del
  dispositivo seriale.  Quindi non fate caso a quello che dice circa
  l'IRQ, perch sta semplicemente assumendo gli IRQ standard. Cos 
  fatto, perch l'identificazione degli IRQ  inaffidabile e potrebbe
  essere ingannevole. Ma se e quando setserial viene lanciata da uno
  script di avvio, cambia gli IRQ e visualizza il nuovo (ed
  auspicabilmente corretto) stato nella schermata di partenza. Se l'IRQ
  sbagliato non viene corretto da una seguente visualizzazione sullo
  schermo, allora avete un problema.

  Quindi, anche se ho la mia ttyS2 impostata ad IRQ 5, continuo a vedere


       ttyS02 at 0x03e8 (irq = 4) is a 16550A




  all'inizio quando parte Linux (i vecchi kernel potrebbero mostrare
  "ttyS02" come "tty02") Dovete usare setserial per dire a Linux che IRQ
  state usando.


  16.13.  "Cannot open /dev/ttyS?: Permission denied"

  Ovvero: Impossibile aprire /dev/ttyS?: Permesso negato

  Controllare i permessi su questa porta con "ls -l /dev/ttyS?".  Se
  siete i proprietari di questa ttyS? allora dovete avere i permessi di
  lettura e scrittura: crw con il c (Character device) in colonna 1. Se
  non siete i proprietari dovreste invece vedere rw- nelle colonne 8 e 9
  che significa che tutti hanno diritti di lettura e scrittura su di
  esso. Usate "chmod" per cambiare i permessi. Ci sono modi pi
  complicati per ottenere accessi tipo appartenere ad un "gruppo" che ha
  permessi di gruppo.


  16.14.  "Operation not supported by device" per ttySx

  Ovvero: Operazione non supportata dal dispositivo

  Questo vuol dire che un operazione richiesta da setserial, stty, ecc.
  non pu essere effettuata perch il kernel non la supporta.  In
  precedenza questo era spesso causato dal fatto che il modulo seriale
  non era stato caricato. Ma con l'avvento del PnP, potrebbe pi
  probabilmente dire che non c' un modem (od altro dispositivo seriale)
  all'indirizzo dove il driver (e setserial) pensa che sia. Se non c'
  un modem l, i comandi inviati a quell'indirizzo ovviamente non
  vengono eseguiti.  Vedere ``Cos' impostato nell'hardware della mia
  porta seriale?''.

  Se il modulo seriale non era caricato ma "lsmod" mostra che ora 
  caricato potrebbe essere il caso che sia stato caricato adesso ma non
  lo era quando si  ricevuto il mesasggio di errore. In molti casi il
  modulo verr automaticamente caricato quando necessario (se si riesce
  a trovare). Per forzare il caricamento del modulo seriale si potrebbe
  elencarlo nel file /etc/modules.conf o /etc/modules. Il vero modulo
  dovrebbe risiedere in /lib/modules/.../misc/serial.o.


  16.15.  "Cannot create lockfile. Sorry" (Spiacente, non posso creare
  il file di lock)

  Ovvero: Spiacente, impossibile creare il file di lock.

  Quando viene "aperta" una porta da un programma viene creato un file
  di lock in /var/lock. Errati permessi per la directory lock non
  consentiranno la creazione di un file di lock.  Usare "ls -ld
  /var/lock" per vedere se i permessi sono a posto: in genere rwx per
  tutti (ripetuto 3 volte). Se  sbagliato, usate "chmod" per mettere a
  posto lo cose.  Naturalmente, se non esiste una directory di lock
  nessun file di lock potr esservi creato.  Vedere la sottosezione del
  Serial-HOWTO: "What Are Lock Files".


  16.16.  "Device /dev/ttyS? is locked." (Il dispositivo /dev/ttyS? 
  bloccato)

  Ovvero: Il dispositivo dev/ttyS?  bloccato./

  Questo vuol dire che qualcun altro (o qualche altro processo) sta
  presumibilmente usando la porta seriale. Ci sono diversi modi per
  cercare di scoprire quale processo la sta usando.  Un modo  dare un
  occhiata al contenuto del file di lock (/var/lock/LCK...). Dovrebbe
  essere l'identificativo del processo. Se l'identificativo  diciamo
  261 digitate "ps 261" per scoprire cosa sia. Poi, se il processo non 
  pi necessario, potrebbe essere gentilmente eliminato da "kill 261".
  Se si rifiuta di essere eliminato usate "kill -9 261" per forzare
  l'eliminazione, ma in questo caso il file di lock non sar rimosso, e
  dovrete provvedere manualmente. Naturalmente se non c' un processo
  261 allora basta che rimuoviate il file di lock, ma nella maggior
  parte dei casi il file di lock dovrebbe esser stato automaticamente
  rimosso se contiene un identificativo di processo chiuso (come 261).


  16.17.  "/dev/ttyS?: Device or resource busy" (Dispositivo o risorsa
  occupati)

  Significa che il dispositivo al quale state tentando di accedere (o
  usare)  presumibilmente occupato (in uso) o che una risorsa di cui
  necessita (tipo un IRQ)  presumibilmente in uso da parte di un altro
  dispositivo. Talvolta  davvero occupato ma in altri casi sembra
  erroneamente in uso.

  "resource busy" (risorsa impegnata) spesso vuol dire (ad esempio per
  ttyS2) "Non puoi usare ttyS2 visto che un altro dispositivo sta usando
  l'interrupt di ttyS2". Il potenziale conflitto di interrupt 
  determinato da quello che pensa "setserial". Un messaggio di errore
  pi accurato dovrebbe essere "Non posso usare ttyS2 visto che i dati
  di setserial (e quelli del kernel) indicano che un altro dispositivo
  sta usando l'interrupt di ttyS2". Se due dispositivi usano lo stesso
  IRQ e voi fate partire uno solo dei due dispositivi, tutto  a posto
  perch non c' ancora conflitto. Ma quando in seguito cercate di
  lanciare il secondo dispositivo (senza chiudere il primo) otterrete il
  messaggio di errore "... resource busy". Questo perch il kernel tiene
  traccia solamente di quale IRQ  realmente in suo e i conflitti non
  capitano a meno che i dispositivi siano in uso (aperti)
  Ci sono due casi: Potrebbe esserci un vero conflitto di interrupt che
  si sta evitando.  Ma se setserial ha sbagliato, allora non dovrebbe
  esserci alcuna ragione perch ttyS2 non possa essere usata, eccetto
  che setserial ha erroneamente previsto un conflitto. Quello che
  occorre fare  scoprire quale interrupt setserial pensa che stia
  usando ttyS2. Pi facile a dirsi che a farsi visto che non potete
  usare il comando "setserial" per ttyS2 visto che l'IRQ per ttyS2 
  presumibilmente occupato ed otterreste lo stesso messaggio di errore
  "... busy". Per risolvere o eseguite un riavvio oppure: uscite od
  eliminate tutti i processi che potrebbero cauasre il conflitto. Se
  riavviate: 1.  osservate i messaggi in fase di avvio relativi alle
  porte seriali. 2. Sperate che il file che lancia "setserial" all'avvia
  non sia esso stesso a creare ancora lo stesso conflitto.

  Se pensate di sapere quale IRQ stia usando ttyS2 allora potreste dare
  uno sguardo a /proc/interrupts per scoprire chi altro sta attualmente
  usando questo IRQ.  Potreste anche voler fare un doppio controllo
  perch qualsiasi IRQ mostrato qui (e da "setserial") sia corretto (lo
  stesso di quello impostato nell'hardware). Un modo per provare se c'
  o meno un conflitto di interrupt  impostare l'IR1 a 0 (polling)
  usando "setserial". Se il messaggio di risorsa occupata (busy)
  scompare, probabilmente c' un potenziale conflitto di interrupt. Non
   una buona idea lasciarlo permanentemente impostato a 0 visto
  verranno usate pi risorse della CPU.

  Questo paragrafo  principalmente per il caso in cui un modem  usato
  sia per chiamare che per ricevere chiamate. Se il segnale DSD 
  inviato alla porta, quello porta penser che sia occupata.  Questo
  problema pu sorgere quando state cercando di chiamare con un modem
  quando DTC o DTR non sono implememntati correttamente. DCD dovrebbe
  essere attivo quando c' una effettiva connessione (ad esempio
  qualcuno ci ha chiamati), non quando getty sta guardando la porta.
  Assicuratevi che il vostro modem sia configurato per attivare DCD solo
  quando c' una connessione.  DTR dovrebbe essere attivo ogniqualvolta
  qualcuno sta usando o guardando la linea, tipo getty, kermit, o
  qualche altro programma di comunicazione.



  16.18.  Strumenti per la risoluzione dei problemi

  Questi sono alcuni dei programmi che potreste aver bisogno di usare
  per la risoluzione dei problemi:

    "lsof /dev/ttySx" far un elenco delle porte seriali che sono
     aperte.

    "setserial" mostra ed imposta la configurazione hardware a basso
     livello di una porta (quella che il driver pensa che sia). Vedere
     ``Cos' setserial''.

    "stty" mostra ed imposta la configurazione di una porta (ad
     eccezione di quanto gestito da "setserial").  Vedere la sezione del
     Serial-HOWTO: "Stty",

    "modemstat" o "statserial" che mostrano lo stato corrente dei vari
     segnali di linea (tipo DTR, CTS, ecc.)  di segnale (tipo DTR, CTS,
     ecc)

    "irqtune" dar agli interrupt della porta seriale una priorit
     maggiore per migliorare le prestazioni.

    "hdparm" per la messa a punto dell'hard-disk potrebbe fornire un
     ulteriore aiuto


    "lspci" mostra gli effettivi IRQ, ecc, dell'hardware del bus PCI.

    "pnpdump --dumpregs" mostra gli effettivi IRQ, ecc., dell'hardware
     per i dispositivi PnP sul bus ISA.

    Alcuni "file" nella directory /proc (tipo ioports e interupts).



  17.  Aggiornamenti delle memorie Flash

  Molti modem possono essere aggiornati riprogrammando la loro memoria
  flash tramite un programma di aggiornamento che si ottiene da
  Internet.  Inviando questo "programma" dal PC tramite la porta seriale
  al modem, il modem immagazziner il programma nella sua memoria non
  volatile (quella che rimane anche quando il modem viene spento).  Le
  istruzioni di installazione vertono generalmente su quanto occorre
  fare sotto Windows cos dovrete scoprire come fare l'equivalente sotto
  Linux (a meno che si voglia installare l'aggiornamento sotto Windows).
  L'invio di un programma al modem viene spesso chiamato "download".

  Se l'ultima versione di questo HOWTO contiene ancora questa richiesta
  (vedere ``Nuove versioni di questo HOWTO'') per favore illustratemi la
  vostra esperienza installando questi aggiornamenti, che potrebbe
  essere utile ad altri.

  Ecco l'idea di base per eseguire un aggiornamento (upgrade). Per prima
  cosa, potrebbe esserci un comando che dovete inviare al vostro modem
  per dirgli che quello che segue  un aggiornamento della flash ROM.
  In un caso questo comando era AT**. Per fare questo lanciano un
  programma di comunicazione (tipo minicom) e digitare. Prima digitate
  AT <enter> per vedere se vostro modem  l e risponde "OK".

  Poi, dovete inviare un file (talvolta due file) direttamente al modem.
  I programmi di comunicazione (come minicom) spesso usano zmodem o
  kermit per inviare file al modem (e oltre) ma essi mettono il file
  dentro dei pacchetti ai quali aggiungono delle intestazioni, mentre
  voi volete che sia inviato il file esatto, non uno modificato.  Ma il
  programma kermit ha un comando "transmit" che invier il file
  direttamente (senza usare i pacchetti kermit), cos questo  un modo
  di inviare un file direttamente.  Minicom al 1998 non ha questa
  capacit.

  Un altro modo di inviare il(i) file potrebbe essere uscire dal
  programma di comunicazione aprendo una shell (in minicom si usa ^AJ)
  poi: cat nome_file_aggiornamento > /dev/ttyS2  (se la vostra porta
  seriale  ttyS2).  Poi tornare al programma di comunicazione
  (digitando fg al prompt della riga comandi in minicom) per vedere cosa
   successo.

  Ecco una sessione di esempio per un determinato modem Rockwell (C-a 
  ^A):

  - Lanciare minicom
  - Digitare AT** : vedere "Download initiated .."
  - C-a J
  - cat FLASH.S37 > /dev/modem
  - fg : vedere "Download flash code .."
  - C-a J
  - cat 283P1722.S37 > /dev/modem
  - fg : vedere "Device successfully programmed"





  18.  Altre fonti di informazione

  18.1.  Varie


    pagine di manuale per: agetty(8), getty(1m), gettydefs(5),

     init(1), isapnp(8), login(1), mgetty(8), setserial(8)

    Il vostro manuale del modem (se esiste). Alcuni modem vengono
     rilasciati senza manuale.

    Serial  Suite <ftp://scicom.alphacdc.com/pub/linux> di Vern Hoxie 
     una collezione di trucchi sulla cura e l'alimentazione delle porte
     seriali in Linux pi alcuni semplici programmi.

    La Linux serial mailing list. Per essere inclusi, inviate una email
     a majordomo@vger.rutgers.edu, con  ``subscribe linux-serial'' nel
     corpo del messaggio. Se inviate '`help'' nel corpo del messaggio,
     riceverete un messaggio di aiuto. Il server gestisce anche molte
     altre liste di Linux. Inviate il comando ``lists'' per un elenco
     delle mailing list.


  18.2.  Libri

  Non stato capace di trovare un buon libro aggiornato sui modem.

    The Complete Modem Reference by Gilbert Held, 1997.  Contiene
     troppe informazioni che riguardano argomenti superati.  Maggiori
     informazioni aggiornate possono essere trovate su Internet.

    Modems For Dummies by Tina Rathbone, 1996.  (Non l'ho mai visto.)

    Ultimate Modem Handbook di Cass R. Lewart, 1998.



  18.3.  HOWTO



    Cable-Modem mini-howto

    ISDN Howto (non  un Howto di LDP)
     <http://www.suse.de/Support/sdb_e/isdn.html>: drivers per ISDN
     "Modems". La maggior parte delle informazioni  in tedesco

    Linux-Modem-Sharing mini-howto. Computer in rete condividono un
     singolo modem che chiamare l'esterno (tipo la condivisione di una
     stampante).

    Modems-HOWTO: In Francese (non usato nel creare questo Modem-HOWTO)

    NET-3-4-HOWTO: tutto sul networking, incluso SLIP, CSLIP, e PPP

    PPP-HOWTO: aiuto sul PPP incluso il set-up del modem.

    Serial-HOWTO ha informazioni sulle schede seriali multiporta usate
     sia per terminali che per i banchi di modem. Tratta la porta
     seriale pi dettagliatamente di questo HOWTO.

    Serial-Programming-HOWTO: per certi aspetti della programmazione
     delle porte seriali


    Text-Terminal-HOWTO: (incluso la connessione con modem)

    UUCP-HOWTO: per informazioni sull'impostazione di UUCP


  18.4.  newsgroup Usenet



    comp.os.linux.answers: FAQ, How-To, README, ecc. su Linux.

    comp.os.linux.hardware: Compatibilit hardware con il sistema
     operativo Linux.

    comp.os.linux.setup: Installazione di Linux e amministrazione del
     sistema.

    comp.dcom.modems: Modem per tutti i sistemi operativi.


  18.5.  Siti Web



    Elenco di modem che funzionano/non funzionano sotto Linux
     <http://www.o2.net/~gromitkc/winmodem.html>

    Comandi AT per modem Hayes: Technical Reference for Hayes (tm)
     Modem Users <http://www.hayes.com/TechSupport/techref/>

    Rockwell-based modem commands
     <http://www.rss.rockwell.com/techinfo/>

    Modem FAQ:
     Navas 28800 Modem FAQ
     <http://web.aimnet.com/~jnavas/modem/faq.html>

    Curt's High Speed Modem Page
     <http://www.teleport.com/~curt/modems.html>

    Molte informazioni sui modem a 56k 56k Modem = v.Unreliable
     <http://808hi.com/56k/>

    Links to modem manufacturers
     <http://www.56k.com/links/Modem_Manufacturers/>

    Identifying modems by FCC ID
     <http://www.sbsdirect.com/fccenter.html>


  19.  Appendice A: Come funzionano i Modem analogici (tecnica) (non
  finita)

  19.1.  La modulazione nei dettagli

  19.1.1.  Introduzione alla modulazione

  Questa parte descrive i metodi di modulazione usati per i modem
  convenzionali. Non tratta i metodi di alta velocit (modulus
  conversion), talvolta usati dai ``I modem a 56k (v.90)''. Ma anche i
  modem a 56k usano i metodi di modulazione qui descritti.

  La modulazione  la conversione di un segnale digitale rappresentato
  da valori binary (0 o 1) in un segnale analogico che ricorda un'onda
  sinusoidale.  Il segnale modulato consiste in un segnale di un onda
  sinusoidale pura "portante" che  modificata per veicolare
  informazioni. Un'onda portante sinusoidale pura, non cambiando in
  frequenza e voltaggio, non genera un flusso di informazioni (ad
  eccezione del fatto che sia presente una portante). Per fare
  convogliare le informazioni modifichiamo (o moduliamo) questa
  portante. Ci sono 3 tipi principali di modulazione: frequenza,
  ampiezza e fase. Verranno di seguito spiegate.


  19.1.2.  Modulazione di frequenza

  Il pi semplice metodo di modulazione  la modulazione di frequenza.
  La frequenza  misurata in cicli per secondo (di un'onda sinusoidale).
   il conto del numero di volte in cui la forma dell'onda sinusoidale
  ripete se stessa in un secondo.  la stessa cosa del numero di volte
  che raggiunge il valore pi alto in un secondo. La parola "Hertz"
  (abbreviato Hz) viene usato per intendere "cicli per secondo".

  Un semplice esempio di modulazione di frequenza  dove una frequenza
  significa uno 0 binario ed un'altra significa 1. Ad esempio, per
  alcuni modem obsoleti da 300 baud, 1070 Hz significa uno 0 binario
  mentre 1270 Hz significa un 1 binario.  Questo viene chiamato
  "Frequency shift keying". Invece di solo due possibili frequenze, se
  ne potrebbero usare di pi per consentire la trasmissione di pi
  informazioni. Se abbiamo 4 differenti frequenze (che chiameremo A, B,
  C, e D), allora ognuna di queste potrebbe supportare un paio di bit.
  Ad esempio per inviare 00 si dovrebbe usare la frequenza A. Per
  inviare un 01, usiamo la frequenza B, per 10 usiamo C, per 11 usiamo
  D. In questo modo, usando 8 frequenze differenti potremo inviare 3 bit
  per ogni cambiamento di frequenza.  Ogni volta che raddoppiamo il
  numero delle frequenze possibili, incrementiamo il numero di bit che
  possiamo rappresentare di 1.


  19.1.3.  Modulazione di ampiezza

  Una volta capito l'esempio della modulazione di frequenza sopra
  indicato, incluso le possibilit di rappresentare alcuni bit tramite
  un singolo spostamento nella frequenza,  facile capire sia la
  modulazione di ampiezza e la modulazione di fase. Per modulazione di
  ampiezza basta cambiare l'altezza (voltaggio) dell'onda sinusoidale
  equivalente per cambiare la frequenza dell'onda sinusoidale. Per un
  caso semplice ci potrebbero essere solo 2 livelli di ampiezza
  consentiti, una rappresentato da un bit 0 e l'altro rappresentato da
  un bit 1. Come spiegato per il caso della modulazione di frequenza,
  l'avere diverse possibili ampiezze risulter in maggiori informazioni
  che si trasmettono per cambiamento in ampiezza.



  19.1.4.  Modulazione di fase

  Per cambiare la modulazione di fase di un onda sinusoidale in un certo
  perido di tempo, dobbiamo smettere di inviare questa vecchia onda
  sinusoidale ed immediatamente iniziare ad inviare una nuova onda
  sinusoidale della stessa frequenza ed ampiezza. Se iniziamo ad inviare
  la nuova onda sinusoidale allo stesso livello di voltaggio (e con la
  stessa pendenza) presente quando abbiamo interrotto l'invio della
  vecchia onda sinusoidale, non ci sar nessun cambio di fase (e nessun
  cambio identificabile in assoluto). Ma supponiamo di avere iniziato la
  nuova onda sinusoidale ad un differente punto della curva dell'onda
  sinusoidale. Si dovrebbe probabilmente verificare un improvviso sbalzo
  di voltaggio al punto temporale dove la vecchia onda sinusoidale si 
  fermata ed  iniziata la nuova. Questo  uno spostamento di fase ed 
  misurato in gradi (deg.) Uno spostamento di fase di deg 0 (o di deg
  360) significa nessun cambiamento in assoluto, mentre uno spostamento
  di fase di 180 inverte il voltaggio (e pendenza) dell'onda
  sinusoidale. Rendendolo in altri termini, uno spostamento di fase di
  180 deg semplicemente salta in avanti di un mezzo periodo (180 deg) al
  punto di transizione. Naturalmente si potrebbe saltare di, diciamo, 90
  deg o 135 deg. Cos come nell'esempio della modulazione di frequenza,
  maggiori sono i possibili spostamenti di fase, maggiori bit possono
  essere rappresentati da un singolo spostamento di fase.


  19.1.5.  Modulazione combinata

  Invece di selezionare semplicemente sia la frequenza, l'ampiezza o la
  modulazione di fase, possiamo scegliere di combinare i metodi di
  modulazione.  Supponiamo di avere 256 frequenze possibili, quindi
  possiamo trasmettere un byte (8 bit) per ogni spostamento di frequenza
  (visto che 2 elevato alla 8 equivale a 256). Supponiamo anche di avere
  altre 256 differenti ampiezze cos che ogni spostamento in ampiezza
  rappresenti un byte. Supponiamo anche che ci siano 256 spostamenti di
  fase possibili. Poi in un certo momento vogliamo fare uno spostamento
  in tutte e 3: frequenza, ampiezza e fase. Questo significherebbe
  spedire 3 byte per ognuna di queste transazioni.

  Nessun metodo di modulazione in uso oggi fa veramente questo. Non 
  pratico a causa del tempo relativamente lungo che occorrerebbe per
  rilevare tutti i 3 tipi di cambiamento. Il problema principale  che
  frequenti cambi di fase possono far sembrare che sia accaduto un
  cambio in frequenza laddove in realt non  successo.

  Per evitare questi problemi si potrebbe cambiare simultaneamente solo
  la fase e l'ampiezza (senza nessun cambio di frequenza).  Questa viene
  chiamata modulazione di fase-ampiezza (qualche volta chiamata anche
  "quadrature amplitude modulation" = QAM). Questo metodo  usato per le
  comuni velocit dei modem di 14,4k, 28.8k, e 33.6k. Il solo caso
  significativo dove questo metodo di modulazione non viene oggi usato 
  per i modem a 56k.  Ma anche i modem a 56k usano esclusivamente QAM
  (modulazione di fase-ampiezza) nella direzione dal vostro PC in uscita
  verso la linea telefonica.  Qualche volta anche nell'altra direzione
  si ritorna alla modulazione QAM quando le condizioni della linea non
  sono sufficientemente buone. Quindi QAM (modulazione di fase-ampiezza
  ) rimane ancora il metodo pi largamente usato nelle ordinarie linee
  telefoniche.


  19.1.6.  I Modem a 56k (v.90)

  Il metodo di modulazione usato sopra i 33.6k  completamente diverso
  dalla comune modulazione fase-ampiezza.  Visto che le chiamate
  telefoniche ordinarie sono convertite in segnali digitali nelle
  centraline locali della compagnia telefonica, la velocit pi elevata
  con la quale si possono spedire dati digitali tramite una ordinaria
  chiamata telefonica  la stessa di quella che la compagnia telefonica
  usa lungo la sua porzione digitale della trasmissione della chiamata
  telefonica.  Qual  questa velocit? Beh,  vicina ai 64Kbps. Dovrebbe
  essere 64k ma talvolta alcuni bit sono "rubati" per scopi di
  segnalazione. Ma se la compagnia telefonica sa che il collegamento non
   per la voce, i bit potrebbero non essere rubati. Verr presentato il
  caso dei 64k, quindi verr spiegato perch la velocit reale  pi
  bassa (56k o meno -- in genere significativamente meno).

  Quindi 64k  la maggiore velocit possibile per una chiamata
  telefonica ordinaria usando la porzione digitale del circuito che era
  stata concepita per inviare le codifiche digitali della voce umana.
  Per potere usare 64k, il modem deve sapere esattamente come la
  compagnia telefonica faccia la sua codifica digitale del segnale
  analogico. Questo compito  troppo complicato se entrambi gli estremi
  di una chiamata telefonica hanno un'interfaccia analogica alla
  compagnia telefonica. Ma se da una parte si ha una interfaccia
  digitale, allora  possibile (almeno in una direzione). Quindi se il
  vostro ISP ha una interfaccia digitale con la compagnia telefonica,
  l'ISP pu inviare un certo segnale digitale attraverso la linea
  telefonica verso il vostro PC.  Il segnale digitale dall'ISP viene
  convertito in analogico alla centralina telefonica vicina alla
  locazione fisica del vostro PC (forse vicino a casa vostra).  Poi 
  compito del vostro modem cercare di capire esattamente che cos'era
  quel segnale digitale. Se pu fare questo, allora la trasmissione a
  64k (la velocit del segnale digitale della compagnia telefonica) 
  possibile in questa direzione.

  Che metodo usa la compagnia telefonica per decodificare in digitale i
  segnali analogici? Usa il metodo di campionare l'ampiezza del segnale
  analogico alla velocit di 8000 campioni per secondo. Ogni ampiezza
  campione  codificata come un byte a 8 bit (tipo ASCII). (Notare: 8 x
  8000 = 56k). Questa viene chiamata "Pulse Code Modulation" = PCM.
  Questi byte sono poi inviati digitalmente sui circuiti digitali della
  compagnia telefonica dove diverse chiamate condividono un singolo
  circuito, usando uno schema di time-sharing chiamato "time division
  multiplexing". Poi finalmente nella locale centralina telefonica
  vicina a casa vostra, il segnale digitale viene demultiplexato
  risultando nello stesso segnale digitale cos come originariamente
  creato da PCM. Questo segnale viene poi riconvertito in analogico ed
  inviato a casa vostra. Ogni byte da 8-bit crea una certa ampiezza del
  segnale analogico. Il vostro modem deve determinare cosa era quel byte
  PCM a 8 bit basandosi sulla ampiezza analogica che rileva.

  Questa  (in un certo senso) una "demodulazione di ampiezza" ma non
  realmente. Non si tratta di "demodulazione di ampiezza" perch non vi
   portante. In verit, viene chiamata "conversione di modulo"
  ("modulus conversion") che  l'inverso di PCM. Per determinare il
  segnale digitale che la compagnia telefonica ha usato per creare il
  segnale analogico, il modem deve campionare questo segnale di ampiezza
  analogica esattamente agli stessi punti temporali che la compagnia
  telefonica ha usato quando ha creato il segnale analogico. Per fare
  questo viene un generato un segnale temporizzato dal segnale residuo
  di 4k Hz sulla linea telefonica analogica. La creazione dei campioni
  di ampiezza che escono dalla vostra casa/ufficio ad 8k campioni/sec
  circa creano un segnale di 4k. Supponete che ogni altra ampiezza fosse
  di polarit opposta.  Allora dovrebbe essere stata creata un'onda
  simile alla sinusoidale di 4k Hz. Ogni ampiezza  in un certo senso un
  simbolo ad 8 bit e quando si campionano le ampiezze  conosciuto come
  "symbol timing".

  Ora la codifica di queste ampiezze in PCM non  lineare. A basse
  ampiezze un incremento di 1 nel byte PCM rappresenta un incremento
  molto pi piccolo nell'ampiezza del segnale analogico rispetto a
  quella che sarebbe se l'ampiezza che viene campionata fosse pi alta.
  Quindi per basse ampiezze  difficile distinguere tra valori di byte
  adiacenti.  Per facilitare le cose, alcuni codici PCM rappresentanti
  ampiezze molto basse non sono usati.  Questo d un delta pi ampio tra
  le possibili ampiezze e fa s che il modem le riconosca correttamente
  con pi facilit. Quindi la met dei livelli di ampiezza non sono
  usati dal v.90. Questo  equivalente ad ogni simbolo (livello di
  ampiezza consentito) che rappresenta 7 bit invece di 8. Ecco da dove
  proviene il 56k: 7 bit/simbolo x 8k simboli/secondo = 56k bps.
  Naturalmente ogni simbolo  in realt generato da 8 bit ma solo 128
  byte dei possibili 256 sono effettivamente usati. C' una tavola di
  codici che mappa questo 128 byte a 8 bit con quelli a 7 bit.

  Ma  un poco pi complicato di questo. Se le condizioni della linea
  non rasentano la perfezione, allora sono usati anche meno livelli
  (simboli), risultando in velocit sotto i 56k. Negli Stati Uniti,
  anche a causa di regole governative che proibiscono gli alti voltaggi
  sulle linee telefoniche, certi alti livelli di ampiezza non posssono
  essere usati, risultando quindi in soli 53.3k circa al massimo per i
  modem a 56k.

  Notate che la parte digitale della rete telefonica  bi-direzionale.
  Questi due circuiti sono usati per una chiamata telefonica, uno in
  ciascuna direzione. Il segnale a 56k viene usato solamente in una di
  queste direzioni: dal vostro ISP al vostro PC. Nell'altra direzione
  dalla casa/ufficio verso l'ISP  usato lo schema convenzionale di
  modulazione fase-ampiezza con un massimo di 36.6k (e non 53.3K).
  Inoltre grazie a sofisticati metodi di cancellazione (non spiegati
  qui) consente di inviare simultaneamente in entrambe le direzioni.


  19.2.  Full duplex (bidirezionalit) in un circuito

  I modem moderni sono capaci di ricevere ed inviare segnali
  contemporaneamente. Si potrebbe chiamare questa capacit
  "bidirezionale" o "full duplex". Una volta la cosa era fatta usando
  una frequenza per inviare ed un'altra per ricevere. Oggi, la stessa
  frequenza viene usata sia per la trasmissione che per la ricezione.
  Come funzioni la cosa non  facile da capire.

  La maggior parte delle linee principali del sistema telefonico sono
  digitali con due canali in uso quando si fa una chiamata telefonica.
  Quello che dite va su un canale digitale e quello che dice l'altra
  persona va sull'altro (inverso) canale digitale. Sfortunatamente, la
  porzione del sistema telefonico che va alle case (e molti uffici) non
   digitale ma  un singolo canale analogico. Se entrambi i modem
  fossero direttamente connessi con la parte digitale del sistema
  telefonico allora la comunicazione bidirezionale (inviare e ricevere
  allo stesso tempo) non sarebbe un problema visto che sarebbe
  disponibili due canali.

  Ma le porzioni finali del percorso del segnale passano su un solo
  circuito. Come  possibile che ci sia  comunicazione simultanea nei
  due sensi? Funziona grossomodo cos. Supponete che il vostro modem
  stia ricevendo un segnale dall'altro modem e non stia trasmettendo. In
  questo caso non c' problema. Ma se si iniziasse a trasmettere (mentre
  l'altro segnale in ricezione sta ancora scorrendo nel modem) il
  segnale in ricezione sarebbe soffocato. Se il segnale in trasmissione
  fosse un'onda di voltaggio "solida" applicata alla fine della linea
  non ci sarebbe alcuna possibilit che un qualsiasi segnale in
  ricezione possa essere presente a quel punto.

  Ma il trasmettitore ha una "impedenza interna" ed segnale in
  trasmissione applicato alla fine della linea non  solido (o
  abbastanza forte) da eliminare completamente il segnale in ricezione
  che arriva dall'altro capo. Quindi mentre il voltaggio alla fine della
  linea  per la maggior parte il pi forte segnale in trasmissione, una
  piccola parte di esso  il segnale in ricezione richiesto.  Tutto
  quello che serve  filtrare il segnale in trasmissione, pi forte, e
  quello che rimane sar il segnale dall'altro capo che vogliano. Per
  fare questo, basta prendere il puro segnale in trasmissione
  direttamente dal trasmettitore (prima che sia applicato sulla linea),
  amplificarlo per un determinato ammontare, quindi sottrarlo dal
  segnale totale presente alla fine della linea.  Facendo questo nei
  circuiti di ricezione rimane un segnale che per la maggior parte
  proviene dall'altra parte della linea.


  19.3.  Eliminazione dell'eco

  Un segnale che viaggia attraverso una linea in una direzione potrebbe
  incontrare cambiamenti nella linea che far si che parte del segnale
  venga riecheggiato all'indietro nella direzione opposta.  Visto che
  viene usato lo stesso circuito per il flusso bidirezionale di dati
  detti eco genereranno ricezioni sporche. Un modo di migliorare le cose
   inviare segnali di prova ogni tanto per determinare le
  caratteristiche di eco della linea. Questo consentir di predirre gli
  eco che potrebbero essere generati ad ogni segnale. Quindi il metodo
  di predizione  usato per predirre quali eco il segnale in tramissione
  provocher. Poi questo eco presunto del segnale viene sottratto dal
  segnale ricevuto.  Questo elimina gli eco.


  20.  Appendice B: Digital Modem Signal Processing (non fatta)

  21.  Appendice C: "baud" contro "bps"

  21.1.  Un semplice esempio

  "baud" e "bps" sono forse due dei termini pi abusati nel campo dei
  computer e delle telecomunicazioni. Molte persone usano questi due
  termini indifferentemente, quando in realt essi sono diversi! bps 
  semplicemente il numero dei bit trasmessi per secondo. Il baud rate 
  la misura di quante volte per secondo un segnale cambia (o potrebbe
  cambiare). Per una comune porta seriale il bit 1  -12 volt e il bit 0
   +12 v (volt). Se 38.400 bps sono una sequenza di 010101 ...
  dovrebbero essere anche 38.400 baud visto che il voltaggio cambia
  avanti e indietro da positivo a positivo a negativo ... e ci sono
  38400 cambiamenti per secondo. Per un'altra sequenza, diciamo
  111000111... ci saranno minori cambiamenti di voltaggio visto che per
  i tre 1 in sequenza il voltaggio rimane a -12 volt, eppure diciamo che
  abbiamo ancora 38.400 baud visto che esiste la possibilit che il
  numero di cambiamenti per secondo raggiunga quel valore.

  Vista in altro modo, mettiamo un immaginario marcatore che separi ogni
  bit (anche se il voltaggio potrebbe non cambiare). 38.400 baud quindi
  significa 38.400 marcature per secondo. La marcatura scatta
  all'istante del cambiamento permesso e sono in realt marcati da un
  segnale di un clock sincronizzato generato dall'hardware ma non
  inviato attraverso il cavo esterno.

  Supponiamo che un "cambiamento" possa avere pi dei 2 possibili
  risultati dell'esempio precedente (di +- 12 volt). Supponiamo che
  abbia 4 possibili risultati, ognuno rappresentato da un diverso
  livello di voltaggio. Ogni livello potrebbe rappresentare un paio di
  bit (come 01). Per esempio, -12 v potrebbe essere 00, -6v 01, +6b 10 e
  +12v 11. Ecco che la velocit di bit  doppia rispetto alla velocit
  di baud. Ad esempio, 3000 cambiamenti per secondo genereranno 2 bit
  per ogni cambiamento risultanti in 6000 bit per secondo (bps). In
  altre parole 3000 baud equivalgono a 6000 bps.



  21.2.  Esempi reali

  L'esempio di cui sopra  oltremodo semplice. Esempi reali sono molto
  pi complicati ma si basano sullo stesso concetto. Questo dimostra
  come un modem che va a 2400 baud possa inviare 14400 bps (o pi). Il
  modem acquisisce una velocit di bps maggiore di quella di baud,
  codificando molti bit per ogni cambio di segnale (o transizione).
  Quindi, quando 2 o pi bit sono codificati per baud, la velocit in
  bps supera quella in baud. Se la vostra connessione modem-a-modem  di
  14400 bps, si trasmetteranno 6 bit per segnale (o simbolo) di
  transizione a 2400 baud. Una velocit di 28000 bps  ottenuta da 3200
  baud a 9 bit per baud. Quando la gente usa in modo equivoco il termine
  baud, probabilmente intende la velocit del modem (tipo 33.6k)

  La velocit di bps del normali modem erano precedentemente 50, 75,
  110, 300, 1200, 2400, 9600. Esse erano anche le velocit bps nei cavi
  da porta seriale a modem.  Oggi le velocit (massime) bps da modem a
  modem sono di 14.4K, 28.8K, 33.6K, and 56K, ma le velocit dalla porta
  seriale al modem non sono le stesse ma sono: 19.2K, 38.4K, 57.6K,
  115.2K. Usando modem con una compressione V.42bis (massima
  compressione 4:1), le velocit fino a 115,2K bps sono possibili per
  modem a 33.6K (230.4K possibile per i modem a 56K).

  Eccettuati i modem a 56K, la maggior parte dei modem girano a 2400,
  3000 o 3200 baud.  Anche i modem a 56k usano questi baud per
  trasmettere e talvolta precipitano a questi in ricezione.  A causa
  delle limitazioni di ampiezza di banda nelle linee telefoniche voice-
  grade, velocit in baud superiori a 2400 sono difficili da raggiungere
  e solo lavorando in buone condizioni di qualit della linea
  telefoniche.

  Come inizia questa confusione tra bps e baud? Bene, torniamo all'epoca
  nella quale i vecchi modem a bassa velocit erano considerati modem ad
  alta velocit, la velocit bps in effetti era uguale alla velocit
  baud. Un bit era codificato per ogni cambiamento di fase. La gente
  usava bps e baud intercambiabilmente, visto che rappresentavano lo
  stesso valore. Ad esempio, un modem a 300 bps aveva pure una velocit
  in baud di 300.  Tutto questo cambia quando i modem pi veloci
  entrarono in circolazione e la velocit in bit super la velocit in
  baud. ''baud'' deriva da Emile Baudot, l'inventore della stampante
  telegrafica asincrona. Un modo per risolvere questo problema consiste
  nell'usare il termine "symbol rate" invece di "baud", quindi evitando
  di usare il termine "baud".  Comunque quando si parla di "velocit"
  tra il modem e la porta seriale (velocit DTE) baud e symbol rate sono
  uguali. Ed anche "velocit"  improprio visto che in realt vuol dire
  velocit di flusso.



  22.  Appendice D: Connessione Terminal Server

  Questa sezione  adattata da Text-Terminal-HOWTO.  Un server di
  terminale  qualcosa come un interruttore intelligente che pu
  connettere molti modem (o terminali) ad uno o pi computer. Non  un
  interruttore meccanico cos esso pu modificare le velocit ed i
  protocolli del flusso di dati che gli passano attraverso. Diverse
  compagnie costruiscono terminal server: Xyplex, Cisco, 3Com,
  Computone, Livingston, ecc. Ci sono di diversi tipi e capacit. 
  necessario un altro HOWTO per confrontarli e descriverli (inclusa la
  possibilit di crearsi il proprio terminal server con un PC Linux). La
  maggior parte sono usati per connettere modem piuttosto che connettere
  direttamente terminali.

  Un uso per essi  quello di connettere molti modem (o terminali) ad
  una rete ad alta velocit la quale si connette a dei computer host.
  Naturalmente il terminal server deve avere la potenza di calcolo ed il
  software per far girare protocolli di rete come se fosse per certi
  versi un computer. Il terminal server potrebbe interagire con l'utente
  e chiedergli quale computer connettere a quale altro, ecc. oppure
  potrebbe connettere senza chiedere. Si potrebbe qualche volta inviare
  dei jobs ad una stampante attraverso il terminal server.

  Oggi un PC ha sufficiente potenza di calcolo per agire come un
  terminal server eccetto che ogni porta seriale dovrebbe avere il
  proprio interrupt hardware. I PC hanno solo pochi interrupt di riserva
  per questo scopo e visto che sono hard-wired non potete creare pi di
  tanto tramite software. Una soluzione  usare un'avanzata scheda
  seriale multiporta che ha il suo proprio sistema di interrupt (sui
  modelli a basso costo, condividono uno degli interrupt del PC tra
  diverse porte). Vedere Serial-HOWTO per maggiori informazioni. Se un
  PC ha Linux e fa girare getty su molte porte seriali, si potrebbe
  pensare ad esso come ad un terminal server. Esso  in effetti un
  terminal server se  collegato ad altri PC attraverso una rete e se il
  suo compito  principalmente quello di far passare dati e gestire gli
  interrutp della porta seriale ogni 14 (circa) byte. Un software
  chiamato "radius"  talvolta usato.

  Oggi i veri terminal server servono pi che da semplici terminali.
  Essi servono dei PC che emulano terminali e sono talvolta collegati ad
  una batteria di modem connessi alle linee telefoniche. Alcuni hanno
  anche i modem costruiti al loro interno. Se un terminale (o un PC che
  lo emula)  connesso direttamente ad un modem, il modem dall'altro
  capo della linea potrebbe essere connesso ad un terminal server. In
  alcuni casi il terminal server per default si aspetta che i chiamanti
  usino pacchetti PPP, qualcosa che i terminali testuali reali non
  generano.


  23.  Appendice E: Altri tipi di Modem

  Questo HOWTO attualmente tratta dei comuni tipi di modem usati per
  connettere un PC ad una linea telefonica analogica ordinaria. Ci sono
  diversi altri tipi di modem, inclusi quei dispositivi chiamati modem
  ma che non sono veramente modem.


  23.1.  Modem Digitale-a-Digitale

  La definizione standard di un modem  talvolta allargata fino ad
  includere i modem "digitali". Oggi servizi diretti digitali sono
  forniti in diverse case ed uffici cos che un computer possa inviare
  all'esterno segnali digitali direttamente (beh, quasi) alla linea
  telefonica. Ma un dispositivo  comunque richiesto per convertire il
  segnale digitale del computer in un tipo permesso sui circuiti
  telefonici e questo dispositivo  talvolta chiamato modem. Questo
  HOWTO non tratta detti modem ma alcuni collegamenti a documenti che lo
  fanno potrebbero essere trovati all'inizio di questo HOWTO. Le
  successive 3 sezioni: ISDN, DSL e 56k, trattano dei "modem" digitale-
  a-digitale.


  23.2.  "Modem" ISDN

  Il modem  in realt un Terminal Adapter (TA). Un pacchetto Debian
  chiamato "isdnutils"  disponibile. C' un ISDN Howto in tedesco con
  traduzione in inglese: <http://www.suse.de/Support/sdb_e/isdn.html>.
  Si trova nella distribuzione SuSE di Linux e presumibilmente riguarda
  dei driver disponibili in quella distribuzione.  C' anche un
  pacchetto isdn4Linux ed un newsgroup: de.alt.comm.isdn4linux. Molti
  dei messaggi sono in tedesco. Potreste provare ad uasre un motore di
  ricerca (tipo DejaNews) per cercare "isdn4linux".


  23.3.  Digital Subscriber Line (DSL)

  DSL usa l'esistente doppino telefonico dalla vostra casa (ecc) alla
  locale centralina telefonica. Questo pu essere usato se la vostra
  linea telefonica pu accettare velocit superiori a quelle che un
  modem ordinario (diciamo 56k) invia. Rimpiazza il convertitore
  analogico-digitale nella locale centralina telefonica con un
  convertitore che pu accettare un flusso di dati molto pi veloce (in
  un formato differente naturalmente).  Il dispositivo che converte i
  segnali digitali dal vostro computer al segnale usato per
  rappresentare i dati digitale sulla linea telefonica locale 
  anch'esso chiamato modem.





  23.4.  Modem digitali a 56k

  Perch un qualsiasi modem a 56k possa lavorare effettivamente a 56k
  nella vostra casa o ufficio, l'altro capo deve essere connesso
  direttamente al sistema digitale della compagnia telefonica. Quindi
  gli ISP dall'altro capo della linea devono procurarsi speciali modem
  digitali che forniscano ai propri clienti il servizio a 56k. C' di
  pi visto che batterie di molti modem sono multiconnessi ad un cavo
  telefonico ad alta capacit che trasporta un gran numero di chiamate
  telefoniche simultaneamente (tipo T1, E1, ISDN PRI, o linee migliori).
  Occorre quindi un concentratore o "remote access server" (server di
  accesso remoto). Erano in genere costituiti da unit a s stanti (come
  i PC, ma costano molto di pi ed hanno un sistema operativo
  proprietario). Ora ci sono alcune schede che si possono inserire in un
  bus PCI di un PC per svolgere questo compito.


  23.5.  Modem a linea affittata

  Questi sono analogici e non digitali. Questi modem speciali sono usati
  su linee affittate dalla compagnia telefonica o talvolta da un
  semplice connessione tramite un lungo cavo diretto.  I modem comuni
  che vanno su una linea telefonica in genere non funzionano su questo
  tipo di linee.  Un linea telefonica normale ha circa 40-50 volt
  (conosciuta come la "batteria") su di essa quando non  in uso ed i
  modem convenzionali usano questo voltaggio per la trasmissione.
  Oltretutto, la compagnia telefonica ha segnali speciali che indicano
  uno squillo, linea occupata, ecc. I modem convenzionali si attendono e
  rispondono a questi segnali.  Connettere due modem normali tramite un
  lungo cavo non generer segnali telefonici lungo il cavo, quindi i
  modem non funzioneranno.

  Una tipica linea affittata usava due coppie di cavi (uno per ciascuna
  direzione) usando una modulazione V.29 a 9600 baud. Alcune marche di
  modem per linee affittate sono incompatibili con altre.


  24.  Appendice F: Pixel (punti) dei fax



       Carta A4:    216mm (orizzontale)  * 297mm (verticale)
       modo normale       8punti/mm      * 3.85punti/mm
       modo fine                         * 7.7punti/mm
       modo extra fine                   *15.4punti/mm




  Ogni punto pu essere sia bianco che nero e quindi rappresenta 1 bit.
  Un foglio A4 che usa il modo fine   (216*8) * (297*7.7) = circa 4
  milioni di punti.  Con un rapporto di compressione di 8:1 occorrono
  circa 50 secondi a 9600bps per la trasmissione.


  FINE DEL Modem-HOWTO










  HOWTO: Multi Disk System Tuning
  Stein Gjoen, sgjoen@nyx.net
  v 0.22i, 27 maggio 1999

  Questo documento descrive come utilizzare al meglio dischi e par
  tizioni multiple per un sistema Linux. Sebbene parte di questo testo 
  specifico di Linux, l'approccio generale evidenziato qui pu essere
  applicato a molti altri sistemi operativi multi tasking. Traduzione di
  Gaetano Paolone (gaetano at poboxes.com).  Data traduzione: 26 ottobre
  1999

  1.  Introduzione


  Per commemorare la release 2.2. del kernel Linux a questa release
  nuova di zecca ho dato il nome in codice Daniella.

  Nuovi nomi in codice appariranno in relazione alle linee guida
  standard dell'industria per enfatizzare lo stato dell'arte di questo
  documento.


  Questo documento  stato scritto per due ragioni, principalmente
  perch possedevo 3 vecchi dischi SCSI su cui installare Linux e mi
  stavo domandando come utilizzare al meglio l'innata possibilit di
  parallelismo in un sistema SCSI. In secondo luogo ho sentito che c'
  una ricompensa per chi scrive documenti...

  Questo documento  concepito per essere letto insieme al Linux
  Filesystem Structure Standard (FSSTND). Esso non lo rimpiazza in alcun
  modo ma cerca di suggerire dove mettere fisicamente le directory
  descritte in dettaglio nel FSSTND, in termini di dischi, partizioni,
  tipi, RAID, file system (fs), dimensioni fisiche e altri parametri che
  dovrebbero essere considerati e regolati in un sistema Linux,
  spaziando dai singoli sistemi casalinghi a grossi server su Internet.


  Il successore del FSSTND  chiamato Filesystem Hierarchy Standard
  (FHS) e non riguarda pi solo Linux.  stata rilasciata la versione
  2.0 del FHS ma ci sono ancora un po' di questioni aperte e ci vorr
  molto tempo prima che questo nuovo standard abbia un impatto sulle
  distribuzioni attuali.

   anche una buona idea leggere approfonditamente le guide di
  Installazione di Linux e se state usando un PC, come immagino la
  maggior parte di voi faccia, potete trovare molte informazioni degne
  di nota ed utili nella FAQ del newsgroup comp.sys.ibm.pc.hardware
  specialmente riguardo i supporti di archiviazione.

  Questa  anche un'esperienza istruttiva per me e spero che io possa
  cominciare a "far girare la palla" con questo HOWTO e che esso possa
  evolvere in un HOWTO pi grande, pi dettagliato, e speriamo anche pi
  corretto.


  Prima di tutto abbiamo bisogno di un po' di linguaggio legale. Recenti
  sviluppi dimostrano che questo  abbastanza importante.


  1.1.  Copyright


  This HOWTO is copyrighted 1996 Stein Gjoen.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact the Linux HOWTO coordinator, at
  linux-howto@metalab.unc.edu via email.


  1.2.  Liberatoria


  Usate le informazioni contenute in questo documento a vostro rischio.
  Ripudio qualsiasi potenziale responsabilit per i contenuti di questo
  documento. L'utilizzo dei concetti, degli esempi e/o degli altri
  contenuti di questo documento  completamente a vostro rischio.

  Tutti i copyright sono dei rispettivi proprietari, salvo ove
  diversamente specificato. L'utilizzo di un termine, in questo
  documento, non dovrebbe essere considerato come un attacco alla
  validit di qualsiasi marchio di fabbrica o di servizio.

  Il nominare prodotti particolari o marche, non dovrebbe essere
  considerato come approvazione.

  Siete fermamente invitati a fare un backup del vostro sistema prima
  della installazione principale e a continuare a farne ad intervalli
  regolari.


  1.3.  Notizie


  Questa versione  caratterizzata dall'avere una grossa
  ristrutturazione e molte pi aggiunte di quante ne possa elencare qui,
  specialmente l'aggiunta del supporto a file system.

  Questo HOWTO ora utilizza l'indicizzazione ed  basato sugli SGMLtools
  versione 1.0.5 e la vecchia versione non conferir a questo documento
  una formattazione adeguata.

  Inoltre sono disponibili anche una serie di nuove traduzioni.


  Per quanto concerne lo sviluppo, la gente si sta concentrando sul
  Linux 2.2 e fino a quando non sar rilasciato, non ci saranno molte
  notizie nuove sulla tecnologia disco per Linux.

  La Debian 2.1  pronta per essere rilasciata ma visto che uso Debian
  per i miei sistemi di test, far pi aggiornamenti quando la
  aggiorner.

  L'ultimo numero di versione pu essere ottenuto dall'annotazione del
  mio progetto se fate un finger
  <http://www.cs.indiana.edu/finger/nox.nyx.net/sgjoen> al mio account
  su Nyx.

  Inoltre, l'ultima versione sar disponibile sul mio spazio web su nyx
  in numerosi formati:

    HTML <http://www.nyx.net/~sgjoen/disk.html>.

    semplice testo ASCII <http://www.nyx.net/~sgjoen/disk.txt>

    postscript compresso <http://www.nyx.net/~sgjoen/disk.ps.gz>.

    sorgente SGML <http://www.nyx.net/~sgjoen/disk.sgml>.


  Un mirror Europeo del Multi Disk HOWTO
  <http://home.sol.no/~gjoen/stein/disk.html>  stato appena creato.


  1.4.  Crediti

  In questo documento ho il piacere di riconoscere molte persone che
  hanno contribuito in un modo o nell'altro:



       ronnej (at ) ucs.orst.edu
       cm (at) kukuruz.ping.at
       armbru (at) pond.sub.org
       R.P.Blake (at) open.ac.uk
       neuffer (at) goofy.zdv.Uni-Mainz.de
       sjmudd (at) redestb.es
       nat (at) nataa.fr.eu.org
       sundbyk (at) oslo.geco-prakla.slb.com
       ggjoeen (at) online.no
       mike (at) i-Connect.Net
       roth (at) uiuc.edu
       phall (at) ilap.com
       szaka (at) mirror.cc.u-szeged.hu
       CMckeon (at) swcp.com
       kris (at) koentopp.de
       edick (at) idcomm.com
       pot (at) fly.cnuce.cnr.it
       earl (at) sbox.tu-graz.ac.at
       ebacon (at) oanet.com
       vax (at) linkdead.paranoia.com
       tschenk (at) theoffice.net
       pjfarley (at) dorsai.org
       jean (at) stat.ubc.ca
       johnf (at) whitsunday.net.au
       clasen (at) unidui.uni-duisburg.de
       eeslgw (at) ee.surrey.asc.uk
       adam (at) onshore.com
       anikolae (at) wega-fddi2.rz.uni-ulm.de
       cjaeger (at) dwave.net
       eperezte (at) c2i.net




  Ringraziamenti speciali vanno a nakano (at) apm.seikei.ac.jp per aver
  fatto la taduzione in Giapponese <http://jf.linux.or.jp/JF/JF-
  ftp/other-formats/Disk-HOWTO/html/Disk-HOWTO.html>, per aver dato
  contributi generali e anche per aver fornito un esempio di un computer
  in un ambiente accademico, che  incluso alla fine di questo
  documento.
  Ci sono ora molte traduzioni disponibili e ringraziamenti speciali ora
  vanno ai traduttori per il lavoro e la spinta che hanno dato:


    Traduzione in Tedesco <http://> di chewie (at) nuernberg.netsurf.de

    Traduzione in Svedese <http://www.swe-doc.linux.nu> di jonah (at)
     swipnet.se

    Traduzione in Francese <http://www.lri.fr/~loisel/howto/> di
     Patrick.Loiseleur (at) lri.fr

  Inoltre la DPT  riconosciuta per avermi inviato la documentazione sui
  propri controller cos come il permesso di citare il materiale.
  Queste citazioni sono state approvate prima di apparire qui e saranno
  etichettate intelligentemente. Nessuna citazione ancora ma stanno per
  venire.

  Non  ancora tutto, quindi per cortesia leggete questo documento, date
  un contributo e partecipate all'elite. Se ho dimenticato qualcuno
  fatemelo sapere.

  Nuova in questa versione  un'appendice con un po' di tabelle che
  potete riempire per il vostro sistema al fine di semplificare la
  procedura di progettazione.

  Qualsiasi commento o suggerimento pu essere inviato al mio indirizzo
  e-mail sul nyx: sgjoen@nyx.net.

  Quindi diamo la caccia a swap ed a /tmp dal momento che stanno
  correndo nel disco rigido...






  2.  Struttura

  Dal momento che questo documento si suppone che sia pi che
  sufficiente per imparare come se fosse un documento di riferimento
  tecnico, ho riarrangiato la struttura in quest'ottica.  Per colui che
  progetta un sistema  pi utile avere le informazioni presentate in
  termini di scopi di questo esercizio piuttosto che dal punto di vista
  della strutturazione logica dei dispositivi stessi.  Tuttavia questo
  documento non sarebbe completo senza tutta quella struttura a strati
  di cui la struttura del computer  piena, quindi la includer come
  introduzione a come funziona.

   passato molto tempo da quando il mini nel mini-HOWTO poteva essere
  considerato corretto ma sono convinto che questo documento sia lungo
  quanto debba esserlo, utile per prendere le giuste decisioni e niente
  di pi.


  2.1.  Struttura Logica

  Questa  basata su come ogni strato accede ad un altro,
  tradizionalmente con l'applicazione nello strato pi alto e lo strato
  fisico in quello pi basso.   abbastanza utile mostrare le
  interrelazioni tra gli strati usati per controllare i dischi.





          ___________________________________________________________
          |__     Struttura dei File      ( /usr /tmp ecc)        __|
          |__     File system             (ext2fs, vfat ecc)      __|
          |__     Gestione del volume     (AFS)                   __|
          |__     RAID, concatenazione    (md)                    __|
          |__     Driver dei dispositivi  (SCSI, IDE ecc)         __|
          |__     Controller              (chip, scheda)          __|
          |__     Connessione             (cavo, rete)            __|
          |__     Dischi                  (magnetici, ottici ecc) __|
          -----------------------------------------------------------




  Nel diagramma qui sopra sia la gestione del volume, che il RAID, che
  la concatenazione, sono strati opzionali. I 3 strati pi bassi
  riguardano l'hardware. Tutte le parti sono ampiamente discusse in
  seguito in questo documento.


  2.2.  Struttura del Documento

  La maggior parte degli utenti comincia con una determinata
  configurazione di hardware e qualcuno progetta cosa vorrebbe ottenere
  e quanto grande dovrebbe essere il sistema. Questo  il punto di vista
  che utilizzer in questo documento presentando il materiale, iniziando
  con l'hardware, continuando con le costrizioni della progettazione,
  prima di descrivere la strategia di progettazione che ho scoperto
  funzionare bene.  Ho usato questo sia per il mio computer di casa, che
  al lavoro per un server multifunzionale e ho scoperto che funziona
  ragionevolmente bene.  Oltre a ci, il collaboratore giapponese di
  questo documento ha applicato la stessa strategia su un server di un
  ambiente accademico con un paragonabile successo.

  Per finire, alla fine ho elencato con dettaglio alcune tavole di
  configurazione da usare per le vostre progettazioni. Se avete
  qualsiasi commento al riguardo o annotazioni del vostro lavoro di
  progettazione, mi piacerebbe sentirvi cos che questo documento possa
  essere aggiornato.


  2.3.  Pianificazione della lettura

  Sebbene non sia l'HOWTO pi grande,  in ogni caso abbastanza grande e
  mi  stato chiesto di fare una pianificazione della lettura per poter
  sfoltire il volume.


     Esperto
        (tipo l'elite). Se siete pratici di Linux e delle tecnologie dei
        dischi, troverete molto di quello di cui avete bisogno nelle
        appendici.  In aggiunta siete avvisati di leggere le FAQ e il
        capitolo ``Pezzettini e Ritagli''.



     Pratici
        (tipo Competenti). Se siete pratici di computer in generale
        potete direttamente andare ai capitoli sulle ``tecnologie'' e
        continuare da l.


     Principianti
        (per lo pi disarmati). Dovete solamente leggere tutto.  Mi
        dispiace. In aggiunta vi consiglio di leggere anche tutti gli
        altri HOWTO riguardanti i dischi.
  3.  Tecnologie dei dischi

  Una discussione ben pi completa sulle tecnologie dei dischi per PC
  IBM pu essere trovata presso l'home page delle The Enhanced IDE/Fast-
  ATA FAQ <http://thef-nym.sci.kun.nl/~pieterh/storage.html> che  anche
  periodicamente postata sulle News di Usenet.  Qui io presenter cosa 
  necessario per farsi un'idea della tecnologia e per prepararsi per il
  setup.


  3.1.  Dischi

  Questo  il dispositivo fisico dove i vostri dati vivono e sebbene il
  sistema operativo rende abbastanza somiglianti tipi differenti, essi
  possono in fondo essere molto differenti. Conoscere il funzionamento
  pu essere molto utile nella vostra fase di progettazione. I floppy
  non fanno parte di questo documento, sebbene nel caso ci fosse una
  grande richiesta, potrei essere convinto ad aggiungere una piccola
  parte qui.


  3.2.  Geometria

  Fisicamente, i dischi consistono in uno o pi piatti contenenti dati
  che sono letti all'interno e all'esterno, mediante l'utilizzo di
  sensori montati su testine mobili fissate tra di loro.  I
  trasferimenti di dati dunque, avvengono attraverso tutte le superfici
  simultaneamente, il che definisce un cilindro di tracce. Il disco 
  inoltre suddiviso in settori contenenti un determinato numero di campi
  per i dati.

  I dischi sono quindi spesso classificati in relazione alla geometria:
  il numero di Cilindri, Testine e Settori (CHS).

  Per varie ragioni c' un bel numero di differenze tra

    la CHS fisica del disco stesso

    la CHS logica che il disco riporta al BIOS o al S.O.

    la CHS logica usata dal S.O.

  Praticamente  un gran disordine ed  causa di molta confusione. Per
  maggiori informazioni siete caldamente invitati a leggere il Large
  Disk mini-HOWTO


  3.3.  Supporti

  La tecnologia dei supporti determina importanti parametri come le
  velocit di lettura/scrittura, tempo di accesso, capacit di
  memorizzazione come anche se permette la lettura/scrittura o solamente
  la lettura.


  3.3.1.  Dischi Magnetici

  Questo  il tipico mezzo di memorizzazione di lettura e scrittura e
  come qualsiasi altra cosa nel mondo dei computer  disponibile in
  molti 'gusti' e con propriet differenti.  Generalmente questa  la
  tecnologia pi veloce e offre capacit di lettura/scrittura. Il disco
  gira con una velocit angolare costante (CAV) con una densit del
  settore fisico variabile per un utilizzo pi efficiente dell'area
  magnetica del supporto. In altre parole, il numero di bit per unit di
  lunghezza  mantenuto costante aumentando il numero di settori logici
  per le tracce esterne.
  I valori tipici delle velocit di rotazione sono 4500 e 5400 RPM,
  sebbene sia usata anche la velocit a 7200. Molto recentemente 
  entrata nel mercato anche la velocit a 10000 RPM.  I tempi di accesso
  sono intorno a 10 ms, le velocit di trasferimento sono abbastanza
  variabili da un tipo ad un altro ma generalmente sono nell'ordine di
  4-40 MB/s.  Con dischi ad alte prestazioni dovreste ricordare che le
  prestazioni stesse necessitano di pi potenza elettrica che  poi
  dissipata sotto forma di calore, controllate ``Alimentazione e
  Riscaldamento''.


  Notate che esistono diversi tipi di trasferimento e che questi sono
  riportati con unit differenti. Prima di tutto c' il trasferimento
  dal 'piatto' alla cache dell'unit disco che  generalmente riportato
  in Mbit/s. Un valore tipico  circa 50-250 Mbit/s. Il secondo
  passaggio  dalla cache del drive all'adattatore ed  generalmente
  indicato in MB/s, i valori riportati sono intorno ai 3-40 MB/s. Notate
  comunque che si assume che i dati siano gi contenuti nella cache e da
  qui l'effettiva percentuale di trasferimento diminuir drammaticamente
  a causa della massima velocit di lettura dal drive.



  3.3.2.  Dischi Ottici

  I dischi ottici in lettura/scrittura esistono ma sono lenti e non cos
  diffusi. Furono usati nella macchina NeXT ma la bassa velocit  stata
  l'origine di molte lamentele. La bassa velocit  dovuta
  principalmente alla natura termica del cambio di fase che rappresenta
  l'archiviazione dei dati. Anche quando si sono usati laser potenti per
  indurre cambiamenti di fase, gli effetti sono stati ancora pi lenti
  dell'effetto magnetico usato nei dischi magnetici.

  Oggi molte persone usano i dischi CD-ROM che, come il nome fa capire,
  sono di sola lettura. L'archiviazione  di circa 650 MB, le velocit
  di trasferimento sono variabili e dipendono dal disco ma possono
  superare 1.5 MB/s. I dati sono archiviati in una singola traccia a
  spirale quindi non  utile parlare di geometria per essi.  La densit
  dei dati  costante, quindi il lettore usa una velocit lineare
  costante (CLV). Anche l'accesso  pi lento, circa 100 ms,
  parzialmente dovuto alla traccia a spirale. Recentemente dischi ad
  alta velocit, usano un misto tra CLV e CAV al fine di aumentare le
  prestazioni. Questo riduce inoltre il tempo di accesso causato dalla
  necessit di raggiungere la corretta velocit di rotazione per la
  lettura.

  Un nuovo tipo (DVD)  all'orizzonte, in grado di offrire fino a circa
  18 GB su un disco singolo.


  3.3.3.  Dischi a Stato Solido

  Questa  un'aggiunta relativamente recente alla tecnologia disponibile
  ed  stata resa popolare specialmente in computer portatili come anche
  in sistemi fissi. Non contenendo parti rimovibili, sono molto veloci
  sia in termini di velocit di accesso che di velocit di
  trasferimento.  Il tipo pi popolare  la flash RAM, ma sono usati
  anche altri tipi di RAM. Alcuni anni fa molti riponevano molte
  speranze per le memorie a bolla magnetica ma si sono dimostrate essere
  relativamente costose e non sono cos comuni.

  Generalmente l'uso di dischi RAM non  considerato una buona idea dal
  momento che  pi efficace aggiungere pi RAM alla scheda madre e
  permettere al sistema operativo di dividere il quantitativo di memoria
  in memorie tampone, cache, aree di programmi e di dati.  Solo in casi
  molto speciali, come in sistemi in tempo reale con piccoli margini di
  tempo, i dischi RAM possono essere una soluzione ragionevole.

  La Flash RAM  disponibile in molte decine di megabyte di capacit e
  si potrebbe essere tentati di usarla per un'archiviazione veloce e
  temporanea in un computer. C' comunque un enorme ostacolo con questo
  metodo: la flash RAM ha un tempo di vita limitato in termini del
  numero di volte in cui potete riscrivere i dati, quindi mettere swap,
  /tmp o /var/tmp su questi dispositivi accorcer sicuramente e
  drammaticamente la loro vita. Invece, usare le flash RAM per directory
  che vengono lette spesso ma raramente scritte, porterebbe ad un grosso
  guadagno in termini di prestazioni.

  Per ottenere l'optimum della vita media dalle flash RAM, dovrete usare
  driver speciali che usano la RAM ugualmente e minimizzano il numero di
  blocchi cancellati.

  Questo esempio illustra i vantaggi di dividere la vostra struttura
  delle directory su pi dispositivi.

  I dischi a Stato Solido non hanno un reale indirizzamento
  cilindri/testine/settori ma per ragioni di compatibilit questi sono
  simulati dal driver per avere un'interfaccia uniforme al sistema
  operativo.


  3.4.  Interfacce

  C' una pletora di interfacce da cui scegliere con diverse
  caratteristiche di prezzo e prestazioni. Parecchie schede madri oggi
  includono interfaccia IDE o interfacce migliori, che sono parte
  integrante dei chipset.  Molte altre schede includono anche un chip
  per l'interfaccia SCSI fatto da NCR e connesso direttamente al bus
  PCI.  Controllate che cosa avete e quale supporto del BIOS avete per
  quello.


  3.4.1.  MFM e RLL

  Un tempo questa era la tecnologia consolidata, il tempo in cui 20 MB
  erano solenni, che comparati con le dimensioni di oggi ti fanno
  pensare che i dinosauri si aggiravano per la Terra con questi dischi.
  Come i dinosauri questi sono datati e sono lenti e non affidabili se
  confrontati a quello che abbiamo oggi. Linux li gestisce ma siete
  stati bene avvisati di pensare due volte riguardo cosa volete
  metterci. Si potrebbe discutere che una partizione di emergenza
  potrebbe essere adattata con un'opportuna versione datata del DOS.


  3.4.2.  ESDI


  Effettivamente, ESDI era un adattamento dell'interfaccia SMD,
  largamente diffusa ed utilizzata su computer "grandi", ai cavi usati
  con l'interfaccia ST506, cosa molto pi conveniente da confezionare
  rispetto alla copia di connettori a 60-pin e 26-pin usati con SMD.
  L'ST506 era un'interfaccia silenziosa che faceva completo affidamento
  sul fatto che il controller e l'host facessero tutto: dal valutare la
  disposizione di testine/cilindri/settori al tenere traccia della
  disposizione delle testine, ecc. ST506 necessitava che il controller
  estraesse il clock dai dati recuperati e che controllasse la
  disposizione delle caratteristiche dettagliate sulle tracce del
  supporto, bit per bit.  Ebbe una vita di circa 10 anni, se includete
  l'uso degli schemi di modulazione di MFM, RLL, e ERLL/ARLL. ESDI,
  d'altra parte, ebbe l'intelligenza, spesso utilizzando tre o quattro
  microprocessori separati su un singolo drive e comandi di alto livello
  per formattare una traccia, trasferire dati, effettuare ricerche e
  cos via. Il recupero del clock dal flusso dei dati era affidato al
  drive, che pilotava la linea di clock e presentava i suoi dati in NRZ,
  sebbene la correzione dell'errore era ancora compito del controller.
  ESDI permetteva l'uso della densit di registrazione a bit variabile,
  oppure, per quella ragione, di qualsiasi altra tecnica di modulazione,
  dal momento che era localmente generata e risolta presso il disco.
  Sebbene molte delle tecniche usate in ESDI, furono in seguito
  incorporate nell'IDE, fu la crescente popolarit dello SCSI che port
  alla fine dell'ESDI nei computer. ESDI ebbe una vita di circa 10 anni,
  sebbene principalmente nei server o in "grossi" sistemi piuttosto che
  nei PC.


  3.4.3.  IDE e ATA

  Il progresso fece s che l'elettronica dei dischi migrasse dallo slot
  ISA al drive stesso e nacque l'Integrated Drive Electronics.  Era
  semplice, economica e ragionevolmente veloce cos coloro che
  progettavano il BIOS crearono quel tipo di ostacolo di cui l'industria
  di computer  cos piena. Una combinazione tra una limitazione IDE di
  16 testine insieme alla limitazione del BIOS a 1024 cilindri ci don
  l'infame limite di 504 MB. Seguendo le tradizioni dell'industria del
  computer, l'ostacolo fu rattoppato con un programma inaffidabile ed
  ottenemmo ogni tipo di schema di traduzione e instabili rattoppi del
  BIOS. Questo vuol dire che dovete leggere la documentazione relativa
  all'installazione molto attentamente e controllare che BIOS avete e
  che data ha, dal momento che il BIOS deve dire a Linux che dimensioni
  di dischi avete.  Fortunatamente con Linux potete dire direttamente al
  kernel le dimensioni del vostro disco con i suoi parametri,
  controllate la documentazione su LILO e Loadlin, esaurientemente.
  Notate anche che IDE  equivalente ad ATA, AT Attachment. IDE usa un
  Input/Output Programmato (PIO) CPU-intensivo per trasferire i dati
  verso e dai dischi e non  in grado di gestire la tecnologia di
  Accesso Diretto alla Memoria (DMA) che  pi efficiente. La velocit
  di trasferimento pi elevata  di 8.3 MB/s.


  3.4.4.  EIDE, Fast-ATA e ATA-2

  Questi 3 termini sono abbastanza equivalenti, fast-ATA  ATA-2 ma EIDE
  include come aggiunta ATAPI. ATA-2  quello che si usa di pi in
  questi giorni dato che  pi veloce e con DMA. La velocit
  trasferimento  aumentata a 16.6 MB/s.



  3.4.5.  Ultra-ATA

  Una nuova e pi veloce modalit DMA che  circa il doppio del PIO-Mode
  4 dell'EIDE (33 MB/s). I dischi con o senza Ultra-ATA possono essere
  messi sullo stesso cavo senza degrado della velocit per gli
  adattatori pi veloci. L'interfaccia Ultra-ATA  elettricamente
  identica alla normale interfaccia Fast-ATA, inclusa la massima
  lunghezza del cavo.


  3.4.6.  ATAPI

  L'ATA Packet Interface venne progettata per gestire i CD-ROM
  utilizzando la porta IDE e come l'IDE  economica e semplice.


  3.4.7.  SCSI

  Lo Small Computer System Interface  un'interfaccia dai molti scopi
  che pu essere utilizzata per collegare di tutto, dai dischi, a
  schiere di dischi, stampanti, scanner e molto altro ancora. Il nome ha
  una designazione erronea dal momento che  stato usato
  tradizionalmente nelle fasce alte del mercato come anche nelle
  workstation dal momento che  adatto a sistemi multi tasking.

  L'interfaccia standard  larga 8 bit e pu indirizzare 8 dispositivi.
  C' una versione larga 16 bit che  veloce il doppio con lo stesso
  clock e pu indirizzare 16 dispositivi. L'adattatore conta sempre come
  dispositivo ed  generalmente il numero 7.   anche possibile avere
  bus con un'ampiezza di 32 bit ma questo generalmente necessita di
  doppi cavi per gestire tutte le linee.

  Il vecchio standard era di 5 MB/s e il recente fast-SCSI l'ha
  aumentato a 10 MB/s. Recentemente ultra-SCSI, noto anche come Fast-20,
   arrivato a velocit di trasferimento di 20MB/s per un bus ampio 8
  bit.  Il nuovo sistema di segnalazione a basso voltaggio differenziale
  (LVD) permette queste velocit elevate ed anche cablaggi molto pi
  lunghi di prima.

  Pi recentemente  stato anche proposto uno standard ancora pi
  veloce: SCSI 160/m che  capace di un mostruoso 160 MB/s su un bus
  ampio 16 bit. Il supporto  ancora scarso ma  sostenuto per un po' di
  dischi a 10000 RPM che possono trasferire 40 MB/s.  Mettere 6 di
  questi dischi su un RAID manterrebbe questo bus saturo ed inoltre
  saturerebbe la maggior parte dei bus PCI. Ovviamente questo vale solo
  per i server di altissimo livello di oggi.

  Le prestazioni pi elevate si traducono in un costo generalmente pi
  alto dell'(E)IDE.  L'importanza di terminazioni corrette e di una
  buona qualit dei cavi non pu essere sovraenfatizzata. I dischi SCSI
  inoltre spesso tendono ad essere di qualit pi elevata rispetto ai
  dischi IDE: spesso  solo una questione di attaccare e staccare il
  dispositivo; molte persone fanno questo senza spegnere il sistema.
  Questa caratteristica  molto utile quando avete sistemi multipli e
  potete solamente spostare i dispositivi da un sistema all'altro
  qualora uno di questi fallisse per un qualsiasi motivo.

  C' un gran numero di documenti che dovreste leggere se utilizzate lo
  SCSI, lo SCSI HOWTO come del resto le SCSI FAQ postate sulle News di
  Usenet.

  Lo SCSI ha inoltre il vantaggio che vi potete connettere facilmente a
  lettori di nastri per fare il backup dei vostri dati, come anche ad
  alcune stampanti e scanner.  anche possibile usarlo come una rete
  molto veloce tra computer dal momento che si possono condividere
  dispositivi SCSI sullo stesso bus. I lavori continuano ma a causa di
  problemi nell'assicurare la condivisione della cache tra i diversi
  computer connessi, non sar un lavoro da nulla.

  I numeri SCSI sono anche usati per gestire le priorit. Se diversi
  dischi richiedono il servizio, viene data priorit al drive con il
  numero pi basso.


  3.5.  Cablaggio


  La mia intenzione  quella di non fare troppi commenti sull'hardware
  ma sento che dovrei fare una piccola nota sul cablaggio. Questo
  sembrerebbe essere una componente dell'insieme marcatamente di bassa
  rilevanza tecnologica, ma purtroppo  la causa di molti problemi di
  frustrazione. Viste le alte velocit di oggi, si dovrebbe pensare
  piuttosto ad un dispositivo RF con le sue intrinseche necessit di
  correttezza dell'impedenza. Se non prendete le vostre precauzioni,
  otterrete affidabilit altamente ridotta o un fallimento totale.
  Qualche adattatore SCSI  molto pi sensibile a ci rispetto ad altri.
  Cavi schermati sono ovviamente migliori di quelli non schermati ma il
  prezzo  molto pi alto. Con un po' di attenzione potrete ottenere
  buone prestazioni da un economico cavo non schermato.


    Per Fast-ATA e Ultra-ATA, la massima lunghezza del cavo 
     specificata come 45cm (18"). Le linee di dati di tutti e due i
     canali IDE sono connessi su molte schede, sebbene, in questo modo
     possono rivelarsi come un unico cavo. In ogni caso i cavi EIDE
     dovrebbero essere pi corti possibile. Se ci sono crash misteriosi
     o cambiamenti improvvisi dei dati,  opportuno verificare i vostri
     cavi. Provate una modalit PIO pi bassa oppure disconnettete il
     secondo canale e controllate se il problema persiste.


    Usate cavi pi corti possibile, ma non dimenticate la minima
     separazione di 30 cm per ultra SCSI e di 60 cm per SCSI
     differenziale.

    Evitate lunghi spezzoni tra il cavo ed il drive, collegate il
     connettore del cavo direttamente al disco senza una prolunga.

    Limiti nel cablaggio SCSI:



       Velocit Bus (MHz)      |    Massima Lunghezza (m)
       --------------------------------------------------
        5                      |        6
       10  (fast)              |        3
       20  (fast-20 / ultra)   |        3 (massimo 4 dispositivi),
                               |      1,5 (massimo 8 dispositivi)
       xx  (differenziale)     |       25 (massimo 16 dispositivi)
       --------------------------------------------------





    Usate una corretta terminazione per i dispositivi SCSI e le
     posizioni corrette ad entrambe le estremit della catena SCSI.
     Ricordate che lo stesso adattatore pu avere il terminatore sulla
     scheda stessa.

    Non mischiate cavi schermati e cavi non schermati, non avvolgete i
     cavi attorno al metallo, provate ad evitare vicinanza a parti
     metalliche lungo il decorso del cablaggio. Qualsiasi discontinuit
     pu causare imprecisioni nell'impedenza che generano riflessione
     dei segnali che va ad aumentare il rumore nel cavo.

     Questo problema diventa ancor pi grave nel caso dei controller
     multi-canale.  Recentemente qualcuno ha suggerito di usare la
     plastica con le bolle attorno ai cavi per evitare lo stretto
     contatto con il metallo, un problema serio nei cabinet affollati.

  Pi informazioni sul cablaggio SCSI e sui terminatori possono essere
  trovate presso altre <http://resource.simplenet.com/files/68_50_n.htm>
  pagine sparse per il web.



  3.6.  Adattatori


  Questo  l'altro capo dell'interfaccia dal drive, la parte che 
  connessa ad un bus del computer. La velocit del bus del computer e
  quella dei dischi dovrebbe essere vagamente similare, altrimenti
  avrete un collo di bottiglia nel vostro sistema. Connettere un insieme
  di dischi RAID 0 ad una scheda ISA  inutile. In questo periodo la
  maggior parte dei computer  dotata di bus PCI a 32 bit capaci di
  trasferimenti a 132 MB/s che non dovrebbe rappresentare un collo di
  bottiglia per la maggior parte della gente per il prossimo futuro.

  Con il migrare dell'elettronica del disco ai dischi stessi, la parte
  rimanente che divenne l'interfaccia (E)IDE  cos piccola che pu
  essere facilmente inserita nel chipset PCI. L'adattatore SCSI  pi
  complesso e spesso include una propria piccola CPU ed  quindi pi
  costoso e non integrato nei chipset PCI a disposizione in questo
  periodo. L'evoluzione tecnologica potrebbe cambiare questa situazione.

  Alcuni adattatori vengono con gestione della cache separata ed
  intelligenza ma dal momento che ci dipende principalmente dal sistema
  operativo, i vantaggi sono in stretta dipendenza con il sistema
  operativo stesso utilizzato. Alcuni dei pi primitivi, che rimarranno
  senza nome, ne traggono grande vantaggio.  Linux, invece, ha cos
  tanti vantaggi di per s stesso che i guadagni sono molto pi scarsi.

  Mike Neuffer, che fece i driver per i controller DTP, afferma che gli
  stessi sono abbastanza intelligenti che avendo sufficiente memoria
  cache, vi porter una grossa spinta in prestazione e ritiene che la
  gente che aveva ottenuto piccoli guadagni con controller efficienti
  non aveva usato un controller di cache intelligente.


  3.7.  Sistemi Multi Canali

  Al fine di aumentare il flusso,  necessario identificare i colli di
  bottiglia pi significativi e poi eliminarli. In qualche sistema, in
  particolare dove c' un grande numero di dischi connessi, 
  vantaggioso utilizzare diversi controller che lavorano in parallelo,
  sia per gli adattatori SCSI che per i controller IDE che normalmente
  hanno 2 canali incorporati. Linux gestisce questo.

  Qualche controller RAID dispone di 2 o 3 canali ed  arduo suddividere
  il caricamento da disco attraverso tutti i canali. In altre parole, se
  avete due dischi SCSI che volete porre in RAID ed un controller a due
  canali, dovreste mettere ogni drive su canali separati.


  3.8.  Sistemi Multi Scheda

  Oltre ad avere sia SCSI che IDE sulla stessa macchina,  anche
  possibile avere pi di un controller SCSI. Controllate lo SCSI-HOWTO
  per quali controller potete combinare. Inoltre  molto probabile che
  dobbiate dire al kernel di verificare l'esistenza di pi di un singolo
  controller SCSI o IDE. Questo si pu fare utilizzando i parametri del
  kernel quando si fa il boot, ad esempio usando LILO.  Controllate gli
  HOWTO per lo SCSI e per il LILO per capire come farlo.

  I sistemi multi scheda possono offrire significanti guadagni di
  velocit se configurate il vostro disco in maniera corretta,
  specialmente per il RAID0. Assicuratevi di segnalare i controller come
  anche i dischi, in modo da aggiungere i dischi al dispositivo md RAID
  nell'ordine corretto.  Se il controller 1  connesso ai dischi sda e
  sdc mentre il controller 2 ai dischi sdb e sdd otterrete pi
  parallelismo aggiungendo in ordine sda - sdc - sdb - sdd piuttosto che
  sda - sdb - sdc - sdd perch la lettura o la scrittura su pi di un
  cluster abbraccerebbe verosimilmente due controller.

  Gli stessi metodi possono essere applicati anche all'IDE. La maggior
  parte delle schede madri si presenta con 4 porte IDE:

    hda controller primario

    hdb slave primario

    hdc controller secondario

    hdd slave secondario

     in cui i due primari condividono un cavo piatto ed i secondari ne
     condividono un altro. I chipset moderni li mantengono indipendenti.
     D'altronde  meglio fare un RAID con ordine hda - hdc - hdb - hdd
     perch ci potrebbe presumibilmente parallelizzare ambedue i
     canali.


  3.9.  Confronti di Velocit

  Le tavole seguenti sono state messe solo per indicare quali velocit
  sono possibili. Tutte le velocit di trasferimento sono in MB al
  secondo e le ampiezze di bus sono misurate in bit.



  3.9.1.  Controller



       IDE             :    8.3 - 16.7
       Ultra-ATA       :       33

       SCSI            :
                               Ampiezza Bus (bit)

       Velocit Bus (MHz)      |        8      16      32
       --------------------------------------------------
        5                      |        5      10      20
       10  (fast)              |       10      20      40
       20  (fast-20 / ultra)   |       20      40      80
       40  (fast-40 / ultra-2) |       40      80      --
       --------------------------------------------------






  3.9.2.  Tipi di Bus




       ISA             :      8-12
       EISA            :       33
       VESA            :       40    (A volte regolato a 50)

       PCI
                               Ampiezza Bus (bits)

       Velocit Bus (MHz)      |       32      64
       --------------------------------------------------
       33                      |       132     264
       66                      |       264     528
       --------------------------------------------------



  3.10.  Benchmarking

  Questo  un argomento molto difficile e far solamente pochi commenti
  cauti su questo campo minato. Prima di tutto,  pi difficile fare
  benchmark paragonabili che abbiano un qualsiasi significato attuale.
  Questo comunque non trattiene la gente dal provare.

  Invece si potrebbe usare il benchmarking per diagnosticare il vostro
  sistema, per verificare se sta andando tanto veloce quanto dovrebbe,
  cio se non sta andando pi lento. Inoltre vi aspettereste un aumento
  significante nel cambiare da un semplice file system ad un RAID, cos
  un mancato guadagno di prestazioni vi dir che qualcosa non va.

  Quando provate a fare un benchmark non dovreste avventurarvi da soli,
  ma controllare iozone e bonnie e leggere la documentazione molto bene.
  In particolare assicuratevi che la dimensione del vostro buffer sia
  pi grande della dimensione della vostra RAM, altrimenti testerete la
  vostra RAM piuttosto che i vostri dischi, il che vi riporter alte
  prestazioni non realistiche.

  Un benchmark molto semplice pu essere ottenuto utilizzando hdparm -tT
  il che pu essere utilizzato sia sui dischi IDE che sugli SCSI.


  Per maggiori informazioni riguardo il benchmarking ed il software per
  una serie di piattaforme, controllate la pagine dei benchmark l'ACNC
  <http://www.acnc.com/benchmarks.html>.




  3.11.  Confronti

  SCSI offre pi prestazione di un EIDE ma ad un costo elevato.  La
  terminazione  pi complessa ma l'espansione non  molto difficile.
  Avere pi di 4 dischi IDE (in alcuni casi 2) pu essere complicato,
  mentre con il wide SCSI potete averne fino a 15 per adattatore.
  Qualche adattatore SCSI ha diversi canali, il che rende ulteriormente
  moltiplicabile il numero di dischi possibile.

  Per lo SCSI dovrete dedicare un IRQ per adattatore, il quale pu
  controllare fino a 15 dischi. Con l'EIDE avete bisogno di un IRQ per
  ogni disco e ci pu causare conflitto.

  RLL e MFM sono in generale troppo vecchi, lenti ed inaffidabili per
  essere di qualche utilit.



  3.12.  Sviluppo Futuro


  Lo SCSI-3  in lavorazione e speriamo venga rilasciato presto.
  Dispositivi pi veloci sono gi stati annunciati, recentemente sono
  state proposte le mostruose specifiche da 80 MB/s e 160 MB/s.  Queste
  sono basate sullo standard Ultra-2 (che utilizzava un clock a 40 MHz)
  combinato con un cavo a 16 bit.

  Alcuni produttori annunciano gi dispositivi SCSI-3 ma ci  in realt
  abbastanza prematuro visto che lo standard  ancora da consolidare.
  Con l'aumentare delle velocit di trasferimento, il punto di
  saturazione del bus PCI si sta avvicinando. Attualmente la versione a
  64 bit ha un limite di 264 MB/s. La velocit di trasferimento in
  futuro sar aumentata dall'attuale 33MHz a 66MHz, aumentando quindi il
  limite a 528 MB/s.

  Un altro orientamento  per dischi sempre pi grandi. Ho sentito che 
  possibile ottenere 55 GB su un singolo disco sebbene questo sia molto
  costoso. Attualmente il dispositivo di memorizzazione migliore per le
  vostre tasche  di circa 6.4 GB ma anche questo  in continuo aumento.
  L'introduzione del DVD avr nel prossimo futuro un grande impatto, con
  circa 20 GB su un singolo disco potete avere una copia completa anche
  dei maggiori siti FTP intorno al mondo.  L'unica cosa di cui siamo
  sicuramente certi riguardo al futuro  che se non sar migliore, sar
  sicuramente pi grande.

  Addendum: poco dopo avere iniziato a scrivere questo documento, ho
  letto che la massima velocit utile per un CD-ROM era 20x dal momento
  che la stabilit meccanica sarebbe stata un problema molto grande a
  queste velocit. Dopo circa un mese furono disponibili CD-ROM a 24x...
  Ora potete ottenere un 40x e non c' dubbio che velocit pi alte
  siano in produzione.


  3.13.  Raccomandazioni

  La mia opinione personale  che EIDE o Ultra ATA  il modo migliore
  per cominciare un vostro sistema, specialmente se intendete usare
  anche il DOS sulla vostra macchina. Se intendete espandere il vostro
  sistema nel corso degli anni o intendete utilizzarlo come server, vi
  suggererei caldamente di prendere dischi SCSI. Attualmente wide SCSI 
  un po' pi costoso. Otterrete di pi col vostro denaro mettendo uno
  SCSI di ampiezza standard. Ci sono inoltre versioni differenziali del
  bus SCSI il che aumenta la lunghezza massima del cavo. L'aumento di
  prezzo  ancor pi sostanziale e non pu essere consigliato ad utenti
  normali.

  Oltre ai dischi, potete anche connettere qualche tipo di scanner e
  stampante ed anche le reti ad un bus SCSI.

  Inoltre ricordatevi che espandere il vostro sistema necessiter anche
  di pi potenza, cos assicuratevi che l'alimentazione sia adatta al
  lavoro e che voi abbiate raffreddamento sufficiente. Molti dischi SCSI
  offrono l'opzione di avviamento sequenziale, il che  una buona idea
  per grandi sistemi.  Controllate anche ``Alimentazione e
  Riscaldamento''.






  4.  Struttura del File System

  Linux  stato multi tasking dall'inizio, da quando un bel numero di
  programmi interagivano e giravano ininterrottamente. In ogni caso 
  importante mantenere una struttura dei file su cui tutti potrebbero
  essere d'accordo, in modo che il sistema trovi i dati dove ci si
  aspetta di trovarli. Storicamente ci sono stati cos tanti standard
  differenti che si  creata confusione e la compatibilit  stata
  mantenuta usando collegamenti simbolici, il che ha fatto ancora pi
  confusione e la struttura  finita col sembrare un labirinto.

  Nel caso di Linux, uno standard chiamato il File Systems Standard
  (FSSTND) fu fortunatamente accettato all'inizio e oggi  utilizzato
  dalle maggiori distribuzioni Linux.


  Pi tardi, venne deciso di creare un successore che supportasse anche
  altri sistemi operativi oltre al solo Linux e venne chiamato
  Filesystem Hierarchy Standard (FHS) attualmente alla versione 2.1.
  Questo standard  in continua evoluzione e sar quanto prima adottato
  dalle distribuzioni Linux.

  Vi consiglio di non sviluppare una vostra struttura personale visto
  che una marea di pensieri  servita per avere gli standard e molti
  pacchetti si conformano a questi standard. Invece, potete leggere di
  pi su questo presso l'home page del FHS
  <http://www.pathname.com/fhs>.

  Questo HOWTO si sforza di conformarsi al FSSTND e perseguir il FHS
  quando le distribuzioni saranno disponibili.



  4.1.  Caratteristiche del File System

  Le varie parti di FSSTND hanno diverse necessit riguardo la velocit,
  l'affidabilit e la dimensione, ad esempio perdere root  un dolore ma
  pu essere facilmente recuperabile.  Perdere /var/spool/mail  una
  cosa abbastanza differente.  Ecco un veloce sommario di alcune parti
  essenziali e delle loro propriet e necessit. Badate che questa 
  solamente una guida e ci potrebbero essere file binari nelle directory
  etc e lib, librerie nelle directory bin e cos via.



  4.1.1.  Swap


     Velocit
        Il massimo! Sebbene facciate troppo affidamento sullo swap,
        dovreste considerare di comprare pi RAM. Notate comunque, che
        su molte schede madri, la cache non funzioner se la RAM 
        superiore a 128 MB.


     Dimensione
        Stesso discorso della RAM. Un algoritmo veloce e sporco: un po'
        come per il t: 16 MB per la macchina e 2 MB per ogni utente.
        Il kernel pi piccolo gira in un mega ma sta stretto. Usate 4 MB
        per il lavoro in generale e applicazioni leggere, 8 MB per X11 o
        GCC o 16 MB per stare pi comodi.

        (Si sa che l'autore prende tazze di t abbastanza potenti...)

        Alcuni suggeriscono che lo spazio di swap debba essere 1-2 volte
        la dimensione della RAM, evidenziando che la localizzazione dei
        programmi determina quanto sia efficace lo spazio swap aggiunto.
        Notate che usare lo stesso algoritmo come per 4BSD  abbastanza
        scorretto dal momento che Linux non riserva spazio per pagine in
        core.

        Un approccio pi preciso  considerare lo spazio di swap pi la
        RAM come il vostro insieme lavorativo totale, cos se sapete
        quanto spazio, al massimo, vi serve, sottraete la RAM fisica che
        avete e che  lo spazio di swap di cui avrete bisogno.

        C' inoltre un'altra ragione per essere generosi quando
        dimensionate il vostro spazio di swap: i furti di memoria.
        Programmi che funzionano male, che non liberano la memoria che
        riservano per loro stessi si dice che provocano un furto di
        memoria. Questa allocazione rimane anche dopo che il programma
        incriminato  terminato e quindi questo  fonte di consumo di
        memoria. Una volta che tutta la RAM fisica e lo spazio di swap
        sono esaurite, l'unica soluzione  fare un reboot e cominciare
        da capo. Per fortuna questi programmi non sono cos comuni ma se
        voi ne doveste incontrare qualcuno, troverete che uno spazio
        swap extra, vi prender pi tempo tra i riavvii.

        Ricordate inoltre di prendere in considerazione il tipo di
        programma che usate. Alcuni programmi che hanno grandi ambienti
        di lavoro, come quelli di modellazione agli elementi finiti
        (FEM), hanno raffinatissime strutture di dati caricate nella RAM
        piuttosto che lavorare esplicitamente sui file. Programmi per i
        dati e per il calcolo complessi come questi, causeranno swapping
        eccessivo se avete meno RAM del necessario.

        Altri tipi di programmi possono bloccare le loro pagine nella
        RAM.  Questo pu accadere per motivi di sicurezza, prevenendo
        copie dei dati che raggiungono un dispositivo di swap o per
        motivi di prestazioni come nel modulo in tempo reale. In ogni
        caso, bloccare queste pagine, riduce il quantitativo di memoria
        swappabile rimanente e pu fare in modo che il sistema swappi
        prima di quanto ci si possa aspettare.

        Nel man 8 mkswap c' spiegato che ogni partizione di swap pu
        essere massimo 128 MB in dimensione per macchine a 32-bit e 256
        MB per macchine a 64-bit.


     Affidabilit
        Media. Quando fallisce sapete lo fa rapidamente e il fallimento
        vi coster qualche perdita di lavoro. Salvate spesso, no?


     Nota 1
        Linux offre la possibilit di distribuire lo swapping su pi
        dispositivi, una caratteristica che vi pu far guadagnare
        parecchio. Controllate "man 8 swapon" per maggiori dettagli.
        Tuttavia, il guadagno di utilizzare un disco RAID per lo swap
        potrebbe essere vanificato dalla maggiore pesantezza del codice
        di RAID.

        Perci il file /etc/fstab potrebbe somigliare a questo:


          /dev/sda1       swap            swap    pri=1           0       0
          /dev/sdc1       swap            swap    pri=1           0       0




     Ricordate che il file fstab  molto sensibile alla formattazione
     utilizzata, leggete le pagine man attentamente e non fate un sem
     plice taglia e incolla delle righe qui sopra.


     Nota 2
        Qualcuno per swappare utilizza un RAM disk o qualche altro file
        system. In ogni caso, se non avete impostazioni o necessit
        inusuali, difficilmente trarrete vantaggio da questo e questo
        porta ad usare la memoria a disposizione per le operazioni di
        cache e buffer.


     Nota 2b
        C' un'eccezione: su un numero di schede madri mal disegnate, la
        memoria cache integrata su piastra madre non  in grado di porre
        in cache tutta la RAM che pu essere indirizzata. Molte schede
        madri vecchie, erano in grado di accettare 128 MB di RAM ma
        potevano porre in cache solo le prime 64. In questi casi,
        aumenterebbe la prestazione se voi utilizzaste gli ultimi 64 MB
        di RAM come swap basato su RAMdisk o come altro supporto di
        memorizzazione temporaneo.




  4.1.2.  Archiviazione Temporanea ( /tmp  e /var/tmp )


     Velocit
        Molto alta. Su un disco/partizione separati questo generalmente
        ridurr la frammentazione, sebbene ext2fs gestisca la
        frammentazione abbastanza bene.


     Dimensione
        Difficile a dirsi, piccoli sistemi girano facilmente con appena
        pochi MB ma questi sono noti posti di nascondiglio per tenere
        lontano dalla vista di occhi curiosi e dal rinforzo della quota
        e possono crescere senza controllo su macchine pi grandi.
        Suggerito: piccole macchine casalinghe: 32 MB, piccoli server:
        128 MB e grosse macchine fino a 500 MB (la macchina che l'autore
        usa al lavoro ha 1100 utenti e una /tmp di 300 MB). Controllate
        queste directory, non solo per file nascosti ma anche per vecchi
        file. Preparatevi anche al fatto che queste partizioni
        potrebbero essere la prima ragione che potreste avere per
        ridimensionare le vostre partizioni.


     Affidabilit
        Bassa. Quando queste aree falliscono o si riempiono, spesso i
        programmi emetteranno un avvertimento, oppure falliranno
        splendidamente.  Errori di file casuali saranno ovviamente pi
        seri, non importa quale area file sia.


     File
        Generalmente piccoli file ma potrebbe esservene un gran numero.
        Normalmente i programmi cancellano i loro file tmp ma se
        casualmente interviene un'interruzione, possono sopravvivere.
        Molte distribuzioni hanno una linea di condotta riguardo la
        pulizia dei file tmp all'avvio, quindi potreste voler
        controllare quale sia la vostra configurazione.


     Nota1
        In FSSTND c' una nota riguardo al mettere /tmp su RAM disk.
        Questo comunque non  consigliato per le stesse ragioni espresse
        al riguardo dello swap. Inoltre, come segnalato prima, non
        utilizzate dispositivi flash RAM per queste directory. Ci si
        dovrebbe ricordare inoltre che qualche sistema  organizzato in
        modo da pulire automaticamente le aree tmp al riavvio.


     Nota2
        I sistemi pi vecchi avevano un /usr/tmp ma questo non 
        consigliato e, per motivi storici, un link simbolico lo fa
        puntare ad una delle altre aree tmp.



  (* That was 50 lines, I am home and dry! *)





  4.1.3.  Aree di Coda ( /var/spool/news  e /var/spool/mail )


     Velocit
        Alta, specialmente su grossi server di news. Il trasferimento e
        la scadenza delle news usano molto il disco e beneficieranno di
        dischi veloci.  Code di stampa: bassa. Considerate RAID0 per le
        news.


     Dimensione
        Per i server di news/posta: quanta ve ne potete permettere.  Per
        sistemi ad utente singolo pochi MB saranno sufficienti se
        leggete in continuazione. Iscriversi ad un list server e
        prendersi una vacanza, non  proprio una buona idea (ancora, la
        macchina che uso al lavoro ha 100 MB riservati per l'intera
        /var/spool).


     Affidabilit
        Posta: molto alta, news: media, coda di stampa: bassa. Se la
        vostra posta  molto importante (non lo  forse sempre?)
        considerate RAID per l'affidabilit.


     File
        Generalmente una grande quantit di file che in dimensione sono
        intorno a pochi KB. I file nella coda di stampa, possono d'altra
        parte essere pochi ma abbastanza grandi.


     Nota
        Qualche documentazione sulle news, suggerisce di mettere tutti i
        file .overview su un disco separato dai file delle news,
        controllate tutte le FAQ sulle news per pi informazioni.  La
        dimensione tipica  di circa il 3-10 per cento di tutto lo
        spazio di coda.



  4.1.4.  Directory Home ( /home )


     Velocit
        Media. Sebbene molti programmi utilizzino /tmp per archiviare
        temporaneamente, altri come alcuni lettori di news, aggiornano
        frequentemente i file nella directory home, il che pu essere
        notato su ampi sistemi multitenti. Per piccoli sistemi, questo
        non  un problema.


     Dimensione
        Difficile! Su qualche sistema, la gente paga per archiviare,
        perci questo generalmente  una questione di soldi.  Grossi
        sistemi come nyx.net <http://www.nyx.net/> (che  un servizio di
        Internet gratuito con posta, news e servizi WWW) girano con
        successo con un limite suggerito di 100 KB per utente e 300 KB
        come massimo applicato. Gli ISP commerciali offrono tipicamente
        circa 5 MB nei loro pacchetti standard di abbonamento.

        Se comunque scrivete libri o fate del lavoro grafico, le
        necessit si gonfiano velocemente.


     Affidabilit
        Variabile. Perdere /home su una macchina con un singolo utente 
        fastidioso ma quando 20000 utenti ti chiamano per dirti che le
        proprie directory home sono andate  pi che fastidioso.  Per
        alcuni, la propria fonte di sostentamento risiede qui. Fate
        backup regolari ovviamente, no?


     File
        Ugualmente difficile. Il setup minimo per un singolo utente  di
        circa una dozzina di file, di dimensione di 0.5 - 5 KB. I file
        relativi al progetto, possono essere sufficientemente numerosi.


     Nota1
        Potreste considerare RAID sia per la velocit che per
        l'affidabilit. Se volete velocit estremamente alta ed
        affidabilit, dovreste vedere altri sistemi operativi e
        piattaforme hardware (tolleranza ai guasti ecc.).


     Nota2
        I navigatori spesso utilizzano una cache locale per aumentare la
        velocit di navigazione e questa cache pu occupare una quantit
        di spazio sostanziale e causare parecchia attivit del disco. Ci
        sono molti metodi per evitare questi colpi alle prestazioni, per
        maggiori informazioni guardate le sezioni sulle ``Directory
        Home'' e ``WWW''.


     Nota3
        Gli utenti spesso tendono ad utilizzare tutto lo spazio
        disponibile sulla partizione /home. Il sottosistema Quota di
        Linux  in grado di limitare il numero di blocchi e il numero di
        inode che l'ID di un singolo utente pu allocare su una base di
        un filesystem. Guardate il Linux Quota mini-HOWTO
        <http://metalab.unc.edu/LDP/mini> di Albert M.C. Tam bertie (at)
        scn.org per i dettagli sull'impostazione.




  4.1.5.  File binari principali ( /usr/bin  e /usr/local/bin )


     Velocit
        Bassa. Spesso i dati sono pi grandi dei programmi che sono
        comunque richiesti su domanda, quindi questo non  rischioso per
        la velocit. Testimoni i live file system su CD ROM.


     Dimensione
        Il limite  il cielo ma 200 MB dovrebbero darvi molto di quello
        di cui avete bisogno per un sistema completo. Un grande sistema,
        per sviluppo software o un server dai molti fini dovrebbe forse
        riservare 500MB sia per l'installazione che per la crescita.


     Affidabilit
        Bassa.  generalmente montato sotto root dove tutti gli
        essenziali sono raccolti. Tuttavia perdere tutti i file binari
        fa male...


     File
        Variabile ma generalmente dell'ordine di 10 - 100 KB.


  4.1.6.  Librerie ( /usr/lib  e /usr/local/lib )


     Velocit
        Media. Questi sono grosse trance di dati caricati spesso,
        spaziano dai file oggetto ai font, tutti suscettibili di
        rigonfiamento. Spesso questi sono anche caricati nella loro
        interezza e la velocit  abbastanza utilizzata qui.


     Dimensione
        Variabile. Qui, ad esempio, $egrave; dove gli elaboratori di
        testo archiviano i loro immensi file di font. I pochi da cui ho
        avuto un feedback su questo, riportano circa 70 MB nelle loro
        varie directory lib. Un'installazione abbastanza completa della
        Debian 1.2, pu arrivare a circa 250 MB, che pu essere preso
        come un limite superiore realistico.  I seguenti sono alcuni dei
        pi grossi consumatori di spazio su disco: GCC, Emacs,
        TeX/LaTeX, X11 e perl.


     Affidabilit
        Bassa. Controllate il punto ``File binari principali''.


     File
        Generalmente grossi, di cui molti di dimensioni dell'ordine di 1
        MB.


     Nota
        Per motivi storici, qualche programma tiene gli eseguibili nelle
        aree lib. Un esempio  GCC che ha grossi file binari nella
        gerarchia /usr/lib/gcc/lib.


  4.1.7.  Boot


     Velocit
        Abbastanza bassa: dopo tutto il boot non avviene cos di
        frequente e caricare il kernel  solo una minima frazione del
        tempo che si impiega per rendere operativo il sistema.


     Dimensione
        Abbastanza piccola, un'immagine completa con qualche extra entra
        in un singolo floppy, cos 5 MB dovrebbero essere sufficienti.


     Affidabilit
        Alta. Guardate la sezione sotto su Root.


     Nota 1
        La parte pi importante riguardo la partizione di boot  che su
        molti sistemi, deve risiedere al di sotto del cilindro 1023.
        Questa  una limitazione BIOS che Linux non riesce a gestire.



  4.1.8.  Root


     Velocit
        Abbastanza bassa: qui c' solo il minimo indispensabile, la
        maggior parte del quale gira solo all'inizio.


     Dimensione
        Relativamente piccola. In ogni caso  una buona idea mantenere
        qualche file di recupero e utilit sulla partizione di root e
        qualcuno ci tiene diverse versioni del kernel.


     Affidabilit
        Alta. Un fallimento qui causer probabilmente un gran dolore e
        potresti finire col perdere del tempo a recuperare la tua
        partizione di boot. Con un po' di pratica potete naturalmente
        farlo in un'ora o gi di l, ma penso che anche se avete un po'
        di pratica nel farlo, state anche facendo qualcosa di sbagliato.

        Naturalmente avete un disco di recupero no? Ovviamente questo 
        stato aggiornato da quando avete fatto l'installazione iniziale?
        Ci sono molti dischi di recupero gi fatti come anche strumenti
        per la creazione di dischi di recupero che potreste trovare
        validi. Presumibilmente investire del tempo in questi vi salva
        dal diventare un esperto nel recupero di root.


     Nota 1
        Se avete molti dischi, potreste considerare di mettere una
        partizione boot di emergenza di ricambio su un disco fisico
        separato. Vi coster un po' di spazio ma se il vostro setup 
        molto vasto il tempo risparmiato, nel caso qualcosa fallisse,
        varrebbe molto lo spazio extra.


     Nota 2
        Per semplicit e anche nel caso di emergenza non  consigliabile
        di mettere la partizione root su un sistema RAID a livello 0.
        Inoltre se utilizzate il RAID per la vostra partizione di boot,
        dovete ricordare che sia abilitata l'opzione md per il vostro
        kernel di emergenza.


     Nota 3
        Per semplicit  abbastanza comune mantenere Boot e Root sulla
        stessa partizione. Se fate ci, allora al fine di fare il boot
        da LILO,  importante che i file di boot essenziali risiedano
        tutti entro il cilindro 1023. Questo include il kernel come
        anche i file che si trovano in /boot.



  4.1.9.  DOS ecc.

  A rischio di apparire eretico ho incluso questa piccola sezione
  riguardo un qualcosa contro cui molti di quelli che leggono questo
  documento hanno forti sensazioni. Sfortunatamente  molti componenti
  hardware li troviamo con setup e mezzi di mantenimento basati su
  questi sistemi, quindi ecco qui.


     Velocit
        Molto bassa. I sistemi in questione non sono famosi per la
        velocit, quindi c' un piccolo appunto sull'utilizzo di dischi
        di prima qualit. Il multitasking o il multi-threading non sono
        disponibili, quindi il comando di agevolazione di accodaggio nei
        dischi SCSI non  una cosa di cui potrete trarre vantaggio. Se
        avete un vecchio disco IDE sar sufficientemente buono.
        L'eccezione  in qualche modo Win95 e ancor di pi NT che hanno
        supporto multi-threading che teoricamente dovrebbe essere in
        grado di trarre vantaggio delle pi avanzate caratteristiche
        offerte dai dispositivi SCSI.


     Dimensione
        La compagnia che sta dietro questi sistemi operativi non 
        famosa per scrivere codice stringato, cos dovete essere
        preparati a spendere poche decine di MB a seconda di quale
        versione installate del DOS o di Windows. Con una vecchia
        versione di DOS o Windows potreste fare entrare tutto in 50 MB.


     Affidabilit
        Ha-ha. Visto che la catena non  pi forte dell'anello pi
        debole, potete usare qualsiasi vecchio disco. Dal momento che 
        pi facile che il SO si scombini da solo, piuttosto che il drive
        si autodistrugga, imparerete presto l'importanza di backup qui.

        Mettetela in un altro modo: "La vostra missione, se doveste
        accettarla,  di fare funzionare questa partizione. La garanzia
        si autodistrugger tra 10 secondi..."

        Recentemente mi  stato chiesto di giustificare le mie lamentele
        in questa sede.  Prima di tutto non sto cercando misere scuse
        per il Dos e Windows come sistemi operativi. Secondariamente ci
        sono vari articoli legali che devono essere presi in
        considerazione. Dire che c' una relazione tra le due ultime
        frasi  solamente un vaneggiamento paranoide. Di sicuro. Invece
        offrir allo stimato lettore un po' di parole chiavi: DOS 4.0,
        DOS 6.x e vari mezzi di compressione del disco che rimarranno
        senza nome.




  4.2.  Spiegazione dei termini

  Ovviamente pi veloce  meglio , ma spesso il felice installatore di
  Linux ha svariati dischi di varia velocit e affidabilit, cos anche
  se questo documento descrive la prestazione come 'veloce' o 'lenta' 
  solamente una rozza guida dal momento che non  determinabile alcun
  tipo di precisione pi fine. Anche se ci sono dei dettagli che si
  dovrebbero ricordare:



  4.2.1.  Velocit

  Questa  realmente una confusa commistione di svariati termini: carico
  della CPU, impostazioni generali del trasferimento, tempo di accesso
  al disco e velocit di trasferimento.  nella reale natura della
  regolazione che non c' un optimum fisso e in molti casi il prezzo 
  il fattore che fa la differenza. Il carico della CPU  rilevante solo
  per i sistemi IDE dove  la CPU che esegue da sola il trasferimento,
  ma  generalmente bassa per lo SCSI, controllate la documentazione
  SCSI per i valori reali. Anche il tempo di accesso al disco  piccolo,
  generalmente dell'ordine del millisecondo. Questo comunque non  un
  problema se usate comandi di accodamento su SCSI, dove sovrapponete
  comandi mantenendo il bus occupato per tutto il tempo.  Gli spool
  delle news sono un caso speciale consistente in un grande numero di
  file normalmente piccoli, cos in questo caso il tempo di accesso pu
  divenire molto significativo.

  Ci sono due parametri principali che sono di interesse qui:

     L'accesso
         generalmente definito come il tempo che occorre alla testina
        di lettura/scrittura per saltare da una traccia ad un'altra.
        Questo parametro  importante quando si ha a che fare con un
        grande numero di piccoli file come visto nei file di spool. C'
        inoltre l'ulteriore ritardo di accesso prima che il settore
        desiderato ruoti in posizione sotto la testina. Questo ritardo
        dipende dalla velocit angolare del disco ed ecco perch a volte
        questo parametro  riportato per i dischi. I valori comuni sono
        4500, 5400 e 7200 RPM (rotazioni al minuto). RPM pi alti
        riducono il tempo di accesso ma ad un costo sostanziale. Inoltre
        dischi che lavorano a 7200 RPM si sa che sono rumorosi e che
        generano un grande calore, fattore che dovrebbe essere tenuto in
        considerazione se state costruendo un grande insieme o una
        "batteria di dischi". Molto di recente sono entrati nel mercato
        dischi che lavorano a 10000 RPM e qui le richieste di
        raffreddamento sono ancora pi strette e vengono date pochissime
        indicazioni per il flusso d'aria.


     Il trasferimento
         generalmente espresso in megabyte al secondo.  Questo
        parametro  importante quando si utilizzano grandi file che
        devono essere trasferiti. I file di libreria, i dizionari e i
        file di immagine sono un esempio di questo. I dischi che
        posseggono alta velocit rotazionale, normalmente hanno anche
        trasferimenti veloci visto che la velocit di trasferimento 
        proporzionale alla velocit angolare per la stessa densit di
        settore.

   inoltre importante leggere le specifiche per i dischi molto
  attentamente e noterete che la massima velocit di trasferimento 
  spesso riportata intendendo i trasferimenti dalla cache integrata
  (burst speed) e non direttamente dalla superficie del disco (sustained
  speed).  Guardate anche la sezione sull' ``Alimentazione e
  riscaldamento''.



  4.2.2.  Affidabilit

  Naturalmente nessuno vorrebbe dischi con bassa affidabilit ma uno
  farebbe bene a giudicare vecchi dischi come inaffidabili. Inoltre per
  scopi RAID (controllate le informazioni pertinenti)  consigliato
  utilizzare un insieme misto di dischi cos che crash simultanei di pi
  dischi possano diventare meno probabili.

  Fino ad oggi ho avuto notizia di un solo rapporto di fallimento totale
  del file system, ma qui l'hardware instabile  sembrato essere la
  causa dei problemi.

  Anche se i dischi sono economici al giorno d'oggi, la gente ancora
  sottostima il valore dei contenuti dei dischi. Se avete bisogno di
  affidabilit pi alta, assicuratevi di rimpiazzare i vecchi dischi e
  mantenete i ricambi. Non  inusuale che i dischi possano lavorare pi
  o meno continuamente per anni ed anni ma ci che spesso uccide i
  dischi alla fine sono i cicli di alimentazione.


  4.2.3.  File

  La dimensione media dei file  importante al fine di decidere i
  paramentri del disco pi appropriati. Un grande numero di piccoli file
  fa s che il tempo di accesso divenga importante, invece per grossi
  file diventa importante la velocit di trasferimento.  Il comando di
  accodamento nei dispositivi SCSI  molto comodo per maneggiare un
  grosso numero di piccoli file, ma per il trasferimento l'EIDE non 
  cos lontano dallo SCSI e normalmente molto pi economico dello SCSI.




  5.  File System

  Nel corso del tempo le necessit per i file system sono aumentate e le
  domande per grosse strutture, grossi file, nomi lunghi e altro ancora
  ha generato la richiesta di file system, il sistema che accede e
  organizza i dati sulle unit di memorizzazione, ancora pi avanzati.
  Oggi c' un gran numero di file system tra cui scegliere e questa
  sezione li descriver in dettaglio.

  L'enfasi  su Linux ma con pi richieste sar felice di aggiungere
  informazioni per un'audience pi ampia.



  5.1.  File system per scopi generali

  La maggior parte dei sistemi operativi ha generalmente un file system
  per scopi generali per utilizzo di ogni giorno per la maggior parte
  dei tipi di file, mostrando caratteristiche nel SO come permessi,
  protezioni e recupero.


  5.1.1.  minix

  Questo fu il fs originale per Linux, agli albori Linux era ospitato su
  macchine minix.  semplice ma limitato nelle caratteristiche e
  difficilmente viene utilizzato in questi giorni se non per qualche
  disco di recupero visto che  sufficientemente compatto.


  5.1.2.  xiafs  e extfs

  Questi sono ugualmente vecchi e sono caduti in disuso e non sono pi
  consigliati.


  5.1.3.  ext2fs

  Questo  lo standard stabilito per scopi generali nel mondo Linux.  
  veloce, efficiente e maturo ed  in continua evoluzione e
  caratteristiche quali ACL e la compressione trasparente sono prossime.

  Per maggiori informazioni controllate l'home page di ext2fs
  <http://web.mit.edu/tytso/www/linux/ext2.htm>



  5.1.4.  ufs

  Questo  il filesystem utilizzatto da BSD e sue varianti.  maturo ma
   stato anche sviluppato per tipi di dischi pi vecchi dove le
  geometrie si conoscevano. Il fs utilizza un bel numero di trucchetti
  per ottimizzare le prestazioni ma dal momento che le geometrie del
  disco sono tradotte in un bel numero di modi, l'effetto rete non  pi
  cos ottimale.





  5.1.5.  efs

  L'Extent File System (efs)  il giovane file system di Silicon
  Graphics ampiamente utilizzato su IRIX prima della versione 6.0 dopo
  la quale  subentrato l'xfs. Mentre viene incoraggiata la migrazione
  ad xfs, efs  ancora supportata e molto usata sui CD.

  C' un driver Linux in versione beta giovane, ottenibile presso l'home
  page Linux extent file system <http://aeschi.ch.eu.org/efs/>




  5.1.6.  reiserfs

  Dal 23 Luglio 1997, Hans Reiser reiser (at) RICOCHET.NET ha messo su
  web il sorgente del suo reiserfs
  <http://idiom.com/~beverly/reiserfs.html> basato su una struttura ad
  albero.  Sebbene il suo file system abbia delle caratteristiche
  veramente interessanti e sia molto pi veloce dell'ext2fs,  ancora
  troppo sperimentale e difficile da integrare con il kernel standard.
  Ci si aspetta qualche sviluppo interessante nel futuro - questo  ben
  differente dal vostro progetto "file system medio basato su log per
  Linux", perch Hans ha gi un codice che funziona.


  5.1.7.  enh-fs

  Attualmente in stadio alfa, il progetto Enhanced File System
  <http://www.coker.com.au/~russel/enh-fs.html> punta a combinare su un
  unico livello il file system e la gestione del disco.




  5.2.  File System Microsoft

  Questa compagnia  responsabile di molte cose, tra cui alcuni file
  system, tanto che alla fine ha causato confusioni.



  5.2.1.  fat

  In realt ci sono 2 fat, fat12 e fat16, dipendentemente dalla
  dimensione della partizione utilizzata, ma fortunatamente la
  differenza  cos piccola che l'intera questione  chiara.

  Tra i fattori a favore, sono veloci e semplici e molti SO li
  gestiscono e possono sia leggere che scrivere su questo filesystem.  E
  questo  quanto.

  Il fattore a sfavore  la limitata sicurezza, i flag dei permessi
  severamente limitati e scalabilit atroce. Ad esempio con fat non
  potete avere partizioni pi grandi di 2 GB.



  5.2.2.  fat32

  Dopo circa 10 anni la Microsoft realizz cosa fosse la fat.  Bene, 10
  anni in ritardo e cre cos questo file system che scala
  ragionevolmente bene.

  I flag dei permessi sono ancora limitati.  NT 4.0 non pu leggere
  questo file system ma Linux pu.
  5.2.3.  vfat

  Nello stesso periodo in cui Microsoft lanci la fat32, aggiunsero
  anche il supporto per i nomi lunghi dei file, conosciuto come vfat.

  Linux legge partizioni vfat e fat32 mediante mount con il tipo vfat.



  5.2.4.  ntfs

  Questo  il file system nativo di Win-NT ma dal momento che non sono
  disponibili informazioni complete c' un supporto limitato per altri
  sistemi operativi.



  5.3.  File system per il Logging e il Journaling


  Apportano un approccio radicalmente differente agli aggiornamenti dei
  file registrando le modifiche di un file in un log e successivamente
  controllando saltuariamente i log.

  La lettura in pratica  veloce come un file system tradizionale che
  aggiorna sempre i file direttamente.  La scrittura  invece molto pi
  veloce, dal momento che gli aggiornamenti sono aggiunti ad un log.
  Tutto ci  trasparente all'utente.   nell'affidabilit e
  particolarmente nel controllo dell'integrit del file system che
  questi file system brillano. Dal momento che dall'ultimo controllo si
  sa che i dati stanno bene, dovranno essere controllati solo i log e
  questa cosa  molto pi veloce rispetto ai sistemi tradizionali.

  Notate che i file system di logging tengono traccia dei cambiamenti
  fatti sia ai dati chee agli inode, mentre i file system che effettuano
  journaling tengono traccia solamente del cambiamento degli inode.

  Linux ha abbastanza scelta tra questi file system ma nessuno  ancora
  in qualit tale da essere prodotto. Alcuni sono anche sospesi.


    Adam Richter della Yggdrasil ha postato qualche tempo fa la notizia
     che stavano lavorando su un file system basato su un file di log
     compresso e che questo progetto  attualmente sospeso.  Nonostante
     ci, una versione non funzionante  disponibile sui propri server
     FTP. Controllate the Yggdrasil ftp server
     <ftp://ftp.yggdrasil.com/private/adam> dove possono essere trovate
     speciali versioni con patch del kernel.

    Un altro progetto  il Linux log-structured Filesystem Project
     <http://collective.cpoint.net/lfs/> che  anch'esso tristemente
     sospeso. Nonostante ci questa pagina contiene parecchie
     informazioni sull'argomento.

    Infine c' il dtfs -- A Log-Structured Filesystem For Linux
     <http://www.complang.tuwien.ac.at/czezatke/lfs.html> che sembra
     crescere forte. Ancora in alfa ma sufficientemente completo da far
     girare programmi su questo file system.


  5.4.  File System di sola lettura

  I supporti di sola lettura non sono sfuggiti alle sempre pi crescenti
  complessit viste nei file system pi generali, quindi c' ancora una
  vasta scelta con corrispondenti opportunit per errori eccitanti.

  Molti di questi sono usati nei CD-ROM ma anche il nuovo DVD pu
  utilizzarli ed  pure possibile utilizzarli attraverso il dispositivo
  di loopback su un file di un hard disk per verificare un'immagine
  prima di masterizzare una ROM.

  C' un romfs per Linux ma visto che non  relativo al disco, pi nulla
  potr essere detto relativamente a questo in questa sede.


  5.4.1.  High Sierra

  Questo fu uno dei pi giovani standard per i formati CD-ROM, chiamato
  cos forse dall'albergo in cui si raggiunse l'ultimo accordo.

  High Sierra era cos limitato nelle caratteristiche che le nuove
  estensioni dovevano semplicemente apparire e dal momento che non c'
  stata conclusione di nuovi formati, l'originale High Sierra rimane il
  comune precursore ed  quindi ancora ampiamente supportato.



  5.4.2.  iso9660

  L'International Standards Organisation fece le proprie estensioni e
  formalizz lo standard nel quale noi riconosciamo lo standard iso9660.

  Il file system Linux iso9660 gestisce sia le estensioni High Sierra
  che quelle Rock Ridge.



  5.4.3.  Rock Ridge

  Non tutti accettano limiti come i nomi corti e assenza di permessi,
  cos molto presto sopraggiunsero le estensioni Rock Ridge per
  rettificare queste mancanze.



  5.4.4.  Joliet

  La Microsoft, per non essere superata nel gioco delle estensioni
  standard, decise che avrebbe dovuto estendere i formati CD-ROM con
  qualche caratteristica di internazionalizzazione e l'ha chiamata
  Joliet.

  Linux gestisce questi standard nei kernel 2.0.34 o superiori.  Dovete
  abilitare l'NLS per usarlo.



  5.4.5.  Trivia

  Joliet  una citt fuori Chicago; pi conosciuta per essere stata il
  posto della prigione dove Jake fu ingabbiato nel film "Blues
  Brothers".  Il Rock Ridge (le estensioni UNIX all'ISO 9660)  chiamato
  cos dalla citt (fittizia) nel film "Blazing Saddles".



  5.4.6.  UDF

  Con l'arrivo del DVD con fino a 17 GB di capacit di immagazzinamento,
  il mondo sembr apparentemente volere un altro formato, questa volta
  fu chiamato ambiziosamente Universal Disk Format (UDF).  Fu inteso
  come il rimpiazzo per l'iso9660 e sar richiesto per il DVD.
  Attualmente non  nel kernel standard di Linux ma un progetto  in
  corso per fare un driver UDF
  <http://trylinux.com/projects/udf/index/htm> per Linux. Patch e
  documentazione sono disponibili.



  5.5.  File System di Rete

  Sono disponibili un gran numero di tecnologie di rete che vi
  permettono di distribuire dischi attraverso reti locali o globali.
  Ci  in qualche modo marginale all'argomento di questo HOWTO ma dal
  momento che pu essere utilizzato su dischi locali, lo tratter
  brevemente. Sarebbe meglio se qualcuno ne facesse un HOWTO separato.


  5.5.1.  NFS

  Questo  stato uno dei primi sistemi che permettono di montare uno
  spazio file di una macchina,su un altra. Ci sono una serie di problemi
  con NFS che oscillano dalle prestazioni alla sicurezza, ma in ogni
  caso ci si  stabilizzato.


  5.5.2.  AFS

  Questo  un sistema che permette un'efficiente condivisione di file
  attraverso ampie reti. Iniziato come un progetto accademico,  oggi
  venduto da Transarc <http://www.transarc.com> la cui homepage vi dar
  pi dettagli.

  Derek Atkins, del MIT, ha fatto il porting di AFS per Linux ed ha
  inoltre organizzato per questo la mailing list del Linux AFS (linux-
  afs@mit.edu) che  aperta al pubblico.  Richieste per partecipare alla
  lista dovrebbero essere spedite a linux-afs-request@mit.edu ed infine
  si dovrebbero riportare i bug a linux-afs-bugs@mit.edu.

  Importante: dal momento che AFS utilizza la cifratura,  un software
  che  caratterizzato da restrizione e non pu essere facilmente
  esportato dagli Stati Uniti.

  L'IBM che possiede la Transarc, ha annunciato la disponibilit
  dell'ultima versione del client come anche del server per Linux.

  Arla  un'implementazione AFS gratuita, controllate l'Arla homepage
  <http://www.stacken.kth.se/projekt/arla> per maggiori informazioni
  come anche per la documentazione.



  5.5.3.  Coda

   iniziato un lavoro per un sostituto gratuito di AFS ed  chiamato
  Coda <http://coda.cs.cmu.edu/>.



  5.5.4.  nbd

  Il Dispositivo di Blocco di Rete
  <http://atrey.karlin.mff.cuni.cz/~pavel> (nbd)  disponibile nel
  kernel 2.2 di Linux e successivi e offre prestazioni eccellenti
  accertate. La cosa interessante  che pu essere combinato con RAID
  (vedere dopo).


  5.5.5.  GFS

  Il File System Globale <http://gfs.lcse.umn.edu/>  un nuovo file
  system progettato per immagazzinare attraverso un'ampia area di rete.
  Attualmente  agli stadi iniziali e pi informazioni si avranno pi
  avanti.




  5.6.  File System Speciali

  Oltre ai file system generali, ce ne sono altri pi specifici,
  generalmente utilizzati per fornire prestazioni migliori o altre
  caratteristiche, di solito con mancanze su altri aspetti.



  5.6.1.  tmpfs  e swapfs

  Per un'archiviazione veloce di file a breve termine, Sun OS offre
  tmpfs che  praticamente la stessa cosa di swapfs su NeXT.  Questo
  risolve l'intrinseca lentezza di ufs mettendo in cache i dati e
  mantenendo l'informazione di controllo in memoria. Ci significa che i
  dati su un tale file system si perderanno al reboot ed  quindi adatto
  per l'area /tmp ma non per /var/tmp che  la sede dove vengono posti i
  dati temporanei che devono sopravvivere al reboot.

  SunOS offre scarsa regolazione per tmpfs ed il numero dei file  anche
  limitato dalla memoria fisica totale della macchina.

  Linux non ha un equivalente a questo file system e si ritiene che
  ext2fs sia sufficientemente veloce da eliminarne la necessit.



  5.6.2.  userfs

  Il file system utente (userfs) permette una serie di estensioni verso
  l'utilizzo di file system tradizionali come file system basati su FTP,
  compressione (arcfs) e veloci prototipazioni e molte altre
  caratteristiche. Il docfs  basato su questo filesystem.  Controllate
  l' userfs homepage <http://www.goop.org/~jeremy/userfs/> per maggiori
  informazioni.



  5.6.3.  devfs

  Quando i dischi vengono aggiunti, rimossi o semplicemente falliscono,
   probabile che i nomi dei dispositivi dei dischi rimanenti
  cambieranno. Ad esempio sdb fallisce e quindi il vecchio sdc diventa
  sdb, il vecchio sdc diventa sdb e cos via.  Notate che in questo caso
  hda, hdb ecc. rimarranno invariati.  Allo stesso modo se un nuovo
  disco viene aggiunto, pu accadere il contrario.

  Non c' nessuna garanzia che lo SCSI ID 0 diventi sda e che aggiungere
  dischi aumentando l'ordine degli ID aggiunger solamente un nuovo nome
  di dispositivo senza rinominare le voci precedenti, dal momento che
  qualche driver SCSI assegna partendo dall'ID 0 in poi mentre altri
  invertono l'ordine di controllo.  Allo stesso modo anche l'aggiunta di
  un adattatore SCSI pu causare rinomine.

  Generalmente i nomi dei dispositivi sono assegnati nell'ordine in cui
  vengono trovati.

  L'origine dei problemi giace nel numero limitato di bit disponibili
  per la numerazione principale e secondaria nei file di dispositivo
  usati per descrivere il dispositivo stesso. Questo lo potete
  verificare nella directory /dev, informazioni sulla numerazione e
  sull'allocazione possono essere trovate con il comando man MAKEDEV.
  Attualmente ci sono 2 soluzioni a questo problema a vari stadi di
  sviluppo:

     scsidev
        funziona mediante la creazione di un database dei dischi e di
        cosa essi fanno parte, controllate man scsifs per maggiori
        informazioni.

     devfs
         un progetto a lungo termine orientato a raggirare l'intero
        impiccio della numerazione dei dispositivi facendo s che la
        directory /dev diventi un file system del kernel come lo  il
        /procfs.




  5.7.  Raccomandazioni sui File System

  C' una marea di scelte ma generalmente  consigliabile usare il file
  system generale che  presente nella vostra distribuzione.  Se
  utilizzate ufs e avete disponibilit di qualcosa tipo tmpfs dovreste
  inizialmente cominciare con il file system generale per avere un'idea
  delle necessit di spazio e se necessario, comprare pi RAM per
  gestire la dimensione del tmpfs di cui avete bisogno. Altrimenti
  finirete con fallimenti misteriosi e tempo perso.

  Se utilizzate un dual boot e dovete trasferire dati tra i due SO, uno
  dei modi pi semplici  utilizzare una partizione opportunamente
  dimensionata formattata con fat visto che molti sistemi possono
  affidabilmente leggere e scrivere su questa.  Ricordatevi del limite
  dei 2 GB per le partizioni fat.

  Per maggiori informazioni sulle interconnettivit tra file system
  potete controllare la pagina del file system
  <http://www.ceid.upatras.gr/~gef/fs/>.

  Per evitare il tracollo totale con la rinomina dei dispositivi, se un
  disco fallisce, controllate l'ordine di scansione del vostro sistema e
  provate a mantenere il vostro sistema root su hda o su sda e supporti
  rimovibili cone dischi ZIP alla fine dell'ordine di scansione.





  6.  Technologie

  Al fine di decidere come ottenere il massimo dai vostri dispositivi
  dovete sapere quali tecnologie sono disponibili e le loro
  implicazioni.  Come sempre ci possono essere esigenze conflittuali
  riguardo la velocit, l'affidabilit, l'alimentazione, la
  flessibilit, la facilit di utilizzo e la complessit.

  Molte delle tecniche descritte qui sotto possono essere unite in
  maniere diverse per aumentare la prestazione e l'affidabilit, sebbene
  a scapito di ulteriore complessit.




  6.1.  RAID

  Questo  un metodo per aumentare l'affidabilit, la velocit o
  entrambi utilizzando pi dischi in parallelo cos da diminuire il
  tempo di accesso ed aumentare la velocit di trasferimento.  Per
  aumentare l'affidabilit pu essere usato un sistema di controllo o di
  mirroring. Grossi server possono trarre vantaggio da questo setup ma
  potrebbe essere troppo per un utente singolo a meno che non abbiate un
  gran numero di dischi disponibili.  Guardate altri documenti e FAQ per
  maggiori informazioni.

  Si pu avere RAID in Linux o mediante software (il modulo md nel
  kernel), una scheda controller compatibile Linux (PCI-to-SCSI) o un
  controller SCSI-to-SCSI. Controllate la documentazione per sapere per
  cosa possono essere utilizzati i controller. Una soluzione hardware 
  generalmente pi veloce, e forse anche pi sicura, ma costa.



  6.1.1.  SCSI-to-SCSI

  I controller SCSI-to-SCSI sono generalmente implementati come cabinet
  completi con dischi ed un controller che si connette al computer con
  un secondo bus SCSI. Questo fa s che l'intero cabinet sembri un
  singolo grosso, veloce disco SCSI e non richiede nessun driver RAID
  particolare. Lo svantaggio  che il bus SCSI che connette il cabinet
  al computer diventa un collo di bottiglia.

  Uno svantaggio significativo per la gente con grosse quantit di
  dischi  che c' un limite a quante voci SCSI possono esserci nella
  directory /dev. In questi casi utilizzare lo SCSI-to-SCSI conserver
  le voci.

  Generalmente sono configurati attraverso il pannello frontale o con un
  terminale connesso alle loro interfacce seriali.


  Tra i produttori di questi sistemi ci sono CMD <http://www.cmd.com> e
  Syred <http://www.syred.com> nelle cui pagine web sono descritti
  diversi sistemi.



  6.1.2.  PCI-to-SCSI

  I controller PCI-to-SCSI sono, come suggerisce il nome, connessi al
  bus PCI ad alta velocit e non soffrono dello stesso collo di
  bottiglia come i controller SCSI-to-SCSI. Questi controller richiedono
  driver speciali ma potete anche capire cosa significa controllare la
  configurazione RAID attraverso la rete il che semplifica la gestione.

  Attualmente solo poche famiglie di adattatori PCI-to-SCSI sono gestiti
  sotto Linux.



     DPT
        I pi vecchi e pi maturi sono una gamma di controller della DPT
        <http://www.dpt.com> incluse le famiglie di controller
        SmartCache I/III/IV e SmartRAID I/III/IV.  Questi controller
        sono supportati dai driver EATA-DMA presenti nel kernel
        standard. Questa compagnia ha inoltre una home page
        <http://www.dpt.com> informativa che descrive i vari aspetti
        generali del RAID e dello SCSI oltre alle informazioni dei
        prodotti.

        Maggiori informazioni dall'autore dei driver dei controller DPT
        (driver EATA* possono essere trovate sulla sua pagina presso
        SCSI <http://www.uni-mainz.de/~neuffer/scsi> e DPT
        <http://www.uni-mainz.de/~neuffer/scsi/dpt>.

        Questi non sono i pi veloci ma hanno una affidabilit pi che
        provata.

        Notate che gli strumenti di gestione per i controller DTP
        attualmente girano solamente sotto DOS/Win, cos avrete bisogno
        di una piccola partizione Dos/Win per un po' di software. Ci
        significa pure che dovrete lanciare il sistema con Windows per
        fare manutenzione del vostro sistema RAID.



     ICP-Vortex
        Una recentissima aggiunta  un set di controller della ICP-
        Vortex <http://www.icp-vortex.com> con la caratteristica di
        avere fino a 5 canali indipendenti e hardware molto veloce
        basati sul chip i960. Il driver per Linux  stato scritto dalla
        compagnia stessa il che dimostra che supportano Linux.

        Visto che ICP-Vortex fornisce il software di manutenzione per
        Linux, non  necessario fare un boot verso altri sistemi
        operativi per il setup e la manutenzione del vostro sistema
        RAID. Questo vi fa risparmiare tempo.



     Mylex DAC-960
        Questo  una delle ultime uscite ed  in beta.  Maggiori
        informazioni come anche i driver sono disponibili presso la
        Dandelion Digital's Linux DAC960 Page
        <http://www.dandelion.com/Linux/DAC960.html>.



     Compaq Smart-2 PCI Disk Array Controllers
        Un'altra entrata recentissima e attualmente in versione beta 
        il driver Smart-2 <http://www.insync.net~frantze/cpqarray.html>.




  6.1.3.  Software RAID

  Qualche sistema operativo offre software RAID su dischi comuni e
  controller. Il costo  basso e le prestazioni per il crudo IO su disco
  possono essere molto alte.

  Visto che pu richiedere molte risorse della CPU, aumenta il carico
  evidente quindi se la macchina  limitata nelle prestazioni della CPU
  piuttosto che nelle prestazioni dell'IO, sarebbe meglio per voi
  risolvere con un controller hardware PCI-to-RAID.

  Il costo reale, le prestazioni e specialmente l'affidabilit del RAID
  software contro quello hardware sono un argomento molto controverso.
  L'affidabilit su sistemi Linux  stata finora molto buona.

  L'attuale progetto del software RAID per Linux,  il sistema md
  (multiple devices) che offre molto pi del RAID, quindi  descritto
  maggiormente pi avanti.



  6.1.4.  Livelli di RAID

  Il RAID lo troviamo con molti livelli e sapori su cui far una breve
  descrizione qui. Molto  stato scritto riguardo questo ed il lettore
  interesato  invitato a leggere di pi sulle FAQ del RAID.


    RAID 0 non  affatto ridondante ma offre la pi alta velocit di
     trasferimento di tutti i livelli. I dati sfilano attraverso un bel
     numero di dischi quindi le operazioni di lettura e scrittura
     avvengono in parallelo attraverso tutti i dischi.  D'altra parte se
     un singolo disco fallisce, allora tutto  perduto.  Avevo parlato
     di backup?

    RAID 1  il metodo pi primitivo per ottenere ridondanza duplicando
     i dati attraverso tutti i drive. Naturalmente questo  un metodo
     che spreca molto ma ottenete un vantaggio che  l'accesso rapido.
     Il disco che accede ai dati per primo vince. I trasferimenti non
     sono pi veloci che per dischi singoli, sebbene potreste ottenere
     trasferimenti di lettura maggiori utilizzando una lettura di
     traccia per disco.

     Inoltre se avete solo due dischi, questo  l'unico modo per
     raggiungere la ridondanza.

    RAID 2 e 4 non sono cos comuni e non ci sono qui.

    RAID 3 utilizza un certo numeri di dischi (almeno 2) per
     immagazzinare i dati come nella modalit RAID 0. Esso utilizza
     inoltre un disco di ridondanza addizionale per archiviare la somma
     XOR dei dati dai dischi contenenti i dati. Dovesse fallire il disco
     di ridondanza, il disco pu continuare ad operare come se niente
     fosse accaduto.  Se un disco contenente i dati dovesse fallire, il
     sistema pu determinare i dati su questo disco dall'informazione
     sul disco di ridondanza e sui dischi rimanenti. Qualsiasi doppio
     fallo porter alla disattivazione del RAID.

     RAID 3 ha senso solo con almeno 2 dischi di dati (3 dischi incluso
     il disco di ridondanza). Teoricamente non c' limite per il numero
     di dischi nell'insieme, ma la probabilit di un errore aumenta con
     il numero di dischi nell'insieme RAID. Generalmente il limite
     superiore  dai 5 ai 7 dischi in un singolo insieme RAID.

     Visto che RAID 3 immagazzina tutte le informazioni ridondanti su un
     disco dedicato e visto che questa informazione deve essere
     aggiornata qualora ci sia un'operazione di scrittura su qualsiasi
     disco di dati, la velocit generale di scrittura dell'insieme RAID
     3  limitata dalla velocit di scrittura del disco di ridondanza.
     Anche questo  un limite per il numero di dischi in un insieme
     RAID.  La velocit generale di lettura di un insieme RAID 3 con
     tutti i dischi di dati attivati,  quella di un insieme RAID 0 con
     quel numero di dischi. Se l'insieme deve ricostruire i dati
     immagazzinati su un disco fallito da un'informazione ridondante, la
     prestazione sar severamente limitata: tutti i dischi nell'insieme
     devono essere letti e dev'essere fatto l'XOR dai dati per calcolare
     le informazioni rimanenti.

    RAID 5  come il RAID 3, ma l'informazione ridondante  sparsa su
     tutti i dischi dell'insieme RAID. Questo aumenta la prestazione in
     scrittura, perch il carico  distribuito pi omogeneamente tra
     tutti i dsichi disponibili.

  Ci sono anche ibridi basati su RAID 0 o 1 e un altro livello.  Molte
  combinazioni sono possibili ma ne ho viste solamente poche.  Questi
  sono pi complessi dei livelli RAID sopra menzionati.

  RAID 0/1 combina lo spandimento con la duplicazione, il che conferisce
  trasferimenti molto veloci insieme ad accessi veloci come anche
  ridondanza. Lo svantaggio  il grosso consumo di disco come anche la
  complessit sopra descritta.

  RAID 1/5 combina la velocit e i benefici della ridondanza del RAID 5
  con l'accesso veloce del RAID 1. La ridondanza  migliorata se
  paragonata al RAID 0/1 ma il consumo di disco  ancora importante.
  Implementare questo sistema vuol dire utilizzare in genere pi di 6
  dischi, forse anche diversi controller o canali SCSI.



  6.2.  Gestione dei Volumi

  La gestione dei volumi  un modo per superare le costrizioni delle
  partizioni e dei dischi a dimensione fissa mantenendo sempre il
  controllo di dove le varie parti dei file risiedono. Con un sistema
  del genere potete aggiungere nuovi dischi al vostro sistema e
  aggiungere spazio da questo disco alle parti dello spazio file dove 
  necessario, come anche migrare i dati fuori da un disco che ha dei
  problemi ad altri dischi prima che avvenga un fallimento catastrofico.

  Il sistema sviluppato da Veritas <http://www.veritas.com>  diventato
  lo standard di fatto per la gestione logica dei volumi.

  La gestione dei volumi  una delle cose in cui attulamente Linux 
  carente.

  Uno  il progetto del sistema a partizioni virtuali VPS
  <http://www.uiuc.edu/ph/www/roth> che reimplementer molte delle
  funzioni di gestione trovate nel sistema AIX di IBM. Sfortunatamente
  questo progetto  fermo.

  Un altro progetto  il Logical Volume Manager
  <http://linux.msede.com/lvm/> che  simile ad un progetto della HP.



  6.3.  La patch md  per il kernel Linux

  Il Linux Multi Disk (md) fornisce un certo numero di caratteristiche
  di livelli di blocco in vari stadi di sviluppo.

  RAID 0 (spargimento) e concatenamento sono molto solidi anche nella
  qualit di produzione e anche i RAID 4 e 5 sono molto maturi.

   inoltre possibile ammucchiare qualche livello, ad esempio fare il
  mirror (RAID 1) di due paia di dischi, ogni paio costruito come dischi
  sparsi (RAID 0), il che offre la velocit del RAID 0 con
  l'affidabilit del RAID 1.

  Oltre al RAID questo sistema offre (allo stadio alfa) la gestione dei
  volumi a livelli di blocco e presto anche spazio file traslucido.  Dal
  momento che questo  fatto a livello di blocco, esso pu essere
  utilizzato in combinazione con qualsiasi file system, anche per la fat
  utilizzando Wine.

  Pensate attentamente quali dischi combinate cos potete agire su tutti
  i dischi in parallelo, il che vi fornisce migliori prestazioni e meno
  usura. Leggete di pi riguardo a ci nella documentazione che
  accompagna md.

  Sfortunatamente la documentazione  piuttosto vecchia ed in parte
  fuorviante e si riferisce solamente alla versione 0.35 di md che usa
  un setup di vecchio stile. Il nuovo sistema  molto differente e
  presto sar rilasciato come versione 1.0 ma  attualmente non
  documentato. Se voleste provarlo, dovreste seguire la mailing list
  linux-raid.

  La documentazione sta migliorando e il Software RAID HOWTO
  <http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/>  in lavorazione.


  Suggerimento: se non riuscite a farlo funzionare correttamente, avete
  dimenticato di impostare il flag persistent-block. La vostra
  documentazione migliore  attualmente il codice sorgente.




  6.4.  Compressione

  La compressione del disco contro la compressione dei file  un
  dibattito caldo specialmente riguardo il rischio aggiunto di
  corruzione dei file.  Nonostante ci ci sono diverse opzioni
  disponibili per gli amministratori avventurosi. Questi intraprendono
  molte forme, dai moduli del kernel ed le patch alle librerie extra, ma
  notate che molti soffrono di diverse forme di limitazione quali essere
  di sola lettura. Visto che lo sviluppo va cos rapidamente,
  sicuramente le specifiche saranno cambiate nel momento in cui leggete
  questo. Come sempre: controllate da soli gli aggiornamenti.  Qui sono
  elencati solo pochi riferimenti.


    Compressione file dalle doppie caratteristiche con alcune
     limitazioni.

    Zlibc aggiunge una decompressione in tempo reale e trasparente dei
     file mentre li carica.

    ci sono molti moduli disponibili per leggere i file compressi o le
     partizioni che sono native ad altri svariati sistemi operativi
     sebbene attualmente la maggior parte di questi  di sola lettura.

    dmsdos <http://bf9nt.uni-
     duisburg.de/mitarbeiter/gockel/software/dmsdos/> (attualmente alla
     versione 0.9.2.0) offre molto della compressione disponibile per il
     DOS e per Windows. Non  ancora completa ma il lavoro sta andando
     avanti e nuove caratteristiche aggiunte regolarmente.

    e2compr  un pacchetto che implementa l'ext2fs con le capacit di
     compressione.  ancora in fase di test e sar principalmente di
     interesse per gli hacker del kernel ma dovrebbe acquisire ben
     presto la stabilit necessaria per un uso pi vasto.  Controllate
     l' homepage e2compr <http://netspace.net.au/~reiter/e2compr.html>
     per maggiori informazioni. Ho saputo della velocit e della buona
     stabilit, ecco perch  menzionato qui.



  6.5.  ACL

  L'Access Control List (ACL) offre un controllo pi fine sull'accesso
  ai file di un utente sulle basi dell'utente stesso piuttosto che il
  tradizionale owner, group and others, come si vede nel listato della
  directory (drwxr-xr-x). Ci non  ancora disponibile in Linux ma ci si
  aspetta che lo sar nel kernel 2.3 visto che gli agganci sono gi
  posizionati nell'ext2fs.



  6.6.  cachefs

  Questo utilizza una parte del disco rigido per mettere in cache
  supporti pi lenti come i CD-ROM.  disponibile per SunOS ma non
  ancora per Linux.



  6.7.  File System Traslucidi o Nascosti

  Questo  un sistema copy-on-write dove le scritture finiscono su un
  sistema differente dalla reale origine facendolo sembrare uno spazio
  file ordinario. Quindi visto che lo spazio file nasconde i dati
  originali ed il traslucente li riscrive indietro, il buffer pu essere
  privato per ogni utente.

  C' un certo numero di applicazioni:

    aggiornare un file system vivo su un CD-ROM, rendendolo flessibile,
     veloce e che risparmi anche spazio,

    uno scheletro dei file originale per ciascun nuovo utente,
     risparmiando spazio visto che i dati originali sono mantenuti in
     uno spazio singolo e condivisi,

    progetto di sviluppo parallelo prototipizzando il fatto che ogni
     utente possa modificare il sistema globalmente non intaccando gli
     altri utenti.

  SunOS offre questa caratteristica ed  in fase di sviluppo per Linux.
  C'era un vecchio progetto chiamato Inheriting File Systems (ifs) ma
  questo progetto si  fermato.  Un progetto attuale  parte del sistema
  md e offre traslucenza del livello di blocco cos pu essere applicato
  a qualsiasi file system.

  La Sun ha una pagina <http://www.sun.ca/white-papers/tfs.html>
  informativa sul file system traslucido.





  6.8.  Posizionamento Fisico delle Tracce

  Questo trucco era molto importante quando i dischi erano lenti e
  piccoli e qualche file system era solito considerare le
  caratteristiche variabili nel posizionare i file. Oltre alla velocit
  generale pi alta, la cache integrata nei controller e nei dischi ha
  ridotto questo effetto.

  Comunque c' ancora qualcosa da guadagnare anche oggi.  Da quel che
  sappiamo, "il dominio del mondo"  a portata di mano, ma per
  raggiungerlo "velocemente" dobbiamo impiegare tutti i trucchi che
  possiamo .

  Per capire la strategia dobbiamo richiamare questo vecchio pezzo di
  conoscenza e le propriet delle varie localizzazioni delle tracce.
  Questo  basato sul fatto che le velocit di trasferimento
  generalmente aumentano per le tracce pi ci si allontana dal pignone,
  come anche per il fatto che  pi veloce accedere verso o dalle tracce
  centrali che verso o dalle tracce pi interne o pi esterne.

  La maggior parte delle unit utilizzano dischi che girano con velocit
  angolare costante ma utilizzano una densit di dati (abbastanza)
  costante attraverso tutte le tracce. Questo vuol dire che otterrete
  una pi alta velocit di trasferimento sulle tracce esterne che su
  quelle pi interne; una carateristica che  molto buona per le
  necessit di grosse librerie.

  I dischi pi recenti utilizzano una geometria logica di mappatura che
  differisce dall'attuale mappatura fisica con la quale sono mappati
  trasparentemente dal disco stesso.  Questo fa s che la stima delle
  tracce "di mezzo" sia pi difficile.

  Nella maggior parte dei casi la traccia 0  nella traccia pi esterna
  e questo  lo standard per molte persone. Comunque, si dovrebbe
  ricordare che non ci sono garanzie che sia sempre cos.



     Le tracce pi interne
        sono generalmente lente in trasferimento e anche il fatto di
        giacere alla fine della posizione di accesso ne rende lento
        l'accesso.

        Sono quindi pi adatte per le directory low end come DOS, root e
        gli spool di stampa.


     Le tracce intermedie
        sono mediamente pi veloci riguardo al trasferimento rispetto
        alle tracce pi interne e essendo in mezzo vi si accede pi
        velocemente.

        Questa caratteristica  ideale per le parti che richiedono di
        pi quali swap, /tmp e /var/tmp.


     Le tracce esterne
        hanno di media caratteristiche di trasferimento pi veloci ma,
        come le tracce interne, sono collocate alla fine dell'accesso;
        quindi, statisticamente, accedervi  ugualmente lento che per le
        tracce interne.

        Grandi file come le librerie beneficerebbero del posizionamento
        in questa sede.


  Quindi la riduzione del tempo di accesso pu essere raggiunta
  posizionando le tracce con accesso frequente in mezzo cos che la
  distanza media di accesso e di conseguenza il tempo di accesso possa
  essere breve.  Questo pu essere fatto sia utilizzando fdisk o cfdisk
  per fare una partizione nelle tracce di mezzo o facendo prima un file
  (utilizzando dd) uguale alla met della grandezza dell'intero disco
  prima di creare i file cui si ha accesso di frequente, dopo di che il
  file fittizio pu essere cancellato. In entrambe i casi si assume che
  si inizi da un disco vuoto.

  L'ultimo trucco  adatto per gli spool delle news dove la struttura
  delle directory vuote pu essere posizionata nel mezzo prima di
  metterci i file di dati. Questo aiuta inoltre un po' la
  frammentazione.

  Questo piccolo trucco pu essere utilizzato sia sui dischi ordinari
  sia per i sistemi RAID. Nell'ultimo caso il calcolo per mettere al
  centro le tracce sar differente, se possibile. Consultate l'ultimo
  manuale RAID.

  La differenza di velocit sta al drive ma un 50 per cento di
  miglioramento  un valore comune.


  6.8.1.  Valori di velocit del disco

  Lo stesso assemblaggo della testata (HDA)  spesso disponibile su un
  bel numero di interfacce (IDE, SCSI, ecc.) ed i parametri meccanici
  sono quindi paragonabili. Oggigiorno la meccanica  spesso il fattore
  limitante ma lo sviluppo sta migliorando le cose rapidamente.  Ci sono
  due parametri principali, generalmente riportati in millisecondi (ms):


    Movimento delle testine - la velocit alla quale la testina di
     lettura e scrittura  capace di muoversi da una traccia a quella
     successiva, chiamata tempo di accesso.  Se fate i calcoli e
     integrate l'accesso prima attraverso tutte le possibili tracce di
     partenza e poi attraverso tutte le possibili tracce di
     destinazione, troverete che ci  uguale ad un colpo (stroke)
     attraverso un terzo di tutte le tracce.

    Velocit rotazionale - che determina il tempo necessario per
     arrivare al settore giusto, chiamato latenza.

  Dopo che le bobine audio hanno rimpiazzato i motori passo passo per il
  controllo del movimento delle testine, i miglioramenti sembrarono
  essersi livellati e maggiore energia  oggi impiegata (letteralmente)
  per migliorare la velocit rotazionale. Questo ha il beneficio
  secondario di aumentare anche le velocit di trasferimento.

  Qualche valore tipico:



                             Tipo di Disco


       Tempo di acceso  (ms)   | Veloce  Tipico  Vecchio
       --------------------------------------------------
       Traccia-a-traccia          <1       2       8
       Tempo medio di accesso     10      15      30
       Fine-a-fine                10      30      70




  Ci dimostra che gli ultimissimi dischi, offrono solo marginalmente un
  miglior tempo di accesso della media dei dischi ma che i vecchi dischi
  basati su motori passo passo sono decisamente peggiori.




       Velocit di rotazione |  3600 | 4500 | 4800 | 5400 | 7200 | 10000
       -------------------------------------------------------------------
       Latenza          (ms)   |    17 |   13 | 12.5 | 11.1 |  8.3 |   6.0




  Dal momento che la latenza  il tempo medio per raggiungere un settore
  particolare, la formula  sufficientemente semplice


       latenza (ms) = 60000 / velocit (RPM)





  Ovviamente anche questo  un esempio della diminuzione dei compensi
  per gli sforzi messi nello sviluppo. Comunque, ci che veramente
  importa qui  il consumo di elettricit, il calore ed il rumore.



  6.9.  Sovrapposizione di strati RAID

  Uno dei vantaggi di un progetto a strati di un sistema operativo  che
  si ha a disposizione la flessibilit di mettere insieme i pezzi in un
  gran numero di modi.  Ad esempio potete mettere in cache un CD-ROM con
  cachefs che  un volume suddiviso tra due dischi. Questo a turno pu
  essere organizzato in maniera traslucente con un volume che  montato
  da un'altra macchina via NFS. RAID pu essere raggruppato in svariati
  strati per offrire accesso molto veloce e trasferimento in una maniera
  tale che potrebbe funzionare se anche fallissero 3 dischi.  Le scelte
  sono tante, limitate solamente dall'immaginazione e, cosa
  probabilmente pi importante, dal denaro.



  6.10.  Raccomandazioni

  C' un numero praticamente infinito di combinazioni disponibili ma la
  mia raccomandazione  di iniziare con un'installazione semplice senza
  alcuna aggiunta immaginosa. Capite cosa vi serve, dove  richiesta la
  massima prestazione, se il collo di bottiglia  il tempo di accesso o
  la velocit di trasferimento, e cos via.  Poi affrontate ogni
  componente a turno. Se voi potete raggruppare abbastanza liberamente,
  dovreste essere capaci di rimpiazzare la maggior parte dei componenti
  con poche difficolt.

  RAID  generalmente una buona idea ma assicuratevi di avere una buona
  padronanza della tecnologia ed un solido sistema di back up.




  7.  Altri Sistemi Operativi

  Molti utenti Linux hanno diversi sistemi operativi installati, spesso
  necessari a causa di sistemi di predisposizione dell'hardware che
  girano sotto altri sistemi operativi, In particolare il DOS o qualche
  tipo di Windows. Una piccola sezione su come avere a che fare al
  meglio con questi  qui inclusa.


  7.1.  DOS

  Mantenendo in disparte il dibattito sul fatto che il DOS si qualifichi
  o meno come sistema operativo, uno potrebbe dire che  molto poco
  sofisticato riguardo alle operazioni del disco. La pi grave
  conseguenza di questo fatto  che ci possono essere serie difficolt
  facendo girare varie versioni del DOS su dischi larghi, e voi siete
  quindi fortemente invitati a leggere il Large Drives mini-HOWTO.

  Un effetto collaterale di ci  che spesso si propende a mettere il
  DOS su numeri di traccia bassi.

  Essendo stato progettato per piccoli dischi, ha un file system
  alquanto poco sofisticato (fat) e quando usato su dischi grossi alloca
  blocchi di dimensioni enormi. Inoltre, causa la frammentazione dei
  blocchi, che dopo un po' causer accessi spropositati e rallenter i
  trasferimenti effettivi.


  Una soluzione a questo  fare una deframmentazione regolarmente ma 
  fortemente raccomandato fare un backup prima di deframmentare.  Tutte
  le versioni del DOS hanno il chkdsk che pu fare un po' di controllo
  del disco, le nuove versioni hanno anche lo scandisk che  in qualche
  modo migliore. Ci sono molti programmi di deframmentazione
  disponibili, qualche versione ne ha uno chiamato defrag. Le Norton
  Utilities hanno un grosso insieme di attrezzi per il disco e ce ne
  sono anche molti altri.

  Come sempre ci sono imprevisti, e questo particolare serpente nel
  nostro paradiso del disco  chimato file nascosti. Qualche rivenditore
  cominci ad usarli per schemi di protezione delle copie perch non
  avrebbero reagito bene nell'essere spostati in un'altra parte sul
  disco, anche se rimanevano nello stesso posto nella struttura della
  directory. Il risultato di questo fu che i programmi di
  deframmentazione non toccavano alcun file nascosto, che a lungo andare
  riduceva l'effetto della deframmentazione.

  Essendo un sistema operativo mono tasking, mono threading e mono molte
  altre cose, ci sono molti pochi vantaggi nell'usare dischi multipli se
  almeno non utilizzate un controller con un qualsiasi supporto RAID
  integrato.

  Ci sono un po' di utilit chiamate join e subst che possono eseguire
  una configurazione di dischi multipli ma c' un guadagno molto piccolo
  da questo per l'enorme lavoro da fare. Qualcuno di questi programmi 
  stato rimosso nelle nuove versioni.

  Alla fine c' molto poco che voi potete fare, ma niente  perduto.
  Molti programmi necessitano di archiviazione veloce, temporanea e
  quelli che si comportano bene cercheranno variabili d'ambiente
  chiamate TMPDIR o TEMPDIR che potete predisporre per farle puntare ad
  un altro disco. Questo  di solito fatto nell'autoexec.bat.


  ______________________________________________________________________
  SET TMPDIR=E:/TMP
  SET TEMPDIR=E:/TEMP
  ______________________________________________________________________



  Non solo vi potr far guadagnare pi velocit ma pu anche ridurre la
  frammentazione.

  Ci sono state delle affermazioni riguardo la difficolt nel rimuovere
  partizioni primarie multiple utilizzando il programma fdisk che
  accompagna il DOS. Se dovesse capitare potete utilizzare un disco di
  recupero Linux con l'fdisk di Linux per riparare il sistema.

  Non dimenticate che ci sono altre alternative al DOS, le pi note sono
  il DR-DOS <http://www.caldera/dos/> della Caldera
  <http://www.caldera/>.  Questo  il diretto discendente del DR-DOS
  della Digital Research.  Esso offre molte caratteristiche non trovate
  nel pi comune DOS, come il multi tasking ed i nomi di file lunghi.

  Un'altra alternativa, che  pure libera,  Free DOS
  <http://www.freedos.org/> che  un progetto in sviluppo. Un numero di
  utilit libere sono disponibili.







  7.2.  Windows

  La maggior parte dei punti espressi qui sopra sono validi anche per
  Windows, con l'eccezione di Windows95 che apparentemente ha una
  migliore gestione del disco, che trarr migliori prestazioni dai
  dischi SCSI.

  Una cosa utile  l'introduzione dei nomi di file lunghi, per leggerli
  da Linux dovrete avere il file system vfat per montare queste
  partizioni.


  La frammentazione del disco  ancora un problema. Un po' di questa pu
  essere evitata facendo una deframmentazione immediatamente prima e
  immediatamente dopo l'installazione di grossi programmi o sistemi.
  Uso questa procedura al lavoro e mi sono accorto che funziona
  abbastanza bene. Eliminare i file inutilizzati e svuotare il cestino
  prima di tutto pu migliorare la deframmentazione ancora di pi.

  Anche Windows utilizza i dischi swap, e reindirizzare ci verso un
  altro disco pu concedervi guadagni di prestazione. Ci sono diversi
  mini-HOWTO che vi dicono come condividere al meglio lo spazio di swap
  tra vari sistemi operativi.




  Il trucco di organizzare la TEMPDIR pu ancora essere utilizzato ma
  non tutti i programmi soddisferanno questa disposizione. Alcuni
  comunque lo fanno. Per avere una buona visione delle disposizioni nei
  file di controllo, potete lanciare sysedit che aprir un bel numero di
  file da editare, uno dei quali  l'autoexec dove potete aggiungere i
  settaggi della TEMPDIR.

  Molti dei file temporanei sono messi nella directory /windows/temp e
  cambiare questo  pi arduo. Per fare questo potete utilizzare regedit
  che  abbastanza potente e capace di mettere il vostro sistema in uno
  stato che non gradireste o, pi precisamente, in uno stato meno
  gradevole di Windows in generale. Registry database error  un
  messaggio che significa seriamente cattive notizie. Inoltre vedrete
  che molti programmi hanno la propria directory temporanea sparsa nel
  sistema.

  Predisporre il file di swap su una partizione separata  un'idea
  migliore e molto meno rischiosa. Ricordatevi che questa partizione non
  pu essere utilizzata per niente altro, anche se dovesse sembrare che
  c' spazio residuo.

  Ora  possibile leggere le partizioni ext2fs da Windows, anche
  montando le partizioni utilizzando FSDEXT2
  <http://www.yipton.demon.co.uk/> o utilizzando un esploratore di file
  chiamato Explore2fs
  <http://uranus.it.swin.edu.au/~jn/linux/Explore2fs.html>.



  7.3.  OS/2

  L'unica nota speciale qui  che potete ottenere un driver del file
  system per OS/2 che pu leggere una partizione ext2fs.


  7.4.  NT

  Questo  un sistema pi serio caratterizzato da termini di gran moda
  noti al marketing.  bene notare che pu fare lo striping e molte
  altre sofisticate predisposizioni. Notate il drive manager nel
  pannello di controllo. Non ho facile accesso ad NT, maggiori dettagli
  su questo possono necessitare un po' di tempo.

  Un intoppo importante  stato riportato recentemente da acahalan at
  cs.uml.edu : (riformattato da un messaggio Usenet)

  Il DiskManager di NT ha un bug serio che pu corrompere il vostro
  disco quando avete diverse (pi di una?) partizioni estese. La
  Microsoft rilascia un programma per correggere questo problema sul
  proprio sito. Vedete la knowledge base <http://www.microsoft.com/kb/>
  per saperne di pi (questo tocca gli utenti Linux, perch hanno
  partizioni extra).

  Ora potete leggere le partizioni ext2fs da NT mediante Explore2fs
  <http://uranus.it.swin.edu.au/~jn/linux/Explore2fs.html>.



  7.5.  Sun OS

  C' un po' di confusione in quest'area tra Sun OS contro Solaris.  In
  maniera molto concisa, Solaris non  altro che Sun OS 5.x confezionato
  con Openwindows e poche altre cose. Se eseguite Solaris, vi basta
  scrivere uname -a per vedere la vostra versione.  Parte della ragione
  di questa confusione  che la Sun Microsystems soleva utilizzare un SO
  proveniente dalla famiglia BSD, sebbene con un po' di pezzi da altre
  parti come anche con cose fatte da loro. Questa  stata la situazione
  fino al Sun OS 4.x.y quando presero una "decisione strategica della
  pianificazione" e decisero di passare oltre lo Unix ufficiale, il
  System V, la Versione 4 (aka SVR5), e fu creato il SO Sun 5.  Questo
  rese scontenti molti. Inoltre venne unito ad altre cose e
  commercializzato sotto il nome di Solaris, che attualmente  alla
  versione 7 che proprio da poco ha rimpiazzato la versione 2.6 essendo
  l'ultima e la migliore. A differenza del grosso salto nel numero della
  versione c' stato attualmente un piccolo miglioramento ma un salto
  enorme per il marketing.




  7.5.1.  Sun OS 4

  Questo  abbastanza familiare alla maggior parte degli utenti Linux.
  L'ultima versione  la 4.1.4 pi varie patch. Notate comunque che la
  struttura del file system  abbastanza differente e non  conforme al
  FSSTND quindi ogni pianificazione deve essere fatta sulla struttura
  standard. Potete ottenere qualche informazione su questo dalle pagine
  man: man hier. Questo , come molte pagine man, abbastanza conciso ma
  dovrebbe essere un buon inizio. Se siete ancora confusi dalla
  struttura almeno sar ad un livello pi alto.


  7.5.2.  Sun OS 5 (aka Solaris)

  Si presenta con un elegante sistema di installazione che gira sotto
  Openwindows, che vi aiuter a partizionare ed a formattare i dischi
  prima dell'installazione del sistema da CD-ROM. Fallir anche se il
  vostro setup dei dischi  troppo vasto e dal momento che serve
  un'intera sessione di installazione da un CD-ROM pieno, in un'unit 1x
  questo fallimento vi piomber addosso dopo troppo tempo. Questa 
  l'esperienza che abbiamo fatto quando lo usavo al lavoro. Quindi
  installavamo tutto su un solo disco e poi spostavamo le directory tra
  i dischi.


  Le impostazioni abituali sono sensibili alla maggior parte delle cose,
  ma rimane ancora una piccola controversia: i dischi swap. Sebbene il
  manuale ufficiale raccomanda dischi di swap multipli (che sono
  utilizzati in maniera simile a Linux) abitualmente si utilizza un
  disco solo. Si raccomanda di cambiare ci il prima possibile.

  Sun OS 5 offre inoltre un file system progettato in maniera specifica
  per i file temporanei, tmpfs. Offre un miglioramento significativo
  della velocit rispetto a ufs ma non c' sopravvivenza al riavvio.


  L'unico commento quindi : state attenti! Sotto Solaris 2.0 sembra che
  creare file troppo grandi in /tmp possa causare una trappola con
  kernel panic da saturazione dello spazio swap.  Ci che risulta da ci
  che accade  la perdita di ogni dato su un RAMdisk dopo avere spento e
  quindi risulta difficile capire ci che accade dopo avere spento. Ci
  che  peggio, sembra che i processi dello spazio utente possano
  causare questo kernel panic e sebbene questo problema sia molto a
  cuore,  meglio non utilizzare tmpfs in ambienti potenzialmente
  ostili.

  Controllate anche le note su ``tmpfs''.

  Trivia: C' anche un film chiamato Solaris, un film di fantascienza
  che  molto, molto lungo, lento ed incomprensibile. Questo  spesso
  stato segnalato quando Solaris (il SO) apparve...



  7.5.3.  BeOS

  Questo sistema operativo  uno dei pi recenti ad arrivare e ha la
  caratteristica di avere un file system che ha uno stampo ad archivio.

  C' un driver per il file system BFS che stanno sviluppando per Linux
  ed  disponibile in versione alpha.  Per maggiori informazioni
  controllate la Linux BFS page
  <http://hp.vector.co.jp/authors/VA008030/bfs> dove sono disponibili
  anche le patch.




  8.  Cluster

  In questa sezione accenner brevemente al modo in cui le macchine
  possono essere connesse tra loro ma questo  un argomento molto ampio
  che potrebbe essere oggetto di un HOWTO separato, suggerimento,
  suggerimento. Inoltre parlando concisamente, questa sezione giace
  fuori dallo scopo di questo HOWTO, quindi se avete voglia di gloria,
  voi potreste contattarmi e accollarvi questa parte e riversarla su un
  nuovo documento.

  In questi giorni i computer diventano datati con una frequenza
  eccezionale.  Non c' comunque ragione per non fare un buon uso del
  vecchio hardware con Linux. Utilizzando un computer vecchio e fuori
  moda come un server di rete pu essere sia utile nella propria essenza
  che come un buon esercizio didattico. Questo gruppo di computer
  collegati in rete pu assumere diverse forme ma per rimanere
  nell'argomento di questo HOWTO mi limiter alle strategie dei dischi.
  Nonostante ci spererei che qualcun altro si accollasse questo
  argomento e lo riversasse in un proprio documento.

  Questa  un'area eccitante di attivit oggi, e molte forme di
  raggruppamento sono disponibili oggi, spaziando dal bilanciamento del
  carico di lavoro automatico della rete locale ad un hardware pi
  esotico come la Scalable Coherent Interface (SCI) che fornisce una
  stretta integrazione di macchine, covertendole effettivamente in una
  macchina unica.  Vari tipi di raggruppamenti sono stati disponibili
  per macchine pi grandi per qualche tempo e il gruppo VAXcluster 
  forse un esempio ben conosciuto di ci. Il raggruppamento  fatto di
  solito al fine di condividere le risorse quali dischi, stampanti,
  terminali, ecc., ma anche per elaborare risorse ugualmente in maniera
  trasparente tra i nodi computazionali.

  Non c' una definizione universale di raggruppamento, qui  inteso per
  definire una rete di macchine che combina le proprie risorse per
  servire gli utenti. Ammetto che questa  una definizione poco valida
  ma ci cambier pi tardi.

  In questi giorni inoltre Linux offre caratteristiche di raggruppamento
  ma all'inizio descriver solamente una semplice rete locale.  un buon
  modo per riutilizzare il vecchio ed altrimenti inutilizzabile
  hardware, fino a che possono permettere a Linux o a qualcosa del
  genere di girare.

  Uno dei modi migliori di utilizzare una vecchia macchina  un server
  di rete nel caso in cui la velocit effettiva sia verosimilmente
  limitata dall'ampiezza di banda piuttosto che dalla pura prestazione
  computazionale.  Per utilizzo domestico potreste spostare la seguente
  funzionalit presso una macchina pi vecchia utilizzata come server:

    news

    posta

    proxy web

    server di stampa

    modem server (PPP, SLIP, FAX, posta Vocale)

  Potete anche montare con NFS i dischi sulla vostra stazione operativa
  riducendo le necessit di spazio disco. Comunque leggete il FSSTND per
  vedere quali directory non dovrebbero essere esportate. I miglior
  candidati per esportare tutte le macchine sono /usr e /var/spool e
  possibilmente /usr/local ma probabilmente non /var/spool/lpd.

  La maggior parte delle volte anche i dischi lenti, fornirebbero una
  prestazione sufficiente. D'altro canto, se processate direttamente sui
  dischi del server o avete un sistema di rete molto veloce, potreste
  volere ripensare alla vostra strategia ed utilizzare dischi pi
  veloci. Le caratteristiche di ricerca su un server web o ricerca su un
  archivio di news ne sono esempi.

  Una rete del genere pu essere un modo eccellente di imparare
  l'amministrazione di rete e mettere su la propria rete tostapane, come
   spesso chiamata.  Potete ottenere maggiori informazioni su questo in
  altri HOWTO ma ci sono due cose importanti che dovreste tenere a
  mente:

    Non tirate fuori dal nulla i numeri IP. Configurate la vostra rete
     interna utilizzando numeri IP riservati per utilizzo privato, es.
     utilizzate il vostro server di rete come router che gestisca questo
     mascheramento di IP.

    Ricordate che se configurate in aggiunta il router come un
     firewall, potreste non essere in grado di accedere ai vostri dati
     dal di fuori, a seconda della configurazione del firewall.

  La rete nyx fornisce un esempio di gruppo nel senso definito qui.
  Esso consiste delle seguenti macchine:
     nyx
         una delle due macchine per il login utente e fornisce qualche
        servizio di rete.

     nox
        (aka nyx10)  la macchina di login utente principale ed  anche
        il server di posta.

     noc
         un server dedicato alle news. Lo spool delle news  reso
        accessibile attraverso NFS montando verso nyx e nox.

     arachne
        (aka www)  il server web. Le pagine Web sono scritte montando
        NFS su nox.

  Ci sono inoltre altri progetti di raggruppamento pi avanzato in atto

    Il progetto Beowulf
     <http://cesdis.gsfc.nasa.gov/linux/beowulf/beowulf.html>

    The Genoa Active Message Machine (GAMMA)
     <http://www.disi.unige.it/project/gamma/>


  Il raggruppamento di alta tecnologia richiede interconnesioni ad alta
  tecnologia e SCI  uno di essi. Per scoprirne di pi potete sia
  cercare sull'home page della Dolphin Interconnect Solutions
  <http://www.dolphinics.no/> che  uno degli attori principali in
  questo campo, o potete vedere scizzl <http://www.scizzl.com/>.


  I server di posta centralizzati che utilizzano IMAP stanno diventando
  sempre pi popolari visto che i dischi diventano grandi abbastanza da
  contenere tutta la posta archiviata indefinitamente ed inoltre
  sufficientemente economici da renderla un'opzione realizzabile.
  Sfortunatamente  diventato chiaro che montare attraverso NFS la posta
  da un'altra macchina pu causare la corruzione del database IMAP visto
  che il software del server non gestisce le interruzioni dell'NFS
  troppo bene e le interruzioni di NFS sono un'evenienza abbastanza
  comune. Mantenete in ogni caso l'archivio della posta localmente
  rispetto al server IMAP.





  9.  Punti di Montaggio

  Nel progettare la struttura del disco  importante non suddividere in
  maniera errata la struttura dell'albero delle directory, ecco il
  perch di questa sezione. Dal momento che  altamente dipendente dal
  FSSTND  stato messo da parte in una sezione separata, e probabilmente
  andr forse completamente riscritta quando FHS sar adottato in una
  distribuzione Linux. Nel frattempo lo far questa.

  Ricordate che questa  una lista di dove una separazione pu avvenire,
  non dove deve essere. Come sempre,  sempre richiesto un giudizio
  coscienzioso.

  Ancora una volta qui sar data un'indicazione rozza. I valori indicano





  0=non separare qui
  1=sconsigliato
   ...
  4=utile
  5=consigliato




  Al fine di mantenere ancora la lista, le parti non interessanti sono
  state rimosse.




       Directory   Appropriatezza
       /
       |
       +-bin       0
       +-boot      0
       +-dev       0
       +-etc       0
       +-home      5
       +-lib       0
       +-mnt       0
       +-proc      0
       +-root      0
       +-sbin      0
       +-tmp       5
       +-usr       5
       | \
       | +-X11R6     3
       | +-bin       3
       | +-lib       4
       | +-local     4
       | | \
       | | +bin        2
       | | +lib        4
       | +-src       3
       |
       +-var       5
         \
         +-adm       0
         +-lib       2
         +-lock      1
         +-log       0
         +-preserve  1
         +-run       1
         +-spool     4
         | \
         | +-mail      3
         | +-mqueue    3
         | +-news      5
         | +-smail     3
         | +-uucp      3
         +-tmp       5





  C' ovviamente una marea di aggiustamenti possibili, ad esempio ad un
  utente casalingo non importer la separazione della gerarchia
  /var/spool ma ad un ISP serio dovrebbe. La soluzione qui  l'utilizzo.


  QUIZ! Perch /etc non dovrebbe mai risiedere su una partizione
  separata?  Risposta: Le istruzioni di montaggio durante l'avvio si
  trovano nel file /etc/fstab quindi se questo  su una partizione
  separata e non montata  come se una chiave di un cassetto chiuso sia
  nel cassetto stesso (s, non faccio praticamente nulla per ravvivare
  questo HOWTO).





  10.  Considerazioni e Dimensionamento

  Il punto di inizio in questo, sar considerare dove siete e cosa
  volete fare. Un tipico sistema casalingo inizia con hardware esistente
  e l'utente Linux convertito da poco vorr ottenere il massimo
  dall'hardware esistente. Qualcuno che mette su un nuovo sistema per
  uno scopo specifico (come un ISP) dovr considerare invece quale  lo
  scopo e comprare in relazione ad esso. Essendo ambizioso, cercher di
  ricoprire l'intero ambito.

  Vari scopi avranno anche necessit differenti riguardanti il
  posizionamento del file system sui dischi, una grande macchina
  multiutente sar migliore con la directory /home su un disco separato,
  solo per dare un esempio.

  In generale, per prestazione  vantaggioso dividere la maggior parte
  delle cose su pi dischi possibili ma c' un numero limitato di
  dispositivi che possono vivere su un bus SCSI ed il costo 
  naturalmente un altro fattore. Ugualmente importante, la manutenzione
  del file system diventa pi complicata con l'aumentare del numero
  delle partizioni e dei dischi fisici.


  10.1.  Sistemi casalinghi

  Con l'hardware economico che si pu comprare oggi,  possibile avere
  un sistema grande a casa che  ancora economico, sistemi che battono i
  maggiori server del passato. Mentre molti hanno iniziato a mettere su
  un server Linux con vecchi dischi scartati (che  il motivo per il
  quale  nato questo HOWTO), molti possono permettersi oggi di comprare
  dischi da 20 GB.

  La dimensione rimane importante per alcuni, e qui ci sono un po' di
  linee guida:


     Testare
        Linux  semplice e non avete nemmeno bisogno di un disco rigido
        per provarlo, se potete fare il boot dai floppy, probabilmente
        riuscirete a farlo funzionare sul vostro hardware.  Se il kernel
        standard non vi funziona, non dimenticate che spesso ci possono
        essere versioni speciali dei dischi di boot per combinazioni
        inusuali di hardware che possono risolvere i vostri problemi
        iniziali fino a che non compilate il vostro kernel personale.


     Conoscere
        il sistema operativo  qualcosa in cui Linux eccelle, c' una
        marea di documentazione ed i sorgenti sono disponibili.  Un
        disco singolo con 50 MB  sufficiente per farvi iniziare con una
        shell e una cerchia ristretta dei comandi e delle utilit pi
        frequentemente utilizzate.



     Un utilizzo per hobby
        o per un apprendimento pi serio richiede pi comandi ed utilit
        ma un disco singolo  ancora ci che  necessario, 500 MB
        saranno spazio sufficiente, sia per i sorgenti che per la
        documentazione.


     Serio
        sviluppo software o semplicemente serio lavoro richiede anche
        molto altro spazio. A questo stadio, probabilmente avrete
        entrate di posta e news che richiedono file di coda e molto
        spazio. Dischi separati per compiti di vario genere cominceranno
        a mostrare un beneficio. A questo stadio probabilmente avrete
        anche un po' di dischi. Le necessit di dischi diventano pi
        dure da stimare ma mi aspetterei che 2-4 GB siano sufficienti,
        anche per un piccolo server.


     I server
        sono di molti tipi, variando da server di posta fino a server
        ISP di piena grandezza. Una base di 2 GB per il sistema
        principale dovrebbe essere sufficiente, poi aggiungete spazio e
        forse anche dischi per caratteristiche separate che offrirete.
        Il costo  il maggior fattore limitante qui ma siate preparati a
        spendere un po' se volete giustificare la "S" dell'ISP. In
        verit non tutti lo fanno.

        Praticamente un server  dimensionato come ogni macchina per
        utilizzo serio con spazio aggiunto per i servizi offerti, e
        tende ad essere limitato dall'IO piuttosto che dalla CPU.

        Con tecnologia economica sia per linee di terra come anche per
        reti radio,  molto probabile che molto presto, gli utenti
        casalinghi avranno i propri server pi o meno permenentemente
        agganciati alla rete.


  10.2.  Server

  Grossi compiti richiedono grossi dischi ed una sezione separata qui.
  Se possibile mantenete quanto pi possibile su dischi separati.
  Qualcuna delle appendici descrivono il setup di un piccolo server
  dipartimentale per 10-100 utenti. Qui presenter un po' di
  considerazioni per i server limite. In generale non dovreste avere
  paura di utilizzare RAID, non solo perch  veloce e sicuro ma anche
  perch rende la crescita un po' meno dolorosa. Tutte le note qui sotto
  sono aggiunte ai punti menzionati in precedenza.

  I server popolari raramente sono l per caso, piuttosto, crescono nel
  tempo e questo richiede quantitativi generosi di spazio disco come
  anche una buona connessione di rete. In molti di questi casi potrebbe
  essere una buona idea riservare ad ogni compito interi dischi SCSI, da
  soli o in fila. In questo modo potrete spostare i dati nel caso il
  computer fallisse.  Notate che trasferire i dischi attraverso i
  computer non  semplicissimo e potrebbe anche non funzionare sempre,
  specialmente nel caso di dischi IDE.  Gli insiemi di dischi,
  richiedono setup attenti al fine di ricostruire i dati correttamente,
  quindi potreste voler mantenere una copia cartacea del vostro file
  fstab come anche una nota degli ID degli SCSI.


  10.2.1.  Directory Home

  Stimate di quanti dischi avete bisogno, se sono pi di 2,
  raccomanderei RAID, fortemente. Altrimenti dovreste separare gli
  utenti attraverso i vostri dischi dedicati agli utenti basati su una
  qualche specie di semplice algoritmo di hash.  Ad esempio potreste
  utilizzare le prime due lettere del nome utente, quindi jbloggs viene
  situato in /u/j/b/jbloggs dove /u/j  un link simbolico ad un disco
  fisico quindi potete ottenere un carico bilanciato sui vostri dischi.


  10.2.2.  FTP Anonimo

  Questo  un servizio essenziale se siete seri riguardo al servizio.  I
  server buoni sono ben mantenuti, documentati, aggiornati e
  immensamente popolari, non importa dove sono localizzati nel mondo.
  Il grosso server ftp.funet.fi <ftp://ftp.funet.fi>  un eccellente
  esempio di ci.

  In generale questo non  una questione di CPU ma di ampiezza di banda
  di rete. La dimensione  difficile da calcolare, principalmente  una
  questione di ambizione e attitudini del server. Credo che il grosso
  archivo presente presso ftp.cdrom.com <ftp://ftp.cdrom.com> sia una
  macchina *BSD con un disco da 50 GB. Inoltre anche la memoria 
  importante per un server FTP dedicato, circa 256 MB di RAM sarebbero
  sufficienti per un server molto grande, anche se server pi piccoli
  possono farcela bene anche con 64 MB di RAM.  Le connessioni di rete
  sarebbero comunque sempre il fattore pi importante.



  10.2.3.  WWW

  Per molti questa  la ragione principale per andare in Internet,
  infatti ora sembra che molti li considerino la stessa cosa. Inoltre ad
  essere intensi in rete consegue il fatto di avere un bel po' di
  attivit nei dischi per questo motivo, principalmente riguardante le
  cache.  Mantenere le cache su un disco separato e veloce, porterebbe
  beneficio.  Anche meglio sarebbe installare un server proxy di cache.
  In questo modo potreste ridurre la dimensione della cache per ogni
  utente ed aumentare la velocit del servizio riducendo nello stesso
  tempo le necessit di ampiezza di banda.


  Con un server proxy di cache, avrete bisogno di un insieme di dischi
  veloci; RAID0 sarebbe l'ideale visto che l'affidabilit qui non 
  importante.  Una capacit pi alta  importante ma circa 2 GB
  sarebbero sufficienti per la maggior parte. Ricordatevi di far
  coincidere il periodo della cache con la capacit e la domanda.
  Periodi troppo lunghi sarebbero d'altro canto uno svantaggio, se
  possibile provate a regolare a seconda dell'URL.  Per maggiori
  informazioni, controllate i server pi utilizzati come Harvest, Squid
  <http://www.nlanr.net/Squid> e quello della Netscape
  <http://www.netscape.com>.


  10.2.4.  Posta

  Gestire la posta  qualcosa che molte macchine fanno fino ad un certo
  punto.  I grandi server di posta, comunque, fanno gruppo a parte.
  Questo  un compito su richiesta e un grande server pu essere lento
  anche se connesso a dischi veloci e ad una rete molto efficiente. Nel
  mondo Linux, il grande server come vger.rutgers.edu  un esempio ben
  noto. Diversamente da un servizio di news che  distribuito e che pu
  parzialmente ricostruire lo spool utilizzando altre macchine come
  meccanismo di alimentazione, i server di posta, sono centralizzati.
  Questo rende la sicurezza molto pi importante, quindi per un server
  principale, potreste considerare una soluzione RAID con enfasi
  sull'affidabilit. La dimensione  difficile da stabilire, dipende
  tutto da quante liste fate girare e da quanti iscritti avete.

  Notate che in questi giorni si sta passando dall'utilizzare POP per
  prelevare la posta sulla macchiana locale dal server di posta
  all'utilizzo di IMAP per servire la posta mantenendo gli archivi di
  posta centralizzati. Questo vuol dire che la posta non  pi accodata
  nel senso originale ma spesso cresce, richiedendo un'enormit di
  spazio disco. Inoltre sempre pi si (ab)usano i messaggi con allegati
  per spedire ogni sorta di roba, anche un piccolo documento di un
  elaboratore testi pu facilmente finire sopra il MB. Dimensionate i
  vostri dischi generosamente e controllate quanto spazio resta.



  10.2.5.  News

  Questo  sicuramente un compito di grande volume e molto dipendente
  dal gruppo a cui vi iscrivete. Sul Nyx c' un meccanismo di
  alimentazione molto completo ed i file di coda occupano circa 17 GB. I
  gruppi pi grandi sono senza dubbio nella gerarchia alt.binary.*,
  quindi se per qualche ragione decidete di non averli, potete avere un
  buon servizio forse con 12 GB. In ogni caso altri, che rimarranno
  senza nome, pensano che 2 GB siano sufficienti per conferirsi il
  titolo di ISP.  In questo caso le news scadono molto velocemente che
  penso che chiamarli IsP  abbastanza giustificato. Un completo
  meccanismo di alimentazione per le news significa un traffico di
  qualche GB ogni giorno e questo  un numero sempre crescente.



  10.2.6.  Altri

  Ci sono molti servizi disponibili sulla rete e nonostante ci molti
  sono stati messi nell'ombra dalla rete. Nonostante ci servizi quali
  archie, gopher e wais esistono ancora e rimangono strumenti di valore
  sulla rete. Se state pensando in maniera coscienziosa di iniziare a
  creare un server principale, dovreste anche considerare questo
  servizio. Determinare lo spazio necessario  difficile, dipende tutto
  dalla popolarit e dalla domanda. Fornire un buon servizio ha
  inevitabilmente i suoi costi, lo spazio disco  solamente uno di essi.



  10.2.7.  Raccomandazioni sul Server

  I server oggi richiedono molti dischi per funzionare in maniera
  soddisfacente per le impostazioni commerciali.  Visto che il tempo
  medio tra i fallimenti (MTBF) diminuisce rapidamente con l'aumentare
  dei componenti,  consigliabile utilizzare RAID per protezione ed
  utilizzare un numero di dischi di media grandezza piuttosto che uno
  singolo ed enorme. Inoltre guardate anche nell progetto High
  Availability (HA) per maggiori informazioni.




  10.3.  Trappole

  I pericoli di dividere ogni cosa su partizioni separate sono
  brevemente menzionati nella sezione riguardante la gestione del
  volume. Comunque, molte persone mi hanno chiesto di enfatizzare questo
  punto pi fermamente: quando una partizione si riempie, non pu
  crescere di pi, non importa se c' un mare di spazio su altre
  partizioni.

  In particolare tenete d'occhio la crescita esplosiva nella coda delle
  news (/var/spool/news). Per macchine multi utente con le quote tenete
  sotto controllo /tmp e /var/tmp visto che c' qualcuno che cerca di
  nascondere i propri file l, basta cercare i file che finiscono per
  gif o jpeg...

  Praticamente, per singoli dischi fisici questo schema offre guadagni
  molto piccoli, piuttosto che rendere pi facile il controllo della
  crescita dei file (utilizzando 'df') e del posizionamento fisico delle
  tracce.  Pi importante, non c' possibilit per accesso di disco
  parallelo.  La disponibilit di avere un sistema per la gestione di un
  volume potrebbe risolvere ci, ma ci accadr in futuro. Comunque,
  quando file system pi specializzati saranno disponibili, anche un
  disco singolo potr beneficiare dall'essere diviso in diverse
  partizioni.




  11.  Struttura del Disco

  Con tutto questo in testa siamo pronti per iniziare la struttura.  Ho
  basato ci sul mio metodo sviluppato quando ho preso 3 vecchi dischi
  SCSI e ho provato tutte le possibilit.

  Le tavole nelle appendici sono disegnate per semplificare il processo
  di mappatura. Sono state progettate per aiutarvi attraverso il
  processo di ottimizzazione come anche per fare un log utile nel caso
  di riparazione del sistema. Sono dati anche alcuni esempi.



  11.1.  Selezione per il Partizionamento

  Determinate le vostre necessit ed organizzate una lista di tutte le
  parti del file system che volete posizionare su partizioni separate ed
  ordinatele in ordine decrescente di richiesta di velocit e quanto
  spazio volete dare ad ogni partizione.

  La tabella presente nella sezione ``Appendice A''  uno strumento
  utile per selezionare quali directory dovreste mettere su partizioni
  differenti.  ordinata in ordine logico con lo spazio per le vostre
  aggiunte e annotazioni riguardo i punti di montaggio e sistemi
  addizionali. Inoltre esso non  ordinato per velocit, invece le
  necessit di velocit sono indicate da pallini (').

  Se avete intenzione di impostare il RAID annotatevi i dischi che
  volete utilizzare e quali partizione volete usare con RAID.
  Ricordatevi che le varie soluzioni RAID offrono differenti velocit e
  gradi di affidabilit.

  (Solo per farla pi facile assumer che abbiamo un insieme identico di
  dischi SCSI e nessun tipo di RAID).



  11.2.  Organizzare le Partizioni sui Dischi

  Quindi ora vogliamo mettere le partizioni sui dischi fisici. Lo scopo
  del seguente algoritmo  di aumentare il parallelismo e la capacit
  del bus. In questo esempio i dischi sono A, B e C e le partizioni sono
  987654321 dove 9  la partizione con la pi alta necessit di
  velocit.  Partendo da un drive noi 'avremo' la linea della partizione
  attraverso i dischi in questo modo:





          A : 9 4 3
          B : 8 5 2
          C : 7 6 1




  Questo fa s che la 'somma delle necessit di velocit' sia il pi
  possibile omogenea per tutti i dischi.

  Utilizzate la tabella nella sezione ``Appendice B'' per selezionare
  quale disco utilizzare per ogni partizione al fine di ottimizzare il
  parallelismo.

  Annotate le caratteristiche di velocit dei vostri dischi e annotate
  ogni directory nell'apposita colonna. Siate preparati a mischiare
  directory, partizioni e dischi prima di essere soddisfatti.


  11.3.  Ordinare le Partizioni sui Dischi

  Dopo di ci  consigliato selezionare la numerazione delle partizioni
  per ciascun disco.

  Utilizzate la tabella nella sezione ``Appendice C'' per selezionare i
  numeri di partizione al fine di ottimizzare in base alle
  caratteristiche di traccia. Alla fine dovreste avere una tabella
  ordinata in ordine crescente per numero di partizione.  Riempite poi
  questi numeri nelle tabelle presenti nell'appendice A e B.

  Troverete utili queste tabelle quando eseguirete il programma di
  partizionamento (fdisk or cfdisk) e al momento di fare
  l'installazione.



  11.4.  Ottimizzazione


  Dopo di ci, ci sono generalmente poche partizioni che devono essere
  'mischiate' nei dischi sia per farcele entrare sia se ci fossero
  considerazioni speciali riguardanti la velocit, l'affidabilit, file
  system speciali ecc. In ogni caso, questo fornisce quello che questo
  autore crede sia un buon punto di inizio per un setup completo dei
  dischi e delle partizioni. Alla fine  l'utilizzo del momento che
  determiner le necessit reali dopo aver fatto cos tante premesse.
  Dopo le operazioni preliminari si dovrebbe assumere che arriva il
  momento in cui ripartizionare porterebbe benefici.

  Ad esempio se uno dei 3 dischi nell'esempio menzionato sopra  molto
  lento in confronto agli altri due, un miglior progetto potrebbe essere
  il seguente:



               A : 9 6 5
               B : 8 7 4
               C : 3 2 1








  11.4.1.  Ottimizzare per Caratteristica

  Spesso i dischi possono essere simili nell'apparente velocit globale
  ma qualche vantaggio pu essere ottenuto accoppiando i dischi alla
  dimensione, alla distribuzione ed alla frequenza di accesso.  Quindi i
  file binari sono fatti per dischi con accesso rapido che offre
  possibilit di accodamento dei comandi, e le librerie sono fatte per
  dischi con velocit di trasferimento pi ampie dove IDE offre una
  buona prestazione rispetto al prezzo.



  11.4.2.  Ottimizzare mediante Parallelizzazione del Disco

  Evitate la contenzione del disco guardando ai task: ad esempio se
  state accedendo a /usr/local/bin ci sono possibilit anche che avrete
  molto presto bisogno di file da /usr/local/lib quindi posizionarli in
  dischi separati permette meno ricerca e possibili azioni in parallelo
  e caching del drive.  abbastanza probabile che scegliendo ci che pu
  apparire inferiore alle caratteristiche del disco, sar sicuramente
  vantaggioso se potete ottenere operazioni in parallelo. Identificate
  compiti comuni, che partizioni utilizzano e cercate di mantenerle su
  dischi separati.

  Giusto per illustrare il mio punto di vista, fornir un po' di esempi
  dell'analisi dei task.



     Software da Ufficio
        come l'editing, l'elaborazione testi ed i fogli elettronici,
        sono tipici esempi di software di bassa intensit sia per quanto
        riguarda la CPU che l'intensit di disco. In ogni caso, se
        doveste avere un singolo server per un grande numero di
        utilizzatori non dovreste dimenticare che molto di questo
        software ha opportunit di auto salvataggi il che causa traffico
        extra, generalmente nelle directory home. Dividere gli utenti su
        pi dischi potrebbe ridurre la contenzione.


     I news reader
        fanno anche loro auto salvataggi nella directory home quindi gli
        ISP dovrebbero considerare di separare le directory home.

        Le code delle News sono note per avere directory profondamente
        ramificate e gran numero di file molto piccoli. La perdita di
        una partizione con le code delle News non  per molti un grande
        problema, quindi sono buone candidate per organizzare un RAID 0
        con molti dischi piccoli per distribuire i vari accessi
        attraverso alberini multipli. Si raccomanda nei manuali e nelle
        FAQ del server delle news INN di mettere le cose delle news e i
        file .overview su dischi separati per installazioni pi grandi.

        C' anche una pagina web dedicata all'ottimizzazione di INN
        <http://www.spinne.com/usenet/inn-perf.html> che sarebbe bene
        leggere.



     Le applicazioni database
        possono essere pretenziose sia in termini di utilizzo del disco
        che in termini di richiesta di velocit.  I dettagli sono
        naturalmente specifici alle applicazioni, leggete la
        documentazione attentamente tenendo ben presente la richiesta di
        spazio su disco. Inoltre considerate il RAID sia per le
        prestazioni che per l'affidabilit.
     Leggere ed inviare e-mail
        coinvolge directory home come anche i file delle code in entrata
        ed in uscita. Se possibile mantenete le directory home e i file
        delle code su dischi separati. Se siete un server di posta o un
        hub di posta considerate di mettere le directory home e i file
        delle code su dischi separati.

        Perdere la posta  una cosa molto brutta, se state gestendo un
        ISP o un hub principale. Riflettete sul fatto di fare RAID della
        vostra posta e considerate backup frequenti.


     Lo sviluppo di software
        pu richiedere un gran numero di directory per file binari,
        librerie, file include, nonch sorgenti e file di progetto. Se
        possibile dividete il pi possibile su dischi separati. Su
        piccoli sistemi potete posizionare /usr/src e i file di progetto
        sullo stesso disco delle directory home.


     Navigare il Web
        sta diventando sempre pi popolare. Molti browser hanno una
        cache locale che pu espandersi in volumi abbastanza grandi. Dal
        momento che questa  utilizzata per richiamare le pagine e nel
        ritornare alle pagine precedenti, la velocit  abbastanza
        importante in questi casi. Se invece siete connessi attraverso
        un proxy server ben configurato, non avete bisogno di pi di
        pochi megabyte per utente per sessione.  Controllate anche le
        sezioni sulle ``Directory Home'' e ``WWW''.





  11.5.  Compromessi

  Un modo per evitare le trappole menzionate  semplicemente di dedicare
  le partizioni fisse a directory di dimensione ben nota come swap, /tmp
  e /var/tmp e raggruppare insieme i richiami nelle partizioni rimanenti
  utilizzando link simbolici.

  Esempio: un disco lento (discolento), un disco veloce (discoveloce) ed
  un assortimento di file.  Avendo organizzato swap e tmp sul
  discoveloce; e /home e root sul discolento abbiamo le rimanenti
  directory fittizie /a/lento, /a/veloce, /b/lento e /b/veloce da
  allocare sulle partizioni /mnt.discolento e /mnt.discoveloce che
  rappresentano le rimanenti partizioni dei due dischi.

  Mettere /a o /b direttamente su entrambe i dischi, conferisce le
  stesse propriet alle sottodirectory. Potevamo fare tutte e 4 le
  directory come partizioni separate ma perderebbe un po' di
  flessibilit nella gestione della dimensione di ciascuna directory.
  Una soluzione migliore  quella di fare link simbolici delle 4
  directory a directory appropriate sui rispettivi dischi.

  Quindi facciamo



       /a/veloce punta a /mnt.discoveloce/a/veloce o   /mnt.discoveloce/a.veloce
       /a/lento  punta a /mnt.discolento/a/lento   o   /mnt.discolento/a.lento
       /b/veloce punta a /mnt.discoveloce/b/veloce o   /mnt.discoveloce/b.veloce
       /b/lento  punta a /mnt.discolento/b/lento   o   /mnt.discolento/b.lento



  e abbiamo tutte le directory veloci sul disco veloce senza dovere
  organizzare una partizione per le 4 directory.  La seconda alternativa
  ci da un file system pi piatto che in questo caso rende pi semplice
  tenere sotto controllo la struttura.

  Lo svantaggio  che all'inizio  uno schema complicato da mettere su e
  da pianificare e che tutti i punti di montaggio e le partizioni devono
  essere definiti prima dell'installazione del file system.




  12.  Implementazione

  Avendo fatto la struttura, dovreste avere una descrizione dettagliata
  di cosa va dove. Probabilmente questo sar su carta ma si spera che
  qualcuno far un sistema pi automatizzato che possa gestire qualsiasi
  cosa, a partire dal progetto, attraverso il partizionamento e la
  formattazione, fino all'installazione. Questa  la strada che uno
  dovr seguire per realizzare il progetto.

  Le distribuzioni moderne hanno mezzi di installazione che vi
  guideranno attraverso il partizionamento e la formattazione e anche ad
  organizzare per voi il file /etc/fstab automaticamente. Per modifiche
  posteriori, dovrete capire il meccanismo che sta dietro.



  12.1.  Dischi e Partizioni

  Quando fate partire il DOS o qualcosa del genere troverete che tutte
  le partizioni sono nominate da C: in avanti, con nessuna differenza
  tra IDE, SCSI, rete o qualsiasi tipo di supporto che avete. Nel mondo
  di Linux, questo  abbastanza differente. Durante l'avvio, vedrete le
  partizioni descritte in questo modo:


  ______________________________________________________________________
  Dec  6 23:45:18 demos kernel: Partition check:
  Dec  6 23:45:18 demos kernel:  sda: sda1
  Dec  6 23:45:18 demos kernel:  hda: hda1 hda2
  ______________________________________________________________________



  I dischi SCSI sono etichettati sda, sdb, sdc ecc., e i dischi (E)IDE
  sono etichettati hda, hdb, hdc ecc.  Ci sono inoltre nomi standard per
  tutti i dispositivi, tutte le informazioni possono essere trovate in
  /dev/MAKEDEV e in /usr/src/linux/Documentation/devices.txt.

  Le partizioni sono etichettate numericamente per ciascun disco hda1,
  hda2 e cos via. Sui dischi SCSI ci possono essere 15 partizioni per
  disco, sui dischi EIDE ce ne possono essere 63. Tutti e due questi
  limiti eccedono ci che  attualmente utile per molti dischi.

  Questi sono poi montati attenendosi al file /etc/fstab prima di
  entrare a far parte del sistema.



  12.2.  Partizionamento

  Prima di tutto, voi dovete partizionare ogni disco in un bel numero di
  partizioni separate. Sotto Linux ci sono due metodi principali, fdisk
  e quello pi grafico cfdisk. Questi sono programmi complessi,
  leggetene il manuale molto attentamente.
  Le partizioni sono di 3 tipi, primarie, estese e logiche.  Dovete
  utilizzare le partizioni primarie per avviare il sistema, ma c' un
  massimo di 4 partizioni primarie. Se volete di pi, dovete definire
  una partizione estesa nell'ambito della quale voi definite le vostre
  partizioni logiche.

  Ogni partizione ha un numero identificativo che dice al sistema
  operativo che cosa , riguardo Linux i tipi che dovete conoscere sono
  swap(82) e ext2fs(83).

  C' un file readme che accompagna fdisk che fornisce maggiori
  informazioni sul partizionamento.

  Qualcuno ha appena fatto un Partitioning HOWTO che contiene
  informazioni eccellenti ed approfondite sui grattacapi del
  partizionamento.  Piuttosto che ripeterlo qui e occupare oltre questo
  documento, far invece riferimento ad esso per voi.

  La Redhat ha scritto un'utility visuale chiamata Disk Druid che si
  suppone sia un'alternativa di facile utilizzo di fdisk e cfdisk ed
  inoltre automatizza un po' di altre cose. Sfortunatamente questo
  prodotto non  ancora sufficientemente maturo, quindi se lo utilizzate
  e non riuscite a farlo funzionare, siete ben avvisati di provare fdisk
  o cfdisk.

  Il Ranish Partition Manager
  <http://www.users.intercom.com/~ranish/part/>  un'altra alternativa
  libera, mentre Partition Magic <http://www.powerquest.com> 
  un'alternativa commerciale che inoltre offre qualche supporto per
  ridimensionare le partizioni ext2fs.

  Notate che Windows si lamenter se trova pi di una partizione
  primaria su un disco.  Inoltre sembra assegnare le lettere del disco
  alle partizioni primarie mentre trova i dischi, prima di reiniziare
  dal primo per assegnare nomi di dischi consecutivi alle partizioni
  logiche.

  Se volete DOS/Windows sul vostro sistema, prima di tutto dovreste fare
  quella partizione, una primaria su cui avviare il boot, fatta con
  l'fdisk del DOS.  Poi, se volete NT, mettete quello. Alla fine, per
  Linux, create quelle partizioni con l'fdisk di Linux o con programmi
  equivalenti.  Linux  sufficientemente flessibile da avviarsi sia
  dalle partizioni primarie che da quelle logiche.



  12.3.  Ripartizionamento

  Alcune volte  necessario cambiare le dimensioni delle partizioni
  esistenti mantenendone intatto il contenuto. Un modo  ovviamente
  quello di fare il backup di tutto, ricreare le nuove partizioni e poi
  ripristinare i vecchi contenuti, e sebbene questo vi fornisca un
  ottimo modo di testare il vostro sistema di back up, vi porta via un
  bel po' di tempo.

  Ridimensionare le partizioni  una semplice alternativa in cui un file
  system  dapprima contratto nel volume desiderato e poi la tavola di
  partizione  aggiornata per riflettere la nuova fine della posizione
  della partizione. Questo processo  comunque molto sensibile al file
  system.

  Ripartizionare necessita che ci sia spazio libero alla fine dello
  spazio file, quindi per assicurarvi di essere in grado di contrarre la
  dimensione, dovreste innanzitutto deframmentare il vostro disco e
  svuotare qualsiasi cestino.

  Utilizzando fips <http://www.igd.fgh.de/~aschaefe/fips/> potete
  ridimensionare una partizione fat, e l'ultima versione 1.6 di fips o
  di fips 2.0 sono in grado anche di ridimensionare le partizioni fat32.
  Notate che questi programmi attualmente girano sotto DOS.

  Ridimensionare altri file system  molto pi complesso ma un sistema
  commerciale abbastanza popolare  Partition Magic
  <http://www.powerquest.com> che  in grado di ridimensionare pi tipi
  di file system, inclusi ext2fs mediante il programma resize2fs.


  Al fine di ottenere il massimo da fips dovreste innanzitutto
  cancellare i file non necessari, svuotare i cestini ecc., prima di
  deframmentare il vostro disco.  In questo modo potete allocare pi
  spazio per altre partizioni. Se il programma si lamenta che ci sono
  ancora file alla fine del disco, ci forse  dovuto a file nascosti
  generati da Microsoft Mirror o da Norton Image.  Questi sono
  probabilmente chiamati image.idx e image.dat e contengono backup di
  qualche file di sistema.

  Ci sono prove che in alcuni programmi di deframmentazione di Windows 
  necessario che la casella "permetti a Windows di spostare i file" non
  sia contrassegnata, altrimenti finirete con l'avere qualche file
  nell'ultimo cilindro della partizione il che eviter a FIPS di
  richiedere spazio.

  Se avete ancora file non spostabili alla fine della vostra partizione
  DOS, dovreste ottenere il programma DOS "showfat" versione 3.0 o
  superiore. Questo vi mostra quali file sono dove cos potete avere a
  che fare con loro direttamente.

  Ripartizionare  un processo pericoloso come qualsiasi altro
  partizionamento quindi siete avvisati di avere a portata di mano un
  backup fresco.



  12.4.  Il Bug della Partizione Microsoft

  Nei prodotti Microsoft fino a Win 98 c' un bug che vi pu causare un
  po' di problemi: se avete diverse partizioni fat primarie e l'ultima
  partizione estesa non  una partizione fat, il system Microsoft
  cercher di montare l'ultima partizione al posto dell'ultima
  partizione FAT primaria.

  Maggiori informazioni <http://www.v-com.com/95Notes.html> su questo
  sono disponibili sulla rete.

  Per evitare ci, potete sistemare una piccola parizione logica fat
  proprio alla fine del disco.

  Visto che qualche componente hardware  accompagnato da setup software
  che  disponibile sotto DOS, questo potrebbe essere a portata di mano
  in ogni caso. Esempi degni di nota sono i controller RAID da DPT ed un
  bel numero di schede di rete.


  12.5.  Dispositivi multipli ( md )

  Essendo in uno stato di sviluppo dovreste assicurarvi di leggere la
  documentazione pi recente su questa caratteristica del kernel.

  Spiegata brevemente, funziona aggiungendo partizioni insieme in nuovi
  dispositivi md0, md1 ecc. utilizzando mdadd prima che voi li attiviate
  mediante mdrun. Questo processo pu essere automatizzato mediante il
  file /etc/mdtab.
  Il sistema md pi recente utilizza /etc/raidtab ed una sintassi
  differente. Assicuratevi che il pacchetto di strumenti RAID combaci
  con la versione md dal momento che il protocollo interno  cambiato.

  Dopo di che li trattate come qualsiasi altra partizione su disco.
  Procedete con la formattazione ecc. come descritto qui sotto
  utilizzando questi nuovi dispositivi.

  C' ora anche un HOWTO in sviluppo per RAID che utilizza md che
  dovreste leggere.


  12.6.  Formattazione

  Dopo viene la formattazione della partizione, in cui viene predisposta
  la struttura dei dati che descriver i file e dove saranno posti.  Se
  questa  la prima volta si raccomanda la formattazione con verifica.
  Parlando stringatamente, non dovrebbe essere necessario ma questo
  stimola l'I/O cos tanto da scoprire problemi potenziali come
  incorretta terminazione, prima che voi archiviate i vostri preziosi
  dati.  Guardate il comando mkfs per maggiori dettagli.

  Linux  in grado di gestire un gran numero di file system, piuttosto
  che ripetere i dettagli, potete leggere le pagine di manuale di fs che
  li descrive in maggior dettaglio. Notate che il kernel, per poter
  utilizzare queste funzioni, deve avere i driver compilati internamente
  o come moduli.  Quando  ora di compilare il kernel, dovreste leggere
  attentamente la lista delle caratteristiche del file system. Se
  utilizzate make menuconfig potete avere un aiuto in linea per ogni
  tipo di file system.

  Notate che qualche sistema di disco di recupero ha bisogno che minix,
  msdos e ext2fs vengano compilati nel kernel.

  Anche le partizioni di swap devono essere preparate e per far questo
  utilizzate mkswap.



  12.7.  Montaggio

  I dati presenti su una partizione non sono disponibili in un file
  system fino a che essa non  montata in un punto di montaggio. Questo
  pu essere fatto manualmente utilizzando mount o automaticamente
  durante l'avvio, aggiungendo linee appropriate all'/etc/fstab. Leggete
  il manuale di mount e prestate molta attenzione alle tabulazioni.



  12.8.  fstab

  Durante il processo di boot il sistema monta tutte le partizioni come
  elencate nel file fstab che pu apparire cos:




       # <file system>   <punto mont.>   <tipo>  <opzioni>   <dump>  <pass>
       /dev/hda2          /               ext2    defaults    0       1
       None               none            swap    sw          0       0
       proc               /proc           proc    defaults    0       0
       /dev/hda1          /dosc           vfat    defaults    0       1




  Questo file  in qualche modo sensibile alla formattazione utilizzata
  quindi  meglio e pi conveniente modificarlo utilizzando uno degli
  strumenti di modifica creati per questo scopo.

  Brevemente, i campi sono: nome della partizione, dove montare la
  partizione, tipo di file system, quando montarla, quando effettuare il
  dump per il backup e quando fare fsck.

  Linux offre la possibilit di fare un controllo di file parallelo
  (fsck) ma per essere efficiente  importante non fare fsck su pi di
  una partizione di un disco alla volta.

  Per maggiori informazioni fate riferimento alle pagine di manuale di
  mount e fstab.



  12.9.  Raccomandazioni

  Avendo costruito ed implementato il vostro intelligente schema, siete
  ben avvisati di annotarvelo tutto, su carta.  inutile avere le
  informazioni necessarie su disco, se la macchina  andata.

  Le tabelle di partizione possono essere danneggiate o perse, nel qual
  caso  estremamente importante che voi mettiate gli stessi, esatti,
  numeri in fdisk, cos da recuperare il vostro sistema.  Potete
  utilizzare il programma printpar per fare una chiara annotazione delle
  tabelle. Scrivetevi anche i numeri SCSI o i nomi IDE per ogni disco,
  cos potete rimettere insieme il sistema nell'ordine giusto.




  13.  Manutenzione

   dovere dell'amministratore di sistema tenere d'occhio i dischi e le
  partizioni. Se dovesse riempirsi una delle partizioni,  probabile che
  il sistema possa smettere di funzionare correttamente, non importa
  quanto spazio sia disponibile su altre partizioni, fino a che lo
  spazio  richiesto.

  Le partizioni e i dischi possono essere facilmente monitorate
  utilizzando df e dovrebbe essere fatto frequentemente, forse mediante
  l'utilizzo di un job di cron o con altri strumenti di gestione del
  sistema.

  Non dimenticate le partizioni di swap, queste sono monitorate meglio
  utilizzando uno dei programmi di statistica della memoria come free,
  procinfo o top.

  Monitorare l'utilizzo dei dischi  pi difficile ma  importante
  nell'interesse delle prestazioni per evitare la disputa - ponendo
  troppa domanda su un singolo disco se altri sono disponibili e
  inattivi.


   importante, quando si installano i pacchetti software, avere una
  chiara idea di dove i vari file devono andare. Come menzionato
  precedentemente GCC mantiene i file binari in una directory di
  libreria e ci sono anche altri programmi che per ragioni storiche sono
  difficili da tenere presente, X11 per esempio ha una struttura
  inusualmente complessa.

  Quando il vostro sistema  quasi pieno,  ora di controllare e
  sfoltire i vecchi messaggi di log ed anche eliminare i file core.
  L'uso corretto di ulimit, nelle impostazioni globali della shell, pu
  essere utile a salvarvi dall'avere i file core sparsi per tutto il
  sistema.



  13.1.  Backup

  Il lettore attento avr notato un po' di consigli sulla utilit di
  fare backup. Ci sono storie horror riguardo incidenti e cosa 
  accaduto al responsabile quando il backup si  rivelato non essere
  funzionante o anche non esistente. Potreste pensare che sia pi
  semplice investire in backup corretti che in una seconda identit
  segreta.

  Ci sono molte opzioni ed anche un mini-HOWTO ( Backup-With-MSDOS ) che
  spiega in dettaglio cosa dovete sapere. In aggiunta alle specifiche
  DOS, esso contiene inoltre informazioni generali e gli orientamenti
  futuri.


  Oltre a fare questi backup, dovreste assicurarvi che siate in grado di
  ripristinare i dati. Non tutti i sistemi verificano che i dati scritti
  siano corretti e molti amministratori hanno iniziato felici a
  ripristinare i dati dopo un incidente, nella speranza che tutto fosse
  funzionante, solo per scoprire con orrore che i backup erano inutili.
  Fate attenzione.



  13.2.  Deframmentazione

  Questa dipende molto dalla struttura del file system, alcuni soffrono
  di una frammentazione veloce e abbastanza debilitante. Fortunatamente
  per noi, ext2fs non appartiene a questo gruppo e inoltre c' stato
  molto poco da dire riguardo gli strumenti di deframmentazione. Infatti
  esistono, ma difficilmente se ne ha bisogno.

  Se per qualche ragione ritenete che ci sia necessario, la soluzione
  veloce e facile  di fare un backup e ripristinare. Se solo una
  piccola area ne  affetta, ad esempio le directory home, potreste fare
  un tar di essa su una area temporanea di un'altra partizione,
  verificare l'archivio, cancellare l'originale e poi rifarne
  l'estrazione di nuovo con tar.



  13.3.  Cancellazioni

  Abbastanza spesso le carenze di disco possono essere rimediate
  semplicemente cancellando i file non necessari accumulati nel sistema.
  Molto spesso i programmi che terminano di funzionare in maniera
  anormale, causano confusioni di tutti i tipi nei posti peggiori.
  Normalmente un core dump si ha dopo una situazione del genere e se non
  avete intenzione di fare il debug, potete cancellarlo. Questi li
  possiamo trovare dappertutto quindi siete avvisati di farne una
  ricerca completa ora e sempre.

  L'interruzione improvvisa di un programma pu inoltre causare tutta
  una serie di file temporanei che rimangono in posti quali /tmp o
  /var/tmp, file che sono automaticamente rimossi quando il programma
  finisce normalmente.  Il riavvio pulisce qualcuna di queste aree ma
  non necessariamente tutte e se passa molto tempo potreste finire con
  avere un sacco di roba.  Se lo spazio  poco, dovete cancellare con
  attenzione, assicurandovi che il file non sia in uso in quel momento.
  Utilit quali file possono spesso dirvi che tipo di file state
  guardando.
  Molte cose vengono messe nei log quando il sistema gira, per lo pi
  nell'area /var/log. In particolare il file /var/log/messages tende a
  crescere fino a che viene cancellato.  una buona idea mantenere un
  piccolo archivio di file log per paragonarli se il sistema dovesse
  cominciare a comportarsi in modo non corretto.

  Se il sistema di posta o delle news non funziona correttamente,
  potreste avere crescita eccessiva nelle aree di coda, /var/spool/mail
  e /var/spool/news rispettivamente. Fate attenzione ai file di overview
  visto che hanno un punto che li rende invisibili all'ls -l,
  generalmente  meglio utilizzare ls -Al che ve li sveler.

  La saturazione dello spazio dell'utente  un argomento particolarmente
  complesso. Guerre sono state fatte tra amministratori di sistemi e
  utenti.  Tatto, diplomazia e un budget generoso per i nuovi dischi 
  ci di cui si ha bisogno. Utilizzate la caratteristica message-of-the-
  day, visualizzato durante il login dal file /etc/motd per dire agli
  utenti quando lo spazio  poco. Predisporre la configurazione standard
  della shell per prevenire la formazione di file core pu far
  risparmiare molto spazio.

  Alcuni tipi di persone cercano di mascherare i file nel sistema,
  generalmente cercando di trarre vantaggio dal fatto che i file con un
  punto davanti al nome sono invisibili al comando ls.  Un esempio
  comune sono i file che appaiono come ...  che anche normalmente non
  sono visibili, o quando si usa ls -al scompaiono nel rumore di tutti i
  file come . o .. che sono presenti in ogni directory.  C' comunque
  una contromisura a ci, utilizzate ls -Al che sopprime . o .. ma
  mostra tutti gli altri file con il punto.



  13.4.  Aggiornamenti.

  Non importa quanto grandi siano i vostri dischi, verr il tempo in cui
  scoprirete che ne avete bisogno di altri. Con l'avanzare della
  tecnologia potete ottenere sempre di pi col vostro denaro. Al momento
  di scrivere ci, sembra che i dischi da 6.4 GB siano quanto di meglio
  si possa avere coi vostri soldi.

  Notate che con i dischi IDE potreste dover rimuovere un vecchio disco,
  visto che il massimo numero gestito dalla vostra scheda madre 
  generalmente di 2 o qualche volta di 4. Con lo SCSI, ne potete avere
  fino a 7 per canale per lo SCSI stretto (8-bit) e fino a 15 per il
  wide SCSI (15-bit). Qualche adattatore pu gestire pi di un singolo
  canale e in ogni caso potete avere pi di un adattatore per sistema.
  La mia raccomandazione personale  che a lungo andare vi troverete
  meglio con lo SCSI.

  La domanda che viene , dove dovrei mettere questo nuovo disco? In
  molti casi, la ragione per l'espansione  che volete un'area per le
  code pi ampia e in quel caso la soluzione pi semplice e veloce  di
  montare il disco da qualche parte sotto /var/spool. D'altra parte, i
  dischi pi nuovi sono generalmente pi veloci dei vecchi quindi a
  lungo andare vi potrebbe sembrare opportuno di fare una
  riorganizzazione generale, possibilmente utilizzando i vostri vecchi
  schemi di pianificazione.

  Se l'aggiornamento  forzato dal fatto che non c' pi spazio in
  partizioni utilizzate per cose come /usr o /var, l'aggiornamento  un
  po' pi complesso. Dovreste considerare la possibilit di una
  riorganizzazione completa dalla vostra distribuzione preferita (e si
  spera pi aggiornata). In questi casi dovreste stare attenti a non
  sovrascrivere le vostre configurazioni essenziali. Generalmente queste
  cose sono nella directory /etc. Procedete con cura, backup recenti e
  dischi di recupero che funzionano. L'altra possibilit  di copiare
  semplicemente la vecchia directory sopra quella nuova che  montata su
  un punto di montaggio temporaneo, editate il file /etc/fstab, fate
  ripartire il sistema con la nuova partizione al suo posto e
  controllate che funzioni.  Qualora dovesse fallire, potete riavviare
  con il disco di recupero, rieditare il file /etc/fstab e provare di
  nuovo.

  Fino a che la gestione dei volumi non diventer disponibile per Linux,
  questo  sia complicato che pericoloso. Non vi meravigliate pi di
  tanto se scoprite che avete bisogno di ripristinare il sistema da un
  backup.

  Il Tips-HOWTO fornisce l'esempio seguente su come spostare un'intera
  struttura della directory.

  ______________________________________________________________________
  (cd /directory/di/origine; tar cf - . ) | (cd /directory/di/destinazione; tar xvfp -)
  ______________________________________________________________________



  Sebbene questo approccio per muovere alberi di directory  portabile
  per molti sistemi Unix,  difficile da ricordare. Inoltre esso
  fallisce con directory troppo annidate quando i nomi dei percorsi
  diventano troppo lunghi per essere maneggiati da tar (il tar GNU ha
  caratteristiche speciali per gestire nomi di file lunghi).

  Se potete utilizzare il cp di GNU (il che accade sempre nel caso di
  sistemi linux), potete anche utilizzare


  ______________________________________________________________________
  cp -av /directory/di/origine /directory/di/destinazione
  ______________________________________________________________________



  Il cp di GNU ha una conoscenza specifica di link simbolici, FIFO e
  file di dispositivo e li copier correttamente.

  Ricordatevi che non  una buona idea provare a trasferire /dev o
  /proc.




  13.5.  Recupero

  I crash di sistema avvengono in molti e divertenti modi e la
  corruzione della tabella di partizione garantisce sempre il massimo
  dell'eccitazione. Uno strumento recente e senza dubbio utile per
  quelli di noi che sono contenti con il normale livello di eccitazione
   gpart <http://www.stud.uni-hannover.de/user/76201/gpart> che
  significa "Guess PC-Type hard disk partitions" (indovina il tipo delle
  partizioni dell'hard disk. ndt). Utile.




  14.  Questioni Avanzate

  Linux ed i sistemi correlati, offrono una marea di possibilit per una
  distruzione veloce, efficiente e devastante. Questo documento non fa
  eccezione. Con la potenza c' il pericolo e le sezioni seguenti
  descrivono poche altre imprese esoteriche che non dovrebbero essere
  tentate prima di aver letto e capito la documentazione, le questioni
  ed i pericoli. Dovreste anche fare backup. Ricordatevi inoltre di
  provare a ripristinare il sistema da zero dal vostro backup almeno una
  volta.  Altrimenti potreste scoprire di non essere il primo ad avere
  un backup perfetto e nessuno strumento disponibile per reinstallarlo
  (o, ancora pi imbarazzante, qualche file critico mancante su nastro).

  Le tecniche qui descritte sono raramente necessarie, ma possonoe
  essere utilizzate per setup molto specifici. Pensate bene cosa volete
  ottenere prima di averci a che fare.


  14.1.  Regolazione del Disco Rigido

  I paramentri del disco rigido possono essere regolati utilizzando
  l'utilit hdparm. Qui, il parametro pi interessante  probabilmente
  il parametro di lettura che determina quanto prefetch debba essere
  fatto nella lettura sequenziale.  Se volete provarlo, ha pi senso
  regolare per la dimensione di file caratteristica sul vostro disco ma
  ricordate che questa regolazione  per il disco intero il che lo rende
  pi difficile.  Probabilmente questo  usato solamente sui grandi
  server, utilizzando dischi dedicati alle news ecc.

  Per motivi di sicurezza, i settaggi convenzionali di hdparm sono
  abbastanza conservativi. Lo svantaggio  che ci significa che potete
  ottenere interrupt persi se avete alta frequenza di IRQ, come avreste
  utilizzando la porta seriale e un disco IDE, visto che gli IRQ degli
  ultimi maschererebbero altri IRQ. Questo si potrebbe notare da una
  prestazione inferiore all'ideale nello scaricare i dati dalla rete al
  disco.  Fare hdparm -u1 dispositivo dovrebbe prevenire il
  mascheramento e aumentare anche le prestazioni, o a seconda
  dell'hardware, corrompere i dati dell'hard disk. Sperimentazioni con
  cautela e backup recenti.


  14.2.  Regolazione del File System

  Molti file system sono disponibili con un'utilit di regolazione e per
  ext2fs c' l'utilit tune2fs. Diversi parametri possono essere
  modificati ma forse il parametro pi importante  che dimensione
  dovrebbe essere preservata e chi dovrebbe trarre vantaggio da ci, il
  che vi potr aiutare ad ottenere pi spazio utile dai vostri dischi
  possibilmente al costo di un minor spazio per riparare un sistema
  qualora dovesse piantarsi.


  14.3.  Sincronizzazione dell'Alberino

  Questo non dovrebbe essere pericoloso, se non per il fatto che i
  dettagli esatti delle connessioni rimangono poco chiare per molti
  dischi. La teoria  semplice: mantenere una prefissata differenza di
  fase tra i dischi diversi in un setup RAID fa s che si debba
  aspettare di meno che la traccia giusta arrivi in posizione per la
  testina di lettura/scrittura. In pratica sembra ora che con grandi
  buffer di lettura nei dischi, l'effetto sia da trascurare.

  La sincronizzazione dell'alberino non dovrebbe essere utilizzata su
  RAID0 o RAID 0/1 visto che perdereste il beneficio di avere le testine
  di lettura sopra aree differenti dei settori rispecchiati.



  15.  Ulteriori Informationi

  C' un'enormit di informazioni che si dovrebbero conoscere nel metter
  su un sistema pi grande, ad esempio per un Fornitore di Accessi News
  o un generico Fornitore di Accessi Internet.  Le FAQ nei gruppi
  seguenti sono utili:


  15.1.  News group

  Alcuni dei news group pi interessanti sono:

    Archiviazione <news:comp.arch.storage>.

    Archiviazione su PC <news:comp.sys.ibm.pc.hardware.storage>.

    AFS <news:alt.filesystems.afs>.

    SCSI <news:comp.periphs.scsi>.

    Linux setup <news:comp.os.linux.setup>.

  La maggior parte dei newsgroup ha le proprie FAQ che sono organizzate
  per rispondere a molte delle vostre domande, come indica il nome
  Frequently Asked Question (domande poste frequentemente). Versioni
  recenti dovrebbero essere postate regolarmente sui newsgroup
  rilevanti. Se non potete trovarle nelle vostre code di stampa, potete
  andare direttamente al sito FTP del maggior archivio di FAQ
  <ftp://rtfm.mit.edu>. Le versioni WWW posso essere lette nel sito WWW
  del maggior archivio di FAQ <http://www.cis.ohio-
  state.edu/hypertext/faq/usenet/FAQ-List.html>.

  Qualche FAQ ha il proprio sito, di particolare interesse qui abbiamo

    SCSI FAQ <http://www.paranoia.com/~filipg/HTML/LINK/F_SCSI.html> e

    comp.arch.storage FAQ
     <http://alumni.caltech.edu/~rdv/comp_arch_storage/FAQ-1.html>.



  15.2.  Mailing List

  Questi sono canali di bassa confusione principalmente dedicati agli
  sviluppatori. Pensate due volte prima di chiedere l visto che il
  chiasso rallenta lo sviluppo.  Tra le liste rilevanti troviamo linux-
  raid, linux-scsi e linux-ext2fs.  Molte delle mailing list pi utili
  girano sul server vger.rutgers.edu ma questo  notoriamente
  sovraccarico, quindi cercate di trovare un mirror. C' qualche lista
  mirrorata presso The Redhat Home Page <http://www.redhat.com>.  Molte
  liste sono inoltre accessibili presso linuxhq
  <http://www.linuxhq.com/lnxlists>, ed il resto del sito  una miniera
  di utili informazioni.

  Se volete trovare di pi riguardo le liste disponibili potete mandare
  un messaggio con la riga lists al list server presso vger.rutgers.edu
  ( majordomo@vger.rutgers.edu).  Se avete bisogno di aiuto su come
  utilizzare il mail server,  mandate semplicemente la riga help allo
  stesso indirizzo.  Vista la popolarit di questo server,  probabile
  che passer un po' di tempo prima che otteniate una risposta, o anche
  i messaggi, dopo aver spedito il comando subscribe.

  C' inoltre un bel numero di list server majordomo che possono essere
  di qualche interesse come la lista dei driver EATA ( linux-
  eata@mail.uni-mainz.de) e la lista intelligente di IO linux-
  i2o@dpt.com.

  Le mailing list sono in uno stato di flux ma potete trovare link ad un
  bel numero di liste interessanti dalla Linux Documentation Homepage
  <http://metalab.unc.edu/LDP/>.

  15.3.  HOWTO

  Questi vanno intesi come punti di partenza per ottenere l'informazione
  di supporto o anche per mostrarvi come risolvere uno specifico
  problema.  Tra gli HOWTO rilevanti troviamo Bootdisk, Installation,
  SCSI e UMSDOS.  Il sito principale per questi  l'archivio LDP
  <http://metalab.unc.edu/LDP/> presso Metalab (formalmente conosciuto
  come Sunsite).

  C' un nuovo HOWTO che ha a che fare con il mettere su un sistema RAID
  DPT, controllate la DPT RAID HOWTO homepage
  <http://www.ram.org/computing/linux/dpt_raid.html>.




  15.4.  Mini-HOWTO

  Questi sono testi liberi pi piccoli rispetto agli HOWTO.  Tra i mini-
  HOWTO rilevanti troviamo Backup-With-MSDOS, Diskless, LILO, Large
  Disk, Linux+DOS+Win95+OS2, Linux+OS2+DOS, Linux+Win95, NFS-Root,
  Win95+Win+Linux, ZIP Drive.  Li potete trovare allo stesso posto degli
  HOWTO, generalmente in una sottodirectory chiamata mini. Notate che
  questi sono destinati ad essere convertiti in SGML ed a diventare veri
  e propri HOWTO in un futuro prossimo.

  Il vecchio Linux Large IDE mini-HOWTO non  pi valido, leggete invece
  /usr/src/linux/drivers/block/README.ide o
  /usr/src/linux/Documentation/ide.txt.


  15.5.  Risorse locali

  In molte distribuzioni di Linux, c' installata una directory di
  documenti, controllate nella directory /usr/doc in cui la maggior
  parte dei pacchetti pone la propria documentazione principale, i file
  README, ecc.  Inoltre troverete qui l'archivio HOWTO ( /usr/doc/HOWTO)
  di HOWTO gi formattati ed inoltre l'archivio di mini-HOWTO (
  /usr/doc/HOWTO/mini) con documenti in testo semplice.

  La maggior parte dei file di configurazione citati in precedenza pu
  essere trovata nella directory /etc In particolare vorrete lavorare
  con il file /etc/fstab che predispone il montaggio delle partizioni e
  probabilmente anche col file /etc/mdtab che  utilizzato dal sistema
  md per organizzare il RAID.


  I sorgenti del kernel /usr/src/linux sono, ovviamente, il documento
  finale. In altre parole, usa i sorgenti, Luke.  Dovrebbe anche essere
  puntualizzato che il kernel non  dato solo con i codici sorgenti, che
  sono anche commentati (beh, almeno una parte), ma anche con una
  directory di documentazione <file:///usr/src/linux/Documentation>
  informativa.  Se state per chiedere qualcosa riguardo al kernel,
  dovreste prima leggerla; eviter a voi e a molti altri di perdere un
  sacco di tempo e anche possibili imbarazzi.

  Controllate anche nel file log del sistema ( /var/log/messages) per
  vedere cosa sta succedendo e in particolare come  andato l'avvio, se
  vi  sfuggito via dallo schermo. Utilizzando tail -f /var/log/messages
  in una finestra o in uno schermo separati, otterrete un continuo
  aggiornamento su cosa succede nel vostro sistema.

  Potete anche trarre vantaggio del file system /proc che  una finestra
  dell'intrinseco funzionamento del vostro sistema.  Utilizzate cat
  piuttosto che more per vedere i file nel momento in cui sono
  dichiarati essere di lunghezza zero.
  15.6.  Pagine Web

  C' un grande numero di pagine web informative l fuori e per loro
  stessa natura cambiano velocemente, quindi non siate troppo sorpresi
  se questi link diventano facilmente datati.

  Un buon punto di inizio  ovviamente l'archivio LDP
  <http://metalab.unc.edu/LDP/> di Metalab che  un centro di
  informazioni sulla documentazione, sulle pagine di progetti e molto
  altro.




    Mike Neuffer, l'autore dei driver dei controller RAID con caching
     DPT, ha qualche pagina interessante sullo SCSI <http://www.uni-
     mainz.de/~neuffer/scsi> e DPT <http://www.uni-
     mainz.de/~neuffer/scsi/dpt>.

    Informazioni sullo sviluppo del Software RAID possono essere
     trovate presso il sito del kernel Linux <http://www.kernel.org/>
     con patch ed utility.

    Informazioni riguardanti i dischi, sul benchmarking, sul RAID,
     sull'affidabilit e molto altro, possono essere trovate presso la
     pagina del progetto Linas Vepstas <http://linas.org>.


    Ci sono inoltre anche altre informazioni disponibili su come fare
     il RAID della partizione root
     <ftp://ftp.bizsystems.com/pub/raid/Root-RAID-HOWTO.html> e quali
     pacchetti software sono necessari per farlo.

     disponibile anche una documentazione approfondita su ext2fs
     <http://step.polymtl.ca/~ldd/ext2fs/ext2fs_toc.html>.




    Gente che cerca informazioni su VFAT, FAT32 e Joliet pu dare
     un'occhiata alla pagina di sviluppo
     <http://bmrc.berkeley.edu/people/chaffee/index.html>.  Questi
     driver sono nella serie di sviluppo del kernel 2.1.x come anche nel
     kernel 2.0.34 e successivi.


    Per maggiori informazioni sull'avvio e anche qualche informazione
     su BSD, date un'occhiata alla pagina con le informazioni sull'avvio
     <http://www.paranoia.com/~vax/boot.html>

  Per i diagrammi e le informazioni su tutti i tipi di dischi,
  controller ecc.  Sia per linee continue che discontinue The Ref
  <http://theref.c3d.rl.af.mil>  il sito di cui avete bisogno. Ci sono
  un bel po' di informazioni utili qui, un vero tesoro.  Potete anche
  scaricarvi il database presso l' FTP
  <ftp://theref.c3d.rl.af.mil/public>.

  Fatemi sapere se avete qualche altra idea che pu essere utile.




  15.7.  Motori di Ricerca

  Ricordatevi che potete anche utilizzare i motori di ricerca e che
  alcuni, come
    Altavista <http://www.altavista.digital.com>

    Excite <http://www.excite.com>

    Hotbot <http://www.hotbot.com>

  permettono anche ricerche usenet.

  Ricordatevi inoltre che Dejanews <http://www.dejanews.com>  un motore
  dedicato alle news che mantiene una coda di news dal 1995 in poi.


  Se dovete chiedere aiuto potrete forse trovarne nel newsgroup Linux
  Setup <news:comp.os.linux.setup> A causa di un grande carico di lavoro
  e una lenta connessione di rete non sono in grado di seguire quel
  newsgroup quindi se volete contattarmi dovete farlo via e-mail.



  16.  Ottenere Aiuto


  Alla fine vi potrete trovare nella condizione di non poter risolvere i
  problemi ed avere bisogno di aiuto da qualcuno.  La maniera pi
  efficiente   quella di chiedere localmente o nel pi vicino LUG,
  cercate sul web il pi vicino.

  Un'altra possibilit  di chiedere su Usenet in uno dei moltissimi
  newsgroup disponibili. Il problema  che questi hanno un traffico e un
  rumore cos elevati (chiamato basso rapporto segnale/rumore), che la
  vostra domanda pu finire col non ricevere risposta.

  Non importa  dove lo chiedete ma  importante che lo chiediate
  correttamente o non sarete presi sul serio. Dire solamente il mio
  disco non funziona non vi aiuter ed aumenter il brusio ancora di pi
  e se siete fortunati qualcuno vi chieder delucidazioni.

  Invece descrivete i vostri problemi in dettaglio, il che permetter
  alla gente di aiutarvi. Il problema potrebbe giacere da qualche parte
  che non sospettavate. Quindi siete avvisati di elencare le seguenti
  caratteristiche del vostro sistema:


     Hardware

       Processore

       DMA

       IRQ

       Chip set (LX, BX ecc)

       Bus (ISA, VESA, PCI ecc)

       Schede di espansione utilizzate ( Adattatori, video, IO ecc.)


     Software

       BIOS (Su scheda madre e possibilmente gli adattatori SCSI)

       LILO, se utilizzato

       Versione del kernel Linux ed anche possibili patch e modifiche

       Parametri del kernel, se ce ne sono

       Software che mostra l'errore (con il numero di versione o la
        data)


     Periferiche

       Tipo di lettori con la marca, la versione ed il tipo

       Altre periferiche rilevanti connesse allo stesso bus


  Come esempio su come queste cose sono relazionate tra loro: un vecchio
  chip set ha causato problemi con una certa combinazione di controller
  video e adattatori SCSI.

  Ricordatevi che il testo del boot  presente in /var/log/messages e
  pu rispondere a molte delle domande qui sopra. Ovviamente, se i
  dischi falliscono non sarete in grado di avere i file di log salvati
  ma potete almeno tornare indietro nello schermo utilizzando i tasti
  SHIFT e PAGE UP. Potrebbe anche essere utile includere parte di ci
  nella vostra richiesta di aiuto ma non esagerate, capite che un
  completo file di log inserito in Usenet  pi che un semplice
  fastidio.



  17.  Annotazioni conclusive

  La messa a punto del disco e le decisioni sulle partizioni sono
  difficili da intraprendere e non ci sono grosse regole. Ci nonostante
   una buona idea lavorare di pi su queste cose visto che i vantaggi
  possono essere considerevoli. Aumentare al massimo l'utilizzo su un
  disco solo quando gli altri sono inutilizzati  tutt'altro che una
  buona idea, guardate le luci dei dischi, non stanno l solo per
  decorazione. Per un sistema organizzato bene le luci dovrebbero
  sembrare come Natale in una discoteca. Linux offre il software RAID ma
  gestisce anche qualche controller SCSI RAID hardware. Controllate cosa
   disponibile.  Con il progredire del sistema e delle esperienze,
  potreste ripartizionare e controllare questo documento ancora una
  volta. Le aggiunte sono sempre benvenute.

  Per finire mi piacerebbe riassumere qualche raccomandazione

    I dischi sono economici ma i dati che essi contengono potrebbero
     valere molto di pi, utilizzate e testate il vostro sistema di
     backup.

    Anche il lavoro  costoso, assicuratevi di ottenere dischi
     sufficientemente grandi visto che installarne altri, o
     ripartizionare i vecchi, richiede tempo.

    Pensate all'affidabilit, rimpiazzate i vecchi dischi prima che
     falliscano.

    Mantenete una copia cartacea della vostra configurazione, avere
     tutto su disco quando la macchina  andata non aiuta molto.

    Cominciate con un semplice progetto con un minimo di tecnologia
     fantasiosa e piuttosto mettetecela dopo. In generale aggiungere 
     pi facile che rimpiazzare, che siano dischi, tecnologia o altre
     caratteristiche.



  17.1.  Presto disponibili

  Ci sono un po' di cose importanti che stanno per apparire qui.  In
  particolare aggiunger pi tabelle di esempi visto che sto per mettere
  su due sistemi grossi e generici, uno al lavoro e uno a casa.  Questo
  dovrebbe dare una sensazione generale su come un sistema pu essere
  organizzato per uno di questi due scopi. Esempi su sistemi che girano
  bene sono benvenuti.

  C' anche un po' di lavoro da fare sui vari tipi di file system e
  sulle utility.

  Ci sar una grande aggiunta sulle tecnologie dei dischi molto presto
  come anche una descrizione pi dettagliata sull'utilizzo di fdisk,
  cfdisk e sfdisk.  I file system saranno aggiornati con l'avvento di
  nuove caratteristiche come anche pi sul RAID e quali directory
  possono beneficiare da quale livello di RAID.


  C' qualche piccola interferenza tra il Linux Filesystem Structure
  Standard e il FHS che spero di integrare meglio presto, il che
  probabilmente vuol dire un grande rimaneggiamento di tutte le tavole
  alla fine di questo documento.

  Con la lettura di questo documento da parte di pi persone dovrei
  ottenere qualche ulteriore commento e feedback. Sto anche pensando ad
  un programma in grado di automatizzare un bel po' di queste decisioni
  e sebbene non sia certo l'optimum, dovrebbe fornire un punto di inizio
  pi semplice e completo.


  17.2.  Richieste ed Informazioni

  C' voluto un bel po' di tempo per ottenere questo documento e sebbene
  molti pezzi stanno congiungendosi ci sono ancora delle informazioni di
  cui abbiamo bisogno prima di uscire dalla versione beta.


    Sono necessarie maggiori informazioni sulle politiche di
     dimensionamento dello swap come anche informazioni sulla massima
     dimensione di swap possibile con le varie versioni del kernel.

    Quanto  diffusa la corruzione del disco o del file system?  Fino
     ad ora ho sentito solo di problemi causati da hardware critico.

    Sono necessarie notizie sulla velocit e sui dischi.

    Ci sono altri controller RAID compatibili con Linux?

    Quali strumenti rilevanti sono disponibili per il monitoraggio, la
     gestione ed il mantenimento?

    Sono necessari riferimenti generali sulle fonti di informazione,
     dovrebbe forse essere un documento separato?

    L'utilizzo di /tmp e /var/tmp  stato difficile da determinare,
     infatti quali programmi utilizzano quali directory, non  ben
     definito e maggiori informazioni sono richieste qui. Ancora, alla
     fine sembra essere chiaro che queste dovrebbero risiedere su drive
     fisici differenti al fine di aumentare il parallelismo.


  17.3.  Progetti di Lavoro Suggeriti

  Ora e sempre la gente posta su comp.os.linux.*, cercando buone idee
  per i progetti. Ora ne elencher alcune che mi vengono in mente e che
  sono pertinenti a questo documento. Dovrebbero essere postati anche
  piani riguardanti enormi progetti, come nuovi file system, al fine di
  trovare collaboratori o di vedere se qualcuno ci sta gi lavorando.



     I mezzi per pianificare
        che possono automatizzare i contorni del progetto pi
        velocemente, farebbero probabilmente un progetto di media
        grandezza, forse come un esercizio in programmazione di base.


     I mezzi per partizionare
        che prendono l'output del programma precedentemente menzionato e
        formattano i dischi in parallelo e applicano i collegamenti
        simbolici appropriati alla struttura della directory. Sarebbe
        generalmente meglio se questo fosse integrato nel software per
        l'installazione del sistema esistente.  Il setup del
        partizionamento dei dischi utilizzato in Solaris  un esempio di
        cosa pu servire.


     Strumenti di sorveglianza
        che controllano le dimensioni delle partizioni e avvertono prima
        che una partizione si riempia.


     Strumenti di migrazione
        che vi permettono di spostare vecchie strutture verso nuovi
        sistemi (ad esempio RAID). Questo potrebbe essere fatto
        probabilmente con script shell che controllano programmi di
        backup e sarebbe abbastanza semplice. Ancora una volta,
        accertatevi che sia sicuro e che i cambiamenti possano essere
        ripristinati.



  18.  Domande e risposte

  Questa  solamente una collezione di quello che io penso siano le
  domande pi comuni che la gente pu fare. Contattatemi e muter questa
  sezione in una vera e propria FAQ.


    D: Di quanti dischi fisici (alberini) ha bisogno un sistema Linux?

     R: Linux pu girare bene su un unico disco (alberino).  Avere
     abbastanza RAM (attorno a 32 MB e fino a 64 MB) per gestire lo swap
      una scelta di prezzo/prestazione migliore che prendere un disco
     secondario.  Un disco (E)IDE  generalmente pi economico (ma un
     po' pi lento) di uno SCSI.


    D: Ho un singolo disco, mi aiuter questo HOWTO?

     R: Si, sebbene solo ad un grado inferiore. La sezione
     ``Posizionamento Fisico delle Tracce'' vi fornir del guadagno.


    D: Ci sono svantaggi in questo schema?

     R: C' solo una piccola rogna: se anche solo una singola partizione
     si riempie, il sistema potrebbe smettere di lavorare correttamente.
     La gravit dipende ovviamente da quale partizione  interessata.
     Comunque questo non  difficile da tenere sotto controllo, il
     comando df vi da una buona visione della situazione. Controllate
     inoltre le partizioni di swap mediante free per assicurarvi che non
     state per saturare la memoria virtuale.


    D: OK, quindi dovrei dividere il sistema in quante pi partizioni
     possibili per un disco solo?

     R: No, ci sono diversi svantaggi nel fare ci. Prima di tutto la
     manutenzione diventa inutilmente complessa e ottenete molto poco.
     Infatti se le vostre partizioni sono troppo grandi, accederete su
     aree pi larghe del necessario.  Questo  un bilancio dipendente
     dal numero di dischi fisici che avete.


    D: Questo significa che pi dischi permettono pi partizioni?

     R: In qualche modo s. Comunque, qualche directory non dovrebbe
     essere separata da root, controllate il file system standard per
     maggiori dettagli.



    D: Che devo fare se ho molti dischi che voglio utilizzare?

     R: Se avete pi di 3-4 dischi dovreste considerare l'utilizzo di un
     qualche tipo di RAID. Comunque  una buona idea di mantenere root
     su una singola partizione senza RAID, controllate la sezione
     ``RAID'' per maggiori dettagli.


    D: Ho installato l'ultimo Windows95 ma non posso accedere a questa
     partizione dal sistema Linux, cosa  sbagliato?

     R:  presumibile che tu stia utilizzando FAT32 nella partizione
     windows. Sembra che Microsoft abbia deciso che noi abbiamo bisogno
     di ancora un altro sistema e questo  stato introdotto nell'ultima
     versione di Windows95, chiamata OSR2.  Il vantaggio  che questo
     formato  meglio adatto a dischi larghi.

     Pu interessare sapere che NT 4.0 della Microsoft non lo gestisce
     ancora.


    D: Non riesco a far coincidere la dimensione del disco e quella
     della partizione, manca qualcosa. Cosa  successo?

     R:  possibile che abbiate montato una partizione su un punto di
     montaggio che non era una directory vuota. I punti di montaggio
     sono directory e se non sono vuote il montaggio mascherer i
     contenuti. Se sommate vedrete che la quantit di spazio disco
     utilizzato in questa directory manca dal totale osservato.

     Per risolvere ci potete fare il boot da un disco di recupero e
     controllare cosa si sta nascondendo nei punti di montaggio e
     rimuovere o spostarne i contenuti montando la partizione in
     questione su un punto di montaggio provvisorio. Potreste trovare
     utile avere punti di montaggio di emergenza "sparsi" gi fatti.


    D: Non mi sembra che la partizione di swap sia in uso, come 
     successo?

     R:  possibile che non sia stato necessario fare swap, specialmente
     se avete molta RAM. Controllate i vostri file di log per
     controllare se avete saturato la memoria su di un punto o su un
     altro. In quel caso il vostro spazio di swap dovrebbe essere stato
     messo in uso. Se cos non ,  possibile che o alla partizione di
     swap non  stato assegnato il numero giusto, o che non l'avete
     preparata con mkswap o che non avete fatto lo swapon o che non lo
     avete aggiunto al vostro fstab.



    D: Cos' qusto nyx cui si accenna molte volte qui?

     R:  un sistema Unix gratuito con attualmente circa 10000 utenti.
     Lo utilizzo per le mie pagine web, per questo HOWTO come anche per
     una sorgente di idee per un setup su grossi sistemi UNIX. Sono
     parecchi anni che gira ed ha un setup abbastanza stabile. Per
     maggiori informazioni controllate la Nyx homepage
     <http://www.nyx.net> che vi d anche informazioni su come ottenere
     il vostro account gratuito.




  19.  Pezzettini e Ritagli

  Questa  praticamente una sezione dove ammucchio tutti i pezzetti che
  ancora non ho deciso dove mettere, ma che sento sia necessario saperne
  qualcosa.  una specie di area di transizione.




  19.1.  Partizione Swap: usarla o non usarla

  In molti casi non avete bisogno di una partizione di swap, ad esempio
  se avete molta RAM, tipo pi di 64 MB, e siete l'unico utente della
  macchina. In questo caso potete provare a procedere senza una
  partizione di swap e controllare in ogni momento se avete mai saturato
  la memoria virtuale.

  Rimuovere le partizioni di swap ha due vantaggi:

    risparmiate spazio disco (in realt abbastanza ovvio)

    risparmiate tempo di accesso alle partizioni swap altrimenti
     giacerebbero al centro del vostro spazio disco.

  In fine, avere una partizione di swap  come avere un bagno
  riscaldato: non lo usate molto spesso, ma sicuramente lo apprezzerete
  quando ne avete bisogno.


  19.2.  Punto di montaggio e /mnt

  Nelle versioni pi recenti di questo documento ho proposto di mettere
  tutte le partizioni montate in maniera permanente sotto /mnt. Il che,
  comunque, non  che sia proprio una buona idea visto che essa pu
  essere utilizzata come un punto di montaggio, che guida a tutte le
  partizioni montate che diventano disponibili.  Invece proporr di
  montare direttamente da root mediante un nome significativo come
  /mnt.nome-descrittivo.

  Recentemente sono diventato conscio del fatto che qualche
  distribuzione Linux utilizza punti di montaggio su subdirectory sotto
  /mnt, come /mnt/floppy e /mnt/cdrom, che mostra solamente quanto
  confusa sia l'intera faccenda.  Speriamo che FHS chiarisca tutto ci.



  19.3.  Alimentazione e Riscaldamento

  Non molti anni fa, una macchina con la potenza di un moderno PC
  richiedeva alimentazione e raffreddamento a 3 fasi, generalmente
  mediante aria condizionata nella stanza della macchina, alcune volte
  anche raffreddando ad acqua. La tecnologia si  evoluta velocemente
  portando non solo alta velocit ma anche componenti a basso consumo.
  Comunque, c' un limite definito dalla tecnologia, qualcosa che uno
  dovrebbe tenere a mente visto che il sistema si espande con ancora un
  altro disco o un'altra scheda PCI. Quando l'alimentazione gira a pieno
  regime tenete presente che tutta questa energia sta andando da qualche
  parte, per lo pi in calore. Se questo non viene dissipato attraverso
  ventole, avrete un serio riscaldamento nel cabinet seguito da
  un'affidabilit ridotta ed anche da una riduzione della vita delle
  elettroniche. I produttori stabiliscono un minimo di necessit di
  raffreddamento per i loro dischi, generalmente in termini di piedi
  cubi al minuto (CFM). Siete tutti avvisati di prenderlo seriamente in
  considerazione.

  Mantenete i passaggi di aria aperti, pulite la polvere e controllate
  la temperatura del vostro sistema in funzione. Se  troppo caldo da
  toccare, probabilmente gira in condizioni di calore eccessivo.

  Se possibile utilizzate spin up sequenziali per i dischi.  durante
  l'avvio, quando le piastre dei dischi accelerano fino a velocit
  normale che un disco consuma il massimo dell'energia e se tutti i
  dischi partono simultaneamente potreste andare oltre il massimo della
  vostra alimentazione.


  19.4.  Dejanews

  Questo  un sistema Internet che indubbiamente  familiare a molti di
  voi.  Esso cerca e fornisce articoli Usenet dal 1995 fino ai pi
  recenti messaggi e offre inoltre un'interfaccia web di lettura e
  scrittura.  C' molto altro, controllate Dejanews
  <http://www.dejanews.com> per maggiori informazioni.

  Ci che forse  meno risaputo,  che utilizzano circa 120 computer
  Linux SMP molti dei quali utilizzano per questo servizio il modulo md
  per gestire dai 4 ai 24 Giga di spazio disco (pi di 1200 Giga tutti
  insieme). Il sistema cresce in continuazione ma al momento di scrivere
  essi utilizzano generalmente dual Pentium Pro 200MHz e sistemi Pentium
  II 300 MHz con 256 MB di RAM o pi.

  Una macchina per production database ha generalmente un disco per il
  sistema operativo e tra i 4 ed i 6 gestiti dal modulo md dove gli
  articoli sono archiviati. I dischi sono connessi ad adattatori PCI
  SCSI BusLogic Model BT-946C e BT-958

  Per i sistemi di produzione (che sono accesi 365 giorni l'anno) il
  tempo di interruzione dovuto ad errori di disco  inferiore allo 0.25%
  (che  un quarto di 1%, non di 25%).

  Solo una cosa: questa non  pubblicit,  inserito come un esempio di
  quanto  richiesto per quel che  un servizio Internet principale.






  20.  Appendice A: Tabella della Struttura del Partizionamento: Montare
  e Linkare


  La tabella seguente  progettata per fare della struttura un semplice
  esercizio di carta e matita.  probabilmente meglio stamparlo
  (utilizzando caratteri non scalabili) ed aggiustarne i numeri fino a
  che non ne siete soddisfatti.

  I punti di montaggio sono le directory dove vorreste montare le
  partizioni o il dispositivo reale. Questo  anche il posto giusto dove
  annotare come avrete intenzione di utilizzare i link simbolici.

  La dimensione data corrisponde ad una installazione di Debian 1.2.6
  abbastanza grande. Altri esempi seguiranno pi avanti.

  Principalmente utilizzate questa tabella per selezionare quali
  strutture e dischi utilizzerete, i numeri di partizione e le lettere
  arriveranno dalle prossime 2 partizioni.



       Directory       Punto Montag.   veloc.  accesso trasferimento   dim.    DIM


       swap            __________      ooooo   ooooo   ooooo           32      ____

       /               __________      o       o       o               20      ____

       /tmp            __________      oooo    oooo    oooo                    ____

       /var            __________      oo      oo      oo              25      ____
       /var/tmp        __________      oooo    oooo    oooo                    ____
       /var/spool      __________                                              ____
       /var/spool/mail __________      o       o       o                       ____
       /var/spool/news __________      ooo     ooo     oo                      ____
       /var/spool/____ __________      ____    ____    ____                    ____

       /home           __________      oo      oo      oo                      ____

       /usr            __________                                      500     ____
       /usr/bin        __________      o       oo      o               250     ____
       /usr/lib        __________      oo      oo      ooo             200     ____
       /usr/local      __________                                              ____
       /usr/local/bin  __________      o       oo      o                       ____
       /usr/local/lib  __________      oo      oo      ooo                     ____
       /usr/local/____ __________                                              ____
       /usr/src        __________      o       oo      o               50      ____

       DOS             __________      o       o       o                       ____
       Win             __________      oo      oo      oo                      ____
       NT              __________      ooo     ooo     ooo                     ____

       /mnt._________  __________      ____    ____    ____                    ____
       /mnt._________  __________      ____    ____    ____                    ____
       /mnt._________  __________      ____    ____    ____                    ____
       /_____________  __________      ____    ____    ____                    ____
       /_____________  __________      ____    ____    ____                    ____
       /_____________  __________      ____    ____    ____                    ____



       Capacit totale:







  21.  Appendice B: Tabella della Struttura del Partizionamento. Numer
  azione e dimensionamento

  Questa tabella segue la stessa struttura logica della tabella
  precedente in cui avete deciso che disco utilizzare. Qui voi
  selezionate il physical tracking, ricordando l'effetto del
  posizionamento delle tracce menzionato in precedenza in
  ``Posizionamento Fisico delle Tracce''.

  Il numero della partizione finale verr fuori dalla tabella
  successiva.



         Disco           sda     sdb     sdc     hda     hdb     hdc     ___

       SCSI ID         |  __   |  __   |  __   |

       Directory
       swap            |       |       |       |       |       |       |

       /               |       |       |       |       |       |       |

       /tmp            |       |       |       |       |       |       |

       /var            :       :       :       :       :       :       :
       /var/tmp        |       |       |       |       |       |       |
       /var/spool      :       :       :       :       :       :       :
       /var/spool/mail |       |       |       |       |       |       |
       /var/spool/news :       :       :       :       :       :       :
       /var/spool/____ |       |       |       |       |       |       |

       /home           |       |       |       |       |       |       |

       /usr            |       |       |       |       |       |       |
       /usr/bin        :       :       :       :       :       :       :
       /usr/lib        |       |       |       |       |       |       |
       /usr/local      :       :       :       :       :       :       :
       /usr/local/bin  |       |       |       |       |       |       |
       /usr/local/lib  :       :       :       :       :       :       :
       /usr/local/____ |       |       |       |       |       |       |
       /usr/src        :       :       :       :

       DOS             |       |       |       |       |       |       |
       Win             :       :       :       :       :       :       :
       NT              |       |       |       |       |       |       |

       /mnt.___/_____  |       |       |       |       |       |       |
       /mnt.___/_____  :       :       :       :       :       :       :
       /mnt.___/_____  |       |       |       |       |       |       |
       /_____________  :       :       :       :       :       :       :
       /_____________  |       |       |       |       |       |       |
       /_____________  :       :       :       :       :       :       :


       Capacit Totale:






  22.  Appendice C: Tabella della Struttura del Partizionamento:
  Posizionamento delle Partizioni


  Questa serve solamente per ordinare i numeri delle partizioni in
  ordine crescente, pronti per essere immessi in fdisk o cfdisk. Qui
  prendete in considerazione il posizionamento fisico delle tracce
  quando finalizzate il vostro progetto.  Se non avete informazioni
  specifiche, potete assumere che la traccia 0 sia la traccia pi
  esterna.

  Questi numeri e lettere sono poi utilizzati per aggiornare le tabelle
  precedenti, che vi risulteranno tutte molto utili nella manutenzione
  futura.

  In caso di crash del disco, potreste trovare utile sapere quale SCSI
  id appartiene a quale drive, considerate di tenere una copia di ci.



               Disco :   sda     sdb     sdc     hda     hdb     hdc     ___

       Capac.  totale: |  ___  |  ___  |  ___  |  ___  |  ___  |  ___  |  ___
       SCSI ID         |  __   |  __   |  __   |

       Partizione

       1               |       |       |       |       |       |       |
       2               :       :       :       :       :       :       :
       3               |       |       |       |       |       |       |
       4               :       :       :       :       :       :       :
       5               |       |       |       |       |       |       |
       6               :       :       :       :       :       :       :
       7               |       |       |       |       |       |       |
       8               :       :       :       :       :       :       :
       9               |       |       |       |       |       |       |
       10              :       :       :       :       :       :       :
       11              |       |       |       |       |       |       |
       12              :       :       :       :       :       :       :
       13              |       |       |       |       |       |       |
       14              :       :       :       :       :       :       :
       15              |       |       |       |       |       |       |
       16              :       :       :       :       :       :       :






  23.  Appendice D: Esempio: Server Multifunzionale


  La tabella seguente viene da un setup di un server multifunzionale di
  media grandezza dove lavoro. Oltre che essere una macchina generale
  Linux, esso sar anche un server di rete (DNS, posta, FTP, news,
  stampanti ecc.), un server X per vari programmi CAD, masterizzatori e
  molte altre cose.  I file risiedono su 3 dischi SCSI con capacit di
  600, 1000 e 1300 MB.

  Un po' di ulteriore velocit potrebbe essere ottenuta separando
  /usr/local dal resto del sistema /usr ma abbiamo ritenuto che
  l'ulteriore complessit aggiunta, non sarebbe valsa lo sforzo.  Con un
  altro paio di dischi sarebbe stato pi vantaggioso. In questa
  configurazione, sda  vecchio e lento e potrebbe essere benissimo
  sostituito da un disco IDE. Gli altri due dischi sono entrambi
  sufficientemente veloci.  Praticamente abbiamo diviso la maggior parte
  del carico tra questi due.  Per ridurre i pericoli di sbilanciamento
  nel dimensionamento delle partizioni abbiamo deciso di mantenere
  /usr/bin e /usr/local/bin in un solo disco e /usr/lib e /usr/local/lib
  su un altro disco separato, il che inoltre ci permette un po' di
  parallelizzazione.

  Potrebbe essere guadagnato anche di pi utilizzando RAID, ma abbiamo
  avuto la sensazione che come server avevamo bisogno di pi
  affidabilit di quella che permetteva la patch md e un controller RAID
  dedicato era lontano dalla nostra portata.


  24.  Appendice E: Esempio: Montare e Linkare





       Directory       Punto di mont.  veloc.  accesso trasferimento   dim.    DIM.


       swap            sdb2, sdc2      ooooo   ooooo   ooooo           32      2x64

       /               sda2            o       o       o               20       100

       /tmp            sdb3            oooo    oooo    oooo                     300

       /var            __________      oo      oo      oo                      ____
       /var/tmp        sdc3            oooo    oooo    oooo                     300
       /var/spool      sdb1                                                     436
       /var/spool/mail __________      o       o       o                       ____
       /var/spool/news __________      ooo     ooo     oo                      ____
       /var/spool/____ __________      ____    ____    ____                    ____

       /home           sda3            oo      oo      oo                       400

       /usr            sdb4                                            230      200
       /usr/bin        __________      o       oo      o               30      ____
       /usr/lib        -> libdisk      oo      oo      ooo             70      ____
       /usr/local      __________                                              ____
       /usr/local/bin  __________      o       oo      o                       ____
       /usr/local/lib  -> libdisk      oo      oo      ooo                     ____
       /usr/local/____ __________                                              ____
       /usr/src        ->/home/usr.src o       oo      o               10      ____

       DOS             sda1            o       o       o                        100
       Win             __________      oo      oo      oo                      ____
       NT              __________      ooo     ooo     ooo                     ____

       /mnt.libdisk    sdc4            oo      oo      ooo                      226
       /mnt.cd         sdc1            o       o       oo                       710


       Capacit Totale: 2900 MB






  25.  Appendice F: Esempio: Numerazione e Dimensionamento

  Qui facciamo gli aggiustamenti delle dimensioni e del posizionamento.







  Directory         sda     sdb     sdc


  swap            |       |   64  |   64  |

  /               |  100  |       |       |

  /tmp            |       |  300  |       |

  /var            :       :       :       :
  /var/tmp        |       |       |  300  |
  /var/spool      :       :  436  :       :
  /var/spool/mail |       |       |       |
  /var/spool/news :       :       :       :
  /var/spool/____ |       |       |       |

  /home           |  400  |       |       |

  /usr            |       |  200  |       |
  /usr/bin        :       :       :       :
  /usr/lib        |       |       |       |
  /usr/local      :       :       :       :
  /usr/local/bin  |       |       |       |
  /usr/local/lib  :       :       :       :
  /usr/local/____ |       |       |       |
  /usr/src        :       :       :       :

  DOS             |  100  |       |       |
  Win             :       :       :       :
  NT              |       |       |       |

  /mnt.libdisk    |       |       |  226  |
  /mnt.cd         :       :       :  710  :
  /mnt.___/_____  |       |       |       |


  Capac. Totale:  |  600  | 1000  | 1300  |






  26.  Appendice G: Esempio: Posizionamento delle Partizioni

  Questo  solo per ordinare i numeri delle partizioni in ordine
  ascendente pronti per essere immessi in fdisk o cfdisk.  Ricordate di
  ottimizzare il posizionamento fisico delle tracce (non fatto qui).



               Disco :    sda     sdb     sdc

       Capac. Totale : |   600 |  1000 |  1300 |

       Partizione

       1               |   100 |   436 |   710 |
       2               :   100 :    64 :    64 :
       3               |   400 |   300 |   300 |
       4               :       :   200 :   226 :





  27.  Appendice H: Esempio II

  Il seguente  un esempio di una predisposizione di un server con
  impostazioni accademiche ed  un contributo di nakano (at)
  apm.seikei.ac.jp. Ho fatto piccolissime modifiche a questa sezione.

  /var/spool/delegate  una directory per archiviare i file di log e i
  file di cache di un programma per server proxy WWW, "delegato". Dal
  momento che non lo noto ampiamente, attualmente ci sono 1000--1500
  richieste al giorno e l'utilizzo medio del disco  del 15--30% con
  scadenza giornaliera delle cache.

  /mnt.archive  utilizzato per i file che sono grandi e cui non si fa
  frequentemente riferimento come i dati sperimentali (specialmente
  quelli grafici), vari sorgenti di archivi e backup di Win95 (che
  crescono molto velocemente).

  /mnt.root  un file system di backup che contiene utilit di recupero.
  Un boot floppy  inoltre preparato per fare un boot su questa
  partizione.














































  =================================================
  Directory               sda      sdb     hda

  swap                    |    64 |    64 |       |
  /                       |       |       |    20 |
  /tmp                    |       |       |   180 |

  /var                    :   300 :       :       :
  /var/tmp                |       |   300 |       |
  /var/spool/delegate     |   300 |       |       |

  /home                   |       |       |   850 |
  /usr                    |   360 |       |       |
  /usr/lib                -> /mnt.lib/usr.lib
  /usr/local/lib          -> /mnt.lib/usr.local.lib

  /mnt.lib                |       |   350 |       |
  /mnt.archive            :       :  1300 :       :
  /mnt.root               |       |    20 |       |

  Capac. Totale:            1024    2034    1050


  =================================================
          Disco :            sda     sdb     hda
  Capac. Totale :         |  1024 |  2034 |  1050 |

  Partizione
  1                       |   300 |    20 |    20 |
  2                       :    64 :  1300 :   180 :
  3                       |   300 |    64 |   850 |
  4                       :   360 :   ext :       :
  5                       |       |   300 |       |
  6                       :       :   350 :       :


  Filesystem         1024-blocks  Used Available Capacity Mounted on
  /dev/hda1              19485   10534     7945     57%   /
  /dev/hda2             178598      13   169362      0%   /tmp
  /dev/hda3             826640  440814   343138     56%   /home
  /dev/sda1             306088   33580   256700     12%   /var
  /dev/sda3             297925   47730   234807     17%   /var/spool/delegate
  /dev/sda4             363272  170872   173640     50%   /usr
  /dev/sdb5             297598       2   282228      0%   /var/tmp
  /dev/sdb2            1339248  302564   967520     24%   /mnt.archive
  /dev/sdb6             323716   78792   228208     26%   /mnt.lib




  Apparentemente /tmp e /var/tmp sono troppo grandi.  Queste directory
  dovrebbero essere unite insieme in una partizione quando lo spazio
  disco diminuisce.

  Anche /mnt.lib dovrebbe esistere, ma ho pianificato di installare
  archivi TeX e ghostscript pi nuovi, quindi /usr/local/lib potrebbe
  crescere di circa 100 MB o gi di l (visto che dobbiamo utilizzare
  caratteri giapponesi!).

  Viene fatto un backup dell'intero sistema da un Seagate Tapestore 8000
  (Travan TR-4, 4G/8G).





  28.  Appendice I: Esempio III: SPARC Solaris


  La sezione seguente  il progetto base utilizzato al lavoro per una
  serie di server Sun SPARC su cui gira Solaris 2.5.1 in un ambiente di
  sviluppo industriale.  Esso serve una serie di archivi e applicazioni
  cad oltre ai normali servizi come la posta.

  La semplicit  qui enfatizzata quindi /usr/lib non  stata separata
  da /usr.

  Questa  la struttura di base, pianificata per circa 100 utenti.



          Disco:        SCSI 0                      SCSI 1

          Partizione    Dim. (MB)   Punto di Mount Dim. (MB)   Punto di Mount

            0           160         swap           160         swap
            1           100         /tmp           100         /var/tmp
            2           400         /usr
            3           100         /
            4            50         /var
            5
            6           remainder   /local0        remainder   /local1




  A causa di specifiche necessit in questa sede  a volte necessario
  avere la disponibilit di grandi partizioni con un breve preavviso.
  Quindi al disco 0 vengono conferiti pi compiti possibili, mantenendo
  una grande partizione /local1.

  Questa configurazione  stata in uso per qualche tempo ed ora la
  riteniamo soddisfacente.

  Per un sistema pi generale e bilanciato, sarebbe meglio dividere /tmp
  e /var/tmp e spostare /var al disco 1.


  29.  Appendice J: Esempio IV: Server con 4 Dischi

  Questo fornisce un esempio di utilizzo di tutte le tecniche descritte
  prima, con un po' di RAID. Si deve riconoscere che  abbastanza
  complicato ma offre in compenso alta prestazione da un hardware
  modesto. Il dimensionamento  saltato ma descrizioni ragionevoli
  possono essere trovate in esempi precedenti.



       Partizione      sda             sdb             sdc             sdd
                       ----            ----            ----            ----
               1       root            overview        lib             news
               2       swap            swap            swap            swap
               3       home            /usr            /var/tmp        /tmp
               4                       spare root      mail            /var




  La configurazione  ottimizzata nel rispetto del posizionamento delle
  tracce ma anche per mancanza di accessi ai dischi.


  Se inoltre volete DOS o Windows dovrete utilizzare sda1 per questo e
  spostare durante queste sessioni le altre partizioni su sdb2, sdc2 e
  sdd2 per lo swap di Windows, TEMPDIR e la directory temporanea di
  Windows.  Una serie di altri HOWTO descrive come potete far coesistere
  diversi tipi di sistemi operativi sulla vostra macchina.


  Per completezza viene fornito un esempio di 4 dischi con l'utilizzo di
  diversi tipi di RAID il che  anche molto pi complesso dell'esempio
  sopra.



       Partizione      sda             sdb             sdc             sdd
                       ----            ----            ----            ----
               1       boot            overview        news            news
               2       overview        swap            swap            swap
               3       swap            lib             lib             lib
               4       lib             overview        /tmp            /tmp
               5       /var/tmp        /var/tmp        mail            /usr
               6       /home           /usr            /usr            mail
               7       /usr            /home           /var
               8       / (root)        spare root




  Qui tutti i duplicati sono parti di un set RAID 0 con due eccezioni,
  swap che  lasciato da parte e home e mail che sono implementati come
  RAID 1 per sicurezza.

  Notate che boot e root sono separati: solo il file di boot con il
  kernel deve risiedere entro il limite del cilindro 1023. Il resto
  della root pu essere dovunque e qui sono piazzati sulla partizione
  pi lenta e lontana. Per semplicit e sicurezza la partizione root non
   su un sistema RAID.

  Con una complessit tale ne consegue che avremo un file fstab
  egualmente complicato. Il grande numero di partizioni rende importante
  fare passaggi di fsck nell'ordine esatto, altrimenti il processo pu
  metterci dieci volte il tempo per concludersi come la soluzione
  migliore.




       /dev/sda8       /               ?       ?               1 1 (a)
       /dev/sdb8       /               ?       noauto          1 2 (b)
       /dev/sda1       boot            ?       ?               1 2 (a)
       /dev/sdc7       /var            ?       ?               1 2 (c)
       /dev/md1        news            ?       ?               1 3 (c+d)
       /dev/md2        /var/tmp        ?       ?               1 3 (a+b)
       /dev/md3        mail            ?       ?               1 4 (c+d)
       /dev/md4        /home           ?       ?               1 4 (a+b)
       /dev/md5        /tmp            ?       ?               1 5 (c+d)
       /dev/md6        /usr            ?       ?               1 6 (a+b+c+d)
       /dev/md7        /lib            ?       ?               1 7 (a+b+c+d)




  Le lettere tra parentesi indicano quali dischi saranno attivi per ogni
  voce e passaggio di fsck. Queste lettere non sono presenti in un vero
  file fstab.  In tutto ci sono 7 passaggi.


  30.  Appendice K: Esempio V: Sistema con Doppio Disco

  Un sistema con doppio disco offre meno opportunit per schemi
  intelligenti ma il seguente dovrebbe fornire un semplice punto di
  partenza.



       Partizione      sda             sdb
                       ----            ----
               1       boot            lib
               2       swap            news
               3       /tmp            swap
               4       /usr            /var/tmp
               5       /var            /home
               6       / (root)





  Se utilizzate un sistema con due SO dovete ricordarvi che molti altri
  sistemi devono fare il boot dalla prima partizione del primo disco. Un
  semplice sistema DOS / Linux potrebbe apparire cos:



       Partizione      sda             sdb
                       ----            ----
               1       DOS             lib
               2       boot            news
               3       swap            swap
               4       /tmp            /var/tmp
               5       /usr            /home
               6       /var            DOSTEMP
               7       / (root)





  Inoltre ricordate che DOS e Windows preferiscono essere la sola
  partizione che deve anche essere la prima da dove si fa il boot. Visto
  che Linux pu esistere felicemente in partizioni logiche, questo non 
  un grande problema.



  31.  Appendice L: Esempio VI: Sistema con un Singolo Disco

  Sebbene questo cada in qualche modo fuori da quello che  lo scopo di
  questo HOWTO, non pu essere negato che recentemente qualche disco
  abbastanza grande  diventato molto accessibile. Dischi con 10-20 GB
  stanno diventando comuni ed  frequente la domanda su come
  partizionare questi mostri.  abbastanza interessante il fatto che
  molto pochi sembrano avere problemi nel riempire questi dischi ed il
  futuro sembra generalmente abbastanza roseo per i produttori che
  puntano su dischi ancora pi grandi.

  Opportunit per ottimizzazioni sono ovviamente anche pi piccole che
  per i sistemi a due dischi ma qualche trucco pu ancora essere
  utilizzato per ottimizzare il posizionamento delle tracce nel
  minimizzare i movimenti delle testine.



  Partizione      hda             Dimensione Stimata (MB)
                  ----            ------------------
           1      DOS             500
           2      boot            20
           3      Winswap         200
           4      data            La massa del disco
           5      lib             50 - 500
           6      news            300+
           7      swap            128     (Dimensione massima per una CPU a 32-bit)
           8      tmp             300+    (/tmp e /var/tmp)
           9      /usr            50 - 500
          10      /home           300+
          11      /var            50 - 300
          12      mail            300+
          13      dosdata         10      ( Si aggirano i bug di Windows!)




  Ricordate che la partizione dosdata  un filesystem DOS che deve
  essere l'ultima partizione sul disco, altrimenti Windows si confonde.













































  Linux NET-3-HOWTO, Linux Networking.
  Terry Dawson (autore principale), VK2KTJ, Alessandro Rubini
  (manutentore). Traduzione: Alessandro Rubini
  rubini@linux.it, Riccardo Fabris skizzo@mail.seta.it.
  v1.4, Agosto 1998

  Il sistema operativo Linux vanta un supporto per la rete a livello
  kernel scritto quasi completamente da zero.  Le elevate prestazioni
  dell'implementazione tcp/ip delle versioni del kernel pi recenti lo
  rendono un'alternativa significativa anche ai migliori fra i sistemi
  operativi similari.  Questo documento si propone di descrivere come
  installare e configurare il software di rete di Linux e gli strumenti
  associati.

  1.  Cambiamenti dalla versione 1.3 (Aprile 1998)


  Aggiunte:
          Traffic Shaper (limitatore di banda)
          Plip per i nuovi kernel

  Correzioni/Aggiornamenti:
          Indirizzo del manutentore del netkit
          Riviste le descrizioni dei nomi di dominio (domain name)
          Riordino generale delle sezioni
          Sono indicate le differenze tra 2.0 e 2.2, sebbene alcune
          informazioni sul 2.2 siano mancanti
          Corretti molti riferimenti a documenti esterni

  Da aggiungere:
          Descrivere i nuovi algoritmi di routing
          Aggiungere le opzioni di compilazione del kernel per IPV6
          Descrivere le voci in  /proc/sys/net/*
          Parlare della periferica "WanRouter"
          Descrivere i nuovi comandi firewall dei 2.2




  2.  Introduzione.

  Il documento NET-FAQ originale fu scritto da Matt Welsh e da me, al
  fine di rispondere alle domande poste pi frequentemente a proposito
  del supporto di rete per Linux, quando il "Linux Documentation
  Project" non era ancora formalmente partito.  Questo documento copriva
  le versioni di sviluppo iniziali del Networking per il kernel Linux.
  Il documento NET-2-HOWTO ha rimpiazzato la NET-FAQ ed  stato uno dei
  primi documenti HOWTO dell'LDP, coprendo quella che  stata chiamata
  la versione 2, e successivamente versione 3, del software di rete per
  il kernel Linux. Questo documento a sua volta rimpiazza il NET-2-HOWTO
  e si occupa solo della versione 3 del software.

  Le versioni precedenti di questo documento sono diventate molto
  ingombranti a causa dell'enorme mole di materiale esistente
  sull'argomento. Per circoscrivere questo problema sono stati scritti
  un certo numero di HOWTO a proposito di specifici argomenti di
  networking. Questo documento fornisce i puntatori a tali documenti
  dove necessario e copre le aree non ancora coperte da altri documenti.

  Nell'Aprile del 1998 Terry ha lasciato il suo ruolo di manutentore a
  causa dei suoi impegni di lavoro. Io, Alessandro Rubini, sono nuovo in
  questo ruolo ma cercher di fare del mio meglio per riuscirci.




  2.1.  Commenti

  Apprezzo sempre i commenti e in particolare i contributi di valore.
  Mandate pure tutti i commenti e i contributi al mio indirizzo
  rubini@linux.it <mailto:rubini@linux.it>.


  3.  Come usare questo documento (HOWTO sul NET-3-HOWTO ?).

  Questo documento  organizzato con metodo top-down. Le prime sezioni
  presentano materiale informativo che pu essere saltato da chi non sia
  interessato; successivamente appare materiale generico che occorre
  essere sicuri di aver capito prima di procedere oltre; il resto del
  documento  composto da tre sezioni principali che si occupano di
  tecnologie specifiche: informazioni circa Ethernet e IP, tecnologie di
  largo impiego nell'hardware dei PC e tecnologie di uso ristretto.

  Si suggerisce quindi di percorrere il documento nel seguente modo:



     Leggere le sezioni generiche
        Queste sezioni si applicano a tutte, o quasi tutte, le
        tecnologie descritte pi avanti, ed  quindi molto importante
        comprenderle. Del resto ci si attende che molti dei lettori
        abbiano gi confidenza con tale materia.



     Osservare la propria rete
        Occorre sapere come  progettata la propria rete, o come lo
        sar. Occorre anche sapere esattamente quali tipi di tecnologie
        hardware verranno utilizzate.



     Leggere la sezione
        direttamente ad una rete locale o a Internet" Questa sezione
        descrive una configurazione Ethernet di base e le varie
        funzionalit offerte da Linux per le reti IP, come il
        firewalling, l'instradamento di rete avanzato e cos via.



     Leggere la sezione successiva se si  interessati a reti locali
        a basso costo o a connessioni telefoniche" La sezione descrive
        PLIP, PPP, SLIP e ISDN, che sono le tecnologie maggiormente
        diffuse nell'ambito PC.



     Leggere le parti specifiche alle proprie esigenze
        Se si ha bisogno di qualcosa di diverso da informazioni su IP
        e/o hardware comunemente diffuso, la sezione finale si occupa
        dei dettagli specifici dei protocolli non-IP e di hardware di
        comunicazione particolare.



     Configurare la rete
        Bisogna provare a configurare la rete in pratica e prendere
        scrupolosamente nota di ogni problema incontrato.




     Cercare ulteriore aiuto se necessario
        Se si incontrano problemi che questo documento non aiuta a
        risolvere, si legga la sezione relativa a dove trovare aiuto e
        dove far presenti gli errori.



     Divertirsi!
        Il networking  divertente, bisogna saperlo apprezzare!


  3.1.  Convenzioni usate in questo documento

  Non verranno usate convenzioni speciali, si faccia per una
  particolare attenzione al modo in cui sono espressi i comandi.
  Seguendo il classico stile di documentazione Unix, ogni comando da
  digitare sulla linea di comando di una shell  preceduto da un prompt.
  Questo HOWTO adopera "user%" quale prompt per i comandi che non
  richiedono privilegi di superutente, e "root#" come prompt per i
  comandi che necessitano di essere lanciati da `root'.  La scelta di
  usare "root#" anzich un semplice "#"  volta a prevenire confusioni
  con esempi tratti da script di shell, dove il segno "#"  usato per
  definire una linea di commento.


  Quando vengono indicate opzioni di compilazione del kernel, esse sono
  rappresentate nel formato usato da menuconfig. Dovrebbero risultare
  comprensibili anche a chi (come me) non ha confidenza con menuconfig.
  Nel caso ci siano dei dubbi con l'annidamento delle opzioni, lanciare
  una volta il programma suddetto non pu che essere d'aiuto.


  Da notare che ogni link ad altri HOWTO  locale per agevolare la
  navigazione all'interno della propria copia locale dei documenti LDP,
  ove si stia usando la versione html di questo documento.  In caso
  risulti mancante qualche documento, si sappia che qualunque HOWTO pu
  essere recuperato da sunsite.unc.edu (nella directory
  /pub/Linux/HOWTO) e dai suoi numerosi mirror.


  4.  Informazioni generali sul networking di Linux.


  4.1.  Una breve storia dello sviluppo del supporto di rete nel kernel
  Linux.

  Sviluppare partendo da zero un'implementazione della pila di
  protocolli tcp/ip dalle prestazioni buone quanto le altre
  implementazioni esistenti non  stato un lavoro semplice. La decisione
  di non basarsi su una delle implementazioni esistenti  stata presa in
  un momento in cui sembrava che le implementazioni esistenti sarebbero
  finite sotto una licenza pi restrittiva a causa della sentenza di
  U.S.L., e quando c'era tanto entusiasmo da volerlo fare diversamente
  dagli altri e magari anche meglio di quello che era stato gi fatto.

  Il primo volontario che ha guidato lo sviluppo del codice di rete nel
  kernel  stato Ross Biro <biro@yggdrasil.com>. Ross ha implementato un
  insieme di funzionalit semplice ed incompleto ma usabile per la
  maggior parte dei bisogni. Queste procedure erano distribuite insieme
  ad un driver per la scheda di rete WD-8003. Questo fu sufficiente a
  far s che molte persone iniziassero a provare e sperimentare il
  software, e alcuni riuscirono pure a connettere delle macchine ad
  internet con questa configurazione. Ma nel frattempo la richiesta di
  software di rete da parte della comunit Linux stava crescendo, cos
  che a un certo punto la domanda pressante che gravava su Ross ed il
  suo coinvolgimento personale in termini di tempo superarono a suo
  giudizio i vantaggi che ne derivavano. Ross lasci quindi il suo posto
  alla guida del gruppo di programmatori. Gli sforzi di Ross per far
  partire il progetto e la responsabilit che si era preso di produrre
  davvero qualcosa di utile nonostante la situazione fosse controversa,
  sono state le cose che hanno catalizzato tutto il lavoro futuro, e
  sono state perci una componente essenziale del successo del prodotto
  attuale.

  Orest Zborowski <obz@Kodak.COM> ha scritto la prima interfaccia di
  programmazione per i socket BSD all'interno del kernel Linux. Questo 
  stato un grande passo in avanti, e ha permesso di far funzionare sotto
  Linux molte delle applicazioni di rete esistenti senza cambiamenti
  notevoli.

  All'incirca nel medesimo momento Laurence Culhane
  <loz@holmes.demon.co.uk> ha sviluppato i primi driver per supportare
  il protocollo SLIP all'interno di Linux. Questo ha permesso a molte
  persone che non avevano accesso a reti di tipo Ethernet di provare il
  nuovo software di rete.  Ancora una volta, qualcuno prese questo
  driver e lo mise al lavoro per collegarsi ad Internet. Questa
  possibilit diede a molti un'idea delle possibilit che si sarebbero
  potute realizzare se Linux avesse avuto un supporto di rete completo,
  ed accrebbe il numero di utenti che provavano ed usavano il software
  esistente.

  Un'altra persona che ha lavorato attivamente nel compito di costruire
  il supporto per la rete  stata Fred van Kempen,
  <waltje@uwalt.nl.mugnet.org>.  Dopo un periodo di incertezza che aveva
  seguito l'abbandono di Ross dalla posizione di coordinatore dello
  sviluppo, Fred aveva offerto il suo tempo e le sue capacit e aveva
  accettato il ruolo senza alcuna opposizione.  Fred aveva dei piani
  ambiziosi per la direzione che il software di rete di Linux avrebbe
  dovuto prendere, e si prepar a progredire in queste direzioni. Fred
  ha prodotto una serie di programmi di rete chiamati `NET-2' che molte
  persone sono state in grado di usare proficuamente (il codice `NET'
  era quello di Ross). Fred ha introdotto un certo numero di innovazioni
  nell'agenda dello sviluppo, come l'interfaccia dinamica per le
  periferiche, il protocollo AX.25 per le radio amatoriali e
  un'implementazione del networking progettata pi modularmente.  Il
  codice NET-2 di Fred fu usato da un numero molto elevato di
  entusiasti, ed il loro numero cresceva in continuazione mentre si
  diffondeva la voce che questa implementazione funzionava bene. Il
  software di rete a questo punto esisteva ancora sotto forma di un
  ampio numero di modifiche da applicare alla distribuzione ufficiale
  del kernel, non essendo ancora stato incluso in tale distribuzione.  I
  documenti NET-FAQ e successivamente NET-2-HOWTO descrivevano la
  procedura (allora abbastanza complessa) per avere tutto quanto
  funzionante. L'impegno di Fred era volto allo sviluppo di innovazioni
  all'implementazione di rete convenzionale e questo gli prendeva tempo.
  La comunit di utenti stava diventando impaziente aspettando qualcosa
  che funzionasse in modo affidabile e che soddisfacesse l'80% degli
  utenti. Come era successo con Ross, la pressione su Fred come
  coordinatore del progetto crebbe considerevolmente.

  Alan Cox <iialan@www.uk.linux.org> propose una soluzione al problema
  che avrebbe dovuto risolvere le controversie. Egli propose di prendere
  il codice NET-2 di Fred e di sistemarlo, rendendolo affidabile e
  stabile cos da soddisfare gli utenti impazienti, nel contempo avrebbe
  alleggerito la pressione su Fred permettendogli di continuare il suo
  lavoro.  Alan si mise a far ci con un certo successo e la sua
  versione del codice di rete per Linux prese il nome di
  `Net-2D(ebugged)'. Il codice funzionava in maniera affidabile in molte
  configurazioni comuni e la base degli utenti era contenta. Alan
  chiaramente aveva idee e capacit proprie da mettere nel progetto e in
  molte delle discussioni relative alla direzione che il codice NET-2
  stava prendendo. Si svilupparono allora due diverse scuole di pensiero
  nella comunit Linux: una che seguiva la filosofia "farlo funzionare
  subito, migliorarlo in seguito" e un'altra che diceva "farlo meglio
  subito". Linus fece la parte dell'arbitro e incluse il codice di Alan
  nella distribuzione ufficiale del kernel. Questo pose Fred in una
  posizione difficile. Ogni sviluppo innovativo avrebbe mancato della
  larga base di utenti che testassero ed usassero attivamente il codice,
  e questo avrebbe significato un rallentamento e certe difficolt nello
  sviluppo. Fred continu a lavorare per un breve periodo e alla fine
  abbandon, cos Alan si trov ad essere il nuovo leader dello sviluppo
  del supporto di rete nel kernel di Linux.

  Donald Becker <becker@cesdis.gsfc.nasa.gov> ha rivelato presto le sue
  capacit negli aspetti di pi basso livello del networking, e ha
  prodotto un grosso campionario di driver per schede di rete: quasi
  tutte quelle incluse nei kernel attuali sono state sviluppate da
  Donald. Ci sono state altre persone che hanno contribuito in maniera
  significativa, ma il lavoro di Donald  stato notevole, per cui merita
  una menzione particolare.

  Alan ha continuato a migliorare il codice NET-2-Debugged per un certo
  tempo, mentre lavorava nell'implementazione di alcune delle cose nella
  lista delle priorit che non erano ancora state affrontate.  Prima che
  il sorgente del kernel 1.3.* diventasse maturo, il codice di rete nel
  kernel era passato alla distribuzione NET-3, sulla quale sono basate
  le versioni attuali. Alan ha lavorato su molti aspetti del codice di
  rete e ha migliorato il codice in molte direzioni con l'aiuto di un
  certo numero di altre persone di talento nella comunit Linux. Alan ha
  prodotto i dispositivi di rete dinamici e le prime implementazioni
  standard di AX.25 e IPX.  Alan ha continuato a giocare col codice,
  ristrutturandolo e migliorandolo lentamente fino allo stato in cui si
  trova oggi.

  Il supporto per PPP  stato aggiunto da Michael Callahan
  <callahan@maths.ox.ac.uk> e Al Longyear <longyear@netcom.com>. Anche
  questa  stata un'innovazione significativa per aumentare il numero di
  persone che usano Linux attivamente nel networking.

  Jonathon Naylor <jsn@cs.nott.ac.uk> ha contribuito migliorando in
  maniera significativa il codice AX.25 di Alan, aggiungendo il supporto
  per i protocolli NetRom e Rose. La capacit di usare AX.25, NetRom e
  Rose  un fatto significativo in se, poich nessun altro sistema
  operativo pu vantare il supporto nativo per tutti questi protocolli.

  Naturalmente, ci sono state altre centinaia di persone che hanno
  contribuito significativamente allo sviluppo del software di rete per
  Linux. Alcune di queste le incontrerete pi avanti nelle sezioni
  relative alle singole tecnologie, altre persone hanno fornito moduli,
  driver, correzioni di errori, suggerimenti, risultati di test e
  supporto morale. In ognuno di questi casi ciascuno pu dire di aver
  giocato la sua parte e di avere offerto quello che poteva. Il codice
  di rete del kernel  un esempio eccellente dei risultati che si
  possono ottenere dallo stile di lavoro anarchico della comunit Linux.
  Se questo non vi ha ancora meravigliato, lo far presto: lo sviluppo
  non si  fermato.


  4.2.  Dove trovare altre informazioni riguardo al Networking in Linux

  Ci sono vari posti in cui si possono trovare delle buone informazioni
  riguardo all'uso delle reti in Linux.

  Alan Cox, il coordinatore attuale del codice di rete nel kernel, ha
  una pagina WWW che contiene informazioni sullo stato attuale e sul
  nuovo sviluppo del supporto di rete per Linux. La sua pagina :
  www.uk.linux.org <http://www.uk.linux.org/NetNews.html>.

  Un'altra risorsa interessante  un libro scritto da Olaf Kirch,
  intitolato "Network Administrators Guide".  un lavoro del Linux
  Documentatation Project <http://sunsite.unc.edu/LDP/> e pu essere
  letto interattivamente presso Network Administrators Guide, versione
  HTML <http://sunsite.unc.edu/LDP/LDP/nag/nag.html>. Oppure pu essere
  scaricato tramite ftp in vari formati dall'archivio ftp dell'LDP su
  sunsite.unc.edu LDP ftp archive
  <ftp://sunsite.unc.edu/pub/Linux/docs/LDP/network-guide/>.  Il libro
  di Olaf  molto completo e fornisce una buona panoramica di alto
  livello della configurazione di rete sotto Linux.

  Esiste un newsgroup dedicato alla rete e argomente connessi nella
  gerarchia di gruppi relativi a Linux. : comp.os.linux.networking
  <news:comp.os.linux.networking>

  C' una mailing list alla quale ci si pu iscrivere, nella quale si
  possono chiedere informazioni a proposito del networking sotto Linux.
  Per iscriversi occorre mandare un messaggio di posta elettronica:


       To: majordomo@vger.rutgers.edu
       Subject: anything at all
       Message:

       subscribe linux-net




  Nelle varie reti IRC si trovano spesso dei canali #linux sui quali si
  possono trovare persone in grado di rispondere a domande
  sull'argomento.

  Ogni volta che si presenta un problema bisogna ricordare di includere
  il maggior numero possibile di dettagli riguardo ai problemi.  In
  particolare, occorre includere la versione del software che si sta
  usando, in particolare la versione del kernel, la versione dei
  programmi come pppd e dip, e la natura esatta del problema che si 
  verificato. Questo vuol dire prendere nota della sintassi esatta di
  ogni messaggio di errore ricevuto, e di tutti i comandi che si stanno
  invocando.


  4.3.  Dove trovare informazioni di rete non correlate a Linux

  Per chi sta cercando informazioni introduttive e pratiche sul
  networking tcp/ip in genere, io raccomando di dare un'occhiata ai
  seguenti documenti:


     tcp/ip introduction
        questo documento esiste sia in versione testo
        <ftp://athos.rutgers.edu/runet/tcp-ip-intro.doc> sia in versione
        postscript <ftp://athos.rutgers.edu/runet/tcp-ip-intro.ps>.

     tcp/ip administration
        questo documento esiste sia in versione testo
        <ftp://athos.rutgers.edu/runet/tcp-ip-admin.doc> sia in versione
        postscript <ftp://athos.rutgers.edu/runet/tcp-ip-admin.ps>.

  Per chi sta cercando informazioni pi dettagliate su tcp/ip raccomando
  caldamente:


       Internetworking with TCP/IP, Volume 1: principles, protocols
       and architecture, by Douglas E. Comer, ISBN 0-13-227836-7,
  Prentice Hall publications, Third Edition, 1995.


  [tradotto in italiano per Jackson Libri N.d.T.]

  Per chi vuole imparare come scrivere applicazioni di rete in un
  ambiente compatibile a Unix, raccomando altrettanto caldamente:



       Unix Network Programming, by W. Richard Stevens, ISBN
       0-13-949876-1, Prentice Hall publications, 1990.


  Una seconda edizione di questo libro sta per apparire sugli scaffali
  delle librerie; la nuova edizione  composta da tre volumi: sito web
  di Prentice-Hall <http://www.phptr.com/> per ulteriori informazioni.


  Si pu anche provare a guardare nel newsgroup comp.protocols.tcp-ip
  <news:comp.protocols.tcp-ip>.


  Una fonte importante di informazione prettamente tecnica riguardo a
  Internet e alla suite di protocolli tcp/ip sono gli RFC. RFC  un
  acronimo che significa `Request For Comment' ed  il modo
  convenzionale per pubblicare e documentare gli standard sui protocolli
  Internet. Ci sono svariati archivi di RFC, molti di questi sono siti
  ftp mentre altri forniscono accesso via WWW con un motore di ricerca
  che permette di cercare le parole chiave in un database associato agli
  RFC.

  Un possibile luogo ove trovare gli RFC  il database RFC di Nexor
  <http://pubweb.nexor.co.uk/public/rfc/index/rfc.html>.


  5.  Informazioni generali sulla configurazione di rete.

   piuttosto importante conoscere e capire le seguenti sottosezioni
  prima di provare a configurare in pratica la propria rete. Questi sono
  principi fondamentali che si applicano indipendentemente dall'esatta
  natura della rete che si intende costruire.


  5.1.  Da dove devo partire?

  Prima di iniziare a costruire o configurare la propria rete occorrono
  alcune cose. Le pi importanti di queste sono:


  5.1.1.  Sorgenti aggiornati del kernel.

  Siccome il kernel che si sta usando al momento potrebbe non avere
  ancora il supporto per i tipi di rete o di schede di interfaccia che
  si desidera usare, probabilmente occorrono i sorgenti del kernel, in
  modo da essere in grado di ricompilare il kernel con le opzioni
  appropriate.


  I sorgenti pi recenti si possono sempre ottenere da ftp.kernel.org
  <ftp://ftp.kernel.org/pub/linux/kernel>.

  Meglio ricordarsi che ftp.kernel.org viene seriamente sovraccaricato:
  un modo preferibile di ottenere i sorgenti aggiornati  scaricare le
  patch invece degli interi file sorgente in tar; meglio ancora cercare
  di utilizzare mirror del sito ftp principale, come ftp.funet.fi
  <ftp://ftp.funet.fi//mirrors/ftp.kernel.org/pub/linux/kernel>;
  ricordarsi inoltre che ogni sito Linux di solito fornisce sorgenti del
  kernel aggiornati.


  Normalmente i sorgenti del kernel saranno scompattati da tar nella
  directory /usr/src/linux. Per informazioni riguardo a come si
  applicano le modifiche (patch) e come si ricompila il kernel si legga
  Kernel-HOWTO <Kernel-HOWTO.html>.  Per informazioni su come si
  configurano i moduli del kernel si legga "Modules mini-HOWTO". Inoltre
  il file README che si trova nei sorgenti del kernel e la directory
  Documentation sono molto istruttivi per il lettore motivato.


  A meno di trovare indicazioni differenti, io consiglio di utilizzare
  la distribuzione stabile del kernel (quella con un numero pari come
  seconda cifra nel numero di versione). Le distribuzioni dei kernel di
  sviluppo (quelle con la seconda cifra dispari) possono presentare
  differenze strutturali o altri cambiamenti che possono causare
  problemi quando usati con altro software di sistema. Se non si 
  sicuri di essere in grado di risolvere questo tipo di problemi, anche
  considerando il rischio che ci siano altri errori nel software, allora
   bene non usare le versioni dispari.


  D'altra parte, alcune delle funzionalit ivi descritte sono state
  introdotte nel corso dello sviluppo dei kernel 2.1, per cui 
  necessario fare una scelta: si pu rimanere al 2.0, aspettando che
  esca il 2.2 e qualche distribuzione aggiornata e completa di ogni
  programma di supporto, o passare ai 2.1 ed aggiungere in proprio i
  vari programmi di supporto necessari per utilizzare al meglio le nuove
  funzionalit.  Al momento della stesura di questo paragrafo,
  nell'Agosto 1998,  gi stato rilasciato il 2.1.115 e si pensa che non
  manchi molto al rilascio del 2.2 [al momento della traduzione sono gi
  uscite alcune distribuzioni con i nuovi kernel 2.2, tra le quali
  Debian 2.1 N.d.T.].


  5.1.2.  Gli strumenti di rete aggiornati

  Gli strumenti di rete (i "network tools") sono i programmi che si
  usano per configurare le periferiche di rete di Linux. Questi
  programmi permettono per esempio di assegnare gli indirizzi alle
  periferiche e configurare l'instradamento.

  La maggior parte delle moderne distribuzioni di Linux contengono gi
  gli strumenti di rete, se perci si  installato il proprio sistema da
  una distribuzione senza aver ancora installato gli strumenti di rete,
  occorre farlo.

  Se il proprio sistema non  stato installato da una distribuzione,
  occorre recuperare i sorgenti e compilare i programmi da se. Questo
  non  difficile.

  Gli strumenti di rete sono attualmente distribuiti da Bernd Eckenfels
  e sono disponibili presso: ftp.inka.de
  <ftp://ftp.inka.de/pub/comp/Linux/networking/NetTools/>, sito che 
  presente in mirror anche su ftp.uk.linux.org
  <ftp://ftp.uk.linux.org/pub/linux/Networking/base/>.

  Occorre essere sicuri di scegliere la versione pi appropriata per il
  kernel che si intende usare e di seguire le istruzioni di
  installazione che si trovano nel pacchetto.

  Per installare e configurare la versione corrente al momento della
  stesura di questo documento occorre invocare i seguenti comandi:
               user% tar xvfz net-tools-1.33.tar.gz
               user% cd net-tools-1.33
               user% make config
               user% make
               root# make install





  Inoltre, se si intende configurare un firewall o utilizzare la
  possibilit di mascheramento dei pacchetti ("IP masquerading") occorre
  il comando  ipfwadm, la cui versione aggiornata si pu recuperare da:
  ftp.xos.nl <ftp:/ftp.xos.nl/pub/linux/ipfwadm>.  Ancora una volta,
  esistono diverse versioni del programma, e bisogna prendere la
  versione che meglio si adatta al proprio kernel.  Da notare che le
  funzionalit di firewall di Linux sono cambiate durante lo sviluppo
  dei 2.1. Quanto si dice si applica solo alle versioni 2.0 del kernel.

  Per installare e configurare la versione cui ho accesso in questo
  momento occorre invocare:



               user% tar xvfz ipfwadm-2.3.0.tar.gz
               user% cd ipfwadm-2.3.0
               user% make
               root# make install






  Notare che se si utilizza una versione 2.2 (o uno degli ultimi 2.1)
  del kernel, ipfwadm non  lo strumento giusto per configurare il
  Firewall IP. Questa versione del NET-3-HOWTO attualmente non si occupa
  della nuova configurazione del firewall.


  5.1.3.  Programmi Applicativi di Rete.

  Gli applicativi di rete sono i programmi come telnet e ftp, unitamente
  ai programmi server associati.  David Holland
  <dholland@cs.harvard.edu> coordina la distribuzione dei pi comuni di
  questi. Tale distribuzione si pu ottenere ftp.uk.linux.org
  <ftp://ftp.uk.linux.org/pub/linux/Networking/base>.

  Nel Marzo 1997 il pacchetto  stato suddiviso in pacchetti distinti
  pi piccoli, ma nel Maggio 1997 i programmi fondamentali sono stati
  incorporati in un pacchetto chiamato netkit-base-0.10.  Potrebbe
  essere necessario procurarsi il pacchetto di base e/o pacchetti
  addizionali.


  Per installare e configurare la versione corrente al momento della
  stesura di questo documento occorre invocare i seguenti comandi:









          user% tar xvfz netkit-base-0.10
          user% cd netkit-base-0.10
          user% more README
          user% vi MCONFIG
          user% make
          root# make install






  5.1.4.  Indirizzi.

  Gli indirizzi IP sono composti da 4 byte. La convenzione usata per
  scrivere gli indirizzi  chiamata `dotted decimal notation', che
  significa "notazione decimale con i punti". In questa forma ogni byte
   convertito in un numero decimale (tra 0 e 255) scartando gli zeri
  prefissi a meno che il numero sia zero, ogni byte  poi separato da un
  carattere `.'. Per convenzione ogni interfaccia di un calcolatore o
  router ha associato un indirizzo IP. In certe circostanze  permesso
  assegnare lo stesso indirizzo a tutte le interfacce di un singolo
  calcolatore, ma solitamente ogni interfaccia avr un indirizzo
  diverso.

  Le reti IP sono sequenze di indirizzi IP contigui. Tutti gli indirizzi
  all'interno di una rete hanno un certo numero di cifre del loro
  indirizzo in comune. La porzione di indirizzo comune all'interno della
  rete si chiama "network portion" (porzione di rete) dell'indirizzo.
  Le cifre rimanenti si chiamano "host portion". Il numero di bit che
  vengono condivisi tra tutti gli indirizzi all'interno della rete 
  chiamato "netmask" ed il suo ruolo  determinare quali indirizzi
  appartengono alla rete cui la maschera  applicata e quali no.
  Consideriamo il seguente esempio:



               -----------------  ---------------
               Host Address       192.168.110.23
               Network Mask       255.255.255.0
               Network Portion    192.168.110.
               Host portion                  .23
               -----------------  ---------------
               Network Address    192.168.110.0
               Broadcast Address  192.168.110.255
               -----------------  ---------------






  Ogni indirizzo sottoposto ad un'operazione di "AND bit-a-bit" con la
  sua maschera di rete dar l'indirizzo della rete cui appartiene.  La
  maschera di rete  perci sempre il numero pi basso all'interno
  dell'intervallo di indirizzi che formano quella rete, e ha sempre la
  parte di host dell'indirizzo pari a zero.

  L'indirizzo di broadcast  un indirizzo speciale cui tutti gli host
  della rete ascoltano, in aggiunta al loro proprio indirizzo.  Questo
  indirizzo  quello cui vengono mandati i pacchetti che devono essere
  ricevuti da tutti i calcolatori della rete. Certi tipi di dati, come
  le informazioni di instradamento e i messaggi di errore vengono
  trasmessi all'indirizzo di broadcast in modo che tutti i calcolatori
  sulla rete li possano ricevere contemporaneamente. Ci sono due
  standard comunemente usati su come debba essere un indirizzo di
  broadcast.  Il pi comunemente accettato stabilisce che debba essere
  usato come indirizzo di broadcast l'indirizzo pi alto possibile della
  rete.  Nell'esempio precedente questo sarebbe 192.168.110.255. Per
  qualche ragione alcuni siti hanno adottato la convenzione di usare
  l'indirizzo zero come indirizzo di broadcast.  In pratica non fa molta
  differenza quale viene usato, ma bisogna assicurarsi che ogni host
  sulla rete sia configurato con lo stesso indirizzo di broadcast.

  Per ragioni amministrative, ad un certo punto durante lo sviluppo
  iniziale del protocollo IP sono stati formati alcuni gruppi di
  arbitrari di indirizzi e le reti sono state raggruppate in quelle che
  sono chiamate classi. Le classi caratterizzano le dimensioni delle
  reti che si possono allocare.  Queste classi offrono un numero di
  dimensioni fisse di rete che possono essere allocate. Gli intervalli
  scelti per le varie classi sono:



               ----------------------------------------------------------
               | Network | Netmask       | Network Addresses            |
               | Class   |               |                              |
               ----------------------------------------------------------
               |    A    | 255.0.0.0     | 0.0.0.0    - 127.255.255.255 |
               |    B    | 255.255.0.0   | 128.0.0.0  - 191.255.255.255 |
               |    C    | 255.255.255.0 | 192.0.0.0  - 223.255.255.255 |
               |Multicast| 240.0.0.0     | 224.0.0.0  - 239.255.255.255 |
               ----------------------------------------------------------






  La scelta di quali indirizzi usare per la propria rete dipende da cosa
  esattamente si sta facendo. Per ottenere gli indirizzi di cui si ha
  bisogno si pu procedere in uno dei seguenti modi:

     Installare una macchina Linux su una rete IP esistente
        Se si desidera installare un calcolatore su una rete esistente
        si deve contattare chi amministra tale rete e chiedere loro le
        seguenti informazioni:


       L'indirizzo IP da assegnare al calcolatore

       L'indirizzo IP di rete

       L'indirizzo IP di broadcast

       La netmask

       L'indirizzo del router

       L'indirizzo del "name server".

        Dopo di che bisogna configurare l'interfaccia di rete Linux in
        base a quei numeri. Non  possibile inventare dei numeri e
        sperare che la configurazione funzioni.

     Costruire una rete nuova che non si connetter mai a Internet
        Se si sta preparando una rete privata e non si ha intenzione
        nemmeno in futuro di connettere tale rete ad Internet, allora si
        pu scegliere qualunque indirizzo. Ciononostante, per ragioni di
        sicurezza e di coerenza ci sono alcuni indirizzi di reti IP che
        sono stati riservati specificamente a questo fine.  Essi sono
        specificati nell'RFC1597 come segue:
                  -----------------------------------------------------------
                  |         RESERVED PRIVATE NETWORK ALLOCATIONS            |
                  -----------------------------------------------------------
                  | Network | Netmask       | Network Addresses             |
                  | Class   |               |                               |
                  -----------------------------------------------------------
                  |    A    | 255.0.0.0     | 10.0.0.0    - 10.255.255.255  |
                  |    B    | 255.255.0.0   | 172.16.0.0  - 172.31.255.255  |
                  |    C    | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 |
                  -----------------------------------------------------------





     Occorre innanzitutto decidere quanto grande deve essere la nuova
     rete, e poi scegliere gli indirizzi di cui si ha bisogno.


  5.2.  Dove bisogna mettere i comandi di configurazione?

  Ci sono  differenti approcci sotto Linux per le procedure di
  inizializzazione del sistema. Dopo che il kernel  partito, viene
  sempre eseguito un programma chiamato `init'. Il programma init poi
  legge il suo file di configurazione chiamato /etc/inittab ed inizia il
  processo di boot.  Esistono versioni di init leggermente differenti,
  quantunque si stia convergendo verso lo stile System V (Five),
  sviluppato da Miguel van Smoorenburg.

  Malgrado il fatto che il programma init sia sempre lo stesso, la
  configurazione di boot del sistema  organizzata in modi diversi nelle
  varie distribuzioni.

  Solitamente il file /etc/inittab contiene una voce che assomiglia a:



               si::sysinit:/etc/init.d/boot





  Questa riga specifica il nome dello script di shell che gestisce
  praticamente la sequenza di boot. Questo file  in qualche modo simile
  al file AUTOEXEC.BAT in DOS.

  Di solito ci sono altri script che vengono chiamati dallo script di
  inizializzazione, e spesso la rete  configurata all'interno di uno di
  questi.

  La seguente tabella pu essere usata come guida per il proprio
  sistema:



       --------------------------------------------------------------------
       Distrib. | Interface Config/Routing          | Server Initialization
       --------------------------------------------------------------------
       Debian   | /etc/init.d/network               | /etc/rc2.d/*
       --------------------------------------------------------------------
       Slackware| /etc/rc.d/rc.inet1                | /etc/rc.d/rc.inet2
       --------------------------------------------------------------------
       RedHat   | /etc/rc.d/init.d/network          | /etc/rc.d/rc3.d/*
       --------------------------------------------------------------------

  Si noti che Debian e Red Hat usano un'intera directory per ospitare
  gli script che attivano i servizi di sistema. Gli script di solito non
  contengono al loro interno le informazioni di configurazione
  necessarie. Ad esempio nei sistemi RedHat gli script di
  inizializzazione (boot script) si aspettano di trovarle nei file
  presenti in /etc/sysconfig. Se si vogliono comprendere i dettagli del
  processo di boot, suggerisco di dare un occhiata a /etc/inittab e alla
  documentazione associata a init.  Linux Journal sta per pubblicare un
  articolo sulla inizializzazione del sistema, e a questo documento
  verr aggiunto un puntatore ad esso non appena sar disponibile sul
  web.


  La maggior parte delle distribuzioni moderne includono un programma
  che permette di configurare la maggior parte dei tipi diffusi di
  interfacce di rete. Se si ha una di queste, allora bisognerebbe
  controllare se tale programma fa quello di cui si ha bisogno prima di
  tentare una configurazione manuale.



               -----------------------------------------
               Distrib   | Network configuration program
               -----------------------------------------
               RedHat    | /usr/bin/netcfg
               Slackware | /sbin/netconfig
               -----------------------------------------






  5.3.  Creazione delle interfacce di rete.

  In molti sistemi Unix le periferiche di rete hanno il loro posto nella
  directory /dev. Questo non succede in Linux, dove i dispositivi di
  rete sono creati dinamicamente via software e quindi non hanno bisogno
  della presenza di file speciali.

  Nella maggior parte dei casi i dispositivi di rete sono creati
  automaticamente dal driver durante la sua inizializzazione dopo che
  l'hardware  stato riconosciuto. Per esempio, il driver per la rete
  ethernet crea le interfacce eth[0..n] sequenzialmente, nell'ordine in
  cui le schede ethernet vengono riconosciute. La prima scheda che viene
  trovata prende il nome eth0, la seconda eth1, eccetera.

  Ciononostante in alcuni casi, come succede per slip e ppp, i
  dispositivi di rete vengono creati a seguito di operazioni svolte da
  un programma. Si applica la stessa regola di numerazione sequenziale,
  ma le periferiche non sono create automaticamente all'accensione del
  sistema.  La ragione di questo  che, a differenza di quello che
  accade per le schede ethernet, il numero di periferiche slip o ppp pu
  cambiare durante la vita della macchina. Questi casi vengono
  analizzati in maggior dettaglio nelle sezioni successive.


  5.4.  Configurazione delle interfacce di rete.

  Dopo aver recuperato tutti i programmi di cui si ha bisogno e tutti
  gli indirizzi e le informazioni sulla rete, si pu procedere alla
  configurazione delle proprie interfacce di rete. Quando si parla di
  configurazione dell'interfaccia si intende il processo di assegnazione
  degli indirizzi appropriati alla periferica e all'assegnazione di
  valori appropriati per gli altri valori configurabili di un
  dispositivo di rete. Il programma pi comunemente usato per questo
  compito  il comando ifconfig (interface configure).

  Normalmente viene invocato un comando simile al seguente:



               root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up






  In questo esempio si  configurata una scheda ethernet `eth0' con
  l'indirizzo IP `192.168.0.1' e una maschera pari a `255.255.255.0'.
  La parola `up' finale significa che l'interfaccia deve essere
  attivata, ma pu di solito essere omessa, dato che  l'opzione di
  default.

  Il kernel assume alcuni valori di default quando un'interfaccia viene
  configurata. Per esempio, si pu specificare l'indirizzo di rete e
  quello di broadcast per un'interfaccia, ma se questo non viene fatto,
  come nell'esempio precedente, il kernel far delle scelte ragionevoli
  per i valori da assegnare in base alla maschera di rete fornita; se
  non viene fornita una maschera di rete si baser sulla classe della
  rete associata all'indirizzo IP. Nell'esempio appena visto il kernel
  assegner un indirizzo di rete `192.168.0.0' e un indirizzo di
  broadcast `192.168.0.255' in base alla netmask specificata nel
  comando.

  Si possono passare al comando ifconfig molte altre opzioni. Le pi
  importanti di queste sono:


     up questa opzione attiva l'interfaccia (ed  l'impostazione di
        default).


     down
        questa opzione la disattiva.


     [-]arp
        questa opzione abitita o disabilita l'uso del protollo ARP
        ("Address Resulution Protocol") per questa interfaccia.


     [-]allmulti
        questa opzione abilita o disabilita la ricezione di tutti i
        pacchetti multicast. Il multicast permette di associare speciali
        indirizzi hardware di destinazione a gruppi di calcolatori, in
        modo che tutti gli appartenenti al gruppo ricevano certi
        pacchetti. Questa opzione pu essere importante se si usano
        applicazioni come la videoconferenza ma normalmente non viene
        usata.


     mtu N
        questo parametro permette di assegnare il valore MTU ("Maximum
        Transfer Unit") per questa periferica.


     netmask addr
        questo parametro permette di specificare la maschera relativa
        alla rete cui questa interfaccia appartiene.

     irq addr
        questo parametro funziona solo con certi tipi di hardware e
        permette di scegliere la linea interruzione usata dall'hardware
        di questa interfaccia.


     [-]broadcast [addr]
        questo parametro permette di abilitare la ricezione di pacchetti
        di broadcast e assegna l'indirizzo di broadcast per questa
        interfaccia, oppure disabilita la ricezione di tali pacchetti.


     [-]pointopoint [addr]
        questo parametro permette di assegnare l'indirizzo della
        macchina che sta all'altro capo di una connessione punto-a-
        punto, come accade per slip e ppp.


     hw <type> <addr>
        questo parametro permette di assegnare l'indirizzo hardware di
        certi tipi di schede di rete. Questo  spesso inutile per per le
        interfaccie ethernet, ma  comodo per altri tipi di rete, come
        AX.25.


  Il comando ifconfig pu essere usato per agire su tutte le interfacce
  di rete. Alcuni programmi utente come pppd e dip configurano
  automaticamente le periferiche di rete quando le creano, e in questi
  casi l'uso manuale di ifconfig diventa inutile.


  5.5.  Configurazione del risolutore dei nomi (name resolver).

  Il `Name Resolver' fa parte della libreria standard di Linux.  La sua
  funzione principale  quella di fornire un servizio che converta i
  nomi dei calcolatori, quelli comprensibili all'uomo come
  `ftp.funet.fi', in indirizzi comprensibili alle macchine, come
  128.214.248.6.


  5.5.1.  Cosa compone un nome?

  Anche chi ha familiarit con i nomi degli host che costituiscono
  Internet potrebbe non comprendere come sono costituiti. I nomi di
  dominio (domain name) di Internet sono inerentemente gerarchici, hanno
  cio una struttura ad albero.  Un `dominio' (domain)  una famiglia,
  un gruppo di nomi. Un dominio pu essere suddiviso in vari
  `sottodomini'. Un `dominio pricipale' (toplevel domain)  un dominio
  che non  un sottodominio.  I domini principali sono specificati
  nell'RFC 920. I domini principali pi comuni sono:


     COM
        Organizzazioni commerciali

     EDU
        Organizzazioni educative

     GOV
        Organizzazioni governative

     MIL
        Organizzazioni militari

     ORG
        Altre organizzazioni
     NET
        Organizzazioni connesse a Internet

     Identificativo nazionale
        questi sono codici di due lettere che rappresentano la nazione.


  Per ragioni storiche la maggior parte dei domini che appartengono ai
  domini principali non nazionali sono stati usati da organizzazioni con
  sede negli Stati Uniti, malgrado gli Stati Uniti abbiano anche un
  proprio dominio nazionale `.us'. Questo non  pi vero per i domini
  .com and .org, che vengono comunemente usati da societ e
  organizzazioni non statunitensi.


  Ognuno di questi domini pricipali ha i suoi sottodomini. I domini
  principali basati sui nomi di nazione sono spesso suddivisi in
  sottodomini come com, edu, gov, mil e org.  Questo non succede in
  Italia, ma per esempio esistono i sottodomini com.au e gov.au per le
  organizzazioni commerciali e governative in Australia; da notare che
  questa non  una regola generale, dato che le linee effettive di
  condotta dipendono dalle autorit che gestiscono a livello locale
  l'assegnazione dei nomi.


  Il livello successivo di divisione spesso rappresenta il nome
  dell'organizzazione. I sottodomini ulteriori possono essere di diversa
  natura; spesso il livello successivo  basato sulla suddivisione
  interna della organizzazione, ma pu essere basato su qualsiasi
  criterio che sia considerato ragionevole  e significativo all'interno
  dell'organizzazione.


  La parte pi a sinistra del nome  sempre il nome univocamente
  assegnato ad un calcolatore, e si chiama `hostname'. La parte di nome
  che sta alla destra del "hostname" si chiama `domainname', e il nome
  completo si chiama `Fully Qualified Domain Name', abbreviato FQDN.

  Usando l'host di Terry come esempio, il FQDN 
  `perf.no.itg.telstra.com.au'. Questo significa che il suo "hostname" 
  `perf', e il "domain name"  `no.itg.telstra.com.au'.  Il suo "domain
  name"  composto da un dominio principale basato sul nome della sua
  nazione, l'Australia, e poich il suo indirizzo di posta elettronica
  appartiene ad un organizzazione commerciale c' `.com' come
  sottodominio.  Il nome della compagnia  (era) `telstra', e la sua
  struttura di nomi interna  basata sulla struttura gestionale, in
  questo caso il calcolatore appartiene al gruppo di tecnologia delle
  informazioni (Information Technology Group), sezione operazioni di
  rete (Network Operations).


  Di solito, i nomi sono un po' pi brevi; ad esempio il mio ISP
  (Internet Service Provider = fornitore di accesso a internet) si
  chiama `systemy.it' e la mia organizzazione senza scopo di lucro si
  chiama `linux.it', senza nessun sottodominio com e org , cos che il
  mio host personale si chiama `morgana.systemy.it' e rubini@linux.it 
  un indirizzo di posta elettronica valido.  Da notare che chi
  amministra un dominio pu registrare nomi di singoli host come anche
  sottodomini; ad esempio il LUG a cui appartengo usa il dominio
  pluto.linux.it, poich i titolari di linux.it hanno acconsentito a
  creare un sottodominio per il LUG.





  5.5.2.  Quali informazioni sono necessarie.

  Per accedere al servizio di risoluzione dei nomi occorre sapere a
  quale dominio appartiene il proprio calcolatore.  Il software di
  risoluzione dei nomi offre il servizio di traduzione dei nomi facendo
  delle richieste ad un `Domain Name Server' (di solito chiamato
  semplicemente `name server'), per cui occorre anche conoscere
  l'indirizzo di un name server locale che offra questo servizio.

  Per configurare il proprio calcolatore occorre sistemare tre file, che
  descriver uno alla volta.


  5.5.3.  /etc/resolv.conf

  Il file /etc/resolv.conf  il file di configurazione principale per
  accedere al servizio di risoluzione dei nomi. Il suo formato 
  abbastanza semplice: si tratta di un file di testo con una parola
  chiave (direttiva) per linea. Le direttive comunemente usate sono tre:


     domain
        questa direttiva specifica il nome del dominio locale.

     search
        questa direttiva specifica una lista di domini da consultare in
        alternativa.

     nameserver
        questa direttiva, che pu essere usata pi di una volta,
        specifica l'indirizzo IP di un name server a cui rivolgersi per
        la risoluzione dei nomi.


  Per esempio, /etc/resolv.conf potrebbe essere qualcosa di simile a:


               domain maths.wu.edu.au
               search maths.wu.edu.au wu.edu.au
               nameserver 192.168.10.1
               nameserver 192.168.12.1






  Questo esempio specifica che il dominio di default da usare per i nomi
  non qualificati (cio gli hostname senza un dominio associato) 
  maths.wu.edu.au, e che se l'host non viene trovato in quel dominio
  bisogna provare direttamente anche il dominio wu.edu.au.  Il file
  specifica anche due name server, ciascuno dei quali pu essere
  consultato dal software di risoluzione per risolvere un nome.


  5.5.4.  /etc/host.conf

  Il file /etc/host.conf  quello dove si dichiarano alcuni elementi che
  governano il comportamento del codice di risoluzione dei nomi.  Il
  formato di questo file  descritto in dettaglio nella pagina del
  manuale di `resolv+'. In quasi tutti i casi queste due linee sono
  tutto quello che serve:




          order hosts,bind
          multi on






  Questa configurazione dice al codice di risoluzione dei nomi di
  controllare il file /etc/hosts prima di tentare una ricerca attraverso
  un name server, e dice di ritornare tutti gli indirizzi definiti per
  un host descritto in /etc/hosts, invece che ritornare solo il primo.


  5.5.5.  /etc/hosts

  Il file /etc/hosts  quello che contiene i nomi e gli indirizzi IP dei
  calcolatori locali.  Se un host appare in questo file non occorre
  interrogare un name server per conoscere il suo indirizzo IP.  Lo
  svantaggio di questo tipo di approccio  che occorre aggiornare questo
  file ogniqualvolta l'indirizzo IP relativo ad un calcolatore cambia.
  Solitamente, in un sistema ben gestito le uniche voci che appaiono in
  questo file sono una per l'interfaccia di loopback e una per il nome
  del calcolatore stesso.



               # /etc/hosts
               127.0.0.1      localhost loopback
               192.168.0.1    this.host.name






   possibile specificare pi di un nome di calcolatore per linea, come
  dimostrato dalla prima voce qui sopra, che  il modo convenzionale per
  dare un nome all'interfaccia di loopback.


  5.5.6.  Attivare un name server

  Se si desidera far girare un name server locale, lo si pu fare
  facilmente. Si prega di fare riferimento al DNS-HOWTO <DNS-HOWTO.html>
  e a ogni documento incluso nella propria versione di BIND (Berkeley
  Internet Name Domain).


  5.6.  Configurazione dell'interfaccia di loopback.

  L'interfaccia `loopback'  un tipo speciale di interfaccia che
  permette ad un calcolatore di effettuare connessioni con se stesso. Ci
  sono diversi motivi per cui capita di aver bisogno di farlo; per
  esempio quando occorre verificare il funzionamento di programmi di
  rete senza interferire con nessun altro sulla rete. Per convenzione 
  stato assegnato all'interfaccia di loopback l'indirizzo IP
  `127.0.0.1'. Perci, indipendentemente dal calcolatore sul quale si
  lavora, se si apre una connessione telnet a 127.0.0.1 si raggiunger
  sempre la macchina da cui si  partiti.

  La configurazione dell'interfaccia di loopback  semplice, ed  una
  cosa che bisogna assicurarsi di fare (ma da notare che di solito tale
  compito  svolto dagli script standard di inizializzazione).


               root# ifconfig lo 127.0.0.1
               root# route add -host 127.0.0.1 lo






  Il comando route verr trattato pi estesamente nella prossima
  sezione.


  5.7.  Routing.

  Il "routing", ovvero le questioni relative all'instradamento dei
  pacchetti, costituisce un argomento ampio. Si possono facilmente
  scrivere grossi libri su queste tematiche. La maggior parte delle
  persone, comunque, hanno necessit di instradamento abbastanza
  semplici, mentre poche altre hanno esigenze pi complicate. Tratter
  qui solo i concetti fondamentali dell'instradamento dei pacchetti.
  Suggerisco a chi  interessato ad avere informazioni pi dettagliate
  di consultare i manuali elencati all'inizio di questo documento.

  Inizierei con una definizione. Cos' l'instradamento IP? Questa  la
  definizione che uso io:



       L'instradamento IP (routing)  il procedimento attraverso il
       quale un calcolatore con connessioni di rete multiple decide
       dove trasmettere i pacchetti IP che ha ricevuto.



  Potrebbe essere utile illustrare questa definizione con un esempio.
  Immaginiamo un tipico router in un ufficio, che abbia una connessione
  PPP verso Internet, un certo numero di segmenti ethernet che collegano
  le postazioni locali e un secondo collegamento PPP verso un altro
  ufficio.  Quando il router riceve un pacchetto da una qualsiasi delle
  sue connessioni di rete, il meccanismo usato per determinare su quale
  interfaccia deve essere spedito il pacchetto  proprio il routing.
  Anche gli host pi semplici hanno bisogno di instradare i pacchetti,
  tutti gli host di Internet hanno infatti due interfacce di rete: una 
  quella di loopback descritta prima e l'altra  queslla usata per
  comunicare col resto della rete; questa pu essere una ethernet oppure
  un collegamento su porta seriale PPP o SLIP.

  Bene, ma come funziona l'instradamento? Ogni host mantiene una lista
  di regole di instradamento, chiamata "routing table". Questa tabella
  contiene delle voci che sono in genere formate da almeno tre campi: il
  primo  l'indirizzo di destinazione, il secondo  il nome
  dell'interfaccia attraverso la quale instradare il pacchetto, e il
  terzo  l'indirizzo IP opzionale di un'altra macchina che si incarichi
  di decidere il prossimo passo che il pacchetto deve fare attraverso la
  rete. In Linux la tabella di instradamento pu essere visualizzata
  usando il seguente comando:



               user% cat /proc/net/route






  oppure uno dei seguenti:



               user% /sbin/route -n
               user% /bin/netstat -r






  Il procedimento di instradamento  abbastanza semplice: viene ricevuto
  un pacchetto, viene esaminato il suo indirizzo di destinazione (a chi
   destinato quel pacchetto) e tale indirizzo viene confrontato con
  tutte le voci della tabella. La voce che meglio rispecchia l'indirizzo
  di destinazione viene poi usata per la ritrasmissione del pacchetto,
  attraverso l'interfaccia specificata dalla voce. Se poi il campo
  `gateway' di questa voce  valido il pacchetto viene passato a tale
  host attraverso l'interfaccia specificata; in caso contrario si assume
  che l'indirizzo di destinazione sia sulla rete connessa
  all'interfaccia scelta.

  Per manipolare la tabella esiste un comando specifico. Questo comando
  riceve degli argomenti sulla linea di comando e li converte in
  chiamate di sistema che richiedono al kernel di aggiungere, rimuovere
  o modificare le voci della tabella di routing. Tale comando si chiama
  `route'.

  Passiamo ora ad un semplice esempio, immaginando che voi siate
  connessi ad una ethernet e che vi sia stato detto che la rete  una
  classe C con indirizzo 192.168.1.0; immaginiamo inoltre che
  l'indirizzo 192.168.1.10 sia stato assegnato alla vostra macchina, e
  che 192.168.1.1 sia il router connesso al resto di Internet.

  Il primo passo da fare  configurare l'interfaccia come descritto in
  precedenza. A questo fine si user un comando tipo:



               root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up






  Adesso occorre aggiungere nella tabella di routing una voce che dica
  al kernel che tutti i pacchetti destinati a calcolatori con indirizzi
  del tipo 192.168.1.* devono essere spediti sull'interfaccia ethernet.
  Il comando per dire ci sar:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0





  Si noti l'uso dell'argomento `-net', che dice al programma "route" che
  questa voce si riferisce ad un'intera rete. L'altra possibilit 
  quella di specificare una regola di tipo `-host', cio una regola di
  instradamento specifica ad un singolo indirizzo IP.


  La regola di instradamento appena mostrata  quella che permette di
  stabilire connessioni con tutti gli host del proprio segmento
  ethernet.  Ma come si fa a connettersi a tutte le macchine che non
  sono sul proprio ramo ethernet?

  Dover aggiungere regole di instradamento per tutte le possibili reti
  sarebbe un lavoro molto difficile; perci esiste un trucco per
  semplificare questo compito. Il trucco si chiama "regola di
  instradamento di `default'".  La regola "di default" si riferisce a
  tutti gli indirizzi di destinazione, ma in modo "blando", cosicch se
  esiste un'altra voce nella tabella che si riferisce all'indirizzo di
  destinazione del pacchetto, questa voce verr usata al posto di quella
  di default.  L'idea della regola di default  semplicemente quella di
  dire "e tutto il resto deve andare qui".  Nell'esempio di cui ci
  stiamo occupando si user un comando come:



               # route add default gw 192.168.1.1 eth0






  L'argomento `gw' dice al comando `route' che l'argomento seguente 
  l'indirizzo numerico, o il nome, di una macchina che fa da gateway, o
  router, cui devono essere spediti tutti i pacchetti ai quali questa
  regola si applica, ai fini di un ulteriore instradamento.

  Perci, la vostra configurazione completa sar:



               root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# route add default gw 192.168.1.1 eth0






  Guardando attentamente i file di configurazione di rete che si trovano
  sulle macchine Linux troverete che almeno uno di essi sar molto
  simile a quello appena mostrato. Questo tipo di configurazione  molto
  diffuso.

  Vediamo ora una configurazione dell'instradamento leggermente pi
  complicata. Immaginiamo di configurare il router che abbiamo visto
  prima, quello con la connessione PPP verso Internet e i segmenti
  ethernet verso i calcolatori nell'ufficio. Immaginiamo che il router
  abbia tre segmenti ethernet e un collegamento PPP. La nostra
  configurazione di routing sar qualcosa come:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# route add -net 192.168.2.0 netmask 255.255.255.0 eth1
               root# route add -net 192.168.3.0 netmask 255.255.255.0 eth2
               root# route add default ppp0





  Ognuna delle workstation sulla rete locale user la forma pi semplice
  presentata prima, solo il router deve specificare separatamente le
  informazioni relativa a ciascun tratto della rete locale, perch per
  le workstation il meccanismo della regola di default si occuper di
  tutte le sottoreti, lasciando al router il compito di suddividere
  correttamente i pacchetti. Ci si pu chiedere perch la regola di
  default appena vista per il router non specifichi un `gw'. La ragione
   semplice: i protocolli su linea seriale come PPP e SLIP hanno sempre
  e solo due calcolatori sulla loro "rete": uno ad ogni estremo.
  Specificare il calcolatore che si trova all'altro estremo del cavo
  come `gateway'  inutile e ridondante, poich non esistono altre
  possibilit, e per questo motivo non occorre esplicitare il gateway
  per questo tipo di connessioni. Altri tipi di rete, come ethernet,
  arcnet o token ring, richiedono invece che si specifichi il numero del
  gateway, poich queste reti permettono a molti calcolatori di essere
  collegati insieme.


  5.7.1.  Allora a cosa serve il programma routed?

  La configurazione di routing descritta fino adessso si applica bene a
  situazioni di rete semplici, dove c' sempre solo un singolo percorso
  possibile per una data destinazione. Se la propria rete  pi
  complessa, le cose diventano pi complicate. Fortunatamente per la
  maggior parte delle persone questo non  un problema.

  Il problema principale con il cosiddetto `instradamento manuale' o
  `instradamento statico' come quello appena descritto  che se un
  calcolatore o un collegamento all'interno della propria rete smette di
  funzionare, l'unico modo (se possibile) per dirigere i pacchetti su di
  un'altra strada consiste nell'intervenire a mano ed eseguire i comandi
  appropriati. Naturalmente questo  impegnativo, lento, poco pratico e
  rischia di fallire. Sono state sviluppate varie tecniche per
  correggere automaticamente le tabelle di routing in caso di problemi
  sulla rete quando ci siano percorsi alternativi. Tutte queste tecniche
  sono raggruppate sotto il nome di "protocolli dinamici di
  instradamento".

  Pu essere capitato a tutti di sentir nominare i protocolli dinamici
  pi usati. I pi comuni probabilmente sono RIP (Routing Information
  Protocol) e OSPF (Open Shortest Path First).  Il protocollo RIP 
  molto comune nelle reti piccole, come le reti di organizzazioni di
  dimensione medio-piccola, o reti situate in un unico edificio. OSPF 
  pi moderno e pi in grado di gestire grosse configurazioni di rete, e
  pure pi adatto ad ambienti dove esistono molti percorsi possibili
  attraverso la rete.  Le implementazioni pi diffuse di questi
  protocolli sono `routed' (per RIP), e `gated' (per RIP, OSPF e altri
  protocolli). Il programma `routed' di solito fa parte delle
  distribuzioni di Linux, oppure si pu trovare incluso nel pacchetto
  `NetKit' descritto all'inizio.

  Un esempio di dove e quando serva usare un protocollo di instradamento
  dinamico potrebbe somigliare al seguente:













      192.168.1.0 /                         192.168.2.0 /
         255.255.255.0                         255.255.255.0
       -                                     -
       |                                     |
       |   /-----\                 /-----\   |
       |   |     |ppp0   //    ppp0|     |   |
  eth0 |---|  A  |------//---------|  B  |---| eth0
       |   |     |     //          |     |   |
       |   \-----/                 \-----/   |
       |      \ ppp1             ppp1 /      |
       -       \                     /       -
                \                   /
                 \                 /
                  \               /
                   \             /
                    \           /
                     \         /
                      \       /
                       \     /
                    ppp0\   /ppp1
                       /-----\
                       |     |
                       |  C  |
                       |     |
                       \-----/
                          |eth0
                          |
                     |---------|
                     192.168.3.0 /
                        255.255.255.0





  Ci sono qui tre router: A, B e C. Ognuno di essi  connesso ad una
  ethernet che porta una rete di classe C (netmask 255.255.255.0).  Ogni
  router ha anche una connessione PPP verso ognuno degli altri due
  router. La rete forma un triangolo.

  Dovrebbe essere chiaro che la tabella di routing per il router A
  dovrebbe essere presente qualcosa come:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# route add -net 192.168.2.0 netmask 255.255.255.0 ppp0
               root# route add -net 192.168.3.0 netmask 255.255.255.0 ppp1






  Questa situazione funzionerebbe bene, finch non si interrompesse il
  collegamento tra il router A e il router B. Se la connessione si
  interrompe, la tabella di instradamento mostrata non permetterebbe ai
  calcolatori sul segmento ethernet A di raggiungere calcolatori sul
  segmento B, perch i loro pacchetti sarebbero rediretti da A sulla
  connessione ppp0, che  momentaneamente caduta. I calcolatori sulla
  rete A possono comunque continuare a parlare ai calcolatori sulla rete
  C, e questi ultimo possono continuare a parlare con i calcolatori
  sulla rete B, poich il collegamento tra B e C  ancora funzionante.

  Ma allora, se A pu parlare a C, e C pu ancora parlare a B, perch
  non potrebbe A mandare i suoi pacchetti a B attraverso C?  Questo 
  esattamente il tipo di problemi che viene affrontato dai protocolli
  dinamici come RIP. Se ognuno dei router A, B e C facesse girare un
  programma demone di instradamento, allora le loro tabelle di routing
  sarebbero corrette automaticamente per riflettere in nuovo stato della
  rete ogniqualvolta uno dei collegamenti della rete si interrompesse.
  Configurare questa rete  semplice: occorre fare solo due cose su
  ognuno dei router. In questo caso, per A bisogna invocare:



               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               root# /usr/sbin/routed






  Il demone `routed' trova automaticamente le interfacce di rete attive
  nel momento in cui viene invocato, e successivamente manda dei
  messaggi e ascolta le risposte su ogni interfaccia di rete, in modo da
  poter determinare la routing table ed aggiornarla.

  Questo termina la breve spiegazione dell'instradamento dinamico e dove
   il caso di usarlo. Se si vogliono pi informazioni al proposito
  occorre riferirsi alle fonti di informazione elencate all'inizio di
  questo documento.

  I punti importanti relativi all'instradamento dinamico sono:


  1.  necessario eseguire un demone per gestire un protocollo di
     instradamento dinamico solo quando la propria macchina Linux ha la
     possibilit di selezionare tra piu d'un percorso possibile per una
     stessa destinazione.


  2. Il programma di instradamento dinamico modifica automaticamente la
     tabella di intradamento perch rispecchi i cambiamenti della rete.


  3. RIP ben si presta alla gestione di reti piccole e medie.



  5.8.  Configurazione dei servizi di rete e dei programmi server.

  I programmi "server" ed i servizi di rete sono quei programmi che
  permettono ad un utente remoto di utilizzare la macchina Linux locale.
  I programmi server attendono le connessioni entranti su di una porta
  di rete.  Le porte sono un mezzo per indirizzare un particolare
  servizio su di un particolare calcolatore e sono il modo in cui un
  calcolatore server pu distinguere tra una connessione entrante di
  tipo telnet ed una di tipo ftp.  L'utente remoto stabilisce una
  connessione di rete con la macchina server e il programma server
  (anche detto "daemon" di rete) che sta attendendo una connessione su
  quella porta accetta la connessione ed inizia a funzionare.  Ci sono
  due modi di utilizzare i servizi di rete, entrambi usati comunemente
  nella pratica. Questi modi sono:




     standalone (da solo)
        . Il programma di rete ascolta una porta specifica di rete e
        quando avverte una connessione in ingresso la gestisce da solo
        per fornire il servizio richiesto.



     dipendente dal server inetd
        Il server inetd  un programma-demone speciale di rete che si
        occupa di gestire le connessioni in ingresso. inetd fa uso di un
        file di configurazione che gli dice quale programma deve essere
        invocato quando viene ricevuta una connessione entrante su una
        particolare porta. Una porta pu essere configurata per entrambi
        i protocolli, tcp o udp. Le porte stesse sono descritte in un
        altro file, di cui si parler presto.



  Ci sono due file importanti che occorre configurare per usare inetd:
  /etc/services assegna dei nomi simbolici ai numeri delle porte, mentre
  /etc/inetd.conf  il file di configurazione per il programma inetd.


  5.8.1.  /etc/services

  Il file /etc/services  un semplice database che associa ad ogni
  numero di porta comprensibile alla macchina un nome comprensibile
  all'uomo. Il suo formato  molto semplice: il file  un testo ciascuna
  riga del quale rappresenta una voce del database. Ogni voce  composta
  da tre campi separati da un numero qualunque di spazi bianchi (spazi o
  caratteri `tab'). I campi sono:



    nome      porta/protocollo     alias       # commento









     nome
         una singola parola che rappresenta il servizio che si sta
        descrivendo.




     porta/protocollo
        questo campo  diviso in due sottocampi.




        porta
           un numero che specifica il numero di porta sulla quale il
           servizio  reso disponibile. La maggior parte dei servizi
           comunemente usati hanno un numero assegnato loro.  Questi
           numeri sono descritti nel RFC-1340.



        protocollo
           questo sottocampo  o "tcp" o "udp".


         importante notare che un valore pari a 18/tcp  molto
        differente da 18/udp e che non ci sono ragioni tecniche per cui
        un servizio debba esistere su entrambe le porte. Normalmente si
        usa il buon senso, e il database contiene entrambe le voci solo
        se un servizio  disponibile sia attraverso tcp che attraverso
        udp.



     alias
        altri nomi che possono essere usati per indicare questo
        servizio.



  Tutto il testo che appare in una riga dopo un carattere `#'  trattato
  come commento.


  5.8.1.1.  Un file /etc/services di esempio.

  Tutte le distribuzioni recenti di Linux contengono un buon file
  /etc/services.  Nel caso occorra configurare un calcolatore da zero,
  questa  una copia del file /etc/services fornito con una vecchia
  distribuzione Debian <http://www.debian.org/>:









































  # /etc/services:
  # $Id: services,v 1.3 1996/05/06 21:42:37 tobias Exp $
  #
  # Network services, Internet style
  #
  # Si noti che attualmente la politica dello IANA  di assegnare
  # un singolo numero di porta per entrambi TCP e UDP; perci la maggior
  # parte delle voci sono duplicate, anche se il protocollo non funziona
  # con UDP.
  # Aggiornato dall'RFC 1340, ``Assigned Numbers'' (Luglio 1992).
  # Non sono incluse tutte le porte, solo le pi comuni.

  tcpmux          1/tcp                           # TCP port service multiplexer
  echo            7/tcp
  echo            7/udp
  discard         9/tcp           sink null
  discard         9/udp           sink null
  systat          11/tcp          users
  daytime         13/tcp
  daytime         13/udp
  netstat         15/tcp
  qotd            17/tcp          quote
  msp             18/tcp                          # message send protocol
  msp             18/udp                          # message send protocol
  chargen         19/tcp          ttytst source
  chargen         19/udp          ttytst source
  ftp-data        20/tcp
  ftp             21/tcp
  ssh             22/tcp                          # SSH Remote Login Protocol
  ssh             22/udp                          # SSH Remote Login Protocol
  telnet          23/tcp
  # 24 - private
  smtp            25/tcp          mail
  # 26 - unassigned
  time            37/tcp          timserver
  time            37/udp          timserver
  rlp             39/udp          resource        # resource location
  nameserver      42/tcp          name            # IEN 116
  whois           43/tcp          nicname
  re-mail-ck      50/tcp                          # Remote Mail Checking Protocol
  re-mail-ck      50/udp                          # Remote Mail Checking Protocol
  domain          53/tcp          nameserver      # name-domain server
  domain          53/udp          nameserver
  mtp             57/tcp                          # deprecated
  bootps          67/tcp                          # BOOTP server
  bootps          67/udp
  bootpc          68/tcp                          # BOOTP client
  bootpc          68/udp
  tftp            69/udp
  gopher          70/tcp                          # Internet Gopher
  gopher          70/udp
  rje             77/tcp          netrjs
  finger          79/tcp
  www             80/tcp          http            # WorldWideWeb HTTP
  www             80/udp                          # HyperText Transfer Protocol
  link            87/tcp          ttylink
  kerberos        88/tcp          kerberos5 krb5  # Kerberos v5
  kerberos        88/udp          kerberos5 krb5  # Kerberos v5
  supdup          95/tcp
  # 100 - reserved
  hostnames       101/tcp         hostname        # usually from sri-nic
  iso-tsap        102/tcp         tsap            # part of ISODE.
  csnet-ns        105/tcp         cso-ns          # also used by CSO name server
  csnet-ns        105/udp         cso-ns
  rtelnet         107/tcp                         # Remote Telnet
  rtelnet         107/udp
  pop-2           109/tcp         postoffice      # POP version 2
  pop-2           109/udp
  pop-3           110/tcp                         # POP version 3
  pop-3           110/udp
  sunrpc          111/tcp         portmapper      # RPC 4.0 portmapper TCP
  sunrpc          111/udp         portmapper      # RPC 4.0 portmapper UDP
  auth            113/tcp         authentication tap ident
  sftp            115/tcp
  uucp-path       117/tcp
  nntp            119/tcp         readnews untp   # USENET News Transfer Protocol
  ntp             123/tcp
  ntp             123/udp                         # Network Time Protocol
  netbios-ns      137/tcp                         # NETBIOS Name Service
  netbios-ns      137/udp
  netbios-dgm     138/tcp                         # NETBIOS Datagram Service
  netbios-dgm     138/udp
  netbios-ssn     139/tcp                         # NETBIOS session service
  netbios-ssn     139/udp
  imap2           143/tcp                         # Interim Mail Access Proto v2
  imap2           143/udp
  snmp            161/udp                         # Simple Net Mgmt Proto
  snmp-trap       162/udp         snmptrap        # Traps for SNMP
  cmip-man        163/tcp                         # ISO mgmt over IP (CMOT)
  cmip-man        163/udp
  cmip-agent      164/tcp
  cmip-agent      164/udp
  xdmcp           177/tcp                         # X Display Mgr. Control Proto
  xdmcp           177/udp
  nextstep        178/tcp         NeXTStep NextStep       # NeXTStep window
  nextstep        178/udp         NeXTStep NextStep       # server
  bgp             179/tcp                         # Border Gateway Proto.
  bgp             179/udp
  prospero        191/tcp                         # Cliff Neuman's Prospero
  prospero        191/udp
  irc             194/tcp                         # Internet Relay Chat
  irc             194/udp
  smux            199/tcp                         # SNMP Unix Multiplexer
  smux            199/udp
  at-rtmp         201/tcp                         # AppleTalk routing
  at-rtmp         201/udp
  at-nbp          202/tcp                         # AppleTalk name binding
  at-nbp          202/udp
  at-echo         204/tcp                         # AppleTalk echo
  at-echo         204/udp
  at-zis          206/tcp                         # AppleTalk zone information
  at-zis          206/udp
  z3950           210/tcp         wais            # NISO Z39.50 database
  z3950           210/udp         wais
  ipx             213/tcp                         # IPX
  ipx             213/udp
  imap3           220/tcp                         # Interactive Mail Access
  imap3           220/udp                         # Protocol v3
  ulistserv       372/tcp                         # UNIX Listserv
  ulistserv       372/udp
  #
  # UNIX specific services
  #
  exec            512/tcp
  biff            512/udp         comsat
  login           513/tcp
  who             513/udp         whod
  shell           514/tcp         cmd             # no passwords used
  syslog          514/udp
  printer         515/tcp         spooler         # line printer spooler
  talk            517/udp
  ntalk           518/udp
  route           520/udp         router routed   # RIP
  timed           525/udp         timeserver
  tempo           526/tcp         newdate
  courier         530/tcp         rpc
  conference      531/tcp         chat
  netnews         532/tcp         readnews
  netwall         533/udp                         # -for emergency broadcasts
  uucp            540/tcp         uucpd           # uucp daemon
  remotefs        556/tcp         rfs_server rfs  # Brunhoff remote filesystem
  klogin          543/tcp                         # Kerberized `rlogin' (v5)
  kshell          544/tcp         krcmd           # Kerberized `rsh' (v5)
  kerberos-adm    749/tcp                         # Kerberos `kadmin' (v5)
  #
  webster         765/tcp                         # Network dictionary
  webster         765/udp
  #
  # From ``Assigned Numbers'':
  #
  #> Le "porte registrate" non sono controllate dallo IANA e su molti
  #> sistemi possono essere usate da ordinari processi dell'utente
  #> o programmi eseguiti da utenti non privilegiati.
  #
  #> Le porte sono usate in TCP [45,106] per dare un nome agli estremi
  #> di connessioni logiche che trasportano conversazioni a lungo termine.
  #> Al fine di fornire servizi ad anonimi, viene definita
  #> una porta di contatto per il servizio. Questa lista specifica
  #> la porta usata dal processo server come porta di contatto. Anche se
  #> lo IANA non pu controllare l'uso di queste porte, registra
  #> comunque queste porte e riconosce il loro uso per la convenienza
  #> della comunit.
  #
  ingreslock      1524/tcp
  ingreslock      1524/udp
  prospero-np     1525/tcp                # Prospero non-privileged
  prospero-np     1525/udp
  rfe             5002/tcp                # Radio Free Ethernet
  rfe             5002/udp                # Actually uses UDP only
  bbs             7000/tcp                # BBS service
  #
  #
  # Servizi Kerberos (Progetto Athena/MIT)
  # Si noti che questi servizi sono usati da Kerberos versione 4,
  # e non sono ufficiali. Chi usa la versione 4 dovrebbe scommentare
  # queste voci e commentare quelle per la versione 5 definite pi sopra.
  #
  kerberos4       750/udp         kdc     # Kerberos (server) udp
  kerberos4       750/tcp         kdc     # Kerberos (server) tcp
  kerberos_master 751/udp                 # Kerberos authentication
  kerberos_master 751/tcp                 # Kerberos authentication
  passwd_server   752/udp                 # Kerberos passwd server
  krb_prop        754/tcp                 # Kerberos slave propagation
  krbupdate       760/tcp         kreg    # Kerberos registration
  kpasswd         761/tcp         kpwd    # Kerberos "passwd"
  kpop            1109/tcp                # Pop with Kerberos
  knetd           2053/tcp                # Kerberos de-multiplexor
  zephyr-srv      2102/udp                # Zephyr server
  zephyr-clt      2103/udp                # Zephyr serv-hm connection
  zephyr-hm       2104/udp                # Zephyr hostmanager
  eklogin         2105/tcp                # Kerberos encrypted rlogin
  #
  # Servizi non ufficiali ma necessari per NetBSD
  #
  supfilesrv      871/tcp                 # SUP server
  supfiledbg      1127/tcp                # SUP debugging
  #
  # Servizi "Datagram Delivery Protocol"
  #
  rtmp            1/ddp                   # Routing Table Maintenance Protocol
  nbp             2/ddp                   # Name Binding Protocol
  echo            4/ddp                   # AppleTalk Echo Protocol
  zip             6/ddp                   # Zone Information Protocol
  #
  # Servizi Debian GNU/Linux
  rmtcfg          1236/tcp                # Gracilis Packeten remote config server
  xtel            1313/tcp                # french minitel
  cfinger         2003/tcp                # GNU Finger
  postgres        4321/tcp                # POSTGRES
  mandelspawn     9359/udp        mandelbrot      # network mandelbrot

  # Local services





  In realt il file effettivo  in continua crescita dato che vengono
  continuamente creati nuovi servizi. Se si teme che la propria copia
  sia incompleta, si suggerisce di copiare un nuovo /etc/services da una
  distribuzione recente.


  5.8.2.  /etc/inetd.conf

  Il file /etc/inetd.conf  il file di configurazione per il server di
  rete inetd. La sua funzione  quella di dire a inetd cosa fare quando
  riceve una richiesta di connessione per un particolare servizio.
  Bisogna dire ad inetd quale server demone di rete far partire per
  ciascun servizio che si vuole fornire, bisogna anche dire come farlo
  partire.

  Il formato del file  abbastanza semplice: si tratta di un file di
  testo in cui ogni riga descrive un servizio che si intende offrire.
  Tutto quello che in una linea segue un segno #  ignorato e
  considerato un commento. Ogni linea contiene sette campi separati da
  un numero qualsiasi di spazi bianchi (tab o carattere di spazio). Il
  formato generale :



       service  socket_type  proto  flags  user  server_path  server_args






     service
         il servizio al quale si riferisce questa riga,  cio uno dei
        nomi che stanno nel file /etc/services.



     socket_type
        questo campo descrive il tipo di socket cui questa voce si
        riferisce, i cui valori validi sono: stream, dgram, raw, rdm, o
        seqpacket.  Questa questione  abbastanza tecnica, ma come
        regola pratica basti ricordare che quasi tutti i servizi basati
        su tcp usano stream e quasi tutti i servizi basati su udp usano
        dgram. Solo servizi molto particolari useranno uno degli altri
        valori.


     proto
        il protocollo usato da questa voce. Questo deve corrispondere
        alla voce appropriata di /etc/services e sar di solito tcp o
        udp. I servizi basati su "Sun RPC" (Remote Procedure Call)
        useranno rpc/tcp o rpc/udp.



     flags
        ci sono solo due valori possibili per questo campo, che dice a
        inetd se il programma server libera il socket dopo avere
        iniziato a lavorare. Il campo dice quindi se inetd deve far
        partire un altro server alla prossima richiesta di connessione
        oppure se deve attendere, assumendo che il processo gi in
        funzione gestisca anche le nuove richieste di connessione.
        Ancora una volta, questa informazione pu essere difficile da
        ottenere, ma in genere tutti i server tcp dovranno avere nowait
        in questo campo, mentre la maggior parte dei server udp
        dovrebbero avere il valore wait. Bisogna per fare attenzione
        alle eccezioni a questa regola, perci quando non si  sicuri
        conviene farsi guidare dall'esempio che verr introdotto a
        breve.



     user
        questo campo descrive a quale degli account presenti in
        /etc/passwd deve essere assegnata la propriet del server di
        rete che viene fatto partire.  Questo campo  spesso utile per
        proteggersi da possibili problemi di sicurezza. Si pu assegnare
        l'utente nobody come proprietario di un server, in modo da
        minimizzare il danno possibile in caso di compromissione della
        sicurezza del server di rete. Di solito, comunque, questo campo
        viene posto a root, poich molti server hanno bisogno dei
        privilegi del superutente per funzionare correttamente.



     server_path
        questo campo  il percorso completo (pathname) del programma
        server che deve essere eseguito in relazione a questo servizio.



     server_args
        questo campo comprende il resto della riga ed  opzionale. In
        questo campo si mettono gli argomenti di linea di comando che si
        intendono passare al programma server quando questo viene
        lanciato.



  5.8.2.1.  Un esempio di /etc/inetd.conf

  Come per  /etc/services, tutte le distribuzioni aggiornate di Linux
  includono un buon file /etc/inetd.conf con cui poter lavorare. Qui per
  completezza riporto il file /etc/inetd.conf che appare nella
  distribuzione Debian <http://www.debian.org/>.








  # /etc/inetd.conf:  see inetd(8) for further informations.
  #
  # Internet server configuration database
  #
  #
  # Modified for Debian by Peter Tobias <tobias@et-inf.fho-emden.de>
  #
  # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
  #
  # Internal services
  #
  #echo           stream          tcp     nowait          root    internal
  #echo           dgram           udp     wait            root    internal
  discard stream  tcp     nowait          root    internal
  discard dgram           udp     wait            root    internal
  daytime stream          tcp     nowait          root    internal
  daytime dgram           udp     wait            root    internal
  #chargen        stream          tcp     nowait          root    internal
  #chargen        dgram           udp     wait            root    internal
  time            stream          tcp     nowait          root    internal
  time            dgram           udp     wait            root    internal
  #
  # These are standard services.
  #
  telnet          stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.telnetd
  ftp             stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.ftpd
  #fsp            dgram           udp     wait            root    /usr/sbin/tcpd  /usr/sbin/in.fspd
  #
  # Shell, login, exec and talk are BSD protocols.
  #
  shell   stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.rshd
  login   stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.rlogind
  #exec   stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.rexecd
  talk    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.talkd
  ntalk   dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.ntalkd
  #
  # Mail, news and uucp services.
  #
  smtp    stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.smtpd
  #nntp   stream          tcp     nowait          news    /usr/sbin/tcpd  /usr/sbin/in.nntpd
  #uucp   stream          tcp     nowait          uucp    /usr/sbin/tcpd  /usr/lib/uucp/uucico
  #comsat dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.comsat
  #
  # Pop et al
  #
  #pop-2  stream          tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop2d
  #pop-3  stream          tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop3d
  #
  # `cfinger' is for the GNU finger server available for Debian.  (NOTE: The
  # current implementation of the `finger' daemon allows it to be run as `root'.)
  #
  #cfinger        stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.cfingerd
  #finger stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.fingerd
  #netstat        stream          tcp     nowait          nobody          /usr/sbin/tcpd  /bin/netstat
  #systat stream          tcp     nowait          nobody          /usr/sbin/tcpd  /bin/ps -auwwx
  #
  # Tftp service is provided primarily for booting.  Most sites
  # run this only on machines acting as "boot servers."
  #
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /boot
  #bootps dgram   udp     wait    root    /usr/sbin/bootpd        bootpd -i -t 120
  #
  # Kerberos authenticated services (these probably need to be corrected)
  #
  #klogin         stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k
  #eklogin        stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k -x
  #kshell         stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/in.rshd -k
  #
  # Services run ONLY on the Kerberos server (these probably need to be corrected)
  #
  #krbupdate      stream tcp      nowait          root    /usr/sbin/tcpd  /usr/sbin/registerd
  #kpasswd        stream          tcp     nowait          root    /usr/sbin/tcpd  /usr/sbin/kpasswdd
  #
  # RPC based services
  #
  #mountd/1       dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.mountd
  #rstatd/1-3     dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rstatd
  #rusersd/2-3    dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rusersd
  #walld/1        dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rwalld
  #
  # End of inetd.conf.
  ident   stream          tcp     nowait          nobody          /usr/sbin/identd        identd -i





  5.9.  Altri file di configurazione relativi alla rete.

  C' un certo numero di altri file, relativi alla configurazione di
  rete sotto Linux, ai quali merita dare un'occhiata. Non ci sar
  bisogno di modificare questi file, ma vale la pena di descriverli, in
  modo da sapere cosa contengono e a cosa servono.


  5.9.1.  /etc/protocols

  Il file /etc/protocols  un database che associa i numeri
  identificativi dei protocolli al nomi di ciascun protocollo. Questa
  informazione viene usata dai programmatori per poter specificare per
  nome i protocolli all'interno dei programmi, e viene usata da alcuni
  programmi come tcpdump al fine di mostrare nei loro messaggi i nomi di
  protocollo invece dei numeri. La sintassi del file :




         nome-protocollo  numero alias






  Il file /etc/protocols che fa parte della distribuzione Debian
  <http://www.debian.org/>  fatto cos:















  # /etc/protocols:
  # $Id: protocols,v 1.1 1995/02/24 01:09:41 imurdock Exp $
  #
  # Internet (IP) protocols
  #
  #       from: @(#)protocols     5.1 (Berkeley) 4/17/89
  #
  # Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992).

  ip      0       IP              # internet protocol, pseudo protocol number
  icmp    1       ICMP            # internet control message protocol
  igmp    2       IGMP            # Internet Group Management
  ggp     3       GGP             # gateway-gateway protocol
  ipencap 4       IP-ENCAP        # IP encapsulated in IP (officially ``IP'')
  st      5       ST              # ST datagram mode
  tcp     6       TCP             # transmission control protocol
  egp     8       EGP             # exterior gateway protocol
  pup     12      PUP             # PARC universal packet protocol
  udp     17      UDP             # user datagram protocol
  hmp     20      HMP             # host monitoring protocol
  xns-idp 22      XNS-IDP         # Xerox NS IDP
  rdp     27      RDP             # "reliable datagram" protocol
  iso-tp4 29      ISO-TP4         # ISO Transport Protocol class 4
  xtp     36      XTP             # Xpress Tranfer Protocol
  ddp     37      DDP             # Datagram Delivery Protocol
  idpr-cmtp       39      IDPR-CMTP       # IDPR Control Message Transport
  rspf    73      RSPF            # Radio Shortest Path First.
  vmtp    81      VMTP            # Versatile Message Transport
  ospf    89      OSPFIGP         # Open Shortest Path First IGP
  ipip    94      IPIP            # Yet Another IP encapsulation
  encap   98      ENCAP           # Yet Another IP encapsulation





  5.9.2.  /etc/networks

  Il file /etc/networks ha una funzione simile a /etc/hosts.  Il file 
  un semplice database che associa i nomi delle reti ai loro indirizzi.
  Il suo formato  differente da /etc/hosts in quanto ci sono solo due
  campi per riga, che sono codificati come:




         nome-rete indirizzo-di-rete





  Per esempio, il file potrebbe assomigliare al seguente:



               loopnet    127.0.0.0
               localnet   192.168.0.0
               amprnet    44.0.0.0





  Quando si usano comandi come route, se un indirizzo di destinazione 
  una rete e quella rete appare in/etc/networks, allora il comando
  mostrer il nome della rete invece del suo indirizzo.


  5.10.  Sicurezza di rete e controllo degli accessi.

  Vorrei iniziare questa sezione avvisando che la protezione di un
  calcolatore e di una rete da attacchi malevoli  un'arte complessa.
  Non mi considero assolutamente un esperto in questo campo: mentre i
  meccanismi che descrivo in seguito possono essere di aiuto, raccomando
  a chi prende seriamente il problema della sicurezza di fare qualche
  ricerca personale sull'argomento. Su Internet ci sono molti buoni
  documenti al proposito, compreso Security-HOWTO <Security-HOWTO.html>.

  Una importante regola base : `Non far girare i servizi che non si
  intendono usare'.  Molte distribuzioni sono configurate per attivare
  ogni sorta di servizi, che vengono fatti partire automaticamente
  all'accensione della macchina.  Per assicurare un livello di sicurezza
  minimale occorre passare in rassegna il proprio /etc/inetd.conf e
  commentare (mettendo un `#' all'inizio della riga) ogni voce relativa
  a servizi che non si intendono usare. Buoni candidati per questa
  operazione sono servizi come shell, login, exec, uucp, ftp, e servizi
  informativi come finger, netstat e systat.

  Ci sono molti tipi di meccanismi di sicurezza e controllo degli
  accessi; qui descriver solo i pi elementari.


  5.10.1.  /etc/ftpusers

  Il file /etc/ftpusers  un semplice meccanismo che permette di negare
  a certi utenti l'accesso via ftp alla macchina.  Il file /etc/ftpusers
  viene letto dal demone ftp server (ftpd) quando vengono ricevute delle
  connessioni ftp in ingresso. Il file  semplicemente una lista di
  utenti a cui  impedito di collegarsi.  Il file assomiglia al
  seguente:



               # /etc/ftpusers - users not allowed to login via ftp
               root
               uucp
               bin
               mail






  5.10.2.  /etc/securetty

  Il file /etc/securetty permette di specificare a quali periferiche di
  tipo tty l'utente root pu collegarsi.  Il file /etc/securetty viene
  letto dal programma di login (di solito /bin/login). Il file  una
  lista di nomi di terminali ai quali root pu collegarsi, mentre su
  tutti gli altri non  permesso di collegarsi come superutente:



               # /etc/securetty - tty's on which root is allowed to login
               tty1
               tty2
               tty3
               tty4


  5.10.3.  Il meccanismo di controllo degli accessi tcpd .

  Il programma tcpd che avrete notato in /etc/inetd.conf fornisce i
  meccanismi di controllo degli accessi e di registrazione d'utilizzo
  (logging) per i servizi che protegge.

  Quando viene invocato dal programma inetd, tcpd legge due file
  contenenti regole di accesso e di conseguenza permette l'accesso al
  servizio o lo rifiuta.

  tcpd scandisce i file di regole finch non trova una corrispondenza.
  Se non ci sono corrispondenze valide, si assume che l'accesso sia
  permesso a tutti.  I file che vengono scanditi in sequenza sono
  /etc/hosts.allow e /etc/hosts.deny. Li descriver uno alla volta. Per
  una descrizione completa di questa funzionalit conviene riferirsi
  alle pagine del manuale (hosts_access(5)  un buon punto di partenza).


  5.10.3.1.  /etc/hosts.allow

  Il file /etc/hosts.allow  uno dei file di configurazione del
  programma /usr/sbin/tcpd. hosts.allow contiene le regole che
  descrivono a quali calcolatori  permesso accedere ai servizi di
  questa macchina.

  Il formato del file  molto semplice:



               # /etc/hosts.allow
               #
               # <lista servizi>: <lista calcolatori> [: comando]







     lista servizi
         una lista delimitata da virgole di nomi di programmi server
        cui questa regola si applica. Esempi di nomi di server sono
        ftpd, telnetd e fingerd.



     lista calcolatori
         una lista delimitata da virgole di nomi di host. Si possono,
        alternativamente, usare gli indirizzi IP. Si possono anche
        specificare nomi o indirizzi usando caratteri speciali per
        indicare gruppi di host. Per esempio, gw.vk2ktj.ampr.org
        corrisponde ad un host, .uts.edu.au indica tutti  i nomi che
        terminano con questa stringa, 44. indica    ogni indirizzo IP
        che inizia con 44. Ci sono alcune parole speciali per
        semplificare la configurazione, alcune delle quali sono: ALL per
        indicare tutti gli host, LOCAL per indicare gli host il cui nome
        non contiene un `.', cio che sono nello stesso dominio di
        questa macchina, PARANOID indica tutti gli host il cui nome non
        corrisponde all'indirizzo (cio nel caso sia in atto un `name
        spoofing'). Un'altra parola speciale che risulta utile  EXCEPT:
        permette di specificare una lista con delle eccezioni. Questo
        caso verr coperto pi avanti da un esempio.




     comando
         un argomento opzionale.  Questo parametro corrisponde al
        pathname completo di un comando che deve essere eseguito ogni
        volta che questa regola si applica. Per esempio potrebbe essere
        un comando che cerchi di identificare chi  collegato sul
        calcolatore che cerca di connettersi, o un comando che spedisce
        un messaggio di posta o altri avvertimenti all'amministratore di
        sistema riguardo al tentativo di connessione.  Ci sono un certo
        numero di estensioni che possono essere incluse nel comando;
        alcuni esempi tipici sono: %h  il nome dell'host che cerca di
        collegarsi, o il suo indirizzo se il nome non pu essere
        risolto, %d  il demone server che viene invocato.



  Un esempio:



               # /etc/hosts.allow
               #
               # La posta  permessa e chiunque
               in.smtpd: ALL
               # telnet e ftp sono permessi solo a questo dominio e al mio
               # calcolatore di casa
               telnetd, ftpd: LOCAL, myhost.athome.org.au
               # finger  permesso a tutti, ma tenendo traccia di chi lo usa.
               fingerd: ALL: (finger @%h | mail -s "finger from %h" root)






  5.10.3.2.  /etc/hosts.deny

  Il file /etc/hosts.deny  un file di configurazione del programma
  /usr/sbin/tcpd. Il file hosts.deny contiene le regole che descrivono a
  quali calcolatori non  permesso di accedere un servizio sul
  calcolatore locale.

  Un semplice esempio potrebbe somigliare a questo:



               # /etc/hosts.deny
               #
               # Impedisci l'accesso a tutti i calcolatori con nomi sospetti
               ALL: PARANOID
               #
               # Impedisci l'accesso a tutti i calcolatori
               ALL: ALL





  In realt la voce PARANOID  ridondante perch l'altra voce si
  riferisce in ogni caso a tutti i calcolatori. L'uso di una di queste
  due voci potrebbe essere una scelta ragionevole, in base alle
  specifiche esigenze di controllo degli accessi.

  La configurazione pi sicura consiste nell'avere un default di ALL:
  ALL esplicito in /etc/hosts.deny ed abilitare esplicitamente in
  /etc/hosts.allow i servizi e gli host che si vogliono autorizzare.

  5.10.4.  /etc/hosts.equiv

  Il file hosts.equiv viene usato per autorizzare alcuni calcolatori e
  alcuni utenti ad utilizzare gli account sulla macchina locale senza
  aver bisogno di fornire una password. Questo  utile in un ambiente
  sicuro, in cui si possano controllare tutte le macchine, ma  un
  grosso rischio in altre circostanze. Un calcolatore  sicuro solo
  tanto quanto lo  il meno sicuro dei calcolatori di cui ci si fida.
  Per massimizzare la sicurezza  bene non usare il meccanismo di
  hosts.equiv ed incoraggiare gli utenti a non usare nemmeno il file
  .rhosts.


  5.10.5.  Come configurare correttamente il server ftp .

  Molti siti sono interessati ad offrire il servizio di ftp anonimo, per
  permettere ad altre persone di scaricare e depositare dei dati senza
  bisogno di un account specifico sulla macchina. Se si decide di
  offrire questo servizio bisogna assicurarsi di configurare
  correttamente il server ftp per l'accesso anonimo. La maggior parte
  delle pagine del manuale disponibili per ftpd(8) descrivono
  accuratamente come adempiere questo compito, e bisogna assicurarsi di
  seguire le istruzioni. Un consiglio importante  di non usare una
  copia del proprio file /etc/passwd nella directory /etc dell'account
  anonimo: bisogna assicurarsi di rimuovere tutti i dettagli tranne
  quelli necessari, altrimenti si diventa vulnerabili alle tecniche di
  rottura delle password "per forza bruta".


  5.10.6.  I firewall di rete.

  Un eccellente modo per avere una certa sicurezza  impedire ai
  pacchetti di raggiungere il calcolatore che si intende proteggere.
  Questa tecnica  discussa in dettaglio nel Firewall-HOWTO <Firewall-
  HOWTO.html>, e (in forma concisa) in una sezione successiva di questo
  documento.


  5.10.7.  Altri suggerimenti.

  Questi sono altri suggerimenti che val la pena di prendere in
  considerazione, anche se potenzialmente si prestano a guerre di
  religione.




     sendmail
        nonostante la sua popolarit, appare sugli annunci di attenzione
        alla sicurezza con impressionante regolarit.  Dipende da voi,
        ma io preferisco non usarlo [un'ottima alternativa  postfix, si
        trova su mirror italiano di www.postfix.org
        <http://postfix.linux.it/> N.d.T.].



     NFS e altri servizi di tipo
        bisogna fare attenzione: esistono un sacco di modi per sfruttare
        a fini malevoli questi servizi.   difficile trovare
        un'alternativa a servizi come NFS, ma se questi vengono
        abilitati bisogna fare estrema attenzione riguardo chi ha il
        permesso di montare i dischi della propria macchina.




  6.  Informazioni specifiche ad IP ed Ethernet.

  Questa sezione presenta informazioni specifiche a Ethernet e IP.
  Queste sottosezioni sono state raggruppate assieme perch credo siano
  le pi interessanti della sezione precedentemente intitolata
  "Informazioni specifiche alle singole tecnologie di rete". Chiunque
  abbia una rete locale (LAN) dovrebbe poterne beneficiare.


  6.1.  Ethernet

  I nomi dei dispositivi Ethernet sono `eth0', `eth1', `eth2' eccetera.
  Alla prima scheda di rete riconosciuta del kernel viene assegnato
  `eth0', alle altre eventuali schede viene assegnato un nome in
  sequenza, nell'ordine in cui vengono riconosciute.

  Per default, il kernel Linux effettua il probing di un solo
  dispositivo Ethernet,  necessario passare degli argomenti dalla linea
  di comando al kernel per poter forzare il riconoscimento di ulteriori
  schede.

  Per imparare come far lavorare correttamente sotto Linux le proprie
  schede ethernet, si pu far riferimento al Ethernet-HOWTO <Ethernet-
  HOWTO.html>.

  Quando il kernel  compilato con le opzioni corrette per supportare la
  propria scheda ethernet, la sua configurazione  facile.

  Tipicamente sar necessario qualcosa di simile (di solito la maggior
  parte delle distribuzioni lo fa automaticamente, se configurata per
  supportare la scheda ethernet presente):



               root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
               root# route add -net 192.168.0.0 netmask 255.255.255.0 eth0






  La maggior parte dei driver ethernet sono stati sviluppati da Donald
  Becker, becker@CESDIS.gsfc.nasa.gov.


  6.2.  EQL - equalizzazione del traffico su linea multipla

  Il nome della periferica EQL  `eql'. Con la distribuzione standard
  del kernel si pu avere al massimo una periferica EQL per macchina.
  Il protocollo EQL offre un mezzo per utilizzare connessioni multiple
  punto-a-punto (come PPP, slip o plip) come se fossero un singolo
  collegamento TCP/IP. Spesso  pi economico usare vari collegamenti a
  bassa velocit che installare un singolo collegamento ad alta
  velocit.


  Opzioni di compilazione del kernel:


               Network device support  --->
                   [*] Network device support
                   <*> EQL (serial line load balancing) support



  Per utilizzare questo meccanismo occorre che anche la macchina che sta
  all'altro capo del collegamento supporti EQL. Linux, i "Livingstone
  Portmaster" e altri recenti server a chiamata telefonica (dial-in
  server) supportano funzionalit compatibili.

  Per configurare EQL occorrono gli strumenti EQL, che si posso prendere
  da: sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/linux/system/Serial/eql-1.2.tar.gz>.

  La configurazione  abbastanza intuitiva. Si inizia configurando
  l'interfaccia eql. A questa interfaccia, come a qualunque altra
  interfaccia di rete, viene assegnato un indirizzo IP ed una MTU usando
  il comando ifconfig. Per esempio:



               ifconfig eql 192.168.10.1 mtu 1006






  Poi occorre attivare manualmente ognuna delle linee che si intendono
  usare.  Queste possono essere una qualsiasi combinazione di
  dispositivi di rete punto-a-punto. Come effettuare tali connessioni
  dipende dal tipo di collegamenti in gioco. Per avere ulteriori
  informazioni occorre riferirsi alle sezioni appropriate.

  Infine occorre associare questi collegamenti seriali alla periferica
  EQL.  Questa operazione si chiama "asservimento" (enslave) e viene
  effettuata con il comando eql_enslave come mostrato qui:



               eql_enslave eql sl0 28800
               eql_enslave eql ppp0 14400





  Il parametro che viene passato  la velocit stimata, e non ha alcun
  effetto diretto: viene solo usato dal driver EQL per determinare la
  suddivisione dei pacchetti, in modo da poter aggiustare con precisione
  il bilanciamento delle linee mediante la scelta oculata di questo
  valore.

  Per staccare una linea dal dispositivo EQL occorre usare il comando
  eql_emancipate, come qui mostrato:



               eql_emancipate eql sl0






  Per aggiungere informazioni di instradamento si fa come per qualunque
  altro collegamento punto-a-punto, tranne che i percorsi devono
  riferirsi al dispositivo eql piuttosto che ai singoli collegamenti.
  Di solito si usano comandi come il seguente:


               root# route add default eql






  Il driver EQL  stato scritto da Simon Janes, simon@ncm.com.


  6.3.  IP Accounting (per Linux-2.0)

  Le caratteristiche di accounting del kernel Linux permettono di
  raccogliere ed analizzare alcuni dati di utilizzo della rete. I dati
  raccolti comprendono il numero di pacchetti e il numero di byte
  accumulati dal momento in cui le cifre sono state azzerate l'ultima
  volta. Si possono specificare una variet di regole per raccogliere le
  cifre in categorie secondo le proprie finalit. Questa possibilit 
  stata rimossa a partire dal kernel 2.1.102, poich il firewalling
  basato su `ipfwadm'  stato rimpiazzato da `ipfwchains'.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   [*] IP: accounting






  Dopo aver ricompilato ed installato il kernel occorre usare il comando
  ipfwadm per configurare l'accounting IP. Si pu scegliere tra diversi
  modi di dividere le informazioni di accounting. Ho scelto qui un
  semplice esempio di cosa pu essere utile usare, bisognerebbe leggere
  la pagina del manuale di ipfwadm per avere ulteriori informazioni.

  Scenario: una rete ethernet  collegata a Internet tramite una
  connessione PPP. Sulla ethernet c' una macchina che offre svariati
  servizi, e interessa sapere quanto traffico viene generato da ftp e
  WWW, come pure il traffico totale TCP e UDP.

  Si pu usare a questo fine un insieme di comandi simile al seguente,
  riportato come script di shell:




















          #!/bin/sh
          #
          # Dimentica tutte le regole di accounting
          ipfwadm -A -f
          #
          # assegna dei riferimenti simbolici
          localnet=44.136.8.96/29
          any=0/0
          # Aggiungi le regole per il segmento ethernet locale
          ipfwadm -A in  -a -P tcp -D $localnet ftp-data
          ipfwadm -A out -a -P tcp -S $localnet ftp-data
          ipfwadm -A in  -a -P tcp -D $localnet www
          ipfwadm -A out -a -P tcp -S $localnet www
          ipfwadm -A in  -a -P tcp -D $localnet
          ipfwadm -A out -a -P tcp -S $localnet
          ipfwadm -A in  -a -P udp -D $localnet
          ipfwadm -A out -a -P udp -S $localnet
          #
          # Regole di default
          ipfwadm -A in  -a -P tcp -D $any ftp-data
          ipfwadm -A out -a -P tcp -S $any ftp-data
          ipfwadm -A in  -a -P tcp -D $any www
          ipfwadm -A out -a -P tcp -S $any www
          ipfwadm -A in  -a -P tcp -D $any
          ipfwadm -A out -a -P tcp -S $any
          ipfwadm -A in  -a -P udp -D $any
          ipfwadm -A out -a -P udp -S $any
          #
          # Stampa le regole
          ipfwadm -A -l -n
          #






  I nomi `ftp-data' e `www' si riferiscono a voci di /etc/services.
  L'ultimo comando stampa tutte le regole di accounting e mostra i
  totali raccolti.


  Un punto importante da sottolineare quando si parla di accounting IP 
  che vengono incrementati i totali per tutte le regole che si
  applicano, cosicch per ottenere cifre relative alle differenza ci
  vuole un po' di matematica.  Per esempio, se si vuol sapere quanto
  traffico non era ftp o www bisogna sottrarre i totali individuali
  dalla regola che si applica a tutte le porte.


















  root# ipfwadm -A -l -n
  IP accounting rules
   pkts bytes dir prot source               destination          ports
      0     0 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 20
      0     0 out tcp  44.136.8.96/29       0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 80
     10   572 out tcp  44.136.8.96/29       0.0.0.0/0            80 -> *
    252 10943 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> *
    231 18831 out tcp  44.136.8.96/29       0.0.0.0/0             * -> *
      0     0 in  udp  0.0.0.0/0            44.136.8.96/29       * -> *
      0     0 out udp  44.136.8.96/29       0.0.0.0/0            * -> *
      0     0 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 20
      0     0 out tcp  0.0.0.0/0            0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 80
     10   572 out tcp  0.0.0.0/0            0.0.0.0/0            80 -> *
    253 10983 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> *
    231 18831 out tcp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 in  udp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 out udp  0.0.0.0/0            0.0.0.0/0            * -> *





  6.4.  IP Accounting (per Linux-2.2)

  Il nuovo accounting IP  gestito mediante `IP Firewall Chains'.  Si
  pu fare riferimento alla home page di IP chains
  <http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html> per
  ulteriori informazioni.  Tra le altre cose adesso  necessario usare
  ipchains al posto di ipfwadm per configurare le proprie regole.  (Da
  Documentation/Changes nei sorgenti pi recenti del kernel).  [
  disponibile IP-Chains mini-HOWTO N.d.T.]


  6.5.  IP Aliasing

  Ci sono alcune applicazioni dove  utile poter configurare diversi
  indirizzi IP associati ad un unica scheda di rete. I fornitori di
  accesso ad internet spesso usano questa funzionalit per la
  personalizzazione delle loro offerte di servizi ftp e WWW per i loro
  clienti. Si pu fare riferimento a `IP-Alias mini-HOWTO' per maggiori
  informazioni.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   ....
                   [*] Network aliasing
                   ....
                   <*> IP: aliasing support






  Dopo aver compilato ed installato il kernel con il supporto per l'IP
  Aliasing, la configurazione  molto semplice. I nomi alternativi
  (alias) vengono aggiunti a periferiche di rete virtuali associate
  all'interfaccia di rete fisica. Esiste una semplice convenzione per
  l'assegnamento dei nomi a queste periferiche, del tipo
  <nomePeriferica>:<numeroPerifericaVirtuale>, per esempio eth0:0,
  ppp0:10. Si noti che l'interfaccia nome:numero pu essere configurata
  solo dopo aver configurato l'interfaccia principale.

  Assumiamo per esempio di avere una rete ethernet che porta due
  sottoreti IP contemporaneamente, e che si voglia che una macchina
  abbia accesso diretto ad entrambe le sottoreti; in questo caso si pu
  usare qualcosa come:



               root# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0

               root# ifconfig eth0:0 192.168.10.1 netmask 255.255.255.0 up
               root# route add -net 192.168.10.0 netmask 255.255.255.0 eth0:0






  Per rimuovere un alias basta aggiungere un carattere `-' alla fine del
  suo nome e riferirsi ad esso, cos:



               # ifconfig eth0:0- 0






  Tutte le regole di instradamento associate a quell'alias verranno
  rimosse automaticamente.


  6.6.  IP Firewall (per Linux-2.0)

  Il Firewall IP e gli argomenti correlati sono trattati con maggior
  dettaglio nel Firewall-HOWTO <Firewall-HOWTO.html>.  Le tecniche di
  firewall permettono di rendere sicura la propria macchina verso gli
  accessi di rete non autorizzati filtrando i pacchetti: i pacchetti di
  rete sono accettati oppure no in base agli indirizzi IP di
  partenza/destinazione.  Ci sono tre classi di regole: filtro di
  ingresso (incoming), di uscita (outgoing) e passante (forwarding).  Le
  regole di ingresso vengono applicate ai pacchetti che vengono ricevuti
  dalle interfacce di rete, le regole di uscita vengono applicate ai
  pacchetti che devono essere trasmessi da un'interfaccia. Le regole di
  filtro passante vengono applicate ai pacchetti che sono stati ricevuti
  ma non sono destinati a questa macchina, cio i pacchetti che devono
  essere instradati.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   [*] Network firewalls
                   ....
                   [*] IP: forwarding/gatewaying
                   ....
                   [*] IP: firewalling
                   [ ] IP: firewall packet logging



  La configurazione delle regole del firewall IP viene effettuata
  tramite il comando ipfwadm. Come ho accennato prima, non sono un
  esperto nel campo della sicurezza informatica; perci, mentre
  l'esempio che sto per presentare  utilizzabile, consiglio di fare le
  proprie ricerche e sviluppare le proprie regole se la sicurezza  un
  problema importante.

  Probabilmente l'uso pi comune del firewall IP si ha quando la propria
  macchina Linux  usata come router e come filtro per proteggere la
  propria rete locale dall'accesso non autorizzato dall'esterno della
  rete.

  La configurazione seguente  basata su di un contributo di Arnt
  Gulbrandsen, <agulbra@troll.no>.

  L'esempio descrive la configurazione delle regole di firewall nella
  macchina Linux rappresentata in figura:



       -                                   -
        \                                  | 172.16.37.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |  172.16.174.30 | Linux |      |
       NET =================|  f/w  |------|    ..37.19
           |    PPP         | router|      |  --------
          /                 ---------      |--| Mail |
         /                                 |  | /DNS |
        /                                  |  --------
       -                                   -




  I comandi seguenti risiederanno probabilmente in un file nella
  directory rc in modo da essere eseguiti automaticamente tutte le volte
  che il sistema viene avviato. Ai fini della massima sicurezza, i
  comandi dovrebbero essere eseguiti dopo aver configurato le interfacce
  di rete, ma prima di attivarle, in modo da impedire a chiunque di
  accedere al calcolatore mentre sta riavviandosi.

























          #!/bin/sh

          # Azzera la tabella di 'Forward'
          # Cambia il comportamento di default perch accetti i pacchetti.
          #
          /sbin/ipfwadm -F -f
          /sbin/ipfwadm -F -p accept
          #
          # .. e lo stesso per le regole di entrata.
          #
          /sbin/ipfwadm -I -f
          /sbin/ipfwadm -I -p accept

          # Prima di tutto, chiudere l'interfaccia PPP
          # Vorrei usare '-a deny' invece di '-a reject -y', ma non sarebbe
          # possibile creare delle connessioni da questa interfaccia.
          # Il -o fa s che tutti pacchetti rifiutati siano registrati sul log.
          # Questo spreca spazio su disco ma lascia informazione in casi di
          # attacco o errore di configurazione.
          #
          /sbin/ipfwadm -I -a reject -y -o -P tcp -S 0/0 -D 172.16.174.30

          # Rigetta subito i pacchetti chiaramente costruiti a scopo malevolo:
          # niente dovrebbe provenire da indirizzi multicast/anycast/broadcast
          #
          /sbin/ipfwadm -F -a deny -o -S 224.0/3 -D 172.16.37.0/24
          #
          # e nulla proveniente dalla rete loopback deve apparire su un cavo
          # di rete
          /sbin/ipfwadm -F -a deny -o -S 127.0/8 -D 172.16.37.0/24

          # Accetta connessioni SMTP e DNS entranti, ma solo verso il server
          # di posta e di risoluzione dei nomi (name server)
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 0/0 -D 172.16.37.19 25 53
          #
          # Il DNS usa anche UDP oltre a TCP, quindi bisogna permetterlo
          # per le interrogazioni al nostro name server
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 -D 172.16.37.19 53
          #
          # ma non autorizzare risposte provenienti da porte
          # pericolose, come NFS e le sue estensioni a cura di Larry MCVoy.
          # Se si usa squid, aggiungere qui la sua porta.
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 53 \
                    -D 172.16.37.0/24 2049 2050

          # risposte per le altre porte non privilegiate vanno bene
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 53 \
                    -D 172.16.37.0/24 53 1024:65535

          # Rifiuta le connessioni entranti per identd
          # Usare 'reject' cos alla connessione viene notificato subito
          # di non continuare. Altrimenti avremmo dei ritardi mentre identd
          # aspetta il time out.
          #
          /sbin/ipfwadm -F -a reject -o -P tcp -S 0/0 -D 172.16.37.0/24 113

          # Accetta le connessioni per alcuni servizi comuni dalle reti
      # 192.168.64 e 192.168.65: sono amici e ci fidiamo.
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 192.168.64.0/23 \
                    -D 172.16.37.0/24 20:23

          # accetta e ritrasmetti tutto quello che viene dall'interno
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 172.16.37.0/24 -D 0/0

          # impedisci la maggior parte delle altre connessioni TCP entranti, e
          # registrale sul log di sistema.
          # (occorre aggiungere 1:1023 se ftp non funziona)
          #
          /sbin/ipfwadm -F -a deny -o -y -P tcp -S 0/0 -D 172.16.37.0/24

          # ... e lo stesso per UDP
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 -D 172.16.37.0/24






  Una buona configurazione del firewall  abbastanza difficile da
  raggiungere. Questo esempio dovrebbe essere un punto di partenza
  ragionevole.  La pagina di manuale di ipfwadm offre un po' di
  assistenza nell'uso del programma. Se si intende configurare un
  firewall occorre essere sicuri di chiedere e di recuperare il maggior
  numero possibile di informazioni da fonti che si considerino
  affidabili. Occorre anche che qualcuno verifichi la configurazione
  dall'esterno.


  6.7.  IP Firewall (per Linux-2.2)

  Il nuovo firewall  gestito mediante `IP Firewall Chains'.  Si pu
  fare riferimento alla home page di IP chains
  <http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html> per
  ulteriori informazioni.  Tra le altre cose adesso  necessario usare
  ipchains al posto di ipfwadm per configurare le proprie regole.  (Da
  Documentation/Changes nei sorgenti pi recenti del kernel).  [
  disponibile IP-Chains mini-HOWTO N.d.T.]


  6.8.  Incapsulazione IPIP

  Perch si dovrebbe aver bisogno di incapsulare i pacchetti IP in altri
  pacchetti IP? Deve sembrare una cosa molto strana se non si  mai
  vista prima una sua applicazione. Ok, ecco un paio di esempi di uso
  abbastanza comune dell'incapsulazione: gli indirizzi mobili (mobile-
  IP) e il multicast.  Quello che probabilmente  l'uso pi comune di
  questa tecnica, anche se probabilmente il meno noto,  la radio
  amatoriale.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   [*] TCP/IP networking
                   [*] IP: forwarding/gatewaying
                   ....
                   <*> IP: tunneling





  Le periferiche tunnel sono chiamate `tunl0', `tunl1' eccetera.

  "Ma perch?". Ecco: l'instradamento convenzionale dei pacchetti IP
  richiede che una rete IP comprenda un indirizzo di rete ed una
  maschera di rete. Questo produce una serie di indirizzi contigui che
  possono essere instradati collettivamente da una singola voce di
  instradamento.  Questo  molto comodo, ma significa che un particolare
  indirizzo pu essere usato solo mentre si  connessi alla rete cui
  quell'indirizzo appartiene. Nella maggior parte di casi questo va
  bene, ma se si  un utente mobile della rete pu essere difficile
  collegarsi sempre nello stesso posto. L'incapsulazione IP/IP (o
  tunneling IP) permette di scavalcare questa restrizione permettendo ai
  pacchetti destinati all'indirizzo IP dell'utente mobile di essere
  reimpacchettati e rediretti ad un altro indirizzo IP. Se si sa di
  doversi collegare ad un altro indirizzo IP per un certo tempo, si pu
  predisporre un calcolatore sulla propria rete di appartenenza perch
  accetti i pacchetti per il vecchio indirizzo IP e li ridiriga
  all'indirizzo che si utilizzer temporaneamente.


  6.8.1.  Una configurazione di rete a "tunnel"

  Come sempre, credo che un diagramma possa evitare un sacco di testo
  poco chiaro, perci eccone qui uno:



        192.168.1/24                          192.168.2/24

            -                                     -
            |      ppp0 =            ppp0 =       |
            |  aaa.bbb.ccc.ddd  fff.ggg.hhh.iii   |
            |                                     |
            |   /-----\                 /-----\   |
            |   |     |       //        |     |   |
            |---|  A  |------//---------|  B  |---|
            |   |     |     //          |     |   |
            |   \-----/                 \-----/   |
            |                                     |
            -                                     -




  Il diagramma mostra un'altra ragione possibile per usare
  l'incapsulazione IP/IP: le reti private virtuali.  Questo esempio
  presuppone che si abbiano due macchine, ciascuna con una semplice
  connessione telefonica alla rete, e ogni calcolatore ha un solo
  indirizzo IP. Dietro a queste due macchine ci sono delle reti locali
  private, configurate con gli indirizzi di rete riservati a tal fine.
  Supponiamo di voler permettere a tutti i calcolatori della rete A di
  collegarsi a qualsiasi calcolatore della rete B, come se fossero
  connessi normalmente a Internet tramite una regola di instradamento.
  L'incapsulazione IPIP permette di fare questo.  Si noti che
  l'incapsulazione non risolve il problema di come far parlare le reti A
  e B con gli altri calcolatori di internet: per fare questo occorrono
  altri trucchi, come il mascheramento.  L'incapsulazione di solito
  viene effettuata dalle macchine che funzionano da router.

  Il router Linux `A' dovr essere configurato con uno script come il
  seguente:







          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=fff.ggg.hhh.iii
          #
          # configurazione Ethernet
          ifconfig eth0 192.168.1.1 netmask $mask up
          route add -net 192.168.1.0 netmask $mask eth0
          #
          # configurazione ppp0  (avvio del collegamento punto-a-punto,
          # configura il percorso di default)
          pppd
          route add default ppp0
          #
          # configurazione della periferica Tunnel
          ifconfig tunl0 192.168.1.1 up
          route add -net 192.168.2.0 netmask $mask gw $remotegw tunl0






  Il router `B' dovr essere configurato con uno script simile:



               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=aaa.bbb.ccc.ddd
               #
               # configurazione Ethernet
               ifconfig eth0 192.168.2.1 netmask $mask up
               route add -net 192.168.2.0 netmask $mask eth0
               #
               # configurazione ppp0  (avvio del collegamento punto-a-punto,
               # configura il percorso di default)
               pppd
               route add default ppp0
               #
               # configurazione della periferica Tunnel
               ifconfig tunl0 192.168.2.1 up
               route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0






  Il comando:



               route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0





  significa: `Manda tutti i pacchetti destinati a 192.168.1.0/24
  incapsulati entro un datagramma IPIP con indirizzo di destinazione
  aaa.bbb.ccc.ddd'.

  Si noti che le configurazioni delle due macchine sono simmetriche.  Il
  dispositivo tunnel usa l'opzione `gw' nell'informazione di
  instradamento come destinazione del pacchetto IP incapsulante.  Tale
  macchina deve sapere come de-capsulare i pacchetti IPIP, in altre
  parole deve anch'essa essere configurata con un dispositivo tunnel.


  6.8.2.  Una configurazione di calcolatore con tunnel

  Non occorre aver bisogno di instradare un'intera rete. Si pu per
  esempio instradare un singolo indirizzo IP. In questo caso si
  configurer l'interfaccia tunl sulla macchina remota con il suo
  proprio indirizzo IP, mentre all'estremo A si user un normale
  instradamento di host (usando Proxy Arp), piuttosto che
  un'instradamento di rete attraverso l'interfaccia tunnel. Si deve
  ridisegnare e modificare a questo fine la configurazione precedente.
  Adesso c' un solo calcolatore `B' che vuole comportarsi come se fosse
  completamente connesso a Internet e anche parte della rete supportata
  dall'host `A':



        192.168.1/24

            -
            |      ppp0 =                ppp0 =
            |  aaa.bbb.ccc.ddd      fff.ggg.hhh.iii
            |
            |   /-----\                 /-----\
            |   |     |       //        |     |
            |---|  A  |------//---------|  B  |
            |   |     |     //          |     |
            |   \-----/                 \-----/
            |                      anche: 192.168.1.12
            -




  Il router  `A' sar cos configurato tramite lo script:



               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=fff.ggg.hhh.iii
               #
               # configurazione Ethernet
               ifconfig eth0 192.168.1.1 netmask $mask up
               route add -net 192.168.1.0 netmask $mask eth0
               #
               # configurazione ppp0  (avvio del collegamento punto-a-punto,
               # configura il percorso di default)
               pppd
               route add default ppp0
               #
               # configurazione della periferica Tunnel
               ifconfig tunl0 192.168.1.1 up
               route add -host 192.168.1.12 gw $remotegw tunl0
               #
               # Proxy ARP per l'host remoto
               arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub





  Il calcolatore Linux `B' sar configurato con:



               #!/bin/sh
               PATH=/sbin:/usr/sbin
               #
               # configurazione ppp0  (avvio del collegamento punto-a-punto,
               # configura il percorso di default)
               pppd
               route add default ppp0
               #
               # configurazione della periferica Tunnel
               ifconfig tunl0 192.168.1.12 up
               route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0






  Questo tipo di configurazione  tipico per le applicazioni di Mobile-
  IP. In questo caso un singolo calcolatore vuole spostarsi in Internet
  e mantenere un singolo indirizzo IP per tutto il tempo. Nella sezione
  su Mobile-IP ci sono ulteriori informazioni su come affrontare in
  pratica questo problema.


  6.9.  Mascheramento IP (IP Masquerade) per Linux-2.0

  Molte persone si connettono a Internet attraverso un semplice accesso
  telefonico. Quasi tutti quelli che hanno questo tipo di configurazione
  hanno solo un indirizzo IP destinato a loro dall'Internet Provider.
  Questo  di solito sufficiente per collegare una sola macchina alla
  rete. Il mascheramento IP (IP masquerading)  un trucco intelligente
  che permette di avere molte macchine che usino un singolo indirizzo
  IP, facendo in modo che i calcolatori aggiuntivi sembrino (da cui il
  termine "mascheramento") quello che ha il collegamento telefonico. C'
  per un piccolo problema, ed  che la funzione di mascheramento
  funziona quasi sempre in una sola direzione, per cui i calcolatori
  mascherati possono chiamare all'esterno ma non possono accettare
  connessioni dall'esterno.  Questo vuol dire che alcuni servizi di rete
  (ad esempio talk) non funzionano mentre altri, tra cui ftp, devono
  essere configurati per operare in modo passivo (PASV) per poter essere
  usati. Per fortuna i servizi pi comuni, come telnet, WWW e irc
  funzionano perfettamente.


  Opzioni di compilazione del kernel:


               Code maturity level options  --->
                   [*] Prompt for development and/or incomplete code/drivers
               Networking options  --->
                   [*] Network firewalls
                   ....
                   [*] TCP/IP networking
                   [*] IP: forwarding/gatewaying
                   ....
                   [*] IP: masquerading (EXPERIMENTAL)






  Normalmente si avr la propria macchina Linux collegata tramite una
  linea telefonica con slip o PPP, come se fosse un normale calcolatore
  isolato.  Inoltre avr un'altra periferica di rete attiva,
  probabilmente un'interfaccia ethernet, configurata usando uno degli
  indirizzi di rete riservati. I calcolatori da mascherare saranno su
  questa seconda rete.  Ognuno di questi calcolatori user l'indirizzo
  ethernet della macchina Linux configurato come proprio router.

  Una tipica configurazione potrebbe apparire come la seguente:


       -                                   -
        \                                  | 192.168.1.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |                | Linux | .1.1 |
       NET =================| masq  |------|
           |    PPP/slip    | router|      |  --------
          /                 ---------      |--| host |
         /                                 |  |      |
        /                                  |  --------
       -                                   -





  I comandi pi importanti per questa configurazione sono i seguenti:



               # Instradamento per la ethernet
               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
               #
               # Instradamento di default per il resto della rete.
               root# route add default ppp0
               #
               # Facciamo in modo che tutte le macchine sulla rete 192.168.1/24
               # siano mascherate
               root# ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0





  Se siete minimalisti e non avete voglia di pigiare troppi tasti, come
  me, e la macchina mascherante ha due sole interfacce (per cui ogni
  pacchetto che vi transita dev'essere mascherato), il seguente comando
  sar sufficiente:



               root# /sbin/ipfwadm -F -a accept -m





  Si possono trovare ulteriori informazioni sulla funzionalit di
  mascheramento IP di Linux su pagina dell'IP Masquerade
  <http://www.hwy401.com/achau/ipmasq/>.  Inoltre un ben dettagliato
  documento circa il mascheramento  `IP-Masquerade mini-HOWTO'.
  Fornisce anche istruzioni su come configurare altri sistemi operativi
  per utilizzare un server di mascheramento linux).


  6.10.  IP Transparent Proxy

  Il "proxy trasparente"  una funzionalit che permette di ridirigere
  dei server o dei servizi destinati ad un'altra macchina verso server e
  servizi su questa stessa macchina. Di solito questo  utile quando si
  usa un calcolatore Linux come router che fa anche da server proxy.  Si
  vuole in questo caso ridirigere tutte le connessioni dirette ad un
  dato servizio su macchine remote verso il server locale.


  Opzioni di compilazione del kernel:


               Code maturity level options  --->
                       [*] Prompt for development and/or incomplete code/drivers
               Networking options  --->
                       [*] Network firewalls
                       ....
                       [*] TCP/IP networking
                       ....
                       [*] IP: firewalling
                       ....
                       [*] IP: transparent proxy support (EXPERIMENTAL)





  La configurazione delle capacit di proxy trasparente si effettua
  usando il comando ipfwadm.


  Un esempio che potrebbe rivelarsi utile  il seguente:



               root# ipfwadm -I -a accept -D 0/0 telnet -r 2323






  Questo esempio fa s che ogni tentativo di connettersi alla porta
  telnet (23) di qualunque host venga rediretto verso la porta 2323 di
  questo calcolatore. Se viene fatto girare un servizio su tale porta,
  risulta possibile fare il forward delle connessioni telnet,
  registrarle o fare qualsivoglia altra operazione che soddisfi le
  proprie necessit.

  Un esempio pi interessante consiste nel redirigere tutto il traffico
  http verso una cache locale. D'altra parte, il protocollo usato dai
  server proxy  diverso dall'http nativo: mentre un client che si
  connette a www.server.com:80 chieder la pagine /path/page, un client
  che si connette al proxy locale contatta proxy.local.domain:8080 e
  richiede www.server.com/path/page.

  Per filtrare una richiesta http attraverso il proxy locale, occorre
  adattare il protocollo, tramite l'inserimento di un piccolo server,
  chiamato transproxy ( possibile trovarlo sulla rete). Si pu decidere
  di far andare transproxy sulla porta 8081 e usare il seguente comando:





          root# ipfwadm -I -a accept -D 0/0 80 -r 8081






  Il programma transproxy quindi ricever tutti i pacchetti che
  dovrebbero raggiungere server esterni alla rete locale e li passer al
  proxy locale sistemando le differenze di protocollo.


  6.11.  IPv6

  Proprio nel momento in cui si credeva di aver iniziato a capire come
  funzionano le reti IP, le regole sono cambiate! IPv6  l'abbreviazione
  usata per riferirsi alla versione 6 del protocollo internet. IPv6 
  stato sviluppato principalmente per risolvere i timori della comunit
  Internet riguardo alla prossima saturazione dello spazio di indirizzi
  IP.  Gli indirizzi IPv6 sono lunghi 16 byte (128 bit). IPv6 incorpora
  un certo numero di altri cambiamenti, principalmente semplificazioni,
  che renderanno le reti IPv6 pi gestibili di quelle IPv4.

  Linux contiene un'implementazione funzionante, ma non completa, del
  protocollo IPv6 nella serie 2.1.* dei kernel.

  Chi vuole sperimentare questa nuova generazione di tecnologia
  Internet, o ha bisogno di essa, dovrebbe leggere il documento
  IPv6-FAQ, diponibile presso  www.terra.net
  <http://www.terra.net/ipv6/>.


  6.12.  IP mobile

  L'espressione "Mobile-IP" descrive l'abilit di un calcolatore di
  muovere la propria connessione di rete da un punto di Internet ad un
  altro senza cambiare il proprio indirizzo IP e senza perdere la
  connettivit.  Di solito, quando un calcolatore IP cambia il suo punto
  di connessione deve anche cambiare indirizzo IP.  La mobilit IP
  risolve questo problema allocando un indirizzo IP fisso per il
  calcolatore mobile e usando l'incapsulazione IP (il tunneling) con
  instradamento automatico, per assicurarsi che i pacchetti destinati a
  tale calcolatore siano instradati all'indirizzo IP che sta usando al
  momento.

  C' un progetto attivo al fine di fornire un insieme completo di
  strumenti per la mobilit IP sotto Linux. Lo stato attuale del
  progetto e gli strumenti sviluppati si possono trovare alla home page
  del Mobile-IP per Linux <http://anchor.cs.binghamton.edu/~mobileip/>.


  6.13.  Multicast

  Il multicast IP permette ad un numero arbitrario di host IP su reti IP
  diverse di avere instradati verso di loro simultaneamente i pacchetti
  IP. Questo meccanismo viene usato per distribuire su Internet
  materiale "broadcast", come le trasmissioni audio e video, o altre
  applicazioni innovative.

  Opzioni di compilazione del kernel:






  Networking options  --->
          [*] TCP/IP networking
          ....
          [*] IP: multicasting




   richiesto a tal fine un pacchetto di programmi e un minimo sforzo di
  configurazione. Si pu fare riferimento a Multicast-HOWTO <Multicast-
  HOWTO.html> per maggiori informazioni sul supporto al multicast in
  Linux.


  6.14.  NAT - Network Address Translation

  La funzionalit di traduzione degli indirizzi di rete  in qualche
  modo il fratello maggiore standardizzato del mascheramento IP di
  Linux. Si possono trovare i dettagli nel RFC-1631 in un qualunque
  archivio di RFC. Il NAT offre delle funzionalit non fornite dal
  mascheramento dei pacchetti; queste capacit aggiuntive lo rendono
  molto pi adatto all'uso nei progetti di router che facciano da
  firewall per gruppi di aziende e per installazioni su larga scala.

  Una implementazione di prova del NAT per Linux 2.0.29  stata
  sviluppata da Michael Hasenstein, Michael.Hasenstein@informatik.tu-
  chemnitz.de. La documentazione e l'implementazione di Michael si
  possono recuperare dalla pagina web del `Linux IP Network Address'
  <http://www.csn.tu-chemnitz.de/HyperNews/get/linux-ip-nat.html>

  I pi recenti kernel 2.1.* includono parte della funzionalit NAT
  negli algoritmi di instradamento.


  6.15.  Il `Traffic Shaper' - Come cambiare l'ampiezza di banda asseg
  nata

  Il `traffic shaper' (limitatore di banda)  un driver per creare nuovi
  dispositivi di rete. Tali dispositivi sono caratterizzati da una
  limitazione del traffico consentito in base all'utente. Si basano
  sulle interfacce fisiche di rete per l'effettiva trasmissione e
  possono essere usati come percorsi di instradamento in uscita per il
  traffico di rete.


  Il `traffic shaper'  stato introdotto a partire da Linux 2.1.15 e
  portato sul Linux-2.0.36 a partire dalla patch 2.0.36-pre-patch-2
  distribuita da Alan Cox autore del driver e manutentore di Linux-2.0.


  Il `traffic shaper' pu essere compilato solo come modulo e viene
  configurato tramite il programma shapecfg con comandi simili ai
  seguenti:



               shapecfg attach shaper0 eth1
               shapecfg speed shaper0 64000






  Tale dispositivo pu controllare solo l'ampiezza di banda del traffico
  in uscita, dato che i pacchetti sono trasmessi attraverso lo `shaper'
  secondo le tabelle di instradamento. Dunque una funzionalit di
  "instradamento secondo l'indirizzo sorgente" potrebbe aiutare a
  limitare lo spreco di banda da parte di specifici host usando un
  router Linux.


  Linux-2.1 supporta gi tale tipo di instradamento, se  necessario su
  un Linux-2.0 si pu utilizzare la patch di Mike McLagan, presso
  ftp.invlogic.com. Si pu fare riferimento a
  Documentation/networking/shaper.txt per ulteriori informazioni sul
  `traffic shaper'.


  Se si desidera provare un limitatore (sperimentale) per i pacchetti in
  entrata, c' rshaper-1.01 (o una versione pi recente), da
  ftp.systemy.it <ftp://ftp.systemy.it/pub/develop>.


  6.16.  Instradamento (routing) in Linux-2.2

  Le versioni pi recenti di Linux-2.1 offrono un sacco di flessibilit
  nella gestione dell'instradamento. Sfortunatamente dovete aspettare la
  prossima versione di questo howto o andare a leggere i sorgenti del
  kernel.



  6.17.  ISDN

  La "rete digitale di servizi integrati" (Integrated Services Digital
  Network - ISDN) consiste in una serie di standard che definiscono una
  rete di trasmissione dati a commutazione di circuito per uso generale.
  Una "chiamata" ISDN crea un servizio di trasmissione dati punto-a-
  punto sincrono verso la destinazione. La rete ISDN in genere passa su
  una connessione ad alta velocit che viene poi suddivisa in un numero
  di canali discreti (i "canali B"), che portano effettivamente i dati
  dell'utente, e un "canale D" che viene usato per mandare le
  informazioni di controllo ai commutatori ISDN, per effettuare le
  chiamate e altre funzioni. In Australia, per esempio, ISDN pu
  viaggiare su una connessione a 2 megabit per secondo che viene
  suddiviza in 30 canali B discreti da 64 kilobit per secondo e un
  canale D sempre da 64 kilobit.  Qualunque numero di canali pu essere
  usato in ogni momento e in ogni combinazione. Si possono per esempio
  effettuare 30 chiamate a 30 destinazioni diverse, ciascuna di queste a
  64 Kbit, oppure 15 chiamate a 15 destinazioni, ciascuna da 128 Kbit
  (due canali per chiamata), oppure si pu fare un numero minore di
  chiamate e lasciare il resto delle linee inattive. Un canale pu
  essere usato per chiamate entranti o uscenti. L'intenzione originale
  di ISDN era quella di permettere alle aziende di telecomunicazione di
  fornire un singolo servizio dati che potesse portare sia la
  comunicazione telefonica (tramite la digitalizzazione della voce) sia
  i servizi dati verso le case e gli uffici degli utenti senza
  richiedere speciali modifiche alla configurazione.

  Ci sono diversi modi per connettere il proprio computer ad un servizio
  ISDN.  Un modo  quello di usare una perifericha chiamata "Adattatore
  di Terminale", che si inserisce nell'"Unit di Terminazione di Rete"
  che viene installata dalla propria compagnia di telecomucazioni quando
  consegna il servizio ISDN.  Tale Adattatore di Terminale offre in
  uscita svariate interfacce seriali.  Una di queste interfacce viene
  usata per dare comandi al fine di effettuare le chiamate e la
  configurazione, mentre le altre sono connesse alle interfacce di rete
  che, una volta connesse, useranno i circuiti dati.  In questa
  situazione Linux lavora senza alcun bisogno di modifiche, basta
  trattare la porta dell'adattatore di terminale come se fosse una
  qualsiasi interfaccia seriale. Un'alternativa, che  quella per cui il
  supporto ISDN di Linux  stato progettato,  installare una scheda
  ISDN nella propria macchina Linux e permettere al software di sistema
  di gestire i protocolli ed effettuare le chiamate.


  Opzioni di compilazione del kernel:


               ISDN subsystem  --->
                       <*> ISDN support
                       [ ] Support synchronous PPP
                       [ ] Support audio via ISDN
                       < > ICN 2B and 4B support
                       < > PCBIT-D support
                       < > Teles/NICCY1016PC/Creatix support






  L'implementazione Linux di ISDN supporta un certo numero di schede
  ISDN diverse. Queste sono quelle elencate nelle opzioni di
  configurazione del kernel:


    ICN 2B and 4B

    Octal PCBIT-D

    Schede ISDN Teles e compatibili


  Alcune di queste schede richiedono, per funzionare, che venga loro
  scaricato del software aggiuntivo. C' un programma separato che
  svolge questa funzione.

  Maggiori dettagli su come configurare il supporto ISDN per Linux sono
  disponibili nella directory /usr/src/linux/Documentation/isdn/.  Una
  FAQ (Frequently Asked Questions) dedicata a isdn4linux (ISDN per
  Linux)  disponibile presso www.lrz-muenchen.de <http://www.lrz-
  muenchen.de/~ui161ab/www/isdn/>.  (Cliccando sulla bandiera inglese si
  ottiene la versione inglese).

  Una nota su PPP. La suite di protocolli PPP funziona sia su linee
  seriali asincrone che sincrone. Il server PPP distribuito normalmente
  per Linux `pppd' funziona solo in modo asincrono. Se si vuole far
  girare i protocolli PPP sul proprio sevizio ISDN occorre una versione
  modificata a tal fine. I dettagli su dove trovare tale programma fanno
  parte della documentazione presentata qui sopra.


  6.18.  PLIP per Linux-2.0

  I nomi delle periferiche PLIP sono `plip0', `plip1 e plip2.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   <*> PLIP (parallel port) support




  plip (Parallel Line IP),  come SLIP per il fatto che viene usato per
  avere una connessione di rete punto-a-punto tra due macchine, solo che
   progettato per usare la porta parallela dei calcolatori invece della
  porta seriale (lo schema del cavo  incluso pi avanti in questo
  stesso documento). Siccome  possibile trasmettere pi di un bit per
  volta con la porta parallela, con plip si pu ottenere una velocit di
  trasferimento dati pi alta di quella che si ottiene con la porta
  seriale. Inoltre, anche le porte parallele pi semplici possono essere
  usate, mentre per usare le porte seriali a velocit accettabili
  occorre comperare delle UART 16550AFN che sono relativamente pi care.
  PLIP usa molto tempo macchina in confronto ad una connessione seriale
  e molto probabilmente non  una buona soluzione per chi pu trovare
  delle schede ethernet economiche. PLIP ha per il grosso vantaggio di
  funzionare quando non si ha altro a disposizione, e di farlo
  abbastanza bene.  Ci si pu aspettare una velocit di trasferimento
  dati di 20 kB per secondo quando la connessione funziona a regime.

  Il driver PLIP  in competizione con il driver per la stampante
  parallela per quanto riguarda l'accesso alla periferica fisica. Se si
  desidera utilizzare entrambi i driver bisogna compilarli sotto forma
  di modulo per poter scegliere quali interfacce parallele dedicare a
  PLIP e quali alla stampante. Si veda il Modules-HOWTO <Modules-
  HOWTO.html> per avere ulteriori informazioni riguardo alla
  configurazione dei moduli.

  Si noti che alcuni portatili usano delle porte che non funzionano con
  PLIP perch non permettono alcune combinazioni di segnali necessarie
  per il funzionamento di PLIP, ma che non vengono usate dalle
  stampanti.

  L'interfaccia plip di Linux  compatibile con il packet-driver PLIP
  della Crynwyr, questo significa che si pu connettere una macchina DOS
  ad una macchina Linux tramite plip, a patto che la macchina DOS abbia
  qualche tipo di software tcp/ip.

  Nella serie 2.0 di kernel Linux le periferiche PLIP sono mappate sulle
  porte di I/O e sulle linee di interruzione in questo modo:



               dispositivo  indirizzo I/O    IRQ
               -----------  -------------    -----
                  plip0         0x3BC          5
                  plip1         0x378          7
                  plip2         0x278          2






  Se le porte parallele usate non corrispondono alle combinazioni qui
  sopra, si pu cambiare il numero di interrupt associato ad una porta
  tramite il comando ifconfig usando il parametro `irq'.  Bisogna
  assicurarsi di abilitare la generazione di interrupt sulla porta
  stampante dalla configurazione del BIOS se si vuole usare PLIP.  Come
  alternativa, si possono specificare le opzioni `io=' e `irq=' sulla
  linea di comando di insmod, se si usano i moduli. Ad esempio:



               root# insmod plip.o io=0x288 irq=5




  Il funzionamento di PLIP  controllato tramite due timeout, i cui
  valori di default probabilmente vanno bene nella maggior parte dei
  casi.  Potrebbe essere necessario incrementare i valori nel caso si
  usi un elaboratore particolarmente lento, nel qual caso bisogna
  aumentare il valore di timeout dell'altro elaboratore. Esiste un
  programma, plipconfig, che permette di cambiare tali valori dei timer
  senza dover ricompilare il kernel; tale programma  presente in tutte
  le maggiori distribuzioni Linux.


  Per configurare un interfaccia plip  necessario lanciare i seguenti
  comandi (o aggiungerli ai propri script di inizializzazione):



               root# /sbin/ifconfig plip1 plip_locale pointopoint plip_remoto
               root# /sbin/route add plip_remoto plip1






  Nell'esempio viene usata la porta all'indirizzo di I/O 0x378;
  plip_locale e plip_remoto sono i nomi o gli indirizzi IP usati nella
  connessione PLIP. Personalmente uso metterli tra le voci del mio
  /etc/hosts:



               # nomi per plip
               192.168.3.1   plip_locale
               192.168.3.2   plip_remoto






  Il parametro pointopoint ha lo stesso significato che in SLIP,
  specifica cio l'indirizzo della macchina all'altro capo della
  connessione.


  In quasi tutti i casi si pu trattare un'interfaccia plip come fosse
  un'interfaccia SLIP, eccetto che n dip n slattach possono o debbono
  venir usati.


  Ulteriori informazioni su PLIP si possono trovare in `PLIP mini-
  HOWTO'.


  6.19.  PLIP per Linux-2.2

  Durante lo sviluppo delle versioni 2.1 del kernel, il supporto per la
  porta parallela  stato migliorato.


  Opzioni di compilazione del kernel:






          General setup  --->
              [*] Parallel port support
          Network device support  --->
              <*> PLIP (parallel port) support







  Il nuovo codice per PLIP si comporta come quello vecchio (usa gli
  stessi comandi ifconfig e route visti nella sezioni precedente) ma
  l'inizializzazione della periferica  diversa a causa del supporto per
  le porte parallele avanzate.


  In modo simile a quanto accade per le schede Ethernet, il primo
  dispositivo PLIP riconosciuto dal kernel viene chiamato `plip0'. La
  porta parallela effettivamente utilizzata  una di quelle disponibili,
  come mostrato in /proc/parport. Ad esempio se sul proprio sistema 
  presente una sola porta parallela, ci sar una sola sottodirectory:
  /proc/parport/0.


  Nel caso il proprio kernel non riconosca da s la linea di interrupt
  usata dalla porta, il comando `insmod plip' non andr a buon fine. In
  questo caso sar sufficiente scrivere il valore corretto in
  /proc/parport/0/irq e lanciare nuovamente insmod.


  Informazioni esaurienti sulla gestione della porta parallela sono
  disponibili nel file Documentation/parport.txt nei sorgenti del
  kernel.


  6.20.  PPP

  I nomi delle periferiche PPP sono `ppp0', `ppp1 eccetera.  I
  dispositivi sono numerati sequenzialmente, ove il primo di essi riceve
  il numero `0'.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   <*> PPP (point-to-point) support






  La configurazione di PPP  coperta ad un buon livello di dettaglio nel
  documento PPP-HOWTO <PPP-HOWTO.html>.


  6.20.1.  Gestire una connessione permanente ad internet con pppd .

  Se si  abbastanza fortunati da avere una connessione semi-permanente
  con internet e si desidera che la propria macchina ristabilisca
  automaticamente la connessione PPP quando questa viene interrotta,
  ecco un semplice trucco per riuscirci.


  Configurare PPP in modo che possa essere avviato dall'utente root
  tramite il seguente comando:



       # pppd




  Ci si assicuri di avere attivato l'opzione `-detach' nel proprio file
  /etc/ppp/options. Poi si inserisca la linea seguente nel proprio file
  /etc/inittab, in fondo, dove si trovano le definizioni per getty:



       pd:23:respawn:/usr/sbin/pppd




  Questa linea fa s che il programma init faccia partire il programma
  pppd e lo controlli, facendolo ripartire automaticamente nel caso in
  cui termini.


  6.21.  SLIP client

  Le periferiche SLIP sono chiamate `sl0', `sl1' eccetera, dove alla
  prima periferica viene assegnato lo `0', e alle altre i numeri
  successivi, nell'ordine in cui vengono configurate.


  Opzioni di compilazione del kernel:


               Network device support  --->
                   [*] Network device support
                   <*> SLIP (serial line) support
                   [ ]  CSLIP compressed headers
                   [ ]  Keepalive and linefill
                   [ ]  Six bit SLIP encapsulation






  SLIP (Serial Line Internet Protocol) permette di usare tcp/ip su una
  linea seriale, sia si tratti di una linea telefonica con collegato un
  modem, o una linea dedicata di qualche altro tipo.  Naturalmente, per
  usare SLIP occorre accedere ad uno SLIP-server nella propria area.
  Molte universit e molte aziende in tutto il mondo offrono accesso
  tramite SLIP.

  SLIP usa la porta seriale del calcolatore per trasportare pacchetti
  IP.  Per fare questo deve prendere controllo dell'interfaccia seriale.
  Gi sappiamo che le periferiche SLIP si chiamano sl0, sl1 eccetera, ma
  come corrispondono questi nomi a quelli delle porte seriali?  Il
  codice di rete usa una chiamata ioctl (I/O control) per trasformare
  una porta seriale in una periferica SLIP. Ci sono due programmi che
  svolgono questo compito, chiamati dip e slattach.




  6.21.1.  dip

  dip (Dialup IP)  un simpatico programma che pu assegnare la velocit
  della porta seriale, dire al modem di chiamare l'altro estremo della
  connessione, autenticarsi nel server remoto e ascoltare i messaggi
  mandati dal server al fine di estrarre informazioni quale l'indirizzo
  IP. Il programma invoca poi le chiamate ioctl necessarie per
  trasformare l'interfaccia seriale in una porta SLIP. dip ha una
  potente funzionalit di "scripting", ed  questo che viene sfruttato
  per automatizzare la procedura di collegamento.

  Si pu trovare il programma su: sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/serial/dip/dip337o-
  uri.tgz>.

  Per installarlo, usare questi comandi:



               user% tar xvzf dip337o-uri.tgz
               user% cd dip-3.3.7o
               user% vi Makefile
               root# make install






  Il Makefile assume l'esistenza di un gruppo chiamato uucp, ma questo
  pu essere impostato a dip oppure a SLIP, in base alla propria
  configurazione.


  6.21.2.  slattach

  slattach, a differenza di  dip,  un programma molto semplice, facile
  da usare, ma non cos sofisticato come dip.  Non ha la capacit di
  "scripting", e tutto quello che fa  configurare la porta seriale come
  interfaccia SLIP. Il programma assume che si abbia tutta
  l'informazione necessaria, e che la comunicazione seriale sia gi
  stata stabilita prima di invocare slattach. Questo programma  ideale
  da usare quando si ha una connessione permanente con il proprio
  server, come un cavo fisico o una linea dedicata.


  6.21.3.  Come scegliere se usare l'uno o l'altro?

  Conviene usare dip quando il collegamento verso il server SLIP  un
  modem telefonico, o qualche altro tipo di collegamanto temporaneo.
  Conviene usare slattach quando si ha una linea dedicata, o un cavo
  fisico, tra la propria macchina e il server, perch in questi casi non
  occorre nessuna azione speciale per far funzionare il collegamento.
  Vedere la sezione "connessione SLIP permanente" per avere ulteriori
  informazioni.


  La configurazione di SLIP  molto simile alla configurazione di una
  interfaccia ethernet (vedere la sezione `Configurazione di un
  interfaccia ethernet', pi sopra). Nonostante ci, ci sono alcune
  differenze chiave.


  Prima di tutto, le connessioni SLIP sono diverse dalle reti ethernet,
  in quanto ci sono sempre solo due calcolatori sulla rete, uno ad ogni
  estremo della connessione. A differenza della ethernet che 
  disponibile all'uso non appena passati i cavi, con SLIP, a seconda del
  tipo di collegamento che si usa, pu essere necessario inizializzare
  la propria connessione di rete in qualche modo speciale.


  Se si usa dip, questo non verr solitamente effettuato all'avvio della
  macchina, ma qualche tempo dopo, quando si  pronti ad usare la
  connessione ed  possibile automatizzare questa procedura.  Se si usa
  slattach, probabilmente si vorr aggiungere una sezione al proprio
  file rc.inet1. Questo verr descritto tra poco.


  Ci sono due tipi principali di server SLIP: quelli che forniscono un
  indirizzo IP dinamico, e quello che lo forniscono statico. Quasi tutti
  i server SLIP chiederanno il nome utente e la password quando viene
  stabilita la connessione.  dip pu gestire automaticamente
  l'autenticazione.


  6.21.4.  SLIP server statico con linea telefonica e DIP.

  Un server SLIP statico  quello con il quale si riceve un indirizzo IP
  che  solo proprio. Ogni volta che ci si connette con il server, la
  porta viene configurata con lo stesso indirizzo. Il server statico
  risponder alla chiamata del modem, probabilmente chieder nome utente
  e password, e poi instrader tutti i pacchetti destinati all'indirizzo
  corrispondente attraverso quella connessione. Se si ha un server
  statico, probabilmente si desiderer mettere in /etc/hosts le
  associazioni tra nome della macchina e indirizzo IP (che sar noto).
  Si dovrebbero anche sistemare altri file, cio: rc.inet2, host.conf,
  resolv.conf, /etc/HOSTNAME ed rc.local.  Si ricordi che quando si
  configura rc.inet1 non occorre aggiungere alcun comando speciale per
  la connessione SLIP, poich dip fa gi tutto il lavoro impegnativo di
  configurare l'interfaccia.  Occorrer dare a dip le informazioni
  appropriate e lui configurer l'interfaccia da solo dopo aver detto al
  modem di stabilire la chiamata e dopo aver autenticato il chiamante
  presso il server SLIP.


  Se il server SLIP che si usa funziona cos, allora si pu passare
  direttamente alla sezione `Uso di Dip' per imparare come configurare
  il programma correttamente.


  6.21.5.  SLIP server dinamico con linea telefonica e DIP.

  Un server SLIP dinamico  quello che assegna un indirizzo IP
  casualmente, da un insieme di indirizzi possibili, tutte le volte che
  ci si collega. Questo significa che non c' alcuna garanzia che si
  avr un particolare indirizzo ogni volta. Significa anche che lo
  stesso indirizzo pu essere usato da qualcun altro dopo che si 
  terminata la connessione.  L'amministratore di rete che ha configurato
  il server SLIP avr ricevuto un gruppo di indirizzi da usare per il
  server: quando il server riceve una nuova chiamata sceglie il primo
  numero non utilizzato, guida l'utente nella procedura di
  autenticazione  e poi stampa un messaggio di benvenuto che contiene
  l'indirizzo IP da usarsi per la durata della chiamata.


  La configurazione per usare questo tipo di server  simile alla
  configurazione nel caso di un server statico, tranne per il fatto che
  occorre aggiungere un passo, durante il quale si ottiene l'indirizzo
  IP che il server ha scelto per questa sessione e si configura la
  periferica SLIP con quell'indirizzo.


  Ancora una volta, dip si occupa dei dettagli laboriosi. Le nuove
  versioni sono abbastanza furbe da recuperare automaticamente
  l'indirizzo IP dal messaggio di benvenuto e salvarlo per configurare
  l'interfaccia SLIP, in aggiunta a gestire il processo di
  autenticazione.


  Se il server SLIP che si usa funziona cos, allora si pu passare
  direttamente alla sezione `Uso di Dip' per imparare come configurare
  il programma correttamente.


  6.21.6.  Uso di DIP.

  Come spiegato in precedenza, dip  un programma potente che pu
  semplificare ed automatizzare il processo di chiamare il server SLIP,
  autenticarsi, iniziare la connessione e invocare i comandi ifconfig e
  route appropriati per la propria interfaccia.


  Fondamentalmente, per usare dip bisogna scrivere uno "script", che 
  in pratica una lista di comandi comprensibili a dip che dicono al
  programma come eseguire ogni azione che si vuole esegua.  Si veda il
  file sample.dip che viene distribuito con dip per avere un'idea di
  come funziona.  dip  un programma abbastanza potente, con molte
  opzioni; piuttosto che descriverle tutte qui, si consiglia di guardare
  la pagina del manuale, il file README e gli esempi che fanno parte del
  pacchetto dip.


  Si noter che lo script sample.dip assume che si sta usando un server
  SLIP statico, cio che si conosca il proprio indirizzo IP in anticipo.
  Per quando si usa un server dinamico, le versioni pi recenti di dip
  includono un comando che si pu usare per leggere automaticamente
  l'indirizzo che il server dinamico ha assegnato e configurare di
  conseguenza la periferica SLIP.  L'esempio seguente  una versione
  modificata del file sample.dip che viene distribuito con dip337j-
  uri.tgz, ed  probabilmente un buon punto di partenza.  Si pu salvare
  questo script come /etc/dipscript e modificarlo per rispecchiare la
  propria configurazione.


























  #
  # sample.dip    Programma di supporto alla connessione telefonica.
  #
  #       Questo file mostra (dovrebbe mostrare) come usare DIP
  #       Questo file dovrebbe funzionare con server dinamici tipo "Annex".
  #       Se si usa un server statico, usare il file "sample.dip" che
  #        distribuito con il pacchetto dip337-uri.tgz.
  #
  #
  # Version:      @(#)sample.dip  1.40    07/20/93
  #
  # Author:       Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  #

  main:
  # Predisporre il nome e indirizzo dell'altro estremo.
  # La mia macchina remota si chiama 'xs4all.hacktic.nl' (== 193.78.33.42)
  get $remote xs4all.hacktic.nl
  # Assegnare la netmask su sl0 a 255.255.255.0
  netmask 255.255.255.0
  # Assegnare la porta specificata e la velocit.
  port cua02
  speed 38400

  # Reinizializza il modem e la linea del terminale
  # Questo causa problemi ad alcune persone!
  reset

  # Nota: i valori di errore predefiniti sono:
  #  0 - OK
  #  1 - CONNECT
  #  2 - ERROR
  #
  # Si possono cambiare cercando "addchat()" usando "grep" su *.c...

  # Prepara la chiamata
  send ATQ0V1E1X4\r
  wait OK 2
  if $errlvl != 0 goto modem_trouble
  dial 555-1234567
  if $errlvl != 1 goto modem_trouble

  # Siamo connessi. Autentichiamoci.
  login:
  sleep 2
  wait ogin: 20
  if $errlvl != 0 goto login_trouble
  send MYLOGIN\n
  wait ord: 20
  if $errlvl != 0 goto password_error
  send MYPASSWD\n
  loggedin:

  # Adesso siamo autenticati.
  wait SOMEPROMPT 30
  if $errlvl != 0 goto prompt_error

  # Ordiniamo al server di andare in modo SLIP
  send SLIP\n
  wait SLIP 30
  if $errlvl != 0 goto prompt_error

  # Recuperiamo l'indirizzo IP dal server
  #   Si assume che dopo aver detto al server di passare in SLIP, questo
  #   stampi il nostro indirizzo.
  get $locip remote 30
  if $errlvl != 0 goto prompt_error

  # Assegnamo i parametri operativi SLIP
  get $mtu 296
  # Assicuriamoci di dare "route add -net default xs4all.hacktic.nl"
  default

  # Salutiamo e via!
  done:
  print CONNECTED $locip ---> $rmtip
  mode CSLIP
  goto exit

  prompt_error:
  print TIME-OUT waiting for sliplogin to fire up...
  goto error

  login_trouble:
  print Trouble waiting for the Login: prompt...
  goto error

  password:error:
  print Trouble waiting for the Password: prompt...
  goto error

  modem_trouble:
  print Trouble occurred with the modem...
  error:
  print CONNECT FAILED to $remote
  quit

  exit:
  exit





  L'esempio precedente assume che si stia chiamando un server SLIP
  dinamico.  Se si chiama un server statico, allora il file sample.dip
  del pacchetto dip337j-uri.tgz dovrebbe funzionare senza alcuna
  modifica.

  Quando a dip viene passato il comando get $local, il programma cerca
  una stringa che assomigli ad un indirizzo IP all'interno del testo che
  arriva dall'altra estremit della connessione; cerca cio delle
  stringhe di numeri separate dal carattere `.'.  Questa modifica 
  stata inserita specificamente per i server SLIP dinamici, in modo da
  automatizzare il processo di lettura dell'indirizzo IP fornito dal
  server.

  L'esempio precedente creer automaticamente una regola di
  instradamento di default attraverso la connessione SLIP. Se questo non
   quello che si desidera, per esempio perch si vuole avere un
  instradamento di default sulla propria ethernet, allora occorre
  rimuovere il comando default dallo script.  Dopo che questo script ha
  terminato l'esecuzione, chi provasse ad invocare ifconfig vedr che
  una periferica sl0 esiste nel sistema: si tratta della porta SLIP.  Se
  occorre, si pu modificare la configurazione di tale interfaccia
  manualmente, dopo che il comando dip ha terminato di girare, usando i
  comandi ifconfig e route.

  Si noti che dip permette di scegliere un certo numero di protocolli
  usando il comando mode, il pi comune esempio al proposito  cSLIP,
  per abilitare la compressione di SLIP.  Si noti che entrambi gli
  estremi della connessione devono essere d'accordo, e bisogna
  assicurarsi che qualunque protocollo si scelga questo corrisponda con
  quello che viene attivato dal server.

  L'esempio precedente  abbastanza robusto, e dovrebbe gestire
  correttamente la maggior parte degli errori. Si faccia riferimento
  alla pagina del manuale di dip per avere ulteriori informazioni. Si
  pu, ovviamente, fare di pi, come scrivere uno script che faccia cose
  come richiamare il server se non riesce a collegarsi entro un certo
  tempo limite, o provare una lista di server, se si ha accesso a pi di
  uno di essi.


  6.21.7.  Connessione SLIP permanente con linea dedicata e slattach.

  Se si possiede un cavo che collega due macchine, o se si  abbastanza
  fortunati da avere una linea dedicata o qualche altro tipo di
  connessione seriale permanente tra la propria macchina e un'altra,
  allora non occorre incontrare tutte le difficolt relative all'uso di
  dip al fine di preparare la propria connessione. slattach  un
  programma molto semplice da usare che offre una funzionalit
  sufficiente a configurare la propria connessione.

  Siccome la connessione sar permanente, si vorranno aggiungere alcuni
  comandi al proprio file rc.inet1. In sintesi, tutto quello che bisogna
  fare per avere una connessione permanente  assicurarsi di configurare
  la periferica seriale alla velocit corretta, e far passare la seriale
  alla modalit SLIP. slattach permette di fare questo lavoro con un
  comando solo. Le seguenti linee vanno aggiunte al proprio file
  rc.inet1:



       #
       # Attiva una connessione SLIP statica su linea dedicata
       #
       #  configura /dev/cua0 per 19.2kbps e cslip
       /sbin/slattach -p cslip -s 19200 /dev/cua0 &
       /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
       #
       # Fine configurazione SLIP statico.




  Dove:

     IPA.IPA.IPA.IPA
        rappresenta il proprio indirizzo IP.

     IPR.IPR.IPR.IPR
        rappresenta l'indirizzo IP del calcolatore remoto.


  slattach alloca la prima periferica SLIP disponibile all'interfaccia
  seriale specificata.  slattach parte da sl0, quindi il primo comando
  slattach connette la periferica SLIP sl0 alla porta seriale
  specificata. La seguente invocazione collegher sl1, eccetera.


  slattach permette di configurare uno tra diversi protocolli con
  l'argomento -p. In questo caso viene usato SLIP oppure cSLIP, a
  seconda se si voglia usare la compressione o no.  Nota: i due capi
  della connessione devono essere d'accordo se usare o meno la
  compressione.


  6.22.  Server SLIP.

  Se si possiede una macchina, magari connessa in rete, alla quale si
  vuole che altri si connettano telefonicamente per accedere ai propri
  servizi di rete, allora occorre configurare la propria macchina come
  un server.  Se si vuole usare SLIP come protocollo seriale, ci sono
  attualmente tre possibilit per configurare la propria macchina come
  server SLIP.  Personalmente preferirei la prima possibilit che sto
  per introdurre (sliplogin), in quanto sembra essere la pi semplice da
  configurare e capire. Presenter in ogni caso un'introduzione a
  ciascun metodo, in modo da permettere a tutti di fare la propria
  scelta.


  6.22.1.  Server SLIP usando sliplogin .

  sliplogin  un programma che pu essere usato al posto della normale
  shell di login per gli utenti SLIP che devono convertire il terminale
  seriale in una linea di comunicazione SLIP. Il programma permette di
  configurare la propria macchina Linux come un server di indirizzi
  statici (dove gli utenti ricevono lo stesso indirizzo IP tutte le
  volte che si connettono) oppure come un server di indirizzi dinamici
  (dove gli utenti ricevono un indirizzo che puo non essere lo stesso
  della volta precedente).

  Il chiamante si collegher come si fa per il processo standard di
  login: fornendo il proprio nome e utente e la password; ma dopo aver
  autenticato l'utente, invece di una shell il sistema eseguir
  sliplogin.  Il programma cercher poi nel suo file di configurazione
  (/etc/slip.hosts) una voce che corrisponda al nome di login
  dell'utente. Se tale voce viene trovata, la linea viene configurata ad
  8 bit e la "disciplina di linea" viene convertita a quella di SLIP.
  Quando questo processo  completo, viene svolta l'ultima parte della
  configurazione, nella quale sliplogin invoca uno script di shell che
  configura l'interfaccia SLIP con i valori IP appropriati: indirizzo,
  maschera di rete e informazioni di instradamento.  Lo script viene di
  solito chiamato /etc/slip.login, ma si possono creare script
  personalizzati per gli utenti che hanno bisogno di un'inizializzazione
  particolare, come si fa con getty. Questi script si chiameranno
  /etc/slip.login.loginname e verranno eseguiti al posto di quello di
  default per gli utenti con esigenze particolari.

  Ci sono tre o quattro file che occorre configurare perch sliplogin
  funzioni; mostrer ora come ottenere il software e come ciascuno di
  questi file viene configurato.  I file coinvolti sono:


    /etc/passwd, per gli account degli utenti telefonici.

    /etc/slip.hosts, per fornire le informazioni specifiche a ciascun
     utente.

    /etc/slip.login, che gestisce la configurazione dell'instradamento
     per l'utente.

    /etc/slip.tty, necessario solo se il server viene configurato per
     l'allocazione dinamica degli indirizzi. Tale file contiene una
     tabella di indirizzi per l'allocazione.

    /etc/slip.logout, contiene i comandi per fare pulizia dopo che un
     utente ha messo gi o si  scollegato.





  6.22.1.1.  Dove ottenere sliplogin

   probabile che il pacchetto sliplogin sia gi installato come parte
  della propria distribuzione, se questo non accade, sliplogin si pu
  trovare su: sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/linux/system/Network/serial/sliplogin-2.1.1.tar.gz>.
  Il pacchetto contiene il sorgente, dei binari precompilati e la pagina
  del manuale.

  Per assicurarsi che solo gli utenti autorizzati possano eseguire il
  programma sliplogin, bisognerebbe aggiungere una voce simile alla
  seguente nel proprio file /etc/group:



        ..
       slip::13:radio,fred
        ..





  Quando si installa il pacchetto sliplogin, il Makefile cambier il
  gruppo del programma sliplogin in modo che sia slip. Questo significa
  che solo gli utenti che appartengono a tale gruppo saranno in grado di
  eseguire il programma. L'esempio precedente permetterebbe solo agli
  utenti radio e fred di eseguire sliplogin.

  Per installare gli eseguibili nella directory /sbin e la pagina del
  manuale nella sezione 8, si fa cos:



       # cd /usr/src
       # gzip -dc .../sliplogin-2.1.1.tar.gz | tar xvf -
       # cd sliplogin-2.1.1
       # <..si modifichi il Makefile se non si usano le shadow password..>
       # make install





  Se si vogliono ricompilare gli eseguibili prima di installare, si
  aggiunga un make clean prima del make install. Se si vogliono
  installare gli eseguibili in qualche altra directory, occorre
  modificare la regola install del Makefile.

  Si legga il file README del pacchetto per ulteriori informazioni.


  6.22.1.2.  Configurazione di /etc/passwd  per gli host Slip

  Di solito si creano dei nomi utente speciali in /etc/passwd per gli
  utenti Slip. Una convenzione seguita comunemente consiste nell'usare
  il nome del calcolatore chiamante preceduta da una `s' maiuscola.
  Quindi, per esempio, se il calcolatore chiamante si chiama radio la
  voce in /etc/passwd sar simile a questa:



       Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin



  In effetti, non ha nessuna importanza come viene chiamato l'utente;
  basta che sia significativo per chi amministra il sistema.

  Nota: il chiamante non ha bisogno di una directory home, in quanto non
  usufruir di un interprete di comandi sulla macchina server, perci
  /tmp  una buona scelta. Si noti anche che il programma sliplogin
  viene usato al posto della shell di login.


  6.22.1.3.  Configurazione di /etc/slip.hosts

  Il file /etc/slip.hosts  quello che viene letto da sliplogin alla
  ricerca di voci corrispondenti al nome di login, al fine di ottenere i
  dettagli di configurazione per questo calcolatore chiamante.  Questo 
  il file in cui si specificano l'indirizzo IP e la maschera di rete da
  assegnare al chiamante e che saranno configurati per questo uso.  Due
  voci esemplificative per due calcolatori, uno con configurazione
  statica (radio) e uno con configurazione dinamica (albert) sono le
  seguenti:



       #
       Sradio   44.136.8.99   44.136.8.100  255.255.255.0  normal      -1
       Salbert  44.136.8.99   DYNAMIC       255.255.255.0  compressed  60
       #




  Le voci in  /etc/slip.hosts consistono dei seguenti campi:


  1. il nome di login del chiamante.

  2. l'indirizzo ip del server, cio di questo calcolatore.

  3. l'indirizzo IP da assegnare al chiamante. Se questo campo vale
     DYNAMIC, allora l'indirizzo sar allocato in base alle informazioni
     contenute nel file /etc/slip.tty, presentato pi avanti.  Nota:
     occorre usare almeno la versione 1.3 di sliplogin perch
     l'assegnazione dinamica funzioni.

  4. la maschera di rete per la macchina chiamante, in notazione
     decimale con punti.  Per esempio, 255.255.255.0 per una classe C.

  5. il modo SLIP, che permette di abilitare o disabilitare la
     compressione e altre caratteristiche. I valori possibili sono
     "normal" e "compressed".

  6. Un parametro di timeout che specifica per quanto tempo la linea pu
     rimanere inattiva (senza trasmissione di pacchetti) prima che venga
     automaticamente scollegata. Un valore negativo disabilita questa
     funzionalit.

  7. argomenti opzionali.


  Nota: per i campi 2 e 3 si possono usare sia i nomi degli host che gli
  indirizzi IP in notazione decimale. Se si usano i nomi, questi nomi
  devono essere risolubili, altrimenti lo script fallir quando verr
  invocato. Si pu verificare se il nome viene risolto provando a fare
  telnet verso il nome: se si riceve il messaggio `Trying
  nnn.nnn.nnn...', allora il nome viene correttamente risolto; se si
  riceve il messaggio `Unknown host', il nome non viene risolto. Se il
  nome non viene risolto bisogna usare l'indirizzo in notazione decimale
  con punti oppure bisogna sistemare la configurazione del risolutore
  (si veda la sezione sulla risoluzione dei nomi).

  I modi SLIP pi comuni sono:

     normal
        per abilitare il normale modo SLIP non compresso.

     compressed
        per abilitare la compressione degli header con l'algoritmo di
        van Jacobsen (cSLIP).

  Ovviamente, questi due modi sono mutuamente esclusivi: si pu usare
  uno o l'altro. Per ulteriori informazioni sulle opzioni disponibili si
  vedano le pagine del manuale.


  6.22.1.4.  Configurazione del file /etc/slip.login .

  Quando sliplogin ha trovato una voce corretta in /etc/slip.hosts,
  prover ad eseguire il file /etc/slip.login per assegnare indirizzo e
  maschera di rete all'interfaccia SLIP.

  Il file /etc/slip.login di esempio distribuito con il pacchetto
  sliplogin assomiglia al seguente:



       #!/bin/sh -
       #
       #       @(#)slip.login  5.1 (Berkeley) 7/1/90
       #
       # file di login generico per una linea SLIP
       # sliplogin lo invoca con i seguenti parametri:
       #     $1       $2       $3    $4, $5, $6 ...
       #   SLIPunit velocit  pid   arcomenti da slip.hosts
       #
       /sbin/ifconfig $1 $5 pointopoint $6 mtu 1500 -trailers up
       /sbin/route add $6
       arp -s $6 <hw_addr> pub
       exit 0
       #




  Si noter che questo script usa i normali comandi ifconfig e route per
  configurare l'indirizzo dell'interfaccia, l'indirizzo remoto e la sua
  maschera di rete, e per creare un instradamento per il calcolatore
  remoto attraverso l'interfaccia SLIP. Questi compiti sono gli stessi
  che vanno svolti se si usa il comando slattach.

  Si noti anche l'uso del Proxy ARP per assicurarsi che altri host sulla
  stessa ethernet del server siano in grado di raggiungere il
  calcolatore chiamante.  Il campo <hw_addr> dovrebbe essere l'indirizzo
  hardware della scheda ethernet del server. Se il server non  su una
  rete ethernet questa linea pu essere rimossa.


  6.22.1.5.  Configurazione del file /etc/slip.logout .

  Quando cade la linea ci si vuole assicurare che la periferica seriale
  ritorni al suo stato normale, in modo che altri possano collegarsi
  correttamente.  Questo compito viene svolto tramite il file
  /etc/slip.logout.  Questo file ha un formato abbastanza semplice e
  viene chiamato con gli stessi argomenti di /etc/slip.login.
               #!/bin/sh -
               #
               #               slip.logout
               #
               /sbin/ifconfig $1 down
               arp -d $6
               exit 0
               #





  Tutto quello che fa  disattivare l'interfaccia, il che causer la
  rimozione delle informazioni di instradamento associate. Lo script usa
  anche il comando arp per rimuovere le informazioni di proxy arp.
  Ancora una volta, non occorre il comando arp nello script se il server
  non ha una porta ethernet.


  6.22.1.6.  Configurazione di /etc/slip.tty .

  Se si usa l'allocazione dinamica degli indirizzi IP (se qualche host 
  configurato con la parola chiave DYNAMIC in /etc/slip.hosts), allora
  bisogna configurare il file /etc/slip.tty perch elenchi quali
  indirizzi sono assegnati alle porte. Questo file occorre solo se si
  vuole che il proprio server allochi dinamicamente gli indirizzi agli
  utenti.

  Il file  una tabella che elenca le periferiche di tipo tty che
  supportano le connessioni SLIP entranti e gli indirizzi IP che devono
  essere assegnati agli utenti che si collegano su quelle porte.

  Il suo formato  il seguente:


       # slip.tty    mappatura terminale -> indirizzo IP per lo SLIP dinamico
       # formato: /dev/tty?? xxx.xxx.xxx.xxx
       #
       /dev/ttyS0      192.168.0.100
       /dev/ttyS1      192.168.0.101
       #





  Quello che questa tabella dice  che gli utenti che chiamano su
  /dev/ttyS0 e che hanno l'indirizzo assegnato a DYNAMIC in
  /etc/slip.hosts, devono ricevere l'indirizzo 192.168.0.100.

  In questo modo occorre allocare solo un indirizzo per porta per tutti
  gli utenti che non hanno bisogno di un indirizzo dedicato. Questo
  aiuta a tenere al minimo il numero di indirizzi necessari, per evitare
  sprechi.


  6.22.2.  Server Slip che usa dip .

  Lasciatemi dire fin dall'inizio che alcune delle informazioni seguenti
  vengono dalle pagine del manuale di dip, dove  spiegato brevemente
  come far girare Linux come server SLIP. Bisogna anche fare attenzione
  al fatto che le informazioni seguenti si basano sul pacchetto dip337o-
  uri.tgz, e probabilmente non si applicano ad altre versioni di dip.


  dip offre un modo operativo "di input", nel quale trova
  automaticamente in /etc/diphosts la voce corrispondente all'utente che
  lo ha chiamato, e configura la porta seriale come connessione SLIP in
  base alle informazioni che trova nel file.  Questo modo di inpupt
  viene attivato chiamando il programma dip come diplogin. Per usare dip
  come server SLIP, perci, basta creare degli account che usino
  diplogin come shell.

  La prima cosa da fare  creare un link simbolico come segue:



       # ln -sf /usr/sbin/dip /usr/sbin/diplogin




  Poi occorre aggiungere le voci ai file /etc/passwd ed /etc/diphosts.
  Le voci da creare sono fatte come segue.

  Per configurare Linux come server SLIP con dip, occorre creare gli
  account SLIP per gli utenti, dove il comando dip  usato in modalit
  input come shell. Una convenzione suggerita  quella di usare una `S'
  maiuscola all'inizio dei nomi di account SLIP.

  Una voce esemplificativa in /etc/passwd per un utente SLIP  la
  seguente:



       Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
       ^^         ^^        ^^  ^^   ^^   ^^   ^^
       |          |         |   |    |    |    \__ diplogin come shell
       |          |         |   |    |    \_______ directory home
       |          |         |   |    \____________ nome dell'utente
       |          |         |   \_________________ group ID
       |          |         \_____________________ user ID
       |          \_______________________________ password crittata
       \__________________________________________ nome utente slip





  Dopo che l'utente si  collegato, il programma login, dopo aver
  autenticato l'utente, eseguir il comando diplogin.  dip, quando viene
  invocato con il nome di diplogin sa che deve assumere di essere usato
  come shell dell'utente. La prima cosa che fa quando viene invocato
  come diplogin  usare la funzione getuid() per sapere la UID
  dell'utente che l'ha invocato.  Poi cerca in /etc/diphosts la prima
  voce che corrisponde o al nome della periferica che ha ricevuto la
  chiamata oppure al nome utente, e si configura di conseguenza. Si pu
  creare un server che si comporti come server statico per alcuni utenti
  e come server dinamico per gli altri, creando una voce nel file
  diphosts per i primi e lasciando la configurazione di default per i
  secondi.

  dip, quando chiamato in "modo input" aggiunge automaticamente una voce
  `Proxy-ARP', per cui non occorre preocuparsi di svolgere questo
  compito manualmente.


  6.22.2.1.  Configurazione di /etc/diphosts

  /etc/diphosts viene usato da dip per recuperare le informazioni di
  configurazione per i calcolatori remoti. Tali calcolatori possono
  essere utenti che si collegano telefonicamente a questa macchina
  linux, oppure macchine che vengono chiamate da questa.

  Il formato generale per /etc/diphosts  il seguente:



        ..
       Suwalt::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
       ttyS1::145.71.34.3:145.71.34.2:255.255.255.0:Dynamic ttyS1:CSLIP,296
        ..




  I campi sono:

  1. nome di login: come ritornato da getpwuid(getuid()), o il nome del
     terminale.

  2. inutilizzato: compatibile con /etc/passwd

  3. indirizzo remoto: indirizzo IP dell'host chiamante, numerico o nome

  4. indirizzo locale: indirizzo IP di questa macchina, numerico o nome

  5. Netmask: in notazione decimale con punti

  6. Commento: si scriva quello che si vuole

  7. protocollo: Slip, CSlip eccetera

  8. MTU: numero decimale

  Un esempio di voce di /etc/net/diphosts relativa ad un utente SLIP
  remoto potrebbe essere:



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296




  che specifica una connessione SLIP con un indirizzo remoto di
  145.71.34.1 e una MTU di  296. Oppure:



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006




  specifica una connessione SLIP con un indirizzo remoto di 145.71.34.1
  e una MTU di 1006.

  Perci, tutti gli utenti ai quali si vuole dare un indirizzo IP
  statico avranno una voce corrispondente in /etc/diphosts, mentre chi
  deve ricevere un indirizzo dinamico associato alla porta che viene
  chiamata deve avere una voce associata alla periferica invece che al
  suo nome.  Bisogna ricordarsi di creare almeno una voce per ciascuna
  periferica tty alla quale gli utenti possono connettersi
  telefonicamente, per assicurarsi che sia sempre disponibile una
  configurazione appropriata indipendentemente da quale modem riceva la
  chiamata.
  Quando un utente si collegher, ricever una normale richiesta di
  login e password, alla quale risponder con il proprio nome utente e
  la propria password. Se questi saranno corretti non si vedranno altri
  messaggi e sar sufficiente che ai due capi della connessione si passi
  in modo SLIP per avere una connessione funzionante configurata con i
  parametri del file diphosts.


  6.22.3.  Server SLIP che usa il pacchetto dSLIP .

  Matt Dillon <dillon@apollo.west.oic.com> ha scritto un pacchetto che
  non solo permette le connessioni SLIP entranti, ma anche quelle
  uscenti. Il pacchetto di Matt  una combinazione di piccoli programmi
  e di script che gestiscono le connessioni. Occorre avere tcsh
  installata, perch almeno uno degli script usa questa shell. Matt
  fornisce nel pacchetto una copia binaria dell'utility expect, perch
  anch'essa  richiesta da uno degli script.  Probabilmente occorrer un
  po' di esperienza con expect per far funzionare il pacchetto a proprio
  piacimento, ma non conviene lasciarsi intimidire da ci.

  Matt ha scritto un buon insieme di istruzioni di installazione nel
  file README, perci non le ripeter qui.

  Il pacchetto dSLIP si pu ottenere dal suo sito ftp:

  apollo.west.oic.com


       /pub/linux/dillon_src/dSLIP203.tgz




  oppure da:

  sunsite.unc.edu


       /pub/Linux/system/Network/serial/dSLIP203.tgz




  L'unica attenzione da porre  che occorre leggere il file README e
  creare le voci in /etc/passwd ed /etc/group prima di fare make
  install.


  7.  Altre Tecnologie di Rete

  Le sottosezioni successive contengono informazioni specifiche a
  particolari tecnologie di rete. Le informazioni contenute in queste
  sezioni non si applicano necessariamente ad altri tipi di tecnologie
  di rete.  Gli argomenti sono presentati in ordine alfabetico.


  7.1.  ARCNet

  I nomi delle periferiche ARCNet sono `arc0e', `arc1e', `arc2e'
  eccetera, oppure `arc0s', `arc1s', `arc2s' eccetera.  La prima scheda
  che viene vista dal kernel prende il nome di `arc0e' o `arc0s' e le
  altre prendono sequenzialmente gi altri nomi, nell'ordine in cui
  vengono viste. La lettera finale indica se l'interfaccia usa un
  incapsulamento dei pacchetti di tipo ethernet o il formato standard
  secondo l'RFC1051.

  Opzioni di compilazione del kernel:


               Network device support  --->
                   [*] Network device support
                   <*> ARCnet support
                   [ ]   Enable arc0e (ARCnet "Ether-Encap" packet format)
                   [ ]   Enable arc0s (ARCnet RFC1051 packet format)





  Una volta che il kernel  stato propriamente ricompilato per
  supportare le schede di rete ARCNet, la configurazione delle schede
  stesse risulta abbastanza semplice.

  Normalmente verranno usati comandi come:



               root# ifconfig arc0e 192.168.0.1 netmask 255.255.255.0 up
               root# route add -net 192.168.0.0 netmask 255.255.255.0 arc0e





  Consiglio di riferirsi ai file
  /usr/src/linux/Documentation/networking/arcnet.txt e
  /usr/src/linux/Documentation/networking/arcnet-hardware.txt per avere
  ulteriori informazioni sull'argomento.

  Il supporto per ARCNet  stato sviluppato da Avery Pennarun,
  apenwarr@foxnet.net.


  7.2.  Appletalk ( AF_APPLETALK )

  Il protocollo Appletalk non ha bisogno di nomi particolari per i
  dispositivi, in quanto usa i dispositivi di rete esistenti.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   <*> Appletalk DDP





  Il supporto per Appletalk permette alle macchine Linux di lavorare
  insieme alle reti Apple. Un uso importante di questa abilit  la
  condivisione di risorse, come stampanti e dischi, tra computer Linux e
  Apple.  Per utilizzare Appletalk occorre del software aggiuntivo, che
  prende il nome di netatalk. Wesley Craig netatalk@umich.edu  il
  rappresentante di un gruppo chiamato `Research Systems Unix Group' che
  lavora all'Universit del Michigan e ha prodotto il pacchetto
  netatalk, contenente software che implementa lo stack di protocolli
  Appletalk e alcuni utili programmi di servizio.  Il pacchetto
  netatalk. se non  supportato dalla vostra distribuzione, deve essere
  recuperato dal suo sito tramite ftp: University of Michigan
  <ftp://terminator.rs.itd.umich.edu/unix/netatalk/>

  Per compilare ed installare il pacchetto occorre fare qualcosa come:



               user% tar xvfz .../netatalk-1.4b2.tar.Z
               user% make
               root# make install






  Potrebbe essere utile editare il `Makefile' prima di chiamare make per
  compilare effettivamente il programma. In particolare potrebbe essere
  utile cambiare la variabile DESTDIR, che definisce dove verranno
  successivamente installati i file. Una buona scelta  il valore
  predefinito /usr/local/atalk.


  7.2.1.  Configurazione del software Appletalk.

  La prima cosa che occorre fare perch tutto funzioni correttamente 
  assicurarsi che il proprio file /etc/services contenga le voci
  appropriate. Le voci di cui si ha bisogno sono:



               rtmp    1/ddp   # Routing Table Maintenance Protocol
               nbp     2/ddp   # Name Binding Protocol
               echo    4/ddp   # AppleTalk Echo Protocol
               zip     6/ddp   # Zone Information Protocol





  Il passo successivo consiste nella creazione dei file di
  configurazione Appletalk nella directory /usr/local/atalk/etc (o in
  quella in cui il pacchetto  stato installato).

  Il primo file da creare   /usr/local/atalk/etc/atalkd.conf.  Questo
  file inizialmente deve contenere solo una linea, che specifica il nome
  dell'interfaccia di rete sulla quale sono raggiungibili le macchine
  Apple:



               eth0






  Il programma-demone Appletalk aggiunger altri dettagli al file nel
  momento in cui verr eseguito.


  7.2.2.  Esportare un disco tramite Appletalk.

  Si possono esportare dei filesystem Linux verso la rete, in modo che
  le macchine Apple sulla rete possano accedervi.

  A questo fine occorre configurare il file
  /usr/local/atalk/etc/AppleVolumes.system. Un altro file di
  configurazione, chiamato /usr/local/atalk/etc/AppleVolumes.default, ha
  esattamente lo stesso formato e descrive quali filesystem verranno
  visti dagli utenti che si collegano come "guest".

  I dettagli riguardo la configurazione di questi file e le varie
  opzioni si trovano nella pagina del manuale relativa al comando afpd.

  Un semplice esempio potrebbe somigliare a:



               /tmp Scratch
               /home/ftp/pub "Area Pubblica"






  L'esempio mostrato esporta il filesystem /tmp come volume AppleShare
  con il nome di `Scratch', e la directory pubblica di ftp come volume
  AppleShare con il nome di `Area Pubblica'.  Specificare i nomi dei
  volumi non  obbligatorio, in quanto il programma-demone li pu
  assegnare autonomamente, ma specificarli esplicitamente non ha alcuna
  controindicazione.


  7.2.3.  Condividere le stampanti Linux usando Appletalk.

  E abbastanza semplice condividere una stampante Linux con le macchine
  Apple. A tal fine occorre far girare il programma papd, il demone per
  il protocollo di accesso alle stampanti Appletalk (Printer Access
  Protocol). Quando il programma viene fatto girare accetta le richieste
  da parte delle macchine Apple e passa il lavoro di stampa al server
  lpd locale per la stampa.

  Occorre editare il file /usr/local/atalk/etc/papd.conf per configurare
  il servizio. La sintassi del file  la stessa del pi noto
  /etc/printcap. Il nome che viene dato ad ogni definizione viene
  registrato tramite il protocollo di gestione dei nomi Appletalk (NBP).

  Una semplice configurazione potrebbe essere:



               TricWriter:\
                  :pr=lp:op=cg:





  Questo esempio rende disponibile sulla rete Appletalk una stampante
  chiamata `TricWriter', e tutti i lavori accettati via rete verranno
  stampati sulla stampante  `lp' come definita nel file /etc/printcap,
  usando lpd. La voce `op=cg' dice che l'utente Linux `cg'  l'operatore
  della stampante.


  7.2.4.  Far partire il software appletalk.

  A questo punto si dovrebbe essere pronti a provare la configurazione
  di base.  Il file rc.atalk distribuito con il pacchetto netatalk
  dovrebbe funzionare bene per questa prova, perci l'unica cosa che
  resta da fare :

               root# /usr/local/atalk/etc/rc.atalk





  e tutto dovrebbe essere attivo e girare correttamente. Non si
  dovrebbero vedere messaggi di errore a questo punto, ma il software
  mander dei messaggi sulla console per indicare ogni passo che viene
  fatto partire.


  7.2.5.  Provare il software appletalk.

  Per verificare che il software stia funzionando correttamente occorre
  andare ad una delle macchine Apple, attivare il menu principale,
  scegliere "Chooser", poi "AppleShare". A questo punto il calcolatore
  Linux dovrebbe apparire.


  7.2.6.  Alcune attenzioni con il software appletalk.



    Potrebbe esserci bisogno di far partire il supporto Appletalk prima
     di configurare la rete IP. Se ci sono problemi a far partire i
     programmi Appletalk, o se dopo che essi sono partiti si riscontrano
     dei problemi sulla rete IP, occorre provare ad attivare il software
     Appletalk prima di invocare /etc/rc.d/rc.inet1 file.

    Il server afpd (Apple Filing Protocol Daemon) scombina seriamente
     il disco rigido. Sotto il mount-point, il server crea un paio di
     directory: .AppleDesktop e Network Trash Folder. Poi, per ogni
     directory che viene usata il server crea un .AppleDouble al suo
     interno, per salvare le risorse eccetera. Perci bisogna pensarci
     due volte prima di esportare /: se alla fine si vuole ripulire il
     disco ci vuole molto tempo.

    Il programma afpd si aspetta delle password in chiaro dai Mac. La
     sicurezza potrebbe essere un problema, perci bisogna fare molta
     attenzione quando si fa girare questo demone su una macchina
     collegata ad Internet: bisogna solo rimproverare se stessi se
     qualcuno arreca dei danni alla macchina.

    gli strumenti di diagnostica esistenti, come netstat e ifconfig non
     supportano Appletalk. L'informazione non trattata da questi
     programmi  comunque disponibile nella directory /proc/net/, se se
     ne ha bisogno.


  7.2.7.  Ulteriori informazioni.

  Per una descrizione molto pi dettagliata su come configurare
  Appletalk per Linux occorre riferirsi alla pagina Linux Netatalk-HOWTO
  di Anders Brownworth, presso thehamptons.com
  <http://thehamptons.com/anders/netatalk/>.


  7.3.  ATM

  Werner Almesberger <werner.almesberger@lrc.di.epfl.ch> sta gestendo un
  progetto per fornire a Linux il supporto per ATM (Asynchronous
  Transfer Mode). Informazioni aggiornate sullo stato del progetto
  possono essere ottenute da: lrcwww.epfl.ch
  <http://lrcwww.epfl.ch/linux-atm/>.

  7.4.  AX25 (AF_AX25)

  I nomi di periferica AX.25 nei kernel versione  2.0.* sono `sl0',
  `sl1' eccetera, mentre nei kernel 2.1.* sono `ax0', `ax1' eccetera.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   [*] Amateur Radio AX.25 Level 2






  I protocolli AX25, Netrom e Rose sono ampiamente trattati nel
  documento AX25-HOWTO <AX25-HOWTO.html>.  Questi protocolli sono usati
  dagli utenti di radio amatoriali per la sperimentazione di
  trasmissione radio di pacchetti in tutto il mondo.

  La maggior parte del lavoro di implementazione di questi protocolli 
  stata fatta da Jonathan Naylor, jsn@cs.nott.ac.uk.


  7.5.  DECNet

  Al supporto per DECnet si sta lavorando adesso.  plausibile che
  appaia in uno degli ultimi kernel versione 2.1.


  7.6.  FDDI

  I nomi delle periferiche FDDI sono `fddi0', `fddi1', `fddi2' eccetera.
  La prima scheda rilevata dal kernel prende il nome  `fddi0' e alle
  altre vengono sequenzialmente assegnati gli altri nomi nell'ordine in
  cui vengono riconosciute.

  Larry Stefani, lstefani@ultranet.com, ha scritto un driver per le
  schede FDDI per EISA e PCI della Digital.


  Opzioni di compilazione del kernel:


               Network device support  --->
                   [*] FDDI driver support
                   [*] Digital DEFEA and DEFPA adapter support





  Dopo aver ricompilato il kernel per supportare il driver FDDI, la
  configurazione dell'interfaccia  praticamente identica alla
  configurazione di una scheda ethernet. Occorre solo specificare il
  nome dell'interfaccia FDDI nei comandi ifconfig e route.


  7.7.  Frame Relay

  I nomi delle periferiche Frame Relay sono `dlci00', `dlci01' eccetera
  per i dispositivi ad incapsulazione DLCI, mentre  `sdla0', `sdla1'
  eccetera sono i nomi per le periferiche FRAD.

  Frame Relay  una nuova tecnologia di rete, progettata per adattarsi a
  traffico di comunicazione dati che sia di natura intermittente.  Ci si
  connette ad una rete Frame Relay usando un FRAD (Frame Relay Access
  Device).  Il supporto Frame Relay per Linux usa IP-su-Frame-Relay,
  come specificato nell'RFC 1490.


  Opzioni di compilazione del kernel:


               Network device support  --->
                   <*> Frame relay DLCI support (EXPERIMENTAL)
                   (24)   Max open DLCI
                   (8)   Max DLCI per device
                   <*>   SDLA (Sangoma S502/S508) support





  Il supporto per Frame Relay e i relativi strumenti di configurazione
  sono stati sviluppati da Mike McLagan, mike.mclagan@linux.org.

  Al momento i soli FRAD supportati sono i Sangoma Technologies
  <http://www.sangoma.com/> S502A, S502E e S508.

  Dopo aver ricompilato il kernel, per configurare le periferiche FRAD e
  DLCI occorrono gli strumenti di configurazione per Frame Relay. Questi
  sono disponibili da ftp.invlogic.com
  <ftp://ftp.invlogic.com/pub/linux/fr/frad-0.15.tgz>.  La compilazione
  e l'installazione di questi strumenti non presenta alcun problema, ma
  l'assenza di un Makefile nella directory principale fa s che il
  processo sia abbastanza "manuale":



               user% tar xvfz .../frad-0.15.tgz
               user% cd frad-0.15
               user% for i in common dlci frad; make -C $i clean; make -C $i; done
               root# mkdir /etc/frad
               root# install -m 644 -o root -g root bin/*.sfm /etc/frad
               root# install -m 700 -o root -g root frad/fradcfg /sbin
               root# install -m 700 -o root -g root dlci/dlcicfg /sbin






  Si noti che i comandi sopracitati usano la sintassi sh, se si usa una
  shell di tipo csh, come tcsh, il ciclo for apparir diversamente.


  Dopo l'installazione di questi programmi occorre creare un file
  /etc/frad/router.conf. Si pu usare come esempio il seguente, che 
  una versione modificata di uno dei file di esempio del pacchetto:










  # /etc/frad/router.conf
  # Questo  uno schema di configurazione per frame relay.
  # Tutte le parole chiave sono presenti. I valori di default sono basati
  # sul codice fornito con il driver DOS per il Sangoma S502A.
  #
  # Un '#' all'interno di una linea segna un commento
  # Spazi e caratteri TAB sono ignorati
  # Voci [] sconosciute e chiavi ignote sono ignorate
  #

  [Devices]
  Count=1                 # numero di periferiche da configurare
  Dev_1=sdla0             # nome di periferica
  #Dev_2=sdla1            # nome di periferica

  # Se specificate qui, queste voci si applicano a tutte le periferiche,
  # ma possono essere specificati valori alternativi per ciascuna scheda.
  #
  Access=CPE
  Clock=Internal
  KBaud=64
  Flags=TX
  #
  # MTU=1500              # Massima lunghezza del IFrame trasmesso,
                          # il default  4096
  # T391=10               # valore di T391    5 - 30, il default  10
  # T392=15               # valore di T392    5 - 30, il default  15
  # N391=6                # valore di N391    1 - 255, il default  6
  # N392=3                # valore di N392    1 - 10, il default  3
  # N393=4                # valore di N393    1 - 10, il default  4

  # Se specificate qui, queste voci si applicano a tutte le schede
  # CIRfwd=16             # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511


  #
  #
  # Configurazione specifica per ciascuna interfaccia
  #
  #

  #
  # La prima periferica  una Sangoma S502E
  #
  [sdla0]
  Type=Sangoma            # Tipo di periferica. Attualmente viene riconosciuto
                          # solo il nome SANGOMA
  #
  # Queste chiavi sono specifiche al tipo "Sangoma"
  #
  # Tipo di scheda - S502A, S502E, S508
  Board=S502E
  #
  # Nome del firmware (ROM) di prova della scheda
  # Testware=/usr/src/frad-0.10/bin/sdla_tst.502
  #
  # Nome del firmware FR
  # Firmware=/usr/src/frad-0.10/bin/frm_rel.502
  #
  Port=360                # Porta di I/O per questa scheda
  Mem=C8                  # Indirizzo della finestra di memoria (A0-EE)
  IRQ=5                   # Numero di interrupt, non specificare per la S502A
  DLCIs=1                 # Numero di DLCI attaccati alla periferica
  DLCI_1=16               # Numero del primo DLCI, 16 - 991
  # DLCI_2=17
  # DLCI_3=18
  # DLCI_4=19
  # DLCI_5=20
  #
  # Se specificate qui, queste voci si applicano solo a questa periferica,
  # e rimpiazzano i valori specificati prima
  #
  # Access=CPE            # CPE o NODE, default: CPE
  # Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
  # Clock=Internal        # External o Internal, default: Internal
  # Baud=128              # Valore nominale di baud rate per il CSU/DSU
  # MTU=2048              # Massima lunghezza del IFrame trasmesso,
                          # il default  4096
  # T391=10               # valore di T391    5 - 30, il default  10
  # T392=15               # valore di T392    5 - 30, il default  15
  # N391=6                # valore di N391    1 - 255, il default  6
  # N392=3                # valore di N392    1 - 10, il default  3
  # N393=4                # valore di N393    1 - 10, il default  4

  #
  # La seconda periferica  qualche altro tipo
  #
  # [sdla1]
  # Type=FancyCard        # Tipo di periferica
  # Board=                # Tipo di scheda Sangoma
  # Key=Value             # Valori specifici a questo tipo di scheda


  #
  # Valori di default per la configurazione DLCI
  # Questo posso essere rimpiazzati nella configurazione specifica
  # di ciascun DLCI
  #
  CIRfwd=64               # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511

  #
  # Configurazione di DLCI
  # Queste voci sono tutte opzionali. Il nome usato 
  # [DLCI_D<devicenum>_<DLCI_Num>]
  #

  [DLCI_D1_16]
  # IP=
  # Net=
  # Mask=
  # Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=64
  # Bc_fwd=512
  # Be_fwd=0
  # CIRbak=64
  # Bc_bak=512
  # Be_bak=0

  [DLCI_D2_16]
  # IP=
  # Net=
  # Mask=
  # Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=16
  # Bc_fwd=16
  # Be_fwd=0
  # CIRbak=16
  # Bc_bak=16
  # Be_bak=0





  Dopo aver costruito il file /etc/frad/router.conf, l'unico passo che
  resta da fare  configurare le periferiche stesse. Questo  solo
  leggermente pi difficile che la configurazione di una normale
  periferica di rete. Occorre ricordare di attivare il FRAD prima dei
  dispositivi di incapsulamento DLCI. I comandi necessari sono numerosi,
  meglio quindi metterli in uno script:



               #!/bin/sh
               # Configurazione dell'hardware FRAD e parametri DLCI
               /sbin/fradcfg /etc/frad/router.conf || exit 1
               /sbin/dlcicfg file /etc/frad/router.conf
               #
               # Attivazione del dispositivo FRAD
               ifconfig sdla0 up
               #
               # Configurazione delle interfacce di incapsulamento DLCI
               # e instradamento
               ifconfig dlci00 192.168.10.1 pointopoint 192.168.10.2 up
               route add -net 192.168.10.0 netmask 255.255.255.0 dlci00
               #
               ifconfig dlci01 192.168.11.1 pointopoint 192.168.11.2 up
               route add -net 192.168.11.0 netmask 255.255.255.0 dlci00
               #
               route add default dev dlci00
               #






  7.8.  IPX ( AF_IPX )

  Il protocollo IPX  il pi comunemente utilizzato nelle reti locali
  Novell NetWare(tm). Linux include il supporto per questo protocollo, e
  pu essere configurato come punto di rete o come router per IPX.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   [*] The IPX protocol
                   [ ] Full internal IPX network






  Il protocollo IPX ed NCPFS sono trattati in maggior dettaglio nel
  documento IPX-HOWTO <IPX-HOWTO.html>.


  7.9.  NetRom ( AF_NETROM )

  I nomi delle periferiche NetRom sono `nr0', `nr1' eccetera.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   [*] Amateur Radio AX.25 Level 2
                   [*] Amateur Radio NET/ROM






  I protocolli AX25, Netrom e Rose sono trattati nell'AX25-HOWTO
  <AX25-HOWTO.html>. Questi protocolli vengono usati dagli operatori di
  radio amatoriali in tutto il mondo per sperimentare con la
  trasmissione dati via radio.

  La maggior parte del lavoro di implementazione di questi protocolli 
  stato fatto da Jonathon Naylor, jsn@cs.nott.ac.uk.


  7.10.  Il protocollo Rose ( AF_ROSE )

  I nomi delle periferiche Rose nei kernel 2.1.* sono `rs0', `rs1'
  eccetera.  Rose  solo disponibile nelle versioni 2.1 del kernel.


  Opzioni di compilazione del kernel:


               Networking options  --->
                   [*] Amateur Radio AX.25 Level 2
                   <*> Amateur Radio X.25 PLP (Rose)






  I protocolli  AX25, Netrom e Rose sono trattati nel documento
  AX25-HOWTO <AX25-HOWTO.html>.  Questi protocolli vengono usati dagli
  operatori di radio amatoriali in tutto il mondo per sperimentare la
  trasmissione dati via radio.

  La maggior parte del lavoro di implementazione di questi protocolli 
  stata fatta da Jonathon Naylor, jsn@cs.nott.ac.uk.


  7.11.  Supporto SAMBA - `NetBEUI', `NetBios'.

  SAMBA  un'implementazione del protocollo "Session Management Block".
  Samba permette ai sistemi Microsoft e ad altri di montare i dischi
  Linux e di accedere alle stampanti Linux.

  SAMBA e la sua configurazione sono trattati in dettaglio nel documento
  SMB-HOWTO <SMB-HOWTO.html>.

  7.12.  Supporto STRIP (Starmode Radio IP)

  I nomi delle periferiche STRIP sono `st0', `st1', eccetera.


  Opzioni di compilazione del kernel:


               Network device support  --->
                       [*] Network device support
                       ....
                       [*] Radio network interfaces
                       < > STRIP (Metricom starmode radio IP)






  STRIP  un protocollo designato specificatamente per una serie di
  modem radio Metricom per un progetto di ricerca della Stanford
  University, chiamato Progetto MosquitoNet
  <http://mosquitonet.Stanford.EDU/mosquitonet.html>.  Vi si trova un
  sacco di materiale interessante da leggere, anche per chi non 
  direttamente interessato al progetto.


  Le radio Metricom si connettono alla porta seriale, impiegano
  tecnologia "spread spectrum" e sono tipicamente in grado di
  trasmettere circa 100kbps. Informazioni riguardo alle radio Metricom
  sono disponibili presso Server web della Metricom
  <http://www.metricom.com/>.

  Al momento gli strumenti di rete e i programmi di utilit standard non
  supportano il driver STRIP, per cui occorre scaricare dei programmi
  modificati a tal fine dal server www di MosquitoNet. Ulteriori
  dettagli riguardo al software necessario si trovano alla pagina STRIP
  di MosquitoNet <http://mosquitonet.Stanford.EDU/strip.html>.

  In sintesi, occorre usare un programma slattach modificato per
  assegnare la disciplina di linea dell'interfaccia seriale a "STRIP";
  occorre poi configurare i dispositivi `st[0-9]' come si farebbe con
  l'ethernet, tranne per una importante differenza: per ragioni
  tecniche, STRIP non supporta il protocollo ARP, per cui bisogna
  fornire manualmente al sistema le voci ARP per gli host della propria
  sottorete.  Questo non  comunque un compito oneroso.


  7.13.  Token Ring

  I nomi delle periferiche token ring sono `tr0', `tr1' eccetera.  Token
  Ring  un protocollo di LAN standardizzato da IBM che evita le
  collisioni fornendo un meccanismo che ad ogni istante autorizza a
  trasmettere solo una stazione sulla rete locale.  Un `gettone' (token)
   in mano ad una stazione per volta, e solo la stazione che detiene il
  gettone ha il diritto di trasmettere. Dopo aver trasmesso i dati il
  gettone verr passato alla stazione successiva.  Il gettone viene
  passato tra tutte le stazioni attive, da cui il nome `Token Ring'.


  Opzioni di compilazione del kernel:





          Network device support  --->
                  [*] Network device support
                  ....
                  [*] Token Ring driver support
                  < > IBM Tropic chipset based adaptor support





  La configurazione di token ring  identica a quella di ethernet, e
  l'unica differenza sta nel nome della periferica di rete da
  configurare.


  7.14.  X.25

  X.25  un protocollo a commutazione di pacchetto basato su un
  circuito, ed  definito dal C.C.I.T.T. (un gruppo di standard
  riconosciuto dalle compagnie di telecomunicazione in quasi tutto il
  mondo).  Un'implementazione di X.25 e LPB  in lavorazione, e i kernel
  2.1.* pi recenti includono lo stato attuale del lavoro.

  Jonathon Naylor jsn@cs.nott.ac.uk sta coordinando lo sviluppo ed
  esiste una mailing list per discutere di X.25 sotto Linux e di
  argomenti connessi. Per iscriversi occorre mandare un messaggio a
  majordomo@vger.rutgers.edu con il testo "subscribe linux-x25" nel
  corpo del messaggio.

  Le versioni attuali degli strumenti di configurazione si possono
  ottenere dal sito ftp di Jonathon: ftp.cs.nott.ac.uk
  <ftp://ftp.cs.nott.ac.uk/jsn/>.


  7.15.  Scheda WaveLan

  I nomi delle periferiche Wavelan sono `eth0', `eth1', eccetera.


  Opzioni di compilazione del kernel:


               Network device support  --->
                       [*] Network device support
                       ....
                       [*] Radio network interfaces
                       ....
                       <*> WaveLAN support





  La scheda  WaveLAN card  una scheda di rete radio ad ampio spettro.
  In pratica la scheda assomiglia molto ad una scheda ethernet, e viene
  configurata praticamente allo stesso modo.

  Si possono ottenere informazioni sulla scheda Wavelan da Wavelan.com
  <http://www.wavelan.com/>.


  8.  Cavi e cablaggio

  Chi ha pratica di lavori con il saldatore pu desiderare di costruire
  da s i propri cavi per connettere due macchine Linux. I seguenti
  diagrammi di cablatura dovrebbero essere di aiuto.
  8.1.  Cavo Seriale NULL Modem

  Non tutti i cavi NULL modem sono uguali. Molti cavi null-modem fanno
  qualcosa in pi che far credere al proprio calcolatore che tutti i
  segnali sono presenti e scambiare i segnali di trasmissione e
  ricezione. Questo  corretto, ma significa che occorre usare il
  controllo di trasmissione software (XON/XOFF), che  meno efficiente
  del controllo di flusso hardware. Il caso seguente offre la
  connettivit migliore possibile e permette di usare il controllo di
  flusso hardware (RTS/CTS).


       Pin Name  Pin                               Pin
       Tx Data    2  -----------------------------  3
       Rx Data    3  -----------------------------  2
       RTS        4  -----------------------------  5
       CTS        5  -----------------------------  4
       Ground     7  -----------------------------  7
       DTR        20 -\---------------------------  8
       DSR        6  -/
       RLSD/DCD   8  ---------------------------/-  20
                                                \-  6





  8.2.  Cavo per la porta parallela  (cavo PLIP)

  Se si intende usare il protocollo PLIP tra due macchine, allora questo
  cavo funzioner qualunque sia il tipo di porta parallela che si
  possiede.


       Pin Name    pin            pin
       STROBE      1*
       D0->ERROR   2  ----------- 15
       D1->SLCT    3  ----------- 13
       D2->PAPOUT  4  ----------- 12
       D3->ACK     5  ----------- 10
       D4->BUSY    6  ----------- 11
       D5          7*
       D6          8*
       D7          9*
       ACK->D3     10 ----------- 5
       BUSY->D4    11 ----------- 6
       PAPOUT->D2  12 ----------- 4
       SLCT->D1    13 ----------- 3
       FEED        14*
       ERROR->D0   15 ----------- 2
       INIT        16*
       SLCTIN      17*
       GROUND      25 ----------- 25




  Note:

    Non collegate i piedini marcati con un asterisco `*'.

    Altri segnali di terra sono ai piedini 18,19,20,21,22,23 e 24.

    Se il cavo ha una schermatura metallica, questa deve essere
     connessa alla conchiglia metallica del connettore DB-25 solo ad un
     estremo del cavo.
     Attenzione: Un cavo PLIP collegato male pu distruggere il
     controllore della parallela. Bisogna fare molta attenzione e
     controllare pi volte ogni connessione per essere sicuri di non
     dover fare lavoro inutile e non avere problemi.

  Anche se si pu riuscire a far andare cavi PLIP per lunghe distanze,
  questo, se possibile, va evitato. Le specifiche del cavo permettono
  una lunghezza di circa un metro. Bisogna fare molta attenzione quando
  si usano cavi PLIP molto lunghi: sorgenti di forti campi
  elettromagnetici come fulmini, linee di potenza e trasmettitori radio
  possono interferire e talvolta anche danneggiare il controllore della
  parallela.  Se veramente si vogliono collegare due calcolatori molto
  distanti bisognerebbe procurarsi un paio di schede ethernet thin-net e
  usare un cavo coassiale.


  8.3.  Cablaggio ethernet 10base2 (coassiale sottile)

  10base2  uno standard di cablaggio ethernet che richiede l'uso di un
  cavo coassiale da 52 ohm, del diametro di circa 5 millimetri.  Ci sono
  un paio di regole importanti da ricordare quando si connettono
  macchine tramite cavi 10base2.  La prima  che occorre usare dei
  terminatori ad entrambi i capi del cavo. Un terminatore  una
  resistenza da 52 ohm che assicura che il segnale sia assorbito (non
  riflesso) quando raggiunge la fine del cavo.  Senza i due terminatori
  si pu verificare che la ethernet risulti non affidabile, o che non
  funzioni del tutto. Normalmente di usano dei `connettori a T' per
  connettere i calcolatori, per cui il diagramma di rete assomiglier al
  seguente:


        |==========T=============T=============T==========T==========|
                   |             |             |          |
                   |             |             |          |
                 -----         -----         -----      -----
                 |   |         |   |         |   |      |   |
                 -----         -----         -----      -----




  dove i `|' ai due capi rappresentano i terminatori, gli `======' rapp
  resentano un pezzo di cavo coassiale con spinotti BNC ad entrambi i
  capi e le `T' rappresentano un connettore a T.  Bisogna far s che il
  pezzo di cavo tra la T e la scheda di rete sia il pi corto possibile:
  idealmente la T deve essere connessa direttamente alla scheda ether
  net.


  8.4.  Cavo Ethernet TP (Twisted Pair)

  Se si hanno solo due schede di rete TP e le si vuole connettere
  insieme non occorre un hub. Si pu fare il cavo in modo da connettere
  le due schede direttamente. Un diagramma che realizza questo  incluso
  nel documento Ethernet-HOWTO <Ethernet-HOWTO.html>


  9.  Glossario dei termini usati in questo documento.

  Questa  una lista dei termini pi importanti usati in questo howto.



     ARP
        Acronimo per Address Resolution Protocol, il protocollo usato
        per associare gli indirizzi IP agli indirizzi hardware.
     ATM
        Acronimo per Asynchronous Transfer Mode.  Una rete ATM suddivide
        i dati in blocchi di dimensione standardizzata che poi trasmette
        efficientemente da un punto all'altro. ATM  una tecnologia di
        rete di pacchetto a commutazione di circuito.



     client
        Questo  di solito un pacchetto software che gira dove sta
        l'utente. Ci sono delle eccezioni a questa definzione sommaria:
        per esempio nel sistema a finestre X11 il server gira dove sta
        l'utente, e il client gira sulla macchina remota.  Il client 
        un programma o un'estremo di un sistema che riceve un servizio
        offerto dal server. Nel caso di sistemi peer to peer come slip o
        ppp il client  l'estremo della connessione che inizia il
        collegamento mentre l'estremo remoto, quello chiamato,  detto
        server.



     datagramma
        Un datagramma  un pacchetto discreto di dati e intestazioni
        (header) contenenti informazioni per la consegna del pacchetto.
        Un datagramma  l'unit base di trasmissione attraverso una rete
        IP. Viene anche chiamato `pacchetto'.



     DLCI
        Il DLCI  il Data Link Connection Identifier, e viene usato per
        identificare un'unica connessione punto-a-punto in una rete
        Frame Relay. I DLCI sono normalmente assegnati dal fornitore
        della rete Frame Relay.



     Frame Relay
        Frame Relay  una tecnologia di rete designata per distribuire
        il traffico sia questo ad impulsi (burst) o di natura sporadica.
        I costi di rete vengono ridotti avendo molti utenti Frame Relay
        che condividano la stessa capacit di rete, e basandosi
        sull'assunzione che ognuno di essi desideri usare la rete in
        tempi leggermente differenti.



     Indirizzo Hardware
         un numero che identifica in maniera univoca un calcolatore al
        livello di accesso al mezzo di trasmizzione in una rete fisica.
        Esempi di questo sono gli Indirizzi Ethernet e gli Indirizzi
        AX.25.



     ISDN
        Acronimo per Integrated-Services Digital Network.  ISDN offre un
        mezzo standardizzato attraverso il quale le compagnie di
        telecomunicazione possono distribuire sia voce che dati ai
        clienti.  Tecnicamente ISDN  una rete di dati a commutazione di
        circuito.



     ISP
        Acronimo per Internet Service Provider. Queste sono
        organizzazioni o compagnie che offrono alla gente la
        connettivit di rete verso Internet.



     Indirizzo IP
        Un numero che identifica univocamente un calcolatore TCP/IP
        sulla rete. L'indirizzo  lungo 4 byte e viene rappresentato in
        quella che  chiamata "notazione decimale con punti ("dotted
        decimal notation"), dove ogni byte viene rappresentato in
        decimale, e i byte sono separati da punti `.'.



     MSS
        Maximum Segment Size:  la quantita di dati pi grande possibile
        che si pu trasmettere in un solo istante.  Se si vuole
        prevenire la frammentazione locale dei dati MSS dovrebbe essere
        uguale al "MTU - header IP".



     MTU
        Maximum Transmission Unit  un parametro che specifica la
        dimensione massima del pacchetto che pu essere trasmesso da
        un'interfaccia IP senza che venga spezzettato in unit pi
        piccole. La MTU dovrebbe essere pi grande del pacchetto pi
        grande che si vuole trasmettere non frammentato.  Si noti che
        questo per previene solo la frammentazione locale, in quanto
        qualche altro collegamento sul percorso del pacchetto potrebbe
        avere una MTU minore, e il pacchetto a quel punto sar
        frammentato. Valori tipici per MTU sono 1500 per le interfacce
        ethernet e 576 per interfacce SLIP.



     route
        La route  il percorso che i pacchetti prendono attraverso la
        rete per raggiungere la loro destinazione.



     server
        Questo  di solito il pacchetto software o l'estremo di
        connessione sul sistema remoto rispetto all'utente. Il server
        offre dei servizi ad uno o a molti client. Esempi di server
        includono ftp, Network File System, o Domain Name Server.  Nel
        caso di connessioni peer to peer (da pari a pari) come slip o
        ppp il server  considerato quello all'estremo della connessione
        che viene chiamata, mentre l'estremo chiamante  il client.



     window
        La window (finestra)  la massima quantit di dati che l'estremo
        ricevente della connessione pu accettare in un dato momento.


  10.  Linux per un provider?

  Se siete interessati ad usare Linux come Internet Provider, raccomando
  di guardare la homepage dei provider Linux
  <http://www.anime.net/linuxisp/> per avere una buona lista di
  puntatori a informazioni di cui si potrebbe aver bisogno.


  11.  Ringraziamenti

  Vorrei ringraziare le seguenti persone per i loro contributi a questo
  documento (senza un ordine particolare): Terry Dawson, Axel Boldt,
  Arnt Gulbrandsen, Gary Allpike, Cees de Groot, Alan Cox, Jonathon
  Naylor, Claes Ensson, Ron Nessim, John Minack, Jean-Pierre Cocatrix,
  Erez Strauss.

  Per la traduzione, ringrazio Andrea Gelmini per le correzioni fornite.


  12.  Copyright.

  The NET-3-HOWTO, information on how to install and configure
  networking support for Linux. Copyright (c) 1997 Terry Dawson.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the:

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.


  NET-3-HOWTO, informazioni su come installare e configurare il supporto
  di rete per Linux  Copyright (c) 1997 Terry Dawson.

  Questo programma  software libero; pu essere ridistribuito e/o
  modificato secondo i termini della "GNU General Public License",
  pubblicata dalla  Free Software Foundation; la versione 2 della
  licenza o (a propria scelta) qualunque versione successiva.

  Questo programma  distribuito nella speranza che sia utile, ma SENZA
  ALCUNA GARANZIA; senza nemmeno la garanzia implicita di
  COMMERCIABILIT o ADEGUATEZZA PER UNO SCOPO PARTICOLARE. Vedere la
  "GNU General Public License" per ulteriori dettagli.

  Dovreste aver ricevuto una copia della "GNU General Public License"
  insieme a questo programma; altrimenti scrivere a:

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.










  NFS HOWTO
  Nicolai Langfeldt janl@math.uio.no
  Version 1.0, 1 Ottobre 1999

  COME installare NFS su client e server. Traduzione di
  kevin@arena.sci.univr.it.

  1.  Introduzione

  1.1.  Note legali

  (C)opyright 1997-1999 Nicolai Langfeldt and Ron Peters. Do not modify
  without amending copyright, distribute freely but retain this
  paragraph. The FAQ section is based on a NFS FAQ compiled by Alan Cox.
  The Checklist section is based on a mount problem checklist compiled
  by the IBM Corporation. The nfs-server-on-a-floppy section was written
  by Ron Peters.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.


  I diritti appartengono a Nicolai Langfeldt. Non modificare nulla senza
  allegare il copyright, distribuisci liberamente ma mantieni questo
  paragrafo. La sezione sulle FAQ  basata sulle NFS FAQ di Alan Cox. La
  sezione Elenco di verifica  basata su un problema di mount compilato
  da IBM Corporation.


  1.2.  Liberatoria

  N Nicolai Langfeldt, n Ron Peters, n i relativi datori di lavoro o
  chiunque altro, si assumono la responsabilit di quanto pu accadere
  se seguirete le istruzioni di questo documento. Se stabilite di
  seguire comunque le istruzioni, buona fortuna!


  1.3.  Commenti e critiche

  Questo non sar mai un documento finito, inviatemi una mail se
  incontrate problemi o successi, potreste contribuire a migliorare
  questo documento. Inviate denaro, commenti e/o domande a
  janl@math.uio.no oppure a rpeters@hevanet.com nel caso di un server
  NFS relativo ai floppy. Se inviate una e-mail accertatevi che
  l'indirizzo di risposta sia corretto e funzionante. Ricevo molte mail
  e accertarmi di ogni indirizzo sarebbe troppo oneroso.


  1.4.  Altri argomenti

  Se desiderate tradurre questo HOWTO fatemelo sapere cos terr traccia
  di quante lingue hanno pubblicato il documento :-)


  Ringrazio Olaf Kirch che mi ha fornito spunti e suggerimenti per
  questo scritto :-)


  1.5.  Dediche

  Questo HOWTO  dedicato ad Anne Line Norheim Langfeldt. Probabilmente
  non lo legger mai perch non  quel tipo di ragazza.


  2.  LEGGIMI

  NFS (Network File System), il sistema di condivisione dei dischi via
  rete, ha tre caratteristiche importanti:


    Rende possibile la condivisione dei file in rete.

    Funziona abbastanza bene.

    Apre dei buchi di sicurezza che sono conosciuti dai cracker e
     facilmente utilizzabili per ottenere accesso (lettura, scrittura e
     cancellazione) a tutti i vostri file.


  Parler di questi argomenti nel presente HOWTO. Accertatevi di leggere
  la sezione relativa alla sicurezza e sarete in grado di limitare al
  minimo la vulnerabilit e i rischi. La sezione sulla sicurezza
  contiene dei passi piuttosto tecnici e richiede alcune conoscenze di
  reti IP e i termini a esse relativi. Se non capite la terminologia
  utilizzata fate un passo indietro e leggete il Networking HOWTO oppure
  acquistate un libro relativo all'amministrazione di reti TCP/IP per
  familiarizzare con TCP/IP.  comunque una buona idea se amministrate
  macchine UNIX/Linux. Un ottimo libro al riguardo  TCP/IP Network
  Administration di Craig Hunt, pubblicato da O'Reilly & Associates,
  Inc. Dopo averlo letto e capito, avrete un maggior valore sul mercato
  del lavoro :)


  Ci sono due sezioni per aiutarvi nella soluzione dei problemi di NFS,
  chiamate Elenco di verifica di mount e FAQ. Fate riferimento a esse se
  qualcosa non dovesse funzionare come previsto.


  Il sito primario per nfsd per Linux 2.0  ftp.mathematik.th-
  darmstadt.de:/pub/linux/okir, nel caso aveste bisogno di scaricarlo e
  compilarlo.


  Per informazioni su NFS in relazione a Linux 2.2 fate riferimento a
  ``NFS in Linux 2.2''.


  3.  Configurare un server NFS

  3.1.  Prerequisiti

  Prima di continuare a leggere questo HOWTO dovete essere in grado di
  fare telnet tra due macchine che avete intenzione di configurare come
  client e server.  Se non siete in grado di farlo, leggete il
  networking/NET-2 HOWTO per installare e configurare correttamente la
  rete.


  3.2.  Il primo passo

  Prima di fare qualsiasi altra cosa, abbiamo bisogno di configurare un
  server NFS. Se fate parte di un dipartimento o universit
  probabilmente ce ne saranno molti altri gi configurati. Se avete
  accesso a tali server o state leggendo questo HOWTO per utilizzarli,
  non avete bisogno di leggere questa sezione e potete passare
  direttamente alla sezione ``Configurazione di un client NFS''


  Se avete bisogno di installare NFS su una macchina che non abbia
  Linux, allora dovete leggere il manuale di sistema per scoprire come
  abilitare il servizio di NFS ed esportare i file tramite NFS. C' una
  sezione apposita in questo HOWTO su come farlo su molti sistemi
  diversi. Dopo aver configurato tutto, potete passare alla sezione
  successiva. Oppure leggete altre parti di questa sezione poich alcune
  cose che saranno dette potrebbero essere interessanti anche per altri
  sistemi, indipendentemente dal tipo di macchina che volete usare come
  server.


  Se siete di fretta, fate riferimento alla sezione ``NFS in Linux 2.2''
  prima di continuare a leggere questo HOWTO.


  Quelli di voi che continueranno a leggere, avranno bisogno di
  configurare alcuni programmi.


  3.3.  Il portmapper

  Il portmapper su Linux pu chiamarsi sia portmap sia rpc.portmap. La
  pagina man sul mio sistema dice che  un "DARPA port to RPC program
  number mapper". Questo  il primo buco di sicurezza che aprite. La
  descrizione per chiudere alcuni di questi buchi  nella sezione
  ``Sicurezza e NFS'', che vi consiglio di leggere con urgenza.


  Avvio del portmapper. Lo si pu fare in due modi: portmap oppure
  rpc.portmap e li dovreste trovare nella directory /usr/sbin (su alcune
  macchine si chiama rpcbind). Per ora lo potete avviare manualmente, ma
   necessario che venga lanciato ogni volta che si riavviia la macchina
  e per questo motivo dovrete creare/modificare i vostri script rc. Gli
  script rc sono descritti in maggior dettaglio nella pagina man di
  init, in genere si trovano in /etc/rc.d, /etc/init.d oppure
  /etc/rc.d/init.d.  Se c' uno script che ha il nome simile a inet
  probabilmente  lo script giusto da modificare. Ci che dovete
  scriverci va oltre lo scopo di questo HOWTO.  Avviate portmap e
  controllate che esso sia correttamente partito con il comando ps aux.
   partito? Bene.


  Ancora una cosa. L'accesso remoto al portmapper  regolato dal
  contenuto dei file /etc/hosts.allow e /etc/hosts.deny. Se rpcinfo -p
  fallisce, ma l'esecuzione del portmapper continua, esaminate questi
  file. Verificate la sezione ``Sicurezza e NFS'' per dettagli su questi
  file.


  3.4.  Mountd e nfsd

  I programmi successivi che devono essere avviati sono mountd e nfsd.
  Ma prima dobbiamo modificare un altro file. Questa volta /etc/exports.
  Supponiamo che io voglia che il file system /mn/eris/local, che
  risiede su eris, possa essere disponibile anche sulla macchina
  chiamata apollon. Dobbiamo quindi mettere queste righe nel file
  /etc/exports di eris:


  ______________________________________________________________________
  /mn/eris/local  apollon(rw)
  ______________________________________________________________________



  Le righe sopra indicate consentono l'accesso in lettura e scrittura a
  /mn/eris/local. Invece di rw potremmo mettere ro che indica l'accesso
  in sola lettura (se non si mette nulla,  di default a sola lettura).
  Ci sono altre opzioni che  possibile inserire e ne discuteremo alcune
  relative alla sicurezza pi avanti. Le opzioni sono tutte elencate
  nella pagina man di exports che dovreste leggere almeno una volta
  nella vita. Ci sono modi migliori che elencare gli host nel file
  exports.  Potete, per esempio, usare net groups se state utilizzando
  le NIS (o NYS), e potete sempre specificare domini interi oppure
  sottoreti IP come host autorizzati a montare qualcosa. Ma dovreste
  considerare che qualcuno non autorizzato potrebbe accedere al server
  se usate questo tipo di autorizzazioni.

  Nota: la sintassi del file exports non  la stessa di altri Unix.  C'
  una sezione separata in questo HOWTO che riguarda il file exports di
  altri Unix.


  Ora siamo pronti per lanciare il comando mountd (oppure pu chiamarsi
  rpc.mountd), successivamente nfsd (che potrebbe chiamarsi rpc.nfsd).
  Entrambi leggono il file exports.


  Se modificate il file /etc/exports accertatevi che nfsd e mountd
  sappiano che il file  stato cambiato. Il modo tradizionale consiste
  nel lanciare exportfs. Molte distribuzioni non hanno il programma
  exportfs, allora si pu installare questo script sulla macchina:


  ______________________________________________________________________
  #!/bin/sh
  killall -HUP /usr/sbin/rpc.mountd
  killall -HUP /usr/sbin/rpc.nfsd
  echo re-exported file systems
  ______________________________________________________________________




  Salvatelo chiamandolo /usr/sbin/exportfs e non dimenticate di
  modificare le autorizzazioni con il comando chmod a+rx. Ora, ogni
  volta che modificate il file exports, lanciate exportfs come root.


  Dovreste quindi controllare che mountd e nfsd stiano girando
  correttamente.  Prima con rpcinfo -p. Dovrebbe mostrare qualcosa di
  simile al seguente:


  ______________________________________________________________________
     program vers proto   port
      100000    2   tcp    111  portmapper
      100000    2   udp    111  portmapper
      100005    1   udp    745  mountd
      100005    1   tcp    747  mountd
      100003    2   udp   2049  nfs
      100003    2   tcp   2049  nfs
  ______________________________________________________________________



  Come si vede il portmapper ha avviato i propri servizi e cos pure
  mountd e nfsd.


  Se invece appare l'errore: rpcinfo: can't contact portmapper: RPC:
  Remote system error - Connection refused, RPC_PROG_NOT_REGISTERED o
  qualcosa di simile, significa che il portmapper non sta girando oppure
  c' qualcosa nel file /etc/hosts.{allow,deny} che impedisce al
  portmapper di rispondere. Fate riferimento alla sezione ``Sicurezza e
  NFS'' per dettagli su questi file. Se appare il messaggio No remote
  programs registered. significa che il portmapper non vuole rispondere
  oppure qualcosa non funziona. Interrompete nfsd, mountd e il
  portmapper e riprovate la sequenza di avvio dall'inizio.


  Dopo avere controllato che il portmapper riporti i servizi, si pu
  controllare anche con ps. Il portmapper continuer a riportare i
  servizi anche dopo che il programma che li ha utilizzati termina in
  maniera non corretta, per cui controllare con il ps pu essere utile
  se sembra che qualcosa non funzioni.


  Naturalmente, avrete bisogno di modificare i file rc per avviare
  mountd e nfsd e il portmapper quando si avvia la macchina.  
  probabile che gli script esistano gi sulla macchina, dovrete solo
  togliere il commento dalle parti interessate oppure modificare il
  livello di init affinch queste vengano attivate.


  Le pagine man che dovrebbero esservi familiari adesso, sono quelle di
  portmap, mountd, nfsd ed exports.


  Bene, se avete fatto tutto esattamente come ho detto probabilmente 
  tutto pronto per iniziare a lavorare sul client NFS.


  4.  Configurazione di un client NFS

  Prima di tutto avete bisogno di un kernel che abbia il supporto per
  NFS compilato staticamente oppure come modulo. Questo lo si configura
  prima di iniziare la compilazione. Se non avete mai compilato un
  kernel prima, leggete il Kernel HOWTO. Se state usando una buona
  distribuzione (come Red Hat [meglio Debian N.d.T]) e non avete mai
  messo mano al kernel o ai moduli (rovinandolo ;)), allora nfs dovrebbe
  essere gi disponibile.


  Ora, dal prompt di root, potete lanciare il comando appropriato e
  vedere il file system apparire. Continuando l'esempio della sezione
  precedente, vogliamo montare la partizione in /mn/eris/local da eris.
  Ci  fatto con il comando:


  ______________________________________________________________________
  mount -o rsize=1024,wsize=1024 eris:/mn/eris/local /mnt
  ______________________________________________________________________




  (Torneremo successivamente sulle opzioni rsize e wsize). Il file
  system  ora disponibile sotto /mnt, potete fare cd in esso e con un
  ls vedere tutti i file che vi sono presenti. Noterete che non  cos
  veloce come su un file system locale, ma molto pi conveniente che
  usare ftp. Se, invece di montare il file system, il comando mount
  produce un errore come mount: eris:/mn/eris/local failed, reason given
  by server: Permission denied, significa che il file exports  errato
  oppure avete dimenticato di lanciare il comando exportfs dopo averlo
  modificato. Se invece dice mount clntudp_create: RPC: Program not
  registered significa che nfsd o mountd non sta girando sul server
  oppure c' un problema nel file hosts.{allow,deny} di cui abbiamo
  parlato precedentemente.

  Per rimuovere il filesystem, usare il comando:


  ______________________________________________________________________
  umount /mnt
  ______________________________________________________________________




  Per fare in modo che il sistema monti un file system al boot, occorre
  modificare il file /etc/fstab. Per il nostro esempio aggiungere la
  seguente riga:


  ______________________________________________________________________
  # device      mountpoint     fs-type     options              dump fsckorder
  ...
  eris:/mn/eris/local  /mnt    nfs        rsize=1024,wsize=1024 0    0
  ...
  ______________________________________________________________________




  Questo  tutto, pi o meno.


  4.1.  Opzioni del comando mount

  Ci sono alcune opzioni che dovreste considerare almeno una volta.
  Controllano il modo in cui i client NFS gestiscono i crash della rete
  o del server. Uno dei fattori positivi di NFS  che questi problemi
  vengono gestiti molto bene... se configurate i client in modo
  corretto.  Ci sono due tipi di problemi:


     soft
        I client NFS sono responsabili di riportare l'errore al processo
        che sta accedendo a un file su un file system montato. Alcuni
        programmi gestiscono la segnalazione, altri no. Non raccomando
        l'uso di questo parametro, poich  rivolto ai file corrotti e
        ai dati persi.  meglio non utilizzarlo in particolare per i
        dischi di posta --- se ci tenete alla vostra posta.


     hard
        Il programma che cerca di accedere a un file su un file system
        NFS si bloccher quando il server ha un crash. Il processo non
        potr essere interrotto a meno che non si specifichi il
        parametro intr. Quando il server NFS torna in linea, il
        programma riprender a funzionare correttamente. Questo 
        probabilmente il funzionamento che si vorrebbe. Raccomando di
        usare hard,intr su tutti i file system montati via NFS.



  Riprendendo l'esempio precedente, modifichiamo la linea dell'fstab:








  ______________________________________________________________________
  # device         mountpoint fs-type    options                   dump fsckorder
  ...
  eris:/mn/eris/local  /mnt     nfs   rsize=1024,wsize=1024,hard,intr 0 0
  ...
  ______________________________________________________________________





  4.2.  Ottimizzare NFS

  Normalmente, se non vengono usate le opzioni rsize e wsize, NFS
  legger e scriver blocchi di 4096 o 8192 byte. Alcune combinazioni di
  kernel di Linux e schede di rete possono non essere in grado di
  gestire blocchi cos grandi o potrebbero non esserlo comunque in
  maniera ottimale. Quindi dobbiamo provare a sperimentare varie
  dimensioni per determinare quali siano i parametri che funzionano e
  garantiscono le migliori prestazioni.  Si pu provare l'influenza
  delle opzioni sulla velocit con alcuni semplici comandi. Se avete
  montato la partizione come visto precedentemente e avete i diritti di
  scrittura, potete provare con il seguente test di scrittura
  sequenziale:


  ______________________________________________________________________
  time dd if=/dev/zero of=/mnt/testfile bs=16k count=4096
  ______________________________________________________________________




  In questo modo si crea un file di 64 MB di zeri (grande abbastanza per
  fare in modo che l'uso della cache non sia significativo sulle
  prestazioni; usate una dimensione maggiore se avete molta memoria
  disponibile).  Lanciatelo alcune volte (5-10?) e calcolate il tempo
  medio. Il tempo da tenere maggiormente in considerazione  quello
  indicato con 'elapsed' oppure 'wall clock'. Potete quindi verificare
  le prestazioni in lettura:


  ______________________________________________________________________
  time dd if=/mnt/testfile of=/dev/null bs=16k
  ______________________________________________________________________



  Fatelo alcune volte e calcolate la media dei tempi. Quindi smontate e
  rimontate la partizione nuovamente ma con rsize e wsize maggiori.
  Dovrebbero essere sempre multipli di 1024 e non essere pi grandi di
  16384, che  la dimensione massima ammessa da NFS versione 2. Dopo
  averla montata nuovamente, fate un cd nel file system montato e
  provate qualche semplice comando tipo ls, esplorate il file system per
  verificare se tutto funziona correttamente. I sintomi di rsize/wsize
  troppo grandi, sono molto strani e per nulla ovvi. Un sintomo tipico 
  un elenco incompleto di file quando viene fatto un 'ls', senza alcun
  messaggio di errore. Oppure la lettura dei file fallisce miseramente
  senza messaggi di errore. Dopo avere stabilito che le dimensioni di
  rsize e wsize funzionano, potete provare di nuovo a effettuare i
  controlli.  Server diversi hanno dimensioni ottimali diverse. SunOS e
  Solaris hanno la reputazione di andare molto pi veloci con blocchi di
  4096 byte.



  I kernel di Linux pi recenti (dal 1.3), eseguono un read-ahead per
  rsize di dimensioni maggiori o uguali alla dimensione della pagina
  della macchina. Sui processori Intel, la dimensione della pagina  di
  4096 byte. Poich l'uso del read-ahead aumenta significativamente le
  prestazioni in lettura di NFS, raccomando di impostare a 4096 le
  dimensioni di rsize.


  Ricordatevi di modificare /etc/fstab per riflettere le dimensioni di
  rsize/wsize che avete trovato essere le migliori.


  Un trucco per accelerare le prestazioni in scrittura di NFS  quello
  di disabilitare la scrittura in sincronia sul server. Le specifiche di
  NFS controllano che le richieste di scrittura sul server non siano
  considerate terminate finch i dati non siano memorizzati su un
  supporto non volatile (il disco). Questo limita le prestazioni in
  scrittura, per cui disabilitando questa caratteristica si otterr un
  incremento delle prestazioni. Il nfsd di Linux non ha pi fatto
  scritture sincrone da quando non lo fa nemmeno il file system stesso.
  Su macchine non Linux,  possibile migliorare le prestazioni
  modificando in questo modo il file /etc/exports:


  ______________________________________________________________________
  /dir    -async,access=linuxbox
  ______________________________________________________________________




  o in modo simile. Fate riferimento alla pagina man relativa al file
  exports della macchina in questione. Da notare che ci aumenta la
  possibilit di perdita di dati.


  5.  NFS su linee lente

  Le linee lente includono Modem, ISDN e tutte le altre connessioni su
  lunga distanza.


  Questa sezione si basa sulla conoscenza dei protocolli usati, ma non
  su prove reali poich non ho modo di verificarli. Fatemi sapere le
  vostre esperienze se avete la possibilit di provare ;-)


  La prima cosa da ricordare  che NFS  un protocollo lento.  Ha un
  grosso overhead di sistema. Usare NFS  come usare il kermit per
  trasferire i file.  veramente lento. Quasi tutto  pi veloce di NFS.
  FTP, HTTP, rcp e ssh sono pi veloci.


  Siete ancora convinti di volerlo provare? OK.


  I parametri predefiniti di NFS sono per linee veloci e con bassa
  latenza. Se usate questi parametri su linee ad alta latenza si
  potrebbero verificare errori, operazioni non portate a termine, file
  che risultano essere pi corti di quanto siano in realt e altri fatti
  misteriosi.


  La prima cosa da fare  di non usare l'opzione per il mount soft.
  Questo potrebbe fare in modo che i timeout restituiscano errori alle
  applicazioni, che potrebbero non gestirli correttamente.  Quella
  appena descritta potrebbe essere la causa di misteriosi fallimenti.
  Usate invece l'opzione hard. Quando l'opzione hard  attiva, i timeout
  generano infiniti tentativi invece di terminare l'operazione che il
  software voleva effettuare. Ed  ci di cui avete bisogno.


  La prossima cosa da fare  ingannare le opzioni timeo e retrans. Sono
  descritte nella pagina man nfs(5), che  qui riportata [tradotta NdT]:


  ______________________________________________________________________
         timeo=n        Il valore, in decimi  di  secondo  prima di
                        tentare  una  ritrasmissione  dopo  un  RPC
                        timeout.  Il  valore  di  default    di  7
                        decimi  di  secondo. Dopo il primo timeout,
                        il  timeout  viene   raddoppiato  dopo ogni
                        successivo  timeout fino a un massino di 60
                        secondi oppure nel caso avvenga un  timeout
                        maggiore.  Inoltre,  se  il  filesystem   
                        montato  in  modo  hard, ogni nuovo timeout
                        avr  come  valore  di  partenza, il doppio
                        del  valore  di  partenza della sequenza di
                        timeout  precedente,  che  si  raddoppia  a
                        ogni  ritrasmissione.  Il  massimo  timeout
                        rimane  di  60 secondi. Le migliori presta-
                        zioni si raggiungono incrementando il valo-
                        re  di  timeout quando si monta un disco su
                        una  rete  lenta, su un server lento oppure
                        attraverso router e gateway.

         retrans=n      Il numero  di  timeout minori e ritrasmis-
                        sioni  che  si devono verificare prima che
                        si verifichi un timeout maggiore. Il valo-
                        re  di  default   di 3 timeout. Quando si
                        verifica  un timeout maggiore, viene bloc-
                        cata l'operazione sul file e sulla console
                        appare "server  not responding".
  ______________________________________________________________________




  In altre parole: se non viene ricevuta una risposta entro il timeout
  di 0,7 secondi (700ms) il client NFS ripeter la richiesta
  raddoppiando il timeout a 1,4 secondi. Se non si riceve risposta entro
  1,4 secondi la richiesta viene ripetuta ancora e il timeout viene
  raddoppiato ancora a 2,8 secondi.


  La velocit di una linea pu essere misurata con un ping con le
  dimensioni del pacchetto e di rsize/wsize uguali.















  ______________________________________________________________________
  $ ping -s 8192 lugulbanda
  PING lugulbanda.uio.no (129.240.222.99): 8192 data bytes
  8200 bytes from 129.240.222.99: icmp_seq=0 ttl=64 time=15.2 ms
  8200 bytes from 129.240.222.99: icmp_seq=1 ttl=64 time=15.9 ms
  8200 bytes from 129.240.222.99: icmp_seq=2 ttl=64 time=14.9 ms
  8200 bytes from 129.240.222.99: icmp_seq=3 ttl=64 time=14.9 ms
  8200 bytes from 129.240.222.99: icmp_seq=4 ttl=64 time=15.0 ms

  --- lugulbanda.uio.no ping statistics ---
  5 packets transmitted, 5 packets received, 0% packet loss
  round-trip min/avg/max = 14.9/15.1/15.9 ms
  ______________________________________________________________________




  Il tempo qui  quanto impiega il pacchetto del ping ad andare avanti e
  indietro da lugulbanda. 15 ms  abbastanza veloce. Su una linea a
  28.800 bps ci si pu aspettare qualcosa come 4000-5000ms, e se la
  linea  molto carica questo tempo sar ancora pi alto, anche doppio.
  Quando il tempo  elevato, si dice che la linea ha elevata latenza.
  Generalmente per pacchetti pi grandi e per linee cariche, il tempo
  tende ad aumentare. Aumentate il parametro timeo per adattarlo alla
  velocit della linea e al carico. E poich la latenza aumenta se si
  usa la linea per altre operazioni, se volete provare FTP e NFS allo
  stesso momento, provate a misurare i tempi del ping mentre usate NFS e
  FTP per trasferire i file e aumentare timeo perch corrisponda alla
  latenza della linea.



  6.  Sicurezza e NFS

  Non sono un esperto di sicurezza, ma sono abbastanza coscio dei
  problemi di sicurezza. Ma attenzione: questo non  certo un elenco
  completo dei problemi legati a NFS e se pensate di essere sicuri una
  volta che avrete letto e implementato ci che  scritto qui, avrei
  giusto giusto un ponte da vendervi.


  Questa sezione non  probabilmente di utilit se vi trovate in un una
  rete chiusa, dove conoscete gli utenti e nessuno che non conoscete pu
  accedere alle macchine della rete. Ovvero, non ci dovrebbero essere
  modi per entrare nella rete in dialin (via modem) e non dovrebbe
  essere collegata ad altre reti di cui non conoscete gli utenti.
  Pensate che io sia paranoico?  Non lo sono per nulla. Questo  solo un
  aiuto di base sulla sicurezza.  E ricordate, le cose che dico qui sono
  solo l'inizio. Un sito sicuro ha bisogno di un amministratore
  diligente che sappia dove trovare informazioni e tutti i problemi
  relativi alla sicurezza.


  NFS ha un problema di sicurezza di base per cui il client, se non
  specificato altrimenti, si fida del server NFS e viceversa. Questo pu
  essere negativo. Significa che se l'account di root viene compromesso
  sul server, viene compromesso anche quello di tutti i client e
  viceversa.  Ci sono alcune strategie di copia per questo, sulle quali
  torneremo poi.


  Dovreste leggere gli avvisi del CERT su NFS, molto di ci che  qui
  scritto deriva dai messaggi scritti dal CERT.  Vedere
  ftp.cert.org/01-README per un elenco aggiornato degli avvisi del CERT.
  Ecco qui alcuni avvisi relativi a NFS.

  ______________________________________________________________________
  CA-91:21.SunOS.NFS.Jumbo.and.fsirand                            12/06/91
       Vulnerabilities concerning Sun Microsystems, Inc. (Sun) Network
       File System (NFS) and the fsirand program.  These vulnerabilities
       affect SunOS versions 4.1.1, 4.1, and 4.0.3 on all architectures.
       Patches are available for SunOS 4.1.1.  An initial patch for SunOS
       4.1 NFS is also available. Sun will be providing complete patches
       for SunOS 4.1 and SunOS 4.0.3 at a later date.

  CA-94:15.NFS.Vulnerabilities                                    12/19/94
       This advisory describes security measures to guard against several
       vulnerabilities in the Network File System (NFS). The advisory was
       prompted by an increase in root compromises by intruders using tools
       to exploit the vulnerabilities.

  CA-96.08.pcnfsd                                                 04/18/96
       This advisory describes a vulnerability in the pcnfsd program (also
       known as rpc.pcnfsd). A patch is included.
  ______________________________________________________________________




  6.1.  Sicurezza del client

  Sul client possiamo decidere di non volere dare troppa fiducia al
  server in un paio di modi con delle opzioni del mount. Per esempio
  possiamo vietare l'uso di programmi SUID su partizioni NFS con
  l'opzione nosuid. Questa  una buona idea e dovreste considerarne
  l'uso con tutti i dischi che montate via NFS. Significa che gli utenti
  root del server non possono fare programmi SUID-root sul file system,
  entrare come utenti normali sui client e usare i programmi SUID per
  diventare root anche sui client. Possiamo anche vietare l'esecuzione
  di file sulla partizione montata usando l'opzione noexec, ma 
  sicuramente meno pratico di nosuid, poich  naturale pensare che una
  partizione debba avere dei file eseguibili o degli script. Potete
  inserire queste opzioni nella colonna opzioni con rsize e wsize
  separati da virgole.


  6.2.  Sicurezza del server: nfsd

  Sul server possiamo decidere che non vogliamo dare fiducia all'account
  root dei client. Possiamo farlo usando l'opzione root_squash nel file
  exports:


  ______________________________________________________________________
  /mn/eris/local apollon(rw,root_squash)
  ______________________________________________________________________



  Ora, se l'utente con UID 0 sul client cerca di accedere (lettura,
  scrittura, cancellazione) al file system, il server sostituisce l'UID
  con quello dell'utente 'nobody' del server. Ci significa che il root
  dei client non pu accedere o modificare i file del server che solo
  root pu accedere o modificare. Ci rappresenta un fatto positivo e
  probabilmente dovreste usare root_squash su tutti i file system che
  esporte. Potrebbe sorgere il dubbio che l'utente root dei client pu
  usare il comando 'su' per diventare un altro utente e accedere e
  cambiare i file di quell'utente!. La risposta  affermativa. Questo 
  ci che avviene e quello che deve avvenire su Unix e NFS e ha
  un'importante conseguenza: i file importanti devono essere di
  propriet di root e non di bin o altri utenti non root, poich il solo
  utente a cui l'utente root dei client non pu accedere  l'account
  root del server. Nella pagina man di NFSd ci sono molte altre opzioni
  squash e potete decidere di non dare fiducia a qualsiasi utente dei
  client.  possibile anche applicare lo squash a gruppi di UID o GID.
  Tutto ci  descritto nella pagina man di NFSd.


  root_squash  realt un'opzione di default con Linux NFSd, per
  garantire accesso come root ai filesystem, utilizza l'opzione
  no_root_squash.


  Un'altra cosa importante  assicurarsi che nfsd controlli che tutte le
  richieste provengano da una porta privilegiata. Se accetta richieste
  da qualsiasi porta, un utente senza privilegi particolari potrebbe
  lanciare un programma facilmente ottenibile su Internet che comunica
  con il server nfs e gli fa credere di essere un utente qualsiasi.
  L'nfsd di Linux fa questo controllo per default, ma su altri sistemi
  operativi dovrete effettuare questo controllo per contro vostro, che
  dovrebbe essere descritto nella pagina man di nfsd del sistema
  operativo usato.


  Un'altra cosa: mai esportare un filesystem a 'localhost' o 127.0.0.1.
  Credetemi.


  6.3.  Sicurezza del server: il portmapper

  Il portmapper di base ha problemi se usato con nfsd che rendono
  possibile ottenere file dal server NFS senza alcun privilegio.
  Fortunatamente il portmapper che viene distribuito con Linux 
  relativamente sicuro contro questo attacco e pu essere reso
  maggiormente sicuro configurando l'elenco degli accessi in due file.


  Non tutte le distribuzioni di Linux sono uguali. Alcune distribuzioni
  apparentemente aggiornate non includono un portmapper sicuro nemmeno
  oggi, a distanza di molti anni da quando il problema  stato reso
  noto. Almeno una distribuzione contiene la pagina man per un
  portmapper sicuro, ma il portmapper reale non  sicuro. Un modo facile
  per controllare se il vostro portmapper  valido oppure no,  quello
  di lanciare il comando strings(1) per verificare se il portmapper
  legge i file /etc/hosts.deny e /etc/hosts.allow, importanti per
  gestire la sicurezza. Posto che il portmapper  /usr/sbin/portmap si
  pu controllarlo con il seguente comando: strings /usr/sbin/portmap |
  grep hosts.  Sulla mia macchina il risultato :


  ______________________________________________________________________
  /etc/hosts.allow
  /etc/hosts.deny
  @(#) hosts_ctl.c 1.4 94/12/28 17:42:27
  @(#) hosts_access.c 1.20 96/02/11 17:01:27
  ______________________________________________________________________




  Per prima cosa modifichiamo il file /etc/hosts.deny. Dovrebbe
  contenere la riga:


  ______________________________________________________________________
  portmap: ALL
  ______________________________________________________________________

  che nega l'accesso a chiunque. Poich l'accesso  chiuso, provate il
  comando rpcinfo -p per verificare se il vostro portmapper legge e
  obbedisce realmente a questo file. rpcinfo non dovrebbe dare alcun
  risultato oppure un messaggio di errore. Non dovrebbe essere
  necessario riavviare il portmapper.


  Chiudere il portmapper a chiunque  un po' troppo drastico, quindi
  riapriamolo modificando il file /etc/hosts.allow, ma prima cerchiamo
  di capire che cosa inserirci. Il file dovrebbe semplicemente avere un
  elenco di tutte le macchine a cui si vuole garantire accesso al
  portmapper. Ci sono comunque pochissimi casi di macchine che hanno
  bisogno di un accesso totale per qualsiasi ragione. Il portmapper
  amministra nfsd, mountd, ypbind/ypserv, pcnfsd e i servizi 'r', come
  ruptime e rusers.  Di questi, solo nfsd, mountd, ypbind/ypserv e forse
  pcnfsd possono avere qualche conseguenza. Tutte le macchine che
  richiedono accessi ai servizi della vostra macchina dovrebbero essere
  autorizzate a farlo. Supponiamo che l'indirizzo della vostra macchina
  sia 129.240.223.254 e che si trovi in una sottorete 129.240.223.0 che
  deve poter accedere ai servizi della macchina (questa  la
  terminologia introdotta da Networking HOWTO: se non vi ricordate
  rileggetelo). Scriviamo quindi:


  ______________________________________________________________________
  portmap: 129.240.223.0/255.255.255.0
  ______________________________________________________________________



  in hosts.allow. Questo  quanto viene scritto anche come subnet mask
  in ifconfig. Per il dispositivo eth0 di questa macchina, ifconfig
  dovrebbe essere:


  ______________________________________________________________________
  ...
  eth0      Link encap:10Mbps Ethernet  HWaddr 00:60:8C:96:D5:56
            inet addr:129.240.223.254  Bcast:129.240.223.255  Mask:255.255.255.0
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:360315 errors:0 dropped:0 overruns:0
            TX packets:179274 errors:0 dropped:0 overruns:0
            Interrupt:10 Base address:0x320
  ...
  ______________________________________________________________________



  e netstat -rn dovrebbe mostrare:


  ______________________________________________________________________
  Kernel routing table
  Destination     Gateway         Genmask         Flags Metric Ref Use    Iface
  ...
  129.240.223.0   0.0.0.0         255.255.255.0   U     0      0   174412 eth0
  ...
  ______________________________________________________________________



  (l'indirizzo di rete  nella prima colonna).

  I file hosts.deny e hosts.allow sono descritti nelle pagine man con lo
  stesso nome.

  IMPORTANTE: non inserite nient'altro che NUMERI IP nelle linee del
  portmapper di questi file. La risoluzione dei nomi pu indirettamente
  causare attivit del portmapper che pu causare attivit del
  portmapper che pu indirettamente causare attivit del portmapper...


  Ci che abbiamo visto rende il server pi chiuso. Il solo problema che
  ora rimane (eh gi :))  che qualcuno riesca a corrompere la shell di
  root (o che riesca a far partire la macchina con un floppy MS-DOS) su
  una macchina affidabile e, usando questo privilegio, spedisca da una
  porta sicura richieste come utente qualsiasi.


  6.4.  NFS e firewall

   una buona cosa proteggere con un firewall le porte di nfs e del
  portmapper sul vostro router o firewall. L'nfsd funziona sulla porta
  2049, con i protocolli udp e tcp. Il portmapper lavora in genere sulla
  porta 111, sia tcp sia udp e mountd sulle porte 745 e 747, sia tcp sia
  udp.  Controllate le porte usate con il comando rpcinfo -p.


  Se invece NFS deve attraversare un firewall, ci sono delle opzioni su
  nfsd e mountd pi recenti per usare porte non standard che possono
  essere tenute aperte attraverso il firewall.


  6.5.  Riassunto

  Se usate hosts.allow/deny, root_squash, nosuid e l'opzione per le
  porte privilegiate nei programmi portmapper/nfs, evitate la maggior
  parte dei bug conosciuti di nfs e potete essere abbastanza sicuri.
  Comunque ci sono altri problemi: se qualcuno ha accesso alla rete pu
  far apparire strani comandi nel vostro .forward o leggere la vostra
  posta se le directory /home o /var/spool/mail sono esportate via NFS.
  Per la stessa ragione, non dovreste mai lasciare le vostre chiavi
  private di PGP su un disco esportato via NFS. O almeno ora sapete i
  rischi che correte.


  NFS e il portmapper formano un sottosistema complesso e non 
  improbabile che nuovi bug vengano scoperti, sia nella progettazione
  sia nell'implementazione. Ci possono sempre essere buchi di cui
  qualcuno sta abusando. Ma questa  la vita. Per tenervi aggiornati su
  questo genere di problemi dovreste leggere alcuni newsgroup come
  comp.os.linux.announce e comp.security.announce.


  7.  Elenco di verifica di mount

  Questa sezione  basata sull'elenco di verifica dei problemi di NFS
  mount di IBM Corp. I miei ringraziamenti a loro per averlo reso
  disponibile per questo HOWTO. Se rilevate alcuni problemi montando un
  file system via NFS, controllate questo elenco prima di inviare il
  vostro problema.  Ogni elemento descrive un problema e come
  risolverlo.


  1. Il mount continua a indicare RPC: Programma non registrato


     Il portmapper  attivo?

     Soluzione: avviarlo.

     Mountd  attivo?
     Soluzione: avviarlo.

     Nfsd  attivo?

     Soluzione: avviarlo.

     Il portmapper non pu rispondere a causa di /etc/hosts.deny?

     Soluzione: rimuovere la regola in hosts.deny o aggiungere una
     regola a hosts.allow per fare in modo che il portmapper possa
     comunicare con voi.


  2. Il file system non viene esportato o non viene esportato al client
     in questione:


     Soluzione: esportarlo.


  3. La risoluzione del nome non corrisponde all'elenco di exports


     Esempio: la lista di export dice di esportare a johnmad ma il nome
     di johnmad  risolto in johnmad.austin.ibm.com e quindi il mount
     viene negato.


     Soluzione: inserire nell'export entrambi i nomi.


     Pu anche accadere se il client ha due interfacce con nomi diversi
     e l'exports ne specifica una sola.


     Soluzione: inserire nell'exports entrambe le interfacce.


     Pu anche accadere se il server non riesce a eseguire le funzioni
     lookuphostbyname o lookuphostbyaddr sul client. Accertatevi che il
     client possa fare host <name>; host <ip_addr>; e che entrambe
     mostrino la stessa macchina.


     Soluzione: controllare la risoluzione dei nomi.


  4. Il file system  stato montato dopo che l'NFS  partito (sul
     server). In questo caso il server sta esportando la directory
     sottostante NFS e non il filesystem esportato.


     Soluzione: arrestare e riavviare NFSd.


     Nota: I client che abbiano gi montato il filesystem avranno
     problemi dopo il riavvio del server.


  5. La data  sbagliata su una o entrambe le macchine (ci pu dare
     problemi usando il comando make)


     Soluzione: correggere la data.


     L'autore dell'HOWTO raccomanda di usare NTP per sincronizzare gli
     orologi.  Poich ci sono delle restrizioni su NTP negli USA,
     occorre prelevare le versioni per Debian, Red Hat o Slackware da
     ftp://ftp.hacktic.nl/pub/replay/pub/linux o qualche mirror.


  6. Il server non accetta il mount da un utente che  in pi di 8
     gruppi.


     Soluzione: diminuire il numero di gruppi cui appartiene o usa un
     altro utente.



  8.  FAQ

  Questa  la sezione delle FAQ.  basata su una vecchia FAQ di NFS di
  Alan Cox.


  Se si verificano problemi montando un filesystem, verificate se il
  vostro problema  descritto nella sezione "Elenco di verifica di
  mount".


  1. Ho un gran numero di errori 'stale nfs handl quando uso Linux come
     server NFS


     Ci  causato da un bug in alcune vecchie versioni di nfsd.  
     stato corretto a partire da nfs-server2.2beta16


  2. Quando provo a montare un filesystem ottengo



         can't register with portmap: system error on send







  Probabilmente state usando un sistema basato sulla distribuzione
  Caldera.  C' un bug negli script rc. Contattate Caldera per ottenere
  la versione corretta.


  3. Perch non posso eseguire un file dopo averlo copiato sul server
     NFS?


     Il fatto  che nfsd tiene una cache dei file aperti per motivi di
     prestazioni (ricordate, gira in un ambiente utente). Mentre nfsd ha
     un file aperto (come nel caso di una scrittura), il kernel non ne
     consente l'esecuzione. Le versioni di nfsd pi recenti di  spring
     95 rilasciano i file aperti dopo qualche secondo, versioni pi
     vecchie possono impiegare anni...


  4. I miei file su NFS sono in sola lettura


     Il default per il server NFS di Linux  di montare i filesystem in
     sola lettura. Leggete le sezioni "Mountd e nsfd" ed "Esportare
     filesystem" in questo HOWTO e fate riferimento alle pagine man di
     exports e nfsd. Avrete bisogno di modificare /etc/exports.


  5. Monto una partizione da un server Linux e, mentre il comando ls
     funziona, non riesco a leggere o scrivere i file.


     Su versioni pi vecchie di Linux occorre lanciare il server NFS con
     rsize=1024,wsize=1024.


  6. Monto un server NFS Linux con la dimensione dei blocchi tra
     3500-4000 e regolarmente smette di rispondere.


     Allora semplicemente non fatelo. Questo non si verifica con i
     kernel 2.0 e 2.2. Per quanto mi ricordo non dovrebbero esserci
     problemi nemmeno con la versione 1.2.


  7. Pu Linux gestire NFS via TCP?


     Al momento no.


  8. Ottengo numerosi strani errori se provo a montare una macchina
     usando Linux.


     Accertatevi che l'utente sia in 8 gruppi o meno. Server pi vecchi
     lo richiedono.


  9. Quando riavvio la mia macchina a volte smette di rispondere
     provando a smontare un NFS server che non risponde.


     Non smontate server NFS quando riavviate. Ignorateli, non causano
     problemi se non li si smonta. Il comando  umount -avt nonfs.


  10.
     I client NFS Linux sono molto lenti quando scrivono su sistemi Sun
     o BSD.


     Normalmente NFS scrive i dati in modo sincrono ( possibile
     disabilitare questa modalit lo si desidera, ma si rischia di
     perdere dei dati). Funzionano peggio i kernel derivati da BSD, che
     tendono a non essere in grado di lavorare in piccoli blocchi,
     quindi quando si scrivono 4K di dati da una macchina Linux in
     pacchetti da 1K, BSD fa questo:










          lettura di una pagina da 4K
          modifica di 1K
          scrittura di 4K sul disco fisico
          lettura di una pagina da 4K
          modifica di 1K
          scrittura di 4K sul disco fisico
          ecc..






  11.
     Quando connetto molti client a un server NFS Linux le prestazioni
     calano improvvisamente.


     Il protocollo NFS usa pacchetti UDP frammentati. Il kernel ha un
     limite sulla quantit di frammenti di pacchetti incompleti di cui
     pu disporre prima di eliminare i pacchetti. Nella versione 2.2 il
     protocollo  adattabile in runtime attraverso il filesystem /proc:
     /proc/sys/net/ipv4/ipfrag_high_thresh e ipfrag_low_thresh. Nella
     versione 2.0 queste sono le costanti di runtime definite in
     .../linux/net/ipv4/ip_fragment.c, IPFRAG_HIGH_THRESH e
     IPFRAG_LOW_THRESH. Il significato di questi valori  costituito dal
     fatto che quando l'occupazione della memoria dei frammenti UDP non
     assemblati raggiunge il limite ``ipfrag_high_thresh'' in byte (256K
     per default in 2.2.3 e 2.0.36) viene ridotta a ``ipfrag_low_tresh''
     improvvisamente. Questa operazione viene effettuata eliminando i
     frammenti.  simile alla perdita di pacchetti e se il limite pi
     elevato viene raggiunto, le prestazioni del server calano
     notevolmente.


     256K  sufficiente per un numero pari a 30 client. Se ne avete 60,
     raddoppiatelo.  E raddoppiate anche il limite inferiore.


  12.
     Sto usando Linux 2.2 (o versione successiva) con knfsd e non riesco
     a fare in modo che la mia macchina AIX, IRIX, Solaris, DEC-Unix,
     ... lo monti.


     Knfsd indica che viene implementata la versione 3 di NFS. Ma questo
     non avviene.  Esiste un'opzione per evitare che annunci questa
     versione. Usatela.  Oppure potete immettere "vers=2" nell'elenco di
     opzioni di montaggio sui client.


  13.
     La mia macchina AIX 4 non pu montare il mio server NFS Linux.
     Viene visualizzato



               mount: 1831-011 access denied for server:/dir
               mount: 1831-008 giving up on:
               server:/dir
               The file access permissions do not allow the specified action.





  o qualcosa di simile.


  AIX 4.2 ha utilizzato porte riservate (<1024) per NFS. AIX 4.2.1 e 4.3
  non sono limitati a porte riservate. Inoltre, AIX 4.2.1 e 4.3 cercano
  di effettuare il montaggio mediante NFS3, quindi NFS/TCP, infine
  NFS/UDP.


  L'aggiunta di


  ______________________________________________________________________
  nfso -o nfs_use_reserved_ports=1
  ______________________________________________________________________




  alla fine di rc.tcpip forzer l'utilizzo di porte riservate.  (Questo
  suggerimento  stato fornito da Brian Gorka)




  9.  Esportare filesystem

  Il modo di esportare i filesystem attraverso NFS non  completamente
  coerente tra le varie piattaforme. In questo caso Linux e Solaris 2
  sono le eccezioni. Questa sezione propone un breve elenco di modi di
  effettuare l'esportazione sui vari sistemi. Se il vostro sistema non 
  riportato dovete controllare sulle pagine del manuale. Provate a
  cercare parole come: nfsd, system administration tool, rc scripts,
  boot scripts, boot sequence, /etc/exports, exportfs. User un esempio
  durante questa sezione: come esportare /mn/eris/local ad apollon in
  lettura e scrittura.


  9.1.  IRIX, HP-UX, Digital-UNIX, Ultrix, SunOS 4 (Solaris 1), AIX

  Questi sistemi operativi usano il tradizionale formato di Sun per il
  file export. In /etc/exports scrivete:


  ______________________________________________________________________
  /mn/eris/local -rw=apollon
  ______________________________________________________________________



  La documentazione completa si trova nella pagina man di exports.  Dopo
  avere modificato il file, lanciate exportfs -av per esportare i
  filesystem.


  Quanto sono limitate le varie versioni di exportfs relative alle
  variazioni di sintassi? Su alcuni sistemi troverete che le righe
  precedenti vengono lette come:


  ______________________________________________________________________
  /mn/eris/local apollon
  ______________________________________________________________________



  oppure possono degenerare in:


  ______________________________________________________________________
  /mn/eris/local rw=apollon
  ______________________________________________________________________



  Consiglio di essere formali, altrimenti si rischia che la versione
  successiva di exportfs sia pi sensibile e che quindi non funzioni pi
  nulla.


  9.2.  Solaris 2

  Sun ha completamente reinventato la ruota quando fecero Solaris 2.
  Quindi la loro sintassi  completamente diversa da quella di tutti gli
  altri. Ci che dovete fare  modificare il file /etc/dfs/dfstab.
  Questo file deve contenere i comandi share, come descritto nella
  pagina man share(1M).  Ad esempio:


  ______________________________________________________________________
  share -o rw=apollon -d "Eris Local" /mn/eris/local
  ______________________________________________________________________



  Dopo avere modificato il file, lanciate il programma shareall per
  esportare i filesystem.


  10.  NFS in Linux 2.2

  Mentre scrivo questo HOWTO, Linux 2.2.12  la versione del kernel
  corrente e utilizzare NFS pu rivelarsi un po' complesso.


  Cosa accade se lo stato di NFS in Linux 2.4  i unknown.


  La nuova caratteristica importante di Linux 2.2  il supporto per un
  demon del server nfs in-kernel, noto come knfsd in 2.2. Questo modo di
  implementare nfsd ha alcuni vantaggi, quello principale  la velocit.
  Una macchina Linux 2.2 con knfsd  un server nfs rispettabile. Si pu
  continuare a utilizzare l'nfsd precedente con Linux 2.2. Questo
  comporta alcuni vantaggi, principalmente in fatto di semplicit.


  Se utilizzate un kernel sorgente o un pacchetto binario creato da
  RedHat (6.0 o successiva), SuSE (6.1 o successiva) o altri integratori
  di sistemi professionali, hanno probabilmente integrato tutte le
  funzionalit di "knfsd" nel relativo kernel e non  necessario
  preoccuparsi di nulla, poich funzioner certamente nella maggior
  parte dei casi.  Fino al momento in cui non compilate un vostro
  kernel. Se usate un kernel di stock Linux 2.2 (almeno fino a 2.2.12)
  knfsd verr interrotto.


  Per utilizzare questo kernel  necessario disporre del pacchetto knfsd
  di H.J. Lus. Si tratta di una raccolta di patch e delle utility
  necessarie per la versione 2.2 che Lu sta gestendo a tempo perso.
  Potete disporne dal mirror del kernel locale, il sito principale 
  ftp.kernel.org:/pub/linux/devel/gcc/. Non  indicato per uso generale.
  Se trovate che questo pacchetto pu creare dubbi non fatelo da soli.
  Attendete un pacchetto del kernel dell'integratore del sistema
  preferito (ad esempio, Red Hat, SuSE o ...).


  Inoltre, non inviatemi domande relative a questo argomento, non sono
  in grado di aiutarvi.  Non dispongo di alcun server knfsd. Se trovate
  errori o omissioni in questa documentazione, scrivetemi e rivedr
  questo HOWTO e ne distribuir una nuova versione.


  State ancora leggendo? Ok.  H.J.Lu pubblica argomenti relativi alle
  nuove versioni di questo pacchetto sulla mailing list del kernel
  Linux.  Altri problemi relativi a NFS nella versione 2.2 vengono
  pubblicati in questa mailing list. Leggeteli.


   importante notare una cosa in relazione al pacchetto knfsd.
  Annuncia che supporta la versione 3 di NFS. Tuttavia, non la supporta.
  Esiste un'opzione che si pu utilizzare per evitare la presenza
  dell'annuncio di NFS3, oppure si pu specificare "vers=2" nell'elenco
  di opzioni di mount sui client.


  10.1.  Il client

  Il client  alquanto semplice. Per bloccarlo  necessario avere statd
  (del pacchetto knfsd) compilato, installato e avviato dagli script di
  boot. Fatelo. Statd ha bisogno di una directory /var/lib/nfs per
  funzionare, altrimenti verr terminato senza messaggi di errore. La
  directory deve essere creata prima di eseguirlo.


  Dopo l'esecuzione di statd si pu usare il programma testlk in
  tools/locktest per verificare se il blocco di un file in un filesystem
  NFS funziona. Dovrebbe essere cos. Se viene visualizzato No locks
  available, statd non funziona.


  In realt, si pu anche evitare il blocco completo (non sto
  consigliando di farlo), immettendo ``nolock'' nell'elenco di opzioni
  di mount.


  Per quanto ne so, questo  ci che  necessario per far funzionare il
  client.


  Se avete un server Sparc o Alpha NFS scoprirete che il client NFS in
  Linux 2.2 avr prestazioni peggiori. Le velocit di trasferimento da e
  verso il server sono cos tragiche che ... non potete nemmeno
  immaginarle.   molto peggio che in Linux 2.0. Esiste tuttavia una
  soluzione.  La serie di kernel 2.2 di Alan Cox (che  leggermente pi
  sperimentale dei normali kernel 2.2 di Linus) include una patch per
  fare in modo che Linux 2.2 funzioni quando usato con i server Alpha e
  Sparc. Se volete usare i kernel 2.2 di Alan Cox dovreste leggere la
  mailing list relativa ai kernel Linux e potrete scoprire dove si trova
  la patch.  La home page di questa patch 
  <http://www.uio.no/~trondmy/src/>, nel caso vogliate provare ad
  applicarla a un kernel 2.2 di produzione. Questa patch non sar
  probabilmente disponibile in Linux 2.4, perch richiede troppe
  modifiche nel kernel per essere accettata nel ciclo di sviluppo
  corrente. Aspettate Linux 2.5.


  Anche trondmy dispone di patch per fare in modo che Linux usi la
  versione 3 di NFS, elementi che consentiranno inoltre di usare il
  protocollo tcp come meccanismo di trasporto invece di UDP. NFSv3 
  ottimo per reti long-haul e altre reti in cui la perdita dei pacchetti
  non  uguale a zero o la latenza  elevata.


  Il motivo per cui dovreste leggere la mailing list relativa ai kernel
  Linux per usare queste patch consiste nel fatto che talvolta si sono
  verificati grossi errori.  Bug che si nutrono dei vostri file. Quindi
  fate attenzione.


  10.2.  Il server

  Il demon del server nfs in Linux 2.2 e nelle versioni successive 
  noto come ``knfsd''.  insidioso da installare. Dovete arrangiarvi da
  soli o fare riferimento ai pacchetti di kernel 2.2 rilasciati da SuSE,
  Red Hat e altri. Spiacente. Potete ancora usare il vecchio nsfd anche
  in Linux 2.2.  lento ma semplice da installare.


  11.  Server NFS su un floppy

  Questa sezione  stata scritta da Ron Peters, rpeters@hevanet.com
  Spiega come installare un server NFS al momento dell'avvio da un
  floppy. Era inizialmente progettata per fare in modo che NFS
  condividesse un cdrom da un'altra macchina non Linux/UNIX per
  installare Linux su una macchina che non disponeva di cdrom.


  11.1.  Introduzione

  Questo documento  stato creato per coloro che sperimenteranno lo
  stesso problema che ho avuto di recente. Stavo creando un server Linux
  su una macchina che non aveva un cdrom e non aveva, n ha alcuna
  possibilit di aggiungervene uno a eccezione di un dispositivo esterno
  SCSI o simile.  Ora che sta diventando sempre meno probabile che si
  debba installare un server su una macchina come questa, questo
  documento potrebbe rivelarsi poco utile. Tuttavia, lo avrei apprezzato
  al momento della creazione della mia macchina.

  Dato che la mia macchina non aveva un'unit cdrom, pensavo di trovare
  un server NFS per Win95 e condividere il cdrom per il tempo
  sufficiente a installare il sistema e utilizzarlo in rete. Dei due
  prodotti che ho trovato (non dir i nomi, ma uno era freeware e
  l'altro aveva una licenza limitata di 15 giorni), uno non funzionava e
  l'altro non poteva gestire sufficientemente bene la convenzione di
  denominazione di Linux per poter completare l'installazione.

  Ho quindi cercato di avviare la mia macchina Win95 con il set di
  dischi boot/root e di usare un floppy supplementare per installare il
  server NFS.

   stato molto semplice e la procedura  probabilmente pi semplice
  della lettura di questa introduzione, ma credo che inserire l'intera
  procedura in un posto solo avr pi valore.



  11.2.  Aspettative

  Questo documento deriva dall'uso di dischi boot/root di una delle
  correnti distribuzioni di sviluppo InfoMagic di Slackware. Ho usato la
  versione 2.0.34 del kernel per i dischi boot/root, ma i programmi del
  server NFS derivano da un server 2.0.30. Ho gi usato il metodo di
  installazione Slackware, non perch sia pi semplice o migliore, ma
  perch mi trovo pi a mio agio e non ho dedicato altro tempo a cercare
  un altro metodo.

  Non credo che ci saranno molti problemi di utilizzo con questo
  documento in relazione alla versione del sistema operativo.
  Consiglierei di usare qualcosa di abbastanza recente. Poich 
  probabile che verr utilizzato per l'installazione, sar probabilmente
  usato un set di dischi boot/root corrente.

  Le dimensioni possono variare.



  11.3.  Requisiti


    Sistema di rete e disco di avvio. Il sistema che rappresenter il
     server NFS deve avere una scheda di rete e deve essere riconosciuto
     durante il processo di boot. Ulteriori informazioni sono
     disponibili in Networking HOWTO.

    Floppy secondario che contiene rpc.portmap, rpc.mountd e rpc.nfsd.
     Questi file possono essere facilmente disponibili da un ftpsearch
     sul Web.

    Supporto di origine Slackware (o altro) (si presume che sia il cd).


  11.4.  Installazione del server


  11.4.1.  Boot del server NFS temporaneo

  Avviate il sistema del server NFS dal floppy di boot e assicuratevi
  che la scheda di rete venga riconosciuta.  anche necessario che il
  CDROM venga riconosciuto. User eth0 come scheda di rete di esempio.


  11.4.2.  Montaggio del floppy e del cdrom

  Dopo avere avviato il sistema, i dischi boot/root non sono pi
  necessari.  Il sistema  completamente contenuto nella RAM.

  Sostituite il floppy root con il disco supplementare. Montate il
  floppy:

  mount /dev/fd0 /floppy

  Questo presume che il floppy sia abbia un file system di tipo ext2.
  Immagino che il disco supplementare possa essere un floppy DOS
  contenente dei file, ma non l'ho ancora provato. Penso che sar pi
  semplice di un'immagine di un disco. In questo caso, sarebbe mount -t
  msdos ...etc.  Questo deve probabilmente essere inserito nella sezione
  ``Operazioni da effettuare''.

  Montaggio del cdrom:

  mount -t iso9660 /dev/hdc /cdrom

  I dispositivi di floppy e cdrom sono quelli che ho usato. Potrebbero
  essere diversi in base all'applicazione. I punti di mount /floppy e
  /cdrom sono presenti nell'immagine del disco floppy perch possano
  essere usati. In caso contrario, createli o utilizzate i punti di
  mount che desiderate.



  11.4.3.  Installazione della rete sul server temporaneo.

  In questa sezione il server NSF temporaneo viene impostato per
  comunicare con la rete.  Ci sono pochi comandi da eseguire. Sono
  necessarie ancora alcune informazioni prima di eseguire i comandi (i
  valori sono esempi):

  IPADDR:172.16.5.100  #Questo  l'indirizzo del server temporaneo.

  NETMASK:255.255.255.0  #Questa  la netmask.

  BROADCAST:172.16.5.255 #L'ultimo numero (255)  significativo di
  IPADDR.

  ETHNETWORK:172.16.5.0 #Ancora una volta, leggermente diverso da
  IPADDR.

  GATEWAY:172.16.5.251 #Necessario solo se avete un gateway.
  Probabilmente lo sapete gi, ma la maggior parte delle reti provate
  non ha un gateway.

  I comandi per far funzionare la rete. Inserite i valori elencati
  sopra:

  ifconfig eth0 inet IPADDR arp netmask NETMASK broadcast BROADCAST

  route add -net ETHNETWORK netmask NETMASK eth0

  Usate il comando seguente solo se avete un gateway e dovete
  attraversarlo:

  route add default gw GATEWAY netmask 0.0.0.0 eth0

  Se tutto funziona, vi trovate in rete e potraete eseguire un ping
  degli altri nodi.


  11.4.4.  Installazione della condivisione NFS.

  Determinate la directory che desiderate diventi la condivisione NFS.
  Nel caso del mio esempio, ho usato la directory /cdrom/slakware.
  Immettete questa directory nel file /etc/exports:

  echo "/cdrom/slakware" > /etc/exports


  11.5.  Esecuzione del server NFS

  Andate a /floppy/usr/sbin ed eseguite:

  ./rpc.portmap

  ./rpc.mountd

  ./rpc.nfsd


  11.5.1.  Completato, iniziate l'installazione.

  Questo dovrebbe condividere la directory ``/cdrom/slakware'' nel file
  /etc/exports.  Al termine, potete avviare la macchina perch sia
  installata da floppy boot/root (ne ho usati alcuni con cui ho avviato
  il server NFS) e iniziare l'installazione.

  Quando siete pronti a scegliere la collocazione dell'origine dei
  supporti, scegliete l'opzione relativa al server NFS. Ti verr
  richiesto l'indirizzo IP del server. Immettete l'indirizzo usato come
  IPADDR per il server. Vi verr anche richiesto il montaggio della
  directory. Si tratta della directory che avete collocato in
  /etc/exports sul server NFS.

  Il sistema provveder quindi a montare NFS sul server. Attenzione a
  eventuali messaggi di errore.  Tutto dovrebbe essere completo. Puoi
  continuare l'installazione.


  11.6.  Risoluzione dei problemi


  11.6.1.  Non ancora disponibile.

  Non dispongo ancora di informazioni sulla risoluzione dei problemi.
  Forse mentre utilizzerete questa procedura, ci saranno pi
  suggerimenti disponibili.


  11.7.  Operazioni da effettuare


  11.7.1.  Disco DOS.

  Create un disco DOS per il floppy supplementare.


  11.7.2.  Comandi rpc.

  Create un ordine specifico dell'esecuzione dei comandi rpc.* e se 
  necessario eseguire solo alcuni o tutti i comandi.




  12.  PC-NFS

  Non dovreste usare PC-NFS, ma samba.


  Samba  migliore di PC-NFS e funziona con Windows 3 for Workgroups e
  versioni successive di Windows.  pi veloce e pi sicuro. Usatelo.























  The Linux NIS(YP)/NYS/NIS+ HOWTO
  Thorsten Kukuk
  v1.0, 9 marzo 1999

  Questo documento descrive la configurazione di Linux come client
  NIS(YP) o NIS+ e l'installazione di un server NIS. Traduzione origi
  nale di Michele Dalla Silvestra.  Revisione e aggiormento di Giovanni
  Bortolozzo, (borto@pluto.linux.it).

  1.  Introduzione

  Sempre pi macchine Linux sono installate come parte di una rete di
  computer.  Per semplificare l'amministrazione di rete, molte reti
  (principalmente reti basate su macchine Sun) usano il Network
  Information Service (``Servizio Informativo di Rete'').  Le macchine
  Linux possono sfruttare appieno l'esistenza di un servizio NIS o
  fornire esse stesse tale servizio.  Le macchine Linux possono essere
  anche client NIS+ completi, sebbene tale supporto sia in un stadio di
  beta test.

  Questo documento prova a rispondere alle domande sull'impostazione di
  NIS(YP) e NIS+ sulla propria macchina Linux.  Non si dimentichi di
  leggere la sezione ``Il Portmapper RPC''.

  Il NIS-HOWTO  scritto e mantenuto da:


       Thorsten Kukuk, kukuk@suse.de


  Le principali fonti di informazione per la versione iniziale del NIS-
  HOWTO sono state fornite da:



       Andrea Dell'Amico       <adellam@ZIA.ms.it>
       Mitchum DSouza          <Mitch.DSouza@NetComm.IE>
       Erwin Embsen            <erwin@nioz.nl>
       Peter Eriksson          <peter@ifm.liu.se>




  che tutti dovremmo ringraziare per la scrittura iniziale di questo
  documento.


  1.1.  Nuove versioni di questo documento

  L'ultima versione di questo documento  sempre consultabile su World
  Wide Web attraverso l'URL http://www.suse.de/~kukuk/linux/HOWTO/NIS-
  HOWTO.html <http://www.suse.de/~kukuk/linux/HOWTO/NIS-HOWTO.html>.

  Le nuove versioni di questo documento saranno inoltre archiviate nei
  vari siti WWW e FTP dedicati a Linux, tra cui la home page dell'LDP.

  I link alle traduzioni di questo documento possono essere trovati a
  http://www.suse.de/~kukuk/linux/nis-howto.html
  <http://www.suse.de/~kukuk/linux/nis-howto.html>.


  1.2.  Liberatoria

  Sebbene questo documento sia stato creato utilizzando il meglio della
  mia conoscenza potrebbe, e probabilmente  cos, contenere errori.
  Per informazioni pi dettagliate ed accurate si invita a leggere tutti
  i file README distribuiti con i diversi software descritti in questo
  documento.  Prover a mantenere questo documento il pi possibile
  esente da errori.


  1.3.  Commenti e correzioni

  Se si hanno domande o commenti su questo documento, si inviino
  liberamente a Thorsten Kukuk, a kukuk@suse.de.  Qualsiasi suggerimento
  o critica saranno i benvenuti. Se si trova un errore in questo
  documento, mi si informi cosicch possa correggerlo nella versione
  successiva.  Grazie.

  Per piacere non mi si inviino domande su problemi particolari con la
  propria distribuzione di Linux!  Non conosco tutte le distribuzioni di
  Linux. Ma prover ad aggiungere qualsiasi soluzione mi si voglia
  spedire.


  1.4.  Ringraziamenti

  Vogliamo ringraziare quanti hanno contribuito a questo documento
  (direttamente o indirettamente).  In ordine alfabetico:



       Byron A Jeff            <byron@cc.gatech.edu>
       Markus Rex              <msrex@suse.de>
       Miquel van Smoorenburg  <miquels@cistron.nl>




  Theo de Raadt  responsabile per il codice originale dei client yp.
  Swen Thuemmler ha portato tale codice su Linux e ha portato le routine
  yp in libc (ancora basandosi sul lavoro di Theo).  Thorsten Kukuk ha
  scritto da capo le routine NIS(YP) e NIS+ per la GNU libc 2.x.


  2.  Glossario e informazioni generali

  2.1.  Glossario dei termini

  In questo documento sono usati molti acronimi.  Di seguito una breve
  descrizione dei pi importanti:


     DBM
        DataBase Management, una libreria di funzioni che mantiene le
        coppie chiave-contenuto in una base di dati.


     DLL
        Dynamically Linked Library, una libreria linkata in esecuzione a
        un programma eseguibile.


     domainname
        Un nome ``chiave'' usato dai client NIS per localizzare un
        server NIS appropriato che serve questa chiave di dominio.  Si
        noti che questo non ha necessariamente nulla a che spartire con
        il ``dominio'' DNS (nome macchina) delle macchine.


     FTP
        File Transfer Protocol, un protocollo usato per trasferire file
        tra due computer.


     libnsl
        Name services library, una libreria di chiamate a name service
        (getpwnam, getservbyname, ecc...) sugli Unix SVR4. La GNU libc
        la usa per le funzioni di NIS(YP) e NIS+.


     libsocket
        Socket services library, una libreria di chiamta a servizi
        socket (socket, bind, listen, etc...) su Unix SVR4.


     NIS
        Network Information Service, un servizio che fornisce
        informazioni che devono essere note attraverso la rete a tutte
        le macchine nella rete.  Il supporto per NIS  presente nella
        libc standard di Linux, e nel seguito verr riferito come ``NIS
        tradizionale''.


     NIS+
        Network Information Service (Plus :-), in sostanza NIS
        anabolizzato.  NIS+  stato progettato da Sun Microsystems Inc.
        come rimpiazzo di NIS con una migliore sicurezza e gestione
        migliore di ``grosse'' installazioni.


     NYS
        Questo  il nome di un progetto e sta per NIS+, YP e Switch ed 
        gestito da Peter Eriksson <peter@ifm.liu.se>.  Contiene tra le
        altre cose una completa reimplemetazione del codice di NIS (=
        YP) che usa le funzionalit di Name Services Switch della
        libreria NYS.


     NSS
        Name Service Switch. Il file /etc/nsswitch.conf determina
        l'ordine delle ricerche indicizzate (``lookup'') effettuate
        quando  richiesta una determinata informazione.


     RPC
        Remote Procedure Call. Le routine RPC permettono ai programmi C
        di effettuare chiamate a procedure su altre macchine attraverso
        la rete.  Quando si parla di RPC il pi delle volte si intende
        la variante Sun RPC.


     YP Yellow Pages(tm), un marchio registrato in Gran Bretagna dalla
        British Telecom plc.


     TCP-IP
        Transmission Control Protocol/Internet Protocol.  il protocollo
        di comunicazione dei dati maggiormente usato nelle macchine
        Unix.



  2.2.  Alcune informazioni generali

  Le quattro righe che seguono sono una citazione del Sun(tm) System &
  Network Administration Manual:

           ``NIS era noto in precedenza come Sun Yellow Pages (YP) ma
           il nome Yellow Pages(tm)  un marchio registrato in
           Gran Bretagna da British Telecom plc e non pu essere
           usato senza autorizzazione.''




  NIS sta per Network Information Service.  Lo scopo  di fornire
  informazioni che devono essere note attraverso la rete a tutte le
  macchine nella rete.  Le informazioni solitamente distribuite
  attraverso NIS sono:


    nomi di login/password/home directory (/etc/passwd)

    informazioni sui gruppi (/etc/group)

  Se, per esempio, la voce della propria password  registrata nel
  database passwd di NIS, si sar in grado di connettersi su tutte le
  macchine nella rete che abbiano un programma client NIS in esecuzione.

  Sun  un marchio registrato da Sun Microsystems, Inc. e in licenza a
  SunSoft, Inc.



  3.  NIS, NYS o NIS+?

  3.1.  libc 4/5 con il NIS tradizionale o NYS?

  La scelta tra il ``NIS tradizionale'' o il codice NIS nella libreria
  NYS  la scelta tra pigrizia e maturit contro flessibilit e spirito
  d'avventura.

  Il codice del ``NIS tradizionale''  nella libreria C standard,  in
  giro da parecchio e qualche volta soffre della sua et e scarsa
  flessibilit.

  Il codice NIS nella libreria NYS richiede la ricompilazione della
  libreria libc per includere al suo interno il codice NYS (oppure si
  pu prendere una versione precompilata di libc da qualcuno che l'ha
  gi fatto).

  Un'altra differenza  che il codice NIS tradizionale ha un po' di
  supporto per i Netgroup (``gruppi di rete'') NIS, che il codice NYS
  non ha.  D'altra parte il codice NYS permette la gestione delle shadow
  password in modo trasparente.  Il codice del ``NIS tradizionale'' non
  supporta le shadow password su NIS.


  3.2.  glibc 2 e NIS/NIS+

  Si dimentichi tutto questo se si ha la nuova libreria C 2.x della GNU
  (detta anche libc6).  Ha un reale supporto per NSS (name switch
  service), che la rende davvero flessibile e contiene il supporto per
  le seguenti mappe NIS/NIS+: aliases, ethers, group, hosts, netgroups,
  networks, protocols, publickey, passwd, rpc, services e shadow.  La
  libreria C della GNU non ha problemi con le shadow password assieme al
  NIS.


  3.3.  NIS o NIS+ ?

  La scelta tra NIS e NIS+  facile: usare NIS se non si deve usare NIS+
  o si hanno stringenti necessit di sicurezza.  NIS+  molto pi
  problematico da amministrare ( abbastanza facile da gestire dal lato
  client, ma il lato server  orribile). Un altro problema  che il
  supporto per NIS+ sotto Linux  ancora in sviluppo: si deve usare
  l'ultimissima glibc 2.1.  Esiste un port del supporto NIS+ di glibc
  per libc5 come rimpiazzo temporaneo.


  4.  Come funziona

  4.1.  Come funziona NIS

  In una rete ci deve essere almeno una macchina che fa da server NIS.
  Si possono anche avere pi server NIS, ognuno che serve un diverso
  ``dominio'' NIS, oppure si possono avere server NIS cooperanti, nel
  qual caso uno di questi  il ``master NIS server'', e tutti gli altri
  sono detti ``slave NIS server'' (per un certo ``dominio'' NIS,
  ovviamente!), oppure si pu avere un mix delle due situazioni...

  I server slave hanno solo copie delle basi di dati NIS e ricevono
  queste copie dal master NIS server ogni qual volta ci sono delle
  modifiche nelle basi di dati del server.  A seconda del numero di
  macchine nella propria rete e della sua solidit, si pu decidere di
  installare uno o pi slave server.  Ogni qual volta un server NIS non
  risponde o oppure risponde troppo lentamente ad una richiesta, il
  client NIS connesso a quel server prover a trovarne uno attivo o pi
  veloce.

  Le basi di dati NIS sono nel cosiddetto formato DBM, derivato dalle
  basi di dati ASCII.  Per esempio, i file /etc/passwd e /etc/group
  possono essere direttamente convertiti nel formato DBM usando il
  software di traduzione da ASCII a DBM ``makedbm", incluso con il
  software per il server.  Il master NIS server dovrebbe averle
  entrambe, sia la base di dati ASCII che quella DBM.

  I slave server saranno avvertiti di qualsiasi modifica nelle mappe NIS
  (attraverso il programma ``yppush"), e automaticamente scaricheranno
  le necessarie modifiche per poter sincronizzare le loro basi di dati.
  Il client NIS non serve lo facciano in quanto parlano sempre con il
  server NIS per leggere le informazioni salvate nel suo database DBM.

  Le vecchie versioni di ypbind fanno un broadcast per trovare un server
  NIS funzionante.  Questa cosa non  sicura, a causa del fatto che
  chiunque pu installare un server NIS e rispondere alle interrogazioni
  di ypbind.  Le versioni pi recenti di ypbind (ypbind-3.3 or ypbind-
  mt) possono ottenere il nome del server da un file di configurazione e
  quindi non  pi necessario il broadcast.


  4.2.  Come funziona NIS+

  NIS+  una nuova versione di NIS di Sun.  La maggiore differenza tra
  NIS e NIS+  che NIS+ ha il supporto per la cifratura dei dati e
  l'autenticazione su RPC sicure.

  Il modello di naming di NIS+ si basa su una struttura ad albero.  Ogni
  nodo nell'albero corrisponde a un oggetto NIS+, del quale ne esistono
  sei tipi: directory, entry, group, link, table e private.

  La directory NIS+ che forma la radice dello spazio di nomi
  ("namespace") NIS+  chiamata root directory.  Esistono due speciali
  directory NIS+: org_dir e groups_dir.  La directory org_dir consiste
  di tutte le tabelle di amministrazione, come passwd, hosts, e
  mail_aliases.  La directory groups_dir consiste degli oggetti group di
  NIS+ usati per il controllo dell'accesso.  Con dominio NIS+ si fa
  riferimento alla collezione di org_dir, groups_dir e delle loro
  directory superiori.
  5.  Il Portmapper RPC

  Per far funzionare tutti i software che verranno menzionati a breve si
  deve eseguire il programma /usr/sbin/portmap.  Alcune distribuzioni
  Linux hanno gi l'apposito codice nei file in /sbin/init.d/ o
  /etc/rc.d/ per avviarlo come demone.  Tutto quel che si deve fare  di
  attivarlo e riavviare la propria macchina Linux.  Si legga la
  documentazione della propria distribuzione Linux per sapere come fare.

  Il portmapper RPC (portmap(8))  un server che converte i numeri di
  programma RPC in numeri di porta del protocollo TCP/IP (o UDP/IP).
  Deve essere eseguito per poter fare della chiamate RPC (che  quanto
  fa il software del client NIS/NIS+) ai server RPC (come un server NIS
  o NIS+) su quella macchina.  Quando  avviato un server RPC, questo
  dir al portmap su quale numero di porta rimane in ascolto e quali
  numeri di programmi RPC  pronto a servire.  Quando un client intende
  fare una chiamata RPC ad un dato numero di programma, per prima cosa
  contatta il portmap sulla macchina server per determinare il numero
  della porta alla quale inviare i pacchetti RPC.

  Normalmente i server RPC standard sono avviati da inetd(8), cosicch
  portmap deve essere in esecuzione prima di lanciare inetd.

  Per RPC sicure, il portmapper ha bisogno del servizio Time.  Ci si
  assicuri che tale servizio sia abilitato in /etc/inetd.conf su tutti
  gli host:


       #
       # Il servizio Time  usato per le sincronizzazioni degli orologi
       #
       time    stream  tcp     nowait  root    internal
       time    dgram   udp     wait    root    internal




  IMPORTANTE: Non si dimentichi di riavviare inetd dopo aver modificato
  il suo file di configurazione!



  6.  Cos' necessario fare per mettere su un NIS?

  6.1.  Determinare se si  server, slave o client

  Per rispondere a questa domanda si debbono considerare due casi:


  1. La propria macchina sta per diventare parte di una rete dove esiste
     gi un server NIS

  2. Non si ha ancora nessun server NIS nella propria rete

  Nel primo caso, si ha bisogno solo dei programmi client (ypbind,
  ypwhich, ypcat, yppoll, ypmatch).  Il programma pi importante 
  ypbind.  Questo programma dev'essere sempre in esecuzione, ovvero deve
  sempre apparire nella lista dei processi.   un cosiddetto processo
  demone e deve essere avviato nei file di avvio del sistema (eg.
  /etc/init.d/nis, /sbin/init.d/ypclient, /etc/rc.d/init.d/ypbind,
  /etc/rc.local).  Prima si ha ypbind in esecuzione, prima la propria
  macchina diventa un cliente NIS.

  Nel secondo caso, se non si ha un server NIS, allora si avr bisogno
  anche del programma NIS per il server (solitamente chiamato ypserv).
  La sezione ``Configurare un Server NIS'' descrive come mettere su un
  server NIS nella propria macchina Linux usando l'implementazione di
  ``ypserv'' di Peter Eriksson e Thorsten Kukuk.  Si noti che a partire
  dalla versione 0.14 questa implementazione supporta il concetto di
  master-slave di cui si  parlato nella sezione 4.1.

  Esiste un altro server NIS libero, chiamato ``yps'', scritto da Tobias
  Reber in Germania che supporta il concetto di master-slave, ma ha
  altre limitazioni oltre a non essere pi supportato da molto tempo.



  6.2.  Il software

  La libreria di sistema ``/usr/lib/libc.a'' (versione 4.4.2 e
  superiore) o la libreria condivisa ``/lib/libc.so.x'' contengono tutte
  le system call necessarie per portare a buon fine la compilazione del
  software NIS per client e server.  Con la GNU C Library 2 (glibc 2.x)
  serve anche /lib/libnsl.so.1.

  Alcuni hanno riportato che NIS funziona solo con una versione di
  "/usr/lib/libc.a'' 4.5.21 o superiore, e quindi se si vuole andare sul
  sicuro non si usino libc pi vecchie.  Il software per un client NIS
  pu essere ottenuto da:



         Sito                  Directory                        Nome File

         ftp.kernel.org        /pub/linux/utils/net/NIS         yp-tools-2.2.tar.gz
         ftp.kernel.org        /pub/linux/utils/net/NIS         ypbind-mt-1.4.tar.gz
         ftp.kernel.org        /pub/linux/utils/net/NIS         ypbind-3.3.tar.gz
         ftp.kernel.org        /pub/linux/utils/net/NIS         ypbind-3.3-glibc5.diff.gz
         ftp.uni-paderborn.de  /linux/local/yp                  yp-clients-2.2.tar.gz




  Una volta scaricato il software, si seguano le istruzioni distribuite
  con quest'ultimo.  yp-clients 2.2  per l'uso con libc4 e libc5 fino
  alla versione 5.4.20.  libc 5.4.21 e glibc 2.x hanno bisogno di yp-
  tools 1.4.1 o successivi.  I nuovi yp-tools 2.2 dovrebbero funzionare
  con qualsiasi libc per Linux.  Poich ci sono alcuni bug nel codice
  NIS, non si dovrebbe usare la libc 5.4.21-5.4.35.  Si usi invece la
  libc 5.4.36 o successiva, o la maggior parte dei programmi YP non
  funzioner.  ypbind 3.3 funzioner anche lui con tutte le librerie.
  Se si usa gcc 2.8.x o successivo, egcs o glibc 2.x, si deve aggiungere
  la patch ypbind-3.3-glibc5.diff a ypbind-3-3. Non si dovrebbe mai
  usare ypbind distribuito assieme a yp-clients 2.2.  ypbind-mt  un
  nuovo demone multithread che ha bisogno di un kernel Linux 2.2 e di
  glibc 2.1 o successiva.


  6.3.  Il demone ypbind

  Dopo aver compilato con successo il software si  pronti per
  installarlo.  Un posto adatto per il demone ypbind  la directory
  /usr/sbin.  Alcuni potrebbero affermare che non  necessario ypbind su
  un sistema con NYS.  Questo  sbagliato, in quanto ypwhich e ypcat ne
  hanno bisogno.

  Ovviamente si deve fare tutto come root.  Gli altri binari (ypwhich,
  ypcat, yppoll, ypmatch) dovrebbero andare in una directory accessibile
  a tutti gli utenti, solitamente /usr/bin.

  I pi recenti ypbind hanno un file di configurazione chiamato
  /etc/yp.conf.   possibile specificare al suo interno un server NIS.
  Per maggiori informazioni si veda la pagina di manuale di ypbind(8).
  Questo file  necessario anche per NYS.  Un esempio:


         ypserver voyager
         ypserver defiant
         ypserver ds9




  Se il sistema pu risolvere il nome degli host senza NIS, si pu usare
  il nome, altrimenti bisogna usare l'indirizzo IP.  ypbind 3.3 ha un
  baco e user solo l'ultima voce (ypserver ds9 nell'esempio).  Tutte le
  altre voci sono ignorate.  ypbind-mt gestisce correttamente questa
  cosa e usa il server che prima risponde.

  Pu essere una buona idea testare ypbind prima di incorporarlo nei
  file d'avvio.  Per testare ypbind si faccia quanto segue:


    Assicurarsi si aver impostato il proprio nome di dominio YP.  Se
     non  impostato allora si usi il comando:



       /bin/domainname dominio.nis






  dove dominio.nis dovrebbe essere una qualche stringa, solitamente NON
  associata con il nome di dominio DNS della propria macchina!  Il
  motivo  che cos diventa un po' pi difficile per cracker esterni
  ottenere la base di dati delle password dal proprio server NIS.  Se
  non si sa qual  il nome di dominio NIS della propria rete, si chieda
  al proprio amministratore di sistema/rete.

    Avviare ``/usr/sbin/portmap'' se non  gi in esecuzione.

    Creare la directory ``/var/yp'' se ancora non esiste.

    Avviare ``/usr/sbin/ypbind".

    Usare il comando ``rpcinfo -p localhost'' per controllare se ypbind
      stato in grado di registrare i suoi servizi con il portmapper.
     L'output dovrebbe essere qualcosa del tipo:



              program vers proto   port
               100000    2   tcp    111  portmapper
               100000    2   udp    111  portmapper
               100007    2   udp    637  ypbind
               100007    2   tcp    639  ypbind






  o


         program vers proto   port
          100000    2   tcp    111  portmapper
          100000    2   udp    111  portmapper
          100007    2   udp    758  ypbind
          100007    1   udp    758  ypbind
          100007    2   tcp    761  ypbind
          100007    1   tcp    761  ypbind






  a seconda della versione di ypbind che si sta usando.

    Si pu anche eseguire ``rpcinfo -u localhost ypbind".  Questo
     comando dovrebbe produrre qualcosa di simile a



               program 100007 version 2 ready and waiting






  o



               program 100007 version 1 ready and waiting
               program 100007 version 2 ready and waiting






  L'output dipende dipende dalla versione di ypbind installata.
  L'importante  solo il messaggio ``version 2".

  A questo punto si dovrebbe essere in grado di usare i programmi client
  NIS come ypcat, ecc...  Per esempio, ``ypcat passwd.byname'' dovrebbe
  restituire l'intera base di dati NIS delle password.

  IMPORTANTE: Se si  saltata la procedura di test allora ci si assicuri
  di aver impostato il nome di dominio e di aver creato la directory



           /var/yp




  Questa directory DEVE esistere affinch ypbind si avvii con successo.

  Per controllare se il nome di dominio  impostato correttamente, si
  usi /bin/ypdomainname degli yp-tools 2.2.  Questo usa la funzione
  yp_get_default_domain(), che  pi restrittiva.  Per esempio non
  permette il nome di dominio ``(none)'', che  quello predefinito sotto
  Linux e che crea un sacco di problemi.

  Se il test funziona ora si possono modificare i file di avvio in modo
  che ypbind sia avviato al boot del sistema e che quest'ultimo funzioni
  come client NIS.  Ci si assicuri che il nome di dominio sia impostato
  prima di avviare ypbind.

  Bene,  tutto.  Si riavvii la macchina e si controllino i messaggi di
  boot per vedere se ypbind  realmente avviato.



  6.4.  Impostare un client NIS usando il NIS tradizionale

  Per la ricerca degli host si deve impostare (o aggiungere) ``nis''
  alla riga relativa all'ordine di ricerca nel proprio file
  /etc/host.conf.  Si invita a leggere la pagina man di ``resolv+.8''
  per ulteriori dettagli.

  Aggiungere le seguenti righe al proprio file /etc/passwd dei propri
  client NIS:



       +::::::




  Si possono usare anche i caratteri + e - per includere/escludere o
  modificare utenti.  Se si vuole escludere l'utente guest semplicemente
  si aggiunga -guest nel proprio file /etc/passwd.  Si vuole usare una
  shell diversa (e.g. ksh) per l'utente ``linux''?  Nessun problema, si
  aggiunga semplicemente ``+linux::::::/bin/ksh'' (senza le virgolette)
  al proprio /etc/passwd.  I campi che non si vogliono modificare
  dovrebbero essere lasciati vuoti.  Si possono anche usare i Netgroups
  (``gruppi di rete'') per il controllo degli utenti.

  Per esempio, per permettere l'accesso di login a miquels, dth e ed, e
  a tutti i membri del netgroup sysadmin, pur mantenendo disponibili i
  dati di account di tutti gli altri utenti:



             +miquels:::::::
             +ed:::::::
             +dth:::::::
             +@sysadmins:::::::
             -ftp
             +:*::::::/etc/NoShell




  Si noti che in Linux si pu anche ridefinire il campo password, come
  si  fatto in questo esempio.  Si  rimossa la login ``ftp'', cosicch
  non sia pi nota e non funzioni pi l'ftp anonimo.

  Il netgroup potrebbe essere qualcosa del tipo


       sysadmins (-,software,) (-,kukuk,)




  IMPORTANTE: La funzionalit dei netgroup  implementata a partire da
  libc 4.5.26.  Se si ha una versione di libc precedente, qualsiasi
  utente nella base di dati NIS delle password pu accedere alla
  macchina linux se  in esecuzione ``ypbind''!
  6.5.  Impostare un client NIS usando NYS

  Tutto ci che serve  che il file di configurazione di NIS
  (/etc/yp.conf) punti al/ai server corretto/i per le sue informazioni.
  Inoltre deve essere correttamente impostato il file di configurazione
  del Name Services Switch (/etc/nsswitch.conf).

  Si dovrebbe installare ypbind.  Non  richiesto dalla libc, ma i tool
  NIS(YP) ne hanno bisogno.

  Se si vuole usare la funzionalit di inclusione/esclusione utenti
  (+/-guest/+@admins), si deve usare ``passwd: compat'' e ``group:
  compat'' in nsswitch.conf.  Notare che non c' un ``shadow: compat''!
  Si deve usare ``shadow: files nis'' in questo caso.

  I sorgenti di NYS fanno parte dei sorgenti della libc 5.  Quando si
  lancia configure, rispondere ``NO'' la prima volta che appare la
  domanda ``Value correct'', e poi rispondere ``YES'' a ``Build a NYS
  libc from nys''.


  6.6.  Impostare un client NIS usando glibc 2.x

  La glibc usa il ``NIS tradizionale", cos si deve avviare ypbind.  Il
  file di configurazione del Name Services Switch (/etc/nsswitch.conf)
  deve essere correttamente impostato.  Se si usa la modalit compat per
  passwd, shadow o group, si deve aggiungere il ``+'' alla fine di
  questi file, e si pu usare la funzionalit di inclusione/esclusione
  utenti.  La configurazione  esattamente identica a quella che si fa
  sotto Solaris 2.x.


  6.7.  Il File nsswitch.conf

  Il file del Network Services Switch /etc/nsswitch.conf determina
  l'ordine delle ricerche (``lookup'') effettuate quando  richiesta una
  data informazione, proprio come il file /etc/host.conf determina il
  modo con il quale sono effettuate le ricerche degli host.  Per
  esempio, la riga:



           hosts: files nis dns




  specifica che le funzioni di ricerca degli host dovrebbero prima
  guardare nel file /etc/hosts locale, poi effettuare un lookup NIS e
  alla fine una vera richiesta al domain name service (/etc/resolv.conf
  e named), e a quel punto, se non viene trovata alcuna corrispondenza,
  viene restituito un errore.  Questo file deve essere leggibile per
  qualsiasi utente!  Si possono trovare maggiori informazioni nelle
  pagine man nsswitch.5 e nsswitch.conf.5.

  Un buon /etc/nsswitch.conf per NIS :










  #
  # /etc/nsswitch.conf
  #
  # Un esempio di file di configurazione del Name Service Switch.
  # Questo file dovrebbe essere ordinato in modo che i servizi pi
  # comuni siano all'inizio.
  #
  # La voce '[NOTFOUND=return]' indica che la ricerca di una voce
  # dovrebbe fermarsi se la ricerca nella voce precedente non ha
  # restituito niente.  Si noti che se la ricerca fallisce per qualche
  # altra ragione (come la mancata risposta del server NIS) allora la
  # ricerca continua con la voce successiva.
  #
  # Le voci ammesse sono:
  #
  #       nisplus         Usa NIS+ (NIS versione 3)
  #       nis             Usa NIS (NIS versione 2), detto anche YP
  #       dns             Usa DNS (Domain Name Service)
  #       files           Usa file locali
  #       db              Usa la base di dati /var/db
  #       [NOTFOUND=return]   Ferma la ricerca se prima non  stato
  #                       trovato niente
  #

  passwd:     compat
  group:      compat
  # Con libc5 si deve usare shadow: files nis
  shadow:     compat

  passwd_compat: nis
  group_compat: nis
  shadow_compat: nis

  hosts:      nis files dns

  services:   nis [NOTFOUND=return] files
  networks:   nis [NOTFOUND=return] files
  protocols:  nis [NOTFOUND=return] files
  rpc:        nis [NOTFOUND=return] files
  ethers:     nis [NOTFOUND=return] files
  netmasks:   nis [NOTFOUND=return] files
  netgroup:   nis
  bootparams: nis [NOTFOUND=return] files
  publickey:  nis [NOTFOUND=return] files
  automount:  files
  aliases:    nis [NOTFOUND=return] files




  passwd_compat, group_compat e shadow_compat sono supportate solo da
  glibc 2.x.  Se non ci sono regole shadow nel file /etc/nsswitch.conf,
  glibc user le regole passwd per le ricerche.  Ci sono alcuni altri
  moduli di ricerca per glibc, come hesoid.  Per maggiori informazioni
  si legga la documentazione di glibc.


  6.8.  Le password shadow con NIS

  Le password shadow su NIS sono sempre una cattiva idea.  Si perde la
  sicurezza che shadow d e sono supportate solo da poche librerie C per
  Linux.  Un buon modo per evitare le shadow password su NIS  di
  mettere solo gli utenti locali del sistema in /etc/shadow.  Si
  rimuovano le voci degli utenti NIS dal database shadow e si rimettano
  le password in passwd.  In questo modo si pu usare shadow per il
  login di root e le password normali per gli utenti NIS.  Questo ha il
  vantaggio che funzioner con qualsiasi client NIS.


  6.8.1.  Linux

  La sola libc per Linux che supporta le password shadow con NIS  la
  GNU C Library 2.x. La libc5 per Linux non ha questo supporto.  La
  libc5 per Linux non ha il supporto per questa cosa.  La libc5 per
  Linux compilata con il NYS abilitato ha un po' di supporto.  Ma tale
  supporto  gravemente bacato e in qualche caso non funziona con tutte
  le corrette voci shadow.


  6.8.2.  Solaris

  Solaris non supporta le password shadow con NIS.


  6.8.3.  PAM

  PAM non supporta le password shadow con NIS, in particolare
  pam_pwdb/libpwdb non lo fa. Questo  un grosso problema per gli utenti
  di RedHat 5.x.  Se si ha glibc e PAM,  necessario modificare le voci
  in /etc/pam.d/*.  Si rimpiazzino tutte le regole pam_pwdb attraverso i
  moduli pam_auth_unix_*.  A causa di un baco nel modulo
  pam_unix_auth.so module questa cosa non funzioner sempre.

  Un esempio di file /etc/pam.d/login  questo:



       #%PAM-1.0
       auth       required    /lib/security/pam_securetty.so
       auth       required    /lib/security/pam_unix_auth.so
       auth       required    /lib/security/pam_nologin.so
       account    required    /lib/security/pam_unix_acct.so
       password   required    /lib/security/pam_unix_passwd.so
       session    required    /lib/security/pam_unix_session.so




  Per ``auth''  necessario usare il modulo pam_unix_auth.so, per
  ``account'' il modulo pam_unix_acct.so, per ``password'' il modulo
  pam_unix_passwd.so e per ``session'' il modulo pam_unix_session.so.



  7.  Cosa serve per mettere su NIS+?

  7.1.  Il software

  Il codice dei client NIS+ per Linux  stato sviluppato per la libreria
  C 2 della GNU.  Esiste anche un port per la libc5 di Linux, in quanto
  la maggior parte delle applicazioni commerciali sono linkate con
  questa libreria e non  possibile ricompilarle per usare la glibc.  Ci
  sono problemi con libc5 e NIS+: non  possibile fare il link di questa
  con i programma statici, e i programmi compilati con questa non
  funzioneranno con altre versioni della libc5.

  Ci si deve procurare e compilare GNU C Library 2.1 per piattaforme
  basate su Intel o GNU C Library 2.1.1 per piattaforme a 64-bit.  Come
  sistema di partenza  necessaria una distribuzione basata su glibc
  come Debian 2.x, RedHat 5.x o SuSE Linux 6.x.


  Qualsiasi sia la distribuzione,  necessario ricompilare il
  compilatore gcc/g++, libstdc++ e ncurses.  Per la RedHat,  necessario
  fare pesanti modifiche alla configurazione PAM.  Per SuSE Linux 6.0, 
  necessario ricompilare il pacchetto shadow.

  Il software per i client NIS+ pu essere ottenuto da:


         Sito              Directory                    Nome File

         ftp.funet.fi     /pub/gnu/funet                libc-*, glibc-crypt-*,
                                                        glibc-linuxthreads-*
         ftp.kernel.org   /pub/linux/utils/net/NIS+     nis-utils-19990223.tar.gz
         ftp.kernel.org   /pub/linux/utils/net/NIS+     pam_keylogin-1.2.tar.gz




  Le distribuzioni basate su glibc possono essere scaricate da:


         Sito                   Directory

         ftp.debian.org         /pub/debian/dists/slink
         ftp.redhat.com         /pub/redhat/redhat-5.2
         ftp.suse.de            /pub/SuSE-Linux/6.0




  Per la compilazione della libreria C della GNU, si invita a seguire le
  istruzioni ricevute con il software.  Qui  dove si pu trovare la
  libc5 modificato, basata su NYS e con i sorgenti di glibc che
  rimpiazzano quelli della libc5 standard:



         Sito               Directory                  Nome File

         ftp.kernel.org     /pub/linux/utils/net/NIS+  libc-5.4.44-nsl-0.4.10.tar.gz




  Per maggiori informazioni e per gli ultimi sorgenti si dovrebbe
  guardare a http://www.suse.de/~kukuk/linux/nisplus.html
  <http://www.suse.de/~kukuk/linux/nisplus.html>.


  7.2.  Impostare un client NIS+

  IMPORTANTE: Per l'impostazione di un client NIS+, si legga la
  documentazione del NIS+ di Solaris per sapere cosa fare dal lato
  server!  Questo documento descrive solamente cosa fare dal lato
  client!

  Dopo aver installato la nuova libc e i nis-tools, si creino le
  credenziali per il nuovo client nel server NIS+.  Assicurarsi che
  portmap sia in esecuzione.  Poi controllare che il proprio PC Linux
  abbia la stessa ora del Server NIS+.  Per le RPC sicure si ha solo una
  piccola finestra di circa 3 minuti nella quale credenziali sono
  valide.  Una buona idea  di eseguire xntpd su ognuno degli host.
  Dopo di questo, lanciare



  domainname domimio.nisplus
  nisinit -c -H <server NIS+>




  per inizializzare il file d'avvio.  Si legga la pagina man di nisinit
  per ulteriori opzioni.  Assicurarsi che il nome di dominio rimanga
  sempre impostato dopo un reboot.  Se non si conosce il nome del
  dominio NIS+ della propria rete, si chieda al proprio amministratore
  di sistema/rete.

  Ora si dovrebbe modificare il proprio file /etc/nsswitch.conf.
  Assicurarsi che il solo servizio dopo publickey sia nisplus
  ("publickey: nisplus"), e niente altro!

  Dopo di che, avviare keyserv e assicurarsi che sia sempre avviato
  all'avvio del sistema.  Eseguire


       keylogin -r




  per salvare la chiave segreta (``secretkey'') di root nel proprio sis
  tema (spero si sia gi aggiunta la chiave pubblica (``publickey'') per
  il nuovo host nel server NIS+?).

  Ora ``niscat passwd.org_dir'' dovrebbe mostrare tutte le voci nella
  base di dati passwd.



  7.3.  NIS+, keylogin, login e PAM

  Quando un utente effettua il login,  necessario che imposti la sua
  chiave segreta in keyserv.  Ci  fatto lanciando ``keylogin''.  Il
  programma di login del pacchetto shadow fa questa cosa al posto
  dell'utente, se  stato compilato con la glibc 2.1.  Per un programma
  di login con il supporto PAM, si deve installare
  pam_keylogin-1.2.tar.gz e cambiare il file /etc/pam.d/login per usare
  pam_unix_auth, e non pwdb, che non supporta NIS+.  Un esempio:



       #%PAM-1.0
       auth       required     /lib/security/pam_securetty.so
       auth       required     /lib/security/pam_keylogin.so
       auth       required     /lib/security/pam_unix_auth.so
       auth       required     /lib/security/pam_nologin.so
       account    required     /lib/security/pam_unix_acct.so
       password   required     /lib/security/pam_unix_passwd.so
       session    required     /lib/security/pam_unix_session.so






  7.4.  Il file nsswitch.conf

  Il file del Network Services Switch /etc/nsswitch.conf determina
  l'ordine delle ricerche ("lookup") effettuate quando  richiesta una
  data informazione, proprio come il file /etc/host.conf determina il
  modo con il quale sono effettuate le ricerche degli host.  Per
  esempio, la riga:



           hosts: files nisplus dns




  specifica che le funzioni di ricerca degli host dovrebbero prima
  guardare nel file /etc/hosts locale, poi effettuare un lookup NIS e
  alla fine una vera richiesta al domain name service (/etc/resolv.conf
  e named), e a quel punto, se non viene trovata alcuna corrispondenza,
  viene restituito un errore.

  Un buon file /etc/nsswitch.conf file per NIS+ :


















































  #
  # /etc/nsswitch.conf
  #
  # Un esempio di file di configurazione del Name Service Switch.
  # Questo file dovrebbe essere ordinato in modo che i servizi pi
  # comuni siano all'inizio.
  #
  # La voce '[NOTFOUND=return]' indica che la ricerca di una voce
  # dovrebbe fermarsi se la ricerca nella voce precedente non ha
  # restituito niente.  Si noti che se la ricerca fallisce per qualche
  # altra ragione (come la mancata risposta del server NIS) allora la
  # ricerca continua con la voce successiva.
  #
  # Le voci ammesse sono:
  #
  #       nisplus         Usa NIS+ (NIS versione 3)
  #       nis             Usa NIS (NIS versione 2), detto anche YP
  #       dns             Usa DNS (Domain Name Service)
  #       files           Usa file locali
  #       db              Usa la base di dati /var/db
  #       [NOTFOUND=return]   Ferma la ricerca se prima non  stato
  #                           trovato niente
  #

  passwd:     compat
  # per libc5: passwd: files nisplus
  group:      compat
  # per libc5: group: files nisplus
  shadow:     compat
  # per libc5: shadow: files nisplus

  passwd_compat: nisplus
  group_compat:  nisplus
  shadow_compat: nisplus

  hosts:      nisplus files dns

  services:   nisplus [NOTFOUND=return] files
  networks:   nisplus [NOTFOUND=return] files
  protocols:  nisplus [NOTFOUND=return] files
  rpc:        nisplus [NOTFOUND=return] files
  ethers:     nisplus [NOTFOUND=return] files
  netmasks:   nisplus [NOTFOUND=return] files
  netgroup:   nisplus
  bootparams: nisplus [NOTFOUND=return] files
  publickey:  nisplus
  automount:  files
  aliases:    nisplus [NOTFOUND=return] files






  8.  Impostare un server NIS

  8.1.  Il programma server ypserv

  Questo documento descrive solamente come impostare il server NIS
  ``ypserv''.

  Il software per il server NIS lo si pu trovare su:




    Sito               Directory                    Nome File

    ftp.kernel.org     /pub/linux/utils/net/NIS     ypserv-1.3.6.tar.gz




  Per maggiori informazioni si pu dare un'occhiata anche a
  http://www.suse.de/~kukuk/linux/nis.html
  <http://www.suse.de/~kukuk/linux/nis.html>.

  L'impostazione del server  la stessa sia per il NIS tradizionale che
  per NYS.

  Si compili il software per generare i programmi ypserv e makedbm.  
  possibile configurare ypserv per usare il file securenets oppure
  tcp_wrapper. Il tcp_wrapper  molto pi flessibile, ma un sacco di
  gente ha diversi problemi ad usarlo.  Inoltre alcuni file di
  configurazione di tcp_wrapper possono causare spreco di memoria.  Se
  si hanno problemi con ypserv compilato per tcp_wrapper, lo si
  ricompili usando il file securenets.  Il comando ypserv --version
  mostrer quale versione si sta usando.

  Se si fa funzionare il proprio server come master, si determinino
  quali file si vuole siano disponibili tramite NIS e poi si aggiungano
  o rimuovano le voci apposite nella regola ``all'' in /var/yp/Makefile.
  Si dovrebbe comunque dare un'occhiata al Makefile e modificare le
  opzioni all'inizio del file.

  C' stato un solo grosso cambiamento tra ypserv 1.1 e ypserv 1.2.
  Dalla versione 1.2 ypserv fa il cache dei file handle.  Ci significa
  che si deve sempre lanciare makedbm con l'opzione -c se si creano
  delle nuove mappe.  Sincerarsi di usare il nuovo /var/yp/Makefile di
  ypserv 1.2 o successivo, o si aggiunga l'opzione -c a makedbm nel
  Makefile.  Se non lo si fa, ypserv continuer ad usare le vecchie
  mappe e non quelle aggiornate.

  Ora si modifichino /var/yp/securenets e /etc/ypserv.conf.  Per
  maggiori informazioni, leggere le pagine di manuale di ypserv(8) e
  ypserv.conf(5).

  Assicurarsi che il portmapper (portmap(8)) sia in esecuzione, e si
  avvii il server ypserv. Il comando



           % rpcinfo -u localhost ypserv




  dovrebbe restituire qualcosa di simile a



           program 100004 version 1 ready and waiting
           program 100004 version 2 ready and waiting




  La riga ``version 1'' potrebbe non esserci a seconda della versione di
  ypserv e della configurazione usata.   necessaria solamente se si
  usano vecchi client SunOS 4.x.


  Ora si generi la base di dati NIS (YP). Sul master, si lanci



           % /usr/lib/yp/ypinit -m




  Su uno slave, assicurarsi che ypwhich -m funzioni.  Ci significa che
  lo slave dev'essere per prima cosa configurato come client NIS prima
  di poter eseguire


           % /usr/lib/yp/ypinit -s masterhost




  per installare l'host come slave NIS.


   tutto, il proprio server  attivo e in esecuzione.

  Se si hanno grossi problemi, si pu avviare ypserv e ypbind in
  modalit di debug su xterm separate.  L'output di debug dovrebbe
  mostrare cosa non va.

  Se si deve aggiornare una mappa, si esegua make nella directory
  /var/yp del NIS master.  Ci aggiorner una mappa se il file sorgente
   stato modificato e invier i file ai server slave.  Non usare ypinit
  per aggiornare una mappa.

  Non  male poi modificare il crontab di root nello slave server e
  aggiungere le righe seguenti



             20 *    * * *    /usr/lib/yp/ypxfr_1perhour
             40 6    * * *    /usr/lib/yp/ypxfr_1perday
             55 6,18 * * *    /usr/lib/yp/ypxfr_2perday




  Ci assicura che la maggior parte delle mappe NIS saranno mantenute
  aggiornate, anche se un aggiornamento  stato perso a causa di un mal
  funzionamento (down) dello slave al momento dell'aggiornamento sul
  master.

  Uno slave pu essere aggiunto in qualsiasi momento.  Per prima cosa,
  assicurarsi che il nuovo server slave abbia i permessi per contattare
  il master NIS.  Poi eseguire


           % /usr/lib/yp/ypinit -s masterhost




  sul nuovo slave.  Sul server master si aggiunga poi il nome del nuovo
  server slave in /var/yp/ypservers e si esegua make in /var/yp per
  aggiornare le mappe.

  Se si vuole restringere l'accesso al proprio server NIS agli utenti,
  si deve impostare il server NIS come un client eseguendo ypbind e
  aggiungere le voci-pi ("+") a /etc/passwd a mezza via del file delle
  password.  Le funzioni di libreria ignoreranno tutte le normali voci
  dopo la prima voce NIS, e otteranno le restanti informazioni
  attraverso NIS.  In questo modo sono mantenute le regole di accesso
  NIS.  Un esempio:



            root:x:0:0:root:/root:/bin/bash
            daemon:*:1:1:daemon:/usr/sbin:
            bin:*:2:2:bin:/bin:
            sys:*:3:3:sys:/dev:
            sync:*:4:100:sync:/bin:/bin/sync
            games:*:5:100:games:/usr/games:
            man:*:6:100:man:/var/catman:
            lp:*:7:7:lp:/var/spool/lpd:
            mail:*:8:8:mail:/var/spool/mail:
            news:*:9:9:news:/var/spool/news:
            uucp:*:10:50:uucp:/var/spool/uucp:
            nobody:*:65534:65534:noone at all,,,,:/dev/null:
            +miquels::::::
            +:*:::::/etc/NoShell
            [ Tutti i normali utenti DOPO questa riga! ]
            tester:*:299:10:Just a test account:/tmp:
            miquels:1234567890123:101:10:Miquel van Smoorenburg:/home/miquels:/bin/zsh




  Quindi l'utente tester esister, ma avr la shell impostata a
  /etc/NoShell. miquels avr l'accesso normale.

  In alternativa, si pu modificare il file /var/yp/Makefile ed
  impostare NIS ad usare un altro file di password come sorgente.  Su
  sistemi grossi, i file delle password e dei gruppi NIS sono
  solitamente salvati in /var/yp/ypfiles/.  Se lo si fa i normali
  strumenti per l'amministrazione del file delle password come passwd,
  chfn e adduser non funzioneranno pi e si avr bisogno di speciali
  strumenti fatti su misura.

  Comunque yppasswd, ypchsh e ypchfn ovviamente funzioneranno.


  8.2.  Il programma server yps

  Per l'impostazione del server NIS ``yps'' si faccia riferimento al
  paragrafo precedente.  L'impostazione del server ``yps''  simile ma
  non esattamente la stessa, quindi si faccia attenzione se si prova ad
  applicare le istruzioni di ``ypserv'' a ``yps"!  ``yps'' non 
  supportato da alcun autore e contiene alcuni problemi di sicurezza.
  Quindi non  affatto consigliabile usarlo!

  Il software per il server NIS ``yps'' pu essere trovato su:



         Sito                   Directory                  Nome File

         ftp.lysator.liu.se    /pub/NYS/servers            yps-0.21.tar.gz
         ftp.kernel.org        /pub/linux/utils/net/NIS    yps-0.21.tar.gz






  8.3.  Il programma rpc.ypxfrd

  rpc.ypxfrd  usato per velocizzare i trasferimenti di grosse mappe NIS
  dal NIS master ai diversi slave.  Se un server NIS slave riceve un
  messaggio che attesta la presenza di una nuova mappa, avvier ypxfr
  per trasferire la nuova mappa.  ypxfr legger il contenuto di una
  mappa dal server master usando la funzione yp_all().  Questo processo
  pu durare diversi minuti quando esistono mappe molto grosse che
  devono essere salvate dalla libreria di database.

  Il server rpc.ypxfrd velocizza il processo di trasferimento
  permettendo si server NIS slave di copiare semplicemente i file di
  mappa del master piuttosto che si costruiscano da soli la propria
  copia.  rpc.ypxfrd usa un protocollo di trasferimento basato su RPC,
  cosicch non  necessario per la costruzione di nuove mappe.

  rpc.ypxfrd pu essere avviato da inetd.  Per poich si avvia molto
  lentamente, dovrebbe essere lanciato assieme a ypserv.   necessario
  avviare rpc.ypxfrd solo sul master.


  8.4.  Il programma rpc.yppasswdd

  Ogni qual volta gli utenti cambiano le loro password, la base di dati
  NIS delle password e, probabilmente, altre basi di dati NIS che
  dipendono da questa dovrebbero essere aggiornate.  Il programma
  "rpc.yppasswdd''  un server che gestisce le modifiche delle password
  e assicura che le informazioni NIS sia aggiornate di conseguenza.
  rpc.yppasswdd  ora integrato in ypserv.  Non serve pi il vecchio
  yppasswd-0.9.tar.gz o yppasswd-0.10.tar.gz, e non dovrebbero essere
  pi usati. Il rpc.yppasswd in ypserv 1.3.2 ha il pieno supporto per le
  shadow.  yppasswd fa ora parte di yp-tools-2.2.tar.gz,

  Si deve lanciare rpc.yppasswd solo nel server NIS master.  Di default,
  gli utenti non hanno il permesso di cambiare il loro nome o la loro
  shell di login.   possibile permettere tali modifiche con le opzioni
  -e chfn o -e chsh.

  Se i propri file passwd e shadow sono in una directory diversa da
  /etc, si deve aggiungere l'opzione -D.  Per esempio, se si sono messi
  tutti i file sorgente in /etc/yp e si vuole che gli utenti possano
  cambiare la propria shell, si deve avviare rpc. yppasswdd con i
  seguenti parametri:



          rpc.yppasswdd -D /etc/yp -e chsh




  oppure



          rpc.yppasswdd -s /etc/yp/shadow -p /etc/yp/passwd -e chsh




  Non c' molto altro da fare.  Ci si deve solamente assicurare che
  rpc.yppasswdd usi gli stessi file di /var/yp/Makefile.  Gli errori
  saranno registrati usando syslog.



  9.  Verificare l'installazione di NIS/NYS

  Se tutto  a posto (come dovrebbe essere), si dovrebbe essere essere
  in grado di verificare l'installazione con pochi semplici comandi.
  Assunto, per esempio, che il proprio file passwd sia gestito da NIS,
  il comando



           % ypcat passwd




  dovrebbe restituire il contenuto del proprio file NIS passwd.  Il
  comando



           % ypmatch userid passwd




  (dove userid  il nome di login di un utente arbitrario) dovrebbe
  restituire la voce relativa all'utente nel file NIS passwd.  I
  programmi ``ypcat'' e ``ypmatch'' dovrebbero essere inclusi nella
  propria distribuzione di NIS tradizionale o NYS.

  Se un utente non riesce a fare il login, si esegua il programma
  seguente nel client:


       #include <stdio.h>
       #include <pwd.h>
       #include <sys/types.h>

       int
       main(int argc, char *argv[])
       {
         struct passwd *pwd;

         if(argc != 2)
           {
             fprintf(stderr,"Uso: getwpnam nomeutente\n");
             exit(1);
           }

         pwd=getpwnam(argv[1]);

         if(pwd != NULL)
           {
             printf("name.....: [%s]\n",pwd->pw_name);
             printf("password.: [%s]\n",pwd->pw_passwd);
             printf("user id..: [%d]\n", pwd->pw_uid);
             printf("group id.: [%d]\n",pwd->pw_gid);
             printf("gecos....: [%s]\n",pwd->pw_gecos);
             printf("directory: [%s]\n",pwd->pw_dir);
             printf("shell....: [%s]\n",pwd->pw_shell);
           }
         else
           fprintf(stderr,"Utente \"%s\" non trovato!\n",argv[1]);

         exit(0);
       }

  L'esecuzione di questo programma con il nome utente come parametro,
  mostrer tutte le informazioni che la funzione getpwnam restituisce
  per quell'utente.  Ci dovrebbe mostrare quale voce non  corretta.
  Il problema pi comune  che il campo della password  stato
  sovrascritto con un ``*".

  La GNU C Library 2.1 (glibc 2.1) contiene uno strumento chiamato
  gentent.  In un sistema di questo tipo si usi questo programma invece
  di quello qua sopra.  Si pu provare:


          getent passwd




  o


          getent passwd login





  10.  Problemi comuni con NIS e soluzioni

  Ecco qui alcuni problemi riferiti da vari utenti:


  1. Le librerie 4.5.19 hanno problemi. Il NIS non funzioner con
     queste.

  2. Se si aggiornano le librerie dalla 4.5.19 alla 4.5.24 allora il
     programma su si rompe.  Ci si deve procurare il comando su dalla
     distribuzione Slackware 1.2.0.  Non a caso questo  pure un posto
     dove si possono prendere le librerie aggiornate.

  3. Quando un server NIS va gi e poi ritorna su ancora, ypbind si
     avvia mostrando un messaggio tipo:


              yp_match: clnt_call:
                          RPC: Unable to receive; errno = Connection refused




  e il login  rifiutato a quanti sono registrati nella base di dati
  NIS.  Provare a fare il login come root, si termini ypbind e lo si
  avvii ancora.  Un aggiornamento a ypbind 3.3 o successivo dovrebbe
  aiutare.

  4. Dopo l'aggiornamento di libc ad una versione successiva alla
     5.4.20, gli YP tools non funzionano pi.  Si ha bisogno degli yp-
     tools 1.2 o successivi per la libc >= 5.4.21 e glibc 2.x.  Per libc
     pi recenti si deve usare yp-clients 2.2. Gli yp-tools 2.0
     dovrebbero funzionare con tutte le librerie.

  5. In libc 5.4.21 - 5.4.35 yp_maplist  rotta, c' bisogno di libc
     5.4.36 o successiva, o alcuni programmi YP come ypwhich
     provocheranno un segfault.

  6. La libc 5 con il NIS tradizionale non supporta le password shadow
     su NIS.  Sono necessarie le libc5 + NYS oppure glibc 2.x.

  7. ypcat shadow non mostra la mappa shadow.  Questo  corretto in
     quanto il nome della mappa shadow  shadow.byname, non shadow.

  8. Solaris non usa sempre porte privilegiate.  Quindi non si usi il
     mangling delle password se si ha un client Solaris.



  11.  Filza di Assilli Quotidiani (aka Frequently Asked Questions)

  La maggior parte delle domande ora dovrebbero aver trovato risposta.
  Se ci sono ancora questioni non risposte si pu postare un messaggio
  in



           comp.os.linux.networking

















































  The Linux Networking Overview HOWTO
  Daniel Lpez Ridruejo, ridruejo@esi.us.es
  v0.31, 17 settembre 1999

  Lo scopo di questo documento  di dare una panoramica alle possibilit
  di rete del sistema operativo Linux e di fornire puntatori a ulteriori
  informazioni e dettagli implementativi.  Traduzione di Salvatore
  Passerini(s.passerini@mclink.it).

  1.  Introduzione


  Lo scopo di questo documento  di dare una panoramica delle
  possibilit di rete del sistema operativo Linux.  Sebbene uno dei
  punti di forza di Linux  il fatto che ci sono moltissime informazioni
  disponibili praticamente su ogni cosa, molte di queste sono
  focalizzate sull'implementazione.  Molti nuovi utenti di Linux, in
  particolare coloro che provengono da un ambiente Windows, non sono
  consci delle possibilit di networking che offre Linux.  Questo
  documento vuole mostrare una rappresentazione generica di tali
  possibilit con una breve descrizione di ognuna di esse e puntatori
  per avere ulteriori informazioni.  Le informazioni sono state raccolte
  da molte fonti: howto, faq, pagine web dei progetti e dalla mia
  esperienza personale.  Ai diversi autori sono riconosciuti i loro
  meriti.  Senza di loro e i loro programmi questo documento non sarebbe
  stato possibile o necessario.


  2.  Linux


  2.1.  Cos' Linux?

  L'autore principale di Linux  Linus Torvalds.  Sin dalla sua versione
  originale,  stato migliorato da un numero imprecisato di persone.  
  un clone, scritto partendo dal nulla, del sistema operativo UNIX.  Uno
  dei fatti pi interessanti su Linux  che il suo sviluppo avviene
  contemporaneamente in tutto il mondo.

  Linux  sotto copyright nei termini della GNU General Public License
  (GPL). Questa licenza, scritta dalla Free Software Foundation (FSF), 
  pensata per impedire a chiunque di imporre restrizioni sulla
  distribuzione del software. In breve, dice che sebbene possano essere
  richiesti dei soldi per una copia, alla persona che riceve la copia
  non pu essere impedito di distribuirla gratuitamente. Ci significa,
  inoltre, che dev'essere reso disponibile il codice sorgente.  Questo 
  utile per i programmatori.  Chiunque pu modificare Linux e persino
  distribuire le sue modifiche, a patto che mantenga il codice sotto il
  medesimo copyright.


  2.2.  Che cosa rende Linux diverso?

  Perch lavorare su Linux?  Linux generalmente  pi economico (o
  almeno non pi costoso) di altri sistemi operativi e frequentemente
  meno problematico di molti sistemi commerciali.  Ci che rende Linux
  diverso, tuttavia, non  il suo prezzo (dopo tutto, chi vorrebbe un
  sistema operativo, anche se fosse gratis, se non funzionasse bene?) ma
  le sue notevoli possibilit:


    Linux  un vero sistema operativo multitasking a 32 bit, abbastanza
     robusto e potente da essere usato da universit fino a grosse
     aziende.


    Funziona su vecchie macchine 386 fino a macchine con parallelismo
     massiccio dei centri di ricerca.

    Sono disponibili versione pronte all'uso per architetture
     Intel/Alpha/Sparc, e supporto sperimentale per Power PC e sistemi
     embedded oltre a molti altri (SGI, Ultra Sparc, AP1000+, Strong
     ARM, MIPS R3000/R4000...)

    Per finire, quando si vuole fare qualcosa in rete, Linux  la
     scelta giusta.  Non solo perch la rete  strettamente integrata
     nel S.O. stesso e sono liberamente disponibili una pletora di
     applicazioni, ma soprattutto per la sua robustezza anche sotto
     carichi elevati che  potuta essere stata raggiunta solo dopo anni
     di debug e di test nel progetto Open Source.


  3.  Protocolli di rete


  Linux supporta molti protocolli di rete diversi:


  3.1.  TCP/IP


  L'Internet Protocol  stato sviluppato una ventina di anni fa dal
  Dipartimento della Difesa (DoD) degli Stati Uniti, principalmente con
  lo scopo di connettere computer di diverse marche.  La suite di
  protocolli TCP/IP permette, attraverso la sua struttura a strati, di
  isolare le applicazioni dall'hardware di rete.

  Sebbene sia basato sul modello a strati,  focalizzato pi sulla
  distribuzione della interconnettivit che sull'aderenza rigida agli
  strati funzionali.  Questo  una delle ragioni per cui di fatto
  TCP/IP, piuttosto che OSI,  diventato il protocollo di
  internetworking standard.

  Il networking TCP/IP  stato presente in Linux sin dagli inizi.  
  stato implementato partendo da zero.   una delle implementazioni pi
  robuste, veloci e affidabili e uno dei fattori chiave del successo di
  Linux.

  HOWTO Collegato: http://metalab.unc.edu/mdw/HOWTO/NET-3-HOWTO.html


  3.2.  TCP/IP versione 6


  IPv6, qualche volta detto anche IPng (IP Next Generation)  un
  aggiornamento del protocollo IPv4 indirizzato alla risoluzione e al
  miglioramento di diversi fattori.  Fra questi: la scarsit di
  indirizzi IP disponibili, la mancanza di un meccanismo per gestire
  traffico sensibile all'orario, la mancanza di sicurezza a livello di
  rete, ecc.

  L'incremento nello spazio di indirizzamento sar accompagnato da uno
  schema di indirizzamento espanso, che avr un grande impatto sulle
  prestazioni dell'instradamento.  Per Linux esiste gi un
  implementazione beta e una versione stabile  attesa per la versione
  2.2.0 del kernel Linux.

    Linux IPv6 HOWTO: http://www.terra.net/ipv6/linux-ipv6.faq.htm

    IPv6 start page: http://playground.sun.com/pub/ipng/html/ipng-
     main.html

  3.3.  IPX/SPX

  IPX/SPX (Internet Packet Exchange/Sequenced Packet Exchange)  uno
  stack di protocollo proprietario sviluppato da Novell e basato sul
  protocollo Xerox Network Systems (XNS).  IPX/SPX  diventato
  importante nei primi anni '80 come parte integrante di NetWare della
  Novell Inc.  NetWare  diventato lo standard de facto nei sistemi
  operativi di rete (NOS - Network Operating System) della prima
  generazione di LAN.  Novell ha completato il suo NOS con una suite di
  applicazioni orientate al business e con utilit di connessione per il
  lato client.

  Linux ha un'implementazione di IPX/SPX molto elegante, che gli
  permette di essere configurato come

    IPX router

    IPX bridge

    NCP client e/o NCP Server (per la condivisione dei file)

    Novell Print Client, Novell Print Server

  E di:

    Abilitare PPP/IPX, permettendo a una macchina Linux di comportarsi
     sia come client sia come server PPP.

    Tunnelling IPX attraverso IP, che permette la connessione di due
     reti IPX attraverso un semplice collegamento IP.

  Inoltre, Caldera <http://www.caldera.com> offre il supporto
  commerciale per Novell Netware sotto Linux.  Caldera fornisce un
  client Novell NetWare completo basato su tecnologia sotto licenza di
  Novell Corporation. Il client fornisce una completa accessibilit ai
  server di file basati su Novell 3.x e 4.x e include caratteristiche
  quali il Servizio di Directory NetWare (NDS) e la crittografia RSA.



    IPX HOWTO: http://metalab.unc.edu/mdw/HOWTO/IPX-HOWTO.html


  3.4.  Suite di protocolli AppleTalk

  Appletalk  il nome dello stack di rete della Apple.  Permette un
  modello di rete paritetico, fornendo funzionalit di base come la
  condivisione di file e stampanti.  Ogni macchina pu funzionare
  simultaneamente sia come un client che come server, e sia il software
  che l'hardware necessari sono inclusi in qualsiasi computer Apple.

  Linux fornisce supporto completo per le reti Appletalk.  Netatalk 
  l'implementazione a livello kernel dell'Appletalk Protocol Suite,
  derivata da sistemi BSD.  Include il supporto per l'instradamento
  Appletalk, la condivisione di filesystem Unix e AFS su AFP
  (AppleShare), la condivisione di stampanti Unix e l'accesso a
  stampanti Appletalk tramite PAP.

  Si veda la sezione 5.1 per maggiori informazioni.


  3.5.  WAN Networking: X.25, Frame-relay, ecc...

  Molte terze parti forniscono prodotti T-1, T-3, X.25 e Frame Relay per
  Linux. In genere  necessario hardware specifico per questi tipi di
  connessione. I produttori che forniscono l'hardware procurano anche i
  driver per il supporto del protocollo.



    Risorse WAN per Linux:
     http://www.secretagent.com/networking/wan.html




  3.6.  ISDN

  Il kernel Linux ha al suo interno il supporto per ISDN.  Isdn4linux
  controlla le schede ISDN per PC e pu emulare un modem con l'insieme
  dei comandi Hayes (i comandi "AT").  Le possibilit vanno dal semplice
  uso di un programma di terminale per connessioni via HDLC (usando il
  dispositivo incluso), alla completa connessione Internet via PPP fino
  alle applicazioni audio.


    FAQ per isdn4linux: http://www.lrz-
     muenchen.de/~ui161ab/www/isdn/faq_e.html



  3.7.  PPP, SLIP, PLIP

  Il kernel Linux ha al suo interno il supporto per PPP (Point-to-Point-
  Protocol - Protocollo Punto Punto), SLIP (Serial Line IP - IP su Linea
  Seriale) e PLIP (Parallel Line IP - IP su Linea Parallela). PPP  il
  metodo pi popolare usato dai singoli utenti per accedere al proprio
  ISP (Internet Service Provider).  PLIP permette di effettuare in
  maniera economica una connessione fra due macchine.  Usa la porta
  parallela ed un cavo speciale, raggiungendo velocit che vanno da
  10kBps fino a 20kBps.


    Linux PPP HOWTO <http://metalab.unc.edu/mdw/HOWTO/PPP-HOWTO.html>

    PPP/SLIP emulator <http://metalab.unc.edu/mdw/HOWTO/mini/SLIP-PPP-
     Emulator.html>

    Informazioni su PLIP possono essere trovate in The Network
     Administrator Guide <http://metalab.unc.edu/mdw/LDP/nag/nag.html>


  3.8.  Radioamatori

  Il kernel Linux ha al suo interno il supporto per i protocolli dei
  radioamatori.

  Di particolare interesse  il supporto AX.25.  Il protocollo AX.25
  offre modi di funzionamento sia in maniera connessa (connected) che
  non connessa (connectionless), ed  usato o per una connessione punto
  punto oppure per trasportare altri protocolli come TCP/IP e NetRom.

  La sua struttura  simile a X.25 livello 2, con alcune estensioni per
  renderlo pi utile in ambito radioamatoriale.

    Amateur radio HOWTO <http://metalab.unc.edu/mdw/HOWTO/HAM-
     HOWTO.html>





  3.9.  ATM

  Il supporto ATM per Linux attualmente  in uno stato pre alpha.  C'
  una release sperimentale che supporta connessioni ATM raw (PVC e SVC),
  IP su ATM, emulazione di LAN...


    Linux ATM-Linux home page <http://lrcwww.epfl.ch/linux-atm/>


  4.  Hardware di rete supportato

  Linux supporta una grande variet di hardware di rete, compreso molto
  hardware ormai obsoleto.

  Alcuni documenti interessanti:

    Hardware HOWTO <http://metalab.unc.edu/mdw/HOWTO/Hardware-
     HOWTO.html>

    Ethernet HOWTO <http://metalab.unc.edu/mdw/HOWTO/Ethernet-
     HOWTO.html>


  5.  Condivisione di file e stampanti

  La scopo primario di molte reti locali (Local Area Network) basate su
  PC  di fornire ai propri utenti la condivisione dei servizi di stampa
  e di accesso ai file.  Linux  una grande soluzione ai server
  aziendali per tali servizi.


  5.1.  Ambiente Apple

  Come evidenziato nelle precedenti sezioni, Linux supporta la famiglia
  di protocolli Appletalk.  Il netatalk di Linux permette ai client
  Macintosh di vedere i Sistemi Linux come altri Macintosh nella rete,
  condividere file e usare stampanti connesse ai server Linux.

  FAQ e HOWTO su netatalk:

    http://thehamptons.com/anders/netatalk/

    http://www.umich.edu/~rsug/netatalk/

    http://www.umich.edu/~rsug/netatalk/faq.html


  5.2.  Ambiente Windows

  Samba  una suite di applicazioni che permette a molti Unix (e in
  particolare a Linux) di integrarsi in una rete Microsoft sia come
  client sia come server.  Funzionando da server si permette ai client
  Windows 95, Windows for Workgroups, DOS e Windows NT di accedere ai
  file e ai servizi di stampa di Linux.  Pu sostituire completamente
  Windows NT per i servizi sui file e sulla stampa, incluso il download
  automatico nei client dei driver di stampa.  Funzionando come client
  permette alla workstation Linux di montare localmente le condivisioni
  esportate di Windows.

  Secondo la SAMBA Meta-FAQ:





  "Molti utenti dicono che rispetto ad altre implementazioni di SMB,
  Samba  pi stabile, veloce e compatibile con pi client.  Gli
  amministratori di alcune grosse installazioni dicono che Samba  il
  solo server SMB che pu essere scalato da molte decine a migliaia di
  utenti senza andare in crash"





    Samba project home page <http://samba.anu.edu.au/samba/>

    Samba HOWTO <http://metalab.unc.edu/mdw/HOWTO/SMB-HOWTO.html>

    Printing HOWTO <http://metalab.unc.edu/mdw/HOWTO/Printing-
     HOWTO.html>


  5.3.  Ambiente Novell

  Come evidenziato nei paragrafi precedenti, Linux pu essere
  configurato per funzionare sia come client sia come server NCP,
  fornendo quindi il servizio di condivisione di file e stampanti in una
  rete Novell sia per client Unix sia per client Novell.


    IPX HOWTO <http://metalab.unc.edu/mdw/HOWTO/IPX-HOWTO.html>


  5.4.  Ambiente UNIX

  La modalit preferenziale per la condivisione dei file in una rete
  UNIX  tramite NFS.  NFS sta per Network File Sharing ed  un
  protocollo inizialmente sviluppato da Sun Microsystems.   un metodo
  per condividere file attraverso pi macchine come se fossero locali.
  Un client ``monta'' un file system ``esportato'' da un server NFS.  Il
  filesystem cos montato apparir alla macchina client come fosse parte
  del filesystem locale.

   possibile montare il filesystem di root all'avvio, permettendo
  quindi il boot e l'accesso a tutti i file di un server a client
  diskless.  In parole povere,  possibile avere macchine completamente
  funzionananti senza che queste abbiano un disco fisso.

  Coda  un file system di rete (come NFS) che supporta, tra le altre
  cose, il funzionamento senza connessione e la cache permanente. 
  incluso nei kernel 2.2.x. Molto utile per reti lente o poco affidabili
  e per i portatili.

  Documenti relativi a NFS:

    http://metalab.unc.edu/mdw/HOWTO/mini/NFS-Root.html

    http://metalab.unc.edu/mdw/HOWTO/mini/Diskless.html

    http://metalab.unc.edu/mdw/HOWTO/mini/NFS-Root-Client.html

    http://www.redhat.com/support/docs/rhl/NFS-Tips/NFS-Tips.html

    http://metalab.unc.edu/mdw/HOWTO/NFS-HOWTO.html

     Coda pu essere reperito a http://www.coda.cs.cmu.edu




  6.  Internet/Intranet

  Linux  una grande piattaforma per il funzionamento come Server
  Internet/intranet.  Il termine intranet fa riferimento
  all'applicazione delle tecnologie di Internet dentro a un azienda,
  principalmente con lo scopo di distribuire e rendere disponibili
  informazioni all'interno della societ.  I servizi Internet e intranet
  offerti da Linux comprendono, tra gli altri, server per email, news e
  WWW e molti altri che saranno spiegati nei paragrafi successivi.


  6.1.  E-Mail


  6.1.1.  Server E-Mail

  Sendmail  di fatto il programma server per la posta elettronica
  standard per piattaforme UNIX.   robusto, scalabile e, adeguatamente
  configurato e dotato dell'hardware necessario, pu gestire carichi di
  migliaia di utenti senza fare una piega.  Altri server di e-mail (MTA
  - Mail Transport Agent - Agenti di Trasporto della Posta) sono, per
  esempio, smail e qmail, entrambi progettati come rimpiazzo per
  sendmail.


    Sito web di Sendmail <http://www.sendmail.org/>

    Smail faq <http://www.sbay.org/smail-faq.html>

    Qmail web site <http://www.qmail.org>

     Mail HOWTO:

    http://metalab.unc.edu/mdw/HOWTO/Mail-HOWTO.html

    http://metalab.unc.edu/mdw/HOWTO/mini/Qmail+MH.html

    http://metalab.unc.edu/mdw/HOWTO/mini/Sendmail+UUCP.html

    http://metalab.unc.edu/mdw/HOWTO/mini/Mail-Queue.html


  6.1.2.  Accesso remoto alla posta

  In un'azienda o in un ISP, gli utenti vorranno accedere alla loro
  posta in maniera remota dalle loro postazioni di lavoro. In Linux
  esistono diverse alternative, tra cui i server POP (Post Office
  Protocol) e IMAP (Internet Message Access Protocol).  Il protocollo
  POP solitamente  usato per trasferire messaggi dal server al client.
  IMAP permette anche la manipolazione dei messaggi nel server, la
  creazione e cancellazione remota di folder (cartelle di posta) nel
  server, l'accesso concorrente a folder condivisi, ecc.


    Breve confronto tra IMAP e POP (in inglese)
     <http://www.imap.org/imap.vs.pop.brief.html>

     HOWTO relativi all'email:

    http://metalab.unc.edu/mdw/HOWTO/Mail-HOWTO.html

    http://metalab.unc.edu/mdw/HOWTO/mini/Cyrus-IMAP.html




  6.1.3.  Mail User Agent

  In Linux esistono diversi MUA (Mail User Agent), sia grafici che
  testuali.  Fra i pi usati ci sono: pine, elm, mutt e Netscape.


    Elenco del software relativo all'email
     <http://www.linuxlinks.com/Software/Internet/Mail/>

    http://metalab.unc.edu/mdw/HOWTO/mini/TkRat.html


  6.1.4.  Software per mailing list

  Ci sono molti programmi di MLM (Mail List Management - Gestione di
  Mail List) disponibili per i generici UNIX e in particolare per Linux.


    Un buon confronto tra i diversi MLM pu essere reperito a:
     ftp://ftp.uu.net/usenet/news.answers/mail/list-admin/

    Listserv <http://www.lsoft.com/>

    Majordomo home page <http://www.greatcircle.com/majordomo/>


  6.1.5.  Fetchmail

  Un utile programma per la posta  fetchmail. Ha molte funzionalit, 
  robusto, ben documentato e gratuito.  stato pensato per essere usato
  su collegamenti TCP/IP provvisori (come ad esempio nelle connessioni
  SLIP o PPP). Supporta ogni protocollo di posta remota in uso
  attualmente su Internet. Pu supportare anche IPv6 e IPSEC.

  Fetchmail recupera la posta dal server di posta remoto e la inoltra
  via SMTP, in modo che possa essere letta dai normali agenti di posta
  quali mutt, elm o BSD Mail. Possiede tutte le capacit di filtraggio,
  inoltro e aliasing del sistema MTA per lavorare come con la posta
  normale.

  Fetchmail pu essere usato come gateway da POP/IMAP a SMTP per
  l'intero dominio DNS, riunendo la posta da una singola mailbox su un
  ISP e inoltrandola via SMTP basandosi sugli indirizzi degli header.

  Una piccola azienda potrebbe centralizzare la sua posta in una singola
  mailbox e programmare fetchmail per riunire tutta la posta uscente,
  inviarla su Internet e recuperare quella entrante.

    Fetchmail home page <http://sagan.earthspace.net/~esr/fetchmail/>


  6.2.  Server Web

  La maggior parte delle distribuzioni di Linux includono Apache
  <http://www.apache.org>. Apache  il server numero uno in Internet
  http://www.netcraft.co.uk/survey/ dove pi di met dei siti Internet
  usano Apache o un suo derivato.  Tra i vantaggi di Apache si hanno la
  sua modularit, stabilit e velocit.  Dotato di hardware appropriato
  e opportunamente configurato pu supportare i carichi pi elevati:
  Yahoo, Altavista, GeoCities, Hotmail sono basati su versioni
  personalizzate di questo server.

  Il supporto opzionale per SSL (che abilita le transizioni sicure) 
  disponibile a:


    http://www.apache-ssl.org/

    http://raven.covalent.net/

    http://www.c2.net/

  HOWTO collegati:

    http://metalab.unc.edu/mdw/HOWTO/WWW-HOWTO.html

    http://metalab.unc.edu/mdw/HOWTO/Virtual-Services-HOWTO.html

    http://metalab.unc.edu/mdw/HOWTO/Intranet-Server-HOWTO.html

    Web server per Linux
     <http://www.linuxlinks.com/Software/Internet/WebServers/>


  6.3.  Browser Web

  Per la piattaforma Linux esistono diversi browser web. Netscape
  Navigator  una delle possibili scelte sin dall'inizio e il
  sopraggiungente Mozilla (http://www.mozilla.org) avr una versione
  Linux.  Un altro popolare browser web testuale  lynx.  veloce e
  maneggevole quando non  disponibile alcun ambiente grafico.



    Software browser per Linux
     <http://www.linuxlinks.com/Software/Internet/WebBrowsers/>

    http://metalab.unc.edu/mdw/HOWTO/mini/Public-Web-Browser.html


  6.4.  Server e client FTP

  FTP sta per File Transfer Protocol (Protocollo di Trasferimento File).
  Un server FTP permette ai client di connettersi e di recuperare
  (scaricare) file.  Per Linux esistono molti server e client ftp e sono
  solitamente inclusi nella maggior parte delle distribuzioni.  Esistono
  sia client testuali che grafici.  Il software (server e client)
  relativo all'FTP per Linux pu essere trovato a:
  http://metalab.unc.edu/pub/Linux/system/network/file-transfer/


  6.5.  Servizio news

  Usenet (noto anche come news)  un grande sistema a bacheca (BBS)
  organizzato gerarchicamente che ricopre ogni genere di argomento. Una
  rete di computer su Internet (Usenet) scambia articoli attraverso il
  protocollo NNTP. Ne esistono molte implementazioni per Linux, sia per
  siti con un alto carico sia per siti che ricevono solo pochi
  newsgroup.

    INN home page <http://www.isc.org/>

    Software Linux per le news
     <http://www.linuxlinks.com/Software/Internet/News/>


  6.6.  Domain Name System

  Il lavoro di un server DNS  quello di tradurre nomi (leggibili per
  gli esseri umani) in indirizzi IP.  Un server DNS non conosce tutti
  gli indirizzi IP al mondo; piuttosto  in grado di effettuare
  richieste ad altri server in caso di indirizzi sconosciuti.  Il server
  DNS allora restituir all'utente l'indirizzo IP desiderato oppure dir
  che il nome non pu essere trovato nelle tabelle.

  Il name serving su Unix (e sulla maggioranza dei sistemi in Internet)
   svolto da un programma chiamato named, che fa parte del pacchetto
  integrato dell'Internet Software Consortium.

    BIND <http://www.isc.org/>

    DNS HOWTO <http://metalab.unc.edu/mdw/HOWTO/DNS-HOWTO.html>


  6.7.  DHCP, bootp

  DHCP e bootp sono protocolli che permettono a una macchina client di
  ottenere informazioni sulla rete (come per esempio il proprio
  indirizzo IP) da un server. Molte organizzazioni hanno iniziato a
  usarli in quanto facilitano l'amministrazione specialmente in grandi
  reti o in reti che hanno un gran numero di utenti mobili.

  Documenti correlati:

    DHCP HOWTO <http://metalab.unc.edu/mdw/HOWTO/mini/DHCP.html>


  6.8.  NIS

  Il Network Information Service (NIS, o servizio di informazione di
  rete) fornisce un semplice servizio di consultazione di rete
  consistente in database e processi. Il suo scopo  quello di fornire
  informazioni, che devono essere conosciute da un capo all'altro della
  rete, a tutte le macchine sulla rete stessa. Esso permette, per
  esempio, che una persona possa effettuare il login su una qualsiasi
  macchina sulla quale giri NIS senza bisogno che l'amministratore di
  sistema debba aggiungere una voce per la password per ogni macchina,
  ma solo nel database principale.

  HOWTO correlato:

    NIS HOWTO <http://metalab.unc.edu/mdw/HOWTO/NIS-HOWTO.html>


  6.9.  Autenticazione

  Ci sono molti modi di autenticare gli utenti in reti miste


    Linux/WindowsNT: http://www.mindware.com.au/ftp/smb-NT-
     verify.1.1.tar.gz

    Il PAM (pluggable authentication module) che  un sistema
     flessibile di autenticazione UNIX: PAM library
     <http://www.kernel.org/pub/linux/libs/pam/index.html>.

    Infine, LDAP in Linux
     <http://www.umich.edu/~dirsvcs/ldap/index.html>


  7.  Esecuzione remota di applicazioni

  Una delle caratteristiche pi affascinanti di Unix (e una delle pi
  sconoscite ai nuovi utenti)  il grande supporto per l'esecuzione
  remota e distribuita di applicazioni.



  7.1.  Telnet

  Telnet  un programma che permette a una persona di usare un computer
  remoto come se si trovasse veramente su quella macchina.  Telnet  uno
  degli strumenti pi potenti di UNIX, che permette una reale
  amministrazione da remoto.   anche un programma interessante dal
  punto di vista degli utenti, poich permette l'accesso remoto a tutti
  i loro file e programmi da qualsiasi parte di Internet.  Combinato con
  un X server, non c' nessuna differenza (trascurando il ritardo) tra
  essere in console o in qualsiasi altra parte del pianeta.  I demoni e
  client telnet sono disponibili con la maggior parte delle
  distribuzioni di Linux.

  Sessioni shell remote sono possibili attraverso SSH
  (http://www.cs.hut.fi/ssh/) che quindi permette l'effettiva
  amministrazione sicura in remoto.


    Software relativo a Telnet
     <http://metalab.unc.edu/pub/Linux/system/network/telnet/>


  7.2.  Comandi remoti

  In Unix, e in particolar modo in Linux, esistono comandi remoti che
  permettono l'interazione con altri computer dal prompt della shell.
  Esempi sono: rlogin, che permette di accedere a una macchina remota in
  maniera simile al telnet, rcp, che permette trasferimenti remoti di
  file fra macchine, ecc. Infine, il comando di shell remoto rsh
  permette l'esecuzione di un comando su una macchina remota senza dover
  accedere a tale macchina.


  7.3.  X-Window

  Il sistema X-Window  stato sviluppato al MIT alla fine degli anni '80
  ed  rapidamente diventato il sistema standard di gestione finestre
  nelle workstation grafiche UNIX. Questo software  liberamente
  disponibile, molto versatile e adattabile a una gran variet di
  piattaforme hardware.  Consiste di due parti distinte: il server X e
  uno o pi client X.  importante capire la distinzione fra il server e
  il client. Il server controlla direttamente il display ed 
  responsabile di tutto l'input/output della tastiera, del mouse o del
  display. I client, d'altra parte, non accedono direttamente allo
  schermo, ma comunicano col server, che gestisce tutti gli I/O. Sono i
  client che svolgono il lavoro ``reale'' di calcolo, facendo girare
  applicazioni e quant'altro. I client comunicano col server causando
  l'apertura, da parte di quest'ultimo, di una o pi finestre per
  gestire l'input-output di ogni client.

  Brevemente, il sistema X-Window permette a un utente di connettersi a
  una macchina remota, eseguire un processo (per esempio aprire un
  browser Web) e avere l'output mostrato sulla propria macchina.  Poich
  il processo  attualmente eseguito sul server,  necessaria poca
  potenza di calcolo da parte della CPU del client.  quindi possibile
  avere computer il cui scopo principale  quello di agire come puri
  client X-Window; essi sono conosciuti come terminali-X.

  Esiste per Linux una versione gratuita del sistema X-Window che pu
  essere trovata in: Xfree <http://www.xfree86.org/>. Essa  normalmente
  inclusa nella maggior parte delle distribuzioni Linux.

  HOWTO correlati:

    How-to per applicazioni X remote
     <http://metalab.unc.edu/mdw/HOWTO/mini/Remote-X-Apps.html>
  7.4.  VNC

  VNC sta per Virtual Network Computing. Esso , essenzialmente, un
  sistema di visualizzazione remota che permette di vedere un ambiente
  di calcolo `a scrivania' (desktop) non solo sulla macchina ove esso
  sta girando, ma ovunque su Internet e su una gran quantit di
  architetture differenti. Esistono per Linux, cos come per molte altre
  piattaforme, sia il client che il server.   possibile eseguire MS-
  Word in una macchina Windows NT o 95 e avere l'output mostrato su di
  una macchina Linux.  anche possibile l'opposto, cio eseguire
  un'applicazione su una macchina Linux e avere l'output mostrato su
  un'altra macchina Linux o Windows. Esiste un client Java che permette
  di far girare il display remoto all'interno di un web browser.  Infine
  c' una versione per Linux che usa le librerie grafiche SVGAlib,
  permettendo ai 386 con solo 4Mb di RAM di diventare terminali X
  perfettamente funzionanti.



    Sito web di VNC <http://www.uk.research.att.com/vnc>


  8.  Interconnessioni di rete

  Le funzionalit di rete di Linux sono ricche di possibilit: una
  stazione Linux pu essere configurata in modo da comportarsi come
  router, bridge ecc... Alcune delle possibili opzioni sono descritte di
  seguito.


  8.1.  Router

  Il kernel di Linux ha un supporto integrato per le funzioni di
  instradamento (routing). Una stazione Linux pu comportarsi come
  router sia IP che IPX a una frazione del costo di un router
  commerciale. I recenti kernel includono speciali funzioni per macchine
  configurate per agire principalmente come router:

    Multicasting:  Permette alla macchina Linux di agire come router
     per pacchetti IP che hanno diversi indirizzi di destinazione. Ci 
     necessario in MBONE, una rete a larga banda alla base di Internet
     che trasporta diffusioni audio e video.

    Regole di routing IP: Normalmente un router decide cosa fare di un
     pacchetto ricevuto basandosi unicamente sull'indirizzo di
     destinazione finale del pacchetto ma pu anche tener conto
     dell'indirizzo di provenienza e del dispositivo di rete dal quale
     gli  pervenuto il pacchetto.

  Ci sono dei progetti che mirano a costruire un router Linux
  perfettamente funzionante in un floppy disk: Linux router project
  <http://www.linuxrouter.org>


  8.2.  Bridge

  Il kernel di Linux ha un supporto integrato per agire come un bridge
  Ethernet, il che significa che i differenti segmenti Ethernet ai quali
   connesso appariranno come un'unica Ethernet ai partecipanti. Usando
  l'algoritmo a misurazione di albero IEEE802.1, molti bridge possono
  funzionare insieme per formare reti ancora pi estese. Allo stesso
  modo i bridge Linux funzioneranno correttamente con altri bridge
  prodotti da terze parti. Programmi aggiuntivi permettono il filtraggio
  basato su indirizzi IP, IPX o MAC.


  HOWTO correlati:

    Bridge+Firewall
     <http://metalab.unc.edu/mdw/HOWTO/mini/Bridge+Firewall.html>

    Bridge <http://metalab.unc.edu/mdw/HOWTO/mini/Bridge.html>


  8.3.  Mascheramento-IP

  Il mascheramento-IP  una funzione di rete ancora in sviluppo. Se un
  host Linux  connesso a Internet col mascheramento-IP abilitato e
  altri computer si connettono a esso (sia dalla stessa LAN sia
  dall'esterno tramite modem), questi possono benissimo connettersi ad
  Internet a loro volta bench non abbiano indirizzi IP ufficialmente
  assegnati. Ci permette una riduzione dei costi (dal momento che molte
  persone possono accedere a Internet usando una singola connessione
  modem) e contribuisce a incrementare la sicurezza (in qualche modo la
  macchina si comporta come un firewall, dal momento che gli indirizzi
  non ufficiali assegnati non possono essere raggiunti dall'esterno
  della rete).

  Pagine e documenti relativi al mascheramento-IP:

    http://ipmasq.home.ml.org/

    http://www.indyramp.com/masq/links.pfhtml

    http://metalab.unc.edu/mdw/HOWTO/mini/IP-Masquerade.html


  8.4.  Accounting IP

  Con questa opzione del kernel di Linux si pu tener traccia del
  traffico di rete IP, registrare i pacchetti e produrre delle
  statistiche. Possono essere definite una serie di regole in modo che,
  quando un pacchetto rispecchia un certo modello venga incrementato un
  contatore oppure tale pacchetto sia accettato, rifiutato ecc...


  8.5.  Aliasing IP

  Questa caratteristica del kernel d la possibilit di assegnare pi
  indirizzi di rete per lo stesso driver di dispositivo di rete a basso
  livello (ad esempio due indirizzi IP per una stessa scheda Ethernet).
   tipicamente usata per quei servizi che si comportano diversamente a
  seconda dell'indirizzo che vedono (ad esempio ``multihosting'' o
  ``virtual domains'' o ``virtual hosting services'').

  HOWTO Collegati:

    IP Aliasing HOWTO <http://metalab.unc.edu/mdw/HOWTO/mini/IP-
     Alias.html>


  8.6.  Controllo del traffico

  Il controllore del traffico  un dispositivo di rete virtuale che
  rende possibile limitare l'entit del flusso di dati uscente verso
  un'altro dispositivo di rete. Questo  utile specialmente in quegli
  scenari (come per ISP), nei quali  desiderabile una politica di
  controllo circa quanta larghezza di banda  usata da ogni client. Una
  differente alternativa (valida solo per i servizi Web) potrebbe essere
  l'utilizzo di certi moduli di Apache che pongono restrizioni sul
  numero di connessioni IP del client o sulla larghezza di banda usata.

    http://metalab.unc.edu/mdw/HOWTO/NET-3-HOWTO.html#ss6.15

  8.7.  Firewall

  Un firewall  un dispositivo che protegge una rete privata dalla parte
  pubblica (l'intera Internet).  disegnato per controllare il flusso
  dei pacchetti basandosi sulle informazioni di origine, destinazione,
  porta e tipo contenute in ogni pacchetto.

  Esistono per Linux diversi programmi per il firewall, oltre al
  supporto integrato nel kernel, come TIS e SOCKS, che sono molto
  completi e, combinati con altri strumenti, permettono il blocco e la
  reindirizzazione di ogni tipo di traffico e protocollo. Possono essere
  adottate diverse politiche attraveso file di configurazione o
  programmi a interfaccia grafica.


    TIS home page <http://www.tis.com>

    SOCKS <http://www.socks.nec.com/socksfaq.html>

    Firewall HOWTO <http://metalab.unc.edu/mdw/HOWTO/Firewall-
     HOWTO.html>


  8.8.  Re-invio su porta (port forwarding)

  Un numero sempre crescente di siti Web stanno diventando interattivi
  grazie ai cgi-bin e agli applet Java che accedono a database o ad
  altri sevizi. Dal momento che tale accesso potrebbe portare a problemi
  di sicurezza, la macchina che contiene il database non dovrebbe essere
  connessa direttamente a Internet.

  Il re-invio su porta pu fornire una soluzione quasi ideale a questo
  problema di accesso: sul firewall, i pacchetti IP che arrivano a uno
  specifico numero di porta, possono essere riscritti e re-inviati al
  server interno che fornisce il servizio attuale. I pacchetti di
  risposta provenienti dal server interno sono riscritti in modo da
  farli apparire come provenienti dal firewall.

  Informazioni sul re-invio su porta possono essere trovate qui
  <http://www.ox.compsoc.net/~steve/portforwarding.html>


  8.9.  Bilanciamento del carico

  L'esigenza di avere un bilanciamento del carico sorge di solito per
  accessi a Web o a database quando molti client emettono richieste
  contemporanee a un server. Sarebbe auspicabile disporre di un certo
  numero di server identici e indirizzare le successive richieste a
  quello di volta in volta meno carico. Ci pu essere ottenuto
  attraverso la tecnica di Network Address Translation (traduzione di
  indirizzi di rete) (NAT) della quale il mascheramento IP  un
  sottoinsieme. Gli amministratori di rete possono sostituire un singolo
  server che fornisce servizi Web - o qualsiasi altra applicazione - con
  un insieme di server logici che condividono un indirizzo IP comune. Le
  connessioni entranti sono dirette verso un server particolare seguendo
  un algoritmo di bilanciamento del carico. Il server virtuale riscrive
  i pacchetti entranti e uscenti in modo che i client abbiano un accesso
  trasparente al server come se ne esistesse uno solo.

  Informazioni sull'IP-NAT di Linux possono essere trovate qui
  <http://www.csn.tu-chemnitz.de/~mha/linux-ip-nat/diplom/>



  8.10.  EQL

  EQL  integrato all'interno del kernel Linux.  Se esistono due
  connessioni seriali verso qualche altro computer (solitamente ci
  richiede la disponibilit di due modem e di due linee telefoniche) e
  su di esse sono usati SLIP e PPP (protocolli per l'invio di traffico
  Internet su linee telefoniche), usando questo driver  possibile far
  s che queste si comportino come un'unica connessione a velocit
  doppia.  Ovviamente, dev'essere supportato a entrambi gli estremi
  della connessione.


    http://metalab.unc.edu/mdw/HOWTO/NET-3-HOWTO-6.html#ss6.2


  8.11.  Proxy Server

  Il termine proxy significa ``fare qualcosa per conto di
  qualcun'altro''.  In termini di networking, un server proxy pu agire
  per conto di molti client.  Un proxy HTTP  una macchina che riceve le
  richieste di pagine Web da un'altra macchina (Macchina A).  Il proxy
  ottiene la pagina richiesta e restituisce il risultato alla Macchina
  A.  Il proxy pu avere una cache con le pagine richieste, cosicch se
  un'altra macchina chiede la stessa pagina le viene restituita la copia
  in cache.  Ci permette l'uso efficiente delle risorse di banda e
  tempi di risposta minori.  Come effetto collaterale, poich le
  macchine client non sono direttamente connesse al mondo esterno,
  questo  un modo per rendere sicura la rete interna.  Un proxy ben
  configurato pu essere tanto efficiente quanto un buon firewall.

  Esistono diversi proxy server per Linux.  Una soluzione molto popolare
   il modulo proxy di Apache.  Una implementazione pi completa e
  robusta di proxy HTTP  SQUID.


    Apache <http://www.apache.org>

    Squid <http://squid.nlanr.net/>



  8.12.  Composizione su richiesta

  Lo scopo della composizione su richiesta  quello di far sembrare, in
  modo trasparente, che gli utenti abbiano una connessione permanente a
  un sito remoto. Di solito c' un demone che controlla il traffico di
  pacchetti: quando ne riceve uno interessante (l'interesse di un
  paccheto  definito da una serie di regole, priorit e permessi)
  stabilisce una connessione col termine remoto. Quando il canale 
  inoperoso per un certo periodo di tempo, fa cadere la connessione.



    Diald HOWTO <http://metalab.unc.edu/mdw/HOWTO/mini/Diald.html>


  8.13.  Tunnelling, IP mobile e reti private virtuali

  Il kernel di Linux permette il tunnelling (incapsulamento) di
  protocolli. Ad esempio si pu incapsulare il protocollo IPX dentro il
  protocollo IP, permettendo la connessione di due reti IPX attraverso
  un collegamento solo IP. Si pu anche fare tunnelling IP-IP, cosa
  essenziale per il supporto degli indirizzi IP mobili e della
  diffusione multipla e per i radioamatori (vedere
  http://metalab.unc.edu/mdw/HOWTO/NET-3-HOWTO-6.html#ss6.13).

  L'IP mobile introduce miglioramenti nel protocollo che permettono
  l'instradamento trasparente di datagrammi IP verso nodi di Internet
  mobili. Ogni nodo mobile  sempre identificato attraverso il proprio
  indirizzo di base, indipendentemente dal punto di attacco corrente a
  Internet; quando si trova lontano da tale base viene associato al nodo
  anche un indirizzo di `prossimit', che fornisce l'informazione sul
  punto di attacco a Internet corrente. Il protocollo si occupa di
  registrare l'indirizzo di prossimit con un home agent. L'home agent
  invia i datagrammi destinati a un nodo mobile verso l'indirizzo di
  prossimit attraverso l'uso di un tunnel, alla fine del quale, ogni
  datagramma  consegnato al nodo mobile.

  Il Protocollo di Tunneling Punto-Punto (PPTP)  una tecnologia di rete
  che permette l'uso di Internet come una rete privata virtuale sicura
  (VPN). Il PPTP  integrato nel Servizio di Accesso Remoto (RAS) che fa
  parte di Windows NT Server. Col PPTP gli utenti possono connettersi
  con un ISP locale o direttamente a Internet e accedere alla propria
  rete come se si trovassero sulla propria scrivania. PPTP  un
  protocollo chiuso e la sua sicurezza  stata recentemente compromessa.
  Si raccomanda decisamente di utilizzare alternative differenti basate
  su Linux, dal momento che queste si basano su standard aperti che sono
  stati attentamente esaminati e testati.


    Una implementazione client del PPTP per Linux  disponibile qui
     <http://www.pdos.lcs.mit.edu/~cananian/Projects/PPTP/>

  Mobile IP:

    http://www-uk.hpl.hp.com/people/jt/mip.html

    http://metalab.unc.edu/mdw/HOWTO/NET-3-HOWTO-6.html#ss6.12

  Documenti correlati con le reti private virtuali:

    http://metalab.unc.edu/mdw/HOWTO/mini/VPN.html

    http://sites.inka.de/sites/bigred/devel/cipe.html



  9.  Gestione della rete (Network Management)


  9.1.  Applicazioni di gestione della rete

  Esiste un numero impressionate di strumenti focalizzati nella gestione
  della rete e l'amministrazione remota.  Alcuni progetti interessanti
  per l'amministrazione remota sono linuxconf e webmin:

    Webmin <http://www.webmin.com/webmin/>

    Linuxconf <http://www.solucorp.qc.ca/linuxconf/>

  Altri strumenti comprendono i tool per l'analisi del traffici di rete,
  della sicurezza della rete, di monitoraggio, di configurazione ecc.
  Un archivio con molti di questi strumenti pu essere trovato a Metalab
  <http://www.metalab.unc.edu/pub/Linux/system/network/>


  9.2.  SNMP

  Il Simple Network Management Protocol  un protocollo per la gestione
  dei servizi di rete Internet.  Permette il monitoraggio e la
  configurazione remota di router, brigde, schede di rete, switch, ecc.
  Esistono moltissime librerie, client, demoni e programmi di
  monitoraggio basati su SNMP per Linux.  Una bella pagina che tratta di
  SNMP e di software per Linux pu essere trovata a:
  http://linas.org/linux/NMS.html


  10.  Reti aziendali con Linux

  In certe situazioni,  necessario per l'infrastruttura di rete
  disporre di meccanismi idonei a garantire la disponibilit del
  servizio per quasi il 100% del tempo. Alcune delle tecniche per
  ottenere ci sono descritte nelle seguenti sezioni. La maggior parte
  del materiale seguente pu essere trovata sull'eccellente sito Web
  Linas: http://linas.org/linux/index.html e su Linux High-Availability
  how-to <http://metalab.unc.edu/pub/Linux/ALPHA/linux-ha/High-
  Availability-HOWTO.html>


  10.1.  Alta disponibilit

  La ridondanza  usata per prevenire il sistema globale dai singoli
  punti di guasto. Un server con solo una scheda di rete e un singolo
  disco SCSI ha due singoli punti di guasto. L'obiettivo  mascherare
  agli utenti le rotture non previste, in modo che questi possano
  continuare a lavorare velocemente. Il software per l'alta
  disponibilit  composto da una serie di script e di strumenti che
  controllano e scoprono i guasti, muovendo i passi appropriati affinch
  siano ripristinate le normali operazioni notificando il tutto
  all'amministratore di sistema.

  10.2.  RAID

  RAID, acronimo di Redundant Array of Inexpensive Disks,  un metodo
  che permette l'immagazzinamento delle informazioni su pi dischi,
  usando tecniche come lo striping dei dischi (RAID Livello 0) e il
  mirroring di dischi (RAID Livello 1) per ottenere ridondanza, bassa
  latenza e/o banda pi elevata in lettura e/o scrittura, e la
  possibilit di recupero delle informazioni dopo la rottura di un
  disco.  Sono stati definiti 6 diversi tipi di configurazioni RAID.  Ci
  sono tre tipi di soluzioni RAID a disposizione degli utenti di Linux:
  RAID software, box DASD esterni e controller di dischi RAID.


    RAID Software: il RAID puramente software implementa i diversi
     livelli RAID nel codice di gestione dei dischi (dispositivi a
     blocchi) del kernel.

    Soluzioni DASD esterne: i DASD (Direct Access Storage Device) sono
     box separati dotati di alimentazione propria che forniscono un
     cabinet/chassis per sistemare i dischi fissi e appaiono a Linux
     come un altro dispositivo SCSI.  Sotto molti aspetti, questi
     offrono la soluzione RAID pi robusta.

    Controller di Dischi RAID: i controller per i dischi sono schede da
     inserire nel bus ISA/EISA/PCI.  Proprio come i normali controller,
     sono attaccatti con un cavo ai dischi fissi.  Diversamente dai
     normali controller per i dischi, i controller RAID implementano
     RAID nella scheda stessa, effettuanado tutte le operazioni
     necessario per fornire i diversi livelli RAID.

  HOWTO sull'argomento:

    http://metalab.unc.edu/mdw/HOWTO/mini/DPT-Hardware-RAID.html

    http://metalab.unc.edu/mdw/HOWTO/Root-RAID-HOWTO.html


    http://metalab.unc.edu/mdw/HOWTO/mini/Software-RAID.html

  RAID a linas.org:

    http://linas.org/linux/raid.html


  10.3.  Networking con ridondanza

  Sostituzione di indirizzi IP (IPAT). Quando un adattatore di rete si
  guasta, il suo indirizzo IP dovrebbe essere rilevato da una scheda di
  rete funzionante, nello stesso o in un altro nodo. Sostituzione di
  indirizzo MAC: quando avviene una sostituzione di indirizzo IP,
  bisognerebbe assicurarsi che tutti i nodi della rete aggiornino le
  proprie cache ARP (che rappresentano la mappatura fra gli indirizzi IP
  e MAC).

  Vedere l'HOWTO sull'alta disponibilit per maggiori dettagli:
  http://metalab.unc.edu/pub/Linux/ALPHA/linux-ha/High-Availability-
  HOWTO.html


  11.  Fonti di informazione

  Se doveste incontrare problemi di rete con Linux, vi prego di non
  inviarmi domande via posta elettronica. Semplicemente non avrei il
  tempo per rispondere.  pi facile ottenere aiuto attraverso il
  newsgroup com.os.linux.networking (accessibile attraverso
  http://www.dejanews.com). Prima di inviare un messaggio assicuratevi
  di aver letto la documentazione principale. Quindi effettuate una
  ricerca nell'archivio news, poich  possibile che qualcuno abbia gi
  posto la stessa domanda in precedenza (e che qualcuno abbia risposto).
  Quando si inviano un messaggio al gruppo, ricordatevi di indicare
  tutti i passi seguiti e i messaggi di errore ricevuti. Dove trovare
  ulteriori informazioni:

    Linux: http://www.linux.org

    Linux Documentation Project: http://metalab.unc.edu/mdw/linux.html
     (si veda la Linux Network Administrator Guide)

    Freshmeat: le ultime release del software per Linux.
     http://www.freshmeat.net

    Linux link: http://www.linuxlinks.com/Networking/

    Documentazione in italiano su Linux:
     http://www.pluto.linux.it/ildp/


  12.  Cronologia


    0.31 (17 settembre 1999) Modificato l'indirizzo del progetto router
     (grazie a John Ellis) e aggiunto un altro collegamento PPTP (grazie
     a Benjamin Smith)

    0.30 (6 aprile 1999) Inserita sezione su CODA (grazie a Brian
     Ristuccia <mailto:brianr@osiris.978.org>)

    0.2-0.29 Correzioni di bug :-) (si vedano i ringraziamenti al
     termine di questo documento)

    0.1 (5 giugno 1998)


  13.  Ringraziamenti e liberatoria

  Questo documento  basato sul lavoro di molte altre persone che hanno
  reso possibile per Linux diventare quello che  ora: uno dei migliori
  sistemi operativi di rete.  Tutti i meriti sono loro. Per redigere
  questo documento in maniera semplice ma accurata e per renderlo
  completo ma non eccessivamente lungo,  stato compiuto un grande
  sforzo. Tuttavia l'autore non si assume alcuna responsabilit in ogni
  circostanza.  State usando le informazioni qui contenute a vostro
  rischio. Sentitevi liberi di inviarmi per e-mail suggerimenti,
  correzioni o commenti su questo documento in modo che io possa
  migliorarlo. Altri argomenti che probabilmente saranno trattati nelle
  future revisioni potrebbero essere radius, strumenti per il mirroring
  web e ftp come wget, analizzatori di traffico, CORBA... e molti altri
  che potrebbero essere suggeriti e adatti. Potete raggiungemi a
  daniel@rawbyte.com

  Per finire vorrei ringraziare Finnbjorn av Teigum, Cesar Kant, Mathieu
  Arnold e specialmente Hisakuni Nogami e Phil Garcia per la loro
  attenta revisione e i commenti a questo HOWTO. Ho apprezzato molto il
  loro aiuto.

  Potete trovare una versione di questo documento a
  http://www.rawbyte.com/lno/ <http://www.rawbyte.com/lno>.

  Daniel Lopez Ridruejo  17 Sept 1999








































  Online Troubleshooting Resources HOWTO
  Howard Mann, howardm@xmission.com
  v0.5, 18 settembre 1999

  Questo documento direzioner gli utenti di Linux alle risorse disponi
  bili in Internet che fornisco accesso ad un enorme volume di infor
  mazioni relative a Linux utili nella risoluzione dei problemi.
  Traduzione a cura di Giovanni Bortolozzo, borto (at) pluto.linux.it

  1.  Introduzione

  I metodi tradizionali per la risoluzione dei problemi relativi al
  computer comprendono la consultazione di manuali utente, libri, amici
  - probabilmente allettati con regalini - e, quando tutto il resto non
  ha portato una soluzione, chiamare il servizio di supporto tecnico del
  produttore del prodotto in questione.  E tutti noi sappiamo quanto
  piacevole, affidabile ed efficace sia quest'ultima strategia.
  Sfortunatamente questa  la norma nella sfera dei prodotti commerciali
  proprietari.

  Linux e le relative distribuzioni e il software applicativo e di
  utilit, sono stati principalmente sviluppati secondo il modello Open
  Source <http://www.opensource.org>, nel quale gli sviluppatori
  sfruttano le comunicazioni elettroniche via Internet - tipicamente
  sotto forma di mailing list pubblicamente accessibili - per
  collaborare l'un l'altro nel raffinamento del codice sorgente.
  Tradizionalmente tale collaborazione ha portato anche alla
  pubblicazione online di manuali utente, liste di Frequently-Asked-
  Questions ( FAQ - Domande Poste pi di Frequente), conoscenze di base,
  note, guide formali come questo documento (HOWTO) e tutorial.
  Inoltre, spesso gli utenti assistono gli altri utenti attraverso i
  forum di Usenet e altri newsgroup e i messaggi di risposta sono
  prontamente accessibili sotto forma di archivi ricercabili.  Questi
  newsgroup relativi a Linux sono rinomati per l'alto livello degli
  utenti che vi partecipano.  In misura significativa, Linux pu essere
  considerato un prodotto di Internet.

  Prese assieme, queste risorse permettono l'accesso ad una grossa base
  di dati sempre in espansione e il mio intento  di incoraggiare e
  direzionare il lettore ad utilizzare questi depositi quando si trova
  faccia a faccia con una problematica non trattata nella documentazione
  inclusa in ogni distribuzione di Linux.  I veterani di Linux che
  assistono i nuovi arrivati attraverso i forum di Usenet ben presto si
  rendono conto della frequenza con la quale alcune domande tecniche
  vengono ripetutamente poste - domande le cui risposte sono gi
  disponibili in uno o pi depositi online.  Quindi, per diminuire la
  possibilit di essere oggetto in un flame in risposta alla propria
  domanda su Usenet o irc, si legga tutto!

  Armati di un browser, gli utenti di Linux possono rapidamente
  diventare esperti nella risoluzione dei problemi del loro sistema.  La
  chiave  conoscere come e dove guardare.  Il mio obbiettivo  di
  guidare gli utenti - in particolare i novizi di Linux - in questa
  ricerca.


  1.1.  Aggiornamenti del documento

  L'ultima versione di questo documento sar sempre disponibile a
  <http://www.newbielinux.com>, il mio sito web per i nuovi utenti di
  Linux.





  1.2.  Copyright e licenza

  Copyright (c) 1999, di Howard Mann.

  Questo documento  governato dalle norme della LDP Copying License, i
  cui termini sono dettagliati qui:
  <http://www.linuxdoc.org/copyright.html>


  1.3.  Commenti e correzioni

  Commenti e critiche costruttive sono sempre benvenuti.  In
  particolare, spero mi si notifichino eventuali errori presenti in
  questo documento e risorse meritevoli di citazione, ma non attualmente
  trattate in questo documento.  Vi ringrazio anticipatamente.


  2.  HOWTO e mini-HOWTO

  Questi documenti sono associati con il Linux Documentation Project
  <http://www.linuxdoc.org>.  Esiste una pagina Indice
  <http://www.linuxdoc.org/HOWTO/HOWTO-INDEX-3.html> che suggerisco di
  inserire tra i bookmark del proprio browser.

  Questi HOWTO sono scritti da utenti di Linux e sono periodicamente
  aggiornati dai rispettivi autori.  Molti autori forniscono la versione
  pi recente nel loro sito web personale e solitamente viene fornito un
  link a quest'ultimo all'interno del documento.  Questa versione
  potrebbe essere pi nuova di quella disponibile nel sito web di LDP.
  Il documento potrebbe essere pubblicato online prima della sua
  inclusione nel database di LDP.

  Si noti che sono disponibili anche altri HOWTO, che i rispettivi
  autori non hanno proposto per l'inclusione in LDP.  Non  una cattiva
  idea provare a trovarli usando un motore di ricerca di Internet, come
  descrivo in una delle prossime sezioni.

  Questi documenti sono particolarmente utili quando si decide di
  fornire o accedere ad un nuovo servizio con il proprio sistema Linux,
  o quando ci si imbarca in un complesso progetto tecnico.  Per esempio,
  si potrebbe avere l'opzione di accedere alla rete con un servizio ADSL
  o Cable Modem - guide eccellenti sono disponibili sotto forma di
  HOWTO.

  Inoltre gli autori spesso includono riferimenti e link a siti che
  hanno trovato utili.   Le informazioni di cui si ha bisogno le si
  potrebbe trovare in uno di questi siti piuttosto che nell'HOWTO
  stesso.  Per esempio ho trovato Linux Network Drivers
  <http://cesdis1.gsfc.nasa.gov/linux/drivers/>, il sito principale per
  le informazioni sui driver delle schede di rete, nell'Ethernet HOWTO.


  3.  Filze di Assilli Quotidiani (FAQ)

  Un elenco di FAQ  tradizionalmente di corredo ad applicazioni,
  utilit e simili relative a Linux.  Una FAQ  tipicamente fornita
  online dagli sviluppatori del prodotto in questione e talvolta utenti
  intraprendenti ospitano una FAQ non ufficiale.  Si cerchi
  quest'ultima con un motore di ricerca di Internet.

  La FAQ  il primo documento da leggere quando si incappa in un
  problema con una particolare applicazione.  Inoltre, esistono FAQ per
  le distribuzioni di Linux, i window manager e i cosiddetti ambienti
  desktop (KDE e Gnome).


  Per i novizi di Linux, fornisco i link a tre FAQ che assieme trattano
  molte delle questioni poste nei newsgroup di Usenet:


  1. La Linux FAQ a  <http://www.fokus.gmd.de/linux/FAQ/Linux-FAQ.html>

  2. La XFree86 X - Window System FAQ a  <http://www.xfree86.org/FAQ>

  3. La Linux Kernel mailing list FAQ a  <http://www.tux.org/lkml/>


  4.  Sezioni di supporto online

  Queste sezioni si trovano tipicamente nei siti web delle distribuzioni
  di Linux e spesso contengono una variet di utilissimi documenti con
  informazioni non facilmente includibili in una FAQ.  Si cerchino
  queste sezioni con uno o pi dei seguenti titoli:


    Installation Support (Supporto di Installazione)

    Knowledge or Solutions Databases (Basi di dati di Conoscenze e
     Soluzioni)

    Tips and Tricks (Suggerimenti e Trucchi)

    Errata, Fixes and Updates (Errori, Correzioni e Aggiornamenti)

    White Papers

    Technical Guides (Guide Tecniche)

    Hardware Guide or Compatibility List (Guide Hardware ed Elenchi di
     Compatibilit)

    Security Information (Informazioni sulla Sicurezza)

  Alcuni siti web mettono a disposizione un motore di ricerca per il
  sito che faciliter la ricerca di una soluzione.

  Se si ha un problema con una distribuzione appena installata, si veda
  qui per prima cosa, in quanto i bug e le rispettive correzioni sono
  tipicamente raccolti qui.  Si possono trovare guide dettagliate che
  aiuteranno a svolgere compiti particolari come l'aggiornamento del
  proprio kernel o della versione di XFree86 X - Window System che si
  sta usando.

  Raccomando di spendere un po' di tempo nel sito web familiarizzando
  con quanto disponibile.



  5.  Archivi di newsgroup di Usenet

  L'abilit di cercare e trovare informazioni dai messaggi archiviati
  dei newsgroup (Usenet) relativi a Linux rappresenta un mezzo
  potentissimo per la risoluzione dei problemi sotto Linux.

  I motori di ricerca permettono ad una persona di cercare negli archivi
  specificando forum, parole chiave, autori, date, lingua e combinazioni
  dei suddetti.  Poich il numero di newsgroup su Linux  grande, la
  probabilit di trovare utili informazioni  elevata.

  Vorrei raccontare un breve aneddoto per dimostrare l'efficenza di
  questo approccio.  La prima volta che ho tentato di compilarmi un
  kernel, quando ho chiamato il comando make mi sono ritrovato di
  fronte a questo messaggio d'errore:



       make[1]: as86: Command not found
       make[1]: *** [bootsect.o] Error 127
       make[1]: Leaving directory `/usr/src/linux/arch/i386/boot'
       make: *** [zImage] Error 2




  Non avevo idea di cosa fosse as86, ma l'ho immesso come parola chiave
  nel campo SUBJECT (oggetto) dell'utilit Power Search a deja.com (si
  veda nel seguito) e ho ottenuto un enorme numero di messaggi di gente
  che aveva incontrato lo stesso problema.  Chi rispondeva forniva sia
  la ragione che la soluzione: non avevo l'assembler/linker necessario
  per creare il codice macchina e il pacchetto bin86 lo forniva.  Ho
  scaricato ed installato il pacchetto RPM di quest'ultimo e tutto ha
  funzionato.  L'intero processo ha preso circa 10 minuti (ho una
  connessione ADSL alla rete!).

  Esistono due siti web che forniscono accesso agli archivi Usenet
  usando un motore di ricerca come descritto nelle sezioni seguenti.


  5.1.  Power Search a deja.com

  Questo  il sito prominente per tutte le cose di Usenet e l'utilit
  Power Search  a:  <http://www.deja.com/home_ps.shtml>.  Si perda un
  po' di tempo in questo sito per imparare come usare efficacemente il
  motore di ricerca, apprezzando le varie sfumature del Linguaggio di
  Ricerca <http://www.deja.com/help/help_lang.shtml>.  In particolare si
  noti la comodit di usare il carattere jolly (wildcard).  Si sar
  presto ripagati dei propri sforzi.  Tipicamente io inserisco quanto
  segue per una ricerca di routine:



       LANGUAGE : English
       SUBJECT  : provare diverse parole chiave, pensando all'oggetto che si
                  userebbe per un messaggio.
       FORUM    : *linux* o comp.os.linux.*




  Esiste un'altra interfaccia carina all'utilit Power Search a:
  <http://www.exit109.com/~jeremy/news/deja.html>.  Si personalizzi
  questa pagina a piacimento (a me piace l'opzione DejaClassic) e poi
  si scelga Save Settings (Salva Impostazioni).

  Potrebbe essere interessante anche usare l'utilit DejaSearch,
  disponibile a:  <http://homemade.hypermart.net/dejasearch/>, che salva
  in un file HTML i messaggi trovati per poterli cos consultare
  successivamente.  Usando questa utilit non si deve pi andare avanti
  e indietro con le pagine nel proprio browser.


  5.2.  Searchlinux.com (CNET Linux Help)

  Questo  un sito relativamente nuovo con molte caratteristiche simili
  a deja.com.  Ha le opzioni di ricerca basic (base) e advanced
  (avanzata).  Quest'ultima non ha tutte le opzioni presenti nel Power
  Search di deja.com.  Ha una bella opzione attivabile con un solo click
  con la quale si possono vedere tutti i propri messaggi e le risposte
  associate.  Si trova a:  <http://www.searchlinux.com>.


  6.  Motori di ricerca di Internet

  Io uso frequentemente un Motore di Ricerca per ricercare informazioni
  utili o necessarie nella rete.  Questi motori catalogano le pagine dei
  siti commerciali, personali e accademici, cos come quelle delle
  mailing list e simili.

  Naturalmente, sono disponibili moltissimi motori di ricerca e
  suggerisco di provarne parecchi prima di rinunciare ad una particolare
  ricerca.  Le ricerche hanno dimostrato che ognuno di essi cataloga
  solamente una piccola porzione delle pagine web esistenti.  Non  male
  acquisire familiarit con i dettagli operativi di almeno un motore per
  massimizzare l'efficenza e l'efficacia dei propri sforzi di ricerca.
  Probabilmente gi si ha un proprio motore favorito - a me piace
  Google.com e lo discuter un po' pi in dettaglio.


  6.1.  Google.com

  Questo motore ha parecchie caratteristiche originali descritte a:
  <http://www.google.com/why_use.html>.  In particolare il motore spesso
  restituisce per prime la pagine maggiormente utili; infatti, spesso ho
  trovato che la prima pagina dell'elenco conteneva le informazioni di
  cui avevo bisogno.  Poich fa la cache delle pagine web, 
  relativamente veloce a mostrare le cose richieste.  Ha una
  caratteristica detta GoogleScout (TM) che fornisce dei link
  addizionali rilevanti per ognuna delle risposte restituite.

  Inoltre, ha un motore di ricerca specializzato per Linux a:
  <http://www.google.com/linux> che uso come mio strumento primario di
  ricerca su Internet.  Cerca nella base di dati delle pagine relative a
  Linux su Google.com migliorando cos l'efficenza della ricerca.  Lo si
  provi - sono sicuro che lo si includer immediatamente tra i propri
  bookmark.


  7.  Archivi delle mailing list

  Come ci si pu aspettare, esiste un numero veramente grande di mailing
  list relative a Linux che permettono agli sviluppatori e agli utenti
  di comunicare e collaborare ai progetti.  Queste liste coprono
  qualsiasi aspetto di Linux concepibile, dall'esoterica tecnica dello
  sviluppo del kernel sino a discussioni su varie questioni al livello
  dei novizi.  Gli iscritti ad una particolare mailing list generalmente
  sono molto addentro all'argomento della lista e spesso sono reperibili
  informazioni utili e dettagliate.  Le comunicazioni sono pubblicamente
  accessibili attraverso i motori di ricerca di Internet e sotto forma
  di archivi online delle mailing list.  Quando si conduce una ricerca
  con un motore di ricerca tipicamente si vedono le pagine archiviate.

  Non tutte le mailing list sono associate con un archivio online, ma
  queste non sono la maggioranza.  Similmente, non tutti gli archivi
  hanno associato un motore di ricerca.

  Inizialmente, si provi a localizzare l'archivio della mailing list di
  interesse inserendo una o pi parola chiave e mailing list archive
  in un motore di ricerca.

  Per un elenco delle mailing list relative a Linux, si esaminino
  accuratamente siti web come il Linux Resource Exchange a:
  <http://www.linuxrx.com/Lists/Lists.perl> e il Linux Online Mailing
  Lists a:  <http://www.linux.org/help/lists.html>.

  Si possono trovare archivi di mailing list anche nei seguenti posti:


  1. il sito web della distribuzione di Linux che si usa;

  2. il sito/i web del Window Manager e/o del Desktop Environment che si
     usa;

  3. il sito web dedicato all'applicazione o al progetto in questione;

  4. The Mail Archive a:  <http://www.mail-archive.com/lists.html>;

  5. Mailing List Archives a: <http://www.uwsg.indiana.edu/hypermail/>;

  6. Linux Mailing List Archives a: <http://kernelnotes.org/lnxlists/>;

  7. Tux Mailing List Archives a: <http://www.tux.org/hypermail/>.

  Questo non  un elenco completo degli archivi e si possono trovare
  altri siti con un motore di ricerca.  Ma questi dovrebbero gi
  mettervi sulla buona strada.


  8.  Manuali utente online

  Alcune delle principali distribuzioni e Window Manager/Desktop
  Environment per Linux pubblicano i propri manuali utente online.  Se
  non  online l'intero manuale, tipicamente si trovano guide di
  installazione e configurazione nei siti rilevanti.  Ci si applica
  pure alle applicazioni principali come Gimp (GNU Image Manipulation
  Program).

  Quindi, per quegli utenti che non hanno un manuale cartaceo, sono
  generalmente disponibili online un sacco di guide di installazione e
  di configurazione.


  9.  Tutorial online su Unix

  Poich Linux  un sistema operativo tipo Unix,  essenziale avere
  familiarit con i concetti fondamentali di Unix come la gerarchia
  delle directory in Unix e i permessi dei file.  Fortunatamente, ci
  sono molti tutorial online su Unix che nel complesso trattano
  qualsiasi cosa un utente possa aver bisogno di sapere.  Suggerisco di
  inserire tra i propri bookmark i seguenti come libreria di riferimento
  online:


  1. Un grosso riferimento ben organizzato a:
     <http://www.dicamp.univ.trieste.it/du96/unix/TOC.html>

  2. Unixhelp a  <http://www.ucs.ed.ac.uk/~unixhelp/servers.html>

  3. Unix is a Four Letter Word... a
     <http://www.linuxbox.com/~taylor/4ltrwrd/title.html>


  10.  Risorse varie

  In questa sezione fornisco diversi link a siti web che ho trovato
  utili mentre imparavo ad usare Linux.   una collezione eclettica, ma
  se ne tenga conto.




  10.1.  Note di rilascio e documentazione disponibile relativa a
  XFree86 X - Window Server.

  Questa documentazione accompagna ogni versione di XFree86 ed 
  disponibile a:  <http://www.xfree86.org/>.  Ogni qualvolta si hanno
  dei problemi con il proprio ambiente X, si studino con attenzione le
  note applicabili alla propria scheda video/chipset.  Tipicamente
  forniscono dettagli circa la configurazione dell'X - window system
  relativi alla propria scheda ed enumerano qualsiasi opzione si deve
  includere nel file XF86Config che governa X.


  10.2.  Pagine Texinfo della GNU

  Una grande collezione di pagine  disponibile a:  <http://www.geek-
  girl.com/unix.html#texinfo>.  Sono inclusi i link alle seguenti
  pagine:


    Bash    - The Bourne-again shell

    Configure    - usato quando si compila un programma dal codice
     sorgente

    G++    - il compilatore C++ della GNU

    Gcc  - il compilatore C

    Libc  - la libreria C della GNU

    Make  - un programma per dirigere la compilazione

  Si noti che alcune di queste sono incluse nella documentazione
  presente nella propria distribuzione di Linux.  In generale, sono
  documenti tecnici dettagliati di particolare interesse per gli
  sviluppatori.  Comunque, se come me, non si  un programmatore, si
  possono studiare comunque le sezioni introduttive di questi documenti
  per saperne un po' di pi, per esempio, su questi comandi configure e
  make che si usano quando si installano applicazioni dal codice
  sorgente.


  10.3.  Manuali e software GNU

  Molti programmi importanti frequentemente utilizzati dagli utenti di
  Linux sono utilit GNU - per esempio, i programmi tar (archiviatore) e
  gzip (compressione).  Le descrizioni di questi programmi si trovano a:
  <http://www.gnu.org/software/software.html#DescriptionsOfGNUSoftware>
  e manuali online per molti di questi si trovano a:
  <http://www.gnu.org/manual/manual.html>.

  Questi manuali tipicamente forniscono molte pi di informazioni di
  quante se ne possono trovare nelle corrispondenti pagine man nel
  proprio sistema.  Per esempio, si confronti la pagina man e il manuale
  online per l'utilit tar.


  10.4.  Glossario dei termini relativi a Linux

  Questa guida online a:  <http://www.firstlinux.com/guide/> ha una
  bella collezione di termini e definizioni, ordinati alfabeticamente.
  Si vada l se si incontra un termine che non si  mai visto prima o
  non si capisce.



  10.5.  Un dizionario online di termini sui computer e tecnici

  Il sito web della Webopedia a:  <http://www.pcwebopedia.com/> consiste
  in un grande dizionario online di termini relativi al computer e di un
  motore di ricerca che fornisce link a documenti che discutono ogni
  termine pi in dettaglio.  Per esempio io ho usato questo sito per
  imparare la differenza tra i bus ISA e PCI.


  10.6.  Una guida dettagliata ai Personal Computer

  L'indice analitico di questa voluminosa guida hardware a:
  <http://www.PCguide.com/topic.html> vi dar un'idea di massima del
  contenuto di questo sito web.  L'ho usato abbastanza frequentemente
  quando ho installato per la prima volta Linux e configurato l'X Window
  System.  Ho imparato un sacco sulle schede video e monitor, profondit
  di colore, ecc. utili quando si devono risolvere problemi di
  visualizzazione di X.


  10.7.  Gary's Encyclopedia

  Il sito web di Gary Momarison a
  <http://members.aa.net/~swear/pedia/index.html> contiene tantissimi
  link ordinati relativi a Linux.  Si pu usare la funzione trova del
  proprio browser per trovare link in una particolare categoria.  Si
  guardi con attenzione questo sito web per apprezzare quanto ha da
  offrire.


  11.  Commenti conclusivi

  Se si  un novizio di Linux, si pu voler creare una cartella
  Risoluzione dei Problemi nella lista dei bookmark del proprio browser,
  nella quale mettere i link che ho incluso in questo documento, come
  pure quelli pertinenti alla distribuzione di Linux e al Window
  Manager/Desktop Environment che si usa.

  Usando questi link, si diverr presto esperti della risoluzione dei
  problemi online.

  Saluti e buona ricerca!
























  Linux PCI-HOWTO
  di Michael Will, michaelw@desaster.student.uni-tuebingen.de
  versione 0.6d, Luglio 1996

  Informazioni su come far funzionare Linux con schede e motherboards
  PCI

  1.  Introduzione


  A molta gente, me incluso, piacerebbe far funzionare Linux su una
  macchina PCI.  Siccome non e' ovvio quali motherboards e quali schede
  PCI possono funzionare con Linux, ho condotto una ricerca e ho speso
  qualche ora per mettere insieme le informazioni contenute qui di
  seguito.

  Se avete qualche cosa da aggiungere per favore mandatemi un mail (in
  inglese :) (N.d.T.)). Se avete domande sentitevi liberi di chiedere.

  Aiuto sul mio stile, sulla mia grammatica e sul linguaggio e'
  benvenuto anch'esso.  Non sono un madrelingua inglese e aspettatevi
  che io faccia qualche errore (ovviamente questo vale anche per la
  traduzione (N.d.T.))

  Nota: "on-board chip" si riferisce a un chip SCSI integrato sulla
  motherboard e non a una scheda di espansione PCI.

  Inoltre citazioni qua e la' possono essere leggermente modificate.

   nota del traduttore: quanto trovate in questo articolo e' la
  TRADUZIONE di quanto scritto dall'Autore nell' HOWTO originale in
  inglese e pertanto non necessariamente rappresenta il mio pensiero;
  inoltre declino ogni responsabilita' derivante dal suo utilizzo.
  Nessuna garanzia e' accordata o sottintesa. E fine delle beghe legali
  :)

   Nota bene: qua e la' ci sono dei prezzi in dollari, non aspettatevi
  che qui in Italia si trovino le stesse cose agli stessi prezzi ;-)


  2.  Perche' PCI ?



  2.1.  Panoramica generale

  L'architettura dei PC ha diverse possibilita' di scelta se si parla
  del BUS da usare:

     ISA
        16 od 8 bit, economico, lento (di solito 8Mhz), standard, molte
        schede disponibili>

     EISA
        32 bit, caro, veloce, poche schede disponibili, sta scomparendo>

     MCA
        32 o 16 bit, ex-proprietario-IBM, veloce, sta diventando raro>

     VESA-Local-Bus
        32 bit, basato sull'architettura 486, economico, veloce, molte
        scheda disponibili>

     PCI-Local-Bus
        32 bit (i 64 stanno arrivando), economico, veloce, molte schede
        disponibili, lo standard odierno>
  L'architettura MCA funzionava bene, ma non ha mai avuto molto mercato,
  essendo usata solo su alcune tra le prime macchine IBM PS/2. C'erano
  veramente poche schede disponibili.

  EISA era affidabile ma piuttosto caro e inteso piu' per utenti evoluti
  e per i servers che per l'utente medio. E' quello che ha meno schede
  disponibili tra questi bus dopo l'MCA.

  ISA/VESA-Local-Bus ha avuto qualche problema con elevate velocita' del
  bus e non e' stato sempre affidabile ma, principalmente a causa del
  suo basso prezzo e delle sue prestazioni, se comparato con l'ISA, ha
  venduto molto. La maggioranza delle motherboards VESA dovrebbe essere
  stabile adesso. All'inizio del 1996 molte motherboards 486 supportano
  ancora questo standard ma PCI sta crescendo. I bus VESA sono legati
  alla velocita' del bus della memoria per i 486 e alla meta' di essa
  per i Pentium


  PCI ora e' in vantaggio. Come l'EISA non e' propietario. E' piu'
  veloce di EISA ed MCA ed e' meno costoso. La stragrande maggioranza
  delle motherboards Pentium attualmente disponibili usa il bus PCI; il
  VESA sta scomparendo.  Praticamente tutte le motherboards e le schede
  vendute all'inizio del 1996 sono a 32 bit e viaggiano a frequenze da 0
  a 33MHz.

  Oggigiorno la maggioranza delle motherboards Pentium fanno andare il
  bus PCI a una frequenza pari alla meta' di quella impiegata per il bus
  della memoria (i.e.: 33MHz dai 66MHz del bus della memoria per i P66,
  P100, P133, P166 e P200; 30MHz dai 60MHz del bus della memoria per i
  P60, P90, P120, P150 e P180; 25MHz dai 50MHz del bus della memoria per
  i P75). Questo dovrebbe valere anche per le motherboards Cyrix 6x86.
  L'implementazione del NexGen 5x86 non e' conosciuta.  Le specifiche
  PCI permettono alla frequenza del bus di essere slegata da quella del
  processore ( ad ex. 33MHz con un P75) ma questo tipo di soluzione non
  e' ancora molto comune.

  E' stato definito lo standard PCI 2.1 che permette i 64bit e frequenze
  da 0 a 66MHz ma per ora nessun chipset x86 lo supporta ( che io
  sappia, invece, molte motherboards Alpha lo supportano pienamente.
  N.d.T.). il PCI a 64bit probabilmente apparira' per primo in slot
  32/64bit cosi' da preservare la compatibilita' con le schede esistenti
  a 32bit. Probabilmente per i 66MHz ci sara' da aspettare di piu' dato
  che l'implementazione e' piuttosto complicata: infatti non dovrebbe
  supportare piu' di due slots per bridge e puo' anche darsi che non
  riesca a lavorare bene con le schede a 33MHz

  Lo standard PCI non e' dipendente dalla famiglia del processore:
  questo significa che posso benissimo usare la stessa scheda video PCI
  sia su un Alpha/PCI che su un 486/PCI (ovviamente entrambi con un
  appropriati BIOS e drivers ). Oltre ad Intel ed Alpha, anche alcune
  motherboards PowerPC impiegano il bus PCI.

  State attenti ad alcune piccole variazioni sul tema: alcune
  implementazioni (tipicamente le motherboards piu' decenti N.d.T.)
  supportano il Bus Mastering su tutti gli slot PCI, altre solo su uno e
  altre ancora su nessuno; alcune supportano il bridging sulle schede e
  altre no.


  2.2.  Prestazioni

  preso dalla prima propaganda a favore di PCI di Craig Sutphin


       Al contrario di alcuni bus che sono mirati solo alla velo
       cizzazione della grafica, il local bus PCI e' una soluzione
  per tutto il sistema, una soluzione che provvede maggiori
  prestazioni per le reti, per i dischi, per il video full-
  motion e per tutta la gamma di periferiche ad alte
  prestazioni.  A 33MHz il bus PCI sincrono trasferisce 32bit
  di dati che equivalgono a una frequenza massima di
  132MBytes/sec. Una estensione trasparente a 64bit dei bus
  dati e indirizzi puo' raddoppiare la larghezza di banda del
  bus stesso (264MBytes/sec) e offrire compatibilita' verso le
  periferiche sia a 32bit che a 64bit. A causa del fatto che
  e' indipendente dal processore, il bus PCI e' ottimizzato
  per le funzioni di I/O, permettendo che il local bus operi
  concorrentemente al sottosistema processore/memoria.  Peri
  gli utenti di PC di alta gamma, il PCI porta alta affid
  abilita', alte prestazioni e facilita' di uso con costi ora
  piu' bassi di quanto non lo siano mai stati prima; questo
  non e' sicuramente un compito semplice con delle frequenze
  di clock sul bus di 33MHz. Modalita' di accesso lineare a
  lunghezza variabile o di accesso burst per entrambe le oper
  azioni di lettura e scrittura migliora le prestazioni di
  sistemi grafici dipendenti dalla velocita' di scrittura.
  Grazie all'integrazione dei requisiti di caricamento e di
  frequenza del local bus a livello di componenti i buffers e
  la glue logic sono eliminati.


  Vedetevi il capitolo sui Benchmarks per qualche numero ( forse senza
  significato ) sulle mainboards ASUS PCI con 486 e 586


  2.3.  Il chip SCSI-II NCR53c810on board

  Una caratteristica molto piacevole di alcune motherboards PCI e' il
  chip SCSI-II NCR53c810 on board che si dice che sia veloce come l'EISA
  Adaptec-1742, ma molto piu' economico. I drivers per DOS e OS2 sono
  disponibili.  Drew Eckard ha rilasciato la sua versione del driver per
  NCR53c810 che e' contenuta direttamente nel kernel dalla versione 1.2.

  E funziona cosi' bene che ho venduto la mia scheda adaptec-1542B-ISA
  appena ho comprato la motherboard ASUS SP3 (chipset Saturn): infatti
  il suo controller SCSI integrato NCR e' molto piu' veloce.

  Il chip NCR53c810 e' on board su qualche motherboard PCI.  Sono
  disponibili anche delle schede aggiuntive per circa US$ 70.00.

  C'e' solo una cosa che non funzionava con i drivers per l'NCR quando
  li ho provati: Disconnect/Reconnect ( e' una funzione che dovrebbe
  servire a 'sconnettere' un device dal bus SCSI in caso di lunghe
  operazioni, cosi' da poterlo usare per qualche cosa d'altro: e' vitale
  se avete dei tapeDAT che dir si voglia, altrimenti ogni volta che
  chiedete un riavvolgimento vi si blocca tutto... N.d.T.)/ non
  funzionava e quindi usare una unita' a nastro SCSI poteva essere
  frustrante: usando comandi del tipo "mt erase" si verificava un
  bloccaggio della catena SCSI fino a quanto l'operazione veniva
  completata.  Dato che questa situazione era molto insoddisfacente per
  me, ho comprato uno dei costosi controllers della DPT e non ho avuto
  piu' problemi da allora.

  Comunque mi e' stato riferito the questo problema e' stato risolto.

  FreeBSD supporta il NCR53c810 da molto tempo ormai; questo supporto
  include le Tagged Command Queues, FAST, WIDE e il Disconnect per gli
  NCR53c810, 815, 825.  Drew ha detto che dovrebbe essere possibile
  adattare il driver per Linux. Da quanche parte ho visto delle patches
  per fare esattamente questo, qualcuno mi sa dire dove ? (se non vado
  errato nei kernel 2.0.x si puo' scegliere se usare appunto il driver
  BSD o quello standard. Personalmente io uso il driver BSD e non ho
  ancora avuto problemi. N.d.T.)

  Io personalmente ho l'impressione che ci sia stata scoperta piu' volte
  la stessa acqua calda a causa delle differenti evoluzioni di FreeBSD e
  di Linux. Un po' piu' di cooperazione potrebbe fare del bene a
  entrambi i sistemi...


  2.4.  Drew Eckhardt sul PCI-SCSI:


  Drew ha detto queste cose alla fine del marzo 95 a proposito dello
  SCSI sul PCI: (leggermente modificate per aumentare la chiarezza nel
  presente contesto)

  Le schede Adaptec 2940, Buslogic BT946, BT946W, DPT PCI boards, Future
  Domain 3260, NCR53c810, NCR53c815, NCR53c820, e NCR53c825 funzionano
  tutte per qualche definizione della parola "funzionano"


    L'Adaptec 2940 soffre della stessa sensibilita' ai cavi che
     affligge tutte le schede recenti ma per il resto funziona bene.

    Le schede Future Domain non sono busmasters e i drivers non
     supportano comandi multipli simultanei. Se (per il momento) non vi
     serve questa funzionalita' compratevi una scheda NCR che costa meno
     e in piu' e' busmastering. Se vi serve invece compratevi una
     Buslogic.

    La Buslogic BT956W puo' fare lo SCSI-WIDE con i drivers per linux (
     anche se non si possono usare i target 8-15), l' Adaptec 2940W (
     con una patch di una riga al driver della 2940) non lo fa come pure
     le NCR53c820 e NCR53c825.

    Le schede NCR sono estremamente economiche ($ 70 US), di solito
     sono veloci, ma il driver non supporta i comandi multipli
     simultanei. Ci sono in giro delle versioni pubbliche Alfa di un
     nuovo driver che fa il disconnect/reconnect e altre belle cose come
     i trasferimenti sincroni. Leggete piu' avanti.

    Emulux, Forex, e altri coltrollers SCSI per il PCI non
     funzioneranno.


  2.5.  Nuove versioni Alfa del driver NCR


  Versioni Alfa (pre-pre-release (N.d.T.)) del driver che fanno il
  disconnect/reconnect e altre belle cose come i trasferimenti sincroni
  sono ora disponibili al pubblico. Chiunque sia interessato a
  sperimentare con queste ultime dovrebbe:

    Aggiungersi alla mailing list NCR mandando un mail a
     majordomo@colorado.edu con subscribe ncr53c810 nel corpo del
     messaggio.

    Prendere tutti i readme e gli ultimi file diffs da
     ftp://tsx-11.mit.edu/pub/ALPHA/linux/SCSI/ncr53c810


  2.6.  Il driver EATA-DMA e i controllers SCSI per PCI della DPT


  Il driver scsi EATA-DMA e' stato sottoposto a grandi cambiamenti e ora
  supporta anche controllers SCSI PCI, controllers multipli e tutti i
  canali SCSI sulle schede multicanake SmartCache/Raid in tutte le
  combinazioni di WIDE, FAST-20 (ULTRA) e DIFFERENZIALE

  Il driver ora supporta tutti i controllers SCSI che rispettano il
  protocollo EATA-DMA ( documento CAM CAM/89-004 rev. 2.0c) ed e' stato
  testato con molti di questi controllers in varie combinazioni.


  Essi sono:             (ISA)  (EISA)  (PCI)
        DPT Smartcache: PM2011  PM2012B
                                PM2012B
        Smartcache III: PM2021  PM2022  PM2024
                                PM2122  PM2124
                                PM2322
        Smartcache IV:  PM2041  PM2042  PM2044
                                PM2142  PM2144
                                PM2322
        SmartRAID:      PM3021  PM3122
                                PM3222  PM3224
                                        PM3334
        e qualche controller della NEC, AT & T, SNI, AST, Olivetti e Alphatronix.



  Su una scheda DPT in configurazione base ( niente caching o moduli
  RAID ), un MC680x0 controlla i(l) chip bus mastering e il chip
  controller SCSI.  La scheda SCSI DPT lavora piu' o meno come un
  coprocessore SCSI.

  La scheda DPT puo' anche emulare un binomio drive/controller IDE (
  interfaccia ST506), la qual cosa vi permette di usarlo con tutti i
  sistemi operativi anche se non avete dei drivers EATA.

  Su una scheda con il modulo cache, il 680x0 mantiene e controlla la
  cache on board.  La scheda DPT supporta fino a 64MB RAM di cache per i
  dischi.

  Su una scheda con il modulo RAID il 680x0 e' impegnato anche nel
  controllo del RAID: facendo il mirroring nel RAID-1, facendo lo
  stripping e la generazione di informazioni ECC nel RAID-5 ecc. ecc.

  La scheda entry level usa un Motorola 68000, quelle di classe piu'
  elevata, piu' specifiche per il RAID, usano dei processori Motorola
  68020, 68030 o 68040/40MHz.

  I prezzi di listino variano da $ 265 a $ 1645 ( 18 Gennaio 1996)

  Dato che mi e' stato chiesto piu' volte dove si possono comprare
  queste schede ho chiesto alla DPT di mandarmi una lista dei loro
  distributori ufficiali Europei.  Eccone una piccola parte:


  Austria: Macrotron GmbH             Tel:+43 1 408 15430   Fax:+43 1 408 1545
  Denmark: Tallgrass Technologies A/S Tel:+45 86 14 7000    Fax:+45 86 14 7333
  Finland: Computer 2000 Finnland OY  Tel:+35 80 887 331    Fax:+35 80 887 333 43
  France : Chip Technologies          Tel:+33 1 49 60 1011  Fax:+33 1 49 599350
  Germany: Akro Datensysteme GmbH     Tel:+49 (0)89 3178701 Fax:+49 (0)89 31787299
  Russia : Soft-tronik                Tel:+7 812 315 92 76  Fax:+7 812 311 01 08
  U.K.   : Ambar Systems Ltd.         Tel:+44 1296 311 300  Fax:+44 296 479 461



  "Secondo me le DPT sono le schede SCSI meglio disegnate disponibili
  per il PC.  E io ho scritto codice per  piu' o meno qualsiasi tipo di
  scheda SCSI per PC.  (anche se, ripensandoci, non so perche' ) ;-)"
  Jon R. Taylor (jtaylor@magicnet.net) Presidente, Visionix, Inc.

  L'ultima versione del driver EATA-DMA e un bootdisk Slackware sono
  disponibili su ftp.i-connect.net:/pub/Local/EATA

  Dalla versione 1.1.81 il driver e' incluso nella distribuzione
  standard del kernel.

  L'autore puo' essere contattato a questi indirizzi: neuffer@mail.uni-
  mainz.de o mike@i-connect.net


  2.7.  Il BT-964C e' supportato pienamente dai kernel 1.3.x e oltre


  C'e' un driver nei kernel 1.3.x ( disponibile come patch per chi usa
  l' 1.2.13 ), scritto da una persona connessa alla Buslogic, che
  supporta pienamente il 964C e TUTTE le sue functioni incluse (le
  lascio in inglese ovviamente... N.d.T.) strict round robin, tagged
  queueing, multiple scatter-gather, multiple mailboxes, IRQ sharing, e
  15 devices su FastWide. Non e' piu' necessario usare la minima
  emulazione ISA con il driver ( ad ex. niente canale DMA, niente
  indirizzo ISA ), e il driver e' /veloce/ e /stabile/ ( non e' piu'
  BETA ed e' stata rilasciata la sua versione definitiva).

  Il driver e' disponibile su ftp.dandelion.com ( la nuova versione si
  puo' sempre avere facendo "get BusLogic*" (credo solo se usate ncftp,
  altrimenti fate una dir... N.d.T.) ).  Supporta TUTTI i controller
  BusLogic con l'eccezione del FlashPoint LT che usa una diversa
  interfaccia. Il driver e' incluso nei kernel 1.3.x come driver
  standard per i prodotti BusLogic.


  2.8.  Future Domain TMC-3260 PCI SCSI


  Rik Faith (faith@cs.unc.edu) mi ha informato mercoledi' 1 Feb 1995 che
  la scheda PCI Future Domain TMC-3260 SCSI e' supportata dal driver
  SCSI Future Domain 16x0. Informazioni piu' aggiornate possono essere
  contenute nello SCSI-HOWTO.


    Il riconoscimento della scheda non e' fatto bene e non usa i metodi
     standard di riconoscimento del BIOS PCI ( sarebbe necessario che
     qualcuno che ha una scheda PCI mi mandi delle patches per risolvere
     il problema).  Pertanto potreste dover trusciare con la routine di
     detect nel kernel per ottenerne il riconoscimento.

    Il driver continua a non supportare comandi multipli simultanei e
     quindi il vostro sistema si blocchera' mentre il nastro si
     riavvolge.

    Il driver non supporta i modi migliorati con trasferimento
     pseudo-32bit dei nuovi chips Future Domain cosicche' non
     sperimenterete delle velocita' di trasferimento dati cosi' alte
     come in DOS.

    Il driver supporta solo il protocollo SCSI-I cosi' i vostri
     velocissimi dischi rigidi non saranno sfruttati al massimo delle
     loro possibilita'.  ( soluzioni ai presenti problemi sono sempre
     gradite -- nessuno ci sta lavorando al momento.)



  2.9.  altre notizie sullo scsi



  James Soutter (J.K.Soutter1@lut.ac.uk) mi ha chiesto di aggiungere le
  seguenti informazioni sullo SCSI-2 Fast Wide:


       Lo SCSI-2 Fast Wide e' talvolta chiamato scorrettamente
       SCSI-3. Esso differisce dallo SCSI-2 Fast ( come l'Adaptec
       15428? ) perche' usa un bus dati di 16 bit invece dei soliti
       8. Questo migliora la massima velocita' di trasferimento
       dati da 10MB/s a 20MB/s ma richiede l'utilizzo di speciali
       dischi SCSI-2 Fast Wide.

       Le migliori prestazioni dello SCSI-2 Fast Wide non
       necessariamente renderanno il vostro sistema piu' veloce. La
       stragrande maggioranza dei dischi rigidi hanno una velocita'
       di trasferimento dati massima di meno di 10MB/s e pertanto
       un disco usato da solo non puo' sovraccaricare un bus SCSI-2
       Fast.

       Nella ricerca di mercato della Seagate fatta nell'Ottobre
       1993 solo un disco SCSI-2 Fast Wide ha mostrato una
       velocita' di trasferimento dati di piu' di 10MB/s ( lo
       ST12450W ). La maggior parte ha viaggiato a un massimo di
       6MB/s o meno anche se lo ST12450 non e' la sola eccezione.
       In conclusione lo SCSI-2 Fast Wide e' stato progettato per
       il mercato dei file servers e non necessariamente portera'
       benefici ai sistemi singolo utente.

       Invece di comprare un sistema PCI con una interfaccia SCSI
       sulla motherboard o aspettare un driver per l'NCR, potreste
       comprare una scheda separata PCI SCSI. Secondo Drew l'unica
       possibilita' che ha una chance di funzionare e' la Buslogic
       946. Essa intende essere compatibile con l'Adaptec 1540 come
       le schede EISA/VESA/ISA nella serie.

       Drew ha anche commentato che e' improbabile che altri
       controllers SCSI PCI siano supportati sotto Linux o BSD
       perche' quelli basati sull'NCR sono piu' economici e
       diffusi.


  Secondo broom@ocean.fit.qut.edu.au (Bradley Broom):

       La scheda Buslogic BT-946C PCI SCSI funziona se disabilitate
       l'opzione "enable Disconnection" con il programma DOS
       AUTOSCSI che e' fornito con la scheda stessa.



  Ernst Kloecker (ernst@cs.tu-berlin.de) ha detto: (modificato)

       La Talus Corporation ha completato un driver NS/FIP per le
       schede PCI con la SCSI NCR. Sara' distribuito molto presto e
       puo' anche darsi che sia gratis perche' una terza parte
       potrebbe pagare per il lavoro e donare il driver alla NeXT.


  Non tutte le motherboards PCI hanno il chip. Le vecchie ASUS lo hanno
  come pure una delle J-Bond. (La maggior parte delle schede oggigiorno
  (6/95) si aspettano che voi compriate l'NCR53c810 a parte.) Alcuni
  rivenditori rendono disponibile un'alternativa come potere leggere
  nell'articolo di Drew...

  Il chip NCR e' abbastanza intelligente da lavorare con dischi fissi
  formattati da altri controllers e non dovrebbe causarvi problemi.


  3.  Motherboards ASUS

  3.1.  ASUS e il NMI (Parita') -- impatto sulla Gravis-Ultrasound

  Le piu' recenti motherboards PCI Triton del 1995 non sembravano piu'
  supportare le SIMM con parita'. Dato che io di solito ho comprato
  quelle senza (che costano meno) non pensavo che questo fosse un
  problema fino a quando non ho inserito la Gravis Ultrasound nel mio
  computer.Sotto DOS il driver SBOS e la utility di setup si lamentano
  che la "nmi procedure disabled on this p.c." (la procedura nmi e'
  disabilitata su questo pc, sarebbe il Non Maskable Interrupt che DI
  SOLITO viene attivato da un Parity Error ma non solo come potete
  leggere qui N.d.T.)). Il manuale dice che dovrei comprarmi una
  motherboard migliore e non e' che questo sia di molto aiuto.

  La gravis-ultrasound funzionava senza problemi sulle ASUS-SP3 e ASUS-
  SP4 nonostante questo problema ma la gravis ultrasound max che ho qua
  mi causa un kernel panic su entrambe le motherboard e talvolta, mentre
  ascolto files .au attraverso /dev/audio, fa strane cose, come ad
  esempio suonare il resto di un vecchio campione suonato prima di
  quello corrente. Il sound driver raccomanda un buffer di 65536 sulla
  GUS Max invece di quello piccolo raccomandato con la GUS e non
  chiedetemi il perche'.  Comunque non ho piu' di questi problemi sulla
  piu' recente ASUS TP4XE.  Entrambe sono equipaggiate con 1 MB di Ram.
  Questi problemi potrebbero non essere dovuti al nmi, potrebbe forse
  essere colpa del driver audio ?

  Ho sentito che non solo la ASUS ma la maggior parte delle nuove
  motherboards PCI non hanno il supporto per la parita'/NMI.

  Stranamente l'ASUS-TP4 (chipset Triton) funziona con la GUS Max e
  carica l'SBOS, lo devo ammettere, sono confuso anch'io.


  3.2.  Vari tipi dimotherboards ASUS



  3.2.1.  ASUS SP3 con chipset saturn I (rev. 2) per 486,


    2 x rs232 con 16550

    NCR53c810 onboard,

    chipset saturn I leggermente bacato (rev. 2)


  3.2.2.  ASUS SP3G con chipset saturn II (rev. 4) per 486,

  come la SP3, ma chipset saturn meno bacato


  3.2.3.  ASUS SP3-SiS chipset, per 486

  come la AP4, ma con : un nuovo chipset SiS, funzioni 'green' ,
  controller EIDE, seriali 16550 e parallela onboard. Ha solo due slot
  per le SIMM. Sembra funzionare con gli AMD486DX4/120 ma non e' stata
  molto affidabile con l'NCR53c810 e vari sistemi operativi (Win-NT,
  Windows95, OS2); dopo essere passati a una ASUS SP4 Pentium tutti i
  problemi sono scomparsi e pertanto si pensa che la loro causa fosse
  proprio da ricercarsi nella mainboard. Sembra comunque funzionare bene
  con linux.



  3.2.4.  ASUS AP4, per 486, con PCI/ISA/VesaLocalbus

  funzioni 'green' , 1VL, 3 ISA, 4 PCI slots, solo EIDE onboard, no
  controller floppy, no rs232/centronics. Molto piccola.

  riconosce l' AMD486DX2/66 solo come DX4/100. Questo puo' essere
  corretto con la saldatura di un pin (quale?) a terra ma non
  raccomanderei comunque una motherboard di questo tipo.

  Quella che ho provato io non andava ne' con OS/2 ne' con Linux ma
  alcuni dicono di usarla con entrambi.

  Lo slot VESALB dovrebbe essere piu' lento di quelli delle motherboards
  vesa-lb a causa del 'ponte' PCI-VL ma non ci dovrebbero essere
  penalizzazioni nella sezione PCI.


  3.2.5.  ASUS SP4-SiS, per Pentium90, PCI/ISA

  come la SP3-SiS, ma per Pentium90/100.


  3.2.6.  ASUS TP4 con chipset Triton e supporto EDORAM

  ha il chipset Triton per migliorare le prestazioni e supporta le
  normali SIMM PS/2 in aggiunta al modo Fast-Page e i moduli EDO.


  3.2.7.  ASUS TP4XE con chipset Triton e supporto SRAM/EDORAM aggiun
  tivo

  supporta le nuove EDORAM e le future SRAM. Si dice che per lo meno la
  SRAM dovrebbe aumentare considerevolmente le prestazioni. Per qualche
  oscura ragione non ha accettato le SIMM da 8MB che funzionavano
  benissimo sulla ASUS SP4; dopo averli cambiati con degli altri che
  sembravano piu' grossi ( 16 chips invece di 8 se mi ricordo bene ) ha
  funzionato bene. E' stata testata con un P90 e un P100.


  3.3.  Benchmarks sulleMotherboards ASUS

  Ho tentato di confrontare le velocita' delle CPU in due motherboard
  ASUS: per il 486 ho testato la SP3 SiS (quella con uno slot VesaLB ) e
  per il 586 ho usato la ASUS TP4/XE: ognuna aveva 16MB RAM, per il
  resto e' stato usato un sistema identico.

  Devo ammettere che non ho ancora letto la FAQ dei benchmarks e
  pertanto questa sezione potrebbe cambiare notevolmente presto. Se
  avete qualche commento da fare per piacere scrivetemi.

  Sono specialmente confuso dal fatto che l'AMD486DX4/100 e' stato piu'
  veloce del 120 sui dhrystones (?!). Non ho notato di queste
  incongruenze comparando il P90 e il P100.

  Probabilmente il problema era questo: quando ho messo dentro l'AMD
  DX4-100 avevo la motherboard settata per un DX2/66. Anche se il BIOS
  lo riportava come un DX4-100 la motherboard avrebbe potuto usare una
  frequenza di clock errata...  comunque, dato che il DX2-66 usa 33MHz *
  2 e il DX4-100 usa 33MHz * 3 non capisco perche' non sia corretto.

  La motherboard che usa il DX4-120 e' settata come 40MHz * 3 = 120MHz.

  Un'altra cosa che mi chiedo e' perche i risultati dei wheatstones su
  alcune macchine danno dei numeri cosi' puliti...


  3.3.1.  ASUS SP3 with amd486DX4-100


    Dhrystone time per 500000 passi = 7 per 63559 dhrystones/secondo

    Whetstone time per 1000 passi = 5 per 200.0000 Whetstones/secondo


  3.3.2.  ASUS SP3 with amd486DX4-120


    Dhrystone time per 500000 passi = 8 per 56074 dhrystones/secondo

    Whetstone time per 1000 passi =  4 per 250.0000 Whetstones/secondo


  3.3.3.  ASUS SP3 with intel486DX2-66


    Dhrystone time per 500000 passi = 9 per 50761 dhrystones/secondo

    Whetstone time per 1000 passi = 7 per 142.8571 Whetstones/secondo


  3.3.4.  ASUS TP4/XE with intel586-90


    Dhrystone time per 500000 passes = 4 per 101010 dhrystones/secondo

    Whetstone time per 1000 passes = 3 per 333.3333 Whetstones/secondo


  3.3.5.  ASUS TP4/XE with intel586-100


    Dhrystone time per 500000 passi = 4 per 102040 dhrystones/secondo

    Whetstone time per 1000 passi = 2  per 500.0000 Whetstones/secondo


  3.4.  Informazioni dettagliate sulle vecchie ASUS PCI-I-SP3 con
  chipset saturn da heinrich@zsv.gmd.de:



    3 PCI, 4 ISA Slots (3x16, 1x8 Bit)

    ZIF Socket for the CPU

    posto per 4 72pin-SIMMs (max. 128M)

    Award BIOS su Flash-Eprom

    Onboard: NCR-SCSI, 1par, 2ser (con FIFO), AT-Bus, Floppy

  La motherboard si comporta come la maggior parte di quelle nella sua
  classe: cache write-through senza possibilita' di write-back. Non
  dovrebbe comunque essere importante, al massimo un 3% di prestazioni.

  Il BIOS supporta dischi rigidi SCSI sotto DOS/Windows senza drivers
  aggiuntivi ma con la motherboard ci sono doi drivers aggiuntivi che
  dovrebbero migliorare le prestazioni sotto DOS/Windows(ASPI), OS2,
  Windows-NT, SCO-Unix, Netware (3.11 e 4, se ho capito bene.)

  Gert Doering (gert@greenie.muc.de) ha detto che il driver per SCO-Unix
  del chip SCSI on board non funzionava correttamente. Dopo due o tre
  comandi del tipo "time dd if=/dev/rhd20 of=/dev/null bs=100k
  count=500" c'e' stato un kernel panic...

  I guai che hanno passato alcune persone con questa motherboard
  potrebbero essere causati dall'utilizzo di un Controller Adaptec SCSI
  esterno con la "sync negotiation" abilitata. (Questo e' successo prima
  dell'uscita dei drivers NCR, ecco il perche' dell'uso dell'Adaptec.)
  Per favore controllate nel setup del BIOS dell' Adaptec-1542C se lo
  usate anche voi e avete problemi con occasionali blocaggi del
  computer.

  C'e' una nuova versione della motherboard ASUS che dovrebbe
  sicuramente avere meno problemi. E' chiamata ASUS-PCI-I/SP3G, la G e'
  importante. Ha il nuovo chipset Saturn rev. 4 e i bugs dovrebbero
  essere spariti. Essi usano la variante Saturn-ZX e la nuova SP3G ha
  interrupt pienamente conformati PCI ( cioe' level triggered ( i.e.
  condivisibili ) e configurabili da BIOS). Ha una porta mouse PS/2
  onboard, ha modi power-saving EPA e supporto DX4. Ha delle eccellenti
  prestazioni. Se potete trovare la rivista tedesca di computer C't di
  Luglio (?) troverete una prova in cui si dice che la motherboard ASUS
  e' la migliore in circolazione.

  Ultima informazione sulla ASUS-SP3-G: potreste sperimentare dei crash
  di sistema se usate il PCI-to-memory-posting. Se lo disabilitate tutto
  funziona perfettamente.  w@peanuts.informatik.uni-tuebingen.de dice di
  credere che questo sia un problema del corrente kernel di Linux
  perche' parte del sistema continua a funzionare anche dopo che il
  resto si e' piantato, come se ci fosse un deadlock nello swapper, e
  perche' OS2/DOS e WINDOWS non hanno problemi.


  4.  Pat Dowler (dowler@pt1B1106.FSH.UVic.CA) con ASUS SP3G



    ASUS SP3G mainboard (e' rev.4 == saturn II)

    AMD DX4-100 CPU (bisogna settare il jumper 36 a 1&2 invece di 2&3,
     e' l'unica differenza con gli altri chip 486DXn)

    256K cache (arriva con cache da 15ns :-)

    16meg RAM (2x8meg)

    scheda video ET4000 ISA

    disco rigido quantum IDE

    scheda ethernet SMC Elitel16 combo

  Nonostante alcuni altri pareri trovo che il puntatore del mouse si
  muove molto fluidamente sotto X ( come pure sul vecchio '386) in ogni
  caso e' saltellante sotto alcuni, ma non tutti, giochi per DOS...

  Le prestazioni sono entusiasmanti!! Ho eseguito qualche grosso test in
  floating point e ho trovato che la prestazione in 3x33 ( 100MHz ) e'
  circa 1.5 volte quella in 2x ( 66MHz ) ( grosso per me e' una matrice
  500x500 di double, 4 mega piu' o meno)... ero un po' dubbioso sulla
  triplicazione del clock ma sembra che ne stia traendo pieno beneficio
  :-)

  L'altamente configurabile roba non funziona con i chip AMD DX4
  disponibili ora - vi serve un chip SL

  Mi servono veramente un disco SCSI e una scheda video PCI :-)

  (L'altro giorno ho ricevuto una telefonata di una persona che aveva lo
  stesso problema con dei chip FIFO SMC bacati, dopo aver usato X si
  piantavano).


  5.  confusione sui chipset saturn


  Pat Duffy (duffy@theory.chem.ubc.ca) ha detto:


  Saturn I:  queste sono le revisioni 1 e 2 del chipset Saturn.
  Saturn II:  Questa e' anche chiamata la rev. 4 del chipset Saturn.

  Per quanto ne so io la rev. 3 non e' mai stata distribuita e (da alcune
  persone che ce l'hanno) la SP3G ora ha la rev. 4 ( o Saturn II) in essa.

  Confusi? Bene, l'unica risposta definitiva e' prendervi la <sf/motherboard/
  ed eseguire lo script di debug dei chipset PCI su di essa. Per quanto ne so io
  comunque le SP3G hanno proprio la rev. 4 ( Saturn II).




  6.  Schede Video

  La gente con Linux ha usato con successo le schede video # 9 XGE Level
  12, ELSA Winner 1000, e la S3-928. XFree86(tm)-3.1.1 supporta le
  schede video con chipset tseng et4000/w32
   ( la mia, N.d.T.) in modalita' accelerata come pure le S3 Vision 864
  e 964 includendo schede come la  ELSA Winner 1000Pro e 2000Pro, le
  Number Nine GXE64 e GXE64Pro e la Miro Crystal 20SV). Il supporto per
  il clock chipe Chrontel8391 e' stato aggiunto nel server S3.

  Le schede S3 Trio32 e Trio64 come le SPEA V7 Mirage P64 PCI e la MIRO
  Crystal 40SV, sono supportate, le Mach32 e Mach64 sono anche loro
  supportate in modalita' accelerata.

  Il driver SVGA

  Supporto per il modo a 16bpp (65K colori invece dei soliti 256) per le
  schede Mach32 come pure per il 32bpp per alcune schede S3 e per la
  P9000 e' stato aggiunto.


  tldraben@teleport.com riporta:


    Diamond Stealth W32 (et4000/W32) -- Il modo testo funziona, X11
     soffriva di "pixel dust", insopportabile, mai ruscito a farla
     funzionare e restituita.

    # 9GXE L12 -- Funziona, le virtual consoles so corrompono quando si
     passa tra di esse, questo si puo' evitare disabilitando il "fast
     dram mode" nel mio BIOS. Non si riesce comunque ad avere un dot
     clock sopra 85.

  La Genoa Phantom 8900PCI sembra funzionare bene, la Genoa Phantom/W32
  2MB non funziona in una motherboard ASUS.  Il chipset Tseng 3000/W32i
  chipset sembra funzionare bene, la Spea-v7 mercury-lite funziona
  perfettamente da XFree86(tm)-2.1.

  La Spea V7 Mirage P64 PCI 2M with Trio64 funziona bene da
  XFree86(tm)-3.1.1


  L' ATI Graphics Ultra Pro per PCI con 2MB VRAM e un ATI68875C DAC
  funziona bene come dem@skyline.dayton.oh.us ci dice: "Sta rombando
  proprio ora a 1280x1024 con 256 colori @74Hz non-interlacciati. E'
  fantastica."

  La Paradise WD90C33 PCI si piantava sullo screensaver/X - questo e'
  stato risolto nelle nuove versioni del kernel.
  jbauer@badlands.NoDak.edu (John Edward Bauer)

  La miroChrystal 8S/PCI (1MB) S3 - no problem.

  Stephen Tweedie ha detto che la sua scheda PCI Cirrus Logics 5434
  funziona bene.  E' a 64bit con 2MB e funziona perfettamente con il
  driver SVGA nei modi a 8, 16 e 32 bit per pixel.


  7.  Schede Ethernet

  Ovviamente le schede ethernet per ISA continuano a funzionare ma la
  gente richiede delle versioni PCI. L'autore di molti ( se non della
  maggior parte ) dei drivers ethernet ha detto quanto segue un po' di
  tempo fa (sfortunatamente non sono ancora riuscito a contattarlo per
  informaizoni aggiornate):


       From: Donald Becker (becker@cesdis.gsfc.nasa.gov)

       Subject: schede PCI ethernet supportate?

       Il codice LANCE e' stato esteso per essere in grado di
       gestire delle versioni PCI. Spero di riuscire a mettere il
       codice di probing PCI ( all'incirca una dozzina di linee
       extra nel driver LANCE ) nella prossima versione del kernel.
       Sto lavorando sul codice per il modo a 32bit.  Non ho ancora
       iniziato il codice per il 21040.

       Scrivero' drivers per il modo PCnet32 e per il DEC 21040.
       Questo coprira' la maggior parte del mercato delle schede
       ethernet PCI.

       file://cesdis.gsfc.nasa.gov/pub/people/becker/whoiam.html


  Nei nuovi testkernels da 1.1.50 in su, gli adattatori ethernet AMD a
  chip singolo sono supportati. Con un pentium dovrebbero vedere oltre
  900K ftps/sec.  (assumendo un controller PCI NCR scsi ) con un carico
  CPU di circa il 20%.  (AMD Lance).

  Qualsiasi cosa basata sul chip AMD PCnet/PCI dovrebbe funzionare gia'
  adesso. Negli stati uniti la scheda Boca costa meno di US$ 70.

  Geoffry Coram ha scritto nelle news che e' riuscito a far funzionare
  la sua 3com 590 TPO.  Ha dovuto prendersi i drivers Alfa da
  http://cesdis.gsfc.nasa.gov/linux/drivers.  Ci dovrebbero essere anche
  degli altri driver, guardate.  Notate anche
  http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html

  Donald Holmgren ha detto di aver attaccato con successo la sua scheda
  DEC DE435 (PCI) alla rete locale su cavo coassiale sottile (BNC). Il
  driver DE435 prima testa la connessione sul doppino (twisted pair) e
  poi si mette a usare la porta alternativa ( settabile come AUI o BNC )
  se quella 10BaseT non e' in funzione.

  Jim Cusick usa la scheda Boca BEN 1PI su una rete in BNC.  Funziona
  proprio bene. Potreste voler dare un'occhiata a:
  http://cesdis.gsfc.nasa.gov/linux/misc/boca-failure.html per dei
  dettagli sui problemi di gioventu' di questa scheda.  La mia seconda,
  dopo averne rimadata indietro una per la sostituzionem era marcata "PM
  4186". La vecchia, che non funzionava, invece aveva un marchio "PM
  4185". Chiedete questo nuovo modello quando ordinate dal vostro
  rivenditore. A $ 70 e' un buon affare.

  Dave Platt raccomanda di stare alla larga dalla Boca BEN1PI a tutti i
  costi.  Sembra essere inaffidabile a causa di errori di progetto e la
  Boca sembra proprio non essere in grado di metterla a posto veramente.
  La scheda PCI "Vortex" 3Com 3c590 e' disponibile in una versione
  combinata (10BaseT, BNC e AUI). Il driver Linux per questa scheda non
  e' ancora parte ufficiale del kernel ma si puo' trovare a
  http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html e puo' essere
  messo nei kernel piu' recenti ( ovvero 1.2.x e 1.3.x) senza grandi
  difficolta'. Il driver Linux non supporta l'autodetect di questa
  scheda - dovrete usare l'utility dos per configurare la scheda per
  l'interfaccia che intendete usare (BNC in questo caso). Una volta
  fatto questo il driver Linux funzionera' correttamente.

  Ha usato una 3c590 per varie settimane e sta funzionando bene.

  Dave Kennedy ha detto di essersi preso due delle schede Boca di cui
  sopra e funzionano bene sotto un carico basso, ma falliscono
  miseramente in caso di richieste pesanti ( come ad esempio un doppio
  ftp da 16Mega in entrambe le direzioni). Egli le ha rispedite alla
  Boca per un intervento hardware, dopo qualche modifica a base di
  diodi/resistori (saldati sulle schede) esse hanno funzionato senza
  problemi in tutte le condizioni. Le schede stanno funzionando da sei
  mesi 7 giorni su 7 e 24 ore su 24  in due sistemi P90 senza problemi
  da 6 mesi ad oggi.

  Craig non le raccomanda dato che la Boca non sembra seguire le
  specifiche AMD ma le ha usate per due mesi senza problemi. Ha testato
  le sui prestazioni NFS e ha mosso grandi file da e verso il server
  (16M, 8M). Ha anche provato a lavorare in locale usando i files di
  dati montati da NFS sulla sua scheda ISA NE2000. (nota dell'editore:
  probabilmente dovrebbe essere la ISA SMC Elite Ultra).


  7.1.  3com-3c590-tpo


  Qualcuno sulle USENET News ha detto di usare le 3Com-3C590-TPO
  (EtherLink III - PCI). Ha dovuto prendere il file "3c59x.c" del driver
  e applicargli la patch "vortex.patch" per farlo funzionare sul suo
  kernel 1.2.8.


  7.2.  DEC435 PCI NIC


  Si dice che la DEC435 PCI NIC funzioni perfettamente con i drivers
  inclusi nella distribuzione Slackware - questo dovrebbe stare a
  significare che gli stessi siano inclusi nei nuovi kernels.


  8.  Motherboards

  La gente che ha risposto usa le seguenti motherboards:


  8.1.  ASUS


    Ruediger.Funck@Physik.TU-Muenchen.DE - con successo.

    strauss@dagoba.escape.de - cosi' cosi', funziona, ma...

    krypton@netzservice.de (Ulrich Teichert), - con successo.

    heinrich@zsv.gmd.de - con successo

    CARSTEN@AWORLD.aworld.de -  con successo

    egooch@mc.com -  con successo - ma problemi con la porta seriale

    archie@CS.Berkeley.EDU and his friend - con successo dopo aver
     risolto un problema IDE

    Lars Heinemann (lars@uni-paderborn.de)  con successo

    Michael Will (Michael.Will@student.uni-tuebingen.de) - con successo


  8.2.  Micronics P54i-90


  root@intellibase.gte.com con successo

  bill.foster@mccaw.com con successo

  karpens@ncssm-server.ncssm.edu con successo



  8.3.  SA486P AIO-II


  ah@doc.ic.ac.uk con successo



  8.4.  Sirius SPACE


  hi86@rz.uni-karlsruhe.de - con successo


  8.5.  Gateway-2000

  kenf@clark.net - nessun problema a parte con la scheda audio quando si
  usa lo swapping dmarples@comms.eee.strathclyde.ac.uk - con successo,
  ma...  robert logan (rl@de-montfort.ac.uk) - senza problemi.  James D.
  Levine (jdl@netcom.com) - sena problemi.


  8.6.  Intel-Premiere

  grif@cs.ucr.edu - con successo jeromem@amiserv.xnet.com - con successo
  demarest@rerf.or.jp - con successo (Premier-II)


  8.7.  gbelow@pmail.sams.ch - con successo DELL Poweredge SP4100

  8.8.  torsten@videonetworks.com - funziona se si disattiva il
  Plug'n'Play DELL OptiPlex Gl+ 575

  8.9.  Comtrade Best Buy PCI / PCI48X MB Rev 1.0

  tldraben@Teleport.Com - "Funziona, credo che abbia un chipset Saturn
  bacato.  Vorrei anche aggiungere: non comprate dalla Contrade. Il loro
  servizio e' orribile.
  8.10.  IDeal PCI / PCI48X MB Rev 1.0

  tldraben@Teleport.Com - "Non ha funzionato con la motherboard PCI48X"


  8.11.  CMD Tech. PCI IDE / CSA-6400C

  tldraben@TelePort.com - "Funziona"


  8.12.  GA-486iS (Gigabyte)

  Stefan.Dalibor@informatik.uni-erlangen.de - con successo e problemi.


  8.13.  GA-586-ID (Gigabyte) 90 Mhz Pentium PCI/EISA Board

  kkeyte@esoc.bitnet - con successo


  8.14.  ESCOM 486dx2/66 - which board?

  Funziona perfettamente a parte lo streamer ftape (archivio)


  8.15.  J-Bond with i486dx2/66

  Drew Eckhardt (drew@kinglear.cs.Colorado.EDU) usa una Diamond Stealth
  64 VRAM con 4M of memory (basata sul chipset 964 ). Funziona
  benissimo, di solito la usa in 1024x768 a 72hz con 32bpp; 16bpp e 8bpp
  funzionano anche loro comunque. Gli e' servito prendere il server
  X311u2S3.tgz da ftp.xfree86.org; la gente con delle schede Diamond
  basate sul 968 dovrebbero sicuramente darli un'occhiata.


  8.16.  super micro 011895 03:50 SUPER P54CI-PCI rev 1.3 (Opti)

  Manuel de Vega Barreiro

    board    super micro 011895 03:50 SUPER P54CI-PCI rev 1.3

    chipset Opti : 82c557,82c556,82c558,82c621.

    4 PCI, 4 ISA Slots (4x16 Bit)

    ZIF Socket per CPU (120,100,90,75 mHz)

    4 72 pin-SIMMs (max 128Mb)

    cache 256,512,1024 Kb L2-cache

    Ami WinBIOS in Flash-Eprom (101094-VIPER-P)

    onboard: EIDE per 4 drives

    Pentium with 90Mhz, 8M (ora 16M) RAM e 256K L2-cache.

    1 maxtor 540 Mb, 1 st3122A 1Gb

    Number Nine 9GXE64pro con 2Mb

    Sound blaster 16 + cdrom Matsushita

    17" microscan 5ep ADI monitor

     Io uso il linux 1.1.57 ( ora 1.2.1) senza problemi.  il dosemu0.53
     funziona bene (software di comunicazione come kermit e xtalk)
     XFree86 3.1 alla risoluzione di 1024x768




  9.  Gente che ha avuto successo



  9.1.  California Graphics - Sunray II Pro


  Guido Trentalancia (guido@gulliver.unian.it) ha detto che la sua C.G.
  Sunray II Pro con il chipset Triton funziona bene con un Pentium 100,
  H.D. Conner cfs420a, e che sta macinando numeri a 147492
  dhrystones/sec.


  9.2.  Micronics P54i-90 (root@intellibase.gte.com)


  Pentium a 90MHz, 32MB RAM e 512K cache di secondo livello. Funziona
  estremamente bene ( una compilazione del kernel prende 10 minuti :-).


  La motherboard contiene :

    UART - due 16550A high speed UARTS

    ECP - ona enhanced parallel port

    Onboard controller IDE

    Onboard controller floppy

  Pro: Ora come ora la sto usando con un Adaptec 1542CF e un drive da 1
  giga della Seagate senza problemi. La scheda video e' una ATI Graphics
  Pro Turbo (PCI).  Molto veloce. Le porte seriali riescono a stare al
  passo con un modem TeleBit T3000 (38400) senza perdere caratteri per
  la strada. La cache funziona anche sulla memoria al di sopra dei 16
  mega. Ci sono tre banchi di slot SIMM ( due SIMM per bancata con una
  capacita' per ogni bancata di 64MB (2 x 32MB SIMM da 72pin). Ogni
  bancata deve essere completamente riempita per poter funzionare ( io
  sto usando solo il banco 0 con due SIMM da 16 Mega). Lo zoccolo per la
  CPU e' uno ZIF. Il BIOS e' un Phoenix di tipo FLASH.

  Contro: la RAM e' espandibile a 192MB ma la cache di secondo livello
  ha un massimo a 512KB. Anche se la scheda grafica e' molto veloce
  attualmente non c'e' un server XF86 per la Mach64 ( beh, attualmente
  c'e', ma non usa nessuna accelerazione, e' solo un server SVGA ). Non
  so se il controller IDE on board funziona; ho dei pregiudizi su uno
  standard che non permette che le mie periferiche operino su diverse
  piattaforme, cosi' non ho comprato un disco IDE; ho invece preso un
  Seagate 31200N e un NEC 3Xi.

  Mitch


  9.3.  Angelo Haritsis (ah@doc.ic.ac.uk) sulla SA486P AIO-II:

  La motherboard che ho alla fine comprato (in GBR) e' una che supporta
  i chip 486 SX/DX/DX2/DX4. Si chiama SA486P AIO-II. Le caratteristiche
  includono:


    chipset Intel Saturn v2

    Phoenix BIOS (flash eprom in opzione)

    NCR scsi BIOS v 3.04.00

    256K 15ns cache (max 512) write back e write through

    4 72-pin SIMM slots in 2 banchi

    3 PCI slots, 4 ISA

    On-board controller NCR 53c810 scsi

    On-board IDE / floppy / 2 x 16550A uarts / enhanced parallel

  L'ho comprata da una compagnia (GBR) chiamata ICS, (notate che io non
  ho nessun interesse in essa, sono solo un felice acquirente). Io uso
  una CPU 486/DX2-66.

  Prima ho avuto una motherboard VLB con un controller buslogic BT-445S
  in prestito. Io ho due periferiche scsi: un disco rigido barracuda
  ST12550N da 2.1GB e uno streamer Wangtek 5525ES.  Mi aspettavo un
  sacco di problemi dopo il cambio di motherboard, specialmente dopo
  aver sentito tutte le voci che giravano in rete. Con mia grande
  sorpresa tutto ha funzionato perfettamente dal primo boot! (1.1.50).
  Ed sta facendo lo stesso da circa un mese ormai. Non ho neanche dovuto
  ripartizionare il disco: apparentemente la traduzione della geometria
  del disco e' la stessa in entrambi i controller.  Linux non ha avuto
  problemi. Lo SCSI e' anch'esso visibilmente piu' veloce ( mi spiace ma
  non ho fatto dei test).

  Gli unici problemi (collegati al driver scsi ncr53c7,810 di Drew -
  grazie per il buon lavoro a proposito!) sono:

    i trasferimenti sincroni non sono ancora supportati => calo di
     prestazioni

    il disconnect/reconnect e' disabilitato => le operazioni sul disco
     scsi talvolta si bloccano durante alcune operazioni lente
     dell'altra periferica scsi ( ad esempio il riavvolgimento del
     nastro )

    il tagged queuing non c'e' (?) => calo di prestazioni

  Se Windows si lamenta per dei problemi col driver a 32-bit vi basta
  disabilitare l'accesso a 32-bit dal pannello di controllo. Questo non
  dovrebbe abbassare le prestazioni ( Io invece ho rimosso il driver
  WDCTRL dal mio SYSTEM.INI )

  Tutto il resto e' OK. Ho provato le porte seriali con qualche
  programma dos/windows e hanno funzionato. Il controller IDE/Floppy
  funziona anch'esso. Non ho provato ancora la porta parallela. La
  motherboard e' molto veloce e fin'ora sono molto compiaciuto
  dall'upgrade. Non ho ancora provato una scheda video PCI. Lo faro' in
  futuro. Sto usando una vecchia ISA S3 che per il momento mi basta.


  9.4.  bill.foster@mccaw.com about his Micronics M5Pi

  Motherboard Micronics M5Pi con Pentium 60 MHz , bus PCI e le seguenti
  cose:




  16Mb RAM/512k cache
  <sf/onboard/ IDE, parallela, 16550A UARTS
  2 X 340MB Maxtor IDE H.D.
  Soundblaster 16 SCSI-II
  Toshiba 3401B SCSI CD-ROM
  Streamer Archive Viper 525MB SCSI
  Monitor Viewsonic 17
  Scheda video Cardex Challenger PCI (ET4000/W32P)
  Mouse seriale A4-Tech



  Tutto funziona alla grande, l'installazione della Slackware e' stata
  molto facile, posso far girare Quicken 7 per DOS sotto il DOSEMU. Io
  lavoro in X con una risoluzione di 1024x768 a 67Hz.


  9.5.  Simon Karpen (karpens@ncssm-server.ncssm.edu) con la Micronics
  M54pi

  Non ho avuto problemi con la motherboard di cui sopra, il controller
  IDE PCI on board (spero presto di avere anche lo SCSI) e una ATI
  Mach32 (GUP) con 2MB di VRAM.


  9.6.  Goerg von Below (gbelow@pmail.sams.ch) sul DELL Poweredge



  - Intel 486DX4/100
  - 16 MB RAM
  - DELL SCSI array (DSA) con Firmware A07, DSA-Manager 1.7
  - 1 GB SCSI HD DIGITAL
  - NEC SCSI CD-ROM
  - streamer interno da 2 GB SCSI
  - scheda ethernet 3-Com C579 EISA
  - Sottosistema VGA ATI 6800AX PCI con 1MB RAM

  ATTENTI! Il controller DELL SCSI Array (DSA) funziona solo con il firmware Rev. A07 !
  A06 e' bacata, e' impossibile fare il reboot !
  Per prenderla: ftp dell.com , il file e' /dellbbs/dsa/dsaman17.zip



  A parte questo problema dovuto al firmware non ci sono state grane per
  gli scorsi due mesi, usando il linux 1.1.42 come nameserver primario e
  news e www server sull'internet.


  9.7.  zenon@resonex.com sul Gateway2000 P-66

  Sistema Gateway2000 P5-66 con motherboard Intel PCI 5 slots ISA e 3
  PCI.  L'unica scheda PCI che sto usando e' la scheda # 9 GXe level 12
  PCI (2 MB VRAM e 1 MB DRAM). Questa scheda e' stata acquistata dalla
  Dell. Sotto Linux sto usando la grafica solo in 80x25 ( sto aspettando
  alcuni raffinamenti di XFree86 prima di usarla in 1280x1024), ma sotto
  DOS/Windows ho usato la scheda in 1280x1024x256 senza problemi. Ho
  inoltre una scheda Ethernet Etherlink 3C509, un'interfaccia sul bus
  della Mitsumi, un'interfaccia SCSI Adaptec 1542C e una scheda con
  delle seriali e parallele aggiuntive (che in totale diventano 3 ( le
  seriali)).

  Ho un totale di 32MB RAM (riconosciuti e usati sia da Linux e DOS).
  C'e' anche un bus mouse (un Microsoft in modalita' PS2).


  Nessun problema fino ad ora.


  9.8.  James D. Levine (jdl@netcom.com) con la Gateway2000

  Gateway 2000 P5-60 con una motherboard Intel Mercury , AMI-Flash-BIOS,
  (1.00.03.AF1, (c)'92) 16M RAM, IDE controller on-board e una scheda
  video PCI ATI AX0 (Mach32 Ultra XLR). Non ha avuto problemi con
  l'hardware fino ad ora ma non ha neanche provato delle cose
  particolari come ad esempio drivers accelerati per l'IDE o il supporto
  SCSI.


  9.9.  hi86@rz.uni-karlsruhe.de con SPACE

  SPACE-motherboard, 8MB RAM, S3 805 1MB DRAM PCI 260MB Seagate IDE-hard
  disk a causa della mancanza del driver NCR53c810, 0.99pl15d, sembra
  funzionare bene.


  9.10.  grif@cs.ucr.edu con INTEL

  17 macchine con un P60 sulla motherboard Intel-Premier-PCI


  9.11.  Jermoe Meyers (jeromem@amiserv.xnet.com) con Intel Premiere


  Motherboard Intel Premiere Plato-babyAT 90mhz, Buslogic bt946c con
  mcode 4.86 firmware autoSCSI 4.22, (nota, la mia ha l'mcode 4.80 e
  l'autoSCSI firmware 4.17. (i pin di interrupt A,B,C corrispondono ai
  rispettivi slot PCI!), ATI Xpression (Mach64) - sto usando i driver da
  sunsite con un monitor AcerView 56L.

  La motherboard ha 4 dischi IDE, Linux ( Slackware 2.0) vede i primi
  due e tutto quello che c'e' attaccato alla Buslogic come se emulasse
  un'adaptec 1542. Ah, gia', il Dos li vede tutti.  La Buslogic e' MOLTO
  gentile nello spedire chips upgradati ( dovete sapere come cambiare
  chips PLCC ( plastic leaded chip carrier (mai visti, se qualcuno sa
  come sono fatti... (N.d.T.)) e ne dovete cambiare 3. Non lasciatevi
  comunque scoraggiare, prendetevi un attrezzo per la rimozione dei PLCC
  senza spenderci molto e siete pronti.  Potreste anche voler fare
  l'upgrade della flash-rom del vostro bios di sistema dalla BBS IPAN
  della Intel, una cosa semplicissima. Cosa ancora piu' interessante e'
  che ho anche una Sound Blaster SCSI-2 che fa funzionare un drive CDROM
  attaccato al suo controller onboard adaptec 1522. Questo vuol dire 4
  drives IDE ( 2 sotto Linux) e 2 controllers SCSI-2.

  Spero che questo faccia si' che altri che stanno combattendo con la
  tecnologia PCI usino Linux !  Jerry (jeromem@xnet.com)


  9.12.  Timothy Demarest (demarest@rerf.or.jp) Intel Plato Premiere II

  Il mio sistema e' configurato come segue: 16Mb 60ns RAM, scheda
  ethernet 3Com Etherlink-III 53C809 (usando il 10base2), ATI Mach 64
  2Mb VRAM, CDROM SCSI Toshiba 2x, controller SCSI NCR 53c810 PCI, Drive
  Syquest 3270 270Mb, monitor Viewsonic 17 , Pentium-90 (senza bug
  FDIV). Sto usando la Slackware 2.1.0e il Kernel 1.2.0 con varie
  patches e upgrades.

  Tutto sta funzionando alla perfezione. Non consiglio i dischi Syquest.
  Ho usato sia i 3105 che i 3270 e sono entrambi molto, molto, molto
  fragili. In piu' le cartucce si possono danneggiare facilmente e ho
  avuto spesso problemi con esse. Sto cercando un sistema di
  immagazzinaggio rimovibile alternativo al momento (MO, Zip, Minidisc,
  etc).

  Alcune informazioni che vi potrebbero servire:


  9.12.1.  upgrades del Flash Bios

  Gli upgrades per il Flash Bios possono essere presi con ftp da
  wuarchive.wustl.edu:/pub/MSDOS_UPLOADS/plato. La versione corrente e'
  la 1.00.12.AX1.  Gli upgrades BIOS *devono* essere fatti in ordine. Da
  1.00.03.AZ1 a 1.00.06.AX1 a 1.00.08.AX1 a 1.00.10.AX1 a 1.00.12.AX1.
  Gli upgrades del Flash BIOS possono anche essere presi dalla BBS
  Intel. Non ho il numero sottomano comunque.


  9.12.2.  NCR 53c810 BIOSless (i.e. senza bios) PCI SCSI

  Se state usando una scheda PCI BIOSless SCSI NCR53c810 nella Plato
  potreste avere problemi nel vederla riconosciuta. Io ho dovuto
  cambiare un jumper sulla scheda NCR: il jumper che controlla se ci
  sono 1 o 2 schede SCSI NCR nel vostro sistema deve essere settato su
  "2". Non so perche' ma questo e' il modo in cui sono riuscito a farlo
  funzionare.  L'altro jumper controlla il settaggio dell' INT
  (A,B,C,D). Io ho lasciato il mio su A ( il default).


  9.12.3.  eccetto questo - "plug and play!"

  Non ci sono settaggi nel BIOS della motherboard per usare l'NCR
  53c810.  Non preoccupatevi - una volta che il jumper sulla scheda e' a
  posto tutto funzionera' perfettamente! Grazie al Plug-n-Play PCI!


  9.13.  heinrich@zsv.gmd.de con l'ASUS

  ASUS-PCI-Board (SP3) con:



    -- Asus PCI-Board con AMD 486/dx2-66 e 16M RAM

    -- Fujitsu 2196ESA 1G SCSI-II

    -- Controller Future Domain 850MEX (controller scsi economico,
     all'incirca un clone del Seagate ST01... vorrei usare l'NCR 53c810
     non appena il driver verra' rilasciato

    -- ATI Graphics Ultra (la vecchia con il chip Mach-8 Chip, ISA-Bus)

    -- Slackware 1.1.1

  Egli ha appena scambiato le motherboards, ha messo dentro le schede,
  connesso i cavi e tutto ha funzionato perfettamente. Non usa comunque
  delle schede PCI per ora.


  9.14.  CARSTEN@AWORLD.aworld.de con l'ASUS

  ASUS-PCI-Board con 486DX66/2, miro-crystal 8s PCI guidata dai drivers
  S3 di XFree86-2.0, usando il chip SCSI onboard. Nessun problema di
  compatibilita' in assoluto.





  9.15.  Lars Heinemann (lars@uni-paderborn.de) con l'ASUS

  ASUS PCI/I-486SP3 Motherboard con 486DX2/66 e 16M RAM (2x8),
  miroChrystal 8S/PCI (1MB) S3, Soundblaster PRO, controller SCSI
  Adaptec 1542b (3.20 ROM) con due dischi rigidi (Fujitsu M2694ESA u.
  Quantum LPS52) e uno stramer QIC-150.  Nessun problema!


  9.16.  Ruediger.Funck@Physik.TU-Muenchen.DE con l'ASUS


  ASUS PCI/I-486SP3 / i486DX2-66 / 8 MB PS/2 70 ns
  BIOS: Award v 4.50
  CPU TO DRAM write buffer: enabled
  CPU TO PCI write buffer: enabled
  PCI TO DRAM write buffer: disabled, non si puo' cambiare
  CPU TO PCI burst write:  enabled
  Miro Crystal 8s PCI - S3 P86C805 - 1MB DRAM
  Quantum LPS 540S SCSI-Harddisk con un controller NCR53c810.




  9.17.  robert logan (rl@de-montfort.ac.uk con GW/2000)


  Gateway 2000 4DX2-66P 16 Megs RAM, PCI ATI AX0 2MB DRAM (ATI GUP).  WD
  2540 Hard Disk (528 Megs) CrystalScan 1776LE 17pollici. (Va fino al
  1280x1024) Slackware 1.1.2 (0.99pl15f)

  Non gli sta dando problemi. Egli usa lo SLIP per la connessione in
  rete e una Orchid-Soundwave-32 per i giochini, aspettando il driver
  NCR.  L'unico problema e' che il disco IDE potrebbe essere molto piu'
  veloce sul PCI-IDE. E' uno dei nuovi dischi rigidi veloci Western
  Digital e in DOS viaggia veramente tanto - su Linux invece e' lento
  come un buon disco IDE


  9.18.  archie@CS.Berkeley.EDU e un suo amico usano l'ASUS

  Archie e il suo amico hanno delle configurazioni piuttosto simili:


    ASUS PCI-SP3 motherboard (4 ISA, 3 PCI)

    Intel 486DX2/66

    Scheda video Genoa Phantom 8900PCI  (l'amico: Tseng 3000/W32i)

    H.D. Maxtor 345 MB IDE

    modem interno Supra 14.4

    monitor ViewSonic 6e (Archie)

    NEC Multisync 4fge (l'amico)

    Slackware 1.2.0

  La SCSI onboard e' disabilitata. Sulle prime ci sono stati dei
  problemi con il drive IDE: ``sulla mainboard c'e' un jumper che
  sceglie se l'IRQ 14 deve arrivare dal bus ISA o da quello PCI. Sul
  manuale c'e' un esempio dove si mostra la sua connessione all'INT A
  del PCI. Bene, noi abbiamo fatto proprio come si vede nell'esempio...
  ma piu' tardi il nostro disco IDE non funzionava (il controller IDE on
  board). Abbiamo dovuto riportarlo indietro. La gente all'NCA era
  perplessa sulle prime poi ha rintracciato il problema che era proprio
  nel jumper. Io mi immagino che che il controller IDE usi l'IRQ 14 o
  simili... Questo non e' documentato da nessuna parte sui manuali. A
  parte quello ora sta proprio andando alla grande. Sta eseguendo X,
  usando il modem, etc. (per la Supra dovete dire esplicitamente al
  kernel che la porta COM ha una 16550A usando setserial (nella
  Slackware /etc/rc.d/rc.serial))''.


  9.19.  Michael Will con l' ASUS-SP3 486 (il vecchio modello)


  ha usato le seguenti cose:


    ASUS PCI-SP3-Board con un 486dx2/66 e 16M RAM

    NCR53c810-SCSI-II chip con un disco 1GB-Seagate-SCSI-II e un nastro
     Wangtec

    scheda video ATI-GUP PCI Mach32 con 2M VRAM che va alla perfezione
     con XFree86(tm)-3.1 8bpp e 16bpp

    Linux kernel 1.1.69

  Funziona perfettamente e io sono soddisfatto dalla velocita', l' ATI-
  GUP-PCI(Mach32) non da' dei benchmarks cosi' buoni come mi sarei
  potuto aspettare comunque. Dato che adesso ho dei soldi mi sono preso
  una ASUS-SP4 con un P90 che mi da' delle prestazioni migliori sulla
  mia Mach32-PCI...  Se avessi avuto ancora piu' soldi mi sarei preso
  altri 16MB di RAM e una Mach64-PCI con 4M RAM, in ogni caso...
  Continuo a sognare :-)


  9.20.  Mike Frisch (mfrisch@saturn.tlug.org) Giga-Byte 486IM



    Motherboard: Giga-Byte 486IM

    Configurazione: 4 ISA slots (2 doppi VLB) & 4 slots PCI

    CPU: Intel 486DX/33

    BIOS: Award 4.50G

    controller dischi PCI EIDE : Giga-Byte GA-107 (CMD 640x PCI Multi-
     I/O)

    scheda video PCI : ATI Graphics eXpression PCI 2MB DRAM

    Linux Kernel: 1.2.9

    Distribuzione Linux: Slackware 2.2.0 altamente modificata

  Ho fatto andare questa scheda 24 ore su 24 per gli scorsi 5-6 mesi.
  Ha funzionato senza problemi sotto DOS/Windows, OS/2 Warp e Linux (con
  Linux che di solito ha girato 24 ore al giorno).



  9.21.  Karl Keyte (kkeyte@esoc.bitnet) Gigabyte GA586 Pentium


    Mainboard PCI/EISA Gigabyte GA586-ID 90MHz Pentium (dual processor,
     ne ho solo uno)
    32M RAM

    SCSI - no scsi-NCR-chip on-board, usando un Adaptec 1542C,

    PCI ATI GUP 2M VRAM

    Controller SCSI Adaptec 1742 EISA

    Soundblaster 16

    solito I/O


  Tutto sotto DOS E Linux funziona alla perfezione. Nessun problema in
  assoluto.  Una macchina VERAMENTE veloce! I benchmarks di BYTE per
  Unix la piazzano all'incirca allo stesso livello di una Sun
  SuperSPARC-20 con Solaris 2.3. Il PC e' piu' veloce nell'aritmetica
  intera e nel processing ( inclusi i context switching). La SPARC e'
  piu' veloce sul floating point e in uno dei benchmarks del disco.


  9.22.  kenf@clark.net con G/W 2000

  Egli usa un Gateway 2000 senza problemi eccetto per la scheda audio
  (quale?). Sta cercando di cambiarla con una Soundblaster originale
  sperando che questo li risolva.


  9.23.  Joerg Wedeck (jw@peanuts.informatik.uni-tuebingen.de) / ESCOM

  All'inizio ha comprato un 486 DX2/66 dalla ESCOM (che mainboard?) con
  IDE onboard e senza (!) chip NCR SCSI onboard.  Invece usa un
  controller scsi ISA-adaptec 1542cf, una spea v7 mercury lite (s3, PCI,
  1MB), ISA-Soundblaster-16, mitsumi-cdrom (il piu' lento).  Tutto a
  parte lo streamer funziona senza problemi.  La spea-v7 funziona
  perfettamente da XFree86(tm)-2.1

  Egli ha poi abbandonato la mainboard Intel a favore di una ASUS-SP3-g
  e ha qualche problema col burstmode PCI-to-Memory che si pianta solo
  su linux, " sembra un deadlock nello swapper". Se avete qualche
  informazione su questo per favore mandate una email al curatore di
  questo HOWTO.

  Dopo aver tolto l'opzione PCI-to-Memory tutto e' perfetto.

  Invece di mandargli della mail per favore leggete la sua home page a
  "http://wsiserv.informatik.uni-tuebingen.de/ jw" dove tiene anche
  delle informazioni sul suo sistema PCI.


  9.24.  Ulrich Teichert / ASUS


  ASUS-PCI mainboard con un AMD486dx40 (ma attualmente va a 33Mhz?!)  La
  sua ISA-ET3000 Optima 1024A funziona bene. Nessun problema con il
  disco rigido Quantum540S SCSI attaccato al chip NCR53c810 onboard.


  10.  Insuccessi e/o problemi



  10.1.  Sistemi Compaq PCI, specialmente Presario



  Patrick Yaner (p_yaner@eos.ncsu.edu) mi ha riportato una "specialita'"
  Compaq.  Pare che essi stiano mappando l'area del BIOS PCI in una
  oscura zona di memoria: una zona inaccessibile sia da Linux che da
  OS/2. I due sistemi la trovano, ma non riescono ad accederci e danno
  un messaggio del tipo "pcibios_init: entry in high memory area, unable
  to access" quando li si accende. Anche se questo e' un comportamento
  perfettamente accettabile per lo schermo (che e' sul bus PCI) e per il
  controller IDE (anche lui ), questo significa che un qualsiasi
  dispositivo PCI aggiuntivo ( come ad ex. una scheda Ethernet ) non
  puo' essere riconosciuto da Linux.

  Compaq offre un driver per DOS a
  ftp://ftp.compaq.com/pub/softpaq/Drivers/SP1116.ZIP

  Il problema di usare questa soluzione con Linux e' di dover usare
  loadlin per far partire Linux da DOS invece di usare il LILO. Notate
  che occasionalmente Compaq rilascia delle nuove versioni del suddetto
  file quindi ftp://ftp.compaq.com/pub/softpaq/allfiles.html ( oppure
  allfiles.txt ) vi puo' essere utile per controllare se non sia
  cambiato qualcosa.

  Stranamente queste informazioni si possono trovare nello SCSI HOWTO
  anche se i Presario sono equipaggiati con IDE di default.


  10.2.  VLSI Wildcat PCI chipset like in Zeos P120 box


  Paul Bame (bame@sde.hp.com) ha riportato:

  Il mio cdrom ATAPI e la mia scheda Ethernet 3c509 non sono state
  riconosciute fino a quando non ho disabilitato il Plug-and-Play come
  riportato dall' Ethernet HOWTO


  10.3.  hschmal@informatik.uni-rostock.de con SCSI-PCI-SC200


  Egli riporta che dopo aver messo quella scheda nella sua mainboard
  Pentium Linux non parte piu'. La mia prima idea e' che non e'
  supportata.


  10.4.  dmarples@comms.eee.strathclyde.ac.uk G/W 2000


  Gateway 2000 G/W 2000 4DX2/66 PCI ATI-Graphics-Ultra-Pro IDE di non si
  sa quale marca

  Funziona bene - l'unico problema e' che la scheda IDE funziona in
  modalita' compatibile ISA e va un bel po' piu' velocemente quando
  viene messa in modalita' PCI da un programma DOS... cosi' non e' poi
  cosi' veloce in Linux e una patch farebbe piacere.


  10.5.  cip574@wpax01.physik.uni-wuerzburg.de (Frank Hofmann) / ASUS


  Egli usa la sua motherboard ASUS con 16MB RAM, usa S3 928 ISA e il
  controller IDE onboard con un disco rigido Seagate ST4550A.  Non ha
  avuto problemi con i recenti kernel linux.

  Il suo problema:

       usando X il mio mouse non risponde piu' come prima. Talvolta e' dietro
       a dove dovrebbe essere e saltella se lo muovo troppo velocemente.
  Credo che questo sia stato discusso in un newsgroup Linux qualche
  tempo fa (non so quale) e dovrebbe essere causato dai chip seriali
  16550 che ci sono sulle interfacce seriali onboard. Dopo due settimane
  mi ci sono abituato :-)


  Ridurre la soglia (treshold) della 16550 dovrebbe aiutare. Dovrebbe
  esserci una patch per il setserial da qualche parte ma non so dove.



  10.6.  axel@avalanche.cs.tu-berlin.de (Axel Mahler) / ASUS


  ASUS PCI/I-486SP3 Motherboard (Award BIOS 4.50), 16 MB RAM il chip NCR
  on-Board NCR e' disabilitato, aveva una Genoa Phantom/W32 2MB per PCI
  e un Adaptec AHA-1542CF (BIOS v2.01) connesso a:

    un disco rigido IBM 1.05 GB

    un CDROM Toshiba XM4101-B

    uno streamer DAT HP (2GB)

  Quando si creava il filesystem, 'mke2fs' (0.4, v. 1.11.93) si bloccava
  e l'installazione era impossibile. Dopo aver rimpiazzato la Genoa
  Phantom/W32 2MB PCI con una ELSA Winner 1000 2MB PCI ha funzionato
  alla perfezione.  L'ha testato anche con una vecchia scheda VGA Eizo
  ISA e ha funzionato anche con quella cosi' probabilmente il problema
  era nella Genoa.


  10.7.  Frank Strauss (strauss@dagoba.escape.de) / ASUS

  ASUS SP3 Mainboard i486DX2/66 NCR53c810 disabilitato Adaptec 1542B in
  uno slot ISA con 2 dischi rigidi (200MB Maxtor, 420MB Fujitsu),
  SyQuest 88MB e uno streamer Tandberg ELSA Winner 1000 PCI, 1MB-VRAM
  Soundblaster Pro in uno slot ISA con IRQ 5 Onboard IDE disabilitato
  Onboard seriali, parallela, e controller Floppy abilitati

  Dopo un reset la macchina talvolta si blocca ( e' lo stesso resettare
  software e hardware) - questo probabilmente non e' causato
  dall'adaptec e dalla scheda audio perche' anche senza questo il
  sistema talvolta non parte. Se va comunque, (e se appare il messaggio
  della ELSA-WINNER-1000-PCI) va bene.

  Le due porte seriali sono giustamente identificate come 16550 ma
  durante alcune sessioni c'e' stata una grande perdita di dati col
  V42bis... Il problema sembra essere nell'hardware...


  CPU>-PCI-Burst sembra funzionare bene con DOS/MS-Windows

  CPU->PCI-Burst non funziona bene con linux0.99p15, Il computer si
  incasina quando cambio virtual console e si pianta completamente
  quando si eseguono programmi grandi come ghostview e xdvi lasciando
  pero' acceso il led SCSI (!)

  (Sospetto che queste applicazioni usino molto il CPU->PCI-burst a
  causa delle grandi quantita' di dati da trasmettere alla PCI-
  Winner-1000)


  Dopo aver disabilitato il CPU->PCI-Burst, funziona bene, la
  Winner-1000 a 1152x846 (not molta font cache con 1MB) fa 93k xstones.
  OpaqueMove con il twm e' piu' che sopportabile :-)
  Egli ha un SATURN.EXE che carica sotto DOS prima di far partire Linux,
  cosi' da usare il burst senza piantamenti...

  Alcuni hanno detto che questi problemi potrebbero sparire se si toglie
  la "sync negotiation" sull'Adaptec - Non so se questo sia possibile
  con anche l' adaptec1542B ma credo di si'.

  Con CPU->PCI-Burst la macchina tira fuori 95k xstones, cosi' egli
  considera che non sia poi un cosi' gran problema non usarlo. La sua
  unica grana e' che vorrebbe far andare la sua Winner-1000 a 1152x900,
  cosa, purtroppo, non fattibile dato che pare che qualsiasi risoluzione
  sopra i 1024 pixels viene portata a 1280 sprecando cosi' un sacco di
  spazio ma questo probabilmente non e' un problema connesso al PCI e
  dovrebbe essere scomparso con XFree86(tm)-2.1


  10.8.  egooch@mc.com / ASUS



    MAINBOARD ASUS PCI/I-486 SP3 RAM: 16MB (4x4M-SIMM)

    CPU            486DX33 CPU


    BIOS           Ver. 4.50 (12/30/93)

    Floppy         Two floppy drives (1.2 and 1.44), usando il
     controller floppy onboard

    provati due controller SCSI, il WD7000 e l'Adaptec 1542CF: entrambi
     hanno funzionato

    Due dischi rigidi SCSI 320M

    CDROM SCSI NEC84

    Streamer SCSI QIC150

    Video - Tseng ET4000 ISA

    Scheda audio PAS16

    Stampante attaccata alla parallela onboard.

  Per ora non ha niente negli slots PCI ma vorrebbe una scheda video
  PCI; attualmente sta usando un controller SCSI WD7000 ma si mettera' a
  usare il chip NCR onboard non appena uscira' il driver.

  Tutto ha funzionato perfettamente - la porta seriale numero uno, che
  ha attaccato un modem 14.4K, occasionalmente si blocca quando ci si
  riconnette con il modem dopo averlo usato in precedenza.  Egli dice
  che non e' una cosa collegata alla ASUS ma piuttosto un bug nel device
  SCM-LSI con la sua UART16550. Il mouse logitech seriale lavora bene
  sulla seconda porta. Poter abbassare il threshold sulla porta mouse
  aiuterebbe non poco, pare che uno debba avere un setserial modificato
  per poterlo fare. Non ho ancora le informazioni per questo, se ne
  sapete di piu' per favore contattatemi!


  10.9.  Stefan.Dalibor@informatik.uni-erlangen.de / GigaByte


    Mainboard - GA-486iS dalla Gigabyte con 256Kb L2-Cache, i486-DX2


    Bios - AMI, 93/8

    SCSI - niente chip scsi NCR on-board, sto usandol' Adaptec 1542C,

    Video - ELSA Winner 1000

    Linux 0.99pl14 + SCSI-Clustering-Patches / Slackware 1.1.1


  Tutto sembra funzionare bene ma non ha provato ne' la stampa, ne' la
  rete e neanche uno streamer fin'ora. Prima di applicare le patches per
  il clustering aveva qualche problema: la macchina si bloccava talvolta
  dopo il comando "find" ma ormai non succede piu' - forse era qualche
  bug del vecchio kernel.

  La ELSA-Winner-1000 talvolta si blocca con strani arabeschi sul video
  che se ne vanno solo resettando... Il venditore pretende che sia un
  bug nella scheda video ELSA ma il produttore pretende di aver risolto
  il problema. Il bug non si puo' riprodurre sempre e pertanto non pensa
  di farci niente per ora.

  Nonostante tutto la macchina sembra lavorare bene sotto pesanti
  applicazioni di elaborazione testi (emacs, LaTeX, xfig, ghostview).
  L'interazione e' sorprendentemente fluida e veloce, pochissima
  differenza con la 3 o 4 volte piu' cara workstation Sun su cui
  lavora...

  Il CPU->PCI-Burst e' disabilitato perche' il bios non supporta ancora
  bene le schede PCI ?

  E' venuto fuori un problema con il suo nuovo modem (v32 turbo): perde
  caratteri.  Specialmente quando si usa lo SLIP si lamenta molto a
  causa di errori di TX e RX.  Non appena parte X diventa
  inutilizzabile. Egli dice che ha attivato il FIFO e l'RTS/CTS con stty
  ma senza apprezzabili cambiamenti...



  10.10.  Steve Durst (sdurst@burns.rl.af.mil) with UMC 8500 mainboard

  Usando Linux 1.2.12 su una motherboard UMC9500-100MHz con il temuto
  controller EIDE CMD PCIO640B egli nota delle ondulazioni dello schermo
  per alcuni secondi dopo l'accensione del computer.  E' come se la sua
  scheda video Diamond Stealth 64 (S3 864) si dovesse riscaldare un po'
  prima di funzionare bene. Comunque sia dice di poter sopravvivere a
  questo difetto.


  10.11.  Tom Drabenstott (tldraben@Teleport.Com) con il Comtrade /
  PCI48IX


  PCI48IX Motherboard Rev. 1.0. Documentazione non si sa di chi con
  copyright della "exrc". Il BIOS non dice molto sul PCI.

  Il suo controller ISA E-315E Super IDE UMC (863+865) ha proprio dei
  problemi ( e' una scheda controller multifunzione).  Sembra funzionare
  bene con DOS/OS2 ma non con Linux.


  11.  Suggerimenti generali per leMotherboard PCI + Linux NCR PCI SCSI


  Questo e' stato compilato da Angelo Haritsis (ah@doc.ic.ac.uk) grazie
  ai post di molta gente:

  11.1.  DA NON FARE:


  NON cercatevi delle motherboard che hanno sia slot PCI che VLB. Di
  solito hanno un sacco di problemi. Prendetevi una normalissima
  versione solo PCI (con ovviamente gli slots ISA).  Un sacco di brutte
  voci girano sulle motherboard PCI col chipset OPTi.  Qualcuno
  consiglia: "Evitate le motherboards basate sul chipset OPTi
  (82C596/82C597/82C822) come la TMC PCI54PV".

  ( Io conosco almeno una persona che non ha avuto problemi con la sua
  TMC-PCI54PV. Ha dovuto soltanto mettere la sua scheda aggiuntiva
  NCR53c810 nello slot A che sembra sia l'unico a supportare il
  busmastering).

  Si dice che le motherboards col chipset Intel PCI abbiano dei problemi
  con piu' di una scheda PCI busmastering. Questa non l'ho verificata
  sulla mia e non ho niente da consigliare. Ho anche sentito che il
  chipset Saturn II ha dei problemi ma questo e' quello che uso io ed e'
  perfetto! Consiglio: tentate di negoziare un accordo con il vostro
  negoziante cosi' che se avete dei problemi vi ritiri la merce e vi
  restituisca i soldi (un po' dura la restituzione da noi per motivi
  fiscali, io consiglierei di pagargliela DOPO averla provata per almeno
  una settimana...(N.d.T.))


  11.2.  banchi SIMM


  Prendetevi delle motherboard con solo slot per SIMM a 72pin per la
  velocita': la maggior parte (tutte?) di quelle che accettano quelle da
  30 pin usano un metodo di accesso alla memoria a 32 bit che e'
  sensibilmente piu' lento di quello interlacciato a 64 bit delle
  motherboard della Intel. Tenetevelo a mente.


  11.3.  Motherboard PCI Pentium che hanno ricevuto lodi

  La motherboard Intel P90 con il chipset Premiere II (i.e. Plato).
  Prendetevi il BIOS piu' recente che ha il BIOS NCR scsi 3.04.00.
  Altrimenti il DOS non riuscira' a vedere i vostri dischi scsi se usate
  un controller BIOS-less 53c810. Il BIOS NCR SCSI esiste nell'AMI BIOS
  della Plato dopo la versione 1.00.08 ( o forse 1.00.06 ). Questo BIOS
  e' upgradabile (su flash rom) cosi' dovreste essere in grado di
  ricevere l'upgrade su un dischetto dal vostro rivenditore. La versione
  corrente e' la 1.00.10 in cui sono stati rimossi tutti i problemi di
  gioventu'.

  (I files del Bios dovrebbero essere disponibili a
  ftp.demon.co.uk:/pub/ibmpc/intel, ma non l'ho controllato
  personalmente. (N.d.A))


  11.4.  Linee di irq


  I valori nel registro di configurazione PCI per la linea di interrupt
  e' di solito modificabile manualmente (per compatibilita' con le
  motherboards ISA legacy) nello schermo dell' Extended CMOS Setup su
  una base sia per slot che per dispositivo. Le piu' vecchie
  motherboards PCI vi obbligheranno anche a mettere dei jumper per ogni
  slot PCI in cui scegliere come gli INTA e forse B/C/D del PCI sono
  mappati sulla linea di IRQ dell'8529. Ovviamente, se questi jumpers
  esistono sulla vostra motherboard dovrete metterli concordemente a
  quanto avete specificato nel setup CMOS.  Notate anche che in alcune
  motherboards, come ad esempio nella Viglens, i manuali e le serigrafie
  dicono cose diverse a proposito delle posizioni in cui mettere i
  jumper e pertanto qualche esperimento potrebbe rendersi necessario.


  11.5.  Informazioni sulle differenti famiglie dei chip scsi NCR 8xx :


  Tutti gli NCR 8XX sono dei chip connessi direttamente al bus PCI che
  usano il busmastering e pertanto non comportano differenze di
  prestazioni siano essi sulla motherboard o su una scheda di
  espansione. Tutti i dispositivi rispettano le specifiche PCI 2.0 e
  possono inviare dati alla piena velocita' di 33MHz (133MBytes/sec)


  11.5.1.  53C810

  53C810 = 8 bit Fast SCSI-2 (10 MB/Sec) soltanto Single ended Richiede
  un BIOS integrato sulla motherboard e viene in un 100 pin Quad Flat
  Pack (PQFP) Primo chip a livello mondiale per SCSI PCI, le quantita'
  prodotte lo rendono il meno caro.


  11.5.2.  53C815

  53C815 = 8 bit Fast SCSI-2 (10 MB/Sec) soltanto Single Ended Supporta
  l'interfacciamento con ROM BIOS il che lo rende ideale per le schede
  di espansione aggiuntive. 128 Pin QFP


  11.5.3.  53C825

  53C825 = 8 bit Fast SCSI-2, sia Single ended che Differential 16 bit
  Fast SCSI-2 (20 MB/Sec), Single ended o Differential Ha anche il
  supporto per le Rom esterne che lo rende un buon candidato per le
  schede di espansione. 160Pin QFP. Non ancora supportato da Linux. (
  vedetevi il capitolo seguente per le notizie sull'825). Devono esserci
  connesse periferiche wide e/o differential per poter usare queste
  caratteristiche.


  11.6.  Il futuro dei 53c8xx

  Ci sono quattro nuovi dispositivi il cui annuncio e' programmato verso
  la fine di quest'anno e l'inizio del prossimo. La loro 'impronta'
  (i.e. li potete mettere in uno 'zoccolo' precedente ( sono, credo,
  SMD) senza riprogettarlo (N.d.T.)) e' compatibile con quella dell'810
  e dell'825 con alcune nuove caratteristiche.

  Tutti i chips necessitano di un BIOS nelle applicazioni DOS-Intel.
  L'810 e' l'unico chip che deve essere messo direttamente sulla
  motherboard.  L'ultima versione del BIOS SCSI NCR e' la 3.04.00 e
  supporta dischi piu' grandi di 1GB ( fino a 8GB ) sotto DOS.


  11.7.  Prestazioni del 53c810

  I benchmark DOS della rivista C't hanno mostrato che e'
  significativamente piu' veloce del Buslogic BT-946, un utente ha
  notato un incremento di prestazioni di circa il 10%-15% rispetto a un
  Adaptec 2940 e, con un disco veloce, puo' essere anche 2 volte e mezzo
  piu' performante di un Adaptec 1540.





  12.  Notizie sul supporto dell' NCR53c825

  Funziona. fine del discorso.


  12.1.  Frederic POTTER (Frederic.Potter@masi.ibp.fr) sul problema
  della striscia su Pentium+NCR

  Su alcune motherboard Intel Plato il bios NCR non riesce a riconoscere
  la scheda perche' gli servirebbe vederla come un controller SCSI
  secondario ma sulla maggior parte delle schede SCSI il jumper per
  scegliere tra primario e secondario e' stato saldato su primario (
  probabilmente per risparmiare due lire).

  Soluzione:

  Vicino al chip NCR ci sono tre via (tipo buchi) con una striscia messa cosi'


                  O--O  O

  questo vuol dire che primario e' il settaggio predefinito. Per la <sf/mainboard/
  Intel Plato invece dovrebbe essere messo cosi'

                  O  O--O

  La soluzione migliore e' liberarsi della striscia e metterci invece un jumper a
  due posizioni.




  12.2.  PCIprobe negli ultimi kernel Linux Kernels di Frederic Potter


  Frederic Potter ha aggiunto una PCI-Probe nei kernel piu' recenti. Se
  provate a fare un "cat /proc/pci" dovreste vedere listate tutte le
  vostre schede. Se ne avete che non vengono riconosciute per piacere
  contattatelo via mail a which are not properly recogniced, please
  contact him via mail as "Frederic.Potter@masi.ibp.fr".

  Date un'occhiata ad arch/i386/kernel/bios32.c e ad include/linux/pci.h
  nel sorgente del kernel per maggiori informazioni sul PCI-Probe.


  12.3.  Altre componenti PCI


  Quali altre componenti PCI sono supportate ? A parte varie schede
  grafiche, mi piacerebbe avere notizie di altre schede, come Ethernet,
  FrameGrabbers o le schede della TSET che la Cyclades ha in Beta
  Testing al momento.


  12.3.1.  Cyclades: una scheda a 16 porte PCI basata su un microproces
  sore RISC.


  Il prodotto si chiama Cyclom-Ye e ha le seguenti caratteristiche:


    Scheda PCI basata sul chipset PLX. Questa scheda supporta da 8 a 32
     porte seriali, usando dei box esterni da 8 o 16 porte.

    Cavo SCSI II.

    Box esterni da 8 o 16 porte con dei connettori RJ45 o DB25 ( a
     scelta vostra). Potete iniziare con otto porte ed espanderla in
     seguito a 32 con la sola aggiunta di uno o piu' box. Ognuno di essi
     contiene due o quattro controllers seriali RISC CD-1400 (ognuno di
     essi controlla 4 porte).

    Fino a quattro schede possono essere installate in un PC cosi' da
     supportare un massimo di 128 porte contemporaneamente.

  Il prodotto e' attualmente nella fase di Beta Test (26 Luglio 1995) e
  dovrebbe essere disponibile nei dintorni di ottobre. Se siete
  interessati mandate loro un mail a sales@cyclades.com.


  13.  Conclusione


  Se avete un po' di soldi da mettere nella vostra macchina dovreste
  essere a posto con una ASUS-SP4 e un Pentium a 90MHz, che e' quello
  che sto usando io al momento. Se potete permetterveli, 32MB di RAM
  sono decisamente meglio di 16.

  Tra pochissimo tempo lo standard sara' dato dal chipset Triton con il
  supporto per delle speciali SIMM che si chiamano EDORAM ed SRAM.
  Entrambe saranno piu' care della RAM PS2; al momento in cui scrivo
  questo (28 Giugno 1995) le SRAM non sono ancora disponibili. Anche se
  le EDORAM  sono piu' care, non lo sono sicuramente per i costi di
  produzione che si dice siano gli stessi. ( e i costi di progetto dove
  li mettiamo ? doranno pure ammortizzarli... (N.d.T.))

  Dato che tutto questo e' abbastanza nuovo ed evolvera' moltissimo, per
  una macchina ad alte prestazioni io sceglierei l' ASUS-TP4XE che
  supporta le EDORAM/SRAM ma se non vi serve proprio adesso io
  aspetterei...  ((N.d.T.) Per quello che ne so io conviene una
  motherboard che supporti le EDORAM-SRAM pero' se vi comprate una
  motherboard di questo tipo e investite soldi nelle SIMM normali non ne
  vale manco la pena ERGO io aspetterei per lo meno dicembre gennaio
  affinche' queste nuove RAM si conoscano meglio, oggi come oggi (
  27-07-95 ) le EDORAM sono a 45ns e ci si aspetta che le SRAM vadano
  ancora meglio quindi la differenza tra i 256 e i 512 kappa di cache
  non si dovrebbe sentire in modo cosi' determinante ( anche se una
  buona cache e' pur sempre sui 15ns ).(N.d.T.))

  Per le schede video direi che la migliore scheda economica adatta a un
  buon monitor multisync da 15 pollici tipo il Samsung SyncMaster 15Gli
  ( io ho il SONY CPD 15sf che , per me, e' il migliore 15 pollici sul
  mercato...(N.d.T.)) e' la SPEA V7 Mirage P64 con Chipset Trio64 e 2MB
  DRAM.  Per monitor piu' sofisticati come lo Iiyama-IDEK 8617A-T credo
  che la PCI Mach64 ATI-GUP-Turbo (non la piu' economica GUP-Turbo-
  Windows) sia un'ottima scelta, con 4MB VRAM potete avere il truecolor
  anche nelle risoluzioni piu' alte.  E' ben supportata in
  XFree86(tm)-3.1.1 e ci sono dei server X commerciali tra i quali io
  raccomanderei Accelerated/X della Roell, che supporta la Mach64 molto
  bene e con grandi prestazioni velocistiche.



  Per lo SCSI io prenderei la DPT al posto della (estremamente piu'
  economica e velocissima) NCR53c810 se prevedete di usare molto degli
  streamer SCSI.  Come gia' detto prima, il driver per la NCR di Linux
  non supporta il disconnect/reconnect bloccando quindi il bus SCSI su
  operazioni del tipo "mt rewind", "mt fsf" etc. Comporta una penalita'
  nelle prestazioni sulle operazioni di tar.  Date comunque un'occhiata
  ai nuovi drivers prima di prendere una decisione, puo' darsi che
  risolvano il problema...

  Per costruire un server la DPT sarebbe ugualmente il controller di
  riferimento a causa di tutta la sua bella cache hardware ( che ha un
  discreto algoritmo di sort cosi' che la cache non e' una cosa campata
  per aria anche con un ambiente di tipo Linux dove e' il sistema
  operativo a gestirla di solito) e del supporto RAID fino al livello 5.

  Se non volete spendere cosi' tanti soldi in materiale per computer
  (i.e. avete anche una vita oltre al computer) potreste prendere una
  una ASUS-SP3-SiS con un AMD-DX2/66 o DX4/100. La SPEA V7 Mirage P64
  PCI con 2M DRAM dovrebbe essere una buona scelta dato che usa il
  chipset Trio64 S3 che e' ben supportato da XFree86(tm)-3.1.1, e' anche
  molto economica e veloce.

  Un'altra bella scheda video dall'XFree86(tm)-3.1 e' la veloce e poco
  costosa et4000/w32 PCI.


  14.  Ringraziamenti.

  Vorrei ringraziare le seguenti persone per aver supportato il seguente
  documento:

    David Lesher (wb8foz@netcom.com) per estensivi aiuti con l'inglese.

    Nathanael MAKAREVITCH (nat@nataa.frmug.fr.net) per la traduzione in
     francese

    Jun Morimoto (morimoto@lab.imagica.co.jp) per la traduzione in
     giapponese

    Marco Melgazzi (marco@techie.com) per la traduzione in italiano

    Donald Becker (becker@cesdis.gsfc.nasa.gov) per informazioni
     sull'ethernet

    Drew Eckhardt (drew@kinglear.cs.Colorado.EDU) per informazioni
     sullo SCSI

    Zhahai Stewart (zhahai@hisys.com) per l'aiuto nella sezione
     introduttiva

  e molte piu' persone che hanno dato informazioni per la maggior parte
  via email e articoli usenet, alcuni di essi verranno nominati qui:























  CARSTEN@AWORLD.aworld.de,
  dmarples@comms.eee.strathclyde.ac.uk,
  drew@kinglear.cs.Colorado.EDU (Working at the PCI-NCR53c810-Driver),
  duncan@spd.eee.strathclyde.ac.uk,
  fm3@irz.inf.tu-dresden.de,
  grif@ucrengr.ucr.edu,
  heinrich@zsv.gmd.de,
  hm@ix.de (iX-Magazine),
  hm@seneca.ix.de,
  kebsch.pad@sni.de,
  kenf@clark.net,
  matthias@penthouse.boerde.de,
  ortloff@omega.informatik.uni-dortmund.de,
  preberle@cip.informatik.uni-erlangen.de,
  rob@me62.lbl.gov,
  rsi@netcom.com,
  sk001sp@unidui.uni-duisburg.de,
  strauss@dagoba.escape.de,
  strauss@dagoba.priconet.de,
  hi86@rz.uni-karlsruhe.de,
  Ulrich Teichert, krypton@netzservice.de,
  Stefan.Dalibor@informatik.uni-erlangen.de,
  tldraben@teleport.com
  mundkur@eagle.ece.uci.edu,
  ooch@jericho.mc.com,
  Gert Doering (gert@greenie.muc.de),
  James D. Levine (jdl@netcom.com),
  Georg von Below (gbelow@pmail.sams.ch),
  Jerome Meyers (jeromem@quake.xnet.com),
  Angelo Haritsis (ah@doc.ic.ac.uk),
  archie@CS.Berkeley.EDU and his friend kenf@clark.net.




  15.  copyright/informazioni legali

  (c)opyright 1993,94 di Michael Will - la GPL (Gnu Public License) vale
  per questo documento. Date un'occhiata all'ultima sezione per essa.

  Se vendete questo HOWTO su un CD o su un libro mi piacerebbe veramente
  tanto poterne ricevere una copia per riferimento.


  (Michael.Will@student.uni-tuebingen.de)

  Conttatemi o via eMail or chiamate +49-7071-969063.

  I marchi registrati sono proprieta' dei rispettivi propietari. Non ci
  sono garanzie sulle informazioni contenute in questo documento.

  Per gli utenti tedeschi offro macchine PCI
  testate/preinstallate/preconfigurate con Linux (con supporto tecnico).
  Chiamatemi allo 07071-969063.

   se invece volete contattare me, il vostro beneamato traduttore in
  Italiano, potete scrivere a marco@techie.com: quanto ha detto l'Autore
  a proposito delle copie di riferimento vale anche per me comunque :^)


  16.  Elenco dei termini inglesi non tradotti nel testo

  Se ci sono altri termini che non capite mandatemi un mail e li
  mettero' nella prossima versione:


    bus mastering e' il modo in cui una scheda puo' prendere il
     controllo del bus per aumentare le proprie prestazioni.

    motherboard e' la piastra madre, ovvero dove risiede la CPU e dove
     ci sono gli slot PCI

    on-board e' qualcosa integrato direttamente sulla piastra madre

    probe e' un pezzo di codice che cerca di capire il tipo di
     periferica attaccata, sia essa un CD-ROM, un disco rigido, una
     scheda PCI etc. etc.

    patch e' una correzione a un programma che, in ambito Linux, di
     solito e' distribuita come un file a se' stante da applicare con un
     comando del tipo  patch - p0 < patch_file. Conviene comunque
     attenersi alle istruzioni di chi ha creato il programma in
     questione :-)


  17.  La GPL - Gnu Public License


  Se qualcuno con esperienze legali ha voglia di tradursela mi contatti
  pure, per ora lascero' la versione originale inglese. In soldoni il
  software distribuito sotto questa licenza DEVE contenere il codice
  sorgente: il copyright resta a chi lo scrive ma, se viene dato
  credito, esso puo' essere usato come base per altri progetti SOTTO LA
  STESSA LICENZA. Da quello che ho capito, comunque, e' anche possibile
  uno sfruttamento commerciale da parte di terzi del prodotto: se
  qualche frequentatore del newsgroup GPL mi puo' dare un aiuto gli-le
  sarei grato!



































                      GNU GENERAL PUBLIC LICENSE
                         Version 2, June 1991

   Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                            675 Mass Ave, Cambridge, MA 02139, USA
   Everyone is permitted to copy and distribute verbatim copies
   of this license document, but changing it is not allowed.

                              Preamble

    The licenses for most software are designed to take away your
  freedom to share and change it.  By contrast, the GNU General Public
  License is intended to guarantee your freedom to share and change free
  software--to make sure the software is free for all its users.  This
  General Public License applies to most of the Free Software
  Foundation's software and to any other program whose authors commit to
  using it.  (Some other Free Software Foundation software is covered by
  the GNU Library General Public License instead.)  You can apply it to
  your programs, too.

    When we speak of free software, we are referring to freedom, not
  price.  Our General Public Licenses are designed to make sure that you
  have the freedom to distribute copies of free software (and charge for
  this service if you wish), that you receive source code or can get it
  if you want it, that you can change the software or use pieces of it
  in new free programs; and that you know you can do these things.

    To protect your rights, we need to make restrictions that forbid
  anyone to deny you these rights or to ask you to surrender the rights.
  These restrictions translate to certain responsibilities for you if you
  distribute copies of the software, or if you modify it.

    For example, if you distribute copies of such a program, whether
  gratis or for a fee, you must give the recipients all the rights that
  you have.  You must make sure that they, too, receive or can get the
  source code.  And you must show them these terms so they know their
  rights.

    We protect your rights with two steps: (1) copyright the software, and
  (2) offer you this license which gives you legal permission to copy,
  distribute and/or modify the software.

    Also, for each author's protection and ours, we want to make certain
  that everyone understands that there is no warranty for this free
  software.  If the software is modified by someone else and passed on, we
  want its recipients to know that what they have is not the original, so
  that any problems introduced by others will not reflect on the original
  authors' reputations.

    Finally, any free program is threatened constantly by software
  patents.  We wish to avoid the danger that redistributors of a free
  program will individually obtain patent licenses, in effect making the
  program proprietary.  To prevent this, we have made it clear that any
  patent must be licensed for everyone's free use or not licensed at all.

    The precise terms and conditions for copying, distribution and
  modification follow.

                      GNU GENERAL PUBLIC LICENSE
     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

    0. This License applies to any program or other work which contains
  a notice placed by the copyright holder saying it may be distributed
  under the terms of this General Public License.  The "Program", below,
  refers to any such program or work, and a "work based on the Program"
  means either the Program or any derivative work under copyright law:
  that is to say, a work containing the Program or a portion of it,
  either verbatim or with modifications and/or translated into another
  language.  (Hereinafter, translation is included without limitation in
  the term "modification".)  Each licensee is addressed as "you".

  Activities other than copying, distribution and modification are not
  covered by this License; they are outside its scope.  The act of
  running the Program is not restricted, and the output from the Program
  is covered only if its contents constitute a work based on the
  Program (independent of having been made by running the Program).
  Whether that is true depends on what the Program does.

    1. You may copy and distribute verbatim copies of the Program's
  source code as you receive it, in any medium, provided that you
  conspicuously and appropriately publish on each copy an appropriate
  copyright notice and disclaimer of warranty; keep intact all the
  notices that refer to this License and to the absence of any warranty;
  and give any other recipients of the Program a copy of this License
  along with the Program.

  You may charge a fee for the physical act of transferring a copy, and
  you may at your option offer warranty protection in exchange for a fee.

    2. You may modify your copy or copies of the Program or any portion
  of it, thus forming a work based on the Program, and copy and
  distribute such modifications or work under the terms of Section 1
  above, provided that you also meet all of these conditions:

      a) You must cause the modified files to carry prominent notices
      stating that you changed the files and the date of any change.

      b) You must cause any work that you distribute or publish, that in
      whole or in part contains or is derived from the Program or any
      part thereof, to be licensed as a whole at no charge to all third
      parties under the terms of this License.

      c) If the modified program normally reads commands interactively
      when run, you must cause it, when started running for such
      interactive use in the most ordinary way, to print or display an
      announcement including an appropriate copyright notice and a
      notice that there is no warranty (or else, saying that you provide
      a warranty) and that users may redistribute the program under
      these conditions, and telling the user how to view a copy of this
      License.  (Exception: if the Program itself is interactive but
      does not normally print such an announcement, your work based on
      the Program is not required to print an announcement.)

  These requirements apply to the modified work as a whole.  If
  identifiable sections of that work are not derived from the Program,
  and can be reasonably considered independent and separate works in
  themselves, then this License, and its terms, do not apply to those
  sections when you distribute them as separate works.  But when you
  distribute the same sections as part of a whole which is a work based
  on the Program, the distribution of the whole must be on the terms of
  this License, whose permissions for other licensees extend to the
  entire whole, and thus to each and every part regardless of who wrote it.

  Thus, it is not the intent of this section to claim rights or contest
  your rights to work written entirely by you; rather, the intent is to
  exercise the right to control the distribution of derivative or
  collective works based on the Program.

  In addition, mere aggregation of another work not based on the Program
  with the Program (or with a work based on the Program) on a volume of
  a storage or distribution medium does not bring the other work under
  the scope of this License.
    3. You may copy and distribute the Program (or a work based on it,
  under Section 2) in object code or executable form under the terms of
  Sections 1 and 2 above provided that you also do one of the following:

      a) Accompany it with the complete corresponding machine-readable
      source code, which must be distributed under the terms of Sections
      1 and 2 above on a medium customarily used for software interchange; or,

      b) Accompany it with a written offer, valid for at least three
      years, to give any third party, for a charge no more than your
      cost of physically performing source distribution, a complete
      machine-readable copy of the corresponding source code, to be
      distributed under the terms of Sections 1 and 2 above on a medium
      customarily used for software interchange; or,

      c) Accompany it with the information you received as to the offer
      to distribute corresponding source code.  (This alternative is
      allowed only for noncommercial distribution and only if you
      received the program in object code or executable form with such
      an offer, in accord with Subsection b above.)

  The source code for a work means the preferred form of the work for
  making modifications to it.  For an executable work, complete source
  code means all the source code for all modules it contains, plus any
  associated interface definition files, plus the scripts used to
  control compilation and installation of the executable.  However, as a
  special exception, the source code distributed need not include
  anything that is normally distributed (in either source or binary
  form) with the major components (compiler, kernel, and so on) of the
  operating system on which the executable runs, unless that component
  itself accompanies the executable.

  If distribution of executable or object code is made by offering
  access to copy from a designated place, then offering equivalent
  access to copy the source code from the same place counts as
  distribution of the source code, even though third parties are not
  compelled to copy the source along with the object code.

    4. You may not copy, modify, sublicense, or distribute the Program
  except as expressly provided under this License.  Any attempt
  otherwise to copy, modify, sublicense or distribute the Program is
  void, and will automatically terminate your rights under this License.
  However, parties who have received copies, or rights, from you under
  this License will not have their licenses terminated so long as such
  parties remain in full compliance.

    5. You are not required to accept this License, since you have not
  signed it.  However, nothing else grants you permission to modify or
  distribute the Program or its derivative works.  These actions are
  prohibited by law if you do not accept this License.  Therefore, by
  modifying or distributing the Program (or any work based on the
  Program), you indicate your acceptance of this License to do so, and
  all its terms and conditions for copying, distributing or modifying
  the Program or works based on it.

    6. Each time you redistribute the Program (or any work based on the
  Program), the recipient automatically receives a license from the
  original licensor to copy, distribute or modify the Program subject to
  these terms and conditions.  You may not impose any further
  restrictions on the recipients' exercise of the rights granted herein.
  You are not responsible for enforcing compliance by third parties to
  this License.

    7. If, as a consequence of a court judgment or allegation of patent
  infringement or for any other reason (not limited to patent issues),
  conditions are imposed on you (whether by court order, agreement or
  otherwise) that contradict the conditions of this License, they do not
  excuse you from the conditions of this License.  If you cannot
  distribute so as to satisfy simultaneously your obligations under this
  License and any other pertinent obligations, then as a consequence you
  may not distribute the Program at all.  For example, if a patent
  license would not permit royalty-free redistribution of the Program by
  all those who receive copies directly or indirectly through you, then
  the only way you could satisfy both it and this License would be to
  refrain entirely from distribution of the Program.

  If any portion of this section is held invalid or unenforceable under
  any particular circumstance, the balance of the section is intended to
  apply and the section as a whole is intended to apply in other
  circumstances.

  It is not the purpose of this section to induce you to infringe any
  patents or other property right claims or to contest validity of any
  such claims; this section has the sole purpose of protecting the
  integrity of the free software distribution system, which is
  implemented by public license practices.  Many people have made
  generous contributions to the wide range of software distributed
  through that system in reliance on consistent application of that
  system; it is up to the author/donor to decide if he or she is willing
  to distribute software through any other system and a licensee cannot
  impose that choice.

  This section is intended to make thoroughly clear what is believed to
  be a consequence of the rest of this License.

    8. If the distribution and/or use of the Program is restricted in
  certain countries either by patents or by copyrighted interfaces, the
  original copyright holder who places the Program under this License
  may add an explicit geographical distribution limitation excluding
  those countries, so that distribution is permitted only in or among
  countries not thus excluded.  In such case, this License incorporates
  the limitation as if written in the body of this License.

    9. The Free Software Foundation may publish revised and/or new versions
  of the General Public License from time to time.  Such new versions will
  be similar in spirit to the present version, but may differ in detail to
  address new problems or concerns.

  Each version is given a distinguishing version number.  If the Program
  specifies a version number of this License which applies to it and "any
  later version", you have the option of following the terms and conditions
  either of that version or of any later version published by the Free
  Software Foundation.  If the Program does not specify a version number of
  this License, you may choose any version ever published by the Free Software
  Foundation.

    10. If you wish to incorporate parts of the Program into other free
  programs whose distribution conditions are different, write to the author
  to ask for permission.  For software which is copyrighted by the Free
  Software Foundation, write to the Free Software Foundation; we sometimes
  make exceptions for this.  Our decision will be guided by the two goals
  of preserving the free status of all derivatives of our free software and
  of promoting the sharing and reuse of software generally.

                              NO WARRANTY

    11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  REPAIR OR CORRECTION.

    12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGES.

                       END OF TERMS AND CONDITIONS

          Appendix: How to Apply These Terms to Your New Programs

    If you develop a new program, and you want it to be of the greatest
  possible use to the public, the best way to achieve this is to make it
  free software which everyone can redistribute and change under these terms.

    To do so, attach the following notices to the program.  It is safest
  to attach them to the start of each source file to most effectively
  convey the exclusion of warranty; and each file should have at least
  the "copyright" line and a pointer to where the full notice is found.

      <one line to give the program's name and a brief idea of what it does.>
      Copyright (C) 19yy  (name of author)

      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 2 of the License, or
      (at your option) any later version.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
      along with this program; if not, write to the Free Software
      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  Also add information on how to contact you by electronic and paper mail.

  If the program is interactive, make it output a short notice like this
  when it starts in an interactive mode:

      Gnomovision version 69, Copyright (C) 19yy name of author
      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
      This is free software, and you are welcome to redistribute it
      under certain conditions; type `show c' for details.

  The hypothetical commands `show w' and `show c' should show the appropriate
  parts of the General Public License.  Of course, the commands you use may
  be called something other than `show w' and `show c'; they could even be
  mouse-clicks or menu items--whatever suits your program.

  You should also get your employer (if you work as a programmer) or your
  school, if any, to sign a "copyright disclaimer" for the program, if
  necessary.  Here is a sample; alter the names:

    Yoyodyne, Inc., hereby disclaims all copyright interest in the program
    `Gnomovision' (which makes passes at compilers) written by James Hacker.

    (signature of Ty Coon), 1 April 1989
    Ty Coon, President of Vice

  This General Public License does not permit incorporating your program into
  proprietary programs.  If your program is a subroutine library, you may
  consider it more useful to permit linking proprietary applications with the
  library.  If this is what you want to do, use the GNU Library General
  Public License instead of this License.


























































  Linux PPP HOWTO
  Robert Hart, hartr@interweft.com.au
  v3.0, 31 Marzo 1997 --- Traduzione v1.1, 4 Giugno 1998

  Questo documento illustra come connettere sotto Linux il proprio PC a
  un server PPP, come usare PPP per collegare assieme due LAN e fornisce
  un metodo per configurare come server PPP il proprio computer con
  Linux. Il documento inoltre fornisce dell'aiuto per il debug di con
  nessioni PPP non funzionanti.  Traduzione di Giovanni Bortolozzo,
  borto@pluto.linux.it.


  Copyright

  Questo documento  distribuito sotto i termini della GPL (GNU Public
  License).


  Distribuzione


  Questo documento sar postato su comp.os.linux.answers appena ne sar
  prodotta una nuova versione.   disponibile anche in formato HTML a:


    Linux Howto Index <http://sunsite.unc.edu/mdw/linux.html#howto>

    PPP-HOWTO <http://www.interweft.com.au/other/ppp-howto/ppp-
     howto.html>


  Altri formati (SGML, ASCII, PostScript, DVI) sono disponibili da
  Howtos - other formats
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats>.


  Poich sunsite.unc.edu supporta un carico gi molto elevato, si prega
  di usare il mirror pi vicino.


  Ringraziamenti


  Un crescente numero di persone mi ha fornito assistenza nella
  preparazione di questo documento. Un ringraziamento particolare va a
  Al Longyear per la guida sul PPP stesso (se qui ci sono errori sono
  miei e non suoi), a Greg Hankins (il manutentore del sistema di HOWTO
  di Linux) e a Debi Tackett (della MaximumAccess.com) per molti
  suggerimenti utili sullo stile, contenuto, ordine, logica e chiarezza
  delle spiegazioni.


  Infine, a quanti mi hanno contattato via email offrendomi commenti,
  vanno i miei ringraziamenti. Come per tutti gli autori di HOWTO, la
  soddisfazione di aiutare  tutto il compenso che riceviamo ed 
  abbastanza. Scrivendo questo HOWTO sto ripagando in minima parte il
  debito che io - e tutti gli altri utenti di Linux - abbiamo verso
  quanti scrivono e mantengono il SO da noi scelto.


  Note sulla traduzione


  La traduzione di questo documento  opera mia e di un momento di
  pazzia: non mi ero reso conto che fosse cos lungo :-).

  L'ultima versione, insomma quella che ha la pretesa di essere la pi
  aggiornata e corretta, di questa traduzione la troverete sempre
  (spero) nei vari siti che fanno da mirror al progetto ILDP del Pluto (
  <http://www.pluto.linux.it/ildp/>).

  Data la lunghezza di questo documento dentro ci saranno sicuramente
  errori, frasi incomprensibili, e tutto lo schifo che la mia mente,
  sfruttando gli ultimi neuroni buoni, pu produrre quando  stanca.
  Quindi tutte le porcherie che troverete sono colpa mia e vi invito
  (anzi se potessi vi obbligherei) a farmele notare, a spedirmi
  correzioni, diff, consigli ecc.

  Ringrazio in anticipo chiunque mi segnaler tali errori, ed un
  ringraziamento particolare va a Paolo Farinelli, che gentilmente si 
  preso l'onere di rivedere tutta la mia traduzione e senza del quale vi
  trovereste fra le mani una inutile accozzaglia di cavolate ed errori.
  Grazie Paolo! Avanzi una birra! :)

  A tutti, buona (lunga) lettura.


  1.  Introduzione

  Il PPP (Point to Point Protocol)  un meccanismo per creare ed usare
  IP (Internet Protocol) ed altri protocolli di rete su di una linea
  seriale - sia essa una connessione seriale diretta (usando un cavo
  null-modem) su di una connessione stabilita con telnet, oppure una
  connessione fatta tramite modem e linee telefoniche (e usando
  naturalmente anche linee digitali come ISDN).


  Usando PPP, si pu connettere il proprio PC Linux ad un server PPP ed
  accedere alle risorse della rete alla quale  connesso il server
  (quasi) come si fosse connessi direttamente a quella rete.


  Inoltre si pu configurare il proprio PC Linux come server PPP,
  cosicch gli altri computer possano collegarsi, effettuando una
  richiesta di connessione (dial in), al vostro computer ed accedere
  alle risorse di quest'ultimo e/o della rete a cui  connesso.


  Poich PPP  un sistema peer-to-peer (``da pari a pari''), si pu
  usare PPP su due PC Linux per connettere assieme due reti (o una rete
  locale con Internet), creando una Wide Area Network (WAN).


  Una delle differenze sostanziali tra PPP e una connessione Ethernet 
  ovviamente la velocit - una connessione Ethernet standard opera
  teoricamente con una velocit di trasferimento dati (throughput)
  massima di 10 Mbs (Mega - milioni di bit al secondo), mentre un modem
  analogico opera a velocit sino a 56 kbps (kilo - migliaia di bit al
  secondo).


  Inoltre, a seconda del tipo di connessione PPP, ci possono essere
  alcune limitazioni nell'uso di alcune applicazioni e servizi.


  1.1.  Client e server

  PPP  in sostanza un protocollo peer to peer; non c' (teoricamente)
  alcuna differenza tra la macchina che fa la chiamata (dial) e la
  macchina alla quale questa  fatta. Comunque, per amor di chiarezza, 
  utile pensare in termini di server e client.

  Quando si fa la chiamata in un sito per stabilire la connessione PPP,
  si  un client. La macchina a cui ci si connette  il server.


  Quando si configura una macchina Linux per ricevere e gestire
  connessioni PPP in ingresso, si sta configurando un server PPP.


  Qualsiasi PC Linux pu essere server e client PPP, anche
  contemporaneamente se si ha pi di una porta seriale (e modem se
  necessario). Perci, per come  stato pensato il PPP, non c'
  differenza tra client e server una volta effettuato il collegamento
  tra le due macchine.


  Questo documento fa riferimento alla macchina che inizia la chiamata
  (che fa il dial in) come il CLIENT, mentre la macchina che risponde al
  telefono, verifica l'autenticit della richiesta di dial in (usando
  nome utente, password e probabilmente altri meccanismi) sar indicata
  come il SERVER.


  L'uso del PPP come un client per collegare una o pi macchine in
  Internet , probabilmente, quello a cui molti sono interessati.


  La procedura descritta in questo documento permetter di stabilire e
  automatizzare la propria connessione a Internet.


  Questo documento guider anche nella configurazione di un PC Linux
  come server PPP e nel collegamento di due LAN (con instradamento --
  routing -- completo) usando PPP (cosa che viene frequentemente
  caratterizzata come costituzione di un collegamento WAN -- wide area
  network).


  1.2.  Differenze tra le distribuzioni di Linux

  Ci sono molte distribuzioni di Linux e tutte hanno le proprie
  idiosincrasie e metodi per fare le cose.


  In particolare, esistono due metodi diversi seguendo uno dei quali una
  macchina Linux (e Unix) viene praticamente avviata, configura le
  proprie interfacce e cos via.


  Esistono sostanzialmente il sistema di inizializzazione BSD e il
  sistema di inizializzazione System V.  Se si gira per qualche
  newsgroup di Unix, si troveranno spesso guerre di religione tra i
  sostenitori dei due sistemi. Se questo tipo di cose vi solleticano,
  divertitevi a sprecare banda e partecipate!


  In pratica le distribuzioni usate maggiormente sono


    Slackware
     che usa il sistema di inizializzazione BSD

    Red Hat (e la sua ex associata Caldera)
     che usa il sistema di inizializzazione SysV (sebbene in una forma
     leggermente modificata)


    Debian
     che usa il sistema di inizializzazione SysV


  La inizializzazione in stile BSD tipicamente mantiene i propri file di
  inizializzazione in /etc/... e questi sono:


  ______________________________________________________________________
          /etc/rc
          /etc/rc.local
          /etc/rc.serial
                  (e possibilmente qualche altro file)
  ______________________________________________________________________




  Di recente, qualche sistema di inizializzazione BSD usa una directory
  /etc/rc.d... per conservare i file si inizializzazione invece di
  mettere tutto in /etc.



  L'inizializzazione System V mantiene i propri file di inizializzazione
  nelle directory sotto /etc/... o /etc/rc.d/... e in diverse sotto
  directory dentro a queste:


  ______________________________________________________________________
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 init.d
  -rwxr-xr-x   1 root     root         1776 Feb  9 05:01 rc
  -rwxr-xr-x   1 root     root          820 Jan  2  1996 rc.local
  -rwxr-xr-x   1 root     root         2567 Jul  5 20:30 rc.sysinit
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc0.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc1.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc2.d
  drwxr-xr-x   2 root     root         1024 Jul 18 18:07 rc3.d
  drwxr-xr-x   2 root     root         1024 May 27  1995 rc4.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc5.d
  drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc6.d
  ______________________________________________________________________




  Se si deve provare a scoprire dove vengono effettivamente configurati
  la propria interfaccia Ethernet e l'instradamento di rete associato,
  si dovranno esaminare questi file per trovare i comandi che lo fanno.


  1.3.  Programmi di configurazione del PPP specifici delle dis
  tribuzioni

  In alcune installazioni (per esempio Red Hat e Caldera), c' un
  sistema di configurazione di PPP sotto X Window. Questo HOWTO non
  copre tali strumenti specifici delle distribuzioni.  Se si hanno
  problemi con questi si contatti direttamente il distributore!



  Per gli utenti di Red Hat 4.x, ora c' un Red Hat PPP-TIP
  <http://www.interweft.com.au> nell'area delle risorse per Linux e
  anche a Red Hat Software <http://www.redhat.com> nell'area del
  supporto.

  2.  Numeri IP

  Qualsiasi dispositivo che  connesso ad Internet deve avere il proprio
  ed unico numero IP. Questi sono assegnati centralmente da un'autorit
  designata in ogni paese.


  Se si connette una rete locale (LAN) ad Internet, si DEVE usare per
  ognuno dei computer e dei dispositivi presenti nella propria LAN, un
  numero IP compreso nel range assegnato. NON SI DEVONO prendere numeri
  a caso e usarli per connettersi ad un'altra LAN (let alone the
  Internet). Alla meno peggio semplicemente non funzioner affatto e si
  pu causare un disastro totale in quanto i numeri IP 'rubati'
  interferiranno con le comunicazione di un'altro computer che sta gi
  usando i numeri IP che ci si  inventati.


  Si noti che i numeri IP usati in questo documento (con alcune
  eccezioni) sono fra la serie dei 'numeri di reti non connesse' che
  sono riservati per l'uso in reti che non sono (n mai saranno)
  connesse a Internet.


  Questi numeri IP sono dedicati in particolare a LAN che non si
  connettono a Internet. Queste sono le sequenze di numeri IP:


    Un Indirizzo di Rete di Classe A
     10.0.0.0 (netmask 255.0.0.0)

    16 Indirizzi di Rete di Classe B
     172.16.0.0 - 172.31.0.0 (netmask 255.255.0.0)

    256 Indirizzi di Rete di Classe C Class
     192.168.0.0 - 192.168.255.0 (netmask 255.255.255.0)


  Se si ha una LAN per la quale l'autorit responsabile del proprio
  paese non ha allocato numeri IP, per le proprie macchine si dovrebbe
  usare uno dei numeri di rete nelle sequenze suddette.


  Questi numeri non dovrebbero mai essere usati su Internet.


  Comunque, possono essere usati per la Ethernet locale su una macchina
  che  connessa a Internet.  Questo perch i numeri IP in realt sono
  allocati su un'interfaccia di rete, non ad un computer. Cos, mentre
  la propria interfaccia Ethernet pu usare 10.0.0.1 (per esempio),
  quando ci si aggancia ad Internet usando PPP, alla propria interfaccia
  PPP sar assegnato un altro (e valido) numero IP dal server. Il
  proprio PC sar connesso ad Internet mentre non lo saranno gli altri
  computer nella propria LAN.


  Comunque, usando Linux e le funzionalit dell'IP Masquerade (noto
  anche come NAT -- Network Address Translation) di Linux e il software
  ipfwadm, si pu connettere la propria LAN ad Internet (con alcune
  restrizioni di servizi), anche se non si hanno numeri IP validi per le
  macchine nella propria Ethernet.


  Per maggiori informazioni su come far ci si veda l'IP Masquerade
  mini-HOWTO a Linux IP Masquerade mini HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/mini/IP-Masquerade>

  Alla maggior parte degli utenti, che sono connessi con una macchina ad
  un fornitore di servizi Internet tramite PPP, non sar necessario
  ottenere un numero IP (o meglio un numero di rete).


  Se si vuole connettere una piccola rete LAN ad Internet, molti
  Internet Service Provider (ISP) possono fornire una sottorete dedicata
  (una sequenza specifica di numeri IP) presa dal loro spazio di
  indirizzi IP (ovvero dalla serie di indirizzi IP a loro assegnati o da
  loro richiesti). In alternativa si usi l'IP Masquerading.


  Per gli utenti, che si connettono con un PC ad Internet tramite un
  ISP, molti provider usano l'assegnamento dinamico dei numeri IP. Cio,
  come parte del processo di connessione, il servizio PPP che si
  contatta dir alla propria macchina quale numero IP usare per
  l'interfaccia PPP durante la sessione corrente. Questo numero non sar
  lo stesso ogni volta che ci si connette al proprio ISP.


  Con i numeri IP dinamici, non si ottiene lo stesso numero IP ogni
  volta che ci si connette.  Ci ha conseguenze per le applicazioni di
  tipo server sulla propria macchina Linux come sendmail, ftpd, http e
  cos via. Questi servizi si basano sul presupposto che il computer che
  offre il servizio sia accessibile tutto il tempo allo stesso numero IP
  (o almeno allo stesso fully qualified domain name - FQDN -- e che sia
  disponibile la risoluzione DNS del nome in indirizzo IP).


  Le limitazioni del servizio dovute all'assegnamento dinamico del
  numero IP (e modi per aggirarle, dove possibile) sono discusse
  successivamente nel documento.


  3.  Scopi di questo documento


  3.1.  Configurazione di un client PPP

  Questo documento fornisce una guida per chi intenda usare Linux e il
  PPP per la connessione ad un server PPP e la creazione di una
  connessione IP usando PPP. Assume che il PPP sia stato compilato ed
  installato nella propria macchina Linux (ma brevemente ripassa la
  riconfigurazione/ricompilazione del kernel per includerne il
  supporto).


  Sebbene DIP (il metodo standard per creare una connessione SLIP) possa
  essere usato per impostare una connessione PPP, gli script DIP sono
  generalmente piuttosto complessi. Per questa ragione questo documento
  NON tratta l'uso di DIP per impostare una connessione PPP.


  Piuttosto questo documento descrive il software PPP standard di Linux
  (chat/pppd).


  3.2.  Collegare due LAN o una LAN a Internet usando PPP

  Questo documento fornisce le informazioni (di base) per collegare due
  LAN o una LAN ad Internet usando PPP.





  3.3.  Configurazione di un server PPP

  Questo documento fornisce una guida su come configurare il proprio PC
  Linux come server PPP (permettendo ad altri di connettervisi e
  stabilire una connessione).


  Si dovrebbe notare che c' una miriade di modi per configurare Linux
  come un server PPP. Questo documento illustra un metodo usato
  dall'autore per impostare diversi piccoli server PPP (ognuno di 16
  modem).


  Questo metodo funziona, comunque non  necessariamente il migliore.


  3.4.  L'uso di PPP su una connessione diretta null modem

  Questo documento fornisce una breve panoramica sull'uso di PPP per
  collegare due PC tramite un cavo null modem. In questo modo  anche
  possibile connettere altri SO a Linux. Per farlo si deve consultare la
  documentazione per il sistema operativo che interessa.


  3.5.  Questo documento al momento non tratta...


    La compilazione del demone PPP
     Si veda la documentazione distribuita assieme con la versione di
     pppd che si usa.

    La connessione e la configurazione di un modem con Linux (in
     dettaglio)
     Si veda il Serial-HOWTO per l'inizializzazione specifica del modem,
     e si veda Modem Setup Information
     <http://www.in.net/info/modems/index.html> per informazioni che
     possono essere d'aiuto nella configurazione del proprio modem.

    L'uso di DIP per stabilire connessioni PPP
     Si usi chat invece...

    L'uso di sock o di IP Masquerade
     Ci sono gi documenti molto buoni che coprono questi due pacchetti.

    L'uso di diald per instaurare automaticamente la connessione
     Si veda la documentazione di diald per maggiori informazioni.

    L'uso di EQL per usare due modem assieme in uno stesso collegamento
     PPP.

    Metodi di connessione PPP specifici delle distribuzioni (come il
     network configuration tool di Red Hat 4.x).
     Si veda la distribuzione per la documentazione sul metodo usato.

    Il crescente numero di programmi disponibili per automatizzare la
     configurazione di PPP
     Si veda la documentazione appropriata.


  4.  Versioni del software trattate

  Questo HOWTO assume che si usi un kernel di Linux 1.2.x con il
  software di PPP 2.1.2 oppure Linux 1.3.X/2.0.x e PPP 2.2.



  Al momento della stesura di questo HOWTO, l'ultima versione ufficiale
  disponibile di PPP per Linux era ppp-2.2f. La nuova versione (ppp-2.3)
   ancora in beta.


   possibile usare PPP 2.2.0 con kernel 1.2.13. Ci richiede delle
  patch per il kernel. Si raccomanda agli utenti del kernel versione
  1.2.13 di installare il ppp-2.2 in quanto corregge diversi bug.


  Si dovrebbe notare, in particolare, che non  possibile usare il
  software PPP 2.1.2 con i kernel di Linux versione 2.0.x


  Si noti che questo documento NON discute i problemi causati dall'uso
  dei moduli caricabili del kernel 2.0.x. Si veda il kerneld mini-HOWTO
  e la documentazione kernel/module del 2.0.x (nei sorgenti di Linux
  2.0.x in /usr/src/linux/Documentation/...).


  Poich questo documento  pensato per assistere i nuovi utenti, si
  raccomanda fortemente di usare la versione del kernel di Linux e la
  giusta versione di PPP, che siano notoriamente stabili assieme.


  5.  Altri documenti utili/importanti

  Gli utenti sono invitati a leggere:

    la documentazione distribuita con il pacchetto PPP;

    le pagine di manuale di chat e pppd;
     (si usi man chat e man pppd per vederle)

    la Linux Network Administration Guide (NAG);
     si veda The Network Administrators' Guide
     <http://sunsite.unc.edu/mdw/LDP-books/nag-1.0/nag.html>

    il Net-2/3 HOWTO;
     si veda Linux NET-2/3-HOWTO
     <http://sunsite.unc.edu/mdw/HOWTO/NET-2-HOWTO.html>

    La documentazione del kernel di Linux installata in
     /usr/src/linux/Documentation quando si installa il codice sorgente
     di Linux;

    La modem setup information page - si veda Modem Setup Information
     <http://www.in.net/info/modems/index.html>

    Gli eccellenti libri su Unix/Linux pubblicati da O'Reilly and
     Associates. Si veda O'Reilly and Associates On-Line Catalogue <
     http://www.ora.com/>. Se si  nuovi a Unix/Linux, si corra (non si
     cammini) al pi vicino negozio di libri di computer e se ne
     comprerino un po'!

    La PPP-FAQ mantenuta da Al Longyear, disponibile da  Linux PPP-FAQ
     <ftp://sunsite.unc.edu/pub/Linux/docs/faqs>.
     Questa contiene un sacco di informazioni utili nel formato
     domanda/risposta molto utili quando si vuole capire perch il PPP
     non funziona correttamente.

    Il crescente numero di libri su Linux di diverse case editrici ed
     autori;
     Si suggerisce di controllare l'attualit di tali libri. Lo sviluppo
     di Linux e le distribuzioni tendono ad evolvere abbastanza
     rapidamente, mentre la revisione di libri si muove (solitamente)
     molto pi lentamente! Comperare un libro eccellente (e ce ne sono
     tanti) che ora sia obsoleto causer considerevole confusione e
     frustrazione ai nuovi utenti.


  In generale il miglior punto di partenza per la documentazione su
  Linux  The Linux Documentation Project Home Page
  <http://sunsite.unc.edu/mdw/>. La tendenza  di revisionare abbastanza
  regolarmente gli HOWTO.


  Sebbene si possa usare questo documento per creare la propria
  connessione PPP senza leggere nessuno dei suddetti documenti, se li si
  legge si capir molto di pi di quello che si andr a fare! Si sar
  inoltre in grado di risolvere da soli i problemi (o almeno si porranno
  domande un pelino pi intelligenti nei newsgroup comp.os.linux.* e
  nelle mailing list di Linux).


  Questi documenti (oltre ad altri, tra cui gli RFC sull'argomento)
  forniscono spiegazioni aggiuntive e pi dettagliate di quanto possa
  offrire questo HOWTO.


  Se si connette una LAN ad Internet usando PPP, si avr bisogno di una
  ragionevole conoscenza sul networking TCP/IP. In aggiunta ai suddetti
  documenti, un notevole beneficio lo si potr trarre dai libri della
  O'Reilly "TCP/IP Network Administration" e "Building Internet
  Firewalls"!


  5.1.  Utili mailing list su Linux

  Ci sono molte mailing list su Linux che operano come mezzo di
  comunicazione tra gli utenti con diversi livelli di abilit. In ogni
  modo si sottoscrivano quelle che pi interessano e si collabori
  fornendo la propria esperienza e visione della cosa.


  Un paio di regolette: alcune liste sono specificatamente destinate
  agli utenti di pi alto livello ("high powered") e/o a particolari
  problematiche/argomenti. Mentre nessuno si preoccupa di chi assiste
  passivamente alle discussioni (ovvero fa il 'lurk', seguendo le
  discussioni ma non postando mai messaggi),  facile invece ricevere
  commenti alquanto sgarbati (se non una serie completa di flame) nel
  caso in cui si postasse un messaggio da principiante ("newbie") liste
  non appropriate.


  Ci non  perch gli utenti guru odino i nuovi utenti, ma perch
  queste liste esistono per discutere argomenti particolari a
  particolari livelli di difficolt.


  Ad ogni modo si sottoscrivano le liste aperte, ma si mantengono i
  propri commenti su argomenti inerenti alla lista!


  Un buon punto di partenza per le mailing list su Linux  Linux Mailing
  List Directory <http://summer.snu.ac.kr/~djshin/linux/mail-
  list/index.shtml>





  6.  Panoramica di quello che va fatto per usare come client il PPP

  Questo documento contiene un sacco di informazioni che aumentano ad
  ogni versione dello stesso!


  Di conseguenza, questo paragrafo intende fornire una concisa
  panoramica delle azioni da fare per far s che il proprio sistema
  Linux possa connettersi come client ad un server PPP.


  6.1.  Trovare/installare il software

  Se la propria distribuzione Linux non contiene il software per il PPP,
  lo si pu scaricare da il demone PPP di Linux
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/serial/ppp/ppp-2.2.0f.tar.gz>.


  Al momento questa  l'ultima versione ufficiale. Comunque, si scelga
  l'ultima versione disponibile da questo sito (ppp-2.3 era in versione
  beta quando stavo scrivendo questo documento e dovrebbe essere
  rilasciato tra poco).


  Il pacchetto PPP contiene le istruzioni su come compilare ed
  installare il software, quindi questo HOWTO non lo spiegher!


  6.2.  Compilare il supporto per il PPP nel kernel

  Il PPP in Linux si compone di due parti

    il demone PPP menzionato prima

    il supporto per il PPP nel kernel


  Molte distribuzioni forniscono di default il supporto a livello kernel
  per il PPP nei loro kernel di installazione, ma altre non lo fanno.


  Se al boot il proprio kernel mostra un messaggio simile a


  ______________________________________________________________________
  PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.
  PPP line discipline registered.
  ______________________________________________________________________




  il proprio kernel ha il supporto per il PPP compilato al suo interno.


  Detto questo, probabilmente si vorr comunque compilare il proprio
  kernel qualsiasi sia la propria distribuzione, in modo da ottenerne
  uno che usi in modo pi efficiente le risorse del sistema data la
  propria configurazione hardware.  Non  male ricordare che il kernel
  deve risiedere completamente in memoria principale (non pu mai essere
  swappato fuori da essa) e quindi mantenere il kernel pi piccolo
  possibile pu essere solo un vantaggio nelle macchine con poca
  memoria.



  Questo documento fornisce le istruzioni essenziali per ricompilare il
  kernel nel paragrafo ``Configurare il proprio Kernel di Linux''.


  Per maggiori dettagli, si veda il Kernel-HOWTO a The Linux Kernel
  HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>


  6.3.  Informazioni da chiedere al proprio ISP

  Il server PPP pu essere configurato in un'infinit di modi.  Per
  potersi connettere al proprio ISP (o al server PPP della propria
  organizzazione per accedere alla propria intranet), si debbono
  ottenere un po' di informazioni sul funzionamento del server PPP.


  Poich si sta usando Linux, si possono incontrare alcune difficolt
  con il supporto utenti di alcuni ISP (e del server PPP per la intranet
  al lavoro) che sono a conoscenza solo di client MS Windows.


  Comunque, un numero sempre crescente di ISP usano Linux per fornire il
  loro servizio - e Linux sta penetrando pure nell'ambiente aziendale,
  perci, se si  fortunati non si incotreranno resistenze.


  Il paragrafo ``Quali informazioni si debbono conoscere sul server
  PPP'' dir quello che si deve sapere sul server PPP al quale ci si
  vuole connettere e come trovare le informazioni che si debbono
  conoscere.


  6.4.  Configurare il proprio modem e la porta seriale

  Per potersi connettere ad un server PPP e ottenere la velocit di
  trasferimento migliore possibile, si deve configurare correttamente il
  proprio modem.


  Similmente, si devono configurare correttamente le porte seriali sui
  propri modem e sul computer.


  Il paragrafo ``Configurare il proprio modem e la porta seriale''
  fornisce informazioni in proposito.


  6.5.  Configurare la risoluzione da nome a indirizzo (DNS)

  Oltre ai file che lanciano PPP ed effettuano il login automatico nel
  server PPP, c' un certo numero di file di configurazione che devono
  essere impostati per permettere al proprio computer di risolvere
  (``convertire'') nomi come www.interweft.com.au negli indirizzi IP in
  effetti usati per contattare quel computer. Questi sono:


    /etc/resolv.conf

    /etc/host.conf


  Si veda il paragrafo ``Configurare la Risuluzione da Nome ad
  Indirizzo'' per i dettagli.



  In particolare, NON  necessario che si faccia girare un name server
  nel proprio PC Linux per potersi connettere ad Internet (sebbene lo si
  possa comunque fare).  Tutto quel che si deve conoscere  l'indirizzo
  IP di almeno un name server che si possa usare (preferibilmente quello
  del proprio ISP).


  6.6.  PPP e Privilegi di root

  Lo stabilire un collegamento PPP tra la propria macchina Linux ed un
  altro server PPP richiede la manipolazione dei dispositivi di rete
  (``network device'') (l'interfaccia PPP  un'interfaccia di rete) e
  della tabella di instradamento del kernel (``kernel routing table''),
  e quindi pppd necessita dei privilegi di root.


  Per i dettagli si veda la sezione ``L'uso di PPP e i privililegi di
  root''.


  6.7.  Verificare i File del PPP della propria distribuzione e
  impostare le Opzioni del PPP

  Ci sono alcuni file di configurazione che debbono essere impostati per
  rendere operativo il PPP. Nella distribuzione di PPP ci sono alcuni
  esempi e questo paragrafo mostra quali file si dovrebbe avere:


  ______________________________________________________________________
  /etc/ppp/options
  /etc/ppp/scripts/ppp-on
  /etc/ppp/scripts/ppp-on-dialer
  /etc/ppp/options.tpl
  ______________________________________________________________________




  Pu essere necessario creare alcuni altri file a seconda di cosa
  esattamente si ha intenzione di fare con PPP:


  ______________________________________________________________________
  /etc/ppp/options.ttyXX
  /etc/ppp/ip-up
  /etc/ppp/pap-secrets
  /etc/ppp/chap-secrets
  ______________________________________________________________________




  Inoltre, il demone PPP pu usare un numero enorme di opzioni in riga
  di comando ed  importante usare quelle giuste; questa sezione quindi
  fa una panoramica sulle opzioni standard del PPP e aiuta nella scelta
  delle opzioni che andrebbero usate.


  Per i dettagli si veda ``Impostare i file di connessione del PPP''.


  6.8.  Se il proprio server PPP usa PAP (Password Authentication Proto
  col)

  Molti server PPP di ISP ed aziende usano PAP. Se il proprio server non
  richiede che si usi PAP (se si pu fare  manualmente login e si riceve
  la richiesta normale di nome e password in modo testo, il server non
  usa PAP) si pu tranquillamente saltare questa sezione.


  Invece di fare il login nel server usando il nome utente e la password
  quando richieste per entrare nel server, un server PPP che usa PAP non
  richiede un login in modo testo.


  Le informazioni per l'autentificazione dell'utente vengono piuttosto
  scambiante come parte del protocollo di controllo di connessione
  (``link control protocol'' - LCP) che costituisce la prima parte
  dell'instaurazione del collegamento PPP.


  Il paragrafo ``Se il proprio server PPP usa PAP (Password
  Authentication Protocol)'' fornisce informazioni sui file da impostare
  per stabilire una connessione PPP usando PAP.


  6.9.  Connettersi a mano a un server PPP

  Dopo aver impostato i file di base,  una buona idea verificarli
  connettendosi a mano (usando minicom o seyon) e lanciando pppd sulla
  propria macchina Linux.


  Si veda la sezione ``Instaurare manualmente una connessione PPP'' per
  tutti i dettagli.


  6.10.  Automatizzare la propria connessione PPP

  Una volta in grado di connettersi a mano, ci si pu concentrare sulla
  creazione di un insieme di script che automatizzeranno l'instaurazione
  della connessione.


  La sezione ``Automatizzare la propria connessione - Creazione degli
  script di connessione'' copre la configurazione degli script
  necessari, concentrandosi particolarmente su chat e sullo script di
  login sul server PPP.


  Questa sezione discute gli script per l'autentificazione con nome
  utente e password cos come gli script per i server con
  autentificazione PAP/CHAP.


  6.11.  Chiudere la connessione

  Una volta che la connessione  stabilita e funzionante, si deve essere
  in grado di deattivarla.


  Ci  spiegato nel paragrafo ``Chiudere la connessione PPP''.


  6.12.  Se ci sono problemi

  Molti hanno problemi a far funzionare direttamente il PPP. Le
  variazioni nei server PPP e in come questi richiedono sia configurata
  la connessione sono enormi. Similmente, ci sono molte opzioni per PPP
  e addirittura alcune combinazioni di queste non funzionano assieme.


  Oltre ai problemi di login e avvio del servizio PPP, ci sono problemi
  sia con i modem che con le linee telefoniche!


  Il paragrafo ``Risoluzione dei problemi'' fornisce alcune informazioni
  basilari sugli errori comuni, e su come isolarli e correggerli.


  Lo scopo di tale paragrafo altro NON  se non quello di fornire le
  informazioni basilari. Al Longyear mantiene la PPP-FAQ che contiene
  molte pi informazioni su questo argormento!


  6.13.  Dopo che la connessione  stabilita

  Una volta che la connessione PPP  operativa (precisamente, almeno il
  livello IP  operativo), il PPP di Linux pu eseguire automaticamente
  uno script (come root) per effettuare qualsiasi funzione che si pu
  scrivere in uno script.


  Il paragrafo ``Dopo che la connessione  attiva'' fornisce
  informazioni sullo script /etc/ppp/ip-up, i parametri che riceve da
  PPP e su come usarlo per fare operazioni come scaricare la posta dal
  proprio provider, spedire qualsiasi email nella coda di attesa di
  trasmissione nella propria macchina e cos via.


  6.14.  Problemi con i servizi IP standard su una connessione PPP a
  numero IP dinamico

  Come notato nell'introduzione, i numeri IP dinamici hanno conseguenze
  sulla capacit del proprio PC Linux di funzionare come server in
  Internet.


  Il paragrafo ``Problemi con i servizi IP standard su una connessione
  PPP a numero IP dinamico'' fornisce informazioni sui (principali)
  servizi che ne risentono e su cosa si pu fare (se qualcosa 
  possibile) per ovviare a questi problemi.


  7.  Configurare il proprio kernel di Linux

  Per poter usare PPP, il proprio kernel di Linux dev'essere compilato
  includendone il supporto.  Ci si procuri il codice sorgente del kernel
  di Linux se gi non lo si ha - dovrebbe essere il /usr/src/linux in un
  file system standard di Linux.


  Si dia un'occhiata a questa directory - molte distribuzioni di Linux
  installano l'albero dei sorgenti (i file e le sottodirectory) durante
  il processo di installazione.


  Al boot, il proprio kernel di Linux mostra svariate informazioni. Tra
  queste ci sono anche quelle sul PPP, se il kernel ne include il
  supporto.  Per vedere queste informazioni, si veda il file di log del
  proprio sistema o si usi dmesg |less per visualizzare le informazioni
  sullo schermo.  Se il proprio kernel include il supporto per il PPP,
  si dovrebbe vedere una cosa di questo genere:





  ______________________________________________________________________
  PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.
  PPP line discipline registered.
  ______________________________________________________________________




  (questa  per la serie 2.0.x di kernel di Linux).


  I sorgenti del kernel di Linux possono essere reperiti via ftp da
  sunsite.unc.edu o da uno dei suoi (molti) mirror.


  7.1.  Installare i sorgenti del kernel di Linux

  Quanto segue sono le istruzioni in breve per procurarsi ed installare
  i sorgenti del kernel di Linux. Informazioni pi complete le si pu
  trovare nel Linux Kernel HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>.


  Per poter installare e compilare il kernel di Linux, si deve essere
  loggati come root.


  1. Passare alla directory  /usr/src
     cd /usr/src

  2. Controllare in /usr/src/linux se gi ci sono installati i sorgenti.

  3. Se non si hanno i sorgenti, li si prenda dalla directory dei
     sorgenti del kernel di Linux
     <ftp://sunsite.unc.edu/pub/Linux/kernel/v2.0> o nel mirror pi
     vicino.
     Se si cerca una delle prime versione del kernel (come la 1.2.X),
     queste sono conservate nella directory dei sorgenti dei vecchi
     kernel di Linux <ftp://sunsite.unc.edu/pub/Linux/kernel/old>.

  4. Si scelga il kernel appropriato, solitamente il pi recente fra
     quelli disponibili nel sito. Lo si scarichi e si metta il file tar
     dei sorgenti in /usr/src.
     Nota: un file 'tar'  un archivio -- probabilmente compresso (come
     lo sono i file tar dei sorgenti del kernel di Linux) -- che
     contiene molti file in diverse directory.  l'equivalente Linux di
     un file zip multidirectory di DOS.

  5. Se gi si hanno i sorgenti di Linux installati si debbono rimuovere
     i vecchi sorgenti. Si usi il comando
     rm -rf /usr/src/linux

  6. Ora si decomprimano e si estraggano i sorgenti usando il comando
     tar xzf linux-2.0.XX.tar.gz

  7. Adesso, si faccia cd /usr/src/linux e si legga il file README.
     Questi contiene un'eccellente spiegazione su come configurare e
     compilare un nuovo kernel. Lo si legga (pu essere una buona idea
     stamparlo per averne una copia sotto mano durante la compilazione,
     finch non la si  fatta abbastanza volte da conoscerne ogni minimo
     dettaglio).





  7.2.  Riconoscere il proprio hardware

  Se si ha intenzione di ricompilare il kernel si DEVE sapere quali
  schede/dispositivi ci sono installati nel proprio PC!!!  Per alcuni
  dispositivi (come le schede audio) ci sar bisono di conoscere anche
  le diverse impostazioni (come IRQ, indirizzi di I/O e cos via).


  7.3.  Compilazione del kernel -- il kernel di Linux 1.2.13

  Per iniziare il processo di configurazione, si seguano le istruzione
  nel file README installato con i sorgenti.  La configurazione viene
  avviata con



       make config





  Per poter usare PPP, si deve configurare il kernel per includere il
  supporto per il PPP (PPP ha bisogno sia di pppd sia del supporto nel
  kernel).


  ______________________________________________________________________
    PPP (point-to-point) support (CONFIG_PPP) [n] y
  ______________________________________________________________________




  Si risponda alle altre domande del make config a seconda dell'hardware
  nel proprio PC e delle caratteristiche che si vogliono dal sistema
  operativo Linux.  Si continui poi nella lettura del README per
  compilare ed installare il nuovo kernel.


  Il kernel 1.2.13 crea solo 4 device PPP.  Nel caso si possieda una
  scheda seriale multiporta, ci sar bisogno di modificare i sorgenti
  del PPP nel kernel per avere pi porte (si veda il file README.linux
  distribuito assieme al PPP-2.1.2 per maggiori dettagli sulle semplici
  modifiche da fare).


  Nota: il processo di configurazione dell'1.2.13 NON permettere di
  tornare indietro -- se si fa un'errore rispondendo ad una domanda
  durante il dialogo con make config, si esca premendo CTRL C e si
  ricominci.


  7.4.  Compilazione del kernel -- i kernel di Linux 1.3.x e 2.0.x

  Per Linux 1.3.x e 2.0.x, si pu usare un processo simile a quello di
  Linux 1.2.13. Ancora, si seguano le istruzioni del file README
  installato con i sorgenti.  Il processo di configurazione si avvia con



       make config




  Comunque, c' anche la possibilit di usare


       make menuconfig





  Ci fornisce un sistema di configurazione a menu con un help in linea
  che permette di spostarsi avanti e indietro nel processo di
  configurazione.


  Esiste inoltre un'interfaccia di configurazione altamente consigliata
  che gira in X Window


       make xconfig





  Il supporto per il PPP pu essere compilato direttamente dentro al
  kernel oppure come modulo.


  Se quando la propria macchina Linux  operativa, si usa PPP solo per
  brevi periodi, allora si raccomanda di compilare il supporto per il
  PPP come modulo.  Usando 'kerneld' il proprio kernel caricher
  automaticamente i moduli richiesti per fornire il supporto per il PPP
  quando si lancia il processo di connessione con PPP. Ci fa
  risparmiare porzioni importanti di memoria:  nessuna parte del kernel
  pu essere messa in swap, ma i moduli caricabili sono automaticamente
  rimossi se non sono in uso.


  Per far ci si deve abilitare il supporto per i moduli caricabili:

  ______________________________________________________________________
          Enable loadable module support (CONFIG_MODULES) [Y/n/?] y
  ______________________________________________________________________



  Per aggiungere il supporto nel kernel per il PPP, si risponda alla
  seguente domanda:

  ______________________________________________________________________
          PPP (point-to-point) support (CONFIG_PPP) [M/n/y/?]
  ______________________________________________________________________




  Per il modulo caricabile del PPP, si risponda M, altrimenti per
  compilare il PPP dentro al kernel rispondere Y.


  Diversamente dal kernel 1.2.13, il kernel 2.0.x crea device PPP al
  volo quando sono necessari e non c' pi bisogno di modificare i
  sorgenti per incrementare il numero di dispositivi PPP disponibili.



  7.5.  Nota su PPP-2.2 e /proc/net/dev

  Se si usa PPP-2.2, si scoprir che un effetto collaterale nella
  creazione al volo dei dispositivi PPP  che nessun dispositivo viene
  mostrato nel file system /proc/net finch il dispositivo non  creato
  lanciando pppd:


  ______________________________________________________________________
  [hartr@archenland hartr]$ cat /proc/net/dev
  Inter-|   Receive                  |  Transmit
   face |packets errs drop fifo frame|packets errs drop fifo colls carrier
      lo:  92792    0    0    0    0    92792    0    0    0     0    0
    eth0: 621737   13   13    0   23   501621    0    0    0  1309    0
  ______________________________________________________________________




  Una volta avviati uno (o pi) servizi ppp, si vedranno delle voci cos
  (da un server ppp):


  ______________________________________________________________________
  [root@kepler /root]# cat /proc/net/dev
  Inter-|   Receive                  |  Transmit
   face |packets errs drop fifo frame|packets errs drop fifo colls carrier
      lo: 428021    0    0    0    0   428021    0    0    0     0    0
    eth0:4788257  648  648  319  650  1423836    0    0    0  4623    5
    ppp0:   2103    3    3    0    0     2017    0    0    0     0    0
    ppp1:  10008    0    0    0    0     8782    0    0    0     0    0
    ppp2:    305    0    0    0    0      297    0    0    0     0    0
    ppp3:   6720    7    7    0    0     7498    0    0    0     0    0
    ppp4: 118231  725  725    0    0   117791    0    0    0     0    0
    ppp5:  38915    5    5    0    0    28309    0    0    0     0    0
  ______________________________________________________________________




  7.6.  Considerazioni generali sulla configurazione del kernel per il
  PPP

  Se si sta mettendo su un PC Linux per far da server PPP, si deve
  compilare il supporto per l'IP forwarding. Questo  pure necessario se
  si vuole usare Linux per collegare alcune LAN assieme o per connettere
  la propria LAN ad Internet.


  Se si connette una LAN ad Internet (o si connettono assieme due LAN),
  si dovrebbe essere ben coscienti delle problematiche sulla sicurezza.
  L'aggiunta del supporto per i firewall IP nel kernel probabilmente 
  un DOVERE!


  Questo sar necessario anche se si vuole usare IP masquerade per
  connettere una LAN che usa uno dei suddetti numeri di rete IP 'non
  connessi'.


  Per abilitare l'IP Masquerade e l'IP fire walling, si DEVE rispondere
  affermativamente alla prima domanda nel processo make config:




  ______________________________________________________________________
  Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL)?
  ______________________________________________________________________




  Ai nuovi utenti questo potrebbe sembrare un po' fuori luogo, ma molti
  utenti Linux usano attivamente l'IP Masquerade e l'IP Firewalling dei
  kernel Linux 2.0.XX senza alcun problema.


  Una volta installato il nuovo kernel e riavviata la macchina, si pu
  cominciare a configurare e a testare il(i) collegamento(i) PPP.


  8.  Quali informazioni si debbono conoscere sul server PPP

  Prima di poter stabilire una connessione PPP con un server, 
  necessario procurarsi le seguenti informazioni (ci si rivolga al
  supporto clienti o agli amministratori del proprio server PPP):

    Il o i numeri telefonici da comporre per il servizio
     Se si  dietro ad un PABX,  necessario conoscere anche il numero
     PABX che abilita le chiamate esterne - solitamente  lo zero (0) o
     il nove (9).

    Il server usa numeri IP DINAMICI o STATICI?
     Se il server usa numeri IP STATICI, allora  necessario conoscere
     quale numero IP usare per la propria estremit della connessione
     IP. Se il proprio ISP vi fornisce una sottorete di numeri IP
     validi, bisogna conoscere anche quali numeri IP  possibile usare e
     qual' la maschera di rete (netmask).

     La maggior parte degli Internet Service Provider usa numeri IP
     DINAMICI. Come detto in precedenza, ci ha qualche implicazione in
     termini di servizi che si possono usare.

     Comunque, anche se si stanno usando numeri IP STATICI, molti server
     PPP non permetteranno mai (per ragioni di sicurezza) ad un client
     di specificare un numero IP, in quanto ci  un rischioso. Si deve
     comunque avere questa informazione!

    Quali sono i numeri IP dei Domain Name Server dell'ISP?
     Dovrebbero essere almeno due sebbene ne serva solo uno.

     Ci potrebbe essere un problema a questo punto. La configurazione
     del PPP di MS Windows 95 permette che l'indirizzo del DNS sia
     passato al client come parte del processo di connessione. Quindi il
     proprio ISP potrebbe benissimo rispondere che non c' la necessit
     di conoscere gli indirizzi dei server DNS.

     Per Linux, si DEVE conoscere l'indirizzo di almeno un DNS.
     L'implementazione del PPP in Linux non permette di impostare
     dinamicamente il numero IP del DNS durante la connessione, e
     probabilmente non lo far mai nemmeno in futuro.

     Nota: mentre Linux (come client PPP) non pu accettare l'indirizzo
     del DNS da un server, pu, quando funziona come server, passare
     l'informazione ai client usando l'opzione dns-addr di pppd.

    Il server richiede l'uso di PAP/CHAP?
     Se questo  il caso di deve conoscere "id" e "secret" da usare
     durante la connessione (probabilmente queste sono il proprio nome
     utente e la propria password nel proprio ISP).

    Il server avvia automaticamente il PPP o si deve fornire un qualche
     comando per far partire il PPP una volta fatto il login?
     Se si deve dare un comando per avviare il PPP, qual ?

    Il server  un sistema Microsoft Windows NT e, se cos , usa il
     sistema MS PAP/CHAP?
     Molte LAN di aziende usano MS Windows NT in questo modo per
     aumentare la sicurezza.


  Ci si annoti con cura queste informazioni, che tra un po' andremo ad
  usarle!


  9.  Configurare il proprio modem e la porta seriale

  Ci si dovrebbe assicurare che il proprio modem sia impostato
  correttamente e conoscere a quale porta seriale  connesso.


  Si ricorda:

    DOS com1: = Linux /dev/cua0 (e /dev/ttyS0)

    DOS com2: = Linux /dev/cua1 (e /dev/ttyS1)
     eccetera


  Non  male ricordare che se si hanno 4 porte seriali, la
  configurazione predefinita dei PC  di avere la com1 e la com3 che
  condividono IRQ4 e la com2 e la com4 che condividono IRQ3.


  Se si hanno dispositivi su una porta seriale standard che condivide un
  IRQ con il proprio modem, probabilmente si avranno dei problemi.  Ci
  si deve assicurare che la porta seriale a cui  connesso il modem
  abbia un IRQ di sua propriet e non condiviso.  Molte schede seriali
  moderne (e le porte seriali sulle schede madri di buona qualit)
  permettono di spostare l'IRQ delle porte seriali.


  Se si usa un kernel versione 2 di Linux, si possono vedere quali IRQ
  sono in uso con cat /proc/interrupts, che produrr un output simile a:

  ______________________________________________________________________
   0:    6766283   timer
   1:      91545   keyboard
   2:          0   cascade
   4:     156944 + serial
   7:     101764   WD8013
  10:     134365 + BusLogic BT-958
  13:          1   math error
  15:    3671702 + serial
  ______________________________________________________________________




  Qui  mostrata una porta seriale sull'IRQ4 (un mouse) ed una porta
  seriale sull'IRQ15 (la connessione PPP permanente via modem ad
  Internet). Ci sono anche le porte seriali com2 su IRQ3, e la com4 su
  IRQ14, ma non sono utilizzate e perci non vengono mostrate.


  Attenzione: bisogna sapere quello che si fa quando si gioca con gli
  IRQ! Non solo si deve aprire il proprio computer, tirare fuori le
  schede e giocare con i jumper, ma si deve pure sapere cosa c' su un
  determinato IRQ. Nel mio caso ho un PC totalmente basato su SCSI, e
  cos ho disabilitato l'interfaccia IDE sulla scheda madre che
  normalmente usano gli IRQ14 e 15!


  Si dovrebbe tener presente che se il proprio PC si avvia anche con
  altri sistemi operativi, lo spostamento degli IRQ pu far s che tali
  sistemi operativi non si avviino correttamente, o che non si avviino
  affatto.


  Se si spostano le porte seriali su IRQ non standard, allora bisogna
  dire a Linux qual  IRQ che ogni porta usa. Ci  fatto usando
  setserial ed  meglio farlo durante la sequenza di avvio del sistema
  in rc.local o rc.serial che viene chiamato da rc.local oppure come
  parte dell'inizializzazione SysV.  Per la macchina descritta in
  precendenza, i comandi usati sono:

  ______________________________________________________________________
  /bin/setserial -b /dev/ttyS2 IRQ 11
  /bin/setserial -b /dev/ttyS3 IRQ 15
  ______________________________________________________________________




  Comunque, se si usa il modulo per le seriali e lo si fa caricare
  dinamicamente quando necessario da kerneld, non si possono impostare
  gli IRQ ed il resto e poi dimenticarsene una volta avviato il sistema,
  in quando se il modulo viene scaricato, Linux si dimentica delle
  impostazioni speciali.


  Quindi, se si fa caricare su richiesta il modulo per le seriali,
  bisogna riconfigurare gli IRQ ed il resto ogni volta che viene
  caricato il modulo.


  9.1.  Una nota sulle porte seriali e le loro velocit

  Se si usa un modem (esterno) ad alta velocit (14,400 Baud o
  superiore), la propria porta seriale dev'essere in grado di gestire il
  flusso di dati che un tale modem  in grado di produrre, in
  particolare quando il modem comprime i dati.


  Ci richiede che la propria porta seriale usi un UART (Universal
  Asynchronous Receiver Transmitter - Ricevitore/Trasmettitore Asincrono
  Universale) moderno come un 16550(A). Se si usa una vecchia macchina
  (o una vecchia scheda seriale),  abbastanza probabile che la propria
  porta seriale abbia solamente un UART 8250, che pu causere
  considerevoli problemi quando utilizzata con un modem ad alta
  velocit.


  Si usi il comando


       setserial -a /dev/ttySx






  per far s che Linux dica il tipo di UART in proprio possesso. Se non
  si ha una UART del tipo 16550A, si investa un po' di soldi in una
  nuova scheda seriale (disponibile a meno di $50). Una volta comperata,
  ci si assicuri di poterne spostare gli IRQ!


  Nota: la prima versione del chip UART 16550 ha un errore. Questo 
  stato scoperto quasi subito ed  stata rilasciata una revisione del
  chip: l'UART 16550A. Comunque circolano un numero relativamente basso
  di chip fallati. Non  facile incappare in uno di questi, ma comunque,
  almeno per le schede abbastanza pregiate, si dovrebbe ottenere una
  risposta al comando precedente che dice 16550A.


  9.2.  Nomi delle Porte Seriali

  Storicamente, Linux usava i device cuaX per le chiamate in uscita
  (dial out) e i device  ttySx per quelle in ingresso (dial in).


  La porzione del kernel che richiedeva ci  stata cambiata nella
  versione 2.0.x del kernel e si dovrebbero usare i ttySx sia per il
  dial in che per il dial out. Da quel che ho capito i device cuaX
  potrebbero benissimo scomparire in una versione futura del kernel.


  9.3.  Configurare il proprio modem

  Per usare PPP bisogna configurare correttamente il proprio modem. Per
  far ci SI LEGGA IL MANULE DEL PROPRIO MODEM! La maggior parte dei
  modem hanno delle impostazioni predefinite dal costruttore che
  selezionano le opzioni richieste per il PPP. La configurazione minima
  richiede:

    Controllo di flusso hardware (RTS/CTS) (&K3 in molti modem Hayes)

  Altre impostazioni (in comandi standard Hayes) che si dovrebbero
  controllare sono:

    E1 Echo ON (richiesto per il funzionamento di chat)

    Q0 Report result codes (richiesto per il funzionamento di chat)

    S0=0 Auto Answer OFF (a meno che non si voglia che il proprio modem
     risponda al telefono)

    &C1 Carrier Detect ON solo dopo la connessione

    &S0 Data Set Ready (DSR) sempre ON

    (forse)   Data Terminal Ready


  Esiste un sito che offre le impostazioni per un modem per una variet
  in continua crescita di costruttori e modelli di modem a Modem setup
  information <http://www.in.net/info/modems/index.html> che pu tornare
  utile in questa operazione.


  Non  male neppure investigare sul funzionamento dell'interfaccia
  seriale del modem usata per connetterlo al proprio computer. La
  maggior parte dei modem permette di far funzionare tale interfaccia a
  velocit FISSA, mentre lasciano all'interfaccia con la linea
  telefonica la possibilit di variare la sua velocit in modo da usare
  quella pi alta che sia lei che la corrispondente nel modem remoto
  riescono a gestire.
  Ci  noto come funzionamento ``split speed''. Se il proprio modem lo
  supporta, si blocchi l'interfaccia seriale del modem alla velocit pi
  alta disponibile (generalmente 115200 baud ma pi probabilmente 38400
  baud per i modem a 14400).


  Si usi il proprio software di comunicazione (p.es. minicom o seyon)
  per scovare la configurazione del proprio modem e per impostare quanto
  richiesto per il PPP. Molti modem ritornano le loro impostazioni
  correnti in risposta a AT&V, ma si consulti comunque il manuale del
  proprio modem.


  Se si fa un casotto con le impostazioni, si pu ritornare alle
  impostazioni sane (solitamente) dando il comando AT&F che riporta il
  modem alle impostazioni del costruttore (comunque per la maggior parte
  dei modem che ho incontrato, le impostazioni di fabbrica includono
  tutto quello che serve per il PPP - ma si dovrebbe comunque
  controllare)


  Una volta scoperta la stringa di configurazione richiesta dal modem,
  la si annoti da qualche parte. Ora ci sono due possibilit: si possono
  immagazzinare queste impostazioni nella memoria non volatile del modem
  in modo da poter essere richiamate con un apposito comando AT, oppure
  si pu passare le impostazioni corrette al modem come parte del
  processo di composizione del numero.


  Se si usa il proprio modem solamente da Linux per chiamare il proprio
  ISP o server aziendale, la cosa pi semplice sar salvare la propria
  configurazione del modem nella RAM non volatile.


  Se d'altra parte, il proprio modem  usato da altre applicazioni e
  sistemi operativi,  pi sicuro passare le informazioni al modem ogni
  volta che viene fatta la chiamata cosicch  garantito che il modem 
  sempre nello stato corretto per la chiamata (ci ha pure il vantaggio
  aggiuntivo di registrare la stringa di configurazione del modem nel
  caso il modem perda il contenuto della NV-RAM, che pu sempre
  succedere).


  9.4.  Note sul controllo del flusso seriale

  Quando i dati viaggiano su linee di comunicazione seriale, pu
  capitare che i dati arrivino pi velocemente di quanto il computer
  possa gestire (il computer potrebbe essere occupato a fare
  qualcos'altro -- si ricordi che Linux  un sistema operativo multi-
  utente e multi-processo). Per poter assicurare che i dati non vengano
  persi (ovvero che i dati non superino la capacit del buffer
  d'ingresso e quindi vengano persi), sono necessari alcuni metodi per
  controllare il flusso di dati.


  Nelle linee seriali ci sono due modi per farlo:

    Usando segnali hardware (Clear To Send/Request to Send -- CTS/RTS)

    Usando segnali software (control S e control Q, noti anche come
     XON/XOFF).


  Mentre l'ultimo pu andare bene per la connessione di un terminale
  (testo), i dati in un collegamento PPP usano tutti gli 8 bit ed 
  abbastanza probabile che da qualche parte nei dati ci siano dei byte
  di dati che corrispondono a control S e control Q. Quindi, se il modem
   impostato per il controllo di flusso software, le cose possono
  rapidamente andare in sfacelo!


  Per le connessioni ad alta velocit che usano PPP (che usa dati a 8
  bit) il controllo di flusso hardware  vitale ed  per questa ragione
  che si deve usare questo tipo di controllo di flusso.


  9.5.  Verificare il proprio modem per la connessione

  Ora che si  configurato il proprio modem e la porta seriale,  una
  buona idea assicurarsi che queste impostazioni facciano realmente il
  loro lavoro, chiamando il proprio ISP e verificando di potersi
  connettere.


  Usando un pacchetto di comunicazione (come minicom), si imposti la
  inizializzazione richiesta per il PPP e per chiamare il server PPP al
  quale ci si vuole connettere in una sessione PPP.


  (Nota: a questo punto NON stiamo provando a fare una connessione PPP,
  ma solo verificando di avere il numero di telefono giusto e di
  scoprire esattamente cosa il server ci risponde per poter poi fare il
  login ed avviare il PPP).


  Durante questo processo, si catturi (registrandolo su un file)
  l'intero processo di login oppure si annoti accuratamente (molto
  accuratamente) esattamente quello che il server risponde per far
  capire che  il momento di inserire il proprio nome utente e la
  propria password (e qualsiasi altro comando necessario per stabilire
  una connessione PPP).


  Se il proprio server usa PAP, non si dovrebbe vedere una richiesta di
  login, ma sul proprio schermo si dovrebbe invece vedere la
  rappresentazione in modo testo del protocollo di controllo della
  connessione (che assomiglia tanto a della spazzatura).


  Qualche avvertenza:


    alcuni server sono abbastanza intelligenti: si pu fare il login
     usando nome/password in modo testo oppure usando PAP. Quindi se il
     proprio ISP o server aziendale usa PAP ma non si vede la spazzatura
     partire immediatamente, ci non vuol dire che si  fatto qualcosa
     in modo errato;

    alcuni server richiedono che inizialmente si immetta un po' di
     testo e poi avviano una sequanza PAP standard;

    alcuni server PPP sono passivi, ovvero stanno l semplicemente non
     spedendo niente finch il client che sta facendo il dialing non gli
     spedisce un pacchetto lcp valido. Se il server PPP a cui ci si sta
     connettendo opera in modo passivo, non si vedr mai la spazzatura!

    alcuni server non avviano il PPP finch non si preme ENTER, quindi
     non  una cattiva idea provare a farlo se ci si  connessi
     correttamente ma non si vede la spazzatura!



  Non  male connettersi almeno un paio di volte -- alcuni server
  cambiano i loro prompt (p.es. con il passare del tempo!) ogni volta
  che ci si connette. I due prompt critici che la propria macchina Linux
  ha necessit di identificare ogni volta che si fa la connessione sono:

    il prompt che richiede di inserire il proprio nome utente;

    il prompt che richiede di inserire la propria password.


  Se si deve lanciare un comando per avviare il PPP nel server, 
  necessario trovare anche il prompt che il server d una volta che ci 
  loggati per dire che ora  possibile inserire il comando per lanciare
  il PPP.


  Se il proprio server, una volta loggati, lancia automaticamente il PPP
  si inizier a vedere un po' di spazzatura sullo schermo - queste sono
  le informazioni che il server sta spedendo per avviare e configurare
  la connessione PPP.


  Dovrebbero essere qualcosa di questo tipo:


  ______________________________________________________________________
  ~y}#.!}!}!} }8}!}$}%U}"}&} } } } }%}& ...}'}"}(}"} .~~y}
  ______________________________________________________________________



  (NdT:  questa la ``spazzatura'' a cui si faceva e si far
  riferimento.)


  Su alcuni sistemi il PPP deve essere esplicitamente avviato sul
  server. Questo di solito  perch il server  stato configurato per
  permettere sia il login in PPP che il login con una shell usando la
  stessa coppia nome utente/password. Se questo  il proprio caso, si
  inserisca il comando una volta effettuato il login. Anche in questo
  caso, si vedr della spazzatura non appena viene avviato il lato
  server della connessione PPP.


  Se non si vede la spazzatura immediatamente dopo la connessione (e
  nemmeno dopo il login e l'avvio manuale del server PPP, se richiesti)
  si prema Enter per vedere se almeno questo avvia il server PPP...


  A questo punto, si pu "riattaccare" (N.d.T.: nel senso della cornetta
  del telefono) il proprio modem (solitamente, battendo velocemente +++
  e poi dando il comando ATHO una volta che il modem ha risposto con
  OK).


  Se non si riesce a far andare il proprio modem, si legga il suo
  manuale, le pagine man del software di comunicazione e il Serial
  HOWTO! Una volta fatto questo, si rifaccia (per bene) quanto spiegato
  in precedenza.


  10.  Configurare la risoluzione da nome a indirizzo (DNS)

  Mentre agli umani piace dare nomi alle cose, i computer preferiscono
  di molto i numeri.  In una rete TCP/IP (che  quello che Internet ),
  chiamiamo le macchine con un nome particolare per ogni macchina che
  vive in un particolare "dominio". Per esempio, la mia workstation
  Linux si chiama archenland e risiede nel dominio interweft.com.au. Il
  suo indirizzo "umano"  quindi archenland.interweft.com.au (che  noto
  come il FQDN - fully qualified domain name).


  Comunque, quando i computer comunicano attraverso Internet, affinch
  questa macchina possa essere trovata dagli altri computer in Internet,
   in realt nota con il suo numero IP.


  La traduzione (risoluzione) del nome (e del dominio) della macchina
  nei numeri realmente usati su Internet  compito di macchine che
  offrono il servizio di Domain Name (Domain Name Service).


  Ci che succede  questo:


    la propria macchina ha bisogno di sapere l'indirizzo IP di un
     particolare computer. L'applicazione che richiede questa
     informazione chiede al `risolutore' (resolver) nel proprio PC Linux
     di fornire questa informazione;

    il risolutore interroga il file locale degli host (/etc/hosts) e i
     domain name server di cui  a conoscenza (l'esatto comportamento
     del resolver  determinato da /etc/host.conf);

    se la risposta  trovata nel file degli host, ne viene ritornato il
     valore in risposta;

    se  specificato un domain name server, il proprio PC interroga
     questa macchina;

    se la macchina DNS sa gi il numero IP per il nome richiesto, lo
     ritorna in risposta. Se cos non , interroga altri name server in
     Internet per trovare l'informazione. Il name server poi passa
     questa informazione al risolutore e questi all'applicazione che ne
     aveva fatto richiesta.


  Quando si fa una connessione PPP, si deve dire alla propria macchina
  Linux dove andare a prendere le informazioni sulla conversione da nome
  ad indirizzo IP (risoluzione dell'indirizzo - address resolution) in
  modo che noi si possa usare i nomi delle macchine ma il nostro
  computer possa tradurli in numeri IP di cui a bisogno per fare il
  proprio lavoro.


  Un modo  di inserire ogni host con il quale si vuole dialogare nel
  file /etc/hosts (il che  realisticamente totalmente impossibile se si
   connessi ad Internet); un altro  di usare i numeri IP della
  macchine invece dei loro nomi (un esercizio di memoria impossibile
  tranne che per le LAN pi piccole).


  Il modo migliore  configurare Linux in modo che sappia dove andare a
  prendere automaticamente queste informazioni nome/numero. Questo
  servizio  fornito dai sistemi Domain Name Server (DNS). Tutto ci che
  serve  di inserire il numero (o i numeri) IP dei domain name server
  nel proprio file /etc/resolv.conf.





  10.1.  Il file /etc/resolv.conf

  L'amministatore del proprio server PPP o il servizio assistenza
  clienti dovrebbe aver fornito due numeri IP di DNS (ne  necessario
  solo uno, ma due danno un po' di ridondanza in caso di problemi in uno
  dei due).


  Come menzionato in precedenza, Linux non pu impostare il proprio name
  server nel modo che usa MS Windows 95. Quindi si deve insistere
  (mantenendo la calma) in modo che il proprio ISP fonisca questa
  informazione!


  Il proprio /etc/resolv.conf potrebbe essere qualcosa di simile a:


  ______________________________________________________________________
  domain nome.di.dominio.del.proprio.isp
  nameserver 10.25.0.1
  nameserver 10.25.1.2
  ______________________________________________________________________




  Si modifichi questo file (creandolo se necessario) per metterci le
  informazioni fornite dal proprio ISP. Dovrebbe avere la propriet e i
  permessi che seguono:



       -rw-r--r--   1 root     root           73 Feb 19 01:46 /etc/resolv.conf





  Se si  gi configurato un /etc/resolv.conf perch si  in una LAN,
  semplicemente si aggiungano i numeri IP dei server DNS per il PPP al
  file che gi esiste.


  10.2.  Il file /etc/host.conf

  Si dovrebbe pure controllare che il proprio file /etc/host.conf sia
  configurato correttamente. Dovrebbe essere una cosa cos:

  ______________________________________________________________________
  order hosts,bind
  multi on
  ______________________________________________________________________




  Ci dice al risolutore di usare le informazioni nel file degli host
  prima di interrogare un DNS per la risoluzione.


  11.  L'uso di PPP e i privilegi di root

  Poich PPP ha bisogno di impostare alcuni dispositivi di rete,
  modificare la tabella di instradamento del kernel ed altro, richiede i
  privilegi di root per farlo.

  Se altri utenti oltre a root devono poter avviare una connessione PPP,
  il programma pppd dev'essere setuid root:



       -rwsr-xr-x   1 root     root        95225 Jul 11 00:27 /usr/sbin/pppd





  Se /usr/sbin/pppd non  impostato in questo modo, allora come root si
  digiti il comando:




       chmod u+s /usr/sbin/pppd





  Quello che fa  rendere pppd eseguibile con i privilegi di root anche
  se l'eseguibile  lanciato da un utente ordinario. Ci permette agli
  utenti normali di lanciare pppd con i privilegi necessari per
  impostare le interfacce di rete e la tabella di instradamento del
  kernel.


  I programmi che sono eseguiti come 'set uid root' potenzialmente sono
  dei buchi di sicurezza e si dovrebbe essere estremamente cauti nel
  fare programmi 'suid root'. Un certo numero di programmi (incluso
  pppd) sono stati scritti con tutte le attenzioni per minimizzare i
  pericoli conseguenti alla loro esecuzione in suid root, quindi
  dovrebbe essere sicuro farlo (ma non ci sono garanzie).


  A seconda di come si vuole che il proprio sistema funzioni -
  specificatamente se si vuole che QUALSIASI utente nel proprio sistema
  sia in grado si avviare una connessione PPP, si dovrebbe rendere i
  propri script ppp-on/off leggibili ed eseguibili al mondo intero
  (probabilmente questo va bene solo se il proprio PC  usato SOLO da se
  stessi).


  Comunque, se NON si vuole che qualsiasi utente sia in grado di avviare
  una connessione PPP (per esempio, i propri figli hanno un account
  sulla macchina Linux, ma non vuoi che vadano in giro per Internet
  senza la una supervisione), bisogna creare un gruppo per il PPP (come
  root, si modifichi il file /etc/group) e:

    si renda pppd suid root, di propriet dell'utente root e del gruppo
     PPP, con gli altri permessi su questo file vuoti. Insomma dovrebbe
     avere questi permessi (o simili):


       -rwsr-x---   1 root     PPP         95225 Jul 11 00:27 /usr/sbin/pppd





    si rendano gli script ppp-on/off di propriet dell'utente root e
     del gruppo PPP;

    si rendano gli script ppp-on/off leggibili/eseguibili al gruppo PPP


       -rwxr-x---   1 root     PPP           587 Mar 14  1995 /usr/sbin/ppp-on
       -rwxr-x---   1 root     PPP           631 Mar 14  1995 /usr/sbin/ppp-off





    si rendano vuoti gli altri diritti di accesso a ppp-on/off;

    si aggiungano gli utenti che si vuole possano avviare il PPP al
     gruppo PPP in /etc/group.


  Anche se si fa questo, gli utenti ordinari non saranno ANCORA in grado
  di buttare gi la connessione via software! L'esecuzione dello script
  ppp-off richiede i privilegi di root. Comunque, qualsiasi utente pu
  semplicemente spegnere il modem (o disconnettere la linea telefonica
  da un modem interno).


  Un alternativa (e metodo migliore) a questa impostazione  di usare il
  programma sudo. Questo offre maggiore sicurezza e permetter di
  impostare le cose in modo tale che qualsiasi utente (autorizzato)
  possa attivare/disattivare la connessione usando gli script. Usando
  sudo si permetter ad un utente autorizzato di attivare/disattivare la
  connnessione PPP in modo pulito e sicuro.



  12.  Impostare i file di connessione PPP

  Adesso  necessario essere loggati come root per creare le directory e
  modificare i file necessari per impostare il PPP, anche se poi si
  vuole che il PPP sia accessibile a tutti gli utenti e non solo a root.


  Il PPP usa un certo numero di file per connettersi e impostare la
  connessione PPP. Questi differiscono per nome e locazione in PPP 2.1.2
  e 2.2.


  Per il PPP 2.1.2 i file sono:


  ______________________________________________________________________
  /usr/sbin/pppd          # l'eseguibile PPP
  /usr/sbin/ppp-on        # lo script di composizione del numero e connessione
  /usr/sbin/ppp-off       # lo script di disconnessione
  /etc/ppp/options        # le opzioni che pppd usa per tutte le connessioni
  /etc/ppp/options.ttyXX  # le opzioni specifiche per una connessione su
                          # questa porta
  ______________________________________________________________________




  Per il PPP 2.2 i file sono:






  ______________________________________________________________________
  /usr/sbin/pppd                  # l'eseguibile PPP
  /etc/ppp/scripts/ppp-on # lo script di composizione del numero e connessione
  /etc/ppp/scripts/ppp-on-dialer  # parte 1 dello script di composizione
                                  # del numero
  /etc/ppp/scripts/ppp-off        # il vero script di chat
  /etc/ppp/options            # le opzioni che pppd usa per tutte le connessioni
  /etc/ppp/options.ttyXX      # le opzioni specifiche per una connessione su
                              # questa porta
  ______________________________________________________________________




  Gli utenti di Red Hat Linux dovrebbero notare che l'installazione
  predefinita di Red Hat 4.X mette questi script in
  /usr/doc/ppp-2.2.0f-2/scripts.


  Nella propria directory /etc ci dovrebbe essere una directory ppp:



       drwxrwxr-x   2 root     root         1024 Oct  9 11:01 ppp





  Se non esiste, la si crei con questo proprietario e permessi.


  Se la directory gi esiste, dovrebbe contenere un file di opzioni
  tipo, chiamato options.tpl. Questo file  incluso qui sotto nel caso
  che non ci sia.


  Lo si stampi in quanto contiene una spiegazione di praticamente tutte
  le opzioni per PPP (utile da leggere assieme alle pagine man di pppd).
  Sebbene si possa usare questo file come punto di partenza del proprio
  file /etc/ppp/options file,  probabilmente meglio creare un proprio
  file di opzioni che non contenga tutti i commenti, il quale sar cos
  molto pi breve e pi facile da leggere e mantenere.


  Se si posseggono pi linee seriali o modem (caso tipico di un server
  PPP), si crei un file /etc/ppp/options generale contenente le opzioni
  comuni a tutte le porte seriali sulle quali si vuole supportare il
  dial in/out e poi si crei un file di opzioni individuali per ognuna
  delle line seriali sulle quali si voglia poter stabilire una
  connessione PPP con le impostazioni specifiche richieste per ogni
  porta.


  Questi file specifici per le porte si chiamano options.ttyx1,
  options.ttyx2 e cos via (dove x  la lettera appropriata per le
  proprie porte seriali).


  Comunque, per una connessione PPP singola, si pu semplicemente usare
  il file /etc/ppp/options. In alternativa si possono mettere tutte le
  opzioni come argomenti per il comando pppd stesso.


   pi semplice mantenere una configurazione che usa i file
  /etc/ppp/options.ttySx. Se si usa PPP per connettersi ad un certo
  numero di siti diversi, si possono creare file di opzioni per ogni
  sito in /etc/ppp/options.site e poi specificare il file di opzioni
  come un parametro del comando PPP quando ci si connette (usando
  l'opzione file file_opzioni nella riga di comando di pppd).


  12.1.  Il file di opzioni tipo options.tpl

  Alcune distribuzioni sembrano aver perso il file options.tpl, e quindi
  eccone qui una versione completa. Suggerisco di NON modificare questo
  file per creare il proprio (o i propri) file /etc/ppp/options.
  Piuttosto, lo si copi su un nuovo file e poi si modifichi quello. Se
  si fa casino con le modifiche  sempre possibile tornare a quello
  originale e ricominciare.




















































  ______________________________________________________________________
  # /etc/ppp/options -*- sh -*- opzioni generali per pppd
  # created 13-Jul-1995 jmk
  # autodate: 01-Aug-1995
  # autotime: 19:45

  # Usa l'eseguibile o il comando shell specificato per impostare la
  # linea seriale. Questo script solitamente userebbe il programma
  # "chat" per dialogare con il modem ed avviare la sessione ppp
  # remota.
  #connect "echo Bisogna installare un comando connect."

  # Avvia l'eseguibile o il comando shell specificato dopo che pppd ha
  # concluso la connessione, Questo script potrebbe, ad esempio, inviare
  # comandi al modem per fargli riagganciare se non sono disponibili i
  # segnali di controllo hardware del modem.
  #disconnect "chat -- \d+++\d\c OK ath0 OK"

  # mappa di caratteri asincrona -- esadecimale a 32-bit; ogni bit  un
  # carattere del quale  necessario fare l'escape quando pppd lo
  # riceve. 0x00000001 rappresenta '\x01', e 0x80000000 rappresenta
  # '\x1f'.
  #asyncmap 0

  # Richiede che il peer si autentifichi da solo prima di permettere la
  # trasmissione o la ricezione di pacchetti di rete.
  #auth

  # Usa il controllo di flusso hardware (i.e. RTS/CTS) per controllare
  # il flusso di dati sulla porta seriale.
  #crtscts

  # Usa il controllo di flusso software (i.e. XON/XOFF) per controllare
  # il flusso di dati sulla porta seriale.
  #xonxoff

  # Aggiunge, quando la negoziazione IPCP  completata con successo, un
  # instradamento predefinito nella tabella di instradamento di sistema,
  # usando il peer come gateway. Questa voce viene automaticamente
  # rimossa quando la connessione PPP  interrotta.
  #defaultroute

  # Specifica che di certi caratteri dovrebbe essere fatto l'escape in
  # trasmissione (indipendentemente dal fatto il peer richieda tale
  # operazione con la sua mappa di caratteri di controllo
  # asincrona). Questi caratteri di cui dev'essere fatto l'escape sono
  # specificati come una lista di numeri esadecimali separati da
  # virgole. Si noti che pu essere specificato praticamente qualsiasi
  # carattere, mentre l'opzione asyncmap permette di specificare solo
  # caratteri di controllo. I caratteri dei quali non  possibile fare
  # l'escape sono quelli con valore esadecimale 0x20 - 0x3f o 0x5e.
  #escape 11,13,ff

  # Non usa le linee di controllo del modem.
  #local

  # Specifica che pppd dovrebbe usare un lock in stile UUCP sul
  # dispositivo seriale per assicurare l'accesso esclusivo al
  # dispositivo.
  #lock

  # Usa le linee di controllo del modem.  In Ultrix, questa opzione
  # implica il controllo hardware del flusso come l'opzione
  # crtscts. (Questa opzione non  completamente implementata.)
  #modem

  # Imposta il valore di MRU [Maximum Receive Unit - Unit Massima di
  # Ricezione] a <n> per la negoziazione. pppd chieder al peer di
  # inviare pacchetti di non pi di <n> byte. Il minimo valore di MRU 
  # 128. Il valore predefinito  1500. Un valore di 296  raccomandato
  # per connessioni lente (40 byte per l'header TCP/IP + 256 byte di
  # dati).
  #mru 542

  # Imposta la netmask per l'interfaccia a <n>, una netmask a 32 bit in
  # notazione "decimal dot" (p.es. 255.255.255.0).
  #netmask 255.255.255.0

  # Disabilita il comportamento predefinito quando non  specificato
  # nessun indirizzo IP locale, che  di determinare (se possibile)
  # l'indirizzo IP locale dal nome dell'host.  Con questa opzione, il
  # peer deve fornire un indirizzo IP locale durante le negoziazione
  # IPCP (a meno che non sia specificato esplicitamente nella riga di
  # comando o nel file delle opzioni).
  #noipdefault

  # Abilita le opzioni "passive" nell'LCP. Con questa opzione, pppd
  # prover ad iniziare la connessione; se non riceve risposta dal peer,
  # allora pppd attender passivamente un pacchetto LCP valido da parte
  # del peer (invece di uscire, come farebbe senza questa opzione).
  #passive

  # Con questa opzione, pppd non trasmetter pacchetti LCP per iniziare
  # una connessione finch non riceve un pacchetto LCP valido dal peer
  # (come per l'opzione "passive" per le vecchie versioni di pppd).
  #silent

  # Non richiede o permette la negoziazione di qualsiasi opzione per LCP
  # o IPCP (usa i valori predefiniti).
  #-all

  # Disabilita la negoziazione di compressione Indirizzo/Controllo (usa
  # quanto predefinito, ovvero campi address/control disabilitati).
  #-ac

  # Disabilita la negoziazione asyncmap (usa la asyncmap predefinita,
  # i.e. fa l'escape di tutti i caratteri di controllo).
  #-am

  # Non fa il fork per diventare un processo in background (altrimenti
  # pppd lo farebbe se  specificato un dispositivo seriale).
  #-detach

  # Disabilita la negoziazione dell'indirizzo IP (con questa opzione
  # l'indirizzo IP remoto deve essere specificato con un'opzione nella
  # riga di comando o nel file delle opzioni).
  #-ip

  # Disabilita la negoziazione magic number. Con questa opzione pppd non
  # pu rilevare una linea cortocircuitata (looped-back).
  #-mn

  # Disabilita la negoziazione MRU [Maximum Receive Unit] (usa il valore
  # predefinito, i.e. 1500).
  #-mru

  # Disabilita la negoziazione della compressione del campo protocollo
  # ("protocol field compression") (usa quanto predefinito,
  # i.e. compressione del campo protocollo disabilitata).
  #-pc

  # Richiede che il peer si autentifichi da solo usando il PAP. Questo
  # richiede un'autentificazione a DUE VIE - NON usare per una
  # connessione standard con autentificazione PAP ad un ISP, in quanto
  # richiede che anche la macchina dell'ISP si autentifichi da sola
  # nella propria macchina (e non sar in grado di farlo).
  #+pap

  # Non accetta di autentificare usando PAP.
  #-pap

  # Richiede che il peer di autentifichi da solo usando
  # l'autentificazione CHAP [Cryptographic Handshake Authentication
  # Protocol]. Questo richiede un'autentificazione a DUE VIE - NON
  # usare per una connessione standard con autentificazione CHAP ad un
  # ISP, in quanto richiede che anche la macchina dell'ISP si
  # autentifichi da sola nella propria macchina (e non sar in grado di
  # farlo).
  #+chap

  # Non accetta di autentificare usando CHAP.
  #-chap

  # Disabilita la negoziazione della compressione dell'header IP in
  # stile Van Jacobson (usa quanto predefinito, i.e. nessuna compressione).
  #-vj

  # Incrementa il livello di debug (analoga -d).  Se  data questa
  # opzione, pppd registrer il contenuto di tutti i pacchetti spediti e
  # ricevuti in un formato leggibile.  I pacchetti sono registrati
  # usando syslog con funzionalit daemon e debug. Queste informazioni
  # possono essere redirette ad un file impostando opportunamente il
  # file /etc/syslog.conf (vedere syslog.conf(5)) (se pppd  compilato
  # abilitando l'extra debugging, registrer i messaggi usando le
  # funzionalit local2 invece di daemon).
  #debug

  # Aggiunge il nome del dominio <d> al nome dell'host locali per scopi
  # di autentificazione.  Per esempio, se gethostname() ritorna il nome
  # porsche, ma il FQDN (Fully Qualified Domain Name) 
  # porsche.Quotron.COM, si dovrebbe usare l'opzione domain per
  # impostare il nome dominio a Quotron.COM.
  #domain <d>

  # Abilita il codice di debug nel driver del PPP a livello kernel.
  # L'argomento n  un numero che  la somma dei seguenti valori: 1 per
  # abilitare i messaggi di debug generici, 2 per richiedere la
  # visualizzazione del contenuto dei pacchetti ricevuti, e 4 per
  # visualizzare quello dei pacchetti trasmessi.
  #kdebug n

  # Imposta il valore di MTU [Maximum Transmit Unit - Unit Massima di
  # Trasferimento] a <n>. A meno che il peer non richieda un valore
  # minore tramite la negoziazione MRU, pppd chieder al codice di
  # gestione della rete del kernel di inviare attraverso l'interfaccia
  # di rete del PPP pacchetti di dati di non pi di n byte.
  #mtu <n>

  # Imposta il nome del sistema locale ad <n> per scopi di
  # autentificazione. Se si sta usando PAP/CHAP probabilmente dev'essere
  # impostato al nome utente del proprio ISP.
  #name <n>

  # Imposta a <n> il nome utente da usare per autentificare questa
  # macchina con il peer usando il PAP.
  # NON usare questa opzione se si sta usando l'opzione 'name'
  # suddetta.
  #user <u>
  # Obbliga l'uso del nome dell'host come nome del sistema locale per
  # scopi di autentificazione (ha priorit sull'opzione name).
  #usehostname

  # Imposta a <n> il nome assunto del sistema remoto per scopi di
  # autentificazione.
  #remotename <n>

  # Aggiunge una voce nella tabella ARP [Address Resolution Protocol -
  # Protocollo di Risoluzione Indirizzi] di sistema con l'indirizzo IP
  # del peer e l'indirizzo Ethernet di questo sistema.
  #proxyarp

  # Usa la base di dati di password di sistema per autentificare con il
  # peer usando PAP.
  #login

  # Se  specificata questa opzione, pppd invier un frame echo-request
  # LCP al peer ogni n secondi.  Sotto Linux, echo-request  inviata
  # quando per n secondi non si sono ricevuti pacchetti dal
  # peer. Normalmente il peer dovrebbe rispondere a echo-request
  # inviando un echo-reply. Questa opzione pu essere usata con
  # l'opzione lcp-echo-failure per rilevare che il peer non  pi
  # connesso.
  #lcp-echo-interval <n>

  # Se  specificata questa opzione, pppd presumer che il peer  morto
  # se sono inviati n echo-request LCP senza ricevere un echo-reply LCP
  # valido. Se questo accade, pppd terminer la connessione. L'uso di
  # questa opzione richiede un valore non nullo come parametro a
  # lcp-echo-interval. Questa opzione pu essere usata per abilitare pppd
  # a terminare dopo l'interruzione della connessione fisica (p.es. il
  # modem ha messo gi la linea) nelle situazioni nella quali non sia
  # disponibile il controllo hardware delle linee da parte del modem.
  #lcp-echo-failure <n>

  # Imposta l'intervallo di riavvio LCP (timeout nella ritrasmissione) a
  # <n> secondi (valore predefinito 3).
  #lcp-restart <n>

  # Imposta il massimo numero di trasmissioni di terminate-request LCP a
  # <n> (valore predefinito 3).
  #lcp-max-terminate <n>

  # Imposta il numero massimo di trasmissioni di configure-request LCP a
  # <n> (valore predefinito 10).
  # Alcuni server PPP non lenti nell'avviarsi. Si pu dover incrementare
  # questo valore se si ottengono errori tipo 'serial line looped back'
  # e si  SICURI di aver fatto correttamente il login e che il il PPP
  # dovrebbe essere gi avviato sul server.
  #lcp-max-configure <n>

  # Imposta il numero massimo di configure-NAK LCP ricevuti prima di
  # inviare configure-Rejects <n> (valore predefinito 10).
  #lcp-max-failure <n>

  # Imposta l'intervallo di riavvio di IPCP (timeout in ritrasmissione)
  # a <n> secondi (valore predefinito 3).
  #ipcp-restart <n>

  # Imposta il numero massimo di trasmissioni di terminate-request IPCP
  # a <n> (valore predefinito 3).
  #ipcp-max-terminate <n>

  # Imposta il numero massimo di trasmissioni di configure-request IPCP
  # a <n> (valore predefinito 10).
  #ipcp-max-configure <n>

  # Imposta il numero massimo di configure-NAK IPCP ricevuti prima di
  # inviare configure-Rejects <n> (valore predefinito 10).
  #ipcp-max-failure <n>

  # Imposta l'intervallo di riavvio PAP (timeout in ritrasmissione)
  # a <n> secondi (valore predefinito 3).
  #pap-restart <n>

  # Imposta il numero massimo di trasmissioni di authenticate-request
  # PAP a <n> (valore predefinito 10).
  # <n> (default 10).
  #pap-max-authreq <n>

  # Imposta l'intervallo di riavvio CHAP (timeout in ritrasmissione per
  # challenge) a <n> secondi (valore predefinito 3).
  #chap-restart <n>

  # Imposta il numero massimo di trasmissioni challenge CHAP a <n>
  # (valore predefinito 10).
  #chap-max-challenge

  # Con questa opzione, pppd reinterrogher il peer ogni <n> secondi.
  #chap-interval <n>

  # Con questa opzione, pppd accetter il suggerimento del peer per il
  # proprio indirizzo IP locale, anche se l'indirizzo IP locale  stato
  # specificato in un'opzione.
  #ipcp-accept-local

  # Con questa opzione, pppd accetter il suggerimento del peer per il
  # suo indirizzo IP (remoto), anche l'indirizzo IP remoto  stato
  # specificato in un'opzione.
  #ipcp-accept-remote
  ______________________________________________________________________





  12.2.  Quali opzioni dovrei usare? (No PAP/CHAP)

  Beh, come in tutte le cose... dipende. Le opzioni qui specificate
  dovrebbero funzionare con la maggior parte dei server.


  Comunque, se NON funzionassero, SI LEGGA IL FILE DI OPZIONI TIPO
  (/etc/ppp/options.tpl) e la pagina man di pppd e si parli con
  l'amministratore o il supporto clienti del server a cui ci si
  connette.


  Si dovrebbe inoltre notare che gli script di connessione qui
  presentati usano alcune opzioni in riga di comando di pppd per rendere
  il tutto un poco pi semplice da modificare.










  ______________________________________________________________________
  # /etc/ppp/options (NIENTE PAP/CHAP)
  #
  # Previene pppd da fare il fork e passare in background
  -detach
  #
  # usa le linee di controllo del modem
  modem
  # usa il lock in stile uucp per assicurare l'accesso esclusivo al
  # dispositivo seriale.
  lock
  # usa il controllo di flusso hardware
  crtscts
  # crea un instradamento predefinito per questa connessione nella
  # tabella di instradamento
  defaultroute
  # NON imposta l'"escape" di nessuna sequenza di controllo
  asyncmap 0
  # usa la dimensione massima dei pacchetti in trasmissione di 552 byte
  mtu 552
  # usa la dimensione massima dei pacchetti in ricezione di 552 byte
  mru 552
  #
  #-------FILE DEL FILE ESEMPIO /etc/ppp/options (niente PAP/CHAP)
  ______________________________________________________________________




  13.  Se il proprio server usa PAP (Password Authentication Protocol)

  Se il server al quale ci connette richiede l'autentificazione PAP o
  CHAP c' un po' pi di lavoro da fare.


  Al file delle opzioni precedente, si aggiungano le seguenti righe:

  ______________________________________________________________________
  #
  # forza pppd a usare il proprio nome utente nell'ISP come 'nome host'
  # durante il processo di autentificazione
  name <proprio nome utente nell'ISP>     # si deve modificare questa riga
  #
  # Se si fa girare un *server* PPP e si ha bisogno di forzare il PAP o
  # il CHAP si tolga il commento alla riga appropriata fra le due che
  # seguono. NON usarle se si  un client che si connette ad un server
  # PPP (anche se questi usa PAP o CHAP) in quanto dicono al SERVER di
  # autentificare se stesso nella propria macchina (e quasi certamente
  # non potr farlo e la connessione fallir).
  #+chap
  #+pap
  #
  # Se si usano secret CRIPTATI nel file /etc/ppp/pap-secrets, allora
  # togliere il commento alla riga che segue.
  # Nota: questo NON  la stessa cosa che usare le password MS criptate
  # come si pu fare con MS RAS in Windows NT.
  #+papcrypt
  ______________________________________________________________________




  13.1.  Usare MSCHAP

  Il RAS di Microsoft Windows NT pu essere configurato per usare una
  variante di CHAP (Challenge/Handshake Authentication Protocol). Nella
  distribuzione sorgente di PPP,   possibile trovare un file chiamato
  README.MSCHAP80 che lo discute.


  Abilitando il debug di pppd  possibile determinare se il server
  richiede l'autentificazione usando questo protocollo. Infatti se il
  server la richiede, si vedr una riga di questo tipo:


  ______________________________________________________________________
  rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap 80> <magic 0x46a3>]
  ______________________________________________________________________




  L'informazione critica  auth chap 80.


  Per poter usare MS CHAP, sar necessario ricompilare pppd per
  supportarlo. Si vedano le istruzioni nel file README.MSCHAP80 nei
  sorgenti di PPP per le istruzioni su come compilare e usare questa
  variante.


  Si dovrebbe notare che al momento il codice supporta solo i client PPP
  Linux che si connettono ad un server MS Windows NT. NON supporta la
  configurazione di un server PPP Linux che usi MSCHAP80 come
  autentificazione dei client.


  13.2.  Il file secrets di PAP/CHAP

  Se si usa l'autentificazione pap o chap, allora si deve creare anche
  il file secrets. Questi sono:

  ______________________________________________________________________
  /etc/ppp/pap-secrets
  /etc/ppp/chap-secrets
  ______________________________________________________________________




  Il proprietario dev'essere l'utente root, il gruppo root e per ragioni
  di sicurezza i permessi devono essere impostati a 740.


  La prima cosa da notare su PAP e CHAP  che sono stati progettati per
  autenticare computer non utenti.


  ``Huh? Qual  la differenza?'' Vi chiederete.


  Beh, una volta che la propria macchina ha fatto la sua connessione PPP
  al server, QUALSIASI utente nel proprio sistema pu usare quella
  connessione: non solamente voi. Questo spiega perch  possibile
  creare una connessione WAN (wide area network) che unisca assieme due
  LAN (local area networks) usando PPP.


  PAP pu (e CHAP LO FA) richiedere una autentificazione bidirezionale,
  ovvero ognuno dei due sistemi richiede all'altro un nome valido e un
  secret. Comunque, questo NON  il modo nel quale funzionano le
  connessioni autenticate con PAP per la maggioranza dei server PPP.
  Il vostro ISP probabilmente vi avr assegnato un nome utente e una
  password per permettervi la connessione al loro sistema e quindi ad
  Internet. Il provider non  affatto interessato al nome del vostro
  computer, quindi probabilmente si dovr usare il proprio nome utente
  nel proprio ISP come nome per il proprio computer.


  Ci  fatto usando usando l'opzione name nome_utente di pppd. Quindi,
  se si usa il nome utente assegnato dal proprio ISP, si aggiunga la
  riga

  ______________________________________________________________________
  name nome_utente_nel_proprio_ISP
  ______________________________________________________________________



  al proprio file /etc/ppp/options.


  Tecnicamente, si dovrebbe in realt usare user
  nome_utente_nel_proprio_ISP per PAP, ma pppd  suffientemente
  intelligente da interpretare name come user se  richiesto l'uso di
  PAP. Il vantaggio di usare l'opzione name  che  valida anche per
  CHAP.


  Poich PAP  per l'autentificazione di computer, tecnicamente si
  dovrebbe specificare anche un nome remoto per il computer. Comunque,
  poich molti hanno solo un ISP, si pu usare una wildcard (*) per il
  nome del computer remoto nel file secrets.


  Non  male notare anche che molti ISP usano banchi di modem multipli
  connessi a differenti server terminali, ognuno con un nome diverso, ma
  ai quali si ACCEDE (a rotazione) da un unico numero. Pu essere quindi
  un po' difficile in alcuni casi sapere qual' il nome del computer
  remoto in quanto dipende a quale server terminale ci si connette!


  13.3.  Il file secrets di PAP

  Il file /etc/ppp/pap-secrets  qualcosa di simile a

  ______________________________________________________________________
  # Secrets per l'autentificazione usando PAP
  # client        server       secret     indirizzi_IP_locali_accettabili
  ______________________________________________________________________




  I quattro campi sono delimitati da spazi bianchi e l'ultimo pu essere
  vuoto (il che  probabilmente quello che si vuole per l'allocazione di
  indirizzi IP dinamica e probabilmente anche per quella statica da
  parte del proprio ISP).


  Supponiamo che il proprio ISP assegni il nome utente fred e la
  password flintstone, si dovr aggiungere l'opzione name fred in
  /etc/ppp/options[.ttySx] e modificare il file /etc/ppp/pap-secrets
  come segue




  ______________________________________________________________________
  # Secrets per l'autentificazione usando PAP
  # client        server  secret          indirizzi_IP_locali_accettabili
  fred              *    flintstone
  ______________________________________________________________________




  Questo file dice per il nome di macchina locale fred (che si  detto
  di usare a pppd anche se non  il nome locale della propria macchina)
  e per QUALSIASI server, bisogna usare la password (secret) flintstone.


  Si noti che non c' bisogno di specificare un indirizzo IP locale, a
  meno che non si voglia FORZARE un indirizzo IP statico particolare.
  Anche se si prova,  abbastanza difficile che funzioni in quanto la
  maggior parte dei server PPP (per ragioni di sicurezza) non permettono
  al sistema remoto di impostare il numero IP che gli stanno per dare.


  13.4.  Il file secrets di CHAP

  Ci richiede di avere metodi di autentificazione mutua, ovvero si deve
  permettere alla propria di macchina di autentificare il server remoto
  E al server remoto di autentificare la propria macchina.


  Quindi, se la propria macchina  fred ed il sistema remoto  barney,
  la propria macchina dovrebbe usare name fred remotename barney e la
  macchina remota dovrebbe usare name barney remotename fred nei
  rispettivi file /etc/ppp/options.ttySx.


  Il file /etc/chap-secrets per fred dovrebbe assomigliare a

  ______________________________________________________________________
  # Secrets per l'autentificazione usando CHAP
  # client        server  secret            indirizzo IP locale accettabile
  fred            barney  flintstone
  barney          fred    wilma
  ______________________________________________________________________




  e per barney


  ______________________________________________________________________
  # Secrets per l'autentificazione usando CHAP
  # client        server  secret            indirizzo IP locale accettabile
  barney          fred    flintstone
  fred            barney  wilma
  ______________________________________________________________________




  Si noti in particolare che entrambe le macchine devono avere voci per
  l'autentificazione bidirezionale. Ci permette alla macchina locale di
  autentificarsi presso il server E a quella remota di autentificarsi in
  quella locale.



  13.5.  Gestione di connessioni multiple autentificate con PAP

  Alcuni possono connettersi a pi di un server che usa PAP. Finch il
  proprio nome utente  diverso su ogni macchina alla quale ci si vuole
  connettere, questo non  un problema.


  Comunque, molti utenti hanno lo stesso nome utente su due (o pi o
  anche su tutti) sistemi sui quali si connettono. Ci causa un problema
  nella corretta selezione della riga appropriata da /etc/ppp/pap-
  secrets.


  Come ci si potrebbe aspettare, PPP fornisce un meccanismo per
  risolverlo. PPP permette di impostare un 'nome assunto' per la
  terminazione remota della connessione (il server) usando l'opzione
  remotename di pppd.


  Si supponga di connettersi a due server PPP usando il nome utente
  fred. Allora si imposter il proprio /etc/ppp/pap-secrets a qualcosa
  cos


  ______________________________________________________________________
  fred    pppserver1      barney
  fred    pppserver2      wilma
  ______________________________________________________________________




  Ora, per impostare la connessione a pppserver1 si dovrebbe usare name
  fred remotename pppserver1 nel proprio ppp-options mentre per
  pppserver2 name fred remotename pppserver2.


  Poich  possibile selezionare il file delle opzioni del ppp da usare
  con pppd usando l'opzione file nomefile, si pu creare uno script per
  connettersi ad ognuno dei propri server PPP, prendendo correttamente
  il file delle opzioni da usare e quindi selezionando l'opzione
  remotename giusta.


  14.  Instaurare manualmente una connessione PPP

  Una volta creati i propri file /etc/ppp/options e /etc/resolv.conf (e,
  se necessario, il file /etc/ppp/pap|chap-secrets),  possibile
  verificare le impostazioni stabilendo manualmente una connessione PPP
  (una volta che la connessione funziona manualmente, automatizzeremo il
  processo).


  Per far ci, il proprio software di comunicazione dev'essere in grado
  di uscire SENZA reinizializzare il modem. Minicom lo pu fare con ALT
  Q (o nelle versioni pi vecchie con CTRL ALT Q).


  Ci si assicuri di essere loggati come root.


  Si lanci il proprio software di comunicazione (come minicom), si
  componga il numero del server e si faccia normalmente il login. Se 
  necessario dare un comando per avviare il PPP nel server, lo si
  faccia. Ora si vedranno le porcherie di cui si  parlato in
  precedenza.
  Se si usa pap o chap, allora semplicemente connettendosi al sistema
  remoto si dovrebbe far partire il ppp e si vedranno le porcherie senza
  fare il login (sebbene ci possa anche non accadere per alcuni server
  - si provi a premere Enter e si veda se iniziano le porcherie).


  Ora si esca dal software di comunicazione senza reinizializzare il
  modem (ALT Q o CTL A Q in minicom) e al prompt di Linux (come root) si
  digiti


  ______________________________________________________________________
  pppd -d -detach /dev/ttySx 38400 &
  ______________________________________________________________________




  L'opzione -d abilita il debug - la conversazione di avvio di
  connessione ppp sar registrata nei file di log del proprio sistema -
  il che torna utile in caso di problemi.


  Le lucette del proprio modem dovrebbero accendersi e spegnersi finch
  la connessione PPP non  stabilita.


  A questo punto si pu dare un'occhiata all'interfaccia PPP, usando il
  comando


  ______________________________________________________________________
  ifconfig
  ______________________________________________________________________




  Oltre ai vari dispositivi Ethernet e loopback che si possiedono, si
  dovrebbe vedere qualcosa di simile a


  ______________________________________________________________________
  ppp0     Link encap:Point-Point Protocol
           inet addr:10.144.153.104  P-t-P:10.144.153.51 Mask:255.255.255.0
           UP POINTOPOINT RUNNING  MTU:552  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0
           TX packets:0 errors:0 dropped:0 overruns:0
  ______________________________________________________________________




  dove

    inet addr:10.144.153.10  il numero IP del proprio capo della
     connessione.

    P-t-P:10.144.153.5  il numero IP del SERVER.

  (naturalmente, ifconfig non riporter questi numeri IP ma quelli usati
  dal proprio server PPP).


  Nota: ifconfig dice anche che la connessione  SU e FUNZIONANTE!

  Se non viene riportato nessun dispositivo ppp o qualcosa di simile a


  ______________________________________________________________________
  ppp0     Link encap:Point-Point Protocol
           inet addr:0.0.0.0  P-t-P:0.0.0.0  Mask:0.0.0.0
           POINTOPOINT  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0
           TX packets:0 errors:0 dropped:0 overruns:0
  ______________________________________________________________________




  la propria connessione PPP non  stata fatta...si veda oltre per il
  debug!


  Si dovrebbe essere in grado di vedere anche un instradamento all'host
  remoto (ed oltre). Per far ci, si lanci il comando


  ______________________________________________________________________
  route -n
  ______________________________________________________________________




  Si dovrebbe vedere qualcosa di simile a


  ______________________________________________________________________
  Kernel routing table
  Destination     Gateway         Genmask         Flags MSS    Window Use Iface
  10.144.153.3    *               255.255.255.255 UH    1500   0        1 ppp0
  127.0.0.0       *               255.0.0.0       U     3584   0       11 lo
  10.0.0.0        *               255.0.0.0       U     1500   0       35 eth0
  default         10.144.153.3    *               UG    1500   0        5 ppp0
  ______________________________________________________________________




  Di particolare importanza, si noti che ci sono DUE voci che puntano
  alla propria interfaccia ppp.


  La prima  un instradamento di tipo HOST (indicato dal flag H) e che
  permette di vedere l'host al quale si  connessi, ma niente altro.


  La seconda  l'instradamento predefinito (default), stabilito fornendo
  a pppd l'opzione defaultroute. Questo  l'instradamento che dice al
  proprio PC Linux di inviare qualsiasi pacchetto NON destinato alle
  Ethernet locali - per le quali ci sono degli instradamenti specifici -
  al server PPP stesso. I server PPP  quindi responsabile
  dell'instradamento dei nostri pacchetti verso Internet e
  dell'instradamento dei pacchetti di ritorno verso di noi.


  Se non si vede una tabella di instradamento con queste due voci,
  qualcosa  andato storto. In particolare se i log di sistema mostrano
  un messaggio che dice che pppd non ha rimpiazzato un instradamento
  predefinito, allora si ha l'instradamento predefinito che punta alla
  propria interfaccia Ethernet - il quale DEVE essere rimpiazzato da un
  instradamento di rete specifico: SI PU AVERE SOLO UN INSTRADAMENTO
  PREDEFINITO!!!


  Si dovranno allora esplorare i file di inizializzazione del sistema
  per trovare dove viene impostato questo instradamento predefinito
  (probabilmente verr usato un comando tipo route add default...).  Si
  cambi questo comando in qualcosa di simile a route add net....


  Ora si verifichi la connessione facendo 'ping' al server usando il
  numero IP riportato dall'output di ifconfig, i.e.


  ______________________________________________________________________
  ping 10.144.153.51
  ______________________________________________________________________




  Si dovrebbe ricevere un output simile a


  ______________________________________________________________________
  PING 10.144.153.51 (10.144.153.51): 56 data bytes
  64 bytes from 10.144.153.51: icmp_seq=0 ttl=255 time=328.3 ms
  64 bytes from 10.144.153.51: icmp_seq=1 ttl=255 time=190.5 ms
  64 bytes from 10.144.153.51: icmp_seq=2 ttl=255 time=187.5 ms
  64 bytes from 10.144.153.51: icmp_seq=3 ttl=255 time=170.7 ms
  ______________________________________________________________________




  Questo elenco andr avanti per sempre - per fermarlo si usi CTRL C, e
  a quel punto si riceveranno un altro po' di informazioni:


  ______________________________________________________________________
  --- 10.144.153.51 ping statistics ---
  4 packets transmitted, 4 packets received, 0% packet loss
  round-trip min/avg/max = 170.7/219.2/328.3 ms
  ______________________________________________________________________




  Fin qua tutto bene.


  Ora si provi a fare il ping ad un host usando il suo nome (non il nome
  del server PPP stesso ma un host in un altro sito che si SA essere
  probabilmente attivo...). Per esempio


  ______________________________________________________________________
  ping sunsite.unc.edu
  ______________________________________________________________________




  A questo punto ci sar una piccola pausa mentre Linux ottiene dal DNS
  specificato in /etc/resolv.conf il numero IP per il nome host "fully
  qualified" al quale si  fatto il ping - quindi non ci si preoccupi
  (si vedranno comunque le lucette del modem lampeggiare). In breve si
  otterr un output simile a


  ______________________________________________________________________
   PING sunsite.unc.edu (152.2.254.81): 56 data bytes
  64 bytes from 152.2.254.81: icmp_seq=0 ttl=254 time=190.1 ms
  64 bytes from 152.2.254.81: icmp_seq=1 ttl=254 time=180.6 ms
  64 bytes from 152.2.254.81: icmp_seq=2 ttl=254 time=169.8 ms
  64 bytes from 152.2.254.81: icmp_seq=3 ttl=254 time=170.6 ms
  64 bytes from 152.2.254.81: icmp_seq=4 ttl=254 time=170.6 ms
  ______________________________________________________________________




  Ancora, lo si fermi con CTRL C per ottenere le statistiche...


  ______________________________________________________________________
  --- sunsite.unc.edu ping statistics ---
  5 packets transmitted, 5 packets received, 0% packet loss
  round-trip min/avg/max = 169.8/176.3/190.1 ms
  ______________________________________________________________________




  Se non si riceve nessuna risposta, si provi a fare il ping
  all'indirizzo IP del server DNS del proprio ISP. Se si ottiene
  risposta, allora sembra proprio che ci sia qualche problema nel
  proprio /etc/resolv.conf.


  Se non funziona, invece si ha un problema di instradamento oppure il
  proprio ISP ha qualche problema ad instradare i pacchetti di ritorno.
  Si verifichi che la tabella di instradamento sia come quella vista
  prima, e se  a posto si contatti il proprio ISP. Un buon test per ISP
   di usare un altro sistema operativo per connettersi. Se si pu
  andare oltre il proprio ISP con quello, allora il problema dipende
  dalla propria terminazione del collegamento.


  Se tutto funziona, si pu buttare gi la connessione digitando


  ______________________________________________________________________
  ppp-off
  ______________________________________________________________________




  Dopo una breve pausa, il modem dovrebbe riattaccare da solo.


  Se questo non funziona, si spenga il proprio modem oppure si lanci il
  proprio software di comunicazione e si interrompa il modem con +++ e
  poi si riagganci con ATH0 quando si riceve il prompt OK del modem.


  Si deve inoltre cancellare il file di lock creato da pppd




  ______________________________________________________________________
  rm -f /var/lock/LCK..ttySx
  ______________________________________________________________________




  15.  Automatizzare la propria connessione e creazione degli script

  Sebbene si possa continuare a connettersi a mano come appena mostrato,
   molto pi elegante creare alcuni script che lo facciano
  automaticamente per noi.


  Un insieme di script che automatizzano il login e l'avvio del PPP
  cosicch tutto quello che si deve fare (come root o come membro del
  gruppo PPP)  dare un unico comando che avvii la connessione.


  15.1.  Script di connessione per l'autentificazione con Nome
  utente/Password

  Se il proprio ISP NON richiede l'uso di PAP/CHAP, questi sono gli
  script per te!


  Se il pacchetto ppp  installato correttamente, si dovrebbero avere
  due file di esempio. Per PPP 2.1.2 sono in /usr/sbin e per PPP 2.2
  sono in /etc/ppp/scripts. Si chiamano


  per PPP-2.1.2



       ppp-on
       ppp-off





  e per PPP-2.2



       ppp-off
       ppp-on
       ppp-on-dialer





  Ora, se si sta usando PPP 2.1.2, suggerisco caldamente di cancellare i
  file d'esempio. Ci sono potenziali problemi con questi. E non venitemi
  a dire che funzionano bene, li ho usati per anni anch'io (e li
  raccomandavo nella prima versione di questo HOWTO)!


  A beneficio degli utilizzatori di PPP 2.1.2, qui sono riportate delle
  versioni d'esempio MIGLIORI prese dalla distribuzione di PPP 2.2.
  Suggerisco di copiarsi ed usare questi script invece dei vecchi script
  di PPP 2.1.2.


  15.2.  Lo script ppp-on

  Questo  il primo di una COPPIA di script che lanciano la connessione.


  ______________________________________________________________________
  #!/bin/sh
  #
  # Script per inizializzare una connessione PPP. Questo  il primo di
  # una coppia di script. Questa coppia di script non  sicura in quanto
  # il codice  visibile usando il comando `ps'. Comunque,  semplice.
  #
  # Questi sono i parametri. Li si modifichi a quel che necessita.
  TELEPHONE=555-1212      # Il numero telefonico per la connessione
  ACCOUNT=george          # Il nome di account per il login (come in
                          # 'George Burns')
  PASSWORD=gracie         # La password per questo account (e 'Gracie Allen')
  LOCAL_IP=0.0.0.0        # Indirizzo IP locale, se noto. Dinamico = 0.0.0.0
  REMOTE_IP=0.0.0.0       # Indirizzo IP remoto, se desiderato.
                          # Dinamico = 0.0.0.0
  NETMASK=255.255.255.0   # La netmask appropriata, se necessaria
  #
  # Gli esporta rendendoli globali cos saranno disponibili anche a
  # 'ppp-on-dialer'
  export TELEPHONE ACCOUNT PASSWORD
  #
  # Questa  la posizione dello script che compone il numero e fa il
  # login. Si invita ad usare il nome file assoluto in quanto la
  # variabile $PATH non  usata nelle opzioni di connessione (e farlo in
  # un account come 'root' sarebbe un buco di sicurezza, quindi non lo
  # si richieda).
  #
  DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
  #
  # Inizializza la connessione
  #
  #
  exec /usr/sbin/pppd debug /dev/ttySx 38400 \
          $LOCAL_IP:$REMOTE_IP \
          connect $DIALER_SCRIPT
  ______________________________________________________________________




  Ecco qui lo script ppp-on-dialer:




















  ______________________________________________________________________
  #!/bin/sh
  #
  # Questa  la seconda parte dello script ppp-on. Effettua il
  # protocollo di connessione per la connessione desiderata.
  #
  /usr/sbin/chat -v                                                 \
          TIMEOUT         3                               \
          ABORT           '\nBUSY\r'                      \
          ABORT           '\nNO ANSWER\r'                 \
          ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
          ''              \rAT                            \
          'OK-+++\c-OK'   ATH0                            \
          TIMEOUT         30                              \
          OK              ATDT$TELEPHONE                  \
          CONNECT         ''                              \
          ogin:--ogin:    $ACCOUNT                        \
          assword:        $PASSWORD
  ______________________________________________________________________




  Per PPP-2.2, lo script ppp-off  qualcosa di simile a:


  ______________________________________________________________________
  #!/bin/sh
  ######################################################################
  #
  # Determina il dispositivo da chiudere
  #
  if [ "$1" = "" ]; then
          DEVICE=ppp0
  else
          DEVICE=$1
  fi

  ######################################################################
  #
  # Se esiste il pid file ppp0 allora il programma  in esecuzione. Lo
  # ferma.
  if [ -r /var/run/$DEVICE.pid ]; then
          kill -INT `cat /var/run/$DEVICE.pid`
  #
  # Se il kill non funziona allora non c' alcun processo in esecuzione
  # con questo pid. Significa inoltre che il file di lock  stato
  # lasciato l. Allo stesso tempo si pu quindi voler cancellare il
  # file di lock.
          if [ ! "$?" = "0" ]; then
                  rm -f /var/run/$DEVICE.pid
                  echo "ERRORE: Rimozione del vecchio file pid"
                  exit 1
          fi
  #
  # Successo. Si lascia che pppd pulisca da solo la sua roba vecchia.
          echo "Connessione PPP a $DEVICE terminata."
          exit 0
  fi
  #
  # Il processo ppp non  in esecuzione per ppp0
  echo "ERRORE: connessione PPP non attiva su $DEVICE"
  exit 1
  ______________________________________________________________________


  15.3.  Modificare gli script forniti per l'avvio del PPP

  Poich gli script sono due, andremo a modificarne uno alla volta.


  15.3.1.  Lo script ppp-on

  Si deve modificare questo script per riflettere il PROPRIO nome utente
  nell'ISP, la PROPRIA password per l'ISP, e il numero di telefono di
  quest'ultimo.


  Ognuna delle righe simili a TELEPHONE= in realt impostano una
  variabile shell che contiene l'informazione a destra di '=' (ad
  esclusione dei commenti naturalmente). Quindi si modifichi ognuna di
  queste righe in modo che vadano bene per la propria connessione e il
  proprio ISP.


  Inoltre, se si imposta il numero IP (se ce n' bisogno), nel file
  /etc/ppp/options si CANCELLI la riga che dice


  ______________________________________________________________________
  $LOCAL_IP:$REMOTE_IP \
  ______________________________________________________________________




  Inoltre, ci si assicuri che la variabile shell DIALER_SCRIPT punti al
  percorso completo e al nome dello script che compone il numero che si
  intende usare. Quindi, se si  spostato o rinominato lo script, ci si
  assicuri di modificare in modo adeguato lo script ppp-on.


  15.3.2.  Lo script ppp-on-dialer

  Questo  il secondo degli script che mettono in funzione la propria
  connessione PPP.


  Nota: uno script di conversazione (chat)  solitamente tutto in una
  riga. I backslash ('\') sono usati per permettere la continuazione di
  una riga in pi righe fisiche (per comodit di lettura) e non fanno
  parte dello script stesso.


  Comunque,  molto utile analizzarlo in dettaglio cos da capire cosa
  realmente fa (o dovrebbe fare)!


  15.4.  Il significato di uno script di conversazione (chat)...

  Un script di conversazione  una sequenza di coppie "stringa attesa"
  "stringa inviata". In particolare si noti che ci si aspetta SEMPRE
  qualcosa prima di inviare qualcos'altro.


  Se si invia qualcosa SENZA prima ricevere niente, si deve usare una
  stringa attesa vuota (indicata da "") e similmente per aspettare
  qualcosa senza mandare niente! Inoltre, se una stringa consiste di
  diverse parole (p.es. NO CARRIER), bisogna racchiuderla tra apici in
  modo che chat la veda come una singola entit.


  La riga di conversazione nel nostro esempio :


  ______________________________________________________________________
  exec /usr/sbin/chat -v
  ______________________________________________________________________



  Invocando chat, il -v dice a chat di copiare TUTTO il suo I/O nei log
  di sistema (solitamente /var/log/messages). Una volta che si 
  contenti di come funziona lo script, si modifichi questa riga per
  rimuovere il -v per preservare i log di sistema da confusione non
  necessaria.


  ______________________________________________________________________
  TIMEOUT         3
  ______________________________________________________________________


  Questo imposta il timeout per la ricezione di un input atteso a tre
  secondi. Ci pu essere bisogno di incrementarlo diciamo a 5 o 10 sec
  ondi se si usa un modem veramente lento!


  ______________________________________________________________________
  ABORT           '\nBUSY\r'
  ______________________________________________________________________



  Se chat riceve la stringa BUSY, termina l'operazione.


  ______________________________________________________________________
  ABORT           '\nNO ANSWER\r'
  ______________________________________________________________________



  Se chat riceve la stringa NO ANSWER, termina l'operazione.


  ______________________________________________________________________
  ABORT           '\nRINGING\r\n\r\nRINGING\r'
  ______________________________________________________________________



  Se chat riceve (ripetutamente) la stringa RINGING, termina
  l'operazione. Significa che qualcuno vi sta chiamando al telefono!


  ______________________________________________________________________
  "              \rAT
  ______________________________________________________________________



  Attende che il modem non ritorni niente prima di inviare la stringa
  AT.




  ______________________________________________________________________
  OK-+++\c-OK   ATH0
  ______________________________________________________________________



  Questa  un po' pi complicata in quanto sfrutta qualcuna delle
  capacit di recupero dagli errori di chat.


  Quel che dice ... Attendi OK, se NON  ricevuto (perch in modem non
   in modo comandi) allora invia +++ (la stringa predefinita
  compatibile Hayes che riporta il modem in modo comandi) e attendi OK.
  Poi invia ATH0 (la stringa di ``riattacco'' del modem). Ci permette
  al nostro script di far fronte alle situazioni nella quali il proprio
  modem  ``bloccato in linea''!


  ______________________________________________________________________
  TIMEOUT         30
  ______________________________________________________________________



  Imposta il timeout a 30 secondi per il resto dello script. Se si ha
  esperienza di problemi con lo script di chat che termina a causa di
  timeout, lo si incrementi a 45 secondi o pi.


  ______________________________________________________________________
  OK              ATDT$TELEPHONE
  ______________________________________________________________________



  Attende OK (la risposta del modem al comando ATH0) e compone il numero
  che si vuole chiamare.


  ______________________________________________________________________
  CONNECT         ''
  ______________________________________________________________________



  Attende CONNECT (che il modem invia quando il modem remoto risponde) e
  non invia niente in risposta.


  ______________________________________________________________________
  ogin:--ogin:    $ACCOUNT
  ______________________________________________________________________



  Ancora, abbiamo anche qui un po' di recupero dagli errori. Aspetta il
  prompt per il login (...ogin:) ma se non lo riceve entro il timeout,
  invia un return e poi attende ancora il prompt per il login. Quando ha
  ricevuto il prompt, invia il nome utente (salvato nella variabile
  $ACCOUNT).


  ______________________________________________________________________
  assword:        $PASSWORD
  ______________________________________________________________________

  Attende il prompt per la password e invia la password (ancora salvata
  in una variabile shell).


  Questo script ha delle ragionevoli capacit per il recupero dagli
  errori. chat ha considerevolmente molte pi possibilit di quelle qui
  dimostrate. Per maggiori informazioni si consulti la pagina di manuale
  di chat (man 8 chat).


  15.4.1.  L'avvio di PPP dal lato server

  Sebbene lo script ppp-on-dialer vada bene per server che avviano
  automaticamente il pppd da loro lato della connessione una volta
  effettuato il login, alcuni server richiedono che si avvii
  esplicitamente il PPP nel server.


  Se si deve dare un comando per avviare il PPP sul server, allora si
  DEVE modificare lo script ppp-on-dialer.


  Alla FINE dello script (dopo la riga della password) si aggiunga
  un'altra coppia attesa inviata - questa cercher il proprio prompt
  della shell (si faccia attenzione ai caratteri che hanno un
  significato particolare nelle Bourne shell, come $ e [ o ] (parentesi
  quadre aperte e chiuse).


  Una volta che chat ha trovato il prompt della shell, deve dare il
  comando di avvio del PPP richiesto dal proprio ISP.


  Nel mio caso, il mio server PPP usa il prompt della Linux Bash
  predefinito

  ______________________________________________________________________
  [hartr@kepler hartr]$
  ______________________________________________________________________




  e richiede che io digiti


  ______________________________________________________________________
  ppp
  ______________________________________________________________________




  per avviare il PPP sul server.


   una buona idea permettere un po' di recupero dagli errori anche qui,
  quindi nel mio caso uso

  ______________________________________________________________________
          hartr--hartr    ppp
  ______________________________________________________________________




  Questo dice che se non si riceve il prompt entro il timeout, di
  inviare un ritorno carrello (carriage return) e di cercare un'altra
  volta il prompt.


  Una volta ricevuto il prompt, allora invia la stringa ppp.


  Nota: non si dimentichi di aggiungere un \ alla fine della riga
  precedente cosicch chat pensi ancora che l'intero script di
  conversazione sia in una riga!


  Sfortunatamente, alcuni server producono un insieme di prompt molto
  variabili. Pu essere necessario effettuare pi volte il login usando
  minicom per capire l'andamento e scegliere una stringa "attesa"
  stabile.


  15.5.  Uno script di conversazione per le connessioni autentificate
  con PAP/CHAP

  Se il proprio ISP usa PAP/CHAP, allora lo script di conversazione 
  molto pi semplice. Tutto ci che lo script deve fare  di comporre il
  numero telefonico, attendere la connessione e poi lasciare che pppd
  gestisca il login!


  ______________________________________________________________________
  #!/bin/sh
  #
  # Questa  la parte 2 dello script ppp-on. Effettuer il protocollo di
  # connessione per la connessione desiderata.
  #
  exec /usr/sbin/chat -v                                  \
          TIMEOUT         3                               \
          ABORT           '\nBUSY\r'                      \
          ABORT           '\nNO ANSWER\r'                 \
          ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
          ''              \rAT                            \
          'OK-+++\c-OK'   ATH0                            \
          TIMEOUT         30                              \
          OK              ATDT$TELEPHONE                  \
          CONNECT         ''                              \
  ______________________________________________________________________






  15.6.  Le opzioni " debug " e " file file_opzioni " di pppd

  Come si  gi visto, si pu abilitare la registrazione delle
  informazioni di debug usando l'opzione -d di pppd. L'opzione 'debug' 
  equivalente.


  Poich stiamo stabilendo una connessione con un nuovo script, per il
  momento si lasci l'opzione per il debug (Attenzione: se lo spazio del
  disco  stringente, la registrazione degli scambi pppd pu far
  aumentare rapidamente la dimensione del file syslog, causando problemi
  - questo succede solo nel caso in cui si fallisce la connessione e si
  continua a provare per qualche minuto).


  Una volta contenti di come tutto funziona, si pu rimuovere questa
  opzione.


  Se si  chiamato il file delle opzioni di ppp con qualcosa di diverso
  da /etc/ppp/options o /etc/ppp/options.ttySx, si specifichi il nome
  del file con l'opzione file di pppd - p.es.


  ______________________________________________________________________
  exec /usr/sbin/pppd debug file options.myserver /dev/ttyS0 38400 \
  ______________________________________________________________________




  16.  Verificare i propri script di connessione

  Si apra un nuovo Xterm per root (se si  in X) oppure si apra una
  nuova console virtuale e si faccia il login come root.


  In questa nuova sessione, si lanci il comando



       tail -f /var/log/messages





  (o di qualsiasi altro sia il file di registrazione di sistema).


  Nella prima finestra (o console virtuale) si lanci il comando



       ppp-on &





  (o qualsiasi altro nome con il quale si  chiamato la versione
  modificata di /usr/sbin/ppp-on). Se non si fa andare lo script in
  background specificando & alla fine del comando, non si riotterr il
  prompt del terminale finch ppp non esce (quando termina il
  collegamento).


  Ora si torni alla finestra che sta mostrando i log di sistema.


  Si vedr qualcosa di simile a quanto segue (a patto che si sia
  specificata l'opzione -v per chat e -d per pppd).... ci che segue 
  quanto lo script di conversazione registra nei log di sistema seguito
  dalle informazioni di avvio per pppd:







  ______________________________________________________________________
  Oct 21 16:09:58 hwin chat[19868]: abort on (NO CARRIER)
  Oct 21 16:09:59 hwin chat[19868]: abort on (BUSY)
  Oct 21 16:09:59 hwin chat[19868]: send (ATZ^M)
  Oct 21 16:09:59 hwin chat[19868]: expect (OK)
  Oct 21 16:10:00 hwin chat[19868]: ATZ^M^M
  Oct 21 16:10:00 hwin chat[19868]: OK -- got it
  Oct 21 16:10:00 hwin chat[19868]: send (ATDT722298^M)
  Oct 21 16:10:00 hwin chat[19868]: expect (CONNECT)
  Oct 21 16:10:00 hwin chat[19868]: ^M
  Oct 21 16:10:22 hwin chat[19868]: ATDT722298^M^M
  Oct 21 16:10:22 hwin chat[19868]: CONNECT -- got it
  Oct 21 16:10:22 hwin chat[19868]: send (^M)
  Oct 21 16:10:22 hwin chat[19868]: expect (ogin:)
  Oct 21 16:10:23 hwin chat[19868]: kepler login: -- got it
  Oct 21 16:10:23 hwin chat[19868]: send (hartr^M)
  Oct 21 16:10:23 hwin chat[19868]: expect (ssword:)
  Oct 21 16:10:23 hwin chat[19868]:  hartr^M
  Oct 21 16:10:23 hwin chat[19868]: Password: -- got it
  Oct 21 16:10:23 hwin chat[19868]: send (??????^M)
  Oct 21 16:10:23 hwin chat[19868]: expect (hartr)
  Oct 21 16:10:24 hwin chat[19868]: [hartr -- got it
  Oct 21 16:10:24 hwin chat[19868]: send (ppp^M)
  Oct 21 16:10:27 hwin pppd[19872]: pppd 2.1.2 started by root, uid 0
  Oct 21 16:10:27 hwin pppd[19873]: Using interface ppp0
  Oct 21 16:10:27 hwin pppd[19873]: Connect: ppp0 <--> /dev/cua1
  Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(LCP): Sent code 1, id 1.
  Oct 21 16:10:27 hwin pppd[19873]: LCP: sending Configure-Request, id 1
  Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfreq(LCP): Rcvd id 1.
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd MRU
  Oct 21 16:10:27 hwin pppd[19873]: (1500)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd ASYNCMAP
  Oct 21 16:10:27 hwin pppd[19873]: (0)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd MAGICNUMBER
  Oct 21 16:10:27 hwin pppd[19873]: (a098b898)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd PCOMPRESSION
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd ACCOMPRESSION
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: returning CONFACK.
  Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(LCP): Sent code 2, id 1.
  Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfack(LCP): Rcvd id 1.
  Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 1, id 1.
  Oct 21 16:10:27 hwin pppd[19873]: IPCP: sending Configure-Request, id 1
  Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfreq(IPCP): Rcvd id 1.
  Oct 21 16:10:27 hwin pppd[19873]: ipcp: received ADDR
  Oct 21 16:10:27 hwin pppd[19873]: (10.144.153.51)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: ipcp: received COMPRESSTYPE
  Oct 21 16:10:27 hwin pppd[19873]: (45)
  Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:27 hwin pppd[19873]: ipcp: returning Configure-ACK
  Oct 21 16:10:28 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 2, id 1.
  Oct 21 16:10:30 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 1, id 1.
  Oct 21 16:10:30 hwin pppd[19873]: IPCP: sending Configure-Request, id 1
  Oct 21 16:10:30 hwin pppd[19873]: fsm_rconfreq(IPCP): Rcvd id 255.
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: received ADDR
  Oct 21 16:10:31 hwin pppd[19873]: (10.144.153.51)
  Oct 21 16:10:31 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: received COMPRESSTYPE
  Oct 21 16:10:31 hwin pppd[19873]: (45)
  Oct 21 16:10:31 hwin pppd[19873]:  (ACK)
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: returning Configure-ACK
  Oct 21 16:10:31 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 2, id 255.
  Oct 21 16:10:31 hwin pppd[19873]: fsm_rconfack(IPCP): Rcvd id 1.
  Oct 21 16:10:31 hwin pppd[19873]: ipcp: up
  Oct 21 16:10:31 hwin pppd[19873]: local  IP address 10.144.153.104
  Oct 21 16:10:31 hwin pppd[19873]: remote IP address 10.144.153.51
  ______________________________________________________________________




  Si noti che uso numeri IP STATICI, quindi la mia macchina li spedisce
  al server PPP, e quindi non si vedr questa parte se si usano numeri
  IP DINAMICI. Inoltre questo server richiede un comando specifico per
  avviare il ppp dalla sua parte.


  Se tutto sembra OK, lo si verifichi ulteriormente come prima con ping
  a numeri IP e a nomi di host.


  Si lanci il proprio web browser o quant'altro e si cominci a navigare,
  si  finalmente connessi!


  17.  Chiudere la connessione PPP

  Quando si  finito di usare la connessione PPP, si usi il comando
  standard ppp-off per buttarla gi (si ricorda che bisogna essere o
  root oppure un membro del gruppo PPP!).


  Nei file di log di sistema di vedr qualcosa di simile a:


  ______________________________________________________________________
  Oct 21 16:10:45 hwin pppd[19873]: Interrupt received: terminating link
  Oct 21 16:10:45 hwin pppd[19873]: ipcp: down
  Oct 21 16:10:45 hwin pppd[19873]: default route ioctl(SIOCDELRT): Bad address
  Oct 21 16:10:45 hwin pppd[19873]: fsm_sdata(LCP): Sent code 5, id 2.
  Oct 21 16:10:46 hwin pppd[19873]: fsm_rtermack(LCP).
  Oct 21 16:10:46 hwin pppd[19873]: Connection terminated.
  Oct 21 16:10:46 hwin pppd[19873]: Exit.
  ______________________________________________________________________




  Non ci si preoccupi del SIOCDELRT, significa solo che pppd si 
  accorto che sta terminando e non  niente di preoccupante.


  18.  Risoluzione dei problemi

  Ci possono essere diversi motivi per i quali la propria connessione
  non funziona: chat non  arrivato correttamente alla fine della sua
  esecuzione, oppure si ha una linea molto disturbata, ecc. Quindi si
  controlli nei log di sistema per indicazioni.


  18.1.  Ho compilato il supporto per il PPP nel kernel, ma...

  Un problema molto comune  che la gente compila il supporto per il PPP
  nel kernel, ed ancora quando provano a lanciare pppd, il kernel
  afferma che non ha il supporto per il ppp! Ci sono diverse ragioni per
  le quali ci pu accadere.

  18.1.1.  Si  fatto il boot con il kernel giusto?

  Sebbene si sia ricompilato il supporto per il ppp nel proprio kernel,
  non si  fatto il boot con il nuovo kernel. Ci pu succedere se non
  si  aggiornato /etc/lilo.conf e rilanciato lilo.


  Una buona verifica sul kernel la si pu ottenere usando il comando
  uname -a, che dovrebbe produrre una riga simile a


  ______________________________________________________________________
  Linux archenland 2.0.28 #2 Thu Feb 13 12:31:37 EST 1997 i586
  ______________________________________________________________________




  Questa mostra la versione del kernel e la data della sua compilazione,
  che dovrebbero dare un'idea abbastanza buona di cosa sta funzionando.


  18.1.2.  Si  compilato il supporto per il ppp come modulo?

  Se si  compilato il supporto per il ppp a livello kernel come modulo,
  ma non si sono creati ed installati i moduli, allora si pu ottenere
  questo tipo di errore. Si veda il Kernel-HOWTO e il file README in
  /usr/src/linux!


  Un'altra possibilit connessa ai moduli  che ci si aspetta che il
  modulo sia caricato automaticamente, ma non  in esecuzione il demone
  kerneld (che automaticamente carica e scarica i moduli quando
  necessario). Si veda il kerneld mini-HOWTO per informazioni su come
  configurare kerneld.


  18.1.3.  Si sta usando la versione corretta di PPP per il proprio ker
  nel?

  Si deve usare ppp-2.2 con kernel versione 2.0.x. Si pu usare ppp-2.2
  con kernel versione 1.2.x (se si applica una patch al kernel)
  altrimenti si deve usare ppp-2.1.2.


  18.1.4.  Si sta eseguendo pppd come root?

  Se non si esegue pppd come utente root (e pppd non  suid a root), si
  pu ricevere questo messaggio.


  18.2.  Il mio modem si connette ma il ppp non parte mai

  Ci sono innumerevoli variazioni sul tema (si dia un'occhiata a
  comp.os.linux...).


  Un errore MOLTO comune  che si  scritto male qualcosa nei propri
  script. La sola cosa da fare in questo caso  assicurarsi di
  registrare nei log di sistema (/var/log/messages) la conversazione di
  chat tra il proprio PC Linux e il server e poi analizzarla riga per
  riga. Pu essere necessario connettersi manualmente al server PPP e
  controllare ancora tutto.



  Nella registrazione si devono controllare molto attentamente i prompt
  reali, tenendo bene in mente che noi umani abbiamo la tendenza a
  leggere quello che PENSIAMO di aver scritto, e non quello che c'
  realmente scritto!


  18.3.  Il log di sistema dice `` serial line is not 8 bit clean ''

  Ci sono anche qui delle varianti, come serial line looped back, ecc.,
  e le cause possono essere molteplici (anche pi di una
  contemporaneamente).


  Per capire cosa succede in questi casi,  necessario comprendere un
  po' di quel che succede dietro le quinte durante l'esecuzione di pppd.


  Quando pppd viene avviato, invia pacchetti LCP (Link Control Protocol
  - Protocollo di Controllo del Collegamento) alla macchina remota. Se
  riceve una risposta valida allora passa allo stadio successivo (usando
  pacchetti IPCP - IP Control Protocol - Protocollo di Controllo IP) e
  solo quando questa negoziazione  completa viene avviato lo strato IP
  in modo che si possa usare la connessione PPP.


  Se non c' un server ppp funzionante all'altro capo quando il proprio
  PC invia pacchetti LCP, questi vengono riflessi dal processo di login
  della terminazione remota della connessione. Poich questi pacchetti
  usano 8 bit, la loro riflessione causa la soppressione dell'ottavo bit
  (si ricorda che ASCII  un codice a 7 bit). Il PPP vede questo e si
  comporta di conseguenza.


  Ci sono diverse ragioni per cui pu avvenire questa riflessione.


  18.3.1.  Non ci si  loggati correttamente nel server

  Quando il proprio script di conversazione termina, pppd viene avviato
  nel proprio PC. Comunque, se non si  completato il processo di login
  nel server (incluso l'invio di un qualsiasi comando necessario per
  avviare il PPP nel server), PPP non verr avviato.


  Quindi, i pacchetti LCP sono riflessi e si riceve questo errore.


  Si deve controllare attentamente e correggere (se necessario) il
  proprio script di conversazione (si veda pi indietro).


  18.3.2.  Non si  avviato il PPP nel server

  Alcuni server PPP richiedono l'inserimento di un comando e/o di un
  RETURN dopo la completazione del processo di login prima di avviare il
  ppp dal loro lato della connessione.


  Si verifichi il proprio script di conversazione (si veda pi
  indietro).


  Se si fa il login manualmente e si scopre che  necessario inviare un
  RETURN per avviare il PPP, si aggiunga semplicemente una coppia di
  stringhe attesa/inviata vuote alla fine del proprio script di
  conversazione (una stringa vuota in realt invia un RETURN).
  18.3.3.  Il processo PPP remoto  lento a partire

  Questa  un po' una birichinata!


  Di default, il proprio pppd  compilato per inviare un massimo di 10
  richieste di configurazione lcp. Se il server  un po' lento a
  partire, tutte le 10 richieste possono essere spedite prima che il
  server sia pronto a riceverle.


  Nella propria macchina, pppd si vede tutte le 10 richieste che gli
  tornano indietro (senza l'ottavo bit) ed esce.


  Ci sono due modi per aggirare questo problema:


  Aggiungere un lcp-max-configure 30 alle proprie opzioni del ppp. Ci
  incrementa il numero massimo di pacchetti di configurazione LCP che
  pppd invia prima di uscire. Per server veramente lenti, pu essere
  necessario incrementare ancora di pi tale numero.


  In alternativa, si pu essere un po' furbini. Si dovrebbe aver notato
  che quando si fa il login a mano nel server PPP e il PPP viene
  avviato, il primo carattere ad apparire fra le porcherie prodotte dal
  server ppp  sempre il carattere tilde (~).


  Usando questa conoscenza a priori, si pu aggiungere una nuova coppia
  di stringhe attesa/inviata alla fine dello script di conversazione che
  aspetta una tilde e non invia niente. Cio qualcosa di simile a:


  ______________________________________________________________________
  \~     ''
  ______________________________________________________________________




  Nota: poich il carattere tilde ha un significato particolare nella
  shell, ne deve essere fatto l'escape (e quindi metterci prima un
  backslash).


  18.4.  Instradamento predefinito non impostato ( Default route not set
  )

  Se pppd si rifiuta di impostare un instradamento predefinito,  perch
  (abbastanza giustamente) si rifiuta di rimuovere/rimpiazzare un
  instradamento predefinito preesistente.


  La ragione classica per cui capita questo errore  che alcune
  distribuzioni impostano l'instradamento predefinito verso la propria
  scheda Ethernet invece di impostare uno specifico instradamento di
  rete.


  Si veda la Linux NAG ed il Net2/3 HOWTO per informazioni su come
  impostare correttamente la propria scheda Ethernet e gli instradamenti
  associati.


  Un'altra ragione potrebbe essere che la propria LAN usi gi un
  gateway/router e che la propria tabella di instradamento sia gi
  impostata per puntare, tramite l'instradamento predefinito, a tale
  gateway.


  Sistemare questa situazione pu richiedere un po' di buone nozioni di
  IP networking e va oltre lo scopo di questo HOWTO. Si consiglia di
  trovare qualche aiuto esperto (tramite newsgroup o da qualcuno a cui
  si possa chiedere la soluzione e che sia raggiungibile in maniera
  diretta).


  18.5.  Altri problemi

  Ci sono molte ragioni oltre a queste che possono causare il fallimento
  della connessione ppp e/o non farla funzionare correttamente.


  Si vedano le PPP FAQ (che sono veramente una serie di domande e
  risposte).  un documento omnicomprensivo e le risposte SONO l! Per
  la mia (brutta) esperienza, se le risposte al proprio problema non
  solo l, il problema NON  un errore del ppp! Nel mio caso usavo un
  kernel ELF e non avevo aggiornato i moduli correttamente. Ho perso
  solamente due giorni (e buona parte di una notte) a stanare quello che
  si  rivelato essere un perfetto server PPP prima delle luci
  dell'alba!


  19.  Ottenere aiuto quando ormai non si sa pi cosa provare

  Se non si riesce a far funzionare la propria connessione PPP, si
  riveda tutto questo documento e si verifichi tutto, in congiunzione
  con l'output creato da "chat -v..." e "pppd -d" nel log di sistema.


  Si consulti anche la documentazione di PPP e le FAQ, oltre agli altri
  documenti qui citati!


  Se ancora non se ne esce, si provi nei newsgroup comp.os.linux.misc e
  comp.os.linux.networking che sono regolarmente seguiti da persone che
  possono aiutare con il PPP, cos come nel newsgroup comp.protocols.ppp


  Si pu pure provare a mandare a me una email personale, ma non ho una
  giornata lavorativa (e di vita) regolare e quindi non garantisco di
  rispondere rapidamente, in quanto tutto dipende dal carico di lavoro
  attuale e dallo  stato della mia vita privata!


  In particolare, NON SI POSTINO RISME DI OUTPUT DI DEBUG NEI GRUPPI DI
  DISCUSSIONE E NEMMENO LI SI SPEDISCA A ME VIA EMAIL, nel primo caso si
  sprecher un sacco di banda e nel secondo verranno consegnati a
  /dev/null (a meno che io non li abbia espressamente richiesti).


  20.  Problemi comuni una volta che il collegamento funziona

  Un problema che si trover  che i provider supportano solamente il
  pacchetto software di connessione che loro stessi distribuiscono ai
  nuovi abbonati. Questo  (tipicamente) per Microsoft Windows :-( e
  molti servizi di supporto clienti sembrano non saperne niente di Unix
  (o Linux). Cos, ci si prepari ad un'assistenza molto limitata da
  quella parte.

  Si potrebbe comunque fare a quegli individui un favore ed educarli su
  Linux (qualsiasi persona che lavora nel supporto clienti di un ISP
  dovrebbe essere abbastanza addentro alla terminologia di Internet e
  dovrebbe quindi avere a casa una macchina Linux!)


  20.1.  Non riesco a vedere niente oltre al server PPP al quale mi con
  netto

  OK, la propria connessione PPP  su e funzionante e si pu fare ping
  al server PPP con il suo numero IP (il secondo o ``remoto'' numero IP
  mostrato da ifconfig ppp0), ma non si riesce a raggiungere
  nient'altro.


  Prima di tutto, si provi a fare ping ai numeri IP specificati nel
  proprio /etc/resolv.conf come name server. Se questi funzionano, si
  pu vedere oltre il proprio server PPP (a meno che questi non siano
  gli stessi numeri IP del numero IP ``remoto'' della propria
  connessione). Quindi si provi a fare ping al nome completo del proprio
  provider, per esempio



       ping my.provider.net.au





  Se questo NON funziona, si ha un problema con la risoluzione dei nomi.
  Ci probabilmente dipende da un errore di battitura nel proprio file
  /etc/resolv.conf. Lo si controlli accuratamente con le informazioni
  ottenute chiamando il proprio provider. Se tutto sembra a posto, si
  chiami il proprio provider e si verifichi di aver scritto
  correttamente i numeri IP.


  Se ANCORA non funziona (e il proprio provider conferma che i suoi name
  server sono attivi e funzionanti), c' un problema da qualche altra
  parte, e suggerisco di controllare attentamente la propria
  installazione di Linux (in particolare si controllino i permessi dei
  file).


  Se ANCORA non si riesce a fare ping ai name server del proprio
  provider tramite i loro numeri IP, allora questi non sono attivi (si
  chiami il provider al telefono e si controlli) oppure c' qualche
  problema di instradamento da parte del proprio provider. Ancora, lo si
  chiami e si verifichi.


  Una possibilit  che la "terminazione remota" sia un server PPP Linux
  nel quale non sia stata specificata l'opzione di IP forwarding nel
  kernel!


  Una buona verifica generale  di provare a connettersi al proprio
  provider usando il software che molti di questi forniscono per (gulp)
  Microsoft Windows. Se tutto funziona da un altro sistema operativo con
  esattamente lo stesso account, allora il problema  nel proprio
  sistema Linux e NON nel proprio provider.




  20.2.  Posso spedire email, ma non posso riceverla

  Se si stanno usando numeri IP dinamici,  perfettamente normale. Si
  veda ``Usare i servizi Internet con numeri IP Dinamici'' pi avanti.


  20.3.  Perch la gente non pu fare finger, WWW, gopher, talk nella
  mia macchina?

  Ancora, se si stanno usando numeri IP dinamici,  perfettamente
  normale. Si veda ``Usare i servizi Internet con numeri IP Dinamici''
  pi avanti.



  21.  Usare i servizi Internet con numeri IP dinamici

  Se si stanno usando numeri IP dinamici (e molti provider danno solo
  numeri IP dinamici a meno che non si paghi significativamente di pi
  per la propria connessione), allora si debbono accettare le
  limitazioni che questo impone.


  Prima di tutto, le richieste di servizi esterni funzioneranno bene.
  Ovvero, si possono spedire email usando sendmail (a patto di averlo
  configurato correttamente), scaricare file in ftp da siti remoti, fare
  finger ad utenti su altre macchine, navigare nel web, ecc.


  In particolare, si pu rispondere mentre si  off line (ovvero non si
   connessi) alle email che si sono scaricate nella propria macchine.
  La posta rester semplicemente in attesa nella propria coda di posta
  (mail queue) finch non ci si connette al proprio ISP.


  Comunque, la propria macchina NON  connessa ad Internet 24 ore al
  giorno, n ha lo stesso numero IP ogni volta che viene connessa. 
  quindi impossibile ricevere email direttamente nella propria macchina
  e veramente molto difficile configurare un server web o ftp a cui
  possano accedere i propri amici! Per come Internet  progettata la
  propria macchina non esiste come macchina unica e permanentemente
  contattabile quanto non ha un unico numero IP (si ricordi che altre
  macchine useranno il numero IP a voi assegnato in una connessione,
  quando gli viega allocato per la loro connessione).


  Se si configura un server WWW (o qualsiasi altro server), tale server
  rimane totalmente sconosciuto a qualsiasi utente in Internet FINCH
  questi non sappiano che la macchina  connessa E quale sia il suo
  reale (e momentaneo) numero IP. Ci sono diversi modi per far ottenere
  ad altri utenti questa informazione: si pu chiamarli o mandargli un
  email per dirglielo oppure usare in modo astuto i file ".plan" su un
  account shell nel proprio provider (assunto che questi permetta
  accessi shell e finger).



  Ora, per la maggior parte degli utenti questo non  un problema: tutto
  ci che la maggior parte della gente vuole  inviare e ricevere email
  (usando il proprio account nel provider) e fare connessioni in uscita
  in WWW, ftp e ad altri servizi su Internet. Se veramente si DEBBONO
  avere connessioni entranti nella propria macchina, si dovrebbe
  realmente ottenere un numero IP statico. In alternativa si possono
  esplorare i metodi suggeriti in precedenza...


  21.1.  Configurazione dell'email

  Anche per numeri IP dinamici, si pu certamente configurare sendmail
  sulla propria macchina per spedire fuori qualsiasi email composta
  localmente. La configurazione di sendmail pu essere oscura e
  difficoltosa, quindi questo documento non prova nemmeno a dire come
  farla. Comunque, si dovrebbe probabilmente configurare sendmail
  cosicch il proprio ISP sia designato come proprio "smart relay" host
  (l'opzione DS di sendmail.cf) (per maggiori informazioni sulla
  configurazione di sendmail, si veda la documentazione di sendmail, e
  si dia un'occhiata alle configurazioni m4 distribuite con sendmail. Ce
  n' certamente una che va bene per il proprio caso).


  Ci sono anche eccellenti libri su Sendmail (da citare la 'bibbia'
  della O'Reilly and Associates), ma questi esulano quasi certamente
  dalle necessit della maggior parte degli utenti!


  Una volta configurato sendmail, probabilmente si vorr fare in modo
  che, non appena la connessione PPP  attiva, sendmail spedisca
  qualsiasi messaggio in attesa nella coda di email in uscita. Per far
  ci, si aggiunga il comando



       sendmail -q &





  al proprio script /etc/ppp/ip-up (si veda pi avanti).


  Le email in ingresso sono un problema nel caso di numeri IP dinamici.
  Il modo per gestirle  di:

    configurare il proprio mail user agent (elm, pine, ecc.) in modo
     che tutta la posta venga spedita spedita fuori con un header
     "reply" che riporti il proprio indirizzo di email nel proprio ISP.
     Se possibile, si dovrebbe anche impostare il proprio indirizzo FROM
     al proprio indirizzo email nel proprio provider.

    usare i programmi popclient o fetchmail per scaricare la propria
     posta dal proprio provider. In alternativa, se il proprio ISP usa
     IMAP, usare un MUA che supporta IMAP (come pine).


  Si pu automatizzare questo processo al momento dell'attivazione delle
  connessione mettendo i comandi appropriati nello script /etc/ppp/ip-up
  (si veda pi avanti).


  21.2.  Configurare un name server locale

  Sebbene si possano tranquillamente usare i DNS localizzati nel proprio
  ISP, si pu anche impostare un name server (secondario) di sola cache
  locale che venga attivato dallo script ip-up. Il vantaggio di usare un
  name server locale (di sola cache)  che fa risparmiare tempo (e
  banda) se si contattano frequentemente gli stessi siti durante una
  lunga sessione on-line.


  La configurazione di un DNS di sola cache (che usi una riga
  ``forwarders'' che punta al DNS dell'ISP nel file named.boot) 
  relativamente semplice. Il libro della O'Reilly (DNS and Bind) spiega
  tutto quello che serve sapere sull'argomento.


   disponibile anche un DNS-HOWTO.


  Se si fa funzionare una piccola LAN che pu accedere Internet
  attraverso il proprio PC Linux (usando IP Masquerade per esempio),
  probabilmente  una buona idea far girare un name server locale (con
  una direttiva forwarders) quando la connessione  attiva, in quanto
  ci minimizzer la banda e il ritardo associato con la risoluzione di
  nomi.


  Una nota di Netiquette (galateo della rete): si chieda il permesso al
  proprio ISP prima di iniziare ad usare un name server secondario di
  sola cache nel dominio del proprio ISP. Propriamente configurato, il
  proprio DNS non causer nessun problema a proprio provider, ma se si
  sbaglia qualcuno ne pu causare.


  22.  Connettere assieme due reti usando PPP

  In linea di principio non c' differenza tra il collegare una macchina
  Linux ad un server PPP e il collegare due LAN usando PPP su una
  macchina di ognuna delle LAN. Si ricordi che il PPP  un protocollo
  peer to peer (da pari a pari).


  Comunque, si deve DEFINITIVAMENTE comprendere come avviene
  l'instradamento. Si legga il NET-3 HOWTO e la Linux Network
  Administrator Guide (NAG). Di insostituibile aiuto pu essere anche
  "TCP/IP Network Administration" (pubblicato dalla O'Reilly and Assoc -
  ISBN 0-937175-82-X).


  Se si ha intenzione di usare il sub networking in un numero IP di rete
  su entrambi i lati della connessione, si trover utile il Linux sub
  networking mini-howto (bozza).  disponibile a Linux Sub networking
  mini-HOWTO <http://www.interweft.com.au/other/>.


  Per poter connettere due LAN, si devono usare numeri IP di rete
  diversi (o sottoreti dello stesso numero di rete) e si dovranno usare
  numeri IP statici oppure usare IP masquerade. Se si vuole usare IP
  masquerade, si veda l'IP masquerade mini-howto per le istruzionei
  sulla sua configurazione.


  22.1.  Impostare i numeri IP

  Ci si metta d'accordo con l'amministratore di rete dell'altra LAN su i
  numeri IP che saranno usati per ognuno degli estremi dell'interfaccia
  PPP. Se si stanno usando numeri IP statici, ci probabilmente richiede
  che ci si connetta ad uno specifico numero telefonico.


  Si modifichi il file /etc/ppp/options[.ttyXX] appropriato -  una
  buona idea avere un modem e porta specifici dal proprio lato per
  questa connessione. Pu essere pure necessario modificare il proprio
  file /etc/ppp/options, e creare appositi file options.ttyXX per le
  altre connessioni!



  Si specifichino i numeri IP per il proprio lato del collegamento PPP
  nel file delle opzioni appropriato esattamente come mostrato in
  precedenza per i numeri IP statici.


  22.2.  Impostare l'instradamento

  Ci si deve organizzare in modo che i pacchetti nella propria LAN
  locale siano instradati attraverso l'interfaccia che la connessione
  PPP stabilisce. Questo  un processo in due stadi.


  Prima di tutto, si deve stabilire un instradamento dalla macchina che
  esegue la connessione PPP alla(e) rete(i) all'altro estremo del
  collegamento. Se il collegamento  verso Internet, ci pu essere
  gestito dall'instradamento predefinito stabilito da pppd stesso nel
  proprio estremo della connessione, usando l'opzione 'defaultroute'.


  Se comunque, la connessione  solo un collegamento tra due LAN, allora
  deve essere aggiunto un instradamento di rete specifico per ognuna
  delle reti accessibili attraverso la connessione. Ci  fatto usando
  un comando 'route' per ognuna delle reti nello script /etc/ppp/ip-up
  (si veda ``Dopo che la connessione  attiva...'' per le istruzioni su
  come farlo).


  La seconda cosa che bisogna fare  dire agli altri computer sulla
  propria LAN che la propria macchina Linux  in realt un 'gateway'
  (passaggio) per la(e) rete(i) all'altro estremo della connessione PPP.


  Naturalmente, l'amministratore di rete dell'altro estremo della
  connessione ppp deve fare anche lui le stesse cose! Comunque, poich
  egli instrader i pacchetti per la vostra rete specifica, sar
  richiesto un'instradamento di rete specifico, non un'instradamento
  predefinito (a meno che le LAN all'altro estremo della connessione non
  siano connesse a voi per accedere ad Internet attraverso la vostra
  connessione).


  22.3.  Sicurezza di rete

  Se si connette la propria LAN ad Internet usando PPP, anche solamente
  ad una LAN "straniera", si deve essere consci delle questioni sulla
  sicurezza. Suggerisco caldamente di considerare la configurazione di
  un firewall!


  Si dovrebbe parlare con l'amministratore LAN del proprio sito PRIMA di
  cominciare a connettere LAN straniere o Internet in questo modo. Gli
  errori che si potrebbero fare potrebbero risultare innocui come
  provocare problemi veramente seri!


  23.  Dopo che la connessione  attiva: lo script /etc/ppp/ip-up

  Una volta che la connessione PPP  attiva, pppd cerca il file
  /etc/ppp/ip-up. Se questo script esiste ed  eseguibile, il demone PPP
  lo esegue. Ci permette di automatizzare qualsiasi comando di
  instradamento che possa risultare utile, e qualsiasi altra azione che
  si vuole avvenga ogni volta che la connessione PPP viene attivata.


  Questo  semplicemente uno script shell e pu fare qualsiasi cosa che
  uno script shell pu fare (ovvero virtualmente qualsiasi cosa si
  vuole).


  Per esempio, si pu fare in modo che sendmail invii qualsiasi
  messaggio in attesa d'uscita nella coda di posta.


  Similmente, si pu inserire in ip-up il comando per collezionare
  (usando pop) qualsiasi email in attesa nel proprio ISP.


  Ci sono delle restrizioni su /etc/ppp/ip-up:


     eseguito in un ambiente deliberatamente ristretto per aumentare
     la sicurezza. Ci significa che si devono specificare i percorsi
     completi per gli eseguibili, ecc.

    Tecnicamente, /etc/ppp/ip-up  un programma non uno script. Ci
     significa che pu essere eseguito direttamemente, e quindi richiede
     il file magic standard (#!/bin/bash) all'inizio della prima riga e
     dev'essere leggibile ed eseguibile da root.


  23.1.  Instradamenti speciali

  Se si stanno connettendo due LAN, si dovranno impostare instradamenti
  specifici per le LAN 'straniere'. Questo  facile da fare usando lo
  script /etc/ppp/ip-up. La sola difficolt nasce se la propria macchina
  gestisce pi connessioni PPP.


  Questo perch /etc/ppp/ip-up  eseguito per OGNUNA delle connessioni
  PPP che si fanno, e quindi  necessario far eseguire i comandi di
  instradamento corretti per la connessione particolare che si fa in
  quel momento, e solo in quel caso e non quando si fa un qualsiasi
  altro collegamento!


  23.2.  Gestione delle code di posta

  Quando la connessione tra due LAN  attiva, ci si vorr assicurare che
  le email in coda ad entrambi gli estremi siano scaricate (flushed),
  ovvero inviate a destinazione. Ci  fatto aggiungendo la chiamata
  appostita a sendmail.


  Si pu fare usando il costrutto 'case' della bash su un parametro
  appropriato che pppd passa allo script. Ad esempio, questo  lo script
  /etc/ppp/ip-up che uso per gestire le nostre connessioni WAN e le
  connessioni alla mia Ethernet di casa (gestita sempre dallo stesso
  server PPP).


  23.3.  Un esempio di script /etc/ppp/ip-up

  L'esempio che segue gestisce una variet di usi tipici.









  ______________________________________________________________________
  #!/bin/bash
  #
  # Script che gestisce le questioni di instradamento necessarie per
  # pppd. Solo la connessione a Newman richiede questa gestione.
  #
  # Quando la connessione ppp  attiva, questo script viene chiamato con
  # i seguenti parametri
  #       $1      il nome dell'interfaccia usata da pppd (p.es. ppp3)
  #       $2      il nome del dispositivo tty
  #       $3      la velocit del dispositivo tty
  #       $4      l'indirizzo IP locale per l'interfaccia
  #       $5      l'indirizzo IP remoto
  #       $6      il parametro specificato dall'opzione 'ipparam' di pppd
  #
  case "$5" in
  # Gestisce gli instradamenti al server del Campus Newman
          202.12.126.1)
                  /sbin/route add -net 202.12.126.0 gw 202.12.126.1
  # e scarica la mail queue per spedire l le loro email il prima possibile!
                  /usr/sbin/sendmail -q &
                  ;;
          139.130.177.2)
  # La nostra connessione ad Internet
  # Quando la connessione  attiva, avvia il time server (se non  gi
  # attivo) e si sincronizza con il mondo
                  if [ ! -f /var/lock/subsys/xntpd ]; then
                          /etc/rc.d/init.d/xntpd.init start &
                  fi
  # Avvia il news server (se non  gi attivo)
                  if [ ! -f /var/lock/subsys/news ]; then
                          /etc/rc.d/init.d/news start &
                  fi
                  ;;
          203.18.8.104)
  # Spedisce la mail in attesa nella mia macchina non appena il link 
  # attivo.
  # Non  richiesto nessun instradamento in quanto la mia Ethernet di
  # casa  gestita da un instradamento di IP masquerade e proxyarp.
                  /usr/sbin/sendmail -q &
                  ;;
          *)
  esac
  exit 0
  ______________________________________________________________________




  Come risultato della connessione ppp al nostro Campus Newman e di
  questo script, si ottengono le seguenti voci nella tabella di routing
  (questa macchina  pure il nostro server PPP e gestisce le nostre
  connessioni a Internet -- ho aggiunto dei commenti nell'output per
  spiegare a cosa corrisponde ognuna delle voci):












  ______________________________________________________________________
  [root@kepler /root]# route -n
  Kernel routing table
  Destination     Gateway         Genmask         Flags MSS    Window Use Iface
  # l'instradamento HOST al nostro gateway Internet remoto
  139.130.177.2   *               255.255.255.255 UH    1500   0      134 ppp4
  # l'instradamento HOST al server del nostro campus Newman
  202.12.126.1    *               255.255.255.255 UH    1500   0       82 ppp5
  # l'instradamento HOST alla mia ethernet casalinga
  203.18.8.104    *               255.255.255.255 UH    1500   0       74 ppp3
  # due delle nostre linee PPP di dial up
  203.18.8.64     *               255.255.255.255 UH    552    0        0 ppp2
  203.18.8.62     *               255.255.255.255 UH    552    0        1 ppp1
  # l'instradamento di rete specifico per la LAN del campus Newman
  202.12.126.0    202.12.126.1    255.255.255.0   UG    1500   0        0 ppp5
  # l'instradamento alla nostra Ethernet locale (una "super rete"
  # formata da due reti di classe C adiacenti)
  203.18.8.0      *               255.255.254.0   U     1500   0     1683 eth0
  # l'instradamento al dispositivo di loop back
  127.0.0.0       *               255.0.0.0       U     3584   0      483 lo
  # l'instradamento predefinito a Internet
  default         139.130.177.2   *               UG    1500   0     3633 ppp4
  ______________________________________________________________________




  23.4.  Gestione delle email

  Il paragrafo precedente ha mostrato come gestire la posta in uscita,
  semplicemente svuotando la code delle mail una volta che la
  connessione  attiva.


  Se si sta usando una connessione WAN, ci si pu accordare con
  l'amministratore della LAN remota per fare esattamente le stesse cose.
  Per esempio, all'estremo del Campus Newman  della nostra connessione
  WAN, lo script /etc/ppp/ip-up assomiglia a:


  ______________________________________________________________________
  #!/bin/bash
  #
  # Script che gestisce le problematiche di instradamento come richiesto
  # per dal pppd.
  # Solo la connessione a Hedland necessita questa gestione.
  #
  # Quando la connessione ppp  attiva, questo script viene chiamato con
  # i seguenti parametri
  #       $1      il nome dell'interfaccia usata da pppd (p.es. ppp3)
  #       $2      il nome del dispositivo tty
  #       $3      la velocit del dispositivo tty
  #       $4      l'indirizzo IP locale per l'interfaccia
  #       $5      l'indirizzo IP remoto
  #       $6      il parametro specificato dall'opzione 'ipparam' di pppd
  #
  case "$5" in
          203.18.8.4)
                  /usr/sbin/sendmail -q
                  ;;
          *)
  esac
  exit 0
  ______________________________________________________________________


  Comunque se si il proprio ISP fornisce solamente un aconnessione PPP
  ad IP dinamico,  necessario scaricarsi la propria email dal proprio
  account nella macchina del provider. Ci solitamente viene fatto
  usando il POP (Post Office Protocol). Questo processo pu essere
  gestito usando il programma 'popclient', oltre allo script ip-up utile
  per automatizzare anche questo processo!


  Si crei semplicemente uno script /etc/ppp/ip-up che contenga la
  chiamata appropriata di popclient. Per il mio portatile su cui 
  installata la Red Hat (e che mi porto dietro nei miei viaggi), uso:


  ______________________________________________________________________
  popclient -3 -c -u hartr -p <password> kepler.hedland.edu.au |formail -s procmail
  ______________________________________________________________________




  Si pu usare slurp o quant'altro per fare la stessa cosa per le news,
  e cos via. Si ricordi che lo script ip-up  uno script bash standard
  e quindi pu essere usato per automatizzare QUALSIASI cosa che
  dev'essere svolta ogni volta che una certa connessione PPP viene
  fatta.


  24.  Usare /etc/ppp/ip-down

  Si pu creare uno script che verr eseguito ogni volta che la
  connessione termina. Questo  /etc/ppp/ip-down. Pu essere usato per
  annullare qualsiasi cosa speciale fatta nel corrispondente script
  /etc/ppp/ip-up.


  25.  Problematiche di instradamento su una LAN

  Se si  connessi ad una LAN ma si vuole comunque usare PPP sulla
  propria macchina Linux personale,  necessario configurare le cose in
  modo che i pacchetti vengano instradati, a seconda dei casi, dalla
  propria macchina verso la LAN (attraverso la propria interfaccia
  Ethernet) o verso il server PPP remoto e oltre.


  Questa sezione NON ha intenzione di insegnare niente
  sull'instradamento, tratta semplicemente un semplice caso speciale di
  instradamento (statico)!


  Suggerisco caldamente di leggere la Linux Network Administrator Guide
  (NAG) se NON si ha familiarit con l'instradamento. Anche il libro
  della O'Reilly "TCP/IP Network Administration" tratta questo argomento
  in una forma molto comprensibile.


  La regola base di un instradamento statico  che l'instradamento
  PREDEFINITO dovrebbe essere quello che punta al MAGGIOR numero di
  indirizzi di rete. Per le altre reti, si aggiungano degli
  instradamenti specifici nella tabella di instradamento.


  La SOLA situazione che ho intenzione di trattare qui  quella in cui
  la propria macchina Linux  in una LAN che non  connessa ad Internet,
  e ci si vuole connettere ad Internet per uso personale mantenendo la
  connessione alla LAN.

  Prima di tutto, ci si assicuri che il proprio instradamento Ethernet
  sia impostato agli indirizzi di rete specifici disponibili nella
  propria LAN, e NON impostato come instradamento predefinito!


  Lo si verifichi usando il comando route, che dovrebbe mostrare
  qualcosa di simile a quanto segue:



       [root@hwin /root]# route -n
       Kernel routing table
       Destination   Gateway  Genmask         Flags MSS    Window Use Iface
       loopback      *        255.255.255.0   U     1936   0       50 lo
       10.0.0.0      *        255.255.255.0   U     1436   0      565 eth0





  Se la propria interfaccia Ethernet (eth0) punta all'instradamento
  predefinito (la prima colonna mostrerebbe "default" nella riga di
  eth0), si deve modificare il proprio script di inizializzazione della
  Ethernet per farla puntare a dei numeri di rete specifici piuttosto
  che all'instradamento predefinito (si consulti il Net3 HOWTO e la
  NAG).


  Ci permetter a pppd di impostare il proprio instradamento
  predefinito come mostrato qui sotto:



       [root@hwin /root]# route -n
       Kernel routing table

       Destination   Gateway       Genmask         Flags MSS    Window Use Iface
       10.144.153.51 *             255.255.255.255 UH    488    0        0 ppp0
       127.0.0.0     *             255.255.255.0   U     1936   0       50 lo
       10.1.0.0      *             255.255.255.0   U     1436   0      569 eth0
       default       10.144.153.51 *               UG    488    0        3 ppp0





  Come si pu vedere, c' un instradamento di tipo host verso il server
  PPP (10.144.153.51) tramite ppp0 ed anche un instradamento predefinito
  che usa il server PPP come gateway.


  Se si necessita un impostazione pi complessa di questa, si leggano i
  documenti sull'instradamento menzionati in precedenza e si consulti un
  esperto nel proprio sito!


  Se la propria LAN ha gi degli instradamenti, allora probabilmente
  saranno gi stati impostati dei gateway alle altre reti disponibili
  nel proprio sito. In questo caso, si dovrebbe COMUNQUE far puntare il
  proprio instradamento predefinito all'interfaccia PPP, e rendere gli
  altri instradamenti specifici solamente per le reti che servono.





  25.1.  Note sulla sicurezza

  Quando si configura una macchina Linux su una LAN gi esistente per
  connettersi ad Internet, potenzialmente si sta aprendo l'intera LAN ad
  Internet, e agli hacker che ci sono. Prima di far ci, suggerisco di
  consultare il proprio ammistratore di rete e le politiche di sicurezza
  del proprio sito. Se la propria connessione PPP ad Internet  usata
  per attaccare con successo il proprio sito, per quanto poco si
  subiranno le ire dei propri colleghi e degli amministratori di sistema
  e di rete. Inoltre si potrebbe andare in contro a problemi assai pi
  seri.


  Prima di connettere una LAN ad Internet, si dovrebbero considerare le
  implicazioni di sicurezza dettate dalla connessione DINAMICA, e quindi
  far riferimento al gi citato libro della O'Reilly "Building Internet
  Firewalls"!


  26.  Configurare un server PPP

  Come gi detto, ci sono molti modi per farlo. Quel che presento  il
  modo nel quale io lo faccio (usando una scheda seriale multiporta
  della Cyclades) e un insieme di linee telefoniche a selezione
  rotativa.


  Se non vi piace il metodo qui presentato, sentitevi liberi di farlo a
  modo vostro. Avrei comunque piacere di includere altri metodi nelle
  versioni future di questo HOWTO. Quindi, vi invito ad inviarmi i
  vostri commenti e metodi!


  Si noti, che questa sezione tratta solamente la configurazione di
  Linux come server PPP. Non ho intenzione di includere (mai)
  informazioni sulla configurazione di terminal servers speciali o
  altro.


  Inoltre, devo ancora fare esperimenti con le shadow password (ma lo
  far prima o poi). Le informazioni qui presentate quindi NON
  comprendono tutti gli ammenicoli che sono richiesti dalla shadow
  suite.


  26.1.  Compilazione del kernel

  Si applicano ancora tutte le considerazioni precedenti sulla
  compilazione del kernel e sulla relazione tra la versione del kernel e
  quella di pppd. Questa sezione assume che si siano gi lette le
  sezioni precedenti di questo documento!


  Per un server PPP, si DEVE includere l'IP forwarding nel proprio
  kernel. Si possono voler includere anche altre caratteristiche (come
  IP firewall, accounting ecc ecc).


  Se si usa una scheda seriale multiporta, ovviamente si devono anche
  includere nel kernel i driver necessari!


  26.2.  Panoramica del sistema server

  Noi offriamo account in PPP (e SLIP) e account shell usando la stessa
  coppia nome utente/password. Ci ha il vantaggio (per noi) che gli
  utenti necessitano solo di un account e lo possono usare per tutti i
  tipi di connettivit.


  Poich siamo un'organizzazione educativa, non facciamo pagare il
  nostro staff e gli studenti per l'accesso, e quindi non dobbiamo
  preoccuparci di problematiche di accredito e messa in conto
  (accounting e charging).


  Abbiamo un firewall tra il nostro sito ed Internet, e ci restringe
  alcuni accessi agli utenti in quanto le linee di dial up sono dentro
  il nostro firewall (di Internet) (per ragioni abbastanza ovvie, i
  dettagli degli altri firewall interni non sono qui presentati, e sono
  comunque irrilevanti).


  Il processo che un utente deve seguire per stabilire una connessione
  PPP nel nostro sito (una volta che sia in possesso di un account
  valido naturalmente) :

    chiamare il dialer rotativo (ovvero un unico numero telefonico
     connesso ad un banco di modem, dei quali verr usato il primo
     libero);

    fare il login usando un nome utente e password validi;

    al prompt della shell, lanciare il comando ppp per avviare il PPP
     sul server;

    avviare il PPP sul proprio PC (il fatto che questi funzioni in
     Windows, DOS, Linux MAC OS o quant'altro  un suo problema).


  Il server usa un file /etc/ppp/options.ttyXX per ognuna delle porte
  d'ingresso che imposta il numero IP remoto per l'allocazione degli IP
  dinamici. Il server usa instradamenti proxyarp per i client remoti
  (impostati tramite l'apposita opzione di pppd). Ci ovvia la necessit
  di far girare routed o gated.


  Quando gli utenti riappendono dalla loro parte, il pppd se ne accorge
  e dice al modem di riattaccare, portando gi, nello stesso tempo, la
  connessione PPP.


  26.3.  Procurarsi il software che serve

  Sar necessario il software seguente:

    Linux, propriamente compilato per includere le opzioni necessarie;

    la giusta versione di pppd per il proprio kernel;

    un programma 'getty' che gestisca in modo intelligente le
     comunicazioni via modem.
     Noi usiamo getty_ps2.0.7h, ma anche mgetty  altamente considerato.
     Da quel che ho capito mgetty riesce a riconoscere una chiamata che
     sta usando pap/chap (pap  lo standard per Windows95) e a chiamare
     automaticamente pppd, ma non ho ancora avuto il tempo di provarlo;

    un domain name server (DNS) funzionante ed accessibile agli utenti
     in dial up.
     Si dovrebbe veramente far girare un proprio DNS se possibile...


  26.4.  Configurare un accesso standard (accesso shell)

  Prima di poter configurare il proprio server PPP, la propria macchina
  Linux dev'essere in grado di gestire accessi standard di dial up.


  Questo HOWTO NON tratta la configurazione di questo. Si veda la
  documentazione del getty scelto e il Serial HOWTO per informazioni in
  proposito.


  26.5.  Impostare i file delle opzioni di PPP

  Bisogner impostare un /etc/ppp/options generico con le opzioni comuni
  per tutte le porte di dial up. Le opzioni da noi usate sono:


  ______________________________________________________________________
  asyncmap 0
  netmask 255.255.254.0
  proxyarp
  lock
  crtscts
  modem
  ______________________________________________________________________




  Nota: noi NON usiamo nessun instradamento (ovvio) ed in particolare
  non c' l'opzione defaultroute. La ragione di ci  che tutto quello
  che  richiesto di fare (come server PPP)  di instradare i pacchetti
  dal client PPP verso la propria LAN/Internet e di instradare i
  pacchetti dalla propria LAN ed oltre verso il client.


  Tutto ci che serve per far questo  un instradamento di tipo host
  verso la macchina client e l'uso dell'opzione 'proxyarp' di pppd.


  L'opzione 'proxyarp' imposta (sorpresa) una voce di proxy ARP nelle
  tabella ARP del server PPP che in pratica dice 'spedisci a me tutti i
  pacchetti destinati al client PPP'. Questo  il modo pi semplice per
  impostare un instradamento ad un unico client PPP, ma non la si pu
  usare se si fa l'instradamento tra due LAN: si devono usare gli
  appositi instradamenti di rete i quali non possono usare proxy ARP.


  Quasi certamente si vorr fornire un'allocazione dinamica di numeri IP
  agli utenti in dial up. Ci lo si pu fare allocando un numero IP per
  ognuna delle porte di dial up. Ora si crei un /etc/ppp/options.ttyXX
  per ognuna delle porte.


  In questo si metta semplicemente il numero IP locale (server) ed il
  numero IP che viene usato per quella porta. Per esempio:


  ______________________________________________________________________
  kepler:slip01
  ______________________________________________________________________



  In particolare, si noti che si possono usare nomi host validi in
  questo file (ho scoperto che ricordo solamente i numeri IP delle
  macchine e dei dispositivi critici nella mia rete, i nomi sono molto
  pi significativi!).


  26.6.  Impostare pppd per permettere agli utenti di eseguirlo (con
  successo)

  Poich l'avvio di una connessione PPP implica la configurazione di un
  dispositivo del kernel (un'interfaccia di rete) e la manipolazione
  della tabella di instradamento del kernel, sono richiesti privilegi
  particolari, in pratica i pieni privilegi di root.


  Fortunatamente, pppd  stato progettato per essere eseguito in modo
  sicuro in setuid a root. Quindi bisogner fare

  ______________________________________________________________________
  chmod u+s /usr/sbin/pppd
  ______________________________________________________________________




  Se si vanno a vedere i permessi del file, dovrebbero apparire come

  ______________________________________________________________________
  -rwsr-xr-x   1 root     root        74224 Apr 28 07:17 /usr/sbin/pppd
  ______________________________________________________________________




  Se non lo si fa, gli utenti non saranno in grado di attivare la loro
  connessione ppp.


  26.7.  Impostare un alias globale per pppd

  Per poter semplificare le cose ai nostri utenti PPP, abbiamo creato un
  alias globale (in /etc/bashrc) cosicch con un semplice comando
  possano lanciare ppp sul server una volta fatto il login.


  Questi pu essere una cosa del tipo

  ______________________________________________________________________
  alias ppp="exec /usr/sbin/pppd -detach"
  ______________________________________________________________________




  Quello che fa :

    exec : questo implica il rimpiazzo del programma in esecuzione (in
     questo caso la shell) con il programma che  eseguito;

    pppd -detach : avvia pppd e NON fa il fork in background. Ci
     assicura che quando il pppd esce non ci sono ancora processi in
     giro.

  Quando un utente fa il login in questo modo, apparir nell'output del
  comando 'w' come



  ______________________________________________________________________
    6:24pm  up 3 days,  7:00,  4 users,  load average: 0.05, 0.03, 0.00
  User     tty       login@  idle   JCPU   PCPU  what
  hartr    ttyC0     3:05am  9:14                -
  ______________________________________________________________________




  E questo  quanto...vi avevo detto che questo era un semplice sistema
  server PPP!


  27.  Usare PPP su una una connessione null modem (seriale diretta)

   molto semplice, non c' un modem in mezzo e quindi le cose sono
  molto pi semplici.


  Prima di tutto, si scelga una macchina come 'server', si configuri
  getty su una porta seriale in modo da poter verificare che c' la
  connettivit usando minicom per accedere alla porta seriale nel
  'client'.


  Una volta che questo funziona, si pu rimuovere getty A MENO CHE non
  ci si voglia assicurare che la connessione venga convalidata usando la
  coppia nome utente/password come per la connessione in dial up. Poich
  si ha il 'controllo fisico' di entrambe le macchine, presumo che NON
  lo si voglia fare.


  Ora, sul server, si rimuova getty e ci si assicuri che le porte
  seriali su entrambe le macchine siano state configurate correttamente
  usando 'setserial'.


  Tutto quel che bisogna fare adesso  di far partire pppd su entrambi i
  sistemi. Assumer che la connessione usi /dev/ttyS3 su entrambe le
  macchine. Quindi su entrambe si esegua il comando:


  ______________________________________________________________________
  pppd -detach crtscts lock <IP locale>:<IP remoto> /dev/ttyS3 38400 &
  ______________________________________________________________________




  Ci attiver il collegamento, ma non si  ancora specificato un
  instradamento. Si pu verificare la connessione facendo ping da una
  macchina verso l'altra e viceversa. Se funziona, si disattivi il
  collegamento killando uno dei due processi pppd.


  L'instradamento di cui si avr bisogno naturalmente dipende
  esattamente da cosa si vuole provare a fare. Generalmente, una delle
  macchine sar connessa ad una Ethernet (e ad altro) e quindi
  l'instradamento necessario sar esattamente quello richiesto per un
  server e un client PPP.


  Quindi nella macchina equipaggiata con la Ethernet, il comando pppd
  potrebbe essere:


  ______________________________________________________________________
  pppd -detach crtscts lock proxyarp <IP locale>:<IP remoto> /dev/ttyS3 38400 &
  ______________________________________________________________________




  e sull'altra macchina:


  ______________________________________________________________________
  pppd -detach crtscts lock defaultroute <IP locale>:<IP remoto> /dev/ttyS3 38400 &
  ______________________________________________________________________



  Se si stanno connettendo due reti (usando una connessione seriale!) o
  si hanno necessit di instradamento pi complesse, si pu usare
  /etc/ppp/ip-up in un modo analogo a quello mostrato in precedenza.




  Robert Hart
  Port Hedland, Western Australia
  Melbourne, Victoria, Australia Agostost/Ottobre 1996 Gennaio/Marzo
  1997

  Traduzione di Giovanni Bortolozzo
  Febbraio/Maggio 1998




































  Palm OS Desktop HOWTO
  di David H. Silber palm@orbits.com
  v1.0.0, 20 settembre 1998

  Questo documento HOWTO spiega come usare il vostro palmare Palm OS con
  un sistema Linux.  Nonostante i documenti HOWTO siano indirizzati
  verso l'uso del sistema operativo Linux, questo qui non dipende dalla
  versione unix usata.

  1.  Introduzione

  Prima c'era il Pilot, poi il PalmPilot e ora abbiamo il Palm III da
  Palm Computing Devices.  IBM vende una versione rimarcata del
  PalmPilot Professional, che loro chiamano WorkPad.  Che cosa sono
  questi dispositivi?  Sono Personal Digital Assistant (PDA), conosciuti
  anche come palm-top computer (computer palmari).  Venduti come una
  combinazione elettronica di rubrica indirizzi, agenda telefonica e
  taccuino memo, essi sono di fatto computers general-purpose (multiuso)
  capaci di far girare quasi qualsiasi tipo di applicazione.  Il trucco
   quello di trovare applicazioni per Palm OS che si adattino alle
  vostre necessit e che siano capaci di condividere i vostri dati con
  il vostro sistema Linux.  Gli apparecchi Palm OS incorporano software
  per sincronizzare i loro dati con programmi che girano su un altro
  computer.  Questo software, per l'uso con un sistema Windows 95, 
  generalmente incluso insieme all'apparecchio.   disponibile anche una
  versione per MacOS.  Se sul computer di appoggio gira qualche altro
  sistema operativo, avete bisogno di trovare software di terze parti
  per lavorare con il vostro apparecchio Palm OS.  Questo documento
  descrive questo tipo di software che  disponibile per l'uso con un
  sistema Linux o unix.




  1.1.  Questo documento

  L'ultima versione di questo documento pu  essere letta a
  http://www.orbits.com/Palm/PalmOS-HOWTO.html, ed  parte del Linux
  Documentation Project (LDP).  Questo documento sostituisce la versione
  precedente, che si chiamava Pilot HOWTO.  Vedere
  http://sunsite.unc.edu/LDP/ per ulteriori informazioni riguardo il LDP
  ed altri documenti HOWTO.

  Se trovate che qualcosa in questo documento debba essere corretto o
  spiegato meglio, per favore inviatemi una e-mail all'indirizzo sopra
  riportato e specificate a quale versione di questo documento fate
  riferimento.

  This document is Copyright  1997 & 1998 by David H. Silber.  It is
  released under the copyright terms in the LDP HOWTO-INDEX document.

  Ovvero:

  Questo documento  Copyright  1997 & 1998 by David H. Silber.  
  realizzato sotto i termini di copyright contenuti nel documento LDP
  HOWTO-INDEX.


  1.2.  Vedere anche

  Il documento http://www.orbits.com/Palm/PalmDevelompent-HOWTO.html
  descrive come usare il sistema di sviluppo basto su gcc per scrivere
  applicazioni Palm OS.

  Il documento http://www.orbits.com/Palm/PalmConduit-HOWTO.html
  descrive come usare le librerie pilot-link per scrivere interfacce
  Linux-resident per l'uso con i palmari Palm OS.


  1.3.  Mailing List

  La mailing list pilot-unix  mantenuta da Matthew Cravit pilot-unix-
  owner@lists.best.com.  La sua regola :


       La pilot-unix mailing list  per discussioni e condivisione di
       idee per coloro interessati all'uso degli US Robotics Pilot PDA con
       sistemi UNIX. Questo include persone che sono interessate nell'aiutare
       a sviluppare strumenti che permettano al Pilot di lavorare con UNIX, e
       possibilmente di sviluppare un SDK per il Pilot per Unix.




  Per maggiori informazioni, incluso come sottoscriversi alla lista,
  mandare una mail contenente la parola ``INFO'' a pilot-unix-
  request@lists.best.com.  Nella riga subject non  necessario inserire
  qualcosa.


  1.4.  Archivi delle Mailing List

  Un archivio della mailing list pilot-unix pu essere trovato a
  http:///www.acm.rpi.edu/~albert/pilot/.   mantenuto da Chris Stevens
  albert@acm.rpi.edu.


  1.5.  Siti FTP

  Un sito FTP contenente un archivio di strumenti per Palm OS da usare
  su sistemi unix si trova a ftp://ryeham.ee.ryerson.ca/pub/PalmOS/.  
  mantenuto da Jeff Dionne jeff@ryeham.ee.ryerson.ca.



  2.  Informazioni generali

  2.1.  Installazione Hardware

  Le apparecchiature Palm OS vengono vendute con una ``base'' (o
  dockstation) per lo scambio di dati con un computer desktop.  Questa
  periferica   di fatto un cavo seriale con un attacco proprietario per
  il palmare Palm OS e un pulsante integrato `HotSync'.  Collegate la
  vostra base ad una porta seriale libera del vostro computer.  Quando
  vorrete lanciare uno dei programmi incorporati, dovrete inserire il
  vostro apparecchio PalmOS nella base e premere il pulsante  `HotSync'
  in modo che il palmare PalmOS sappia che deve comunicare.  Se
  l'apparecchio Palm OS dovesse essere spento quando viene premuto il
  pulsante, questi si accender automaticamente.

  Per comodit, create un device, /dev/pilot il quale sar un nome
  alternativo per la porta seriale al quale la vostra base
  dell'apparecchio PalmOS  connessa.  Come utente root, inserite quanto
  segue al prompt della shell:


       ln /dev/cua0 /dev/pilot




  Sostituite cua0 con il nome della porta a cui avete connesso la base
  del vostro apparecchio PalmOS.





  3.  Condivisione di dati fra un apparecchio Palm OS e il vostro sis
  tema Linux

  3.1.  Il software di collegamento del pilot

  Il gruppo di strumenti software di collegamento per pilot (pilot-link
  software) vi permette di scaricare programmi sul vostro apparecchio
  PalmOS e di trasferire dati per i vari programmi incorporati (built-
  in) dell'apparecchio PalmOS fra il sistema Linux e l'apparecchio Palm
  OS stesso.  Nonostante questi programmi non siano progettati in modo
  specifico come i programmi desktop inclusi insieme all'apparecchio
  Palm OS, vi permetteranno ugualmente di copiare i vostri dati in
  entrambi le direzioni.  In generale, ciascun singolo programma del
  gruppo pilot-link controlla un tipo particolare di dati.



  3.1.1.  Installare il software pilot-link

  Le versioni precompilate saranno inevitabilmente un po' meno
  aggiornate rispetto alla distribuzione principale, ma saranno pi
  facili da installare e non richiederanno una configurazione. La
  distribuzione principale potrebbe essere una scelta migliore in quelle
  rare occasioni in cui stavate aspettando una caratteristica
  particolare o un bug fix.

  Potete ottenere il port per Debian Linux (i386) del pilot-link
  versione 0.8.7 da
  ftp://ftp.debian.org/pub/debian/dists/stable/main/binary-
  i386/otherosfs/pilot-link_0.8.7-2.deb.  Se questo file non esiste,
  potrete probabilmente trovare una nuova versione collocata nella
  stessa directory.  Se tutto questo fallisse, o se volete una versione
  pi recente di quella precompilata per Debian, potete installare la
  distribuzione generica, come spiegato dettagliatamente pi sotto.
  Installate il file nel modo ususale e saltate a Usare il software
  pilot-link.

  Potete ottenere il port per RedHat Linux (i386) del pilot-link
  versione 0.8.9 da ftp://ftp.redhat.com/pub/contrib/i386/pilot-
  link-0.8.9-1.i386.rpm.  Se questo file non esiste, potrete
  probabilmente trovare una nuova versione collocata nella stessa
  directory.  Se tutto questo fallisse, o se volete una versione pi
  recente di quella precompilata per Red Hat, potete installare la
  distribuzione generica, come dettagliato pi sotto.  Installate il
  file nel modo ususale e saltate a Usare il software pilot-link.

  Per altre versioni di Linux o unix, o se avete bisogno
  dell'ultimissima versione, scaricate la versione 0.9.0 del pilot-link
  da ftp://ryeham.ee.ryerson.ca/pub/PalmOS/pilot-link.0.9.0.tar.gz.  Il
  numero di versione  possibile che cambi, ma nuove versioni dovrebbero
  trovarsi nello stesso posto con un nome simile.

  Una volta che avete il software, scompattatelo con:


       tar -xvzf pilot-link.0.9.0.tar.gz




  Se la vostra versione di tar non supporta l'opzione -z, decomprimete
  l'archivio con gunzip, come segue:


       gunzip pilot-link.0.9.0.tar.gz | tar -xvf -




  Questo creer  una directory (pilot-link.0.9.0) contenente il
  sorgente.

  Spostatevi sulla directory contenente il sorgente (pilot-link.0.9.0).

  Lanciate ./configure.  Questo cercher nel vostro sistema le
  informazioni necessarie per compilare il software.  configure
  preparer le cose da installare in /usr/local come default.  Se volete
  cambiare questo, lanciate ./configure --prefix=DIR, dove DIR va
  sostituito con il nome della directory dove il software verr
  installato.

  Lanciate make.  Questo compiler il software.  Il software non sar
  installato subito, in modo da avere la possibilit prima di provarlo.
  (Se state aggiornando una vecchia versione con una nuova release,
  potreste volere prima controllare ed essere sicuri che non siano
  compromesse delle funzionalit di cui avete bisogno. Generalmente, non
  ci sono problemi).

  Come utente root, lanciate make install.  Questo copier il software
  nelle directory sotto /usr/local (o dovunque abbiate specificato con
  l'opzione --prefix).  Se non potete accedere come root, potete
  installare il software in qualche directory dove avete accesso in
  scrittura.

  Non dimenticate di aggiungere qualsiasi nuova directory di programmi
  eseguibili nel vostro path.


  3.1.2.  Usare il software pilot-link

  La maggior parte dei programmi della suite pilot-link sono di
  trasmissione, che significa che trasferiscono dati verso o dalla
  vostra apparecchiatura Palm OS.

  Ogni volta che usate uno di questi programmi, premete il pulsante
  HotSync sulla vostra base dell'apparecchio PalmOS.  Questo inizier il
  trasferimento dati dalla parte del vostro palmare Palm OS.  Notate che
  non tutti questi programmi vi segnaleranno di premere il pulsante
  `HotSync', quindi dovrete ricordarvelo da soli.


  Per maggiori dettagli e altre opzioni di questi programmi, vedere la
  corrispondente pagina man.  Esiste una pagina man introduttiva sotto
  il nome pilot-link.  Per il programma pilot-xfer, per esempio,
  digitare man pilot-xfer al prompt della vostra shell unix.




  3.1.2.1.  pilot-xfer

  Probabilmente il programma pi utile della suite pilot-link, pilot-
  xfer vi permette di installare programmi sul vostro apparecchio Palm
  OS, fare un backup, e fare un restore (ripristinare) da un backup.


  Per installare un programma:


       pilot-xfer /dev/pilot -i programma.prc




  Per fare un backup del vostro apparecchio Palm OS:


       pilot-xfer /dev/pilot -b backup-directory




  Questo copier tutti i database del vostro apparecchio Palm OS
  (inclusi i programmi?), in una directory chiamata ``backup-direc
  tory'', creandola se gi non esiste.

  Per fare un restore dei dati sull'apparecchio Palm OS:


       pilot-xfer /dev/pilot -r backup-directory




  Generalmente, avrete bisogno di fare questo se il vostro apparecchio
  Palm OS avesse perso l'alimentazione di corrente o se doveste fare un
  hard reset (reset completo dell'apparecchio togliendo l'alimentazione
  e le batterie tampone. Vengono persi tutti i dati).

  Per avere una lista dei programmi sul vostro apparecchio Palm OS:


       pilot-xfer /dev/pilot -l







  3.1.2.2.  install-memo

  Installare un file Linux sull'apparecchio Palm OS come memo.

  Per installare un memo nella vostra (gi esistente) sezione progetti:


       install-memo /dev/pilot -c project project.memo




  Il nome del file verr inserito nei memo nella prima riga e apparir
  nella directory dei memo del vostro apparecchio Palm OS.



  3.1.2.3.  memos

  Questo programma estrae ciascun memo dall'apparecchio Palm OS e lo
  stampa nel formato standard mailbox.

  Per vedere i vostri memo:


       memos /dev/pilot











  3.1.2.4.  pilot-addresses

  pilot-addresses transferisce il database degli indirizzi sullo o
  dall'apparecchio Palm OS.

  Per scrivere i vostri dati degli indirizzi da un apparecchio Palm OS
  in un file Linux:


       pilot-addresses /dev/pilot -w storage.file




  Per leggere i dati degli indirizzi da un file Linux sul vostro
  apparecchio Palm OS:


       pilot-addresses /dev/pilot -r storage.file










  3.2.  MakeDoc

  Una particolarit recentemente riscontrata del programma memo
  incorporato negli apparecchi Palm OS  che non lavora bene con
  documenti di grandi dimensioni.  Per compensare questo, Rick Bram
  <mailto:rbram@concentric.net> ha scritto Doc, un lettore di documenti
  per apparecchi Palm OS.  (Vedere
  http://www.concentric.net/~rbram/doc.shtml).  I documenti possono
  essere convertiti nel formato Doc con MakeDoc, di Pat Beirne
  <mailto:pat.beirne@sympatico.ca>.



  3.2.1.  Installare MakeDoc

  MakeDoc pu essere scaricato da
  http://www.concentric.net/~rbram/makedoc7.cpp.  Compilatelo con il
  vostro compilatore C++ e installate l'eseguibile risultante come
  ``makedoc'' in una directory nel vostro path.  Sembra esserci un
  piccolo bug in makedoc (versione 0.7a) il quale non mostra una nuova
  linea come ultimo carattere mostrato all'utente.  Questo non sembra
  compromettere il file documento risultante, ma  fastidioso.
  Esiste una nuova versione, ma richiede Java.  Date un'occhiata alla
  pagina web MakeDoc di Pat Beirne a
  http://cpu563.adsl.sympatico.ca/MakeDocJ.htm.



  3.2.2.  Usare MakeDoc

  Usate MakeDoc come segue:


       makedoc data.txt data.prc "Dato da visualizzare con Doc"




  Questo crea un file data.prc, che pu essere installato sul vostro
  apparecchio Palm OS con pilot-xfer.  Il testo "Dato da visualizzare
  con Doc" verr mostrato nella directory di documenti che Doc con
  trolla.

  La sintassi per MakeDoc  la seguente:


       makedoc [-n] [-b] <text-file> <prc-file> <story-name>
       oppure
       makedoc -d [-b] <prc-file> <text-file>





     <text-file>
         il file che volete convertire.

     <prc-file>
         il nome del file risultante (chiamare il file con estensione
        ``.prc'' alla fine).

     <story-name>
         il nome che volete sia mostrato nella directory Doc o Jdoc dei
        documenti.

  Ci sono anche opzioni per decodificare il file risultante .prc e per
  controllare varie opzioni di compressione.








  D.  Persone

  Kenneth Albanowski <mailto:kjahds@kjahds.com> Mantiene gli strumenti
  della pilot-link suite.

  Donnie Barnes <mailto:djb@redhat.com> Crea i packages della pilot-link
  suite come files Red Hat RPM.

  Rick Bram <mailto:rbram@concentric.net> Autore di Doc.

  Matthew Cravit <mailto:pilot-unix-owner@lists.best.com> Proprietario
  della lista pilot-unix.

  Jeff Dionne <mailto:jeff@ryeham.ee.ryerson.ca> Autore originale degli
  strumenti della pilot-link suite.  Amministra l'area FTP per lo UNIX
  Palm OS/Pilot development project.

  Mark W. Eichin <mailto:eichen@kitten.gen.ma.us> Ha fatto il porting
  della pilot-link suite su Debian Linux.

  David H. Silber <mailto:pilot@orbits.com> Autore di questo documento.

  Chris Stevens <mailto:albert@acm.rpi.edu> Mantiene gli archivi della
  mailing list pilot-unix.


  E.  La storia degli apparecchi Palm OS.

  Ci sono due versioni del Pilot, la 1000 e la 5000 ed hanno 128k e 512k
  di RAM, rispettivamente. In ROM hanno Palm OS 1.0.

  In seguito sono arrivati due apparecchi con il nome PalmPilot.  Queste
  sono il PalmPilot Personal e il PalmPilot Professional ed hanno 512k e
  1 Mega di RAM, rispettivamente.  Hanno anche il pannello LCD
  retroilluminato e la versione 2.0 del sistema operativo.  La
  Professional inoltre ha uno stack TCP/IP e qualche altro programmi
  extra incorporato.

  (IBM ha realizzato una versione rimarcata del PalmPilot Professional,
  che loro chiamano WorkPad.)

  Ora abbiamo il Palm III, che ha un case ridisegnato e una porta
  infrarossi, per non parlare dei 2 Mega di RAM e Palm OS 3.0.

   possibile aggiornare qualsiasi Pilot sostituendo la memory card, la
  quale include entrambe RAM & ROM.  Ovviamente, questo non vi fa
  ottenere retroilluminazione del pannello sui Pilot delle serie
  precedenti.































  The Linux Plug-and-Play HOWTO
  David S.Lawyer   dave@lafn.org
  v0.11, maggio 2000

  Un aiuto per districarsi e gestire i dispositivi Plug-and-Play.  Come
  far s che il proprio sistema Linux supporti il Plug-and-Play.
  Traduzione di Giovanni Bortolozzo (borto at pluto.linux.it).

  1.  Introduzione

  1.1.  Copyright, marchi registrati, liberatoria e ringraziamenti

  1.1.1.  Copyright (in inglese)


  Copyright (c) 1998-2000 by David S. Lawyer. Please freely copy and
  distribute (sell or give away) this document.  For corrections and
  minor changes contact the maintainer.  Otherwise you may create
  derivative works and distribute them provided you:

  1. Discuss it with the maintainer (if there is one).  2. Put the
  derivative work at the mirrored LDP Internet site (or the like) for
  free downloading.  3. License the work in the spirit of this license
  or use GPL.  4. Give due credit to previous authors and major
  contributors.


  1.1.2.  Liberatoria


  Anche se non ho intenzionalmente provato a mettervi fuori strada,
  probabilmente ci sono parecchi errori in questo documento.  Vi invito
  a farmeli notare.  Poich questa  documentazione libera, dovrebbe
  essere ovvio che n io n gli autori precendenti possiamo essere
  ritenuti legalmente responsabili per qualsiasi errore.

  N.d.T.: ovviamente nemmeno il traduttore pu essere ritenuto
  legalmente (e nemmeno moralmente) responsabile di eventuali errori.


  1.1.3.  Marchi registrati

  Qualsiasi nomr di prodotto (che inizia con un lettera maiuscola)
  dovrebbe essere considerato un marchio registrato.  Tali marchi
  appartengono ai rispettivi proprietari.per qualsiasi errore.


  1.1.4.  Crediti

  Daniel Scott ha controllato questo documento nel marzo del 2000 e ha
  trovato molti errori di battitura, ecc.


  1.2.  Piani futuri; come aiutare


  Invito a segnalarmi qualsiasi errore in fatti, opinioni, logica,
  battitura, grammatica, chiarezza, link, ecc.  Ma per prima cosa, se la
  data del documento  pi vecchia di un mese, si controlli se si  in
  possesso dell'ultima versione.  Invito inoltre ad inviarmi qualsiasi
  informazione che si pensa sia pertinente a questo documento.

  Non ho studiato in dettaglio n gli isapnptools n le patch per il
  kernel (ma ho in programma di farlo). Non ho ancora ben capito come il
  BIOS configura il PnP (dipende dal tipo di BIOS), e neppure come
  Windows9x aggiorna la ESCD. Quindi questo HOWTO  incompleto e
  potrebbe essere inaccurato (mi si faccia sapere cosa c' di errato).
  In questo HOWTO qualche volta ho usato ?? per indicare che in realt
  non so la risposta.


  1.3.  Nuove versioni di questo HOWTO


  Una nuova versione del Plug-and-Play-HOWTO dovrebbe essere disponibile
  circa ogni mese per la consultazione e il download nei siti che fanno
  da mirror a LDP.  Per una lista di tali siti si veda:
  <http://linuxdoc.org//mirrors.html>.  Sono disponibili diversi
  formati.  Se si vuole semplicemente controllare la data dell'ultima
  versione potrebbe essere meglio non usare un mirror, quindi si dia un
  occhio a:  <http://linuxdoc.org/HOWTO/Plug-and-Play-HOWTO.html>.  La
  versione che si sta leggendo : v.0.11, May 2000.  Le novit di questa
  versione sono l'utilit scanport, diverse correzioni ortografiche e la
  difficolt d'uso di setpci.

  N.d.T.: l'ultima (e pi recente) traduzione in italiano di questo
  documento  reperibile nei mirror di ILDP
  <http://www.pluto.linux.it/ildp/> e scaricabile in diversi formati dai
  relativi siti ftp.


  2.  Cosa dovrebbe fare il PnP: allocare risorse-bus

  2.1.  Cos' il Plug-and-Play (PnP)?



  Semplificando al massimo, il Plug-and-Play dice automaticamente al
  software (device driver o gestore (driver) di dispositivo) dove
  trovare i diversi pezzi hardware (i dispositivi) quali modem, schede
  di rete, schede audio, ecc.  Il compito del Plug-and-Play  di far
  accoppiare dispositivi fisici con il software (gestori di
  dispositivo) che funziona con essi e di stabilire dei canali di
  comunicazione tra ogni dispositivo e il suo gestore.  Pi
  precisamente, il PnP alloca le seguenti risorse-bus sia al driver e
  che all'hardware: indirizzi I/O, IRQ, canali DMA (solo per il bus ISA)
  e regioni di memoria.  Se non si capisce cosa siano queste 4 risorse-
  buse si leggano le sotto sezioni che seguono.  Un articolo della Linux
  Gazette su 3 di queste risorse-bus  Introduction to IRQs, DMAs and
  Base Addresses. Una volta assegnate queste risorse-bus (e se 
  installato il gestore corretto) i file di dispositivo (device file)
  nella directory /dev/ sono pronti per l'uso.

  Questo assegnamento PnP di certe risorse del bus  talvolta detto
  configurazione, ma  solamente un tipo di configurazione a basso
  livello.  Anche utilizzando pienamente il PnP, buona parte della
  configurazione dei dispositivi  fatta da qualche altra cosa.  Ad
  esempio, per la configurazione dei modem,  inviata una stringa di
  inizializzazione al modem attraverso l'indirizzo di I/O del canale.
  Questa stringa di inizializzazione non ha niente a che vedere con il
  PnP, sebbene il canale usato per inviarla al modem  stato allocato
  dal PnP.  L'impostazione della velocit (e di molti altri parametri)
  di una porta seriale  fatta inviando messaggi al gestore del
  dispositivo (device driver) da programmi eseguiti dall'utente
  (spesso automaticamente all'avvio del sistema).  Anche questa
  configurazione non ha niente a che spartire con il PnP.  Quindi quando
  si parla di PnP con configurazione si intende solo un certo tipo di
  configurazione.  Sebbene altra documentazione (come quella per MS
  Windows) chiama le risorse-bus semplicemente risorse, io ho coniato
  il termine risorse-bus in modo da distringuerle dalla moltitudine di
  altri tipi di risorse.

  2.2.  Come fa un computer per trovare i dispositivi (e viceversa)


  Un computer consta di una CPU/processore per effettuare la
  computazione e di memoria per immagazzinare programmi e dati.
  Inoltre, ci sono diversi dispositivi come vari tipi di dischi, una
  scheda video, una tastiera, scheda di rete, schede modem, schede
  audio, porte seriali e parallele, ecc.   C' anche un alimentatore per
  fornire energia elettrica, diversi bus sulla scheda madre per
  connettere assieme i dispositivi e la CPU, e un case per metterci
  tutto dentro.

  In tempi antichi quasi tutti i dispositivi avevano la proprio scheda
  di interfaccia (scheda a circuito stampato).  Oggi, oltre a tali
  schede, molti dispositivi hanno un piccolo chip montato
  permanentemente sulla scheda madre.  Le schede che vengono inserite
  nella scheda madre possono contenere pi di un dispositivo.  I chip di
  memoria sono qualche volta considerati come dispositivi ma non sono
  Plug-and-Play nel senso usato in questo HOWTO.

  Affinch un computer funzioni correttamente, ogni dispositivo
  dev'essere sotto il controllo del suo gestore o device driver.   un
  software che  parte del sistema operativo (talvolta caricato come
  modulo) e che viene eseguito nella CPU.  I gestori di dispositivo sono
  associati con file speciali nella directory /dev (notare che non
  sono propriamente dei file).  Hanno nomi come hda1 (la prima
  partizione sul disco fisso a), ttyS0 (la prima porta seriale), eth1
  (la seconda scheda ethernet), ecc.  Per rendere le cose pi
  complicate, il particolare device driver selezionato, diciamo per
  eth1, dipender dal tipo di scheda ethernet che si ha.  Quindi eth1
  non pu semplicemente essere assegnato ad una qualsiasi gestore di
  scheda ethernet.  Deve essere assegnato ad un particolare gestore che
  funzioner con il tipo di scheda ethernet installata.  Per controllare
  un dispositivo, la CPU (sotto il controllo del device driver) invia
  comandi (e dati) e legge informazioni dai vari dispositivi.  Per
  poterlo fare ogni driver di dispositivo deve conoscere l'indirizzo del
  dispositivo che controlla.  La conoscenza di tale indirizzo 
  equivalente all'impostazione di un canale di comunicazione, anche se
  il canale fisico  in realt il bus dati dentro al PC che 
  condiviso praticamente da qualsiasi altra cosa presente nel computer.

  Il canale di comunicazione  in realt un po' pi complesso di come
  appena descritto.  Un indirizzo  in realt un intervallo di
  indirizzi ed esiste la controparte del canale (nota come interrupt)
  che permette ai dispositivi di inviare richieste urgenti di aiuto ai
  loro gestori.


  2.3.  Indirizzi I/O, ecc.


  I PC hanno 3 spazi di indirizzi: I/O, memoria principale e
  configurazione (solo nel bus PCI).  Tutti questi 3 tipi di spazi di
  indirizzi condividono lo stesso bus indirizzi (address bus)
  all'interno del PC.  Ma il potenziale di alcune linee dedicate nel bus
  del PC segnala in quale spazio  un indirizzo: I/O, memoria
  principale o configurazione.  Si veda la sezione ``Indirizzi'' per
  maggiori dettagli.  I dispositivi sono originariamente posizionati
  nello spazio di indirizzi I/O, sebbene in alcuni casi questi allochino
  pure dello spazio in memoria principale.  Un indirizzo I/O qualche
  volta  detto semplicemente I/O, IO, i/o o io.   pure usato
  il termine porta di I/O. Ci sono due passi principali per allocare
  gli indirizzi I/O (e altre risorse-bus, come gli interrupt):



  1. Impostare l'indirizzo I/O, ecc. sulla scheda (in uno dei suoi
     registri)

  2. Fare in modo che il gestore del dispositivo sappia qual  questo
     indirizzo I/O, ecc.


  Il precedente processo in due passi  qualcosa di simile al problema
  in due parti di trovare il numero di casa di qualcuno in una via.  Si
  deve conoscere il numero di casa e qualcuno deve attaccare un numero
  nella facciata della casa in modo che possa essere trovata.  Nei
  computer, il device driver deve conoscere l'indirizzo e il dispositivo
  hardware deve impostare lo stesso indirizzo in uno dei suoi registri.
  Entrambe queste cose devono essere fatte, ma alcuni fanno l'errore di
  farne solo una e poi si sorprendono quando il computer non riesce a
  trovare il dispositivo.  Per esempio, provano ad usare setserial per
  assegnare un indirizzo ad una porta seriale senza realizzare che ci
  comunica un indirizzo solamente al driver.  Non imposta l'indirizzo
  nell'hardware della porta seriale stessa.  Se la porta seriale ha in
  realt un diverso indirizzo (o adirittura nessuno) e si dice qualcosa
  di errato a setserial, allora s che si  nei casini.

  Un altro vincolo ovvio  che un indirizzo deve essere per prima cosa
  impostato nella scheda prima che il gestore del dispositivo possa
  usarlo.  Poich i driver dei dispositivi spesso partono non appena 
  partito il computer, talvolta tentato di accedere ad una scheda (per
  vedere se  l, ecc.) prima che l'indirizzo sia stato impostato nella
  scheda dal programma PnP di configurazione.  In tal caso si vede un
  messaggio d'errore che dice che non  possibile trovare la scheda
  sebbene questa ci sia (ma non ha ancora un indirizzo).

  Quanto detto negli ultimi due paragrafi riguardo gli indirizzi I/O si
  applica tale e quale alle altre risorse-bus: ``IRQ -- Panoramica'',
  ``Canali DMA'', e ``Regioni di Memoria''.  Cosa siano queste cose
  verr spiegato nelle tre sezioni che seguono.


  2.4.  IRQ -- Panoramica


  Dopo aver letto questa sezione si pu leggere ``Interrupt --
  Dettagli'' per ulteriori dettagli.  Quanto segue  intenzionalmente
  super semplificato.  Oltre agli indirizzi, si deve gestire anche un
  numero di interruzione (interrupt) (come l'IRQ 5), detto numero di
  IRQ (Interrupt ReQuest = Richiesta di Interruzione).  Si  gi detto
  prima che il gestore del dispositivo deve conoscere l'indirizzo di una
  scheda per poter essere in grado di comunicare con quest'ultima.  Ma
  cosa dire della comunicazione in senso opposto?  Si supponga che il
  dispositivo debba comunicare qualcosa al suo gestore con una certa
  urgenza.  Per esempio, il dispositivo potrebbe aver appena ricevuto un
  sacco di byte destinati alla memoria principale e quindi gli serve
  chiamare il suo gestore per trasferire questi dati dal suo buffer
  praticamente pieno alla memoria principale.

  Il dispositivo come pu chiedere aiuto?  Non pu usare il bus dati
  principali perch sicuramente  gi in uso.  Invece impone un
  particolare potenziale elettrico in una linea di interrupt dedicata
  (parte del bus), spesso riservata per quel particolare dispositivo.
  Questo segnale  detto interrupt (interruzione).  Ci sono
  l'equivalente di 16 linee di questo tipo in un PC e ognuna di queste
  comanda (indirettamente) da particolare gestore di dispositivo.  Ogni
  linea ha un numero di IRQ (Interrupt ReQuest) univoco.  Il dispositivo
  deve mettere il suo interrupt nella linea corretta e il gestore del
  dispositivo deve restare in attesa dell'interruzione sulla linea
  corretta.  Su quale linea deve mettersi  specificato dal numero di
  IRQ salvato nel dispositivo.  Lo stesso numero di IRQ dev'essere noto
  al gestore del dispositivo in modo che questo sappia su quale linea di
  IRQ restare in ascolto.

  Una volta che il driver del dispositivo riceve l'interrupt (una
  chiamata di aiuto) deve capire perch  stato generato ed
  intraprendere l'azione appropriata per servire l'interrupt.  Sul bus
  ISA ogni dispositivo ha bisogno di un proprio numero di IRQ univoco.
  Nel bus PCI,  permessa la condivisione degli IRQ.


  2.5.  Canali DMA


  I canali DMA esistono solo per il bus ISA.  DMA sta per Direct Memory
  Access (Accesso Diretto alla Memoria).   il posto dove un
  dispositivo ha la possibilit di prendere (rubare) alla CPU il
  controllo del bus principale del computer e trasferire i dati
  direttamente nella memoria principale.  Normalmente la CPU vorrebbe
  fare questo trasferimento in due passi:

  1. leggendo i dati dallo spazio di I/O del dispositivo e mettendoli
     dentro la CPU stessa

  2. scrivendo questi dati dalla CPU alla memoria principale.

     Con il DMA si fa solitamente un solo passo inviando i dati
     direttamente dal dispositivo alla memoria.  Il dispositivo deve
     avere tale funzionalit nel suo hardware e quindi non tutti i
     dispositivi possono fare un DMA.  Mentre  in esecuzione il DMA la
     CPU non pu fare molto in quanto il bus principale  usato per il
     trasferimento DMA.

  Il bus PCI non ha in realt nessun DMA. Ha piuttosto qualcosa di
  ancora migliore: il bus mastering.  Funziona in maniera simile al DMA
  e qualche volta  chiamato DMA (per esempio, i dischi fissi chiamati
  UltraDMA).  Permette ad un dispositivo di diventare temporaneamente
  il padrone del bus (bus master) e di trasferire i dati in maniera
  analoga a quanto fa la CPU quando ne ha lei il potere.  Non usa nessun
  numero di canale in quanto l'organizzazione del bus PCI  tale che
  l'hardware PCI sa quale dispositivo ha attualmente il controllo del
  bus e quali dispositivo lo sta chiedendo di diventare il prossimo bus
  master.  Per il bus PCI non c' quindi allocazione dei canali DMA.

  Quando un dispositivo nel bus ISA vuole fare un DMA invia una
  richiesta DMA usando una linea dedicata per la richiesta di DMA in
  modo analogo ad una richiesta di interrupt.  In realt il DMA potrebbe
  essere gestito usando interrupt ma ci introdurrebbe alcuni ritardi,
  cosicch  pi veloce da fare utilizzando un tipo particolare di
  interrupt detto DMA-request.  Come le interruzioni, le richieste DMA
  sono numerate in modo da identificare quale dispositivo sta facendo la
  richiesta. Questo numero  chiamato DMA-channel (canale DMA).  Poich
  tutti i trasferimenti DMA usano il bus principale (e solo uno pu
  essere attivo in un determinato istante) in realt usano tutti lo
  stesso canale, ma il numero del canale DMA serve per identificare
  chi sta usando il canale.  Nella scheda madre esistono dei registri
  hardware che contengono lo stato attuale di ogni canale.  Quindi per
  poter effettuare una richiesta DMA, il dispositivo deve conoscere il
  suo numero di canale DMA che deve essere salvato in un registro nel
  dispositivo fisico.


  2.6.  Intervalli di memoria


  Ad alcuni dispositivi  assegnato dello spazio di indirizzi nella
  memoria principale.   spesso memoria condivisa (shared memory) o
  I/O mappato in memoria (memory mapped I/O).  Altre volte  la
  memoria ROM stessa del dispositivo.  Quando si parla delle risorse-bus
  si usa spesso semplicemente il termine memoria.  Quindi un
  dispositivo pu anche usare uno spazio di indirizzi di I/O.

  Quando di installa una scheda di questo tipo, in effetti si sta
  inserendo un modulo di memoria per la memoria principale.  Questa
  memoria pu essere sia ROM (Read Only Memory, Memoria a Sola Lettura)
  che memoria condivisa.  Questa memoria pu servire come mezzo di
  trasferimento diretto di dati tra il dispositivo e la memoria
  principale.  Non  veramente un trasferimento in quanto il dispositivo
  mette i dati nella propria memoria che casualmente  la memoria
  principale. Sia la scheda che il gestore del dispositivo devono sapere
  dov' questa memoria.  L'indirizzo di memoria  solitamente molto alto
  in modo da non entrare in conflitto con gli indirizzi pi bassi dei
  chip di memoria del computer.

  La ROM  diversa.   come un programma (forse un gestore di
  dispositivo) che sar usato con il dispositivo.  Idealmente, dovrebbe
  funzionare con Linux e non solo con Windows ?? Pu essere necessario
  che venga oscurato (shadowed), intendendo con ci che viene copiato
  nei propri chip di memoria principale in modo da funzionare pi
  velocemente.  Un volta oscurato non  pi a sola lettura.


  2.7.  Risorse sia al dispositivo che al gestore

  I gestori di dispositivo devono quindi essere in qualche modo
  collegati all'hardware che controllano.  Questo  fatto fornendo le
  risorse-bus (I/O, Memoria, IRQ e DMA) sia al dispositivo fisico che al
  software di gestione. Per esempio, una porta seriale usa solo 2 (delle
  4 possibili) risorse: un IRQ e un indirizzo I/O.  Entrambi questi
  valori deve essere comunicati sia al gestore del dispositivo che al
  dispositivo fisico stesso.  Al gestore (e al suo dispositivo)  dato
  anche un nome (come ttyS1) nella directory /dev.  L'indirizzo e il
  numero di IRQ sono salvati dal dispositivo in registri della scheda (o
  in un chip nella scheda madre).  Nel caso di schede con i ponticelli
  (jumper), queste informazioni sono sempre salvate nell'hardware del
  dispositivo (sulla scheda, ecc.).  Ma nel caso del PnP, i dati dei
  registri spesso vengono persi quanto il PC viene spento, cosicch le
  informazioni sulle risorse devono essere forniti di nuovo ad ogni
  dispositivo ogni volta che il PC viene riacceso.



  2.8.  Il problema

  L'architettura di un PC fornisce solo in numero limitato di IRQ,
  canali DMA, indirizzi I/O e regioni di memoria.  Se ci fossero solo
  alcuni dispositivi e tutti questi avessero risorse-bus standardizzate
  (come indirizzi I/O e numeri IRQ unici) non ci sarebbero problemi a
  collegare i gestori di dispositivo ai dispositivi stessi.  Ogni
  dispositivo avrebbe delle risorse fisse e non andrebbe in conflitto
  con qualsiasi altro dispositivo nel computer.  Non ci sarebbero due
  dispositivi che vorrebbero avere gli stessi indirizzi, non ci
  sarebbero conflitti di IRQ, ecc.  Ogni driver potrebbe quindi essere
  programmato con indirizzi, IRQ, ecc. univochi gi codificati
  all'interno del programma.  La vita sarebbe pi semplice.

  Ma cos non .  Non solo oggi ci sono cos tanti dispositivi che i
  conflitti sono frequenti, e qualche volta uno ha necessit di avere
  anche pi di uno dello stesso tipo.  Per esempio qualcuno potrebbe
  avere pi di un disco fisso, un po' di porte seriali, ecc.  Per queste
  ragioni i dispositivi devono possedere un minimo di flessibilit in
  modo che possano essere impostati a un qualsivoglia indirizzi, IRQ,
  ecc. siano necessari per evitare i conflitti.  Ma alcuni IRQ e
  indirizzi, come quello del clock e della tastiera, sono piuttosto
  standard.  Questi non hanno bisogno di tale flessibilit.

  A parte il problema nel conflitto nell'allocazione delle risorse-bus,
  c' anche un problema nel caso si commetta un errore nel dire al
  device driver quali sono le risorse-bus.  Per esempio, si supponga di
  aver messo IRQ 4 in un file di configurazione quando in realt il
  dispositivo  impostato all'IRQ 5.  Questo  un altro tipo di errore
  nell'allocazione delle risorse-bus.

  L'allocazione delle risorse-bus, se fatta correttamente, stabilisce i
  canali di comunicazione tra l'hardware fisico e i relativi device
  driver.  Per esempio, se un determinato intervallo di indirizzi I/O
  (risorsa)  allocato sia al gestore di dispositivo che ad un pezzo di
  hardware, allora in questo modo si  stabilito un canale di
  comunicazione unidirezionale tra loro.  Il driver pu inviare comandi
  ed informazioni al dispositivo.  In realt  un po' pi che
  unidirezionale, in quanto il driver pu ottenere informazioni dal
  dispositivo leggendone i suoi registri.  Ma il dispositivo in questo
  modo non pu inizializzare una qualsiasi comunicazione.  Per
  inizializzarla il dispositivo ha bisogno di un IRQ in modo da creare
  un canale bidirezionali nel quale sia il driver che il dispositivo
  possono iniziare una comunicazione.


  2.9.  Il PnP trova i dispositivi connessi nelle porte seriali


  Anche i dispositivi esterni connessi alla porta seriale attraverso un
  cavo (come i modem esterni) possono essere chiamati Plug-and-Play.
  Poich solo la porta seriale stessa ha bisogno di risorse-bus (un IRQ
  e un indirizzo I/O) non  necessario allora risorse-bus per questo
  tipo di dispositivi.  Quindi per essi il PnP non  in realt
  necessario. Comunque, c' una specifica PnP anche per questi
  dispositivi seriali esterni.

  Un sistema operativo PnP trover questi dispositivi esterni e legger
  il loro numero di modello, ecc.  Poi pu essere in grado di trovarne
  il gestore di dispositivo pi adatto, e quindi non si deve dire ad un
  programma applicativo che si ha un certo dispositivo diciamo su
  /dev/ttyS1.  Poich si  in grado di informare manualmente il proprio
  programma applicativo (attraverso un file di configurazione, ecc.) su
  quale porta seriale  presente il dispositivo (ed eventualmente
  dicendogli anche qual' il suo numero di modello) in realt non si ha
  veramente bisogno di questa caratteristica PnP per le porte seriali.


  3.  La soluzione Plug-and-Play (PnP)

  3.1.  Introduzione al PnP


  Il termine Plug-and-Play (PnP) ha diversi significati.  In senso lato
   semplicemente l'autoconfigurazione che avviene quando uno installa
  un nuovo dispositivo e questo si configura da solo.  Nel senso usato
  in questo HOWTO, la configurazione  solo la configurazione delle
  risorse-bus PnP e la successiva notifica al gestore del dispositivo.
  In senso stretto  pure l'impostazione delle risorse-bus in un
  dispositivo hardware.  Si possono pure intendere le specifiche PnP le
  quali (assieme ad altre cose) specificano come vengono letti e scritti
  i dati delle risorse PnP nei dispositivi (spesso schede) sul bus ISA.
  Le specifiche PCI standard (e non quelle PnP) fanno la stessa cosa per
  il bus PCI.

  Il PnP mette in corrispondenza i dispositivi con i relativi driver e
  specifica i loro canali di comunicazione.  Sul bus ISA, prima del
  Plug-and-Play le risorse-bus erano impostate sui dispositivi hardware
  tramite ponticelli (jumper).  Ai driver software erano invece
  assegnate tramite file di configurazione (o simili) o interrogando il
  dispositivo agli indirizzi dove ci si aspettava risiedesse.  Il bus
  PCI ha supportato il qualcosa di simile al PnP fin dall'inizio ed 
  cos stato banale implementarlo per questo bus.  Poich le specifiche
  del bus PCI non usano il termine PnP, non  chiaro se  o meno lecito
  chiamare PnP il bus PCI (ma supporta nell'hardware quello che a
  tutt'oggi  detto PnP).


  3.2.  Come funziona (semplificato)


  Quanto segue  una panoramica oltremodo semplificata del funzionamento
  del Plug-and-Play.  Il programma di configurazione del PnP (a volte un
  programma nel BIOS) trova tutti i dispositivi PnP e chiede ad ognuno
  di essi di quali risorse-bus hanno bisogno.  Controlla poi quali
  risorse-bus (IRQ, ecc.) gli  possibile distribuire.  Naturalmente ci
  sono risorse-bus riservate usate dai dispositivi non PnP (legacy) (se
  ne  nota la presenza) e non d via nessuna di queste risorse
  riservate.  Usa poi alcuni criteri (non specificati nelle specifiche
  PnP) per assegnare le risorse-bus in modo che non ci siano conflitti e
  che tutti i dispositivi abbiano (se possibile) quello di cui hanno
  bisogno.  Dice poi ad ogni dispositivo fisico quali sono le risorse-
  bus a lui assegnate e i dispositivi stessi si auto-configurano per
  usare solo le risorse-bus assegnate.  Poi, in qualche modo, i gestori
  (driver) di dispositivo scoprono quali risorse-bus usano i
  corrispondenti dispositivi e sono quindi in grado di comunicare
  attivamente con i dispositivi che controllano.

  Per esempio, si supponga che una scheda necessiti di un interrupt
  (numero di IRQ) e di 1 MB di memoria condivisa.  Il programma PnP
  legge queste richieste dalla scheda.  Assegna poi a quest'ultima
  l'IRQ5 e 1 MB di memoria nello spazio indirizzi, a partire
  dall'indirizzo 0xe9000000.  Per non  sempre cos semplice, in quanto
  la scheda potrebbe specificare che pu usare solo certi numeri di IRQ
  (solo nel caso ISA) o che il MB di memoria deve risiedere entro un ben
  determinato intervallo di indirizzi.  I dettagli sono diversi nel caso
  di bus PCI o ISA, e sono maggiormente complessi nel secondo caso.

  Esistono alcune scorciatoie che il software PnP potrebbe usare.  Una
  di mantenere traccia di come sono state assegnate le risorse-bus
  nell'ultima configurazione (l'ultima volta che  stato usato il
  computer) e di riusare queste informazioni.  Windows9x e i BIOS PnP
  usano questa mentre lo fa il Linux standard.  Windows9x salva queste
  informazioni nel suo Registry sul disco fisso, mentre un BIOS PnP le
  salva nella memoria non volatile del PC (detta ESCD); si veda la
  sezione ``Il Database ESCD del BIOS'').

  Sotto Linux ogni dispositivo  a s e non esiste un registro
  centralizzato non volatile degli assegnamenti delle risorse.  Alcuni
  driver di dispositivo salvano l'ultima configurazione che hanno usato
  e la usano la prossima volta che viene acceso il computer.  Assumono
  implicitamente che il resto dell'hardware non abbia bisogno delle
  risorse-bus che usano loro.

  Se i dispositivi ricordassero la propria configurazione precedente,
  allora non ci sarebbe nessun hardware da configurare al successivo
  riavvio, per questi sembrano dimenticarsene quando il computer viene
  spento.  Alcuni contengono una configurazione predefinita (che non 
  necessariamente l'ultima usata).  Quindi il programma di
  configurazione PnP deve essere lanciato ogni volta che viene acceso il
  PC.  Inoltre, se viene aggiunto un nuovo dispositivo, allora
  dev'essere configurato.  L'allocazione delle risorse-bus a questo
  nuovo dispositivo pu comportare il portar via alcune risorse-bus ad
  un dispositivo preesistente e l'assegnamento a quest'ultimo di
  risorse-bus alternative che possa usare.


  3.3.  L'avvio del PC


  Quando il PC viene acceso per la prima volta il chip del BIOS esegue
  il suo programma per far avviare il computer (il primo passo  la
  verifica dell'hardware).  Se il sistema operativo  immagazzinato nel
  disco fisso (com' ormai usuale) allora il BIOS deve essere a
  conoscenza della presenza del disco fisso.  Se il disco fisso  PnP
  allora il BIOS potrebbe usare i metodi PnP per trovarlo.  Inoltre, per
  permettere all'utente di configurare manualmente il CMOS del BIOS e di
  rispondere a messaggi d'errore nell'avvio del computer, sono pure
  necessari uno schermo (una scheda video) e una tastiera.  Il BIOS deve
  quindi a sua volta configurare questi dispositivi.

  Un volta che il BIOS ha identificato il disco fisso, la scheda video e
  la tastiera  pronto per fare il boot (caricare il sistema operativo
  dal disco fisso).  Se si  detto al BIOS che si ha un sistema
  operativo PnP, allora dovrebbe avviare il PC e poi lasciare al sistema
  operativo la conclusione della configurazione PnP.  Diversamente,
  (prima del boot) un BIOS PnP probabilmente prover a fare da solo il
  resto della configurazione PnP dei dispositivi (ma non dei loro
  gestori).


  3.4.  Bus


  ISA  il vecchio bus dei PC IBM, mentre PCI  il bus pi nuovo e
  veloce di Intel.  Il bus PCI  stato progettato per quello che oggi
  viene detto PnP.  Rende semplice (se confrontato con il bus ISA)
  scoprire come devono essere assegnate le risorse-bus PnP ai
  dispositivi hardware.  Per vedere che cosa  successo si usi il
  comando lspci e/o si veda /proc/pci o /proc/bus/pci.  Sono utili anche
  i messaggi che appaiono sullo schermo all'avvio (si usi Shift+PageUp
  per tornare su).  Si veda ``Messaggi all'avvio''.

  Nel caso del bus ISA c' un problema reale con l'implementazione del
  PnP poich nessuno aveva in mente il PnP quando  stato progettato il
  bus ISA e praticamente non ci sono indirizzi I/O disponibili per il
  PnP da usare per inviare informazioni di configurazione ai dispositivi
  fisici.  Di conseguenza il modo di gestire il PnP nel bus ISA 
  complicato.  Sull'argomento  stato scritto un libro intero (si veda
  la sezione ``Libri sul PnP'').  Tra le altre cose, si richiede che il
  programma di PnP assegni un handle (identificativo) temporaneo a
  ciascun dispositivo PnP in modo che questi possano essere indirizzati
  per la successiva configurazione PnP.  L'assegnazione di uno di questi
  handle  detta isolation (isolamento).  Per i dettagli si veda la
  sezione ``Isolamento'' in Appendice.

  Probabilmente il bus ISA  destinato a scomparire.  Quando lo far, il
  PnP sar pi semplice in quanto sar pi facile scoprire come il BIOS
  ha configurato l'hardware.  Ci sar ancora la necessit di accopiare i
  gestori di dispositivo con i dispositivi, come pure la necessit di
  configurare i dispositivi aggiunti quanti il PC  gi funzionante.
  Queste necessit saranno soddisfatte se Linux diventa un sistema
  operativo PnP.


  3.5.  Linux deve gestire meglio il PnP


  Il PnP (per il bus ISA)  stato inventato da Compaq, Intel e Phoenix.
  La Microsoft ne  stata il principale promotore.  Dal punto di vista
  di Linux sarebbe stato meglio se il PnP non fosse mai stato
  inventato.  Alla fine il bus ISA si sarebbe estinto e avrebbe
  prevalso il bus PCI PnP-like cos avremmo avuto a tutti gli effetti un
  PnP facile da implementare.  Ma che piaccia o no, a tutt'oggi la
  maggior parte del nuovo hardware ISA  PnP e Linux non ha scelta se
  non quella di gestire efficacemente il PnP.  Ma il Linux standard
  (come quello dei primi del 1999) rende la gestione del PnP complicata
  (specialmente sul bus ISA) mentre lo scopo del PnP  quello di rendere
  le cose pi semplici.

  In un certo senso, Linux  gi in qualche modo PnP per il bus PCI.
  Quando il PC si avvia si possono notare dai messaggi sullo schermo che
  alcuni driver di dispositivo di Linux spesso trovano i loro
  corrispondenti dispositivi hardware (e le risorse che il BIOS gli ha
  assegnato). Ma ci sono situazioni che un sistema operativo PnP
  potrebbe gestire meglio:

  1. una deficienza di risorse-bus

  2. pi di un driver per un dispositivo fisico

  3. un driver attivato che non riesce a trovare il suo dispositivo
     fisico

  4. nstallazioni a caldo di un dispositivo .

  Gli utenti di Linux non hanno bisogno di investigare i dettagli del
  PnP per configurare come si deve i dispositivi PnP ISA.  Una soluzione
  potrebbe essere una versione standardizzata del kernel di Linux che
  supporti il Plug-and-Play su ISA, PCI e altri bus.   stata scritta
  una patch per il kernel sebbene la maggior parte dei driver non la
  supportino.  Non  parte standard di Linux.  Si veda la sezione
  ``Patch per il Kernel''.



  4.  Configurazione del BIOS PnP



  Quando un computer viene acceso, prima di caricare il sistema
  operativo viene eseguito il BIOS.  I BIOS pi recenti sono PnP e
  configureranno alcuni (o al limite tutti) i dispositivi PnP.  In molti
  BIOS non c' modo di disabilitare il PnP e quindi bisogna conviverci.
  Qui di seguito alcune delle scelte che potrebbero essere presenti nel
  menu CMOS del proprio BIOS:


    ``Si ha un sistema operativo PnP?''

    ``Come devono essere controllate le risorse-bus?''

    ``Reinizializzare la configurazione?''


  4.1.  Si ha un sistema operativo PnP?


  Se si risponde affermativamente, allora il BIOS PnP inizier la
  configurazione PnP del disco fisso, della scheda video e della
  tastiera per rendere avviabile il sistema.   Ma lascer che il sistema
  operativo termini il lavoro di configurazione.  Potrebbe fare un
  ``Isolamento'' nel bus ISA lasciando i dispositivi disabilitati ma
  pronti per essere configurati dal sistema operativo.  Nel caso di
  Linux si dovrebbe dire che non si ha un sistema operativo PnP.  Se non
  lo si fa il BIOS potrebbe lasciare disabilitati i dispositivi ISA che
  non ha configurato ?? Inoltre potrebbero non venir configurati pure i
  dispositivi PCI ??

  Se si dice al BIOS che non si ha un SO PnP, allora il BIOS far tutta
  la configurazione da solo.  A meno che non siano stati aggiunti nuovi
  dispositivi PnP, dovrebbe usare la configurazione che ha salvato nella
  memoria non volatile (ESCD).  Si veda la sezione ``Il Database ESCD
  del BIOS''.  Se l'ultima sessione nel proprio computer  stata sotto
  Linux, allora non ci dovrebbero essere modifiche nella configurazione.
  Si veda la sezione ``Configurare il PnP dal BIOS''.  Ma se l'ultima
  sessione  avvenuta in Windows 9x (che  PnP) allora Windows potrebbe
  aver modificato l'ESCD.  Si suppone lo faccia solo se si  forzata
  una configurazione o si  installato un dispositivo legacy.  Si veda
  la sezione ``Usare Windows per Impostare l'ESCD''.  Se si sta usando
  isapnp o i programmi delle Utility PCI per la configurazione, questi
  saranno eseguiti dopo il BIOS e cambieranno le cose nel modo che gli
  si dice.


  4.1.1.  Interoperabilit con Windows9x

  Se si sta usando sia Linux che Windows nello stesso PC, come
  rispondere alla domanda del BIOS: Si ha un SO PnP?  Normalmente si
  dovrebbe dire no per Linux standard e s per Windows9x.  Ma  un sacco
  noioso dover reimpostare manualmente il menu CMOS ogni volta che si
  cambia SO.  Una soluzione  di impostare il CMOS come non si avesse un
  SO PnP, anche se si avvia Windows.  Uno si dovrebbe aspettare che
  Windows sia in grado di gestire questa situazione nella quale gli
  viene presentato l'hardware gi completamente configurato dal BIOS.
  Ci si aspetta inoltre che anche se Windows non realizza che l'hardware
   gi configurato, lo configuri da se e poi funzioni correttamente.
  Ma le cose non sembrano andare cos.  Sembra che Windows possa dire ai
  suoi driver di dispositivo solo quello che  presente nel suo
  Registry.  Ma la reale configurazione hardware (fatta dal BIOS) 
  quella salvata nell'ESCD e potrebbe non essere la stessa ==> problemi.

  Un modo per renderle uguali  di installare (o reinstallare) Windows
  quando il BIOS  impostato per nessun SO PnP.  Ci dovrebbe
  presentare a Windows l'hardware configurato dal BIOS.  Se questa
  configurazione  senza conflitti, Windows teoricamente la manterr e
  se la salver nel suo Registry.  A questo punto l'ESCD e in Registry
  sono sincronizzati.  Se questa cosa funziona (e questa e l'ultima
  versione dell'HOWTO), fatemelo sapere perch ho ricevuto solamente una
  notifica di buon funzionamento.

  Un altro metodo  di rimuovere i dispositivi che causa problemi in
  Windows, cliccando su rimuovi in Gestione Periferiche.  Poi si
  riavii con Nessun SO PnP (lo si imposti nel CMOS all'inizio del
  boot).  Windows poi reinstaller i dispositivi, teoricamente usando le
  impostazioni sulle risorse-bus configurate dal BIOS.  Attenzione che
  Windows probabilmente potrebbe chiedere di inserire il CD di
  installazione di Windows poich talvolta non riesce a trovare i driver
  (e altri file simili) anche se ci sono gi.  Come prova ho rimosso
  una scheda NIC che aveva driver compatibili con Novell.  Durante il
  riavvio, Windows l'ha reistallata come Microsoft networking invece di
  Novell.  Ci significa che ho dovuto reistallare il Client Novell.
  Fatemi sapere eventuali problemi con questo metodo (solo se questa 
  l'ultima versione di questo HOWTO).


  4.2.  Come devono essere controllate le risorse?


  Questa scelta determina il metodo con cui si vuole siano allocati IRQ
  e DMA.  Se impostata su auto, il BIOS far l'allocazione.  Se
  impostata su manual, si riserveranno manualmente alcuni IRQ per
  usarli con le schede legacy (non PnP).  Ora il BIOS potrebbe o meno
  essere conscio delle schede legacy presenti. Il BIOS verr a
  conoscenza delle schede legacy presenti se si eseguir ICU (o simile)
  sotto Windows per dirglielo.  Se ne  a conoscenza, allora si provi ad
  usare auto.  Se non le rileva allora si riservino manualmente gli
  IRQ necessari per le schede ISA legacy e si lasci quel che resta
  dell'allocazione al PnP del BIOS.


  4.3.  Reinizializzare la configurazione?

  Questa scelta canceller la base di dati ESCD del BIOS che contiene
  sia il modo in cui configurare i dispositivi PnP che l'elenco delle
  configurazioni dei dispositivi legacy (non PnP).  Mai fare questa cosa
  a meno che non si sia convinti che tale base di dati  errata e
  dev'essere ricostruita.  Da qualche parte  affermato che lo si
  dovrebbe fare solo se non si riesce ad avviare il proprio computer.
  Se il BIOS perde i dati sui dispositivi legacy, allora si dovr
  rieseguire ICA sotto DOS/Windows per ristabilire le informazioni.


  5.  Come gestire le schede PnP

  5.1.  Introduzione alla gestione delle schede PnP


  Oggigiorno molto delle nuove schede interne sono Plug-and-Play (PnP).
  Sebbene esista del software anche sotto Linux per gestire il PnP, non
   sempre facile da usare.  Esistono i 6 diversi metodi sottoelencati
  per tener testa al PnP (ma alcuni potrebbero non essere adatti alla
  propria situazione).  Quale, o quali, si dovrebbe usare dipende dai
  propri scopi.  Quello che ora sembra il pi conveniente, a lungo
  termine potrebbe rivelarsi essere n il pi facile n il migliore.  Un
  metodo apparentemente semplice  di non far niente e lasciare al BIOS
  PnP la configurazione, ma poi si dovranno fare un po' di ricerche per
  capire quello che il BIOS ha fatto.  Un confronto tra tutti questi
  metodi dovrebbe essere scritto da qualcuno che li ha provati tutti.
  Potrebbe essere necessario usarne pi di uno per portare a buon fine
  il lavoro.


    ``Disabilitare il PnP'' tramite i ponticelli o software per
     DOS/Windows (ma molte schede non offrono questa possibilit);

    ``Configurare il PnP dal BIOS'' (per il bus PCI si ha bisogno
     solamente di un BIOS PCI, altrimenti  necessario un BIOS PnP);

    ``Isapnp''  un programma che si pu sempre usare per configurare i
     dispositivi PnP ma solo nel bus ISA

    ``Le Utility PCI'' per la configurazione del bus PCI;

    ``Configurazione Tramite Windows'' e successivo avvio di Linux da
     Windows/DOS.  Da usare come ultima risorsa;

    ``Applicare una Patch al Kernel'' per trasformare Linux in un
     sistema operativo PnP;

    ``Configurazione Fatta dal Device  Driver'', ma pochi lo fanno.

  Ognuna delle suddette possibilit imposter le risorse-bus
  nell'hardware.  Ma solo le ultime due informeranno il gestore del
  dispositivo di quanto  stato fatto.  Solo l'ultima dice tutto al
  driver ( il driver).  Il modo nel quale viene informato il driver
  dipende dal driver stesso e pu essere necessario far qualcosa per
  informarlo.  Si veda ``Dire al Driver la Configurazione''.


  5.2.  Disabilitare il PnP ?


  Molti dispositivi sono solamente PnP senza la possibilit di
  disabilitarlo.  Ma per alcuni si potrebbe essere in grado di
  disabilitare il PnP tramite ponticelli o eseguendo il programma per
  Windows che si  ricevuto assieme al dispositivo (configurazione senza
  ponticelli).  Ci eviter l'onere, spesso complicato, della
  configurazione PnP.  Non si dimentichi di dire al BIOS che queste
  risorse-bus sono riservate.  Ci sono inoltre alcune ragioni per le
  quali si potrebbe non voler disabilitare il PnP:


  1. Se si ha MS Windows nella stessa macchina, allora si vorr
     permettere al PnP di configurare diversamente i dispositivi sotto
     Windows da come ha fatto sotto Linux.

  2. L'intervallo di selezione dei numeri IRQ (o indirizzi di porta)
     ecc. potrebbe essere piuttosto limitato finch non si usa il PnP.

  3. Si potrebbe avere un device driver di Linux che usa i metodi PnP
     per ricercare il dispositivo che controlla.

  4. Se si ha, in futuro, la necessit di modificare la configurazione,
     pu essere pi semplice farlo se il dispositivo  PnP (nessuna
     modifica ai ponticelli o esecuzione di un programma per
     DOS/Windows).

  5. Si hanno (o si avranno) altri dispositivi PnP che devono essere
     configurati e quindi si deve comunque fornire il PnP.

  Una volta configurati come dispositivi non PnP, non possono essere
  configurati n da un qualsiasi software PnP n dal BIOS (finch non si
  spostino i ponticelli e/o si usi ancora il software di configurazione
  per DOS/Windows).


  5.3.  Introduzione all'uso del BIOS per la configurazione PnP


  Se si ha un BIOS PnP, questo pu configurare l'hardware.  Ci
  significa che il proprio BIOS legge le richieste di risorse da tutti i
  dispositivi e li configura (alloca a loro le risorse-bus).   quasi un
  rimpiazzo di un SO PnP tranne per il fatto che il BIOS non associa i
  dispositivi con i loro gestori n dice a quest'ultimi come ha
  effettuato la configurazione. Normalmente dovrebbe usare la
  configurazione che ha salvato nella sua memoria non volatile (ESCD).
  Se trova un nuovo dispositivo e se c' un conflitto, il BIOS dovrebbe
  fare le modifiche necessarie alla configurazione e non user
  esattamente quello che c'era nell'ESCD.

  Il proprio BIOS deve supportare tale configurazione, ma talvolta non
  le fa correttamente o completamente.  Un vantaggio nell'uso del BIOS 
  che  semplice in quanto nella maggior parte dei casi non c' niente
  da impostare (se non dire nel menu CMOS del BIOS che non si ha un SO
  PnP).  Mentre alcuni gestori di dispositivo possono essere in grado di
  rilevare automaticamente quello che ha fatto il BIOS, in alcuni casi
  sar necessario determinarlo da s (non sempre facile).  Si veda la
  sezione ``Qual  la Mia Configurazione Corrente?''.  Un altro
  vantaggio  che il BIOS fa il suo lavoro prima dell'avvio di Linux
  cosicch tutte le risorse-bus sono pronte da usare (e trovate) dal
  driver del dispositivo che parte poco dopo.

  Secondo la MS  solo opzionale (non richiesto) che il BIOS PnP sia in
  grado di effettuare la configurazione PnP dei dispositivi (senza
  l'aiuto di MS Windows).  Ma sembra che la maggior parte dei BIOS fatti
  dopo il 1996 ?? possano farlo.  Si dovrebbe inviare una nota di
  ringraziamento se lo fanno nel modo corretto.  Configurano sia il bus
  ISA che il bus PCI, ma mi dicono che alcuni BIOS vecchi riescano a
  configurare solo il bus PCI.  Per saperne di pi sul proprio BIOS, si
  cerchi nel Web.  Per piacere, non si chieda a me in quanto non ho dati
  in proposito.  I dettagli del BIOS che si pu voler sapere potrebbero
  essere difficili da trovare (o addirittura non disponibili).  Alcuni
  BIOS hanno minime capacit PnP e provano girano la parte pi difficile
  della configurazione alle utility per Windows.  Se questo succede si
  deve trovare un altro metodo (come le isapnptools) o provare ad
  impostare il database ESCD se il BIOS ne ha uno.  Si veda la sezione
  seguente.


  5.3.1.  Il database ESCD del BIOS


  Il BIOS mantiene in un database non volatile una configurazione PnP
  che prover ad usare.   detta ESCD (Extended System Configuration
  Data, ovvero Dati di Configurazione Estesa del Sistema).  Ancora, la
  presenza dell'ESCD  opzionale, ma la maggior parte dei BIOS ce
  l'hanno.  L'ESCD non solo immagazzina la configurazione delle risorse
  di tutti i dispositivi PnP ma contiene inoltre le informazioni di
  configurazione dei dispositivi non PnP (e se li segna come tali) in
  modo da evitare conflitti.  I dati dell'ESCD sono solitamente salvati
  in un chip e rimangono integri quando viene tolta l'alimentazione, ma
  qualche volta sono salvati nel disco fisso??

  L'ESCD  pensata per mantenere l'ultima configurazione usata, ma se si
  usa un programma come isapnp o le utility PCI di Linux (che non
  aggiornano l'ESCD) allora l'ESCD non sapr niente di quello che si 
  fatto e non salver questa configurazione nell'ESCD.  Un buon SO PnP
  aggiorna l'ESCD cos la si pu usare successivamente per tutti i SO
  non PNP (come il Linux standard).  MS Windows pu fare questa cosa
  solo in casi speciali.  Si veda la sezione ``Usare Windows per
  Impostare l'ESCD''.

  Per usare quanto impostato nell'ESCD ci si assicuri di aver impostato
  Not a PnP OS (SO non PnP) o simile nel BIOS.  Allora ogni volta
  che il BIOS parte (prima che sia caricato il SO Linux) dovrebbe
  configurare le cose in questo modo.  Se il BIOS rileva una nuova
  scheda PnP che non  nell'ESCD, allora deve allocare le risorse-bus
  alla scheda e aggiornare l'ESCD.  Potrebbe anche dover cambiare le
  risorse-bus assegnate a una scheda PnP gi esistente e modificare
  l'ESCD di conseguenza.

  Se ogni dispositivi ha salvato la sua ultima configurazione nel
  proprio hardware, non sarebbe necessaria la configurazione
  dell'hardware ogni volta che si accende il PC.  Ma non funzionano in
  questo modo e quindi tutti i dati dell'ESCD devono essere mantenuti
  corretti se si usa il BIOS per il PnP.  Ci sono alcuni BIOS che non
  hanno una ESCD ma hanno un po' di memoria non volatile per
  immagazzinare informazioni su quali risorse-bus siano riservate per
  l'uso con schede non PnP.  Molti BIOS hanno entrambe le cose.


  5.3.2.  Usare Windows per impostare l'ESCD


  Se il BIOS non imposta l'ESCD nel modo che si vuole (o nel modo in cui
  dovrebbe essere) allora sarebbe comodo avere un'utility sotto Linux
  per impostare l'ESCD.  All'inizio del 1999 non ce n' nessuna.  Quindi
  uno potrebbe ripiegare nell'uso di Windows (se presente nello stesso
  PC) per farlo.

  Ci sono tre modi per usare Windows per provare ad impostare/modificare
  l'ESCD.  Un modo  di usare l'utility ICU progettata per DOS o Windows
  3.x.  Dovrebbe funzionare bene anche per Windows 9x/2k??  Un altro
  metodo  di impostare manualmente i dispositivi (forzarli) sotto
  Windows 9x/2x cosicch Windows metter queste informazioni nell'ESCD
  quando viene normalmente chiuso il sistema.  Il terzo  solamente per
  i dispositivi legagy che non sono plug-and-play.  Se a Windows  nota
  la loro presenza e quali sono le risorse-bus che usano, allora Windows
  dovrebbe mettere queste informazioni nell'ESCD.

  Se i dispositivi sono configurati automaticamente da Windows (senza
  che l'utente gli chieda di modificare le impostazioni) allora tale
  configurazione probabilmente non finir dentro l'ESCD.  Naturalmente
  Windows potrebbe decidere da s di configurare le cose nello stesso
  modo di come sono impostate nell'ESCD, cosicch alla fine sono
  identiche ma per una coincidenza.

  I Windows 9x sono sistemi operativi PnP e configurano automaticamente
  i dispositivi.  Mantengono il proprio database PnP ben nascosto nel
  Registry (salvato in un file binario di Windows).  Nel Registry ci
  sono inoltre un sacco di altre cose relative alla configurazione oltre
  alle risorse-bus PnP.  C' sia una configurazione corrente delle
  risorse PnP in memoria che un'altra (forse la stessa) salvata sul
  disco fisso.  Per vedere quella in memoria (?) sotto Windows98 o per
  forzare delle modifiche si usi Gestione Periferiche.

  In Windows98 ci sono due modi per avviare Gestione Periferiche: 1.
  Risorse del Computer --> Pannello di Controllo --> Propriet del
  Sistema --> Gestione Periferiche.  2. (bottone destro del mouse)
  Risorse del Computer --> Propriet --> Gestione Periferiche.  Poi in
  Gestione Periferiche si selezioni il dispositivo (solitamente un
  processo in pi passi se ci sono pi dispositivi della stessa classe).
  Poi si clicchi su Propriet e poi su Risorse.  Per modificare
  manualmente la configurazione si disabiliti Usa impostazione
  automatica e poi si clicchi su Cambia Impostazioni.  Ora si probi a
  modificare l'impostazione, ma Windows potrebbe non permettere la
  modifica.  Se lo permette, si  forzata una modifica.  Un messaggio
  dovrebbe infomarmare che si sta forzando.  Se si vogliono mantenere le
  impostazioni esistenti mostrate da Windows ma renderle forzate,
  allora si dovr forzare una modifica in qualcosa e poi riforzarla al
  suo valore originale.

  Per vedere cosa  stato forzato in Windows98 si veda l'elenco
  dell'hardware forzato: Avvio --> Programmi --> Accessori --> Sistema
  --> Informazioni sul Sistema --> Risorse Hardware --> Hardware
  Forzato.  Quando si forza una modifica di risorse-bus in Windows,
  dovrebbe mettere tali modificge nell'ESCD (a patto che Windows sia
  chiuso correttamente).  Dalla finestra Informazioni del Sistema si
  possono inoltre ispezionare quali IRQ e porte IO sono allocate sotto
  Windows.

  Anche se Windows non mostra conflitti nelle risorse-bus, potrebbero
  essercene sotto Linux.  Questo perch Windows potrebbe assegnare
  risorse-bus differenti da quello che fa l'ESCD.  Nel raro caso in cui
  tutti i dispositivi sotto Windows siano legagy oppure siano stati
  forzati, allora le configurazioni di Windows e dell'ESCD dovrebbero
  essere identiche.


  5.3.3.  Aggiungere un nuovo dispositivo (sotto Linux o Windows)


  Se si aggiunge un nuovo dispositivo PnP  e si ha il BIOS impostato a
  nessun SO PnP, allora il BIOS dovrebbe configurarlo automaticamente
  e salvare la configurazione nell'ESCD.  Se  un dispositivo legacy non
  PnP (o uno reso tale con i jumper, ecc.) allora ci sono un po' di
  opzioni per gestirlo.

  Si pu dire direttamente al BIOS (tramite il menu di configurazione
  CMOS) che certe risorse-bus (come gli IRQ) sono riservate e che non
  devono essere allocate dal PnP.  Ci non mette queste informazioni
  nell'ESCD.  Ma ci pu essere una scelta nel menu del BIOS che
  specifica quando, in caso di conflitto, queste scelte CMOS hanno o
  meno priorit su quanto  salvato nell'ESCD.  Un altro metodo  di
  eseguire ICU sotto DOS/Windows.  Un altro ancora  di installare
  manualmente il dispositivo sotto Windows 9x/2k e poi assicurarsi che
  la sua configurazione sia forzata (si veda la sezione precedente).
  Se  forzata Windows dovrebbe aggiornare l'ESCD quando si spegne il
  PC.


  5.4.  Isapnp (parte degli isapnptools)


  Sfortunatamente, buona parte della documentazione per gli isapnptools
   ancora difficile da comprendere a meno che non si conoscano le basi
  del PnP.  Questo HOWTO dovrebbe aiutare, come d'altronde aiuta la FAQ
  distribuita con il programma. isapnp  solo per i dispositivi PnP sul
  bus ISA (non PCI). L'esecuzione del programma per Linux isapnp
  all'avvio del sistema configurer tali dispositivi secondo i valori
  delle risorse specificate nel file /etc/isapnp.conf.   possibile
  creare automaticamente questo file di configurazione, ma poi lo si
  deve modificare manualmente per scegliere tra le varie opzioni. Con
  isapnp, un driver di dispositivo che sia parte del kernel pu essere
  eseguito troppo presto, cio prima che isapnp abbia impostato
  indirizzi, ecc. nell'hardware.  Ci risulta nel mancato rilevamento
  del dispositivo da parte del driver. Il driver prova negli indirizzi
  giusti, ma tali indirizzi non sono ancora stati impostati
  nell'hardware.

  Se la propria distribuzione installa automaticamente gli isapnptools,
  allora probabilmente isapnp  gi automaticamente eseguito all'avvio.
  In questo caso, tutto quel che si deve fare  modificare il file
  /etc/isapnp.conf come spiegato da man isapnp.conf.  Si noti che
  questa cosa  equivalente alla configurazione manuale del PnP poich
  si fanno decisioni su come configurare il tutto modificando tale file
  di configurazione.  Se si usa isapnp in questo modo e si ha un BIOS
  PnP, si dovrebbe dire al BIOS (quando lo si configura) che si ha un
  sistema operativo PnP ??

  Se si esegue isapnp una volta per configurare i dispositivi ISA PnP,
  ma l'esecuzione di isapnp fallisce ogni volta che il computer viene
  avviato, allora se si ha MS Windows (95 o 98) sullo stesso PC la cosa
  potrebbe essere dovuta al seguente problema:  quando si usa MS Windows
  (95 o 98), Windows potrebbe configurare diversamente le schede PnP in
  modo tale che non funzioneranno correttamente (se non del tutto)
  quando si torna in Linux.  Si pu usare il programma pnpdump per
  aiutarsi nella creazione del file di configurazione.  Questo
  praticamente crea un file di configurazione anche se lo si deve
  modificare un po' prima di poterlo usare.  Contiene alcuni commenti
  per aiutare nella modifica.  Se si usa isapnp per configurare e si
  ha un BIOS PnP, probabilmente si dovr dire al BIOS che non si ha un
  sistema operativo PnP poich si vuole che il BIOS si occupi di
  configurare i dispositivi PCI.  Sebbene il BIOS possa configurare i
  anche dispositivi ISA, isapnp comunque lo rifar.

  La terminologia usata nel file /etc/isapnp.conf all'inizio pu
  sembrare un po' ostica.  Per esempio per un indirizzo IO pari a 0x3e8
  si potrebbe invece vedere (IO 0 (BASE 0x3e8)). L'IO 0 indica che
  questo  il primo (zeresimo) intervallo di indirizzi IO che questa
  dispositivo usa.  Un altro modo per esprimire questa cosa sarebbe:
  IO[0] = 0x3e8 ma isapnp non lo fa in questo modo.  IO 1 indica il
  secondo intervallo di indirizzi usato da questo dispositivo, ecc.
  INT 0 ha un significato simile ma per gli IRQ (interrupt).  Una
  singola scheda pu contenere diversi dispositivi fisici e la
  spiegazione di prima riguarda solamente uno di questi.


  5.5.  Le utility PCI


  Il nuovo pacchetto delle Utility PCI (= pciutils, incorrettamente
  detto pcitools), dovrebbe permettere di effettuare manualmente la
  configurazione PnP sul bus PCI.  lspci elenca le risorse-bus, mentre
  setpci imposta l'allocazione delle risorse nei dispositivi hardware.
  Sembra che setpci sia pensato principalmente per l'uso negli script e
  al momento per usarlo si devono conoscere i dettagli dei registri di
  configurazione PCI.  Questa informazioni non sono spiegate qui e
  nemmeno nella pagina man di setpci.



  5.6.  Applicare una patch al kernel per rendere Linux PnP


  David Howells ha creato una patch per farlo chiamata Linux Kernel
  Configuration/Resource Manager (talvolta chiamata semplicemente
  Hardware Configuration Manager).  Nel tardo 1999 la patch non era
  disponibile nel suo sito web.  Ci potrebbe indicare che non c' una
  patch disponibile per le versioni recenti del kernel.

  Con le patch precedenti il kernel risultante si diceva fosse stabile
  anche se erano stati segnalati dei bug.  La patch include
  documentazione cone il serial.txt per mostrare come trattare la porta
  seriale.  Fornisce file nell'albero /proc cosicch si pu vedere
  cosa sta accadendo ed in uno di questi  possibile inserire comandi
  attraverso il comando echo per personalizzare la configurazione.  Un
  problema  che la maggior parte dei gestori di dispositivo non sono
  consci delle funzionalit introdotte da questa patch e quindi per la
  configurazione si devono usare ancora i tradizionali file di
  configurazione, ecc.  La pagina web   <http://www.astarte.free-
  online.co.uk>.


  5.7.  Configurazione tramite Windows


  Si si ha Windows9x (o 2k) sullo stesso PC, allora semplicemente si
  avvii Windows e lo si lasci configurare il PnP.  Poi si avvi Linux da
  Windows (o da DOS).   stato segnalato che Windows cancella tutti gli
  IRQ dai registri dei dispositivi PCI.  Allora Linux segnala questa
  cosa dicendo che trova un IRQ zero.  Quindi si potrebbe non essere in
  grado di usare questo metodo.


  5.8.  Configurazione fatta dal device driver


  Alcuni gestori di dispositivo useranno i metodi PnP per impostare le
  risorse-bus nell'hardware ma solo per i dispositivo che controllano.
  Poich la configurazione l'ha fatta il driver, ovviamente quest'ultimo
  conosce la configurazione e non  necessario fornirgli queste
  informazioni.

  Il problema in questo caso  duplice.   difficile incorporare tutto
  questo nel driver, e il driver potrebbe prendere le risorse-bus di cui
  ha bisogno da altri dispositivi.  Rende le cose facili per l'utente,
  ma un kernel Linux PnP sarebbe migliore.  Si veda ``Linux Ha Bisogno
  Di Tener Testa Meglio al PnP''.


  5.9.  Software e documentazione sul PnP


    homepage degli Isapnptools
     <http://www.roestock.demon.co.uk/isapnptools/>

    Patch per rendere il kernel Linux PnP <http://www.astarte.free-
     online.co.uk>

    Progetto PnP driver <http://www.io.com/~cdb/mirrors/lpsg/pnp-
     linux.html>

    Specifiche sul PnP della Microsoft
     <http://www.microsoft.com/hwdev/respec/pnpspecs.htm>

    Libro: PCI System Architecture, 3rd ed. di Tom Shanley +, MindShare
     1995.  Tratta le caratteristiche simili al PnP del bus PCI.

    Libro: Plug and Play System Architecture, di Tom Shanley, Mind
     Share 1995.  Dettagli del PnP sul bus ISA.  Solo una concisa
     panoramica del PnP sul bus PCI.

    Libro: Programming Plug and Play, di James Kelsey, Sams 1995.
     Dettagli sulla programmazione per comunicare con un BIOS PnP.
     Tratta i bus ISA, PCI e PCMCIA.


  6.  Dire la configurazione al driver

  6.1.  Introduzione



  Come ci  fatto dipende dal driver.  Alcuni hanno pi di un modo per
  scoprire come sono configurati i lori dispositivi fisici.  Ad un
  estremo c' il caso nel quale si devono codificare permanentemente le
  risorse-bus nel kernel e ricompilarlo.  All'altro estremo, i driver fa
  tutto automaticamente e quindi non si deve fare niente.  Potrebbe pure
  impostare le risorse-bus nell'hardware usando i metodi PnP.

  In mezzo ci sono i casi nei quali si esegue un programma per fornire
  le informazioni sulle risorse al driver oppure si mettono tali
  informazioni in un file.  In alcuni casi i driver potrebbe cercare i
  dispositivo agli indirizzi ai quali sospetta che questo risieda.  Poi
  pu provare a verificare diversi IRQ per vedere quale funziona.  Pu o
  meno fare queste cose automaticamente.  In altri casi il driver pu
  usare i metodi PnP per trovare il dispositivo e scoprire come sono
  state impostate le risorse-bus, ma non le imposter lui stesso.  Pu
  pure guardare in alcuni file nella directory /proc.

  Pu essere necessario fornire le risorse-bus come parametro al kernel
  o a un modulo caricabile.  Si veda /usr/lib/modules_help/descr.gz per
  un'elenco dei possibili parametri.  Il modulo da caricare  elencato
  in /etc/modules assieme con i propri parametri.  In alcuni altri casi
  le risorse-bus possono essere date come parametri al kernel.  Sono
  messe nel file lilo.conf come append="...".  Poi dev'essere eseguito
  il programma lilo per salvare nel codice di avvio del kernel.

  Sebbene ci sia una grande disuniformit su come i driver scoprono le
  informazioni sulle risorse-bus, il risultato finale  lo stesso.  Ci
  sono cos tanti dispositivi hardware diversi e driver per essi che 
  meglio guardare la documentazione per il proprio driver per capire
  come si informa sulle risorse-bus e cosa si deve fare per assicurasi
  che riceva le informazioni di cui ha bisogno.  Nelle sezioni che
  seguono sono presentate brevi informazioni su alcuni gestori.


  6.2.  Il driver delle porte seriali: setserial


  Per configurare il gestore della porta seriale standard (non per le
  schede multiporta) si usa setserial.  Spesso  eseguito da uno dei
  file di inizializzazione.  Nelle versioni pi recenti c' un file
  /etc/serial.conf che si pu editare semplicemente usando in modo
  normale il comando setserial e quel che si imposta usando setserial 
  salvato nel file di configurazione serial.conf.  Il file serial.conf
  dovrebbe essere consultato quando il comando setserial  eseguito da
  un file di inizializzazione.  La popria distribuzione potrebbe o meno
  aver gi impostato questa cosa.

  Ci sono due modi diversi di usare setserial a seconda delle opzioni
  che gli si d.  Un modo  di usarlo per dire manualmente al driver la
  configurazione.  L'altro  di indigare ad un indirizzo specificato e
  segnalare se l esiste una porta seriale.  Pu pure indigare a questo
  indirizzo e provare a rilevare quale IRQ  usato per questa porta.  Il
  driver esegue qualcosa di simile a setserial all'avvio ma rileva gli
  IRQ, assegna semplicemente gli IRQ predefiniti che potrebbe pure
  essere sbagliati.  Controlla invece l'esistenza di un aporta.  Si veda
  il Serial-HOWTO per maggiori dettagli.



  6.3.  Gestori della scheda audio

  6.3.1.  OSS-Lite

  Si deve fornire IO, IRQ e DMA come parametri al modulo oppure
  compilare il supporto all'interno del kernel fissando i valori.
  Alcune schede PCI saranno rilevate automaticamente (basta usare il
  comando lspci o equivalente).  La RedHat fornisce un programma
  sndconfig che rileva le schede PnP ISA e configura automaticamente i
  moduli da caricare con le risorse-bus rilevate.


  6.3.2.  OSS (Open Sound System) e ALSA

  Questi rileveranno la scheda tramite i metodi PnP e poi selezioneranno
  il driver appropriato e lo caricheranno.  Imposteranno anche le
  risorse-bus su una scheda PnP ISA.  Pu essere necessario intervenire
  manualmente per evitare conflitti.  Nel driver ALSA, il supporto per
  il PnP ISA  opzionale e se si vuole si possono usare gli isapnptools.


  7.  Qual  la mia configurazione corrente?


  Qui configurazione indica l'assegnazione delle risorse-bus PnP
  (indirizzi, IRQ e DMA).  Per ogni dispositivo questa domanda pu
  essere vista da due parti.  Da ogni parte dovrebbe avere la stessa
  risposta.

  1. Qual  la configurazione del software di gestione del dispositivo?
     ovvero: Il driver come pensa sia configurato l'hardware?

  2. Quale configurazione (se esiste)  impostata nel dispositivo
     hardware?

  Naturalmente la configurazione del dispositivo hardware e del suo
  driver dovrebbe essere la stessa (e normalmente lo ).  Ma se le cose
  non vanno per il verso giusto, ci possono essere delle differenze.
  Ci significa che il driver ha informazioni incorrette sulla
  configurazione reale dell'hardware.  E questo pu essere un problema.
  Se il software che si usa non spiega adeguatamente cosa c' che non va
  (oppure non configura tutto automaticamente) allora bisogna
  investigare per capire come sono configurati i dispositivi hardware e
  i relativi driver.  Sebbene i device driver di Linux dovrebbero dire
  tutto in alcuni casi non  semplice determinare che cosa  stato
  impostato nell'hardware.

  Un altro problema  che quando si vede un messaggio di configurazione
  sullo schermo, qualche volta non  chiaro se la configurazione
  riportata  quella del driver del dispositivo, del dispositivo stesso
  o di entrambi.  Se al driver del dispositivo  assegnata una
  configurazione e poi questo verifica nell'hardware per vedere se 
  configurato nello stesso modo, allora la configurazione riportata
  dovrebbe essere quella sia dell'hardware che del driver.

  Ma alcuni driver non lo farlo in quanto possono accettare una
  configurazione senza verificarla.  Per esempio, setserial accetta
  una configurazione senza verificarla (anche se gli si dice di rilevare
  le risorse-bus).  Quindi setserial pu solamente dire la
  configurazione del driver e non quella dell'hardware.


  7.1.  Messaggi all'avvio

  Alcune informazioni sulla configurazione possono essere ottenute
  leggendo i messaggi del BIOS e di Linux che appaiono sullo schermo
  quando inizialmente si avvia il computer.  Spesso questi messaggi
  scorrono troppo velocemente per poterli leggere, ma dopo che si sono
  fermati si prema alcune volte Shift+PageUp per vedere quelli passati.
  Digitando in qualsiasi momento dmesg al prompt della shell verranno
  mostrati solo i messaggi del kernel di Linux e si perderanno alcuni
  dei pi importanti (tar cui quelli del BIOS).  I messaggi di Linux
  qualche volta possono mostrare solamente quella che il driver di
  dispositivo pensa sia la configurazione, forse specificategli
  attraverso un file di configurazione sbagliato.

  I messaggi del BIOS mostreranno la configurazione hardware in quel
  momento, ma un SO PnP, isapnp o le utility PCI possono successivamente
  modificarla.  I messaggi del BIOS sono mostrati prima di quelli di
  Linux.  Come alternativa all'uso alla fine di Shift+PageUp per
  leggerli, si provi a congelarli premento il tasto Pause.  Si prema
  un qualsiasi altro tasto per riprendere.  Ma non appena iniziano ad
  apparire i messaggi di Linux  gi troppo tardi per usare Pause in
  quanto non congeler i messaggi di Linux.


  7.2.  Come sono configurati i miei driver di dispositivo?


  Per determinarlo ci potrebbe essere un programma che si pu eseguire
  da riga di comando (come setserial per le porte seriali).  La
  directory /proc torna molto utile.  /proc/ioports mostra gli indirizzi
  I/O che usano i driver (o provano ad usare se errati).  Tali indirizzi
  possono non essere impostati nello stesso modo nell'hardware.

  /proc/interrupts mostra solamente gli interrupt correntemente in uso.
  Molti di quelli che sono stati allocati ai driver non sono mostrati in
  quanto non attualmente in uso.  Per esempio, anche se il proprio
  lettore di dischetti ha un dischetto a suo interno ed  pronto
  all'uso, il suo interrupt non sar mostrato finch non lo si usa.
  Ancora, solo perch qui viene mostrato un interrupt non significa che
  esiste nell'hardware.  Un traccia evidente che non esiste
  nell'hardware si avr se sar mostrato che per questo interrupt sono
  avvenute 0 interruzioni.  Anche se mostra che alcuni interrupt hanno
  ricevuto alcune interruzioni, pu significare che tale interrupt non
  esiste nel dispositivo mostrato a fianco, ma esiste piuttosto in
  qualche altro dispositivo non in uso, ma che in qualche modo ha
  ricevuto un paio di interruzioni.  Nel kernel 2.2 l'albero /proc 
  stato cambiato.


  7.3.  Come sono configurati i miei dispositivi hardware?


  Con il comando lspci  facile vedere quali risorse-bus sono state
  assegnate ad un dispositivo nel bus PCI.  Per i kernel precedenti al
  2.2: si veda /proc/pci o /proc/bus/pci.  Si noti che gli IRQ in
  /proc/pci sono in esadecimale.  Non si perda tempo a tentare di
  decifrare /proc/bus/pci/devices poich lspci lo far per voi.

  Per il bus ISA si pu provare ad eseguire pnpdump --dumpregs ma non 
  una cosa sicura.  I risultati possono sembrare un po' criptici ma
  possono essere decifrati.  Non si confornda l'indirizzo della read-
  port al quale pnpdump prova (e trova qualcosa) con l'indirizzo I/O
  del dispositivo trovato.  Non sono la stessa cosa.  Per provare a
  trovare l'hardware su bus ISA che manca (sia questo PnP o legacy) si
  provi il programma scanport ma si faccia attenzione perch potrebbe
  bloccare la macchina.

  I messaggi del BIOS all'avvio del sistema dicono com'era allora la
  configurazione.  Se ci si affida al BIOS per la configurazione, allora
  dovrebbe essere ancora la stessa.  I messaggi di Linux possono essere
  generati dai driver che hanno controllato per vedere se l'hardware 
  effettivamente l (e possibilmente verificato IRQ e DMA).
  Naturalmente, se il dispositivo funziona correttamente, allora
  probabilmente  configurato nello stesso modo del driver.


  8.  Appendice

  8.1.  Indirizzi


  Esistono tre tipi di indirizzi: indirizzi nella memoria principale,
  indirizzi I/O e indirizzi di configurazione.  Gli indirizzi di
  configurazione nel bus PCI costituiscono uno spazio di indirizzi
  separato proprio come fanno gli indirizzi I/O.  Tranne per il caso
  complicato degli indirizzi di configurazione ISA, dove il fatto che un
  indirizzo nel bus sia o meno un indirizzo di memoria, un indirizzo di
  I/O o un indirizzo di configurazione dipende solo dal potenziale di
  tensione in altre linee (tracce) del bus.


  8.1.1.  Indirizzi di configurazione del bus ISA (Read-Port, ecc.)

  Nel bus ISA, tecnicamente non c' uno spazio di indirizzi di
  configurazione, ma c' un modo speciale con il quale la CPU accede ai
  registri di configurazione PnP sulle schede PnP.  Per questo scopo
  sono allocati 3 indirizzi di I/O.  Non sono allocati 3 indirizzi per
  ognuna delle schede, ma 3 indirizzi condivisi da tutte le schede.

  Questi 3 indirizzi sono chiamati read-port (porta di lettura), write-
  port (porta di scrittura) e address-port (posta di indirizzo).  Ogni
  porta ha la dimensione di un solo byte.  Ogni scheda PnP ha molti
  indirizzi di configurazione cosicch solamente questi 3 indirizzi non
  sono nemmeno sufficienti per i registri di una sola scheda.  Per
  comunicare con una certa schede,  inviato a tutte le schede nella
  write-port un numero speciale assegnato alla scheda (handle).  Dopo di
  che la sola scheda che rimane in ascolto  quella con quell'handle.
  Allora l'indirizzo del registro di configurazione (di quella scheda) 
  inviato nella address-port (di tutte le schede -- ma solamente una 
  in ascolto). La comunicazione successiva inizia con un registro di
  configurazione su quella scheda leggendolo dalla read-port oppure
  scrivendolo nella write-port.

  La write-port  sempre a A79 e la address-port  sempre a 279 (hex).
  La read-port invece non  fissata ma  impostata da software di
  configurazione ad un qualche indirizzo che si suppone non entri in
  conflitto con nessun'altra scheda ISA.  Se c' un conflitto, cambier
  l'indirizzo.  Tutte le schede PnP saranno poi programmate con questo
  indirizzo.  Quindi se diciamo si usa isapnp per impostare o verificare
  i dati della configurazione si deve conoscere l'indirizzo di questa
  read-port.


  8.1.2.  Intervalli di indirizzi


  Talvolta in questo documento il termine indirizzi  usato per
  intendere un intervallo contiguo di indirizzi.  Poich gli indirizzi
  sono dati in byte, un indirizzo singolo contiene solamente un byte,
  mentre l'I/O e la memoria principale ne hanno bisogno di molti di pi.
   quindi spesso usato un intervallo di diciamo 8 byte per gli
  indirizzi I/O mentre l'intervallo di indirizzi in memoria principale
  allocato ad un dispositivo  molto maggiore.  Per una porta seriale
  (un dispositivo di I/O)  sufficiente specificare l'indirizzo di
  partenza dell'indirizzo I/O del dispositivo (ad esempio 3F8) in quanto
   ben noto che l'intervallo di indirizzi per una porta seriale  di
  soli 8 byte.  L'indirizzo di partenza  noto come base address
  (indirizzo base).


  8.1.3.  Spazio di indirizzi


  In ISA, per accedere sia allo spazio di indirizzi I/O che a quello
  di memoria (principale)  usato lo stesso bus indirizzi (address bus)
  (le linee usate nel bus sono condivise). Come fa un dispositivo a
  sapere quando un indirizzo che appare sull'address bus  un indirizzo
  di memoria o un indirizzo I/O?  Beh, ci sono 4 linee dedicate sul bus
  che trasportano questa informazione ed altro.  Se una ben determinata
  di queste 4 linee  attiva, dice che la CPU vuole leggere da un
  indirizzo I/O e quindi la memoria principale ignora l'indirizzo sul
  bus.  Le altre 3 linee servono per scopi analoghi.  In breve: esistono
  linee di lettura e di scrittura sia per gli indirizzi di memoria
  principale che per quelli di I/O (4 linee in tutto).

  Nel bus PCI c' la stessa idea di base, che usa sempre 4 linee, ma il
  tutto viene fatto in maniera un po' diversa.  Invece di essere
  attiva solo una delle 4 linee, in queste viene posto un numero
  binario (16 diverse possibilit).  Quattro di questi 16 numeri servono
  gli spazi di I/O e di memoria come visto prima.  Inoltre c' anche uno
  spazio di indirizzi di configurazione che usa altri 2 numeri.  Gli
  altri 10 numeri extra sono lasciati per altri scopi.


  8.1.4.  Verifica dell'intervallo (Test ISA per i conflitti di indi
  rizzo I/O)


  Nel bus ISA, c' un metodo costruito dentro ogni scheda PnP per
  verificare che non ci siano altre schede che usano gli stessi
  indirizzi.  Se due o pi schede usano gli stessi indirizzi I/O,
  probabilmente neanche una scheda funzioner bene (se non tutte).  Un
  buon software di PnP dovrebbe assegnare le risorse-bus in modo da
  evitare i conflitti, ma anche in questo caso una scheda legacy
  potrebbe nascondersi da qualche parte lo stesso indirizzo.

  Il test inizia con una scheda che mette un numero di controllo nei
  proprio registri I/O.  Successivamente il software PnP lo legge e
  verifica di aver letto lo stesso numero di controllo.  Se non  vero,
  qualcosa  andato storto (ad esempio un'altra scheda con lo stesso
  numero di controllo).  Ripete allora lo stesso test con un altro
  numero di controllo.  Poich in realt verifica l'intervallo di
  indirizzi I/O assegnati alla scheda,  detto range check (verifica
  di intervallo).  Un nome migliore potrebbe essere verifica dei
  conflitti di indirizzo.  Se c' un conflitto di indirizzo si ottiene
  un messaggio d'errore e lo si deve risolvere per proprio conto.


  8.1.5.  Comunicare direttamente attraverso la memoria


  Tradizionalmente, la maggior parte dei dispositivi I/O usano solamente
  la memoria I/O per comunicare con la CPU.  Per esempio, la porta
  seriale lo fa.  Il device driver, in esecuzione nella CPU, vorrebbe
  leggere e scrivere dati sia dallo/nello spazio di indirizzi I/O che
  dalla/nella memoria principale.  Il modo pi veloce si avrebbe se il
  dispositivo stesso mettesse i dati direttamente nella memoria
  principale.  Un modo per farlo  usare i ``Canali DMA'' o il bus
  mastering.  Un altro modo  di allocare al dispositivo un po' di
  spazio in memoria principale.  In questo modo il dispositivo legge e
  scrive direttamente nella memoria principale senza preoccuparsi di DMA
  e bus mastering.  Tale dispositivo pu usare anche indirizzi I/O.


  8.2.  Interrupt -- Dettagli


  Gli interrupt trasportano un sacco di informazioni, ma solo
  indirettamente.  Il segnale di interrupt (una tensione in una linea)
  dice semplicemente ad un chip chiamato interrupt controller
  (controllore delle interruzioni) che un certo dispositivo chiede un
  po' di attenzione.  L'interrupt controller allora lo segnala alla CPU.
  La CPU trova il driver per questo dispositivo e esegue una parte di
  esso nota come interrupt service routine (routine di servizio
  dell'interrupt) o interrupt handler.  Questa routine prova a
  capire cos' successo e poi si occupa del problema, come il
  trasferimento di dati da (o nel) dispositivo.  Questo programma
  (routine) pu facilmente scoprire cos' successo in quanto il
  dispositivo ha dei registri ad un indirizzo noto al software di
  gestione (premesso che le informazioni sul numero IRQ e l'indirizzo di
  I/O siano impostate correttamente).  Questi registri contengono
  informazioni sullo stato del dispositivo.  Il software legge il
  contenuto di questi registri e ispezionandone il contenuto, scopre
  cos' successo e intraprende l'azione appropriata.

  Quindi ogni device driver ha bisogno di sapere su quale numero di
  interrupt (IRQ) restare in ascolto.  Nel bus PCI (e per le porte
  seriali sul bus ISA a partire dal kernel 2.2)  permesso che due (o
  pi) dispositivi condividano lo stesso numero IRQ.  Quando avviene
  tale interrupt, la CPU esegue la routine di servizio dell'interruzione
  per tutti questi dispositivi che usano quell'interrupt.  La prima cosa
  che fa la prima delle routine  di controllare per vedere se
  l'interrupt  effettivamente avvenuto per il suo dispositivo.  Se non
  c'erano interrupt (falso allarme) la routine termina e parte la
  successiva routine di servizio, ecc.


  8.3.  Interrupt PCI

  Gli interrupt PCI sono diversi, ma poich solitamente sono mappati su
  IRQ si comportano quasi nello stesso modo.  Una differenza sostanziale
   che gli interrupt PCI possono essere condivisi.  Per esempio l'IRQ5
  pu essere condiviso da due dispositivi PCI.  Questa funzionalit di
  condivisione  automatica: non  necessario hardware o software
  speciale.  Si sono avute notizie di situazioni nelle quali questa
  condivisione non funzionava, ma solitamente era dovuto a difetti nel
  software di gestione del dispositivo.  Si suppone che tutti i device
  driver per i dispositivi PCI forniscano la condivisione degli
  interrupt.  Si noti che non  possibile condividere lo stesso
  interrupt tra il bus ISA e il bus PCI.  Comunque, le condivisioni
  illegali funzioneranno a patto che i dispositivi in conflitto non
  siano in uso nello stesso istante.  In uso qui significa che un  in
  esecuzione un programma che apre il device nel suo codice C di
  programmazione.

   necessario conoscere alcuni dettagli del sistema di interrupt PCI
  per poter impostare il CMOS del BIOS o i ponticelli nelle vecchie
  schede PCI.  Ogni scheda PCI ha 4 possibili interrupt: INTA#, INTB#,
  INTC# e INTD#.  Quindi per un sistema a 7 slot ci possono essere 7 x 4
  = 28 diverse linee di interrupt.  Ma le specifiche permettono un
  numero minore di linee di interrupt.  Questo non  troppo restrittivo
  in quanto gli interrupt possono essere condivisi.  Molti bis PCI
  sembrano essere fatti con solo 4 linee di interrupt.  Chiamiamole
  linee (connessioni o tracce) W, X, Y e Z.  Supponiamo di progettare
  l'interrupt B dello slot 3 come interrupt 3B.  Allora la linea W
  potrebbe essere usato per condividere gli interrupt 1A, 2B, 3C, 4D,
  5A, 6B e 7C.  Ci  fatto connettendo fisicamente la linea W alla
  linee 1A, 2B, ecc. Nello stesso modo la linea X potrebbe essere
  connessa alle linee 1B, 2C, 3D, 4A, 5B, 6C e 7D.  Poi, all'avvio, il
  BIOS mappa le linee X, W, Y e Z su IRQ.  Dopodich scrive l'IRQ sul
  quale  mappato ogni dispositivo dentro un registro hardware presente
  su ogni dispositivo.   Ora chiunque interroghi il dispositivo pu
  trovare quale IRQ usa.

  Le summenzionate linee X, W, Y e Z sono etichettate nelle specifiche
  PCI come INTA#, INTB#, INTC# e INTD#.  Questa notazione PCI ufficiale
  pu confondere in quanto ora INTA# ha due possibili significati a
  seconda si stia parlando di uno slot o del bus PCI.  Per esempio, se
  3C  mappato su X allora diciamo che l'INTC# dello slot 3  connesso a
  INTA# (X) del bus PCI.  Notazione piuttosto confusa.

  Inoltre c' un altro vincolo.  Uno slot PCI deve usare per primo
  l'interrupt con la lettera pi bassa.  Quindi se una slot usa solo un
  interrupt, deve essere INTA#.  Se ne usa due devono essere INTA# e
  INTB#, ecc.  Una scheda in uno slot pu avere su fino ad 8
  dispositivi, ma per questi ci sono solo 4 interrupt PCI.  Ci va bene
  lo stesso in quanto gli interrupt possono essere condivisi in modo
  tale che ognuno degli 8 dispositivi (se esistono) pu avere un
  interrupt.  La lettera dell'interrupt PCI di un dispositivo spesso 
  fissa e scritta nell'hardware del dispositivo.

  Il BIOS assegna IRQ (interrupt) in modo da evitare i conflitti con gli
  IRQ che sa sono gi assegnati sul bus ISA.  Talvolta nel menu CMOS del
  BIOS  possibile assegnare gli IRQ alle schede PCI (ma non  cos
  semplice come spiegato sopra).  Ci sono situazioni nelle quali Windows
  azzera tutti i numeri IRQ delle schede PCI dopo l'impostazione della
  mappatura degli IRQ.  Se poi qualcuno avvia Linux da Windows ottiene
  come risultato che Linux pu trovare solo IRQ nulli e quindi
  sbagliati.

  Si potrebbe pensare che poich il PCI sta usando gli IRQ (il bus ISA)
  potrebbe essere lento, ecc.  Non in realt.  I chip ISA di controllo
  degli interrupt posseggono linee dirette di interrupt che vanno alla
  CPU in modo da ottenere attenzione immediata.  Mentre i segnali nei
  bus ISA di dati e indirizzi devono passare per il bus PCI per ottenere
  la CPU, i segnali di IRQ ci vanno direttamente.



  8.4.  Isolamento

  Questa cosa  pertinente solo con il bus ISA.  L'isolamento
  (isolation)  un complesso metodo per assegnare un handle temporaneo
  (numero identificativo o Card Select Number = CSN) ad ogni dispositivo
  PnP presente nel bus ISA.  Sebbene esistano modi molto pi efficienti
  (ma pi complessi) per fare questa cosa, alcuni dicono che questo  un
  metodo semplice.   usato solo un indirizzo di scrittura per tutte le
  scritture PnP a tutti i dispositivi PnP, cosicch quello che viene
  scritto in questo indirizzo va a tutti i dispositivi PnP che sono in
  ascolto.  Questo indirizzo di scrittura  usato per inviare
  (assegnare) un handle univoco ad ognuno dei dispositivi PnP.  Questa
  assegnazione richiede che solo un dispositivo sia in attesa quando 
  inviato (scritto) l'handle in questo indirizzo comune.  Tutti i
  dispositivi PnP hanno un numero di serie univoco che usano per il
  processo di isolamento.  Fare l'isolamento  qualcosa di simile ad un
  gioco.   fatto usando l'equivalente di una sola linea del bus che
  collega tutti i dispositivi PnP e il programma di isolamento.

  Nel primo giro di questo gioco tutti i dispositivi PnP sono ascolto
  su questa linea e inviano simultaneamente una sequenza di bit nella
  linea.  I bit permessi sono un 1 (tensione positiva) oppure uno 0
  aperto di nessuna tensione (circuito aperto e tri-state).  Ogni
  dispositivo PnP inizia semplicemente ad inviare sequenzialmente su
  questa linea il suo numero di serie, bit a bit, iniziando con il bit
  pi significativo.  Se un qualsiasi dispositivo, invia un 1, un 1 sar
  sentito sulla linea da tutti gli altri dispositivi.  Se tutti i
  dispositivi inviano uno 0 aperto nella linea non si sentir niente.
  L'obbiettivo  di eliminare (alla fine di questa prima tornata) tutti
  i dispositivi tranne quello con il numero di serie pi elevato.
  Eliminato significa che cessa restare in ascolto all'indirizzo di
  scrittura al quale restano in ascolto tutti i dispositivi ancora in
  gioco.  Ci  detto anche dropping out. (Si noti che tutti i numeri
  di serie sono della stessa lunghezza.)

  Per prima cosa si consideri solo il bit pi significativo del numero
  di serie che viene posto per primo sulla linea da tutti i dispositivi
  che non hanno ancora un handle.  Se un qualsiasi dispositivo PnP invia
  uno 0 (0 aperto) ma sente un 1, questo significa che qualche altro
  dispositivo PnP ha un numero di serie pi alto, e quindi
  temporaneamente si toglie dal gioco e non ascolta pi finch il giro
  non  terminato (ovvero quando viene assegnato un handle al vincitore:
  il dispositivo con il numero di serie pi alto).  Ora i dispositivi
  ancora in gioco hanno tutti il medesimo bit pi significativo (un 1),
  e quindi, per la partecipazione futura a questo giro, possiamo
  trascurare questa cifra e considerare solo la parte restante del
  numero di serie.  Adesso si torni all'inizio di questo paragrafo e lo
  si ripeta finch per tutti i dispositivi non siano stati esaminati
  completamente i numeri di serie (si veda sotto per il caso di tutti
  0).

  Quindi  chiaro che il numero di serie pi alto non verr eliminato
  dal gioco.  Ma cosa succede se le cifre pi significative (anche nel
  caso dei numeri di serie ridotti) sono tutte 0?  In questo caso 
  stato inviato uno 0 aperto nella linea e tutti i partecipanti
  rimangono in gioco.  Se tutti hanno uno 0 come cifra pi significativa
  allora gli 0 sono trascurati come  stato fatto nel paragrafo
  precedente con gli 1.  Il gioco continua inviando la cifra successiva
  del numero di serie.

  Alla fine di questa tornata (dopo che ogni partecipante rimasto ha
  inviato il bit meno significato del numero di serie) rimane solo il
  dispositivo PnP con il numero di serie pi elevato.  A questo viene
  assegnato un handle ed esce permanentemente dal gioco.  Poi tutti
  quelli scartati precedentemente rientrano in gioco e inizia un nuovo
  giro con un partecipante in meno.  Alla fine, viene assegnato un
  handle a ciascun dispositivo PnP.   facile vedere che questo
  algoritmo funziona.

  Una volta assegnati, gli handle sono usati per indirizzare ogni
  dispositivo PnP, sia per potergli inviare una configurazione sia per
  leggere le informazioni di configurazione dal dispositivo stesso.  Si
  noti che questi handle sono usati solo per la configurazione PnP e non
  sono usati per le normali comunicazioni con il dispositivo.  Quando il
  computer viene avviato, tutti gli handle sono stati persi e quindi il
  BIOS PnP solitamente opera il processo di isolamento ogni qualvolta si
  riavvia il proprio PC.

  FINE DEL Plug-and-Play-HOWTO















































  Linux Printing Usage HOWTO
  di Mark Komarinski <markk@auratek.com>
  v1.2.2, 6 febbraio 1998, traduzione luglio 1999

  Traduzione di Federico Lucifredi<flucifredi@acm.org>.

  1.  Introduzione

  Questo documento descrive l'uso del sistema di buffering di stampa di
  cui  dotato il sistema operativo Linux. Questo HOWTO  un documento
  accessorio al Linux Printing Setup HOWTO, che tratta della
  configurazione del sistema di stampa di Linux. Il materiale trattato
  da questo howto dovrebbe risultare applicabile in maniera similare a
  tutte le varianti del sistema operativo BSD.


  1.1.  Linux Printing HOWTO - Storia di produzione

  Nota di Mark Komarinski <markk@auratek.com>:

  Desidero ringraziare Matt Foster per aver fatto un sacco di lavoro
  nella riscrittura di questo HOWTO. Ho deciso di preservare il suo
  stile nel provvedere a tutte le aggiunte necessarie ad aggiornare il
  documento.


  Nota di Matt Foster <mwf@engr.uark.edu>:

  Questa versione del Linux Printing HOWTO  una completa riscrittura di
  quella originaria scritta da Grant Taylor <grant@god.tufts.edu> e
  Brian McCauley <B.A.McCauley@bham.ac.uk>.  Ho cercato di coprire lo
  stesso materiale analizzato da Grant e Brian nel loro HOWTO, ma ho al
  tempo stesso radicalmente modificato lo stile della presentazione e la
  sua profondit.  La mia speranza  che questo sforzo renda l'HOWTO pi
  completo e scorrevole nella lettura.  Posso solo sperare che voi
  concordiate con me.


  1.2.  Cronologia delle versioni

  v1.2.2

    reindicizzato, altre modifiche per l'inclusione nella
     documentazione RedHat. Grazie Ed!

     v1.2.1

    aggiornamenti, alcune modifiche per la pubblicazione in Dr. Linux.

     v1.2

    stampanti windows.

    modificata la dimensione massima dei file stampabili.

     v1.11

    nuovo curatore!

    aggiunte informazioni su lpc.

    aggiunti dei suggerimenti per la soluzione di problemi.

    un inizio sulla stampa di file grafici.


  v1.1

    riviste alcune espressioni.

    introdotta la sezione sulla stampa PostScript

    ho cercato di rendere alcune espressioni con maggior chiarezza 8-)

    estesa la trattazione delle utility di stampa Linux pi basilari.

  v1.0

    versione pubblica iniziale del Printing Usage HOWTO


  1.3.  Copyright e Marchi Registrati

  Some names mentioned in this HOWTO are claimed as copyrights and/or
  trademarks of certain persons and/or companies.  These names appear in
  full or initial caps in this HOWTO.

  (c) 1995 Matt Foster (mwf@engr.uark.edu)
  (c) 1996-1997 Mark F. Komarinski (markk@auratek.com)

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.

  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at <linux-howto@sunsite.unc.edu>. You may finger this
  address for phone number and additional contact information.


  1.4.  Dove reperire il Linux Printing HOWTO

  L'autore raccomanda a chi desideri stampare l'HOWTO di procurarsi la
  versione PostScript del documento, che  stata impaginata in uno stile
  che ne rende la lettura pi semplice e piacevole.  La versione
  PostScript  reperibile in molti dei siti di distribuzione di Linux,
  come SunSITE <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/>).

  La traduzione italiana  disponibile al sito dell'Italian LDP (ILDP)
  <www.pluto.linux.it/ildp/index.html> (N.d.T.).


  1.5.  Commenti

  Domande, commenti e correzioni relative a questo HOWTO possono essere
  dirette (in lingua inglese N.d.T.) a <markk@auratek.com>.


  1.6.  Ringraziamenti

  I miei ringraziamenti vanno a coloro che hanno speso il loro tempo nel
  leggere le versioni alfa di questo HOWTO e hanno fornito molti
  commenti e suggerimenti utili.  Qualcuno di voi potrebbe notare
  l'effetto dei suoi commenti in questa versione del documento.
  Vorrei anche ringraziare Matt Foster per aver compiuto la ristesura
  iniziale.


  2.  La stampa sotto Linux

  Questa sezione del documento illustra come stampare file, esaminare la
  coda di stampa, rimuovere file dalla coda di stampa, formattare file
  prima di stamparli e configurare l'ambiente di stampa.


  2.1.  Storia della stampa sotto Linux

  Il sistema di stampa di Linux ---il sistema lp---  un porting del
  codice sorgente scritto dai Regents of the University of California
  per la distribuzione di UNIX nota come BSD (Berkeley Software
  Distribution).


  2.2.  Stampa di un file usando lpr

  La via di gran lunga pi semplice di stampare un file sotto Linux 
  quella di inviare il file che si intende stampare direttamente alla
  stampante.   Uno dei modi in cui questo pu esser fatto  tramite
  l'uso del comando cat.  Per l'utente root  possibile eseguire un
  comando come il seguente



       # cat tesi.txt > /dev/lp




  Nel caso in esame /dev/lp  un link simbolico all'effettivo
  dispositivo di stampa - indipendentemente dal suo essere una stampante
  a matrice di punti, una laser o un plotter (si veda ln(1) per
  ulteriori informazioni sui link simbolici).

  Per ragioni di sicurezza, solo l'utente root ed utenti facenti parte
  dello stesso gruppo del demone di stampa possono accedere direttamente
  al dispositivo di stampa.  Per accedere alle stampanti devono quindi
  essere usati comandi come lpr, lprm e lpq.

  Per questi motivi gli utenti devono usare il comando lpr per stampare
  un file.  Il comando lpr si occupa di tutti i compiti inizialmente
  necessari nella stampa di un file prima di cedere il controllo al
  programma lpd, il line printing daemon, che si occuper di indicare
  alla stampante come procedere alla effettiva stampa del file.

  Quando il comando lpr viene eseguito, procede a copiare il file
  specificato dall'utente in una directory speciale (directory di
  spool), ove il file rimarr sino a quando lpd non abbia completato la
  sua stampa.  Non appena lpd riceve comunicazione dell'esistenza di un
  file nella coda di stampa, provvede a creare una copia di se stesso
  (tramite una procedura detta dai programmatori "di forking"). Questa
  copia del programma provveder alla stampa del file mentre il processo
  originario si pone in attesa della prossima richiesta di stampa.
  Tramite questo sistema  possibile porre pi file nella coda di stampa
  simultaneamente.

  La sintassi del comando lpr(1)  una di quelle molto familiari agli
  utenti:



  $ lpr [ opzioni ] [ nomefile ... ]




  Se nomefile non viene specificato lpr assume che l'imput provenga dal
  file di standard input stdin (solitamente la tastiera o l'output di un
  altro programma).  Questo permette agli utenti di reindirizzare
  l'output di un altro processo direttamente al programma di stampa,
  come nell'esempio seguente:



       $ cat tesi.txt | lpr




  oppure



       $ pr -l60 tesi.txt | lpr




  Il comando lpr accetta diversi argomenti che permettono all'utente di
  controllare il suo funzionamento.  Tra quelli pi spesso usati
  ricordiamo: -Pstampante indica quale stampante usare, -h sopprime la
  stampa della burst page, -s crea un link simbolico nella directory di
  spool invece di procedere a copiarvi il file (particolarmente utile
  nel caso di file di notevoli dimensioni) e -#num specifica quante
  copie del file stampare.  A titolo di esempio:



       $ lpr -#2 -sP dj tesi.txt




  Questo comando creer un link simbolico al file tesi.txt nella
  directory di spool della stampante chiamata dj, dove sar processato
  da lpd, che ne stamper due copie.

  Per una lista esaustiva di tutte le opzioni del comando lpr si rinvia
  alla manpage lpr(1).


  2.3.  Analisi della coda di stampa tramite lpq

  Il comando lpq viene impiegato per visualizzare i contenuti della coda
  di stampa.  Lanciato senza argomenti lpq ritorna i contenuti della
  coda di stampa della stampante predefinita.

  L'output di lpq pu tornare utile in molti contesti:



       $ lpq
       lp is ready and printing
       Rank   Owner   Job  Files        Total Size
       active mwf     31   tesi.txt     682048 bytes


  2.4.  Uso di lprm  per cancellare un ordine di stampa

  Un'altra utile funzione di un qualsiasi rispettabile sistema di stampa
   quella di poter rimuovere file che siano stati precedentemente posti
  nella coda di stampa.  A questo scopo si utilizza il comando lprm:



       $ lprm -




  Questo comando cancella tutti gli ordini di stampa pendenti
  appartenenti all'utente che lo ha lanciato.  Un singolo file pu
  essere rimosso dalla coda di stampa in due fasi: inizialmente sar
  necessario scoprire il suo job number tramite lpq e a quel punto sar
  possibile invocare lprm con tale parametro.  L'esempio seguente:



       $ lprm 31




  cancellerebbe il file con job number 31 (tesi.txt) dalla coda di
  stampa della stampante predefinita.


  2.5.  Controllo del line printing daemon (lpd) tramite lpc

  Il comando lpc(8) serve a controllare le stampanti gestite da lpd.  
  possibile abilitare o disabilitare l'uso di una stampante o della sua
  code di stampa, modificare l'ordine con cui i file sono disposti al
  loro interno e ottenere un rapporto sullo stato delle stampanti e
  relative code di stampa.  Lpc risulta particolarmente utile in
  configurazioni in cui una singola macchina disponga di pi di una
  stampante.



       $ lpc




  Questo comando introduce l'utente in un ambiente interattivo nel quale
   possibile inserire comandi. Un'altra possibilit  quella di passare
  un comando a lpc tramite la linea di comando:



       $ lpc status all




  Una lista completa dei comandi disponibili pu essere ottenuta tramite
  la manpage di lpd, ma il lettore trover di seguito una lista di
  quelli di maggior rilevanza.  Ogni comando seguito dalla parola
  opzioni pu ricevere sia il nome di una specifica stampante (ad
  esempio lp o print) sia la parola chiave all, usata per indicare il
  riferirsi del comando a tutte le stampanti disponibili.


    disable opzioni -  disabilita l'inserimento di nuovi file nella
     coda di stampa

    down opzioni - disabilita la stampante, interrompendo qualunque
     ordine di stampa pendente

    enable opzioni - abilita l'inserimento di nuovi file nella coda di
     stampa

    quit (o exit) - esce da lpc

    restart opzioni - reinizializza il lpd per quella stampante

    status opzioni - visualizza lo stato della stampante

    up opzioni - abilita tutto e lancia una nuova istanza di lpd


  2.6.  Il printtool di RedHat

  Una breve nota sul sorprendente programma printtool della RedHat: esso
  sembra possedere tutte le capacit di un magic filter. La
  distribuzione della RedHat provvede automaticamente ad installare
  molti dei programmi che eseguono il filtraggio. Seguono i passi
  seguiti dal sottoscritto per configurare la propria stampante (una HP
  LJ 4L connessa alla porta parallela) sotto RH 4.0 (tale procedura
  dovrebbe risultare effettiva anche sotto altre versioni della
  distribuzione RH).


    Lanciare printtool avendo cura di essere root (se avete usato il
     comando su, avete ricordato di impostare SETENV DISPLAY :0.0 e
     lanciare xhost +, vero ?).

    Fare click su "Add" e confermate con "OK" per una stampante locale.

    Inserire il nome del dispositivo di stampa (/dev/lp1 per l'autore).

    Inserire il filtro di input - selezionate un tipo di stampante, la
     sua risoluzione e la dimensione dei fogli (tra i possibili ljet4,
     300x300 e letter).

    Confermare con "OK" fino a giungere alla finestra principale e
     quindi reinizializzare lpd.

  Esattamente come se gestiste il file /etc/printcap file manualmente, 
  possibile mantenere pi definizioni per ciascuna stampante con
  differenti dimensioni della carta, risoluzioni o altro.


  3.  La stampa di file

  Questa sezione copre la stampa dei tipi di file pi comunemente
  incontrati in un tipico ambiente Linux.


  3.1.  Stampa di file grafici

  La stampa di file grafici solitamente dipende dal tipo di file che si
  intende stampare e dal tipo di stampante impiegata. Le stampanti a
  matrice di punti sono solitamente semplicemente fuori questione a
  causa delle differenze nella maniera in cui le matrici di punti
  gestiscono la grafica. In queste condizioni l'approccio pi fertile 
  solitamente verificare la compatibilit della stampante con una Epson
  o una IBM ProPrinter e quindi (dopo aver convertito il file in
  PostScript) impiegare Ghostscript (si veda la prossima sezione del
  documento) per stampare il file.

  Qualora si disponga di una stampante laser, le cose sono rese pi
  semplici dalla compatibilit PCL. Questo ci rende disponibili alcune
  opzioni: alcuni programmi possono avere la capacit di produrre
  direttamente output PCL. Se questo non  il caso in questione,
  programmi come NetPBM possono effettuare la conversione in PCL.  Un
  ultima possibilit  quella di usare ghostscript.

  In generale la miglior soluzione  quella di installare un pacchetto
  come NetPBM o Ghostscript unitamente ad un magic filter per gestire i
  file grafici "automagicamente".


  3.2.  Stampa di file PostScript

  Stampare file PostScript con una stampante dotata di un interprete
  PostScript  estremamente semplice: basta usare lpr e la stampante si
  occuper di tutti i dettagli per voi.  Quelli di voi che non
  possiedono stampanti PostScript si troveranno a dover ricorrere ad
  altri sistemi.  Fortunatamente, vi sono programmi in grado di tradurre
  il PostScript in un linguaggio che la maggioranza delle stampanti sono
  in grado di comprendere.  Il pi noto fra questi programmi 
  probabilmente Ghostscript.

   responsabilit di Ghostscript convertire i descrittori di un file
  PostScript in comandi che la vostra stampante sia in grado di
  comprendere. Un esempio di stampa tramite Ghostscript potrebbe essere
  il seguente:



       $ gs -dSAFER -dNOPAUSE -sDEVICE=deskjet -sOutputFile=\|lpr tesi.ps




  Osservate che nell'esempio precedente stiamo passando l'output di
  Ghostscript al comando lpr tramite una pipe nell'opzione -sOutputFile.

  Ghostview  una interfaccia per Ghostscript sotto X-window. Esso
  permette di vedere un anteprima di un file PostScript prima di
  procedere alla sua stampa.  Sia Ghostview che Ghostscript possono
  essere scaricati dal sito  <ftp://prep.ai.mit.edu/pub/gnu/>.


  3.3.  Stampa di file PDF

  Adobe ha rilasciato una versione di Acrobat reader per Linux
  disponibile presso la home page di Adobe  <http://www.adobe.com>.  Il
  suo predecessore, xpdf,  ancora disponibile.  Entrambi i programmi
  sono in grado di stampare su dispositivi PostScript.


  3.4.  Stampa di file TeX

  Una delle maniere pi semplici di stampare un file Tex  quella di
  convertire tale file in PostScript e quindi stamparlo tramite
  Ghostscript.  Per far ci  prima necessario convertire il file da TeX
  ad un formato noto come DVI (che sta per device-independent) tramite
  il comando tex(1).  a questo punto possibile convertire il file DVI
  in PostScript usando il programma dvips. Un esempio di quanto si 
  appena illustrato  il seguente:



  $ tex tesi.tex
  $ dvips tesi.dvi




  A questo punto potete stampare il file PostScript risultante come si 
  descritto in precedenza.


  3.5.  Stampa di file formattati tramite troff




       $ groff -Tascii tesi.tr | lpr




  oppure, se cos preferite,



       $ groff thesis.tr > thesis.ps




  e provvedete quindi a stampare il file PostScript come si  gi
  discusso in precedenza.


  3.6.  Stampa delle manpage




       $ man man | col -b | lpr




  Le pagine man sono preformattate tramite troff ed  quindi necessario
  eliminare qualsiasi forma di sottolineatura, evidenziamento e
  similari.  Il programma "col" esegue questo compito perfettamente, e
  dato che nell'esempio sopracitato stiamo passando l'output ad una
  pipe, man non invocher more ad ogni schermata.


  4.  Varie ed eventuali

  Questa sezione del documento copre aspetti della stampa sotto Linux
  che non rientrano esattamente in nessuna delle altre sezioni.


  4.1.  Formattare un documento prima della stampa

  Dato che molti file ASCII non sono formattati per la stampa, potrebbe
  risultare utile il poterli formattare in qualche maniera prima di
  procedere alla loro stampa.  Questo pu includere l'apporre il suo
  numero su ciascuna pagina, modificare i margini, raddoppiare la
  spaziatura o lo stampare il file in colonne multiple.  Un modo comune
  di fare tutto questo  tramite un preprocessore come pr.


       $ pr +4 -d -h"Tesi di dottorato, seconda bozza" -l60 tesi.txt | lpr




  Nell'esempio precedente pr legger il file tesi.txt, salter le prime
  tre pagine (+4), imposter la lunghezza di pagina a sessanta linee
  (-l60), raddoppier la spaziatura dell'output (-d) ed aggiunger la
  frase "Tesi di dottorato, seconda bozza" in cima ad ogni pagina (-h).
  Lpr provveder quindi ad accodare l'output di pr sulla stampante
  predefinita.  Fate riferimento alla manpage di pr per maggiori
  informazioni sul suo uso.


  4.2.  La variabile d'ambiente PRINTER

  Tutti i comandi del sistema di stampa di Linux accettano l'opzione -P,
  che permette all'utente di specificare su quale stampante l'output del
  comando vada indirizzato.  Qualora l'utente non specifichi quale
  stampante si intende utilizzare il sistema impiegher la stampante
  predefinita come dispositivo di output.

  Al fine di evitare di dover specificare quale stampante si intende
  utilizzare ogniqualvolta si stampi un file,  possibile impostare la
  variabile d'ambiente PRINTER con il nome della stampante che si
  desidera utilizzare.  Questo compito va eseguito in modi diversi a
  seconda della shell utilizzata. Sotto bash ci si pu trarre d'impiccio
  nel modo seguente:



       $ PRINTER="nome_stampante"; export PRINTER




  mentre sotto csh si avr:



       % setenv PRINTER "nome_stampante"




  Questi comandi possono essere inseriti nel vostro script di login
  (.profile sotto bash o .cshrc sotto csh) o essere eseguiti dalla linea
  di comando.  Si vedano bash(1) e csh(1) per ulteriori informazioni in
  merito alle variabili d'ambiente.


  5.  FAQs (Frequently Asked Questions)


  Q1.  Come si previene l'effetto scala ?

  A1.  L'effetto scala (staircase effect)  dovuto alla maniera in cui
  alcune stampanti si aspettano le linee vengano terminate.  Certe
  stampanti richiedono sequenze di fine linea composte dalla coppia
  carriage-return/line-feed (fine linea in stile DOS) invece della
  sequenza usata dai sistemi UNIX (line-feed).  Il sistema pi semplice
  di risolvere questo problema  il verificare se sia possibile
  modificare la modalit operativa della vostra stampante. Solitamente
  questo  possibile cambiando la posizione di un DIP switch o tramite
  l'invio di una appropriata sequenza di escape all'inizio di ogni
  ordine di stampa.  Nel secondo caso sar necessario creare un filtro
  (si veda Q2)

  Una rapida soluzione  quella di usare un filtro sulla linea di
  comando. Un esempio di questo potrebbe essere:



       $ cat tesi.txt | todos | lpr





  Q2.  Che cosa  un filtro ?

  A2.  Un filtro  un programma che legge da standard input (stdin),
  compie una qualche operazione su questo input e scrive i risultati su
  standard output (stdout).  I filtri sono usati per svolgere molti
  compiti e tra questi vi  l'elaborazione di testo.


  Q3.  Che cosa  un  magic  filter ?

  A3.  Un magic filter  un filtro che determina quale tipo di
  operazione svolgere sul suo input in base al tipo di file ricevuto. A
  titolo di esempio, un magic filter potrebbe adottare una procedura di
  stampa differente a seconda che il file passatogli sia composto di
  testo puro (procedura di stampa "normale") o si tratti di un file
  PostScript (stampa tramite Ghostscript).  Due esempi sono magicfilter
  e APSfilter. Bisogna osservare come sia necessario installare
  appropriati programmi prima di procedere all'installazione del filtro.

  La ragione di questo va ricercata nel fatto che quando un magicfilter
  viene installato esso esamina il sistema alla ricerca di certi
  programmi (come Ghostscript - se esso  presente nel sistema il filtro
  sa di poter gestire il PostScript) e definisce le azioni che verranno
  compiute sul suo input in base a quanto trovato. Per poter gestire
  tutti i dei formati di stampa il vostro sistema dovrebbe avere almeno
  i seguenti programmi installati

    GhostScript

    TeX

    NetPBM

    jpeg utilities

    gzip


  Q4.  Linux  in grado di gestire il Windows Printing System ?

  A4.  Forse. Quelle stampanti che accettano solo comandi WPS non
  funzioneranno sotto Linux.  Quelle stampanti che accettano sia comandi
  WPS che altri comandi (come la BJC 610) funzioneranno se impostate in
  maniera da accettare comandi in un formato diverso dal WPS. Altre
  stampanti, come la HP DeskJet 820Cxi/Cse, non funzioneranno sotto
  Linux.  Detto questo, si ricordi che Linux  in grado di funzionare
  come printserver per macchine Windows 95 (tramite Samba), dato che
  windows  dotato di driver per tali stampanti.


  Q5.  Che sistema da quattro soldi  questo ? Non posso stampare pi di
  sei pagine senza incappare nell'errore "file too large".

  A5.  Una delle opzioni nel file /etc/printcap  collegata alla
  dimensione massima di un file stampabile.  Il valore predefinito  di
  1000 blocchi di allocazione (circa 500k).  Nel caso di file PostScript
  e similari questo pu limitare la dimensione massima dei file
  stampabili a 6-8 pagine inclusive di grafica.  Siate certi di aver
  inserito la linea seguente nel file di definizione della stampante:



       mx=0




  La ragione principale di tutto questo  impedire che la partizione di
  spool sia riempita completamente.  Un altra maniera per ottenere lo
  stesso risultato  quella di far s che lpr crei un link simbolico
  dalla directory di spool al file che si intende stampare invece di
  copiarvelo. Ma per far questo dovete ricordare di utilizzare l'opzione
  -s ogni volta che usate lpr .


  6.  Risoluzione dei problemi

  Questa sezione tratta alcune cose comuni che possono andar storte
  nell'uso del proprio sistema di stampa.

  Se la vostra stampante non funziona:

    Funzionano  altri  ordini di stampa ? (problema relativo
     all'applicazione ?)

    lpd  in esecuzione ? (controllate tramite  lpc ) (daemon di stampa
     ?)

    Pu l'utente root inviare un file direttamente alla stampante?
     (Servizi di stampa ?)

    Potete stampare da DOS ? (problema hardware ?)

     Rispondere a tali domande potr aiutarvi a trovare una soluzione.

  Inviate contributi e suggerimenti per questa sezione a
  <markk@auratek.com> (in inglese! - N.d.T.).


  7.  Materiale di riferimento

  Questa sezione del documento contiene informazioni relative a
  materiale di riferimento sul sistema di stampa di Linux.  Ho cercato
  di mantenere questa sezione dell'HOWTO quanto pi focalizzata
  sull'argomento quanto fosse possibile.  Se ritenete che qualche
  materiale significativo sull'argomento sia stato escluso non esitate a
  contattarmi.


  Prima di chiedere aiuto in un gruppo USENET considerate le seguenti
  domande:

    La stampante sta accettando ordini di stampa ?  (Usate lpc(8) per
     verificare)

    L'oggetto della vostra domanda  coperto in questo documento o nel
     printing HOWTO di Grant Taylor ?


  Se avete risposto affermativamente ad una delle domande allora
  potreste voler riconsiderare l'idea di postare la vostra domanda, ma,
  se decidete comunque di farlo, cercate di includere quante pi
  informazioni in merito al vostro problema quanto vi sia possibile.
  Cercate di non scrivere cose come "Ho un problema con  lpr , per
  favore aiutatemi". Richieste di questo tipo saranno ignorate dalla
  maggior parte dei lettori.  Cercate anche di includere la versione del
  kernel del vostro sistema e gli specifici messaggi d'errore che il
  sistema vi ha ritornato.


     Pagine man

       cat(1)  concatenare e stampare file

       dvips(1) convertire un file DVI (TeX) in PostScript

       ghostview(1)  visualizzare documenti Postscript tramite
        Ghostscript

       groff(1)  interfaccia di groff (sistema di formattazione
        documenti)

       gs(1)  interprete/visualizzatore Ghostscript

       lpc(8)  line printer control

       lpd(8)  line printer spooler daemon

       lpq(1)  programma per esaminare la coda di stampa

       lpr(1)  programma di stampa

       lprm(1)  rimuove file dalla coda di stampa

       pr(1)  converte file di testo per la stampa

       tex(1)  programma di formattazione ed impaginazione


     newsgroup USENET

       comp.os.linux.*   troppe  informazioni su Linux

       comp.unix.*  area di discussione relativa ad UNIX





















  Linux Quake HOWTO
  Bob Zimbinski (bobz@mr.net), Brett A. Thomas
  (quark@baz.com), e Mike Hallock (mikeh@medina.net)
  v1.0.1.15, 30 August 1998

  Questo documento illustra come installare ed usare Quake, QuakeWorld e
  QuakeII e come risolvere i problemi correlati, su un sistema Intel
  Linux.

  1.  Introduzione

  Quake, QuakeWorld e Quake II sono giochi di azione in 3D tremendamente
  famosi, sviluppati dalla id Software.

  Se non li conoscete, ci sono posti migliori di questo HOWTO dove
  impararne le basi. Guardate la sezione ``Altre fonti di informazione''
  per averne una lista.

  Questo documento assume che abbiate Linux funzionante, e in alcuni
  casi anche il sistema X Window. X non  indispensabile, ma  un buon
  modo per provare un'installazione base. Se non avete X, potete
  tranquillamente saltare tutti i riferimenti ad esso.

  Le sezioni di questo documento che sono state aggiornate nell'ultima
  versione hanno un ** prima del titolo. Le sezioni aggiornate nella
  versione precedente hanno un ++.


  1.1.  Feedback, commenti, correzioni

  Questo documento di certo non contiene tutto quello che si deve sapere
  sul Linux Quake. Con il vostro aiuto, per, possiamo portarlo sempre
  pi vicino a quell'ideale. Vorremmo che questo HOWTO fosse il pi
  completo ed accurato possibile, quindi se trovate errori od omissioni,
  fatecele sapere.  Le domande, i commenti e le correzioni dovrebbero
  essere inviati a Bob Zimbinski (bobz@mr.net) o a Mike Hallock
  (mikeh@medina.net).  Le critiche costruttive sono ben accette, i flame
  no.



  1.2.  Ringraziamenti **

  La versione originale di questo documento  stata scritta da Brett
  A.Thomas (quark@baz.com) e da Mike Hallock (mikeh@medina.net).  Bob
  Zimbinski (bobz@mr.net) ha riscritto ed espanso il documento
  originale.

  Dei ringraziamenti speciali vanno alle seguenti persone, per averci
  portato Quake per Linux:


    John Carmack e il resto della id Software per questi giochi
     eccezionali.


    Dave 'Zoid' Kirsch (zoid@idsoftware.com) per il porting per Linux.


    Dave Taylor (ddt@crack.com) per aver cominciato questo strano
     affare del porting di Linux.


    Daryll Strauss (daryll@harlot.rb.ca.us) per il porting di glide per
     Linux.

    Brian Paul (brianp@elastic.avid.com) per la libreria grafica Mesa.


    David Bucciarelli (tech.hmw@plus.it) per il driver Mesa/glide.


  Grazie alle seguenti persone per il loro contributo a questo HOWTO:


    Mike Brunson (brunson@l3.net) per il suggerimento sul vid_restart.


    Joey Hess (joey@kite.ml.org) per le informazioni su come fare
     girare i giochi svga e gl da X.


    Joe S. (jszabo@eden.rutgers.edu) per un enorme pila di suggerimenti


    Brad Lambert (bradl@dial.pipex.com) per la nota su -noudp.


    agx (gguenthe@iris.rz.uni-konstanz.de) per le informazioni
     sull'installazione di Quake e per averci fatto notare QIPX.


    Derrik Pates (dmp8309@silver.sdsmt.edu) per avermi fatto pensare
     alla sicurezza.


    Michael Dwyer (michael_dwyer@mwiworks.com) per le idee sulle
     "considerazioni sui SO".


    Derek Simkowiak (dereks@kd-dev.com) per la procedura di
     installazione da CD di Quake I


    sunstorm (sunstorm@glasscity.net) informazioni sul Quake Mission
     Pack 2.


    Neil Marshall (marshall@pssnet.com) per informazioni sugli schermi.



  1.3.  Altre fonti di informazioni



  1.3.1.  Informazioni specifiche su Quake per Linux **



    LQ:Linux Quake & Utilites http://www.linuxquake.com/.


    Linux Quake Page http://captured.com/threewave/linux/


    QuakeWorld.net http://www.quakeworld.net





  1.3.2.  Informazioni su Quake in generale



    id Software http://www.idsoftware.com


    PlanetQuake http://www.planetquake.com


    QuakeWorld Central http://qwcentral.stomped.com


    3Dfx's GL Quake FAQ (piuttosto obsolete)
     http://www.3dfx.com/game_dev/quake_faq.html


    Farenheit 176 Console Command Listing
     http://www.planetquake.com/f176


    rec.games.computer.quake.* newsgroups



  1.3.3.  Informazioni sui giochi per Linux



    LinuxGames http://www.linuxgames.com/


    The Linux Game Tome
     http://www.cs.washington.edu/homes/tlau/tome/linux-game.html



  2.  Quake/Quakeworld

  Per installare Quake sul vostro sistema Linux dovete avere una qualche
  forma della distribuzione ufficiale di Quake della id, o il CD-ROM per
  dos/Windows comprato in un negozio, o la versione shareware scaricata
  dalla rete (vedere ``sotto'' per i dettagli su come procurarvi la
  versione shareware). In alternativa, se avete Quake installato su una
  macchina DOS/Windows, potete usare i file rilevanti da quella
  installazione.


  2.1.  Requisiti minimi

  Come minimo avrete bisogno di:



    Un Pentium 90 o superiore (raccomandato un 133)


    16 MB di RAM (raccomandati 24)


    Il CD-ROM di Quake o la versione shareware (quake106.zip)


    Linux con il kernel 2.0.24 o successiva


    libc 5.2.18 o successiva


    Uno dei seguenti:


    X11R5 o successivo (per xquake)

    SVGAlib 1.2.0 o successiva (per squake e glquake)



    30-80 megabyte di spazio libero su disco (a seconda del tipo di
     installazione)


    Accesso come root nella macchina su cui installate




  Opzionali:


    Una scheda audio supportata


    Una scheda grafica accelerata 3Dfx VooDoo Graphics o VooDoo2 3D


    Mesa 2.6 o successiva (per glquake)



  2.2.  Installare Quake



  2.2.1.  Scaricare i file necessari**

  Tutti i file necessari per Linux Quake sono disponibili sul sito ftp
  della id Software, ftp.idsoftware.com. Questo sito pu essere carico
  alle volte, quindi  meglio usare uno di questi mirror:


    ftp.cdrom.com/pub/idgames/idstuff (California, USA)


    ftp.gamesnet.net/idsoftware (California, USA)


    ftp.linuxquake.com/lqstuff (Michigan, USA)


    ftp.stomped.com/pub/mirror/idstuff (Minnesota, USA)


    mirrors.telepac.pt/pub/idgames (Lisbona, Portogallo)


    download.netvision.net.il/pub/mirrors/idsoftware (Haifa, Israele)


  I file di Quake nominati in questa sezione sono:


    Distribuzione Shareware di Quake per Windows
     ftp://ftp.idsoftware.com/idstuff/quake/quake106.zip


    Binario di Quake per X11
     ftp://ftp.idsoftware.com/idstuff/unsup/unix/quake.x11-1.0-i386-unknown-
     linux2.0.tar.gz


    Binario di Quake per SVGAlib
     ftp://ftp.idsoftware.com/idstuff/unsup/squake-1.1-i386-unknown-
     linux2.0.tar.gz


    Binario di Quake per OpenGL/Mesa
     ftp://ftp.idsoftware.com/idstuff/unsup/unix/glquake-0.97-i386-unknown-
     linux2.0.tar.gz


    Client di QuakeWorld per Linux (in ciascun pacchetto ci sono i
     client per X11, SVGAlib e GL)


    pacchetto tar.gz per libc5
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-i386-unknown-
     linux2.0.tar.gz


    pacchetto tar.gz per glibc
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-glibc-
     i386-unknown-linux2.0.tar.gz


    pacchetto rpm per libc5
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-1.i386.rpm


    pacchetto rpm per glibc
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwcl-2.30-glibc-1.i386.rpm





    Server di QuakeWorld per Linux


    pacchetto tar.gz per libc5
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-i386-unknown-
     linux2.0.tar.gz


    pacchetto tar.gz per glibc
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-glibc-
     i386-unknown-linux2.0.tar.gz


    pacchetto rpm per libc5
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-1.i386.rpm


    pacchetto rpm per glibc
     ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/qwsv-2.30-glibc-1.i386.rpm



    Pacchetto client di Capture the Flag
     ftp://ftp.cdrom.com/pub/quake/planetquake/threewave/ctf/client/3wctfc.zip


  Altro software nominato:


    utilit di archiviazione lha
     ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.


    librerie grafiche SVGAlib
     http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.tar.gz


    binari delle SVGAlib per libc5
     http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar.gz


    librerie di runtime Glide http://glide.xxedgexx.com/3DfxRPMS.html




  2.2.2.  Creazione della directory di installazione ++

  La prima cosa che dovete fare  decidere dove installare Quake. Molte
  persone lo mettono in /usr/games/quake.  Gli amministratori di sistema
  anali come me scelgono di installare tutto quello che non fa parte
  della distribuzione standard sotto /usr/local, quindi per me Quake va
  in /usr/local/games/quake.  Se scegliete di installarlo da qualche
  altra parte, sostituite il percorso appropriato dove io indico
  /usr/local/games/quake.

  Nota per gli utenti RedHat. Se volete installare QuakeWorld dai
  pacchetti rpm, dovreste probabilmente installare Quake in
  /usr/local/games/quake, dato che gli rpm si installano in questa
  directory per default.

  Quindi andate avanti e create la directory in cui volete installare
  Quake, ed entrateci con cd. Il resto di queste istruzioni assumeranno
  che questa sia la vostra directory corrente.




            mkdir /usr/local/games/quake
            cd /usr/local/games/quake






  2.2.3.  Installazione dal CD di Quake ++

  Se si sta per installare dal CD-ROM di Quake, allora si legga questa
  sezoine, altrimenti si  liberissimi si saltarla.

  Ci sono almeno due versioni del CD di Quake in circolazione. Io ne ho
  una abbastanza vecchia che ha la versione 1.01 di Quake, e ne ho visti
  altri che contengono la versione 1.06. Avete la 1.01 se dentro ci sono
  file che si chiamano  quake101.1 e quake101.2. Se al loro posto vedete
  un file che si chiama  resource.1, avete un CD pi nuovo.


  Montate ora il vostro CD di Quake, e determinate quale versione avete.
  Nell'esempio riportato qui sotto, sostituite /dev/cdrom e /mnt/cdrom
  con il file di device ed il punto di mount propri del vostro sistema:




            mount -t iso9660 /dev/cdrom /mnt/cdrom
            ls /mnt/cdrom







    Se sul CD avete un file resource.1, andate avanti al punto
     successivo. Per i CD versione 1.01 dovrete scaricare il pacchetto
     Quake shareware per aggiornare i file .pak dopo l'installazione.
     L'operazione viene spiegata nell'ultimo punto di questa sezione.


    Concatenate i due file resource dal CD in un singolo file sull'hard
     disk:



            cat /mnt/cdrom/quake101.1 /mnt/cdrom/quake101.2 > resource.1







    Continuate ora al prossimo paragrafo, ma quando mi riferisco a
     /mnt/cdrom/resource.1, al suo posto usate
     /usr/local/games/quake/resource.1.







     ora il momento di estrarre i file di Quake. Il file resource.1
     sul CD  in realt un archivio lha (un formato di compressione di
     archivi come zip o tar). Per estrarlo useremo il comando lha. Se
     non lo avete installato sul vostro sistema, lo potete scaricare da
     ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.




            lha e /mnt/cdrom/resource.1






  Quando avete fatto con lha, la directory di Quake dovr contenere
  molti nuovi file. Dovr essere creata anche una directory id1/. I file
  in questa directory sono i soli importanti per Quake per Linux, quindi
  potete tranquillamente cancellare tutto il resto. Se  la prima volta
  che usate Quake, o anche in caso contrario, potreste voler tenere i
  file *.txt.  Sul mio sistema, butto tutti i readme che si accumulano
  dentro una directory doc/; quindi:




            cd /usr/local/games/quake
            mkdir doc
            mv *.txt doc
            rm -f *








    Se avete fatto l'installazione da un CD versione 1.01, ora dovete
     sovrascrivere il file  id1/pak0.pak con quello della versione
     shareware. Installate la versione shareware come descritto in
     ``Installazione della versione shareware'', ma fatelo in una
     directory temporanea, in modo da non dover sovrascrivere i veri
     file di Quake. Quando avete installato i file shareware, copiate il
     file  id1/pak0.pak dalla directory temporanea in
     /usr/local/games/quake/id1, dopodich potete cancellare la
     directory con i file shareware.



  E questo  quanto per installare dal CD. Potete saltare direttamente
  alla sezione "``Installazione dei file binari di Quake per Linux''".


  2.2.4.  Installazione da DOS/Windows a Linux

  Se avete Quake installato sotto Windows o DOS su un'altra macchina,
  potete trasferire i file da quake\id1\ al sistema Linux usando FTP o
  in qualche altro modo. Tenete presente che i nomi dei file nel vostro
  sistema Linux devono essere in minuscolo per poter essere usati,
  quindi dovrete probabilmente rinominare i file dopo il trasferimento.
  Notate anche che potrebbe essere necessario cancellare l'installazione
  in DOS/Windows per restare in regola con i termini della licenza della
  id. Non  colpa mia se fate qualcosa di illegale.

  Se DOS/Windows e Linux sono sulla stessa macchina avete due
  possibilit: copiare i file dalla partizione DOS/Windows alla
  partizione Linux, o fare un link. Le due cose sono equivalenti; potete
  semplicemente risparmiare circa 50 megabyte di spazio disco se fate un
  link invece di una copia.

  Qualsiasi cosa abbiate scelto, per prima cosa passate nella directory
  di Quake e createne una nuova di nome id1:




            cd /usr/local/games/quake
            mkdir id1







    Se volete copiare i file dalla partizione DOS/Windows, fate
     qualcosa del genere:




            cp /win95/games/quake/id1/*.pak id1








    Per creare i link, fate:




            cd id1
            ln -s /win95/games/quake/id1/*.pak .







  Sostituite /win95/games/quake con il percorso corretto per la
  partizione DOS/Windows e per la directory di installazione di Quake.

  I file dei dati di Quake sono ora installati. Andate avanti fino a
  "``Installazione dei binari di Quake per Linux''".


  2.2.5.  Installazione della versione shareware

  La versione shareware di Quake con un solo episodio si pu scaricare
  gratuitamente dal sito ftp della id. Ha tutte le caratteristiche della
  versione completa, con un paio di limitazioni: non ci si pu giocare a
  Quakeworld, e non si possono usare livelli personalizzati o
  modificati.

  Installare la versione shareware di Quake non  molto diverso da
  installare da CD.

  Vedere la sezione  ``Scaricare i file necessari'' per sapere da dove
  prendere la distribuzione shareware. Scaricatela ed estraetela nella
  directory di Quake:




            cd /usr/local/games/quake
            unzip -L /dove/la/vuoi/mettere/quake106.zip





  Ora, tra l'altro, avete un file che si chiama resource.1 che in realt
   un archivio lha (lha  un formato di compressione ed archiviazione
  di file come zip o tar). Per estrarlo si usa il comando  lha(1).  Se
  non ce l'avete installato, lo potete prendere da
  ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.
            lha e resource.1





  Quando avete fatto con lha, la directory di Quake dovr contenere
  molti nuovi file. Dovr essere creata anche una directory id1/. I file
  in questa directory sono i soli importanti per Quake per Linux, quindi
  potete tranquillamente cancellare tutto il resto. Se  la prima volta
  che usate Quake, o anche in caso contrario, potreste voler tenere i
  file *.txt.  Sul mio sistema, butto tutti i readme che si accumulano
  dentro una directory doc/; quindi:




            cd /usr/local/games/quake
            mkdir doc
            mv *.txt doc
            rm -f *





  Ora siete pronti ad installare i binari per Linux.


  2.3.  Aggiungere i binari per Linux

  Decidete quale dei tre tipi di Quake volete installare:


    X11 Quake vi fa usare Quake in una finestra del desktop di X.  il
     modo meno eccitante di usarlo, ma  un buon modo per provare
     l'installazione.

    Squake  il client di Quake per SVGAlib. Gira a schermo pieno sulla
     console di testo.


    GLQUake  il client di Quake per OpenGL, l'Unico Modo per giocare a
     Quake se avete una scheda accelerata 3Dfx.


  Scaricate i pacchetti che vi servono  (vedere la sezione ``Scaricare i
  file necessari'') ed estraeteli nella directory di Quake, cos:




            cd /usr/local/games/quake
            tar -xzf XXXX-i386-unknown-linux2.0.tar.gz






  2.4.  Impostare i permessi

  I server di Quake e QuakeWorld possono essere usati da qualsiasi
  utente.  I client di Quake, invece, hanno bisogno di accesso alle
  schede sonore e grafiche, cosa che richiede privilegi che i normali
  utenti non hanno.  Un (brutto) modo di superare questo problema  di
  usare Quake da root.  Ai bravi amministratori di sistema si
  accapponer la pelle pensando ad una cosa del genere. Una soluzione
  pi accettabile  rendere i binari di Quake setuid root; in questo
  modo Quake pu essere usato da qualsiasi utente, mantenendo i
  privilegi di accesso alla scheda sonora e grafica. Anche il setuid
  presenta dei rischi di sicurezza. Un utente furbo potrebbe sfruttare
  un buco di sicurezza in Quake per ottenere accesso di root al vostro
  sistema. Ovviamente, se non usate un sistema multiutente, questo pu
  non importarvi.

  squake  l'unico client di Quake che deve essere usato con i permessi
  di root. Con un po' di fatica, potete fare in modo di poter usare i
  client X e GL senza setuid.  ``Usare i client X e GL senza permessi di
  root'' nella sezione Tips and Tricks vi spiega come fare.


  Se volete usare squake, rendetelo setuid root con i seguenti comandi:



            chown root squake
            chmod 4755 squake





  Se avete deciso che  ok usare quake.x11 e glquake setuid root sul
  vostro sistema, potete ripetere i comandi qui sopra anche per quei
  binari.



  2.5.  X11 Quake

  Se avete installato il client X11, questo  un buon momento per
  provarlo.  Per  glquake e squake c' bisogno di configurare altre
  cose, ma quake.x11 dovrebbe essere pronto.




            cd /usr/local/games/quake
            ./quake.x11





  Se tutto va bene dovrebbe apparire una piccola finestra di Quake con
  la prima demo. Dovreste poter sentire anche degli effetti sonori e, se
  il CD  montato, anche della musica. Se qualcosa di queste non accade,
  controllate la sezione ``Risoluzione dei problemi''.


  2.6.  SVGAlib Quake

  Sia squake che glquake hanno bisogno della SVGAlib (glquake usa la
  SVGAlib per gestire l'input da tastiera e da mouse, se ve lo state
  chiedendo).  La SVGAlib  compresa nella maggior parte delle
  distribuzioni di Linux moderne, e deve essere configurata
  correttamente per poter utilizzare squake o glquake.

  libvga.config  il file di configurazione della SVGAlib. Sulla maggior
  parte dei sistemi lo troverete nelle directory  /etc o /etc/vga.
  Assicuratevi che il mouse, il monitor e la scheda video vi siano
  impostati in maniera corretta per il vostro sistema. Per avere altri
  dettagli consultate la documentazione della SVGAlib.

  Se non l'avete gi, scaricatela dal sito indicato nella ``sezione dei
  file'' pi sopra.  Se avete la RedHat 5.x o un'altra distribuzione di
  Linux basata su glib, guardate le ``considerazioni su Glibc, RedHat
  5.x, Debian 2'' nella sezione Risoluzione dei problemi/FAQ per avere
  delle informazioni importanti su come compilare le librerie per
  poterle usare con Quake.  A
  http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar.gz
   disponibile un binario delle SVGAlib precompilato con le libc5 per
  chi non ha voglia di ricompilare il tutto.

  Dovreste usare squake da una console virtuale. Non funzioner da X, a
  meno che non siate root quando lo avviate, e utilizzare un gioco come
  root  una cosa da evitare. Quindi, se siete in X, fate CTRL+ALT+F1,
  fate il login e poi




            cd /usr/local/games/quake
            ./squake





  ``Utilizzare i giochi SVGA e GL da X'' nella sezione dei Tips & Tricks
  pi avanti spiega come lanciare Quake per SVGA e GL da X senza passare
  manualmente ad una console virtuale.


  2.7.  GLQuake

  Il Quake per le OpenGL accelerate via hardware  Quake come Dio
  comanda. Non c' possibile sostituto, e una volta provato non si torna
  indietro.

  Per usare glquake, vi serve una scheda 3D con i chipset grafici
  Voodoo, Voodoo2 o Voodoo Rush. Ci sono delle procedure particolari da
  seguire se avete una scheda Vodoo Rush, ma non ve le posso illustrare
  perch, francamente, non saprei quello che direi. Una versione futura
  di questo HOWTO coprir anche i problemi del Rush (se qualcuno ne
  vuole scrivere, sar contento di inserire il pezzo qui).

  Le librerie SVGAlib, Glide e Mesa devono essere tutte installate e
  configurate correttamente sul sistema, per poter usare glquake. Le
  seguenti sezioni copriranno brevemente i passi da seguire per farlo.

  Il (bk@gamers.org) Linux 3Dfx HOWTO
  (http://www.gamers.org/dEngine/xf3D/howto/3Dfx-HOWTO.html) di Bernd
  Kreimeier  un buon posto dove cercare altre informazioni.

  Il newsgroup 3dfx.glide.linux sul news server della 3dfx
  (news.3dfx.com)  un'altra buona fonte di informazioni
  sull'intersezione di Linux, glide, Mesa e Quake.


  2.7.1.  SVGAlib

  glquake usa le SVGAlib per ricevere input dal mouse e dalla tastiera,
  quindi dovrete configurarle come illustrato nella sezione ``SVGAlib
  Quake''.


  2.7.2.  Glide

  Glide  una libreria che fornisce un'API per programmare le schede
  3Dfx.  Se volete che le librerie grafiche Mesa usino la vostra scheda
  3Dfx, le dovete avere.

  Potete trovare l'ultima versione delle glide su
  http://glide.xxedgexx.com/3DfxRPMS.html. Scegliete il (i) pacchetti
  appropriati per il vostro sistema, ed installateli seguendo le
  istruzioni che trovate sulla pagina web.

  Notate che a meno che non scarichiate il pacchetto dei device driver
  per 3Dfx oltre alla libreria Glide, potrete utilizzare solo le
  applicazioni Glide (come GLQuake) come root. Installate il modulo
  /dev/3dfx e potrete usare GLQuake come utente normale.

  Una volta che avete installato glide, provate il programma di test che
  lo accompagna. Ricordatevelo:  un buon modo di resettare il display
  se un'applicazione di glide (come GLQuake) crasha e lascia lo schermo
  spento.  NOTA: usate questo test da una console virtuale, non X! 
  possibile che l'applicazione di test perda il fuoco della tastiera e
  del mouse in X, e a quel punto non avreste modo di chiuderlo.





            /usr/local/glide/bin/test3Dfx





  Il vostro schermo dovrebbe diventare blu e chiedervi di premere un
  tasto qualsiasi. Dopo che avrete premuto il tasto dovreste tornare al
  prompt.  3dfx.glide.linux sul news server della 3dfx (news.3dfx.com) 
  un'ottima fonte di informazioni per problemi specifici di glide per
  Linux.


  2.7.3.  Mesa

  Una volta installato glide, dovrete installare Mesa,
  un'implementazione free di OpenGL di Brial Paul
  (brianp@elastic.avid.com). Fortunatamente, non dovrete cercare
  lontano, perch le Mesa 2.6 sono incluse con i binari di QLQuake e
  QuakeWorld. Tutto quello che dovete fare  spostarle nel posto giusto:




            cd /usr/local/games/quake
            cp libMesaGL.so.2.6 /usr/local/lib
            ldconfig





  Se volete aggiornare le Mesa ad una versione pi recente (al momento
  in cui scrivo le Mesa 3.0 sono le pi aggiornate), potete scaricarle
  da  ftp://iris.ssec.wisc.edu/pub/Mesa Se avete RedHat 5.x o un'altra
  distribuzione basata sulle glibc, guardate le ``considerazioni su
  glibc, RedHat 5.x, Debian 2'' nella sezione Risoluzione dei
  problemi/FAQ per avere informazioni importanti sulla compilazione
  delle librerie per Quake.
  Dopo aver compilato il tutto seguendo le istruzioni, dovrete fare due
  cose:



    Eliminare la precedente installazione delle Mesa. Se avevate prima
     installato le libMesaGL.so.2.6 come descritto sopra, le dovete
     eliminare, o Quake potrebbe non usare le nuove versioni.




            cd /usr/local/lib/
            rm -f libMesaGL.so.2*








    Se le nuove Mesa hanno un numero di versione principale maggiore di
     2, dovete crearne un link con il nome libMesaGL.so.2:




            cd /usr/local/lib/
            ln -s /dovunque/siano/libMesaGL.so.3.0 libMesaGL.so.2
            ldconfig








  Ora passate ad una console virtuale (CTRL+ALT+F1) ed avviate glquake.




            cd /usr/local/games/quake
            ./glquake







  2.8.  Opzioni da linea di comando specifiche di Linux

  Questa sezione ricopre le opzioni da linea di comando specifiche della
  versione di Quake per Linux. Ci sono molte altre opzioni per Quake, ma
  vanno al di l di questo HOWTO. Controllate su alcuni dei siti
  elencati nella sezione ``Informazioni generali su Quake'' per questo
  tipo di informazioni.




     -mem num
        Specifica la memoria in megabyte da allocare (il default  8MB,
        che dovrebbe essere sufficiente nella maggior parte dei casi).



     -nostdout
        Non mandare output nello stdout. Usate questa opzione se non
        volete che tutto l'output della console sia mandato sul
        terminale.



     -mdev device
        Il dispositivo del mouse, il default  /dev/mouse



     -mrate speed
        Il baud rate del mouse, il default  1200



     -cddev device
        Il dispositivo del CD, il default  /dev/cdrom



     -mode num
        Per usare le modalit video indicate (solo per squake)



     -nokdb
        Non inizializzare la tastiera



     -sndbits 8 o 16
        Imposta la dimensione in bit del campionamento sonoro. Il
        default  16, se supportato



     -sndspeed speed
        Imposta la velocit del suono. I valori normali sono 8000,
        11025, 22051 e 44100. Il default  11025.



     -sndmono
        Imposta il suono mono



     -sndstereo
        Imposta il suono stereo ( il default, se supportato)



  2.9.  QuakeWorld **

  http://www.quakeworld.net spiega tutto meglio di quanto possa farlo
  io:




  QuakeWorld  una versione di Quake multi-giocatore specifica
  per Internet. Mentre la versione originale di Quake pu
  essere giocata su Internet, chi giocava via modem - la mag
  gioranza dei giocatori - avevano una soddisfazione minore.
  Per gli utenti si prospettavano un lag eccessivo, cio
  azioni che avvenivano molto dopo che le si faceva, la
  perdita di pacchetti, in cui il gioco si fermava e ripren
  deva diversi secondi dopo, e varie altre difficolt. Dopo
  aver realizzato che molte persone giocavano a Quake su
  Internet, e quanti altri avrebbero voluto ma non potevano
  perch il gioco non era soddisfacente, John Carmack della id
  Software decise di creare una versione di Quake ottimizzata
  per il giocatore medio su Internet via modem. La versione
  specifica via Internet fa solo una cosa, cio giocare a
  deathmatch su una rete TCP/IP come Internet.  Non ha sup
  porto per il gioco singolo, e non si pu fare niente senza
  connettersi ad un servizio speciale.



  Per giocare a QuakeWorld vi serve la versione registrata, completa o
  commerciale di Quake, ed un client QuakeWorld per Linux. I client di
  QuakeWorld sono degli stessi tipi (X11, SVGAlib e Mesa) del Quake
  normale, ma sono tutti impacchettati insieme in un singolo pacchetto,
  quindi avete bisogno di scaricare un file solo.  Dovete per scegliere
  tra quattro pacchetti:


    libc5 tar.gz


    glibc tar.gz


    libc5 rpm


    glibc rpm


  Installate solo uno di questi pacchetti: ciascuno contiene gli stessi
  file, sono solo linkati con librerie diverse.  Gli utenti di RedHat
  5.x possono scegliere il pacchetto rpm glibc.  Chi ha un sistema
  basato su glibc senza supporto rpm dovrebbe usare il pacchetto glibc
  tar. L'rpm libc5  per le distribuzioni RedHat precedenti alla 5.0 e
  per altre distribuzioni che usano il formato rpm.  Il pacchetto tar.gz
  libc5  per la Slackware e per tutti gli altri.

  Vedere la sezione ``Scaricare i file necessari'' per sapere dove
  trovare i file di QuakeWorld per Linux.

  I prerequisiti e la configurazione di questi binari sono gli stessi
  che per Quake, quindi riferitevi alle sezioni precedenti per avere
  aiuto su come impostare le SVGAlib o le glide/Mesa.


  2.9.1.  Installazione dei pacchetti RPM ++

  Per installare i pacchetti rpm dovrebbe essere sufficiente







       su root
       rpm -Uvh qwcl-xxxxx.i386.rpm





  qwcl, glqwcl e glqwcl.glx saranno installate setuid root in modo che
  possano accedere ai dispositivi grafici del sistema. I client X e GL
  possono essere usati senza privilegi di root se seguite le istruzioni
  in ``Utilizzare i giochi per X e GL senza setuid'' pi avanti.

  L'rpm pu lamentarsi che non trova libglide2x.so.  La libreria glide 
  necessaria solo se avete una scheda 3Dfx e volete usare QuakeWorld in
  modalit GL (glqwcl).  Se non volete usare la modalit GL, potete
  superare le dipendenze di glide con l'opzione --nodeps:




            su root
            rpm -Uvh qwcl-xxxxx.i386.rpm --nodeps






  2.9.2.  Installazione dei pacchetti tar.gz ++

  Per installare, fate untar del file nella directory di Quake. Fatelo
  come root, in modo da impostare i corretti permessi dei file:




            cd /usr/local/games/quake
            su root
            tar -xzf qwcl2.21-i386-unknown-linux2.0.tar.gz





  qwcl, glqwcl e glqwcl.glx saranno installati setuid root in modo che
  possano accedere i dispositivi grafici sul vostro sistema. I client GL
  e X possono essere utilizzati senza privilegi di root se seguite le
  istruzioni in ``Utilizzare i giochi per X e GL senza setuid'' pi
  avanti.



  2.9.3.  Utilizzare QuakeWorld ++

  Una volta installato QuakeWorld insieme ai file di Quake, potete farlo
  partire con:



            ./qwcl +connect some.server.address






  Vedere la sezione ``Software correlato'' per le informazioni su
  qualche front end per QuakeWorld che rende pi facile trovare i
  server.



    lib3dfxgl.so  **


     Con la versione 2.30 di QuakeWorld  disponibile un'alternativa
     alle librerie Mesa. lib3dfxgl.so  un mini driver GL ottimizzato
     per Quake che fornisce una framerate leggermente migliore delle
     Mesa.  Si tratta del porting di un driver che la 3Dfx ha sviluppato
     per Quake sotto Windows, ed apparentemente ancora non tutte le sue
     caratteristiche funzionano bene; quindi speriamo che la sua
     validit aumenti nel tempo.

     Come le Mesa, lib3dfxgl.so ha bisogno delle Glide per accedere alla
     scheda 3Dfx. Il pacchetto di QuakeWorkd contiene uno script,
     glqwcl.3dfxgl per usare QuakeWorld su sistemi glibc con questa
     libreria. Il prossimo paragrafo spiega come usare QuakeWorld con la
     lib3dfxgl.so su un sistema libc5. Su un sistema glibc, per fare
     funzionare lo script, l'eseguibile glqwcl non deve essere setuid, e
     non va usato da root. glqwcl caricher silenziosamente le Mesa
     invece delle lib3dfxgl.so se si fa girare con i permessi di root.
     Queste richieste implicano che abbiate installato il driver
     /dev/3dfx.


     Sui sistemi basati sulle libc5 dovrete creare un link simbolico a
     lib3dfxgl.so che si chiami libMesaGL.so.2, cos:



            cd /usr/local/games/quake
            ln -sf lib3dfxgl.so libMesaGL.so.2





  e poi fare partire QuakeWorld da uno script che dica a
  $LD_LIBRARY_PATH di guardare nella directory corrente:


  ______________________________________________________________________
       #!/bin/sh

       LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ./glqwcl $*

  ______________________________________________________________________



  Potete vedere quale driver viene caricato guardando l'output nella
  console quando QuakeWorld parte, cos:




            GL_VENDOR: 3Dfx Interactive Inc.
            GL_RENDERER: 3Dfx Interactive Voodoo^2(tm)
            GL_VERSION: 1.1
            GL_EXTENSIONS: 3DFX_set_global_palette WGL_EXT_swap_control GL_EXT_paletted_texture GL_EXT_shared_texture_palette GL_SGIS_multitexture


  Se GL_VENDOR dice Brian Paul invece di 3Dfx Interactive Inc., vuol
  dire che viene ancora usato Mesa invece del driver miniport.



    glqwcl.glx **



     glqwcl.glx viene linkato con le librerie OpenGL standard invece che
     con Mesa. Questo permette a QuakeWorld di girare su hardware
     supportato da altre implementazioni delle Mesa. In questo momento
     non conosco nessuna implementazione che supporti hardware diverso
     dalle 3Dfx, ma questo modo di agire assicura che quando apparissero
     ci si potrebbe giocare a QuakeWorld.

     QuakeWorld  un'applicazione GLX, e come tale deve essere usata da
     dentro X.

     Potete usare questo client con le Mesa/3Dfx se installate le Mesa e
     le Glide come illustrato nella sezione precedente, e poi impostate
     la variabile d'ambiente $MESA_GLX_FX al valore  "fullscreen" prima
     e dopo il comando quake2:




            export MESA_GLX_FX=fullscreen
            ./glqwcl.glx +_windowed_mouse 1





  Perch usare l'opzione  +_windowed_mouse 1? Ricordate che questa 
  un'applicazione di X che usa la scheda 3Dfx. Anche se il display
  occupa tutto lo schermo, QuakeWorld sta sempre girando dentro una
  finestra.  Ci significa che se non siete molto attenti, potreste
  spostare il puntatore del mouse fuori della finestra di QuakeWorld, e
  QuakeWorld smetterebbe di rispondere all'input dal mouse e dalla
  tastiera.  +_windowed_mouse 1 elimina questo problema dicendo a
  glqwcl.glx di agganciare il mouse e non farlo muovere all'esterno
  della finestra.




  2.10.  Server


  La maggior parte, se non tutte, le informazioni su come fare girare un
  server QW su DOS o Windows sono applicabili nello stesso modo ad un
  server Linux.

  Per inizializzare un server di QuakeWorld, digitate semplicemente:





            ./qwsv





  Il manuale ufficiale del server di QuakeWorld risiede in
  http://qwcentral.stomped.com.


  2.11.  Moduli ed aggiunte

  Una delle cose pi belle dei giochi di Quake  che gli autori li hanno
  resi facilmente estensibili. Gli utenti finali possono creare i propri
  livelli, aggiungere nuove armi o mostri, o anche cambiare
  completamente le regole del gioco.


  2.11.1.  Capture the flag (acchiappabandiera)

  Questa  la mia variazione favorita sia di Quake che di Quake2. Invece
  di girare intorno ed uccidere tutti quelli che incontrate (che ha i
  suoi meriti, non capite male!), l'acchiappabandiera  un gioco a
  squadre e molto pi strategico.  Dave 'Zoid' Kirsch, maintainer dei
  porting di Quake per Linux, ha creato questo modulo.

  Tutto quello che volete sapere del modulo per l'acchiappabandiera
  (CTF) si trova in http://captured.com/threewave/ Per giocare vi serve
  ftp://ftp.cdrom.com/pub/quake/planetquake/threewave/ctf/client/3wctfc.zip.
  Per installare la parte client di CTF, create una directory con nome
  ctf nella vostra directory di Quake, e scompattatevi il file
  3wctfc.zip. Il file readme.txt che lo accompagna  pieno zeppo di
  informazioni utili.




            cd /usr/local/games/quake
            mkdir ctf
            cd ctf
            unzip -L /dovunque/l'abbiate/messo/3wctfc.zip





  Per le informazioni su come utilizzare un server CTF vedere le pagine
  web menzionate qui sopra.



  2.11.2.  Pacchetti missione **

  La Activision ha rilasciato due pacchetti aggiuntivi di livelli extra
  per Quake, Scourge of Armagon e Dissolution of Eternity.



    Pacchetto missione 1: The Scourge of Armagon Assumendo che il
     vostro CD sia montato su /mnt/cdrom e che Quake sia installato in
     /usr/local/games/quake:




            cd /usr/local/games/quake
            mkdir hipnotic
            cp /mnt/cdrom/hipnotic/pak0.pak hipnotic
            cp /mnt/cdrom/hipnotic/config.cfg hipnotic



  Usate il pacchetto missione cos:



            cd /usr/local/games/quake
            ./quake.x11 -game hipnotic








    Pacchetto missione 2: Dissolution of Eternity Installare il secondo
     pacchetto missione richiede una procedura molto simile al primo, ma
     sostituite la parola hipnotic con rogue, e saltate il passo
     config.cfg, dato che quest'ultimo non  incluso nel CD del
     pacchetto missione 2.




  2.11.3.  Strumenti per Quake

  Qualcuno vuole contribuire con delle informazioni su qcc, bsp e tutto
  il resto?



  3.  Quake II

  Per installare Quake II sul vostro sistema Linux vi serve un qualche
  tipo della distribuzione ufficiale di Quake II della id: o il CD-ROM
  per Windows comprato dal vostro negozio di software preferito, o la
  versione demo scaricata dalla rete. Vedere ``Scaricare i file
  necessari'' per avere dettagli sulla versione demo.  Alternativamente,
  se avete gi Quake installato su una macchina Windows, potete usare i
  file che vi interessano da quella installazione.


  3.1.  Prerequisiti

  Come minimo avrete bisogno di:



    Un Pentium 90 o superiore (raccomandato il 133)


    16 MB di RAM (raccomandati 24)


    Il CD-ROM di Quake 2 o la versione demo (q2-314-demo-x86.exe)


    Linux con kernel versione 2.0.24 o successiva


    libc 5.2.18 o successiva


    Uno dei seguenti:



    un server X11 che supporti le estensioni di memoria condivise
     MITSM. Sono supportati gli schermi a 8 e 16 bit (per il renderer
     X).


    SVGAlib 1.2.10 o successiva (per i renderer SVGA e GL)




    25-400 Mb di spazio disco libero (a seconda di come fate
     l'installazione)


    Accesso all'account di root della macchina su cui state
     installando.




  Opzionali:


    Una scheda audio supportata


    Una scheda grafica accelerata 3Dfx Voodoo Graphics o Voodoo2 o
     Voodoo Rush 3D.


    Le librerie grafiche 3Dfx installate (per il renderer GL)


    Le Mesa 2.6 o successive (per il renderer GL)



  3.2.  Installazione di Quake II



  3.2.1.  Scaricare i file necessari**

  Tutti i file necessari per Quake II per Linux sono disponibili nel
  sito ftp della id Software, ftp.idsoftware.com. Questo sito pu essere
  spesso congestionato. Quindi potete usare uno dei mirror:


    ftp.cdrom.com/pub/idgames/idstuff (California, USA)


    ftp.gamesnet.net/idsoftware (California, USA)


    ftp.stomped.com/pub/mirror/idstuff (Minnesota, USA)


    mirrors.telepac.pt/pub/idgames (Lisbon, Portogallo)


    download.netvision.net.il/pub/mirrors/idsoftware (Haifa, Israele)


  I file di Quake II nominati in questa sezione sono:


    I binari di Quake II per Linux


    il pacchetto tar.gz per libc5
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-i386-unknown-
     linux2.0.tar.gz


    il pacchetto tar.gz per glibc
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-glibc-
     i386-unknown-linux2.0.tar.gz


    il pacchetto rpm per libc5
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-2.i386.rpm


    il pacchetto rpm per glibc
     ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.19a-
     glibc-2.i386.rpm




    La versione demo di Quake II per Windows
     ftp://ftp.idsoftware.com/idstuff/quake2/q2-314-demo-x86.exe


    Il sorgente di Quake II
     ftp://ftp.idsoftware.com/idstuff/quake2/source/q2source-3.14.shar.Z


    Acchiappabandiera per Quake II
     ftp://ftp.idsoftware.com/idstuff/quake2/ctf/102.zip


  Altro software nominato:


    le librerie grafiche SVGAlib
     http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.tar.gz


    i binari di SVGAlib per libc5
     http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar.gz


    le librerie a runtime Glide http://glide.xxedgexx.com/3DfxRPMS.html


    la libreria grafica Mesa 3D
     http://www.ssec.wisc.edu/~brianp/Mesa.html


    l'utilit di decompressione unzip
     http://sunsite.unc.edu/pub/Linux/utils/compress/unzip-5.31.tar.gz



  3.2.2.  Creazione della directory di installazione

  La prima cosa che dovete fare  decidere dove volete installare Quake
  II. Molti lo mettono in /usr/games/quake. Gli amministratori di
  sistema anali come me scelgono di installare tutto quello che non fa
  parte della distribuzione standard sotto /usr/local, quindi per me
  Quake II va in /usr/local/games/quake2.  Se scegliete di installarlo
  da qualche altra parte, sostituite il percorso appropriato dove io
  indico /usr/local/games/quake2.

  Quindi andate avanti e create la directory in cui installerete Quake
  II, ed entrateci. Il resto di queste istruzioni assumeranno che questa
  sia la vostra directory corrente.




            mkdir /usr/local/games/quake2
            cd /usr/local/games/quake2






  3.2.3.  Installare dal CD

  Inserite il CD di Quake II nel drive, e montatelo:




            mount -t iso9660 /dev/cdrom /mnt/cdrom





  Se il vostro CDROM normalmente  montato altrove, sostituite la sua
  posizione al posto di /mnt/cdrom. Se non siete sicuri di dove sia
  montato il CDROM, controllate la documentazione della vostra
  particolare distribuzione.



    Installazione completa Il metodo di installazione pi semplice 
     l'installazione "completa", che copia tutto il contenuto del CD nel
     disco fisso; richiede circa 350 Mb, e viene fatta con i seguenti
     comandi:




            cd /usr/local/games/quake2
            cp -r /mnt/cdrom/Install/Data/* .






  Ci saranno un sacco di inutili file per Windows in giro, che potrete
  tranquillamente cancellare:




            rm -f /usr/local/quake2/*.dll
            rm -f /usr/local/quake2/quake2.exe
            rm -f /usr/local/quake2/baseq2/gamex386.dll



    Installazione parziale Se 450 Mb sono troppo da dedicare a Quake
     II, potete saltare l'installazione delle scene filmate e fare un
     collegamento al CD-ROM; ci riducer lo spazio necessario di circa
     200 Mb:




            cd /usr/local/games/quake2
            mkdir baseq2
            cp /mnt/cdrom/Install/Data/baseq2/pak0.pak baseq2
            cp -r /mnt/cdrom/Install/Data/baseq2/players baseq2
            ln -s /mnt/cdrom/Install/Data/baseq2/video baseq2/video






  Da notare che ci non significa che dovete montare il CD di Quake II
  ogni volta che volete giocare. Se il gioco non riesce a caricare i
  video, semplicemente non li fa vedere.




  3.2.4.  Installazione da Windows a Linux

  Se avete Quake II installato sotto Windows su un'altra macchina,
  potete trasferire i file da quake2\baseq2 al sistema Linux usando FTP
  o in qualche altro modo. Tenete presente che i nomi dei file nel
  vostro sistema Linux devono essere in minuscolo per poter essere
  usati, quindi dovrete probabilmente rinominare i file dopo il
  trasferimento. Notate anche che potrebbe essere necessario cancellare
  l'installazione Windows per restare in regola con i termini della
  licenza della id. Non  colpa mia se fate qualcosa di illegale.

  Se Windows e Linux sono sulla stessa macchina avete due possibilit:
  copiare i file dalla partizione Windows alla partizione Linux, o fare
  un link. Le due cose sono equivalenti; potete semplicemente
  risparmiare molto spazio disco se fate un link invece di una copia.

  Come al solito, sostituite /win95/games/quake2 nel seguente esempio
  con il percorso corretto per la partizione Windows e per
  l'installazione di Quake II.



    Se volete copiare i file dalla partizione Windows, fate cos:




            cd /usr/local/games/quake2
            cp -r /win95/games/quake2/baseq2 .








    Per creare dei collegamenti ai file di Quake II per Windows, fate:


            cd /usr/local/games/quake2
            ln -s /win95/games/quake2/baseq2 .






  Questo secondo metodo richiede che la partizione Windows da cui state
  facendo il link sia scrivibile dagli utenti, il che pu non essere
  vero per tutti i sistemi. Rendendo la partizione Windows scrivibile,
  date a tutti gli utenti la possibilit di distruggere l'intera instal
  lazione Windows. Se per voi va bene, modificate la partizione
  /etc/fstab in modo che la partizione Windows venga montata con le
  opzioni umask=002,gid=XXX, dove XXX  l'id del gruppo "utenti".  Per
  sapere quale , guardate in /etc/group. Quando avete aggiornato fstab,
  smontate e rimontate la partizione Windows, ed avete fatto.


  Avete finito di installare i file di dati di Quake II. Passate
  all'"``Installazione dei binari per Linux''".



  3.2.5.  Installazione della versione demo **

  La id Software ha una versione demo gratuita di Quake II sul suo sito
  ftp.   un download di 40 megabyte. Questa demo comprende tutte le
  caratteristiche della versione completa, compresa la possibilit di
  giocare con pi giocatori, ma ha solo tre livelli, quindi pu essere
  difficile trovare un server per giocarci.

  Vedere la sezione ``Scaricare i file necessari'' pi avanti, per
  sapere dove trovare il demo di Quake II. Scaricatela e mettetela nella
  directory di Quake II.

  La distribuzione demo  un file zip autoscompattante (o per lo meno si
  scompatta automaticamente in altri sistemi operativi). Potete estrarla
  usando il comando unzip(1), che dovrebbe essere incluso nella maggior
  parte delle distribuzioni moderne. Se non l'avete, lo potete scaricare
  dal sito elencato nella sezione ``Scaricare i file necessari''.

  Entrate nella directory di Quake II ed estraete l'archivio:




            cd /usr/local/games/quake2
            unzip q2-314-demo-x86.exe





  Ora dovete cancellare alcune cose e spostarne altre:



            rm -rf Splash Setup.exe
            mv Install/Data/baseq2 .
            mv Install/Data/DOCS docs
            rm -rf Install
            rm -f baseq2/gamex86.dll



  La demo di Quake II ora  installata. Dovete solo aggiungere i binari
  per Linux.


  3.3.  Aggiungere i binari per Linux**

  Ci sono quattro pacchetti di Quake II per Linux disponibili:


    un pacchetto tar.gz per libc5


    un pacchetto tar.gz per glibc


    un pacchetto rpm per libc5


    un pacchetto rpm per glibc


  Installatene solo uno. Ciascuno contiene gli stessi file, sono
  soltanto linkati contro diverse librerie. Gli utenti di RedHat 5.1
  devono scegliere il pacchetto rpm per glibc. Chi usa un sistema glibc
  senza supporto per rpm deve usare il pacchetto tar per glibc. L'rpm
  per libc5  per chi ha una distribuzione RedHat precedente alla 5.0 o
  un'altra distribuzione che usa il formato rpm per i pacchetti. Il
  pacchetto tar.gz per libc5  per la Slackware e per tutti gli altri.

  Vedere la sezione ``Scaricare i file necessari'' per sapere dove
  trovare i file di Quake II per Linux.


  3.3.1.  Installare i pacchetti RPM **

  L'installazione dei pacchetti rpm dovrebbe essere semplicissima:




            su root
            rpm -Uvh quake2-xxxxx.i386.rpm





  Rpm si potr lamentare che non trova libglide2x.so.  La libreria Glide
   necessaria solo se avete una scheda 3Dfx e volete usare Quake II in
  modalit GL. Se non pensate di utilizzare la modalit GL, potete
  superare la dipendenza dalle Glide con l'opzione --nodeps:




            su root
            rpm -Uvh quake2-xxxxx.i386.rpm --nodeps









  3.3.2.  Installare i pacchetti tar.gz **

  Per installarli, scompattate con tar i file nella directory di Quake
  II.  Fatelo come root, in modo da impostare i permessi corretti sui
  file.




            cd /usr/local/games/quake
            su root
            tar -xzf qwcl2.21-i386-unknown-linux2.0.tar.gz






  3.4.  Impostare i permessi **

  Se avete usato rpm o tar da root quando avete installato il pacchetto
  di Quake II sul sistema, i permessi sui file dovrebbero essere
  corretti. L'eseguibile quake2 deve essere stato installato setuid root
  per poter fargli accedere ai dispositivi grafici del sistema. Per
  questioni di sicurezza, le librerie di rendering ref_*.so sono
  impostate in modo da appartenere a root e da essere scrivibili solo a
  lui. Se le librerie non sono di root, o sono scrivibili a tutti,
  quake2 non partir.

  Se volete usare Quake II solo con i renderer GL o X, il file quake2
  non ha bisogno di essere setuid root. Vedere ``Utilizzare le versioni
  X e GL senza setuid'' nella sezione Tips and Tricks per avere
  informazioni su come utilizzare Quake II senza permessi di root.


  3.4.1.  Quake2.conf **


  Per ragioni di sicurezza, esiste un file quake2.conf, che dice a Quake
  II dove trovare le librerie di rendering di cui ha bisogno (ref_*.so).
  Contiene solo una linea, che dovrebbe essere il percorso per la vostra
  installazione di Quake II. Quake II cerca questo file in /etc. Se
  avete installato Quake II da un file .rpm, questo file sar stato
  installato automaticamente. Se l'avete installato da un pacchetto
  .tar, dovete crearlo cos:




            su root
            cd /usr/local/games/quake2
            pwd > /etc/quake2.conf
            chmod 644 /etc/quake2.conf






  3.5.  Il renderer X

  Quake II dovrebbe essere pronto a girare sotto X. Provate:




       cd /usr/local/games/quake2
       ./quake2 +set vid_ref softx





  Se va tutto bene, dopo una buona pausa dovrebbe comparire una piccola
  finestra di Quake II con il demo che ci gira dentro. Dovreste sentire
  degli effetti sonori, e forse della musica, se il CD  montato. Se una
  di queste cose non funziona, controllate la sezione ``Risoluzione dei
  problemi''.


  3.6.  Il renderer SVGAlib

  Se volete usare i renderer ref_soft o ref_gl vi serve la SVGAlib
  installata e configurata (Quake II usa le SVGAlib per processare
  l'input da tastiera e da mouse, in caso vi stiate chiedendo a cosa
  serve per il renderer GL).  La SVGAlib  compresa nella maggior parte
  delle distribuzioni, e deve essere configurata correttamente prima di
  poter usare Quake II fuori da X.

  libvga.config  il file di configurazione di SVGAlib. Sulla maggior
  parte dei sistemi lo troverete in /etc o in /etc/vga.

  Assicutatevi che le impostazioni del mouse, del monitor e della scheda
  video in questo file siano corretti per il vostro sistema. Per avere
  altri dettagli controllate la documentazione della SVGAlib.

  Se non l'avete gi, scaricatela dal sito indicato nella ``sezione dei
  file'' pi sopra.  Se avete la RedHat 5.x o un'altra distribuzione di
  Linux basata su glibs, guardate le ``considerazioni su Glibc, RedHat
  5.x, Debian 2'' nella sezione Risoluzione dei problemi/FAQ per avere
  delle informazioni importanti su come compilare le librerie per
  poterle usare con Quake.  A
  http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar.gz
   disponibile un binario delle SVGAlib precompilato con le libc5 per
  chi non ha voglia di ricompilare il tutto.

  Dovreste usare Quake II da una console virtuale se usate i renderer
  ref_soft o ref_gl. Non funzioner da X, a meno che non siate root
  quando lo avviate, e utilizzare un gioco come root  una cosa da
  evitare. Quindi, se siete in X, fate CTRL+ALT+F1, fate il login e poi




            cd /usr/local/games/quake2
            ./quake2





  ``Utilizzare i giochi SVGA e GL da X'' nella sezione dei Tips & Tricks
  pi avanti spiega come lanciare Quake II per SVGA e GL da X senza
  passare manualmente ad una console virtuale.


  3.7.  Il renderer OpenGL

  Il Quake per le OpenGL hardware-accelerate  Quake come Dio comanda.
  Non c' possibile sostituto, e una volta provato non si torna
  indietro.

  Per usare Quake II in modalit GL, vi serve una scheda 3D con i
  chipset grafici Voodoo, Voodoo2 o Voodoo Rush. Ci sono delle procedure
  particolari da seguire se avete una scheda Vodoo Rush, ma non ve le
  posso illustrare perch, francamente, non saprei quello che direi. Una
  versione futura di questo HOWTO coprir anche i problemi del Rush (se
  qualcuno ne vuole scrivere, sar contento di inserire il pezzo qui).

  Le librerie SVGAlib, Glide e Mesa devono essere tutte installate e
  configurate correttamente sul sistema, per poter usare quake2. Le
  seguenti sezioni copriranno brevemente i passi da seguire per farlo.

  Il Linux 3Dfx HOWTO di Bernd Kreimeier (bk@gamers.org)
  (http://www.gamers.org/dEngine/xf3D/howto/3Dfx-HOWTO.html)  una buona
  fonte di informazioni.

  Il newsgroup 3dfx.glide.linux sul news server della 3dfx
  (news.3dfx.com)  un'altra buona fonte di informazioni
  sull'intersezione di Linux, glide, Mesa e Quake.



  3.7.1.  SVGAlib

  Quake II usa le SVGAlib per ricevere input dal mouse e dalla tastiera,
  quindi dovrete configurarle come illustrato nella sezione ``Renderer
  SVGAlib''.


  3.7.2.  Glide

  Glide  una libreria che fornisce un API per programmare le schede
  3Dfx.  Se volete che le librerie grafiche Mesa usino la vostra scheda
  3Dfx, le dovete avere.

  Potete trovare l'ultima versione delle glide su
  http://glide.xxedgexx.com/3DfxRPMS.html. Scegliete il (i) pacchetti
  appropriati per il vostro sistema, ed installateli seguendo le
  istruzioni che trovate sulla pagina web.

  Notate che a meno che non scarichiate il pacchetto dei device driver
  per 3Dfx oltre alla libreria Glide, potrete utilizzare solo le
  applicazioni Glide (come GLQuake) come root. Installate il modulo
  /dev/3dfx e potrete usare GLQuake come utente normale.

  Una volta che avete installato glide, provate il programma di test che
  lo accompagna. Ricoldatevelo:  un buon modo di resettare il display
  se un'applicazione di glide (come GLQuake) crasha e lascia lo schermo
  spento.  NOTA: usate questo test da una console virtuale, non X! 
  possibile che l'applicazione di test perda il fuoco della tastiera e
  del mouse in X, e a quel punto non avreste modo di chiuderlo.




            /usr/local/glide/bin/test3Dfx





  Il vostro schermo dovrebbe diventare blu e chiedervi di premere un
  tasto qualsiasi. Dopo che avrete premuto il tasto dovreste tornare al
  prompt.  3dfx.glide.linux sul news server della 3dfx (news.3dfx.com) 
  un'ottima fonte di informazioni per problemi specifici di glide per
  Linux.

  3.7.3.  Mesa

  Una volta installato glide, dovrete installare Mesa,
  un'implementazione free di OpenGL di Brial Paul
  (brianp@elastic.avid.com). Fortunatamente, non dovrete cercare
  lontano, perch le Mesa 2.6 sono incluse con i binari di Quake II.
  Tutto quello che dovete fare  spostarle nel posto giusto:




            cd /usr/local/games/quake2
            cp libMesaGL.so.2.6 /usr/local/lib
            ldconfig





  Se volete aggiornare le Mesa ad una versione pi recente (al momento
  in cui scrivo le Mesa 3.0 sono le pi aggiornate), potete scaricarle
  da ftp://iris.ssec.wisc.edu/pub/Mesa.  Se avete RedHat 5.x o un'altra
  distribuzione basata sulle glibc, guardate le ``considerazioni su
  glibc, RedHat 5.x, Debian 2'' nella sezione Risoluzione dei
  problemi/FAQ per avere informazioni importanti sulla compilazione
  delle librerie per Quake.

  Dopo aver compilato il tutto seguendo le istruzioni, dovrete fare due
  cose:



    Eliminare la precedente installazione delle Mesa. Se avevate prima
     installato le libMesaGL.so.2.6 come descritto sopra, le dovete
     eliminare, o Quake II potrebbe non usare le nuove versioni.




            cd /usr/local/lib/
            rm -f libMesaGL.so.2*








    Se le nuove Mesa hanno un numero di versione principale maggiore di
     2, dovete crearne un link con il nome libMesaGL.so.2:




            cd /usr/local/lib/
            ln -s /wherever/you/installed/it/libMesaGL.so.3.0 libMesaGL.so.2
            ldconfig








  Ora passate ad una console virtuale (CTRL+ALT+F1) ed avviate Quake II:




            cd /usr/local/games/quake2
            ./quake2 +set vid_ref gl






  3.7.4.  lib3dfxgl.so **

  Con Quake II versione 3.19  disponibile un'alternativa alla libreria
  Mesa.  lib3dfxgl.so  un mini driver GL ottimizzato per Quake che
  fornisce una framerate leggermente migliore delle Mesa.  Si tratta del
  porting di un driver che la 3Dfx ha sviluppato per Quake sotto
  Windows, ed apparentemente ancora non tutte le sue caratteristiche
  funzionano bene; quindi speriamo che la sua validit aumenti nel
  tempo.

  Come le Mesa, lib3dfxgl.so ha bisogno delle Glide per accedere alla
  scheda 3Dfx. Il pacchetto di Quake II contiene uno script,
  glqwcl.3dfxgl per usare Quake II su sistemi glibc con questa libreria.
  Il prossimo paragrafo spiega come usare Quake II con la lib3dfxgl.so
  su un sistema libc5. Su un sistema glibc, per fare funzionare lo
  script, l'eseguibile glqwcl non deve essere setuid, e non va usato da
  root. glqwcl caricher silenziosamente le Mesa invece delle
  lib3dfxgl.so se si fa girare con i permessi di root. Queste richieste
  implicano che abbiate installato il driver /dev/3dfx se gira con
  permessi di root.  Questa richiesta di non essere root implica che
  abbiate installato il driver  /dev/3dfx.

  Sui sistemi basati sulle libc5, si applica la richiesta di non essere
  root riportata sopra, ma dovrete anche creare un link simbolico a
  lib3dfxgl.so che si chiami libMesaGL.so.2, cos:



            cd /usr/local/games/quake
            ln -sf lib3dfxgl.so libMesaGL.so.2





  e poi fare partire Quake II da uno script che dica a $LD_LIBRARY_PATH
  di guardare nella directory corrente:


  ______________________________________________________________________
       #!/bin/sh

       LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ./quake2 +set vid_ref gl $*

  ______________________________________________________________________



  Potete vedere quale driver viene caricato guardando l'output nella
  console quando Quake II parte, cos:



       GL_VENDOR: 3Dfx Interactive Inc.
       GL_RENDERER: 3Dfx Interactive Voodoo^2(tm)
       GL_VERSION: 1.1
       GL_EXTENSIONS: 3DFX_set_global_palette WGL_EXT_swap_control GL_EXT_paletted_texture GL_EXT_shared_texture_palette GL_SGIS_multitexture





  Se GL_VENDOR dice Brian Paul invece di 3Dfx Interactive Inc., vuol
  dire che viene ancora usato Mesa invece del driver miniport.


  3.8.  Il renderer GLX **


  ref_glx.so  linkato con le librerie OpenGL standard invece che con le
  Mesa. Questo permette a Quake II di girare su altro hardware 3D che
  sia supportato da altre implementazioni OpenGL. Al momento non conosco
  altre implementazioni OpenGL che supportino hardware diversi dalle
  3Dfx, ma questo renderer assicura che quando apparissero ci si
  potrebbe giocare a Quake II.

  Quake II  un'applicazione GLX, e come tale deve essere usata da
  dentro X.

  Potete usare questo client con le Mesa/3Dfx se installate le Mesa e le
  Glide come illustrato nella sezione precedente, e poi impostate la
  variabile d'ambiente $MESA_GLX_FX al valore  "fullscreen" prima e dopo
  il comando quake2:




            export MESA_GLX_FX=fullscreen
            ./quake2 +set vid_ref glx +set _windowed_mouse 1





  Perch usare l'opzione  +_windowed_mouse 1? Ricordate che questa 
  un'applicazione di X che usa la scheda 3Dfx. Anche se il display
  occupa tutto lo schermo, Quake II sta sempre girando dentro una
  finestra.  Ci significa che se non siete molto attenti, potreste
  spostare il puntatore del mouse fuori della finestra di Quake II, e
  Quake II smetterebbe di rispondere all'input dal mouse e dalla
  tastiera.  +_windowed_mouse 1 elimina questo problema dicendo a
  glqwcl.glx di agganciare il mouse e non farlo muovere all'esterno
  della finestra.


  3.9.  Opzioni da linea di comando specifiche di Linux

  Questa sezione ricopre le opzioni da linea di comando specifiche della
  versione di Quake II per Linux. Ci sono molte altre opzioni per Quake
  II, ma vanno al di l di questo HOWTO. Controllate su alcuni dei siti
  elencati nella sezione ``Informazioni generali su Quake'' per questo
  tipo di informazioni.

  Le seguenti sono in realt cvar (variabili client) che potete
  impostare sulla console di Q2, ma ha pi senso darle da linea di
  comando.  Impostatele con +set dalla linea di comando, cos:



       ./quake2 +set cd_dev /dev/hdc







     cd_dev device
        Nome del device del CD-ROM



     nocdaudio valore
        Disabilita il CD audio se valore  diverso da zero.



     sndbits num
        Imposta la dimensione in bit del campionamento sonoro. Il
        default  16.



     sndspeed num
        Imposta la velocit del suono. I valori normali sono 8000,
        11025, 22051 e 44100. Il default  11025.  Se impostato a zero,
        il driver del suono cerca di usare le velocit in questo ordine:
        11025, 22051, 44100, 8000.



     sndchannels num
        Indica suono stereo o mono. Il default  2 (stereo). Usate 1 per
        il mono.



     nostdout valore
        Non mandare nessun output allo stdout. Usate questa opzione se
        non volete che l'output di console sia mandato sul terminale.



  3.10.  Server Quake II

  La forza di Linux come server internet lo rende una piattaforma
  perfetta per far girare un server di Quake II per internet. Questa
  sezione tratter le basi e gli aspetti specifici di Linux
  dell'impostazione di un server di Quake II.  Informazioni pi
  dettagliate su come utilizzare i server di Quake II sono disponibili
  altrove (vedere la sezione ``Altre fonti di informazioni'' nella prima
  parte di questo documento.


  3.10.1.  Server "in ascolto"

  Si pu inizializzare un server "in ascolto" di Quake II dall'interno
  del gioco, usando il men Multiplayer. In questo modo si pu ospitare
  un gioco e parteciparvi allo stesso tempo.

  Per iniziare un server "in ascolto", inizializzare Quake II, aprite il
  men di Quake II con il tasto Esc, e scegliete la voce Multiplayer.
  Da l dovrebbe essere piuttosto auto-esplicativo.


  3.10.2.  Server dedicati

  Per un server di Quake II permanente ed autonomo che giri senza
  un'attenzione costante, usare il server in ascolto non  pratico.
  Quake II ha una modalit server dedicato pi adatta a questo tipo di
  utilizzo. Il server dedicato viene avviato da linea di comando e usa
  meno risorse di sistema di un server "in ascolto" perch non
  inizializza la parte grafica del client.

  Per inizializzare un server dedicato, usate l'opzione da linea di
  comando +set dedicated 1.  Potete impostare dei parametri aggiuntivi
  sia da linea di comando sia da un file di configurazione che va
  impostato dalla linea di comando con +exec. Il file di configurazione
  dovrebbe essere nella directory baseq2.

  Qui sotto sono elencate alcune opzioni comuni per i server. Per
  impostarle sulla linea di comando, date +set fraglimit 30. Le opzioni
  vengono impostate nello stesso modo anche nel file di configurazione,
  solo che non serve il + prima di set. Per invocare il file di
  configurazione fate cos: +exec server.cfg.



     fraglimit
        Numero di frag richiesti prima che la mappa cambi


     timelimit
        Tempo in minuti che deve passare prima che la mappa cambi


     hostname
        Il nome del vostro server di Quake II. Si tratta di una stringa
        arbitratia, e non ha niente a che fare con il nome di host DNS.


     maxclients
        Il massimo numero di giocatori che si pu connettere
        contemporaneamente al server.


  Per avere tante informazioni sulla console e sulla linea di comando di
  Quake II quante ne basterebbero per soffocare un cavallo, guardate su
  Farenheit 176 (http://www.planetquake.com/f176).


  3.10.3.  Altre fonti di informazioni sui server



    La FAQ per i server di Quake II hanno una guida passo-passo per
     impostare un server di Quake II sotto Linux:
     http://www.bluesnews.com/faqs/q2s-faq.html


    Grant Cornelius Reticulus Copernicus Sperry (flubber@xmission.com)
     ha dei file di configurazione base per i server di Quake II e degli
     script di avvio a
     http://www.atomicage.com:80/quake/server/server_cfg/.







  3.11.  Moduli e aggiunte

  Le modifiche a Quake II come Capture the Flag (acchiappabandiera),
  Jailbreak e Lithium II sono estensioni molto popolari del gioco
  originale di Quake II. Alcuni moduli risiedono interamente nel server
  (Lithium), ed altri richiedono delle modifiche al client (CTF). Per i
  moduli solo su server, potete semplicemente connettervi e giocare. I
  moduli dal lato client vi richiedono di installare dei file aggiuntivi
  nella directory di quake2 prima di giocare.



  3.11.1.  Moduli dal lato client

  Generalmente, l'installazione di un modulo dal lato client consiste
  semplicemente nello scaricare il pacchetto client e spacchettarlo
  nella directory di Quake II, ma dovreste riferirvi alla documentazione
  del modulo per i dettagli specifici. Pu essere necessario scaricare
  un pacchetto specifico per Linux in aggiunta al pacchetto client
  principale (per Windows). Tenete pure presente che non tutti i moduli
  possono essere disponibili per Linux.

  I pacchetti dei moduli dal lato client di solito contengono un nuovo
  file gamei386.so e uno o pi file .pak, oltre, forse, ad altri file.
  Questi nuovi file verranno installati in una sottodirectory della
  directory di Quake II. Usate +set game mod-dir sulla linea di comando
  per usare il modulo. Rocket Arena 2, ad esempio, si installa in una
  directory arena. Per giocare a RA2, inizializzate il client cos:



             ./quake2 +set game arena






  3.11.1.1.  Capture the Flag (acchiappabandiera)

  Dato che questa  la variazione pi famosa di Quake II a pi
  giocatori, ho incluso delle istruzioni specifiche per installare
  questo modulo.  Capture the flag per Quake II  disponibile dal sito
  ftp della id. Scaricatelo, poi installatelo cos:




            cd /usr/local/games/quake2
            mkdir ctf
            cd ctf
            unzip -L /wherever/you/put/it/q2ctf102.zip





  Per giocare a CFT inizializzate Quake II con +set game ctf.


  3.11.2.  Moduli dal lato server

  Usare un modulo di Quake II su un server non  molto diverso da usarne
  uno dal lato client. In genere dovrete installare i file gamei386.so e
  server.cfg in una nuova sottodirectory, ed inizializzare il server con

            ./quake2 +set game XXXX +set dedicated 1 +exec server.cfg





  dove XXXX  il nome della nuova sottodirectory del modulo. La proce
  dura esatta varia da modulo a modulo, naturalmente. Controllate la
  documentazione del modulo stesso per avere dettagli specifici.


  3.11.3.  Sorgenti del gioco

  L'intero gioco, con l'eccezione del motore, risiede in una libreria
  condivisa, gamei386.so. I moduli di Quake II vengono creati cambiando
  il contenuto di questo file. Il sorgente C  disponibile gratuitamente
  (section ``Scaricare i file necessari'' pi sopra), e possono essere
  scaricati e modificati.

  Dopo che avrete  scaricato il sorgente, ecco come cominciare:




             cd /usr/local/games/quake2
             mkdir mymod
             cd mymod
             gunzip /dove/lo/mettete/q2source-3.14.shar.Z
             sh /dove/lo/mettete/q2source-3.14.shar





  Vi si presenter un po' di legalese a cui dovete rispondere yes, e i
  sorgenti vengono estratti. Per compilare un nuovo file gamei386.so da
  questi ultimi basta un semplice make.  Con questa libreria appena
  compilata potete giocare a Quake dando:




             cd /usr/local/games/quake2
             ./quake2 +set game mymod





  Non  ancora troppo esaltante, dato che quello che avete appena
  compilato  identico al gamei386.so "normale", ma questa dovrebbe
  essere una buona informazione con gli aspiranti autori di moduli.


  3.11.4.  Pacchetti missione **



    Pacchetto missione 1: The Reckoning The Reckoning richiede la
     versione 3.15 o una successiva. Avrete bisogno almeno di 95 Mb per
     un'installazione minima. Vi servono altri 90 Mb se volete
     installare anche le sequenze video. Assumendo che il CD sia montato
     su /mnt/cdrom e che Quake II sia installato in
     /usr/local/games/quake2:


            cd /usr/local/games/quake2
            cp -r /mnt/cdrom/Data/all/* xatrix/
            rm -f xatrix/gamex86.dll






  Se volete installare le sequenze video:




            cp -r /mnt/cdrom/Data/max/xatrix/video xatrix






  Giocate a The Reckoning cos:



            cd /usr/local/games/quake2
            ./quake2 +set game xatrix








    Pacchetto missione 2: Ground Zero Richiede Quake II versione 3.17 o
     successiva. Avrete bisogno di almeno 120 Mb per un'installazione
     minima. Altri 115 Mb vi servono se volete installare anche le
     sequenze video. Assumendo che il CD sia montato su /mnt/cdrom e che
     Quake II sia installato in /usr/local/games/quake2:




            cd /usr/local/games/quake2
            cp -r /mnt/cdrom/Data/all/* rogue/
            rm -f rogue/gamex86.dll






  Se volete installare le sequenze video:




            cp -r /mnt/cdrom/Data/max/rogue/video rogue






  Giocate a Ground Zero cos:
            cd /usr/local/games/quake2
            ./quake2 +set game rogue









  4.  Software correlato ++



  4.1.  QStat

  Qstat  un programma basato sulla linea di comando che rende lo stato
  dei server Quake, QuakeWorld e Quake 2 su internet, creato da Steve
  Jankowski mailto:steve@activesw.com.

  Ecco il riassunto delle caratteristiche dalla homepage di QStat:


    Supporta Windows 95, NT, e la maggior parte degli Unix


    Comprende il codice sorgente in C ed un binario per Windows.


    Supporta i server del vecchio Quake (NetQuake), QuakeWorld, Hexen
     II, e Quake II


    Pu mostrare tutte le statistiche disponibili, comprese le
     informazioni sui giocatori e le regole del server


    Template di output per la generazione automatica di HTML


    Modalit di visualizzazione raw per l'integrazione con i generatori
     di pagine HTML


    Cache dei nomi host built-in


    Ordina per tempo di ping, giochi, o entrambi


    Pi opzioni di quante ne potreste immaginare


  Qstat  uno strumento indispensabile se volete giocare in rete.  Sono
  stati scritti anche molti front-end per qstat. Alcuni di essi sono
  elencati pi avanti in questa sezione.

  Potete scaricare la versione pi recente di qstat dalla sua homepage
  (http://www.activesw.com/people/steve/qstat.html.


  4.2.  XQF

  XQF  un front-end grafico a QStat che usa il toolkit GTK;  il
  miglior browser per i server di QuakeWorld/Quake2 che esista al
  momento, e Roman Pozlevich (roma@botik.ru) sta ancora mandando fuori
  nuove revisioni al ritmo di circa una al mese.

  Se conoscete GameSpy per la piattaforma Windows, questo  il programma
  che pi gli assomiglia per Linux.

  La homepage di XQF si trova a http://www.linuxgames.com/xqf.


  4.3.  QuickSpy

  QuickSpy  un browser per i server di QuakeWorld a base testuale; 
  un'altro front-end a QStat e funziona piuttosto bene. Se non usate X e
  non avete Quake II,  una possibilit che vi pu bastare. Attenzione,
  per, non  pi in sviluppo.

  Potete scaricare QuickSpy da
  http://diana.ecs.soton.ac.uk/~rht96r/quake/quickspy/.


  4.4.  QPlug per Linux

  Qplug  un plugin per Netscape che riceve e mostra le informazioni sui
  server di QuakeWorld e Quake II inserite in una pagina web. Una
  versione Windows per Qplug  in giro gi da un po' di tempo. L'autore,
  Olivier Debon (odebon@club-internet.fr) ha scritto la versione per
  Linux da zero senza aver mai nemmeno visto la versione per Windows.

  Qplut per Linux  disponibile a
  http://www.geocities.com/TimesSquare/Labyrinth/5084/qplug.html.


  4.5.  qkHacklib

  David Bucciarelli (tech.hmw@plus.it), autore dei driver 3Dfx per Mesa,
  ha scritto la libreria qkHack, che tenta di emulare tutte le funzioni
  SVGAlib/fxMesa usate da Quake e Quake II. Questo eliminerebbe la
  necessit di avere la SVGAlib quando si usa glquake o Quake II con la
  ref_gl.  Altre caratteristiche prese dal README di qkHacklib.



    Si pu passare dinamicamente tra il rendering a tutto schermo e
     quello dentro una finestra semplicemente premendo il tasto TAB (per
     usare questa caratteristica il server X deve essere inizializzato
     in modalit 16 bpp)


    Si pu usare Ctrl-C nella shell o uccidere il processo di Quake
     senza problemi


    si pu abilitare/disabilitare il `grabbing' da mouse e da tastiera
     premendo F11/F12


    si pu iconizzare e mettere in pausa Quake premendo F10 (non
     utilizzer pi cicli di CPU). Potete riavviare il tutto con un
     doppio click nell'icona "****"


    si pu utilizzare Quake con un qualsiasi driver Mesa (ad esempio
     con il driver X11, ma dovete ricompilare le Mesa senza il driver
     Voodoo)


    potete usare Quake in qualsiasi macchina Linux ed avere l'output
     dell'hardware accelerato su un box SGI (ok,  una caratteristica un
     po' esotica e teorica, ma  un esempio di quanto potente possa
     essere un'applicazione per GLX/OpenGL)


  Ho provato qkHacklib e funziona benissimo per Quake sul mio sistema.
  In Quake II, comunque, la risposta del mouse diventa veramente lenta.
  Altri hanno riportato per un successo completo, quindi provatelo se
  vi pare che vi possa essere utile.

  La pagina web di qkHacklib di David Bucciarelli  http://www-
  hmw.caribel.pisa.it/fxmesa/fxqkhack.html.


  4.6.  GiMd2Viewer

  GiMd2Viewer  un modello di Quake II scritto per le Gtk e le OpenGL da
  Lionel Ulmer (bbrox@mygale.org).  Carica modelli e textures sia da
  file semplici che da file .PAK. Anima anche i modelli (con
  interpolazione dei frame).

  Questo programma  ancora sotto sviluppo e non l'ho ancora provato, ma
  pare piuttosto carino. Cercatelo su
  http://www.mygale.org/~bbrox/GiMd2Viewer/.


  4.7.  QIPX

  QIPX  un insieme di programmi che permettono ai client di Quake per
  Linux (usando il TCP/IP) di connettersi a client Quake per DOS (usando
  IPX).  Penso che sia utile se giocate a netquake su una LAN. QIPX 
  disponibile a
  http://www.geocities.com/SiliconValley/Park/6083/qipx.html.


  4.8.  Ice

  Ice  un editor di mappe per Quake per UN*X, creato da C.J. Beyer e
  John Watson. Non ho usato questo programma, n so a che stadio di
  sviluppo sia.  La homepage  a http://styx.phy.vanderbilt.edu/~ice/.


  4.9.  Q2getty

  Q2getty  un clone di mingetty di Mike Gleason (mgleason@ncftp.com)
  che permette di usare e fare respawn automaticamente di un programma
  (come un server di Quake) su una console virtuale;  disponibile nella
  sezione dei file su http://www.ncftpd.com/unixstuff/q2getty.html.


  4.10.  rcon

  Rcon  un paio di strumenti che permettono l'amministrazione remota di
  un server di Quake II usando il protocollo RCON.  Michael Dwyer
  (michael_dwyer@mwiworks.com) ne  l'autore. Rcon 1.1  disponibile su
  http://sunsite.unc.edu/pub/Linux/games/quake/rcon-1.1.tar.gz".


  4.11.  qlog ++

  Qlog  un parser per i log dei server di QuakeWorld/Quake II
  distribuito sotto GPL, che genera delle statistiche globali sui
  giocatori. L'autore  Craig Knudsen (cknudsen@radix.net).  La homepage
  di qlog  http://www.radix.net/~cknudsen/qlog/.

  4.12.  Cheapo **

  Cheapo  un proxy che pu essere usato per fare il routing del
  traffico di una rete di QuakeWorld. Oltre a ci, il proxy pu
  modificare i dati ed ha caratteristiche per migliorare il gioco. Ci si
  pu connettere a cheapo come se fosse un server di QuakeWorld, e poi
  dargli comandi che facciano il forward ad un server reale. Il proxy
  pu anche essere usato su una macchina che faccia da firewall incapace
  di gestire il traffico di Quake, in modo che le macchine all'interno
  del firewall possano essere usate per giocare. La homepage di Cheapo 
  http://www.saunalahti.fi/~softech/.


  4.13.  qgraph **

  QGraph (Quake Graph)  un'utility per aiutare la gestione dei
  DeathMatch di Quake, i tornei ed i giochi di QuakeWorld.  QGraph  un
  programma che si connette (attraverso una LAN o Internet) ad un server
  di Quake, Quake II, QuakeWorld o Hexen 2, e mostra i dati in tempo
  reale del gioco corrente su quel server. La homepage di QGraph 
  http://www.frag.com/qgraph.



  5.  Risoluzione dei problemi/FAQ



  5.1.  Generalit



  5.1.1.  Considerazioni sulla differenza tra i sistemi operativi



    Distinzione tra maiuscole e minuscole - In DOS e Windows le
     maiuscole non sono importanti: BASE1.TXT  la stessa cosa di
     base1.txt.  Sotto Linux e gli altri Unix, le maiuscole SONO
     importanti: MOTD.TXT e motd.txt sono due file diversi; questo pu
     portare a dei problemi con i modelli dei giocatori ed i file della
     pelle se sono installati con i nomi di file con delle lettere
     maiuscole.  players/male/santa.PCX deve essere rinominato in
     santa.pcx per poter funzionare sotto Linux. Lo script fixskins.sh
     incluso in QuakeWorld converte tutti i nomi dei file di una
     directory in lettere minuscole. Per comodit viene riportato qui
     sotto:



     ___________________________________________________________________
          #!/bin/sh
          for x in *; do
             y=`echo $x | tr '[A-Z]' '[a-z]'`
             if [ $x != $y ]; then
                mv $x $y
             fi
          done

     ___________________________________________________________________






    Delimitatori dei percorsi - DOS e Windows usano il backslash "\"
     per separare gli elementi dei percorsi. In Unix, il backslash  un
     carattere di escape. Se usate dei percorsi nei vostri file di
     configurazione (o nel codice dei moduli, o da qualsiasi altra
     parte) assicuratevi di usare "/" e non "\".



    Caratteri di fine linea - Sotto DOS/Windows, ciascuna linea di un
     file di testo finisce con un carattere di carriage return (CR) e un
     carattere di linefeed (LF). I file di testo in Unix hanno solo il
     linefeed. L'uso di file di testo di DOS/Win in Unix pu causare
     molti problemi strani a Quake. Usando un file quake2.conf non
     correttamente formattato dal pacchetto di Quake2 3.17, ad esempio,
     d l'errore "LoadLibrary("ref_XXX.so") failed: No such file or
     directory".  LMCTF-TE riporta un'eccezione di floating point.  Se
     avete un problema che non riuscite a spiegare, provate a rimuovere
     i CR dai file di testo:



            mv file.txt file.bak; tr -d '\r' < file.bak > file.txt








  5.1.2.  Considerazioni su Glibc, RedHat 5.x, Debian 2**

  Le seguenti considerazioni si applicano solo ai binari per Quake I
  (squake, glquake, e quake.x11). QuakeWorld e Quake II sono disponibili
  in entrambe le versioni, libc5 e glibc, rispettivamente dalle versioni
  2.30 e 3.19.

  Gli eseguibili di Quake sono compilati con la libc5. Le distribuzioni
  pi recenti, come la RedHat 5.1 e la Debian 2.0, usano come libreria C
  di default la glibc, che non  compatibile.  Se usate Quake su un
  sistema glibc dovete fare attenzione ad alcune cose:



    Sia la RedHat 5 che la Debian 2 hanno dei pacchetti di
     compatibilit per libc5 che permettono di usare applicazioni basate
     su libc5.  Assicuratevi di aver installato questi pacchetti.
     Entrambe le distribuzioni hanno messo le librerie basate su libc5
     nella directory /usr/i486-linux-libc5/lib.


    Assicuratevi che Quake usi le librerie corrette. Create uno script
     come quello qui sotto che faccia puntare la variabile
     $LD_LIBRARY_PATH alla directory delle vostre librerie di
     compatibilit prima di usare Quake.


     ___________________________________________________________________
          #!/bin/sh
          export LD_LIBRARY_PATH=/usr/i486-linux-libc5/lib
          ./quake2 +set vid_ref gl $*

     ___________________________________________________________________



    Se dovete compilare una libreria come la SVGAlib o le Mesa per
     usarle con Quake, deve essere compilata con le libc5. Semplicemente
     compilare le nuove librerie seguendo le istruzioni di installazione
     vi dar una libreria linkata alle librerie di default, glibc.
     Assicuratevi che la nuova libreria sia linkata solo con la libc5 ed
     altre librerie ad essa linkate, in modo che sia compatibile con
     Quake. Controllate la documentazione della vostra distribuzione per
     avere delle informazioni su come linkare a librerie non di default.




  5.1.3.  Il mouse non funziona o sembra rispondere a caso.



    gpm funziona? gpm  un programma che permette di fare taglia e
     incolla con il mouse sulle console virtuali. Moltre distribuzioni
     lo abilitano per default. Potrebbe interferire con Quake.
     Controllate se sta girando con il seguente comando:



            ps aux | grep gpm





  Se avete dell'output come



            root      6115  0.0  0.4   832   316  ?  S   17:54   0:00 gpm -t PS/2





  gpm sta girando, ed interferisce con Quake. Date gpm -k (da root) per
  ucciderlo. Se non lo fa (gpm -k non sempre funziona sul mio sistema),
  uccidetelo con il comando killall gpm.

  Se non usate mai gpm, potreste voler evitare che parta all'avvio.
  Controllate la documentazione della vostra distribuzione per avere
  informazioni su come farlo.




    Il mouse  definito correttamente nel file libvga.config?  Questo
     file in genere si trova in /etc o in /etc/vga.  Apritelo e
     controllate se c' una linea simile a



            mouse Microsoft





  Sul mio sistema  la prima opzione del file. Assicuratevi che il tipo
  di mouse sia quello giusto per il vostro hardware.


  5.1.4.  Il mio Microsoft Intellimouse o il mio Logitech MouseMan+ non
  funziona.

  La SVGAlib, che gestisce l'input del mouse per i Quake/QW/Q2 SVGA e
  GL, non supporta direttamente l'Intellimouse fino alla versione 1.3.0.
  Se avete una versione della SVGAlib precedente alla 1.3.0 dovreste
  aggiornarla, e poi usare il tipo di mouse IntelliMouse (per i mouse
  seriali) o IMPS2 (per i mouse PS/2) nel file libvga.config.


  5.1.5.  Il mio mouse risponde in ritardo ed  molto pi lento che
  sotto Windows.



    Per molti basta aumentare il valore di sensitivity nella console di
     gioco cura il problema.  Impostare la sensitivity a mano nella
     console o in un file .cfg vi permette di aumentare la sensibilit
     del mouse pi dello slider nel men delle opzioni; ad esempio
     sensitivity 15.



    Dall'aggiornamento di Zoid del .plan del 1/7/98:


       Se il renderer GL  lento nel mostrare i video (se sembra
       che la velocit di successione dei frame sembra essere ral
       lentato dal movimento del mouse) digitate "gl_finish 1"
       sulla console. Questa opzione forza l'aggiornamento ogni
       frame.





    L'ultima versione delle SVGAlib (1.3.0) fornisce moltissimi
     parametri nel file libvga.config per personalizzare il
     comportamento del mouse. Con le impostazioni giuste dovrebbe essere
     possibile far comportare il mouse come volete. Sul mio sistema,
     cambiare mouse_accel_type al valore normal (il default  power) mi
     ha dato i risultati che volevo. Non ho giocato con le altre
     impostazioni, e non pretendo di sapere come funzionano.



  5.1.6.  Ho una Voodoo2, e quando provo ad usare il renderer gl, questo
  riporta che non ho una scheda Voodoo installata.

  Ci sono versioni diverse della Glide per le schede Voodoo e Voodoo 2.
  Assicuratevi di aver montato quella giusta.


  5.1.7.  Quando gioco con una delle versione di Quake sotto SVGAlib o
  GL e premo Ctrl-C, il gioco esce e talvolta lascia la console inuti
  lizzabile.

  5.1.8.  A volte quando Quake/Quake II esce non in modo corretto, las
  cia la console inutilizzabile.

  S, non  carino. La SVGAlib cattura il Ctrl-C e decide cosa farci
  invece di farlo gestire a Quake. Non conosco nessun modo per evitarlo,
  tranne modificando la SVGAlib.

  Se usate Quake da uno script che resetti la tastiera e il terminale,
  come questo qui sotto, avrete meno possibilit di finire con il
  terminale incasinato se succede.



  ______________________________________________________________________
       #!/bin/sh
       ./quake2 $*
       kbd_mode -a
       reset

  ______________________________________________________________________




  5.1.9.  squake/quake2 non parte e dice " svgalib: cannot get I/O per
  missions"

  Gli eseguibili di Quake devono girare come root, quindi dovete o farli
  girare come root o renderli setuid root. Controllate le istruzioni di
  installazione in questo documento per avere dettagli sull'argomento.


  5.1.10.  A volte, dopo avero giocato a una delle versioni di Quake su
  X, non funziona la ripetizione dei tasti.

  Per una qualche ragione, la versione per X11 di Quake disabilita la
  ripetizione dei tasti mentre sta girando; se per qualche motivo il
  programma esce in maniera non normale, questa non viene riattivata.
  Fate



            xset r on





  per riabilitarla.


  5.1.11.  Quake/Quake II dice "/dev/dsp : device not configured"

  L'hardware del suono non  configurato correttamente. Forse vi manca
  solo un insmod sound, o forse dovrete ricompilare il kernel. Gli
  utenti RedHat possono provare a richiamare il programma sndconfig(8).
  Controllate la documentazione della vostra distribuzione di Linux e/o
  il Linux Sound HOWTO per avere altre informazioni su come configurare
  il suono sul vostro sistema.


  5.1.12.  Quake/Quake II per GL girano pi lenti sotto Linux che sotto
  Windows. **

  Il miniport per Windows della GL per 3Dfx  ottimizzato pesantemente
  per quello che fa Quake II. Mesa, d'altra parte,  pi generale e meno
  ottimizzata. Come risultato Quake II sotto Linux gira pi lentamente
  che sotto Windows. Non  una limitazione di Linux, ma una dei driver.

  Con le uscite pi recenti di QuakeWorld e Quake II, il miniport per
  3Dfx citato prima  disponibile anche per Linux. Anche se non porta la
  performance di Quake per Linux allo stesso livello di quella di
  Windows,  un altro passo nella direzione giusta.


  Oltre a questo, per gli utenti di Pentium Pro e Pentium II, ci sono
  alcuni trucchi che si possono fare con il buffering della memoria -
  l'ultimo device driver per 3Dfx ha il supporto per farlo
  automaticamente. Abilitare gli MTRR pu velocizzare in modo
  significativo (10 fps sul mio sistema) GL Quake. Per informazioni pi
  dettagliate leggete http://glide.xxedgexx.com/MTRR.html.


  5.1.13.  Come posso far partire un server e scollegarmi, e poi
  tornarci pi tardi? **

  screen(1)  un'utility valida per questo genere di cose. Vi permette
  di creare molti schermi virtuali in una singola tty e di passare tra
  uno di essi ed un altro. Screen  compreso nella maggior parte delle
  distribuzioni, ma lo potete scaricare da ftp://prep.ai.mit.edu/pub/gnu
  o da qualsiasi mirror GNU.

  Inizializzate screen digitando il comando screen, poi create una nuova
  finestra premendo CTRL-A CTRL-C. Non vedrete molto mentre fate tutto
  ci, ma state tranquilli, qualcosa sta succedendo.

  Inizializzate il server di QuakeWorld:



            /usr/local/games/quake/qwsv





  Ora aprite una nuova finestra di screen con CTRL-A CTRL-C ed
  inizializzate il server di Quake II:



            /usr/local/games/quake2/quake2 +set dedicated 1





  Potete passare avanti ed indietro tra i server premendo CTRL-A CTRL-N.

  Premete CTRL-A CTRL-D per uscire dal programma. Screen ed i suoi
  server stanno ancora girando, ma non sono pi visibili nella finestra
  del terminale. Ora potete scollegarvi ed i processi continueranno a
  girare normalmente.

  Usate screen -r per ricollegarvi al processo di screen precedente ed
  accedere di nuovo ai server.

  Questo  tutto. Per avere altre informazioni leggete la pagina man di
  screen(1).



  5.2.  Quake/QuakeWorld


  5.2.1.  Quake muore all'avvio con un segmentation fault.

  In genere questo significa che il setup di rete non  corretto.
  Provate a fare partire Quake con l'opzione -noudp e vedete se l'errore
  si ripete. Se funziona, controllate il file /etc/hosts e verificate
  che ci sia una voce per la vostra macchina. Usate 127.0.0.1 come
  indirizzo IP se avete un accesso via modem che vi assegna un indirizzo
  diverso ogni volta che vi collegate.


  5.2.2.  Che differenza c' tra glqwcl , glqwcl.3dfxgl  e glqwcl.glx ?
  ++



    glqwcl   il client standard di QuakeWorld per GL che avete visto
     nelle versioni precedenti;  linkato con la libMesaGL.so.2.


    glqwcl.3dfxgl  uno script che avvia glqwcl dopo aver precaricato
     la libreria del miniport 3Dfx GL, lib3dfxgl.so.  Precaricare la
     libreria del miniport fa usare le funzioni della GL invece che
     quelle della Mesa. Dato che il miniport della GL  ottimizzato per
     Quake,  una buona cosa.


    glqwcl.glx  linkato con le librerie OpenGL standard invece che con
     le Mesa; questo permette a Quake di girare su altro hardware 3D
     supportato da altre implementazioni di OpenGL. Questa 
     un'applicazione X, e quindi deve essere usata da dentro X.



  5.2.3.  Quando uso glqwcl.glx  a tutto schermo da X, non riesco ad
  usare il mouse o la tastiera. ++


  Usate glqwcl.glx con l'opzione +_windowed_mouse 1.  QuakeWorld GLX
  gira in una finestra anche se sembra a tutto schermo. Se spostate il
  mouse mentre il Window Manager  in modalit focus-follow-mouse,
  probabilmente lo sposterete fuori della finestra, e allora Quake
  smette di rispondere all'input del mouse e della tastiera.
  +_windowed_mouse 1 fa gestire in esclusiva il mouse a QuakeWorld.


  5.3.  Quake II


  5.3.1.  Quando provo a usare Quake II con il renderer GL, non fun
  ziona, e dice: "LoadLibrary("ref_gl.so") failed: Unable to resolve
  symbol"

  Se subito prima della linea di "Unable to resolve symbol" avete dei
  messaggi come  "can't resolve symbol 'fxMesaCreateContext'", la
  libreria Mesa che avete installato non ha compilato il supporto per le
  glide. Vedere la sezione ``Il renderer GL'' nella sezione
  sull'installazione di Quake per avere delle informazioni su come
  installare le Mesa e glide.


  5.3.2.  Quake II muore con l'errore LoadLibrary("ref_XXX.so") failed:
  No such file or directory



    /etc/quake2.conf non ha il percorso giusto per la directory di
     Quake II. Questo file dovrebbe contenere una linea con la directory
     in cui risiede Quake II.




    Se /etc/quake2.conf contiene il percorso per la directory, provate
     a rimuovere il file ed a ricrearlo a mano. Alcune versioni di Quake
     II per Linux includevano un file quake2.conf formattato male.



    Avete le SVGAlib installate? Controllate in /lib, /usr/lib e
     /usr/local/lib, se c' il file libvga.so.1.X.X, in cui al posto
     delle X ci sono dei numeri.  Se non lo trovate, dovete prendere ed
     installare la SVGAlib per poter usare Quake II fuori di X.



    Se il renderer in questione  ref_gl.so, forse non avete installato
     correttamente le Mesa. Avete copiato libMesaGL.so.2.6 nella
     directory delle librerie come scritto nelle istruzioni di
     installazione?



    Se il renderer in questione  ref_gl.so, avete installato le
     librerie glide?



  5.3.3.  Quando aggiusto la luminosit mentre uso il renderer GL e
  premo "apply", non succede niente!

  Digitate vid_restart nella console per fare attivare le modifiche.


  5.3.4.  Note sulla distribuzione 3.17

  Nel momento in cui sto scrivendo, la versione di Quake II pi recente
   la 3.19. Se per qualche ragione state usando la versione 3.17, vi
  potrebbero essere utili le seguenti informazioni.

  Due file di testo (quake2.conf e fixperms.sh) della versione 3.17 sono
  stati salvati inavvertitamente nel formato di testo MS-DOS CR/LF
  invece che nel formato Unix LF, cio alla fine di ciascuna linea di
  questi file c' un carattere di carriage return in pi, e non
  funzioneranno bene finch non risolverete questo problema.

  Usate tr(1) per togliere i CR.




            for i in fixperms.sh quake2.conf
            do
            mv $i $i.bak
            tr -d '\r' < $i.bak > $i
            done






  5.3.5.  Quando uso Quake II con l'opzione +set vid_ref glx  a tutto
  schermo da X, non riesco ad usare il mouse o la tastiera. ++

  Usate quake2 GLX con l'opzione +set _windowed_mouse 1.  Quake2 GLX
  gira in una finestra anche se sembra prendere tutto lo schermo.  Se
  spostate il mouse mentre il window manager  in modalit focus-follow-
  mouse,  possibile che spostiate il puntatore fuori della finestra, e
  allora Quake II non risponder pi all'input del mouse e della
  tastiera. L'opzione +set _windowed_mouse 1 fa usare solo a Quake II
  l'input del mouse.


  5.3.6.  Perch non posso passare ad alcune delle modalit SVGA che
  sono nel men Video di Quake II? **

  La SVGAlib probabilmente non sa come ricreare le modalit sulla vostra
  scheda. Quando Quake II parte con il renderer SVGA (ref_soft.so),
  stampa un elenco di tutti i modi che la SVGAlib ha disponibili:



            ------- Loading ref_soft.so -------
            Using RIVA 128 driver, 4096KB.
            mode 320: 200 1075253220
            mode 320: 240 1075253220
            mode 320: 400 1075253220
            mode 360: 480 1075253220
            mode 640: 480 1075253220
            mode 800: 600 1075253220
            mode 1024: 768 1075253220
            mode 1280: 1024 1075253220





  Questi sono i soli modi tra cui potete passare con successo dal men
  Video. Se ad esempio 512x384 non  sulla lista, sceglierlo dal men
  video non funziona.

  La SVGAlib vi fa definire delle nuove modalit video per alcuni
  chipset in libvga.config, in modo che possiate creare da soli le
  vostre modalit video. Controllate la documentazione della SVGAlib per
  altri dettagli su questo argomento.


  6.  Tips & Tricks




  6.1.  Utilizzare i giochi per X e GL senza setuid

  Se usate solo le versioni X e GL di Quake, QuakeWorld o Quake II, non
  avete bisogno di usarle con permessi di root. La SVGA  l'unica
  modalit in cui serve. Le versioni da X hanno bisogno solo
  dell'accesso a /dev/dsp, il dispositivo per il suono, alle versioni GL
  serve anche accesso alla scheda 3Dfx.

  /dev/dsp deve essere leggibile e scrivibile da Quake. La maggior parte
  delle distribuzioni gli danno per default i permessi 662 (rw-rw--w-).
  La soluzione pi semplice  di fare chmod 666 /dev/dsp.  Sulla maggior
  parte dei sistemi la possibilit di leggere dal device del suono non
  dar un buco di sicurezza significativo. Se per voi questo approccio
  non  accettabile, create un gruppo a cui farete appartenere /dev/dsp,
  e rendete i giocatori di Quake membri di questo gruppo.

  Per utilizzare le applicazioni glide (come GLQuake) non da root vi
  serve  il driver /dev/3dfx dalla pagina di glide di Daryll Strauss
  (http://glide.xxedgexx.com/3DfxRPMS.html).  Scaricate il pacchetto
  Device3Dfx.xxx.rpm ed installatelo seguendo le istruzioni sulla pagina
  web. Dopo aver installato il driver, assicuratevi che /dev/3dfx ha
  permessi 666 (chmod 666 /dev/3dfx).
  Quando /dev/dsp e /dev/3dfx sono impostati correttamente, potete
  rimuovere il bit setuid dagli eseguibili di Quake/QW/Q2. Da root fate
  chmod 0755 XXXXX, dove XXXXX  glquake quake.x11, o quake2.

  Se avete giocato da root prima di fare queste modifiche, molti dei
  file di Quake (come i file di salvataggio) potrebbero appartenere
  all'utente root, e quindi possono essere inaccessibili ad un utente
  normale, quindi ricordatevi di modificare il proprietario dei file
  prima di provare a giocare non da root.


  6.2.  Usare le versioni SVGA e GL da X**

  I client di QuakeWorld e Quake II per GLX sono applicazioni X native,
  ma dato che usano le Mesa invece che il mini-driver 3Dfx, sono pi
  lenti delle versioni lib3dfxgl.so. Per questa ragione forse
  preferirete ancora questo modo di inizializzare i giochi da X usando i
  client GLX.

  La parte seguente  basata su uno dei 2 Cent Tip di Joey Hess della
  Linux Gazette (joey@kite.ml.org). L'originale si trova su
  http://www.ssc.com/lg/issue20/lg_tips20.html#squake.

  S,  possibile usare Quake da X se siete root, ma non  un buon
  comportamento, e rischiate che Quake crashi e lascino la console che
  non risponde. Con un po' di lavoro potete fare in modo di poter
  giocare come utente normale usando i Quake SVGA e GL da X E passare
  automaticamente a X quando il programma finisce, sia che usciate
  normalmente che non lo facciate.

  Nota: quando dico "Quake" nel testo qui sotto, voglio dire "quake,
  glquake squake, qwcl, glqwcl, qwcl.x11 o quake2".



    Per prima cosa vi serve il pacchetto open(1) di Jon Tombs.  Si
     tratta di due programmi molto piccoli che vi permettono di passare
     tra le console virtuali e farci girare dei programmi. Scaricateli
     da http://sunsite.unc.edu/pub/Linux/utils/console/. Non dovrete
     fare molto pi che make;make install per compilarli ed installarli.
     Una volta installati, dovrete rendere gli eseguibili open e
     switchto setuid root.  Fate cos:



            cd /usr/local/bin
            chown root open switchto
            chmod 4755 open switchto








    Poi salvate il codice qui sotto nel file getvc.c:









     ___________________________________________________________________
             /* getvc.c
              * Prints the number of the current VC to stdout. Most of this code
              * was ripped from the open program, and this code is GPL'd
              *
              * Joey Hess, Fri Apr  4 14:58:50 EST 1997
              */

              #include <sys/vt.h>
              #include <fcntl.h>

              main () {
                int fd = 0;
                struct vt_stat vt;

                if ((fd = open("/dev/console",O_WRONLY,0)) < 0) {
                  perror("Failed to open /dev/console\n");
                  return(2);
                }
                if (ioctl(fd, VT_GETSTATE, &vt) < 0) {
                  perror("can't get VTstate\n");
                  close(fd);
                  return(4);
                }
                printf("%d\n",vt.v_active);
              }

              /* End of getvc.c */

     ___________________________________________________________________


  Compilatelo ed installatelo da qualche parte nel $PATH:



            gcc getvc.c -o getvc
            strip getvc
            mv getvc /usr/local/bin








    Ora create lo script runvc:


     ___________________________________________________________________
          #!/bin/sh
          # Run something on a VC, from X, and switch back to X when done.
          # GPL Joey Hess, Thu, 10 Jul 1997 23:27:08 -0400
          exec open -s -- sh -c "$* ; chvt `getvc`"

     ___________________________________________________________________


  Rendetelo eseguibile e mettetelo da qualche parte nel $PATH:






       chmod 755 runvc
       mv runvc /usr/local/bin






  Ora potete usare il comando runvc per cominciare a giocare a Quake.
  Continuate ad usare qualsiasi linea di comando che usate per il gioco,
  ma metteteci all'inizio runvc:



            runvc ./quake2 +set vid_ref gl +connect quake.foo.com





  Passerete automaticamente ad una console virtuale, giocherete a Quake
  e poi quando ha finito passerete di nuovo a X!




  6.3.  Mantenere il mouse dentro la finestra in X

  Dal file readme.linux di Quake II:


       Per default, il mouse non sar "legato" alla finestra di
       Quake2.  Per farglielo catturare, selezionate "Windowed
       Mouse" dal men video, o digitate '_windowed_mouse 0' sulla
       console. Fate il contrario per lasciarlo. Potete creare una
       scorciatoia da tastiera per catturare e lasciare il mouse
       cos: bind i "_windowed_mouse 1" bind o "_windowed_mouse 0"
       In questo modo "i" catturer il mouse e "o" lo rilascer.




  6.4.  Le impostazioni "trucchettose " di 3Dfx funzionano anche in
  Linux

  Potreste avere sentito parlare o visto modi di modificare la
  performance delle OpenGL di Quake impostando diverse variabili
  d'ambiente.  Queste variabili sono valide nello stesso modo sotto
  Linux, soltanto si impostano in un modo leggermente diverso. Se una
  guida per Windows/DOS vi dice di fare:



            SET SST_GRXCLK=59





  Sotto Linux dovete fare cos:



            export SST_GRXCLK=59


  6.5.  Il browser del server del poveraccio

  Joe S. (jszabo@eden.rutgers.edu) suggerisce:



            un trucco che faccio con qstat:
            Faccio un file con i miei server preferiti, poi fate
            qstat -f /C/quake2/file.txt | less





  premete Ctrl-z per sospendere, poi copiate gli indirizzi IP o i nomi
  degli host con gpm sulla linea di comando, cos:




            ./quake2 +connect expert.eqclans.com





  Poi potete usare fg per tornare alla lista pi tardi...


  6.6.  Usare le lib3dfxgl.so  per Quake I**

  Potete usare il mini-driver 3Dfx (lib3dfxgl.so) da Quakeworld o da
  Quake II anche con glquake. Copiate semplicemente gli script
  glqwcl.3dfxgl o quake2.3dfxgl in un nuovo file, ad esempio
  glquake.3dfxgl; poi copiate lo script glquake.3dfxgl in modo che usi
  glquake invece di glqwcl.  Anche in questo caso si applicano le stesse
  restrizioni per l'uso da root, come anche le differenze tra libc5 e
  glibc.  Vedere le sezioni ``Quakeworld'' o ``Quake II'' per avere
  altre informazioni su lib3dfxgl.so.


  7.  Administrivia



  7.1.  Nuove versioni di questo documento

  Le nuove versioni di questo documento verranno postate periodicamente
  in comp.os.linux.answers e in  rec.games.computer.quake.misc.  Saranno
  anche inserite nei vari siti WWW e FTP, compresa la home page di LDP.

  Le nuove versioni di questo documento saranno periodicamente postate
  in rec.games.computer.quake.misc e in comp.os.linux.misc.

  L'ultima versione del Linux Quake HOWTO pu sempre essere trovata nei
  seguenti siti:



    http://www.linuxquake.com/


    http://webpages.mr.net/bobz/



    http://www.linuxgames.com/quake



  7.2.  Altri formati di questo documento


  Questo documento  disponibile in una gran variet di formati diversi;
  molti pi di quanto servono, in realt. Li potete trovare in
  http://www.linuxquake.com/howto/other-formats.


    testo ASCII


    testo ASCII con backspace-overstrikes per poter essere visualizzato
     com man(1)


    HTML gi zippato e pronto per essere inserito nel vostro sito web


    Postscript


    PRC per poter essere visualizzato sul Palm Pilot con Aportis Doc


    SGML


    LaTeX


    Tutto quello elencato sopra, in un solo pacchetto



  7.3.  Policy di distribuzione


  Copyright (c) 1998, di Bob Zimbinski, Brett A. Thomas e Mike Hallock.
  Questo documento pu essere distribuito sotto i termini descritti
  nella licenza LDP a sunsite.unc.edu/LDP/COPYRIGHT.html.

  Questo HOWTO  documentazione libera, e pu essere ridistribuita e/o
  modificata sotto i termini della licenza LDP. Questo documento viene
  distribuito con la speranza che serva, ma senza alcuna garanzia; senza
  neanche la garanzia implicita di essere vendibile o adatto ad un
  particolare scopo. Beh, anche se questo documento vi uccide il cane,
  non  colpa mia.

  Vedere la licenza LDP per ulteriori dettagli.


  7.4.  Storia delle revisioni

  Le sezioni di questo documento che sono state aggiornate nell'ultima
  revisione hanno un ** dopo il titolo. Le sezioni aggiornate nella
  revisione precedente sono contrassegnate da ++.

  Qui sotto  riportata la storia completa delle revisioni di questo
  documento. Non  stata concepita per essere utile a nessuno, tranne
  che agli autori (per questo non viene tradotta :-) n.d.t.) .


  ______________________________________________________________________
       $Log: Quake-HOWTO.sgml,v $
       Revision 1.0.1.15  1998/10/05 21:09:42  bobz
       Fixed a few typos and spelling errors that I missed last time around

       Revision 1.0.1.14  1998/10/05 19:54:17  bobz
       Removed the long-dead LinQuake page from list of Linux Quake sites
       Removed renaissoft.com link
       Minor wording changes throughout
       Added link to svgalib libc5 binary
       Added info about q2 demo
       Updated q2 installation info for the 3.19 release
       moved section about 3.17 textfile problems to the troubleshooting section
       Added part about lib3dfxgl.so to QW section
       Added part about GLX client to QW section
       Added part about lib3dfxgl.so to Q2 section
       Added part about GLX client to Q2 section
       Updated "slower than windows" FAQ
       Removed obsolete TS tip about glibc & q2
       Removed obsolete TS tip about playing w/CD mounted
       Changed tip about running glquake with lib3dfxgl.so
       Added instructions for Q2 mission pack 2
       Added pointer to svgalib libc5 binary
       Added FAQ about svgalib modes in Q2
       Added Cheapo proxy to software section
       Added screen FAQ
       Added qgraph to  software sectoin
       Decided I was lying when I promised a 3Dfx tweak section in the next update

       Revision 1.0.1.13  1998/09/02 01:35:18  bobz
       Fixed some broken url links
       Restored <author> tag
       added an acknowledgement
       added a reminder to the non-root tip
       added qlog listing

       Revision 1.0.1.12  1998/08/30 21:35:23  bobz
       Updated QuakeWorld install section for 2.30 release
       Updated QW file list
       Updated Quake 1.01 install info per email suggestion
       Added QW 2.30 caveat to "Glibc considerations" section
       Updated linux vs. windows speed section for new 3dfx miniport
       Added glqwcl versions FAQ
       Added troubleshooting tip about windows focus and glx
       Added a sentence about /dev/3dfx permissions
       Made runvc script usage clearer
       Added tip about using mini-driver with Quake & QuakeII

       Revision 1.0.1.11  1998/08/15 19:28:49  bobz
       Added glibc topic in Troubleshooting/FAQ section
       Moved non-setuid info to Tips & Tricks section
       Moved rcs log into Revision Hist section
       Changed distribution info a little until LDP wakes up
       Changed references to quake.medina.net to www.linuxquake.com
       Added linuxgames.com to list of places to get current version
       Changed 3dfx Howto pointer
       Moved explanation of change markings (** and ++) to intro section where they'll be noticed
       Mentioned zoid's GL driver port in the Win vs Linux FAQ
       Fixed credit and URL in q2getty

       Revision 1.0.1.10  1998/08/07 19:07:02  bobz
       Changed XQF url
       Added comments to the revision history section
       Started marking changed sections
       Added OS Considerations to troubleshooting section
       Added rcon to Other Software section
       Added ICE to Other Software section

       Revision 1.0.1.9  1998/08/04 21:06:22  bobz
       Updated Acknowledgements
       Added discussion of Quake security
       Added QIPX to "Related Software"
       Added ts topic about -noudp

       Revision 1.0.1.8  1998/08/03 22:09:28  bobz
       Updated and restructured the q2 mods section
       Minor change to gpm troubleshooting info
       Changed sound ts info
       Changed intellimouse ts info

       Revision 1.0.1.7  1998/08/03 04:55:21  mikeh
       Added "Playing" section of Q2 Mods & Addons section.
       Added "Intelimouse" section of Troubleshooting section
       Added RedHat sndconfig part to Troubleshooting section
       Fixed a few spacing problems, and one error message

       Revision 1.0.1.6  1998/08/03 02:01:13  bobz
       Changed abstract.

       Revision 1.0.1.5  1998/07/31 16:07:11  bobz
       Added gpm -k mention in mouse troubleshooting
       mentioned 'sensitivity' in mouse lag troubleshooting
       Added qstat|less tip
       Added "/dev/dsp not configured" to troubleshooting
       Slightly reworded part of the mod compiling section
       Added bit about running mods server side
       corrected required version # in q2 mission pack 1
       Updated acknowledgements section

       Revision 1.0.1.4  1998/07/30 21:08:46  bobz
       Fixed a problem with broken lines in <sect> tags

       Revision 1.0.1.3  1998/07/30 17:40:29  bobz
       Fixed broken link to Latex version.

       Revision 1.0.1.2  1998/07/30 15:46:40  bobz
       Test update.

       Revision 1.0.1.1  1998/07/30 15:43:59  bobz
       Changed version numbering scheme.

       Revision 1.10  1998/07/30 13:51:24  bobz
       Minor version reporting change

       Revision 1.9  1998/07/29 20:42:03  bobz
       Added some server links

       Revision 1.8  1998/07/29 17:37:15  bobz
       Added a Quake II model viewer to the Other Programs section

       Revision 1.7  1998/07/29 16:02:23  bobz
       Added some relative links in Other Formats to make it
       more portable.

       Revision 1.6  1998/07/29 15:18:12  bobz
       Version and date stamps back to the way they were

       Revision 1.5  1998/07/29 14:52:03  bobz
       Added tags for automatic timestamping

       Revision 1.4  1998/07/29 13:17:51  bobz
       Changed captured.com's web address per webmaster's request
       Revision 1.3  1998/07/29 02:11:02  bobz
       Ooops again.  Made "Other formats" a <sect> instead of a <sect1>.

       Revision 1.2  1998/07/29 01:55:41  bobz
       Oops.  I deleted the doctype tag...

       Revision 1.1  1998/07/29 01:48:34  bobz
       Added Other Formats section.
       Changed acknowledgments slightly
       Added ftp.medina.net to list of ftp sites.

       Revision 1.0 1998/07/28
       First publicly released version

       Revision 0.9 1998/07/25
       Restructured,rewritten and expanded by Bob Zimbinski.

       Revision 0.01 1998/06/16
       First Pre-Release version v0.01by Brett A. Thomas and Mike Hallock.

  ______________________________________________________________________













































Questa directory contiene i documenti Linux HOWTO. Il file HOWTO-INDEX d 
una panoramica pi dettagliata e un indice degli HOWTO.

Le versioni in solo testo degli HOWTO sono poste in questa directory. Nelle 
directory dvi, html, ps ed sgml sono poste rispettivamente le versioni DVI,
HTML, PostScript ed SGML degli HOWTO. La directory mini contiene mini-HOWTO,
brevi HOWTO su argomenti specifici. 

La directory distributions contiene la distribuzione corrente delle versioni
HTML delle traduzioni in pacchetti per Debian, Red Hat e Slackware. 
NB: leggere in README l contenuto se si utilizza la versione per Red Hat e
Slackware del pacchetto.

Vedere il file COPYRIGHT per una descrizione del copyright degli HOWTO. 

Si possono anche leggere gli HOWTO all'URL:
http://www.pluto.linux.it/ildp/HOWTO/index.html e nei vari mirror di ILDP. 

Contattare Tim Bynum (il coordinatore HOWTO) via email a
linux-howto@metalab.unc.edu per ogni domanda o suggerimento. Per le versioni
italiane degli HOWTO rivolgersi a Giovanni Bortolozzo (borto@pluto.linux.it)
o Eugenia Franzoni (eugenia@stud.unipg.it).

CHI VOLESSE COLLABORARE CON LA TRADUZIONE/MANUTENZIONE DEGLI HOWTO pu
contattare le persone sopra elencate e iscriversi alla mailing list
pluto-ildp@pluto.linux.it (mail a majordomo@pluto.linux.it con la parola
"subscribe" nel corpo del messaggio).

  The Linux Reading List HOWTO
  di Eric S. Raymond
  v1.11, 23 marzo 2000

  Questo documento elenca i libri che penso siano i pi validi per una
  persona che provi ad imparare Unix (in particolare Linux) partendo dai
  concetti generali.  Traduzione di Giovanni Bortolozzo (borto at
  pluto.linux.it).

  1.  Introduzione


  1.1.  Scopo di questo documento

  Questo documento elenca quello che io considero essere libri di
  riferimento essenziali per imparare Unix (specialmente Linux) e a
  programmare in esso.


  1.2.  Nuove versioni di questo documento

  Le nuove versioni del Linux Reading List HOWTO saranno postate
  periodicamente su comp.os.linux.answers.  Ne sar inoltre fatto
  l'upload ai tanti siti WWW e FTP su Linux, tra cui la home page di
  LDP.

  L'ultima versione la si pu consultare nel World Wide Web a questo URL
  <http://sunsite.unc.edu/LDP/HOWTO/Reading-List-HOWTO.html>.


  1.3.  Commenti e correzioni

  Se si hanno domande o commenti su questo documento (o semplicemente si
  vuole suggerire un libro che si pensa ci dovrebbe essere), si invii
  liberamente una mail a Eric S. Raymond, a esr@thyrsus.com. Qualsiasi
  suggerimento o critica sar il benvenuto.


  1.4.  Risorse correlate

  Per HOWTO, riviste e altro materiale in linea, si veda la home page
  del Linux Documentation Project <http://sunsite.unc.edu/LDP/HOWTO>.

  Alcuni anni fa ho scritto una bibliografia Unix meno incentrata su
  Linux che potrebbe ancora essere di un qualche interesse, oltre a
  essere un po' divertente.  La Loginataka la si pu trovare a
  <http://www.tuxedo.org/~esr/faqs/loginataka.html>.

  SAGE, il System Administrator's Guild, mantiene un elenco eccellente
  di libri importanti a
  <http://www.usenix.org/sage/sysadmins/books/booklist.html>.



  1.5.  Convenzioni usate in questo documento

  I commenti non tra virgolette o sono miei, oppure non ho trovato
  nessun motivo di cambiare quelli originali di Jim Haynes (il
  manutentore precedente di questo documento). Commenti inviati da altri
  sono tra virgolette e sono preceduti dal nome del rispettivo autore
  (JH  Jim Haynes).

  Gli URL Si veda annessi alle informazioni di pubblicazione puntano
  direttamente al catalogo web dell'editore e tipicamente conducono ad
  una pagina contenente una foto della copertina, fascette pubblicitarie
  e informazioni per l'ordine.  Alcuni libri non hanno questo link
  poich l'editore usa i frame e non  possibile fare un bookmark delle
  pagine del catalogo.

  Le aree elencante partono a grandi linee dalle cose pi generali fino
  a quelle pi specifiche (dalla cultura alla programmazione utente, per
  passare poi alla programmazione del kernel fino all'hardware).  Nelle
  varie sezioni ho provato a elencare per primi i libri pi utili e con
  i quali ho pi familiarit.  Onestamente,  solamente un'imbarazzante
  coicidenza che un mio libro appaia per primo in questo elenco! (Sono
  ben accetti suggerimenti per una migliore organizzazione.)

  2.  Libri su cultura, storia e pragmatica


     The New Hacker's Dictionary (Third Edition)
        Raymond, Eric S.; MIT Press; 1996; ISBN 0-262-68092-0; 547pp.
        Si veda  <http://www-mitpress.mit.edu/book-
        home.tcl?isbn=0262680920>.

        Ehm... Una guida alla cultura di Internet. Piace ad un sacco di
        gente. Versione HTML nella Jargon File Resource Page
        <http://www.tuxedo.org>.


     A Quarter Century of Unix
        Salus, Peter H.; Addison-Wesley; 1994; ISBN 0-201-54777-5;
        256pp.
        Si veda  <http://www.awl-he.com/titles/13683.html>

        Linux  parte della tradizione Unix. Questo libro  la storia di
        Unix -- come  nato, com' evoluto, come si  diffuso --
        raccontata da chi c'era.


     The Mythical Man Month (Anniversary Edition)
        Brooks, Frederick P.; Addison-Wesley 1995 (ISBN 0-201-83595-9).
        Si veda  <http://www.awl-he.com/titles/14147.html>.

        Il libro sull'ingegneria del software che tutti dovrebbero
        leggere.

        Alan Cox: Lo raccomando non per il suo valore tecnico, bens
        per come applica il comune buon senso e realismo ai progetti
        software. JH: Ah, s.  Quello che si sarebbe dovuto fare se
        Linus avesse auto a disposizione 200 programmatori e avesso
        voluto produrre Linux in 3 mesi!


     Bell System Technical Journal, July-August 1978, Vol. 57, No. 6,
        part 2
        AT&T; 416 pp.

        Alcuni dei primi articoli su Unix, tra cui Ritchie & Thompson,
        The UNIX Time Sharing System; Thompson, UNIX Implementation;
        Ritchie, A Retrospective; Bourne, The UNIX Shell...

  3.  Libri su Unix/Linux in generale



  3.1.  Installazione ed amministrazione di Linux


     Linux Installation and Getting Started
        Welsh, Matt; LDP; 1997.  Disponibile nella home page di LDP,
        oppure direttamente a  <http://www.linuxdoc.org/LDP/gs/>.
        Come far funzionare Linux.  Spiega un sacco di concetti basilari
        su Linux.  Tratta alcune nozioni basilari di amministrazione di
        sistema.


     Linux System Administrator's Guide
        Wirzenius, Lars; LDP; 1997.  Disponibile nella home page di LDP,
        oppure direttamente a  <http://www.linuxdoc.org/LDP/sag>.

        Un eccellente libro di partenza su come mantenere ed
        amministrare un sistema Linux.


     Essential System Administration (Second Edition)
        Frisch, Aeleen; O'Reilly; 1995; ISBN 1-56592-127-5; $34.95.
        Si veda  <http://www.ora.com/catalog/esa2/noframes.html>.

        Trattazione pi approfondita dei normali task di amministrazione
        di sistema.  Non specifico su Linux sebbene contenga materiale
        su Linux.


  3.2.  Usare Unix & Linux


     Linux in a Nutshell (2nd edition)
        Hekman, Jessica P. et al.; O'Reilly; ISBN 1-56592-585-8,; 1999;
        628 pp. $29.95.
        Si veda  <http://www.oreilly.com/catalog/linuxnut2/>.

        Secondo O'Reilly, La guida di riferimento per Linux.  Dedicata
        agli utenti di Linux, rende obsoleto il loro Unix In a
        Nutshell che era pi orientato a SVr4/Solaris.


     Running Linux (Third Edition)
        Welsh, Matt, & Matthias Kallw Dalheimer & Kaufman, Lar;
        O'Reilly; ISBN 1-56592-469-X; 1999; 650pp; $34.95.
        Si veda  <http://www.oreilly.com/catalog/runux3/>.

        Tutto quello che si deve sapere per poter capire, installare e
        usare il sistema operativo Linux.  Un libro eccellente per
        novizi.


     Hands-on-Linux
        Sobell, Mark G.; Addison-Wesley; ISBN ISBN 0-201-32569-1; 1998;
        1015 pp.

        Semplicemente quel che dice il titolo -- lezioni pratiche sui
        fondamenti di Unix, shell, editor, programmi per la posta,
        networking, strumenti per il Web ed utilit varie. Tratta alcuni
        fondamenti di amministrazione di sistema (questa sembra essere
        un nuovo formato del ``A Practical Guide to Linux'' del 1997 da
        parte degli stessi autori, senza una copia di Caldera OpenLinux
        Lite)



  3.3.  Sicurezza di sistema


     Practical Unix and Internet Security (2nd Edition)
        Garfinkel, Simpson, and Spafford, Gene; O'Reilly Associates;
        ISBN 0-56592-148-8; 1004pp; 1996; $39.95.
        Si veda  <http://www.ora.com/catalog/puis/noframes.html>.
        Ronald P. Miller: Qualche sovrapposizione con Essential System
        Admin., ma in fin dei conti un buon libro sulla sicurezza,
        specialmente per quanti aspirano a permettere l'accesso alle
        proprie macchine Linux da parte di pi utenti sia in dial-up che
        attraverso la rete.


     Firewalls & Internet Security
        Cheswick, William R. & Bellovin, Steven M.; Addison-Wesley;
        1994; ISBN 0-201-63357-4; 320pp.

  4.  Libri su shell, script e programmazione Web


     Programming Perl (Second Edition)
        Wall, Larry & Christiansen, Tom & Schwartz, Randal; O'Reilly;
        1997; ISBN 0-56592-149-6; 644pp.
        Si veda  <http://www.ora.com/catalog/pperl2/noframes.html>.

        La shell (come linguaggio di programmazione per script appena un
        pelino complessi)  morta.  Perl ha preso il suo posto.  Questa
         la seconda edizione del libro definitivo su Perl -- molto
        meglio organizzato del precedente e tratta Perl 5.

        Emmanuel Pierre mantiene un breve elenco di libri sul  Perl
        <www.e-nef.com/perl/listeperl.html>.


     Programming Python
        Lutz, Mark; O'Reilly; 1997; ISBN 0-56592-197-6; 880pp.
        Si veda  <http://www.ora.com/catalog/python/noframes.html>.

        Il passo successivo al Perl.  Python  spendidamente progettato,
        ha una migliore integrazione con C, ed  meglio scalabile per
        problemi di grosse dimensioni.


     HTML: The Definitive Guide (3nd Edition)
        Musciano, Chuck & Kennedy. Bill; O'Reilly; 1998; ISBN
        1-56592-492-4; 576pp.
        Si veda  <http://www.oreilly.com/catalog/html3/>.

        La migliore guida/riferimento di HTML che ho mai visto, ed  il
        solo libro su HTML di cui si avr bisogno finch non si voglia
        usare CGI.


     The Unix Programming Environment
        Kernighan, Brian, and Pike, Rob; Prentice-Hall; 1984; ISBN
        0-13-937681-X; 1984.

        Un vero classico -- se possibile la miglior esposizione in un
        unico libro della filosofia di Unix.

  5.  Libri sulla formattazione testi


  5.1.  Tex e LaTeX



     The LaTeX Companion
        Goossens, Michael & Mittlebach, Frank, & Samarin, Alexander;
        Addison-Wesley; 1994; ISBN 0-201-54199-8; 530pp.
        Si veda  <http://www.awl-he.com/titles/13661.html>.

        Dalla Prefazione: Se sei uno di quegli utenti a cui piacerebbe
        sapere come LaTeX pu essere esteso per creare i documenti pi
        belli possibile senza diventare un guru di (La)TeX, allora
        questo libro fa proprio per te.  Bruce Thompson aggiunge: Un
        libro veramente molto bello che fornisce un sacco di
        informazioni sulle nuove estensioni del LaTeX e moltissimi
        esempi che mostrano precisamente come il layout del proprio
        documento pu essere manipolato.


     LaTeX: A Document Preparation System (Second Edition)
        Lamport, Leslie; Addison-Wesley; 1994; ISBN 0-201-52983-1;
        256pp.
        Si veda  <http://www.awl-he.com/titles/13632.html>.

        Bruce Thompson: Il riferimento definitivo su LaTeX 2.09 ad
        opera del suo autore.  Una nuova edizione che tratta il LaTeX2e
        (la versione attualmente inclusa nelle distribuzioni di
        TeX/LaTeX)  in preparazione.  LaTeX 2.09  pienamente
        supportato da LaTeX2e.  Un must per quanti vogliono usare LaTeX.
        Fornisce una introduzione graduale alla preparazione dei
        documenti e ai diversi strumenti che LaTeX mette a disposizione
        per produrre documenti di qualit professionale.  Moltissimi
        esempi.


     The TeXbook, Volume A of Computers and Typesetting; Knuth, Donald
        A.
        Addison-Wesley; 1986, ISBN 0-201-13448; 496pp.  Si veda
        <http://www.awl.com/cp/TeXbook.html>

        Bruce Thompson: La guida utente definitiva ed il manuale di
        riferimento completo per TeX.  Probabilmente non serve per il
        normale uso di LaTeX, ma resta comunque un libro molto
        affascinante.  Voglio sottilineare che questo libro non  per
        deboli di cuore.


     The METAFONT book, Volume C of Computers and Typesetting
        Knuth, Donald A.; Addison-Wesley; 1986; 0-201-13444-6, 1986;
        384pp.
        Si veda  <http://www.awl.com/cp/METAFONTbook.html>

        Bruce Thompson: La guida utente definitiva ed il manuale di
        riferimento completo per METAFONT, il programma di supporto a
        TeX per la creazione dei font.  Un eccellente lavoro se si ha
        intenzione di sviluppare dei propri font per l'uso in TeX e
        LaTeX.  METAFONT  incluso nelle normali distribuzioni di
        TeX/LaTeX.  Questo libro non  veramente per i deboli di cuore.

  6.  Buone norme/stili di programmazione


  Quelli che seguono sono testi classici su come sviluppare programmi
  efficienti:


     The Practice of Programming
        Kernighan, Brian W. & Pike. Rob; 1999; Addison-Wesley; ISBN
        0-201-61586-X.  Si veda  <http://cm.bell-labs.com/cm/cs/tpop/>

        Un eccellente trattato sulla scrittura di programmi di alta
        qualit. sicuramente destinato a diventare un classico in questo
        campo.


     Programming Pearls (2nd Edition)
        Bentley, Jon; 2000; Addison-Wesley; ISBN ISBN 0-201-65788-0.  Si
        veda  <http://www.programmingpearls.com/>

        Questa  una selezione di saggi dalla colonna di Bentley nella
        rivista Communications of the ACM.  Discute una grande variet
        di questioni sul miglioramento dei programmi, e comprende un
        grosso numero di esempi sull'efficienza.


     Writing Efficient Programs.
        Bentley, Jon Louis; 1982; Prentice-Hall, Inc.; ISBN
        0-13-970251-2 o 0-13-970244-X.

        Questo libro presenta la metodologia e un insieme di regole di
        Bentley per aumentare l'efficienza di un programma, e comprende
        un grande numero di esempi.

  7.  Libri sulla programmazione C e C++


  7.1.  C e C++


     The C Programming Language (Second Edition)
        Kernighan, Brian W.; Ritchie, Dennis M; Prentice-Hall; 1988;
        ISBN 0-13-110362-8, 272pp.

        La seconda versione migliorata, che tratta l'ANSI C,
        dell'originale classico libro scritto dagli inventori del C,
        K&R.  Ancora il migliore!


     Who's Afraid of C++?
        Heller, Steve; Academic Press; 1996; ISBN 0-12-339097; 508pp.

        Il miglior libro introduttivo sul C++ che io abbia mai visto.
        Ora disponibile anche sul  Web
        <http://www.steveheller.com/whos>.


  7.2.  Intefaccia C alle chiamate a sistema


     POSIX Programmer's Guide: Writing Portable Unix Programs
        Lewine, Donald; O'Reilly; 1992; ISBN 0-937175-73-0; 607pp.
        Si veda  <http://www.ora.com/catalog/posix/noframes.html>.

        Un eccellente riferimento per i programmatori sugli standard
        POSIX.1.  Preferisco questo piuttosto di quello scelto da JH.


     The Posix.1 Standard: A Programmer's Guide
        Zlotnick, Fred; Benjamin, Cummings; 1991; ISBN 0-8053-9605-5;
        379pp.; $35.95 (USA).

        JH: Quando protestai per la mancanza della Sezione 2 delle
        pagine man di Linux, qualcuno mi disse di prendermi un libro su
        POSIX, perch  questo  quello che fa Linux.  Mi piace questo
        libro perch non sono un programmatore professionista e l'autore
        fornisce copiose spiegazioni ed esempi.


     Advanced Programming in The Unix Environment
        Stevens, Richard; 1992; ISBN 0-201-56317; Addison-Wesley

        Un libro sulla programmazzione generica in Unix, buono quanto il
        classico libro di Stevens sulla programazione di rete.


     Linux Application Development
        Michael K. Johnson, Erik W. Troan; 1998; ISBN 0201308215;
        Addison-Wesley.

        Il miglio riferimento sulle API C di Linux.

  8.  Libri sul networking



     Unix Network Programming
        Volume 1, Networking APIs: Sockets and XTI W. Richard Stevens,
        PTR Prentice-Hall, 1998 ISBN 0-13-490012-X

        UNIX Network Programming 2nd Edition, Volume 2, Interprocess
        Communications W. Richard Stevens PTR Prentice-Hall, 1998

        Tutto quel che si deve sapere sull'argomento.  Generalmente
        considerati come le guida definitiva.


     Linux Network Administrator's Guide
        Kirch, Olaf; O'Reilly; 1995; ISBN 1-56592-087-2; 335pp.
        Si veda  <http://www.ora.com/catalog/linag/noframes.html>.

        Una guida pratica sul TCP/IP di Linux e sui servizi correlati.
        Accessibile sul Web attraverso la pagina del Linux Documentation
        Project, o direttamente a
        <http://sunsite.unc.edu/LDP/LDP/nag/nag.html>.


     TCP/IP Network Adminstration
        Hunt, Craig; O'Reilly Associates, ISBN 0-937175-82-X; 1992;
        472pp.
        Si veda  <http://www.ora.com/catalog/tcp2/noframes.html>.

        Meno specifico su Linux rispetto al libro di Kirch.  Sviluppa
        una trattazione pi approffondita del cuore del TCP/IP,
        trattando anche instradamento e BGP.


     DNS and BIND (Second Edition)
        Albitz, Paul, and Liu, Cricket; O'Reilly; 1998; ISBN
        1-56592-512-2; 502pp; $32.95.
        Si veda  <http://www.ora.com/catalog/dns2/noframes.html>.

        Approfondita trattazione del DNS, utile a quanti usano
        complicate installazioni con diverse sottoreti.  Tratta la
        libreria di programmazione BIND.


     Sendmail (Second Edition)
        Costales, Bryan & Allman, Eric; O'Reilly; ISBN 1-56592-222-0;
        1997; 1050 pp; $32.95
        Si veda  <http://www.ora.com/catalog/sendmail2/noframes.html>.

        Una esaustiva (ed estenuante) guida all'agente di trasferimento
        delle mail standard di Linux e Unix.




  9.  Libri sull'Implementazione del kernel Unix


  9.1.  Antenati di Linux


     The Design of the Unix Operating System
        Bach, Maurice J.; Prentice-Hall; ISBN 0-13-201799-7; 470pp.; $60
        (USA).

        Il libro da cui  partito Linus. Si veda
        <http://www.prenhall.com/books/ptr_0132017997.html>



     Operating Systems, Design and Implementation;
        Tanenbaum, Andrew S.; Prentice-Hall; 1987.

        Ad Alan Cox (una delle persone del cuore del kernel) piace
        questo libro.  Tanenbaum ha progettato Minix, che  il sistema
        da cui Linus ha avviato Linux.  Si veda
        <http://www.prenhall.com/books/esm_0136386776.html>.


  9.2.  Linux


     The Linux Kernel book
        Rmy Card, ric Dumas, Franck Mvel; John Wiley and Sons; 1998;
        ISBN 0-471-98141-9.  $100 (AUS).

        (Traduzione del libro in lingua francese Programmation Linux
        2.0; stessi autori; 1997; ditions Eyrolles; Paris, France.)

        Un descrizione molto interessante e informativa del
        funzionamento del kernel che riesce a riempire i buchi tra
        l'intefaccia POSIX e The Design of the Unix Operating System e
        i codici sorgente di Linux.  Un prerequisito  una buona
        comprensione del progetto e del funzionamento di un SO UNix, ma
        questo libro  comunque un eccellente aiuto per andare oltre la
        semplice comprensione e cominciare il vero lavoro.

        L'autore principale  uno degli sviluppatori chiave del
        filesystem ext2, e questo libro mostra una forte conoscenza
        della materia, con spiegazioni chiare e struttura.  
        sorprendentemente leggibile per qualcosa che tratta argomenti a
        cos basso livello.  Il libro sembra aver leggermente sofferto
        della traduzione in inglese -- ci sono alcuni errori di
        battitura e grammaticali, ma  abbastanza leggibile (i nomi dei
        file d'esempio sono maliziosamente lasciati in francese).

        Non  trattata l'implementazione dei protocolli di rete.

        Il libro  incentrato su Linux 2.0.35 con qualche preannuncio
        del 2.1 e 2.2.




     Linux Kernel Hackers' Guide
        Johnson, Michael K.

        Accessibile sul Web nella pagina Linux Documentation Project, o
        direttamente a
        <http://www.redhat.com/mirrors/LDP/LDP/khg/HyperNews/get/khg.html>

     LINUX Kernel Internals (Second Edition)
        Beck, Michael & Bohme, Harold & Mirko, Dziadzka & Kunitz, Ulrich
        & Magnus, Robert & Verworner, Dick; Addison Wesley; 1998;
        ISBN:0-201-33143-8; 480.
        Si veda  <http://www.awl-he.com/titles/11653.html>.

        Una guida alla programmazione del kernel di Linux; tratta 2.0.



  9.3.  Parenti di Linux


     The Design and Implementation of the 4.4BSD Unix Operating System
        McKusick, Marshall Kirk, Bostic, Keith, Karels, Michael J., and
        Quarterman, John S.; Addison-Wesley; 1996; ISBN 0-201-54979-4;
        608pp.
        Si veda  <http://www.awl-he.com/titles/13693.html>

        Il successore del classico libro sull'implementazione del kernel
        4.3 di BSD, che ha influenzato il design di Linux (specialmente
        per i socket e il networking).  Questo libro copre i fondamenti
        4.4BSD di BSD/OS, FreeBSD e NetBSD.


     Porting Unix to the 386; Jolitz, William F., and Jolitz, Lynne G.
        Dr. Dobb's Journal; Jan 1991-July 1992.

  10.  Libri sull'architettura e programmazione dei processori Intel


     80386 Programmer's Reference Manual
        Intel Corp.; ISBN 1-55512-022-9; 1986;

        Parte I. Programmazione delle Applicazioni: tipi di dati,
        modello di memoria, insieme di istruzioni.  Parte II.
        Programmazione di Sistema: architettura, gestione e protezione
        della memoria, multitasking, I/O, exception e interrupt,
        inizializzazione, uso del coprocessore e del multiprocessing.
        Parte III.  Compatibilit (con le vecchie macchine x86).  Parte
        IV. Insieme di Istruzioni.


     80386 System Software Writer's Guide
        Intel Corp.; ISBN 1-55512-023-7; 1987.

        Spiega le caratteristiche del 386 per gli autori di sistemi
        operativi.  Include un capitolo sull'implementazione di Unix.
        Buona parte dell'architettura del 80386 sembra essere stata
        sviluppata tenendo ben in mente il Multics; le caratteristiche
        che non sono usate da DOS o da Unix.


     Programming the 80386
        Crawford, John H & Gelsinger, Patrick P.; Sybex; ISBN
        0-89588-381-3; 774pp.; $26.95 (USA).

        Questo  il libro che Jolitzes ha usato quando ha fatto il port
        di BSD sull'architettura 386.


     Pentium Processor User's Manual: Volume 3, Architecture and Pro
        gramming
        Manual" Intel Corp.; 1993; ISBN 1-55512-195-0;

        Praticamente la versione per Pentium del 80386 Programmer's
        manual prima citato.

  11.  Libri sull'hardware per PC

  Nota: questi libri sono vecchi di quattro o cinque anni e
  probabilmente obsoleti.  Sinceramente non ho mai messo le mani
  sull'hardware...


     80386 Hardware Reference Manual
        Intel Corp.; 1986; ISBN 1-55512-024-5;

        Connessioni dei piedini, temporizzazioni, forme d'onda,
        diagrammi a blocchi, tensioni e tutto questo genere di cose.


     The Indispensable PC Hardware Book
        Messmer, Hans-Peter; Addison-Wesley; 1993; ISBN 0-201-62424-9;
        1000 pp.

        JH: Tratta le cose pi recenti come EIDE e PCI.

  12.  Questioni legali


  12.1.  Licenza d'Uso (in inglese)

  This document is copyright 1999 by Eric S. Raymond. You may use,
  disseminate, and reproduce it freely, provided you:


    Do not omit or alter this copyright notice.

    Do not omit or alter or omit the version number and date.

    Do not omit or alter the document's pointer to the current WWW
     version.

    Clearly mark any condensed, altered or versions as such.

  These restrictions are intended to protect potential readers from
  stale or mangled versions.  If you think you have a good case for an
  exception, ask me.


  12.2.  Storia

  In origine questo documento era un mini HOWTO mantenuto da Jim Haynes.
  Io ho cambiato un po' di cose, provando a renderlo un documento a s
  stante e meno basato sulle varie bibliografie postate in USENET.  Le
  piccole recensioni senza nome sono mie anzich sue.















  Root RAID HOWTO cookbook
  Michael A. Robinton, michael@bzs.org
  v1.07, 25 marzo 1998

  Questo documento  un ``ricettario'' per la creazione di un filesystem
  raid montato come root (root raid) e del suo compagno ideale, un sis
  tema di recupero, usando initrd. Le istruzioni sono complete e date
  passo a passo, sia per dispositivi md0 raid1 che raid5. Per ciascun
  passo viene data una spiegazione di ci che con esso si vuole
  ottenere.  In questa revisione c' anche un file generico linuxrc per
  initrd che pu essere configurato con un singolo file di poche righe
  ``/etc/raidboot.conf'' per configurazioni raid1 e raid5. La traduzione
  italiana  curata da Samuele Maretti s.maretti@tiscalinet.it

  1.  Introduzione

  Si assume che il lettore abbia familiarit con i vari tipi di
  implementazione raid, i loro vantaggi ed effetti collaterali. Questo
  non  un tutorial, solo un insieme di istruzioni su come implementare
  un filesystem raid su un sistema linux. Tutte le informazioni
  necessarie per familiarizzare con raid su linux sono elencate qui
  direttamente o per riferimento: per favore leggetele prima di inviare
  domande per e-mail.


  1.1.  Dove ottenere copie aggiornate di questo documento.

  Root-RAID-HOWTO

  Disponibile in formato LaTeX (per DVI e PostScript), testo e HTML.

       sunsite.unc.edu/mdw/HOWTO/


  Disponibile in formato SGML e HTML.

       ftp.bizsystems.com/pub/raid/



  1.2.  Bug

  Al momento della stesura di questo documento il problema di fermare un
  dispositivo RAID montato come root non  ancora stato risolto in modo
  soddisfacente. Un metodo per eliminare il bisogno di eseguire ckraid
  (che richiede un sacco di tempo) ad ogni boot, proposto da Ed Welbon e
  implementato da Bohumil Chalupa si trova in questo documento. Senza
  tale metodo  necessario eseguire ckraid sul dispositivo md ogni volta
  che viene fatto un reboot del sistema. Su un array troppo grande
  questo pu causare un grande scadimento delle prestazioni. Sul mio
  dispositivo RAID1 da 6 giga, installato su una macchina con processore
  Pentium 166 con 128 mega di ram ci vuole ben pi di mezz'ora per
  eseguire ckraid :-( dopo ogni reboot. Sul mio array RAID5 da 13 giga
  con adattatore scsi da 20mb/sec ci vuole pi di un'ora.


  Il metodo consiste nel memorizzare, ad ogni shutdown, lo stato
  dell'array sul dispositivo di boot vero e proprio e confrontarlo con
  uno ``stato di riferimento'' l memorizzato quando il sistema  stato
  costruito la prima volta. Se al reboot i due stati coincidono il
  superblock dell'array viene ricostruito al boot successivo, altrimenti
  l'operatore viene avvisato dell'errore di stato e viene lasciato in
  esecuzione il sistema di recupero con tutti gli strumenti raid.



  La ricostruzione del superblock fa s che il sistema ignori che
  l'array  stato spento senza eseguire mdstop marcando tutti i drive
  come OK, come se nulla fosse accaduto. Questo funziona solo se tutti i
  drive sono OK al momento dello shutdown. Se uno dei drive dell'array
  ha dei problemi  necessario rimuovere tale drive prima di far
  ripartire il dispositivo md, o si potrebbe avere perdita di dati.

  Niente di tutto questo si applica a raid0, su cui non deve essere
  eseguito mdstop prima dello shutdown.

  Le soluzioni definitive proposte per questo problema includono
  l'introduzione di un file finalrd simile ad initrd, e un comando
  mdrootstop che, durante lo shutdown, scrive sull'array i flag clean
  quando  montato in sola lettura. Sono sicuro che ce ne sono altre.

  Nel frattempo il problema  stato solo aggirato. Per favore, fatemi
  sapere quando verr risolto in modo pi pulito!!!


  1.3.  Riconoscimenti

  Ci che le persone seguenti hanno scritto o hanno inviato per e-mail
  mi ha aiutato a realizzare questo documento. Molte idee sono state
  rubate dal lavoro di altri, io ho solo provato a mettere tutto insieme
  nella forma di un libro di ricette in modo che fosse facile da usare.
  I miei ringraziamenti vanno a:

    Linas Vepstas <mailto:linas@linas.org>
      per il RAID howto che mi ha spiegato la maggior parte delle cose.

    Gadi Oxman <mailto:gadio@netvision.net.il>
      per aver risposto alle mie sciocche domande da principiante.

    Ed Welbon <mailto:welbon@bga.com>
      per l'eccellente pacchetto initrd.md che mi ha ispirato a scrivere
     questo.

    Bohumil Chalupa <mailto:bochal@apollo.karlov.mff.cuni.cz>
      per aver implementato il metodo di cui ho parlato e che permette
     ai dispositivi raid montati come root di funzionare in modo
     produttivo.


    e molti altri che, in un modo o nell'altro, hanno contribuito a
     questo lavoro.


  1.4.  Informazioni di copyright (in lingua originale)

  This document is GNU copyleft by Michael Robinton michael@bzs.org.

  Permission to use, copy, distribute this document for any purpose is
  hereby granted, provided that the author's / editor's name and this
  notice appear in all copies and/or supporting documents; and that an
  unmodified version of this document is made freely available.  This
  document is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY, either expressed or implied.  While every effort
  has been taken to ensure the accuracy of the information documented
  herein, the author / editor / maintainer assumes NO RESPONSIBILITY for
  any errors, or for any damages, direct or consequential, as a result
  of the use of the information documented herein.





  2.  Di cosa hai bisogno PRIMA DI COMINCIARE

  I pacchetti di cui hai bisogno e la documentazione che risponde alle
  domande pi comuni sulla configurazione e l'utilizzo di raid sono
  elencati sotto.  Leggi approfonditamente l'elenco.


  2.1.  Pacchetti necessari

  Hai bisogno della versione pi recente di questi pacchetti.

    un kernel che supporti raid, initrd e /dev/loopx

       io ho usato linux-2.0.33 <ftp://sun
       site.unc.edu/pub/Linux/kernel/> da sunsite


    raid145-971022-2.0.31
     <ftp://ftp.kernel.org/pub/linux/daemons/raid/> patch che aggiunge
     il supporto per raid1/4/5

    raidtools-pre3-0.42 <ftp://ftp.kernel.org/pub/linux/daemons/raid/>
     strumenti per creare e mantenere dispositivi raid (c' anche la
     documentazione).

    ``La patch di Gadi per il raid stop'' nell'Appendice E.

    linuxthreads-0.71
     <ftp://ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy> pacchetto
     threads necessario. Deve essere scaricato con ftp: i browser non
     funzionano.  ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy

    Una distribuzione Linux pronta da installare.

       Io ho usato Slackware-3.4 <ftp://ftp.cdrom.com/pub/linux>


  Utile, ma non necessario

    raidboot-0.01.tar.gz <ftp://ftp.bizsystems.com/pub/raid/> sistema
     di recupero e boot raid precostruito.

  Le istruzioni dettagliate che trovate in questo documento sono basate
  sui pacchetti citati. Se i pacchetti sono stati aggiornati o usate una
  distribuzione linux diversa potreste dover modificare le procedure che
  trovate qui.

  Le patch, gli strumenti ecc... potrebbero essere diversi con i kernel
  2.1.  Controllate la documentazione pi recente a:


       ftp.kernel.org/pub/linux/daemons/raid/



  2.2.  Altre implementazioni simili.

  Ho deciso di includere nel kernel tutte le parti necessarie in modo
  che tutto funzioni a partire dal boot senza caricare alcun modulo.
  L'immagine del kernel che ho ottenuto, compressa,  un po' pi grande
  di 300k.

  Date un'occhiata all'initrd.md.tar.gz di Ed Welbon
  <mailto:welbon@bga.com> dove trovate un altro modo per avere un
  dispositivo raid bootabile. Usa i moduli caricabili. Un'occhiata ai
  suoi script molto concisi vi mostreranno come fare se avete bisogno di
  un kernel molto piccolo con moduli.


       http://www.realtime.net/~welbon/initrd.md.tar.gz



  2.3.  Documentazione -- Letture raccomandate

  Dovreste leggere:

       /usr/src/linux/Documentation/initrd.txt



  cos come la documentazione e le pagine di manuale che accompagnano il
  pacchetto raidtools. In particolare leggete man mdadd e il documento
  QuickStart.RAID che sono inclusi in questo pacchetto.


  Potrebbe essere interessante leggere anche:

    BootPrompt-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/BootPrompt-
     HOWTO.html>

    man lilo

    man lilo.conf


  2.4.  Risorse RAID


    sunsite.unc.edu/mdw/HOWTO/mini/Software-RAID

    www.ssc.com/lg/issue17/raid.html

    linas.org/linux/raid.html

    ftp.kernel.org/pub/linux/daemons/raid/

    www.realtime.net/~welbon/initrd.md.tar.gz

    luthien.nuclecu.unam.mx/~miguel/raid/

  Potete anche sottoscrivere le seguenti mailing list:

    majordomo@nuclecu.unam.mx per iscrivervi subscribe raiddev

     mandate un messaggio a: raiddev@nuclecu.unam.mx

    majordomo@vger.rutgers.edu per iscrivervi subscribe linux-raid

     mandate un messaggio a: linux-raid@vger.rutgers.edu (questa sembra
     essere la lista pi attiva)


  3.  Partenza veloce con ROOT RAID

  Se non vuoi compilare e fare il debug del sistema di recupero puoi
  prenderne uno generico incluso nella Slackware-3.4 all'indirizzo:

       ftp.bizsystems.com/pub/raid/raidboot-0.01.tar.gz


  A questo punto segui i passi seguenti:
    Compila un kernel con raid attivo e con il supporto per i tuoi
     dischi (deve essere contenuto nel kernel, non un modulo)

    Controlla che l'array raid sia ben configurato e venga montato
     correttamente

    Installa il tuo sistema operativo sul sistema raid

    Correggi le voci in fstab in modo che /dev/md0 sia il dispositivo
     di root. Assicurati anche che le partizioni che usi per il boot si
     trovino in fstab.

    Modifica i tuoi script di shutdown e reboot (i miei si trovano in
     /etc/rc.d/rc.6) come descritto in ``Modificare gli script rc per lo
     shutdown''

    Segui i passi seguenti: dal filesystem usato per i passaggi
     eseguiti finora (d'ora in poi ''sistema di sviluppo'') nel sistema
     di recupero e nel nuovo sistema raid

             cd /root/raidboot
             mkdir mnt
             gzip -d rescue.clean
             losetup /dev/loop0  rescue.clean
             mount /dev/loop0    mnt

     copia questi file

             cp -p /etc/*         mnt/etc
             cp -p /etc/rc.d/*    mnt/etc/rc.d
                     {o nel modo pi appropriato per il tuo sistema}
             cp -a /lib/modules/* mnt/lib/modules



  Correggi le voci in fstab in modo che /dev/md0 sia il dispositivo di
  root. Assicurati che le partizioni che usi per il boot appaiano in
  fstab.


  Crea /etc/raidboot.conf che descriva la configurazione di boot raid.
  Questo file NON pu contenere commenti nelle prime tre linee, dopo
  queste non ci sono problemi.

  raidboot.conf





















          /dev/sda1 /dev/sda2
          raidboot
          raid5.conf
  # eventuali commenti possono essere messi *dopo* le tre
  # linee di configurazione.
  #
  # Questo  'raidboot.conf'
  #
  # linea uno, le partizioni contenenti il sistema di recupero raid 'initrd'
  #       Non  necessario eseguire il boot da queste partizioni; comunque,
  #       poich il sistema di recupero non entra in un floppy,  necessario
  #       sapere quali partizioni devono essere usate per caricarlo.
  #
  # linea due, il percorso delle informazioni di configurazione raid di boot
  #       dove, a tempo di boot, si trovano shutdown, status ecc.
  #       NON include le informazioni sul punto di mount, solo 'percorso':
  #       /punto_di_mount/'percorso'
  #
  # linea tre, nome del file di configurazione raid
  #       File contenente la configurazione raid corrente: raid1.conf, raid5.conf


  Mancano poche altre cose ed il sistema raid  pronto ad eseguire il
  boot.

  Crea ``rc.raidown'', come descritto in appendice F, e copialo in
  /etc/rc.d sui sistemi di recupero, sviluppo e raid. Smonta il sistema
  di recupero e comprimilo.

          umount mnt
          losetup -d /dev/loop0
          mv rescue.clean rescue
          gzip rescue


  Copia il file di recupero sulle partizioni di raid di boot.

          cp rescue.gz /mnt_point(1)/raidboot
          cp rescue.gz /mnt_point(2)/raidboot


  Attiva l'array raid.

          mdadd -ar


  Salva lo stato di riferimento corretto sulla partizione raid di boot.

          cat /proc/mdstat | grep md0 > /mnt_point(1)/raidboot/raidgood.ref
          cat /proc/mdstat | grep md0 > /mnt_point(1)/raidboot/raidgood.ref


  Infine configura il programma di boot come indicato in ``Configurare
  RAIDBOOT - raidboot.conf'' e riavvia il tuo sistema dall'array raid.




  4.  initrd - Ricette per il RAID montato come root

  Questa  la procedura per creare un ramdisk 'initrd' con strumenti di
  recupero per il raid.

  Nello specifico, questo documento si riferisce alle implementazioni
  RAID1 e RAID5.

  4.1.  Note sulla sicurezza

  Il filesystem di recupero pu essere usato da solo. Nel caso in cui ci
  fossero problemi a montare l'array raid vieni lasciato con il sistema
  di recupero montato e funzionante. PRENDI LE PRECAUZIONI DI SICUREZZA
  APPROPRIATE!!!


  4.2.  Compilare il Kernel e gli strumenti Raid

  La prima cosa da fare  applicare una patch e compilare il kernel e
  familiarizzarsi con gli strumenti raid. Assicurati di usare anche ``La
  patch di Gadi per il raid stop'' in appendice E.  Configura, monta e
  prova i tuoi dispositivi raid. I dettagli su come questo deve essere
  fatto sono inclusi nel pacchetto raidtools e li vedremo in breve pi
  avanti in questo stesso documento.


  4.3.  Costruire i filesystem initrd  di recupero e di boot.

  Ho usato la distribuzione Slackware-3.4 per costruire i filesystem di
  recupero e boot e il filesystem per la macchina di produzione. Tutte
  le distribuzioni di linux dovrebbero andare bene. Se usi una
  distribuzione diversa, controlla le parti di questa procedura
  specifiche per Slackware e modificale in modo ad adattarle al tuo
  caso.


  Uso loadlin per eseguire il boot dell'immagine del kernel da una
  partizione dos semplicemente perch nel mio sistema ci sono dei
  dispositivi strani che hanno bisogno di software di configurazione che
  gira solo sotto dos. Lilo funzioner altrettanto bene e pu essere
  usata una piccola partizione linux contenente solo i file di boot raid
  e il record di lilo.

  Per il sistema di boot/recupero raid, ho deciso di creare un sistema
  ramdisk di minime dimensioni usando lo script 'setup' di Slackware
  seguito dall'installazione dei pacchetti 'linuxthreads' e 'raidtools'
  sulla Slackware sul mio ramdisk. Ho usato una procedura del tutto
  identica per costruire il sistema di produzione.  Cos i sistemi di
  recupero e produzione sono molto simili.


  Questo processo di installazione d, alla fine, un sistema piuttosto
  semplice (salva una copia del file) a cui sovrappongo


          /lib/modules/2.x.x......
          /etc .... con fstab, mdtab, raidX.conf, raidboot.conf modificati
          /etc/rc.d
          /dev/md*




  dal sistema che uso in modo da personalizzarlo per il kernel e la
  macchina su cui verr fatto girare.


  Questo fa s che il sistema di boot/ripristino sia lo stesso sistema
  installato sul dispositivo raid montato come root, solo un pochino
  ``dimagrito'' ma con le revisioni delle librerie ecc. sempre
  aggiornate.



  4.4.  Istruzioni PASSO dopo PASSO

  Dalla directory home di root (/root):


          cd /root
          mkdir raidboot
          cd raidboot



  Crea un punto di mount su cui lavorare


          mkdir mnt
          mkdir mnt2




  Crea un file abbastanza grande da contenere il file system. Sar un
  po' pi grande del file system di recupero. Ho scelto 24 mega poich
  16 mega non sono sufficienti

          dd if=/dev/zero of=build bs=1024k count=24


  associa il file con un dispositivo di loop e genera sul file un file
  system ext2


          losetup /dev/loop0 build
          mke2fs -v -m0 -L initrd /dev/loop0
          mount /dev/loop0 mnt



  4.5.  Installa la distribuzione - Specifico per Slackware

  ``...salta le operazioni specifiche per Slackware'' e vai alla
  prossima sezione

  Ora che un file system vuoto  stato creato e montato, esegui "setup".


  Specifica                       /root/raidboot/mnt



  come 'target'. Come source puoi scegliere tutto quello che usi
  normalmente. Scegli i pacchetti che vuoi installare e procedi, ma NON
  eseguire la configurazione.

  Scegli il modo 'EXPERT'

  Io scelgo 'A', 'AP' e 'N', installando solo il minimo indispensabile
  per far funzionare il sistema pi un editor che mi  familiare (vi,
  jed, joe) e che  ragionevolmente compatto.








  lqqqqqqqq SELECTING PACKAGES FROM SERIES A (BASE LINUX SYSTEM) qqqqqqqqk
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x   [X] aaa_base  Basic filesystem, shell, and utils - REQUIRED    x x
  x x   [X] bash      GNU bash-1.14.7 shell - REQUIRED                 x x
  x x   [X] devs      Device files found in /dev - REQUIRED            x x
  x x   [X] etc       System config files & utilities - REQUIRED       x x
  x x   [X] shadow    Shadow password suite - REQUIRED                 x x
  x x   [ ] ide       Linux 2.0.30 no SCSI (YOU NEED 1 KERNEL)         x x
  x x   [ ] scsi      Linux 2.0.30 with SCSI (YOU NEED 1 KERNEL)       x x
  x x   [ ] modules   Modular Linux device drivers                     x x
  x x   [ ] scsimods  Loadable SCSI device drivers                     x x
  x x   [X] hdsetup   Slackware setup scripts - REQUIRED               x x
  x x   [ ] lilo      Boots Linux (not UMSDOS), DOS, OS/2, etc.        x x
  x x   [ ] bsdlpr    BSD lpr - printer spooling system                x x
  x x   [ ] loadlin   Boots Linux (UMSDOS too!) from MS-DOS            x x
  x x   [ ] pnp       Plug'n'Play configuration tool                   x x
  x x   [ ] umsprogs  Utilities needed to use the UMSDOS filesystem    x x
  x x   [X] sysvinit  System V-like INIT programs - REQUIRED           x x
  x x   [X] bin       GNU fileutils 3.12, elvis, etc. - REQUIRED       x x
  x x   [X] ldso      Dynamic linker/loader - REQUIRED                 x x
  x x   [ ] ibcs2     Runs SCO/SysVr4 binaries                         x x
  x x   [X] less      A text pager utility - REQUIRED                  x x
  x x   [ ] pcmcia    PCMCIA card services support                     x x
  x x   [ ] getty     Getty_ps 2.0.7e - OPTIONAL                       x x
  x x   [X] gzip      The GNU zip compression - REQUIRED               x x
  x x   [X] ps        Displays process info - REQUIRED                 x x
  x x   [X] aoutlibs  a.out shared libs - RECOMMENDED                  x x
  x x   [X] elflibs   The ELF shared C libraries - REQUIRED            x x
  x x   [X] util      Util-linux utilities - REQUIRED                  x x
  x x   [ ] minicom   Serial transfer and modem comm package           x x
  x x   [ ] cpio      The GNU cpio backup/archiving utility            x x
  x x   [X] e2fsbn    Utilities for the ext2 file system               x x
  x x   [X] find      GNU findutils 4.1                                x x
  x x   [X] grep      GNU grep 2.0                                     x x
  x x   [ ] kbd       Change keyboard mappings                         x x
  x x   [X] gpm       Cut and paste text with your mouse               x x
  x x   [X] sh_utils  GNU sh-utils 1.16 - REQUIRED                     x x
  x x   [X] sysklogd  Logs system and kernel messages                  x x
  x x   [X] tar       GNU tar 1.12 - REQUIRED                          x x
  x x   [ ] tcsh      Extended C shell version 6.07                    x x
  x x   [X] txtutils  GNU textutils-1.22 - REQUIRED                    x x
  x x   [ ] zoneinfo  Configures your time zone                        x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x


  Dalla serie di pacchetti AP scelgo solo 'JOE', un editor che mi piace,
  e 'MC', un piccolo ed utile file manager. Puoi scegliere i programmi
  di cui avrai bisogno sul tuo sistema.


















  lqqqqqqqqq SELECTING PACKAGES FROM SERIES AP (APPLICATIONS) qqqqqqqqqk
  x x     [ ] ispell    The International version of ispell          x x
  x x     [ ] jove      Jonathan's Own Version of Emacs text editor  x x
  x x     [ ] manpgs    More man pages (online documentation)        x x
  x x     [ ] diff      GNU diffutils                                x x
  x x     [ ] sudo      Allow special users limited root access      x x
  x x     [ ] ghostscr  GNU Ghostscript version 3.33                 x x
  x x     [ ] gsfonts1  Ghostscript fonts (part one)                 x x
  x x     [ ] gsfonts2  Ghostscript fonts (part two)                 x x
  x x     [ ] gsfonts3  Ghostscript fonts (part three)               x x
  x x     [ ] jed       JED programmer's editor                      x x
  x x     [X] joe       joe text editor, version 2.8                 x x
  x x     [ ] jpeg      JPEG image compression utilities             x x
  x x     [ ] bc        GNU bc - arbitrary precision math language   x x
  x x     [ ] workbone  a text-based audio CD player                 x x
  x x     [X] mc        The Midnight Commander file manager          x x
  x x     [ ] mt_st     mt ported from BSD - controls tape drive     x x
  x x     [ ] groff     GNU troff document formatting system         x x
  x x     [ ] quota     User disk quota utilities                    x x
  x x     [ ] sc        The 'sc' spreadsheet                         x x
  x x     [ ] texinfo   GNU texinfo documentation system             x x
  x x     [ ] vim       Improved vi clone                            x x
  x x     [ ] ash       A small /bin/sh type shell - 62K             x x
  x x     [ ] zsh       Zsh - a custom *nix shell                    x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x


  Dal pacchetto 'N' ho scelto solo TCPIP. Nonostante non sia veramente
  necessario si rivela molto utile e permette l'accesso alla rete mentre
  si cerca di aggiustare qualche guaio o di effettuare un aggiornamento
  con l'array raid non montato. TCPIP contiene anche 'biff', che  usato
  da alcune applicazioni di 'A'. Anche se non installi 'N' probabilmente
  sarebbe il caso di installare il pacchetto biff ugualmente.

  lqqqq SELECTING PACKAGES FROM SERIES N (NETWORK/NEWS/MAIL/UUCP) qqqqqk
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x    [ ] apache    Apache WWW (HTTP) server                      x x
  x x    [ ] procmail  Mail delivery/filtering utility               x x
  x x    [ ] dip       Handles SLIP/CSLIP connections                x x
  x x    [ ] ppp       Point-to-point protocol                       x x
  x x    [ ] mailx     The mailx mailer                              x x
  x x    [X] tcpip     TCP/IP networking programs                    x x
  x x    [ ] bind      Berkeley Internet Name Domain server          x x
  x x    [ ] rdist     Remote file distribution utility              x x
  x x    [ ] lynx      Text-based World Wide Web browser             x x
  x x    [ ] uucp      Taylor UUCP 1.06.1 with HDB && Taylor configs x x
  x x    [ ] elm       Menu-driven user mail program                 x x
  x x    [ ] pine      Pine menu-driven mail program                 x x
  x x    [ ] sendmail  The sendmail mail transport agent             x x
  x x    [ ] metamail  Metamail multimedia mail extensions           x x
  x x    [ ] smailcfg  Extra configuration files for sendmail        x x
  x x    [ ] cnews     Spools and transmits Usenet news              x x
  x x    [ ] inn       InterNetNews news transport system            x x
  x x    [ ] tin       The 'tin' news reader (local or NNTP)         x x
  x x    [ ] trn       'trn' for /var/spool/news                     x x
  x x    [ ] trn-nntp  'trn' for NNTP (install 1 'trn' maximum)      x x
  x x    [ ] nn-spool  'nn' for /var/spool/news                      x x
  x x    [ ] nn-nntp   'nn' for NNTP (install 1 'nn' maximum)        x x
  x x    [ ] netpipes  Network pipe utilities                        x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x


  Completata l'installazione rispondi no a tutto il resto (cio rispondi
  no a tutte le richieste di configurazione) ed esci dallo script.


  4.6.  Installa linux pthreads

  Adesso devi installare la libreria 'linuxthreads-0.71'.  Ho incluso la
  patch che segue per il Makefile di linuxthreads invece di spiegare i
  dettagli dell'installazione. Salva il Makefile originale, applica la
  patch e poi:

          cd /usr/src/linuxthreads-0.71
    patch
          make
          make install



  -------------------diff Makefile.old  Makefile.raid-----------------
  2a3,13
  > # Se stai compilando "linuxthreads" per installarlo su un punto di mount
  > # che non  la partizione di root, ridefinisci 'BUILDIR' in modo che sia
  > # uguale al punto di mount che vuoi usare come directory "root"
  > # Potresti doverlo fare se stai costruendo un 'ram disk iniziale' come
  > # quello usato con i dispositivi root raid capaci di eseguire il boot.
  > # RICHIEDE la versione 1.9.5 o superiori di ldconfig
  > # per controllare esegui ldconfig -v
  > #
  > BUILDIR=/root/raidboot/mnt
  > #BUILDIR=
  >
  81,82c92,93
  <       install pthread.h $(INCLUDEDIR)/pthread.h
  <       install semaphore.h $(INCLUDEDIR)/semaphore.h
  ---
  >       install pthread.h $(BUILDIR)$(INCLUDEDIR)/pthread.h
  >       install semaphore.h $(BUILDIR)$(INCLUDEDIR)/semaphore.h
  84c95
  <       test -f /usr/include/sched.h || install sched.h $(INCLUDEDIR)/sched.h
  ---
  >       test -f $(BUILDIR)/usr/include/sched.h || install sched.h $(BUILDIR)$(INCLUDEDIR)/sched.h
  86,89c97,103
  <       install $(LIB) $(LIBDIR)/$(LIB)
  <       install $(SHLIB) $(SHAREDLIBDIR)/$(SHLIB)
  <       rm -f $(LIBDIR)/$(SHLIB0)
  <       ln -s $(SHAREDLIBDIR)/$(SHLIB) $(LIBDIR)/$(SHLIB0)
  ---
  >       install $(LIB) $(BUILDIR)$(LIBDIR)/$(LIB)
  >       install $(SHLIB) $(BUILDIR)$(SHAREDLIBDIR)/$(SHLIB)
  >       rm -f $(BUILDIR)$(LIBDIR)/$(SHLIB0)
  >       ln -s $(SHAREDLIBDIR)/$(SHLIB) $(BUILDIR)$(LIBDIR)/$(SHLIB0)
  > ifneq ($(BUILDIR),)
  >       ldconfig -r ${BUILDIR} -n $(SHAREDLIBDIR)
  > else
  91c105,106
  <       cd man; $(MAKE) MANDIR=$(MANDIR) install
  ---
  > endif
  >       cd man; $(MAKE) MANDIR=$(BUILDIR)$(MANDIR) install





  4.7.  Installazione degli strumenti Raid

  Il passo successivo consiste nell'installazione degli strumenti raid.
  raidtools-0.42


  Devi eseguire lo script "configure" facendolo puntare al Makefile
  nella directory con i sorgenti per i file ramdisk

    cd /usr/src/raidtools-0.42
    configure --sbindir=/root/raidboot/mnt/sbin --prefix=/root/raidboot/mnt/usr
    make
    make install


  La parte del Makefile riguardante l'installazione non funziona benis
  simo, quindi fai quello che segue per sistemare le cose. Questo prob
  lema verr corretto nelle versioni future, cos non sar necessario
  effettuare nuovi link.


       Correggere l'errore di make install


  I link che sono specificati nel Makefile alla sezione 'LINKS' devono
  essere rimossi e rifatti correttamente in modo che tutto funzioni nel
  modo giusto.

          cd /root/raidboot/mnt/sbin
          ln -fs mdadd mdrun
          ln -fs mdadd mdstop




  4.8.  Rimuovere directory e file non necessari dal nuovo filesystem.

  Cancella le seguenti directory dal filesystem (ATTENZIONE NON
  CANCELLARLE DAL SISTEMA ATTUALMENTE IN ESECUZIONE)  un errore facile
  da commettere, indovina come me ne sono accorto!!!

          cd /root/raidboot/mnt
          rm -r home/ftp/*
          rm -r lost+found
          rm -r usr/doc
          rm -r usr/info
          rm -r usr/local/man
          rm -r usr/man
          rm -r usr/openwin
          rm -r usr/share/locale
          rm -r usr/X*
          rm -r var/man
          rm -r var/log/packages
          rm -r var/log/setup
          rm -r var/log/disk_contents




  4.9.  Creare /dev/md x

  L'ultimo passo consiste semplicemente nel copiare i dispositivi
  /dev/md* dal filesystem corrente sul filesystem di rescue. Potresti
  anche crearli con mknode.

          cp -a /dev/md* /root/raidboot/mnt/dev






  4.10.  Creare un filesystem utilizzabile per initrd

  Adesso hai un filesystem pronto per essere personalizzato. Una volta
  personalizzato, questo filesystem pu essere usato per recuperare il
  sistema nel caso in cui i dispositivi raid avessero problemi e ci
  fosse bisogno degli strumenti raid per rimediare. Sar anche usato per
  eseguire il boot e montare come root il dispositivo raid usando il
  file linuxrc che verr discusso di seguito.

  Copia il filesystem su un dispositivo pi piccolo per il file initrd,
  16 mega dovrebbero essere sufficienti.

  Crea il filesystem pi piccolo e montalo

          cd /root/raidboot
          dd if=/dev/zero of=bare.fs bs=1024k count=16


  associa il file con un dispositivo di loop e genera un filesystem ext2
  sul file

          losetup /dev/loop1 bare.fs
          mke2fs -v -m0 -L initrd /dev/loop1
          mount /dev/loop1 mnt2


  Copia il filesystem 'build' su 'bare.fs'

          cp -a mnt/* mnt2


  Salva il sistema 'bare.fs' prima di personalizzarlo in modo da rendere
  pi semplici eventuali aggiornamenti futuri. Il filesystem 'build' non
  serve pi e pu essere cancellato.

          cd /root/raidboot
          umount mnt
          umount mnt2
          losetup -d /dev/loop0
          losetup -d /dev/loop1
          rm build
          cp bare.fs rescue
          gzip -9 bare.fs



  4.10.1.  Creare il filesystem di BOOT/RESCUE initrd

  Adesso copia le cose dipendenti dal sistema che corrispondono al
  kernel dal sistema usato per lo sviluppo, in alternativa puoi
  modificare manualmente i file nel sistema di recupero in modo che
  corrispondano al sistema che stai costruendo.

          losetup /dev/loop0 rescue
          mount /dev/loop0 mnt


  Assicurati che nessun file *~, core o di log compaia nella tua direc
  tory etc. I 2 comandi che seguono danno dei messaggi di errore: igno
  rali.






          cp -dp /etc/* mnt/etc
          cp -dp /etc/rc.d/* mnt/etc/rc.d

          mkdir  mnt/lib/modules
          cp -a  /lib/modules/2.x.x mnt/lib/modules <--- la tua versione 2.x.x


  Modifica i file seguenti per adattarli al tuo sistema di recupero.

          cd mnt

  Non-network
          etc/fstab
          etc/mdtab       dovrebbe funzionare correttamente
  Network
          etc/hosts
          etc/resolv.conf
          etc/hosts.equiv         e file correlati
          etc/rc.d/rc.inet1       correggi ip#, mask, gateway, ecc...
          etc/rc.d/rc.S           rimuovi tutta la sezione riguardante lo
                                  stato del filesystem,
                  a partire da:
                          # Test to see if the root partition isread-only
                  fino a, ma senza includerlo:
                          # remove /etc/mtab* so that mount will .....
                                  Questo evita il fastidioso avvertimento
                                  che il ramdisk  montato in lettura/scrittura.
          etc/rc.d/rc.xxxxx       altri se richiesto, vedi oltre
          root/.rhosts            se presente
          home/xxxx/xxxx          altri se richiesto

  ATTENZIONE:     La procedura appena illustrata sposta i tuoi file
                  password e shadow sul disco di recupero!!!!!

  ATTENZIONE:     Forse non vuoi che questo accada per ragioni di sicurezza.


  Crea tutte le directory che sono necessarie per montare /dev/disk...
  Questi sono i punti di mount per eseguire il boot del sistema (par
  tizione di boot e partizione di boot di backup). Il mio sistema esegue
  il boot da dos usando loadlin, comunque anche partizioni linux e lilo
  funzioneranno bene.  Il mio sistema usa:

          cd /root/raidboot/mnt           <--- initrd root
          mkdir dosa                      punto di mount della partizione dos
          mkdir dosb                      punto di mount del mirror dos


  Il filesystem di recupero  completo!

  Noterai, esaminando i file nel filesystem di recupero, che ci sono
  ancora molti file che potrebbero essere cancellati. Non l'ho fatto
  perch complicherebbe troppo la procedura e la maggior parte dei
  sistemi raid hanno memoria e spazio su disco a sufficienza. Se vuoi
  avere un filesystem ancora pi piccolo, fallo!


  4.11.  Eseguire il boot del dispositivo RAID - linuxrc

  Per far s che il disco di recupero esegua il boot del dispositivo
  raid devi solo copiare il file di script:


       linuxrc


  nella directory root del dispositivo.

  La teoria del funzionamento di questo file  discussa in ``Appendice
  G, teoria del funzionamento di linuxrc''.

  Un linuxrc (funzionante) molto semplice e pi facile da capire si
  trova in ``Appendice D'', script linuxrc e di shutdown obsoleti. Copia
  il testo seguente in un file linuxrc e salvalo nella tua area di
  sviluppo.

























































   -------------------- linuxrc ----------------------
  #!/bin/sh
  # ver 1.13 3-6-98
  #
  ################# BEGIN 'linuxrc' ##################
  #            DEFINIZIONE DELLE FUNZIONI            #
  ####################################################
  # Definisce la funzione 'Fault' nel caso in cui
  # qualcosa vada storto durante l'esecuzione di 'linuxrc'
  #
  FaultExit () {
  # corregge fstab per mostrare '/dev/ram0/ per il sistema di recupero
      /bin/cat /etc/fstab | {
      while read Line
      do
          if [ -z "$( echo ${Line} | /usr/bin/grep md0 )" ]; then
              echo ${Line}
          else
              echo "/dev/ram0 / ext2 defaults 1 1"
          fi
      done
      } > /etc/tmp.$$
      /bin/mv /etc/tmp.$$ /etc/fstab
  #       point root at /dev/ram0 (the rescue system)
          echo 0x100>/proc/sys/kernel/real-root-dev
          /bin/umount /proc
          exit
  }

  # Definisce una procedura 'Warning' per stampare un banner sul terminale di boot
  #
  Warning () {
      echo '*********************************'
      echo -e " $*"
      echo '*********************************'
  }

  # Definisce 'SplitKernelArg' che aiuta ad estrarre gli argomenti del kernel
  # riguardanti 'Raid'
  SplitKernelArg () { eval $1='$( IFS=,; echo $2)' }

  # Definisce 'SplitConfArgs' che aiuta ad estrarre gli argomenti di
  # configurazione del sistema
  SplitConfArgs () {
      RaidBootType=$1
      RaidBootDevice=$2
      RaidConfigPath=$3
  }
  ########################################################
  ################### MAIN linuxrc #######################
  ########################################################
  # monta il filesystem proc
  /bin/mount /proc

  # Prende dalla linea di comando la partizione di boot e la posizione
  # della configurazione
  CMDLINE=`/bin/cat /proc/cmdline`
  for Parameter in $CMDLINE; do
      Parameter=$( IFS='='; echo ${Parameter} )
      case $Parameter in
          Raid*) SplitKernelArg $Parameter;;
      esac
  done

  # controlla 'required raid boot'
  if [ -z "${Raid_Conf}" ]; then
      Warning Kernel command line \'Raid_Conf\' missing
      FaultExit
  fi
  SplitConfArgs $Raid_Conf

  # monta temporaneamente la partizione di boot
  /bin/mount -t ${RaidBootType} ${RaidBootDevice} /mnt

  # prende i file della directory etc dal sistema raid primario
  pushd /etc

  # questo verr decompresso nella directory /etc (vedi rc.6)
  if [ ! -f /mnt/${RaidConfigPath}/raidboot.etc ]; then
  # cattive notizie, questo file dovrebbe esserci
      Warning required file \'raidboot.etc\' \
      missing from ${RaidBootDevice}/${RaidConfigPath} \\n \
      \\tUsing rescue system defaults
  else
      /bin/tar -xf /mnt/${RaidConfigPath}/raidboot.etc
  fi
  # cerca il 'vero' dispositivo raidboot per questo boot
  # il percorso dello stato e il nome di raidX.conf
  if [ ! -f /mnt/${RaidConfigPath}/raidboot.cfg ]; then
  # cattive notizie, questo file dovrebbe esserci
      Warning required file 'raidboot.cfg' \
      missing from ${RaidBootDevice}/${RaidConfigPath}\\n \
      \\tUsing rescue system defaults
  # Prendi il primo nome di file raidX.conf in $RArg1
      RaidBootDevs=$RaidBootDevice
      RaidStatusPath=$RaidConfigPath
      for RaidConfigEtc in $( ls raid*.conf )
      do break; done
  else
      {
      read RaidBootDevs
      read RaidStatusPath
      read RaidConfigEtc
      } < /mnt/${RaidConfigPath}/raidboot.cfg

  fi
  popd
  /bin/umount /mnt

  # Nel caso in cui non trovi il file di stato raid setta un flag
  #
  RAIDOWN="raidboot.ro not found"
  RAIDREF="raidgood.ref not found"
  echo "Reading md0 shutdown status."

  # cerca lo stato di shutdown raid
  for Device in ${RaidBootDevs}
  do
  # i tipi di questi filesystem dovrebbero essere in 'fstab'
  #  le partizioni devono essere montate per avere uno shutdown raid pulito
      /bin/mount ${Device} /mnt
      if [ -f /mnt/${RaidStatusPath}/raidboot.ro ]; then
          RAIDOWN=`/bin/cat /mnt/${RaidStatusPath}/raidboot.ro`
          RAIDREF=`/bin/cat /mnt/${RaidStatusPath}/raidgood.ref`
          /bin/umount /mnt
          break
      fi
      /bin/umount /mnt
  done
  # Controlla che lo shutdown sia avvenuto in modo pulito
  if [ "${RAIDOWN}" != "${RAIDREF}" ]; then
      Warning shutdown ERROR ${RAIDOWN}
      FaultExit
  fi

  # L'array raid  pulito, rimuovi i file di stato di shutdown
  for Device in ${RaidBootDevs}
  do
      /bin/mount ${Device} /mnt
      /bin/rm -f /mnt/${RaidStatusPath}/raidboot.ro
      /bin/umount /mnt
  done

  # Scrivi un superblock pulito su tutti i dispositivi raid

  echo "write clean superblocks"
  /sbin/mkraid -f --only-superblock /etc/${RaidConfigEtc}

  # Attiva gli array raid
  if [ -z "$Raid_ALT" ]; then
      /sbin/mdadd -ar
  else
      /sbin/mdadd $Raid_ALT
  fi

  #  Se ci sono errori - ESCI e lascia funzionante il sistema di recupero
  if [ $? -ne 0 ]; then
     Warning some RAID device has errors
     FaultExit
  fi

  # Tutto va bene, fai montare /dev/md0 al kernel
  # e d al kernel di assumere /dev/md0 come il dispsitivo root
  # Il valore 0x900  il numero di dispositivo calcolato come:
  #  256*numero_major + numero_minor
  echo "/dev/md0 mounted on root"
  echo 0x900>/proc/sys/kernel/real-root-dev
  # umount /proc to deallocate initrd device ram space
  /bin/umount /proc
  exit
  #------------------ end linuxrc ----------------------



  Aggiungi 'linuxrc' al device di boot initrd

          cd /root/raidboot
          chmod 777 linuxrc
          cp -p linuxrc mnt




  4.12.  Modificare gli script rc per lo shutdown

  Per completare l'installazione, modifica gli script rc in modo da
  salvare lo stato degli md sul vero dispositivo di root quando si
  verifica lo shutdown.

  Nella slackware questi script sono rc.0 -> rc.6
  Nella debian 'bo' sono sia 'halt' che 'reboot'

  Se implementi questo in un'altra distribuzione, per favore invia per
  e-mail le istruzioni e file di esempio in modo che possano essere inclusi qui.


  Ho modificato leggermente il metodo per lo stop raid di Bohumil
  Chalupa. La sua soluzione originale  presentata in ``Appendice A''.
  Poich non ci sono partizioni linux libere sul sistema di produzione
  tranne md0, le partizioni di boot sono usate per memorizzare lo stato
  raidOK readonly. Ho scelto di scrivere su ognuna copia della
  partizione di boot un file contenente lo stato dell'array md allo
  shutdown il cui significato : il dispositivo md  stato rimontato in
  sola lettura.  Questo fa s che il sistema possa continuare a
  funzionare anche nel caso che uno dei drive muoia.

  Lo script di shutdown  stato modificato in modo da richiamare
  ``rc.raidown'', che salva le informazioni necessarie per effettuare
  effettuare il reboot e montare il dispositivo raid. Alcuni esempi di
  script di shutdown per varie distribuzioni di linux si trovano in
  ``Appendice B''.


  Per catturare lo stato allo shutdown dell'array raid inserisci una
  chiamata a ``rc.raidown'' dopo tutte le istruzioni case (se presenti)
  ma prima dell'inizio dello shutdown vero e proprio (kill, salvataggi
  di stato ecc.) e prima che i filesystem siano smontati.

  ############ Salva informazioni di boot raid e stato ##############
  #
    if [ -x /etc/rc.d/rc.raidown ]; then
      /etc/rc.d/rc.raidown
    fi
  ################## fine del boot raid #########################


  Una volta che tutti i file system sono smontati (il file system di
  root non verr smontato) ma prima di qualsiasi controllo relativo allo
  stato della mancanza di corrente aggiungi:

  ################ per array raid #########################
  # Ferma tutti gli array raid conosciuti (salvo root che non si ferma)
    if [ -x /sbin/mdstop ]; then
      echo "Stopping raid"
      /sbin/mdstop -a
    fi
  ##########################################################


  Questo fermer in modo pulito tutti i dispositivi di raid tranne il
  dispositivo di root. Il suo stato  passato in raidstat.ro al prossimo
  boot.

  Copia il file rc sul tuo nuovo array raid, sul file system di recupero
  che  ancora montato come /root/raidboot/mnt e sul sistema usato per
  lo sviluppo se si trova sulla stessa macchina.

  Modifica etc/fstab sul filesystem di recupero in modo opportuno ed
  assicurati che mdtab sul filesystem di recupero sia corretto.

  Adesso copia il disco di recupero sulla tua partizione dos, e tutto
  dovrebbe essere pronto per eseguire il boot con il dispositivo raid
  come root.

          umount mnt
          losetup -d /dev/loop0
          gzip -9 rescue


  Copia rescue.gz sulle tue partizioni di boot.

  Tutto ci che rimane  creare il file di configurazione raidboot.conf
  e controllare il nuovo file system eseguendo il reboot.

  4.13.  Configurare RAIDBOOT - raidboot.conf

  I commenti che seguono il file di configurazione di esempio spiegano
  ciascuna delle tre linee. Questo file di esempio  relativo ad un
  array scsi raid5 con 4 drive con partizioni di boot duplicate sui
  drive sda1 e sdb1.  Sostituisci invece i parametri relativi ai tuoi
  file system.

    /dev/sda1 /dev/sdb1
    linux
    raid5.conf
  # i commenti possono essere messi solo 'dopo' le tre
  # linee di configurazione.
  #
  # Questo  'raidboot.conf'
  #
  # linea uno, le partizioni contenenti il sistema raid-rescue 'initrd'
  #       Non  necessario eseguire il boot da queste partizioni; comunque,
  #       poich il sistema di recupero non entra su un solo floppy, 
  #       necessario sapere quali partizioni devono essere usate per caricare
  #       il sistema di recupero
  #
  # linea due, il percorso del file di configurazione raidboot
  #       La posizione dello stato di shutdown, ecc... a tempo di boot
  #       NON include le informazioni sul punto di mount, solo il 'percorso'
  #       /punto_di_mount/'percorso'
  #
  # linea tre, il nome del file di configurazione raid
  #       Il file di configurazione raid corrente, ad esempio
  #       raid1.conf, raid5.conf





  4.14.  Le variabili del kernel per RESCUE e RAID

  Ci sono due variabili del kernel per il sistema di recupero e RAID,
  solo la prima deve essere specificata.

    Raid_Conf=msdos,/dev/sda1,raidboot

       Questa variabile punta al dispositivo raid di boot e al file
       di configurazione. Per il floppy di boot di recupero puoi
       specificarla alla linea di comando del kernel o nei file di
       boot di loadlin o di lilo.


       formato: 'filesystem-type,device,path-to-config-from-mount
       point'


    Raid_ALT=-r,-p5,/dev/md0,/dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3

       Parametri alternativi per mdadd necessari quando si effettua
       il boot con array raid non ridondanti. Questi sono i
       parametri da linea di comando, separati da virgole, per
       mdadd. A meno che non siano necessari per avviare un array
       malfunzionante/non ridondante, COMMENTATELI O SPECIFICATELI
       CON UN 'NULL'.


       i.e. Raid_ALT=


  Entrambi questi parametri possono essere specificati nel file di boot
  di lilo o loadlin o nella linea di comando del kernel di loadlin.
  Bisogna fare attenzione, comunque, a non eccedere la lunghezza massima
  di linea nel caso si usi la linea di comando (128 caratteri).

  Eseguendo il boot con lilo, i parametri sono inclusi nel file di
  configurazione di lilo nella forma:

  append="Raid_Conf=msdos,/dev/sda1,raidboot"
  append="Raid_ALT=-r,-p5,/dev/md0,/dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3"


  Vedi man lilo.conf per informazioni pi dettagliate.

  Poich ho dell'hardware che richiede utility di configurazione DOS, ho
  una piccola partizione dos nel sistema.  Quindi, uso loadlin per
  eseguire il boot del sistema raid5 dalla partizione dos con un mirror
  (una copia) del disco. Un metodo identico  usato per il sistema
  raid1. L'esempio sotto usa loadlin, ma la procedura  molto simile per
  lilo.

  Il mio sistema dos contiene fra le utility un piccolo editor, cos
  posso modificare i parametri di boot di loadlin se necessario,
  permettendomi di effettuare il reboot del sistema linux sul mio disco
  di swap mentre faccio dei test.

  Il sistema dos contiene questo albero di directory per linux

          c:\raidboot.bat
          c:\raidboot\loadlin.exe
          c:\raidboot\zimage
          c:\raidboot\rescue.gz
          c:\raidboot\raidboot.cfg
          c:\raidboot\raidboot.etc
          c:\raidboot\raidgood.ref
          c:\raidboot\raidstat.ro       (solo allo shutdown)



  linux.bat contiene:

  ---------------------- linux.bat ---------------------------
  echo "Start the LOADLIN process:"
  c:\raidboot\loadlin @c:\raidboot\boot.par
  -------------------- end linux.bat -------------------------


  boot.par contiene:



















          # loadlin boot parameter file
          #
          # version 1.02 3-6-98

          # immagine del kernel di linux
          c:\linux\zimage

          # dispositivo target di root
          root=/dev/md0
          #root=/dev/ram0
          #root=/dev/sdc5

          # monta il dispositivo di root come 'ro'
          ro

          # dimensione del ram disk
          ramdisk_size=16384

          # nome del file initrd
          initrd=c:\raidboot\rescue.gz
          #noinitrd

          # la memoria finisce qui
          mem=131072k

          # punta al dispositivo raid di boot, al file di configurazione
          # per il boot da floppy di recupero, puoi specificarlo
          # sulla linea di comando invece di qui
          # formato 'tipo-di-filesystem,dispositivo,percorso-di-config-frm_mntpnt'
          Raid_Conf=msdos,/dev/sda1,raidboot

          # Parametri alternativi di mdadd
          # necessari per il boot con raid non ridondante
          # altrimenti COMMENTARE O SPECIFICARE 'NULL'
          #Raid_ALT=-r,-p5,/dev/md0,/dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3

          # dispositivi ethernet
          ether=10,0x300,eth0

  ***** >> NOTA!! la sola differenza fra forzare l'esecuzione del sistema
          di recupero e montare il dispositivo raid  il parametro di loadlin

                  root=/dev/ram0          per il sistema di recupero
                  root=/dev/md0           per RAID

                  Con root=/dev/ram0 il dispositivo RAID non sar montato
                  e il sistema di recupero partir incondizionatamente.



  Se l'array RAID fallisce, il sistema di recupero viene lasciato
  montato e funzionante.


  5.  Configurare il sistema RAID.


  5.1.  Sono stati configurati due sistemi con schede madri identiche.
  Specifiche di sistema.







                                    Raid-1          Raid-5
  Motherboard:    Iwill P55TU     dual ide        adaptec scsi
  Processore:     Intel P200
  Dischi:                         2ea  7 gig      4 ea Segate 4.2 gig
                                  Maxtors         wide scsii


  I drive sono indicati da linux con i nomi da 'sda' a 'sdd' sul sistema
  raid5 e da 'hda' a 'hdc' sul sistema raid1.


  5.2.  Partitionare i dischi rigidi.

  Poich testare un grosso array raid di root montabile  difficile a
  causa del problema di reboot causato da ckraid, ho ripartizionato il
  mio spazio di swap in modo da includere una partizione RAID pi
  piccola a scopo di test, sda6, sdb6, sdc6, sdd6 e una piccola coppia
  di partizioni, root e /usr/src per sviluppare e testare il kernel raid
  e gli strumenti.  Forse ti pu essere utile.















































          <bf/SISTEMA DI SVILUPPO - RAID5/
     Dispos.      Sistema         Dim.    Scopo

    /dev/sda1     dos boot        16 meg  partizione di boot
  * /dev/sda2     extended        130 meg (vedi sotto)
    /dev/sda3     linux native    4 gig   raid5-1 primario
  ----------------------sda2------------------------------
  * /dev/sda5     linux swap      113 meg spazio di swap
  * /dev/sda6     linux native    16 meg  test raid5-1
  ========================================================
    /dev/sdb1     dos boot        16 meg  copia partizione di boot
  * /dev/sdb2     extended        130 meg (vedi sotto)
    /dev/sdb3     linux native    4 gig   raid5-2 primario
  ----------------------sdb2------------------------------
  * /dev/sdb5     linux swap      113 meg spazio di swap
  * /dev/sdb6     linux native    16 meg  test raid5-2
  ========================================================
  * /dev/sdc2     extended        146 meg (vedi sotto)
    /dev/sdc3     linux native    4 gig   raid5-3 primario
  ----------------------sdc2------------------------------
  * /dev/sdc5     linux swap      130 meg partiz. di root di sviluppo
  * /dev/sdc6     linux native    16 meg  test raid5-3
  ========================================================
  * /dev/sdd2     extended        146 meg (vedi sotto)
    /dev/sdd3     linux native    4 gig   raid5-4 primario
  ----------------------sdd2------------------------------
  * /dev/sdd5     linux swap      130 meg /usr/src di sviluppo
  * /dev/sdd6     linux native    16 meg  test raid5-4


          <bf/SISTEMA DI SVILUPPO - RAID1/
     Dispos.      Sistema         Dim.    Scopo

    /dev/hda1     dos             16meg   partizione di boot
  * /dev/hda2     extended        126m    (vedi sotto)
    /dev/hda3     linux           126m    partizione root di sviluppo
    /dev/hda4     linux           6+gig   raid1-1
  ----------------------hda2------------------------------
  * /dev/hda5     linux            26m    test raid1-1
  * /dev/hda6     linux swap      100m
  ========================================================

    /dev/hdc1      semplicemente una copia esatta di hda1 cos che
                  la partizione pu essere resa attiva se hda fallisce
  * /dev/hdc2     extended        126m    (vedi sotto)
    /dev/hdc3     linux           126m    /usr/src di sviluppo
    /dev/hdc4     linux           6+gig   raid1-2
  ----------------------hdc2------------------------------
  * /dev/hdc5     linux            26m    test raid1-2
  * /dev/hdc6     linux swap      100m


  Le partizioni sdx2 e hdx3 sono state definite 'swap' dopo lo sviluppo
  di questa utility. Avrei potuto farla su un'altra macchina, comunque,
  le librerie e i kernel sono vecchi di un anno o pi sulle mie altre
  macchine linux, e ho preferito costruirla sulla macchina target.

  Lo schema di partizionamento  stato scelto in modo tale che, nel caso
  che uno qualsiasi dei dischi fallisca catastroficamente, il sistema
  continui a funzionare e sia ancora possibile eseguire il boot con il
  minimo sforzo e senza perdita di dati.

    Se un qualsiasi drive fallisce, la procedura di boot terminer e
     verr fatto partire il sistema di recupero. L'esame dei messaggi su
     schermo o /dosx/raidboot/raidstat.ro informer l'operatore sullo
     stato dell'array.
    Se sda1 (raid5) o hda1 (raid1) fallisce, la partizione di boot di
     backup del dos deve essere resa 'attiva' e il bios deve riconoscere
     la nuova partizione come dispositivo di boot o deve essere spostato
     fisicamente alla posizione xda.

     In alternativa, il sistema potrebbe essere fatto partire con un
     floppy disk usando l'immagine initrd sul boot drive di backup che
     rimane.  Il sistema raid pu poi essere reso attivo ancora con:

              "/sbin/mkraid /etc/raid<it/x/.conf -f --only-superblock"


  per ricostruire i superblocchi rimanenti.

    Fatto questo,


             mdadd -ar



    Esamina lo stato dell'array per verificare che tutto sia OK poi
     rimpiazza il riferimento giusto all'array con lo stato corrente
     finch il disco mal funzionante pu essere riparato o sostituito.


             cat /proc/mdstat | grep md0 > /dosx/raidboot/raidgood.ref

             shutdown -r now


  per fare un reboot pulito, e il sistema  ancora in funzione.

  6.  Costruire il file system RAID.

  Questa  la descrizione dei miei sistemi RAID di cui parlo nelle
  specifiche di sistema. Il tuo sistema potrebbe avere un'architettura
  RAID diversa, perci apporta le modifiche opportune. Leggi anche le
  pagine di manuale e QuickStart.RAID che  incluso nei raidtools-0.42.

  6.1.  /etc/raid5.conf

























          # raid-5: configurazione
          raiddev                 /dev/md0
          raid-level              5
          nr-raid-disks           4
          chunk-size              32

          # Parity placement algorithm
          parity-algorithm        left-symmetric

          # Spare disks for hot reconstruction
          #nr-spare-disks         0

          device                  /dev/sda3
          raid-disk               0

          device                  /dev/sdb3
          raid-disk               1

          device                  /dev/sdc3
          raid-disk               2

          device                  /dev/sdd3
          raid-disk               3



  6.2.  /etc/raid1.conf


          # raid-1 configurazione
          raiddev                 /dev/md0
          raid-level              1
          nr-raid-disks           2
          nr-spare-disks          0

          device                  /dev/hda4
          raid-disk               0

          device                  /dev/hdc4
          raid-disk               1



  6.3.  Procedure per la costruzione passo a passo di un file system
  RAID.

  Per il mio sistema RAID5 ho fatto un'installazione completa di:

          Slackware-3.4   qualsiasi distribuzione recente dovrebbe andare bene
          linuxthreads-0.71
          raidtools-0.42
          linux-2.0.33 con la patch raid145 e la patch di Gadi



  Crea e formatta il dispositivo raid.

          mkraid /etc/raid5.conf
          mdcreate raid5 /dev/md0 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3
          mdadd -ar
          mke2fs /dev/md0
          mkdir /md
          mount -t ext2 /dev/md0 /md



  Crea i file di riferimento che verranno usati da reboot, ci potrebbero
  essere delle differenze sul tuo sistema.

          cat /proc/mdstat | grep md0 > /dosa/raidboot/raidgood.ref
          cat /proc/mdstat | grep md0 > /dosb/raidboot/raidgood.ref


  Usa Slackware-3.4 o un'altra distribuzione per costruire il tuo SO

          setup


  Specifica '/md' come target, e il sorgente che usi normalmente. Scegli
  ed installa i diskset che ti interessano tranne il kernel. Configura
  il sistema, ma salta la sezione su lilo e sul boot del kernel. Esci da
  setup.

  Installa 'pthreads'

          cd /usr/src/linuxthreads-0.71


  modifica il Makefile e specifica

          BUILDIR=/md

          make
          make install


  Installa 'raidtools'

          cd /usr/src/raidtools-0.42
          configure --sbindir=/md/sbin --prefix=/md/usr


  correggi l'errore dei raidtools che si verifica al make install

          cd /md/sbin
          rm mdrun
          rm mdstop
          ln -s mdadd mdrun
          ln -s mdadd mdstop


  Crea /dev/mdx

          cp -a /dev/md* /md/dev


  Aggiungi la configurazione del sistema dal sistema corrente (ignora
  gli errori).

          cp -dp /etc/* mnt/etc
          cp -dp /etc/rc.d/* mnt/etc/rc.d         (include il nuovo rc.6)
          mkdir  mnt/lib/modules
          cp -a  /lib/modules/2.x.x mnt/lib/modules <--- il 2.x.x corrente


  Adatta i file seguenti al tuo file system






          cd /md

  Non-network
          etc/fstab       inserisci i dispositivi di root e raid corretti.
          etc/mdtab       dovrebbe funzionare
  Network
          etc/hosts
          etc/resolv.conf
          etc/hosts.equiv         e file correlati
          etc/rc.d/rc.inet1       correggi il numero ip#, mask, gateway, ecc...
          etc/rc.d/rc.S           togli tutta la sezione sullo
                                  stato del file system
                  da:
                          # Test to see if the root partition isread-only
                  a, ma non incluso:
                          # remove /etc/mtab* so that mount will .....
                                  Questo evita il fastidioso avvertimento
                                  sul fatto che il ramdisk  montato rw.
          etc/rc.d/rc.xxxxx       altri se necessario
          root/.rhosts            se presente
          home/xxxx/xxxx          altri se necessario

   ATTENZIONE:    La procedura sopra muove i tuoi file password e shadow
                  sul nuovo file system!!!!!

   ATTENZIONE:    Puoi non volerlo fare per ragioni di sicurezza.


  Crea le directory necessarie a montare /dev/disk... Queste sono speci
  fiche del sistema. Nel mio ho bisogno di:

          cd /md          <--- nuovo root del file system
          mkdir dosa                      punto di mount della partizione dos
          mkdir dosb                      punto di mount del mirror dos


  Il nuovo file system  completo. Assicurati di salvare lo stato di
  riferimento di md sul 'vero' dispositivo di root e sei pronto ad
  effettuare il boot.

  monta le partizioni dos su dosa e dosb

          cat /proc/mdstat | grep md0 > /dosa/raidboot/raidgood.ref
          cat /proc/mdstat | grep md0 > /dosb/raidboot/raidgood.ref

          mdstop /dev/md0




  7.  Un'ultima cosa.

  Ricorda che un esperto  una persona che ne sa almeno l'1% pi di te
  riguardo a un particolare soggetto. Tienilo in mente se decidi di
  chiedermi aiuto per e-mail. Prover, ma ho fatto queste cose solo una
  volta per raid1 e una volta per raid5!

  Michael Robinton Michael@bzs.org


  8.  Appendice A. - Lo shutdown per md0 di Bohumil Chalupa

  Il post di Bohumil Chalupa sulla lista linux raid a proposito della
  soluzione del problema di mdstop per raid1 e 5. La sua soluzione non
  tiene conto della possibilit che il dispositivo raid venga corrotto
  allo shutdown.  Cos ho aggiunto un semplice confronto di stato
  effettuato al boot con un buono stato di riferimento. Questo permette
  all'operatore di intervenire se un disco nell'array ha dei problemi.
  Una descrizione di tutto ci si trova nella parte principale di questo
  stesso documento.






























































  > From: Bohumil Chalupa <bochal@apollo.karlov.mff.cuni.cz>
  > Sono riuscito ad eseguire il boot di initrd e ad usare linuxrc per far
  > partire l'array RAID1, per poi far diventare root /dev/md0.
  >
  > Non conosco, per, un modo per _fermare_ in modo pulito l'array.

  Beh, dovr rispondermi da solo :-)

  > Date: Mon, 29 Dec 1997 02:21:38 -0600 (CST)
  > From: Edward Welbon <welbon@bga.com>
  > Subject: Re: smontare il dispositivo raid di root
  >
  > Per dispositivi md diversi da raid0, lo stato che deve essere salvato
  >  noto probabilmente solo una volta che tutte le operazioni di scrittura
  > sono state completate. Un tale stato non pu essere naturalmente salvato
  > sulla directory root una volta montata in sola lettura. In tal caso,
  > dovresti poter montare un filesystem scrivibile "X" sul root in sola
  > lettura e poter scrivere su "X" (ricordo di aver fatto una cosa del
  > genere durante le operazioni di "recupero", ma non come procedura
  > automatica)
  >
  > Il filesystem "X" sar presumibilmente un dispositivo di boot da cui
  > il raid (durante l'esecuzione di linuxrc via initrd) prender il suo
  > stato iniziale. Fortunatamente raid0 non deve scrivere nessuno stato
  > (anche se sarebbe piacevole poter scrivere i checksum su mdtab dopo
  > un mdstop). Giocher un po' con queste cose che non sembrano troppo
  > difficili, anche se il "diavolo"  sempre nei "dettagli".

  Gi,  cos.
  Ho gi avuto questa idea, ma non ho avuto tempo per provare. L'ho
  fatto ieri, e funziona.

  Con il mio RAID1 (mirror), non salvo nessun dato di checksum o
  superblock raid.  Salvo solo un'informazione sulla "vera" partizione
  di boot, che il volume di root md  stato rimontato in sola lettura
  durante lo shutdown. Poi, durante il boot, lo script linuxrc esegue
  mkraid --only-superblock se trova questa informazione, altrimenti
  esegue ckraid.
  Questo significa che le informazioni del superblock raid non vengono
  aggiornate durante lo shutdown; sono aggiornate a tempo di boot.  Non
   una cosa molto pulita, temo, :-( ma funziona.

  Uso Slackware e initrd.md di Edward Welbon per eseguire il boot del
  dispositivo raid di root.
  Per quanto mi ricordo ora, gli unici file modificati sono mkdisk e
  linuxrc, e lo script di shutdown /etc/rc.d/rc.6 E lilo.conf,
  naturalmente.

  Seguono le parti pi importanti.

  Bohumil Chalupa

  --------------- segue mio.linuxrc  -----------------
  #!/bin/sh
  # ci serve /proc
  /bin/mount /proc
  # avvia il dispositivo md0. Lascia fare il resto agli script /etc/rc.d
  # Si dovrebbe fare il meno possibile qui
  # ________________________________________
  # shutdown test e ricreazione di root raid1
  # /start deve essere creato sull'immagine rd in my.mkdisk
  echo "preparing md0: mounting /start"
  /bin/mount /dev/sda2 /start -t ext2
  echo "reading saved md0 state from /start"
  if [ -f /start/root.raid.ok ]; then
   echo "raid ok, modyfying superblock"
   rm /start/root.raid.ok
   /sbin/mkraid /etc/raid1.conf -f --only-superblock
  else
   echo "raid not clean, runing ckraid --fix"
   /sbin/ckraid --fix /etc/raid1.conf
  fi
  echo "unmounting /start"
  /bin/umount /start
  # _________________________________________
  #
  echo "adding md0 for root file system"
  /sbin/mdadd /dev/md0 /dev/sda1 /dev/sdb1
  echo "starting md0"
  /sbin/mdrun -p1 /dev/md0
  # d al kernel che vogliamo far diventare /dev/md0 il dispositivo di root
  # arriviamo al valore 0x900 come 256*numero_di_dispositivo_major + numero_minor
  echo "setting real-root-dev"
  /bin/echo 0x900>/proc/sys/kernel/real-root-dev
  #  smonta /proc in modo da poter deallocare il ram disk
  echo "unmounting /proc"
  /bin/umount /proc
  /bin/echo "We are hopefully ready to mount /dev/md0 (major 9, minor 0) as
  root"
  exit
  --------------- fine di mio.linuxrc ----------------------------------


  ----------- segue un estratto da /etc/rc.d/rc.6  -----------------
    # Disattiva lo swap poi smonta i file system locali.
    echo "Turning off swap."
    swapoff -a
    echo "Unmounting local file systems."
    umount -a -tnonfs
    # Non rimontare i volumi root UMSDOS:
    if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
      mount -n -o remount,ro /
    fi

    # Salva lo stato raid
    echo "Saving RAID state"
    /bin/mount -n /dev/sda2 /start -t ext2
    touch /start/root.raid.ok
    /bin/umount -n /start

  -------------- fine dell'estratto da rc.6 ------------------------


  ------------------ segue una parte di mio.mkdisk ----------------------
  #
  #  adesso abbiamo un filesystem pronto da riempire, e dobbiamo metterci
  #  alcune directory importanti. Ho avuto tantissimi guai finch non ho
  #  creato un mtab intatto.  Nel mio caso,  conveniente sovrascrivere
  #  /etc/mdtab, in questo modo posso attivare md con un semplice
  #  "/sbin/mdadd -ar" in linuxrc.
  cp -a $ROOT/etc $MOUNTPNT 2>cp.stderr 1>cp.stdout
  rm -rf $MOUNTPNT/etc/mtab
  rm -rf $MOUNTPNT/etc/ppp*
  rm -rf $MOUNTPNT/etc/termcap
  rm -rf $MOUNTPNT/etc/sendmail*
  rm -rf $MOUNTPNT/etc/rc.d
  rm -rf $MOUNTPNT/etc/dos*
  cp -a $ROOT/sbin $ROOT/dev $ROOT/lib $ROOT/bin $MOUNTPNT 2>>cp.stderr
  1>>cp.stdout
  # _____________________________________________________________________
  #  RAID: servono mkraid e ckraid
  cp -a $ROOT/usr/sbin/mkraid $ROOT/usr/sbin/ckraid $MOUNTPNT/sbin
  2>>cp.stderr 1>>cp.stdout
  # ---------------------------------------------------------------------
  #  sembra che init non funzioni se non ha utmp. Forse ci si pu lavorare
  #  molto. Non dir qual  il vero problema 8-).
  #
  mkdir $MOUNTPNT/var $MOUNTPNT/var/log $MOUNTPNT/var/run $MOUNTPNT/initrd
  touch $MOUNTPNT/var/run/utmp $MOUNTPNT/etc/mtab
  chmod a+r $MOUNTPNT/var/run/utmp $MOUNTPNT/etc/mtab
  ln -s /var/run/utmp $MOUNTPNT/var/log/utmp
  ln -s /var/log/utmp $MOUNTPNT/etc/utmp
  ls -lstrd $MOUNTPNT/etc/utmp $MOUNTPNT/var/log/utmp $MOUNTPNT/var/run/utmp
  #
  #  poich voglio cambiare il punto di mount, ho bisogno di questo
  #  nonostante avessi potuto fare un "mkdir /proc" in linuxrc.
  #
  mkdir $MOUNTPNT/proc
  chmod 555 $MOUNTPNT/proc
  #
  #  ------------------------------------------------------
  #  monteremo il vero dispositivo di boot in /start temporaneamente
  #  per verificare lo stato del root raid salvato durante lo shutdown
  #
  mkdir $MOUNTPNT/start
  #  -------------------------------------------------------
  #
  #  ci serve linuxrc  (dopo tutto,  il punto focale di questo esercizio).
  #
  if [ -x ./my.linuxrc ]; then
    cp -a ./my.linuxrc $MOUNTPNT/linuxrc
    chmod 777 $MOUNTPNT/linuxrc
  else
     ln -s /bin/sh $MOUNTPNT/linuxrc
  fi
  #
  ----------------- fine di parte di mio.mkdisk -----------------




  9.  Appendice B. - Script di SHUTDOWN di esempio


    ``Slackware''

    ``Debian''


  9.1.  Slackware - /etc/rc.d/rc.6


















  #! /bin/sh
  #
  # rc.6          This file is executed by init when it goes into runlevel
  #               0 (halt) or runlevel 6 (reboot). It kills all processes,
  #               unmounts file systems and then either halts or reboots.
  #
  # Version:      @(#)/etc/rc.d/rc.6      1.50    1994-01-15
  #
  # Author:       Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org>
  # Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
  #
  # Modified by:  Michael A. Robinton < michael@bizsystems.com >
  #               to add call to rc.raidown
    # Set the path.
    PATH=/sbin:/etc:/bin:/usr/bin

    # Set linefeed mode to avoid staircase effect.
    stty onlcr

    echo "Running shutdown script $0:"

    # Find out how we were called.
    case "$0" in
          *0)
                  message="The system is halted."
                  command="halt"
                  ;;
          *6)
                  message="Rebooting."
                  command=reboot
                  ;;
          *)
                  echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
                  exit 1
                  ;;
    esac

  ##### Salva informazioni sul boot e sullo stato raid #####
  #
  if [ -x /etc/rc.d/rc.raidown ]; then
     /etc/rc.d/rc.raidown
  fi
  ################## fine raid boot ########################

    # Kill all processes.
    # INIT is supposed to handle this entirely now, but this didn't always
    # work correctly without this second pass at killing off the processes.
    # Since INIT already notified the user that processes were being killed,
    # we'll avoid echoing this info this time around.
    if [ "$1" != "fast" ]; then # shutdown did not already kill all processes
      killall5 -15
      killall5 -9
    fi

    # Try to turn off quota and accounting.
    if [ -x /usr/sbin/quotaoff ]
    then
          echo "Turning off quota."
          /usr/sbin/quotaoff -a
    fi
    if [ -x /sbin/accton ]
    then
          echo "Turning off accounting."
          /sbin/accton
    fi

    # Before unmounting file systems write a reboot or halt record to wtmp.
    $command -w

    # Save localtime
    [ -e /usr/lib/zoneinfo/localtime ] && cp /usr/lib/zoneinfo/localtime /etc

    # Asynchronously unmount any remote filesystems:
    echo "Unmounting remote filesystems."
    umount -a -tnfs &

    # Turn off swap, then unmount local file systems.
    echo "Turning off swap."
    swapoff -a
    echo "Unmounting local file systems."
    umount -a -tnonfs
    # Don't remount UMSDOS root volumes:
    if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
      mount -n -o remount,ro /
    fi

  ################ per gli array raid #########################
  # Ferma tutti gli array raid conosciuti (tranne root)
  if [ -x /sbin/mdstop ]; then
    echo "Stopping raid"
    /sbin/mdstop -a
  fi
  ##########################################################

    # See if this is a powerfail situation.
    if [ -f /etc/powerstatus ]; then
      echo "Turning off UPS, bye."
      /sbin/powerd -q
      exit 1
    fi

    # Now halt or reboot.
    echo "$message"
    [ ! -f /etc/fastboot ] && echo "On the next boot fsck will be FORCED."
    $command -f
  ############### end rc.6 #################################




  9.2.  Debian bo - /etc/init.d/halt and /etc/init.d/reboot

  Le modifiche mostrate di seguito per i file bo halt e reboot di Debian
  NON SONO TESTATE. Se le testate, per favore inviatemi una e-mail in
  modo che io possa togliere questo commento.


  9.2.1.  /etc/init.d/halt














  #! /bin/sh
  #
  # halt          The commands in this script are executed as the last
  #               step in runlevel 0, ie halt.
  #
  # Version:      @(#)halt  1.10  26-Apr-1997  miquels@cistron.nl
  #

  PATH=/sbin:/bin:/usr/sbin:/usr/bin

  ##### Salva informazioni sul boot e sullo stato raid #####
  #
  if [ -x /etc/rc.d/rc.raidown ]; then
     /etc/rc.d/rc.raidown
  fi
  ################## fine raid boot ########################

  # Kill all processes.
  echo -n "Sending all processes the TERM signal... "
  killall5 -15
  echo "done."
  sleep 5
  echo -n "Sending all processes the KILL signal... "
  killall5 -9
  echo "done."

  # Write a reboot record to /var/log/wtmp.
  halt -w

  # Save the random seed between reboots.
  /etc/init.d/urandom stop

  echo -n "Deactivating swap... "
  swapoff -a
  echo "done."

  echo -n "Unmounting file systems... "
  umount -a
  echo "done."

  mount -n -o remount,ro /

  ################ per gli array raid #########################
  # Ferma tutti gli array raid conosciuti (tranne root)
  if [ -x /sbin/mdstop ]; then
    echo "Stopping raid"
    /sbin/mdstop -a
  fi
  ##########################################################

  # See if we need to cut the power.
  if [ -x /etc/init.d/ups-monitor ]
  then
          /etc/init.d/ups-monitor poweroff
  fi

  halt -d -f
  ############# end halt ####################



  9.2.2.  /etc/init.d/reboot




  #! /bin/sh
  #
  # reboot        The commands in this script are executed as the last
  #               step in runlevel 6, ie reboot.
  #
  # Version:      @(#)reboot  1.9  02-Feb-1997  miquels@cistron.nl
  #

  PATH=/sbin:/bin:/usr/sbin:/usr/bin

  ##### Salva informazioni sul boot e sullo stato raid #####
  #
  if [ -x /etc/rc.d/rc.raidown ]; then
     /etc/rc.d/rc.raidown
  fi
  ################## fine raid boot ########################

  # Kill all processes.
  echo -n "Sending all processes the TERM signal... "
  killall5 -15
  echo "done."
  sleep 5
  echo -n "Sending all processes the KILL signal... "
  killall5 -9
  echo "done."

  # Write a reboot record to /var/log/wtmp.
  halt -w

  # Save the random seed between reboots.
  /etc/init.d/urandom stop

  echo -n "Deactivating swap... "
  swapoff -a
  echo "done."

  echo -n "Unmounting file systems... "
  umount -a
  echo "done."

  mount -n -o remount,ro /

  ################ per gli array raid #########################
  # Ferma tutti gli array raid conosciuti (tranne root)
  if [ -x /sbin/mdstop ]; then
    echo "Stopping raid"
    /sbin/mdstop -a
  fi
  ##########################################################

  echo -n "Rebooting... "
  reboot -d -f -i




  10.  Appendice C. - altri file di setup


  10.1.  linuxrc``linuxrc file''


  10.2.  loadlin -- linux.bat file - boot.par``linux.bat file -
  boot.par''


  10.3.  linuxthreads Makefile.diff``linuxthreads Makefile.diff''


  10.4.  raid1.conf``raid1.conf''


  10.5.  raid5.conf``raid5.conf''


  10.6.  raidboot.conf``raidboot.conf''


  10.7.  rc.raidown``rc.raidown''

  11.  Appendice D. - script linuxrc e shutdown obsoleti


  11.1.  Lavoro obsoleto - linuxrc

  Questo file linuxrc funziona benissimo con la procedura di shutdown
  mostrata di seguito.













































   ---------------------- linuxrc --------------------
  #!/bin/sh
  # ver 1.07 2-12-98
  # linuxrc - for raid1 using small dos partition and loadlin
  #

  # mount the proc file system
  /bin/mount /proc

  # This may vary for your system.
  # Mount the dos partitions, try both
  # in case one disk is dead
  /bin/mount /dosa
  /bin/mount /dosc

  # Set a flag in case the raid status file is not found
  # then check both drives for the status file
  RAIDOWN="raidstat.ro not found"
  /bin/echo "Reading md0 shutdown status."
  if [ -f /dosa/raidboot/raidstat.ro ]; then
    RAIDOWN=`/bin/cat /dosa/raidboot/raidstat.ro`
    RAIDREF=`/bin/cat /dosc/raidboot/raidgood.ref`
  else
    if [ -f /dosc/raidboot/raidstat.ro ]; then
      RAIDOWN=`/bin/cat /dosc/raidboot/raidstat.ro`
      RAIDREF=`/bin/cat /dosc/raidboot/raidgood.ref`
    fi
  fi

  # Test for a clean shutdown with all disks operational
  if [ "${RAIDOWN} != ${RAIDREF}" ]; then
    echo "ERROR ${RAIDOWN}"
  #  Use the next 2 lines to BAIL OUT and leave rescue running
     /bin/echo 0x100>/proc/sys/kernel/real-root-dev
     exit                 # leaving the error files in dosa/raidboot,etc...
  fi

  # The raid array is clean, proceed by removing
  # status file and writing a clean superblock
  /bin/rm /dosa/raidboot/raidstat.ro
  /bin/rm /dosc/raidboot/raidstat.ro
  /sbin/mkraid /etc/raid1.conf -f --only-superblock

  /bin/umount /dosa
  /bin/umount /dosc

  # Mount raid array
  echo "Mounting md0, root filesystem"
  /sbin/mdadd -ar

  #  If there are errors - BAIL OUT and leave rescue running
  if [ $? -ne 0 ]; then
     echo "RAID device has errors"
  #  Use the next 3 lines to BAIL OUT
     /bin/rm /etc/mtab            # remove bad mtab
     /bin/echo 0x100>/proc/sys/kernel/real-root-dev
     exit
  fi

  # else tell the kernel to switch to /dev/md0 as the /root device
  # The 0x900 value the device number calculated by:
  #  256*major_device_number + minor_device number
  /bin/echo 0x900>/proc/sys/kernel/real-root-dev

  # umount /proc to deallocate initrd device ram space
  /bin/umount /proc
  /bin/echo "/dev/md0 mounted as root"
  exit
  #------------------ end linuxrc ----------------------




  11.2.  Lavoro obsoleto - script di shutdown

  Questa procedura di shutdown funziona benissimo con linuxrc indicato
  in precedenza

  Per catturare lo stato di shutdown dell'array raid, inserisci subito
  prima che i file system vengano smontati:

          RAIDSTATUS=`/bin/cat /proc/mdstat | /usr/bin/grep md0`


  Dopo che tutti i file system sono smontati (il file system di root non
  verr smontato) aggiungi:

          # il dispositivo di root rimane montato RO
          # monta i file system dos RW
          mount -n -o remount,ro /
          echo "Writing RAID read-only boot FLAG(s)."
          mount -n /dosa
          mount -n /dosc
          # create raid mounted RO flag in duplicate
          # containing the shutdown status of the raid array
          echo ${RAIDSTATUS} > /dosa/raidboot/raidstat.ro
          echo ${RAIDSTATUS} > /dosc/raidboot/raidstat.ro

          umount -n /dosa
          umount -n /dosc

          # Ferma tutti gli array raid (tranne root)
          echo "Stopping raid"
          mdstop -a


  Questo fermer in modo pulito tutti i dispositivi raid eccetto root.
  Lo stato di root viene passato al prossimo boot in raidstat.ro.

  Quello che segue  l'intero script di shutdown preso dal mio vecchio
  sistema raid1 Slackware, ho aggiornato raid1 alla nuova procedura con
  il file /etc/raidboot.conf




















  #! /bin/sh
  #
  # rc.6          This file is executed by init when it goes into runlevel
  #               0 (halt) or runlevel 6 (reboot). It kills all processes,
  #               unmounts file systems and then either halts or reboots.
  #
  # Version:      @(#)/etc/rc.d/rc.6      1.50    1994-01-15
  #
  # Author:       Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org>
  # Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
  # Modified by:  Michael A. Robinton, <michael@bzs.org> for RAID shutdown

    # Set the path.
    PATH=/sbin:/etc:/bin:/usr/bin

    # Set linefeed mode to avoid staircase effect.
    stty onlcr

    echo "Running shutdown script $0:"

    # Find out how we were called.
    case "$0" in
          *0)
                  message="The system is halted."
                  command="halt"
                  ;;
          *6)
                  message="Rebooting."
                  command=reboot
                  ;;
          *)
                  echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
                  exit 1
                  ;;
    esac

    # Kill all processes.
    # INIT is supposed to handle this entirely now, but this didn't always
    # work correctly without this second pass at killing off the processes.
    # Since INIT already notified the user that processes were being killed,
    # we'll avoid echoing this info this time around.
    if [ "$1" != "fast" ]; then # shutdown did not already kill all processes
      killall5 -15
      killall5 -9
    fi

    # Try to turn off quota and accounting.
    if [ -x /usr/sbin/quotaoff ]
    then
          echo "Turning off quota."
          /usr/sbin/quotaoff -a
    fi
    if [ -x /sbin/accton ]
    then
          echo "Turning off accounting."
          /sbin/accton
    fi

    # Before unmounting file systems write a reboot or halt record to wtmp.
    $command -w

    # Save localtime
    [ -e /usr/lib/zoneinfo/localtime ] && cp /usr/lib/zoneinfo/localtime /etc

    # Asynchronously unmount any remote filesystems:
    echo "Unmounting remote filesystems."
    umount -a -tnfs &

    # you must have issued
    # 'cat /proc/mdstat | grep md0 > {your boot vol}/raidboot/raidgood.ref'
    # before linuxrc will execute properly with this info
    RAIDSTATUS=`/bin/cat /proc/mdstat | /usr/bin/grep md0 # capture raid status`

    # Turn off swap, then unmount local file systems.
    # clearing mdtab as well
    echo "Turning off swap."
    swapoff -a
    echo "Unmounting local file systems."
    umount -a -tnonfs

    # Don't remount UMSDOS root volumes:
    if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
      mount -n -o remount,ro /
    fi

    # root device remains mounted
    # mount dos file systems RW
    echo "Writing RAID read-only boot FLAG(s)."
    mount -n /dosa
    mount -n /dosc
    # create raid mounted RO flag in duplicate
    # containing the shutdown status of the raid array
    echo ${RAIDSTATUS} > /dosa/raidboot/raidstat.ro
    echo ${RAIDSTATUS} > /dosc/raidboot/raidstat.ro

    umount -n /dosa
    umount -n /dosc

    # Stop all the raid arrays (except root)
    echo "Stopping raid"
    mdstop -a

    # See if this is a powerfail situation.
    if [ -f /etc/power_is_failing ]; then
      echo "Turning off UPS, bye."
      /sbin/powerd -q
      exit 1
    fi

    # Now halt or reboot.
    echo "$message"
    [ ! -f /etc/fastboot ] && echo "On the next boot fsck will be FORCED."
    $command -f





  12.  Appendice E. - La patch di Gadi per il raid stop per il kernel
  linux












  --- linux/drivers/block/md.c.old        Fri Nov 21 13:37:11 1997
  +++ linux/drivers/block/md.c    Sat Dec  6 13:34:28 1997
  @@ -622,8 +622,13 @@
         return do_md_run (minor, (int) arg);

       case STOP_MD:
  -      return do_md_stop (minor, inode);
  -
  +      err = do_md_stop(minor, inode);
  +      if (err) {
  +        printk("md: enabling auto mdstop for %s\n",
  kdevname(inode->i_rdev));
  +        md_dev[minor].auto_mdstop = 1;
  +      }
  +      return err;
  +
       case BLKGETSIZE:   /* Return device size */
       if  (!arg)  return -EINVAL;
       err=verify_area (VERIFY_WRITE, (long *) arg, sizeof(long));
  @@ -692,6 +697,10 @@

     sync_dev (inode->i_rdev);
     md_dev[minor].busy--;
  +  if (!md_dev[minor].busy && md_dev[minor].auto_mdstop) {
  +       do_md_stop(minor, inode);
  +       md_dev[minor].auto_mdstop = 0;
  +  }
   }

   static int md_read (struct inode *inode, struct file *file,
  --- linux/include/linux/md.h~   Fri Nov 21 13:29:14 1997
  +++ linux/include/linux/md.h    Fri Nov 21 13:29:14 1997
  @@ -260,6 +260,7 @@
     int                  repartition;
     int                  busy;
     int                  nb_dev;
  +  int                  auto_mdstop;
     void                 *private;
   };



  13.  Appendice F. - rc.raidown

  Copia il testo che segue nello script rc.raidown e salvalo in
  /etc/rc.d.




















  #! /bin/sh
  #
  # rc.raidown    This file is executed by init when it goes into runlevel
  #               0 (halt) or runlevel 6 (reboot). It saves the status of
  #               a root mounted raid array for subsequent re-boot
  #
  # Version:      1.08    3-25-98 Michael A. Robinton < michael@bizsystems.com >
  #
  ############ Save raid boot and status info ##############
  if [ -f /etc/raidboot.conf ]
  then
    {
    read RaidBootDevs
    read RaidStatusPath
    read RaidConfigEtc
    } < /etc/raidboot.conf

  # you must have issued
  #       cat /proc/mdstat | grep md0 >
  #               {your boot vol mnt(s)}/{RaidStatusPath}/raidgood.ref
  # before linuxrc will execute properly with this info
  #
  #       capture raid status
    RAIDSTATUS=`/bin/cat /proc/mdstat | /usr/bin/grep md0`
    mkdir /tmp/raid$$
    echo "Writing RAID read-only boot FLAG(s)."
    for Device in ${RaidBootDevs}
    do
  # get mount point for raid boot device or use tmp
      RBmount=$( cat /proc/mounts | /usr/bin/grep ${Device} )
      if [ -n ${RBmounts} ]; then
        RBmount=$( echo ${RBmount} | cut -f 2 -d ' ' )
      else
        RBmount="/tmp/raid$$"
        mount ${Device} ${RBmount}
      fi
    if [ -d ${RBmount}/${RaidStatusPath} ]; then
  # Create raid mounted RO flag = shutdown status of raid array
      echo ${RAIDSTATUS} > ${RBmount}/${RaidStatusPath}/raidboot.ro
  # Don't propagate 'fstab' from ramdisk
      if [ -f /linuxrc ]; then
        FSTAB=
      else
        FSTAB=fstab
      fi
      pushd /etc
  # Save etc files for rescue system
      /bin/tar --ignore-failed-read \
          -cf ${RBmount}/${RaidStatusPath}/raidboot.etc \
          raid*.conf mdtab* ${FSTAB} lilo.conf
      popd
  # Create new raidboot.cfg
      {
      /bin/echo ${RaidBootDevs}
      /bin/echo ${RaidStatusPath}
      /bin/echo ${RaidConfigEtc}
      } > ${RBmount}/${RaidStatusPath}/raidboot.cfg
      /bin/umount ${RBmount}
    fi
    done
    rmdir /tmp/raid$$
    echo "Raid boot armed"
  fi
  ################## end raid boot #########################


  14.  Appendice G. - teoria del funzionamento di linuxrc

  Questa  la forma complessa del file linuxrc per raid montato come
  root.  Deve essere elaborato con 'bash' o una shell che riconosce le
  funzioni di shell.

  Il vantaggio sta nel fatto che  generico e non dipende dai file di
  startup e dai parametri che si trovano nell'immagine initrd

  Un parametro Raid_Conf passato a linuxrc dal kernel al boot da lilo o
  loadlin contiene un puntatore ai dispositivi di boot e alla posizione
  dei 2 file raidboot necessari per linuxrc (raidboot.etc e raidboot.cfg
  scritti dallo script di shutdown).

       raidboot.etc contenente i file 'tar'-ati:

               raid*
               mdtab*
               fstab
               lilo.conf               ( se applicabile )


       del sistema primario che vengono trasferiti sulla directory
       initrd /etc durante lo startup. Con cura, questo file pu
       essere modificato, se necessario, quando il tuo sistema ha
       dei guai seri.

       raidboot.cfg contiene il nome della partizione di boot in
       uso e i backup applicabili, cos come il percorso per il
       resto del file di startup di raid usato da linuxrc.  Questo
       file viene normalmente creato dal file di shutdown e pu
       essere creato manualmente se necessario.

       raidboot.cfg  della forma: 3 linee - nessun commento

               /dev/bootdev1 /dev/bootdev2 [/dev/bootdev3 ... e cos via]
               percorso_di/raid-status
               nome_del_file_raidX.conf



       percorso_di/raid-status non comprende il nome del punto di
       mount

       nome_del_file_raidX.conf  quello che si trova in /etc ed 
       normalmente usato per ckraid e mkraid.



  I seguenti file addizionali si trovano sulle partizioni di boot raid
  permanenti. Questo  solitamente lo stesso di sopra, ma nelle situ
  azioni di emergenza pu essere caricato da dovunque sia disponibile,
  come da un floppy di boot.

    raidgood.ref creato dal comando cat /proc/mdstat | grep md0 >
     /{raid_status_path}/raidgood.ref


     vedi ``script di shutdown'' per salvare questo file ed il prossimo


    raidstat.ro creato ad ogni shutdown dal file di shutdown rc,
     salvando lo stato di uscita dell'array raid.



  The Linux SCSI HOWTO
  Drew Eckhardt,<drew@PoohSticks.ORG> (trasformato in formato
  linuxdoc-sgml da Dieter Faulbaum), <faulbaum@bii.bessy.de>
  v2.30, 30 Agosto 1996

  1.  Introduzione

  This documentation is free documentation; you can redistribute it
  and/or modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This documentation is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this documentation; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


  That said, I'd appreciate it if people would ask me
  <drew@PoohSticks.ORG> if there's a newer version available before they
  publish it.  When people publish outdated versions, I get questions
  from users that are answered in newer versions, and it reflects poorly
  on the publisher.  I'd also prefer that all references to free
  distribution sites, and possibly competing distributions/products be
  left intact.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.


  Questo documento  free; potete redistribuirlo e/o modificarlo nei
  termini stabiliti dalla GNU General Public License versione 2, o (a
  vostra scelta) qualsiasi versione successiva, pubblicata dalla Free
  Software Foundation.

  Questo documento viene distribuito nella speranza che sia di qualche
  utilit, ma SENZA ALCUNA GARANZIA; senza nemmeno la garanzia implicita
  di COMMERCIABILIT o di IDONEIT AD UN PARTICOLARE COMPITO. Per
  ulteriori dettagli consultate la GNU General Public License.

  Dovreste aver ricevuto una copia della GNU General Public License con
  questo documento; se non  cos, scrivete a: Free Software Foundation,
  Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  Detto questo, apprezzerei se mi fosse chiesto <drew@PoohSticks.ORG> se
  esiste un'ultima edizione prima di pubblicarla. Quando vengono
  pubblicate delle versioni obsolete ricevo domande le cui risposte sono
  presenti nelle versioni aggiornate; inoltre preferirei che tutti i
  riferimenti a siti di distribuzione free e a distribuzioni o prodotti
  anche concorrenti fossero lasciati inalterati.

  IMPORTANTE:

  SEGNALAZIONI DI DIFETTI O ALTRE RICHIESTE DI AIUTO CHE NON SEGUANO LE
  PROCEDURE EVIDENZIATE NELLA SEZIONE ``SEGNALAZIONE DI BUG'' SARANNO
  IGNORATE.

  Questo HOWTO tratta il sottosistema Linux SCSI, come  implementato
  nella revisione 1.2.10 del kernel Linux e nel pi recente codice
  alpha.  Revisioni meno recenti del codice SCSI _non sono supportate_,
  e possono differire in maniera significativa in termini di driver
  implementati, prestazioni e opzioni disponibili.

  Per ulteriori informazioni, potete abbonarvi alla mailing list linux-
  scsi inviando un messaggio a majordomo@vger.rutgers.edu con la riga



       subscribe linux-scsi




  nel testo. Potete anche ritirarvi dalla mailing list inviando una mail
  allo stesso indirizzo con



       unsubscribe linux-scsi




  nel testo.

  Una volta che avete aderito, potete inviare posta alla lista
  all'indirizzo:



       linux-scsi@vger.rutgers.edu




  Sono conscio che questo documento non  il pi user-friendly
  possibile, e che ci potrebbero essere inesattezze o sviste. Se avete
  dei consigli costruttivi su come migliorare la situazione siete liberi
  di inviarmi dei messaggi in proposito.


  2.  Problemi comuni

  Questa sezione fornisce un elenco dei problemi in cui la gente incorre
  comunemente. Se non c' nulla qui che risponda alle vostre domande,
  dovreste consultare anche le sezioni che riguardano la vostra scheda
  di interfaccia SCSI ed i dispositivi che vi stanno procurando dei
  problemi.


  2.1.  Malfunzionamento generale

  Se vi capitano errori casuali, le cause pi probabili sono problemi di
  cavi e terminazioni.

  Alcuni prodotti, come quelli basati sui pi recenti chip NCR, sono
  caratterizzati da filtraggio digitale e negazione attiva del segnale,
  e non sono molto sensibili ai problemi di cablaggio.

  Altri, come Adaptec 154xC, 154xCF, e 274x sono _estremamente_
  sensibili ai problemi di cablaggio e di terminazione e possono dare
  problemi anche con cavi che funzionano con altri sistemi.

  Insisto: alcuni adattatori host sono _estremamente_ sensibili ai
  problemi di cablaggio e di terminazione, quindi cavi e terminatori
  devono essere le due cose da controllare per prime nel caso in cui
  insorgano problemi.

  Per minimizzare i vostri problemi, dovreste usare cavi che:

  1. Siano conformi a SCSI-II.

  2. Abbiano una impedenza caratteristica di 132 ohm.

  3. Provengano tutti dallo stesso produttore, in modo da evitare errati
     accoppiamenti di impedenza.

  4. Provengano da un produttore fidato come Amphenol.

  La tensione di terminazione dovrebbe essere fornita da tutti i
  dispositivi sul bus SCSI, tramite un diodo, in modo tale da prevenire
  cali di corrente, cosicch ci sia sempre potenza sufficiente nella
  parte terminale dei cavi, laddove  necessaria. Per prevenire danni
  nel caso in cui il bus vada in corto, TERMPWR dovrebbe essere fatto
  passare tramite un fusibile o altri dispositivi di limitazione di
  corrente.

  Se vengono utilizzati dispositivi multipli, cavi esterni, o FAST SCSI
  2, dovrebbe essere utilizzata su entrambe le estremit del bus SCSI
  una perfetta terminazione attiva o forzata.

  Per ulteriori infomazioni a riguardo della terminazione attiva
  consultate le FAQ di Comp.Periphs.Scsi (disponibili presso tsx-11 in
  pub/linux/ALPHA/scsi).


  2.2.  La linea di comandi kernel

  Altre parti del documento si riferiscono ad una ``linea di comandi
  kernel''.

  La linea di comandi kernel  un insieme di opzioni che potete
  specificare o dal prompt di LILO dopo il nome di un'immagine, o nel
  campo append nel vostro file di configurazione LILO (in LILO .14 e pi
  recenti, usate /etc/lilo.conf, per versioni pi vecchie, usate
  /etc/lilo/config).

  Eseguite un boot del vostro sistema con LILO, e schiacciate uno dei
  tasti alt, control, o shift quando appare il prompt. LILO dovrebbe
  rispondere con



       :




  A questo prompt potete selezionare un'immagine kernel di cui eseguire
  il boot, od averne un elenco con ?. Ad esempio



       :?

       ramdisk floppy harddisk




  Per eseguire il boot di quel kernel con le opzioni della linea di
  comando che avete selezionato, semplicemente inserite il nome seguito
  da una lista di opzioni separate fra loro da spazi bianchi, terminando
  con invio.

  Le opzioni assumono la forma di:



       variabile=lista_di_valori




  Dove lista_di_valori pu essere un singolo valore o una lista di
  valori separati da virgole senza nessuno spazio bianco. Con
  l'eccezione del dispositivo di root, valori individuali sono numeri, e
  possono essere specificati sia in decimale che in esadecimale.

  Ad esempio, per eseguire un boot di Linux con un clone Adaptec 1520
  non riconosciuto al bootup, potete digitare



       :floppy aha152x=0x340,11,7,1




  Se non volete digitare tutto questo nel momento del boot,  anche
  possibile utilizzare l'opzione ``append'' del file di configurazione
  LILO con LILO .13 e versioni pi recenti.

  Ad esempio



       append="aha152x=0x340,11,7,1"





  2.3.  Un dispositivo SCSI appare a tutti i possibili ID

  Se questo  il caso, avete impostato il dispositivo allo stesso
  indirizzo del controller (solitamente 7, anche se alcune schede usano
  altri indirizzi: il 6 viene usato da alcune schede di Future Domain.

  Cambiate l'impostazione dei jumper.


  2.4.  Un dispositivo SCSI appare a tutti i possibili LUN

  Il dispositivo ha un firmware difettoso.

  Come soluzione temporanea dovreste provare a usare l'opzione della
  riga di comando kernel:



       max_scsi_luns=1




  Se funziona c' una lista di dispositivi difettosi nel sorgente del
  kernel, in drivers/scsi/scsi.c nella variabile blacklist (``lista
  nera'').  Aggiungete il vostro dispositivo alla lista e inviate un
  messaggio a Linus Torvalds <Linus.Torvalds@cs.Helsinki.FI>.



  2.5.  Vi capitano errori di ``sense'' (non viene riconosciuta la pre
  senza dei dispositivi) ma sapete che i dispositivi non hanno problemi

  Alcune volte questo  causato da cavi scadenti o da terminazioni
  improprie.  Vedete la sezione ``Malfunzionamento Generale''.


  2.6.  Un kernel configurato con il supporto di rete non funziona

  Le routine di autorilevamento per molti driver di rete non sono
  passive, e la loro esecuzione interferisce con alcuni dei driver SCSI.


  2.7.  Dispositivo individuato, ma non accessibile

  Un dispositivo SCSI viene individuato dal kernel, ma non siete in
  grado di accedervi, ad esempio mkfs /dev/sdc, tar xvf /dev/rst2, ecc.
  non funzionano.

  Non avete un file speciale in /dev per il dispositivo.

  I dispositivi Unix sono identificati come dispositivi a blocchi
  (block) o a caratteri (character) (i dispositivi a blocchi passano
  attraverso un buffer, i dispositivi a carattere no), con un ``numero
  primario'' (major number) (che identifica il driver che viene
  utilizzato - block major 8 corrisponde ai dischi SCSI) ed un ``numero
  secondario'' (minor number) (che corrisponde all'unit resa
  accessibile tramite un dato driver - ad esempio character major 4,
  minor 0  la prima console virtuale, minor 1 la successiva, eccetera).
  Comunque, l'accedere a questi dispositivi tramite questi nomi sarebbe
  contrario alla metafora di unix/Linux secondo cui ``tutto  un file'',
  perci vengono creati sotto /dev file speciali di dispositivo a
  blocchi e a caratteri. Questo vi permette di accedere al terzo disco
  SCSI (nell'insieme, non ad una partizione) con /dev/sdc, alla prima
  porta seriale come /dev/ttyS0, ecc.

  Il metodo preferibile per creare un file  quello di usare MAKEDEV -
  andate sulla directory /dev (cd /dev)

  ed eseguite MAKEDEV (come root) per i dispositivi che volete creare;
  ad esempio:



        ./MAKEDEV sdc




  anche i caratteri jolly ``dovrebbero'' funzionare, ad esempio:



        ./MAKEDEV sd\*




  ``dovrebbe'' creare tutti i dispositivi di dischi SCSI (facendo questo
  dovrebbero essere creati i dispositivi da /dev/sda a /dev/sdp, con
  quindici partizioni ciascuno).
        ./MAKEDEV sdc\*




  ``dovrebbe'' creare /dev/sdc e tutte e quindici le partizioni permesse
  su /dev/sdc, ecc.

  Dico ``dovrebbe'' perch questo  il comportamento standard di unix -
  lo script MAKEDEV nella vostra installazione potrebbe non essere
  conforme a questo comportamento, o il numero di dispositivi che andr
  a creare potrebbe essere minore.

  Se MAKEDEV non far la magia giusta per voi, dovrete creare i file di
  dispositivo a mano con il comando mknod.

  La tipologia blocco/carattere, numeri primari e secondari sono
  indicati in maniera specifica per i vari dispositivi SCSI nella
  sezione ``File di dispositivo''.

  Prendete quei numeri e usate (come root):



       mknod /dev/device b|c major minor




  ad esempio:



       mknod /dev/sdc b 8 32
       mknod /dev/rst0 c 9 0





  2.8.  Blocco del sistema SCSI

  I motivi possono essere molti. Consultate anche la sezione specifica
  per il vostro adattatore host per ulteriori possibili soluzioni.

  Ci sono casi in cui sembra che il blocco avvenga quando pi
  dispositivi sono in funzione contemporaneamente. In questi casi,
  potete provare a mettervi in contatto con il produttore dei
  dispositivi in modo da vedere se ci sono disponibili degli
  aggiornamenti del firmware in grado di risolvere il problema. Se vi 
  possibile provate un cavo SCSI diverso, oppure provate su un altro
  sistema. Pu dipendere anche da blocchi difettosi sui dischi, o da un
  cattivo utilizzo del DMA da parte della scheda madre (per adattatori
  host che fanno DMA). Ci sono probabilmente molte altre possibili cause
  che possono portare a problemi del genere.

  Qualche volta questi problemi insorgono quando sul bus sono in
  funzione pi dispositivi contemporaneamente. In questo caso, se il
  vostro driver dell'adattatore host supporta la presenza contemporanea
  sul bus di pi comandi, provate a ridurne il numero a 1 e vedete se
  ci porta a dei miglioramenti. Se avete sul bus dispositivi a nastro o
  lettori CD lenti, quella appena esposta potrebbe non essere una
  soluzione praticabile.



  2.9.  Configurazione e compilazione del kernel

  Driver SCSI inutilizzati occupano memoria, aggravando il problema
  della mancanza di memoria in sistemi piccoli, dato che la memoria
  kernel  ``non paginabile''.

  La cosa migliore  quindi costruire un kernel ``personalizzato'' per
  il vostro sistema, con installati solo i driver di cui c' effettiva
  necessit.



       andate sulla directory /usr/src/linux




  Se state utilizzando un dispositivo root diverso da quello corrente, o
  uno schermo diverso da VGA 80x25, e state scrivendo un floppy per il
  boot, dovreste editare il makefile, e accertarvi che le righe



       ROOT_DEV =





  e



       SVGA_MODE =




  siano come le desiderate.

  Se avete installato delle patch, potreste voler essere certi che tutti
  i file siano ricompilati. In questo caso, dovreste digitare



       make mrproper




  Sia che abbiate eseguito make mrproper sia che non l'abbiate fatto,
  digitate



       make config




  e rispondete alle domande di configurazione. Poi eseguite





  make depend




  e infine




       make




  Una volta che la compilazione  completata, potrete aggiornare la
  configurazione di lilo, o scrivere un floppy di boot. Un disco di boot
  pu essere fatto eseguendo



       make zdisk





  2.10.  LUN diversi da 0 non funzionano

  Molti dispositivi SCSI sono terribilmente difettosi, bloccano il bus
  SCSI, e causano altri problemi quando tentate di parlar loro a una
  unit logica il cui numero sia diverso da zero.

  Quindi normalmente le versioni recenti del kernel di Linux non
  individueranno lun diversi da zero. Per modificare questo
  comportamento, dovete usare l'opzione della riga di comando
  max_scsi_luns, o ricompilare il kernel con l'opzione
  CONFIG_SCSI_MULTI_LUN.  Solitamente inserirete sulla vostra riga dei
  comandi LILO:



       max_scsi_luns=8




  Se dopo aver seguito questo suggerimento i vostri dispositivi multi-
  LUN non sono ancora individuati correttamente (come pu essere il caso
  di molte vecchie bridge board SCSI->MFM, RLL, ESDI, SMD, e simili), il
  problema deriva da questa parte di codice:



       /* Some scsi-1 peripherals do not handle lun != 0.
          I am assuming that scsi-2 peripherals do better */
       if((scsi_result[2] & 0x07) == 1 &&
          (scsi_result[3] & 0x0f) == 0) break;




  che si trova in scan_scsis() in drivers/scsi/scsi.c. Cancellate questo
  codice e tutto dovrebbe funzionare a dovere.


  3.  Segnalazione di Bug

  A causa di problemi di spazio non sempre gli sviluppatori del Linux
  SCSI conservano vecchie revisioni del codice. Perci se non state
  usando l'ultimo versione del kernel di Linux rilasciata al pubblico
  (notate che molte delle distribuzioni Linux, come MCC, SLS, Yggdrasil,
  ecc. restano a volte indietro anche di una ventina di patch) ci sono
  molte probabilit che non saremo in grado di risolvere il vostro
  problema. Perci prima di segnalare un problema, controllate per
  favore che si presenti anche con la versione pi recente del kernel.

  Se dopo l'aggiornamento del kernel e la lettura approfondita di questo
  documento siete ancora convinti di aver trovato un errore, inviatene
  una descrizione al canale SCSI della mailing list, dove molte delle
  persone che hanno contribuito ai driver Linux SCSI la potranno vedere.

  Nel segnalare il bug, fornite pi informazioni che potete a proposito
  della vostra configurazione hardware, il testo esatto di tutti i
  messaggi che Linux stampa quando esegue il boot e quando l'errore si
  verifica, e in che punto del codice sorgente si trova l'errore.
  Utilizzate le procedure elencate in ``Catturare i messaggi'' e
  ``Determinare la provenienza di una ``panic()''''.

  Se non fornite la maggior quantit possibile di informazioni pu
  risultare difficile diagnosticare correttamente il vostro problema, e
  gli sviluppatori potrebbero decidere che ci sono problemi pi
  interessanti da risolvere.

  Insomma, se non siamo in grado di riprodurre il vostro difetto, e voi
  non siete in grado di indicarci cos' che non funziona, il problema
  non verr risolto.


  3.1.  Catturare i messaggi

  Se non state usando un sistema di registrazione ("log") dei messaggi
  del kernel, assicuratevi che il filesystem /proc sia montato.



       grep proc /etc/mtab




  Se il filesystem /proc non  montato, montatelo



       mkdir /proc
       chmod 755 /proc
       mount -t proc /proc /proc




  Copiate il numero di revisione e i messaggi del kernel in un file di
  log



       cat /proc/version > /tmp/log
       cat /proc/kmsg >> /tmp/log



  Premete CONTROL-C dopo un paio di secondi.

  Se state eseguendo un qualche logger, dovrete ``sbirciare'' tra i
  logfile giusti (/etc/syslog.conf dovrebbe essere utile per
  localizzarli), o usare dmesg.

  Se Linux non ha ancora eseguito il bootstrap, formattate un dischetto
  floppy sotto DOS. Notate che se avete una distribuzione che monta il
  dischetto di root da floppy piuttosto che dal RAM drive, dovrete
  formattare un dischetto leggibile nel drive non usato per montare la
  root o usare la loro opzione boot da ramdisk.

  Eseguite il boot di Linux dal vostro floppy di distribuzione di boot,
  preferibilmente in modalit utente singolo usando un RAM disk come
  root.



       mkdir /tmp/dos




  Inserite il dischetto in un drive non usato per montare la root, e
  montatelo. Ad esempio



       mount -t msdos /dev/fd0 /tmp/dos




  o



       mount -t msdos /dev/fd1 /tmp/dos




  Copiateci il vostro log




       cp /tmp/log /tmp/dos/log




  Smontate il floppy DOS




       umount /tmp/dos





  e chiudete Linux


       shutdown




  Eseguite nuovamente un boot in DOS, e usando il vostro software di
  comunicazione preferito scrivete un messaggio e-mail includendo in
  esso il file di log.


  3.2.  Determinare la provenienza di una ``panic()''

  Come altri unix, quando si imbatte in un errore fatale, Linux chiama
  la funzione kernel panic(). A differenza di altri unix, Linux,
  piuttosto che salvare il core sul dispositivo di swap o di dump ed
  eseguire il reboot, stampa per l'utente un utile elenco di
  informazioni riguardanti lo stato del sistema che deve essere copiato
  a mano. Ad esempio:



       Unable to handle kernel NULL pointer dereference at virtual address c0000004
       current->tss,cr3 = 00101000, %cr3 = 00101000
       *pde = 00102027
       *pte = 00000027
       Oops: 0000
       EIP:    0010:0019c905
       EFLAGS: 00010002
       eax: 0000000a   ebx: 001cd0e8   ecx: 00000006   edx: 000003d5
       esi: 001cd0a8   edi: 00000000   ebp: 00000000   esp: 001a18c0
       ds: 0018   es: 0018   fs: 002b   gs: 002b   ss: 0018
       Process swapper (pid: 0, process nr: 0, stackpage=001a09c8)
       Stack: 0019c5c6 00000000 0019c5b2 00000000 0019c5a5 001cd0a8 00000002
       00000000
              001cd0e8 001cd0a8 00000000 001cdb38 001cdb00 00000000 001ce284
       0019d001
              001cd004 0000e800 fbfff000 0019d051 001cd0a8 00000000 001a29f4
       00800000
       Call Trace: 0019c5c6 0019c5b2 0018c5a5 0019d001 0019d051 00111508 00111502
                   0011e800 0011154d 00110f63 0010e2b3 0010ef55 0010ddb7
       Code: 8b 57 04 52 68 d2 c5 19 00 e8 cd a0 f7 ff 83 c4 20 8b 4f 04
       Aiee, killing interrupt handler
       kfree of non-kmalloced memory: 001a29c0, next= 00000000, order=0
       task[0] (swapper) killed: unable to recover
       Kernel panic: Trying to free up swapper memory space
       In swapper task - not syncing




  Prendete il numero esadecimale sulla riga EIP:, in questo caso 19c905,
  e cercate in /usr/src/linux/zSystem.map il numero pi alto non pi
  grande di quell'indirizzo. Ad esempio:



       0019a000 T _fix_pointers
       0019c700 t _intr_scsi
       0019d000 t _NCR53c7x0_intr




  Questo vi dice in quale funzione . Ricompilate il file sorgente che
  definisce quel file di funzione con la funzione di debugging attivata,
  o tutto il kernel se preferite e aggiungete un ``-g'' alla definizione
  CFLAGS in /usr/src/linux/Makefile.



       #
       # standard CFLAGS
       #




  Ad esempio,



       CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe




  diventa




       CFLAGS = -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe




  Ricompilate il kernel, in maniera incrementale o facendo un




       make clean
       make




  Modificate il vostro /etc/lilo.conf in modo da poter eseguire il boot
  del kernel



       image = /usr/src/linux/zImage
       label = experimental




  ed eseguite nuovamente LILO come root, o create un floppy per il boot



       make zImage




  Riavviate il sistema e registrate il nuovo EIP per l'errore.

  Se avete script installato, potreste voler eseguirlo, perch tiene un
  log della vostra sessione di debugging nel file typescript.

  Adesso eseguite



       gdb /usr/src/linux/tools/zSystem




  e inserite



       info line *<il vostro EIP>




  ad esempio,



       info line *0x19c905




  A cui GDB risponder qualcosa del tipo



       (gdb) info line *0x19c905
       Line 2855 of "53c7,8xx.c" starts at address 0x19c905 <intr_scsi+641&>
          and ends at 0x19c913 <intr_scsi+655>.




  Scrivetevi queste informazioni, poi inserite


       list <numero di linea>




  Ad esempio:



















  (gdb) list 2855
  2850    /*      printk("scsi%d : target %d lun %d unexpected disconnect\n
  2851                host->host_no, cmd->cmd->target, cmd->cmd->lun); */
  2852            printk("host : 0x%x\n", (unsigned) host);
  2853            printk("host->host_no : %d\n", host->host_no);
  2854            printk("cmd : 0x%x\n", (unsigned) cmd);
  2855            printk("cmd->cmd : 0x%x\n", (unsigned) cmd->cmd);
  2856            printk("cmd->cmd->target : %d\n", cmd->cmd->target);
  2857            if (cmd) {;
  2858                abnormal_finished(cmd, DID_ERROR << 16);
  2859            }
  2860            hostdata->dsp = hostdata->script + hostdata->E_schedule /
  2861                sizeof(long);
  2862            hostdata->dsp_changed = 1;
  2863        /* SCSI PARITY error */
  2864        }
  2865
  2866        if (sstat0_sist0 & SSTAT0_PAR) {
  2867            fatal = 1;
  2868            if (cmd && cmd->cmd) {
  2869                printk("scsi%d : target %d lun %d parity error.\n",




  Ovviamente, ``quit'' vi porter fuori da GDB.

  Segnatevi anche queste informazioni, poich fornisce un contesto nel
  caso in cui i kernel degli sviluppatori differiscano dal vostro.


  4.  Moduli

  Questa sezione fornisce indicazioni specifiche riguardo al supporto
  dei moduli caricabili del kernel e al suo utilizzo con la SCSI.


  4.1.  Informazioni generali

  I moduli caricabili sono un mezzo tramite il quale l'utente o
  l'amministratore del sistema pu caricare file nella memoria del
  kernel in modo tale da espandere le capacit del kernel stesso. I
  moduli sono usati comunemente per i driver per supportare l'hardware,
  o per caricare filesystem.

  I moduli per SCSI presentano svariati vantaggi. Uno consiste nel fatto
  che un amministratore di sistema che cerchi di mantenere un alto
  numero di macchine pu usare una sola immagine kernel per tutte le
  macchine, e poi caricare moduli di kernel per supportare hardware che
   presente solo su alcune.

   inoltre possibile per coloro che vogliono costruire una
  distribuzione usare uno script sul floppy di boot per chiedere
  all'utente quali moduli debbano essere caricati. Questo consente di
  risparmiare della memoria che altrimenti sarebbe sprecata per dei
  driver inutilizzati, e diminuisce inoltre la possibilit che la
  ricerca di una scheda inesistente crei problemi ad una qualche altra
  scheda nel sistema.

  I moduli funzionano bene anche sui laptop, che hanno generalmente meno
  memoria delle macchine desktop, e la gente tende a tenere pi piccola
  possibile l'immagine kernel e a caricare i moduli quando sono
  effettivamente necessari. Inoltre i moduli rendono pi semplice il
  supporto delle schede PCMCIA SCSI sui laptop, visto che si pu
  caricare e scaricare il driver quando la scheda viene inserita e
  rimossa. [nota: attualmente i driver qlogic e 152x supportano PCMCIA].
  Infine, c' il vantaggio che gli sviluppatori del kernel riescono pi
  facilmente a correggere e a testare i loro driver, poich testare un
  nuovo driver non richiede che si compia un reboot della macchina
  (sempre che, ovviamente, la macchina non sia andata in crash a causa
  di un qualche bug presente nel driver).

  Nonostante il fatto che i moduli siano molto belli, c' una
  limitazione.  Se la partizione di root  su un dispositivo SCSI, non
  potrete utilizzare versioni modularizzate del codice SCSI necessario
  per accedere al disco.  Questo  dovuto al fatto che il sistema deve
  montare la partizione di root prima di poter caricare dei moduli dal
  disco. Ci sono persone che pensano ai modi per modificare il loader e
  il kernel in modo che il kernel sia in grado di caricare da s i
  moduli prima di tentare di caricare il filesystem root, cos che un
  giorno anche questa limitazione sar superata.


  4.2.  Il supporto dei moduli nel kernel 1.2.N

  Nella serie 1.2.N del kernel, c' un supporto parziale per moduli
  kernel SCSI. Mentre nessuno tra i driver di alto livello (come dischi,
  nastri, ecc.) pu essere utilizzato come modulo, molti dei driver di
  basso livello (ad esempio 1542, 1522) possono essere caricati e
  scaricati all'occorrenza. Ogni volta che caricate un driver di basso
  livello, il driver per prima cosa cerca delle schede che  in grado di
  controllare.  Poi viene effettuata una scansione del bus per ogni
  scheda trovata, e poi vengono costruite le strutture dati interne in
  modo tale da rendere possibile l'uso effettivo dei dispositivi
  collegati alle schede che il driver sta controllando.

  Quando avete terminato con un driver di basso livello lo potete
  scaricare. Dovete tenere a mente che i contatori d'uso sono mantenuti
  basandosi su filesystem caricati, file aperti, ecc, cos se state
  ancora utilizzando un dispositivo controllato dal driver, l'utility
  rmmod vi dir che il dispositivo  occupato, e si rifiuter di
  scaricare il driver. Quando il driver  scaricato, tutte le strutture
  di dati associate risultano anch'esse libere, cos che lo stato del
  sistema dovrebbe tornare a ci che era prima che il modulo venisse
  caricato.  Questo significa che il driver pu essere nuovamente
  montato in un momento successivo, se necessario.


  4.3.  Il supporto dei moduli nel kernel 1.3.N

  Nella serie 1.3 dei kernel, il codice SCSI  completamente
  modularizzato.  Questo significa che potete iniziare con un kernel che
  non possiede alcun supporto SCSI, cominciare a caricare i moduli e
  finire per avere un supporto completo.

  Se lo desiderate potete compilare alcune parti del codice SCSI nel
  kernel e poi caricare altre parti successivamente: quanto viene
  caricato durante l'esecuzione e quanto  interno al kernel dipende
  solo da voi.

  Se state incominciando con un kernel che non ha alcun tipo di supporto
  SCSI, allora la prima cosa da fare  di caricare il core SCSI nel
  kernel - questo  in un modulo chiamato ``scsi_mod''). Non sarete in
  grado di caricare nessun altro modulo SCSI finch non lo avrete
  caricato nella memoria kernel. Poich non contiene alcun driver di
  basso livello, l'atto di caricare questo modulo non provocher una
  ricerca tra i bus, n attiver alcun driver per dischi SCSI, nastri
  ecc. Se avete risposto 'Y' alla domanda CONFIG_SCSI quando avete
  compilato il kernel, non avrete bisogno di caricare questo modulo.

  A questo punto potete aggiungere moduli pi o meno in qualsiasi ordine
  per ottenere le funzionalit desiderate. Vengono usati contatori di
  uso per prevenire lo scaricamento di qualsiasi componente che potrebbe
  ancora essere in funzione, e riceverete un messaggio da rmmod se un
  modulo  ancora occupato.

  I driver di alto livello si trovano in moduli di nome ``sd_mod'',
  ``sr_mod'', ``st'' e ``sg'' per il supporto rispettivamente di dischi,
  cdrom, nastri e dispositivi SCSI generici. Quando caricate un driver
  di alto livello viene esaminata la lista dei dispositivi collegati per
  trovare quelli che il driver pu controllare, e questi ultimi vengono
  automaticamente attivati.

  L'uso dei moduli con i driver di basso livello  stato descritto nella
  sezione ``Il supporto dei moduli nel kernel  1.2.N''. Quando viene
  caricato un driver di basso livello viene eseguita una scansione del
  bus e ogni dispositivo viene esaminato da ciascuno dei driver di alto
  livello per vedere se si tratta di qualcosa che possono controllare:
  ogni cosa che viene riconosciuta viene automaticamente collegata ed
  attivata.


  5.  Host

  Questa sezione fornisce informazioni specifiche a proposito dei
  diversi adattatori host che sono in qualche modo supportati sotto
  linux.


  5.1.  Hardware supportato e non supportato

  Driver nella distribuzione del kernel:

  Adaptec 152x, Adaptec 154x (schede DTC 329x solitamente funzionano, ma
  non sono supportate), Adaptec 174x, Adaptec 274x/284x (il supporto per
  294x richiede un versione pi recente del driver), BusLogic
  MultiMaster Host Adapters, schede che rispettano gli standard EATA-DMA
  e EATA-PIO (DPT PM2001, PM2011, PM2012A, PM2012B, PM2021, PM2022,
  PM2024, PM2122, PM2124, PM2322, PM2041, PM2042, PM2044, PM2142,
  PM2144, PM2322, PM3021, PM3122, PM3222, PM3224, PM3334, alcune schede
  NEC, AT&T, SNI, AST, Olivetti, e Alphatronix), Future Domain 850, 885,
  950, e altre schede di questa serie (ma non le 840, 841, 880, e 881 a
  meno di non aggiungere la patch appropriata), Future Domain 16x0 con
  chip TMC-1800, TMC-18C30, o TMC-18C50, NCR53c8xx, le porte SCSI della
  PAS16 SCSI, Seagate ST0x, schede Trantor T128/T130/T228, Ultrastor
  14F, 24F, e 34F, e Western Digital 7000.

  MCA:

  Le schede MCA compatibili con una scheda supportata (ad esempio
  Adaptec 1640 and BusLogic 640) funzionano.

  Driver alpha:

  Molti driver ALPHA sono disponibili presso



       ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi




  Driver che funzioneranno con delle modifiche

  NCR53c8x0/7x0:


       E' stato sviluppato un driver NCR53c8xx, ma attualmente non funziona
       con chip NCR53c700, NCR53c700-66, NCR53c710, e NCR53c720. Segue un
       elenco di modifiche necessarie per far funzionare ciascuno di questi
       chip, ognuna accompagnata della complessit.

       NCR53c720 (triviale) - modifiche al codice di rilevamento, modifiche
           all'inizializzazione, cambio del codice di correzione per
           rimappare i registri del '810 sul '7xx.

       NCR53c710 (triviale) - modifiche al codice di rilevamento, modifiche
           all'inizializzazione, cambio del codice di correzione per
           rimappare i registri del '810 sul '7xx, modifiche ai gestori di
           interrupt per trattare interrupt IID dall'istruzione INTFLY per
           emularlo.

       NCR53c700, NCR53c700-66 (molto complicato) - modifiche al codice di
           rilevamento, modifiche all'inizializzazione, cambio del codice NCR
           per non usare DSA, modifica del codice Linux per gestire i cambi
           di contesto.




  Host SCSI che non funzionano :

  Tutti gli adattatori parallelo->SCSI, schede SCSI Rancho e schede
  Grass Roots SCSI. Schede BusLogic FlashPoint, come ad esempio
  BT-930/932/950 non sono attualmente supportate.

  Host SCSI che non funzioneranno MAI :

  Schede non compatibili Adaptec, schede non NCR53c8xx DTC (incluse le
  3270 e 3280).

  Schede CMD SCSI.

  L'acquisire informazioni a proposito della programmazione richiede un
  patto di non divulgazione (Non-Disclosure Agreement) con DTC/CMD.
  Quindi sarebbe impossibile distribuire un driver Linux se ne fosse
  scritto uno, poich seguire il NDA significherebbe non distribuire
  sorgente, in violazione della GPL, e seguire la GPL significherebbe
  distribuire sorgente, in violazione del NDA.

  Se volete eseguire Linux con qualche altro componente hardware non
  supportato, le vostre opzioni sono o di scrivervi da soli un driver
  (Eric Youngdale ed io siamo disposti a rispondere a domande a
  proposito di driver Linux SCSI), oppure commissionarlo a terzi (le
  normali tariffe di consulenza indicano che questa non  un opzione
  praticabile per l'uso personale).


  5.1.1.  Adattatori per host multipli

  Alcuni adattatori (``Guida all'acquisto: confronto delle
  caratteristiche''), permettono l'uso di pi adattatori dello stesso
  tipo nello stesso sistema.  Con pi adattatori dello stesso tipo nello
  stesso sistema, solitamente quello all'indirizzo pi basso sar scsi0,
  quello all'indirizzo seguente sar scsi1, ecc.

  In tutti i casi,  possibile usare pi adattatori di tipo diverso
  purch i loro indirizzi non siano in conflitto. La scansione dei
  controller SCSI avviene nell'ordine specificato nel vettore
  builtin_scsi_hosts[] in drivers/scsi/hosts.c, che  generalmente:



  BusLogic, Ultrastor 14/34F, Ultrastor 14F,, Adaptec
  151x/152x, Adaptec 154x, Adaptec 174x, AIC7XXX, AM53C974,
  Future Domain 16x0, Always IN2000, Generic NCR5380, QLOGIC,
  PAS16, Seagate, Trantor T128/T130, NCR53c8xx, EATA-DMA,
  WD7000, debugging driver.


  Nella maggior parte dei casi (ad esempio, non state provando ad usare
  driver sia il driver BusLogic che Adaptec), questo pu essere
  modificato secondo le vostre esigenze (ad esempio, mantenere gli
  stessi dispositivi quando vengono aggiunti al sistema su un nuovo
  controller nuovi dispositivi SCSI) spostando le varie voci.


  5.2.  Problemi comuni



  5.2.1.  Timeout SCSI

  Accertatevi che gli interrupt siano attivati nella maniera corretta, e
  che non ci siano conflitti di IRQ, DMA, o di indirizzi con altre
  schede.


  5.2.2.  dipendono da BIOS per l'autorilevamento Fallimento delle rou
  tine di autorilevamento su schede che

  Se il vostro adattatore  uno dei seguenti:


       Adaptec 152x, Adaptec 151x, Adaptec AIC-6260, Adaptec
       AIC-6360, Future Domain 1680, Future Domain TMC-950, Future
       Domain TMC-8xx, Trantor T128, Trantor T128F, Trantor T228F,
       Seagate ST01, Seagate ST02, o Western Digital 7000


  e non  individuato all'avvio del sistema, ad esempio vi appare



       scsi : 0 hosts




  o un messaggio



       scsi%d : tipo




  non  stampato per ogni adattatore SCSI supportato installato nel
  sistema, potreste avere un problema con la routine di autorilevamento
  che non riconosce la vostra scheda.

  L'autorilevamento fallir ugualmente per driver che usano il BIOS per
  l'autorilevamento se il BIOS  disattivato. Controllate due volte che
  il vostro BIOS sia attivato, e non sia in conflitto con i BIOS di
  altre periferiche.

  L'autorilevamento fallir anche nel caso in cui la ``signature''
  (``firma'': una stringa che identifica una particolare scheda) della
  scheda e/o l'indirizzo BIOS non combacino con indirizzi e signature
  conosciuti.

  Se il BIOS  installato usate DOS e DEBUG per trovare una signature
  che permetter di individuare la scheda.

  Ad esempio, se la vostra scheda si trova all'indirizzo 0xc8000, sotto
  DOS eseguite



       debug
       d c800:0
       q




  e inviate un messaggio alla mailing list SCSI contenente il messaggio
  ASCII, la lunghezza e l'offset dall'indirizzo base (ad esempio,
  0xc8000).  Notate che  richiesto il testo ESATTO, e dovreste inviare
  sia le porzioni hesadecimali che ASCII del testo.

  Se il BIOS non  installato, e state usando un driver Adaptec 152x,
  Trantor T128, o Seagate, potete usare la linea di comando oppure
  intervenire a tempo di compilazione per forzare il riconoscimento.

  Consultate anche il sottoparagrafo appropriato per la vostra scheda
  SCSI e anche la sezione ``Malfunzionamento  generale''.


  5.2.3.  Schede che utilizzano I/O memory mapped non funzionano

  (Questo comprende le schede Trantor T128 e Seagate, ma non i driver
  Adaptec, generiche NCR5380, PAS16, e Ultrastor).

  Questo mancato funzionamento si ha spesso quando il caching delle
  porte di I/O memory mapped  eseguito in maniera non corretta.
  Dovreste avere lo spazio dell'indirizzo delle schede marcato come non
  cachable nei settaggi XCMOS.

  Se questo non  possibile, dovreste disattivare interamente la cache.

  Se avete specificato manualmente l'indirizzo della scheda, ricordatevi
  che Linux ha bisogno dell'indirizzo reale della scheda, e non del
  segmento di 16 byte a cui la documentazione pu riferirsi.

  Ad esempio, 0xc8000 sarebbe corretto, 0xc800 non funzionerebbe e
  potrebbe causare problemi di corruzione della memoria.


  5.2.4.  Eseguendo il boot da un floppy con un driver ALPHA si ottiene.
  "kernel panic : cannot mount root device"

  Avrete bisogno di modificare l'immagine binaria del kernel (prima o
  dopo averla scritta sul disco), e di modificare alcuni campi a due
  byte (in formato little endian, cio i bit meno significativi vengono
  per primi) per garantire che funzioner sul vostro sistema:


  1. il dispositivo di swap predefinito, a offset 502, dovrebbe essere
     impostato a 0x00 0x00

  2. la dimensione del ram disk, a offset 504, dovrebbe essere impostata
     all'ampiezza del floppy di boot in K - ad esempio, 5.25" = 1200,
     3.5" = 1440.
       Questo significa che i byte sono

       3.5" : 0xA0 0x05
       5.25" : 0xB0 0x04





  3. dispositivo di root, a offset 508, dovrebbe essere impostato a 0x00
     0x00, cio al dispositivo da cui si esegue il boot.

  Scrivete il file su disco usando dd o rawrite. Inserite il disco nel
  primo drive floppy, aspettate finch non appare il prompt che vi dice
  di inserire il disco root, e poi inserite il floppy di root della
  vostra distribuzione.


  5.2.5.  Installare un driver di dispositivo non incluso nella dis
  tribuzione del kernel

  Avete bisogno di incominciare con la versione del kernel usata
  dall'autore del driver. Probabilmente si parla di questa revisione
  nella documentazione del driver.

  Potete trovare parecchie revisioni recenti del kernel presso:


       nic.funet.fi:/pub/OS/Linux/PEOPLE/Linus




  con il nome linux-version.tar.gz

  Si trovano anche presso tsx-11.mit.edu e vari altri siti



       andate (cd) nella directory /usr/src.




  Rimuovete i vostri vecchi sorgenti Linux; se volete tenere una loro
  copia di backup:



       mv linux linux-old




  scompattate il file



       gunzip < linux-0.99.12.tar.gz | tar xvfp -




  Applicate le patch. Le patch saranno relative a qualche directory nel
  filesystem. Esaminando le righe di file di output nel file di patch
  (con il comando ``grep ^---''), siete in grado di stabilire dove si
  trova il file; ad esempio patch con queste linee:



       --- ./kernel/blk_drv/scsi/Makefile

       --- ./config.in Wed Sep  1 16:19:33 1993




  avranno i file relativi a /usr/src/linux.

  Scompattate i sorgenti del driver in un luogo appropriato - potete
  digitare:



       tar tfv patches.tar




  per ottenere un elenco, e muovere i file nella maniera necessaria (i
  file del driver SCSI dovrebbero stare in
  /usr/src/linux/kernel/drivers/scsi).

  Oppure spostatevi nelle directory a cui sono relativi e digitate:



       patch -p0 < patch_file





  per applicare le patch. Ad esempio, se i file iniziassero con:



       --- linux-new/kernel/blk_drv/scsi/Makefile




  e voi voleste applicare le patch mentre si trovano in /usr/src/linux,
  potreste entrare nella directory /usr/src/linux e digitare:



       patch -p1 < patches




  per trascurare la componente "linux-new".

  Dopo aver applicato le patch, controllate che non ci sia alcun errore
  di applicazione delle patch stesse, che si manifester con il nome del
  file seguito da un suffisso #.



       find /usr/src/linux/ -name "*#" -print

  Se qualcuno di questi esiste, osservateli attentamente. In alcuni
  casi, le differenze consisteranno negli identificatori RCS e saranno
  innocue, altre volte dovrete applicare manualmente delle parti
  importanti.  Documentare i file diff e patch va oltre gli scopi di
  questo documento.

  Consultate anche ``Configurazione e  compilazione del kernel''.


  5.2.6.  Installazione di un driver che non ha patch

  In alcuni casi un autore di driver pu non offrire patch con i file .c
  e .h che contengono il suo driver, o le patch possono essere per una
  versione pi vecchia del kernel e quindi non installarsi in maniera
  ``pulita''.


  1. Copiate i file .c e .h in /usr/src/linux/drivers/scsi

  2. Aggiungete l'opzione di configurazione

     Modificate /usr/src/linux/config.in, aggiungendo una riga nella
     sezione:



       *
       * SCSI low-level drivers
       *





  aggiungete una variabile booleana di configurazione per il vostro
  driver.  Ad esempio:



       bool 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 y





  3. Aggiungete le righe occorrenti al makefile

     Modificate /usr/src/linux/drivers/scsi/Makefile, aggiungendo
     qualcosa come:



       ifdef CONFIG_SCSI_IN2000
       SCSI_OBS := $(SCSI_OBJS) in2000.o
       SCSI_SRCS := $(SCSI_SRCS) in2000.c
       endif





  prima della riga:




  scsi.a: $(SCSI_OBJS)





  nel makefile, dove il file .c  il file .c che voi avete copiato, e il
  file .o  il nome base del file .c con un suffisso .o.

  4. Aggiungete i punti di entrata

     Modificate /usr/src/linux/drivers/scsi/hosts.c, aggiungendo un
     #include per l'header file, condizionato dal fatto che la macro di
     preprocessing CONFIG_SCSI (che avete aggiunto al file di
     configurazione) sia o meno definita. Ad esempio, dopo



       #ifdef CONFIG_SCSI_GENERIC_NCR5380
       #include "g_NCR5380.h"
       #endif





  potreste aggiungere



       #ifdef CONFIG_SCSI_IN2000
       #include "in2000.h"
       #endif





  Dovrete anche aggiungere Scsi_Host_Template al vettore scsi_hosts[].
  Date un'occhiata nel file .h, e dovreste trovare un #define che
  assomiglia a:



       #define IN2000 {"Always IN2000", in2000_detect, \
           in2000_info, in2000_command,    \
           in2000_queuecommand,            \
           in2000_abort,                   \
           in2000_reset,                   \
           NULL,                           \
           in2000_biosparam,               \
           1, 7, IN2000_SG, 1, 0, 0}





  Prendete il nome della definizione di preprocessore, e aggiungetela al
  vettore scsi_hosts[], condizionato dalla definizione o meno del sim
  bolo di preprocessing che avete usato nel file di configurazione.

  Ad esempio, dopo:




  #ifdef CONFIG_SCSI_GENERIC_NCR5380
          GENERIC_NCR5380,
  #endif





  potreste aggiungere



       #ifdef CONFIG_SCSI_IN2000
               IN2000,
       #endif





  Vedete anche ``Configurazione e compilazione  del kernel''.



  5.2.7.  Una scheda PCI non funziona in un sistema Compaq

  Un certo numero di sistemi Compaq mappa le estensioni BIOS a 32 bit
  usate per cercare i dispositivi PCI, in una parte di memoria
  inaccessibile al kernel Linux a causa del layout della memoria. Se
  Linux non  in grado di individuare una scheda PCI SCSI supportata, e
  vi dice qualcosa come:



       pcibios_init: entry in high memory, unable to access




  Prendete:



       ftp://ftp.compaq.com/pub/softpaq/Software-Solutions/sp0921.zip




  che  un archivio autoscompattante contenente un programma che
  rilocher il codice BIOS32.


  5.2.8.  Un sistema con schede PCI rimane bloccato dopo il messaggio %d
  Host


  Alcuni sistemi PCI hanno BIOS malfunzionanti che disattivano gli
  interrupt e non sono in grado di riattivarli prima di restituire il
  controllo al programma chiamante. La seguente patch risolve questo
  problema:






  --- bios32.c.orig       Mon Nov 13 22:35:31 1995
  +++ bios32.c    Thu Jan 18 00:15:09 1996
  @@ -56,6 +56,7 @@
   #include <linux/pci.h>

   #include <asm/segment.h>
  +#include <asm/system.h>

   #define PCIBIOS_PCI_FUNCTION_ID        0xb1XX
   #define PCIBIOS_PCI_BIOS_PRESENT       0xb101
  @@ -125,7 +126,9 @@
          unsigned long address;          /* %ebx */
          unsigned long length;           /* %ecx */
          unsigned long entry;            /* %edx */
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%edi)"
                  : "=a" (return_code),
                    "=b" (address),
  @@ -134,6 +137,7 @@
                  : "0" (service),
                    "1" (0),
                    "D" (&bios32_indirect));
  +       restore_flags(flags);

          switch (return_code) {
                  case 0:
  @@ -161,11 +165,13 @@
          unsigned char present_status;
          unsigned char major_revision;
          unsigned char minor_revision;
  +       unsigned long flags;
          int pack;

          if ((pcibios_entry = bios32_service(PCI_SERVICE))) {
                  pci_indirect.address = pcibios_entry;

  +               save_flags(flags);
                  __asm__("lcall (%%edi)\n\t"
                          "jc 1f\n\t"
                          "xor %%ah, %%ah\n"
  @@ -176,6 +182,7 @@
                          : "1" (PCIBIOS_PCI_BIOS_PRESENT),
                            "D" (&pci_indirect)
                          : "bx", "cx");
  +               restore_flags(flags);

                  present_status = (pack >> 16) & 0xff;
                  major_revision = (pack >> 8) & 0xff;
  @@ -210,7 +217,9 @@
   {
          unsigned long bx;
          unsigned long ret;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__ ("lcall (%%edi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -221,6 +230,7 @@
                    "c" (class_code),
                    "S" ((int) index),
                    "D" (&pci_indirect));
  +       restore_flags(flags);
          *bus = (bx >> 8) & 0xff;
          *device_fn = bx & 0xff;
          return (int) (ret & 0xff00) >> 8;
  @@ -232,7 +242,9 @@
   {
          unsigned short bx;
          unsigned short ret;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%edi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -244,6 +256,7 @@
                    "d" (vendor),
                    "S" ((int) index),
                    "D" (&pci_indirect));
  +       restore_flags(flags);
          *bus = (bx >> 8) & 0xff;
          *device_fn = bx & 0xff;
          return (int) (ret & 0xff00) >> 8;
  @@ -254,7 +267,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags (flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -273,7 +288,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -292,7 +309,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -303,6 +322,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  @@ -311,7 +331,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -322,6 +344,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  @@ -330,7 +353,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -341,6 +366,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }

  @@ -349,7 +375,9 @@
   {
          unsigned long ret;
          unsigned long bx = (bus << 8) | device_fn;
  +       unsigned long flags;

  +       save_flags(flags);
          __asm__("lcall (%%esi)\n\t"
                  "jc 1f\n\t"
                  "xor %%ah, %%ah\n"
  @@ -360,6 +388,7 @@
                    "b" (bx),
                    "D" ((long) where),
                    "S" (&pci_indirect));
  +       restore_flags(flags);
          return (int) (ret & 0xff00) >> 8;
   }





  5.3.  Adaptec 152x, 151x, 1505, 282x, Sound Blaster 16 SCSI, SCSI Pro,
  Gigabyte e altri prodotti basati su AIC 6260/6360 (Standard)


  Configurazioni supportate



       indirizzi BIOS  : 0xd8000, 0xdc000, 0xd0000, 0xd4000, 0xc8000, 0xcc000,
                         0xe0000, 0xe4000.
       Porte           : 0x140, 0x340
       IRQ             : 9, 10, 11, 12
       DMA             : non usato
       IO              : port mapped


  Autorilevamento:



       Funziona con molte schede con un BIOS installato. Tutte le altre schede,
       inclusa la Adaptec 1510, e la Sound Blaster16 SCSI devono usare una riga
       di comandi kernel o impostazioni a tempo di compilazione.




  Impostazioni manuali:

  Al momento della compilazione:



       Definite in modo appropriato PORTBASE, IRQ, SCSI_ID, RECONNECT,
       PARITY, vedete ``Definizioni''.




  Linea di comando kernel:



       aha152x=<PORTBASE>[,<IRQ>[,<SCSI-ID>[,<RECONNECT>[,<PARITY>]]]]




  SCSI-ID  lo SCSI ID dell'adattatore HOST, non degli eventuali
  dispositivi ad esso connessi. Solitamente dovrebbe essere 7.

  Per forzare il riconoscimento di una scheda a 0x340, IRQ 11, SCSI-ID
  7, con disconnessione/riconnessione permesse, dovreste usare la
  seguente opzione di riga di comandi:



       aha152x=0x340,11,7,1




  Problemi di ``arretratezza'' che si risolvono aggiornando :


  1. Il driver non funziona con le schede VLB. C'era un problema di
     temporizzazione in kernel pi vecchi della revisione 1.0.5

  Definizioni:













  AUTOCONF        : usa la configurazione riportata dal controller (solo 152x)
  IRQ             : imposta il canale di interrupt (9,10,11 o 12) (predefinito
                    11)
  SCSI_ID         : imposta lo SCSI ID dell' AIC-6260 (0-7) (predefinito 7)
  RECONNECT       : imposta disconnessione/riconnessione (ponetelo diverso da
                    zero per permetterle e a zero per disattivarle)
  DONT_SNARF      : Non registrare le porte (pl12 e sotto)
  SKIP_BIOSTEST   : Non testare per una signature BIOS (AHA-1510 o BIOS
                    disattivato)
  PORTBASE        : Forza l'indirizzo base. Non effettuare la ricerca automatica.





  5.4.  Adaptec 154x, AMI FastDisk VLB, DTC 329x (Standard)


  Configurazioni supportate



       Porte           : 0x330 e 0x334
       IRQ             : 9, 10, 11, 12, 14, 15
       canali DMA      : 5, 6, 7
       IO              : port mapped, bus master




  Autorilevamento:



       trover schede solo a 0x330 e 0x334.




  Impostazioni manuali:




       aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]




  Note:


  1. BusLogic costruisce una serie di schede che sono compatibili a
     livello di software con Adaptec 1542, e ce ne sono per i bus ISA,
     VLB, EISA, e PCI.

  2. Schede il cui nome non ha suffisso, e vecchie schede con il
     suffisso ``A'' non supportano scatter/gather, e quindi non
     funzionano.  Comunque si riesce a farle funzionare in qualche modo
     se AHA1542_SCATTER  modificato in 0 in drivers/scsi/aha1542.h.

  Problemi di ``arretratezza'' che si risolvono aggiornando:


  1. Revisioni del kernel precedenti alla .99.10 non supportano la
     revisione 'C'.
  2. Revisioni del kernel precedenti alla .99.14k non supportano le
     opzioni di revisione 'C' per:


    supporto BIOS per il mapping esteso per dischi > 1G;

    supporto BIOS per pi di 2 drive;

    supporto BIOS per autoscanning del bus SCSI.


  3. Le revisioni precedenti alla .99.15e del kernel non supportano il
     mapping esteso per dischi > 1G non attivo.

  4. Revisioni precedenti alla .99.14u del kernel non supportano le
     revisioni 'CF' delle schede.

  5. Le versioni precedenti alla 1.0.5 del kernel hanno un problema di
     corsa critica quando devono accedere a pi dispositivi
     contemporaneamente.

  Problemi comuni :


  1. Ci sono errori inattesi con schede 154xC o 154xCF,


     Gli esemplari pi vecchi delle schede 154xC hanno un alto grado di
     deviazione su uno dei segnali SCSI, che causa la riflessione del
     segnale quando vengono usati cavi di impedenza sbagliata.

     Le schede pi recenti non sono molto migliori, ed hanno anche una
     estrema sensibilit al tipo dei cavi e dei terminatori.

     Vedi anche Problemi Comuni ``#2'' e ``#3'' e ``Problemi comuni'',
     ``Malfunzionamento generale''.


  2. Ci sono errori inattesi con schede 154xC o 154x, con collegati
     dispositivi sia interni che esterni.

     Si tratta probabilmente di un problema di terminazione. Per poter
     disattivare via software la terminazione dell'adattatore host,
     dovete spegnere lo switch 1.

     Vedi anche Problemi Comuni ``#1'' e ``#3'' e ``Problemi  comuni'',
     ``Malfunzionamento generale''.

  3. Il sottosistema SCSI si blocca completamente.


     Ci sono casi in cui i bloccaggi sembrano avvenire quando pi
     dispositivi sono in funzione contemporaneamente. In questo caso,
     potete tentare di mettervi in contatto con il produttore dei
     dispositivi e vedere se sono disponibili aggiornamenti firmware in
     grado di correggere il problema.  Come ultima risorsa, potete
     modificare, in aha1542.h, AHA1542_MAILBOX in 1. Questa operazione
     vi limiter effettivamente a un solo comando sul bus SCSI alla
     volta, e ci potrebbe migliorare la situazione. Se avete sul bus
     lettori a nastro o cdrom lenti, potrebbe essere una soluzione non
     pratica.

     Vedi anche Problemi Comuni ``#1'' e ``#2'' e ``Problemi comuni'',
     ``Problemi comuni : Blocco del sistema SCSI''.


  4. Un messaggio "Interrupt received, but no mail" viene stampato al
     bootup e i vostri dispositivi SCSI non vengono rilevati.

     Disattivate le opzioni BIOS per supportare la mappatura estesa per
     dischi > 1G per pi di 2 drive, e per l'autoscanning del bus.
     Oppure, aggiornatevi a Linux .99.14k o a una versione pi recente.

  5. Se capitano, sulla schede di revisione 'C', un infinit di errori
     di timeout, potreste dovere entrare nel programma di setup Adaptec
     e attivare ``synchronous negotiation'' (negoziazione sincrona).

  6. Linux 1.2.x d il messaggio

     Unable to determine Adaptec DMA priority.  Disabling board.

     Questo  dovuto a un conflitto su alcuni sistemi con il driver
     BusLogic obsoleto. O ricompilate il vostro kernel senza, oppure
     date al driver BusLogic un opzione di linea di comando che dice di
     guardare da qualche altra parte rispetto a dove  configurato il
     vostro controller. Ad esempio, se avete una scheda Adaptec alla
     porta 0x334, e nulla alla 0x330, usate un'opzione di linea di
     comando come:



       buslogic=0x330





  7. Il sistema si blocca con un accesso simultaneo a pi dispositivi su
     un 1542C o 1540C e con sconnessione attiva.

     Alcune revisioni del firmware Adaptec hanno dei bug.
     L'aggiornamento al BIOS v2.11 risolve significativamente questi
     problemi.


  5.5.  Adaptec 174x


  Configurazioni supportate



       Slot            : 1-8
       Porte           : non applicabile:  una scheda EISA
       IRQ             : 9, 10, 11, 12, 14, 15
       Canali DMA      : non applicabile:  una scheda EISA
       IO              : port mapped, bus master




  Autorilevamento:



       funziona con tutte le configurazioni supportate.




  Impostazioni manuali:

       nessuna.




  Note:

  1. La produzione di questa scheda  stata interrotta da Adaptec.

  Problemi comuni :

  1. Se il driver Adaptec 1740 stampa il messaggio "aha1740: Board
     detected, but EBCNTRL = %x, so disabled it."

     la vostra scheda  stata disattivata perch non stava funzionando
     in modalit enhanced. Schede che funzionano in una modalit
     standard 1542 non sono supportate.


  5.6.  Adaptec 274x, 284x (Standard) 294x (ALPHA)


  Una versione pi recente che supporta anch'essa le schede Adaptec 294x
   disponibile presso:



       ftp://ftp.ims.com/pub/Linux/aic7xxx




  Configurazioni supportate :



                         274x           284x            294x
       Slot EISA       : 1-12           N/A             N/A
       Porte           : N/A            TUTTE           TUTTE
       IRQ             : TUTTI          TUTTI           TUTTI
       Canali DMA      : N/A            TUTTI           N/A
       IO              : port mapped, bus master




  Impostazioni manuali:

  linea di comando kernel:



       aha274x=extended
       (per forzare il mapping esteso)





  Note:

  1. Il BIOS DEVE essere attivato.

  2. Il canale B su schede 2742AT  ignorato.


  3. CONFIG_PCI deve essere settato se state usando una scheda PCI


  5.7.  Always IN2000 (Standard)


  Configurazioni supportate :



       Porte          : 0x100, 0x110, 0x200, 0x220
       IRQ            : 10, 11, 14, 15
       DMA            : non usato
       IO             : port mapped




  Autorilevamento :



       BIOS non richiesto.




  Impostazioni manuali:



       nessuna.




  Problemi comuni :


  1. Ci sono problemi noti in sistemi con drive IDE e con lo swapping.


  5.8.  Adattatori Host BusLogic MultiMaster


  (questa sezione Copyright 1995 di Leonard N. Zubkoff
  <lnz@dandelion.com>) (vedete README.BusLogic per ulteriori e pi
  complete informazioni sui driver BusLogic)


















                  Driver SCSI BusLogic MultiMaster per Linux

                      Versione 1.2.2 per Linux 1.2.13
                      Versione 1.3.2 per Linux 1.3.88

  ftp://ftp.dandelion.com/BusLogic-1.2.2.tar.gz
  ftp://ftp.dandelion.com/BusLogic-1.3.2.tar.gz

                             16 Aprile 1996

                           Leonard N. Zubkoff
                           Dandelion Digital
                           lnz@dandelion.com

  BusLogic, Inc. progetta e produce una serie di adattatori host SCSI ad
  alte prestazioni che condividono una interfaccia di programmazione comune
  su varie architetture di bus grazie alla loro tecnologia MultiMaster
  ASIC. Questo driver supporta tutti gli adattatori host BusLogic
  MultiMaster attuali, e dovrebbe supportare ogni tipo di progetto
  MultiMaster futuro con piccole modifiche. Gli adattatori basati sulla
  nuova architettura FlashPoint non sono supportati da questo driver;
  consultate il file README.FlashPoint per informazioni a proposito di un
  programma di aggiornamento per gli utenti di Linux dal FlashPoint LT,
  non supportato, al BT-948, supportato.

  I miei principali obiettivi nello scrivere questo driver BusLogic
  completamente nuovo sono quelli di sfruttare la piena potenzialit di
  cui sono capaci gli adattatori host BusLogic SCSI e le moderne
  periferiche SCSI, e di fornire un driver altamente robusto su cui si pu
  contare per applicazioni critiche con alte prestazioni. Tutte le
  caratteristiche principali di performance e di correzione degli errori
  possono essere configurate dalla linea dei comandi kernel di Linux,
  permettendo cos installazioni personalizzate per regolare le prestazioni
  e il recupero degli errori sulle proprie necessit.

  BusLogic  stata una eccellente compagnia con cui lavorare e consiglio
  caldamente i loro prodotti alla comunit Linux. Nel novembre del 1995 mi
   stata offerta l'opportunit di divenire un beta tester per il loro
  ultimo prodotto MultiMaster, l'adattatore host SCSI BT-948 PCI Ultra, e
  poi nuovamente per l'adattatore SCSI BT-958 PCI Wide Ultra nel gennaio
  1996. Tutto ci si rivel benefico per entrambi, poich BusLogic
  raggiunse un grado e una tipologia di testing che il loro stesso gruppo
  di testing non pu raggiungere facilmente, e la comunit Linux ha a
  disposizione adattatori host di alta qualit che sono stati ben testati
  con Linux prima ancora di essere immessi sul mercato. Questo rapporto ha
  inoltre dato a me la possibilit di interagire direttamente con il loro
  staff tecnico, di comprendere di pi a proposito della lavorazione
  interna sui loro prodotti, e in cambio di insegnare loro le necessit e le
  potenzialit della comunit Linux. Il loro interesse e supporto 
  apprezzato enormemente.

  A differenza di altri venditori, se vi mettete in contatto con il
  Supporto Tecnico BusLogic per un problema, e state eseguendo Linux, non vi
  diranno che il vostro uso del prodotto non  supportato. La loro
  ultimissima produzione di marketing afferma infatti: "gli adattatori host
  BusLogic SCSI sono compatibili con tutti i maggiori sistemi operativi
  compresi: ... Linux ...".

  BusLogic, Inc. si trova a 4151 Burton Drive, Santa Clara, California,
  95054, USA e pu essere raggiunta telefonicamente al 408/492-9090 o
  tramite FAX al 408/492-1542. BusLogic possiede un sito World Wide Web
  http://www.buslogic.com, un sito FTP a: ftp.buslogic.com, e una BBS a
  408/492-1984. Il Supporto Tecnico BusLogic Technical pu essere contattato via
  posta elettronica all'indirizzo techsup@buslogic.com, per telefono al
  408/654-0760, o via FAX al 408/492-1542. Informazioni per
  contattare uffici in Europa e Giappone sono disponibili presso il sito web.
  ADATTATORI DI HOST SUPPORTATI

  L'elenco che segue comprende gli adattatori host BusLogic SCSI supportati
  alla data di questo documento.  consigliabile, per chiunque sia
  intenzionato a comprare un adattatore BusLogic SCSI non compreso in
  questo elenco, mettersi in contatto con l'autore prima dell'acquisto in
  modo da verificare se sar o meno supportato.

  Serie "W":

  BT-948          PCI     Ultra Fast Single-ended SCSI-2
  BT-958          PCI     Ultra Wide Single-ended SCSI-2
  BT-958D         PCI     Ultra Wide Differential SCSI-2

  Serie "C":

  BT-946C         PCI     Fast Single-ended SCSI-2
  BT-956C         PCI     Fast Wide Single-ended SCSI-2
  BT-956CD        PCI     Fast Wide Differential SCSI-2
  BT-445C         VLB     Fast Single-ended SCSI-2
  BT-747C         EISA    Fast Single-ended SCSI-2
  BT-757C         EISA    Fast Wide Single-ended SCSI-2
  BT-757CD        EISA    Fast Wide Differential SCSI-2
  BT-545C         ISA     Fast Single-ended SCSI-2
  BT-540CF        ISA     Fast Single-ended SCSI-2

  Serie "S":

  BT-445S         VLB     Fast Single-ended SCSI-2
  BT-747S         EISA    Fast Single-ended SCSI-2
  BT-747D         EISA    Fast Differential SCSI-2
  BT-757S         EISA    Fast Wide Single-ended SCSI-2
  BT-757D         EISA    Fast Wide Differential SCSI-2
  BT-545S         ISA     Fast Single-ended SCSI-2
  BT-542D         ISA     Fast Differential SCSI-2
  BT-742A         EISA    Single-ended SCSI-2 (742A revisione H)
  BT-542B         ISA     Single-ended SCSI-2 (542B revisione H)

  Serie "A":

  BT-742A         EISA    Single-ended SCSI-2 (742A revisioni A - G)
  BT-542B         ISA     Single-ended SCSI-2 (542B revisioni A - G)

  Gli adattatori di host AMI FastDisk che sono cloni BusLogic sono supportati
  da questo driver.

                   BT-948/958/958D NOTE DI INSTALLAZIONE

  Gli Adattatori di Host BT-948/958/958D PCI Ultra SCSI, possiedono delle
  caratteristiche tali per cui potrebbero richiedere particolare
  attenzione durante l'installazione di Linux.

  o Assegnamento di una porta di I/O PCI

    Con la configurazione predefinita in fabbrica, il BT-948/958/958D
    riconoscer solo le assegnazioni della porta I/O PCI fatte dal BIOS PCI
    della scheda madre. Il BT-948/958/958D non risponder ad alcuna delle
    porte I/O ISA a cui precedentemente rispondevano gli adattatori host
    BusLogic SCSI. Questo driver supporta l'assegnamento della porta I/O
    PCI, perci questa  la configurazione preferita. Comunque, se per
    qualche ragione si deve usare il driver obsoleto BusLogic, come ad
    esempio per una distribuzione Linux che non usa ancora questo driver
    nell'esecuzione del boot del kernel, BusLogic ha fornito una opzione di
    configurazione AutoSCSI per attivare una porta I/O legacy ISA compatibile.

    Per attivare questa opzione di compatibilit all'indietro, invocate
    l'utility AutoSCSI tramite Ctrl-B all'accensione (startup) del sistema
    e selezionate "Adapter Configuration", "View/Modify Configuration", e
    poi cambiate l'impostazione di "ISA Compatible Port" da "Disable" a
    "Primary" o "Alternate". Una volta che questo driver sia stato
    installato, l'opzione "ISA Compatible Port" dovrebbe essere rimessa a
    "Disable", in modo tale da evitare possibili conflitti futuri di porta I/O.
    Anche i pi vecchi BT-946C/956C/956CD possiedono questa opzione di
    configurazione, ma il l'impostazione predefinita in fabbrica  "Primary".

  o Ordine di scansione degli slot PCI

    In sistemi con pi adattatori host BusLogic PCI, l'ordine secondo
    cui gli slots PCI sono scanditi potrebbe apparire rovesciato con
    BT-948/958/958D se comparato con il BT-946C/956C/956CD. Perch il boot
    da un disco SCSI funzioni correttamente,  necessario che il BIOS
    dell'adattatore host BIOS e il kernel siano d'accordo su quale disco sia il
    dispositivo di boot, il che richiede che siano in grado di riconoscere
    nello stesso ordine gli adattatori host PCI. La scheda madre PCI BIOS
    fornisce un metodo standard per enumerare gli adattatori host PCI,
    che  usato dal kernel di Linux. Alcune implementazioni PCI BIOS
    enumerano gli slot PCI secondo il numero crescente del bus e del
    dispositivo, mentre altri lo fanno nella direzione opposta.

    Sfortunatamente Microsoft ha deciso che Windows 95 debba enumerare gli
    slot PCI in ordine crescente rispetto ai numeri del bus e dei
    dispositivi senza tener conto della enumerazione del PCI BIOS, e che il
    loro schema debba essere supportato dall'adattatore di host BIOS per
    ricevere la certificazione di Windows 95. Quindi i settaggi della
    factory default del BT-948/958/958D enumerano gli adattatori di host
    secondo i numeri crescenti dei bus e dei dispositivi. Per disattivare
    questa funzione, invocate la utility AutoSCSI, tramite via Ctrl-B
    all'accensione del sistema e selezionate "Adapter Configuration",
    "View/Modify Configuration", schiacciate Ctrl-F10 e poi disattivate
    l'opzione "Use Bus And Device # For PCI Scanning Seq."

    Questo driver interrogher il settaggio dell'opzione PCI Scanning
    Sequence in modo da riconoscere gli adattatori di host nello stesso
    ordine in cui sono enumerati dal BIOS dell'adattatore host.

                      MAILING LIST DI ANNUNCI BUSLOGIC

  La mailing list di annunci della BusLogic costituisce un forum per
  informare gli utenti Linux di uscite sul mercato di nuovi driver e di
  altri annunci a proposito dei supporti Linux per gli adattatori di host
  BusLogic SCSI. Per iscriversi alla lista, inviate un messaggio a
  "BusLogic-announce-request@dandelion.com" con la riga "subscribe" nel testo.




  5.9.  Adattatori Host BusLogic FlashPoint


  (questa sezione Copyright 1995 by Leonard N. Zubkoff
  <lnz@dandelion.com>)











  Non ci sono driver Linux disponibili per le FlashPoint LT/DL/LW
  (BT-930/932/950) e non  chiaro quando e se mai ce ne saranno. Le schede
  FlashPoint hanno un'architettura differente rispetto alle schede
  MultiMaster e non hanno nessuna CPU, solo un motore sequenziale
  SCSI. Sono commercializzati come un prodotto per workstation desktop, e non
  sono particolarmente adatti per un sistema operativo multitasking di alte
  prestazioni come Linux.

  Le MultiMaster BT-948/958 hanno una CPU, e l'interfaccia di
  programmazione a ``cassetta della posta''  permette parallelismi e
  pipeline tra il sistema operativo e l'adattatore host, laddove le schede
  FlashPoint richiedono frequenti interventi della CPU dell'adattatore.
  Anche quando la latenza degli interrupt cresce in un sistema multitasking
  sotto forte carico, la BT-948/958 dovrebbe mantenere delle eccellenti
  performance, mentre la performance della FlashPoint tende a calare
  piuttosto rapidamente. Inoltre, il firmware sulla BT-948/958 ha la
  capacit di interagire propriamente a basso livello con il bus SCSI,
  mentre con un motore sequenziale  il driver Linux a doversi far carico
  di queste interazioni, e spesso impiega un sacco di tempo per riuscire a
  portare a termine il proprio lavoro. Data la differenza di prezzo
  piuttosto bassa fra questi prodotti, le BT-948 o BT-958 sono certamente
  la scelta migliore per Linux.

  (Inizio Citazione)

                                     ANNUNCIO
                   Programma di upgrade BusLogic FlashPoint/BT-948
                                  1 Febbraio 1996

  Sin dalla sua introduzione l'ottobre scorso, l'uso della BusLogic FlashPoint
  LT ha causato problemi ai membri della comunit Linux, poich nessun
  driver Linux  stato disponibile per questo nuovo prodotto Ultra
  SCSI. Nonostante sia ufficialmente considerato un prodotto per desktop
  workstation, e pur non essendo particolarmente adatto per un sistema
  operativo multitasking ad alte prestazioni come Linux, la FlashPoint LT 
  stata consigliata dai rivenditori di sistemi per computer come l'ultima
  novit, ed  stata venduta perfino in molti dei loro sistemi high end, al
  posto dei meno recenti prodotti MultiMaster. Questo ha causato problemi a
  molte persone che hanno inavvertitamente comprato un sistema
  aspettandosi che tutti gli Adattatori host BusLogic SCSI fossero
  supportati da Linux, per poi scoprire che FlashPoint non  supportato e
  non lo sarebbe stato per un certo periodo, se non per sempre.

  Dopo che questo problema  stato individuato, BusLogic ha contattato i
  propri principali clienti OEM per assicurarsi che le schede BT-946C/956C
  MultiMaster fossero comunque ancora rese disponibili, e che gli utenti di
  Linux che avessero per errore ordinato dei sistemi con le FlashPoint
  potessero essere messi in condizione di aggiornarle alle BT-946C. Questo
  ha aiutato molti acquirenti di nuovi sistemi, ma  stata solo una
  soluzione parziale al problema generale del supporto per le FlashPoint per
  gli utenti di Linux. Non  servito, infatti, ad aiutare le persone
  che inizialmente avevano acquistato una FlashPoint per un sistema
  operativo supportato, e che poi avevano deciso di usare Linux, o per
  coloro i quali avevano comperato una FlashPoint LT, convinti che fosse
  supportata, e non sono stati in grado di restituirla.

  A met dicembre, ho chiesto di incontrare il senior management di
  BusLogic per discutere a proposito di Linux e del supporto software
  free per le FlashPoint. Voci a proposito di una scarsa cura nei confronti
  della comunit Linux da parte di BusLogic erano di pubblico dominio, e
  pensavo che la cosa migliore fosse parlare direttamente di questi
  argomenti. Inviai una email una sera dopo le 23 e l'incontro ebbe
  luogo il pomeriggio seguente. Sfortunatamente gli ingranaggi delle
  macchine corporative si muovono lentamente, specialmente quando una
  compagnia sta per essere acquisita, e quindi c' voluto fino a ora perch
  tutti i dettagli venissero determinati e venisse fatto un documento pubblico.
  BusLogic non  pronta per ora a rilasciare le informazioni necessarie
  perch terzi possano scrivere driver per le FlashPoint. Gli unici
  driver per FlashPoint esistenti sono stati scritti direttamente da
  BusLogic Engineering, e non c' una documentazione FlashPoint
  sufficientemente dettagliata per consentire a sviluppatori esterni di
  scrivere un driver senza assistenza. Mentre qualcuno alla BusLogic
  preferirebbe non divulgare affatto dettagli sull'architettura delle
  FlashPoint, la discussione non ha portato in nessuna direzione. In ogni
  caso, anche se fosse disponibile oggi della documentazione ci vorrebbe
  un po' di tempo prima che un driver utilizzabile venisse scritto,
  specialmente considerando il fatto che non sono convinto che lo sforzo
  richiesto valga la pena di essere compiuto.

  Comunque, BusLogic mantiene l'impegno di fornire soluzioni SCSI ad alte
  prestazioni per la comunit Linux, e non vuole che qualcuno non sia in grado
  di eseguire Linux perch possieda una Flashpoint LT. Perci BusLogic ha
  messo in atto un programma diretto di aggiornamento per consentire a
  qualsiasi utente Linux in tutto il mondo di permutare la loro FlashPoint
  LT con una nuovo BT-948 MultiMaster PCI Ultra SCSI Host Adapter. Il
  BT-948  il successore Ultra SCSI del BT-946C e ha tutte le migliori
  caratteristiche sia del BT-946C che della FlashPoint LT, compresa la
  terminazione intelligente e una flash PROM per facili aggiornamenti del
  firmware, ed  ovviamente compatibile con l'attuale driver Linux. Il
  prezzo per questo aggiornamento  stato fissato in 45 dollari americani, e
  il programma di aggiornamento verr amministrato dal Supporto
  Tecnico BusLogic, che pu essere raggiunto in email all'indirizzo
  techsup@BusLogic.com, e telefonicamente al +1 408 654-0760, oppure via
  fax al +1 408 492-1542.

  Ero un beta tester per la BT-948 e le versioni 1.2.1 e 1.3.1 del mio
  driver BusLogic includono gi il supporto per la BT-948. Un migliore
  supporto per le schede Ultra SCSI MultiMaster verr aggiunto in una
  versione successiva. Come risultato di questo processo cooperativo di
  test, sono stati individuati e corretti numerosi errori nel firmware
  (accertatevi di avere la versione 5.05R o pi recente del firmware).
  Il mio sistema di test Linux, pesantemente caricato, ha fornito un
  ambiente ideale per testare i processi di recupero dagli errori che sono
  molto pi raramente esercitati nei sistemi produttivi, ma che sono
  cruciali per l'equilibrio complessivo del sistema.  stato
  particolarmente utile essere in grado di lavorare direttamente
  con il loro ingegnere firmware per mostrare i problemi sotto il
  controllo dell'ambiente di debug del firmware; ne  passato di tempo
  dall'ultima volta in cui ho lavorato sul firmware per un sistema
  embedded. Attualmente sto lavorando ad alcuni test di prestazioni e mi
  aspetto di avere dei dati da riportare fra non molto.

  BusLogic mi ha chiesto di fare questo annuncio poich un larga parte
  delle domande che riguardano il supporto per la FlashPoint  stata
  inviata o a me per email o  apparsa nei newsgroup di Linux di cui
  faccio parte. Per sintetizzare, BusLogic sta offrendo agli utenti di
  Linux un aggiornamento dalla FlashPoint LT (BT-930), non supportata, alla
  BT-948, supportata, per 45$. Contattate il Supporto Tecnico BusLogic presso:
  techsup@BusLogic.com o +1 408 654-0760 per approfittare della loro offerta.

                  Leonard N. Zubkoff
                  lnz@dandelion.com

  (Fine citazione)








  5.10.  EATA: DPT SmartCache, SmartCache Plus, SmartCache III, Smart-
  Cache IV e SmartRAID (Standard)


  Schede supportate: tutte quelle che supportano il protocollo EATA-DMA.

  Tra di esse ci sono:


  la famiglia DPT Smartcache (Plus):
  PM2011          ISA             Fast Single-ended SCSI-2
  PM2012B         EISA            Fast Single-ended SCSI-2

  la famiglia DPT Smartcache III:
  PM2021          ISA             Fast Single-ended SCSI-2
  PM2021W         ISA             Wide Single-ended SCSI-2
  PM2022          EISA            Fast Single-ended SCSI-2
  PM2022W         EISA            Wide Single-ended SCSI-2
  PM2024          PCI             Fast Single-ended SCSI-2
  PM2024W         PCI             Wide Single-ended SCSI-2
  PM2122          EISA            Fast Single-ended SCSI-2
  PM2122W         EISA            Wide Single-ended SCSI-2
  PM2124          PCI             Fast Single-ended SCSI-2
  PM2124W         PCI             Wide Single-ended SCSI-2
  PM2322          EISA            Fast Single-ended SCSI-2
  PM2322W         EISA            Wide Single-ended SCSI-2

  la famiglia DPT Smartcache VI:

  PM2041W         ISA             Wide Single-ended SCSI-2
  PM2041UW        ISA             Ultra Wide Single-ended SCSI-2
  PM2042W         EISA            Wide Single-ended SCSI-2
  PM2042UW        EISA            Ultra Wide Single-ended SCSI-2
  PM2044W         PCI             Wide Single-ended SCSI-2
  PM2044UW        PCI             Ultra Wide Single-ended SCSI-2
  PM2142W         EISA            Wide Single-ended SCSI-2
  PM2142UW        EISA            Ultra Wide Single-ended SCSI-2
  PM2144W         PCI             Wide Single-ended SCSI-2
  PM2144UW        PCI             Ultra Wide Single-ended SCSI-2
  PM2322W         EISA            Wide Single-ended SCSI-2
  PM2322UW        EISA            Ultra Wide Single-ended SCSI-2

  la famiglia DPT SmartRAID:
  PM3021          ISA             Fast Single-ended SCSI-2
  PM3021W         ISA             Wide Single-ended SCSI-2
  PM3122          EISA            Fast Single-ended SCSI-2
  PM3122W         EISA            Wide Single-ended SCSI-2
  PM3222          EISA            Fast Single-ended SCSI-2
  PM3222W         EISA            Wide Single-ended SCSI-2
  PM3224          PCI             Fast Single-ended SCSI-2
  PM3224W         PCI             Wide Single-ended SCSI-2
  PM3334W         PCI             Wide Single-ended SCSI-2
  PM3334UW        PCI             Ultra Wide Single-ended SCSI-2



  anche versioni differenti dei controller sopraindicati.

  E alcuni controller da:

  NEC, AT&T, SNI, AST, Olivetti, Alphatronix.

  Configurazioni supportate



  Slot           : TUTTI
  Porte          : TUTTE
  IRQ            : TUTTI (level e edge triggered)
  Canali DMA     : ISA: TUTTI, EISA/PCI: non applicabile
  IO             : port mapped, bus master
  Canali SCSI    : TUTTI




  Autorilevamento :



       Funziona con tutte le configurazioni supportate




  L'ultima versione del driver EATA-DMA  disponibile su:




       ftp.i-Connect.Net:/pub/Local/EATA/




  Mailing list:

  La Mailing List EATA fornisce un forum agli utenti Linux del driver
  EATA-DMA e EATA-PIO per discussioni e annunci di nuove uscite sul
  mercato e altro.  Per abbonarvi alla mailing list, inviate un
  messaggio a "linux-eata-request@i-connect.net" con la scritta
  "subscribe" nel corpo del messaggio.

  Supporto /proc/scsi:

  Per ottenere statistiche sui comandi, eseguite le seguenti procedure:
  echo "eata_dma latency" >/proc/scsi/eata_dma/<num_driver> e per
  disattivarlo: echo "eata_dma nolatency"
  >/proc/scsi/eata_dma/<num_driver>

  Problemi comuni


  1. Slackware non riesce a trovare il controller.

     Soluzione: usate uno dei dischi boot ascsi*.

  2. Nei vecchi kernel (<v1.3) il driver IDE pu rilevare l'interfaccia
     ST-506 delle schede EATA.


     a. Ci sar qualcosa di simile a uno dei seguenti due esempi:



          hd.c: ST-506 interface disk with more than 16 heads detected,
            probably due to non-standard sector translation.  Giving up.
            (disk %d: cyl=%d, sect=63, head=64)




          hdc: probing with STATUS instead of ALTSTATUS
          hdc: MP0242 A, 0MB w/128KB Cache, CHS=0/0/0
          hdc: cannot handle disk with 0 physical heads
          hdd: probing with STATUS instead of ALTSTATUS
          hdd: MP0242 A, 0MB w/128KB Cache, CHS=0/0/0
          hdd: cannot handle disk with 0 physical heads





     Se il driver IDE si trova in difficolt a causa di ci, ad esempio
     non riuscite ad accedere al vostro (vero) hardware IDE, cambiate la
     porta IO e/o l'IRQ della scheda EATA.

     b. Se il vostro driver trova hardware che pu controllare, ad
        esempio dischi fissi con una capacit <=504MB, allocher la
        porta IO e l'IRQ in modo che il driver eata non possa
        utilizzarli. In questo caso cambiate anche la porta IO e l'IRQ
        (diverso da 14,15).


  3. Alcune vecchie schede SK2011 hanno un firmware malfunzionante.
     Contattate l'ufficio di assistenza della DPT per un aggiornamento.

  Nota:

  1. CONFIG_PCI deve essere settata se state usando una scheda PCI.


  5.11.  Future Domain 16x0 con chip TMC-1800, TMC-18C30, TMC-18C50, o
  TMC-36C70


  Configurazioni supportate:



       BIOS           : 2.0, 3.0, 3.2, 3.4, 3.5
       Indirizzi BIOS : 0xc8000, 0xca000, 0xce000, 0xde000
       Porte          : 0x140, 0x150, 0x160, 0x170
       IRQ            : 3, 5, 10, 11, 12, 14, 15
       DMA            : non usato
       IO             : port mapped




  Autorilevamento:



       Funziona con tutte le configurazioni supportate, richiede
       l'installazione di un BIOS.




  Impostazioni manuali:


       nessuna.




  Problemi di ``arretratezza'' che si risolvono aggiornando:


  1. Le versioni pi vecchie non supportano il chip TMC-18C50, e non
     funzioneranno con schede nuove.

  2. Le versioni pi vecchie non conoscono le signature (firme) dei BIOS
     pi recenti necessarie per l'autorilevamento.

  3. Le versioni precedenti a quella inclusa nel Linux 1.0.9 e 1.1.6 non
     supportano il nuovo chip SCSI o il BIOS 3.4

  Note:

  1. il BIOS Future Domain spesso cerca dispositivi SCSI partendo
     dall'ID pi alto fino a 0, nell'ordine inverso rispetto agli altri
     BIOS SCSI. sda sar l'ultima "lettera di drive" (ad esempio D:
     piuttosto che C:). Potreste anche dover ``scavalcare'' il disktab
     per LILO.


  5.12.  NCR5380 / T130B generico (Standard)


  Configurazioni supportate e non supportate



       Porte          : tutte
       IRQ            : tutti
       Canali DMA     : DMA non usato
       IO             : port mapped




  Autorilevamento:


       non disponibile.




  Impostazioni manuali:


       A tempo di compilazione: Definite GENERIC_NCR5380_OVERRIDE come un
       vettore con porta, irq, dma, tipo di scheda - ad esempio

       #define GENERIC_NCR5380_OVERRIDE {{0x330, 5, DMA_NONE, BOARD_NCR5380}}

       per una scheda NCR5380 alla porta 330, IRQ 5.

       #define GENERIC_NCR5380_OVERRIDE {{0x350, 5, DMA_NONE, BOARD_NCR53C400}}

       per una T130B alla porta 0x350.

       Con versioni pi vecchie del codice eliminate BOARD_*.

       Possono essere usati anche gli IRQ simbolici IRQ_NONE e IRQ_AUTO (nessun
       IRQ e IRQ rilevato automaticamente).




  linea di comandi kernel:



       ncr5380=porta,irq
       ncr5380=porta,irq,dma
       ncr53c400=porta,irq

       255 pu essere usato per nessun irq, 254 per l'autorilevamento dell'irq.




  Problemi comuni


  1. Usando la scheda T130B con il vecchio (anteriore alla public
     release 6) driver generico NCR5380 che non supporta l'opzione della
     riga di comando ncr53c400.

     I registri NCR5380 si trovano ad un offset di 8 dall'indirizzo di
     base.  Quindi, se ad esempio il vostro indirizzo  0x350, usate:




       ncr5380=0x358,254




  sulla riga dei comandi kernel.

  Problemi di ``arretratezza'' che si risolvono aggiornando:

  1. Il kernel si blocca durante l'accesso al disco con schede T130B o
     altre NCR53c400.

     Le versioni anteriori alla public release 6 del driver Generic
     NCR5380 non supportano gli interrupt su queste schede.  Aggiornate.

  Note:

  1. il driver generico non supporta ancora DMA, e pseudo-DMA non 
     supportato nel driver generico.


  5.13.  NCR53c8xx (Standard)


  Configurazioni supportate e non supportate :



       Indirizzi di base : TUTTI
       IRQ               : TUTTI
       canali DMA        : non applicabile alle schede PCI
       IO                : port mapped, busmastering




  Autorilevamento :



  richiede il BIOS PCI, usa routine del BIOS PCI per cercare dispositivi e
  leggere lo spazio di configurazione





  Il driver usa per l'inizializzazione i valori pre programmati in
  alcuni registri, perci deve essere installato un BIOS.

  Problemi di ``arretratezza'' che si risolvono aggiornando:


  1. Versioni pi vecchie di Linux avevano un problema con lo swapping,
     vedete ``Dischi: il sistema si blocca  durante lo swapping''

  2. Le versioni pi vecchie di Linux non riconoscevano schede '815 e
     '825.

  3. I kernel delle distribuzioni includono le versioni 4 o 5 del
     driver, che non supportano cose utili come ad esempio
     disconnessione/riconnessione (l'effetto pi significativo di ci 
     rappresentato dal bloccaggio di tutti i dispositivi SCSI successivo
     al tentativo di tendere/riavvolgere/spaziare i file su un nastro),
     adattatori per host multipli, e operazioni senza BIOS.

     Il driver pi recente  disponibile presso:



       ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/ncr53c810




  Si tratta di una patch per kernel 1.2.10 e pi recenti, anche se la
  prossima versione sar esclusivamente per 1.3.x. Queste patch NON sono
  completamente pulite a causa di alcuni binari ELF e di altre patch che
  si trovavano nel mio albero dei sorgenti, e se non siete in grado di
  correggere manualmente i (quattro) problemi che dovreste incontrare,
  non dovreste usarle. Notate che  necessaria solo la patch pi
  recente: non sono incrementali.

  Se desiderate usare il driver NCR pi recente con un kernel 1.3.x
  prima di allora, Harald Evensen <Harald.Evensen@pvv.unit.no> ha
  adattato le patch per il 1.3.x



       ftp://ftp.pvv.unit.no/pub/Linux/ALPHA/ncr




  Queste patch dovrebbero essere pulite.

  Consultate tutti i README in queste directory. Dovreste anche
  abbonarvi alla mailing list NCR se siete interessati a eseguire il
  codice ALPHA, poich alla lista vengono inviate spesso soluzioni
  temporanee per bug e annunci di prossime uscite.

  Per iscrivervi inviate una mail a majordomo@colorado.edu con




  subscribe ncr53c810




  nel testo. Potete annullare l'iscrizione inviando una mail allo stesso
  indirizzo e mettendo



       unsubscribe ncr53c810




  nel testo.

  Problemi comuni


  1. Molte persone hanno avuto problemi con il chip che funzionava bene
     sotto DOS, ma poi aveva problemi sotto Linux con timeout sul test 1
     causati da un interrupt perso.

     Questo  spesso dovuto al fatto che l'IRQ  impostato in modo
     diverso sul jumper hardware IRQ di uno slot o dispositivo della
     mainboard e nel setup CMOS. CONTROLLATE DUE VOLTE CHE:

    L'IRQ che state usando venga usato solamente dal vostro chip
     onboard NCR, o dallo slot in cui  installata una scheda NCR.

    Qualsiasi configurazione dei ponticelli della mainboard che
     selezioni l'IRQ per il chip onboard o lo slot corrisponda alle
     impostazioni CMOS.

    Alcune schede principali PCI hanno una funzione di auto
     assegnamento, che non funzioner.

     Potrebbe anche essere dovuto al fatto che INTB, INTC, o INTD sono
     selezionati su una scheda PCI in un sistema che supporta solamente
     INTA.  Se state usando una scheda NCR che ha ponticelli per
     selezionare tra linee di interrupt PCI, accertatevi che stiate
     usando INTA.

     Infine, PCI dovrebbe usare interrupt ``level-sensitive'' piuttosto
     che ``edge triggered''. Controllate che sulla vostra scheda siano
     impostati gli interrupt ``level-sensitive'', e se questo fallisce,
     provate ``edge triggered'' perch il vostro sistema potrebbe avere
     problemi.

     Questo problema  frequente con schede madri Viglen, dove i
     settaggi dei jumper dell'IRQ della scheda principale non sono
     quelli documentati nel manuale. Per quello che so quello che viene
     chiamato IRQ5  in realt IRQ9, il vostro caso pu essere diverso.


  2. Blocco/ altri problemi nascono quando si usa una scheda video S3
     928, o Tseng ET4000W32 PCI.

     Ci sono errori hardware in almeno alcune delle revisioni di questi
     chip.  Non usateli.

  3. Un messaggio al boot up vi indica che la mappatura I/O  stata
     disattivata a causa del fatto che i bit 0..1 dell'indirizzo di base
     0 hanno indicato una mappatura non I/O.

     Questo  dovuto a un errore di BIOS in qualche macchina che fa s
     che i 16 bit pi significativi e meno significativi dei registri di
     configurazione siano scambiati fra loro in lettura.

  4. Alcuni sistemi hanno problemi se la PCI scrive "posta", o se sono
     attivati CPU-> PCI buffering. Se avete problemi, disattivate queste
     opzioni.

  5. Alcuni sistemi con il software NCR SDMS su ROM BIOS e nel sistema
     BIOS non sono in grado di eseguire il boot su DOS. Disattivando
     l'immagine dovrebbe risolvere questo problema.

  6. Se avete il messaggio:



       "scsi%d: IRQ0 not free, detaching"





  o



       "scsi%d: IRQ255 not free, detaching"





  Il chip NCR aveva tutti i bit del registro di configurazione PCI posti
  a 0 o 1. O avete problemi di configurazione (vedete ``Problemi comuni
  1''), oppure avete una scheda principale BIOS difettosa.

  Come alternativa, potreste editare drivers/scsi/ncr53c7,8xx.c, e cam
  biare pci_init() in modo da avere:




       irq = il_mio_irq;





  prima di



       return normal_init (tpnt, board, chip, (int) base,
           (int) io_port, (int) irq, DMA_NONE, 1, bus, device_fn,
           options);





  7. Alcuni sistemi hanno chip BIOS difettosi. Non segnalate alcun bug
     finch non siete sicuri di avere la ROM pi recente.

  8. Le impostazioni della linea di comando ncr53c810=xxx ecc. non
     funzionano.

     Nei kernel gi pronti delle distribuzioni questo accade perch i
     loro punti di ingresso non sono inclusi in init/main.c, il che 
     piuttosto intenzionale:

     Il driver esegue sempre l'autorilevamento per una scheda pure se
     sono state usate particolari impostazioni manuali in una linea di
     comando, perci se si tenta di evitare l'autorilevamento quando la
     scheda effettivamente si  mostrata alle routine di configurazione
     PCI, si hanno dei grossi problemi.

     L'unica ragione che renderebbe necessario scavalcare
     l'autorilevamento sarebbe se l'hardware PCI o il BIOS avessero dei
     problemi, nel qual caso per certe routine di correzione di errori
     non funzionerebbero, rendendo tale ``scavalcamento'' piuttosto
     inutile.

     Infine, quasi tutte le persone che _pensano_ di aver bisogno di
     impostazioni particolari della linea di comando lo sono perch
     ricevono dal driver dei messaggi di errore riguardanti la
     configurazione o qualche altra cosa. Se il driver afferma che avete
     un problema di configurazione, avete un sistema malfunzionante o un
     problema di configurazione e nessun tipo di impostazione
     particolare sar in grado di risolvere questi problemi.

     Se qualcuno ha aggiunto i punti appropriati di entrata al
     init/main.c per consentire impostazioni nella linea di comando che
     evitino l'autorilevamento, tenete presente che si tratta di
     modifiche totalmente non supportate e potrebbero non funzionare.

  9. Alcune schede NCR (principalmente Nexstor) che non usano un BIOS
     NCR hanno errori di timeout. Alcune di queste ROM gestiscono
     trasferimenti sincroni, negoziano per trasferimenti sincroni
     all'accensione, e lasciano i drive in uno stato ignoto. Quando il
     driver Linux NCR tenta di parlare loro, riceve timeout e non riesce
     a riprendersi perch non  in grado di eseguire un reset del bus o
     di rinegoziare.

     Se vi imbattete in questo problema, potete o disattivare i
     trasferimenti sincroni nel programma di setup della scheda, oppure
     aggiorarvi ad una versione ALPHA pi recente del driver NCR che
     eseguir la negoziazione sincrona.

  10.
     Le schede Tyan S1365 '825 hanno problemi di timeout, specialmente
     quando le disconnessioni sono attivate. La documentazione di alcune
     di queste schede d informazioni scambiate sulla posizione dei
     jumper, cosicch la terminazione  accesa quando non serve, ed 
     spenta quando serve.

     Provate a invertire la posizione dei jumper.

  Note:

  1. CONFIG_PCI deve essere settato


  5.14.  Seagate ST0x/Future Domain TMC-8xx/TMC-9xx (Standard)


  Configurazioni supportate e non supportate






  Indirizzi di base : 0xc8000, 0xca000, 0xcc000, 0xce000, 0xdc000, 0xde000
  IRQ               : 3, 5
  Canali DMA        : DMA non usato
  IO                : memory mapped




  Autorilevamento :



       rileva solo l'indirizzo, IRQ  assunto uguale a 5, richiede il BIOS.




  Impostazioni manuali:

  Tempo di compilazione :


       Definite OVERRIDE uguale all'indirizzo base, CONTROLLER a FD o
       SEAGATE come  appropriato, e IRQ all'IRQ.




  linea di comando kernel



       st0x=indirizzo,irq o tmc8xx=indirizzo,irq (funziona solo per .99.13b e
       pi recenti)




  Problemi di ``arretratezza'' che si risolvono aggiornando:


  1. Versioni precedenti a quella nel kernel Linux .99.12 avevano
     problemi di handshaking con alcuni dispositivi lenti, e

     questo  ci che accade quando scrivete dati sul bus


     a. Scrittura del byte nel registro dati, il contenuto del registro
        viene mandato al bus

     b. time_remaining = 12us

     c. aspetta mentre time_remaining > 0 e il segnale REQ  basso

     d. se time_remaining > 0, alza il segnale ACK

     e. aspetta mentre time_remaining > 0 e il segnale REQ  alto

     f. abbassa ACK

     Ci si  imbattuti nel problema con i dispositivi lenti che eseguono
     i comandi mentre li leggono, in cui l'handshake REQ/ACK impiega
     oltre 12 us - il segnale REQ non assume il valore ``falso'' quando
     il driver se l'aspetta, quindi il driver finisce per mandare pi
     byte di dati ad ogni impulso di REQ.

  2. Con Linux .99.12,  stato introdotto un errore quando ho corretto
     il codice di arbitraggio, questo ha portato a selezioni fallite su
     alcuni sistemi.  stato corretto nel .99.13.

  Problemi comuni


  1. Ci sono errori di timeout quando Linux cerca di leggere la tavola
     delle partizioni o tenta di compiere altri accessi ai dischi.

     La scheda viene venduta con un'impostazione adatta all'uso con
     MSDOS, quindi gli interrupt sono disattivati. Per attivare la
     gestione degli interrupt, usate sulla Seagate i jumper W3 (ST01) o
     JP3 (ST02) e chiudete il contatto sui pin F-G per selezionare l'IRQ
     5.


  2. Il driver non  in grado di gestire alcuni dispositivi, in
     particolare nastri e cdrom SCSI economici.

     La Seagate lega l'handshaking dei segnali REQ/ACK del bus SCSI ai
     segnali IO CHANNEL READY e (opzionalmente) 0WS del bus PCI.
     Sfortunatamente non dice quando il timer watchdog si esaurisce, e
     non c' modo per sapere se il segnale REQ si  abbassato, e
     potrebbe finire con il vedere un singolo impulso REQ come impulsi
     multipli.

     Per risolvere tutto ci si pu usare un loop molto stretto per
     rilevare l'abbassamento del segnale REQ, con un timeout nel caso in
     cui non si riesca a cogliere la variazione del segnale a causa di
     un interrupt, ecc.  Si otterrebbe per un peggioramento delle
     prestazioni, quindi non  il caso di applicare questo metodo a
     tutti i dispositivi SCSI; viene invece applicato solo su certi
     dispositivi usando per tali dispositivi il campo ``broken'' (rotto)
     del vettore scsi_devices. Se avete problemi, dovreste cercare di
     aggiungere il vostro dispositivo alla lista dei dispositivi per i
     quali ``broken'' non  resettato a zero (attualmente, solo i drive
     TENEX CD-ROM)

  3. Una scheda Future domain (esempi specifici includono la 840, 841,
     880, and 881) non funziona.

     Alcune schede Future domain utilizzano la mappatura dei registri
     Seagate, e hanno i bit MSG e CD del registro di stato scambiati.

     Dovreste editare seagate.h, scambiando le definizioni di STAT_MSG e
     STAT_CD, e ricompilare il kernel con CONTROLLER definito a SEAGATE,
     un IRQ appropriato e specificare OVERRIDE.

  4. Quando cercate di partizionare il vostro drive con fdisk, ottenete
     dei messaggi di errore che indicano che HDIO_REQ o HDIO_GETGEO
     ioctl hanno fallito, o


     You must set heads sectors and cylinders.
     You can do this from the extra functions menu.



  (devi impostare il numero delle testine, dei settori e dei cilindri.
  Puoi farlo dal menu ``extra functions'').

  Vedi ``Partizionare i dischi''.

  5. Dopo aver specificato manualmente la geometria del drive, tentativi
     seguenti di leggere la tavola delle partizioni danno messaggi di
     errore a proposito di limiti della partizione non sui limiti di un
     cilindro, limiti fisici e logici non coincidenti ecc. Vedete
     ``Partizionare i dischi''

  6. Alcuni sistemi che funzionavano con kernel antecedenti .99.13 hanno
     problemi con versioni di Linux pi recenti. Versioni pi vecchie di
     Linux assegnavano i registri CONTROL e DATA in un ordine diverso da
     quello evidenziato nella documentazione Seagate, e questo ha
     causato malfunzionamenti in alcuni sistemi. Versioni pi recenti
     eseguono l'assegnazione nella maniera corretta, ma questo d
     problemi su altri sistemi.

  Il codice in seagate.c  ora cos:



       cli();
       DATA = (unsigned char) ((1 << target) | (controller_type ==
       SEAGATE ? 0x8$
       CONTROL = BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL |
                   (reselect ? CMD_ATTN : 0);
       sti();




  cambiando questo in:



       cli();
       CONTROL = BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL |
                   (reselect ? CMD_ATTN : 0);
       DATA = (unsigned char) ((1 << target) | (controller_type == SEAGATE
       ? 0x8$
       sti();




  potrebbe risolvere il vostro problema.

  Definizioni:




       FAST o FAST32 user trasferimenti alla cieca quando possibile

       ARBITRATE costringer l'adattatore host a gestire il bus per ottenere una
               compatibilit SCSI-II migliore, piuttosto che stare solo ad aspettare
               il BUS FREE e poi eseguire i propri compiti. Dovrebbe consentire di
               dare un comando per ciascun Lun quando integrer le modifiche nei
               sorgenti delle distribuzioni.

       SLOW_HANDSHAKE permetter la compatibilit con dispositivi malfunzionanti
               che non svolgono l'handshake in maniera sufficientemente veloce (ad
               esempio, alcuni CD ROM) per il codice Seagate.

       SLOW_RATE=x, dove x  un numero vi lascer specificare un tasso di
               trasferimento che verr adottato nel caso l'handshake non funzionasse
               correttamente.




  5.15.  PAS16 SCSI (Standard)


  Configurazioni supportate e non supportate



       Porte          : 0x388, 0x384, 0x38x, 0x288
       IRQ            : 10, 12, 14, 15
           IMPORTANTE : l'IRQ DEVE essere diverso dall'IRQ usato per la parte
                        audio della scheda.
       DMA            : non  usato per la parte SCSI della scheda
       IO             : port mapped




  Autorilevamento



       Non richiede BIOS.




  Impostazioni manuali:




       Tempo di compilazione : definite PAS16_OVERRIDE come un vettore
       contenente porta e irq. Ad esempio

       #define PAS16_OVERRIDE {{0x388, 10}}

       per una scheda alla porta 0x388, IRQ 10.




  linea di comando kernel



       pas16=porta,irq




  Definizioni:















  AUTOSENSE - se definito, REQUEST SENSE sar automaticamente eseguito per
          i comandi che ritornano con uno stato CHECK CONDITION.

  PSEUDO_DMA - abilita lo  PSEUDO-DMA hardware, che pu dare un incremento nelle
          prestazioni di 3 o 4 volte.

  PARITY - abilita il controllo di parit.  Non supportato.

  SCSI2 - abilita il supporto per lo "SCSI-II tagged queuing".  Non testato.

  UNSAFE - lascia attivate le interruzioni durante i trasferimenti
          pseudo-DMA. Dovete usarlo solo se avete problemi di caratteri persi
          durante comunicazioni ad alta velocit, e, anche in questo caso,
          sarebbe bene che provaste a giocherellare un po' con transfersize.

  USLEEP - attiva il supporto per dispositivi che non disconnettono. Non
          testato.




  Problemi comuni


  1. Timeout di comandi, interruzioni, ecc.

     Dovreste installare i patch NCR5380 che ho messo sulla rete un po'
     di tempo fa, che dovrebbero essere integrati in qualche versione
     ALPHA futura.  Questi patch risolvono dei problemi dei primi driver
     NCR5380, ed anche del supporto per dispositivi multipli su schede
     basate su NCR5380.

     Se ci non dovesse funzionare, dovreste disattivare l'opzione
     PSEUDO_DMA cambiando la riga #define PSEUDO_DMA in
     drivers/scsi/pas16.c a #undef PSEUDO_DMA.

     Notate che quest'ultima operazione deve essere considerata come
     l'``ultima spiaggia'', poich ci sar un netto calo delle
     prestazioni.


  5.16.  Trantor T128/T128F/T228 (Standard)


  Configurazioni supportate e non supportate



       Indirizzi di base :  0xcc000, 00xc8000, 0xdc000, 0xd8000
       IRQ               : nessuno, 3, 5, 7 (tutte le schede)
                           10, 12, 14, 15 (solo T128F)
       DMA               : non usato.
       IO                : memory mapped




  Autorilevamento :



       Funziona per tutte le configurazioni supportate, richiede il BIOS installato.




  Impostazioni manuali:



       Tempo di compilazione: definite T128_OVERRIDE come un vettore contenente
       indirizzo e irq. Ad esempio

       #define T128_OVERRIDE {{0xcc000, 5}}

       per una scheda all'indirizzo 0xcc000, IRQ 5.

       Possono essere usati gli IRQ simbolici IRQ_NONE e IRQ_AUTO.




  Linea di comando kernel :



       t128=indirizzo,irq
       Si pu usare -1 per nessun irq, -2 per l'autorilevamento dell'irq.




  Definizioni:



       AUTOSENSE - se definito, REQUEST SENSE verr eseguito in maniera
               automatica per i comandi che ritornano con uno stato CHECK CONDITION.

       PSEUDO_DMA - attiva lo PSEUDO-DMA hardware, dovrebbe fornire un aumento
       di prestazioni di 3 o 4 volte rispetto a polled I/O.

       PARITY - attiva il controllo di parit. Non supportato.

       SCSI2 - attiva il supporto per lo "SCSI-II tagged queuing". Non testato.

       UNSAFE - lascia attivati gli interrupt durante il trasferimento pseudo-DMA.
               Dovete usarlo solo se avete problemi di caratteri persi durante
               comunicazioni ad alta velocit, e, anche in questo caso, sarebbe bene
               che provaste a giocherellare un po' con transfersize.

       USLEEP - attiva il supporto per dispositivi che non disconnettono. Non
               testato.




  Problemi comuni

  1. Timeout di comandi, interruzioni ecc.

     Dovreste installare i patch NCR5380 che ho messo sulla rete un po'
     di tempo fa, che dovrebbero essere integrati in qualche versione
     ALPHA futura.  Questi patch risolvono dei problemi dei primi driver
     NCR5380, ed anche del supporto per dispositivi multipli su schede
     basate su NCR5380.

     Se ci dovesse fallire, dovreste disattivare l'opzione PSEUDO_DMA
     cambiando la riga #define PSEUDO_DMA in drivers/scsi/pas16.c a
     #undef PSEUDO_DMA.

     Notate che quest'ultima operazione deve essere considerata come
     l'``ultima spiaggia'', poich ci sar un netto calo delle
     prestazioni.


  5.17.  Ultrastor 14f (ISA), 24f (EISA), 34f (VLB) (Standard)


  Configurazioni supportate



       Porte          : 0x130, 0x140, 0x210, 0x230, 0x240, 0x310, 0x330, 0x340
       IRQ            : 10, 11, 14, 15
       canali DMA     : 5, 6, 7
       IO             : port mapped, bus master




  Autorilevamento :



       non funziona per schede alla porta 0x310, BIOS non richiesto.




  Impostazioni manuali:




       solo a tempo di compilazione, definite PORT_OVERRIDE




  Problemi comuni

  1. L'indirizzo 0x310 non  supportato dal codice di autorilevamento, e
     potrebbe causare conflitti se il supporto di rete  installato.

     Usate un indirizzo diverso.

  2. Utilizzare un Ultrastor all'indirizzo 0x330 pu causare un blocco
     del sistema quando i driver per le schede sonore stanno effettuando
     l'autorilevamento.

     Usate un indirizzo diverso.

  3. Vari altri driver eseguono rilevamenti in modo non sicuro a diversi
     indirizzi, se avete dei problemi con la ricerca o il sistema si
     blocca durante il boot, provate un indirizzo diverso.

     0x340, indirizzo noto per funzionare,  consigliato.

  4. Linux non trova dispositivi SCSI, ma individua il vostro disco
     fisso SCSI su una scheda Ultrastor SCSI come un normale disco
     fisso, e il driver del disco fisso si rifiuta di supportarla.
     Notate che quando questo avviene, probabilmente riceverete anche un
     messaggio

     hd.c: ST-506 interface disk with more than 16 heads detected,
     probably due to non standard sector translation. Giving up (disk
     %d: cyl=%d, sect=63, head=64)
     Se questo  il caso la scheda Ultrastor  in modalit emulazione
     WD1003.  Dovete:


     a. Ponete la scheda Ultrastor in modalit nativa. Questa  l'azione
        raccomandata, poich il driver SCSI pu essere nettamente pi
        veloce del driver IDE, specialmente se avete installato le patch
        per lettura/scrittura clustered. Alcuni utenti hanno ottenuto
        oltre 2M/sec usando queste patch.

        Notate che questo sar necessario se volete usare un'unit a
        dischi removibili o pi di due dispositivi di disco fisso con la
        Ultrastor.

     b. Usate la seguente linea di comando kernel



          hd=cylinders,heads,sectors





     per scavalcare le impostazioni predefinite per poter eseguire il
     boot, tenendo il numero dei cilindri (cylinders) <= 2048, il numero
     delle testine (heads) <= 16, e il numero dei settori (sectors)<=
     255 in modo che cylinders * heads * sectors sia lo stesso per
     entrambe le mappature.

     Dovete inoltre specificare manualmente la geometria del disco
     quando state eseguendo fdisk sotto Linux. Se non lo fate il risul
     tato sar la scrittura scorretta della tavola delle partizioni, che
     funzioner sotto Linux ma non sotto MSDOS che legge dalla tavola la
     geometria del drive.

     Una volta che Linux  partito, potete evitare l'inconveniente di
     dover eseguire il boot manualmente: basta ricompilare il kernel con
     una macro HD_TYPE definita appropriatamente in include/linux/con
     fig.h.



  5.18.  Western Digital 7000 (Standard)


  Configurazioni supportate



       Indirizzi BIOS : 0xce000
       Porte          : 0x350
       IRQ            : 15
       Canali DMA     : 6
       IO             : port mapped, bus master




  Autorilevamento



       richiede il BIOS installato.


  Problemi comuni


  1. Ci sono parecchie revisioni del chip e del firmware. In genere le
     schede di revisione 3 non funzionano, quelle di revisione 5 si,
     chip senza suffisso non funzionano, chip con un suffisso 'A' s.

  2. La scheda supporta un paio di indirizzi BIOS che non compaiono
     nell'elenco degli indirizzi supportati. Se vi capita questa
     situazione, usate uno degli indirizzi supportati e inviate una
     segnalazione di bug come spiegato in ``Senalazione di Bug''.


  5.19.  AM53/79C974 (ALPHA)




       ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/AM53C974-0.3.tar.gz




  Configurazioni supportate :



       Porte          : tutte
       IRQ            : tutti
       Canali DMA     : 6
       IO             : port mapped, bus master (modo non intelligente)





  5.20.  qlogic (Standard)

  Hey Drew, dove  questa sezione (io, (D.F) l'ho vista solo nell'indice
  ;-)?


  6.  Dischi


  Questa sezione d informazioni specifiche sull'uso dei disk drive.


  6.1.  Hardware supportato e non supportato


  Tutti i dispositivi SCSI ad accesso diretto con dimensione dei blocchi
  pari a 256, 512, o 1024 byte dovrebbero funzionare. Altre dimensioni
  dei blocchi non funzioneranno (notate che spesso si pu ovviare a ci
  cambiando l'ampiezza dei blocchi e/o dei settori usando il comando
  SCSI MODE SELECT).

  Si intende con ``ampiezza di un settore'' il numero di byte di dati
  allocati per settore su un dispositivo, ad esempio i CD-ROM usano
  un'ampiezza di settore di 2048 byte.

  Si intende con ``ampiezza dei blocchi'' la grandezza dei blocchi
  logici usati come interfaccia con il dispositivo. Anche se solitamente
  questa misura coincide con l'ampiezza di settore, alcuni dispositivi
  mappano pi settori fisici pi piccoli (ad esempio, 256 byte nel caso
  del drive 55 M Syquest) a blocchi logici pi grandi o viceversa (ad
  esempio, blocchi di 512 byte su drive CD-ROM SUN compatibili).

  Dispositivi per dischi removibili, inclusi Bernoulis, flopticals,
  dispositivi MO e Syquest.

  In teoria dovrebbero funzionare drive con ampiezza fino a un terabyte.
  Non c' alcun problema con i piccoli drive 9G.


  6.2.  Problemi comuni



  6.2.1.  Messaggio ``Cylinder > 1024''


  Quando si fa una partizione, si riceve un messaggio di avviso a
  proposito di ``cylinder > 1024'', oppure non si  in grado di eseguire
  il boot da una partizione che include un cilindro logico superiore al
  1024.

  Questa  una limitazione BIOS.

  Vedete ``Dischi'' ``Geometria'' e ``Partizionare i dischi'' per una
  spiegazione.  Per spiegazioni vedete "Geometria" dei dischi e
  "Partizione" dei dischi.


  6.2.2.  Non siete in grado di fare una partizione su "/dev/hd*"


  "/dev/hd*" non sono dispositivi SCSI, /dev/sd* lo sono.

  Per i giusti nomi dei dispositivi e per le procedure di partizione
  vedete ``File di dispositivo'' e ``Dischi'' ``Geometria'' e
  ``Partizionare i dischi''.


  6.2.3.  Non riuscite a espellere il supporto da un dispositivo a dis
  chi removibili


  Linux tenta di impedire l'espulsione dal drive quando viene montato un
  dispositivo per prevenire problemi sul filesystem causati da un
  cambiamento del supporto.

  Smontate i dischi prima di espellerli.



  6.2.4.  Non riuscite ad eseguire il boot usando LILO da un disco SCSI


  In alcuni casi il driver SCSI e il BIOS si trovano in disaccordo a
  proposito della corretta mappatura BIOS da utilizzare, e il tutto si
  risolve con il LILO bloccato dopo 'LI' al momento del boot e/o con
  altri problemi.

  Per aggirare questo problema dovrete determinare la mappatura della
  geometria usata sotto DOS, ed inserire i dati per il vostro disco in
  /etc/lilo/disktab.

  Altrimenti potreste usare l'opzione "linear" nel jfile di
  configurazione.


  6.2.5.  Fdisk risponde con




       You must set heads sectors and cylinders.
       You can do this from the extra functions menu.




  e la geometria del disco non viene 'ricordata' quando il fdisk viene
  eseguito di nuovo.

  Vedete ``Partizionare i dischi''.


  6.2.6.  Solo un drive viene individuato su una bridge board con pi
  drive connessi


  Linux non cercher LUN al di fuori di zero su dispositivi SCSI
  anteriori alla revisione ANSI SCSI 1. Se desiderate che siano
  individuati dispositivi su LUN diversi, dovrete modificare
  scan_scsis() in drivers/scsi/scsi.c.


  6.2.7.  Il sistema si blocca quando effettua lo swap

  Pensiamo che questo inconveniente sia stato risolto, provate ad
  aggiornare all'1.1.38.


  6.2.8.  I dischi Conner CFP1060S vengono corrotti


  Questo  dovuto a un errore di microcodice nei codici di read-ahead e
  caching.

  >Dal supporto tecnico di Soenke Behrens di Conner:


























  Nel corso delle ultime settimane, abbiamo ricevuto parecchie telefonate
  da clienti che asserivano di avere seri problemi con i drive SCSI
  CFP1060x 1GB usando il sistema operativo Linux. Sintomi erano filesystem
  corrotti (inode danneggiati) riportati da e2fsck a ogni boot di sistema
  e errori simili.

  C' ora disponibile un rimedio per i clienti con un CFP1060x (revisioni
  di microcodice 9WA1.62/1.66/1.68) e Linux. Per applicare l'aggiornamento,
  avrete bisogno di un disco DOS di boot e driver ASPI in grado di accedere
  al disco fisso. L'aggiornamento carica nella RAM non volatile del drive
  un nuovo codice di queuing e lookahead.

  Se avete problemi con un disco che ha un revisione di microcodice
  9WA1.60, dovrete contattare il pi vicino centro di assistenza Conner per
  far aggiornare per il vostro disco. Trovate la revisione del microcodice
  sull'etichetta del drive e, sul lato inferiore del drive, su un'etichetta
  posta su uno degli integrati.

  Se pensate di essere in grado di fare da soli l'aggiornamento,
  mettetevi in contatto col Supporto Tecnico Conner e fatevi
  preparare la vostra revisione di microcodice. Potete contattare il
  Supporto Tecnico Conner per l'Europa al +44-1294-315333, mentre per gli
  USA al 1-800-4CONNER.

  Saluti
  Soenke Behrens
  European Technical Support




  6.3.  File di dispositivo


  I dischi SCSI usano dispositivi a blocchi con numero primario 8, e non
  ci sono dispositivi "raw" alla BSD.

  A ciascun disco SCSI sono destinati 16 numeri secondari, dove numero
  secondario 0 (modulo 16) rappresenta l'intero disco, i numeri
  secondari da 1 a 4 (modulo 16) le 4 principali partizioni, e i numeri
  secondari da 5 a 15 (modulo 16) le partizioni estese.

  Ad esempio, una configurazione potrebbe essere (con un solo adattatore
  host)


  Dispositivo             Target, Lun     disco SCSI
  84M Seagate             0       0       /dev/sda
  SCSI->SMD bridge disk 0 3       0       /dev/sdb
  SCSI->SMD bridge disk 1 3       1       /dev/sdc
  Wangtek tape            4       0       none
  213M Maxtor             6       0       /dev/sdd



  Ecc.

  La convenzione standard per i nomi 

  /dev/sd{lettera} per l'intero dispositivo ((secondario modulo 16) ==
  0) /dev/sd{lettera}{partizione} per le partizioni su quel dispositivo
  (1 <= (secondario modulo 16) <= 15)

  Ad esempio:


  /dev/sda        block device major 8 minor 0
  /dev/sda1       block device major 8 minor 1
  /dev/sda2       block device major 8 minor 2
  /dev/sdb        block device major 8 minor 16



  ecc.


  6.4.  Partizionare il disco


  Potete eseguire la partizione dei vostri dischi SCSI usando un
  programma di partizione di vostra scelta, sotto DOS, OS/2, Linux o
  qualsiasi altro sistema operativo che supporti la schema standard di
  partizione.

  Il metodo corretto di eseguire il programma Linux fdisk  di
  specificare il dispositivo sulla riga dei comandi. Ad esempio per
  eseguire la partizione del primo disco SCSI:



       fdisk /dev/sda




  Il programma potrebbe essere predisposto per usare /dev/hda, che non 
  un disco SCSI, se non specificate esplicitamente il dispositivo.

  In alcuni casi, fdisk risponder con:



       You must set heads sectors and cylinders.
       You can do this from the extra functions menu.

       Command (m for help):




  (dovete impostare il numero di testine, settori e cilindri. Potete
  farlo dal menu ``extra functions'')

  e/o d un messaggio per il fatto che HDIO_REQ o HDIO_GETGEO ioctl
  hanno fallito. In questi casi, dovete specificare manualmente la
  geometria del disco, come viene spiegato in ``Geometria del  disco'',
  quando state eseguendo fdisk, e anche in /etc/disktab se volete
  eseguire da quel disco il boot del kernel con LILO.

  Se avete specificato manualmente la geometria del disco, i tentativi
  successivi di eseguire fdisk daranno gli stessi messaggi di errore.
  Questo  normale, poich i PC non immagazzinano le informazioni sulla
  geometria dei dischi nella tavola delle partizioni. Di per s, per,
  questo NON CAUSER ALCUN PROBLEMA, e voi non avrete alcun problema
  nell'accedere alle partizioni che avrete creato sul drive di Linux.
  Codici malamente realizzati di alcune ditte avranno dei problemi al
  riguardo, nel qual caso dovreste mettervi in contatto con la ditta e
  insistere perch il codice venga corretto.

  In alcuni casi, riceverete un messaggio di avviso a proposito di una
  partizione che termina al di l del cilindro 1024. Se create una di
  queste partizioni non sarete in grado di eseguire il boot del kernel
  Linux da quella partizione usando LILO. Notate comunque che questa
  restrizione non preclude la creazione di una partizione di root
  parzialmente o interamente al di sopra del cilindro 1024, poich 
  possibile creare una piccola partizione /boot sotto il cilindro 1024
  oppure eseguire il boot dei kernel dalle partizioni esistenti.


  6.5.  Geometria del disco


  Sotto Linux ciascun disco viene visto nel modo in cui lo vede
  l'adattatore host SCSI: N blocchi, numerati da 0 a N-1, tutti liberi
  da errori, mentre DOS e BIOS, essendo ``nati prima'' dei dischi
  intelligenti, applicano una mappatura arbitraria di testine / cilindri
  / settori a questo metodo di indirizzamento lineare.

  Ci pu far sorgere un problema nel momento in cui viene fatta una
  partizione dei drive sotto Linux, poich non c' alcun modo comune di
  ottenere l'idea che DOS e BIOS hanno di questa mappatura della
  geometria.  Nella maggior parte dei casi, un HDIO_GETGEO ioctl() pu
  essere implementato in modo da restituire questa mappatura.
  Sfortunatamente, nei casi in cui il fabbricante (ad esempio Seagate)
  ha scelto una mappatura perversa, non-standard e non documentata, ci
  non  possibile, e la geometria deve essere specificata manualmente.

  Se  richiesta la specificazione manuale della geometria, avete pi
  alternative a disposizione:


  1. Se non vi interessa usare DOS, o eseguire con LILO il boot del
     kernel dal drive, create una mappatura tale che testine * cilindri
     * settori * 512 < ampiezza del vostro drive in byte (un megabyte 
     definito come 2^20 byte).


     1 <= testine <= 256
     1 <= cilindri <= 1024
     1 <= settori <= 63



  2. Usate la mappatura BIOS. In alcuni casi, questo significher
     riconfigurare il disco ponendolo all'ID SCSI 0, e disattivare il
     secondo drive IDE (se lo possedete).

  Altrimenti potete usare un programma come NU, o potete usare il
  seguente programma:


  begin 664 dparam.com
  MBAZ``##_B+^!`+N!`(H'0SP@=/D\,'5:@#]X=`6`/UAU4(!_`3AU2H!_`P!U
  M1(I7`H#J,(#Z`7<Y@,*`M`C-$PCD=3-14HC()#\PY.@R`.@J`%J(\/[`,.3H
  M)0#H'0!8AL2Q!M+L0.@7`+K"`;0)S2'#NIP!ZR"ZQ0'K&[K5`>L6N]T!,=*Y
  M"@#W\8#",$N(%PG`=>^)VK0)S2'#=7-A9V4Z(&1P87)A;2`P>#@P#0H@("!O
  L<B`@9'!A<F%M(#!X.#$-"B1);G9A;&ED(&1R:79E#0HD("`D```````D``!O
  `
  end



  Quando lo eseguite stampa i settori, le testine, e i cilindri del
  drive il cui indirizzo BIOS  stato specificato sulla linea di comando
  (0x80  il primo disco, 0x81 il secondo).

  Ad esempio, dparam 0x80

  60      17      1007



  significa che C: ha 60 settori, 17 testine e 1007 cilindri.


  7.  CD-ROM


  Questa sezione fornisce informazioni specifiche per lettori cdrom.


  7.1.  Hardware supportato e non supportato


  I CD SCSI con un'ampiezza di blocco di 512 o 2048 byte dovrebbero
  funzionare. Altre ampiezze di blocco non funzioneranno.


  7.2.  Problemi comuni



  7.2.1.  Non riuscite a montare un cd-rom


  La corretta sintassi per montare un CD-ROM ISO-9660  :



       mount -t iso9660 /dev/sr0 /mount_point -o ro




  Notate che perch questo funzioni dovete avere il kernel configurato
  con i supporti per SCSI, adattatore, il CD-ROM SCSI e il filesystem
  iso9660.

  Notate inoltre che per quel che riguarda Linux 1.1.32 dispositivi di
  sola lettura com i CD-ROM NON POSSONO essere montati con le opzioni di
  default leggi/scrivi.


  7.2.2.  Non riuscite ad espellere il cd-rom


  Linux tenta di impedire l'espulsione dal drive quando il dispositivo
  viene montato viene per prevenire problemi sul filesystem causati da
  un improvviso cambiamento del CD.


  7.2.3.  Non riuscite a far suonare i CD audio.


  I programmi Workman o xcdplayer lo faranno per voi.


  7.2.4.  Workman or Xcdplayer non funzionano


  Le funzioni per controllare le funzioni audio fanno parte dell'insieme
  di comandi SCSI-II, perci probabilmente non funzioneranno con drive
  che non siano SCSI-II. Inoltre, molti lettori CD-ROM SCSI-I, e alcuni
  SCSI-II usano un insieme di comandi di proprietari per accedere alle
  funzioni audio invece che l'insieme di comandi SCSI-II. Per i drive
  NEC, esiste in giro una versione di xcdplayer adattata in maniera
  speciale per usare questo insieme di comandi - provate a dare
  un'occhiata a tsx-11.mit.edu in pub/linux/BETA/cdrom.

  Questi programmi potrebbero funzionare con alcuni dei lettori CD non-
  SCSI se il lettore implementa le stesse ioctl dei driver SCSI.


  7.2.5.  Drive addizionali sui cambia-CD non funzionano


  La maggior parte dei cambia-CD assegna ciascun disco a un'unit
  logica. Assicuratevi di avere dei file speciali per ciascun disco del
  cambia-CD (vedete ``File di dispositivo'') e vedete ``LUN diversi da 0
  non funzionano''.


  7.3.  File di dispositivo


  I CD-ROM SCSI usano il numero primario 11.

  I numeri secondari sono allocati dinamicamente (vedete ``Dischi'',
  ``File di dispositivo'' per un esempio) dove il primo CD-ROM trovato 
  ha il numero secondario 0, il secondo l'1 e cos via.

  La convenzione standard per l'attribuzione dei nomi :

  /dev/sr{numero}, anche se alcune distribuzioni hanno usato
  /dev/scd{numero}, con esempi quali


  /dev/sr0        /dev/scd0
  /dev/sr1        /dev/scd1




  8.  Nastri


  Questa sezione d informazioni specifiche sui drive per nastri scsi.


  8.1.  Hardware supportato e non supportato


  Drive che usano una ampiezza di blocco, sia fissa che variabile,
  minore dell'ampiezza del buffer del driver (definita a 32 K nei
  sorgenti delle distribuzioni) sono supportati.

  I parametri (ampiezza dei blocchi, buffer, densit) sono impostati con
  ioctl (solitamente con il programma mt), e rimangono attivi dopo che
  il dispositivo  chiuso e riaperto.

  Virtualmente tutti i drive dovrebbero funzionare, inclusi:

    Drive Archive Viper QIC, compresi i modelli 150M e 525M.

    Drive Exabyte 8mm.

    Drive Wangtek 5150S.

    Drive Wangdat DAT.

  8.2.  Problemi comuni



  8.2.1.  Il drive del nastro non  riconosciuto al momento del boot


  Provate a eseguire il boot con un nastro nel drive.


  8.2.2.  Nastri con pi file non sono letti nel modo giusto


  Quando si legge un nastro con pi file, il primo tar ha successo, il
  secondo fallisce silenziosamente, e riprovare il secondo tar ha
  successo.

  Programmi user level, come il tar, non capiscono i mark dei file. Il
  primo tar legge fino alla fine del file. Il secondo cerca di leggere
  all'altezza del mark del file, non trova nulla, ma il nastro si muove
  al di l del mark. Il terzo tar ha successo perch il nastro 
  all'inizio del file successivo.

  Usate mt su dispositivi che non riavvolgono per spostarvi al file
  successivo.


  8.2.3.  La decompressione fallisce

  I programmi di decompressione non sono in grado di maneggiare gli zero
  che riempiono l'ultimo blocco del file.

  Per prevenire avvertimenti ed errori, mettete i vostri file compressi
  tutti insieme in un file .tar; ad esempio, piuttosto che fare:



       tar cfvz /dev/nrst0 file.1 file.2 ...




  eseguite:



       tar cfvz tmp.tar.z file.1 file.2 ...

       tar cf /dev/nrst0 tmp.tar.z





  8.2.4.  Problemi nel trasferire nastri da/a altri sistemi


  Non siete in grado di leggere un nastro scritto con un sistema
  operativo diverso, oppure un altro sistema operativo non  in grado di
  leggere un nastro scritto in Linux.

  Sistemi diversi spesso usano diverse ampiezze di blocco. Su un
  dispositivo a nastro che usa un'ampiezza di blocco fissa, vi
  imbatterete in errori nel momento in cui vi accingerete a leggere
  blocchi scritti utilizzando un'ampiezza di blocco diversa.

  Per leggere questi nastri dovete impostare l'ampiezza del blocco del
  lettore in modo che corrisponda con l'ampiezza del blocco usata quando
  il nastro  stato scritto.

  NOTA: questa  l'ampiezza di blocco hardware, non il fattore di blocco
  usato con tar, dump ecc.

  Potete farlo con il comando mt -



       mt setblk <dimensione>




  o



       mt setblk 0




  per ottenere il supporto per blocchi di ampiezza variabile.

  Notate che queste opzioni di mt non sono supportate sotto la versione
  GNU di mt che  inclusa in qualche distribuzione di Linux. Dovete
  usare invece il comando Linux SCSI mt derivato da BSD. I sorgenti
  dovrebbero essere disponibili in:




       tsx-11.mit.edu:/pub/linux/ALPHA/scsi




  Notate inoltre che per default, ST_BUFFER_BLOCKS (definito in
  /usr/src/linux/drivers/scsi/st_options.h, nei kernel pi recenti, st.c
  in quelli pi vecchi)  impostato in modo da permettere al massimo
  un'ampiezza di buffer di 32 K, dovrete modificare il sorgente per
  usare blocchi pi grossi.


  8.2.5.  Messaggio di errore "No such device"

  Tutti i tentativi di accedere al nastro finiscono in un

  "No such device"

  o messaggi di errori simili. Controllate la tipologia del vostro
  dispositivo a nastro, DEVE essere un dispositivo a carattere con
  numeri primario e secondario che combaciano con quelli specificati in
  ``File di dispositivo''.


  8.2.6.  La lettura di nastri a certe densit funziona, mentre la
  scrittura no.


  Molti lettori di nastri supportano la lettura a densit pi basse per
  mantenere la compatibilit con hardware pi vecchio, ma non sono in
  grado di scrivere alle stesse densit.
  Questo  in particolare il caso dei lettori QIC che leggono vecchi
  nastri 60 M, ma scrivono solo i nuovi formati 120, 150, 250, e 525 M.


  8.2.7.  Il riposizionamento del nastro blocca l'accesso a tutti i dis
  positivi SCSI


  Questo problema  pi comune con driver SCSI che supportano solo un
  comando alla volta (vedete ``Dispositivi multipli'' per una
  spiegazione, e ``Guida  all'acquisto: confronto delle
  caratteristiche'' per vedere quali driver hanno questa limitazione),
  comunque ci potrebbero essere dei lettori di nastri che si rifiutano
  di disconnettersi.

  In entrambi i casi potete aggirare il problema modificando il file
  drivers/scsi/st.c; aggiungete:



       #define ST_NOWAIT




  all'inizio e ricompilate il kernel.

  Notate che questo fa s che eventuali condizioni di errore vengano
  riportate solo quando il successivo comando SCSI viene eseguito.
  Perci potreste voler fare qualcosa tipo:



       mt status




  dopo un comando mt di posizionamento di un file, cos che non
  sovrascrivete file di nastro se il comando di posizionamento 
  fallito.

  Potreste anche prendere in considerazione il passaggio a una scheda
  SCSI meglio supportata o a un nuovo lettore di nastri se avete bisogno
  di usare questo stratagemma e dovete scrivere molti file su nastro.


  8.3.  File di device


  I nastri SCSI usano un dispositivo a caratteri con numero primario 9.

  A causa di vincoli imposti dall'uso da parte di Linux di un dev_t di
  16 bit con soli 8 bit allocati al numero secondario, i numeri
  secondario del nastro SCSI sono assegnati in maniera dinamica
  cominciando dal pi basso HOST/ID/LUN SCSI.

  I dispositivi in grado di riavvolgere sono numerati da 0, dove il
  primo nastro SCSI, /dev/rst0,  c 9 0, il secondo, /dev/rst1, c 9 1,
  eccetera. I dispositivi che non riavvolgono hanno il bit alto settato
  nel numero secondario, ad esempio /dev/nrst0  c 9 128.

  La convenzionale attribuzione dei nomi :



  /dev/nst{numero}       per dispositivi che non riavvolgono
  /dev/st{numero}                per dispositivi che riavvolgono




  9.  Generico


  Questa sezione d informazioni specifiche sul driver SCSI generico


  9.1.  Hardware supportato


  Il dispositivo generico SCSI fornisce un'interfaccia per inviare
  comandi SCSI a tutti i dispositivi SCSI - dischi, nastri, CDROM, robot
  cambiatori di supporti ecc.

  Tutto ci che  compatibile elettricamente con la vostra scheda SCSI
  dovrebbe funzionare


  9.2.  Problemi comuni


  Nessuno :-).


  9.3.  File di Device


  I dispositivi generici SCSI sono a carattere, con numero primario 21.
  A causa dei vincoli imposti dall'uso da parte di Linux di un dev_t di
  16 bit, i numeri secondari sono assegnati in modo dinamico da 0, uno
  per dispositivo, con


  /dev/sg0



  che corrisponde al pi basso target/lun sulla prima scheda SCSI.


  10.  Guida all'acquisto

  Una domanda frequente : "Linux supporta un certo numero di schede
  diverse, quindi quale adattatore host SCSI dovrei comprare?"

  La risposta dipende dalle prestazioni che vi aspettate o di cui avete
  bisogno, dalla scheda madre, dalle periferiche SCSI che pensate di
  connettere alla vostra macchina.


  10.1.  Tipologie di trasferimento


  Il principale fattore che influenza le prestazioni (in termini di
  velocit di trasferimento - throughput - e di tempo per le risposte
  interattive durante l'I/O SCSI)  il tipo di trasferimento usato. La
  tabella sotto elenca i diversi tipi di trasferimento, gli effetti che
  hanno sulle prestazioni e alcune raccomandazioni a proposito del loro
  uso.


     Tipo di trasferimento
        Descrizione / Prestazioni/ Raccomandazioni.


     Pure Polled
        Una scheda con I/O pure polled user la CPU per gestire tutti i
        processi SCSI, incluso il trattamento di REQ/ACK.

        Anche una CPU veloce sar pi lenta di una semplice macchina a
        stati finiti nel maneggiare la sequenza di handshaking REQ/ACK;
        la velocit di picco nei trasferimenti sar 150 K/sec su una
        macchina veloce, e forse 60 K/sec su una macchina lenta
        (attraverso il filesystem).

        Inoltre il driver deve eseguire un loop stretto finch il bus 
        occupato, e questo porta l'utilizzo della CPU vicino al 100% e
        una capacit di risposta estremamente povera durante l'I/O SCSI.
        CD-ROM lenti, che non disconnettono/riconnettono uccideranno le
        performance interattive con queste schede.

        Non consigliato.


     Interlocked Polled
        Le schede che usano un I/O interlocked polled sono
        essenzialmente le stesse dell'I/O pure polled, solo i segnali
        SCSI REQ/ACK sono agganciati ai segnali di handshake del PC bus.
        Tutto il lavoro di gestione SCSI al di l del handshake  fatto
        dalla CPU.

        La velocit di trasferimento massima attraverso il filesystem 
        stimata in 500-600 K/sec.

        Come con le schede pure polled I/O, il driver deve eseguire un
        loop stretto finch il bus SCSI  in attivit, e questo porta ad
        un uso della CPU dipendente dai tassi di trasferimento dei
        dispositivi, e da quando si disconnettono/riconnettono.
        L'utilizzo di CPU pu variare tra il 25% per CD a singola
        velocit che gestiscono appropriatamente
        disconnessione/riconnessione, fino al 100% per i drive pi
        veloci o per CD malfunzionanti che non riescono a
        disconnettere/riconnettere.

        Sul mio 486-66, con una T128, uso il 90% del mio tempo CPU per
        sostenere un throughput di 547 K/sec su un drive con una
        velocit massima di 1080 K/sec con una scheda T128.

        Accettabile alcune volte per nastri vecchi e CDROM quando il
        basso costo  essenziale


     FIFO Polled
        Le schede che usano un I/O FIFO polled mettono un piccolo buffer
        (solitamente 8K) tra la CPU ed il bus SCSI, e spesso
        implementano una certa quantit di intelligenza. L'effetto  che
        la CPU risulta legata solo quando trasferisce dati alla massima
        velocit al buffer e quando esegue il resto della gestione degli
        interrupt per la condizione di buffer vuoto,
        disconnessione/riconnessione ecc.

        La velocit massima di trasferimento dovrebbe essere sufficiente
        a gestire la maggior parte dei dispositivi SCSI, ed  stata
        misurata una velocit fino a 4 M/sec utilizzando comandi raw per
        leggere blocchi di 64 K su un veloce Seagate Baracuda con un
        Adaptec 1520.

        L'utilizzo di CPU dipende dalla velocit di trasferimento dei
        dispositivi: dispositivi pi rapidi generano pi interruzioni
        per tempo unitario, il che richiede pi tempo di CPU. Anche se
        l'utilizzo della CPU potrebbe essere alto (forse il 75%) con
        dispositivi veloci, il sistema solitamente rimane utilizzabile.
        Queste schede forniranno eccellenti performance interattive con
        dispositivi malfunzionanti incapaci di
        disconnettere/riconnettere (tipicamente lettori di CD
        economici).

        Raccomandato a chi vuole risparmiare.


     Slave DMA
        I driver per schede che usano slave DMA programmano il
        controller DMA del PC per un canale quando effettuano un
        trasferimento dati, e restituiscono il controllo alla CPU.

        La velocit massima di trasferimento  solitamente limitata dal
        poco performante controller DMA usato sui PC; una scheda ad 8
        bit di questo genere pu avere problemi ad andare pi veloce di
        140-150K/sec.

        L'uso della CPU  molto ragionevole, leggermente minore di
        quanto abbiamo visto con le schede I/O FIFO polled. Queste
        schede sono molto tolleranti verso i dispositivi malfunzionanti
        che non disconnettono/riconnettono (tipicamente drive CSG
        limitDROM economici).

        Accettabile per lettori CD, nastri ecc. lenti.


     Busmastering DMA
        Queste schede sono intelligenti. I driver di queste schede
        inviano un comando SCSI, target e lun di destinazione, e dove i
        dati dovrebbero finire in una struttura, e dicono alla scheda:
        "Hey, ho un comando per te". Il driver restituisce il controllo
        ai vari programmi in esecuzione, ed alla fine la scheda SCSI
        annuncia che il lavoro  stato eseguito.

        Poich l'intelligenza risiede nel firmware dell'adattatore host
        e non nel driver, i driver per queste schede solitamente
        supportano pi funzioni, trasferimento sincrono, tagged queuing,
        ecc.

        Con i patch di lettura/scrittura clustered, la velocit massima
        di traferimento attraverso il filesystem si avvicina al 100%
        dell'head rate in scrittura, al 75% in lettura.

        L'utilizzo di CPU  minimo, qualunque sia il carico di lavoro di
        I/O, l'uso della CPU  stato misurato in un 5% accedendo ad un
        CDROM a doppia velocit con un Adaptec 1540 e del 20% sostenendo
        un trasferimento di 1,2 M/sec su un disco SCSI.

        Raccomandato in tutti quei casi in cui la disponibilt di denaro
        non  troppo ristretta, la scheda madre non ha problemi (alcune
        schede madri con problemi non funzionano con bus master), e non
        vengono eseguite applicazioni in cui il tempo per i dati  pi
        importante del throughput (l'overhead del bus master potrebbe
        arrivare a 3-4 ms per comando).


  10.2.  Scatter/gather



  Il secondo aspetto driver/hardware pi importante per quel che
  riguarda le prestazioni  il supporto per l'I/O scatter/gather.
  L'overhead dell'esecuzione di un comando SCSI  significativo,
  nell'ordine di millisecondi. Bus master intelligenti, come l'Adaptec
  1540 possono impiegare 3-4 ms per processare un comando SCSI prima che
  il suo destinatario riesca a vederlo. Su dispositivi senza buffer,
  questo overhead  sempre sufficiente per far saltare una rotazione del
  disco, risultando in una velocit di trasferimento di circa 60 K/sec
  (assumendo un drive che ruoti a 3600 RPM) per blocco trasferito alla
  volta. Perci, per massimizzare le prestazioni,  necessario
  minimizzare il numero di comandi SCSI necessari per trasferire un
  certa quantit di dati, trasferendo pi dati per comando. A causa del
  design del buffer cache di Linux, i blocchi di dischi contigui non
  sono contigui nella memoria. Con le patch di lettura/scrittura
  clustered, sono contigui buffer ampi 4 K. Quindi, la quantit massima
  di dati che pu essere trasferita tramite comandi SCSI sar di 1K *
  numero delle regioni scatter/gather senza la patch di
  lettura/scrittura clustered, e di 4K * numero delle regioni con la
  patch.  Per via sperimentale abbiamo determinato che 64 K  una
  quantit ragionevole da trasferire con un solo comando SCSI, cio 64
  buffer scatter/gather con la patch e 16 senza. Con il cambiamento da
  16 K a 64 K trasferiti, abbiamo constatato un miglioramento
  dell'headrate dal 50% scrivendo e leggendo attraverso il filesystem,
  al 70 e 100% rispettivamente usando una scheda della serie Adaptec
  1540.


  10.3.  Mailbox contro non-mailbox


  Un numero di adattatori host intelligenti, come Ultrastor, WD7000,
  Adaptec 1540, 1740, e le schede BusLogic usano una interfaccia a
  ``metafora della cassetta della posta'', dove i comandi SCSI sono
  eseguiti mettendo una struttura di comandi SCSI in una locazione di
  memoria fissa (la ``cassetta della posta''), avvisando la scheda (cio
  ``alzando la bandierina sulla cassetta''), e aspettando una risposta
  (la posta in arrivo).  Con questa interfaccia di programmazione di
  alto livello, gli utenti possono spesso aggiornarsi ad una revisione
  pi recente della scheda per assicurarsi i vantaggi delle nuove
  caratteristiche, come ad esempio FAST + WIDE SCSI, senza cambiamenti
  software. I driver tendono a essere pi facili da implementare,
  possono implementare un insieme pi ampio di caratteristiche, e
  possono essere pi stabili.

  Altri adattatori host intelligenti, come ad esempio la famiglia
  NCR53c7/8xx, e i chip Adaptec AIC-7770/7870 (incluse le schede 274x,
  284x, e 2940) usano un'interfaccia di programmazione di livello pi
  basso. Questa potrebbe rivelarsi pi veloce poich il lavoro pu
  essere spostato tra il processore della scheda e CPU pi veloci, pu
  permettere una maggiore flessibilit nell'implementazione di alcune
  caratteristiche (ad esempio il modo target per dispositivi arbitrari),
  e queste schede sono meno costose da costruire (in alcuni casi, questo
  vantaggio arriva fino al consumatore:  il caso di molte delle schede
  NCR). Per quel che riguarda i difetti, i driver tendono a essere pi
  complessi (cio c' pi possibilit che ci siano degli errori), e
  devono essere modificati per poter trarre vantaggio delle
  caratteristiche presenti sui chip pi recenti.


  10.4.  Tipi di bus


  Il tipo di bus  la cosa succesiva da prendere in considerazione, la
  scelta si pone fra ISA, EISA, VESA, e PCI. Il marketing spesso declama
  le qualit delle schede citando assurdi numeri riguardanti la
  larghezza di banda basati su velocit di trasferimento fantasiose,
  cosa che non  particolarmente utile. Invece ho scelto di parlare di
  numeri veri basati su prestazioni misurate con varie periferiche.


     Bus
        Larghezza di banda, descrizione.


     ISA
        La larghezza di banda  leggermente superiore a 5 M/sec per
        disposivi che supportano il busmastering. Con un bus ISA, il
        controllo del busmaster  effettuato dal venerabile controller
        DMA 8237, il che provoca tempi di acquisizione del bus
        relativamente alti. I driver per gli interrupt sono edge
        triggered a tre stati, ci significa che gli interrupt non
        possono essere condivisi. Solitamente ISA non ha il buffer, cio
        il bus host/memoria non pu effettuare nessun'altra operazione
        quando c' un trasferimento in corso. Non c' nessun meccanismo
        di prevenzione nei confronti del bus-hogging.


     VESA
        La larghezza di banda  di circa 30 M/sec. Alcuni sistemi VESA
        gestiscono il bus non rispettando le specifiche, il che li rende
        incompatibili con alcune schede, quindi questo aspetto dovrebbe
        essere preso in considerazione prima di acquistare hardware
        senza una garanzia che ne permetta la restituzione. Generalmente
        VESA non ha il buffer, cio il bus memoria/host non pu
        effettuare nessun'altra operazione quando c' un trasferimento
        in corso.


     EISA
        La larghezza di banda  di circa 30M/sec, e le operazioni di
        busmastering sono generalmente pi veloci che sul VESA. Alcuni
        sistemi EISA hanno un buffer per il bus, il che permette
        trasferimenti rapidi al bus host/memory, pi veloce, e minimizza
        l'impatto sulla CPU. I driver di interrupt EISA possono essere
        edge-triggered a tre stati o level-active a collettore aperto,
        permettendo la condivisione degli interrupt con i driver che la
        supportano. Poich EISA alloca uno spazio di indirizzi separato
        per ogni scheda,  solitamente meno probabile avere conflitti
        rispetto a ISA e VESA.


     PCI
        La larghezza di banda  di circa 60 M/sec. La maggior parte dei
        sistemi PCI implementano buffer sull'host bridge, facendo s che
        differenze di velocit fra i due lati abbiano un impatto minimo
        sulle prestazioni di bus e CPU. I driver di interrupt PCI sono
        level-active a collettore aperto e permettono la condivisione
        degli interrupt con i driver che la supportano. Sono previsti
        meccanismi che prevengono il bus hogging, e la sospensione delle
        operazioni di bus-mastering sia da parte del master che dello
        slave.

        Poich PCI fornisce un meccanismo di plug-n-play con registri di
        configurazione riscrivibili su ogni scheda, in spazi di
        indirizzi separati, un sistema PCI propriamente implementato 
        plug-and play.

        PCI  estremamente preciso per quel che riguarda la lunghezza
        delle tracce, il carico, le specifiche meccaniche ecc. e
        dovrebbe essere definitivamente pi affidabile di VESA e ISA.

        Insomma, PCI  il miglior bus per PC, sebbene abbia i suoi
        difetti.  piuttosto recente, e sebbene molti fabbricanti
        abbiano risolto i problemi, c' ancora in giro una certa
        quantit di hardware PCI pi vecchio e difettoso, e alcuni BIOS
        per schede madri malfunzionanti. Per questa ragione, raccomando
        _fortemente_ una garanzia che preveda la restituzione
        dell'hardware. Mentre le schede madri PCI pi recenti siano
        veramente plug-and-play, le schede pi vecchie potrebbero
        richiedere che l'utente imposti delle opzioni (ad esempio
        l'assegnazione degli interrupt) tramite ponticelli oppure via
        software. Anche se molti utenti hanno risolto i loro problemi
        PCI, c' voluto del tempo e per questa ragione non me la sento
        di consigliare un acquisto di PCI se per voi avere il sistema in
        funzione  una cosa che deve avvenire prima di subito.

  Per molti dispositivi pi lenti, come dischi con un ritmo lettura di
  circa 2 M/sec o meno, CD-ROM, nastri ci sar solo una piccola
  differenza di throughput con le diverse interfacce dei bus PC. I
  driver veloci pi recenti (tipicamente i drive ad alte prestazioni da
  molti gigabyte hanno velocit di lettura di  4-5 M/sec, e almeno una
  compagnia sta attualmente sperimentando un'unit con velocit di
  14M/sec), il throughput sar sensibilmente migliore con controller su
  bus pi veloci: si pu notare un miglioramento di prestazioni di 2
  volte e mezza passando da una scheda Adaptec 1542 ISA a una NCR53c810
  PCI.

  Con l'eccezione di situazioni in cui venga usato il meccanismo di
  scrittura-posting, o quello simile di scrittura-buffering, quando uno
  dei bus del vostro sistema  occupato tutti i bus risulteranno
  inaccessibili.  Perci, anche se la saturazione dei bus non star
  interferendo con le prestazioni SCSI, potrebbe avere un effetto
  negativo sulla performance interattiva. Ad esempio, se avete un disco
  4 M/sec SCSI sotto ISA, avrete perso l'80% della vostra banda, e in un
  sistema ISA/VESA sarebbe in grado solamente di bitblt a 6 M/sec. In
  molti casi, un simile impatto sui lavori di processo nel background
  sarebbe anch'esso sentito.

  Notate che avere pi di 16 M di memoria non preclude l'uso di una
  scheda ISA busmastering SCSI. A differenza di numerosi sistemi
  operativi sbagliati, Linux eseguir un buffer doppio quando si usi un
  DMA con un controller ISA e un trasferimento  destinato in fine per
  un'area sopra i 16 M. La performance su questi traferimenti soffre
  solamente del 1.5%, cio non in maniera da essere notata.

  Infine la differenza di prezzo tra bus master offerti con le diverse
  interfacce bus  spesso minima.  Con tutto questo bene in mente,
  basandovi sulle vostre priorit avrete delle preferenze tra i bus.



       Stabilit, tempo di installazione critico,      EISA ISA VESA PCI
               politiche di restituzione povere

       Performance, e installazioni pi per hobby      PCI EISA VESA ISA




  Come ho evidenziato prima, il bus mastering rispetto a altre modalit
  di traferimeno avr un impatto maggiore sulle performance globali del
  sistema, e dovrebbe essere considerato pi importante delle tipologia
  del bus quando si acquista un controller SCSI.





  10.5.  Dispositivi multipli


  Se avete dispositivi multipli sul vostro bus SCSI, potreste voler
  vedere se lo adattatore/driver host che state prendendo in
  considerazione supporta pi di un comando esterno alla volta. Ci 
  quasi essenziale se state facendo andare un lettore di nastro, e molto
  desiderabile se state mischiando dispositivi a velocit differenti,
  come un CD-ROM e un disco fisso. Se il driver Linux supporta solamente
  un comando esterno, potreste essere chiusi fuori dal vostro disco
  fisso mentre un nastro nel lettore si sta riavvolgendo o si sta
  avvicinando alla fine del nastro (forse per mezz'ora) - con questi due
  drive per dischi, il problema non sar particolarmente visibile, anche
  se throughput si avvicinerebbe alla media di due velocit di
  trasferimenti piuttosto che alla somma di due velocit di
  trasferimento.


  10.6.  SCSI-I, SCSI-II, SCSI-III FAST e opzioni WIDE, ecc.


  Nel corso degli anni SCSI si  evoluta con nuove revisioni dello
  standard che hanno introdotto velocit di trasferimento pi elevate,
  metodi per aumentare il throughput, comandi standardizzati per nuovi
  dispositivi, e nuovi comandi per dispositivi precedentemente
  supportati.

  Di per s  i livelli di revisione non significano nulla. A eccezione
  di aspetti minori come il fatto che SCSI-II non consente l'opzione di
  inizio di SCSI-I, SCSI  compatibile a ritroso, con nuove
  caratteristiche che vengono introdotte come opzioni e non
  obbligatorie.  Perci la decisione di chiamare un adattatore SCSI,
  SCSI, SCSI-I, SCSI-II, oppure SCSI-III  quasi esclusivamente di
  natura commerciale.


  10.7.  Elenco delle caratteristiche dei driver


  Elenco delle caratteristiche dei driver( chip supportati sono elencati
  tra parentesi)

























  Driver          Modo di                 Comandi         limite          > 1
                  Trasferimento           Simultanei      SG
  Schede
                                          totale/LUN
  AM53C974        Busmastering DMA        12s/1s          255s            S
  aha152x         FIFO(8k) Polled         7s/1s           255s            N
      (AIC6260,
      AIC6360)
  aha1542         Busmastering DMA        8s/1s           16              S
  aha1740         Busmastering DMA        32s             16              N
  aha274x         Busmastering DMA        4s/1s           255s            S
  BusLogic        Busmastering DMA        192/31          128s, 8192h     S
  (valori per BT-948/958/958D, schede piu' vecchie supportano un numero
  minore di comandi)
  eata_dma        Busmastering DMA        64s-8192h/2-64  512s, 8192h     S
  fdomain         FIFO(8k) Polled         1s              64s             N
      (TMC1800,   tranne TMC18c30
      TMC18c30,   con 2k FIFO
      TMC18c50,
      TMC36c70)

  in2000*         FIFO(2k) Polled         1s              255s            N
  g_NCR5380       Pure Polled             16s/2s          255s            S
      (NCR5380,
      NCR53c80,
      NCR5381,
      NCR53c400)
  gsi8*           Slave DMA               16s/2s          255s
      (NCR5380)
  PAS16           Pure Polled             16s/2s          255s            S
      (NCR5380)   o Interlocked Polled
                  (non funziona su alcuni sistemi!)
  seagate         Interlocked Polled      1s/1s           255s            N
  wd7000          Busmastering DMA        16s/1s          16              S
  t128            Interlocked Polled      16s             255s            S
      (NCR5380)
  qlogic          Interlocked Polled      1s/1s           255s            N

  ultrastor       Busmastering DMA        16s/2s          32              S
  53c7,8xx        Busmastering DMA
      (NCR53c810,
       NCR53c815,
       NCR53c820,
       NCR53c825)
      rel5                                1s/1s           127s            N
      rel10                               8s/1s           127s            S



  Note:

  1. Driver segnalati con un '*' non sono inclusi nella distribuzione
     del kernel, e le immagini di boot binarie potrebbero non essere
     disponibili.

  2. I numeri con il suffisso 's' sono limiti arbitrari impostati nel
     software che potrebbero essere cambiati con un define al momento
     della compilazione.

  3. I limiti hardware sono indicati da un suffisso "h", e potrebbero
     essere diversi dai limiti software attualmente imposti dai driver
     Linux.

  4. Numeri senza suffisso potrebbero indicare limiti hard o soft.


  5. La release 5 del driver NCR53c810  inclusa nei kernel 1.2.x e
     1.3.x; la release 10  disponibile tramite FTP anonimo.

  6. Con l'eccezione della AM53C974, le schede busmastering DMA sono
     intelligenti; con il microcodice di esecuzione NCR per la memoria
     principale, il codice di esecuzione AIC7770 dalla on-chip RAM, e il
     resto usando un interfaccia di stile mailbox.


  10.8.  Confronto tra schede



  Scheda                  Driver          Bus     Prezzo  Note
  Adaptec AIC-6260        aha152x         ISA             chip, non scheda
  Adaptec AIC-6360        aha152x         VLB             chip, non scheda
      (Usato in molte
      schede multi IO SCSI
      VESA/ISA e in schede
      madri Zenon)
  Adaptec 1520            aha152x         ISA
  Adaptec 1522            aha152x         ISA     $80     1520 con FDC
  Adaptec 1510            aha152x         ISA             1520 senza BIOS,
                                                          non viene riconosciuta
                                                          automaticamente
  Adaptec 1540C           aha1542         ISA
  Adaptec 1542C           aha1542         ISA             1540C w/FDC
  Adaptec 1540CF          aha1542         ISA             FAST SCSI-II
  Adaptec 1542CF          aha1542         ISA     $200    1540CF w/FDC
  Adaptec 1640            aha1542         MCA

  Adaptec 1740            aha1740         EISA            non piu' prodotta
  Adaptec 1742            aha1740         EISA            non piu' prodotta,
                                                          1740 con FDC
  Adaptec 2740            aha274x         EISA
  Adaptec 2742            aha274x         EISA            con FDC
  Adaptec 2840            aha274x         VLB
  Adaptec 2842            aha274x         VLB             con FDCFDC
  Adaptec 2940            aha274x         PCI
  Always IN2000           in2000          ISA
  BusLogic BT-948         BusLogic        PCI     $180    Ultra SCSI
  BusLogic BT-958         BusLogic        PCI     $230    Wide Ultra SCSI


  (vedi la sezione ``Adattatori di host BusLogic MultiMaster'' per altre
  descrizioni di schede BusLogic)




















  DPT  PM2011             eata_dma        ISA     FAST SCSI-II
       PM2012A            eata_dma        EISA    FAST SCSI-II
       PM2012B            eata_dma        EISA    FAST SCSI-II
       PM2021             eata_dma        ISA     FAST SCSI-II
       PM2022             eata_dma        EISA    FAST SCSI-II
       PM2024             eata_dma        PCI     FAST SCSI-II
       PM2122             eata_dma        EISA    FAST SCSI-II
       PM2322             eata_dma        EISA    FAST SCSI-II
       PM2124             eata_dma        PCI     FAST SCSI-II
       PM2124             eata_dma        PCI     FAST SCSI-II
       PM2124             eata_dma        PCI     FAST SCSI-II
       PM2124             eata_dma        PCI     FAST SCSI-II
       PM2124             eata_dma        PCI     FAST SCSI-II
       PM2124             eata_dma        PCI     FAST SCSI-II
       PM2041W            eata_dma        ISA     Wide Single-ended SCSI-II
       PM2041UW           eata_dma        ISA     Ultra Wide Single-ended
       PM2042W            eata_dma        EISA    Wide Single-ended
       PM2042UW           eata_dma        EISA    Ultra Wide Single-ended
       PM2044W            eata_dma        PCI     Wide Single-ended
       PM2044UW           eata_dma        PCI     Ultra Wide Single-ended
       PM2142W            eata_dma        EISA    Wide Single-ended
       PM2142UW           eata_dma        EISA    Ultra Wide Single-ended
       PM2144W            eata_dma        PCI     Wide Single-ended
       PM2144UW           eata_dma        PCI     Ultra Wide Single-ended
       PM3021             eata_dma        ISA     multichannel
                                                  raid/simm sockets
       PM3122             eata_dma        EISA    multichannel/raid
       PM3222             eata_dma        EISA    multichannel
                                                  raid/simm sockets
       PM3224             eata_dma        PCI     multichannel
                                                  raid/simm sockets
       PM3334             eata_dma        PCI     Wide Ultra SCSI
                                                  multichannel
                                                  raid/simm sockets

  DTC 3290                aha1542         EISA    Anche se dovrebbe
                                                  funzionare, l'hardware
                                                  DTC non e' supportato
                                                  a causa della politica
                                                  di rilascio della
                                                  documentazione
  DTC 3130                53c7,8xx        PCI             '810
  DTC 3130B               53c7,8xx        PCI             '815
  DTC 3292                aha1542         EISA            3290 con FDC
  DTC 3292                aha1542         EISA            3290 con FDC
  Future Domain 1680      fdomain         ISA             FDC
  Future Domain 3260      fdomain         PCI

  NCR53c810 (schede 53c7,8xx              PCI     $60     chip, non scheda.
    di FIC, Chaintech,                    (scheda)        Le schede non hanno
    Nextor, Gigabyte, etc.                                BIOS, anche se alcune
    Schede madri con chip di                              schede madri non NCR
    AMI, ASUS, J-Bond ecc.                                hanno il BIOS SDMS
    Comune nei sistemi PCI di DEC
  NCR53c815 (             53c7,8xx        PCI     $100    NCR53c810 con
      Intel PCISCSIKIT,                                   bios
      NCR8150S, etc)
  NCR53c825       53c7,8xx                PCI     $120    Versione Wide del
                                                          NCR53c815. Notate
                                                          che il driver Linux
                                                          attuale non negozia
                                                          trasferimenti wide
  Pro Audio Spectrum 16   pas16           ISA             Scheda audio con SCSI
  Seagate ST01            seagate         ISA     $20     Il BIOS funziona solo
                                                          con alcuni driver
  Seagate ST02            seagate         ISA     $40     ST01 con FDC
  Sound Blaster 16 SCSI   aha152x         ISA             Scheda audio con SCSI
  Western Digital 7000    wd7000          ISA             con FDC
  Trantor T128            t128            ISA
  Trantor T128F           t128            ISA             T128 con FDC e
                                                          supporto per IRQ alto
  Trantor T130B           g_NCR5380       ISA
  Ultrastor 14F           ultrastor       ISA             con FDC
  Ultrastor 24F           ultrastor       EISA            con FDC
  Ultrastor 34F           ultrastor       VLB



  Note:

  1. Trantor  stato acquistato recentemente da Adaptec, e alcuni
     prodotti vengono venduti sotto il nome Adaptec

  2. Ultrastor ha recentemente fatto fallimento, perci al momento non
     si trova il supporto tecnico

  3. Il prezzo per le schede busmastering NCR53c810 non  un errore di
     battitura, comprende il pacchetto driver standard ASPI/CAM per DOS,
     OS/2 e Windows (per un accesso a 32 bit), e altri driver sono
     disponibili per uno scaricamento gratuito.

     Alcune persone sono state fortunate con le seguenti compagnie:



       SW (swt@netcom.com) (214) 907-0871 fax (214) 907-9339





  Fino al 23 Dic 1995, il loro prezzo era di 53$ sulle schede '810.

  4. Gli ultimi chip SCSI di Adaptec mostrano una sensibilit inconsueta
     ai problemi di cablaggio e terminazione. Per questi motivi, non mi
     sento di raccomandare la Adaptec 154x C e gli aggiornamenti CF o la
     serie 2xxx.

     Notate che i problemi di affidabilit non si applicano alle vecchie
     schede 154x B, 174x A o per quanto ne so alle schede base
     AIC-6360/AIC-6260  (1505, 1510, 1520 ecc).

     Inoltre la qualit del loro supporto tecnico  diminuita
     sensibilmente, con lunghi ritardi sempre pi frequenti, e con i
     loro addetti molto ignoranti (dicono che ci sono politiche di non
     divulgazione su certa letteratura quando in realt non ce ne sono)
     e ostili (ad esempio si rifiutano di passare le domande a qualcuno
     pi esperto di loro nel caso in cui non siano in grado di dare una
     risposta esauriente).

     Se gli utenti deiderano un buon trattamento dovrebbero tenere conto
     di questi aspetti. Comunque le Adaptec 152x/1510/1505 sono meglio
     di altre schede ISA di prezzo simile, e si possono fare degli
     ottimi affari con schede usate 154x revisione B e schede 1742 che
     secondo me superano i problemi di supporto.

  5. Tutte le schede DPT possono essere aggiornate con moduli cache e
     raid, la maggior parte delle schede sono anche disponibili in
     versioni Wide e/o Differential.

  6. Le varie schede NCR non si equivalgono completamente. Ad esempio,
     mentre la ASUS SC200 usa la terminazione attiva, molte altre schede
     NCR53c810 usano la terminazione passiva. La maggior parte delle
     schede '825 usano la terminazione attiva, ma alcune usano una ROM
     per BIOS e altre hanno una FLASH ROM. La maggior parte delle schede
     '825 ha un connettore esterno WIDE, un connettore interno WIDE, e
     connettori interni narrow, anche se alcuni (ad esempio il modello
     CSC, meno costoso) non hanno il connettore interno narrow.


  10.9.  Riassunto


  La maggior parte degli utenti ISA, EISA, VESA e PCI saranno
  probabilmente serviti meglio da una scheda BusLogic MultiMaster, a
  causa delle sue prestazioni, delle caratteristiche come ad esempio la
  terminazione attiva, e la compatibilit Adaptec 1540. C' un certo
  numero di modelli disponibili con intefacce local bus EISA, ISA, PCI,
  e VESA, single ended e differential, e bus SCSI di 8/16 bit. I pi
  recenti modelli Ultra SCSI PCI, i BT-948/958/958D, includono anche una
  Flash ROM per facili aggiornamenti firmware, e anche una terminazione
  automatica intelligente.

  Persone che necessitano le migliori prestazioni IO possibili
  dovrebbero prendere in considerazione le schede di DPT, che sono le
  uniche che supportano RAID, caching e pi di un canale SCSI.

  Persone con il sistema PCI dovrebbero prendere in considerazione le
  schede basate NCR53c8xx. Queste sono controller bus mastering SCSI, le
  '810 sono disponibili al prezzo di 53 $ cadauna (cio pi economiche
  delle Adaptec 1520). I test di C't magazine hanno decretato che tali
  schede sono pi veloci sia di Adaptec 2940 che di BusLogic BT-946C
  (sotto DOS), e ottengono delle prestazioni ragionevoli sotto Linux
  (fino a 6 M/sec attraverso il filesystem). Gli svantaggi di queste
  schede a confronto delle BusLogic consistono nel fatto che non sono
  compatibili con Adaptec 1540, non tutte hanno la terminazione attiva,
  e avrete bisogno dell'ultima revisione del driver (standard in 1.3.5x,
  disponibile anche tramite FTP anonimo per 1.2.x) per poter sfruttare
  appieno l'hardware, e sono pi soggette a problemi rispetto ad una
  scheda con un'interfaccia mailbox come ad esempio BusLogic o DPT.

  L dove un funzionamento perfetto immediato  una necessit assoluta
  una scheda BusLogic MultiMaster o DPT  probabilmente la scelta ottima
  dovuta alla complessit e ai potenziali problemi delle schede con
  interfaccia non-mailbox come ad esempio le NCR53c8xx e Adaptec
  AIC7xxx.

  Le persone che desiderano uno SCSI non PCI ma hanno pochi soldi a
  disposizione saranno probabilmente pi felici trovando una scheda
  Adaptec 154x revisione B usata o una 174x revisione A, oppure un clone
  Adaptec 1520 se vogliono hardware nuovo. Queste schede offrono
  prestazioni ragionevoli a un prezzo modesto.


  11.  Assegnazione dei numeri secondari


  A causa dei vincoli imposti dall'uso di Linux di un dev_t di 16 bit
  con soli 8 bit allocati al numero secondario, i numeri minori dei
  disci, nastri, CD-ROM e disposisitivi SCSI generici sono assegnati
  dinamicamente seguendo la seguente procedura:







  Per tutti gli adattatori host SCSI, da scsi0 a scsiN
      Per tutti gli ID SCSI su questo bus, da 0 a 7, eccetto per questo
      adattatore host ID.
          Per tutte le unit logiche, da 0 tramite max_scsi_luns:
            - Provare la combinazione bus, target, LUN inviando un comando
              TEST UNIT READY. Se non c' possibilit che altre unit siano
              qui, non provare altri LUN per questa combinazione bus + SCSI ID
            - Inviare un comando INQUIRY per determinare cosa  stato trovato
              incluso il tipo di dispositivo, il produttore, il modello, la
              revisione del firmware.
            - Passare i risultati di ci a una funzione speciale di ricognizione
              per ciascun driver di alto livello presente (cio dischi, nastri
              ecc). Attaccare questo dispositivo alla prossima unit disponibile
              per ciascun driver che sia disponibile per gestirlo. Il device
              generico si attacca a ogni dispositivo.
            - Se si trattava di un SCSI-I, o di un dispositivo appartenente ad
              una lista di dispositivi noti per non gestire LUN multipli,
              non provare alcun altro LUN su questo bus + SCSI ID.
            - Se si tratta di un dispositivo noto per avere LUN multipli, allora
              viene forzata una scansione di tutto lo spettro Lun, scavalcando
              max_scsi_luns.




  Ci sono spesso problemi con questo approccio a causa del fatto che se
  possedete un sistema dove alcuni dispositivi sono presenti
  saltuariamente, allora i numeri secondari per un dato dispositivo
  dipenderanno da quali dispositivi erano presenti al momento del boot.
  Questo pu far insorgere dei problemi, perch gli script rc o il file
  /etc/fstab potrebbero contenere istruzioni per il montaggio di
  particolari partizioni che falliscono quando il disco appare con un
  numero secondario diverso.

  Questo problema non  ancora stato del tutto risolto. C' un programma
  che pu essere trovato su tsx-11 che crea una gerarchia /dev/scsi
  basata sui numeri host, id e lun. Questo sistema non  perfetto, ma
  aiuta a risolvere alcuni problemi.

  Una soluzione migliore verr probabilmente fornita dalla pseudo
  directory /proc/scsi. Questo  attualmente un lavoro in corso, quindi
  al momento attuale non possiamo descrivere la forma della soluzione,
  ma al momento in cui scriviamo appare essere un'approccio promettente
  per la soluzione di alcune delle priorit.


  12.  Nota sulla traduzione

  La traduzione originale di questo HOWTO  opera della Apogeo
  <http://www.apogeonline.com>, per il libro Linux HowTo (La bibbia di
  Linux) realizzato in collaborazione con il Pluto. L'Apogeo ha
  gentilmente concesso questa ed altre traduzioni ad ILDP per la sua
  diffusione elettronica.

  Conversione in SGML e correzione a cura di Samuele Maretti
  s.maretti@tiscalinet.it, cui vanno segnalati pure eventuali errori,
  incongruenze ecc.









  SMB HOWTO
  David Wood, dwood@plugged.net.au
  v1.3, 20 aprile 2000

  Questo  lo SMB HOWTO.  Il documento descrive come usare il protocollo
  Session Message Block (SMB), chiamato anche protocollo NetBIOS o Lan
  Manager, con Linux.  Traduzione italiana e manutenzione: Andrea
  Girotto (andrea.girotto@era-net.it)

  1.  Licenza

  Copyright (c)  2000  David Wood.

  Permission is granted to copy, distribute and/or modify this document
  under the terms of the GNU Free Documentation License, Version 1.1 or
  any later version published by the Free Software Foundation; with no
  Invariant Sections, with no Front-Cover Texts and with no Back-Cover
  Texts.  A copy of the license is available at
  http://www.gnu.org/copyleft/fdl.html
  <http://www.gnu.org/copyleft/fdl.html>.


       L'unica licenza valida  l'originale in lingua inglese. Di
       seguito trovate una traduzione abbastanza fedele che per
       non ha alcun valore.


  Copyright (C) 2000 David Wood.

   concessa la copia, la distribuzione e/o modifica di questo documento
  nei termini di GNU Free Documentation License, Versione 1.1 oppure
  ogni successiva versione pubblicata da Free Software Foundation, senza
  variazione delle sezioni, senza testi di Front-Cover o di Back-Cover.
  Una copia della licenza  disponibile presso
  http://www.gnu.org/copyleft/fdl.html
  <http://www.gnu.org/copyleft/fdl.html>.


  2.  Introduzione

  Questo  lo SMB HOWTO.  Il documento descrive come usare il protocollo
  Session Message Block (SMB), chiamato anche protocollo NetBIOS o
  LanManager, con Linux usando Samba.  Nonostante tale documento sia
  basato su Linux,  possibile eseguire Samba sulla maggior parte dei
  sistemi operativi Unix e simili.

  Questo documento  gestito da David Wood (dwood@plugged.net.au).
  Aggiunte, modifiche o correzioni per la versione successiva di questo
  documento, possono essere spedite (in inglese) all'indirizzo indicato.

  Prima di richiedere aiuto, si prega di consultare il sito di Samba
  localizzato presso: http://www.samba.org/ <http://www.samba.org/>, che
  dispone di molta pi documentazione.   presente una quantit enorme
  di informazioni.  Si pu anche cercare di leggere il newsgroup
  comp.protocols.smb.

  Il protocollo SMB  usato da Microsoft Windows 3.11, NT e 95/98 per
  condividere dischi e stampanti. Usando la suite di programmi Samba di
  Andrew Tridgell (Andrew.Tridgell@anu.edu.au), macchine Unix (compreso
  Linux) possono condividere dischi e stampanti con host Windows.  Paal-
  Kr.  Engstad (engstad@intermetrics.com) e Volker Lendecke
  (lendecke@namu01.gwdg.de) hanno sviluppato lo strumento smbfs che
  consente a macchine Unix di montare condivisioni SMB da macchine
  Windows oppure host Samba.


  Il pacchetto Samba sostanzialmente consente di:


  1. Condividere un disco Linux con macchine Windows.

  2. Condividere un disco Windows con macchine Linux.

  3. Condividere una stampante Linux con macchine Windows.

  4. Condividere una stampante Windows con macchine Linux.

  Tutte queste possibilit sono discusse in questo documento.

  Attenzione: Le procedure, i programmi e gli script riportati, o si
  sono dimostrati funzionanti per l'autore, o sono stati riportati
  esserlo dalle persone che li hanno forniti; con configurazioni
  differenti potrebbero non funzionare; se ci si trova in tale
  situazione,  possibile spedire un email all'autore con i suggerimenti
  per migliorare questo documento.

  Si prega di porre attenzione al fatto che macchine Windows 3.x,
  affinch possano accedere a condivisioni SMB, devono avere uno stack
  TCP/IP e le DLL Win32s.  Entrambi questi pacchetti sono disponibili
  presso il sito di Microsoft (http://www.microsoft.com
  <http://www.microsoft.com>).  Al momento in cui si scrive questa
  versione dell'HOWTO,  riportato che Microsoft richiede la
  sottoscrizione a Microsoft Software Developers Network (MSDN) al fine
  di prelevare lo stack TCP/IP-32 per Windows 3.x dal loro sito.  Dal
  momento che tale software era distribuito gratuitamente, dovrebbero
  essere diffuse diverse copie meno recenti probabilmente presso amici o
  tramite gruppi di utenti.


  3.  Altre informazioni

  Questo HOWTO spiega come configurare servizi minimi di file e di
  stampa per SMB su una macchina Linux.  Samba  un pacchetto piuttosto
  completo e complesso.  Non sar fatto alcun tentativo di duplicare
  tutta la documentazione Samba.

  Per maggiori informazioni, consultare i seguenti documenti:

    La documentazione Samba, disponibile come parte del pacchetto.  La
     distribuzione  disponibile presso: ftp://ftp.samba.org/

    Il Printing HOWTO di Linux (in versione italiana presso PLUTO).

    Protocol Standard For A NetBIOS Service On A TCP/UDP Transport.

     RFC 1001
        > RFC 1001 - Concepts and Methods.

     RFC 1002
        > RFC 1002 - Detailed Specifications.



  4.  Installazione

  Per prima cosa, al fine di poter usare Samba sulle proprie macchine 
  necessario utilizzare un singolo segmento LAN ethernet ed usare il
  protocollo TCP/IP.  Samba non funzioner con altri protocolli di rete.
  Generalmente  facile soddisfare questa richiesta, dal momento che
  Linux e Windows 95/98/NT sono distribuiti con il TCP/IP.  Tuttavia, se
  si usa Windows 3.x  necessario aggiungere il supporto TCP/IP.  Una
  delle domande poste pi di frequente  perch Samba ``non funziona''
  con sistemi Windows senza il protocollo TCP/IP.

  Per installare TCP/IP con Windows 95/98, si deve selezionare Pannello
  di controllo | Rete, aggiungere e configurare Microsoft TCP/IP.  Con
  Windows NT, si selezioni Pannello di Controllo | Rete | Protocolli.

  Per prelevare l'ultima versione di Samba si deve selezionare il mirror
  pi vicino, dalla lista disponibile presso:

  ftp://ftp.samba.org/

  Nella maggior parte dei casi, le distribuzioni Linux dispongono gi
  dei pacchetti di una versione recente di Samba.

  Il pacchetto Samba richiede due demoni.  Tipicamente sono installati
  in /usr/sbin ed eseguiti o in fase di avvio dagli script di
  inizializzazione del sistema o da inetd.  Script di esempio sono
  elencati in ``Eseguire i demoni''.


  ______________________________________________________________________
      smbd (Il demone SMB)
      nmbd (Fornisce supporto di NetBIOS nameserver per i client)
  ______________________________________________________________________



  Si noti che il servizio dei nomi fornito dal demone nmbd  differente
  dal servizio fornito da Domain Name Service (DNS).  Il servizio di
  nomi NetBIOS usato da SMB  ``stile-Windows''.  In altre parole, avere
  un DNS attivo, non ha nulla a che vedere con la possibilit di Samba
  di risolvere i nomi dei computer.

  Di solito (la posizione  opzionale) i seguenti programmi di Samba
  sono installati in /usr/bin oppure /usr/local/samba/bin:


     smbclient
        Client SMB per macchine UNIX


     smbprint
        script per usare la stampante di un host SMB


     smbprint.sysv
        Come smbprint per macchine con UNIX SVR4


     smbstatus
        Elenca le connessioni SMB correnti per il computer locale


     smbrun
        Facilita esecuzioni di applicazioni su un host SMB

  La distribuzione in formato binario per il supporto del file system
  smbfs,  discussa successivamente in questo documento.

  Inoltre,  incluso in questo HOWTO uno script chiamato ``print'', da
  usare come interfaccia per smbprint.

  Il pacchetto Samba  semplice da installare.  Per prima cosa 
  necessario recuperare il sorgente dal sito elencato precedentemente e
  leggere il file README della distribuzione.  C' anche un file
  chiamato docs/INSTALL.txt che fornisce istruzioni passo-a-passo.
  Seguendo l'installazione, si pongono i demoni in /usr/sbin ed i
  programmi in /usr/bin.  Le pagine del manuale in /usr/local/man.

  Compilando il pacchetto Samba, si specifica nel Makefile la locazione
  del file di configurazione smb.conf, generalmente /etc, ma pu essere
  una qualsiasi.  Per questo documento si suppone che tale file di
  configurazione sia /etc/smb.conf; altri file di configurazione:
  /var/log/samba-log.%m e lock directory /var/lock/samba.

  Si installi il file di configurazione, smb.conf. Nella directory dove
  si  compilato Samba  presente una sottodirectory examples/simple e
  si legga il file README.  Si copi il file smb.conf in /etc.
  ATTENZIONE!  Se si ha una distribuzione Linux con gi Samba
  installato, potrebbe gi essere presente un file di configurazione in
  /etc, sarebbe meglio iniziare con quello.

  Se non si desidera avere il file di configurazione in /etc, pu essere
  messo in una qualsiasi posizione ed eventualmente collegato con un
  link simbolico in /etc:


  ______________________________________________________________________
      ln -s /percorso/di/smb.conf /etc/smb.conf
  ______________________________________________________________________




  5.  Eseguire i demoni

  I due demoni SMB sono: /usr/sbin/smbd e /usr/sbin/nmbd.  Nella maggior
  parte delle distribuzioni, questi possono essere fatti partire,
  interrompere o riavviare attraverso script di avvio come
  /etc/rc.d/init.d/smb e collegati in modo simbolico agli appropriati
  runlevel.

  Nel caso si decida di non usare i script di avvio,  possibile
  eseguire i demoni di Samba da inetd o come singoli processi.  Samba
  risponder leggermente pi velocemente come demone isolato rispetto a
  quando eseguito tramite inetd.

  In entrambi i casi,  necessario verificare che il file /etc/services
  presenti linee simili a queste:



       ______________________________________________________________________
       netbios-ns      137/tcp         nbns
       netbios-ns      137/udp         nbns
       netbios-dgm     138/tcp         nbdgm
       netbios-dgm     138/udp         nbdgm
       netbios-ssn     139/tcp         nbssn
       ______________________________________________________________________




  Si faccia attenzione che non siano commentate.  A seconda della
  distribuzione usata, potrebbe anche essere necessario aggiungerle.
  Samba non sar in grado di collegarsi alle porte appropriate a meno
  che il file /etc/services non presenti tali linee.

  Per eseguire i demoni da inetd, si deve aggiungere nel file di
  configurazione, /etc/inetd.conf:


       ______________________________________________________________________
           # Servizi NetBIOS SAMBA (per condivisione di file e stampanti con PC)
           netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
           netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd
       ______________________________________________________________________




  Quindi far ripartire il demone di inetd con il comando:


  ______________________________________________________________________
      kill -HUP `cat /var/run/inetd.pid`
  ______________________________________________________________________



  Per eseguire i demoni dagli script di inizializzazione del sistema, si
  possono mettere le istruzioni seguenti in un file chiamato
  /etc/rc.d/init.d/smb (nella maggior parte delle distribuzioni) e fare
  collegamenti simbolici a file indicati nei commenti:












































  ______________________________________________________________________
      #!/bin/sh

      #
      # /etc/rc.d/init.d/smb - inizia e termina i servizi SMB.
      #
      # file che seguono devono essere link simbolici a questo file:
      # symlinks: /etc/rc.d/rc1.d/K35smb  (termina i servizi SMB durante
      #                                    shutdown)
      #           /etc/rc.d/rc3.d/S91smb  (inizia i servizi SMB in
      #                                    multiuser mode)
      #           /etc/rc.d/rc6.d/K35smb  (Termina i servizi SMB prima
      #                                    di reboot)
      #

      # Sorgente per funzioni di libreria.
      . /etc/rc.d/init.d/functions

      # Sorgente per la configurazione di rete.
      . /etc/sysconfig/network

      # Verifica che la rete sia configurata.
      [ ${NETWORKING} = "no" ] && exit 0

      # Controlla il tipo di chiamata.
      case "$1" in
        start)
          echo -n "Attivati servizi SMB: "
          daemon smbd -D
          daemon nmbd -D
          echo
          touch /var/lock/subsys/smb
          ;;
       stop)
          echo -n "Terminati servizi SMB: "
          killproc smbd
          killproc nmbd
          rm -f /var/lock/subsys/smb
          echo ""
          ;;
       *)
          echo "Uso: smb {start|stop}"
          exit 1
      esac
  ______________________________________________________________________




  Se all'avvio di Samba si presenta un errore che segnala
  l'impossibilit da parte del demone a collegarsi alla porta 139,
  allora probabilmente  presente in esecuzione un altro processo Samba
  che non  stato ancora interrotto.  Verificare la lista dei processi
  (con 'ps auxww | grep mbd') per determinare se un altro servizio Samba
   in esecuzione.


  6.  Configurazione generale ( /etc/smb.conf ).

  La configurazione di Samba su Linux (o su altre macchine UNIX) 
  controllata da un file soltanto, /etc/smb.conf, che determina quali
  risorse di sistema si desidera condividere con il mondo esterno e
  quali restrizioni attivare.

  Ai fini di introduzione, il primo file smb.conf mostrato, sar il pi
  semplice possibile per concentrare l'attenzione su come condividere
  dischi e stampanti Linux con macchine Windows.  Nei paragrafi
  successivi si introdurranno altri concetti.

  Ciascuna sezione del file inizia con un'intestazione come [global],
  [homes], [printers], ecc.

  La sezione [global] imposta le variabili usate da Samba per definire
  la condivisione di ogni altra risorsa.

  La sezione [homes] consente ad un utente remoto accesso alla propria
  (e solo a quella) home directory sulla macchina locale (Linux).
  Quindi se un utente Windows cerca di connettersi a tale condivisione
  da una macchina Windows, verr collegato alla propria home directory.
  Si noti che per poter accedere alla condivisione  necessario avere un
  account sulla macchina Linux.

  Il file di esempio smb.conf fornito, consente ad utenti remoti di
  accedere alla propria home directory dalla macchina locale e di
  scrivere in una directory temporanea.  Affinch un utente Windows veda
  queste condivisioni,  necessario che la macchina Linux sia sulla rete
  locale.  Quindi l'utente semplicemente connette un disco di rete dal
  File Manager di Windows oppure da Windows Explorer.

  Nelle sezioni che seguono saranno fornite specificazioni aggiuntive
  per la configurazione al fine di condividere maggiori risorse.



       ______________________________________________________________________
       ; /etc/smb.conf
       ;
       ; Dopo aver modificato questo file assicurarsi di far ripartire il
       ; server, ad esempio:
       ; /etc/rc.d/init.d/smb stop
       ; /etc/rc.d/init.d/smb start

       [global]
       ; Attivare questa linea se si desidera un account generico
       ; guest account = nobody
          log file = /var/log/samba-log.%m
          lock directory = /var/lock/samba
          share modes = yes

       [homes]
          comment = Directory Personali
          browseable = no
          read only = no
          create mode = 0750

       [tmp]
          comment =  Spazio per file temporanei.
          path = /tmp
          read only = no
          public = yes
       ______________________________________________________________________




  Avendo scritto un nuovo smb.conf,  utile verificare la correttezza.
   possibile usare l'utility `testparm' per controllare un file
  smb.conf (pagina del manuale: testparm); se non viene riportato alcun
  problema, smbd caricher correttamente il file di configurazione.

  Un aiuto prezioso: se il server Samba dispone di pi di una
  interfaccia ethernet, il demone smbd potrebbe collegarsi a quella
  sbagliata.  In tal caso,  possibile forzare il comportamento
  desiderato, aggiungendo nella sezione [global] una linea simile a:



       ______________________________________________________________________
       interfaces = 192.168.1.1/24
       ______________________________________________________________________




  sostituendo al posto dell'indirizzo IP quello assegnato
  all'interfaccia ethernet corretta.  Il valore ``24''  corretto per
  una rete di classe C, ma dovrebbe essere ricalcolato nel caso di
  sottoreti.  Tale numero si riferisce alla maschera di rete.  Numeri
  per altre classi o reti sono disponibilie nell'IP-Masquerade mini-
  HOWTO.

   disponibile anche un tool grafico per la configurazione di Samba:
  GtkSamba.  Si consulti http://www.open-systems.com/gtksamba.html
  <http://www.open-systems.com/gtksamba.html>.


  7.  Condividere un disco Linux con macchine Windows

  Come dimostrato nel precedente smb.conf,  alquanto semplice
  condividere dischi Linux con utenti Windows.  Come ogni altra cosa in
  Samba,  possibile controllare con notevole precisione il
  comportamento.  Ecco alcuni esempi.  Per condividere pubblicamente una
  directory, si pu creare una copia della sezione [tmp] aggiungendo al
  smb.conf qualcosa come:



       ______________________________________________________________________
       [public]
          comment = Pubblicamente Accessibile
          path = /home/public
          public = yes
          writable = yes
          printable = yes
       ______________________________________________________________________




  Le seguenti modifiche rendono la directory precedente pubblicamente
  leggibile e scrivibile solo dalle persone del gruppo staff:



       ______________________________________________________________________
       [public]
          comment = Pubblicamente Accessibile
          path = /home/public
          public = yes
          writable = yes
          printable = no
          write list = @staff
       ______________________________________________________________________





  In passato era cos semplice. Tuttavia, recentemente Microsoft ha reso
  la vita leggermente pi difficile per chi usa Samba.  Windows 98,
  Windows NT (service pack 3 e successivi) e le ultime versioni di
  Windows 95, usano in modo predefinito password criptate.  Samba invece
   impostato per password non criptate.  Non  possibile consultare i
  server in modo anonimo, quando sia client che server usino password in
  codice, perch non  possibile fare una connessione anonima.

   possibile verificare se  presente un disaccordo sul tipo di
  password tra server e client, quando provando a connettersi ad una
  condivisione si presenta un dialog box con un messaggio del tipo "Non
   possibile accedere a questo account da questa macchina".

   possibile configurare il server Samba per usare password criptate,
  o, in alternativa, configurare i sistemi Windows per usare password in
  chiaro.

  Al fine di ottenere che Windows usi password in chiaro, usando
  l'editor di registro (regedit):


     Windows 95/98
        HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP


     Windows NT
        HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rdr\Parameters


     Windows 2000
        HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkStation\Parameters

  e si aggiunga un nuovo valore DWORD:


     Value Name:
        EnablePlainTextPassword

     Data:
        0x01

  Una volta apportate queste modifiche, si faccia ripartire la macchina
  Windows e si cerchi di mappare un drive di rete sul server Samba.
  Dovrebbe funzionare, posto che il server Samba usi password in chiaro.

  Per configurare Samba al fine di usare password criptate, si
  aggiungano nella sezione [global] del file /etc/smb.conf le seguenti
  linee:



       ______________________________________________________________________
       encrypt passwords = yes
       smb passwd file = /etc/smbpasswd
       ______________________________________________________________________




  Prima di intraprendere una tale modifica si consiglia vivamente di
  leggere i file ENCRYPTION.txt, Win95.txt e WinNT.txt della
  documentazione Samba!

  Se i client ed il server usano password criptate, non sar possibile
  elencare le condivisioni sul server, fino a che non ne sia stata fatta
  una con appropriata autenticazione.  Per avere la connessione
  iniziale, o si digiti manualmente il nome della condivisione nel File
  Manager di Windows, o nel dialog box di Explorer, nella forma connetta
  al server con un username ed una password che siano validi per quella
  macchina.

  Se si sospetta che il servizio dei nomi NetBIOS non sia correttamente
  configurato (magari perch si ottiene un errore del tipo 'host not
  found', quando si cerca di connettersi), si provi ad usare solo
  l'indirizzo IP del server: '\\<indirizzi>\<nomecondivisione>'.

  Per ottenere che i nomi dei file appaiano correttamente, potrebbe
  anche essere necessario impostare alcune opzioni nelle appropriate
  sezioni di condivisione.  Quelle che si indicano funzionano con
  Windows 95/98/NT ma probabilmente sar necessario modificarle per i
  client Windows 3.x:



       ______________________________________________________________________
           ; Mangle case = yes seems to give the correct filenames
           ; for Win95/98/NT.
           mangle case = yes

           ; se samba debba essere sensibile a maiuscole/minuscole
           case sensitive = no

           ; impostazione predefinita per i file creati
           default case = lower

           ; preserva maiuscole/minuscole per tutti i nomi di file
           preserve case = yes

           ; preserva la capitalizzazione per nomi di file dos (8.3)
           short preserve case = no
       ______________________________________________________________________




  Consultare la documentazione Samba o le pagine del manuale per altre
  configurazioni particolari di condivisione.



  8.  Condividere un disco Windows con macchine Linux

  Sistemi Linux (UNIX) possono anche sfogliare e montare condivisioni
  SMB.  Si noti che questo  possibile sia con server Windows che con
  server Samba.

  Con la distribuzione Samba,  incluso un programma client del
  protocollo SMB per macchine UNIX.  Dispone di un'interfaccia a linea
  di comando simile ad ftp.  Si pu usare questo programma per
  trasferire file tra un server Windows ed un client Linux.

  La maggior parte delle distribuzioni Linux ora include l'utile
  pacchetto smbfs, che consente di montare e smontare condivisioni SMB.

  Per elencare le condivisioni disponibili su un dato host, 
  sufficiente eseguire:


  ______________________________________________________________________
      /usr/sbin/smbclient -L host
  ______________________________________________________________________

  dove host  il nome della macchina che si desidera interrogare.
  Questo comando ritorna una lista di nomi di 'servizi', cio nomi di
  dischi o stampanti che si possono condividere.  A meno che il server
  SMB non sia configurato per nessuna sicurezza, sar richiesto una
  password.  Potrebbe essere essere la password per l'account guest di
  quella macchina o per il proprio personale.

  Per esempio:


  ______________________________________________________________________
      smbclient -L zimmerman
  ______________________________________________________________________



  L'output di questo comando dovrebbe somigliare a qualcosa del tipo:



       Server time is Sat Aug 10 15:58:27 1996
       Timezone is UTC+10.0
       Password:
       Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]

       Server=[ZIMMERMAN] User=[] Workgroup=[WORKGROUP] Domain=[]

               Sharename      Type      Comment
               ---------      ----      -------
               ADMIN$         Disk      Remote Admin
               public         Disk      Public
               C$             Disk      Default share
               IPC$           IPC       Remote IPC
               OReilly        Printer   OReilly
               print$         Disk      Printer Drivers


       This machine has a browse list:

               Server               Comment
               ---------            -------
               HOPPER               Samba 1.9.15p8
               KERNIGAN             Samba 1.9.15p8
               LOVELACE             Samba 1.9.15p8
               RITCHIE              Samba 1.9.15p8
               ZIMMERMAN




  Il "browse list" elenca altri server SMB sulla rete con risorse da
  condividere.

  Per eseguire il client:


  ______________________________________________________________________
      /usr/sbin/smbclient servizio <password>
  ______________________________________________________________________



  dove 'servizio'  il nome di macchina e servizio.  Per esempio se si
  desidera raggiungere una directory condivisa come 'public' su una
  macchina chiamata 'zimmerman', il servizio dovrebbe essere chiamato:
  \\zimmerman\public.  Per le restrizioni dell'interprete dei comandi
  (shell) potrebbe essere necessario raddoppiare le barre inverse,
  qualcosa come:


  ______________________________________________________________________
      /usr/sbin/smbclient \\\\zimmerman\\public mypasswd
  ______________________________________________________________________



  dove 'mypasswd'  la propria password.

  A questo punto smbclient dovrebbe presentare la propria richiesta
  comandi:



       Server time is Sat Aug 10 15:58:44 1996
       Timezone is UTC+10.0
       Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]
       smb: \>




  Scrivendo 'h' si ottiene aiuto per usare smbclient:



       smb: \> h
       ls             dir            lcd            cd             pwd
       get            mget           put            mput           rename
       more           mask           del            rm             mkdir
       md             rmdir          rd             prompt         recurse
       translate      lowercase      print          printmode      queue
       cancel         stat           quit           q              exit
       newer          archive        tar            blocksize      tarmode
       setmode        help           ?              !
       smb: \>




  Se gi si conosce ftp, non dovrebbe essere necessario consultare le
  pagine del manuale di smbclient.

  Nonostante si possa usare smbclient per verificare il funzionamento, 
  scomodo per l'uso comune.  A questo punto potrebbe tornare utile il
  pacchetto smbfs.  Smbfs dispone di due semplici utility, smbmount e
  smbumount che funzionano come mount e umount per condivisioni SMB.

  Una cosa importante da notare:  necessario aver compilato il supporto
  SMB nel kernel per usare queste utility!

  L'esempio seguente dimostra un tipico uso di smbmount per montare una
  condivisione SMB chiamata "customers" da una macchina di nome
  "samba1":









  ______________________________________________________________________
  [root@postel]# smbmount "\\\\samba1\\customers" -U rtg2t -c 'mount /customers -u 500 -g 100'
  Added interface ip=192.168.35.84 bcast=192.168.255.255 nmask=255.255.0.0
  Got a positive name query response from 192.168.168.158 ( 192.168.168.158 )
  Server time is Tue Oct  5 10:27:36 1999
  Timezone is UTC-4.0
  Password:
  Domain=[IPM] OS=[Unix] Server=[Samba 2.0.3]
  security=user
  ______________________________________________________________________




  Il comando mount ora riporter la condivisione montata, come se fosse
  un export NFS:



       ______________________________________________________________________
       [root@postel]# mount
       /dev/hda2 on / type ext2 (rw)
       none on /proc type proc (rw)
       none on /dev/pts type devpts (rw,mode=622)
       //SAMBA1/CUSTOMERS on /customers type smbfs (0)
       ______________________________________________________________________




  Si consultino le pagine del manuale per dettagli su smbmount e
  smbumount ed il relativo uso.



  9.  Condividere una stampante Linux con macchine Windows

  Per condividere una stampante Linux con macchine Windows,  necessario
  accertarsi che la propria stampante sia correttamente configurata e
  funzioni con Linux.  Se la stampa da Linux  possibile,  abbastanza
  semplice configurare una condivisione per stampante SMB.

  Si noti che utenti Windows devono avere un account sulla macchina
  Linux/Samba al fine di poter stampare.  Windows 95/98 cercher di
  autenticarsi con il print server usando lo username e la password
  forniti per login all'avvio.  Questo significa che se si seleziona
  `Annulla' al LogOn di Windows, non sar possibile stampare (o
  connettersi ad altri servizi SMB)!  Windows NT consente di fornire
  username e password quando si usa una stampante.

  Consultare il Printing HOWTO per configurare la stampa locale.

  Aggiungere la configurazione di stampa al proprio smb.conf:













  ______________________________________________________________________
  [global]
      printing = bsd
      printcap name = /etc/printcap
      load printers = yes
      log file = /var/log/samba-log.%m
      lock directory = /var/lock/samba

  [printers]
      comment = All Printers
      security = server
      path = /var/spool/lpd/lp
      browseable = no
      printable = yes
      public = yes
      writable = no
      create mode = 0700

  [ljet]
      security = server
      path = /var/spool/lpd/lp
      printer name = lp
      writable = yes
      public = yes
      printable = yes
      print command = lpr -r -h -P %p %s
  ______________________________________________________________________




  Accertarsi che il percorso della stampante (in questo caso [ljet])
  corrisponda alla directory di spool in /etc/printcap!

  Le linee:


  ______________________________________________________________________
     printcap name = /etc/printcap
     load printers = yes
  ______________________________________________________________________



  Controllano se tutte le stampanti in /etc/printcap debbano essere
  caricate in modo predefinito.  In tal caso non c' ragione per
  impostare le stampanti individualmente.  La sezione [printers]
  specifica opzioni  per le stampanti che si definiscono esplicitamente.
  Se il sottosistema di stampa in uso non funziona in questo modo (BSD),
   necessario impostare un falso file printcap (oppure usare la tecnica
  del `print command').  Per maggiori informazioni relativamente il
  sistema printcap, si consulti il Printing HOWTO.

  Una tecnica utile per verificare le proprie connessioni  cambiare il
  comando di stampa in:


  ______________________________________________________________________
     print command = cp %S /tmp/print.%P.%S
  ______________________________________________________________________



  ed analizzare il file risultante.


  NOTA: ci sono alcuni problemi per condividere stampanti di macchine
  UNIX con macchine Windows NT usando Samba.  Un problema  che NT non
  vede correttamente la stampante condivisa.  Per rimediare consultare
  le note nella distribuzione Samba nel file docs/WinNT.txt.  Altri
  problemi hanno a che fare con le password.  Vedere i commenti nello
  stesso file per una maggiore comprensione o in caso di problemi nella
  configurazione.

  Oleg L. Machulskiy (machulsk@shade.msu.ru) ha suggerito un comando di
  stampa migliore da usare nell'esempio precedente:



       ______________________________________________________________________
       print command = smb2ps %s | lpr -r -h -P %p
       ______________________________________________________________________




  Dove 'smb2ps'  uno script che trasforma il file di spool ricevuto da
  Windows in un file Postscript usabile.  necessario eliminare le prime
  3 linee e le ultime 2, perch contengono codice PJL oppure PCL.

  Questo approccio  necessario solo se la macchina Windows stampa PCL e
  non realmente Postscript.  L'autore ha scoperto che Windows 95/98/NT
  non hanno un generico driver Postscript, ma il "Digital turbo
  Printserver 20" si  dimostrato essere abbastanza generico per la
  maggior parte delle configurazioni.  Inoltre pare che anche "Apple
  LaserWriter II NTX" funzioni correttamente per questo scopo.

  Se si crea una directory di spool al posto di quella impostata
  dall'utility fornita con la distribuzione si faccia attenzione ai
  permessi.  Neil Fraser (neilf@necon.co.za) suggerisce che i permessi
  della directory di spool (in questo caso /var/spool/lpd/lpr siano 4755
  (notare il bit suid); funziona sul suo sistema quando il proprietario
   'root' ed il gruppo 'lp'.

  Jeff Stern (jstern@eclectic.ss.uci.edu) riporta come impostazione
  della propria spool directory 777, per consentire ad utenti senza
  privilegi di stampare, anche se indica come avrebbe potuto aggiungere
  gli utenti al gruppo 'lp'.  Questa decisione spetta al system
  administrator locale, se la sicurezza di stampa  necessaria, allora
  si limitino i permessi il pi possibile.  In un ambiente casalingo,
  probabilmente si desidera che tutti siano in grado di stampare.

  Dr. Michael Langner (langner@fiz-chemie.de) indica come i problemi di
  permesso di scrittura in /var/spool/lpd/ possono essere evitati se si
  usa qualcosa come "path = /tmp" e  "print command = lpr -r -P%p %s".

  A volte un errore di parsing del Postscript capita quando si stampa da
  macchine Windows e causa la stampa di una pagina extra.  Tale pagina
  avr sempre "%%[ Lastpage ]%%" in cima.  Questo sembra accadere solo
  con Windows 95 e 98 a causa del Postscript malformato.

  Un modo per gestire questa situazione  di usare uno script per
  rimuovere la sequenza Postscript errata. Un altro modo  cercare di
  trovare un driver Postscript migliore.  Probabilmente il modo migliore
   di usare LPRng invece del Postscript per stampare su un Server
  Samba.

  Erik Ratcliffe (erik@caldera.com) di Caldera, riporta che LPRng
  comporta che qualsiasi sia il driver sulla macchina Windows, sul
  server Samba si usa un /etc/printcap simile a:


       ______________________________________________________________________
       raw:\
               :rw:sh:
               :lp=/dev/lp1
               :sd=/var/spool/lpd/raw
               :fx=flp
       ______________________________________________________________________




  LPRng non richiede un :\ alla fine di ogni riga.  L'indicazione della
  stampante deve comunque essere presente in /etc/smb.conf per la
  stampante fisica.  Il comando di stampa usa l'entry "raw" ed i dati
  sono mandati alla stampante in modo binario.  Tale comando somiglia a:



       ______________________________________________________________________
       print command = lpr -b -Praw %s
       ______________________________________________________________________




  Potrebbe anche essere necessario disattivare lo spooling di stampa su
  Windows 95 al fine di stampare direttamente.

  Se si ottiene sempre una pagina extra alla fine della stampa di client
  Windows, si provi ad aggiungere la direttiva "sf" in /etc/printcap. In
  questo modo si sopprimono i form feed per separare i job fi stampa, ma
  non si interferisce con i from feed dei documenti.




  10.  Condividere una stampante Windows con macchine Linux

  Per condividere una stampante su una macchina Windows,  necessario:


  1. Avere una configurazione corretta in /etc/printcap che corrisponda
     alla struttura delle directory locali (per le directory di spool,
     ecc.)

  2. Usare lo script ``/usr/bin/smbprint''.  Questo script  disponibile
     con il sorgente di Samba, purtroppo non con tutte le distribuzioni
     in formato binario.  Pi avanti verr presentata una versione
     leggermente diversa di ``smbprint''.

  3. Se si desidera convertire file ASCII in Postscript,  necessario
     avere nenscript, o qualcosa di equivalente.  nenscript  un
     convertitore Postscript generalmente installato in /usr/bin.

  4. Si potrebbe desiderare rendere la stampa con Samba pi semplice
     tramite un semplice front-end.  Di seguito  riportato un semplice
     script (``print'') in Perl per manipolare ASCII, Postscript...

  5. Si potrebbe anche usare MagicFilter per ottenere il risultato.  I
     dettagli necessari per configurare MagicFilter sono presenti nello
     script perl.  MagicFilter ha dei punti di favore in quanto conosce
     automaticamente come convertire tra un gran numero di formati.

  La successiva configurazione di /etc/printcap  valida per una
  stampante HP 5MP su un host Windows NT.  Le linee hanno il seguente
  significato:
     cm commento


     lp dispositivo da aprire per output


     sd directory di spool della stampante sulla macchina locale


     af file per registrare le transazioni


     mx massima grandezza per un file (zero significa nessun limite)


     if nome del filtro di output (script)

  Per maggiori informazioni consultare il Printing HOWTO o le pagine del
  manuale per la voce printcap.



       ______________________________________________________________________
       # /etc/printcap
       #
       # //zimmerman/oreilly via smbprint
       #
       lp:\
               :cm=HP 5MP Postscript OReilly on zimmerman:\
               :lp=/dev/lp1:\
               :sd=/var/spool/lpd/lp:\
               :af=/var/spool/lpd/lp/acct:\
               :mx#0:\
               :if=/usr/bin/smbprint:
       ______________________________________________________________________




   necessario accertarsi che le directory di spool e per la
  registrazione delle transazioni (log) esistano e siano scrivibili.
  Assicurarsi che la linea 'if' contenga un percorso corretto allo
  script di smbprint (``dato oltre'') ed inoltre che il dispositivo
  puntato sia corretto (il file speciale /dev).

  Di seguito lo script smbprint.  Di solito  installato in /usr/bin ed
   attribuibile, per quanto ne so, ad Andrew Tridgell, la persona che
  ha creato Samba.  Viene fornito con la distribuzione in formato
  sorgente di Samba ma  riportato, essendo assente in certe
  distribuzioni in formato binario.

  Potrebbe essere utile studiarlo attentamente, alcune piccole modifiche
  hanno dimostrato essere di enorme utilit.













  ______________________________________________________________________
  #!/bin/sh -x

  # Questo script  un filtro di input per la stampa via printcap da una
  # macchina UNIX. Usa il programma smbclient per stampare il file sul
  # server e servizio specificati usando il protocollo smb.
  # Per esempio  possibile avere una linea del printcap del tipo:
  #
  # smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
  #
  # Che dovrebbe creare una stampante UNIX chiamata "smb" che stamper
  # attraverso questo script. E' necessario creare la directory di spool
  # /usr/spool/smb con permessi, proprietario e gruppo appropriati per il
  # sistema.

  # Assegnare i valori che seguono in modo da accordarsi al server e
  # e servizio su cui si desidera stampare. In questo esempio si suppone
  # di avere un PC con WfWg chiamato "lapland" che ha una stampante
  # esportata chiamata "printer" senza password.
  #
  # Script modificato da hamiltom@ecnz.co.nz (Michael Hamilton)
  # in modo da poter leggere server, servizio e password dal file
  # /usr/var/spool/lpd/PRINTNAME/.config
  #
  # Affinch tutto funzioni  necessario che esista una linea in
  # /etc/printcap che includa il file di accounting (af=...):
  #
  #   cdcolour:\
  #   :cm=CD IBM Colorjet on 6th:\
  #   :sd=/var/spool/lpd/cdcolour:\
  #   :af=/var/spool/lpd/cdcolour/acct:\
  #   :if=/usr/local/etc/smbprint:\
  #   :mx=0:\
  #   :lp=/dev/null:
  #
  # Il file /usr/var/spool/lpd/PRINTNAME/.config dovrebbe contenere:
  #   server=PC_SERVER
  #   service=PR_SHARENAME
  #   password="password"
  #
  # Esempio:
  #   server=PAULS_PC
  #   service=CJET_371
  #   password=""

  #
  # File per i messaggi di debug, cambiare in /dev/null se si preferisce.
  #
  logfile=/tmp/smb-print.log
  # logfile=/dev/null


  #
  # L'ultimo parametro del filtro  il file per la registrazione delle
  # transazioni.
  #
  spool_dir=/var/spool/lpd/lp
  config_file=$spool_dir/.config

  # Le seguenti variabili dovrebbero essere assegnate nel file di
  # configurazione:
  #   server
  #   service
  #   password
  #   user
  eval `cat $config_file`
  #
  # Supporto per il debugging si pu cambiare >> con > per risparmiare
  # spazio.
  #
  echo "server $server, service $service" >> $logfile

  (
  # NOTA Si potrebbe desiderare di aggiungere la linea `echo translate'
  # per avere la conversione automatica CR/LF quando si stampa.
      echo translate
      echo "print -"
      cat
  ) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $user -N -P >> $logfile
  ______________________________________________________________________




  La maggior parte delle distribuzioni Linux include nenscript per
  convertire documenti ASCII a Postscript.  Lo script Perl che segue
  rende la vita pi semplice agendo da semplice interfaccia per la
  stampa di Linux attraverso smbprint.


  Usage: print [-a|c|p] <filename>
         -a prints <filename> as ASCII
         -c prints <filename> formatted as source code
         -p prints <filename> as Postscript
          If no switch is given, print attempts to
          guess the file type and print appropriately.



  Usare smbprint per stampare file ASCII comporta a volte troncare le
  linee lunghe.  Lo script che segue interrompe, se possibile, le linee
  lunghe su uno spazio (invece che in mezzo ad una parola).

  La formattazione del codice sorgente  fatta con nenscript.  Il file
  ASCII viene formattato su 2 colonne con un'intestazione (data, nome
  del file, ecc.) inoltre numera le linee.  Usandolo come esempio, 
  possibile realizzare altri tipi di formattazione.

  I documenti Postscript sono gi correttamente formattati, quindi
  passano senza essere modificati.






















  ______________________________________________________________________
  #!/usr/bin/perl

  # Script:   print
  # Autore:   Brad Marshall, David Wood
  #           Plugged In Communications
  # Data:     960808
  #
  # Script per stampare su oreilly che  attualmente connessa a zimmerman
  # Scopo:  Dati diversi tipi di file come argomenti, li elabora
  # correttamente per mandarli in pipe ad uno script di stampa Samba.
  #
  # Tipi di file correntemente supportati:
  #
  # ASCII      - Verifica che le linee pi lunghe di $line_length caratteri
  #              si interrompano su spazio.
  # Postscript - Intrapresa nessuna azione.
  # Codice     - Formatta in Postscript (usando nenscript) per rendere al
  #              al meglio (in orizzontale, font, ecc.)
  #

  # Lunghezza massima concessa per ciascuna linea di testo ASCII.
  $line_length = 76;

  # Nome e percorso dello script di stampa Samba
  $print_prog = "/usr/bin/smbprint";

  # Nome e percorso di nenscript (converte ASCII-->Postscript)
  $nenscript = "/usr/bin/nenscript";

  unless ( -f $print_prog ) {
      die "Non trovo: $print_prog!";
  }
  unless ( -f $nenscript ) {
      die "Non trovo: $nenscript!";
  }

  &ParseCmdLine(@ARGV);

  # DBG
  print "Il file e' di tipo: $filetype\n";

  if ($filetype eq "ASCII") {
      &wrap($line_length);
  } elsif ($filetype eq "code") {
      &codeformat;
  } elsif ($filetype eq "ps") {
      &createarray;
  } else {
      print "Spiacente...file di tipo sconosciuto.\n";
      exit 0;
  }
  # Pipe the array to smbprint
  open(PRINTER, "|$print_prog") || die "Impossibile aprire $print_prog: $!\n";
  foreach $line (@newlines) {
      print PRINTER $line;
  }
  # Spedisce un linefeed extra nel caso in cui il file abbia l'ultima linea
  # incompleta.
  print PRINTER "\n";
  close(PRINTER);
  print "Finito.\n";
  exit 0;

  # --------------------------------------------------- #
  #   Da questo punto in poi ci sono solo subroutine    #
  # --------------------------------------------------- #

  sub ParseCmdLine {
      # Analizza la linea di comand, cercando di riconoscere il tipo di
      # file.

          # Se esistono imposta $arg e $file agli argomenti.
      if ($#_ < 0) {
          &usage;
      }
      # DBG
  #   foreach $element (@_) {
  #       print "*$element* \n";
  #   }

      $arg = shift(@_);
      if ($arg =~ /\-./) {
          $cmd = $arg;
      # DBG
  #   print "\$cmd trovato.\n";

          $file = shift(@_);
      } else {
          $file = $arg;
      }

      # Definisce il tipo di file
      unless ($cmd) {
          # Nessun argomento

          if ($file =~ /\.ps$/) {
              $filetype = "ps";
          } elsif ($file =~ /\.java$|\.c$|\.h$|\.pl$|\.sh$|\.csh$|\.m4$|\.inc$|\.html$|\.htm$/) {
              $filetype = "code";
          } else {
              $filetype = "ASCII";
          }

          # Elabora $file in base al suo tipo e ritorna $filetype
      } else {
          # Il tipo che e' viene restituito in $arg
          if ($cmd =~ /^-p$/) {
              $filetype = "ps";
          } elsif ($cmd =~ /^-c$/) {
              $filetype = "code";
          } elsif ($cmd =~ /^-a$/) {
              $filetype = "ASCII"
          }
      }
  }

  sub usage {
      print "
  Uso: print [-a|c|p] <nomefile>
         -a stampa <nomefile> come ASCII
         -c stampa <nomefile> formattato come codice sorgente
         -p stampa <nomefile> come Postscript
          Se non viene fornito alcun parametro, cerca di
          indovinare il tipo e stamparlo adeguatamente.\n
  ";
      exit(0);
  }

  sub wrap {
          # Crea un array di linee del file, dove ciascuna linea e' <
          # del numero di caratteri specificato, e termina solo su spazi.
          # Recupera il numero di caratteri a cui limitare la linea.
      $limit = pop(@_);

      # DBG
      #print "Entra subroutine wrap\n";
      #print "La lunghezza limite per la linea e' $limit\n";

      # Leggi il file, analizzalo e mettilo nell'array.
      open(FILE, "<$file") || die "Impossibile aprire: $file: $!\n";
      while(<FILE>) {
          $line = $_;

          # DBG
          #print "La linea e':\n$line\n";

          # Se la linea e' oltre il limite vai a capo.
          while ( length($line) > $limit ) {

              # DBG
              #print "Limita...";

              # Prendi i primi $limit +1 caratteri.
              $part = substr($line,0,$limit +1);

              # DBG
              #print "La linea parziale e':\n$part\n";

                          # verifica se l'ultimo carattere e' spazio
              $last_char = substr($part,-1, 1);
              if ( " " eq $last_char ) {
                  # Se lo e' stampa il resto.

                  # DBG
                  #print "L'ultimo carattere era spazio\n";

                  substr($line,0,$limit + 1) = "";
                  substr($part,-1,1) = "";
                  push(@newlines,"$part\n");
              } else {
                   # se non lo e', cerca l'ultimo spazio nella
                   # sottolinea e stampa fino a li'.

                  # DBG
                  #print "L'ultimo carattere non era spazio\n";

                   # RImuove i caratteri oltre $limit
                   substr($part,-1,1) = "";
                   # Rovescia la linea per rendere semplice da trovare
                   # l'ultimo carattere.
                   $revpart = reverse($part);
                   $index = index($revpart," ");
                   if ( $index > 0 ) {
                     substr($line,0,$limit-$index) = "";
                     push(@newlines,substr($part,0,$limit-$index)
                         . "\n");
                   } else {
                     # Non c'erano spazi cosi' stampa fino a $limit
                     substr($line,0,$limit) = "";
                     push(@newlines,substr($part,0,$limit)
                         . "\n");
                   }
              }
          }
          push(@newlines,$line);
      }
      close(FILE);
  }

  sub codeformat {
      # Chiama la funzione wrap e poi filtra il risultato attraverso
      # nenscript
      &wrap($line_length);

      # Manda il risultato attraverso nenscript per creare un file
      # Postscript che abbia un formato accettabile di stampa per
      # il codice sorgente (stile orizzontale, font Courier, numeri
      # di linea)
      # Per prima cosa stampa su un file temporaneo.
      $tmpfile = "/tmp/nenscript$$";
      open(FILE, "|$nenscript -2G -i$file -N -p$tmpfile -r") ||
          die "Non posso aprire nenscript: $!\n";
      foreach $line (@newlines) {
          print FILE $line;
      }
      close(FILE);

      # Legge il file temporaneo inun array per passarlo allo script di
      # stampa di Samba
      @newlines = ("");
      open(FILE, "<$tmpfile") || die "Impossibile aprire $file: $!\n";
      while(<FILE>) {
          push(@newlines,$_);
      }
      close(FILE);
      system("rm $tmpfile");
  }

  sub createarray {
      # Crea l'array per Postscript
      open(FILE, "<$file") || die "Impossibile aprire $file: $!\n";
      while(<FILE>) {
          push(@newlines,$_);
      }
      close(FILE);
  }
  ______________________________________________________________________




  A questo punto si pu esaminare MagicFilter. Ringraziamenti ad Alberto
  Menegazzi (flash.egon@iol.it) per queste informazioni.

  Alberto scrive:


  1. Installare MagicFilter con il filtro per le stampanti in
     /usr/bin/local ma non si compili il file /etc/printcap con i
     suggerimenti dati dalla documentazione di MagicFilter.

  2. Si scriva >/etc/printcap in questo modo (l'esempio si riferisce
     alla LaserJet 4L dell'autore):










  ______________________________________________________________________
  lp|ljet4l:\
          :cm=HP LaserJet 4L:\
          :lp=/dev/null:\                         # or /dev/lp1
          :sd=/var/spool/lpd/ljet4l:\
          :af=/var/spool/lpd/ljet4l/acct:\
          :sh:mx#0:\
          :if=/usr/local/bin/main-filter:
  ______________________________________________________________________





   necessario spiegare che 'lp=/dev/...' viene aperta e bloccata
  (locked) quindi  necessario utilizzare un dispositivo "virtuale" per
  ciascuna stampante remota che si debba usare.

   possibile crearli ad esempio con: 'touch /dev/ljet41'


  3. Si scriva un filtro /usr/local/bin/main-filter come quello
     suggerito, usando ljet4l-filter invece di bf/cat/.

     Ad esempio:



       ______________________________________________________________________
       #! /bin/sh
       logfile=/var/log/smb-print.log
       spool_dir=/var/spool/lpd/ljet4l
       (
         echo "print -"
         /usr/local/bin/ljet4l-filter
       ) | /usr/bin/smbclient "\\\\SHIR\\HPLJ4" -N -P >> $logfile
       ______________________________________________________________________




  C' anche un riferimento dal Print2Win mini-Howto relativamente il
  locking dei dispositivi e sul perch conviene creare stampanti
  virtuali.






















  ______________________________________________________________________
       Suggerimento da Rick Bressler:
       A titolo di suggerimento, la configurazione che segue non 
       una buona idea:

          :lp=/dev/null:\

       in quanto lpr apre in modo 'esclusivo' il file specificato
       tramite lp=.   necessario per prevenire il tentativo di
       diversi processi di stampare contemporaneamente sulla
       stessa stampante.

       Un effetto collaterale  che in tal caso, eng e colour non
       possono stampare contemporaneamente, (di solito  pi o
       meno trasparente dal momento che stampano velocemente, e
       dal momento che usano una coda, probabilmente non si nota),
       tuttavia ogni altro processo che cerca di scrivere a
       /dev/null sar interrotto!

       Non si tratta di un grosso problema in un sistema per utente
       singolo.  L'autore ha un sistema con pi di 50 stampanti.
       Sarebbe un problema in questo caso.

       La soluzione  quella di creare una stampante fittizia per
       ciascuna di quelle fisiche, esempio con il comando:

       touch /dev/eng
  ______________________________________________________________________




  11.  Eseguire copie di sicurezza (backup) di macchine Windows su un
  server Linux

  Adam Neat (adamneat@ipax.com.au) ha gentilmente contribuito a fornire
  lo script che segue per fare backup di macchine Windows usando server
  Linux come supporto, tramite l'utility smbclient.  Adam  solito fare
  backup di macchine Windows 3.x ed NT su un sistema Linux che dispone
  di un drive SCSI DAT.

  Adam non  soddisfatto dello stile di codifica utilizzato, tuttavia
  funziona.  Come l'autore ama commentare. "Se funziona ed  stupido,
  allora non  stupido".

  Un altro script di backup per Windows,  stato fornito da Dan Tager
  (dtager@marsala.com).  Lo script di Dan  in grado di fare backup di
  macchine Unix via rsh e pu essere facilmente modificato per usare
  ssh.

  In questo script, la stringa 'agnea1'  il nome dell'utente sulla
  macchina Linux che fa il backup.














  ______________________________________________________________________
  #!/bin/bash

  clear
  echo Inizializzazione ...
  checkdate=`date | awk '{print $1}'`

  if [ -f "~agnea1/backup-dir/backup-data" ]; then

          echo "ERRORE: non esiste il file di configurazione per oggi!"
          echo "FATALE!"
          exit 1
  fi

  if [ -d "~agnea1/backup-dir/temp" ]; then

          echo "ERRORE: Manca la directory temporanea!"
          echo
          echo "Tentativo di creazione"
          cd ~agnea1
          cd backup-dir
          mkdir temp
          echo "Creata directory - temp"
  fi

  if [ "$1" = "" ]; then

          echo "ERRORE: manca il nome della macchina (es: cdwriter)"
          exit 1
  fi

  if [ "$2" = "" ]; then

          echo "ERRORE: Manca la risorsa SMB (Lan Manager) (es: work)"
          exit 1
  fi

  if [ "$3" = "" ]; then

          echo "ERRORE: Manca indirizzo IP di $1 (es: 130.xxx.xxx.52)"
          exit 1
  fi




  #############################################################################
  # Main Section
  #
  #############################################################################

  cd ~agnea1/backup-dir/temp
  rm -r ~agnea1/backup-dir/temp/*
  cd ~agnea1/backup-dir/

  case "$checkdate"
  in
     Mon)
        echo "Backup di Luned"
        cat backup-data | /usr/local/samba/bin/smbclient \\\\$1\\$2 -I$3 -N
        echo "Completato"

        if [ -d "~agnea1/backup-dir/Monday" ]; then
          echo "Directory Monday non trovata ...  creazione"
          mkdir ~agnea1/backup-dir/Monday
        fi
        echo "Archiviazione ..."
        cd ~agnea1/backup-dir/temp
        tar -cf monday.tar *
        echo "fatto ..."
        rm ~agnea1/backup-dir/Monday/monday.tar
        mv monday.tar ~agnea1/backup-dir/Monday
        ;;

     Tue)
        echo "Backup di Marted"
        cat backup-data | /usr/local/samba/bin/smbclient \\\\$1\\$2 -I$3 -N
        echo "Completato"

        if [ -d "~agnea1/backup-dir/Tuesday" ]; then
          echo "Directory Tuesday non trovata ... creazione"
          mkdir ~agnea1/backup-dir/Tuesday
        fi
        echo "Archiviazione ..."
        cd ~agnea1/backup-dir/temp
        tar -cf tuesday.tar *
        echo "fatto ..."
        rm ~agnea1/backup-dir/Tuesday/tuesday.tar
        mv tuesday.tar ~agnea1/backup-dir/Tuesday
        ;;

     Wed)
        echo "Backup di Mercoled"
        cat backup-data | /usr/local/samba/bin/smbclient \\\\$1\\$2 -I$3 -N
        echo "Completato"

        if [ -d "~agnea1/backup-dir/Wednesday" ]; then
          echo "Directory Wednesday non trovata ... creazione"
          mkdir ~agnea1/backup-dir/Wednesday
        fi
        echo "Archiviazione ..."
        cd ~agnea1/backup-dir/temp
        tar -cf wednesday.tar *
        echo "fatto ..."
        rm ~agnea1/backup-dir/Wednesday/wednesday.tar
        mv wednesday.tar ~agnea1/backup-dir/Wednesday
        ;;

     Thu)
        echo "Backup di Gioved"
        cat backup-data | /usr/local/samba/bin/smbclient \\\\$1\\$2 -I$3 -N
        echo "Completato"

        if [ -d "~agnea1/backup-dir/Thursday" ]; then
          echo "Directory Thrusday non trovata ... creazione"
          mkdir ~agnea1/backup-dir/Thursday
        fi
        echo "Archiviazione..."
        cd ~agnea1/backup-dir/temp
        tar -cf thursday.tar *
        echo "fatto ..."
        rm ~agnea1/backup-dir/Thursday/thursday.tar
        mv thursday.tar ~agnea1/backup-dir/Thursday
        ;;

     Fri)
        echo "Backup di Venerd"
        cat backup-data | /usr/local/samba/bin/smbclient \\\\$1\\$2 -I$3 -N
        echo "Completato"

        if [ -d "~agnea1/backup-dir/Friday" ]; then
          echo "Directory Friday non trovata ... creazione"
          mkdir ~agnea1/backup-dir/Friday
        fi
        echo "Archiviazione ..."
        cd ~agnea1/backup-dir/temp
        tar -cf friday.tar *
        echo "fatto ..."
        rm ~agnea1/backup-dir/Friday/friday.tar
        mv friday.tar ~agnea1/backup-dir/Friday
        ;;

       *)
        echo "ERRORE FATALE: giorno non corretto"
        exit 1
        ;;
  esac


  ###########
  ______________________________________________________________________




  Lo script di Dan per eseguire il backup










































  ______________________________________________________________________
  #!/bin/bash

  BACKDIR=3D/backup
  WINCMD=3D/usr/bin/smbclient

  function CopyWinHost(){

  # usa tar e gzip per archiviare "condivisioni windows" in una
  # directory locale usando l'utility smbclient della suite samba.
  # argomento 1  il nome del computer windows remoto
  # argomento 2  il nome della condivisione di cui fare backup

     echo $1,$2,$3
     REMOTE=3D$1
     SHARE=3D$2
     DEST=3D$3

   # crea un file tar gzip usando samba per copiare direttamente
   # dal pc con windows
   # 12345  la password.   necessaria anche non e' definita alcuna
   # sulla macchina remota

     $WINCMD \\\\$REMOTE\\$SHARE 12345 -Tc -|gzip > $DEST
     echo `date`": Completato backup da "$REMOTE" a "$DEST
     echo
  }

  function CopyUnixHost(){

  # tar e gzip una directory usando rsh
  # argomento 1  il nome del computer remoto
  # argomento 2  il percorso completo della directory sorgente
  #             remota
  # argomento 3  il nome del file tar-gzip locale. Il nome
  #             del giorno pi .tgz sono aggiunti in coda
  #             all'argomento 3

     REMOTE=3D$1
     SRC=3D$2
     DEST=3D$3


     if rsh $REMOTE tar -cf - $SRC |gzip > $DEST; then
        echo `date`": Completato backup da "$REMOTE":"$SRC" a "$DEST
     else
       echo `date`": Errore durante il backup  da "$REMOTE":"$SRC" a "$DEST
     fi

  }

  # $1: win=backup macchina windows, unix=backup macchina unix
  case $1 in
     win)
        # $2= nome della macchina remota windows,
        # $3= nome della condivisione remota,
        # $4= nome della directory locale
        CopyWinHost $2 $3 $4;;
     unix)
        # $2= host remoto,
        # $3= directory remota,
        # $4= nomde della directory locale
        CopyUnixHost $2 $3 $4;;
  esac
  ______________________________________________________________________

  12.  Usare Samba attraverso reti instradate

  Andrew Tridgell afferma che la consultazione di host SMB attraversando
  router  problematica.  Ecco i suoi suggerimenti per consentire tale
  operazione:

  Per la consultazione attravero subnet instradate  necessario
  comportarsi come segue.  Ci sono anche altri metodi ma sono molto pi
  complessi:

  1) tutti i computer che si desiderano visibili dovrebbero usare un
  solo server WINS (Samba o NT possono)

  2) il master browser per ciascuna sotto rete deve essere NT o Samba
  (Win9X non comunica correttamente informazioni attraverso cross-
  subnet)

  3) si dovrebbe usare lo stesso nome di gruppo di lavoro su tutte le
  sottoreti. Non  strettamente necessario ma  il modo pi semplice per
  garantire il successo. Se non fosse possibile allora  necessario
  organizzarsi in modo che le informazioni di browse possano propagarsi
  attraverso le sottoreti (non si propagano tramite WINS). Ci sono due
  meccanismi: i) ciascun master nota gli annunci di workgroup da altri
  master sullo stesso dominio di broadcast ii) ciascun non Win9X master
  contatta il DMB globale per il gruppo di lavoro (tipicamente il domain
  controller o un sistema Samba configurato come domain master) e
  scambia periodicamente la lista di browse completa.

  Inoltre Rakes Bhrania indica che i router Cisco possono essere
  configurati per inoltrare il traffico SMB in modo da consentire il
  browsing.  Il suo suggerimento  di configurare l'interfaccia del
  router relativamente host SMB con un comando simile a:



       ______________________________________________________________________
       ip helper-address x.x.x.x
       ______________________________________________________________________




  dove x.x.x.x  l'indirizzo IP del server SMB.


  13.  Ringraziamenti

  Ringraziamente particolari ad Andrew Tridgell (tridge@linuxcare.com)
  per aver dato inizio e diretto il progetto Samba e per aver mantenuto
  questo documento corretto.

  Brad Marshall (bmarshall@plugged.net.au) e Jason Parker
  (jparker@plugged.net.au) hanno contribuito con tempo, pazienza, script
  e ricerca.

  Adam Neat (adamneat@ipax.com.au) e Dan Tager (dtager@marsala.com)
  hanno fornito script bash usati per il backup di macchine Windows
  verso server Linux.

  Matthew Flint (matthew@philtrum.demon.co.uk) ha suggerito l'uso
  dell'opzione 'interfaces' nel file smb.conf

  Alberto Menegazzi (flash.egon@iol.it) ha contribuito con il setup di
  MagicFilter per consentire ad una macchina Linux di condividere una
  stampante Windows

  Rakesh Bharania (rbharani@cisco.com) ha suggerito la configurazione
  dei router CISCO.

  Rich Gregory (rtg2t@virginia.edu) ed altri hanno suggerito che questo
  documento presentasse alcuni dettagli del pacchetto smbfs

  Andrea Girotto (andrea.girotto@era-net.it) ha contribuito con alcuni
  utili suggerimenti.

  Grazie anche a tutto i traduttori internazionali che hanno distribuito
  questo HOWTO a chi non parla inglese: Takeo Nakano
  (nakano@apm.seikei.ac.jp), Klaus-Dieter Schumacher (Klaus-
  Dieter.Schumacher@fernuni-hagen.de), Andrea Girotto
  (andrea.girotto@era-net.it), Mathieu Arnold (arn_mat@club-
  internet.fr), Stein Oddvar Rasmussen (Stein@kongsberg-energi.no), Nilo
  Menezes (nmenezes@n3.com.br) e molti altri di cui non ho le
  informazioni per il contatto.

















































  Linux Serial HOWTO
  di Greg Hankins
  versione 1.12, Luglio 1998

  Questo documento descrive le funzionalit delle porte seriali non
  descritte dal Text-Terminal-HOWTO o dal Serial-Programming-HOWTO.
  Riguarda principalmente getty, schede seriali multiporta e i modem.
  Aggiornato da David S.Lawyer bf347@lafn.org. Traduzione italiana a
  cura di Christopher Gabriel, cgabriel@pluto.linux.it

  1.  Introduzione

  Questo  il Linux Serial HOWTO. Descrive in modo dettagliato aspetti
  sulle porte seriali che non sono trattati in altri HOWTO. Include
  anche come impostare un modem in ambiente linux, qualche trucchetto e
  una sezione per la risoluzione dei problemi. Esistono altri HOWTO per
  i terminali ( rif. ``HOWTO correlati''). Questo documento 
  indirizzato a Linux per macchine con hardware x86, ma potrebbe essere
  di aiuto per altre architetture.


  1.1.  Copyright

  Copyright (c) 1993 - 1997 di Greg Hankins, 1998 di David Lawyer.
  Questo documento pu essere distribuito entro i termini descritti
  dalla licenza LDP a http://sunsite.unc.edu/LDP/COPYRIGHT.html. Questo
  documento non pu essere distribuito in forma modificata senza il
  consenso dell'autore.


  1.2.  HOWTO correlati sulle porte seriali


    Serial-Programming-HOWTO vi pu aiutare a scrivere programmi in
     linguaggio C ( o parte di questi ) che possono gestire una porta
     seriale, e altro ancora.

    Text-Terminal-HOWTO contiene tutto ci che riguarda i terminali
     seriali (FIXME: dumb terminals? ).


  1.3.  Note

  Io, David Lawyer, sono il nuovo mantenitore (Greg Hawkins  l'autore
  del documento originale ). Questa  una piccola revisione e non ho
  controllato se tutte le nozioni qui esposte sono aggiornate. Questo
  comporta tanto lavoro. Per cortesia informatemi se c' qualcosa di
  sbagliato e/o mancante. In futuro divider questo HOWTO in tre parti:

    Informazioni sui terminali da aggiungere al Text-Terminal-HOWTO

    Informazioni sui modem in un nuovo Modem HOWTO

    Ulteriori informazioni sulle porte seriali aggiunte a questo
     documento.

  Tutto questo avverr (spero) nell'agosto o nel Settembre 1998.


  1.4.  Nuove versioni di questo documento

  Nuove versioni del Linux Serial HOWTO saranno disponibili a
  ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO/Serial-HOWTO e nei siti
  mirror.  Esistono anche altri formati, come il PostScript e DVI,
  reperibili nella cartella other-formats . Il Serial-HOWTO  anche
  disponibile a http://sunsite.unc.edu/LDP/HOWTO/Serial-HOWTO.html e
  sar inviato al newsgroup comp.os.linux.answers mensilmente.


  1.5.  Datemi un aiuto!

  Per favore inviatemi qualunque domanda, commento, suggerimento, o
  materiale addizionale. Sono sempre curioso di sapere cosa ne pensate
  di questo HOWTO. E sono spesso allora ricerca di miglioramenti!
  Chiedetemi esattamente cosa non capite, o cosa potrebbe essere
  descritto in maniera pi chiara. Potete contattarmi via email a
  bf347@lafn.org (David Lawyer).


  2.  Hardware Seriale Supportato

  Linux pu lavorare sicuramente con il seguente hardware seriale.


  2.1.  Schede Seriali Standard per PC


    Le schede seriali standard per PC (COM1 - COM4), alle quali possono
     essere collegate periferiche esterne ( modem, mouse seriali, ecc.
     ). Da quando queste non vengono pi inserite nei PC, dato che sono
     integrate alla scheda madre, sono piuttosto difficili da trovare
     nei negozi specializzati.

    Modem interni standard per PC (COM1 - COM4)

    Quickpath Systems Port-Folio 550e (consentono di utilizzare gli IRQ
     3, 4, 5, 9, 10, 11, 12, e 15)


  Nota: a causa di un conflitto di indirizzo, non potete usare la porta
  COM4 e la scheda video IBM8514 simultaneamente.  dovuto ad un errore
  presente nella scheda IBM8514.


  2.2.  Modem Plug And Play (PnP)

  La maggior parte dei modem attualmente sono PnP e molti di questi (
  con qualche accorgimento ) possono operare con Linux. La miglior
  scelta  prendere un modem che abbia dei jumper per disattivare la
  funzionalit PnP.  In molti casi, se impostate i jumper per un
  determinato numero di porta COM e IRQ, la funzionalit PnP verr
  disattivata. Potete anche disattivare il PnP dal BIOS del vostro
  computer. Se non potete fare tutto questo, allora provate cos:


    Avviate Win95/98, configurate il modem, e controllate che queste
     impostazioni siano mantenute anche quando avviate Linux. Se non 
     cos, allora:

    Avviate Win95/98, configurate il modem, e quindi fate un warm boot
     di Linux in modo che le impostazioni restino inalterate. Potete
     eseguire questo con il boot loader loadlin.

    Prendetevi i PnP Tools da http://www.redhat.com/linux-info/pnp.


  2.3.  Schede Seriali Multiporta "Non-Intelligenti" (con UART
  8250/16450/16550A)

  Sono dette anche "Adattatori seriali".
  * =>  "setserial" mostra maggiori dettagli sulla configurazione.

    AST FourPort e cloni (4 porte) *

    Accent Async-4 (4 porte) *

    Arnet Multiport-8 (8 porte)

    Bell Technologies HUB6 (6 porte)

    Boca BB-1004 (4 porte), BB-1008 (8 porte), BB-2016 (16 porte) *

    Boca IOAT66 (6 porte)

    Boca 2by4 (4 porte seriali, 2 porte parallele)

    Byterunner (basso costo)

    Computone ValuePort V4-ISA (compatibile con AST FourPort) *

    Digi PC/8 (8 porte)

    GTEK BBS-550 (8 porte) Guardatevi anche il mini-howto su questa
     scheda.

    HUB-6 See Bell Technologies.

    Longshine LCS-8880, Longshine LCS-8880+ (compatibile AST FourPort)

    Moxa C104, Moxa C104+ (compatibile AST FourPort)

    PC-COMM (4 porte)

    Sealevel Systems <http://www.sealevel.com> COMM-2 (2 porte), COMM-4
     (4 porte) e COMM-8 (8 porte)

    SIIG I/O Expander 2S IO1812 (4 porte)

    STB-4COM (4 porte)

    Twincom ACI/550

    Usenet Serial Board II (4 porte) *

  In generale, Linux supporta qualsiasi scheda che utilizza un UART
  8250, 16450, 16550, 16550A, 16650 (o compatibili), o un modem interno
  che emuli una delle suddette UART.


  Nota: la BB-1004 e BB-1008 non supportano linee DCD e RI, e quindi non
  sono utilizzabili dai modem in entrata. Lavorano molto bene in altri
  ambiti.


  2.4.  Schede Seriali Multiporta "Intelligenti"

  Assicuratevi che sia disponibile un driver per Linux funzionante.
  Questa lista  da aggiornare.

    Comtrol RocketPort (36MHz ASIC; 4, 8, 16 o 32 porte)
     Contatti: info@comtrol.com oppure http://www.comtrol.com
     stato del driver: assistenza tecnica di Comtrol
     locazione del driver:
     ftp://tsx-11.mit.edu/pub/linux/packages/comtrol

    Computone IntelliPort II (16MHz 80186; 4, 8, o 16 porte),
     IntelliPort II EXpandable (20MHz 80186; 16 - 64 ports)
     contatto: Michael H. Warfield, mhw@wittsend.atl.ga.us
     stato del driver: pre-ALPHA

    Cyclades Cyclom-Y (Cirrus Logic CD1400 UARTs; 8 - 32 porte),
     Cyclom-Z (25MHz MIPS R3000; 8 - 128 porte)
     contatto: sales@cyclades.com oppure http://www.cyclades.com
     stato del driver: assistenza tecnica di Cyclades
     locazione del driver: ftp://ftp.cyclades.com/pub/cyclades e incluso
     nel Kernel Linux sin dalla versione 1.1.75

    Decision PCCOM8 (8 porte)
     contatto: pccom8@signum.se
     locazione del driver: ftp://ftp.signum.se/pub/pccom8


    Digi PC/Xi (12.5MHz 80186; 4, 8, o 16 porte),
     PC/Xe (12.5/16MHz 80186; 2, 4, o 8 porte),
     PC/Xr (16MHz IDT3041; 4 o 8 porte),
     PC/Xem (20MHz IDT3051; 8 - 64 porte)
     contatto: sales@dgii.com oppure http://www.dgii.com
     stato del driver: ssistenza tecnica di Digi
     locazione del driver: ftp://ftp.dgii.com/drivers/linux e incluso
     nel Kernel Linux sin dalla versione 2.0


    Digi COM/Xi (10MHz 80188; 4 o 8 porte)
     contatto: Simon Park, si@wimpol.demon.co.uk
     stato del driver: ALPHA
     nota: Simon  spesso assente per mesi per motivi di lavoro e non
     pu rispondere alle email. Mark Hatle,
     fray@krypton.mankato.msus.edu si  gentilmente reso disponibile per
     farvi avere i driver, se ne avete bisogno. Mark non mantiene il
     driver e non fa assistenza.


    Equinox SuperSerial Technology (30MHz ASIC; 2 - 128 porte)
     contatto: sales@equinox.com oppure http://www.equinox.com
     stato del driver: assistenza tecnica di Equinox
     locazione del driver: ftp://ftp.equinox.com/library/sst


    GTEK Cyclone (16C654 UARTs; 6, 16 e 32 porte),
     SmartCard (24MHz Dallas DS80C320; 8 porte),
     BlackBoard-8A (16C654 UARTs; 8 porte),
     PCSS (15/24MHz 8032; 8 porte)
     contatto: spot@gtek.com oppure http://www.gtek.com
     stato del driver: assistenza tecnica di GTEK
     locazione del driver: ftp://ftp.gtek.com/pub


    Hayes ESP (COM-bic; 1 - 8 porte)
     contatto: Andrew J. Robinson, arobinso@nyx.net oppure
     http://www.nyx.net/~arobinso
     stato del driver: assistenza dell'autore
     locazionde del driver: http://www.nyx.net/~arobinso e incluso nel
     Kernel Linux dalla versione 2.1.15


    Maxpeed SS (Toshiba; 4, 8 e 16 porte)
     contatto: info@maxpeed.com oppure http://www.maxpeed.com
     stato del driver: assistenza tecnica di Maxpeed
     locazione del driver: ftp://maxpeed.com/pub/ss


    Moxa C218 (12MHz 80286; 8 porte),
     Moxa C320 (40MHz TMS320; 8 - 32 porte)
     contatto: info@moxa.com.tw oppure http://www.moxa.com.tw
     stato del driver: assistenza di Moxa
     locazione del driver: ftp://ftp.moxa.com.tw/drivers/c218-320/linux


    SDL RISCom/8 (Cirrus Logic CD180; 8 porte)
     contatto: sales@sdlcomm.com oppure http://www.sdlcomm.com
     stato del driver: assistenza di SDL
     locazione del driver: ftp://ftp.sdlcomm.com/pub/drivers


    Specialix SIO (20MHz Zilog Z280; 4 - 32 porte),
     XIO (25MHz Zilog Z280; 4 - 32 porte)
     contatto: Simon Allen, simonallen@cix.compulink.co.uk
     stato del driver: BETA
     locazione del driver:
     ftp://sunsite.unc.edu/pub/Linux/kernel/patches/serial


    Stallion EasyIO-4 (4 ports), EasyIO-8 (8 porte), e
     EasyConnection (8 - 32 porte) - ognuna con Cirrus Logic CD1400
     UARTs,
     Stallion (8MHz 80186 CPU; 8 o 16 porte),
     Brumby (10/12 MHz 80186 CPU; 4, 8 o 16 porte),
     ONboard (16MHz 80186 CPU; 4, 8, 12, 16 o 32 porte),
     EasyConnection 8/64 (25MHz 80186 CPU; 8 - 64 porte)
     contatto: sales@stallion.com oppure http://www.stallion.com
     stato del driver: assistenza di Stallion
     locazione del driver: ftp://ftp.stallion.com/drivers/ata5/Linux e
     incluso nel Kernel di Linux dalla versione 1.3.27



  Una relazione sui prodotti di Comtrol, Cyclades, Digi e Stallion 
  stata inserita nel numero di Giugno 1995 del Linux Journal. L'articolo
   disponibile a http://www.ssc.com/lj/issue14.


  2.5.  Hardware seriale non supportato

  2.5.1.  I Winmodem non funzionano


  I modem che vengono definiti "Winmodem", ad esempio il USR Sportster
  Winmodem e l'IBM Aptiva MWAVE, non sono supportati da Linux. Questi
  modem hanno un design proprietario che richiede speciali driver per
  Windows. Evitate questo tipo di modem.


  2.5.2.  I driver per Rockwell (RPI) possono funzionare.

  I modem che richiedono i driver Rockwell RPI non sono completamente
  funzionanti dato che i driver software non funzionano con Linux. La
  RPI comprime la trasmissione e ne corregge gli errori usando software
  MS attraverso la CPU del vostro computer. Se desiderate utilizzare
  questi modem senza l'uso dell'RPI ( quindi senza compressione n
  correzione di errore ) allora potete facilmente disabilitare la RPI
  inviando al modem ( attraverso una string di inizializzazione ) il
  comando appropriato: +HO


  3.  Che cosa rappresentano i nomi delle porte seriali?

  Una porta di I/O  un mezzo che permette l'ingresso e l'uscita di dati
  da un computer. Esistono svariati tipi di porte I/O come, ad esempio,
  le porte seriali, parallele, controller per disk drive, schede
  ethernet, ecc. Qua tratteremo le porte seriali, dato che i modem e i
  terminali sono periferiche seriali. Ogni porta seriale deve avere un
  indirizzo di I/O, e un interrupt (IRQ). Esistono quattro porte seriali
  corrispondenti a COM1 - COM4:



       ttyS0 (COM1) indirizzo 0x3f8 IRQ 4
       ttyS1 (COM2) indirizzo 0x2f8 IRQ 3
       ttyS2 (COM3) indirizzo 0x3e8 IRQ 4
       ttyS3 (COM4) indirizzo 0x2e8 IRQ 3




  Se Linux non riconosce nessuna porta seriale quando si avvia, allora
  assicuratevi che il supporto seriali sia attivato e compilato nel ker
  nel. In questo documento, mi riferisco a COM1 come ttyS0, COM2 come
  ttyS1, COM3 come ttyS2, e COM4 come ttyS3. Da notare il fatto che per
  default Linux utilizza gli stessi indirizzi IRQ per pi porte. Non
  potete usare tutte le porte con questa configurazione, e dovete re-
  assegnare le porte con differenti indirizzi IRQ. Potete fare riferi
  mento alla sezione ``Posso usare pi di due porte seriali?'' per
  impostare gli IRQ.


  3.1.  Periferiche: Modem, Mouse.

  In qualche installazione vengono create due periferiche addizionali:
  /dev/modem per il vostro modem e /dev/mouse per il mouse. Tutte e due
  sono link simbolici alla periferica appropriata in /dev che avete
  specificato durante l'installazione.


  Ci sono state discussioni sul merito di /dev/mouse e /dev/modem. Io
  scoraggio apertamente l'utilizzo di questi link. Ad esempio, se
  desiderate utilizzare il vostro modem per chiamare all'esterno potrete
  avere problemi poich il lock file pu non funziona correttamente con
  /dev/modem. Utilizzateli se li trovate comodi, ma assicuratevi che
  puntino alla periferica corretta. In ogni caso, se cambiate o
  rimuovete questi link, qualche applicazione (minicomper esempio )
  andranno configurate nuovamente.


  3.2.  La periferica cua

  Ogni periferica tty ha una corrispondere periferica cua. Si  discusso
  a lungo circa la rimozione delle cua poich forse  meglio utilizzare
  le ttyS. La principale differenza tra cua e ttyS  che per un comune
  comando "open" ( senza argomenti ) all'interno di una applicazione, la
  cua aprir ugualmente la porta anche se i segnali di controllo del
  modem ( come il DCD ) non lo permettono ( stty deve essere impostato
  per controllare i segnali del modem ). In una situazione del genere
  una porta ttyS si rifiuterebbe di aprire la porta, ma pu essere
  forzata a farlo con parametri specifici ai comandi.


  3.3.  Le porte seriali e la numerazione in /dev



       /dev/ttyS0 major 4, minor 64    /dev/cua0 major 5, minor 64
       /dev/ttyS1 major 4, minor 65    /dev/cua1 major 5, minor 65
       /dev/ttyS2 major 4, minor 66    /dev/cua2 major 5, minor 66
       /dev/ttyS3 major 4, minor 67    /dev/cua3 major 5, minor 67


  Da notare che tutte le distribuzioni devono avere queste periferiche
  gi impostate correttamente ( a meno che cua non venga abolita ).
  Potete verificare questo con:



       linux% ls -l /dev/cua*
       linux% ls -l /dev/ttyS*





  3.3.1.  Creare periferiche in /dev

  Se non trovate una periferica allora dovete crearla con il comando
  mknod. Se per esempio volete creare una periferica per ttyS0:


       linux# mknod -m 666 /dev/cua0 c 5 64
       linux# mknod -m 666 /dev/ttyS0 c 4 64




  Potete usare anche lo script MAKEDEV, che si trova in /dev. Questo
  semplifica la creazione di periferiche. Un altro esempio, sempre per
  creare una ttyS0:


       linux# cd /dev
       linux# ./MAKEDEV ttyS0




  Questo script si occupa di creare le periferiche di ingresso e di
  uscita, e impostare correttamente i permessi.


  3.4.  Piccole note per Schede Multiporta Non Intelligenti

  La periferica che viene utilizzata dalla vostra scheda multiporta
  dipende proprio dal tipo di scheda installata. Alcune di queste sono
  dettagliatamente descritte in rc.serial o in 0setserial che si trova
  nel pacchetto setserial. Raccomando vivamente di prendere la pi
  recente versione di setserial se state provando ad installare una
  scheda multiporta. Probabilmente avrete bisogno di creare queste
  periferiche. Potete utilizzare sia il comando mknod sia lo script
  MAKEDEV. Le periferiche per schede multiporta sono create aggiungendo
  ``64 + numero porta''. Quindi, se volete creare una periferica del
  tipo ttyS17, dovrete digitare:



       linux# mknod -m 666 /dev/cua17 c 5 81
       linux# mknod -m 666 /dev/ttyS17 c 4 81




  Notate che ``64 + 17 = 81''. Usando invece lo script MAKEDEV, dovrete
  digitare:



  linux# cd /dev
  linux# ./MAKEDEV ttyS17




  Nota: il manuale SIIG per la IO1812 che descrive la COM5-COM8 
  errato. Devono essere COM5=0x250, COM6=0x258, COM7=0x260, e
  COM8=0x268.

  Nota: il registro di stato per l'interrupt della Digi PC/8 e'0x140.

  Nota: per una AST Fourport dovrete specificare skip_test in rc.serial.


  3.5.  Note per Schede Multiporta Intelligenti

  Leggete le informazioni che trovate assieme al driver. Queste schede
  utilizzano particolari periferiche, non quelle predefinite. Queste
  informazioni variano dipendentemente dall'hardware.


  4.  Programmi interessanti di cui dovete essere al corrente

  4.1.  Cosa  getty ?

  getty  un applicativo che gestisce i processi di login quando
  accedete ad un sistema Unix. Dovrete utilizzare getty se desiderate
  accedere al vostro Linux box con un modem. Al tempo stesso, non ne
  avete bisogno se chiamate all'esterno dallo stesso box. Esistono
  attualmente tre versioni che sono comunemente utilizzate con Linux:
  getty_ps, mgetty e agetty. La sintassi per questi programmi 
  differente, quindi controllate e assicuratevi di utilizzare la
  corretta sintassi per qualunque getty decidiate di utilizzare.


  4.1.1.  getty_ps

  Molte distribuzioni hanno il pacchetto getty_ps installato ( Debian
  usava agetty, ma adesso  passata a mgetty). Questo contiene due
  applicativi: getty, il quale  utilizzato per le console e i
  terminali, e uugetty per i modem. Io uso questa versione di getty,
  quindi  quella su cui porr maggiore attenzione.


  4.1.2.  mgetty


  mgetty  una versione di getty usata per lo pi con i modem. Pu
  essere utilizzata per terminali cablati, ma la documentazione  al 99%
  incentrata sui modem. Oltre a permettere le connessioni esterne,
  mgetty fornisce il supporto per i FAX e il riconoscimento automatico
  del PPP. La documentazione di mgetty (fornita in formato texinfo) 
  buona, e non necessita di aggiunte da parte mia. Fate riferimento a
  quella documentazione per le istruzioni di installazione. Potete
  trovare maggiori informazioni circa mgetty a
  http://www.leo.org/~doering/mgetty/.


  4.1.3.  agetty


  agetty  la terza variante di getty.  una semplice, completamente
  funzionale, implementazione di getty creata appositamente per console
  virtuali o terminali piuttosto che modem .

  4.2.  Cosa  setserial ?

  setserial  un applicativo per vi permette di controllare e modificare
  i vari attributi di una periferica seriale, inclusi l'indirizzo della
  porta, l'interrupt e altre opzioni varie. Potete sapere quale versione
  avete, lanciando setserial senza argomenti. Se l'argomento fosse, per
  esempio, /dev/ttyS0, allora riceverete informazioni circa questa
  periferica.


  Quando il vostro sistema Linux viene avviato, sono configurate solo le
  periferiche ttyS{0-3}, usando gli IRQ standard 4 e 3. Quindi, se avete
  altre periferiche seriali fornite da altre schede o se ttyS{0-3} hanno
  un IRQ non-standard, allora dovete usare setserial in modo da
  configurare queste porte seriali. Per la lista completa di opzioni
  consultate la pagina man.


  5.  Come posso effettuare una chiamata con il mio modem?

  5.1.  Requisiti Hardware

  Potete utilizzare un modem sia esterno che interno. Quello interno 
  pi economico e non occupa spazio sulla scrivania o sul tavolo. Quello
  esterno invece  pi semplice da installare e ha delle luci che
  permettono di capire cosa sta succedendo. Devono essere spenti
  manualmente quando non vengono usati e continuano a consumare un
  piccolo quantitativo di energia elettrica anche una volta spenti.


  5.1.1.  Modem Esterni

  Prima di tutto, assicuratevi di avere il cavo giusto. Il vostro modem
  richiede un cavo pin-to-pin senza i file intrecciati. Ogni rivenditore
  di computer dovrebbe averli. Assicuratevi inolte che abbia il giusto
  connettore. Se state usando una porta seriale DB25, allora sar sempre
  un connettore maschio DB25. Non confondetevi con la porta parallela,
  che ha un connettore femmina DB25. Collegate a questo punto il vostro
  modem ad una delle porte seriali. Consultate il manuale del vostro
  modem su come farlo se avete bisogno di aiuto.


  5.1.2.  Modem Interni

  Per un modem interno non avrete bisogno di un cavo. Un modem interno
  non necessita di una porta seriale, ne ha una inserita al suo interno.
  Tutto ci di cui avete bisogno  configurare gli indirizzi della porta
  I/O. Consultate il manuale del vostro modem se non sapete cosa fare.
  Inoltre, potete leggere la sezione ``Posso usare pi di due porte
  seriali?'' se avete bisogno di scegliere un IRQ o un indirizzo.


  Su alcune schede madri potete disattivare le porte seriali che il
  modem rimpiazza in modo tale da evitare conflitti. Questo pu essere
  eseguito utilizzando i vari jumper presenti sulla scheda oppure dalle
  impostazioni del BIOS, dipende dal tipo di scheda madre. Consultate il
  manuale di questa.


  Se siete in possesso di una scheda video IBM8514, allora dovete sapere
  che c' un errore. Potrete avere problemi se tentate di utilizzare il
  vostro modem interno sul ttyS3. Se Linux non riconosce la vostra
  scheda modem interna su ttyS3, potete utilizzare setserial e il modem
  funzioner correttamente. I modem interni su ttyS{0-2} non dovrebbero
  avere nessuno problema nell'essere riconosciuti. Linux non esegue
  nessuna auto-configurazione su ttyS3 per via di questo problema con
  questo tipo di scheda video.


  5.2.  Parlare al vostro modem

  Usate kermit, minicom o qualche altro applicativo di comunicazione per
  sperimentare la vostra configurazione, prima di passare all'utilizzo
  di applicazioni pi complesse, tipo SLIP o PPP. Potete trovare le
  versioni pi recenti di kermit a http://www.columbia.edu/kermit/. Per
  esempio, se il vostro modem  connesso a ttyS3, e la velocit  115200
  bps, dovrete fare cos:


       linux# kermit
       C-Kermit 6.0.192, 6 Sep 96, for Linux
        Copyright (C) 1985, 1996,
         Trustees of Columbia University in the City of New York.
       Default file-transfer mode is BINARY
       Type ? or HELP for help.
       C-Kermit>set line /dev/ttyS3
       C-Kermit>set carrier-watch off
       C-Kermit>set speed 115200
       /dev/ttyS3, 115200 bps
       C-Kermit>c
       Connecting to /dev/ttyS3, speed 115200.
       The escape character is Ctrl-\ (ASCII 28, FS)
       Type the escape character followed by C to get back,
       or followed by ? to see other options.
       ATE1Q0V1                           ; digitate questo e premete INVIO
       OK                                 ; il modem dovrebbe rispondere cos




  Se il vostro risponde ai comandi AT, allora sicuramente funzioner con
  Linux. Adesso provate a chiamare un altro modem digitando:


       ATDT123456




  dove 123456  il numero telefonico. Usate ATDP invece di ATDT se avete
  una linea a impulsi. Se la chiamata viene effettuata, allora il vostro
  modem funziona correttamente.

  Per tornare al prompt di kermit premete CTRL+\ e poi C:



       Ctrl-\-C
       (per tornare a linux)
       C-Kermit>quit
       linux#




  Questo  solo un piccolo test molto rude su come effettuare una chia
  mata manualmente. Il metodo "normale"  di utilizzare kermit in modo
  che effettui la chiamata automaticamente, utilizzando il suo database
  interno di numeri telefonici. Ad esempio, se utilizzate un modem US
  Robotics (USR):


  linux# kermit
  C-Kermit 6.0.192, 6 Sep 1997, for Linux
   Copyright (C) 1985, 1996,
    Trustees of Columbia University in the City of New York.
  Default file-transfer mode is BINARY
  Type ? or HELP for help
  C-Kermit>set modem type usr        ; Selezionare il tipo di modem
  C-Kermit>set line /dev/ttyS3       ; Selezionare la porta di comunicazione
  C-Kermit>set speed 115200          ; Impostare la velocit di trasmissione
  C-Kermit>dial 7654321              ; Chiamare
   Number: 7654321
   Device=/dev/ttyS3, modem=usr, speed=115200
   Call completed.<BEEP>
  Connecting to /dev/ttyS3, speed 115200
  The escape character is Ctrl-\ (ASCII 28, FS).
  Type the escape character followed by C to get back,
  or followed by ? to see other options.

  Welcome to ...

  login:




  fate riferimento alla sezione ``Programmi di Comunicazione'' se avete
  bisogno di ulteriori informazioni o applicativi da utilizzare.

  Quando chiamate con il vostro modem, impostate la velocit della porta
  seriale la pi alta possibile, sempre che il vostro modem la supporti
  ( non oltre i 155200 bps). Questa non  la stessa velocit del modem,
  come ad esempio 56.000 bps. Alcune versioni di Linux con una versione
  libc maggiore di 5.x hanno il supporto per 115.200 bps.


  5.3.  Configurare il modem per chiamare all'esterno

  Se utilizzate il modem unicamente per chiamare, potete configurarlo
  come pi vi piace. Se invece siete intenzionati anche a ricevere
  chiamate, allora dovete configurare il vostro modem alla stessa
  velocit a cui intendete impostare getty. Comunque sia, la maggior
  parte dei modem oggigiorno impostano automaticamente la velocit alla
  stessa della porta di comunicazione. Chi utilizza getty alla velocit
  di 115.200 bps ha automaticamente impostato il modem per quella
  velocit, quando getty invia a questo la stringa di inizializzazione
  alla porta a cui  connesso il modem. In generale, consultate il
  manuale del vostro modem per impostare una velocit ottimale.


  5.4.  Controllo di Flusso Hardware

  Se il vostro modem supporta il controllo di flusso hardware (RTS/CTS),
  vi raccomando caldamente di utilizzarlo.  particolarmente importante
  per i modem che supportano la compressione dei dati. In primo luogo
  dovete attivare il controllo di flusso RTS/CTS sulla porta seriale
  stessa. Il miglior modo  di farlo al boot, ad esempio in
  /etc/rc.d/rc.local oppure /etc/rc.d/rc.serial. Assicuratevi che questi
  file siano eseguiti la file principale, rc.sysinit! Dovete seguire il
  seguente procedimento su ogni porta sulla quale desiderate installare
  il supporto per il controllo di flusso hardware:


       stty crtscts < /dev/ttyS3



  Se non  impostato per default, dovete impostare il controllo di
  flusso RTS/CTS anche sul vostro modem. Il vostro programma di comuni
  cazione pu impostarlo per voi. Consultate il manuale del vostro modem
  per maggior informazioni.


  6.  Come posso effettuare chiamate e riceverle con il modem usando
  getty_ps ?

  Configurate il vostro modem in modo che possa effettuare chiamate
  correttamente. Se non avete letto la sezione ``Come posso effettuare
  una chiamata con il mio modem?'' allora leggetela adesso! Contiene
  informazioni molto importanti sulla configurazione. Non importa che
  leggiate questa sezione se desiderate usare il modem esclusivamente
  per effettuare chiamate.


  6.1.  Configurare il modem per chiamare e ricevere

  Per effettuare chiamate oppure riceverle dovete impostare il vostro
  modem in un modo particolare ( ancora usando i comandi AT sul vostro
  modem ) :


       E1      command echo ON
       Q0      result codes are reported
       V1      verbose ON
       S0=0    never answer (uugetty interpreta questo come una
               opzione WAITFOR )




  Se non impostate questi parametri correttamente, la vostra stringa
  INIT potrebbe fallire, bloccando tutta la procedura. Ma ecco qualcosa
  di pi circa i file di configurazione...


       &C1     DCD  attivato solo dopo la connessione
       &S0     DSR  sempre attivato
       DTR on/off resetta il modem (dipende dalla casa produttrice - RTFM )




  Questi parametri impostano il comportamente del modem quando una chia
  mata inizia e/o finisce.

  Se il vostro modem non supporta l'inserimento di un profilo, potete
  impostare questi parametri attraverso la stringa INIT nel vostro file
  di configurazione. Leggete pi sotto. Alcuni modem hanno alcuni DIP
  switch per effettuare queste modifiche. Assicuratevi che anche questi,
  se  il vostro caso, siano impostati correttamente.


  Ho iniziato a collezionare configurazioni per svariati tipi di modem.
  Al momento per non sono molti.. quindi inviatemeli! aspetto qualcosa
  da voi!  Potete trovare quelli gi presenti a
  ftp://ftp.cc.gatech.edu/pub/people/gregh/modem-configs.


  Nota: per far resettare correttamente il mio modem USR Courier V.34
  quando cade il DTR, ho dovuto impostare &D2 e S13=1 ( questo assegna
  il bit 0 del registro S13).  stato confermato che questo funziona
  anche sul modem USR Sportster V.34 .

  Nota: alcuni modem Supra gestisco il DCD in modo differente da altri
  modem. Se state utilizzando un modem Supra, provate a impostare &C0 e
  non &C1. Dovete anche settare &D2 per gestire correttamente DTR.


  6.2.  Installazione di getty_ps

  Prendete la versione pi recente da
  sunsite.unc.edu:/pub/Linux/system/serial.  In particolare, se
  desiderate usare alte velocit (57600 e 115200 bps) dovete prendere la
  versione 2.0.7j o successive. Inoltre dovete anche avere la libc
  versione 5.x o successiva.


  Per default, getty_ps  configurato per essere compatibile con il
  Linux FSSTND ( File System Standard ), il che significa che i file
  binari saranno in /sbin/, e i file di configurazione si chiameranno
  /etc/conf.{uu}getty.ttySN. Questo non compare nella documentazione!
  Inoltre dar per scontato che i lock file andranno in /var/lock.
  Assicuratevi di avere la directory /var/lock/.


  Se non desiderate la compatibilit con FSSTND, i file binari andranno
  in /etc, mentre quelli di configurazione in
  /etc/default/{uu}getty.ttySN, e i lock file si andranno in
  /usr/spool/uucp. Vi raccomando di effettuare queste procedure come
  descritte se state usando UUCP, perch UUCP potr avere problemi se
  muovete i lock file dalla posizione predefinita.


  getty_ps pu inoltre usare syslogd per registrare tutti i messaggi.
  Consultate le pagine man syslogd(1) e syslogd.conf(5) su come
  impostare syslogd, se ancora non lo avete installato. I messaggi sono
  registrati con priorit LOG_AUTH, gli errori usano LOG_ERR, e quelli
  di debugging LOG_DEBUG. Se non desiderate usare syslogd potete editare
  tune.h fra i file sorgenti di getty_ps per utilizzare un file per
  registrare i messaggi, che per default  /var/adm/getty.log.


  Decidete se siete interessati ad utilizzare FSSTND e anche syslogd,
  potete scegliere di utilizzare una combinazione dei due. Modificate il
  Makefile, tune.h  e config.h per confermare le vostre decisioni.
  Quindi compilate e installate seguendo le istruzioni incluse nel
  pacchetto dei sorgenti.

  D'ora in avanti, tutti i riferimenti a getty saranno per getty_ps.
  Riferimenti invece a uugetty saranno per uugetty incluso nel pacchetto
  getty_ps. Queste istruzioni non funzionano con mgetty o agetty.



  7.  uugetty


  7.1.  Impostare uugetty

  Assicuratevi di avere una periferica di entrata e una di uscita per la
  porta seriale alla quale  collegato il vostro modem. Se questo si
  trova su ttyS3 dovete avere le periferiche /dev/cua3 e /dev/ttyS3. Se
  non avete le periferiche corrette, leggete la sezione ``Creare
  periferiche in /dev'' circa la creazione di queste periferiche, e
  createle. Se desiderate essere in grado di effettuare chiamate
  all'esterno mentre uugetty controlla la porta per eventuali chiamate
  in arrivo, usate la periferica /dev/cuaN invece di /dev/ttySN.


  uugetty effettua importanti controlli sui lock file. Aggiornate
  /etc/gettydefs per aggiungere un voce per il vostro modem. Quando
  avete modificato /etc/gettydefs, potete verificare la correttezza
  della sintassi eseguendo:


       linux# getty -c /etc/gettydefs





  7.1.1.  Modem moderni

  Se avete un modem a 9600 bps o pi veloce con compressione dei dati,
  potete impostare la velocit della porta seriale. Per esempio:



       # 115200 velocit impostata
       F115200# B115200 CS8 # B115200 SANE -ISTRIP HUPCL #@S @L @B login: #F115200





  Se volete che il vostro modem effettui il controllo di flusso hardware
  RTS/CTS, potete aggiungere CRTSCTS alla voce:


       # 115200 velocit impostata con controllo di flusso hardware
       F115200# B115200 CS8 CRTSCTS # B115200 SANE -ISTRIP HUPCL CRTSCTS #@S @L @B login: #F115200





  7.1.2.  Modem lenti e vecchiotti

  Se siete in possesso di modem non veloci ( inferiori a 9600 bps )
  allora, invece un una sola linea per una singola velocit, avrete
  bisogno di alcune linee per provare alcune impostazioni. Da notare il
  che queste linee sono collegate fra loro con l'ultima parola, ad
  esempio #38400. Sono necessarie delle linee vuote fra ciascuna voce
  del file di configurazione.



       # Impostazioni del modem
       115200# B115200 CS8 # B115200 SANE -ISTRIP HUPCL #@S @L @B login: #57600

       57600# B57600 CS8 # B57600 SANE -ISTRIP HUPCL #@S @L @B login: #38400

       38400# B38400 CS8 # B38400 SANE -ISTRIP HUPCL #@S @L @B login: #19200

       19200# B19200 CS8 # B19200 SANE -ISTRIP HUPCL #@S @L @B login: #9600

       9600# B9600 CS8 # B9600 SANE -ISTRIP HUPCL #@S @L @B login: #2400

       2400# B2400 CS8 # B2400 SANE -ISTRIP HUPCL #@S @L @B login: #115200






  7.1.3.  Messaggio di benvenuto

  Se lo desiderate, potete impostare uugetty in modo tale che visualizzi
  messaggi interessanti al momento del login. Nel mio esempio ho
  inserito il nome del sistema, la linea seriale, e la velocit
  utilizzata. Potete aggiungere molte altre cose:


              @B    La velocit della linea in bps.
              @D    La data corrente, espressa in MM/DD/YY.
              @L    La linea seriale sulla quale si trova getty.
              @S    Il nome del sistema.
              @T    L'ora corrente, espressa in  HH:MM:SS (24 ore).
              @U    Il numero di utenti attualmente collegati.  in pratica
                    un conteggio effettuato in base al file /etc/utmp.
              @V    Il valore di VERSION
              Per visualizzare un carattere '@'singolo, utilizzate sia '/@'
              che '/@@'.





  7.2.  Personalizzare uugetty

  Esistono molti parametri che potete impostare per ciascuna porta
  seriale.  Questi sono implementati in file di configurazione separati
  per ciascuna porta. Il file /etc/conf.uugetty sar utilizzato da tutte
  le sessioni di uugetty, e /etc/etc.uugetty.ttySN sar utilizzato solo
  per quella specifica porta. Alcuni esempi di questi file di
  configurazione posso essere trovati fra i sorgenti di getty_ps, che si
  possono trovare praticamente in ogni distribuzione di Linux. Per
  motivi di spazio non sono stati trascritti qui. Nota: se state
  utilizzando versioni pi vecchie di getty ( precendenti alla 2.0.7e),
  oppure non state utilizzando FSSSTND, allora il file di configurazione
  sar /etc/default/uugetty.ttySN. Il /etc/conf.uugetty.ttyS3  cos:




       ALTLOCK=cua3
       ALTLINE=cua3
       # Linea da inizializzare
       INITLINE=cua3
       # timeout di disconnessione se inattiva
       TIMEOUT=60
       # stringa di inizializzazione del modem
       INIT="" AT\r OK\r\n
       WAITFOR=RING
       CONNECT="" ATA\r CONNECT\s\A
       # questa riga imposta il tempo di ritardo prima di inviare
       # il messaggio di benvenuto del login
       DELAY=1
       #DEBUG=010




  Aggiugete le seguenti linee nel vostro /etc/inittab, in modo tale che
  uugetty sia in esecuzione sulla vostra porta seriale ( effettuate le
  modifiche in modo da adattare questo al vostro specifico caso - file
  di configurazione, velocit e tipo di terminale):


       S3:456:respawn:/sbin/uugetty -d /etc/default/uugetty.ttyS3 ttyS3 F115200 vt100

  Riavviate init:


       linux# init q




  Per le impostazioni sulla velocit nel vostro /etc/inittab vi con
  siglio di utilizzare la velocit pi alta in bps supportata dal vostro
  hardware.

  Adesso Linux controlla continuamente la porta seriale in attesa di
  connessioni. Chiamate da un'altra macchina e collegatevi al vostro
  sistema Linux.

  uugetty ha molte altre opzioni, leggete il manuale di getty(1m) per
  una descrizione pi dettagliata. Fra le tante opzioni c' anche quella
  di richiamata.


  8.  Come posso impostare un terminale connesso al mio PC?

  Leggete il Text-Terminal-HOWTO per informazioni pi dettagliate sui
  terminali. Le istruzioni in questa sezione descrivono come connettere
  un terminale, cos come altri computer al vostro sistema Linux.


  8.1.  Requisiti Hardware

  Assicuratevi di avere il cablaggio corretto. Un cavo null-modem
  comprato in un negozio di informatica pu funzionare, ma quasi
  sicuramente non funzioner il controllo di flusso hardware. Ma deve
  essere un cavo null modem! Molti negozi di computer lo chiamano cavo
  per stampanti seriali. Assicuratevi inoltre di stare usando la porta
  seriale, una DB25 o DB9 maschio, non la quella parallela ( femmina,
  DB25 o Centronics ).


  Per il connettore DB25, avete bisogno al minino di questo:


  PC maschio DB25                         Terminale DB25
          TxD   Transmit Data         2 --> 3     RxD   Receive Data
          RxD   Receive Data          3 <-- 2     TxD   Transmit Data
          SG    Signal Ground         7 --- 7     SG    Signal Ground



  Questo cavo null modem funziona fra due computer che utilizzano il
  signale di handshake hardware RTS/CTS, ma molti terminali utilizzano
  l'handshake DTR che non pu essere impostato con linux tramite "stty".
  Una soluzione  di impostare stty crtscts e connettere il pin 20 del
  terminale (DTR) con il pin 5 del computer (CTS).












  PC male DB25                            Terminal DB25
  TxD   Transmit Data         2 --> 3     RxD   Receive Data
  RxD   Receive Data          3 <-- 2     TxD   Transmit Data
  RTS   Request To Send       4 --> 5     CTS   Clear To Send
  CTS   Clear To Send         5 <-- 4     RTS   Request To Send
  DSR   Data Set Ready        6
                              |
  DCD   Carrier Detect        8 <-- 20    DTR   Data Terminal Ready
  SG    Signal Ground         7 --- 7     SG    Signal Ground
                                    6     DSR   Data Set Ready
                                    |
  DTR   Data Terminal Ready  20 --> 8     DCD   Carrier Detect




  Se sulla propria porta seriale si ha un connettore DB9, si provi
  quanto segue:

  PC DB9                                  Terminal DB25
          RxD   Receive Data          2 <-- 2     TxD   Transmit Data
          TxD   Transmit Data         3 --> 3     RxD   Receive Data
          SG    Signal Ground         5 --- 7     SG    Signal Ground



  In alternativa, un cavo null modem DB9-DB25 (come detto non pu
  operare con un terminale con handshake hardware):

  PC DB9                                  Terminal DB25
  RxD   Receive Data          2 <-- 2     TxD   Transmit Data
  TxD   Transmit Data         3 --> 3     RxD   Receive Data
                                    6     DSR   Data Set Ready
                                    |
  DTR   Data Terminal Ready   4 --> 8     DCD   Carrier Detect
  GND   Signal Ground         5 --- 7     GND   Signal Ground
  DCD   Carrier Detect        1

  DSR   Data Set Ready        6 <-- 20    DTR   Data Terminal Ready
  RTS   Request To Send       7 --> 5     CTS   Clear To Send
  CTS   Clear To Send         8 <-- 4     RTS   Request To Send
  (RI   Ring Indicator        9 not needed)


  (S, i pin 2 e 4 hanno veramente significati opposti tra i connettori
  DB9 e quelli DB25!)

  Se non state utilizzando un cavo completamente null modem, forse
  potete utilizzare il seguente trucchetto: sul connettore dalla parte
  del vostro computer collegate il RTS e il CTS assieme, e collegate
  anche DSR, DCD e DTR assieme. In questo modo, quando uno dei due
  computer richiede un signal di handshake lo otterr ( da se stesso! ).

  Adesso che avete il cavo giusto, collegate il vostro terminale al
  vostro computer. Se potete, impostate il terminale in modo da ignorare
  i segnali di controllo del modem. Provate ad usare 9600 bps, 8 data
  bits, 1 stop bit, no parit nella configurazione del terminale (oppure
  attivate la parit se volete essere un po' pi sofisticati).


  8.2.  Impostare getty  (componente di getty_ps )


  Consultate il vostro manuale di getty per altre applicazioni come ad
  esempio agetty. Aggiungete le impostazioni per il vostro terminale per
  getty se non sono gi esistenti in /etc/gettydefs:
       # Terminale Stupido a 38400 bps
       DT38400# B38400 CS8 CLOCAL # B38400 SANE -ISTRIP CLOCAL #@S @L login: #DT38400

       # Terminale Stupido a 19200 bps
       DT19200# B19200 CS8 CLOCAL # B19200 SANE -ISTRIP CLOCAL #@S @L login: #DT19200

       # Terminale Stupido a 9600 bps
       DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S @L login: #DT9600




  Se lo desiderate potete far stampare a video da getty informazioni
  interessanti sul login. Nel mio esempio ho inserito il nome del
  sistema e la porta seriale. Potete aggiungere molte altre cose:


       @B    La velocit corrente in bps.
       @D    La data corrente, nel formato MM/DD/YY.
       @L    La porta seriale sulla quale  in esecuzione getty.
       @S    Il nome del sistema.
       @T    l'ora corrente, nel formato HH:MM:SS ( 24 ore ).
       @U    IL numero degli utenti attualmente collegati.
       @V    Il valore di VERSION.

       Per visualizzare un singolo carattere '@', potete usare
       sia '\@' sia '@@'.




  Una volta modificato /etc/gettydefs, potete verificare che la sintassi
  sia corretta digitando:


       linux# getty -c /etc/gettydefs





  Assicuratevi che non vi siano file di configurazione di getty oppure
  uugetty per la porta seriale alla quale il vostro terminale 
  collegato (/etc/default/{uu}getty.ttySN oppure
  /etc/conf.{uu}getty.ttySN), poich pu molto probabilmente interferire
  nell'esecuzione di getty su un terminale. Rimuovere questi file se
  esistono.

  Editate il vostro file /etc/inittab per lanciare getty sulla porta
  seriale ( sostituendo con le corrette informazioni sul vostro sistema
  - porta, velocit e tipologia del terminale):


       S1:456:respawn:/sbin/getty ttyS1 DT9600 vt100




  Riavviate init:


       linux# init q




  A questo punto dovreste essere in grado di vedere un prompt di login
  sul terminale. Probabilmente dovrete premere invio per ottenere
  l'attenzione del terminale.


  8.3.  Suggerimenti per configurare un PC come terminale seriale


  Molte persone configurano i loro PC come terminali connessi a un box
  linux. Per esempio, dei vecchi PC 8088 o 80286 sono perfetti per
  questo scopo. Tutto ci di cui avete bisogno  un disco di boot DOS
  adatto al vostro tipo di terminale, e un programma di comunicazione da
  avviare. kermit  ideale a questo scopo. Potete trovare versioni
  precompilate di kermit per ogni sistema operativo esistente a
  http://www.columbia.edu/kermit/. Altri programmi DOS molto popolari
  come procomm funzionano molto bene. Assicuratevi di impostare
  corretamente le informazioni sulla porta seriale nelle impostazioni
  del programma di comunicazione del vostro terminale.


  9.  Posso usare pi di due porte seriali?

  Non avete bisogno di leggere questa sezione a meno che non intendiate
  utilizzare tre o pi periferiche seriali ( assumendo il fatto che non
  avete una porta seriale).

  Il numero delle porte seriali  limitato dal numero di interrupt (IRQ)
  e indirizzi di I/O che possiamo utilizzare. Queste non  una
  limitazione di Linux, ma del bus del PC. Ad ogni porta seriale deve
  essere assegnato un proprio indirizzo e dovrebbe avere il proprio
  interrupt. Se due periferiche condividono lo stesso interrupt, pu
  funzionare correttamente se le due periferiche non operano
  contemporaneamente (nella maggior parte dei casi sono i due programmi
  che non devono essere in esecuzione assieme). Una periferica seriale
  pu essere un porta seriale, un modem interno, oppure una scheda
  seriale multiporta.


  Una scheda seriale multiporta sono appositamente progettate per avere
  porte seriali multiple che condividono lo stesso interrupt per tutte
  le porte sulla scheda. Linux riceve i dati da queste usando differenti
  indirizzi di I/O per ogni porta sulla scheda.


  9.1.  Scegliere gli interrupt per le periferiche seriali

  Il vostro PC normalmente ha ttyS0 e ttyS2 associate all'IRQ 4, e ttyS1
  e ttyS3 all'IRQ 3. Potete visualizzare gli IRQ utilizzati digitando
  setserial /dev/ttyS2  ecc ecc. Il contenuto di /proc/interrupts mostra
  alcuni di questi. Per usare pi di una periferica seriale dovrete
  riassegnare gli interrupt. Una buona scelta solitamente  quella di
  riutilizzare l'interrupt della porta parallela. Il vostro PC
  normalmente ha IRQ 5 e IRQ 7 per la porta parallela, ma poche persone
  usano due porte di questo genere. Potete riassegnare uno di questi
  interrupt ad una porta seriale e continuare ad usare felicemente la
  vostra porta parallela. Avete bisogno dell'applicazione setserial per
  eseguire questa operazione. In aggiunta, dovete fare alcuni tentativi
  con i jumper della vostra scheda, consultate il manuale di questa per
  maggiori informazioni. Impostate i jumper per l'IRQ che desiderate per
  ciascuna porta.



  Dovete impostare le cose in modo che esista un solo interrupt per
  ciascuna periferica seriale. Ecco come Greg ha configurato il suo
  sistema in /etc/rc.d/rc.local - dovete eseguire le modifiche in un
  file che viene eseguito all'avvio del sistema:



       /sbin/setserial /dev/ttyS0 irq 3        # il mio mouse serial
       /sbin/setserial /dev/ttyS1 irq 4        # il mio terminale stupido Wyse
       /sbin/setserial /dev/ttyS2 irq 5        # il mio modem Zoom
       /sbin/setserial /dev/ttyS3 irq 9        # il mio modem USR




  Impostazione standard degli IRQ:

                IRQ  0    Timer channel 0
                IRQ  1    Keyboard
                IRQ  2    Cascade for controller 2
                IRQ  3    Serial port 2
                IRQ  4    Serial port 1
                IRQ  5    Parallel port 2
                IRQ  6    Floppy diskette
                IRQ  7    Parallel port 1
                IRQ  8    Real-time clock
                IRQ  9    Redirected to IRQ2
                IRQ 10    non assegnato
                IRQ 11    non assegnato
                IRQ 12    non assegnato
                IRQ 13    Math coprocessor
                IRQ 14    Hard disk controller 1
                IRQ 15    Hard disk controller 2



  Non esiste una vera a propria regola per le scelte degli interrupt.
  Assicuratevi solamente che questo non venga utilizzato dalla scheda
  madre o da nessuna altra scheda presente nel Pc. Gli IRQ 2, 3, 4, 5 o
  7 sono delle buone scelte. ``non assegnato'' significa che non gli 
  assegnata nessuna scheda o periferica standard. Da notare inoltre che
  gli IRQ 2 e IRQ 9 sono identici. Potete chiamarli 2 o 9, la periferica
  seriale fortunatamente funziona bene lo stesso. Se possedete una
  scheda seriale con un connettore per un bus a 16-bit, potete anche
  usare gli IRQ 10, 11, 12 oppure 15.


  NON utilizzate gli IRQ 0, 1, 6, 8, 13 o 14! questi sono riservati alla
  scheda madre. Non sar molto felice se gli usate i suoi IRQ
  prediletti! :) Quando avete impostato il tutto, controllate pi volte
  /proc/interrupts per assicurarsi che non ci siano conflitti hardware.


  9.2.  Impostare gli indirizzi per le periferiche seriali

  Dopo di che, dovete impostare l'indirizzo della porta. Controllate il
  manuale della vostra scheda per le impostazioni dei jumper. Come per
  gli interrupt, pu esistere una sola periferica seriale per ciascun
  indirizzo. Le vostre porte sono usualmente configurate come segue:


       ttyS0 indirizzo 0x3f8
       ttyS1 indirizzo 0x2f8
       ttyS2 indirizzo 0x3e8
       ttyS3 indirizzo 0x2e8




  Scegliete quale indirizzo desiderate per ogni periferica seriale e
  impostate i jumper di conseguenza. Io ho il mio modem sulla porta
  ttyS3, il mio mouse su ttyS0 e terminale su ttyS2.

  Quando riavviate il sistema, Linux dovrebbe riconoscere le porte
  seriali all'indirizzo al quale le avete configurate. Gli IRQ di Linux
  possono non corrispondere a quelli che avete impostato con i jumper.
  Non preoccupatevi. Linux non esegue nessun riconoscimento automatico
  degli IRQ, poich questo pu risultare fallimentare. Usate setserial
  per dare a Linux l'IRQ corretto per la vostra scheda, quello che avete
  impostato voi. Nel file /proc/ioports troverete quali indirizzi di
  porte di I/O sono in uso dopo l'avvio di Linux.


  10.  Come posso impostare le mie porte seriale ad una velocit mag
  giore? A quale velocit devo impostare il modem?

  Questa sezione dovrebbe aiutarvi a scegliere la velocit da utilizzare
  per il vostro modem, quando lo usate con un programma di
  comunicazione, oppure con un programma getty. Normalmente viene
  impostata la velocit attraverso un parametro passato a getty oppure
  da un menu del vostro programma di comunicazione ( oppure in un file
  di configurazione ). Se per qualunque ragione il tutto non funziona
  per le alte velocit, esiste un modo per risolvere il problema
  utilizzando delle opzioni speciali con setserial: con le opzioni
  spd_hi oppure spd_vhi passate a setserial, la velocit 38400
  attualmente imposta pu essere modificata a 57600 (spd_hi) oppure a
  115200 (spd_vhi).

  Assicuratevi di possedere le porte UART 16550A per velocit alte. Ecco
  le impostazioni suggerite:


    Se avete un modem 28.8K (V.34), 33.6 (v.34), oppure 56K (V.90)
     utilizzate 115200 bps.

    Se avevete un modem 14400 bps (V.32bis), con la compressione dati
     V.42bis, utilizzate 57600 bps.

    Se avete un modem a 9600 bps (V.32), con la compressione dati
     V.42bis, utilizzate 38400 bps.

    Se siete in possesso di un modem pi lento di 9600 bpx (V.32),
     impostate la velocit a quella pi alta supportata dal vostro
     modem. Per esempio 300 bps (V.21/Bell 103), 1200 bps (V.22/Bell
     212A), oppure 2400 bps (V.22bis).

  Eseguite un test dalla riga di comando con setserial e quindi, se
  funziona, inserite il comando appropriato in /etc/rc.d/rc.serial
  oppure /etc/rc.d/rc.local o ancora /etc/rc.boot/0setserial in modo da
  essere avviato al boot del sistema. Assicuratevi di utilizzare un path
  valido per setserial, e un nome valido di periferica. Controllare le
  impostazioni delle porte seriali eseguendo:


       setserial -a /dev/ttyS3





  11.  Programmi e Utilit di comunicazione

  Ecco una lista di alcuni programmi di comunicazione dalla quale
  potrete scegliere, disponibili via Ftp se non si trovano gi assieme
  alla vostra distribuzione.
    ecu - comunicazione

    C-Kermit <http://www.columbia.edu/kermit/> - comunicazione
     portabili, supporto di script, seriale e TCP/IP che include il
     trasferimento di file e traduzione automatica del set di caratteri.

    minicom - programma di comunicazione simile a telix.

    procomm - programma comunicazione con supporto zmodem.

    seyon - basato su X-Windows.

    xc - pacchetto di comunicazione xcomm.

    Altri utili programmi sono term e SLiRP. Offrono funzionalit e
     TCP/IP attraverso shell account.

    screen  un altro programma per la multisessione. Funziona come le
     console virtuali.

    callback  un programma che permette al vostro modem di essere
     richiamato.

    mgetty+fax gestisce i FAX, e si offre come sostituto alternativo di
     ps_getty.

    ZyXEL  un programma di controllo per i modem ZyXEL U-1496.
     Gestisce le chiamate in entrata, in uscita, richiamo, FAX e
     funzione di casella vocale.

    Il software SLIP e PPP pu essere reperito a:
     ftp://sunsite.unc.edu/pub/Linux/system/network/serial.

    Altre utilit: ftp://sunsite.unc.edu/pub/Linux/system/serial e
     ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm o in uno dei tanti
     mirror. Queste sono le directory dove si trovano i programmi per
     comunicazioni seriali.


  12.  Porte Seriali: suggerimenti e miscellanea.

  Ecco alcuni trucchetti che vi possono essere utili in svariate
  situazioni...


  12.1.  kermit e zmodem

  Per utilizzare lo zmodem con kermit aggiungere le seguenti righe al
  vostro .kermrc:


       define rz !rz < /dev/ttyS3 > /dev/ttyS3
       define sz !sz \%0 > /dev/ttyS3 < /dev/ttyS3




  Eventualmente sostituite la porta corretta sulla quale si trova il
  vostro modem. Quindi, per utilizzarlo, digitate rz or sz <nome_file>
  al prompt di kermit.


  12.2.  Impostare automaticamente il tipo di terminale

  Per impostare automaticamente il tipo di terminale quando eseguite un
  login, basta aggiungere il tipo di terminale nel file /etc/inittab. Se
  avete un terminale VT100 sulla porta ttyS1, aggiungere ``vt100'' nel
  comando gtty:


       S1:456:respawn:/sbin/getty ttyS1 DT9600 vt100




  Altri gettys hanno opzioni simili. Potete anche utilizzare tset, che
  pu stabilire le caratteristiche del terminale al momento del login, e
  non dipende da nessuna impostazione standard.


  12.3.  Usare i colori con ls  attraverso connessioni seriali.


  Se il comando ls usato con i colori blocca il vostro terminale,
  disattivate questa opzione. ls --color, e ls --colour utilizzano le
  funzionalit colore di ls. Alcune installazioni hanno queste
  impostazioni gi presenti. Controllate che nel file /etc/profile e
  /etc/csh.cshrc esista una riga per gli alias di ls. Se non desiderate
  modificare questa opzione a livello di sistema, create un alias di ls
  con ls --no-color.


  12.4.  Stampare su un stampare collegata ad un terminale seriale.


  Esiste un programma, chiamato vtprint, disponibile a:
  ftp://ftp.sdsu.edu/pub/vtprint, e anche a
  http://www.sdsu.edu/~garrett.

  Ne esiste anche un altro chiamato xprt. Pu essere reperito a
  ftp://sunsite.unc.edu/pub/Linux/system/printing.


  12.5.  Pu Linux configurare le periferiche seriali automaticamente?

  S.  Se il riconoscimento automatico non viene effettuato normalmente,
  attivatelo in modo che riconosca automaticamente le vostre periferiche
  seriali all'avvio del sistema. Aggiungete la linea seguente se
  necessario:


       /sbin/setserial /dev/ttyS3 auto_irq skip_test autoconfig




  al vostro file /etc/rc.d/rc.local o /etc/rc.d/rc.serial oppure
  /etc/rc.boot/0setserial.  Eseguite questa operazione per ogni porta
  seriale se desiderate la configurazione automatica. Assicuratevi ti
  fornigli una periferiche che esiste veramente sulla vostra macchina.


  12.5.1.  Note per schede multiporta

  Per gli indirizzi sulla scheda e gli IRQ leggete il file rc.serial
  oppure /etc/rc.boot/0setserial fornito con programma setserial.
  Contiene molte informazioni sulle schede multiporta, inclusi indirizzi
  di I/O e i nomi delle periferiche.




  12.6.  Usare una console seriale.

  Esiste un articolo nel numero 36 del Linux Journal,
  http://www.ssc.com/lj/issue36/index.html che spiega proprio come
  utilizzare una console seriale. Leggete il Text-Terminal-HOWTO.



  13.  Un piccolo passo avanti...

  Non  necessario leggere questa sezione, ma pu fornirvi ulteriori
  informazioni approfondite su Unix e il mondo delle telecomunicazioni.


  13.1.  Che cosa sono i lock file?

  I lock file sono semplici file che indicano che una particolare
  periferica  in uso. Si trovano in /usr/spool/uucp oppure /var/lock.
  I file lock di linux utilizzano la seguente denominazione LCK..name,
  dove name  il nome della periferica, oppure il nome UUCP. Alcuni
  processi creano questi lock file per assicurarsi un accesso esclusivo
  alla periferica.  Per esempio, se chiamate all'esterno con un modem,
  un file lock apparir indicando che qualcuno sta gi utilizzando
  quella periferica modem. I file lock spesso contengono il PID del
  processo che ha bloccato la periferica.  Molti programmi cercano il
  lock, e controllano che sia ancora valido verificando la presenza
  dell'applicazione che lo detiene nella tabella dei processi. Se il
  lock  ancora valido, il programma esce ( o per lo meno dovrebbe farlo
  ). Se invece non  pi valido, allora l'applicazione rimuove questo
  lock e utilizza la periferica, creando un nuovo lock file. Altri
  programmi invece terminano indicando solo che la periferica  in uso.


  13.2.  ``baud'' Vs. ``bps''

  ``baud'' e ``bps'' sono probabilmente i due termini usati pi
  impropriamente nel mondo informatico e delle telecomunicazioni. Molte
  persone utilizzando questi termini indifferentemente, quando invece la
  storia non sta cos.

     baud
        La misura baud indica quante volte al secondo un segnale, per
        esempio emesso da un modem (modulatore-demodulatore), cambia.
        Per esempio, una baud rate di 1200 indica che un segnale cambia
        ogni 833 microsecondi. Baud rate comuni per i modem sono 50, 75,
        110, 300, 600, 1200 e 2400. Molti modem ad alta velocit
        utilizzano hanno una baud rate a 2400. Per le limitazioni sulle
        linee telefoniche per voce una baud rate maggiore di 2400 
        molto difficile da raggiungere, e forse funziona unicamente su
        linee con un segnale molto chiaro, senza interferenze.
        Molteplici bit possono essere gestiti per ogni baud, quindi il
        bit rate pu superare notevolmente il baud rate. Il Baud prende
        il nome da Emile Baudot, l'inventore del telegrafo stampante
        asincrono.


     bps
        La misura in bps indica invece quanti bit per secondo sono
        trasmessi. Modem moderni trasmetto a 14.4K , 28.8K, 33.6K e 56K
        bps. Usando un modem con la compressione V.42 ( compressione
        massima 4:1 ),  possibile raggiungere i 115.2K bps.  Questo 
        ci che molte persone confondono con i baud.


  Quindi, se un modem ad alta velocit opera a 2400 baud, come pu
  inviare dati a 14400 bps ( o superiori )? I modem possono raggiungere
  elevato indice di velocit in bps ( superiore a quello in baud ) codi
  ficando un maggior numero di bit per ogni baud. Per questo il valore
  in bps sar maggiore di quella in baud. Ad esempio se il vostro modem
  effettua un collegamento a 14400 bps significa che  collegato a 2400
  baud ed inserisce in ogni cambiamento di fase 6 bit.

  Come  iniziata questa confusione? Beh, quando un tempo i vecchi modem
  lenti erano considerati veloci, spesso la velocit in baud era
  equivalente a quella in bps. Un solo bit era inserito in ogni
  cambiamento di fase. I termini baud e bps erano utilizzabili
  indifferentemente, poich corrispondevano allo stesso vlore. La
  confusione  iniziata quando i modem pi moderni, che offrono
  prestazioni migliori in termini di velocit, hanno un indice in bps
  maggiore a quello in baud.


  13.3.  Che cosa sono gli UART? Come incidono nelle prestazioni?


  Gli UART (Universal Asynchronous Receiver Transmitter) sono dei
  circuiti della vostra scheda seriale ( se ne avete una ) o sulla
  scheda madre del vostro PC.  La funzione di questi UART possono essere
  eseguite anche da processori che effetuano anche altri tipi di
  operazioni. La finalit dei UART  quella di convertire i dati in bit,
  inviare questi alla linea seriale, e quindi ricostruire nuovamente i
  dati presso l'altra estremit della connessione seriale. Gli UART si
  scambiano dati in pacchetti dimensionati in byte, scelto per
  convenienza poich corrispondono al numero di caratteri ASCII.

  Immaginate di avere un terminale connesso al vostro PC. Quando
  digitate un carattere, il terminale passa quel carattere al
  trasmettitore ( quindi anche un UART ). Questo invia quel byte sulla
  linea seriale, un bit alla volta,  ad un valore predefinito. La UART
  del PC al quale  connesso il terminale riceve questi dati in bit, e
  li riconverte in byte e li inserisce in un buffer.

  Esistono due tipi diversi di UART. Probabilmente avrete sentito
  parlare dei UART `stupidi' ( i modelli 8250 e 16450 ) e di quelli FIFO
  ( modello 16550A ).  Per capire queste differenze, per prima cosa
  esamineremo cosa succede quando un UART ha inviato oppure riceve dei
  dati.

  L'UART di per s non controlla in nessuno modo i dati, li invia e li
  riceve solamente. Per l'UART originale la CPU ottiene un interrupt
  dalla periferica seriale ogni volta che un byte viene inviato o
  ricevuto. La CPU quindi preleva il byte ricevuto dal buffer dell'UART
  e lo inserisce da qualche parte nella memoria, oppure assegna all'UART
  un altro byte da inviare. Gli UART 8250 e 16450 hanno un buffer di 1
  solo byte. Questo significa che ogni volta che 1 byte viene inviato o
  ricevuto la CPU viene interrotta. A velocit basse pu andare bene. Ma
  ad alta velocit la CPU diventa cos occupata a dialogare con l'UART
  che non ha pi tempo di servire gli altri task. In alcuni casi la CPU
  non riesce a gestire tutti gli interrupt generati dall'UART e il byte
  nel buffer viene sovrascritto, poich i dati arrivano troppo
  velocemente.


  14.  Risoluzione dei Problemi

  14.1.  Ricevo sempre il messaggio ``line NNN  of inittab invalid''

  Assicuratevi che state utilizzando la corretta sintassi per la vostra
  versione di init.  Le differenti versioni di init che sono state
  rilasciate utilizzano sintassi differenti per il file /etc/inittab.
  Assicuratevi che state anche usando la corretta sintassi per la vostra
  versione di getty.
  14.2.  Quando provo ad effettuare una chiamata all'esterno, ricevo il
  messaggio ``/dev/cua N : Device or resource busy''

  Questo problema  dovuto al fatto che il DCD o il DTR non sono
  impostati correttamente. Il DCD deve essere impostato unicamente
  quando persiste una connessione ( per esempio quando qualcuno si 
  collegato a voi chiamando dall'esterno ), e non quando getty sta
  monitorando la porta.  Controllate che il vostro modem sia configurato
  per impostare il DCD solo quando avviene una connessione. Il DTR deve
  essere invece usato quando  qualunque altra cosa sta monitorando la
  porta, come ad esempio getty, kermit, o qualche altro programma.

  Un'altra causa dell'errore ``device busy''  che avete impostato la
  vostra porta seriale con un interrupt gi in uso da qualche altra
  periferica hardware.  Quando ogni periferica viene inizializzata
  questa richiede al kernel il permesso di usare il suo interrupt
  hardware. Il sistema operativo tiene traccia di quali interrupts sono
  assegnati e a chi, e se il vostro interrupt  gi in uso, la vostra
  periferica non verr inizializzata correttamente. In realt essa non
  ha la minima idea di cosa stia succedendo, e l'unica cosa che pu fare
   rispondere con ``device-busy'' quando tentate di usarla.
  Controllate tutti gli interrupt di tutte le vostre periferiche ( porte
  seriali, schede ethernet, controller SCSI, ecc. ). Evitate conflitti
  di questo genere.



  14.3.  Continuo a ricevere il messaggio ``Getty respawning too fast:
  disabled for 5 minutes''

  Assicuratevi che il vostro modem sia configurato correttamente.
  Controllate i registri E e Q.  Questo errore pu capitare quando il
  modem cerca di dialogare con getty.


  Assicuratevi anche che avete lanciato getty nel modo corretto dal
  vostro /etc/inittab. Usando una sintassi errata oppure una periferica
  sbagliata si possono verificare seri problemi.


  Verificate che la sintassi del vostro /etc/gettydefs sia corretta
  usando questa procedura:


       linux# getty -c /etc/gettydefs





  Questo errore si verifica anche quando fallisce l'inizializzazione di
  uugetty. Fate riferimento alla sezione ``getty o uugetty ancora non
  funzionano''.


  14.4.  Le periferiche seriali sono lente, oppure funzionano in un sola
  direzione.


  Molto probabilmente avere un conflitto di IRQ. Assicuratevi che non ci
  sia qualche IRQ condiviso. Verificate tutte le schede ( porte seriali,
  schede ethernet, controller SCSI, ecc. ). Controllate le impostazioni
  dei vari jumper e che i parametri per il programma setserial siano
  corretti per tutte le vostre periferiche. Inoltre controllate
  /proc/ioports e /proc/interrupts per eventuali conflitti.

  14.5.  Il mio modem  bloccato dopo che qualcuno effettua una chiamata


  Questo pu accadere quando il vostro modem non effettua il reset
  quando il DTR cade. Io vedo i miei LED RD e SD letteralmente impazzire
  quando questo accade a me. Avete bisogno di resettare il vostro modem.
  Molti modem Hayes-compatibili eseguono questa operazione con &D3, ma
  sul mio USR Courier devo impostare &D2 e S13=1. Controllate sul
  manuale del vostro modem.


  14.6.  Ho un terminale connesso al mio PC, ma quando tento di effet
  tuare un login tutto si blocca.


    Se state usando getty: Molto probabilmente non avete CLOCAL nel
     vostro /etc/gettydefs per il vostro terminale, e molto
     probabilmente non state usando un cavo pienamente null-modem. Avete
     bisogno di CLOCAL, che indica a Linux di ignorare i segnali di
     controllo del modem. Ecco come dovrebbe apparire il tutto:


        # 38400 bps Dumb Terminal entry
        DT38400# B38400 CS8 CLOCAL # B38400 SANE -ISTRIP CLOCAL #@S @L login: #DT38400

        # 19200 bps Dumb Terminal entry
        DT19200# B19200 CS8 CLOCAL # B19200 SANE -ISTRIP CLOCAL #@S @L login: #DT19200

        # 9600 bps Dumb Terminal entry
        DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S @L login: #DT9600





  Successivamente terminate il processo getty in modo che uno nuovo
  entrer in esecuzione con le nuove impostazioni.

    Se state usando agetty: Aggiungete il flag -L alla linea di agetty
     nel vostro /etc/inittab. Questo far ignorare i segnali di
     controllo del modem. Quindi riavviate init digitando init q. La
     configurazione dovrebbe essere pi o meno cos:


        s1:345:respawn:/sbin/agetty -L 9600 ttyS1 vt100






  14.7.  Ad alta velocit il mio modem perde alcuni dati

  Se state tentando di utilizzare il vostro modem a una velocit
  superiore ai 38400 bps e non avete una UART 16550 allora dovete
  aggiornarla. Leggete la sezione ``Cosa sono le UART?''.


  14.8.  All'avvio del sistema Linux non riporta le periferiche seriali
  come le ho in precedenza configurate

  Questo  vero solo in parte. Linux non effettua nessuna verifica degli
  IRQ al momento del boot, effettua solo un rilevamento di periferiche
  seriali.  Quindi, con una corretta impostazione, io ottengo questo
  all'avvio della macchina:

  Jan 23 22:25:28 misfits vmunix: tty02 at 0x03e8 (irq = 4) is a 16550A




  Dovete usare setserial per comunicare a Linux quale IRQ state usando.


  14.9.  rz  e/o sz  non funzionano quando chiamo la mia macchina Linux
  con un modem.

  Se Linux cerca la periferica /dev/modem quando tentate di trasferire
  file, controllate i file /etc profile o /etc csh.cshrc.  Probabilmente
  esiste una serie di alias definiti qui in alcune distribuzioni, come
  ad esempio Slackware. Questi alias confondono l'operato dei programmi
  zmodem.  Eliminateli, oppure correggeteli.


  14.10.  Il mio schermo visualizza alcuni buffi caratteri

  Questo accade su console virtuali su cui sono inviate informazioni di
  tipo binario direttamente allo schermo, oppure anche attraverso
  connessioni seriali.  Il modo per risolvere questo problema  di
  digitare echo ^v^[c. Per la serie con tutti i caratteri, ecco qua:


       linux% echo <ctrl>v<esc>c





  14.11.  getty  o uugetty  ancora non funzionano

  Esiste una opzione chiamata DEBUG inclusa in getty_ps. Editate il
  vostro file di configurazione /etc/conf.{uu}getty.ttySN e aggiungete
  DEBUG=NNN. Dove NNN  una delle seguenti combinazioni di numeri a
  seconda di cosa state cercando di debuggare:


       D_OPT   001            option settings
       D_DEF   002            defaults file processing
       D_UTMP  004            utmp/wtmp processing
       D_INIT  010            line initialization (INIT)
       D_GTAB  020            gettytab file processing
       D_RUN   040            other runtime diagnostics
       D_RB    100            ringback debugging
       D_LOCK  200            uugetty lockfile processing
       D_SCH   400            schedule processing
       D_ALL   777            everything




  Impostare DEBUG=010  un buon punto di partenza.

  Se state esegueneo syslogd, informazioni di debug appariranno nei
  vostro file di log. Se non state eseguendo il syslogd queste
  informazioni appariranno in /tmp/getty:ttySN per debuggare getty e
  /tmp/uugetty:ttySN per uugetty, e in /var/adm/getty.log.  Osservate
  attraverso queste informazioni di debug che cosa sta accadendo. Molto
  spesso avrete bisogno di perfezionare qualche impostazione o qualche
  parametro nella vostra configurazione, oppure di riconfigurare il
  vostro modem.


  Potete anche provare mgetty. Alcune persone hanno pi fortuna usando
  questo software.


  15.  Altre fonti di informazione


    Le pagine man di: agetty(8), getty(1m), gettydefs(5), init(1),
     login(1), mgetty(8), setserial(8)

    Il manuale del vostro modem o terminale

    NET-3 HOWTO: tutto sulle reti di comunicazione, inclusi SLIP, CSLIP
     e PPP

    PPP HOWTO: un aiuto con il PPP

    Printing HOWTO: Come impostare una stampante seriale

    Serial-Programming-HOWTO: per alcuni aspetti della programmazione
     seriale

    Term HOWTO: tutto quello che desiderate sapere sul programma term

    Text-Terminal-HOWTO: come funzionano e come installaree configurare
     un terminale testuale

    UPS HOWTO: configurare un UPS connesso alla vostra porta seriale

    UUCP HOWTO: per informazioni su come configurare UUCP

    Newsgroups di UseNet:


        comp.os.linux.answers
        FAQs, How-To's, READMEs, tutti riguardanti Linux.
        comp.os.linux.hardware
        Compatibilit hardware con il sistema operativo Linux.
        comp.os.linux.networking
        Reti e comunicazioni con Linux.
        comp.os.linux.setup
        l'installazione di Linux e l'amministrazione del sistema.
        comp.terminals







    The Linux serial mailing list.  Per iscriversi inviate una email a
     majordomo@vger.rutgers.edu, cpn ``subscribe linux-serial'' nel
     corpo del messaggio. Se inviate ``help'' nel corpo del messaggio
     riceverete un messaggio di aiuto. Il server inoltre gestisce altri
     mailing lists su Linux. Inviate il comando ``lists'' per una lista
     delle Mailing Lists presenti.



    FAQs sui Modem:
     Navas 28800 Modem FAQ
     <http://web.aimnet.com/~jnavas/modem/faq.html>
     Curt's High Speed Modem Page
     <http://www.teleport.com/~curt/modems.html>


    Programmazione seriale: Serial-Programming-HOWTO
     Advanced Programming in the UNIX Environment <http://heg-
     school.aw.com/cseng/authors/stevens/advanced/advanced.nclk>, di W.
     Richard Stevens (ISBN 0-201-56317-7; Addison-Wesley)
     <http://www.ora.com/catalog/posix/> name="POSIX Programmer's
     Guide">, di Donald Levine (ISBN 0-937175-73-0; O'Reilly)


  16.  Contributi


  Gran parte dell'HOWTO originale  stata scritta da Greg Hankins
  greg.hankins@cc.gatech.edu.  Ha anche riscritto un gran numero di
  contributi inviati da altri collaboratori per mantenere la fluidit e
  lo stile del documento. Ecco le sue parole: "Ringrazio tutti coloro
  che hanno contribuito o commentato questo documento, la lista di tutte
  queste persone  troppo grande ( spesso oltre la centinaia di persone
  ). Ringraziamenti a Ted per aver risposto alle domanda sui driver per
  le schede seriali, a Kris Gleason che mantiene getty_ps, e Gert Dring
  che mantiene mgetty."


  FINE DEL SERIAL HOWTO











































  Linux Shadow Password HOWTO
  Michael H. Jackson mhjack@tscnet.com
  v1.3, 3 Aprile 1996

  Questo documento si propone di descrivere come ottenere, installare e
  configurare la Linux Password Shadow Suite. Esso spiega anche come
  ottenere e reinstallare altri software e demoni di rete che richiedono
  accesso alle password degli utenti. Questi ultimi software in realt
  non fanno parte della Shadow Suite. Questo documento contiene inoltre
  un esempio di programmazione per aggiungere il supporto shadow ad un
  programma. Risposte ad alcune delle domande pi frequenti sono incluse
  verso la fine di questo documento. Traduzione a cura di Isabella
  Ruocco <isacher@nettaxi.com>, ultima revisione 25 Maggio 1999.

  1.  Introduzione

  Questo  il Linux Shadow Password HOWTO. Questo documento descrive
  perch e come aggiungere il supporto shadow password su un sistema
  Linux. Sono inclusi anche alcuni esempi su come usare alcune delle
  caratteristiche della Shadow Suite.

  Quando si installa la Shadow Suite e quando si usano molti dei
  programmi di utilit, occorre essere collegati come root.  Quando si
  installa la Shadow Suite verranno effettuati dei cambiamenti al
  software di sistema, ed  fortemente consigliato fare copie di backup
  dei programmi come indicato. Consiglio anche di leggere e comprendere
  tutte le istruzioni prima di iniziare.


  1.1.  Cambiamenti dalla versione precedente


  Aggiunte:
     Aggiunta una sotto-sezione sul perch potreste non voler installare le shadow
     Aggiunta una sotto-sezione sull'aggiornamento del programma xdm
     Aggiunta una sezione su come far funzionare le caratteristiche della Shadow Suite
     Aggiunta una sezione contenente le domande pi frequenti (FAQ)

  Correzioni/Aggiornamenti:
     Correzione dei riferimenti html sul sunsite
     Correzione della sezione su wu-ftp in modo che tenga conto dell'aggiunta di -lshadow al Makefile
     Correzione di errori secondari di ortografia
     Cambiamento della sezione su wu-ftp in modo da supportare ELF
     Aggiornamenti sui problemi di sicurezza in diversi programmi di login
     Aggiornamenti sulla raccomandazione di Marek Michalkiewicz sulla Linux Shadow Suite




  1.2.  Nuove versioni di questo documento

  La pi recente versione di questo documento si pu anche ottenere via
  FTP anonimo da:

  sunsite.unc.edu

  /pub/Linux/docs/HOWTO/Shadow-Password-HOWTO



  oppure:

  /pub/Linux/docs/HOWTO/other-formats/Shadow-Password-HOWTO{-html.tar,ps,dvi}.gz



  o tramite il World Wide Web dal Linux Documentation Project Web Server
  <http://sunsite.unc.edu/mdw/linux.html>, alla pagina: Shadow-Password-
  HOWTO <http://sunsite.unc.edu/linux/HOWTO/Shadow-Password-HOWTO.html>
  o direttamente da me, <mhjack@tscnet.com>. Sar anche inviata al
  newsgroup: comp.os.linux.answers


  Questo documento  ora impacchettato con i pacchetti Shadow-AAMMGG.


  1.3.  Commenti e critiche

  Per favore inviate qualunque commento, aggiornamento, o suggerimenti a
  me: Michael H. Jackson <mhjack@tscnet.com>.  Prima ricevo feedback,
  prima posso aggiornare e correggere questo documento. Se avete dei
  problemi, per favore mandate una e-mail direttamente a me, dato che
  molto raramente rimango aggiornato con i newsgroup.


  2.  Perch "oscurare" il vostro file passwd?

  Come impostazione predefinita, la maggior parte delle attuali
  distribuzioni Linux non contengono la Shadow Suite installata. Questo
  riguarda la Slackware 2.3, Slackware 3.0 ed altre famose
  distribuzioni. Una delle ragioni di questo  che le informazioni sul
  copyright nella Shadow Suite originale non spiegavano chiaramente se
  si dovesse versare una somma per la ridistribuzione. Linux usa un
  Copyright GNU (a cui talvolta si fa riferimento come Copyleft) che
  permette alle persone di impacchettarlo in un supporto conveniente
  (come una distribuzione su CD-ROM) e di venderlo.

  L'attuale manutentore della Shadow Suite, Marek Michalkiewicz
  <marekm@i17linuxb.ists.pwr.wroc.pl> ha ricevuto il codice sorgente
  dall'autore originale con un copyright tipo BSD che permette la
  ridistribuzione. Ora che i problemi di copyright sono risolti, ci si
  aspetta che le future distribuzioni conterranno le shadow password
  come opzione predefinita.  Fino ad allora, dovrete installarvele voi.


  Se avete installato la vostra distribuzione da un CD-ROM, potrebbe
  succedere che, anche se la distribuzione non aveva la Shadow Suite
  installata, alcuni dei file che vi occorrono per installare la Shadow
  Suite siano sul CD-ROM.


  Comunque, le versioni 3.3.1, 3.3.1-2 della Shadow Suite e la shadow-mk
  potrebbero avere problemi di sicurezza con il loro programma di login
  e molti altri programmi SUID root che si trovano insieme ad esse, e
  non dovrebbero essere pi usate.

  Tutti i file necessari si possono ottenere via FTP anonimo o tramite
  il World Wide Web.

  Su un sistema Linux senza la Shadow Suite installata, le informazioni
  sugli utenti, comprese la password, sono contenute nel file
  /etc/passwd. La password viene conservata in un formato criptato. Se
  chiedete ad un esperto crittografo, comunque, lui o lei vi diranno che
  la password  in realt in un formato codificato piuttosto che
  criptato, perch quando viene usato crypt(3), viene preso un testo
  vuoto e la password  usata come chiave. Perci, da qui in poi, in
  questo documento, user il termine codificato.

  Tecnicamente ci si riferisce all'algoritmo usato per codificare il
  campo password come ad una funzione hash monodirezionale. Questa  un
  algoritmo che  facile eseguire in una direzione, ma molto difficile
  eseguire nella direzione opposta. Altre informazioni sull'algoritmo
  usato si possono trovare nel paragrafo 2.4 o nella vostra pagina di
  manuale per crypt(3).

  Quando un utente sceglie o gli viene assegnata una password, questa
  viene codificata con un valore generato casualmente detto seme
  ("salt"). Questo significa che una certa password pu essere
  memorizzata in 4096 modi diversi. Il valore del seme viene memorizzato
  insieme alla password codificata.

  Quando un utente si collega e fornisce una password, prima viene
  prelevato il seme dalla password codificata in memoria. Poi la
  password digitata viene codificata con tale valore del seme e quindi
  confrontata con la password codificata. Se c' corrispondenza l'utente
  viene autenticato.

   computazionalmente difficile (ma non impossibile), ricostruire la
  password originale dalla password codificata casualmente. Comunque, su
  ogni sistema con pi di qualche utente, almeno alcune delle password
  saranno parole comuni (o semplici variazioni di parole comuni).

  Gli "scassinatori" di sistemi informatici sono a conoscenza di questo,
  e semplicemente critteranno un vocabolario di parole e password comuni
  usando tutti i 4096 possibili valori di seme. Quindi confronteranno le
  password codificate nel vostro file /etc/passwd con il loro database.
  Una volta trovata una corrispondenza, avranno la password per un altro
  account. Questo viene chiamato attacco a vocabolario ed  uno dei
  metodi pi comuni per ottenere o diffondere accessi non autorizzati ad
  un sistema.

  Se ci pensate, una password di 8 caratteri codifica fino a 4096*13
  stringhe di caratteri. Perci un vocabolario di, diciamo, 400.000
  parole comuni, nomi, password e semplici variazioni star facilmente
  su un disco fisso da 4GB. Lo scassinatore dovr solo ordinarle e
  cercare le corrispondenze. Poich un disco fisso da 4GB si pu avere a
  meno di $1000.00,  ampiamente nelle possibilit di molti scassinatori
  di sistemi informatici.

  Inoltre, se uno scassinatore ottiene prima il file /etc/passwd, avr
  bisogno solo di codificare il vocabolario con i valori del seme
  effettivamente contenuti nel vostro file /etc/passwd. Questo metodo
  pu essere usato dall'adolescente medio con un paio di Megabyte liberi
  e un computer 486.

  Anche senza molto spazio su disco, utility come crack(1) possono di
  solito corrompere almeno un paio di password su un sistema con un
  discreto numero di utenti (assumendo che gli utenti del sistema
  possano scegliersi le loro password).

  Il file /etc/passwd contiene anche informazioni tipo gli user ID e i
  group ID che sono usati da molti programmi di sistema. Perci il file
  /etc/passwd deve rimanere accessibile a tutti. Se voi cambiaste il
  file /etc/passwd in modo che nessuno possa leggerlo, la prima cosa che
  notereste sarebbe che il comando ls -s ora mostrerebbe gli user ID
  invece dei nomi!

  La Shadow Suite risolve il problema spostando le password in un altro
  file (di solito /etc/shadow). Il file /etc/shadow viene impostato in
  modo che quasi nessuno possa leggerlo. Solo root potr leggere e
  scrivere il file /etc/shadow. Alcuni programmi (come xlock) non devono
  poter cambiare le password, occorre solo che le possano verificare.
  Questi programmi possono essere eseguiti SUID root oppure si pu
  creare un gruppo shadow a cui  permesso l'accesso solo in lettura al
  file /etc/shadow. Quindi i programmi possono essere eseguiti SGID
  shadow.


  Spostando le password nel file /etc/shadow, stiamo effettivamente
  impedendo allo scassinatore di avere accesso alle password codificate
  con cui eseguire l'attacco a vocabolario.

  Inoltre, la Shadow Suite aggiunge molte altre caratteristiche
  interessanti:

    un file di configurazione per impostare le caratteristiche
     predefinite di login (/etc/login.defs)

    utility per aggiungere, modificare e cancellare account di utenti e
     gruppi

    invecchiamento e scadenza delle password

    scadenza e blocco degli account

    password di gruppo "oscurate" (opzionale)

    password di doppia lunghezza (password da 16 caratteri)
     [SCONSIGLIATO]

    migliore controllo sulla scelta delle password degli utenti

    dial-up password

    programmi di autenticazione secondaria [SCONSIGLIATO]

  Installare la Shadow Suite contribuisce alla sicurezza del sistema ma
  ci sono anche molte altre cose che si possono fare per migliorare la
  sicurezza di un sistema Linux, e ci saranno alcuni Linux Security
  HOWTO che discutono altre misure di sicurezza ed aspetti correlati.

  Per informazioni aggiornate su altri aspetti della sicurezza in Linux,
  tra cui avvertimenti sulle debolezze note guardate la Linux Security
  home page. <http://bach.cis.temple.edu/linux/linux-security/>


  2.1.  Perch potreste NON voler "oscurare" il vostro file passwd

  Ci sono alcune circostanze e configurazioni in cui installare la
  Shadow Suite  NON sarebbe una buona idea:

    la macchina non contiene account di utenti

    la vostra macchina funziona su una LAN e usa NIS (Network
     Information Services) per ottenere e fornire nomi e password degli
     utenti alle altre macchine sulla rete (in realt si potrebbe fare,
     ma  oltre lo scopo di questo documento, e in realt non
     aumenterebbe comunque molto la sicurezza)

    la vostra macchina viene usata dai server dei terminali per
     verificare gli utenti con NFS (Network File System), NIS, o qualche
     altro metodo

    la vostra macchina esegue altro codice per validare gli utenti, e
     non c' nessuna versione shadow disponibile, e non avete il codice
     sorgente.


  2.2.  Formato del file /etc/passwd

  Un file /etc/passwd non "oscurato" ha il seguente formato:



  nomeutente:passwd:UID:GID:nome_completo:directory:shell




  Dove:

     nomeutente
        Il nome (di login) dell'utente

     passwd
        La password codificata

     UID
        Identificativo numerico dell'utente

     GID
        Identificativo numerico predefinito del gruppo

     nome_completo
        Il nome completo dell'utente - in realt questo campo viene
        chiamato campo GECOS (General Electric Comprehensive Operating
        System) e pu contenere altre informazioni invece del solo nome
        completo. I comandi Shadow e le pagine di manuale si riferiscono
        a questo campo come al campo commento.

     directory
        Home directory dell'utente (percorso completo)

     shell
        Shell di login dell'utente (percorso completo)

  Ad esempio:


       nomeutente:Npge08pfz4wuk:503:100:Nome Completo:/home/nomeutente:/bin/sh




  Dove Np  il seme e ge08pfz4wuk  la password codificata. La coppia
  seme/password codificata avrebbe anche potuto essere kbeMVnZM0oL7I e
  queste due sono esattamente la stessa password. Ci sono 4096 possibili
  codifiche per la stessa password (la password usata in questo esempio
   'password', una pessima password).

  Una volta che la Shadow Suite  installata, il file /etc/passwd invece
  conterr:


       nomeutente:x:503:100:Nome Completo:/home/nomeutente:/bin/sh




  La x nel secondo campo in questo caso  ora soltanto un segnaposto. Il
  formato del file /etc/passwd non  di fatto cambiato, solo che non
  contiene pi le password codificate. Questo significa che qualunque
  programma che legge il file /etc/passwd, ma in realt non ha bisogno
  di verificare le password, funzioner ancora correttamente.

  Le password sono ora situate nel file shadow (di solito il file
  /etc/shadow).



  2.3.  Formato del file shadow

  Il file /etc/shadow contiene le seguenti informazioni:


       nomeutente:passwd:ult:pu:deve:avv:scad:disab:riservato




  Dove:

     nomeutente
        Il nome dell'utente

     passwd
        La password codificata

     ult
        Giorni dal 1 Gennaio 1970 fino all'ultima modifica della
        password

     pu
        Giorni prima che la password possa essere cambiata

     deve
        Giorni dopo i quali la password deve essere cambiata

     avv
        Giorni prima della scadenza della password in cui l'utente viene
        avvisato

     scad
        Giorni dopo la scadenza della password in cui l'account viene
        disabilitato

     disab
        Giorni a partire dal 1 Gennaio 1970 dopo cui l'account verr
        disabilitato

     riservato
        Campo riservato

  Il precedente esempio potrebbe allora essere:


       nomeutente:Npge08pfz4wuk:9479:0:10000::::





  2.4.  Uno sguardo a crypt(3)

  Dalla pagina di manuale di crypt(3):

  "crypt  la funzione di crittaggio delle password. Si basa
  sull'algoritmo Data Encryption Standard con variazioni aventi lo scopo
  (tra le altre cose) di scoraggiare l'uso di implementazioni hardware
  per la ricerca della chiave.

  [La] chiave  la password digitata dall'utente. [La stringa codificata
   tutta vuota.]

  [Il] seme  una stringa di due caratteri scelta nell'insieme [a-z  A-Z
  0-9./].  Questa stringa viene usata per perturbare l'algoritmo in uno
  tra 4096 modi diversi.

  Prendendo i 7 bit meno significativi di ogni carattere della chiave,
  si ottiene una chiave di 56 bit.  Questa chiave di 56 bit viene usata
  per crittare ripetutamente una stringa costante (di solito una stringa
  costituita di zeri). Il valore restituito punta alla password
  crittata, un insieme di 13 caratteri ASCII stampabili (i primi due
  caratteri sono il seme stesso). Il valore di ritorno punta a dati
  statici il cui contenuto viene sovrascritto da ogni chiamata.

  Attenzione: lo spazio chiave consiste di 2**56 cio 7.2e16 possibili
  valori.  possibile effettuare ricerche esaustive di questo spazio
  chiave usando computer massivamente paralleli.  disponibile del
  software, come crack(1), che cercher la porzione di questo spazio
  chiave che viene generalmente usata dagli umani per le password.
  Perci la scelta delle password dovrebbe, come minimo, evitare parole
  e nomi comuni. Si raccomanda l'uso di un programma passwd(1) che,
  durante il processo di selezione, controlla se le password sono
  vulnerabili a manomissioni.

  Lo stesso algoritmo DES ha alcune arguzie che rendono l'uso
  dell'interfaccia crypt(3) una scelta inefficace per qualunque altra
  cosa che non sia l'autenticazione di password. Se state pensando di
  usare l'interfaccia crypt(3) per un progetto di crittografia non lo
  fate: prendete un buon libro sulla crittografia e una delle librerie
  DES ampiamente disponibili."

  Molte Shadow Suite contengono codice per raddoppiare la lunghezza
  della password a 16 caratteri. Esperti in DES sconsigliano questo,
  dato che la codifica viene semplicemente applicata prima alla met di
  sinistra e poi alla met di destra della password allungata. A causa
  del modo in cui funziona crypt, la password codificata di lunghezza
  doppia potrebbe risultare addirittura meno sicura. Inoltre,  meno
  facile che un utente riesca a ricordare una password da 16 caratteri.

   in via di sviluppo un lavoro che permetterebbe all'algoritmo di
  autenticazione di essere sostituito con qualcosa di pi sicuro, che
  supporti password pi lunghe (in particolare l'algoritmo MD5) e
  mantenga compatibilit con il metodo crypt.

  Se state cercando un buon libro sulla crittografia, vi consiglio:

          "Applied Cryptography: Protocols, Algorithms, and Source Code in C"
          di Bruce Schneier <schneier@chinet.com>
          ISBN: 0-471-59756-2




  3.  Ottenere la Shadow Suite

  3.1.  Storia della Shadow Suite per Linux

  NON USATE I PACCHETTI DI QUESTO CAPITOLO, HANNO PROBLEMI DI SICUREZZA

  La Shadow Suite originale  stata scritta da John F. Haugh II.

  Esistono diverse versioni che sono state usate su sistemi Linux:

    shadow-3.3.1  l'originale;

    shadow-3.3.1-2  la patch specifica per Linux fatta da Florian La
     Roche <flla@stud.uni-sb.de> e contiene alcuni ulteriori
     miglioramenti;


    shadow-mk  stata specificamente impacchettata per Linux.

  Il pacchetto shadow-mk contiene il pacchetto shadow-3.3.1 distribuito
  da John F. Haugh II con la patch shadow-3.3.1-2 installata, alcune
  correzioni fatte da Mohan Kokal <magnus@texas.net> che semplificano
  molto l'installazione, una patch di Joseph R.M. Zbiciak per login1.c
  (login.secure) che elimina i bachi di sicurezza -f, -h in /bin/login,
  e alcune altre patch di vario tipo.

  Il pacchetto shadow.mk era il pacchetto precedentemente raccomandato,
  ma dovrebbe essere sostituito a causa di problemi di sicurezza con il
  programma di login.

  Ci sono problemi di sicurezza con le versioni 3.3.1, 3.3.1-2 di
  Shadow, e con shadow-mk che coinvolgono il programma di login. Questo
  baco di login riguarda il mancato controllo di un nome di login.
  Questo provoca un overflow nel buffer, con conseguente crash o peggio.
  Si  diffusa la voce che questo overflow del buffer possa permettere a
  qualcuno con un account sul sistema di usare questo baco e le librerie
  condivise per ottenere l'accesso come root. Non discuter esattamente
  come questo sia possibile, perch ci sono molti sistemi Linux che ne
  sono affetti, ma sistemi con queste Shadow Suite installate e la
  maggior parte delle distribuzioni pre-ELF senza la Shadow Suite sono
  vulnerabili!

  Per avere maggiori informazioni su questo e altri aspetti della
  sicurezza su Linux, guardate la: Linux Security home page (Shared
  Libraries and login Program Vulnerability)
  <http://bach.cis.temple.edu/linux/linux-security/Linux-Security-
  FAQ/Linux-telnetd.html>


  3.2.  Dove prendere la Shadow Suite

  L'unica Shadow Suite raccomandata  ancora in beta testing, comunque
  le ultime versioni sono sicure in un ambiente di produzione e non
  contengono un programma di login vulnerabile.

  Il pacchetto usa la seguente convenzione di denominazione:


       shadow-AAMMGG.tar.gz




  dove AAMMGG  la data di rilascio della Suite.

  Questa versione alla fine diventer la Versione 3.3.3 quando verr
  rilasciata dal beta testing ed  mantenuta da Marek Michalkiewicz
  <marekm@i17linuxb.ists.pwr.wroc.pl>.   disponibile come: shadow-
  current.tar.gz
  <ftp://i17linuxb.ists.pwr.wroc.pl/pub/linux/shadow/shadow-
  current.tar.gz>.

  Sono stati anche organizzati i seguenti siti mirror:

    ftp://ftp.icm.edu.pl/pub/Linux/shadow/shadow-current.tar.gz

    ftp://iguana.hut.fi/pub/linux/shadow/shadow-current.tar.gz

    ftp://ftp.cin.net/usr/ggallag/shadow/shadow-current.tar.gz

    ftp://ftp.netural.com/pub/linux/shadow/shadow-current.tar.gz


  Dovreste usare la versione attualmente disponibile.

  NON dovreste usare una versione precedente alla shadow-960129 perch
  anche quelle hanno il problema di sicurezza di login discusso sopra.

  Quando questo documento fa riferimento alla Shadow Suite mi riferisco
  a questo pacchetto. Si assume che sia questo il pacchetto che state
  usando.

  Per riferimento, io ho usato shadow-960129 per fare queste istruzioni
  di installazione.

  Se stavate usando shadow-mk, dovreste fare l'aggiornamento a questa
  versione e ricompilare tutto ci che avevate originariamente
  compilato.


  3.3.  Cosa  incluso nella Shadow Suite

  La Shadow Suite contiene programmi sostitutivi per:

  su, login, passwd, newgrp, chfn, chsh, e id

  Il pacchetto contiene anche i nuovi programmi:

  chage, newusers, dpasswd, gpasswd, useradd, userdel, usermod,
  groupadd, groupdel, groupmod, groups, pwck, grpck, lastlog, pwconv, e
  pwunconv

  Inoltre  compresa la libreria: libshadow.a per scrivere e/o compilare
  programmi che necessitino di accedere alle password degli utenti.

  Sono anche comprese pagine di manuale per i programmi.

  C' anche un file di configurazione per il programma di login che sar
  installato come /etc/login.defs.


  4.  Compilare i programmi

  4.1.  Spacchettare l'archivio

  Il primo passo dopo aver ottenuto il pacchetto  spacchettarlo. Il
  pacchetto  nel formato tar (tape archive) e compresso usando gzip,
  perci prima spostatelo in /usr/src, poi digitate:


       tar -xzvf shadow-current.tar.gz




  Questo lo spacchetter nella directory: /usr/src/shadow-AAMMGG


  4.2.  Configurare con il file config.h

  La prima cosa che avete bisogno di fare  sovrascrivere il Makefile e
  il file config.h:


       cd /usr/src/shadow-AAMMGG
       cp Makefile.linux Makefile
       cp config.h.linux config.h


  Dovreste poi dare un'occhiata al file config.h. Questo file contiene
  definizioni per alcune delle opzioni di configurazione. Se state
  usando il pacchetto consigliato, vi consiglio, almeno per la prima
  volta, di disabilitare il supporto per il gruppo shadow.

  Come opzione predefinita, sono abilitate le password di gruppo
  "oscurate". Per disabilitarle, editate il file config.h, e cambiate il
  #define SHADOWGRP in #undef SHADOWGRP. Consiglio di disabilitarle per
  iniziare, e poi se volete davvero le password di gruppo e gli
  amministratori di gruppo, li abiliterete in seguito e ricompilerete.
  Se le lasciate abilitate, dovete creare il file /etc/gshadow.

  Abilitare l'opzione per le password lunghe NON  raccomandato, come
  discusso sopra.

  NON cambiate l'impostazione: #undef AUTOSHADOW

  L'opzione AUTOSHADOW era stata in origine progettata in modo che i
  programmi che ignoravano la presenza delle shadow password avrebbero
  continuato a funzionare. Questo in teoria suona bene, ma non funziona
  correttamente. Se abilitate questa opzione, e il programma viene
  eseguito da root, potrebbe chiamare getpwnam() da root, e in seguito
  riscrivere il campo modificato nel file /etc/passwd (con la password
  non pi "oscurata"). Fanno parte di tali programmi chfn e chsh (non
  potete aggirare questo problema semplicemente scambiando
  l'identificativo utente reale con quello effettivo prima di chiamare
  getpwnam() perch anche root potrebbe usare chfn e chsh).

  Lo stesso avvertimento vale anche se state compilando libc, che ha
  un'opzione SHADOW_COMPAT che fa la stessa cosa. NON dovrebbe essere
  usata. Se cominciate a rimettere le password codificate nel vostro
  file /etc/passwd, questo  il problema.

  Se state usando una versione di libc precedente alla 4.6.27, avrete
  bisogno di fare un paio di modifiche al config.h e al Makefile.  Per
  il config.h editate e cambiate:


       #define HAVE_BASENAME




  in:


       #undef HAVE_BASENAME




  Poi, nel Makefile, cambiate:


       SOBJS = smain.o env.o entry.o susetup.o shell.o sub.o mail.o motd.o sulog.o age.o tz.o hushed.o
       SSRCS = smain.c env.c entry.c setup.c shell.c pwent.c sub.c mail.c motd.c sulog.c shadow.c age.c pwpack.c rad64.c tz.c hushed.c




  in:


       SOBJS = smain.o env.o entry.o susetup.o shell.o sub.o mail.o motd.o sulog.o age.o tz.o hushed.o basename.o
       SSRCS = smain.c env.c entry.c setup.c shell.c pwent.c sub.c mail.c motd.c sulog.c shadow.c age.c pwpack.c rad64.c tz.c hushed.c basename.c

  Questi cambiamenti aggiungono il codice contenuto in basename.c che 
  contenuto in libc 4.6.27 e successive.


  4.3.  Fare copie di backup dei vostri programmi originali

  Sarebbe anche una buona idea rintracciare e fare copie di backup dei
  programmi che la Shadow Suite sostituir. Su un sistema Slackware 3.0
  questi sono:

    /bin/su

    /bin/login

    /usr/bin/passwd

    /usr/bin/newgrp

    /usr/bin/chfn

    /usr/bin/chsh

    /usr/bin/id

  Il pacchetto BETA ha una destinazione di salvataggio nel Makefile, ma
   commentata perch distribuzioni diverse mettono i programmi in posti
  diversi.

  Dovreste anche fare una copia di backup del vostro file /etc/passwd,
  ma state attenti a rinominarlo se lo mettete nella stessa directory
  cos non sovrascriverete il comando passwd.


  4.4.  Eseguire il make

   necessario che siate collegati come root per fare la maggior parte
  dell'installazione.

  Eseguite make per compilare gli eseguibili nel pacchetto:


       make all




  Potreste vedere l'avvertimento: rcsid defined but not used.  tutto a
  posto, succede solo perch l'autore sta usando un pacchetto con il
  controllo di versione.


  5.  Installazione

  5.1.  Tenete a portata di mano un disco di boot nel caso faceste
  qualche danno

  Se qualcosa va terribilmente male, sarebbe utile avere un disco di
  boot. Se avete la combinazione boot/root dalla vostra installazione,
  questa funzioner, altrimenti leggete il Bootdisk-HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Bootdisk-HOWTO.html>, che descrive
  come fare un disco di boot.





  5.2.  Rimuovere le pagine di manuale duplicate

  Dovreste anche spostare le pagine di manuale che stanno per essere
  sostituite. Anche se siete abbastanza coraggiosi da installare la
  Shadow Suite senza fare backup, comunque vorrete togliere le vecchie
  pagine di manuale. Le nuove pagine di manuale normalmente non
  sovrascriveranno quelle vecchie perch quelle vecchie sono
  probabilmente compresse.

  Potete usare la combinazione del comando man -aW e del comando locate
  per spostare le pagine man che devono essere (ri)mosse.  generalmente
  pi facile trovare quali sono le vecchie pagine man prima di eseguire
  make install.

  Se state usando la distribuzione Slackware 3.0, allora le pagine man
  che volete rimuovere sono:

    /usr/man/man1/chfn.1.gz

    /usr/man/man1/chsh.1.gz

    /usr/man/man1/id.1.gz

    /usr/man/man1/login.1.gz

    /usr/man/man1/passwd.1.gz

    /usr/man/man1/su.1.gz

    /usr/man/man5/passwd.5.gz

  Ci potrebbero anche essere delle pagine man con lo stesso nome nelle
  sottodirectory /var/man/cat[1-9] che dovrebbero anch'esse essere
  cancellate.


  5.3.  Eseguire make install

  Siete ora pronti a digitare (fatelo come root)


       make install




  Questo installer i programmi nuovi e quelli sostitutivi e sistemer i
  permessi dei file. Installer anche le pagine man.

  Questo si occupa anche di installare i file include della Shadow Suite
  nelle posizioni corrette in /usr/include/shadow.

  Usando il pacchetto BETA dovete copiare manualmente il file login.defs
  nella sottodirectory /etc ed essere sicuri che solo root possa
  cambiarlo.


       cp login.defs /etc
       chmod 700 /etc/login.defs




  Questo file  il file di configurazione per il programma di login.
  Dovreste controllare e apportare i cambiamenti opportuni a questo file
  per il vostro particolare sistema. Qui  dove potete decidere da quale
  tty root pu collegarsi e stabilire altre opzioni di strategia di
  sicurezza (come predefinire la scadenza delle password).


  5.4.  Eseguire pwconv

  Il passo successivo  eseguire pwconv. Anche questo deve essere fatto
  da root, ed  meglio che venga fatto dalla sottodirectory /etc:


       cd /etc
       /usr/sbin/pwconv




  pwconv prende il vostro file /etc/passwd e ne estrae i campi allo
  scopo di creare due file: /etc/npasswd e /etc/nshadow.

  Viene anche fornito un programma pwunconv qualora aveste bisogno di
  ricostruire il file originale /etc/passwd dalla combinazione
  /etc/passwd e /etc/shadow.


  5.5.  Rinominare npasswd e nshadow

  Ora che avete eseguito pwconv avete creato i file /etc/npasswd e
  /etc/nshadow. Questi file devono essere copiati in /etc/passwd e
  /etc/shadow. Vogliamo anche fare una copia di backup del file
  originale /etc/passwd ed essere sicuri che solo root possa leggerlo.
  Metteremo la copia di backup nella home directory di root:


       cd /etc
       cp passwd ~passwd
       chmod 600 ~passwd
       mv npasswd passwd
       mv nshadow shadow




  Dovreste anche assicurarvi che la propriet e i permessi dei file
  siano corretti. Se state per usare X-Windows, i programmi xlock e xdm
  devono poter leggere il file shadow (ma non scriverlo).

  Ci sono due modi per fare questo. Potete impostare xlock come SUID
  root (xdm di solito viene comunque eseguito da root). Oppure potete
  fare in modo che il proprietario del file shadow sia root con un
  gruppo shadow, ma prima che lo facciate, siate sicuri di avere un
  gruppo shadow (guardate in /etc/group). Nessuno degli utenti del
  sistema dovrebbe in realt stare nel gruppo shadow.


       chown root.root passwd
       chown root.shadow shadow
       chmod 0644 passwd
       chmod 0640 shadow




  Il vostro sistema ha ora il file password "oscurato". Dovreste ora
  andare su un altro terminale virtuale e verificare che possiate
  collegarvi.

  Davvero, fatelo adesso!

  Se non potete, allora c' qualcosa di sbagliato! Per ritornare a un
  stato non "oscurato", fate ci che segue:


       cd /etc
       cp ~passwd passwd
       chmod 644 passwd




  Dovreste poi ripristinare nelle loro corrette posizioni i file che
  avevate salvato prima.


  6.  Altri programmi a cui potreste dover fare un aggiornamento o
  applicare una patch

  Anche se la shadow suite contiene programmi sostitutivi per la maggior
  parte dei programmi che hanno bisogno di accedere alle password, ci
  sono alcuni altri programmi su molti sistemi che richiedono accesso
  alle password.

  Se state usando una Distribuzione Debian  (o anche se non la usate),
  potete ottenere i sorgenti Debian per i programmi che devono essere
  ricompilati da: ftp://ftp.debian.org/debian/stable/source/

  Il resto di questa sezione si occupa di come aggiornare adduser,
  wu_ftpd, ftpd, pop3d, xlock, xdm e sudo in modo che supportino la
  shadow suite.

  Guardate il capitolo ``Aggiungere il supporto Shadow ad un programma
  C'' per una discussione su come aggiungere il supporto shadow a
  qualunque altro programma che ne abbia bisogno (anche se il programma
  deve allora essere eseguito SUID root o SGID shadow per poter
  veramente accedere al file shadow).


  6.1.  Il programma adduser della Slackware

  Le distribuzioni Slackware (e forse anche altre) contengono un
  programma interattivo per aggiungere utenti chiamato /sbin/adduser.
  Una versione shadow di questo programma si pu ottenere da
  ftp://sunsite.unc.edu/pub/Linux/system/Admin/accounts/adduser.shadow-1.4.tar.gz.

  Vi incoraggio ad usare i programmi che vengono forniti con la Shadow
  Suite (useradd, usermod, e userdel) invece del programma Slackware
  adduser. Imparare ad usarli richiede poco tempo, ma vale la pena fare
  lo sforzo perch avete molto pi controllo ed essi eseguono un
  appropriato lock dei file /etc/passwd e /etc/shadow (adduser non lo
  fa).

  Guardate il capitolo su ``Mettere al lavoro la Shadow Suite'' per
  maggiori informazioni.

  Ma se dovete proprio usarlo (adduser N.d.T.), ecco cosa dovete fare:








  tar -xzvf adduser.shadow-1.4.tar.gz
  cd adduser
  make clean
  make adduser
  chmod 700 adduser
  cp adduser /sbin





  6.2.  Il Server wu_ftpd

  La maggior parte dei sistemi Linux contengono il server wu_ftpd. Se la
  vostra distribuzione non ha la shadow installata, allora il vostro
  wu_ftpd non sar compilato per la shadow. wu_ftpd viene lanciato da
  inetd/tcpd come un processo di root. Se state eseguendo un vecchio
  demone wu_ftpd, vorrete aggiornarlo comunque perch quelli pi vecchi
  hanno un baco che permetterebbe che l'account root venisse compromesso
  (per maggiori informazione guardate la Linux security home page
  <http://bach.cis.temple.edu/linux/linux-security/Linux-Security-
  FAQ/Linux-wu.ftpd-2.4-Update.html>).

  Fortunatamente, avete solo bisogno di ottenere il codice sorgente e di
  ricompilarlo con le shadow abilitate.

  Se non state usando un sistema ELF, il server wu_ftp pu essere
  trovato su Sunsite come wu-ftp-2.4-fixed.tar.gz
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/file-transfer/wu-
  ftpd-2.4-fixed.tar.gz>

  Una volta ottenuto il server, mettetelo in /usr/src, quindi digitate:


       cd /usr/src
       tar -xzvf wu-ftpd-2.4-fixed.tar.gz
       cd wu-ftpd-2.4-fixed
       cp ./src/config/config.lnx.shadow ./src/config/config.lnx




  Quindi editate ./src/makefiles/Makefile.lnx, e cambiate la riga:


       LIBES    = -lbsd -support




  in:


       LIBES    = -lbsd -support -lshadow




  Ora siete pronti ad eseguire lo script "build" e all'installazione:


       cd /usr/src/wu-ftpd-2.4-fixed
       /usr/src/wu-ftp-2.4.fixed/build lnx
       cp /usr/sbin/wu.ftpd /usr/sbin/wu.ftpd.old
       cp ./bin/ftpd /usr/sbin/wu.ftpd

  Questo usa il file di configurazione delle shadow di Linux, compila ed
  installa il server.

  Sul mio sistema Slackware 2.3 devo fare anche le seguenti cose prima
  di eseguire il build:


       cd /usr/include/netinet
       ln -s in_systm.h in_system.h
       cd -




  Sono stati riscontrati dei problemi nel compilare questo pacchetto
  sotto sistemi ELF, ma la versione Beta della prossima release funziona
  bene. Si pu trovare come wu-ftp-2.4.2-beta-10.tar.gz
  <ftp://tscnet.com/pub/linux/network/ftp/wu-ftpd-2.4.2-beta-10.tar.gz>

  Una volta ottenuto il server, mettetelo in /usr/src, quindi digitate:


       cd /usr/src
       tar -xzvf wu-ftpd-2.4.2-beta-9.tar.gz
       cd wu-ftpd-beta-9
       cd ./src/config




  Poi editate config.lnx, e cambiate:


       #undef SHADOW.PASSWORD




  in:


       #define SHADOW.PASSWORD




  Poi,


       cd ../Makefiles




  ed editate il file Makefile.lnx e cambiate:


       LIBES = -lsupport -lbsd # -lshadow




  in:



  LIBES = -lsupport -lbsd -lshadow




  Poi eseguite build ed installate:


       cd ..
       build lnx
       cp /usr/sbin/wu.ftpd /usr/sbin/wu.ftpd.old
       cp ./bin/ftpd /usr/sbin/wu.ftpd





  Notate che dovreste controllare il vostro file /etc/inetd.conf per
  essere sicuri che  qui che viene realmente realmente il vostro server
  wu.ftpd.  stato riscontrato che alcune distribuzioni mettono i server
  dei demoni in posti diversi, e quindi wu.ftpd in particolare potrebbe
  essere chiamato in qualche altro modo.


  6.3.  Ftpd standard

  Se state usando il server ftpd standard, vi consiglio di aggiornarlo
  al server wu_ftpd.  A parte il baco conosciuto discusso sopra,
  generalmente  considerato pi sicuro.

  Se insistete ad usare quello standard, o avete bisogno di supporto
  NIS, Sunsite ha ftpd-shadow-nis.tgz
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/file-transfer/ftpd-
  shadow-nis.tgz>


  6.4.  pop3d (Post Office Protocol 3)

  Se avete bisogno di supportare il Post Office Protocol 3 (POP3), avete
  bisogno di ricompilare un programma pop3d.  pop3d  normalmente
  eseguito da inetd/tcpd come root.

  Ci sono due versioni disponibili da: pop3d-1.00.4.linux.shadow.tar.gz
  <ftp://sunsite.unc.edu/pub/Linux/system/Mail/pop/pop3d-1.00.4.linux.shadow.tar.gz>
  e pop3d+shadow+elf.tar.gz
  <ftp://sunsite.unc.edu/pub/Linux/system/Mail/pop/pop3d+shadow+elf.tar.gz>

  Entrambi questi sono abbastanza semplici da installare.


  6.5.  xlock

  Se installate la Shadow Suite e poi eseguite X Windows System e
  bloccate (lock) lo schermo senza aggiornare il vostro xlock, dovrete
  usare CNTL-ALT-Fx per passare ad un'altra tty, collegarvi, e uccidere
  il processo xlock (o usare CNTL-ALT-BS per uccidere il server X).
  Fortunatamente  abbastanza facile aggiornare il vostro programma
  xlock.

  Se state usando le Versioni 3.x.x di XFree86, probabilmente state
  usando xlockmore (che  un grande screen-saver in aggiunta a lock).
  Questo pacchetto supporta le shadow con una ricompilazione. Se avete
  un xlock precedente, vi consiglio di aggiornarlo a questo.

  xlockmore-3.5.tgz  disponibile su:
  <ftp://sunsite.unc.edu/pub/Linux/X11/xutils/screensavers/xlockmore-3.7.tgz>
  Fondamentalmente, questo  quello che avete bisogno di fare:

  Ottenere il file xlockmore-3.7.tgz e metterlo in /usr/src,
  spacchettarlo:


       tar -xzvf xlockmore-3.7.tgz




  Editare il file: /usr/X11R6/lib/X11/config/linux.cf, e cambiare la
  riga:


       #define HasShadowPasswd    NO
       in
       #define HasShadowPasswd    YES




  Quindi compilate gli eseguibili:


       cd /usr/src/xlockmore
       xmkmf
       make depend
       make




  Quindi spostare tutto al suo posto e aggiornare i proprietari ed i
  permessi dei file:


       cp xlock /usr/X11R6/bin/
       cp XLock /var/X11R6/lib/app-defaults/
       chown root.shadow /usr/X11R6/bin/xlock
       chmod 2755 /usr/X11R6/bin/xlock
       chown root.shadow /etc/shadow
       chmod 640 /etc/shadow




  Il vostro xlock ora funzioner correttamente.


  6.6.  xdm

  xdm  un programma che presenta uno schermo di login per X-Windows.
  Alcuni sistemi avviano xdm quando viene detto al sistema di andare ad
  uno specifico livello di esecuzione (vedere /etc/inittab).

  Con la Shadow Suite installata, xdm avr bisogno di essere aggiornato.
  Fortunatamente  abbastanza facile aggiornare il vostro programma xdm.

  xdm.tar.gz  disponibile su:
  <ftp://sunsite.unc.edu/pub/Linux/X11/xutils/xdm.tar.gz>

  Prendete il file xdm.tar.gz e mettetelo in /usr/src, quindi per
  spacchettarlo:


  tar -xzvf xdm.tar.gz




  Editate il file: /usr/X11R6/lib/X11/config/linux.cf, e cambiate la
  riga:


       #define HasShadowPasswd    NO
       in
       #define HasShadowPasswd    YES




  Quindi compilate gli eseguibili:


       cd /usr/src/xdm
       xmkmf
       make depend
       make




  Poi mettete tutto al suo posto:


       cp xdm /usr/X11R6/bin/




  xdm  eseguito da root perci non avete bisogno di cambiare i permessi
  del file.


  6.7.  sudo

  Il programma sudo permette ad un amministratore di sistema di lasciare
  che gli utenti eseguano programmi che normalmente richiederebbero
  accesso da root. Questo  comodo perch lascia limitato l'accesso di
  amministratore all'account root stesso, mentre permette agli utenti di
  fare cose tipo il mount dei dispositivi.

  sudo necessita di leggere le password perch verifica la password
  dell'utente quando viene invocato. sudo gi viene eseguito SUID root,
  perci accedere al file /etc/shadow non  un problema.

  sudo per la shadow suite,  disponibile su:
  <ftp://sunsite.unc.edu/pub/Linux/system/Admin/sudo-1.2-shadow.tgz>

  Attenzione: Quando installate sudo il vostro file /etc/sudoers sar
  sostituito con uno predefinito, perci avrete bisogno di farne una
  copia di backup se avete aggiunto qualcosa a quello predefinito
  (potreste anche editare il Makefile e rimuovere la riga che copia il
  file predefinito in /etc).

  Il pacchetto  gi predisposto per le shadow, perci tutto quello che
   richiesto  ricompilare il pacchetto (mettetelo in /usr/src):




  cd /usr/src
  tar -xzvf sudo-1.2-shadow.tgz
  cd sudo-1.2-shadow
  make all
  make install





  6.8.  imapd (pacchetto Pine E-Mail)

  imapd  un server e-mail simile a pop3d. imapd  incluso nel pacchetto
  Pine E-mail. La documentazione inclusa nel pacchetto afferma che nei
  sistemi Linux  predefinita l'opzione di includere il supporto shadow.
  Comunque, ho trovato che questo non  vero. Inoltre, la combinazione
  script di build/Makefile su questo pacchetto rende molto difficile
  aggiungere la libreria libshadow.a in tempo di compilazione, perci
  non sono riuscito ad aggiungere il supporto shadow per imapd.

  Se qualcuno  riuscito a farlo, per favore mi mandi una e-mail, ed io
  includer qui la soluzione.


  6.9.  pppd (Point-to-Point Protocol Server)

  Il server pppd pu essere impostato in modo che usi diversi tipi di
  autenticazione: Password Authentication Protocol (PAP) e Cryptographic
  Handshake Authentication Protocol (CHAP). Il server pppd di solito
  legge le stringhe contenenti le password che usa da /etc/ppp/chap-
  secrets e/o /etc/ppp/pap-secrets.  Se state usando questo
  comportamento predefinito di pppd, non  necessario reinstallare pppd.

  pppd vi permette anche di usare il parametro login (o su linea di
  comando, o nella configurazione del file options). Se viene data
  l'opzione login, il pppd user il file /etc/passwd per il nome utente
  e la password per il PAP. Questo, ovviamente, non funzioner pi ora
  che il nostro file shadow  "oscurato". Per quanto riguarda
  pppd-1.2.1d questo richiede aggiunta di codice per il supporto shadow.

  L'esempio dato nel prossimo capitolo consiste nell'aggiunta di
  supporto shadow a pppd-1.2.1d (una vecchia versione di pppd).

  pppd-2.2.0 contiene gi il supporto shadow.


  7.  Mettere al lavoro la Shadow Suite

  Questo capitolo tratta alcune cose che dovete sapere ora che avete la
  Shadow Suite installata sul vostro sistema. Ulteriori informazioni
  sono contenute nelle pagine di manuale per ogni comando.


  7.1.  Aggiungere, Modificare e Cancellare utenti

  La Shadow Suite ha aggiunto i seguenti comandi orientati a linea di
  comando per aggiungere, modificare, e cancellare utenti. Potreste
  anche aver installato il programma adduser.


  7.1.1.  useradd

  Il comando useradd pu essere usato per aggiungere utenti al sistema.
  Potete anche invocare questo comando per cambiare le impostazioni
  predefinite.

  La prima cosa che dovreste fare  esaminare le impostazioni
  predefinite e apportare cambiamenti specifici per il vostro sistema:


       useradd -D




  ______________________________________________________________________
  GROUP=1
  HOME=/home
  INACTIVE=0
  EXPIRE=0
  SHELL=
  SKEL=/etc/skel
  ______________________________________________________________________



  Le impostazioni predefinite probabilmente non sono quelle che volete,
  perci se cominciaste ad aggiungere utenti adesso dovreste specificare
  tutte le informazioni per ciascun utente. Comunque, possiamo e
  dovremmo cambiare i valori predefiniti.

  Sul mio sistema:

    Voglio che il gruppo predefinito sia 100

    Voglio che le password scadano ogni 60 giorni

    Non voglio bloccare un account se la password  scaduta

    Voglio che la shell predefinita sia /bin/bash

     Per fare questi cambiamenti userei:


       useradd -D -g100 -e60 -f0 -s/bin/bash





  Ora eseguendo useradd -D dar:

  ______________________________________________________________________
  GROUP=100
  HOME=/home
  INACTIVE=0
  EXPIRE=60
  SHELL=/bin/bash
  SKEL=/etc/skel
  ______________________________________________________________________



  Solo nel caso voleste saperlo, questi valori predefiniti sono
  contenuti nel file /etc/default/useradd.

  Ora potete usare useradd per aggiungere utenti al sistema. Per
  esempio, per aggiungere l'utente fred, usando i valori predefiniti,
  dovreste fare come segue:



  useradd -m -c "Fred Flintstone" fred




  Questo creer la voce seguente nel file /etc/passwd:


       fred:*:505:100:Fred Flintstone:/home/fred:/bin/bash




  E la voce seguente nel file /etc/shadow:


       fred:!:0:0:60:0:0:0:0




  Verr creata la home directory di fred e il contenuto di /etc/skel
  sar copiato l grazie all'opzione -m.

  Inoltre, dato che non abbiamo specificato un UID,  stato usato il
  primo disponibile.

  L'account di fred  stato creato, ma fred non sar ancora in grado di
  collegarsi fino a quando sbloccheremo l'account. Facciamo questo
  cambiando la password.


       passwd fred





  ______________________________________________________________________
  Changing password for fred
  Enter the new password (minimum of 5 characters)
  Please use a combination of upper and lower case letters and numbers.
  New Password: *******
  Re-enter new password: *******
  ______________________________________________________________________


  Che, in italiano, sarebbe qualcosa del genere:

  ______________________________________________________________________
  Cambio la password di fred
  Inserire la nuova password (minimo 5 caratteri)
  Per favore, utilizzare una combinazione di maiuscole, minuscole e cifre.
  Nuova Password: *******
  Reinserire la nuova password: *******
  ______________________________________________________________________


  Ora /etc/shadow conterr:


       fred:J0C.WDR1amIt6:9559:0:60:0:0:0:0




  E fred potr ora collegarsi ed usare il sistema. La cosa bella di
  useradd e degli altri programmi che vengono forniti con la Shadow
  Suite  che fanno cambiamenti ai file /etc/passwd e /etc/shadow in
  modo non interrompibile. Perci , se state aggiungendo un utente, e
  contemporaneamente un altro utente sta cambiando la sua password,
  entrambe le operazioni verranno eseguite correttamente.

  Dovreste usare i comandi forniti anzich editare direttamente
  /etc/passwd e /etc/shadow. Se voi editaste il file /etc/shadow, e un
  utente cambiasse la sua password mentre voi state editando, e poi voi
  salvaste il file che stavate editando, il cambiamento della password
  dell'utente andrebbe perso.

  Qui c' un piccolo script interattivo che aggiunge utenti usando
  useradd e passwd:



















































  ______________________________________________________________________
  #!/bin/bash
  #
  # /sbin/newuser - Uno script per aggiungere utenti al sistema usando i
  #                 comandi useradd e passwd della Shadow Suite.
  #
  # Scritto da Mike Jackson <mhjack@tscnet.com> come esempio per il
  # Linux Shadow Password Howto. Viene esplicitamente concesso il
  # permesso di usarlo e modificarlo.
  #
  # Questo potrebbe essere modificato per mostrare i valori predefiniti
  # e permettere modifiche simili al programma Slackware
  # adduser. Potrebbe essere modificato per non permettere voci stupide
  # (i.e. miglior controllo degli errori).
  #
  ##
  # Valori predefiniti per il comando useradd
  ##
  GROUP=100        # Gruppo predefinito
  HOME=/home       # Collocazione della home directory (/home/nomeutente)
  SKEL=/etc/skel   # Struttura tipica di una nuova directory home.
  INACTIVE=0       # Giorni tra la scadenza della password e la
                   # disabilitazione dell'account (0 = mai)
  EXPIRE=60        # Durata della password in giorni
  SHELL=/bin/bash  # Shell predefinita (intero percorso)
  ##
  #  Valori predefiniti per il comando passwd
  ##
  PASSMIN=0        # Giorni tra i cambiamenti della password
  PASSWARN=14      # Giorni prima che scada la password in cui viene
                   # dato un avviso
  ##
  #  Assicurarsi che sia root ad eseguire lo script.
  ##
  WHOAMI=`/usr/bin/whoami`
  if [ $WHOAMI != "root" ]; then
          echo "Devi essere root per aggiungere nuovi utenti!"
          exit 1
  fi
  ##
  #  Chiedere il nome utente e il nome completo.
  ##
  echo ""
  echo -n "Nome utente: "
  read USERNAME

  echo -n "Nome completo: "
  read FULLNAME

  #
  echo "Aggiunta dell'utente: $USERNAME."
  #
  # Notate che le "" intorno a $FULLNAME sono richieste perch
  # questo campo quasi sempre conterr almeno uno spazio, e senza
  # le " il comando useradd, quando raggiunge il carattere SPAZIO,
  # penserebbe che vi stiate spostando sul prossimo parametro.
  #
  /usr/sbin/useradd -c"$FULLNAME" -d$HOME/$USERNAME -e$EXPIRE \
          -f$INACTIVE -g$GROUP -m -k$SKEL -s$SHELL $USERNAME

  ##
  #  Impostare i valori predefiniti per le password
  ##
  /bin/passwd -n $PASSMIN -w $PASSWARN $USERNAME >/dev/null 2>&1
  ##
  #  Lascia che il comando passwd chieda la password (due volte)
  ##
  /bin/passwd $USERNAME

  ##
  #  Mostra ci che  stato fatto.
  ##
  echo ""
  echo "Voce di /etc/passwd:"
  echo -n "   "
  grep "$USERNAME:" /etc/passwd
  echo "Voce di /etc/shadow:"
  echo -n "   "
  grep "$USERNAME:" /etc/shadow
  echo "Riassunto dei risultati del comando passwd:"
  echo -n "   "
  passwd -S $USERNAME

  echo ""
  ______________________________________________________________________



  Usare uno script per aggiungere utenti  davvero molto pi preferibile
  che editare direttamente i file /etc/passwd o /etc/shadow o usare un
  programma come il programma Slackware adduser. Sentitevi liberi di
  usare e modificare questo script per il vostro particolare sistema.

  Per maggiori informazioni su useradd vedere la pagina di manuale in
  linea.


  7.1.2.  usermod

  Il programma usermod viene usato per modificare le informazioni su un
  utente.  Le opzioni sono simili a quelle del programma useradd.

  Diciamo che volete cambiare la shell di fred, fareste ci che segue:


       usermod -s /bin/tcsh fred




  Ora la voce di frednel file /etc/passwd sarebbe diventata questa:


       fred:*:505:100:Fred Flintstone:/home/fred:/bin/tcsh




  Facciamo in modo che l'account di fred scada il 09/15/97:


       usermod -e 09/15/97 fred




  Ora la voce di fred in /etc/shadow diventa:


       fred:J0C.WDR1amIt6:9559:0:60:0:0:10119:0


  Per maggiori informazioni sul comando usermod vedere la pagina di
  manuale in linea.


  7.1.3.  userdel

  userdel fa proprio quello che vi aspettate, cancella l'account
  dell'utente.  Semplicemente usate:


       userdel -r nomeutente




  Il -r fa s che tutti i file nella home directory dell'utente vengano
  cancellati insieme alla home directory stessa. I file collocati in
  altri file system dovranno essere cercati e cancellati manualmente.

  Se volete semplicemente bloccare l'account invece che cancellarlo,
  usate piuttosto il comando passwd.


  7.2.  Il comando passwd e l'invecchiamento delle password

  Il comando passwd ha l'ovvio uso di cambiare le password.  Inoltre,
  viene usato dall'utente root per:

    Bloccare (lock) e sbloccare (unlock) gli account (-l e -u)

    Impostare il massimo numero di giorni per cui una password rimane
     valida (-x)

    Impostare il minimo numero di giorni tra cambiamenti della password
     (-n)

    Impostare il numero di giorni di avviso che una password sta per
     scadere (-w)

    Impostare il numero di giorni dopo la scadenza della password prima
     che l'account venga bloccato (-i)

    Permettere la visualizzazione delle informazioni di account in un
     formato pi chiaro -S)

  Per esempio, diamo ancora un'occhiata a fred


       passwd -S fred
       fred P 03/04/96 0 60 0 0




  Questo significa che la password di fred  valida, che  stata cambi
  ata l'ultima volta il 03/04/96, che pu essere cambiata in qualunque
  momento, scade dopo 60 giorni, fred non sar avvertito e l'account non
  verr disabilitato quando la password scadr.

  Questo semplicemente significa che se fred si collega dopo che la
  password scade, al collegamento gli verr richiesta una nuova
  password.

  Se decidiamo che vogliamo avvertire fred 14 giorni prima che la sua
  password scada e inattivare il suo account 14 giorni dopo che lui la
  lascia scadere, dovremo fare quanto segue:
       passwd -w14 -i14 fred




  Ora fred  diventato:


       fred P 03/04/96 0 60 14 14




  Per ulteriori informazioni sul comando passwd vedere le pagine di man
  uale in linea.


  7.3.  Il file login.defs

  Il file /etc/login  il file di configurazione per il programma login
  e anche per l'intera Shadow Suite.

  /etc/login contiene impostazioni che riguardano dall'aspetto del
  prompt fino alla scadenza predefinita quando un utente cambia la sua
  password.

  Il file /etc/login.defs  abbastanza ben documentato dai commenti
  contenuti al suo interno. Comunque, ci sono alcune cose da notare:

    Contiene alcuni flag che possono essere attivati o disattivati che
     determinano il numero di collegamenti che vengono effettuati.

    Contiene puntatori ad altri file di configurazione.

    Contiene valori predefiniti per cose tipo l'invecchiamento delle
     password.

  Dalla lista sopra potete vedere che questo  un file abbastanza
  importante, e dovreste essere sicuri che sia presente, e che le
  impostazioni siano quelle che desiderate per il vostro sistema.


  7.4.  Password di gruppo

  Il file /etc/groups pu contenere password che permettono ad un utente
  di diventare membro di un particolare gruppo. Questa funzione 
  abilitata se definite la costante SHADOWGRP nel file /usr/src/shadow-
  AAMMGG/config.h.

  Se definite questa costante e poi compilate, dovete creare un file
  /etc/gshadow che contenga le password del gruppo e le informazioni di
  amministrazione del gruppo.

  Quando avete creato /etc/shadow, avete usato un programma chiamato
  pwconv, non c' nessun programma equivalente per creare il file
  /etc/gshadow, ma in realt non importa, se ne occupa lui stesso.

  Per creare il file iniziale /etc/gshadow fate come segue:


       touch /etc/gshadow
       chown root.root /etc/gshadow
       chmod 700 /etc/gshadow



  Una volta che create nuovi gruppi, questi verranno aggiunti ai file
  /etc/group e /etc/gshadow. Se voi modificate un gruppo aggiungendo o
  togliendo utenti o cambiando la password del gruppo, il file
  /etc/gshadow verr modificato.

  I programmi groups, groupadd, groupmod, e groupdel sono forniti come
  parte della Shadow Suite per modificare i gruppi.

  Il formato del file /etc/group  quello che segue:


       nomegruppo:!:GID:membro,membro,...




  Dove:

     nomegruppo
        Il nome del gruppo

     !  Il campo che normalmente contiene la password, che ora  per
        situata nel file /etc/gshadow

     GID
        L'identificativo numerico del gruppo

     membro
        Elenco dei membri del gruppo

  Il formato del file /etc/gshadow  quello che segue:


       nomegruppo:password:ammin,ammin,...:membro,membro,...




  Dove:

     nomegruppo
        Il nome del gruppo

     password
        La password del gruppo codificata

     ammin
        Elenco degli amministratori del gruppo

     membro
        Elenco dei membri del gruppo

  Il comando gpasswd  usato solo per aggiungere o togliere
  amministratori e membri a o da un gruppo. Solo root o qualcuno
  appartenente all'elenco degli amministratori pu aggiungere o togliere
  membri del gruppo.

  La password del gruppo pu essere modificata con il comando passwd da
  root o chiunque appartenga alla lista degli amministratori del gruppo.

  Nonostante il fatto che attualmente non ci sia una pagina di manuale
  per gpasswd, digitando gpasswd senza alcun parametro si ottiene un
  elenco di opzioni.  abbastanza semplice capire come funziona il tutto
  una volta che avete capito i formati dei file e i concetti.


  7.5.  Programmi per il controllo della consistenza



  7.5.1.  pwck

  Il programma pwck viene fornito per offrire un controllo di
  consistenza sui file /etc/passwd e /etc/shadow. Esso controller ogni
  nome utente e verificher che abbia quanto segue:

    il corretto numero di campi

    un nome utente univoco

    un valido identificatore di utente e di gruppo

    un valido gruppo primario

    una valida home directory

    una valida shell di login

  Dar anche un avvertimento per ogni account privo di password.

   una buona idea eseguire pwck dopo aver installato la Shadow Suite. 
  anche una buona idea eseguirlo periodicamente, magari una volta alla
  settimana o al mese. Se usate l'opzione -r, potete usare cron per
  eseguirlo con una cadenza regolare e riceverne per posta il rapporto.


  7.5.2.  grpck

  grpck  il programma per il controllo della consistenza per i file
  /etc/group and /etc/gshadow. Esso esegue i seguenti controlli:

    il corretto numero di campi

    un nome del gruppo univoco

    elenco valido di membri ed amministratori

  Dispone anche dell'opzione -r per rapporti automatizzati.


  7.6.  Password di dial-up

  Le password di dial-up sono un altro strumento opzionale di difesa per
  i sistemi che permettono l'accesso tramite una linea telefonica
  commutata. Se avete un sistema che permette a molte persone di
  connettersi localmente o tramite una rete, ma volete porre dei limiti
  su chi possa accedere per telefono e connettersi, allora le password
  di dial-up fanno al caso vostro. Per abilitare le password di dial-up,
  dovete editare il file /etc/login.defs ed assicurarvi che
  DIALUPS_CHECK_ENAB sia impostato a yes.

  Due sono i file che contengono informazioni di dial-up: /etc/dialups
  che contiene le tty (una per riga, senza la parte iniziale /dev). Se
  una tty compare nella lista, allora vengono effettuati i controlli di
  dial-up.

  Il secondo file  /etc/d_passwd. Questo file contiene il percorso
  completo di una shell, seguito da una password opzionale.

  Se un utente si collega attraverso una tty elencata in /etc/dialups, e
  la sua shell  presente nel file /etc/d_passwd gli sar permesso
  l'accesso solo se fornir la corretta password.
  Un altro utile scopo per usare password di dial-up potrebbe essere
  quello di impostare una linea che permetta solo un certo tipo di
  connessione (come una connessione PPP o UUCP).  Se un utente cerca di
  ottenere un altro tipo di connessione (i.e. un elenco di shell), deve
  conoscere una password per usare la linea.

  Prima che possiate usare la caratteristica del dial-up, dovete creare
  i file.

  Viene fornito il comando dpasswd per assegnare password per le shell
  nel file /etc/d_passwd. Vedere la pagina di manuale per ulteriori
  informazioni.


  8.  Aggiungere il supporto shadow ad un programma C

  Aggiungere il supporto shadow ad un programma  in realt abbastanza
  semplice. L'unico problema  che il programma deve essere eseguito da
  root (o SUID root) in modo che il programma possa accedere al file
  /etc/shadow.

  Questo presenta un grande problema: occorre seguire una condotta di
  programmazione molto attenta quando si creano programmi SUID. Per
  esempio, se un programma ha un comando che invoca una shell, questa
  non deve essere eseguita con i diritti di root anche se il programma 
  SUID root.

  Per aggiungere il supporto shadow ad un programma in modo che possa
  controllare le password, ma per il resto non necessita di essere
  eseguito da root,  molto pi sicuro eseguire il programma SGID
  shadow. Il programma xlock ne  un esempio.

  Nell'esempio fatto prima, pppd-1.2.1d gi viene eseguito SUID root,
  perci aggiungere il supporto shadow non dovrebbe rendere il programma
  pi vulnerabile.


  8.1.  File di intestazione (header)

  I file di intestazione (header) dovrebbero stare in
  /usr/include/shadow. Ci dovrebbe anche essere un
  /usr/include/shadow.h, ma sarebbe un link simbolico a
  /usr/include/shadow/shadow.h.

  Per aggiungere il supporto shadow ad un programma, dovete includere i
  file di intestazione:

  #include <shadow/shadow.h>
  #include <shadow/pwauth.h>



  Potrebbe essere una buona idea usare le direttive del compilatore in
  modo da condizionare la compilazione del codice shadow (io lo faccio
  nell'esempio che segue).


  8.2.  La libreria libshadow.a

  Quando avete installato la Shadow Suite il file libshadow.a  stato
  creato ed installato in /usr/lib.

  Quando si compila il supporto shadow in un programma, bisogna dire al
  linker di includere la libreria libshadow.a.


  Questo viene fatto da:


       gcc program.c -o program -lshadow




  Comunque, come vedremo nell'esempio che segue, la maggior parte dei
  programmi di grandi dimensioni usa un Makefile, che di solito ha una
  variabile chiamata LIBS=... che noi modificheremo.


  8.3.  La struttura Shadow

  La libreria libshadow.a usa una struttura chiamata  spwd per le
  informazioni che preleva dal file /etc/shadow. Questa  la definizione
  della struttura spwd dal file di intestazione
  /usr/include/shadow/shadow.h:

  ______________________________________________________________________
  struct spwd
  {
    char *sp_namp;                /* nome di login  */
    char *sp_pwdp;                /* password codificata */
    sptime sp_lstchg;             /* data dell'ultimo cambiamento */
    sptime sp_min;                /* minimo numero di giorni tra cambiamenti */
    sptime sp_max;                /* massimo numero di giorni tra cambiamenti */
    sptime sp_warn;               /* numero di giorni di avvertimento prima
                                     che scada la password */
    sptime sp_inact;              /* numero di giorni dopo la scadenza della
                                     password prima che l'account venga
                                     disabilitato */
    sptime sp_expire;             /* giorni dal 1/1/70 fino alla scadenza
                                     dell'account */
    unsigned long sp_flag;        /* riservato per uso futuro */
  };
  ______________________________________________________________________



  La Shadow Suite pu mettere altre cose nel campo sp_pwdp proprio a
  fianco della password codificata. Il campo della password potrebbe
  contenere:


       nomeutente:Npge08pfz4wuk;@/sbin/extra:9479:0:10000::::




  Questo significa che, oltre alla password, dovrebbe essere chiamato il
  programma /sbin/extra per ulteriori autenticazioni. Il programma
  chiamato ricever il nome utente e un'opzione che indica perch viene
  chiamato. Vedere il file /usr/include/shadow/pwauth.h e il codice
  sorgente di pwauth.c per ulteriori informazioni.

  Ci che voglio dire  che dovremmo usare la funzione pwauth per
  eseguire la vera autenticazione, dato che si occuper anche
  dell'autenticazione secondaria. L'esempio sotto fa proprio questo.

  L'autore della Shadow Suite fa presente che poich molti dei programmi
  esistenti non la usano potrebbe essere rimossa o cambiata dalle future
  versioni della Shadow Suite.


  8.4.  Funzioni Shadow

  Il file shadow.h contiene anche i prototipi delle funzioni contenute
  nella libreria libshadow.a:

  ______________________________________________________________________
  extern void setspent __P ((void));
  extern void endspent __P ((void));
  extern struct spwd *sgetspent __P ((__const char *__string));
  extern struct spwd *fgetspent __P ((FILE *__fp));
  extern struct spwd *getspent __P ((void));
  extern struct spwd *getspnam __P ((__const char *__name));
  extern int putspent __P ((__const struct spwd *__sp, FILE *__fp));
  ______________________________________________________________________



  La funzione che useremo nell'esempio : getspnam che ritorna una
  struttura spwd per il nome passato per argomento.


  8.5.  Esempio

  Questo  un esempio di aggiunta del supporto shadow ad un programma
  che ne ha bisogno, ma non lo possiede.

  Questo esempio usa il Point-to-Point Protocol Server (pppd-1.2.1d),
  che ha una modalit in cui esegue l'autenticazione PAP usando i nomi e
  le password degli utenti dal file /etc/passwd anzich dai file PAP o
  CHAP.  Non dovreste aver bisogno di aggiungere questo codice a
  pppd-2.2.0 perch c' gi.

  Questa caratteristica del pppd probabilmente non  molto usata, ma se
  avete installato la Shadow Suite, non funzioner comunque perch le
  password non si trovano pi in /etc/passwd.

  Il codice per l'autenticazione degli utenti sotto pppd-1.2.1d si trova
  nel file /usr/src/pppd-1.2.1d/pppd/auth.c.

  Il seguente codice deve essere aggiunto all'inizio del file dove si
  trovano tutte le altre direttive #include. Abbiamo racchiuso gli
  #include tra direttive condizionali (i.e. vengono presi in
  considerazione solo se stiamo compilando per il supporto shadow).


  ______________________________________________________________________
  #ifdef HAS_SHADOW
  #include <shadow.h>
  #include <shadow/pwauth.h>
  #endif
  ______________________________________________________________________



  Il passo successivo consiste nel modificare il codice vero e proprio.
  Stiamo ancora apportando cambiamenti al file auth.c.

  Funzione auth.c prima delle modifiche:








  ______________________________________________________________________
  /*
   * login - Controlla il nome e la password dell'utente nel database delle
   * password di sistema, e permette il login se l'utente  OK.
   *
   * restituisce:
   *      UPAP_AUTHNAK: Login fallito.
   *      UPAP_AUTHACK: Login riuscito.
   * In entrambi i casi, msg punta al messaggio appropriato.
   */
  static int
  login(user, passwd, msg, msglen)
      char *user;
      char *passwd;
      char **msg;
      int *msglen;
  {
      struct passwd *pw;
      char *epasswd;
      char *tty;

      if ((pw = getpwnam(user)) == NULL) {
          return (UPAP_AUTHNAK);
      }
       /*
       * XXX Se non c' nessuna password, li lascia collegare senza.
       */
      if (pw->pw_passwd == '\0') {
          return (UPAP_AUTHACK);
      }

      epasswd = crypt(passwd, pw->pw_passwd);
      if (strcmp(epasswd, pw->pw_passwd)) {
          return (UPAP_AUTHNAK);
      }

      syslog(LOG_INFO, "user %s logged in", user);

      /*
       * Scrive una voce wtmp per questo utente.
       */
      tty = strrchr(devname, '/');
      if (tty == NULL)
          tty = devname;
      else
          tty++;
      logwtmp(tty, user, "");         /* Aggiunge una voce di login al wtmp */
      logged_in = TRUE;

      return (UPAP_AUTHACK);
  }
  ______________________________________________________________________



  La password dell'utente viene messa in pw->pw_passwd, cos tutto
  quello che dobbiamo fare in realt  aggiungere la funzione getspnam.
  Questa metter la password in spwd->sp_pwdp.

  Aggiungeremo la funzione pwauth per eseguire l'autenticazione vera e
  propria.  Questa eseguir automaticamente l'autenticazione secondaria
  se il file shadow  impostato per farlo.

  Funzione auth.c dopo le modifiche per il supporto shadow:


  ______________________________________________________________________
  /*
   * login - Controlla il nome e la password dell'utente nel database delle
   * password di sistema, e permette il login se l'utente  OK.
   *
   * Questa funzione  stata modificata in modo da supportare la
   * Linux Shadow Password Suite se USE_SHADOW  definito.
   *
   * restituisce:
   *      UPAP_AUTHNAK: Login fallito.
   *      UPAP_AUTHACK: Login riuscito.
   * In entrambi i casi, msg punta al messaggio appropriato.
   */
  static int
  login(user, passwd, msg, msglen)
      char *user;
      char *passwd;
      char **msg;
      int *msglen;
  {
      struct passwd *pw;
      char *epasswd;
      char *tty;

  #ifdef USE_SHADOW
      struct spwd *spwd;
      struct spwd *getspnam();
  #endif

      if ((pw = getpwnam(user)) == NULL) {
          return (UPAP_AUTHNAK);
      }

  #ifdef USE_SHADOW
          spwd = getspnam(user);
          if (spwd)
                  pw->pw_passwd = spwd->sp-pwdp;
  #endif

       /*
       * XXX Se non c' nessuna password, NON li lascia collegare senza.
       */
      if (pw->pw_passwd == '\0') {
          return (UPAP_AUTHNAK);
      }
  #ifdef HAS_SHADOW
      if ((pw->pw_passwd && pw->pw_passwd[0] == '@'
           && pw_auth (pw->pw_passwd+1, pw->pw_name, PW_LOGIN, NULL))
          || !valid (passwd, pw)) {
          return (UPAP_AUTHNAK);
      }
  #else
      epasswd = crypt(passwd, pw->pw_passwd);
      if (strcmp(epasswd, pw->pw_passwd)) {
          return (UPAP_AUTHNAK);
      }
  #endif

      syslog(LOG_INFO, "user %s logged in", user);

      /*
       * Scrive una voce wtmp per questo utente.
       */
      tty = strrchr(devname, '/');
      if (tty == NULL)
          tty = devname;
      else
          tty++;
      logwtmp(tty, user, "");        /* Aggiunge una voce di login al wtmp */
      logged_in = TRUE;

      return (UPAP_AUTHACK);
  }
  ______________________________________________________________________



  Un attento esame riveler che abbiamo fatto un'altra modifica. La
  versione originale permetteva l'accesso (restituiva UPAP_AUTHACK) se
  non c'era NESSUNA password nel file /etc/passwd. Questo non  una
  buona cosa, perch un uso comune di questa caratteristica di login 
  quello di usare un account che permetta l'accesso al processo ppp e
  quindi confrontare il nome utente e la password forniti da PAP con il
  nome utente nel file /etc/passwd e la password nel file /etc/shadow.

  Perci se abbiamo impostato la versione originale in modo da eseguire,
  al posto della shell per un utente, ad esempio ppp, allora chiunque
  potrebbe ottenere una connessione ppp impostando la sua PAP con utente
  ppp e senza password.

  Abbiamo risolto questo anche restituendo UPAP_AUTHNAK invece che
  UPAP_AUTHACK nel caso in cui il campo password fosse vuoto.

   abbastanza interessante il fatto che pppd-2.2.0 abbia lo stesso
  problema.

  Poi abbiamo bisogno di modificare il Makefile in modo che avvengano
  due cose: USE_SHADOW deve essere definita, e libshadow.a deve essere
  aggiunta al processo di link.

  Editate il Makefile, e aggiungete:


       LIBS = -lshadow




  Quindi troviamo la riga:


       COMPILE_FLAGS = -I.. -D_linux_=1 -DGIDSET_TYPE=gid_t




  E la cambiamo in:


       COMPILE_FLAGS = -I.. -D_linux_=1 -DGIDSET_TYPE=gid_t -DUSE_SHADOW




  Ora eseguite il make ed installate.


  9.  Domande poste frequentemente (FAQ)

  D: Ero abituato a controllare con quale tty root potesse collegarsi
  usando il file /etc/securettys, ma sembra non funzionare pi, cosa 
  successo?
  R: Il file /etc/securettys non fa assolutamente nulla ore che la
  Shadow Suite  installata. Le tty che root pu usare sono ora situate
  nel file di configurazione di login /etc/login.defs. La voce in questo
  file potrebbe puntare ad un altro file.


  D: Ho installato la Shadow Suite, ma ora non posso collegarmi, cosa ho
  dimenticato?

  R: Probabilmente hai installato i programmi Shadow, ma non hai
  eseguito pwconv o hai dimenticato di copiare /etc/npasswd in
  /etc/passwd e /etc/nshadow in /etc/shadow.  Inoltre, potresti aver
  bisogno di copiare login.defs in /etc.


  D: Nella sezione su xlock, si dice di cambiare il gruppo proprietario
  del file /etc/shadow e di farlo diventare shadow. Non ho un gruppo
  shadow, cosa faccio?

  R: Puoi aggiungerne uno. Semplicemente edita il file /etc/group, e
  inserisci una riga per il gruppo shadow. Devi assicurarti che il
  numero del gruppo non sia usato da un altro gruppo, e devi inserirlo
  prima della voce nogroup. Oppure puoi semplicemente impostare SUID
  root xlock.


  D: Esiste una mailing list per la Linux Shadow Password Suite?

  R: S, ma  per lo sviluppo e il beta testing della prossima Shadow
  Suite per Linux.  Puoi iscriverti alla lista mandando una e-mail a:
  shadow-list-request@neptune.cin.net avente per subject: subscribe.  La
  lista si occupa in realt delle release Linux shadow-AAMMGG.  Dovresti
  iscriverti se vuoi essere coinvolto in ulteriori sviluppi o se
  installi la Suite sul tuo sistema e vuoi avere informazioni sulle pi
  recenti release.


  D: Ho installato la Shadow Suite, ma quando uso il comando userdel,
  ottengo: "userdel: cannot open shadow group file", (in italiano:
  "userdel: non posso aprire il file shadow group"); cosa ho sbagliato?

  R: Hai compilato la Shadow Suite con l'opzione SHADOWGRP abilitata, ma
  non hai un file /etc/gshadow. Devi o editare il file config.h e
  ricompilare, oppure creare un file /etc/group. Vedere la sezione sui
  gruppi shadow.


  D: Ho installato la Shadow Suite ma ho di nuovo le password codificate
  nel mio file /etc/passwd, cosa c' che non va?

  R: O hai abilitato l'opzione AUTOSHADOW nel file Shadow config.h,
  oppure il tuo libc  stato compilato con l'opzione SAHDOW_COMPAT. Devi
  capire qual  il problema, e ricompilare.


  10.  Messaggio di copyright

  The Linux Shadow Password HOWTO is Copyright (c) 1996 Michael H.
  Jackson.

  Permission is granted to make and distribute verbatim copies of this
  document provided the copyright notice and this permission notice are
  preserved on all copies.

  Permission is granted to copy and distribute modified versions of this
  document under the conditions for verbatim copies above, provided a
  notice clearly stating that the document is a modified version is also
  included in the modified document.

  Permission is granted to copy and distribute translations of this
  document into another language, under the conditions specified above
  for modified versions.

  Permission is granted to convert this document into another media
  under the conditions specified above for modified versions provided
  the requirement to acknowledge the source document is fulfilled by
  inclusion of an obvious reference to the source document in the new
  media. Where there is any doubt as to what defines 'obvious' the
  copyright owner reserves the right to decide.

  Ovvero (ni noti che l'unica licenza valida  quella in lingua
  originale):

  Il Linux Shadow Password HOWTO  Copyright (c) 1996 di Michael H.
  Jackson.

   concesso il permesso di fare e distribuire copie testuali di questo
  documento, a patto che la nota sul copyright e questa nota di permesso
  siano mantenute su tutte le copie.

   concesso il permesso di copiare e distribuire versioni modificate di
  questo documento sotto le condizioni delle copie testuali dette sopra,
  a condizione che venga inclusa nel documento modificato una nota che
  dica chiaramente che il documento  una versione modificata.

   concesso il permesso si copiare e distribuire traduzioni di questo
  documento in un'altra lingua, sotto le condizioni specificate sopra
  per le versioni modificate.

   concesso il permesso di convertire questo documento in altri mezzi
  sotto le condizioni specificate sopra per le versioni  modificate, a
  condizione che il nuovo mezzo contenga il riconoscimento del documento
  sorgente tramite un ovvio riferimento al documento sorgente stesso.
  Dove ci sia un qualunque dubbio sul significato di 'ovvio' il
  proprietario del copyright si riserva il diritto di decidere.


  11.  Varie e Riconoscimenti

  Il codice di esempio per auth.c  tratto da pppd-1.2.1d e ppp-2.1.0e,
  Copyright (c) 1993 The Australian National University e Copyright (c)
  1989 Carnegie Mellon University.

  Grazie a Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl> per
  aver scritto e mantenuto la Shadow Suite per Linux, e per la sua
  revisione e i suoi commenti a questo documento.

  Grazie a Ron Tidd <rtidd@tscnet.com> per la sua utile revisione e il
  suo collaudo.

  Grazie a tutti coloro che mi hanno mandato feedback per contribuire a
  migliorare questo documento.

  Per favore, se avete commenti o suggerimenti, mandatemeli per posta.

  saluti

  Michael H. Jackson <mhjack@tscnet.com>




  Building and Installing Software Packages for Linux
  Mendel Cooper <mailto:thegrendel@theriver.com> ---
  http://personal.riverusers.com/~thegrendel/
  v1.91, 27 luglio 1999

  - Compilazione ed installazione di pacchetti software per Linux -
  Questa  un'ampia guida per compilare ed installare "generiche" dis
  tribuzioni di software UNIX sotto Linux. Vengono inoltre discussi i
  formati binari preimpacchettati "rpm" e "deb".  Traduzione di Fabrizio
  Stefani, 23 settembre 1999.

  1.  Introduzione

  Parecchi pacchetti software per i vari dialetti di UNIX e Linux sono
  dati come archivi compressi di file sorgenti. Lo stesso pacchetto pu
  essere "compilato" per girare su differenti macchine fissate, e ci
  risparmia l'autore del software dal dover produrre versioni multiple.
  Una singola versione di un pacchetto software pu cos finire col
  girare, in varie incarnazioni, su una macchina Intel, un DEC Alpha,
  una workstation RISC, o anche un mainframe. Sfortunatamente, questo
  scarica la responsabilit della effettiva "compilazione" ed
  installazione del software sull'utente finale, l'amministratore di
  sistema de facto, il tizio seduto alla tastiera -- voi. Fatevi
  coraggio, comunque, il processo non  poi cos terrificante o
  misterioso come sembra, come dimostrer questa guida.




  2.  Spacchettare i file

  Avete scaricato o vi siete procurati in altro modo un pacchetto
  software.  Molto probabilmente  archiviato (in formato tar) e
  compresso (in formato gzip), e quindi il nome del file terminer con
  .tar.gz o .tgz (N.d.T: Gli archivi tar compressi, in inglese, vengono
  colloquialmente detti "tarball", d'ora in poi ci riferiremo ad essi
  come "pacchetti tar"). Innanzi tutto copiatelo in una directory di
  lavoro. Poi decomprimetelo (con gunzip) e spacchettatelo (con tar). Il
  comando appropriato per farlo  tar xzvf nomefile, dove nomefile  il
  nome del file, ovviamente. Il processo di dearchiviazione generalmente
  installer i file appropriati nelle sottodirectory che avr creato.
  Notate che se il nome del pacchetto ha suffisso .Z, la procedura su
  esposta sar ancora buona, sebbene funzioni anche eseguire uncompress,
  seguito da tar xvf. Potete vedere un'anteprima di tale processo con
  tar tzvf nomefile, che elenca i file contenuti nell'archivio senza in
  effetti estrarli.

  Il suddetto metodo per spacchettare i pacchetti tar  equivalente ad
  uno o l'altro dei seguenti:

    gzip -cd nomefile | tar xvf -

    gunzip -c nomefile | tar xvf -

     (Il '-' forza il comando tar a prendere il suo input dallo stdin.)

  I file sorgenti nel nuovo formato bzip2 (.bz2) possono essere estratti
  con un bzip2 -cd nomefile | tar xvf -, o, pi semplicemente, con un
  tar xyvf nomefile, sempre che tar sia stato opportunamente corretto
  con l'apposita patch (riferirsi al Bzip2.HOWTO ``(tradotto)'' per i
  dettagli).  La distribuzione Linux di Debian usa una diversa patch per
  tar, scritta da Hiroshi Takekawa, che, in quella particolare versione
  di tar, usa le opzioni -I, --bzip2, --bunzip2.

  [Grazie tante a R. Brock Lynn e Fabrizio Stefani per le correzioni e
  gli aggiornamenti sull'informazione sopra citata]
  A volte i file archiviati devono essere estratti, usando tar, ed
  installati dalla home directory dell'utente, o magari in una
  cert'altra directory, tipo /, /usr/src, o /opt, come specificato nelle
  informazioni di configurazione del pacchetto. Qualora si riceva un
  messaggio di errore tentando l'estrazione dall'archivio, questa
  potrebbe esserne la ragione. Leggete i file di documentazione del
  pacchetto, specialmente i file README e/o Install, se presenti, ed
  editate i file di configurazione e/o i Makefile come necessario,
  consistentemente con le istruzioni di installazione. Osservate che di
  solito non si dovrebbe modificare il file Imake, poich ci potrebbe
  avere conseguenze impreviste. La maggior parte dei pacchetti
  permettono di automatizzare questo processo eseguendo make install per
  mettere i binari nelle appropriate aree di sistema.


    Potreste incontrare file shar, o archivi shell, specialmente sui
     newsgroup riguardanti il codice sorgente in Internet.  Questi
     vengono ancora usati perch sono in formato testo, e ci permette
     ai moderatori dei newsgroup di consultarli e respingere quelli
     inadatti. Essi possono essere spacchettati col comando unshar
     nomefile.shar.  Altrimenti la procedura per trattarli  la stessa
     dei pacchetti tar.



    Alcuni archivi sorgente sono stati manipolati usando utilit di
     compressione non standard DOS, Mac o anche Amiga, tipo zip, arc,
     lha, arj, zoo, rar,e shk. Fortunatamente, Sunsite
     <http://metalab.unc.edu> e altri posti hanno delle utilit di
     decompressione per Linux che possono trattare molti o tutti tali
     formati.

  Occasionalmente, potrebbe essere necessario aggiungere delle
  correzioni per dei bug o aggiornare i file sorgenti estratti da un
  archivio usando un file patch o diff che elenca le modifiche. I file
  di documentazione e/o README vi informeranno se ci  necessario. La
  normale sintassi per invocare la potente utilit di patch di Larry
  Wall  patch < patchfile.

  Ora potete procedere alla fase di compilazione del processo.





  3.  Usare make

  Il Makefile  la chiave del processo di compilazione. Nella sua forma
  pi semplice, un Makefile  uno script per la compilazione, o
  building, dei "binari", le parti eseguibili di un pacchetto.  Il
  Makefile pu anche fornire un mezzo per aggiornare un pacchetto
  software senza dover ricompilare ogni singolo file sorgente in esso,
  ma questa  un'altra storia (o un altro articolo).

  Ad un certo punto, il Makefile lancia cc o gcc. Questo in realt  un
  preprocessore, un compilatore C (o C++), ed un linker, invocati in
  quell'ordine. Questo processo converte il sorgente nei binari, i veri
  eseguibili.

  L'invocazione di make di solito richiede solo di battere make. Ci,
  generalmente, serve a compilare tutti i file eseguibili necessari per
  il pacchetto in questione. Tuttavia, make pu svolgere anche altri
  compiti, come installare i file nelle loro directory appropriate (make
  install) e rimuovere i file oggetto stantii (make clean). L'esecuzione
  di make -n permette di vedere un'anteprima del processo di
  compilazione, poich stampa tutti i comandi che sarebbero attivati da
  un make, ma senza in effetti eseguirli.


  Solo i software pi semplici usano un Makefile generico. Le
  installazioni pi complesse richiedono un Makefile su misura secondo
  la posizione delle librerie, dei file include e delle risorse sulla
  vostra specifica macchina. Questo, in particolare,  il caso che si ha
  quando durante il processo di compilazione servono le librerie X11 per
  l'installazione. Imake e xmkmf adempiono questo compito.

  Un Imakefile , per citare la pagina di manuale, un "prototipo" di
  Makefile. L'utilit imake costruisce un Makefile adatto al vostro
  sistema dall'Imakefile. Nella maggior parte dei casi, tuttavia,
  preferirete eseguire xmkmf, uno script shell che invoca imake, un suo
  front end. Controllate il file README o INSTALL incluso nell'archivio
  per istruzioni specifiche (se, dopo aver estratto dall'archivio i file
  sorgenti,  presente un file Imake nella directory base,  un chiaro
  segno che dovrebbe essere eseguito xmkmf). Leggere le pagine di
  manuale di Imake e xmkmf per una pi dettagliata analisi della
  procedura.

   bene essere consapevoli che xmkmf e make potrebbero dover essere
  invocati come root, specialmente nel fare un make install per spostare
  i binari sulle directory /usr/bin o /usr/local/bin. Usare make come
  utente normale, senza privilegi di root, porter probabilmente a dei
  messaggi d'errore tipo write access denied (accesso in scrittura
  negato), perch manca il permesso per la scrittura nelle directory di
  sistema. Controllate anche che i binari creati abbiano i giusti
  permessi di esecuzione per voi ed ogni altro utente appropriato.

  Quando viene invocato, xmkmf usa il file Imake per costruire il
  Makefile appropriato per il vostro sistema. Sarete soliti invocare
  xmkmf con l'argomento -a, per effettuare automaticamente make
  Makefiles, make includes e make depend. Ci imposta le variabili e
  definisce le posizioni delle librerie per il compilatore ed il linker.
  A volte, non ci sar il file Imake, ci sar invece uno script INSTALL
  o configure, che dovrebbe essere invocato come ./configure per
  assicurarsi che venga chiamato il giusto script configure. Nella
  maggior parte dei casi, il file README incluso con la distribuzione
  spiegher la procedura di installazione.

   di solito una buona idea guardare dentro il Makefile che xmkmf, o
  uno degli script di installazione, costruiscono. Il Makefile sar di
  solito adatto per il vostro sistema, ma occasionalmente potrebbe
  essere necessario "ritoccarlo" o correggere manualmente degli errori.


  Per installare i binari appena compilati nelle appropriate directory
  di sistema di solito basta eseguire, come root, make install.
  Solitamente, le directory per i binari del sistema sulle moderne
  distribuzioni Linux sono /usr/bin, /usr/X11R6/bin, e /usr/local/bin.
  La directory da preferire per i nuovi pacchetti  /usr/local/bin,
  poich in tal modo si terranno separati i binari che non fanno parte
  della installazione Linux originale.

  I pacchetti originariamente mirati per versioni commerciali di UNIX
  potrebbero provare ad installarsi in /opt o in un'altra directory
  sconosciuta. Ci, naturalmente, causer un errore di installazione se
  la directory in questione non esiste. Il modo pi semplice per
  risolvere questo problema  quello di creare, come root, una directory
  /opt, lasciare che il pacchetto vi si installi, e poi aggiungere tale
  directory alla variabile d'ambiente PATH. Oppure, potete creare dei
  link simbolici alla directory /usr/local/bin.

  La procedura di installazione generale sar quindi:

    Leggere il file README ed altri file di documentazione appropriati.

    Eseguire xmkmf -a, o lo script INSTALL o configure.

    Controllare il Makefile.

    Se necessario, eseguire make clean, make Makefiles, make includes,
     e make depend.

    Eseguire make.

    Controllare i permessi.

    Se necessario, eseguire make install.


  Note:


    Normalmente non si compilano i pacchetti come root. L'effettuare un
     su a root  necessario solo per installare i binari compilati nelle
     directory di sistema.

    Una volta che avete preso confidenza con make e col suo uso,
     potreste volere che vengano aggiunte nel Makefile standard incluso
     nel  (o creato col) pacchetto che state installando delle opzioni
     di ottimizzazione aggiuntive. Alcune di tali opzioni, le pi usate,
     sono -O2, -fomit-frame-pointer, -funroll-loops e -mpentium (se
     usate un processore Pentium). Siate cauti e fatevi guidare dal buon
     senso quando modificate un Makefile!

    Dopo che make ha creato i binari, potreste voler usare strip su
     essi. Il comando strip elimina dai file binari le informazioni per
     il debugging simbolico e ne riduce la dimensione, spesso
     drasticamente. Ovviamente ci disabiliter il debugging.

    Il Pack Distribution Project <http://sunsite.auc.dk/pack/> utilizza
     un diverso approccio per la creazione di archivi di pacchetti
     software, basato su un insieme di strumenti scritti in Python per
     la gestione di link simbolici a file installati in directory di
     raccolta separate. Questi archivi sono degli ordinari pacchetti
     tar, ma si installano nelle directory /coll e /pack.  Potreste
     dover scaricare il Pack-Collection dal suddetto sito qualora vi
     capiti di imbattervi in una di tali distribuzioni.




  4.  Binari preimpacchettati



  4.1.  Cosa c' che non va negli rpm?


  La compilazione e l'installazione manuale dei pacchetti dal sorgente 
  un compito apparentemente cos spaventoso per alcuni utenti Linux che
  essi hanno abbracciato i popolari formati di pacchetti rpm e deb, o il
  pi recente Stampede slp. Sebbene possa essere vero che
  l'installazione di un rpm di solito procede tanto facilmente e tanto
  velocemente quanto l'installazione del software di un certo altro noto
  sistema operativo,  il caso di spendere qualche parola riguardo gli
  svantaggi della installazione-fai-da-te dei binari preimpacchettati.

  Primo, sappiate che i pacchetti software vengono di solito rilasciati
  inizialmente come pacchetti tar, e i binari preimpacchettati li
  seguono giorni, settimane, persino mesi dopo. Un pacchetto rpm
  corrente  tipicamente almeno un paio di versioni minori indietro
  rispetto all'ultimo pacchetto tar. Quindi, se desiderate stare al
  passo con tutto il software dell'ultima generazione, potreste non
  voler aspettare che appaia un rpm o un deb. Alcuni pacchetti meno
  popolari potrebbero non essere mai convertiti in rpm.

  Secondo, il pacchetto tar potrebbe facilmente essere pi completo,
  avere pi opzioni, e prestarsi meglio ad una personalizzazione ed una
  messa a punto. La versione binaria rpm potrebbe non avere alcune delle
  funzionalit della versione completa. Gli rpm sorgenti contengono il
  codice sorgente completo e sono equivalenti ai corrispondenti
  pacchetti tar, e allo stesso modo necessitano di essere compilati ed
  installati usando l'opzione rpm --recompile nomepacchetto.rpm oppure
  rpm --rebuild nomepacchetto.rpm.

  Terzo, alcuni binari preimpacchettati non si installano bene, e anche
  se si installano, potrebbero piantarsi e fare un core dump. Essi
  potrebbero dipendere da versioni di libreria diverse da quelle
  presenti nel vostro sistema, o potrebbero essere stati preparati
  impropriamente o essere semplicemente difettosi. Ad ogni modo, quando
  installate un rpm o un deb necessariamente fate affidamento sulla
  competenza delle persone che hanno preparato quel pacchetto.

  Infine, aiuta avere il codice sorgente in mano, per poter effettuare
  delle riparazioni ed imparare da esso.  molto pi conveniente avere
  il sorgente nell'archivio da cui si stanno compilando i binari,
  piuttosto che in un differente pacchetto rpm.


  L'installazione di un pacchetto rpm non  necessariamente una
  bazzecola. Se c' un conflitto di dipendenza, l'installazione dell'rpm
  fallir. L'rpm potrebbe richiedere una versione delle librerie diversa
  da quelle presenti sul vostro sistema, l'installazione potrebbe non
  funzionare, anche se create dei link simbolici alle librerie mancanti
  da quelle a posto. Malgrado la loro convenienza, le installazioni
  degli rpm spesso falliscono per le stesse ragioni per cui lo fanno
  quelle dei pacchetti tar.

  Dovete installare gli rpm e i deb come root, per avere i necessari
  permessi di scrittura, e ci apre un buco di sicurezza potenzialmente
  serio, poich potreste inavvertitamente massacrare i binari di sistema
  e le librerie, o anche installare un cavallo di Troia che potrebbe
  liberare il caos sul vostro sistema.  quindi importante ottenere
  pacchetti rpm e deb da una "fonte fidata". In ogni caso, dovreste
  eseguire una 'verifica della firma' (rispetto ad un codice di
  controllo MD5) sul pacchetto, rpm --checksig nomepacchetto.rpm, prima
  di installarlo. Allo stesso modo  fortemente raccomandata
  l'esecuzione di rpm -K --nopgp nomepacchetto.rpm. I comandi
  corrispondenti per i pacchetti deb sono dpkg -I | --info
  nomepacchetto.deb e dpkg -e | --control nomepacchetto.deb.


    rpm --checksig gnucash-1.1.23-4.i386.rpm






  gnucash-1.1.23-4.i386.rpm: size md5 OK


    rpm -K --nopgp gnucash-1.1.23-4.i386.rpm


  gnucash-1.1.23-4.i386.rpm: size md5 OK

  Per i tipi veramente paranoici (e in questo caso ci sarebbe molto da
  dire a proposito di paranoia), ci sono le utilit unrpm e rpmunpack
  disponibili presso la directory utils/package di Sunsite per estrarre
  e controllare i singoli componenti dei pacchetti.

  Klee Diene <mailto:klee@debian.org> ha scritto il pacchetto
  sperimentale dpkgcert, per la verifica dell'integrit dei file .deb
  installati, usando i codici di controllo MD5.   disponibile
  nell'archivio ftp Debian
  <ftp://ftp.debian.org/pub/debian/project/experimental>. L'attuale nome
  / versione  dpkgcert_0.2-4.1_all.deb. Il sito Jim Pick Software
  <http://dpkgcert.jimpick.com> mantiene un server database sperimentale
  per fornire certificati dpkgcert per i pacchetti di una tipica
  installazione Debian.

  Nella loro forma pi semplice, i comandi rpm -i nomepacchetto.rpm e
  dpkg --install nomepacchetto.deb automaticamente aprono il pacchetto
  ed installano il software. Siate cauti, comunque, poich usare tali
  comandi ciecamente pu essere pericoloso per la salute del vostro
  sistema!

  Notate che gli avvertimenti suddetti si applicano anche, sebbene in
  minor misura, all'utilit di installazione pkgtool della Slackware.
  Tutto il software di installazione "automatico" richiede cautela.

  I programmi martian
  <http://www.people.cornell.edu/pages/rc42/program/martian.html> e
  alien <http://kitenet.net/programs/alien/> permettono la conversione
  tra i formati dei pacchetti rpm, deb, Stampede slp e tar.gz.  Ci
  rende questi pacchetti accessibili a tutte le distribuzioni Linux.

  Leggere attentamente le pagine di manuale dei comandi rpm e dpkg, e
  fare riferimento all'RPM HOWTO, alla Quick Guide to Red Hat's Package
  Manager <http://www.tfug.org/helpdesk/linux/rpm.html> del TFUG, e a
  The Debian Package Management Tools
  <http://www.debian.org/doc/FAQ/debian-faq-7.html> per informazioni pi
  dettagliate.


  4.2.  Problemi con gli rpm: un esempio


  Jan Hubicka <mailto:hubicka@paru.cas.cz> ha scritto un bellissimo
  pacchetto per i frattali, chiamato xaos. Sulla sua home page
  <http://www.paru.cas.cz/~hubicka/XaoS> sono disponibili entrambi i
  pacchetti .tar.gz e rpm. In nome della comodit proviamo la versione
  rpm, piuttosto che il pacchetto tar.

  Sfortunatamente, l'rpm di xaos non si installa. Due diverse versioni
  rpm fanno i capricci.

  rpm -i --test XaoS-3.0-1.i386.rpm


       error: failed dependencies:
               libslang.so.0 is needed by XaoS-3.0-1
               libpng.so.0 is needed by XaoS-3.0-1
               libaa.so.1 is needed by XaoS-3.0-1




  rpm -i --test xaos-3.0-8.i386.rpm

  error: failed dependencies:
          libaa.so.1 is needed by xaos-3.0-8




  La cosa strana  che libslang.so.0, libpng.so.0, e libaa.so.1 sono
  tutte presenti nella directory /usr/lib del sistema usato. Gli rpm di
  xaos devono essere stati compilati con delle versioni leggermente
  diverse di quelle librerie, anche se i numeri di versione sono
  identici.

  Come test, proviamo ad installare xaos-3.0-8.i386.rpm con l'opzione
  --nodeps per forzarne l'installazione. Provando ad eseguire xaos si
  pianta.



       xaos: error in loading shared libraries: xaos: undefined symbol: __fabsl




  (errore nel caricamento delle librerie condivise, il simbolo __fabsl
  non  definito)

  Cerchiamo testardamente di andare in fondo alla cosa. Lanciando ldd
  sul binario di xaos, per trovare da quali librerie dipende, vediamo
  che le librerie necessarie ci sono tutte. Lanciando nm sulla libreria
  /usr/lib/libaa.so.1, per vedere i suoi riferimenti simbolici, ci
  accorgiamo che __fabsl manca davvero. Naturalmente il riferimento che
  manca potrebbe non essere presente in una qualsiasi delle altre
  librerie... Non c' niente da fare, salvo rimpiazzare una o pi
  librerie.

  Basta! Scarichiamo il pacchetto tar, XaoS-3.0.tar.gz, disponibile sul
  sito ftp <ftp://ftp.ta.jcu.cz/pub/linux/hubicka/XaoS/3.0> o reperibile
  dalla home page. Proviamo a compilarlo.  L'esecuzione di ./configure,
  make e infine (come root) make install procede senza intoppi.

  Questo  solo uno fra i tanti esempi di binari preimpacchettati che
  portano pi problemi che vantaggi.





  5.  Problemi riguardo termcap e terminfo



  Secondo la pagina di manuale, "terminfo  un database che descrive i
  terminali, usato da programmi orientati-allo-schermo...".  Esso
  definisce un generico insieme di sequenze di controllo (codici di
  escape) usati per mostrare il testo sui terminali, e rende possibile
  il supporto per differenti terminali hardware senza la necessit di
  driver speciali. Le librerie terminfo si trovano in
  /usr/share/terminfo, sulle moderne distribuzioni di Linux.

  Il database terminfo ha ampiamente sostituito il pi vecchio termcap
  ed il completamente obsoleto termlib.  Ci normalmente non ha nessuna
  attinenza con l'installazione dei programmi, eccetto quando si ha a
  che fare con un pacchetto che richiede termcap.

  La maggior parte delle distribuzioni Linux ora usano terminfo, ma
  ancora conservano le librerie termcap per compatibilit con le
  applicazioni legacy (vedere /etc/termcap). A volte c' uno speciale
  pacchetto di compatibilit che  necessario aver installato per
  facilitare l'uso dei binari linkati con termcap. Raramente, potrebbe
  essere necessario togliere il commento da una dichiarazione #define
  termcap in un file sorgente. Controllate i file di documentazione
  appropriati nella vostra distribuzione per informazioni a tal
  riguardo.




  6.  Compatibilit all'indietro con i binari a.out


  In rarissimi casi,  necessario usare binari a.out, o perch il codice
  sorgente non  disponibile o perch, per una qualche ragione, non 
  possibile compilare nuovi binari ELF dal sorgente.

  Come succede, le installazioni ELF hanno quasi sempre un completo
  insieme di librerie a.out nella directory /usr/i486-linuxaout/lib.  Lo
  schema di numerazione delle librerie a.out differisce da quello delle
  ELF, evitando intelligentemente conflitti che potrebbero creare
  confusione. I binari a.out dovrebbero perci essere in grado di
  trovare le giuste librerie in fase di esecuzione, ma ci potrebbe non
  accadere sempre.

  Notate che il kernel necessita di avere il supporto per a.out, o
  direttamente o come modulo caricabile. Potrebbe essere necessario
  ricompilare il kernel per abilitare ci. Inoltre, alcune distribuzioni
  di Linux richiedono l'installazione di uno speciale pacchetto di
  compatibilit, come xcompat di Debian, per eseguire applicazioni X
  a.out.


  6.1.  Un esempio


  Jerry Smith ha scritto il comodissimo programma xrolodex alcuni anni
  fa. Esso usa le librerie Motif, ma fortunatamente  disponibile come
  binario linkato staticamente in formato a.out. Sfortunatamente, il
  sorgente necessita di numerosi aggiustamenti per essere ricompilato
  usando le librerie lesstif. Ancor pi sfortunatamente, il binario
  a.out su di un sistema ELF va in bomba con il seguente messaggio
  d'errore.


       xrolodex: can't load library '//lib/libX11.so.3'
       No such library




  (Traducendo: non  possibile caricare la libreria //lib/libX11.so.3;
  non c' nessuna libreria con quel nome)

  Si d il caso che ci sia una tale libreria, in
  /usr/i486-linuxaout/lib, ma xrolodex  incapace di trovarla in fase di
  esecuzione. La soluzione semplice  di fornire un link simbolico nella
  directory /lib:

  ln -s /usr/i486-linuxaout/lib/X11.so.3.1.0 libX11.so.3


  Ne viene fuori che  necessario fornire link simili per le librerie
  libXt.so.3 e libc.so.4. Ci deve essere fatto come root, naturalmente.
  Notate che dovrete essere assolutamente certi di non sovrascrivere o
  provocare conflitti di versione con librerie preesistenti.
  Fortunatamente, le nuove librerie ELF hanno numeri di versione pi
  alti delle pi vecchie a.out, per prevenire ed impedire proprio tali
  problemi.

  Dopo aver creato i tre link, xrolodex funziona bene.

  Il pacchetto xrolodex era originariamente pubblicato su Spectro
  <http://www.spectro.com/>, ma sembra che sia sparito da l.
  Attualmente pu essere scaricato da Sunsite
  <http://metalab.unc.edu/pub/Linux/apps/reminder/xrolodex.tar.z> come
  file sorgente [512k] in formato tar.Z.




  7.  Risoluzione dei problemi


  Se xmkmf e/o make hanno funzionato senza problemi, potete passare alla
  ``prossima sezione''.  Tuttavia, nella "vita reale", poche cose vanno
  bene al primo tentativo.   in questi casi che la vostra
  intraprendenza viene messa alla prova.


  7.1.  Errori in fase di link


    Supponiamo che make fallisca con un: Link error: -lX11: No such
     file or directory (Nessun file o directory con quel nome), anche
     dopo che xmkmf  stato invocato. Ci potrebbe significare che il
     file Imake non  stato preparato correttamente.  Controllate che
     nella prima parte del Makefile ci siano delle righe tipo:



       LIB=            -L/usr/X11/lib
       INCLUDE=        -I/usr/X11/include/X11
       LIBS=           -lX11 -lc -lm





  Le opzioni -L e -I dicono al compilatore e al linker dove cercare i
  file library e include, rispettivamente.  In questo esempio, le
  librerie di X11 dovrebbero essere nella directory /usr/X11/lib, e i
  file include di X11 dovrebbero essere nella directory
  /usr/X11/include/X11. Se sulla vostra macchina non  cos, apportate i
  cambiamenti necessari al Makefile e riprovate il make.


    Riferimenti non definiti alle funzioni della libreria matematica,
     come il seguente:


                /tmp/cca011551.o(.text+0x11): undefined reference to `cos'





  La soluzione  di linkargli esplicitamente la libreria matematica,
  aggiungendo un -lm al flag LIB o LIBS nel Makefile (vedere esempio
  precedente).

    Ancora un'altra cosa da provare se xmkmf fallisce  lo script
     seguente:


                make -DUseInstalled -I/usr/X386/lib/X11/config




  Che  una specie di xmkmf ridotto all'osso.


    In rarissimi casi, l'esecuzione di ldconfig come root potrebbe
     essere la soluzione:







  # ldconfig aggiorna i link simbolici alla libreria condivisa.  Questo
  potrebbe non essere necessario.


    Alcuni Makefile usano degli alias non riconosciuti per le librerie
     presenti nel vostro sistema. Per esempio, il binario potrebbe
     richiedere libX11.so.6, ma in /usr/X11R6/lib non c' nessun file o
     link con quel nome. Per, c' un libX11.so.6.1. La soluzione  di
     fare un ln -s /usr/X11R6/lib/libX11.so.6.1
     /usr/X11R6/lib/libX11.so.6, come root.  Ci potrebbe dover essere
     seguito da un ldconfig.



    A volte il sorgente necessita delle vecchie librerie nella versione
     X11R5 per essere compilato. Se avete le librerie R5 in
     /usr/X11R6/lib (avete avuto la possibilit di installarle durante
     la prima installazione di Linux), allora dovete solo assicurarvi di
     avere i link di cui il software ha bisogno per la compilazione. Le
     librerie R5 sono chiamate libX11.so.3.1.0, libXaw.so.3.1.0, e
     libXt.so.3.1.0. Di solito vi servono dei link, come libX11.so.3 ->
     libX11.so.3.1.0. Forse il software avr bisogno anche di un link
     del tipo libX11.so -> libX11.so.3.1.0. Naturalmente, per creare un
     link "mancante", usate il comando ln -s libX11.so.3.1.0 libX11.so,
     come root.





    Alcuni pacchetti esigeranno l'installazione di versioni aggiornate
     di una o pi librerie. Per esempio, le versioni 4.x della suite
     StarOffice della StarDivision GmbH erano famose per richiedere libc
     in versione 5.4.4 o successiva. Anche il pi recente StarOffice 5.0
     non girer nemmeno dopo l'installazione con le nuove librerie glibc
     2.1. Fortunatamente, il pi nuovo StarOffice 5.1 risolve tali
     problemi. Se avete una versione di StarOffice pi vecchia, potreste
     dover copiare, da root, una o pi librerie nelle directory
     appropriate, rimuovere le vecchie librerie, poi ripristinare i link
     simbolici (controllate l'ultima versione dello StarOffice miniHOWTO
     ``(tradotto)'' per maggiori informazioni su questo argomento).

     Attenzione: Usate molta cautela nel fare ci, poich potreste
     rendere non funzionante il vostro sistema se combinate dei
     pasticci.
     Potete trovare le librerie pi aggiornate presso Sunsite.


  7.2.  Altri problemi



    Uno script Perl o shell installato vi d un No such file or
     directory come messaggio d'errore. In questo caso, controllate i
     permessi del file per assicurarvi che il file sia eseguibile e
     controllate l'intestazione del file per accertarvi che la shell o
     il programma invocato dallo script sia nel posto specificato.  Per
     esempio, lo script potrebbe iniziare con:


       #!/usr/local/bin/perl




  Se infatti Perl  installato nella vostra directory /usr/bin invece
  che nella /usr/local/bin, allora lo script non funzioner. Ci sono due
  modi per correggere questo problema. L'intestazione del file script
  pu essere cambiata in #!/usr/bin/perl, o si pu aggiungere un link
  simbolico alla giusta directory, ln -s /usr/bin/perl
  /usr/local/bin/perl.


    Alcuni programmi X11 richiedono le librerie Motif per la
     compilazione.  Le distribuzioni Linux standard non hanno le
     librerie Motif installate, e al momento Motif costa 100-200$ extra
     (sebbene in parecchi casi funzioni anche la versione freeware
     Lesstif <http://www.lesstif.org/>). Se vi serve Motif per la
     compilazione di un certo pacchetto, ma vi mancano le librerie
     Motif, pu essere possibile ottenere dei binari linkati
     staticamente. Il linkaggio statico incorpora le routine di libreria
     nei binari stessi. Ci si traduce in file binari pi grandi, ma il
     codice girer sui sistemi in cui mancano le librerie.








  Quando un pacchetto richiede, per la compilazione, delle librerie non
  presenti sul vostro sistema, ci provocher errori in fase di link
  (errori tipo undefined reference - riferimento non definito).  Le
  librerie potrebbero essere del tipo costoso (propriet di qualcuno) o
  difficili da trovare per qualche altra ragione. In tal caso, ottenere
  un binario linkato staticamente dall'autore del pacchetto, o da un
  gruppo utenti Linux, pu essere il modo pi facile per effettuare
  delle riparazioni.



    Eseguendo uno script configure  stato creato uno strano Makefile,
     uno che sembra non avere nulla a che fare col pacchetto che state
     tentando di compilare. Ci significa che  stato eseguito il
     configure sbagliato, uno trovato da qualche altra parte nel path.
     Lanciate sempre configure come ./configure per evitare questo
     problema.



    La maggior parte delle distribuzioni sono passate alle librerie
     libc 6 / glibc 2 dalla pi vecchia libc 5. I binari precompilati
     che funzionavano con la vecchia libreria potrebbero andare in bomba
     se avete aggiornato la libreria. La soluzione  o di ricompilare le
     applicazioni dal sorgente o di ottenere dei nuovi binari
     precompilati. Se state aggiornando il vostro sistema a libc 6 e
     riscontrate dei problemi, fate riferimento al Glibc 2 HOWTO
     ``(tradotto)'' di Eric Green.








  Notate che ci sono delle piccole incompatibilit fra le versioni
  minori di glibc, cos un binario compilato con glibc 2.1 potrebbe non
  funzionare con glibc 2.0 e vice versa.



    A volte  necessario togliere l'opzione -ansi dai flag di
     compilazione nel Makefile. Ci abilita le caratteristiche
     supplementari di gcc, quelle non-ANSI in particolare, e permette la
     compilazione di pacchetti che richiedono tali estensioni. (Grazie a
     Sebastien Blondeel per questa indicazione).


    Alcuni programmi esigono di essere setuid root, per poter essere
     eseguiti con privilegi di root. Il comando per effettuare ci 
     chmod u+s nomefile, come root (osservate che il programma deve gi
     essere di propriet di root). Questo ha l'effetto di impostare il
     bit setuid nei permessi del file. Questo problema viene fuori
     quando il programma accede all'hardware di sistema, come un modem o
     un lettore CD ROM, o quando le librerie SVGA vengono chiamate dal
     modo console, come in un particolare noto pacchetto di emulazione.
     Se un programma funziona quando eseguito da root, ma d messaggi di
     errore tipo access denied (accesso negato) ad un utente normale,
     sospettate che la causa sia questa.



     Avvertimento: Un programma con setuid impostato come root pu porre
     un rischio di sicurezza per il sistema. Il programma gira con
     privilegi di root ed ha cos il potenziale di causare danni
     significativi. Accertatevi di sapere cosa fa il programma,
     guardando il sorgente se possibile, prima di impostare il bit
     setuid.




  7.3.  Ritocchi e messa a punto


  Potreste voler esaminare il Makefile per accertarvi che vengano usate
  le migliori opzioni di compilazione possibili per il vostro sistema.
  Per esempio, impostando il flag -O2 si sceglie il pi alto livello di
  ottimizzazione ed il flag -fomit-frame-pointer provoca la generazione
  di un binario pi piccolo (sebbene il debugging sar cos
  disabilitato). Per non giocherellate con tali opzioni, a meno che non
  sappiate cosa state facendo, e comunque non prima di aver ottenuto un
  binario funzionante.


  7.4.  Dove trovare maggiore aiuto


  Nella mia esperienza, forse il 25% delle applicazioni supera la fase
  di compilazione cos com', senza problemi. Un altro 50%, o gi di l,
  pu essere "persuaso" a farlo con uno sforzo variabile da lieve ad
  erculeo. Questo significa che ancora un numero significativo di
  pacchetti non ce la faranno, non importa cosa si faccia.  In tal caso,
  i binari Intel ELF e/o a.out di questi potrebbero essere trovati
  presso Sunsite o presso TSX-11 archive. Red Hat <http://redhat.com> e
  Debian <http://www.debian.org> hanno vasti archivi di binari
  preimpacchettati della maggior parte dei pi popolari software per
  Linux.  Forse l'autore del software pu fornire i binari compilati per
  il vostro particolare tipo di macchina.


  Notate che se ottenete i binari precompilati, dovrete controllarne la
  compatibilit con il vostro sistema:

    I binari devono girare sul vostro hardware (i.e., Intel x86).

    I binari devono essere compatibili con il vostro kernel (i.e.,
     a.out o ELF).

    Le vostre librerie devono essere aggiornate.

    Il vostro sistema deve avere le appropriate utilit di
     installazione (rpm o deb).

  Se tutto il resto non funziona, potete trovare aiuto nei newsgroup
  appropriati, come comp.os.linux.x o comp.os.linux.development.

  Se non funziona proprio niente, almeno avrete fatto del vostro meglio,
  ed avrete imparato molto.






  8.  Conclusioni

  Leggete la documentazione del pacchetto software per stabilire se
  certe variabili d'ambiente hanno bisogno di impostazioni (in .bashrc o
  .cshrc) e se i file .Xdefaults e .Xresources hanno bisogno di essere
  personalizzati.

  Potrebbe esserci un file di default per l'applicazione, di solito
  chiamato Xprog.ad nella distribuzione Xprog originale. Se  cos,
  editate il file Xprog.ad per adattarlo alla vostra macchina, poi
  cambiategli nome (mv) in Xprog ed installatelo nella directory
  /usr/lib/X11/app-defaults come root. Un insuccesso nel fare ci
  potrebbe far s che il software si comporti stranamente o addirittura
  si rifiuti di girare.

  La maggior parte dei pacchetti software comprendono una o pi pagine
  di manuale preformattate. Come root, copiate il file Xprog.man nella
  directory /usr/man, /usr/local/man, o /usr/X11R6/man appropriata (man1
  - man9), e cambiategli nome come del caso. Per esempio, se Xprog.man
  finisce in /usr/man/man4, dovrebbe essere rinominato Xprog.4 (mv
  Xprog.man Xprog.4).  Per convenzione, i comandi utente vanno in man1,
  i giochi in man6, ed i pacchetti di amministrazione in man8 (vedere la
  documentazione di man per maggiori dettagli).  Naturalmente, se vi va,
  potete discostarvi dalla convenzione, sul vostro sistema.


  Alcuni, pochi, pacchetti non installeranno i binari nelle appropriate
  directory di sistema, cio essi non hanno l'opzione install nel
  Makefile. In tal caso, potete installare manualmente i binari
  copiandoli nell'appropriata directory di sistema, /usr/bin,
  /usr/local/bin o /usr/X11R6/bin, come root, naturalmente. Notate che
  /usr/local/bin  la directory da preferire per i binari che non fanno
  parte della distribuzione di base di Linux.

  Alcune o tutte le suddette procedure ,nella maggior parte dei casi,
  dovrebbero essere effettuate automaticamente con un make install, e
  forse un make install.man o un make install_man. Se  cos, i file di
  documentazione README o INSTALL lo specificheranno.



  9.  Primo esempio: Xscrabble

  L'Xscrabble di Matt Chapman aveva l'aria di essere un programma che
  sarebbe stato interessante avere, poich si d il caso che io sia un
  accanito giocatore di ScrabbleTM. Lo scaricai, decompressi, e lo
  compilai seguendo la procedura nel file README:


            xmkmf
            make Makefiles
            make includes
            make




  Ovviamente non funzion...



       gcc -o xscrab -O2 -O -L/usr/X11R6/lib
       init.o xinit.o misc.o moves.o cmove.o main.o xutils.o mess.o popup.o
       widgets.o display.o user.o CircPerc.o
       -lXaw -lXmu -lXExExt -lXext -lX11 -lXt -lSM -lICE -lXExExt -lXext -lX11
       -lXpm -L../Xc -lXc

       BarGraf.o(.text+0xe7): undefined reference to `XtAddConverter'
       BarGraf.o(.text+0x29a): undefined reference to `XSetClipMask'
       BarGraf.o(.text+0x2ff): undefined reference to `XSetClipRectangles'
       BarGraf.o(.text+0x375): undefined reference to `XDrawString'
       BarGraf.o(.text+0x3e7): undefined reference to `XDrawLine'
       etc.
       etc.
       etc...




  Indagai su ci nel newsgroup comp.os.linux.x, e qualcuno gentilmente
  mi indic che, apparentemente, le librerie Xt, Xaw, Xmu, e X11 non
  erano state trovate nella fase di link. Hmmm...

  C'erano due Makefile principali, e quello nella directory src cattur
  la mia attenzione. Una linea nel Makefile definita LOCAL_LIBS:
  LOCAL_LIBS = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB). Qui c'erano i
  riferimenti alle librerie non trovate dal linker.

  Cercando il successivo riferimento a LOCAL_LIBS, vidi alla linea 495
  di quel Makefile:


        $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBS) $(LDLIBS)
  $(EXTRA_LOAD_FLAGS)




  Ora, cos'erano queste LDLIBS?


             LDLIBS = $(LDPOSTLIB) $(THREADS_LIBS) $(SYS_LIBRARIES)
       $(EXTRA_LIBRARIES)




  Le SYS_LIBRARIES erano:


        SYS_LIBRARIES = -lXpm -L../Xc -lXc




  S! Le librerie mancanti erano qui.

   possibile che il linker avesse bisogno di vedere le LDLIBS prima
  delle LOCAL_LIBS...  Cos, la prima cosa da provare era di modificare
  il Makefile invertendo le $(LOCAL_LIBS) e le $(LDLIBS) alla linea 495,
  dunque ora si dovrebbe leggere:


               $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LDLIBS) $(LOCAL_LIBS)
       $(EXTRA_LOAD_FLAGS)                          ^^^^^^^^^^^^^^^^^^^^^^^




  Provai ad eseguire di nuovo make con i suddetti cambiamenti e, guarda
  un po', stavolta funzion. Xscrabble aveva ancora bisogno di qualche
  aggiustamento ed una messa a punto, ovviamente, come cambiare nome al
  dizionario e togliere il commento da qualche statement assert in uno
  dei file sorgenti, ma da allora mi ha fornito svariate ore di
  divertimento.



  [Notate che ora  disponibile una nuova versione di Xscrabble in
  formato rpm, e questa si installa senza problemi.]




  Potete contattare Matt Chapman <mailto:matt@belgarath.demon.co.uk> via
  e-mail, e scaricare Xscrabble dalla sua home page
  <http://www.belgarath.demon.co.uk/programs/index.html>.






              Scrabble  un marchio registrato dalla Milton Bradley Co., Inc.




  10.  Secondo esempio: Xloadimage

  Questo esempio pone un problema pi facile. Il programma xloadimage
  sembrava un'utile aggiunta alla mia raccolta di attrezzi grafici. Ho
  copiato il file xloadi41.gz direttamente dalla directory sorgente sul
  CD, allegato all'eccellente libro ``X User Tools'', di Mui e Quercia.
  Come c'era da aspettarsi, tar xzvf estrae i file dall'archivio. Il
  make, per, fornisce un antipatico errore e termina.



       gcc -c -O -fstrength-reduce -finline-functions -fforce-mem
       -fforce-addr -DSYSV  -I/usr/X11R6/include
       -DSYSPATHFILE=\"/usr/lib/X11/Xloadimage\" mcidas.c

       In file included from /usr/include/stdlib.h:32,
                        from image.h:23,
                        from xloadimage.h:15,
                        from mcidas.c:7:
       /usr/lib/gcc-lib/i486-linux/2.6.3/include/stddef.h:215:
       conflicting types for `wchar_t'
       /usr/X11R6/include/X11/Xlib.h:74: previous declaration of
       `wchar_t'
       make[1]: *** [mcidas.o] Error 1
       make[1]: Leaving directory
       `/home/thegrendel/tst/xloadimage.4.1'
       make: *** [default] Error 2




  Il messaggio d'errore contiene l'indizio essenziale.

  Guardando il file image.h, linea 23...


              #include <stdlib.h>




  Aha, da qualche parte nel sorgente per xloadimage, wchar_t  stato
  ridefinito in modo diverso da quanto specificato nel file include
  standard, stdlib.h. Proviamo prima a commentare la linea 23 in
  image.h, che forse l'include stdlib.h, dopo tutto, non  necessario.

  A questo punto, la fase di compilazione procede senza nessun errore
  fatale. Il pacchetto xloadimage funziona correttamente ora.





  11.  Terzo esempio: Fortune

  Questo esempio richiede qualche conoscenza di programmazione in C. La
  maggioranza del software UNIX/Linux  scritta in C, e imparare almeno
  un po' di C sarebbe certamente un bene per chiunque sia seriamente
  interessato all'installazione del software.

  Il famoso programma fortune mostra una frase umoristica, un "biscotto
  della fortuna", ad ogni avvio di Linux. Sfortunatamente (il gioco di
  parole  intenzionale), provare a costruir fortuna su una
  distribuzione Red Hat con un kernel 2.0.30 provoca degli errori
  fatali.  (N.d.T: in inglese "build fortune" significa sia "far
  fortuna" che "compilare il programma fortune")
       ~/fortune# make all


       gcc -O2 -Wall -fomit-frame-pointer -pipe   -c fortune.c -o
       fortune.o
       fortune.c: In function `add_dir':
       fortune.c:551: structure has no member named `d_namlen'
       fortune.c:553: structure has no member named `d_namlen'
       make[1]: *** [fortune.o] Error 1
       make[1]: Leaving directory `/home/thegrendel/for/fortune/fortune'
       make: *** [fortune-bin] Error 2







  Guardando fortune.c, le linee pertinenti sono queste.



          if (dirent->d_namlen == 0)
                   continue;
               name = copy(dirent->d_name, dirent->d_namlen);




  Ci serve di trovare la struttura dirent, ma essa non  dichiarata nel
  file fortune.c, e nemmeno un grep dirent la mostra in nessuno dei file
  sorgenti. Tuttavia, all'inizio di fortune.c, c' la seguente linea.



       #include <dirent.h>




  Questo sembra essere un file include per la libreria di sistema,
  perci, il posto pi logico dove cercare dirent.h  in /usr/include.
  Effettivamente esiste un file dirent.h in /usr/include, ma quel file
  non contiene la dichiarazione della struttura dirent. C', per, un
  riferimento ad un altro file dirent.h.



       #include <linux/dirent.h>





  Alla fine, andando in /usr/include/linux/dirent.h, troviamo la
  dichiarazione della struttura che ci serve.










  struct dirent {
          long            d_ino;
          __kernel_off_t  d_off;
          unsigned short  d_reclen;
          char            d_name[256]; /* We must not include
  limits.h! */
  };




  Poco ma sicuro, la dichiarazione della struttura non contiene nessun
  d_namelen, ma ci sono un paio di "candidati" come suo equivalente. Il
  pi probabile di essi  d_reclen, poich questo membro della struttura
  probabilmente rappresenta la lunghezza di qualcosa ed  uno short
  integer. L'altra possibilit, d_ino, potrebbe essere un numero di
  inode, a giudicare dal suo nome e tipo. A quanto pare, stiamo
  probabilmente trattando con una struttura di "registrazione delle
  directory", e questi elementi rappresentano gli attributi di un file,
  il suo nome, il suo inode, e la sua lunghezza (in blocchi).  Ci
  sembrerebbe convalidare la nostra scelta.

  Editiamo il file fortune.c e cambiamo i due riferimenti alle linee 551
  e 553 da d_namelen a d_reclen. Proviamo di nuovo un make all.
  Successo. La compilazione finisce senza errori. Ora possiamo prenderci
  i nostri "brividi a buon mercato" da fortune.



  12.  Quarto esempio: Hearts


  Ecco il vecchio canuto gioco Hearts, scritto per i sistemi UNIX da Bob
  Ankeney negli anni '80, rivisto nel 1992 da Mike Yang, ed attualmente
  mantenuto da Jonathan Badger <mailto:badger@phylo.life.uiuc.edu>. Il
  suo predecessore era un ancor pi vecchio programma Pascal di Don
  Backus della Oregon Software, poi aggiornato da Jeff Hemmerling.
  Originariamente pensato come client per pi giocatori, funziona bene
  anche per un solo giocatore contro avversari gestiti dal computer. La
  grafica  bella, bench il gioco manchi di caratteristiche pi
  sofisticate e i giocatori computerizzati non siano molto forti.
  Nonostante tutto, sembra essere il solo Hearts decente disponibile per
  macchine UNIX e Linux ancora oggi.

  A causa della sua stirpe ed et, questo pacchetto  particolarmente
  difficile da compilare su di un sistema Linux.  Richiede la soluzione
  di una lunga e sconcertante serie di puzzle.   un esercizio di
  pazienza e determinazione.

  Prima di iniziare, accertatevi di avere le librerie motif o le lesstif
  installate.


  

  xmkmf

  make








  client.c: In function `read_card':
  client.c:430: `_tty' undeclared (first use in this function)
  client.c:430: (Each undeclared identifier is reported only once
  client.c:430: for each function it appears in.)
  client.c: In function `scan':
  client.c:685: `_tty' undeclared (first use in this function)
  make: *** [client.o] Error 1





  Questi sono i colpevoli nel file client.c:



       #ifndef SYSV
               (buf[2] != _tty.sg_erase) && (buf[2] != _tty.sg_kill)) {
        #else
               (buf[2] != CERASE) && (buf[2] != CKILL)) {
       #endif








  

     In client.c, aggiungiamo


       #define SYSV




  alla linea 39. Ci bypasser il riferimento a _tty.

  make



       client.c:41: sys/termio.h: No such file or directory
       make: *** [client.o] Error 1






  

  Il file include termio.h  nella directory /usr/include su di un
  sistema Linux, invece che nella /usr/include/sys, come era sulle
  vecchie macchine UNIX. Perci, cambiamo la linea 41 di client.c da


       #include <sys/termio.h>




  a
       #include <termio.h>




  make



       gcc -o hearts -g      -L/usr/X11R6/lib client.o hearts.o select.o connect.o
       sockio.o start_dist.o  -lcurses -ltermlib
       /usr/bin/ld: cannot open -ltermlib: No such file or directory
       collect2: ld returned 1 exit status
       make: *** [hearts] Error 1







  

  Le moderne distribuzioni Linux usano il database terminfo e/o termcap,
  piuttosto che l'obsoleto termlib.

  Editiamo il Makefile.

  Linea 655:


       CURSES_LIBRARIES = -lcurses -ltermlib




  cambiamola in:


       CURSES_LIBRARIES = -lcurses -ltermcap





  make



       gcc -o xmhearts -g      -L/usr/X11R6/lib xmclient.o hearts.o select.o
       connect.o sockio.o start_dist.o gfx.o  -lXm_s -lXt -lSM -lICE -lXext -lX11
       -lPW
       /usr/bin/ld: cannot open -lXm_s: No such file or directory
       collect2: ld returned 1 exit status







  

  La principale libreria lesstif  libXm, piuttosto che libXm_s. Quindi,
  editiamo il Makefile.

  Nella linea 653:


       XMLIB = -lXm_s $(XTOOLLIB) $(XLIB) -lPW




  cambia in:


       XMLIB = -lXm $(XTOOLLIB) $(XLIB) -lPW





  make



       gcc -o xmhearts -g      -L/usr/X11R6/lib xmclient.o hearts.o select.o
       connect.o sockio.o start_dist.o gfx.o  -lXm -lXt -lSM -lICE -lXext -lX11 -lPW
       /usr/bin/ld: cannot open -lPW: No such file or directory
       collect2: ld returned 1 exit status
       make: *** [xmhearts] Error 1







  

  Raduniamo i soliti sospetti.

  Non c' nessuna libreria PW. Editiamo il Makefile.

  Linea 653:


       XMLIB = -lXm $(XTOOLLIB) $(XLIB) -lPW




  cambia in:


       XMLIB = -lXm $(XTOOLLIB) $(XLIB) -lPEX5




  (La libreria PEX5  quella pi simile alla PW.)



  make






  rm -f xmhearts
  gcc -o xmhearts -g      -L/usr/X11R6/lib xmclient.o hearts.o select.o
  connect.o sockio.o start_dist.o gfx.o  -lXm -lXt -lSM -lICE -lXext -lX11 -lPEX5




  Il make finalmente funziona (hurra!)




  

  Installazione:

  Come root,



       [root@localhost hearts]# make install
       install -c -s  hearts /usr/X11R6/bin/hearts
       install -c -s  xmhearts /usr/X11R6/bin/xmhearts
       install -c -s  xawhearts /usr/X11R6/bin/xawhearts
       install in . done









  

  Esecuzione di prova:

  rehash

  (Stiamo eseguendo la shell tcsh.)

  xmhearts



       localhost:~/% xmhearts
       Can't invoke distributor!







  

  Dal file README nel pacchetto hearts:



            Put heartsd, hearts_dist, and hearts.instr in the HEARTSLIB
            directory defined in local.h and make them world-accessible.



  (Traducendo: Mettete Heartsd, hearts_dist, e hearts.instr nella direc
  tory HEARTSLIB definita in local.h e rendeteli accessibili a chiunque)


  Dal file local.h:



       /* where the distributor, dealer and instructions live */

       #define HEARTSLIB "/usr/local/lib/hearts"




  Questo  un classico caso: RTFM (leggete il fottuto manuale).


  Come root,

  cd /usr/local/lib

  mkdir hearts

  cd !$

  Copiamo i file di distributor in questa directory.

  cp /home/username/hearts/heartsd .

  cp /home/username/hearts/hearts_dist .

  cp /home/username/hearts/hearts.instr .




  

  Lanciamo un'altra esecuzione di prova.

  xmhearts

  Qualche volta funziona, ma il pi delle volte si pianta con un
  messaggio dealer died!.




  

  Il "distributor" e il "dealer" esaminano le porte hardware. Dovremmo
  perci sospettare che quei programmi abbiano bisogno dei privilegi di
  root.

  Proviamo, come root,

  chmod u+s /usr/local/lib/heartsd

  chmod u+s /usr/local/lib/hearts_dist

  (Osserviamo che, come discusso precedentemente, i binari suid possono
  creare dei buchi di sicurezza.)

  xmhearts

  Alla fine funziona!


  Hearts  disponibile da Sunsite.



  13.  Quinto esempio: XmDipmon




       Bullwinkle: Hey Rocky, guarda, tiro fuori un coniglio dal cappello.
       Rocky:      Ma quel trucco non funziona mai.
       Bullwinkle: Questa volta s.
                   Voil!
                   Beh, ci sono andato vicino.
       Rocky:      Ed ora  il momento di un altro effetto speciale.
                   --- "Rocky e i suoi amici"




  XmDipmon  un'elegante applicazioncina che mostra un bottone indicante
  lo stato di una connessione Internet. Lampeggia e suona quando la
  connessione si interrompe, come troppo spesso accade nelle linee
  telefoniche di campagna. Sfortunatamente XmDipmon funziona solo con
  dip, il che lo rende inutile per tutti quelli, la maggioranza, che
  usano chat per collegarsi.

  Compilare XmDipmon non  un problema. XmDipmon si linka con le
  librerie Motif, ma pu essere compilato, e funziona bene, anche con le
  Lesstif. La sfida  di modificare il pacchetto per farlo funzionare
  con chat. Ci in pratica richiede di armeggiare con il codice sorgente
  ed  quindi necessario avere delle conoscenze di programmazione.





               "Quando xmdipmon parte, cerca un file chiamato /etc/dip.pid
                (potete fargli cercare un altro file usando l'opzione -pidfile
                dalla riga di comando). Tale file contiente il PID del demone
                dip (dip stesso si pone in modo demone, dopo che ha stabilito
                una connessione)."
                              --- dal file README di XmDipmon






  Usando l'opzione -pidfile, il programma pu essere indotto, al suo
  avvio, a cercare un altro file, uno che esista solo dopo che un login
  con chat  stato effettuato con successo.  Il candidato pi ovvio  il
  file di lock del modem. Potremmo quindi provare a lanciare il
  programma con xmdipmon -pidfile /var/lock/LCK..ttyS3 (assumendo che il
  modem sia sulla porta com numero 4, ttyS3). Comunque cos si risolve
  solo una parte del problema. Il programma osserva continuamente il
  demone dip e dobbiamo invece fare in modo che controlli un processo
  che sia associato a chat o a ppp.

  C' un solo file sorgente e fortunatamente  ben commentato.
  Scorrendo il file xmdipmon.c troviamo la funzione getProcFile, la cui
  descrizione, all'inizio, riporta quanto segue:

       /*****
       * Name:                 getProcFile
       * Return Type:  Boolean
       * Description:  tries to open the /proc entry as read from the dip pid file.
       <snip>
       *****/




  (Traducendo la descrizione: prova ad aprire l'elemento di /proc
  secondo quanto letto dal file pid di dip)

  Siamo sulla pista giusta. Guardando nel corpo della funzione...



                               /* we watch the status of the real dip deamon */
                               sprintf(buf, "/proc/%i/status", pid);
                               procfile = (String)XtMalloc(strlen(buf)*sizeof(char)+1);
                               strcpy(procfile, buf);
                               procfile[strlen(buf)] = '\0';




  Il colpevole  la linea 2383:


                               sprintf(buf, "/proc/%i/status", pid);
                                             ^^^^^^^^^^^^^^^^^^^^^




  Questo controlla se il processo demone dip  in esecuzione. Quindi,
  come possiamo cambiarlo in modo che controlli il demone pppd?

  Guardando sulla pagina di manuale di pppd:


       FILES
            /var/run/pppn.pid (BSD o Linux), /etc/ppp/pppn.pid (altri)
                  Identificatore del processo (Process-ID) di pppd sull'unit
                  d'interfaccia n di ppp.




  Cambiamo la linea 2383 di xmdipmon.c in:


                               sprintf(buf, "/var/run/ppp0.pid" );




  Ricompiliamo il pacchetto cos modificato. Nessun problema con la
  compilazione. Ora proviamolo con il nuovo argomento della riga di
  comando.  Funziona che  un incanto. Il bottoncino blu indica quando 
  stata stabilita una connessione ppp con l'ISP e lampeggia e suona
  quando la connessione si interrompe. Ora abbiamo un monitor per chat
  pienamente funzionante.



  XmDipmon pu essere scaricato da Ripley Linux Tools.




  14.  Dove trovare archivi sorgente

  Ora che siete ansiosi di usare le conoscenze appena acquisite, per
  aggiungere delle utilit ed altre chicche al vostro sistema, potete
  trovarle online alla Linux Applications and Utilities Page
  <http://www.redhat.com/linux-info/linux-app-list/linapps.html>, o in
  una delle raccolte su CD ROM, a prezzo molto ragionevole, di Red Hat
  <http://www.redhat.com/>, InfoMagic <http://www.infomagic.com>, Linux
  Systems Labs <http://www.lsl.com>, Cheap Bytes
  <http://www.cheapbytes.com>, e altri.


  Un vasto magazzino di codice sorgente  comp sources UNIX archive.

  Molto codice sorgente UNIX viene pubblicato nel newsgroup alt.sources.
  Se state cercando particolari pacchetti di codice sorgente, potete
  chiedere sullo specifico newsgroup alt.sources.wanted.  Un altro buon
  posto dove cercare  il newsgroup comp.os.linux.announce.  Per entrare
  nella mailing list Unix sources, mandate alla stessa un messaggio
  subscribe.

  Gli archivi del newsgroup alt.sources si trovano presso i seguenti
  siti ftp:


    ftp.sterling.com/usenet/alt.sources/

    wuarchive.wustl.edu/usenet/alt.sources/articles

    src.doc.ic.ac.uk/usenet/alt.sources/articles




  15.  Conclusioni

  Riassumendo, la perseveranza fa tutta la differenza (e un'alta soglia
  alla frustrazione certamente aiuta). Come in tutti gli sforzi,
  imparare dagli errori  criticamente importante. Ogni passo falso,
  ogni fallimento, contribuisce alla costruzione della conoscenza che
  conduce alla padronanza dell'arte della compilazione del software.



  16.  Riferimenti e ulteriori letture
















  BORLAND C++ TOOLS AND UTILITIES GUIDE, Borland International, 1992,
  pp. 9-42.
  [Uno dei manuali distribuiti col Borland C++, ver. 3.1. D una
  abbastanza buona introduzione alla sintassi e ai concetti di make,
  usando l'implementazione limitata al DOS della Borland.]

  DuBois, Paul: SOFTWARE PORTABILITY WITH IMAKE, O'Reilly and Associates,
  1996, ISBN 1-56592-226-3.
  [ ritenuto il riferimento definitivo per imake, sebbene non lo
  avevo a disposizione durante la scrittura di questo articolo.]

  Frisch, Aeleen: ESSENTIAL SYSTEM ADMINISTRATION (2nd ed.), O'Reilly and
  Associates, 1995, ISBN 1-56592-127-5.
  [Questo, altrimenti ottimo, manuale per amministratori di sistema tratta
  solo in modo sommario la compilazione del software.]

  Hekman, Jessica: LINUX IN A NUTSHELL, O'Reilly and Associates, 1997, ISBN
  1-56592-167-4.
  [Un buon riferimento globale ai comandi di Linux.]

  Lehey, Greg: PORTING UNIX SOFTWARE, O'Reilly and Associates, 1995, ISBN
  1-56592-126-7.

  Mayer, Herbert G.: ADVANCED C PROGRAMMING ON THE IBM PC, Windcrest Books,
  1989, ISBN 0-8306-9363-7.
  [Un libro zeppo di idee per programmatori C medi ed esperti. Superba
  trattazione degli algoritmi, ricercatezza di linguaggio e anche
  divertimento. Sfortunatamente non viene pi stampato.]

  Mui, Linda and Valerie Quercia: X USER TOOLS, O'Reilly and Associates,
  1994, ISBN 1-56592-019-8, pp. 734-760.

  Oram, Andrew and Steve Talbott: MANAGING PROJECTS WITH MAKE, O'Reilly
  and Associates, 1991, ISBN 0-937175-90-0.

  Peek, Jerry and Tim O'Reilly and Mike Loukides: UNIX POWER TOOLS,
  O'Reilly and Associates / Random House, 1997, ISBN 1-56592-260-3.
  [Una meravigliosa fonte di idee, e tonnellate di utilit che potete
  compilare dal codice sorgente, usando i metodi discussi in questo
  articolo.]

  Stallman, Richard M. and Roland McGrath: GNU MAKE, Free Software
  Foundation, 1995, ISBN 1-882114-78-7.
  [Da leggere]

  Waite, Mitchell, Stephen Prata, and Donald Martin: C PRIMER PLUS, Waite Group
  Press, ISBN 0-672-22090-3,.
  [Probabilmente la miglior introduzione alla programmazione in C. Vasta
  copertura per un "primo libro". Sono ora disponibili nuove edizioni.]

  Welsh, Matt and Lar Kaufman: RUNNING LINUX, O'Reilly and Associates,
  1996, ISBN 1-56592-151-8.
  [Tuttora il miglior riferimento globale per Linux, sebbene manchi
  di profondit in alcune aree.]


  Le pagine di manuale di dpkg, gcc, gzip, imake, ldconfig, ldd, make, nm,
  patch, rpm, shar, strip, tar, termcap, terminfo, e xmkmf.


  Il BZIP2 HOWTO (tradotto), di David Fetter.

  Il Glibc2 HOWTO (tradotto), di Eric Green

  Il LINUX ELF HOWTO (tradotto), di Daniel Barlow.

  L'RPM HOWTO, di Donnie Barnes.

  Lo StarOffice miniHOWTO, di Matthew Borowski.




  [Questi HOWTO dovrebbero trovarsi nella directory /usr/doc/HOWTO o
  nella /usr/doc/HOWTO/mini sul vostro sistema. Versioni aggiornate sono
  disponibili in formato testo, HTML e SGML nel sito LDP
  <http://metalab.unc.edu/LDP/HOWTO>, e di solito nei siti dei
  rispettivi autori.]


  __________________

  Traduzioni: Per la versione in italiano degli HOWTO con l'indicazione
  "(tradotto)" vedere: www.pluto.linux.it/ildp/HOWTO/HOWTO-INDEX-3.html.
  Per altra documentazione su Linux in italiano, compresi eventuali
  HOWTO e/o mini-HOWTO citati ma al momento non ancora tradotti, si veda
  il sito ILDP <http://www.pluto.linux.it/ildp/index.html>.



  17.  Crediti


  L'autore di questo HOWTO desidera ringraziare le seguenti persone per
  gli utili suggerimenti, le correzioni e l'incoraggiamento.


    R. Brock Lynn

    Michael Jenner

    Fabrizio Stefani

  Gloria va anche a quelle brave persone che hanno tradotto questo HOWTO
  in italiano e giapponese.

  E naturalmente, ringraziamenti, lodi, benedizioni e osanna a Greg
  Hankins e Tim Bynum del Linux Documentation Project
  <http://metalab.unc.edu/LDP/>.























  Software-RAID HOWTO
  Linas Vepstas, linas@linas.org
  v0.54  21 Novembre 1998

  RAID sta per "Redundant Array of Inexpensive Disks", un modo per
  creare un sottosistema di dischi veloce e affidabile da una serie di
  dischi singoli.  RAID pu proteggere da un malfunzionamento del disco
  e pu anche migliorare la situazione di un solo disco in caso di un
  malfunzionamento.  Questo documento  un tutorial/HOWTO/FAQ per gli
  utenti delle estensioni MD del kernel di Linux, dei tools ad esse
  associati, e del loro uso. Le estensioni MD implementano RAID-0
  (striping), RAID-1 (mirroring), RAID-4 e RAID-5 tramite software.
  Cos, con le MD, non sono richiesti hardware o controller speciali per
  ottenere molti dei benefici della tecnologia RAID.  Documentazione
  tradotta da Marco Meloni - eventuali suggerimenti o correzioni della
  traduzione italiana e contributi in italiano per l'autore possono
  essere inviati al traduttore: ( tonno@stud.unipg.it )


     Preambolo
        (la licenza viene riportata anche in inglese. ndt)
        Questo documento  copyright di Linas Vepstas (linas@linas.org)
        e viene distribuito nei termini della licenza GPL. Il permesso
        di usare, copiare, distribuire questo documento per qualsiasi
        utilizzo  concesso a patto che il nome dell'autore e
        dell'editore e questo preambolo appaiano in ogni copia e/o
        documento, e che una versione non modificata di questo documento
        sia resa liberamente disponibile.  Questo documento 
        distribuito nella speranza che sia utile ma SENZA ALCUNA
        GARANZIA n espressa n implicita. Anche se ogni sforzo  stato
        fatto per assicurare la accuratezza delle informazioni
        documentate qui di seguito, l'autore / editore / curatore NON SI
        ASSUME RESPONSABILIT per qualsiasi errore, o per qualsivoglia
        danno, diretto o consequenziale risultante dall'uso delle
        informazioni contenute in questo documento.
        This document is GPL'ed by Linas Vepstas (linas@linas.org).
        Permission to use, copy, distribute this document for any
        purpose is hereby granted, provided that the author's / editor's
        name and this notice appear in all copies and/or supporting
        documents; and that an unmodified version of this document is
        made freely available.  This document is distributed in the hope
        that it will be useful, but WITHOUT ANY WARRANTY, either
        expressed or implied.  While every effort has been taken to
        ensure the accuracy of the information documented herein, the
        author / editor / maintainer assumes NO RESPONSIBILITY for any
        errors, or for any damages, direct or consequential, as a result
        of the use of the information documented herein.


        RAID, anche se concepito per aumentare l'affidabilit del
        sistema tramite la ridondanza, pu anche portare ad un falso
        senso di sicurezza e confidenza quando usato impropriamente.
        Questa falsa confidenza pu portare a disastri ancora maggiori.
        Si noti in particolare che RAID  progettato per proteggere in
        caso di un funzionamento anomalo *del disco*, non in caso di un
        calo di tensione o di un errore dell'operatore. Cali di
        tensione, kernel di sviluppo contenenti errori o
        operatori/amministratori di sistema possono portare ad un
        danneggiamento non recuperabile dei dati!  RAID *non*
        sostituisce il normale backup del sistema.  Quindi sappiate cosa
        state facendo, fate sempre delle prove, state sul chi vive!

  1.  Introduzione



  1. D: Cosa  RAID?

       R: RAID sta per "Redundant Array of Inexpensive Disks", un
       modo per creare un sottosistema di dischi veloce e affid
       abile da una serie di dischi singoli. Nel mondo dei PC "I"
        diventata iniziale di "Indipendent", mentre il mercato
       continua a differenziare IDE e SCSI. Nel suo significato
       originale "I" significava "Inexpensive" (a basso costo. ndt)
       se comparato ad un mainframe 3380 DASD grande quanto un
       refrigeratore, dei drive mostruosi che facevano sembrare
       economiche le belle case e robetta gli anelli di diamante.



  2. D: Cos' questo documento?

       R: Questo documento  un tutorial/HOWTO/FAQ per gli utenti
       delle estensioni MD del kernel di Linux, dei tools ad esse
       associati e sul loro uso.  Le estensioni MD implementano
       RAID-0 (striping), RAID-1 (mirroring), RAID-4 e RAID-5
       tramite software. Con le MD, non sono cos richiesti hard
       ware o controller speciali per ottenere molti dei benefici
       della tecnologia RAID.

       Questo documento NON  un'introduzione alla tecnologia RAID;
       questa dovrete cercarla da qualche altra parte.




  3. D: Quali livelli di RAID implementa il kernel di Linux?

       R: Striping (RAID-0) e la concatenazione lineare sono parte
       dei kernel della serie 2.x.  La qualit di questo codice 
       buona (production quality);  ben compreso e ben aggiornato.
        usato in diversi grandi USENET news server.


       RAID-1, RAID-4 e RAID-5 sono parte del kernel dalla versione
       2.1.63 in poi. Per i kernel delle serie 2.0.x e 2.1.x , vi
       sono patch che forniscono questa funzione. Non sentitevi
       obbligati ad aggiornare il kernel alla versione 2.1.63;
       l'aggiornamento del kernel  difficile;  *molto* pi facile
       applicare una patch ad un kernel precedente. La maggioranza
       degli utenti di RAID utilizza kernel 2.0.x, ed  su queste
       versioni che si  focalizzato lo sviluppo storico della
       tecnologia RAID. Al momento queste implementazioni sono da
       considerarsi in stadio di codice "quasi di buona qualit";
       non ci sono bug noti ma ci sono dei lati poco sofisticati e
       dei setup di sistema non testati. Sono comunque molti gli
       utenti che usano il Software RAID in un ambiente di lavoro.


       La funzionalit RAID-1 "hot reconstruction"  stata
       recentemente introdotta (Agosto 1997) e deve essere
       considerata in stadio di alfa testing. La funzionalit
       RAID-5 "hot reconstruction" sar in alfa test prima o poi.


       Una parola va spesa sulla prudenza da usare con i kernel di
       sviluppo della serie 2.1.x: questi sono meno stabili per
       molteplici ragioni. I nuovi controller di dischi (ad es.
       Ultra Promise) sono supportati solo nei kernel 2.1.x.
       Tuttavia i kernel della serie 2.1.x hanno subito molti
       cambiamenti del driver per i dispositivi a blocchi, nel
       codice DMA e interrupt, in quello per le interfacce PCI,
  IDE, SCSI e nel driver dei controller di dischi. La
  combinazione di questi fattori, abbinata ad hard disk a
  basso prezzo e/o a cavi di scarsa qualit pu portare a
  discreti disastri. Il tool ckraid, come fsck e mount mette
  sotto stress il sistema RAID. Tutto questo pu portare
  all'impossibilit di fare il boot del sistema, una
  situazione dove anche la combinazione magica alt-SysReq non
  ci salver. Siate prudenti con i kernel 2.1.x e aspettatemi
  problemi. Oppure utilizzate ancora il kernel 2.0.34.




  4. D: Utilizzo un vecchio kernel. Dove posso trovare le patch?

       R: La funzionalit RAID-0 Software e quella "linear mode"
       fanno parte di tutti i nuovi kernel di Linux. Le patch per
       le funzionalit Software RAID-1,4,5 sono disponibili su
       <http://luthien.nuclecu.unam.mx/~miguel/raid>.  e sul quasi
       mirror <ftp://linux.kernel.org/pub/linux/daemons/raid/> per
       patch, tool e varie..



  5. D: Dove posso trovare del materiale sulla tecnologia RAID per
     Linux?

       R:

         Panoramica generale su RAID:
          <http://www.dpt.com/uraiddoc.html>.

         Opzioni di RAID per Linux:
          <http://linas.org/linux/raid.html>.

         Ultima versione di questo documento:
          <http://linas.org/linux/Software-RAID/Software-
          RAID.html>.

         Archivio della mailing-list Linux-RAID:
          <http://www.linuxhq.com/lnxlists/>.

         Linux Software RAID Home Page:
          <http://luthien.nuclecu.unam.mx/~miguel/raid>.

         Linux Software RAID tools:
          <ftp://linux.kernel.org/pub/linux/daemons/raid/>.

         Come configurare linear/stripped Software RAID:
          <http://www.ssc.com/lg/issue17/raid.html>.

         Bootable RAID mini-HOWTO:
          <ftp://ftp.bizsystems.com/pub/raid/bootable-raid>.

         Root RAID HOWTO: <ftp://ftp.bizsystems.com/pub/raid/Root-
          RAID-HOWTO>.

         Linux RAID-Geschichten:
          <http://www.infodrom.north.de/~joey/Linux/raid/>.



  6. D: Chi posso accusare di aver scritto questo documento?

       R: Questo documento  stato messo insieme da Linas Vepstas.
       Comunque molte informazioni e anche qualche parola sono
  state fornite da:

    Bradley Ward Allen <ulmo@Q.Net>

    Luca Berra <bluca@comedia.it>

    Brian Candler <B.Candler@pobox.com>

    Bohumil Chalupa <bochal@apollo.karlov.mff.cuni.cz>

    Rob Hagopian <hagopiar@vu.union.edu>

    Anton Hristozov <anton@intransco.com>

    Miguel de Icaza <miguel@luthien.nuclecu.unam.mx>

    Marco Meloni <tonno@stud.unipg.it>

    Ingo Molnar <mingo@pc7537.hil.siemens.at>

    Alvin Oga <alvin@planet.fef.com>

    Gadi Oxman <gadio@netvision.net.il>

    Vaughan Pratt <pratt@cs.Stanford.EDU>

    Steven A. Reisman <sar@pressenter.com>

    Michael Robinton <michael@bzs.org>

    Martin Schulze <joey@finlandia.infodrom.north.de>

    Geoff Thompson <geofft@cs.waikato.ac.nz>

    Edward Welbon <welbon@bga.com>

    Rod Wilkens <rwilkens@border.net>

    Johan Wiltink <j.m.wiltink@pi.net>

    Leonard N. Zubkoff <lnz@dandelion.com>

    Marc ZYNGIER <zyngier@ufr-info-p7.ibp.fr>


     Copyright

    Copyright (C) 1994-96 Marc ZYNGIER

    Copyright (C) 1997 Gadi Oxman, Ingo Molnar, Miguel de
     Icaza

    Copyright (C) 1997, 1998 Linas Vepstas

    Secondo le leggi sul copyright, i copyright sulle
     rimanenti parti sono implicitamente di coloro che hanno
     contribuito a questo documento e che sono stati
     precedentemente menzionati.


     Grazie a tutti di essere qui!





  2.  Considerazioni su RAID


  1. D: Cosa  RAID? Perch mai dovrei usarlo?

       R: RAID  una maniera per combinare diversi disk drive in
       una singola unit, in modo da aumentare le prestazioni e/o
       l'affidabilit. Vi sono diversi tipi e implementazioni di
       RAID, ognuna con i suoi vantaggi e svantaggi. Per esempio,
       mettendo una copia degli stessi dati su due dischi (cosa
       chiamata disk mirroring, o RAID livello 1), le prestazioni
       in lettura possono essere migliorate leggendo alternativa
       mente da ogni disco nel sistema di mirror. In media ogni
       disco  meno occupato poich effettua solo 1/2 (nel caso di
       2 dischi) o 1/3 (nel caso di tre dischi e cos via) delle
       letture richieste. In pi un sistema di mirror pu aumentare
       l'affidabilit: se un disco si rompe, gli altri dischi con
       tengono una copia dei dati. Differenti maniere di combinare
       pi dischi in uno, dette livelli RAID, possono fornire una
       superiore capacit di immagazzinamento dei dati del semplice
       mirroring, o possono alterare i tempi di attesa (tempi di
       accesso), o il throughput (transfer rate), nella lettura o
       scrittura, offrendo comunque la ridondanza che risulta utile
       in caso di malfunzionamenti.

       Anche se RAID pu proteggere da eventuali malfunzionamenti
       del disco, non protegge da errori dell'operatore e dell'
       amministratore (errori umani), o da errori dovuti a bug di
       programmazione (forse dovuti anche ad errori nello stesso
       software RAID). La rete abbonda di storie tragiche di
       amministratori di sistema che hanno installato RAID e hanno
       perso tutti i loro dati.  RAID non sostituisce un backup
       frequente e regolarmente programmato.


       RAID pu essere implementato via hardware, attraverso
       speciali controller di dischi, o via software, come un
       modulo del kernel che si interpone tra i driver di basso
       livello dei dischi e il file system. L'hardware RAID
       consiste comunque di un "controller di dischi", una
       periferica alla quale si possono collegare i disk drive.
       Usualmente si presenta come una scheda che si pu connettere
       su uno slot ISA/EISA/PCI/S-Bus/MicroChannel. Tuttavia
       qualche controller RAID  fatto per connettersi a met del
       cavo che collega il normale controller ai dischi. Quelli
       piccoli possono entrare nell'alloggiamento di un drive;
       quelli grandi possono essere installati in un loro cabinet
       con i loro alloggiamenti per dischi e una loro
       alimentazione.  Il pi recente hardware RAID usato con le
       ultime e pi veloci CPU fornir probabilmente la migliore
       performance, ad un prezzo comunque abbastanza alto. Questo
       perch molti controller RAID contengono un DSP e della
       memoria cache che permette di togliere una fetta
       considerevole di carico alla CPU, e permettono un alto
       transfer rate grazie alla ampia memoria cache del
       controller. Il vecchio hardware RAID pu agire come "freno"
       del sistema se usato con le nuove CPU: i vecchi DSP e
       memorie cache fanno da collo di bottiglia e la performance
       globale  spesso superata da quella del semplice RAID
       software e dai nuovi, normalissimi, controller.  Il RAID
       implementato via hardware  pu essere vantaggioso rispetto a
       quello via software se pu far uso della sincronizzazione
       dei dischi e pu sapere la posizione della testina del disco
       rispetto al blocco del disco desiderato.   vero per che
       molti dischi moderni (a basso costo) non offrono questi
       livelli di informazione e controllo sulla loro attivit e
  quindi molto hardware RAID non ne trae vantaggio.
  L'hardware RAID di diverse marche, versioni e modelli 
  normalmente incompatibile. Se un controller RAID si rompe,
  deve essere rimpiazzato da un altro controller dello stesso
  tipo. Al momento della stesura di questo documento (giugno
  1998) un'ampia gamma di controller hardware funzioner sotto
  Linux; in ogni caso nessuno di questi viene venduto con
  delle utilit di configurazione e gestione che funzionino
  sotto Linux.

  Software-RAID  formato da un set di moduli del kernel,
  combinato con delle utilit di gestione che implementano
  RAID solamente tramite software e non richiedono hardware
  speciale. Il sottosistema RAID di Linux  implementato come
  strato del kernel che si pone tra i driver a basso livello
  dei dischi (per dischi IDE, SCSI e Paraport) e l'interfaccia
  del dispositivo a blocchi. Il file system, sia esso ext2fs,
  DOS-FAT o altro, rimane sopra l'interfaccia del dispositivo
  a blocchi. Software-RAID, grazie alla sua natura software,
  risulta essere pi flessibile di una soluzione hardware.  Il
  lato negativo  che richiede un maggiore utilizzo della CPU
  per poter girare bene rispetto ad una uguale implementazione
  hardware. Naturalmente sul costo non pu essere battuto.
  Software-Raid ha una ulteriore importante caratteristica
  distintiva: opera su partizioni, perci la partizione RAID 
  formata da un certo numero di partizioni di dischi. Questo
  contrasta con le soluzioni adottate da gran parte dell'
  hardware RAID, che uniscono assieme interi dischi per
  formarne una serie.  Fatto sta che utilizzando l'hardware si
  ha una sottosistema RAID trasparente rispetto al sistema
  operativo, cosa che tende a semplificare la gestione. Con il
  software, ci sono molte pi opzioni di configurazione e
  scelte, che tendono a complicare la faccenda.


  Al momento della stesura di questo testo (giugno 1998) la
  gestione del RAID sotto Linux non  affatto banale, ed  una
  buona prova anche per degli esperti amministratori di
  sistema.  La teoria delle operazioni  complessa. I tool di
  sistema richiedono  modifiche agli script di avvio.
  Riprendere il controllo della situazione dopo un
  malfunzionamento del disco  un'operazione complessa che
  agevola l'errore umano. RAID non  per i novizi, ed ogni
  beneficio che pu apportare all'affidabilit e alle
  prestazioni pu essere facilmente controbilanciato da una
  maggiore complessit. In realt i moderni dischi sono
  incredibilmente affidabili e le moderne CPU e i controller
  sono veramente potenti. Si possono ottenere pi facilmente i
  livelli di prestazione e l'affidabilit desiderate
  acquistando hardware di alta qualit e/o pi veloce



  2. D: Cosa sono i livelli RAID? Perch cos tanti? Cosa li distingue?

       R: Differenti livelli RAID hanno prestazioni, ridondanza,
       capacit di immagazzinamento, affidabilit e costi differ
       enti. Molti, ma non tutti, i livelli RAID offrono ridondanza
       per cautelarsi contro i malfunzionamenti dei dischi. Di
       quelli che implementano la ridondanza RAID-1 e RAID-5 sono i
       pi popolari.  RAID-1 offre migliori prestazioni mentre
       RAID-5 un uso pi efficiente dello spazio disco a dispo
       sizione. Comunque cercare la migliore prestazione  una cosa
       completamente differente poich la performance dipende
       fortemente da un'ampia gamma di fattori, dal tipo di appli
       cazione alle dimensioni delle strisce, dei blocchi e dei
  file. Gli aspetti pi difficoltosi della ricerca della
  migliore performance sono rimandati ad una sezione di questo
  HOWTO che vedremo dopo.

  Quanto segue descrive i differenti livelli RAID nel contesto
  dell'implementazione su Linux del Software RAID.


    RAID-linear  una semplice concatenazione di partizioni
     che creano una pi ampia partizione virtuale.  utile se
     si ha un certo numero di piccoli dischi e si vuole creare
     una unica, grande partizione. Questa concatenazione non
     offre ridondanza ed in effetti diminuisce l'affidabilit
     globale; la partizione cos creata smetter di funzionare
     non appena un solo disco si rovina.


    RAID-1  chiamato anche "mirroring".  Due (o pi)
     partizioni, tutte della stessa grandezza, contengono
     ciascuna una copia degli stessi dati che risultano
     disposti nella stessa maniera sulle due partizioni (in
     inglese "disk-block by disk-block". ndt).  Il mirroring
     offre una forte protezione contro i malfunzionamenti dei
     dischi: se un disco si rompe se ne ha un altro con gli
     stessi dati. Il mirroring pu anche migliorare le
     prestazioni in sistemi "I/O laden" (con grossi carichi di
     input-output. ndt) poich le richieste di lettura possono
     essere divise su pi dischi. Sfortunatamente il mirroring
      il meno efficiente in materia di capacit di
     immagazzinamento: due partizioni in mirroring posso
     immagazzinare gli stessi dati di una.



    "Striping"  l'idea che sta dietro a tutti gli altri
     livelli RAID. Una striscia (in inglese "stripe" da cui il
     nome di "striping". ndt)  una sequenza continua di
     blocchi del disco. Una striscia pu essere cos corta da
     contenere un solo blocco disco o pu contenerne
     centinaia. I driver RAID dividono le partizioni in
     strisce; i vari livelli RAID differiscono nella maniera
     di organizzare le strisce e nei dati che vi memorizzano.
     Il rapporto tra le dimensioni delle strisce, la grandezza
     pi ricorrente dei file nel file system e la loro
     disposizione nel disco  quello che determina le
     prestazioni globali di un sottosistema RAID.



    RAID-0  molto simile a RAID-linear, tranne per il fatto
     che le partizioni che lo compongono vengono divise in
     strisce e quindi suddivise. Come nel caso del RAID-linear
     il risultato  una singola partizione virtuale. Ancora
     come RAID-linear, RAID-0 non offre ridondanza diminuendo
     quindi l'affidabilit globale: il malfunzionamento di un
     solo disco mette fuori uso tutto. Spesso si crede che
     RAID-0 abbia prestazioni migliori rispetto a RAID-linear.
     Questo pu essere o non essere vero, dipendendo dalle
     caratteristiche del file system, dalla grandezza pi
     frequente dei file comparata con la dimensione delle
     strisce e dal tipo di carico a cui  sottoposto. Il file
     system ext2fs dispone i file in una partizione in modo da
     diminuire la frammentazione. Cos, per semplicit, ogni
     dato accesso pu essere indirizzato ad uno o pi dischi e
     quindi la suddivisione delle strisce su pi dischi non
     offre un vantaggio apparente. Comunque sia vi sono delle
     differenze nelle prestazioni, dipendenti dai dati, dal
     carico di lavoro e dalla dimensione delle strisce.



    RAID-4 suddivide in strisce come RAID-0, ma richiede una
     partizione aggiuntiva per memorizzare le informazioni
     sulla parit. La parit  usata per offrire ridondanza
     sui dati: se un disco si rovina i dati sui dischi
     rimanenti possono essere usati per ricostruire quelli che
     erano sul disco rotto. Dati N dischi di dati e un disco
     di parit, la striscia di parit  computata prendendo
     una striscia da ognuno dei dischi di dati ed effettuando
     un XOR tra di esse. Quindi la capacit di memorizzazione
     di una serie di (N+1) dischi RAID-4  N, molto meglio del
     mirroring di (N+1) dischi e buona come un setup RAID-0,
     per N grande. Da notare che per N=1 vi  un disco di dati
     e un disco di parit e RAID-4 somiglia molto al
     mirroring, nel quale ognuno dei due dischi  la copia
     dell'altro. RAID-4 NON offre le prestazioni in
     lettura/scrittura del mirroring ed anzi la sua
     performance in scrittura  considerevolmente peggiore.
     In breve questo accade a causa del fatto che
     l'aggiornamento della parit richiede la lettura della
     vecchia parit prima che la nuova parit venga calcolata
     e scritta.  In ambienti con un grosso carico di scrittura
     il disco di parit pu diventare un collo di bottiglia
     poich ogni processo di scrittura deve accedere al disco
     di parit.



    RAID-5 evita il collo di bottiglia in scrittura di RAID-4
     memorizzando la striscia di parit su ognuno dei dischi.
     Ovviamente la prestazione in scrittura non  ancora buona
     come quella del mirroring, visto che la striscia di
     parit deve anche qui essere letta e deve esservi
     effettuato lo XOR prima che sia scritta. Anche la
     prestazione in lettura non  buona come quella del
     mirroring poich, dopo tutto, vi  una sola copia dei
     dati e non due o pi. Il vantaggio principale di RAID-5
     sul mirroring  che offre ridondanza e protezione nel
     caso di malfunzionamento di un solo disco, e allo stesso
     tempo ha una capacit di memorizzazione molto pi alta
     quando  usato con tre o pi drive.



    RAID-2 e RAID-3 sono usati raramente, e sono stati in
     qualche maniera resi obsoleti dalla moderna tecnologia
     dei dischi. RAID-2  simile a RAID-4, ma memorizza
     informazioni ECC al posto della parit.  Poich tutti i
     dischi moderni incorporano sotto sotto un controllo ECC,
     il vantaggio  minimo. RAID-2 pu dare una maggiore
     coerenza ai dati se viene a mancare la corrente mentre 
     in corso un'operazione di scrittura; per un gruppo di
     continuit e uno shutdown pulito danno gli stessi
     vantaggi.  RAID-3  simile a RAID-4 tranne per il fatto
     che usa la minore grandezza possibile per le strisce.  Il
     risultato  che ogni operazione di lettura interessa
     tutti i dischi, facendo diventare difficile/impossibile
     soddisfare richieste di I/O contemporanee. Per evitare il
     ritardo dovuto alla latenza rotazionale RAID-3 richiede
     che la rotazione di tutti i dischi possa essere
     sincronizzata. Molto hardware moderno non dispone della
     capacit di sincronizzazione o, se ne dispone, mancano i
     connettori necessari, i cavi e la documentazione di chi
     lo ha prodotto. N RAID-2 n RAID-3 sono livelli RAID
     supportati dai driver di Software RAID per Linux.



    Altri livelli RAID sono stati definiti da vari
     ricercatori e produttori. Molti di questi non sono altro
     che la sovrapposizione di un tipo di raid su un altro.
     Qualcuno richiede dell'hardware speciale e altri sono
     protetti da brevetto. Non vi  una nomenclatura
     universalmente accettata per questi altri livelli. A
     volte i vantaggi di questi altri sistemi sono piccoli o
     almeno non appaiono finch il sistema non  sottoposto ad
     un alto livello di stress. Eccettuata la sovrapposizione
     di RAID-1 su RAID-0/linear, il Software RAID per Linux
     non consente nessuna di queste altre variazioni.



  3.  Considerazioni sul setup e sull'installazione


  1. D: Quale  il modo migliore di configurare Software RAID?

       R: Continuamente riscopro il fatto che la pianificazione del
       file-system  uno dei lavori pi difficili sotto Unix. Per
       rispondere alla domanda, posso descrivere cosa si pu fare.

       Supponiamo il setup che segue:

         2 dischi EIDE, da 2.1 Gb ciascuno.


       disco partizione montata su   dimensione    dispositivo
         1      1       /                 300M   /dev/hda1
         1      2       swap               64M   /dev/hda2
         1      3       /home             800M   /dev/hda3
         1      4       /var              900M   /dev/hda4

         2      1       /root             300M   /dev/hdc1
         2      2       swap               64M   /dev/hdc2
         2      3       /home             800M   /dev/hdc3
         2      4       /var              900M   /dev/hdc4





    Ogni disco  su un controller (e cavo) separato.  La mia
     teoria  che un guasto al controller o al cavo non
     mander in tilt tutti e due i dischi. Questo permette un
     miglioramento delle performance rispetto alla gestione di
     operazioni parallele

    Installare Linux su (/) della  partizione /dev/hda1.
     Marcare questa partizione come avviabile.

    /dev/hdc1 conterr una copia ``fredda'' di /dev/hda1.
     Questa non  una copia RAID,  proprio una semplice
     copia. Serve solamente nel caso che il primo disco si
     rompa; si pu usare un disco, di recupero, marcare
     /dev/hdc1 come avviabile, e usare questa partizione per
     continuare a lavorare senza dover reinstallare il
     sistema. Pu anche essere utile mettere una copia del
     kernel di /dev/hdc1 su LILO per semplificare il boot in
     caso di malfunzionamento.

     Qui si suppone che nel caso di un grave malfunzionamento
     si possa ancora far partire il sistema senza
     preoccupazioni riguardanti la corruzione dei superblock
     raid o di altri errori del raid che non si capiscono.

    /dev/hda3 e /dev/hdc3 saranno il mirror /dev/md0.

    /dev/hda4 e /dev/hdc4 saranno il mirror /dev/md1.

    abbiamo scelto/var e /home per essere mirrorate in
     partizioni separate, seguendo questa logica

    / (la partizione root) conterr dati relativamente
     statici, non soggetti a cambiamenti. Ad ogni effetto sar
     si sola lettura anche se non sar impostata e montata
     veramente in sola lettura


    /home conterr i dati che cambiano "lentamente".

    /var conterr i dati che cambiano rapidamente, inclusi i
     mail spool, i database ed i log del web server.

     L'idea che sta dietro all'uso di pi partizioni separate
      che se, per qualche bizzarra, ragione che sia un errore
     umano, un calo di tensione, o altro il sistema operativo
     impazzisce, il danno  limitato ad una sola partizione.
     In un caso tipico vi  un calo di tensione mentre il
     sistema sta scrivendo sul disco. Questo lascer
     sicuramente il file system in uno stato di
     inutilizzabilit, a cui sar posto rimedio da fsck nel
     boot seguente. Anche se fsck far del suo meglio per
     rimettere a posto la situazione evitando di fare
     ulteriori danni,  confortante sapere che ogni danno 
     stato limitato ad una sola partizione. In un altro caso
     tipico l'amministratore di sistema fa un errore durante
     le operazioni di recupero del file system, cosa che porta
     alla cancellazione o alla distruzione dei dati.  L'uso
     delle partizioni pu aiutare a contenere le ripercussioni
     degli errori dell'operatore.

    Un'altra scelta ragionevole per la disposizione delle
     partizioni potrebbe essere quella di /usr o di /opt.  In
     effetti, /opt e /home sono una buona scelta come
     partizioni RAID-5, se si hanno pi hard disk. Una parola
     sulla prudenza da utilizzare: NON mettere /usr in una
     partizione RAID-5. Se si avesse un grave malfunzionamento
     si potrebbe scoprire che non si pu montare /usr, e che
     si ha bisogno di qualche strumento che vi risiede (ad es.
     i programmi per la rete, o il compilatore.)  Con RAID-1,
     se si ha un malfunzionamento e RAID smette di funzionare,
     si pu almeno montare uno dei due mirror.  La stessa cosa
     non si pu fare con ogni altro livello RAID (RAID-5,
     striping, linear RAID).



     Cos, per rispondere alla domanda:

    installare il S.O. sul disco 1, partizione 1.  NON
     montare altre partizioni.

    installare RAID seguendo le istruzioni.

    configurare md0 e md1.

    convincersi del fatto che si sa che cosa fare in caso di
     malfunzionamento del disco! Si scoprano gli errori
     dell'amministratore di sistema adesso, non non durante
     una vera crisi!  Sperimentate!  (noi abbiamo tolto
     corrente durante l'attivit del disco, poco ortodosso ma
     fa imparare molto).

    effettuate una successione di
     mount/copy/unmount/rename/reboot per muovere /var su
     /dev/md1.  Fatelo attentamente, non  pericoloso.

    godetevi il tutto!



  2. D: Quale  la differenza tra i comandi mdadd, mdrun, etc. e quelli
     raidadd, raidrun?

       R: I nomi dei tool sono stati cambiati dalla versione 0.5
       del pacchetto raidtools. La convenzione che voleva che i
       comandi iniziassero per  md era usata nella versione 0.43 e
       precedenti, mentre quella nuova che fa iniziare i comandi
       per raid viene usata nella versione 0.5 e successive.



  3. D: Vorrei utilizzare RAID-Linear/RAID-0 presente nel kernel 2.0.34.
     Vorrei non applicare la patch raid, poich non sono richieste per
     RAID-0/Linear. Dove posso procurarmi i tool RAID per gestire il
     sistema?

       R: Questa  una bella domanda, poich i pi nuovi tool raid
       abbisognano che le patch RAID-1,4,5 siano state applicate al
       kernel per compilarsi. Non conosco versioni binarie, precom
       pilate dei tool raid disponibili in questo momento. Comunque
       sia, esperimenti hanno dimostrato che i file binari dei tool
       raid, compilati su un kernel 2.1.100, sembrano funzionare
       abbastanza bene nella creazione di una partizione
       RAID-0/linear sotto 2.0.34. Un'anima impavida me li ha chi
       esti ed io ho temporaneamente reso disponibili i binari di
       mdadd, mdcreate, ecc, su http://linas.org/linux/Software-
       RAID/ Avrete bisogno delle pagine di manuale, ecc. che si
       trovano nel pacchetto standard dei raid-tools.



  4. D: Posso mettere in strip/mirror la partizione di root (/)?  Perch
     non posso far partire Linux direttamente dai dischi md?


       R: Sia LILO che Loadlin hanno bisogno di una partizione che
       non sia in strip/mirror per potervi leggere l'immagine del
       kernel.  Se volete mettere in strip/mirror la partizione di
       root (/), avrete bisogno di creare una partizione che non
       sia in strip/mirror dove poter mettere il kernel. Tipica
       mente questa partizione viene chiamata /boot. Fatto questo
       si pu quindi usare o il supporto per il ramdisk iniziale
       (initrd) o le patch di Harald Hoyer <HarryH@Royal.Net> che
       consentono ad una partizione in strip/mirror di essere usata
       come root. (Adesso queste patch sono una parte standard dei
       recenti kernel 2.1.x)


       Si possono usare approcci diversi.  Uno  documentato
  dettagliatamente nel Bootable RAID mini-HOWTO:
  <ftp://ftp.bizsystems.com/pub/raid/bootable-raid>.


  In alternativa, si pu usare mkinitrd per costruire
  un'immagine per il ramdisk, vedere di seguito.


  Edward Welbon <welbon@bga.com> ha scritto:

    ... tutto quello che serve  uno script che gestisca il
     setup di boot.  Per montare un file system md come root,
     la cosa principale da fare  costruire un'immagine
     iniziale del file system che abbia i moduli e i tool md
     necessari per far partire md. Io ho un semplice script
     che fa tutto ci.


    Come supporto per il boot utilizzo un piccolo ed
     economico disco SCSI (170MB lo ho preso usato per $20).
     Il disco  collegato ad un AHA1452, ma avrebbe potuto
     essere un disco IDE a buon prezzo sull'interfaccia nativa
     IDE.  Non c' bisogno che sia un disco molto veloce
     poich serve solamente per il boot.


    Questo disco contiene un piccolo file system dove trova
     posto il kernel e l'immagine del file system per initrd.
     L'immagine iniziale del file system contiene abbastanza
     roba da permettermi di caricare il modulo driver per il
     dispositivo raid SCSI e poter accedere alla partizione
     che diverr root.  Poi eseguo un


       echo 0x900 > /proc/sys/kernel/real-root-dev





  (0x900  per /dev/md0) e esco da linuxrc.  Il boot procede
  normalmente da qui in poi.


    Ho compilato molti driver come moduli eccetto quello per
     l'AHA1452 che serve per il file system initrd.  Il kernel
     che uso  cos molto piccolo. Il metodo  perfettamente
     affidabile, lo sto usando sin da prima della versione
     2.1.26 e non ho mai avuto un problema che non sia
     riuscito a risolvere facilmente. Il file system 
     addirittura sopravvissuto a diversi crash dei kernel
     2.1.4[45] senza reali difficolt.


    Una volta avevo partizionato i dischi raid in maniera
     tale che i cilindri iniziali del primo disco raid
     contenevano il kernel e i cilindri iniziali del secondo
     disco raid contenevano l'immagine iniziale del file
     system, adesso invece ho messo la swap nei primi cilindri
     dei dischi raid poich questi sono i pi veloci (perch
     sprecarli nel boot?).


    La cosa bella dell'avere un dispositivo che costa poco
     dedicato al boot  che  facile effettuarne il boot e che
     risulta utile come disco di recupero se necessario. Se
     siete interessati, potete dare un'occhiata allo script
     che genera l'immagine iniziale per il ram disk e che
     quindi fa partire LILO.

       <http://www.realtime.net/~welbon/initrd.md.tar.gz>



  Per adesso  abbastanza per fare quello che serve.  Non 
  specificamente bello e potrebbe sicuramente costruire
  un'immagine del file system molto pi piccola per il ram
  disk iniziale. Dovrebbe essere facile renderlo pi effi
  ciente.  Ma del resto usa LILO cos com'.  Se gli apportate
  dei miglioramenti vi prego di mandarmene una copia. 8-)



  5. D: Ho sentito dire che si pu usare il mirroring sullo striping
     RAID.   vero? Posso usare il mirroring sul dispositivo di
     loopback?

       R: Si, ma non il contrario. Si pu mettere una striscia su
       pi dischi e poi effettuarne il mirroring. Comunque sia lo
       striping non pu essere messo al di sopra del mirroring.


       Per darne una breve spiegazione tecnica si pu dire che le
       personality linear e stripe usano la routine ll_rw_blk per
       gli accessi. La routine ll_rw_blk mappa dispositivi di
       dischi e settori, non blocchi. I dispositivi a blocchi
       possono essere stratificati uno sull'altro; ma i dispositivi
       che effettuano un accesso al disco diretto, a basso livello,
       come fa ll_rw_blk non possono essere sovrapposti.


       In questo momento (Novembre 1997) RAID non pu funzionare
       sui dispositivi di loopback, anche se questo dovrebbe essere
       possibile a breve.



  6. D: Ho due piccoli dischi e tre dischi pi grandi. Posso concatenare
     i due dischi piccoli con RAID-0 e quindi creare una partizione
     RAID-5 con questi e quelli pi grandi?

       R: In questo momento (Novembre 1997), non si pu creare una
       partizione RAID-5 in questa maniera. Si pu farlo solo con
       RAID-1 al di sopra della concatenazione dei drive.



  7. D: Quale  la differenza tra RAID-1 e RAID-5 per una configurazione
     che prevede due dischi (cio la differenza tra una serie di due
     dischi RAID-1 e una serie di due dischi RAID-5)?

       R: Non c' differenza nella capacit di immagazzinamento.
       Non si possono aggiungere dischi a nessuno dei due sottosis
       temi per aumentarne la capacit (vedi la domanda qui di
       seguito per i dettagli).


       RAID-1 offre un vantaggio nella prestazione in lettura: il
       driver RAID-1 usa la tecnologia distributed-read (lettura
       distribuita. ndt) per leggere contemporaneamente due
       settori, uno da ogni disco, raddoppiando la performance in
       lettura.
  Il driver RAID-5, anche se fortemente ottimizzato,
  attualmente (Settembre 1997) non considera il fatto che il
  disco di parit  una copia del disco dati. Quindi le
  letture avvengono in maniera seriale.




  8. D: Come posso proteggermi dal malfunzionamento di due dischi?


       A: Qualcuno degli algoritmi RAID protegge da un malfunziona
       mento multiplo dei dischi, ma nessuno di questi algoritmi 
       attualmente implementato da Linux. Detto ci il Software
       RAID per Linux pu essere utilizzato per proteggersi da un
       malfunzionamento di pi dischi stratificando serie su serie
       di dischi. Per esempio, nove dischi possono essere utiliz
       zati per creare tre serie raid-5.  Quindi queste tre serie
       possono a loro volta essere legate assieme in una singola
       serie di dischi RAID-5.  In effetti questo tipo di configu
       razione arriva a proteggere da un malfunzionamento di tre
       dischi. Va notato il fatto che una grande quantit di spazio
       disco va ''persa'' per la ridondanza delle informazioni.



           Per una serie di NxN dischi raid-5
           N=3, 5 dischi su 9 sono usati per la parit (=55%)
           N=4, 7 dischi su 16
           N=5, 9 dischi su 25
           ...
           N=9, 17 dischi su 81 (=~20%)





  In generale, una serie di MxN dischi user MxN-1 dischi per
  la parit. Lo spazio "perso"  minimo quando M=N.

  Un'altra alternativa  quella di creare una serie RAID-1 con
  tre dischi. Va notato il fatto che poich tutti e tre i
  dischi contengono dati identici, 2/3 dello spazio vanno
  ``sprecati''.




  9. D: Mi piacerebbe capire come  possibile che ci sia un programma
     tipo fsck: se la partizione non  stata smontata in maniera
     ortodossa, fsck interviene e riaggiusta il filesystem da solo in
     pi del 90% dei casi. Poich la macchina  capace di porsi rimedio
     da sola con ckraid --fix, perch non farlo diventare automatico?


       R: Si pu ottenere ci aggiungendo linee come le seguenti a
       /etc/rc.d/rc.sysinit:

           mdadd /dev/md0 /dev/hda1 /dev/hdc1 || {
               ckraid --fix /etc/raid.usr.conf
               mdadd /dev/md0 /dev/hda1 /dev/hdc1
           }




  o

      mdrun -p1 /dev/md0
      if [ $? -gt 0 ] ; then
              ckraid --fix /etc/raid1.conf
              mdrun -p1 /dev/md0
      fi



  Prima di presentare uno script pi completo e affidabile,
  rivediamo la teoria delle operazioni.

  Gadi Oxman ha scritto: In uno shutdown sporco, Linux pu
  rimanere in uno degli stati seguenti:

    Il dischi RAID erano stati aggiornati con i dati
     contenuti nella memoria cache a loro destinata quando 
     avvenuto lo shutdown; non sono andati persi dati.

    La memoria cache dei dischi RAID conteneva informazioni
     non scritte sui dischi quando  avvenuto il blocco del
     sistema; questo ha portato ad un filesystem danneggiato e
     potenzialmente alla perdita di dati.

     Quest'ultimo stato pu essere ulteriormente suddiviso in
     altri due stati:


    Linux era in fase di scrittura dati quando si  avuto lo
     shutdown.

    Linux non era in fase di scrittura dati quando si 
     verificato il blocco.


     Supponiamo che stavamo usando una serie di dischi RAID-1.
     Nel caso (2a) potrebbe accadere che, prima del blocco, un
     piccolo numero di blocchi dati sia stato scritto con
     successo su solo alcuni dei dischi di mirror e al
     prossimo boot i mirror non conterranno pi` gli stessi
     dati.

     Se si ignorassero le differenze dei mirror, il codice di
     bilanciamento della lettura dei raidtools-0.36.3 potrebbe
     scegliere di leggere i suddetti dati da uno qualsiasi dei
     dischi di mirror, cosa che porterebbe ad un comportamento
     incoerente (per esempio, l`output di e2fsck -n /dev/md0
     potrebbe essere differente di volta in volta).


     Poich RAID non protegge dagli shutdown sporchi,
     usualmente non c`e` un modo ''sicuramente corretto'' di
     correggere le differenze nei dischi di mirror e il
     danneggiamento del filesystem.

     Per esempio il comportamento predefinito di ckraid --fix
     sar quello di scegliere il primo disco di mirror
     operativo e aggiornare gli altri dischi di mirror con il
     suo contenuto.  Tuttavia, a seconda della situazione dei
     dischi al momento del blocco, i dati negli altri dischi
     di mirror potrebbero essere pi recenti e si potrebbe
     scegliere di copiare i dati da quei dischi o forse di
     usare un metodo differente per riparare le cose.

     Lo script che segue definisce una delle pi robuste
     sequenze di boot. In particolare si cautela dalle lunghe
     ripetizioni dell`esecuzione di ckraid quando si ha a che
     fare con dischi, controller o driver dei controller che
     non cooperano.  Lo si modifichi in modo da adeguarlo alla
     propria configurazione, e lo si copi su rc.raid.init.
     Quindi si esegua rc.raid.init dopo che la partizione di
     root  stata controllata da fsck e montata in
     lettura/scrittura ma prima che le rimanenti partizioni
     siano controllate da fsck. Assicurarsi che la directory
     attuale sia nel percorso di ricerca.

         mdadd /dev/md0 /dev/hda1 /dev/hdc1 || {
             rm -f /fastboot             # forza l`esecuzione di fsck
             ckraid --fix /etc/raid.usr.conf
             mdadd /dev/md0 /dev/hda1 /dev/hdc1
         }
         # se il sistema si bloccasse pi avanti durante questo processo di boot
         # vorremmo che almeno questo dispositivo md non ne risentisse.
          /sbin/mdstop /dev/md0

         mdadd /dev/md1 /dev/hda2 /dev/hdc2 || {
             rm -f /fastboot             # forza l`esecuzione di fsck
             ckraid --fix /etc/raid.home.conf
             mdadd /dev/md1 /dev/hda2 /dev/hdc2
         }
         # se il sistema si bloccasse pi avanti durante questo processo di boot
         # vorremmo che almeno questo dispositivo md non ne risentisse.
         /sbin/mdstop /dev/md1

         mdadd /dev/md0 /dev/hda1 /dev/hdc1
         mdrun -p1 /dev/md0
         if [ $? -gt 0 ] ; then
             rm -f /fastboot             #  forza l`esecuzione di fsck
             ckraid --fix /etc/raid.usr.conf
             mdrun -p1 /dev/md0
         fi
         # se il sistema si bloccasse pi avanti durante questo processo di boot
         # vorremmo che almeno questo dispositivo md non ne risentisse.
         /sbin/mdstop /dev/md0

         mdadd /dev/md1 /dev/hda2 /dev/hdc2
         mdrun -p1 /dev/md1
         if [ $? -gt 0 ] ; then
             rm -f /fastboot             #   forza l`esecuzione di fsck
             ckraid --fix /etc/raid.home.conf
             mdrun -p1 /dev/md1
         fi
         # se il sistema si bloccasse pi avanti durante questo processo di boot
         # vorremmo che almeno questo dispositivo md non ne risentisse.
         /sbin/mdstop /dev/md1

         # OK, adesso con i soli comandi md. Se ci fossero stati errori
         # i controlli precedenti dovrebbero aver rimesso tutto a posto.
         /sbin/mdadd /dev/md0 /dev/hda1 /dev/hdc1
         /sbin/mdrun -p1 /dev/md0

         /sbin/mdadd /dev/md12 /dev/hda2 /dev/hdc2
         /sbin/mdrun -p1 /dev/md1




  In aggiunta a questo si dovr creare un file rc.raid.halt
  che dovrebbe apparire come questo:


      /sbin/mdstop /dev/md0
      /sbin/mdstop /dev/md1



  Assicuratevi di aver modificato sia rc.sysinit che
  init.d/halt per far eseguire questa procedura da qualsiasi
  parte il filesystem venga smontato prima di un halt/reboot.
  (Si noti che rc.sysinit smonta ed effettua un reboot se fsck
  termina l`esecuzione con un errore.)




  10.
     D: Posso configurare met di un mirror RAID-1 con il solo disco che
     ho adesso e poi dopo aggiungervi semplicemente un altro disco?


       R: Con gli strumenti di adesso no, almeno non in maniera
       semplice.  In particolare non si pu solamente copiare il
       contenuto di un disco su un altro e poi appaiarli. Questo a
       causa del fatto che i driver RAID usano un poco di spazio
       alla fine della partizione per memorizzare i superblock.
       Questo diminuisce leggermente lo spazio disponibile per il
       filesystem; ma se si provasse a forzare una partizione
       RAID-1 su una partizione con un filesystem preesistente, i
       superblock sovrascriverebbero una parte del filesystem con
       fondendo i dati. Poich il filesystem ext2fs distribuisce i
       file in maniera casuale su una partizione (per evitarne la
       frammentazione), con grossa probabilit qualche file
       risieder alla fine della partizione anche se il disco non 
       pieno.


       Se siete abili, suppongo che possiate calcolarvi quanto
       spazio il superblock RAID occuper e quindi rendere il
       filesystem leggermente pi piccolo, in modo da lasciare lo
       spazio di cui la memorizzazione del superblock RAID avr
       bisogno in seguito.  Ma, se siete cos abili, sarete quindi
       abbastanza bravi da modificare i tool in modo tale che lo
       facciano automaticamente (i tool non sono terribilmente
       complessi).


       Nota: il lettore attento avr pensato che il trucco seguente
       potrebbe funzionare; non l'ho provato n verificato:
       Eseguite mkraid con /dev/null come uno dei dispositivi.
       Quindi eseguite mdadd -r sul solo vero disco (non eseguite
       mdadd /dev/null). Il comando mkraid dovrebbe aver
       configurato con successo il sistema raid, e il comando mdadd
       serve solo a forzare il funzionamento del sistema in
       modalit "degradata" (in inglese "degraded mode". ndt), come
       se uno dei due dischi fosse rotto.



  4.  Riparare gli errori


  1. D: Lavoro con un dispositivo RAID-1 (mirroring) e la corrente 
     andata via mentre il disco era in attivit. Cosa devo fare?


       R: La ridondanza che i livelli RAID offrono serve a pro
       teggere nei confronti di un malfunzionamento del disco, non
  contro un difetto di alimentazione.

  Vi sono diversi modi di rimettere le cose a posto in questa
  situazione.


    Metodo (1): Usare i tool raid. Questi possono essere
     usati per rimettere in sincronia il sistema raid. I danni
     al filesystem non vengono corretti; dopo che il sistema
     raid  stato rimesso in sincronia, il filesystem deve
     ancora essere riparato con fsck. I sistemi RAID possono
     essere controllati con ckraid /etc/raid1.conf (per
     RAID-1, altrimenti /etc/raid5.conf, etc.)

     Eseguendo ckraid /etc/raid1.conf --fix il programma
     sceglier uno dei dischi della serie (usualmente il
     primo), e user questo come copia master, copiando i suoi
     blocchi su quelli degli altri dischi nel mirror. Per
     designare un disco da utilizzare come copia master si pu
     usare l'opzione --force-source: per esempio, ckraid
     /etc/raid1.conf --fix --force-source /dev/hdc3 . Il
     comando ckraid pu essere lanciato senza l'opzione --fix
     per verificare il sistema RAID inattivo senza apportargli
     modifiche. Quando vi sentirete a vostro agio con le
     modifiche proposte, potrete aggiungere l'opzione --fix.

    Metodo (2): Paranoico, spenditempo, non molto migliore
     del primo metodo. Assumiamo che la serie di dischi RAID
     sia formata da due dischi, e consista delle partizioni
     /dev/hda3 e /dev/hdc3. Potete provare ci che segue:

     a. fsck /dev/hda3

     b. fsck /dev/hdc3

     c. si decida quale delle due partizioni ha meno errori o
        dove si possano aggiustare meglio o dove sono i dati
        che vi interessano. Scegliete l'una o l'altra come
        nuova copia ``master''. Diciamo che avete scelto
        /dev/hdc3.

     d. dd if=/dev/hdc3 of=/dev/hda3

     e. mkraid raid1.conf -f --only-superblock


     Al posto degli ultimi due passi, potete eseguire ckraid
     /etc/raid1.conf --fix --force-source /dev/hdc3 che
     dovrebbe essere leggermente pi veloce.

    Metodo (3): Versione del metodo precedente per pigri. Se
     non avete voglia di aspettare che il lungo controllo di
     fsck venga completato, va bene anche saltare i primi tre
     passi illustrati sopra e andare direttamente agli ultimi
     due.  Assicuratevi solamente che venga eseguito fsck
     /dev/md0 dopo che avete fatto. Il metodo (3)  solo il
     metodo (1) travestito.


     In ogni caso i passi precedenti serviranno solo a
     sincronizzare i sistemi raid. Il filesystem probabilmente
     avr ancora bisogno di riparazioni: perci fsck dovr
     essere eseguito sul dispositivo md quando esso  attivo e
     non  stato montato.


     Con una serie di tre dischi RAID-1, vi sono pi
     possibilit come quella di usare due dischi per
     ''votare'' una risposta a maggioranza. I tool per
     automatizzare questa procedura attualmente (Settembre 97)
     non esistono.



  2. D: Ho un sistema RAID-4 o RAID-5 (parit) e la corrente  andata
     via mentre i dischi erano in attivit. Cosa devo fare adesso?


       R: La ridondanza che i livelli RAID offrono serve a pro
       teggere nei confronti di un malfunzionamento del disco, non
       contro un difetto di alimentazione.

       Poich i dischi formanti una serie RAID-4 o RAID-5 non con
       tengono un filesystem che fsck pu leggere vi sono meno
       scelte nella riparazione. Non si pu usare fsck per un con
       trollo o una riparazione preliminare; si deve usare prima
       ckraid.



       Il comando ckraid pu essere eseguito in modalit "sicura"
       senza l'opzione --fix per verificare il sistema RAID senza
       apportargli cambiamenti. Quando vi sentirete a vostro agio
       con i cambiamenti proposti baster aggiungere l'opzione
       --fix.


       Se si vuole si pu provare designando uno dei dei dischi
       come ``disco rotto''. Fatelo con l'opzione --suggest-failed-
       disk-mask (in inglese suona come "suggerisci-maschera-disco-
       rotto". ndt).

       Un solo bit dovr essere indicato nell'opzione: RAID-5 non
       pu recuperare due dischi non funzionanti.  La maschera 
       una maschera binaria: quindi:

           0x1 == primo disco
           0x2 == secondo disco
           0x4 == terzo disco
           0x8 == quarto disco, etc.




       In alternativa si pu scegliere di modificare i settori di
       parit usando l'opzione --suggest-fix-parity. Questa far si
       che la parit venga ricalcolata dagli altri settori.


       Le opzioni --suggest-failed-disk-mask e --suggest-fix-parity
       possono essere usate senza problemi per la sola verifica.
       Non vengono apportati cambiamenti se l'opzione --fix non 
       stata specificata. Quindi potete sperimentare schemi
       differenti di riparazione.




  3. D: Il mio dispositivo RAID-1, /dev/md0  formato da due partizioni
     di hard disk: /dev/hda3 e /dev/hdc3.  Recentemente, il disco che
     conteneva /dev/hdc3 si  rotto, ed  stato rimpiazzato da un nuovo
     disco.  Il mio migliore amico, che non conosce RAID, dice che la
     cosa corretta da fare adesso  ''dd if=/dev/hda3 of=/dev/hdc3''.
     Ho provato a farlo, ma le cose continuano a non funzionare.


       R: Il tuo migliore amico dovrebbe rimanere alla larga dal
       tuo computer.  Fortunatamente non vi sono stati danni gravi.
       Si pu riaggiustare il tutto eseguendo:


       mkraid raid1.conf -f --only-superblock





  Usando dd, sono state create due copie identiche della par
  tizione. Questo va quasi bene, tranne per il fatto che le
  estensioni RAID-1 del kernel si aspettano che i superblock
  RAID siano differenti.  Cos, quando si prova a riattivare
  RAID, il software nota il problema e disattiva una delle due
  partizioni. Ricreando i superblock, si dovrebbe avere un
  sistema perfettamente funzionante.



  4. D: La mia versione di mkraid non ha un'opzione --only-superblock .
     Che devo fare?

       R: I nuovi tool non supportano questa opzione, che  stata
       rimpiazzata da --force-resync.  stato riferito che la
       seguente sequenza di comandi funziona con gli ultimi tool e
       software:


         umount /web (dove /dev/md0  stata montata)
         raidstop /dev/md0
         mkraid /dev/md0 --force-resync --really-force
         raidstart /dev/md0





  Dopo questo, un cat /proc/mdstat dovrebbe dare resync in
  progress, e a questo punto dovrebbe essere possibile effet
  tuare un mount /dev/md0.



  5. D: Il mio dispositivo RAID-1, /dev/md0  formato da due partizioni:
     /dev/hda3 e /dev/hdc3.  Il mio migliore amico/a (in inglese "My
     best (girl)friend" NdT), che non conosce RAID, ha eseguito fsck su
     /dev/hda3 mentre io non guardavo e adesso RAID ha smesso di
     funzionare.  Cosa devo fare?


       R: Il concetto di "migliore amico" andrebbe riesaminato.  In
       generale, fsck non dovrebbe essere mai eseguito su una sin
       gola partizione facente parte di un sistema RAID.  Pre
       sumendo che nessuna partizione sia stata fortemente danneg
       giata non sono andati persi dati e il dispositivo RAID-1 pu
       essere recuperato come segue:

          a. effettuare un backup del filesystem di /dev/hda3


     b. dd if=/dev/hda3 of=/dev/hdc3

     c. mkraid raid1.conf -f --only-superblock

  Questo dovrebbe riportare al funzionamento il dispositivo di
  mirror.



  6. D: Perch la procedura precedente funziona?

       R: Perch ogni partizione componente un mirror RAID-1  una
       copia perfettamente valida del filesystem. Addirittura il
       mirroring pu essere disabilitato e una delle partizioni pu
       venire montata e funzioner senza problemi come un filesys
       tem normale, senza RAID. Quando si  pronti a ripartire con
       RAID-1, si smonti la partizione e si seguano le istruzioni
       sopracitate per far ripartire il mirror. Si noti che le
       istruzioni di cui sopra valgono SOLO per RAID-1 e per nessun
       altro livello.



       Vi potrebbe far sentire pi a vostro agio l'invertire la
       direzione della copia di cui sopra: copiare dal disco che
       non  stato toccato a quello che lo  stato. Solo
       assicuratevi che alla fine venga eseguito fsck sul
       risultante dispositivo md.



  7. D: Mi sento un po' confuso dalle domande riportate sopra, ma ancora
     non mollo. Ma  sicuro eseguire fsck /dev/md0 ?


       R: Si,  una cosa sicura l'esecuzione di fsck sui disposi
       tivi md. In effetti questo  l'unico posto sicuro dove
       eseguire fsck.



  8. D: Se un disco si sta deteriorando lentamente, sar ovvio scoprire
     quale sia? Sono preoccupato dal fatto che non lo sia, e questa
     confusione potrebbe portare a qualche decisione pericolosa da parte
     di un amministratore di sistema.



       R: Una volta che un disco si rompe, un codice di errore
       viene trasmesso dal driver a basso livello al driver RAID.
       Il driver RAID marcher questo disco come ``cattivo'' nei
       superblock dei dischi ``buoni'' (in questa maniera pi
       avanti sapremo quale dei dischi di mirror sia buono e quale
       non) e continuer le operazioni RAID sui rimasti dischi fun
       zionanti.


       Questo, va da s, d per certo che il disco ed i driver di
       basso livello possano accorgersi di un errore in
       lettura/scrittura e che, per esempio, non continuino a
       danneggiare i dati in silenzio.  Questo  vero per i driver
       attuali (schemi di rilevazione dell'errore sono usati
       internamente) ed  base delle operazioni RAID.



  9. D: E sulla riparazione a caldo?


       R: Si sta lavorando per completare la ``ricostruzione a
       caldo''.  Con questa funzionalit, si possono aggiungere dei
       dischi ``spare''  al set RAID (sia esso di livello 1 o 4/5),
       e quando un disco smette di funzionare i dati contenuti in
       esso saranno ricostruiti su uno dei dischi spare durante
       l'attivit, senza nemmeno aver bisogno di fermare il set
       RAID.


       Tuttavia, per usare questa funzionalit, il disco spare deve
       essere stato dichiarato durante il boot, o esso dovr essere
       aggiunto ``a caldo'', cosa che richiede l'uso di connettori
       e cabinet speciali che consentano di aggiungere un disco
       senza togliere corrente.


       Da Ottobre 97 esiste una versione beta di MD che consente:

         la ricostruzione dei livelli RAID 1 e 5 su dischi spare

         la ricostruzione della parit di RAID-5 dopo uno shutdown
          sporco

         l'aggiunta ``a caldo'' di dischi spare ad una serie gi
          in funzione di dischi RAID 1 o 4/5.

          Come predefinizione, la ricostruzione automatica  in
          questo momento (Dicembre 97) disabilitata a causa della
          natura ancora sperimentale di questo lavoro. Pu comunque
          essere abilitata cambiando il valore di
          SUPPORT_RECONSTRUCTION in include/linux/md.h.


          Se i drive spare sono stati configurati su un sistema
          raid quando esso  stato creato e la ricostruzione 
          stata attivata nel kernel, i drive spare conterranno da
          subito il superblock RAID (scritto da mkraid), e il
          kernel sar capace di ricostruire il contenuto in maniera
          automatica (senza bisogno degli usuali passi mdstop,
          cambia il drive,ckraid, mdrun).


          Se non avete configurato la ricostruzione automatica e
          non avete configurato un disco spare, la procedura
          descritta da Gadi Oxman <gadio@netvision.net.il>  quella
          raccomandata:

         Per adesso, una volta che il primo disco  stato rimosso,
          il sistema RAID continuer a funzionare in modalit
          ``degradata''.  Per riportarlo alla piena funzionalit
          avrete bisogno di:

         fermare il sottosistema RAID (mdstop /dev/md0)

         rimpiazzare il disco rotto

         eseguire ckraid raid.conf per ricostruire il suo
          contenuto

         far ripartire RAID (mdadd, mdrun).

          A questo punto, nel sistema funzioneranno di nuovo tutti
          i dischi, garantendoci dal malfunzionamento di uno di
     essi.

     Per adesso non  possibile assegnare singoli dischi spare
     a diverse serie RAID. Ogni sottosistema richieder il
     proprio disco spare.



  10.
     D: Vorrei che ci fosse un allarme udibile per ``ehi tu, si  rotto
     un disco nel mirror'' in modo tale che anche il novello
     amministratore di sistema possa sapere che c' un problema.


       R: Un evento come questo viene segnalato nei log di sistema
       dal kernel con la priorit ``KERN_ALERT''. Vi sono diversi
       pacchetti software che controllano i file log di sistema e
       fanno emettere un bip allo speaker del PC, eseguono un
       pager, mandano e-mail ecc. automaticamente.



  11.
     D: Come posso fare a far partire RAID-5 in modalit degradata (con
     un disco rotto e non ancora rimpiazzato)?


       R: Gadi Oxman <gadio@netvision.net.il> ha scritto: Normal
       mente, per far funzionare un set di n dischi RAID-5 si deve
       eseguire:


       mdadd /dev/md0 /dev/disk1 ... /dev/disk(n)
       mdrun -p5 /dev/md0





  Anche se uno dei dischi  rotto, si deve comunque eseguire
  mdadd su quel disco, come se tutto fosse normale. (??
  provare a usare /dev/null al posto del disco rotto ???
  occhio)

  Quindi,

  Il sistema RAID funzioner in modalit degradata con (n - 1)
  dischi. Se l'esecuzione di ``mdrun'' non va a buon fine, il
  kernel ha notato un errore (per esempio diversi dischi rotti
  o uno shutdown sporco). Si usi ``dmesg'' per visionare i
  messaggi di errore del kernel generati dall'esecuzione di
  ``mdrun''.  Se il set raid-5  rovinato a causa di un calo
  di tensione, e non a causa della rottura di un disco, si pu
  tentare di recuperare il tutto creando un nuovo superblock
  RAID:


       mkraid -f --only-superblock raid5.conf





  Una serie di dischi RAID non fornisce protezione alcuna con
  tro i difetti dell'alimentazione o contro un blocco del ker
  nel e quindi non pu nemmeno garantire un corretto recupero
  dei dati.  La ricostruzione del superblock servir solo a
  far ignorare al sistema la condizione in cui si trova mar
  cando tutti i drive come ``OK'' come se niente fosse
  accaduto.



  12.
     D: Come funziona RAID-5 nel caso che un disco smetta di funzionare?


       R: Uno scenario tipico  il seguente:

         Una serie di dischi RAID-5  attiva.

         Un disco si rompe mentre la serie  attiva.

         Il firmware del disco e i driver di basso livello del
          disco/controller si accorgono del malfunzionamento e
          inviano un messaggio di errore al driver MD.

         Il driver MD continua a fornire un dispositivo /dev/md0
          privo di errori ai driver di livello pi alto (anche se
          con performance ridotte) usando i rimanenti drive
          operativi.

         L'amministratore di sistema pu quindi eseguire umount
          /dev/md0 e mdstop /dev/md0 come al solito.

         Se il disco rotto non viene rimpiazzato, l'amministratore
          di sistema pu comunque far partire il sistema raid in
          modalit degradata come al solito eseguendo mdadd e
          mdrun.



  13.
     D: Ho appena sostituito un disco rotto in un sistema RAID-5. Dopo
     aver ricostruito il sistema, l'esecuzione di fsck mi d molti,
     molti errori.  normale?


       R: No. E, a meno che fsck non sia stato eseguito in modalit
       "verify only; do not update" ("verifica solamente; non
       aggiornare".  ndt),  del tutto possibile che abbiate rov
       inato i vostri dati.  Sfortunatamente, uno scenario non poco
       raro  quello nel quale si cambia accidentalmente l'ordine
       dei dischi in una serie di dischi RAID-5, dopo averne
       rimpiazzato uno. Anche se il superblock RAID memorizza
       l'ordine corretto, non tutti i tool tengono conto di questa
       informazione. In particolare, la versione attuale di ckraid
       user le informazioni specificate nell'opzione -f (usual
       mente il file /etc/raid5.conf) al posto di quelle contenute
       nel superblock. Se l'ordine specificato non  quello cor
       retto il disco rimpiazzato sar ricostruito in maniera
       errata.  Sintomo di questo tipo di sbaglio sembrano essere i
       pesanti e numerosi errori di fsck.


       E, nel caso siate meravigliati, s, qualcuno ha perso tutti
       i suoi dati commettendo questo sbaglio.   fortemente
       raccomandato un backup su nastro di tutti i dati prima di
       riconfigurare una serie di dischi RAID.



  14.
     D:

       R:



  15.
     D: Perch non vi  una domanda numero 13?


       A: Se siete scettici sul RAID, sull'Alta Affidabilit e UPS
       probabilmente  una buona idea l'essere anche superstiziosi.
       Male non pu fare, no?



  16.
     D: Il QuickStart dice che mdstop serve solo ad essere sicuri che i
     dischi siano in sincronia.  REALMENTE necessario? Non  abbastanza
     smontare il filesystem?


       R: Il comando mdstop /dev/md0:

         lo marcher come ''pulito''. Questo ci consente di
          rilevare gli shutdown sporchi dovuti, per esempio, ad un
          blocco del kernel o ad un malfunzionamento
          nell'alimentazione.

         metter in sincronia i dischi del dispositivo. Questa 
          una cosa meno importante dello smontare il filesystem ma
           importante se l'accesso a /dev/md0 avviene direttamente
          invece che attraverso un filesystem (ad esempio come nel
          caso di e2fsck).





  5.  Risoluzione dei problemi di installazione


  1. D: Quale  attualmente la patch pi stabile e conosciuta per RAID
     nei kernel della serie 2.0.x?


       R: Al 28 Settembre 1997  (riporto letteralmente. ndt)
       "2.0.30 + pre-9 2.0.31 + Werner Fink's swapping patch + the
       alpha RAID patch".  A Novembre 1997,  2.0.31 + ... !?



  2. D Le patch per il RAID non vengono correttamente installate.  Dov'
     l'errore?

       R: Assicuratevi che /usr/include/linux sia un link simbolico
       a /usr/src/linux/include/linux.

       Assicuratevi che i nuovi files raid5.c, etc.  siano stati
       copiati nei posti giusti.  A volte il comando patch non crea
       nuovi files. Provate con l'opzione -f del comando patch.




  3. D: Durante la compilazione di raidtools 0.42, il compilatore si
     blocca mentre cerca di includere <pthread.h> ma questo file non
     esiste nel mio sistema. Come posso correggere questo errore?


       R: raidtools-0.42 richiede linuxthreads-0.6 da:
       <ftp://ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy> In
       alternativa si possono usare le glibc v2.0.



  4. D: Ottengo il messaggio: mdrun -a /dev/md0: Invalid argument


       R: Si deve usare mkraid per inizializzare il set RAID prima
       che venga usato per la prima volta. mkraid si assicura del
       fatto che il sistema RAID sia inizialmente in uno stato di
       coerenza cancellando le partizioni RAID. In aggiunta,mkraid
       si occuper di creare i superblock RAID.



  5. D: Ottengo il messaggio: mdrun -a /dev/md0: Invalid argument La
     procedura di setup  stata:

    compilazione di raid come modulo del kernel

     stata seguita la normale procedura di installazione ...
     mdcreate, mdadd, etc.

    il comando cat /proc/mdstat produce questo output:

         Personalities :
         read_ahead not set
         md0 : inactive sda1 sdb1 6313482 blocks
         md1 : inactive
         md2 : inactive
         md3 : inactive




    mdrun -a genera il messaggio di errore /dev/md0: Invalid argument



       R: Si provi ad eseguire lsmod (o, in alternativa, cat
       /proc/modules) per vedere se i moduli raid sono stati cari
       cati. Se non lo sono stati, possono essere caricati in
       maniera esplicita con i comandi modprobe raid1 o modprobe
       raid5. In alternativa, se usate l'autoloader e se credete
       che kerneld debba caricarli e non lo fa, potrebbe essere a
       causa del fatto che il loader manca delle informazioni che
       servono per caricare i moduli. Modificate /etc/conf.modules
       aggiungendo le linee seguenti:


           alias md-personality-3 raid1
           alias md-personality-4 raid5







  6. D: Durante l'esecuzione del comando mdadd -a si ha l'errore:
     /dev/md0: No such file or directory.  Sembra per che non vi siano
     /dev/md0 da nessuna parte.  E adesso?


       R: Il package raid-tools crea questi dispositivi quando
       viene eseguito il comando make install come utente root. In
       alternativa, si pu fare cos:

           cd /dev
           ./MAKEDEV md







  7. D: Dopo aver creato un sistema raid su /dev/md0, provo a montarlo
     ma ottengo il seguente errore: mount: wrong fs type, bad option,
     bad superblock on /dev/md0, or too many mounted file systems.  Cosa
     c' che non va?

       R: Si deve creare un file system su /dev/md0 prima che sia
       possibile montarlo.  Usare mke2fs.




  8. D: Truxton Fulton ha scritto:

       Sul mio sistema Linux 2.0.30, mentre eseguivo mkraid su un
       dispositivo RAID-1, durante la pulizia delle due distinte
       partizioni ho visto apparire sulla console gli errori "Can
       not allocate free page" e altri errori "Unable to handle
       kernel paging request at virtual address ..." risultavano
       nel log di sistema. A questo punto il sistema  diventato
       pressoch inutilizzabile, ma si  poi ristabilito dopo un
       po'.  L'operazione sembra essersi conclusa senza errori e
       adesso utilizzo senza problemi il mio dispositivo RAID-1.
       Comunque quegli errori continuano a sconcertarmi. Qualche
       idea?




       R: Questo era un bug ben conosciuto nei kernel 2.0.30. 
       stato corretto nel kernel 2.0.31; in alternativa si pu
       tornare al 2.0.29.



  9. D: Non riesco ad eseguire mdrun su un dispositivo RAID-1, RAID-4 o
     RAID-5. Se provo ad eseguire mdrun su un dispositivo aggiunto con
     mdadd mi viene dato il messaggio ''invalid raid superblock magic''.


       R: Assicurarsi che sia stata seguita la parte della proce
       dura di installazione dove viene utilizzato mkraid.



  10.
     D: Quando accedo a /dev/md0 il kernel se ne esce con molti errori
     tipo md0: device not running, giving up ! e I/O error.... Ho
     aggiunto con successo i miei dispositivi al dispositivo virtuale.
       R: Per essere utilizzabile un dispositivo deve essere in
       funzione.  Si usi il comando mdrun -px /dev/md0 dove x  1
       per linear, 0 per RAID-0 o 1 per RAID-1, etc.



  11.
     D: Ho creato un dispositivo md lineare con 2 dispositivi.  cat
     /proc/mdstat mi dice la grandezza totale del dispositivo ma df mi
     fa vedere solo le dimensioni del primo dispositivo fisico


       R: Si deve eseguire mkfs su un nuovo dispositivo md prima di
       usarlo per la prima volta, in modo tale che il filesystem
       copra tutto il dispositivo.



  12.
     D: Ho configurato /etc/mdtab usando mdcreate, ho poi eseguito
     mdadd, mdrun e fsck sulle mie due partizioni /dev/mdX. Prima del
     reboot sembra tutto a posto. Appena effettuo il reboot fsck mi d
     errori su tutte e due le partizioni: fsck.ext2: Attempt to read
     block from filesystem resulted in short read while trying too open
     /dev/md0.  Perch?! Come posso fare a correggerlo?!


       R: Durante il processo di boot, le partizioni RAID devono
       essere messe in funzione prima che vengano controllate da
       fsck.  Questo deve essere fatto in uno degli script di boot.
       In qualche distribuzione fsck  eseguito da /etc/rc.d/rc.S,
       in altre  eseguito da /etc/rc.d/rc.sysinit. Si modifichino
       questi file in modo da eseguire mdadd -ar *prima* di fsck
       -A.  Ancora meglio, suggerisco che venga eseguito ckraid se
       mdadd restituisce un codice di errore. Come fare ci  dis
       cusso in maggiore dettaglio nella domanda 14 della sezione
       ''Riparare gli errori''.  (Qui l'originale inglese sembra
       incoerente, in quanto la domanda 14 della sezione menzionata
       non  attinente.  La domanda pi attinente sembra essere la
       7 della sezione "Considerazioni sul setup e sull'instal
       lazione". ndt)



  13.
     D: Quando provo a far funzionare un serie di partizioni pi grandi
     di 4 GB mi viene dato il seguente messaggio: invalid raid
     superblock magic


       R: Questo bug  stato corretto. (Settembre 97)  Assicuratevi
       di avere l'ultima versione del codice RAID.



  14.
     D: Quando provo ad eseguire mke2fs su una partizione pi grande di
     2 GB mi viene dato il messaggio Warning: could not write 8 blocks
     in inode table starting at 2097175


       R: Questo sembra essere un problema con mke2fs (Novembre 97)
       Un rimedio temporaneo consiste nel procurarsi il codice di
       mke2fs e aggiungere #undef HAVE_LLSEEK a
       e2fsprogs-1.10/lib/ext2fs/llseek.c subito prima del primo
       #ifdef HAVE_LLSEEK e quindi ricompilare mke2fs.
  15.
     D: ckraid non riesce a leggere /etc/mdtab


       R: Il formato del file di configurazione usato per
       RAID0/linear in /etc/mdtab  obsoleto, anche se sar suppor
       tato ancora per un po'. I file di configurazione usati
       attualmente sono chiamati /etc/raid1.conf, etc.



  16.
     D: I moduli delle personality (raid1.o) non vengono caricati
     automaticamente; si deve eseguire modprobe manualmente prima di
     eseguire mdrun. Come posso ovviare all'inconveniente?


       R: Per il caricamento automatico dei moduli, si possono
       aggiungere le seguenti linee a /etc/conf.modules:

           alias md-personality-3 raid1
           alias md-personality-4 raid5






  17.
     D: Ho aggiunto con mdadd 13 dispositivi e adesso sto cercando di
     eseguire mdrun -p5 /dev/md0, ma mi viene dato il messaggio:
     /dev/md0: Invalid argument


       R: La configurazione predefinita di software RAID prevede 8
       dispositivi reali. Editare linux/md.h, modificare #define
       MAX_REAL=8 con un numero pi alto e ricompilare il kernel.



  18.
     D: Non riesco a far funzionare md su delle partizioni nella nostra
     ultima SPARCstation 5. Sospetto che sia qualcosa che ha a che fare
     con le etichette di volume.


       R: Le etichette di volume Sun risiedono nel primo 1K di una
       partizione. Per RAID-1 le etichette di volume Sun non sono
       un problema poich ext2fs salter l'etichetta di ogni mir
       ror. Per gli altri livelli RAID (0, linear e 4/5) questo
       sembra essere un problema; non si  arrivati ancora ad una
       causa certa (Dicembre 97).



  6.  Hardware & Software Supportato


  1. D: Ho un adattatore SCSI della marca XYZ (con o senza diversi
     canali) e dischi di marche PQR e LMN, funzioneranno con md per
     creare una personality linear/stripped/mirrored?


       R: Si! Software RAID funzioner con ogni controller di dis
       chi (IDE o SCSI) e con ogni disco. Non c' bisogno che i
       dischi siano identici e nemmeno i controller. Per esempio un
  mirror RAID pu essere creato una met con dischi SCSI e
  l'altra met con dischi IDE. I dischi non devono neppure
  essere delle stesse dimensioni. Non ci sono restrizioni
  nella scelta e disposizione dei dischi e dei controller.


  Questo a causa del fatto che Software RAID lavora con le
  partizioni e non direttamente con il disco. La sola
  raccomandazione da fare per il RAID livelli 1 e 5  che le
  partizioni dei dischi che dovranno essere usate insieme
  siano delle stesse dimensioni.  Se le partizioni che
  compongono una serie di dischi RAID 1 o 5 non sono delle
  stesse dimensioni lo spazio in eccesso nella partizione pi
  grande andr perduto.



  2. D: Ho un BT-952 a doppio canale, e la confezione asserisce che
     supporta il RAID hardware livelli 0, 1 e 0+1. Ho messo su un set
     RAID con due dischi, la scheda sembra riconoscerli durante
     l'esecuzione delle routine di avvio del suo BIOS. Ho letto il
     codice sorgente del driver ma non ho trovato riferimenti ad un
     supporto per il RAID hardware. Qualcuno ci sta lavorando?


       R: Le schede Mylex/BusLogic FlashPoint con RAIDPlus sono in
       effetti RAID software e per nulla RAID hardware. RAIDPlus 
       supportato solo su Windows 95 e Windows NT, non su Netware o
       su piattaforma Unix. Esclusi il boot e la configurazione la
       gestione del RAID avviene tramite driver del S.O.


       Anche se in teoria il supporto per RAIDPlus sia possibile in
       Linux, l'implementazione del RAID-0/1/4/5 nel kernel di
       Linux  molto pi flessibile e dovrebbe avere performance
       superiori, quindi ci sono poche ragioni per decidere di
       supportare direttamente RAIDPlus.



  3. D: Voglio installare RAID su un computer SMP. RAID  adatto a SMP?

       R: "Penso di si"  la migliore risposta disponibile al
       momento (Aprile 98).  Diversi utenti dicono di aver usato
       RAID con SMP per circa un anno senza problemi.  Comunque
       alla data di Aprile 98 (circa kernel 2.1.9x), i seguenti
       problemi sono stati notati sulla mailing list:

         I driver Adaptec AIC7xxx SCSI non sono del tutto adatti a
          SMP (nota generica: gli adattatori Adaptec hanno una
          lunga storia di problemi e disfunzionamenti. Anche se
          sembrano essere gli adattatori SCSI pi disponibili,
          diffusi e a buon mercato gli Adaptec andrebbero evitati.
          Dopo aver calcolato il tempo perso, le frustrazioni e i
          dati andati perduti capirete che gli Adaptec sono il pi
          costoso errore che abbiate mai fatto. Detto questo, se
          avete problemi legati a SMP con il kernel 2.1.88, provate
          la patch su ftp://ftp.bero-
          online.ml.org/pub/linux/aic7xxx-5.0.7-linux21.tar.gz Non
          sono sicuro del fatto che questa patch sia stata inclusa
          negli ultimi kernel 2.1.x. Per altre informazioni date
          un'occhiata agli archivi di mail del Marzo 98 su
          http://www.linuxhq.com/lnxlists/linux-raid/lr_9803_01/
          Come sempre, dato il fatto che i kernel sperimentali
          della serie 2.1.x sono soggetti a continui cambiamenti, i
          problemi descritti in queste mailing list potrebbero o
     non potrebbero essere stati risolti nel frattempo.
     Caveat Emptor.)



     stato riferito che IO-APIC con RAID-0 su SMP non
     funziona su 2.1.90





  7.  Modificare una installazione preesistente


  1. D: I dispositivi MD linear sono espandibili?  Si pu aggiungere un
     nuovo drive/partizione e vedere cos aumentata la capienza del
     filesystem preesistente?


       D: Miguel de Icaza <miguel@luthien.nuclecu.unam.mx> ha
       scritto:

       Ho cambiato il codice di ext2fs per renderlo capace di
       trattare dispositivi multipli, modificando l'assunzione
       precedente che assegnava ad un filesystem un solo disposi
       tivo.


       Cos quando si vuole espandere un filesystem basta eseguire
       un'utilit che apporta le modifiche appropriate sul nuovo
       dispositivo (la partizione extra) e poi basta solo far
       sapere al sistema di estendere il fs usando il dispositivo
       specificato.


       Il filesystem pu essere esteso con dei nuovi dispositivi
       mentre il sistema sta funzionando, senza bisogno di doverlo
       arrestare (e quando avr altro tempo potrete rimuovere dei
       dispositivi da un volume ext2, ancora senza nemmeno dover
       andare in modalit single-user o fare altre cose come
       questa).


       Potete procurarvi la patch per il kernel 2.1.x sulla mia web
       page:

       <http://www.nuclecu.unam.mx/~miguel/ext2-volume>





  2. D: Posso aggiungere dei dischi ad un sistema RAID-5?


       R: Attualmente, (Settembre 1997), no, non senza cancellare
       tutti i dati. Una utilit di conversione che lo permetta
       ancora non esiste. Il problema  che la struttura e l'effet
       tiva disposizione in un sistema RAID-5 dipende dal numero
       dei dischi che ne fanno parte.

       Ovviamente si possono aggiungere dei dischi facendo un
       backup del sistema su nastro, cancellando tutti i dati, cre
       ando un nuovo sistema e recuperando i dati dal nastro.

  3. D: Cosa potrebbe succedere al mio set RAID1/RAID0 se sposto uno dei
     drive facendo diventare da /dev/hdb a /dev/hdc?

     A causa dei problemi di grandezza/stupidit con i cablaggi/cabinet
     devo mettere i miei set RAID sullo stesso controller IDE (/dev/hda
     e /dev/hdb). Adesso che ho messo a posto un po' di cose vorrei
     muovere /dev/hdb in /dev/hdc.

     Cosa potrebbe succedere se mi limito a cambiare i files /etc/mdtab
     e /etc/raid1.conf in modo che riflettano la nuova posizione?

       R: Nel caso del RAID-0/linear, si deve stare attenti nello
       specificare i drive esattamente nello stesso ordine. Quindi
       nell'esempio di cui sopra il file di configurazione origi
       nale era:


       mdadd /dev/md0 /dev/hda /dev/hdb





  E il nuovo file di configurazione *deve* essere


       mdadd /dev/md0 /dev/hda /dev/hdc






  Per quanto riguarda RAID-1/4/5, il ''numero RAID'' del drive
  viene memorizzato nel suo superblock RAID e quindi l'ordine
  nel quale vengono indicati i dischi non  importante.

  Il RAID-0/linear non ha un superblock a causa del suo vec
  chio design e del desiderio di mantenere la compatibilit
  con questo vecchio design.



  4. D: Posso convertire un mirror RAID-1 formato da due dischi in una
     serie di tre dischi RAID-5?


       R: Si. Micheal della BizSystems ha trovato un modo per farlo
       abilmente e astutamente. Per, come virtualmente tutte le
       manipolazioni di sistemi RAID una volta che essi contengono
       dati,  pericoloso e soggetto ad errore umano.  Fate un
       backup prima di cominciare.














  Ipotizzo la seguente configurazione:
  ---------------------------------------------
  dischi
  originale: hda - hdc
  partizioni raid1 hda3 - hdc3
  nome dispositivo raid /dev/md0

  nuovo hda - hdc - hdd
  partizioni raid5 hda3 - hdc3 - hdd3
  nome dispositivo raid: /dev/md1

  Si sostituiscano i nomi dei dischi e delle partizioni in modo
  da riflettere la propria configurazione di sistema.
  Questo vale anche per tutti gli esempi di file di configurazione.
  --------------------------------------------
  FATE UN BACKUP PRIMA DI FARE QUALSIASI ALTRA COSA
  1) ricompilare il kernel per includere sia il supporto raid1 che quello raid5
  2) installare il nuovo kernel e accertarsi che siano presenti le
     personality raid
  3) disabilitare la partizione ridondante sul sistema raid 1. Se questa 
     la partizione di root (la mia lo era) dovrete stare pi attenti.

   Fare il reboot del sistema senza mettere in funzione i dispositivi raid
   o fate ripartire il sistema da uno di recupero (i tool raid dovranno essere
   disponibili)

   fate partire raid1 in modalit non ridondante
  mdadd -r -p1 /dev/md0 /dev/hda3

  4) configurate raid5 con un 'buffo' file di configurazione, si noti che
     non viene nominato hda3 e che hdc3  ripetuto. Questo serve poich
     i tool raid non accettano una simile impostazione.
  -------------------------------
  # configurazione raid-5
  raiddev                 /dev/md1
  raid-level              5
  nr-raid-disks           3
  chunk-size              32

  # disposizione algoritmo di parit
  parity-algorithm        left-symmetric

  # dischi spare per ricostruzione a caldo
  nr-spare-disks          0

  device                  /dev/hdc3
  raid-disk               0

  device                  /dev/hdc3
  raid-disk               1

  device                  /dev/hdd3
  raid-disk               2
  ---------------------------------------
   mkraid /etc/raid5.conf
  5) attivare il sistema raid5 in modalit non ridondante

  mdadd -r -p5 -c32k /dev/md1 /dev/hdc3 /dev/hdd3

  6) create un filesystem sul dispositivo raid5

  mke2fs -b {blocksize} /dev/md1

  la dimensione del blocco raccomandata da alcuni  di 4096 al posto della
  predefinita 1024. Questo migliora l'utilizzazione della memoria da parte
  del kernel e delle routine raid facendo coincidere la grandezza del blocco
  con quella della pagina. Io ho trovato un compromesso su 2048 a causa del
  fatto che ho un numero relativamente alto di file piccoli nel mio sistema.

  7) montate da qualche parte i due dispositivi raid

  mount -t ext2 /dev/md0 mnt0
  mount -t ext2 /dev/md1 mnt1

  8) spostate i dati

  cp -a mnt0 mnt1

  9) verificate che i due set di dati siano identici
  10) fermate ambedue i dispositivi raid
  11) correggete le informazioni contenute nel file raid5.conf
    cambiate /dev/md1 in /dev/md0
    cambiate il primo disco da leggere in /dev/hda3

  12) portare il nuovo sistema in modalit ridondante
   (QUESTO DISTRUGGE LE RIMANENTI INFORMAZIONI raid1)

  ckraid --fix /etc/raid5.conf








  8.  Domande sulle performance, sui tool e domande stupide in genere


  1. D: Ho creato un dispositivo RAID-0 con /dev/sda2 e /dev/sda3. Il
     dispositivo  molto pi lento di una singola partizione. Ma allora
     md  un ammasso di robaccia?

       R: Per usufruire di un dispositivo RAID-0 che funzioni alla
       massima velocit, si devono utilizzare partizioni di dischi
       differenti. Oltretutto, mettendo le due met di un mirror su
       di un solo disco non ci si cautela da nessun tipo di malfun
       zionamento del disco.



  2. D: Dove  la necessit di avere RAID-linear quando RAID-0 fa le
     stesse cose con migliore efficienza?

       R: Il fatto che RAID-0 abbia sempre una performance migliore
       non  cosa ovvia; in effetti, in qualche caso, le cose
       potrebbero andare peggio.  Il filesystem ext2fs distribuisce
       i file su tutta la partizione, e cerca di mantenere contigui
       tutti i blocchi di un file, nel tentativo di impedirne la
       frammentazione. Quindi ext2fs si comporta "come se" ci fosse
       una striscia (di dimensioni variabili) per ogni file. Se
       diversi dischi vengono concatenati in un dispositivo RAID-
       linear, statisticamente i file verranno distribuiti su ogni
       disco. Quindi, almeno per ext2fs, RAID-linear si comporta in
       maniera molto simile a un RAID-0 con delle ampie strisce. Al
       contrario RAID-0 con strisce piccole pu causare un'ecces
       siva attivit del disco che pu portare ad un forte degrado
       delle prestazioni se si accede contemporaneamente a diversi
       grandi file.

       In molti casi RAID-0 pu risultare facile vincitore. Si
       immagini, per esempio un grande file di database. Poich
  ext2fs cerca di raggruppare insieme tutti i blocchi di un
  file, vi sono buone possibilit che esso finisca in un solo
  disco se si utilizza RAID-linear o finisca diviso in
  molteplici strisce se si usa RAID-0. Si immaginino adesso un
  certo numero di thread (del kernel) che stanno tentando di
  accedere al database in maniera casuale. Sotto RAID-linear
  tutti gli accessi finirebbero con il dover essere
  soddisfatti da un solo disco che finirebbe con l'essere
  inefficiente se paragonato alla possibilit di accessi
  multipli paralleli che RAID-0 consente.




  3. D: Come si comporta RAID-0 in una situazione nella quale le diverse
     partizioni di stripe hanno dimensioni diverse? Le strisce vengono
     distribuite uniformemente?


       R: Per comprendere meglio aiutiamoci con un esempio che
       coinvolge tre partizioni; una da 50Mb, una da 90Mb e una da
       125Mb.

       Chiamiamo D0 il disco da 50Mb, D1 il disco da 90Mb e D2
       quello da 125Mb. Quando si fa partire il dispositivo, il
       driver calcola le 'strip zones' (letteralmente "zone di
       striscia". ndt). In questo caso vengono individuate 3 zone,
       cos definite:


                   Z0 : (D0/D1/D2) 3 x 50 = 150MB  totali in questa zona
                   Z1 : (D1/D2)  2 x 40 = 80MB totali in questa zona
                   Z2 : (D2) 125-50-40 = 35MB totali in questa zona.




       Si pu notare come la dimensione totale delle zone sia la
       dimensione del dispositivo virtuale, ma la distribuzione
       delle strisce varia in funzione della zona. Z2  ineffi
       ciente, poich contenuta in un solo disco.

       Poich ext2fs e molti altri filesystem di Unix distribuis
       cono i file su tutto il disco, si ha il 35/265 = 13% di
       probabilit che i dati finiscano su Z2, e quindi non benefi
       cino dello striping.

       (DOS cerca di riempire un disco partendo dall'inizio e
       andando verso la fine e quindi i file pi vecchi finirebbero
       in Z0. Questo tipo di approccio porta per ad una pesante
       frammentazione, e questo  il perch nessun altro oltre a
       DOS gestisce il disco in questa maniera).



  4. D: Ho dei dischi di marca X e un controller di marca Y, sto
     considerando se usare md.  Ma il throughput aumenta sensibilmente?
     Le prestazioni sono notevolmente migliori?


       R: La risposta dipende dalla configurazione che si usa.


          Prestazioni di Linux MD RAID-0 e RAID-linear:
             Se il sistema deve sopperire ad un alto numero di
             richieste di I/O, statisticamente qualcuna andr su un
        disco e qualcun'altra su un altro. Quindi le
        prestazioni migliorano rispetto ad un singolo disco.
        Ma il miglioramento effettivo dipende molto dai dati,
        dalla dimensione delle strisce e da altri fattori. In
        un sistema con basso carico di I/O le prestazioni sono
        uguali a quelle di un singolo disco.


     Prestazioni in lettura di Linux MD RAID-1(mirroring):
        MD implementa il bilanciamento in lettura. Quindi il
        codice RAID-1 distribuir il carico su ognuno dei
        dischi nel mirror (due o pi), effettuando operazioni
        alternate di lettura da ognuno di essi. In una
        situazione con basso carico di I/O questo non
        influisce per niente sulle prestazioni: dovrete
        aspettare che un disco abbia finito di leggere. Ma con
        due dischi in una situazioni di alto carico di I/O la
        performance in lettura pu raddoppiare visto che le
        letture possono essere effettuate in parallelo da
        ciascuno dei due dischi. Per N dischi nel mirror, la
        prestazione pu essere N volte migliore.


     Prestazioni in scrittura di Linux MD RAID-1 (mirroring):
        Si deve attendere che la scrittura sia stata
        effettuata su tutti i dischi del mirror. Questo a
        causa del fatto che una copia dei dati deve essere
        scritta su ogni disco del mirror. Quindi le
        prestazioni saranno quasi uguali a quelle di un
        singolo disco in scrittura.


     Prestazioni in lettura di Linux MD RAID-4/5:
        Statisticamente un dato blocco pu trovarsi in un
        qualsiasi disco di una serie, e quindi le prestazioni
        in lettura di RAID-4/5 somigliano molto a quelle di
        RAID-0. Esse variano in funzione dei dati, della
        dimensione delle strisce e del tipo di utilizzo. Le
        prestazioni in lettura non saranno buone quanto quelle
        di una serie di dischi in mirror.


     Prestazioni in scrittura di Linux MD RAID-4/5:
        Questo sistema  in genere considerevolmente pi lento
        di un disco singolo. Questo a causa del fatto che la
        parit dovr essere scritta su un disco e i dati su un
        altro. E per poter calcolare la nuova parit quella
        vecchia e i vecchi dati devono prima essere letti.
        Viene quindi effettuato un XOR fra i vecchi dati, i
        nuovi dati e la vecchia parit: questo richiede
        numerosi cicli di CPU e diversi accessi al disco.



  5. D: Quale configurazione ottimizza le prestazioni di RAID?

       R: Interessa pi massimizzare il throughput o diminuire la
       latenza?  Non vi  una facile risposta dato il grande numero
       di fattori che influenzano la performance:


         sistema operativo - l'accesso al disco  effettuato da un
          solo processo o da pi thread?

         applicazioni          - accedono ai dati in maniera
          sequenziale o in maniera casuale?
    file system           - raggruppa i file o li
     distribuisce (ext2fs raggruppa insieme i blocchi di un
     file e distribuisce i file)

    driver del disco     - numero di blocchi di read ahead (
     un parametro impostabile)

    hardware CEC     - un drive controller o pi?

    hd controller         - gestisce la coda di richieste
     multiple? Ha una cache?

    hard drive            - dimensioni del buffer della
     memoria cache --  abbastanza ampia da gestire la
     quantit e la velocit degli accessi in scrittura di cui
     si ha bisogno?

    caratteristiche fisiche del disco - blocchi per cilindro
     -- accedere a blocchi su differenti cilindri porta il
     disco ad effettuare molte operazioni di seek.



  6. D: Quale  la configurazione di RAID-5 che ottimizza la
     performance?

       R: Poich RAID-5 genera un carico di I/O che  uniformemente
       distribuito su diversi dischi, le prestazioni migliori si
       otterranno quando il set RAID viene bilanciato usando drive
       identici, controller identici e lo stesso (basso) numero di
       drive su ciascun controller.

       Si noti comunque che l'uso di componenti identici alzer la
       probabilit di malfunzionamenti multipli e simultanei
       dovuti, per esempio a degli sbalzi repentini, al surriscal
       damento o a problemi di alimentazione durante un temporale.
       Questo tipo di rischio pu essere ridotto utilizzando dis
       positivi di marca e modello differenti.



  7. D: Quale  la dimensione ottimale di un blocco per un sistema
     RAID-4/5?


       R: Nell'uso dell'implementazione attuale (Novembre 1997) di
       RAID-4/5  fortemente raccomandato che il filesystem venga
       creato con mke2fs -b 4096 al posto della dimensione pre
       definita del blocco che  di 1024 byte.


       Questo perch l'attuale implementazione di RAID-5 alloca una
       pagina di memoria di 4K per ogni blocco del disco; se un
       blocco del disco fosse grande solo 1K il 75% della memoria
       allocata da RAID-5 per l'I/O non verrebbe usata. Se la
       grandezza del blocco del disco  uguale a quella della
       pagina di memoria il driver pu (potenzialmente) usare tutta
       la pagina. Quindi, su un filesystem con dei blocchi da 4096
       invece che da 1024, il driver RAID potr potenzialmente
       gestire una coda di richieste di I/O quattro volte pi
       grande senza usare memoria aggiuntiva.


       Nota: le considerazioni precedenti non si applicano ai
       driver Software RAID-0/1/linear.

  Nota: le considerazioni sulla pagina di memoria da 4K sono
  da applicare all'architettura Intel x86. Le dimensioni della
  pagina di memoria su Alpha, Sparc e altre CPU sono
  differenti; credo che siano 8k su Alpha/Sparc (????).
  Aggiustate le asserzioni precedenti in maniera da tenerne
  conto.


  Nota: se il vostro filesystem contiene un grande numero di
  piccoli file (file pi piccoli di 10KBytes), una frazione
  considerevole di spazio disco andr perduta. Questo a causa
  del fatto che la dimensione dello spazio disco allocata dal
  filesystem  un multiplo della dimensione del blocco.
  Allocare dei blocchi di grosse dimensioni per dei piccoli
  file porta chiaramente ad uno spreco di spazio disco; quindi
  si potrebbe voler continuare ad utilizzare blocchi di
  piccole dimensioni, avere una una capacit di
  immagazzinamento maggiore e non preoccuparsi della memoria
  "persa" a causa del fato che le dimensioni della pagina e
  del blocco non combaciano.


  Nota: molti sistemi ''tipici'' non contengono cos tanti
  piccoli file. Comunque, anche se ci fossero centinaia di
  piccoli file, questo potrebbe portare alla perdita di 10 -
  100 MB di spazio disco, che probabilmente  un compromesso
  accettabile per avere buone prestazioni se si usano hard
  disk multi-gigabyte.

  Nel caso dei news server, ci potrebbero essere decine o
  centinaia di migliaia di piccoli file. In questi casi i
  blocchi di dimensioni minori, e quindi una maggiore capacit
  di immagazzinamento, potrebbero essere pi importanti
  dell'efficienza dello scheduling di I/O.


  Nota: esiste un filesystem sperimentale per Linux che
  memorizza piccoli file e pezzi di file in un solo blocco.
  Apparentemente questo influisce in maniera positiva sulla
  performance quando la dimensione media dei file  molto pi
  piccola della dimensione del blocco.


  Nota: Le prossime versioni potrebbero implementare dei
  dispositivi che renderanno obsolete queste discussioni.
  Comunque sia la loro implementazione  difficoltosa a causa
  del fatto che la allocazione dinamica a tempo di esecuzione
  pu portare a dei blocchi; l'implementazione attuale
  effettua una pre-allocazione statica.



  8. D: Quanto influenza la velocit del mio dispositivo RAID-0, RAID-4
     o RAID-5 la grandezza del chunk (grandezza della striscia)?


       R: La grandezza del chunk  la quantit di dati contigui nel
       dispositivo virtuale che sono contigui anche nel dispositivo
       fisico. In questo HOWTO "chunk" e "striscia" sono la stessa
       cosa: quella che  comunemente chiamata "striscia" in altre
       documentazioni su RAID, nelle pagine del manuale di MD 
       chiamata "chunk". Si parla di strisce o chunk solo per RAID
       0, 4 e 5 poich le strisce non vengono utilizzate nel mir
       roring (RAID-1) e nella semplice concatenazione (RAID-lin
       ear).  Le dimensioni della striscia influenzano il tempo di
       latenza (ritardo) nella lettura e nella scrittura, il
  throughput (larghezza di banda) e la gestione di operazioni
  indipendenti (l'abilit di provvedere a richieste di I/O
  simultanee che si accavallano)


  Posto che si usino il filesystem ext2fs e le impostazioni
  attuali del kernel che regolano il read-ahead, le strisce di
  grosse dimensioni risultano quasi sempre essere una scelta
  migliore rispetto a quelle di piccole dimensioni, e strisce
  di dimensioni confrontabili con la grandezza di un quarto di
  cilindro del disco potrebbero essere ancora migliori. Per
  capire questa affermazione, consideriamo gli effetti delle
  strisce grandi su file piccoli, e delle strisce piccole sui
  file grandi.  La dimensione delle strisce non influenza le
  prestazioni durante la lettura di piccoli file: per una
  serie di N dischi il file ha 1/N probabilit di essere
  interamente contenuto in una striscia in uno dei dischi.
  Quindi sia la larghezza di banda che la latenza in lettura
  sono comparabili a quelle di un singolo disco. Ipotizzando
  il fatto che i file piccoli siano distribuiti in maniera
  statisticamente uniforme nel filesystem (e, se si usa il
  filesystem ext2fs, questo dovrebbe essere vero) il numero
  delle letture simultanee sovrapposte pu essere circa N
  volte maggiore, senza collisioni significanti. Al contrario,
  se vengono utilizzate strisce di dimensioni molto ridotte e
  un file grande viene letto sequenzialmente, vi sar un
  accesso in lettura da ogni disco del sottosistema. Nella
  lettura di un singolo file di grandi dimensioni, la latenza
  sar almeno raddoppiata, e la probabilit che un blocco si
  trovi molto distaccato dagli altri aumenter. Si noti
  comunque ci che si ottiene: la larghezza di banda pu
  aumentare di al pi N volte nella lettura di un singolo file
  di grandi dimensioni, poich N dischi lo leggono
  simultaneamente (se viene usato il read-ahead per mantenere
  attivi tutti i dischi). Ma vi  anche un effetto secondario
  controproducente: se tutti i drive sono occupati nella
  lettura di un singolo, grande file, il tentativo di leggere
  un secondo, un terzo file allo stesso tempo causer un grave
  contenzioso, e degrader le prestazioni a causa del fatto
  che gli algoritmi del disco lo porteranno ad effettuare
  numerosi seek. Quindi, strisce di grosse dimensioni danno
  quasi sempre i risultati migliori. L'unica eccezione 
  costituita dalla situazione nella quale si accede ad un
  singolo file di grandi dimensioni e si richiede la maggiore
  larghezza di banda possibile e si usa anche un buon
  algoritmo di read-ahead, in questo caso sarebbero
  desiderabili strisce di piccole dimensioni.



  Si noti che in precedenza questo HOWTO ha raccomandato
  strisce di piccole dimensioni per i news spool o per altri
  sistemi con un gran numero di piccoli file. Questo  stato
  un cattivo consiglio, ed ecco perch: i news spool
  contengono non solo molti piccoli file ma anche file
  sommario di grandi dimensioni e grandi directory. Se il file
  sommario  pi grande della striscia, la sua lettura
  comporter un accesso su pi dischi, rallentando il tutto
  come se ogni disco effettuasse un seek. Similmente,
  l'attuale filesystem ext2fs ricerca nelle directory in
  maniera lineare e sequenziale.  Quindi, per trovare un dato
  file o inode, in media met della directory verr letta. Se
  la directory  distribuita su pi strisce (su pi dischi),
  la lettura della directory (per es.  a causa del comando ls)
  potrebbe rallentare notevolmente.  Un grazie a Steven A.
  Reisman <sar@pressenter.com> per questa correzione.  Steve
  ha anche aggiunto:

       Ho scoperto che l'uso di una striscia da 256k d performance
       molto migliori. Sospetto che la dimensione ottimale sia
       quella di un cilindro del disco (o forse la dimensione della
       cache dei settori del disco). Comunque sia, oggi i dischi
       hanno zone di memorizzazione con un numero di settori vari
       abile (e le cache dei settori variano anche fra differenti
       modelli). Non c' un metodo per assicurarsi che le strisce
       non oltrepassino i confini del cilindro.




  I tool accettano le dimensioni delle strisce in KBytes.  Conviene
  specificare un multiplo della dimensione della pagina per la CPU che
  si usa (4KB su x86).



  9. D: Quale  il corretto fattore di stride da usare nella creazione
     di un filesystem ext2fs sulla partizione RAID? Per stride intendo
     l'opzione -R nel comando mke2fs:

     mke2fs -b 4096 -R stride=nnn  ...



  Cosa devo mettere al posto di nnn?

       R: L'opzione -R stride viene usata per comunicare al
       filesystem le dimensioni delle strisce RAID. Poich solo
       RAID-0,4 e 5 usano le strisce, e RAID-1 (mirroring) e RAID-
       linear non le usano, questa opzione ha senso solo per
       RAID-0,4,5.

       La conoscenza delle dimensioni delle strisce consente a
       mke2fs di dimensionare i blocchi e i bitmap degli inode in
       modo tale che non vengano a trovarsi tutti sullo stesso dis
       positivo fisico. Uno sconosciuto ha contribuito alla discus
       sione scrivendo:


       L'ultima primavera ho notato che in una coppia di dischi uno
       aveva sempre un I/O maggiore e ho attribuito la cosa a
       questi blocchi di meta-dati. Ted ha aggiunto l'opzione -R
       stride= in risposta alle mie spiegazioni e alla richiesta di
       una soluzione.


  Per un filesystem con blocchi da 4Kb e strisce da 256Kb, si potrebbe
  usare -R stride=64.


  Se non volete affidarvi all'opzione -R, potete ottenere un effetto
  simile in modo differente.  Steven A. Reisman <sar@pressenter.com>
  scrive:

       Un'altra questione  l'uso del filesystem su un dispositivo
       RAID-0.  Il filesystem ext2 alloca 8192 blocchi per ogni
       gruppo. Ogni gruppo ha il proprio set di inode. Se ci sono
       2, 4, o 8 dischi questi blocchi si accumulano nel primo
       disco. Ho distribuito gli inode su tutti i drive impostando
       mke2fs in modo da allocare solo 7932 blocchi per gruppo.


  Qualche pagina di mke2fs non descrive l'opzione [-g blocks-per-group]
  usata in questa operazione



  10.
     D: Dove posso mettere i comandi md negli script di avvio, in modo
     tale che tutto parta automaticamente al boot?


       R: Rod Wilkens <rwilkens@border.net> scrive:

       Quello che ho fatto  stato mettere ``mdadd -ar'' nel
       ``/etc/rc.d/rc.sysinit'' subito dopo il punto nel quale il
       kernel carica i moduli, e prima del controllo dischi di
       ``fsck''. In questa maniera si pu mettere il dispositivo
       ``/dev/md?'' in ``/etc/fstab''.  Quindi ho messo il comando
       ``mdstop -a'' subito dopo il comando ``umount -a'' nel file
       ``/etc/rc.d/init.d/halt''.


  Nel caso si usi raid-5 si dovr fare attenzione al codice di uscita di
  mdadd e, nel caso indichi un errore, eseguire


       ckraid --fix /etc/raid5.conf





  per riparare i danni.



  11.
     D: Mi chiedo se sia possibile configurare lo striping su pi di 2
     dispositivi in md0? Questo per un news server, e io ho 9 dischi...
     Non c' bisogno che dica che ne servono molti pi di due. 
     possibile?


       A: Si. (descrivere come)



  12.
     D: Quando Software RAID  superiore al RAID Hardware?

       R: Normalmente il RAID hardware  considerato superiore al
       RAID Software, poich i controller hardware dispongono
       spesso di una capiente cache e possono effettuare una pro
       grammazione migliore delle operazioni in parallelo. Comunque
       il software RAID integrato pu (e lo fa) avvantaggiarsi
       della sua integrazione con il sistema operativo.


       Per esempio, ... ummm. Oscura descrizione del caching dei
       blocchi ricostruiti nella cache del buffer tralasciata ...


        stato riferito che, su un sistema SMP con doppio PPro,
       software RAID supera le prestazioni di un hardware RAID di
       ben nota marca di un fattore variabile da 2 a 5.


  Software RAID  anche un'opzione molto interessante per
  sistemi server ridondanti ad altro gradi di affidabilit.
  In questa configurazione due CPU sono collegate ad un set di
  dischi SCSI. Se un server si blocca o non risponde pi
  l'altro server pu eseguire mdadd, mdrun e mount per montare
  la serie di dischi RAID, e continuare le operazioni. Questo
  tipo di operazione a doppio controllo non  sempre possibile
  con molti controller RAID, a causa del fatto che il
  controller hardware mantiene la stessa configurazione.



  13.
     D: Se aggiorno la mia versione di raidtools, posso avere problemi
     nella gestione di vecchi sistemi? In breve, devo ricreare i miei
     sistemi RAID ogni volta che aggiorno i programmi di utilit raid?


       R: No, a meno che non cambi il numero primario di versione.
       Una versione di MD x.y.z consiste di tre sottoversioni:

            x:      Versione primaria.
            y:      Versione secondaria.
            z:      Livello di patch.




       La versione x1.y1.z1 del driver RAID supporta un sistema
       RAID con versione x2.y2.z2 nel caso (x1 == x2) e (y1 >= y2).

       Le versioni che differiscono per il solo livello di patch
       (z) sono concepite in modo da essere compatibili.


       Il numero di versione secondario viene incrementato quando
       la struttura del sistema RAID viene modificata in modo tale
       da renderla incompatibile con le vecchie versioni del
       driver. Le nuove versioni del driver manterranno la
       compatibilit con i vecchi sistemi RAID.

       Il numero primario di versione viene incrementato quando non
       vi sono pi ragioni per continuare a supportare i vecchi
       sistemi RAID nel nuovo codice del kernel.


       Per quanto riguarda RAID-1,  improbabile che la struttura
       del disco o dei superblock venga alterata entro breve
       termine.  Le ottimizzazioni e le nuove funzioni
       (ricostruzione, tool che implementino il multithread, hot-
       plug ecc.) non vanno a modificare la struttura fisica.



  14.
     D: Il comando mdstop /dev/md0 dice che il dispositivo  occupato.


       R: C' un processo che ha un file aperto su /dev/md0 o
       /dev/md0  ancora montato. Chiudere il processo o eseguire
       umount /dev/md0.



  15.
     D: Vi sono dei tool per l'analisi delle prestazioni?
       R: Vi  anche un nuovo programma di utilit chiamato iotrace
       nella directory linux/iotrace. Esso legge /proc/io-trace e
       analizza/riporta il suo output. Se credete che le
       prestazioni dei vostri dispositivi a blocchi siano poco con
       vincenti, date un'occhiata all'output di iotrace.



  16.
     D: Leggendo i sorgenti di RAID ho visto il valore SPEED_LIMIT
     impostato a 1024K/sec. Che significa? Questo rallenta le
     prestazioni?


       R: SPEED_LIMIT viene usato per regolare la ricostruzione
       RAID quando essa avviene in automatico. Semplificando, la
       ricostruzione automatica permette di effettuare e2fsck e
       mount subito dopo uno shutdown sporco, senza prima dover
       eseguire ckraid. La ricostruzione automatica viene usata
       anche dopo la sostituzione di un disco rotto.


       Per evitare un sovraccarico del sistema mentre la
       ricostruzione  in corso, il processo di ricostruzione
       controlla la velocit alla quale essa avviene e la rallenta
       se  troppo veloce.  Il limite di 1M/sec  stato scelto
       arbitrariamente come ragionevole velocit che consente alla
       ricostruzione di finire in un tempo accettabile, con solo un
       leggero carico del sistema, in modo tale che gli altri
       processi non vengano disturbati.



  17.
     D: E riguardo la ''spindle synchronization'' o ''disk
     synchronization'' ("sincronizzazione dei dischi". ndt)?

       R: La sincronizzazione dei dischi viene usata per far girare
       pi hard disk esattamente alla stessa velocit, in modo tale
       che le loro superfici siano sempre perfettamente allineate.
       Questo metodo viene usato da qualche controller hardware per
       migliorare l'organizzazione degli accessi in scrittura.
       Tuttavia, per quanto riguarda Software RAID, questa infor
       mazione non viene usata e la sincronizzazione dei dischi pu
       addirittura influire negativamente sulle prestazioni.



  18.
     D: Come posso creare degli spazi di swap usando raid 0?  Lo stripe
     delle aree di swap su pi di 4 dischi  realmente veloce?

       R: Leonard N. Zubkoff risponde:  veramente veloce, ma non
       c' necessit di usare MD per mettere in strip le aree di
       swap. Il kernel usa automaticamente le strisce su diverse
       aree di swap a priorit uguale. Per esempio, la seguente
       configurazione di /etc/fstab mette in stripe le aree di swap
       su cinque drive suddivisi in tre gruppi:








  /dev/sdg1       swap    swap    pri=3
  /dev/sdk1       swap    swap    pri=3
  /dev/sdd1       swap    swap    pri=3
  /dev/sdh1       swap    swap    pri=3
  /dev/sdl1       swap    swap    pri=3
  /dev/sdg2       swap    swap    pri=2
  /dev/sdk2       swap    swap    pri=2
  /dev/sdd2       swap    swap    pri=2
  /dev/sdh2       swap    swap    pri=2
  /dev/sdl2       swap    swap    pri=2
  /dev/sdg3       swap    swap    pri=1
  /dev/sdk3       swap    swap    pri=1
  /dev/sdd3       swap    swap    pri=1
  /dev/sdh3       swap    swap    pri=1
  /dev/sdl3       swap    swap    pri=1





  19.
     D: Voglio ottimizzare le prestazioni. Devo usare controller
     multipli?

       R: In molti casi la risposta  si. L'uso di controller mul
       tipli per accedere in parallelo al disco consentir un
       incremento delle prestazioni. Ovviamente il miglioramento
       effettivo dipender dalla vostra particolare configurazione.
       Per esempio  stato riferito (Vaughan Pratt, gennaio 98) che
       un singolo Cheetah da 4.3Gb collegato ad un Adaptec 2940UW
       pu arrivare ad un trasferimento di 14Mb/sec (senza l'uso di
       RAID). Installando due dischi su un controller e usando una
       configurazione RAID-0 si arriva ad una prestazione di
       27Mb/sec.


       Si noti che il controller 2940UW  un controller SCSI
       "Ultra-Wide", capace di un trasferimento teorico di
       40Mb/sec.  quindi la velocit di trasferimento misurata non
       sorprende.  Tuttavia un controller pi lento collegato a due
       dischi veloci potrebbe fare da collo di bottiglia. Si noti
       anche che molte periferiche SCSI out-board (ad es. i tipi
       con le connessioni utilizzabili "a caldo")  non possono
       arrivare a 40Mb/sec a causa del rumore elettrico e di quello
       dovuto al cablaggio.



       Se state progettando un sistema a controller multipli tenete
       a mente il fatto che molti dischi e molti controller
       funzionano normalmente al 70-85% della loro velocit
       massima.


       Si noti anche che l'uso di un controller per disco pu
       ridurre la probabilit che il sistema si blocchi a causa di
       un malfunzionamento dei cavi o del controller (Teoricamente
       -- questo accade solo nel caso in cui il driver del
       controller riesca a gestire ordinatamente un controller
       rotto.  Non tutti i device driver SCSI sembrano riuscire a
       gestire una simile situazione senza andare in panico o
       bloccarsi in altra maniera).




  9.  RAID ad Alta Affidabilit


  1. D: RAID mi aiuta a cautelarmi dalla perdita di dati. Ma come posso
     anche assicurarmi che il sistema resti funzionante il maggior tempo
     possibile, e non sia soggetto a dei blocchi? Idealmente, vorrei un
     sistema che funzioni 24 ore al giorno, 7 giorni alla settimana, 365
     giorni all'anno.


       R: Raggiungere l'Alta Affidabilit  difficile e dis
       pendioso.  Pi si cerca di rendere indipendente dai guasti
       il sistema, pi il sistema diventa difficile e costoso. I
       seguenti trucchi, consigli, idee e voci non confermate forse
       possono aiutarvi nella vostra ricerca.

         I dischi IDE si possono rompere in maniera tale che il
          disco rotto su un cavo IDE pu impedire al disco
          funzionante sullo stesso cavo di rispondere, facendo
          apparire la cosa come se tutti e due i dischi fossero
          rotti.  Poich RAID non protegge dal malfunzionamento di
          due dischi si dovr o mettere un solo disco su un cavo
          IDE o, se ci sono due dischi sullo stesso cavo, essi
          devono fare parte di set RAID differenti.

         I dischi SCSI si possono rompere in maniera tale da
          impedire l'accesso alle altre unit SCSI collegate in
          cascata.  La modalit di malfunzionamento implica un
          cortocircuito del pin (condiviso dalle altre unit)
          attraverso il quale viene segnalato che il dispositivo 
          pronto; poich questo collegamento  condiviso, non si
          possono effettuare operazioni finch il cortocircito non
          sia rimosso.  Quindi, due dischi SCSI sulla stessa catena
          non devono appartenere allo stesso set RAID.

         Simili considerazioni valgono anche per i controller.
          Non usate tutti i canali di un controller; usate diversi
          controller.

         Non usate la stessa marca o modello per tutti i dischi.
          Non  improbabile che dei forti temporali ve ne possano
          rompere due o pi (s, tutti usiamo degli stabilizzatori
          di corrente, ma questi non sono macchine perfette).  Il
          caldo e l'insufficiente ventilazione del disco sono altri
          killer di dischi. I dischi a buon prezzo spesso si
          surriscaldano. L'uso di modelli differenti di dischi e
          controller diminuisce la probabilit che qualsiasi cosa
          succeda ad un disco (il caldo, uno shock fisico,
          vibrazioni, sovratensioni) possa succedere anche agli
          altri nello stesso modo.

         Per cautelarsi da malfunzionamenti del controller o del
          PC, potrebbe essere possibile costruire un set di dischi
          SCSI che sia "twin-tailed"; collegato cio a due
          computer. Un computer monta il filesystem in lettura-
          scrittura, mentre il secondo computer lo monta in sola
          lettura, e agisce da "hot spare" (ricambio a caldo ndt).
          Quando il computer che agisce da "hot spare" viene
          informato del fatto che il computer principale si  rotto
          (ad es. attraverso un watchdog), toglie tensione al
          computer principale (per essere sicuri che sia realmente
          spento) e quindi effettua un fsck e rimonta il filesystem
          in lettura-scrittura. Se qualcuno riesce a far funzionare
          questa configurazione lo prego di farmi sapere.


    Usare sempre un UPS ed effettuare shutdown puliti.  Anche
     se uno shutdown sporco pu non danneggiare i dischi,
     l'esecuzione di ckraid su un sistema di dischi anche
     piccolo  estremamente lenta. Oppure potete hackerare il
     kernel e fare un debug del codice che riguarda la
     ricostruzione a caldo...

    I cavi SCSI sono famosi per essere delle creature dal
     comportamento variabile, soggette ad ogni sorta di
     accidenti. Usate i migliori cavi che possiate rimediare.
     Si usi il bubble-wrap per assicurarsi che i cavi non
     stiano troppo vicino l'uno all'altro generando mutue
     interferenze. Si osservino rigorosamente le restrizioni
     sulla lunghezza dei cavi.

    Date un'occhiata a SSI (Serial Storage Architecture).
     Anche se dispendiosa, si dice che sia pi affidabile
     della tecnologia SCSI.

    Divertitevi,  pi tardi di quanto immaginiate.


  10.  Domande che attendono risposta


  1. D: Se, per ragioni di prezzo, metto in mirror un disco lento con
     uno veloce, il software sar abbastanza scaltro da bilanciare le
     richieste di lettura tenendo conto della velocit dei dischi o far
     rallentare il tutto alla velocit del disco pi lento?


  2. D: Per testare il thru-put del disco...  c' un dispositivo a
     caratteri cui si possa accedere direttamente al posto di /dev/sdaxx
     che si possa usare per valutare le prestazioni dei dischi raid??
     c' un programma GUI che si possa usare per controllare il thru-put
     del disco??


  11.  Desiderata di MD e del relativo software

  Bradley Ward Allen <ulmo@Q.Net> ha scritto:

       Le idee includono:

         Parametri di boot per dire al kernel quali dispositivi
          dovranno essere dispositivi MD (niente pi ``mdadd'')

         Rendere MD trasparente a ``mount''/``umount'' in modo
          tale che non vi siano pi ``mdrun'' e ``mdstop''

         Completa integrazione nel kernel di ``ckraid'' e sua
          esecuzione automatica in caso di bisogno.

          (Ho gi suggerito di smetterla di usare i tool e di
          integrarli nel kernel; io la penso cos, si parla di un
          filesystem, non di un giocattolo.)

         Trattare sistemi che possano facilmente sopravvivere al
          malfunzionamento (simultaneo o in momenti separati) di N
          dischi, con N intero > 0 definito dall'amministratore di
          sistema.

         Migliorarne il comportamento in caso di blocco del
          kernel, problemi con l'alimentazione e altri shutdown
          improvvisi.

    Non disabilitare l'intero disco se solo una parte di esso
     si  rovinata, ad es. se gli errori di lettura sono meno
     del 50% su 20 diverse richieste di accesso, si continua
     ad usare il disco ignorando i settori che hanno dato
     problemi.

    Settori danneggiati:

    Un meccanismo che consenta di memorizzare da qualche
     parte nel disco quali settori sono danneggiati.

    Se esiste gi una convenzione riconoscibile dai
     filesystem di livello pi alto per marcare i settori
     danneggiati, questa deve essere usata. Programmarne una
     se non ne esiste una riconoscibile.

    Forse in alternativa un meccanismo per fare sapere allo
     strato superiore che le dimensioni del disco si sono
     ridotte, magari implementando una automazione che
     consenta allo strato superiore di spostare i dati dalle
     aree che vengono eliminate. Questo potrebbe anche andare
     bene per trattare i blocchi danneggiati.

    Nel caso non si possano realizzare le idee di cui sopra,
     lasciare una piccola parte del disco (definibile
     dall'amministratore di sistema) da parte per i blocchi
     danneggiati (magari distribuita su tutto il disco?) e
     usare questa area (la pi vicina) al posto dei blocchi
     danneggiati quando questi vengono scoperti. Ovviamente
     questa soluzione  inefficiente. Oltretutto il kernel
     dovrebbe mettere nei log, ogni volta che il sistema RAID
     viene avviato, tutti i settori danneggiati e i
     provvedimenti adottati nei loro riguardi con priorit
     ``crit'', solo per far sapere all'amministratore che il
     suo disco  impolverato internamente (o ha una testina
     malata).

    Dischi (dis)attivabili via software:

     ``disattiva questo disco''
        si blocca fino a che il kernel non si  assicurato che
        non vi siano dati che possono servire sul disco che
        sta per essere disattivato (ad es. per completare uno
        XOR/ECC/ o altra correzione di errore), quindi cessa
        l'utilizzo del disco (in modo che possa essere
        rimosso, ecc.)

     ``attiva questo disco''
        esegue, se necessario, mkraid su un nuovo disco e
        quindi lo utilizza per le operazioni ECC/qualsiasi,
        ampliando quindi il sistema RAID5;

     ``ridimensiona il sistema''
        reimposta il numero totale di dischi e il numero di
        dischi ridondanti, spesso con il risultato di
        aumentare le dimensioni del sistema RAID; sarebbe
        bello poter usare questa opzione, quando serve, senza
        perdere dati, ma mi viene difficile immaginare come
        possa funzionare effettivamente; in ogni caso, un modo
        per sospendere (possibilmente per delle ore (il kernel
        dovrebbe scrivere qualcosa nei log ogni dieci secondi
        in questo caso)) potrebbe essere necessario;

     ``attiva questo disco mentre salvi i dati''
        che salvi i dati su un disco cos com' e lo inserisca
        in un sistema RAID5, in modo tale che l'orrendo "salva
        e ripristina" non debba essere eseguito ogni volta che
        qualcuno configuri un sistema RAID5 (oppure, potrebbe
        essere pi semplice salvare una partizione al posto di
        due, potrebbe addirittura entrare nella prima come
        file compresso con gzip); infine,

     ``riattiva disco''
        potrebbe essere un modo grazie al quale l'operatore
        scavalca il SO per provare un disco che in precedenza
        era risultato non funzionante (potrebbe semplicemente
        chiamare "disattiva" e quindi "attiva", penso).


  Altre idee dalla rete:


         rendere finalrd simile a initrd, per semplificare il boot
          da raid.

         una modalit raid di sola scrittura, per rendere pi
          semplice quanto sopra

         Contrassegnare il sistema RAID come "pulito" quando non
          siano state effettuate "mezze scritture". -- Sarebbe come
          dire che non vi sono operazioni di scrittura finite su un
          disco e ancora da ultimare su un altro disco.

          Aggiungere un timeout che segnali "inattivit in
          scrittura" (per evitare seek frequenti al superblock RAID
          quando il sistema RAID  relativamente occupato.)




































  Software-RAID HOWTO
  Jakob stergaard (jakob@ostenfeld.dk)
  v. 0.90.7 19 gennaio 2000

  Questo HOWTO spiega come usare il Software RAID con Linux. Esso si
  riferisce ad una specifica versione del Software RAID layer, ovvero lo
  0.90 RAID layer scritto da Ingo Molnar e altri. Questo  il layer RAID
  che diventer standard in Linux-2.4 ed  anche la versione usata dai
  kernel-2.2 in alcune distribuzioni. Il supporto al RAID 0.90 
  disponibile sotto forma di patch a Linux-2.0 e Linux-2.2 ed  da molti
  considerato molto pi stabile del vecchio supporto RAID presente in
  questi kernel.

  1.  Introduzione

  Per una descrizione del vecchio layer RAI, quello che  standard nei
  kernel 2.0 e 2.2, date un occhiata all'eccellente HOWTO di Linas
  Vepstas (linas@linas.org) disponibile presso il Linux Documentation
  Project a linuxdoc.org.

  Il sito principale per questo HOWTO 
  http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/, dove saranno
  pubblicate le versioni aggiornate.  L'HOWTO  scritto da Jakob
  stergaard ed  basato su un gran numero di e-mail scambiate fra
  l'autore ed Ingo Molnar (mingo@chiara.csoma.elte.hu) -- uno degli
  sviluppatori del supporto RAID --,  la linux-raid mailing list (linux-
  raid@vger.rutgers.edu) varie altre persone.

  La ragione per cui questo HOWTO  stato scritto  che, sebbene un
  Software-RAID HOWTO esistesse gi, il precedente HOWTO descrive il
  vecchio Software RAID che si trova nei kernel 2.0 e 2.2 standard.
  Questo HOWTO descrive invece l'uso del nuovo RAID che  stato
  sviluppato recentemente. Il nuovo RAID ha molte funzioni e
  caratteristiche non presenti nel vecchio RAID.

  Se volete usare il nuovo RAID con i kernel 2.0 e 2.2, dovreste
  prelevare una patch per il vostro kernel da ftp://ftp.[your-country-
  code].kernel.org/pub/linux/daemons/raid/alpha, o pi recentemente da
  http://people.redhat.com/mingo/. I kernel 2.2 standard non hanno un
  supporto diretto per il nuovo RAID descritto in questo HOWTO. Queste
  patch sono quindi necessarie. Il supporto al vecchio RAID nei kernel
  2.0 e 2.2 standard presenta dei bug e non presenta diverse importanti
  caratteristiche che sono invece presenti nel nuovo software RAID.

  Nel momento in cui viene scritto questo HOWTO, il supporto al nuovo
  RAID  stato inserito nell'albero di sviluppo dei kernel 2.3 e quindi
  sar (molto probabilmente) presente nei Linux kernel 2.4, quando
  saranno disponibili.  Fino ad allora ai kernel stabili devono essere
  applicate le patch manualmente.

  Potreste usare i -ac rilasciati da Alan Cox, per il supporto RAID nei
  kernel 2.2. Alcuni di questi contengono il supporto al nuovo RAID e
  questo vi permetter di non dovere applicare le patch al kernel da
  soli.

  Alcune delle informazioni in questo HOWTO possono sembrare banali, se
  conoscete gi bene il RAID. In questo caso potete saltare alcune
  parti.



  1.1.  Liberatoria

  La liberatoria obbligatoria:


  Sebbene il RAID sembri stabile a me e a molte altro persone, esso
  potrebbe non funzionare nel vostro caso.  Se perdete tutti i vostri
  dati, il vostro lavoro, venite investiti da un camion o qualunque
  altra cosa, non  colpa n mia n degli sviluppatori. Attenzione,
  state usando il software RAID e queste informazioni a vostro rischio!
  Non c' nessun tipo di garanzia che il software o queste informazioni
  siano corrette, n adatte ad un qualunque uso. Fate il salvataggio
  (back up) di tutti i vostri dati prima di fare esperimenti. Meglio
  essere sicuri che dispiaciuti.

  Detto questo, devo dire che non ho mai avuto nessun problema di
  stabilit con il Software RAID, lo uso su alcune macchine senza alcun
  problema e non ho ancora visto altra gente con problemi di crolli
  casuali del sistema o instabilit causata dal RAID.



  1.2.  Nota alla versione italiana

  Un po' di tempo fa sono stato un "utente" di questo HOWTO, che ho
  trovato particolarmente utile e chiaro nello spiegare come costruire
  un RAID array. Mi sono promesso allora di offrirne la versione
  italiana a tutti coloro che hanno difficolt a "masticare" l'inglese.
  Il mio inglese  ben lungi dall'essere perfetto, ma spero di essere
  riuscito a mantenere la chiarezza dell'originale, per fare questo a
  volte mi sono dovuto allontanare dalla stretta traduzione letterale,
  spero di averlo fatto nel modo migliore.  Ho cercato di
  "italianizzare" una buona parte dei termini tecnici, anche se per
  alcuni ho preferito mantenere l'originale inglese, perch i
  corrispondenti italiani risultavano essere fuorvianti e
  morfologicamente atroci.  Per quel che riguarda i plurali inglesi, ho
  seguito la convenzione adottata fra gli altri da Umberto Eco e cio di
  esprimerli con i corrispondenti singolari quando inseriti in un
  contesto in italiano.  Sono certo che il mio lavoro  di gran lunga
  perfettibile, sia purch le mie conoscenze del RAID sono limitate e
  quindi posso aver espresso dei concetti in modo contorto se non poco
  corretto, sia perch di alcune parti ho avuto serie difficolt di
  traduzione in italiano.  Ogni eventuale suggerimento risulter
  gradito: alessio@arcetri.astro.it, tonno@stud.unipg.it.



  1.3.  Cosa  necessario

  Questo Howto assume che stiate usando uno degli ultimi kernel 2.2.x o
  2.0.x con la corrispondente patch raid0145 e la versione 0.90 dei
  raidtools, o che stiate usando uno degli ultimi kernel 2.3 (versione >
  2.3.46) o eventualmente il kernel 2.4. Sia le patch che i raidtools
  possono essere trovati presso
  ftp://ftp.fi.kernel.org/pub/linux/daemons/raid/alpha, ed in qualche
  caso presso http://people.redhat.com/mingo/. Le patch RAID, il
  pacchetto raidtools ed il kernel dovrebbero avere versioni il pi
  possibile corrispondenti. A volte pu essere necessario usare dei
  kernel pi vecchi se le patch raid non sono disponibili per l'ultimo
  kernel.



  2.  Perch il RAID ?

  Possono esserci molte buone ragioni per usare il RAID. Alcune sono: la
  capacit di combinare diversi dischi "reali" in un dispositivo
  "virtuale" pi grande, l'aumento delle prestazioni e la ridondanza.



  2.1.  Aspetti Tecnici

  Il RAID per Linux pu funzionare sulla maggior parte dei dispositivi a
  blocchi. Non importa se usate dispositivi SCSI o IDE o una loro
  combinazione. Alcuni hanno usato il Network Block Device (NBD) con pi
  o meno successo.

  Assicuratevi che il bus (o i bus) a cui sono collegati i dischi siano
  abbastanza veloci. Non dovreste avere 14 dispositivi UW-SCSI su un bus
  UW, se ogni disco pu fornire 10 MB/s e il bus pu sostenere solo 40
  MB/s.  Inoltre, dovreste avere solo un disco per ogni bus IDE. Far
  lavorare i dischi come master e slave  tremendo per le prestazioni.
  L'IDE non lavora bene quando deve accedere a pi di un disco per bus.
  Naturalmente, tutte le schede madri pi recenti hanno due bus IDE,
  cos che possiate montare due dischi in RAID senza dover acquistare
  degli ulteriori controller.

  Il layer (strato) RAID non ha assolutamente nulla a che fare con il
  layer del filesystem. Potete mettere qualsiasi filesystem su un
  dispositivo RAID, cos come su qualunque altro dispositivo a blocchi.



  2.2.  Termini

  L'acronimo "RAID" indica il "Linux Software RAID". Questo HOWTO non
  copre nessuno degli aspetti dell'Hardware RAID.

  Quando si descrivono i setup,  utile fare riferimento al numero dei
  dischi e alle loro dimensioni. Per tutto l'HOWTO la lettera N  usata
  per identificare il numero di dischi attivi nell'array (senza contare
  gli spare-disk). La lettera S  la dimensione del pi piccolo disco
  dell'array, se non diversamente specificato. La lettera P  usata come
  indice di prestazione di un disco dell'array, in MB/s.  Di solito, si
  assume che tutti i dischi dell'array siano ugualmente veloci, il che
  pu non essere sempre vero.

  Occorre notare che le parole "dispositivo" (``device'') e "disco"
  (``disk'') significano la stessa cosa.  Di solito i dispositivi usati
  per costruire un dispositivo RAID sono delle partizioni sui dischi e
  non necessariamente interi dischi. Combinare diverse partizioni su un
  disco di solito non ha senso, cos le parole dispositivi e dischi
  significano "partizioni su dischi diversi".



  2.3.  I livelli RAID

  Viene qui presentato brevemente ci che  supportato nelle Linux RAID
  patch. Alcune delle informazioni sono dei ragguagli assolutamente
  basilari sul RAID.  Saltate pure questa parte se conoscete il RAID.
  Potete sempre tornare a leggerla se doveste avere dei problemi  :).

  Le patch RAID attuali per Linux supportano i seguenti livelli:

    Linear mode

    Due o pi dischi sono combinati in un dispositivo fisico. I dischi
     sono "appesi" (accodati) l'uno all'altro, cos lo scrivere sul
     dispositivo RAID riempir prima il disco 0, poi il disco 1 e cos
     via. Non  obbligatorio che i dischi abbiano la stessa dimensione.
     Infatti, non importa affatto  :)

    Non c' ridondanza in questo livello. Se un disco si danneggia,
     probabilmente tutti i dati saranno persi. Potreste comunque essere
     fortunati e recuperare alcuni dati, perch il filesysytem star
     perdendo solo un grande blocco consecutivo ("chunk") di dati.

    Le prestazioni in lettura e scrittura non miglioreranno per delle
     singole letture/scritture. Ma se diversi utenti utilizzano il
     dispositivo, potreste essere fortunati nel caso in cui un utente
     usi il primo disco e l'altro stia accedendo a dei file che stanno
     sul secondo disco. Se succede questo, dovreste accorgervi di un
     incremento di prestazioni.

    RAID-0

    Detto anche modalit (mode) ``stripe''. Come il linear mode,
     eccetto che le letture e le scritture sono fatte in parallelo sui
     dischi. I dischi dovrebbero essere approssimativamente della stessa
     dimensione. Siccome tutti gli accessi sono effettuati in parallelo,
     i dischi si dovrebbero riempire nella stessa misura. Se un disco 
     pi grande degli altri, lo spazio eccedente  ancora usato nel
     dispositivo RAID, ma l'accesso avverr solo sul disco pi grande
     durante le scritture alla fine del dispositivo RAID. Questo va
     naturalmente a detrimento (deterioramento??) delle prestazioni.

    Come per il linear mode, non c' nessuna ridondanza in questo
     livello. Diversamente dal linear mode, non sar possibile
     recuperare alcun dato se un disco si danneggia. Se un disco viene
     rimosso da un RAID-0, il RAID non perder solo un grande
     consecutivo blocco di dati, esso sar riempito con piccoli buchi
     lungo tutto il dispositivo. e2fsck non sar probabilmente in grado
     di recuperare molto da questo dispositivo.

    Le prestazioni in lettura e scrittura cresceranno, poich le
     letture e scritture sono fatte in parallelo sui dischi. Questa 
     solitamente la ragione per cui si implementa un RAID-0. Se i bus
     che collegano i dischi sono abbastanza veloci, si dovrebbe ottenere
     qualcosa di molto vicino a N*P MB/s.

    RAID-1

    Questa  la prima modalit che presenta ridondanza. Il RAID-1 pu
     essere usato su due o pi dischi con zero o pi spare-disk. Questa
     modalit mantiene un'immagine (mirror) esatta del contenuto di un
     disco sugli altri. Naturalmente i dischi devono essere della stessa
     dimensione. Se un disco  pi grande di un altro, il dispositivo
     RAID avr la dimensione del disco pi piccolo.

    Se fino a N-1 dischi vengono rimossi (o si danneggiano), tutti i
     dati saranno ancora intatti. Se ci sono spare-disk disponibili e se
     il sistema (leggi SCSI driver o chipset IDE, ecc.) sopravvive al
     blocco del sistema, la ricostruzione del mirror inizier
     immediatamente su uno degli spare-disk, dopo aver individuato il
     disco danneggiato.

    Le prestazioni in scrittura sono piuttosto peggiori che su un
     singolo dispositivo, perch delle copie identiche dei dati scritti
     devono essere inviate a ogni disco dell'array. Le prestazioni in
     lettura sono di solito piuttosto cattive a causa di una troppo
     semplificata strategia di read-balancing nel codice RAID. Comunque,
      stata implementata un strategia di read-balancing migliorata, che
     potrebbe diventare disponibile per le patch del Linux kernel 2.2
     (chiedere sulla linux-kernel list), e sar molto probabilmente nel
     supporto RAID del kernel 2.4.

    RAID-4

    Questo livello RAID non  usato molto spesso. Pu essere usato su
     tre o pi dischi. Invece di fare un immagine (mirror) completa
     delle informazioni, esso tiene delle informazioni di parit su un
     disco e scrive i dati sugli altri dischi in una maniera simile al
     RAID-0. Siccome un disco  riservato per le informazioni di parit,
     la dimensione dell'array sar (N-1)*S, dove S rappresenta la
     dimensione del pi piccolo disco dell'array. Cos come nel RAID-1,
     i dischi dovrebbero essere della stessa dimensione, altrimenti il
     valore S nella formula precedente sar la dimensione del pi
     piccolo disco dell'array.

    Se un disco si danneggia, le informazioni di parit possono essere
     utilizzate per ricostruire tutti i dati. Se si danneggiano due
     dischi tutti i dati saranno persi.

    La ragione per cui questo livello non  usato spesso  che
     l'informazione di parit  tenuta su un disco. Quindi questa
     informazione deve essere aggiornata ogni volta uno degli altri
     dischi viene scritto. Quindi, il disco che contiene l'informazione
     di parit diventa un collo di bottiglia, se esso non  molto pi
     veloce degli altri dischi. Comunque, se vi accade di avere molti
     dischi lenti ed uno molto veloce, questo livello RAID pu essere
     molto utile.

    RAID-5

    Questa  forse la pi utile modalit RAID quando di desidera
     combinare un gran numero di dischi e mantenere ancora una certa
     ridondanza. Il RAID-5 pu essere usato su tre o pi dischi, con
     zero o pi spare-disk. Il dispositivo RAID-5 che viene fuori avr
     la dimensione (N-1)*S, come nel RAID-4. La grande differenza fra il
     RAID-5 ed il RAID-4  che le informazioni di parit sono
     distribuite in modo uguale fra i dischi di cui  composto l'array,
     evitando cos il collo di bottiglia che si creava nel RAID-4.

    Se uno dei dischi si danneggia, tutti i dati saranno ancora
     intatti, grazie alle informazioni di parit. Se degli spare-disk
     sono disponibili, la ricostruzione inizier immediatamente dopo il
     guasto del dispositivo. Se due dischi si danneggiano
     simultaneamente, tutti i dati saranno persi. Il RAID-5 pu
     sopravvivere al danneggiamento di un disco, ma non a quello di due
     o pi.

    Sia le prestazioni in scrittura che in lettura migliorano, ma 
     difficile predire di quanto.


  2.3.1.  Spare disks

  Gli spare disks sono dischi che non fanno parte dell'array RAID fino a
  che uno dei dischi attivi smette di funzionare. Quando il guasto di un
  disco viene rilevato, questo dispositivo viene marcato come "cattivo"
  (bad) e la ricostruzione viene immediatamente iniziata su uno degli
  spare-disk a disposizione.

  Quindi, gli spare-disk aggiungono un'utile extra sicurezza
  specialmente ai sistemi RAID-5. Ci si pu permettere di far lavorare
  il sistema per un po', con un dispositivo guasto, poich tutta la
  ridondanza  conservata per mezzo degli spare-disk.

  Non si pu essere sicuri che un sistema sopravviva al guasto di un
  disco. Il RAID layer dovrebbe gestire i guasti ai dischi piuttosto
  bene, ma i driver SCSI potrebbero crollare sulla gestione degli
  errori, o il chipset IDE potrebbe bloccarsi, oppure una quantit di
  altre cose potrebbe accadere.




  2.4.  Fare lo Swap su RAID

  Non c' nessuna ragione nell'usare il RAID per questioni di
  prestazioni dello swap. Il kernel stesso pu creare delle stripe
  facendo lo swap su pi dispositivi, se solo gli date la stessa
  priorit nel file fstab.

  Un fstab ben fatto si presenta cos:

  /dev/sda2       swap           swap    defaults,pri=1   0 0
  /dev/sdb2       swap           swap    defaults,pri=1   0 0
  /dev/sdc2       swap           swap    defaults,pri=1   0 0
  /dev/sdd2       swap           swap    defaults,pri=1   0 0
  /dev/sde2       swap           swap    defaults,pri=1   0 0
  /dev/sdf2       swap           swap    defaults,pri=1   0 0
  /dev/sdg2       swap           swap    defaults,pri=1   0 0


  Questa configurazione permette alla macchina di fare lo swap in paral
  lelo su sette dispositivi SCSI. Non c' nessuna necessit del RAID,
  visto che questa  da sempre una caratteristica intrinseca del kernel.

  Un'altra ragione per usare il RAID per lo swap  l'elevata
  disponibilit. Se per esempio si costruisce un sistema che fa il boot
  su un dispositivo RAID-1, il sistema dovrebbe essere in grado di
  sopravvivere al danneggiamento di un disco. Ma se il sistema stava
  facendo lo swap sul dispositivo guasto, ci sar sicuramente un blocco.
  Fare lo swap su un dispositivo RAID-1 risolverebbe questo problema.

  Ci sono state molte discussioni se fare lo swap fosse stabile sui
  dispositivi RAID. Questo  un dibattito continuo, che dipende per la
  maggior parte su altri aspetti del kernel. Nel momento in cui viene
  scritto questo HOWTO, sembra che fare lo swap su RAID sia
  perfettamente stabile, eccetto quando l'array  in fase di
  ricostruzione (per esempio dopo che un nuovo disco  stato inserito in
  un array danneggiato). Quando il kernel 2.4 sar rilasciato, questa 
  una questione che sar sistemata piuttosto rapidamente, ma fino ad
  allora, dovreste testare profondamente il sistema da soli fino a che
  sarete soddisfatti per la stabilit oppure concluderete che non volete
  fare lo swap su RAID.

  Potete costruire un RAID in un file di swap su un filesystem sul
  vostro dispositivo RAID, o potete costruire un dispositivo RAID come
  una partizione di swap, come preferite.  Come sempre, il dispositivo
  RAID  solo un dispositivo a blocchi.



  3.  Questioni hardware

  Questo paragrafo tratta alcune delle questioni hardware implicate
  durante il lavoro di un software RAID.


  3.1.  Configurazione IDE

  E' davvero possibile far lavorare un RAID su dei dischi IDE. Si
  possono realizzare anche eccellenti prestazioni. Infatti, il prezzo
  attuale dei dischi e dei controller IDE, rende l'IDE degno di
  considerazione, quando si costruisce un nuovo sistema RAID.

    Stabilit "fisica": I dischi IDE sono tradizionalmente stati sempre
     di peggiore qualit meccanica rispetto agli SCSI. Anche oggi, la
     garanzia sui dischi IDE  tipicamente di un anno , mentre  spesso
     da tre a cinque anni sui dischi SCSI. Sebbene non sia facile dire
     che i dischi IDE sono per definizione costruiti in modo peggiore,
     occorre stare attenti perch i dischi IDE di alcune marche possono
     guastarsi pi spesso dei dischi SCSI simili. Comunque altre marche
     usano esattamente la stessa meccanica sia per i dischi SCSI sia per
     quelli IDE. Tutto questo ci porta alla conclusione che: Tutti i
     dischi si guastano prima o poi, quindi occorre essere preparati a
     questa evenienza.

    Integrit dei dati:All'inizio, l'IDE non poteva in alcun modo
     assicurare che i dati inviati sul bus IDE sarebbero stati gli
     stessi dati scritti sul disco. Questo era dovuto alla totale
     mancanza di parit, controllo (checksum), ecc. Con lo standard
     Ultra-DMA, i dischi IDE ora compiono un controllo (checksum) sui
     dati che ricevono e quindi diventa molto pi difficile avere dei
     dati corrotti .

    Prestazioni: Non ho intenzione scrivere delle prestazioni dell'IDE.
     La vera storia in breve :

    I dischi IDE sono veloci (12 MB/s and oltre)

    L'IDE carica la Cpu pi dello SCSI (ma chi se ne importa?)

    Usare soloun disco IDE per IDE bus, i dischi slave deteriorano le
     prestazioni

    Sopravvivenza ai Guasti: I driver IDE in genere sopravvivono al
     guasto di un dispositivo IDE. Il RAID layer marcher il disco come
     guasto e se si sta lavorando su un sistema RAID livello 1 o
     superiore, la macchina dovrebbe lavorare ancora bene finch non
     viene arrestata per la manutenzione.

  E' molto importante, che venga usato un solo disco IDE per IDE bus.
  Non solo due dischi rovinano le prestazioni, ma il guasto di un disco
  spesso comporta il blocco del bus, e quindi il blocco di tutti i
  dischi su quel bus. In un sistema RAID a prova di guasto (fault-
  tolerant) (livelli RAID 1,4,5), il guasto di un disco pu essere
  gestito, ma il danneggiamento di due dischi (i due dischi sullo stesso
  bus che si bloccano a causa del guasto di uno dei due) render l'array
  inutilizzabile. Inoltre, quando il disco master su un bus si guasta,
  lo slave o il controller IDE possono risultare tragicamente confusi.

  Esistono degli economici PCI IDE controller sul mercato. E' possibile
  acquistare due o quattro bus per circa 80$. Considerando il prezzo pi
  basso dei dischi IDE rispetto agli SCSI, direi che un array di dischi
  IDE potrebbe essere veramente un'interessante soluzione se vi potete
  accontentare di avere a disposizione un numero relativamente basso
  (circa 8 probabilmente) di dischi da collegare al sistema (a meno che
  non abbiate molti slot PCI per collegare degli IDE controller).

  L'IDE ha maggiori problemi di cablatura quando si creano grandi array.
  Anche se avete a disposizione abbastanza slot PCI,  difficile che
  possiate sistemare pi di 8 dischi in un sistema continuando a
  mantenerlo funzionante senza corruzione dei dati (causato dalla
  lunghezza eccessiva dei cavi IDE).



  3.2.  Sostituzione di dischi "al volo" (Hot Swap)

  Questa  stata una delle questioni maggiormente trattate sulla linux-
  kernel list per un po' di tempo. Sebbene la sostituzione "al volo" dei
  dischi sia supportata a qualche livello, non  ancora qualcosa che
  possa essere fatta facilmente.



  3.2.1.  Sostituzione "al volo" (Hot-swapping) dei dischi IDE

  NO ! L'IDE non gestisce assolutamente la sostituzione "al volo". Di
  sicuro, pu funzionare, se il driver IDE  compilato come modulo
  (possibile solo con i kernel della serie 2.2), e se lo ricaricate dopo
  avere sostituito il disco. Ma potreste anche finire con un controller
  IDE "fritto" e avere un tempo di fermo macchina molto maggiore che se
  aveste sostituito il drive con il sistema arrestato.

  Il problema principale, eccetto le questioni elettriche che possono
  distruggere il vostro hardware,  che il bus IDE deve essere
  riesaminato dopo che i dischi sono stati sostituiti. Il driver IDE non
  pu al momento farlo. Se il nuovo disco  al 100% uguale al vecchio
  (geometria, ecc.), potrebbe funzionare anche senza riesame del bus, ma
  in verit questo vuol dire camminare sulla lama del rasoio.



  3.2.2.  Sostituzione "al volo" (Hot-swapping) di dischi SCSI

  Nemmeno il normale hardware SCSI offre la sostituzione "al volo".
  Potrebbe per funzionare comunque. Se il vostro SCSI driver supporta
  il riesame del bus e il collegamento e la rimozione di dispositivi,
  potreste essere in grado di sostituire al volo i dischi. Comunque, in
  un normale bus SCSI non si dovrebbero probabilmente scollegare i
  dispositivi mentre il sistema  ancora alimentato. Ma, di nuovo,
  potrebbe funzionare (e potreste anche finire con dell'hardware
  "fritto").

  Lo SCSI layer dovrebbe sopravvivere se un disco cessa di funzionare,
  ma non tutti gli SCSI driver sono ancora in grado di gestire questo.
  Se il vostro driver SCSI si blocca quando un disco si guasta, il
  sistema croller con esso, tutto sommato il collegamento "al volo" non
   poi cos interessante.


  3.2.3.  Sostituzione "al volo" (Hot-swapping) con SCA

  Con lo SCA, dovrebbe essere possibile collegare i dispositivi "al
  volo". Comunque, io non posseggo l'hardware necessario a provare
  questa funzione, non sono a conoscenza di nessuno che ci abbia
  provato, cos non posso dare nessuna "ricetta" su come farlo.

  Se volete "giocare" con questo, dovreste comunque conoscere abbastanza
  del funzionamento dello SCSI e del RAID. Cos non scriver qui
  qualcosa che non posso essere sicuro che funzioni, posso invece darvi
  alcuni indizi:

    Fate un grep per cercare remove-single-device in
     linux/drivers/scsi/scsi.c

    Date un occhiata araidhotremove e raidhotadd

  Non tutti i driver SCSI supportano il collegamento e la rimozione dei
  dispositivi. Nella serie dei kernel 2.2, almeno l'Adaptec 2940 ed il
  Symbios NCR53c8xx sembrano supportarlo, gli altri potrebbero e non
  potrebbero. Apprezzerei molto se qualcuno avesse ulteriori fatti da
  riportare sull'argomento...




  4.  RAID setup



  4.1.  General setup

  Questo  quello di cui avete bisogno per qualunque livello RAID:

    Un kernel. Preferibilmente un kernel stabile della serie 2.2.x,
     oppure l'ultimo 2.0.x. (Se il kernel 2.4 fosse stato rilasciato
     quando leggerete questo documento, usate quest'ultimo)

    Le RAID patch.  C' di solito una patch disponibile per i kernel
     recenti (Se trovate un kernel 2.4, le patch sono gi state incluse
     e quindi vi potete dimenticare di questo punto)

    I RAID tool.

    Pazienza, Pizza, e la vostra bevanda con caffeina preferita.

  Tutto questo software pu essere trovato presso
  ftp://ftp.fi.kernel.org/pub/linux I RAID tool e le patch sono nella
  subdirectory daemons/raid/alpha subdirectory. I kernel si possono
  trovare nella subdirectory kernel.

  Applicate la patch al kernel, configuratelo per includere il supporto
  al livello RAID che volete usare. Compilatelo ed installatelo.

  Poi, decompattate, configurate, compilate ed installate i RAID tool.

  Ok, fatto.  Se fate un reboot ora, dovreste avere un file di nome
  /proc/mdstat. Ricordate, questo file  vostro amico. Guardate cosa
  contiene facendo un cat /proc/mdstat. Esso dovrebbe dirvi che avete la
  corretta RAID personality (modalit RAID) registrata e che nessun
  dispositivo RAID  al momento attivo.

  Create ora le partizioni che volete includere nel RAID array.

  Da ora, analizziamo specificamente ogni modalit in maniera separata.



  4.2.  Linear mode

  Ok, avete a disposizione due o pi partizioni che non hanno
  necessariamente le stesse dimensioni (ma naturalmente potrebbero
  averle), volete a questo punto "appenderle" una all'altra.

  Preparate il file /etc/raidtab per dare una descrizione del vostro
  sistema. Io ho preparato un raidtab per due dischi in linear mode, il
  file si presenta nel seguente modo:


  raiddev /dev/md0
          raid-level      linear
          nr-raid-disks   2
          chunk-size      32
          persistent-superblock 1
          device          /dev/sdb6
          raid-disk       0
          device          /dev/sdc5
          raid-disk       1


  Gli spare-disk non sono supportati in questa modalit. Se un disco si
  guasta, l'array si blocca con esso. Non ci sono informazioni da met
  tere su uno spare disk.

  Probabilmente vi chiederete come mai abbia specificato una "chunk-
  size" qui, quando il linear-mode non fa altro che "appendere" i dischi
  in un grande array senza alcun parallelismo. Bene, avete perfettamente
  ragione,  strano. Mettete una qualche chunk size e non
  preoccupatevene ulteriormente.

  Ok, creiamo l'array. Date il comando

    mkraid /dev/md0



  Questo inizializzer il vostro array, scriver i persistent superblock
  e far partire l'array.

  Date un'occhiata a /proc/mdstat. Dovreste vedere che l'array sta
  lavorando.

  Ora, potete creare un filesystem, come fareste su qualunque altro
  dispositivo, montarlo, includerlo in fstab e cos via.



  4.3.  RAID-0

  Avete due o pi dischi approssimativamente della stessa dimensione e
  volete combinare le loro capacit di "memorizzazione" e combinare
  anche le loro prestazioni facendoci degli accessi in parallelo.

  Preparate il file/etc/raidtab per descrivere la vostra configurazione.
  Un file raidtab di esempio appare cos:

  raiddev /dev/md0
          raid-level      0
          nr-raid-disks   2
          persistent-superblock 1
          chunk-size     4
          device          /dev/sdb6
          raid-disk       0
          device          /dev/sdc5
          raid-disk       1


  Come nel linear-mode, gli spare disk non sono supportati. Il RAID-0
  non ha ridondanza, cos quando un disco si guasta, l'array lo segue.

  Ancora una volta date il comando

    mkraid /dev/md0


  per inizializzare l'array. Questo dovrebbe inizializzare i superbloc
  chi e far partire il dispositivo RAID. Date un occhiata a /proc/mdstat
  per vedere cosa sta succedendo. Dovreste vedere che il vostro disposi
  tivo ora sta lavorando.

  /dev/md0 ora  pronto per essere formattato, montato, usato e abusato.



  4.4.  RAID-1

  Avete due o pi dischi approssimativamente delle stesse dimensioni e
  volete che ognuno sia l'immagine (mirror) esatta dell'altro.
  Eventualmente potete avere pi dischi, che volete tenere come spare-
  disk, che automaticamente diverranno parte dell'array se uno dei
  dischi attivi si guasta.

  Preparate il file /etc/raidtab nel seguente modo:

  raiddev /dev/md0
          raid-level      1
          nr-raid-disks   2
          nr-spare-disks  0
          chunk-size     4
          persistent-superblock 1
          device          /dev/sdb6
          raid-disk       0
          device          /dev/sdc5
          raid-disk       1


  Se avete spare disks, potete aggiungerli alla fine della specifica del
  dispositivo nel modo seguente

          device          /dev/sdd5
          spare-disk      0


  Ricordate di dichiarare la voce nr-spare-disks in modo corrispondente.

  Ok, abbiamo preparato tutto per far partire il RAID. L'immagine
  (mirror) deve essere costruita, cio il contenuto (che al momento non
   importante, in quanto il device deve ancora essere formattato) dei
  due dischi deve essere sincronizzato.

  Date il comando

    mkraid /dev/md0


  per dare il via all'inizializzazione del mirror.

  Controllate il file /proc/mdstat file. Dovrebbe dirvi che il
  dispositivo /dev/md0  partito, che l'immagine (mirror)  in corso di
  ricostruzione e un ETA dello stato della ricostruzione.

  Dovrebbe dirvi che il dispositivo /dev/md0  partito, che l'immagine
  (mirror)  in corso di ricostruzione e un ETA dello stato della
  ricostruzione.

  La ricostruzione  fatta utilizzando la larghezza di banda dell'I/O
  inutilizzata. Cos, il sistema dovrebbe ancora essere piuttosto pronto
  a rispondere, sebbene gli hard disk led dovrebbero lampeggiare
  allegramente.

  Provate a formattare il dispositivo, mentre la ricostruzione  in
  corso. Funzioner. Potete anche montarlo ed usarlo mentre la
  ricostruzione  in corso. Naturalmente, se il disco sbagliato si rompe
  mentre la ricostruzione  in corso, non avete speranze.



  4.5.  RAID-4

  Notate bene! Non ho mai fatto un test di un sistema del genere. Il
  setup seguente  una mia fondata congettura, ma nessuna sua parte 
  mai stata fatta girarare.

  Avete tre o pi dischi approssimativamente della stessa dimensione,
  uno dei dischi  significativamente pi veloce degli altri e voi
  volete combinarli in un dispositivo pi grande, mantenendo ancora
  delle informazioni di ridondanza.  Eventualmente avete un certo numero
  di dischi che vorreste usare come spare-disk.
  Preparate il file /etc/raidtab nel modo seguente:

  raiddev /dev/md0
          raid-level      4
          nr-raid-disks   4
          nr-spare-disks  0
          persistent-superblock 1
          chunk-size      32
          device          /dev/sdb1
          raid-disk       0
          device          /dev/sdc1
          raid-disk       1
          device          /dev/sdd1
          raid-disk       2
          device          /dev/sde1
          raid-disk       3


  Se disponessimo di spare disk, essi devono essere inseriti in un modo
  simile, seguendo le specifiche dei dischi RAID;

          device         /dev/sdf1
          spare-disk     0


  come al solito.

  Il vostro array pu essere inizializzato con il comando

     mkraid /dev/md0


  come al solito.

  Dovreste dare un'occhiata alla sezione sulle opzioni speciali per
  mke2fs prima di formattare il dispositivo.




  4.6.  RAID-5

  Avete tre o pi dischi approssimativamente della stessa dimensione che
  volete combinare in un dispositivo pi grande, mantenendo ancora un
  certo grado di ridondanza per la sicurezza dei dati. Eventualmente
  potete avere un certo numero di dischi da usare com spare disk, che
  non fanno parte dell'array fino a che un altro disco si guasta.

  Se usate N dischi di cui il pi piccolo ha dimensione S, la dimensione
  dell'intero array sar (N-1)*S. Questo spazio  ``perso'' per le
  informazioni di parit (ridondanza). Quindi, se uno dei dischi si
  guasta i dati saranno ancora intatti. Ma se due dischi si guastano,
  tutti i dati andranno persi.

  Preparate il file /etc/raidtab nel seguente modo:











  raiddev /dev/md0
          raid-level      5
          nr-raid-disks   7
          nr-spare-disks  0
          persistent-superblock 1
          parity-algorithm        left-symmetric
          chunk-size      32
          device          /dev/sda3
          raid-disk       0
          device          /dev/sdb1
          raid-disk       1
          device          /dev/sdc1
          raid-disk       2
          device          /dev/sdd1
          raid-disk       3
          device          /dev/sde1
          raid-disk       4
          device          /dev/sdf1
          raid-disk       5
          device          /dev/sdg1
          raid-disk       6


  Se disponete di spare disk, essi dovrebbero essere inseriti in una
  maniera simile, seguendo le specifiche dei dischi raid;

          device         /dev/sdh1
          spare-disk     0


  e cos via.

  Una chunk size di 32 KB  un buon valore di default per la maggior
  parte dei filesystem di uso generale. L'array su cui la precedente
  raitab viene usata,  un dispositivo da 7 dischi da 6 GB = 36 GB
  (ricordando che (n-1)*s = (7-1)*6 = 36). Su di esso  costruito un
  ext2 filesystem con una dimensione del blocco da 4 KB. Potreste
  aumentare sia la chunk size dell'array sia la dimensione del blocco
  del filesystem se il vostro filesystem  o molto pi grande o 
  costituito da file molto grandi.

  Ok, abbiamo parlato abbastanza. Avete preparato la raidtab, andiamo a
  vedere se funziona. Date il comando

    mkraid /dev/md0


  e state a vedere cosa succede. Se tutto  andato a buon fine i vostri
  dischi dovrebbero iniziare a lavorare come matti, iniziando la
  ricostruzione dell'array. Date un occhiata a /proc/mdstat per vedere
  cosa sta succedendo.

  Se la creazione del dispositivo  avvenuta con successo, il processo
  di ricostruzione  iniziato a questo punto. Il contenuto del vostro
  array non  consistente finch questa fase di ricostruzione non 
  terminata. Comunque, l'array  completamente funzionanate (eccetto che
  per la gestione dei guasti naturalmente) e quindi potete formattarlo
  anche durante la fase di ricostruzione.

  Date un occhiata al paragrafo sulle opzioni speciali di mke2fs prima
  di formattare l'array.

  Date un occhiata al paragrafo sulle opzioni speciali di mke2fs prima
  di formattare l'array.


  Ok, ora che avete il RAID device funzionante, potete sempre arrestarlo
  e farlo ripartire usando i comandi

    raidstop /dev/md0


  o

    raidstart /dev/md0




  Invece di mettere questi comandi nei file init e fare il reboot un
  fantastilione di volte per arrivare ad un sistema funzionante,
  continuate a leggere e capirete come poter far funzionare
  l'autorilevamento (autodetection).



  4.7.  Il Persistent Superblock

  `Tanto tempo fa...'' (TM), i raidtools avrebbero letto il vostro file
  /etc/raidtab e poi avrebbero inizializzato l'array. Comunque, questo
  avrebbe richiesto che il filesystem su cui risiedeva /etc/raidtab
  fosse montato. Questo risulta essere sfavorevole se avete intenzione
  di fare il boot da raid..

  Inoltre  il vecchio approccio portava a delle complicazioni quando si
  montavano i filesystem sui dispositivi RAID. Essi non potevano essere
  messi nel file /etc/fstab come al solito, ma avrebbero dovuto essere
  montati negli init script.

  I persistent superblock risolvono questi problemi. Quando un array 
  inizializzato con l'opzione persistent-superblock nel file
  /etc/raidtab uno speciale superblock viene scritto all'inizio di tutti
  i dischi che compongono l'array. Questo permette al kernel di leggere
  la configurazione dei dispositivi RAID direttamente dai dischi che ne
  fanno parte, invece di ottenerla da qualche file di configurazione che
  potrebbe non essere disponibile in qualche momento.

  Dovreste comunque mantenere un file /etc/raidtab file, consistente,
  poich potreste aver bisogno di questo file per le successive
  ricostruzioni dell'array.

  Il persistent superblock  obbligatorio se volete l'auto rilevamento
  (autodetection) dei vostri dispositivi RAID al boot del sistema. Tutto
  ci  descritto nel paragrafo Autorilevamento (autodetection).



  4.8.  Chunk size

  La chunk-size necessita di una spiegazione. Voi non potete mai
  scrivere completamente in parallelo su una batteria di dischi. Se
  avete due dischi e volete scriverci un byte, dovreste scrivere quattro
  bit su ogni disco, effettivamente, ogni bit pari andrebbe sul disco 0
  e gli altri sul disco 1. L'hardware non supporta tutto questo.
  Invece, noi scegliamo alcune chunk size, che definiamo come come la
  pi piccola massa ``atomica'' di dati che possa essere scritta su un
  dispositivo. Una scrittura di 16KB con una chunk-size di 4KB, far si
  che il primo e il terzo chunk da 4KB siano scritti sul primo disco ed
  il secondo e il quarto chunk siano scritti sul secondo disco, nel caso
  di un RAID-0 con due dischi. Quindi, per scritture di grosse quantit
  di dati, si pu notare un miglioramento dall'usare dei chunk piuttosto
  grandi, mentre gli array che contengono principalmente piccoli files
  beneficieranno di una piccola dimensione dei chunk.

  Le dimensioni dei chunk devono essere specificate per tutti i livelli
  RAID, incluso il linear-mode. Comunque la chunk-size non fa alcuna
  differenza per il linear-mode.

  Per avere prestazioni ottimali, dovreste sperimentare con i valori,
  cos come con la dimensione del blocco del filesystem che costruite
  sull'array.

  L'argomento dell'opzione chunk-size in

  ______________________________________________________________________
  /etc/raidtab
  ______________________________________________________________________




  4.8.1.  RAID-0

  I dati sono scritti ``quasi'' in parallelo nei dischi dell'array.
  Effettivamente, i blocchi di dimensione chunk-size sono scritti in
  ogni disco serialmente.

  Se specificate una chunk-size di 4 KB e scrivete 16 KB su un array di
  tre dischi, il sistema RAID scriver 4 KB nei dischi 0, 1, 2, in
  parallelo, e poi i rimanenti 4 KB sul disco 0.

  Una chunk-size di 32 KB  un punto di partenza ragionevole per la
  maggior parte degli array. Ma il valore ottimale dipende molto dal
  numero dei dischi costituenti l'array, dal contenuto del filesystem
  che ci viene messo sopra e da molti altri fattori. Sperimentate, per
  ottenere le migliori prestazioni.


  4.8.2.  RAID-1

  Per le scritture la chunk-size non ha influenza sull'array, in quanto
  i dati devono essere scritti su tutti i dischi dell'array. Per le
  letture comunque, la chunk-size specifica quanti dati leggere
  serialmente dai dischi facenti parte dell'array. Poich tutti i dischi
  attivi nell'array contengono la stessa informazione, le letture
  possono essere fatte in parallelo in modo simile al RAID-0.


  4.8.3.  RAID-4

  Quando una scrittura  fatta su un array RAID-4, le informazioni dei
  parit devono sempre essere aggiornate sul disco di parit. La chunk-
  size  la dimensione del blocco di parit. Se un byte viene scritto su
  un array RAID-4, allora dei blocchi di dimensione chunk-size saranno
  letti dagli N-1 dischi, verr calcolata l'informazione di parit e i
  blocchi di dimensione chunk-size saranno scritti nel disco di parit.

  La chunk-size influenza le prestazioni in lettura nello stesso modo
  che nel RAID-0, visto che le letture da un array RAID-4 vengono
  effettuate nello stesso modo.


  4.8.4.  RAID-5

  Sugli array RAID-5 la chunk-size ha esattamente lo stesso significato
  che nel RAID-4.


  Una chunk-size ragionevole per un array RAID-5  128 KB, come sempre,
  potete sperimentare con essa.

  Date anche un occhiata al paragrafo sulle opzioni speciali di mke2fs.
  Questo influenza le performance di un array RAID-5.



  4.9.  Opzioni per mke2fs

  Esiste un'opzione speciale per formattare un dispositivo RAID-4 o
  RAID-5 con mke2fs. L'opzione -R stride=nn permetter a mke2fs di
  piazzare meglio delle strutture dati specifiche dell'ext2 in modo
  intelligente sul dispositivo RAID.

  Se la chunk-size  di 32 KB, ci significa che blocchi da 32 KB di
  dati consecutivi saranno presenti su un disco. Se volessimo costruire
  un ext2 filesystem con una dimensione del blocco da 4 KB, si capisce
  che avremmo otto blocchi del filesystem per ogni chunk dell'array. Noi
  possiamo passare questa informazione all'utility mke2fs al momento di
  creare il filesystem:

    mke2fs -b 4096 -R stride=8 /dev/md0



  Le prestazioni dei RAID-{4,5} sono fortemente influenzate da questa
  opzione. Non sono sicuro di come l'opzione stride influenzi gli altri
  livelli RAID. Se qualcuno avesse maggiori informazioni su questo, per
  favore me le faccia avere.

  La dimensione del blocco dell'ext2fs influenza fortemente le
  prestazioni del filesystem. Dovreste usare sempre la dimensione del
  blocco da 4 KB su ogni filesystem pi grande di qualche centinaia di
  megabyte, a meno che non stiate lavorando con un gran numero di
  piccoli file.



  4.10.  Autorilevamento (Autodetection)

  L'autorilevamento permette ai dispositivi RAID di essere
  automaticamente riconosciuti dal kernel al boot del sistema, subito
  dopo che il rilevamento solito delle partizioni  stato eseguito.

  Tutto ci richiede diverse cose:

  1. Avete bisogno del supporto all'autorilevamanto (autodetection) nel
     kernel. Controllate

  2. Dovreste aver creato i dispositivi RAID usando i persistent-
     superblock

  3. Il tipo di partizioni dei dispositivi usati nel RAID deve essere
     impostato al valore 0xFD (usate fdisk per impostare il tipo ``fd'')

  NOTA: Siate certi che che il vostro RAID NON stia lavorando prima di
  cambiare il tipo della partizione.  Usate raidstop /dev/md0 per
  arrestare il dispositivo.

  Se preparate tutto in modo congruente ai precedenti punti 1, 2 e 3,
  l'autorilevamento dovrebbe avvenire. Provate a fare un reboot. Quando
  il sistema riparte, fate un cat di /proc/mdstatche dovrebbe dirvi che
  il vostro dispositivo RAID sta funzionando .


  Durante il boot, dovreste vedere dei messaggi simili a:

   Oct 22 00:51:59 malthe kernel: SCSI device sdg: hdwr sector= 512
    bytes. Sectors= 12657717 [6180 MB] [6.2 GB]
   Oct 22 00:51:59 malthe kernel: Partition check:
   Oct 22 00:51:59 malthe kernel:  sda: sda1 sda2 sda3 sda4
   Oct 22 00:51:59 malthe kernel:  sdb: sdb1 sdb2
   Oct 22 00:51:59 malthe kernel:  sdc: sdc1 sdc2
   Oct 22 00:51:59 malthe kernel:  sdd: sdd1 sdd2
   Oct 22 00:51:59 malthe kernel:  sde: sde1 sde2
   Oct 22 00:51:59 malthe kernel:  sdf: sdf1 sdf2
   Oct 22 00:51:59 malthe kernel:  sdg: sdg1 sdg2
   Oct 22 00:51:59 malthe kernel: autodetecting RAID arrays
   Oct 22 00:51:59 malthe kernel: (read) sdb1's sb offset: 6199872
   Oct 22 00:51:59 malthe kernel: bind<sdb1,1>
   Oct 22 00:51:59 malthe kernel: (read) sdc1's sb offset: 6199872
   Oct 22 00:51:59 malthe kernel: bind<sdc1,2>
   Oct 22 00:51:59 malthe kernel: (read) sdd1's sb offset: 6199872
   Oct 22 00:51:59 malthe kernel: bind<sdd1,3>
   Oct 22 00:51:59 malthe kernel: (read) sde1's sb offset: 6199872
   Oct 22 00:51:59 malthe kernel: bind<sde1,4>
   Oct 22 00:51:59 malthe kernel: (read) sdf1's sb offset: 6205376
   Oct 22 00:51:59 malthe kernel: bind<sdf1,5>
   Oct 22 00:51:59 malthe kernel: (read) sdg1's sb offset: 6205376
   Oct 22 00:51:59 malthe kernel: bind<sdg1,6>
   Oct 22 00:51:59 malthe kernel: autorunning md0
   Oct 22 00:51:59 malthe kernel: running: <sdg1><sdf1><sde1><sdd1><sdc1><sdb1>
   Oct 22 00:51:59 malthe kernel: now!
   Oct 22 00:51:59 malthe kernel: md: md0: raid array is not clean --
    starting background reconstruction


  Questo  quello che si ottiene dall'autorilevamento di un array RAID-5
  che non  stato arrestato in modo pulito (per esempio se si  avuto un
  blocco della macchina). La ricostruzione viene iniziata automatica
  mente. Montare questo dispositivo  perfettamente sicuro, poich la
  ricostruzione  trasparente e tutti i dati sono consistenti ( solo
  l'informazione di parit che  inconsistente - ma non c' nessuna
  necessit di essa finch un dispositivo non si guasta).

  I dispositivi che vengono avviati automaticamente sono anche arrestati
  automaticamente quando si ferma la macchina (shutdown). Non vi curate
  degli init script. Usate solo i device /dev/md come ogni altro device
  /dev/sd o /dev/hd.

  Si,  veramente cos semplice.

  Potreste voler dare un occhiata ai vostri init-script per cercare i
  comandi raidstart/raidstop. Essi si trovano di solito negli init
  script della RedHat. Sono utilizzati solo per il vecchio RAID e non
  servono a niente nel nuovo RAID con l'autorilevamento. Potete
  semplicemente rimuovere queste linee e tutto continuer a funzionare
  bene.



  4.11.  Fare il boot su RAID

  Ci sono diversi modi per costruire un sistema che monti il suo root
  filesystem su un dispositivo RAID. Al momento solo l'installazione
  grafica di Linux RedHat 6.1 permette l'installazione diretta di un
  dispositivo RAID. E'comunque possibile realizzare la cosa.

  L'ultima distribuzione ufficiale di lilo (Versione 21) non gestisce i
  dispositivi RAID e quindi il kernel non pu essere caricato al boot
  dal dispositivo RAID. Se usate questa versione, il vostro /boot
  filesystem dovr stare su un dispositivo non-RAID. Un modo per
  assicurarsi che che il sistema faccia il boot comunque,  quello di
  creare delle partizioni /boot uguali su tutti i dischi del vostro
  RAID, in questo modo il BIOS pu sempre caricare i dati per esempio
  dal primo disco disponibile. Questo presume che non facciate il boot
  da un disco guasto nel vostro sistema..

  Con la RedHat 6.1 una patch per lilo 21  diventata disponibile, essa
  pu gestire il /boot su un RAID-1. Notate che essa non funzioner per
  qualunque altro livello, RAID-1 (mirroring)  il solo livello RAID
  supportato. Questa patch (lilo.raid1) pu essere trovata presso
  dist/redhat-6.1/SRPMS/SRPMS/lilo-0.21-10.src.rpm su ogni RedHat
  mirror. La versione di lilo a cui viene applicata la patch accetter
  la voce boot=/dev/md0 nel file lilo.conf e render ogni ogni disco
  immagine (mirror) pronto per il boot.

  Un altro modo per assicurare che il sistema riesca sempre a fare il
  boot  di creare un floppy di boot dopo che tutto il sistema  stato
  costruito. Se il disco sul quale il filesystem /bootrisiede si blocca,
   sempre possibile fare il boot da floppy.



  4.12.  Root filesystem su un RAID

  Al fine di avere un sistema che faccia il boot su RAID, il root
  filesystem (/) deve essere montato su un dispositivo RAID. Due metodi
  per realizzare questo sono dati sotto. Visto che nessuna delle attuali
  distribuzioni (almeno di cui io sia a conoscenza) supporta
  l'installazione su un dispositivo RAID, questi metodi presumono che
  voi abbiate installato su una normale partizione e poi - quando
  l'installazione  finita - spostiate il contenuto del vostro root
  filesystem non-RAID sul nuovo dispositivo RAID.


  4.12.1.  Metodo 1

  Questo metodo presume che voi abbiate degli spare-disk, che non fanno
  parte del sistema RAID che state configurando, su cui possiate
  installare il sistema operativo.


    Per primo, installate un normale sistema su questi extra dischi.

    Prendete il kernel che pensate di usare, prendete le raid patch e i
     raidtools e fate il boot del sistema con questo nuovo kernel con il
     supporto RAID. Siate sicuri che il supporto al RAID sia nel kernel,
     e non caricato come modulo.

    Ok, a questo punto dovreste configurare e creare il RAID che
     pensate di usare come root filesystem. Questa  una procedura
     standard descritta altrove in questo documento.

    Per essere sicuri che tutto  andato a buon fine, provate a fare il
     reboot del sistema e controllate se il nuovo RAID si attiva al
     boot. Dovrebbe.

    Create un filesystem sul nuovo array (usando mke2fs), e montatelo
     sotto /mnt/newroot

    Ora, copiate il contenuto del vostro attuale root filesystem (cio
     lo spare-disk) nel nuovo root filesystem (cio l'array). Ci sono
     molti modi per farlo, uno ad esempio 



      cd /
      find . -xdev | cpio -pm /mnt/newroot



    Dovreste modificare il file /mnt/newroot/etc/fstab  per utilizzare
     il giusto dispositivo( il/dev/md? root device) per il root
     filesystem.

    Ora, smontiamo l'attuale /boot filesystem, e montiamo invece il
     dispositivo di boot su /mnt/newroot/boot. Questo  necessario per
     far lavorare correttamente lilo nel prossimo punto.

    Aggiornate /mnt/newroot/etc/lilo.conf per puntare al giusto
     dispositivo. Il dispositivo di boot deve ancora essere un normale
     disco (non un dispositivo RAID), ma il root device deve puntare al
     nuovo RAID. Quando l'avete fatto, date il comando

      lilo -r /mnt/newroot


    Fate il reboot del sistema e guardate se tutto va come vi aspettate
     :)

  Se fate tutto ci con dischi IDE, siate sicuri di comunicare al BIOS
  che tutti i dischi sono di tipo "auto-detect", cos che il BIOS
  permetter alla vostra macchina di fare il boot, anche se un disco
  viene perso.


  4.12.2.  Metodo 2

  Questo metodo necessita che voi usiate una raidtools/patch che include
  la direttiva failed-disk. Questa sar la tools/patch per tutti i
  kernel verione 2.2.10 e successive.

  Voi potete usare questo metodo solo un RAID di livello 1 e superiore.
  L'idea  quella di installare il sistema su un disco che , di
  proposito, marcato come guasto all'interno del RAID, allora copiate il
  sistema sul RAID che lavorer in modalit "degraded" e finalmente
  farete usare al RAID il non pi necessario ``install-disk'', saltando
  la vecchia installazione, ma facendo lavorare il RAID in modalit "non
  degraded".


    Per prima cosa, installate un normale sistema su un disco (che
     diverr successivamente parte del RAID). E' importante che questo
     disco (o partizione) non sia il pi piccolo. Se lo fosse, non sar
     possibile aggiungerlo al RAID successivamente!

    Poi, procuratevi un kernel, le patch, i raidtools ecc. ecc. Come al
     solito. Fate fare il boot al sistema con un nuovo kernel che abbia
     il supporto RAID di cui avete bisogno compilato nel kernel stesso.

    Ora, costruite il RAID con il vostro attuale root-device come
     failed-disk nel file raidtab. Non mettete il failed-disk come primo
     disco nel fileraidtab, questo comporterebbe dei problemi all'avvio
     del RAID. Create il RAID e costruite un filesystem su di esso.

    Provate a fare un reboot e guardate se il RAID parte correttamente

    Copiate i file di sistema e riconfigurate il tutto per utilizzare
     il RAID come root-device, come descritto nel precedente paragrafo.

    Quando il sistema far il boot correttamente dal RAID, potrete
     modificare il file raidtab per includervi il failed-disk come
     unraid-disk. Ora, fate raidhotadd con il vostro disco al RAID.

    Dovreste aver ottenuto un sistema che fa il boot da un "non-
     degraded" RAID.



  4.13.  Dovreste aver ottenuto un sistema che fa il boot da un "non-
  degraded" RAID.

  Perch un kernel sia in grado di montare un root filesystem, il
  supporto per il dispositivo su cui il filesystem risiede deve essere
  presente nel kernel. Perci, al fine di montare il root filesystem su
  un device RAID, il kernel deve avere il supporto RAID.

  La maniera normale per essere certi che il kernel possa vedere il
  dispositivo RAID  semplicemente quella di compilare il kernel con
  tutto il supporto RAID necessario. Siate sicuri di aver compilato il
  supporto RAID nel kernel, e non come modulo caricabile. Il kernel non
  pu caricare un modulo (dal root filesystem) finch il root filesystem
  non  montato.

  Comunque, poich RedHat-6.0  distribuita con un kernel che ha il
  supporto per il nuovo RAID come modulo, qui verr descritto come usare
  il kernel standard della RedHat-6.0, continuando a fare il boot del
  sistema da RAID.


  4.13.1.  Fare il boot con il RAID come modulo

  Dovrete "istruire" LILO ad usare un RAM-disk per ottenere questo.
  Usate il comando mkinitrd per creare un ramdisk contenente tutti i
  moduli del kernel necessari a montare la partizione di root. Questo
  pu essere fatto nel seguente modo:

   mkinitrd --with=<module> <ramdisk name> <kernel>


  Per esempio:

   mkinitrd --with=raid5 raid-ramdisk 2.2.5-22



  Questo ci rende sicuri che il modulo RAID specificato sia presente al
  boot quando il kernel monter il root device.



  4.14.  Trabocchetti

  Non dovete mai MAI mai ripartizionare i dischi che fanno parte di un
  array attivo. Se dovete alterare la tabella delle partizioni su un
  disco che fa parte di un RAID, arrestate l'array e poi ripartizionate.

  E' facile mettere troppi dischi su un bus. Un normale Fast-Wide SCSI
  bus pu sopportare 10 MB/s, che  meno di quanto alcuni dischi possano
  fare oggi. Mettere sei di questi dischi sul bus non vi dar di certo
  il guadagno di prestazioni che vi aspettate.

  Un maggior numero di controller SCSI vi daranno delle prestazioni
  migliori, se i bus SCSI sono quasi saturati da dischi collegati. Non
  vedrete un incremento di prestazioni dall'uso di due 2940 con due
  vecchi dischi SCSI rispetto a far lavorare i due dischi su un solo
  controller.

  Se vi dimenticate dell'opzione persistent-superblock, il vostro array
  non ripartir volentieri dopo che  stato arrestato. Ricreate allora
  l'array con l'opzione abilitata nel file raidtab.

  Se un RAID-5 fallisce la ricostruzione dopo che un disco  stato
  rimosso e riinserito, questo potrebbe dipendere dall'ordine dei
  dispositivi nel file raidtab. Provate a spostare la prima coppia
  ``device ...'' / ``raid-disk ...'' in fondo alla descrizione
  dell'array nel file raitab.

  La maggior parte degli ``error reports'' che trovate sulla linux-
  kernel list, sono di persone che in qualche modo hanno sbagliato ad
  usare la giusta patch raid con la corrispondente versione dei
  raidtools. Siate sicuri di utilizzare 0.90 RAID, e che state usando i
  raidtools per esso.



  5.  Fare il test

  Se pensate di usare il RAID per avere tolleranza ai guasti (fault-
  tolerance), potreste voler testare il vostro sistema per vedere se
  funziona veramente. Ora, come simulare un guasto?

  In breve, non potete, eccetto forse che facendo passare un ascia
  infuocata attraverso il disco di cui volete simulare il guasto. Non
  potrete mai sapere cosa accadr quando un disco cessa di funzionare.
  Esso potrebbe bloccare elettricamente tutto il bus a cui  collegato,
  rendendo tutti i dischi su quel bus inaccessibili. Sebbene non mi sia
  noto nessun accadimento del genere. Il disco potrebbe solo notificare
  un guasto di lettura/scrittura al layer SCSI/IDE, il che permetter al
  layer RAID di gestire questa situazione in modo positivo. Questo  per
  fortuna il modo in cui le cose vanno di solito.


  5.1.  Simulare il malfunzionamento di un disco

  Se volete simulare il guasto di un disco, scollegatelo. Dovreste farlo
  per mezzo del pulsante di spegnimento. Se siete interessati a testare
  se i vostri dati possano sopravvivere con un disco in meno del numero
  solito, non c' problema nel fare l' "hot-plug cowboy" ora. Spegnete
  il sistema, scollegate il disco e fate un nuovo boot.

  Controllate nel syslog e date un'occhiata a/proc/mdstat per vedere
  cosa sta facendo il RAID.  Funziona?

  Ricordate, voi dovete far girare il RAID-{1,4,5} sul vostro array per
  poter sopravvivere al guasto di un disco. Linear-raid o RAID-0 perdono
  tutto quando un disco si guasta.

  Quando avrete di nuovo collegato il disco (con la macchina spenta,
  naturalmente, ricordate), potete agggiungere il ``nuovo'' dispositivo
  al RAID nuovamente, con il comando raidhotadd.


  5.2.  Simulare il danneggiamento dei dati

  Il RAID (sia hardware- che software-), considera che se la scrittura
  su un disco non genera un errore, allora la scrittura  avvenuta
  correttamente. Allora, se il vostro disco danneggia i dati senza
  generare errori, tutti i vostri dati saranno corrotti. Questo
  naturalmente  molto spiacevole che accada, ma  possibile e
  porterebbe ad avere un filesystem corrotto.

  Il RAID non pu e non  progettato per controllare il danneggiamento
  dei dati sui supporti. Perci non ha alcun senso il corrompere di
  proposito i dati (utilizzando dd per esempio) su un disco per vedere
  come il sistema RAID riesce a gestire questa situazione. E' molto
  probabile (a meno che si corrompa il RAID superblock) che il RAID
  layer non si accorga di niente riguardo al danneggamento, ma che il
  vostro filesystem sul dispositivo RAID sia danneggiato.

  Questo  il modo in cui le cose si suppone che funzionino. Il RAID non
   una garanzia per l'integrit dei dati, esso ci permette solo di
  conservare i nostri dati se un disco si blocca (con i livelli RAID
  maggiori od uguali ad 1, naturalmente).



  6.  Ricostruzione

  Se avete gi letto il resto di questo HOWTO, dovreste gi avere
  un'idea di che cosa significhi la ricostruzione di un array
  danneggiato. Riassumendo:

    Spegnete il sistema

    Sostituite il disco guasto

    Accendete di nuovo il sistema

    Usate il comando raidhotadd /dev/mdX /dev/sdX per inserire
     nuovamente il disco nell'array

    Prendetevi un  caff mentre la ricostruzione automatica avviene

     Ecco tutto.

  Bene, di solito funziona cos, a meno che voi siate sfortunati e il
  vostro RAID sia stato reso inutilizzabile perch pi di un disco si 
  guastato. Questo pu realmente succedere se un certo numero di dischi
   collegato sullo stesso bus e uno dei dischi blocca il bus quando si
  guasta. Gli altri dischi, anche se non sono guasti, saranno
  irraggiungibili per il RAID layer, perch il bus  bloccato e quindi
  saranno marcati come danneggiati. Su un RAID-5 su cui  possibile
  sostituire un disco, il guasto di due o pi di essi pu essere fatale.

  Il seguente paragrafo  la spiegazione che Martin Bene mi ha dato, e
  descrive un possibile recupero dal terrificate scenario mostrato
  sopra. Esso implica l'uso della direttiva failed-disk nel nostro file
  /etc/raidtab, cos funzioner solo con i kernel 2.2.10 e successivi.


  6.1.  Recupero dal malfunzionamento di pi dischi

  Lo scenario :

    Un controller si blocca e mette due dischi offline nello stesso
     momento,

    Tutti i dischi su un bus SCSI non possono pi essere raggiunti se
     un disco si blocca,

    Un cavo si sgancia...

     In breve: abbastanza spesso si ha un guasto temporaneo di diversi
     dischi nello stesso momento; dopo di che i RAID superblock non sono
     pi sincronizzati e voi non potete pi inizializzare (init) il
     vostro RAID array.

  Per prima cosa: riscrivete il RAID superblock con il comando mkraid
  --force
  Al fine di farlo lavorare correttamente, avete bisogno di un file
  /etc/raidtab aggiornato - se esso non corrisponde ESATTAMENTE ai
  dispositivi e all'ordine dei dischi originali, non funzioner.

  Controllate il syslog prodotto cercando di far partire l'array,
  vedrete l'"event count" per ogni superblock; di solito  meglio
  lasciare fuori il disco con il pi basso "event count", per esempio il
  pi vecchio.

  Se date il comando mkraid senza failed-disk, il processo di
  ricostruzione partir immediatamente ed inizier a ricostruire i
  blocchi di parit - il che non  necessariamente quello che volete in
  questo momento.

  Con failed-disk potete specificare quali dischi volete che siano
  attivi e forse potete provare diverse combinazioni per ottenere i
  migliori risultati. BTW, monta il filesystem solo read-only durante
  queste prove...  Questo metodo  stato usato da almeno due persone con
  cui sono in contatto.



  7.  Prestazioni

  Questa parte contiene un certo numero di benchmark di un sistema reale
  che usa il software RAID.

  I benchmark sono stati fatti con il programma Bonnie e ogni volta con
  file grandi due o pi volte la dimensione della RAM fisica presente
  sulla macchina.

  I benchmark misurano solo la larghezza di banda (bandwidth) in
  ingresso e in uscita su un solo grande file. Questa  una cosa
  interessante da conoscere, se siamo interessati al massimo indice di
  trasferimento (throughput) per scritture/letture di grandi quantit di
  dati.  In ogni caso, questi numeri ci dicono poco delle prestazioni
  dell'array se esso fosse usato come un "news spool", un web-server,
  ecc.  Teniamo sempre in mente, che i numeri dei benchmark sono il
  risultato dell'esecuzione di un programma ``sintetico''. Pochi dei
  programmi che appartengono alla vita reale fanno quello che fa Bonnie
  e, sebbene questi numeri di I/O siano interessanti da guardare, non
  sono indicativi delle prestazioni dei programmi reali. Non troppo
  almeno.

  Per ora ho solo i risultati ottenuti sulla mia macchina. Il sistema :

    Doppio Pentium Pro 150 MHz

    256 MB RAM (60 MHz EDO)

    Tre IBM UltraStar 9ES 4.5 GB, SCSI U2W

    Adaptec 2940U2W

    Un IBM UltraStar 9ES 4.5 GB, SCSI UW

    Adaptec 2940 UW

    Kernel 2.2.7 con le RAID patch

  I tre dischi U2W pianterebbero il controller U2W, and il disco UW
  ingolferebbe il controller UW.

  Sembra impossibile instradare pi di 30 MB/s di dati attraverso i bus
  SCSI del sistema usando o meno il RAID. Quello che credo  che,
  siccome il sistema  piuttosto vecchio, sia la banda passante della
  memoria a mancare, e questo limita quello che pu essere inviato
  attraverso un controller SCSI.


  7.1.  RAID-0

  La lettura  un "Sequential block input", e la scrittura  un
  "Sequential block output". La dimensione del file  stata di 1 GB per
  tutti i test. I test sono stati fatti in modalit singolo utente
  (single user). Il driver SCSI  stato configurato per non usare il
  "tagged command queuing".

        |            |              |             |              |
        |Chunk size  |  Block size  |  Read KB/s  |  Write KB/s  |
        |            |              |             |              |
        |4k          |  1k          |  19712      |  18035       |
        |4k          |  4k          |  34048      |  27061       |
        |8k          |  1k          |  19301      |  18091       |
        |8k          |  4k          |  33920      |  27118       |
        |16k         |  1k          |  19330      |  18179       |
        |16k         |  2k          |  28161      |  23682       |
        |16k         |  4k          |  33990      |  27229       |
        |32k         |  1k          |  19251      |  18194       |
        |32k         |  4k          |  34071      |  26976       |


  a questo, sembra che la dimensione del chunk non faccia molta
  differenza. Comunque, la dimensione del blocco dell'ext2fs dovrebbe
  essere pi grande possibile, quindi 4 KB (ovvero la dimensione della
  pagina) sui sistemi IA-32.


  7.2.  RAID-0 con TCQ

  Questa volta il driver SCSI  stato configurato per utilizzare il
  "tagged command queuing", con una profondit della coda di 8. Per il
  resto tutto come prima.

        |            |              |             |              |
        |Chunk size  |  Block size  |  Read KB/s  |  Write KB/s  |
        |            |              |             |              |
        |32k         |  4k          |  33617      |  27215       |


  Nessun altro test  stato fatto. TCQ sembra incrementare un poco le
  prestazioni in scrittura, ma in realt non  che ci sia poi tutta
  questa differenza.


  7.3.  RAID-5

  L'array  stato configurato per lavorare in modalit RAID-5, dei test
  simili ai precedenti sono stati fatti.

        |            |              |             |              |
        |Chunk size  |  Block size  |  Read KB/s  |  Write KB/s  |
        |            |              |             |              |
        |8k          |  1k          |  11090      |  6874        |
        |8k          |  4k          |  13474      |  12229       |
        |32k         |  1k          |  11442      |  8291        |
        |32k         |  2k          |  16089      |  10926       |
        |32k         |  4k          |  18724      |  12627       |


  Ora, sia la dimensione del chunk che quella del blocco del filesystem
  sembrano effettivamente fare la differenza.
  7.4.  RAID-10

  Un array RAID-10  composto da ``mirrored stripes'', ovvero, un array
  RAID-1 di due array RAID-0. La chunk-size  la dimensione del chunk
  sia dell'array RAID-1 che di quello RAID-0. Non ho compiuto dei test
  nel caso in cui le due dimensioni del chunk differiscano, per quanto
  sia perfettamente lecito.

        |            |              |             |              |
        |Chunk size  |  Block size  |  Read KB/s  |  Write KB/s  |
        |            |              |             |              |
        |32k         |  1k          |  13753      |  11580       |
        |32k         |  4k          |  23432      |  22249       |


  Nessun altro test  stato fatto. La dimensione del file era 900MB,
  perch le quattro partizioni coinvolte erano da 500 MB ognuna, il che
  non permetteva di avere spazio per un file da 1 GB in questa
  configurazione (RAID-1 su due array da 1000MB).



  8.  Contributi

  Le seguenti persone hanno contribuito alla creazione di questa
  documentazione:

    Ingo Molnar

    Jim Warren

    Louis Mandelstam

    Allan Noah

    Yasunori Taniike

    Martin Bene

    Bennett Todd

    Le persone della Linux-RAID mailing list

    Quelli che ho dimenticato,  spiacente   :)

  Per favore inviate correzioni, suggerimenti ecc. all'autore. Questo 
  il solo modo in cui questo HOWTO pu migliorare.



















  Software Release Practice HOWTO
  Eric S. Raymond <esr@thyrsus.com>
  1.0, 21 novembre 1998

  Questo HOWTO descrive le regole di una buona release per un progetto
  open-source per Linux. Seguendo queste regole, si faciliter il pi
  possibile gli utenti nel costruire il codice e usarlo, e gli altri
  sviluppatori nel capirlo e cooperare per migliorarlo.  Questo docu
  mento  una lettura obbligata per i novelli sviluppatori. Gli svilup
  patori esperti devono fare una revisione quando stanno rilasciando un
  nuovo progetto. Verr riveduto periodicamente per mostrare le
  evoluzioni degli standard.  La traduzione italiana  stata curata da
  Edoardo Rampazzo <Taedium@mclink.it>

  1.  Introduzione


  1.1.  Perch questo documento?

  C' un gran numero di buone regole tradizionali per un codice open-
  source che aiutano gli altri nel portarlo, usarlo e cooperare nel suo
  sviluppo.  Alcune di queste convenzioni sono tradizionali nel mondo
  Unix e nei precursori di Linux; altre sono state sviluppate
  recentemente in risposta a particolari nuovi strumenti e nuove
  tecnologie come il World Wide Web.

  Questo documento aiuter ad acquisire queste regole. Lo stesso 
  organizzato in sezioni, ciascuna contenente un indice degli argomenti.
  Quest'ultimo servir anche come controllo preliminare ai fini della
  distribuzione.


  1.2.  Nuove versioni di questo documento

  Questo documento sar postato mensilmente nel newsgroup
  comp.os.linux.answers . Il documento  archiviato su diversi siti FTP
  riguardanti Linux, incluso sunsite.unc.edu in pub/Linux/docs/HOWTO.

  Si pu prendere visione dell'ultima versione di questo HOWTO sul World
  Wide Web all'URL <http://sunsite.unc.edu/LDP/HOWTO/Software-Release-
  Practice.html>.

  Si  autorizzati a spedire domande o commenti su questo HOWTO a Eric
  S. Raymond, esr@snark.thyrsus.com <mailto:esr@snark.thyrsus.com>.


  2.  Buone regole per dare un nome a un progetto e a un archivio

  Poich il carico sui distributori di archivi, come Sunsite, il sito
  del PSA e CPAN,  in aumento, si tende sempre pi a far processare le
  proposte da valutare in parte o completamente da dei programmi
  (piuttosto che interamente da una persona).

  Questo rende pi importante, per un progetto o un nome di un archivio,
  adattare bene i nomi a modelli regolari che il programma possa
  analizzare e capire.


  2.1.  Usare nomi nello stile GNU, con una radice e numerazione delle
  patch primarie.secondarie

   bene che tutti i file dell'archivio abbiano nomi sullo stile GNU:
  radice prefissante in caratteri tutti minuscoli, seguiti da un
  trattino, dal numero della versione, dall'estensione, e da altri
  suffissi.

  Supponiamo che si abbia un progetto di nome `foobar', alla versione 1,
  release 2, livello 3. Se si tratta di un solo archivio
  (presumibilmente i sorgenti), ecco come dovrebbero essere i nomi:


     foobar-1.2.3.tar.gz
        L'archivio dei sorgenti


     foobar.lsm
        Il file LSM (assumendo che si sia sottoposti a Sunsite).


  per favore non usare:


     foobar123.tar.gz
        Questo sembrer a molti programmi un archivio di un progetto
        chiamato `foobar123' senza numero della versione.


     foobar1.2.3.tar.gz
        Questo sembrer a molti programmi un archivio di un progetto
        chiamato `foobar1' nella versione  2.3.


     foobar-v1.2.3.tar.gz
        Molti programmi lo interpreterebbero come un progetto chiamato
        `foobar-v1'.


     foo_bar-1.2.3.tar.gz
        La sottolineatura  difficile da leggere, scrivere e ricordare


     FooBar-1.2.3.tar.gz
        A meno che non si voglia assomigliare ad una mezza cartuccia del
        marketing.  Inoltre  difficile da leggere, scrivere, e
        ricordare.

  Se si deve distinguere tra archivi di sorgenti e di binari, o tra tipi
  diversi di binari, o esprimere alcuni tipi di opzioni nel nome del
  file, si  pregati di considerarle come un' estensione del file e
  metterle dopo il numero della versione.  Cio,  meglio scrivere:


     foobar-1.2.3.src.tar.gz
        sorgenti


     foobar-1.2.3.bin.tar.gz
        binari, di tipo non precisato


     foobar-1.2.3.bin.ELF.tar.gz
        binari di tipo ELF


     foobar-1.2.3.bin.ELF.static.tar.gz
        binari ELF linkati staticamente


     foobar-1.2.3.bin.SPARC.tar.gz
        binari SPARC


  Si  pregati di non usare nomi come `foobar-ELF-1.2.3.tar.gz', perch
  i programmi hanno difficolt a distingure i suffissi (come `-ELF')
  dalla radice del nome.

  Un buon modello generale per un nome  costituito, nell'ordine, da:


  1. prefisso del progetto

  2. trattino

  3. numero della versione

  4. punto

  5. "src" o "bin" (facoltativo)

  6. punto o trattino (meglio un punto)

  7. tipologia del binario e opzioni (facoltativo)

  8. estensioni dell'archivio e del tipo di compressione


  2.2.  Scegliere con accuratezza un nome per il prefisso che sia unico
  e facile da digitare

  La radice prefissante dovrebbe essere comune a tutti i file di un
  progetto, facile da leggere, scrivere e ricordare.  Si  pregati
  quindi di non usare sottolineature.  Ugualmente non usare caratteri
  maiuscoli e maiuscoletti senza una buona ragione -- confondono
  l'ordine di ricerca dell'occhio umano e ricordano una mezza cartuccia
  del marketing che voglia fare l'intelligente.

  Crea inoltre confusione il fatto che due progetti diversi hanno lo
  stesso nome. Si cerchi cos di controllare eventuali conflitti prima
  di rilasciare la propria nuova release.  Un buon luogo dove
  controllare  costituito dal file di indice di Sunsite
  <http://sunsite.unc.edu/pub/Linux>.


  3.  Buone regole di sviluppo

  La maggior parte di queste regole sono volte ad assicurare la
  portabilit, non solo verso sistemi Linux ma ugualmente verso altri
  sistemi Unix.  Essere portabile verso altri sistemi Unix non  solo un
  segno di professionalit e cortesia del programmatore, ma anche
  un'assicurazione preziosa contro eventuali futuri cambiamenti in Linux
  stesso.

  Inoltre, altre persone cercheranno di compilare il loro codice su
  sistemi non-Linux; con la portabilit si ridurr il numero di persone
  perplesse che invieranno fastidiosissime e-mail.


  3.1.  Scrivere in puro ANSI C o in un linguaggio portabile

  Per la portabilit e la stabilit, si dovrebbe scrivere in ANSI C o in
  un altro linguaggio che sia garantito come portabile in quanto abbia
  un'implementazione multi-piattaforma.

  Linguaggi di questo tipo includono Python, Perl, Tcl ed Emacs Lisp.
  Vecchi, semplici linguaggi shell non sono qualificati; ci sono troppe
  differenti implementazioni con sottili idiosincrasie, e l'ambiente
  shell  soggetto a interruzioni dovute alle configurazioni dell'utente
  come, ad esempio, quelle degli alias delle shell.
  Java promette bene come linguaggio portabile, ma le implementazioni
  disponibili per Linux sono appena abbozzate e scarsamente integrate
  con Linux. La scelta di Java  per ora il minore dei mali, sebbene
  possa divenire pi popolare con il tempo.



  3.2.  Seguire le buone regole della portabilit del linguaggio C

  Se si scrive in C, si  liberi di usare pienamente le caratteristiche
  ANSI -- prototipi di funzioni inclusi, che aiuteranno a individuare le
  inconsistenze tra i diversi moduli. I compilatori in vecchio stile K&R
  sono superati.

  D'altra parte non si presupponga che alcune caratteristiche specifiche
  del GCC come l'opzione '-pipe' o le funzioni nidificate siano
  disponibili.  Queste si torceranno contro a chiunque faccia un porting
  verso sistemi non-Linux o non-GCC.


  3.3.  Utilizzare autoconf/ automake/ autoheader

  Se si scrive in C, usare autoconf/automake/autoheader per risolvere
  problemi di portabilit, sondare la configurazione del sistema, e
  confezionare i makefile. Chi installa dai sorgenti si aspetta,
  giustamente, di poter digitare "configure; make" e ottenere una
  struttura pulita.


  3.4.  Controllare lo stato del codice prima di rilasciarlo

  Se si scrive in C, fare un test con '-Wall' ed eliminare gli errori
  almeno una volta prima di ciascuna release. Questo blocca un numero
  sorprendente di errori. Per una totale completezza si compili anche
  con '-pedantic'.

  Se si scrive in Perl, controllare il codice con 'perl -c', 'perl -w',
  e 'perl -T' prima di ciascuna release (si veda la documentazione
  Perl).


  4.  Buone regole per creare una distribuzione

  Le seguenti indicazioni descrivono come la propria distribuzione
  dovrebbe apparire quando qualcuno la rintraccia, la scarica e la
  decomprime.


  4.1.  Essere sicuri che gli archivi tar vengano sempre decompressi in
  una nuova singola directory

  Il pi fastidioso errore dei novelli sviluppatori consiste nel fare
  archivi tar che decomprimono i file e le directory della distribuzione
  nella directory corrente, magari sovrascrivendo file gi esistenti.
  Non bisogna farlo mai !

  Invece, si dev'essere sicuri che i file del proprio pacchetto abbiano
  tutti una porzione di directory chiamata come il progetto, affinch
  questi vengano decompressi in una singola directory direttamente sotto
  quella corrente.

  Ecco un trucco per un makefile che agisce in questo modo, assumendo
  che la directory della propria distribuzione venga chiamata `foobar' e
  che SRC contenga un elenco dei file della distribuzione stessa.  Ci
  richiede GNU tar 1.13

  VERS=1.0
  foobar-$(VERS).tar.gz:
          tar --prefix-name='foobar-$(VERS)/' -czf foobar-$(VERS).tar.gz $(SRC)



  Se si ha un versione pi vecchia di tar, si pu provare una cosa del
  tipo:


  foobar-$(VERS).tar.gz:
          @ls $(SRC) | sed s:^:foobar-$(VERS)/: >MANIFEST
          @(cd ..; ln -s foobar foobar-$(VERS))
          (cd ..; tar -czvf foobar/foobar-$(VERS).tar.gz `cat foobar/MANIFEST`)
          @(cd ..; rm foobar-$(VERS))




  4.2.  Fornire un README

  Bisogna fornire un file chiamato README o READ.ME che funga da mappa
  per la propria distribuzione. Per una vecchia convenzione, questo  il
  primo file che gli intrepidi esploratori leggeranno dopo aver
  decompresso i sorgenti.

   bene che il README includa:


    Una breve descrizione del progetto.

    Un link al sito web del progetto (se ne ha uno).

    Note sull'ambiente di progettazione ed eventuali problemi di
     portabilit.

    Una mappa che descriva i file importanti e le sotto-directory.

    Istruzioni per l'installazione e la compilazione o un richiamo a un
     file che contenga le stesse (di solito INSTALL).

    Un elenco di coloro che hanno fatto e che mantengono il progetto o
     un richiamo ad un file che lo contenga (di solito CREDITS).

    Novit recenti sul progetto o un richiamo ad un file che contenga
     le stesse (di solito NEWS).


  4.3.  Rispettare e seguire le regole standard per la titolazione dei
  file

  Prima ancora di leggere il README, l'intrepido esploratore avr
  analizzato i nomi dei file nella directory della distribuzione appena
  decompressa.  Quei nomi possono essi stessi fornire delle
  informazioni. Aderendo a standard fissi sulle regole di nominazione,
  si pu dare all'esploratore degli indizi preziosi su ci che  in
  procinto di guardare.

  Ecco alcuni nomi standard di file e il loro significato. Non  detto
  che siano tutti necessari per tutte le distribuzioni.


     README or READ.ME
        Il file della mappa, da leggersi per primo


     INSTALL
        istruzioni per la configurazione, struttura e l'installazione


     CREDITS
        elenco di chi ha contribuito al progetto


     NEWS
        notizie recenti sul progetto


     HISTORY
        storia del progetto


     COPYING
        termini di licenza del progetto (convenzione GNU)


     LICENSE
        termini di licenza del progetto


     MANIFEST
        elenco dei file della distribuzione


     FAQ
        documento testo contenente le domande poste pi di frequente
        (Frequently Asked Question) sul progetto


     TAGS
        tag-file generato per uso di Emacs o vi

  N.B. Si accetta come convenzione generale che i nomi dei file scritti
  tutti in caratteri maiuscoli costituiscano matainformazioni leggibili
  sul pacchetto, e non sui suoi componenti.


  5.  Buone regole di comunicazione

  Il proprio software non render il mondo migliore se nessuno sa che
  esiste.  Inoltre, con una presenza visibile del progetto su Internet
  sar pi semplice trovare utenti e co-sviluppatori. Ecco i modi
  standard per farlo.


  5.1.  Riferire a c.o.l.a

  Annunciare la nuova release a comp.os.linux.announce
  <news:comp.os.linux.announce>.  Oltre a essere letto da moltissime
  persone, questo gruppo  una dei pi grossi contenitori di siti web
  riguardanti le novit del settore, come Freshmeat
  <http://www.freshmeat.net>.


  5.2.  Riferire ad un newsgroup attinente al tema

  Si trovi un gruppo USENET attinente alla propria applicazione, e si
  annunci l la sua uscita.  Si posti solo dove la funzione del codice 
  attinente, e si restringa il campo d'azione.  Se (per esempio) si sta
  rilasciando un programma scritto in Perl che consulti un server IMAP,
  si dovrebbe sicuramente postare a comp.mail.imap. Ma non si dovrebbe
  probabilmente postare a comp.lang.perl a meno che il programma non sia
  anche un esempio istruttivo delle tecniche Perl all'avanguardia.

  L'annuncio dovrebbe includere l'URL di un sito web del progetto.


  5.3.  Fornire un sito Web

   importante avere un sito web se si vogliono raccogliere utenti o un
  gruppo di sviluppatori del progetto. Caratteristiche standard di un
  sito sono:

    Lo statuto del progetto (perch esiste, a chi si rivolge, ecc.).

    Collegamenti per scaricare i sorgenti.

    Istruzioni per iscriversi alla/alle mailing list del progetto.

    Un elenco di FAQ (Frequently Asked Questions).

    Documentazione in HTML sul progetto.

    Link a progetti correlati e/o in competizione con il proprio.

  Alcuni siti di progetti forniscono anche degli URL per l'accesso
  anonimo al master source tree.


  5.4.  Creare delle mailing list attinenti al progetto

   una pratica comune creare una lista privata di sviluppo attraverso
  cui i collaboratori del progetto possano comunicare e scambiarsi delle
  patch. Si potrebbe anche creare una lista di annunci e notizie per le
  persone che vogliano essere tenute informate sullo stato del progetto.


  5.5.  Distribuzione attraverso i pi importanti archivi

  Negli anni scorsi, l'archivio di Sunsite
  <http://www.sunsite/unc.edu/pub/Linux/>  stato il pi importante
  luogo di scambio per i programmi Linux.

  Altri siti importanti sono:


    Il sito del Python Software Activity <http://www.python.org> (per
     programmi scritti in Python).

    Il CPAN <http://language.perl.com/CPAN>, Comprehensive Perl Archive
     Network, (per programmi scritti in Perl).


  5.6.  Fornire archivi RPM

  La configurazione standard de-facto per i pacchetti di binari
  installabili  quella usata dal Red Hat Package Manager, RPM. 
  presente nella maggior parte delle pi conosciute distribuzioni Linux,
  e supportato efficacemente da praticamente tutte le altre (eccettute
  Debian e Slackware).

  Di conseguenza,  una buona idea per il sito del proprio progetto
  fornire tanto pacchetti RPM installabili quanto archivi tar.





  Linux Sound HOWTO
  Jeff Tranter, tranter@pobox.com
  v1.20, 24 Marzo 1999

  Questo documento descrive il supporto per il suono di Linux. Vi  con
  tenuto l'elenco dell'hardware sonoro supportato, vi  descritto come
  configurare i driver del kernel e vi sono anche delle risposte alle
  domande poste di frequente. L'intento  quello di portare i nuovi
  utenti alla piena conoscenza del sistema sonoro in minor tempo e di
  ridurre il traffico nei newsgroup Usenet e nelle mailing list.  Le
  prime tre sezioni sono state tradotte ex novo e le sezioni 4 e 7 sono
  state aggiornate e parzialmente modificate da Marco Meloni
  (tonno@stud.unipg.it).  L'aggiornamento delle sezioni 4,5,6,7  stato
  compiuto sulla precedente traduzione di Giuliano Natali
  (natali@stone.trew.it).

  1.  Introduzione

  Questo  il Linux Sound HOWTO. Serve da piccola guida di riferimento
  su tutto quello che dovete sapere per installare e configurare il
  supporto per il suono sotto Linux. Vi sono risposte alle domande pi
  frequenti sul sonoro sotto Linux e riferimenti ad altri posti dove
  ottenere informazioni su diversi argomenti collegati al suono generato
  dal computer e alla musica.

  La trattazione  limitata agli aspetti delle schede sonore pertinenti
  a Linux.  Per informazioni di carattere pi generale sulle schede
  audio, sull'aspetto del sonoro dei computer e sulla sintesi della
  musica si vedano gli altri documenti elencati nella sezione
  Riferimenti.


  1.1.  Ringraziamenti


  Molte delle informazioni qui presenti vengono dalla documentazione
  fornita con il codice sorgente del driver sonoro scritto da Hannu
  Savolainen (hannu@opensound.com).  Un grazie dunque ad Hannu, Alan Cox
  ed a tutte le altre persone che hanno sviluppato i driver sonori ed i
  loro programmi di utilit per Linux.

  Grazie al pacchetto SGML Tools, questo HOWTO  disponibile in
  molteplici formati, tutti generati da un unico file sorgente.


  1.2.  Nuove versioni di questo documento


  Le nuove versioni di questo documento saranno postate periodicamente
  sul newsgroup  comp.os.linux.answers.  Ne sar anche fatto l'upload su
  vari siti di ftp anonimo che archiviano questo tipo di informazioni
  incluso <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/>.

  Le versioni in ipertesto di questo e di altri Linux HOWTO sono
  disponibili su molti siti del World-Wide-Web, incluso
  <http://metalab.unc.edu/LDP/>. Molte distribuzioni di Linux su CD-ROM
  includono gli HOWTO, spesso nella directory /usr/doc, e se ne possono
  comperare copie stampate da diversi rivenditori. A volte gli HOWTO
  presenti nei CD-ROM dei rivenditori, nei siti ftp ed in forma stampata
  non sono aggiornati. Se la data di questo HOWTO  anteriore di pi di
  sei mesi  probabile che vi sia una nuova versione su Internet.

  Si noti anche che, per la natura dinamica di Internet, tutti i link
  siti web e ftp in questo documento sono soggetti a cambiamenti.


  Traduzioni di questo documento sono disponibili nelle lingue seguenti:

  Cinese:  <http://www.linux.org.tw/CLDP/Sound-HOWTO.html>

  Francese:  <http://www.freenix.org/unix/linux/HOWTO/>

  Giapponese:  <http://yebisu.ics.es.osaka-u.ac.jp/linux/>

  Coreana:  <http://kldp.linux-kr.org/HOWTO/html/Sound/Sound-HOWTO.html>

  Russa:  <http://www.phtd.tpu.edu.ru/~ott/russian/linux/howto-
  rus/Sound-HOWTO.html>

  Spagnola:  <ftp://ftp.insflug.org/es>

  Molte traduzioni di questo e di altri HOWTO sono anche su
  <http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/> e
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/>.

  Se traducete questo documento in un'altra lingua vi prego di farmelo
  sapere e metter qui un riferimento.


  1.3.  Feedback


  Confido nei lettori per rendere questo HOWTO utile. Se avete qualche
  suggerimento, correzione o commento vi prego di inviarmelo su
  tranter@pobox.com, e cercher di inglobarlo nella versione successiva.

  Vorrei anche rispondere a delle domande di carattere generale sulle
  schede audio sotto Linux, fin dove posso. Prima di porle vi prego di
  leggere tutte le informazioni contenute in questo HOWTO e di mandarmi
  informazioni dettagliate sul problema. Vi prego di non rivolgervi a me
  per questioni che riguardano l'uso di schede audio sotto sistemi
  operativi differenti da Linux.

  Se pubblicate questo documento in un CD-ROM o in altra forma stampata,
  una copia di cortesia sarebbe da me apprezzata. Scrivetemi per il mio
  indirizzo di posta. Tenete anche in considerazione l'opportunit di
  fare una donazione al Linux Documentation Project per aiutare il
  progetto di una documentazione gratuita per Linux. Contattate il
  coordinatore dei Linux HOWTO, Tim Bynum, linux-howto@metalab.unc.edu,
  per maggiori informazioni.


  1.4.  Regole di distribuzione



  Copyright (c) 1995-1999 di Jeff Tranter. Questo documento pu essere
  distribuito nei termini descritti nella licenza LDP su
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.

  Copyright (c) 1995-1999 by Jeff Tranter.  This document may be
  distributed under the terms set forth in the LDP license at
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.


  2.  Tecnologia delle schede audio


  Questa sezione  intesa come panoramica molto generale sulla
  tecnologia audio utilizzata nei computer, in modo da rendere pi
  agevole la comprensione dei concetti che verranno poi esposti in
  questo documento. Per saperne di pi si consulti un libro sull'audio
  digitale o sull'elaborazione digitale dei segnali.

  Il suono  analogico; pu assumere qualsiasi valore in un intervallo
  continuo. I computer sono digitali; a loro piace lavorare con valori
  discreti. Le schede audio usano un dispositivo conosciuto come
  Convertitore Analogico/Digitale (A/D o ADC) per convertire le tensioni
  corrispondenti alle onde sonore analogiche in valori digitali o
  numerici che possono essere quindi memorizzati. Analogamente, un
  Convertitore Digitale/Analogico (D/A o DAC) converte valori numerici
  in tensioni analogiche che possono a loro volta pilotare un
  altoparlante, producendo il suono.

  Il processo di conversione dall'analogico al digitale, conosciuto come
  ``campionamento'', introduce degli errori. Vi sono due fattori chiave
  che servono a determinare quanto un segnale campionato si avvicini
  all'originale.  La frequenza di campionamento  il numero di campioni
  presi per unit di tempo (usualmente espressa in campioni per secondo
  o Hertz). Una bassa frequenza di campionamento fornir una resa poco
  accurata del segnale analogico. L'ampiezza di campionamento 
  l'intervallo di valori usati per rappresentare ogni campione,
  usualmente espressa in bit. Pi  grande l'ampiezza di campionamento,
  pi accurata sar la resa del segnale campionato.

  Le schede audio usano normalmente campioni di 8 o 16 bit a frequenze
  di campionamento da circa 4000 a 44000 campioni al secondo. I campioni
  possono contenere uno (mono) o due (stereo) canali.

  La sintesi FM  una vecchia tecnica usata per produrre il suono. 
  basata sulla combinazione di forme d'onda differenti (ad es. seno,
  triangolo, quadrato). La sintesi FM  pi semplice da implementare a
  livello hardware della conversione D/A, ma  pi difficile da
  programmare e meno flessibile. Molte schede audio utilizzano la
  sintesi FM per rimanere compatibili con le vecchie schede audio e il
  vecchio software. Vengono normalmente resi disponibili diversi
  generatori di suono indipendenti (voci).

  La sintesi tramite wavetable combina la flessibilit della conversione
  D/A con la capacit di gestire canali multipli propria della sintesi
  FM. In questa maniera delle voci digitalizzate possono essere caricate
  in una area di memoria dedicata e quindi riprodotte, combinate e
  modificate con solo un piccolo impiego di CPU. Tutte le attuali schede
  audio supportano la sintetizzazione tramite wavetable.

  Molte schede audio sono in grado di agire da mixer, combinando i
  segnali provenienti da entrate diverse e controllando i livelli di
  guadagno.

  MIDI sta per ``Musical Instrument Digital Interface'' (interfaccia
  digitale per strumenti musicali) ed  un protocollo hardware e
  software standard che permette agli strumenti musicali di comunicare
  l'uno con l'altro. Gli ``eventi'' che vengono inviati tramite il bus
  MIDI possono anche essere memorizzati in file MIDI per consentirne
  successive modifiche e riascolti. Molte schede audio hanno
  un'interfaccia MIDI. Quelle che non la possiedono possono comunque
  riprodurre i file MIDI usando altre caratteristiche della scheda
  audio.

  I file MOD sono un formato comunemente usato per la musica generata da
  computer. Assieme alle informazioni sulle note musicali che devono
  essere riprodotte, questi file contengono dei campioni digitalizzati
  per gli strumenti (o le voci). I file MOD sono stati usati per la
  prima volta sui computer Amiga ma possono essere ascoltati su altri
  sistemi, Linux incluso, con del software adatto.



  3.  Hardware supportato


  Questa sezione elenca le schede audio e le interfacce che sono
  attualmente supportate sotto Linux. Le informazioni qui presenti sono
  basate sull'ultimo kernel che, al momento della stesura, risulta
  essere il 2.2.4. Questo documento riguarda solo i driver sonori
  inclusi nella distribuzione del sorgente del kernel di Linux (si veda
  la sezione intitolata Driver sonori alternativi).

  Per le ultime informazioni sulle schede audio supportate e sulle
  funzioni dei driver si consultino i file acclusi alla distribuzione
  del kernel di Linux, normalmente installati nella directory
  /usr/src/linux/Documentation/sound.

  Le informazioni contenute in questo HOWTO sono valide per la
  implementazione di Linux su processori di tipo Intel.

  Il driver sonoro dovrebbe funzionare anche con molte schede audio
  nella implementazione per processori Alpha. Comunque qualche scheda
  potrebbe far nascere conflitti delle porte I/O con altri dispositivi
  installati nei sistemi Alpha anche se funziona perfettamente sulle
  macchine i386, quindi non si pu dire, in generale, se una data scheda
  funzioner oppure no senza averla provata.

  Al momento della stesura di questo documento il driver sonoro non 
  ancora funzionante nell'implementazione per PowerPC di Linux, ma
  dovrebbe esserlo in futuro.

  Le schede audio possono essere configurate nel kernel
  nell'implementazione di Linux per MIPs, e qualche macchina MIPs ha
  degli slot EISA e/o dell'hardware sonoro interno. Mi  stato detto che
  il gruppo Linux-MIPs  interessato a una futura aggiunta del supporto
  sonoro.

  Il kernel di Linux include un driver separato nelle sue versioni per
  Atari e Amiga, driver che implementa un sottoinsieme compatibile del
  driver sonoro usato per la piattaforma Intel utilizzando l'hardware
  per il suono interno a queste macchine.

  La versione di Linux per SPARC attualmente supporta l'audio solo in
  alcuni modelli di workstation Sun. Mi  stato detto che l'hardware
  audio on-board funziona ma il dispositivo DSP esterno non  supportato
  poich Sun non ha reso pubbliche le sue specifiche.



  3.1.  Schede audio


  Le seguenti schede audio sono supportate dal driver sonoro del kernel
  di Linux. Qualche elemento di questa lista  un chip audio pi che una
  scheda audio. La lista  incompleta poich vi sono altre schede audio
  compatibili con queste che funzionano sotto Linux. Come se la
  confusione fosse poca, dei produttori cambiano periodicamente il
  design delle loro schede audio causando incompatibilit e continuano a
  venderle come modello originario.



    Interfaccia MIDI 6850 UART

    Schede basate su AD1816/AD1816A

    ADSP-2115

    Schede basate su ALS-007 (Avance Logic)

    ATI Stereo F/X (fuori produzione)

    Acer FX-3D

    AdLib (fuori produzione)

    Audio Excel DSP 16

    AudioDrive

    CMI8330 (chip audio)

    Compaq Deskpro XL onboard sound

    Corel Netwinder WaveArtist

    Crystal CS423x

    ESC614

    ESS1688 (chip audio)

    ESS1788 (chip audio)

    ESS1868 (chip audio)

    ESS1869 (chip audio)

    ESS1887 (chip audio)

    ESS1888 (chip audio)

    ESS688 (chip audio)

    ES1370 (chip audio)

    ES1371 (chip audio)

    Ensoniq AudioPCI (ES1370)

    Ensoniq AudioPCI 97 (ES1371)

    Ensoniq SoundScape (e compatibili prodotte da Reveal e Spea)

    Gallant SC-6000

    Gallant SC-6600

    Gravis Ultrasound

    Gravis Ultrasound ACE

    Gravis Ultrasound Max

    Gravis Ultrasound con l'opzione di sampling a 16 bit

    HP Kayak

    Highscreen Sound-Booster 32 Wave 3D

    IBM MWAVE

    Logitech Sound Man 16

    Logitech SoundMan Games

    Logitech SoundMan Wave

    MAD16 Pro (chipset OPTi 82C928, 82C929, 82C930, 82C924)

    Media Vision Jazz16

    MediaTriX AudioTriX Pro

    Microsoft Windows Sound System (MSS/WSS)

    MiroSOUND PCM12

    Mozart (OAK OTI-601)

    OPTi 82C931

    Orchid SW32

    Personal Sound System (PSS)

    Pinnacle MultiSound

    Pro Audio Spectrum 16

    Pro Audio Studio 16

    Pro Sonic 16

    Roland MPU-40, interfaccia MIDI

    S3 SonicVibes

    SY-1816

    Sound Blaster 1.0

    Sound Blaster 2.0

    Sound Blaster 16

    Sound Blaster 16ASP

    Sound Blaster 32

    Sound Blaster 64

    Sound Blaster AWE32

    Sound Blaster AWE64

    Sound Blaster PCI 128

    Sound Blaster Pro

    Sound Blaster Vibra16

    Sound Blaster Vibra16X

    TI TM4000M notebook

    Terratec Base 1

    Terratec Base 64

    ThunderBoard

    Turtle Beach Maui

    Turtle Beach MultiSound Classic

    Turtle Beach MultiSound Fiji

    Turtle Beach MultiSound Hurricane

    Turtle Beach MultiSound Monterey

    Turtle Beach MultiSound Pinnacle

    Turtle Beach MultiSound Tahiti

    Turtle Beach WaveFront Maui

    Turtle Beach WaveFront Tropez

    Turtle Beach WaveFront Tropez+

    VIA chip set

    VIDC 16-bit sound

    Yamaha OPL2 (chip audio)

    Yamaha OPL3 (chip audio)

    Yamaha OPL3-SA1 (chip audio)

    Yamaha OPL3-SA2 (chip audio)

    Yamaha OPL3-SA3 (chip audio)

    Yamaha OPL3-SAx (chip audio)

    Yamaha OPL4 (chip audio)

  Anche se molte schede audio sono dette ``SoundBlaster compatibili'',
  molto poche, attualmente, sono abbastanza compatibili da funzionare
  con il driver di Linux per la SoundBlaster. Queste schede normalmente
  funzionano meglio usando il driver MAD16 o MSS/WSS. Solo le vere
  schede SoundBlaster fatte dalla Creative Labs, che usano i chip custom
  della Creative (per esempio, la SoundBlaster16 Vibra) e le schede
  basate su MV Jazz16 e ESS688/1688 generalmente funzionano con il
  driver per SoundBlaster. Provare a usare una ``scheda audio a 16 bit
  compatibile con SoundBlaster Pro'' con il driver SoundBlaster si
  rivela, normalmente, una perdita di tempo.

  Il kernel di Linux supporta la porta SCSI di cui sono fornite alcune
  schede audio (per esempio ProAudioSpectrum 16) e l'interfaccia
  proprietaria di qualche drive CD-ROM (per esempio SoundBlaster Pro).
  Date un'occhiata ai Linux SCSI HOWTO e CDROM HOWTO per maggiori
  informazioni.

  Assieme ai kernel 2.2  anche distribuito un driver per le porte
  joystick presenti su alcune schede audio.

  Si noti che i driver sonoro, SCSI, CD-ROM e joystick sono
  completamente indipendenti l'uno dall'altro.




  3.2.  Driver audio alternativi


  Il supporto per l'audio del kernel di Linux  stato originariamente
  scritto da Hannu Savolainen. Hannu ha poi sviluppato Open Sound
  System, una suite commerciale di driver audio venduta da 4Front
  Technologies, che  disponibile su diversi sistemi Unix. La Red Hat
  Software ha quindi sponsorizzato Alan Cox con l'obiettivo di
  potenziare i driver audio rendendoli completamente modulari. Diverse
  altre persone hanno poi dato il loro contributo con correzioni di
  errori e hanno sviluppato driver aggiuntivi per le nuove schede audio.
  Questi driver modificati sono stati inclusi nella distribuzione Red
  Hat dalla versione 5.0 alla 5.2.  Le modifiche sono quindi state
  integrate nella distribuzione standard del kernel dalla versione 2.0.
  Alan Cox  il curatore di driver audio della distribuzione standard
  del kernel, mentre Hannu continua periodicamente a fornire codice
  preso dal driver commerciale.

  Open Sound System, il driver commerciale della 4Front Technologies
  tende ad essere pi facile da configurare e offre supporto per un
  maggior numero di schede audio, particolarmente per quelle nuove. 
  anche compatibile con le applicazioni scritte per il driver audio
  incluso nella distribuzione standard del kernel. Lo svantaggio  che
  dovrete pagare per averlo e comunque non avrete il codice sorgente.
  Potete scaricare una copia di prova del prodotto prima di decidere se
  comprarlo o no. Per maggiori informazioni si guardi sulla pagina web
  della 4Front Technologies: <http://www.opensound.com>.

  Jaroslav Kysela e altri hanno cominciato a scrivere un driver audio
  alternativo per la scheda audio Gravi UltraSound. Il progetto  stato
  rinominato in Advanced Linux Sound Architecture (ALSA) ed  risultato
  in un sistema di driver audio che gli autori credono essere una buona
  alternativa per i driver audio del kernel. I driver ALSA offrono
  supporto per molte schede audio diffuse, sono full duplex,
  completamente modulari e compatibili con l'architettura audio del
  kernel.  Il sito principale del progetto ALSA   <http://www.alsa-
  project.org>.   anche disponibile un "Alsa-sound-mini-HOWTO" che
  tratta della compilazione e dell'installazione di questi driver.

  Markus Mummert  (mum@mmk.e-technik.tu-muenchen.de) ha scritto un
  pacchetto driver per le schede audio Turtle Beach MultiSound
  (classic), Tahiti e Monterey. La documentazione asserisce:


       `` progettato per la registrazione/riproduzione su hard
       disk di alta qualit, senza perdita di sincronizzazione nem
       meno su un sistema occupato. Altre funzioni, come Wave syn
       thesis, MIDI ed elaborazione digitale dei segnali (DSP), non
       possono essere usate. Altres la registrazione e la ripro
       duzione contemporanee non sono possibili.  In questo momento
       sostituisce VoxWare ed  stato testato in diverse versioni
       del kernel dalla 1.0.9 alla 1.2.1. Oltretutto  installabile
       sui sistemi UN*X SysV386R3.2.''


  Lo si pu trovare su <http://www.cs.colorado.edu/~mccreary/tbeach>.

  Kim Burgaard (burgaard@daimi.aau.dk) ha scritto un driver e dei
  programmi di utilit per l'interfaccia MIDI Roland MPU-401. La voce
  che lo riguarda sulla Linux Software Map ne d questa descrizione:


       ``Un driver per le interfacce MIDI compatibili con Roland
       MPU-401 (incluse Roland SCC-1 e RAP-10/ATW-10). Include una
       serie di utilit tra le quali un player di file Standard
       MIDI ed un registratore.
       Molte migliorie sono state apportate dalla versione 0.11a.
       Tra le altre cose il driver adesso si avvale di regole per
       la condivisione degli IRQ e si attiene alla nuova interfac
       cia del kernel per i moduli. La funzione di metronomo, la
       possibilit di sincronizzare ad es. la grafica su una strut
       tura di battute senza perdere in precisione, una interfaccia
       avanzata per replay/registrazione/overdub e molto, molto
       ancora.''


  Lo si pu trovare su
  <ftp://metalab.unc.edu/pub/Linux/kernel/sound/mpu401-0.2.tar.gz>.

  Altro utilizzo di una scheda audio per Linux  quello del modem per
  radioamatori in packet radio.  I recenti kernel 2.1.x includono un
  driver che funziona con schede audio compatibili SoundBlaster e
  Windows Sound System per implementare i protocolli packet 1200 bps
  AFSK e 9600 bps FSK. Date un'occhiata al Linux AX25 HOWTO per altri
  dettagli (fra parentesi sono radioamatore anche io -- il mio callsign
   VE3ICH).


  3.3.  PC Speaker


   disponibile un altro driver sonoro che non richiede hardware
  aggiuntivo; infatti usa lo speaker del PC.  sicuramente pi
  compatibile a livello software con il driver della scheda audio ma,
  come  normale aspettarsi, fornisce un output di qualit molto minore
  e occupa la CPU per un tempo molto maggiore. I risultati sono di vario
  tipo, poich dipendono dalle caratteristiche di ogni singolo speaker.
  Per maggiori informazioni date un'occhiata alla documentazione fornita
  assieme alla distribuzione.

  La versione attuale  la 1.1 e la si trova su
  <ftp://ftp.informatik.hu-berlin.de/pub/os/linux/hu-sound/>


  3.4.  Porta parallela


  Altra opzione  quella di costruire un convertitore digitale-analogico
  utilizzando la porta parallela della stampante e qualche componente
  aggiuntivo. Ci porta a un output di qualit superiore rispetto allo
  speaker del PC, ma genera ancora un pesante utilizzo di CPU.  Il
  pacchetto del driver per il PC speaker prevede questa opzione e
  include le istruzioni per costruire l'hardware necessario.


  4.  Installazione


  Configurare Linux per supportare il suono prevede i seguenti passaggi:


  1. Installare la scheda sonora.

  2. Configurare il Plug and Play (se disponibile)

  3. Configurare e compilare il kernel con il supporto sonoro.

  4. Creare i file dispositivo.

  5. Effettuare il boot del kernel di Linux e testare l'installazione.


  Se avete Red Hat Linux avete anche una utility chiamata sndconfig che
  in molti casi rilever la vostra scheda audio e imposter tutti i
  necessari file di configurazione per caricare i giusti driver audio
  per la vostra scheda. Se avete una Red Hat vi suggerisco di provarla.
  Se vi funziona allora potete saltare il resto delle istruzioni in
  questa sezione.

  Se sndconfig non riesce nel suo intento, state usando un'altra
  distribuzione o volete seguire il metodo manuale per poter meglio
  comprendere quello che state facendo, le prossime sezioni
  descriveranno dettagliatamente tutti i passi da compiere.


  4.1.  Installare la scheda audio


  Seguite le istruzioni del produttore per l'installazione dell'hardware
  o, meglio, richiedete al vostro rivenditore l'installazione della
  scheda al momento dell'acquisto.

  Le vecchie schede sonore usano switch o jumper per l'impostazione di
  IRQ, canali DMA, ecc; trascrivete su un foglio i valori assegnati. Se
  non siete sicuri, usate i parametri predefiniti. Nel limite del
  possibile cercate di evitare conflitti con altro hardware installato
  sul sistema (come schede Ethernet, SCSI, porte seriali e parallele) .

  Usualmente si dovrebbero usare la stessa porta di I/O, IRQ e
  impostazioni di DMA che si usano sotto DOS. In qualche caso
  (particolarmente con schede PnP) si devono usare impostazioni diverse
  per far funzionare le cose sotto Linux.  Serve qualche prova.



  4.2.  Configurare il Plug and Play


  Attualmente diverse schede audio utilizzano il protocollo Plug and
  Play per configurare le impostazioni degli indirizzi di I/O, irq e
  canali DMA.  Se avete una vecchia scheda che ha delle impostazioni
  fisse o dei jumper (ponticelli) potete saltare alla prossima sezione.

  Alla versione 2.2 del kernel non vi  ancora un completo supporto per
  il Plug and Play. La soluzione preferita  quella che prevede
  l'utilizzo dei tool isapnp che sono presenti in molte distribuzioni di
  Linux (o che potete scaricare dal sito web della Red Hat
  <http://www.redhat.com/>).

  Date per prima cosa un'occhiata alla documentazione della vostra
  distribuzione di Linux. Il supporto Plug and Play potrebbe essere gi
  configurato o potrebbe funzionare in maniera differente da come viene
  qui descritto. Se dovete configurarvelo da soli potete trovare altri
  dettagli nelle pagine di manuale del tool isapnp. In breve, la
  procedura che dovrete seguire  la seguente:


    Utilizzate pnpdump per scoprire tutte le possibili impostazioni dei
     vostri dispositivi Plug and Play, salvando il risultato nel file
     /etc/isapnp.conf.

    Scegliete per la scheda audio delle impostazioni che non entrino in
     conflitto con altri dispositivi presenti nel vostro sistema e
     decommentate le giuste linee in /etc/isapnp.conf. Non dimenticatevi
     di decommentare il comando (ACT Y) che si trova verso la fine.

    Assicuratevi che isapnp venga eseguito all'avvio del sistema, cosa
     normalmente fatta da uno script di avvio. Fate il reboot del vostro
     sistema o eseguite manualmente isapnp.

  Se per qualche motivo non potete o non volete usare il tool isapnp, vi
  sono altre soluzioni. Se utilizzate la scheda audio sotto Microsoft
  Windows 95 o 98, potete usare il device manager per configurare la
  scheda audio e quindi effettuare un soft boot di Linux usando il
  programma LOADLIN.  Assicuratevi che Windows e Linux utilizzino le
  stesse impostazioni di configurazione della scheda.

  Se utilizzate la scheda dal DOS potete usare l'utilit icu che viene
  distribuita assieme alla SoundBlaster16 PnP per configurarla da DOS,
  quindi effettuare un soft boot di Linux utilizzando LOADLIN. Ancora
  una volta assicuratevi che sia DOS che Linux utilizzino le stesse
  impostazioni della scheda.

  Qualche driver per schede audio include il software necessario ad
  inizializzare il Plug and Play per la scheda. Date un'occhiata alla
  documentazione del driver per maggiori informazioni.


  4.3.  Configurare il kernel


  Al momento della prima installazione normalmente si usa un kernel
  precompilato.  Questo kernel normalmente non supporta il suono. La
  cosa migliore , senza dubbio, la ricompilazione del kernel con
  l'aggiunta dei driver che vi servono.  Dovreste comunque ricompilare
  il kernel perlomeno per aggiornare la versione e minimizzare la
  grandezza del file stesso (vmlinuz) onde evitare di occupare troppo
  spazio in memoria.

  Il Linux Kernel HOWTO <http://metalab.unc.edu/LDP/HOWTO/Kernel-
  HOWTO.html> dovrebbe essere consultato per i dettagli su come
  compilare un nuovo kernel. Qui proceder solamente a riportare alcuni
  passaggi riguardanti il supporto sonoro.

  Se, prima d'ora, non avete mai configurato il kernel per il supporto
  sonoro sarebbe una buona idea leggere tutti i Readme file inclusi con
  il kernel sound driver ed in particolar modo le informazioni
  specifiche riguardanti la vostra scheda sonora. La seguente
  documentazione si trova normalmente nella directory del kernel sound
  driver, che viene installata di default in
  /usr/src/linux/drivers/sound. Se questa directory non  presente 
  molto probabile che abbiate una versione molto vecchia o non abbiate
  installato il codice sorgente.

  Seguite la normale procedura per compilare il kernel. Attualmente vi
  sono tre interfacce per il processo di configurazione. Un'interfaccia
  utente grafica che gira sotto X11 e pu essere lanciata con make
  xconfig. Una basata su menu che richiede sono un display testuale 
  disponibile con make menuconfig. Il metodo originale, usando make
  config, offre una semplice interfaccia di testo.

  Durante la configurazione del kernel vi saranno molte scelte da
  effettuare per configurare correttamente il driver per la scheda che
  possedete.  L'help in linea di cui il programma di configurazione
  dispone dovrebbe fornire un adeguato supporto a questa fase della
  procedura. Scegliete meglio che potete.

  Dopo aver configurato il kernel dovrete compilarlo ed installare il
  nuovo kernel come descritto nel Kernel HOWTO.





  4.4.  Creazione dei file dispositivo


  Per un corretto funzionamento devono essere creati dei file
  dispositivo per i dispositivi audio. Essi vengono creati di norma
  durante l'installazione del vostro sistema Linux.  Pu essere fatto un
  controllo veloce utilizzando il comando di cui si parla qui di
  seguito. Se l'output  quello mostrato (la data pu variare) allora i
  file dispositivi sono quasi sicuramente a posto.



       % ls -l /dev/sndstat
       crw-rw-rw-   1 root     root      14,   6 Apr 25  1995 /dev/sndstat




  Si noti che il fatto che i file dispositivo siano a posto di per s
  non garantisce nulla. Anche il driver del kernel deve essere stato
  caricato o compilato prima che le periferiche funzionino (se ne
  parler pi avanti).

  In qualche raro caso, se si crede che i dispositivi siano errati, essi
  possono essere ricreati. Diverse distribuzioni di Linux hanno lo
  script /dev/MAKEDEV che pu essere utilizzato a tale scopo.


  4.5.  Boot di Linux e test dell'installazione


  Dovreste essere pronti per eseguire il boot e testare il sound driver.
  Seguite le normali procedure per installare e fare il boot del nuovo
  kernel (non cancellate il vecchio kernel, pu servire nel caso in cui
  si incontrino problemi).

  Durante il boot, controllate l'esistenza di un messaggio tipo questo
  alla partenza (se passano troppo velocemente, li potete rileggere con
  il comando dmesg):



       Sound initialization started
       <Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
       <Sound Blaster 16> at 0x330 irq 5 dma 0
       <Yamaha OPL3 FM> at 0x388
       Sound initialization complete




  Deve corrispondere al tipo di scheda installata e al settaggio di IRQ
  e jumper (se ci sono).

  Si noti che i messaggi di cui sopra non vengono mostrati se si 
  preferito utilizzare il driver come modulo caricabile del kernel (a
  meno che non venga abilitato, ad esempio con insmod sound
  trace_init=1).

  Quando il driver sonoro viene compilato nel kernel i messaggi Sound
  initialization started e Sound initialization complete devono
  apparire. Se ci non accadesse significa che non  presente un driver
  sonoro nel kernel. In questo caso si avr cura di controllare che il
  kernel installato sia quello che  stato compilato con l'abilitazione
  del driver sonoro.

  Se non viene visualizzato nulla tra le righe Sound initialization
  started e Sound initialization complete significa che non sono stati
  rilevati dispositivi audio. Molto probabilmente significa che non 
  stato abilitato il driver giusto, la scheda non  supportata, la porta
  di I/O  sbagliata o che si ha una scheda PnP che non  stata
  configurata.

  Il driver pu anche mostrare dei messaggi di errore e altre avvertenze
  durante il boot. Si stia attenti a tali messaggi la prima volta che
  viene effettuato il boot dopo aver configurato il driver sonoro.

  Si dovr successivamente controllare il file dispositivo /dev/sndstat.
  Leggendo il file sullo stato del driver sonoro (/dev/sndstat) vengono
  presentate informazioni aggiuntive sulla eventuale corretta
  inizializzazione del driver sonoro. Ecco un esempio di output:



       % cat /dev/sndstat
       Sound Driver:3.5.4-960630 (Sat Jan 4 23:56:57 EST 1997 root,
       Linux fizzbin 2.0.27 #48 Thu Dec 5 18:24:45 EST 1996 i586)
       Kernel: Linux fizzbin 2.0.27 #48 Thu Dec 5 18:24:45 EST 1996 i586
       Config options: 0

       Installed drivers:
       Type 1: OPL-2/OPL-3 FM
       Type 2: Sound Blaster
       Type 7: SB MPU-401

       Card config:
       Sound Blaster at 0x220 irq 5 drq 1,5
       SB MPU-401 at 0x330 irq 5 drq 0
       OPL-2/OPL-3 FM at 0x388 drq 0

       Audio devices:
       0: Sound Blaster 16 (4.13)

       Synth devices:
       0: Yamaha OPL-3

       Midi devices:
       0: Sound Blaster 16

       Timers:
       0: System clock

       Mixers:
       0: Sound Blaster




  Il comando precedente pu restituire alcuni messaggi di errore.  ``No
  such file or directory'' indica che si devono creare i file
  dispositivo (vedi sezione 4.3). ``No such device'' significa che il
  driver sonoro non  stato caricato o linkato nel kernel. Si ritorni
  alla sezione 4.2 per rimediare a questo errore.

  Se le linee della sezione ``Card config:'' di /dev/sndstat sono
  visualizzate tra parentesi (tipo ``(SoundBlaster at 0x220 irq5 drq
  1,5)''), significa che quel dispositivo  stato configurato ma non
  rilevato.

  Adesso siete pronti per eseguire un semplice file sonoro. Prendete un
  qualsiasi file sonoro e reindirizzatelo sul dispositivo sonoro per
  testarne il risultato, ad esempio:
       % cat endoftheworld >/dev/dsp
       % cat crash.au >/dev/audio




  (State attenti a non dimenticare il ``>'' nel comando di cui sopra).

  Si noti che, in generale, l'uso di cat non  la maniera pi adatta per
  riprodurre file audio, serve solo come piccolo controllo.  Avrete
  bisogno di un vero e proprio programma di riproduzione (se ne parla
  pi avanti) che far un lavoro migliore.

  Questo comando funzioner se vi  almeno un dispositivo nella sezione
  ``audio devices'' di /dev/sndstat. Se la sezione ``audio devices'' 
  vuota ci si dovr accertare del perch il dispositivo non  stato
  rilevato.

  Se il comando precedente restituisce un ``I/O error'', dovreste dare
  un'occhiata alla parte finale dei messaggi del kernel usando il
  comando ``dmesg''.  probabile che vi si trovi un messaggio di errore.
  Molto spesso il messaggio  ``Sound: DMA (output) timed out - IRQ/DRQ
  config error?''.  Questo messaggio significa che il driver non ha
  utilizzato con successo l'interrupt impostato per comunicare con la
  scheda audio.  In molti casi significa che l'IRQ o il canale DMA
  configurato nel driver non sono corretti. La maniera migliore di farlo
  funzionare  quella di tentare con tutte le possibili combinazione di
  DMA e IRQ supportati dal dispositivo audio.

  Un'altra possibile ragione  costituita dall'incompatibilit del
  dispositivo rilevato con il driver che si  scelto di installare. 
  questo il caso delle schede che si dicono ``SoundBlaster (Pro/16)
  compatibili'' ma che non funzionano con il driver per SoundBlaster.
  In questo caso si dovr scoprire con quale scheda audio  compatibilie
  la propria (per esempio scrivendo un messaggio sul newsgroup
  comp.os.linux.hardware).

  Alcuni esempi di file sonori sono reperibili presso :
  <ftp://tsx-11.mit.edu/pub/linux/packages/sound/snd-data-0.1.tar.Z>

  Adesso verificate la registrazione. Se avete la possibilit di usare
  un dispositivo di input potete fare un test veloce in questo modo:



       # registra 4 secondi di audio dal microfono
       EDT% dd bs=8k count=4 </dev/audio >sample.au
       4+0 records in
       4+0 records out
       # esegue il suono registrato
       % cat sample.au >/dev/audio




  Ovviamente per far funzionare tutto ci si dovr aver connesso un
  microfono alla scheda audio e vi si dovr parlare. Forse avrete anche
  bisogno di installare un programma mixer per impostare il microfono
  come dispositivo di input e regolare il guadagno.

  Se il test non d problemi, potete ragionevolmente confidare nel fatto
  che la scheda D/A -- A/D e il software funzionano. Al contrario se
  avete riscontrato problemi controllate la sezione successiva di questo
  documento.


  4.6.  Risoluzione dei problemi


  Se comunque, dopo avere seguito le istruzioni dell'HOWTO, incontrate
  problemi qui propongo alcune cose da controllare. I controlli sono
  proposti in ordine progressivo di difficolt. Se un controllo non
  funzionasse, risolvete il problema prima di passare al controllo
  successivo.


  4.6.1.  Passo 1: controllate che il kernel sia quello che avete compi
  lato.


  Potete controllare la data del kernel per vedere se state usando
  quello compilato con il supporto per il suono. Si pu farlo usando il
  comando uname :



       % uname -a
       Linux fizzbin 2.2.4 #1 Tue Mar 23 11:23:21 EST 1999 i586 unknown




  o visualizzando il file /proc/version:



       % cat /proc/version
       Linux version 2.2.4 (root@fizzbin) (gcc version 2.7.2.3) #1 Tue
       Mar 23 11:23:21 EST 1999




  Se la data non corrisponde al giorno in cui avete compilato il kernel,
  allora state usando un vecchio kernel. Avete eseguito il reboot? Se
  usate LILO, lo avete reinstallato (normalmente eseguendo lilo)? Se
  eseguite il boot da un floppy, ne avete creato uno nuovo di boot e lo
  avete utilizzato per il boot?


  4.6.2.  Passo 2: assicuratevi che nel kernel sia incluso il supporto
  del driver sonoro.


  Il modo pi facile per fare questo controllo  quello di dare
  un'occhiata all'output di dev/sndstat come detto precedentemente. Se
  l'output non  quello che ci si attendeva allora qualche cosa  andata
  storta durante la configurazione o la compilazione del kernel. Fate
  ripartire il processo di installazione, ricominciando dalla
  configurazione e compilazione del kernel.


  4.6.3.  Passo 3: il kernel ha rilevato la vostra scheda al momento del
  boot?


  Assicuratevi che il kernel abbia rilevato la scheda al momento del
  boot.  Dovreste avere visto un messaggio in fase di boot. Se il
  messaggio  passato troppo velocemente potete richiamarlo con il
  comando dmesg :


       % dmesg




  oppure



       % tail /var/log/messages




  Se la scheda non  stata trovata qualcosa  andato storto.
  Assicuratevi che sia realmente installata. Se funziona sotto DOS
  potete ragionevolmente sperare che l'hardware funzioni, probabilmente
   solo un problema di configurazione del kernel. Forse avete
  configurato la scheda del tipo sbagliato o assegnato parametri
  inesatti, o la scheda non  compatibile con nessuno dei driver sonori
  del kernel di Linux.


  Una possibilit  quella che la scheda sia una delle compatibili che
  richiedono l'inizializzazione dal driver del DOS. Provate a fare il
  boot da DOS e ad installare il driver fornito dal produttore della
  scheda. Poi eseguite un boot a caldo di Linux usando Control-Alt-Canc.
  Assicuratevi che gli indirizzi di I/O, DMA e le impostazioni degli IRQ
  della scheda siano gli stessi sia per Linux che per DOS.  Consultate
  il file Readme.cards nei sorgenti della distribuzione del sound driver
  per eventuali consigli sulla configurazione della scheda.



  Se la scheda non compare nel documento,  possibile che il Linux sound
  driver non la supporti. Controllate i riferimenti alla fine di questo
  documento.


  4.6.4.  Passo 4: potete leggere dati dal dispositivo dsp?


  Provate a leggere dal dispositivo /dev/audio usando il comando dd
  visto prima all'interno di questo documento. Il comando deve
  funzionare senza errori.

  Se non funziona probabilmente dipende da un conflitto di IRQ o DMA o
  da qualche tipo di incompatibilit hardware (il dispositivo non 
  supportato da Linux o il driver  stato configurato per un dispositivo
  errato).

  Una remota possibilit potrebbe essere un hardware non funzionante.
  Provate a eseguire un test da DOS, se possibile, per vedere se 
  questa la causa.


  4.6.5.  Se tutto questo non funziona


  Se ci sono ancora problemi, quelli che seguono sono gli ultimi
  consigli su tentativi eventuali:


    rileggete attentamente questo HOWTO;


    leggetevi i riferimenti alla fine di questo documento, specialmente
     i file della documentazione nei sorgenti del kernel;

    inviate una domanda su uno dei gruppi comp.os.linux o su altri
     gruppi Usenet (comp.os.linux.hardware  una buona scelta; a causa
     dell'altro livello di traffico su questi gruppi aiuta mettere la
     parola ``sound'' nel subject del messaggio, in modo tale che i
     giusti esperti lo notino);

    Usare un motore di ricerca per il Web/Usenet con un criterio di
     ricerca intelligente pu dare ottimi risultati velocemente. Una
     scelta tipica   <http://www.altavista.digital.com>;

    provate a usare l'ultimo kernel di Linux (ma solo come ultima
     risorsa, gli ultimi kernel sperimentali potrebbero essere
     instabili);

    inviate una mail all'autore del driver sonoro;

    inviate una mail all'autore del Sound HOWTO;

    avviate Emacs e digitate Esc-x doctor :-)


  5.  Applicazioni che supportano il suono


  Qui propongo un esempio di applicativi che dovreste usare se avete una
  scheda sonora. Potete cercare anche nella Linux Software Map, negli
  archivi di Internet (siti ftp), o sul vostro CD-ROM di Linux per
  informazioni pi aggiornate.

  Come minimo, dovreste avere questi applicativi:


    utilit di conversione del formato audio (ad es. sox)

    programma mixer (ad es. aumix o xmix)

    registratore/riproduttore digitale (ad es. play o wavplay)

    riproduttore di file MOD (ad es. tracker)

    riproduttore di file MIDI (ad es. playmidi)

  Esistono versioni con interfaccia testuale e versioni con interfaccia
  grafica della maggior parte di questi applicativi. Vi sono anche altre
  applicazioni esoteriche (come quelle che parlano o riconoscono il
  parlato) che forse vorrete provare.


  6.  Risposte alle domande frequenti (FAQ)


  Questa sezione risponde a qualcuna delle domande che vengono
  comunemente poste nei newsgroup Usenet e nelle mailing list.

  Risposte ad altre domande possono essere trovate alla pagina web del
  driver sonoro OSS.


  6.1.  Cosa sono i vari file dispositivo audio?


  Gran parte dei nomi dei dispositivi audio sono standard, ma in qualche
  distribuzione di Linux potrebbero avere nomi leggermente differenti.
     /dev/audio
        Normalmente un link a /dev/audio0

     /dev/audio0
        Dispositivo audio compatibile con le workstation Sun ( solo un
        implementazione parziale, non supporta l'interfaccia ioctl di
        Sun, solo la codifica u-law)

     /dev/audio1
        Secondo dispositivo audio (se supportato dalla scheda audio o se
        vi  pi di una scheda audio installata)

     /dev/dsp
        Normalmente un link /dev/dsp0

     /dev/dsp0
        Primo dispositivo di campionamento digitale

     /dev/dsp1
        Secondo dispositivo di campionamento digitale

     /dev/mixer
        Normalmente un link a /dev/mixer0

     /dev/mixer0
        Primo mixer audio

     /dev/mixer1
        Secondo mixer audio

     /dev/music
        Interfaccia ad alto livello del sequencer

     /dev/sequencer
        Accesso a basso livello di MIDI, FM e GUS

     /dev/sequencer2
        Normalmente un link a /dev/music

     /dev/midi00
        Prima porta raw MIDI

     /dev/midi01
        Seconda porta raw MIDI

     /dev/midi02
        Terza porta raw MIDI

     /dev/midi03
        Quarta porta raw MIDI

     /dev/sndstat
        Se letto riporta lo stato del driver sonoro (anche come
        /proc/sound)

  Il driver per l'altoparlante del PC fornisce i seguenti dispositivi:


     /dev/pcaudio
        Equivalente a /dev/audio

     /dev/pcsp
        Equivalente a /dev/dsp

     /dev/pcmixer
        Equivalente a /dev/mixer
  6.2.  Come posso riprodurre un file audio?


  I file (.au) delle workstation Sun possono essere riprodotti
  reindirizzandoli a /dev/audio . I file ``raw'' possono essere
  riprodotti reindirizzandoli su /dev/dsp.  preferibile usare comunque
  un programma tipo play, visto che riconosce la maggior parte di file e
  imposta la scheda sonora sulla giusta frequenza di campionamento, ecc.

  I programmi come wavplay o vplay (contenuti nel pacchetto snd-util)
  daranno i migliori risultati con i file WAV. Comunque sia essi non
  riconosceranno i file compressi Microsoft WAV ADPCM.  Inoltre le
  vecchie versioni di play (contenute nel pacchetto Lsox) non
  funzioneranno perfettamente con i file WAV a 16 bit.

  Il comando splay contenuto nel pacchetto snd-util pu essere usato per
  riprodurre la maggior parte dei file audio, se si impostano
  manualmente i giusti parametri nella riga di comando.


  6.3.  Come posso registrare un file audio?


  La lettura di /dev/audio o /dev/dsp produrr dei dati campionati che
  possono essere rediretti su un file. Un programma come vrec render
  pi agevole il controllo della frequenza di campionamento, della
  durata, ecc. Probabilmente si avr anche bisogno di un programma mixer
  per selezionare il dispositivo di input appropriato.


  6.4.  Posso avere pi di una scheda?


  Con l'attuale driver sonoro  possibile avere diverse schede
  SoundBlaster, SoundBlaster/Pro, SoundBlaster16, MPU-401 o MSS
  contemporaneamente nello stesso sistema. L'installazione di due
  SoundBlaster  possibile ma richiede la definizione delle macro
  SB2_BASE, SB2_IRQ, SB2_DMA e (in qualche caso) SB2_DMA2 tramite la
  modifica manuale di local.h.   anche possibile avere una SoundBlaster
  e una PAS16 allo stesso tempo.

  Con i nuovi kernel 2.0, che configurano il supporto per il suono
  usando make config, al posto di local.h, si avr bisogno di modificare
  il file /usr/include/linux/autoconf.h. Dopo la parte contenente le
  linee:



       #define SBC_BASE 0x220
       #define SBC_IRQ (5)
       #define SBC_DMA (1)
       #define SB_DMA2 (5)
       #define SB_MPU_BASE 0x0
       #define SB_MPU_IRQ (-1)




  si aggiungano queste linee (con i valori giusti per il proprio
  sistema):






  #define SB2_BASE 0x330
  #define SB2_IRQ (7)
  #define SB2_DMA (2)
  #define SB2_DMA2 (2)




  I seguenti driver non permettono installazioni multiple:


    GUS (limitazione del driver)

    MAD16 (limitazione dell'hardware)

    AudioTrix Pro (limitazione dell'hardware)

    CS4232 (limitazione dell'hardware)


  6.5.  Error: No such file or directory for sound devices



  Si devono creare i file dispositivo per il driver sonoro. Controllate
  la sezione sulla ``Creazione dei file dispositivo'' . Se ci sono,
  assicuratevi che abbiano il corretto ``minor'' e ``major number''
  (alcune vecchie distribuzioni di Linux sui CD-ROM non creano i file
  dispositivo corretti al momento dell'installazione).


  6.6.  Error: No such device for sound devices


  Non avete eseguito il boot di un kernel compilato con il supporto per
  il suono o la configurazione dell'indirizzo di I/O non corrisponde al
  vostro hardware. Controllate se avete usato il kernel giusto e
  verificate che l'impostazione dei parametri della vostra scheda,
  assegnati in fase di configurazione del driver sonoro, corrisponda
  esattamente all'impostazione della scheda stessa.


  6.7.  Error: No space left on device for sound devices


  Pu succedere se provate a registrare dati attraverso /dev/audio o
  /dev/dsp senza aver creato i necessari file dispositivo. Il
  dispositivo sonoro ora  un file normale, e ha riempito la vostra
  partizione. Dovete eseguire lo script documentato nella sezione
  ``Creazione dei file dispositivo'' in questo documento.

  Si pu incorrere in questo errore anche con Linux 2.0 e successivi se
  non vi  abbastanza RAM di sistema libera per aprire il dispositivo.
  Il driver audio richiede almeno due pagine (8k) di RAM fisica contigua
  per ogni canale DMA. Questo accade a volte nelle macchine con meno di
  16M di RAM o in quelle che sono rimaste accese per molto tempo.
  Potrebbe essere possibile liberare della memoria RAM compilando ed
  eseguendo il seguente programma C prima di provare a utilizzare il
  dispositivo audio di nuovo:







  main() {
    int i;
    char mem[500000];
    for (i = 0; i < 500000; i++)
      mem[i] = 0;
    exit(0);
  }





  6.8.  Error: Device busy for sound devices


  Il dispositivo audio pu essere aperto da un solo processo per volta.
  Molto probabilmente qualche altro processo sta usando il dispositivo
  in questione. Una maniera per esserne sicuri  quella di utilizzare il
  comando fuser:



       % fuser -v /dev/dsp
       /dev/dsp:             USER       PID ACCESS COMMAND
                             tranter    265 f....  tracker




  In questo esempio, il comando fuser ci mostra come il processo numero
  265 abbia aperto il dispositivo. Per accedere nuovamente al
  dispositivo audio si deve aspettare che il processo termini o si
  procede a un ``kill'' del processo stesso. Per vedere accessi al
  dispositivo fatti da altri utenti il comando fuser deve essere
  eseguito come utente root.

  In qualche sistema si dovr essere root per vedere con il comando
  fuser i processi degli altri utenti.


  6.9.  Mi d ancora l'errore di ``device busy''!


  In accordo con quello che dice Brian Gough, per le schede SoundBlaster
  che usano il canale DMA 1 vi  un potenziale conflitto con il driver
  dello streamer QIC-02, che usa il canale DMA 1, causando errori del
  tipo ``device busy''. Se si sta usando FTAPE probabilmente si 
  abilitato questo driver. Come dice il FTAPE-HOWTO il driver QIC-02 non
   essenziale per l'uso di FTAPE;  richiesto solo il driver QI-117.
  La riconfigurazione del kernel con l'inclusione del driver QI-117 e
  l'esclusione del driver QI-02 consente a FTAPE ed al driver sonoro di
  coesistere.


  6.10.  Playback parziale di un file sonoro digitale


  Il sintomo  normalmente che il file audio suona per circa un secondo
  e poi si blocca completamente oppure riporta un errore tipo: ``missing
  IRQ'' o ``DMA timeout''. Probabilmente avete delle impostazioni degli
  IRQ o DMA sbagliate.  Verificate che la configurazione del kernel
  corrisponda alle impostazioni dei jumper della vostra scheda e che gli
  stessi non siano in conflitto con qualche altra scheda installata nel
  sistema.


  Un altro sintomo  il file audio che provoca un loop. Questo 
  normalmente causato da un conflitto di IRQ.



  6.11.  Pause nella riproduzione di file MOD


  L'esecuzione dei file MOD richiede un grande impiego di CPU. O avete
  troppi processi attivi o il vostro computer  troppo lento per
  l'esecuzione in ``real time''. Avete alcune possibilit:


    Provate ad eseguire il file con una minore frequenza di
     campionamento o in modalit ``mono''

    Eliminate altri processi attivi

    Compratevi un computer pi veloce

    Comprate una scheda sonora pi potente (ad es. Gravis UltraSound)

  Se avete una scheda Gravis UltraSound, dovete usare uno dei programmi
  per eseguire i file mod scritti specificatamente per la GUS (ad es.
  gmod).


  6.12.  Errori di compilazione quando compilo applicazioni sonore


  La versione 1.0c e precedenti del driver sonoro usavano uno schema
  diverso e incompatibile dell'ioctl() . Si ottenga il nuovo codice o si
  effettuino i necessari cambiamenti per adattarlo al nuovo driver
  sonoro.  Controllate il file Readme del driver sonoro per i dettagli.

  Controllate comunque di usare l'ultima versione di soundcard.h e di
  ultrasound.h quando compilate l'applicazione. Guardate le istruzioni
  per l'installazione all'inizio di questo testo.


  6.13.  SEGV quando eseguo applicazioni audio che prima funzionavano


  Questo  probabilmente lo stesso problema affrontato nella domanda
  precedente.


  6.14.  Quali sono i bug e le limitazioni del driver sonoro?


  Si controllino i file inclusi con i sorgenti del driver sonoro del
  kernel.


  6.15.  Dove sono documentati gli ioctls() ecc. del driver sonoro?


  Attualmente la migliore documentazione che non sia il codice sorgente
   disponibile sul sito web della 4Front Technologies,
  <http://www.opensound.com>.  Un'altra fonte di informazioni  la Linux
  Multimedia Guide, di cui si parla nella sezione ``Riferimenti''.





  6.16.  Quanto deve essere potente la CPU per riprodurre o registrare
  senza pause?


  Non vi  una facile risposta a questa domanda, poich dipende da:


    uso di campioni PCM o sintesi FM

    frequenza di campionamento e dimensioni del campione

    quale applicazione di usa per riprodurre o registrare

    hardware della scheda audio

    velocit di I/O del disco, clock della CPU, dimensione della cache
     ecc.

  In generale ogni 386 dovrebbe essere in grado di riprodurre con
  facilit campioni o musica sintetizzata tramite FM con una scheda
  audio a 8 bit.

  La riproduzione dei file MOD, per, richiede un considerevole impiego
  di CPU.  Test sperimentali hanno mostrato che riprodurre a 44KHz
  richiede pi del 40% della potenza di un 486/50 e che un 386/25
  difficilmente pu andare pi in l dei 22KHz (il tutto con una scheda
  audio a 8 bit come la SoundBlaster). Una scheda come la Gravis
  Ultrasound dispone di maggiori funzioni nel suo hardware ed impiegher
  meno tempo di CPU.

  Queste affermazioni sottointendono che il computer non stia eseguendo
  nessun altro programma che richieda un forte uso della CPU.

  La conversione di file audio o l'aggiunta di effetti usando un
  programma di utilit come sox  molto pi veloce se si dispone di un
  coprocessore matematico (o di una CPU con FPU on board). Comunque il
  driver del kernel non esegue nessun calcolo in virgola mobile.


  6.17.  Problemi con la PAS16 e un adattatore SCSI Adaptec 1542


  (La spiegazione seguente  stata fornita da seeker@indirect.com)

  Linux riconosce il 1542 all'indirizzo 330 (predefinito) o 334, e la
  PAS permette l'emulazione MPU-401 solo a 330. Anche se si disabilita
  MPU-401 via software, c' ancora qualcosa che entra in conflitto con
  il 1542 se esso usa il suo indirizzo preferenziale. Spostare il 1542
  su 334 rende tutti felici.


  In aggiunta, sia la 1542 che la PAS-16 usano un DMA a 16-bit, cosicch
  se campionate a 16-bit 44KHz stereo e salvate il file su un drive SCSI
  attaccato alla 1542, preparatevi a incontrare problemi. I DMA si
  sovrappongono e non c' il tempo sufficiente per un ``refresh'' della
  RAM, e vi trovate un bel messaggio ``PARITY ERROR - SYSTEM HALTED'',
  senza rendervi conto di quale sia stata la causa. Ancora peggio alcuni
  rivenditori di terze parti raccomandano, con i tape drives QIC-117, di
  impostare i tempi on/off del bus come il 1542 anche se sono pi lunghi
  del normale. Procuratevi il programma SCSISEL.EXE dalla BBS della
  Adaptec o da qualche altro sito di Internet, abbassate il ``time'' BUS
  ON o incrementate il BUS OFF finch il problema scompare, poi
  muovetelo di una tacca o pi in avanti. Lo SCSISEL cambia le
  impostazioni della EEPROM, cos la modifica diventa permanente e non
  avete bisogno di aggiungere una riga nel CONFIG.SYS del DOS, e potete
  avviare direttamente Linux ignorando i driver del DOS. Prossimo
  problema: risolto!


  Ultimo problema - i vecchi chipset Symphony riducevano drasticamente i
  cicli di I/O per velocizzare i tempi di accesso al bus. Nessuna delle
  varie schede che ho usato hanno dato problemi con il timing ridotto a
  eccezione della PAS16. La BBS della Media Vision propone il programma
  SYMPFIX.EXE che, si suppone, risolva il problema attivando il bit di
  diagnostica nel controller del bus della Symphony, ma non  garantito
  totalmente. Avete bisogno di:


    Contattare il distributore della scheda madre per sostituire la
     vecchia versione del chip del bus

    Cambiare la scheda madre

    Comprare un altro tipo di scheda sonora


  Young Microsystem propone un aggiornamento della scheda che importa
  per circa $30 (USA); altri produttori dovrebbero comportarsi allo
  stesso modo se riuscite a dimostrare chi altro importa la motherboard
  (buona fortuna!). Il problema  nel chip dell'interfaccia per il bus
  ProAudio, per molto pi lontano di quanta non sia la mia ansia;
  nessuno compra una scheda sonora da $120 e la piazza su un bus AT a
  6MHz. La maggior parte si avvale di un computer a 25/40Mhz tipo
  386/486, e dovrebbe riuscire ad ottenere perlomeno 12MHz di velocit
  del bus se i chip sono progettati correttamente. Uscita dal pulpito
  (scala sinistra).


  Il primo problema dipende dal chipset usato sulla vostra scheda madre,
  dalla velocit del bus e da altre impostazioni del BIOS, e dalle fasi
  della luna.  Il secondo problema dipende dalle opzioni di ``refresh''
  (nascoste o sincronizzate), dalla velocit del canale DMA del 1542 e
  (forse) dalla velocit di accesso I/O al bus. Il terzo lo si determina
  chiamando la Media Vision e chiedendo quale tipo di chip Symphony 
  incompatibile con il suo design lento. Fate attenzione: 3 su 4 dei
  tecnici con cui mi hanno fatto parlare erano degli idioti.  Dovevo
  diffidare di qualsiasi cosa mi dicessero su altro hardware, visto che
  non conoscevano molto bene neanche il loro.



  6.18.   possibile registrare e riprodurre simultaneamente?


  I driver di qualche scheda audio supportano la modalit full duplex.
  Si faccia riferimento alla documentazione della 4Front Technologies
  per informazioni su come utilizzare questa particolarit.


  6.19.  La mia SB16  impostata su IRQ 2, ma configure non permette di
  scegliere questo valore di IRQ.


  Sui 286 e successivi l'IRQ 2  collegato in cascata al secondo
  controller di interrupt.  equivalente all'IRQ 9.


  6.20.  Sono supportate la SoundBlaster AWE32 o la SoundBlaster16 ASP?


  Nel passato la Creative Labs non voleva rendere pubbliche le
  informazioni di programmazione di queste schede. Adesso hanno cambiato
  opinione e un driver per AWE  oggi incluso nei kernel Linux 2.1.x.


  6.21.  Se sto usando Linux, e faccio un reboot con DOS, mi d errori
  e/o le applicazioni sonore non funzionano.


  Questo pu succedere dopo un ``soft-reboot'' al DOS. Alle volte il
  messaggio di errore fa riferimento, erroneamente, a un errore nel file
  CONFIG.SYS.

  La maggior parte delle attuali schede sonore hanno la possibilit di
  impostare IRQ e DMA via software. Se usate impostazioni differenti per
  Linux e per MS-DOS/Windows, potreste avere problemi. Alcune schede non
  accettano nuovi parametri senza un reset completo (ovvero, spegnere il
  computer o usare il pulsantino di reset).

  La soluzione pi semplice a questo problema consiste nell'effettuare
  un reboot completo tramite il pulsantino di reset o lo spegnimento
  della macchina anzich un ``soft reboot'' (ovvero Ctrl-Alt-Canc).

  La soluzione corretta consiste nell'impostare gli stessi IRQ e DMA sia
  con MS-DOS che con Linux (o non usare DOS :-)).


  6.22.  Problemi con DOOM sotto Linux


  Gli utilizzatori del porting del gioco della ID Software DOOM per
  Linux potrebbero essere interessati a queste notizie.

  Per un corretto risultato sonoro usate la versione 2.90 o successive
  del driver sonoro; ha il supporto per la nuova modalit in real-time
  DOOM Mode.

  I campioni sonori sono a 16-bit. Se avete una scheda audio a 8 bit
  potete comunque far funzionare il sonoro usando uno dei programmi
  disponibili su  <ftp://metalab.unc.edu/pub/Linux/games/doom>.

  Se DOOM risultasse lento sul vostro sistema, disabilitando il sonoro
  (basta rinominare il file sndserver) dovrebbero aumentare le
  prestazioni.

  La musica in DOOM non  attivata per predefinizione (come nella
  versione DOS). Il programma musserver aggiunge il supporto per la
  musica a DOOM per Linux.  reperibile a questo indirizzo:
  <ftp://pandora.st.hmc.edu/pub/linux/musserver.tgz>.


  6.23.  Come posso ridurre il rumore nella mia scheda audio?


  L'uso di cavi schermati di buona qualit e provare la scheda audio su
  slot differenti pu aiutare a ridurre il rumore. Se la scheda audio ha
  una regolazione per il volume si possono provare le differenti
  posizioni consentite (il massimo  probabilmente la scelta migliore).
  Si usi un programma mixer per assicurarsi che le entrate non volute
  (ad es. il microfono) siano poste a guadagno zero.

  Philipp Braunbeck dice di aver trovato sulla sua scheda audio ESS-1868
  un jumper che permetteva di escludere l'amplificatore della scheda
  stessa, che altrimenti produceva rumore.

  Su un sistema 386 ho scoperto che l'opzione di avvio del kernel no-hlt
  riduce il livello di rumore. Serve a dire al kernel di non usare
  l'istruzione halt mentre esegue il loop del processo idle. Potete
  provarla anche voi manualmente al boot o attraverso LILO usando il
  comando append="no-hlt" nel vostro file di configurazione di LILO.

  Qualche scheda audio semplicemente non  progettata con una buona
  schermatura e messa terra ed  quindi esposta a questo tipo di
  problemi.


  6.24.  Posso riprodurre suoni, ma non registrarli


  Se potete riprodurre suoni, ma non registrarli, provate a seguire
  questi passi:


    Usate un programma mixer per selezionare la sorgente appropriata
     (ad es. il microfono)

    Usate un programma mixer per impostare al massimo il livello di
     guadagno in input

    Se potete, provate a registrare da MS-DOS per determinare se si
     tratta di un problema hardware

  A volte i canali DMA usati per registrare e per riprodurre sono
  differenti. In questo caso la causa pi probabile del malfunzionamento
   che i canali DMA siano stati impostati in maniera errata.


  6.25.  La mia scheda audio ``compatibile'' funziona solo se prima la
  inizializzo da MS-DOS.


  In molti casi una scheda ``SoundBlaster compatibile'' funzioner
  meglio sotto Linux se configurata con un driver diverso da quello
  SoundBlaster.  Molte schede audio dicono di essere compatibili (ad es.
  ``compatibile SB Pro 16 bit'' o ``compatibile SB 16 bit'') ma
  normalmente la modalit SoundBlaster  solo un trucco per mantenere la
  compatibilit con i giochi di DOS. Molte schede hanno una modalit
  nativa a 16 bit che probabilmente sar supportata dalle recenti
  versioni di Linux (2.0.1 e successive).

  Solo con qualche scheda audio (normalmente abbastanza vecchia) 
  necessario provare a farla funzionare in modalit SoundBlaster. Le
  sole schede audio recenti che fanno eccezione a questa regola sono
  quelle basate su Mwave.


  6.26.  La mia scheda audio ``compatibile'' SoundBlaster 16 bit fun
  ziona solo in modalit 8 bit sotto Linux.


  Le schede audio a 16 bit definite SoundBlaster compatibili sono in
  effetti compatibili con la SoundBlaster Pro 8 bit. Normalmente hanno
  una modalit a 16 bit che non  compatibile con la SoundBlaster 16 e
  non  compatibile con il driver sonoro di Linux.

  Potreste riuscire a farle funzionare in modalit 16 bit usando il
  driver MAD16 o MSS/WSS.


  6.27.  Dove posso trovare applicazioni sonore per Linux?


  Ecco qua qualche buon archivio su cui andare a cercare applicazioni
  sonore specifiche per Linux:
    <ftp://metalab.unc.edu:/pub/Linux/kernel/sound/>

    <ftp://metalab.unc.edu:/pub/Linux/apps/sound/>

    <ftp://tsx-11.mit.edu:/pub/linux/packages/sound/>

    <ftp://nic.funet.fi:/pub/Linux/util/sound/>

    <ftp://nic.funet.fi:/pub/Linux/xtra/snd-kit/>

    <ftp://nic.funet.fi:/pub/Linux/ALPHA/sound/>

  Si veda anche la sezione ``Riferimenti'' di questo documento.


  6.28.  Il driver sonoro pu essere compilato come modulo caricabile?


  Con i kernel pi recenti il driver sonoro pu anche essere compilato e
  utilizzato nella forma di diversi moduli caricabili.

  Si dia un'occhiata al file /usr/src/linux/Documentation/sound, e
  specialmente al file Introduction e README.modules.


  6.29.  Posso usare la scheda audio per rimpiazzare il beep di console?


  Provate il programma oplbeep, che si trova su
  <ftp://metalab.unc.edu/pub/Linux/apps/sound/oplbeep-alpha.tar.gz>

  Altra variante  il programma beep su
  <ftp://metalab.unc.edu/pub/Linux/kernel/patches/misc/modreq_beep.tgz>

  Il pacchetto modutils contiene un programma di esempio e una patch per
  il kernel che consente di chiamare un programma esterno per generare
  suoni su richiesta del kernel.

  In alternativa con qualche scheda audio  possibile connettere
  l'output dello speaker del PC alla scheda audio in modo tale che tutti
  i suoni vengano dagli speaker della scheda audio.


  6.30.  Cos' VoxWare?


  La versione commerciale dei driver sonori commercializzati da 4Front
  Technologies era stata chiamata, in precedenza VoxWare, USS (Unix
  Sound System), e anche TASD (Temporarily Anonymous Sound Driver). 
  adesso venduta come OSS (Open Sound System). Alla versione presente
  nel kernel si fa spesso riferimento con il nome OSS/Free.

  Per maggiori informazioni si veda il sito web della 4Front
  Technologies   <http://www.opensound.com/>. Ho scritto un articolo su
  OSS/Linux nel numero di Giugno  1997 del Linux Journal.


  6.31.  Sox/Play/Vplay mi danno l'errore ``invalid block size 1024''


  Una modifica del driver sonoro effettuata nella versione 1.3.67 ha
  reso inutilizzabili alcuni programmi di riproduzione che (non
  correttamente) controllano che la chiamata al ioctl
  SNDCTL_DSP_GETBLKSIZE sia pi grande di 4096. Gli ultimi driver sonori
  sono stati corretti in modo da evitare allocazioni di frammenti pi
  piccoli di 4096 byte, per risolvere il problema con i programmi di
  utilit pi vecchi.


  6.32.  Le impostazioni del mixer vanno perse ogni volta che carico il
  modulo del driver sonoro


  Il driver sonoro pu essere compilato come modulo caricabile e si pu
  utilizzare kerneld per caricarlo e scaricarlo automaticamente.  Ci
  pu far sorgere un problema: ogni volta che si ricarica il modulo le
  impostazioni del mixer ritornano ai loro valori predefiniti.  Per
  qualche scheda audio questi possono essere troppo alti (ad es.
  SoundBlaster16) o troppo bassi. Una soluzione  stata trovata da
  Markus Gutschke (gutschk@uni-muenster.de): si inserisce una linea come
  la seguente nel proprio file /etc/conf.modules:



       options sound dma_buffsize=65536 && /usr/bin/setmixer igain 0 ogain 0 vol 75




  Questo fa in modo che il vostro programma mixer (in questo caso viene
  utilizzato setmixer) venga eseguito immediatamente dopo che il driver
  sonoro  stato caricato. Il parametro dma_buffersize  finto, serve
  solo perch il comando "options" richiede che venga impostata
  un'opzione. Si modifichi la linea come si desidera per utilizzare i
  propri programmi mixer e livelli di guadagno.

  Se il driver sonoro  stato compilato nel kernel e si vogliono
  impostare i guadagni dal mixer al momento dell'avvio del sistema,
  potete inserire una chiamata al programma mixer in un file di avvio
  del sistema, come  /etc/rc.d/rc.local.


  6.33.  Solo l'utente root pu effettuare registrazioni audio


  Per predefinizione lo script in Readme.linux che crea i file
  dispositivo sonori imposta i permessi di accesso a tali file in
  maniera tale da consentirne la lettura dall'utente root.  Questo per
  tappare un buco nella sicurezza del sistema.  In un sistema di
  computer in rete gli utenti esterni possono effettuare un login su un
  PC Linux con scheda audio e microfono e ascoltare ci che viene detto.
  Se ci non vi preoccupa potete tranquillamente cambiare i permessi di
  accesso ai file usati nello script.

  Con le impostazioni predefinite gli utenti possono comunque riprodurre
  file audio. Questo non costituisce un rischio per la sicurezza del
  sistema ma sono una fonte di potenziale disturbo.


  6.34.   supportato l'hardware audio presente nel ThinkPad dell'IBM?


  Le informazioni su come utilizzare la scheda audio mwave che si trova
  sui computer laptop ThinkPad di IBM sotto Linux possono essere trovate
  nel file /usr/src/linux/Documentation/sound/mwave, che fa parte della
  distribuzione del sorgente del kernel.






  6.35.  Le applicazioni si rifiutano di funzionare poich la mia scheda
  audio non ha un mixer


  Alcune vecchie schede SoundBlaster a 8 bit non avevano un circuito
  mixer. Vi sono delle applicazioni che insistono nel voler accedere al
  mixer, e non possono funzionare con questo tipo di schede. Jens Werner
  (werner@bert.emv.ing.tu-bs.de) ci suggerisce un rimedio: basta creare
  un link da /dev/mixer a /dev/null e tutto dovrebbe funzionare a
  puntino.


  6.36.  Problemi con una SB16 CT4170


  Da: Scott Manley (spm@star.arm.ac.uk):


       Sembra che un nuovo tipo di SoundBlaster sia in commercio --
       e ci venga venduta come una SB16 -- il numero di modello
       indicato sulla scheda  il CT4170. Queste schede hanno un
       solo canale DMA e quindi, dopo che le avrete configurate, il
       kernel avr grossi problemi nell'accedere al canale DMA 16
       bit.  La soluzione  impostare il secondo DMA a 1 in modo
       tale che la scheda si comporti come le altre.



  6.37.  Come collegare una tastiera MIDI a una scheda audio


  Da: Kim G. S. OEyhus (kim@pvv.ntnu.no):


       Ho cercato su Internet e nella documentazione che riguarda
       il supporto sonoro come fare una cosa semplice come connet
       tere l'output MIDI di una tastiera all'input MIDI di una
       scheda audio. Non ho trovato nulla. Il problema  che
       entrambe usano lo stesso dispositivo, /dev/midi, almeno se
       utilizzate il driver OSS. Ho trovato un modo di farlo, che
       vorrei condividere con voi. Quello che dico si applica a un
       sintetizzatore molto semplice, con completo supporto del
       MIDI:



       Collegare una master keyboard MIDI a una scheda audio via
       MIDI



       Una master keyboard MIDI  una tastiera senza alcun sinte
       tizzatore e con solo un connettore MIDI out. Questo pu
       essere collegato a una porta 15-pin D-SUB presente in molte
       schede audio con un opportuno cavo.



       Una simile tastiera pu essere utilizzata per controllare il
       sintetizzatore MIDI presente nella scheda audio, facendolo
       diventare un semplice sintetizzatore controllato da
       tastiera.




  Si compili il programma seguente, ad esempio con 'gcc -o
  prog prog.c' e lo si mandi in esecuzione:




       #include <fcntl.h>

       main()
       {
         int fil, a;
         char b[256];

         fil=open("/dev/midi", O_RDWR);
         for(;;)
           {
             a=read(fil, b, 256);
             write(fil, b, a);
           }
       }





  6.38.  Problemi con l'IRQ 15 ed Ensoniq PCI 128


  Da: Matthew Inger (mattinger@mindless.com):


       Come far funzionare una scheda Ensoniq PCI 128



       Il problema che si presentava era che la scheda cercava di
       utilizzare l'interrupt 15 come impostazione predefinita (a
       causa del Plug and Play).  Questo interrupt  utilizzato dal
       controller ide secondario e non pu essere condiviso da
       altri dispositivi. Si deve quindi forzare in qualche maniera
       il es1370 a usare un altro interrupt (ad esempio l'interrupt
       11 come avviene da Windows).



       Che ci crediate o no mi sono inventato da solo una
       soluzione.



       Ecco ci che dovete fare:



       a) nel BIOS dovrete dire al vostro computer che non avete un
       sistema operativo Plug and Play. Mi sembra che nel mio BIOS
       sia fra le opzioni avanzate.



       b) nelle impostazioni del bus PCI del BIOS, impostate il
       computer in maniera tale che riservi l'interrupt 15 per i
       vecchi dispositivi ISA.  Nel mio bios, fra le opzioni avan
       zate, vi  una sezione dedicata alle impostazioni PCI. In
       questa sezione vi  una parte chiamata Resource Exclusion, 
       qui che dovete agire.
       Quando farete il reboot di Linux potrete utilizzare la
       scheda sonora (non mi ricordo se appare nei messaggi di boot
       come accadeva prima oppure no). Per essere del tutto sicuri,
       ho rieseguito sndconfig per far uscire il messaggio di test,
       che in effetti non si sentiva granch, ma comunque si sen
       tiva.  Invece l'output di un CD audio si sente perfetta
       mente.



       Non preoccupatevi di Windows, ho provato le mie due schede:
       modem ISA e scheda audio e funzionavano senza problemi.



       Il problema potrebbe essere che il vostro BIOS sar differ
       ente dal mio ma dovete solo immaginarvi dove poter trovare
       le due impostazioni di cui ho parlato prima. Buona fortuna.



  6.39.  Dove posso trovare delle patch MIDI gratuite per Soft OSS


  Soft OSS  un sintetizzatore wavetable via software incluso nel driver
  sonoro del kernel, compatibile con la scheda Gravis Ultrasound. Per
  far funzionare il driver vi serviranno dei file patch MIDI compatibili
  con la GUS. La documentazione le chiama ``public domain MIDIA patchset
  available from several ftp sites''.

  Come spiegato sul sito web della 4Front Technologies
  <http://www.opensound.com/softoss.html> possono essere scaricate da
  <ftp://archive.cs.umbc.edu/pub/midia/instruments.tar.gz>.






  7.  Riferimenti


  Se avete una scheda audio che supporta un'interfaccia CDROM o SCSI, il
  Linux SCSI HOWTO e il Linux CD-ROM HOWTO contengono altre informazioni
  che potrebbero esservi utili.

  Il Sound Playing HOWTO descrive come eseguire differenti tipi di file
  audio e musicali sotto Linux.


  Il Linux SoundBlaster AWE32/64 Mini-HOWTO descrive come far funzionare
  una scheda audio SoundBlaster 32 o 64 sotto Linux.

  Informazioni sulla programmazione possono essere trovate sul sito web
  della 4Front Technologies  <http://www.opensound.com/pguide>.

  Le seguenti FAQ sono spedite regolarmente sul newsgroup Usenet
  news.announce e archiviate su
  <ftp://rtfm.mit.edu/pub/usenet/news.answers>:


    PCsoundcards/generic-faq (FAQ generali su PC con scheda audio)

    PCsoundcards/soundcard-faq (FAQ di comp.sys.ibm.pc.soundcard)


    PCsoundcards/gravis-ultrasound/faq (FAQ di Gravis UltraSound)

    audio-fmts/part1 (Descrizione del formato del file audio)

    audio-fmts/part2 (Descrizione del formato del file audio)

  Le FAQ contengono anche dei riferimenti a mailing list e siti che
  trattano di prodotti specifici. Nei seguenti newsgroup Usenet si parla
  dei problemi riguardanti il suono e/o la musica:


    alt.binaries.sounds.* (vari gruppi su cui postare file audio)

    alt.binaries.multimedia (per postare file multimediali)

    alt.sb.programmer (Sulla programmazione della SoundBlaster)

    comp.multimedia (Riguardante la multimedialit)

    comp.music (Teoria e ricerca sulla musica generata da computer)

    comp.sys.ibm.pc.soundcard.* (vari gruppi su schede audio per PC
     IBM)

  Si pu trovare un sito Web dedicato alla multimedialit su
  <http://viswiz.gmd.de/MultimediaInfo/>.  Altro buon sito per il MIDI
  per Linux e le applicazioni per l'audio 
  <http://sound.condorow.net/>. La Creative Labs ha un sito Web
  all'indirizzo  <http://www.creaf.com/>. MediaTrix ha un sito Web
  all'indirizzo  <http://www.mediatrix.com/>.

  Le mailing list su Linux contengono un certo numero di ``canali''
  dedicati a diversi argomenti, incluso l'aspetto sonoro. Per sapere
  come entrare a farne parte, inviate un messaggio con la parola
  ``help'' come corpo del messaggio a majordomo@vger.rutgers.edu. Queste
  mailing list non sono quelle adatte per domande sulla configurazione
  della scheda audio e cos via, sono state create per discussioni
  legate allo sviluppo.

  Come detto pi volte, il driver sonoro del kernel contiene vari file
  Readme con delle utili informazioni sul driver della scheda audio.
  Normalmente sono nella directory /usr/src/linux/drivers/sound.

  Altre informazioni su OSS, il driver sonoro commerciale per Linux e
  altri sistemi operativi Unix compatibili, le si pu trovare sul sito
  Web di 4Front Technologies,  <http://www.opensound.com/>.

  La Linux Software Map (LSM)  un riferimento insostituibile per
  trovare del software per Linux. La ricerca della LSM per parola chiave
  sound  una buon metodo per identificare applicazioni relative
  all'hardware sonoro. La LSM pu essere trovata su vari siti anonimi di
  FTP, incluso  <ftp://metalab.unc.edu/pub/Linux/docs/LSM/>.  Vi sono
  anche diversi siti web che hanno una database delle applicazioni per
  Linux. Uno di questi   <http://www.freshmeat.net>.

  Il Linux Documentation Project ha prodotto diversi libri su Linux,
  incluso Linux Installation and Getting Started. Questi sono
  disponibili liberamente su FTP anonimo nei pi grandi archivi di Linux
  o possono essere comprati gi stampati.

  Infine, un messaggino senza vergogna: se volete imparare molto di pi
  sulla multimedialit sotto Linux (specialmente su quanto concerne la
  programmazione e le applicazioni per CD-ROM e scheda audio) date
  un'occhiata al mio libro Linux Multimedia Guide, ISBN 1-56592-219-0,
  edito da O'Reilly and Associates.   disponibile la versione inglese e
  le traduzioni in francese e giapponese sono in fase di stampa. Per
  avere altri dettagli chiamate 800-998-9938 nel Nord America o date
  un'occhiata alla pagina Web su
  <http://www.ora.com/catalog/multilinux/noframes.html> o alla mia
  pagina <http://www.pobox.com/~tranter>.






























































  The Linux Sound Playing HOWTO
  Yoo C. Chung, wacko@laplace.snu.ac.kr
  v1.6, 11 Agosto 1998

  Questo documento contiene una panoramica sulle applicazioni per Linux
  che servono a riprodurre i vari formati audio. La traduzione italiana
   di Marco Meloni (tonno@stud.unipg.it) .


  1.  Introduzione

  Questo  il Sound Playing HOWTO. Qui si parla dei vari formati audio e
  delle applicazioni che possono essere usate per riprodurli.  Contiene
  altres qualche trucco e qualche consiglio sull'uso di queste
  applicazioni. Vi sono anche altre interessanti applicazioni connesse
  al suono che non riguardano direttamente la riproduzione dei file
  audio. Comunque questo documento non descrive come configurare Linux
  per far funzionare l'audio. Si consulti il Linux Sound HOWTO di Jeff
  Tranter per avere istruzioni su come configurare un sistema Linux per
  il corretto funzionamento dell'audio e per l'hardware sonoro
  supportato.

  Qui si tratta di normali applicazioni sonore per l'utente.  Quindi si
  parla solo di ci che l'utente medio ha bisogno di sapere dal punto di
  vista delle applicazioni sonore, non si parla di roba esotica come
  sintesi del parlato o di roba hardware che  oggetto del Sound HOWTO.




  1.1.  Copyright di questo documento

  (La nota sul copyright di questo documento  lasciata in lingua
  originale, visto che la traduzione non ha valore legale. Stringendo:
  questo documento si pu distribuire e modificare se la nota di
  copyright rimane inalterata. Non pu essere sottoposto ad altre
  restrizioni e un documento modificato deve avere la stessa licenza
  dell'originale. Le fonti devono essere sempre citate. ndt)

  This document can be freely distributed and modified (I would
  appreciate it if I were notified of any modifications), as long as
  this copyright notice is preserved.  However, it cannot be placed
  under any further restrictions, and a modified document must have the
  same copyright as this one.  Also, credit must be given where due.



  1.2.  Copyright delle applicazioni menzionate

  (Quando non specificato altrimenti, l'applicazione  distribuita sotto
  la General Public License GNU).

  If there is no mention of any copyright, then the application is under
  the GNU General Public License.




  1.3.  Dove prendere questo documento

  Le versioni ufficiali pi recenti di questo documento possono essere
  ottenute dal Linux Documentation Project
  <http://sunsite.unc.edu/LDP/>.  Le versioni non ufficiali pi recenti
  di questo documento possono essere ottenute da
  <http://laplace.snu.ac.kr/~wacko/howto/>.

  Una versione coreana di questo documento (molto obsoleta) 
  disponibile su  <http://laplace.snu.ac.kr/~wacko/howto/Sound-Playing-
  HOWTO.ks>.

  Una versione giapponese di questo documento  disponibile su
  <http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/euc/Sound-Playing-HOWTO.euc>.




  1.4.  Feedback

  Non sono onnisciente e non uso tutte le applicazione di cui parlo
  (qualcuna non posso nemmeno provarla), quindi  giocoforza che vi
  siano degli errori. Oltretutto i programmi si evolvono continuamente,
  quindi la documentazione tende a divenire obsoleta. Perci se trovate
  qualcosa di scorretto, inviatemi le correzioni. Anche suggerimenti e
  contributi per questo documento sono benvenuti.



  1.5.  Ringraziamenti

  Tutti gli autori delle applicazioni in questo HOWTO. Poi anche Hannu
  Savolainen per il suo bel driver sonoro e Linus Torvalds per il bel SO
  che vi sta sotto.

  Vorrei anche ringraziare Raymond Nijssen (raymond@es.ele.tue.nl),
  Jeroen Rutten (jeroen@es.ele.tue.nl), Antonio Perez
  (aperez@arrakis.es), Ian Jackson (ijackson@gnu.org), e Peter Amstutz
  (amstpi@freenet.tlh.fl.us) per le loro informazioni ed il loro aiuto.




  2.  Riprodurre Diversi Formati Audio

  Vi sono diversi tipi di formati audio (WAV, MIDI, MPEG ecc.).  Di
  seguito riportiamo i vari formati e le applicazioni che possono essere
  utilizzate per riprodurli.



  2.1.  MIDI

  MIDI sta per Musical Instrument Device Interface (interfaccia per
  strumenti musicali, ndt)  I file MIDI normalmente hanno l'estensione
  .mid. Questi contengono informazioni di sequencing, sarebbe a dire,
  informazioni su quando suonare quale strumento in quale maniera, ecc.
  A seconda del vostro hardware (e forse anche del software che usate
  per riprodurli), il suono potrebbe essere piacevole o inudibile.



  2.1.1.  adagio

  Questo pacchetto include mp (un riproduttore di file MIDI utilizzabile
  da linea di comando) e xmp (un riproduttore di file MIDI basato su
  XView, da non confondere con il riproduttore di moduli xmp).  Avrete
  bisogno delle estensioni SlingShot per utilizzare xmp. Vi sono anche
  altri programmi per eseguire gli spartiti di Adagio.



  Se avete una GUS mp pu anche riprodurre file MOD guardate la sezione
  ``Moduli'' per maggiori informazioni sui moduli).
  Un piccolo fastidioso bug (come nella versione 0.5 su qualche
  hardware)  che il suono si interrompe verso la fine. In pratica,
  invece di terminare la riproduzione nel modo previsto dal file MIDI,
  eseguendo la penultima nota su un lungo intervallo. Ci non mi ha
  fatto desistere dall'utilizzare mp, ma potrebbe convincere altri a non
  usarlo per un lavoro `reale'. Inoltre parte in maniera relativamente
  lenta.

  Il pacchetto non menziona copyright (almeno, nessuno che io abbia
  trovato), quindi ritengo sia liberamente ridistribuibile e
  modificabile. (Da una interpretazione alla lettera della legge sul
  copyright si desume che niente vi d il diritto di fare queste cose,
  ma ho qualche dubbio che questa fosse l'intenzione dell'autore).

   un porting del CMU MIDI Toolkit su Linux (adesso ce n' abbastanza
  da discutere) effettuato da Greg Lee (lee@uhunix.uhcc.hawaii.edu).

  Lo potete trovare su
  <ftp://tsx-11.mit.edu/pub/linux/packages/sound/adagio05.tar.gz>.  I
  binari acclusi sono in formato a.out (linkati con antiche librerie),
  ed il binario xmp d "segmentation fault" in ambiente  X11R6 (XFree86
  3.1.1, libc 4.7.2).  Il binario mp non d problemi in un ambiente
  a.out.


  Avrete bisogno di un po' di aggiustamenti per compilarlo.  In effetti
  non molti. Tutto quello che dovete fare  includere lo switch -lfl
  alla fine di SHROBJ e XMPOBJ nel Makefile. Questo per linkare la
  libreria flex, che altrimenti non verrebbe linkata. Quindi seguite le
  istruzioni di installazione. E non dimenticatevi che dovete avere le
  XView con le estensioni SlingShot se volete compilare xmp.


  2.1.2.  TiMidity

  Qualcuno raccomanda questo programma sperimentale per via della buona
  qualit del suono che produce (cosa molto vera,  molto meglio di mp
  su una Sound Blaster 16, anche se probabilmente non  molto differente
  su schede audio con sintesi tramite wavetable come la GUS). Comunque 
  un programma affetto da un alto utilizzo della CPU. Riproduce i file
  MIDI convertendoli a WAV e quindi riproducendo il file WAV risultante
  (potete effettuare la conversione da MIDI a WAV anche senza
  riprodurli, se volete). Questa  la causa del forte utilizzo della
  CPU.

  Ha anche delle interfacce opzionali, ncurses, SLang, Tcl/Tk o Motif.

  Avrete bisogno dei file patch della Gravis Ultrasound per usarlo.
  Date un'occhiata alle FAQ incluse nella distribuzione di Timidity per
  maggiori informazioni.


  L'autore  Tuukka Toivonen (tt@cgs.fi).

  L'ultima versione di Timidity pu essere trovata su TiMidity home page
  <http://www.cgs.fi/~tt/timidity/>. Questa pagina contiene anche un
  collegamento ad una piccola libreria di patch GUS.


  2.1.3.  playmidi

  Questo  un player MIDI che riproduce su FM, GUS e su un dispositivo
  MIDI esterno. Dovrebbe partire prima degli altri player MIDI. Pu
  anche riprodurre i Creative Music File, i file Microsoft RIFF e i
  grandi archivi MIDI dei giochi come Ultima 7.

  Dispone di un'interfaccia X ed una SVGA. Ha anche un'opzione per la
  riproduzione in realtime con la visualizzazione di tutte le note su
  ogni canale e del tempo di playback (attivata automaticamente con
  xplaymidi e splaymidi).

  Dovrete fare qualcosa tipo:





       $ splaymidi foo.mid; stty sane






  se volete usare l'interfaccia SVGA, poich essa non ripristina
  correttamente il modo testo del terminale.  L'interfaccia SVGA
  potrebbe essere rimossa in un prossimo futuro.


   stato scritto da Nathan Laredo (laredo@gnu.org o
  laredo@ix.netcom.com).

  Lo si pu trovare su
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/playmidi-2.3.tar.gz>.




  2.2.  Moduli

  I moduli (nella computer music) sono dei file di musica digitale,
  composti di un insieme di campioni e di informazioni di sequencing,
  che dicono al programma di riproduzione quando suonare quale campione
  (strumento) su quale traccia a quale altezza, e opzionalmente se
  applicarvi un effetto, tipo il vibrato, ad esempio.

  Un vantaggio dei moduli sui file MIDI  quello di poter includere
  praticamente ogni tipo di suono (incluse voci umane). Un altro  che
  il suono prodotto non varia su diverse piattaforme, poich i campioni
  sono nel modulo. Uno svantaggio  quello che la grandezza dei file 
  molto superiore a quella dei file MIDI. Un altro  che in effetti non
  esiste un formato standard (l'unico `vero'  quello di ProTracker, con
  il quale molti moduli sono incompatibili).  Sono nati su Amiga.

  Il formato pi comune ha l'estensione .mod. Vi sono molte altre
  estensioni a seconda del formato usato.


  2.2.1.  tracker

  Questa applicazione molto portabile (ne  stato effettuato il porting
  su molte piattaforme) riproduce i moduli musicali di Soundtracker e
  ProTracker. L'output  stereo a 16 bit e credo sia di qualit molto
  buona. Il carico di CPU si pu ridurre in maniera semplice con
  l'opzione -mono.

  Il programma  "giftware" (per citare l'autore). L'autore  Marc Espie
  (Marc.Espie@ens.fr).

  Una versione di questo programma contenente un Makefile gi
  ottimizzato per Linux pu essere trovata su
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tracker-4.3-linux.tar.gz>.
  2.2.2.  gmod

  Questo  un riproduttore di moduli musicali per la scheda Gravis
  Ultrasound. I formati supportati sono MOD a 4/6/8 canali, 669 a 8
  canali, MultiTracker (MTM), UltraTracker (ULT), FastTracker (XM) e
  ScreamTracker III (S3M).

  Richiede la versione 3.0 o seguenti del driver sonoro. E una GUS,
  ovviamente. Probabilmente avrete bisogno di modificare il kernel per
  far funzionare a dovere il controllo del volume.

  Ha anche una interfaccia per X. Utilizza il toolkit QT (versione 0.99
  o successive).  Si dia un'occhiata su QT toolkit homepage
  <http://www.troll.no/> per informazioni riguardanti QT.

  Pu essere distribuito liberamente.  stato scritto originariamente da
  Hannu Savolainen ed adesso il suo sviluppo viene curato da Andrew J.
  Robinson (robinson@cnj.digex.net).

  Lo si pu trovare su
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/gmod-3.1.tar.gz>.



  2.2.3.  MikMod

  Questo riproduttore di moduli portabile accetta i formati XM, ULT,
  STM, S3M, MTM, MOD e UNI.  (Il formato UNI  nella versione interna di
  MikMod.) Supporta i file moduli compressi.  Si utilizzi l'opzione -m
  come semplice via per ridurre il carico di CPU.

  Le versioni UNIX possono usare sia l'interfaccia ncurses che Tcl/Tk.
  Pu anche essere usato come libreria, oltre che come programma
  indipendente.

   stato scritto in origine da Jean-Paul Mikkers (mikmak@via.nl).  
  adesso curato da Jake Stine (dracoirs@epix.net).   un programma
  shareware che occorre registrare per uso commerciale. La distribuzione
  commerciale richiede una licenza (la ridistribuzione non commerciale
  non richiede questa licenza).

  Lo si pu trovare su MikMod home page
  <http://www.freenet.tlh.fl.us/~amstpi/mikmod.html>.



  2.2.4.  xmp

   un riproduttore di moduli (da non confondere col xmp di Adagio) che
  esegue moduli MOD, S3M, MTM, PTM, PTR, STM, 669, e XM (vi sono anche
  altri formati supportati in via sperimentale o incompleta). Se avete
  una scheda audio con la capacit di effettuare la sintetizzazione
  tramite wavetable (GUS o SoundBlaster 32AWE), potete utilizzare questa
  funzionalit della scheda per ridurre il carico di CPU. Supporta anche
  moduli compressi.

   disponibile anche una interfaccia di xmp per X.

   stato scritto da Claudio Matsuoka (claudio@pos.inf.ufpr.br) e
  Hipolito Carraro Jr.

  Pu essere trovato su xmp home page <http://xmp.home.ml.org/>.




  2.2.5.  s3mod

  Riproduce moduli MOD a 4/6/8 tracce ed i moduli di Scream Tracker 3.
  L'output predefinito  8 bit mono con campionamento a 22000 Hz.  Si
  pu utilizzare l'opzione -s per abilitare la modalit stereo, -b per
  l'output a 16 bit e -f per impostare la frequenza di campionamento.
  L'output audio  comunque di qualit minore rispetto a quello di
  tracker (un po' di rumore), perci consiglio di usare tracker al posto
  di s3mod per riprodurre i normali file MOD (a meno che non abbiate una
  macchina poco potente). Il carico di CPU  molto inferiore a quello
  generato da tracker.

   copyright di Daniel Marks e David Jeske (jeske@uiuc.edu), ma potete
  farci tutto quello che volete (tranne che raccontare di averlo
  scritto).

  Lo potete trovare su
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/s3mod-
  v1.09.tar.gz>.



  2.2.6.  mod

  Questa versione beta del programma riproduce moduli MOD (15-31
  strumenti, fino a 32 voci), MTM, ULT e S3M attraverso la scheda Gravis
  Ultrasound. Accetta anche moduli compressi se disponete di gzip,
  lharc, unzip, e unarj.  Non riproduce moduli Powerpacked o moduli
  impaccati con qualche composer per Amiga (quelli con la signature
  "PACK").

  Richiede la versione 3.0 o successive del driver sonoro.  Non
  funzioner con la versione 2.90-2 o precedenti del driver sonoro.
  L'interfaccia testuale richiede ncurses.   inclusa anche
  un'interfaccia per X, che utilizza Tcl/Tk.   stato scritto da Mikael
  Nordqvist (mech@df.lth.se o d91mn@efd.lth.se).

  Lo si pu trovare su
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/mod-v0.81.tgz>.



  2.2.7.  nspmod

  Questo  un riproduttore di moduli in versione alfa che esegue moduli
  MTM, S3M e MOD.  stato creato per essere un riproduttore di moduli
  per schede audio senza DSP (da non confondere con quello che Creative
  Labs chiama DSP).  Il carico di CPU  all'incirca simile a quello
  generato da tracker.



  Ha la funzionalit che permette di eseguire i moduli ripetutamente, se
  si vuole. Il numero delle ripetizioni pu essere limitato dall'opzione
  -l. L'output  a 8 bit (almeno quello della versione 0.1).

   stato scritto da Toru Egashira (toru@jms.jeton.or.jp).

  Lo si pu trovare su
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/nspmod-0.1.tar.gz>.






  2.2.8.  yampmod

  Questo programma in versione alfa  stato progettato per riprodurre
  moduli a 4 canali con un minimo carico di CPU. Non  stato concepito
  per produrre un suono di alta qualit. Quindi l'unico output sonoro
  che produce  quello mono a 22 KHz.  Oltretutto l'output sonoro non 
  cos pulito come potrebbe essere, cosa che riflette il fatto che si
  trova ancora in versione alfa.

   stato scritto da David Groves (djg@djghome.demon.co.uk).

  Lo si pu trovare su
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/yampmod-0.1.tar.gz>.




  2.3.  Stream audio MPEG

  MPEG  uno standard che specifica le codifiche video e audio per la
  memorizzazione digitale. Usualmente MPEG viene associato al video, ma
  la parte audio dello standard pu essere utilizzata separatamente. La
  parte audio dello standard MPEG definisce tre layer (strati, livelli
  ndt), il layer I, II e III. I riproduttori che decodificano i layer
  pi alti possono decodificare anche i layer inferiori (ad es. i
  riproduttori di file layer III possono riprodurre anche file di layer
  II). I file audio MPEG layer I normalmente hanno l'estensione .mpg
  (perci se vi  un file con questa estensione che un riproduttore MPEG
  video non riesce a visualizzare, probabilmente si tratta di uno stream
  audio), i layer II hanno l'estensione .mp2 e i layer III .mp3.  La
  compressione audio  decisamente buona. Un file audio MPEG layer II da
  due megabyte occuperebbe, in codifica PCM semplice, fino a 25 megabyte
  per mantenere la stessa qualit.


  2.3.1.  mpg123

  Questo programma in versione beta  un efficiente riproduttore di
  strem audio MPEG, che include il supporto per i layer I, II e III. 
  basato su codice attinto da pi fonti.   capace di eseguire in tempo
  reale i flussi di dati audio direttamente da HTTP ( possibile
  eseguire uno stream audio MPEG direttamente sul World Wide Web).

  L'autore principale  Michael Hipp (Michael.Hipp@student.uni-
  tuebingen.de). Il programma pu essere usato e distribuito liberamente
  in forma non modificata per usi non commerciali. La sua inclusione in
  una raccolta di software free (come pu essere un'immagine su CD-ROM
  di un server FTP)  esplicitamente permessa.

  L'ultima versione pu essere prelevata da mpg123 homepage
  <http://mpg.123.org/>.



  2.3.2.  maplay 1.2

  Questo riproduttore di strem audio MPEG supporta solo gli stream layer
  I e layer II, mentre manca il supporto per gli stream layer III.
  Supporta le schede audio a 16 bit su Linux.

  Usa fortemente la CPU, occupandone circa il 55% su un Pentium 60MHz.
  L'output  intollerabile su un 486 a 66MHz a causa della scarsa
  potenza del processore. Se a voi succede cos, provate a riprodurre
  solo una parte dello stream audio (con l'opzione -l o -r), al posto
  della riproduzione in stereo predefinita.

  Una piccola modifica in uno dei file potrebbe essere necessaria per
  effettuarne la compilazione. Effettivamente, potreste aver bisogno di
  aggiungere la seguente linea all'inizio del file configuration.sh.





       #! /bin/sh






  L'autore  Tobias Bading (bading@cs.tu-berlin.de).  maplay 1.2 pu
  essere prelevato da  <ftp://ftp.cs.tu-
  berlin.de/pub/misc/maplay1.2/maplay1_2.tar>.



  2.3.3.  maplay 1.3b

  Questa  una modifica non ufficiale (non fatta dall'autore originale)
  a maplay 1.2, che lo fa girare con un carico di CPU molto minore.
  Questo grazie ad aver reso funzionante l'output in u-law su altre
  piattaforme oltre alla SPARC. Si noti che l'output u-law  quello
  predefinito, quindi la qualit dell'audio  minore.

  Le modifiche sono state fatte da Orlando Andico
  (orly@gibson.eee.upd.edu.ph).

  Lo si pu prelevare da
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay-1.3b-
  Linux.tar.gz>.



  2.3.4.  maplay3

  Un altro derivato di  maplay 1.2. Gli aggiunge il supporto per gli
  stream audio MPEG layer III. Per adesso sembra ci siano dei bug nella
  riproduzione (si sentono dei rumori). Forse dovrete modificare le
  opzioni per risolvere questo problema.

  Le modifiche sono state effettuate da Timo Jantunen
  (timo.jantunen@hut.fi o jeti@cc.hut.fi). Egli dice che si pu
  distribuire liberamente, ma non  consentito lucrarci.  In effetti non
  sono totalmente sicuro della validit di questo copyright, visto che
  il maplay originale  sotto la GNU General Public License che non
  consente ai prodotti derivati di avere copyright differenti.

  Lo si pu trovare su
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay3.tar.gz>.


  2.3.5.  splay

  Questo riproduttore in versione beta  un altro derivato di maplay 1.2
  (in effetti  un derivato di maplay 1.2+, che  un derivato solo per
  MS Windows di maplay 1.2). Aggiunge il supporto per gli stream audio
  MPEG layer 3. Pu anche riprodurre file WAV. Pu anche riprodurre
  flussi di dati audio tramite una connessione HTTP.

  Un'altra funzione di splay  quella per la quale pu essere utilizzato
  come una libreria (sotto la LGPL), in questa maniera pu essere
  utilizzato all'interno di altri programmi. Il programma cerca di
  migliorare le prestazioni tramite l'utilizzo del threading (avrete
  bisogno di pthread per utilizzare questa funzione) e l'uso di un po'
  di assembly.


  splay utilizza l'interfaccia a riga di comando e un'interfaccia per X
  opzionale (basata su QT).

  Se dopo essere stato compilato non parte (ad es. esce con
  "segmentation fault"), si provi a compilarlo di nuovo senza il
  threading.

   opera di Jung Woo-jae (jwj95@eve.kaist.ac.kr).

  Lo si pu prelevare dalla splay's home page
  <http://adam.kaist.ac.kr/~jwj95/>.



  2.3.6.  Sajber Jukebox

  Questo  un riproduttore di audio MPEG con interfaccia utente grafica.
   basato su splay, quindi include il supporto per i layer audio MPEG
  fino al III.  anche capace di riprodurre i flussi di dati audio MPEG
  provenienti da HTTP in tempo reale.  anche facile da configurare.

  Utilizza il toolkit QT (la versione minima richiesta  la 1.2).
  Utilizza anche la libreria LinuxThreads (il binario incluso funziona
  solo con la versione 0.5).

  L'autore  Joel Lindholm (wizball@kewl.campus.luth.se).  L'ultima
  versione pu essere presa da  <ftp://kewl.campus.luth.se/pub/jukebox>.



  2.3.7.  amp

  Questo programma di riproduzione di audio MPEG in versione beta pu
  leggere solo gli stream audio MPEG layer 3.  L'output pu essere
  diretto alla scheda audio oppure immagazzinato su file in formato raw
  PCM o WAV. Carica abbastanza la CPU (circa il 60% di un Pentium a
  133MHz).


   stato scritto da Tomislav Uzelac (tuzelac@rasip.fer.hr).  Pu essere
  liberamente usato e distribuito ma non venduto commercialmente senza
  autorizzazione (includerlo in CD-ROM che contengano software free
  dovrebbe essere quindi possibile).

  Lo si pu scaricare da
  <ftp://ftp.rasip.fer.hr/pub/mpeg/amp-0.7.3.tgz>.



  2.3.8.  XAudio

  Questa libreria in versione alfa  stata scritta per essere una
  implementazione veloce di una libreria che decodifichi l'audio MPEG da
  usarsi nei vari front-end grafici. Supporta l'audio MPEG layer I, II e
  III. Con essa  possibile effettuare accessi casuali ai dati. 
  acclusa una interfaccia a riga di comando. Anche una interfaccia Motif
  (Lesstif)  inclusa nella versione per Linux.

   opera di Gilles Boccon-Gibod, Alain Jobart ed altri.  I front-end
  per la libreria possono essere scaricati liberamente.  Per utilizzare
  la libreria occorre invece una licenza (disponibile anche una licenza
  per binari e codice sorgente).

  I front-end alla libreria possono essere presi da XAudio home page
  <http://www.xaudio.com/>.



  2.3.9.  Layer 3 Shareware Encoder/Decoder

  Questo  un convertitore che converte gli stream audio MPEG layer 3 in
  formato WAV, AIFF, SND, AIFC o file raw PCM.  La versione Linux non
  consente di dirigere l'output alla scheda audio. Si deve prima
  convertire il file in un altro formato.

  Comunque, se si cerca di riprodurre un file convertito utilizzando
  sox, probabilmente sentirete solo rumore a causa del fatto che
  l'ordine delle word dei file PCM non  corretto (almeno nelle
  piattaforme Intel). Avrete bisogno di fornire a sox l'opzione -x per
  risolvere il problema. Ma vi sono anche dei riproduttori che si
  accorgono che l'ordine non  quello esatto, quindi forse non vi
  dovrete occupare di questo aspetto.

  Se avete un computer veramente veloce (probabilmente almeno un Pentium
  a 100Mhz), potete provare ad eseguire gli stream audio MPEG layer 3
  direttamente senza prima convertire il file audio in un altro formato,
  come nel seguente esempio (assumendo che si utilizzi sox e si eseguano
  file a 44.1 kHz stereo).





       $ l3dec foo.mp3 -sto | play -t raw -x -u -w -c 2 -r 44100 -






  Il numero che compare dopo -r  la frequenza di campionamento dello
  stream audio, ed il numero dopo -c dipende dal formato del file, mono
  o stereo (o anche quadrifonico). Se vi sembra troppo complicato,
  potete utilizzare uno shell script o un alias.

  Questo  un programma shareware copyright di Fraunhofer-IIS.  Una
  versione dimostrativa per Linux su sistemi x86 pu essere scaricata da
  <ftp://ftp.fhg.de/pub/layer3>. La versione demo converte solo gli
  stream audio MPEG layer III.


  2.3.10.  X11Amp

  Questo software in versione beta  un riproduttore di stream audio
  MPEG con interfaccia grafica, simile a quella utilizzata dal programma
  winamp per Windows.

  Non viene fatta menzione di copyright (ritengo che possa essere
  liberamente utilizzato per scopi personali).  curato da Mikael Alm
  (psy@x11amp.bz.nu), Thomas Nilsson (fatal@x11amp.bz.nu), e Olle
  Hallnas (crocodile@x11amp.bz.nu).

  Lo si pu scaricare da X11Amp's homepage <http://www.x11amp.bz.nu/>.
  Qui sono disponibili solo i binari per Linux e FreeBSD.


  2.4.  WAV

  Dalla pagina del manuale di sox :



       Sembrano molto simili a file IFF, ma non sono uguali. Sono
       il formato sonoro nativo di Windows 3.1. Ovviamente Windows
       3.1  di cos incredibile importanza per l'industria dei
       computer che doveva assolutamente avere un suo formato
       audio.



  Normalmente hanno l'estensione .wav.

  Si veda anche la sezione ``sox'' e ``bplay'' per altri riproduttori di
  file WAV oltre a quelli di cui si parla qui.


  2.4.1.  wavplay

  Questo programma  capace di riprodurre e registrare nel formato WAV.
  Utilizza il locking quindi pu essere riprodotto un file alla volta.
  Il suo lock pu essere usato separatamente dalle sue capacit di
  riproduzione.

  In aggiunta alla interfaccia a riga di comando dispone anche di una
  interfaccia Motif, che pu essere utilizzata con Lesstif.

   stato scritto in principio da Andre Fuechsel (af1@irz.inf.tu-
  dresden.de), ma  stato modificato al punto da essere stato
  completamente riscritto da Warren W.  Gay (bx249@freenet.toronto.on.ca
  o wwg@ica.net).

  Lo si pu scaricare da
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/wavplay-1.0.tar.gz>.




  2.5.  Altri

  In questa sezione si parla dei programmi che riproducono dei formati
  audio di cui non si  parlato in una sezione dedicata (ad es. formati
  che dispongono di un solo programma per la loro esecuzione), o
  riproduttori che eseguono pi di un formato audio.



  2.5.1.  sox

  Questo programma  effettivamente un convertitore, quindi converte un
  formato audio in un altro. Comunque, qualche versione di sox, quando
  lanciato come play, si comporta da riproduttore pi che da
  convertitore (probabilmente il Sound HOWTO si riferisce a questa
  particolarit quando parla dell'applicazione play).  Supporta dati
  binari e testuali in formato raw (senza header), RCAM Sound Files,
  Sound Blaster .voc, SPARC .au (con header), Mac HCOM, PC/DOS .sou,
  Sndtool, e Sounder, NeXT .snd, Windows 3.1 RIFF/WAV, Turtle Beach
  .smp, CD-R, e Apple/SGI AIFF e 8SVX.



  A partire da qualche punto nei kernel 1.3.6x, potreste aver bisogno di
  effettuare un piccolo cambiamento in un file per far funzionare la
  riproduzione diretta del suono. Precisamente si deve cambiare la riga
  179 di sbdsp.c da





       if (abuf_size < 4096 || abuf_size > 65536) {






  a





       if (abuf_size < 1 || abuf_size > 65536) {







  Ma, ripeto, probabilmente tutto funzioner senza questa modifica.
  Effettuarla, comunque, non rovina nulla.



   stato scritto da ed  sotto copyright di diverse persone, pu essere
  utilizzato per ogni scopo.

  Lo si pu prelevare da
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/Lsox-
  linux.tar.gz>.

  Una versione pi recente a cura di Chris Bagwell
  (cbagwell@sprynet.com) (basata sulle ultime versioni gamma del sox
  originale e che include la modifica di cui sopra) pu essere scaricata
  da  <http://home.sprynet.com/sprynet/cbagwell/projects.html>.  Inoltre
  questa versione supporta i formati WAV MS ADPCM e IMA ADPCM.




  2.5.2.  bplay

  Questo programma in versione beta riproduce file audio raw, WAV e VOC.
  Effettua anche la registrazione in questi formati.  Utilizza diverse
  tecniche per funzionare alla massima velocit possibile quindi
  funziona in maniera accettabile anche su macchine lente. Una di queste
  tecniche richiede che il programma sia installato in setuid root. Il
  paranoico che volesse utilizzarlo pu installare il pacchetto Debian
  di Ian Jackson (ijackson@gnu.org), che disabilita la funzione che
  richiede che il pacchetto sia installato in setuid root.

  L'autore  David Monro (davidm@gh.cs.usyd.edu.au).  Lo si pu
  scaricare da
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/bplay-0.96.tar.gz>.



  2.5.3.  SIDPLAY

  Questo programma emula il chip Sound Interface Device (MOS 6581,
  comunemente detto SID) e la Micro Processor Unit (MOS 6510) del
  Commodore 64.  quindi capace di caricare ed eseguire programmi in
  codice macchina del C64 che producono musica o suoni. Normalmente
  questi sono frammenti di codice e dati presi da giochi e demo e
  trasferiti direttamente dal C64.

  L'interfaccia predefinita  quella a riga di comando. Vi sono anche
  interfacce Tk e QT disponibili separatamente dal pacchetto principale.

   curato da Michael Schwendt (sidplay@geocities.com).

  Lo si pu trovare sulla SIDPLAY's home page
  <http://www.geocities.com/SiliconValley/Lakes/5147/>.



  2.5.4.  RealAudio Player

  Questo programma pu riprodurre il suono, memorizzato in formato
  proprietario, in tempo reale direttamente da Internet, senza che
  dobbiate scaricarvi prima l'intero file.  Si pu usare come programma
  stand-alone (da solo ndt.)  ma  stato pensato per essere abbinato ad
  un browser web (quelli esplicitamente gestiti sono Mosaic e Netscape).
  Non pu essere utilizzato senza X (non riuscirete a farlo funzionare
  con Lynx in una console testuale).

  Esiste comunque un metodo che consente di far girare RealAudio player
  da una console testuale. Si richiede che il virtual frame buffer
  server di X (Xvfb) sia funzionante. Si pu trovarne la descrizione su
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/traplayer-0.5.tar.gz>.


   opera di Progressive Networks, Inc. Non pu essere n ridistribuito
  n modificato ecc. Si consulti la licenza per avere maggiori dettagli
  su quello che potete o non potete farci.  possibile ottenerlo
  registrandosi a costo zero su RealAudio home page
  <http://www.realaudio.com/>.



  2.5.5.  cat


  A questo punto qualcuno potrebbe pensare cosa abbia a che fare cat,
  l'utilit di concatenazione a volte eccessivamente usata, con la
  riproduzione dei file audio. Vi illustrer il suo utilizzo con un
  esempio.





       $ cat sample.voc > /dev/dsp
       $ cat sample.wav > /dev/dsp
       $ cat sample.au > /dev/audio






  Fare il cat di un file .au su /dev/audio normalmente funziona, e se
  siete abbastanza fortunati da avere un file audio con l'ordine dei
  byte corretto (per la vostra piattaforma) ecc. il cat di un file che
  usa campioni PCM (come .wav o .voc) su /dev/dsp potrebbe anche farvi
  udire correttamente il suono.

  Questo non  un uso inutile di cat. Potrebbe essere utile, per
  esempio, se avete un file audio che nessuno dei vostri programmi
  riconosce, e sapete che utilizza campioni PCM, potete in questa
  maniera farvi un'idea di come potrebbe essere la sua riproduzione (se
  siete fortunati).




  3.  Altre utili utilit per l'audio

  Questa sezione non ha nulla a che vedere con la riproduzione dei file
  audio.  in effetti un insieme di utilit per l'audio che potrebbero
  risultare utili.



  3.1.  volume

   una semplice interfaccia a riga di comando  che consente di
  controllare il volume (che altro poteva essere?).  Include anche un
  programma separato con interfaccia Tcl/Tk per controllare il volume e
  riprodurre file audio .au.  accluso anche un semplicissimo CD player
  in Tcl/Tk.

   un programma Freeware scritto da Sam Lantinga
  (slouken@cs.ucdavis.edu).

  Pu essere prelevato da
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/soundcard/volume-2.1.tar.gz>.




  3.2.  Sound Studio

   una applicazione in Tcl/Tk che esegue la riproduzione, la
  registrazione e la modifica di audio digitale tramite sox. Nella
  distribuzione  incluso sox per evitare problemi di compatibilit.

   scritto da Paul Sharpe e N. J. Bailey (N.J.Bailey@leeds.ac.uk).  Pu
  essere liberamente usato e ridistribuito dopo l'invio di una
  cartolina.



  Lo si pu scaricare dalla Sound Studio's home page <http://www.elec-
  eng.leeds.ac.uk/staff/een6njb/Software/Studio/screens.html>.




  3.3.  Tickle Music

  Questo programma Tcl/Tk in versione beta  un browser di file musicali
  che consente di riprodurre vari formati audio, se un programma
  appropriato per ogni formato  gi presente nel vostro sistema. Nelle
  impostazioni predefinite gmod  utilizzato per eseguire i file MOD e
  mp per riprodurre i file MIDI (il sorgente  modificabile per fargli
  utilizzare altri programmi).


   scritto da ed  copyright di Shannon Hendrix (shendrix@pcs.cnu.edu o
  shendrix@escape.widomaker.com).

  Lo si pu prendere da
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tmusic-1.0.tar.gz>.




  4.  Riferimenti


  1. La documentazione acclusa alle applicazioni di cui si parla in
     questo documento.



  2. Il Linux Sound HOWTO.  Lo si pu prendere da Linux Documentation
     Project <http://sunsite.unc.edu/LDP/>.



  3. Linux MIDI and Sound Applications
     <http://www.bright.net/~dlphilp/linux_soundapps.html>



  4. Programmer's Guide to OSS <http://www.4front-tech.com/pguide/>



  5. SoX home page <http://www.spies.com/Sox/>


































F 3DFX-HOW.;1                       	3Dfx-HOWTO
F ACCESS-H.;1                       	Access-HOWTO
F ASSEMBLY.;1                       	Assembly-HOWTO
F AX25-HOW.;1                       	AX25-HOWTO
F BASH-PRO.;1                       	Bash-Prompt-HOWTO
F BENCHMAR.;1                       	Benchmarking-HOWTO
F BEOWULF-.;1                       	Beowulf-HOWTO
F CD-WRITI.;1                       	CD-Writing-HOWTO
F CDROM-HO.;1                       	CDROM-HOWTO
F CONFIG-H.;1                       	Config-HOWTO
F COPYRIGH.;1                       	COPYRIGHT
F DISTRIBU.;1                       	Distribution-HOWTO
F DNS-HOWT.;1                       	DNS-HOWTO
F DOS-TO-L.;1                       	DOS-to-Linux-HOWTO
F EMACS-BE.;1                       	Emacs-Beginner-HOWTO
F ETHERNET.;1                       	Ethernet-HOWTO
F FIREWALL.;1                       	Firewall-HOWTO
F FTAPE-HO.;1                       	Ftape-HOWTO
F GCC-HOWT.;1                       	GCC-HOWTO
F GLIBC2-H.;1                       	Glibc2-HOWTO
F HAM-HOWT.;1                       	HAM-HOWTO
F HARDWARE.;1                       	Hardware-HOWTO
F HOWTO-HO.;1                       	HOWTO-HOWTO
F HOWTO-IN.;1                       	HOWTO-INDEX
F INFO-SHE.;1                       	INFO-SHEET
F INSTALLA.;1                       	Installation-HOWTO
F INTRANET.;1                       	Intranet-Server-HOWTO
F IPCHAINS.;1                       	IPCHAINS-HOWTO
F IPX-HOWT.;1                       	IPX-HOWTO
F ISP-HOOK.;1                       	ISP-Hookup-HOWTO
F ITALIAN-.;1                       	Italian-HOWTO
F JAVA-CGI.;1                       	Java-CGI-HOWTO
F JAZ-DRIV.;1                       	Jaz-Drive-HOWTO
F KERNEL-H.;1                       	Kernel-HOWTO
F LARGE-DI.;1                       	Large-Disk-HOWTO
F LINUXDOC.;1                       	LinuxDoc+Emacs+Ispell-HOWTO
F LOOPBACK.;1                       	Loopback-Encrypted-Filesystem-HOWTO
F MAIL-USE.;1                       	Mail-User-HOWTO
F META-FAQ.;1                       	META-FAQ
D MINI                              	mini
F MODEM-HO.;1                       	Modem-HOWTO
F MP3-HOWT.;1                       	MP3-HOWTO
F MULTI-DI.;1                       	Multi-Disk-HOWTO
F NET-3-HO.;1                       	NET-3-HOWTO
F NETWORKI.;1                       	Networking-Overview-HOWTO
F NFS-HOWT.;1                       	NFS-HOWTO
F NIS-HOWT.;1                       	NIS-HOWTO
F ONLINE-T.;1                       	Online-Troubleshooting-HOWTO
F PALMOS-H.;1                       	PalmOS-HOWTO
F PCI-HOWT.;1                       	PCI-HOWTO
F PLUG-AND.;1                       	Plug-and-Play-HOWTO
F PPP-HOWT.;1                       	PPP-HOWTO
F PRINTING.;1                       	Printing-Usage-HOWTO
F QUAKE-HO.;1                       	Quake-HOWTO
F READING-.;1                       	Reading-List-HOWTO
F README.;1                         	README
F ROOT-RAI.;1                       	Root-RAID-HOWTO
F SCSI-HOW.;1                       	SCSI-HOWTO
F SERIAL-H.;1                       	Serial-HOWTO
F SHADOW-P.;1                       	Shadow-Password-HOWTO
F SMB-HOWT.;1                       	SMB-HOWTO
F SOFTWARE.;1                       	Software-Release-Practice-HOWTO
F SOFTWARE.000;1                    	Software-RAID-HOWTO
F SOFTWARE.001;1                    	Software-Building-HOWTO
F SOFTWARE.4X-;1                    	Software-RAID-0.4x-HOWTO
F SOUND-HO.;1                       	Sound-HOWTO
F SOUND-PL.;1                       	Sound-Playing-HOWTO
F TETEX-HO.;1                       	TeTeX-HOWTO
F UNIX-INT.;1                       	Unix-Internet-Fundamentals-HOWTO
F UUCP-HOW.;1                       	UUCP-HOWTO
F VIRTUAL-.;1                       	Virtual-Services-HOWTO
F WWW-HOWT.;1                       	WWW-HOWTO
F WWW-MSQL.;1                       	WWW-mSQL-HOWTO
F XFREE86-.;1                       	XFree86-HOWTO
F XFREE86-.000;1                    	XFree86-Video-Timings-HOWTO
  Il teTeX HOWTO: La guida locale a Linux-teTeX
  Robert Kiesling
  v3.7, 9 Novembre 1998

  Questo documento descrive i concetti di base relativi all'instal
  lazione e all'uso con le principali distribuzioni di Linux di teTeX,
  implementazione di TeX e LaTeX, e di alcuni pacchetti utili come
  Ghostscript. "The teTeX HOWTO: The Linux-teTeX Local Guide"  Copy
  right (c) 1997, 1998 di Robert A. Kiesling. I termini esatti per copi
  arlo sono riportati nell'introduzione e nelle appendici. I marchi reg
  istrati appartengono ai loro rispettivi proprietari. Reclami, suggeri
  menti, errori ed altro devono essere inviati a kiesling@terracom.net
  in modo che io possa mantenere questo documento il pi completo ed
  aggiornato possibile. La traduzione italiana  stata curata da Samuele
  Maretti (s.maretti@tiscalinet.it).

  1.  Introduzione.


  1.1.  Copyright (in lingua originale).

  The teTeX-HOWTO is copyright (C) 1997, 1998 by Robert Kiesling.
  Permission is granted to make and distribute verbatim copies of this
  manual provided that the copyright notice and this permission notice
  are preserved on all copies.

  Permission is granted to copy and distribute modified versions of this
  manual under the conditions for verbatim copying, provided also that
  the sections entitled, ``Distribution,'' and, ``GNU General Public
  License,'' are included exactly as in the original, and provided that
  the entire resulting derived work is distributed under the terms of a
  permission notice identical to this one.

  Permission is granted to copy and distribute translations of this
  manual into another language, under the above conditions for modified
  versions.  except that the sections entitled, ``Distribution,'' and,
  ``GNU General Public License,'' may be included in a translation
  approved by the Free Software Foundation instead of in the original
  English.  Please refer to Section ``Distribution and Copyright'' for
  terms of copying.

  (Ovvero: Volete distribuire copie di questo documento? Fatelo, purch
  vengano mantenute tutte le informazioni riguardanti il copyright.
  Volete distribuire delle copie modificate di questo documento? Fatelo,
  ma mantenete le condizioni descritte nelle sezioni ``Distribution'' e
  ``GNU General Public License'' (e ovviamente includete queste
  sezioni!)  Volete tradurre questo documento? Fatelo, ma lasciate le
  sezioni ``Distribution'' e ``GNU General Public License'' in lingua
  originale, o includetene una traduzione approvata dalla Free Software
  Foundation e comunque traducetelo a partire dall'originale inglese!
  ndt)


  1.2.  Il software descritto in questo documento.

  TeX, nel procedimento di preparazione di un documento, tratta solo la
  parte di formattazione. Generare un documento con TeX  come compilare
  codice sorgente: si ottiene del codice oggetto che deve per ancora
  essere linkato. Si prepara un file con un editor di testi (quello che
   generalmente conosciuto come ``word processing'') e si fa poi
  elaborare il file da TeX, ottenendo un file ``indipendente dal
  dispositivo'', detto ``file .dvi'' (DeVice Independent).

  Hai anche bisogno di programmi in grado di ``tradurre'' l'output in
  formato .dvi di TeX in un formato comprensibile dalla tua scheda video
  e dalla tua stampante. Questi programmi vengono detti, nell'insieme,
  ``dviware''. Per esempio, lo stesso TeX fa solo richieste per i font
  da usare.  poi compito del driver .dvi fornire effettivamente quei
  font al dispositivo di uscita, sia esso lo schermo o la stampante.
  Questo passo ulteriore pu sembrare eccessivamente complicato, ma
  l'astrazione fa s che i documenti possano essere mostrati allo stesso
  modo su diversi dispositivi con minime modifiche, se non nessuna, da
  apportare al documento originale.



  1.2.1.  teTeX.

  TeX  implementato praticamente per ogni sistema serio esistente al
  mondo (ed anche per qualcuno ``meno serio'') quindi gli implementatori
  devono far s che possa essere installato facilmente in ognuno di
  essi. Questo, unito all'intrinseca complessit di ogni installazione
  TeX, giustifica in parte la complessit di teTeX. Giustifica anche il
  fatto che installare da soli il sistema sia un lavoro non
  indifferente, e a meno che tu non abbia gi familiarit con TeX 
  facile perdersi fra il gran numero di eseguibili, file di TeX,
  documentazione e font.

  Per fortuna teTeX fa parte della distribuzione GNU/Linux. Puoi
  installare il pacchetto molto pi facilmente usando gli strumenti di
  installazione GNU/Linux.  Potresti avere gi teTeX installato nel tuo
  sistema. In questo caso puoi saltare direttamente alla Sezione ``Usare
  teTeX''.

  Comunque, se vuoi installare il pacchetto, i file necessari per
  un'installazione funzionante di teTeX si trovano nei siti della rete
  di archivi CTAN. Una lista di tali siti si trova nella Sezione
  ``Appendice A''.

  CTAN  l'acronimo di "Comprehensive TeX Archive Network" (rete degli
  archivi completi di TeX), una serie di siti accessibili via FTP
  anonimo che archiviano programmi, macro, font e documentazione
  riguardanti TeX. Nella tua esperienza con TeX diventerai probabilmente
  familiare con almeno uno dei siti CTAN. In questo documento un nome di
  percorso come ~CTAN/contrib/pstricks significa ``la directory
  contrib/pstricks del sito CTAN pi vicino''.

  L'installazione della distribuzione generica di teTeX descritta nella
  Sezione ``Installing the CTAN teTeX distribution'' si concentra sulle
  versioni di Linux per i processori Intel. Installare teTeX su un
  hardware diverso dovrebbe richiedere solo la sostituzione degli
  eseguibili con quelli appropriati alla specifica versione durante il
  processo di installazione.

  Oltre agli eseguibili, la distribuzione include tutti i pacchetti TeX
  e LaTeX, metafont e il suo codice sorgente, bibtex, makeindex, e tutta
  la documentazione... pi di 4 Megabyte. La documentazione descrive
  ogni cosa di cui prevedibilmente avrai bisogno per cominciare. Quindi
  sarebbe bene installarla tutta. Non solo per leggerla, ma anche perch
  i documenti costituiscono dei buoni esempi di codice ``reale'' per TeX
  e LaTeX.

  TeX  stato scritto dal Professor Donald Knuth della Stanford
  University.   un linguaggio di composizione tipografica di basso
  livello che costituisce la base per tutti i pacchetti di livello pi
  alto come LaTeX. Fondamentalmente LaTeX  un insieme di macro che TeX
  pu eseguire e che danno all'utente finale la possibilit di usare
  comodamente dei formati di documenti predefiniti. Se ti piacciono i
  formati di LaTeX probabilmente non avrai mai la necessit di imparare
  a programmare TeX a basso livello. La differenza fra i due linguaggi 
  analoga a quella fra l'assembler e il C. Puoi avere la velocit e la
  flessibilit di TeX o la comodit di LaTeX.
  A proposito, le lettere della parola ``TeX'' sono lettere
  dell'alfabeto greco, tau-epsilon-chi. Non si tratta di un'associazione
  studentesca, ma della radice della parola greca techne, che significa
  ``arte'' e/o ``scienza''. ``TeX'' non si pronuncia come la prima
  sillaba di ``Texas''.  TeX  generalmente pronunciato in modo da far
  rima con ``yecch'', per usare l'esempio che il Professor Knuth fa in
  The TeXBook, che  uno dei testi di riferimento per TeX. (Deve essere
  pronunciato ``tec'', come in ``tecnologia'', insomma ndt). Scrivi
  ``TeX'' con questo esatto uso di lettere maiuscole e minuscole sui
  dispositivi a carattere, o, in TeX stesso, utilizzando la macro
  \TeX{}.


  1.2.2.  Editor di testo.

  Per preparare un file per TeX pu essere usato uno qualsiasi degli
  editor disponibili sotto Linux (jed, joe, jove, vi, vim, stevie,
  Emacs, microemacs) o comunque un editor in grado di leggere e scrivere
  file in formato ASCII standard. Quello che personalmente preferisco 
  GNU Emacs. Questo per diverse ragioni:


    Emacs dispone di modi TeX e LaTeX usando i quali puoi formattare,
     avere anteprime e stampare i documenti.

    Emacs pu inserire automaticamente, mentre stai digitando, le
     ``virgolette tipografiche'' di TeX piuttosto di quelle "standard
     ASCII".

    Emacs dispone di un supporto integrato per Texinfo, un sistema di
     documentazione ipertestuale.

    Emacs  ampiamente supportato. La versione 19.34 e le successive,
     ad esempio, sono incluse nelle principali distribuzioni Linux
     statunitensi.

    Emacs fa tutto tranne imburrare il pane al mattino.

    Emacs  libero.


  1.2.3.  dvips .

  dvips, scritto da Tomas Rokicki, genera un file Postscript a partire
  da un file .dvi. Inoltre esegue Metafont se  necessario per generare
  i font bitmapped di cui ha bisogno oppure usa i font Postscript. Pu
  anche tagliare o ridimensionare le pagine e costruire elementi grafici
  a partire da istruzioni in un file TeX o LaTeX.

  Il programma dvips fa parte della distribuzione teTeX. Ne parliamo
  approfonditamente nella Sezione ``Mettere insieme testo e grafica con
  dvips''

  Molta della complessit di TeX, e quindi anche di LaTeX, deriva
  dall'implementazione di vari sistemi di font e dal modo in cui questi
  font sono specificati. Un importante miglioramento di LaTeX 2e
  rispetto al suo predecessore  stato il modo in cui l'utente pu
  specificare i font, detto in precedenza ``New Font Selection Scheme''
  (nuovo schema di selezione del fonti). Se ne discute nella Sezione
  ``Caratteri e stili'', ``TeX Font Commands'' e ``Usare font
  PostScript''.

  teTeX viene distribuito insieme a una dozzina circa di font, e questo
   abbastanza per cominciare. Ci sono anche le descrizioni della
  metrica dei font, nei file .tfm (TeX font metric). Per generare gli
  altri font di cui puoi avere bisogno devi solo installare i sorgenti
  di metafont. I vari driver .dvi provvederanno automaticamente a
  richiamare metafont per generare ``al volo'' i caratteri Computer
  Modern di cui hanno bisogno.


  2.  Usare teTeX.

  Almeno teoricamente tutto  installato correttamente ed  pronto a
  funzionare. teTeX  un pacchetto molto grosso. Vorrai quindi imparare
  teTeX, come forse hai gi fatto con altri programmi complessi,
  lentamente, invece di essere sommerso dalla sua complessit.

  Allo stesso tempo, per, vogliamo fargli fare qualcosa di utile.
  Quindi invece di stare a guardare TeX mentre compone

  ``Hello, World!''


  come il Professor Knuth suggerisce nel The TeXBook, eseguiremo TeX su
  un paio di documenti di teTeX per provare l'installazione.


  2.1.  Stampiamo la documentazione.

  Le prime volte che usi teTeX sarebbe meglio che tu ti collegassi come
  root. Se non lo fai, metafont pu non essere capace di creare le
  directory necessarie per i suoi font. Un'opzione del programma
  texconfig consente di dare il permesso di scrittura a tutti sulle
  directory dei font, ma se stai lavorando su un sistema multiutente
  questo, per motivi di sicurezza, non  desiderabile.

  Comunque, se non hai i privilegi per scrivere sulle directory in cui
  vengono immagazzinati i font, Metafont si lamenter di non poter
  creare le directory. Non verr prodotto nulla perch non ci sono i
  caratteri necessari. Questo non  un grosso problema. Scollegati e
  ricollegati come root, poi ripeti l'operazione che ha causato
  problemi.

  Il bello di teTeX  che se fai qualche errore che lo fa ``saltare'',
  non vengono mai fatti danni. Non  come un compilatore con il quale
  puoi ad esempio danneggiare tutta la partizione di root se un
  puntatore punta da qualche parte non prevista. Cosa? Non hai ancora
  letto il manuale di teTeX? Beh,  ovvio. Si trova ancora nella
  distribuzione, in forma di codice sorgente, ed aspetta di essere
  elaborato.

  Quindi non aspettiamo oltre, sarai senz'altro ansioso di leggerlo. Si
  trova nella directory

  /usr/lib/teTeX/texmf/doc/tetex.



  Il file che contiene il manuale in formato LaTeX si chiama
  TETEXDOC.tex (l'estensione .tex viene usata sia per i file di TeX che
  per quelli di LaTeX. Alcuni editor, come emacs, sono in grado di
  riconoscere la differenza). C' anche un file TETEXDOC.dvi che  bene
  tenere in un posto sicuro (ad esempio un'altra directory) nel caso pi
  tardi tu voglia provare i tuoi driver .dvi. Dopo averlo messo via,
  digita

  latex TETEXDOC.tex


  LaTeX scriver alcuni messaggi di avvertimento. Il primo,

  LaTeX Warning: Label(s) may have changed. Rerun to get the
  cross-references right.


  (le etichette potrebbero essere cambiate. Riesegui per avere i giusti
  riferimenti incrociati)  standard.  normale costruire l'indice di un
  documento eseguendo due volte LaTeX sul documento stesso. Quindi,
  ripeti il comando. Gli altri avvertimenti possono essere tranquilla
  mente ignorati. Ti informano del fatto che alcuni dei percorsi FTP di
  cui si parla nel documento sono troppo lunghi per lo spazio loro
  assegnato. Le  Sezioni ``Stile e dimensioni dei paragrafi'' e
  ``Tolleranze'' descrivono pi in dettaglio la spaziatura orizzontale.

  Noterai che teTeX ha prodotto numerosi file da TETEXDOC.tex.  Quello
  che ci interessa  TETEXDOC.dvi:  il file indipendente dal
  dispositivo che puoi mandare indifferentemente allo schermo o alla
  stampante. Se esegui teTeX sotto X Windows, puoi avere un'anteprima
  del documento con xdvi.

  Per i nostri scopi supporremo che tu abbia una HP LaserJet II. A
  questo punto dovresti dare il comando

  dvilj2 TETEXDOC.dvi


  che produce, a partire da file TETEXDOC.dvi, un file in formato PCL
  che contiene anche i ``soft font'', cio informazioni sui font che
  verranno trasmesse alla stampante. Questa possibilit non  offerta da
  TeX o da LaTeX, ma da dvilj2. Gli altri driver .dvi offrono la possi
  bilit di sfruttare le capacit del particolare dispositivo che sup
  portano. dvilj2 risponder alle richieste di font fatte nel documento
  LaTeX fornendo il font pi simile disponibile nel sistema; nel caso di
  un documento contenente solo testo, come TETEXDOC.tex, non ci sono
  molti problemi. Tutti i font richiesti vengono infatti generati da
  metafont, che viene chiamato automaticamente da dvilj2 e provvede a
  creare i font che non sono gi sul sistema (la prima volta che esegui
  dvilj2 il programma pu aver bisogno di generare tutti i font). Ci
  sono alcune opzioni di dvilj2 che controllano la generazione dei font,
  e ne puoi trovare una descrizione nella relativa pagina di manuale. In
  effetti non ci dovrebbe essere bisogno di eseguire direttamente meta
  font; se questo bisogno invece si presenta c' qualcosa che  andato
  storto nell'installazione. Tutti i driver .dvi chiamano direttamente
  metafont attraverso la libreria di ricerca dei percorsi kpathsea (la
  descrizione di questa va oltre gli scopi di questo documento) e non
  dovrai lavorare pi con metafont per ora (sono forniti tutti i sor
  genti metafont della libreria di font Computer Modern).

  Puoi stampare TETEXDOC.lj con il comando

  lpr TETEXDOC.lj


  Ci pu essere bisogno di installare un filtro di stampa in grado di
  capire il PCL.

  La teTeX Guide, un documento di nove pagine, d alcune informazioni
  utili per affinare ulteriormente la configurazione del sistema: di
  qualcosa abbiamo gi parlato, di molto altro non parler nel teTeX
  HOWTO.

  Non ho potuto sperimentare di persona alcune delle informazioni
  contenute nella prossima sezione poich ho una stampante non
  PostScript HP Deskjet 400, a getto d'inchiostro a colori, collegata
  alla porta parallela del computer. Comunque il fatto di non possedere
  una stampante PostScript non rappresenta un ostacolo alla capacit di
  stampare testi e grafica nei tuoi documenti. Ghostscript si trova
  nella maggior parte delle distribuzioni Linux e potrebbe essere gi
  installato nel tuo sistema.


  3.  Comandi TeX.

   facile preparare documenti da elaborare con TeX. Prendi un file di
  testo, assicurati che fra i paragrafi ci sia una linea vuota, ed
  esegui TeX su quel file con il comando

  TeX il_tuo_file_di_testo


  Il risultato sar un file con lo stesso nome ed estensione .dvi.  TeX
  formatta il testo usando il font Computer Modern Roman corpo 10,
  interlinea singola e giustificazione su entrambi i margini. Se ricevi
  messaggi d'errore a causa di caratteri speciali, come ad esempio il
  simbolo di dollaro, inserisci prima di essi il carattere backslash e
  riesegui TeX sullo stesso file.  A questo punto puoi elaborare il file
  prodotto da TeX con il driver .dvi che preferisci (vedi sopra) per
  stampare il documento.

  Una peculiarit dei file di input di TeX  l'uso delle virgolette
  aperte e chiuse, che devono essere inserite come due accenti gravi o
  due apostrofi.  Emacs, in modo TeX,  in grado di farlo
  automaticamente.

  "Queste sono virgolette ASCII."
  ``Queste sono virgolette `TeX-style'.''




  3.1.  Una panoramica dei comandi.

  I comandi in TeX iniziano con un backslash (``\''). Per esempio, il
  comando per cambiare la spaziatura fra le linee 

  \baselineskip=24pt



  La ``baseline''  il punto pi basso dei caratteri su una linea, senza
  contare i discendenti. La distanza fra le baseline di due linee  la
  \baselineskip, a cui  assegnato un valore di 24 punti.

  Le misure o dimensioni in TeX sono date spesso nelle seguenti unit di
  misura:

  pt                % Punti:          1/72 in.
  pc                % Pica:           12 pt.
  in                % Inch (pollici): 72.27 pt.
  cm                % Centimetri:     2.54 cm = 1 in.
  mm                % Millimetri:     10 mm = 1 cm.



  Alcuni comandi non richiedono di specificare delle misure. Ad esempio:

  \smallskip        % Approssimativamente 3 punti.
  \medskip          % Due \smallskip.
  \bigskip          % Due \medskip.




  \smallskip inserisce uno spazio verticale di 3 punti nel documento. Le
  misure sono approssimate perch TeX deve aggiustare le dimensioni per
  interruzioni di pagina, titoli di sezione e altre unit di spazio
  verticale. Questo vale anche per la spaziatura orizzontale.

  \hsize=6.5in


  Questo comando pone la lunghezza delle linee a 6.5 pollici. TeX prova
  a riempire la linea aggiustando lo spazio fra le parole e a volte fra
  le lettere.  Se TeX non riesce a riempire una linea rimanendo entro
  una certa tolleranza produce un messaggio di avvertimento, e aggiusta
  la spaziatura orizzontale nella linea meglio che pu. Le tolleranze di
  formattazione sono discusse nella sezione ``Tolleranze''.

  Ci sono molti altri comandi che specificano dimensioni e tolleranze
  orizzontali e verticali, e quelli usati pi comunemente sono descritti
  di seguito.


  3.2.  Comandi di cambio dei font.

  In TeX il font predefinito  il Computer Modern Roman 10 punti.  Per
  specificare uno stile di carattere diverso, come corsivo, grassetto o
  a spaziatura fissa, si possono usare i comandi seguenti.

  \rm          % Tondo (predefinito).
  \it          % Corsivo.
  \bf          % Grassetto.
  \tt          % Spaziatura fissa (telescrivente).
  \sl          % Obliquo.


  I comandi cambiano lo stile dei caratteri dal punto in cui appaiono
  nel testo, come nell'esempio seguente.

  Questo testo  in Tondo, \it e questo  in corsivo. \bf Questo testo 
  in grassetto e \rm questo testo  di nuovo in tondo.



  Per specificare un font per il tuo documento, usa il comando \font.

  \font\romantwelve=cmr12


  Questo crea il comando di cambio font \romantwelve, che, quando viene
  usato nel testo, cambia il font in Computer Modern Roman, 12 punti.

  \romantwelve
  Questo  il font Computer Modern Roman di 12 punti.


  Per avere informazioni sui font compresi nella distribuzione teTeX
  leggi il file:

  /usr/lib/teTeX/texmf/doc/fonts/fontname/fontname.dvi



  Se vuoi stampare un esempio di un font, esegui TeX sul file

  /usr/lib/teTeX/texmf/tex/plain/base/fontchart.tex



  ed inserisci, quando ti viene richiesto, il nome del font che vuoi
  stampare.

  Puoi anche cambiare la dimensione di un font per ottenere vari
  effetti.  L'ingrandimento dei font avviene in maniera esponenziale, e
  viene specificato con il comando scaled \magstep, che viene messo dopo
  il comando di cambio di font.

  \font\sfmedium=cmss12 scaled \magstep 1


  Questo comando produce un font sans serif che  del 120 percento pi
  grande del font Computer Modern sans serif 12 punti. I font possono
  essere ingranditi a passi da 0 a 5. Ciascun passo produce un ingrandi
  mento del 120 percento rispetto al precedente.


  3.3.  Stili e dimensioni dei paragrafi.

  Come abbiamo detto in precedenza, TeX compone normalmente il testo con
  il font Computer Modern Roman di 10 punti. La lunghezza di una linea 
  data da \hsize, il cui valore predefinito  6.5 pollici. Se vuoi ad
  esempio cambiare il valore di \hsize a 5.5 pollici usa questo comando.

  \hsize=5.5in



  In TeX una dimensione  un'unit di lunghezza modificabile,
  orizzontale o verticale. Nella definizione di una dimensione pu
  essere specificato quanto la dimensione pu essere incrementata o
  decrementata.  Strettamente legato alla dimensione e lo skip
  (``salto''), che  una dimensione posta in uno dei registri interni di
  TeX. Gli skip sono definiti con il comando \newskip. La dimensione di
  \smallskip, cos come viene definita da TeX, :

  \newskip\smallskipamount \smallskipamount=3pt plus 1pt minus 1pt


  Il comando \smallskip  un'abbreviazione di

  \vskip\smallskipamount



  Ci sono alcune dimensioni che controllano il formato della pagina. Ne
  trovi un riassunto nella sezione ``Formato della pagina''.

  TeX formatta i paragrafi giustificando sia il margine sinistro che il
  margine destro. Se vuoi che il testo sia giustificato solo a sinistra
  puoi usare il comando:

  \raggedright



  Per comporre una linea giustificata a destra usa il comando
  \rightline:

  \rightline{Questa  la linea da comporre.}



  Il comando \line compone il testo che gli viene dato come argomento in
  modo che riempia l'intera linea.

  \line{Questo testo verr spaziato per riempire l'intera linea.}



  Per cambiare il margine sinistro definisci il valore di \hoffset, come
  in questo esempio:

  \hoffset=1.5in



  Il comando \parindent specifica il valore dell'indentazione della
  prima linea di ciascun paragrafo.

  \parindent=.5in



  Altre due dimensioni, \leftskip e \rightskip, definiscono
  l'indentazione rispettivamente del margine sinistro e destro dei
  paragrafi che le seguono.

  \leftskip=.5in
  \rightskip=.5in


  Il comando \narrower  equivalente a

  \leftskip=\parindent
  \rightskip=\parindent


  Cio \narrower restringe i margini del paragrafo di un valore pari a
  \parindent

  Come abbiamo detto in precedenza, \baselineskip specifica la distanza
  fra le linee. Il valore predefinito  12 punti. Per avere
  approssimativamente un'interlinea doppia usa il comando seguente.

  \baselineskip=\baselineskip*1.6



  Il comando \parskip specifica una distanza fra i paragrafi che viene
  aggiunta a \baselineskip. Normalmente non viene aggiunto nessuno
  spazio, ma la distanza fra i paragrafi pu essere ridotta fino a 1
  punto per riempire correttamente la pagina. Per inserire una linea
  bianca fra i paragrafi usa il comando:

  \parskip=\baselineskip




  3.3.1.  Tolleranze. (Cosa sono quei rettangoli neri dopo ogni linea?)

  TeX formatta normalmente il testo rispettando delle strette
  tolleranze. Se, per qualche ragione, il testo non pu essere
  formattato rispettando tali tolleranze, TeX produce un messaggio di
  avvertimento e formatta il testo meglio che pu. Se il testo deve
  essere allargato troppo per riempire la linea, TeX ti avverte che la
  ``\hbox is underfull'' (c' troppo poco testo nell'``hbox''). Se il
  testo deve essere ``compresso'' troppo per entrare nella linea viene
  prodotto un messaggio di avvertimento ``overfull \hbox'' (c' troppo
  testo nell'``hbox'').

  Per ogni overfull \hbox TeX mette uno slug, un rettangolo nero, dopo
  la linea. Lo slug indica che TeX non ha potuto formattare la linea
  rispettando la tolleranza specificata dal parametro \hbadness.

  Una misura di quanto il testo ``stia bene'' nelle dimensioni
  specificate  data dalla sua badness (letteralmente ``cattiva
  qualit''), che  un numero fra 0 e 10000. Una badness di 0 indica che
  il testo si adatta perfettamente alla linea, e una badness di 10000
  significa che il testo probabilmente non si adatter mai alla linea.
  Il valore predefinito di \hbadness  1000. Se poni \hbadness a 10000,
  TeX non segnaler linee con troppo poco testo.

  A volte TeX permette che una linea si estenda oltre il margine destro.
  Questa  una precisa scelta estetica dell'autore di TeX. Il parametro
  \hfuzz determina quanto le linee possono oltrepassare il margine, ed
  il suo valore predefinito  di 0.1 punti. Se il testo non si adatta
  alla linea, il parametro \tolerance determina il modo in cui TeX
  tratter l'``overfull \hbox''. Il valore predefinito di \tolerance 
  200. Ponendo il valore di \tolerance a 1000 non verranno pi emessi
  messaggi di avvertimento ``overfull \hbox'' n stampati slug.


  3.4.  Formato della pagina.


  Oltre alle dimensioni del margine sinistro e della lunghezza della
  linea, che abbiamo descritto nella sezione precedente, TeX permette di
  specificare i margini superiore ed inferiore e la spaziatura
  verticale.

  In maniera simile alle dimensioni \hsize e \hoffset, descritte nella
  sezione precedente, esistono in TeX i comandi \vsize e \voffset. Il
  valore predefinito di \vsize  8.9 pollici, e quello di \voffset  0.

  Normalmente teTeX posiziona l'inizio della prima linea di testo ad un
  pollice dal margine superiore della pagina e ad un pollice dal margine
  sinistro.  Puoi far s che il testo inizi ad una distanza minore dal
  margine superiore della pagina usando il comando:

  \voffset=-0.5in



  Se vuoi aggiungere dello spazio verticale in un documento puoi usare i
  comandi \smallskip, \medskip, e \bigskip, che aggiungono
  approssimativamente 3, 6 e 12 punti di spazio verticale.  Queste
  misure sono approssimate; TeX infatti pu aggiustarle fino ad un punto
  in modo da riempire correttamente la pagine.

  Il comando \vfill aggiunge uno spazio verticale aggiustabile fra i
  paragrafi su una pagina. Questo spazio pu essere allungato
  infinitamente, ed aggiunger spazio in modo da riempire il pi
  possibile il resto della pagina. Se vuoi specificare una dimensione,
  usa \vskip come in:

  \vskip 10pt



  I comandi \hss e \vss sono simili a \hfill e \vfill tranne per il
  fatto che lo spazio da essi prodotto pu essere sia ristretto che
  allungato infinitamente.

  I comandi \vskip e \vfill producono delle lunghezze ``flessibili''.
  Non aggiungono spazio dove non c' testo, ad esempio all'inizio di una
  pagina. Se vuoi inserire uno spazio ``assoluto'' usa il comando
  \vglue.

  TeX riempie lo spazio definito dalla dimensione \vsize con la maggiore
  quantit di testo possibile prima di iniziare una nuova pagina.  Per
  forzare un'interruzione di pagina usa la sequenza \vfill \eject. Se
  \vfill non venisse usato, nel testo che precede \break verrebbe
  modificata la spaziatura in modo da riempire la pagina.

  Se vuoi che TeX sia pi flessibile riguardo all'altezza della pagina,
  usa nel tuo documento il comando \raggedbottom. Con questo comando TeX
  modificher leggermente il margine inferiore di ciascuna pagina in
  modo da migliorare la spaziatura verticale.


  3.5.  Numeri di pagina, testatine e fondi di pagina.

  teTeX di solito mette il numero di pagina al centro del margine
  inferiore della pagina. Se vuoi cambiare posizione e stile del numero
  di pagina puoi specificare testatine e fondi pagina diversi cambiando
  la definizione di \headline e \footline. La definizione iniziale di
  \footline contiene il comando \folio, che stampa il numero di pagina.
  La definizione di \headline  \hfil, che fa s che venga stampata una
  linea vuota.

  Il comando \pageno  un sinonimo del contatore interno delle pagine di
  TeX. Puoi cambiare il numero di pagina cambiando il valore di \pageno.
  Se \pageno  negativo i numeri vengono stampati come numeri romani.

  \pageno=10
  \pageno=-1



  Il comando \nopagenumbers  un'abbreviazione di:

  \headline={\hfil}
  \footline={\hfil}



  Il fondo pagina predefinito contiene anche il comando di font \tenrm.
  Con questo i numeri di pagina vengono stampati con il font Roman di 10
  punti. Se vuoi che vengano stampati con il font Roman di 12 punti
  dovresti prima definire un font Roman di 12 punti, e usarlo nella
  definizione di \footline. I comandi di font vengono discussi nella
  sezione ``Comandi di font''.

  \font\rmdodici=cmr12
  \footline={\hss\rmdodici\folio\hss}



  Puoi mettere una linea orizzontale, detta rule, all'inizio di ogni
  pagina ridefinendo \headline nel modo seguente:

  \headline={\hrulefill}



  Per usare testatine diverse nelle pagine pari e dispari usa il comando
  \ifodd, che ha la forma:

  \ifodd[condizione][azione-condizione_vera]\else[azione-condizione_falsa



  Un esempio di \headline che usa testatine differenti sulle pagine pari
  e dispari  il seguente:

  \headline={\ifodd\pageno testatina-pagine_dispari \else testatina-pagine_pari}


  Questo comando \ifodd usa il primo argomento se il numero di pagina 
  dispari, altrimenti usa il secondo argomento.


  3.6.  Titoli e macro.

  In TeX l'unico comando disponibile per i titoli di sezione 
  \beginsection. Esso lascia uno spazio prima del proprio argomento,
  stampa il testo del titolo in grassetto, aggiunge uno \smallskip dopo
  il testo del titolo e inizia il paragrafo successivo senza indentarlo.

  I comandi per capitoli e sezioni disponibili in LaTeX, e descritti di
  seguito, aggiungono la numerazione delle sezioni, stampano i nomi e i
  numeri delle sezioni nella testata delle pagine e aggiungono le
  sezioni all'indice.

  In TeX puro dovresti scrivere da solo queste funzioni. Il comando \def
  permette di definire dei nuovi comandi. Supponi di voler stampare un
  titolo di capitolo. Per prima cosa specifica il font che vuoi usare.
  Un font sans serif piuttosto grande da usare nei titoli di capitolo
  potrebbe essere definito nel modo seguente:

  \font\fontsanscapitolo=cmss12 scaled \magstep 4


  Puoi usare il comando \fontsanscapitolo dovunque per usare questo
  font, che  alto circa 24 punti. Comunque, in questo esempio, verr
  usato principalmente nel comando \titolocapitolosans. Ecco la
  definizione di quest'ultimo:

  \def\titolocapitolosans#1{\hbox{}\bigskip\bigskip
    \noindent{\leftline{\fontsanscapitolo#1}}
    \par\bigskip\bigskip\noindent}


  Nella prima linea, \hbox{}\bigskip pone uno spazio di 12 punti
  all'inizio della pagina inserendo un \hbox{} vuoto.  La linea con il
  titolo del capitolo non  indentata, e non lo  neppure il paragrafo
  che la segue. Se inserisci una linea vuota fra la macro \titolocapi
  tolosans e il paragrafo seguente sar questa linea bianca a non essere
  indentata, e non il testo del paragrafo seguente. Per avere una for
  mattazione corretta usa il comando \titolocapitolosans come in questo
  esempio.

  Nella definizione, #1 viene sostituito con il primo argomento di
  \titolocapitolosans; cio, il titolo del capitolo. In TeX, i parametri
  vengono dichiarati, all'interno delle definizioni, con #1, #2, #3 e
  cos via. Un esempio di come usare \titolocapitolosans :

  \titolocapitolosans{Capitolo 1}
  Questo  il testo iniziale del primo paragrafo del capitolo. Il paragrafo
  non viene indentato. Il titolo del capitolo  "Capitolo 1."




  4.  Comandi LaTeX.



  4.1.  Struttura del documento.

  I documenti da elaborare con LaTeX devono rispettare qualche regola in
  pi, ma la preparazione di documenti complessi  molto pi semplice.

  Essenzialmente LaTeX  un linguaggio di marcatura per documenti il cui
  scopo  quello di mantenere separati lo stile ed il contenuto. Per
  esempio, per ottenere un titolo di sezione con TeX dovresti porre uno
  spazio di 36 punti prima del titolo, poi specificare che il titolo
  deve essere composto in grassetto, con un carattere di corpo 24, poi
  copiare il testo del titolo e il numero di pagina in cui esso appare
  nell'indice, infine lasciare uno spazio di 24 punti dopo il titolo.
  Con LaTeX, invece,  sufficiente usare il comando \section{}, che fa
  tutto questo da solo. Se hai bisogno di cambiare il formato dei titoli
  di sezione puoi cambiare la definizione di \section{} invece del testo
  nel documento. Grazie a questo se hai bisogno di cambiare il formato
  di documenti lunghi pi di una dozzina di pagine puoi risparmiare ore
  di lavoro.

  Tutti i documenti LaTeX hanno tre sezioni: un preambolo (preamble), il
  corpo (body) del testo, e un ``postambolo'' (postamble). I termini
  inglesi indicati fra parentesi fanno parte del gergo tecnico standard
  e sono molto usati fra i TeXnici.

  Nel preambolo, come minimo, viene specificato il tipo del documento da
  produrre (la classe del documento) e viene poi inserita una linea che
  indica l'inizio del corpo del testo. Per esempio:

  \documentclass{article}
  \begin{document}


  Il ``postambolo''  generalmente molto semplice. Tranne in casi molto
  particolari contiene una sola linea:

  \end{document}


  (fine del documento).

  Nota la coppia \begin{document} e \end{document}: in LaTeX questo
  definisce un environment. Tutto il testo deve essere all'interno di un
  environment, e molti comandi funzionano solo all'interno
  dell'environment in cui sono chiamati.  L'environment document 
  comunque l'unico in cui LaTeX impone questa convenzione. Cio, 
  l'unico environment assolutamente necessario in un documento
  (un'eccezione  la classe letter, lettera, che richiede anche
  \begin{letter} e  \end{letter}. Vedi la sezione ``Lettere'').
  Comunque, molte istruzioni per la modifica del formato sono
  specificate come environment. Sono descritte nelle sezioni seguenti.

  Nelle classi di documento si possono specificare dei parametri: per
  esempio, se avessimo voluto usare font di corpo 12 invece del corpo 10
  nell'esempio precedente avremmo potuto specificare

  \documentclass[12pt]{article}


  La classe di documento article (articolo) provvede alle modifiche nec
  essarie.

  Le classi di documento usate pi frequentemente sono poche. Sono
  descritte nel seguito. La classe report (relazione)  simile alla
  classe article, tranne per il fatto che produce una pagina separata
  con il titolo e fa s che ogni sezione inizi in una nuova pagina. La
  classe letter include definizioni speciali per indirizzi, saluti e
  formule di chiusura, alcune delle quali sono descritte nel seguito.

  Puoi includere del codice LaTeX ``inscatolato'', detto comunemente
  package, con il comando \usepackage{}.

  \usepackage{fancyhdr}


  Questo comando include il file di stile fancyhdr.sty da una delle
  directory TEXINPUTS che tu e teTeX avete specificato durante i pro
  cessi di installazione e configurazione.


  \documentclass{article}
  \usepackage{fancyhdr}
  \begin{document}



  Nota che le dichiarazioni \usepackage{} sono fatte prima di
  \begin{document}, cio nel preambolo.

  fancyhdr.sty estende il comando \pagestyle{} in modo che tu possa
  creare testatine e fondi pagina personalizzati. Molte classi di
  documento LaTeX definiscono questi elementi nei seguenti stili di
  pagina standard:

  \pagestyle{plain}       % stile di pagina standard -- il numero di pagina 
                          % centrato in basso sulla pagina.
  \pagestyle{empty}       % nessuna testatina n fondo pagina.
  \pagestyle{headings}    % stampa il numero di sezione ed il numero di pagina
                          % in alto sulla pagina.
  \pagestyle{myheadings}  % stampa informazioni personalizzate nella testatina.


  Tutto quello che si trova a destra del segno di percento su una linea
   un commento.

  Il comando \pagestyle{} ha effetto solo nella pagina successiva. Per
  cambiare testatine e fondi pagina nella pagina corrente usa invece il
  comando

  \thispagestyle{stile_di_pagina}




  4.1.1.  Stili di caratteri.

  Gli stili di caratteri dipendono in parte dal font specificato nel
  documento. Comunque, i caratteri in grassetto e in corsivo dovrebbero
  essere disponibili per ogni font presente nel sistema. Pu essere
  usata anche la sottolineatura sebbene la sua gestione presenti
  problemi particolari. Vedi la sezione ``Pacchetti di estensione per
  LaTeX ed altre risorse''.

  Ci sono vari modi per evidenziare un testo. Quello che pu essere
  usato su tutti i sistemi  il comando \em. Tutto il testo su cui
  agisce viene reso in corsivo. Per esempio:

  Questa parola verr {\em evidenziata.}



  Se il testo in corsivo  seguito da testo non in corsivo puoi
  specificare l'uso di un fattore di correzione. Il comando da usare 
  \/.

  Questo esempio {\em sar\/} stampato correttamente.

  Questo esempio {\em non} sar stampato correttamente.



  Meno portabili, ma ancora accettabili in casi in cui sono usati da
  soli, sono i comandi \it, \bf, e \tt; i caratteri su cui agiscono
  verranno stampati rispettivamente in corsivo, in grassetto e con
  spaziatura fissa.

  {\tt Questo testo sar stampato con spaziatura fissa,}
  {\it questo in corsivo,}
  {\bf e questo in grassetto\dots} tutto in un paragrafo.


  Il comando \dots stampa tre puntini di sospensione che non verranno
  divisi fra pi linee.

  La versione pi recente di LaTeX, che  quella che hai, include dei
  comandi in grado di trattare correttamente i casi in cui un comando di
  evidenziazione ne sostituirebbe un altro.

  Questo {\it non  {\bf grassetto corsivo!}}



  Ci che accade  che teTeX compone il testo in corsivo finch non
  incontra il comando \bf; poi inizia a comporlo in grassetto.

  Per risolvere questa situazione, lo schema di selezione dei font NFSS
  richiede tre parametri per ogni carattere: forma, spessore del tratto
  e famiglia.  Non tutti i font hanno tutti questi stili. Nel caso abbia
  bisogno di sostituire il font richiesto con un altro, LaTeX stamper
  un messaggio di avvertimento.

  Puoi specificare le seguenti forme per i font:

  \textup{testo}         % testo tondo (predefinito)
  \textit{testo}         % corsivo
  \textsl{testo}         % inclinato
  \textsc{testo}         % maiuscoletto


  Questi sono i due spessori del tratto che la maggior parte dei font
  ha:

  \textmd{testo}         % spessore medio (predefinito)
  \textbf{testo}         % grassetto


  Ci sono tre famiglie generalmente disponibili.

  \textrm{text}          % roman (predefinito)
  \textsf{text}          % senza grazie
  \texttt{text}          % macchina da scrivere (spaziatura fissa, simile al
                          % Courier)



  Usando questi comandi per scegliere gli stili dei caratteri puoi
  combinarne gli effetti


  \texttt{\textit{Questo esempio dar probabilmente luogo ad una
  sostituzione di font, poich molti font non includono uno stile macchina
  da scrivere corsivo.}}


  La famiglia applicata normalmente  Computer Modern, che  un font
  bit-mapped. Altre famiglie di font sono in formato PostScript Type 1.
  Vedi la sezione ``Usare font PostScript'' per i dettagli.

  Ci sono anche vari accenti e caratteri speciali che puoi usare nei
  tuoi documenti. Quelli che seguono sono solo alcuni fra quelli
  disponibili (prova a stamparli sulla tua stampante)

  \'{o}  \`{e}  \^{o}  \"{u}        \={o}  \c{c}  `? `!
  \copyright     \pounds                \dag


  Infine, ci sono caratteri che vengono interpretati come comandi da TeX
  e LaTeX. Di uno abbiamo gi parlato, ed  il simbolo di dollaro.
  L'insieme completo dei ``meta caratteri'', che debbono essere prece
  duti da un backslash per poter essere usati,  il seguente:

  # $ % & _ { }



   possibile usare anche diversi alfabeti, ad esempio greco e
  cirillico.  Con LaTeX  facile comporre testi non solo in inglese:
  questo argomento  trattato in uno dei testi di cui parliamo qui.


  4.1.2.  Margini ed interlinee.


  Modificare i margini in un documento TeX o LaTeX non  una cosa
  semplicissima. Molto dipende dall'indentazione relativa del testo di
  cui vuoi aggiustare i margini. Anche la posizione dei comandi di
  modifica dei margini  significativa.

  Per i cambiamenti che devono avere effetto su un intero documento
  LaTeX,  possibile usare i comandi \evensidemargin e \oddsidemargin.
  Modificano il margine sinistro delle pagine pari e dispari
  rispettivamente. Per esempio


  \evensidemargin=1cm
  \oddsidemargin=1cm


  aggiunge 1 centimetro al margine sinistro standard delle pagine pari e
  dispari, che  di un pollice (2,54 cm). Questi comandi influenzano
  l'intero documento e spostano l'intero corpo del documento a destra e
  sinistra sulla pagina, non importa l'impostazione locale dell'inden
  tazione, per cui risulta sicuro usare environment LaTeX come verse e
  list.

  Quelle che seguono sono alcune macro per la modifica dei margini che
  ho scritto. Agiscono in modo differente dai comandi citati. Poich
  usano comandi in TeX puro, non  garantito che rispettino i margini
  che sono stati impostati da un environment LaTeX, ma le puoi mettere
  ovunque in un documento e cambiare i margini da quel punto in poi.





  %%  margins.sty -- v. 0.1   di Robert Kiesling
  %%  Copie di questo codice possono essere distribuite liberamente in
  %%  forma di testo.
  %%
  %%  Alcuni comandi elementari TeX per la modifica dei margini. Le lunghezze
  %%  sono in pollici:
  %%
  %%  \leftmargin{1}   %% imposta il margine sinistro a 1 pollice
  %%  \leftindent{1}   %% imposta l'indentazione dei paragrafi seguenti a
  %%                      1 pollice
  %%  \rightindent{1}  %% imposta il margine destro dei paragrafi seguenti
  %%                      a 1 pollice
  %%  \llength{3}      %% imposta la lunghezza delle linee seguenti a 3 pollici
  %%
  \message{Margins macros...}
  \def\lmargin#1{\hoffset = #1 in}
  \def\lindent#1{\leftskip = #1 in}
  \def\rindent#1{\rightskip = #1 in}
  \def\llength#1{\hsize = #1 in}
  %%
  %% (End of margins macros.}


  Metti questo codice in un file di nome margins.sty nella tua directory
  $TEXINPUTS locale. I comandi sono spiegati nei commenti del file. Per
  usarli in un documento devi includere il file con il comando

  \usepackage{margins}


  nel preambolo.

  Gi che siamo in argomento: se non vuoi che il testo venga
  giustificato a destra, che  quello che viene fatto normalmente, puoi
  chiedere a LaTeX di usare lo sbandieramento a destra con il comando:

  \raggedright



  Anche impostare l'interlinea ha le sue difficolt.

  baselineskip  la misura della distanza fra le linee del testo.  
  dato come misura assoluta. Ad esempio

  \baselineskip=24pt


  oppure, in modo migliore:

  \setlength{\baselineskip}{24pt}


  La differenza fra le due forme  che setlength rispetter le
  impostazioni che possono essere in effetto nel momento in cui usi il
  comando.

  Il problema nell'uso di baselineskip  che viene modificata anche la
  distanza fra titoli di sezione, note a pi di pagina e cos via. Devi
  quindi assicurarti che baselineskip sia impostato correttamente per
  l'elemento di testo che stai componendo. Ci sono, comunque, packages
  LaTeX come setspace.sty che ti aiuteranno in queste circostanze.  Vedi
  la sezione ``Pacchetti di espansione  per LaTeX ed altre risorse''.



  4.1.3.  Classi di documenti.

  In LaTeX sono disponibili classi di documenti che forniscono formati
  standard per i documenti, ad esempio environment che facilitano la
  formattazione di liste, citazioni, note a pi di pagina ed altri
  elementi di testo. Le classi di documenti pi usate sono descritte
  nelle sezioni seguenti.


  4.1.3.1.  Articoli e relazioni.

  Come abbiamo gi detto, la classe article e la classe report sono
  simili. Le differenze principali consistono nel fatto che la classe
  report crea una pagina separata per il titolo e fa cominciare ogni
  sezione su una nuova pagina.

  Per inserire in queste classi di documento titoli, abstract
  (riassunti) e nome dell'autore puoi ad esempio usare:

  \title{Le abitudini di accoppiamento dei Cactus}
  \author{John Q. Public}
  \abstract{Descrizione di come i comuni cactus del deserto cercano delle
  pozze d'acqua adatte per poter effettuare i loro rituali di accoppiamento}


  nel preambolo. Poi, il comando

  \maketitle


  dato all'inizio del testo generer una pagina con il titolo nella
  classe report, oppure, nel caso della classe article, il titolo e
  l'abstract all'inizio del documento.

  Le sezioni possono essere definite con comandi come i seguenti:

  \section
  \subsection
  \subsubsection


  Questi comandi producono delle sezioni numerate come quelle comune
  mente usate nei documenti tecnici. Per avere delle sezioni non numer
  ate usa

  \section*
  \subsection*
  \subsubsection*


  e cos via.

  In LaTeX sono disponibili molti environment per formattare del
  materiale da mettere in evidenza. Puoi inserire delle citazioni usando
  l'environment quotation:

  \begin{quotation}
  Inizio della citazione...

  ... fine della citazione.
  \end{quotation}


  Per citazioni pi corte puoi usare l'environment quote.


  Per formattare i versi di una poesia usa l'environment verse:

  \begin{verse}
  Nel mezzo del cammin di nostra vita\\
  mi ritrovai per una selva oscura\\
  ch la diritta via era smarrita
  \end{verse}


  Nota che per andare a capo al momento giusto devi usare dei doppi
  backslash, altrimenti LaTeX riempir le linee in un environment verse
  come fa in qualsiasi altro environment.

  Ci sono molti modi per fare una lista. Per avere una lista puntata
  puoi usare l'environment list:

  \begin{list}
  \item
  Questa  la prima voce della lista.
  \item
  Questa  la seconda voce della lista...
  \item
  ... e cos via.
  \end{list}



  Per una lista numerata usa l'environment enumerate:

  \begin{enumerate}
  \item
  Voce numero 1.
  \item
  Voce numero 2.
  \item
  \dots
  \end{enumerate}



  Una lista di descrizioni usa l'environment description.

  \begin{description}
  \item{Forno} Sporco, ha bisogno di una resistenza nuova.
  \item{Frigorifero} Sporco. Mi dispiace.
  \item{Lavandino e scarico} Sporco, il rubinetto dell'acqua fredda perde.
  \end{description}




  4.1.3.2.  Lettere.

  La classe letter usa delle definizioni che consentono di formattare
  lettere d'affari.

  L'environment letter ha bisogno di un argomento, l'indirizzo del
  destinatario della lettera. Il comando address, che deve essere
  inserito nel preambolo, definisce l'indirizzo del mittente. Il comando
  signature definisce il nome del mittente come deve apparire in
  chiusura.

  Il sorgente LaTeX di una semplice lettera d'affari pu essere simile a
  questo.


  \documentclass[12pt]{letter}
  \signature{John Q. Public}
  \address{Viale dei giardini, 123\\00100 Roma\\Tel: 123/456-7890}
  \begin{document}
  \begin{letter}{ACME Mattoni SpA \\Corso Raffaello\\20100 Milano}
  \opening{Gentile Signore/Signora:}

  A proposito di uno dei vostri mattoni che ho trovato sul tappeto del mio
  soggiorno insieme ad alcuni frammenti del vetro rotto della mia finestra...

  (Resto del corpo della lettera).

  \closing{Distinti saluti,}

  \end{letter}
  \end{document}


  Nota che negli indirizzi ci sono dei doppi backslash che specificano
  dove occorre andare a capo.


  4.2.  Pacchetti di espansione per LaTeX ed altre risorse.

  Abbiamo gi detto che evidenziare il testo sottolineandolo pu portare
  dei problemi particolari. In effetti TeX non ha alcun problema a
  sottolineare il testo dato che  una convenzione usata in matematica.
  In LaTeX puoi sottolineare le parole con il comando:

  \underline{testo da sottolineare}


  Il problema  che la sottolineatura non viene spezzata su diverse
  linee e, in alcuni casi, il testo sottolineato pu non essere giusti
  ficato.  Comunque c' un pacchetto di macro per LaTeX, gi pronto, che
  modifica il modo di evidenziazione del testo in modo che usi la sotto
  lineatura. Si chiama ulem.sty, ed  uno dei tanti pacchetti LaTeX che
  sono disponibili liberamente su Internet.

  Per usare ulem.sty, usa il comando

  \usepackage{ulem}


  nel preambolo del documento.

  Alcuni dei pacchetti disponibili per LaTeX sono:

     ifthen
        Includi istruzioni condizionali nei tuoi documenti.

     initials
        Definisce un font per i capolettera.

     sanskrit
        Font e preprocessore per produrre documenti in Sanscrito.

     recipe
        Una classe per LaTeX2e per comporre ricette.

     refman
        Varianti degli stili ``article'' e ``report''.

  Per ottenere l'URL completo a partire dal percorso dato nel Catalogue,
  unisci il percorso all'indirizzo del sito ed al percorso della
  directory di livello pi alto dell'archivio CTAN che vuoi contattare.
  Per esempio, la directory CTAN del sito ftp.tex.ac.uk  ctan/tex-
  archive. L'URL completo della directory del pacchetto refman sarebbe:

  ftp://ftp.tex.ac.uk/ctan/tex-archive/   +
  macros/latex/contrib/supported/refman   =

  ftp://ftp.tex.ac.uk/ctan/tex-archive/macros/latex/contrib/supported/refman/


  Alcuni pacchetti contengono pi di un file, quindi viene dato solo il
  percorso della directory del pacchetto.

  Quando hai determinato l'URL, puoi scaricare il pacchetto da uno dei
  siti CTAN elencati nella sezione ``Appendice A''.  Puoi scaricare una
  lista completa del contenuto dell'archivio:  contenuta nel file
  FILES.byname, che si trova nella directory principale dell'archivio.
  Puoi anche effettuare delle ricerche on line sull'archivio
  specificando una parola chiave con il comando ftp

  quote site index <parola_chiave>




  5.  Mettere insieme testo e grafica con dvips .

  In generale questa sezione si applica ad un documento TeX o LaTeX in
  cui siano presenti testo e grafica. teTeX, come la maggior parte delle
  distribuzioni TeX,  predisposto per richiedere i font Computer
  Modern.  Quando vengono stampati documenti con font scalabili Type 1 o
  grafica, la resa dei font e della grafica  compito di dvips.  dvips
  pu usare sia font Computer Modern bit-mapped che scalabili Type 1, o
  una combinazione dei due. Come prima cosa ci concentreremo sulla
  stampa e la visione in anteprima della grafica.

  In generale occorrer seguire questa procedura ogni volta che un
  sorgente LaTeX contiene l'istruzione


  \includepackage{graphics}


  nel proprio preambolo. Questa istruzione fa s che LaTeX includa il
  testo del pacchetto graphics.sty nel sorgente. Ci sono altri comandi
  che servono per eseguire operazioni relative alla grafica, e le
  istruzioni in documenti in TeX puro possono non suggerirti che c'
  bisogno di usare dvips. La differenza sar evidente comunque quando il
  documento sar stampato senza figure o altri elementi grafici.

  Quindi per ora ci concentreremo sulla stampa di documenti che usano il
  pacchetto LaTeX graphics.sty. Probabilmente vuoi dare un'occhiata al
  sorgente TeX originale. Non  incluso nella distribuzione teTeX, ma lo
  puoi trovare a

  ~CTAN/macros/latex/packages/graphics/grfguide.tex.


  Incluso nella distribuzione teTeX c' invece il file .dvi gi elabo
  rato da TeX. C' una ragione per questo, ed ha a che fare con la
  necessit di includere font Type 1 perch il documento possa essere
  stampato correttamente. Se vuoi elaborare grfguide.tex con LaTeX leggi
  la prossima sezione. Per ora, comunque, faremo in modo di ottenere con
  dvips un output utilizzabile.

  Il file grfguide.dvi si trova nella directory

  texmf/doc/latex/graphics


  Il primo passo per poter ottenere qualcosa di utile da grfguide.dvi
  consiste nel tradurlo in PostScript. Il programma dvips serve a questo
  scopo. Fa esattamente quello che il suo nome suggerisce. Ci sono molte
  opzioni con le quali pu essere chiamato, ma la forma pi semplice (o
  quasi) 


  dvips -f -r <grfguide.dvi >grfguide.ps


  Lo switch -f dice a dvips di lavorare come un filtro, cio leggere
  dallo standard input e scrivere sullo standard output.  dvips pu
  anche essere configurato per inviare il suo output direttamente a lpr.

  Se puoi stampare file PostScript sulla tua stampante con il comando
  lpr puoi digitare semplicemente

  dvips -r grfguide.dvi


  L'opzione -r dice a dvips di produrre le pagine in ordine inverso cos
  che vengano impilate nell'ordine giusto in uscita dalla stampante.
  Usalo se questo  utile per la tua stampante.

  dvips e metafont possono dover creare o no i nuovi font di cui
  grfguide.dvi ha bisogno, dipende se hai ancora i font che dvilj2 ha
  prodotto elaborando l'ultimo documento. Alla fine, comunque, dvips
  scriver l'elenco delle pagine che ha tradotto in PostScript e avrai
  cos un file PostScript pronto per essere inviato a qualunque
  dispositivo tu abbia.

  Se sei fortunato (e ricco) allora hai una stampante in grado di capire
  direttamente il PostScript che potr stampare direttamente
  grfguide.ps. Puoi inviare il file alla coda di stampa usando lpr. Se
  per qualche ragione il tuo software di stampa non funziona
  correttamente con i file PostScript puoi semplicemente inviare il file
  alla stampante con

  cat grfguide.ps >/dev/lp0


  o a qualunque altra porta la tua stampante  collegata. Comunque
  questo non  il metodo raccomandato per l'uso quotidiano.

  Se vuoi o devi eseguire Ghostscript manualmente questa  la procedura
  standard per usarlo. La prima cosa da fare per eseguire Ghostscript 
  vedere quali sono gli argomenti della linea di comando, e si pu fare
  cos:

  gs -help | less


  Vedrai una lista dei dispositivi che Ghostscript supporta e molti
  altri comandi. Scegli il dispositivo che corrisponde maggiormente alla
  tua stampante. In genere stampo testo in bianco e nero e uso il driver
  cdjmono, che controlla una stampante a colori Deskjet in modo monocro
  matico (bianco e nero).

  La linea di comando che uso :

  gs -dNOPAUSE -sDEVICE=cdjmono -sOutputFile=/tmp/gs.out grfguide.ps -c quit


  Questo mette il mio output compatibile HP nella directory /tmp.   una
  buona idea usare una directory come /tmp, perch gs pu essere un po'
  difficile riguardo ai permessi di accesso, e non puoi (n dovresti)
  contare sul fatto di essere sempre collegato come root quando effettui
  queste operazioni. Adesso puoi stampare il file:

  lpr /tmp/gs.out


  Ovviamente puoi mettere tutto in uno script della shell. Sul mio sis
  tema ho due semplici script, pv e pr che inviano il file PostScript
  rispettivamente allo schermo o alla stampante.  possibile avere
  un'anteprima su schermo senza usare X, ma non  la cosa migliore.
  Quindi vale sicuramente la pena installare XFree86 per mostrare il
  documento sullo schermo.

  L'ordine dei comandi in un comando gs  importante, perch alcune
  delle opzioni dicono a Ghostscript di cercare parti di codice
  PostScript nella sua libreria.

   importante ricordare che grfguide.dvi richiede sia font bit mapped
  Computer Modern che font scalabili Type 1. Se sei capace di mettere
  insieme font scalabili e bit mapped in un documento, sei sulla buona
  strada per diventare un TeXnico.


  5.1.  E se la mia stampante non  supportata?

  La distribuzione teTeX ha solo una selezione limitata di driver DVI:
  dvips, driver per le stampanti Hewlett Packard LaserJet, e niente di
  pi. Se hai una stampante non compatibile con le LaserJet hai due
  possibilit: puoi usare dvips e Ghostscript, cosa che raccomando
  comunque per le ragioni di cui ho gi parlato, o puoi cercare altri
  driver DVI.

  Alcuni driver DVI sono stati riscritti per Linux e sono disponibili
  gi compilati. Si trovano nell'archivio Linux sul sito
  ftp://sunsite.unc.edu/pub/Linux/apps/tex/dvi/.

  Il sito principale su cui viene mantenuta una libreria di driver DVI
  si trova all'Universit dello Utah. Se non riesci a trovare l un
  driver che supporta la tua stampante  molto probabile che non esista.
  Puoi anche scrivere da solo il tuo driver DVI usando degli schemi
  disponibili l. L'URL del sito  ftp://ftp.math.utah.edu/pub/tex/dvi/.


  6.  Usare font PostScript.

  Di solito i font Type 1 di pubblico dominio erano di qualit molto
  minore dei font bit mapped Computer Modern. Questa situazione 
  migliorata negli ultimi anni, ma trovare i font che corrispondono
  resta compito tuo. Avere molti tipi di font su una macchina pu
  sembrare ridondante e uno spreco di spazio su disco. Inoltre i font
  Computer Modern possono sembrare, beh, un po' troppo formali per uso
  quotidiano. A volte li paragono a dar da mangiare al cane in una
  ciotola di porcellana. Almeno non dovrai pi spendere un patrimonio
  per avere dei font di qualit professionale.

  Uno dei miglioramenti principali di LaTeX2e rispetto ai suoi
  predecessori  rappresentato dall'introduzione del New Font Selection
  Scheme (adesso si chiama PSNFSS). In passato gli utilizzatori di TeX
  dovevano specificare i font con comandi come

  \font=bodyroman = cmr10 scaled \magstep 1


  che d risultati molto precisi ma richiede l'abilit di un disegnatore
  di caratteri e di un matematico per essere usato a dovere. Inoltre non
   molto portabile. Se un altro sistema non ha il font cmr10 (questo 
  il nome che in TeX viene dato al carattere Computer Modern Roman,
  corpo 10, con spessore del tratto medio, predefinito) qualcuno deve
  ricodificare le specifiche dei font per l'intero documento. PSNFSS,
  invece, ti permette di specificare i font per famiglia (Computer
  Modern, URW Nimbus, Helvetica, Utopia e cos via), tratto (leggero,
  medio, grassetto), orientamento (dritto o obliquo), tipo (tondo o
  corsivo) e misura (vedi la sezione ``Caratteri e stili'' per una
  descrizione dei comandi che consentono di specificare lo stile).
  Alcuni font sono archiviati in famiglie. Per esempio, un font Roman
  pu essere archiviato con un font senza grazie, come Helvetica, e un
  font a spaziatura fissa, come Courier. Tu, come autore di un documento
  LaTeX, puoi specificare un'intera famiglia di font con un comando.

  Ci sono, come ho gi detto, molti font di alta qualit di pubblico
  domino disponibili. Uno di essi  Adobe Utopia, un altro  Bitstream
  Charter. Tutti e due sono font di qualit commerciale che sono stati
  donati al pubblico dominio.

  Sono anche due dei miei preferiti. Se cerchi su uno dei siti CTAN vi
  troverai questi ed altri font. I font in giro sono abbastanza da
  permetterti di produrre documenti il cui aspetto  proprio quello che
  vuoi, e non solo testi in inglese. TeX  stato concepito in origine
  per la composizione di testi matematici, quindi ci sono molti font
  disponibili per questo scopo, oltre a font per l'alfabeto cirillico,
  greco, kana ed altri troppo numerosi da ricordare.

  La cosa importante da cercare sono i file con estensione .pfa o .pfb.
  Queste indicano che si tratta proprio dei font scalabili, non solo di
  file di metrica. I file di metrica dei font Type 1 hanno estensione
  .pfm, in contrapposizione ai file .tfm usati dai font bit mapped. I
  due font di cui ho parlato in precedenza sono inclusi nella
  distribuzione teTeX, oltre che separatamente.

  Ci che ho detto a proposito della facilit di selezione dei font con
  PSNFSS  vero in questo senso. Se vogliamo usare nel nostro documento
  il font Charter invece del Computer Modern, tutto ci che bisogna fare
   mettere

  \renewcommand{\familydefault}{bch}


  nel preambolo, dove ``bch''  la sigla con cui si designa comunemente
  il Bitstream Charter. I font Charter si trovano nella directory

  /usr/lib/teTeX/texmf/fonts/type1/bitstrea/charter



  Qui ci sono i file .pfb dei font Charter: bchb8a.pfb per il Charter
  grassetto, bchr8a.pfb per il Charter tondo, bchbi8a.pfb per il Charter
  grassetto corsivo.  L'``8a'' nel nome del font indica la codifica dei
  caratteri. A questo punto non te ne devi preoccupare, perch la
  differenza si ha per i caratteri codificati con 8 bit che hanno valore
  maggiore di 128 decimale.  Definiscono principalmente gli accenti e
  caratteri non inglesi. Le codifiche dei font Type 1 funzionano
  generalmente bene per gli alfabeti occidentali perch sono conformi
  allo standard ISO 8859 per gli insiemi di caratteri internazionali,
  quindi questo rende ulteriormente vantaggioso il loro uso.

  Per comporre un documento in cui sono stati selezionati i font Charter
  occorre dare il comando


  pslatex document.tex


  pslatex  una variante del latex standard di teTeX che definisce le
  directory in cui si trovano i font Type 1 e un po' di codice LaTeX da
  caricare. Sullo schermo vedrai un avviso di pslatex seguito dalle
  informazioni di TeX. In breve tempo avrai un file .dvi che contiene le
  richieste per il font Charter.  Adesso puoi stampare il file con dvips
  e gs, se necessario.

  Installare un insieme di font Type 1 non  difficile se segui alcuni
  passi fondamentali. Devi decomprimere i font in una sottodirectory di
  /usr/lib/teTeX/texmf/fonts/type1, in cui si trovano anche gli altri
  font Type 1, e poi eseguire texhash in modo che le routine di ricerca
  sappiano che i font sono stati aggiunti. Poi devi aggiungere la
  descrizione dei font al file psfonts.map in modo che anche dvips
  sappia che si trovano nel sistema. Il formato del file psfonts.map 
  descritto in un paio dei testi di cui abbiamo parlato. Ancora, ricorda
  di eseguire il programma texhash per aggiornare il database delle
  directory di teTeX.

   senz'altro un vantaggio usare il sistema X Windows (XFree86 sotto
  Linux) con teTeX, perch permette di avere anteprime dei documenti di
  migliore qualit. Non  necessario averlo, ma in generale tutto quello
  che permette di avere anteprime migliori render migliore il tuo
  lavoro in termini di qualit dei risultati. Comunque bisogna scendere
  a compromessi con la velocit di editing, che  molto maggiore sul
  display a carattere.


  7.  Appendice A: elenco dei siti CTAN

  Questo  il contenuto del file CTAN.sites, che puoi trovare nella
  directory principale di ogni sito CTAN.
































  In order to reduce network load, it is recommended that you use the
  Comprehensive TeX Archive Network (CTAN) host which is located in the
  closest network proximity to your site.  Alternatively, you may wish to
  obtain a copy of the CTAN via CD-ROM (see help/CTAN.cdrom for details).

  Known mirrors of the CTAN reside on (alphabetically):
    cis.utovrm.it (Italia)                /TeX
    ctan.unsw.edu.au (NSW, Australia)     /tex-archive
    dongpo.math.ncu.edu.tw (Taiwan)       /tex-archive
    ftp.belnet.be (Belgium)               /packages/TeX
    ftp.ccu.edu.tw (Taiwan)               /pub/tex
    ftp.cdrom.com (West coast, USA)       /pub/tex/ctan
    ftp.comp.hkbu.edu.hk (Hong Kong)      /pub/TeX/CTAN
    ftp.cs.rmit.edu.au  (Australia)       /tex-archive
    ftp.cs.ruu.nl (The Netherlands)       /pub/tex-archive
    ftp.cstug.cz (The Czech Republic)     /pub/tex/CTAN
    ftp.duke.edu (North Carolina, USA)    /tex-archive
    ftp.funet.fi (Finland)                /pub/TeX/CTAN
    ftp.gwdg.de (Deutschland)             /pub/dante
    ftp.jussieu.fr (France)               /pub4/TeX/CTAN
    ftp.kreonet.re.kr (Korea)             /pub/CTAN
    ftp.loria.fr (France)                 /pub/unix/tex/ctan
    ftp.mpi-sb.mpg.de (Deutschland)       /pub/tex/mirror/ftp.dante.de
    ftp.nada.kth.se (Sweden)              /pub/tex/ctan-mirror
    ftp.oleane.net (France)               /pub/mirrors/CTAN/
    ftp.rediris.es (Espa\~na)             /mirror/tex-archive
    ftp.rge.com (New York, USA)           /pub/tex
    ftp.riken.go.jp (Japan)               /pub/tex-archive
    ftp.tu-chemnitz.de (Deutschland)      /pub/tex
    ftp.u-aizu.ac.jp (Japan)              /pub/tex/CTAN
    ftp.uni-augsburg.de (Deutschland)     /tex-archive
    ftp.uni-bielefeld.de (Deutschland)    /pub/tex
    ftp.unina.it (Italia)                 /pub/TeX
    ftp.uni-stuttgart.de (Deutschland)    /tex-archive (/pub/tex)
    ftp.univie.ac.at (\"Osterreich)       /packages/tex
    ftp.ut.ee (Estonia)                   /tex-archive
    ftpserver.nus.sg (Singapore)          /pub/zi/TeX
    src.doc.ic.ac.uk (England)            /packages/tex/uk-tex
    sunsite.auc.dk (Denmark)              /pub/tex/ctan
    sunsite.cnlab-switch.ch (Switzerland) /mirror/tex
    sunsite.icm.edu.pl (Poland)           /pub/CTAN
    sunsite.unc.edu (North Carolina, USA) /pub/packages/TeX
    wuarchive.wustl.edu (Missouri, USA)   /packages/TeX

  Known partial mirrors of the CTAN reside on (alphabetically):
    ftp.adfa.oz.au (Australia)            /pub/tex/ctan
    ftp.fcu.edu.tw (Taiwan)               /pub2/tex
    ftp.germany.eu.net (Deutschland)      /pub/packages/TeX
    ftp.gust.org.pl (Poland)              /pub/TeX
    ftp.jaist.ac.jp (Japan)               /pub/TeX/tex-archive
    ftp.uu.net (Virginia, USA)            /pub/text-processing/TeX
    nic.switch.ch (Switzerland)           /mirror/tex
    sunsite.dsi.unimi.it (Italia)         /pub/TeX
    sunsite.snu.ac.kr (Korea)             /shortcut/CTAN

  Please send updates to this list to <ctan@urz.uni-heidelberg.de>.

  The participating hosts in the Comprehensive TeX Archive Network are:
    ftp.dante.de  (Deutschland)
         -- anonymous ftp                 /tex-archive (/pub/tex /pub/archive)
         -- gopher on node gopher.dante.de
         -- e-mail via ftpmail@dante.de
         -- World Wide Web access on www.dante.de
         -- Administrator: <ftpmaint@dante.de>

    ftp.tex.ac.uk (England)
         -- anonymous ftp                 /tex-archive (/pub/tex /pub/archive)
         -- gopher on node gopher.tex.ac.uk
         -- NFS mountable from nfs.tex.ac.uk:/public/ctan/tex-archive
         -- World Wide Web access on www.tex.ac.uk
         -- Administrator: <ctan-uk@tex.ac.uk>




  8.  Appendice B: Installare la distribuzione generica CTAN di teTeX

  La distribuzione teTeX generica non  pi difficile da installare
  degli altri pacchetti Linux. Vedi la sezione ``La distribuzione
  generica CTAN''.

  L'installazione della distribuzione teTeX generica CTAN dovrebbe
  essere presa in seria considerazione se:

    Il tuo sistema non  basato su una delle distribuzioni standard di
     Linux.

    Non hai privilegi da amministratore (root) del tuo sistema.

    Vuoi o hai bisogno della pi recente versione di teTeX, o LaTeX.

    Non hai abbastanza spazio su disco per un'installazione completa.

    Vuoi installare teTeX da qualche altra parte che non sia il file
     system /usr.

    Vorresti condividere la tua installazione di teTeX su una rete su
     cui si trovano sistemi che montano una diversa variante di UNIX. In
     questo caso, dovresti seriamente considerare la possibilit di
     installare il codice sorgente. Vedi la sezione ``Installazione
     della distribuzione sorgente CTAN''.

    Vuoi avere l'ultima versione dei font di pubblico dominio Type 1 di
     teTeX, che sono migliori dei font inclusi con le versioni pi
     vecchie.

  Un'installazione completa della distribuzione binaria richiede 40-50
  Mb di spazio su disco, e compilare la distribuzione a partire dal
  codice sorgente richiede circa 75 Mb, quindi assicurati di avere
  questo spazio su disco prima di cominciare. Non c' bisogno del
  compilatore gcc o del sistema X Windows (comunque X  certamente di
  aiuto perch rende facile avere un'anteprima dei documenti sullo
  schermo).  Tutto ci di cui hai bisogno  un editor in grado di
  produrre testo in formato ASCII standard (vedi la sezione 2). Cosa c'
  di pi semplice?

  Puoi procurarti i file da uno dei siti CTAN elencati nella sezione
  ``Appendice A''. Negli esempi che seguono, i file sono stati presi dal
  sito CTAN ftp.tex.ac.uk.


  8.1.  Installazione della distribuzione binaria.



  8.1.1.  Installazione minima.


  Per prima cosa, collegati al sito FTP ftp.tex.ac.uk, e vai (cd) nella
  directory


  ctan/tex-archive/systems/unix/teTeX/distrib/


  Scarica i file

  INSTALL.bin
  install.sh


  e mettili nella directory di livello pi alto nella quale vuoi instal
  lare teTeX (quella che conterr tutti i componenti necessari al fun
  zionamento di teTeX: file e directory): per esempio /var/teTeX se vuoi
  installare teTeX nel file system /var

  Stampa il file INSTALL.bin. Tienilo a portata di mano, poich spiega
  come effettuare un'installazione minima di teTeX. L'installazione
  minima richiede solo 10-15 Mb di spazio su disco, ma la cosa migliore
   sicuramente installare tutto il pacchetto teTeX se possibile. Per
  l'installazione minima avrai bisogno dei file:

  ctan/tex-archive/systems/unix/teTeX/distrib/base/latex-base.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/base/tetex-base.tar.gz


  Avrai bisogno anche di uno dei due file compressi che contengono i
  programmi teTeX in forma eseguibile. Scarica il file:

  ctan/tex-archive/systems/unix/teTeX/distrib/binaries/i386-linux.tar.gz


  se il tuo sistema usa le librerie condivise ELF di Linux, ld.so ver
  sione 1.73 o superiore, e clibs versione 5.09 o superiore. Altrimenti
  prendi il file

  ctan/tex-archive/systems/unix/teTeX/distrib/binaries/i386-linuxaout.tar.gz


  che  compilato per sistemi che usano le vecchie librerie statiche per
  il formato a.out.

  Poi, seguendo le istruzioni nel file INSTALL.bin, esegui il comando

  sh ./install.sh


  dalla directory di livello pi alto di teTeX (assicurati che anche i
  file compressi di teTeX si trovino l). Dopo un po' il programma di
  installazione ti avvertir della mancanza di alcuni dei pacchetti di
  teTeX. Comunque, se quello che vuoi  un'installazione minima di
  teTeX, puoi ignorare l'avvertimento e continuare. Per la configu
  razione di base del sistema teTeX, vedi la sezione ``Configurazione di
  base del sistema''.

  Per installare gli altri pacchetti consulta la sezione seguente.


  8.1.2.  Installazione completa.

  Per eseguire un'installazione completa di teTeX scarica, oltre ai file
  elencati nella sezione precedente, i seguenti:






  ctan/tex-archive/systems/unix/teTeX/distrib/doc/ams-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/bibtex-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/eplain-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/fonts-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/general-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/generic-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/latex-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/makeindex-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/metapost-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/doc/programs-doc.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/ams-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/dc-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/ec-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/misc-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/postscript-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/fonts/sauter-fonts.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/amstex.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/bibtex.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/eplain.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/latex-extra.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/metapost.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/pictex.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/pstricks.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/texdraw.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/goodies/xypic.tar.gz


  Tutti questi dovrebbero essere messi nella directory di livello pi
  alto di teTeX. Come per l'installazione minima, esegui il comando

  sh ./install.sh



  8.2.  Configurazione di base del sistema.

  Lo script install.sh dopo aver determinato quali file di teTeX sono
  presenti, ti presenter un menu con una serie di opzioni. L'unica
  scelta che devi fare a questo punto riguarda la directory di livello
  pi alto in cui vuoi che teTeX sia installato (opzione ``D''). Devi,
  naturalmente, scegliere una directory sulla cui directory padre hai
  privilegi di scrittura. Per esempio, se volessi installare teTeX sulla
  tua directory home, dovresti specificare la directory su cui
  installare teTeX nel modo seguente:

  /home/john.q.public/teTeX


  e, ritornato al menu principale, scegliere ``I'' per continuare con
  l'installazione. Non  necessario che la directory esista gi: lo
  script install.sh  in grado di crearla.

  Un opzione che vale la pena usare  quella che consente di scegliere
  una directory alternativa per i font generati. Anche se pensi di dover
  usare solo font PostScript Type 1, potresti dover elaborare un file
  che richiede i font Computer Modern. Questa opzione richiede
  l'inserimento della directory da usare. Devi avere privilegi di
  scrittura sul padre di questa directory. Seguendo l'esempio
  precedente, potresti specificare:

  /home/john.q.public/texfonts


  o, se vuoi che i font generati siano accessibili da tutti gli utenti
  del sistema, specifica una directory come

  /var/texfonts


  La mia raccomandazione  quella di non usare la directory proposta per
  questa opzione, /var/tmp/texfonts, perch i font generati potrebbero
  essere cancellati al successivo riavvio e dovrebbero essere generati
  ancora qualora fossero di nuovo necessari.

  Dopo che hai scelto l'opzione ``I'' e install.sh ha installato i file,
  impostato i permessi e generato link e file di formato, il programma
  terminer con un messaggio che dice di aggiungere alla variabile di
  ambiente $PATH la directory in cui sono installati i programmi di
  teTeX, e quelle in cui si trovano le pagine di manuale ed i file di
  informazioni alle variabili $MANPATH e $INFOPATH.  Per esempio,
  aggiungi le seguenti linee:

  export PATH=$PATH:"/home/john.q.public/teTeX/bin"
  export MANPATH=$MANPATH":/home/john.q.public/teTeX/man"
  export INFOPATH$=INFOPATH":/home/john.q.public/teTeX/info"


  al tuo ~/.bash_profile se bash  la tua shell, o al tuo ~/.profile se
  usi un'altra shell.

  Scollegati (log out) e ricollegati (log in), in modo che le variabili
  di ambiente siano registrate. Poi esegui il comando

  texconfig confall


  per assicurarti che l'installazione sia corretta.

  Puoi poi configurare specificamente teTeX per il tuo hardware. Vedi la
  sezione ``Dettagli sulla  configurazione dopo l'installazione''.


  8.2.1.  Installazione della distribuzione sorgente CTAN.

  Per installare il codice sorgente di teTeX V. 0.4, collegati via FTP
  ad un sito CTAN come ftp://ftp.tex.ac.uk e scarica i seguenti file:

  ctan/tex-archive/systems/unix/teTeX/distrib/INSTALL.src
  ctan/tex-archive/systems/unix/teTeX/distrib/sources/README.texmf-src
  ctan/tex-archive/systems/unix/teTeX/distrib/sources/teTeX-lib-0.4pl8.tar.gz
  ctan/tex-archive/systems/unix/teTeX/distrib/sources/teTeX-src-0.4pl7.tar.gz



  Leggi le istruzioni in INSTALL.src, poi collegati come root e
  decomprimi i file in una directory sulla quale hai privilegi di
  lettura, scrittura ed esecuzione.

  Ricorda di usare tar con l'argomento p, e l'opzione noclobber di bash.
  Puoi fare questo usando il comando non intuitivo

  set +o noclobber


  L'argomento +o di set serve a non impostare una variabile, esattamente
  il contrario di quello che ci si potrebbe aspettare (``set'' significa
  ``impostare'').

  Il file teTeX-lib-0.4pl8.tar.gz creer la directory ./teTeX. Il file
  teTeX-src-0.4pl7.tar.gz creer la directory teTeX-src-0.4. Stampa il
  file INSTALL.src e tienilo a portata di mano per i passi seguenti.
  Passa alla directory ./teTeX-src-0.4 e, seguendo le istruzioni nel
  file INSTALL.src, modifica il ./Makefile.  Devi assegnare alla
  variabile TETEXDIR il percorso assoluto della sottodirectory teTeX
  della directory in cui hai decompresso il codice sorgente e le
  librerie. Per esempio, se hai decompresso i file nella tua directory
  home, assegna a TETEXDIR

  /home/john.q.public/teTeX


  Le rimanenti opzioni del Makefile sono piuttosto generiche. Con la
  versione 2.7.2 e successive di GCC non ci dovrebbe essere bisogno di
  altre modifiche, a meno che tu non abbia un compilatore e delle
  librerie non standard, o che tu voglia ulteriori ottimizzazioni, o per
  qualche altro motivo. Assicurati che le variabili USE_DIALOG,
  USE_NCURSES, e HAVE_NCURSES siano impostate correttamente per il tuo
  sistema, perch il programma dialog ha bisogno delle librerie ncurses.
  Una libreria ncurses  inclusa nella distribuzione sorgente, per cui i
  valori gi presenti nel Makefile dovrebbero andar bene. Se non riesci
  a compilare o linkare ncurses, texconfig pu essere eseguito anche
  dalla linea di comando.

  Se hai fatto tutto correttamente fino a questo punto, dopo essere
  andato sulla directory di livello pi alto in cui hai installato i
  sorgenti, dovresti poter digitare make world e rilassarti finch gli
  eseguibili di teTeX non sono stati compilati. Ci possono volere anche
  alcune ore.

  Una volta che la compilazione  terminata, aggiungi le directory di
  teTeX alle variabili di ambiente $PATH, $MANPATH, e $INFOPATH.
  Continuando con l'esempio precedente, le linee che dovrebbero essere
  aggiunte al file ~/.bash_profile, sono:

  export PATH=$PATH":/home/john.q.public/teTeX/bin/i386-linux"
  export MANPATH=$MANPATH":/home/john.q.public/teTeX/man"
  export INFOPATH=$INFOPATH":/home/john.q.public/teTeX/info"


  La variabile $PATH  diversa nella distribuzione sorgente e nella dis
  tribuzione binaria. Nota che ora la directory in cui si trovano gli
  eseguibili  teTeX/bin/i386-linux invece di teTeX/bin come nella dis
  tribuzione binaria.

  A questo punto puoi eseguire texconfig confall per assicurarti che i
  percorsi sono stati correttamente impostati, e poi precedere a
  configurare teTeX come nella distribuzione binaria. Vedi la sezione
  ``Dettagli sulla configurazione dopo l'installazione''.


  9.  Dettagli sulla configurazione dopo l'installazione.

  La prima cosa da fare  leggere il file README scritto dallo stesso
  Thomas Esser. Descrive molti trucchi sulla configurazione di teTeX per
  i tuoi dispositivi di uscita (per esempio la stampante). Il file
  README si trova nella directory

  /usr/lib/teTeX/texmf/doc/tetex


  Leggi il file con il comando (i percorsi usati negli esempi seguenti
  si riferiscono alla distribuzione Slackware):

  less /usr/lib/teTeX/texmf/doc/tetex/README


  oppure stampalo con il comando

  cat /usr/lib/teTeX/texmf/doc/tetex/README >/dev/lp0


  se la tua stampante  collegata a /dev/lp0; altrimenti sostituisci il
  file di dispositivo relativo alla porta a cui la tua stampante  col
  legata.

  Ancora meglio, stampalo usando il comando lpr:

  lpr /usr/lib/teTeX/texmf/doc/tetex/README



  Dovresti avere gi installato il demone di stampa incluso nella tua
  distribuzione di Linux. Altrimenti installalo adesso seguendo le
  istruzioni comprese nel pacchetto.

  Stampa il teTeX-FAQ, e tienilo a portata di mano perch contiene utili
  consigli su come configurare i driver per la tua stampante. Ci
  arriveremo tra poco. Nelle versioni pi recenti di teTeX, il teTeX-FAQ
   accessibile anche attraverso texconfig.

  Adesso  bene definire una directory in cui conservare i tuoi file di
  formato TeX. teTeX cerca questi file nelle directory elencate dalla
  variabile d'ambiente $TEXINPUTS:

  export TEXINPUTS=".:~/texinputs:"


  al file /etc/profile, che  valido per tutti gli utenti. Ciascun
  utente pu poi definire le proprie directory aggiungendole al file
  ~/.profile o ~/.bash_profile se bash  la shell che usano. La vari
  abile d'ambiente $TEXINPUTS dice a teTeX di cercare i file di stile di
  TeX nella directory ~/texinputs contenuta nella directory di ciascun
  utente.  fondamentale che un ``:'' appaia prima e dopo questa direc
  tory. teTeX aggiunger le sue directory di ricerca alla tua. Poich 
  probabile che tu voglia che vengano usati i file di formato da te
  definiti, teTeX usa le versioni dei file di formato che si trovano
  nella directory in cui ti trovi quando viene eseguito.

  Aggiungi la directory /usr/lib/teTeX/bin ai percorsi di sistema se
  stai installando teTeX come amministratore. Se ne stai installando una
  copia personale aggiungi la directory che contiene i file binari di
  teTeX all'inizio della tua variabile d'ambiente $PATH aggiungendo la
  linea seguente al tuo ~/.profile o ~/.bash_profile:

  export PATH="~/tetex/bin:"$PATH


  Adesso, collegati come root ed esegui texconfig seguendo le istruzioni
  sul teTeX-FAQ e scegli la stampante collegata al tuo sistema. Assicu
  rati di configurare in teTeX sia la stampante che la risoluzione di
  stampa corrette.

  Infine, esegui il programma texhash. Questo assicura che il database
  interno di teTeX sia aggiornato. Il database  in effetti un file ls-
  lR.  necessario eseguire texhash ogni volta che si cambia la
  configurazione di sistema, altrimenti teTeX non  in grado di
  determinare i cambiamenti.


  10.  Appendice C: Distribution and Copyright (in lingua originale).




  10.1.  Distribution.

  teTeX is free software; this means everyone is free to use the
  software and free to redistribute it on certain conditions.  The
  package is not in the public domain.  It is copyrighted and there are
  restrictions on its distribution, but these restrictions are designed
  to permit everything that a good cooperating citizen would want to do.
  What is not allowed is to try to prevent others from further sharing
  any version of free software that they might get from you.  The
  precise conditions are found in the GNU General Public License that
  comes with many of the software packages and also appears following
  this section.

  One way to get a copy of the package is from someone else who has it.
  You need not ask for our permission to do so, or tell any one else;
  just copy it.  If you have access to the Internet, you can get the
  latest distribution versions by anonymous FTP.  See the chapter
  ``Sources'' for more information.

  You may also receive the software when you buy a computer.  Computer
  manufacturers are free to distribute copies on the same terms that
  apply to everyone else.  These terms require them to give you the full
  sources, including whatever changes they may have made, and to permit
  you to redistribute these packages received from them under the usual
  terms of the General Public License.  In other words, the program must
  be free for you when you get it, not just free for the manufacturer.

  You can also order copies of GNU software from the Free Software
  Foundation on CD-ROM.  This is a convenient and reliable way to get a
  copy; it is also a good way to help fund our work.  (The Foundation
  has always received most of its funds in this way.)  An order form is
  included many distribution, and on our web site in
  http://www.gnu.ai.mit.edu/order/order.html.  For further information,
  write to


  Free Software Foundation
  59 Temple Place, Suite 330
  Boston, MA  02111-1307 USA
  USA



  The income from distribution fees goes to support the foundation's
  purpose: the development of new free software, and improvements to our
  existing programs.

  If you use GNU software at your workplace, please suggest that the
  company make a donation.  If company policy is unsympathetic to the
  idea of donating to charity, you might instead suggest ordering a CD-
  ROM from the Foundation occasionally, or subscribing to periodic
  updates.

  Insomma: teTeX  free: pu essere ridistribuito liberamente. I termini
  precisi sono quelli descritti nella General Public License. I
  fabbricanti di computer possono distribuirlo con i computer da loro
  venduti purch includano anche il codice sorgente e tutte le eventuali
  modifiche da loro effettuate a quest'ultimo. Copie del software GNU
  pu essere ordinato all'indirizzo della Free Software Foundation
  indicato sopra. Questo  anche un modo per supportare la Free Software
  Foundation.





  10.2.  GNU GENERAL PUBLIC LICENSE

  Nota: una versione in italiano NON UFFICIALE  della General Public
  License si trova a http://animal.unipv.it/GNU/gpl.txt

  Version 2, June 1991

  Copyright (C) 1989, 1991 Free Software Foundation, Inc.  59 Temple
  Place, Suite 330, Boston, MA  02111-1307  USA

  Everyone is permitted to copy and distribute verbatim copies of this
  license document, but changing it is not allowed.

  Preamble.

  The licenses for most software are designed to take away your freedom
  to share and change it.  By contrast, the GNU General Public License
  is intended to guarantee your freedom to share and change free
  software---to make sure the software is free for all its users.  This
  General Public License applies to most of the Free Software
  Foundation's software and to any other program whose authors commit to
  using it.  (Some other Free Software Foundation software is covered by
  the GNU Library General Public License instead.)  You can apply it to
  your programs, too.

  When we speak of free software, we are referring to freedom, not
  price.  Our General Public Licenses are designed to make sure that you
  have the freedom to distribute copies of free software (and charge for
  this service if you wish), that you receive source code or can get it
  if you want it, that you can change the software or use pieces of it
  in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
  anyone to deny you these rights or to ask you to surrender the rights.
  These restrictions translate to certain responsibilities for you if
  you distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
  gratis or for a fee, you must give the recipients all the rights that
  you have.  You must make sure that they, too, receive or can get the
  source code.  And you must show them these terms so they know their
  rights.

  We protect your rights with two steps: (1) copyright the software, and
  (2) offer you this license which gives you legal permission to copy,
  distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
  that everyone understands that there is no warranty for this free
  software.  If the software is modified by someone else and passed on,
  we want its recipients to know that what they have is not the
  original, so that any problems introduced by others will not reflect
  on the original authors' reputations.

  Finally, any free program is threatened constantly by software
  patents.  We wish to avoid the danger that redistributors of a free
  program will individually obtain patent licenses, in effect making the
  program proprietary.  To prevent this, we have made it clear that any
  patent must be licensed for everyone's free use or not licensed at
  all.

  The precise terms and conditions for copying, distribution and
  modification follow.

  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

    This License applies to any program or other work which contains a
     notice placed by the copyright holder saying it may be distributed
     under the terms of this General Public License.  The ``Program''
     below, refers to any such program or work, and a ``work based on
     the Program'' means either the Program or any derivative work under
     copyright law: that is to say, a work containing the Program or a
     portion of it, either verbatim or with modifications and/or
     translated into another language.  (Hereinafter, translation is
     included without limitation in the term,``modification.'')  Each
     licensee is addressed as ``you.''

     Activities other than copying, distribution and modification are
     not covered by this License; they are outside its scope.  The act
     of running the Program is not restricted, and the output from the
     Program is covered only if its contents constitute a work based on
     the Program (independent of having been made by running the
     Program).  Whether that is true depends on what the Program does.

    You may copy and distribute verbatim copies of the Program's source
     code as you receive it, in any medium, provided that you
     conspicuously and appropriately publish on each copy an appropriate
     copyright notice and disclaimer of warranty; keep intact all the
     notices that refer to this License and to the absence of any
     warranty; and give any other recipients of the Program a copy of
     this License along with the Program.

     You may charge a fee for the physical act of transferring a copy,
     and you may at your option offer warranty protection in exchange
     for a fee.

    You may modify your copy or copies of the Program or any portion of
     it, thus forming a work based on the Program, and copy and
     distribute such modifications or work under the terms of Section 1
     above, provided that you also meet all of these conditions:

     1. You must cause the modified files to carry prominent notices
     stating that you changed the files and the date of any change.

     2. You must cause any work that you distribute or publish, that in
     whole or in part contains or is derived from the Program or any
     part thereof, to be licensed as a whole at no charge to all third
     parties under the terms of this License.

     3. If the modified program normally reads commands interactively
     when run, you must cause it, when started running for such
     interactive use in the most ordinary way, to print or display an
     announcement including an appropriate copyright notice and a notice
     that there is no warranty (or else, saying that you provide a
     warranty) and that users may redistribute the program under these
     conditions, and telling the user how to view a copy of this
     License.  (Exception: if the Program itself is interactive but does
     not normally print such an announcement, your work based on the
     Program is not required to print an announcement.)

     These requirements apply to the modified work as a whole.  If
     identifiable sections of that work are not derived from the
     Program, and can be reasonably considered independent and separate
     works in themselves, then this License, and its terms, do not apply
     to those sections when you distribute them as separate works.  But
     when you distribute the same sections as part of a whole which is a
     work based on the Program, the distribution of the whole must be on
     the terms of this License, whose permissions for other licensees
     extend to the entire whole, and thus to each and every part
     regardless of who wrote it.

     Thus, it is not the intent of this section to claim rights or
     contest your rights to work written entirely by you; rather, the
     intent is to exercise the right to control the distribution of
     derivative or collective works based on the Program.

     In addition, mere aggregation of another work not based on the
     Program with the Program (or with a work based on the Program) on a
     volume of a storage or distribution medium does not bring the other
     work under the scope of this License.

    You may copy and distribute the Program (or a work based on it,
     under Section 2) in object code or executable form under the terms
     of Sections 1 and 2 above provided that you also do one of the
     following:

     1. Accompany it with the complete corresponding machine-readable
     source code, which must be distributed under the terms of Sections
     1 and 2 above on a medium customarily used for software
     interchange; or,

     2. Accompany it with a written offer, valid for at least three
     years, to give any third party, for a charge no more than your cost
     of physically performing source distribution, a complete machine-
     readable copy of the corresponding source code, to be distributed
     under the terms of Sections 1 and 2 above on a medium customarily
     used for software interchange; or,

     3. Accompany it with the information you received as to the offer
     to distribute corresponding source code.  (This alternative is
     allowed only for noncommercial distribution and only if you
     received the program in object code or executable form with such an
     offer, in accord with Subsection b above.)

     The source code for a work means the preferred form of the work for
     making modifications to it.  For an executable work, complete
     source code means all the source code for all modules it contains,
     plus any associated interface definition files, plus the scripts
     used to control compilation and installation of the executable.
     However, as a special exception, the source code distributed need
     not include anything that is normally distributed (in either source
     or binary form) with the major components (compiler, kernel, and so
     on) of the operating system on which the executable runs, unless
     that component itself accompanies the executable.

     If distribution of executable or object code is made by offering
     access to copy from a designated place, then offering equivalent
     access to copy the source code from the same place counts as
     distribution of the source code, even though third parties are not
     compelled to copy the source along with the object code.

    You may not copy, modify, sublicense, or distribute the Program
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense or distribute the Program is
     void, and will automatically terminate your rights under this
     License.  However, parties who have received copies, or rights,
     from you under this License will not have their licenses terminated
     so long as such parties remain in full compliance.

    You are not required to accept this License, since you have not
     signed it.  However, nothing else grants you permission to modify
     or distribute the Program or its derivative works.  These actions
     are prohibited by law if you do not accept this License.
     Therefore, by modifying or distributing the Program (or any work
     based on the Program), you indicate your acceptance of this License
     to do so, and all its terms and conditions for copying,
     distributing or modifying the Program or works based on it.

    Each time you redistribute the Program (or any work based on the
     Program), the recipient automatically receives a license from the
     original licensor to copy, distribute or modify the Program subject
     to these terms and conditions.  You may not impose any further
     restrictions on the recipients' exercise of the rights granted
     herein.  You are not responsible for enforcing compliance by third
     parties to this License.

    If, as a consequence of a court judgment or allegation of patent
     infringement or for any other reason (not limited to patent
     issues), conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot distribute so as to satisfy simultaneously
     your obligations under this License and any other pertinent
     obligations, then as a consequence you may not distribute the
     Program at all.  For example, if a patent license would not permit
     royalty-free redistribution of the Program by all those who receive
     copies directly or indirectly through you, then the only way you
     could satisfy both it and this License would be to refrain entirely
     from distribution of the Program.

     If any portion of this section is held invalid or unenforceable
     under any particular circumstance, the balance of the section is
     intended to apply and the section as a whole is intended to apply
     in other circumstances.

     It is not the purpose of this section to induce you to infringe any
     patents or other property right claims or to contest validity of
     any such claims; this section has the sole purpose of protecting
     the integrity of the free software distribution system, which is
     implemented by public license practices.  Many people have made
     generous contributions to the wide range of software distributed
     through that system in reliance on consistent application of that
     system; it is up to the author/donor to decide if he or she is
     willing to distribute software through any other system and a
     licensee cannot impose that choice.

     This section is intended to make thoroughly clear what is believed
     to be a consequence of the rest of this License.

    If the distribution and/or use of the Program is restricted in
     certain countries either by patents or by copyrighted interfaces,
     the original copyright holder who places the Program under this
     License may add an explicit geographical distribution limitation
     excluding those countries, so that distribution is permitted only
     in or among countries not thus excluded.  In such case, this
     License incorporates the limitation as if written in the body of
     this License.

    The Free Software Foundation may publish revised and/or new
     versions of the General Public License from time to time.  Such new
     versions will be similar in spirit to the present version, but may
     differ in detail to address new problems or concerns.

     Each version is given a distinguishing version number.  If the
     Program specifies a version number of this License which applies to
     it and ``any later version,'' you have the option of following the
     terms and conditions either of that version or of any later version
     published by the Free Software Foundation.  If the Program does not
     specify a version number of this License, you may choose any
     version ever published by the Free Software Foundation.

    If you wish to incorporate parts of the Program into other free
     programs whose distribution conditions are different, write to the
     author to ask for permission.  For software which is copyrighted by
     the Free Software Foundation, write to the Free Software
     Foundation; we sometimes make exceptions for this.  Our decision
     will be guided by the two goals of preserving the free status of
     all derivatives of our free software and of promoting the sharing
     and reuse of software generally.

     NO WARRANTY

    BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
     WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
     LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
     AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY
     OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
     PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE
     DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
     OR CORRECTION.

    IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
     MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
     LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
     INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
     INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
     DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
     OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
     OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

  END OF TERMS AND CONDITIONS


  10.3.  How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
  possible use to the public, the best way to achieve this is to make it
  free software which everyone can redistribute and change under these
  terms.

  To do so, attach the following notices to the program.  It is safest
  to attach them to the start of each source file to most effectively
  convey the exclusion of warranty; and each file should have at least
  the ``copyright'' line and a pointer to where the full notice is
  found.


  [one line to give the program's name and an idea of what it does.
  Copyright (C) 19[yy]  [name of author]

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along
  with this program; if not, write to the Free Software Foundation, Inc.,
  59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.



  Also add information on how to contact you by electronic and paper
  mail.

  If the program is interactive, make it output a short notice like this
  when it starts in an interactive mode:


  Gnomovision version 69, Copyright (C) 19[yy] [name of author]
  Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
  type `show w'.  This is free software, and you are welcome
  to redistribute it under certain conditions; type `show c'
  for details.



  The hypothetical commands ``show w'' and ``show c'' should show the
  appropriate parts of the General Public License.  Of course, the
  commands you use may be called something other than ``show w'' and
  ``show c''; they could even be mouse-clicks or menu items---whatever
  suits your program.

  You should also get your employer (if you work as a programmer) or
  your school, if any, to sign a ``copyright disclaimer'' for the
  program, if necessary.  Here is a sample; alter the names:


  Yoyodyne, Inc., hereby disclaims all copyright
  interest in the program `Gnomovision'
  (which makes passes at compilers) written
  by James Hacker.

  [signature of Ty Coon] 1 April 1989
  Ty Coon, President of Vice



  This General Public License does not permit incorporating your program
  into proprietary programs.  If your program is a subroutine library,
  you may consider it more useful to permit linking proprietary
  applications with the library.  If this is what you want to do, use
  the GNU Library General Public License instead of this License.

























  Linux UUCP HOWTO
  Vince Skahan, <vince@halcyon.com>
  v1.5, 29 novembre 1995

  Questo documento descrive l'impostazione e l'uso di UUCP sotto Linux.
  Dovrete leggerlo se avete intenzione di connettervi ad un sito remoto
  via UUCP con un modem, con una connessione diretta o via Internet.
  Probabilmente *non* avete bisogno di leggere questo documento se non
  usate UUCP.  Documento tradotto da Giuliano Natali, natali@trew.it;
  aggiornato da Michele Dalla Silvestra, dalla@psico.unipd.it.

  1.  Introduzione


  Lo scopo di questo documento  rispondere ad alcune domande e problemi
  che si possono definire ``FAQ'' (Frequently Asked Question, cio
  domande frequenti) sul software UUCP sotto Linux in generale, e in
  particolare sulla versione di Linux SLS e Slackware a livello di
  distribuzioni.

  Questo documento e i corrispondenti ``Mail-HOWTO'' e ``News-HOWTO''
  rimpiazzano le UUCP-NEWS-MAIL-FAQ che venivano precedentemente spedite
  a comp.os.linux.announce.



  1.1.  Nuove versioni di questo documento


  Le nuove versioni di questo documento sono periodicamente postate su
  comp.os.linux.announce, comp.answers, e news.answers.  Vengono
  peraltro aggiunte ai vari siti ftp anonimo che mantengono l'archivio
  di questo tipo di informazioni, incluso
  sunsite.unc.edu:/pub/Linux/docs/HOWTO.

  In aggiunta dovreste riuscire a trovare questo documento sulla ``Linux
  WorldWideWeb home page'' a http://sunsite.unc.edu/mdw/linux.html.



  1.2.  Commenti e proposte


  Sono interessato a qualsiasi commento, positivo o negativo che sia,
  riguardante il contenuto di questo documento via e-mail.
  Contattatemi, inoltre, se trovate errori od omissioni piuttosto ovvie.

  Io leggo tutte le e-mail che ricevo, ma non necessariamente rispondo.
  Richieste di variazioni vengono considerate e eseguite in base al
  giorno, al tempo a disposizione, al tipo di richiesta ed alla
  pressione sanguigna :-)

  Le proteste vengono reindirizzate direttamente su /dev/null quindi non
  agitatevi troppo.

  In particolare, il filesystem standard di Linux riguardo ai percorsi 
  una cosa in evoluzione.  Tutto quel che c' in questo documento serve
  come traccia basata sullo standard corrente al momento della stesura
  di quella parte di documento e riferita ai percorsi usati nelle
  distribuzioni o `kit' che ho visto personalmente. Vi prego di
  consultare la vostra distribuzione di Linux circa i percorsi che
  vengono usati.

  Consigli riguardanti il formato attuale del documento vanno
  indirizzati al coordinatore degli HOWTO - Greg Hankins
  (gregh@sunsite.unc.edu).
  1.3.  Informazioni sul Copyright


  UUCP-HOWTO  copyrighted (c) 1994 di Vince Skahan.

  Una copia letterale pu essere distribuita con ogni mezzo fisico o
  elettronico senza il permesso dell'autore. Traduzioni sono ugualmente
  permesse senza il permesso esplicito se includono notizie su chi l'ha
  tradotto.

  Brevi citazioni possono essere usate senza il consenso dell'autore.
  Lavori derivati e distribuzioni parziali dell'UUCP-HOWTO devono essere
  accompagnati con una copia letterale di questo file o un puntatore ad
  una copia letterale.

  Ridistribuzioni commerciali sono permesse ed incoraggiate; comunque,
  l'autore desidera essere avvisato di ogni simile distribuzione (per
  cortesia).

  In breve, vogliamo promuovere la disseminazione di queste informazioni
  attraverso pi canali possibile. Comunque vogliamo mantenere il
  copyright dei documenti HOWTO.

  Vogliamo, inoltre, che TUTTE le informazioni fornite negli HOWTO siano
  disseminate. Se avete domande, contattate Greg Hankins, il
  coordinatore dei Linux HOWTO, all'indirizzo gregh@sunsite.unc.edu. Per
  le versioni in italiano, contattate Michele Dalla Silvestra,
  dalla@psico.unipd.it.



  1.4.  Responsabilit


  Chiaramente, mi sollevo da responsabilit circa potenziali conflitti
  derivanti dall'uso di questo documento.  L'uso dei concetti, esempi
  e/o altri contenuti di questo documento sono interamente a vostro
  rischio e pericolo.



  1.5.  Altre fonti di informazione

  1.5.1.  Documenti Linux HOWTO


  C' abbondanza di materiale eccezionale fornito dagli altri Linux
  HOWTO e dai documenti del Linux DOC project.  In particolare, date
  un'occhiata alle seguenti pubblicazioni:


    il Serial Communications HOWTO

    l'Ethernet HOWTO

    la Linux Networking Administrators' Guide



  1.5.2.  USENET


  comp.mail.uucp pu rispondere alla maggior parte delle domande su UUCP



  1.5.3.  Mailing Lists


  C' una mailing list sul Taylor UUCP.

  Per riceverla (o disdirla), mandate una mail a

                taylor-uucp-request@gnu.ai.mit.edu



  Questa richiesta  indirizzata ad una persona, e non ad un programma,
  quindo assicuratevi di includere l'indirizzo al quale volete siano
  spedite le mail inserendolo nel testo del messaggio.

  Per mandare un messaggio alla lista, indirizzatelo a

               taylor-uucp@gnu.ai.mit.edu





  1.5.4.  Testi e libri


  Le versioni HDB e V2 di UUCP compaiono in quasi tutte le
  documentazioni commerciali cos come un quasi tutti i libri sulla
  comunicazione tramite *nix.

  I file di configurazione del Taylor vengono correntemente documentati
  nei file info forniti con i sorgenti (ed anche nella distribuzione
  SLS, si spera).  Per leggerli potete procurarvi il simpatico programma
  ``infosrc'' dai dischi della distribuzione SLS serie ``s'' e
  compilarlo.

  I seguenti sono un set non-incluso di libri che vi aiuteranno.


    "Managing UUCP and USENET" della O'Reilly and Associates secondo me
      il miglior libro, escludendo quelli per spiegare il funzionamento
     dei programmi ed i protocolli, per costruire un sito USENET.

    "Unix Communications" della The Waite Group contiene una buona
     descrizione di tutte le parti (ed anche di pi) e del loro
     funzionamento concomitante.

    "Practical Unix Security" della O'Reilly and Associates tratta
     sulla sicurezza di UUCP in generale.

    "The Internet Complete Reference" della Osborne  un libro di
     riferimento, ben fatto, che spiega i vari servizi disponibili su
     Internet ed  una grande risorsa di informazioni sulle news, mail,
     e varie altre risorse di Internet.

    "The Linux Networking Administrators' Guide" di Olaf Kirch del
     Linux DOC Project  disponibile sulla rete e viene pubblicato
     (perlomeno) dalla O'Reilly e SSC.  Fa un fine passaggio punto per
     punto per imparare tutto quello che immaginate dover sapere circa
     l'uso del networking su Unix.






  1.6.  Dove *NON* guardare per aiuti


  Non c' niente di ``speciale'' sulla configurazione e l'esecuzione di
  UUCP sotto Linux (per il momento).  In accordo con questa precisa
  massima, voi certamente *NON* vorrete spedire generiche domande su
  UUCP al newsgroup comp.os.linux.*.

  Spedirete invece precise domande circa Linux (tipo, ``Per favore,
  ditemi il tipo di file di configurazione supportato che  compilato
  nei binari del Taylor uucp v1.04 nella SLS v1.02''), dovrete porre le
  vostre domande in comp.mail.uucp o nella mailing list del Taylor UUCP
  come indicato precedentemente.

  Lasciatemelo ripetere.

  Non esiste virtualmente nessuna ragione per spedire qualsiasi domanda
  su uucp nel gruppo comp.os.linux.  Ci sono newsgroups nel comp.mail.*
  che prevedono *TUTTE* le vostre domande.

   SE MANDATE A COMP.OS.LINUX.* DOMANDE NON SPECIFICHE LINUX, STATE
  CERCANDO AIUTO NEL POSTO SBAGLIATO.  GLI ESPERTI DI UUCP SI COLLEGANO
  AI GRUPPI INDICATI SOPRA E GENERALMENTE NON USANO LINUX.

   MANDANDO NELLE GERARCHIE LINUX DOMANDE NON SPECIFICHE LINUX PERDETE
  IL VOSTRO TEMPO E FREQUENTEMENTE NON OTTERRETE NESSUNA RISPOSTA.



  2.  Requisiti Hardware


  Non ci sono richieste di hardware specifico per l'UUCP sotto Linux.
  Praticamente qualsiasi modem Hayes-compatibile lavora in sintonia con
  UUCP.

  Nella maggior parte dei casi, vorrete il modem pi veloce che le
  vostre tasche possono permettere.  In generale, avrete una 16550 UART
  come scheda seriale o inglobata nel vostro modem per raggiungere
  velocit di almeno 9600 baud.

  Se non sapete o non capite cosa intendo, consultate il gruppo
  comp.dcom.modems o le varie FAQ sui modem e la comunicazione via
  seriale ed i periodici annunci su USENET.



  3.  Prelevare UUCP


  Taylor UUCP (versione corrente 1.05)  disponibile a prep.ai.mit.edu
  in formato sorgente ed in varie distribuzioni di Linux in formato
  binario.

  Il newspak-2.4.tar.z contiene i file di configurazione e di
  documentazione relativi alla compilazione del software uucp, news, e
  mail sotto Linux recuperati dalla grande mole di sorgenti free.  Lo
  potete trovare, normalmente, a sunsite.unc.edu nella directory
  /pub/Linux/system/Mail/news.  Se non riuscite a trovarlo su sunsite,
  mandatemi una mail e mi prender cura di farvene avere una copia.






  4.  Installare il Software


  (La maggior parte di questa sezione  stata presa direttamente dal
  file README nel sorgente del Taylor UUCP v1.05 - viene fornita qui per
  aiutarvi ``rtfm'' invece di limitarmi a dire cosa fare)

  Le istruzioni dettagliate per la compilazione sono in uucp.texi
  fornito con i sorgenti.

  Potete prendere per ``buoni'' conf.h e policy.h per Linux dalla
  distribuzione del newspak alla quale si fa riferimento in ``Altre
  fonti di informazione'' di cui sopra.  In quel caso, farete bene ad
  eseguire direttamente ``make''.



  4.1.  Estrarre i sorgenti compressi


  Per estrarre un file tar compresso, eseguite:

                  gunzip -c filename.tar.z | tar xvf -



  Con il tar ``moderno'' si esegue:

                  tar -zxvf filename.tgz





  4.2.  Modificate Makefile.in per determinare le directory di instal
  lazione.


  Qui, ho impostato "prefix" a ``/usr'' piuttosto che il normale
  ``/usr/local''



  4.3.  Eseguite ``configure''


  Eseguite "sh configure".

  Lo script ``configure'' compiler un numero di programmi di test per
  vedere quello che  disponibile sul vostro sistema e calcoler altre
  cose che servono per la compilazione.

  Lo script ``configure'' creer il file conf.h partendo da conf.h.in ed
  il Makefile dal Makefile.in.  Creer inoltre il file config.status,
  che  uno script di shell con il quale crea i file.


    Piuttosto che editare il file Makefile.in nei sorgenti come
     indicato sopra, avrete lo stesso risultato con:

             "configure --prefix=/usr/lib"





  4.4.  Configurare la futura impostazione del software

  4.4.1.  Esaminate conf.h e Makefile ed assicuratevi che siano a posto.


  Io ho preso i file di default


  4.4.2.  Modificate policy.h  per il vostro sistema.



    impostate il tipo di lockfile che desiderate (HAVE_HDB_LOCKFILES)

    impostate il tipo di file di configurazione che volete supportati
     (HAVE_TAYLOR_CONFIG, HAVE_V2_CONFIG, HAVE_HDB_CONFIG)

    impostate il tipo di struttura della directory di spool
     (SPOOLDIR_HDB)

    impostate il tipo di file di log (HAVE_HDB_LOGGING)

    impostate il percorso di ricerca per i commandi (io ho aggiunto
     /usr/local/bin a quello esistente)



  4.5.  Compilare ed installare il software



    Eseguite "make".

    Usate "uuchk | more" per controllare i file di configurazione.
     Potete usare "uuconv" per la conversione tra i formati dei file di
     configurazione.

    Eseguite "make install" per installare il software.



  4.6.  Impostare i file di configurazione


  Vi ho raccomandato di partire prendendo direttamente i file di
  configurazione ``buoni'' per la modalit HDB e di provvedere ad
  installarli.


    Assicuratevi che il file Permissions indichi esattamente dove si
     trovano rmail ed rnews se li avete messi da qualsiasi parte non
     specificata nel file policy.h.

    Assicuratevi che il vostro file Devices contenga l'esatta posizione
     del vostro modem (cua1=COM2 come nell'esempio).

    Modificate il file Systems per configurare il(i) sistema(i) con cui
     comunicherete, velocit, numero telefonico, nome utente e password.

     *PROTEGGETE QUESTO FILE DALLA LETTURA DI ALTRI*

    Configurate il file Permissions ed aggiungete una serie di linee
     per ogni sito che volete contattare. Per ragioni di sicurezza, 
     raccomandabile assicurarvi che ognuno abbia un account separato (se
     abilitate il dialin) ed una home directory cos potrete tenerne
     traccia.
  4.7.  Provate!!!!!!!!!!!



          /usr/lib/uucp/uucico -r 1 -x 9 -s remote_system_name



  L'opzione -x 9 fornisce le informazioni pi chiare possibili e le
  scrive su /usr/spool/uucp/.Admin/audit.local per aiutarvi
  nell'impostazione iniziale.

  Normalmente io eseguo -x 4 visto che come livello di log mi aiuta
  sufficientemente a risolvere i problemi.  Ovviamente, contenendo
  informazioni testuali dal vostro file Systems (account/password),
  proteggetelo dalla lettura di estranei.


    da Pierre.Beyssac@emeraude.syseca.fr

     Taylor permette pi livelli di registrazione. Usate -x per avere il
     livello pi alto possibile.

     Inoltre, fate "tail -f /usr/spool/uucp/.Admin/audit.local" durante
     il debugging per vedere cosa accade in ogni istante.



  4.8.  Non funziona - e adesso?


  In generale, riferitevi alla documentazione di cui sopra se qualcosa
  va storto.  Potrete anche consultare degli utenti di UUCP esperti per
  chiedere aiuto.  Usualmente, si fa quel che si pu e ci si rivolge a
  chi ne sa qualcosa in pi.



  5.  Domande Frequenti sul Linux UUCP

  5.1.  ``Taylor''?  Perch il mio binario di uucp  configurato in
  modalit HDB invece di


  (religious mode on - Conosco molte persone che sono fanatiche circa la
  ``semplicit d'uso'' come io sono per l'``essere standard''.  Questo
  perch essi producono del codice sorgente che vi potrete compilare da
  soli :-) )

  E perch IMHO  lo standard de-facto dell'implementazione UUCP in
  questo momento. Ci sono migliaia di siti con amministratori
  ``navigati'' ed alcuni posti nei quali trovare delle incredibilmente
  buone informazioni riguardanti l'impostazione dell'HDB.

  L'uucp-1.04 che si trova in SLS 1.02 e successivi contiene il supporto
  per tutti e tre i tipi di file di configurazione. Siccome non li
  potevo provare, ho eseguito ``rtfm'' e Ian Taylor mi ha detto che
  devono funzionare.

  L'ordine di ricerca per i file di configurazione e`: Taylor poi V2
  (L.sys) poi HDB. Usate l'utility uuconv in /usr/lib/uucp per
  convertire i file di configurazione da una modalit all'altra.

  Se non potete aspettare, recuperate i sorgenti di uucp e specificate
  HAVE_BNU_CONFIG, HAVE_V2_CONFIG *ed* HAVE_TAYLOR_CONFIG nel file
  policy.h ed eseguite ``make''. Il seguente giro  un po' uggioso, ma
  funziona se volete usare le configurazioni Taylor con binari che non
  li supportano.


    Da mbravo@tctube.spb.su (Michael E. Bravo)

     - aggiungete "-I /usr/local/lib/uucp/config" ad _ogni_ chiamata di
     un programma nel pacchetto uucp.

  Comunque, la corrente versione di Slackware ha un setup carino che
  separa i file di configurazione per le varie configurazioni in
  directory separate.  Per esempio, i file di configurazione HDB si
  trovano in /usr/lib/uucp/hdb_config. Mentre qui usavo il mio, ho
  eseguito l'"out-of-the-box Slackware UUCP in HDB mode" senza problemi
  per un bel periodo.



  5.2.  l'aggiornamento a uucp-1.04?  Perch ricevo un ``timeout'' sulla
  connessione dopo avere effettuato



    da Ed Carp - erc@apple.com

     Se usate un dispositivo ``Direct'' nel file Devices, c' un timeout
     di 10 secondi compilato con esso.  Cambia il nome del Device in
     qualsiasi cosa diversa da ``Direct''.  Se leggete l'esempio in
     /usr/lib/uucp fornito con SLS, non avrete problemi come questo.

    da Greg Naber - greg@squally.halcyon.com

     Se ricevete ``chat script timeouts'', potete modificare i sorgenti
     editando la linea 323 in uuconf/syssub.c e cambiare il timeout di
     default da 10 secondi a qualcosina in pi.

    da Ed Rodda - ed@orca.wimsey.bc.ca

     Se ricevete ``chat script timeouts'', tipicamente connetendovi ad
     altri siti Taylor, una pausa dopo il login vi risolver il
     problema.


     feed Any ACU,ag 38400 5551212 ogin: \c\d "" yourname word: passwd



    da Dr. Eberhard W. Lisse - el@lisse.NA

     Alcuni modem riattaccano dopo un paio di secondi. La seguente patch
     spedita da Ian Taylor dovrebbe aiutare.















     *** conn.c.orig Mon Feb 22 20:25:24 1993
     --- conn.c      Mon Feb 22 20:33:10 1993
     ***************
     *** 204,209 ****
     --- 204,212 ----

          /* Make sure any signal reporting has been done before we set
            fLog_sighup back to TRUE.  */
     +   /* SMR: it seems to me if we don't care about SIGHUPS, we should clear
     +      the flag before we return  */
     +   afSignal[INDEXSIG_SIGHUP] = FALSE;
         ulog (LOG_ERROR, (const char *) NULL);
         fLog_sighup = TRUE;





  5.3.  Perch uucp anonimo HDB sembra non funzionare?


  Uucp anonimo SLS funziona solo in modalit Taylor perch  stato
  compilato con l'opzione HAVE_TAYLOR_CONFIG.  Sevolete eseguire un uucp
  anonimo in modalit HDB, dovrete ricompilare il sorgente solo con la
  definizione di HDB. Ian Taylor sta considerando il modo di trattare
  questa ``caratteristica''.

  Pertanto, Taylor in HDB mode appare sensibile agli spazi bianchi e
  alle linee bianche. Per essere sicuri, verificate che non ci siano
  spazi o righe bianche nel file Permissions.

  Infine, assicuratevi di avere un file chiamato remote.unknown in
  /usr/lib/uucp e che non sia marcato eseguibile. Controllate il libro
  O'Reilly+Assoc "Managing UUCP and USENET" per i dettagli riguardo
  questo file.



  5.4.  Cosa significa ``no matching ports found''?


  Probabilmente state tentando di usare un dispositivo
  (/usr/lib/uucp/Devices) che non esiste, o il dispositivo che avete
  specificato nel file /usr/lib/uucp/Systems non corrisponde a nessun
  dispositivo nel file Devices.

  In seguito troverete una versione *sana* dei miei config-files
  funzionanti con Taylor 1.05 HDB che potrete installare ed usare.

  Notata la ``ACU'' nel file Systems? Questa spiega quale ``porta''
  usare nel file Devices.

  Vedete la parola ``scout'' in Systems? Questa vi spiega quale
  compositore del numero usare in Dialers.

  Se avete una porta ACU, ma nessuna corrispondente al compositore del
  numero specificato nella stessa linea in Systems, riceverete il
  messaggio di cui sopra.



  5.5.  Quali sono i file di configurazione ``buoni'' per la modalit
  HDB?



  I seguenti file di configurazione sono ``buoni'' per il Taylor 1.05
  sotto Linux in modalit HoneyDanBer. Essi funzionano con un kernel
  0.99-8 o successivo. Tutti i file devono trovarsi in /usr/lib/uucp a
  meno che non abbiate modificato i sorgenti indicando di mettere le
  librerie uucp altrove.

  Se voi *AVETE* messo qualcosa in posizione non-standard, preparatevi,
  poich programmi tipo sendmail si possono confondere. Dovrete
  assicurarvi che tutti i programmi di comunicazione relativi si
  adeguino alla vostra idea di percorsi ``standard''.

  Se avete un sistema con un kernel 0.99-7 o precedente, cambiate
  ``cua1'' in ``ttyS1''.





















































  #------------- Devices -------------
  # make sure the device (cua1 here) matches your system
  # cua1 = COM2
  #
  # here "scout" is the Digicom Scout Plus 19.2 modem I use
  # tbfast etc. is for a Telebit Trailblazer Plus modem's various speeds
  #
  ACU cua1 - 19200 scout
  ACU cua1 - 9600 tbfast
  ACU cua1 - 1200 tbslow
  ACU cua1 - 2400 tbmed

  #------------- dialers --------------
  # note the setting of the Trailblazer registers "on the fly"
  # "scout" is a Digicom Scout Plus (Hayes-like) modem I use here
  #
  scout   =W-,    "" ATM0DT\T CONNECT
  tbfast  =W-,    "" A\pA\pA\pT OK ATS50=255DT\T CONNECT\sFAST
  tbslow  =W-,    "" A\pA\pA\pT OK ATS50=2DT\T CONNECT\s1200
  tbmed   =W-,    "" A\pA\pA\pT OK ATS50=3DT\T CONNECT\s2400

  #-------------- Systems -------------
  # this is a very generic entry that will work for most systems
  #
  # the Any;1 means that you can call once per minute with using -f (force)
  # the ACU,g means force "g" protocol rather than Taylor's default "i"
  #
  fredsys Any;1 ACU,g 19200 scout5555555 "" \r ogin:--ogin: uanon word: uanon

  #-------------------------------- Permissions -------------------------

  # Taylor UUCP in HDB mode appears to be sensitive to blank lines.
  # Make sure all Permissions lines are real or commented out.
  #
  # this is a anonymous uucp entry
  #
  LOGNAME=nuucp MACHINE=OTHER \
  READ=/usr/spool/uucp/nuucp \
  WRITE=/usr/spool/uucp/nuucp \
  SENDFILES=yes REQUEST=yes \
  COMMANDS=/bin/rmail
  #
  # this is a normal setup for a remote system that talks to us
  # note the absolute path to rnews since this site puts things
  # in locations that aren't "standard"
  #
  LOGNAME=fredsys MACHINE=fredsys \
  READ=/usr/spool/uucp/fredsys:/usr/spool/uucp/uucppublic:/files \
  WRITE=/usr/spool/uucp/fredsys:/usr/spool/uucppublic \
  SENDFILES=yes REQUEST=yes \
  COMMANDS=/bin/rmail:/usr/local/lib/news/bin/rnews
  #----------------------------------------------------------------------





  5.6.  Usare uucico per chiamare numeri diversi


  La nuova versione 1.05 contiene l'opzione ``-z'' per uucico che prova
  diversi numeri per contattare il sistema remoto.




  6.  Ringraziamenti


  Le seguenti persone hanno aiutato nella ricerca e l'assemblaggio di
  informazioni (ed esperienze) che servivano alla creazione di questo
  documento:

  Ed Carp, Steve Robbins, Ian Taylor, Greg Naber, Matt Welsh, Pierre
  Beyssac.

  Se ho dimenticato qualcuno, le mie pi profonde scuse.























































  The Unix and Internet Fundamentals HOWTO
  Eric S. Raymond
  v1.4, 25 settembre 1999

  Questo documento descrive il funzionamento di base dei computer di
  classe PC, i sistemi operativi di tipo Unix e Internet senza far uso
  di un linguaggio troppo tecnico.  Traduzione a cura di Mirko Nasato,
  mnasato@iol.it.

  1.  Introduzione



  1.1.  Scopo di questo documento

  Questo documento vuole essere un aiuto per gli utenti di Linux e di
  Internet che stanno imparando dalla pratica. Anche se il ``learning by
  doing''  un ottimo metodo per acquisire competenze specifiche, a
  volte lascia determinate lacune nella conoscenza delle basi che
  possono rendere difficile il pensiero creativo o la risoluzione
  efficace dei problemi, a causa della mancanza di un chiaro modello
  mentale relativo a cosa sta succedendo nella realt.

  Cercher di descrivere con un linguaggio chiaro e semplice come
  funziona il tutto. La presentazione sar calibrata per persone che
  usano Unix o Linux su hardware di classe PC. Di solito far comunque
  riferimento semplicemente a `Unix', dato che la maggior parte delle
  descrizioni vale anche per altre piattaforme e varianti Unix.

  Assumer che stiate usando un PC Intel. I dettagli differiscono
  leggermente se lavorate su un Alpha o un PowerPC o qualche altro
  computer Unix, ma i concetti di base sono gli stessi.

  Non ripeter le cose, quindi dovrete stare attenti, ma ci significa
  anche che imparerete da ogni parola che leggete.  una buona idea
  limitarsi a dare una scorsa la prima volta che leggete; dovreste poi
  tornare indietro e rileggere alcune volte finch avrete digerito
  quello che avete imparato.

  Questo  un documento in evoluzione. Intendo continuare ad aggiungere
  sezioni in risposta agli stimoli dei lettori, pertanto periodicamente
  dovreste tornare a rivederlo.


  2.  Novit

  Novit nella versione 1.2: Sezione `Come fa il computer a
  immagazzinare le cose in memoria?'.  Novit nella versione 1.3:
  Sezione `Che cosa accade con il log in?' e `Proprietari dei file,
  autorizzazioni e sicurezza'.


  2.1.  Risorse correlate

  Se state leggendo questo documento al fine di imparare come diventare
  un hacker, dovreste anche leggere la How To Become A Hacker FAQ
  <http://www.tuxedo.org/~esr/faqs/hacker-howto.html>.  Contiene dei
  link ad altre risorse utili.


  2.2.  Nuove versioni di questo documento

  Nuove versioni dello Unix and Internet Fundamentals HOWTO verranno
  periodicamente postate su comp.os.linux.help, comp.os.linux.announce e
  news.answers <news:answers>.  Saranno anche depositate su vari siti
  WWW e FTP dedicati a Linux, inclusa la LDP home page.
  Potete vedere l'ultima versione sul World Wide Web all'URL
  <http://metalab.unc.edu/LDP/HOWTO/Fundamentals-HOWTO.html>.


  2.3.  Commenti, suggerimenti e correzioni

  Se avete domande o commenti su questo documento sentitevi liberi di
  contattare Eric S. Raymond all'indirizzo esr@thyrsus.com.  Qualsiasi
  suggerimento o critica sar il benvenuto. Apprezzo particolarmente
  link a spiegazioni pi dettagliate dei singoli concetti. Se trovate un
  errore per favore fatemelo sapere, in modo che lo possa correggere
  nella prossima versione. Grazie.


  3.  Anatomia di base del computer

  Dentro al vostro computer c' un chip processore che compie
  l'elaborazione vera e propria. C' una memoria interna (quella che la
  gente DOS/Windows chiama ``RAM'' e la gente Unix spesso chiama
  ``core''). Il processore e la memoria risiedono sulla scheda madre,
  che  il cuore del vostro computer.

  Il vostro computer ha uno schermo e una tastiera. Ha dischi fissi e
  dischi floppy. Lo schermo e i dischi hanno schede controller che si
  attaccano sulla scheda madre e aiutano il computer a gestire questi
  dispositivi.  (La tastiera  troppo semplice per aver bisogno di una
  scheda separata; il controller  costruito all'interno della tastiera
  stessa.)

  Scenderemo pi avanti in alcuni dei dettagli relativi al funzionamento
  di questi dispositivi. Per ora, ecco alcune cose di base da tenere a
  mente su come funzionano assieme:

  Tutte le parti interne del vostro computer sono collegate da un bus.
  Fisicamente, il bus  quello dove si attaccano le schede controller
  (la scheda video, il controller del disco, una scheda audio se ce
  l'avete). Il bus  l'autostrada dei dati tra il processore, lo
  schermo, il disco e tutto il resto.

  Il processore, che fa funzionare tutto il resto, in realt non  in
  grado di vedere direttamente nessuno degli altri pezzi: deve
  comunicare con loro attraverso il bus. L'unico sottosistema al quale
  ha accesso veramente rapido, immediato,  la memoria (core). Perch i
  programmi siano eseguiti, dunque, devono essere in memoria.

  Quando il vostro computer legge un programma o dei dati dal disco in
  effetti succede che il processore usa il bus per spedire una richiesta
  di lettura disco al controller del disco. Dopo un po' di tempo il
  controller del disco usa il bus per segnalare al computer che ha letto
  i dati e li ha messi in una certa locazione di memoria. Il processore
  pu allora usare il bus per guardare in quella memoria.

  Anche la tastiera e lo schermo comunicano con il processore attraverso
  il bus, ma in modi pi semplici. Ne discuteremo pi avanti. Per ora,
  ne sapete abbastanza per capire cosa succede quando accendete il
  vostro computer.


  4.  Cosa succede quando si accende un computer?

  Un computer senza un programma in esecuzione  soltanto un ammasso
  inerte di componenti elettronici. La prima cosa che un computer deve
  fare quando viene acceso  far partire un programma speciale chiamato
  sistema operativo. Il compito del sistema operativo  aiutare gli
  altri programmi del computer a funzionare, gestendo gli intricati
  dettagli relativi al controllo dell'hardware del computer.
  Il processo di avvio del sistema operativo si chiama boot (in origine
  era bootstrap e alludeva alla difficolt di tirarsi su da solo, ``by
  your bootstraps'').  Il vostro computer sa come avviarsi perch le
  istruzioni per il boot sono incorporate in uno dei suoi chip, il BIOS
  (Basic Input/Output System).

  Il chip BIOS gli dice di cercare uno speciale programma chiamato boot
  loader (quello di Linux si chiama LILO) che si trova in un posto
  predefinito del disco fisso con numero pi basso (il disco di avvio).
  Il compito del boot loader  far partire il sistema operativo vero e
  proprio.

  Per compiere quest'ultima operazione il loader cerca un kernel, lo
  carica in memoria e lo fa partire. Quando avviate Linux e vedete
  ``LILO'' sullo schermo, seguito da una riga di puntini, vuol dire che
  sta caricando il kernel. (Ogni puntino significa che ha caricato un
  altro blocco del disco di codice kernel).

  (Vi potreste chiedere come mai il BIOS non carica il kernel
  direttamente: perch questo processo a due stadi con il boot loader?
  Beh, il BIOS non  molto intelligente. In effetti  proprio stupido, e
  Linux non lo usa pi dopo la fase di avvio. Fu scritto in origine per
  i PC primitivi a 8 bit con dischi poco capienti e proprio non riesce
  ad accedere a una parte abbastanza grande del disco per caricare
  direttamente il kernel. La fase del boot loader consente anche di far
  partire diversi sistemi operativi da posti diversi del vostro disco,
  nella improbabile circostanza che Unix non vi soddisfi a sufficienza.)

  Dopo essere partito, il kernel si guarda in giro, trova il resto
  dell'hardware e si prepara a far girare i programmi. Fa tutto questo
  guardando non nelle ordinarie locazioni di memoria ma piuttosto alle
  porte I/O, speciali indirizzi bus che probabilmente hanno schede
  controller di dispositivi che sono in ascolto in attesa di comandi. Il
  kernel non cerca a caso; ha molta conoscenza innata su cosa 
  probabile trovare dove, e su come i controller rispondono se sono
  presenti. Questo processo si chiama autorilevamento.

  La maggior parte dei messaggi che vedete durante la fase di avvio sono
  del kernel che fa l'autorilevamento del vostro hardware attraverso le
  porte I/O, riconosce cosa ha a sua disposizione e si adatta al vostro
  computer. Il kernel di Linux  estremamente bravo in questo, meglio
  della maggior parte degli altri Unix e molto meglio del DOS o di
  Windows. Infatti, molti linuxiani della prima ora pensano che
  l'intelligenza del rilevamento all'avvio di Linux (che lo rende
  relativamente facile da installare) sia stata una delle principali
  ragioni che lo hanno fatto sfondare dal mucchio di esperimenti di Unix
  liberi, attraendo una massa critica di utenti.

  Ma avere il kernel del tutto caricato e funzionante non  la fine del
  processo di boot; ne  solo il primo stadio (a volte chiamato run
  level 1, livello di esecuzione 1). A questo punto il kernel passa il
  controllo a un processo speciale chiamato `init' che esegue diverse
  attivit comuni.

  Il primo compito del processo init  assicurarsi che i vostri dischi
  siano a posto. I file system dei dischi sono fragili: se vengono
  danneggiati da un malfunzionamento hardware o da un'improvvisa
  mancanza di elettricit, ci sono buoni motivi per compiere alcune
  operazioni di riaggiustamento prima che il vostro Unix sia tutto a
  posto. Parleremo pi approfonditamente di questo pi avanti, a
  proposito di ``come i file system si possono danneggiare''.

  Il passo successivo del kernel  far partire diversi demoni. Un demone
  (o daemon)  un programma quale uno spooler di stampa, un programma
  che attende di ricevere posta in arrivo oppure un server WWW che
  rimane latente in sottofondo, aspettando qualcosa da fare. Questi
  programmi speciali devono spesso coordinare diverse richieste che
  rischiano di entrare in conflitto.  Sono demoni perch spesso  pi
  facile scrivere un programma che gira costantemente e viene a
  conoscenza di tutte le richieste piuttosto che cercare di assicurarsi
  che un gruppo di copie (che girano tutte contemporaneamente, con
  ciascuna che processa una richiesta) non si ostacolino a vicenda.  La
  particolare serie di demoni che il vostro sistema fa partire pu
  variare, ma quasi certamente include uno spooler di stampa (un demone
  che fa da `portinaio' per la vostra stampante).

  Una volta che tutti i demoni sono avviati ci troviamo al run level 2.
  Il prossimo passo  prepararsi per gli utenti. Init avvia una copia di
  un programma chiamato getty per controllare la vostra console (e forse
  altre copie per controllare le porte seriali dial-in). Questo
  programma  quello che emette il prompt login alla vostra console.
  Siamo ora al run level 3, pronti per fare il log in e lanciare i
  programmi.


  5.  Che cosa accade con il log in?

  Quando fate il log in (date un nome e la password) vi identificate a
  getty e al computer. Parte allora un altro programma chiamato
  (ovviamente) login, che controlla se siete autorizzati a usare quella
  macchina. Se non lo siete, il tentativo di log in viene rifiutato. Se
  lo siete, login compie qualche operazione di servizio e poi fa partire
  un interprete di comandi, la shell. (S, getty e login potrebbero
  essere un solo programma. Sono separati per motivi storici che qui non
  vale la pena approfondire.)

  Ecco pi in dettaglio che cosa accade prima che compaia la shell; sar
  necessario comprenderlo pi avanti quando parleremo di autorizzazioni
  dei file. Si viene identificati con un nome di login e password.
  Questo nome di login viene cercato in un file chiamato /etc/password,
  costituito da una sequenza di righe ciascuna delle quali descrive un
  account utente.

  Uno di questi campi  una versione cifrata della password
  dell'account. Quello che inserite come password viene cifrato
  esattamente allo stesso modo e il programma login controlla se
  corrispondono. La sicurezza di questo metodo dipende dal fatto che,
  mentre  facile passare da una password in chiaro a una cifrata,
  l'inverso  molto difficile. Per cui, se qualcuno riesce a vedere la
  versione cifrata della vostra password non pu comunque usare il
  vostro account. (Significa anche che se dimenticate la vostra
  password, non c' modo di recuperarla, ma solamente di cambiarla in
  un'altra di vostra scelta.)

  Una volta effettuato il log in con successo, otterrete tutti i
  privilegi associati al singolo account che state utilizzando. Potreste
  anche essere riconosciuti come appartenenti a un group. Un gruppo  un
  insieme di utenti impostato dall'amministratore e a cui  associato un
  nome. I gruppi possono avere privilegi indipendentemente dai privilegi
  dei loro membri. Un utente pu appartenere a pi gruppi. (Per maggiori
  dettagli sul funzionamento dei privilegi in Unix si veda la sezione su
  ``''.)

  (Si noti che, sebbene si fa normalmente riferimento agli utenti e ai
  gruppi per nome, essi sono in realt memorizzati internamente come ID
  numerici. Il file password associa il vostro nome di account a un ID
  utente; il file /etc/group associa i nomi di gruppo agli ID numerici
  dei gruppi. I comandi che hanno a che fare con account e gruppi
  effettuano automaticamente la conversione.)

  La vostra registrazione di account contiene anche la vostra home
  directory, il posto nel file system Unix che contiene i vostri file
  personali. Infine, la registrazione dell'account imposta anche la
  shell, l'interprete di comandi che login avvier per accettare i
  vostri comandi.


  6.  Cosa succede quando si eseguono i programmi dalla shell?

  La shell normale vi presenta il prompt '$' che vedete dopo il login (a
  meno che non lo abbiate personalizzato). Non parleremo della sintassi
  della shell e delle cose semplici che potete vedere da soli sullo
  schermo; daremo piuttosto uno sguardo dietro le quinte a quello che
  succede dal punto di vista del computer.

  Dopo la fase di avvio, e prima che sia eseguito un programma, potete
  pensare al vostro computer come a un contenitore di un repertorio di
  processi che stanno tutti aspettando qualcosa da fare. Stanno tutti
  aspettando degli eventi. Un evento pu essere voi che premete un tasto
  o muovete il mouse. Oppure, se il vostro computer  collegato a una
  rete, un evento pu essere un pacchetto di dati che arriva lungo
  quella rete.

  Il kernel  uno di questi processi.  uno speciale, perch controlla
  quando gli altri processi utente possono girare ed  normalmente
  l'unico processo con accesso diretto all'hardware del computer.
  Infatti, i processi utente devono fare richiesta al kernel quando
  vogliono ottenere un input dalla tastiera, scrivere sullo schermo,
  leggere o scrivere su disco o fare qualsiasi altra cosa che non sia
  macinare bit in memoria. Queste richieste sono note come chiamate di
  sistema.

  Normalmente tutto l'I/O passa attraverso il kernel, cos quest'ultimo
  pu organizzare le operazioni e impedire che i processi si ostacolino
  a vicenda. Alcuni processi utente speciali hanno il permesso di
  aggirare il kernel, di solito per ottenere accesso diretto alle porte
  I/O. I server X (i programmi che gestiscono le richieste degli altri
  programmi di generare grafica sullo schermo, sulla maggior parte dei
  computer Unix) sono gli esempi pi comuni al riguardo. Ma non siamo
  ancora arrivati a un server X; state guardando il prompt della shell
  su una console a caratteri.

  La shell  solo un processo utente, e neppure uno tanto speciale.
  Attende che voi digitiate qualcosa, ascoltando (attraverso il kernel)
  sulle porte I/O della tastiera. Come il kernel vede che avete digitato
  qualcosa lo visualizza sullo schermo e poi lo passa alla shell. Quando
  il kernel vede un `Invio' passa la vostra linea di testo alla shell.
  La shell tenta di interpretare questo testo come se si trattasse di
  comandi.

  Diciamo che digitate `ls' e Invio per invocare il programma Unix che
  elenca le directory. La shell applica le sue regole incorporate per
  indovinare che volete lanciare il comando eseguibile nel file
  `/bin/ls'. Fa una chiamata di sistema chiedendo al kernel di far
  partire /bin/ls come un nuovo processo figlio e di dargli accesso allo
  schermo e alla tastiera attraverso il kernel. Poi la shell va a
  dormire, aspettando che ls finisca.

  Quando /bin/ls ha finito dice al kernel che ha terminato emettendo una
  chiamata di sistema exit. Il kernel allora sveglia la shell e le dice
  che pu riprendere a girare. La shell emette un altro prompt e attende
  un'altra linea di input.

  Tuttavia (supponiamo che stiate elencando una directory molto lunga)
  potrebbero succedere altre cose mentre `ls'  in esecuzione.  Potreste
  passare su un'altra console virtuale, fare il log in di l e iniziare
  una partita a Quake, per esempio. Oppure immaginate di essere
  collegati a Internet. Il vostro computer potrebbe spedire o ricevere
  posta mentre /bin/ls  in esecuzione.


  7.  Come funzionano i dispositivi di input e gli interrupt?

  La tastiera  un dispositivo di input molto semplice: semplice perch
  genera piccole quantit di dati molto lentamente (per gli standard di
  un computer). Quando premete o rilasciate un tasto, il valore di
  questo evento viene segnalato attraverso il cavo della tastiera per
  far scattare un interrupt hardware.

   compito del sistema operativo stare attento a questi interrupt. Per
  ogni possibile tipo di interrupt c' un gestore dell'interrupt, una
  parte del sistema operativo che immagazzina i dati a esso associati
  (come il valore del vostro premere/rilasciare il tasto) finch pu
  essere processato.

  Quello che effettivamente fa il gestore dell'interrupt della vostra
  tastiera  mettere il valore del tasto in un'area di sistema vicino al
  fondo della memoria. L rimane a disposizione per ispezione quando il
  sistema operativo passa il controllo al programma che ritiene stia
  attualmente leggendo dalla tastiera.

  Dispositivi di input pi complessi come i dischi o le schede di rete
  funzionano in modo simile. Sopra abbiamo fatto il caso di un
  controller del disco che usa il bus per segnalare che una richiesta
  disco  stata ultimata. In realt succede che il disco fa scattare un
  interrupt. Il gestore dell'interrupt del disco copia poi in memoria i
  dati ottenuti, a uso successivo da parte del programma che aveva fatto
  la richiesta.

  A ogni tipo di interrupt  associato un livello di priorit. Gli
  interrupt con priorit pi bassa (come gli eventi della tastiera)
  devono dare la precedenza agli interrupt con priorit pi alta (come i
  tick dell'orologio o gli eventi del disco). Unix  progettato per dare
  alta priorit al tipo di eventi che hanno bisogno di essere processati
  rapidamente, in modo da mantenere fluida la risposta del computer.

  Tra i messaggi d'avvio del vostro SO potete vedere dei riferimenti a
  numeri di IRQ. Forse sapete, senza capirne esattamente il perch, che
  uno dei modi pi comuni di configurare male l'hardware  avere due
  dispositivi diversi che cercano di usare lo stesso IRQ.

  Ecco la spiegazione. IRQ  l'abbreviazione di ``Interrupt Request''
  (richiesta di interrupt). Il sistema operativo ha bisogno di sapere al
  momento dell'avvio quali interrupt numerati verranno usati da ciascun
  dispositivo hardware, in modo da poter associare a ciascuno il gestore
  appropriato. Se due dispositivi diversi cercano di usare lo stesso IRQ
  a volte gli interrupt verranno notificati al gestore sbagliato. Questo
  di solito provocher quantomeno il blocco del dispositivo, ma pu a
  volte confondere il SO a tal punto da farlo diventare instabile oppure
  mandarlo in crash.


  8.  Come fa il computer a fare diverse cose contemporaneamente?

  Non lo fa, in realt. I computer possono svolgere soltanto un task (o
  processo) alla volta. Ma un computer pu cambiare task molto
  rapidamente e indurre i lenti esseri umani a pensare che sta facendo
  diverse cose contemporaneamente. Questo viene chiamato timesharing
  (condivisione di tempo).

  Uno dei compiti del kernel  gestire il timesharing. Ha una parte
  chiamata scheduler (pianificatore) che contiene informazioni relative
  a tutti gli altri processi (a parte il kernel) del vostro repertorio.
  Ogni sessantesimo di secondo nel kernel fa scattare un timer e viene
  generato un clock di interrupt. Lo scheduler ferma qualunque processo
  sia attualmente in esecuzione, lo sospende sul posto e passa il
  controllo a un altro processo.

  Un sessantesimo di secondo pu non sembrare una grande quantit di
  tempo. Ma per i microprocessori odierni  sufficiente per eseguire
  decine di migliaia di istruzioni macchina, che si possono tradurre in
  una gran mole di lavoro. Quindi anche se ci sono molti processi
  ciascuno di essi pu fare molte cose nella porzione di tempo a sua
  disposizione.

  In pratica non sempre un programma ottiene la sua intera porzione di
  tempo. Se scatta un interrupt da un dispositivo I/O il kernel ferma
  effettivamente il task corrente, esegue il gestore dell'interrupt e
  poi ritorna al task corrente. Una tempesta di interrupt ad alta
  priorit pu scombinare il normale funzionamento dei processi; questo
  fenomeno viene chiamato thrashing e per fortuna  molto difficile da
  indurre negli Unix moderni.

  Infatti la velocit dei programmi solo molto di rado  limitata dalla
  quantit di tempo macchina a loro disposizione (ci sono alcune
  eccezioni a questa regola, quali il suono o la generazione di grafica
  3D). Molto pi spesso dei ritardi si generano quando il programma deve
  attendere dei dati da un disco o da una connessione di rete.

  Un sistema operativo che pu di norma gestire pi processi
  simultaneamente  detto ``multitasking''. La famiglia di sistemi
  operativi Unix  stata progettata fin dall'inizio per il multitasking
  e lo fa molto bene, in modo molto pi efficace rispetto a Windows o al
  Mac OS ai quali il multitasking  stato appiccicato a posteriori in
  seguito a un ripensamento e lo fanno in modo piuttosto povero. Il
  multitasking efficiente e affidabile costituisce buona parte di ci
  che rende Linux superiore per le applicazioni di rete, le
  comunicazioni e i servizi Web.


  9.  loro?  Come fa il computer a evitare che i processi si intralcino
  tra

  Lo scheduler del kernel si prende cura di dividere il tempo tra i
  processi. Il vostro sistema operativo deve dividere tra i processi
  anche lo spazio, per evitare che non sconfinino oltre la porzione di
  memoria loro assegnata. Le operazioni compiute dal sistema operativo
  per risolvere questo problema si chiamano gestione della memoria.

  Ogni processo del vostro repertorio ha la propria area di memoria
  core, come luogo dal quale eseguire il proprio codice e dove
  immagazzinare le variabili e i risultati. Potete pensare a questo
  insieme come formato da un segmento codice, di sola lettura (che
  contiene le istruzioni del processo), e da un segmento dati (che
  contiene tutte le variabili immagazzinate dal processo). Il segmento
  dati  sempre unico per ogni processo, mentre nel caso due processi
  usino lo stesso codice Unix automaticamente fa in modo che condividano
  un unico segmento codice, come misura di efficienza.

  L'efficienza  importante, perch la memoria core  costosa. A volte
  non ne avete abbastanza per contenere per intero tutti i programmi che
  il computer sta eseguendo, specialmente se usate un grosso programma
  quale un server X. Per ovviare a questo problema Unix usa una
  strategia chiamata memoria virtuale. Non cerca di tenere in core tutti
  i dati e il codice di un processo. Tiene piuttosto caricato solo un
  working set relativamente piccolo; il resto dello stato del processo
  viene lasciato in uno speciale spazio swap sul vostro disco fisso.

  Come i processi sono in esecuzione Unix tenta di anticipare i
  cambiamenti del working set per avere in memoria solo le parti che
  servono davvero. Riuscirci in modo efficace  ingegnoso e complesso,
  pertanto non cercher di descriverlo tutto qui, ma si basa sul fatto
  che il codice e i riferimenti ai dati tendono a comparire a gruppi, ed
   probabile che un nuovo gruppo si colleghi a luoghi vicini a quelli
  di uno precedente. Quindi se Unix tiene caricati i dati e il codice
  usati pi di frequente (o di recente) di solito riuscir a risparmiare
  del tempo.

  Notate che in passato quel ``A volte'' di due paragrafi fa era un
  ``Quasi sempre'', perch la dimensione della memoria era tipicamente
  ridotta rispetto alla dimensione dei programmi in esecuzione, quindi
  il ricorso allo swap era frequente. Oggi la memoria  molto meno
  costosa e persino i computer di fascia bassa ne hanno parecchia. Sui
  moderni computer monoutente con 64MB di memoria e oltre  possibile
  eseguire X e un insieme tipico di programmi senza neppure ricorrere
  allo swap.

  Anche in questa felice situazione la parte del sistema operativo
  chiamata gestore della memoria mantiene un importante ruolo da
  svolgere. Deve garantire che i programmi possano modificare soltanto
  il proprio segmento dati; deve cio impedire che del codice difettoso
  o malizioso in un programma rovini i dati di altri programmi. A questo
  scopo tiene una tabella dei segmenti dati e codice. La tabella 
  aggiornata non appena un processo richiede pi memoria oppure libera
  memoria (quest'ultimo caso si verifica di solito all'uscita dal
  programma).

  Questa tabella  usata per passare comandi a una parte specializzata
  dell'hardware sottostante chiamata MMU o unit di gestione della
  memoria. I processori moderni hanno MMU incorporate. La MMU ha la
  peculiare capacit di porre dei delimitatori attorno alle aree di
  memoria, in modo che un riferimento che sconfina venga rifiutato e
  faccia scattare uno speciale interrupt.

  Se avete mai visto un messaggio del tipo ``Segmentation fault'',
  ``core dumped'' o qualcosa del genere, questo  esattamente quello che
   successo: un tentativo da parte del programma in esecuzione di
  accedere alla memoria al di fuori dal proprio segmento ha fatto
  scattare un interrupt fatale. Questo rivela un bug nel codice del
  programma; il core dump (scarico della memoria) che lascia dietro di
  s costituisce una informazione diagnostica volta ad aiutare il
  programmatore nell'individuazione del problema.

  C' un altro aspetto che protegge i processi l'uno dall'altro, oltre
  alla limitazione della memoria a cui possono accedere. Si vuole anche
  poter controllare il loro accesso ai file in modo che un programma
  difettoso o malizioso non possa rovinare parti critiche del sistema. 
  per questo motivo che Unix possiede le ``autorizzazioni sui file'' che
  vedremo in dettaglio pi avanti.


  10.  Come fa il computer a immagazzinare le cose in memoria?

  Probabilmente saprete che ogni cosa in un computer viene memorizzata
  come stringa di bit (binary digit; possiamo immaginarli come molti
  piccoli interruttori). Ora vedremo come questi bit vengano impiegati
  per rappresentare le lettere e i numeri che il computer manipola.

  Prima di poter affrontare questo argomento,  necessario comprendere
  la dimensione di parola del computer. Si tratta della dimensione
  preferita dal computer per spostare unit di informazioni;
  tecnicamente  l'ampiezza dei registri dei processore, ovvero le aree
  che il processore utilizza per compiere calcoli logici e aritmetici.
  Quando leggiamo che i computer hanno dimensione in bit (per esempio
  ``32-bit'' o ``64-bit'') ecco che cosa si intende.

  La maggior parte dei computer (compresi i PC 386, 486, Pentium e
  Pentium II) ha una dimensione di parola di 32 bit. Le vecchie macchine
  286 lavoravano a 16. Mainframe vecchio stile spesso hanno parole di 36
  bit. Pochi processori (come Alpha di quella che prima era la DEC e ora
   Compaq) hanno parole di 64 bit. La parola di 64 bit diverr pi
  comune nei prossimi cinque anni; Intel sta progettando di sostiuire il
  Pentium II con un chip a 64 bit chiamato `Merced'.

  Il computer vede la memoria core come sequenza di parole numerate da
  zero in avanti, fino a valori molto grandi a seconda della dimensione
  della memoria. Tale valore  limitato dalla dimensione della parola,
  motivo per cui le vecchie macchine come i 286 dovevano svolgere
  complicati contorsionismi per indirizzare grandi quantit di memoria.
  Non li descriver qui; procurano ancora degli incubi ai vecchi
  programmatori.


  10.1.  Numeri

  I numeri sono rappresentati come parole o coppie di parole, a seconda
  della dimensione di parola del processore. Su macchine a 32 bit, la
  parola  la dimensione pi comune.

  L'aritmetica degli interi  simile ma non  esattamente identica alla
  matematica in base due. Il bit di ordine pi basso  1, il successivo
  2, poi 4 e cos via in notazione binaria. Ma i numeri dotati di segno
  sono rappresentati in notazione complemento a due.  Il bit di ordine
  pi alto  un bit di segno che rende negativa la quantit
  rappresentata, mentre ogni numero negativo pu essere ottenuto dal
  valore positivo corrispondente invertendo tutti i bit.  per questo
  motivo che gli interi su una macchina a 32 bit devono essere compresi
  nell'intervallo tra -2^31 + 1 e 2^31 - 1 (dove ^  l'operatore di
  elevamento a potenza, 2^3 = 8). Il 32-esimo bit  usato per il segno.

  Alcuni linguaggi di programmazione danno accesso a una aritmetica
  senza segno ovvero una artimetica in base 2 con solo i numeri positivi
  e lo zero.

  La maggior parte dei processori e alcuni linguaggi possono manipolare
  numeri in virgola mobile (funzionalit incorporata nel chip di tutti i
  processori recenti). I numeri in virgola mobile forniscono un
  intervallo pi ampio degli interi e consentono di esprimere le
  frazioni. I modi in cui questo avviene sono diversi e un po' troppo
  complicati per essere affrontati in dettaglio in questa sede.
  Tuttavia, l'idea generale  molto simile alla cosiddetta `notazione
  scientifica', dove si pu scrivere (per esempio) 1.234 * 10^23; la
  codifica del numero viene divisa in una mantissa (1.234) e in un
  esponente (23) che indica le potenze di dieci.


  10.2.  Caratteri

  I caratteri sono normalmente rappresentati come stringhe di sette bit,
  in una codifica chiamata ASCII (American Standard Code for Information
  Interchange). Sulle macchine moderne, ciascuno dei 128 caratteri ASCII
   dato dai sette bit pi bassi di un ottetto a 8 bit; gli ottetti sono
  riuniti in parole di memoria in modo che (per esempio) una stringa di
  sei caratteri occupi solamente due parole di memoria. Per vedere una
  mappa dei caratteri ASCII, scrivere `man 7 ascii' al prompt di Unix.

  Il paragrafo precedente, per, non  completamente corretto, per due
  ragioni. Quella minore  che il termine `ottetto'  formalmente
  corretto ma raramente utilizzato; la maggior parte delle persone si
  riferisce a un ottetto come a un byte e ritiene che i byte siano
  lunghi otto bit. Per essere corretti, il termine `byte'  pi
  generale; per esempio, ci sono state macchine a 36 bit con byte di 9
  bit (anche se probabilmente non capiter pi in futuro).

  La ragione principale , invece, che non tutto il mondo usa i codici
  ASCII. Infatti, molti paesi non possono usarli: mentre i codici ASCII
  funzionano bene per l'inglese americano, non contengono molte
  accentate e caratteri speciali necessari per le altre lingue. Persino
  l'inglese britannico ha il problema della mancanza di un segno per la
  sterlina.

  Ci sono stati diversi tentativi di risolvere questo problema. Tutti
  fanno uso dell'ottavo bit non usato dai codici ASCII, che in questo
  modo risultano la met inferiore di un set di 256 caratteri. Quello
  pi largamente utilizzato  il set di caratteri `Latin-1' (o pi
  formalmente ISO 8859-1). Si tratta del set di caratteri predefinito
  per Linux, HTML e X. Microsoft Windows usa una versione mutante di
  Latin-1 che aggiunge alcuni caratteri come le virgolette destre e
  sinistre, in posizioni lasciate libere da Latin-1 per ragioni storiche
  (per una resoconto severo dei problemi che ha provocato, vedere la
  pagina demoroniser <http://www.fourmilab.ch/webtools/demoroniser/>.

  Latin-1 gestisce le principali lingue europee, tra cui inglese,
  francese, tedesco, spagnolo, italiano, olandese, norvegese, svedese,
  danese. Tuttavia non  ancora sufficiente, per cui esistono altre
  serie di set di caratteri da Latin-2 a -9 per rappresentare il greco,
  l'arabo, l'ebraico e il serbo-croato. Per maggiori dettagli vedere la
  pagina ISO alphabet soup
  <http://www.utia.cas.cz/user_data/vs/documents/ISO-8859-X-
  charsets.html>.

  La soluzione definitiva  uno standard enorme chiamato Unicode (e il
  suo gemello identico ISO/IEC 10646-1:1993). Unicode  identico a
  Latin-1 nella 256 posizioni pi basse. Nello spazio successivo dei 16
  bit comprende greco, cirillico, armeno, ebraico, arabo, devanagarico,
  bengalese, gurmukhi, gujarati, oriya, tamil, telugu, kannada, malese,
  tailandese, lao, georgiano, tibetano, giapponese kana, il set completo
  del coreano hangul moderno e un set unificato di ideogrammi
  cinesi/giapponesi/coreani (CJK). Per maggiori dettagli vedere la
  Unicode Home Page <http://www.unicode.org/>.


  11.  Come fa il computer a immagazzinare le cose su disco?

  Quando leggete un disco fisso su Unix vedete un albero di nomi di file
  e directory. Normalmente non avrete bisogno di andare oltre, ma pu
  essere utile avere maggiori dettagli se vi capita un crash del disco e
  dovete cercare di salvare dei file. Sfortunatamente non c' un buon
  modo per descrivere l'organizzazione del disco dal livello dei file in
  gi, quindi dovr partire dall'hardware e risalire.


  11.1.  Struttura di basso livello del disco e del file system

  La superficie del vostro disco, dove vengono immagazzinati i dati, si
  divide in una sorta di bersaglio per il tiro a freccette: in tracce
  circolari che sono poi `affettate' in settori. Dal momento che le
  tracce vicino al bordo esterno hanno area maggiore di quelle vicino al
  centro, le tracce esterne hanno pi settori rispetto a quelle interne.
  Ogni settore (o blocco del disco) ha la stessa dimensione, che sui
  moderni Unix  generalmente pari a 1K binario (1024 parole da 8 bit).
  Ogni blocco  individuato da un indirizzo univoco, il numero di blocco
  del disco.

  Unix divide il disco in partizioni del disco. Ogni partizione 
  formata da una serie continua di blocchi che vengono usati
  separatamente da quelli delle altre partizioni, come file system
  oppure come spazio swap. La partizione con numero pi basso viene
  spesso trattata in modo speciale, come partizione di avvio dove si pu
  mettere un kernel da far partire.

  Ogni partizione  alternativamente uno spazio swap, usato per
  implementare ``memoria virtuale'', oppure un file system, usato per
  contenere i file. Le partizioni swap sono trattate proprio come una
  sequenza lineare di blocchi. I file system, invece, hanno bisogno di
  un modo per associare i nomi dei file alle sequenze di blocchi disco.
  Dal momento che la dimensione dei file aumenta, diminuisce, si
  modifica nel tempo, i blocchi dati di un file non saranno una sequenza
  lineare ma potranno essere disseminati su tutta la sua partizione
  (dipende da dove il sistema operativo riesce a trovare un blocco
  libero quando gliene serve uno).


  11.2.  Nomi dei file e delle directory

  All'interno di ciascun file system la corrispondenza tra i nomi e i
  blocchi viene assicurata da una struttura chiamata i-node. C' un
  gruppo di questi elementi vicino al ``fondo'' (i blocchi a numerazione
  pi bassa) di ciascun file system (quelli pi bassi in assoluto sono
  usati a fini di manutenzione e di etichettatura, non ne parleremo
  qui). Ogni i-node individua un file. I blocchi dati dei file si
  trovano sotto gli i-node.

  Ciascun i-node contiene una lista dei numeri di blocco disco relativi
  al file che individua. (Questa  una mezza verit, corretta solo per i
  file piccoli, ma il resto dei dettagli non  importante qui.)  Notate
  che l'i-node non contiene il nome del file.

  I nomi dei file si trovano nelle strutture delle directory. Una
  struttura della directory associa i nomi ai numeri i-node. Ecco
  perch, su Unix, un file pu avere pi nomi reali (o hard link); sono
  soltanto diverse voci di directory che puntano allo stesso i-node.


  11.3.  Mount point

  Nel caso pi semplice, tutto il vostro file system Unix si trova su di
  una sola partizione disco. Anche se questa situazione si ritrova in
  qualche piccolo sistema Unix personale,  inusuale. Pi generalmente
  esso  suddiviso tra pi partizioni disco, magari su diversi dischi
  fisici. Cos, per esempio, il vostro sistema pu avere una piccola
  partizione dove alloggia il kernel, una un po' pi grande dove si
  trovano i programmi di utilit del SO e una molto pi grande dove ci
  sono le directory personali degli utenti.

  La sola partizione alla quale avrete accesso subito dopo l'avvio del
  sistema  la partizione root, che  (quasi sempre) quella dalla quale
  avete fatto il boot. Essa contiene la root directory del file system,
  il nodo superiore dal quale dipende tutto il resto.

  Le altre partizioni del sistema devono collegarsi a questa root
  affinch tutto il vostro file system multipartizione sia accessibile.
  Circa a met del processo di avvio, il vostro Unix render accessibili
  queste partizioni non root. Dovr montare ciascuna di esse su una
  directory della partizione root.

  Per esempio, se avete una directory chiamata `/usr', si tratta
  probabilmente di un mount point per una partizione che contiene molti
  programmi che fanno parte della distribuzione standard del vostro Unix
  ma che non sono necessari durante l'avvio iniziale.




  11.4.  Come viene cercato un file

  Ora possiamo guardare al file system dall'alto al basso. Ecco cosa
  succede quando aprite un file (quale, ad esempio,
  /home/esr/WWW/ldp/fundamentals.sgml):

  Il kernel parte dalla radice del vostro file system Unix (dalla
  partizione root). Cerca una directory chiamata `home'. Di solito
  `home'  un mount point per una grande partizione utente da qualche
  altra parte, cos va di l. Nella struttura della directory di livello
  pi alto di quella partizione utente cerca poi una voce chiamata `esr'
  e ne estrae un numero di i-node. Va a quell'i-node, vede che si tratta
  di una struttura di directory e cerca `WWW'. Estraendo quell'i-node,
  va alla corrispondente sottodirectory e cerca `ldp'. Questo lo porta a
  un altro i-node di directory ancora. Aprendolo, trova il numero i-node
  di `fundamentals.sgml'. Questo i-node non  una directory, ma contiene
  invece l'elenco dei blocchi disco associati al file.


  11.5.  Proprietari dei file, autorizzazioni e sicurezza

  Per impedire ai programmi di intervenire accidentalmente o
  maliziosamente su dati su cui non dovrebbero, Unix usa le
  autorizzazioni. Queste vennero originariamente pensate per supportare
  il timesharing, proteggendo gli uni dagli altri utenti diversi sulla
  stessa macchina, quando ancora Unix veniva usato su costosi
  minicomputer condivisi.

  Per comprendere le autorizzazioni sui file, occorre richiamare la
  descrizione di utenti e gruppi nella sezione ``Che cosa accade con il
  log in?''. Ciascun file ha un utente proprietario e un gruppo
  proprietario. Inizialmente sono quelli del creatore del file; possono
  poi essere modificati con i programmi chown(1) e chgrp(1).

  Le autorizzazioni fondamentali che possono essere associate a un file
  sono `read' (autorizzazione a leggere i dati contenuti), `write'
  (autorizzazione a modificarli) e `execute' (autorizzazione a eseguirli
  come programma). Ciascun file ha tre set di autorizzazioni; uno per
  l'utente proprietario, uno per tutti gli utenti nel gruppo
  proprietario e uno per tutti gli altri. I `privilegi' che si ottengono
  al momento del log in sono la possibilit di leggere, modificare ed
  eseguire quei file i cui bit di autorizzazione coincidono la propria
  ID utente o quella di un gruppo a cui si appartiene.

  Per vedere come queste possono interagire e come le visualizza Unix,
  osserviamo alcuni elenchi di file su un sistema Unix ipotetico. Ecco
  un esempio:



       snark:~$ ls -l notes
       -rw-r--r--   1 esr      users         2993 Jun 17 11:00 notes




  Si tratta di un file di dati ordinario. Il listato ci dice che il
  proprietario  l'utente `esr', creato con il gruppo proprietario
  `users'. Probabilmente la macchina su cui si trova mette per
  definizione tutti gli utenti ordinari in questo gruppo; altri gruppi
  che si vedranno comunemente su macchine con timesharing sono `staff',
  `admin', o `wheel' (per ovvie ragioni, i gruppi non sono molto
  importanti su workstation a singolo utente o PC). Il vostro Unix
  potrebbe usare un gruppo di default differente, magari derivato dal
  vostro nome utente.

  La stringa `-rw-r--r--' rappresenta i bit di autorizzazione per il
  file. Il primo trattino  la posizione del bit directory; se il file
  fosse stato una directory il bit sarebbe stato `d'. Dopo di questo, le
  prime tre posizioni successive sono le autorizzazioni utente, le
  seconde tre le autorizzazioni del gruppo e le terze tre le
  autorizzazioni per gli altri (spesso chiamate autorizzazioni `world').
  Su questo file l'utente proprietario `esr' pu leggere e modificare il
  file, gli altri appartenenti al gruppo `users' possono leggerlo e cos
  tutti gli altri utenti. Si tratta di un set di autorizzazioni
  piuttosto tipiche per un file di dati ordinario.

  Ora osserviamo un file con autorizzazioni molto diverse. Tale file 
  GCC, il compilatore C GNU.



       snark:~$ ls -l /usr/bin/gcc
       -rwxr-xr-x   3 root     bin         64796 Mar 21 16:41 /usr/bin/gcc




  Questo file appartiene a un utente chiamato `root' e ad un gruppo
  chiamato `bin'; pu essere modificato solo da root, ma letto ed
  eseguito da tutti. Si tratta di un proprietario e un set di
  autorizzazioni tipiche per un comando di sistema pre-installato. Il
  gruppo `bin' esiste su alcuni Unix per raggruppare i comandi di
  sistema (il nome  una reliquia storica, abbreviazione di `binary').
  Il vostro Unix potrebbe usare invece un gruppo `root' (non esattamente
  la stessa cosa dell'utente `root'!).

  L'utente `root'  il nome convenzionale per l'ID utente con numero 0,
  un account speciale privilegiato che pu scavalcare tutti i privilegi.
  L'accesso root  utile ma pericoloso; un errore di battitura quando si
   collegati come root potrebbe rovinare file critici del sistema, cosa
  che non pu avvenire con un account utente ordinario.

  Poich l'account root  cos potente, il suo accesso dovrebbe essere
  sorvegliato attentamente. La password di root  il componente pi
  critico nelle informazioni di sicurezza del sistema, e sar quello che
  cercheranno di ottenere tutti i cracker e gli intrusi che verranno
  dopo di voi.

  (Per quanto riguarda le password: non scrivetele su carta -- e non
  scegliete password che possano essere indovinate facilmente, come il
  nome della/o vostra/o ragazza/o.  una pratica sorprendentemente
  comune che aiuta continuamente i cracker...)

  Osserviamo ora un terzo caso:



       snark:~$ ls -ld ~
       drwxr-xr-x  89 esr      users          9216 Jun 27 11:29 /home2/esr
       snark:~$




  Questo file  una directory (osserviamo la `d' in prima posizione).
  Vediamo che pu essere modificata solo da esr, ma letta ed eseguita da
  tutti gli altri. Le autorizzazioni vengono interpretate in modo
  speciale sulle directory; esse controllano l'accesso ai file contenuti
  all'interno della directory.


  Autorizzazione in lettura su una directory  semplice; significa
  semplicemente che potete esplorare la directory e aprire i file e le
  directory che contiene. L'autorizzazione in scrittura (modifica) da la
  possibilit di creare e cancellare file nella directory.
  Autorizzazione di esecuzione consente di effettuare ricerche nella
  directory -- ovvero elencare il suo contenuto e vedere i nomi dei file
  e delle directory che contiene. A volte troverete directory che sono
  leggibili da tutti ma non eseguibili; questo significa che un utente
  qualunque pu accedere a file e directory al suo interno, ma solamente
  se ne conosce il nome esatto.

  Infine, osserviamo le autorizzazioni del programma login stesso.



       snark:~$ ls -l /bin/login
       -rwsr-xr-x   1 root     bin         20164 Apr 17 12:57 /bin/login




  Possiede le autorizzazioni che ci aspetteremmo per un comando di
  sistema -- tranne la `s' dove dovrebbe esserci il bit per
  l'autorizzazione in esecuzione del proprietario. Si tratta della
  manifestazione visibile di un tipo speciale di autorizzazione chiamata
  `set-user-id' o bit setuid.

  Il bit setuid  normalmente legato a programmi che hanno la necessit
  di dare agli utenti ordinari i privilegi di root, ma in modo
  controllato. Quando  impostato su un programma eseguibile, si
  acquistano i privilegi del proprietario di quel file finch si esegue
  quel programma, sia che essi coincidano con i nostri oppure no.

  Come l'account root stesso, i programmi setuid sono utili ma
  pericolosi. Chiunque sia in grado di sovvertire o modificare un
  programma setuid che ha root come proprietario, pu utilizzarlo per
  accedere alla shell con privilegi di root. Per questa ragione sulla
  maggior parte dei sistemi Unix, aprendo un file in scrittura
  automaticamente il suo bit setuid viene disattivato. Molti attacchi
  alla sicurezza su Unix tentano di scoprire bug nei programmi setuid,
  con lo scopo di sovvertirli. Amministratori di sistema attenti alla
  sicurezza sono quindi molto prudenti con questi programmi e riluttanti
  alla installazione di nuovi.

  Ci sono un paio di importati dettagli che abbiamo sorvolato durante la
  discussione precedente sulle autorizzazioni; in particolare, come
  vengono assegnati l'utente e il gruppo proprietario quando viene
  creato un file per la prima volta. Il gruppo  importante poich gli
  utenti possono essere membri di pi gruppi, ma uno di essi
  (specificato nella voce dell'utente in /etc/passwd)  il gruppo di
  default dell'utente e normalmente possieder i file creati
  dall'utente.

  Per quanto riguarda i bit iniziali di autorizzazione, la faccenda 
  leggermente pi complicata. Un programma che crea un file normalmente
  specificher le autorizzazioni con cui dovr partire. Queste, per,
  verranno modificate da una variabile nell'ambiente dell'utente
  chiamata umask. Umask speciica quali bit di autorizzazione disattivare
  quando crea un file; il valore pi comune, e il default sulla maggior
  parte dei sistemi,  -------w- o 002, che disattiva il bit di modifica
  per tutti gli utenti. Vedere la documentazione per il comando umask
  nella pagina di manuale della shell per maggiori dettagli.




  11.6.  Come le cose possono andare male

  Prima accennavamo al fatto che i file system possono essere delicati.
  Ora sappiamo che per raggiungere un file dobbiamo fare il gioco della
  campana attraverso quella che pu essere una catena arbitrariamente
  lunga di riferimenti i-node e directory. Supponiamo ora che sul vostro
  disco fisso si formi un punto danneggiato.

  Se siete fortunati ci vi far perdere solo qualche file di dati. Se
  invece siete sfortunati, si potrebbe danneggiare una struttura di
  directory o un numero i-node e un intero sottoalbero del vostro
  sistema potrebbe rimanere pendente nel limbo. Oppure, peggio ancora,
  si potrebbe originare una struttura rovinata che punta in pi modi
  allo stesso blocco disco o i-node. Un danneggiamento di questo tipo si
  pu propagare a partire da una normale operazione sui file, facendo
  perdere tutti i dati collegati al punto danneggiato di origine.

  Fortunatamente questo tipo di eventualit  divenuto abbastanza
  infrequente perch l'hardware dei dischi  pi affidabile. Tuttavia,
  questo comporta che il vostro Unix voglia controllare periodicamente
  l'integrit del file system per assicurarsi che non ci sia nulla fuori
  posto. Gli Unix moderni compiono un rapido controllo dell'integrit di
  ciascuna partizione nella fase di avvio, giusto prima di montarle.
  Ogni tot riavvii fanno un controllo molto pi approfondito che impiega
  qualche minuto in pi.

  Se tutto questo pu far sembrare che Unix sia terribilmente complesso
  e incline a malfunzionamenti, pu essere rassicurante sapere che
  questi controlli nella fase d'avvio tipicamente intercettano e
  correggono i problemi normali prima che diventino veramente
  disastrosi. Altri sistemi operativi non hanno questi strumenti, cosa
  che velocizza un po' l'avvio ma pu mettervi molto di pi nei pasticci
  quando cercate di fare un salvataggio a mano (e sempre assumendo che
  abbiate una copia delle Norton Utilities o simili, tanto per
  cominciare...).


  12.  Come funzionano i linguaggi per computer?

  Abbiamo gi visto ``come vengono eseguiti i programmi''. Ogni
  programma in definitiva deve eseguire un flusso di byte che sono
  istruzioni nel linguaggio macchina del vostro computer. Ma gli esseri
  umani non se la cavano molto bene con il linguaggio macchina;
  riuscirci  divenuta un'arte rara, una magia nera persino tra gli
  hacker.

  Quasi tutto il codice Unix, ad eccezione di una piccola porzione
  relativa all'interfaccia diretta con l'hardware nel kernel, viene oggi
  scritto in un linguaggio di alto livello. (`Alto livello' in questa
  espressione  un residuo storico volto a distinguerlo dai linguaggi
  assembler di `basso livello', che sono fondamentalmente sottili
  involucri attorno al codice macchina.)

  Ci sono diversi tipi di linguaggi di alto livello. Per affrontare
  l'argomento troverete utile tenere a mente che il codice sorgente di
  un programma (la versione creata dall'uomo, editabile) deve passare
  attraverso un qualche tipo di traduzione in codice macchina che il
  computer pu effettivamente eseguire.


  12.1.  Linguaggi compilati

  Il tipo pi convenzionale di linguaggio  il linguaggio compilato. I
  linguaggi compilati vengono tradotti in file eseguibili di codice
  macchina binario da uno speciale programma chiamato (ovviamente)
  compilatore. Una volta che il codice binario  stato generato potete
  eseguirlo direttamente senza pi guardare al codice sorgente. (La
  maggior parte del software  fornita come binari compilati a partire
  da codice che non vedete.)

  I linguaggi compilati tendono a dare prestazioni eccellenti e hanno il
  pi completo accesso al SO, ma tendono anche a essere difficili da
  programmare.

  C, il linguaggio in cui Unix stesso  scritto,  di gran lunga il pi
  importante tra questi (con la sua variante C++). FORTRAN  un altro
  linguaggio ancora usato tra gli ingegneri e gli scienziati ma di anni
  pi vecchio e molto pi primitivo. Nel mondo Unix nessun altro
  linguaggio compilato  nell'uso dominante. Al di fuori di esso, il
  COBOL  molto usato per il software finanziario e commerciale.

  C'erano molti altri linguaggi compilati, ma la maggior parte di essi
  si sono estinti oppure sono strumenti strettamente di ricerca. Se
  siete nuovi sviluppatori Unix e usate un linguaggio compilato 
  estremamente probabile che questo sia il C o il C++.


  12.2.  Linguaggi interpretati

  Un linguaggio interpretato dipende da un programma interprete che
  legge il codice sorgente e lo traduce al volo in calcoli e chiamate di
  sistema. Il sorgente deve essere reinterpretato (e l'interprete deve
  essere presente) ogni volta che il codice viene eseguito.

  I linguaggi interpretati tendono a essere pi lenti dei linguaggi
  compilati e spesso hanno accesso limitato al sistema operativo e
  all'hardware sottostanti. D'altra parte, essi tendono a essere pi
  facili da programmare e pi propensi a perdonare gli errori di
  codifica rispetto ai linguaggi compilati.

  Molti programmi di utilit di Unix, inclusa la shell, bc(1), sed(1) e
  awk(1), sono in effetti piccoli linguaggi interpretati. I BASIC sono
  di solito interpretati. Cos pure il Tcl. Storicamente, il pi
  importante linguaggio interpretato  stato il LISP (un grande
  miglioramento rispetto ai suoi predecessori). Oggi il Perl  molto
  usato ed in costante crescita di popolarit.


  12.3.  Linguaggi a codice P

  Dal 1990  andato assumendo importanza crescente un tipo di linguaggi
  ibridi che usa sia la compilazione che l'interpretazione. I linguaggi
  a codice P sono come i linguaggi compilati nel senso che il sorgente
  viene tradotto in una forma binaria compatta che  ci che viene
  realmente eseguito, ma che non  esattamente codice macchina. Si
  tratta invece di pseudocodice (o codice P) che  solitamente molto pi
  semplice ma pi potente di un vero linguaggio macchina. Quando
  eseguite il programma, interpretate il codice P.

  Il codice P pu girare velocemente quasi quanto un binario compilato
  (gli interpreti di codice P possono essere abbastanza semplici,
  leggeri e rapidi). Ma i linguaggi a codice P riescono a mantenere la
  flessibilit e la potenza di un buon interprete.

  Importanti linguaggi a codice P includono Python e Java.


  13.  Come funziona Internet?

  Per aiutarvi a capire come funziona Internet daremo un'occhiata alle
  cose che succedono quando fate una tipica operazione di Internet:
  indirizzate un browser alla prima pagina di questo documento, sul sito
  Web del Linux Documentation Project. L'indirizzo di questo documento 


  http://metalab.unc.edu/LDP/HOWTO/Fundamentals.html



  che significa che si trova nel file LDP/HOWTO/Fundamentals.html sotto
  la web directory dell'host metalab.unc.edu.


  13.1.  Nomi e locazioni

  La prima cosa che il vostro browser deve fare  stabilire una
  connessione remota al computer dove si trova il documento. A tal fine
  deve prima trovare la locazione remota dell'host metalab.unc.edu
  (`host'  la forma breve di `computer host' o `host remoto';
  metalab.unc.edu  un tipico hostname). La locazione corrispondente 
  in realt un numero chiamato indirizzo IP (spiegheremo pi avanti la
  parte `IP' di questa espressione).

  A questo scopo il vostro browser interroga un programma chiamato name
  server. Il name server pu trovarsi sul vostro computer, ma  pi
  probabile che giri su un computer del fornitore col quale il vostro
  computer dialoga. Quando vi collegate a un ISP una parte della
  procedura consiste quasi sicuramente nel dire al vostro software per
  Internet qual  l'indirizzo IP di un name server sulla rete dell'ISP.

  I name server sui vari computer si parlano tra loro, scambiandosi e
  tenendo aggiornate tutte le informazioni necessarie per risolvere i
  nomi degli host (per metterli in corrispondenza con gli indirizzi IP).
  Il vostro name server pu interrogare tre o quattro diversi siti sulla
  rete nel processo di risoluzione di metalab.unc.edu, ma di solito
  questo si verifica molto rapidamente (tipo in meno di un secondo).

  Il name server dir al vostro browser che l'indirizzo IP di Metalab 
  152.2.22.81; a questo punto il vostro computer sar in grado di
  scambiare direttamente bit con metalab.


  13.2.  Pacchetti e router


  Quello che il browser vuole  mandare al server Web su Metalab un
  comando come questo:


  GET /LDP/HOWTO/Fundamentals.html HTTP/1.0



  Ecco cosa succede. Dal comando si costruisce un pacchetto, cio un
  blocco di bit come un telegramma che  `impacchettato' con tre cose
  importanti: l'indirizzo di provenienza (l'indirizzo IP del vostro
  computer), l'indirizzo di destinazione (152.2.22.81), e un numero di
  servizio o numero di porta (in questo caso 80) che indica che si
  tratta di una richiesta World Wide Web.

  Il vostro computer spedisce allora il pacchetto lungo il cavo (la
  connessione modem al vostro ISP o rete locale) finch arriva a un
  computer specializzato chiamato router. Il router ha nella sua memoria
  una mappa di Internet, non sempre una completa, ma una che descrive
  completamente il vostro vicinato di rete e sa come raggiungere i
  router per altri circondari di Internet.


  Il vostro pacchetto potrebbe passare attraverso svariati router lungo
  la strada per la sua destinazione. I router sono intelligenti.
  Guardano quanto tempo impiegano gli altri router per avvertire che
  hanno ricevuto un pacchetto. Usano questa informazione per dirigere il
  traffico verso i collegamenti veloci. La usano per accorgersi se un
  altro router (o un cavo) sono fuori servizio o irraggiungibili e
  quindi, se possibile, ovviare al problema trovando un'altra strada.

  C' una leggenda metropolitana secondo la quale Internet  stata
  progettata per sopravvivere alla guerra nucleare. Questo non  vero,
  ma la struttura di Internet  estremamente adatta a ottenere
  prestazioni affidabili anche con l'hardware precario che caratterizza
  questo mondo incerto. Questo deriva direttamente dal fatto che la sua
  intelligenza  distribuita tra migliaia di router piuttosto che
  riunita in poche enormi centrali (come la rete telefonica). Questo
  significa che i malfunzionamenti tendono a essere ben localizzati e la
  rete pu aggirarli.

  Una volta che il vostro pacchetto  giunto al computer di destinazione
  quest'ultimo usa il numero di servizio per inviare il pacchetto al
  server Web. Il server Web pu capire a chi rispondere guardando
  l'indirizzo IP di provenienza del pacchetto con il comando. Quando il
  server Web restituisce questo documento lo suddivide in un certo
  numero di pacchetti. La dimensione dei pacchetti varia a seconda del
  mezzo di trasmissione sulla rete e del tipo di servizio.


  13.3.  TCP e IP

  Per capire come vengono gestite le trasmissioni a pacchetti multipli,
  dovete sapere che Internet in realt usa due protocolli, uno
  sovrapposto all'altro.

  Il livello pi basso, l'IP (Internet Protocol), sa come recapitare
  singoli pacchetti da un indirizzo di provenienza a un indirizzo di
  destinazione ( per questo che si chiamano indirizzi IP). Tuttavia
  l'IP non  affidabile: se un pacchetto si perde o cade i computer di
  origine e di destinazione possono non venirne mai a conoscenza. Nel
  gergo delle reti, l'IP  un protocollo senza connessione; il mittente
  si limita a far partire un pacchetto per il destinatario e non si
  aspetta un avviso di ricevuta.

  L'IP  veloce ed economico, comunque. A volte veloce, economico e
  inaffidabile va bene. Quando giocate in rete a Doom o Quake, ogni
  pallottola  rappresentata da un pacchetto IP. Se alcune vengono
  perse, pazienza.

  Il livello superiore, TCP (Transmission Control Protocol), vi d
  affidabilit. Questi due computer negoziano una connessione TCP (cosa
  che fanno usando l'IP); il ricevente sa che deve spedire al mittente
  un avviso di ricevuta dei pacchetti che legge. Se il mittente non vede
  un avviso di ricevuta per un pacchetto entro un certo periodo di tempo
  (timeout) allora rispedisce quel pacchetto. Inoltre, il mittente
  attribuisce a ogni pacchetto TCP un numero di sequenza, che il
  ricevente pu usare per riassemblare i pacchetti nel caso che
  risultino in disordine. (Cosa che si verifica se un collegamento della
  rete viene attivato o cade durante una connessione.)

  I pacchetti TCP/IP contengono anche un checksum per consentire
  l'individuazione di dati rovinati da collegamenti difettosi. Cos, dal
  punto di vista di chiunque usi il TCP/IP e i name server, sembra
  affidabile passare flussi di byte in coppie hostname/numero di
  servizio. Chi scrive i protocolli di rete non deve quasi mai pensare
  agli aspetti di basso livello relativi alla pacchettizzazione, al
  riassemblaggio dei pacchetti, al controllo degli errori, al checksum e
  alla ritrasmissione.
  13.4.  HTTP, un protocollo applicativo

  Torniamo ora al nostro esempio. I browser e i server Web dialogano
  usando un protocollo applicativo che si appoggia al TCP/IP, usandolo
  semplicemente come un modo per passare stringhe di byte avanti e
  indietro. Questo protocollo  chiamato HTTP (Hyper-Text Trasfer
  Protocol, protocollo per il trasferimento di ipertesti) e abbiamo gi
  visto un suo comando: il GET mostrato sopra.

  Quando il comando GET arriva al server Web metalab.unc.edu con numero
  di servizio 80 verr notificato al demone server che  in attesa sulla
  porta 80. La maggior parte dei servizi Internet sono implementati da
  demoni server che si limitano ad ascoltare sulle porte, attendono ed
  eseguono i comandi in arrivo.

  Se il disegno di Internet ha una regola generale, questa  che tutte
  le parti dovrebbero essere il pi possibile semplici e accessibili per
  gli esseri umani. L'HTTP, e i suoi simili (come il Simple Mail
  Transfer Protocol, SMTP, che viene usato per trasferire la posta
  elettronica tra gli host) tende a usare comandi in semplice testo
  stampabile che terminano con un codice di carriage return/line feed.

  Questo  marginalmente inefficiente: in qualche circostanza potreste
  ottenere una velocit maggiore usando un protocollo binario di stretta
  codifica. Ma l'esperienza ha dimostrato che i vantaggi di avere
  comandi facili da descrivere e comprendere per gli esseri umani supera
  qualsiasi guadagno marginale di efficienza che si possa ottenere al
  prezzo di rendere le cose oscure e complicate.

  Di conseguenza, quello che il demone server vi rispedisce via TCP/IP 
  anch'esso testo. L'inizio della risposta assomiglier in qualche modo
  a questa (alcuni header sono stati omessi):


  HTTP/1.1 200 OK
  Date: Sat, 10 Oct 1998 18:43:35 GMT
  Server: Apache/1.2.6 Red Hat
  Last-Modified: Thu, 27 Aug 1998 17:55:15 GMT
  Content-Length: 2982
  Content-Type: text/html



  Questi header saranno seguiti da una linea vuota e dal testo della
  pagina Web (dopodich la connessione viene lasciata cadere). Il vostro
  browser si limita a visualizzare quella pagina. Gli header servono a
  spiegargli come (in particolare, l'header Content-Type gli dice che i
  dati restituiti sono veramente HTML).


















  Virtual Services Howto
  Brian Ackerman, brian@nycrc.net
  v2.1, 15 Agosto 1998

  Questo documento  stato scritto per soddisfare la crescente richiesta
  di informazioni sui servizi virtuali.  Traduzione a cura di Riccardo
  Fabris skizzo at mail.seta.it, su contributo iniziale di gAsp gasp at
  eponet.it, nel Maggio 1999.  Un grazie ai correttori della traduzione
  (l'onnipresente Giovanni Bortolozzo e gAsp).

  1.  Introduzione

  1.1.  Conoscenze richieste

  Creare un sistema per servizi virtuali non  troppo difficile,
  tuttavia  richiesto qualcosa di pi che una conoscenza di base.
  Questo documento non  un'introduzione alla configurazione completa di
  una macchina Linux.

  Per una piena comprensione di questo documento  necessario avere
  assoluta familiarit con quanto segue:


    Compilazione del kernel Linux e aggiunta del supporto IP aliasing
     IP alias mini-HOWTO

    Installazione e configurazione di dispositivi di rete NET-3 HOWTO

    Configurazione di inetd NET-3 HOWTO

    tradotto in italiano: NET-3 HOWTO

    Pacchetti vari per il networking quali: Sendmail Apache Qmail SAMBA

    Impostazione del DNS DNS HOWTO

    Conoscenze base di amministrazione di sistemi Linux Systems
     Administrators's Guide

    tradotto in italiano: Guida dell'Amministratore di Sistema

    Conoscenze base sulla configurazione di un server web WWW HOWTO

    tradotto in italiano: WWW-HOWTO

  Se non si  sicuri di conoscere le procedure concernenti uno qualsiasi
  dei componenti citati sopra,  FORTEMENTE raccomandato di prendere
  confidenza con tutti i pacchetti facendo riferimento ai link
  riportati. Io NON risponder a messaggi di posta riguardanti gli
  argomenti sopra indicati. Rivolgete le vostre domande agli autori dei
  rispettivi HOWTO.


  1.2.  Scopo

  La funzione dei servizi virtuali  quella di permettere ad una singola
  macchina di riconoscere indirizzi IP multipli senza il bisogno di
  schede di rete multiple. L'IP aliasing  un'opzione di compilazione
  del kernel che permette di assegnare a ciascuna interfaccia di rete
  pi di un'indirizzo IP. Esso permette al kernel di gestire
  simultaneamente pi indirizzi IP in modo trasparente, saltando da uno
  all'altro in rapida successione (`multiplexing'). All'utente sembrer
  che ci sia pi di un server.



  Il `multiplexing' permette che domini multipli (www.dominio1.com,
  www.dominio2.com eccetera) vengano ospitati sulla stessa macchina allo
  stesso costo di un unico dominio. Sfortunatamente la maggior parte dei
  servizi (FTP, web, mail) non sono stati progettati per gestire domini
  multipli. Allo scopo di farli lavorare correttamente  quindi
  necessario modificare sia i file di configurazione che il codice
  sorgente.  Questo documento descrive come apportare queste modifiche
  nel corso dell'impostazione di una macchina virtuale.


  Per poter far funzionare i servizi virtuali  anche richiesto un
  demone. I sorgenti di questo demone (virtuald) vengono forniti pi
  avanti in questo documento.


  1.3.  Commenti e critiche

  Questo documento si espander man mano che i pacchetti verranno
  aggiornati e cambieranno le modifiche da apportare ai sorgenti o alla
  configurazione. Se ci sono parti di questo documento che non sono
  chiare potete mandarmi una e-mail con suggerimenti o domande. Allo
  scopo di facilitarmi il lavoro siete pregati di fare commenti
  specifici e di includere la sezione in questione.  importante che il
  messaggio di posta contenga la dicitura `VIRTSERVICES HOWTO' nel
  soggetto. Qualunque altro messaggio verr considerato personale e,
  come sanno bene tutti i miei amici, io non sono solito leggere la mia
  posta personale ed  perci probabile venga scartato assieme ai loro.


  Notate anche che i miei esempi sono solo esempi, quindi non dovrebbero
  essere copiati pari pari. Potreste avere infatti bisogno di inserire i
  vostri valori. Se avete dei problemi, potete inviarmi un'e-mail.
  Allegate tutti i file di configurazione pertinenti e i messaggi di
  errore che ricevete durante l'installazione. Ci dar un occhiata e vi
  invier i miei suggerimenti.


  1.4.  Archivio storico delle revisioni

  V1.0

  Versione originaria


  V1.1

  Corretto un errore nella sezione Web Virtuale.


  V1.2

  Corretta la data.


  V2.0


  Aggiornati i link html.

  Aggiornamenti alla sezione Web.

  Nuova opzione di Sendmail.

  Nuova sezione su Qmail.


  Aggiornata la sezione sul Syslog.

  Aggiornata la sezione sull'FTP.

  Opzione predefinita di Virtuald.

  Nuova sezione su Samba.

  Aggiornate le FAQ.


  V2.1

  Cambiati tutti i percorsi in /usr/local.

  Aggiunta l'opzione di compilazione VERBOSELOG a virtuald.

  Corretto un bug di setuid/setgid in virtmailfilter.

  Corretto un bug di execl in virtmailfilter.

  Corretto un bug nella trasformazione minuscole/maiuscole in
  virtmailfilter.

  Corretta la variabile di ambiente sanity check in virtmailfilter.

  Tolto il codice mbox da virtmailfilter/virtmaildelivery.

  Aggiunta la sezione tcpserver.init pop per Qmail.

  Aggiunta la sezione riguardante gli alias dei nomi di dominio alle
  FAQ.


  1.5.  Copyright/Distribuzione

  [Questa parte viene lasciata in originale per motivi legali N.d.T.]

  This document is Copyright (c) 1997 by The Computer Resource Center
  Inc.


  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author. Translations
  are similiarly permitted without express permission if it includes a
  notice on who translated it. Commercial redistribution is allowed and
  encouraged; however please notify Computer Resource Center of any such
  distributions.


  Excerpts from the document may be used without prior consent provided
  that the derivative work contains the verbatim copy or a pointer to a
  verbatim copy.


  Permission is granted to make and distribute verbatim copies of this
  document provided the copyright notice and this permission notice are
  preserved on all copies.


  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, I do wish to retain copyright
  on this HOWTO document, and would like to be notified of any plans to
  redistribute this HOWTO.


  2.  IP Aliasing

  L'IP Aliasing  un'opzione di compilazione del kernel che deve essere
  abilitata per permettere il `virtual hosting'. Esiste gi un mini-
  HOWTO sull'argomento IP aliasing.  Si prega di consultarlo per
  questioni che riguardano la sua impostazione.


  3.  Virtuald

  3.1.  Introduzione

  Ogni connessione di rete  basata su due coppie di indirizzi IP e
  porte. L'`API' (Applications Program Interface) per la programmazione
  di rete viene chiamata `Socket API'. Un `socket' si comporta come un
  file aperto, con operazioni di lettura/scrittura su di esso 
  possibile scambiare dati su una connessione di rete. C' una funzione
  chiamata getsockname che restituisce l'indirizzo IP del socket locale.
  Virtuald in primo luogo utilizza getsockname per determinare a quale
  indirizzo IP della macchina locale si vuole accedere. Quindi legge da
  un file di configurazione quale directory  associata a tale indirizzo
  IP. Virtuald fa chroot a quella directory e passa la connessione al
  servizio. Chroot reimposta `/', la directory radice, in un nuovo punto
  dell'albero delle directory, in modo tale che il programma in
  esecuzione non possa accedere a nulla fuori da questo ramo.  Quindi
  ogni indirizzo IP  associato ad un proprio filesystem virtuale. Tutto
  ci  trasparente per il programma di rete, che si comporter come se
  niente fosse successo. Virtuald pu quindi essere utilizzato insieme
  con un programma come inetd per rendere virtuale un servizio.


  3.2.  Inetd

  Inetd  un super server di rete che sta in ascolto su varie porte e,
  quando riceve una connessione (ad esempio, una richiesta pop in
  entrata), effettua la fase di negoziazione e passa la connessione ad
  un programma che gestisce lo specifico servizio. Questo per evitare
  che vengano eseguiti dei servizi che restano inattivi quando
  inutilizzati.


  Un file /etc/inetd.conf standard appare cos:


  ftp stream tcp nowait root /usr/sbin/tcpd \
          wu.ftpd -l -a
  pop-3 stream tcp nowait root /usr/sbin/tcpd \
          in.qpop -s



  Il file /etc/inetd.conf di un sistema in cui si utilizza virtuald
  appare cos:


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp wu.ftpd -l -a
  pop-3 stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.pop in.qpop -s







  3.3.  File di configurazione

  Ciascun servizio ha un file di configurazione che controlla quali
  indirizzi IP e directory sono autorizzati per quel servizio.  Si pu
  avere o un unico file principale oppure pi file di configurazione, se
  si desidera che ad ogni servizio sia associato una lista diversa di
  domini. Un tipico file di configurazione appare cos:


  # Questo  un commento e allo stesso modo vengono trattate le linee vuote

  # Formato: IndirizzoIP [spazio] directory [nessun spazio]
  10.10.10.129 /virtual/domain1.com
  10.10.10.130 /virtual/domain2.com
  10.10.10.157 /virtual/domain3.com

  # Opzione predefinita per tutti gli altri indirizzi IP
  default /




  3.4.  Codice sorgente

  Questo  il codice sorgente in C del programma virtuald.  necessario
  compilarlo e installarlo in /usr/local/bin con permessi 0755, utente
  root, e gruppo root. L'unica opzione di compilazione  VERBOSELOG che
  attiva/disattiva la registrazione delle connessioni nei file di log:






































  #include <netinet/in.h>
  #include <sys/socket.h>
  #include <arpa/inet.h>
  #include <stdarg.h>
  #include <unistd.h>
  #include <string.h>
  #include <syslog.h>
  #include <stdio.h>

  #undef VERBOSELOG

  #define BUFSIZE 8192

  int getipaddr(char **ipaddr)
  {
          struct sockaddr_in virtual_addr;
          static char ipaddrbuf[BUFSIZE];
          int virtual_len;
          char *ipptr;

          virtual_len=sizeof(virtual_addr);
          if (getsockname(0,(struct sockaddr *)&virtual_addr,&virtual_len)<0)
          {
                  syslog(LOG_ERR,"getipaddr: getsockname failed: %m");
                  return -1;
          }
          if (!(ipptr=inet_ntoa(virtual_addr.sin_addr)))
          {
                  syslog(LOG_ERR,"getipaddr: inet_ntoa failed: %m");
                  return -1;
          }
          strncpy(ipaddrbuf,ipptr,sizeof(ipaddrbuf)-1);
          *ipaddr=ipaddrbuf;
          return 0;
  }

  int iptodir(char **dir,char *ipaddr,char *filename)
  {
          char buffer[BUFSIZE],*bufptr;
          static char dirbuf[BUFSIZE];
          FILE *fp;

          if (!(fp=fopen(filename,"r")))
          {
                  syslog(LOG_ERR,"iptodir: fopen failed: %m");
                  return -1;
          }
          *dir=NULL;
          while(fgets(buffer,BUFSIZE,fp))
          {
                  buffer[strlen(buffer)-1]=0;
                  if (*buffer=='#' || *buffer==0)
                          continue;
                  if (!(bufptr=strchr(buffer,' ')))
                  {
                          syslog(LOG_ERR,"iptodir: strchr failed");
                          return -1;
                  }
                  *bufptr++=0;
                  if (!strcmp(buffer,ipaddr))
                  {
                          strncpy(dirbuf,bufptr,sizeof(dirbuf)-1);
                          *dir=dirbuf;
                          break;
                  }
                  if (!strcmp(buffer,"default"))
                  {
                          strncpy(dirbuf,bufptr,sizeof(dirbuf)-1);
                          *dir=dirbuf;
                          break;
                  }
          }
          if (fclose(fp)==EOF)
          {
                  syslog(LOG_ERR,"iptodir: fclose failed: %m");
                  return -1;
          }
          if (!*dir)
          {
                  syslog(LOG_ERR,"iptodir: ip not found in conf file");
                  return -1;
          }
          return 0;
  }

  int main(int argc,char **argv)
  {
          char *ipaddr,*dir;

          openlog("virtuald",LOG_PID,LOG_DAEMON);

  #ifdef VERBOSELOG
          syslog(LOG_ERR,"Virtuald Starting: $Revision: 1.49 $");
  #endif
          if (!argv[1])
          {
                  syslog(LOG_ERR,"invalid arguments: no conf file");
                  exit(0);
          }
          if (!argv[2])
          {
                  syslog(LOG_ERR,"invalid arguments: no program to run");
                  exit(0);
          }
          if (getipaddr(&ipaddr))
          {
                  syslog(LOG_ERR,"getipaddr failed");
                  exit(0);
          }
  #ifdef VERBOSELOG
          syslog(LOG_ERR,"Incoming ip: %s",ipaddr);
  #endif
          if (iptodir(&dir,ipaddr,argv[1]))
          {
                  syslog(LOG_ERR,"iptodir failed");
                  exit(0);
          }
          if (chroot(dir)<0)
          {
                  syslog(LOG_ERR,"chroot failed: %m");
                  exit(0);
          }
  #ifdef VERBOSELOG
          syslog(LOG_ERR,"Chroot dir: %s",dir);
  #endif
          if (chdir("/")<0)
          {
                  syslog(LOG_ERR,"chdir failed: %m");
                  exit(0);
          }
          if (execvp(argv[2],argv+2)<0)
          {
                  syslog(LOG_ERR,"execvp failed: %m");
                  exit(0);
          }

          closelog();

          exit(0);
  }




  4.  Gli script di shell

  4.1.  Virtfs

  Ciascun dominio dovrebbe avere una propria struttura di directory.
  Dal momento che si sta usando chroot bisogner inserirvi un duplicato
  di tutti i file necessari, come librerie condivise, file binari, file
  di configurazione eccetera. Io utilizzo /virtual/domain1.com per
  ciascun dominio che creo.


  Tutto ci occupa dello spazio su disco, ma  comunque meno costoso di
  una nuova macchina con tanto di schede di rete. Se  veramente
  necessario risparmiare spazio su disco, si possono collegare insieme
  tutte le copie dei file con degli hard link, in modo che esista
  effettivamente solo una copia di ogni file binario. Il filesystem che
  utilizzo io occupa poco pi di 2Mbyte. Comunque lo script che segue
  tenta di copiare tutti i file dal filesystem principale in modo da
  essere il pi generico possibile.



  Ecco un esempio di semplice script virtfs:































  #!/bin/sh

  echo '$Revision: 1.49 $'

  echo -n "Inserisci il nome di dominio: "
  read domain

  if [ "$domain" = "" ]
  then
          echo Non  stato inserito niente: esecuzione interrotta
          exit 0
  fi

  leadingdir=/virtual

  echo -n "Inserire la directory principale: (Scelta predefinita: $leadingdir): "
  read ans

  if [ "$ans" != "" ]
  then
          leadingdir=$ans
  fi

  newdir=$leadingdir/$domain

  if [ -d "$newdir" ]
  then
          echo La nuova directory: $newdir:  gi esistente
          exit 0
  else
          echo La nuova directory : $newdir
  fi

  echo Crea $newdir
  mkdir -p $newdir

  echo Crea bin
  cp -pdR /bin $newdir

  echo Crea dev
  cp -pdR /dev $newdir

  echo Crea dev/log
  ln -f /virtual/log $newdir/dev/log

  echo Crea etc
  mkdir -p $newdir/etc
  for i in /etc/*
  do
          if [ -d "$i" ]
          then
                  continue
          fi
          cp -pd $i $newdir/etc
  done

  echo Crea etc/skel
  mkdir -p $newdir/etc/skel

  echo Crea home
  for i in a b c d e f g h i j k l m n o p q r s t u v w x y z
  do
          mkdir -p $newdir/home/$i
  done

  echo Crea home/c/crc
  mkdir -p $newdir/home/c/crc
  chown crc.users $newdir/home/c/crc

  echo Crea lib
  mkdir -p $newdir/lib
  for i in /lib/*
  do
          if [ -d "$i" ]
          then
                  continue
          fi
          cp -pd $i $newdir/lib
  done

  echo Crea proc
  mkdir -p $newdir/proc

  echo Crea sbin
  cp -pdR /sbin $newdir

  echo Crea tmp
  mkdir -p -m 0777 $newdir/tmp
  chmod +t $newdir/tmp

  echo Crea usr
  mkdir -p $newdir/usr

  echo Crea usr/bin
  cp -pdR /usr/bin $newdir/usr

  echo Crea usr/lib
  mkdir -p $newdir/usr/lib

  echo Crea usr/lib/locale
  cp -pdR /usr/lib/locale $newdir/usr/lib

  echo Crea usr/lib/terminfo
  cp -pdR /usr/lib/terminfo $newdir/usr/lib

  echo Crea usr/lib/zoneinfo
  cp -pdR /usr/lib/zoneinfo $newdir/usr/lib

  echo Crea usr/lib/\*.so\*
  cp -pdR /usr/lib/*.so* $newdir/usr/lib

  echo Crea usr/sbin
  cp -pdR /usr/sbin $newdir/usr

  echo Fa un link a usr/tmp
  ln -s /tmp $newdir/usr/tmp

  echo Crea var
  mkdir -p $newdir/var

  echo Crea var/lock
  cp -pdR /var/lock $newdir/var

  echo Crea var/log
  mkdir -p $newdir/var/log

  echo Crea var/log/wtmp
  cp /dev/null $newdir/var/log/wtmp

  echo Crea var/run
  cp -pdR /var/run $newdir/var

  echo Crea var/run/utmp
  cp /dev/null $newdir/var/run/utmp

  echo Crea var/spool
  cp -pdR /var/spool $newdir/var

  echo Fa un link a var/tmp
  ln -s /tmp $newdir/var/tmp

  echo Crea var/www/html
  mkdir -p $newdir/var/www/html
  chown webmast.www $newdir/var/www/html
  chmod g+s $newdir/var/www/html

  echo Crea var/www/master
  mkdir -p $newdir/var/www/master
  chown webmast.www $newdir/var/www/master

  echo Crea var/www/server
  mkdir -p $newdir/var/www/server
  chown webmast.www $newdir/var/www/server

  exit 0




  4.2.  Virtexec


  Per poter eseguire dei comandi in un ambiente virtuale bisogna prima
  fare chroot nella directory prefissata e poi eseguire il comando.  Ho
  scritto un apposito script di shell chiamato virtexec che fa questo
  per un qualsiasi comando:
































  #!/bin/sh

  echo '$Revision: 1.49 $'

  BNAME=`basename $0`
  FIRST4CHAR=`echo $BNAME | cut -c1-4`
  REALBNAME=`echo $BNAME | cut -c5-`

  if [ "$BNAME" = "virtexec" ]
  then
          echo Non si pu eseguire direttamente virtexec:  NECESSARIO un link simbolico
          exit 0
  fi

  if [ "$FIRST4CHAR" != "virt" ]
  then
          echo Il link simbolico non  a una funzione virt
          exit 0
  fi

  list=""
  num=1
  for i in /virtual/*
  do
          if [ ! -d "$i" ]
          then
                  continue
          fi
          if [ "$i" = "/virtual/lost+found" ]
          then
                  continue
          fi
          list="$list $i $num"
          num=`expr $num + 1`
  done

  if [ "$list" = "" ]
  then
          echo Non esistono ambienti virtuali
          exit 0
  fi

  dialog --clear --title 'Virtexec' --menu Pick 20 70 12 $list 2> /tmp/menu.$$
  if [ "$?" = "0" ]
  then
          newdir=`cat /tmp/menu.$$`
  else
          newdir=""
  fi
  tput clear
  rm -f /tmp/menu.$$

  echo '$Revision: 1.49 $'

  if [ ! -d "$newdir" ]
  then
          echo La nuova directory: $newdir: NON ESISTE
          exit 0
  else
          echo Nuova directory: $newdir
  fi

  echo bname: $BNAME

  echo realbname: $REALBNAME

  if [ "$*" = "" ]
  then
          echo args: none
  else
          echo args: $*
  fi

  echo Spostamento in $newdir
  cd $newdir

  echo Esecuzione del programma $REALBNAME

  chroot $newdir $REALBNAME $*

  exit 0



  Si prega di notare che lo script funziona solo se si ha installato sul
  proprio sistema il programma dialog. Per usare virtexec basta
  collegare con un link simbolico un programma a virtexec. Ad esempio:


  ln -s /usr/local/bin/virtexec /usr/local/bin/virtpasswd
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtvi
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtpico
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtemacs
  ln -s /usr/local/bin/virtexec /usr/local/bin/virtmailq



  In questo modo quando si digiter virtvi o virtpasswd o virtmailq si
  potr editare un file con vi, cambiare la password di un utente o
  controllare la coda di posta sul proprio sistema virtuale. Si possono
  creare tanti link simbolici a virtexec quanti occorrono. Da notare
  che, se il programma richiede una libreria condivisa, essa deve
  trovarsi nel filesystem virtuale, cos come il file binario stesso.


  4.3.  Note

  Di solito io installo tutti gli script in /usr/local/bin. Tutto ci
  che non voglio compaia nel filesystem virtuale lo metto in /usr/local.
  Lo script non copia alcun file di /usr/local nel filesystem virtuale.
   importante che ogni file che non deve trovarsi in tutti i filesystem
  virtuali venga rimosso. Ad esempio, sul mio sistema  installato ssh
  ed io non voglio che la chiave privata per il server sia disponibile
  su tutti i filesystem virtuali, cos lo cancello da ciascun filesystem
  virtuale dopo aver lanciato virtfs. Oltre a questo, cambio anche
  resolv.conf e rimuovo per ragioni legali tutto ci che contiene un
  riferimento ad un altro dominio. Ad esempio, /etc/hosts /etc/HOSTNAME.


  Questi sono i programmi che ho collegato con un link simbolico a
  virtexec:


    virtpasswd -- cambia la password di un utente

    virtadduser -- crea un utente

    virtdeluser -- cancella un utente

    virtsmbstatus -- visualizza lo stato di SAMBA


    virtvi -- edita un file

    virtmailq -- controlla var/spool/mqueue

    virtnewaliases -- ricostruisce la tabella degli alias


  5.  DNS

  Il DNS pu essere configurato normalmente. C' un HOWTO sul DNS.


  6.  Syslogd

  6.1.  Problema

  Syslogd  il programma utilit di registrazione dei messaggi dei
  servizi tipicamente utilizzato sui sistemi UNIX. Syslogd  un demone
  che apre un file speciale chiamato FIFO. Una FIFO  un file speciale
  che si comporta come una `pipe'. Tutto ci che viene mandato sul lato
  scrittura uscir sul lato lettura. Ci sono delle funzioni C che
  scrivono sul lato scrittura. Se un programma utilizza tali funzioni C
  l'output verr mandato al syslogd.


  Ci si ricordi che si  impostato un ambiente chroot e che la FIFO da
  cui syslogd sta leggendo (/dev/log) non  presente.  Questo significa
  che [in assenza di opportune modifiche N.d.T.] a syslogd non
  giungeranno i messaggi provenienti dagli ambienti virtuali.


  6.2.  Soluzione

  6.2.1.  Impostare dei link


  Syslogd  in grado di utilizzare una FIFO differente se specificata
  sulla riga di comando:


  syslogd -p /virtual/log



  Poi si colleghi con un link simbolico /dev/log a /virtual/log con:


  ln -sf /virtual/log /dev/log



  Infine si colleghino con hard link tutte le copie di /dev/log a questo
  file con:


  ln -f /virtual/log /virtual/domain1.com/dev/log



  Lo script virtfs soprariportato fa gi tutto questo. Dato che /virtual
  si trova su un unico disco e i file /dev/log sono collegati con hard
  link, essi hanno lo stesso numero di inode e puntano agli stessi dati.
  Chroot non pu impedirlo, cos ora tutti i /dev/log virtuali
  funzioneranno. Si noti che tutti i messaggi provenienti dai vari
  ambienti virtuali verranno registrati assieme.  possibile comunque
  ideare programmi separati per filtrare le informazioni che
  interessano.


  6.2.2.  Syslogd.init

  Questa versione di syslogd.init effettua un hard link a /dev/log ad
  ogni suo avvio poich syslogd cancella e crea la FIFO /dev/log ad ogni
  sua nuova esecuzione. Ecco una versione modificata del file
  syslogd.init:


  #!/bin/sh

  . /etc/rc.d/init.d/functions

  case "$1" in
    start)
          echo -n "Ora viene fatto l'hard link a dev log: "
          ln -sf /virtual/log /dev/log
          echo done
          echo -n "Lancio dei demoni di log di sistema: "
          daemon syslogd -p /virtual/log
          daemon klogd
          echo
          echo -n "Ora viene fatto il link dei dev log virtuali: "
          for i in /virtual/*
          do
                  if [ ! -d "$i" ]
                  then
                          continue
                  fi
                  if [ "$i" = "/virtual/lost+found" ]
                  then
                          continue
                  fi
                  ln -f /virtual/log $i/dev/log
                  echo -n "."
          done
          echo " done"
          touch /var/lock/subsys/syslogd
          ;;
    stop)
          echo -n "Arresto dei demoni di log di sistema: "
          killproc syslogd
          killproc klogd
          echo
          rm -f /var/lock/subsys/syslogd
          ;;
    *)
          echo "Impiego: syslogd {start|stop}"
          exit 1
  esac

  exit 0




  6.3.  Syslogd multipli

  6.3.1.  Uno per disco

  Se c' carenza di spazio in un filesystem e bisogna suddividere i
  domini virtuali su pi dischi, ci si ricordi che gli hard link non
  funzionano tra dischi diversi. Questo significa che bisogner lanciare
  un syslogd distinto per ogni gruppo di domini di un disco.  Ad
  esempio, se ci fossero tredici domini su /virtual1 e quindici su
  /virtual2, si dovrebbero collegare tramite hard link i tredici domini
  a /virtual1/log e lanciare un syslogd con syslogd -p /virtual1/log,
  poi collegare con hard link gli altri quindici domini a /virtual2/log
  e lanciare un altro syslogd con syslogd -p /virtual2/log.


  6.3.2.  Uno per dominio

  Se si preferisce non accentrare i log in un unico posto  possibile
  lanciare un syslogd per dominio. Questo metodo comporta uno spreco di
  risorse di sistema (ci sono pi processi attivi), quindi non lo
  raccomando, ma  pi facile da implementare di quello precedente. 
  necessario modificare il file syslogd.init affinch il syslogd venga
  mandato in esecuzione con chroot /virtual/domain1.com syslogd e questo
  per ciascun dominio.  Cos facendo ogni syslogd verr eseguito
  all'interno dell'ambiente di chroot e i log dei vari ambienti virtuali
  si troveranno singolarmente in /virtual/domain1.com/var/log piuttosto
  che tutti assieme in un solo /var/log. Non bisogna dimenticare di
  lanciare un syslogd normale per il sistema principale e un demone di
  log del kernel klogd.


  7.  FTP virtuale

  7.1.  Inetd

  Wu-ftpd viene fornito con un supporto interno alla virtualizzazione.
  Ad ogni modo non si possono avere file di password separati per ogni
  dominio.  Ad esempio, se bob@domain1.com and bob@domain2.com vogliono
  entrambi un account,  necessario assegnare nomiutente diversi, come
  bob e bob2, o chiedere ad uno dei due utenti di scegliere un
  nomeutente diverso. Ora invece abbiamo un filesystem virtuale per ogni
  dominio, quindi file delle password separati, e questo problema non
  sussiste.  sufficiente creare gli script virtnewuser e virtpasswd nel
  modo summenzionato e la configurazione  completa.


  Le voci di inetd.conf per wu-ftpd:


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp wu.ftpd -l -a




  7.2.  FTP anonimo

  Le cose non cambiano usando virtuald.  sufficiente creare l'utente
  FTP in /virtual/domain1.com/etc/passwd come si farebbe normalmente.


  ftp:x:14:50:Anonymous FTP:/var/ftp:/bin/false



  Poi bisogna configurare la directory per l'FTP anonimo. Ci sono file
  delle password distinti per ogni singolo dominio, per cui  possibile
  limitare l'FTP anonimo a un qualsivoglia numero di essi. Si noti che,
  dato che il server FTP si trova gi in un ambiente di chroot nella
  directory /virtual/domain1.com, non  necessario premettere alcun
  percorso.



  7.3.  Utenti dell'FTP virtuale

  Wu-ftpd supporta l'utilizzo del gruppo guest. Ci permette di creare
  aree FTP differenti per ciascun utente. Il server FTP effettua un
  chroot sull'area specificata in modo che l'utente non possa uscire da
  quel ramo dell'albero delle directory. Gli utenti creati in questo
  modo all'interno di un dominio virtuale non potranno vedere i file di
  sistema.


  Si aggiunga il gruppo guest al file /virtual/domain1.com/etc/ftpaccess
  file.


  Si crei una voce /virtual/domain1.com/etc/passwd con la directory di
  chroot e la directory home di partenza separate da /./:


  guest1:x:8500:51:Guest FTP:/home/g/guest1/./incoming:/bin/false




  Infine si configuri la directory home di guest come si farebbe per
  l'FTP anonimo. Ci sono file delle password distinti per ciascun
  dominio, quindi  possibile specificare quali domini hanno account
  guest e quali utenti sono utenti guest all'interno di un dominio. Si
  noti che, dato che il server FTP si trova gi in un ambiente di chroot
  nella directory /virtual/domain1.com, non  necessario premettere
  alcun percorso.


  8.  Web virtuale

  8.1.  Usando virtuald

  8.1.1.  Non raccomandabile

  Apache ha un supporto interno per i domini virtuali.  il solo
  programma di cui raccomando di usare le funzionalit interne per la
  gestione dei domini virtuali. Ogniqualvolta si lancia qualcosa
  attraverso inetd c' un prezzo da pagare: il programma deve ripartire
  da zero ogni volta che ne viene richiesta l'esecuzione. Questo causa
  un rallentamento nel tempi di risposta, che  accettabile per la gran
  parte dei servizi, ma inaccettabile per quello web. Apache ha anche un
  meccanismo per impedire connessioni quando ce ne siano troppe in
  entrata, che potrebbe essere un fattore critico anche per siti con un
  volume di traffico medio.


  Detto in poche parole, rendere virtuale Apache con virtuald  una
  pessima idea. Virtuald trova la sua ragion d'essere nel colmare le
  lacune di servizi che non hanno la capacit di gestire in proprio i
  domini virtuali. Virtuald non  pensato per rimpiazzare del codice di
  buona qualit che sia in grado di svolgere da s questo compito.


  Per coloro che sono abbastanza sconsiderati da farlo comunque,
  malgrado quanto detto sopra, ecco come fare:


  8.1.2.  Inetd

  Modificare /etc/inetd.conf


  vi /etc/inetd.conf # Aggiungi questa linea
  www stream tcp nowait www /usr/local/bin/virtuald \
          virtuald /virtual/conf.www httpd -f /var/www/conf/httpd.conf




  8.1.3.  Httpd.conf

  Modificare /var/www/conf/httpd.conf


  vi /var/www/conf/httpd.conf # O dovunque si trovino i file di configurazione

  Dovrebbe esserci:
  ServerType standalone

  Rimpiazzare la riga con:
  ServerType inetd




  8.1.4.  Configurazione

  Si configuri poi ogni singola istanza del server Apache come si
  farebbe usandolo per un singolo dominio.


  8.1.5.  Httpd.init

  Non  necessario un file httpd.init, dato che il programma server
  viene eseguito attraverso inetd.


  8.2.  Usando Apache VirtualHost

  Apache ha tre file di configurazione access.conf, httpd.conf, e
  srm.conf. Le versioni recenti di Apache hanno reso non necessari i tre
  file di configurazione. Comunque ho trovato che suddividere la
  configurazione in tre sezioni ne semplifica la gestione, per cui
  continuer a fare cos in questo HOWTO.


  8.2.1.  Access.conf

  Questo file di configurazione  usato per controllare l'accesso alle
  directory della struttura del sito. Ecco una configurazione di esempio
  che mostra come si possano gestire opzioni differenti per ciascun
  dominio:
















  # /var/www/conf/access.conf: Configurazione di accesso globale

  # Le opzioni sono ereditate dalla directory genitore
  # Configura la directory principale con le opzioni predefinite
  <Directory />
  AllowOverride None
  Options Indexes
  </Directory>

  # Fornisce a un dominio una directory protetta da password
  <Directory /virtual/domain1.com/var/www/html/priv>
  AuthUserFile /var/www/passwd/domain1.com-priv
  AuthGroupFile /var/www/passwd/domain1.com-priv-g
  AuthName PRIVSECTION
  AuthType Basic
  <Limit GET PUT POST>
  require valid-user
  </Limit>
  </Directory>

  # Permette i Server Side Include in un altro dominio
  <Directory /virtual/domain2.com/var/www/html>
  Options IncludesNOEXEC
  </Directory>




  8.2.2.  Httpd.conf

  Questo file di configurazione  usato per gestire le opzioni
  principali del server Apache. Ecco una configurazione di esempio che
  mostra come si possano gestire opzioni differenti per ciascun dominio:

































  # /var/www/conf/httpd.conf: File principale di configurazione del server

  # Inizio: sezione principale di configurazione

  # La riga seguente  necessaria dato che non si sta usando inetd
  ServerType standalone

  # Porta sulla quale gira il server
  Port 80

  # Registra nei log gli host dei client con i loro nomi piuttosto che con
  # gli indirizzi IP
  HostnameLookups on

  # Utente con i privilegi del quale gira il server
  User www
  Group www

  # Collocazione dei file di configurazione, di errore e di log
  ServerRoot /var/www

  # File in cui si trova l'identificatore di processo (Process Id) del server
  PidFile /var/run/httpd.pid

  # File di informazioni sullo stato interno del server
  ScoreBoardFile /var/www/logs/apache_status

  # Opzioni di Timeout e KeepAlive
  Timeout 400
  KeepAlive 5
  KeepAliveTimeout 15

  # Limitazioni per i server in esecuzione
  MinSpareServers 5
  MaxSpareServers 10
  StartServers 5
  MaxClients 150
  MaxRequestsPerChild 30

  # Fine: sezione principale di configurazione

  # Inizio: sezione host virtuale

  # Specifica le coppie IP:porta su cui il demone accetta connessioni
  # Io ho una direttiva per ogni IP necessario in modo da poter
  # ignorare esplicitamente certi domini
  Listen 10.10.10.129:80
  Listen 10.10.10.130:80

  # La direttiva VirtualHost permette di specificare un altro dominio
  # virtuale sul server. La maggior parte delle opzioni di Apache possono
  # essere specificate all'interno di questa sezione.
  <VirtualHost www.domain1.com>

  # Indirizzo di e-mail da contattare in caso di errori
  ServerAdmin webmaster@domain1.com

  # Collocazione dei documenti web nel dominio virtuale
  DocumentRoot /virtual/domain1.com/var/www/html

  # Nome di dominio del server
  ServerName www.domain1.com

  # File di Log relativi alla direttiva ServerRoot
  ErrorLog logs/domain1.com-error_log
  TransferLog logs/domain1.com-access_log
  RefererLog logs/domain1.com-referer_log
  AgentLog logs/domain1.com-agent_log

  # Usa gli script CGI in questo dominio
  ScriptAlias /cgi-bin/ /var/www/cgi-bin/domain1.com/
  AddHandler cgi-script .cgi
  AddHandler cgi-script .pl
  </VirtualHost>

  <VirtualHost www.domain2.com>

  # Indirizzo di e-mail da contattare in caso di errori
  ServerAdmin webmaster@domain2.com

  # Collocazione delle pagine web nel dominio virtuale
  DocumentRoot /virtual/domain2.com/var/www/html

  # Nome di dominio del server
  ServerName www.domain2.com

  # File di Log relativi alla direttiva ServerRoot
  ErrorLog logs/domain2.com-error_log
  TransferLog logs/domain2.com-access_log
  RefererLog logs/domain2.com-referer_log
  AgentLog logs/domain2.com-agent_log

  # Niente script CGI per questo host virtuale
  </VirtualHost>
  # Fine: sezione host virtuale




  8.2.3.  Srm.conf

  Questo file di configurazione viene usato per controllare il modo in
  cui vengono processate le richieste e il formato dei risultati. Non ci
  sono modifiche particolari da apportare per i domini virtuali. Il file
  di configurazione di esempio dovrebbe andar bene.


  8.2.4.  Httpd.init

  Non si devono apportate modifiche particolari al file httpd.init. Si
  pu usare quello standard, compreso nella configurazione di Apache.


  8.3.  Overflow dei descrittori di file

  8.3.1.  Attenzione!

  Quanto si dir si applica solo al server Apache eseguito come
  `standalone' (indipendente). Se il programma server viene eseguito
  attraverso inetd, esso non interagisce con gli altri domini, per cui
  ha un'intera tabella di descrittori di file per ogni dominio.


  Ogni file di log che il server Apache apre significa un descrittore di
  file in pi per il processo. C' un limite di 256 descrittori di file
  per processo in Linux. Dato che si gestiscono pi domini con un unico
  server web, si usano un mucchio di descrittori di file. Se un solo
  server web Apache, che  un processo singolo, supporta troppi domini,
   possibile causare un overflow in questa tabella. Cisignificherebbe
  la mancata registrazione di alcuni log e l'impossibilit di eseguire
  script CGI.

  8.3.2.  Server Apache multipli

  Se si ipotizza l'uso di cinque descrittori di file per dominio, si
  possono gestire 50 domini su un solo server Apache senza nessun
  problema. Comunque, nel caso si riscontrino problemi del genere, si
  pu creare /var/www1 con un server Apache che s'incarichi dei domini
  da domain1 a domain25 e /var/www2 con un server Apache che gestisca i
  domini dal domain26 al domain50 e cos via.  Cos facendo ogni server
  avr la propria directory di file di configurazione, di errore e di
  log. Ogni server dovr essere configurato separatamente, ognuno con le
  proprie direttive Listen e VirtualHost. Non ci si dimentichi di
  lanciare pi server tramite il proprio file httpd.init.


  8.4.  Server che condividono un unico IP

  8.4.1.  Risparmiare indirizzi IP

  HTTP (HyperText Transfer Protocol) versione 1.1 fornisce una
  funzionalit per comunicare il nome di dominio del server al client.
  Ci significa che il client non ha necessit di risolvere il nome del
  server a partire dall'indirizzo IP. Perci due server virtuali
  potranno avere gli stessi indirizzi IP ed essere siti web diversi. La
  configurazione di Apache  la stessa di sopra eccetto che non sar
  necessario inserire direttive Listen differenti, dato che i due domini
  avranno lo stesso IP.


  8.4.2.  Inconveniente!

  Il solo problema  che virtuald usa gli indirizzi IP per distinguere
  tra i vari domini. Nella sua stesura attuale, [nel caso si condividano
  indirizzi IP N.d.T.] virtuald non sarebbe in grado di eseguire il
  chroot a differenti directory di spool per ogni dominio.  Perci il
  servizio di posta risponderebbe solo a livello di singolo indirizzo IP
  e non ci sarebbe pi una singola directory di spool per ogni dominio.
  Tutti i client del medesimo IP condiviso sul web dovrebbero
  condividere la medesima directory di spool. Ci significa che
  duplicati di nomiutente costituerebbero nuovamente un problema [non si
  potrebbero usare gli stessi nomiutente in domini virtuali diversi
  N.d.T.].  Comunque questo  il prezzo da pagare per condividere lo
  stesso indirizzo IP.


  8.5.  Maggiori informazioni

  Questo HOWTO mostra come implementare il supporto ai domini virtuali
  solo con il web server Apache. La maggior parte dei server web usano
  un'interfaccia simile. Per maggiori informazioni sul web hosting
  virtuale si consulti WWW HOWTO, la documentazione di Apache presso
  Sito web di Apache, o la documentazione presso ApacheWeek.


  9.  Mail/Pop virtuale

  9.1.  Problema

  La domanda per il supporto alla posta elettronica virtuale  in
  continua crescita. Sendmail dice di supportare la posta virtuale.  Ci
  che supporta in realt  la ricezione di messaggi per domini diversi.
  Quindi si pu specificare di reinoltrare la posta altrove. Comunque,
  se i messaggi vengono reinoltrati alla macchina locale e ci sono dei
  messaggi per bob@domain1.com e bob@domain2.com, essi finiranno nello
  stesso folder. Questo  un problema, dato che i `bob' sono persone
  diverse con posta diversa.

  9.2.  Soluzione

  Ci si pu accertare che ogni nomeutente sia unico, usando uno schema
  di numerazione: bob1, bob2 eccetera o preponendo pochi caratteri a
  ciascun nomeutente: dom1bob, dom2bob eccetera. Si potrebbe anche
  smanettare sui singoli programmi coinvolti, facendo in modo che
  eseguano queste conversioni per conto loro dietro le quinte, ma ci
  potrebbe causare confusione.  Inoltre i messaggi di posta in uscita
  hanno l'intestazione di dominio maindomain.com, mentre si vorrebbe che
  la posta in uscita avesse le intestazioni diversificate secondo i
  diversi sottodomini.


  Propongo due soluzioni. Una funziona con sendmail e l'altra con Qmail.
  La soluzione che usa sendmail dovrebbe funzionare su un'installazione
  di base di sendmail. Comunque essa condivide tutte le limitazioni
  implicite di sendmail. Questa soluzione richiede inoltre che per ogni
  dominio venga eseguito un sendmail in modalit coda. Avere 50 o pi
  processi di sendmail che si risvegliano ad ogni ora pu sottoporre una
  macchina ad un carico non indifferente.


  La soluzione che contempla l'uso di Qmail non richiede l'esecuzione di
  istanze multiple di Qmail e pu fare a meno di una directory di coda.
  Richiede invece un programma extra, dato che Qmail non si appoggia a
  virtuald.  Suppongo che una soluzione simile possa essere affrontata
  anche con sendmail.  Ad ogni modo Qmail si presta a tale soluzione in
  modo pi pulito.


  Non appoggio comunque l'uso di un programma piuttosto che dell'altro.
  L'installazione di sendmail fila un po' pi liscia ma Qmail 
  probabilmente il pi potente dei due pacchetti.


  9.3.  La soluzione con Sendmail

  9.3.1.  Introduzione

  Un filesystem virtuale per ogni dominio permette a quest'ultimo di
  avere il suo proprio /etc/passwd. Questo vuol dire che bob@domain1.com
  e bob@domain2.com sono utenti diversi presenti in file /etc/passwd
  diversi cosicch gestire la posta non sar un problema. Inoltre i
  domini hanno ciascuno le proprie directory di spool, in modo che i
  folder di posta saranno file diversi in filesystem virtuali diversi.


  9.3.2.  Creare il file di configurazione di Sendmail

  Si crei il file /etc/sendmail.cf come si farebbe normalmente usando
  m4.  Io ho usato:


  divert(0)
  VERSIONID(`tcpproto.mc')
  OSTYPE(linux)
  FEATURE(redirect)
  FEATURE(always_add_domain)
  FEATURE(use_cw_file)
  FEATURE(local_procmail)
  MAILER(local)
  MAILER(smtp)




  9.3.3.  Modificare il file di configurazione di Sendmail

  Si modifichi /virtual/domain1.com/etc/sendmail.cf in modo che risponda
  con le intestazioni appropriate al proprio dominio virtuale:


  vi /virtual/domain1.com/etc/sendmail.cf # Circa alla riga 86
  Dovrebbe esserci:
  #Dj$w.Foo.COM

  Rimpiazzarlo con:

  Djdomain1.com




  9.3.4.  Consegna locale con Sendmail

  Si introducano in /virtual/domain1.com/etc/sendmail.cw i nomi host
  locali.


  vi /virtual/domain1.com/etc/sendmail.cw
  mail.domain1.com
  domain1.com
  domain1
  localhost




  9.3.5.  precedenti la 8.8.6) Posta tra domini virtuali con Sendmail:
  il trucco (Versioni

  In ogni caso, sendmail richiede una piccola modifica al codice
  sorgente.  Sendmail ha un file chiamato /etc/sendmail.cw che contiene
  tutti i nomi delle macchine cui sendmail consegner la posta posta
  localmente invece di reindirizzarla ad un'altra macchina. Sendmail fa
  un controllo interno di tutti i dispositivi della macchina per
  inizializzare questa lista con gli indirizzi IP locali. Ci causa un
  problema nel caso di invii di messaggi di posta tra domini virtuali
  sulla stessa macchina.  Sendmail sar portato a credere che l'altro
  dominio virtuale sia un indirizzo locale e tratter i messaggi
  localmente. Ad esempio, bob@domain1.com invia un'e-mail a
  fred@domain2.com. Dato che il sendmail di domain1.com crede che
  domain2.com sia un indirizzo locale, metter il messaggio nella
  directory di spool di domain1.com e non lo invier mai a domain2.com.
   necessario modificare sendmail (io l'ho fatto su una versione 8.8.5
  senza problemi):


  vi v8.8.5/src/main.c # Circa alla riga 494
  Dovrebbe esserci:

  load_if_names();

  Rimpiazzarlo con:

  /* load_if_names(); Commentato perch da problemi con i domini virtuali */



  Da notare che questo passo  necessario solo se si vuole essere in
  grado di spedire posta tra i domini virtuali, cosa che ritengo
  probabile.
  Ci risolver il problema. Comunque il device ethernet principale eth0
  non viene rimosso. Quindi se si invia un messaggio di posta da un IP
  virtuale a quello usato da eth0 sulla stessa macchina, esso verr
  consegnato localmente. Per questo io non faccio altro che usarlo come
  un IP posticcio virtual1.maindomain.com (10.10.10.157). Non invier
  mai posta a questo host, n lo faranno i domini virtuali. Questo 
  anche l'IP che userei per collegarmi alla macchina a mezzo ssh per
  controllare se tutto va bene.


  9.3.6.  (Versioni successive alla 8.8.6) Posta tra domini virtuali con
  Sendmail: Nuove funzionalit

  Dalla versione 8.8.6 di Sendmail  disponibile una nuova opzione, che
  permette di disabilitare il caricamento delle interfacce extra di
  rete.  Ci significa che NON  pi necessario modificare il sorgente
  in alcun modo. Tale opzione  chiamata DontProbeInterfaces.


  Modificare /virtual/domain1.com/etc/sendmail.cf


  vi /virtual/domain1.com/etc/sendmail.cf # Aggiungere la linea
  O DontProbeInterfaces=True




  9.3.7.  Sendmail.init

  Sendmail non pu pi essere lanciato come demone `standalone'
  (indipendente),  necessario eseguirlo attraverso inetd. Ci 
  inefficiente e causer un peggioramento dei tempi di avvio, ma nel
  caso si avesse un sito con traffico piuttosto alto non gli si dovrebbe
  far comunque condividere un box virtuale con altri domini.  da notare
  che sendmail NON viene eseguito con l'opzione -bd. Si noti anche che 
  necessario venga eseguito un sendmail -q per ogni dominio, per
  processare la coda dei messaggi da consegnare. Ecco il nuovo file
  sendmail.init:



























  #!/bin/sh

  . /etc/rc.d/init.d/functions

  case "$1" in
    start)
          echo -n "Avvio di sendmail: "
          daemon sendmail -q1h
          echo
          echo -n "Avvio del sendmail virtuale: "
          for i in /virtual/*
          do
                  if [ ! -d "$i" ]
                  then
                          continue
                  fi
                  if [ "$i" = "/virtual/lost+found" ]
                  then
                          continue
                  fi
                  chroot $i sendmail -q1h
                  echo -n "."
          done
          echo " done"
          touch /var/lock/subsys/sendmail
          ;;
    stop)
          echo -n "Arresto di sendmail: "
          killproc sendmail
          echo
          rm -f /var/lock/subsys/sendmail
          ;;
    *)
          echo "Utilizzo: sendmail {start|stop}"
          exit 1
  esac

  exit 0




  9.3.8.  Configurazione di inetd

  Il servizio pop si dovrebbe installare normalmente senza lavoro
  aggiuntivo.  Basta solo che alla sua voce in inetd venga aggiunta la
  parte per virtuald.  Ecco le voci di inetd.conf per sendmail e pop:


  pop-3 stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.pop in.qpop -s
  smtp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.mail sendmail -bs




  9.4.  La soluzione con Qmail

  9.4.1.  Introduzione

  Questa soluzione scavalca qmail-local nelle mansioni di consegna,
  quindi i file .qmail nelle directory home virtuali non funzioneranno
  pi.  Comunque ogni dominio avr ancora un utente responsabile del
  controllo sugli alias dell'intero dominio. A tale scopo verrano usati
  due programmi esterni per i file .qmail-default di tali utenti
  responsabili.  La posta passer attraverso questi due programmi per
  essere consegnata correttamente ad ogni dominio.


  Sono richiesti due programmi poich uno di essi viene eseguito con i
  privilegi di root.  un piccolo programma che cambia di volta in volta
  i propri privilegi ad un utente non root e manda in esecuzione il
  secondo. Si consulti un sito di documentazione sulla sicurezza per una
  disamina dei motivi per cui ci  necessario.


  Questa soluzione evita il bisogno di usare virtuald. Qmail 
  abbastanza flessibile da non richiere una configurazione tramite
  virtuald.  Il modello progettuale su cui  basato Qmail utilizza il
  concatenamento di vari programmi per consegnare la posta. Questo
  modello rende molto facile inserire una sezione virtuale nel processo
  di consegna della posta di Qmail senza alterare l'installazione di
  base.


  Occorre ricordare che, dato che si sta usando un unico server Qmail,
  qualunque nome di dominio non completamente qualificato verr espanso
  usando il nome di dominio del server principale. Questo perch non si
  utilizza un server Qmail separato per ogni dominio. Perci bisogna
  assicurarsi che i propri client (Eudora, elm, mutt, ecc.) siano
  configurati per espandere tutti i propri nomi di dominio non
  completamente qualificati.


  9.4.2.  Configurare i domini virtuali

  Qmail dev'essere configurato per accettare messaggi di posta per
  ciascuno dei domini virtuali cui si vuole fornire il servizio. Si
  digitino i seguenti comandi:


  echo "domain1.com:domain1" >> /var/qmail/control/virtualdomains




  9.4.3.  Configurare l'utente responsabile per il dominio

  Si aggiunga al file /etc/passwd principale l'utente domain1. Meglio
  attribuirgli la shell /bin/false in modo che tale utente non possa
  accedere ad una console. Tale utente potr aggiungere file .qmail e
  tutta la posta indirizzata al dominio virtuale domain1 passer
  attraverso tale account. Si noti che i nomiutente possono essere
  lunghi solo otto caratteri mentre i nomi di dominio possono essere pi
  lunghi.  I caratteri che avanzano vengono troncati. Ci significa che
  gli utenti dominio12 e dominio123 finiranno per essere lo stesso
  utente e Qmail potrebbe far confusione. Bisogna perci fare attenzione
  a scegliere bene le proprie regole di denominazione dell'utente
  responsabile del dominio.


  Si creino i file .qmail del responsabile di dominio con i seguenti
  comandi. Si aggiunga qualsiasi altro alias di sistema a questo punto,
  per es. webmaster o hostmaster.


  echo "user@domain1.com" > /home/d/domain1/.qmail-mailer-daemon
  echo "user@domain1.com" > /home/d/domain1/.qmail-postmaster
  echo "user@domain1.com" > /home/d/domain1/.qmail-root


  Si crei il file .qmail-default del responsabile di dominio. Questo
  file filtrer tutta la posta indirizzata al dominio virtuale.


  echo "| /usr/local/bin/virtmailfilter" > /home/d/domain1/.qmail-default




  9.4.4.  Tcpserver

  Qmail richiede uno speciale programma pop, in grado di supportare il
  formato Maildir. Il programma pop dev'essere reso virtuale. L'autore
  di Qmail raccomanda di usare a questo scopo tcpserver (un rimpiazzo di
  inetd) con Qmail, quindi nei miei esempi user tcpserver e NON inetd.


  Tcpserver non richiede un file di configurazione. Tutte le
  informazioni necessarie gli possono essere passate da riga di comando.
  Segue il file tcpserver.init che si dovrebbe usare per i demoni di
  consegna e prelievo della posta (`mail demon' e `popper'):


  #!/bin/sh

  . /etc/rc.d/init.d/functions

  QMAILDUSER=`grep qmaild /etc/passwd | cut -d: -f3`
  QMAILDGROUP=`grep qmaild /etc/passwd | cut -d: -f4`

  # Dare uno sguardo a come vengono chiamati.
  case "$1" in
    start)
          echo -n "Avvio di tcpserver: "
          tcpserver -u 0 -g 0 0 pop-3 /usr/local/bin/virtuald \
                  /virtual/conf.pop qmail-popup virt.domain1.com \
                  /bin/checkpassword /bin/qmail-pop3d Maildir &
          echo -n "pop "
          tcpserver -u $QMAILDUSER -g $QMAILDGROUP 0 smtp \
                  /var/qmail/bin/qmail-smtpd &
          echo -n "qmail "
          echo
          touch /var/lock/subsys/tcpserver
          ;;
    stop)
          echo -n "Arresto di tcpserver: "
          killall -TERM tcpserver
          echo -n "killing "
          echo
          rm -f /var/lock/subsys/tcpserver
          ;;
    *)
          echo "Utilizzo: tcpserver {start|stop}"
          exit 1
  esac

  exit 0




  9.4.5.  Qmail.init

  Si pu utilizzare l'`init script' standard fornito con Qmail.  La
  documentazione che accompagna Qmail  descrive ottimamente come farlo.

  9.4.6.  Sorgenti

  Per far funzionare i servizi di posta virtuali con Qmail sono
  richiesti altri due programmi. Essi sono virtmailfilter e
  virtmaildelivery.  Segue sotto il sorgente C di virtmailfilter. Il
  programma andrebbe installato in /usr/local/bin con modi 4750, utente
  root e gruppo nofiles.



























































  #include <sys/wait.h>
  #include <unistd.h>
  #include <string.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <ctype.h>
  #include <pwd.h>

  #define VIRTPRE                 "/virtual"

  #define VIRTPWFILE              "etc/passwd"
  #define VIRTDELIVERY            "/usr/local/bin/virtmaildelivery"
  #define VIRTDELIVERY0           "virtmaildelivery"

  #define PERM                    100
  #define TEMP                    111
  #define BUFSIZE                 8192

  int main(int argc,char **argv)
  {
          char *username,*usernameptr,*domain,*domainptr,*homedir;
          char virtpath[BUFSIZE];
          struct passwd *p;
          FILE *fppw;
          int status;
          gid_t gid;
          pid_t pid;

          if (!(username=getenv("EXT")))
          {
                  fprintf(stdout,"environment variable EXT not set\n");
                  exit(TEMP);
          }

          for(usernameptr=username;*usernameptr;usernameptr++)
          {
                  *usernameptr=tolower(*usernameptr);
          }

          if (!(domain=getenv("HOST")))
          {
                  fprintf(stdout,"environment variable HOST not set\n");
                  exit(TEMP);
          }

          for(domainptr=domain;*domainptr;domainptr++)
          {
                  if (*domainptr=='.' && *(domainptr+1)=='.')
                  {
                          fprintf(stdout,"environment variable HOST has ..\n");
                          exit(TEMP);
                  }
                  if (*domainptr=='/')
                  {
                          fprintf(stdout,"environment variable HOST has /\n");
                          exit(TEMP);
                  }

                  *domainptr=tolower(*domainptr);
          }

          for(domainptr=domain;;)
          {
                  snprintf(virtpath,BUFSIZE,"%s/%s",VIRTPRE,domainptr);
                  if (chdir(virtpath)>=0)
                          break;
                  if (!(domainptr=strchr(domainptr,'.')))
                  {
                          fprintf(stdout,"domain failed: %s\n",domain);
                          exit(TEMP);
                  }

                  domainptr++;
          }

          if (!(fppw=fopen(VIRTPWFILE,"r+")))
          {
                  fprintf(stdout,"fopen failed: %s\n",VIRTPWFILE);
                  exit(TEMP);
          }

          while((p=fgetpwent(fppw))!=NULL)
          {
                  if (!strcmp(p->pw_name,username))
                          break;
          }

          if (!p)
          {
                  fprintf(stdout,"user %s: not exist\n",username);
                  exit(PERM);
          }

          if (fclose(fppw)==EOF)
          {
                  fprintf(stdout,"fclose failed\n");
                  exit(TEMP);
          }

          gid=p->pw_gid;
          homedir=p->pw_dir;

          if (setgid(gid)<0 || setuid(p->pw_uid)<0)
          {
                  fprintf(stdout,"setuid/setgid failed\n");
                  exit(TEMP);
          }

          switch(pid=fork())
          {
                  case -1:
                          fprintf(stdout,"fork failed\n");
                          exit(TEMP);
                  case 0:
                          if (execl(VIRTDELIVERY,VIRTDELIVERY0,username,homedir,NULL)<0)
                          {
                                  fprintf(stdout,"execl failed\n");
                                  exit(TEMP);
                          }
                  default:
                          if (wait(&status)<0)
                          {
                                  fprintf(stdout,"wait failed\n");
                                  exit(TEMP);
                          }
                          if (!WIFEXITED(status))
                          {
                                  fprintf(stdout,"child did not exit normally\n");
                                  exit(TEMP);
                          }
                          break;
          }
          exit(WEXITSTATUS(status));
  }




  9.4.7.  Sorgenti

  Per far funzionare i servizi di posta virtuali con Qmail sono
  richiesti altri due programmi. Essi sono virtmailfilter e
  virtmaildelivery.  Segue sotto il sorgente C di virtmaildelivery.
  Andrebbe installato in /usr/local/bin con modi 0755, utente root e
  gruppo root.





















































  #include <sys/stat.h>
  #include <sys/file.h>
  #include <stdlib.h>
  #include <string.h>
  #include <unistd.h>
  #include <stdio.h>
  #include <errno.h>
  #include <time.h>

  #define TEMP                    111
  #define BUFSIZE                 8192
  #define ATTEMPTS                10

  int main(int argc,char **argv)
  {
          char *user,*homedir,*dtline,*rpline,buffer[BUFSIZE],*p,mail[BUFSIZE];
          char maildir[BUFSIZE],newmaildir[BUFSIZE],host[BUFSIZE];
          int fd,n,nl,i,retval;
          struct stat statp;
          time_t thetime;
          pid_t pid;
          FILE *fp;

          retval=0;

          if (!argv[1])
          {
                  fprintf(stdout,"invalid arguments: need username\n");
                  exit(TEMP);
          }

          user=argv[1];

          if (!argv[2])
          {
                  fprintf(stdout,"invalid arguments: need home directory\n");
                  exit(TEMP);
          }

          homedir=argv[2];

          if (!(dtline=getenv("DTLINE")))
          {
                  fprintf(stdout,"environment variable DTLINE not set\n");
                  exit(TEMP);
          }

          if (!(rpline=getenv("RPLINE")))
          {
                  fprintf(stdout,"environment variable RPLINE not set\n");
                  exit(TEMP);
          }

          while (*homedir=='/')
                  homedir++;
          snprintf(maildir,BUFSIZE,"%s/Maildir",homedir);
          if (chdir(maildir)<0)
          {
                  fprintf(stdout,"chdir failed: %s\n",maildir);
                  exit(TEMP);
          }

          time(&thetime);
          pid=getpid();
          if (gethostname(host,BUFSIZE)<0)
          {
                  fprintf(stdout,"gethostname failed\n");
                  exit(TEMP);
          }

          for(i=0;i<ATTEMPTS;i++)
          {
                  snprintf(mail,BUFSIZE,"tmp/%u.%d.%s",thetime,pid,host);
                  errno=0;
                  stat(mail,&statp);
                  if (errno==ENOENT)
                          break;

                  sleep(2);
                  time(&thetime);
          }
          if (i>=ATTEMPTS)
          {
                  fprintf(stdout,"could not create %s\n",mail);
                  exit(TEMP);
          }

          if (!(fp=fopen(mail,"w+")))
          {
                  fprintf(stdout,"fopen failed: %s\n",mail);
                  retval=TEMP; goto unlinkit;
          }

          fd=fileno(fp);

          if (fprintf(fp,"%s",rpline)<0)
          {
                  fprintf(stdout,"fprintf failed\n");
                  retval=TEMP; goto unlinkit;
          }

          if (fprintf(fp,"%s",dtline)<0)
          {
                  fprintf(stdout,"fprintf failed\n");
                  retval=TEMP; goto unlinkit;
          }

          while(fgets(buffer,BUFSIZE,stdin))
          {
                  for(p=buffer;*p=='>';p++)
                          ;

                  if (!strncmp(p,"From ",5))
                  {
                          if (fputc('>',fp)<0)
                          {
                                  fprintf(stdout,"fputc failed\n");
                                  retval=TEMP; goto unlinkit;
                          }
                  }

                  if (fprintf(fp,"%s",buffer)<0)
                  {
                          fprintf(stdout,"fprintf failed\n");
                          retval=TEMP; goto unlinkit;
                  }
          }

          p=buffer+strlen(buffer);
          nl=2;
          if (*p=='\n')
                  nl=1;
          for(n=0;n<nl;n++)
          {
                  if (fputc('\n',fp)<0)
                  {
                          fprintf(stdout,"fputc failed\n");
                          retval=TEMP; goto unlinkit;
                  }
          }

          if (fsync(fd)<0)
          {
                  fprintf(stdout,"fsync failed\n");
                  retval=TEMP; goto unlinkit;
          }

          if (fclose(fp)==EOF)
          {
                  fprintf(stdout,"fclose failed\n");
                  retval=TEMP; goto unlinkit;
          }

          snprintf(newmaildir,BUFSIZE,"new/%u.%d.%s",thetime,pid,host);
          if (link(mail,newmaildir)<0)
          {
                  fprintf(stdout,"link failed: %s %s\n",mail,newmaildir);
                  retval=TEMP; goto unlinkit;
          }

  unlinkit:
          if (unlink(mail)<0)
          {
                  fprintf(stdout,"unlink failed: %s\n",mail);
                  retval=TEMP;
          }

          exit(retval);
  }




  9.5.  Ringraziamenti

  Ringrazio Vicente Gonzalez (vince@nycrc.net) per l'aiuto che ha reso
  possibile la soluzione presentata per Qmail.  certo possibile
  ringraziare Vince tramite e-mail, comunque le domande e i commenti su
  questioni che riguardano Qmail nel contesto di questo HOWTO dovrebbero
  essere indirizzati al sottoscritto.


  10.  Samba virtuale

  10.1.  Configurazione

  Il SAMBA virtuale  molto semplice da installare. Ci si assicuri che i
  seguenti file siano configurati nel modo opportuno:


    /virtual/domain1.com/etc/smb.conf FILE

    /virtual/domain1.com/var/lock/samba DIRECTORY

    /virtual/domain1.com/var/log DIRECTORY

    /usr/local/bin/virtsmbstatus SYMLINK /usr/local/bin/virtexec

  10.2.  Inetd

  Modificare cos /etc/inetd.conf


  vi /etc/inetd.conf # Aggiungere questa linea
  netbios-ssn stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.smbd smbd




  10.3.  Smb.init

  Non  necessario un file smb.init in quanto il programma server 
  lanciato tramite inetd.


  11.  Altri servizi virtuali


  Per ogni altro servizio si dovrebbe seguire una procedura simile.


    Lanciare virtfs per aggiungere i file binari e le librerie al
     filesystem virtuale

    Aggiungere il servizio a /etc/inetd.conf

    Creare un file /virtual/conf.service

    Creare eventuali script virtuali ove siano necessari.


  12.  Conclusione

  Questi sono tutti i passi necessari. Ricordo nuovamente di inviare
  qualunque commento a: Computer Resource Center. Se avete una qualche
  correzione o un aggiornamento da proporre, fatemelo sapere e lo
  aggiunger al documento.


  Questo documento ha ricevuto un'ottima accoglienza. Ringrazio tutti
  coloro che mi hanno inviato domande, dato che hanno permesso che il
  documento venisse incontro alle necessit comuni degli utenti. Prima
  di interpellarmi su una questione Vi prego per di leggere la FAQ per
  vedere se la domanda ha gi ricevuto risposta. Grazie di nuovo.
  Brian.


  13.  FAQ

  D1. Ho creato sendmail.init e syslogd.init. Li ho messi in
  /usr/local/bin e ho cercato di eseguirli, ma ottengo degli errori.


  R1. Questi file sono chiamati `init script'. Sono eseguiti dal
  programma init nella fase di inizializzazione del sistema. Non
  c'entrano con i file binari di /usr/local. Consulta la `Linux System
  Administrators Guide' o la `Linux Getting Started Guide' [anche in
  italiano su Guide LDP tradotte N.d.T.]  per informazioni sull'uso
  degli `init script'.


  D2. Ho messo queste linee in /etc/sendmail.cf

  divert(0)
  VERSIONID(`tcpproto.mc')
  OSTYPE(linux)
  FEATURE(redirect)
  FEATURE(always_add_domain)
  FEATURE(use_cw_file)
  FEATURE(local_procmail)
  MAILER(local)
  MAILER(smtp)



  E ho ricevuto degli strani messaggi di output. Perch?


  R2. Non devi mettere queste linee direttamente in /etc/sendmail.cf.
  Il file sendmail.cf  stato ideato per essere di facile comprensione
  per sendmail e di difficile lettura per gli umani. Dunque per
  facilitare la configurazione noi umani usiamo un programma chiamato m4
  e le sue capacit di gestione tramite macro per creare il file
  sendmail.cf. Le linee che iniziano con FEATURE sono in effetti delle
  macro che devono essere espanse in istruzioni di configurazione di
  sendmail. Esamina la documentazione su sendmail per capire come
  configurare sendmail con questo metodo. Nota inoltre che cos creerai
  un file di configurazione principale /etc/sendmail.cf, file che lo
  script virtfs poi copier in /virtual/domain1.com/etc/sendmail.cf.
  Quindi devi modificare il sendmail.cf della directory /virtual
  affinch sendmail risponda in modo appropriato.


  D3. Dove trovo virtuald, che cos' e come lo devo usare?


  R3. Virtuald  un programma da me scritto per eseguire un servizio
  virtuale. L'ho incluso come codice sorgente in linguaggio C in questo
  HOWTO. Lo puoi compilare come un normale programma in C con make
  virtuald. Il file binario risultante viene installato in
  /usr/local/bin. Aggiungendo delle apposite linee in /etc/inetd.conf
  potrai usarlo come `wrapper' per un normale programma server di rete.


  D4. E se non ho dialog installato sul mio sistema?


  R4. Dialog  un programma che permette di utilizzare finestre di
  dialogo a scomparsa (`dialog pop-up window') negli script di shell. 
  richiesto per il funzionamento degli script di shell di esempio che si
  trovano in questo HOWTO. Puoi ottenere una copia di dialog presso
  sunsite.  di facile compilazione e installazione.


  D5. Come posso sapere se il syslogd virtuale funziona?


  R5. Quando virtuald parte dovrebbe inviare i seguenti messaggi a
  syslogd (/var/log/messages):


  Nov 19 17:21:07 virtual virtuald[10223]: Virtuald Starting: $Revision: 1.49 $
  Nov 19 17:21:07 virtual virtuald[10223]: Incoming ip: 204.249.11.136
  Nov 19 17:21:07 virtual virtuald[10223]: Chroot dir: /virtual/domain1.com



  Il messaggio circa la directory su cui viene fatto chroot  inviato da
  virtuald dopo l'esecuzione della chiamata di funzione chroot. Se
  appare questo messaggio, il syslogd virtuale funziona.  Se si possono
  vedere i messaggi che il servizio che si sta rendendo virtuale passa a
  syslogd, anche questo  un segno che il syslogd virtuale  configurato
  correttamente.


  Nota che se non  stata attivata l'opzione di compilazione VERBOSELOG
  virtuald non passer nessun messaggio a syslogd. In questo caso si pu
  dire che il syslogd virtuale funziona correttamente se il programma
  demone che si sta rendendo virtuale riesce di suo a passare qualche
  messaggio a syslogd.


  D6. Come posso configurare le quote disco tenendo conto dei vari
  filesystem virtuali?


  R6. Puoi configurare le quote disco come faresti normalmente. Puoi
  consultare il Quota mini-HOWTO. Comunque devi essere sicuro che non ci
  siano conflitti di uid tra i vari domini. Se ci sono conflitti avrai
  pi utenti che condividranno una stessa quota. Tieni da parte un
  intervallo di uid riservati agli utenti che avranno la quota disco
  abilitata e fa in modo che i tuoi domini non abbiano altri utenti in
  tale intervallo tranne quelli registrati per avere una quota disco.


  D7. Che cosa sono i '\' nelle voci di inetd.conf?


  R7.  solo un metodo per spezzare su pi righe una singola linea di
  configurazione. L'ho usato in modo da suddividere a piacere la riga.
  Puoi ignorare il '\' e riunire nuovamente le due righe insieme.


  D8. Quando lancio passwd o altri programmi di login ricevo un
  permission denied. Quando lancio FTP o `su' ricevo un no modules
  loaded for service XXX. Perch?


  R8. Sono messaggi di errore di PAM. Ho ideato questi script prima che
  uscisse PAM. Il mio script virtfs non copia /etc/pam.d,
  /usr/lib/cracklib_dict.*, /lib/security e nessun altro dei file
  richiesti per il corretto funzionamento di PAM. Modificando lo script
  virtfs in modo da copiare anche questi file il problema si risolver.


  D9. Virtuald pu lavorare assieme ai file di tcpd: hosts.allow e
  hosts.deny?


  R9. S, con opportune modifiche lo pu fare.


  Per prima cosa il sorgente dev'essere modificato in due punti.


  Dev'essere inserito quanto segue nel punto in cui gli argomenti
  vengono controllati.


          if (!argv[3])
          {
                  syslog(LOG_ERR,"invalid arguments: no program to run");
                  exit(0);
          }

  La linea `exec' dev'essere cambiata da:


          if (execvp(argv[2],argv+2)<0)



  in:


          if (execvp(argv[2],argv+3)<0)



  Come secondo passo le linee di inetd.conf devono essere modificate da:


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp wu.ftpd -l -a



  in:


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp tcpd wu.ftpd -l -a



  Come terzo passo modifica in modo appropriato i file
  /virtual/domain1.com/etc/hosts.allow e
  /virtual/domain1.com/etc/hosts.deny.


  D10. I miei host virtuali possono eseguire script CGI?


  R10. S, lo possono fare, ma ti raccomando di mettere i /cgi-bin in un
  posto non accessibile dopo il chroot, al quale abbia accesso solo tu.
  Ad esempio /var/www/cgi-bin/domain1.com. Permettere ai client
  l'accesso a /cgi-bin significa dare loro la possibilit di eseguire
  programmi sul tuo server. Ci costituirebbe un grosso problema di
  sicurezza. Fa' attenzione. Personalmente non lascio eseguire nessun
  cgi sui miei sistemi se non dopo aver controllato di persona l'assenza
  di bug.


  D11. I miei file di configurazione sono diversi dagli esempi
  riportati. Che devo fare?


  R11. Ci sono due stili fondamentali di configurazione: SystemV e BSD.
  Gli esempi riportati in questo HOWTO sono basati sui file di
  configurazione nello stile SystemV. I servizi virtuali funzionano
  ugualmente bene in entrambi i sistemi. Per informazioni sui file di
  configurazione stile BSD consulta le fonti della tua distribuzione o
  il pi vicino sito LDP.


  D12. Ti ho scritto una e-mail e non ho ricevuto alcuna risposta o c'
  voluto molto tempo per averla. Perch?


  R12. Probabilmente perch non hai messo VIRTSERVICES HOWTO nel
  soggetto del messaggio. Ti prego di tenere a mente che sono un
  amministratore di reti e che, tra le altre cose che faccio nelle mie
  giornate sempre troppo brevi [``in my 20 hour days'' nell'originale
  N.d.T.], mi prendo cura dei box virtuali miei e dei miei clienti. I
  messaggi correttamente indirizzati trovano sempre risposta in due o
  tre giorni.  I messaggi che invece non contengono il soggetto di cui
  sopra non vengono depositati nella mia casella VIRTSERVICES e possono
  non ricevere alcuna attenzione per giorni o anche settimane.


  D13. Virtuald funziona su connessioni sotto i 100Mbit?


  R13 La velocit della scheda di rete non  correlata al funzionamento
  di virtuald. Prova ad assicurarti che il tuo server lavori sotto i 10
  Mbit e che la tua scheda di rete a 100 Mbit funzioni normalmente in
  assenza di un server virtuale.


  D14. Dovrei usare la tabella virthost di sendmail?


  R14. No. Quella  una funzionalit di sendmail che gli permette di
  ricevere informazioni per la gestione di domini multipli.  Virtuald
  fornisce ad ogni sendmail il suo proprio ambiente, separato dagli
  altri tramite chroot. Installa virtuald e poi configura sendmail come
  faresti normalmente per ogni singolo dominio.


  D15. Posso configurare un telnet virtuale sulla mia macchina? Che ne
  pensi della creazione di un account di root virtuale che permetta ai
  clienti di amministrare i propri domini?


  R15. Questo genere di domande mi vengono fatte piuttosto spesso e, per
  essere onesti, mi stanno un po' stufando. La risposta, come espresso
  gi parecchie volte nella documentazione,  che qualsiasi servizio
  eseguito attraverso inetd pu essere reso virtuale usando lo script
  virtuald, quindi non c' nulla che impedisca di farlo.  Nulla eccetto
  il buon senso. Qualunque beneficio possa derivare dal permettere il
  telnet  ampiamente superato dai costi in termini di sicurezza per il
  box virtuale e di conseguenza per i siti, che si suppone debbano
  essere gestiti in modo responsabile. Di seguito cito solo alcuni dei
  punti in discussione:


    Allo scopo di ingannare compiutamente una sessione telnet in
     entrata si dovrebbe fare qualche modifica al kernel, aggiustare
     l'indirizzo IP sorgente per le connessioni in uscita, ingannare
     gethostname per fargli usare l'hostname virtuale e non quello del
     sistema reale, eccetera. Se si hanno conoscenze avanzate, ci si
     diverta pure a smanettare sul kernel, ma non lo consiglio certo a
     principianti o simili.

    Permettere agli utenti di accedere alla propria macchina via telnet
     significa consentire loro di lanciare programmi a piacere. Usando
     trucchi ben noti essi potrebbero acquistare i privilegi di root e
     procurare danni al sistema.

    Dare un account telnet con privilegi di root su un box virtuale 
     malsano. Come root nell'ambiente virtuale un utente pu leggere
     comunque i file di device a basso livello, annullando in pratica il
     chroot, pu spegnere il sistema, e pu uccidere altri processi in
     esecuzione.

    I programmi che vengono eseguiti in queste sessioni telnet occupano
     un certo tempo di CPU, prezioso per i servizi di rete.
    Telnet  un servizio insicuro. Lungo la rete le password vengono
     trasmesse in chiaro. Se un utente malintenzionato riuscisse ad
     ottenerle, potrebbe utilizzare i trucchi sopramenzionati per
     mettere in pericolo il sistema.

    Gli ambienti virtuali avranno bisogno di uno spazio maggiore. Serve
     lo spazio per un numero maggiore di librerie condivise, file di
     configurazione e file binari. Anche su un disco da sei gigabyte lo
     spazio disponibile pu esaurirsi molto rapidamente.


  L'idea di fondo  che permettere il login su un box virtuale  una
  pessima cosa. Ove lo si permettesse, ogni sito ospitato sulla macchina
  sarebbe a rischio. Se si desidera permettere al titolare di un sito di
  amministrare da s i propri utenti allora raccomando di scrivere il
  codice (non si tratta di script) necessario a lanciare i processi
  virtuali che permetteranno di aggiungere, eliminare o modificare gli
  account degli utenti su un collegamento in ssh. Dovrebbe essere
  completamente guidato da menu, non dovrebbe permettere l'accesso ad
  una console e non dovrebbe girare con i permessi di root. Per ottenere
  ci si dov cambiare il proprietario dei file opportuni da root a
  qualche altro utente. Se fatto in questo modo, sar forse abbastanza
  sicuro da poter essere usato su una macchina virtuale. Non  mai il
  caso di permettere il collegamento sulla macchina come root, sia in
  telnet che in ssh. Permetterlo vuol dire semplicemente che si stanno
  cercando dei guai.  Se c' una ragione schiacciante per dover far
  girare telnet, allora il sito dovrebbe essere ospitato su una macchina
  a parte, cos da limitare il rischio a quella macchina. Nessun
  amministratore responsabile dovrebbe fare altrimenti, quindi non
  spender altro tempo sull'argomento.


  D16. C' da qualche parte un file rpm o tar, un sito web, una lista di
  discussione ecc. che si occupi di virtuald e del Virtual-Services
  HOWTO?


  R16. Attualmente non  disponibile nulla del genere. Questo HOWTO  la
  sola fonte di informazione per quanto riguarda questo progetto. Trovo
  che questo HOWTO sia abbastanza autonomo da rendere superflue altre
  fonti di informazioni pi frammentarie.


  D17. Quando lancio virtexec come utente normale ricevo il messaggio
  chroot: operation not permitted. Perch?


  R17. Chroot  una chiamata di sistema ristretta ai privilegi di root.
  Solo il superutente pu eseguirla. Lo script virtexec lancia il
  programma chroot, per cui  necessario essere root per eseguirlo con
  successo.


  D18. Ho configurato pop e sendmail ma il prelievo della posta a mezzo
  pop non sembra funzionare. Che succede?


  R18. Alcuni programmi che gestiscono il servizio pop usano
  /usr/spool/mail come directory per i file di posta. So ad esempio che
  qpop dev'essere modificato a livello sorgente per risolvere il
  problema. Quindi ricompila il sorgente opportunamente modificato o
  collega con un link simbolico /virtual/domain1.com/usr/spool a
  /virtual/domain1.com/var/spool.



  D19. Non ho usato il programma citato nel tuo HOWTO. Ho usato il
  programma XXX. Non funziona. Perch?


  R19. Nei miei esempi ho cercato di fare in modo di usare i pi
  generici e diffusi tra i vari server a disposizione. Ad ogni modo mi
  rendo conto che ognuno ha il suo programma preferito. Cerca di
  inviarmi quante pi informazioni utili  possibile.  Prover ad
  immaginare una soluzione al tuo problema e la riporter in questa FAQ.
  L'informazione pi importante da inviarmi  dove trovare la versione
  del software che stai usando (nella forma
  ftp://ftp.domain1.com/subdir/subdir/file.tgz).


  D20. Quando lancio virtexec mi dice: Il link simbolico non  a una
  funzione virt. Cosa significa e come posso risolvere il problema?


  R20. Virtexec  un programma che prende l'argomento zero [il nome con
  cui viene invocato da riga di comando N.d.T.], elimina i suoi primi
  quattro caratteri, ed esegue il programma dal nome rimanente
  nell'ambiente virtuale. Ad esempio, virtpasswd fa eseguire passwd. Se
  i primi quattro caratteri che deve eliminare non sono virt allora
  emette quel messaggio di errore. Virtexec  uno script di shell e
  dovrebbe risultare di facile comprensione. Ricorri alle pagine man di
  bash, o di qualunque altra shell tu stia usando, per questioni
  concernenti la programmazione in linguaggio di shell.


  D21. Ho una domanda su Qmail, SAMBA, Apache, ecc. che non  correlata
  con la configurazione di virtuald o con l'uso del pacchetto in
  rapporto a virtuald.


  R21. Tutti i pacchetti citati hanno una documentazione completa.
  Alcuni hanno anche siti web del tipo www.packagename.org a loro
  dedicati.  Puoi consultarli per questioni riguardanti i pacchetti che
  non abbiano legami con il loro funzionamento in un ambiente virtuale.


  D22. Ho parecchi alias di dominio per domain1.com ma la posta continua
  a rimbalzare dagli alias. Che succede?


  R22. Virtmaildelivery utilizza unicamente le variabili di ambiente che
  gli vengono passate per determinare a quale directory
  /virtual/domain1.com consegnare i messaggi. Non effettua infatti alcun
  lookup DNS per determinare l'indirizzo del messaggio. Comunque, se
  l'indirizzo  submail.mail.domain1.com, virtmaildelivery prover prima
  con quell'indirizzo, poi con mail.domain1.com, quindi con domain1.com
  e poi com in quest'ordine fino a che si abbia un riscontro positivo o
  non vi sia pi un nome di dominio con cui provare.


  Nondimeno se si hanno alias di dominio che non sono sottodomini uno
  dell'altro  necessario creare link simbolici come ad esempio:


  cd /virtual
  ln -s domain1.com domain1alias.com



  In questo modo virtmaildelivery sar portato a credere che esistano
  entrambe le directory, anche se una  solo un link simbolico, e la
  posta potr essere consegnata a user@domain1.com o
  user@domain1alias.com. Si noti che virtexec, ove eseguito, mostrer
  entrambi i domini nella casella di dialogo. Si pu scegliere uno
  qualunque dei due, dato che si tratta in realt dello stesso
  filesystem virtuale.






























































  Linux WWW HOWTO
  di Wayne Leister, n3mtr@qis.net
  v0.82, 19 Novembre 1997

  Questo documento contiene informazioni sul settaggio e l'installazione
  di servizi WWW in Linux (sia server che client). Questo testo non
  vuole essere un manuale dettagliato, ma semplicemente una panoramica
  nonch un punto di partenza per successive ricerche. Traduzione di
  Silvio Porcellana <sporc at mbox.vol.it>.

  1.  Introduzione


  Molte persone usano Linux perch sono alla ricerca di un buon sistema
  operativo che sia anche Internet compatibile. Inoltre, ci sono
  istituti, universit, enti non-profit e piccole imprese che vogliono
  mettere on line dei siti Internet con un budget limitato.  qui che il
  WWW-HOWTO vuole inserirsi. Questo documento spiega come far funzionare
  dei client e server per la parte pi consistente di Internet - il
  World Wide Web.

  Tutti i prezzi si intendono in dollari americani. Questo documento
  presuppone che si stia utilizzando Linux su una piattaforma Intel: le
  istruzioni e la disponibilit dei prodotti possono variare da
  piattaforma a piattaforma. Sono presenti inoltre molti link per il
  download del software: quando possibile,  preferibile utilizzare i
  siti mirror per ottenere un download pi veloce e ridurre il traffico
  verso il server principale.

  Il governo americano probisce alle aziende statunitensi l'esportazione
  di algoritmi di crittografia che superino i 40 bit. Pertanto le
  compagnie americane offrono di solito due versioni del loro software:
  una per il mercato domestico solitamente a 128 bit e una solo per
  l'esportazione a 40 bit. Ci si applica sia ai browser sia ai server
  che supportano le transazioni sicure, altrimenti note come Secure
  Socket Layer (SSL).


  1.1.  Copyright


       Per motivi legati alla validit della licenza le note di
       copyright devono essere mantenute in lingua originale.


  This document is Copyright (c) 1997 by Wayne Leister.  The original
  author of this document was Peter Dreuw.(All versions prior to 0.8)


       This HOWTO is free documentation; you can redistribute it
       and/or modify it under the terms of the GNU General Public
       License as published by the Free Software Foundation; either
       version 2 of the License, or (at your option) any later ver
       sion.



       This document is distributed in the hope that it will be
       useful, but without any warranty; without even the implied
       warranty of merchantability or fitness for a particular pur
       pose.  See the GNU General Public License for more details.




       You can obtain a copy of the GNU General Public License by
  writing to the Free Software Foundation, Inc., 675 Mass Ave,
  Cambridge, MA 02139, USA.


  Trademarks are owned by there respective owners.


       ovvero:


  Questo documento  Copyright (c) 1997 di Wayne Leister.  L'autore
  originale  Peter Dreuw (Tutte le versioni prima della 0.8)


       Questo HOWTO  documentazione gratuita: si pu redistribuire
       e/o modificare rispettando i termini della Licenza Pubblica
       GNU cos come pubblicata dalla Free Software Foundation; sia
       la versione 2 della Licenza che (a vostra scelta) ogni altra
       versione pi recente.



       Questo documento  distribuito con la speranza che possa
       risultare utile, ma senza alcuna garanzia, nemmeno quella di
       vendibilit o adeguatezza per scopi particolari. Per mag
       giori dettagli, riferirsi comunque alla Licenza Pubblica
       GNU.



        possibile ottenere una copia della Licenza Pubblica GNU
       scrivendo alla Free Software Foundation, Inc., 675 Mass Ave,
       Cambridge, MA 02139, USA.


  I marchi di fabbrica sono di propriet dei rispettivi proprietari.


  1.2.  Feedback

  Ogni forma di feedback  gradita. Non ho la pretesa di essere un
  esperto.  Alcune di queste informazioni sono state reperite da siti
  scritti male: ci possono essere errori o omissioni. Accertatevi
  comunque di avere l'ultima versione del documento prima di inviare
  correzioni: il problema potrebbe essere stato risolto nella release
  pi recente (nella prossima sezione  spiegato dove trovare le ultime
  versioni del documento).  Ogni commento va inviato a: n3mtr@qis.net.


  1.3.  Nuove versioni di questo documento

  Le nuove versioni di questo documento possono essere scaricate in
  formato testo da Sunsite a
  <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/WWW-HOWTO> e da quasi
  qualunque altro sito mirror.  possibile vedere l'ultima versione HTML
  sul web a <http://sunsite.unc.edu/LDP/HOWTO/WWW-HOWTO.html>.  Ci sono
  inoltre versioni HTML presso Sunsite in archivi tar.





  2.  Installazione di software client per WWW

  Il prossimo capitolo  dedicato all'installazione di web browser.  Se
  il vostro browser favorito non  menzionato, sentitevi liberi di
  contattarmi per farmelo sapere. In questa versione del documento, solo
  pochi browser hanno la loro sezione, ma ho cercato di includerli tutti
  (quelli che ho trovato...) nella sezione Panoramica. Nel futuro, quei
  browser che meritano una loro sezione l'avranno.

  La sezione Panoramica  pensata per aiutarvi a decidere quale browser
  utilizzare e per fornire informazioni di base su ogni singolo browser.
  La sezione Dettaglio serve invece per aiutare nell'installazione,
  settaggio e manutenzione del browser.

  Personalmente, preferisco Netscape:  l'unico browser che si mantiene
  aggiornato sulle ultime novit in fatto di HTML, quali frame, Java,
  Javascript, style sheet, transazioni sicure e layer. Non c' niente di
  peggio che provare a visitare un sito e scoprire che non lo si pu
  vedere perch il prorio browser non supporta alcune nuove
  caratteristiche.

  Comunque, utilizzo Lynx quando non ho voglia di lanciare il "mostro"
  X-Windows/Netscape.


  2.1.  Panoramica


     ``Navigator/Communicator''
        Netscape Navigator  l'unico browser qui citato che sfrutti
        appieno le nuove caratteristiche di HTML avanzato. Alcune di
        queste sono i frame, Java, Javascript, update automatico e
        layer. Funge anche da client per la posta e per la lettura delle
        news.   per un divoratore di risorse, sia di CPU che di
        memoria. Inoltre, crea una cache disco per ogni utente,
        sprecando un sacco di spazio.  Netscape  un prodotto
        commerciale: le imprese hanno un periodo di prova di 30 giorni,
        ma non c' alcun limite per i privati.  Vorrei incoraggiare
        comunque tutti a registrarsi per supportare Netscape nella sua
        lotta contro Microsoft (e cosa sono poi 40 miseri dollari?). La
        mia paura  che se Microsoft vince, saremo tutti forzati ad
        usare Internet Explorer su una piattaforma Windows :(


     ``Lynx''
        Lynx  uno tra i pi piccoli browser:  gratuito e il codice
        sorgente  disponibile sotto la Licenza GNU.  il re dei browser
        testuali, offrendo molte funzioni speciali pur avendo solo
        un'interfaccia a caratteri.


     Kfm
        Kfm fa parte del K Desktop Environment (KDE). Si tratta di un
        sistema che funziona sotto X-Windows e che offre molte
        caratteristiche quali drag and drop, suoni, un cestino nonch un
        aspetto omogeneo. Kfm  una file manager, ma pu essere
        utiizzato anche come browser. Non bisogna farsi ingannare dal
        nome, visto che, pur essendo un prodotto molto giovane,  molto
        comodo per navigare sul Web. Supporta i frame, le tabelle, il
        download ftp, la visualizzazione di archivi tar e molto altro.
        La versione corrente  la 1.39 ed  gratuita:  possibile
        utilizzarlo anche senza KDE, ma necessita comunque delle
        librerie che accompagnano questo windows manager. Maggiori
        informazioni possono essere reperite presso
        <http://www.kde.org>.


     ``Emacs''
        Emacs  un "coltellino svizzero".   un word processor, un
        client per la posta e un browser.  molto difficile da
        utilizzare all'inizio perch bisogna imparare tutti i comandi
        associati alla tastiera, ma la versione per X-Windows  pi
        semplice dal momento che tutte le funzioni sono sui menu.
        Un'ulteriore controindicazione  che  sostanzialmente testuale,
        e dunque le immagini possono essere visualizzate solo nella
        versione per X-Windows.  Anche Emacs  gratuito e il codice
        sorgente  disponibile sotto la Licenza GNU.


     NCSA Mosaic
        Mosaic  un browser per X-Windows sviluppato dal Centro
        Nazionale delle Applicazioni per Supercomputer (NCSA)
        dell'Universit dell'Illinois: NCSA ha impiegato quattro anni
        per completare il progetto e adesso si  rivolta verso altre
        possibilit.  La versione pi recente  la 2.6, rilasciata il 7
        luglio 1995, il cui codice sorgente  disponibile per un uso non
        commerciale.  Spyglass Inc. <http://www.spyglass.com> ha tutti i
        diritti commerciali su Mosaic.  Questo  un browser per X-
        Windows molto solido, ma  carente per quanto riguarda le nuove
        caratteristiche dell'HTML. Per maggiori informazioni visitate la
        home page di Mosaic presso
        <http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/>.  Il software
        pu essere scaricato presso
        <ftp://ftp.ncsa.uiuc.edu/Mosaic/Unix/binaries/2.6/Mosaic-
        linux-2.6.Z>.


     Arena
        Arena  un browser per X-Windows concepito quando si stava
        testando l'HTML 3.0. Pertanto supporta tutte le caratteristiche
        di questa versione, dai fogli di stile alle tabelle. Lo sviluppo
         stato portato avanti da Yggdrasil Computing con l'obiettivo di
        giungere alla creazione di un browser grafico gratuito e
        pienamente aggiornato. Nonostante ci, lo sviluppo si  fermato
        nel febbraio del 1997 con la versione 0.3.11, che ha
        implementato solo una parte degli standard dell'HTML 3.2. Il
        codice sorgente  disponibile sotto la Licenza GNU. Informazioni
        presso <http://www.yggdrasil.com/Products/Arena/>.  Pu essere
        scaricato da <ftp://ftp.yggdrasil.com/pub/dist/web/arena/>.


     Amaya
        Amaya  il browser per X-Windows del W3C per HTML 3.2, di cui
        supporta tutti gli standard, nonch alcuni standard dell'HTML
        4.0. Sono previsti tabelle, form, mappe client side, put
        publishing nonch i formati grafici GIF, JPEG e PNG. Si tratta
        sia di un browser che di uno strumento di authoring, giunto
        adesso alla versione 1.0 beta per il pubblico mentre la 1.1 beta
        per il test e lo sviluppo interno sar rilasciata al pi presto.
        Per informazioni, visitate il sito di Amaya a
        <http://www.w3.org/Amaya/>.  Pu essere scaricato presso
        <ftp://ftp.w3.org/pub/Amaya-LINUX-ELF-1.0b.tar.gz>.


     Red Baron
        Red Baron  un browser per X-Windows prodotto dalla Red Hat.  
        distribuito insieme alla distribuzione di Linux della Red Hat:
        non dispongo di molte informazioni, ma so che supporta i frame,
        i form e i SSL.  Se usate Red Baron, per piacere aiutatemi a
        completare questa sezione.  Per maggiori informazioni, visitate
        il sito Red Hat presso <http://www.redhat.com>


     Chimera
        Chimera  un browser X-Windows basilare: l'ultima versione, la
        2.0 alfa 6,  stata rilasciata il 27 agosto del 1997 e supporta
        alcune caratteristiche dell'HTML 3.2. Per informazioni
        <http://www.unlv.edu/chimera/>.  Chimera pu essere scaricato
        presso <ftp://ftp.cs.unlv.edu/pub/chimera-
        alpha/chimera-2.0a6.tar.gz>.


     Qweb
        Qweb  un altro browser X-Windows molto semplice. Supporta
        tabelle, form nonch mappe server side. L'ultima versione  la
        1.3.  Per informazioni: <http://sunsite.auc.dk/qweb/> Il codice
        sorgente  disponibile presso
        <http://sunsite.auc.dk/qweb/qweb-1.3.tar.gz> I file binari,
        disponibili come RPM Red Hat, possono essere scaricati da
        <http://sunsite.auc.dk/qweb/qweb-1.3-1.i386.rpm>


     Grail
        Grail  un browser X-Windows sviluppato dalla Corporation for
        National Research Initiatives (CNRI).  scritto interamente in
        Python, un linguaggio ad oggetti interpretato. L'ultima versione
         la 0.3 rilasciata il 7 maggio 1997: supporta form, bookmark,
        hystory, frame, tabelle e altre funzionalit previste dall'HTML
        3.2.


     Internet Explorer
        Ci sono voci che annuncerebbero la Microsoft in procinto di
        portare Internet Explorer su svariate piattaforme Unix - tra cui
        forse Linux. Se  vero, ci stanno mettendo un sacco di tempo: se
        avete informazioni attendibili, fatevi vivi con un e-mail.

  Secondo me, la maggior parte del software menzionato  praticamente
  inutilizzabile per una navigazione approfondita sul Web. Non  mia
  intenzione criticare gli autori - so che hanno lavorato molto
  seriamente sui loro progetti: il punto  che se tutte queste persone
  avessero lavorato su un unico prodotto, probabilmente sarebbe venuto
  fuori un browser gratuito che avrebbe potuto competere con Netscape o
  Internet Exlorer.

  A mio parere, fra tutti i browser citati Netscape e Lynx sono i
  migliori.  A seguire Kfm, Emacs-W3 e Mosaic.






  3.  Lynx

  Lynx  uno dei pi piccoli (l'eseguibile  di 600 K) e pi veloci
  browser disponibili. Non necessita di molta banda n di grandi risorse
  hardware dal momento che lavora solo in modalit testo. Pu funzionare
  su qualunque console, terminale o xterm. Non necessita di un sistema X
  Windows n di memoria addizionale.


  3.1.  Dove trovarlo

  Sia la distribuzione Red Hat che la Slackware contengono Lynx.
  Pertanto non vi star ad annoiare con i dettagli per compilare ed
  installare Lynx.

  La versione pi recente  la 2.7.1 e puo essere scaricata da
  <http://www.slcc.edu/lynx/fote/> o da quasi tutti i server FTP per
  Linux, come ad esempio ftp://sunsite.unc.edu under
  /pub/Linux/apps/www/broswers/ o i siti mirror.
  Per maggiori informazioni su Lynx contattare:

     Lynx Links
        <http://www.crl.com/~subir/lynx.html>

     Lynx Pages
        <http://lynx.browser.org>

     Lynx Help Pages
        <http://www.crl.com/~subir/lynx/lynx_help/lynx_help_main.html>
        (questa  la pagina che si ottiene lanciando lynx --help o
        premendo ? in Lynx)

  Nota: le pagine di help per Lynx sono state spostate di recente. Se
  avete una vecchia versione, dovrete cambiare lunx.cfg (in /usr/lib) e
  farlo puntare al nuovo indirizzo sopra menzionato.

  Penso che la funzione pi interessante di Lynx - nei confronti degli
  altri browser -  sia la possibilit di scaricare in batch.  possibile
  scrivere uno script shell che scarica un documento, un file o
  qualunque altra cosa attraverso http, FTP, gopher, WAIS, NNTP o
  file:// e lo salva su disco.  Inoltre,  possibile riempire
  questionari e form in modalit batch semplicemente ridirigendo lo
  standard input e utilizzando l'opzione -post_data.

  Per ulteriori funzioni speciali di Lynx, date un'occhiata ai file di
  help e alle pagine di manuale. Se utilizzate una caratteristica di
  Lynx che vorreste vedere aggiunta in questo documento, fatemelo
  sapere.




  4.  Emacs-W3

  Ci sono diversi "gusti" di Emacs. I due pi diffusi sono GNU Emacs e
  XEmacs.  Gnu Emacs  ditribuito dalla Free Software Foundation ed 
  quello originale.   rivolto principalmente verso terminali testo, ma
  funziona anche sotto X-Windows. XEmacs (che una volta si chiamava
  Lucid Emacs)  una versione che gira solo sotto X-Windows sfruttandone
  molto le caratteristiche (menu migliori, ecc.)


  4.1.  Dove trovarlo


  Sia la distribuzione Red Hat che la Slackware includono GNU Emacs.

  La versione pi recente  la 19.34. Non sembra esistere un sito web,
  mentre il sito FTP  <ftp://ftp.gnu.ai.mit.edu/pub/gnu/>.

  L'ultima versione di XEmacs  la 20.2. Il sito FTP  a
  <ftp://ftp.xemacs.org/pub/xemacs>.  Per maggiori informazioni si
  XEmacs, visitate <http://www.xemacs.org>.

  Entrambi sono comunque disponibili dall'archivio Linux presso
  ftp://sunsite.unc.edu under /pub/Linux/apps/editors/emacs/

  Se avete GNU Emacs o XEmacs, probabilmente avete anche il browser W3.

  Il modo W3  un browser quasi completo scritto in Emacs Lisp.
  Principalmente tratta le informazioni in maniera testuale, ma pu
  anche visualizzare immagini se utilizzato sotto X-Windows.

  Per far funzionare XEmacs in modalit W3, bisogna andare nel menu
  'apps' e selezionare 'browse the web'.
  Io non uso Emacs, perci se qualcuno vuole spiegare come entrare nel
  modo W3 lo aggiunger a questo documento. La maggior parte di queste
  informazioni provengono dall'autore originale: se qualcuna 
  sbagliata, fatemelo sapere.  Fatemi anche sapere se pensate che sia
  necessario aggiungere qualche altra informazione su Emacs.






  5.  Netscape Navigator/Communicator


  5.1.  Differenti versioni e opzioni.

  Netscape Navigator  il re dei browser WWW. Pu fare quasi tutto:
  d'altro canto, per,  uno dei programmi pi affamati di memoria e
  risorse che io abbia mai visto.

  Ci sono tre diverse versioni del programma:

  Netscape Navigator include il browser, Netcaster (un client push) e un
  semplice programma di posta.

  Netscape Communicator include il browser, l'editor, un programma di
  posta avanzato, un lettore di news, Netcaster e un'utility per le
  conferenze di gruppo.

  Netscape Communicator Pro include tutto ci contenuto nella suite del
  Communicator, pi un calendario di gruppo, emulazione di terminale IBM
  e la possibilit di amministrazione remota (gli amministratori possono
  aggiornare migliaia di copie di Netscape senza lasciare la proprio
  scrivania).

  Oltre alle tre versioni, ci sono altre due opzioni da scegliere.

  La prima  fra installazione completa o di base. La completa include
  tutto, mentre quella di base comprende abbastanza per cominciare a
  navigare.  possibile scaricare i componenti addizionali quando si
  vuole (ad esempio supporto multimediale e Netcaster). Questi
  componenti possono essere installati attraverso l'utility di Netscape
  "Smart Update" (dopo l'installazione, andare in help->software
  updates). Al momento non  per disponibile la versione completa per
  Linux.

  La seconda opzione  fra la versione per l'interno o per
  l'esportazione.  Se vivete in Canada o negli Stati Uniti dovete
  scegliere la prima, che offre la pi forte crittografazione a 128 bit
  per le transazioni sicure (SSL). La versione per l'esportazione 
  invece solo a 40 bit ed  l'unica ad essere autorizzata al di fuori di
  Canada e USA.

  L'ultima versione di Netscape Navigator/Communicator/Communicator Pro
   la 4.03. Ci sono due differenti versioni per Linux: uno per i vecchi
  kernel delle serie 1.2 e uno per i nuovi kernel 2.0. Se non avete
  ancora un kernel di questa serie, vi consiglio vivamente un upgrade:
  ci sono infatti molti miglioramenti.

  Sono inoltre disponibili delle versioni beta, ma di solito durano solo
  un mese o gi di l.





  5.2.  Dove trovarlo


  Il miglior modo per ottenere il software Netscape  quello di
  scaricarlo dal loro sito web a  <http://www.netscape.com/download/>.
  Ci sono dei menu che guidano alla scelta: la domanda sulla versione di
  Linux si riferisce al kernel (la maggior parte delle persone dovrebbe
  avere il 2.0). Se non si  sicuri della versione del proprio kernel,
  basta lanciare il comando 'cat /proc/version'. La versione per
  l'interno  disponibile solo attraverso il sito web.

  Se invece volete la versione per l'esportazione, potete scaricarla
  direttamente dai server FTP della Netscape, che tra l'altro sono anche
  pi aggiornati. Per esempio, quando ho scritto questo documento
  l'interfaccia web non aveva ancora la versione 4.03 non-beta per
  Linux, mentre il sito FTP s. Ecco i link alle versioni esportabili
  per Linux:

  Netscape Navigator 4.03  a
  <ftp://ftp.netscape.com/pub/communicator/4.03/shipping/english/unix/linux20/navigator_standalone/navigator-
  v403-export.x86-unknown-linux2.0.tar.gz>

  Netscape Communicator 4.03 per Linux 2.0 (kernel)  a
  <ftp://ftp.netscape.com/pub/communicator/4.03/shipping/english/unix/linux20/base_install/communicator-
  v403-export.x86-unknown-linux2.0.tar.gz>

  Communicator Pro 4.03 per Linux non era ancora disponibile quando ho
  scritto questo documento.

  Queste URL cambieranno quando usciranno nuove versioni: se i link non
  funzionano, potete trovare quelli giusti spulciando il sito FTP
  <ftp://ftp.netscape.com/pub/communicator/>.

  Questi server sono a volte molto trafficati:  dunque preferibile
  aspettare le ore morte o scegliere un sito mirror. Comunque,
  preparatevi ad una lunga attesa dal momento che questi archivi sono
  grossi: Navigator  quasi 8 mega, mentre la versione base di
  Communicator 10.


  5.3.  Installazione

  Questa sezione spiega come installare la versione quattro di Netscape
  Navigator, Communicator e Communicator Pro.

  Per prima cosa, scompattate l'archivio in una directory temporanea.
  Poi, eseguite lo script ns-install (digitate ./ns-install).  In
  seguito, create un link simbolico dal file
  /usr/local/netscape/netscape a /usr/local/bin/netscape (digitate ln -s
  /usr/local/netscape/netscape /usr/local/bin/netscape).  Infine,
  impostate la variabile d'ambiente $MOZILLA_HOME a /usr/local/netscape,
  di modo che Netscape possa trovare i propri file. Se utilizzate bash
  come shell, modificate /etc/profile aggiungendo le linee:



       MOZILLA_HOME="/usr/local/netscape"
       export MOZILLA_HOME




  Dopo aver installato il software, esso si aggiorner automaticamente
  con la "Smart Update". Basta lanciare Netscape come utente root e
  andare in help->software updates.  da qui, inoltre, che si installano
  gli altri componenti nel caso in cui abbiate la versione base.
  Nota: lo "Smart Update" non rimuove le vecchie versione di Netscape,
  che vanno eliminate manualmente cancellando il file binario di
  Netscape e il file delle classi Java (per la versione 3).




  6.  Installare dei server WWW

  Questa sezione contiene informazioni sui differenti server http e su
  strumenti addizionali quali linguaggi di scripting per programmazione
  CGI ecc. Esistono sul mercato dozzine di server web, ed io ho
  analizzato solo quelli pienamente funzionanti: dal momento che alcuni
  sono prodotti commerciali, non ho la possibilit di provarli. Una
  buona parte delle informazioni  stata trovata su svariati siti web e
  pertanto, in caso incontraste delle imperfezioni, fatemelo sapere.

  Per una descrizione tecnica del meccanismo http, date un'occhiata agli
  RFC menzionati nel capitolo "Approfondimenti" di questo HOWTO.

  Personalmente preferisco utilizzare il server Apache. Ha quasi tutte
  le caratteristiche di cui uno ha bisogno, e in pi  gratis. Devo
  ammettere che questa sezione  sbilanciata nei confronti di Apache, ma
   stata una mia scelta quella di concentrare i miei sforzi su questo
  server piuttosto che disperderli su tutti quanti.  probabile che mi
  occupi pi approfonditamente degli altri in futuro.






  6.1.  Panoramica


     Cern httpd
        Questo fu il primo web server in assoluto: sviluppato dal Centro
        Europeo di Ricerche Nucleari (CERN), non  comunque pi
        supportato.  Sono noti alcuni gravi bug di questo server, nonch
        la sua lentezza e la "fame" di risorse. L'ultima versione  la
        3.0, ma per maggiori informazioni  possibile rivolgersi alla
        home page del server http CERN presso
        <http://www.w3.org/Daemon/Status.html>.  Si pu scaricare presso
        <ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/httpd-3.0.term.tpz>
        (non si tratta di un errore di battitura: l'estensione 
        veramente .tpz, ma probabilmente dovrebbe essere .tgz)


     NCSA HTTPd
        Il NCSA HTTPd server  il padre di Apache (lo sviluppo si divise
        in due server differenti): a causa di ci, i file di setup sono
        molto simili. NCSA HTTPd  gratuito e il suo codice sorgente 
        disponibile per chiunque lo voglia. Non ho analizzato questo
        server nel documento, ma leggere la sezione su Apache pu
        sicuramente aiutare. Questo server era molto diffuso, ma adesso
         sempre pi spesso soppiantato da Apache, che lo sostituisce in
        maniera perfetta (ha gli stessi file di configurazione) e ne
        risolve numerosi problemi. (fonte Nov. 1997  Netcraft survey
        <http://www.netcraft.com/survey/>).  La versione piu recente 
        la 1.5.2a. Per maggiori informazioni, rivolgersi a
        <http://hoohoo.ncsa.uiuc.edu>.


     ``Apache''
        Apache  il re di tutti i web server, e in pi  distribuito in
        forma gratuita sia come binario che come codice sorgente. 
        molto modulare ed  pertanto molto semplice aggiungere
        caratteristiche e opzioni fra le tante disponibili:  inoltre
        molto diffuso, tanto che al momento attuale copre ben il 44% di
        tutti i domini web (50% se si contano anche i suoi derivati).
        Ci sono pi di 695.000 server Apache in funzione (fonte Novembre
        1997 Netcraft survey <http://www.netcraft.com/survey/>).

        La versione ufficiale di Apache non ha l'SSL, ma ci sono due
        derivati che risolvono il problema.

        Stronghold  un prodotto commerciale basato su Apache che costa
        $995 nella versione base e $495 in quella economica (basata su
        una vecchia versione di Apache).  Stronghold  il secondo server
        sicuro dopo Netscape (fonte C2 net
        <http://www.c2.net/products/stronghold> e Netcraft survey
        <http://www.netcraft.com/survey/>).  Per maggiori informazioni
        visitate il sito di Stronghold a
        <http://www.c2.net/products/stronghold/>.  stato sviluppato
        fuori dagli Stati Uniti e pertanto  disponibile in tutto il
        mondo nella versione a 128 bit.

        Apache-SSL  una implementazione gratuita di SSL ma non per un
        uso commerciale (RSA ha un brevetto americano sulla tecnologia
        SSL).  possibile utilizzarlo per scopi non commerciali negli
        Stati Uniti se ci si collega con la libreria RSAREF (gratuita).
        Per ulteriori informazioni <http://www.algroup.co.uk/Apache-
        SSL/>.


     Netscape Fast Track Server
        Fast Track  stato sviluppato da Netscape, ma la versione per
        Linux  distribuita da Caldera, sul cui sito web  possibile
        trovarlo come Fast Track per OpenLinux. Non so se funzioni solo
        su OpenLinux della Caldera o se giri su ogni distribuzione
        (scrivetemi se avete la risposta). I server Netscape contano per
        l'11,5% (percentuale in discesa) fra tutti i web server (fonte
        settembre 1997 <http://www.netcraft.com/survey/>).  Il server
        costa $295, ma  incluso nella distribuzione Caldera di
        OpenLinux, che costa $399 ($199.50 per le scuole).  La pagina
        web descrive una bella interfaccia da amministratore per un
        setup di soli 10 minuti. Il server supporta SSL a 40 bit, mentre
        per quello a 128 c'e bisogno del Netscape Enterprise Server:
        purtroppo, per, questo server non  ancora disponibile per
        Linux :( L'ultima versione di Fast Track  la 2.0 (la versione 3
         in fase beta, ma non  stata ancora portata su Linux). Per
        comprarne una copia, basta andare sul sito Caldera a
        <http://www.caldera.com/products/netscape/netscape.html> Per
        maggiori informazioni, la pagina di Fast Track 
        <http://www.netscape.com/comprod/server_central/product/fast_track/>


     WN WN ha molte caratteristiche che lo rendono interessante. Per
        prima cosa,  pi piccolo dei server CERN, NCSA HTTPd e Apache.
        Ha inoltre molte funzionalit senza le quali ci sarebbe bisogno
        di programmazione CGI, quali ad esempio ricerca sul sito,
        includes avanzati dal lato del server: offre inoltre la
        possibilit di scaricare solo una parte di file con la sua
        opzione "ranges".  rilasciato sotto la Licenza Pubblica GNU.
        Le versione corrente  la 1.18.3: per maggiori informazioni
        rivolgersi a <http://hopf.math.nwu.edu/>.


     AOLserver
        AOLserver  prodotto da America On Line. Devo ammettere di
        essere rimasto sorpreso dalle potenzialit di un server web
        scritto da AOL. Oltre alle caratteristiche standard, 
        supportata infatti la connettivit ai database: le pagine
        possono interrogare un database attraverso dei comandi SQL, e il
        database  accessibile attraverso la Open Database Connectivity
        (OBCD). Il server ha inoltre un motore di ricerca incorporato
        nonch il supporto per gli script TCL: se ci non fosse
        abbastanza,  possibile aggiungere i propri moduli attraverso le
        API per il C. Quasi dimenticavo il supporto per le SSL a 40 bit:
        e tutto questo  gratuito!.  Per maggiori informazioni, visitate
        il sito di AOLserver presso <http://www.aolserver.com/server/>


     Zeus Server
        Zeus Server  stato sviluppatod da Zeus Technology.  Affermano
        di aver prodotto il server pi veloce, almeno stando ai
        risultati del benchmark WebSpec96.  possibile inoltre
        controllare e configurare l'applicazione da qualsiasi browser,
        nonch limitare l'utilizzo del processore o della memoria da
        parte dei programmi CGI ed eseguirli in un contesto sicuro
        (qualunque cosa questo voglia dire...). Supporta infine un
        numero illimitato di server virtuali. Il prezzo per la versione
        standard  di $999, che diventano $1699 se si vuole l'SSL: la
        societ comunque ha sede fuori dagli Stati Uniti e dunque la
        versione a 128 bit  disponibile in ogni parte del mondo. Per
        informazioni, visitate <http://www.zeus.co.uk>.  Il sito
        americano  a <http://www.zeus.com>.  Vi devo avvisare che, pur
        essendo molto convinti delle loro prestazioni in termini di
        velocit, non sono elencati fra i primi dieci server nei
        Netcraft Surveys.


     CL-HTTP
        CL-HTTP significa Common Lisp Hypermedia Server. Se siete dei
        programmatori in Lisp, questo  il server che fa per voi, visto
        che potete scrivere i vostri CGI in questo linguaggio. Questo
        server funziona con un setup dal web e supporta tutte le
        funzionalit standard di un server.  CL-HTTP  gratuito e i
        sorgenti sono distribuiti pubblicamente. Il sito web 
        <http://www.ai.mit.edu/projects/iiip/doc/cl-http/home-page.html>
        (non si poteva fare un url un p pi lunga?)

  Se avete degli scopi commerciali (sito web aziendale, ISP) vi
  raccomando fortemente Apache. Se invece avete bisogno di un setup
  facile facile a discapito delle funzionalit pi avanzate, allora Zeus
  Server fa per voi: ho anche sentito dire che  facile configurare il
  server Netscape. Se le vostre esigenze sono per un uso prettamente
  "interno", allora potete godere di maggiore flessibilit. Comunque, a
  meno che voi siate alla ricerca di qualche cosa di specifico, vi
  suggerisco ancora di utilizzare uno dei tre che ho menzionato.

  Questa  solo una lista parziale di tutti i server disponibili. Per un
  elenco pi completo, visitate il sito Netcraft presso
  <http://www.netcraft.com/survey/servers.html> o Web Compare a
  <http://webcompare.internet.com>.





  7.  Apache

  La versione corrente di Apache  la 1.2.4. La versione 1.3  in fase
  beta.  Il sito principale di Apache  a  <http://www.apache.org/>.
  Un'altra buona fonte di informazioni  Apacheweek a
  <http://www.apacheweek.com/>.  La documentazione Apache  abbastanza
  buona, perci non mi addentrer nei dettagli della configurazione: i
  doc sono infatti sia sul sito web che inclusi con i sorgenti (in
  formato HTML: ci sono anche dei file di testo ma quelli in HTML sono
  meglio). Inoltre, la documentazione dovrebbe migliorare appena prende
  il via l'Apache Documentation Project. Fino ad oggi gran parte dei
  manuali sono scritti dagli sviluppatori: non per criticarli, ma
  obiettivamente i loro testi sono un p difficili da capire se non si
  padroneggia la terminologia.


  7.1.  Dove trovarlo

  Apache  incluso nelle distribuzioni Red Hat, Slackware e OpenLinux:
  sebbene non siano magari le ultime versioni, sono comunque degli
  eseguibili molto affidabili. L'aspetto negativo, per,  che non si
  pu cambiare la configurazione delle directory (che  totalmente
  diversa fra l'una e l'altra distribuzione nonch rispetto ai default
  Apache).

  I codici sono disponibili presso il sito web Apache
  <http://www.apache.org/dist/>.  I file binari si trovano nello stesso
  posto.  inoltre possibile scaricarli da SunSite a
  <ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/>.  Per chi ha Red
  Hat, l'RPM con i pi recenti eseguibili  di solito nella directory
  contrib a <ftp://ftp.redhat.com/pub/contrib/i386/>.

  Se il server sar utilizzato per scopi commerciali,  molto meglio se
  vi scaricate i sorgenti dal sito Apache e lo compilate voi stessi.
  L'altra possibilit consiste nell'utilizzare gli eseguibili che
  vengono distribuiti con Slackware, Red Hat o OpenLinux, ma questi
  possono causare dei problemi di sicurezza: un eseguibile sconosciuto
  pu avere delle backdoor per gli hacker, oppure una patch instabile
  potrebbe causare danni al sistema. Inoltre, scaricare i sorgenti vi d
  pi controllo sui moduli da compilare e sulle directory di default.
  Non  po cos difficile compilare Apache, e comunque sia non vi
  potete dire dei veri utilizzatori di Linux finch non compilerete da
  soli i vostri programmi ;)



  7.2.  Compilazione e installazione

  Per prima cosa bisogna fare un untar dell'archivio in una directory
  temporanea.  Poi, spostatevi nella directory src. Editate il file di
  configurazione per includere eventuali moduli speciali (la maggior
  parte dei pi comuni  comunque gi inclusa). Non c' alcun bisogno di
  modificare le regole o i parametri del makefile per Linux. Eseguite
  poi lo script di configurazione (./Configure). Assicuratevi che dica
  "Linux platform" e che sia settato gcc come compilatore.  possibile
  editare adesso il file httpd.h per cambiare le directory di default.
  La directory home del server - dove vengono cio mantenuti i file di
  configurazione -   settata (se non altrimenti specificato) a
  /usr/local/etc/httpd/, ma potreste volerla cambiare in un pi semplice
  /etc/httpd/.  La root del server (dove cio vengono conservate le
  pagine HTML)  per default /usr/local/etc/httpd/htdocs/, ma io
  preferisco la directory /home/httpd/html (che tra l'altro  il default
  di Red Hat).  Se avete intenzione di utilizzare su-exec (cfr. sotto,
  funzioni speciali) potrebbe essere utile cambiare anche quella
  directory. La root del server pu essere cambiata anche nei file di
  configurazione, ma  una buona idea compilarcelo dentro nell'evenienza
  in cui Apache non sia in grado di trovare o leggere il file di
  configurazione: tutto il resto dovrebbe essere modificato nei file di
  config. Infine, lanciate make per compilare Apache.

  Se avete problemi relativi alla mancanza di file include, assicuratevi
  delle seguenti cose: controllate di avere gli header del kernel (i
  file di include) installati per la vostra versione del kernel;
  assicuratevi inoltre di avere settati i seguenti link simbolici:
       /usr/include/linux link a /usr/src/linux/include/linux
       /usr/include/asm link a /usr/src/linux/include/asm
       /usr/src/linux link alla directory del sorgenti di Linux (es. linux-2.0.30)




  I links possono essere creati con ln -s, comando che funziona come cp
  con l'unica differenza che crea un link simbolico (ln -s directory-
  sorgente link-di-destinazione).

  Quando make ha finito, ci dovrebbe essere un eseguibile chiamato http
  nella directory. Questo file deve essere spostato in una directory
  binaria: /usr/sbin o /usr/local/sbin potrebbero essere delle buone
  scelte.

  Copiate poi le sub-directory di configurazione, di log e delle icone
  dai sorgenti alla directory home del server. Poi, bisogna rinominare 3
  file nella sub-directory conf per liberarsi dell'estensione -dist (es
  httpd.conf-dist diventa httpd.conf).

  Ci sono inoltre molti programmi di supporto inclusi con Apache. Si
  trovano nella directory support e devono essere copiati e installati
  separatamente. La maggior parte pu essere creata usando il makefile
  in quella directory (che viene creato quando si lancia lo script
  principale Configure). Nessuno di questi programmi  indispensabile
  per usare Apache, ma alcuni facilitano il compito dell'amministratore.


  7.3.  Configurazione

  Adesso dovreste avere quattro file nella sub-directory conf (sotto la
  directory home del server).  httpd.conf configura il demone del server
  (numero di porta, utente, ecc.). Il srm.conf imposta la struttura di
  base dei documenti, gli handler speciali, ecc. Il access.conf si
  occupa invece della configurazione di base per l'accesso.  Infine
  mime.types comunica al server quale tipo MIME inviare al browser a
  seconda delle diverse estensioni.

  I file di configurazione hanno comunque una documentazione interna
  molto buona (sono pieni di commenti), sempre che si capisca il gergo.
   consigliabile leggerli tutti almeno una volta prima di mettere su il
  server.  Ogni argomento sulla configurazione  coperto esaurientemente
  anche nella documentazione di Apache.

  Il file mime.types non  esattamente un file di configurazione. 
  infatti utilizzato dal server per tradurre le estensioni dei file in
  tipi MIME da inviare al browser e contiene gi la maggior parte dei
  pi comuni tipi di file cosicch poche persone hanno bisogno di
  modificarlo. Inoltre, col passare del tempo sempre nuovi tipi MIME
  saranno aggiunti e dunque la cosa migliore  scaricarsi un nuovo file
  (e magari anche una nuova versione del server).

  Ricordatevi sempre, quando cambiate i file di configurazione, di
  riavviare Apache o di inviargli il segnale SIGHUP con kill per fare in
  modo che le modifiche abbiano effetto. Assicuratevi comunque di
  mandare il segnale al processo padre e non ai figli: il padre ha di
  solito l'indicatore di processo pi basso, ricavabile anche dal file
  httpd.pid nella directory di log. Se accidentalmente vi capita di
  inviare il segnale ad un processo figlio, questo verr terminato e il
  processo padre lo riavvier automaticamente.

  Non percorrer qui tutti i passaggi nella configurazione di Apache: ho
  deciso invece di occuparmi di argomenti specifici, scelte da compiere
  e peculiarit del server.

  Raccomando comunque a tutti gli utenti di leggere i suggerimenti sulla
  sicurezza nella documentazione Apache, disponibile anche sul sito
  Apache a <http://www.apache.org/docs/mics/security_tips.html>.


  7.4.  Ospitare siti web virtuali

  Il Virtual Hosting si ha quando un solo computer ha pi di un dominio.
  Il vecchio metodo consisteva nell'assegnare ad ogni host virtuale un
  differente indirizzo IP: col nuovo metodo, invece, si usa un solo
  indirizzo IP ma bisogna utilizzare un browser che supporti l'HTTP 1.1.

  Il mio suggerimento per le applicazioni commerciali  di utilizzare
  ancora il vecchio metodo (pi indirizzi IP) finch la maggior parte
  delle persone disporranno di un browser compatibile con lo standard
  HTTP 1.1 (basta aspettare un annetto o due): in questo modo, inoltre,
  si avr una pi completa illusione di virtual hosting. Non bisogna
  dimenticare poi che, mentre tutti e due i metodi consentono la posta
  virtuale (qualcuno me lo pu confermare?), solo il virtual hosting
  basato su differenti indirizzi IP consente l'FTP virtuale.

  Se si tratta invece di un server per un club o per una pagina
  personale,  forse meglio considerare l'hosting basato sugli IP
  condivisi:  pi economico e si risparmia del prezioso spazio IP.

   poi possibile realizzare un mix di IP condiviso e non sullo stesso
  server: per informazioni, visitate Apacheweek a
  <http://www.apacheweek.com/features/vhost>.


  7.4.1.  Hosting basato sugli IP virtuali

  Con questo metodo ogni host virtuale ha il suo indirizzo IP:
  determinando l'indirizzo a cui  stata inviata la richiesta, Apache e
  gli altri programmi possono decidere quale dominio servire. Questo 
  comunque uno spreco incredibile di spazio. Prendete per esempio il
  server su cui si trova il mio dominio virtuale: ci sono circa 35.000
  account, e cio 35.000 indirizzi.  Eppure,  probabile che i server
  effettivamente funzionanti non siano nemmeno una cinquantina.

  Per installare e far funzionare questo metodo si procede in due fasi
  distinte: prima si dice a Linux di accedere a pi di un indirizzo IP e
  poi si setta Apache per servire gli host virtuali.

  Il primo passo per configurare Linux a supportare pi indirizzi IP 
  ricreare il kernel, operazione che funziona meglio con i kernel della
  serie 2.0 (o pi recenti):  necessario includere il networking IP
  nonch il supporto dell'aliasing IP. Per informazioni sulla
  compilazione del kernel, date un'occhiata al Kernel HowTo
  <http://sunsite.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>.

  La fase successiva  la configurazione di ogni interfaccia al boot: se
  state usando la distribuzione Red Hat potete farlo dal Control Panel
  avviando X-Windows come utente di root, cliccando sulla configurazione
  della rete nel pannello di controllo e specificando nella scheda delle
  interfacce la propria scheda di rete.  poi necessario cliccare su
  Alias (dovrebbe trovarsi al fondo dello schermo) e completare le
  informazioni: bisogna compiere queste informazioni per ogni host
  virtuale/indirizzo IP.

  Se utilizzate invece delle altre distribuzioni,  probabile che
  dobbiate farlo a mano. Potete semplicemente mettere i comandi nel file
  rc.local che si trova in /etc/rc.d (in realt dovrebbe essere tutto
  nelle cose collegate alla rete). Dovreste avere un comando ifconfig e
  route per ogni dispositivo. Viene cos assegnato un sub-dispositivo ad
  ogni indirizzo alias: per esempio eth0 avrebbe gli alias eth0:0,
  eth0:1 ecc. Ecco un esempio di tutta la faccenda:


       ifconfig eth0:0 192.168.1.57
       route add -host 192.168.1.57 dev eth0:0




   anche possibile aggiungere un indirizzo broadcast e una netmask al
  comando ifconfig: se avete un sacco di alias, si potrebbe creare un
  ciclo for per facilitare le cose. Leggete comunque l'IP alias mini
  howto <http://sunsite.unc.edu/LDP/HOWTO/mini/IP-Alias.html>.

  In seguito bisogna settare il domain name server (DNS) per coprire
  questi nuovi domini: se poi non avete ancora un dominio, allora vi
  dovete rivolgere alla Internic <http://www.internic.net> per
  registrarlo. Date comunque un'occhiata al DNS-HOWTO per creare il
  vostro DNS.

  Infine,  necessario configurare Apache per fargli gestire
  correttamente i domini virtuali: per far ci  necessario modificare
  il file httpd.conf verso la fine di cui viene comunque fornito un file
  di esempio. Tutti i comandi specifici per quell'host virtuale sono
  posti fra la tag di direttiva virtualhost, dove  possibile inserire
  quasi tutti i comandi. Di solito si setta una diversa directory radice
  per i documenti, una directory per gli script e per i file di log. Si
  possono aggiungere infiniti host virtuali semplicemente aggiungendo
  pi tag virtualhost.

  In rari casi potreste aver bisogno di lanciare server separati per
  specifici host: questo  necessario quando una direttiva  necessaria
  per un host virtuale ma non  fra quelle ammesse fra le tag per
  l'hosting virtuale.  In questo caso si deve utilizzare la direttiva
  bindaddress: ogni server avr un nome e dei file di configurazione
  diversi, ed ogni server risponder ad un indirizzo IP, specificato
  dalla direttiva bindaddress. Questo  comunque un incredibile spreco
  di risorse.


  7.4.2.  Hosting basato sugli indirizzi IP condivisi

  Si tratta di un nuovo metodo per l'hosting virtuale: viene utilizzato
  un solo indirizzo IP, riservandolo solo alle macchine reali (non a
  quelle virtuali). Nell'esempio precedente, dei 35.000 host virtuali
  solo 50 avrebbero un indirizzo IP (uno per ogni macchina).  Tutto ci
   possibile sfruttando le caratteristiche dell'HTTP 1.1:  il browser
  che dice al server quale sito vuole. I problemi sorgono con quei
  browser che non supportano l'HTTP 1.1, perch questi leggeranno la
  pagina principale del server, che pu comunque offrire una lista dei
  server virtuali a disposizione. Certo, questo rovina un po' l'intera
  illusione del hosting virtuale, e cio quella di avere un proprio
  server.

  Il settaggio  molto pi semplice che nell'hosting basato sui diversi
  indirizzi IP.  sempre necessario avere un proprio dominio dalla
  Internic nonch configurare il proprio DNS, e Apache  settato nella
  stessa maniera di prima. Dal momento per che si usa sempre lo stesso
  indirizzo IP nella tag virtualhost, il server si accorge
  automaticamente che si sta utilizzando l'hosting virtuale basato
  sull'IP condiviso.

  Ci sono molte soluzioni per i vecchi browser, e io adesso spiegher
  quella che secondo me  la migliore. Per prima cosa  necessario
  trasformare la pagina principale in host virtuale (condiviso o no): in
  questo modo si libera la main page cos da poterla utilizzare per una
  lista di link a tutti i virtual host presenti. Poi bisogna creare una
  backdoor per i vecchi browser utilizzando la direttiva ServerPath per
  ogni host virtuale all'interno della direttiva virtualhost. Per
  esempio, aggiungendo ServerPath /mysite/ a www.mysite.com i vecchi
  browser saranno in grado di accedere al sito attraverso
  www.mysite.com/mysite/. Infine si mette la pagina di default sul sito
  principale che dica gentilmente di scaricarsi un nuovo browser e che
  punti a tutte le backdoor per i siti ospitati sul server: quando un
  vecchio browser accede al sito, saranno automaticamente inviati alla
  pagina principale e riceveranno un menu con tutti i link disponibili.
  I nuovi browser, invece, non vedranno mai la pagina principale e
  andranno direttamente agli host virtuali. Bisogna ricordare per che
  si devono mantenere i link relativi al proprio sito web dal momento
  che le pagine saranno accessibili da due URL differenti
  (www.mysite.com e www.mysite.com/mysite/).

  Spero di non avervi confuso troppo, ma non  comunque una soluzione
  facile.  Magari potreste considerare l'hosting virtuale basato sugli
  indirizzi IP.  Comunque un trucchetto molto simile  spiegato sul sito
  Apache a <http://www.apache.org/manual/host.html>.

  Se mai qualcuno avesse una interessante fonte di informazioni per
  l'hosting basato sugli IP condivisi, mi farbbe piacere saperlo.
  Sarebbe anche simpatico sapere quanti e quali browser supportano
  l'HTTP 1.1.


  7.5.  Script CGI

  Ci sono due metodi diversi per consentire ai propri utenti di
  utilizzare script CGI: la prima  di considerare tutto ci che finisce
  con .cgi uno script CGI, la seconda  quella di creare una directory
  per gli script (generalmente cgi-bin). Si possono anche utilizzare
  entrambi i metodi: in tutti e due i casi, comunque, gli script devono
  poter essere eseguiti da tutti (chmod 711). Nel concedere accesso agli
  script si apre una grande falla nella sicurezza: state bene attenti,
  drizzate le orecchie e cercate di minimizzare i rischi.

  Personalmente preferisco il primo metodo, specialmente quando gli
  script sono complessi: questo metodo consente infatti di mettere gli
  script in ogni directory, e a me piace metterli dove risiedono anche
  le pagine web che li utilizzano. Per i siti con un sacco di script, 
  molto pi elegante che avere una directory piena zeppa di script.
  Questo metodo  poi molto facile da settare: per prima cosa, bisogna
  togliere il commento all'handler .cgi alla fine del file srm.conf.
  Assicuratevi poi che tutte le vostre directory abbiano l'opzione
  option ExecCGI oppure All nel file access.conf, e il gioco  fatto.

  Creare una directory apposita per gli script  per considerato pi
  sicuro. Per farlo bisogna utilizzare la direttiva ScriptAlias nel file
  srm.conf, in cui il primo argomento  l'Alias ed il secondo la
  directory che sar utilizzata quando qualcuno chieder della directory
  /cgi-bin/: per esempio ScriptAlias /cgi-bin/ /usr/httpd/cgi-bin/
  abilita la directory /usr/httpd/cgi-bin ad eseguire degli script.  Per
  motivi di sicurezza sarebbe poi meglio cambiare anche le propriet
  delle directory togliendo i commenti alle linee Options none,
  AllowOveride none nel file access.conf fornito come esempio. Inoltre,
  non bisogna creare le directory per gli script come sub-directory
  delle cartelle che contengono la pagina web: per esempio, se la
  directory con le pagine  /home/httpd/html/, non mettete gli script in
  /home/httpd/html/cgi-bin, bens in /home/httpd/cgi-bin.

  Se volete consentire ai vostri utenti di avere le loro directory di
  script, potete usare pi comandi ScriptAlias, che dovrebbero essere
  all'interno della direttiva virtualhost per ogni host virtuale. Se c'
  qualcuno che conosce un metodo pi semplice per permettere a tutti gli
  utenti di avere una propria directory di script senza ricorrere ogni
  volta al comando ScriptAlias me lo faccia sapere.



  7.6.  Directory Web degli Utenti

  Ci sono due metodi diversi per trattare le directory web degli utenti.
  Si pu avere una sub-directory nella directory degli utenti (che di
  solito  public_html), oppure una directory specifica per le directory
  web.  Con entrambi i metodi bisogna assicurarsi comunque che queste
  directory siano settate in lettura e scrittura nel file access.conf.

  Il primo metodo  quello di default di Apache: quando arriva una
  richiesta per /~bob/, il server va a cercare la directory public_html
  nella cartella di bob.  possibile cambiare la directory con la
  direttiva UserDir nel file srm.conf:  comunque necessaria settarla in
  lettura ed esecuzione per tutti. Come si pu vedere, questo metodo
  crea un potenziale rischio di sicurezza perch Apache pu accedere
  alla directory solo se la directory home degli utenti  eseguibile per
  tutti.

  Il secondo metodo  molto facile da settare: bisogna cambiare la
  direttiva UserDir nel file srm.conf. Questa direttiva pu assumere
  svariati formati e quindi  una buona idea dare un'occhiata alla
  documentazione Apache per chiarimenti.  Comunque, se volete che ogni
  utente abbia la propria directory in /home/httpd/, dovete usare
  UserDir /home/httpd.  In questo caso, quando viene richiesta /~bob/,
  viene tradotta in /home/httpd/bob/. Se poi volete una sub-directory
  nella cartella di bob, allora dovrete usare UserDir
  /home/httpd/*/html: questo infatti porta il server a tradurre in
  /home/httpd/bob/html/ e vi consente anche di avere una directory per
  gli script (ad esempio /home/httpd/bob/cgi-bin/).


  7.7.  Daemon mode vs. Inetd mode

  Apache pu essere eseguito in due modalit: come demone ("daemon")
  sempre in funzione (modalit che Apache chiama 'standalone') oppure
  lanciato dal super server inetd.

  La modalit daemon  di gran lunga migliore rispetto a quella con
  inetd, ed  anche la modalit predefinita. L'unico caso in cui si
  potrebbe voler utilizzare quest'ultimo modo  in presenza di
  applicazioni poco frequenti: il test interno di alcuni script,
  l'Intranet di una piccola azienda.  Il modo Inetd salva infatti
  memoria perch il server  caricato solo quando effettivamente
  richiesto, e solo il demone inetd risiede permanentemente in memoria.

  Se non utilizzate Apache molto spesso, potreste utilizzarlo nella
  modalit daemon e lanciarlo solo quando vi serve, per poi ucciderlo
  una volta finito (assicuratevi di terminare il processo padre, e non
  uno dei figli).

  Per impostare la modalit inetd  necessario modificare un po' di
  file.  Per prima cosa, in /etc/services vedete se http  gi presente:
  se non lo , aggiungetelo:


       http    80/tcp




  Il posto migliore  dopo 79 (finger). Poi dovete modificare il file
  /etc/inetd.conf e aggiungerci le linee per Apache
       http    stream  tcp     nowait  root    /usr/sbin/httpd httpd




  Assicuratevi di cambiare il path se avete Apache in un altro posto: il
  secondo httpd non  un errore, dal momento che il demone inet lo
  richiede. Se non utilizzate questo demone, potreste voler togliere i
  commenti al resto delle linee nel file cos da evitare l'attivazione
  di altri servizi (FTP, finger, telnet e molte altre cose che di solito
  funzionano con questo demone).

  Se gi avete in esecuzione il demone inet (inetd), allora dovete solo
  inviargli il segnale SIGHUP (con kill; consultate la documentazione su
  kill per informazioni) o riavviare il computer perch le modifiche
  abbiano effetto: se invece non  gi in esecuzione, dovete avviare il
  demone manualmente o metterlo nei file di inizializzazione cos da
  caricarlo all'avvio (la scelta migliore  il file rc.local).


  7.8.  Autorizzare i comandi put e delete

  I nuovi strumenti di authoring HTML supportano un nuovo metodo per
  inviare le pagine web al server utilizzando l'http invece dell'FTP:
  alcuni di questi prodotti nemmeno lo supportano pi l'FTP. Apache  in
  grado di supportare questo metodo, ma manca lo script per gestire la
  richiesta: tale script, per, potrebbe aprire un serio buco nella
  sicurezza e perci riflettete bene prima di scriverne o installarne
  uno.

  Se qualcuno  a conoscenza di uno script che funzioni bene me lo dica,
  e lo aggiunger qui.

  Per informazioni, consultate Apacheweek
  <http://www.apacheweek.com/features/put>.


  7.9.  Autenticazione dell'utente/Controllo d'accesso

  Questa  una delle caratteristiche che preferisco: consente infatti di
  proteggere una directory o un file senza dover usare degli script CGI
  nonch consentire o negare l'accesso in base all'indirizzo IP o al
  dominio del client. Si tratta di un grande servizio per tenere lontani
  rompiscatole dalla message board o dal guest book (si ricava il loro
  indirizzo IP o il dominio dai file di log).

  Per attivare l'autenticazione dell'utente la directory deve avere
  AllowOverrides AuthConfig settato nel file access.conf.  Per
  consentire poi il controllo d'accesso (tramite dominio o indirizzo IP)
  bisogna poi impostare nella directory anche AllowOverrides Limit.

  Per configurare la directory  necessario mettervi un file .htaccess
  Per l'autenticazione dell'utente si usa invece di solito un file
  .htpasswd oppure .htgroup: questi file possono essere condivisi tra
  vari file .htaccess.

  Per ragioni di sicurezza raccomando vivamente a tutti di utilizzare le
  seguenti direttive nel file access.conf:



       <files ~ "/\.ht">
       order deny,allow
       deny from all
       </files>

  Se non siete ammnistratori del sistema, potete anche mettere nel
  vostro file .htaccess se AllowOverride Limit  impostato per la vostra
  directory. Questa direttiva impedir agli altri di andare a curiosare
  dentro i vostri file per il controllo dell'accesso (.htaccess,
  .htpasswd, etc).

  Ci sono svariate opzioni e tipi di file che possono essere utilizzati
  col controllo dell'accesso: non  quindi negli scopi di questo
  documento descriverli. Per informazioni su come impostare la User
  Authentication date un'occhiata ad Apacheweek a
  <http://www.apacheweek.com/features/userauth> o le pagine NCSA a
  <http://hoohoo.ncsa.uiuc.edu/docs-1.5/tutorials/user.html>.


  7.10.  su-exec

  La funzione su-exec esegue degli script CGI come se l'esecutore ne
  fosse anche il proprietario: normalmente viene eseguito come l'utente
  del web server (di solito 'nobody'). In questa maniera si consente
  agli utenti di accedere ai propri script CGI senza doverli rendere
  leggibili a tutti (cosa che sarebbe un rischio per la sicurezza). Se
  non si sta attenti,  per possibile aprire un buco pi grande di
  quello che si vorrebbe coprire dal momento che su-exec esegue dei
  controlli prima di eseguire gli script, ma se questi controlli non
  sono impostati bene sono problemi.

  Utilizzare su-exec non  un mestiere per principianti: se non sapete
  quello che state facendo, lasciate perdere. Potreste finire per
  consentire ai vostri utenti di acquisire accesso di root al vostro
  sistema, e non  quindi conveniente scherzarci. La codifica ed
  l'impostazione su-exec  difficile apposta, cos che i principianti se
  ne tengano alla larga (tutto deve essere fatto a mano, niente file di
  make, niente script di installazione).

  Il codice per su-exec si trova nella directory support dei sorgenti.
  Dapprima bisogna modificare il file suexec.h per il proprio sistema:
  poi bisogna compilare il codice per su-exec con il comando


       gcc suexec.c -o suexec




  In seguito si deve copiare l'eseguibile su-exec nella directory
  giusta, che Apache preimposta a /usr/local/etc/httpd/sbin/, ma che pu
  comunque essere cambiata modificando httpd.h nella directory dei sor
  genti e ricompilando Apache. Ricordatevi che Apache guarder solo in
  questa directory, e non nel path.  poi necessario cambiare il propri
  etario del file e settarlo a root (chown root suexec) e settare il bit
  suid (chmod 4711 suexec).  Infine, riavviate Apache e dovrebbe
  apparire sullo schermo che si sta utilizzando su-exec.

  Gli script CGI dovrebbero essere in lettura per tutti come sempre:
  saranno eseguiti automaticamente da ogni utente come il proprietario
  del file. Se settate il bit SUID (set user id) sul CGI questo non
  verr eseguito, cos come non vengono eseguiti gli script posseduti
  dagli utenti di sistema (root, bin, ecc.). Per ulteriori informazioni
  sulle condizioni di sicurezza che devono essere rispettate,
  controllate la documentazione di su-exec: se poi avete problemi potete
  anche spulciare il file di log, che si chiama cgi.log.

  Su-exec non funziona se lanciate Apache da inetd: questo problema sar
  risolto nelle prossime versioni dal momento che non ci sar pi un
  modo inetd. Se vi piace giocare col codice sorgente, potreste voler
  modificare il file http_main.c per liberarvi delle linee in cui Apache
  annuncia che sta utilizzando su-exec (lo stampa erroneamente prima di
  qualsiasi output).

  Assicuratevi infine di leggere la documentazione Apache riguardante
  su-exec:  inclusa con i sorgenti ed  anche disponibile sul sito di
  Apache a <http://www.apache.org/docs/suexec.html>


  7.11.  Imagemap

  Apache  in grado di gestire le imagemap dal lato del server: si
  tratta di immagini su una pagina web che portano l'utente in diverse
  locazioni a seconda del punto su cui si clicca. Per abilitarle  per
  prima cosa necessario assicurarsi che il modulo per le imagemap sia
  installato ( uno dei moduli di default). Poi, togliete i commenti
  all'handler .map alla fine del file srm.conf: cos facendo, tutti i
  file con estensione .map saranno dei file per le imagemap, dove cio
  vengono settati i diversi link a seconda del punto in cui si clicca.
  Apache utilizza i file di mappa seguento lo standard NCSA, di cui vi
  presento un esempio:


       <a href="/map/mapfile.map">
       <img src="picture.gif" ISMAP>
       </a>




  In questo esempio mapfile.map  il mapfile mentre picture.gif 
  l'immagine su cui cliccare.

  Esistono molti programmi che possono generare dei mapfile compatibili
  con lo standard NCSA, ma  anche possibile crearseli da soli. Per una
  discussione pi approfondita sull'argomento, andate a
  <http://www.apacheweek.com/features/imagemaps>.


  7.12.  SSI/XSSI

  Il Server Side Includes (SSI) aggiunge contenuti dinamici - inseriti
  nella pagina - a documenti web altrimenti statici e non interattivi:
  il server, infatti, processa gli SSI e passa i risultati alla pagina.
  In questo modo, si possono aggiungere intestazioni e note di chiusura,
  la data di ultima modifica, eseguire comandi di sistema o degli script
  CGI. Con i nuovi eXtended Server Side Includes (XSSI) si pu fare
  ancora di pi, aggiungendo condizioni di controllo (if...else): 
  quasi come avere un linguaggio di programmazione.

  Processare tutti i file HTML per cercare comandi SSI sarebbe una
  perdita di tempo ed uno spreco di risorse: pertanto,  necessario
  distinguere le pagine che contengono HTML normale da quelle con i
  comandi SSI. Generalmente si ricorre per questi file a delle
  estensioni diverse: la pi usata  .shtml.

  Per abilitare SSI/XSSI assicuratevi per prima cosa che il modulo per
  gli include sia installato: poi, modificate srm.conf e togliete i
  commenti alle direttive AddType e AddHandler per i file .shtml. Infine
  dovete settare Options Includes per tutte le directory dove volete
  eseguire file SSI/XSSI modificando il file access.conf. Fatto ci,
  tutti i file con l'estensione .shtml saranno processati per
  controllare se contengono comandi SSI/XSSI.

  Un altro modo per abilitare le includes  quello di usare la direttiva
  XBitHack: se abilitata, controlla che il file sia eseguibile
  dall'utente generico e se per quella directory  settata Options
  Includes: nel caso in cui si verifichino entrambe le condizioni,
  allora il file viene trattato come SSI. Questo procedimento funziona
  solo per file con il tipo MIME text/html .html .htm): comunque, non 
  consigliabile usare questo metodo.

  Esiste poi un rischio di sicurezza nell'assicurare a file SSI di
  eseguire comandi di sistema e script CGI:  pertanto possibile
  bloccare questa funzione con la direttiva Option IncludesNOEXEC invece
  che Option Includes nel file access.conf. Tutti gli altri comandi SSI
  continueranno a funzionare.

  Per maggiori informazioni, leggete la documentazione Apache su
  mod_includes, distribuita con i sorgenti e disponibile a
  <http://www.apache.org/docs/mod/mod_include.html>.

  Per una discussione pi dettagliata su SSI/XSSI, andate su Apacheweek
  a <http://www.apacheweek.com/features/ssi>.

  Informazioni sui comandi SSI si trovano anche alla NCSA a
  <http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html>.

  Mentre per l'XSSI date un'occhiata a
  <ftp://pageplus.com/pub/hsf/xssi/xssi-1.1.html>.


  7.13.  Sistema modulare

  Apache pu essere ampliato per supportare quasi tutto attraverso i
  moduli, di cui ne esiste gi un vasto numero in giro per il web. Solo
  i moduli di interesse pi generale sono Distribuiti con Apache, ma
  link a tutti i moduli esistenti si possono trovare all'Apache Module
  Registry a <http://www.zyzzyva.com/module_registry/>.

  Per informazioni su come scrivere il proprio modulo andate a
  <http://www.zyzzyva.com/module_registry/reference/>






  8.  Web Server Add-ons

  Ops, questa parte non l'ho ancora scritta...

  Prossimamente: mSQL, PHP/FI, cgiwrap, Fast-cgi, estensioni MS
  frontpage, e altro ancora.





  9.  FAQ


  A dire il vero non ci sono state domande frequenti - per adesso...




  10.  Letture consigliate





  10.1.  Libri della O'Reilly & Associates

  Secondo me O'Reilly & Associates  la migliore casa per libri tecnici
  del pianeta. Si concentrano principalmente su Internet, Unix e
  programmazione e cominciano sempre con un bel po' di esempi fino a
  giungere ad argomenti molto avanzati: se si legge solo met del libro
  si raggiunge gi una conoscenza di tutto rispetto. In pi, riescono ad
  aggiungere un po' di humor ad argomenti altrimenti un po' pallosi.

  Hanno degli ottimi libri su HTML, PERL, Programmazione CGI, Java,
  Javascript, C/C++, Sendmail, Linux e tanto altro. Gli argomenti pi
  "caldi" vengono aggiornati circa ogni 6 mesi e cos  altamente
  consigliato visitare il loro sito web O'Reilly & Associates
  <http://www.ora.com/> o recarsi nel pi vicino negozio di libri.

  State attenti alle imitazioni: se non ha O'Reilly & Associates sulla
  copertina, probabilmente  stato scritto da qualcun'altro!


  10.2.  Internet Request For Comments (RFC)


    RFC1866 scritta da T. Berners-Lee e D. Connolly, "Hypertext Markup
     Language - 2.0", 11/03/1995

    RFC1867 scritta da E. Nebel e L. Masinter, "Form-based File Upload
     in HTML", 11/07/1995

    RFC1942 scritta da D. Raggett, "HTML Tables", 05/15/1996

    RFC1945 di T. Berners-Lee, R. Fielding, H. Nielsen, "Hypertext
     Transfer Protocol -- HTTP/1.0", 05/17/1996.

    RFC1630 di T. Berners-Lee, "Universal Resource Identifiers in WWW:
     A Unifying Syntax for the Expression of Names and Addresses of
     Objects on the Network as used in the World-Wide Web", 06/09/1994

    RFC1959 di T. Howes, M. Smith, "An LDAP URL Format", 06/19/1996




























  Server Web basati su mSQL e perl mini HOWTO
  Oliver Corff, corff@zedat.fu-berlin.de
  v0.1, 17 settembre 1997

  Questo Mini HOWTO, fortemente ispirato dall'articolo di Michael
  Schilli Gebunkert: Datenbankbedienung mit Perl und CGI, pubblicato nel
  computer magazine tedesco iX nell'agosto 1997, descrive come costruire
  un database client/server SQL utilizzando WWW e HTML per l'interfaccia
  utente.  Documentazione tradotta da Gianmario Parisi, gian
  mario.parisi@libero.it.

  1.  Scopi di questo documento


  1.1.  Destinatari

  Chiunque voglia installare un server database per il web ma non sa
  quale software  necessario e come installarlo dovrebbe trarre
  beneficio dalla lettura di questo testo. Questo testo fornisce tutte
  le informazioni necessarie per ottenere un database SQL per web server
  funzionante; esso non riguarda alcun dettaglio della programmazione
  CGI, n spiega il linguaggio SQL. Sono disponibili dei libri
  eccellenti su entrambi gli argomenti, ed  intenzione di questo testo
  fornire una piattaforma funzionante sulla quale un utente pu in
  seguito studiare la programmazione CGI e SQL.

  Per ottenere una piccolo sistema SQL funzionante (non l'esempio del
  sistema di prenotazione di una grande compagnia aerea, o il database
  per la gestione di una missione spaziale) sar sufficiente disporre
  del software descritto in questo testo e la documentazione che lo
  accompagna. Il manuale utente di msql (un database introdotto nel
  testo) fornisce sufficienti informazioni su SQL per costruire il
  proprio database.

  Il lettore di questo testo dovrebbe avere una buona conoscenza su come
  ottenere file via ftp se non ha accesso ai CD-ROM, ed una comprensione
  di base di come ottenere file binari eseguibili partendo dai sorgenti.
  In ogni modo, tutti i passi spiegati nel testo sono stati provati su
  sistemi reali e dovrebbero funzionare sul sistema del lettore.


  1.2.  Convenzioni usate nel testo


  Un comando utente:

  # make install



  Uscita a video d un programma:


       Programma installato. Leggere README per particolari su come iniziare.




  Codice d'esempio:

  ______________________________________________________________________
  # Mio commento
  char letter;
  ______________________________________________________________________


  2.  Introduzione

  Si pu assumere con sicurezza che database con grandi volumi di dati o
  una complessa struttura relazionale (come, probabilmente, un database
  lessicale per linguaggio naturale) deve essere accessibile a molti
  utenti ed operatori simultaneamente. Idealmente, dovrebbe essere
  possibile usare differenti piattaforme hardware e software esistenti
  che possono essere combinate nel sistema. Allo scopo di ridurre i
  costi di implementazione, solo un sistema, il database server, deve
  essere potente. Le stazioni utente devono tipicamente mostrare i dati
  e accettare i comandi, ma l'elaborazione  eseguita su una sola
  macchina, cosa che porta al nome di database client-server. Inoltre,
  l'interfaccia utente dovrebbe essere facile da mantenere e dovrebbe
  richiedere il meno possibile sul lato client.

  Un sistema che soddisfa questi criteri pu essere costruito attorno
  agli elementi seguenti tra protocolli, concetti e software:

     Linux
        fornisce il sistema operativo.  una implementazione stabile di
        Unix che fornisce autentici servizi multi-utente e multi-tasking
        con pieno supporto di rete (TCP/IP e. a.).  Eccetto i costi
        effettivi dei supporti e di spedizione,  disponibile
        gratuitamente in forma di cosiddette distribuzioni che di solito
        includono tutto il necessario dal SO base all'elaborazione
        testi, scripting, sviluppo software, generatori di interfacce,
        ecc.

     HTML
         l'Hypertext Markup Language usato per costruire interfacce
        verso sistemi di rete quale le Intranet ed il World Wide Web.
        HTML  molto semplice  pu essere prodotto con un editor di
        testo ASCII.

     Browser
        sono applicazioni con interfaccia testuale (per es. Lynx) o
        grafica (per es. Mosaic, Netscape, Arena ecc.) che accettano,
        valutano e mostrano documenti HTML.  Sono le uniche parti di
        software utilizzate direttamente dall'utente del database.
        Utilizzando i browser,  possibile mostrare vari tipi di dati
        (testo, immagini) e comunicare con server http (vedi nel
        seguito) su ogni modello di computer per cui sia disponibile un
        browser.

     server http
        forniscono l'accesso all'area di un computer host dove sono
        immagazzinati i dati destinati ad uso pubblico su una rete.
        Essi "comprendono" il protocollo http e procurano le
        informazioni richieste dall'utente.

     SQL
        lo Structured Query Language (linguaggio strutturato per
        interrogazioni)  un linguaggio per manipolare dati in database
        relazionali.  Ha una grammatica molto semplice e costituisce uno
        standard ampiamente supportato. Database basati su SQL sono
        diventati il nucleo del classico concetto di database
        client/server. Ci sono molti famosi sistemi SQL disponibili,
        come Oracle, Informix, ecc., e poi c' anche msql disponibile a
        costo molto basso o nullo se usato in ambienti accademici e di
        istruzione.

     CGI
        la Common Gateway Interface  l'interfaccia di programmazione
        tra il sistema che mantiene i dati (nel nostro caso un sistema
        basato su SQL) ed il protocollo di rete (HTML, naturalmente).  I
        CGI possono essere costruiti attraverso molti linguaggi di
        programmazione, ma un linguaggio particolarmente popolare  il
        perl.

     perl
         un linguaggio di scripting estremamente potente che combina
        tutti i meriti del C, di diversi linguaggi shell e dei linguaggi
        per manipolazione di file come awk e sed. Perl ha moltissime
        interfacce modularizzate e pu essere usato, ad esempio, per
        controllare database SQL.


  3.  Procedura di Installazione



  3.1.  Requisiti Hardware

  Non possono essere fatte affermazioni generali riguardo i requisiti
  hardware di un server database. Troppi fattori dipendono dal numero di
  utenti, dal tipo di applicazione, dal carico di rete ecc. In piccoli
  ambienti con pochi utenti e scarso traffico di rete una macchina
  i486-equivalente con 16 Mb di RAM pu essere completamente
  sufficiente.  Linux, il sistema operativo,  molto efficiente in
  termini di risorse, e pu fornire abbastanza potenza per eseguire
  un'ampia variet di applicazioni allo stesso tempo. Naturalmente,
  processori pi veloci e pi RAM significano pi velocit, ma molto pi
  importante del processore  l'ammontare di RAM. Pi RAM ha il sistema,
  meno esso  costretto ad eseguire swap di processi su disco nel caso
  la memoria diventi un collo di bottiglia.

  Disponendo di 32 MB di RAM ed un bus PCI, operazioni di ricerca e
  ordinamento possono essere eseguite senza ricorso a file di swap ecc.,
  ottenendo prestazioni velocissime.

  Il modello di installazione descritto in questo articolo  stato
  realizzato su un IBM 686 (133 MHz) con 32 MB di RAM ed un hard disk
  IDE da 1.2 GB.  Assumendo che il processo di installazione parta da
  zero, viene fornita una lista dei passi necessari.


  3.2.  Requisiti Software


  Il software descritto in questo articolo  disponibile su Internet o
  su CD-ROM. Sono stati usati i seguenti prodotti:

    Red Hat Linux PowerTools: Red Hat 4.2 - 6 CD Complete Easy-to-Use
     estate '97; in alternativa http://www.redhat.com;

    msql SQL database server:  ora disponibile in due versioni. Le
     versioni differiscono nel numero di transazioni che possono
     gestire, nell'interfaccia di amministrazione, ecc. La versione pi
     vecchia, 1.0.16,  disponibile dai mirror di Sunsite. Gli
     eseguibili ELF possono essere trovati a
     sunsite:apps/database/sql/msql-1.0.16 o su CD-ROM (disco 4 di
     InfoMagic Linux Developer's Resource, 6-CD, Dicembre 1996) o
     alternativamente dalla seguente URL: http://www.infomagic.com.

     La versione pi nuova, 2.0.1, pu essere direttamente ottenuta dal
     homepage della Hughes in Australia (http://www.hughes.com.au) o da
     numerosi mirror sparsi per il mondo;

    perl da CPAN: Il  Comprehensive Perl Archive Network.  Walnut Creek
     CDROM, ISBN 1-57176-077-6, Maggio 1997;


    programmi d'esempio CGI di Michael Schilli's dalla rivista tedesca
     iX 8/1997, pagine 150--152, disponibile via ftp da ftp.uni-
     paderborn.de:/doc/magazin/iX;


  3.3.  Installazione del sistema operativo

  Linux  installato nella forma della distribuzione Red Hat 4.2. Allo
  scopo di installare con successo, la macchina deve avere un drive CD-
  ROM accessibile da DOS, un drive CD-ROM avviabile (bootable),
  altrimenti dev'essere preparato un disco di boot seguendo le
  istruzioni sul CD di Linux.

  Durante l'installazione l'utente pu selezionare e configurare
  numerosi pacchetti software.  conveniente selezionare i seguenti
  elementi:


    supporto di rete TCP/IP,

    il server http Apache,

    il linguaggio di scripting perl

    il sistema X Window

    i browser Arena (grafico) e Lynx (testuale).

  Tutti questi pacchetti sono forniti con la distribuzione Linux.  Se
  questi pacchetti non vengono installati ora, si avr la possibilit di
  farlo in seguito con l'assistenza di glint, il gestore per
  l'installazione software con interfaccia grafica ed intuitiva.
  Assicurarsi di operare come utente root durante l'installazione dei
  pacchetti software.

  Va oltre gli scopi di questo articolo descrivere la procedura di
  installazione ed inizializzazione della rete. Consultare la
  documentazione in linea (manpage, HTML, texinfo) e stampata (Linux
  Bible, ecc. ecc.).

  La procedura di installazione di Red Hat  matura e richiede poche
  attenzioni da parte dell'utente oltre alle scelte usuali (come fornire
  il nome host ecc.).  Una volta terminata con successo l'installazione,
  il sistema  sostanzialmente pronto per l'esecuzione.

  Installare il sistema X Window non  obbligatorio per un server puro,
  ma ci rende l'accesso al sistema ed il test molto pi semplice. La
  procedura di installazione di X  eseguita con uno qualsiasi tra
  diversi programmi; XF86Setup offre la pi estesa procedura guidata e
  necessita del minor numero di operazioni manuali per la gestione di
  fastidiosi dettagli (come programmazione del clock video, ecc.).
  L'unico requisito  che il software possa rilevare l'adattatore video.
  Un adattatore video accelerato economico (come schede basate su Trio
  S64 precedenti a S64UV+) di solito funziona ``al volo''.

  A questo punto assumiamo che il nostro sistema sia attivo ed in
  esecuzione e che Apache, Perl e X Window siano stati installati con
  successo.  Si assumer inoltre che tutte le strutture standard come
  come file e directory siano mantenute come definito
  nell'installazione. Ultimo, ma non meno importante, lasceremo
  l'hostname cos com', e accettiamo in questo momento il nome
  localhost. Useremo questo nome per testare l'installazione.  Una volta
  che l'intero sistema funziona pu essere aggiunto il vero nome.
  Notare che il setup della rete richiede anche di editare il file
  /etc/hosts, tra gli altri. Idealmente questo dovrebbe essere fatto con
  gli strumenti di amministrazione forniti all'utente root.
  3.4.  Il server http


  Il server http fornito con Linux  conosciuto come Apache dagli umani
  e come httpd dal sistema. La manpage (man httpd) spiega come
  installare ed avviare il demone http (quindi httpd) ma, come detto, se
  l'installazione  avvenuta senza problemi, il server dovrebbe essere
  in esecuzione.  Si pu verificare l'albero delle directory: deve
  esserci una directory /home/httpd/ con tre sottodirectory: ../cgi-
  bin/, ../html/ e ../icons/. In ../html/ deve esserci un file
  index.html. In seguito modificheremo o sostituiremo questo file con
  l'index.html effettivo definito da noi. Tutte le informazioni di
  configurazione sono registrate in /etc/httpd/conf/. Il sistema  ben
  preconfigurato e non richiede un ulteriore setup se l'installazione
  non ha subito errori.


  3.5.  I Browser

  Ci sono essenzialmente tre tipi di browser disponibili per Linux:
  sistemi puramente testuali come Lynx, semplici e sperimentali come
  Arena (gratis!) e commerciali come Netscape (Shareware!) con supporto
  Java.  Mentre Lynx e Arena sono forniti con Linux, Netscape deve
  essere recuperato da altre fonti. Netscape  disponibile in forma
  binaria precompilata per Linux su architetture ix86 e potr essere
  eseguito ``al volo'' appena estratto dall'archivio.


  3.5.1.  Configurazione di Lynx


  Una volta avviato, Lynx cercher una URL predefinita solitamente non
  molto significativa se il sistema non ha un accesso permanente ad
  Internet.  Per cambiare la URL predefinita (e molti altri dettagli di
  configurazione) l'amministratore di sistema dovrebbe editare
  /usr/lib/lynx.cfg.  Il file  grande, circa 57000 byte e contiene
  informazioni a volte contraddittorie. Esso dichiara la propria home
  come /usr/local/lib/.  Non lontano dall'inizio del file c' una linea
  che comincia con STARTFILE.  Rimpiazzare questa linea con la voce
  seguente: STARTFILE:http://localhost assicurandosi che non siano
  inseriti spazi ecc. :

  ______________________________________________________________________
  # STARTFILE:http://www.nyu.edu/pages/wsn/subir/lynx.html
  STARTFILE:http://localhost
  ______________________________________________________________________


  Dopo aver salvato il file, Lynx dovrebbe mostrare il nostro documento
  index.html se avviato senza argomenti.


  3.5.2.  Configurazione del browser Arena


  Arena dapprima cerca la propria URL predefinita quando lanciato senza
  argomenti. Questa  codificata nell'eseguibile ma pu essere
  sovrascritta tramite la variabile d'ambiente WWW_HOME.
  L'amministratore di sistema pu inserire la linea
  WWW_HOME="http://localhost" in /etc/profile. La variabile deve essere
  esportata, o tramite una istruzione separate (export WWW_HOME) o
  appendendo WWW_HOME all'istruzione export esistente:




  ______________________________________________________________________
  WWW_HOME="http://localhost"
  export WWW_HOME
  ______________________________________________________________________


  Al successivo login, la nuova URL predefinita sar nota ad Arena a
  livello di sistema.


  3.5.3.  Installazione e configurazione di Netscape


  Netscape  un prodotto commerciale e quindi non incluso nelle
  distribuzioni Linux.  scaricabile da Internet o disponibile in
  collezioni software su CD-ROM. Netscape giunge in forma binaria
  precompilata per ogni importante piattaforma hardware. Per scopi di
  installazione,  utile creare una directory /usr/local/Netscape/ dove
  scompattare l'archivio. I file possono essere lasciati sul posto
  (eccetto per le librerie Java: seguire le istruzioni nel file README
  accluso ai binari Netscape), ed  sufficiente creare un link in
  /usr/local/bin/ eseguendo il comando

  # ln -s /usr/local/Netscape/netscape .


  dalla directory /usr/local/bin/.

  Netscape  ora pronto per l'uso e pu essere configurato attraverso il
  men `Options''. In ``General Preferences'' c' una scheda
  ``Appearance'' con il campo ``Home Page Location''. Immettere qui
  http://localhost e non dimenticare di salvare le opzioni (attraverso
  ``Options'' --- ``Save Options'') prima  di uscire da Netscape.
  All'avvio successivo, Netscape mostrer l'homepage di Apache.


  3.6.  Cooperazione tra Apache e i Browser


  Si pu ora condurre il primo test reale del browser e del server http:
  avviare uno dei browser disponibili e la pagina Apache: Red Hat Linux
  Web Server apparir.  Questa pagina mostra la locazione dei file e
  altre informazioni basilari sull'installazione del server http. Se
  questa pagina non viene mostrata controllare se i file menzionati
  sopra sono nel posto giusto e se la configurazione del browser 
  corretta. Chiudere i file di configurazione editati prima di lanciare
  il browser di nuovo. Se tutti i file sono a posto e la configurazione
  del browser sembra corretta, esaminare il setup di rete della propria
  macchina. L'hostname potrebbe essere differente da quello immesso
  nella configurazione, o il setup di rete potrebbe essere in s non
  corretto.  molto importante che /etc/hosts contenga almeno una linea
  come

  ______________________________________________________________________
  127.0.0.1               localhost localhost.localdomain
  ______________________________________________________________________


  che implica la possibilit di connettersi localmente alla propria
  macchina. Questo  verificabile richiamando uno dei programmi di rete
  che richiedono un hostname come argomento, come telnet localhost
  (ammesso che telnet sia installato). Se l'esecuzione fallisce occorre
  verificare la configurazione di rete prima di continuare.



  3.7.  Il Motore Database e la sua installazione


  L'installazione del database richiede poca preparazione in pi
  rispetto ai passi precedenti.  Ci sono pochi motori database SQL
  disponibili, con differenti prerequisiti per l'amministrazione e
  l'esecuzione, ed uno dei migliori  msql, o ``Mini-SQL'' di David
  Hughes. msql  shareware. A seconda della versione utilizzata, 
  previsto un addebito di 250 dollari USA o pi per siti commerciali, 65
  dollari o pi per utenti privati, mentre enti educativi, formativi e
  organizzazioni no-profit registrate possono usare il software
  gratuitamente.  I costi esatti sono forniti nelle note di licenza
  della documentazione del database. Le cifre indicate sono solo un
  indicatore approssimativo.

  Alcune parole per giustificare la scelta di msql da parte dell'autore.
  Prima di tutto, c' l'esperienza personale. Durante la ricerca di
  motori database, msql si  dimostrato il pi semplice da installare e
  mantenere, e fornisce una sufficiente copertura del linguaggio SQL
  tale da soddisfare le esigenze generali. Solo durante la stesura di
  questo articolo l'autore ha scoperto le seguenti parole nell'Alligator
  Descartes' DBI FAQ (perl database interface FAQ):


       Dal punto di vista dell'autore, se l'insieme di dati  rela
       tivamente piccolo, con tabelle inferiori al milione di
       righe, e meno di mille tabelle in un dato database, allora
       mSQL  una soluzione perfettamente accettabile per il vostro
       problema. Questo database  estremamente economico, merav
       igliosamente robusto ed ha un supporto eccellente. [...]


  Msql  disponibile attualmente in due versioni, msql-1.0.16 e
  msql-2.0.1, che differiscono in prestazioni (non osservabili in
  progetti di piccola scala) e software allegato (la versione pi
  recente presenta pi strumenti, un proprio linguaggio di scripting
  ecc.). Verranno descritte entrambe le versioni di msql siccome la loro
  installazioni differisce in alcuni punti.


  3.7.1.  Installazione di msql-1.0.16


  msql  disponibile in formato sorgente ed in forma binaria compilata
  con supporto ELF. L'uso dei binari ELF rende l'installazione semplice
  in quanto l'archivio msql-1.0.16.ELF.tgz contiene un albero di
  directory assoluto e completo, cosicch tutte le directory sono create
  correttamente quando estratte da /.

  Se si decide di compilare msql-1.0.16 e si intende usare il pacchetto
  MsqlPerl piuttosto che l'interfaccia DBI (vedere una trattazione
  dettagliata delle differenze pi oltre) tenere presente che MsqlPerl
  potrebbe segnalare degli errori in fase di test che richiedono
  l'installazione di una patch per correggere una errata gestione
  dell'SQL.  La patch  descritta nella documentazione MsqlPerl (file
  patch.lost.tables).  In particolare le richieste di MsqlPerl
  includeranno tre linee in msqldb.c dopo la linea 1400 che riporta
  entry->def = NULL;:

          *(entry->DB) = 0;
          *(entry->table) = 0;
          entry->age = 0;




  La porzione di codice dovrebbe apparire come

  ______________________________________________________________________
          freeTableDef(entry->def);
          safeFree(entry->rowBuf);
          safeFree(entry->keyBuf);
          entry->def = NULL;
          *(entry->DB) = 0;
          *(entry->table) = 0;
          entry->age = 0;
  ______________________________________________________________________



  La compilazione di msql richiede diversi passi. Dopo la scompattazione
  dell'archivio con i sorgenti  necessario costruire una directory
  destinazione. Questo si ottiene con

  # make target


  Se tutto va bene, il sistema risponde con


       Build of target directory for Linux-2.0.30-i486 complete




  Bisogna ora spostarsi nella directory appena creata ed immettere dap
  prima il comando

  # ./setup


  La sequenza ./  necessaria per assicurarsi di eseguire il comando
  setup in questa directory e non un altro con lo stesso nome. Verr
  richiesto di scegliere la locazione della directory con i sorgenti e
  se si desidera una installazione come utente root. Una volta che
  l'utente ha effettuato le scelte il sistema esegue una serie di test
  per verificare la disponibilit di software (compilatore, utilit
  ecc.) per terminare col messaggio


       Ready to build mSQL.
       You may wish to check "common/site.h" although the defaults should be
       fine.  When you're ready, type  "make all" to build the software




  Si potr immettere

  # make all


  Se tutto va come previsto, si legger:









  make[2]: Leaving directory `/usr/local/Minerva/src/msql'
  <-- [msql] done

  Make of mSQL complete.
  You should now mSQL using make install

  NOTE : mSQL cannot be used free of charge at commercial sites.
         Please read the doc/License file to see what you have to do.

  make[1]: Leaving directory `/usr/local/Minerva/src'




  Tutti i binari devono essere resi visibili dal percorso di ricerca
  creando dei link software in /usr/local/bin/. Spostarsi nella
  directory ed immettere il comando

  # ln -s /usr/local/Minerva/bin/* .


  dopo il quale i link saranno impostati correttamente.


  3.7.2.  Test di msql-1


  Dopo l'installazione  possibile testare se il database funziona.
  Prima di ogni altra cosa il server (demone) deve essere avviato.
  L'amministratore di sistema con i privilegi di root immette il comando

  # msqld &


  (non dimenticare di aggiungere il simbolo &, altrimenti msql non verr
  eseguito in background) dopodich apparir il seguente messaggio a
  schermo:


       mSQL Server 1.0.16 starting ...

       Warning : Couldn't open ACL file: No such file or directory
       Without an ACL file global access is Read/Write




  Questo messaggio ci informa che ogni cosa funziona ma che non esistono
  restrizioni di accesso. Per il momento  sufficiente avviare il demone
  msql da shell, ma in seguito si potrebbe desiderare che il sistema
  esegua automaticamente il comando per noi.  Il comando deve essere
  inserito in uno script rc.d appropriato.  Solo ora l'amministratore
  pu immettere il primo comando effettivo di database:

  # msqladmin create inventur


  msql risponde con Database "inventur" created.. Come ulteriore prova,
  si verifichi che la directory /usr/local/Minerva/msqldb/ contiene ora
  la sottodirectory vuota ../inventur/. Potremmo manipolare il nuovo
  database con gli strumenti di amministrazione; queste procedure sono
  tutte coperte in dettaglio dalla documentazione msql.




  3.7.3.  Installazione di msql-2.0.1


  C' una versione pi recente e pi potente del server mSQL di Huges,
  l'installazione del quale differisce in pochi punti.  L'installazione
  ex-novo di msql-2 implica i passi seguenti.  Copiare l'archivio nel
  punto di estrazione previsto, per esempio /usr/local/msql-2/, poi
  estrarre i file:

  # tar xfvz msql-2.0.1.tar.gz



  Spostarsi nella directory radice dell'albero di installazione e
  immettere

  # tar xfvz msql-2.0.1.tar.gz



  spostarsi in targets e cercare il proprio tipo di piattaforma.
  Dovrebbe esserci una nuova sottodirectory Linux-(vostra
  versione)-(vostra cpu)/.  Spostarsi in essa ed avviare il programma di
  setup:

  # ./setup



  C' anche un file site.mm che pu essere editato.  Vogliamo conservare
  il percorso di installazione in /usr/local/Minerva/ (predefinito per
  msql 1.0.16)?  In questo caso modificare la linea INST_DIR=... di
  conseguenza. Altrimenti, lasciare tutto com'.

  Ora possiamo lanciare la compilazione del database

  # make
  # make install



  Se tutto va per il vero giusto, vedremo un messaggio come:


       [...]

       Installation of mSQL-2 complete.

       *********
       **   This is the commercial, production release of mSQL-2.0
       **   Please see the README file in the top directory of the
       **   distribution for license information.
       *********




  Dopo che tutto  installato correttamente dobbiamo curarci dei
  dettagli amministrativi. Qui comincia la vera differenza da msql-1.
  Anzitutto, creare un utente responsabile della amministrazione del
  database.


  # adduser msql


  Poi si imposti msql come proprietario di tutti i file nella directory
  mSQL col comando:

  # cd /usr/local/Minerva
  # chown -R msql:msql *



  Poi possiamo creare link per tutti gli eseguibili binari del database
  in /usr/local/bin/ col comando:

  # ln -s /usr/local/Minerva/bin/* .





  3.7.4.  Test di msql-2

  Possiamo avviare il server database con il comando msql2d &; dovremmo
  ottenere una risposta simile a questa:


       Mini SQL Version 2.0.1
       Copyright (c) 1993-4 David J. Hughes
       Copyright (c) 1995-7 Hughes Technologies Pty. Ltd.
       All rights reserved.

               Loading configuration from '/usr/local/Minerva/msql.conf'.
               Server process reconfigured to accept 214 connections.
               Server running as user 'msql'.
               Server mode is Read/Write.

       Warning : No ACL file.  Using global read/write access.




  Ci sembra perfetto. Il database  compilato ed installato, e possiamo
  ora continuare con i moduli perl siccome questi si basano in parte
  sulla presenza di un database funzionante per il test.

  Incidentalmente, questo  anche un buon momento per stampare il
  manuale completo fornito con msql-2.0.1:

  # gzip -d manual.ps.gz
  # lpr manual.ps



  Possiamo ora procedere con la compilazione delle interfacce, ma  una
  buona idea mantenere il server SQL attivo ed in esecuzione perch ci
  rende il test delle librerie di interfaccia un po' pi semplice.


  3.8.  Scelta delle interfacce: DBI/mSQL, MsqlPerl, Lite

  Una frase spesso citata del Camel Book (la principale documentazione
  perl) afferma che c' pi di un modo di ottenere un risultato quando
  si usa perl. Questo, ahim, resta vero anche per il nostro modello di
  applicazione. Ci sono fondamentalmente tre modi di accedere ad un
  database msql via CGI. Prima di tutto la domanda  se utilizzare o
  meno perl. Se usiamo perl (su ci si focalizza questo articolo)
  potremo ancora scegliere tra due modelli completamente diversi di
  interfaccia. A fianco del perl, possiamo anche utilizzare il
  linguaggio scripting di msql, chiamato Lite, che  ragionevolmente
  semplice e simile al C.


  3.8.1.  DBI e DBD-mSQL

  Al momento della redazione di questo articolo, l'uso della interfaccia
  perl DBI per l'accesso a database viene preferito. DBI ha alcuni
  vantaggi: fornisce un controllo unificato di accesso ad un numero di
  database commerciali per mezzo di un unico insieme di comandi. Il
  database effettivamente in uso su un dato sistema  poi contattato
  attraverso un driver che nasconde efficacemente le peculiarit del
  database al programmatore. Cos, l'uso di DBI permette una agevole
  transizione tra differenti database di differenti produttori. In un
  singolo script  possibile contattare diversi database. Fare
  riferimento alle DBI-FAQ per i dettagli.  C', tuttavia, uno
  svantaggio: l'interfaccia DBI  ancora in fase di sviluppo e i numeri
  di versione aumentano rapidamente (talvolta gli aggiornamenti si hanno
  in meno di un mese). Analogamente, anche i singoli driver di database
  sono aggiornati frequentemente e possono riferirsi a specifiche
  versioni dell'interfaccia di database.  Utenti che effettuano nuove
  installazioni dovrebbero attenersi strettamente ai numeri di versione
  dati in questo articolo perch altre versioni possono causare problemi
  di compilazione e di test la risoluzione dei quali non  cosa per
  gente debole di cuore.


  3.8.2.  MsqlPerl

  MsqlPerl  una libreria per l'accesso a msql direttamente da script
  perl. Essa scavalca l'interfaccia DBI ed  piuttosto compatta.
  Sebbene essa lavori bene con entrambe le versioni di msql, il suo uso
  non  pi consigliato a vantaggio dell'interfaccia DBI generalizzata.
  Nondimeno, in un contesto specifico, MsqlPerl pu risultare la scelta
  giusta grazie alle dimensioni contenute ed alla facilit di
  installazione. Da notare, essa ha meno dipendenze dalla versione di
  quelle rivelate dall'interazione di DBI con diversi driver di
  database.


  3.8.3.  Il linguaggio scripting di msql: Lite

  Ultimo ma non meno importante, msql-2 possiede un suo linguaggio di
  script: Lite. Il linguaggio  un parente stretto del C, snellito dalle
  sue stranezze e arricchito con caratteristiche di tipo shell (in
  sintesi, qualcosa di simile ad una versione di perl molto
  specializzata). Lite  un linguaggio semplice ed  ben documentato nel
  manuale msql-2. Il pacchetto msql-2 fornisce anche una applicazione di
  esempio basata su Lite.

  Non descriveremo Lite in questa sede perch esso  specifico di
  msql-2, e perch si assume che i lettori di questo articolo abbiano un
  interesse ed una comprensione di base del perl. Nondimeno un
  approfondimento di Lite  altamente raccomandato: Lite pu fornire la
  soluzione vincente in un ambiente basato esclusivamente su msql-2
  (senza ricorso ad altri database), grazie alla sua concezione semplice
  e diretta.


  3.9.  La via generale: DBI e DBD-msql

  Assumiamo che perl sia stato installato durante il setup di sistema o
  attraverso il gestore pacchetti summenzionato. Non daremo altri
  dettagli qui.  Per verificare che la versione di perl sia aggiornata
  eseguiamo:


  # perl -v



  perl dovrebbe rispondere col seguente messaggio:



        This is perl, version 5.003 with EMBED
               Locally applied patches:
               SUIDBUF - Buffer overflow fixes for suidperl security

               built under linux at Apr 22 1997 10:04:46
               + two suidperl security patches

       Copyright 1987-1996, Larry Wall




  Probabilmente, tutto  a posto.  Il passo successivo include
  l'installazione delle librerie perl per database in generale (DBI), il
  driver msql (DBD-mSQL) e CGI. Il driver CGI  necessario in ogni caso.
  Sono necessari i seguenti archivi:

  1. DBI-0.81.tar.gz

  2. DBD-mSQL-0.65.tar.gz

  3. CGI.pm-2.31.tar.gz (or successivo)

  Qui occorre una puntualizzazione per i neofiti: l'installazione di
  test descritta qui funziona bene utilizzando software con esattamente
  questi numeri di versione, mentre combinazioni di altre versioni
  falliscono per un motivo o per l'altro.  Il debug di combinazioni di
  versioni difettose  sconsigliabile a chi non abbia grande familiarit
  con i dettagli delle convenzioni di chiamata delle interfacce ecc.  In
  alcuni casi un metodo pu essere semplicemente rinominato pur
  effettuando lo stesso compito, ma a volte la struttura interna cambia
  significativamente. Quindi, ancora una volta,  necessario mantenere i
  numeri di versione qui indicati se si vuole operare in sicurezza,
  anche se nel frattempo fossero comparse versioni successive.
  Aggiornamenti frequenti di queste interfacce sono una regola piuttosto
  che un'eccezione, quindi l'installazione di versioni differenti da
  quelle indicate pu essere fonte di problemi.

   molto importante che il driver di database per mSQL (DBD-mSQL) sia
  installato dopo l'interfaccia generica DBI.

  Si comincer creando la directory /usr/local/PerlModules/ siccome 
  molto importante mantenere l'albero originale delle directory perl
  intatto. Potremmo anche scegliere un nome di directory diverso siccome
  il nome non  assolutamente critico, e sfortunatamente ci non 
  specificato nei file README dei vari moduli perl.  Dopo aver copiato
  gli archivi suddetti in /usr/local/PerlModules/ li scompattiamo con

  # tar xzvf [file-archivio]



  per ognuno dei tre archivi. Non dimenticare di fornire il nome di file
  corretto a tar. Il processo di installazione per i tre moduli 
  essenzialmente standardizzato; solo i messaggi a schermo che mostrano
  passi significativi per i singoli pacchetti sono riportati nel
  seguito.

  3.9.1.  Installazione dell'interfaccia database di perl - DBI


  L'interfaccia verso il database deve sempre essere installata prima
  del driver di database specifico. La scompattazione dell'archivio DBI
  crea la directory /usr/local/PerlModules/DBI-0.81/.  Spostandosi nella
  directory, si trovano un file README (che andrebbe letto) ed un perl-
  Makefile (estensione .PL).  Diamo il comando

  # perl Makefile.PL



  Il sistema dovrebbe rispondere con un lungo messaggio la cui parte
  importante  mostrata qui:



       [...]
       MakeMaker (v5.34)
       Checking if your kit is complete...
       Looks good
               NAME => q[DBI]
               PREREQ_PM => {  }
               VERSION_FROM => q[DBI.pm]
               clean => { FILES=>q[$(DISTVNAME)/] }
               dist => { DIST_DEFAULT=>q[clean distcheck disttest [...]
       Using PERL=/usr/bin/perl

       WARNING! By default new modules are installed into your 'site_lib'
       directories. Since site_lib directories come after the normal library
       directories you MUST delete old DBI files and directories from
       your 'privlib' and 'archlib' directories and their auto subdirectories.

       Writing Makefile for DBI




  Questo dovrebbe andare bene, come indicato dal programma (looks good),
  e possiamo procedere col passo successivo:

  # make


  Se non si hanno messaggi di errore (il protocollo dettagliato mostrato
  a schermo non  un messaggio di errore) si testi la nuova libreria
  installata con il comando

  # make test


  Osservare le seguenti linee di output (effettuare lo scroll all'indi
  etro con [Shift]-[PgUp]):












  [...]
  t/basics............ok
  t/dbidrv............ok
  t/examp.............ok
  All tests successful.
  [...]
  DBI test application $Revision: 1.20 $
  Switch: DBI-0.81 Switch by Tim Bunce, 0.81
  Available Drivers: ExampleP, NullP, Sponge
  ExampleP: testing 2 sets of 5 connections:
  Connecting... 1 2 3 4 5
  Disconnecting...
  Connecting... 1 2 3 4 5
  Disconnecting...
  Made 10 connections in  0 secs ( 0.00 usr  0.00 sys =  0.00 cpu)

  test.pl done




  Il passo finale  quello di installare tutti i file nelle directory
  appropriate. Ci si ottiene col comando

  # make install


  Non resta altro. Se per qualche ragione l'installazione fallisce e
  deve essere rieseguita non dimenticarsi di eseguire prima

  # make realclean


  Questo rimuove i resti indesiderati della precedente installazione. Si
  possono anche rimuovere i file installati copiando il contenuto dello
  schermo (mostrato abbreviato)


       Installing /usr/lib/perl5/site_perl/i386-linux/./auto/DBI/DBIXS.h
       Installing /usr/lib/perl5/site_perl/i386-linux/./auto/DBI/DBI.so
       Installing /usr/lib/perl5/site_perl/i386-linux/./auto/DBI/DBI.bs
       [...]
       Writing /usr/lib/perl5/site_perl/i386-linux/auto/DBI/.packlist
       Appending installation info to /usr/lib/perl5/i386-linux/5.003/perllocal.pod




  in un file, rimpiazzando ogni occorrenza di Installing con rm.  Se
  tale file viene chiamato uninstall si pu poi eseguire

  # . uninstall


  che rimuover i file installati.


  3.9.2.  Il driver msql di perl DBD-mSQL


  Il driver msql pu essere installato soltanto dopo la felice
  installazione dell'interfaccia generica per database di perl.

  I passi fondamentali sono gli stessi di sopra; cos avremo dapprima


  # perl Makefile.PL



  Qui, il sistema dovrebbe rispondere con un invito alla lettura della
  documentazione a corredo. Esso rilever poi dove risiede msql, e
  chieder quale versione  in uso.



       $MSQL_HOME not defined. Searching for mSQL...
       Using mSQL in /usr/local/Hughes

        -> Which version of mSQL are you using [1/2]?




  inserire il numero di versione corretto. Seguiranno poche linee di
  testo.  Osservare le seguenti:


       Splendid! Your mSQL daemon is running. We can auto-detect your configuration!

       I've auto-detected your configuration to be running on port: 1114




  Si pu ora testare il driver con

  # make test


  Di nuovo, segue un output piuttosto lungo. Se esso termina con


       Testing: $cursor->func( '_ListSelectedFields' ). This will fail.
               ok: not a SELECT in msqlListSelectedFields!
       Re-testing: $dbh->do( 'DROP TABLE testaa' )
               ok
       *** Testing of DBD::mSQL complete! You appear to be normal! ***




  si  sulla buona strada ed  possibile installare il driver con

  # make install


  Questo conclude le operazioni di installazione; il prossimo paragrafo
  riguarda MsqlPerl e se si  scelto l'uso di DBI pu essere saltato.


  3.10.  L'interfaccia MsqlPerl

  Se si decide di usare esclusivamente l'interfaccia MsqlPerl non
  occorre il driver di database generico, ma solo MsqlPerl-1.15.tar.gz,
  siccome, come detto in precedenza, MsqlPerl fornisce una interfaccia
  diretta tra server database e perl senza l'uso dell'interfaccia DBI.
  Installazione e test sono immediati.

  Dopo aver eseguito perl Makefile.PL l'utilit make pu essere avviata.
  Dapprima occorrer rispondere alla domanda su dove risiede msql.  Se
  msql  in /usr/local/Minerva/ si potr confermare la risposta di
  default.

  Poi eseguire make test. Prima di ci bisogna assicurarsi di avere un
  database chiamato test e di possedere i diritti di lettura/scrittura
  su di esso. Tale database pu essere creato con

  # msqladmin create test




  3.11.  La libreria CGI di perl


  L'installazione del componente CGI di perl  il pi semplice dei tre
  passi.  sufficiente eseguire i comandi seguenti nell'ordine dato e
  tutto  fatto:


  # perl Makefile.PL
  # make
  # make install




  Diversamente dai driver precedenti questa interfaccia non ha una
  opzione di test (# make test) siccome gli altri moduli devono essere
  testati in ogni caso.

  Viene anche creata una sottodirectory con script CGI di esempio. 
  possibile copiare i contenuti di questa directory in /home/http/cgi-
  bin/ ed usare il browser per sperimentare gli script.


  3.12.  Lista di controllo dell'installazione

  Abbiamo compiuto i passi seguenti, nell'ordine dato:

  1. Installazione di Linux con supporto di rete

  2. Installazione di un server http (Apache)

  3. Installazione di un browser (Arena, lynx o Netscape)

  4. Installazione di un server SQL (msql)

  5. Installazione di una interfaccia perl SQL

  6. Installazione dei file CGI

  Infine,  possibile fare un po' di pulizia. Tutti i rami di directory
  contenenti i sorgenti per le installazioni possono essere rimossi
  (tuttavia, non vanno cancellati gli archivi originali!) siccome tutti
  i file binari e la documentazione si trovano in directory differenti.


  4.  Esecuzione di un database di esempio


  Dopo il completamento dell'installazione del sistema si pu finalmente
  eseguire una modello di applicazione. A seconda della versione di msql
  installata e dell'interfaccia perl utilizzata si dovr modificare il
  programma di esempio in qualche punto.


  Innanzitutto, il file index.html posto in /home/httpd/html/ deve
  essere modificato per permettere di richiamare l'applicazione database
  campione.  possibile porre il database (che verr chiamato
  database.cgi o inventur.cgi nonostante il nome del file perl.lst.ck)
  nella directory /home/httpd/html/test/.

  Per ottenere lo scopo, appendere una linea (naturalmente dipendente
  dalle scelte di installazione) simile alla seguente nel file
  index.html:

  ______________________________________________________________________
  <LI>Test the <A HREF="test/database.cgi">Database, DBI:DBD-mSQL style!</A>
  <LI>Test the <A HREF="test/inventur.cgi">Database, MsqlPerl style!</A>
  ______________________________________________________________________



  Solitamente si dovrebbe mantenere una sola di queste due scelte, ma
  disponendo di entrambi i tipi di interfaccia database installata 
  possibile lasciare entrambe le linee cos come sono. Sar in seguito
  possibile comparare le prestazioni, ecc.


  4.1.  Adattamento dello script di esempio per MsqlPerl

  Allo script campione deve essere notificato l'uso dell'interfaccia
  MsqlPerl.  Le modifiche intervengono in diversi punti. Dapprima,
  vicino all'inizio del file, rimpiazzare la clausola use:

  ______________________________________________________________________
  #
  # use DBI;            # Interfaccia Database Generica
  use Msql;
  ______________________________________________________________________



  Poi, alla linea 27, la sintassi MsqlPerl non richiede la menzione di
  un driver specifico:


  ______________________________________________________________________
  # $dbh = DBI->connect($host, $database, '', $driver) ||
  $dbh = Msql->connect($host, $database) ||
  ______________________________________________________________________



  Poi, dalla linea 33 per tutto l'intero script, bisogna modificare
  tutte le istanze di do con query:


  ______________________________________________________________________
  # $dbh->do("SELECT * FROM hw") || db_init($dbh);
  $dbh->query("SELECT * FROM hw") || db_init($dbh);
  ______________________________________________________________________



  Infine, la linea 207 deve essere commentata:


  ______________________________________________________________________
  # $sth->execute || msg("SQL Error:", $sth->errstr);
  ______________________________________________________________________

  Inoltre, pu diventare necessario scambiare tutte le chiamate errstr
  come quella nel precedente frammento di codice con errmsg.  Anche
  questa scelta dipende dalla versione.

  Dopo queste modifiche, lo script dovrebbe girare senza intoppi.


  4.2.  Adattamento dello script di esempio per for msql-2

  La sintassi SQL  stata ridefinita durante lo sviluppo di msql-2. Lo
  script originale fallir l'esecuzione delle istruzioni di
  inizializzazione tabella nelle linee 45 -- 58. Il modificatore primary
  key non  pi supportato da msql-2, e dovrebbe essere semplicemente
  evitato:

  ______________________________________________________________________
      $dbh->do(<<EOT) || die $dbh->errstr; # Neue Personen-Tabelle
          create table person (
  # We do not need the 'primary key' modifier anymore in msql-2!
  #           pn        int primary key,   # Personalnummer
              pn        int,               # Personalnummer
              name      char(80),          # Nachname, Vorname
              raum      int                # Raumnummer
          )
  EOT
      $dbh->do(<<EOT) || die $dbh->errstr; # Neue Hardware-Tabelle
          create table hw (
  # We do not need the 'primary key' modifier anymore in msql-2!
  #           asset int primary key,       # Inventurnummer
              asset int,                   # Inventurnummer
              name   char(80),             # Bezeichnung
              person int                   # Besitzer
          )
  EOT
  ______________________________________________________________________



  Sfortunatamente, questo script accetter nuovi elementi con identico
  numero di personale; il modificatore msql-1 primary key intende
  prevenire esattamente questo comportamento. La documentazione msql-2
  mostra come usare la clausola CREATE INDEX per ottenere elementi
  univoci.


  5.  Conclusione e Riepilogo

  Se si  installato msql-2 sul proprio sistema si pu dare un'occhiata
  ai programmi d'esempio scritti in Lite, il linguaggio di scripting
  proprietario di msql-2.

  Entrambe le versioni di msql sono fornite con un insieme base di
  strumenti di amministrazione che permettono all'utente di creare e
  cancellare tabelle (msqladmin) e di esaminare le strutture di database
  (relshow).

  La seconda generazione di msql (cio msql-2) presenta qualche
  strumento in pi: msqlimport e msqlexport. Questi permettono
  l'esportazione e l'importazione di dati sotto forma di file di testo
  da e verso database SQL.  Possono essere usati per il caricamento di
  quantit di dati esistenti d'un colpo in tabelle gi create, o
  l'estrazione di dati da tabelle, in modo che l'utente non debba
  scrivere alcuna linea di perl o SQL o qualsiasi altro codice per
  questi compiti.


  Se si desidera scrivere propri script perl per l'interazione con
  database si trover sufficiente supporto nei file di esempio e nella
  estensiva documentazione in linea fornita col modulo DBI.

  Ad ogni modo, si  ora pronti per cominciare e presentare i propri
  dati ad utenti della propria rete, o anche del Web.




























































  The Linux XFree86 HOWTO
  di Eric S. Raymond
  v6.1, 21 aprile 2000

  Questo documento descrive come ottenere, installare e configurare la
  versione 4.0 di XFree86, una versione dell'X Window System per i sis
  temi Linux. Questa  una guida passo passo alla configurazione di
  XFree86 sul proprio sistema. Traduzione di Federico Cossu,
  <f.cossu@trident.nettuno.it>, flug-firenze.

  1.  Introduzione

  L'X Window System  un grande e potente (qualcuno dice eccessivamente
  grande e complesso) ambiente grafico per i sistemi UNIX. L'X Window
  System originale  stato sviluppato al MIT; i rivenditori commerciali
  ne hanno fatto lo standard industriale per le piattaforme UNIX.
  Virtualmente ogni workstation UNIX nel mondo utilizza una qualche
  variante del sistema X Window.

  Una versione liberamente ridistribuibile del MIT X Window System
  versione 11, release 6 (X11R6) per sistemi UNIX 80386/80486/Pentium 
  stata sviluppata da un team di programmatori originariamente guidati
  da David Wexelblat <dwex@XFree86.org>. La release, nota come XFree86,
   disponibile per System V/386, 386BSD, e altre implementazioni UNIX
  x86, tra cui Linux. Include tutti i binari, file di supporto, librerie
  e strumenti necessari.

  Informazioni complete su XFree86 sono disponibili nel sito web di
  XFree86  <http://www.XFree86.org>.

  In questo documento, verr data una descrizione passo passo su come
  installare e configurare XFree86 per Linux, ma star poi al lettore
  integrarla in maggior dettaglio leggendo la documentazione distribuita
  con XFree86 stesso (questa documentazione viene descritta in seguito).
  Ovviamente, l'uso e la personalizzazione dell'X Window System sono
  argomenti che vanno oltre questo documento: su tali argomenti  bene
  procurarsi uno dei tanti buoni libri sull'uso dell'X Window System.


  1.1.  Altre fonti di informazione

  Se non si  mai sentito nulla su Linux, ci sono parecchie fonti di
  informazioni basilari sul sistema. Il miglior posto in cui trovarle 
  nella home page del Linux Documentation Project
  <http://metalab.unc.edu/LDP>. L  possibile trovare anche l'ultima e
  pi aggiornata versione (in inglese) di questo documento:
  <http://metalab.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>.

  Una buona fonte di informazioni in lingua italiana  la home page
  dell'Italian Linux Documentation Project
  <http://www.pluto.linux.it/ildp>.


  1.2.  Nuove versioni di questo documento

  Le nuove versioni del XFree86 HOWTO saranno periodicamente postate su
  comp.os.linux.help, su comp.os.linux.announce e su news.answers.
  Saranno anche disponibili su vari siti Linux WWW e FTP, inclusa la
  home page di LDP.

  Si potr sempre vedere l'ultima versione di questo documento sul World
  Wide Web all'URL
  <http://metalab.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>.



  1.3.  Commenti e correzioni

  Se si hanno domande o commenti su questo documento, per favore si
  invii una mail a Eric S. Raymond, a esr@thyrsus.com. Accetter
  benevolmente ogni suggerimento o critica. Se si trovano errori in
  questo documento, me lo si faccia sapere cosicch possa correggerli
  nella prossima versione. Grazie.

  Per piacere, non mi si inviino domande su come far funzionare la
  propria scheda video e il proprio monitor con X. Questo HOWTO vuole
  essere una guida rapida e anti-panico a una normale installazione
  usando il nuovo metodo di configurazione interattivo.  Se si
  incontrano problemi, si punti il proprio browser a
  <http://metalab.unc.edu/LDP/HOWTO/XFree86-Video-Timings-HOWTO.html>
  (questo  la versione HTML aggiornata del file `Videomodes.doc' di
  XFree86). Quel documento dice tutto quello che so a proposito della
  configurazione e dei problemi relativi a essa. Se anche questo non pu
  aiutarvi, io non posso fare altro.


  2.  Requisiti hardware

  Si pu leggere una lista aggiornata delle schede e dei chipset
  supportati presso http://www.xfree86.org/4.0/Status.html.

  La documentazione inclusa nella propria scheda video dovrebbe
  specificare il chipset usato. Se si ha intenzione di comprare una
  nuova scheda video, o si sta comprando una nuova macchina che ha gi
  una scheda video, si deve sapere (il rivenditore dovrebbe dichiararlo)
  esattamente qual  la marca, modello e chipset che utilizza. A tal
  fine potrebbe essere necessario che il venditore chiami il supporto
  tecnico al vostro posto; in generale i rivenditori saranno felici di
  farlo. Molti rivenditori di hardware per PC diranno che la scheda
  video  una ``scheda VGA standard'' che ``dovrebbe funzionare'' sul
  proprio sistema. Gli si spieghi che il proprio software (si citi pure
  Linux e XFree86!) non supporta tutti i chipset video e che si devono
  avere informazioni dettagliate.

  Si pu anche determinare il chipset della proprio scheda video facendo
  partire il programma SuperProbett> incluso nella distribuzione di
  XFree86. Ci sar discusso pi in dettaglio dopo.

  Le schede video che usano questi chipset sono supportate su tutti i
  tipi di bus, inclusi VLB e PCI.

  Un problema incontrato dagli sviluppatori di XFree86  che alcuni
  produttori di schede video usano dei meccanismi non standard per
  determinare le frequenze di clock alle quali le schede lavorano.
  Alcuni di questi non rilasciano neanche le specifiche su come
  programmare la scheda, o richiedono agli sviluppatori di firmare una
  dichiarazione di non-rivelazione per ottenere tali informazioni.
  Questo ovviamente limiterebbe la libera distribuzione del software
  XFree86, e il team di sviluppo di XFree86 non  disposto a permettere
  ci. Per un lungo periodo, questo  stato un problema con certe schede
  video della Diamond, ma con la release 3.1 di XFree86 la Diamond ha
  cominciato a lavorare con il team di sviluppo per rilasciare driver
  gratuiti per quelle schede.

  La configurazione consigliata per XFree86 sotto Linux  un 486 o
  qualcos'altro di meglio, con almeno 8 Mbyte di RAM, e una scheda video
  con uno dei chipset elencati sopra. Per avere prestazioni ottimali, si
  suggerisce di usare una scheda accelerata, come una scheda basata su
  chipset S3. Si dovrebbe controllare la documentazione di XFree86 e
  verificare che la propria scheda sia supportata, prima di acquistare
  hardware costoso.

  Come nota di colore, il sistema personale di Matt Welsh (il creatore
  di queste FAQ) era un 486DX2-66, 20 Mbyte di RAM, equipaggiato con una
  scheda video VLB S3-864 con 2 Mbyte di DRAM. Faceva andare gli X
  benchmark su quella macchina bene quanto su una workstation Sun Sparc
  IPX. Il sistema Linux era all'incirca 7 volte pi veloce dello Sparc
  IPX (per i curiosi, XFree86 3.1 sotto Linux, con quella scheda video
  andava a circa 171,000 xstones; la Sparc IPX a circa 24,000). In
  generale, XFree86 su un sistema Linux con una scheda accelerata
  offrir prestazioni molto pi elevate di quelle disponibili su una
  workstation UNIX commerciale (che utilizza solitamente dei semplici
  framebuffer per la grafica).

  La propria macchina avr bisogno di almeno 4 Mbyte di RAM fisica e 16
  Mbyte di RAM virtuale (ad esempio 8 Mb di fisica e 8 di Swap). Si
  ricorda che pi memoria fisica si ha, meno il proprio sistema si
  appogger alla swap del disco quando la memoria  poca. Poich la swap
   intrinsecamente lenta (i dischi sono molto pi lenti della RAM
  fisica) avere 8 Mbyte di RAM o pi  necessario per usare XFree86 in
  maniera confortevole. 16 sono ancora meglio. Un sistema con 4 Mbyte di
  RAM fisica potrebbe andare molto pi lentamente (anche 10 volte di
  pi) di uno con 8 Mb o pi.


  3.  Installare Xfree86

   assai probabile aver trovato XFree86 incluso in una distribuzione
  Linux, nel qual caso non  necessario scaricare separatamente il
  software. Oppure si  in possesso dei binari precompilati per la
  propria macchina in formato RPM, in questo caso sar sufficiente
  installarli con rpm(1). In entrambi i casi si salti pure il resto di
  questa sezione.

  La distribuzione binaria di XFree86 pu essere trovata su un gran
  numero di siti FTP. Sul sito di XFree86 presso
  <ftp://ftp.xfree86.org/pub/XFree86/current/binaries/>

  Prima di fare qualunque altra cosa, si scarichi e si esegua lo script
  shell `Xinstall.sh'. Questo aiuter a sapere quali siano prerequisiti
  da soddisfare prima di continuare l'installazione. Ci sono delle
  istruzioni complete per installare la distribuzione binaria di XFree86
  presso <http://www.xfree86.org/4.0/Install2.html>.

  La directory di XFree86 dovrebbe contenere, nel file RELNOTES, le note
  di rilascio per la versione corrente. Le si consulti per i dettagli
  sull'installazione.

  Tutto quello che  richiesto per installare XFree86 sono i file sopra
  elencati, inoltre si deve creare (come root) la directory /usr/X11R6,
  e scompattare in /usr/X11R6 i file con un comando tipo:


       gzip -dc Xbin.tgz | tar xfB -




  Si ricorda che questi file tar sono impacchettati relativamente alla
  directory /usr/X11R6 e quindi  importante che vengano decompressi l.

  Si deve anche controllare attentamente che /usr/X11R6/bin sia nel
  proprio path. Questo pu essere fatto modificando il file /etc/profile
  o /etc/csh.login (a seconda della shell usata dagli utenti del
  sistema). Oppure si pu semplicemente aggiungere la directory nel
  proprio path personale modificando ~/.bashrc  o ~/.cshrc, a seconda
  della propria shell.

  Ci si deve assicurare anche che /usr/X11R6/lib possa essere
  localizzato da ld.so, il linker dinamico. Per fare ci, si aggiunga la
  riga


       /usr/X11R6/lib




  al file /etc/ld.so.conf e si esegua /sbin/ldconfig come root.


  4.  Configurare XFree86


  4.1.  Configurazione normale

  Configurare correttamente XFree per usare il mouse, la tastiera, il
  monitor e la scheda video era una sorta di pratica mistica, che
  richiedeva un intenso hacking manuale di un complesso file di
  configurazione. Non pi; con le recenti versioni questo processo 
  diventato quasi banale. La faccenda si  molto semplificata dal
  momento che non ci sono pi server separati per differenti tipi di
  schede,ma solo dei moduli che vengono caricati da un server comune.
  Tutto quello che si deve fare  lanciare il programma XF86Setup.

  Questo programma conta sul fatto che tutto l'hardware dei PC odierni 
  equipaggiato con monitor capaci di supportare la EGA/VGA. Il programma
  chiama il server SVGA16 e lo usa per far partire X a 640x480 in una
  modalit sicuramente supportata. Dopo di che lancia un programma
  interattivo che guider attraverso una serie di 5 pannelli di
  configurazione per mouse, tastiera, scheda video, monitor e `altro'
  (si tratta di varie opzioni per il server). L'intero processo 
  assolutamente anti-panico.

  (Se usi la distribuzione Linux Red-Hat potrai notare che esiste anche
  un differente programma di configurazione chiamato xf86config. Questo
  funziona similmente a XF86Setup ma non si usano n l'interfaccia di X
  n il server VGA16)

  Una piccola cosa da tenere a mente  questa: se si usa un PC moderno
  come la maggior parte delle persone, la propria tastiera  quella che
  XF86Setup chiama ``Generic 102-key PC (intl)'' piuttosto che quella
  predefinita ``Generic 101-key PC''. Se si sceglie quella predefinita
  (101-tasti) il gruppo di tasti all'estrema destra della propria
  tastiera (il tastierino numerico e compagni) potrebbe smettere di
  funzionare.

  Se non si  sicuri sul tipo di monitor che si ha, si provi tutti
  quelli della lista in successione. Lo si cerchi partendo dall'alto
  verso il basso (quelli in alto richiedono velocit di dot-clock pi
  basse e sono meno esigenti nelle richieste hardware). Si torni
  indietro se si ottiene un disastro o un'immagine seriamente distorta.
  Le distorsioni minori (immagine leggermente troppo larga, leggermente
  troppo piccola, o un po' scentrata) non sono un problema; si avr
  occasione di correggerle immediatamente affinando i modi video.

  E quando il programma lancia xvidtune per permettere di affinare il
  modo video, non ci si lasci innnervosire dal messaggio d'avviso
  iniziale. I moderni monitor multisync (a differenza dei loro
  predecessori a frequenza fissa) non sono facili da danneggiare in
  questa maniera.

  XF86Config assume che il device del proprio mouse sia /dev/mouse.  Se
  questo non dovesse funzionare, ci pu essere bisogno di fare un link a
  /dev/mouse verso un qualsiasi altro /dev/ca[01] sul quale c' il
  mouse.  Se poi si scopre che XFree86 d un errore ``mouse busy''
  quando  in esecuzione gpm, pu invece essere necessario fare il link
  verso /dev/ttyS[01].

  Il processo di configurazione opera selezionando un server per la
  propria generica scheda video e configurando XF86Config, file che il
  server legger all'avvio per ottenere i parametri specifici relativi
  alla propria installazione. La posizione di XF86Config varia a seconda
  del sistema operativo, ma uno dei posti in cui potrebbe essere 
  /etc/X11

  Nelle vecchie versioni di XFree86, XF86Setup fa un link diretto fra il
  comando `X' e il server in uso. Mentre nelle versioni recenti, `X' 
  direttamente linkato a un programma wrapper set-user-id chiamato
  Xwrapper.  L'idea  che tutte le chiamate setuid root vengono
  localizzate nell'Xwrapper in modo che il server non debba partire
  setuid root.



  4.2.  Risoluzione dei problemi

  Occasionalmente, qualcosa potrebbe non andare benissimo quando si
  lancia per la prima volta l'X server. Ci  quasi sempre causato da un
  problema nel file di configurazione. Solitamente, i valori di timing
  del monitor sono sbagliati, o il dot-clock della scheda video 
  impostato scorrettamente. I problemi minori possono essere corretti
  con xvidtune; uno schermo veramente ingarbugliato indica di solito che
  si devi tornare indietro in XF86setup e scegliere un monitor con
  prestazioni minori.

  Se la propria schermata sembra rotolare, o i contorni non sono ben
  definiti, questi sono indici evidenti del fatto che i valori di timing
  del monitor e del dot-clock della scheda sono sbagliati. Ci si
  assicuri anche di aver specificato il chipset corretto per la propria
  scheda video, cos come le altre opzioni per la sezione Device del
  file XF86Config. Ci si assicuri soprattutto di usare il giusto X
  server e che /usr/X11R6/bin/X sia un link simbolico a quel server.

  Se tutto ci non bastasse, si provi a far partire X in modalit
  ``essenziale'', usando questo comando


       X > /tmp/x.out 2>&1




  Poi si pu far terminare l'X server (usando la combinazione di tasti
  ctrl-alt-backspace ed esaminare il contenuto del file /tmp/x.out. L'X
  server riporter ogni avviso o errore, ad esempio se la propria scheda
  video non ha un dot-clock corrispondente al modo supportato dal pro
  prio monitor.

  Si ricorda che  possibile usare le combinazioni ctrl-alt-numeric + e
  ctrl-alt-numeric - per passare tra i modi video elencati nella linea
  Modes della sezione Screen del file XF86Config. Se il modo a pi alta
  risoluzione non si vede bene, si provi a passare a risoluzioni pi
  basse. Fare questo per lo meno dir quali parti della propria
  configurazione di X funzionano correttamente.

  Si controllino anche i pomelli che regolano le dimensioni dello
  schermo sul proprio monitor. In molti casi  necessario aggiustarli
  quando si fa partire X. Ad esempio, se lo schermo appare leggermente
  spostato da un lato si usino i controlli del monitor per correggerlo.
  Il gruppo USENET comp.windows.x.i386unix  dedicato a discussioni su
  XFree86, cos come lo  comp.os.linux.x. Potrebbe essere una buona
  idea guardare in questi gruppi per vedere se ci sono post relativi
  alla propria configurazione video: si potrebbe imbattersi in qualcuno
  che ha gi avuto gli stessi problemi.


  4.3.  Configurazioni personalizzate

  Se il proprio monitor supporta la risoluzione di 1600x1200 ci sar
  bisogno di fare dell'hand-hacking (NDT: modificare e correggere a mano
  i file di configurazione) sulla configurazione di X per ottenere delle
  prestazioni ottimali, in quanto la pi alta risoluzione che XF86Setup
  pu supportare direttamente  1280x1024.

  Se si vuole fare dell'hand-hacking sulla propria configurazione video,
  per questa o altre ragioni, si veda L'XFree86 Video Timings HOWTO di
  LDP, presso:  <http://metalab.unc.edu/LDP/HOWTO/XFree86-Video-Timings-
  HOWTO.html> (questo  versione aggiornata in HTML del file
  `Videomodes.doc' di XFree86).


  4.4.  Usare i colori a 16 bit

  Di default, X utilizza una profondit di colore a 8 bit rendendo
  disponibili 256 colori. Per aggirare questa restrizione molte
  applicazioni allocano le proprie mappe di colore, ottenendo di
  conseguenza degli improvvisi ``sbalzi'' di colore quando il cursore si
  muove tra due finestre, poich ognuna di esse ha una propria mappa di
  colore.

  Se si ha intenzione di usare applicazioni grafiche avanzate, 256
  colori potrebbero non essere sufficienti. Pu essere necessario
  passare a una profondit di colore a 16 bit (65,536 colori). Ma si
  faccia attenzione che non tutte le applicazioni funzioneranno con
  colori a 16 bit.

  Si pu usare la profondit di colore a 16 bit con 65K diversi colori
  semplicemente lanciando X con


  ______________________________________________________________________
      startx -- -bpp 16
  ______________________________________________________________________



  oppure mettendo quest'altra linea:


  ______________________________________________________________________
      exec X :0 -bpp 16
  ______________________________________________________________________



  nel proprio file .xserverrc. Comunque, affich questo funzioni 
  necessario avere una sezione screen nel proprio XF86Config con


  ______________________________________________________________________
      DefaultColorDepth 16
  ______________________________________________________________________



  Se si usa xdm, pu essere necessario modificare il file Xservers, che
  probabilmente  contenuto in /etc/X11/xdm/.  Una configurazione tipica
  ha solo una riga non commentata, simile a


  ______________________________________________________________________
        :0 local /usr/X11R6/bin/X
  ______________________________________________________________________



  Si aggiunga -bpp 16 alle opzioni di avvio:


  ______________________________________________________________________
        :0 local /usr/X11R6/bin/X -bpp 16
  ______________________________________________________________________



  Inoltre, si dovr aggiungere una sezione ``screen'' al proprio
  XF86Config, e nella sotto-sezione Display bisogner impostare a 16 il
  valore di Depth. In generale, basta copiare la sezione a 8-bit e
  cambiare il valore di Depth.


  Pi colori significano che la propria scheda video dovr trasferire
  pi dati nello stesso tempo. Se la propria scheda non pu farcela,
  dovranno essere ridotte o la risoluzione o la frequenza di refresh. Di
  default XFree riduce la risoluzione. Se si vuole mantenere la
  risoluzione e ridurre la frequenza di refresh, si deve inserire una
  Modeline appropriata nel file XF86Config che definisce quella
  risoluzione con una frequenza di refresh pi bassa. Ad esempio, si
  rimpiazzino i vecchi valori


       Modeline "1024x768"  75  1024 1048 1184 1328 768 771 777 806 -hsync -vsync




  con


       Modeline "1024x768"  65  1024 1032 1176 1344 768 771 777 806 -hsync -vsync.




  I numeri magici 75 e 65 sono i rispettivi clock rate che X ha ripor
  tato nel proprio file .X.err. Si consulti il file dei monitor nella
  documentazione di XFree86 per i Modeline adatti al massimo clock rate
  che la propria scheda video pu supportare con 16 bit di profondit di
  colore.


  5.  Lanciare XFree86

  Con il proprio file XF86Config ben configurato, si  pronti per
  lanciare l'X server e per farlo girare. Per prima cosa, ci si assicuri
  che /usr/X11R6/bin sia nel proprio path.

  Il comando per far partire XFree86 :

       startx

  Questo  un front-end per xinit (nel caso in cui si sia abituati a
  usare xinit su altri sistemi UNIX).

  Questo comando far partire l'X server e i comandi trovati nel file
  .xinitrc nella propria home directory. .xinitrc  solamente uno script
  shell che contiene i client X da far partire. Se questo file non
  esiste, sar utilizzato quello predefinito di sistema:
  /usr/X11R6/lib/X11/xinit/xinitrc.

  Un file .xinitrc standard assomiglia a questo:


       #!/bin/sh

       xterm -fn 7x13bold -geometry 80x32+10+50 &
       xterm -fn 9x15bold -geometry 80x34+30-10 &
       oclock -geometry 70x70-7+7 &
       xsetroot -solid midnightblue &

       exec fvwm2




  Questo script far partire due client xterm, un oclock e imposter il
  colore della finestra root (sfondo) a midnightblue. E poi far partire
  fvwm2, il window manager. Nota che fvwm2  eseguito con il comando
  (statement) exec della shell; questo fa s che il processo xinit venga
  rimpiazzato da fvwm2. Non appena il processo fvwm2 termina, ci fa
  terminare pure l'X server.  possibile far terminare fvwm2 usando i
  men sullo sfondo: si prema il primo bottone del mouse sullo sfondo
  del desktop - ci mostrer un men a discesa che permette di chiudere
  la sessione premendo su Exit Twm.

  Ci si assicuri che l'ultimo comando nel file .xinitrc sia preceduto da
  exec e che questo non sia eseguito in background (niente & alla fine
  della linea). Altrimenti l'X server verr terminato non appena avr
  lanciato i client del file .xinitrc.

  In alternativa, si pu uscire da X premendo la combinazione ctrl-alt-
  backspace. Questa terminer direttamente il server X, provocando
  l'uscita dal sistema X window.

  Quella precedente  una configurazione semplicissima del desktop.
  Molti stupendi programmi e configurazioni saranno disponibili
  lavorando un po' sul file .xinitrc.

  Se si  nuovi all'ambiente X Window System, si raccomanda fortemente
  di prendersi un libro tipo: The Joy of X : An Overview of the X Window
  System di Niall Mansfield (Addison-Wesley 1993), ISBN 0201-565129).
  Usare e configurare X  un argomento troppo vasto, e non pu essere
  trattato tutto qui. Si leggano le pagine man di xterm, oclock e fvwm2
  per avere indicazioni su come cominciare.


  5.1.  Condizioni d'uso

  This document is copyright 1996 by Eric S. Raymond. You may use,
  disseminate, and reproduce it freely, provided you:


    Do not omit or alter this copyright notice.

    Do not omit or alter the version number and date.


    Do not omit or alter the document's pointer to the current WWW
     version.

    Clearly mark any condensed or altered versions as such.

  These restrictions are intended to protect potential readers from
  stale or mangled versions.  If you think you have a good case for an
  exception, ask me.



       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.



  Questo documento  protetto da copyright, 1996 di Eric S. Raymond. Si
  pu usarlo, disseminarlo, distribuirlo, e riprodurlo liberamente, a
  patto che:


    Non si ometta o alteri questa nota di copyright

    Non si ometta o alteri il numero della versione e la data

    Non si ometta o alteri il puntatore alla versione corrente WWW del
     documento

    Si evidenzi chiaramente ogni versione alterata, condensata o altro

  Queste restrizioni hanno l'intenzione di proteggere il potenziale
  lettore da versioni vecchie o mutilate. Se si crede di avere un buon
  motivo per un'eccezione, si chieda a me.


  5.2.  Ringraziamenti

  Questo documento  stato concepito da Matt Welsh nei ritagli di tempo.
  Grazie, Matt!



  6.  Translations


    Italian <http://www.pluto.linux.it/ildp/HOWTO/XFree86-HOWTO.html>

    Slovenian <http://www.lugos.si/delo/slo/HOWTO-sl/XFree86-HOWTO-
     sl.html>

    Croatian <http://meta.mioc.hr/XFree86-KAKO.html>

    Dutch <http://www.nl.linux.org/doc/HOWTO/>

    Hungarian
     <http://www.ppk.ini.hu/texts/XFree86-HOGYAN/XFree86-HOGYAN.html>









  XFree86 Video Timings HOWTO
  Eric S. Raymond <esr@thyrsus.com>
  v4.1, 2 gennaio 2000

  Come comporre una "mode line" per la vostra combinazione scheda
  video/monitor su XFree86.  La distribuzione XFree86 ora ha reso pi
  agevole la configurazione della maggior parte delle combinazioni stan
  dard; questo documento  particolarmente utile se state ottimizzando
  una vostra "mode line" personale per un monitor ad alte prestazioni o
  per dell'hardware poco comune. Vi dar anche una mano sull'uso di
  kvideogen per generare le "mode line", o xvidtune per adattare una
  modalit standard che non  proprio quella adatta per il vostro moni
  tor. Traduzione di Angelo Nardoni <anardoni@mclink.it>

  1.  Avvertenze


  L'uso del presente materiale  UNICAMENTE A VOSTRO RISCHIO. 
  possibile danneggiare sia il monitor che voi stessi quando si
  sperimenta oltre le specifiche del produttore. Leggete
  ``Sovraccaricare il Vostro Monitor'' per precauzioni pi dettagliate.
  Qualsiasi danno a voi o al vostro monitor dovuto al suo sovraccarico 
  un problema vostro.

  La pi recente versione di questo HOWTO pu essere trovata alla pagina
  web Linux Documentation Project <http://metalab.unc.edu/LDP>.

  Siete pregati di indirizzare commenti, critiche e suggerimenti per
  migliorie a esr@snark.thyrsus.com. Siete pregati di non inviare email
  chiedendo una soluzione magica al problema speciale con il vostro
  monitor, perch cos facendo consumate solo il mio tempo e frustrer
  voi -- tutto quello che so sull'argomento  gi qui dentro.


  2.  Introduzione


  Il server XFree86 permette agli utenti di configurare i loro
  sottosistemi video e quindi incoraggia ad un miglior uso dell'hardware
  esistente. Questo tutorial intende aiutarvi ad imparare a generare i
  vostri propri valori di temporizzazione per sfruttare al meglio la
  vostra scheda video e il vostro monitor.

  Presenteremo un metodo per ottenere qualcosa che funziona, quindi vi
  mostreremo come sperimentare partendo da una base comune per
  sviluppare delle specifiche ottimizzate alle vostre esigenze.

  Se gi avete una modalit che funziona discretamente (in particolare,
  se una delle modalit VESA predefinite vi d uno schermo stabile ma
  spostato troppo a sinistra o a destra, o troppo piccolo, o troppo
  largo) potete andare direttamente alla sezione ``Risolvere i Problemi
  con l'Immagine''.  Questa vi sveler le possibilit di manipolare i
  valori di temporizzazione per ottenere effetti particolari.

  Non pensiate di dover conoscere sin nei minimi particolari tutte le
  regolazioni delle "mode line" solo perch il vostro X vi appare
  completamente sballato la prima volta dopo l'installazione; pu essere
  che la maggior parte delle "mode line" fornite dalla distribuzione
  sono OK e voi siete capitati in una che non si adatta al vostro
  hardware. Invece, provate tutte le vostre "mode line" con CTRL-ALT-+.
  Se qualcuna di queste sembra OK, provate a renderle inattive
  commentandole tutte eccetto una 640x480 e controllando che quella
  funzioni. Se funziona rendete attive scommentandole un paio di altre
  "mode line", ad esempio una 800x600 e una 1024x768 ad una frequenza
  che il vostro monitor dovrebbe essere in grado di gestire.

  3.  Strumenti per il Calcolo Automatico


  Se avete un monitor relativamente nuovo (dal 1996 in poi) che supporti
  le specifiche PnP, potreste usare il programma read-edid per chiedere
  al monitor le proprie caratteristiche e calcolare una "mode line" per
  voi. Visitate <http://altern.org/vii/programs/linux/read-edid/>.

  Da XFree86 3.2 in poi, XFree86 fornisce un programma XF86Setup(1) che
  rende facile generare interattivamente una modalit funzionante per il
  monitor, senza avere a che fare direttamente con i valori delle
  temporizzazioni video. Cos il pi delle volte non dovete calcolare
  una modalit base per il monitor. Sfortunatamente, XF86Setup(1) ha
  alcune limitazioni; riconosce solo modalit video standard fino a
  1280x1024. Se avete un monitor ad alte prestazioni capace di 1600x1200
  o pi dovrete sempre calcolare la modalit base da soli.

  C' un'applicazione KDE chiamata KVideoGen
  <http://without.netpedia.net/kvideogen/> che genera le "mode line"
  dalle caratteristiche del monitor e della scheda video.  Ho provato a
  generare "mode line" con questa applicazione, ma non le ho provate.
  Notate che i suoi parametri di refresh orizzontale e verticale sono
  gli stessi delle frequenze di sincronismo HSF e VSF che descriviamo
  dopo.  L'impulso di sincronismo orizzontale sembra essere una
  larghezza di impulso di sincronia in microsecondi, HSP (con
  l'applicazione che d per fissi il 'piedistallo frontale' HGT1 e il
  'piedistallo secondario' HGT2). Se non conoscete il valore
  dell'impulso di sincronia orizzontale  pi sicuro usare quello di
  default.

  Versioni recenti di XFree86 offrono uno strumento chiamato xvidtune(1)
  che troverete probabilmente abbastanza utile per testare e
  perfezionare le modalit video. Parte con uno spaventoso avviso sulle
  possibili conseguenze se si fanno errori usandolo.  Se prestate
  un'accurata attenzione a questo documento e imparate cosa c' dietro
  quei simpatici numeri nei riquadri di xvidtune, saprete usare
  effettivamente e con confidenza xvidtune.

  Se avete xvidtune(1), potrete provare nuove modalit al volo, senza
  modificare i vostri file di configurazione per X o resettare il server
  X.  Altrimenti, XFree86 vi permette di spostarvi con la tastiera fra
  differenti modalit definite in Xconfig (vedi XFree86.man per
  dettagli). Usate questa capacit per risparmiarvi problemi!  Quando
  volete provare una nuova modalit, chiamatela in modo univoco e
  aggiungetela alla fine della vostra lista di combinazioni di tasti.
  Lasciate una modalit che sapete che funziona bene come default per
  poter tornare l se la modalit che state provando non funziona.

  Verso la fine di questo documento, includeremo uno script 'modeplot'
  che potrete usare per produrre un grafico analogico delle possibili
  "mode line".  Ci non  direttamente utile per generare "mode line",
  ma vi pu aiutare per capire meglio le relazioni che le definiscono.


  4.  Come Funziona lo Schermo


  Sapere come funziona lo schermo video  fondamentale per capire quali
  valori mettere nei vari campi del file Xconfig.  Questi valori sono
  usati al pi basso livello di controllo dello schermo dal server
  XFree86.

  Lo schermo genera un quadro con quello che considerate essere una
  serie di punti raster. I punti sono disposti da sinistra a destra per
  formare delle linee. Le linee sono disposte dall'alto in basso per
  formare il quadro. I punti emettono luce quando sono colpiti dal
  fascio elettronico dentro lo schermo.  Per far s che il fascio
  colpisca ciascun punto per un uguale periodo di tempo, il fascio 
  diretto sullo schermo con un percorso costante, detto raster.

  Abbiamo detto "quello che considerate essere una serie di punti"
  perch questi punti raster non corrispondono propriamente ai fosfori.
  I fosfori sono molto pi piccoli dei punti raster -- lo devono essere,
  altrimenti lo schermo mostrerebbe gravi effetti-moir. I punti raster
  sono in realt campioni del segnale analogico, e si vedono come una
  griglia di punti solo perch i picchi nel segnale sono molto regolari
  e spaziati con precisione.

  Il percorso parte in alto a sinistra sullo schermo, attraversa lo
  schermo verso destra con una linea diritta, e si ferma temporaneamente
  sul lato destro dello schermo. Poi il fascio  riportato indietro sul
  lato sinistro, ma sotto di una linea. La nuova linea va da sinistra a
  destra proprio come la prima.  Questo percorso  ripetuto fino a che
  l'ultima linea in fondo allo schermo  stata passata.  Allora il
  fascio viene portato dall'angolo in basso a destra (spazzando avanti e
  indietro un p di volte) all'angolo in alto a sinistra, e il percorso
  viene ripetuto.

  C' una variante di questo schema conosciuto come interlacciamento:
  qui solamente ogni linea pari  passata ogni mezzo quadro e quelle
  dispari sono tracciate durante il secondo mezzo quadro.

  Quando il fascio parte dall'angolo superiore sinistro dello schermo 
  detto inizio di quadro. Il quadro termina quando il fascio raggiunge
  l'angolo superiore sinistro di nuovo venendo dall'angolo inferiore
  destro dello schermo. Un quadro  composto da tutte le linee tracciate
  dal fascio dall'alto in basso dello schermo.

  Se il fascio degli elettroni funzionasse per tutto il tempo che
  attraversa il quadro, tutti i punti dello schermo sarebbero accesi.
  Non ci sarebbero bordi neri ai lati dello schermo. Ai lati dello
  schermo il quadro sarebbe distorto perch  difficile controllare il
  fascio in quei punti. Per ridurre la distorsione, i punti vicino ai
  lati dello schermo non sono illuminati dal fascio (perch sono spenti)
  anche se questo, se fossero accesi, li puntasse.  L'area visibile
  dello schermo  ridotta in questo modo.

  Un'altra cosa importante da capire  cosa succede del fascio quando
  nessuna cosa  disegnata nell'area visibile. Il tempo che il fascio
  avrebbe dovuto usare per illuminare i lati sinistro e destro dello
  schermo  invece usato per portare il fascio indietro da destra a
  sinistra e per muoverlo gi alla linea successiva. Il tempo che il
  fascio avrebbe dovuto usare per illuminare i lati superiore ed
  inferiore dello schermo  usato per muovere il fascio dall'angolo in
  basso a destra all'angolo in alto a sinistra.

  La scheda video genera i segnali che permettono allo schermo di
  accendere il fascio (del colore voluto) ad ogni punto per generare un
  quadro. La scheda controlla anche quando lo schermo muove il fascio da
  destra a sinistra e gi di una riga generando un segnale chiamato sync
  (per sincronismo) orizzontale.  C' un impulso di sincronismo
  orizzontale alla fine di ogni linea. La scheda genera anche un impulso
  di sincronismo verticale che segnala allo schermo quando muovere il
  fascio dall'angolo sinistro in alto dello schermo. Un impulso di
  sincronismo verticale  generato quasi alla fine di ogni quadro.

  Lo schermo richiede che ci sia un breve lasso di tempo sia prima che
  dopo gli impulsi di sincronismo orizzontale e verticale cos che si
  possa stabilizzare la posizione del fascio di elettroni. Se il fascio
  non pu stabilizzarsi, il quadro non sar nitido.


  Per maggiori informazioni, consultate TV and Monitor Deflection System
  <http://fribble.cie.rpi.edu/~repairfaq/REPAIR/F_deflfaq.html>.

  In una sezione pi avanti, torneremo su queste nozioni basilari con
  definizioni, formule ed esempi per aiutarvi ad usarle.


  5.  Cose Basilari da Sapere sul Vostro Schermo e la Scheda Video


  Ci sono delle cose fondamentali da sapere prima di sperimentare con i
  valori di Xconfig.  Sono:


    le opzioni di frequenza di sincronismo orizzontale e verticale del
     vostro monitor

    la larghezza di banda del vostro monitor

    la frequenza della vostra scheda video, o "dot clock".


  5.1.  Le frequenze di sincronismo del monitor

  La frequenza di sincronismo orizzontale  semplicemente il numero di
  volte al secondo che il monitor pu scrivere una linea di scansione
  orizzontale;  la pi importante informazione sul vostro monitor. La
  frequenza di sincronismo verticale  il numero di volte al secondo
  alla quale il monitor pu far attraversare il fascio verticalmente
  sullo schermo.

  Le frequenze di sincronismo di solito sono elencate nelle specifiche
  del manuale del monitor.  Il valore della frequenza di sincronismo
  verticale  tipicamente calibrato in Hz (cicli per secondo), quello
  orizzontale in KHz (kilocicli per secondo).  Le comuni gamme di valori
  sono fra 50 e 150Hz verticali, e fra 31 e 135KHz orizzontali.

  Se avete un monitor multifrequenza, queste frequenze saranno date come
  gamma di valori.  Alcuni monitor, specialmente quelli pi scadenti,
  hanno svariate frequenze fisse.  Anche queste possono essere
  configurate, ma le vostre possibilit saranno molto limitate dalle
  caratteristiche proprie del monitor. Scegliete il paio di frequenze
  pi alte per la migliore risoluzione. E state attenti --- provare a
  mandare un monitor a frequenza fissa ad una velocit di clock pi alta
  di quella per la quale  stato costruito lo pu facilmente
  danneggiare.

  Le prime versioni di questa guida erano piuttosto permissive
  sull'overclocking di monitor multifrequenza, spingendoli oltre la loro
  pi alta frequenza verticale di sincronismo per ottenere migliori
  risultati. Da allora abbiamo pi ragioni per essere cauti
  sull'argomento; le vedremo nel paragrafo ``Sovraccaricare il Monitor''
  pi avanti.


  5.2.  La larghezza di banda video del monitor

  La larghezza di banda video del vostro monitor dovrebbe essere inclusa
  nelle pagine delle specifiche del manuale. Se non ci fosse, guardate
  la pi alta risoluzione del monitor. Indicativamente, ecco come
  tradurla in larghezza di banda approssimativa (e quindi nei limiti
  superiori approssimati per il dot clock che potete usare):




          640x480                 25
          800x600                 36
          1024x768                65
          1024x768 interlaced     45
          1280x1024               110
          1600x1200               185




  Per inciso, non c' nulla di magico in questa tabella; questi numeri
  sono solo i pi bassi dot clock per una data risoluzione nel database
  standard delle Modalit XFree86 (a parte l'ultimo, che ho interpolato
  io). La larghezza di banda del vostro monitor potrebbe essere pi alta
  del minimo richiesto per la sua massima risoluzione, cos non abbiate
  paura a provare un dot clock di pochi MHz pi alto.

  Notate anche che la larghezza di banda  raramente un limite per i dot
  clock sotto i 65 MHz o gi di l. Con una scheda SVGA e la maggior
  parte dei monitor ad alta risoluzione, non potete andare troppo vicino
  ai limiti della larghezza di banda video del vostro monitor. Ecco
  alcuni esempi:



               Marca                           Larghezza di Banda Video
               ----------                      ---------------
               NEC 4D                          75Mhz
               Nano 907a                       50Mhz
               Nano 9080i                      60Mhz
               Mitsubishi HL6615               110Mhz
               Mitsubishi Diamond Scan         100Mhz
               IDEK MF-5117                    65Mhz
               IOCOMM Thinksync-17 CM-7126     136Mhz
               HP D1188A                       100Mhz
               Philips SC-17AS                 110Mhz
               Swan SW617                      85Mhz
               Viewsonic 21PS                  185Mhz
               PanaSync/Pro P21                220Mhz




  Anche i monitor di fascia bassa di solito non sono terribilmente
  legati alle loro date risoluzioni. Il NEC Multisync II  un buon
  esempio --- non pu neanche raggiungere 800x600 per le sue specifiche.
  Pu raggiungere solo 800x560. Per tali basse risoluzioni non vi
  servono alti dot clock o molta larghezza di banda; probabilmente il
  meglio che potete fare  32Mhz o 36Mhz, entrambi non sono troppo
  lontani dalla larghezza di banda video del monitor di 30Mhz.

  A queste due frequenze video, l'immagine sul vostro schermo potrebbe
  non essere cos chiara come dovrebbe, ma certamente di qualit
  tollerabile.  Naturalmente sarebbe stato meglio se il NEC Multisync II
  avesse avuto una larghezza di banda video pi alta, tipo 36Mhz. Ma
  questo non  critico per impieghi comuni come editare testi, in quanto
  le differenze non sono cos grandi da causare forti distorsioni
  dell'immagine (i vostri occhi ve lo direbbero subito se cos fosse).


  5.3.  La frequenza di clock della scheda video

  La pagina delle specifiche del manuale della vostra scheda video di
  solito vi dar il valore massimo del dot clock della scheda (che
  sarebbe il numero totale dei pixel al secondo che pu scrivere sullo
  schermo).
  Se non avete questa informazione, ve la dar il server X. Le versioni
  recenti dei server X supportano tutte l'opzione --probeonly che rileva
  questa informazione ed esce senza neanche far partire X o senza
  cambiare la modalit video.

  Se non avete -probeonly, non disperate. Anche se il vostro X vi blocca
  il monitor, scriver una riga di valori di clock ed altre informazioni
  sul log di errori standard. Se voi ridirigete queste ad un file,
  saranno salvate anche se dovete resettare per tornare alla console.

  Il risultato del tentativo o il vostro messaggio di partenza di X
  dovrebbe essere qualcosa di simile ad uno dei seguenti esempi:

  Se usate XFree86:


  Xconfig: /usr/X11R6/lib/X11/Xconfig
  (**) stands for supplied, (--) stands for probed/default values
  (**) Mouse: type: MouseMan, device: /dev/ttyS1, baudrate: 9600
  Warning: The directory "/usr/andrew/X11fonts" does not exist.
           Entry deleted from font path.
  (**) FontPath set to "/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/"
  (--) S3: card type: 386/486 localbus
  (--) S3: chipset:   924
                      ---
     Chipset - questo  l'esatto tipo di chip; una maschera precedente del 86C911

  (--) S3: chipset driver: s3_generic
  (--) S3: videoram:  1024k
                      -----
           Quantit di RAM della scheda

  (**) S3: clocks:  25.00  28.00  40.00   3.00  50.00  77.00  36.00  45.00
  (**) S3: clocks:   0.00   0.00  79.00  31.00  94.00  65.00  75.00  71.00
                    ------------------------------------------------------
                                  Possibili frequenze in MHz

  (--) S3: Maximum allowed dot-clock: 110MHz
                                      ------
                                Larghezza di banda

  (**) S3: Mode "1024x768": mode clock =  79.000, clock used =  79.000
  (--) S3: Virtual resolution set to 1024x768
  (--) S3: Using a banksize of 64k, line width of 1024
  (--) S3: Pixmap cache:
  (--) S3: Using 2 128-pixel 4 64-pixel and 8 32-pixel slots
  (--) S3: Using 8 pages of 768x255 for font caching



  Se usate SGCS o X/Inside X:


  WGA: 86C911 (mem: 1024k clocks: 25 28 40 3 50 77 36 45 0 0 79 31 94 65 75 71)
  ---  ------       -----         --------------------------------------------
   |     |            |                    Possibili frequenze in MHz
   |     |            +-- Quantit di RAM della scheda
   |     +-- Tipo di chip
   +-- Tipo di Server



  Nota: fate questo senza processi in background sulla vostra macchina
  (del tutto se possibile). Poich X  un'applicazione, le sue
  temporizzazioni possono collidere con l'attivit del disco, rendendo i
  valori di cui sopra inaccurati. Fatelo svariate volte e osservate i
  valori che si stabilizzano; se non dovessero farlo, cominciate a
  fermare i processi finch non lo fanno.  Il programma che gestisce il
  mouse, se ne avete uno, pu in particolare rendere fasulla la lettura
  dei valori (cio gpm per gli utenti Linux, mousemgr per gli utenti
  SVr4).

  Per evitare la inaccuratezza delle prove sui clock, dovreste
  appuntarvi le temporizzazioni del clock e metterle nel vostro Xconfig
  come valore delle propiet dei Clocks --- questo evita il loop delle
  temporizzazioni e d ad X una lista esatta dei valori di clock che pu
  provare. Usando i dati dell'esempio precedente:


  wga
          Clocks  25 28 40 3 50 77 36 45 0 0 79 31 94 65 75 71



  Su sistemi con un carico molto variabile, questo vi potrebbe evitare
  misteriosi fallimenti di partenza di X.  possibile per X partire,
  ottenere le temporizzazioni sbagliate a causa del carico del sistema,
  e quindi non essere capace di trovare un clock uguale nel suo database
  di configurazione --- o trovare quello sbagliato!


  5.4.  Cosa controllano questi dati basilari


  La gamma di frequenze di sincronismo del vostro monitor, insieme con
  il dot clock della scheda video, determinano la risoluzione definitiva
  che potete usare.  Ma  compito del driver intercettare il potenziale
  del vostro hardware.  Avere una combinazione hardware di qualit senza
  un device driver egualmente valido  come buttare i soldi. D'altra
  parte, con un device driver versatile insieme ad un hardware meno
  capace potete spingere un pochino le caratteristiche dell'hardware.
  Questa  la filosofia progettuale di XFree86.

  Dovreste far combaciare il dot clock che usate con la larghezza di
  banda video del monitor. Ci sono molte possibilit, comunque ---
  alcuni monitor possono funzionare il 30% oltre la loro larghezza di
  banda nominale. Il rischio qui  eccedere la frequenza di
  sincronizzazione verticale massima del monitor; ne discuteremo in
  dettaglio pi avanti.

  Sapere la larghezza di banda vi permetter di fare scelte pi
  intelligenti fra le possibili configurazioni. Ci pu cambiare la
  qualit visiva dello schermo (specialmente la nitidezza nei dettagli).


  6.  Interpretare le Specifiche di Base


  Questa sezione spiega cosa significano le specifiche precedenti, e
  alcune altre cose che dovete sapere. Prima, alcune definizioni.
  Accanto a ciascuna definizione la sigla che useremo per fare calcoli,
  fra parentesi:


     frequenza di sincronismo orizzontale (HSF)
        Scansioni orizzontali al secondo (vedi sopra).


     frequenza di sincronismo verticale (VSF)
        Scansioni verticali al secondo (vedi sopra).  Principalmente
        importante come limite superiore della vostra frequenza di
        refresh.
     dot clock (DCF)
        Pi formalmente, 'frequenza di clock'; la frequenza del quarzo o
        VCO della vostra scheda video --- il numero massimo dei punti-
        al-secondo che pu emettere.


     larghezza di banda video (VB)
        La pi alta frequenza che potete immettere nell'input del
        monitor e ancora aspettarvi di vedere qualcosa. Se la vostra
        scheda produce una trama di accensioni-spegnimenti alternati, la
        sua frequenza pi bassa sar met del DCF, cos in teoria la
        larghezza di banda comincia ad avere senso a DCF/2. Per una
        videata sufficientemente nitida di piccoli dettagli
        nell'immagine video, comunque, non la vorrete molto pi bassa
        del vostro pi alto DCF, e preferibilmente pi alta.


     larghezza e lunghezza di quadro (HFL, VFL)
        La larghezza orizzontale del quadro (HFL)  il numero di impulsi
        del dot clock necessari al pennello elettronico del vostro
        monitor per scandire una linea orizzontale, inclusi i bordi
        inattivi sinistro e destro. La lunghezza di quadro verticale
        (VFL)  il numero di linee scandite nell'intera immagine inclusi
        i bordi inattivi superiore ed inferiore.


     frequenza di refresh dello schermo (RR)
        Il numero di volte al secondo che il vostro schermo viene
        ridisegnato (ci  anche detta "frequenza di quadro"). Pi sono
        alte le frequenze, meglio , perch riducono lo sfarfallio.
        60Hz va bene, lo standard VESA di 72Hz  meglio.  Calcolatelo
        come


                  RR = DCF / (HFL * VFL)




     Notate che il prodotto nel denominatore non  lo stesso della
     risoluzione visibile del monitor, ma tipicamente un po' pi grande.
     Andremo nel dettaglio pi avanti.

     Le frequenze che sono usualmente specificate per le modalit
     interlacciate (come 87Hz interlacciati) sono frequenze di met
     quadro: un intero schermo sembra avere all'incirca quella frequenza
     per gli schermi standard, ma ogni singola linea  ridisegnata solo
     met delle volte.

     Per scopi di calcolo noi riconosciamo uno schermo interlacciato
     dalla sua frequenza a schermo intero (refresh), per esempio 43.5Hz.
     La qualit di una modalit interlacciata  migliore di quella di
     una modalit non-interlacciata alla stessa frequenza per il quadro
     intero, ma sicuramente peggio di quella non-interlacciata
     corrispondente alla frequenza di met quadro.


  6.1.  Sulla larghezza di banda


  Ai costruttori di monitor piace dichiarare ampie larghezze di banda
  perch questo aumenta la nitidezza dell'intensit e del cambio dei
  colori sullo schermo. Un'ampia larghezza di banda significa vedere
  dettagli pi piccoli.


  Il vostro monitor usa segnali elettronici per presentare un'immagine
  ai vostri occhi. Tali segnali arrivano sempre in forma d'onda una
  volta che sono convertiti in forma analogica da digitale. Possono
  essere considerati come combinazioni di molte forma d'onda pi
  semplici ognuna delle quali ha una frequenza fissa, molte di esse sono
  nella gamma dei Mhz, per esempio, 20Mhz, 40Mhz, o anche 70Mhz. La
  larghezza di banda del vostro monitor , effettivamente, la pi alta
  frequenza di segnale analogico che pu sopportare senza distorsioni.

  Per i nostri scopi, la larghezza di banda video  principalmente
  importante come un approssimativo punto di partenza per il pi alto
  dot clock che potete usare.


  6.2.  Frequenze di sincronismo e la frequenza di refresh


  Ogni linea di scansione orizzontale sul display  solo la porzione
  visibile della scansione del quadro. Ad ogni istante c' un solo punto
  acceso sullo schermo, ma con una frequenza di refresh abbastanza alta
  la persistenza della vista dei vostri occhi vi permette di "vedere"
  l'intera immagine.

  Ecco alcuni disegni che possono aiutare:


       _______________________
      |                       |     La frequenza di sincronismo orizzontale
      |->->->->->->->->->->-> |      il numero di volte al secondo
      |                      )|     al quale il pennello elettronico
      |<-----<-----<-----<--- |     del monitor pu tracciare
      |                       |     un disegno tipo questo
      |                       |
      |                       |
      |                       |
      |_______________________|
       _______________________
      |        ^              |     La frequenza di sincronismo verticale
      |       ^ |             |      il numero di volte al secondo
      |       | v             |     al quale il pennello elettronico
      |       ^ |             |     del monitor pu tracciare
      |       | |             |     un disegno tipo questo
      |       ^ |             |
      |       | v             |
      |       ^ |             |
      |_______|_v_____________|



  Ricordate che la scansione  un disegno a zigzag molto stretto; cio,
  il pennello va da sinistra a destra e contemporaneamente su e gi.

  Ora possiamo vedere come il dot clock e la grandezza dello schermo si
  mettono in relazione con la frequenza di refresh. Per definizione, un
  hertz (Hz)  un ciclo al secondo. Cos, se la vostra larghezza di
  quadro orizzontale  HFL e la vostra lunghezza di quadro verticale 
  VFL, allora per coprire l'intero schermo servono (HFL * VFL) impulsi.
  Dal momento che la vostra scheda emette DCF impulsi al secondo per
  definizione, allora ovviamente il pennello elettronico del vostro
  monitor pu andare sullo schermo da sinistra a destra e dall'alto in
  basso e indietro DCF / (HFL * VFL) volte al secondo. Questa  la
  frequenza di refresh del vostro schermo, perch  quante volte il
  vostro schermo pu essere aggiornato (ovvero "rinfrescato") ogni
  secondo!


  Dovete capire questo concetto per ottenere una configurazione che medi
  la risoluzione con lo sfarfallio in un modo qualsiasi che rispetti i
  vostri bisogni.

  Per coloro che capiscono meglio i disegni del testo, eccone uno:


          RR                                      VB
           |   min HSF                     max HSF |
           |    |             R1        R2  |      |
  max VSF -+----|------------/----------/---|------+----- max VSF
           |    |:::::::::::/::::::::::/:::::\     |
           |    \::::::::::/::::::::::/:::::::\    |
           |     |::::::::/::::::::::/:::::::::|   |
           |     |:::::::/::::::::::/::::::::::\   |
           |     \::::::/::::::::::/::::::::::::\  |
           |      \::::/::::::::::/::::::::::::::| |
           |       |::/::::::::::/:::::::::::::::| |
           |        \/::::::::::/:::::::::::::::::\|
           |        /\:::::::::/:::::::::::::::::::|
           |       /  \:::::::/::::::::::::::::::::|\
           |      /    |:::::/:::::::::::::::::::::| |
           |     /     \::::/::::::::::::::::::::::| \
  min VSF -+----/-------\--/-----------------------|--\--- min VSF
           |   /         \/                        |   \
           +--/----------/\------------------------+----\- DCF
             R1        R2  \                       |     \
                            min HSF                |    max HSF
                                                   VB



  Questo  un diagramma di modalit di un monitor generico. L'asse x del
  diagramma mostra la frequenza del clock (DCF), l'asse y rappresenta la
  frequenza di refresh (RR). La regione riempita del diagramma descrive
  le capacit del monitor: ogni punto entro questa regione  una
  possibile modalit video.

  Le linee etichettate 'R1' e 'R2' rappresentano una risoluzione fissa
  (tipo 640x480); vogliono mostrare come una risoluzione pu essere
  realizzata da svariate differenti combinazioni di dot clock e
  frequenza di refresh. La linea R2 rappresenterebbe una risoluzione pi
  alta di R1.

  Gli spazi in alto e in basso della regione valida sono semplici linee
  orizzontali che rappresentano i valori limite per la frequenza di
  sincronismo verticale.  La larghezza di banda video  un limite
  superiore della frequenza di clock e quindi  rappresentato da una
  linea verticale che affianca la regione delle possibilit a destra.

  In ``Tracciare le Capacit del Monitor'' troverete un programma che vi
  aiuter a disegnare un diagramma tipo questo (ma molto pi carino, con
  grafica X) per il vostro monitor. Quella sezione tratter anche la
  parte interessante; la derivazione degli spazi attorno all'immagine
  risultante dai limiti sulla frequenza di sincronismo orizzontale.


  7.  Compromessi nel Configurare il Sistema


  Un altro modo di guardare alla formula che abbiamo derivato prima 


               DCF = RR * HFL * VFL


  Cio, il vostro dot clock  fisso. Potete usare questi punti al sec
  ondo per guadagnare sia frequenza di refresh, sia risoluzione orizzon
  tale, sia risoluzione verticale. Se uno di questi aumenta, uno o
  entrambi gli altri deve diminuire.

  Notate, comunque, che la vostra frequenza di refresh non pu essere
  pi grande della massima frequenza verticale di sincronismo del
  monitor. Cos, per ogni monitor ad un dato dot clock, c' un prodotto
  minimo di lunghezze di quadro sotto il quale non potete andare.

  Nello scegliere i vostri parametri, ricordate: se mettete RR troppo
  basso, farete una smorfia per lo sfarfallio dello schermo.

  Probabilmente non vorrete spingere la frequenza di refresh sotto i
  60Hz.  Questa  la frequenza di sfarfallio delle luci al neon; se
  siete sensibili a queste, dovrete orientarvi verso i 72Hz, lo standard
  ergonomico VESA.

  Lo sfarfallio  molto affaticante per gli occhi, anche se gli occhi
  umani sono adattabili e la tolleranza della gente ad esso  assai
  varia. Se siete di fronte al vostro monitor ad un angolo di 90, su
  sfondo scuro e un buon colore di contrasto, e un'intensit da bassa a
  media, voi *potete* stare bene anche a 45Hz.

  Il test  questo: aprite un xterminal con puro sfondo bianco e testo
  nero usando xterm -bg white -fg black e allargatelo cos da coprire
  tutta l'area visibile. Ora regolate la luminosit del monitor a 3/4
  del suo massimo, e girate la faccia lontano dal monitor. Provate a
  sbirciare il monitor (usando le pi sensibili cellule della visione
  periferica). Se non avvertite alcuno sfarfallio o pensate che quello
  che c'  tollerabile, allora la frequenza di refresh va bene per voi.
  Altrimenti  meglio che configuriate una pi alta frequenza di
  refresh, perch quel semi-invisibile sfarfallio vi affaticher gli
  occhi da morire e vi far venire il mal di testa, anche se lo schermo
  sembra OK a prima vista.

  Per le modalit interlacciate, l'ammontare dello sfarfallio dipende su
  pi fattori tipo la attuale risoluzione verticale e il contenuto della
  videata.  Cos sperimentate. Anche se non dovreste andare molto sotto
  agli 85Hz per met quadro, comunque.

  Cos diciamo che avete scelto una frequenza di refresh minimamente
  accettabile.  Nello scegliere il vostro HFL e VFL, avrete un po' di
  spazio di manovra.



  8.  Requisiti di Memoria

  La RAM disponibile per il buffer di quadro pu limitare la risoluzione
  che potete ottenere su schermi a colori o in scala di grigi.
  Probabilmente non  cos importante su schermi che hanno solo due
  colori, bianco e nero senza gradazioni di grigio.

  Per gli schermi a 256 colori, un byte di memoria video  richiesto per
  ogni punto visibile. Questo byte contiene l'informazione che determina
  quale mistura di rosso, verde e blu deve essere generata per quel
  punto. Per ottenere la quantit di memoria richiesta, moltiplicate il
  numero di punti visibili per linea per il numero di linee visibili.
  Per uno schermo con una risoluzione di 1024x768, questa sarebbe 1024 x
  768 = 786432, che  il numero di punti visibili sullo schermo. Questo
   anche, a un byte per punto, il numero di byte di memoria video che
  sono necessari sulla vostra scheda video.

  Cos, la memoria video richiesta sar tipicamente (HR * VR)/1024
  Kbytes di VRAM, arrotondati (sarebbero esattamente 768K nell'esempio
  precedente). Se avete pi memoria di quella strettamente richiesta, ne
  avrete extra per il panning di schermo virtuale.

  Comunque, se avete solo 512K sulla vostra scheda video, allora non
  potete usare questa risoluzione. Anche se avete un buon monitor, ma
  non abbastanza video RAM, non potete avvantaggiarvi della potenzialit
  del vostro monitor. D'altra parte, se la vostra SVGA ha un mega, ma il
  vostro monitor pu visualizzare al massimo 800x600, allora l'alta
  risoluzione  per voi irraggiungibile (vedi ``Usare le Modalit
  Interlacciate'' per un possibile rimedio).

  Non vi preoccupate se avete pi memoria di quella richiesta; XFree86
  la user per permettervi di scrollare l'area visibile (vedi il file di
  documentazione di Xconfig sul parametro dell'ampiezza dello schermo
  virtuale). Ricordate anche che una scheda con 512K byte di memoria non
  ha realmente 512,000 byte installati, ne ha 512 x 1024 = 524,288 byte.

  Se usate X/Inside con una scheda video S3, e volete campare con 16
  colori (4 bit per pixel), potete settare la profondit a 4 in Xconfig
  ed effettivamente raddoppiare la risoluzione che pu gestire la scheda
  video. Le schede S3, ad esempio, normalmente fanno 1024x768x256.
  Potete farle fare 1280x1024x16 con profondit 4.


  9.  Calcolare le Ampiezze di Quadro


  Attenzione: questo metodo  stato sviluppato per monitor multisync.
  Probabilmente funzioner lo stesso con monitor a frequenza fissa, ma
  non ci sono garanzie!

  Iniziate dividendo DCF per il vostro massimo HSF per ottenere la
  larghezza di quadro orizzontale.

  Per esempio: supponiamo che avete un Sigma Legend SVGA con un dot
  clock a 65MHz, ed il vostro monitor ha una frequenza di scansione
  orizzontale di 55KHz. La quantit (DCF / HSF)  allora 1181 (65MHz =
  65000KHz; 65000/55 = 1181).

  Ecco il nostro primo assaggio di magia. Dovete arrotondare al pi
  vicino multiplo di 8. Questo ha a che fare con il controller hardware
  VGA usato dalla SVGA e dalle schede S3; usa un registro a 8-bit,
  spostato a sinistra di 3 bit, per cui  in realt una quantit di
  11-bit. Altri tipi di schede tipo la ATI 8514/A pu non aver bisogno
  di questo, ma non lo sappiamo e correggere non far male. Cos
  arrotondiamo la configurazione della larghezza orizzontale di quadro a
  1176.

  Questa configurazione (DCF / HSF arrotondato ad un multiplo di 8)  il
  minimo HFL che potete usare. Potete ottenere HFL pi lunghi (e cos,
  possibilmente, pi punti orizzontali sullo schermo) settando l'impulso
  di sincronismo in modo da produrre un HSF pi basso. Ma lo pagherete
  con una frequenza pi bassa e sfarfallio pi visibile.

  In genere,  disponibile l'80% della larghezza orizzontale di quadro
  per la risoluzione orizzontale, la parte visibile della linea scandita
  orizzontale (questo permette, all'incirca, di avere i bordi e il tempo
  per il pennello di tornare indietro -- cio, il tempo necessario al
  pennello di muoversi dal lato destro dello schermo al lato sinistro
  della prossima linea).  In questo esempio, sarebbero 944 impulsi.

  Ora, per ottenere il normale rapporto della visualizzazione dello
  schermo di 4:3, settate la risoluzione verticale a 3/4 della
  risoluzione orizzontale che avete appena calcolato. Per il nostro
  esempio, sarebbero 708 impulsi. Per ottenere il vostro attuale VFL,
  moltiplicatelo per 1.05 per ottenere 743 impulsi.
  Il 4:3 non  una meraviglia della tecnica; nulla vi vieta di usare un
  rapporto a Sezione Aurea se questo vi permette di usare al meglio il
  vostro monitor. Questo rende conveniente calcolare l'altezza e la
  larghezza del quadro dalla diagonale, dovete solo moltiplicare la
  diagonale per 0.8 per ottenere la larghezza e per 0.6 per avere
  l'altezza.

  Cos, HFL=1176 e VFL=743. Dividendo 65MHz per il prodotto dei due ci
  d una bella e piena di salute frequenza di refresh di 74.4Hz.
  Eccellente! Meglio dello standard VESA! E avrete 944x708
  all'accensione, pi dell'800 per 600 che probabilmente vi aspettavate.
  Proprio mica male!

  Potreste anche aumentare la frequenza di refresh fino a circa 76 Hz,
  sfruttando il fatto che i monitor spesso possono sincronizzarsi
  orizzontalmente a circa 2khz pi delle specifiche, e in qualche modo
  abbassando lo VFL (che sarebbe, prendere meno del 75% di 944
  nell'esempio precedente). Ma prima di provare questa manovra di
  "sovraccarico", se lo fate, siate sicuri che i pennelli elettronici
  del vostro monitor possano sincronizzarsi verticalmente fino a 76 Hz.
  (Il popolare NEC 4D, ad esempio, non pu. Arriva solo fino a 75 Hz
  VSF). (Vedi ``Sovraccaricare il Monitor'' per una discussione pi
  generale su quest'argomento.)

  Fino a qui, il pi  semplice aritmetica e fatti basilari sugli
  schermi raster.  Proprio poca magia nera!


  10.  Magia Nera e Impulsi di Sincronismo


  OK, ora avete calcolato i valori di HFL/VFL per il dot clock scelto,
  trovato la frequenza di refresh accettabile, e controllato di avere
  abbastanza VRAM.  Adesso facciamo la vera magia nera -- vi serve di
  sapere quando e dove piazzare gli impulsi di sincronismo.

  Gli impulsi di sincronismo effettivamente controllano le frequenze di
  scansione orizzontale e verticale del monitor. Gli HSF e VSF che avete
  tirato fuori dalla pagina delle specifiche del manuale sono nominali e
  approssimative frequenze massime di sincronismo. L'impulso di
  sincronismo nel segnale della scheda video dice al monitor quanto
  veloce deve andare.

  Ricordate le due figure precedenti? Solamente parte del tempo
  richiesto per tracciare (raster-scanning) un quadro  usata per
  mostrare l'immagine visibile (per esempio la vostra risoluzione).


  10.1.  Sincronismo orizzontale


  Secondo la precedente definizione, ci vogliono HFL impulsi per
  tracciare una linea di scansione orizzontale. Chiamiamo il numero di
  impulsi visibili (la risoluzione orizzontale dello schermo) HR.
  Quindi, ovviamente, HR < HFL per definizione.  Per praticit,
  assumiamo che entrambi partano allo stesso istante come mostrato qui
  sotto:









    |___ __ __ __ __ __ __ __ __ __ __ __ __
    |_ _ _ _ _ _ _ _ _ _ _ _                |
    |_______________________|_______________|_____
    0                       ^               ^     unit: impulsi
                            |   ^       ^   |
                            HR  |       |  HFL
                            |   |<----->|   |
                            |<->|  HSP  |<->|
                            HGT1         HGT2



  Ora, noi vorremmo piazzare un impulso di sincronismo di lunghezza HSP
  come mostrato sopra, ad esempio, fra la fine degli impulsi di clock
  per mostrare dati e la fine degli impulsi di clock per l'intero
  quadro. Perch cos? Perch se possiamo ottenere ci, allora
  l'immagine sullo schermo non si sposter a destra o a sinistra.
  L'immagine sar dove dovrebbe essere sullo schermo, coprendo
  all'incirca tutta l'area visibile del monitor.

  In pi, vogliamo circa 30 impulsi di "tempo di guardia" ad entrambi i
  lati dell'impulso di sincronismo. Questo  rappresentato da HGT1 e
  HGT2. In una configurazione tipica HGT1 != HGT2, ma se state facendo
  una configurazione da zero, vorrete far partire le vostre
  sperimentazioni con loro uguali (cio, con l'impulso di sincronismo
  centrato).

  Il sintomo di un impulso di sincronismo non centrato  che l'immagine
  appare a schermo con un bordo troppo largo e l'altro lato
  dell'immagine che si ripiega su se stessa, producendo un spesso bordo
  bianco e una striscia di "immagine fantasma" da quella parte. Un
  impulso verticale fuori misura pu far girare il quadro come sui
  televisori quando non  regolato bene il sincronismo verticale
  (infatti,  lo stesso fenomeno in azione).

  Se siete fortunati, le larghezze degli impulsi di sincronismo del
  vostro monitor saranno documentate sulle pagine delle specifiche del
  manuale. Altrimenti, ecco dove inizia la vera magia nera...

  Dovete un po' provare, sbagliare e riprovare in questa parte. Ma il
  pi delle volte, possiamo sicuramente supporre che un impulso di
  sincronismo  lungo dai 3.5 ai 4.0 microsecondi.

  Ancora per praticit, diciamo che HSP  3.8 microsecondi (che poi,
  detto fra noi, non  un cattivo valore di partenza quando si
  sperimenta).

  Ora, usando la temporizzazione di 65Mhz come in precedenza, sappiamo
  che HSP  equivalente a 247 impulsi di clock (= 65 * 10**6 * 3.8 *
  10^-6) [ricordate che M=10^6, micro=10^-6]

  Ad alcuni costruttori piace specificare i loro parametri di quadro
  orizzontale come tempi piuttosto che come larghezza di punti. Potreste
  vedere i seguenti valori:

     tempo attivo (HAT)
        Corrisponde a HR, ma in millisecondi.  HAT * DCF = HR.


     tempo di oscuramento (HBT)
        Corrisponde a (HFL - HR), ma in millisecondi.  HBT * DCF = (HFL
        - HR).


     piedistallo frontale (HFP)
        Questo  proprio HGT1.
     tempo di sincronismo
        Questo  proprio HSP.


     piedistallo secondario (HBP)
        Questo  proprio HGT2.



  10.2.  Sincronismo verticale


  Tornando alla figura precedente, come mettiamo i 247 impulsi di clock
  secondo quanto mostrato nel disegno?

  Usando il nostro esempio, HR  944 e HFL  1176. La differenza fra i
  due  1176 - 944=232 < 247! Ovviamente dobbiamo mettere un po' le cose
  a posto qui.  Cosa possiamo fare?

  La prima cosa  aumentare 1176 a 1184, e diminuire 944 a 936.  Adesso
  la differenza = 1184-936= 248. Hmm, pi vicino.

  Poi, invece di usare 3.8, usiamo 3.5 per calcolare HSP; quindi,
  abbiamo 65*3.5=227.  Sembra meglio. Ma 248 non  molto pi grande di
  227. Normalmente servono 30 impulsi o gi di l fra HR e l'inizio di
  SP, e lo stesso fra la fine di SP e HFL. E DEVONO essere multipli di
  otto! Siamo bloccati?

  No. Facciamo cos, 936 % 8 = 0, (936 + 32) % 8 = 0 anche. Ma 936 + 32
  = 968, 968 + 227 = 1195, 1195 + 32 = 1227. Hmm... questo non  male.
  Ma non  un multiplo di 8, cos lo arrotondiamo a 1232.

  Ma ora abbiamo un problema potenziale, l'impulso di sincronismo non 
  pi messo in mezzo fra h e H. Tranquillamente, usando la nostra
  calcolatrice troviamo che 1232 - 32 = 1200  anche lui un multiplo di
  8 e (1232 - 32) - 968 = 232 che corrisponde ad usare un impulso di
  sincronismo di 3.57 microsecondi, ancora ragionevole.

  In pi, 936/1232   0.76 o 76%, che non  lontano dall'80%, cos
  dovrebbe essere tutto a posto.

  Inoltre, usando l'attuale lunghezza di quadro orizzontale, noi in
  pratica chiediamo al nostro monitor di sincronizzarsi a 52.7khz (=
  65Mhz/1232) che  nelle sue capacit. Nessun problema.

  Usando le regole che abbiamo summenzionato, 936*75%=702, questa  la
  nostra nuova risoluzione verticale. 702 * 1.05 = 737, la nostra nuova
  altezza di quadro.

  La frequenza di refresh dello schermo = 65Mhz/(737*1232)=71.6 Hz.
  Questo  ancora eccellente.

  Disegnare il layout dell'impulso di sincronismo verticale  simile:


     |___ __ __ __ __ __ __ __ __ __ __ __ __
     |_ _ _ _ _ _ _ _ _ _ _ _                |
     |_______________________|_______________|_____
     0                      VR              VFL     unit: impulsi
                             ^   ^       ^
                             |   |       |
                             |<->|<----->|
                              VGT    VSP



  Facciamo partire l'impulso di sincronismo appena passata la fine degli
  impulsi di dati video verticali. VGT  il tempo di guardia verticale
  richiesto per l'impulso. La maggior parte dei monitor funzionano bene
  con un VGT di 0 (nessun tempo di guardia) e noi useremo questo valore
  nel nostro esempio.  Pochi monitor abbisognano di due o tre impulsi di
  tempo di guardia, e di solito non fa male aggiungerli.

  Tornando all'esempio: dal momento che per definizione della lunghezza
  di quadro, un impulso verticale  il tempo per tracciare un intera
  riga ORIZZONTALE, nel nostro esempio, questa sar 1232/65Mhz=18.95us.

  L'esperienza insegna che un impulso di sincronismo verticale dovrebbe
  rientrare nella gamma fra 50us e 300us. Come esempio usiamo 150us, che
  si traduce in 8 impulsi di clock verticale (150us/18.95us 8).

  Alcuni fabbricanti preferiscono dare i loro parametri di quadro
  verticale come temporizzazioni piuttosto che ampiezza di punti.
  Potrete vedere i seguenti valori:


     tempo attivo (VAT)
        Corrisponde a VR, ma in millisecondi.  VAT * VSF = VR.

     tempo di oscuramento (VBT)
        Corrisponde a (VFL - VR), ma in millisecondi.  VBT * VSF = (VFL
        - VR).

     piedistallo frontale (VFP)
        Questo  proprio VGT.

     sincronismo
        Questo  proprio VSP.

     piedistallo secondario (VBP)
        Questo  come un secondo tempo di guardia dopo l'impulso di
        sincronismo verticale. Spesso  zero.


  11.  Riassumendo


  Il file Xconfig "Table of Video Modes" contiene righe di numeri,
  essendo ogni riga una completa specificazione di una modalit di
  operazione X-server. I campi sono raggruppati in quattro sezioni, la
  sezione del nome, la sezione della frequenza di clock, la sezione
  orizzontale, e la sezione verticale.

  La sezione del nome contiene un campo, il nome della modalit video
  specificata nel resto della riga. Questo nome  riferito nella riga
  "Modes" della sezione Graphics Driver Setup nel file Xconfig. Il campo
  nome pu essere omesso se il nome di una riga precedente  lo stesso.

  La sezione della frequenza di clock contiene solo il campo della
  frequenza (che noi abbiamo chiamato DCF) della riga modalit video. Il
  valore di questo campo specifica quale dot clock  stato usato per
  generare i numeri delle sezioni seguenti.

  La sezione orizzontale consiste di quattro campi che specificano come
  ciascuna linea orizzontale deve essere generata. Il primo campo della
  sezione contiene il numero di punti per linea che saranno accesi per
  formare l'immagine (da noi chiamati HR). Il secondo campo (SH1) indica
  in quale punto partir l'impulso di sincronismo orizzontale. Il terzo
  campo (SH2) indica a quale punto finir l'impulso di sincronismo
  orizzontale. Il quarto campo specifica la larghezza totale del quadro
  (HFL).

  Anche la sezione verticale contiene quattro campi. Il primo campo
  contiene il numero di linee visibili che appariranno sullo schermo
  (VR). Il secondo campo (SV1) indica a quale linea partir l'impulso di
  sincronismo verticale. Il terzo campo (SV2) specifica a quale linea
  finir l'impulso verticale di sincronismo.  Il quarto campo contiene
  il totale dell'altezza del quadro (VFL).

  Esempio:


            #Nome Mod.    clock  temporiz. oriz.   temporiz. vert.

            "752x564"     40    752 784  944 1088  564 567 569 611
                          44.5  752 792  976 1240  564 567 570 600




  (Nota: X11R5 non supporta i dot clocks frazionari.)

  Per Xconfig, tutti i numeri che abbiamo appena menzionato - il numero
  dei punti accesi sulla riga, il numero dei punti che separano i punti
  accesi dall'inizio dell'impulso di sincronismo, il numero dei punti
  che rappresentano la durata dell'impulso, e il numero di punti dopo la
  fine dell'impulso di sincronismo - sono sommati per produrre il numero
  di punti per riga. Il numero di punti orizzontali deve sempre essere
  divisibile per otto.

  Esempio di numeri orizzontali: 800 864 1024 1088

  Questa linea d'esempio ha il numero di punti accesi (800) seguito dal
  numero del punto da dove parte l'impulso di sincronismo (864), seguito
  dal numero del punto quando lo stesso impulso termina (1024), seguito
  dal numero dell'ultimo punto sulla riga (1088).

  Notate di nuovo che tutti i valori dei numeri orizzontali (800, 864,
  1024, e 1088) sono divisibili per otto! Ci non  richiesto per i
  valori verticali.

  Il numero di righe dall'alto in basso formano il quadro. Il segnale di
  temporizzazione base per un quadro  la riga. Un certo numero di righe
  formeranno l'immagine. Dopo che l'ultima riga accesa  stata
  disegnata, ci sar un ritardo di un certo numero di righe prima che
  sia generato l'impulso di sincronismo verticale. Quindi l'impulso di
  sincronismo durer per un po' di righe, e finalmente saranno generate
  le ultime righe del quadro, cio il ritardo necessario dopo l'impulso.
  I valori che specificano questa modalit d'operazione sono immessi in
  una maniera simile al seguente esempio.

  Esempio di valori verticali: 600 603 609 630

  Questo esempio mostra che ci sono 600 righe visibili sullo schermo,
  che l'impulso di sincronismo verticale parte alla 603esima riga e
  termina alla 609esima, e che sono usate un totale di 630 righe.

  Notate che i valori verticali non devono essere divisibili per otto!

  Torniamo all'esempio dove stavamo lavorando. Secondo quanto detto
  prima, tutto quello che dobbiamo fare da adesso in poi  di scrivere i
  nostri risultati in Xconfig in questo modo:


        <nome>   DCF     HR  SH1 SH2  HFL   VR  SV1 SV2 VFL



  dove SH1  il punto di partenza dell'impulso di sincronismo orizzon
  tale e SH2  l'ultimo; similmente, SV1  il punto di partenza
  dell'impulso di sincronismo verticale e SV2  l'ultimo.

  Per inserire questi, ricordate il discorso sulla magia nera e gli
  impulsi di sincronismo che  stato fatto precedentemente.  SH1  il
  punto dove inizia l'impulso di sincronismo orizzontale; quindi, SH1 =
  HR + HGT1.  SH2  l'estremo opposto; quindi,  SH2 = SH1 + HSP.
  Similarmente, SV1 = VR + VGT (ma VGT di solito  zero)  e SV2 = SV1 +
  VSP.



       #nome    clock   temporiz.  oriz.    temporiz. vert.    flag
       936x702  65      936 968 1200 1232   702 702 710 737




  Non  necessario alcun flag; questa non  una modalit interlacciata.
  Ora siamo proprio a posto.


  12.  Sovraccaricare il Vostro Monitor


  Non dovreste assolutamente superare le specifiche di scansione del
  monitor se questo  un tipo a frequenza fissa. Potreste far fumare il
  vostro hardware!  Superare le specifiche di un monitor multisincrono
  crea dei subdoli problemi potenziali che dovreste evitare.

  Al contrario, avere un pixel-clock pi alto della massima larghezza di
  banda del monitor  abbastanza innocuo. (Nota: il limite teorico delle
  capacit  raggiunto quando il pixel-clock raggiunge il doppio della
  larghezza di banda del monitor. Questa  una applicazione diretta del
  Teorema di Nyquist: immaginate i pixel come una serie di prove dei
  segnali guida distribuita nello spazio e capirete perch.)

   problematico eccedere la frequenza massima di sincronismo. Alcuni
  monitor moderni possono avere dei circuiti di protezione che spengono
  il monitor a frequenze di scansione pericolose, ma non fateci
  affidamento. In particolare ci sono monitor multisinc pi vecchi (come
  il Multisync II) che usano solo un trasformatore orizzontale. Questi
  monitor non hanno molta protezione contro il sovraccarico. Mentre
  avrete sicuramente un circuito di regolazione dell'alto voltaggio (che
  pu essere assente nei monitor a frequenza fissa), questo non
  necessariamente coprir ogni gamma di frequenza possibile, specie nei
  modelli pi economici. Questo non solo implica un maggior carico sul
  circuito, ma causa anche un invecchiamento precoce dei fosfori dello
  schermo, ed ulteriori emissioni di radiazioni dallo schermo (inclusi i
  raggi X).

  Un altro punto da considerare sulla larghezza di banda  che
  l'impedenza in entrata del monitor  specificata solo per quella data
  gamma di frequenze, e usarne di pi alte pu probabilmente causare
  minori interferenze sullo schermo, e disturbi radio.

  Comunque, la problematica fondamentale in questione  lo slew rate (la
  pendenza dei segnali video) dei driver per l'output del video, e
  questo  di solito indipendente dalla frequenza dei pixel, ma (se il
  costruttore della vostra scheda video ci tiene a questi problemi) in
  relazione alla massima frequenza dei pixel della scheda.

  Quindi state attenti l fuori...


  13.  Usare le Modalit Interlacciate


  (Questa sezione  in gran parte merito di David Kastrup
  <dak@pool.informatik.rwth-aachen.de>)

  Ad un dato clock fisso, uno schermo interlacciato avr molto meno
  sfarfallio di uno non-interlacciato, se il circuito verticale del
  vostro monitor lo supporta stabilmente.  principalmente a causa di
  ci che furono inventate le modalit interlacciate.

  Le modalit interlacciate hanno una cattiva reputazione perch sono
  inferiori alle loro compagne non-interlacciate alla stessa frequenza
  di scansione verticale, VSF (quello che di solito viene specificato
  nelle pubblicit). Ma sono assolutamente superiori alla stessa
  frequenza di scansione orizzontale, ed  qui che di solito le
  caratteristiche decisive del vostro monitor/scheda video dicono le
  bugie.

  Ad una frequenza di refresh fissa (o mezzo quadro, o VSF) il display
  interlacciato sfarfaller di pi: un display interlacciato a 90Hz sar
  inferiore ad un display non-interlacciato a 90Hz. Per avr bisogno di
  met larghezza di banda video e met frequenza di scansione
  orizzontale. Se lo comparate ad una modalit non-interlacciata con lo
  stesso dot clock e le stesse frequenze di scansione, sar enormemente
  superiore: 45Hz non-interlacciati sono intollerabili. Con 90Hz
  interlacciati, io ho lavorato per anni con il mio Multisync 3D (a
  1024x768) ed in modo molto soddisfacente.  Penso che vi servir al
  massimo uno schermo a 70Hz non-interlacciati per lo stesso comfort.

  Dovete stare attenti ad alcuni punti, comunque: usate modalit
  interlacciate solo ad alte risoluzioni, cos che le righe accese
  alternate siano pi vicine. Vorrete provare varie larghezze e
  posizioni dell'impulso di sincronismo per ottenere le posizioni di
  riga pi stabili. Se le linee alternate sono chiare e scure,
  l'interlacciamento vi salter agli occhi. Ho una applicazione che
  sceglie tali valori per uno sfondo (XCept, nessun'altra applicazione
  lo fa che io sappia, fortunatamente). Io passo a 800x600 usando XCept
  perch altrimenti mi fanno proprio male gli occhi.

  Per lo stesso motivo, usate i font di minimo 100dpi, o altri font che
  abbiano le stanghette orizzontali spesse minimo due righe (per le alte
  risoluzioni, nient'altro avrebbe comunque senso).

  E naturalmente, non usate mai la modalit interlacciata quando il
  vostro hardware ne supporterebbe una non-interlacciata con la stessa
  frequenza di refresh.

  Se, comunque, pensate che per qualche risoluzione state spingendo o il
  monitor o la scheda video al massimo delle loro capacit, e ottenete
  sfarfallio o perdita di nitidezza (eccesso di larghezza di banda),
  potete provare la stessa risoluzione usando una modalit
  interlacciata. Chiaramente ci non serve a nulla se il VSF del monitor
   gi vicino ai suoi limiti.

  Scrivere modalit interlacciate  facile: fatelo come se fossero non-
  interlacciate. Sono necessarie solo due considerazioni in pi: vi
  servono un numero totale pari di righe verticali (l'ultima cifra nel
  mode line), e quando specificate il flag "Interlace", la frequenza
  verticale di quadro raddoppia. Il vostro monitor deve supportare una
  frequenza di 90Hz se la modalit che avete specificato risulta di 45Hz
  senza il flag "Interlace".

  Come esempio, ecco la mia modeline per 1024x768 interlacciati: il mio
  Multisync 3D supporta fino a 90Hz verticali e 38kHz orizzontali.

       ModeLine "1024x768" 45 1024 1048 1208 1248 768 768 776 807 Interlace




  Entrambi i limiti sono abbastanza sfruttati con questa modalit.
  Specificando la stessa modalit, ma senza il flag "Interlace", si 
  ancora quasi al limite della capacit orizzontale del monitor (e per
  dirla tutta, un po' sotto al minimo della frequenza di scansione
  verticale), ma ci produce uno schermo intollerabilmente sfarfallante.

  Regole basilari di programmazione: se avete scritto una modalit a
  meno della met della capacit verticale del monitor, rendete pari il
  numero totale delle linee ed aggiungete il flag "Interlace". La
  qualit dell'immagine dovrebbe aumentare di molto nella maggioranza
  dei casi.

  Se avete una modalit non-interlacciata che in qualche modo sfrutta al
  limite le specifiche del monitor dove la frequenza di scansione
  verticale giace a circa il 30% o pi sotto al massimo del monitor,
  scrivere a mano una modalit interlacciata (probabilmente con una pi
  alta risoluzione) potrebbe portare a risultati superiori, ma non ci
  giurerei.



  14.  Domande e Risposte


  D. L'esempio che avete fatto  per un formato non standard dello
  schermo, lo posso usare?

  R. Perch no? NON ci sono ragioni di usare 640x480, 800x600, o anche
  1024x768. I server XFree86 vi lasciano configurare il vostro hardware
  molto liberamente. Di solito ci vogliono due o tre prove prima di
  arrivare alla scelta giusta. La cosa importante da raggiungere  un
  alta frequenza di refresh con un'area visibile ragionevole. Non alta
  risoluzione al prezzo di sfarfallio scassa-occhi!

  D.  la sola risoluzione possibile quella data di 65Mhz dot clock e
  55Khz HSF?

  R. Assolutamente no! Siete incoraggiati a seguire la procedura
  generica e fare un po' di prova-e-sbaglia fino ad arrivare ad una
  configurazione che vi soddisfi. Sperimentare cos pu essere molto
  divertente. Molte configurazioni vi possono dare solo schermi
  sgangherati, ma in pratica i moderni monitor multi-sync non sono
  facilmente danneggiabili. Assicuratevi comunque che il vostro monitor
  possa supportare le frequenze di quadro che avete scelto prima di
  usarlo per periodi pi lunghi.

  State attenti ai monitor a frequenza fissa! Questo genere di
  sperimentazioni li pu velocemente danneggiare. Assicuratevi di usare
  frequenze di refresh valide per qualsiasi esperimento su di essi.

  D. Tu hai appena nominato due risoluzioni standard. In Xconfig, sono
  disponibili molte risoluzioni standard, mi puoi dire a che serve
  sperimentare con le temporizzazioni?

  R. Certamente! Prendi, ad esempio, lo "standard" 640x480 presente
  nell'attuale Xconfig. Usa 25Mhz di frequenza pilota, lunghezze di
  quadro di 800 e 525 => frequenza di refresh   59.5Hz. Non male. Ma
  28Mhz  una frequenza pilota comune a molte schede SVGA. Se noi la
  usiamo per pilotare 640x480, seguendo le procedure prima discusse,
  otterremmo lunghezze di quadro tipo 812 e 505. Ora la frequenza di
  refresh  aumentata a 68Hz, un miglioramento abbastanza significativo
  rispetto allo standard.

  D. Puoi riassumere quello che si  detto fino ad ora?

  R. In breve:


  1. per ogni frequenza pilota fissa, aumentare la risoluzione massima
     ci penalizza nell'abbassare la frequenza di refresh e producendo
     cos pi sfarfallio.

  2. se serve un'alta risoluzione e il tuo monitor la supporta, cerca di
     procurarti una scheda SVGA che abbia un uguale dot clock o DCF. Pi
     sono elevati, meglio !


  15.  Risolvere Problemi con l'Immagine


  OK, cos avete i vostri valori di configurazione X. Li mettete in
  Xconfig con una etichetta di modalit test. Fate partire X, con la
  combinazione di tasti andate nella nuova modalit, ... e l'immagine
  non va bene. Che fate? Ecco una lista di comuni distorsioni
  dell'immagine e come risolverle.

  (Eliminare questi difetti minori  la specialit di xvidtune(1).)

  Spostate l'immagine cambiando la temporizzazione dell'impulso di
  sincronismo.  La scalate cambiando la lunghezza del quadro (dovete
  cambiare l'impulso di sincronismo per mantenere la stessa posizione
  relativa, altrimenti cambiarne la grandezza sposter l'immagine). Ecco
  alcune ricette pi specifiche:

  Le posizioni orizzontali e verticali sono indipendenti. Cio, spostare
  l'immagine orizzontalmente non incide sulla sua posizione verticale, o
  viceversa. Per lo stesso non vale sempre per l'ingrandimento o
  rimpicciolimento. Mentre cambiare la larghezza non ha nulla a che
  vedere con l'altezza o viceversa, cambiare entrambe pu avere dei
  limiti. In particolare, se l'immagine  troppo larga in entrambe le
  dimensioni voi probabilmente dovete andare a pi alti dot clock per
  aggiustare le cose. Dal momento che questo alza la risoluzione, 
  spesso un problema!


  15.1.  L'immagine  troppo a destra o troppo a sinistra


  Per aggiustare questo, cambiate l'impulso di sincronismo orizzontale.
  Ovvero, aumentate o diminuite (a multipli di 8) i due numeri in mezzo
  nella sezione della temporizzazione orizzontale che definiscono i
  limiti di partenza e fine dell'impulso di sincronismo orizzontale.

  Se l'immagine  spostata a sinistra (bordo destro troppo largo, voi
  volete muovere l'immagine a destra) diminuite i valori. Se l'immagine
   spostata a destra (bordo sinistro troppo largo, volete spostare
  l'immagine a sinistra) incrementate l'impulso di sincronismo.


  15.2.  L'immagine  troppo su o troppo gi


  Per aggiustare questo, cambiate l'impulso di sincronismo verticale.
  Cio, incrementate o diminuite i due valori mediani della sezione di
  temporizzazione verticale che definiscono i limiti di partenza e fine
  dell'impulso di sincronismo verticale.

  Se l'immagine  spostata su (bordo in basso troppo largo, volete
  spostare l'immagine in gi) diminuite i valori. Se l'immagine 
  spostata in gi (bordo in alto troppo largo, volete spostare
  l'immagine in su) incrementate i valori.


  15.3.  L'immagine  troppo larga sia orizzontalmente che verticalmente


  Passate ad una pi alta velocit di clock della scheda. Se avete pi
  modalit nel file di clock, forse  stata attivata per errore una
  modalit a velocit inferiore.


  15.4.  L'immagine  troppo larga (troppo stretta) orizzontalmente


  Per rimediare a questo, aumentate (diminuite) la lunghezza di quadro
  orizzontale.  Ovvero, cambiate il quarto valore nella prima sezione di
  temporizzazione. Per evitare di muovere l'immagine, cambiate anche
  l'impulso di sincronismo (secondo e terzo numero) della met, per
  mantenerla nella stessa posizione relativa.


  15.5.  L'immagine  troppo alta (troppo bassa) verticalmente


  Per rimediare, aumentate (diminuite) la lunghezza del quadro. Cio
  cambiate il quarto numero nella seconda sezione di temporizzazione.
  Per evitare di spostare l'immagine, cambiate anche l'impulso di
  sincronismo (il secondo e terzo numero) della met, per mantenerla
  nella stessa posizione relativa.

  Qualsiasi altra distorsione che non pu essere risolta dalla
  combinazione di queste tecniche  probabilmente sintomo di qualcosa di
  profondamente sbagliato, tipo un errore di calcolo o un dot clock pi
  veloce di quello che pu reggere il monitor.

  In ultimo, ricordate che aumentare la lunghezza del quadro diminuir
  la frequenza di refresh, e viceversa.

  Occasionalmente potete aggiustare piccole distorsioni con i controlli
  del vostro monitor. Lo svantaggio  che se portate i controlli troppo
  lontano dallo zero (il settaggio di fabbrica) per risolvere i problemi
  di grafica, potreste ottenere un'immagine distorta in modo testo. 
  meglio avere una giusta "mode line".


  16.  Tracciare le Capacit del Monitor


  Per tracciare un diagramma della modalit del monitor, vi serve il
  pacchetto gnuplot (un linguaggio di disegno freeware per sistemi
  operativi UNIX-compatibili) e il tool modeplot, uno script di
  shell/gnuplot per tracciare il diagramma delle caratteristiche del
  vostro monitor, digitate come opzioni a linea di comando.

  Ecco una copia di modeplot:








  #!/bin/sh
  #
  # modeplot -- genera un grafico X mode delle modalit disponibili con il
  #             proprio monitor
  #
  # Dare `modeplot -?' per vedere le opzioni di controllo.
  #
  # ($Id: video-modes.sgml,v 1.7 1999/01/18 13:24:58 esr Exp $)

  # Descrizione del monitor. Larghezza di banda in MHz, frequenze orizzontali
  # in kHz e frequenze verticali in Hz.
  TITLE="Viewsonic 21PS"
  BANDWIDTH=185
  MINHSF=31
  MAXHSF=85
  MINVSF=50
  MAXVSF=160
  ASPECT="4/3"
  vesa=72.5       # minima frequenza di refresh raccomandata da VESA

  while [ "$1" != "" ]
  do
          case $1 in
          -t) TITLE="$2"; shift;;
          -b) BANDWIDTH="$2"; shift;;
          -h) MINHSF="$2" MAXHSF="$3"; shift; shift;;
          -v) MINVSF="$2" MAXVSF="$3"; shift; shift;;
          -a) ASPECT="$2"; shift;;
          -g) GNUOPTS="$2"; shift;;
          -?) cat <<EOF
  modeplot control switches:

  -t "<description>"  nome del monitor           default: "Viewsonic21PS"
  -b <nn>                 largh.di banda in MHz      default: 185
  -h <min> <max>          min & max HSF (kHz)        default: 31 85
  -v <min> <max>          min & max VSF (Hz)         default: 50 160
  -a <aspect ratio>       aspect ratio               default: 4/3
  -g "<options>"      opzioni passate a gnuplot

  Le opzioni -b, -h e -v sono obbligatorie, -a, -t, -g opzionali. Potete usare
  -g per passare un tipo di device a gnuplot cos che (per esempio) l'output di
  modeplot pu essere rediretto ad una stampante. Vedi gnuplot(1) per dettagli.

  Il tool modeplot  stato creato da Eric S. Raymond <esr@thyrsus.com> basato
  su analisi e codice di Martin Lottermoser <Martin.Lottermoser@mch.sni.de>

  Questo  modeplot $Revision: 1.11 $
  EOF
                  exit;;
          esac
          shift
  done

  gnuplot $GNUOPTS <<EOF
  set title "$TITLE Mode Plot"

  # Numeri magici.  Sfortunatamente, il grafico  abbastanza sensibile a
  # modifiche, e potrebbe fallire nel rappresentare la realt di alcuni
  # monitor.  Dobbiamo correggere questi valori per ottenere una
  # approssimazione del diagramma dei modi. Questi sono ricavati analizzando
  # molti valori nel database ModeDB.
  F1 = 1.30       # moltiplicatore per convertire la risoluzione orizzontale
                  # in larghezza di quadro
  F2 = 1.05       # moltiplicatore per convertire la risoluzione verticale
                  # in altezza di quadro

  # Definizione delle funzioni (moltiplicando per 1.0 si forza
  # l'aritmetica a numeri reali)
  ac = (1.0*$ASPECT)*F1/F2
  refresh(hsync, dcf) = ac * (hsync**2)/(1.0*dcf)
  dotclock(hsync, rr) = ac * (hsync**2)/(1.0*rr)
  resolution(hv, dcf) = dcf * (10**6)/(hv * F1 * F2)

  # Mette delle etichette sugli assi
  set xlabel 'DCF (MHz)'
  set ylabel 'RR (Hz)' 6  # La mette proprio sopra l'asse y

  # Genera il diagramma
  set grid
  set label "VB" at $BANDWIDTH+1, ($MAXVSF + $MINVSF) / 2 left
  set arrow from $BANDWIDTH, $MINVSF to $BANDWIDTH, $MAXVSF nohead
  set label "max VSF" at 1, $MAXVSF-1.5
  set arrow from 0, $MAXVSF to $BANDWIDTH, $MAXVSF nohead
  set label "min VSF" at 1, $MINVSF-1.5
  set arrow from 0, $MINVSF to $BANDWIDTH, $MINVSF nohead
  set label "min HSF" at dotclock($MINHSF, $MAXVSF+17), $MAXVSF + 17 right
  set label "max HSF" at dotclock($MAXHSF, $MAXVSF+17), $MAXVSF + 17 right
  set label "VESA $vesa" at 1, $vesa-1.5
  set arrow from 0, $vesa to $BANDWIDTH, $vesa nohead # style -1
  plot [dcf=0:1.1*$BANDWIDTH] [$MINVSF-10:$MAXVSF+20] \
    refresh($MINHSF, dcf) notitle with lines 1, \
    refresh($MAXHSF, dcf) notitle with lines 1, \
    resolution(640*480,   dcf) title "640x480  " with points 2, \
    resolution(800*600,   dcf) title "800x600  " with points 3, \
    resolution(1024*768,  dcf) title "1024x768 " with points 4, \
    resolution(1280*1024, dcf) title "1280x1024" with points 5, \
    resolution(1600*1280, dcf) title "1600x1200" with points 6

  pause 9999
  EOF



  Una volta che avete a posto modeplot e il package gnuplot, vi servono
  le seguenti caratteristiche del monitor:


    larghezza di banda video (VB)

    gamma delle frequenze di sincronismo orizzontale (HSF)

    gamma delle frequenze di sincronismo verticale (VSF)

  Il programma plot deve fare delle semplificazioni che non sono
  tecnicamente corrette. Questo  il motivo per cui il diagramma che ne
  risulta ne  solo una rozza descrizione. Queste semplificazioni sono:


  1. Tutte le risoluzioni hanno una singola frequenza fissa di aspetto
     AR = HR/VR.  Risoluzioni standard hanno AR = 4/3 o AR = 5/4. I
     programmi modeplot assumono 4/3 di default, ma si pu non tenerne
     conto.

  2. Per le modalit considerate, lunghezze e larghezze di quadro sono
     multipli fissi di risoluzioni orizzontali e verticali,
     rispettivamente:



               HFL = F1 * HR
               VFL = F2 * VR

  Come linea guida, prendete F1 = 1.30 and F2 = 1.05 (vedi ``''
  "Calcolare le grandezze di quadro").

  Ora prendete una particolare frequenza di sincronismo, HSF. Dato
  l'assunto prima presentato, ogni valore di clock DCF gi determina la
  frequenza di refresh RR, per esempio per ogni valore di HSF c' una
  funzione RR (DCF).  Questo pu essere derivato come segue.

  La frequenza di refresh  uguale al clock diviso per il prodotto della
  grandezza del quadro:



               RR = DCF / (HFL * VFL)          (*)




  D'altra parte, la larghezza di quadro  uguale al clock diviso per la
  frequenza di sincronismo orizzontale:



               HFL = DCF / HSF                 (**)




  VFL pu essere ridotto a HFL secondo i due assunti precedenti:



               VFL = F2 * VR
                   = F2 * (HR / AR)
                   = (F2/F1) * HFL / AR        (***)




  Inserendo (**) e (***) in (*) otteniamo:



               RR = DCF / ((F2/F1) * HFL**2 / AR)
                  = (F1/F2) * AR * DCF * (HSF/DCF)**2
                  = (F1/F2) * AR * HSF**2 / DCF




  Per un HSF fisso, F1, F2 e AR, questo  un iperbole nel nostro
  diagramma.  Disegnando due tali curve per le frequenze di sincronismo
  orizzontale minime e massime noi otteniamo i bordi rimanenti dell'area
  permessa.

  Le righe dritte che attraversano l'area possibile rappresentano
  risoluzioni particolari. Questo  basato su (*) e il secondo assunto:



               RR = DCF / (HFL * VFL) = DCF / (F1 * HR * F2 * VR)





  Disegnando tali linee per tutte le risoluzioni che ci interessano, si
  possono immediatamente leggere le possibili relazioni fra risoluzione,
  frequenza di clock e frequenza di refresh delle quali il monitor 
  capace.  Notate che queste linee non dipendono dalle propriet del
  monitor, ma dipendono dal secondo assunto.

  Il tool modeplot vi offre un modo facile per farlo.  Date modeplot -?
  per vedere le sue opzioni di controllo. Una chiamata tipica  questa:



               modeplot -t "Swan SW617" -b 85 -v 50 90 -h 31 58




  L'opzione -b specifica la larghezza di banda video; -v e -h settano le
  gamme di frequenza di sincronismo orizzontale e verticale.

  Quando leggete l'output di modeplot, tenete sempre a mente che vi d
  solo una descrizione approssimativa. Per esempio, non tiene conto dei
  limiti di un HFL risultante da una minima ampiezza richiesta
  dell'impulso di sincronismo, e pu essere solo accurato quanto lo sono
  gli assunti. Non c' niente di meglio quindi di un calcolo dettagliato
  (compresa un po' di magia nera) come viene presentato in ``Mettere
  Tutto Assieme''.  Comunque, vi dovrebbe dare un miglior feeling per
  quanto possibile e per quanti compromessi si debbano fare.


  17.  Ringraziamenti


  Il padre originale di questo documento  stato Chin Fang
  <fangchin@leland.stanford.edu>.

  Eric S. Raymond <esr@snark.thyrsus.com> ha rielaborato, riorganizzato,
  e massicciamente riscritto l'originale di Chin Fang col proposito di
  capirlo.  In questo processo, ha immesso la maggior parte di un altro
  how-to di Bob Crosson <crosson@cam.nist.gov>.

  Il materiale sulle modalit interlacciate  largamente di David
  Kastrup <dak@pool.informatik.rwth-aachen.de>

  Nicholas Bodley <nbodley@alumni.princeton.edu> ha corretto e chiarito
  la sezione su come funziona lo schermo.

  Martin Lottermoser <Martin.Lottermoser@mch.sni.de> ha contribuito
  all'idea di usare gnuplot per fare diagrammi di modalit e ha fatto
  l'analisi matematica che c' dietro modeplot. Il modeplot in
  distribuzione fu ridisegnato e generalizzato da ESR dal codice
  originale di Martin per un caso.















 [ 12 September 1999
  The Linux Colours with Linux terminals mini-HOWTO is not being maintained by
  the author any more.  If you are interested in maintaining the
  Colours-ls mini-HOWTO, please get in touch with me at
  <linux-howto@metalab.unc.edu>. ]

  Colours with Linux terminals
  Thorbjrn Ravn Andersen, ravn@dit.ou.dk
  v1.4, 7 August 1997

  Most Linux distributions have a 'ls' command for listing the contents
  of a directory that can visually enhance their output by using differ
  ent colours, but configuring this to taste may not be a trivial task.
  This document explains the various aspects and approaches of altering
  the setup by configuring existing software, plus locations of alterna
  tive software usually not included with Slackware or RedHat, which may
  be used on most versions of Unix.  The HTML version is also available
  from my own source at <http://www.mip.ou.dk/~ravn/colour-ls>.

  1.  Introduction

  In recent years colour displays have become very common, and users are
  beginning to exploit this by using programs that utilizes colours to
  give quick visual feedback on e.g. reserved keywords in programming
  languages, or instant notification of misspelled words.

  As the Linux text console supports colour, the original GNU ls was
  quickly modified to output colour information and included in
  Slackware around version 2.0.  Improved versions of these patches have
  now migrated into the standard GNU distribution of ls, and should
  therefore be a part of all new Linux distributions by now.

  This revision is an update on a major rewrite from the initial
  release, including information on xterms and kernel patching.

  The information in this document has been confirmed on Redhat 4.1, and
  was originally compiled with the 2.0.2 release of Slackware, and the
  1.1.54 kernel.  The kernel patch information was retrieved on
  slackware 2.2.0 with the 1.2.13 kernel, and tcsh as the default shell,
  and later confirmed with a 2.0.27 kernel.  If you use any other
  configuration, or unix version, I would appreciate a note stating your
  operating system and version, and whether colour support is available
  as standard.

  2.  Quickstart for the impatient

  If you have a new distribution of Linux, do these modifications to
  these files in your home directory.  They take effect after next
  login.

       ~/.bashrc:
           alias ls="ls --color"

       ~/.cshrc:
           alias ls 'ls --color'

  That's it!

  You may also want to do an ``eval `dircolors $HOME/.colourrc`'', to
  get your own colours.  This file is created with ``dircolors -p
  >$HOME/.colourrc'' and is well commented for further editing.

  3.  Do I have it at all?

  First of all you need to know if you have a version of ls which knows
  how to colourize properly.  Try this command in a Linux text console
  (although an xterm will do):

       % ls --color

  (the % is a shell prompt):

  If you get an error message indicating that ls does not understand the
  option, you need to install a new version of the GNU fileutils
  package.  If you do not have an appropriate upgrade package for your
  distribution, just get the latest version from your GNU mirror and
  install directly from source.

  If you do not get an error message, you have a ls which understands
  the command.  Unfortunately, some of the earlier versions included
  previously with Slackware (and possible others) were buggy.  The ls
  included with Redhat 4.1 is version 3.13 which is okay.

       % ls --version
       ls - GNU fileutils-3.13

  If you ran the ``ls -- color'' command on a Linux textbased console,
  the output should have been colourized according to the defaults on
  the system, and you can now decide whether there is anything you want
  to change.

  If you ran it in an xterm, you may or you may not have seen any colour
  changes.  As with ls itself, the original xterm-program did not have
  any support of colour for the programs running inside of it, but
  recent versions do.  If your xterm doesn't support colours, you should
  get a new version as described at the end of this document.  In the
  meantime just switch to textmode and continue from there.

  4.  Which colours is there to choose from?

  This shell script (thanks to the many who sent me bash versions) shows
  all standard colour combinations on the current console.  If no
  colours appear, your console does not support ANSI colour selections.

  #!/bin/bash
  # Display ANSI colours.
  #
  esc="\033["
  echo -n " _ _ _ _ _40 _ _ _ 41_ _ _ _42 _ _ _ 43"
  echo "_ _ _ 44_ _ _ _45 _ _ _ 46_ _ _ _47 _"
  for fore in 30 31 32 33 34 35 36 37; do
    line1="$fore  "
    line2="    "
    for back in 40 41 42 43 44 45 46 47; do
      line1="${line1}${esc}${back};${fore}m Normal  ${esc}0m"
      line2="${line2}${esc}${back};${fore};1m Bold    ${esc}0m"
    done
    echo -e "$line1\n$line2"
  done

  The foreground colour number is listed to the left, and the background
  number in the box.  If you want bold characters you add a "1" to the
  parameters, so bright blue on white would be "37;44;1".  The whole
  ANSI selection sequence is then

  ESC [ 3 7 ; 4 4 ; 1 m

  Note: The background currently cannot be bold, so you cannot have
  yellow (bold brown) as anything but foreground.  This is a hardware
  limitation.

  The colours are:
          0 - black    4 - blue           3# is foreground
          1 - red      5 - magenta        4# is background
          2 - green    6 - cyan
          3 - yellow   7 - white          ;1 is bold

  5.  How to configure colours with ls

  If you wish to modify the standard colour set built into ls, you need
  your personal copy in your home directory, which you get with

        cd ; dircolors -p > .coloursrc

  After modifying this well-commented file you need to have it read into
  the environment string LS_COLORS, which is usually done with

       eval `dircolors .colourrc`

  You need to put this line in your .bashrc/.cshrc/.tcshrc (depending on
  your shell), to have it done at each login.  See the dircolors(1)
  manual page for details.

  6.  How to change the text-mode default from white-on-black

  You will need to tell the terminal driver code that you want another
  default.  There exists no standard way of doing this, but in case of
  Linux you have the setterm program.

  "setterm" uses the information in the terminal database to set the
  attributes.  Selections are done like

       setterm -foreground black -background white -store

  where the "-store" besides the actual change makes it the default for
  the current console as well.  This requires that the current terminal
  (TERM environment variable) is described "well enough" in the termcap
  database.  If setterm for some reason does not work, here are some
  alternatives:

  6.1.  Xterm

  One of these xterms should be available and at least one of them
  support colour.

       xterm -fg white -bg blue4
       color_xterm -fg white -bg blue4
       color-xterm -fg white -bg blue4
       nxterm -fg white -bg blue4

  where 'color_xterm' supports the colour version of 'ls'.  This
  particular choice resembles the colours used on an SGI.

  6.2.  Virtual console.

  You may modify the kernel once and for all, as well as providing a
  run-time default for the virtual consoles with an escape sequence.  I
  recommend the kernel patch if you have compiled your own kernel.

  The kernel source file is /usr/src/linux/drivers/char/console.c around
  line 1940, where you should modify

          def_color       = 0x07;   /* white */
          ulcolor         = 0x0f;   /* bold white */
          halfcolor       = 0x08;   /* grey */

  as appropriate.  I use white on blue with

               def_color       = 0x17;   /* white */
               ulcolor         = 0x1f;   /* bold white */
               halfcolor       = 0x18;   /* grey */

  The numbers are the attribute codes used by the video card in
  hexadecimal: the most significant digit (the "1" in the example
  colours above) is the background; the least significant the
  foreground. 0 = black, 1 = blue, 2 = green, 3 = cyan, 4 = red, 5 =
  purple, 6 = brown/yellow, 7 = white. Add 8 to get "bright" colours.
  Note that, in most cases, a bright background == blinking characters,
  dull background. (From sjlam1@mda023.cc.monash.edu.au
  <mailto:sjlam1@mda023.cc.monash.edu.au>).

  You may also supply a new run-time default for a virtual console, on a
  per-display basis with the non-standard ANSI sequence (found by
  browsing the kernel sources)

               ESC [ 8 ]

  which sets the default to the current fore- and background colours.
  Then the Reset Attributes string (ESC [ m) selects these colours
  instead of white on black.

  You will need to actually echo this string to the console each time
  you reboot.  Depending on what you use your Linux box for, several
  places may be appropriate:

  6.2.1.  /etc/issue

  This is where "Welcome to Linux xx.yy" is displayed under Slackware,
  and that is a good choice for stand-alone equipment (and probably be a
  pestilence for users logging in with telnet).  This file is created at
  boottime (Slackware in /etc/rc.d/rc.S; Redhat in /etc/rc.d/rc.local),
  and you should modify lines looking somewhat like

         echo ""> /etc/issue
         echo Welcome to Linux `/bin/uname -a | /bin/cut -d\  -f3`. >> /etc/issue

  to

    ESCAPE="<replace with a single escape character here>"
    echo "${ESCAPE}[H${ESCAPE}[37;44m${ESCAPE}[8]${ESCAPE}[2J"> /etc/issue
    echo Welcome to Linux `/bin/uname -a | /bin/cut -d\  -f3`. >> /etc/issue

  This code will home the cursor, set the colour (here white on blue),
  save this selection and clean the rest of the screen.  The
  modification takes effect after the next reboot.  Remember to insert
  the _literal_ escape character in the file with C-q in emacs or
  control-v in vi, as apparently the sh used for executing this script
  does not understand the /033 syntax.

  6.2.2.  /etc/profile or .profile

         if [ "$TERM" = "console" ]; then
             echo "\033[37;44m\033[8]" #
       # or use setterm.
             setterm -foreground white -background blue -store
         fi

  6.2.3.  /etc/login or .login

         if ( "$TERM" == "console" ) then
           echo "\033[37;44m\033[8]"
       # or use setterm.
             setterm -foreground white -background blue -store
         endif

  6.3.  Remote login

  You should be able to use the setterm program as shown above.  Again,
  this requires that the remote machine knows enough about your
  terminal, and that the terminal emulator providing the login supports
  colour. In my experience the best vt100 emulation currently available
  for other platforms are:

    MS-DOS:         MS-Kermit (free, not a Microsoft product)

    Windows 95/NT:  Kermit/95 (shareware)

    OS/2:           Kermit/95 (shareware).  Note though that the
     standard telnet understands colours and can be customized locally.

  See  <http://www.columbia.edu/kermit/> for details about Kermit.

  7.  Software

  All the information described here is assuming a GNU/Linux
  installation.  If you have something else (like e.g. a Sun running X
  or so) you can get and compile the actual software yourself.

  The colour version of 'xterm' is based on the standard xterm source
  with a patch available from any X11R6 site.  The xterm distributed
  with R6.3 is rumoured to have native colour support, but is untested
  by me.

       ftp://ftp.denet.dk/pub/X11/contrib/utilities/color-xterm-R6pl5-patch.gz

  See the documentation if you use an older version of X.  Note: I
  haven't tried this myself!

  of the several mirrors.  Get at least version 3.13.

       ftp://ftp.denet.dk/pub/gnu/fileutils-3.XX.tar.gz

  I have myself successfully compiled color-ls on Solaris, SunOS and
  Irix.

  I would appreciate feedback on this text.  My e-mail address is
  ravn@dit.ou.dk <mailto:ravn@dit.ou.dk>

  --

  Thorbjrn Ravn Andersen

[ 6 January 1998
  The Linux Comeau C++ mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Comeau C++ mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

//
// The Linux Comeau C++ 4.0 HOWTO
// Mark Swanson <ag010@freenet.carleton.ca>
// v0.3, May 16,1997
//
// The Comeau Computing site is:
// http://www.comeaucomputing.com
//


This document covers how to set up Comeau C++ (herin 
referenced as "como") under Linux. It gives an overview of compiling,
linking, running and debugging programs under it. It explains how to
install and use the latest HP STL (Standard Template Library) reference code
as well as SGI's (more advanced) STL.

This document is not a detailed feature comparison between g++ and como.
Anyone who wishes to do this comparison for themselves can get a list
of g++ bugs from ftp://ftp.cygnus.com/pub/g++/g++-bugs/README and compare
them to the list of known bugs in como.
(No one has had the time to create -except for what's mentioned in this FAQ -
a bug list for como. The only problem with it that I know of is it doesn't
have a 100% working iostreams library yet. )

======================================================================
======================================================================
PART 0  DEPENDENCIES

0.0  You might have to use GCC2.7.2.1 or greater.

0.1  You SHOULD install libg++2.7.2.1 and use the como
     iostream library libiostreamcomo.a(283K) to get iostreams working.

     <TODO> Has como compiled/made available the more stable library yet?
            Will it always be called libcomodios.a?

	 The *catch* here is that if you wish to use the SGI or HP STL libraries
	 you won't want to use the STL include files found in /usr/include/g++.
     You can make sure you don't by doing the following:

     cd /usr/include/g++
	 mkdir gnustl
     mv  algo.h algobase.h alloc.h bool.h bvector.h defalloc.h deque.h function.h heap.h iterator.h list.h map.h multimap.h multiset.h pair.h set.h stack.h tempbuf.h tree.h vector.h gnustl
     

     Please send me an email if you've got it working on something other
     than the 2.7.2.1 release of g++.
     
0.2  I recommend installing libc5.4.23 or greater. I had trouble with earlier
     versions of libc. Symptoms include running out of virtual memory when
     compiling small programs. I suspect something in the include files
     but since upgrading solved my problem I haven't really looked into it.
     
	 Again, keep me updated me on this.


0.3  You can find the binary/source distributions of the above packages at:
     ftp://ftp.tsx-11.mit.edu/pub/linux/packages/GCC


0.4  Remember to follow the instructions on the Comeau Computing patch page:
     http://www.comeaucomputing.com
     You MUST do this before reading anything else in this document!


=====================================================================
PART I  MODIFICATIONS TO GCC INCLUDE FILES


1.0  stdarg or vararg replacement code
        Use the como supplied stdarg.h file. You should have already done
        this. You were supposed to follow the instructions on the patch
        page at step 0.5.

1.1  /usr/include/errno.h line 34.
        It's an extern "C" problem. Improperly defined in the header file.
        We need to move the following lines:

           #ifdef  __USE_BSD
           extern int sys_nerr;
           extern char *sys_errlist[];
           #endif
           #ifdef  __USE_GNU
           extern int _sys_nerr;
           extern char *_sys_errlist[];
           #endif 

        to just below the __BEGIN_DECLS line. If you don't do this, then these
        definitions will have a different linkage specification than the
        ones in /usr/include/stdio.h. This file is at fault.

1.2	 /usr/lib/gcc-lib/iX86-linux/2.7.2.1/include/stddef.h ~line 305.
        This section #defines NULL to a void * which is wrong. Change the
		section:

        /* A null pointer constant.  */

        // Commented out for Como
        //#if defined (_STDDEF_H) || defined (__need_NULL)
        //#undef NULL		/* in case <stdio.h> has defined it. */
        //#define NULL ((void *)0)
        //#endif	/* NULL not defined and <stddef.h> or need NULL.  */
        //#undef	__need_NULL
       
	    to look like:

        // Added for como
        #ifndef NULL
            #ifdef __cplusplus
                #define NULL 0
            #else
                #define NULL ((void *) 0)
            #endif
        #endif
        // end of 'Added for como'

1.3  /usr/lib/gcc-lib/i486-linux/2.7.2.1/include/syslimits.h 7
     
	    #include_next is a gcc'ism. Change this to a normal include.

    /usr/lib/gcc-lib/i486-linux/2.7.2.1/include/limits.h 112
        
		Comment out this next line.

        //#include_next <limits.h>  /* recurse down to the real one */

		
========================================================================
PART II  STL ISSUES

2.1  How to get HP's or SGI's latest STL code.

     The instructions for getting HP's or SGI's STL code are given on
     Comeau's WWW site.


2.2  How to modify the HP STL to get rid of a small warning message.
     (new operator and throw() exception specification)

     In defalloc.h: 26
        Comment it out. The specification is already in the new.h provided
        by Comeau Computing.


=====================================================================
PART III  MICROSOFT FILE FORMAT COMPATABILITY

3.0  Compiling files with MS-DOS line termination
     Como has a version of their compiler available for Linux that handles
     MS-DOS CRLF style line terminations. Comeau Computing has stated that
     this will be a standard option in the free upgrades. Until then, I'm
     sure they will make it available to those who ask.


=====================================================================
PART IV  WORKING AROUND GNU SPECIFIC COMPILER OPTIONS

4.1  __attribute__

     In assert.h you will more than likely run into this problem. The fix is
     simply: delete the __attribute__((xxx)); line and place the ';' character
     at the end of the line above it.

4.2  Macros with (...) arguments

     Take the following GNU macro:
        #define TRACE(x...)
     
     The como preprocessor doesn't allow macros with ... arguments. Use 
     functions instead.


=======================================================================
PART V  IOSTREAMS

5.0  iostreams.h

     Comeau Computing along with other individuals on the net (myself
     included) are working on making gnu iostreams compile under como.
     We need to get around some gnu specific vtable mangling problems.
     A version of iostreams that works except for fstreams and streambuf
     code is available from the Comeau web site.

=======================================================================
PART VI  DEBUGGING WITH GDB

6.0  Using GDB with como
     
     This works to some extent but not fully. You can start debugging your
     application, display variables etc., but in my static callback
     functions gdb can only display some of the functions local variables...
     incorrectly. This is a g++ name mangling problem. The GNU debugger
     expects to be debugging code compiled with a GNU compiler which uses
     a different name mangling scheme.

6.1  Let me know if there is another debugger that would work better!
     (And cc support@comeaucomputing.com as well.)

6.2  One thing you can do is 'info local' at the point where you wish to
	 view the contents of your variables. Take the following source code
	 for example:

     #include <stdio.h>
     int main()
     {
         int a=0, b=1;
         printf("a=%d, b=%d\n", a, b);
         return 0;
     }
     
	 After compiling with 'como -g test.cxx' we start gdb with 'gdb a.out'.
	 
	 (Next we break on the printf() line)
	 (gdb) break 5

	 (Now run the little program)
	 (gdb) run

     (gdb) info local
     __1044_6_a = 0
     __1044_11_b = 1

	 *** You were expecting to see a = 0 not __1044_6_a = 0 ***
	 * Don't Panic! * :-) instead of:

	 (gdb) print a

	 you have to:

	 (gdb) print __1044_6_a

	 This is a name mangling problem and there is no solution for it right
	 now. I'm sure Comeau Computing will publish their name mangling rules;
	 then you can write a patch for gdb. Let me know when you do:-)

=======================================================================
PART VII  MISCELLANEOUS ISSUES

1.   Add -D NULL=0 in EDG_DEFAULT_DEFINES to /<YourComeauDir>/bin/como.

     Since this is a C++ compiler it will complain if it thinks NULL is 
     a (void *)0.

2.  byteorder.h may sometimes be a problem.

    A header file that is rarely used. -D__BYTEORDER_H will almost always
    solve your problem.

3.  stddef.h - where is it? -

    /usr/lib/gcc-lib/i486-linux/2.7.2.1/include
    
	At the very least, it is included in line 30 of the SGI STL file deque.h.

    You should make that part of your EDGE_DEFAULT_INCLUDE_DIRS. Unfortunately,
    this makes two files in that directory get included sometimes:
    limits.h and  syslimits.h. These will cause problems. See the solution
	mentioned in 1.3.

-----------------------
[ 6 January 1998
  The Linux Dial-On-Demand mini-HOWTO is not being maintained by
  the author any more.  If you are interested in maintaining the
  Dial-On-Demand mini-HOWTO, please get in touch with me at
  <tjbynum@metalab.unc.edu>. 

NOTE:  The "idle-disconnect" is *no* longer a working option.  This
       option has changed and is now "idle".]

Dial-On-Demand mini-HOWTO
Rodney.van.den.Oever@tip.nl
Version 1.0, 28 July 1996 / updated and submitted 29 february 1997


Introduction:

This document describes how to do dial-on-demand dialling and how to use a
Linux host connected to a private local network as a dial-on-demand
PPP-router.

The kerneld-mini-HOWTO already describes how kerneld can execute a
'request-route' script, I'd like to describe a working setup in more detail.

If you have a small network at home, this is a very elegant way to provide
transparent Internet-access for a couple of other machines.


______________________________
__|__                  ___|___
|     | local network  |       |   ______  PPP-link to provider
| PC  |  192.168.1.0   | Linux |--|modem |------------------>
|     |                | Router|  |______|      x.x.x.x
|_____|                |_______|          (dynamic IP-address)
                         named
                         pppd

This setup requires:

* Kernel 2.0.0 or later.
* ppp-2.2.0f.tar.gz or later
* modules-2.0.0.tar.gz or later
* ipfwadm-2.3.tar.gz (http://www.xos.nl/linux/ipfwadm)


The following steps need to be taken:

1. Kernel Configuration
2. Modules Installation
3. PPP Installation
4. Serial Port and Modem Configuration
5. PPP Configuration
6. Dial-On-Demand
7. Network Configuration
8. Masquerading configuration
9. Workstation configuration

----------------------------------------------------------------------------

---


1. Kernel Configuration:

First we need to compile a kernel with kerneld, ppp and IP-masquerading
support.
I'll only show the options required for this setup, other options like
firewall
logging or transparent proxying can be turned on, but are not required:

cd /usr/src/linux
make config (or make menuconfig)

* Code maturity level options
*
Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL)

[Y/n/?]

* Loadable module support
*
Enable loadable module support (CONFIG_MODULES) [Y/n/?]
Set version information on all symbols for modules (CONFIG_MODVERSIONS)
[N/y/?]
Kernel daemon support (e.g. autoload of modules) (CONFIG_KERNELD) [Y/n/?]
*
Networking support (CONFIG_NET) [Y/n/?]
*
* Networking options
*
Network firewalls (CONFIG_FIREWALL) [Y/n/?]
TCP/IP networking (CONFIG_INET) [Y/n/?]
IP: forwarding/gatewaying (CONFIG_IP_FORWARD) [Y/n/?]
IP: firewalling (CONFIG_IP_FIREWALL) [Y/n/?]
IP: masquerading (EXPERIMENTAL) (CONFIG_IP_MASQUERADE) [Y/n/?]
*
* Protocol-specific masquerading support will be built as modules.
*
IP: always defragment (CONFIG_IP_ALWAYS_DEFRAG) [Y/n/?]
IP: optimize as router not host (CONFIG_IP_ROUTER) [Y/n/?]
*
* Network device support
*
Network device support (CONFIG_NETDEVICES) [Y/n/?]
*
PPP (point-to-point) support (CONFIG_PPP) [M/n/y/?]
*
* CCP compressors for PPP are only built as modules.
*
Ethernet (10 or 100Mbit) (CONFIG_NET_ETHERNET) [Y/n/?]
NE2000/NE1000 support (CONFIG_NE2000) [Y/m/n/?]


The latter option depends of course on the netword card used!


Compile the kernel with:

make zlilo
make modules
make modules_install

If you don't use LILO, copy /usr/src/linux/arch/i386/boot/zImage to the
proper
location for your setup.
The modules are installed in /lib/modules/x.x.x, Where x.x.x reflects the
version-number of your kernel.

----------------------------------------------------------------------------

---


2. Modules Installation:

The following module-utilities are required:

/sbin/insmode           Loads module requested
/sbin/rmmod             Removes module no longer needed
/sbin/depmod            Creates depedencies
/sbin/kerneld           Kerneld extension to load modules automatically

If you don't have these yet, install 'm by:

cd /usr/src
tar zxf modules-2.0.0.tar.gz
make install

To load kerneld at startup we need to edit /etc/rc.d/rc.S or create a
seperate
script rc.modules which is called from rc.S. Add or change the following
lines:

/etc/rc.d/rc.modules:

if [ ! -f /lib/modules/`uname -r`/modules.dep ] ; then
        echo "Updating module dependencies for Linux `uname -r`:"
        /sbin/depmod -a
fi

[ -x /sbin/kerneld ] && /sbin/kerneld


The first part checks for the module-dependencies and creates them if they
don't
exist yet.

----------------------------------------------------------------------------

---


3. PPP Installation:

The following stuff is required to setup a PPP-link:

/usr/sbin/pppd            PPP-daemon
/usr/sbin/pppstats        PPP-statistics
/usr/sbin/chat            Execution of scripts

Install these by:

cd /usr/src
tar zxf ppp-2.2.0f.tar.gz
cd ppp-2.2.0f
./configure
make kernel

Since later kernels already include the PPP-code, 'make kernel' won't
replace
anything. Check the README and Makefile for shadow-support (if you also
want to
dial-in to this host) and other options. Then do:

make
make install

----------------------------------------------------------------------------

---


4. Serial port and modem configuration:

This setup requires a modem. Serial port setup is done in /etc/rc.d/rc.seria

l:

${SETSERIAL} /dev/cua0 uart 16450 port 0x3F8 irq 4
${SETSERIAL} /dev/cua1 uart 16550A port 0x2F8 irq 3 spd_vhi

In this setup COM1 is used by the mouse and COM2 by an internal 28k8
modem.
The spd_vhi-parameter replace the 38400 bps-entry in the speeds-table with
115200.
Likewise, spd_hi replaces this by 57600.

Use spd_vhi with a 28k8 modem and spd_hi with a 14k4 modem, but start with
38400,
just to be on the safe side.

You can check your modem setup by running 'minicom' or some other terminal
program.
Your modem should echo the characters typed. Use Ctrl-A, P to change the
communication parameters. Check if it still works at 57600 or 115200 bps.
Entering 'ATZ' should return 'OK'. Use Ctrl-A X to leave minicom.

Minicom can also be used to dial your provider manually. Make a note of
what you
need to enter to setup the link and what the response are from the remote
server.
If your provider doesn't use PAP or CHAP you probably need to enter a
username and
password and possibly enter a command to setup the link in PPP-mode.

----------------------------------------------------------------------------

---


5. PPP Configuration:

pppd searches /etc/ppp for scripts and the file 'options'.

/etc/ppp/options:

/dev/modem 38400 crtscts modem noipdefault defaultroute idle-disconnect
120

Meaning:

/dev/modem      In my setup a link to /dev/cua1.
38400           Gets replaced by 115200 (spd_vhi-parameter in
/etc/rc.d/rc.serial)
crtscts         Hardware handshake, RTS/CTS, don't use Xon-Xoff-handshaking!


noipdefault     The IP-address is assigned automatically.
defaultroute    This sets the default route to the PPP-interface when the
link is up.
idle-disconnect PPP-2.2.0f automatically disconnects an idle link after
120
seconds.

Now we need to create a script, just name it 'default', meaning the ISP
you
normally
use. If you want to make other connections too, creates differents scripts
for these
sites and name them with the remote IP-address.

/etc/ppp/default:

"" ats11=55dtXXXXXXXX CONNECT "" rname: UUUUU sword: PPPPP > ppp


Meaning:

ats11=55        shortens the duration of the dial tones to speed up
dialing.
XXXXXXXX        Enter the phone-number for your provider here.
CONNECT         chat waits for your modem to return 'CONNECT'.
rname:          chat waits for 'rname', and enters 'UUUUU'
sword:          chat waits for 'sword', and then enters 'PPPPP'.

Replace 'UUUUU' and 'PPPPP' by your username and password. I use 'rname'
and
'sword' because sometimes the first letter gets missed or could be upper-
or
lowercase and language-dependent. Some ISP's require you to enter 'ppp'
after
your enter the username and password, so I wait for the last character of
the
routerprompt ('>').

If you get errors like 'serial line looped back' or 'serial line not 8-bit
clean'
the link is not yet in PPP-mode.

This command is long enough to place it in a small script:

/etc/ppp/ppp:

#!/bin/sh
/usr/sbin/pppd connect '/usr/sbin/chat -v -f /etc/ppp/default'

You should now be able to connect to your ISP, you might add the 'debug'
parameter
to the /etc/ppp/options-file, make sure you increase the loglevel of
syslogd to
see whats going on:

/etc/syslog.conf
*.debug                                 /var/log/messages

If you edit syslog.conf be sure to notify syslogd about this change.
Depending on
the location of its PID-file, do:

kill -1 `cat /var/run/syslog.pid`

or

kill -1 `cat /etc/syslog.pid`


After the connection is made, check with 'ifconfig' for the existing of a
'ppp0'-
interface. Check your default route with 'netstat -r', it should point to
your ISP.
Try pinging a remote server, e.g. your providers nameserver.

If this works you could add this nameserver to your /etc/resolv.conf:

search your.isp.domain
nameserver x.x.x.x

----------------------------------------------------------------------------

---


6. Dial-on-Demand:

Kerneld can be used to load modules, like ppp, on demand. An additional
feature,
described in the kerneld-HOWTO, is the ability to invoke a script, if a
particular
route is missing. Kerneld will look for '/sbin/request-route'. The script
below is
an almost exact copy of the script included with the modules-2.0.0.tar.gz:

/sbin/request-route:

#!/bin/sh
LOCK=/var/run/request-route.pid
export PATH=/usr/sbin:$PATH     # for ppp-2.2*

# This script will be called from kerneld with the requested route as $1

chatfile=/etc/ppp/$1

# If no chatscript exists use a default value (symlink to preferred
script):

[ ! -f $chatfile ] && chatfile=/etc/ppp/default

# Check if we're already running:

if [ ! -f $LOCK ] ; then
        pppd connect "chat -f $chatfile" &

        # Timer to be killed by ip-up, tunable! Check kerneld delay as
well
        sleep 60 &
        sleepid=$!
        echo $sleepid > $LOCK
        wait $sleepid
        rm -f $LOCK
        exit 0
fi
exit 1


Kerneld will run this script using the missing route as an argument:

/sbin/request-route x.x.x.x

The script uses a lock-file to prevent multiple 'request-route'-instances.

At first I used a script that was triggered by a nameserver query, but
since I like
to run a local nameserver, this lookup would be cached and a second query
wouldn't
bring the link up. That's why I changed the script to use a default
chat-script if
none exists.

This also allows you to create multiple chat-scripts for different links
and use a
default chat-script to connect to your ISP.

After the link has been brought up, pppd executes the script /etc/ppp/ip-up

which
removes the lock-file. Add commands you'd like to execute everytime the
link is
brought up, like a sendmail queue-run:

#!/bin/ash
LOCK=/var/run/request-route.pid
[ -f $LOCK ] && kill `cat $LOCK`

# Execute these commands after connecting:
#/usr/sbin/sendmail -q


The 'idle-disconnect'-option automatically disconnects an idle link, use
'ppp-off'
is you want to disconnect immediately:

/usr/sbin/ppp-off:.

#!/bin/sh
LOCK=/var/run/request-route.pid
DEVICE=ppp0

rm -f $LOCK
#
# If the ppp0 pid file is present then the program is running. Stop it.
if [ -r /var/run/$DEVICE.pid ]; then
        kill -INT `cat /var/run/$DEVICE.pid`
#
# If unsuccessful, ensure that the pid file is removed.
#
        if [ ! "$?" = "0" ]; then
                echo "removing stale $DEVICE pid file."
                rm -f /var/run/$DEVICE.pid
                exit 1
        fi
#
# Success. Terminate with proper status.
#
        echo "$DEVICE link terminated"
        exit 0
fi
#
# The link is not active
#
echo "$DEVICE link is not active"

exit 1

----------------------------------------------------------------------------

---


7. Network Configuration:

If your Linux-box has another network interface, like an Ethernet-card or
if you
use PLIP to connect to another machine, you can configure this box to
function as
a router. This is how I configured my network, I always enter all
IP-addresses in
/etc/hosts so I only have one file to maintain:

/etc/hosts:

127.0.0.1       localhost
10.0.0.1        your.domain.com host
10.0.0.2        some.other.machine


/etc/networks:

loopback        127.0.0.0
localnet        10.0.0.0


/etc/rc.d/inet1:

# Loopback interface:
ifconfig lo localhost
route add -net loopback

# Local interface:
ifconfig eth0 host
route add -net localnet eth0


The last rule adds a route to the local network. We don't need to enter
the
default
gateway here, since we don't have one until a PPP-link is setup.

----------------------------------------------------------------------------

---


8. Masquerading Configuration:

If you need to connect multiple machines, but only have one IP-address,
you
can use
the Linux masquerading feature. This allows you to configure an internal
network-
number (preferably a private IP-address) which gets translated to the
IP-address
assigned to the PPP-interface.

You are free to use the following network numbers:

Class A: 10.0.0.0
Class B: 172.16.0.0 - 172.31.0.0
Class C: 192.168.0.0 - 192.168.254.0


Add the following rules to /etc/rc.d/rc.inet1:

FW=/sbin/ipfwadm

${FW} -F -f

${FW} -F -a m -P tcp -S localnet/8 -D default/0
${FW} -F -a m -P udp -S localnet/8 -D default/0

# Masquerading timeout-values (tcp tcpfin udp), defaults:
${FW} -M -s 3600 0 0

# Load module for special protocols:
/sbin/modprobe ip_masq_ftp
/sbin/modprobe ip_masq_raudio
/sbin/modprobe ip_masq_irc


The two masquerading rules will translate UDP and TCP-traffic to the
IP-address
used as the default gateway (the PPP-interface). Ping, which uses the
ICMP-protocol,
will fail from other hosts, it will only work from the router.
I used network 10.0.0.0 with subnet mask 255.0.0.0 or in CIDR-notation:
'/8'.

The next rule prevents FTP-DATA connections from timing out, by increasing
the TCP-
timeout value.

The modules are only required if you want to use these protocols across
the
firewall.
E.g. if you want to use normal ftp through the firewall, you need to load
the
ip_masq_ftp-module.

----------------------------------------------------------------------------

----

9. Workstation Configuration:

Configure your other machine for your local network number and set them up
to
use the Linux-box as their default gateway.

----------------------------------------------------------------------------

----

10. Disclaimer

This document describes a configuration that works for me, use it at your
own
risk. If anything substantial is missing or if something is terribly
wrong,
please let me know!

One thing I could add is a description of how to setup a local nameserver.


Rodney van den Oever <Rodney.van.den.Oever@tip.nl>
[ 14 Ocotber 1997
  The Linux Dip+SLiRP+CSLIP mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Dip+SLiRP+CSLIP mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]


                   Linux Dip+SLiRP+CSLIP mini-HOWTO
                                 by
                 Zenon Fortuna (zenon@netcom.com)


Version: 1.0                                            October 15th '95

INDEX
        0.      Why "Dip+SLiRP+CSLIP mini-HOWTO" ?
        1.      History of changes
        2.      Short description
        3.      Steps of the configuration
	3.1		Installing the SLiRP
	3.2		Testing the SLiRP
	3.3		Configuring your Linux system
	3.4		Testing your Linux system
	3.5		Installing the DIP
	3.6		Testing the DIP
	4.	Normal operation
	4.1		Adding a DNS capability
        5.      Comments

----------------------------------------------------------------------------
0.	Why "Dip+SLiRP+CSLIP mini-HOWTO" ?

	This document is for users, who don't want to read the NET-2-HOWTO
	with all its details, nor want to read the Dip/SLiRP documents, but
	would like to install a SLIP-like connection to the Internet, using
	available shell-only account.

	The above mentioned documents should be considered as more exhaustive,
	but also more exhausting.

	The dip337n-uri and slirp-0.95h packages were used to test the described
	functionality. The tests were verified under the stable (tm) Linux
	kernel version 1.2.13, installed under the Slackware 2.2.0 OS
	distribution.


1.	History of changes

	October 15th '95	Version: 1.0
	    The initial version of the document.


2.      Short description

	- I assume, that your Linux system is able to dial-up a remote
	  server of the ISP, where you have a shell-account. On this server
	  we will install the "slirp" utility.

	- we would like to prepare the "dip" utility on the Linux system,
	  along with a specialized script, to dial-up the remote server,
	  and start the "slirp" on this remote system.

	- the running "dip" will configure the serial line parameters and
	  will inform the Linux system about the IP mapping, performed by
	  the remote "slirp".

	- as a result the TCP/IP packets sent over the serial-line/modem
	  connection will be handled by the remote server as though being
	  sent locally by this server.

	Miracle happens: we will get a TCP/IP connection of the Linux system
	to the Internet resources.


3.      Steps of the configuration
3.1		Installing the SLiRP

	- get the SLiRP distribution file, e.g. the slirp-0.95h.tar.gz,
	  and compile the "slirp" program on your remote host (the system
	  to which you will be dialing up). The SLiRP's docs/README.compiling
	  explains the details.

	  Instead, you can get the already precompiled binary from
		ftp://ibc.wustl.edu/pub/slirp_bin/USE_AT_OWN_RISK/
	  as it is explained in the Alt.dcom.slip-emulators FAQ, included
	  with the docs.

	- move the "slirp" program to a better location, e.g. "./bin/slirp"
	  or "./slirp" (i.e. at the $HOME directory)

	- at your $HOME directory create the ".slirprc" file.
	  To keep it simple let's use only a few commands:
		#### .slirprc file ####
		add ptyexec /usr/bin/tcsh -l:10.0.2.1:23
		compress
		baudrate 38400
		#### end

	  The "compress" command ensures to use the CSLIP protocol.
	  The "add ptyexec" command was used instead of the "shell"
	  command (see the SLiRP's docs/CONFIG for a list of commands),
	  because it is better to use the "tcsh -l" (for ".login" entry)
	  and the "shell" command does not accept flags (I believe).
	  You should use the remote system specific address of the "tcsh"
	  program (or use another shell, if you prefer).

	  The "baudrate" should be used with the speed proper for your modem
	  connection.

3.2		Testing the SLiRP

	Login to your remote site and type

		% bin/slirp	(or "./slirp", depending on the location)

	You should get a list of messages, with the following line at the end:
		[talking CSLIP, MTU 1500, MRU 1500, 38400 baud]

	To exit the "slirp" type slowly (>1 sec gap) five 0's (zeroes).

3.3		Configuring your Linux system

	Essentially, what you need to do is to prepare a kernel able
	to run network and the CSLIP. Then you should configure the network.
	Start the "make config" in the "src/linux" directory and set "y"
	to the following options:

		Networking support (CONFIG_NET) [y]
		TCP/IP networking (CONFIG_INET) [y]
		Assume subnets are local (CONFIG_INET_SNARL) [y]
		Network device support? (CONFIG_NETDEVICES) [y]
		Dummy net driver support (CONFIG_DUMMY) [y]
		SLIP (serial line) support (CONFIG_SLIP) [y]
		CSLIP compressed headers (CONFIG_SLIP_COMPRESSED) [y]
		PPP (point-to-point) support (CONFIG_PPP) [y]

	Now, I use the 3c509 Ethernet card, so my additional options are:

		3COM cards (CONFIG_NET_VENDOR_3COM) [y]
		3c509/3c579 support (CONFIG_EL3) [y]

	For the NFS installation you can add also:

		NFS filesystem support (CONFIG_NFS_FS) [y]

	Now, after successful "make config", complete the kernel generation
	with "make dep" and "make zImage".
	Then move the arch/i386/boot/zImage to your kernel location and
	run "lilo".

	To configure the network, first decide which IP address to use.
	In a lack of your special address, take 192.168.1.100, allowed for
	local networks by RFC1597.
	Of course, you should rather read the NET-2-HOWTO for correct
	information, but you can try to do the following:

	A. Give your system a network name, e.g. "yourhost.linux.org",
	   where all the three names could be chosen to your tastes.
	   Place the above string (without the quotes) into the
	   "/etc/HOSTNAME" file.

	B. Edit your "/etc/hosts" file, adding
		192.168.1.100	yourhost.linux.org yourhost
	   The above "yourhost.linux.org" string should match the one chosen
	   in the step A above.

	C. If you run local Ethernet edit also your "/etc/networks" file,
	   adding a line:
		yournet		192.168.1.0

	D. Edit your "rc.inet1" from the /etc/rc.d directory (save the
	   original somewhere :) and set
		IPADDR=yourhost
		NETMASK="255.255.255.0"
		NETWORK=yournet
		BROADCAST="192.168.1.255"
	   Then, if you have a real Ethernet card on your system,
	   uncomment the line
 /sbin/ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
	   and then the following line
 /sbin/route add -net ${NETWORK} netmask ${NETMASK}

	E. Place your domain name "linux.org" (compare the step A) into the
	   "/etc/resolv.conf" file, as a line:
		domain	linux.org

	Now, reboot your system.

3.4		Testing your Linux system

	First of all watch the booting messages, or look into the
	"/usr/adm/messages" file, if your syslogd(8) is running.

	You should see messages like
		 IP Protocols: ICMP, UDP, TCP
		 PPP: version ...
		 TCP compression ...
		 PPP line discipline registered.
		 SLIP: version ...
		 CSLIP: code copyright ...
	If you have the Ethernet interface it should be recognized as well, e.g:
		 eth0: 3c509 at 0x280 ...

	Your network should be up and you could test it with a few commands:

	A. Run "ifconfig", without arguments.
	   You should see the "lo" (loopback) interface activated, with its
	   addresses.
	   If you run a real Ethernet as well, you will see the information
	   about the "eth0" interface as well, and you should notice the
	   familiar addresses, like "inet addr: 192.168.1.100", etc.

	B. Run "route", without arguments.
	   You should see a line about the "loopback" and maybe another one
	   about the "yournet".

	OK, your Linux system is ready to work with the CSLIP as well.

3.5		Installing the DIP

	- it may happen, that your Linux system has already the "dip"
	  binary. It would be nice to have the 3.3.7n version of it
	  (it has the updated documentation).

	- otherwise, get the DIP distribution file, e.g. the dip337n-uri.tar.gz,
	  and compile the "dip" program on your local Linux host.
	  You do it by typing "make" in the dip-3.3.7n directory.

	- move the "dip" program to a better location which is in your PATH,
	  e.g. /usr/local/bin/dip or $HOME/bin/dip.

	- at convenient location, e.g. your $HOME directory, create the dip's
	  script file, for example "slirp.dip".

	The dip's script file is usually long and complex. There are some
	examples in the dip's "samples" directory (maybe installed as
	/usr/doc/dip/samples.
	Anyway, I submit my "slirp.dip" file as an example.

#### slirp.dip file ####
#
# slirp.dip     Dialup IP script for use with SLiRP and netcom
#

main:
  # Set netmask on sl0
  netmask 255.255.255.0

  # Set the desired serial port and speed.
  # You may need to change ttyS2 to your modem device...
  # I am running the "mgetty" on this port as well, so I want to use
  # the "ttyS2" instead of the "cua2" device
  port ttyS2
  speed 38400

  # Reset the modem and terminal line.
  # This seems to cause trouble for some people!
  reset

  # Prepare for dialing.
  # Note your modem may need a different init string.
  # Mine is a WorldBlazer ...
  send AT S0=0 S11=70 S50=254 S58=2 Q0 V1 E1 X4\r
  wait OK 2
  if $errlvl != 0 goto modem_trouble

redial:
  # dial your POP#
  # The number below is for my local POP, your mileage may vary
  send ATDT 274 2900\r
  wait CONNECT 50
  if $errlvl != 0 goto dial_trouble

  # We are connected.  Login to the system.
login:
  sleep 2
  send \n
  wait ogin: 20
  if $errlvl != 0 goto login_trouble
  print got the login prompt, OK
  # replace 'zenon' below with your remote login username
  sleep 2
  send \n
# I don't know why I had to add the extra "\n" before sending my login name,
# but otherwise it did not work.
  sleep 2
  send zenon\n
  print sent 'zenon', waiting for 'password' ...

  wait ord: 30
  if $errlvl != 0 goto password_trouble
  # replace 'blablabla' below with your remote password
  send blablabla\r

  # We are now logged in, probably.
loggedin:
  # Substitute YOUR shell prompt below (mine is zenon@netcomNN n% )
  wait zenon 15
  if $errlvl != 0 goto prompt_error

  # SLiRP makes 10.0.2.2 the IP of the remote machine
  get $remote 10.0.2.2

  # Make sure 'slirp' is found on netcom and is executable
  # Here I assume, that the "slirp" has been installed at the remote $HOME/bin
  # directory
  send exec bin/slirp\n

  # Set up the CSLIP operating parameters.
  get $mtu 1500
  # Ensure "route add -net default $remote" will be done
  # With the dip-3.3.7n it is simple, just say "default"
  default

  # Say hello and fire up!
done:
  print CONNECTED local: $locip ---> remote: $rmtip
  mode CSLIP
  goto exit

prompt_error:
  print TIME-OUT waiting for SLIPlogin to fire up...
  goto error

login_trouble:
  print Trouble waiting for the Login: prompt...
  goto error

password_trouble:
  print Trouble waiting for the Password: prompt...
  goto error

modem_trouble:
  print Trouble occurred with the modem...
  goto error

dial_trouble:
  print Trouble occurred while dialing...
error:
  print CONNECT FAILED to $remote
  quit

exit:
  exit
#### end

	COMMENT: There are some entries in the above script which should be
	adapted to your needs:
	- the port name (I use the ttyS2)
	- the port speed (I use 38400)
	- the modem initialization string (I have a WorldBlazer)
	- the POP's phone number (I hope yours is different :)
	- your remote login name
	- your password
	- your prompt (to confirm the successful login)
	- the location of your "slirp" (mine is in $HOME/bin)

3.6		Testing the DIP

	You can start the "dip" in a verbose mode with
		% dip -v slirp.dip

	The messages printed by the "dip" may suggest some modifications
	to the above "slirp.dip" script.
	
	If everything goes well, you should see the following message
	at the end:
		CONNECTED local: 192.168.1.100 ---> remote: 10.0.2.2
	... and the "dip" switches to a "daemon"-like execution, returning
	your prompt.
	BTW, to stop the "dip" now, type simple "dip -k", and all the action
	of the "dip" will be canceled, and the modem connection will be
	closed.

4.	Normal operation

	A. Start your dip+slirp connection with typing

		% dip slirp.dip

	B. After successful connection and the "CONNECTED ..." message you have
	   the CSLIP connection to the Internet via your remote ISP.

	   Try first to connect to your remote server with the "telnet":

		% telnet 10.0.2.1

	   Thanks to the ".slirprc" configuration file, this connection should
	   activate the "tcsh -l" and you should get the remote login.
	   Typing "ps" you may see the following output:
		 6019 s0 S     0:13 slirp
		 6075 sb IW    0:00 -/usr/bin/tcsh (tcsh)
		16721 t6 R     0:00 ps


	C. You can exit from the above telnet connection, or try from another
	   virtual terminal (or X shell-window) the ftp connection:
		% ftp 198.86.40.81

	   After the successful (?) anonymous connection you may discover, that
	   you are ... at the "sunsite.unc.edu", Linux-archive site.

	   If you got so far, you may start admiring the power of the dip+slirp
	   connection: you are on the NET.

	   Disconnect from the "sunsite" ASAP, coming back to your "yourhost"
	   system.
	   Now, the question comes:

		Can we do simply "ftp sunsite.unc.edu" ?

	   Not before activating the DNS (Domain Name Server).

	You may want to quit from the CSLIP at this moment:
	From your local prompt type

		% dip -k

4.1		Adding a DNS capability

	Apparently, your remote ISP has the DNS service (otherwise you would
	not be able to use the Internet connections in a reasonable way).
	Connect to the remote server once again, with the "dip slirp.dip"
	and "telnet 10.0.2.1", and read the file "/etc/resolv.conf".

	You should see a few lines like
		nameserver  <IP-address>
	where the <IP-address> will have a specific value.

	Copy at least one of those lines into your "/etc/resolv.conf" file
	on your local Linux system.

	Now, come back to this local system (without breaking the
	dip+slirp connection), and test if the DNS service works.
	Type
		% dnsquery sunsite.unc.edu

	If the output will inform about the sunsite's IP address, your
	DNS service is functioning.

	Now, you can use utilities like "lynx", "mosaic" and "netscape"
	directly from your Linux box.

5.      Comments

	This simplified document was written as a summary of the basic
	dip+slirp installation, rather than as a tutorial.
	The intention was to help the potential CSLIP users with starting
	up.

	Therefore, if you see any obvious bugs in the above text, please
	let me know.
	After a while I would like to place this text as a mini-HOWTO
	document. For the time being it is available at my ftp directory at

		ftp.netcom.com:/pub/ze/zenon/linux/DipSlirpCSLIP/

	I want to thank the authors of the "dip" and "slirp" utilities
	for the wonderful utilities. I am impressed and grateful.

		Zenon Fortuna	(zenon@netcom.com)
[ 15 January 1998
  The Linux Dynamic IP Hacks mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Dynamic IP Hacks mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

Dynamic-IP-Hacks Mini-HowTo Version 2.1.3

Maintained by:         Michael Driscoll <fenris@lightspeed.net>

Featuring hacks from: Michael Driscoll <fenris@lightspeed.net>
                      Ryan R. Klems <rklems@primenet.com>
                      Matthew Driver <mdriver@cfmeu.asn.au>
                      Matthew Nuckolls <mnuck@umr.edu>
                      Justin Cragin <beyond@lightspeed.net>
                      Brad Baker <bpb@mlb.cca.rockwell.com>
                      Justin (Gus) Hurwitz <ghurwitz@dyndns.com>
                      Jeremy D. Impson <jdimpson@camelot.syr.edu>
                      Steve Przepiora <gearhead@dreamscape.com>
                      Artur Skawina <skawina@usa.net>
                      Dale Jolliff <taftbbs@e-tex.com>

Created        Mon Apr 22 16:24:33 PST 1996
Last Updated   Sun May 25 16:37:41 PDT 1997

If you just want to see the hacks skip down to section 2.0.

0.0 Table of Contents
1.0 Legalities, Definitions, &c.
 1.1 Where to get the latest version of this HowTo
 1.2 Feedback
 1.3 Why this HowTo?
 1.4 What is dynamic IP addressing and why do I have to put up with it?
 1.5 Can you help me set up {pppd,telnetd,sendmail,&c.}?
 1.6 Hey, what about SLIP?
 1.7 Copyright
 1.8 A Warning
2.0 Intro to Hacks #1-#3
3.0 Hack #1: Keeping your system up and accessable 24/7 method #1
    by Steve Przepiora <gearhead@dreamscape.com>
 3.1 What you'll need
 3.2 ip-up and ip-down scripts
4.0 Hack #2: Keeping your system up and accessable 24/7 method #2
    by Michael Driscoll <fenris@lightspeed.net>
 4.1 What you'll need
 4.2 Setting up keepalive.sh
  4.2.1 Using diald instead of a crontab entry
5.0 Hack #3: Keeping your system up and accessable 24/7 method #3
    by Michael Driscoll <fenris@lightspeed.net>
 5.1 What you'll need
 5.2 Fun with runlevels
6.0 Hack #4: IP publishing via mail
    by Michael Driscoll <fenris@lightspeed.net>
 6.1 Setting up your ip-up and ip-down
 6.2 How to find out your new IP address from another computer
  6.2.1 Telnetting to a POP3 server
7.0 Hack #5: Dynamically changing /etc/hosts
    by Michael Driscoll <fenris@lightspeed.net>
 7.1 What you'll need
 7.2 Creating your template host files
 7.3 More fun with ip-up and ip-down!
8.0 Hacks #6-8: Various hacks 
    by Ryan R. Klems <rklems@primenet.com>
 8.1 mail.c
 8.2 pppdm.c
 8.3 portmsg.c
9.0 Dynamic DNS entries 
10.0 Hack #9: Updating your .plan 
     by Matthew Nuckolls <mnuck@umr.edu>
11.0 Hack #10: A simple procmail recipe for finding your new IP
     by Justin Cragin <beyond@lightspeed.net>
12.0 Hack #11: Dynamic Home Page via ftp 
     by Michael Driscoll <fenris@lightspeed.net>
 12.1 Why would I want to do this?
 12.2 Setting up your page
 12.2.1 A note on redirects
        by Artur Skawina <skawina@usa.net>
 12.3 Using ncftp to automate page updates
  12.3.1 ncftp versions 1.x.x
  12.3.2 ncftp versions 2.x.x
 12.4 A simple search and replace sed rule
13.0 Hack #12: Paging yourself with your new IP address
     by Michael Driscoll <fenris@lightspeed.net>
 13.1 The paging program
 13.2 Calling it from ip-up
14.0 Hack #13: xterm logins through a firewall
     by Brad Baker <bpb@mlb.cca.rockwell.com>
15.0 Hack #14: Dynamic Home Page via cgi
     by Michael Driscoll <fenris@lightspeed.net>
 15.1 Overview of what we'll try to do
 15.2 The script (dynip.pl)
 15.3 Accessing the CGI when our link goes up
16.0 Hack #15: Suggestion for rc.*
     by Jeremy D. Impson <jdimpson@camelot.syr.edu>
17.0 Hack #16: Defeating local and ISP-imposed timeouts with ping
     by Artur Skawina <skawina@usa.net>
18.0 Hack #17: Using SSI's for dynamic IP publishing
     by Dale Jolliff <taftbbs@e-tex.com>

Appendix A: We need more hacks!
Appendix B: CREDITS


________
1.0 Legalities, Definitions, &c.
	by Michael Driscoll <fenris@lightspeed.net>

Section 1.1: Where to get the latest version of this HowTo

The absolute latest version can always be found at
<URL:http://frob.base.org/howto.txt>.

The canonical place to get the HowTo is
<URL:ftp://sunsite.unc.edu/pub/Linux/docs/howto/mini/Dynamic-IP-Hacks>,
though you should use a mirror of the LDP site if you know of any.

Section 1.2: Feedback

Feedback concerning this mini-HowTo should be addressed to Michael
Driscoll <fenris@lightspeed.net>.

Section 1.3: Why this HowTo?

The problem is, Linux just isn't as happy as it could be with dynamic IP
addressing.  It's the Unix equivalent of waking every morning to find
that your postal address has changed and that all of your stationary is
out of date.  Unfortunately, ISP's are moving more and more towards this
kind of addressing these days, and anyone who can't shell out more bucks
for a stable IP address is just kinda stuck with this.  The purpose of
this HowTo, therefore, is to make your Linux box happier and more
comfortable with dynamic IP addressing, which in turn should make you a
bit happier and more comfortable.

Section 1.4: What is dynamic IP addressing and why do I have to put up
with it?

An IP address is a set of four numbers, each from 0 to 255, and each
separated by a dot.  An example would be 198.41.0.8.  Each computer on
the Internet has a unique IP address.  The human-readable addresses that
you probably use, like sunsite.unc.edu and bak2.lightspeed.net, are just
semi-arbitrary names that are translated into their IP addresses by a
DNS server whenever you try to access them.

Dynamic IP addressing is something used by an ISP to cut down on the
number of IP addresses that they need to "own".  The way it works is,
when you dial up your ISP, they simply give you the next IP number in
their queue.  This way, they don't need an IP address for every single
customer they have, they just need one for every customer that might be
online at any given time.  Usually an ISP only has about a tenth as many
IP addresses as it has customers, although this of course varies.

Why do they do this?  Well, the simple way of explaining it is to say
that there just aren't enough IP addresses in the current scheme.  The
more complex answer is that we have plenty of addresses, it's just that
as more and more of them are used, the routing tables used by the
backbone routers start to look as fragmented as a ten year old MS-DOS
filesystem :-)  By using so many addresses, we lose efficiency in
routing lookups.  The current routing system is expected to blow up
sometime between the years 2000 and 2010.  Hopefully we'll all be
switched over to IPv6 by then anyways, in which case we'll all get our
own stable IP's anyways making this whole HowTo moot :-)

Section 1.5: Can you help me set up {pppd,telnetd,sendmail,&c.}?

No.  Figure it out yourself.  Builds character :-)

Actually, it would be pretty pointless for me to reinvent the wheel by
helping you set these up, as many documents already exist to help you
out.  Start by trying these:

the pppd man page
the chat man page
the in.telnetd man page
the inetd man page
the PPP-HOWTO
the NET-2-HOWTO 
   (Available at HowTo sites such as 
    <URL:ftp://sunsite.unc.edu/pub/Linux/docs/howto>)
the NAG
   (Network Administrator's Guide by Olaf Kirch,
    available at fine LDP sites everywhere, such as 
    <URL:ftp://sunsite.unc.edu/pub/Linux/docs/LDP>)

Section 1.6: Hey, what about SLIP?

To tell you the truth, I didn't write about it here because I don't know
a thing about working with it.

Luckily, this shouldn't be too much of a problem as PPP seems to be the
emerging standard, especially for dynamic IP addressing.

Sorry if you're that .3% out there that has dynamic IP addressing with
SLIP, but maybe you can glean a bit out of this HowTo and make your own
setup (if you do then be sure to see Appendix A to get your hack included
in this HowTo!)

Section 1.7: Copyright

Unless otherwise stated, Linux HowTo documents are copyrighted by their
respective authors. Linux HowTo documents may be reproduced and
distributed in whole or in part, in any medium physical or electronic,
as long as this copyright notice is retained on all copies. Commercial
redistribution is allowed and encouraged; however, the author would like
to be notified of any such distributions.

All translations, derivative works, or aggregate works incorporating any
Linux HowTo documents must be covered under this copyright notice. That
is, you may not produce a derivative work from a HowTo and impose
additional restrictions on its distribution. Exceptions to these rules
may be granted under certain conditions; please contact the Linux HowTo
coordinator at the address given below.

In short, we wish to promote dissemination of this information through
as many channels as possible. However, we do wish to retain copyright on
the HowTo documents, and would like to be notified of any plans to
redistribute the HowTos.

If you have questions, please contact Greg Hankins, the Linux HowTo
coordinator, at tjbynum@metalab.unc.edu via email.

Section 1.8: A Warning

This should go without saying, but I should say it anyways to cover
things.

I'm not sure all of this is the canonical way to do things, and if
something I've done is just too weird let me know how to fix it.  There
might be security risks in all of this, but I don't know of them yet.
This works on my machine, and I don't think it'll break yours too badly
:-)  Either way, you should take care when doing this stuff and make
sure you understand at least a bit about what this stuff is doing so you
can fix it if it goes haywire.

As the name implies, this document is about system *hacks*.  Hacks, by
definition, are a pretty weird way of setting up a system, though
sometimes they may be the only way.  Many times I could have made these
hacks more elegant and crafty, at the cost of simplicity.  I have not
done this, however, because it is my intention that the person who sets
these up on their own machine understand the hacks so that they can
rebuild and recreate them to fit their own specific needs.

Also, when reading this Howto keep in mind this quote from the DNS-HOWTO
by Nicolai Langfeldt <janl@math.uio.nl>:

    In this document I state flatly a couple of things that are
    not completely true (they are at least half truths though).
    All in the interest of simplification.  Things will probably
    work if you believe what I say.  

*****************************
*The good stuff starts here!*
*****************************


________
2.0 Intro to Hacks #1-#3
	by Michael Driscoll <fenris@lightspeed.net>

The first three hacks in this howto involve maintaining a constant PPP
connection by restarting pppd when the link goes down.  I thought up the
second of these hacks back when I first ran Linux, but have since moved
onto the third of the hacks, which is a lot more efficient (and,
unfortunately, more difficult to set up).  The first hack was not done
by me, but by Steve Przepiora <gearhead@dreamscape.com>, and is actually
better and more efficient than the second hack (which I thought up), and
is still just as easy to set up.

These three hacks work well with Hack #4, which will automatically put
your IP number in an accessible place (your mail spool on your ISP's
POP3 server) whenever your connection goes up.  With these two hacks
working together (automatic reconnect + IP publishing via mail) you
can easily find the dynamic IP of your machine from anywhere on the
network and be able to telnet, ftp, etc. to it.

Methods #1 and #2 are the two that are easy to implement, since they
are set up in 'recipe' form and all you have to do is follow directions
and fill in the blanks.  Method #3 is not in 'recipe' form, since it
deals with runlevels and init which vary greatly from distribution to
distribution and which can easily leave your computer in a screwed up
state if they themselves are screwed up.

So which method to use?  I suggest #1, it is easy and rather efficient,
or if you are a little more knowledgable, look at #3 to see if you can
figure out how to implement it, since it is the most efficient.  #2 is
only there because it was the first one that I wrote, and is the only
one "tested" so far in this HowTo (the other two are recent additions
which should soon replace #2 altogether).

If you don't like either three of the methods, write your own and send
me a line, I'll probably include it if it is something usable by others.

Anyways, we now continue with your regularly scheduled hacks:


________
3.0 Hack #1: Keeping your system up and accessible 24/7 method #1
	by Steve Przepiora <gearhead@dreamscape.com>

Section 3.1: What you'll need

A working PPP setup.

Section 3.2: ip-up, ip-down, and other assorted scripts

Well, here's how I do it;

1). Fire up vi and make a file called /etc/ppp/ppp-check.dat. Don't put
anything in it just save it.

2). Put this at the top of /usr/sbin/ppp-on :
echo on > /etc/ppp/ppp-check.dat
this will put the word `on' in in /etc/ppp/ppp-check.dat

3). Put this in /usr/sbin/ppp-off:
echo off > /etc/ppp/ppp-check.dat

4). Change the name of your /etc/ppp/ip-down file to
/etc/ppp/ppp-off-final

5). Finally, save this script to /etc/ppp/ip-down:
-----------------------------CUT HERE-------------------------------------

#!/bin/sh

export LOGGING="yes" ## Change this to no if you dont want to log it.
export LOG_STRING=""
export PPP_CHECK=""


##-----------------------Basic setup stuff--------------------------------
PPP_CHECK=`cat /etc/ppp/ppp-check.dat`
##-------------------------PPP was disconnected log it----------------------
if [ "$LOGGING" = "yes" ]
 then
   logger -i -p local0.notice -t ppp-check  PPP- Disconnected
fi
##-------------------------Now see how we were called---------------------
if  [ "$PPP_CHECK" = "off" ]
  then
   if [ "$LOGGING" = "yes" ]
     then
     logger -i -p local0.notice -t ppp-check  PPP- Legal disconnect
     logger -i -p local0.notice -t ppp-check  PPP- Turning off NET \
subsystem
     /etc/ppp/ppp-off-final
   fi
   exit
fi
##----------------------------------------------------------------------
## If were were just disconnected then  redial
if [ "$LOGGING" = "yes" ]
  then
   logger -i -p local0.notice -t ppp-check  PPP- Illegal disconnect
   logger -i -p local0.notice -t ppp-check  PPP- Attempting to reconnect
fi
/etc/ppp/ppp-off-final
while test -e /var/run/ppp0.pid && test -e /var/lock/LCK..ttyS3
 do
  sleep 1
done
  /usr/sbin/ppp-on

---------------------------------END------------------------------------

Steps 2, and 3 will let the script figure out how the connection was
brought down.


________
4.0 Hack #2: Keeping your system up and accessible 24/7 method #2
	by Michael Driscoll <fenris@lightspeed.net>

First see the notes about this hack in chapter 2.0.

Section 4.1: What you'll need

Not too much.  A working PPP setup.  A working cron.

Section 4.2: Setting up keepalive.sh

(note: This section can be probably be better with diald, see section 4.2.1)

cron is a daemon that starts programs at specified times.  You can look
at your crontab by running "crontab -e".  We'll be using crontab to run
a shell program that will keep our PPP connection up.

Run "crontab -e" as root and add this line:

#*/2 * * * * /etc/ppp/keepalive.sh

What this does is call the /etc/ppp/keepalive.sh script every two minutes.
(The '#` comments out the entry so it won't start running the script until
 we are ready).

Then put the following script named keepalive.sh in /etc/ppp:
-------------------------------------------------------------------------
#!/bin/sh
if [ -f /var/run/ppp0.pid ] ; then
 ping -c8 -l3 <your nameserver> 2>&1 | grep "0 packets" > /dev/null && \
 { /usr/sbin/ppp-off > /dev/null 2>&1 ; sleep 2 ; /usr/sbin/pppd }
else
 /usr/sbin/pppd
fi
------------------------------------------------------------------------

Now type "chmod 700 /etc/ppp/keepalive.sh" as root to make it an executable
script.

/* Hint1: Check those paths!  For pppd and ppp-off insert whatever it is
 *        that you use to start/stop your connection.
 * Hint2: I use your ISP's DNS server because I figure that if that's
 *        down, your net connection is screwed anyways :-)
 * Hint3: Be sure to use your DNS server's numeric IP address, otherwise
 *        ping returns a different message and the "grep" won't work.
 */

Now whenever you want your connection to stay up, you can just run
crontab -e and take out that "#" to uncomment the entry...and when you
want your connection to stay down, run crontab -e and put the "#" back
in, then kill your connection with ppp-off or whatever it is that you
use.

Section 4.2.1: Using diald instead of a crontab entry 
	by Divya Mahajan <vmahajan@giasdl01.vsnl.net.in>

The crontab entry that we just made can also be done (and probably a lot
more elegantly) by other programs, such as diald.  This section
demonstrates how to set up diald for this purpose, should you decide to
take that route instead.  I have left the crontab section in for
reference and because it doesn't require an extra package, but you might
want to try diald out instead.

1: Get the latest diald (should be somewhere near
	<URL:ftp://sunsite.unc.edu/pub/Linux/system/Network/serial/>)

2: Compile the stuff. (Actually you could probably get a precompiled diald
        package too from the Slackware sites)

3: After you have installed diald, you must modify /etc/diald.conf
   Add the following lines to the end:

> restrict 06:00 19:00 * * *
> up
   (This would force the link to be up between 6am to 7pm everyday.
    If you want 24hrs + 7days remove the restrict.)
> device /dev/modem
   (Use the correct device;)
> dynamic
> reroute
> connect-timeout 120
   (Modify this if your dialer takes a longer or shorter time to connect
    to your ISP)
> redial-timeout 10
   (Interval between 2 redials)
> defaultroute
> accounting-log /var/adm/diald.log
   (Keep track of how much time you are using)
>connect /path_to_myscript
   (You must use a dialing script so add the above line.  When diald
    calls this script both standard input and standard output are
    redirected to /dev/modem (or whatever you chose above) so ensure
    that your dialer script doesn't print any garbage. I personally use
    "/usr/sbin/dip mydipfile.dip >> /var/adm/dip.log 2>
    /var/adm/dip.err" which logs the dial attempts. Initially you may
    want to run dip with the -v option to debug the dip file, i.e #dip
    -v mydipfile.dip.  Remember to put the line "mode ppp" after you
    have logged in and started your PPP services at the ISP (Use
    dip-3.3.7n-uri). Also store all PPP settings in /etc/ppp/options
    rather than relying on the commandline.  Once your DIP file is
    debugged and ready, its time to roll.  Start up diald
    /usr/sbin/diald, if everything went fine it should start dialing and
    connect you to the ISP.  When PPP shutsdown due to modem HUP, diald
    will automatically retry.  Once you are confident, just put
    /usr/sbin/diald into your /etc/rc.d/rc.local)

Now you have a 24hr PPP.

diald is also good for a lot of other things, like demand dialing per
port, etc.  Look at the diald homepage
<URL:http://www.dna.lth.se/~erics/diald.html> for some examples.


________
5.0 Hack #3: Keeping your system up and accessable 24/7 method #3
	by Michael Driscoll <fenris@lightspeed.net>

First see the notes about this hack in Chapter 2.0.

Here's the third method for keeping your PPP connection up, which
is also the one I use.  I wouldn't suggest trying it unless you
actually understand everything that I say in here.  If you don't
understand some of it, here's some resources I'd suggest:

man init
man inittab
Essential System Administration, by AEleen Frisch
  (not really necessary, but good for comprehensive knowledge on things
   like runlevels.  I suppose any resource which included a discussion
   on runlevels would be fine.)

Section 5.1: What you'll need

A working PPP setup.  A working 'init' (I'm pretty sure you have this,
since it is the program which starts all user processes under Unix).

Section 5.2: Fun with runlevels

Here's how I set this one up.  First, I overhauled my inittab and
rc scripts.  I really hadn't messed with these much since I had
last installed Slackware 3.0, so they looked like the following:

0) Halt
1) Some kind of broken single-user setup
2) Empty
3) Empty
4) xdm (X)
5) Normal multi-user (default runlevel)
6) Reboot

I cleaned these out and redid them, so that they were like the following:

0) Halt
1) Initiate single-user mode
2) Normal multi-user    # These two will be explained later
3) Normal multi-user (default runlevel)
4) Empty
5) Empty
6) Reboot

Then I put the following line in /etc/inittab:

pu:3:respawn:/usr/sbin/pppd -detach

What this does is respawn pppd when my system is in runlevel 3, thus
keeping my connection redialing when it dies, and kill the connection
when I change the runlevel to 2.  Then when I want my connection back,
I change the runlevel back to 3 and it is in redial mode again.

The -detach on the respawn line keeps pppd from going to background, and
making init think it died (otherwise init will restart pppd a dozen times
and puke).

For those interested in my exact setup, I have tarred my /etc/inittab and
/etc/rc.d/* and put them on my web site as
<URL:http://frob.base.org/rc.tar.gz>.


________
6.0 Hack #4: IP Publishing via mail
	by Michael Driscoll <fenris@lightspeed.net>

This hack works very well with the previous scripts, because it
automatically publishes your IP when it changes so that you can
find the new address of your machine from anywhere else on the
network after your connection has dropped and restarted.

Other hacks which can accomplish this same thing (automatic IP 
publishing) using different means are #6, #8, #9, #10, #11, #12,
and #14 (almost half of them, come to think of it :-).

Section 6.1: What you will need

Just a working PPP setup, really.  This hack works well with the
automated PPP connection hacks discussed earlier, because it lets you
easily find your machine again after it has automatically reconnected
and had an address change.

Section 6.2: Setting up your ip-up and ip-down

This hack makes your new IP address available to you from practically
any machine on the net.  To achieve this we use the two scripts
/etc/ppp/ip-up and /etc/ppp/ip-down, which are automatically called by
pppd when your connection goes up or down, respectively.

Create a file (if it doesn't already exist) as root called
/etc/ppp/ip-up.  Put this in it:

#!/bin/sh 
# $4 is our new ip address passed by pppd 
# /var/run/add will hold our address 
echo $4 > /var/run/add
# mail our address to our ISP's mail server, with the subject "new ip
# address"
mail -s "New IP address" yourname@your_internet_address < /var/run/add

Then create /etc/ppp/ip-down and put this in it:

#!/bin/sh 
rm /var/run/add

Then run "chmod 700 /etc/ppp/ip-up /etc/ppp/ip-down" to make them
executable.

Voila!  Now every time pppd is started your address will be mailed to
your ISP's mail server.  We retreive it in the next section.

Section 6.3: How to find out your new IP address from another computer

Well, this calls for some resourcefulness on your part.  I really can't
walk you through it, as it depends on which kind of machine you're
trying to get it from.  In Windows, you can try to set up an email
program to retrieve mail from your ISP's mail server, and if you're in
Unix see if there's a program called "popclient", or "fetchmail", or
somesuch.  If all else fails, you can always use telnet (see the next
section).

Section 6.3.1: Telnetting to a POP3 server

This is how I retrieve my IP address, as I am usually showing off when I
do all of this anyways, and it really impresses all of the GUI users I
show it to :-)  Hopefully your ISP uses a POP3 server for mail (most
likely), otherwise you'll just have to figure this out yourself by
looking up the RFC for the protocol you need and figure out how to do it
by telnet.

Anyways, first you want to telnet to port 110 of your ISP's mail server.
In Unix you do this with "telnet your.mail.server.net 110", on VAX/VMS
you might need to do "telnet your.mail.server.net/port=110", and in a
Web browser you should use "telnet://your.mail.server.net:110".
Hopefully you can figure it out.

Once you are connected, you should see something like this:

>Connected to new-ls.lightspeed.net.  
>Escape character is '^]'.  

>+OK QUALCOMM Pop server derived from UCB (version 2.1.4-R3) at
>new-ls.lightspeed.net starting.

type "user your_username" to login.

>+OK Password required for fenris.

now type "pass your_password"

>+OK fenris has 2 message(s) (3030 octets).

type "list" to look at a list of your messages.

>+OK 2 messages (3030 octets) 
>1 2400 
>2 630 
>.

See that message with size 630?  That's my IP address!  How do I know?
Because it's always that size :-)

Now type "retr message_number" to retrieve the message you want.

>+OK 630 octets 
>Received: from ulfheim.lightspeed.net (avatar@bak2-pp-ls.lightspeed.net
>[204.216.66.74]) by new-ls.lightspeed.net (8.6.12/8.6.12) with ESMTP id
>TAA12048 for <fenris@lightspeed.net>; Mon, 22 Apr 1996 19:15:37 -0700
>Received: (from avatar@localhost) by ulfheim.lightspeed.net (8.7/8.6.9)
>TAA00594 for fenris@lightspeed.net; Mon, 22 Apr 1996 19:15:29
>Date: Mon, 22 Apr 1996 19:15:29 -0700
>From: Deus In Machina <avatar@ulfheim.lightspeed.net>
>Message-Id: <199604230215.TAA00594@ulfheim.lightspeed.net>
>To: fenris@lightspeed.net
>Subject: New IP address 
> 
>204.216.66.74
>
>.

And there it is!  Use "dele message_number" to get rid of it or just
"quit" to leave it there and quit.  Now just telnet to your machine at
that address and have fun!

If any of this is just not working for you, then check out RFC 1225,
which describes the POP3 protocol in full detail.

By the way, if this part of the hack doesn't work for you because you
have cron automatically downloading your mail, then check out hack #10
which uses procmail to send your new IP address to any email address you
want upon request.


________
7.0 Hack #5: Dynamically changing /etc/hosts
	by Michael Driscoll <fenris@lightspeed.net>

As I said before, Linux isn't completely happy with dynamic IP
addressing.  For example, sometimes talkd won't work with kludgy values
in /etc/hosts.  However, the following hack makes up for a lot of that
by changing /etc/hosts according to the IP address we receive when we
call up our ISP.

For me this fixed problems with "hostname" and "ntalk".

Section 7.1: What you'll need.

Nothing but a working PPP setup, really.

This hack is really very easy, all you have to do is read the directions
and fill in the blanks.

Section 7.2: Creating your template host files

***NOTE***  First, make a backup of /etc/hosts, just in case this 
***NOTE***  screws up anything.  Just "cp /etc/hosts /etc/hosts.backup"

First we'll make our template host files.  The first file will be named
/etc/hosts-down and will contain the following line:

------------------------------------------------------------------------
127.0.0.1 myhostname.mydomain.net localhost myhostname
------------------------------------------------------------------------

Substitute *your* hostname and domain names in for these values.
This hosts file will be the one used when your PPP connection is
down.

The second file will be named /etc/hosts-up and will contain at least 
the following lines: 

------------------------------------------------------------------------
127.0.0.1 localhost
--IP-- myhostname.mydomain.net myhostname
------------------------------------------------------------------------

Do the substitutions for "myhostname", "mydomain", etc as before (but
do not put anything in for the value "--IP--", that word is an anchor
that we will use in our script to substitute in a new IP address every
time it changes.  If you have no idea what I just said, don't worry, just
know that you *are* supposed to leave that word "--IP--" in there).

You can build a bigger /etc/hosts-up file if you want, that can contain
the IP addresses of frequently accessed machines and any nicknames that
you might want to use for them.  For example, my /etc/hosts-up looks like
this:

------------------------------------------------------------------------
127.0.0.1 localhost
--IP-- ulfheim.lightspeed.net ulfheim
136.168.201.9 ultrix6.cs.csubak.edu ultrix ultrix6
128.214.48.39 linux.cs.helsinki.fi linux
152.2.254.81 sunsite.unc.edu sunsite
136.168.1.4 academic.csubak.edu academic
128.214.248.6 nic.funet.fi ftp.funet.fi funet
------------------------------------------------------------------------

Section 7.3: More fun with ip-up and ip-down

Add the following lines to /etc/ppp/ip-up:

------------------------------------------------------------------------ 
cat /etc/hosts-up | sed -e s/--IP--/$4/g > /etc/hosts
------------------------------------------------------------------------ 

This puts the hosts-up file through a sed script which substitutes
the word '--IP--' with $4, the variable which contains our
new IP address.

Then add the following line to /etc/ppp/ip-down:

------------------------------------------------------------------------ 
cp /etc/hosts-down /etc/hosts
------------------------------------------------------------------------

This copies the hosts-down template to /etc/hosts.


________
8.0 Hacks #6-8: Various hacks
	intro written by Michael Driscoll <fenris@lightspeed.net>
	code straight from Ryan R. Klems <rklems@primenet.com>

Here's some C code sent to me from Ryan R. Klems <rklems@primenet.com>.

There are three programs, the first, mail.c, is a CGI that scans
through your mail spool for your new IP address as set up by Hack #1.
It then uses the IP address to set up a page containing a link to this
IP address.

The second, pppdm.c, can probably take the place of hack #1, as it looks
for a PPP connection, restarts pppd if it is down, and mails your new ip
address to your ISP's mailserver.

The third, portmsg.c, sits on a specified port and waits for a telnet
connection.  Upon connection, it will pull grep your mail spool for your
newest IP and output a message containing that.

These sources will need a bit of customization, so you probably
shouldn't mess with them unless you know what they are doing.

Oh yes, and Ryan has written to tell me that he wouldn't mind helping
you set up the code to meet your needs, as long as you ask nicely :-)

Section 8.1: mail.c

/*
 * mail.c written by Ryan R. Klems (rklems@primenet.com)
 * Copyright 1996, Author releases this source freely, allowing
 * copying and modification, so long as the original copyright notice
 * is maintained.
 *
 * I request that if you use this file you mail me... Thats all I ask =)
 *
 * A CGI for reading through your mailfile and finding an IP
 * address that you had your computer mail to you.
 *
 * Compiling:
 *    gcc mail.c -o mail.cgi
 *
 * Make sure to 'chmod +s mail.cgi' afterwards...must run with set uid
 * bit on to be able to open the mail file.
 */

#include <stdio.h>
#include <string.h>
#define MAILFILE "/var/mail/rklems" /* your mailfile */

main(void)
{
  FILE *mail;	/* file pointer for mail file */
  char bob[80], location[80];

  printf("Content-type: text/html\n\n");
  printf("<HTML><HEAD><TITLE>IP Address</TITLE></HEAD>\n");
  printf("<BODY><BASEFONT SIZE=4>\n");
  printf("<H1>IP Address</H1>\n");
  strcpy(bob, "42.**");
  if((mail = fopen(MAILFILE, "r")) == NULL)
    printf("Mail file is empty or does not exist.\n");
  else
  {
    /* 
     * loop continues till end of file because you want most recent IP
     * 198.68. is the domain of my ISP, change to yours...
     */
    while(!feof(mail)) /* until reaching EOF, do this */
    {
      fgets(location, 80, mail); /* Grab a line, from mail */
      sscanf(location, "198.68.%s", bob); /* look for domain */
    }
    strcpy(location, "198.68.");
    strcat(location, bob);
    printf("The IP Address of your computer is: %s\n", location);
  }
  printf("</BODY></HTML>\n");
}

Section 8.2: pppdm.c

/*
 * pppdm.c created by Ryan R. Klems (rklems@primenet.com)
 *   Released freely by the author to use/modify/copy/reditribute
 *   My only request is that if you use it...mail me and let me know =)
 *
 * This program keeps your link dialed up to an ISP and mails you
 * the newest IP address.  Useful for people with Dynamically allocated 
 * IP addresses
 * uses the following files...
 * /root/ip        :   Outputs the IP to this file
 * /root/log       :   If logging is defined
 * /root/pppchat   :   The chat file set up for chat.
 *     My chat file looks like:
 *       ""  ATDT7917777 CONNECT "" "ogin:" "rklems" "assword:" "<password>"
 *  <password> is YOUR password of course (like I'm gonna give you mine ;)
 *  *NOTE* for silent dialing do ATMDT
 *
 *  Compiling...
 *    gcc pppdm.c -o pdm
 *  *NOTE* Don't call it anything like pppdm b/c it looks for pppd
 *  might accidentally kill itself off ;)
 */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#define DOLOG

void main(void)
{
  FILE *fin,		/* multiuse file pointer */
       *popen();	/* proto of popen() */
#ifdef DOLOG
  FILE *log;		/* log file pointer */
#endif
  char line[80],	/* a line of a file */
       bah[80],		/* just stuff, also used for holding IP addr */
       crap[80],	/* just stuff */
       bob;		/* single char placeholder, not used for anything */
  int j,		/* flag for if a link was found */
      k,		/* flag for if this is a new link */
      pid;		/* pid of pppd process to kill off */
#ifdef DOLOG
  time_t now;		/* thing for time logging */
#endif

  for(;;) /* Loop forever... */
  {
    /* look at ifconfig for IP addr */
    if ((fin = popen("ifconfig", "r")) != NULL)
      while(fgets(line, 80, fin) != NULL)
        if(sscanf(line, "ppp0 %s", bah))
        {
          fgets(line, 80, fin);
          sscanf(line, "          inet addr:%15s", bah);
          j=1;
        }
    fclose(fin);
    if (!j) /* no link */
    {
      if((fin = popen("ps -a -x", "r")) == NULL)
      {
        fprintf(stderr, "PPPdm error: cannot open file.\n");
        exit(1);
      }
      /* scan through processes & kill off any zombie pppd processes */
      while(fgets(line, 80, fin) != NULL)
        if (sscanf(line, "%d  ?  %c     %4s pppd%s", &pid, &bob, crap, bah) == 4)
          kill(pid, SIGKILL);
      fclose(fin);
      k=0; /* new dial attempt */
      system("pppd connect 'chat -v -f /root/pppchat'"); /* try again */
#ifdef DOLOG
      now = time(NULL);
      if ((log = fopen("/root/log", "a")) == NULL)
      {
        fprintf(stderr, "Error in opening log file.\n");
        exit(1);
      }
      fprintf(log, "Initiating ppp-link. %s\n", ctime(&now));
      fclose(log);
#endif
      sleep(60); /* wait 1 min and check again */
    }
    if(j && !k) /* first time with new address */
    {
      if ((fin = fopen("/root/ip", "w")) == NULL)
      {
        fprintf(stderr, "Error in opening output file.\n");
        exit(1);
      }
      fprintf(fin, "%s\n", bah); /* write out addr */
      fclose(fin);
      /* mail it to yourself */
      system("mail -s IP joker@your.moma.com < /root/ip");
      k=1;
    }
    else /* take a nap and check again when we wake up */
    {
      j = 0;
      sleep(300); /* wait 5 minutes to check again */
    }
  }
}

Section 8.3: portmsg.c

/*
 * Portmsg.c written by Ryan R. Klems (rklems@primenet.com)
 * Copyright 1996, Author releases this source freely, allowing
 * copying and modification, so long as the original copyright notice
 * is maintained.
 *
 * I request that if you use this program that you mail me.  Thats
 * all I ask.
 *
 * This program sets up a port on a server to accept telnets.  Upon
 * accepting a telnet, the program outputs a message, and then closes
 * the connection.
 *
 * address of message would be xxx.xxx.xxx.xxx yyyy where the x's
 * s the IP number or IP name, and yyyy is the port number set up
 * within this program.
 *
 * Compiling instructions:
 *	Linux : gcc portmsg_gen.c -o <your_file_name>
 *      SunOS : gcc portmsg_gen.c -lsocket -lnsl -o <your_file_name>
 * ***Note***
 *  I don't have access to any other operating systems, so if you
 *  compile this program on an OS I don't have listed, and use 
 *  compiler options I didn't mention...please email me =)
 */

#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <errno.h>
#include <netinet/in.h>
#include <strings.h>
#include <netdb.h>
#include <unistd.h>
#define HOSTNAME "ares" /* hostname of computer */
#define PORT 3000	/* tcp port to bind to */
/* #define GETHOSTNAME */ /* uncomment if your server has gethostname() */

void get_location(void);	/* proto of my mail reading function */
char location[80];		/* The IP address */

void main(void)
{
  struct in_addr host_ip_number;
  struct sockaddr_in host_ip_addr;
  struct sockaddr_in addr;
  char host_name[100];
  struct hostent *hp;
  int s, new_sock;
  int tmp, length;

  /* 
   * The server I wrote this for doesn't have gethostname()
   * so, I put in a little fix...
   */
#ifdef GETHOSTNAME
  gethostname(host_name, sizeof(host_name));
#else
  strcpy(host_name, HOSTNAME); 
#endif
  hp = gethostbyname(host_name);
  bzero((char *)&host_ip_addr, sizeof(host_ip_addr));
  memcpy((char *)&host_ip_addr.sin_addr, hp->h_addr, hp->h_length);
  host_ip_addr.sin_family = hp->h_addrtype;
  host_ip_number = host_ip_addr.sin_addr;
  host_ip_addr.sin_port = htons(PORT);
  host_ip_addr.sin_addr.s_addr = INADDR_ANY;
  /* open a socket s */
  s = socket(host_ip_addr.sin_family, SOCK_STREAM, 0);
  if ((int)s==-1)
  {
    fprintf(stderr, "Error in opening socket.\n");
    exit(1);
  }
  tmp = 1;
  if(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&tmp, sizeof(tmp))<0)
  {
    fprintf(stderr, "Error in setsockopt.\n");
    exit(1);
  }
  /* bind the socket to the server */
  if (bind(s, (struct sockaddr *)&host_ip_addr, sizeof(host_ip_addr))  == -1)
  {
    if(errno == EADDRINUSE)
    {
      fprintf(stderr, "Socket already bound!\n");
      exit(1);
    }
    else
    {
      fprintf(stderr, "Other error binding socket.\n");
      exit(1);
    }
  }
  /* tell the server to listen to the port */
  if (listen(s, 1) == -1)
/* 1 is the maximum size of the connection queue */
  {
    fprintf(stderr, "Error in listen.\n");
    exit(1);
  }  
 while(1) /* just keep looping */
 {
   length = sizeof(addr);
   /*
    * port has been opened with socket(), bound with bind(), and set
    * active with listen(), now accept() watches the port for 
    * connections, it will wait here until it has one...
    * new_sock is the file descriptor for the new socket
    */
   new_sock = accept(s, (struct sockaddr *)&addr, &length);
/*
 * The function get_location() and the send()'s are what I did to
 * suit my particular needs.  Put your own messages in here...
 */
   get_location();
   /* send just sends a string foo of length strlen(foo) with flags */
   send(new_sock, "Location:\n", 11, 0);
   send(new_sock, location, strlen(location), 0);
   close(new_sock); /* Close connection after message printed */
 }
}

void get_location(void)
{
  FILE *mail;	/* file pointer for mail file */
  char a[80];	/* char array for holding ip addr */

/* 
 * FYI, this just opens my mail file, looks for a line with
 * 198.68.(the domain of my ISP), takes the last part, puts
 * the 198.68. in location, then cats the rest on the end
 */
  strcpy(a, "42.**");
  /* open /var/mail/ryan for read, and check to see there is a file */
  if((mail = fopen("/var/mail/ryan", "r")) == NULL)
  {
    strcpy(location, "Error in obtaining information.\n");
    return;
  }
  else
  {
    while(!feof(mail)) /* until reaching EOF, do this */
    {
      fgets(location, 80, mail); /* Grab a line, from mail */
      sscanf(location, "198.68.%s", a); /* look for domain */
    }
    strcpy(location, "198.68.");
    strcat(location, a);
    /* loops continues till end of file because I want most recent IP */
  }
}


________
9.0 Dynamic DNS entries

If you're interested in setting up a hack involving Dynamic DNS
entries (DNS entries that change to point to your computer when
its IP address changes) then you might want to check out these
URLs:

1) <URL:http://www.cfmeu.asn.au/matthew/virtualip.html>
Check it out, Matthew got it working and is asking for other people to
try it to iron out the fine details.  The hack involves already having
control of a DNS at a static IP.

2) <URL:ftp://ietf.org/internet-drafts/draft-ietf-dnsind-dynDNS-11.txt>
The IETF is the Internet Engineering Task Force, the people who
basically lay out the future protocols and systems to be used by the
Internet.  This URL is the IETF's draft for dynamic DNS and should be
read by anyone who might be thinking of attempting something in this
direction.

For those who don't {want to,cant} mess with the details, but just want
a dynamic name set up without the fuss, check out DynDNS.com.  Quite a
few people have mailed me regarding their happiness with their service,
so you might want to check it out.  Their site is at
<URL:http://www.dyndns.com/>, and you can e-mail Gus Hurwitz
<info@dyndns.com> for more details.  Another service that has just come
to my attention is dynip.com, which you can check out at
<URL:http://www.dynip.com/>.

[From Artur Skawina <skawina@usa.net>]:
Another dynamic DNS project exist at <URL:http://www.ml.org/>.  It has
been operational since january 1997; while it is still in beta tests, it
works quite well.

It's very easy to use: you only have to register a hostname once,
then you can run a special "client" every time your IP changes (There
exists several linux clients, eg.
<URL:http://skawina.home.ml.org/mlddc.html>).  For more details on this
service go to <URL:http://www.ml.org/dyndns/>.

  [Editors note: If you do use the services of ml.org, please consider
  making a donation to them in order to help pay them back for the blood,
  sweat, and tears that they've poured into these projects.  After all,
  they're still a garage-based organization that do things for the
  internet community that the InterNIC would normally charge $100 a pop
  for -- MCD]


________
10.0 Hack #9: Updating your .plan 
	by Matthew Nuckolls <mnuck@umr.edu>

This pair of scripts allows one to put their current IP number in their 
.plan file on a remote server. I use it so friends and family can see if 
I'm dialed in, and where to send ytalk requests to.

Put something like

/etc/ppp/putip "None, the link is down"

as the first line in your ppp-off script.

You need a valid $HOME/.netrc file for putip to work. mine looks like:

machine rocket
login mnuck
password <mypassword>

and is chmod 600

-Matthew Nuckolls
 mnuck@umr.edu

ip-up:
------------------------------------------------------------------------
#!/bin/sh
#
# make sure this is chmod 711, since your password is stored in the clear

PLANLOC = /home/mnuck/.plan
REMOTE_USER_NAME = mnuck
REMOTE_PASSWORD =
REMOTE_PLANLOC = /afs/umr.edu/users/mnuck/pub/.plan
REMOTE_SERVER = rocket

echo "My dynamic IP is: " $4 > /tmp/ip.myip

cat $PLANLOC /tmp/ip.myip > /tmp/plan

echo $REMOTE_USER_NAME > /tmp/ip.script
echo $REMOTE_PASSWORD >> /tmp/ip.script
echo "put /tmp/plan" $REMOTE_PLANLOC >> /tmp/ip.script
echo "quit" >> /tmp/ip.script

ftp $REMOTE_SERVER < /tmp/ip.script &> /dev/null

rm -f /tmp/ip.myip
rm -f /tmp/ip.script
rm -f /tmp/plan
------------------------------------------------------------------------
end ip-up

putip:
------------------------------------------------------------------------
#!/bin/sh
#
# This script relies on a vaild .netrc file
#  -see ftp man page for details

PLANLOC = /home/mnuck/.plan
REMOTE_PLANLOC = /afs/umr.edu/users/mnuck/pub/.plan
REMOTE_SERVER = rocket

echo "My dynamic IP is: " $1 > /tmp/ip.myip

cat $PLANLOC /tmp/ip.myip > /tmp/plan

echo "put /tmp/plan" $REMOTE_PLANLOC > /tmp/ip.script
echo "quit" >> /tmp/ip.script

ftp $REMOTE_SERVER < /tmp/ip.script &> /dev/null

rm -f /tmp/ip.myip
rm -f /tmp/ip.script
rm -f /tmp/plan
------------------------------------------------------------------------
end putip


________
11.0 Hack #10: A simple procmail recipe for finding your new IP
	by Justin Cragin <beyond@lightspeed.net>
	written by Michael Driscoll <fenris@lightspeed.net>

Here's an easy one, assuming you already have procmail set up.  This
hack requires that you have a spare shell/email account somewhere on the
internet where you can temporarily stick an email and is useful when
you can't use the mailing trick in hack four to get your new IP address
because you have a cron job regularly downloading your mail.

host.bogus.net will be the name of the machine where you have the
shell account to mail your new IP address to.

In your .procmailrc, simply add the following recipe:

:0:
* ^Subject:.*sendmeip
|mail -s "Your new IP" other.mail.address@host.bogus.net < /var/run/add

For the email address use a shell account whose mail is not being
regularly downloaded by a cronjob to your local machine (what, doesn't
anybody else collect shell accounts?  I only have five so far ;)

/var/run/add is of course the file containing your IP address that we
set up in hack one.  If you haven't done that hack, then do something
like the following in /etc/ppp/ip-up:

------------------------------------------------------------------------
echo $4 > /var/run/add
------------------------------------------------------------------------

Now to use this, just mail your normal mail account from any place on
the 'net with a subject containing the word "sendmeip", and then telnet
to the shell account and wait for the cronjob on your machine at home to
download that mail and automatically send you a reply to the shell
account with your new IP in it!

Was that too complex?  Lemme know if I should be clearer on that bit.


________
12.0 Hack #11: Dynamic Home Page via ftp 
	by Michael Driscoll <fenris@lightspeed.net>

This is a simple and easy hack for putting your new IP address on a
home page on your ISP's http server.  It requires:

o ncftp (though you could kludge up a script that could use normal ftp) 
o ftp access to your IPS's web server.

You can see this hack in action at <URL:http://frob.base.org/>.

(I also have scripts from <shadow@indirect.com> for another hack that
accomplishes the same thing that this does, though they use normal ftp
and are more complex.  You can find these scripts at my home page, as
<URL:http://frob.base.org/contrib.tar.gz>).

Note: an alternative to this hack (using CGI) is present in hack #14.
It is useful for those without ftp access to their ISP's http servers.

Section 12.1: Why would I want to do this?

1: Because it's a neat hack.
2: So that all of your friends and family can easily find your new IP
   address (Ok, maybe that's not a good thing :-)
3: So that you can run your own httpd, with your own CGI's (Merely put
   an http:// pointer to your new IP address which will access your
   own httpd)
4: When have we needed a reason to do something?

Section 12.2: Setting up your page

First, you're going to want to write up some HTML to go onto the pointer
page.  It is beyond the scope of this HowTo to teach you HTML, so you'll
have to learn that bit yourself.  Try some sites like
<URL:http://w3.org> and <URL:http://hoohoo.ncsa.uiuc.edu>, they have
good HTML primers online.  However, when you write the page, in place of
the address in any pointers to your machine instead put a recognizable
anchor (I will use the word '--IP--' in this example) so that we can use
a script to replace that anchor with our IP address.  For example, a
simple template page would look like this:

<HTML>
<HEAD>
<TITLE>This is Mike Driscoll's Dynamic IP Dynamic Home Page</TITLE>
</HEAD>

<BODY>
<P>Last known IP of ulfheim.lightspeed.net:
<P><a href=telnet://--IP-->--IP--</a>
</BODY>
</HTML>

Notice that the href and the link name use '--IP--', which the script
will fill in with our IP address before it uploads the page to the
server.

For this example, I'll assume that you've named this template page
/etc/ppp/index.html.

Section 12.2.1: A note on redirects
	by Artur Skawina <skawina@usa.net>

Instead of only uploading a page with the current IP it's possible to
upload a page that will directly transfer anybody who loads it into
their browser to your dynamic host (eg. add a tag like this one to the
HEAD section of the page:
<META HTTP-EQUIV="refresh" CONTENT="3; URL=http://--IP--/page"> )

Section 12.3: Using ncftp to automate page updates.

Before we do this part we'll have to figure out which version of ncftp
you are running.  To do this, just start ncftp.

Here are two examples:

fenris@ulfheim:~$ ncftp
1.9.5 (October 29, 1995)
ncftp>_

mdriscol@ultrix6:/usr/stu/mdriscol$ ncftp
NcFTP 2.0.5 (May 1, 1995), by Mike Gleason, NCEMRSoft.
NcFTP> _

Depending on the version number listed when you start ncftp, we will
do this section in one of two ways.  If the version number is 1.x.x
(ie. mine is 1.9.5), then use the first method, if the version number
is 2.x.x (ie. the one in my ultrix account at school is 2.0.5) then
use the second method.

Section 12.3.1: ncftp 1.x.x

Now we'll add some stuff to root's .ncftprc.  In mine, I have the
following: 
----------
#set auto-binary on
#set recent-list off

machine your.isp's.web.server
        user yourusername
        password yourpassword
        macdef init
		cd /to/your/home/directory
                put /tmp/index.html index.html
                quit
----------
The auto-binary insures that we'll be in binary mode, the recent-list
bit stops a .ncrecent file from being created (I just don't like them,
you can have one if you want), and the machine entry defines my
password, username, and default actions (you might not need the cd bit,
at least I don't, since when I ftp to my ISP's server it automatically
puts me in the right directory).

Section 12.3.2: ncftp 2.x.x
	by Tomas Jamate <tvj@miser.umass.edu>

[Editors note:  I changed Tomas's script a bit before including it in
 in the HowTo, if I broke it please tell me! -- MCD]

Here's the setup files I used for getting ncftp v2.x.x to work with 
Hack #8. Note that ncftp ver 2.x.x keeps all setup files under ~/.ncftp.
I make no guaruntees, but this setup works for me.  Look at the man
pages if you want to use other options for ncftp.

First manually connect to your web service provider using ncftp.

$ ncftp -u service.provider.com

The -u means force prompt for user name and password.  Once connected cd
into your web directory.  This creates a bookmark entry for
service.provider.com.  (I'm not crazy about the bookmark setup, but hey,
it works).  Exit ncftp.

Edit ~/.ncftp/bookmarks.  You'll see the site entry with your username,
you need to put your password right after the username.  It should look
something like this:

NcFTP bookmark-file version: 6
Number of entries: 1
service,service.provider.com,Username,Password,,/dir/of/your/web/page,[etc]

Now create and edit ~/.ncftp/macros, It should look like this:

macro .open.example
put /tmp/index.html index.html
exit
end

Now you can automatically upload the index.html with:
        "ncftp -L example"  -L means go to line mode style
-or-
        "ncftp -Lf example"  -the -f means force overwrite of existing
                              file, for the paranoid ;-)

Section 12.4: A simple search and replace sed rule

Now we write the sed rule.  Just put the following in 
/etc/ppp/ip-up:

# Begin dynamic IP stuff
if [ -e /tmp/index.html ]; then
	mv /tmp/index.html /tmp/index.html-`date +%s`
fi
cat /etc/ppp/index.html | sed -e s/--IP--/$4/g > /tmp/index.html
ncftp your.isps.web.server >/dev/null 2>&1

First we check for pre-existance of /tmp/index.html.  A cracker could
be trying to exploit our usage of this to wipe out any file he pleases
in the filesystem by linking /tmp/index.html to it and waiting until
the script is run.  If it already exists, the file is harmlessly moved
out of the way until you look at it, foiling any nefarious plans.

Then we run our sed script.  This substitutes all occurances of our
anchor string '--IP--' with our new IP address and dumps the new
index.html in /tmp.  ncftp is then run to upload the new /tmp/index.html
which has the current IP address in it.

Congratulations, it's done, you now have a dynamic home page that you
can use to point to your home machine!  Have fun customizing it!  Just
edit /etc/ppp/index.html, and it should be updated the next time you
dial up your ISP with pppd.


________
13.0 Hack #12: Paging yourself with your new IP address
	by Michael Driscoll <fenris@lightspeed.net>

Here's a neat hack that I don't know anyone will use.  It involves using
a modem-dialing program to page oneself with one's new IP address.  It
requires:

o modem (speed doesn't matter since we're just going to use it to dial
  [aren't you glad you kept your 300bps modem? :-) ])
o extra phone line (doesn't need to be dedicated to this, as hopefully
  you have a modem that will gracefully give up if a voice call is
  already in progress (I guess that's something you should check, some
  modems are rather brutal about this)).
o An ordinary numeric pager
o A dialing program

Section 13.1: The paging program

For this hack you will need some program that has the ability to dial a
modem from the command line.  For the following examples, I will use the
program 'modem-stats' by Kenneth J. Hendrickson <kjh@usc.edu>, which can
be found at
<URL:ftp://sunsite.unc.edu/pub/Linux/apps/comm/modem-stats.tar.gz>.

I imagine that other dialing programs can easily be adapted to this
examples.

Section 13.2: Calling it from ip-up

We will put the following lines in /etc/ppp/ip-up:

#Separate $4 (IP address) into four parts
part1=`echo $4 | cut -f1 -d.`
part2=`echo $4 | cut -f2 -d.`
part3=`echo $4 | cut -f3 -d.`
part4=`echo $4 | cut -f4 -d.`
#Run dialing program
/usr/sbin/modem-stats -c 'atz' /dev/cua2
/usr/sbin/modem-stats -c 'ats7=15' /dev/cua2
/usr/sbin/modem-stats \
 -c 'atdt6384658,,,'${part1}'*'${part2}'*'${part3}'*'${part4} /dev/cua2

Explanations:

The atz resets the modem to sane defaults, the ats7=15 sets the time to
wait for a carrier, the ','s are pauses, and the '*'s are used to
signify dashes (at least they do on my pager, hopefully they will on
yours).

Oh yes, and you might have better results if you put your own pager
number in place of 638-4658, as that is my pager number :-)  Also,
replace /dev/cua2 with the device name for your modem.

Congratulations.  You're done!


________
14.0 Hack #13: xterm logins through a firewall
	by Brad Baker <bpb@mlb.cca.rockwell.com>

 [Editor's note:
  As the author of this hack notes, this hack may have inherent security
  problems, such as the possibility of password capture and the breach of
  your firewall's security inherent in handing out logins to sites outside
  your localnet.  This hack is being included more for its hack value than
  its general usefulness.  I wouldn't suggest doing this one unless you
  are the netadmin for that network or are on very good terms with him or
  her :-) -- MCD]

Here's another hack for you to try. This one works, and I'm not sure of
the security risks yet, but it is amusing.

It would be nice to be able to get access to my work machine (Sun) from
home, and vice versa, yet telnet is firewalled at work. Here's a way
around it.

For purposes of this explanation I'll give the method for gaining access
to my work machine from my home Linux machine, with a dial-up PPP
connection to my ISP and dynamic IP assignment.

>From home, when I want access to my work machine, I dial-in and fire up
X, set "xhost +", determine my dynamic IP, and email my dynamic IP to my
work machine in a mail message with a particular format. On my work
machine I have a procmail recipe/script setup that parses the body of a
message whose subject matches a target, say "X-W". If the body of that
message meets certain requirements then it extracts the IP from the
message and spawns an xterm with the display directed to my home dynamic
IP like this:

     xterm -display my.ip.i.sent:0.0 -e login

Voila! In about 30 secs to a minute, an xterm login shell appears on my
home machine! I haven't tried going the other direction yet because my
home machine isn't on full time, but using the other methods of
determining the dynamic IP from a remote machine it should work the same
way.

I'm quite concerned about security issues though and so I've got it
disabled until I find out more. When the xterm shows up at home it gives
a login prompt, and Secure Keyboard can be used to avoid capture of the
password (I'm not sure how secure this feature is in xterm). Still, I'm
not real sure at this time what the security features of X are. I'm most
concerned about my xterm popping up on the wrong IP, or to an IP that I
had before my line connection got dropped just now, though, most users
are using Windows and the X access request will not succeed.

Further required security procedures are to encrypt the IP in the email
message with PGP or common key encryption and to restrict the dynamic
IPs to a range, though my ISP won't divulge the range of their dynamic
IPs to me.

Here's the .procmailrc rule, script file, and sample email message that
I used to test it (say 111.222.333.444 is the dynamic ip).

-- rule set in ~/.procmailrc --
:
^Subject: X-W
| cat | $HOME/scripts/send_xterm
-- end --

-- ~/scripts/send_xterm --
#!/bin/sh
XX=`cat $1 | grep "^IP: .*" | sed "s/IP: \(.*\)/\1/"`
XX=`echo $XX | perl -e '$_ = <>; s/[^0123456789.]//g; print'`
xterm -display $XX -e login &
-- end --

-- sample email message --
To: bpb@my.machine.com
Subject: X-W

IP: 111.222.333.444:0.0
-- end --

You can try it out on your own machine by mailing it to yourself
(after you've setup .procmailrc and send_xterm locally of course).


________
15.0 Hack #14: Dynamic Home Page via CGI
	by Michael Driscoll <fenris@lightspeed.net>

This hack is similar to hack #11, but differs in method.  While hack #11
involves using ftp access to your ISP's http server to update a page
containing a link to your new IP, this one accesses a .cgi script on
your ISP's http server which sets up our new page by itself.

To use this script you'll have to convince your ISP's sysadmin to put
this CGI on their http server.  It is not unreasonable for them to charge
you money to check the script for security since it takes them time and
is a bit of insurance for the risk of them putting it on the server in
the first place (although I'll try my best to make this one 'secure').
For example, my ISP (lightspeed.net) charges $50 per script to check it.

***Warning*** Not only is this script new and (largely) untested, but
I'm writing it at 02:52 PDT to avoid doing my Philosophy mid-term.  If
you don't know anything about CGI and how to make it secure, then I'd
suggest you wait until any bugs are worked out before you try foisting
this upon a poor sysadmin.

***Note***
Well, it's been two months since I wrote that warning and I've heard
nothing about the security of this CGI, for or against.  Either it
*is* secure and nobody has let me know, or nobody uses it :-)  Either
way, I still urge caution.

Section 15.1: Overview of what we'll try to do.

Basically, all you'll need to do is take the following script and do
a little interpretation in filling in the values.

In the script we'll try to do the following:

* Parse a newip= parameter, making sure it is a legitimate IP
* Parse a password= parameter as a *very* loose security to make sure
  some hoodlums can't easily screw with your script to fill in their own
  IP values (Note: I know this won't be 100% foolproof but the
  ramifications if it fail shouldn't be *too* bad, and at least a
  failure should be non-destructive and there will be server logs noting
  who the perpitrator is).
* Check the cgi's $REMOTE_HOST and $REMOTE_ADDR environment variables
  against your domain name to make sure that it's at least a local
  request.
* Finally, if everything checks out, set up the page.
  
Section 15.2: The script (dynip.pl)

#!/usr/bin/perl
# Written by Michael Driscoll <fenris@lightspeed.net>
# Suggestions very welcome

require 5; # Require perl5
use CGI; # This is the CGI.pm module, available at CPAN sites everywhere like
         # <URL:ftp://ftp.cdrom.com/pub/perl/CPAN/modules/by-module/CGI>

# Fill in these values
$givendomain = "domain.net";               # Put in your ISP's domain name
                                           # (Actually the last two parts of
                                           # the domain, although this can
                                           # be changed below at the split())
$givenpassword = "potrzebie";              # Fill in a password to use
$filename = "/some/path/to/my/index.html"; # Get your sysadmin to fill this
                                           # in (User's page to update).
                                           # Note to sysadmin: the file
                                           # indicated will have to give
                                           # write perms to the userid of
                                           # httpd, unless you use Apache's
                                           # suid method or something (not
                                           # recommended)

# The followings deal with IP numbers using the scheme aaa.bbb.ccc.ddd
$higha = "255"; # Fill in the highest range of the aaa part of your
                # ISP's IP block.
$lowa = "0";    # Same for the low range of the aaa part.  Probably the
                # same as $higha since most ISP's don't span more than one 
                # class A network :-)
$highb = "255"; # Fill in the highest range for bbb
$lowb = "0";    # Lowest range for bbb
$highc = "255"; # You get the point.
$lowc = "0";    #
$highd = "255"; #
$lowd = "0";    #

# link $query to the cgi.pm module
$query = new CGI;

# $newip is our new IP via the newip variable
$newip = $query->param("newip");

# $trypassword is the tentative password to check against $givenpassword
$trypassword = $query->param("password");

# $hostname is the name of the host this is coming from to check against
# $givendomain
$hostname = $query->remote_host;

# Check the password first of all
unless ("$trypassword" eq "$givenpassword") {
	print "Content-type: text/plain\n\n";
	print "Sorry, wrong password\n";
	exit;
}

# Break up the IP into @IP
# substitute out any non-numerics except for '.'
# splice() it to take out anything after the first dotted quad
# (How did that get there??  Anyways, I'm trying to take as few
# chances against crackability as possible).
$newip =~ s/[^\d\.]//g;
@IP = split /\./, $newip;
splice(@IP, 4);

# Check the IP to make sure it's within bounds
unless (($lowa <= $IP[0]) &&
	($lowb <= $IP[1]) &&
	($lowc <= $IP[2]) &&
	($lowd <= $IP[3]) &&
	($higha >= $IP[0]) &&
	($highb >= $IP[1]) &&
	($highc >= $IP[2]) &&
	($highd >= $IP[3])) {
	print "Content-type: text/plain\n\n";
	print "Sorry, that IP address doesn't seem to be within bounds\n";
	exit;
}

# Now let's check the hostname
# Break it up into parts of @hostnamearray
@hostnamearray = split /\./, $hostname;
$dompart2 = pop @hostnamearray;
$dompart1 = pop @hostnamearray;

# Check it
unless (("$dompart1"."\.$dompart2" eq "$givendomain") || 
	("$hostname" eq "localhost")) {
# Print an error
	print "Content-type: text/plain\n\n";
	print "Sorry, you don't seem to have the right domain\n";
	exit;
}

# Things seem to check out, let's set up the page
# Make sure to escape out things like #, \, $, @, %, and '

open(FILE, ">$filename") || 
	die "dynip.pl cannot open $filename to write: $!";
flock(FILE, 2);

# Start html here.  $newip is our new IP address.
print FILE "<html><head><title>Title etc.</title></head>\n\n";

print FILE "<body><h1>body here</h1><hr>\n";
print FILE "<p>blah blah blah\n";

print FILE "<p>And <a href=telnet://$newip>here</a> is a link to my ";
print FILE "current IP address.\n";

print FILE "</body></html>\n";
flock(FILE, 8);
close(FILE);

# Send an ok to our accessing program
print "Content-type: text/plain\n\n";

print "Setup was successful\n";

# End

Section 15.3: Accessing the CGI when our link goes up

Now all we do is access it with lynx in our /etc/ppp/ip-up.
The following line should do it, using the /etc/ppp/ip-up usage of
$4 for the new IP value: 

lynx -dump \
'http://www.ispserver.net/cgi-bin/dynip.pl?newip=$4&password=potrzebie' \
>> /etc/ppp/lynxlog

Put the password you chose in the place of 'potrzebie', of course.  And
be sure to chmod 700 /etc/ppp/ip-up when you're done, now that it has
sensitive information in it.

(BTW, the \'s are just used so that I can fit the command under 80 columns.
what they do is escape out the newline so that it is considered one command)

Also be sure to periodically reduce /etc/ppp/lynxlog as it will grow to
be somewhat big after a while :-)

There you go...hopefully you're done!


________
16.0 Hack #15: Suggestion for rc.*
	by Jeremy D. Impson <jdimpson@camelot.syr.edu>
	written by Michael Driscoll <fenris@lightspeed.net>

Previously, this HowTo had various bits of instruction scattered
throughout which basically copied various parts of /etc/ppp/ip-down in
the rc.* files, to be run in case of a crash of the system while the PPP
connection was still up.  Jeremy mailed me with the suggestion of simply
running the /etc/ppp/ip-down file itself at bootup, instead of tediously
adding most of it bit by bit to the rc.* files.  Therefore, providing
that the commands in /etc/ppp/ip-down make sense at bootup and don't
rely on options passed by pppd (if the latter is true, you can always
hack up a fake command line), you can simply add the following to the rc
file of your choice:

# Run /etc/ppp/ip-down if pppd wasn't shut down cleanly
if [ -f /var/run/ppp?.pid ]; then
	/etc/ppp/ip-down
fi

Words from Jeremy:  This little trick won't be relevant in every
situation, but it is in mine, and I thought maybe you'd appreciate it.

Thanks Jeremy!


________
17.0 Hack #16: Defeating local and ISP-imposed timeouts with ping
	by Artur Skawina <skawina@usa.net>

[Editors note: As Artur notes, this one can be taken too far and
 can really have an impact on your ISP if they are short on lines
 or something.  If you do this, and your ISP pointedly asks you
 to knock it off, then you should seriously consider shelling out
 the extra money for a dedicated modem on their side or something,
 which will often get you a dedicated IP anyways, thus making this
 HowTo moot :-) -- MCD]

In order to keep a dialup connection open it is sometimes necessary to
ensure that the link is not idle for long periods of time. Some ISP's
automatically disconnect a link if there's no traffic, and many modems
also have the ability to terminate an idle connection. While it is easy
to alter the local modem settings, it may be impossible to convince your
ISP to do the same (they may not like people using their resources for
24h/day).

The solution? Add the following line to the ip-up script:

ping <some_host> -i 180 &

where <some_host> can be your ISP's main DNS, terminal server etc.

To change the modems 'Disconnect Inactivity Timer' you have to check the
modems manual. For example on CirrusLogic chipset based modems it can be
ATS90=0


________
18.0 Hack #17: Using SSI's for dynamic IP publishing
	by Dale Jolliff <taftbbs@e-tex.com>


This isn't specifically for Linux, but for anything, and you don't have
to worry about changing anything.  It does require that your ISP allow
Server Side Includes in your home page.

Here's what's visible at 
<URL:http://www.e-tex.com/personal/taftbbs/onlinecheck.shtml>.
Check it out ... ;>

You have to know a couple of things about your ISP --
 The name (or IP#) of the router that you dial into
 The "gateway" and your own "userid"
  you can get this in Linux from the "ifconfig" command, it's the
  IP# there that isn't your machine.... for Windows lusers Trumpet
  Winsock has a "default gateway", and in Win95, it's in the TCP/IP
  setup area.

The critical part of this is that your ISP let you have your own "home 
page" -- almost required as a "give away" from small providers these 
days.  If they aren't sharp enough to limit SSI and CGI execution, even 
better.... mine allows SSI, but not CGI execution (however, if you can 
do SSI, you can do CGI's.... they just have to be called differently)

I'm cutting all the extraneous stuff out, and just leaving the critical
portions to make the thing work here....

Stick these lines in a SSI page (usually a file that ends in ".shtml"
for most servers):

david5.e-tex.com is the router I dial into when I connect to my ISP...
taftbbs is my userid on thier system...
this produces a simple one line out put on the page....

<pre>
<!--#exec cmd="finger @david5.e-tex.com | grep taftbbs"-->
</pre>


<a href="http://<!--#exec cmd="finger @david5.e-tex.com | grep taftbbs | 
cut -c '66-'"-->">Click here to see if you can see anything!</a>

The line above will produce a link that will display on the page....
Finger your router, and look at the output.  The "cut -c '66" part will be 
dependant upon the make of your router...I have accounts on a couple of 
providers, and they all seem to use different routers, and each one has
it's own 'format' when you finger them.

simple explanation of what happens here:

<a href="http://   <--open a standard HTML reference anchor...

<!--#exec cmd=" <-- This is a Server Side Include command.  This 
means this gets parsed and executed prior to being sent from the server 
to the client -- the client being your browser.  So, even if you look at the 
page "source" in your browser, you won't see this, only the output of the 
command about to be executed on the web server at your ISP.

finger @david5.e-tex.com | grep taftbbs | cut -c '66-' 

This is actually what gets executed.  We finger the router, grep for my 
userid, and cut everything out except the IP#, which on my ISP's router 
starts in column 66, and is on the end of the line.... may be radically 
different for other folks.

"--> 

make sure you close your SSI command properly, or it won't work...
DO be careful how you use single and double quotes in your 
commands... it's easy to get the thing all messed up, play with it a bit.


">Click here to see if you can see anything!</a>

and of course close the link anchor, and stick in your "clickable" text.

[end of hacks]


________
Appendix A: We need more hacks!

If you have a dynamic IP hack that you would like to contribute to this
HowTo, then let me know.  Be warned that if you do so that it will have
to be covered under the copyright notice in Section 1.7, for reasons of
CD publishing and whatnot.

If you {liked this HowTo, didn't like this HowTo, thought this HowTo was
too confusing, found something in this HowTo that doesn't work and/or is
just plain wrong, want to send me email, don't want to send me email,
found a security problem in this HowTo, etc} then please mail me at
<fenris@lightspeed.net>.  I mean it, I really would appreciate *any*
feedback on this HowTo, even if you just mailed me to say that you read
it!

Really!  Just e-mail me for anything!  I *really do* love getting e-mail!

Flames will *not* go to /dev/null.  I think if you feel that strongly
about it, I should listen.

If you write up a chapter for this HowTo not only will you be helping
the Linux community, but you will receive full credit for your hack,
your name will go into the credits at the end of this HowTo, you will be
acknowledged as a contributor in the beginning of this HowTo, your idea
will be archived with almost every CD Linux distribution in the world,
you'll be the envy of all of your peers, etc.


________
Appendix B: CREDITS

(in order of appearance)

Michael Driscoll <fenris@lightspeed.net> 
  is the HowTo maintainer and the author of a few of the hacks.
Christian G. Warden <cwarden@loop.com>
  helped debug the keepalive.sh script used in hack two, now the thing
  will work in (hopefully) all cases, including those when the connection
  goes down but pppd does not.
Justin Cragin <beyond@lightspeed.net>
  gave me the idea for hacks two and four, and then got mad when he
  found out I stole them.  I also stole the message that my answering
  machine uses from him, so I guess I owe him this one.  He also
  recently thought up a nice hack that has become hack ten, so he is now
  thrice credited.  And he has now helped think of the idea of hack
  twelve, so he is once again credited.  Furrfu.  Oh well, I guess I
  owe it to him to make him the new maintainer when I move away to
  CSM this summer and get my stable IP.
<shadow@indirect.com> 
  gave me copies of some real neat scripts of his, see 12.0 for details.
  I seem to have lost his name, hopefully he'll send it to me again :-)
Ajit Deshpande <adeshpan@ddt.eng.uc.edu> 
  wanted to be in the credits.
Divya Mahajan <vmahajan@giasdl01.vsnl.net.in>
  sent me the info on diald, which should probably end up replacing the
  crontab entry in hack two.
Ryan Klems <rklems@primenet.com>
  sent me a bunch of his own hacks, see 8.x for details.
Matthew Driver <mdriver@cfmeu.asn.au>
  gave me a pointer to his page on dynamic DNS entries.  Check out
  chapter 9.0 for the URL.
Matthew Nuckolls <mnuck@umr.edu>
  gave me hack nine, which updates a .plan containing your new IP address
  on a remote server via ftp.
Scott Johnston <sj@odin.iac.net>
  showed me a better way to set up hack two (took out long and confusing
  crontab entry and put it in script called by cron instead), and gave me
  various other pointers.
Brad Baker <bpb@mlb.cca.rockwell.com>
  wrote the really neat hack thirteen.
Christian Hardmeier <101502.1521@CompuServe.COM>
  got me motivated to write hack fourteen.
Justin (Gus) Hurwitz <hurwitz@dyndns.com>
  let me know about his new service providing dynamic DNS entries for
  hosts with dynamic IP.  Check out the pointer in chapter 9.0.
Tomas Jamate <tvj@miser.umass.edu>
  reminded me about ncftp 2.x.x and was even kind enough to send me his
  own script for inclusion in the HowTo (thanks Tomas!).  He goes to
  umass but unfortunately doesn't listen to the Pixies.  Oh well.
Jeremy D. Impson <jdimpson@camelot.syr.edu>
  wrote me the suggestion that turned into hack fifteen.
Steve Przepiora <gearhead@dreamscape.com>
  wrote hack one, and really got the ball rolling for me with the
  reorganization of this howto that made v2.0.0.
Whit Blauvelt <whit@transpect.com>
  gets many thanks for giving me lots of feedback on the HowTo, and
  especially for fixing hack one.
Paul C. Richard <pcricha@cs.concordia.ca>
  also gets thanks for his help fixing up hack one.
Per Sjoholm <Soile.Kaasila@sth.frontec.se>
  kept me up to date with the new location of the diald home page.
Bill Duncan <bduncan@beachnet.org>
  also notified me that the diald home page had moved.
Artur Skawina <skawina@usa.net>
  did a lot, such as hack sixteen, additional material for chapter nine,
  and the new section 12.2.1.
Scott Dier - DiEMaN <sdier@isd.net>
  also told me about ML.org's dyndns project.
Dale Jolliff <taftbbs@e-tex.com>
  sent in hack seventeen.
Bryan Rittmeyer <bryanr@flash.net>
  debugged hack two and mentioned ML.org's dyndns project.
Marek Kubita <kubitovi@mbox.lantanet.cz>
  fixed a gaping hole in hack thirteen.
--
Michael Driscoll <fenris@lightspeed.net>

[ 30 July 1997
  The Linux GUI Development mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  GUI Development mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

Gui Developement Tools for Linux
================================

Introduction (English)
----------------------
In  the  first  days, Linux was said to be a hacker envirement  in
both  sense. With the further developement its reputation changed.
Today Linux gets known as a developement plattform including the X
window  system and the several GNU utilities. Following  the  fact
that GNU C and C++ are pseudo standard serveral developement tools
has been built to support a quicker and easier X programming.
This  GUI-Developement-HOWTO should help the programmer,  beginner
or   experienced,  to  choose  the  tool,  which  fits  most   his
requirements.
I  take  no  responsibility for mistakes in prices or  copyrights.
Please read the including copyright license!
If  you know further Gui Developement Tools please send me a short
notice.

Yours Philip Markwalder
pgmarkwa@stud.ee.ethz.ch

PS:  All descriptions sent in german, I translate to english,  but
"Nobody's perfect!".

Einfuehrung (Deutsch)
---------------------
In den ersten Tagen, hatte Linux den Ruf einer Hackerumgebung. Mit
den  Monaten  der Entwicklung aenderte sich dieser  schlechte  Ruf.
Heute   wird   Linux  mit  dem  X  Window  System   zusammen   als
Entwicklungsystem   gepriesen,  auf  dem  viele  Entwicklungstools
erhaeltlich sind. Neben den zahlreichen GNU Utilities, die sich  in
den  letzten  Jahren, vor allem in der From  des  GNU  C  und  C++
Compilers,   zu  einer  Art  pseudo  Standard  entwickelt   haben,
entstanden mehr oder weniger bekannte Entwicklungsoberflaechen.
Das  GUI-Developement-HOWTO  soll dem  angehenden,  wie  auch  dem
erfahrenen   Programmierer   die  Auswahl   fuer   eine   geeignete
Entwicklungsoberflaeche erleichtern.
Ich  uebernehme  keine  Verantwortung fuer etwelche  Fehler  in  den
Punkten   Copyright  und  Preise.  Lies  die  oftmals  beiliegende
Copyright Lizenz!
Fuer  weitere Informationen ueber bestehende Eintraege oder auch ueber
neue Tools bin ich allen dankbar.


Mit freundlichen Gruessen Philip Markwalder
pgmarkwa@stud.ee.ethz.ch

PS:  Alle  deutschen Beschreibungen werden von mir  ins  Englische
uebersetzt, aber ... .

Copyright
---------
This dokument is covered by the only limitation not to sell this HOWTO, 
unless it's on a CD Rom distribution at a price less than $100.-.  
Otherwise please contact me, we talk about ...
 
Contents
--------    
1. Software
2. Books


1. Software
----------- 
Name:
Version:
Copyright:
Commercial:
Price:
System:
Where to find:
Description:
__________________________________________________________________
           
Name:      	Gina++
Version:    	?
Copyright: 	?
Commercial:	NO
Price:     	FREE
System:    	Linux
Where to find: 	ftp.gmd.de :/gmd/ginaplus
Description:   	?
__________________________________________________________________

Name:      	wxCLIPS
Version:   	?
Copyright:	?
Commercial:	NO
Price:     	FREE
System:    	To compile wxCLIPS you need:
           
           	- CLIPS or Fuzzy CLIPS 6.0 sources
           	- wxCLIPS sources
           	- wxWindows sources (/pub/packages/wxwin)
           	- UNIX or Windows compiler
           	- Motif, XView or Windows
Where to find: 	ftp.aiai.ed.ac.uk
Description:    wxCLIPS  is both a simple GUI front-end for  CLIPS
           	for Windows and X, and also a tool for writing GUIs  in
          	CLIPS using a set of new CLIPS functions.

           	You  can also use part of wxCLIPS as a library to  link
           	in  to  a  C++ application that uses the wxWindows  GUI
           	toolkit, giving an emebedded interpreted language  with
           	GUI-construction facilities.
__________________________________________________________________

Name:      	xtent
Version:   	3.2
Copyright: 	copyright by AT&T
Commercial:	NO
Price:     	FREE
System:    	XFree 2.1, kernel 1.*
Where to find: 	sunsite.unc.edu :/pub/Linux/devel/xtent3.2.tgz
Description:    xtent  is a simple function oriented language  for
           	creating X Toolkit (Xt) based applications.  The syntax
           	of the language is based on the X resource file syntax.
           	The  resulting  language  is a macro  interpreter  that
           	looks  like  C/C++  mixed  with  a  simple  lisp.   The
           	language may be used as a standalone interpreter or  as
           	an embedded language with C.
__________________________________________________________________

Name:      	InterViews
Version:   	3.1
Copyright:	?
Commercial:	NO
Price:     	FREE
System:    	Linux
Where to find: 	sunsite.unc.edu :pub/Linux/X11/devel/
Description:
__________________________________________________________________

Name:      	Fresco
Version:   	0.7
Copyright:	?
Commercial:	NO
Price:     	FREE
System:    	Linux
Where to find: 	ftp.faslab.com /pub/Fresco
Description:   	Nachfolger von Interviews
__________________________________________________________________

Name:      	xwpe
Version:   	1.4.2
Copyright: 	?
Commercial:	NO
Price:     	FREE
System:    	Linux
Where to find: 	mcsun.eu.net :/os/linux/mirrors/sunsite/sunsite.unc-
           	mirror/Incoming/elf
           	sunsite.unc.edu :/pub/Linux/Incoming
Description:
__________________________________________________________________

Name:      	D-Isam
Version:   	?
Copyright: 	?
Commercial:	YES
Price:     	895.- US$ (Free Demo availible)
System:    	Linux
Where to find: 	?
Description:   	?

__________________________________________________________________

Name:      	Motif
Version:   	2.0
Copyright: 	OSF(?)
Commercial:	YES
Price:     	99.- - 150.- US$
System:    	Linux
Where to find:
Description:   	Sicher die bekannteste C und C++ Library. OSF (Open
           	Software  Foudaction) wollte mit dieser  Library  einen
          	Standard  fuer  die  Software  Entwicklung  unter   Unix
          	setzten,  was ihr zu einem gewissen Grad auch  gelungen
           	ist.  Im  Paket  wird  neben  Library,  Beispielen  und
           	Handbuechern  (meistens in Postscript  Files)  auch  ein
           	neuer Oberflaechenmanager mitgeliefert.
__________________________________________________________________

Name:      	XAD
Version:   	?
Copyright: 	?
Commercial:	YES
Price:     	160.- US$ (Lite)
           	650.-
System:    	Linux
           	BSD/386
           	SCO ODT 3.0
	
           	System requirements:
           	X11R5
           	Motif 1.2
           	SVGA 256 colors
           	10 MB hard disk
           	8MB+ Ram.
	
Where to find:
Description:    Xad  is a new and full featured Motif Applications
           	development tool producing portable Motif applications.
           	For  more  complete information on this major  package,
           	please contact us.
__________________________________________________________________

Name:      	wxWindows
Version:   	1.66
Copyright: 	J.Smart@ed.ac.uk (Julian Smart, AIAI)
Commercial:	NO
Price:     	FREE
System:    	Linux
Where to find:  skye.aiai.ed.ac.uk /pub/wxwin/1.60  (192.41.104.6)
                                2.8 MB wx160.tgz
                                171 Kb patch166.zip
                                788 Kb hlpdocs.zip
                Alternate-site: sunsite.unc.edu /pub/Linux/X11/devel
                                2.8 MB wx160.tgz
                                3.4 Kb wx160.make.env
Description:    wxWindows  is  a  toolkit  for  developing  multi-
          	platform, graphical applications from the same body  of
           	C++  code.  Whole  source  is included.  Help  docs  is
           	separate. Compiles under normal Linux environment  with
           	slight   modifications  to  make.env   and   the   file
           	$(WXWINDIR)/src/base/wbps.cc

Note:      	Mailing  list:wxwin-users@aiai.ed.ac.uk  (wxwin   users
           	mailing list)
__________________________________________________________________

Name:      	VXP
Version:   	?
Copyright: 	?
Commercial:	NO
Price:     	FREE
System:    	Linux
Where to find: 	ftphost.waikato.ac.nz :/pub/vxp
           	ftp.cc.gatech.edu :/ac86/linux/devel/c
           	sunsite.unc.edu :/pub/Linux/devel/c
Description:    Dieses  auf  der der Motif Library aufbauende,  in
           	meinen  Augen sehr professionelle Entwicklungstool  ist
           	frei  verfuegbar, muss aber vom Ursprungsserver  mittels
           	FTP   heruntergeladen  werden,  da  keine  kommerzielle
           	Verteilung    per   License   erlaubt    ist.    Dieses
           	Entwicklungstool gibt C Code heraus.
           	This tool is based on the Motif Libaray and generates C
           	Code. It's source code isn't availible at the time.
__________________________________________________________________

Name:      	ET++/MET++
Version:   	3.0 alpha et++,
Copyright: 	?
Commercial:	NO
Price:     	FREE
System:    	Linux
Where to find: 	claude.ifi.unizh.ch :/pub/projects/met++
               	ftp.imag.fr :/archive/langages/C++/ET++
Description:    
__________________________________________________________________
   
Name:      	Xforms / Forms Library
Version:   	0.61
Copywright:     Copyright (c) 1995 by T.C. Zhao and Mark  Overmars
           	ALL RIGHTS RESERVED.
           	Permission  to use, copy, and distribute this  software
           	in its entirety for  non-commercial purposes and without fee, 
		is hereby granted, provide that  the  above  copyright notice 
		and this  permission notice appear in all copies and their 
		documentation.
           	This software is provided "as is" without expressed  or
           	implied warranty of any kind.
           	You  may not "bundle" and distribute this software with
           	systems and/or other  distribution media without prior 
		consent of  the authors.

Commercial:	No,   but  a  license  is  required  if  you   use   it
           	commercially
Price:     	FREE
System:   	Linux
Where to find: 	ftp.cs.ruu.nl :/pub/XFORMS
               	bloch.phys.uwn.edu

Description:    GUI  toolkit library and interface builder  for  X
          	windows, needs only
          	xlib to work, includes 3d objects similar to Motif.
           	It should work under X11 R4, R5 & R6.
           	Xforms is comprised of a C library and GUI builder.
           	It  is  extensible, scrolling canvas object still needs
           	to be implemented.
           	Distributions available for:
           	Linux (X11R5 and X11R6)
           	SunOS and Solaris
           	SGI (Irix 4.x, 5.2 and 6.0)
           	Dec-Alpha/OSF1
           	HP-UX
           	IBM-RS6000/AIX
           	FreeBSD
           	DecStation/Ultrix
           	Cray Unicos (C90 & YMP)
           	Convex (C2 & C3)
           	NetBSD/i386 1.0
	
           	Xforms is comprised of a C library and GUI builder.
           	It  is  extensible, scrolling canvas object still needs
           	to be implemented.
__________________________________________________________________
     
Name:      	MetaCard
Version:   	1.4
Copywright:	1994 MetaCard Corporation
Commercial:	yes
Price:     	$195 on Linux, $495 for all others
Where to find:  ftp.metacard.com:/MetaCard,
                http://www.metacard.com/
Description:    MetaCard   is   a  hypermedia/Rapid   Application
           	Development environment for X11/Unix  workstations that is 
		similar to  Apple/Claris Corp.'s HyperCard. It  goes  beyond
		HyperCard  by  including support for color controls and images,
  		pulldown  and  popup   menus, scrollbars and dialog boxes. 
		MetaCard's  entire  interface is built in MetaCard, so end users
 		can  edit any menu or dialog to make it look and behave
           	any way they want.

           	MetaCard's powerful, customizable editor and  a  simple
           	scripting language   make  it  the  easiest  way  to  build   
		GUI applications, Computer Based Training (CBT)  packages, 
		multimedia presentations, and hypermedia  documents.  Stacks 
		developed with  MetaCard are can be run on  any supported 
		platform (14 for release 1.4) and can be distributed with  
		the  MetaCard  engine without licensing  fees  or royalties.

           	Key features:
               		Easy to learn object-oriented scripting language
               		Easy to use direct-manipulation interface
               		Motif   interface  allows  users  to  build   Motif
               		compliant applications.
               		Full  24  bit  color support for image editing  and
               		controls Object oriented (vector) graphics support is  
			built in Text  fields  support searching, sorting,  
			multiple font  sizes and colors, hypertext links,  and  
			cut-copy-paste Run  any  Unix  program from  within  
			MetaCard  and collect its output for display.
               		Call  'C' functions via an external procedure  call
               		mechanism.
	                Import HyperCard 1.2 through 2.2 stacks
        	        Built-in audio and video playback capability
__________________________________________________________________
        
Name:      	winterp
Version:   	1.0
Copyright: 	Permission to use, copy, modify, distribute,  and  sell
           	provided
Commercial:	NO
Price:     	FREE
System:    	Linux, X11R5, Motif >= 1.1.*
Where to find: 	sunsite.unc.edu : /pub/Linux/X11/devel/
               	nic.funet.fi   :/pub/OS/Linux
Description:    An  object-oriented rapid prototyping, development
           	and delivery environment for building applications with
           	Motif/Xtango
__________________________________________________________________

Name:      	CooL SPE
Version: 	2.1
Commercial: 	NO
Price:     	FREE
System:    	Linux, Solaris, Sinix. Requires Motif
Copyright:  	GPL
Where to find:
Description:    An  OO  4GL  environment for writing Client/Server
           	Motif apps
__________________________________________________________________


Name :     	SmallTalk/X
Commercial:	YES (look at the Copyright)
Price:     	NO (Linux)
System     	Linux
Copyright: 	The   program  may  not  be  used  for  any  commercial
           	purposes;  neither the program in whole or  parts,  nor
           	applications,  programs or functions  created  with  or
           	derived  from this program may be sold or otherwise  be
           	made available to any third party or person for profit.
           	You  may  not use this program or parts or applications
           	created with this program for in-house production,   or
           	other    work,   which   is   related   to   any    non
           	educationalactivity.
           	
           	You may copy and redistribute this package, or make  it
           	otherwise   available  to  other   educational   users,
           	provided   that   each   copy   represents   an   exact
           	reproduction of the original and includes any copyright
           	notice  and  license  information,  appearing  on   the
           	original.
           	You  may  NOT charge or otherwise ask for any donations
           	for this distribution, except for the cost of the media
           	itself.
           	The  program and all copies of the program (but not the
           	media  on  which the copies are encoded) shall  be  and
           	remain the property of the licensor.
           
Description:
__________________________________________________________________

Name :     	ObjectProDSP
Version:   	0.1
Copyright: 	GPL
System:    	Linux
Price:     	FREE
Commercial:	NO
Where to find: 	tsx-11.mit.edu
           	1.57     MB    /pub/linux/binaries/usr.bin.X11/opd-0.1-
           	src.tar.gz
           	2.25     MB     /pub/linux/sources/usr.bin.X11/opd-0.1-
           	binary.tar.gz
           	1.08     MB    /pub/linux/docs/opd-0.1-doc.tar     (All
           	doumentation and LSM file)
           	5.8  KB   /pub/linux/docs/opd-0.1-announce.gz  (Package
           	description)
           	SunSITE.unc.edu /pub/Linux/devel/opd-0.1
           	1.57 MB opd-0.1-src.tar.gz (Source code)
           	2.25 MB opd-0.1-bin.tar.gz (Linux binaries)
           	527  KB ovrfront.ps.gz (Overview and tutorial,  16  MB
           	uncompressed)
           	53 KB ovrapp.ps.gz (Overview appendixes)
Description:    X-windows, object oriented tool for Digital Signal
           	Processing   design  development  and   implementation;
           	generic  framework for building interactive  scientific
           	and engineering applications
__________________________________________________________________
           
Name:      	Motifiation
Version:   	1.2b (Version 2.0 in work)
Copyright: 	???
Commercial:	YES
Price:     	DM 7700 .-  per machine
           	DM 2990.-  for non commercial users
System:    	Linux
Where to find:  http://www.uni-paderborn.de/fachbereich/AG/szwillus/motifation
		/index.html
Description:    Motifation      ist      ein      interaktives
           	Entwicklungswerkzeug fr den C-Programmierer, der unter
           	OSF/Motif   seine   graphische  Benutzungsschnittstelle
           	entwerfen und Kontrolle }ber den kompletten C-Quellcode
           	haben   will.  Der  Entwurf  vollzieht  sich  in  einem
           	hochgradig  interaktiven Arbeitsproze, an dessen  Ende
           	die  automatische  Generierung aller Quellcodes  steht.
           	Neben dem C-Quellcode wird auf Wunsch ein Makefile, ein
           	Imakefile  und  eine  Klassendatei generiert.  Aus  dem
           	generierten Quellen kann somit unmittelbar ein fertiges
           	Programm erzeugt werden.
           	Motifiation is an interaktive Developement Toll  for  C
           	programmers who develops his GUI with OSF/Motif and who
           	likes  to  control  the  complette  source  code.   The
           	developing takes place in a highly interaktive  process
           	which  ends  in the generating of source code.  If  you
           	wish  you're able have built the makefile and imakefile
           	and  a  class  file. So you can straight  compile  your
           	program.


Books
=======


Software Portability with imake

By Paul DuBois
1st Edition July 1993
390 pages, ISBN: 1-56592-055-4

imake  is  a  utility that works with make to enable  code  to  be
compiled  and  installed on different UNIX machines.  imake  makes
possible the wide portability of the X Window System code  and  is
widely considered an X tool, but it's also useful for any software
project that needs to be ported to many UNIX systems.

This  Nutshell Handbook(R)--the only book available  on  imake  is
ideal  for  X and UNIX programmers who want their software  to  be
portable. The book is divided into two sections. The first section
is  a general explanation of imake, X configuration files, and how
to  write and debug an Imakefile. The second section describes how
to  write  configuration files, and presents a configuration  file
architecture  that  allows  development  of  coexisting  sets   of
configuration  files. Several sample sets of  configuration  files
are described and are available free over the Net.

Programmer's Supplement for R5 of the X Window System

By David Flanagan
1st Edition November 1991
390 pages, ISBN: 0-937175-86-2

This  book is for programmers who are familiar with Release  4  of
the  X  Window System and want to know how to use the new features
of Release 5. It is intended as an update for owners of Volumes 1,
2, 4, and 5 of the O'Reilly and Associates X Window System Series,
and  provides complete tutorial and reference information  on  all
new Xlib and Xt toolkit functions.

Together  with  Volume 2 and Volume 5, owners of the  Programmer's
Supplement  for  Release 5 have a complete set of reference  pages
for the current X Consortium standards for Xlib and Xt.

The X Window System in a Nutshell

Edited by Ellie Cutler, Daniel Gilly & Tim O'Reilly
2nd Edition April 1992
424 pages, ISBN: 1-56592-017-1

Indispensable  companion  to  the X  Window  System  Series.  Once
programmers have mastered the concepts behind X and learned how to
program  in  Xlib  and  Xt there is still a  mass  of  details  to
remember.  The  X  Window  System in a Nutshell  fills  this  gap.
Experienced  X  programmers  can use  this  single-volume  desktop
companion  for  most common questions, keeping the full  X  Window
System  series of manuals for detailed reference. X in a  Nutshell
contains  essential  information in a boiled-down  quick-reference
format that makes it easy to find the answers needed most often.

This book has been updated to cover R5 but is still useful for R4.
The   descriptions  of  the  functions  have  been  expanded   and
clarified,  with  improved cross-referencing to important  related
functions.  Includes material on Xcms and the internationalization
features of R5.


Volume 0: X Protocol Reference Manual

Edited by Adrian Nye
3rd Edition February 1992
516 pages, ISBN: 1-56592-008-2

This manual describes the X Network Protocol, which underlies  all
software  for  Version 11 of the X Window System. It provides  not
only  a  practical demonstration of what is involved in  a  client
session,  but  also an extensive set of reference pages  for  each
protocol  request and event which include the encoding of requests
and  replies.  The  X Protocol Reference Manual includes  protocol
clarifications  of  X11  Release 5, as well  as  the  most  recent
version of the ICCCM and the Logical Font Conventions Manual.  For
use with any release of X.


Volume 1: Xlib Programming Manual

By Adrian Nye
3rd Edition July 1992
824 pages, ISBN: 1-56592-002-3

Updated to cover X11 Release 5, the Xlib Programming Manual  is  a
complete  programming guide to the X library  (Xlib),  the  lowest
level of programming interface to X. In addition to explaining how
to  handle  the  concepts  involved in Xlib  programming--such  as
events,  graphics,  and  window  management--this  guide  presents
examples of both simple and complete client applications. Includes
introductions  to internationalization, device-independent  color,
font service, and scalable fonts.

This manual is a companion to Volume 2, Xlib Reference Manual.


Volume 2: Xlib Reference Manual

By Adrian Nye
3rd Edition June 1992
1138 pages, ISBN: 1-56592-006-6

Volume  2,  Xlib  Reference  Manual, is  a  complete  programmer's
reference for Xlib, updated for X11 Release 4 and Release 5.

Contents Include:
- Reference pages for Xlib functions.
- Reference pages for event types.
- Permuted index to Xlib functions.
- Description  of  macros  and reference pages for their  function
           versions.
- Listing of the server-side color database.
- Alphabetical index and description of structures.
- Alphabetical index and description of defined symbols.
- KeySyms and their meaning.
- Illustration of the standard cursor font.
- Function group index to the right routine for a particular task.
- Reference  pages  for  Xlib-related Xmu functions (miscellaneous
           utilities).
- 4 single-page reference aids for the GC and window attributes.
- Index.

New features in the third edition include:
- Over 100 new  manpages covering Xcms, internationalization,  and
           the function versions of macros.
- Updating to the R5 spec.
- New "Returns" sections on all the functions which return values,
           making this information easier to find.


Volume 3: X Window System User's Guide
Standard Edition

By Valerie Quercia & Tim O'Reilly
4th Edition May 1993
836 pages, ISBN: 1-56592-014-7

The  X  Window System User's Guide orients the new user to  window
system  concepts and provides detailed tutorials for  many  client
programs,  including  the  xterm  terminal  emulator  and   window
managers. Building on this basic knowledge, later chapters explain
how   to   customize   the  X  environment  and   provide   sample
configurations.

This popular manual is available in two editions, one for users of
the MIT software, and one for users of Motif. The Standard Edition
manager  uses  the twm manager in most examples and illustrations.
Revised for X11 Release 5.

Volume 3M: X Window System User's Guide
Motif Edition

By Valerie Quercia & Tim O'Reilly
2nd Edition January 1993
956 pages, ISBN: 1-56592-015-5

The  X  Window System User's Guide, Motif Edition orients the  new
user to window system concepts and provides detailed tutorials for
many  client  programs, including the xterm terminal emulator  and
the  window  manager.  Building on  this  basic  knowledge,  later
chapters  explain how to customize the X environment  and  provide
sample  configurations. This alternative  edition  of  the  User's
Guide  highlights the Motif window manager, for users of the Motif
graphical user interface. Revised for Motif 1.2 and X11 Release 5.

Volume 4: X Toolkit Intrinsics Programming Manual
Standard Edition

By Adrian Nye & Tim O'Reilly
3rd Edition April 1993
567 pages, ISBN: 1-56592-003-1

A complete guide to programming with the X Toolkit Intrinsics, the
library of C language routines that facilitate the design of  user
interfaces,  with  reusable components called widgets.  This  book
provides concepts and examples that show how to use the various  X
Toolkit  routines.  The first few chapters are  devoted  to  using
widgets; the remainder of the book covers the more complex task of
writing new widgets.

Volume  4  is  available  in two editions. The  Standard  Edition,
updated  for  R5, uses Athena widgets to demonstrate  how  to  use
existing  widgets,  but  still provides  a  good  introduction  to
programming with any widget set based on Xt.


Volume 4M: X Toolkit Intrinsics Programming Manual
Motif Edition

By Adrian Nye & Tim O'Reilly
2nd Edition August 1992
674 pages, ISBN: 1-56592-013-9

A complete guide to programming with the X Toolkit Intrinsics, the
library of C language routines that facilitate the design of  user
interfaces,  with  reusable components called widgets.  This  book
provides concepts and examples that show how to use the various  X
Toolkit  routines.  The first few chapters are  devoted  to  using
widgets; the remainder of the book covers the more complex task of
writing new widgets.

Volume 4 is available in two editions. The Motif Edition uses  the
Motif  1.2  widget set in examples, and has been updated  for  X11
Release 5.


Volume 5: X Toolkit Intrinsics Reference Manual

Edited by David Flanagan
3rd Edition April 1992
916 pages, ISBN: 1-56592-007-4

The   X   Toolkit  Intrinsics  Reference  Manual  is  a   complete
programmer's reference for the X Toolkit. This volume is based  on
Xt  documentation  from the X Consortium and has  been  re-edited,
reorganized, and expanded for X11 Release 5. It provides reference
pages  for each of the Xt functions, as well as the widget classes
defined by Xt and the Athena widgets, and many useful appendices.

This manual  is  a companion to Volume 4, the X Toolkit Intrinsics
           Programming Manual.

Volume 6A: Motif Programming Manual

By Dan Heller & Paula Ferguson
2nd Edition February 1994
1016 pages, ISBN: 1-56592-016-3

The  Motif  Programming Manual is a source for complete, accurate,
and insightful guidance on Motif application programming. There is
no  other book that covers the ground as thoroughly or as well  as
this one.

The  Motif  Programming Manual describes how to write applications
using  the Motif toolkit from the Open Software Foundation  (OSF).
The book goes into detail on every Motif widget class, with useful
examples  that  will help programmers to develop their  own  code.
Anyone  doing Motif programming who doesn't want to have to figure
it out on their own needs this book.

In  addition  to information on Motif, the book is  full  of  tips
about programming in general, and about user interface design.  It
includes  a  tutorial on UIL; coverage of drag-and-drop,  tear-off
menus,  and  internationalization  as  implemented  in  the  Motif
widgets such as Text and TextField; plus the entire book has  been
checked  for accuracy with Motif 1.2 (while remaining usable  with
Motif 1.1). Complements Volume 6B, Motif Reference Manual.


Volume 6B: Motif Reference Manual

By Paula Ferguson & David Brennan
1st Edition June 1993
920 pages, ISBN: 1-56592-038-4

The  Motif  Reference Manual is a complete programmer's  reference
for  the  Motif  toolkit from the Open Software Foundation  (OSF).
Motif  has become the standard user interface for X Window  System
applications, and the Motif toolkit makes it easy for  programmers
to build applications that conform with the Motif "look and feel."

This  book  provides reference pages for the Motif  functions  and
macros,  the  Motif and Xt widget classes, the Mrm functions,  the
Motif clients, and the UIL file format, data types, and functions.
The  reference  material has been expanded from the appendices  of
the  first edition of Volume 6 and covers Motif 1.2. This book  is
designed  to  be  used  with Volume 6A, Motif Programming  Manual,
which  describes how to build applications using the Motif toolkit
and provides a complete tutorial with programming examples.


Volume 7A: XView Programming Manual

By Dan Heller
Updated by Thomas Van Raalte
3rd Edition September 1991 (latest update August 1993)
770 pages, ISBN: 0-937175-87-0

The  XView  Programming Manual has been revised and  expanded  for
Version  3  of XView, the poor-man's object-oriented  toolkit  for
building  OPEN  LOOK  applications  for  X.  Describing  both  the
concepts  and  the  technical approaches behind XView,  the  XView
Programming  Manual is perfect for the beginner  breaking  into  X
programming.

The  Attribute  Summary from the previous  edition  of  the  XView
Programming  Manual has been expanded and is now  published  as  a
companion   volume,  the  XView  Reference  Manual.  It   contains
alphabetical listings of XView attributes, functions, and  macros,
as  well  as  other  reference  information  essential  for  XView
programmers.


Volume 7B: XView Reference Manual

Edited by Thomas Van Raalte
1st Edition September 1991 (latest update August 1993)
311 pages, ISBN: 0-937175-88-9

The  XView  Reference Manual has been expanded from the  Attribute
Summary  of  the previous edition of the XView Programming  Manual
and  is  now  published as a companion volume. The  XView  toolkit
provides  extensive attribute-value pair combinations, convenience
routines  and object class hierarchies that are too voluminous  to
memorize without the aid of this comprehensive reference guide. It
contains alphabetical listings of XView attributes, functions, and
macros, as well as other reference information essential for XView
programmers.  A  must-have  companion for  the  XView  Programming
Manual.


Volume 8: X Window System Administrator's Guide

By Linda Mui & Eric Pearce
1st Edition October 1992
CD-ROM Released May 1993

Without CD-ROM:
372 pages, ISBN: 0-937175-83-8

With CD-ROM:
388 pages, ISBN: 1-56592-052-X

As  X  moves out of the hacker's domain and into the "real world,"
users  can't be expected to master all the ins and outs of setting
up  and administering their own X software. That will increasingly
become  the  domain of system administrators. Even for experienced
system administrators X raises many issues, both because of subtle
changes  in  the standard UNIX way of doing things and  because  X
blurs  the boundaries between different platforms. Under X,  users
can run applications across the network, on systems with different
resources  (including  fonts, colors, and screen  size.)  Many  of
these issues are poorly understood, and the technology for dealing
with them is in rapid flux.

This  book  is  the first and only book devoted to the  issues  of
system administration for X and X-based networks, written not just
for  UNIX system administrators but for anyone faced with the  job
of  administering  X  (including those running  X  on  stand-alone
workstations).  The  X  Window  System  Administrator's  Guide  is
available either alone or packaged with the XCD. The CD provides X
source code and binaries to complement the book's instructions for
installing  the  software. It contains over 600 megabytes  of  X11
source  code and binaries stored in ISO9660 and RockRidge formats.
This will allow several types of UNIX workstations to mount the CD-
ROM  as  a filesystem, browse through the source code and  install
pre-built software.

PEXlib Programming Manual

By Tom Gaskins
1st Edition December 1992
1154 pages, ISBN: 1-56592-028-7

The PEXlib Programming Manual is the definitive programmer's guide
to PEXlib, covering both PEX versions 5.0 and 5.1. Containing over
200  illustrations and 19 color plates, it combines a thorough and
gentle  tutorial approach with valuable reference features.  Along
the   way,  it  presents  the  reader  with  numerous  programming
examples, as well as a library of helpful utility routines--all of
which  are  available online. You do not need any  prior  graphics
programming experience to read this manual.

Written  by Tom Gaskins--the widely recognized authority who  also
authored  the  O'Reilly and Associates PHIGS Programming  Manual--
thisbook  is  the only programming guide to PEXlib you  will  ever
need.


PEXlib Reference Manual

Edited by Steve Talbott
1st Edition December 1992
577 pages, ISBN: 1-56592-029-5

The   PEXlib  Reference  Manual  is  the  definitive  programmer's
reference  resource for PEXlib, containing complete  and  succinct
reference  pages for all the callable routines in  PEXlib  version
5.1.  The  content  of  the PEXlib Reference Manual  stands,  with
relatively few changes, as it was created by the X Consortium.

The  PEXlib Reference Manual is a companion volume to the O'Reilly
and Associates PEXlib Programming Manual, written by Tom Gaskins.


PHIGS Programming Manual

By Tom Gaskins
1st Edition February 1992

Softcover:
968 pages, ISBN: 0-937175-85-4

Hardcover:
968 pages, ISBN: 0-937175-92-7

A  complete  and  authoritative guide  to  PHIGS  and  PHIGS  PLUS
programming, this book documents the PHIGS and PHIGS PLUS graphics
standards  and provides full guidance regarding the use  of  PHIGS
within the X environment. The discussions of PHIGS and PHIGS  PLUS
are  fully  integrated in this text, which takes as  its  starting
point  the  PEX  Sample Implementation (or PEX-SI)---the  publicly
available  and  most widely established base for commercial  PHIGS
products.  In addition, the PHIGS Programming Manual explains,  at
both  elementary and advanced levels, how to integrate your  PHIGS
applications  with  standard  X  (Xlib)  functions.  Besides  Xlib
itself, there are detailed examples and explanations based on  the
Motif, OLIT, and XView toolkits.

Whether you are starting out in 3D graphics programming or  are  a
seasoned  veteran looking for an authoritative  work  on  a  fast-
rising  3D  graphics standard, this book will serve your  purposes
well.

PHIGS Reference Manual

Edited by Linda Kosko
1st Edition October 1992
1116 pages, ISBN: 0-937175-91-9

The  PHIGS  Reference  Manual  is the  definitive  and  exhaustive
reference   documentation  for  the  PHIGS  graphical  programming
language.  It  contains  complete  reference  pages  for  all  the
language  functions,  along with additional  reference  materials.
Both  PHIGS and PHIGS PLUS are included, and the documentation  is
faithful to the internationl standards. Therefore, this book  also
serves as documentation for the many commercial products based  on
the standards.

Together with the PHIGS Programming Manual, this book is the  most
complete and accessible documentation currently available for  the
PHIGS and PHIGS PLUS standards.


The X Resource: Issue 0

Edited by Adrian Nye
Fall 1991
253 pages, ISBN: 0-937175-79-X

A  quarterly  working  journal  for X  programmers  that  provides
practical,  timely  information. The X Resource includes  in-depth
articles  and documentation not available elsewhere. The  articles
for Issue 0 include:

- Default Colormap Manipulation, by Bruce Cameron, Dr. R.A.  Robb,
           and J.J. Camp.
- Prescient  Agents:  A Radar O'Reilley for your Desktop, by Scott
           McGregor.
- Engineering Insights from an Interactive Imaging Application, by
           Antony A. Courtney.
- AND: C++ with  Motif, xterm Tips and Tricks, Xcms, UIMS Systems,
           Internationalization, editres, and more.


The X Resource: Issue 1
Proceedings of the 6th Annual X Technical Conference

Edited by Adrian Nye
Winter 1992
240 pages, ISBN: 0-937175-96-X

A  quarterly  working  journal  for X  programmers  that  provides
practical,  timely  information. Issue 1,  January  1992,  is  the
Annual Proceedings of the X Technical Conference at MIT.

The X Conference  proceedings are published exclusively in  The  X
           Resource.


The X Resource: Issue 2

Edited by Adrian Nye
Spring 1993
190 pages, ISBN: 0-937175-97-8

The X Resource  includes  in-depth articles and documentation  not
           available elsewhere. Articles for Issue 2 include:

- NASA's TAE   PLUS:   a  GUI  Development  Tool  and  Application
           Environment, by Marti Szczur.
- Designing for Usability, by Scott McGregor.
- Designing  Reusable  Widget Classes with C++ and  OSF/Motif,  by
           Andreas Baecker.
- Visualizing X, by David Lemke and David Rosenthal.

Documentation on the Widget Creation Library is also included.


The X Resource: Issue 3

Edited by Adrian Nye
Summer 1992
220 pages, ISBN: 0-937175-98-6

A quarterly  working  journal  for  X  programmers  that  provides
           practical,
timely information. The X Resource includes in-depth articles and
documentation  not  available elsewhere. The articles in  Issue  3
           include:

- Multi-user Application Software Using Xt, by Oliver Jones.
- Using the  New  Font  Capabilities  of  HP-donated  Font  Server
           Enhancements, by Axel Deininger and Nathan Meyers.
- Improving  X  Application Performance, by Chris D. Peterson  and
           Sharon E. Chang.
- The Nonrectangular Window Shape Extension, by Paula M. Ferguson.
- AND: GUI testing,  server  instrumentation  and  tracing,   font
           server administration, a RichText widget, and more.


The X Resource: Issue 4

Edited by Adrian Nye
Fall 1992
276 pages, ISBN: 0-937175-99-4

A  quarterly  working  journal  for X  programmers  that  provides
practical,  timely  information. The X Resource includes  in-depth
articles  and documentation not available elsewhere. The  articles
for Issue 4 include:

- From The X  Consortium:  The  MIT X Software Distribution  After
           Release 5, by Stephen Gildea, MIT X Consortium.
- RPC Programming in X Applications, by John Bloomer.
- The xgen Application, by Kurt Buehler.
- The Hdial Widget.
- The Cmap Widget.


The X Resource: Issue 5
Proceedings of the 7th Annual X Technical Conference

Edited by Adrian Nye
Winter 1993
272 pages, ISBN: 1-56592-020-1

A  quarterly  working  journal  for X  programmers  that  provides
practical,  timely  information. The X Resource includes  in-depth
articles  and documentation not available elsewhere. The  articles
for  Issue  5,  taken from the 7th Annual X Technical  Conference,
include:
- "Multi-threaded Xlib" by Stephen Gildea
- "Supporting  Mobile, Pen-based Computing with X" by James  Kempf
           and Alan Wilson
- "Making the   X   Window   System  Accessible  to  People   With
           Disabilities" by Will D. Walker and Mark E. Novak.

The X Resource: Issue 6

Edited by Adrian Nye
Spring 1993
234 pages, ISBN: 1-56592-021-X

A  quarterly  working  journal  for X  programmers  that  provides
practical,  timely  information. The X Resource includes  in-depth
articles  and documentation not available elsewhere. The  articles
for Issue 6 include:
- "Writing Motif   Widgets:  A  Pragmatic  Approach"  by  Alastair
           Gourlay
- "Interprocess Communication in Xt Programs" by David Shaffer
- "Resolving Xt Resource Collisions" by Al Tabayoyon.


The X Resource: Issue 7

Edited by Adrian Nye
Summer 1993
150 pages, ISBN: 1-56592-022-8

A  quarterly  working  journal  for X  programmers  that  provides
practical,  timely  information. The X Resource includes  in-depth
articles  and documentation not available elsewhere. The  articles
for Issue 7 include:
- "A Tale of  Two Toolkits: Xt vs. InterViews" by Imran Bashir and
           David Sternlicht
- "Managing X in a Large Distributed Environment" by George Ross
- "Buddy, Can You Spare an RPC" by Robert Scheifler
- "X Application Debugging" by Adrian Nye.


The X Resource: Issue 8

Edited by Adrian Nye
Fall 1993
176 pages, ISBN: 1-56592-023-6

A  quarterly  working  journal  for X  programmers  that  provides
practical,  timely  information. The X Resource includes  in-depth
articles  and documentation not available elsewhere. The  articles
for Issue 8 include:
- "Xm++: Another Way to Program the X Toolkit" by Bernhard Strassl
- "Current Efforts in Client/Server Audio" by George Neville-Neil
- "xtent 3.0:  Improvements on Programming with Resources" by Doug
           Blewett and Meg Kilduff
- "The Multi-Buffering Extension: A Tutorial and Reference" by Tom
           Gaskins.


The X Resource: Issue 9
Proceedings of the 8th Annual X Technical Conference

Edited by Adrian Nye
Winter 1994
256 pages, ISBN: 1-56592-066-X

A quarterly  working  journal  for  X  programmers  that  provides
           practical,
timely information. The X Resource includes in-depth articles
and documentation not available elsewhere. Articles for Issue 9,
taken from the 8th Annual X Technical Conference, include:

- "Zero-Defect  Widgets:  A  Formal Approach to  Testing  Xt-based
           Toolkits"
- "Traitifying Motif"
- "Extending Xt to Support CORBA-based Embedding"
- "Xvan: A True Multiple Screen X Server"
- "Design and Implementation of LBX: An Experiment Based Standard"
- "Overview of the X Keyboard Extension"
- "Inter-Client Communication in X11R6 and Beyond"
- "XSMP: The New Session Management Protocol"
- "X11 in Virtual Environments: Combining Computer Interaction"
- "New X Font Technology for X11R6"
- "Extending X for Recording"
- "Kerberos Authentication of X Connections"


The X Resource: Issue 10

Edited by Adrian Nye
Spring 1994
212 pages, ISBN: 1-56592-067-8

A  quarterly  working  journal  for X  programmers  that  provides
practical,  timely  information. The X Resource includes  in-depth
articles  and documentation not available elsewhere. Articles  for
Issue 10 include:
- "What's New in R6"
- "The One Minute Manager: Custom Motif Layout Widgets Made Easy"
- "The Motif  2.0  Uniform  Transfer  Model:  Unifying  Selection,
           Clipboard, and Drag and Drop"
- "Implementing Cut and Paste in the X Environment"

Plus: The CDE Printing Server, Automatic Motif Popup Menus, TkMan,
           the xmove pseudoserver, and more....


The X Resource: Special Issue D

Edited by Adrian Nye
Winter 1994
370 pages, ISBN: 1-56592-071-6

A  quarterly  working  journal  for X  programmers  that  provides
practical,  timely  information. The X Resource includes  in-depth
articles and documentation not available elsewhere. Special  Issue
D consists of 8 proposed X Consortium standards for public review.
The articles are:
- "X Toolkit Intrinsics (Xt)"
- "Inter-Client Exchange (ICE) Protocol and Library"
- "X Session Management Protocol (XSMP) and Library"
- "Inter-Client Communication Conventions Manual (ICCCM)"
- "X Logical Font Description Conventions (XLFD)"
- "Input Method (IM) Protocol"
- "X Synchronization Extension"
- "Thai and Korean Keysyms"

Motif Tools: Streamlined GUI Design and Programming with the Xmt
Library
By David Flanagan
1024 pages, ISBN: 1-56592-044-9,

New from O'Reilly,  Motif  Tools  and the Xmt programming  library
           that
accompanies it on CD-ROM offer resources to help Motif programmers
dramatically  speed  up application development with the X Toolkit
           and
Motif.

Here's what author David Flanagan has to say about why he was
inspired to write the book and the Xmt library:
"The  need for a convenience toolkit is something that not  enough
programmers and managers realize--Motif is too often viewed  as  a
complete  GUI  development package, when in fact it  was  designed
only  to  provide a standard base level of functionality. This  is
where  the  Xmt library comes in; it provides many of the  widgets
and  functions  that  are  implemented  over  and  over  again  by
developers.  My  aim  was  to  put  programmer  ease-of-use  first
(something the designers of Motif obviously did not do) and create
a library that really simplifies GUI development."

The  Xmt  library  contains  eight custom  widgets  and  over  260
convenien  ceroutines  that  handle many  tricky  aspects  of  GUI
programming. The Layout widget, for example, is a flexible manager
widget  that makes the confusing and awkward Motif Form  widget  a
thing  of the past. And a single Menu widget will create an entire
pulldown menu system for an application by reading a special  menu
description from a resource file or from C code. Other features of
the  library  simplify  the use of Motif XmStrings,  automate  the
transfer  of  data  between the fields of  an  application's  data
structures  and  the  widgets of its dialog  boxes,  and  make  it
possible  to  automatically create a widget  hierarchy  completely
described in a resource file.

Motif  Tools  is a comprehensive programmer's guide and  reference
manual  for  the  Xmt library.  It guides the reader  through  the
development  of  a  complete application: from  first  conception,
through  design  and  implementation,  and  on  to  the  finishing
stylistic  touches--the  myriad  little  details  that  make   the
difference  between an application that looks sharp and  one  that
just looks ordinary, between one that is a pleasure to use and one
that  is  just usable. Scattered throughout the book and collected
on  the  CD  are programming tips and tidbits submitted  by  Motif
programmers  from  around the world. The book includes  a  single-
programmer  license to use the Xmt library source code. Additional
licenses may be purchased at a nominal cost.
[ 15 January 1998
  The Linux Gravis Ultra Sound mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Gravis Ultra Sound mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

THE GUS MINI HOWTO

Version 0.2.2; 14/9/1997 (that's European date format ;-)

(C)opyright 1997 Nicolai Langfeldt (janl@math.uio.no)

This is a HOWTO on how to get Gravis Ultra Sound cards working under
Linux.  Specifically I describe the the 'Perex Ultra' driver for
Linux, it's a alternate sound driver for GUS cards, including GUS PnP.

The regular sound driver in Linux can drive most GUS cards, but not
GUS PnP, easily.  If you read the "Initializing PnP cards" and look at
the referred configuration files you can probably work out to get the
regular driver to work though, it's not, strictly speaking, magic.  An
other alternative is 4Front's commercial driver, for which you can
obtain a 5 day trial version.  See http://www.4Front-Tech.com/ (this
is a much enhanced commercial version of the regular Linux sound
driver).  Of all the three drivers 4Front's driver was easiest to get
working on my machine.  It is my opinion that the Perex Ultra driver
is the best free alternative.

* Getting it

First of all: you need root access to the machine you're installing
on.  If you haven't got that you can forget installing sound drivers.

Then you get the driver.  http://www.pf.jcu.cz/~perex/ultra/ lists a
number of ftp sites.  The home site is
ftp://romeo.pf.jcu.cz/pub/perex/ultra/.  In the directory final you
find the final, working, versions of the driver.  At this time
(6/9/97) the latest is 2.71b.  Fetch the driver version you want.

* Problems?

If, you like me, get problems getting any sound out of the card at all
you must debug.  To help with this the distribution contains a FAQ
(the file is called FAQ ;-)

* Installing

I will assume directory and filenames are according to the 2.71b
version.  Unpack it (tar xvzf ultra-2.71b.tgz).  It unpacks into a new
directory, ultra-2.71b, cd there.

First you have to configure the package.  Simply type './configure'.
It will figure out what kind of CPU you have, and how many.  Please
note that a ultra driver compiled for SMP (multi-CPU) machines will
not work on single CPU machines, and vice versa.

To compile go 'make compile'.  It will print some CPU and architecture
info, install paths and ask you to press return.  If you're unhappy
with something it printed press ^C and edit the Makefile to match your
tastes.  Otherwise press return (enter).  If you change the paths, be
aware that some programs, like ultramidi expect the midi config files
to be in /usr/local/etc no matter where the top Makefile has them
placed.  At the next prompt (GUSCFG_MAJOR question) press return
again.  At the next prompt (GUSCFG_ALL) decide if you want a driver
that can handle all GUS cards or not.  One for all cards will be
slightly larger.  If you answer 'n' you now get to select what card(s)
to support, select the card(s) you want.  Press return on all the
prompts thereafter.  The driver should now compile.

If there are any compilation errors fix them, and report them to Perex
(email: perex@pf.jcu.cz).  You can ignore all/any warnings.

Once it compiles ok do 'make install'.  This will install the driver,
config files and the accompanying binaries in the directories shown
when the compilation started.

* Initializing PnP cards

If you have a PnP card you _might_ need to do some more work.  I had
to do what I describe in this section to get my card working.  Other
people has told me they didn't have to, and indeed, it's supposed to
work without doing this.  If after loading the driver and trying to
play sounds (see the next section; "Getting it working") there is no
sound and /dev/gusinfo is unreadable go back here.  If it works with
no special initialization; cool.

The PnP tools, and a sample configuration file is included in
src/driver/isapnptools-1.7.  cd there.  If you don't have isapnptools
already installed go 'make' to compile the software, and 'cp pnpdump
isapnp /sbin' to install it.  A word of WARNING: Running pnpdump can
cause your computer to lock up real hard, real fast.  The latest
version of isapnptools can be found at
ftp://ftp.demon.co.uk/pub/unix/linux/utils, it's currently at version
1.10.

The file gravis.conf is supplied as an example configuration file.
You can almost certainly use that, with some small modifications.  You
want to configure a card called GRV0001.  But the supplied file
initializes

  GRV0001/1

Which probably don't match your hardware.  Run 

  pnpdump >mygravis.conf

The file mygravis.conf will now contain information on all your
ISA-PnP cards.  Look in the file and find the CONFIGURE lines with the
GRV0001 numbers.  On my machine it's:

  GRV0001/7332

So in my case, I just substitute all instances of GRV0001/1 with
GRV0001/7332.  Put the new file at the end of /etc/isapnp.conf.  Run
'isapnp /etc/isapnp.conf'.  There won't be any error messages, trust
me >:-).  At this point the card is initialized to the listed
interrupts, DMAs and other things.

* Getting it working

First run /usr/local/bin/gusdevs.  This will make the special files in
/dev that the gus driver needs.  If the file
/usr/local/etc/gus-midi-gf1.defs isn't there copy it from
src/driver/daemon/gus-midi-gf1.defs in the distribution.

Now we'll see if the driver is working.  First connect headphones or
loudspeakers to your card.  Then run 'insgus', it loads the driver.
It should not print any messages, if it does something is wrong.  To
test the driver play some sound.  A very rough test is to copy your
kernel to the sound system.  Try this:

  cat /boot/vmlinuz >/dev/audio

(this assumes that /boot/vmlinuz is the name of your kernel).  This
should make some noise.  You can adjust the cards volume with the
gusmix or xgusmix program.  The Main/Master and PCM volumes needs to
be up.  If gusmix/xgusmix won't run the driver isn't working at all.
If it dosn't make any sound the driver is not working right.

Another diagnostic is to run 'cat /dev/gusinfo'.  If you get a 'no
such device' message things are _not_ working.  This 'file' should
also show the correct amount of memory on your board.

* Making it work permanently.

Once the driver is working we can modify boot scripts and config files
so that we don't have to think about it anymore.

There are two ways to load the driver, with modprobe/kerneld, or by
running the insgus program.  

To use the insgus program just put a insgus command in your boot
scripts.  On a RedHat system /etc/rc.d/rc.local is a good place.  If
you have some other system please e-mail me, telling me where to put
the command.  Make sure /usr/local/bin is in your path, or write the
command completely out: /usr/local/bin/insgus.

If you have a PnP card you need to run the isapnp command each time
the machine boots: 'isapnp /etc/isapnp.conf'.  Again: On a RedHat
system /etc/rc.d/rc.local is a good place.  Run it _before_ running
insgus though!!!

My favorite is using kerneld.  You need to edit your /etc/conf.modules
file.  In the apps-setup directory of the ultra distribution there is
a file called conf.modules:

----
#
# Configuration for GUS driver from The Ultra Sound Project...
#

path=/usr/local/etc
alias char-major-14 gus
install gus /usr/local/etc/insgus -Kn
remove gus /usr/local/etc/insgus -Kk
----

Insert it at the end of your /etc/conf.modules file (if you haven't
got one check if you have modules.conf instead, if not, just make
conf.modules).  There is a slight typo in the file (in version 2.71b,
shown above), the path to the insgus program is actually
/usr/local/bin/insgus, so fix that.  Once that is in place the driver
should auto load whenever a sound device is opened for use (when you
try to play a sound or run a mixer program) and after being unused a
while the module will be automatically removed.  More on all this in
the kerneld mini howto.

* Finished?

That's it.  Follow the links on Perex' Ultra page to find more
information about sound playing and such under Linux.

Oh, and, the ultramod and ultramidi programs seem to require that you
have RAM on your sound-card.  I don't have any RAM, so I use mikmod,
available on sunsite.unc.edu to play mod files.  I haven't gotten
around to midi yet.

[ 14 October 1997
  The Linux HTML Validation mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  HTML Validation mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

  The HTML Validation HOWTO
  Keith M. Corbett, kmc@specialform.com
  v0.2, 29 October 1995

  This document explains how to use the nsgmls parser to validate HTML
  documents for conformance with the HTML 2.0 document type definition,
  or "DTD".  This DTD is the most commonly accepted SGML based defini-
  tion of HTML, and thus defines a subset of current practice in HTML
  markup that is likely to be portable to a wide number of HTML users
  agents (browsers).
  ______________________________________________________________________

  Table of Contents:

  1.      Introduction

  1.1.    Costs and benefits

  1.2.    Getting started

  2.      Tools

  2.1.    The

  2.2.    The

  2.3.    Download the HTML specification materials

  3.      Parsing an HTML document

  3.1.    Parser input

  3.2.    Parser output

  3.3.    Parser messages

  3.4.    Return status

  4.      Resources
  ______________________________________________________________________

  1.  Introduction

  This is a guide to using the nsgmls parser to validate and process
  HTML documents.

  1.1.  Costs and benefits

  Using the full features of SGML markup will enrich your HTML
  documents.  However, validating your documents to the HTML DTD has
  certain cost / benefit tradeoffs, basically because you are dealing
  with a more circumscribed dialect of HTML than is currently in vogue.
  The "official" HTML rules for enforcing document structure, and the
  SGML rules for data content markup, are more restrictive than current
  practice on the Web.

  The main issue you must consider is that valid HTML is restricted to a
  standard set of element tags.

  There isn't an accepted DTD that accurately reflects "browser HTML" as
  understood by many client browser programs.  For the most part, the
  HTML 2.0 DTD reflects tags and attributes that were commonly in use on
  the Web around June 1994.  Various efforts to define a more advanced
  HTML+ or HTML 3.0 DTD have gotten somewhat bogged down.  And none of
  the DTDs in circulation will recognize all of the tags that have been
  popularized recently by browser vendors such as Netscape and
  Microsoft.

  1.2.  Getting started

  Contrary to popular opinion, working with SGML does not have to cost a
  lot of time and money.  It is possible to build a robust development
  environment consisting entirely of software that is freely available
  on a wide range of platforms, including Linux, DOS, and most Unix
  workstations.  Thanks to a few very dedicated folks, all the tools you
  need to work with SGML have been made publicly available on the
  Internet.

  Setting up your environment (the parser and supporting program
  libraries) takes a bit of work but not nearly as much as one might
  think.

  You may also want to peruse an introductory SGML text such as "SGML:
  An Author's Guide to the Standard Generalized Markup Language" by
  Martin bryan, or "Practical SGML" by Eric van Herwijnen.

  2.  Tools

  2.1.  The HTML Check toolkit package

  If you want a completely self-installing / canned package, check out
  the HalSoft HTML Check Toolkit at URL: http://www.halsoft.com/html-
  tk/index.html

  The only disadvantage of using the HalSoft kit is that it uses the
  older sgmls parser, which produces error messages that are sometimes
  (even) more cryptic than those from nsgmls.

  I've used nsgmls on Linux and Windows (3.x and NT); it is supposed to
  work on many other platforms as well.

  2.2.  The nsgmls parser

  James Clark has built a software kit called sp which includes the
  validating SGML parser, nsgmls.  (This is the successor to the sgmls
  parser which has long been considered the reference parser.)

  For information on the sp kit, see URL: http://www.jclark.com/sp.html

  You can download the kit directly from: ftp://ftp.jclark.com/pub/sp/

  You may be able to pick up nsgmls executable files for your platform.
  Or, download the source kit and follow the directions in the README
  file for running make.

  Consider creating a high level public directory that will contain
  SGML-related files.  For example, on my Linux PC I have various SGML
  related directories including:

  /usr/sgml/bin

  /usr/sgml/html

  /usr/sgml/sgmls

  /usr/sgml/sp

  2.3.  Download the HTML specification materials

  The draft standard for HTML 2.0 includes SGML definition files you
  need to run the parser, namely the DTD (Document Type Definition),
  SGML Declaration, and entity catalog.  To obtain the HTML 2.0 public
  text, see URL:

  http://www.w3.org/hypertext/WWW/MarkUp/html-spec/

  Download and install the following files:

  DTD html*.dtd

  SGML declaration html.decl

  Entity catalog catalog

  You can add two entries to the HTML entity catalog for ease of use
  with nsgmls:

       ______________________________________________________________________
               -- catalog: SGML Open style entity catalog for HTML --
               -- $Id: catalog,v 1.2 1994/11/30 23:45:18 connolly Exp $ --
        :
        :
               -- Additions for ease of use with nsgmls --
       SGMLDECL        "html.decl"
       DOCTYPE HTML    "html.dtd"
       ______________________________________________________________________

  Alternatively, you can create a second catalog containing these
  entries; you will have to pass this catalog to nsgmls as an argument
  with the -m switch.

  3.  Parsing an HTML document

  Following is a "cookbook" for validating a single document.  Simply
  invoke the nsgmls parser and pass it the pathnames of the HTML catalog
  file(s) and the document:

       % nsgmls -s -m /usr/sgml/html/catalog <test.html

  The -s switch suppresses the parser's output; see below.

  3.1.  Parser input

  Your document must conform to SGML, which means, among other things,
  that the document type must be declared at the beginning of the input.
  (You can fudge this by prepending the information to the document
  instance on the nsgmls command line.)

  Here's a simple HTML document that can be parsed correctly using the
  scheme I've outlined:

       ______________________________________________________________________
       <!doctype html public "-//IETF//DTD HTML 2.0//EN">
       <html>
       <head>
       <title>Simple HTML document.</title>
       </head>
       <body>
       <h1>Test document</h1>
       <p>This is a test document.</p>
       </body>
       </html>
       ______________________________________________________________________

  3.2.  Parser output

  The standard output of nsgmls is a digested form of the SGML input
  that processing systems can use as a lexer for navigating the
  structure of the document.  For the purpose of validation, you can
  throw the standard output away and rely on the error output.

  If you do want the full output, omit the -s switch and pipe standard
  output to a file:

       % nsgmls -m /usr/sgml/html/catalog <test.html >test.out

  3.3.  Parser messages

  Error and warning messages from nsgmls can be very cryptic.  And you
  may see very many errors from illegal markup.

  To pipe messages to a file, use the -f switch:

       % nsgmls -s -m /usr/sgml/html/catalog -f test.err <test.html

  3.4.  Return status

  The parser indicates whether the input document conforms to the HTML
  DTD in two ways:

  Return code - the parser returns a 0 exit status on success, non-zero
  otherwise.

  Output - if the document conforms to the DTD, the last line of
  standard output will consist of a single C character.

  4.  Resources

  The HalSoft HTML Check Toolkit is at URL: http://www.halsoft.com/html-
  tk/index.html

  James Clark's page on sp is at URL: http://www.jclark.com/sp.html

  The W3C page on the HTML specification is at URL:
  http://www.w3.org/hypertext/WWW/MarkUp/html-spec/

  Feel free to contact me via email: kmc@specialform.com.

[ 14 October 1997
  The Linux JE mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  JE mini-HOWTO, please get in touch with me at <tjbynum@metalab.unc.edu>. ]

  ---------JE-HOWTO(April 20 1995)------JE-HOWTO(April 20 1995)-------

  JE(Japanese Extensions)-HOWTO

  --------------------------------------------------------------------

  JE-HOWTO explains the ins and outs of JE, Japanese Extensions for
  Linux. It tells you what JE is, how to get info on it, where to 
  get it and how to install it. If you want Japanese environment on
  your Linux system, this is the first document yo should read.

  This version deals with JE-0.9.5. For info on where to find the
  latest version, please refer to B-0.

  --

  Authors:
      Hironobu ABE       <hironobu@ap.isl.melco.co.jp>
      Yasu Hiro YAMAZAKI <hiro@ice3.ori.u-tokyo.ac.jp>
      
  Translator/ Re-writer/ Distasteful Joker:
      Hiroo Yamagata     <hiyori13@mailhost.net>      

  --------------------------------------------------------------------

  ======================== Table of Contents  ========================

  A. Introduction
     A-1: What is JE?
     A-2: Contents of the JE Package
     A-3: Requirements
     A-4: What's New in v.0.9.5

  B. Sources of Information
     B-0: The Latest Version of This Document
     B-1: Network News
     B-2: Mailing Lists
     B-3: Installation Guide
     B-4: Feedback
     B-5: Other Sources of Information

  C. Getting JE
     C-1: Anonymous ftp
     C-2: CD-ROM

  D. Installation
     D-1: Getting Ready
     D-2: Installing the installer (ezinst)
     D-3: Installing the Real thing
     D-4: Installation Tips

  E. Contents of Each Disk Set
     E-1: JE disk set
     E-2: base  disk set
     E-3: emacs disk set
     E-4: doc disk set
     E-5: wnn disk set
     E-6: canna disk set
     E-7: sj3 disk set
     E-8: net disk set
     E-9: text disk set
     E-10: font disk set
     E-11: xclt disk set
     E-12: xsi disk set
     E-13: iv disk set

  F. Future Plans

  G. JE Counter
  
  H. Legalese and Miscellaneous

  ====================================================================


  A. Introduction
  ===============

  A-1: What is JE?
  ----------------

  First, why do we even need JE? What's the big deal?

  Well, the deal is, Japanese uses different characters than the
  roman alphabet.  And unlike some puny languages that are content 
  with less than a hundred characters, Japanese uses thousands of 
  characters (Ha!). They borrowed a lot from China, added some of 
  their own, and recently incorporated the Roman characters, too. 
  Don't ask how they live with this mess, they just do. Since the 
  number of characters is clearly more than can be assigned to a 
  single byte code set, they use 2-byte code sets.

  Obviously, to use any Japanese on Linux, extra fonts for Japanese 
  characters are required.  And then, many existing software have 
  never even dreamt of 2-byte character sets.  These need to be 
  tweaked, or a Japanese-savvy equivalent must be developed.  Also, 
  normal keyboards have only so many keys (like 101 or 106). 
  Japanese need an input method that can input thousands of chars 
  using only a hundred keys.

  Amazingly, JE takes care of all these.

  JE (Japanese Extensions for Linux) is a collection of free 
  softwares to create a Japanese Language environment for standard 
  distributions of the Linux system (ex. Slackware, SLS, Debian, 
  with a heavy inclination toward Slackware). Most of the programs 
  are ported or developed by members of the Japanese Linux Mailing 
  List. They are available both as binaries and source codes, though 
  the basic distribution only contains the binary.
  
  The binaries are tar+gzip'ed. They could be installed using 
  standard installers like "pkgtool" or "sysinstall". However, to 
  make life easier for you, JE has its own installer named "ezinst" 
  which even takes care of some basic configuration.



  A-2: Contents of the JE Package
  -------------------------------
  
  JE consists of software to display, input, edit, format, and print 
  Japanese characters and documents, as well as small but fancy 
  made-in-Japan software, including;
  
  1) Japanese-savvy Consoles
     "kon", "kterm", and "pxvt" will enable you to display exotic 
     looking Japanese characters on your screen, giving it a distinct
     oriental look-and-feel.
     
  2) Japanese Input Methods (or JIM for people in the know)
     "Wnn", "Canna", "SKK" and "sj3" will convert an input string 
     from standard 101/106 keyboards into Japanese characters, words, 
     phrases or symbols.
     
  3) Japanese-savvy editors 
     "jelvis" (Japanese vi clone), NEmacs (Japanese Emacs)and Mule 
     (Multilingual Emacs).
  
  4) Japanese TeX system
  
  5) Others
     "Oneko" is a cute mouse-cursor chaser for the X-window system. 
     There are several mail and news handlers, character code set
     converters and shells to handle Japanese characters in command 
     line under Linux. See section E for details.

  Binaries in JE use the EUC-J character code set as default. This 
  code set is chosen because of its popularity among UNIX 
  workstations. However, MS-DOS and other personal computers use 
  SJIS or Shift-JIS code set.  And then there is the JIS code set, 
  yet another encoding (sigh), which is widely used on the net to 
  exchange Japanese information among computer systems.
  
  Yes, it is messy.  This diversity (or chaos) derives from 
  historical and political reasons. There isn't much that developers 
  can do at the moment. Most software in JE can handle all the code 
  sets.  But, some require re-compilation to handle different code 
  sets, while some are run-time configurable.  "nkf" will detect 
  and convert among these three popular code sets.


  A-3: Requirements
  -----------------
  
  JE is designed to be installed over a standard distribution of 
  Linux such as Slackware or SLS. The current version, JE-0.9.5, 
  requires shared libraris libc-4.5.26 or newer and libX-3.1.0 or 
  greater, both of which are included in the JE1 disk set.

  As of version 0.9.5, JE no longer assumes shadow passwords.


  A-4: What's New in 0.9.5
  -----------------------
  
  The changes in 0.9.5 might be subtle in terms of content, but 
  enormous in terms of form and organization.  If you are upgrading 
  from previous versions, please be VERY careful.

  - Reorganized disk sets
  - Added a VGA only version of "gs"
  - Added "temacs" packages (pre-dumped emacs)
  - Added "je menu", "faqbro", Japanese FAQ/HOWTOs
  - Upgraded Canna (to V3.2), XFree86j/Xsi (to V2.1.1)
  - Added dviout/prt that support epsbox+gs
  - Added new packages, such as Japanese VIM, mnews, prn
  - Added "InterViews 3.1"
  - Reorganized the directory structure to something more standard
    + Changed NEmacs directory to default
      (/usr/local/lib/emacs -> /usr/local/emacs)
    + File/programs that are called from other programs are moved 
      to more standard locations (especially Tcl/Tk and "sendmail" 
      related files)
    + Fonts are moved to /usr/share/fonts directory, to avoid 
      cluttering of the TeX directory



  B. Sources of Information
  =========================

  B-0: New version of JE-HOWTO
  -------------------------------
  
  The latest version of JE-HOWTO should be available as a part of 
  the latest JE distribution, and will also be posted on 
  "fj.os.linux" and other newsgroups when it is updated.

  Please note that due to translation overhead, the English JE-HOWTO 
  may not be completely up-to-date.


  B-1: Network News
  -----------------
  
  The best place to adress general questions and discussions on JE 
  is the "fj.os.linux" newsgroup. This newsgroup is very active on 
  JE related topics. The only drawback (for you, maybe) is that the 
  majority of posts are in Japanese. Postings in other languages, 
  however, are quite welcome. English is quite OK, and you might 
  even get away with Spanish, Swahili, Vietnamese or Atlantis. 
  Mayans and Egiptian hieroglyphs require too many special fonts,
  and thus should be avoided at the moment. This may change in the
  future as JE evolves into a truely universal environment with 
  built in inter-galactic translator (development code name Babel 
  Fish).
  As of 1995, chances of your getting replies would be greatest if 
  you post either in English or in Japanese.


  B-2: Mailing List
  -----------------
  
  There is no mailing list specializing in JE at the moment. 
  However, there is the Japanese Linux Mailing List, where JE 
  related topics are actively discussed. In fact, JE is a direct 
  offspring of this ML. In addition, you may get a beta version 
  of JE by through occasional circulation in tapes or disk media.

  To join the Japanese Linux ML, send e-mail as:

       # Mail linux@colias.tutics.tut.ac.jp
       X-Mn-Cmd: join

  To obtain a brief guide about the ML, send e-mail to;

       linux@colias.tutics.tut.ac.jp

  with only "# guide" (without quotations) in its body.

  A Mailing List in English was just born. It is called jewel-ML,
  "The Mailing List of JE for the World in the English Language".
  The e-mail address is,

       jewel@colias.tutics.tut.ac.jp

  and we, JE developers and coordinators, are waiting for you with 
  a cup of coffee (or a mug of virtual beer) at hand. Please relax 
  and join us.


  B-3: Installation Guide
  -----------------------
  
  JE comes with "The Guide", an installation guide written in 
  Japanese. This explains the installation procedure step by step. 
  The current version is somewhat outdated, but it will give you 
  a very good idea of what's involved, IF you can read Japanese. 
  There is no English edition, but we are certain that whoever
  will create one should be rewarded with global praised and fame 
  and fortune, rivaled only by that of Linus Torvalds himself.
  Hmm... wonder if anybody out there might volunteer...(hint, hint!)


  B-4: Feedback
  -------------
  
  Bug reports and suggestions should be posted on the newsgroup 
  "fj.os.linux" so that it can be shared faster among various 
  interested parties.  If you don't have access, or prefer the 
  privacy of e-mail, send them to je@Roy.dsl.tutics.ac.jp. 
  Jewel-ML, mentioned in B-2, is also available for those of you
  tender souls out there. 

  Please don't send e-mail to the original developers of each 
  program in JE when you find a problem, because your problem may 
  be due to our composer's faults and we don't want to bother the 
  authors.
  
  [Translator's Note: The above notice seems to be loaded with
  the strange Japanese idea of politeness.  If you are REALLY REALLY 
  sure that there is a bug, or if you have good suggestions, I don't 
  see why you shouldn't let the original developers know about it.
  What is actually implied here is that, don't treat them like some
  sort of an on-line help or your personal slaves that you can push
  around, press demands or nag at. This will annoy them, discourage 
  further developments and enhancements.]


  B-5: Other Sources of Information
  ---------------------------------
  
  The following two documents are made public to explain Japanese 
  Linux matters. Both are written in Japanese and, unfortunately, 
  no English version is available.

  "Linux Jouhou memo" 
       by Y. Hiro Yamazaki <hiro@ice3.ori.u-tokyo.ac.jp>
       
  "JMETA-FAQ" by Tetsu Ono <ono@eiehost.gee.kyoto-u.ac.jp>

  Both are included in the doc disk set of JE. They are occasionally
  updated and posted on fj.os.linux and other BBSs in Japan.


  There is a very good book in English which will help you 
  understand how the  Japanese language is handled on computers, 
  including the mind boggling issue of the character code sets.

    Understanding Japanese Information Processing
    Ken Lunde
    O'Reilly & Associates Inc.
    ISBN 1-56592-043-0

  For other sources of Japanese processing in Unix/Linux environment,
  look for the English manpages of mule, Canna, Wnn and kinput2.
  texinfo manual of mule explains its difference from GNU Emacs, and
  /mule/etc contains FAQs in various languages.


  C. Getting JE
  =============


  C-1: Anonymous ftp
  ------------------
  
  JE is available at the following anonymous ftp sites in Japan in 
  binary form.  This is the standard distribution:
  (sites info based on JMETA-FAQ 1.32 & Linux Joho Memo 12/1/94)

    tutserver.tutcc.tut.ac.jp   133.15.64.6      /pub/linux/JE
    ftp.kuis.kyoto-u.ac.jp      130.54.23.2      /Linux/JE
    ftp.cs.keio.ac.jp      131.113.35.20    /pub/os/linux/Japanese/JE
    etlport.etl.go.jp           192.31.197.99    /pub/linux/JE
    ftp.huie.hokudai.ac.jp      133.50.16.80     /pub/system/Jlinux/JE
    ftp.is.titech.ac.jp         131.112.40.1     /pub/linux/JE
    ftp.ipc.chiba-u.ac.jp  133.82.241.128   /ftp.kyoto-u.ac.jp/.u6/JE
    ftp.pu-toyama.ac.jp         133.55.2.15      /pub/Linux/JE
    srawgw.sra.co.jp            133.137.4.3      /pub/os/linux/JE
    ftp.iis.u-tokyo.ac.jp       157.82.96.67     /pub2/Linux/JE
    wnoc-fuk.wide.ad.jp         133.4.14.3       /pub/Linux/JE
    turbo.te.chiba-u.ac.jp      133.82.181.125   /pub/Linux/JE
    ftp.astec.co.jp             133.147.2.254    /pub/Linux/JE
    ftp.hitachi-sk.co.jp        133.107.1.2      /pub/pds/linux/JE
    ftp.kddlabs.co.jp      192.26.91.15    /pub/os/linux/Japanese/JE
    glaucomys.seino.tsukuba.ac.jp 
                                130.158.208.193 /pub/Linux/pkg/JE/0.95

  "tutserver" is the source of JE. However, use of other sites is 
  strongly recommended since the connection to "tutserver" is rather 
  thin.

  The following sites outside Japan are known to mirror "tutserver" 
  everyday:

    sunsite.unc.edu             152.2.22.81       /pub/Linux/distributions/je
    ftp.cdrom.com               192.153.46.2      /pub/linux/je

  Source codes are available at the following sites:

    tutserver.tutcc.tut.ac.jp  133.15.64.6      /pub/linux/je-sources
    ftp.kuis.kyoto-u.ac.jp     130.54.23.2      /Linux/JE-sources
    ftp.huie.hokudai.ac.jp      
                      133.50.16.80      /pub/system/Jlinux/JE-sources
    ftp.iis.u-tokyo.ac.jp      157.82.96.67    /pub2/Linux/je-sources
    ftp.iij.ad.jp              192.244.176.50  /pub/linux-j/JE-sources
    ftp.pu-toyama.ac.jp        133.55.2.15       /pub/Linux/JE-sources

  Linux patches (if any) are separated from its original. So, when 
  you get to the above sites, you may see something like the 
  following;

       oneko-1.1b.tar.Z            Original codes
       oneko-1.1b+lx.diff.gz       Linux patch

  The files with extensions "+lx", "+je" are the Linux patches. If 
  there are any other patches, apply them before applying the 
  Linux/JE patches.


  C-2: CD-ROM
  -----------

  JE is also available in CD-ROM:

       CD-ROM Shop Laser5
       Big Office Plaza, Suite 203
       2-652-8 Higashi Ikebukuro
       Toshima-ku,
       170 Tokyo Japan

       Phone: +81-3-5952-4639
       FAX:   +81-3-5952-7486

  This CD-ROM contains JE with its source codes as well as 
  Slackware and SLS distributions. The organizers are active 
  members of Japanese Linux ML. So, the CD-ROM reflects the 
  feedback from Japanese users quickly.

  Unfortunately, this distributor does not accept overseas orders.


  A number of other CD-ROMs include JE.  These include (but not
  limited to):
  
        LINUX Developer's Resource 4 CD Set
        Info Magic
        P.O.Box 30370
        Flagstaff, AZ 86003 USA
        Tel: +1-602-526-9565  Fax: +1-602-526-9573
        e-mail:info@infomagic.com
        Web: http://www.infomagic.com
        
        LINUX Developers Kit 2 CD Set
        Pacific Hi-Tech
        3855 South 500 West, Suite B
        Salt Lake City, UT 84115 USA
        Tel: +1-801-261-1024  Fax: +1-801-261-0310
        e-mail: info@pht.com
        Web: http://www.pht.com/
        
        Linux Supplement #3
        Trans-Ameritech Systems, Inc.
        2342A Walsh Av
        Santa Clara, CA 95051  USA
        Tel: +1-408-727-3883   FAX   (408)727-3882
        e-mail: info@trans-am.com


  Unfortunately JE is not an indispensable component of the Linux
  distribution (yet), and on each release, distributors include 
  it or exclude it depending on capacities and whims. So check 
  before you buy.
  

  D. Installation
  ===============

  This section explains the installation procedure of JE. Remember 
  that you must have Linux already installed before you tamper 
  with JE!

  The custom installer called "ezinst" is in the JE disk set of JE. 
  Use "pkgtool" of Slackware or "sysinstall" of SLS in your system 
  to install ezinst itself.


  D-1: Getting Ready
  ------------------

  1) Prepare Floppy Disks of JE.
 
    Copy each directory to a disk. Each disk set of JE should fit 
    on a High Density floppy disk, 5" or 3.5" 2HD. This step is 
    not necessary if you install JE from HDD or CD-ROM, or via NFS.


  2) Check the Version of the Libraries.
 
    To do this, use the "ldconfig" command. The result should look 
    something like this;


        # ldconfig -p
        9 libs found in cache `/etc/ld.so.cache' (version 1.4.3)
                 1 - /lib/libvga.so.1.0.11
                 2 - /usr/X11/lib/libtk.so.3.1
                 3 - /usr/lib/libtcl.so.3.1
                 4 - /lib/libm.so.4.5.24
                 5 - /lib/libc.so.4.5.24
                 6 - /usr/X11/lib/libXt.so.3.1.0
                 7 - /lib/libXpm.so.3.3.0
                 8 - /usr/X11/lib/libXaw.so.3.1.0
                 9 - /usr/X11/lib/libX11.so.3.1.0

    Write down the versions of #4,5,6,8,9 (libc.so, libm.so, 
    libXt.so, libXaw.so, libX11.so). In the above case, these 
    would be 4.5.24 and 3.1.0.



  D-2: Installing the Installer (ezinst)
  --------------------------------------

  1) Installing from Floppy Disks
 
     Stick the JE1 disk in the drive. Start "pkgtool" by typing:

        # pkgtool

     Your machine will ask you what you are installing from. Choose;
 
        Floppy   Install packages from floppy disks

    You'll be prompted for the disk type. Write down the device name 
    of the disk that you assigned here.
   
    Next, you'll be prompted for a series name.  Answer "JE".  Now, 
    proceed to 3).
 
 
  2) Installing from Non-Floppies
  
     The source media must be recognized by Linux as a mounted 
     directory.
  
  a. Installation from a Pre-mounted Directory
  
     cd to the JE1 directory. Now, start pkgtool;

        # pkgtool

     And then, select the following as the installation source:
    
        Current  Install packages from the current directory

     Now, proceed to (3).

  
  b. Installing from an NFS Server
  
     Mount the NFS server disk.  For example, suppose JE1 is 
     located on the /home1/ftp/Linux/JE directory on an NFS server 
     named zephyrus.  You should type;

        # mount zephyrus:/home1/ftp/Linux/JE /mnt

     Then, you should find the directory /mnt/JE1. Move to this 
     directory using cd. Now, start pkgtool;

        # pkgtool

     And then, select the following as the installation source:
    
        Current  Install packages from the current directory

     Now, proceed to 3).


  c. Installing from CD-ROM
 
     Mount the CD-ROM.  If you installed Slackware and have already 
     configured your CD-ROM drive, you should type as follows:

        # mount -t iso9660 /dev/cdrom /mnt

     If not, determine the device name to mount using the following 
     list;
 
        /dev/sr0   : SCSI CD-ROM
        /dev/mcd   : Mitsumi CD-ROM
        /dev/sbpcd : SB CD-ROM
        /dev/cdu31a: CDU31A CD-ROM
        /dev/sonycd: SONY CD-ROM


     After mounting, you should find the directory /mnt/JE1. Move 
     there using cd, and write down the device name that you used 
     here. Now, start pkgtool;

        # pkgtool

     And then, select the following as the installation source:
    
        Current  Install packages from the current directory

     Now, proceed to 3).

  
  
  3) Installing JE1
  
     The JE1 disk contains the following packages:

     ezinst:   Easy installer for JE
     konbin:   KON to display Kanji on console
     konfnt:   Fonts for kon (the same as those for Minix/V)
     libc:     Linux standard shared libraries
     libx:     XFree86 shared libraries (English version)

     "libc" and "libx" included here are libc-4.5.26 and libX-3.1.0. 
     Compare these with what you currently have (you wrote them down 
     at D-1 2)!). If you have a newer version, fine.  Otherwise, 
     copy and use the libraries included in this disk.

     If you want Japanese messages during the installation, you 
     need "kon" or any software that can display Japanese and is 
     supported by the curses.

     Now, your installer is ready and at your service.



  D-3: Installing the Real Thing
  ------------------------------

  1) Run your terminal software, such as "kon" for console:

        # kon

     If your machine is the Toshiba J3100SX, you may use Kanji-term 
     for J3100 as well as kon with j3100 option:

        # kon j3100sx

     The installer uses "/var/adm/mount" to temporary mount floppy 
     disks or CD-ROMs. Thus, if you already have something mounted 
     there, you should unmount it NOW.

     If you want Japanese messages during installation, type:

        # ezinst -j

    If you'd rather have English messages, type:

        # ezinst -e



  2) Follow the instructions by ezinst.  The general procedure will 
     be as follows;

        (1) Choose which package to install
        (2) Choose where to install from
        (3) Let ezinst do the rest!

     The actual menu will look like the follows, when you chose 
     the -e option (for the menus in -j option, please refer to the 
     Japanese version of this HOWTO).

  (1) Choose the Packages
  
      Here, you will choose which packages to install. The most
      crucial choice would be the choice of your input method and
      your Emacs. Crucial, because it will largely determine your
      psychosomatic relation with the system.
      
      The choice of Japanese input method is largely a matter of 
      taste and religion. JE provides four flavors: SKK, Wnn, Canna, 
      and sj3. You can't install Wnn, Canna, and sj3 together. They 
      are mutually exclusive. Install the one that best suits your 
      twisted perversions and/or worship. It is said that conservative 
      Bhuddists tend to prefer Wnn, while VooDooist militant sects
      favor canna, but heretics are everywhere.
      
      But seriously, their differences can be summarized as follows;
      
      Wnn: Has the largest user base. It can also handle Korean and 
           Chinese.  Requires on the server resources.
      Canna: Less demanding on the system, and easier to customize.
             Better for stand-alone use.
      sj3: Very compact. Suited for people with limited disk space.

      The bogus size of JE is partly due to this diversity; each 
      method (and even no method) requires a different set of Emacs! 
      We just HAD o have 'em all.

      The choice of Emacs is also a matter of taste. You need one of 
      X or non-X version of Emacs that matches the input method of 
      your choice. Mule (multi-lingual Emacs) has more features than 
      NEmacs (Japanese Emac), but it takes up more disk space. 
      So, a desktop PC user may reside in the nirvana of Canna-Mule 
      on her X window system, while a laptop user may find solace in 
      non-X NEmacs with SKK.

      Anyway, once you make the major decisions, the installer will 
      largely determine which packages to install (we call this "the
      Standard Rule"), since it knows the dependency among packages 
      to some extent.


      (1a.1) Choose Using Standard Rules
             Based on your general selection, the installer will 
             take care of all the details.  For example, every input 
             method (Wnn, Canna, sj3) need their own dictionary and 
             tools. Installer knows this, and automatically installs 
             them according to your choice.

      (1a.2) Choose Manually
             If you want to do some unusual or esoteric installation, 
             this menu will allow you to taketotal control over the 
             installation. You should know exactly what you're doing.
             Instead of starting from scratch, we suggest that you 
             first let the installer do the standard file selection, 
             and then customize it using the manual option.
     
      (1b) Load Package List
             Instead of choosing packages one by one, you can load a 
             package list file (if you have one).


  (2) Assign Installation Source
      Tell the installer where you are installing from. If you've 
      just installed JE1, and if you're not using floppies, you 
      should find the subdirectory JE1 under /tmp. In this case, 
      you can use method (2.2).

      (2.1) Install from Floppy Disks
             Type the device name of the floppy drive that you wrote 
             down in D-2 1).

      (2.2) Install from Mounted Directory
             Type the directory that contains the JE1 subdirectory. 
             For instance, if you have:
     
                 /mnt/JE/JE1 

             you should type:

                 /mnt/JE


      (2.3) Mount an NFS Server and Install
             Type the name of the NFS server, and the directory 
             that contains the JE1 subdirectory. For instance, if 
             you are installing from an NFS server named  zephyrus 
             with the directory:

                 /home1/ftp/Linux/JE/JE1
 
             you should input:

                 zephyrus
                 /home1/ftp/Linux/JE

      (2.4) Mount a Device (CD-ROM) and Install
             Type the device name, file system type, and the 
             directory that contains the JE1 subdirectory.
              For CD-ROMs, the device name is what you wrote down 
              at D-2 2) (c), and the file system type is iso9660.


  (3) Installation Menu
      Finally, we are ready to start the actual installation... but 
      not quite.  Do yourself a favor and give it a final check.

      (3.1) Check the Required Disks
             When you choose this menu, the installer will give you 
             a list of the required disks.  Do you have them all?

      (3.2) Check Packages to Install
             The installer will display what package it will install.

      (3.3) Check Installation Source Directory
             If you're not installing from floppy disks, Choose this 
             menu. It will display the contents of the source 
             directory.  Make sure that they are correct.

      (3.4) Start Installation
             Finally (finally!), choose this menu and you are going!
             If you're using floppies, the installer will prompt you 
             for the disks. Obey it. You can make up to 3 mistakes 
             for each disk.


  (4) Save Preference
      Saves the current preferences (Language for the messages, and 
      the installation source) to a file.



  3) After the installation, when you quit ezinst, it will ask you:

        Save selected list ? (y/n)

     Choosing "y" will create a package list.  You can use this list 
     to re-install JE at a later time. To do this, re-start 
     ezinstall and choose the file at (1b).



  D-4: Installation Tips
  -------------------------
  
   If you're installing for the first time, getting all the files 
    right manually can be quite cumbersome. Let the installer do 
    the job, and then modify it.
    
   JE does not assume the use of shadow passwords anymore.
  
   If you are installing from floppy disks, you could minimize your 
    labor (and the number of disks) by taking the following steps:

    (1) Make ONLY the JE1 disk and install it.
    (2) Start ezinst, and choose the packages.
    (3) From the "Install Menu", choose "Check the Required Disks" 
        and write down which disks you will be needing.
    (4) Open another virtual console.  Or, close ezinst and save the 
        package list.
    (5) From the new console, create the necessary disks.
    (6) Go back to the ezinst. Or, if you've closed ezinst, re-start 
        it and load the package list.
    (7) Go on with the installation.
    
    
    This way, you won't have to make disks for packages that you 
    are not going to use.

  E. Contents of each disk set
  ============================
  
  The current JE (v.0.9.5) consists of 55 disks, which are divided 
  into 13 disk sets, as in the following list.

    JE?:    disk set to install JE easily                 1 disk
    base? : nkf, lha, Emacs related packages              4 disks
    emacs?: Emacs package                                 8 disks
    doc?:   Japanese documents mostly by JF project       1 disk
    wnn?:   Wnn Input Method users' packages              5 disks
    canna?: Canna Input Method users' packages            6 disks
    sj3?:   sj3 Input Method users' packages              4 disks
    net?:   Network software such as mailers, newsreaders 2 disks
    tex?:   Japanese TeX packages                         3 disks
    font?:  Font packages for TeX and XFree86             7 disks
    xclt?:  XFree86 Japanese client packages              2 disks
    jxsi?:  XFree86j (X11R5 with Xsi extensions)          6 disks
    iv?:    Japanese InterViews                           6 disks



  E-1: JE disk set
  ----------------
  
  The JE disk set is compiled to help you install JE. It includes 
  the following software;

    ezinst:   Easy installer for JE
    konbin:   Binary of KON to display Japanese on console
    konfnt:   Fonts for kon (the same as those for Minix/V)
    libc:     Linux standard shared libraries
    libx:     XFree86 shared libraries (English version)

  (1) ezinst is the installer for the rest of the JE distribution.
      It works on kon (Kanji on console) and other Japanese 
      terminals.

  (2) libc and libx are shared libraries required by JE. JE-0.9.5 
      includes libc-4.5.26 and libx-3.1.0. Don't install them if you 
      already have something newer on your system.

  (3) kon (kanji on console) displays Japanese characters on the 
      console. The current version is 0.99.4.


  E-2: base disk set
  ---------------
    jbase:    lha, nkf, ed, jhd, pwd, ish. pf and other basic tools
    jless:    Japanese less (pager)
    pcurses:  Pelican's curses (for Japanese)
    jman:     Manpage system with Japanese nroff
    dic:      CD-ROM dictionary reference tool
    recjis:   Tool to recover damaged Japanese document
    jelvis:   Japanese elvis (vi clone)
    ng:       Japanese Micro GNU Emacs
    bash:     Japanese bash  (mostly sh compatible)
    zsh:      Enhanced shell
    jgslx:    Japanese Ghostscript (binary, for VGA only)
    jgslib:   Japanese Ghostscript (libraries)
    jgsuty:   Japanese Ghostscript utilities
    jgsgnt1:  Fonts for Japanese Ghostscript (part 1)
    jgsfnt2:  Fonts for Japanese Ghostscript (part 2)
    vflib:    VFlib library & Documents
    prn:      Text formatter/Printing tool/ Japanese PS filter
    jperbin:  Japanese Perl1.3(perl 4.019) binary
    jperllib: jperl library
    jperlman: jperl manual


  (1) "jbase" is a package of basic tools: "lha" is an archiver 
      widely used under MS-DOS especially in Japan, "pf" is a print 
      tool for Japanese line printers.
 
  (2) "jless" is a Japanese pager, which automatically detects the 
      character code set in the document and converts it to the code
      used in the display by refering to the environment variable 
      LESSCHARSET. Most Japanese Linuxers set this variable as 
      "japanese-ujis".

  (3) "pcurses" is a curses with a Japanese handling feature.

  (4) "jman" is a manpage system with Japanese nroff. It enables you 
      to look up Japanese manpages.
 
  (5) "dic" looks up dictionaries on 8cm CD-ROM, widely available 
      in Japan for SONY "Data Discman" or for its compatibles. Also 
      included is an e-lisp code to call "dic" from Emacs.

  (6) "recjis" will recover damaged Japanese documents encoded in 
      JIS, SJIS, or UJIS code set which might have lost some 
      information through network transfers or by other accidents.

  (7) "jelvis" is Japanese elvis (vi clone), while "ng" a subset of 
      Japanese Emacs. Use them with "uum", "canuum" or "kinput2" to 
      input Japanese characters.

  (8) "bash" and "zsh" are enhanced shells. "bash" (bash-1.13.5j)
      can handle 8-bit Japanese characters.

  (9) "jgslx", "jgslib", "jgsuty", "jgsgnt1", and "jgsfnt2" are
      components of the Japanese Ghostscript system. It is based on 
      Ghostscript-2.6.1. The only allocated device in JE binary
      kit is the VGA console.  If you want to use any other devices 
      (such as bj10b), you must re-compile it from the source.
    
      To use Japanese ghostscript on X-Windows, install "jgsx11" 
      (included in the xclt disc set) instead of jgslx.

  (10) "vflib" is the library for using vector fonts.
 
  (11) "prn" contains the text formatting/printing tool "prn" and 
      the Text-to-Japanese PS filter "psconv".

  (12) "jperbin", "jperllib", "jperlman" are components of the 
       Japanese perl1.3 (perl 4.019).


  E-3: emacs disk set
  ---------------------

    nemsup:   NEmacs(Nihongo[=Japanese] Emacs) support files
    nemuty:   NEmacs utilities 
    nemlisp:  LISP package for NEmacs
    mulelisp: Mule (Multi Language Emacs) LISP package
    mulesup:  Mule support files
    muleuty:  Mule utilities
    mulegnus: LISP for using GNUS (Emacs news reader) from Mule
    nemgnus:  LISP for using GNUS (Emacs news reader) from NEmacs
    mulelaps: LISP application for Mule
    nemlaps:  LISP application for NEmacs
    jshrc:    J-Shell documents and rcfile
    muleskk:  SKK related LISP files for Mule
    nemskk:   SKK related LISP files for NEmacs
    skkbin:   SKK server binaries
    skkdic:   SKK dictionary
    vnem:     NEmacs without input method support
    vmenx:    NEmacs without input method support for X
    vmule:    Mule without input method support
    vmulex:   Mule without input method support for X
    mulelsrc: Mule LISP source
    nemlsrc:  NEmacs LISP source
    tvnem:    Dump kit of NEmacs without input method support
    tvnemx:   Dump kit of NEmacs without input method support for X
    tvmule:   Dump kit of Mule without input method support
    tvmulex:  Dump kit of Mule without input method support for X
 

  (1) "nemsup", "nemuty", and "nemLISP" are necessary to use NEmacs, 
      the Japanese Emacs. The current JE contains NEmacs-3.3.2 based 
      on Emacs-18.59.

  (2) "mulelisp", "mulesup", and "muleuty" are necessary to use Mule, 
      the Multilingual Emacs. The JE-0.9.5 includes Mule-1.1pl4 
      (HAHAKIGI version).

  (3) "mulegnus" and "nemgnus" are required to use the news reader 
      "gnus". "mulegnus" enables you to use "gnus" from within 
      Mule, and "nemgnus" enables you to use "gnus" from within 
      NEmacs.

  (4) "mulelaps", "nemlaps" are collections of various "e-lisp" 
      applications, such as "jxw", "ange-ftp" and "J-Shell".

  (5) "jshrc" contains rc files and documents for "J-Shell".

  (6) "skkbin" and "skkdic" are SKK, a Japanese input method,
      accessible by Mule with "muleskk" or NEmacs with "nemskk". 
      JE-0.9.5 comes with SKK-7.17.
    
  (7) "vnem" and "vnemx" are naked NEmacs based on emacs-18.59 
      without support of any input method, for the console and X 
      respectively. You don't have to install these if you decide 
      to use either Wnn, Canna or sj3.

  (8) "vmule" and "vmulex" are naked Mule-1.1pl4 (HAHAKIGI version) 
      without support of any input method, for the console and X 
      respectively. You don't need these if you decide to use either 
      Wnn, Canna or sj3.




  E-4: doc disk set
  ----------------

    faqbro:   Browser for SGML-formatted FAQ (V.0.2)
    je:       JE menu (contains dialog scripts to read various docs)
    jfaq:     FAQ/HOWTOs Japanese version
    jvimdoc:  Japanese VIM Documents
    ki2doc:   Kinput2 Documents
    mnewsdoc: mnews Documents
    skkdoc:   SKK Documents

  *doc series will continue to incorporate outputs from the JF 
   project.  This JE-HOWTO will also become a part of this doc 
   series.


  E-5: wnn disk set
  ----------------
  
  This disk set is necessary only if you decide to go with Wnn, 
  which is the most popular Japanese input method.

    wnnbin:   Wnn4.109p1 (binary)
    wnndic:   Wnn4.109p1 (dictionary)
    wnnsup:   Wnn4.109p1 (support files)
    wnndoc:   Wnn4.109p1 (document)
    wnnman:   Wnn4.109p1 (manual)
    wnnprog:  Wnn4.109p1 (programmer's kit)
    ki2wnn:   kinput2 for Wnn users
    wnem:     NEmacs-3.3.2 with Wnn interface
    wnemx:    NEmacs-3.3.2 with Wnn interface for X
    wmule:    Mule-1.1pl4 with Wnn interface
    wmulex:   Mule-1.1pl4 with Wnn interface for X
    twnem:    Dump kit of NEmacs-3.3.2 with Wnn interface
    twnemx:   Dump kit of NEmacs-3.3.2 with Wnn interface for X
    twmule:  Dump kit of Mule-1.1pl4 with Wnn interface
    twmulex: Dump kit of Mule-1.1pl4 with Wnn interface for X

  (1) "wnnbin", "wnndic", "wnnman", and "wnnprog" are components of
      Wnn-4.109, the most popular Japanese Input Method on Unices, 
      which enables you to input Japanese words and phrases by 
      regular keyboards such as English 101.

  (2) "ki2wnn" is kinput2-fix6 for Wnn users. It enables the use
      of kinput2 (another input method) through Wnn servers.



  E-6: canna disk set
  -------------------
  
  This disk set is necessary only if you decided to go with Canna. 
  Canna is famous for its features and speed among Japanese input 
  methods.

    canbin:  Canna3.2 (binary)
    canman:  Canna3.2 (manual)
    canprog: Canna3.2 (programmer's kit)
    cansup:  Canna3.2 (support files)
    candic:  Canna3.2 (dictionary)
    candoc:  Canna3.2 (Documents)
    ki2can:  kinput2 for Canna users
    cjvim:   Japanese VIM 2.0p + ONEW-2.2.8 for Canna users
    cnem:    NEmacs-3.3.2 with Canna interface
    cnemx:   NEmacs-3.3.2 with Canna interface for X
    cmule:   Mule-1.1pl4 with Canna interface
    cmulex:  Mule-1.1pl4 with Canna interface for X
    tcnem:   Dump kit of NEmacs3.3.2 with Canna interface
    tcnemx:  Dump kit of NEmacs3.3.2 with Canna interface for X
    tcmule:  Dump kit of Mule1.1pl4 with Canna interface
    tcmulex: Dump kit of Mule1.1pl4 with Canna interface for X

  (1) "canbin", "candic", "canman", "canprog", "cansup" and "candoc"
      are components of Canna-2.2pl4 system, an Input Method with 
      nice features and speed, which converts your keyboard input 
      into Japanese.

  (2) "ki2can" is kinput2-fix6 for Canna users. It enables the use
      of kinput2 (another input method) through Canna servers.



  E-7: sj3 disk set
  ----------------
  
  This disk set is necessary only for SKK users. This enables input 
  of Japanese characters into some Japanese applications.

    sj3bin:  sj3 (binary)
    sj3prog: sj3 (programmer's kit)
    ki2sj3:  kinput2 for sj3 user
    snem:    NEmacs-3.3.2 with sj3 interface
    snemx:   NEmacs-3.3.2 with sj3 interface for X
    smule:   Mule-1.1pl4 with sj3 interface
    smulex:  Mule-1.1pl4 with sj3 interface for X
    tsnem:   Dump kit of NEmacs3.3.2 with sj3 interface
    tsnemx:  Dump kit of NEmacs3.3.2 with sj3 interface for X
    tsmule:  Dump kit of Mule1.1pl4 with sj3 interface
    tsmulex: Dump kit of Mule1.1pl4 with sj3 interface for X
    

  (1) "sj3bin", and "sj3prog" are components of the sj3 input method 
      system.

  (2) "ki2sj3" is kinput2-fix6 for sj3 users.



  E-8: net disk set
  ----------------

  This is the collection of network related software.

    cf:       CF-3.3Wb7 (produces sendmail.cf)
    sendmail: sendmail-8.6.9 for Japanese networks
    mailx:    mailer (mail, Mail, rmail)
    mhlib:    MH-6.8jp2c (library)
    mhbin:    MH-6.8jp2c (binary)
    mhman:    MH-6.8jp2c (manual)
    nntpclt:  inews for NNTP
    cnn:      cnn-1.4.2 (news checker)
    ktin:     Japanese tin (newsreader)
    mnews:    mnews1.18 (Japanese mini-news reader)
    ncftp:    ftp user interface for NcFTP

  (1) "cf" helps the configuration of sendmail by creating 
      sendmail.cf.

  (2) "sendmail" is the most popular mail handler in the Unix 
      world. This binary has some extensions to be used over
      Japanese networks, such as WIDE or TISN.

  (3) "mailx" is one of the most popular mailers among Linuxers.

  (4) "mhbin", "mhlib", and "mhman" are components of mh, a mail 
      handling system with Japanese support.

  (5) "nntpclt" is Japanese inews, which enables the exchange of 
      Japanese e-mail.

  (6) "cnn" checks if there are new articles posted on you favorite 
      newsgroups via an NNTP connection.
 

  E-9: TeX disk set
  ----------------

  This set contains all the necessary files for the TeX system 
  except for fonts in the jf disk set, and xdvi in jx.

    bptexbin: PTeX (Japanese big TeX binary)
    bptexfmt: PTeX (Japanese big TeX format file)
    sptexbin: pTeX (Japanese TeX binary)
    sptexfmt: pTeX (Japanese TeX format file)
    ptexlib:  Common resources for PTeX and pTeX
    jbibtex:  Japanese BibTeX
    dvi2tty:  DVI previewer for character terminals
    dviout:   DVI previewer for VGA consoles
    dviprt:   DVI printer driver
    dvidoc:   Documents for dviout/dviprt
    jdvi2kps: jdvi2kps4.0
    4up:      Utility to shrink multi page docs into a single page
    pl2bin:   plain2 binary file
    pl2doc:   plain2 document
    fntuty:   TeX font utility

  (1) "bptexbin"+"bptexfmt" and "sptexbin"+"sptexfmt" are Japanese 
      TeX systems developed by ASCII (a Japanese publisher & 
      developer) based on the famous TeX system. PTeX (bptex) is 
      for those of you who need to handle very large documents. 
      The average user should be quite happy with pTeX (sptex), 
      which is less demanding. Both are capable of handling 
      English documents, too.

  (2) "dviout" is a DVI previewer for VGA, while "dviprt" is a 
      printer driver; both are ported from their DOS versions, 
      which work under non-X environments. They are based on 
      version 2.39 of dviout/prt. The lates release is psbox+gs
      savvy.

  (3) "jdvi2kps" converts DVI files into Japanese PostScript files.
  
  (4) "4up" is a filter that takes Japanese Postscript files, and 
      shrinks 2 (or 4) pages into a single page.

  (5) "pl2bin" is a Plain-text-to-TeX/roff filter. "pl2doc" is its
      documentation.

  (6) "fntuty" is a utility to convert between bitmap, PK, and 
      vector fonts.

  Note that DVI previewer for X environment is in the jx disk set 
  for X applications.


  E-10: font disk set
  -------------------
  
  This disk set contains bitmap and vector fonts for Japanese TeX 
  and the X window system. Note that Japanese PK fonts are NOT 
  necessary if you decide to go with vector fonts.

    cmf180:   180dpi-PK Computer Modern font for TeX
    vmincho1: Zeit vector font in Mincho (JIS level 1 kanjis)
    vmincho2: Zeit vector font in Mincho (JIS level 2 kanjis)
    vasiya1:  Zeit vector font in Round Gothic (JIS L1 kanjis)
    vasiya2:  Zeit vector font in Round Gothic (JIS L1 kanjis)
    vhokuto:  Zeit vector font in Brush typeface
    xfnt13:   13 dot alphabet and Kana font for X
    xfnt16:   16 dot Japanese fonts for X
    xfnt18:   18 dot Japanese fonts for X
    xfnt24:   24 dot Japanese fonts for X
    xfnt26:   26 dot Japanese fonts for X
    xmarufnt: Round typeface Japanese font for X

  (1) TeX requires Computer Modern fonts "cmf180". Depending on the 
      resolution of your printer, other CM fonts might be needed. 
      In that case, you have to find them on the net or create them 
      yourself using the Metafont system.

  (2) "vmincho1/2", "vasiya1/2", and "vhokuto" are Zeit compatible 
      vector fonts for TeX (dviout/prt, xdvi) and Japanese 
      Ghostscript. You can buy the original Zeit font from Zeit, 
      or you can get free alternatives here in JE.

  (3) "xfnt??" and "xmarufnt" are Japanese fonts for the X-window 
     system. Make sure to execute mkfontdir in 
     /usr/lib/X11/fonts/misc after you install any of them.

  * As of JE-0.9.5, bitmap fonts for Japanese TeX are no longer 
    supported.  Only vector fonts are supported.


  E-11: xclt disk set
  -----------------

  This is a collection of X applications.

    xfntali: fonts.alias for Kanji Fonts
    k14:     the famous 14 dot Kanji fonts for X
    kterm:   kterm-5.2.0, xterm with Kanji support
    pxvt:    small Japanese terminal emulator for X, based on rxvt
    xldimg:  image file viewer for X
    oneko:   a cat chasing your mouse cursor
    libtk:   Tcl7.3Tk3.6jp (library)
    tkbin:   Tcl7.3Tk3.6jp (binary)
    tkdemo:  Tcl7.3Tk3.6jp (demo)
    tkman:   Tcl7.3Tk3.6jp (manual)
    xdvi:    DVI previewer with Zeit vector font support
    jgsx11:  Japanese Ghostscript for X11/VGA
    gview:   ghostview-1.5 (X interface for Ghostscript)
    tgif:    tgif-2.13.2.j ( a draw tool with Japanese support)
    xklock:  screen lock with Kanji support

  (1) "k14" is a set of Japanese fonts contributed to the X-window 
      system. You may find it even on your English-only workstations 
      in your office, since it is included in the core distribution 
      of X.

  (2) "xengine" is an application to evaluate the performance of an 
      X server.

  (3) "oneko" makes it easy to find your mouse cursor; a neko (a 
      Japanese word for cat) chases your mouse on your screen. You 
      can turn it into a dog chasing a bone.

  (4) "tkbin", "libtk", "tkdemo", and "tkman" are components of
      Japanese Tcl/Tk. GUI development with Japanese messages is a 
      breeze with these tools.

  (5) "tgif" is the drawing tool with kinput2 interface to 
      input Japanese strings. It can handle EPS files as well as 
      its proprietary  files.
 

  E-12: xsi disk set
  -------------------

  This disk set contains internationalized XFree86-2.1.1 using the 
  Xsi extension. Fonts not included.

    xfs3.tgz:     S3 server
    xfsvga.tgz:   SVGA server
    xfvga16.tgz:  VGA16 server
    xf8514.tgz:   8514 server
    xfmach32.tgz: Mach32 server
    xfmach8.tgz:  Mach8 server
    xfmono.tgz:   VGA Mono server
    fvwm:         Fast, compact and clean window manager
    xfbin.tgz:    basic clients
    xfprog.tgz:   programming kit
    xflib.tgz:    shared libraries and other support files
    xfxaklib:     Shared library for Internationalized Xaw, kinput2 
                  version
    xfxawlib:     Shared library for Internationalized Xaw, xwnmo 
                  version (default)
    xfxakprg:     Internationalized Xaw Programming Kit, kinput2 
                  version
    xfxawprg:     Internationalized Xaw Programming Kit, xwnmo 
                  version (default)
    xfwchprg:     Xwchar Programming Kit
    xfxainc:      Include file for Internationalized Xaw
    xwmno:        Japanese input system
    xmh:          Interfaces for MH X version
    xwkterm:      kterm for XWNMO
    xinfo:        GNU info file viewer
    xcal          Calendar & Scheduler application
    xpbiff:       xbiff with pop-up animation
    xgopher:      Japanese gopher client
    
  This disk set was prepared through the following steps.

    - Based on XFree86-2.1.1
    - Set Xsi, X_LOCALE, X_WCHAR and XML, and did "make World"
    - Merged Xawk2 and Xwchar into Xaw-i18n (xfxaklib)

  xfxawlib will enable the use of xwnmo (default) for Japanese 
  input.  Xaw will be able to handle Japanese by installing 
  xfxawlib.tgz.
  
  xaxaklib will enable the use of Japanese characters on 
  internationalized clients such as xcal-i18n through kinput2. 
  Xaw will be able to handle Japanese by installing xfxawlib.tgz.
  
  To summarize;
    - xaw* -> xwnmo version (default)
    - xak* -> kinput2 version
  You need to pick one and install it. However, by switching the
  shared library, you can go back and forth between xwnmo and 
  kinput2.

  "XFree86-j" is upward-compatible with the original XFree86. 
  Non-internationalized clients will run without problem. Moreover,
  the binaries might improve your X system, because XFree86-j 
  includes the latest patches. 
  
  However, please note that this package is NOT complete. It does
  not include the fonts and the manuals. You need to install it 
  over the original XFree86.
  
  Xsi version of XFree86 still hasn't gone through intensive
  tests. Thus, unknown problems might exist.


  E-13: iv disk set
  -----------------------
  
  This disk set contains the Japanese InterViews 3.1.  The shared 
  library version still has problems, so this set is based on the 
  static link version.

    ivdevel:   Japanese InterViews 3.1 Include files etc.
    ivlib1:    Japanese InterViews 3.1 Static Library
    ivlib2:    Japanese InterViews 3.1 Class Library
    ivman:     Japanese InterViews 3.1 manual
    ivprog:    Development tools for Japanese InterViews 3.1
    ivdemos:   Japanese InterViews 3.1 Demos
    doc:       WYSIWYG TeX, DTP Tools
    idraw:     Japanese InterViews 3.1 Draw tools
    ibuild:    Japanese InterViews/Unidraw 3.1 Interface Builder
    ibsample:  Samples for ibuild
        


  F. Future Plans
  ==============
  
  We plan to improve the following aspects of JE.

  1) More and better documentation:
  
      Works of JF (Japanese FAQ project: The Japanese version of
      Linux Documentation Project) members will be made available 
      in the doc disk set. 
      Translation of major HOWTOs, Japanese FAQs and others are on
      their way. (And of course, English documents, too..)


  2) More Software Packages:

      Various software packages will be included as they come.


  3) XFree86 with Ximp extensions:
 
     Some people prefer Ximp to Xsi, another implementation of 
    internationalized X.


  4) Migration to Other Platforms:
  
  
  5) Kernel Source Packages
  
     106-Keyboard support, spc drivers, etc.


  6)Evolution toward Multilingual Extensions:
  
   Give us your opinions! JE developers are not specialists in all 
   languages.


  JE was originally compiled as an extension of the SLS distribution 
  of Linux, but the developers are leaning heavily toward Slackware
  these days.



  G. JE Counter
  =============
  
  I am curious as to who uses JE for what, and who actually uses
  this English How-To. Japanese speakers/writers in Japan will obviously
  benefit from JE itself, but they won't need any English docs. So,
  who needs this English JE HOWTO?
  
  If you use JE, or even just brousing through this document, could
  you tell me where you are using/reading this, and what you are up
  to with JE? I won't set any formats, because honestly, I'm not sure
  what to expect. Please send your response to:
  
        Hiroo YAMAGATA     <hiyori13@interramp.com>

  I'll try to include the results in the future versions of this
  HOWTO. TNX!
  
  

  H.  Legalese and Miscellaneous
  ===============================
  
  Any trademark that appears in this document is owned by its owner.
  This document is freely distributable, though it is copyrighted 
  by the authors. There is no warranty on any information in this 
  document.  

  The authors express special thanks to the following people for 
  their dedicated help.

              Takashi MANABE <manaba@Roy.dsl.tutics.tut.ac.jp>
              Nozomi YTOW <nozomi@yacca.cc.tsukuba.ac.jp>
              Kuniko MIKI <kuniko@ori.u-tokyo.ac.jp>

  Comments, suggestions, cheers or just greetings to the authors are 
  quite welcome. They will be reached at the following addresses:

      Hironobu ABE       <hironobu@ap.isl.melco.co.jp>

      Yasu Hiro YAMAZAKI <hiro@ice3.ori.u-tokyo.ac.jp>
      2696 Bloor St. W., Apt B3, Toronto Ontario, Canada M8X 1A5
      
      Hiroo YAMAGATA     <hiyori13@interramp.com>

  
  Unless otherwise stated, Linux HOWTO documents are copyrighted by 
  their respective authors. Linux HOWTO documents may be reproduced 
  and distributed in whole or in part, in any medium physical or 
  electronic, as long as this copyright notice is retained on all 
  copies. Commercial redistribution is allowed and encouraged; 
  however, the author would like to be notified of any such 
  distributions.

  All translations, derivative works, or aggregate works 
  incorporating any Linux HOWTO documents must be covered under 
  this copyright notice. That is, you may not produce a derivative 
  work from a HOWTO and impose additional restrictions on its 
  distribution. Exceptions to these rules may be granted under 
  certain conditions; please contact the Linux HOWTO coordinator 
  at the address given below.

  In short, we wish to promote dissemination of this information 
  through as many channels as possible. However, we do wish to 
  retain copyright on the HOWTO documents, and would like to be 
  notified of any plans to redistribute the HOWTOs.

  If you have questions, please contact Matt Welsh, the Linux 
  Documentation Project coordinator, at mdw@sunsite.unc.edu. You 
  may finger this address for phone number and additional contact 
  information. 

  --------JE-HOWTO(April 20 1995)------JE-HOWTO(April 20 1995)--------
[ 6 January 1998
  The Linux JAZ-drive mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  JAZ-drive mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

  JAZ-drive mini-HOWTO
  Bob Willmot, bwillmot@cnct.com
  v1.6, 04 June 1997

	
  This HOWTO covers the configuration and use of the Iomega Jaz drive
  under Linux and software tools available for the drive.

  1.  Introduction

  The Iomega Jaz drive is a removable media disk drive whose disks
  have a capacity of 1021 megabytes. It is currently available in internal
  and external SCSI configurations.  Iomega plans to release an internal 
  IDE version.

  This document describes how to use the Jaz drive with Linux.  Since
  this is a SCSI device, it is important for you to read the Drew Eckhardt's
  SCSI HOWTO as well.  
  http://sunsite.unc.edu/pub/Linux/docs/HOWTO/SCSI-HOWTO

  I'd like to thank the following people for their contributions and info
  they've provived.

	* Grant Gunther, grant@torque.net
	* Tom Poindexter, tpoindex@nyx.net
	* Todd Woods, woods@cs.uiowa.edu
	* Richard B. Melrose, rbm@math.mit.edu
	* Phil Howard, phil@charon.milepost.com
        * Rick Niess, rniess@ocean.st.usm.edu

  If you have any comments/suggestions/corrections please send them to:
  Bob Willmot, bwillmot@cnct.com


  2.  The Jaz disks

  The Jaz disks (cartridges) resemble a stack of three 3.5" floppy disks
  that hold 1GB of data.  

  The drive has a motorized mechanism that can eject the disk via
  a pushbutton on the from of the drive or through software (see 
  below on info about the jaztools Linux software)


  2.1.  The Jaz Jet host adapter

  Iomega markets a SCSI host adapter under the name Jaz Jet.  

  Aparently there are currently two versions of this controller available,
  based on two difference SCSI chipsets.

  One is based on the Adaptec 7800 family of adapters, and is compatible
  with the 2930/2940 host adapters. Linux 2.0 supports this adapter with 
  the aic7xxx driver. (this driver was introduced in the 1.3.? version of 
  the kernel).

  The other adapter is based on the Advanced Systems chipset.  At boot time
  the board gives a message like
	Jaz Jet PCI SCSI adapter Copyright Advanced Systems 1996	
  Compile the kernel with the CONFIG_SCSI_ADVANSYS variable set. 


  3.  Configuring a kernel for the Jaz drive

  To use the Jaz drive with Linux, you must have a kernel configured
  for you SCSI adapter.

  Info on building the kernel can be found in the /usr/src/linux/README
  file, or in /usr/src/linux/Documentation/ directory for the 2.x kernels.

  Also check out Brian Ward's Kernel-HOWTO
  http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Kernel-HOWTO
  

  4.  Identifying the drive at boot time

  When your system boots it should display information about your adapter,
  and any disks that arre attaced to the drive.

  Boot messages will vary depending on your SCSI adapter and are logged
  to the /var/log/messages (or /var/adm/messages) file.  You can also
  'replay' these messages from the command prompt with the dmesg command.

  Here's the kernel booting output from a 2.0.10 kernel with an 
  Adaptec 2940 controller:

    aic7xxx: BurstLen = 8 DWDs, Latency Timer = 64 PCLKS
    aic7xxx: AHA-2940 Ultra Rev B.
    aic7xxx: devconfig = 0x580.
    aic7xxx: Reading SEEPROM...done.
    aic7xxx: Extended translation enabled.
    aic7xxx: Using 16 SCB's after checking for SCB memory.
    AHA-2940 Ultra (PCI-bus):
        irq 11
        bus release time 40 bclks
        data fifo threshold 100%
        SCSI CHANNEL A:
            scsi id 7
            scsi selection timeout 256 ms
            scsi bus reset at power-on enabled
            scsi bus parity enabled
            scsi bus termination (low byte) enabled
    aic7xxx: Downloading sequencer code...done.
    aic7xxx: Resetting the SCSI bus...done.
    scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 3.2/3.1/3.0
    scsi : 1 host.
    aic7xxx: Scanning channel A for devices.
    aic7xxx: Target 4, channel A, now synchronous at 10.0MHz, offset(0xf).
      Vendor: iomega    Model: jaz 1GB           Rev: G.60
      Type:   Direct-Access                      ANSI SCSI revision: 02
    Detected scsi removable disk sda at scsi0, channel 0, id 4, lun 0
    scsi : detected 1 SCSI disk total.
    SCSI device sda: hdwr sector= 512 bytes. Sectors= 2091050 [1021 MB] [1.0 GB]
    sda: Write Protect is off


  In the above log note the raw scsi device name (sda,sdb, etc).  
  You'll need to use this to access the disk later.

  If these lines do not appear, then something is misconfigured in your
  hardware or in the kernel.

  If the scsi0: line does not appear, then you have not configured your
  host adapter and its driver correctly.  Some drivers will give you a
  hint about what is wrong.   If your drive is not detected, you
  probably have a cable problem.  If a drive name is not assigned, you
  probably forgot to include SCSI disk support when you built the
  kernel.

  Check the README files in drivers/scsi and the SCSI HOWTO for other
  debugging hints.

  4.2.  Fdisk, mke2fs, mount, etc.

  Once you know the drive name for your Jaz drive, you are set.  You can
  manipulate the drive with the normal Linux disk management commands,
  fdisk, mke2fs, mount etc.  

  Refer to the manual pages for these programs.


  4.2.1.  An existing DOS formatted disk

  Disks factory formatted from Iomega are partitioned with a single 
  partition (for some unknown reason they use the 4th partition).

  You can mount this disk (assuming your jaz disk is the raw SCSI device
  sda) with the commands 

       mkdir /jaz
       mount -t msdos /dev/sda4 /jaz

  Or if you are using the 2.0 kernels and have compiled the kernel with
  support for the Win95 VFAT support you can mount it with

       mkdir /jaz
       mount -t vfat /dev/sda4 /jaz

  (this will allow you to read/write long filenames)

  Files from the disk will appear in /jaz. While the disk is
  mounted, you will not be able to eject it.

  To unmount the drive you can issue the command:

       umount /dev/sda4

  Once you've made the /jaz mount point - you don't need to do it again,
  (also make sure your not in the /jaz dir when you try to umount the 
  drive)


  4.2.2.  Re-format as a native Linux disk

  If you want to erase a Jaz disk and make a Linux native file system on
  it.  you should use fdisk on the entire disk:

       fdisk /dev/sda

  and delete any existing partitions (with the d command).  Then create
  a new partition with the n command, make it primary partition number
  1, use w to write the partition table to disk, and quit with q.

  Format the partition

       mke2fs /dev/sda1

  (The 1 is the number that you gave this partition in fdisk).  Now you
  can mount the disk:

       mount -t ext2 /dev/sda1 /jaz

  (re-using that mount point we created before).

  4.2.3.  The Jaz Tools disk

  There is some extra work to be done if you want to use the disk that
  comes with the Jaz drive.  As shipped, the software controlled write
  protection is enabled.  

  There are two options here: you can unlock the disk under DOS or
  Windows with the "reclaime.exe" program (or by installing the tools
  from the setup program) or you can unlock the disk with my jaztools
  program (see section 5) with the command 

	jaztool /dev/sda rw

  (adjust the /dev/sda to your appropriate SCSI device) and when prompted
  for the password enter

	APlaceForYourStuff

  5.  jaztools

  A native Linux program to support some of Iomega's special features 
  (including software controlled ejection and write protection)
  is available at 
	
	http://www.cnct.com/~bwillmot/jaztool/

  There should be a new version of jaztool available shortly that will
  contain a GUI interface and support drive scanning and automated
  mounting and unmounting of disks.


  6.  Frequently asked questions


  6.1.  I can only mount the Jaz tools disk read-only

  The tools disk is shipped in a special password-protected read-only 
  mode.  To unlock the disk run the "reclaim.exe" program under 
  DOS or Windows or use the native linix jaztools program (see section 5) 
  with the command 

	jaztool /dev/sda rw

  (adjust the /dev/sda to your appropriate SCSI device) and when prompted
  for the password enter

	APlaceForYourStuff
  

  6.2.  The Jaz locks my system after it spins down ?

  I have a feeling that this may be related to the Jaz firmware.  Anyone
  who has this problem, let me know what Revision your drive is.  To determine
  Jaz rev check the output of the /etc/dmesg program for some lines like:

    scsi0: Target 4, channel A, now synchronous at 10.0MHz, offset 15.
      Vendor: iomega    Model: jaz 1GB           Rev: G.60
      Type:   Direct-Access                      ANSI SCSI revision: 02
    
  This apparently happens only under one specific circumstance that the 
  average Linux user is unlikely to encounter.  When the Jaz drive has a 
  partition/filesystem mounted, the drive spins down with the filesystem 
  still mounted, and an attempt is made while the drive is still idle to 
  read from the block device.  It appers that Linux attempts to read the MBR
  again to restablish the partitions, but somehow this fails _sometimes_ and
  leaves the device in an apparently busy state.  Both the kernel read for 
  the MBR and the process device read will fail and this failure may be due 
  to a lockout or busy status.   In this state it thinks it is still reading 
  even though no I/O is pending or operating.  I've had this happen mostly when
  block device reading the MBR itself

  6.3.  Can I boot from the Jaz drive ?

  The Jaz drive can select any SCSI target ID from 0-6.

  If the Jaz drive co-exists with other SCSI harddrives, most BIOSes will
  want to boot the lowest SCSI id that is a disk.  Some detected and skip
  removeable devices like the Jaz.

  If the Jaz drive co-exists with IDE harddrives, nearly every BIOS will
  want to boot the first IDE harddrive.  Some BIOSes will allow removing
  the first IDE device from the configuration and will assign the first
  SCSI device as the boot device (Bios 0x80).  Others may require removing
  all IDE devices from configuration.  Still others may require detaching
  the IDE drives physically or disabling the IDE interface.

  6.4.  Why does Iomega use partition number 4 ?

  Partition 4 is the default partition used by Macintosh.  

  On a Mac, the first partition is reserved for boot info, the second for
  system info, the third is the resource fork, and the fourth is the data
  fork.

  Anyway, PCs and most other systems can deal with having to work on the 
  4th partition whereas the Mac can't deal with anything else.  Iomega 
  sends all their preformatted media with partition 4 used so that both 
  PC's and Macs can read them and everyone avoids a big compatibility
  headache. (PCs with mac-disk-reading software usually expect the data
  to be on partition 4)

  6.5.  How can I have the disk mounted at boot time ?

  All you need to do is to add a line to your /etc/fstab file.  For
  instance, if you will always have a DOS disk in the drive when you
  boot, you could put

       /dev/sda4   /jaz  msdos  defaults  0 0

  in the fstab.  Depending on your distribution, the initialization
  scripts might try to run fsck on partitions listed in your fstab.  Be
  aware that this could cause problems if you forget to put the disk in
  the drive when you boot, or have the wrong disk there.

  To eliminate these problems you can add a separate mount command in 
  /etc/rc.d/rc.local to mount the Jaz drive.  This will avoid problems 
  with the standard "mount -a" that takes place when there is no cartridge 
  in the drive.

  6.6.  What happens if there is no disk inserted when I boot ?

  The kernel will try to read the partition table, but the operation
  will (eventually) time out.

  When you change disks, it is a good idea always to use fsck to
  check the partition structure on the new disk.

  The BIOS on some SCSI host adapters will attempt to read the partition
  table on your disk during the system boot.  If you cannot disable this
  check, you may be forced always to boot with a disk in the drive.

  6.7.  How can I make my Jaz cartridge self-bootable (assuming my BIOS 
  is set up to allow it?)

  The Jaz drive/cartridge makes an excellent ERD (Emergency Repair Disk).
  It's also fun to be able to just pop in some new Linux system or to try
  Linux on someone else's Jaz-equipped machine.

  You could just follow the install procedure for your favorite distribution
  with the Jaz drive being the only drive on the system.

  However if you want to do an "install" from your running system, you can
  often succeed in "building" a self-bootable system on a Jaz cartridge.

  Step 1 - partition the drive and make the filesystems.  You probably
  need to have a swap partition, too, but if you have lots of RAM then maybe
  not.  Mount the new root as /jaz and any additional partitions within that
  directory as appropriate.

  Step 2 - copy all the files into place.  Be sure all the /dev files
  are copied.  Be sure all permissions, ownership and groupids are retained.

  Step 3 - modify the files on the Jaz cartridge to suit the circumstances
  of booting from it.  In particular be sure to change /jaz/etc/fstab to mount
  the Jaz cartridge partition(s) as appropriate.  Also change /jaz/etc/lilo.conf
  to match as well.

  Step 4  - there are two alternatives:

    A: make a kernel image floppy and use "rdev" to make it mount the Jaz
    cartridge as root.  Boot from the floppy when ready the first time
    then run lilo to make the Jaz MBR bootable.

    B: you can run lilo from your non-Jaz root running system to install the
    bootable MBR on the Jaz cartridge.  Add these lines (change "1" to your
    root partition number and "sda" to your Jaz device name as appropriate)
    to your /jaz/etc/lilo.conf file before the first system definition:

       drive = /dev/sda1
       bios = 0x80

  When you are all ready to install the Jaz MBR, you run lilo with the
  -r option to make it operate within the /jaz tree as if it is /.  The
  command looks like:

     lilo -r /jaz

  Normally lilo searches for what the bios device number of the boot
  device will be at boot time.  This needs to be overridden since the
  Jaz drive is not currently the bootable one.  The 2 added lines do
  this.

  There will be a number of error messages output by lilo and the kernel.
  Lilo is warning you there may be problems which will not be in this
  case.  The kernel reports problems related to /dev/hdc which are due
  to probes for devices that lilo is doing trying to discover some things.
  Lilo tries to make a device node for the old major/minor code for "hdc"
  and the kernel is recognizing the attempt as an error.  These messages
  can be ignored.  Watch the Jaz drive light to see it being written to.

  At this point your Jaz drive should be bootable.
  

  7.  Getting more current information

  The most up-to-date version of this mini-HOWTO can be found at:

       http://www.cnct.com/~bwillmot/jaztool/

  Iomega's web pages are at

       http://www.iomega.com/

[ 6 January 1998
  The Linux Linux+DOS+Win95 mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Linux+DOS+Win95 mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

The Linux Linux+DOS+Win95 mini-HOWTO
by Alan L. Wendt, alan@ez0.ezlink.com
v1.0, 10 September 1996

How To Boot Linux, DOS, and Windows 95 from one Hard Drive using Lilo.

The problem:

W95 and DOS get confused if more than one partition is marked active,
so it's necessary for the boot manager to activate their partition 
before booting them, and to unmark any others.  W95 and DOS also for
some reason relabel partitions on the booted device so that the OS
always appears to be located on drive C.  So for example, even if
you install DOS into partition E on your main drive, it will appear
as partition C when it's booted.

1.  Use Linux fdisk or Partition Magic to create three partitions on
    your drive.    Install W95 on one partition, DOS on one with
    (for example) format /s c:, and Linux on the third.  If you have
    only one (DOS) partition on your drive to start with, Partition
    Magic is the easy way to break it up into three.   FIPS does the
    same thing for free, but it's a little trickier to run.
    
2.  Get a copy of lilo.17.tar.gz, which as of August 1996 was the only
    revision with the ability to update the active flag at boot time.
    There's a copy at ftp://ftp.ezlink.com/pub/lilo.17.tar.gz.
    Compile and install it with REWRITE_TABLE defined in the Makefile.

Install something like the following in /etc/lilo.conf and run /sbin/lilo
to update the MBR record on your drive:


    boot = /dev/sda
    compact
    delay = 5		# optional, for systems that boot very quickly
    vga = normal	# force sane state
    ramdisk = 0		# paranoia setting
    root = current	# use "current" root

    image = /vmlinuz.1.3.97
      append = "aha1542=0x230 ro"
      label = linux

    other = /dev/sda1
      table = /dev/sda
      rewrite-table
      label = dos

    other = /dev/sda2
      table = /dev/sda
      rewrite-table
      label = w95

[ 15 January 1998
  The Linux Linux+OS2+DOS mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Linux+OS2+DOS mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

Linux + OS/2 (+ DOS) mini-HOWTO, version 0.2. May 20, 1996.
by Hamish Moffatt, moffatt@yallara.cs.rmit.edu.au.
Please send all corrections, suggestions, etc to this address.

Thanks go to Matthieu Willm <mwillm@vnet.ibm.com> for his post
on this subject in comp.os.linux.setup, which prompted me to
write this mini-HOWTO.

Table of Contents
0.  Legal things
1.  Introduction
2.  Before you read this document
3.  The actual installation
3.1   Some background
3.2   Install Linux
3.3   Install LILO
3.4   Add Linux to OS/2's Boot Manager menu
3.5   If you get LILO rather than OS/2 Boot Manager when you reboot
3.6   Advanced options
4.  If you've already installed Linux, but not OS/2 ...
4.1   Installing OS/2
4.2   Troubleshooting
5.  If you've already installed both Linux and OS/2 ...
5.1   If you can boot OS/2 but not Linux
5.2   If you can boot Linux but not OS/2
6.  Getting LILO to boot OS/2 ...
7.  The end.

0. Legal things

The instructions in this HOWTO will change the boot loader on your
computer. During the course of these instructions some mistakes
may make your system unable to boot either Linux or OS/2 or DOS,
or perhaps none of the above. Make sure you have your Linux boot
and root disks, your OS/2 Installation and Disk 1 diskettes,
and your DOS Setup disks if relevant handy before you begin.
The writer takes no responsibility for any damage incurred during
the process of these instructions; there is no warranty, guarantee
etc whatsoever.

1. Introduction

When I first got interested in Linux, in about August 95, I was told
that while it should be possible to have OS/2 Boot Manager and Linux
coexist, it "just didn't work." When I actually got around to installing
OS/2 and Linux together on a new PC, it turned out that it works perfectly
and isn't actually too hard. This mini-HOWTO should help you get these
two working together.

Note: in this document, I will describe how to have OS/2 Boot Manager
boot Linux (via LILO). There is a short section later on on having
LILO (Linux's loader and boot manager) boot OS/2.

2. Before you read this document

In this mini-HOWTO I assume you have already installed OS/2 (and also
DOS if you wish) on your system. If you've already installed Linux
but not OS/2, or both OS/2 and Linux, see section 4 or 5 respectively.

Note that you need to have OS/2 Boot Manager installed. If you have OS/2
and DOS on the same partition (and you switch between them with BOOT /DOS
and BOOT /OS2), then you're using Dual Boot, not Boot Manager. You need
to read the LILO documentation or mini-HOWTO on booting another (non-Linux)
operating system. This HOWTO is for Boot Manager only.

3. The actual installation
3.1 Some background

So, you have OS/2 and maybe DOS already installed. (In this HOWTO my
examples will have DOS also installed). Your partition table might
look something like this;

   Device Boot  Begin   Start     End  Blocks   Id  System
/dev/hda1           1       1     254  512032+   6  DOS 16-bit >=32M
/dev/hda2         256     256     786 1070496    5  Extended
/dev/hda3   *     255     255     255    2016    a  OS/2 Boot Manager
/dev/hda5   *     256     256     509  512032+   7  OS/2 HPFS
/dev/hda6   *     510     510     763  512032+  83  Linux native
/dev/hda7   *     764     764     786   46336+  82  Linux swap

Here hda1 contains DOS, hda3 is Boot Manager, hda5 is the OS/2 (boot)
partition, and hda6 is the Linux (boot) partition. If your OS/2 partition
is FAT rather than HPFS, that's fine -- these instructions apply just
the same. Also, while OS/2 Boot Manager must be on /dev/hda somewhere,
OS/2 and Linux could be on /dev/hdb, hdc, or hdd, etc. (OS/2 BootMan has
no problems booting OS/2 from a second disk, so it should have no problems
booting Linux from a second disk. I haven't been able to get DOS to boot
from a second disk, though.)

3.2 Install Linux

At this point, you should install Linux. You are best to create your
DOS and OS/2 (and extended, if necessary) partitions using OS/2's FDISK,
then creating your Linux partitions with Linux's fdisk. Some people have
reported that sometimes OS/2 thinks the partition table is corrupt and
won't let you add Linux to the Boot Manager menu later, so you might have
to try creating ALL your partitions with OS/2's FDISK, and using Linux's
fdisk later to change the partitions to the right types. See the fdisk
documentaton for further information on changing partition types.
(Thanks to bubeck@informatik.uni-tuebingen.de (Till Bubeck).)

Your distribution's installation program should ask you about installing
LILO; Slackware's does. You do want LILO installed (OS/2 Boot Manager cannot
boot Linux directly, since it's doesn't understand Linux's file system format.
Also, adding LILO gives you a chance to choose between different versions
of Linux, add boot parameters so Linux can find all your hardware, etc.)

3.3 Install LILO

Slackware will ask you WHERE you want to install LILO; the SuperBlock
(partition table, master boot record etc), the Linux partition's boot
sector, etc. The boot manager that lives in the SuperBlock is your master
boot manager - you want this to be OS/2's Boot Manager, so you need to install
LILO (Linux's boot manager) in the boot sector of your Linux partition.
In the partition table example above, this would be on /dev/hda6.
(NOT /dev/hda, which would be the master boot record, where OS/2 BootMan
lives.)

Finish your Linux installation. If the installation hasn't run it for you,
run /sbin/lilo. You MAY need to create your own /etc/lilo.conf, which is
the LILO configuration file; it tells LILO where it can find the Linux
kernel (the operating system itself) on your hard drive, etc. A very
simple one might be

  boot = /dev/hda6
  delay = 50
  vga = normal
  ramdisk = 0

  image = /vmlinuz
    root = /dev/hda6
    label = linux
    read-only

boot specifies the partition where LILO will install itself; this should be
/dev/hdax, not /dev/hda (or hdb, as appropriate).

3.4 Add Linux to OS/2's Boot Manager menu

Now you have Linux installed and ready to go, but after you reboot, you won't
be able to boot it. All that's left now is to tell OS/2 Boot Manager about it.
Reboot, and select OS/2 from the Boot Manager menu. (If you get a "LILO"
prompt instead of Boot Manager, read section 3.5 below).

Boot up OS/2, and run FDISK. Move to your Linux partition (listed as
"Type 83" -- OS/2 doesn't seem to know Linux's partition types). Press Enter,
and from the menu select "Add to Boot Manager menu." Enter an appropriate
name (eg Linux), then press F3, save and exit. 

When you reboot, your OS/2 Boot Manager menu should include Linux. When you
select it, you should see "LILO " for about five seconds, then Linux should
boot. If it does, you're all finished. Enjoy!

3.5 If you get LILO rather than OS/2 Boot Manager when you reboot

If when you reboot, you get "LILO ", rather than OS/2 Boot Manager, then
you've installed LILO in the superblock (/dev/hda), rather than on a
partition (/dev/hda6 or whatever). To fix this isn't too hard, luckily.
Boot up your OS/2 Installation floppy, and exit to the command prompt.
Run FDISK, then save and exit. Boot Manager should be back when you reboot.
However, now you can't boot Linux again. Get out your Linux boot and root
disks, and mount your Linux partition. You can either boot completely from
diskettes, then type

  mount /dev/hda6 /mnt

once you can log in, or (depending on your distribution), you can mount
your hard drive instead of the root floppy. On Slackware, you can do this
by typing

  mount root=/dev/hda6

at the LILO prompt you get as soon as you've booted the boot disk.

Now, edit your LILO config (either /mnt/etc/lilo.conf or /etc/lilo.conf,
depending on which of the above methods you used), and change the
"boot = " line to say /dev/hda6 (or whatever) instead of /dev/hda.
Then run

  /mnt/sbin/lilo -C /mnt/etc/lilo.conf

or

  /sbin/lilo

depending on which method you used before. Reboot again, and OS/2 Boot
Manager should be back. See section 3.4 on adding Linux to the OS/2
Boot Manager menu.

3.6 Advanced options

If you want to save a few seconds during booting, you can get "delay = 0"
instead of 50 in your /etc/lilo.conf. Using the delay gives you a chance
to boot another operating system, but you're using OS/2 Boot Manager for that,
so you may not need it. (However, LILO also gives you the chance to boot
different Linux kernel versions, and you may want that).

Actually, if you press shift immediately after you select Linux from the
Boot Manager menu, you get the "LILO: " prompt anyway. LILO loads very
quickly though, so this can be harder than it sounds.


4. If you've already installed Linux, but not OS/2 ...
4.1 Installing OS/2

You have Linux installed, and when you boot your PC you get the LILO
prompt. You want to install OS/2. This might actually be easier than installing
OS/2 before Linux, actually.

Boot Linux, and edit your /etc/lilo.conf file. Change the "boot = " line to
the name of your linux partition, eg /dev/hda6, instead of the name of
your boot drive, eg /dev/hda. Then run /sbin/lilo to install LILO again.
This will install LILO in the boot sector of your Linux partition, so that
OS/2 can boot it later.

Now, install OS/2. When you create your OS/2 partitions in OS/2's FDISK,
*do* install Boot Manager, and make sure you add your OS/2 (and DOS)
partition to it. Also, add your Linux ("Type 83" in OS/2 FDISK) partition
to the menu too. (Press Enter on the Linux partition, and select
"Add to Boot Manager menu", and enter a suitable description). You should
now be all set to boot Linux and OS/2 from the Boot Manager menu.

4.2 Troubleshooting

If, when you select Linux from the Boot Manager menu, you get Missing
Operating System, Non-system disk or disk error, etc, then you didn't
get LILO installed properly in your Linux partition's boot sector.
Use your Linux boot (and maybe also root) disk to edit your lilo.conf
file again as in section 4.1, and make sure you run /sbin/lilo.
(Section 3.5 gives some information on how you can boot Linux from
floppies and get access to your Linux partition on hard drive).

If you get LILO when you reboot, instead of OS/2 Boot Manager, then
BootMan wasn't installed properly. Boot the OS/2 Installation disks
again, quit to the command prompt (F3), and run FDISK. Make sure
Boot Manager is installed, and that the BootMan partition is marked
Bootable.

5. You've already installed both OS/2 and Linux ...

Both LILO (Linux's boot manager and loader) and OS/2 BootMan like to
be the master boot manager on your system. If you've already installed
both of these using default options, then you probably can't boot
one of these two at the moment (the one you installed first won't
be bootable).

OS/2 BootMan HAS to be the master boot manager, but LILO can be moved
so it only boots Linux. 

5.1 If you can boot OS/2 but not Linux

You need to boot Linux (using your boot and root floppies if need be;
see section 3.5 on how to get to your Linux hard disk partition from
the boot/root disks).

Edit your /etc/lilo.conf and change "boot = " to the name of your Linux
partition (eg /dev/hda6) rather than your boot drive (eg /dev/hda).
Run /sbin/lilo. (Section 3.5 gives more details about getting to
these files).

Now, boot OS/2 and run FDISK. Select your Linux partition ("Type 83"),
and select "Add to Boot Manager menu" from the pop-up menu. You should
now be all set.

If you reboot and Linux still isn't listed, check that you added it
properly in the last step. If Linux is listed but you get missing system
or non-system disk errors when you select it, you might not have
got LILO installed correctly in the first part of 5.1.

5.2 If you can boot Linux but not OS/2

See the instructions in 5.1. To boot Linux, just boot from your hard
drive as normal; to boot OS/2, use the Installation diskette, and
exit to the command prompt (F3) to run FDISK.


6. Getting LILO to boot OS/2 ...

Theoretically, LILO could boot OS/2; that is, at the LILO prompt you
could hit Shift and enter OS2 or whatever. I have tried this, and it
didn't work. However, my OS/2 is on /dev/hdb6, which may complicate
things.

In /etc/lilo.conf, you need to add

  other = /dev/hda5
    label = os2

(if your OS/2 partition is /dev/hda5). You should also add

    table = /dev/hda

(or hdb) so that Linux can check for the partition, but I got
missing partition errors when running /sbin/lilo.

If your OS/2 is on your second hard drive, you also need to add

    loader = /boot/os2_d.b

else /sbin/lilo won't run successfully (it requires a special loader
to boot OS/2 from a second hard drive, and os2_d.b is it).

If you've been able to get this working, please let me know.


7. The end.

Please send your comments, suggestions, questions (as a last resort, please)
to me at

  moffatt@yallara.cs.rmit.edu.au

The latest version of this mini-HOWTO should be at

  http://yallara.cs.rmit.edu.au/~moffatt/linux-os2/

[ 06 August 1997
  The Linux Linux+WinNT mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Linux+WinNT mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

The Linux+WindowsNT mini-HOWTO
by Bill Wohler, wohler@newt.com
v1.1, 19 February 1997

  "You hear maniacal laughter..."
  
  Due to hardware or software problems or user headroom, I pulled my
  hair out for several days trying to get both NT and Linux happily
  settled on my new HP Vectra PC at work.

  Under no circumstances run the Disk Administrator from NT 3.51 to
  format partitions.  It asks if it can write a signature "which will
  cause absolutely no harm."  When it did this, it hosed my partition
  table until fixed by steps 3 and 7 below.  Because of these
  problems, I was limited to one FAT NT partition.  Also remember that
  even if you do get the Disk Administrator to work, you'll want at
  least one small FAT partition to use as a staging area for
  exchanging files between Linux and NT until Linux has an NTFS
  filesystem.

  I installed Linux first and then NT, but based on my experience, I
  might now be able to install NT first and then Linux.

  Note that step 6 is pertinent only to the following setup: Debian
  Linux 1.1, Linux 2.0.0, HP Vectra XU 6/150, Adaptec AIC 7880 Ultra
  (BIOS 1.2S-HP), Quantum Fireball 1080S, Phoenix compatibility BIOS
  GG.06.02.  NT 3.51.  The examples show a SCSI disk (/dev/sda);
  substitute /dev/hda for your IDE drives.

  
  1. Install a minimal Linux (hold off on installing the rest until
  you win the Linux/NT battle).  Do all your disk partitioning in
  Linux, including your NT partition (make it FAT).  I was not
  successful at making more than one NT partition.  I also made it the
  first partition, but I don't know if that is essential or not.
  
  2. Edit /etc/lilo.conf and use boot=/dev/sda (I was not successful
  at installing LILO on the Linux partition--/dev/sda3 in my case) and
  run "lilo".  You'll have to use the editor ae.  You'll live.

  3. Save the MBR with this: dd if=/dev/sda of=/dev/fd0 bs=512 count=1
  Use a floppy.  Trust me.  Also do this each time you change the disk
  partition table.

  4. Install NT, part 1.  When it goes to reboot halfway through the
  process you'll boot into Linux.
  
  5. Add NT stanza to /etc/lilo.conf, e.g.:
  
	other=/dev/sda1
	label=NT
	table=/dev/sda

  and run lilo.  If lilo complains about this (I forget the message),
  add the "linear" flag to /etc/lilo.conf near the "compact" keyword.
  Furthermore, if your partition table is screwed up by NT you'll
  either need to use "ignore-table" or follow the directions in Step 7.
  See also "fix-table".  The LILO HOWTO is your friend.
  
  6. Reboot, select NT from LILO, and finish NT install.  You'll need
  the "Boot Disk XU, HP Vectra AIC 7880 Driver A.01.02" floppy to
  install the ethernet drivers and the "XU/VT Drivers and
  Documentation" CD (directory video/disk4 if I recall correctly) to
  install the video drivers for the Matrox MGA Millennium.
  
  7. Back to Linux, run fdisk and ensure you don't get "partition
  doesn't end on cylinder boundary" on your Linux partitions.  You'll
  still have this error on the NT partition though, but this seems to
  be OK.
  
/dev/sda1            1        1      322   329301    6  DOS 16-bit >=32M
Partition 1 does not end on cylinder boundary:
     phys=(321, 39, 9) should be (321, 63, 32)

  Cfdisk reports strangeness, but it seems OK:

                                          Unusable                      0.04*
 /dev/sda1                 Primary        DOS 16-bit >=32Mb           321.59*
                                          Unusable                      0.39*

  If you do get the cylinder boundary warning on your Linux
  partitions, it is sufficient to use cfdisk to do something innocuous
  like changing the boot sector.
  
  If, however, NT has really screwed you over and cfdisk can't even
  run, complaining that it cannot open /dev/sda, then you'll need to
  take more extreme action.  You'll need that MBR you saved
  previously.  Clear and restore the MBR (but not the signature) with:

	  dd if=/dev/zero of=/dev/sda bs=512 count=1
	  dd if=/dev/fd0 of=/dev/sda bs=510 count=1

  8.  Install the rest of Linux.  Easy, huh?

  If you prefer to have NT write the MBR instead of LILO, you may have
  to resort to the following to clear the MBR first:
  
  a) dd if=/dev/zero of=/dev/sda bs=446 count=1 (in Linux) or perform
     a low-level format with the SCSI utilities.  I've heard that a
     low-level format of an IDE disk is fatal, so don't do it.
  b) fdisk /mbr (you've obviously already created a DOS boot disk that
     contains fdisk).
  c) delete NT partition and create it again in NT install.
  d) continue with NT install.

  Epilogue: After first posting this message, I heard from several
  folks that they had no problems with NT's Disk Administrator, and
  were able to install either NT or Linux first without any problems.
  Hopefully, you'll be in this camp, but if not, perhaps this campfire
  story will be of some use.

  Since the first edition of this mini-HOWTO, others have written
  similar documents as well.  Please be sure to consult them.  If your
  experience differs from any presented, then you should submit your
  own mini-HOWTO or submit a revised version of this document to the
  HOWTO maintainer (reference this sentence) and send a carbon copy to
  me as I don't have the time to maintain this document.  Someone
  should eventually combine all of these documents into a single
  coherent HOWTO.

  Finally, I'm afraid this document details all I know about this
  subject.  I should point you to an appropriate Linux newsgroup for
  further information.  I use NT about one day a year.  Under duress.

[ 6 January 1998
  The Linux MIDI+SB mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  MIDI+SB mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

MIDI Keyboard on Sound Blaster HOWTO 1.0

1. Copyright
2. Introduction
3. Requirements
4. Adding supports of your kernel
5. Installing software

1. Copyright
This document is written by Hideki Saito.  Reposting is
allowed, but please do not modify this.  Please ask before
publishing this document.

You can contact me via E-mail at hideki@eskimo.com

2. Introduction
Some people may wonder how to use a MIDI keyboard with Sound Blaster.  
Actually, this is not as easy as just connecting the MIDI keyboard to a 
15-pin MIDI in-out port (the Sound Blaster MIDI in-out port often works 
as a joystick port.)

3. Requirements
Of course you need a MIDI keyboard.  Please take a little time to check 
to see if you have a MIDI in-out port on the back of your sound card.  If 
you see a port that has 15 little holes, you have a MIDI in-out port. 
Some of the Sound Blaster clones may not have a MIDI in-out port.  In
This case, you may want to consider buying a new sound card, or MIDI 
interface card.  You can adopt things in this document if the MIDI 
interface card that you are planning to buy, other-wise this document 
will not help, since it is out of your range.  You will need am 
SB-to-MIDI cable (this will cost about $15-$40, depending on length, and  
quality of the cable).  Remember to connect one end of the MIDI out cable 
into the MIDI-in port on your MIDI keyboard, and other end of the MIDI-in 
cable into the MIDI out port on your MIDI keyboard.  Connect other side 
of keyboard into the 15-pin MIDI in-out board on your sound card.  After 
that, you need to check if your joystick/MIDI is enabled, other-wise this 
will not work.  There are two types of sound cards.  If your sound card 
uses hardware configuration, you need to open your computer and change 
the switchs (this maybe jumpers) to enable.  If you have a sound card 
that is software configurable, you can run a program to change it.  You 
might need to boot DOS if your configure program is on DOS.

4. Adding supports of your kernel
Of course your kernel must support sounds.  Have your sound card manual 
and check each configuration.  Then run a kernel configuring program. You 
need Sound Blaster support (this varies, but most Sound Blaster clones 
will work fine with this setting).  According to my settings, you need to add
MPU-401 support, and MIDI interface support in addition. Make sure 
addresses are correct, otherwise there will be conflicts.  Read your 
manual and check each base address,IRQ (on many sound cards, the default is 330, IRQ 7).  Make
sure that you set so both two MPU-401 I/O correctly (those numbers must 
be same).  Menu configuration of the kernel would help this.  After you 
configured them, you need to rebuild the kernel and image.

5. Installing software
After this, you can install your favorite MIDI sequencing programs.  I 
will not discuss them in here.  If you have no ideas, use the program 
JAZZ!, which is an excellent MIDI sequencing program.  You can find it at 
SunSite and a lot of other sites.  Also installing PlayMidi is 
recommended. After all, everything should work fine.

[ 6 January 1998
  The Linux Online Support mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Online Support mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

                  THE LISC ONLINE LINUX SUPPORT MINI HOW-TO
                  -----------------------------------------

                 Or, "Friendly Help With Linux Questions" :)



This updated Mini-How-To briefly describes LISC, the Linux Internet Support
Cooperative.  We've changed our location yet again.  We are currently
available on our own little IRC network, currently comprising just one
server.  The server hostname is ``irc.linpeople.org''.  This will probably
be our final change for the forseeable future, at least until we replace IRC
with some other, more flexible conversation protocol.

Future editions will be posted on comp.os.linux.answers and in all of the
usual ftp locations.  For additional information, check with me via email,
``lilo <TaRDiS@Mail.UTexas.EDU>''.  But the best way to locate me is to find
me online.  ;)



1.    What is LISC?

LISC, the Linux Internet Support Cooperative, is an informal group which
provides friendly online support and problem assistance, for new and
experienced Linux users, using Internet Relay Chat (IRC).  We can be found
on the #LinPeople IRC channel, on server ``irc.linpeople.org''.


1.1.  Who runs LISC?

To the extent that anyone "runs" LISC, I guess that's me, lilo.  :)  I
coordinate the automation which maintains the #LinPeople channel's
facilities and irc.linpeople.org's server facilities.  Those facilities are
provided through the gracious assistance of several Internet system
administrators.


1.2.  Why LISC and #LinPeople?

LISC was started over a year ago, to fill a need which seems to go unmet
on the existing Linux IRC networks and channels.  It seems that channel
operators are often more interested in using their KICK and BAN privileges
than actually helping people (particularly newbies) with their Linux
problems.

#LinPeople is a relaxed environment where newbies, experienced users and
developers can all discuss topics relating to Linux.  We rarely have or need
human channel operators, and we will help whenever we can with your Linux
problems.

Many users, particularly those new to Unix-like systems, seem to respond
best to patient, interactive support.  So, while we consider it part of our
job to point out available documentation, such phrases as "Read the F***ing
Manual!" are not in our vocabulary. :)


1.3.    Do you need volunteers?

We welcome volunteers.  Since we're open 24 hours a day, 7 days a week,
including holidays, any time you are willing to contribute will be greatly
appreciated.  And, you'll have the satisfaction of knowing that you are
helping to expand the Linux user base, by reducing the frustration level of
people who are learning to use the system.  :)

Anyone who is interested in helping users with Linux-related problems, and
feels competent to do so, is welcome to try their hand, whenever they are
available.  We're not setting up fixed support schedules.  We ask only that
you treat our users with respect, and try not to respond to questions from
newbies if you're not in a patient mood.  :)


1.4.  Is LISC affiliated with LinuxNet?

No, we're not.  We are presently found exclusively on our own IRC server
net, a modified form of the Undernet/DALnet code.  This code has been
developed over the course of a few years and seems pretty reliable.  It
contains several features which contribute to the reliable maintenance of
our channel.  LinuxNet does not run servers with those features.


2.    How do I access #LinPeople?

To access #LinPeople, we recommend you use ircII.  There are other IRC
client programs available for WINDOWS, X, VMS and the various Internet-
connected systems, too diverse to describe in detail here, but ircII is the
canonical IRC client program.

For information on using ircII, check the /help command which comes with
ircII, as well as the documentation which comes with the client source code
on cs-ftp.bu.edu:/irc/clients.  Once you get onto our server, someone on
#LinPeople should be able to help answer your questions.  The next section
briefly describes how to start up ircII.

If you wish to install ircII on your own system, we recommend obtaining
version 2.6, along with its help files, from cs-ftp.bu.edu:/irc/clients.  Do
not fail to run the configuration script provided in the base source
directory, before attempting to 'make' the program.  It will save you lots
of grief.  :)

In addition, a series of script hacks to take advantage of certain server
features, such as longer nicknames, are available.  Check http://www.dal.net
for more details.


2.1.   Can you quickly describe how to start up ircII?

On most Unix_type systems, you'll use the command name 'ircII' or 'irc'. The
format is:

               <irc-command> <irc-nickname> irc.linpeople.org

For example, the following command might be used to enter an IRC session
using IRC nickname 'BigFred', on a system where the IRC command is 'ircII':

                  ircII BigFred irc.linpeople.org

We hope to see you soon, on #LinPeople!  :)


2.2.   When is #LinPeople available?

#LinPeople is open 24 hours, 7 days a week, including most holidays.  We
aren't staffed as well as we'd like at certain time periods (see
"Volunteers," above), but we'll try to help any time you have a question or
a problem.


2.3.   How do I ask questions?

When you enter the channel, first check to see if a conversation is going
on.  If so, describe your problem briefly and wait for a response.  Be
patient.  If you're a newbie, be aware that some answers will be long, and
listen patiently.  Ask questions about things you don't understand.  :)

If no one is talking when you enter the channel, jump right in.  But,
remember that even if there are people on the channel, they may not be awake
or at their terminals.  People often idle on IRC channels, so that people
can read their '/away' messages, or to await messages from specific users. 
If you don't get an immediate response, wait a few minutes and try again.

And, remember we're all volunteers; we have jobs and schoolwork when we're
not answering questions.  Don't beep--that disrupts the work environment and
people tend to be a little sensitive about it. When someone comes back from
idling, they'll usually send a public message to let you know.

We hope to see you soon, on #LinPeople! :)
 
(2.01 Tue May 7 17:41:58 UTC 1996)

[ 30 July 1997
  The Linux PPP-over-ISDN mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  PPP-over-ISDN mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

Date: Sat, 13 Apr 1996 20:15:17 -0700 (PDT)
From: Nobody <rmarc@netcom.com>
Subject: Serial ISDN using MLPPP

R Marc Phillips | Need and be abandoned.
rmarc@netcom.com| Hope and be denied.
Semi-Psychotic  | Love and be destroyed.
Mostly Confused | -me

This is a basic guide to using ppp over an external ISDN device.  As of
yet there are no drivers that I know of for ISDN cards readily available
in the USA.  This is a guide to ISDN over a serial port.

The first thing you'll need is PPP compiled on your linux system.  With 
most releases of Linux Slackware, it is an option on recompiling and 
sometimes installing.  If you don't have it you can get the latest BETA from:

ftp.funet.fi:/pub/Linux/BETA/ppp/ppp-2.2

Note that this is for later kernels (1.3.8x and above) for earlier kernels
you may want to look for ppp2.2.0d or e.  A search on www.yahoo.com for ppp
should yield something.

Once you have that installed and functional (you can usual see if it's 
functional, if you're not sure, by just typing pppd at a prompt. You'll 
then see a bunch of garbage start scrolling across your screen.  This 
means you have it installed.  It'll time out in a minute or two or you 
can go to another virtual terminal and kill the process.).

Now you'll want to make a pap-secrets file.  This is a file that simply 
contains you username and password.  PAP stands for Password 
Authentication Protocol which is a function of PPP and a required 
component of MultilinkPPP as defined in the RFC documentation on 
Multilink protocols:

http://www.cis.ohio-state.edu/htbin/rfc/rfc1356.html

I'd advise that you put this file in /etc/ppp and call it something like 
pap or pap-secrets.  What you name it really doesn't matter.  The file 
should have two lines in it.  The first line containing your username 
and the second containing your password.

Once you've done that, you can try out a PPP connection.  The easiest way 
would be to make a file called "pppfix" or something (again, it can be 
called whatever you want).  Here is an example:

#!/bin/sh
pppd modem crtscts defaultroute +ua [path to pap file] connect 'chat \
ABORT BUSY ABORT ERROR "" AT[init string] OK ATD[ISP's Phone #] CONNECT' \
[your comm port] 115200

There are two parts to this, the pppd component and the chat component.

I've put anything that you need to decide upon in square brackets.  You 
need to replace those with the appropriate information.  Say you made a 
file in your /etc/ppp directory called "pap" that contains your username 
and password.  You'd put in /etc/ppp/pap replacing "[path to pap file]."
For "[init string]" you'll want to put in the appropriate string for 
MultilinkPPP (this will work equally as well for a modem, so if you want 
to use your modem put in a string for it).  You can look in your manual 
to find the appropriate string.  I'll give a few:

For a 3com impact put in: s71=1s80=1&d2
For a Bitsurfer put in: %a2=92@b0=2&d2
For a Bitsurfer Pro: %a2=92@b0=2@m2=p&d2
For an Adtran ISU express: s54=12&d2

Add whatever else you would normally for your box, but these are what is 
necessary for MultilinkPPP plus the &d2 which will insure that your box 
will hang up when you disconnect.  Some TA's have a hard time hanging up
without that &d2 (especially the Bitsurfer and Bitsurfer pro)

After the ATD you put in your ISP's ISDN phone number in replace of 
"[ISP's Phone #]." (note that with the Bitsurfer and Bitsurfer pro it is 
necessary to tell the TA to dial the same number twice seperated by an "&."
It is not necessary to put in an escape character).

Where you see "[your comm port]" you'll need to replace that with the 
appropriate comm port. In most cases that will be /dev/cuaX where the X 
is a number between 0 and 3.  0 being comm1 and 3 being comm4.

Now make the file executable by typing "chmod 755 <filename>" or 
whatever you'd like the permissions to be (700 if you only want root to 
have rights to it).  You'll want to also make sure that your pap file 
is readible to whomever is running the pppd process so that it'll log in. To 
run it you'd simply type the name of the file.

When you run this it should connect and then you can type "ifconfig" at 
your prompt.  You should see that you have an "inet addr"  under "Link 
encap: Point-Point Protocol" like so:

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:2000  Metric:1
          RX packets:132 errors:0 dropped:0 overruns:0
          TX packets:132 errors:0 dropped:0 overruns:0

ppp0      Link encap:Point-Point Protocol  
          inet addr:204.31.114.199  P-t-P:163.179.20.26  Mask:255.255.255.0
          UP POINTOPOINT RUNNING  MTU:1500  Metric:1
          RX packets:47 errors:0 dropped:0 overruns:0
          TX packets:62 errors:0 dropped:0 overruns:0

To hang up, kill the process.  If you don't know how to do that type "man 
ps" and then "man kill" and read.

Here's an example:

kill `ps -x | grep pppd | head -1 | cut -c2-5`

You should then write scripts to manage your ppp connections.

This is only one way to do it, there are others.  You can download some 
scripts for this from the following ftp site:

ftp.netcom.com/ftp/pub/rm/rmarc/lnxstuff.zip

There's a readme file with it.  I didn't write these scripts and they are 
not the ones I use.  They are nice for a beginner and do not use PAP so 
you'll have to modify them if you want to do MultilinkPPP.


Have fun.

[ 1 March 1998
  The Linux PLIP mini-HOWTO is being converted to HTML or SGML,
  and will rejoin the mini-HOWTO collection as soon as this is done. ]
  -- Tim Bynum <tjbynum@metalab.unc.edu> ]

PPP-over-minicom mini-HOWTO                  Winfried Trmper <winni@xpilot.org>
---------------------------                  v0.0  09 December 1996

You want a menu-driven tool for dealing with PPP? An easy but powerful
database with telephone numbers of your ISP? Want to see what happens
when logging in? Then this mini-HOWTO is for you!


  1. Introduction

        PPP has become the standard network protocol for hooking up
        to the internet via dial-in connections. The associated
        daemon "pppd" ships with a very primitive tool for dialing
        which handles only very simple setups well.
        I will describe an alternate solution on the basis of "minicom".

        This document is a short version of the German "Internetanbindung
        mit PPP" ("http://www.uni-koeln.de/themen/linux/ppp/")


  1.1. The terminal program "minicom"

        "minicom" is a very sophisticated tool for dialing into
        other computers (ISPs or BBSs). It has a fancy colored menu,
        a telephone database and a powerful scripting language. Thus
        it is ideally suited for use in conjunction with "pppd".

        BTW, if you run "/sbin/mgetty /dev/modem" everyone with a
        valid account on your machine can dial in (e.g. using
        "minicom"). But thats another story. Please see the docs of
        "mgetty" for details.


  1.2. Feedback

        I'm only interested in feedback that improves this mini-HOWTO.
        I won't answer general questions about Linux, PPP, SLIP or
        networking.


  1.3. Known bugs

        At the time of writing, there seem to be some bugs in
        "minicom", "runscript" and the method described below:

              - "runscript" does not wait for external programs to
                finish 

                        print "blah"
                        ! sleep 10
                        print "blup"

                This script exits immediatly (but not when straced
                ...)

              - "pppd" takes the serial device away from minicom
                (when not fed via stdin)


        It seems that Miquel van Smoorenburg (the author of minicom)
        is too busy to get his fingers on the above. So volunteers
        are welcome.



  2.0. Dialing with minicom

        Many guides on PPP recommend to leave minicom after it's been
        used for dialing. But there is really no need to leave this
        comfortable program ...


  2.1. Configure minicom

        Execute "minicom -s" and choose the menu item "Serial port
        setup". The first entry should be "Serial Device" this is
        the most important setting: the serial device your
        modem is attached to. (Any volunteers to mess up minicom to
        handle several serial devices at once?)
        Press <return> to confirm and <esc> to exit to the initial
        setup menu. Choose "Exit to minicom" and type "atdt99999".
        Your modem should start to dial immediatly and you should
        hear a click when the modem hooks up to the line. Of course
        "99999" is no valid telephone number.


  2.2. Starting PPP manually

        Maybe you've already tried to dial the telephone number of
        your ISP instead of "99999". Did you see funny characters
        on the screen after login in (if not, type "ppp")? They
        result from the "pppd" (or equivalent) started at the other
        end of the line. If so you can try to start the
        "pppd"-daemon on your side and evaluate the log-files
        afterwards.

        To start "pppd" inside minicom, you can define a new
        upload method (figure out yourself) or re-define the
        setting "kermit programm" from the configuration menu
        "Filename and paths":

                A - Download directory :
                B -   Upload directory :
                C -   Script directory :
                D -     Script program : /usr/bin/runscript
                E -     Kermit program : /usr/sbin/pppd file /etc/ppp/mini_options

        Now if you see those funny characters next time you dial
        to your ISP you can press <Alt-K> to start "pppd".

        The rest of this mini-HOWTO deals with automating the task
        of logging in and starting "pppd".


  2.3. Evaluating logfiles

        Although I do not want to explain how PPP is to be configured,
        I give a short tip how to read the log-file. To extract the
        essential information from the logfile "/var/log/debug" (or
        alternative "/var/log/daemon.log") execute the commands

                tail -n 40  /var/log/debug |\
                        grep -E " pppd\[[0-9]*\]:" |\
                        sed -e "s/^.*pppd\[/[/" 

        You should see messages like

                sent [LCP ConfReq id=0x1 <mru 296>]
                rcvd [LCP ConfRej id=0x1 <mru 296>]

        which indicate that we sent a config-request to set the maximum
        recieve unit (mru) to 296. The other side refects this setting
        ("configuration rejected"). In this case I just removed the
        option "mru" from "/etc/ppp/options" (see below).


  2.4. Configure a telephone number

        If the above was successful you may want to store a telephone
        number in minicoms database. Press <Alt-D> to pop up the
        dialing menu and use the cursor keys to select "Edit":

                A -  Name                : Xeno
                B -  Number              : 022039697303
                C -  Dial string #       : 1
                D -  Local echo          : No
                E -  Script              : /etc/ppp/login.script
                F -  Username            : ppp-382
                G -  Password            : top-secret
                H -  Terminal Emulation  : VT102
                I -  Backspace key sends : Delete
                J -  Linewrap            : Off
                K -  Line Settings       : Curr 8N1

        This is a sample entry to dial to one of my ISPs. The script
        "/etc/ppp/login.script" is shown below. Two special variables
        are passed to this script: $(LOGIN) and $(PASS) which are
        set to the values submitted as username (F) and password (G).
        This feature makes minicom somewhat flexible because you
        need only one script to automate your login to several ISPs.


  2.5. A login script

        "minicom" starts the login-script after it recieves the string
        "CONNECT". To be precise, "minicom" does not execute the script
        itself but calls the utility "runscript" as a sub-process for that.

        Below is a example I use for my ISPs.

                # v1.0, 20.08.96 Winfried Trmper <winni@xpilot.org>
                print ""
                print "Automatic login via /etc/ppp/login.script"
        
                ## uncomment if you need to press enter to get the prompt
                #send ""
        
                expect {
                        "ogin:"
                        "ogin>"
                        "sername:"
                        "sername>"
                        "NO CARRIER" exit 1
                }
                send "$(LOGIN)"
                expect {
                        "assword:"
                        "assword>"
                        timeout 20
                }
                send "$(PASS)"
                expect {
                        "port"  send "ppp"
                        "Start your PPP now"
                        "}!}!}"
                        timeout 10
                }
                print ""
                print "Now switching into ppp-mode ..."
                print ""

                ! /usr/sbin/pppd  file /etc/ppp/mini_options

                print ""
                print "the command   killall -TERM pppd   terminates pppd"


        The ability of "runscript" to call external programs is used
        to start "pppd". Copy your original options-file for ppp
        to "/etc/ppp/options.ttyS1"  (where you have to replace "ttyS1"
        with the device your modem is attached to) and delete  all
        lines from /etc/ppp/options that are specific to your modem
        (like "connect", "crtscts" or "modem").
        Put the options that should be specific to the ppp-connection
        via minicom in "/etc/ppp/mini_options". One of these options
        should be

                disconnect "chat '' '\d\d+++\d\dATH\r\c'"

        This is a must because "pppd" is fed via stdin and can't hang
        up the modem via "crtscts".


  2.6. Automated dialing on startup

        Use the option "-d" to dial a certain telephone number on
        startup of minicom.
        You may also try

                open -sl -- minicom -d 1

        To throw minicom at another console (see the Consoles-Many
        mini-HOWTO for details).


  2.7. Future extensions

        Because "pppd" is a daemon it is not designed for
        user-interaction or observation. Thats ok. After all, we're
        using a unix-like os ...

        The canonical solution is a backend. Any volunteers to hack
        up minicom?
        Fancy extensions would be:

              - automatic generation of the login-script by watching
                the user dialing in manually

              - automatic evalutaion of the log-files with
                correction of options

              - extraction of messages like shown in 2.3.


End of the PPP-via-minicom mini-HOWTO

[ 15 January 1998
  The Linux Pager mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Pager mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

Originally Drafted: Sun Jun 23 17:55:14 MDT 1996
Revised:  29 August 1997 

	                          The

              Linux Alphanumeric Pager Gateway Mini-HOWTO

                            by Chris Snell
                          chris@unm.dorm.net
                    http://www.cs.unm.edu/~chris


              +-----------------------------------------+
              | The latest version of this document is  |
              | always available at the Pager FTP site: |
              |  ftp://ftp.cs.unm.edu/pub/chris/paging  |
              +-----------------------------------------+


PREFACE & DISCLAIMER:
---------------------

This document sucks.  I'm not a technical writer, nor do I plan to be one.
I had a hard enough time pasing my English Composition class last semester.
If anything, this document provides too much detail.  If you have half a 
brain, some sendmail experience and some experience with modems, skim this
thing.  Otherwise, read on.

If you blow up your computer/pager/modem or ruin your company network trying
to set this up, go whine to your mother.  Most likely, you won't mess up
anything but I should warn you that sendmail is a tricky thing to play with
and you will definitely be playing with it if you follow this document.

PURPOSE:
--------

This mini-HOWTO will describe how to set up an alphanumeric paging 
gateway on any linux machine.  Your gateway will be able to send messages 
originating from both the World Wide Web and the Internet e-mail system 
to your alphanumeric pager.  This is especially convienent, because no 
special skills are required for someone to send a message to your pager.  
All they must be able to do is use e-mail or the World Wide Web.

                         **SPECIAL NOTE: **  
This document does not cover the setup of paging gateways which are intended 
to send messages to non-alphanumeric (ie numbers-only) pagers or voice pagers.
You'll need to look elsewhere for that information.


REQUIREMENTS:
-------------

- one or more alphanumeric pagers (see the ABOUT ALPHANUMERIC PAGERS section)
- a machine running linux
- a working modem (documentation reccomended!)
- a telephone line
- an Internet connection (if you wish to use the WWW interface and the 
  net-wide e-mail interface)
- compiler tools (gcc, make, etc. and some basic knowledge of their use.)
- the sendmail electronic mail handler (you probably have this)
- a working httpd (web server) if you want to create a WWW interface


ABOUT ALPHANUMERIC PAGERS:
--------------------------

Alphanumeric pagers are available from most reputable paging companies 
(and even some non-reputable ones ;-)).  The prices range, but you should 
be able to pick up a good one for less than $200.  I paid $180 for mine 
(and probably paid too much).

Here are some things to look for when you go shopping for your pager:

  - Is this a name brand (ie. Motorola or the like) pager?
  - *MOST IMPORTANT* Does this pager support paging via a dialup line 
    provided by your pager company? (See THE DIALUP PAGING LINE section)
  - Does it's memory have enough room for the pages you wish to recieve?
  - How reputable is the company?  (See THE DIALUP PAGING LINE section)

I don't work for any pager manufacturers but I wholeheartedly reccommend 
the Motorola line of pagers.  I own one myself and will testify to their 
reliability and durability.  In fact, mine has been dropped onto the 
concrete on many occaisions and did not sustain so much as a chipped case.
You can find this line of pagers on Motorola's web site at:
    
             http://www.mot.com/MIMS/MSPG/Products/Alpha/


THE DIALUP PAGING LINE
----------------------

In order for your gateway to work, we need a way to deliver the messages 
to your paging company, which encodes them and transmits them over 
the air to your pager.  This is done via a dialup (modem) connection 
with your paging company.  Without this connection, you cannot setup 
a paging gateway.  Therefore, it is very important that your paging 
company have such a dialup line.  Unfortunately, many paging companies 
either do not have such a dialup line or do not know about the line they 
have.  When inquiring with a paging company about this line, I found it 
helpful to ask if they could provide "computer software to send an 
alphanumeric page with".  If they make available such software, you can 
bet that they make the dialup line availble that is necessary to use it.  

SPECIFICS ON THE DIALUP LINE
----------------------------

The dialup line is simply a modem on a remote computer (or possibly some 
kind of specialized box).  The modem usually connects at 
300-1200bps, although some (including my provider's) connect using v.22b 
at speeds up to 2400bps.  Once the connection is made, your computer 
sends the page to the remote site by using a protocol known as TAP 
(formerly known as IXO).  You do not need to know the details of this 
protocol, but if you are interested, check out the following document on 
my ftp site:

               ftp://ftp.cs.unm.edu/pub/chris/paging/ixo.txt

HOW YOUR GATEWAY WILL WORK
--------------------------

Before we proceed, I will provide a brief explanation of how the 
e-mail->pager gateway will work.   The WWW gateway is similar and will be 
explained later.

  1.   A message intended for your pager is sent by someone via e-mail to 
       a special address on your linux machine.

  2.   Your machine, using sendmail, accepts the message and routes it to 
       a filter program, which strips the message of it's header and parses 
       out important information like the sender's name and e-mail address 
       and the subject of the message.  This filter also strips the 
       message of any .signature lines so that they do not clog your pager 
       with unimportant information.

  3.   The paging filter passes the message onwards to the "sendpage" 
       paging software which queues it for delivery.

  4.   Sendpage then dials your paging company's dialup line and (using 
       TAP) sends the message.

  5.   Your paging company then beams the message to your pager over the 
       radio waves.


BEGINNING THE SETUP
-------------------

The setup of the gateway will consist of four parts:
    - setting up sendpage
    - (optionally) getting a special DNS entry added for your paging gateway
          - setting up linux to handle multiple IP addresses
    - setting up sendmail to handle the message routing
    - setting up the World Wide Web interface


GETTING THE SOFTWARE
--------------------

Every peice of software necessary to set up this product can be obtained 
from my home site, ftp://ftp.cs.unm.edu/pub/chris/paging.  I will try to 
keep these files current but will also list the alternate sites for 
the packages required.


SENDPAGE SETUP
--------------

Sendpage is the most important component of your paging gateway.  To get 
anywhere in this project, you will need to obtain this software and 
compile it on your machine.  The sendpage software can be obtained via 
ftp at:

        ftp://ftp.net.ohio-state.edu/pub/pagers/sendpage7a.tar.Z

or from my machine:

        ftp://ftp.cs.unm.edu/pub/chris/paging/sendpage/sendpage7a.tar.Z

Create a "paging" subdirectory somewhere.  Fetch this software and unpack it 
(tar zxvf) in the paging directory.  

At this point, I would strongly suggest that you read over all the 
configuration information and README and INSTALL files in the sendpage 
package.  However, you should probably ignore all the discussion on the 
setup of sendmail and instead rely on my procedure.

Follow the instructions in the INSTALL file for compiling sendpage.  Here 
are a few notes about the settings in the sendpage.h file which you will 
need to edit:

- Make sure you have the "#define ARSYSTEM_NOTIFIER" line commented out 
(using "/*" and "*/") unless you own the commercial Remedy system monitor 
package.

- Following the ARSYSTEM_NOTIFIER line, there are a few Linux (POSIX) 
specific lines that need to be defined:
#define POSIX_SIGNALS 
#define POSIX_OPEN


- For the modem definition, I recommend using:
#define MODEM_DEV "/dev/modem" 
     or "/dev/cua0" [com 1] or "/dev/cua1" [com 2] etc....

- For the modem init, I use the simple string and rely on NVRAM settings 
  instead:
#define MODEM_INIT ATEVXH

- I use RTS/CTS flow control:
#define C_FLAG CTRSCTS|HUPCL

- and DTR toggle
#define TOGGLE_DTR

*** If you are interested, my sendpage.cf is available in it's entirety
from my ftp site at:

    ftp://ftp.cs.unm.edu/pub/chris/paging/sendpage/sendpage.h.example


CONFIGURING YOUR MODEM 
----------------------

I use a ZyXEL 1496+ which seems to work fine with sendpage.  With other 
modems, your milage may vary (possibly for the better).  Although your 
paging company's modem (referred to by sendpage as "Paging Central") 
could very well be different from mine, you may want to try this setup to 
see if it works.  You should have your modem manual handy as a reference 
for the proper init string.  Here is what I have set:

- Modem set to v.22bis 2400/1200 protocol (*no* auto-negotiate)
- Serial port at 1200bps

Your init string (sendpage.h) should already take care of:

- Numeric (non-text) responses [these are a must!]   ie:
	0 for "OK"
	5 for "CONNECT 1200"
	7 for "BUSY"


In order for sendpage to work, it must be able to access the modem.  This 
requires read/write permissions to the modem device.  On my system, 
sendpage is run set-uid to the username "sendpage".  In my /etc/group 
file, I have a group called "modem" of which the user "sendpage" is a 
member.  The device file for my modem (/dev/cua1) is owned by user "root" 
and group "modem".  It is readable and writeable by both the owner and 
the group (chown root.modem /dev/cua1 ; chmod ug+w /dev/cua1).  

SENDPAGE MAKEFILE SETUP
-----------------------

Here are the build options I use for Linux:

CC = gcc
CFLAGS =  -DLINUX -O2 -m486 -I/usr/include
LIBS = -ldb -lbsd

*** If you are interested, my Makefile is available in it's entirety
from my ftp site at:

    ftp://ftp.cs.unm.edu/pub/chris/paging/sendpage/Makefile.example

CONTINUING THE SETUP
--------------------

Hopefully, you were able to get sendpage to compile correctly on the 
first try.  Now you must set up sendpage for the initial testing.  
Following the INSTALL file's instructions, you will set up the queue 
directory and begin setting up the sendpage.cf file (I keep mine in /etc).

A few notes on setting up the /etc/sendpage.cf:

- I had to comment out (using "#") the entire trMap section for "bofh", 
leaving only the trMap section for "std" in order to get sendpage to work.

- My "Global Options" section looks like:

global maxMsgSize=480 maxMsgSplit=5 syslogFacility=LOG_MAIL\
        timeFormat=dayFirst replyToSender=no\
        emailFrom="sendpage@pager.unm.edu (UNM Pager Gateway)"

- My "Paging Central Definiton" section looks like:

pc      name=westlink phone=92437243 speed=1200 parity=even\
        databits=7 stopbits=1 protocol=pet-pg1 msgretries=10\
        answertime=25 modemdial=atdt dialer=internal\
        modeminit=atevxh modemdev=/dev/cua1\
                emailFrom="sendpage@pager.unm.edu (UNM Pager Gateway)"

- Here is my "Aliases" section.  The 'chrisauto' definition does not send 
an e-mail reply when a page is sent and is used for hourly system stats 
that are sent to my page.

alias      chris     9246403.westlink
alias      chrisauto     9246403.westlink emailReply=no msgIncTime=yes
alias      nicolas   2515025.westlink

- And finally, the "Profile" section:

profile default emailReplyErr=yes emailReply=yes msgIncSender=yes\
                msgIncDate=yes msgIncTime=yes

profile numeric emailReplyErr=yes emailReply=yes msgIncSender=no\
                msgIncDate=no msgIncTime=no

set profile=default

*** If you are interested, my sendpage.cf is available in it's entirety 
from my ftp site at:

    ftp://ftp.cs.unm.edu/pub/chris/paging/sendpage/sendpage.cf.example


MOVING RIGHT ALONG...
---------------------

Alright.  At this point, I am assuming you have been able to at least 
send a page to your pager using sendpage's command-line interface.  If 
you haven't been able to do this, re-read the INSTALL file and re-check 
your sendpage.h and sendpage.cf.  If all else fails, subscribe to the IXO 
mailing list and ask there.

SETTING UP A SPECIAL HOSTNAME
-----------------------------

If you want to have a special virtual hostname for your paging gateway (ie. 
pager.yourcompany.com), there are a few steps that you will need to 
follow.  If you do not want to (or cannot) set up an extra virtual 
hostname, skip ahead to the section entitiled "SETTING UP /etc/aliases".

***** UPDATED 11.12.96 ***********************************************
Setting up a separate UP address (as described below) is not necessary
if all you need is a mail->pager gateway [no www].  If this is all you
need, follow the instructions found at:

  ftp://ftp.cs.unm.edu/pub/chris/paging/Sendmail-and-virtual-domains.txt

to set up a MX entry for your paging hostname.  When you've done this,
skip ahead to the "SETTING UP SENDMAIL" section.
**********************************************************************

The first thing you need to do to set up your new hostname is to ask your 
network adminstrator to add a new ip address and hostname to the DNS 
tables.  I would reccommend using the hostname "pager" but it really 
doesn't matter.

Now that you have your new address and the associated IP number, you need 
to add it to your machine.  This will be done in one of two ways, 
depending on the type of your linux distribution.

* If you use the Linux kernel 1.2.xx series

	Get the IP aliasing patches from:

	ftp://ftp.cs.unm.edu/pub/chris/paging/ip_alias

        and follow the instructions in the file README.alias,
	substituting your newly-assigned IP address and gateway
	address for the ones mentioned in this README file.

* If you are using Linux kernel 2.0.xx and above

	Enable the following options for your kernel and recompile:

          Network aliasing
	  IP: aliasing support

	In your startup scripts (/etc/rc.d/rc.inet1 for Slackware users,
	/etc/sysconfig/network-scripts/ifup-eth for RedHat users) add
	the following lines:

	ifconfig eth0:0 191.59.16.224
	route add -host 191.59.16.224 dev eth0:0

        replacing 191.59.16.224 with your new IP address


SETTING UP SENDMAIL
-------------------

We need to make some aliases so that sendmail can distinguish between a 
message sent to you@somemachine.dink.com and you@pager.dink.com, 
when "somemachine" and "pager" are actually the same machine.  To do 
this, we need to set up a sendmail alias database.

The following information is based upon the info I got from
http://www.qosina.com/~awm/apache/sendmail.html .

***  Create a file, /etc/domainalias with translations from the pager 
hostname to the "real" hostname.  On my machine (luckenbach), my translation 
file looks like this:

chris@pager.unm.edu      cjs-pager@luckenbach.unm.edu
droux@pager.unm.edu      nicolas-pager@luckenbach.unm.edu

That's it for that file.  We are almost done now.  I hope you have a 
sendmail binary that was compiled with the following switches:

 	-DNDBM -DNEWDB

These are to enable the database-handling code needed to read the 
domainalias.db file that we are about to create.

***  Make sure that you have the makemap utility (part of the sendmail 
distribution).  Compile it like this if you haven't already:

        ( This may not be neccessary, check to see if hash, dbm, or 
        btree are supported or not, check next step on how to do this. ) 
        # cd /usr/src/sendmail-8.7.x/makemap
        # rm Makefile makemap
        # make CFLAGS='-m486 -O2 -I../src -DNDBM -DNEWDB' LDFLAGS='-s 
		-lgdbm -ldb' makemap
        # cp makemap /usr/bin

***  Add a line to your /etc/sendmail.cf to make sendmail accept mail for
     the new virtual hostname:

     Cw pager.yourdomain.com

***  Compile /etc/domainaliases into a database format:

     makemap btree domainaliases.db < domainalisaes

***  Add another line to your /etc/sendmail.cf to tell sendmail about
     the domainaliases.db translation file which we just compiled.

     Kdomainaliases btree /etc/domainaliases.db

***  Now for the rule-set, make sure you type it exactly into /etc/sendmail.cf

        The entries are seperated by a TAB field NOT SPACES!!!! 
        These are to be inserted INSIDE the S98 Ruleset.

 PRE 8.7.1 

        R$+  < @ $+ . >         $: $1 < @ $2 > .
        R$+  < @ $+ . > $*              $: (domainaliases $1@$2 $: $1 < @ $2 > $3 $)
        R$+  < @ $+ . > $*              $: (domainaliases $2 $: $1 < @ $2 > $3 $)
        R$+  < @ $+ > .                 $: $1 < @ $2 . >

 POST 8.7.1 

        R$+< $+. >              $1< $2 >
        R$+< $+ >               $: < > $(domainaliases $1$2 $)
        R< > $+ @ $*            $: < $1 > $(domainaliases * @ $2 $)
        R< $+ > * $*            $: < > $1 $2 
        R< > $*                 $: $>3 $1

*** Now you must kill your sendmail daemon and restart it for the new 
    configurations to take effect.

    /sbin/killall sendmail
    sendmail -bd -q15m


*** Finally, test your new configuration to make sure you did it correctly,
    Check /var/log/maillog for any possible error messages.

lonestar~>  sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 0 chris@PAGER.phys.unm.edu
rewrite: ruleset  0   input: chris @ pager . phys . unm . edu
rewrite: ruleset 98   input: chris @ pager . phys . unm . edu
rewrite: ruleset 98 returns: chris @ pager . phys . unm . edu
rewrite: ruleset 97   input: chris @ pager . phys . unm . edu
rewrite: ruleset  3   input: chris @ pager . phys . unm . edu
rewrite: ruleset 96   input: chris < @ pager . phys . unm . edu >
rewrite: ruleset 96 returns: chris < @ pager . phys . unm . edu . >
rewrite: ruleset  3 returns: chris < @ pager . phys . unm . edu . >
rewrite: ruleset  0   input: chris < @ pager . phys . unm . edu . >
rewrite: ruleset 98   input: chris < @ pager . phys . unm . edu . >
rewrite: ruleset  3   input: cjs-pager @ lonestar . phys . unm . edu
rewrite: ruleset 96   input: cjs-pager < @ lonestar . phys . unm . edu >
rewrite: ruleset 96 returns: cjs-pager < @ lonestar . phys . unm . edu . >
rewrite: ruleset  3 returns: cjs-pager < @ lonestar . phys . unm . edu . >
rewrite: ruleset 98 returns: cjs-pager < @ lonestar . phys . unm . edu . >
rewrite: ruleset  0 returns: $# local $: @ cjs-pager
rewrite: ruleset 97 returns: $# local $: @ cjs-pager
rewrite: ruleset  0 returns: $# local $: @ cjs-pager

*** If this didn't work or you just don't understand, consult your local
    sendmail expert.


SETTING UP /etc/aliases
-----------------------

We're almost done.  I swear.

Now you need to set up your /etc/aliases file to handle the piping of the 
e-mail message to the filter which sends the message to sendpage.  In the 
previous section, I demonstrated how I made chris@pager.unm.edu 
point to cjs-pager@luckenbach.unm.edu.  To make this work, I had to 
add a line to my /etc/aliases file to send all mail to cjs-pager to the 
filter.  That line is:

cjs-pager: "|/usr/local/bin/sendpagefilter chris"

^^^^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^
This is the   This is the full path to the  This is a username that
alias that    paging filter.  (see below)   you defined in your
you created                                 sendpage.cf


The filter used in this example can be obtained at:

 ftp://ftp.cs.unm.edu/pub/chris/paging/paging_filter.tar.gz

Read the instructions in the included README file, compile the filter,
and place it in a directory such as /usr/local/bin.

You must now run the 'newaliases' command to process your new alias(es).



With this complete, your paging gateway should be working.  Try sending 
mail first to the alias which you created in /etc/aliases (in my example, 
cjs-pager).  If this works, try sending mail to your virtual mail alias 
which you created in the previous section (in my example, 
chris@pager.unm.edu).  If this works, you are done!!!


THE WWW GATEWAY
---------------

I am not going to write much here.  I'm assuming that you have some HTML 
skills and have used CGI scripts before.  Your gateway will use a CGI 
script to communicate between the web browser and the sendpage program.  
I have made an example script and HTML page available:

   ftp://ftp.cs.unm.edu/pub/chris/paging/example_www_gateway.tar.gz

This script utilizes two additonal programs, uncgi (to translate CGI data 
into shell environment variables for easy CGI programming) and d2utxt to 
strip out the ^M characters in a page message that make sendpage choke.  
These utilities are available in the same directory on the ftp site that 
the example HTML is found in.  Read the instructions that come with them 
to compile them.  This should be easy.   


GETTING MORE HELP
-----------------

The IXO mailing list

   To subscribe,  send email to ixo-request@plts.org with the single word 
   "subscribe" in the first line of an otherwise-blank message.

The Sendpage mailing list

   To subscribe, issue this command from your unix prompt:

    echo 'subscribe' | Mail sendpage-hackers-request@lists.net.ohio-state.edu

Me

   I'm a busy college student and employee so think three times before asking
   me for help.  However, if you are a company and wish to hire me for 
   consulting, I will be happy to talk with you.

      Chris Snell
      chris@cs.unm.edu
[ 15 January 1998
  The Linux Print2Win mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Print2Win mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

   
     _________________________________________________________________
   
      This page was last updated on June 7th 1996.
      
    A SIMPLE HOW-TO PRINT FROM LINUX TO A WINDOWS 95/WINDOWS NT PRINT SHARE
                                       
   My setup:
     * Latest kernel (pre-2.0.12)
     * SAMBA
     * Standard lpr utilities
     * Two printers - LexMark Optra C PS (colour) and LexMark Optra R+ PS
       (black and white)
       
   I have two ways to print to my printers: _
     * first is via the standard lpr command
     * second via SAMBA's smbclient print option
       
   They both use the /etc/printcap file which reproduced below.
   

/etc/printcap:
#
# Set the environment variable PRINTER to either
# PRINTER=eng or PRINTER=colour or PRINTER=optrac or PRINTER=optrar
# if you want to use the lpr command by itself.  Alternatively, you
# can say lpr -P to print your file.
#                               Harish Pillay (h.pillay@ieee.org)
# //gaia/lexENG1 via smbprint
#
eng|lp:\
        :cm=LexMark Optra R+ PostScript Printer:\
        :lp=/dev/eng:\
        :sd=/var/spool/lpd/eng:\
        :af=/var/spool/lpd/eng/acct:\
        :mx#0:\
        :if=/usr/local/samba/bin/smbprint:
#
# //gaia/lexTRG1 via smbprint
#
colour|lpcolour:\
        :cm=LexMark Optra C PostScript Printer:\
        :lp=/dev/colour:\
        :sd=/var/spool/lpd/colour:\
        :af=/var/spool/lpd/colour/acct:\
        :mx#0:\
        :if=/usr/local/samba/bin/smbprint:
#
# using lpr directly to Optra R+ Postscript (B&W)
#
optrar:\
        :cm=LexMark Optra R+ PostScript Printer:\
        :sd=/usr/spool/lpd:\
        :lf=/usr/spool/lpd/errors:\
        :rp=optrar.dom.ain:\
        :rm=optrar.dom.ain:\
        :sh:\
        :sf:
#
# using lpr directly to Optra C Postscript (Colour)
#
optrac:\
        :cm=LexMark Optra C PostScript Printer:\
        :sd=/usr/spool/lpd:\
        :lf=/usr/spool/lpd/errors:\
        :rp=optrac.dom.ain:\
        :rm=optrac.dom.ain:\
        :sh:\
        :sf:

#end of /etc/printcap file

   Steps:
     * Fire up lpd (check /etc/rc.d/rc.M and /etc/rc.d/rc.inet2).
     * If you are using straightforward lpr (meaning that the printer
       itself *knows* how to talk lpd), then you can go directly using
       lpr to print.
     * If your printer cannot talk lpd and you are going via your Windows
       95 or Windows NT printer share option, you need to use SAMBA.
     * After making sure SAMBA works on your machine, use the smbprint
       (in the SAMBA distribution) script to do the printing
       (http://www.nijenrode.nl/~steven/ldp/Printing-HOWTO.html).
       
   Here's my copy of the smbprint script modified slightly:
   
   /usr/local/samba/bin/smbprint:

#!/bin/sh -x

# This script is an input filter for printcap printing on a unix machine. It
# uses the smbclient program to print the file to the specified smb-based
# server and service.
# For example you could have a printcap entry like this
#
# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
#
# which would create a unix printer called "smb" that will print via this
# script. You will need to create the spool directory /usr/spool/smb with
# appropriate permissions and ownerships for your system.
#
# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
# so that the server, service, and password can be read from
# a /usr/var/spool/lpd/PRINTNAME/.config file.
#
# Script further modified to add user variable by h.pillay@ieee.org (Harish Pil
lay)
#
# In order for this to work the /etc/printcap entry must include an
# accounting file (af=...):
#
#   cdcolour:\
#       :cm=CD IBM Colorjet on 6th:\
#       :sd=/var/spool/lpd/cdcolour:\
#       :af=/var/spool/lpd/cdcolour/acct:\
#       :if=/usr/local/etc/smbprint:\
#       :mx=0:\
#       :lp=/dev/null:
#
# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
#   server=PC_SERVER
#   service=PR_SHARENAME
#   password="password"
#   user=USERNAME          (added by h.pillay@ieee.org)
#
# E.g.
#   server=PAULS_PC
#   service=CJET_371
#   password=""
#   user=HARISH          (added by h.pillay@ieee.org)

#
# Debugging log file, change to /dev/null if you like.
#
logfile=/tmp/smb-print.log
# logfile=/dev/null


#
# The last parameter to the filter is the accounting file name.
#   Extract the directory name from the file name.
#   Concat this with /.config to get the config file.
#
eval acct_file=\$$#
spool_dir=`dirname $acct_file`
config_file=$spool_dir/.config

# Should read the following variables set in the config file:
#   server
#   service
#   password
#   user               (added by h.pillay@ieee.org)
eval `cat $config_file`

#
# Some debugging help, change the >> to > if you want to same space.
#
echo "server $server, service $service" >> $logfile

(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
        echo translate
        echo "print -"
        cat
) | /usr/local/samba/bin/smbclient "\\\\$server\\$service" $password -U $user -
N -P >> $logfile

#end of /usr/local/samba/bin/smbprint

   
     _________________________________________________________________
   
   Hint from Rick Bressler :

Good tip sheet.  I use something very similar.  One helpful tip, this is not
a particularly good idea:

        :lp=/dev/null:\

lpr does an 'exclusive' open on the file you specify as lp=.  It does this in
order to prevent multiple processes from trying to print to the dame printer
at the same time.

The side effect of this is that in your case, eng and colour can't print at
the same time, (usually more or less transparent since they probably print
quickly and since they queue you probably don't notice) but any other process
that tries to write to /dev/null will break!

On a single user system, probably not a big problem.  I have a system with
over 50 printers.  It would be a problem there.

The solution is to create a dummy printer for each.  Eg: touch /dev/eng.

   I have modified the lp entries in the printcap file above to take into
   account Rick's suggestion. I did the following:
   

#touch /dev/eng
#touch /dev/colour

   Thanks Rick for the tip from the battlefield!
   
   
     _________________________________________________________________
   
                                SUCCESS STORY:
                                       
   What completely amazed me is how the printcap worked for both ways of
   printing, lpr directly and lpr via smbprint. And, to top it all, how
   the colour printing worked the first time round! Kudos to the ace
   programmers!
     _________________________________________________________________
   
   Questions? Email me.
   
   Go back to Harish's Home Page
     _________________________________________________________________
[ 15 January 1998
  The Linux Proxy-ARP mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Proxy-ARP mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

               A small treatise on the use of ProxyARP
                 by Al Longyear <longyear@netcom.com>
                           December 5, 1994

I. Introduction

This document is written to help those who are considering using the
proxy ARP (Address Resolution Protocol) logic within Linux in the aid
of PPP and SLIP server devices. Proxy ARP is also called 'gracious
ARP' in some sources of documentation. There have been numerous
requests for the use of proxy ARP. When it is not able to be used,
some people deem this as a flaw in the software and wonder why it is
broken.

I hope that with the aid of this document, people will understand
more about proxy ARP as well as when it is and is not useful.

The use of proxy ARP is useful when you have a server. It will allow
the dynamic connection of remote systems without the need for the
update of the routing tables on other system but the one associated
as the 'server'.

The term 'server' is somewhat of a misnomer. TCP/IP is a peer-to-peer
networking environment. It does not have a client to server relation
as other systems do in that resources are offered or 'shared' on
servers while clients 'use' them. However, it is convenient to call the
'system which answers the telephone' a server; while the 'system
which dials the telephone to connect to the server' a client.

Linux's networking software directly supports proxy ARP. There is
no need for a special daemon process such as proxyarpd used in some
systems.

Both the PPP protocol support code, pppd, and at least one of the SLIP
support code, dip-uri, will support proxy ARP. In addition, the
networking program, arp, will manage and display the table.

To understand how Proxy ARP works and when it may be used, you need to
have a basic understanding of how networking is performed in general.
The next three sections of this document will describe in the
briefest of terms how TCP/IP networking is performed and how routing
works.



II. The Hardware side of Networking

All networking using ethernet or token ring is performed using a MAC
(Media Access Control) address. This is a hardware address associated
with a specific controller. Each MAC address is unique. They are
assigned by the manufacturer of the controller. While they may be
overridden in software, this is not the general rule.

IP addresses are translated to MAC addresses using a special table
within the networking software called the `ARP cache'. When the
networking software wishes to send an IP frame to the specified
address, it will consult this cache to determine the MAC address. If
the entry is not found in the cache, a special request is made of all
systems attached to the network to resolve the IP address to a MAC
address. This is called an ARP request.

The response to the ARP request is a reply with the MAC address. This
MAC address is then added to the cache so that the translation may be
performed subsequently without the aid of ARP.

It is this ARP request which is used by the proxy ARP logic to aid
in the support of remote connections.

There are rules by which the entries in the cache are removed. Those
rules are not germane to this document and are best left to a
technical description of ip networking.

(While token ring is under development, and is available on a test
basis, the common networking transport media for Linux is ethernet. I
will use the term 'ethernet' from now on. Similar facilities are
available for token ring, irrespective of token ring's source routing.)



III. Reason for the use of Proxy ARP

The purpose of proxy ARP is to allow the assignment of more than one
IP address to a single network adapter.

The manner in which it does this is to create an entry in the ARP
cache of Linux which associates the additional IP address with the
hardware address of the ethernet controller. This permits the Linux
system to respond to an ARP request to translate an IP address to a
hardware address.



IV. TCP/IP Routing

[A small preface is in order at this time. This describes the
'spanning-tree' routing. It does not describe 'source-routing' of IP
frames. The source routing performed by token ring is not IP source
routing but is performed at the MAC layer. The use of IP source
routing is discouraged. Token ring MAC source routing is a
requirement of that transport.]

To understand more about proxy ARP, you need to understand how IP
frames are routed on the network. I do not plan to go into great
detail. If you wish additional information, there are many books
available which will offer more in-depth information. (If you don't
wish the books, then look at the RFC documents.)

IP frames are routed at each stage of their passage through the
network. Each host, router, and gateway decides for itself and based
upon its own copy of the routing tables where the specific IP frame is
to be transmitted.

The routing is performed using the term which I will call an
'IP network'. Each network interface is assigned an unique IP network.
Each is given an IP address. Each is given a netmask. The 'IP network'
is simply the logical conjunction of the IP address with the netmask.
For example, the IP address of 10.124.35.40 and the netmask of
255.255.0.0 would have an 'IP network' of 10.124.0.0. While I am using
byte netmasks, the same logic would apply to the non-byte boundary
netmasks.

Linux associates the netmask with the route entry. When you add a
route into the system, you specify a IP address and the associated
destination device. If you don't specify a netmask, the netmask is
taken from the destination device's default netmask which is set when
the device is configured with ifconfig.

To better understand routing, consider the following configuration of
a sample system.

Destination     Netmask          Gateway       Flags    Device
10.124.0.0      255.255.0.0      0.0.0.0       U        eth0
10.125.0.0      255.255.0.0      0.0.0.0       U        eth1
10.126.0.0      255.255.0.0      10.125.31.1   UG       eth1
10.124.12.5     255.255.255.255  0.0.0.0       UH       ppp0
0.0.0.0         0.0.0.0          10.124.25.1   U        eth0

This is a system with three network devices. It has two ethernet
controllers and one PPP device. IP frames may come into this system
from any one of the three sources. In addition, frames are forwarded
through this system to any one of the three destination devices.

The default route is to the gateway device at 10.124.25.1 as
demonstrated by the last entry. To reach that gateway, the frame is
to be transmitted by the eth0 controller.

There is one PPP device connected. Its IP address is 10.124.12.5.

The eth0 device is on the IP network of 10.124.0.0 while the eth1
device is on the IP network 10.125.0.0.

In addition, there is a net route to the IP network 10.126.0.0
available at the gateway associated with 10.125.31.1.

To understand how routing is performed, consider an IP frame for the
destination of 10.125.45.1.

Linux will go through the route table and for each entry, take the
netmask, perform a logical conjunction (and) with the netmask and
then compare it to the entry's destination IP address. If the result
matches, the frame is sent to the device indicated.

The result is that the frame for the IP address of 10.125.45.1 will
be sent to the eth1 device.

Likewise a frame for the IP address of 10.124.12.5 will go to the
ppp0 device while the IP address of 10.124.12.6 will go to the eth0
device since the ppp0 device will only accept its one IP address of
10.124.12.5.

Frames for 10.126.31.4 are different. They have a 'gateway'
associated with them. They are found in the similar manner. However,
instead of just sending them to the eth1 device, they are sent to the
one system which is associated with the IP address of 10.125.31.1. It
is this IP address which is translated to a MAC address, rather than
the destination address, 10.126.31.4.

When they arrive at the 10.126.31.1 system, that system will forward
them on to the final destination of 10.126.31.4 by using its routing
table which may say to send it on its eth3 interface.

There are many error conditions which are caught by this form of
routing. I don't want to go into all of them, however, if for
example, 10.126.31.1 did not have a path to reach the .4 address,
then it would send back a ICMP (Internet Control Message Protocol)
frame to the original sender that it does not have a 'route to the
host' condition.



V. Routing with Proxy ARP

Finally, we are getting to the focus of this document now that all of
the foundation has been described.

Remember that Linux will put an entry into the ARP cache for the IP
address and the associated hardware MAC address when it is to do proxy
ARP. Remember that this cache is used to translate IP addresses to
MAC addresses.

When the remote connects at IP address 10.124.12.5, the Linux system
will add this IP address and the MAC address associated with the eth0
controller to the ARP cache.

When it receives a request to translate the IP address 10.124.12.5 to
a MAC address, it will send the entry from its tables to the
requester. The result is that frames to this IP address will be sent
to the server and the server may then forward them to the remote
system.

This is how proxy ARP works. The server is a proxy (an agent, an
inter-lopper, a 'front' person, etc.) for the remote IP address. It is
saying to the network that it can accept frames for the remote IP
address and deliver them by responding to the ARP requests.

So, for proxy ARP to work, the IP address of the remote (10.124.12.5
in my example) needs to be on one of the IP networks for a network
adapter.

There are two reasons for this requirement.

The first reason is that the MAC address of the controller is entered
into the ARP cache to be associated with the IP address. A MAC
address is required for the ARP assignment since the ARP cache is a
translation from IP addresses to MAC addresses.

The second reason is that all systems on the network do their own
routing. They know that to send a IP frame to the remote's IP address
that they must 'put it on the same wire' which is connected to the
server's network adapter.



VI. When Proxy ARP will not work

Consider what would happen if the remote's IP address was 10.200.3.1
rather than 10.124.12.5.

1. The remote systems would not know where to send this address.

They all know that to reach the IP network 10.124.0.0 that the frames
should go on the cable attached to eth0. However, there is no IP
network for 10.200.0.0. They would not know where to send frames to
this destination.

2. The server would not know what controller to use for the
   appropriate MAC address when it made the ARP entry.

This is the most common reason why proxy ARP will not work for people
who wish to use it. They have a different IP network associated with
the remote IP address than one of their own network interfaces.



VII. Problems with Proxy ARP and what must be avoided

1. Do not have more than one system respond to the proxy ARP entry for
   a specific IP address. In the case of BSD, this will may mean that
   since proxy ARP for a range of addresses, ensure that that the
   address ranges do not conflict. For a network based upon BSD networking,
   this means that you should dedicate the entire network to one server.

Again, BSD systems will bitterly complain if it receives more than one
reply for its ARP request.

2. Do not attempt to perform Proxy ARP for an address which is already
   present on the network.

This is a slight variation of the above problem. If you attempt to
perform proxy ARP for an IP address which is presently available on
the network, then two replies will be generated. This may mean that
you should not take IP addresses from one network and move them to a
remote connection which may cause the server to attempt to perform
Proxy ARP.



VII. What to do if you can't use Proxy ARP but want the same
functionality.

There are several choices available if you are unable to use proxy
ARP.

The easiest is to subnet the remote IP addresses so that all of the
remote addresses are on their own IP network. Then add a network route
on each of the routers (those devices which are indicated by the
'gateway' addresses of all of your hosts) so that the IP network is to
be sent to the server to which the remote IP addresses connect.

Alternately, you could use gated on the server and the routers.

Alternately, you could put a host route if you don't wish to subnet
the IP network. You would put entries in each of the routers for all
of the remote IP addresses.

You need to update only the gateways and routers. You do not need to
change all of the hosts in your network. The default routes which the
hosts use to send frames to routers will cause what is called a "ICMP
re-direct" frame to be sent to the host making the request. This will
automatically add a 'host' route to the appropriate server.



VIII. Conclusion

I hope that I have explained a little more about the proxy ARP and
how it works. Fortunately, if you use pppd or dip-uri, you do not
need to know how the mechanical steps in using it. It is
automatically performed for you by these pieces of software.

Proxy ARP is not for everyone. It is a workable solution in some
cases. Hopefully, you can determine for yourself whether this will
help you with your networking problems.

Additional information may be found in the book 'TCP/IP Illustrated,
volume 1' "The protocols" by W. Richard Stevens and published by
Addison Wessley.

Thank you.
[ 15 January 1998
  The Linux SLIP+proxyARP mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  SLIP+proxyARP mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]


             Using SLIP And Proxy ARP To Connect
      A Local Ethernet LAN To An Internet Connected LAN

               Dave Kennedy <davek@Muscle.Net>
                     November 20, 1996

---------------------------------------------------------------
$Id: slip-arp,v 1.3 1996/11/20 16:06:51 davek Exp $
---------------------------------------------------------------

---------------------------------------------------------------

0. Introduction
1. Other Options Available
2. The Final Result
3. Setting It Up
4. Kernel And Software
5. Outstanding Issues And Questions
6. Acknowledgments
7. Further Reading

---------------------------------------------------------------

0. Introduction

In late 1994 and much of 1995, I had a small Ethernet LAN at home that 
I connected to the Internet.  At the time, I did not have my own 
network address and I wanted to piggyback on my employer's network 
address.  I succeeded using SLIP and proxy ARP.  This document quickly 
describes how I did it at the time.  It also provides information on 
other options available now that were not there in 1993/1994.  More 
than likely, these other options will be your best bet.  But, I'm 
continuing to maintain this document for those who need this type of 
solution.  

---------------------------------------------------------------

1. Other Options Available

When I originally wrote this mini-HOWTO, the options to connect via a 
dial-up LAN were more limited than today.  If you want to connect a 
local LAN to the Internet via a dial-up connection, you should look 
at:  

    IP Masquerade
        http://www.hwy401.com/achau/ipmasq/
        http://www.indyramp.com/masq/

    Use of proxy services
        http://harvest.transarc.com/afs/transarc.com/public/trg/Harvest/
        http://harvest.cs.colorado.edu/

All links are current as of the date of this document.  I no longer
use this technique; if I had the same requirements today, I would
use IP Masquerade.

---------------------------------------------------------------

2. The Final Result

First, I'll present the final result and then describe how to get there.

The final network is all on a Class C network (a.b.c.0):

           Internet
              |               
      o-------+---------+----------------o     <- Remote Ethernet
                        | .126
                    NetBlazer
                        | .215                 <- SLIP (via 14.4 modem)
                       gw
                        | .253
      o-----------------+--------+-------o     <- Local Ethernet
                                 | .254 
                                mus

---------------------------------------------------------------

3. Setting It Up

The keys to getting this working are routing and proxy ARP.

Here is gw's routing table:

Kernel routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    a.b.c.254   *               255.255.255.255 UH    0      0     5628 eth0
    a.b.c.253   *               255.255.255.255 UH    0      0        0 eth0
    a.b.c.126   *               255.255.255.255 UH    0      0       22 sl0
127.0.0.0       *               255.0.0.0       U     0      0       32 lo
default             a.b.c.126   *               UG    0      0        9 sl0

This table was created with the following commands:

    1. The SLIP connection was established which created the default
       gateway entry and the a.b.c.126 entry.

    2. ifconfig eth0 a.b.c.253

    3. route add a.b.c.253 eth0

    4. route add a.b.c.254 eth0

Gw is now set up to talk to both eth0 and sl0.  (This might be a good
time to note that my kernel has IP forwarding configured.)  The reason for
the explicit route of a.b.c.253 may not be needed, but ping .253 from .253
without the route causes the ping to take the default route out the SLIP
link.


Here is mus's routing table:

Kernel routing table
Destination     Gateway         Genmask         Flags MSS    Window Use Iface
    a.b.c.253   *               255.255.255.255 UH    1436   0       59 eth0
127.0.0.0       *               255.0.0.0       U     1936   0       52 lo
default             a.b.c.253   *               UG    1436   0    21661 eth0

This table was created with the following commands:

    1. ifconfig eth0 a.b.c.254

    2. route add a.b.c.253 eth0

    3. route add default gw 192.68.22.253

Now, at this point I attempted to ping the NetBlazer.  I could see the
packets being sent out the modem (SD was flashing), but there was no
response.  This was good since it indicated that gw was getting packets
in on eth0 (Ethernet) and sending them out sl0 (SLIP).

The next step is to get the other side of the SLIP connection (NetBlazer)
to recognize and know how to talk to me.  This was done by using its
proxy arp command.

    Usage: proxy <hostid> ether|token|<interface> <mac-addr>

    proxy a.b.c.253 ether 00:c0:6d:11:66:d3
    proxy a.b.c.254 ether 00:c0:6d:11:66:e4

At this point I was able to ping the Internet from mus.  And all was well
with the world.  :)

NOTE: The 'proxy' command is available only on the NetBlazer.  The
equivalent command under linux is 'arp -s <IP> <HW ADDR> pub'.

---------------------------------------------------------------

4. Kernel And Software

The kernel used on gw was 1.1.88 with IP Forwarding configured.  This
is required.  The kernel on mus was also 1.1.88, but IP Forwarding
was not configured.  This does not matter.

It's also worth noting that PPP could have been used instead of
SLIP just as easily.  [See, I told you this was a long time ago!]

---------------------------------------------------------------

5. Outstanding Issues And Questions

The main question I have came up while writing this.  When I checked 
the ARP table on the NetBlazer, my ARP entries were no longer there, but
everything was still working.  I readded the entry for mus and it made
no difference.  If anyone has ideas on this, let me know.

---------------------------------------------------------------

6. Acknowledgments

My thanks to John Garnett <garnett@actlab.rtf.utexas.edu> for his
post Dec 21, 1994 "A Guide on Using SLIP with ProxyARP..."  I'm not
so sure that my document is anything more than a rehash of what he
wrote other than I'm using a NetBlazer on the Internet side and he
had a modem attached to a computer.  Anyway, thanks, John!

---------------------------------------------------------------

7. Further Reading

Dawson, Terry; "NET-2-HOWTO."
Garnett, John; "A (client) SLIP Guide for Linux."
Lots of other HOWTO's.

[ 15 January 1998
  The Linux Soundblaster-16 mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Soundblaster-16 mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

Linux Soundblaster 16 PnP Mini-Howto
by Eric Z. Ayers <Eric.Ayers@compgen.com>
v1.0, 14 January 1997

To my delight, my wife gave me a shiny new soundcard for my birthday.  
Unfortunately, it was a Soundblaster 16 PnP which refused to work under 
Linux.  In fact, my 3com 3c509 would not work under Linux either.

I finally got my hardware working, with the Linux sound driver that comes
with the kernel and the isapnp package from 
ftp://ftp.redhat.com/pub/utils/isapnptools-1.8.tgz 

It turns out that there were 2 major obstacles I faced to get the soundcard 
to work.  The first obstacle was that I didn't know the IRQ's and IO ports 
to talk to the sound card.  That is solved with the isapnptools package.  The 
second problem was with the 3c509 ethernet card. It seemed that no matter
how I changed the settings on the card, the Linux kernel would not recognize 
the ethernet  card.  It turns out that there is a device on the sound card 
which is in conflict with the 3c509 probing code. 


1) Install the isapnp package.  Edit /etc/isapnp.conf so that the IRQ and IO 
   ports the sound cards use don't conflict with any of your other devices.

2) Build the linux kernel.  Build the sound support as a Module at the IRQ, 
   IO and DMA adresses configured in isapnp.conf.  Also build your 3c509 
   driver as a module.  (Don't forget to run make modules and 
   make modules_install after compiling and installing your kernel)

3) Modify the boots scripts on your system.

I am running a Slackware installation and kernel revision 2.0.23.  Before
the network is configured, I run the isapnp program (in /etc/rc.d/rc.M right 
after the hostname is set:


# EZA
# Setup plug and play devices
/sbin/isapnp /etc/isapnp.conf


Then, the first thing in /etc/rc.d/rc.inet1 I load the network driver


# EZA
# Load networking card module
/sbin/insmod 3c509

I just ignore the warning at boot time that run-time probing for the 
ethernet card won't work because it has never failed for me. Finally,
in /etc/rc.d/rc.local I insert the sound driver module: 


/sbin/insmod sound


More information about Linux plug and play is available from:
http://www.redhat.com/linux-info/pnp/
I'm now happly surfing the net using the Real-Audio player and listening 
to CDs on my cdrom drive! 

Eric Ayers
eric.ayers@compgen.com

---------------------------------------------------------------------------
Here's a copy of my isapnp.conf file with most of the comments removed.

# Trying port address 0203
# Board 1 has serial identifier 67 00 00 40 17 2b 00 8c 0e

# (DEBUG)
(READPORT 0x0203)
(ISOLATE)
(IDENTIFY *)

# Card 1: (serial identifier 67 00 00 40 17 2b 00 8c 0e)
# CTL002b Serial No 16407 [checksum 67]
# Version 1.0, Vendor version 2.0
# ANSI string -->Creative SB16 PnP<--
#
# Logical device id CTL0031
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy

(CONFIGURE CTL002b/16407 (LD 0
#     ANSI string -->Audio<--

# Multiple choice time, choose one only !

#     Start dependent functions: priority preferred
#       IRQ 5.
#             High true, edge sensitive interrupt (by default)
(INT 0 (IRQ 5 (MODE +E)))
(DMA 0 (CHANNEL 1))
(DMA 1 (CHANNEL 5))
(IO 0 (BASE 0x0220))
(IO 1 (BASE 0x0330))
(IO 2 (BASE 0x0388))
(ACT Y)
))

(CONFIGURE CTL002b/16407 (LD 1
(INT 0 (IRQ 11 (MODE +E)))
(IO 0 (BASE 0x01e8))
(IO 1 (BASE 0x03ee))
 (ACT Y)
))


(CONFIGURE CTL002b/16407 (LD 2
#     ANSI string -->StereoEnhance<--
#     Logical device decodes 16 bit IO address lines
#         Minimum IO base address 0x0100
#         Maximum IO base address 0x0138
#         IO base alignment 8 bytes
#         Number of IO addresses required: 1
#(IO 0 (BASE 0x0100))
#(ACT Y)
))


(CONFIGURE CTL002b/16407 (LD 3
(IO 0 (BASE 0x0200))
(ACT Y)))

[ 15 January 1998
  The Linux Swap Space mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Swap Space mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

	   SHARING SWAP SPACES BETWEEN LINUX AND MS-WINDOWS

			     A mini-HOWTO
				  by
			    H. Peter Anvin
			 <hpa@yggdrasil.com>

		Copyright  1994, 1995 H. Peter Anvin

VERSION: 1.3						Date: 19 Jun 1995

0. ABSTRACT

Many people use both Linux and MS-Windows.  The ability to do so is an
important part of "the Linux revolution"; i.e. letting people
experiment with (and get hooked on) Linux while still being able to
run their off-the-shelf software.  Since both Linux and MS-Windows use
virtual memory with swap to disk, a frequently occurring question in
comp.os.linux.setup is how to share swap spaces, in order to reduce the
amount of disk space needed.

There are several methods for sharing swap spaces, the one described
in this document is probably the most complicated one but is the only
one I have encountered that allows maximum performance for both
environments without the risk of trashing a disk partition.

NOTE: If you have used a previous version of this document and have
had problems with swap space not getting properly restored (Windows
claims your permanent swapfile is corrupt), try the slighly revised
shutdown script in this version.

1. WHAT YOU NEED

This procedure have a few requirements that need to be filled.  I
strongly recommend that you fill these requirements *anyway*, as there
are several problems with older versions.

	* MS-DOS 5.0 or newer
	* MS-Windows 3.1 or newer
	* A shutdown/init that knows to run a file on shutdown.
	  (The SysVinit-2.50 package can do this, for example.
	  SysVinit-2.50 is available from sunsite.unc.edu in
	  /pub/Linux/system/Daemons.  Almost all current distributions
          use this init package.)
          
2. THE PROCEDURE
  
* Boot DOS.  Create a DOS partition (using FDISK) the size = the size
  swap space you want.  It will be assigned a drive letter; use that
  drive letter instead of X whenever these instructions lists a
  command like "LABEL X:" or "COPY FOO X:DUMMY.DAT"

* Format this partition using the DOS FORMAT command.
	FORMAT X:

* Set the volume label on this partition to "SWAP SPACE" using the DOS
  LABEL command.  Verify it by the DIR command.  Please do this as a
  separate step.  Some versions of FORMAT do not seem to put the
  volume label in the boot sector as it should.  [Note: some people
  has written me saying the volume label is stored in the root
  directory.  Yes, but at least since DOS 5.0 it has also been in the
  boot sector.]
	LABEL X:
	DIR X:

* Start Windows.  Go to the Control Panel, select "386 Enhanced".
  Select "Virtual Memory" and create a Windows Permanent swap file on
  drive X: of maximum size (Windows will tell you the maximum size).
  Windows may complain saying it will not use a swap file that big.
  Ignore the message and create the file anyway.

* Exit Windows.

* Boot Linux, then log in as root.

* Use the fdisk command to find the name of the partition and its size
  in blocks.  Create a symbolic link from /dev/winswap to this
  partition.  If the paritition is hda7, then type:
	ln -s /dev/hda7 /dev/winswap

  [NOTE TO PURISTS: Please use a symlink.  The name of this partition
  is going to go into several configuration files and inconsistencies
  could be fatal.]

* The following is a uuencoded binary that analyzes the partition and
  derives some special information; uudecode the following file,
  gunzip it and run it as:

	msinfo /dev/winswap

begin 755 msinfo.gz
M'XL(`$$YNRT"`Y557TQ;51@_MW]HZ0AM'"$U-.28W([..>84%1%D2QH>',9*
M2S&VC);V=FV]T*;WWBD+1I)K'YH;DOJF#YH80GPR^J""D"R8-K('MS2;#Q*S
M%Y,E-P&592A$V:[?.;?M"FP/?DG/G^_[?7_Z_3G7PL313TT(?8P0<J"CI':8
M$5H^#:=5<KT^MQ`^UAQ1O*QUH0<.]B7S/FC[U!98Y;))]<*N^AG"^LB((J%E
MAFIM[A9U0O`;%:*7N#[L%G!_-IH34V(J,WUZ.CK%O6I#N4DTE,E-144Q-7T)
M>]_PX\M<3@!`'ZZ26[`-I7A.F!%$;JK.;21`!#.\-,5A/CK)\=B3FL:3F8PH
M<#$QDSO91Q%^>L%"Z@KW*"-NR3;""5SN,A?'NI[0=P0Q=#[P&&$5@3UNZ3VW
M=-(V`NYQ/)6CX)DC2F`KD!&C/!:R7"Q%]L-6`8'D+=]8T*^$V8@RR\;5\P9(
M^;\&T:F]E`Q`EI,_6YHCZBT#BJ09M0VV9!:XVKLF]0NX%'Z4R];\W](3A-%J
MI:`_&12!>@33QC0S'V8]?O5+0`;3UC23K)!"?@97N8R#:29MF/>R)PI>UJF)
MK%/-4QR39OSJE8,8MHZ)UC#`?1ZX'N!ZU`L'X;@.?X["C<1DUT%,9QW32C''
M"<98PQR#8#=(L'>96NQWR/4W1@>H3\'!OC3,MMN_"[,=A1OVK^XEH($[$S^H
MY@28=MB78-$/`=8)(L=\P*$5*I_LS@)_G7!=\Z9V@F"``Y$XQM[T!T>(WHNU
M/T9CH)YIZI("&9ZK32AR=DTN/QNZ."&7?27H_<(=_^=Q"U1N3Y.>!-E`$BY(
M;(4ZG)/[\_0F_54HY7\5[<!33)\2M%:Y(.THX_N%K?%2L9&(O=4>8F^@IV9(
M,<HEDU:17T'23M)GA#ANW-<F'J5-]>6!G2;BU+YN)@<RL.JBIFD4[:<###UG
MO3Z77WO?L?O+@@G\+(-<"X&QT"&#_N7@_\2;JGAEF&U1`JR#ZCD/Z]7HJ'ZH
M09_JNAZGJ^N?X5.39_AXMY!!?3@6G>X2,9^)QG%\!IZ@5`SSJ>EWN!SN>HCK
MLJ%F08R*J5B4YV=T0-R&J#UYJW>4#"7/#D,0/GG`0ZI@__`;6->]K!>C[<GD
M31/IQP>:!B]D?DT,*<;Y6=9Y]3:P][^W`?+>8F(1!*ZY7B1:BN=@D_XY9?0I
M'?ZT0=V@BBWIIV$47#Y@7-,9Q>0<*=7;NMW-NS2>9#_X3V)8()?A$;!`ALRW
M#&\%RO_^@9F6TP<]'M8J@'AFA"[JM]0(WCQ!`[.826!F&A@HG4JWU5R_KKL&
M9GNQF$;J[?NZ\YUZ?B].C,OEWI*\94J`:6LB?U,RK^2.([0QRQK(W!D2[K5M
M,G>&0B7A'K03F"'17*&L#9XU@+U2L9K4-GCIG(K(NE:SM,>SM,?;X,T:&U6,
MT./E%NAUTNE_$,^E(A0M!B7K[D'>X6'\FC25Q3W=+V3YLR^CXJW.S0>#54*#
M#ZE^AI+N-35^_>![U4!?@VQ%ET<L!BC>MC5"\GH->"T6'4/2NS>((N0,DT>_
9K6^!S%65KRS`,`,UVB43\!]-BKG]B`<``#5"
`
end

  Take note at the number saying "Total special sectors", and verify
  that the volume label says "SWAP SPACE".  If it does not, reboot DOS
  and re-do the LABEL command.  If it still does not work, please
  inform me about which version of DOS you are running, and I will try
  to help you out.

* [Optional step] Windows may occationally leave some space on the
  partition, even if it is told not to.  Don't attempt to use this
  space, since it will be erased any time you run Linux.  If you want
  to avoid accidentally using it (and lose data), you can create a
  dummy file that fills that space by using the following commands:
	mkdir /mnt
	mount -t msdos /dev/winswap /mnt
	dd if=/dev/zero of=/mnt/dummy.fil
	umount /mnt  

  The dd command will report "No space left on device".  This is
  exactly what you want.

* Check the name of the shutdown file.  For SysVinit this is the file
  listed in the following line of /etc/inittab; add it if you don't
  have it.

	# Runlevel 0 means shut down the system
	l0:0:wait:/etc/brc

  For the remainder of this file, I will assume the filename was
  /etc/brc.

* Type:

	dd if=/dev/winswap bs=512 count=XXX | gzip -9 > /etc/winswap.gz
                                        ^^^
                                        Replace
  ... where XXX is replaced with the "Total special sectors" number.

* Add the following piece of code to your /etc/rc file (or whatever
  your init calls it), right before the command "swapon -a" (if there
  is no such command, add it to your /etc/rc file right before any
  mount commands). 

  If you have a directory /etc/rc.d, the file you want to put this in
  should be called "/etc/rc.d/rc.S" or "/etc/rc.d/rc.boot".

  If your swapon is in /etc, replace /sbin/swapon with /etc/swapon.
  If it is in /bin, replace with /bin/swapon.  Do the same for mkswap.

  Replace XXXXX with the actual size of the partition in blocks, as
  given by fdisk.
 
---[BEGIN CODE SEGMENT]---
#
# Verify and initialize swap space
#
echo -n 'Verifying swap space... '
if [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=10 skip=4086`" \
   = 'SWAP-SPACE' ]; then
  echo 'Linux signature found'
  /sbin/swapon /dev/winswap
elif [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=11 skip=43`" \
   = 'SWAP SPACE ' ]; then
  echo 'DOS signature found'
  /sbin/mkswap /dev/winswap XXXXX
  /sbin/swapon /dev/winswap
else
  echo 'No signature found'
  echo 'ERROR: Will not swap'
fi
---[END CODE SEGMENT]---

* Add the following piece of code to your /etc/brc file (or whatever
  it is called -- it is /etc/rc.d/rc.0 or /etc/rc.d/rc.halt if you
  have an /etc/rc.d directory); put this after any command that might
  need swap to be in place.

---[BEGIN CODE SEGMENT]---
#
# Terminate swapping and restore DOS/Windows swap info
#
/sbin/swapoff /dev/winswap
if [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=10 skip=4086`" \
   = 'SWAP-SPACE' ]; then
  echo 'Restoring DOS/Windows swap info'
  /bin/zcat /etc/winswap.gz > /dev/winswap
else
  echo 'ERROR: /dev/winswap lacks swap signature, skipping restore'
fi
---[END CODE SEGMENT]---

* Reboot Linux.  You should now have swapping on the new swap device.

3. A COUPLE OF NOTES

* There is no need to add /dev/winswap to your /etc/fstab file.  In
  fact, it is probably wise not to do so (except possibly as a
  comment).

* If your Linux session crashes or otherwise exits without running
  /etc/brc, you will need to reboot and exit Linux before swapping in
  Windows will work.  It is also possible to FORMAT X: and re-create
  the Windows swapfile.  The only way around this would be to put the
  equivalent of the /etc/brc commands in the DOS AUTOEXEC.BAT file;
  unfortunately I don't know of any way of doing that in DOS!

* If DOS' FDISK reports the partition as a "logical DOS drive", it has
  a number of 5 (as in /dev/hda5) or higher.  It is *NOT* the
  partition labelled "extended" which has a number of 4 or less!!  If
  your Linux fdisk does not display logical partitions, you have a
  broken Linux fdisk (Slackware 2.2 included a broken fdisk, for
  example.)  You can try "cfdisk" if your distribution has it, or you
  will have to get a working fdisk.

* If you get a floating point exception when running msinfo, you are
  almost certainly running it on the wrong partition.  See the above
  note.

* Please do not mail me unless you have checked and re-checked that
  you copied your scripts correctly.  More than half of the problems
  reported with this Mini-HOWTO have been due to typos when copying
  the scripts.  (Use cut-and-paste if you can!)
F COLOUR-L.;1                       	Colour-ls
F COMEAU-C.;1                       	Comeau-C++
F DIAL-ON-.;1                       	Dial-On-Demand
F DIP_SLIR.;1                       	Dip+SLiRP+CSLIP
F DYNAMIC-.;1                       	Dynamic-IP-Hacks
F GRAVIS-U.;1                       	Gravis-Ultra-Sound
F GUI-DEVE.;1                       	GUI-Development
F HTML-VAL.;1                       	HTML-Validation
F JAZ-DRIV.;1                       	Jaz-Drive
F JE.;1                             	JE
F LINUX_DO.;1                       	Linux+DOS+Win95
F LINUX_OS.;1                       	Linux+OS2+DOS
F LINUX_WI.;1                       	Linux+WinNT
F MIDI_SB.;1                        	MIDI+SB
F ONLINE-S.;1                       	Online-Support
F PAGER.;1                          	Pager
F PPP-OVER.;1                       	PPP-over-ISDN
F PPP-OVER.000;1                    	PPP-over-minicom
F PRINT2WI.;1                       	Print2Win
F PROXY-AR.;1                       	Proxy-ARP
F SLIP_PRO.;1                       	SLIP+proxyARP
F SOUNDBLA.;1                       	Soundblaster-16
F SWAP-SPA.;1                       	Swap-Space
F TINY-NEW.;1                       	Tiny-News
F VIRTUAL-.;1                       	Virtual-Web
F WIN95_WI.;1                       	Win95+Win+Linux
F X-NOTEBO.;1                       	X-Notebook
F XTERMINA.;1                       	Xterminal
[ 14 October 1997
  The Linux Tiny News mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Tiny News mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

******************submisson for "Tiny-News-HOWTO"**************************
*********************NOTE UPDATED PERMISSION*******************************

Copyright (c) May 25, 1995 Kent Lewis (Kenneth M. Lewis, Jr.)

If this document is accepted by the Linux Documentation project, permission
is granted to make it distributable in accordance with the LDP HOWTO 
distribution policy, with the stipulation that the author would like to
review it in its final form before LDP releases it.

                             ************

I am a Linux user whose net access consists of a ppp link which is not up
all the time.  My internet service provider is in another town, so I have
to pay phone tolls while I'm online.  This can quickly add up, so I've been
working on ways to keep costs down but still make the most of my net access.

Until recently, I've had to stay online to read Usenet news remotely from
the provider's NNTP server.  This burned up a lot of online time.  I went
looking for a solution, and found one that suits me.  Hopefully it can help
others, too.  I respectfully submit this "Tiny-News-HOWTO."  It describes
how to use INN to make a small news spool that contains only the newsgroups
you're interested in.  Articles are pulled and replies are posted in one
compact online session via a simple perl script.  All this is of course
"alpha."  If something comes up that's not covered here, you'll have
to fix it yourself.

You need access to an NNTP server.  Telnet to port 119 of the machine you
want to use, to make sure it allows reading and posting.  You should get
a message which will indicate whether or not this is allowed.  If not,
then iron out your access problems before going any further.  If you're
already using the machine to read/post remotely, then you know you have
the necessary access.

You need enough disk to hold your news spool.  I have a Linux partition that
is about 300M, and two days' worth of news for about 15 newsgroups only takes
up one or two percent of disk as listed by 'df'.  I recommend starting with a
small number of newsgroups and working your way up, just to be safe.

You need perl and INN.  If you don't have them, you can get them by anonymous
ftp from sunsite.unc.edu (or mirror sites).  Last time I checked, perl was
in /pub/Linux/devel/perl and INN was in /pub/Linux/system/Mail/news. 

Install INN and perl, if you haven't done so already.  I got INN from the
Slackware 2.2 distribution, and it included good documentation.  Follow the
steps in the docs and you'll be fine.  As for perl, I'm using the precompiled
perl 4.0pl36 that came with Slackware 2.2.  If you don't have access to an
out-of-the-box perl binary, then you're on your own as far as compilation/
installation goes.

Be sure you have the "junk" and "control" groups, or innd won't start.
You'll have to put these in manually, before you ever start innd, since
'ctlinnd' assumes innd is already running.  After that, use INN's
'ctlinnd newgroup ... ... ' to make the empty news spool.  See the man
page for 'ctlinnd.'

Set up a newsfeed to the NNTP server you will be using.  You won't actually
be doing a newsfeed in the intended sense, but this will make INN create
a file in /usr/spool/news/out.going that the perl script below uses to find
and post articles you've composed offline.  Instructions for setting up the
feed are in the INN docs.  See the man page for 'newsfeeds.'  IMPORTANT:
You will need to set up your newsfeeds file so that the first field in the
file /usr/spool/news/out.going contains the full pathnames of the articles
you'll be sending out.  If the first field in the
/usr/spool/news/out.going/xxx file does not contain the articles' full
pathnames, then the perl script will attempt to post whatever appears in
that first field, which will probably produce undesirable results.

Be sure to configure your control.ctl file to keep new newsgroups from
automagically appearing in your spool and active file.  If you don't do
this, when control messages for new newsgroups come in, the load on your
system will go way up as the new groups are added, and things will slow down
considerably, which is contrary to the whole point of this HOWTO.

Change to the directory of your choice, and do a 'touch -t $YESTERDAY lastget'.
Replace $YESTERDAY with the time string for 24 hours ago.  See the man page
for 'touch'.

Now put the following perl script in the same directory, and
make it executable.  Replace $NEWSPATH with whatever directory the INN
package resides in (/usr/lib/news on my box).  Replace $SCRIPTPATH with
the path to the directory where the perl script will reside (the same one
where 'lastget' is--- /usr/local/news on my box).  Replace $PROVIDER with
the address of your NNTP server.  Replace $NEWSFEED with whatever you named
your news feed when you installed INN.  See the man pages for 'nntpsend' and
'inews' to see what this script does.


-----------------------------------------------------------------------------

#!/usr/bin/perl

##
## retrieve new articles
##

open(LIST, "$NEWSPATH/active")
	|| die "could not open list of active newsgroups";

while (<LIST>) {
  @newsgroup = split(' ', $_);  ## splits next line of the active file on
				## whitespace, assigns pieces to array 
				## @newsgroup. @newsgroup[0] now holds the
				## holds the name of the newsgroup

  system "$NEWSPATH/bin/nntpget -f $SCRIPTPATH/lastget -n @newsgroup[0] -o -v $PROVIDER"
	|| print "could not pull articles for @newsgroup[0]\n";
  }

close(LIST);

system "touch $SCRIPTPATH/lastget";


##
## strip the "NNTP-Posting-Host: " header out of my local posts, which are
## about to be sent
##

open(LIST, "/usr/spool/news/out.going/$NEWSFEED")
	|| die "could not open list of articles to be stripped";

while (<LIST>) {
  if (@article = split(' ', $_)) {
    $article = @article[0];	
    rename("$article", "$article" . '.bak');
    $backup = "$article.bak";
    open(OUTPUT, ">> $article");
    open(INPUT, "$backup");
    select(OUTPUT);
    while (<INPUT>) {
      print unless ?^NNTP-Posting-Host.*\n?
      }
    close(OUTPUT);
    close(INPUT);
    unlink("$backup");
    reset;
  }
}
select(STDOUT);

close(LIST);

##
## send the articles
##

$ENV{'NNTPSERVER'} = "$PROVIDER";

open(LIST, '/usr/spool/news/out.going/$NEWSFEED')
	|| die "could not open list of outgoing articles";

while (<LIST>) {
  if (@article = split(' ', $_)) {
    $article = @article[0];
    system "inews -h $article";
    }
  }

close(LIST);

------------------------------------------------------------------------------


That should do it.  Assuming you've named the perl script 'foonews,' then
next time you're online, type '$SCRIPTPATH/foonews' and hit return.  If
you see message ID's start to march down your screen, then you're in
business.  Note that things don't happen instantaneously.  You may have to
wait a few seconds before the first message ID appears.  When you're done,
you should have all the articles that have been posted since
$SCRIPTPATH/lastget was last modified, and all your locally posted articles
should have been posted to your NNTP server, which will pass them on
downstream.  $SCRIPTPATH/lastget should now have today's timestamp, so that
when you do 'foonews' tomorrow, you get all the articles that have been
posted between now and tomorrow's newsrun.

You'll have to wipe the /usr/local/news/out.going/$NEWSFEED file manually.
I purposely left this step out of the script for debugging reasons, and
haven't gotten around to fixing it yet.  The first time I tried all this
out, I verified that the articles had been posted to the remote server
before I wiped their entries.  You might want to do the same.

If you've configured INN correctly, then $NEWSPATH/bin/news.daily takes care
of maintenance quite nicely.  Right now I'm doing everything manually; you
might want to automate things with some crontab entries.

One last note:  I don't pretend that my script is elegant, or that this
method is foolproof or fail-safe.  But it is working for me, so I wanted
to share it.


Thanks to everyone who has made Linux the ton of fun that it is.


****************************************************************************

Kent Lewis
kent@fiona.umsmed.edu


[ 7 October 1997
  The Linux Virtual Web mini-HOWTO is not being maintained by 
  the author any more.  This topic will be covered in the new
  version of the Linux WWW HOWTO. ]

VirtualWeb-Mini-HOWTO

Dan Pancamo, pancamo@infocom.net http://www.infocom.net/~pancamo/

v1.0, 24 November 1995  Copyright 1995

This HOWTO discuss the essentials of setting up a Virtual Web Site under Linux.

Table of Contents

1.0 What is a Virtual Web Site?
2.0 What software patched do I need?
    2.1 Linux versions 1.2.X requires the IPalias patch alias-patch-1.2.1-v1
    2.2 Both NCSA 1.5 and Apache support Virtual hosting.
3.0 How Do I set it up?
    3.1 Creating the new account
    3.2 Setting up the NCSA 1.5 and Apache config files
    3.3 Configuring the interface
    3.4 Registering with Internic
    3.5 Configuring Named
        3.5.1 Example /etc/named.boot (replace x with your IP)
        3.5.2 Example /etc/named.data/db.domain1.com
        3.5.3 Example /etc/named.data/db.xxx.xxx.xxx
        3.5.4 restart named;  i.e. named.restart
    3.6 Virtual Mail
        3.6.1 Sendmail configuration
        3.6.1.1. Create /etc/domainalias
        3.6.1.2 Create the maped DB file
        3.6.1.3.1. Add a Cw record for each host
        3.6.1.3.2. Add the domainalias mapping
        3.6.1.3.3. Add/Change Ruleset 98
    3.7 Virtual FTP

4.0  Links to more Virtual Web Information

1.0 What is a Virtual Web Site?

    A World Wide Web (WWW) Server is normally a single machine dedicated to
    processing HTTP requests for a single WWW site.  Simply put, one WWW site
    per machine.  Since the computing resources for processing httpd requests is
    low for most WWW sites, the majority of the computing resources are left
    unused.  A virtual WWW site simple allows more than one WWW site to share a
    single processor.  Instead of having www.domain1.com and www.domain2.com
    requiring two physical computing devices, www.domain1.com and
    www.domain2.com can be located on a single computing device and share common
    resources.

    Normally small computing facilities, and small businesses do not have the
    resources to maintain a dedicated web server and a dedicated Internet
    connection.  These cost can easily start off at $10K for setup, and
    $500-2500 monthly to maintain.  Small computing facilities, and small
    businesses are now able to "rent" WWW space from a Virtual WWW providers.
    The customer can then maintain the WWW "pages" using a local telnet and/or
    FTP connection.

    WWW providers such as InfoCom Networks http://www.infocom.net/
    provide WWW space as low as $75 per month. A few Virtual Sites
    might clear up the mystery.  So the cost of setting up a WWW site is
    significantly lower than that of setting up a dedicated server and
    connection.  The Virtual Site has a major advantage over other WWW
    addressing schemes such as "www.yourprovider.com/~businessname".  The
    Virtual WWW server inherently contains the ability to move to a new location
    or setup a dedicated WWW server without changing addresses.  Changing WWW
    URL's can result in a major loss of traffic to your site, and lots of
    business literature updates.

    With most web sites, www.domain1.com and www.domain2.com both resolve to
    separate IP's.  In order to accept multiple request from a single host, the
    virtual host must be able to answer request for both sites. The method used
    to solve this problem is called IP aliasing.  IP aliasing allows a single
    host to accept request for multiple IP's.  The virtual Web server must have
    the ability to alias IP's

    IP aliasing is just one part of the virtual solution. The Domain Name System
    (DNS) also must be configured to resolve both www.domain1.com and
    www.domain2.com.  If domain1.com and domain2.com are new domains, then both
    must be registered with Internic. Currently, Internic is charging $50 a year
    to maintain your domain.

    Most virtual WWW sites should also provide virtual mail, or the ability to
    forward all mail to the virtual domain to another user or users.

    Virtual FTP or the ability to FTP using the standard host name
    "ftp.domain1.com" should also be configured by the WWW provider.

2.0 What software patched do I need?

    2.1 Linux versions 1.2.X requires the IPalias patch alias-patch-1.2.1-v1
        and alias-net-tools.tar. I'm not sure if 1.3.X supports this patch yet.
        For more information on the IPalias patch see
        ftp://ftp.mindspring.com/users/rsanders/ipalias/

        Using multiple dummy interfaces has been suggested in place of
        the IPalias solution.  While the dummy solution may work,
        it does not appear to be as clean as the IPalias solution.
        For more information on using Apache and the dummy solution
        see Aram Mirzadeh's virtual hosting information at
        http://www.qosina.com/apache/virtual.html

        All that is required to add a new alias using the IPalias method is:
        > /sbin/ifconfig eth0 alias www.domainX.com

        Also, the IPalias solution is supported on several other platforms.

    2.2 NCSA 1.5, Apache, and Spinner support Virtual hosting.
        http://hoohoo.ncsa.uiuc.edu/docs/Overview.html
        http://www.apache.org/
        http://spinner.infovav.se/

3.0 How Do I set it up?

    3.1 Create the new account
        Create a regular Linux account for the virtual customer with home
        directory and mail.

    3.2 Setup the NCSA 1.5 or Apache config files

        Virtual Host implementations are still changing.  A few patches
        exist to support Virtual Host Check the server's release notes for
        more details.  NCSA 1.5 or Apache now include the Virtual patches,
        and I have been told that Spinner supports virtual hosts.

        One virtual patch supports the following srm.conf syntax, however
        the second NCSA 1.5 method of defining a Virtual host allows
        for greater flexibility

           SubDocumentRoot www.domain1.com /usr/local/etc/httpd/docs/domain1
           SubDocumentRoot www.domain2.com /usr/local/etc/httpd/docs/domain2


        NCSA and Apache support the following httpd.conf syntax:


           ServerAdmin webmaster@domain1.com
           DocumentRoot /usr/local/etc/httpda/docs/domain1
           ServerName www.domain1.com
           ErrorLog logs/errors.domain1.com
           TransferLog logs/access_log.domain1.com


    3.3 Configuring the interface

        Once the IPalias patches have been installed add the
        following to your /etc/rc.d/rc.local on your local web server.

           /sbin/ifconfig eth0 alias www.domain1.com
           /sbin/ifconfig eth0 alias www.domain2.com
           /sbin/ifconfig eth0 alias www.domainN.com

    3.4 Registering with Internic

        If you are setting up a new domain or change a current
        domain, you must register the domain with Internic.
        The template can be found at
        ftp://rs.internic.net/templates/domain-template.txt


    3.5 Configuring Named

        Named will need to be configured so that your virtual domain will
        be visible to the outside world.  I don't claim to be an expert
        on DNS.  Suggestions always welcome.

        3.5.1 Example /etc/named.boot (replace x with your IP)

              directory /etc/named.data
              primary           realdomain.com                  db.realdomain.com
              primary           xxx.xxx.xxx.IN-ADDR.ARPA        db.xxx.xxx.xxx
              primary           0.0.127.IN-ADDR.ARPA            db.local

              primary           domain1.com                     db.domain1.com
              primary           domain2.com                     db.domain2.com
              cache             .                               named.root

       3.5.2 Example /etc/named.data/db.domain1.com

             $ORIGIN com.
             domain1    IN      SOA     domain1.com. hostmaster.domain1.com. (
                        10134 43200 3600 604800 86400 )
                        IN      NS      ns1.realdomain.com.
                        IN      MX      10 mail.realdomain.com.
                        IN      MX      0 domain1.com.
           domain1.com. IN      A       xxx.xxx.xxx.xxx    ;www.domain1.com IP

             $ORIGIN domain1.com.
             ftp        IN      CNAME   domain1.com.
             www        IN      CNAME   domain1.com.
             mail       IN      CNAME   domain1.com.

       3.5.3 Example /etc/named.data/db.xxx.xxx.xxx

             You should already have a db.xxx.xxx.xxx for your current site
             update it to contain the new virtual domains for reverse lookups

                xx              IN      PTR     www.domain1.com.
                xx              IN      PTR     www.domain2.com.

       3.5.4 restart named;  i.e. named.restart

    3.6 Virtual Mail

        Your virtual customers will more than likely want the ability to have
        mail that is sent to their domain forwarded to another domain.  A few
        sendmail.cf changes will do the trick. After several months of
        trying different sendmail changes, this is the 1st method that I
        found that works and requires only one sendmail.cf change for each
        new virtual site.

        3.6.1 Sendmail configuration

          Retrieve the current version of sendmail that contains makemap btree support

          3.6.1.1. Create a file called /etc/domainalias with the following mappings:

                *@domain1.com           localnet@realdomain.com
                *@domain2.com           townplaz@realdomain.com
                *@domainN.com           soracomp@realdomain.net

                webmaster@domain1.com   somuser@anotherhost.com
                jamison@domain2.com     anotheruser@somehost.com

          3.6.1.2 Create the maped DB file

                > makemap btree /etc/domainalias.db  < /etc/domainalias

          3.6.1.3. /etc/sendmail.cf changes:

            3.6.1.3.1. Add a Cw record for each new virtual host

                Cwdomain1.com
                Cwdomain2.com

            3.6.1.3.2. Add the domainalias mapping only once

                 Kdomainalias btree /etc/domainalias.db

            3.6.1.3.3. Add/Change Ruleset 98

                ###################################################################
                ###  Ruleset 98 -- local part of ruleset zero (can be null)     ###
                ###################################################################

                S98

                R$+ < $+ . >          $1 < $2 >                         remove trailing dots
                R$+ < $+ >            $: < > $(domainalias $1$2 $)      match user@address
                R< > $+ @ $*          $: < $1 > $(domainalias * @ $2 $) match *@address
                R< $+ > * $*          $: < > $1 $2                      replace * with userid
                R < $+ > $+           $: < > $2                         bugfix
                R< > $*               $: $>3 $1                         and rewrite using S3


          3.5.1.4  Sendmail Testing
                Test the sendmail configuration to verify the new
                sendmail.cf changes
                > sendmail -v -bv info@domain1.com
                The final destination should be displayed.


    3.7 Virtual FTP

        Currently, I have not been able to get Virtual FTP to work.
        A few patches exist, and I'm sure a working patch exist.
        We just create a working directory  /home/ftp/business/domain1,
        but a true Virtual FTP would be nice.

        If anyone would like to contribute a solution, I would be more
        than happy to add it here.

        Arnt Gulbrandsen has rewritten ftpd and has included support for
        independent FTP services The Troll Tech FTP Daemon

    4.0  Links to more Virtual Web information

        http://hoohoo.ncsa.uiuc.edu/docs/Overview.html
        http://www.apache.org/
        http://www.qosina.com/apache/virtual.html
        http://spinner.infovav.se/
        ftp://ftp.mindspring.com/users/rsanders/ipalias/
        http://www.thesphere.com/~dlp/TwoServers/
        http://hoohoo.ncsa.uiuc.edu/docs/setup/httpd/VirtualHost.html
        ftp://ftp.dhp.com:/pub/linux/virtual-hosting

[ 15 January 1998
  The Linux Win95+Win+Linux mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Win95+Win+Linux mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

                Windows 95 + Windows 3.x + Linux Howto
             Robert Goodwin <Robert.Goodwin@mcc.ac.uk>
                            August 1996

  0. Introduction

  This document was originally written in Jan96. I have incorporated
  various comments, information, and questions received since then.
  This document is also avilable in Japanese; see the collection of
  Japanese linux docs at http://epsenewsc.gee.kyoto-u.ac.jp/JF/JF.html

  1. Booting Multiple Operating Systems

  If you want to boot multiple operating systems (and you don't want
  to have to boot them from floppy disk!), you need to use some
  sort of BOOT MANAGER.

  Win95 doesn't really *have* a boot manager - it has boot options,
  but in my book a "boot manager" can be configured to boot anything.

  Lilo can be configured to boot almost anything, as can the OS/2
  boot manager and the Windows NT boot manager. Which of these you
  use is really up to you; it depends what you want on your system.
  If you use the OS/2 manager, for example, it "hides" the "other"
  DOSsy partitions from you.


  2. Other Places You Might Look

  If you just want Win95 and Linux, then you probably want the
  Win95+Linux Howto. The latest version can be found at:

       http://www.in.net/~jkatz/win95/Linux-HOWTO.html

  Win95 and Linux can be installed on a single drive; the problems
  covered in the rest of this document revolve around DOS not allowing
  more than ONE primary DOS partition per drive.

  If you want to use the NT boot manager, take a look at 
  http://www.bcpl.lib.md.us/~dbryan/directboot.html
  To add Linux (or others, including OS/2), there's a nifty little
  program that makes boot sector files for use with the NT loader.
  You can find information about this at
  http://ourworld.compuserve.com/homepages/gvollant/othertl.htm

  You might also investigate LOADLIN.EXE which allows you to "boot"
  Linux by first booting into DOS.


  3. Why this HOWTO?

  This document addresses the following issues:

  * How to get Win 3.x to live on the same machine as Win95 without
    problems (and what those problems might otherwise be)
  * How to avoid problems on a machine with Win95 which can also
    remote boot DOS
  * How to install Win95 with Linux without having to reinstall lilo
    (with the tedious booting of Linux from floppy)

  Although the Win95 filesystem lives on top of the standard DOS FAT,
  it does some pretty unpleasant things to it. Boot your Win95 machine
  from a bootable DOS floppy and get Norton to check the disk (but
  DON'T let it attempt any repairs or you'll mess up some "long"
  filenames)

  I am currently required to support applications in the Win95
  environment as well as under Win3.x (both run locally and network
  booted). I developed the setup described in this document to allow me
  to do all this with just one PC.

  Don't ask how a Unix person ended up in this position :-)


  4. Requirements

  If you are prepared to tinker with the source to lilo (lilo 1.7
  or later, I belive), it is possible to do all this with ONE
  hard disk. This works by changing the contents of the partition
  table as the system boots; if you don't feel confident about trying
  this, then don't!

  Otherwise, you will need TWO hard disks. This is due to some
  DOS/Windows limitations with respect to booting and allocation of
  drive letters. Believe me, I tried to get it working with one.
  (but I didn't want to mess with the lilo source)


  5. What you will end up with

  A word on device names. I have seen systems which use /dev/hdc for
  the 3rd IDE disk (first IDE disk on secondary controller) and
  /dev/hdd for the fourth. I've also seen systems which use /dev/hd1a
  and /dev/hd1b (giving such partitions as /dev/hd1a3 etc). My system
  uses this second naming style, but I have changed to names to
  /dev/hdc and /dev/hdd to minimise confusion.

  Here is a brief description of what I now have - watch those drive
  letters because they change...

  If you use a secondary IDE controller, you may need to create the
  /dev entries yourself (/dev/hdcd* and /dev/hdd*) This might be the
  case if you add a second hard drive to a machine with one IDE disk
  and an IDE CDROM already installed; your second hard disk would be
  /dev/hdc. I have tried this arrangement with no problems.

  I have: /dev/hda  - first hard disk
          /dev/hdb  - cd-rom drive
          /dev/hdc  - second hard disk

  Option 1:
    On powering up the machine, I can allow the boot ROM on the
    ethernet card to remote boot DOS. The "C" drive is the first DOS
    partition on the FIRST IDE disk (in my case /dev/hda1). The "D"
    drive is the first DOS partition on the SECOND IDE disk (in my
    case /dev/hdc1), and the "E" drive is the second DOS partition on
    the SECOND IDE disk (/dev/hdc2). The CD-ROM becomes F:

  Option 2:
    Allow lilo to boot the default system (Linux, naturally)

  Option 3:
    Interrupt lilo and ask for an option I call DOS. This boots DOS
    from /dev/hda1, and, as with option 1, the "C" drive is /dev/hda1
    the "D" drive is /dev/hdc1 and the "E" drive is /dev/hdc2. The
    CD-ROM becomes F:

  Option 4:
    Interrupt lilo and ask for an option I call Win95. This boots
    Win95 from the first DOS partition on the SECOND IDE drive (in
    my case /dev/hdc1). Follow this carefully: the "C" drive is now
    the first DOS partition on the SECOND IDE disk (/dev/hdc1),
    the "D" drive is now the first DOS partition on the FIRST IDE
    disk (/dev/hda1), and the "E" drive remains the second DOS
    partition on the SECOND IDE disk (/dev/hdc2). The CD-ROM
    becomes F:

  Notice that the C drive changes depending how you boot. This means
  that when you install Win95, you install it to C:\WINDOWS, and when
  you install Win3.x, you install it to C:\WINDOWS but this isn't the
  same place :-)

  Also notice that the third DOS partition (which I use as a general
  data drive) is E: whichever way you boot, and that the CD-ROM
  stays constant too.


  6. How to do it

  First of all, install Linux;  it does not matter which drive you
  install it on; but since you are using two drives it makes sense to
  create a swap partition on each.

  Create a primary DOS partition on the second disk. Unfortunately, the
  DOS FDISK won't let you do this, so you must use the Linux fdisk to
  create the partition, set the type (6 for DOS 16 BIT FAT > 32Mb), set
  the partition as bootable, and CAREFULLY follow the advice on the man
  page for fdisk. This describes how to persuade DOS to recognise a
  partition created in this manner using the dd command to zero the
  first 512 bytes of the partition. (Basically, you use
  "dd if=/dev/zero of=/dev/XXXX bs=512 count=1" where XXXX is the
  device but be VERY careful since this is a good way to trash a disk
  - for example by putting /dev/hda instead of /dev/hda1!)

  Creating the primary DOS partition on the first hard disk can be done
  with the DOS FDISK. Any other required DOS partitions can similarly
  be created.

  Both of these primary partitions must be formatted as bootable DOS
  partitions; use FORMAT C: /S and FORMAT D: /S having booted from a
  floppy. In order to avoid confusion, give the partitions meaningful
  volume labels!

  Edit /etc/lilo.conf to give you the option of booting from either
  of the two primary DOS partitions. I have appended an example
  to the end of this document. Note the use of the "loader" line in
  this example file.  Which you choose to install as Win95 and which
  as DOS/Win3.x is up to you; I used the second hard disk for Win95
  since network booting of the machine then gives the normal DOS
  drive as "C". Also (and usefully), installing Win95 on the second
  hard disk avoids having to boot linux from a recovery disk and
  re-install lilo (why this should be is explained below). Remember
  to run lilo to install the options.

  If you are (sensibly) planning to install Win95 from CDROM, you
  will need to include the relevant drivers on the Win95 partition
  such that when you boot from it, the CDROM drive will be accessible.

  Now boot, using lilo, from the drive you wish to use for DOS/Win3.x
  and install the rest of DOS and Win3.x - the Windows installation
  should go to the C:\WINDOWS directory as per default.

  Once this is done, reboot the machine and, using lilo, boot from the
  Win95 partition. Perform your Win95 installation. The installation
  procedure may suggest D:\WINDOWS for installing Win95 because it
  searches the machine for existing WINDOWS versions - DON'T accept
  this - install Win95 to C:\WINDOWS.

  Now for the neat part! Win95 is a rather arrogant system - when you
  install it, it assumes that it is the only operating system on the
  machine and proceeds to write its own MBR (Master Boot Record) to
  the hard disk. This is why you generally need to re-install lilo.
  If you have installed Win95 to the second hard disk, you have done
  something which the Microsoft(tm) programmers didn't consider.
  On one machine where I performed this operation, Win95 wrote its
  replacement MBR to the MBR of the SECOND hard disk. On another, I
  never found any evidence of it at all. The practical upshot of this
  is that the MBR which matters, that of the first hard disk, is
  not disturbed. Thus when you reboot the machine, you will be greeted
  by the friendly and familiar LILO prompt.

  Example Partition List:
  /dev/hda1  *   DOS partition  (C: or D: depending upon boot)
  /dev/hda2      Extended partition
  /dev/hda5      /
  /dev/hda6      swap
  /dev/hda7      /home

  /dev/hdc1  *   Win95 partition  (C: or D: depending upon boot)
  /dev/hdc2      DOS partition    (E: always)
  /dev/hdc3      swap

  (Partitions with a * are set as bootable (or "active") by fdisk)

  Example lilo.conf:
  # /etc/lilo.conf
  install = /boot/boot.b
  compact
  delay = 20    # optional, for systems that boot very quickly
  #prompt               # use instead of delay to force response to boot prompt
  #vga = normal # force sane state
  #ramdisk = 0  # paranoia setting
  #root = current       # use "current" root
  boot = /dev/hda
  image = /boot/vmlinuz
    read-only
    label = linux
  other = /dev/hdc1
    label = win95
    loader= /boot/any_d.b
  other = /dev/hda1
    table = /dev/hda
    label = dos
  image = /boot/vmlinuz.old
    label = linux.old
    optional
    read-only



  7. Some Questions and Answers

  Q: Does this scheme work for SCSI disks?
  A: I have been told that this works, but have not been able to try it
     for myself

  Q: Does this scheme work if Linux is wholly on one disk, and DOS and 
     Win 95 are partitions of the other?
  A: No - the DOS and Win95 bits both have to be the primary "DOS"
     partition of a disk. It is possible to get round this by
     recompiling LILO

  Q: I have downloaded a Win95 FAQ which speaks of the ability to boot
     between DOS and Win95. If I install Win3.11 in a different directory
     from "windows" it says I can run Win95 and Win3.11 in harmony. This
     is one partition.
  A: Yes, this can be done. It may cause problems however. Win95 does
     some nasty things to the FAT drive and some operations you perform
     under your old DOS and old windows (3.x) can easily destroy the
     long-filename information. For example, defragmenting the drive using
     a DOS/Win3.x utility will do this. You are also introducing
     difficulties for yourself when things don't work; you have to worry
     about the INI files under each system *and* the win95 registry.

  Q: Does LBA matter?
  A: Yes. Ugh!
     BIOS's after approx 1994 support LBA to get around a limit somewhere
     inside DOS which prevents DOS from being able to cope with cylinder
     numbers > 1024. (This is covered in much greater detail in PC hardware
     FAQs). LBA fiddles the disk geometry, multiplying the number of heads
     by 2 or 4 (etc) in order to divide the aparent number of cylinders by
     2 or 4 (etc) to a number < 1024. This works around this limit.
     
     Linux can handle cylinders > 1024 (provided that the partition from
     which you boot is wholly below 1024 cylinders), so can handle large
     (>504Mb) disks even on old machines (pre-1994 BIOS). It can also
     handle large disks on BIOS's which do support LBA, whether or not
     LBA is enabled.

     It is vital that ALL the OS's view each disk as having the same
     geometry - this is because the numbers in the partition table are
     "perceived" cylinder numbers, not the actual ones. Therefore, changing
     the BIOS setting to activate LBA will invalidate the existing contents
     of a disk.

     If your linux system does not "see" the "correct" geometry (that is,
     the same that DOS "sees"), you will need to add a line to lilo.conf
     append="hd=x,y,z"  where x,y,z represent the disk geometry (see the
     relevant man pages).
     
  Q: My BIOS only holds information on two HDDs, not four. Does this
     matter?
  A: Maybe! Having 4 HDDs with old BIOS's under DOS required the use of 
     driver software. Newer BIOS's hold information on 4 HDDs.

     Linux can happily use 4 HDDs even with most of these older BIOS's,
     but if you put a DOS partition on disk 3 you will only be able to
     access it via linux.

     This is relevant since many machines have an IDE drive, an IDE
     CD-ROM and, if you want to implement this document, another IDE
     drive too.



     If you have found this document useful, please let me know.

[ 30 July 1997
  The Linux X Notebook mini-HOWTO is not being maintained by the author 
  any more.  If you are interested in maintaining the X Notebook mini-HOWTO, 
  please get in touch with me at <tjbynum@metalab.unc.edu>. ]

===============================================================================
======                                                             ============
======  XFree86 3.1 and WD90C24 Notebook Video Chipset mini-HOWTO  ============
======                                                             ============
===============================================================================


        author: Darin Ernst (dernst@pppl.gov, darin@castle.net)     

                      version: 0.96  8/10/95
                      first version: 1/95



  For more info and updates, see the WEB site 
                      http://www.castle.net/~darin

Applicability: 

  This version of the HOWTO applies to XFree86 3.1.2  and earlier. 
  New versions will be available for new versions of XFree86 
  when necessary.  

Acknowledgement:

  Thanks to all those who have emailed me and posted messages on 
  this topic! It is now possible run X-Windows on notebook computers 
  and take full advantage of the hardware (at least at 8 bits 
  per pixel). 

Purpose: 

  This document gives instructions for configuring XFree86 
  on notebooks with the WD90C24 family chipsets.  It also describes 
  known bugs and workarounds if available.  The content comes 
  from communication with other users and my participation in the 
  development of the new WD90C24 driver.

Special Note:  

  A driver developed specifically for the WD90C24 is available for 
  the first time in XFree86 release 3.1.2 (released around July 31).
  The sections of this  HOWTO are labelled according to whether or 
  not they apply to:

      (OLD) 3.1.1 and earlier; and  
      (NEW) 3.1.2 and later.  

  Most of the FAQ on workarounds for old problems is now obsolete, 
  but instructions are provided for taking advantage of new features in 
  XFree86 3.1.2 in the (NEW) sections.


Copyright D. Ernst, 1995:                                      

   Permission to redistribute this file *UNCHANGED* is granted for 
   non-commercial use only. No permission is granted for the use of this 
   file in sales promotions or for purposes of profit. In addition, any 
   translations, derivative, or aggregate works that make use of information 
   in this file must contain this copyright notice and be accompanied by this 
   file unchanged.
 
   All translations, derivative works, or aggregate works incorporating this 
   document must be covered under this copyright notice. That is, you may not 
   produce a derivative work from this document and impose additional 
   restrictions on its distribution. Exceptions to these rules may be granted 
   under certain circumstances only by written permission of the author.

   If this copyright notice is not included with translations, derivative works,
   or aggregate works, then no permission to use information in this file is 
   granted for any purpose. Permission is granted for the redistribution of 
   this file in whole and complete distributions of the Linux operating system 
   provided it remains unchanged.  Commercial entities wishing to redistribute
   this file or the information contained in it for any other purpose must 
   obtain the written permission of its author.  Any translations, derivative
   works, or aggregate works must be submitted to the author for approval.

   All derivative works must also contain the words: "Information provided 
   by the "X-Notebook mini-HOWTO", copyright D. Ernst, 1995.            


Frequently asked questions:

1) Does XFree86 have a driver for the WD90C24[A,A2] available?

   Yes, but only in release 3.1.2 and later. Prior to this, we used
   the driver for the wd90c31 chip to fake it, with a lot of problems
   that are described below.

   The long-awaited support for the WD90C24 has been added to the pvga1 driver
   in the XF86_SVGA server by Brad Bosch, during July, 1995.  Extensive testing
   during the developement and suggestions were provided by D. Ernst. The 
   new server has  full support, including programmable clocks, and solves 
   most, if not all of the problems mentioned here for the old server.
  
   The new server was released around July 31, 1995 in version 3.1.2 of of 
   XFree86.  It is  capable of 1152x900 interlaced as well as 1024x768 
   non-interlaced VESA at 72Hz refresh, automatically utilizing the 
   full 1MB of VRAM.  It also provides users with the ability to program
   the dotclocks. The new driver does not support 16bpp, however, which
   is possible at low resolutions. Someone is working on this.

   The following is an excerpt from the file /usr/lib/X11/doc/README.WstDig 
   that describes the new driver (sections written by B. Bosch and D. Ernst):

  New WD90C24 features

  These next three sections apply only if you have a WD90C24, WD90C24a,
  or WD90C24a2 and don't specify some other chipset in your XF86Config
  file.  The SVGA pvga1 driver now recognizes the wd90c24 family as
  different from the WD90C30 and seems to resolve most of the problems
  people encountered when these chips were treated as WD90C3X.  The new
  code has the following features:

     o  Locks the shadow registers at appropriate times; This should
        prevent scrambled displays after exiting X with dual scan
        screens when simultaneous or LCD display mode is selected.  The
        code does depend somewhat on the behavior of the BIOS regarding
        when it locks the shadow registers, etc.

     o  Allows (forces) the use of a full 1 Meg VRAM for dual scan
        systems when the server is started while external CRT only
        display is in operation.  This allows 1024x768x8 resolution.

     o  If the XF86Config file specifies a virtual screen size which
        requires more than 512 K VRAM when the server is started on a
        Dual Scan LCD, the driver will force the virtual size to
        640x480.  This eliminates the need to edit the XF86Config file
        when you switch from 1024x resolution on the CRT, to or from the
        LCD screen.  If no virtual size is specified, the result will be
        800x600 virtual in LCD modes and 1024x768 in CRT only mode (so
        you have a choice).

     o  Note that on dual scan systems, you must still exit X, switch
        displays, and restart X to change to/from CRT only with 1 Meg
        videoram.  This is because once the server starts, you can't
        change the virtual screen size.  There is no way around this
        with the current server and the WD90C24 with dual scan displays.
        The WD90C24 requires half the videoram be used for a ``Frame
        buffer'' when the dual scan LCD is in use.

     o  The new server uses the accelerated features of the WD90C24a.
        It is not clear from the data book if the WD90C24 also supports
        ALL the required features.  Several people have stated that the
        WD90C24 is not accelerated, but the differences section of the
        WD90c24a data book implies that they ARE all three accelerated.
        The differences documented with regard to acceleration are with
        the type of line drawing the hardware does; Only the newer chips
        support the type of line drawing that MS windows wants.  This
        may be what has caused the confusion since the accelerated
        windows drivers may only support the WD90c24a chips.  If this
        turns out to be a problem with the WD90C24, acceleration can be
        disabled by adding the line:
              Option "noaccel"
         to the Device section of the XF86Config file.

     o  Although the new server does not support programmable clocks in
        the same way as some of the other servers, 8 of the 17 clocks
        may be set to (almost) any value via the Clocks line. It also
        supports options for adjusting the VRAM clock.



2)(OLD) How can I use the XF86_SVGA server under XFree 86 3.1.1 and earlier?

   Most of us fake it by selecting the WD90C31 (or 30) accelerated chipset
   using the XF86_SVGA server.  X -probeonly detects the WD90C24, but
   this is not implemented with accelerated features in XFree86 3.1.1. and 
   earlier.  The WD90C24A and A2 are sort of compatible with the WD90C31.  

  (NEW & OLD)
  
   Most notebooks of 1994 use the WD90C24A2 with 1mb of video ram on the 
   local bus, and are capable of 1024x768x256 colors at 60Hz refresh 
   under Windows 3.1. Some implementations are capable of 65k colors at 
   640x480 using the Western Digital windows driver wd2464_h.drv provided 
   on an OEM disk.  I maintain a list of notebooks and their video
   chipsets on the WEB page above.

   Other very common chipsets not covered here are the Cirrus Logic 6440,
   which is now fully supported by XFree86 3.1.1, and the 
   Chips and Technologies 65545, which appears in most Pentium 
   notebooks, especially those using the PCI bus.   This chip  is 
   partially supported with non-accelerated drivers (for the 65540).
   There are mixed reports on the net about the extent of this support. 
   Many of the problems reported seem to be similar to those discussed
   here.  The CLGD7542 that is now appearing (i.e. TI5000M) seems to be 
   compatible with the CLGD6235. 

3)(OLD) Why do I only see 512k of VRAM?

   A problem persists with the implementations of dual scan displays, 
   as well as with simultaneous display. Despite the fact that Windows 3.1 
   is able to use the full 1mb of video RAM to display externally 
   at 1024x768x256 colors, XF86_SVGA cannot, since it cannot use more 
   than 512k of the available 1024k.  The best one can do on an external
   monitor with the current XF86_SVGA server is 800x600x256. 
   However, workarounds exist for certain notebooks, such as the Twinhead 5 
   series and IBM Thinkpads.

   The problem is that 512k is what 'X -probeonly' detects. If you try 
   to hand-enter 1024k, you will get duplicate images on the upper and 
   lower halves of the screen.  Others have reported that the Western 
   Digital databook seems to confirm that half the memory (one 
   256kx16bit bank) is reserved for a "frame buffer"  when a 16 bit 
   dual-panel color STN display is used OR when simultaneous display mode 
   is selected. 

   Comparisons on active and passive versions of the AST Ascentia 
   made by swapping hard drives (ewagner@imssys.imssys.com Evan Wagner) 
   confirm that the 512k problem does not occur on the active 
   matrix implementation. 

   I  observed that other things change (such as dotclocks) when
   the external display is selected alone, as opposed to simultaneous
   or internal display on my Twinhead 5100S (dual scan, A2 chip).

   The Twinhead 5100 (aka Twinhead Slimnote 5, HP Omnibook 4000C, 
   Sharp PC-8700/8900, Altima Virage II) is capable of using the full 
   1mb of memory after one runs a DOS program called "CHGVRAM.EXE", which 
   is available from the Twinhead BBS.  This program was written by 
   Ferdy Kuo of Twinhead Corp., and is copyrighted. The code is only 
   available from the Twinhead BBS as an executable, and makes 
   many BIOS calls that are specific to the Twinhead Slimnote 5 series
   machine.  Please call Twinhead if you don't have the BBS number.
   This program will only work with the Twinhead family of machines.

   To use this program for Linux/X, boot DOS.  Then hit alt-F5 until 
   the display is set to external-only.  Then run CHGVRAM.EXE, which 
   will display a message something like "Video RAM changed to 1 MB".  
   Next, boot linux using the Linux Loader, lodlin15, which comes
   in the /root directory of Slackware 2.1.0.  The command is
   simply "c:\> linux".  Linux will then boot normally.  Then
   use "startx" to start X-Windows.  The full 1mb of video RAM
   will be used by XFree86.  I stick this all into a batch file
   called "linux.bat".

   Possible idea (haven't tried this yet):  Run CHGVRAM.EXE from 
   a dosemu session within linux.

   **** Fixes for the IBM Thinkpad 
                        (this is does not work on other notebooks ) ****

   Michael Steiner has written a c program that runs under Linux and 
   allows one to set the video RAM of the WD90C24 family to either
   512k or 1024k.  

   /* T P D U A L S C A N . C

    Author: Michael Steiner
            <steiner@acm.org> <sti@zurich.ibm.com>
            http://www.zurich.ibm.com/pub/sti/www/info.html

   This program allows you to set videoram for dualscan equipped thinkpads
   (at least for the 750Cs but probably also for others) to allow running
   XFree86 without patching it. (normally you got all twice if the upper 512K
   of videoram are not disabled)
   */

   Michael also makes available (on his web page) a patched XF86_SVGA
   server.

4)(OLD) How can I make my LCD screen sync correctly on starting/exiting X?

   There is a bug that results in scrambled virtual consoles upon
   exiting X.  The cure for this is to reset the video modes in some way.
   Many notebooks have a hot-key for lcd, crt, or simultaneous display.
   Cycling this hot-key restores the virtual consoles.  For others,
   close and open the cover, or suspend/resume.  This problem does
   not occur when using the external display.

5)(OLD) How can I fix the weird patches-of-black problem?

   There is a problem using white window backgrounds.  When windows
   are scrolled with white bg, the scrolled part goes into reverse
   video.  The cure for this is not to use white backgrounds.  Off-whites
   are fine.  This can be set as a default for all users in 
   /var/X11R6/lib/xinit/.Xresources with the following line (i.e., for xterm):

   XTerm*Background:               snow  

6)(NEW & OLD) Should I configure X on the internal or external monitor first?
 
   The dotclocks are different as detected by X-probeonly when the
   lcd is selected versus when the crt is selected as the display.  I 
   suggest using an external monitor while configuring X so that
   all the necessary dotclocks appear. If you can't find an external
   monitor, don't worry.  Just pretend you have one by selecting 
   external-only display.  Otherwise, you will get 17 basically identical 
   clocks that are useful only for 640x480.  Do this with the 
   monitor turned off to avoid damage.

7)(NEW & OLD) My screen looks ok except for these funny little patterns... 

   The lcd display looks different depending on whether or not
   simultaneous display is turned on (waves, flicker, dim, patterns). The
   fix is to fiddle with the modeline.  The XF86Config below works
   correctly. Note the first clock is used for the LCD.

8) How do I set up XF86Config (see examples at end of this file)?
    
  (NEW version)
    aa) read /usr/lib/X11/doc/README.Config, VideoModes.doc (optional)
    a)  Select XF86_SVGA server with WD90C24 chipset.
    b)  Select "generic monitor" with the 25 Mhz dotclock and the 
        standard 640x480 VESA modeline.  Begin with a video 
        bandwidth around 30 Mhz.
    c)  X -probeonly >& /tmp/x.out with external monitor selected, but
        turned off.
    d)  Edit XF86Config and paste in the 17 dotclocks found in /tmp/x.out
        put one of the 25-28 Mhz dotclocks in place of the first
        number in the VESA 640x480 modeline.  This should work 
        for the LCD display to give 640x480x256. Now select the LCD
        display (using a hot-key).  If you have an 800x600 LCD
        display, the clock that is probably need is likely to be
        the first clock with a value around 36.  Try the 
        800x600@56Hz NI VESA modeline first.
    e)  Go to step (c).  Repeat, this time pasting in the HorizSync
        frequency or the VertRefresh frequency.  Go to step
        (c) again and repeat until both of these and the bandwidth
        are filled in.
    f)  Now the LCD display should work.  
    g)  To configure the external monitor, decide which dotclocks
        you want by first picking the resolution and looking over
        the standard VESA modelines.  The new server allows you
        to program certain dotclocks, so this gives you almost
        infinite flexibility in setting up modelines.

        The new server recognizes that you have 1024k of VRAM
        when you are using either an active matrix LCD or
        the external monitor.  If you are using simultaneous display
        or a dual-scan LCD alone, then only 512k of VRAM can
        be used.  This is inherent in the hardware design.
        
  From /usr/lib/X11/doc/README.WstDig sections by B. Bosch and D. Ernst:

  Special considerations

  All of the Western Digital chipsets after the PVGA1 support the
  ability to use the memory-refresh clock as an alternate dot-clock for
  video timing.  Hence for all of these chipsets, the server will detect
  one more clocks than ``normal''.  What this means is that if you have
  an old `Clocks' line in your XF86Config file, you should comment it
  out, and rerun the server with the `-probeonly' option to find all of
  the clock values.  All but the last should be the same as what you had
  before; the last will be new.

  The server will detect 17 clocks for the WD90C24, WD90C30 and WD90C31
  chipsets.  If you have one of these chipsets, you should let the
  server re-probe the clocks and update your XF86Config.

  There is an `Option' flag available for the XF86Config file that is
  specific to the Western Digital chipsets (except the WD90C24).  This
  option is "swap_hibit".  


  WD90C24 clocks

  Here are some more details on the adjustable clocks:

  The VRAM clock (Mclk) is adjusted by adding ONE of the following
  option lines to the Device section of the XF86Config:

          Option      "slow_dram"     # Set Mclk to 47.429 MHz
          Option      "med_dram"      # Set Mclk to 49.219 MHz
          Option      "fast_dram"     # Set Mclk to 55.035 MHz



  The default is to leave Mclk as the BIOS sets it.  This is 44.297 on
  many systems.  Some systems may not work properly with any of these
  options.  If you experience ``bit errors'' on your display, reduce the
  Mclk speed, or don't use any of these options.  The Mclk is not reset
  on server exit.

  The data book says that the maximum pixel clock is 1.6 times Mclk so
  you may want to experiment with higher Mclk rates if you have a fast
  monitor.  It also says a 44.297MHz Mclk and 65MHz pixel clock is the
  fastest the WD90C24A2 is designed to go.  However, some success has
  been reported with faster clocks.  Don't expect all the clocks the
  chip can provide to work properly.

  The second and fourth group of 4 clocks are adjustable.  That is,
  clocks 5, 6, 7, 8 and 13, 14, 15, 16 (counting from 1).  These clocks
  are set by the Clocks line.  Be sure to adjust the 17th (last) clock
  to match your Mclk.  Here is a sample set of clocks lines with some
  clocks defined which are not directly provided by the chip.  The NON-
  programmable clocks (1-4 and 9-12) MUST be set as indicated here.

     Clocks     25.175 28.322 65     36     # These are *not* programmable
     Clocks     29.979 77.408 62.195 59.957 # these are programmable
     Clocks     31.5   35.501 75.166 50.114 # these are *not* programmable
     Clocks     39.822 72.038 44.744 80.092 # these are programmable
     Clocks     44.297                      # Change this if you change
                                            #   Mclk above.


  You can program the clocks in increments of .447443 MHz.  The server
  will warn you and adjust to the nearest increment if you specify a
  clock which does not fit this formula.  Clocks 1-4 and 9-12 (the fixed
  clocks) are not constrained to this multiple, but instead are used to
  provide standard clocks which are not a multiple by .447443 MHz.

  If you probe for clocks (for example to find your Mclk), do it in CRT
  only mode and then add clocks lines in your XF86Config file.  Clocks
  will not probe correctly in LCD mode on most systems.

  The BIOS on some systems may not allow switching from CRT to LCD
  unless the correct clock and/or mode is used.  Try the following mode
  line for 640x480 LCD displays.
 
  ModeLine "640x480"  25.175   640 664 760 800 480 491 493 525 #CRT/LCD

  The following modelines have been tested with the above Clocks lines
  on some systems, and are provided here as examples. Some testers have
  experienced minor problems (snow) with the fixed 65 and 75.166 MHz dot
  clocks.  The modelines below have been reported to circumvent these
  problems.  This is has fixed in post-3.1.2 versions of the pvga1
  driver.  
  
  Do not assume your monitor will not be damaged by any of these.

   # VESA 800x600@72Hz Non-Interlaced mode
     Mode  "800x600.50"  
       DotClock 50  
       HTimings 800  856  976 1040 
       VTimings 600 637 643 666  
       Flags    +hsync +vsync
     EndMode

   # 1024x768  Interlaced mode
     Mode  "1024x768i" 
       DotClock 45  
       HTimings 1024 1048 1208 
       VTimings 1264 768 776 784 817 
       Flags    +hsync +vsync Interlace
     EndMode

   # 1024x768@60Hz Non-interlaced Mode
   # One of the dram options may be necessary
     Mode  "1024x768.65" 
       DotClock  65  
       HTimings  1024 1032 1176 
       VTimings  1344 768 771 777 806 
       Flags     -hsync -vsync
     EndMode

   # 1024x768@60Hz Non-Interlaced mode (non-standard dot-clock)
   # Seems to work without dram options
     Mode  "1024x768.62" 
       DotClock 62  
       HTimings 1024 1064 1240 1280
       VTimings  768 774 776 808
     EndMode

   # 1024x768@70Hz Non-Interlaced mode (non-standard dot-clock)
   # May need fast_dram option
     Mode  "1024x768.72" 
       DotClock 72  
       HTimings  1024 1056 1192 1280 
       VTimings  768 770 776 806 
       Flags     -hsync -vsync
     EndMode

   end /usr/lib/X11/README.WstDig

   The following mode works well (provided by Nick Sayer):

     Mode "1152x900i"  
       DotClock 65 
       HTimings 1152 1200 1296 1496  
       VTimings 900 905 916 950 
       Flags    Interlace
     EndMode


    h)  When programming the clocks: If you experience snow with a 
        particular modeline, try decreasing the clock by a small
        amount, leaving the other settings unchanged.  Certain
        clocks, such as the fixed 65 and 75 MHz clocks, sometimes
        give snow due to a minor bug in the new server.  The fix
        for this is to duplicate the problematic fixed clock
        with a nearby programmable one.  This problem has been
        fixed and will not be propagated to future releases
        of XFree86.


    i)  Send me info on new things you find and post it to newsgroups
        so I can develop this mini-HOWTO further.


  (OLD version)

    If you are using the XF86Config below, you should comment out
    the sections for 3.1.2 and later as described in the file.
    Then follow these instructions to reprobe the clocks.

    aa) read /usr/lib/X11/doc/README.Config, VideoModes.doc (optional)
    a)  Select XF86_SVGA server with WD90C31 chipset.
    b)  Select "generic monitor" with the 25 Mhz dotclock and the 
        standard 640x480 VESA modeline.  Begin with a video 
        bandwidth around 30 Mhz.
    c)  X -probeonly >& /tmp/x.out with external monitor selected, but
        turned off.
    d)  Edit XF86Config and paste in the 17 dotclocks found in /tmp/x.out
        put one of the 25-28 Mhz dotclocks in place of the first
        number in the VESA 640x480 modeline.  This should work 
        for the LCD display to give 640x480x256. Now select the lcd
        display.
    e)  Go to step (c).  Repeat, this time pasting in the HorizSync
        frequency or the VertRefresh frequency.  Go to step
        (c) again and repeat until both of these and the bandwidth
        are filled in.
    f)  Now the lcd display should work.  
    g)  To configure the external monitor, start with the standard
        VESA modelines that match the dotclocks you have.  I got
        four basic dotclocks with a lot of nearby duplicates:

        28.32 => 640x480 @63 Hz NI VESA
        36.00 => 800x600 @56 Hz NI VESA
        44.26 => 1024x768i @43.5 Hz Interlaced 
        64.97 => 1024x768 @60 Hz NI VESA

	Of course, one cannot achieve the 1024 modes because without a 
        workaround, as one can only use 512k of video ram of the available 
        1024k VRAM as discussed above.  

        I think it is possible to get an 800x600 mode with very high
        refresh rate.  This depends on your monitor.
 
        With the  pre-Bosch version of the server, it is not possible to 
        achieve better than 60Hz refresh rate at 1024x768 NI.  As the flicker 
        is noticeable, the 1024x768i (interlaced) mode often looks nicer than 
        the NI mode.

    h)  Send me info on new things you find and post it to newsgroups
        so I can develop this mini-HOWTO.      


9) How do I get more info? 

   Useful web sites and addresses

	This mini-HOWTO (latest version) and other links on 
        the WD90C24 family:

            http://www.castle.net/~darin

	Western Digital Web Site - for phone number for databooks
            http://www.wdc.com/

	IBM Thinkpad video patches 
            http://www.zurich.ibm.com/pub/sti/www/info.html   
            (seem to have disappeared - but I have some
             where this HOWTO is stored)
	
	Twinhead Computer Corp. 1-800-995-8946
            to ask for BBS # (if you have a Twinhead, Sharp, Altima, HP)


As a shortcut to configuration, look into the program vgaset.  This allows 
you to optimize the timings for each monitor interactively and dynamically 
within X.


Darin Ernst
darin@castle.net
dernst@pppl.gov


#===========================================================================
#/usr/lib/X11/XF86Config for XFree86 3.1.2 and later (NEW)
#===========================================================================
#
# Copyright (c) 1994 by The XFree86 Project, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# 
# Except as contained in this notice, the name of the XFree86 Project shall
# not be used in advertising or otherwise to promote the sale, use or other
# dealings in this Software without prior written authorization from the
# XFree86 Project.
#
#
########################################################################
#### This XF86Config is for XFree86 3.1.2 and later.  To use it     ####
#### with a previous version of XFree86, follow the instructions    ####
#### that appear within the comments.  Do not expect it to work     ####
#### as is with older version of XFree86.                           ####
####                                                                ####
####           --- This is version 0.9, August 11, 1995 ----        ####
####                                                                ####
#### This release provides full support for the WD90C24[A,A2]       ####
#### driving 8-bit dual scan LCD screens and/or external monitors.  ####
#### Updated versions of this file may be found on the              ####
#### home page                                                      ####
####    http://www.castle.net/~darin                                ####
#### In addition, see the                                           ####
####  "Linux, X, and the WD90C24A2 Chipset mini-HOWTO"              ####
####   (aka "X-Notebook mini_HOWTO")                                ####
####                                                                ####
#### The settings in this file were chosen for use with a dual scan ####
#### LCD display.  The external monitor was a multisync one with    ####
#### a bandwidth of 100 MHz.                                        ####
####                                                                ####
#### The settings for the LCD screen in this file                   ####
#### should be fairly universal and should work with most           ####
#### notebook computers using the WD90C24 family chipsets.          ####
####                                                                ####
#### For more information, see the file                             #### 
####            /usr/lib/X11/doc/README.WstDig                      ####
#### in the XFree86 3.1.2 and later releases.                       ####
####                                                                ####
#### Copyright D. Ernst, 1995:                                      ####
####  Permission to redistribute this file *UNCHANGED* is granted   ####
####  for non-commercial use only.  No permission is granted for    ####
####  the use of this file in sales promotions or for purposes of   ####
####  profit. In addition, any other files that make use of         ####
####  information in this file must contain this and the above      ####
####  copyright notice and be accompanied by this file unchanged.   ####
####  All translations, derivative works, or aggregate works        ####
####  incorporating this document must be covered under this        ####
####  copyright notice. That is, you may not produce a derivative   ####
####  work from this document and impose additional restrictions on ####
####  its distribution.  Exceptions to these rules may be granted   ####
####  under certain circumstances only by written permission of the #### 
####  author.                                                       #### 
####                                                                #### 
####  If this copyright notice is not included with translations,   ####
####  derivative work, or aggregate works, then no permission to use#### 
####  information in this file is granted for any purpose.          ####
####  Permission is granted for the redistribution of this file in  ####
####  complete distributions of the Linux operating system provided ####
####  it remains unchanged.  Commercial entities wishing to         ####
####  redistribute this file or the information contained in it     ####
####  must obtain the prior written permission of its author unless ####
####  the file remains unchanged and is distributed as part of a    ####     
####  complete Linux distribution. Derivative works or translations ####
####  must be submitted to the author for approval.                 ####
####                                                                ####
####  All derivative works or translations  must also contain the   ####
####  words: "Information provided in whole or in part by the       ####
####  "X-Notebook mini-HOWTO", copyright D. Ernst, 1995.            ####
####                                                                ####
####                                                                ####
#### WARNING: Do not assume these settings fall within your         ####
#### external monitor's bandwidth.  Some monitors, esp. fixed       ####
#### freq. ones, may be damaged by these settings. We cannot be     ####
#### held responsible for any damages whatsoever that may occur     ####
#### directly or indirectly from the use of this information.       ####
#### In addition, caution is prudent when using high dotclock       ####
#### frequencies and fast vram clocks.  No guarantees are made      ####
#### or implied.  It is possible to exceed the design specifications####
#### of the video subsystem or displays by using these settings.    ####
####                                                                #### 
########################################################################   
#
# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of 
# this file. This man page is installed as /usr/X11R6/man/man5/XF86Config.5x 
# **********************************************************************

# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************


Section "Files"

    RgbPath	"/usr/X11R6/lib/X11/rgb"

# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)

    FontPath	"/usr/X11R6/lib/X11/fonts/misc/"
    FontPath	"/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath	"/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath	"/usr/X11R6/lib/X11/fonts/Type1/"
    FontPath	"/usr/X11R6/lib/X11/fonts/100dpi/"

EndSection

# **********************************************************************
# Server flags section.
# **********************************************************************

Section "ServerFlags"

# Uncomment this to cause a core dump at the spot where a signal is 
# received.  This may leave the console in an unusable state, but may
# provide a better stack trace in the core dump to aid in debugging

#    NoTrapSignals

# Uncomment this to disable the <Crtl><Alt><BS> server abort sequence

#    DontZap

EndSection

# **********************************************************************
# Input devices
# **********************************************************************

# **********************************************************************
# Keyboard section
# **********************************************************************

Section "Keyboard"

    Protocol	"Standard"

# when using XQUEUE, comment out the above line, and uncomment the
# following line

#    Protocol	"Xqueue"

    AutoRepeat	500 5
    ServerNumLock

# Specifiy which keyboard LEDs can be user-controlled (eg, with xset(1))
#    Xleds      1 2 3

# To set the LeftAlt to Meta, RightAlt key to ModeShift, 
# RightCtl key to Compose, and ScrollLock key to ModeLock:

#    LeftAlt     Meta
#    RightAlt    ModeShift
#    RightCtl    Compose
#    ScrollLock  ModeLock

EndSection


# **********************************************************************
# Pointer section
# **********************************************************************

Section "Pointer"

    Protocol	"PS/2"
    Device	"/dev/mouse"

# When using XQUEUE, comment out the above two lines, and uncomment
# the following line.

#    Protocol	"Xqueue"

# Baudrate and SampleRate are only for some Logitech mice

#    BaudRate	9600
#    SampleRate	150

# Emulate3Buttons is an option for 2-button Microsoft mice

    Emulate3Buttons

# ChordMiddle is an option for some 3-button Logitech mice

#    ChordMiddle

EndSection


# **********************************************************************
# Monitor section
# **********************************************************************

# Any number of monitor sections may be present

Section "Monitor" # first section for LCD alone
                  # (not used; here FYI)

    Identifier	"LCD Screen"
    VendorName	"Sharp"
    ModelName	"Unknown"

    Bandwidth	40  #  changed from 29
    HorizSync   35.36  # X -probeonly says  
    VertRefresh 67.36  # X -probeonly says

#    ModeLine "640x480" 25.175 640 664 760 800 480 491 493 525

    Mode "640x480"
        DotClock	25.175 # The dual scan LCD uses the first clock
        HTimings	640 664 760 800
        VTimings	480 491 493 525
    EndMode

EndSection # monitor 1

Section "Monitor"  # 2nd monitor section for both LCD/CRT

    Identifier	"CRT&LCD"
    VendorName	"MAG"
    ModelName	"DX17F"
    Bandwidth	75            # changed; 100 from DX17F manual
    HorizSync	30-64         # multisync; also from DX17F manual
    VertRefresh	50-100        # multisync; also from DX17F manual


# Modelines =========================================================
# This constitutes a fairly complete set of Modelines that are as 
# close to VESA as possible.
#
# A generic VGA 640x480 mode (hsync = 31.5kHz, refresh = 60Hz) 
# use for CRT/LCD simultultaneous display
   Mode "640x480" 
    DotClock   25.175   
    HTimings   640 664 760 800     
    VTimings   480 491 493 525 
   EndMode 

# A generic VGA 640x480 mode (hsync = 31.5kHz, refresh = 60Hz) 
# use for LCD alone, but above mode works fine
   Mode "640x480.28"  
    DotClock    28.32    
    HTimings    640 680 720 864     
    VTimings    480 488 491 521
   EndMode

# VESA 800x600@56Hz Non-Interlaced mode 
# noticeable flicker; use mode below for best 800x600
   Mode "800x600.36"    
    DotClock     36       
    HTimings     800 824 896 1024    
    VTimings     600 601 603 625   
   EndMode

# VESA 800x600@72Hz Non-Interlaced mode 
# no flicker
   Mode "800x600.50"     
    DotClock     50       
    HTimings     800 856 976 1040    
    VTimings     600 637 643 666  
    Flags        +hsync +vsync
   EndMode

# 1024x768  Interlaced mode             
# no flicker and clear but interlaced character shows
   Mode  "1024x768i"       
    DotClock     45       
    HTimings     1024 1048 1208 1264 
    VTimings     768 776 784 817  
    Flags        +hsync +vsync Interlace
   EndMode 

# 1024x768@60Hz Non-interlaced Mode  
# has snow problem with default MClk (use mode below)
   Mode "1024x768.65"    
    DotClock     65.1     
    HTimings     1024 1032 1176 1344    
    VTimings     768  771  777  806 
    Flags        -hsync -vsync
   EndMode 

# 1024x768@60Hz Non-Interlaced mode (non-standard dot-clock) 
# minimum refresh rate for VESA: noticeable flicker
   Mode "1024x768.62"    
    DotClock     62     
    HTimings     1024 1064 1240 1280   
    VTimings     768  774  776  808
   EndMode
 
   Mode "1024x768.60"    
    DotClock     60     
    HTimings     1024 1064 1240 1280   
    VTimings     768  774  776  808
   EndMode 
  
#   To use the modes below, you need to uncomment the "fast_dram" option
#   in the devices section to increase the memory clock (MClk).
#   With any of the slower vram clocks, you may see a wavy
#   picture with some noise.  Note these modes are beyond the design
#   limits of the WD90C24A2, with the exception of the 1152x900i Modeline.

# VESA 1024x768@70Hz Non-Interlaced mode 
# sort of works, but has snow problem
   Mode  "1024x768.75"    
     DotClock     75     
     HTimings     1024 1048 1184 1328   
     VTimngs      768  771  777  806 
     Flags        -hsync -vsync
   EndMode

# 1024x768@70Hz Non-Interlaced mode (non-standard dot-clock) 
# looks great (slight focus problem?): at last, a useable 1024NI mode.
   Mode "1024x768.72"    
     DotClock     72     
     HTimings     1024 1056 1192 1280   
     VTimings     768  770  776 806   
     Flags        -hsync -vsync
   EndMode

# 1024x768@76Hz Non-Interlaced mode (doesn't sync; not expected to)
   Mode "1024x768.85"    
     DotClock     85     
     HTimings     1024 1032 1152 1360    
     VTimings     768  784  787  823 
     Flags        +hsync -vsync
   EndMode

# from Nick Sayer (same as Sun screens) 
# nice
   Mode "1152x900i"    
     DotClock     65 
     HTimings     1152 1200 1296 1496  
     VTimings     900 905 916 950 
     Flags        Interlace
   EndMode

#   ModeLine "1152x900.77"  77 1152 1200 1296 1496  900 905 916 950
#   ModeLine "1152x900.75"  75 1152 1200 1296 1496  900 905 916 950

#  bad flicker
   Mode "1152x900.72"  
     DotClock     72 
     HTimings     1152 1200 1296 1496  
     VTimings     900 905 916 950
   EndMode


EndSection # monitor 2

# **********************************************************************
# Graphics device section
# **********************************************************************

# Any number of graphics device sections may be present

Section "Device"
    # SVGA WD90c24a2 in Twinhead Slimnote with simultaneous display
    Identifier	"WD90C24A2"
    VendorName	"Western Digital"
    BoardName	"RocketChip"
#    Chipset     "wd90c31" # comment out for use with XFree86 3.1.2 or later
                           # uncomment for use with XFree86 3.1.1 or before

#### begin first config with lcd only display (unused) 
##    VideoRam     512
##    Clocks      28.29  28.32  28.30  28.29  28.30  28.32  28.29  28.30      
##    Clocks      28.30  28.31  28.29  28.30  28.30  28.31  28.30  28.30
##    Clocks      49.79
#### end first config with lcd only display

#### begin second config with crt/lcd display: orig. XF86_SVGA (pre-3.1.2)
##     VideoRam     1024 # leave commented out
##        Clocks  25.15  28.32  64.97  35.96  25.15  28.30  64.92  36.00 
##        Clocks  25.15  28.30  64.92  35.96  25.17  28.41  64.97  35.96 
##        Clocks  44.26
#### end second config with crt/lcd display

### begin third config with crt/lcd: new XF86_SVGA (3.1.2 or later)
#
# Brad Bosch's server allows one to *program* the dotclocks.  This 
# makes it possible to achieve much better refresh rates and resolutions 
# that were previously not possible. See README.WstDig for more details.
#
# (instructions here are Brad's, for his modified pvga1 driver)
#
# The VRAM clock (Mclk) is adjusted by adding ONE of the 
# following option lines:
# 
# Option      "slow_dram" # Set Mclk to 47.429 MHz
  Option      "med_dram"  # Set Mclk to 49.219 MHz
# Option      "fast_dram" # Set Mclk to 55.035 MHz
#
# The default is to leave Mclk as the BIOS sets it.  This is 44.297 on
# our (Twinhead) systems.  There is also a faster clock than 55 MHz, 
# but it caused display bit errors on my system.  I was surprised the 
# 55 MHz clock worked.
#
# To use dotclocks above 60, it appears necessary to use the "fast_dram"
# option.  This makes 1024x768NI@72Hz possible.  The 85 MHz clock
# still does not appear to work. It is beyond the design limits of 
# the WD90C24 series.  The databook states that the 65 MHz clock
# MClk values of 44.297 are the maximum the WD90C24A2 is designed for. 
# In addition to possible risks to the hardware, memory errors sometimes
# occur when using fast_dram.  If you see corrupted pixels, try a slower
# setting.
#
# The second and fourth group of 4 clocks are now adjustable.  That is,
# clocks 5,6,7,8 and 13,14,15,16 (counting from 1).  These clocks are
# set by the Clocks line.  Be sure to adjust the 17th (last) clock if
# you change Mclk via above.  Here is a sample clocks line with more
# unique clocks defined.  The NON-programable clocks (1-4 and 9-12) MUST
# be set as indicated here.
#
# These clocks chosen for 800x600NI@72Hz and 1024x768NI modelines 
# and circumvent "snow" problems (Darin):
#
  Clocks 25.175 28.322 65     36     # These clocks are *not* programmable
  Clocks 29.979 77.408 62.195 59.957 # these are programmable
  Clocks 31.5   35.501 75.166 50.114 # these are *not* programmable
  Clocks 39.822 72.038 44.744 65.1   # these are programmable
  Clocks 49.219                      # Change this if you change Mclk 
                                     #   above.
#
# You can program the clocks in increments of .447443 MHz.  It will warn 
# you and adjust to the nearest increment if you use a clock which does not 
# fit this formula.  Clocks 1-4 and 9-12 (fixed clocks) are not constrained 
# to this multiple, which is why I didn't make them programable (so they 
# could be the exact standard clocks).
#
### end third config

EndSection


# **********************************************************************
# Screen sections
# **********************************************************************

# The colour SVGA server

# Use ctrl_alt_kp(+) and ctrl_alt_kp(-) to flip through these modes
# without restarting X. 

Section "Screen"

    Driver	"svga"
    Device	"WD90C24A2"
#    Monitor	"LCD Screen"
    Monitor     "CRT&LCD"
    Subsection "Display"
        Depth	    8
#
# Modes must be one line: format below is for documentation only
#
#   Modes     "640x480"     # works: Use for LCD/CRT
#   Modes     "640x480.28"  # works: Use for LCD only (not needed)
#   Modes     "800x600.36"  # works but flicker
#   Modes     "800x600.50"  # works well - no flicker
#   Modes     "1024x768i"   # works well - clear focus - no flicker
#   Modes     "1024x768.65" # snow problem
#   Modes     "1024x768.62" # works but flicker
#   Modes     "1024x768.60" # works but flicker
#   Modes     "1024x768.72" # wavy unless use "fast_dram" but then works
#   Modes     "1024x768.75" # wavy unless use "fast_dram" but then works
#   Modes     "1024x768.85" # doesn't sync; polarities don't help
#   Modes     "1152x900i"   # very nice
#   Modes     "1152x900.77" # 54 Hz - flicker 


# Following line is valid "Modes" line:

    Modes "640x480" "800x600.36" "1024x768i" 
       # "800x600.50" "1024x768.60" "1024x768.72" "1152x900i" "1152x900.72"
       # commented out to avoid monitor "toast"

        ViewPort    0 0
#        Virtual     1024 768    # Virtual for CRT only use
				 # comment out if you want 800x600 virtual
				 # on LCD.  uncomment if you want 640x480 LCD.
    EndSubsection

EndSection

######   end XF86Config for 3.1.2  ############################################



#          ****************** end of mini-HOWTO **********************












[ 14 October 1997
  The Linux Xterminal mini-HOWTO is not being maintained by 
  the author any more.  If you are interested in maintaining the 
  Xterminal mini-HOWTO, please get in touch with me at 
  <tjbynum@metalab.unc.edu>. ]

The X Terminal HOWTO

How to connect an X terminal to a Linux PC
Version 1.0 BETA (July 1995)
Scot W. Stevenson <scot@catzen.gun.de>


    This document gives a brief introduction to how to connect an X terminal 
    to a Linux PC. It assumes a basic knowledge of the X Window System, 
    TCP/IP addressing, and ethernet cards. 


1.0 Introduction

    This is the first version of the document and should be considered BETA.
    It is more of a been-there, done-that text than a comprehensive treatment.
    Discussions of access control mechanisms (e.g. xaccess, xhost, 
    MIT-COOKIEs), and the use of NFS, are not yet included.

    Most X terminals now have a whole host of advanced features which allow
    them to be more than mere X servers. For the most part, these features
    will be ignored.


1.1 Changes from previous versions

    (There are no previous versions, so everything was changed)


1.2 Disclaimers

    Neither the author nor the distributors of this HOWTO are in any way
    responsible for physical, financial, or moral damage incurred by 
    following the suggestions in this text. In short: "Yea though I talk...." 
           

1.3 Copyright

    The Linux Xterminal HOWTO is copyrighted (C) 1995 by Scot W. Stevenson. 
    Linux HOWTO documents may be reproduced and distributed in whole or in
    part, in any medium physical or electronic, as long as this copyright
    notice is retained on all copies. Commercial redistribution is allowed
    and encouraged. The author, however, would like to be notified of any 
    such distributions.

    All translations, derivative works, or aggregate works incorporating
    any Linux HOWTO documents must be covered under this copyright notice.
    In othe words, you may not produce a derivative work from a HOWTO and
    impose additional restrictions on its distribution. Exceptions to these
    rules may be granted under certain conditions.

    In short, we wish to promote dissemination of this information through
    as many channels as possible. However, we do wish to retain copyright
    on the HOWTO documents, and would like to be notified of any plans to
    redistribute the HOWTOs.

    Should you have any questions, please contact Tim Bynum, the Linux 
    HOWTO coordinator, at tjbynum@metalab.unc.edu. You may finger his address
    for phone number and additional contact information.  


1.3 New Versions and Feedback

    New versions of this document can be found on sunsite.unc.edu in 
    the /pub/Linux/docs/HOWTO/ directory. If you do not have FTP 
    access, you can try to get Linux Help Files via Bill Riemers. Send
    email to bcr@physics.purdue.edu with a subject of "help" for more 
    infomation and an index file.                         

    Any additions to, corrections of, or comments about this document would
    be most welcomed! Please send email to 

    	         scot@catzen.gun.de (Scot W. Stevenson)

    I would especially like to hear from you if you already have experience
    with linking an X terminal to a Linux machine, even if is only something
    like "worked on this machine with this terminal."

    On the board for the next versions are access control mechanisms and
    the use of NFS filesystems for booting.


2.0 Background

    This section provides some very basic information for those not familiar 
    with the X Window System and its terminal-ology. If you have at least 
    some experience with X and X terminals, you should be able to skip
    this part with no ill effects.


2.1 What is X?

    The X Window System, or just X (never X Windows), is "a portable,
    network-transparent window system" as the man page has it. It provides
    a graphic environment that cuts across operating systems, vendors, and 
    hardware types. When people talk about a window system in connection with
    Unix, they almost always mean X.

    The most important characteristic of X in our case is the strict
    division between the programs that control the local hardware that the
    user interfaces with (screen, keyboard, mouse, etc.), and those programs
    the user actually wants to run (editor, spreadsheet, DOOM). This means 
    that the interface software, which is called the X server, can be
    on a one machine, while the actual programs, or X clients, can be on
    one or even more than one machine at a totally different location.
    Note that the terms "server" and "client" are used in the reverse sense
    of what they usually are.

    Linux comes with a collection of X servers from the XFree86 project,
    that is, servers for SVGA Video cards, as well as a whole host of X 
    clients such as xv, maze, and xterm. If you are new to X, you might 
    want to get some hands-on experience with X on the Linux machine before
    attempting to link up an X terminal.
    
    
2.2 What is an X terminal?

    An X terminal (referred to as XT from now on) is a specialized piece of
    hard- and software which combine into an X server, that is, the part of 
    X that manages in- and output to and from the user. In the most
    primitive case, only the X server program and communcication software are
    included. Even the window manager comes from the host computer, to which 
    the XT is connected by ethernet (or in rare cases serial lines), using 
    TCP/IP. 

    The hardware of an XT will include at least a (large) screen, keyboard, 
    mouse, some RAM, and jacks for ethernet cables. Most XTs do not have a 
    hard disk, a floppy drive, or other such means of data transfer.
    This means that the XT either has its operating system in ROM (rare),
    or gets it from a host on the net that it is attached to. 

    To get to its operating system from the Linux computer at boot time, 
    the XT usually does something like this: It sends out a cry of help 
    through the net with its ethernet number as a name tag. A "real" computer
    on the net compares this number with a list of them, and if a match 
    is found, sends the XT the IP number it has been assigned to (via the
    bootpd daemon). This allows the XT to download its operating system and
    other data it needs from the hard disk of the host computer (usually via 
    tftp). This is the procedure explained here in detail.

    An XT is therefore actually a full-fledged computer, with its own IP
    number, RAM, program, and independent hardware, albeit more like
    an idiot savant. It's great at what it does best, managing X graphics,
    but not much good for anything else.

    
2.3 Advantages and Disadvantages

    Ideally, an XT is silent, swift, and deadly. Usually without fan, floppy
    or hard disk, they make no noise at all, and with a few meters of 
    ethernet cable you can put your loudish computer in a different room and
    have the silent XT on your desk. Since the XT is built for X and graphics,
    it is faster than, say, an X server program unter MS Windows or DOS.
    
    With the server on one machine and the client on another, the processor
    doesn't have to handle both at once. Though this might not be noticable
    in terms of speed (since the data now has to be moved over the ethernet),
    it will reduce the CPU load and save memory on the Linux machine that
    would otherwise be swallowed by the X server.

    On the flip side, you will need an ethernet card, which usually means
    giving up a slot and an IRQ. Depending on the manufacturer, the software
    for the XT can take up around 20 MBytes of hard disk space on your Linux 
    machine. You can almost always delete a lot of unused stuff once you 
    figure out what is really needed. Most XTs will require the host machine
    to have the bootpd and tftpd daemons installed and running - both are
    potential security holes. You will probably want to have a further daemon,
    xdm, running in the background. And yes, that big XT screen will take up
    a lot of desk space.


2.4 What do I need?

    Kind of you to ask! But more appropriately, what do you need? 

    First of all, you need an XT. If you have lots of money, and we do mean
    lots, you can go out and buy one. Jim Morton <jim@applix.com> posts
    a list of XTs and their prices to comp.windows.x on a regular basis.
    Or fortune might smile on you. Since old XTs can't be used with DOS,
    MS Windows, or OS/2, some firms solve the problem of what to do with
    their old ones by just throwing them out.

    On the Linux computer side, you will need an ethernet card. Though it
    is in theory possible to run an XT via serial line and SLIP, this is
    not recommended unless you have masochistic tendencies. Check out the 
    Ethernet-HOWTO maintained by Paul Gortmaker <Paul.Gortmaker@anu.edu.au>
    on how to purchase and set up ethernet cards. SLIP und CSLIP are covered
    in the same document, should you have no other choice. In this case, you 
    might also want to look at the Serial-HOWTO by Greg Hankins 
    <gregh@cc.gatech.edu> for information on how to get the best performance.

    You will also need to have TCP/IP support compiled into the kernel,
    as well as a IP number for at least your machine and the XT. The 
    Net-2-HOWTO by Terry Dawson <terryd@extro.ucc.su.oz.au> covers this.

    Finally, you will need to have X installed on you Linux machine. In
    theory you should be able to have just the X clients and programs
    like xdm installed, without the servers package. But it is probably
    not worth the effort to untangle the various parts. The XFree86 HOWTO
    by Helmut Geyer <Helmut.Geyer@iwr.uni-heidelberg.de> will tell you how
    to get X up and working.


3.0 Cables, Nets and Daemons

    This section discusses the changes to hard- and software required to 
    get the XT connected to the Linux machine. Some conventions are that 
    the XT is called "whisper" (because it makes no sound), and the Linux
    host machine "imlinux" (I am Linux). They are both part of the 
    "frog" domain in Germany (".de"). Their IP numbers are

          192.168.13.1   for  imlinux.frog.de (the Linux machine)
          192.168.13.41  for  whisper.frog.de (the XT linked to it).

    Note that these are standalone IP numbers for systems not connected to
    the greater Internet, and that to my knowledge there is no frog domain
    in Germany. We will assume that there are no other machines on the net, 
    and that NFS is not installed. 

    [Bummer. If someone has used NFS in connection with his or her XT, I'd 
    love to hear from you.]


3.1 Physical connection

    This should be as easy as plugging cables into both machines. Please note 
    that some XTs have two serial inputs that can only run at certain speeds 
    if both are in use. Check your XT manual for details. You will need the 
    ethernet number of the XT later on. It is displayed during boot of the 
    XT, even if no connection is yet established.

    As soon as you have the wires in place, you should be able to test the
    ethernet link. After booting the XT, it should start off by complaining
    that its calls for a bootpd and/or tftpd are not being answered, and
    then start a boot operating system (usually part of the XT ROM). This 
    should include a primitive ping command which will allow you to test
    the ethernet from the XT to the Linux machine. Don't panic if it 
    doesn't work the other way around yet. The XT probably needs its full
    operating system to be able to respond.


3.2 Configuring the Net

    Your basic configuration needs should be covered by the Net2-HOWTO as
    mentioned above. We'll assume here that you already have TCP/IP and 
    such up and running. Since the XT is considered to be just another 
    computer on the net, you will now have to make sure both Linux machine
    and XT know each other's IP address and that of the net they are on.


3.2.1 Configuring the Linux Machine

    Information on the XT will have to be included in at least these files:

    /etc/hosts    Add a line with the IP number of the XT, such as

                  # /etc/hosts line for Linux machine. lprhost and loghost 
                  #            are optional 
                  192.168.13.1    imlinux imlinux.frog.de lprhost loghost
                  # The new line for the XT is next
                  192.168.13.41   whisper whisper.frog.de

    /etc/ethers   This file provides a list of ethernet numbers and the
                  corresponding host names. This does not seem to be needed
                  in all distributions and setups, but in case it is, you
                  will need to include the ethernet number of the 
                  XT and its hostname. This would be something like
                  
                  04:03:e8:cc:0d:24	imlinux
                  0f:03:11:31:45:f1     whisper 

                  (Yes, the ethernet numbers are fakes)
    
    [You might have to change further files if you are running programs like
    named, routed, or gated. As I am not, I would be grateful if someone 
    could fill me in on which files, if any, must be modified.]

    You will have to reboot your Linux machine to make sure all changes 
    take effect.


3.2.2 Configuring the X Terminal

    Check your XT manual for which files will have to be edited. In my case,
    there was a central configuration file which needed to have the 
    following entries changed:

        ip_host_table            192.168.13.1    imlinux
        ip_host_table            192.168.13.1    imlinux.frog.de
        ip_host_table            192.168.13.41   whisper
        ip_host_table            192.168.13.41   whisper.frog.de

        file_access_1            TFTP
        file_host_name_1         imlinux.frog.de
        file_path_1              /usr/local/xterm/liveshere

        display_access_table     whisper
        display_access_table     imlinux
        enable_access_control    YES

        xdmcp_server             imlinux
        broadcast_address        192.168.13.255
        default_telnet_host      imlinux

    Note that the XT picks up its files via tftp from the directory
    /usr/local/xterm/liveshere, and the terminal is able to do XDMCP 
    (important for the configuration of xdm). 

    There will also be other configurations files for things like fonts. You
    should be able to use the fonts already installed with Linux. In my case, 
    the file for the fonts (font.tbl) looks something like this

        /usr/lib/X11/fonts/75dpi
        /usr/lib/X11/fonts/100dpi
        ...
        /usr/local/xterm/misc
        /usr/local/xterm/openlook

    with a few more lines to the same effect. Later, when the XT boots off
    the Linux machine, you should see a list of files it has successfully
    loaded. 

    Another thing you will probably want to have on your XT is "backing
    store," which means that those window parts covered by other windows
    are not stored in the Linux' RAM, but in that of the XT. Check your
    XT manual for further details.


3.3 bootpd

    Bootpd is the daemon that hears the X terminal's cry for help
    at boot time and responds by telling the XT who it is, and where 
    it can find the software it wants to download. For some odd reason
    bootpd is not included in some current distributions, notably 
    Slackware 2.2.0.1. This means you will have to get it via FTP or
    some other source. It should then be placed in /usr/sbin/ (not in 
    /etc, as the man page would have it) as in.bootpd. Add or uncomment
    the following line in /etc/inetd.conf:

       bootps dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.bootpd 

    This will ensure that inetd can start bootpd if a boot request
    is found. 

    The configuration file for bootpd is /etc/bootpd. The syntax is 
    explained in the man page. In our example, the /etc/bootpd file should
    look something like this ("server" is now used in the classical sense
    again):

       # Sample /etc/bootpd file
       # First, global entry for stuff every host uses
       allhost:hd=/usr/local/xterm/liveshere:\ # Home directory XT software
             :ds=192.168.13.1:\	               # Domain name server (imlinx)
             :sm=255.255.255.0:\               # Subnet mask
             :gw=192.168.13.1:\                # Gateways
             :ts=192.168.13.1:\                # Time Servers
             :lp=192.168.13.1:\                # lpr Servers
             :to=-7200:                        # Time Offset in seconds
       # Next, individual entries of every single host. Futher XTs would
       # have their own entry
       whisper:ht=ethernet:\         # Type of hardware link
              :ha=0f03113145f1:\     # Ethernet number of X terminal
              :ip=192.168.13.41:\    # IP number of X terminal (whisper)
              :tc=allhost:\          # Template for standard options as above
              :bf=xtermOS:           # Boot file name - the X terminal's OS

    The name of the XT's operating system may not be included as part of the 
    hd (home directory) entry. In our example, the file that the XT grabs
    as its operating system is /usr/local/xterm/liveshere/xtermOS, but the
    hd entry is /usr/local/xterm/liveshere. 

    bootpd will write information to both /var/adm/syslog and 
    /var/adm/messages, which should look something like this after a
    successful boot:

       Jul 17 05:19:42 imlinux in.bootpd[110]: connect from 0.0.0.0
       Jul 17 05:19:42 imlinux bootpd[110]: reading "/etc/bootptab"
       Jul 17 05:19:42 imlinux bootpd[110]: read 2 entries from "/etc/bootptab"
       Jul 17 05:19:43 imlinux bootpd[110]: request from hardware address 
       0F03113145F1 Type 1
       Jul 17 05:19:43 imlinux bootpd[110]: found 192.168.13.41 whisper

    After helping the XT to boot, bootpd will stick around for about 
    15 minutes, then remove itself if there is no further work to do.


3.4 tftpd

    The Trivial File Transfer Program is used by the XT to load its 
    operating system from a Linux hard disk. It should be included in 
    every distribution and does not have a configuration file. You can 
    test tftp by just typing "tftp" from a command shell.

    As with bootpd, you will have to include or uncomment the following line
    in /etc/inetd.conf:

       tftp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd 

    Note that tftp can only access files that have world read access set.
    Note also that tftp is a potential security hole that you will have to
    keep in mind, and that the version of tftp included in some Linux
    packages does not include the -r (or -s) flags for more secure use.

    tftp will also write to /var/adm/messages. If bootpd has successfully
    done its stuff, the next lines should be something like

       Jul 17 05:19:43 imlinux in.tftpd[111]: connect from whisper
       Jul 17 05:19:58 imlinux in.tftpd[113]: connect from whisper
       Jul 17 05:19:59 imlinux in.tftpd[115]: connect from whisper
       Jul 17 05:20:00 imlinux in.tftpd[117]: connect from whisper
       Jul 17 05:20:03 imlinux in.tftpd[125]: connect from whisper
       Jul 17 05:20:05 imlinux in.tftpd[127]: connect from whisper

    and so on for quite a while. These are the files that the XT is requesting
    from its home directory on the Linux computer. You should see messages on
    the XT's screen while this transfer takes place.


3.5 Testing the link 

    Once you have modified the files mentioned above, you should be able
    to boot the XT. Depending on the manufacturer, more or less verbose
    messages on the XT's screen will tell you what is happening. Look
    carefully for messages about files that cannot be found.

    If all is well, it should progress to the point where the XT can launch
    its own version of X. This means a grey background and the X cursor.
    If you already have xdm running on the Linux machine, it might even
    put up the xdm login prompt, though things might go a little haywire 
    since some definitions are not in place yet. Be prepared to kill xdm as 
    root from the Linux machine as a last resort.

    Most XTs have an inbuilt set of functions, like a telnet client, as
    part of their boot operating system. You can test the link further by 
    telneting into the Linux computer.

    At this point, depending on how access is set up, you might also 
    be able to start X programs on the XT by using the display option.
    From the Linux computer, try something like

                      xclock -display whisper:0 &

    This should produce the xlock on the XT. You can even start a window
    manager such as fvwm this way. 


4.0 X on the run

    This section deals with setting up xdm so that a login prompt is 
    available on the XT, and will return when a user has logged out. The xdm
    program is a display manager that is the (very) rough equivalent of the
    login programs for normal terminals. It should be included in every 
    Linux X package.


4.1 xdm configuration

    xdm's configuration files live in /usr/X11R6/lib/X11/xdm (/usr/X11R6 may 
    be a link to /usr/X11). The main configuration file is xdm-config. You 
    should find, among others, the following lines already in place:

       DisplayManager._0.authorize:    true
       DisplayManager._0.setup:        /usr/X11R6/lib/X11/xdm/Xsetup_0
       DisplayManager._0.startup:      /usr/X11R6/lib/X11/xdm/GiveConsole
       DisplayManager._0.reset:        /usr/X11R6/lib/X11/xdm/TakeConsole

    These are the files that control the screen when X is run on the Linux
    machine itself. For the XT, we add four lines of the same type:

       DisplayManager.whisper_0.authorize:     true
       DisplayManager.whisper_0.setup:   /usr/X11R6/lib/X11/xdm/Xsetup_whisper
       DisplayManager.whisper_0.startup: /usr/X11R6/lib/X11/xdm/Xstartup
       DisplayManager.whisper_0.reset:   /usr/X11R6/lib/X11/xdm/Xreset

    Note that whisper_0 is the xdm notation for whisper:0, just as _0 is :0.
    Note also that GiveConsole has been replaced by Xstartup, which in my
    case is a dummy file, and TakeConsole by Xreset, is also a dummy file.
    The original files both control the ownership of the console when X is
    run on the Linux machine, and there is no reason to fool around with 
    the Linux console just because the XT is running.

    The setup files run programs before the login prompt is placed on the
    screen. This is the place to, say, use xv or a similiar program to
    have a picture in the background. You should be able to simply copy
    the given Xsetup_0 file to Xsetup_whisper.
    
    [Since this question comes up again and again: One way of putting a 
    picture in the root window is by placing the line
    
         nice xv -root -quit -rmode 5 <picture_file> &

    or such in the setup file. picture_file will then be displayed in 
    the root window under the xdm login prompt. Note that some XTs will
    give an error message if the file is too large or too complex.]

    Xaccess controls who can have access to the machine. You should be able
    to leave the defaults as they are. Note hat Xaccess will let you greet
    the user with a chooser, in case you have different machines on the net
    that can service the XT.

    Xresources controls the shape and size of the login prompt. You might
    want to have different messages for the XT and Linux machine by
    replacing the 

       DisplayManager*resources:       /usr/X11R6/lib/X11/xdm/Xresources

    with two lines such as

       DisplayManager._0.resources:        /usr/X11R6/lib/X11/xdm/Xres_0
       DisplayManager.whisper_0.resources: /usr/X11R6/lib/X11/xdm/Xres_wh_0

    where Xres_wh_0 is the name of the whisper resource file. 

    You should be able to leave the Xsession file unchanged, too.

    Configuration of the Xservers file is slightly more tricky. Out of the
    box, there is probably only one line uncommented (Slackware 2.2.0.1)

                    :0 local /usr/X11R6/bin/X 

    or something to that effect. This starts the Linux machine X server
    when xdm is called. Commenting this line means that when xdm is called, 
    there will be no X started on the Linux machine. This is what you need
    to do if you only want to have xdm managing the XT, but not the local
    Linux X server. In this case, X can still be started with startx at any 
    time on the Linux machine with no ill effects found so far.

    If your XT does not have XDMCP, you must also include a line for the
    XT, such as 

                         whisper:0 foreign

    XDMCP is a standardized method that for example lets X terminals talk
    to their hosts. If your terminal does have XDMCP, don't repeat do not
    include that line here. This would make xdm think that there is an XT
    out there that doesn't know XDMCP, while at the same time a terminal
    with the same name is trying to get in, too. This can lead to all kinds
    of ugly effects, such as two xdms fighting for control.

    Note that you can use the xdm-config entries even if there is no line
    in Xservers for the XT, that is, you can still customize the xdm
    login prompt, etc, for a XT that uses XDMCP.

    To make xdm start with every reboot, you can include a line such as

        /usr/bin/X11/xdm

    in /etc/rc.d/rc.local. Other people start xdm with the /etc/inittab
    file. In any case, xdm should appear with the list of processes after
    a reboot of the Linux machine.


4.2 Access questions

    [BummerRank1. This is important, and we're working on it.]

    To see if a user can access the XT screen from the Linux machine,
    log in as non-root on the Linux machine and try a command like

           xsetroot -solid white -display whisper:0 &
    or 
           xterm -display whisper:0 &

    Try this when somebody is logged in on the XT and when there is only the
    xdm login to be seen. Depending on where you are, the ability to put 
    stuff on the XT screen from the console might more of a feature than a 
    bug. 



5.0 Errors, Unknowns, and Thanks

    
5.1 Known problems
   
    These are problems which have turned up, as well as interesting features
    that might be considered problems. If you have come up with any 
    interesting features, or even solutions, please let me know.

    talk  - The interactive chat will work if the user at the XT starts the
            session with a user at the Linux machine, but fails the other
            way around. I'm sure I read a fix for this once, but have 
            forgotten it.

    who   - A user logged in via the XT does not appear in the output of the
            who command, even if it is sent from the XT itself. This is 
            probably the reason why talk fails when initiated from the Linux
            machine ("On an XT, nobody even knows you're a human").

    xlock - Normal call of xlock will only produce a message to the effect
            that the XT's screen can't be grabbed. The -remote option must
            be included in the xlock call to allow terminal locking. Note
            that some xlock modes are more resource hungry than others. 
            Qix seems to be more suited for XTs than others - check out the
            FAQ by Art Mulder (below) for more details.

    xv    - Some XTs will not have enough video memory to be able to handle
            large and/or complex colored background pictures. Try removing
            any old pictures (with `xsetroot' or such) and refreshing the 
            screen before you move xv's window into the root.


5.2 Terminals tested

    The procedures described in this text have so far only been seriously 
    tested on a Tektronix XP23 in connection with a 386DX-33MHz, 16 MByte 
    RAM running Linux 1.2.3 and the XFree86 Version 3.1.1 files from the
    Slackware 2.2.0.1 distribution.


5.3 Futher reading

    More information on X can be found on the net as:

    David B. Lewis <dbl@ics.com> posts the detailed and extensive 
    Comp.windows.x Frequently Asked Questions (FAQ) to comp.windows.x, 
    news.answers, and comp.answers on a regular basis. This document also
    contains entries on where to get more information on X.

    Steve Kotsopoulos <steve@ecf.toronto.edu> posts the X on Intel-based Unix 
    Frequently Asked Questions (FAQ) list to the same groups.

    Art Mulder <art@cs.ualberta.ca> maintains the Comp.windows.x: Getting 
    more performance out of X FAQ, which is als posted regularly to these
    groups. It includes tips very useful for Linux under X, too. 



5.4 Thanks

    First thanks, as always, go out to Linus B. Torvalds 
    <torvalds@kruuna.helsinki.fi>. Futhermore to

    Klaus ter Fehn <ktf@bc3.gun.de>, for making it possible and
    Douglas K. Stevenson <duck@catzen.gun.de>, for making it passable.

D ASCII                             	ascii
D ASCII                             	ascii
  BogoMIPS mini-COMO
  Wim C.A. van Dorst baron@clifton.hobby.nl
  Traducido por Juan Carlos Durn Garca jcdg@hotmail.com
  16-08-1996, traducido el 12-01-1997

  Este texto proporciona informacin sobre BogoMIPS, recopilada de
  varias fuentes mediante news y correo. Se puede obtener de varios
  servidores de archivos ftp de Linux en linux/docs/HOWTO/mini/BogoMips.
  Se public un artculo en Linux Journal, en el nmero de Enero de
  1996.
  ______________________________________________________________________

  ndice General:

  1.      Nota del traductor:

  2.      Qu son los BogoMIPS

  3.      Cmo estimar los BogoMIPS

  4.      Variaciones en las marcas de los BogoMIPS

  5.      Programa independiente BogoMIPS

  6.      Mensaje de error BogoMIPS ... failed

  7.      Acerca de las CPUs clnicas ( Cyrix , NexGen , etc)

  8.      Por qu prestar atencin a los BogoMIPS

  9.      Recopilacin de marcas de rendimiento

  9.1.    Sistemas 386 configurados extraa o defectuosamente

  9.2.    Sistemas 386 normales

  9.3.    Sistemas 486 configurados extraa o defectuosamente

  9.4.    Sistemas 486 de Cyrix/IBM

  9.5.    Sistemas 486 normales

  9.6.    Sistemas Pentium configurados extraa o defectuosamente

  9.7.    Sistemas Pentium normales

  9.8.    Variaciones de sistemas Pentium normales

  9.9.    Sistemas Alpha normales

  9.10.   Sistemas Motorola normales

  9.11.   Otros sistemas: Sparc, PowerPC, Mips, Intel 8088

  9.12.   Sistemas no basados en Linux (slo referencia)

  10.     Nota sobre la traduccin al espaol

  11.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Nota del traductor:

  A lo largo de este documento se emplearn indistintamente los trminos
  ``marca'' e ``ndice'' como traduccin de los trminos en ingls
  ``rating' e ``index'', con el significado ms aproximado de "valores
  numricos que miden cuantitativamente el rendimiento de un sistema".

  Por ``programa independiente'' me referir a la traduccin del trmino
  en ingls ``standalone program'', con el significado de "programa
  autnomo que se puede ejecutar en cualquier momento", por
  contraposicin a los programas y rutinas que slo se ejecutan en
  determinadas circunstancias como por ejemplo durante el arranque del
  ncleo.

  Por ``forzado'' me referir a la traduccin del trmino ingls
  ``overclock'', con el significado de "forzado a trabajar a una
  velocidad superior para la que oficialmente fue diseado".  Las notas
  del traductor estarn en forma de notas al pie de pgina para
  distinguirlas del resto del texto, que es traduccin lo ms fiel
  posible del original.

    La marca ms baja de Linux BogoMIPS: Tim Van der Linden
     timvdl@innet.be

     Intel 8088/4.77 0.02 BogoMips

    La marca ms alta de Linux BogoMIPS:

    Linus Torvalds torvalds@linux.cs.helsinki.fi

    David Mosberger-Tang davidm@azstarnet.com

     Alpha 21164/333 Alcor 331.35 BogoMips

  2.  Qu son los BogoMIPS

  De un mensaje de Lars Wirzenius wirzeniu@kruuna.Helsinki.fi del 9 de
  Septiembre de 1993, explicando qu los BogoMIPS, con informacin
  detallada adicional de Wim van Dorst:

  ``MIPS'' es la abreviatura de ``Millions of Instructions Per Second
  (-- Millones de Instrucciones Por Segundo--) una medida de la
  velocidad de ejecucin de un programa. Como la mayora de tales
  medidas, frecuentemente se abusa de ella en vez de usarse
  correctamente (es difcil comparar con justicia MIPS para diferentes
  tipos de ordenadores).

  Los BogoMIPS son una invencin de Linus. El ncleo (o era un
  controlador de dispositivo?) necesita un bucle de temporizacin (el
  tiempo es demasiado corto y/o necesita ser demasiado exacto para poder
  emplear un mtodo de espera no basado en bucles de retardo), que tiene
  que ser calibrado con la velocidad de procesador de la mquina. Por lo
  tanto, el ncleo mide durante la secuencia de arranque cmo de rpido
  se ejecuta en el ordenador un determinado tipo de bucle de retardo.
  ``Bogo'' viene de ``bogus'', que significa ``algo que es engaoso,
  incorrecto, falso''. Por consiguiente, el valor de los BogoMIPS da una
  cierta indicacin acerca de la velocidad del procesador, pero de forma
  escasamente cientfica como para ser llamado de otra manera ms que
  ``BogoMIPS''.

  Las razones (hay dos) por las cuales se muestra durante el arranque
  son:

    Es moderadamente til para la depuracin y para comprobar que las
     cachs y el botn de turbo funcionan; y
    A Linus le encanta rerse un poco cuando ve a la gente confundida
     en las news.

  Los BogoMIPS estn definidos en /usr/src/linux/init/main.c (un
  algoritmo simple en C), y la variable correspondiente del ncleo
  loops_per_sec se usa en varios controladores de dispositivo en las
  secciones net, scsi y char. Las verdaderas funciones de retardo estn
  en ensamblador, y por lo tanto cada plataforma tiene su propia funcin
  en include/asm/delay.h. Esta variable loops_per_sec se usa en varios
  controladores para los dispositivos char, net y scsi (ver

       find /usr/src/linux -name '*.[hcS] -print -exec fgrep
       loops_per_sec {} \;

  )

  3.  Cmo estimar los BogoMIPS

  De una iniciativa de Ian Jackson ijackson@nyx.cs.du.edu, y Przemek
  Klosowski, actualizado y corregido en gran parte por Wim van Dorst con
  arreglo a los datos actuales, segn la lista que se muestra a
  continuacin:

  Una gua muy aproximada sobre los BogoMIPS podra ser:

       Sistema              BogoMIPS                             Comparacion

       Intel 8088           frecuencia_reloj * (0.004  0.001)    0.02
       Intel/AMD 386SX      frecuencia_reloj * (0.14   0.01)     0.8
       Intel/AMD 386DX      frecuencia_reloj * (0.18   0.01)     1 (definicin)
       Motorola 68030       frecuencia_reloj * (0.25   0.005)    1.4
       Cyrix/IBM 486        frecuencia_reloj * (0.34   0.065)    1.8
       Intel Pentium        frecuencia_reloj * (0.40   0.035)    2.2
       Intel 486/AMD 5x86   frecuencia_reloj * (0.50   0.01)     2.8
       Mips R4000/R4400     frecuencia_reloj * (0.50   0.015)    2.3
       Nexgen Nx586         frecuencia_reloj * (0.75   0.010)    4.2
       PowerPC 601          frecuencia_reloj * (0.84   0.015)    4.7
       Alpha (todos)        frecuencia_reloj * (0.99   0.005)    5.5
       Intel Pentium Pro    frecuencia_reloj * (0.99   0.005)    5.5
       Cyrix 5x86/6x86      frecuencia_reloj * (1.00   0.005)    5.6
       Mips R4600           frecuencia_reloj * (1.00)             5.6
       AMD 5k86             frecuencia_reloj * (2.00   0.010)   11.1
       Motorola 68060       frecuencia_reloj * (2.01)            11.2
       Motorola 68040       (aun no hay suficientes datos)
       Sparc                (aun no hay suficientes datos)

    Obsrvese que el bucle de clculo de los BogoMIPS no hace uso del
     paralelismo de varios procesadores, como el Intel Pentium y el
     Alpha 21164.

    Obsrvese que el bucle de clculo de los BogoMIPS es similar pero
     no igual en los procesadores no-Intel.
  4.  Variaciones en las marcas de los BogoMIPS

  De Linus Torvalds torvalds@cc.helsinki.fi, explicando la variacin que
  puede observarse en las marcas de los BogoMIPS, tomado de
  c.o.l.development comp.os.linux.development, el 28 de Abril de 1994

  El bucle de clculo de los BogoMIPS est cuantificado, as que lo ms
  probable es que siempre se obtenga el mismo valor exacto.  Normalmente
  slo se obtendrn valores diferentes si la velocidad est justo en el
  "lmite", cuando pequeas variaciones (tiempos diferentes para los
  intervalos de interrupcin, etc) lo harn saltar entre dos valores.

  5.  Programa independiente BogoMIPS

  De el fichero readme del programa independiente BogoMIPS de Jeff
  Tranter jeff_tranter@mitel.com:

  Ests harto de reiniciar tu sistema para ver a cuntos BogoMIPS va
  hoy? (...) "BogoMIPS" es un programa independiente que muestra el
  rendimiento de tu sistema usando una de las medidas ms reconocidas
  mundialmente. Usa el mismo cdigo empleado en el ncleo de Linux
  durante el arranque, pero se ejecuta como un programa de usuario.
  (...) La versin 1.3 de BogoMIPS es ahora portable y debera correr en
  cualquier sistema que soporte un compilador y libreras ANSI C.

  Obsrvese que debido a la carga del sistema los valores calculados con
  el programa independiente pueden ser ms bajos que los registrados en
  la lista incluida ms adelante.

  Intrnsecamente el programa independiente no puede dar informacin
  precisa similar al ndice BogoMIPS de la secuencia de arranque, ya que
  la carga del sistema competir con este programa cuando es ejecutado
  por un usuario corriente.

  El cdigo del ncleo de Linux en el que se basa se usa slo en la
  versin Intel, y se denomina "BogoMIPS clsico". Linux ha sido portado
  a plataformas hardware realmente diferentes, y por lo tanto se ha
  tenido que emplear otro cdigo BogoMIPS, que el programa independiente
  no tiene en cuenta. Por consiguiente los BogoMIPS medidos con la
  versin portable pueden ser bastante diferentes de los verdaderos
  BogoMIPS que se muestran durante el arranque.

  6.  Mensaje de error BogoMIPS ... failed

  Sugerido por varias preguntas en la red y correo privado, con ejemplos
  de Lily lbliao@alumni.caltech.edu y Pierre Frenkiel
  frenkiel@cdfap2.in2p3.fr, que en Marzo de 1995 preguntaron:

  Cuando arranco Linux me sale el mensaje:

         Calibrating delay loop.. ok - 23.96 BogoMIPS
         failed

  Dnde y porqu ha fallado el bucle de calibracin de retardo?"

  No ha fallado. Si hubiera fallado el texto habra sido:

        Calibrating delay loop.. failed

  Lo que probablemente fall fue un controlador de algn dispositivo que
  puede que no est en la mquina. Justo despus de calcular el ndice
  BogoMIPS se inician todos los controladores de dispositivos. Primero
  los dispositivos SCSI, despus los dispositivos de red, etc. Cualquier
  fallo es advertido a su debido tiempo. En particular merece la pena
  destacar el controlador AHA152x. Otros efectos del fallo de
  controladores de dispositivos (y no del fallo de los clculos de
  BogoMIPS) son cuelgues del sistema, esperas largas y completos
  bloqueos del sistema.

  Desde Linux 1.2 muchos mensajes de error han sido mejorados, por lo
  tanto conviene actualizarse al menos a la ltima versin para
  averiguar qu controlador de dispositivo en particular es el que est
  fallando.

  7.  Acerca de las CPUs clnicas ( Cyrix , NexGen , etc)

  Las CPUs Cyrix tipo 486 necesitan un software que habilite la cach, a
  veces denominado software BogoBoost. Hay alguno disponible como
  programa independiente, y alguno como parche para el ncleo: todo
  desde archivos normales, en lugares obvios.

  Las CPUs Cyrix 5x86 y 6x86 pueden lograr mejorar drsticamente sus
  BogoMIPS mediante branch-prediction (-- Prediccin de salto--) (una
  opcin de la BIOS). Obsrvese que el aumento de rendimiento es
  marginal. Hay informes de que la prediccin de salto no es 100%
  estable, y pueden aparecer fallos de memoria. Pero siempre se le puede
  conceder una oportunidad.

  Las CPUs NexGen 386-enhanced (386 mejorado), marcadas como Nx586 se
  listan como tipo 386, ya que el hecho de que rindan como mquinas
  Pentium no es relevante para BogoMIPS.

  Las CPUs AMD 486DX5, tambin denominadas AMD 5x86, son mquinas 486/33
  con frecuencia cuadruplicada, y por lo tanto son listadas como tales.
  Estn en la misma lnea que el resto de CPUs 486.

  8.  Por qu prestar atencin a los BogoMIPS

  Me permitir aadir que hay slo dos razones para prestar atencin al
  ndice BogoMIPS que se muestra durante el arranque de Linux:

    Para comprobar si est dentro del margen propio para el procesador
     particular, su frecuencia de reloj y el cach potencialmente
     presente. Los sistemas 486 (y sus variaciones) son particularmente
     propensos a padecer configuraciones defectuosas de la cach de la
     RAM ``write-back'' (-- Escritura retardada--) que afectan los
     BogoMIPS, frente a ``write-trough''  (-- escritura inmediata--) que
     van bien, botones de turbo, falsas cachs emuladas por la BIOS, y
     ese tipo de cosas relacionadas con la cach y la frecuencia.

    Para ver si "su sistema es mejor que el mo". Por supuesto esto es
     completamente errneo, nada fiable, infundado y absolutamente
     intil, pero todas las medidas de rendimiento padecen este mismo
     problema. As que por qu no usarlo? Esta estupidez inherente
     nunca ha evitado que la gente use los ndices de rendimiento,
     verdad? :-)

  9.  Recopilacin de marcas de rendimiento

  La siguiente tabla proporciona algunas marcas de BogoMIPS remitidos de
  varios sistemas. Obsrvese que los ndices son de la actual secuencia
  de arranque de Linux, excepto por supuesto las de la seccin de
  Sistemas no basados en Linux.

  9.1.  Sistemas 386 configurados extraa o defectuosamente

       Sistema             BogoMIPS  Informador
       386DX/16 387 sin cache 0.57   H. Peter Anvin <hpa@nwu.edu>
       386DX/25               0.82   P Wright <philip.wright@purplet.demon.co.uk>
       386DX/25 sin cache     1.03   Mark A. Horton <mahmha@crl.com>
       386SX/16               1.5    Stefan Kromer <sk@galaxy.sunflower.sub.org>
       386SX/16               1.6    Bill Davidsen <davidsen@tmr.com>
       386SX/20               1.87   Paul C. Dulany <pcdulany@wam.umd.edu>
       386DX/25(?) 128c       6.03   Chuck Meo <meo@solbourne.com>
       386DX/20              13      Ed Runnion <erunnio@hubcap.clemson.edu>

  9.2.  Sistemas 386 normales

  Sistema             BogoMIPS  Informador
  386SX/16 Packard Bell  2.05   <root@Belvedere\%hip-hop.suvl.ca.us>
  386SX/16               2.09   David E. Fox <dfox@belvedere.sbay.org>
  386SX/16               2.15   W Stevens <wgsteven@math.uwaterloo.co>
  386SX/16               2.2    Lech Marcinkowski <puolalm@tekla.fi>
  386SX/16               2.23   Andrew Bulhak <acb@yoyo.cc.monash.edu.au>
  386SX/16               2.23   Steven M. Gallo <smgallo@cs.buffalo.edu>
  386SX/16               2.34   Kevin Burtch <kburtch@pts.mot.com>
  386SX/16 turbo         2.38   Andrew Haylett <ajh@gec-mrc.co.uk>
  386SX/16 0c            2.43   Adam Clarke <adamc@loose.apana.org.au>
  386SX/16               2.49   Waymon <waymon@pacifier.com>
  386SX/20               2.7    Alex Strasheim <astrashe@nyx.cs.du.edu>
  386SX/20               2.70   J.L. Brothers <brothers@halcyon.com>
  386SXL/25 AMD          2.9    Vaughan R. Pratt <pratt@Sunburn.Stanford.EDU>
  386SX/25 AMD 0c        3.06   K.J. MacDonald <kenny@festival.ed.ac.uk>
  386SX/25 AMD           3.38   Hamish Coleman <hamish@zot.apana.org.au>
  386SX/25 0c            3.52   Rogier Wolff <r.e.wolff@et.tudelft.nl>
  386SL/25 Intel         3.57   S Harris <harris@teaching.physics.ox.ac.uk>
  386SX/25 AMD           3.62   S Harris <harris@teaching.physics.ox.ac.uk>
  386SXL/25 AMD 0c       3.71   David E.A. Wilson <david@cs.uow.edu.au>
  386SX/33 Intel         4.06   Kenneth J. Hoover <ken@PSUEDVAX.PSU.EDU>
  386SX/33               4.71   Alexander Komlik <apkom@l.ukrcom.kherson.ua>
  386SX/40 Intel 0c      6.03   Michael Kenyon <u3g12@keele.ac.uk>

  386DX/16               2.49   Mike <mike@emgee.demon.co.uk>
  386DX/20 Intel         3.0    Malcolm Reeves <reeves@rocky1.usask.cs>
  386DX/20 Intel         3.08   Si. Harris <harris@teaching.physics.ox.ac.uk>
  386DX/20 Nec Powermate 3.22   David J Dawkins <davidd@isl.co.uk>
  386DX/20 Micronics     3.25   M Haardt <u31b3hs@informatik.RWTH-Aachen.DE>
  386DX/20               3.67   Joost Helberg <jhelberg@nlsun8.oracle.nl>
  386DX/25               3.91   Ian McCloghrie <imcclogh@cs.ucsd.edu>
  386DX/25               3.95   Grant Edwards <grante@aquarius.rosemount.com>
  386DX/25 0cache        3.96   J.O. Williams <jow@techbase.com>
  386DX/25 32cache       4.53   J.M.A. Lahtinen <jmalahti@klaava.Helsinki.FI>
  386DX/33               5.86   Tim Lacy <timla@microsoft.com>
  386DX/33 64cache       5.99   Lars Wirzenius <wirzeniu@kruuna.Helsinki.FI>
  386DX/33 Intel         5.99   Harri Pasanen <hpasanen@cs.hut.fi>
  386DX/33 sin 387       6.03   Joel B.Levin <levin@bbn.com>
  386DX/33 387           6.03   Peter Bechtold <peter@fns.greenie.muc.de>
  386DX/40               6.21   J.L. Brothers <brothers@halcyon.com>
  386DX/33               6.46   Dennis Robinson <djrobins@uxa.cso.uiuc.edu>
  386DX/33               6.5    Dean Nelson <deannelson@aol.com>
  386DX/33 387 256cache  6.65   Wim van Dorst <baron@clifton.hobby.nl>
  386DX/33               6.65   Rick Lim <ricklim@opus.freenet.vancouver.bc.ca>
  386DX/33               6.7    Craig Hagan <hagan@cih.com>
  386DX/40               6.99   Ken Wilcox <wilcox@math.psu.edu>
  386DX/40 AMD           7.76   Joe Phillips <rchandra@letter.com>
  386DX/40 AMD           7.10   Kerry Person <kperson@plains.NoDak.edu>
  386DX/40               7.10   D. Bikram Singh <a336dhal@cdf.toronto.edu>
  386DX/40 128cache      7.23   Julian Francis Day <jfd0@aber.ac.uk>
  386DX/40 bogoacelerado 7.23   Pat St Jean <stjean@math.enmu.edu>
  386DX/40 AMD 128cache  7.23   R.Bergs <rabe@akela.informatik.rwth-aachen.de>
  386DX/40 slow DRAM     7.26   John Lockwood <lockwood@pan.vlsi.uiuc.edu>
  386DX/40 128c          7.29   Karsten Friese <ftdkafr@ftd.ericsson.se>
  386DX/40               7.29   E.C. Garrison <ericg@nickel.ucs.indiana.edu>
  386DX/40               7.29   Darin Cowan <cowan@rubicon.org>
  386DX/40               7.29   Bonne van Dijk <bonne@cs.utwente.nl>
  386DX/40 AMD           7.76   Todd Lindner <tlindner@panix.com>
  386DX/40               7.76   Bear Giles <bear@indra.com>
  386DX/40 AMD 387 64c   7.91   <wires@gnu.ai.mit.edu>
  386DX/40               7.98   Frank Pilhofer <fp@informatik.uni-frankfurt.de>
  386DX/40 64c           7.98   Dean Junk <dpjunk@mm.com>
  386DX/40 AMD 32c       7.98   Tommy Olsen <tommyo@ifi.uio.no>
  386DX/40 AMD           7.98   James Reith <reith@racores.com>
  386DX/40               7.98   Aaron T. Baldie <atb@u.washington.edu>
  386DX/40 128c          7.98   John Pate <jpate@easynet.co.uk>
  386DX/40               7.98   Christian Nelson <cnelson@csugrad.cs.vt.edu>
  386DX/40               7.98   Alan Peckham <peckham@drei.enet.dec.com>
  386DX/40               8.06   Richard Brown <brown@midget.towson.edu>
  386DX/40               8.06   Bill G. Bohling <bs146@tali.uchsc.edu>

  Nx586/90 NexGen       67.44   <root@wgw.mnsinc.com>
  Nx586/90 NexGen       67.44   Robert Gehring <rag@cs.tu-berlin.de>
  Nx586/90 NexGen       67.48   David G. Eckard <dgeckard@eos.ncsu.edu>
  Nx586/100 NexGen      74.34   Cameron L. Spitzer <cls@truffala.sj.ca.us>
  Nx586/100 NexGen 256c 74.56   Marius Groenendijk <marius@cray-systems.lu>
  Nx586/110 NexGen 256c 81.51   Michael J. Micek <mmicek@muddcs.cs.hmc.edu>

  9.3.  Sistemas 486 configurados extraa o defectuosamente

  Sistema             BogoMIPS  Informador
  486DX/33 0c            1.45   Mark Gray <vatavian@gvu1.gatech.edu>
  486SL/25 0c            1.95   Paraskevas Evripidou <skevos@seas.smu.edu>
  486DLC/40 0c           2.45   S.Schendel <sschend@magnus.acs.ohio-state.edu>
  486DX/33 128c          2.94   P.J. Nefkens <p.nefkens@student.utwente.nl>
  486DX4/120 AMD         3.04   Andrew Steinbach <stei0113@maroon.tc.umn.edu>
  486DX5/133 AMD         3.05   Eric Hagen <ehagen@hawaii.edu>
  486DX4/100 Cyrix       3.06   Stuart Harvey <sharvey@primenet.com>
  486DX5/133 AMD         3.06   Charles Galpin <chg@severn.wash.inmet.com>
  486DX4/100             3.06   Bear Giles <bear@indra.com>
  486DX2/80              3.08   Gerald E. Butler <gbutler@phoenix.kent.edu>
  486DX4/120 AMD         3.08   Charles Hines <chuck_hines@vnet.ibm.com>
  486DX4/66 256c         3.10   Riccardo Capella <mc8508@mclink.it>
  486DX4/100 wb-cache    3.10   Paul Close <pdc@sgi.com>
  486DX4/120             3.13   Brian Perkins <bperkins@netspace.com>
  486DX4/120 AMD         3.15   <eruston@net2.intserv.com>
  486DX4/100             3.17   Thomas Sudbrak <sudbrak@borneo.gmd.de>
  486SLC2/50 Cyrix       3.30   Colin J. Wynne <cwynne@sage.wlu.edu>
  486DX/33               3.61   Marten van de Laan <marten@cs.rug.nl>
  486DX/33 sin turbo     3.61   Dimitris Evmorfopoulos <devmorfo@mtu.edu>
  486DX4/120             3.74   Brian Wheeler <bdwheele@indiana.edu>
  486DX4/120 AMD         3.74   Frank Pilhofer <fp@informatik.uni-frankfurt.de>
  486DX4/100 Cyrix 256c  4      Joel Kelso <joel@cs.murdoch.edu.au>
  486DX/33 256c noturbo  4.25   Wouter Liefting <wlieftin@cs.vu.nl>
  486DX/33               4.66   Mark Gray <vatavian@gvu1.gatech.edu>
  486Rx2 Cyrix 25/50     4.85   <cosc19v2@menudo.uh.edu>
  486SX/33 sin turbo     5.21   Scott D. Heavner <sdh@fishmonger.nouucp>
  486DX2/66 overdrive    5.37   Jeremy Orr <jeremy@careercenter.sfsu.edu>
  486DX/33               5.66   Ryan Tucker <rtucker@ttgcitn.com>
  486DX2/66              5.88   P.J. Nefkens <p.nefkens@student.utwente.nl>
  486DX4/100             5.94   Howard Goldstein <hg@n2wx.ampr.org>
  486DX4/100 AMD         5.94   Mr Pink <vince@dallas.demon.co.uk>
  486DX4/100 notebook    6.55   Thomas <tom@dirac.physik.uni-konstanz.de>
  486DX4/100 notebook    6.55   Hugh McCurdy <hmccurdy@ix.netcom.com>
  486SLC Cyrix           7      Pieter Verhaeghe <pive@uia.ac.be>
  486SX/33               7.84   Paul Hedderly <prh6@unix.york.ac.uk>
  486DLC/40              7.98   Wil Cromer <nwc2@Ra.MsState.Edu>
  486DX4/100            11.11   NN <usenet@uxmail.ust.hk>
  486DX4/100            11.3    Earl Gooch <egooch@mc.com>
  486/66 Cyrix          13.02   Mike Baptiste <baptiste@bnr.ca>
  486SLC2/25            14.6    Vaughan R. Pratt <pratt@Sunburn.Stanford.EDU>
  486DX2/66 laptop      14.46   Robert Knop <rknop@netcom.com>
  486SLC2/66            18.94   <root@avalon.net>
  486DX/33 turbo        19.98   C Vetter <cbvetter@informatik.th-darmstadt.de>
  486SX-S/33 UMD 0c     20.20   Hynek Med <xmedh02@manes.vse.cz>
  486DX4/75             21.5    Theo Scott <rkwtgs@pukrs3.puk.ac.za>
  486DX4/75             24.13   Sherman Hsieh <shieh@csua.berkeley.edu>
  486DX2/58             26.3    Vassili Leonov <leonov@iedv7.acd.com>
  486SX-S/40 UMD 0c     26.63   Hynek Med <xmedh02@manes.vse.cz>
  486SX-U5/40 UMC 0c    26.63   Dusan Mihajlovic <zdule@herkules.co.yu>
  486DX4/100 forzado    28.67   Theo Scott <rkwtgs@pukrs3.puk.ac.za>
  486DX2/80             36      Mark Lee <mlee@heartlab.rri.uwo.ca>
  486DX2/80             50.08   Mark Lee <mlee@heartlab.rri.uwo.ca>
  486DX4/100            60      Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
  486DX2/100 forzado    60.45   Tony D Shan <tdsst9+@pitt.edu>
  486DX5/133 AMD        75.40   Jeff Hyche <jwhyche@scott.net>
  486DX5/133 AMD        80.08   NN <guesta@slip-29-7.ots.utexas.edu>
  486DX5/133 AMD        87      John Wiggins <jwiggins@comp.uark.edu>

  9.4.  Sistemas 486 de Cyrix/IBM

       Sistema             BogoMIPS  Informador
       486DLC/33              9.42   Dennis Robinson <djrobins@uxa.cso.uiuc.edu>
       486DLC/33 387DX/40     9.47   Denis Solaro <drzob@vectrex.login.qc.ca>
       486DLC/33 Cyrix wb     9.5    Matthew Asplund <matt@xenon.cchem.berkely.edu>
       486DLC/33 Cyrix 386   11.2    Alex Freed <freed@europa.orion.adobe.com>
       486DLC/40 256c        11.33   S.Schendel <sschend@magnus.acs.ohio-state.edu>
       486Dx/40 Cyrix        11.73   Malcolm Bremer <malcolm@strw.LeidenUniv.nl>
       486DRx2/40 Cyrix      13.10   Christopher Lau <clau@acs.ucalgary.ca>
       486DX/33 Cyrix        13.21   M Haardt <u31b3hs@informatik.RWTH-Aachen.DE>
       486DLC/40 bogoaceler. 13.21   Harry Pasanen <ps@tekla.fi>
       486DLC/40 487 Cyrix   13.21   Ian A. Verschuren <iav@po.CWRU.Edu>
       486DCL Cyrix          13.3    Tracer Bullet P.I. <ges@earth.baylor.edu>
       486DLC/40             13.31   Adam Frampton <frampton@access2.digex.net>
       486DLC/40             13.31   Rick Chow <crc@cacs.usl.edu>
       486SLC-S/33           13.51   Brad Pepers <pepersb@cuug.ab.ca>
       486DLC/40 no Cxpatch  15.47   Sergei O. Naoumov <serge@envy.astro.unc.edu>
       486DLC/40 TI 128c     15.97   Philip K. Roban <phil@seal.micro.umn.edu>
       486DLC/40 Cyrix       15.97   Louis J. LaBash <labash@lcjones.aclib.siue.edu>
       486DRx2/40            15.99   Christopher Lau <lauc@fusion.cuc.ab.ca>
       486DX2/66 IBM no-FF   19      NN <coolefa@pmifeg.com>
       486SLC2/66 IBM 64c    18.95   Sujat Jamil <sujat@shasta.ee.umn.edu>
       486SLC2/66 IBM 128c   18.95   Sujat Jamil <sujat@shasta.ee.umn.edu>
       486SLC2/66            19.02   Harry Mangalam <mangalam@uci.edu>
       486SLC/50             19.28   Sion Arrowsmith <sion@bast.demon.co.uk>
       486BL3/75 IBM 256c    21.50   Ming S. Chan <ming.chan@canrem.com>
       486DX2/66 Cyrix 128c  26.63   Derek Kwan <dkwan@zeus.UWaterloo.ca>
       486DX2/66 Cyrix       26.63   Adrian Parker <adrian@willen.demon.co.uk>
       486DX2-S/66 256c      26.63   Jean-Marc Wislez <JeanMarc.Wislez@rug.ac.be>

  9.5.  Sistemas 486 normales

  Sistema             BogoMIPS  Informador
  486SX/20 DECpc         9.98   Thomas Pfau <pfau@cnj.digex.com>
  486SX/25              12.24   M. Buchenrieder <mibu@scrum.greenie.muc.de>
  486SX/25              12.3    Darren McKay <e9bh@unb.ca>
  486SX/25              12.42   Mark R. Lindsey <mlindsey@nyx.cs.du.edu>
  486DX/25              12.5    Phillip Hardy <phillip@mserve.kiwi.gen.nz>
  486SX/25              12.52   Emmanual Emore <emor7672@elan.rowan.edu>
  486DX/33 256c         16.33   Eric Kemminan <ekemmina@pms709.ms.ford.com>
  486DX/33              16.35   Christopher L. Morrow <cm43@andrew.cmu.edu>
  486DX/33              16.43   Rob Janssen <pe1chl@amsat.org>
  486DX/33 64cache      16.44   H. Peter Anvin <hpa@nwu.edu>
  486DX/33 256c DIY     16.44   Wouter Liefting <wlieftin@cs.vu.nl>
  486DX/33 Intel 128c   16.44   Rafal Kustra <g1krakow@cdf.toronto.edu>
  486DX/33              16.5    Alex Freed <freed@europa.orion.adobe.com>
  486DX/33              16.6    Vaughan R. Pratt <pratt@Sunburn.Stanford.EDU>
  486DX/33 sin turbo    16.61   C Vetter <cbvetter@informatik.th-darmstadt.de>
  486DX/33              16.61   Jeffrey L. Newbern <jnewbern@athena.mit.edu>
  486DX/33              16.61   Giuseppe De Marco <gdemarco@freenet.hut.fi>
  486DX/33              16.61   M Heuler <heuler@informatik.uni-wuerzburg.de>
  486DX/33              16.61   Frank Lofaro <ftlofaro@unlv.edu>
  486DX/33              16.77   Donald Lewis <dlewis@jackson.freenet.org>
  486DX/33              16.77   Stephan Boettcher <staphan@alzt.tau.ac.il>
  486DX/33 256c         16.77   David Manchester <mustang@tartarus.uwa.edu.au>
  486DX/40              19.8    Jose Calhariz <cal@minerva.inesc.pt>
  486DX/40              19.91   M Heuler <heuler@informatik.uni-wuerzburg.de>
  486DX/40              19.96   David A. Ranch <dranch@ecst.csuchico.edu>
  486DX/40 AMD          19.97   M Haardt <u31b3hs@informatik.RWTH-Aachen.DE>
  486DX/40 Intel        19.97   Paul van Spronsen <vspr@teppic.sun.ac.za>
  486DX/40              19.97   Ulf Tietz <ulf@rio70.bln.sni.de>
  486DX/40              19.97   <Eberhard_Moenkeberg@p27.rollo.central.de>
  486DX/40              19.97   Zoltan Lajber <lajbi@lajli.gau.hu>
  486DX/40              19.97   Wim van Dorst <baron@wiesje.hobby.nl>
  486DX/40 AMD          20      Chuck Munro <chuckm@canada.hp.com>
  486DX/40 AMD          20.09   Pieter Eendebak <peendebak@bbsw.idn.nl>
  486DX/50              24.48   Arnd Gehrmann <arnd@rea>
  486DX/50 AMD          24.85   Klaas Hemstra <hst@mh.nl>
  486DX/50 DTK          24.85   Randolph Christophers <randyc@lna.oz.au>
  486DX/50              24.85   Kevin Lentin <kevinl@bruce.cs.monash.edu.au>
  486DX2/50             24.85   Jason Matthew <jmatthew@kn.pacbell.com>
  486DX2/50             24.85   Gregory P. Smith <smithgr@cs.colorado.edu>
  486DX/50 VLB          24.97   Tom Miller <tvtom@en.com>
  486DX/50              24.99   Jeff <css@erols.com>
  486DX/50 Intel 256c   24.99   Mike <mike@emgee.demon.co.uk>
  486DX/50              25      Robert Herzog <rherzog@rc1.vub.ac.be>
  486DX2/50             25      M. Abrahamsson <swmike@uplift.df.lth.se>
  486DX2/50             25.0    Christian Holtje <choltje@ux1.cso.uiuc.edu>
  486DX2/50 DECpc       25.04   Thomas Pfau <pfau@cnj.digex.com>
  486DX2/50 Eisa        25.04   John Willing <willing@cimage.com>
  486DX2/50 256c        25.04   Zhou Yanmo <zhou@gauss.math.usf.edu>
  486DX/50              25.04   Michael Kress <kress@hal.saar.de>
  486DX2/50             25.04   Mats Wikholm <mwikholm@news.abo.fi>
  486DX2/50             25.04   Jean C Delepine <delepine@linux.u-picardia.fr>
  486DX/50              25.04   Jean C Delepine <delepine@linux.u-picardia.fr>
  486DX/50              25.04   Kevin Burtch <kburtch@pts.mot.com>
  486DX/50 notebook     25.04   Pierre Frenkiel <frenkiel@cdfap1.in2p3.fr>
  486DX/50              25.10   M Heuler <heuler@informatik.uni-wuerzburg.edu>
  486DX2/50             25.4    Brian Kennedy <bkenned@hubcap.clemson.edu>
  486DX2/66             32      Lee Sau Dan <h9210876@khuxa.hku.hk>
  486DX2/66             32.9    Frederick <niles@axp745.gsfc.nasa.gov>
  486DX2/66             33      Alec Muffett <alecm@uk-usenet.uk.sun.com>
  486DX2/66             33      NN <coolefa@pmifeg.com>
  486DX2/66             33      Steve Tinney <sjt@enlil.museum.upenn.edu>
  486DX2/66 Intel       33      Chuck Munro <chuckm@canada.hp.com>
  486DX2/66 VLB         33.0    Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
  486DX2/66 AMD         33.05   G. Skinner <gskinner@gwsunix1.crystalball.com>
  486DX2/66             33.20   Arnd Gehrmann <arnd@rea>
  486DX2/66 Intel/PCI   33.22   C. Menke <carsten.menke@post.uni-bielefeld.de>
  486DX2/66             33.22   Brian Ricker <gt2327c@prism.gatech.edu>
  486DX2/66             33.22   Don Bennett < <don@engr.mun.ca>
  486DX2/66             33.22   Robert Heller <heller@cs.umass.edu>
  486DX2/66             33.22   Warwick Ward-Cox <wwar@lostlink.alt.za>
  486DX2/66             33.22   Chien-An Chen <giant@nwu.edu>
  486DX2/66 Eisa/VL     33.22   Serge <sviznyuk@magnus.acs.ohio-state.edu>
  486DX2/66 AMD         33.22   Wayne Robinson <wayner@renoir.cftnet.com>
  486DX2/66 Intel       33.22   Jim Barber <yeul@marsh.cs.martin.edu.au>
  486DX2/66             33.22   Tom Lowery <tlowery@mcs.kent.edu>
  486DX2/66             33.27   S Viznyuk <sviznyuk@magnus.acs.ohio-state.edu>
  486DX2/66             33.3    Devon Tuck <devon@netcom.com>
  486DX2/66 256cache    33.4    H. Peter Anvin <hpa@nwu.edu>
  486DX2/66             33.5    Jongyoon Lee <mr2@netcom.com>
  486DX2/66             33.5    Petrovsky Alexey <gong@cs.msu.su>
  486DX2/66             33.5    Sung Lee <slee2@umbc.edu>
  486DX2/66             33.55   Gene McCulley <mcculley@greatwall.cctt.com>
  486DX2/66             33.55   W. Zeilinger <wzeil@doradus.ast.univie.ac.at>
  486DX2/66             33.55   Donald Lewis <dlewis@jackson.freenet.org>
  486DX2/66             33.55   Eric Malkowski <malk@world.std.com>
  486DX2/66 0c          33.55   Chris Petit <mystere@ix.net.com>
  486DX2/66             33.55   <al-b@minster.york.ac.uk>
  486DX2/66             33.55   Jesper de Jong <jesper@cas.et.tudelft.nl>
  486DX2/66             33.55   John Paul Morrison <jmorriso@bogomips.com>
  486DX2/66             33.55   Arash <ei39594@ios.chalmers.se>
  486DX2/66             33.55   Ralph Lewis <rlewis@mail.wsu.edu>
  486DX2/66             33.55   Ulisses Alonso Camaro <alonso@bebe.uv.es>
  486DX2/66             33.55   Bussmann <bussmann@wolpi.infomatik.uni-bonn.de>
  486DX2/66 Intel/PCI   33.55   Louis J. LaBash <labash@lcjones.aclib.siue.edu>
  486DX2/66 Intel       33.55   Andrew Tubbiolo <enigma@seds.lpl.arizona.edu>
  486DX2/66             33.55   W Fink <werner.fink@physik.uni-stuttgart.de>
  486DX2/66 ICL         33.55   Mathias Koerber <mathias@solomon.technet.sg>
  486DX2/66             33.55   Bill Pogue <gwp@dithots.dithots.org>
  486DX2/66 256c        33.58   Theo Scott <rkwtgs@pukrs3.puk.ac.za>
  486DX2/66             33.7    C Triantafillou <triant@pegasus.montcleair.edu>
  486DX2/66 256c Intel  33.81   S Harris <harris@teaching.physics.ox.ac.uk>
  486DX2/66             33.9    Magnus Back <erambk@eraj.ericsson.se>
  486DX2/66 notebook    33.9    Robert A Knop <rknop@mop.caltech.edu>
  486DX2/66             34.06   Al Clark <aclark@netcom.com>
  486DX4/75             37.47   G Asmundarson <grettir@wordperfect.com>
  486DX2/80             39.93   Andrew Tubbiolo <enigma@seds.lpl.arizona.edu>
  486DX2/80 forzado/66  39.94   Mario L. Guttierez <mgutier@mentor.sdu.edu>
  486DX2/80 AMD         39.94   Corey D Brenner <brenner@umr.edu>
  486DX2/80             39.94   Dan Delaney <cgdela01@homer.louisville.edu>
  486DX2/80             39.94   D t Haar <danny@caution.cistron.nl.mugnet.org>
  486DX2/80 forzado     39.94   Peter Suetterlin <ps@kis.uni-freiburg.de>
  486DX2/80 AMD         39.94   JL Gomez <kitana!sysop@caprica.com>
  486DX2/80 AMD         39.94   Pete Krawczyk <pkrawczy@uiuc.edu>
  486DX2/80 AMD         40      Rene Baart <baart@simplex.nl>
  486DX2/80 AMD         40      Wolfgang Kalthoff <wo@rio70.bln.sni.de>
  486DX2/80             40.0    Rick Brown <ccastrb@prism.gatech.edu>
  486DX2/80 AMD         40.14   Jon Lewis <jlewis@inorganic5.chem.ufl.edu>
  486DX2/80 AMD         40.14   Richard S. Stone <rstone@edgp.com>
  486DX2/80             40.15   Oleg <oleg@hpcms.co.il>
  486DX2/80 AMD         40.18   Adri Verhoef <a3@a3.xs4all.nl>
  486DX2/80             40.18   Mats Andtbacka <mandtback@abo.fi>
  486DX2/100 AMD forza. 49.14   Jon Lewis <jlewis@inorganic5.chem.ufl.edu>
  486DX4/100 256c       49.71   Lutz Pressler <lutz.pressler@med-stat.GWDG.de>
  486DX4/100            49.71   Brett Gersekowski <bgrerseko@powerup.com.au>
  486DX4/100 Intel 256c 49.77   Angelo Haritsis <ah@doc.ic.ac.uk>
  486DX4/100            49.78   Aurel Balmosan <aurel@xylo.owl.de>
  486DX4/100            49.87   Chris Saia <minkie@concentric.net>
  486DX4/100            50      Donald Lewis <dlewis@jackson.freenet.org>
  486DX4/100            50.02   Peter Skov Knudsen <gogol@ask.diku.dk>
  486DX4/100            50.02   Shadow Weaver <djamison@students.wisc.edu>
  486DX4/100 AMD        50.3    Dave <shodan@shodan.clark.net>
  486DX4/100 AMD        50.04   Tony Smolar <asmolar@fast.net>
  486DX4/100            50.05   fredk <fredk@shadow.net>
  486DX4/100            50.06   Ronald Prague <ronp@fisnet.net>
  486DX4/100            50.08   Matt Gisher <matt@matt.fidalgo.net>
  486DX4/100            50.08   Steven A. Duchene <sduchene@cis.ysu.edu>
  486DX4/100            50.08   Miles O'Neal <meo@schoneal.com>
  486DX4/100            50.08   Will <zxmvg07@hp12.zdv.uni-tuebingen.de>
  486DX4/100            50.08   Piet de Bondt <bondt@dutiws.twi.tudelft.nl>
  486DX4/100 laptop     50.08   Karl Kleinpaste <karl_kleinpaste@cs.cmu.edu>
  486DX4/100 256c       50.08   Thomas Kanschik <y0000997@ws.rz.tu-bs.de>
  486DX4/100            50.08   Linas Vepstas <linas@fc.net>
  486DX4/100            50.08   Ed Daiga <daiga@engin.umich.edu>
  486DX4/100 notebook   50.08   Gerry Quejada <fd863@cleveland.freenet.edu>
  486DX4/100 AMD        50.08   B Schuller <schuller@ind136a.wi.leidenuniv.nl>
  486DX4/100            50.08   J.L. Brothers <brothers@halcyon.com>
  486DX4/100            50.08   David E.A. Wilson <david@cs.uow.edu.au>
  486DX4/100            50.08   Mark Lumsden <root@titan2.physics.mcmaster.ca>
  486DX4/100            50.08   Ashar <ashar@netcom12.netcom.com>
  486DX4/100            50.08   Jacob Waltz <waltz@pcjiw.lampf.lanl.gov>
  486DX4/100            50.08   Tom Sinclair <sinner@cafe.net>
  486DX4/100 AMD        50.08   G. Skinner <gskinner@gwsunix1.crystalball.com>
  486DX4/100 AMD        50.08   Nick Savoiu <nick@ritz.mordor.com>
  486DX4/100            50.08   Thomas J Fisher <twb5odt@nmia.com>
  486DX4/100            50.08   Pascal Pensa <pensa@aurora.unice.fr>
  486DX4/100            50.08   Julian Bradbury <julian@xabcs.demon.co.uk>
  486DX4/100            50.51   Frederic Potter <frederic@swing.ibp.fr>
  486DX4/100            50.66   Bill Stegers <bill_ste@zeelandnet.nl>
  486DX4/120 256c       59.1    Kevin <kalichwa@oakland.edu>
  486DX4/120 AMD        59.80   Mark Tranchant <mat92@ecs.soton.ac.uk>
  486DX4/120 AMD        59.80   Fred Broce <fbroce@atlanta.com>
  486DX4/120 AMD        59.90   Marko Ovaska <ovaska@cc.helsinki.fi>
  486DX4/120 AMD        59.80   Bob Purdon <bobp@mpx.com.au>
  486DX4/120 AMD        59.80   Pat Young <dice@netbsd.warped.com>
  486DX4/120            59.91   Will <zxmvg07@hp12.zdv.uni-tuebingen.de>
  486DX4/120 AMD 256c   60.01   Angelo Haritsis <ah@doc.ic.ac.uk>
  486DX4/120 forzado    60.45   Pascal Pensa <pensa@aurora.unice.fr>
  486DX4/120            60.45   Neal Howard <neal@metronet.com>
  486DX4/120 AMD        60.45   Oscar Belmar Madrid <obelmar@anakena.usach.cl>
  486DX4/120            60.45   Jason Buchanan <jsb@digistar.com>
  486DX4/120            60.45   Foersterling <dirk@informatik.uni-frankfurt.de>
  486DX4/120            60.45   Bernd Hentig <bernd@finow.snafu.de>
  5x86/133 AMD          66.15   Brad Wilson <bwilson@deltanet.com>
  5x86/133 AMD          66.44   P Yli-Krekola <perttu@ntcmar01ba.ntc.nokia.com>
  5x86/133 AMD          66.55   Andrew B. Cramer <cramer@ripco.com>
  5x86/133 AMD          66.65   Geoff Raye <gtraye@igsrsparc2.er.usgs.gov>
  5x86/133 AMD          66.7    Klaas Hemstra <hst@mh.nl>
  5x86/133 AMD          66.80   N.N. <vp24njcb@ubvms.cc.buffalo.edu>
  5x86/133 AMD   256c   67.10   Vasily Lewis <vlewis@iastate.edu>
  5x86/133 AMD          67.10   James Reith <reith@racores.com>
  5x86/133 AMD   256c   67.10   Yves Rougy <yrougy%siam@cal.fr>
  5x86/133 AMD   256c   67.10   Peter A. Koren <pkoren@lvdc20.dseg.ti.com>
  5x86/133 AMD   256c   67.10   Wim Joppe <joppe@xs4all.nl>
  5x86/133 AMD   256c   67.10   Gunnar Stefansson <gunnars@rhi.hi.is>
  5x86/133 AMD   256c   67.10   Vernard Martin <vernard.martin@cc.gatech.edu>
  5x86/150 AMD forzado  74.75   Sergio Riveros <riveros@musca.unm.edu>
  5x86/150 AMD forzado  74.75   Arthur K. Chan <artchan@cs.ucr.edu>
  5x86/160 AMD forzado  79.87   M.Suencksen <msuencks@techfak.uni-bielefeld.de>
  5x86/160 AMD forzado  79.89   Martin Vernon <martin@gw6hva.demon.co.uk>
  5x86/160 AMD forzado  79.92   T. Zerucha <zerucha@shell.portal.com>
  5x86/160 AMD forzado  80.36   Paul Colucci <pcolucci@acsu.buffalo.edu>
  5x86/160 AMD forzado  80.36   Steinar Haug <sthaug@nethelp.no>
  5x86/160 AMD forzado  80.36   James Daniel <triadmin@bga.com>
  486DX5/160 Cyrix      80.36   David H.S. Oh <david@std.net>

  9.6.  Sistemas Pentium configurados extraa o defectuosamente

       Sistema             BogoMIPS  Informador
       Pentium/66             2.18   Bob Myers <root@shyguy.lonestar.org>
       Pentium/90 notebook    9.5    Mark Maybee <markm@cs.colorado.edu>
       6x86/120 Cyrix        52.32   Joel Boring <dwild@eskimo.com>
       Pentium/83 Overdrive  82.85   Brian Smith <smithb@laraby.tiac.net>
       Pentium/83 Overdrive  83.32   Scott Francis <mord@netcom.com>
       Pentium/83 Overdrive  82.94   Greg Spiegelberg <greg@owens.ridgecrest.ca.us>
       Pentium/83 Overdrive  83.35   Jacek Polewczak <jacek.polewczak@csun.edu>
       6x86/120 P120+forza. 104.86   Howard Poe <falcor@kingsnet.com>

  9.7.  Sistemas Pentium normales

  Sistema             BogoMIPS  Informador
  Pentium/60            23      Chien-An Chen <giant@nwu.edu>
  Pentium/60            23.96   Joost Helberg <jhelberg@nlsun8.oracle.nl>
  Pentium/60            23.96   Ulf Tietz <ulf@rio70.bln.sni.de>
  Pentium/60 Gateway    23.96   Manoj Kasichainula <mvkasich@eos.ncsu.edu>
  Pentium/60            23.96   Pierre Frenkiel <frenkiel@cdfap1.in2p3.fr>
  Pentium/60            23.96   Tim Oosterbroek <tim@astro.uva.nl>
  Pentium/60 NCR 3455   24      Mathias Koerber <mathias@solomon.technet.sg>
  Pentium/60            24      Joe Sloan <jjs@engr.ucr.edu>
  Pentium/60            24.0    Mark H. Wood <mwood@indyvax.iupui.edu>
  Pentium/60            24.13   Roland M. van Rijswijk <rijswijk@cs.utwente.nl>
  Pentium/66            25      Chuck Munro <chuckm@canada.hp.com>
  Pentium/66            26.63   Jason M. Naughton <jnaughto@ee.ryerson.ca>
  Pentium/66            26.84   Kelly Carmichael <kcarmich@cln.etc.bc.ca>
  Pentium/75 256c       29.5    Chris Dodd <cdodd@super.win.or.jp>
  Pentium/75 Intel      29.79   Scott M. Grim <sgrim@netwalk.com>
  Pentium/75            29.95   Steve Martin <smartin@mrg.uswest.com>
  Pentium/75            30.22   Zoran Marjanski <bagzor@enterprise.ca>
  Pentium/75            30.22   Andrew Buckby <c4ab1@dmu.ac.uk>
  Pentium/75            30.22   Stuart Nuttall <u9230106@sys.uea.ac.uk>
  Pentium/90 notebook   32.73   Rich Neves <neves@cs.colorado.edu>
  Pentium/90            34.07   Alistair Galbraith <ajgalb@postman.essex.ac.uk>
  Pentium/90 zappa 256c 35.6    Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
  Pentium/90            35.88   Joe Anderson <CPJJA@ttacs3.ttu.edu>
  Pentium/90            35.88   Warwick Allison <warwick@cs.uq.oz.au>
  Pentium/90            36      Joe Sloan <jjs@engr.ucr.edu>
  Pentium/90            36      Larry Auton <lda@nfa.research.att.com>
  Pentium/90            36      Richard Knipe <knipe@lobby.ti.com>
  Pentium/90            36.0    Werner Almesberger <almesber@lrc.epfl.ch>
  Pentium/90            36.06   Rob J. Nauta <rob@iaehv.nl>
  Pentium/90            36.08   Leung Hon Wa <cshwleun@cs.citu.edu.hk>
  Pentium/90 Zeos       36.08   Chris Laurel <claurel@mr.net>
  Pentium/90            36.08   Ronald Prague <ronp@fishnet.net>
  Pentium/90            36.08   Adrian Blues <adrian@hypereality.co.uk>
  Pentium/90            36.08   Pak Yin Tam "Fred" <ptam@eesun1.tamu.edu>
  Pentium/90            36.08   Jason Heiss <jheiss@cco.caltech.edu>
  Pentium/90            36.08   Tim Krantz <tek@dsinc.com>
  Pentium/90 Gateway    36.08   Pete Stewart <stewart@bae.bellcore.com>
  Pentium/90            36.08   Tom Manos <tmanos@infi.net>
  Pentium/90            36.08   Richard Mundell <R.Mundell@uea.ac.uk>
  Pentium/90            36.08   NN <usenet@uxmail.ust.hk>
  Pentium/90            36.08   Yavuz Batmaz <yavuzb@knidos.cc.metu.edu.tr>
  Pentium/90            36.08   Alan Skelley <askelley@gpu.srv.ualberta.ca>
  Pentium/90            36.08   Ralph Sims <ralphs@locus.halcyon.com>
  Pentium/90            36.08   Julian Bradbury <julian@xabcs.demon.co.uk>
  Pentium/90            36.08   Dan Langrill <langrlld@mussel.cig.mot.com>
  Pentium/90            36.08   Ravi Krishna Swamy <rkswamy@eos.ncsu.edu>
  Pentium/90            36.08   J.L. Brothers <brothers@halcyon.com>
  Pentium/90 Micronics  36.09   Andrew Brown <andrewbrown@acm.org>
  Pentium/90            36.27   Giao H. Phan <giao@concrete.resnet.upenn.edu>
  Pentium/90 Plato      36.4    Joe Valenzuela <smarm@ibm.net>
  Pentium/90            36.5    Mike Kelleher <mikejk@umfacad.maine.edu>
  Pentium/90            36.9    Ted Gaunt <tgaunt@pms701.pms.ford.com>
  Pentium/100           39.52   Adrian Blues <adrian@hypereality.co.uk>
  Pentium/100 forzado   39.73   Phil Howard <phil@clr.com>
  Pentium/100           39.73   Weiss <Peter.Weiss@informatik.uni-oldenburg.de>
  Pentium/100 0c        39.73   Jason Crawford <jasonc1@gramercy.ios.com>
  Pentium/100           39.93   Tom Miller <tvtom@en.com>
  Pentium/100 Cyrix     39.94   Mike Holland <myk@cygnus.uwa.edu.au>
  Pentium/100           39.94   KAZ Vorpal <kaz@upx.net>
  Pentium/100 forzado   39.94   Donar G.E. Alofs <donar@cs.vu.nl>
  Pentium/100           39.94   Larry Snyder <larry@trauma.iag.net>
  Pentium/100           39.94   Ian Hill <ian@hecate.phy.queensu.ca>
  Pentium/100           39.94   John Crawford <link@spu.edu>
  Pentium/100           39.94   Jered <jered@mit.edu>
  Pentium/100 forzado   39.94   Ian <irs2@tweedledum.amp.york.ac.uk>
  Pentium/100           39.94   Brian McGhee <brianm@iceonline.com>
  Pentium/100           39.94   M Skjelland <morten.skjelland@pvv.unit.no>
  Pentium/100           39.96   Dan Kha <dkha@yorku.ca>
  Pentium/100           39.98   Phillipe Charon <charron@ecoledoc.ibp.fr>
  Pentium/100           40.03   <bon@elektron.ikp.physik.th-darmstadt.de>
  Pentium/100           40.08   Ronny Spiegel <rspiegel@htwm.de>
  Pentium/100           40.18   David Baldwin <davidb@exis.net>
  Pentium/100           40.18   <habibie@catevr.fiu.edu>
  Pentium/120 Cyrix     47.8    Simon Ho <simon@epsilon.win-uk.net>
  Pentium/120 Cyrix     47.92   Joel N. Squire <squire@colorado.edu>
  Pentium/120           47.93   Umberto d'Ortona <umberto@grenet.fr>
  Pentium/120 Cyrix     47.93   Jim T. Polk <jtpolk@cris.com>
  Pentium/120           47.93   Jon Trowbridge <trow@mcs.com>
  Pentium/120           47.98   Craig Bates <cbates@psu.edu>
  Pentium/120 Cyrix     48      Steve <horne@mhd2.pfc.mit.edu>
  Pentium/120           48.00   Michael Wazenski <mwazenski@dsrnet.com>
  Pentium/120 Intel     48.02   Scott M. Grim <sgrim@netwalk.com>
  Pentium/120 Cyrix     48.27   Glenn T. Jayaputera <gjt@budgie.apana.org.au>
  Pentium/120           48.27   Roman Mitnitski <mitnits@shany.net>
  Pentium/120           48.27   Peter Walsh <pwalsh@rain.org>
  Pentium/120 Cyrix     48.2    S Viznyuk <sviznyuk@magnus.acs.ohio-state.edu>
  Pentium/120           49.27   Simon Hargrave <simon@revell.demon.co.uk>
  Pentium/133           53.04   Wayne Roberts <wroberts@aug.com>
  Pentium/133           53.04   Gregory Travis <greg@indiana.edu>
  Pentium/133           53.25   Chuck Mattern <cmattern@mindspring.com>
  Pentium/133           53.26   Glenn Holt <gholt@lsil.com>
  Pentium/133           53.26   Chaim Tarshish <chaim@ipl.med.nyu.edu>
  Pentium/133           53.26   Mitchell B. Hamm <hamm@one.net>
  Pentium/133           53.26   Donald Lewis <dlewis@jackson.freenet.org>
  Pentium/133           53.26   Jon Trowbridge <trow@kremlin.emccta.com>
  Pentium/133           53.26   Charny Peete Mitchell <cpmiche@eos.ncsu.edu>
  Pentium/133 256c      53.26   David Wuertele <dave@gctech.com>
  Pentium/133 256c      53.68   Guiseppe Miceli <ferdy@ccii.unipi.it>
  Pentium/133           53.68   Michael Kress <kress@hal.saar.de>
  Pentium/150 Intel     59.80   Joel D. Young <jdyoung@afit.af.mil>
  Pentium/150 forzado   60.21   Duarte Cordeiro <l38404@alfa.ist.utl.pt>
  Pentium/166           66.16   Pedro Soria-Rodriguez <sorrodp@wpi.edu>
  Pentium/166           66.35   Krishnakumar Visweswaran <kviswesw@lehman.com>
  Pentium/166           66.44   Donald Lewis <dlewis@jackson.freenet.org>
  Pentium/166           67.10   Jon Trowbridge <trow@mcs.com>
  Pentium/166           67.10   Dylan <dylan@ert.com>
  Pentium/166 512c      67.10   Dirk Freese <freese@infra.de>

  9.8.  Variaciones de sistemas Pentium normales

  SMP Pentium/90        71.98   Daniel Luhde-Thompson <dl10010@cam.ac.uk>
  SMP Pentium/90        72.08   Alan Cox <alan@cymru.net>
  SMP Pentium Pro/200  398.6    Bill Davidsen <davidsen@tmr.com>
  SMP Pentium Pro/200  398.95   Fons Rademakers <f.rademakers@cern.ch>
  SMP Pentium Pro/200  398.98   Greg Fausak <glfausak@august.com>

  Pentium Pro/133      132.88   John D. Sundberg <jdsundberg@mmm.com>
  Pentium Pro/180      179.61   Chuck Fee <fee@ch4549.org>
  Pentium Pro/200      197.42   Michael Griffith <grif@cs.ucr.edu>
  Pentium Pro/200      197.42   Curtis Varner <carner@cs.ucr.edu>
  Pentium Pro/200      198.84   Erik Max Francis <max@alcyone.com>
  Pentium Pro/200      198.84   Marc Winkler <marcus@healthchex.com>
  Pentium Pro/200      199.04   V. Bostrom <Vareck_Bostrom@ccm.jf.intel.com>
  Pentium Pro/200      199.06   Glenn Lamb <mumford@netcom15.netcom.com>
  Pentium Pro/200      199.07   Stefan <boresch@schuber.u-strasbg.fr>
  Pentium Pro/200      199.07   Chris Jones <chris@planetsymphone.com>
  Pentium Pro/200      200.32   Jose Navarro <jnavarro@aoc.nrao.edu>
  Pentium Pro/200      200.32   Wayne Scott <wscott@ichips.intel.com>
  Pentium Pro/200      200.32   Adrian L. Hosey <ahosey@cs.indiana.edu>

  5x86/100 Cyrix       100.16   NN <root@anxa04.cc.ic.ac.uk>
  5x86/100             100.19   Valient Gough <vgough@teton.mines.edu>
  5x86/100 Cyrix       100.47   C.Chan <chan@alfrothul.uchicago.edu>
  5x86/120 Cyrix P150+ 119.60   Wynstan Tong <wynstan@eecg.toronto.ca>
  5x86/120 Cyrix P150+ 119.60   Joel N. Squire <squire@colorado.edu>
  5x86/120 Cyrix P150+ 119.83   Leland Olds <olds@eskimo.com>
  5x86/120 Cyrix P150+ 119.83   NN <root@anxa04.cc.ic.ac.uk>
  5x86/120 Cyrix P150+ 120.68   C.Chan <chan@alfrothul.uchicago.edu>
  5x86/133 Cyrix P166+ 132.88   Craig Andersen <andersen@fastlane.net>

  6x86/100 Cyrix        99.42   Stig M. Valstad <svalstad@sn.no>
  6x86/120 Cyrix       120      John C. Beasley <beaslej1@nevada.edu>
  6x86/120 Cyrix P150+ 119      Jean-Claude Gouiran <jcg13@ibm.net>
  6x86/120 Cyrix P150+ 119.60   Taso Lyristis <taso@remus.rutgers.edu>
  6x86/120 Cyrix P150+ 119.83   Roger Merchberger <zmerch@northernway.net>
  6x86/133 Cyrix P166+ 132.82   Alex Liffers <aliffers@tartarus.uwa.edu.au>

  5k86/90 AMD          179.40   <root@krabi.mbp.ee>
  5k86/90 AMD          181.00   Drew Golden <golden@platinum.nb.net>
  5k86/90 AMD          179.40   Ken Edwards <edwards@thor.xon.cuug.ab.ca>

  9.9.  Sistemas Alpha normales

  Sistema             BogoMIPS  Informador
  21064/150 Jensen        148.37  Linus Torvalds <torvalds@cc.helsinki.fi>
  21064/150 Jensen        149.49  J.L. Brothers <brothers@halcyon.com>
  21064/150 Jensen        148.89  Martin Osterman <ost@comnets.rwth-aachen.de>k

  21064A/275 Cabriolet    272     Linus Torvalds <torvalds@cc.helsinki.fi>
  21064A/275              272     Stephen Gaudet <sjg@tiac.net>
  21064A/275 Cabriolet    272.63  Jay Estabrook <jestabro@amt.tay1.dec.com>
  21064A/275 Cabriolet    273.37  David Mosberger-Tang <davidm@cs.arizona.edu>
  21064A/275              274.11  Kevin Jacobs <jacobs@eek.cwru.edu>
  21064A/300 Cabriolet    298     Jay Estabrook <jestabro@amt.tay1.dec.com>
  21064A/300              298     Stephen Gaudet <sjg@tiac.net>

  21066/166               164.59  David Mosberger-Tang <davidm@cs.arizona.edu>
  21066/166               165     Gareth Bult <gareth@ftech.net>
  21066/166               165.04  Craig Ruff <cruff@ncar.ucar.edu>
  21066/200               196.9   Danny ter Haar <danny@cistron.nl>

  21066A/233 AS400        230.16  Ophir Ronen <ophir@connectsoft.com>
  21066A/233 NoName       230.67  T. Bogendoerfer <tsbogend@bigbug.franken.de>
  21066A/233 NoName       230.76  Mikael Nykvist <viper@ludd.luth.se>
  21066A/233 NoName       231.21  Jay Estabrook <jestabro@amt.tay1.dec.com>
  21066A/233 NoName       231.21  Wim van Dorst <baron@clifton.hobby.nl>

  21164/266 EB164         265.29  Jay Estabrook <jestabro@amt.tay1.dec.com>
  21164/333 Alcor         331.35  Linus Torvalds <torvalds@cs.helsinki.fi>
  21164/333 Alcor         331.35  David Mosberger-Tang <davidm@azstarnet.com>

  9.10.  Sistemas Motorola normales

       Sistema               BogoMIPS  Informador
       68030/16 Atari Falcon     3.95  J.L. Brothers <brothers@halcyon.com>
       68030/16 Atari Falcon     3.98  <Roman.Hodek@informatik.uni-erlangen.de>
       68030/20 0c               4.92  Chris Nadigh <chrnadig@iiic.ethz.ch>
       68030/25 Amiga 3000       6.21  Hamish Macdonald <hamish@bnr.ca>
       68030/25 Amiga 3000       6.21  J.L. Brothers <brothers@halcyon.com>
       68030/32 Atari Falcon     7.91  Franz Korntner <fkorntne@bazis.nl>
       68030    Atari TT         7.96  <schwab@issan.informatik.uni-dortmund.de>
       68030/32 Atari MegaST     7.98  E.J. van den Bussche <busscheh@ksepl.nl>
       68030/33 Atari TT         7.98  <Roman.Hodek@informatik.uni-erlangen.de>
       86030    Atari TT         7.98  Wayne Booth <trek@ihgp114r.ih.att.com>
       68030/48 32c             11.89  Martin Rogge <Martin_Rogge@ki.maus.de>
       68030/50 Atari           12     <Roman.Hodek@informatik.uni-erlangen.de>
       68030/50 32c             12.42  Michael Plonus <michi@pluto.ping.de>

       68040/24 Amiga 4000-40   16.6   Hamish Macdonald <hamish@bnr.ca>
       68040/24 Amiga 4000-20   16.60  J.L. Brothers <brothers@halcyon.com>
       68040/25 Amiga 4000-040  16.61  <Geert.Uytterhoeven@cs.ku-leuven.ac.be>
       68040/25 Amiga 4000      16.61  Lawrence <lawrenc@nextwork.rose-hulmand.edu>
       68040/66 Medusa T60      22     <Roman.Hodek@informatik.uni-erlangen.de>

       68060/50 Amiga 4000     100.16  Jan Johansson <jj@mordor.it.kth.se>

  9.11.  Otros sistemas: Sparc, PowerPC, Mips, Intel 8088

       Sistema               BogoMIPS  Informador
       Intel 8088/4.77           0.02  Tim Van der Linden <timvdl@innet.be>
       Intel 8088/10             0.05  Tim Van der Linden <timvdl@innet.be>
       Intel 8086                0.5   Kin Lau <gabe@zot.io.org>

       Sparc Sun4c              17.94  J.L. Brothers <brothers@halcyon.com>

       PowerPC 601/60 Mac6100   45.24  J.L. Brothers <brothers@halcyon.com>
       PowerPC 601/66 Mac       51.62  Fred Klein <klein@des3.u-strasbg.fr>
       PowerPC 601/60 Mac6100   59.38  Kent Radek <goo@itd.sterling.com>

       Mips R4000/100           48.30  J.L. Brothers <brothers@halcyon.com>
       Mips R4000/100 Magnum    50.03  Andreas Busse <andy@soft-n-hard.de>
       Mips R4400/134 Acer Pica 67.10  Andreas Busse <andy@soft-n-hard.de>
       Mips R4400/134 Acer Pica 67.10  Ralf Baechle <ralf@waldorf-gmbh.de>
       Mips R4600/133 Tyne     133.12  Ralf Baechle <ralf@waldorf-gmbh.de>

  9.12.  Sistemas no basados en Linux (slo referencia)

  Sistema                     S.O.   BogoMIPS  Informador
  68020/20 Sun 3              SUNOS      2.0   <korpela@ssl.berkeley.edu>
  68020/25 Sun 3-180          SUNOS      4.0   <korpela@ssl.berkeley.edu>
  Sparc Sun 3-60              SUNOS      4.00  <tranter@software.mitel.com>
  Sparc Sun 3-80              SUNOS      4.00  <tranter@software.mitel.com>
  68040/33 HP9000-280         HP-UX     14     <niles@axp745.gsfc.nasa.gov>
  Sparc Sun 4-280             SUNOS     16.0   <korpela@ssl.berkeley.edu>
  Sparc Sun IPC/40            Solaris   16.00  <gong@cs.msu.su>
  68040 NextStep              (?)       16.26  <petergun@coffeehaus.com>
  Sparc Sun Sparcstation1     SUNOS     18.00  <tranter@software.mitel.com>
  Sparc Sun Sparcstation1+    SUNOS     19     <swmike@uplift.df.lth.se>
  Sparc Sun Sparcstation1+    SUNOS     24.00  <tranter@software.mitel.com>
  Sparc Sun IPC               SUNOS     24.00  <tranter@software.mitel.com>
  Sparc Sun Sparcstation2     SUNOS     26.00  <gong@cs.msu.su>
  SparcClassic/50             Solaris   32.00  <gong@cs.msu.su>
  Sparc Sun ELC               SUNOS     32.00  <tranter@software.mitel.com>
  HP-PA 9000-720              HP-UX     32.00  <metod.kozelj@rzs-hm.si>
  Sparc Sun SS10              SUNOS     34.00  <tranter@software.mitel.com>
  Pentium/100                 Win-NT    36.21  <marcus@healthchex.com>
  Sparc Sun Sparcstation2     SUNOS     38.0   <korpela@ssl.berkeley.edu>
  Mips R4000/100 Indy         (?)       48.00  <p.verwer@organon.akzonobel.nl>
  Mips R4000/100 SGI IndySC   Irix      48.00  <lziegler@csbsju.edu>
  HP-PA 9000-720              HP-UX     48.00  <metod.kozelj@rzs-hm.si>
  Sparc Sun Sparcstation10d   SUNOS     54.0   <korpela@ssl.berkeley.edu>
  Sparc SS1000 2CPU           SUNOS     58.00  <gong@cs.msu.su>
  Alpha 21064/133 Decstation  OSF1      64     <niles@axp745.gsfc.nasa.gov>
  Sparc Sun SS5               SUNOS     68.00  <tranter@software.mitel.com>
  Sparc Sun SS20              SUNOS     72.00  <tranter@software.mitel.com>
  Sparc Sun SS20/712          Solaris   74     <spohr@qmos>
  Mips R4400/150 Challenge    (?)       74.00  <p.verwer@organon.akzonobel.nl>
  Mips R4400/150 Indigo2Extr  (?)       74.00  <p.verwer@organon.akzonobel.nl>
  HP-PA 9000-715              HP-UX     74.00  <metod.kozelj@rzs-hm.si>
  Alpha                       OSF1      92.00  <petergun@coffeehaus.com>
  Mips R4400/200 Indigo2Extr  (?)       98.00  <p.verwer@organon.akzonobel.nl>
  HP-PA 9000-735/99           HP-UX     98.00  <lankhors@cs.rug.nl>
  Sparc Sun SS4/110           Solaris  108     <spohr@qmos>
  Sparc Sun SS5               SUNOS    110     <swmike@uplift.df.lth.se>
  Alpha 21064A/233            OSF1     114     <niles@axp745.gsfc.nasa.gov>
  HP-PA 700/125               HP-UX    122     <niles@axp745.gsfc.nasa.gov>
  HP-PA 9000-735/125          HP-UX    122.00  <lankhors@cs.rug.nl>
  Mips R4600/133 SGI Indy     Irix     132     <lziegler@csbsju.edu>
  Alpha                       OSF1     180.0   <mauger@ensinfo.univ-nantes.fr>
  Sparc Sun US1/170           Solaris  330     <spohr@qmos>
  Alpha 3000/600S             VMS      348.61  <metod.kozelj@rzs-hm.si>
  Alpha server 1000-4/200     VMS      397.68  <metod.kozelj@rzs-hm.si>
  Cray J90 Y-MP/100 16CPU     Unicos   912.00  <lankhors@cs.rug.nl>

  10.  Nota sobre la traduccin al espaol

  La presente traduccin de este documento ha sido realizada por Juan
  Carlos Durn Garca jcdg@hotmail.com, componente del proyecto INSFLUG.

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Bridge+Cortafuegos Mini-COMO
  Peter Breuer, ptb@it.uc3m.es
  v1.2, 19 Diciembre 1997

  Configuracin de un sistema en el que coexista un cortafuegos con
  bridging de interfaces de red
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Qu y por qu (y cmo)?

  2.1.    Qu

  2.2.    Por qu

  2.3.    Cmo?

  3.      Bridging

  3.1.    Software

  3.2.    Lecturas previas.

  3.3.    Configuracin del arranque

  3.4.    Configuracin del kernel

  3.5.    Direcciones de red

  3.6.    Rutado de red

  3.7.    Configuracin de la tarjeta

  3.8.    Rutado adicional

  3.9.    Configuracin del puente

  3.10.   Probarlo

  3.11.   Comprobaciones

  4.      Cortafuegos

  4.1.    Software y lecturas

  4.2.    Comprobaciones preliminares

  4.3.    Reglas por defecto

  4.4.    Huecos por direccin

  4.5.    Huecos por protocolo

  4.6.    Comprobaciones

  5.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Debera consultar el documento Bridging mini-HOWTO,
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Bridge por Chris Cole
  para obtener otra perspectiva de este TEMA. Su direccin es
  chris@polymer.uakron.edu.  La versin de su COMO en la que he basado
  este documento es la 1.03, con fecha del 23 de Agosto de 1996.

  2.  Qu y por qu (y cmo)?

  2.1.  Qu

  Un puente es un cable inteligente que conecta dos tarjetas de red. Un
  cortafuegos es un aislante inteligente.

  2.2.  Por qu

  Puede querer un puente cuando tenga varios ordenadores:

  1.  para ahorrar el precio de un nuevo concentrador si resulta tener
     una tarjeta ethernet de sobra.

  2.  para ahorrarse la molestia de aprender sobre reenvo IP y otros
     trucos similares cuando ya tiene dos tarjetas en su ordenador.

  3.  Para evitar el trabajo de mantenimiento cuando las cosas cambien
     en el futuro.

  Varios ordenadores pueden ser tan pocos como tres si estn rutando o
  puenteando o simplemente movindose por la habitacin con frecuencia.
  Tambin puede querer un puente slo por la diversin de averiguar qu
  es lo que hace.  De hecho esto (``2'') es para lo que yo lo quera.

  Si realmente est interesado en el punto ``1'', debe ser uno de los
  pocos.  Lea los documentos Redes-En-Linux-Como,
  http://www.insflug.org/documentos/Redes-En-Linux-Como/ y Serie-Como
  http://www.insflug.org/documentos/Serie-Como/ en busca de trucos
  mejores.

  Querr un cortafuegos si

  1. trata de proteger su red de accesos externos, o

  2. quiere denegar el acceso al mundo exterior desde su red.

  Curiosamente yo necesitaba el punto ``2'' tambin aqu.  La poltica
  de mi universidad es que no debemos actuar como proveedores de
  servicios internet a los pregraduados.

  2.3.  Cmo?

  Comenc haciendo puente entre las tarjetas de red de un cortafuegos, y
  acab haciendo un cortafuegos sin quitar el puente. Parece funcionar y
  es ms flexible que cualquiera de las configuraciones por s solas.
  Puedo tirar el firewall y seguir haciendo puente o tirar el puente
  cuando quiero ser ms prudente.

  Supongo que el cdigo del puente est justo encima del cdigo de la
  capa fsica y que el cdigo del cortafuegos est una capa ms arriba,
  as que el puente y el cortafuegos actan como si estuvieran
  ejecutando juntos, secuencialmente y no en paralelo (vaya!).
  diagrama:

       -> Entrada-puente -> Entrada-cortafuegos -> Kernel -> Salida-cortafuegos -> Salida-puente ->

  No hay otra manera de explicar cmo una mquina puede ser conductor
  y aislante a la vez. Hay varias advertencias sobre esto, pero las
  detallar mas tarde. Bsicamente deber rutar los paquetes que quiera
  sean considerados por el firewall. De cualquier manera, parece
  funcionar bien de manera conjunta.  Esto es lo que har...

  3.  Bridging

  3.1.  Software

  Obtenga la utilidad de configuracin de puentes
  ftp://shadow.cabi.net/pub/Linux/BRCFG.tgz de las pginas personales de
  Alan Cox. Esta es la misma referencia que encuentra en el documento de
  Chris. No me haba dado cuenta de que era una URL de un ftp y no de
  http ...

  3.2.  Lecturas previas.

  Lea el Multiple Ethernet HOWTO,
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Multiple-Ethernet si
  quiere asesoramiento sobre cmo configurar ms de una tarjeta de red
  en su mquina.

  En el BootPrompt HOWTO
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/BootPrompt-HOWTO podr
  encontrar an ms detalles de la magia involucrada en el proceso de
  arranque.

  Puede escapar de la lectura del Redes-En-Linux-Como
  http://www.insflug.org/documentos/Redes-En-Linux-Como/. Es una lectura
  bien larga, y tendr que seleccionar de ella los detalles que
  necesite.

  3.3.  Configuracin del arranque

  El material de lectura anterior le ensear lo que necesita para
  preparar el kernel para reconocer un segundo dispositivo ethernet en
  el arranque, por ejemplo aadiendo los siguiente a /etc/lilo.conf, y
  volviendo a ejecutar lilo:

       append = "ether=0,0,eth1"

  Observe el 'eth1'. 'eth0' es la primera tarjeta.  que quiera a la
  lnea que lilo le ofrece. Esto es para tres tarjetas:

       linux ether=0,0,eth1 ether=0,0,eth2

  Yo uso loadlin para arrancar mi kernel desde DOS:

       loadlin.exe c:\vmlinuz root=/dev/hda3 ro ether=0,0,eth1 ether=0,0,eth2

  Fjese que este truco obliga al kernel a sondear direcciones en el
  arranque.  Esto no ocurrir si carga los controladores ethernet como
  mdulos (por seguridad, ya que la orden de sondeo no puede ser
  determinada) as que si usa mdulos tendr que aadir los parmetros
  de IRQ y puerto apropiados para el controlador especficamente en su
  fichero /etc/conf.modules. Yo por lo menos tengo

       alias eth0 3c509
       alias eth1 de620
       options 3c509 irq=5 io=0x210
       options de620 irq=7 bnc=1

  Puede averiguar est usando mdulos mediante ps -aux para ver si se
  est ejecutando kerneld y comprobando si hay archivos .o en algn
  subdirectorio del directorio /lib/modules. Necesita el que el
  directorio se llame como le diga uname -r. Si tiene kerneld y/o tiene
  algn archivo como loquesea.o, edite /etc/conf.modules y lea
  cuidadosamente la pgina del manual de depmod.

  Tenga en cuenta tambin que hasta hace poco (kernel 2.0.25) el
  controlador 3c509 no poda ser usado para ms de una tarjeta si era
  usado como mdulo. He visto un parche por ah que soluciona esto.
  Puede que est integrado en el kernel cuando lea este documento.

  3.4.  Configuracin del kernel

  Recompile el kernel con bridging activado.

       CONFIG_BRIDGE=y

  Yo compil con el cortafuegos, reenvo IP, enmascaramiento y lo dems
  activado.  Esto es slo si quiere cortafuegos...

       CONFIG_FIREWALL=y
       CONFIG_NET_ALIAS=y
       CONFIG_INET=y
       CONFIG_IP_FORWARD=y
       CONFIG_IP_MULTICAST=y
       CONFIG_IP_FIREWALL=y
       CONFIG_IP_FIREWALL_VERBOSE=y
       CONFIG_IP_MASQUERADE=y

  En realidad no necesita todo esto. Lo que s necesita, adems de esto,
  es la configuacin normal de la red:

       CONFIG_NET=y

  y no creo que necesite preocuparse de ninguna de las dems opciones de
  red.  Yo tengo opciones sin compilar dentro del kernel disponibles
  como mdulos que puedo aadir ms tarde.

  Instale el nuevo kernel, vuelva a ejecutar lilo y rearranque con el
  kernel nuevo. No debera haber cambios hasta ahora!

  3.5.  Direcciones de red

  Chris dice que un puente no debera tener direccin IP, pero esta no
  es la configuracin que describo aqu.

  Seguro que querr la mquina para conectarse a la red, as que va a
  necesitar una direccin y necesita asegurarse de que tiene el
  dispositivo de loopback activado de la manera normal, de tal forma que
  sus programas puedan hablar con los lugares que se supone deberan
  poder hablar. Si la direccin loopback no est activada,  el servicio
  de resolucin de nombres, y otros podran no funcionar adecuadamente.
  Vea el Redes-En-Linux-Como (http://www.insflug.org/documentos/Redes-
  En-Linux-Como/), aunque la configuracin estndard debera haber hecho
  esto:

       ifconfig lo 127.0.0.1
       route add -net 127.0.0.0

  Va a necesitar dar direcciones a sus tarjetas de red. He modificado el
  archivo /etc/rc.d/rc.inet1 de mi slackware (3.x) para configurar dos
  tarjetas y usted debera buscar en su archivo de configuracin la
  manera de doblar o triplicar el nmero de instrucciones. Suponga que
  usted tiene direcciones en

       192.168.2.100

  (esto es en el espacio de direcciones reservado para redes privadas,
  pero no se preocupe, no va a hacerle dao a nadie si usa esta
  direccin por error) as que probablemente ya tenga una lnea como

       ifconfig eth0 192.168.2.100 netmask 255.255.255.0 metric 1

  en su configuracin. Lo primero que probablemente quiera hacer es
  limitar el espacio de direcciones que alcance esta tarjeta a la mitad,
  de tal forma que pueda en algn momento puentear o hacer cortafuegos
  con las dos mitades. Aada pues una lnea que reduzca la mscara para
  direccionar un nmero menor de mquinas:

       ifconfig eth0 netmask 255.255.255.128

  Intente esto tambin. Limita a la tarjeta a, como mucho, las
  direcciones entre

  Ahora puede configurar su segunda tarjeta en la otra mitad del espacio
  de direcciones local. Asegrese que nadie est usando ya las
  direcciones. Por simetria, yo lo pongo en 228=128+100. Cualquier
  direccin funcionar tan pronto como no est en la mscara de la otra
  tarjeta. Bueno, seguramente.  Evite direcciones especiales como .0,
  .1, .128 etc.  a no ser que de verdad sepa qu hace.

       ifconfig eth1 192.168.2.228 netmask 255.255.255.128 metric 1

  Esto evita que la segunda tarjeta direccione entre .128 and .255.

  3.6.  Rutado de red

  Aqu es donde tengo que anunciar las salvedades en el esquema de
  puenteado y cortafuegos: no puede hacer cortafuegos con paquetes que
  no se ruten. No hay rutas, no hay cortafuegos. Al menos esto es verdad
  en el kernel 2.0.30 y en kernel ms recientes. Los filtros para el
  cortafuegos estn estrechamente relacionados con el cdigo de reenvo
  IP.

  Esto no significa que no pueda hacer puentes. Puede hacer un puente
  entre dos tarjetas y hacer cortafuegos con ellas desde una tercera.
  Puede tener dos tarjetas y hacer un cortafuegos con ellas contra una
  direccin IP externa como un router cercano, siempre y cuando el
  router sea rutado por usted hasta una de las tarjetas.

  En otras palabras, ya que voy a hacer un cortafuegos quiero controlar
  con precisin el destino fsico de algunos paquetes.

  Tengo la pequea red de mquinas conectadas a un concentrador  que
  cuelga de eth0, por lo que configuro ah una red:

       route add -net 192.168.2.128 netmask 255.255.255.128 dev eth0

  El .128 sera .0 si tuviera una clase C completa all. No la tengo,
  por definicin, ya que he partido a la mitad el espacio de
  direcciones.  El dev eth0 es innecesario porque las direcciones de las
  tarjetas caen en la mscara, pero podra ser necesario en su caso. Uno
  puede necesitar ms de una tarjeta en esta subred (127 mquinas en un
  segmento) pero estas tarjetas seran puenteadas bajo la misma mscara
  de red, de tal forma que aparecen como una ante el cdigo de rutado.

  En la otra tarjeta tengo un cable directo a un router grande en el que
  confo.

  <#if output="latex2e">

                                                         cliente 129
                 __                                         |    __
       cliente 1   \       .0              .128             |   /   red 1
       cliente 2 --- Hub - eth0 - Kernel - eth1 - Hub - Router ---  red 2
       cliente 3 __/       .100            .228          .2 |   \__ red 3
                                                            |
                                                         cliente 254

  Yo pongo la direccin del router a la tarjeta como una ruta fija
  (esttica) porque si no caera entre la mscara de las primeras
  tarjetas y el kernel se confundira al mandar paquetes al router
  grande. Voy a hacer cortafuegos con estos paquetes, y esta es otra
  razn por la que rutarlos especficamente.

       route add 192.168.2.2 dev eth1

  No los necesito, ya que no tengo ms mquinas en esa mitad del espacio
  de direcciones, pero declaro una red tambin en la segunda tarjeta.
  Separar mis interfaces en dos grupos mediante el rutado me permitir
  hacer unas reglas de cortafuegos muy estrictas si lo necesito, pero
  puede escapar con mucho menos rutado especfico que el aqu expuesto.

       route add -net 192.168.2.128 netmask 255.255.255.128 dev eth1

  Necesito tambin enviar todos los paquetes no locales al mundo, as
  que  le dir al kernel que se los mande al router grande.

       route add default gw 192.168.2.2

  3.7.  Configuracin de la tarjeta

  La mayora de lo que ha visto es configuracin estndard de la red,
  pero estamos puenteando, as que tambin tenemos que escuchar paquetes
  en ambas tarjetas que no se dirijan a nosotros. Lo que sigue debe ir
  al fichero de configuracin de red.

       ifconfig promisc eth0
       ifconfig promisc eth1

  La pgina del manual dice que allmulti equivale a promisc, pero a mi
  no me funcion.

  3.8.  Rutado adicional

  Una cosa de la que me di cuenta era que tuve que poner al menos la
  segunda tarjeta en un modo en el que respondiera a las preguntas del
  router grande sobre qu mquinas esconda en mi red local..

       ifconfig arp eth1

  Por si acaso, le hice lo mismo a la otra tarjeta.

       ifconfig arp eth0

  3.9.  Configuracin del puente

  Active el puenteo, tambin en su archivo de configuracin de la red:

       brcfg -enable

  Debe haber probado esto extensivamente en pruebas reales, por
  supuesto.  El configurador del puente mostrar algunos nmeros. Puede
  experimentar con conectando y desconectando los puertos uno cada vez.

       brcfg -port 0 -disable/-enable
       brcfg -port 1 -disable/-enable

  Para comprobar el estado en cualquier momento, ejecute

       brcfg

  sin parmetros. Ver cmo el puente escucha, aprende y hace el
  reenvo. (No entiendo por qu el cdigo repite las mismas direcciones
  fsicas en mis dos tarjetas, pero no importa, el HOWTO de Chris dice
  que es as)

  3.10.  Probarlo

  Si todo funciona como es debido, pruebe su propio archivo de comandos
  de configuracin tirando abajo ambas tarjetas y luego ejecutndolo:

       ifconfig eth0 down ifconfig eth1 down
       /etc/rc.d/rc.inet1

  Con un poco de suerte los varios subsistemas (NFS, ypbind, etc.) ni se
  enterarn. No intente esto a no ser que est delante del teclado!

  Si quiere ser an ms cuidadoso, mate tantos demonios primero como
  pueda, y desmonte los directorios nfs. Lo peor que puede pasar es que
  tenga que resetear en modo monousuario (pasando el parmetro single a
  lilo o loadlin), y deshacer los cambios antes de rearrancar con las
  cosas como estaban antes de que empezara.

  3.11.  Comprobaciones

  Verifique que hay trfico distinto en cada interfaz:

       tcpdump -i eth0

       tcpdump -i eth1

  Debe acostumbrarse a usar tcpdump para buscar cosas que no deberan
  estar pasando o que no pasan y deberan.

  Por ejemplo, busque los paquetes que pasan por el puente a la segunda
  tarjeta desde la red interna. Aqu busco paquetes de la mquina con
  direccin

       tcpdump -i eth1 -e host 192.168.2.22

  Ahora le mando un ping desde la mquina .22 al router.  Debera ver el
  paquete segn informe de tcpdump.

  En esta fase tiene un puente listo que tambin tiene dos direcciones
  de red.  Compruebe que puede hacer ping desde fuera y dentro de su red
  local, y que puede hacer telnet y ftp entre el exterior y el interior.

  4.  Cortafuegos

  4.1.  Software y lecturas

  Lea el Cortafuegos-Como,
  http://www.insflug.org/documentos/Cortafuegos-Como/

  Esto le dir donde obtener ipfwadm si no lo tiene ya. Hay otras
  herramientas que puede obtener, pero no he hecho avances con ellas
  hasta que no prob ipfwadm. Est muy bien, y es de bajo nivel! Puede
  ver exactamente lo que est pasando.

  4.2.  Comprobaciones preliminares

  Ha compilado soporte de reenvo IP y enmascaramiento en el kernel, as
  que querr comprobar que el cortafuegos est en su estado por defecto
  (aceptando) con

       ipfwadm -I -l
       ipfwadm -O -l
       ipfwadm -F -l

  Esto es respectivamente: mostrar las reglas que afecten entrantes o
  salientes o reenviando (enmascarando) hacia ambos lados del
  cortafuegos. El -l significa listar.

  Si tambin ha compilado soporte de informes (accounting):

       ipfwadm -A -l

  Debera ver que no hay reglas definidas y que por defecto se aceptan
  todos los paquetes. Puede volver a este estado en cualquier momento
  usando

       ipfwadm -I -f
       ipfwadm -O -f
       ipfwadm -F -f

  El -f significa vaciar. Puede que necesite usarlo.

  4.3.  Reglas por defecto

  Quiero evitar a mi red llegar al mundo, y nada ms, por lo que por lo
  menos dar una regla ltima (por defecto) que diga que el cortafuegos
  debera ignorar aquellos paquetes que vengan de la red interna
  dirigidos al exterior. Pongo las reglas (en este orden) en
  /etc/rc.d/rc.firewally lo ejecuto desde /etc/rc.d/rc.local en el
  arranque.

       ipfwadm -I -a reject -S 192.168.2.0/255.255.255.128 -D 0.0.0.0/0.0.0.0

  El -S es la direccin/mscara origen. El -D es la direccin/mscara de
  destino.

  Este formato es demasiado largo. ipfwadm es suficientemente
  inteligente sobre temas de red y entiende algunas abreviaturas. Lea
  las pginas del manual.

  Posiblemente es ms conveniente poner algunas o todas estas reglas en
  la parte saliente del cortafuegos usando -O en vez de -I, pero fijar
  las reglas para la mitad entrante.

  4.4.  Huecos por direccin

  Antes de la regla por defecto, tengo que poner algunas reglas que me
  sirvan como excepciones a esta denegacin de servicios externos
  general a los clientes internos.

  Quiero tratar las direcciones internas de los cortafuegos en especial.
  He de evitar que la gente entre en el firewall a no ser que tengan un
  permiso especial, pero una vez que entren deberan ser capaces de
  hablar con el resto del mundo.

       ipfwadm -I -i accept -S 192.168.2.100/255.255.255.255 -D 0.0.0.0/0.0.0.0

  Tambin quiero que los clientes puedan hablar con el cortafuegos. A
  lo mejor le convencen de que les deje salir!

       ipfwadm -I -i accept -S 192.168.2.0/255.255.255.128 -D 192.168.2.100/255.255.255.255

  Compruebe en este punto de que puede entrar en los clientes desde
  fuera del cortafuegos usando  telnet, pero que no puede salir. Esto
  debera significar que puede hacer el primer contacto, pero los
  clientes no pueden enviarle la lnea de comandos. Debe ser capaz de
  llegar hasta el final si usa la mquina cortafuegos como paso
  intermedio. Intente un rlogin y un ping tambin, con tcpdump
  ejecutndose en una tarjeta o en otra. Debe ser capaz de dar sentido a
  lo que ve.

  4.5.  Huecos por protocolo

  Segu relajando las reglas protocolo por protocolo. Quiero permitir
  los ping desde el exterior al interior para obtener un eco de
  respuesta, por ejemplo, as que insert la regla:

       ipfwadm -I -i accept -P icmp -S 192.168.2.0/255.255.255.128 -D 0.0.0.0/0.0.0.0

  El parmetro -P icmp realiza la magia necesaria a nivel del protocolo.

  Hasta que use un proxy ftp voy a permitir los ftp salientes con
  permisos especficos de puerto. Esto se dirige a los puertos 20 21 y
  115 de las mquinas exteriores.

       ipfwadm -I -i accept -P tcp -S 192.168.2.0/255.255.255.128 \
       -D 0.0.0.0/0.0.0.0 20 21 115

  No puedo hacer que sendmail funcione entre los clientes locales sin un
  servidor de nombres. En vez de instalar un servidor de nombres en el
  cortafuegos, lo levanto para las peticiones de servicio en el dominio
  tcp que se dirijan al servidor de nombres ms cercano, poniendo esta
  direccin en los archivos  /etc/resolv.conf de los
  clientes.(nameserver 123.456.789.31 en una lnea aparte).

       ipfwadm -I -i accept -P tcp -S 192.168.2.0/255.255.255.128 \
        -D 123.456.789.31/255.255.255.255 54

  Puede encontrar el puerto y protocolo usado por un servicio con
  tcpdump. Lance el servicio con un ftp o un telnet o lo que sea a o
  desde la mquina interna y mire lo que ocurre en los puertos de
  entrada y salida del cortafuegos con tcpdump:

       tcpdump -i eth1 -e host client04

  por ejemplo: El archivo /etc/services es otra fuente importante de
  pistas. Para permitir telnet y ftp entrantes al cortafuegos desde el
  exterior, debe permitir a los clientes locales llamadas salientes en
  un puerto especfico. Entiendo por qu es necesario esto para para ftp
  (es el servidor el que establece el flujo de datos al final) pero no
  s por qu telnet tambin lo necesita.
       ipfwadm -I -i accept -P tcp -S 192.168.2.0/255.255.255.128 ftp telnet \
        -D 0.0.0.0/0.0.0.0

  Hay un problema especfico con algunos demonios que buscan el nombre
  del cortafuegos para buscar su direccin de red. Rpc.yppasswdd es uno
  con el que tuve problemas. Insiste en transmitir informacin que diga
  que est fuera del cortafuegos (en la segunda tarjeta). Esto significa
  que los clientes de dentro no pueden contactar con l.

  En vez de empezar a hacer IP aliasing o cambiar el cdigo del demonio,
  he correspondido el nombre a la direccin de la tarjeta interna en los
  clientes, en el archivo /etc/hosts.

  4.6.  Comprobaciones

  Querr comprobar que puede hacer telnet, rlogin  y ping desde el
  exterior. Desde el interior debera poder hacer ping hacia fuera.
  Debera ser capaz tambin de hacer telnet a la mquina cortafuegos
  desde el interior, y la ltima debera ser incapaz de hacer nada.

  Y ya est. En este momento probablemente quiera aprender cosas sobre
  rpc y NIS/NYS (Pginas amarillas) y la interaccin con el archivo de
  contraseas. La red con cortafuegos debe funcionar sin que los
  usuarios normales tengan capacidad de entrar al cortafuegos y,
  consiguientemente, salir al exterior. A lo mejor esto es otro COMO!

  5.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En ella encontrar siempre las ltimas versiones de las traducciones
  oficiales:  http://www.insflug.org. Asegrese de comprobar cul es
  la ltima versin disponible en el Insflug antes de bajar un documento
  de un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.

  Bzip2 COMO
  David Fetter, dfetter@best.com
  Traducido por: Joaqun Cuenca Abela, jcuenca@patan.ele
  inf.uv.es
  v1.6 Tue Mar 10 17:48:42 PST 1998

  Este documento explica cmo utilizar el nuevo compresor bzip2.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Memoria de cambios

  2.      Obtencin de bzip2

  2.1.    Obtencin de versiones precompiladas de bzip2

  2.2.    Obtencin del cdigo fuente de bzip2

  2.3.    Compilacin de bzip2 en su ordenador

  3.      Utilizacin de bzip2

  4.      Utilizacin conjunta con tar

  4.1.    Forma fcil que configurar:

  4.2.    Forma fcil de usar:

  5.      Utilizacin de bzip2 con less

  6.      Utilizacin de bzip2 con emacs

  6.1.    Cambio de emacs para todos:

  6.2.    Cambiar emacs para uno mismo:

  7.      Utilizacin de bzip2 con wu-ftpd

  8.      Utilizacin de bzip2 con Netscape en XWindows

  9.      Utilizacin de bzip2 con xv

  10.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  El texto original (en sgml) se encuentra
  http://www.best.com/~dfetter/Bzip2-HOWTO/Bzip2-HOWTO.sgml.

  Bzip2 est creado con un magnfico nuevo algoritmo sobre compresin de
  datos. Generalmente consigue que los ficheros queden en un 60-70% del
  tamao que tienen los ficheros comprimidos con gzip.

  Este documento le llevar a travs de unas cuantas aplicaciones para
  bzip2.

  Los franco-hablantes tienen el documento traducido por Arnaud Launay.
  La versin web est en
  http://www.freenix.fr/linux/HOWTO/mini/Bzip2.html, y para recoger por
  ftp ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/mini/Bzip2.gz.
  Puede contactar con Arnaud por correo electrnico zoro@mygale.org.
  Aquellos que hablen Japons pueden utilizar la versin Japonesa, de la
  mano de Tetsu Isaji, http://jf.gee.kyoto-u.ac.jp/JF/JF.html. La pgina
  de Isaji est en http://www2s.biglobe.ne.jp/~kaien/, y su direccin de
  correo electrnico es isaji@mxu.meshnet.or.jp.

  1.1.  Memoria de cambios

    v1.6 Aadido el activador para Netscape de TenThumbs

     Tambin se cambi lesspipe.sh por sugerencia suya. Ahora debera
     funcionar mejor.

    v1.5 Aadida la traduccin al francs de Arnaud Launay, y su
     fichero wu-ftpd.

    v1.4 Aadida la traduccin al japones de Tetsu Isaji.

    v1.3 Aadido el fichero .emacs para las versiones 19.30 y
     superiores por Ulrik Dickow.

     (Tambin se ha corregido el parche de jka-compr.el por sugerencia
     suya. Eepa! Bzip2 todava(?) no tiene parmetro ``append''.)

    v1.2 Se ha cambiado el parche para que emacs reconozca
     automgicamente ficheros .bz2.

    v1.1  Aadido parche para emacs.

    v1.0  Primer round.

  2.  Obtencin de bzip2

  La pgina principal de bzip2 est http://www.muraroa.demon.co.uk/. El
  servidor rplica en los Estados Unidos es
  http://www.digistar.com/bzip2/index.html. Tambin se puede encontrar
  en la direccin ftp de Red Hat, ftp://ftp.redhat.com/pub/contrib.

  2.1.  Obtencin de versiones precompiladas de bzip2

  Busque en las direcciones de las principales distribuciones. El
  fichero compilado para intel de Red Hat es
  ftp://ftp.redhat.com/pub/contrib/i386/bzip2-0.1pl2-1.i386.rpm.  El de
  Debian est ftp://ftp.debian.org/debian/hamm/hamm/binary-
  i386/utils/bzip2_0.1pl2-4.deb, y la de Slackware est en
  http://www.cdrom.com/pub/linux/slackware-3.4/slakware/a9/bzip2.tgz.

  Tambin puede obtener los ficheros directorios anlogos de cualquier
  servidor rplica.

  2.2.  Obtencin del cdigo fuente de bzip2

  El cdigo est en los lugares oficiales (ver la seccin ``Obtencin de
  bzip2'' para obtener una lista de las direcciones). Red Hat tiene el
  cdigo en
  ftp://ftp.redhat.com/pub/contrib/SRPMS/bzip2-0.1pl2-1.src.rpm.

  2.3.  Compilacin de bzip2 en su ordenador

  Si tiene gcc 2.7.2.3, cambie la lnea que pone

       CFLAGS = -O3 -fomit-frame-pointer -funroll-loops

  a

       CFLAGS = -fomit-frame-pointer -funroll-loops

  osea, quite el -O3. Despus de haber hecho sto, slo tiene que hacer
  un make e instalarlo siguiendo las instrucciones del fichero README.

  3.  Utilizacin de bzip2

  Lea la bonita pgina man :)

  4.  Utilizacin conjunta con tar

  Bsicamente, hay dos formas de combinar bzip2 con tar:

  4.1.  Forma fcil que configurar:

  Este mtodo no necesita configurar nada. Para desempaquetar un fichero

       /directorio/de/bzip2 -cd algo.tar.bz2 | tar xf -

  Este mtodo funciona, pero puede ser un poco pesado teclearlo todo
  cada vez que se necesite descomprimir algo.

  4.2.  Forma fcil de usar:

  Aplique el siguiente parche a gnu tar 1.12, complelo, instlelo, y se
  acab. Asegrese de que tanto tar como bzip2 estn en su $PATH con

       which tar
       which bzip2

  Para utilizarlo, slo tiene que hacer

       tar xyf algo.tar.bz2

  para descomprimir el fichero.

  Para hacer un nuevo fichero comprimido hay que hacer algo parecido:

        tar cyf algo.tar.bz2 fichero1 fichero2 fichero3...directorio1 directorio2...

  Y aqu est el parche :)

  *** tar.c.orig  Sat Apr 26 05:09:49 1997
  --- tar.c       Feb  2 00:50:47 1998
  ***************
  *** 16,21 ****
  --- 16,24 ----
       with this program; if not, write to the Free Software Foundation, Inc.,
       59 Place - Suite 330, Boston, MA 02111-1307, USA.  */

  + /* Feb 2 98: patched by David Fetter to use bzip2 as a
  +              filter (option -y) */
  +
    #include "system.h"

    #include <getopt.h>
  ***************
  *** 196,201 ****
  --- 199,206 ----
      {"block-number", no_argument, NULL, 'R'},
      {"block-size", required_argument, NULL, OBSOLETE_BLOCKING_FACTOR},
      {"blocking-factor", required_argument, NULL, 'b'},
  +   {"bzip2", required_argument, NULL, 'y'},
  +   {"bunzip2", required_argument, NULL, 'y'},
      {"catenate", no_argument, NULL, 'A'},
      {"checkpoint", no_argument, &checkpoint_option, 1},
      {"compare", no_argument, NULL, 'd'},
  ***************
  *** 372,377 ****
  --- 377,383 ----
                  PATTERN                at list/extract time, a globbing PATTERN\n\
      -o, --old-archive, --portability   write a V7 format archive\n\
          --posix                        write a POSIX conformant archive\n\
  +   -y, --bzip2, --bunzip2             filter the archive through bzip2\n\
      -z, --gzip, --ungzip               filter the archive through gzip\n\
      -Z, --compress, --uncompress       filter the archive through compress\n\
          --use-compress-program=PROG    filter through PROG (must accept -d)\n"),
  ***************
  *** 448,454 ****
       Y  per-block gzip compression */

    #define OPTION_STRING \
  !   "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxz"

    static void
    set_subcommand_option (enum subcommand subcommand)
  --- 454,460 ----
       Y  per-block gzip compression */

    #define OPTION_STRING \
  !   "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxyz"

    static void
    set_subcommand_option (enum subcommand subcommand)
  ***************
  *** 805,810 ****
  --- 811,820 ----
          case 'X':
          exclude_option = 1;
          add_exclude_file (optarg);
  +       break;
  +
  +       case 'y':
  +       set_use_compress_program_option ("bzip2");
          break;

          case 'z':

  5.  Utilizacin de bzip2 con less

  Para descomprimir los ficheros bzip2 al vuelo, esto es, para ser
  capaces de utilizar less en estos ficheros sin tener primero que
  descomprimirlos, podemos crear un lesspipe.sh (pgina man de less)
  como ste:

       #!/bin/sh
       # This is a preprocessor for 'less'.  It is used when this environment
       # variable is set:   LESSOPEN="|lesspipe.sh %s"

         case "$1" in
         *.tar) tar tvvf $1 2>/dev/null ;; # View contents of various tar'd files
         *.tgz) tar tzvvf $1 2>/dev/null ;;
       # This one work for the unmodified version of tar:
         *.tar.bz2) bzip2 -cd $1 $1 2>/dev/null | tar tzvvf - ;;
       #This one works with the patched version of tar:
       # *.tar.bz2) tyvvf $1 2>/dev/null ;;
         *.tar.gz) tar tzvvf $1 2>/dev/null ;;
         *.tar.Z) tar tzvvf $1 2>/dev/null ;;
         *.tar.z) tar tzvvf $1 2>/dev/null ;;
         *.bz2) bzip2 -dc $1  2>/dev/null ;; # View compressed files correctly
         *.Z) gzip -dc $1  2>/dev/null ;;
         *.z) gzip -dc $1  2>/dev/null ;;
         *.gz) gzip -dc $1  2>/dev/null ;;
         *.zip) unzip -l $1 2>/dev/null ;;
         *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.man) FILE=`file -L $1` ; # groff src
           FILE=`echo $FILE | cut -d ' ' -f 2`
           if [ "$FILE" = "troff" ]; then
             groff -s -p -t -e -Tascii -mandoc $1
           fi ;;
         *) cat $1 2>/dev/null ;;
       #  *) FILE=`file -L $1` ; # Check to see if binary, if so -- view with 'strings'
       #    FILE1=`echo $FILE | cut -d ' ' -f 2`
       #    FILE2=`echo $FILE | cut -d ' ' -f 3`
       #    if [ "$FILE1" = "Linux/i386" -o "$FILE2" = "Linux/i386" \
       #         -o "$FILE1" = "ELF" -o "$FILE2" = "ELF" ]; then
       #      strings $1
       #    fi ;;
         esac

  6.  Utilizacin de bzip2 con emacs

  6.1.  Cambio de emacs para todos:

  He escrito el siguiente parche para jka-compr.el que aade bzip2 al
  auto-compression-mode.

  Renuncia: Slo lo he comprobado con emacs-20.2, pero no tengo ninguna
  razn para creer que un parche parecido no pueda funcionar con otras
  versiones.

  Para utilizarlo,

  1. Vaya al directorio emacs-20.2/lisp (o donde lo haya desempaquetado)

  2. Ponga el parche en un fichero llamado jka-compr.el.diff (en este
     fichero slo debe estar el parche ;)

  3. Haga

        patch < jka-compr.el.diff

  4. Ejecute emacs, y haga

        M-x byte-compile-file jka-compr.el

  5. Salga de emacs.

  6. Cambie su fichero jka-compr.elc original a un lugar seguro para
     evitar fallos.

  7. Cmbielo con el nuevo jka-compr.elc.

  8. Divirtase!

  --- jka-compr.el        Sat Jul 26 17:02:39 1997
  +++ jka-compr.el.new    Thu Feb  5 17:44:35 1998
  @@ -44,7 +44,7 @@
   ;; The variable, jka-compr-compression-info-list can be used to
   ;; customize jka-compr to work with other compression programs.
   ;; The default value of this variable allows jka-compr to work with
  -;; Unix compress and gzip.
  +;; Unix compress and gzip.  David Fetter added bzip2 support :)
   ;;
   ;; If you are concerned about the stderr output of gzip and other
   ;; compression/decompression programs showing up in your buffers, you
  @@ -121,7 +121,9 @@

   ;;; I have this defined so that .Z files are assumed to be in unix
  -;;; compress format; and .gz files, in gzip format.
  +;;; compress format; and .gz files, in gzip format, and .bz2 files,
  +;;; in the snappy new bzip2 format from http://www.muraroa.demon.co.uk.
  +;;; Keep up the good work, people!
   (defcustom jka-compr-compression-info-list
     ;;[regexp
     ;; compr-message  compr-prog  compr-args
  @@ -131,6 +133,10 @@
        "compressing"    "compress"     ("-c")
        "uncompressing"  "uncompress"   ("-c")
        nil t]
  +    ["\\.bz2\\'"
  +     "bzip2ing"        "bzip2"         ("")
  +     "bunzip2ing"      "bzip2"         ("-d")
  +     nil t]
       ["\\.tgz\\'"
        "zipping"        "gzip"         ("-c" "-q")
        "unzipping"      "gzip"         ("-c" "-q" "-d")

  6.2.  Cambiar emacs para uno mismo:

  Este truco se lo tengo que agradecer a Ulrick Dickow, ukd@kampsax.dk,
  programador de sistemas en Kampsax Technology:

  Para hacer que se pueda utilizar bzip2 automticamente cuando no es el
  administrador del sistema, slo tiene que aadir lo siguiente al
  fichero .emacs:

  ;; Automatic (un)compression on loading/saving files (gzip(1) and similar)
  ;; We start it in the off state, so that bzip2(1) support can be added.
  ;; Code thrown together by Ulrik Dickow for ~/.emacs with Emacs 19.34.
  ;; Should work with many older and newer Emacsen too.  No warranty though.
  ;;
  (if (fboundp 'auto-compression-mode) ; Emacs 19.30+
      (auto-compression-mode 0)
    (require 'jka-compr)
    (toggle-auto-compression 0))
  ;; Now add bzip2 support and turn auto compression back on.
  (add-to-list 'jka-compr-compression-info-list
               ["\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'"
                "zipping"        "bzip2"         ()
                "unzipping"      "bzip2"         ("-d")
                nil t])
  (toggle-auto-compression 1 t)

  7.  Utilizacin de bzip2 con wu-ftpd

  Gracias a Arnaud Launay por su truco para ahorrar ancho de banda. Lo
  siguiente debera ir en /etc/ftpconversions para compresiones y
  descompresiones al vuelo con bzip2. Asegrese de que las direcciones
  (como /bin/compress) son correctas.

        :.Z:  :  :/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
        :   : :.Z:/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
        :.gz: :  :/bin/gzip -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:GUNZIP
        :   : :.gz:/bin/gzip -9 -c %s:T_REG:O_COMPRESS:GZIP
        :.bz2: :  :/bin/bzip2 -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:BUNZIP2
        :   : :.bz2:/bin/bzip2 -9 -c %s:T_REG:O_COMPRESS:BZIP2
        :   : :.tar:/bin/tar -c -f - %s:T_REG|T_DIR:O_TAR:TAR
        :   : :.tar.Z:/bin/tar -c -Z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
        :   : :.tar.gz:/bin/tar -c -z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP
        :   : :.tar.bz2:/bin/tar -c -I -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+BZIP2

  8.  Utilizacin de bzip2 con Netscape en XWindows

  tenthumbs@cybernex.net dijo:

  He encontrado una forma de hacer que Netscape (en Linux) utilice bzip2
  en Content-Encoding como si estuviese utilizando gzip. Aada sto a
  $HOME/.Xdefaults o $HOME/.Xresources

  Yo utilizo la opcin -s porque prefiero cambiar algo de velocidad en
  la descompresin por memoria RAM. Puede quitar la opcin si lo
  prefiere.

  Netscape*encodingFilters:      \
          x-compress :  : .Z     : uncompress -c  \n\
          compress   :  : .Z     : uncompress -c  \n\
          x-gzip     :  : .z,.gz : gzip -cdq      \n\
          gzip       :  : .z,.gz : gzip -cdq      \n\
          x-bzip2    :  : .bz2   : bzip2 -ds \n

  9.  Utilizacin de bzip2 con xv

  Estoy trabajando en un parche que debe hacer que xv auto-descomprima
  los ficheros .bzip2 tal y como lo hace con los ficheros comprimidos
  mediante gzip o compress. Quiere ayudarme alguien?

  10.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Campana-Visual Mini-COMO
  Alessandro Rubini, rubini@linux.it
  sorgina@sidam.es
  v2.1, Agosto de 1996. Fecha de la traduccin 3 de Junio de
  1998

  Este documento muestra el uso de termcap para configurar una campana
  visual en el sistema propio y describe cmo deshabilitar las campanas
  sonoras al gusto de cada uno.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Altavozectoma

  3.      Configuracin del pitido en consola

  4.      Conceptos bsicos sobre termcap

  5.      Definir una campana visual

  6.      Deshabilitar la campana sonora en la consola de texto

  7.      Avisar a las aplicaciones

  8.      El lado oscuro del problema

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  El manejador de consola de Linux emite un sonoro pitido siempre que se
  produce la salida de un caracter BEL (cdigo ASCII 7). Aunque sta es
  una buena eleccin para el comportamiento por defecto, a determinados
  usuarios no les agrada que el computador les pite (N. del T.: a mi,
  por ejemplo).

  Este miniCOMO est orientado a explicar cmo decirles a las
  aplicaciones que no produzcan el cdigo BEL como salida. Tambin se
  proporcionan indicaciones para ensear al ncleo y al sistema X a
  evitar el pitido cuando se produce la salida de un BEL. La mayor parte
  del documento se refiere a la consola de texto, ya que la
  configuracin de este aspecto en un servidor X es sencilla para
  cualquier usuario que trabaje en un entorno grfico.

  En mi opinin, la mejor solucin para enfrentarse a un computador
  ruidoso es arreglar el hardware, as que mi computador ni siquiera
  lleva altavoz.

  2.  Altavozectoma

  La altavozectoma es con mucho, la solucin ms brillante para la
  campana sonora. Como su nombre indica, consiste en acabar con los
  pitidos extirpando el altavoz. Esta operacin es directa y ni siquiera
  se necesita anestesia, pero tambin hay lugar para el refinamiento si
  se desea.

  Normalmente los PCs estn equipados con un estpido interruptor para
  cambiar el reloj de la placa a una velocidad inferior. Este
  interruptor es innecesario cuando se trabaja en un entorno multitarea,
  ya que no es necesario enlentecer el computador para ejecutar juegos
  basados en bucles de software.

  Desafortunadamente no se puede usar el interruptor para aumentar la
  velocidad del procesador, pero podemos convertirlo en un interruptor
  que habilite/deshabilite el altavoz. A veces el altavoz es til
  incluso aunque se desee una mquina machaca-numeros silenciosa, por
  ejemplo, para indicar el final de una lenta compilacin.

  Para modificar la funcionalidad del interruptor, nicamente seprelo
  de la placa madre y conecte sus hilos en serie con el altavoz.

  Los poseedores de porttiles, desafortunadamente, no tienen fcil
  acceso al altavoz, y tampoco tienen un interruptor libre para
  dedicarlo a otra tarea. La solucin preferible para tales usuarios es
  intentar configurar su software para evitar el pitido.

  3.  Configuracin del pitido en consola

  A partir de Linux 1.3.43, Martin Mares aadi la opcin de configurar
  la campana sonora en console.c. Se puede cambiar la duracin y el tono
  del pitido independientemente en cada consola, escribiendo secuencias
  de escape en la tty. Se puede guardar una configuracin personalizada
  en el propio ~/.profile/ o ~/.login/, para tener un pitido diferente
  (o no tener pitido) asociado a cada consola.

  Las secuencias de escape funcionan de la siguiente manera:

    ESC-[10;xx] selecciona la frecuencia de la campana en Hercios.  El
     valor debe estar en el rango 21-32766, de otro modo el resultado es
     impredecible (por lo menos hasta la versin 2.0.x -- no puedo
     predecir el futuro). Si falta el argumento 'xx', se aplica el valor
     por defecto (750 Hz), como en ESC-[10].

    ESC-[11;xx] selecciona la duracin de la campana en milisegundos.
     Si se especifican ms de 2 segundos, se aplica el valor por defecto
     (125 ms). De nuevo, si falta el argumento 'xx' (ESC-[11]) se
     utilizar el valor por defecto.

  Para seleccionar, por ejemplo, un tono de 50Hz y 1 segundo de
  duracin, se puede probar

       echo -e "\33[10;50]\33[11;1000]"

  en bash (donde "-e" significa 'interpretar secuencias de escape').

  Con tcsh

       echo " 33[10;50] 33[11;1000]"

  tendr el mismo efecto.

  Aunque no conozco ninguna versin del comando setterm que soporte
  dicha configuracin, una versin futura podra soportar una opcin de
  lnea de comando para configurar el sonido de la campana.

  Si utiliza Linux 1.3.43 o superior, debe estar satisfecho con las
  secuencias de escape, y evitar tener que seguir leyendo. Si utiliza
  algn ncleo antiguo (yo lo hago, en mi pequeo 386), o si desea una
  campana visual, siga leyendo.

  4.  Conceptos bsicos sobre termcap

  El fichero /etc/termcap/ es un fichero de texto que lista las
  capacidades de la terminal. Numerosas aplicaciones utilizan la
  informacin de termcap para mover el cursor por la pantalla y realizar
  otras tareas relacionadas con la pantalla. tcsh, bash, vi y todas las
  aplicaciones basadas en curses usan la base de datos de termcap.

  La base de datos representa varios tipos de terminal. La variable de
  entorno TERM selecciona el comportamiento correcto en tiempo de
  ejecucin, nombrando una entrada de termcap para que sea usada por las
  aplicaciones.

  Dentro de la base de datos, cada capacidad est aparece como un cdigo
  de dos letras y una representacin de la secuencia de escape real
  utilizada para conseguir dicho efecto. El caracter separador entre
  diferentes capacidades son los dos puntos (":"). Como ejemplo, la
  camapana sonora, con cdigo "bl" ("bell", campana), se representa
  normalmente por el string "bl=^G", que indica a las aplicaciones que
  usen el caracter control-G, el BEL de ASCII.

  Adems de la capacidad bl, hay una capacidad vb, que representa la
  campana visual ("visual bell"). vb normalmente no aparece en la
  entrada de consola en el /etc/termcap/ de Linux.

  Las aplicaciones y libreras ms modernas utilizan la base de datos
  terminfo en lugar de termcap. Esta base de datos utiliza un fichero
  por cada tipo de terminal y se encuentra en /usr/lib/terminfo; para
  evitar directorios enormes, la descripcin de cada tipo de terminal se
  guarda en un directorio nombrado con su primera letra; la entrada
  linux es, por tanto /usr/lib/terminfo/l/linux. Para construir una
  entrada terminfo habr que 'compilar' la descripcin de termcap. Vase
  el programa tic y su pgina del manual.

  5.  Definir una campana visual

  Se puede aadir la entrada para la capacidad vb en el fichero termcap
  propio. Dennis Henriksen, duke@diku.dk sugiri insertar la siguiente
  lnea en la entrada 'linux' del fichero termcap (en las distribuciones
  antiguas esta entrada se conoce como 'console'):

       :vb=\E7\E[?5h\E[?5l\E[?5h\E[?5l\E[?5h\E[?5l\E[?5h\E[?5l\E8:\

  La ltima barra se utiliza para escapar el caracter de nueva lnea en
  la base de datos. El cdigo de Dennis hace lo siguiente (segn sus
  propias palabras):

    Salvar la posicin del cursor (precaucin de seguridad).

    Cambiar el color de fondo varias veces entre normal y video
     inverso.

    Restaurar la posicin del cursor.

  6.  Deshabilitar la campana sonora en la consola de texto

  Si quiere forzar una campana visual en su consola, puede reemplazar la
  entrada "bl" en el termcap con la misma cadena literal sugerida para
  "vb" antes. Este enfoque puede evitarle el tener que adecuar cada
  aplicacin. Yo me decanto por esta opcin en todas las mquinas en las
  que puedo usar Linux y no puedo quitar el altavoz.

  7.  Avisar a las aplicaciones

  Esta es una lista incompleta de aplicaciones a las que se puede
  obligar a usar la entrada vb para el tipo de terminal actual (ya sea
  usando la informacin de termcap o la de terminfo):

    el servidor X: utilize el comando 'xset b' para seleccionar el
     comportamiento de la campana. Este comando tiene 3 argumentos
     numricos: volumen, tono y duracin. 'xset -b' deshabilita la
     campana. La configuracin del servidor X afecta a todas las
     aplicaciones que se ejecuten en la pantalla.

    xterm: xterm puede convertir cada pitido en una seal visible o
     audible. Si utiliza la campana sonora, se aplicarn los valores de
     xset. Por defecto la campana en xterm es sonora, pero puede usar la
     opcin de lnea de comando '-vb' y el recurso xterm*VisualBell:
     true para convertirla en un destello visible. Se puede cambiar la
     sealizacin visible/audible en tiempo de ejecucin utilizando el
     men invocado al pulsar control+botn izq. del ratn.  Si suele
     utilizar X seguramente no necesite la informacin siguiente.

    tcsh (6.04 y superior): 'set visible bell'. La instruccin puede
     aparecer en el .cshrc o se puede introducir interactivamente.  Para
     restaurar la campana sonora vale con 'unset visiblebell'. Para
     deshailitar cualquier notificacin introduzca 'set nobeep'.

    bash (cualquier bash, por lo que yo se): ponga 'set bell-style
     visible' en su ~/.bashrc/. Los valores posibles para bell-style son
     'none' (niguno) o 'audible' (sonoro).

    bash (con readline, as como otras aplicaciones basadas en
     readline): ponga 'set prefer-visible-bell' en ~/.inputrc/.

    nvi y elvis: ponga 'set flash' en ~/.exrc/ o introduzca ':set
     flash' interactivamente (ojo con los dos puntos). Para deshabilitar
     la campana use 'noflash' en lugar de 'flash'.

    emacs: ponga '(setq visible-bell t)' en su ~/.emacs/. Se
     deshabilita con '(setq visible-bell nil)'.

    less: use '-q' en la lnea de comando para utilizar la campana
     visual, use '-Q' para deshabilitar cualquier accin. Las opciones
     por defecto se pueden aadir en su variable de entorno LESS.

    screen: utilice la combinacin CtrlA-CtrlG. Funciona en todas las
     pantalla virtuales. Vea la pgina del manual en la seccin
     customization para los valores por defecto.

  8.  El lado oscuro del problema

  La mala noticia es que no todas las aplicaciones se basan en termcap o
  en terminfo. La mayora de los programas pequeos tienen la secuencia
  "\a" (alarma) en su cdigo fuente C. Estos caracteres se convierten en
  el ASCII BEL en el binario ejecutable. Las aplicaciones reales no
  suelen caer en este fallo, pero cuidado con los novatos en C que le
  dan sus propios programas; los estudiantes de informtica son los
  peores, garantizado.

  La nica manera de hacer callar el altavoz con estas aplicaciones es
  la altavozectoma, o usar las secuencias de escape de Martin Mares.

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  DHCPD mini-COMO para Linux
  Paul Makeev, mac@RoSprint.net
  Traducido por Pedro Pablo Fbrega,
  v1.1, 5 March 1997

  Brevsima resea sobre la disponibilidad y configuracin de un servi
  dor DHCPd en Linux.

  1.  DHCPd

  1.1.  De qu va el COMO-DHCPD? Servidor o cliente?

  Es sobre el demonio DHCP SERVER. Hay un demonio cliente DHCP para
  Linux, pero no est descrito aqu.  Mire en:

  Principal:  ftp.kobe-u.ac.jp/pub/PC-
  UNIX/Linux/network/dhcp/dhcpcd-0.5.tar.gz

  El archivo es de 32Kb, dhcpcd-0.5.tar.gz

  Alternativo: http://sunsite.unc.edu
  /pub/Linux/system/Network/daemons/dhcpcd-0.5.tar.gz

  1.2.  Hay algn DHCPD para Linux?

  S, al menos yo he tenido algunos xitos con el ISC DHCPD de Paul
  Vixie/ISC DHCPD. Us Beta-5.0.9, y ahora uso 5.0.14. Ambos son
  versiones no especficas de Linux, pero compilan perfectamente y
  funcionan (no tan perfectos). Puede obtener las ltimas versiones del
  software en:

  http://www.isc.org/dhcp/dhcp-beta.html

  o, la ltima versin por ahora:

  ftp://ftp.vix.com/pub/dhcp/DHCPD-BETA-5.14.tar.gz

  Lea cuidadosamente el archivo README antes de compilar e instalar.
  Este archivo contiene informacin especfica para Linux.

  1.3.  Necesito algo especial en el ncleo?

  S, debe activar MULTICAST en el ncleo.

  1.4.  Necesito algo especial en la tabla de enrutado?

  S, la salida de un netstat -rn debe ser:

       dhcps:~$ netstat -rn
       Kernel routing table
       Destination     Gateway         Genmask         Flags Metric Ref Use    Iface
       255.255.255.255 0.0.0.0         255.255.255.255 UH    0      0      101 eth0

  Es decir, debe tener enrutado hacia su interfaz ethernet.

  1.5.  No Puedo hacerlo!

  Si el comando

       route add -host 255.255.255.255 eth0

  dice algo como

       255.255.255.255: Unknown host

  intente aadir una mquina imaginaria (p.ej. hostname) con esta
  direccin al archivo /etc/hosts y teclee route add -host hostname eth0
  en su lugar.  Debera funcionar. Si no, consiga nuevas utilidades de
  Red y/o actualice la versin del kernel.

  1.6.  Cmo puedo configurarlo?

  Lea los documentos incluidos. Es demasiado complicado discutirlo aqu.

  1.7.  Puedo ejecutar DHCPD en mquinas con dos o ms tarjetas Ether
  net?

  Todava no. Pero puede intentarlo. El problema es con el dispositivo
  (AFAIK (-- As Far As I Know, puede traducirse como Por Lo Visto, Por
  Lo Que S...--) ).

  El autor (Paul Vixie) o alguien podra modificarlo en versiones ms
  recientes.

  Espero estas ayudas.

  2.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  HDs grandes: mini-COMO
  Andries Brouwer, aeb@cwi.nl
  v1.0, 960626

  Todo lo referente a geometras de disco duro, as como el lmite de
  las BIOS/SO relacionados con particiones ms all de los 1024 cilin
  dros.
  ______________________________________________________________________

  ndice General:

  1.      El Problema

  2.      Arrancando

  3.      Geometra de los discos y particiones.

  4.      Traslaciones y Managers de disco

  5.      Traslacin de disco al ncleo en discos IDE.

  5.1.    EZD

  5.2.    DM6:DDO

  5.3.    DM6:AUX

  5.4.    DM6:MBR

  5.5.    PTBL

  6.      Consecuencias

  6.1.    Detalles IDE

  6.2.    Detalles SCSI

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  El Problema

  Suponga que tiene un disco duro con ms de 1024 cilindros.  Suponga
  que encima emplea un sistema operativo que hace uso de la BIOS.  Si es
  as, entonces tiene un problema, ya que el habitual interfaz de la
  BIOS a operaciones de E/S con discos, la INT13, usa un campo de 10
  bits para el cilindro en el que se produce una operacin de E/S, por
  lo que cilindros ms all del 1024 resultarn inaccesibles.

  Afortunadamente, Linux no hace uso de la BIOS, por lo que no resulta
  un problema.

  Bueno, a excepcin de dos aspectos:

  1. Cuando arranca el sistema, Linux no est ejecutndose todava, y
     por tanto, no puede ahorrarle los problemas relacionados con la
     BIOS.  Esto acarrea ciertas consecuencias para con LILO y gestores
     de arranque similares.

  2. Es necesario, para todos los sistemas operativos que compartan un
     disco el coincidir en dnde estn las particiones. En otras
     palabras, si usa Linux, y por ejemplo, Dos en un disco, ambos
     debern interpretar la tabla de particiones del mismo modo. Esto
     resulta en determinadas consecuencias con el ncleo de Linux y
     fdisk.

  Lo que sigue es una descripcin bastante detallada de todos los
  detalles relevantes. Tngase en cuenta que emple el kernel 2.0.8 como
  fuente de referencias; para otras versiones la cosa puede variar
  ligeramente.

  2.  Arrancando

  Cuando el sistema arranca, la BIOS lee el sector 0 (conocido como MBR,
  Master Boot Record, o Registro de Arranque Principal) del primer disco
  (o de un floppy), y salta al cdigo all residente --algn tipo
  cargador bootstrap (-- N del T: El trmino bootstrap procede de la
  expresin anglosajona ``To pull oneself up by one's bootstraps '', que
  viene a significar ``rehacerse por s slo, por sus propios medios, o
  por mritos propios, etc''--) , generalmente--.

  Los pequeos programas de bootstrap que all se encuentran no poseen
  controladores de disco propios, tpicamente, y emplean servicios de la
  BIOS para ello.  Esto significa que el ncleo de Linux slo puede
  arrancar cuando reside enteramente antes de los primeros 1024
  cilindros.

  Este problema se puede resolver fcilmente, asegurndose de que el
  ncleo (y quizs otros ficheros empleados durante la fase de arranque,
  como los ficheros de mapeo de LILO) residen en una particin que se
  encuentra en su totalidad en los primeros 1024 cilindros de un disco
  al que la BIOS puede acceder --esto significa que probablemente sea el
  primer o segundo disco--.

  Otro punto a considerar es que tanto el cargador de arranque y la BIOS
  deben asentir en cuanto a la geometra del disco. Podra ser til dar
  a LILO la opcin `linear'. Ms sobre esto a continuacin.

  3.  Geometra de los discos y particiones.

  Si tiene varios sistemas operativos en sus discos, cada uno puede
  estar utilizando una o varias particiones. El ms mnimo desacuerdo en
  cuanto a dnde estn dichas particiones puede acarrear catastrficas
  consecuencias.

  El MBR contiene una tabla de particiones describiendo donde estn las
  particiones (primarias). Hay 4 entradas en dicha tabla, para 4
  particiones primarias (-- N del T: o para 3 primarias y 1 extendida--)
  , y cada una tiene el siguiente aspecto:

       struct partition {
               char active;    /* 0x80: arrancable, 0: no arrancable */
               char begin[3];  /* CHS para el primer sector */
               char type;
               char end[3];    /* CHS para el ultimo sector */
               int start;      /* numero de sector en 32 bit (contado desde 0) */
               int length;     /* numero de sectores 32 en bit */
       };

  (donde CHS se refiere a Cilindros/Cabezas/Sectores).

  Por tanto, la informacin es redundante: la localizacin de la
  particin se da tanto por los campos de 24 bits begin y end, como por
  los campos de 32 bits start y length.

  Linux slo usa los campos start y length, y puede por tanto manejar
  particiones no mayores de 2^32 sectores, o lo que es lo mismo,
  particiones de ms de 2 TeraBytes. Lo cual es doscientas veces el
  tamao de los discos disponibles actualmente, por lo que ser
  suficiente para los prximos 10 aos o as.

  Desafortunadamente, la llamada a la INT13 de la BIOS emplea los CHS
  codificados en tres bytes, con 10 bits para el nmero de cilindro, 8
  para el nmero de cabeza, y 6 para el numero de sector de pista.

  Los nmeros posibles de cilindro son 0-1023, de cabeza 0-255, y de
  sector de pista 1-63 (s, los sectores de una pista se cuentan desde
  1, no desde 0).  Con esos 24 bits se puede acceder a 8455716864 bytes
  (7.875 GB), doscientas veces ms de las capacidades de disco
  disponibles en 1983.

  Todava ms desafortunadamente, los interfaces IDE estndar permiten
  256 sectores/pista, 65536 cilindros y 16 cabezas. Esto por s mismo
  permite el acceso a 2^37 = 137438953472 bytes (128 GB), pero combinado
  con la restriccin de la BIOS a 63 sectores y 1024 cilindros hace que
  slo queden 528482304 bytes (504 MB) accesibles.

  Esto no es suficiente para los discos de hoy en da, por lo que la
  gente recurre a todo tipo de triquiuelas, tanto va hardware como
  software.

  4.  Traslaciones y Managers de disco

  A nadie le importa cul es la geometra `real' de un disco.  De hecho,
  incluso el nmero de sectores por pista es variable --hay ms sectores
  por pista conforme nos acercamos al borde exterior del disco-- por lo
  que no hay un nmero de sectores por pista `verdadero'.

  Para el usuario resulta ms conveniente considerar un disco como una
  simple serie (-- N del T: ``array'' en el original.--)

  lineal de sectores numerados como 0, 1, ..., y dejar a la controladora
  el trabajo de encontrar en qu lugar del disco reside un sector dado.

  Esta numeracin lineal se conoce como LBA. Las direcciones lineales
  correspondientes a (c,h,s) (-- N del T: c=cilindros h=cabezas
  s=sectores; parmetros lgicos.--) para un disco con geometra (C,H,S)
  (-- N del T: parmetros fsicos--) corresponden a c*H*S + h*S + (s-1).
  Todas las controladoras SCSI ``hablan'' LBA, junto con algunas IDE.

  Si la BIOS convierte los (c,h,s) de 24 bits a LBA y le pasa eso a una
  controladora que ``entienda'' LBA, entonces vuelven a ser accesibles
  7.875 GB.  No es suficiente para todos los discos, pero no deja de ser
  constituir una mejora.

  Tngase en cuenta que que aqu CHS, tal y como los usa la BIOS, no
  tiene nada que ver con la `realidad'.

  Algo similar funciona cuando la controladora no ``habla'' LBA, pero la
  BIOS s sabe hacer la traslacin. (En el setup esto se suele indicar
  como ``large''.) La BIOS presentar una geometra (C',H',S') al
  sistema operativo, usando (C,H,S) para hablar con la controladora del
  disco. Normalmente S = S', C' = C/N y H' = H*N, donde N es la menor
  potencia de dos que asegura que C' <= 1024 (a fin de que se malgaste
  la menor capacidad posible al redondear en C' = C/N).  Nuevamente,
  esto nos proporciona acceso a 7.875 GB.

  Si la BIOS no sabe nada acerca de `LBA' o `Large', podemos recurrir a
  ciertas soluciones software. Los Disk Managers o Gestores de Disco
  como OnTrack o EZ-Drive reemplazan las rutinas de gestin de disco por
  otras suyas.  Esto se lleva a cabo normalmente haciendo residir el
  cdigo del gestor de disco en el MBR y sectores subsecuentes (OnTrack
  llama a este cdigo DDO: Dynamic Drive Overlay (-- N del T: algo as
  como Superposicin Dinmica de Disco.--) , de modo que sea arrancado
  antes que cualquier otro sistema operativo. Esa es la razn por la que
  se pueden tener problemas arrancando desde disquete cuando se ha
  instalado un Gestor de Disco. (-- N. del T. Esto no significa que no
  pueda hacerse de modo seguro; los gestores suelen proveer utilidades
  para hacer disquetes especiales de arranque--)

  El efecto es ms o menos el mismo que cuando se hacen traslaciones va
  BIOS, pero --especialmente cuando haya distintos sistemas operativos
  en el mismo disco-- con la salvedad de que pueden causar bastantes
  problemas.

  Linux soporta OnTrack Disk Manager desde la versin de ncleo 1.3.14,
  y EZ-Drive desde la versin 1.3.29. Ms detalles a continuacin.

  5.  Traslacin de disco al ncleo en discos IDE.

  Si el ncleo de Linux detecta la presencia de algn gestor de disco en
  un disco IDE, tratar de remapear el disco del mismo modo en que lo
  haya hecho el gestor de disco, de modo que Linux `vea' el mismo
  particionamiento del mismo que bajo DOS con OnTrack o EZ-Drive.

  No obstante, NO se produce remapeo alguno cuando se especifica la
  geometra en la lnea de comandos (-- N del T: Paso de parmetros a
  LILO o loadlin al arrancar Linux--) , por lo que una opcin como
  `hd=cyls,heads,secs' puede acabar perfectamente con la compatibilidad
  de un gestor de disco.

  El remapeo se lleva a cabo probando con 4, 8, 16, 32, 64, 128, 255
  Cabezas (manteniendo H*C constante) hasta que o bien C <= 1024 o H =
  255.

  Los detalles vienen a continuacin. --los ttulos de las subsecciones
  son las que aparecen en los mensajes de arranque correspondientes--.
  Tanto aqu como en cualquier otra parte de este texto, los tipos de
  particin se darn en notacin hexadecimal.

  5.1.  EZD

  EZ-Drive se detecta por el hecho de que la primera particin primaria
  es de tipo 55. La geometra se remapea como se describi
  anteriormente, desechando la tabla de particiones del sector 0 --en
  lugar de ello, se lee del sector 1--.  Los nmeros de bloque del disco
  no sufren cambio alguno, tan slo se redirigen las operaciones de
  escritura al sector 0 al sector 1. Se puede cambiar este
  comportamiento recompilando el kernel con la definicin

       #define FAKE_FDISK_FOR_EZDRIVE  0

  en ide.c.

  5.2.  DM6:DDO

  OnTrack DiskManager (en el primer disco) se detecta por el hecho de
  que la primera particin primaria es de tipo 54. La geometra se
  remapea como se describi anteriormente, y el disco se desplaza
  enteramente 63 sectores (por lo que el antiguo sector 63 pasa a ser el
  sector 0).  Posteriormente, un MBR nuevo (con su correspondiente tabla
  de particiones) es ledo del nuevo sector 0. Por supuesto este
  desplazamiento se lleva a cabo para hacer sitio al DDO --a esto se
  debe a que no se produzca dicho desplazamiento en los dems discos--.

  5.3.  DM6:AUX

  OnTrack DiskManager (en otros discos) es detectado por la
  circunstancia de que la primera particin primaria es de tipo 51 o 53.
  La geometra se remapea como describimos antes.

  5.4.  DM6:MBR

  Una versin ms antigua de OnTrack DiskManager se detecta no por el
  tipo de particin, sino por la firma. (Se comprueba que el offset
  encontrado en los bytes 2 y 3 del MBR no es superior a 430, la
  abreviatura encontrada en este offset es igual a 0x55AA, y est
  seguido por un byte impar.). Nuevamente, la geometra se remapea como
  anteriormente.

  5.5.  PTBL

  Para finalizar, hay un test que intenta deducir si existe traslacin a
  partir de los valores start y end (-- N del T: comienzo y final
  respectivamente--) de las particiones primarias:  Si alguna particin
  posee un cilindro de comienzo y fin menor de 256, sectores de comienzo
  y fin 1 y 63 respectivamente, y como cabezas finales 31, 63 o 127,
  entonces dado que acabar las particiones en el lmite de un cilindro
  es algo ``no estandarizado'' y dado que adems los interfaces IDE usan
  como mucho 16 cabezas, se deduce que est activa alguna traslacin de
  BIOS, y la geometra se remapea para usar 32, 64 o 128 cabezas
  respectivamente.  (Puede que haya una inconsistencia aqu, y genhd.c,
  no debera haber comprobado dos bits mayores por orden del nmero de
  cilindro?).  No obstante, no se lleva a cabo remapeo alguno cuando la
  nocin que se tiene en este momento de la geometra ya es de 63
  sectores por pista con al menos tantas otras cabezas (dado que esto
  significara que el remapeo ya se ha producido).

  6.  Consecuencias

  Qu significa todo esto? Para los usuarios de Linux tan slo una
  cosa: deben de asegurarse de que LILO y fdisk usan la geometra
  correcta, donde `correcta' se define para fdisk como la misma
  geometra usada por los otros sistemas operativos presentes en el
  mismo disco, y para LILO como la geometra que har posible una
  interaccin exitosa con la BIOS en el momento del arranque.
  (Normalmente ambos coinciden).

  Cmo averigua fdisk la geometra?  Pregunta al ncleo, empleando la
  llamada ioctl HDIO_GETGEO.  No obstante, el usuario puede interponerse
  a dicha geometra, interactivamente o en la lnea de comandos.

  Cmo averigua LILO la geometra?  Pregunta al ncleo, usando la
  llamada ioctl HDIO_GETGEO.  No obstante, el usuario puede descartar
  dicha geometra empleando la opcin `disk='.  Se puede pasar tambin
  la opcin linear a LILO, que almacenar en tal caso direcciones LBA en
  lugar de CHS en su fichero de mapeo, averiguando la geometra a usar
  al arrancar (mediante el empleo de de la INT13, funcin 8 para
  preguntar la geometra del disco).

  Cmo sabe el ncleo qu responder?  Veamos, para comenzar, el usuario
  puede haber especificado una geometra explcitamente con la opcin,
  en la lnea de comandos (-- N del T: Al prompt de LILO, el ``LILO
  boot:'' que aparece al encender el ordenador si LILO est
  instalado.--) `hd=cyls,heads,secs'.  En cualquier caso distinto, el
  ncleo preguntar al hardware.

  6.1.  Detalles IDE

  Permtame elaborar.  El controlador (-- N del T: ``driver'' en el
  original, software--) IDE tiene cuatro fuentes de informacin acerca
  de la geometra.  La primera, (G_user) es la especificada por el
  usuario en la lnea de comandos.  La segunda (G_bios) es la Tabla de
  Parmetros de Disco Duro de la BIOS.  (para el primer y segundo disco
  solamente). Esto se lee al arrancar el sistema, antes de cambiar a
  modo 32 bits.  La tercera (G_phys) y cuarta (G_log) son proporcionadas
  por la controladora IDE como respuesta al comando IDENTIFY --son las
  geometras ``fsicas'' y ``lgicas actuales''--.

  Por otra parte, el controlador (driver, software;)  precisa dos
  valores para la geometra: por una parte G_fdisk, devuelto por la
  llamada ioctl HDIO_GETGEO, y por otra, G_used que es empleada
  actualmente para las operaciones de E/S.  Tanto G_fdisk como G_used
  son inicializadas a G_used si se especifica ste, a G_bios cuando
  dicha informacin est presente de acuerdo a la CMOS, y a G_phys en
  los dems casos. Si G_log parece razonable, entonces G_used se
  inicializa como l. En cualquier otro caso, si G_used no parece
  razonable y s lo parece G_phys, entonces G_used se inicializa a
  G_phys. `Razonable' aqu significa que el nmero de cabezas est en el
  rango 1-16.

  Dicho con otras palabras: la lnea de comandos descarta la BIOS, y
  determinar lo que fdisk va a ver, pero si especifica una geometra
  que ya ha sufrido traslacin, (ms de 16 cabezas), para operaciones de
  E/S a nivel ncleo ser sustituida por lo retornado por el comando
  IDENTIFY.

  6.2.  Detalles SCSI

  La situacin para los discos SCSI es ligeramente diferente, ya que los
  comandos SCSI usan ya nmeros de bloque lgicos, por lo que la
  `geometra' es completamente irrelevante para las operaciones de E/S.

  No obstante, el formato de la tabla particiones contina siendo el
  mismo, por lo que fdisk tendr que inventarse alguna geometra, y
  tambin usar HDIO_GETGEO aqu --de hecho, fdisk no distingue entre
  discos IDE o SCSI--.  Como uno puede ver a raz de la descripcin
  detallada anterior, los distintos drivers inventan cada uno, una
  geometra diferente de algn modo. Un gran folln, de hecho.
  Si no usa DOS o similar, evite todas las configuraciones con
  traslacin extendida, empleando simplemente 64 cabezas, y 32 sectores
  por pista (para un bonito y prctico 1 MB por cilindro), si es
  posible, de modo que no aparezcan problemas cuando cambie el disco de
  una controladora a otra.

  Algunos controladores de discos SCSI (aha152x, pas16, ppa, qlogicfas,
  qlogicisp)  son tan paranoicos con la compatibilidad con DOS que no
  permitirn a un sistema slo-Linux emplear ms de 8Gb. Esto es un
  fallo.

  Qu es ``geometra real''?  La respuesta ms sencilla es que no
  existe tal cosa.  Y si la hubiese, no debera querer saberla, y desde
  luego NUNCA, JAMS decrsela a LILO o fdisk.

  Esto es un asunto a tratar exclusivamente entre la controladora SCSI y
  el disco.  Permtame repetrselo: slo los tontos le dicen a
  fdisk/LILO/kernel la verdadera geometra de un disco SCSI.

  Si an as es usted curioso e insiste, debera preguntarle al propio
  disco.  Existe el importante comando READ CAPACITY que proporcionar
  el tamao total del disco, as como existe el comando MODE SENSE, que
  proporciona el nmero de cilindros y cabezas (informacin que no puede
  ser cambiada) de la Pgina de Geometras de Disco Duro (pgina 04), y
  que extrae de la Pgina de Formateo (pgina 03) el nmero de de bytes
  por sector, as como de sectores por pista. Este ltimo nmero es
  tpicamente dependiente de las marcas (-- N del T: No marca comercial,
  marca fsica.--) , variando el nmero de sectores por pista --las
  pistas externas tienen ms sectores que las internas.

  El programa Linux scsiinfo proporcionar esta informacin.  Existen
  ms detalles y complicaciones, pero est claro que nadie
  (probablemente ni siquiera el sistema operativo) quiere usar esta
  informacin.

  Ms an, en lo que a nosotros concierne respecto a fdisk y LILO,
  obtendremos respuestas tpicamente como C/H/S=4476/27/171 --valores
  que no pueden ser empleados por fdisk porque la tabla de particiones
  reserva slo 10/8/6 bits para C/H/S.

  Entonces de dnde averigua la llamada al kernel HDIO_GETGEO su
  informacin?  O bien de la controladora SCSI, o bien mediante cultas
  averiguaciones.  Algunos controladores parecen pensar que queremos
  saber la `realidad', pero por supuesto lo nico que queremos saber es
  qu utilizarn los FDISK de DOS u OS/2 (o el AFDISK de Adaptec, etc).

  Ntese que el fdisk de Linux necesita los nmeros H y S de las cabezas
  y sectores por pista para convertir de nmeros de sectores LBA a
  localizaciones c/h/s, pero el nmero C de cilindros no tienen nada que
  ver en esta conversin.  Algunos controladores usan (C,H,S) =
  (1023,255,63) para indicar que la capacidad del disco es al menos
  1023*255*63 sectores.  Esto no resulta muy afortunado, ya que no
  revela la capacidad actual, y limitar a los usuarios de la mayora de
  las versiones de fdisk a alrededor de 8 Gb mximo en sus discos --una
  verdadera limitacin hoy en da--.

  En la descripcin que sigue, M denota la capacidad total del disco, y
  C, H, S el nmero de cilindros, cabezas y sectores por pista.  Basta
  con proporcionar H, S si tenemos en cuenta a C como definido por M /
  (H*S).

  Por defecto, H=64, S=32.

     aha1740, dtc, g_NCR5380, t128, wd7000:
        H=64, S=32.
     aha152x, pas16, ppa, qlogicfas, qlogicisp:
        H=64, S=32 a menos que C > 1024, en cuyo caso H=255, S=63, C =
        min(1023, M/(H*S)).  (C por tanto es truncado, y H*S*C no es una
        aproximacin a la capacidad del disco M. Esto causar confusin
        en la mayora de las versiones de fdisk.)  El cdigo ppa.c
        emplea M+1 en lugar de M y dice que ello se debe a un error en
        sd.c, en el que a M le falta 1.

     advansys:
        H=64, S=32 a menos que C > 1024 y ms an si la opcin `> 1 GB'
        est activado en la BIOS, en cuyo caso H=255, S=63.

     aha1542:
        Pregunte a la controladora cul de los dos esquemas de
        traslacin posibles est en uso, y emplee tanto H=255, S=63 como
        H=64, S=32. En el ltimo caso habr un mensaje al arrancar:
        "aha1542.c: Using extended bios translation".

     aic7xxx:
        H=64, S=32 a menos que C > 1024, y adems o bien el parmetro de
        arranque "extended" haya sido especificado en el arranque, o si
        el bit "extended" ha sido especificado en la SEEPROM o BIOS, en
        cuyo caso H=255, S=63.

     buslogic:
        H=64, S=32 a menos que C >= 1024, y que adems se haya
        configurado la controladora para hacer traslaciones extendidas,
        en cuyo caso si M < 2^22 entonces H=128, S=32; de otro modo,
        H=255, S=63.  No obstante, tras hacer esta eleccin para
        (C,H,S), se lee la tabla de particiones, y si para alguna de las
        tres posibilidades (H,S) = (64,32), (128,32), (255,63) el valor
        endH=H-1 aparece por alguna parte, entonces es usado dicho par
        (H,S), y un mensaje ser mostrado al arranque: "Adopting
        Geometry from Partition Table".

     fdomain:
        Averige la informacin acerca de la geometra de la Tabla de
        Parmetros de Disco de la BIOS, o lea la tabla de particiones y
        use H=endH+1, S=endS para la primera particin, teniendo en
        cuenta que no est vaca, o use H=64, S=32 para M < 2^21 (1 GB),
        H=128, S=63 para M < 63*2^17 (3.9 GB) y S=63 en otro caso.

     in2000:
        Emplee los primeros (H,S) = (64,32), (64,63), (128,63), (255,63)
        que hagan que C <= 1024. En el ltimo caso, trunque C a 1023.
        Use los primeros de (H,S) = (64,32), (64,63), (128,63), (255,63)

     seagate:
        Lea C,H,S del disco. (Horror!) Si C o S es demasiado grande,
        ponga S=17, H=2 y vaya doblando H hasta que C <= 1024. Esto
        significa que H ser establecida a 0 si M > 128*1024*17 (1.1
        GB). Esto es un error de programacin (bug).

     ultrastor y u14_34f:
        Uno de los tres mapeos ((H,S) = (16,63), (64,32), (64,63))  es
        empleado dependiendo del modo de mapeo de la controladora.

  Si el driver no especifica la geometra, volveremos a realizar una
  averiguacin inteligente usando la tabla de particiones, o usando la
  capacidad total del disco.

  Mire la tabla de particiones. Dado que por convencin las particiones
  terminan en el lmite de un cilindro, podemos, dado un end =
  (endC,endH,endS) de una particin, poner simplemente H = endH+1 y S =
  endS. (Recuerde que los sectores son numerados a partir de 1).  De un
  modo ms preciso, se hace lo siguiente:  Si hay alguna particin que
  no est vaca, escoja la particin con el beginC mayor.  Para dicha
  particin, mire a end+1, calculados ambos aadiendo start y length y
  asumiendo que estas particiones terminan en los lmites de un
  cilindro. Si ambos valores concuerdan, o si endC = 1023 y start+length
  es mltiplo integral de (endH+1)*endS, asuma entonces que dicha
  particin est realmente alineada con el lmite de un cilindro, y
  ponga H = endH+1 y S = endS.

  Si esto falla, bien debido a que no hay particiones, o porque poseen
  tamaos extraos, tenga en cuenta entonces nicamente la capacidad del
  disco M.  Algoritmo: ponga H = M/(62*1024) (redondeando hacia arriba),
  S = M/(1024*H) (redondeando hacia arriba), C = M/(H*S) (redondeando
  hacia abajo).

  Esto tiene el efecto de producir un (C,H,S) con C siendo como mucho
  1024 y S como mucho 62.

  7.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  En Hora mini-COMO
  Ron Bean, rbean@execp.com
  Traducido por Rodolfo Pilas, rodolfo@linux.org.uy

  Cmo configurar y mantener el reloj de su computadora en hora.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Uso del programa clock

  2.1.    Revisin de su sistema

  2.2.    Clculo de las variaciones de su reloj

  2.3.    Ejemplo

  2.3.1.  Estableciendo la hora

  2.3.2.  Restablecimiento de la hora y clculo de la desviacin.

  2.3.3.  Clculo del factor de correccin

  3.      Algunas consideraciones sobre xntpd

  4.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Los chips de reloj-de-tiempo-real (real-time-clock) que son usados en
  las placas madres de los PC (y tambin en las costosas estaciones de
  trabajo) son notoriamente inexactos. Linux dispone de una forma simple
  de corregir esto por software, haciendo que el reloj sea
  potencialmente muy exacto sin necesidad de una fuente externa de
  confirmacin del tiempo.  Pero muchas personas no reparan en esto, por
  varias razones:

  1. No es mencionado en la mayora de la documentacin sobre "Cmo
     configurar Linux", y es bastante difcil de configurar
     automticamente en el momento de la instalacin (sin embargo, sera
     posible en teora, si se dispusiera de un mdem).

  2. Si revisa "man clock" ver clock(3), que no es lo que se quiere.
     (pruebe "man 8 clock").

  3. La mayora de las personas no prestan mucha atencin a la hora.

  4. Aquellos pocos que s lo hacen, buscan usar el paquete xntpd de
     http://louie.udel.edu para sincronizar con una fuente externa el
     reloj, como un servidor de hora de red o un radio-reloj.

  Este mini-COMO describe un acercamiento sencillo al tema. Si Usted
  est completamente interesado en esto, le recomiendo encarecidamente
  que invierta un tiempo en http://www.eecis.udel.edu/~ntp/ donde
  encontrar todo lo relativo a este interesante asunto, incluyendo
  informacin completa sobre xntpd y enlaces para NIST y USNO (hay ms
  comentarios sobre xntpd al finalizar).

  Nota:

       Si usa ms de un sistema operativo en su mquina, debe dejar
       que solamente uno de ellos corrija el reloj del CMOS, para
       evitar que uno se confunda con otro. Si regularmente corre
       Linux y Windows en la misma mquina, puede echar una mirada
       a algn programa de reloj shareware que este disponible para
       Windows (siga los enlaces del url indicado arriba).

  2.  Uso del programa clock

  Todo lo que necesita saber est en la pgina man de clock(8), y este
  mini-COMO lo guiar a travs del proceso.

  Nota:

       Debe ser root para ejecutar "clock", o cualquier otro pro
       grama que afecte la hora del sistema o el reloj del CMOS.

  2.1.  Revisin de su sistema

  Revise sus archivos de inicio del sistema buscando una lnea de
  comando semejante a "clock -a" o "clock -ua".  Dependiendo de la
  distribucin que est utilizando, puede estar en /etc/rc.local o en
  /etc/rc.d/rc.sysinit, /etc/rc.d/init.d o algn otro lugar similar.

  Si aparece como "clock -s" o "clock -us", cambie la "s" por una "a", y
  compruebe si tiene el archivo /etc/adjtime, que contiene una sola
  lnea semejante a esta:

       0.000000 842214901 0.000000

  Estos nmeros son el factor de correccin (en segundos por da), el
  momento que reloj fue corregido por ltima vez (en segundos desde
  Enero 1, 1970), y el momento (segundo) en que fue corregido por ltima
  vez.  Si no dispone de este archivo, entre en el sistema como root y
  crelo, con una nica lnea que como esta (todo en cero):

       0.0 0 0.0

  Ejecute "clock -a" o "clock -ua"  manualmente desde la lnea de
  comando para actualizar el segundo nmero (use la "u" si su reloj esta
  marcando la hora Universal en lugar el tiempo local).

  2.2.  Clculo de las variaciones de su reloj

  Primero, necesita saber qu hora es :-).  Su hora del da puede estar
  o no ajustada.  Mi mtodo favorito es llamar al servicio WWV al (303)
  499-7111 (es una llamada por voz).  Si dispone de acceso a un servidor
  de horario en la red, puede utilizar el programa ntpdate del paquete
  xntpd (utilice el parmetro -b para permitir que el kernel actualice
  el reloj del CMOS).  De lo contrario use date -s hh:mm:ss para poner
  en hora el reloj del kernel a mano, y entonces clock -w para el reloj
  del CMOS, tomando la hora del reloj del kernel.  Deber recordar
  cundo puso en hora el reloj por ltima vez, lo mejor es escribir la
  fecha en algn lugar donde no la pierda. Si utiliz ntpdate, con date
  +%s" puede registrar el nmero de segundos desde Enero 1, 1970.

  Entonces, vuelva algunos das o semanas despus para ver cunto se ha
  desviado su reloj.  Si puso la hora a mano, le recomiendo espere al
  menos dos semanas para poder calcular la desviacin lo ms aproximada
  a .1 seg/da.  Despus de algunos meses le ser posible determinarla
  con exactitud cercana a .01 seg/da (algunas personas prefieren ms
  exactitud an, pero yo ya soy conservador a estas alturas).  Si ha
  utilizado ntpdate no es necesario que espere tanto tiempo, pero
  siempre podr hacer un mejor ajuste cuanto ms tiempo pase.

  Puede ejecutar con cron el comando "clock -a" a intervalos regulares
  para mantener la hora del sistema ajustada con el horario (corregido)
  de la CMOS. Este comando puede ejecutarse tambin desde algn archivo
  de inicio en el momento del arranque, si Vd hace esto (como lo hacemos
  casi todos nosotros) ser suficiente para sus propsitos.

  Tenga en cuenta que algunos programas pueden quejarse si el sistema
  salta ms de un segundo a la vez, o si va para atrs. Si tiene este
  problema, puede utilizar xntpd o ntpdate para corregir el tiempo ms
  gradualmente.

  2.3.  Ejemplo

  2.3.1.  Estableciendo la hora

  Entre como root. Llame al (303) 499-711 (voz), escuche el anuncio de
  la hora y escriba:

       date -s hh:mm:ss

  pero no presione ENTER hasta no escuchar el beep (puede utilizar
  ntpdate aqu en lugar de date, y evitar la llamada por telfono.  Esto
  establece la hora del ncleo (kernel time).  Luego escriba:

       clock -w

  Esto pone en hora la CMOS a partir de la hora del ncleo. Y ahora
  escriba:

       date +%j

  (o date +%s si ha usado ntpdate en lugar de date arriba) y escriba el
  resultado, para la prxima vez.

  2.3.2.  Restablecimiento de la hora y clculo de la desviacin.

  Busque la fecha en que ajust la hora la vez anterior. Entre como root
  y escriba:

       clock -a

  Esto hace que el ncleo tome la hora de la CMOS. Llame al (303)
  499-7111 (voz) y escuche el anuncio. Entonces escriba:

       date

  Presionando ENTER en el momento que escuche el beep, pero mientras
  est esperando, apunte la hora que escucha y no cuelgue an.  Lo que
  escucha es la hora que debera tener su mquina cuando se encuentra
  exacta en el minuto. Escriba:

       date hh:mm:00

  usando el minuto siguiente al cual acaba de escuchar y presionando
  ENTER en el momento en que escuche el beep nuevamente (ahora puede
  colgar).  Para hh utilice su hora local.  Esto coloca la hora del
  ncleo (kernel time). Teclee:

       clock -w

  el cual establecer la nueva hora (correcta) en el reloj del CMOS.
  Escriba:

       date +%j

  (o date +%s si es lo que ha utilizado anteriormente)

  Ahora dispone de tres nmeros (dos fechas y un intervalo de tiempo)
  que le permitirn calcular el desvo horario.

  2.3.3.  Clculo del factor de correccin

  Cundo ejecut date en el minuto, su mquina iba atrasada o
  adelantada?  Si iba adelantada, deber descontar algunos segundos,
  aunque le resulte un nmero negativo.  Si estaba retrasada, deber
  agregar algunos segundos, aunque resulte un nmero positivo.

  Ahora reste ambas fechas.  Si us "date +%j" , el nmero representando
  el da del ao (1-365 o 1-366 en ao bisiesto). Si Usted ha pasado el
  1 de Enero entre la primera y segunda fecha entonces deber agregar
  365 (o 366) al segundo nmero.  Si us date +%s su nmero est en
  segundos y deber dividirlo por 86400 para obtener das.

  Si ya tiene un factor de correccin en /etc/adjtime, deber tomar en
  consideracin el nmero de segundos que ha corregido. Si ha corregido
  adelantando, este nmero tendr el signo opuesto al del que ha medido;
  si ha corregido atrasando tendr el mismo signo.  Multiplique el
  antiguo factor de correccin por el nmero de das, y aada el nmero
  de segundos resultante (adicin con signos - si ambos nmeros tienen
  el mismo signo: obtendr un nmero mayor; si tienen signos opuestos,
  obtendr un nmero menor).

  Divida el nmero total de segundos por el nmero de das para tener el
  nuevo factor de correccin, y colquelo en /etc/adjtime en lugar del
  anterior.  Registre la nueva fecha (en segundos o das) para la
  prxima vez.

  He aqu mi /etc/adjtime:

       -9.600000 845082716 -0.250655

  (Ntese que 9.6 segundos por da es aproximadamente cinco minutos al
  mes!)

  3.  Algunas consideraciones sobre xntpd

  Su sistema actualmente dispone de dos relojes - el alimentado por la
  batera reloj de tiempo real (real time clock) que mantiene la hora
  cuando el sistema est apagado (tambin conocido como el reloj de la
  CMOS (CMOS clock, Hardware clock o RTC) y la hora del ncleo (kernel
  time o tambin conocido como software clock o system clock)  que est
  basado en interrupciones de tiempo y que es inicializado con el reloj
  del CMOS en el momento del arranque. Ambos relojes pueden diferir en
  el tiempo que marcan, de hecho gradualmente difieren uno de otro a
  medida que pasa el tiempo, y tambin difieren de la "hora real".

  Todas las referencias al "reloj" (the clock) en la documentacin de
  xntpd se refieren a la hora del ncleo. Cuando ejecute xntpd o timed
  (o cualquier otro programa que ajusta la llamada del sistema de
  adjtimex), el ncleo de linux asume que la hora del ncleo es ms
  precisa que el reloj del CMOS, y ajusta el reloj del CMOS cada 11
  minutos (hasta que apague el sistema).

  Esto significa que clock no sabr ms cundo el reloj del CMOS fue
  ajustado por ltima vez, y no podr utilizar el factor de correccin
  en /etc/adjtime.  Puede usar ntpdate en su archivo de inicializacin
  para poner en hora el reloj desde un servidor de tiempo en red, antes
  de iniciar xntpd.  Si no dispone de una fuente de hora fiable de forma
  continua cuando arranque la mquina, puede ser algo complicado, ya que
  xntpd realmente no ha sido diseado para ser usado en situaciones como
  esta.

  xntpd incluye controladores para muchos radio relojes, y puede ser
  tambin puesto en hora llamando peridicamente al servicio telefnico
  NIST (asegrese de calcular el efecto en su cuenta telefnica cuando
  configure el intervalo entre llamadas). Esto tambin sirve para
  obtener el factor de correccin al reloj del ncleo si se pierde el
  contacto con las otras fuentes de ajuste por un perodo largo de
  tiempo.

  La mayora de los radio-reloj cuestan $3-4K, pero puede hacer planes
  para tener una "caja negra" (actualmente un mdem de 300 baudios) que
  est ubicada entre su computador y una radio de onda corta sintonizada
  en la estacin de tiempo CHU de Canad (vea
  ftp://ftp.udel.edu/pub.ntp.gadget.tar.Z).

  El receptor Heatkit WWV (el "reloj ms exacto") est an disponible
  (aunque no como kit), y cuesta alrededor de $4-500. La seal de los
  GPS tambin contiene informacin de la hora, y algunos receptores de
  GPS pueden ser conectados a un puerto serie.  Esto podra constituir
  una solucin de bajo costo en un futuro cercano.

  En teora, cualquiera puede escribir un programa para usar los
  servicios telefnicos de NIST, a fin de calcular la variacin de
  tiempo entre el reloj del CMOS y el del ncleo automticamente. No
  tengo noticia de ningn programa que haga esto por si slo, pero la
  mayora del cdigo podra obtenerse de xntpd.

  4.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  FIPS El primer Fragmentador Interactivo de ParticioneS de
  disco
  de Arno Schaefer. Traduccin de Juan Jos Montesinos Castel
  lanos johncy@ibm.net
  Versin 1.5, 22 de agosto de 1995

  FIPS es un programa capaz de hacer nuevas particiones en el disco duro
  sin tener que borrar necesariamente los datos. Es especialmente til
  para hacer una/s particin/es para LINUX a partir de una nica par
  ticin DOS.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Que se necesita para usar FIPS?

  3.      Qu hace FIPS?

  4.      Seguridad

  5.      Restricciones

  6.      Antes de comenzar

  7.      Empleo con un Sistema Operativo Multitarea

  8.      Usar FIPS

  9.      Despus de fraccionar la particin

  10.     Opciones ajustables

  11.     Localizando errores

  12.     Crditos

  13.     Preguntas ms frecuentes sobre FIPS

  14.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  El programa est inspirado por el Proyecto Linux. Al instalar Linux en
  un PC que ha sido empleado por DOS/Windows, mucha gente querr
  conservar una particin ms pequea para los programas DOS. Sin
  embargo, como la mayora de los discos tienen una nica particin,
  normalmente se necesitara hacer una copia completa, borrar la
  particin y rehacer dos (o ms) particiones. En los actuales sistemas
  con capacidades por lo general de 500 MB o ms, hacer una copia entera
  es una tarea prcticamente inviable si no se dispone de grandes medios
  como cintas de backup una vez que la unidad se ha llenado hasta una
  considerable fraccin. Aunque incluso mucha gente graba su datos ms
  preciados (un prctica que recomiendo encarecidamente en cualquier
  caso), el proceso de reinstalar todos los paquetes de software puede
  llevar muchas horas o incluso das. FIPS se escribi para remediar
  este problema. Se puede dividir un particin sin prdida de datos con
  tal que haya suficiente espacio libre en el disco para la nueva
  particin a continuacin de la anterior.

  2.  Que se necesita para usar FIPS?

  Necesitas un programa de defragmentacin de archivos para mover todo
  los datos al principio del disco duro. FIPS sol dividir la particin
  si se dispone de suficiente espacio al final del disco. Las versiones
  DOS a partir de la 6.0 incluyen DEFRAG que es adecuado para este
  propsito. Hay otros programas tambin vlidos como Norton Speedisk
  (efectivamente DEFRAG es speedisk con menos funciones, con licencia
  Norton), PCTools Compress, DISKOPT en Novel DOS 7, o programas
  shareware ORG, DOG o SAFPAK (disponibles va FTP annimo de cualquier
  mirror en el directorio de utilidades de disco). No he probado estas
  ltimas, o sea no me culpen si no les funcionan. Tambin se debera
  usar un programa como Doctor Norton Disk (o SCANDISK en DOS 6.2) para
  comprobar el estado del disco antes de usar FIPS.

  FIPS fue desarrollado bajo la versin 5.0 de DOS. Debera funcionar
  bien con cualquier versin a partir de la 3.0, tal vez incluso la 2.0.
  Sin embargo no ser  muy til con versiones mas antiguas del DOS ya
  que slo se dispone de particiones de gran tamao a partir de DOS 4.
  Funciona bien con DOS 6.0 y 6..2 y Novell DOS 7. Tambin me han
  informado sobre su empleo satisfactorio con particiones de Windows95.
  Obsrvese que los nombres de fichero largos no son un problema para
  FIPS, porque funciona en un nivel ms bajo donde la estructura de
  directorios no es importante. Es probablemente muy sensato probar un
  disquete de arranque DOS antes de usar FIPS.

  3.  Qu hace FIPS?

  FIPS reduce el tamao de la particin cambiando unos valores de la
  tabla de particin (partition table) del sector de arranque (boot
  sector). No modifica el formato de la particin, especialmente del
  tamao del cluster y de la FAT (Tabla de Asignacin de Ficheros). Por
  lo tanto la particin reducida tendr una FAT que est en parte sin
  usar, pero esto no es problema para DOS. Con el espacio libre que se
  gana de esta forma FIPS crea una nueva particin primaria DOS. Si
  quiere emplear esta nueva particin para una sistema operativo
  diferente (por ejemplo Linux), use el programa fdisk para hacer los
  cambios oportunos (consultar los manuales del sistema operativo). Si
  quiere usar la nueva particin bajo DOS/Windows, puede usarla como tal
  (despus de formatear), pero tenga en cuenta lo siguiente: segn las
  referencias oficiales, DOS slo puede tener un nica particin
  primaria. Todas las versiones de DOS ( al menos desde la versin 5.0)
  trabajan bien con mltiples particiones primarias, pero esto es una
  caracterstica indocumentada. Si se quieren seguir las reglas
  oficiales, se puede borrar la nueva particin con fdisk y crear una
  particin extendida en su lugar. Hay razones para tener varias
  particiones primarias, entre ellas la posibilidad de arrancar desde
  distintas particiones cambiando la particin activa con fdisk.

  Los problemas que se encuentran con configuraciones de varias
  particiones primarias son:

  - si accidentalmente se borra una particin primaria del disco, no se
  podr reconstruir fcilmente, ya que fdisk no lo har. Hay otros
  programas fdisk por ah que lo harn, y si todo eso falla pueden
  arrancar desde un disquete de arranque Linux para ejecutar el fdisk de
  Linux, pero es siempre un lo.

  - Hay algunos paquetes de software que emplean la tabla de particin y
  se pueden confundir con varias particiones primarias. Entre ellos esta
  SFS, el 'Sistema de Ficheros Seguro' de Peter Gutmann. Creo que Peter
  ha realizado cambios a su programa para aceptar configuraciones
  inusuales, pero puede haber otros programas que pueden tener
  problemas.
  4.  Seguridad

  FIPS fue especialmente diseado para proporcionar el mximo de
  seguridad. Al empezar chequea las posibles incoherencias en la tabla
  de particin, sector de arranque y en la FAT. Si encuentra algo
  sospechoso, lo indicar. Si hay algn error FIPS no continuar. Se
  tiene la posibilidad de copia de seguridad del sector raz y del de
  arranque a un floppy disk antes de empezar. Si algo va mal estos datos
  se pueden recuperar con el programa RESTORRB.EXE (ver seccin 5).
  Recomiendo encarecidamente hacer uso de dicha caracterstica. Tambin
  le permite recuperar la particin ms tarde, por lo tanto es buena
  idea guardar los sectores de arranque y raz en un lugar seguro. FIPS
  chequea el espacio libre en la particin y le dejar escoger de esta
  forma el comienzo del nuevo cilindro. Una vez calculada la nueva tabla
  de particin y de sector de arranque FIPS comprobar todo de nuevo, de
  forma que se puedan detectar posibles errores en el clculo. Slo si
  todo va bien, FIPS le pedir permiso para escribir el nuevo sector de
  arranque y raz.

  5.  Restricciones

  FIPS slo trabajar con los discos duros que usen la interrupcin 13h
  para acceso de disco de bajo nivel. Esto es as para casi todos los
  PCs. He recibido un informe de un viejo controlador ADAPTEC SCSI que
  tena un driver de software que trabajaba en un nivel ms alto. En tal
  caso lo nico que puedes hacer es conseguir un nuevo driver de
  ADAPTEC. Esto ya no es problema para los nuevos ADAPTECs (yo
  personalmente uso uno). FIPS trabaja slo en discos con un tamao de
  sector de 512 bytes. Parece que DOS esta preparado para trabajar con
  distintos tamaos de sector, pero hasta ahora no lo he visto. FIPS no
  dividir particiones con FATs de 12 bits (no querrs dividir una
  particin con menos de 10 Mbytes verdad?). FIPS slo dividir
  particiones DOS. La tabla de particin y el sector de arranque deben
  estar de acuerdo a las convenciones de MS-DOS 3. Esto se marca por
  medio del byte indicador del sistema en la tabla de particin, debe
  tener el valor 4 (nmero de sector de 16 bits) o 6 (nmero de sector
  de 32 bits). FIPS NO DIVIDIR PARTICIONES LINUX.

  FIPS todava no acta sobre particiones DOS extendidas. Est planeado
  dar soporte a estas particiones a largo plazo, pero no puedo decir
  cuando. FIPS no trabajar si hay ya cuatro particiones, ya que
  necesita una particin libre. FIPS no reducir la particin original a
  un tamao menor de 4085 cluster, porque esto implicara reescribir la
  FAT de 16 bits a una de 32.

  6.  Antes de comenzar

  Ejecute chkdsk o scandisk en la particin que quieres dividir. Como
  alternativa puede emplear NORTON DISK DOCTOR. Asegrese que no quedan
  clusters muertos en el disco. Prepare un disquete de arranque en a:.
  Bajo DOS este se puede hacer con el comando format a: /s, bajo WINDOWS
  NT o OS/2 esto puede ser distinto, en caso de duda consultar el manual
  o arrancar con un disco de arranque. Copiar a este disquete los
  siguientes archivos de FIPS: restorrb.exe, unerros.txt.

  A continuacin, COMPRUEBE el disco de arranque. Lea el manual o
  pregunte al guru ms prximo si no puede arrancar con el disquete o no
  puede acceder al disco duro (Comprobar esto con el comando dir c:,
  deberas de ver el directorio raz de tu disco duro). Si todo esto
  falla intente usar FIPS despus de arrancar normalmente desde el disco
  duro (un poco ms arriesgado pero a veces el ltimo recurso). Cuando
  ejecute FIPS se podrn escribir copias de seguridad de los sectores de
  arranque y raz a un archivo en la unidad a: llamado rootboot.00X
  (donde X es un nmero entre 0 y 9). Si algo va mal se puede recuperar
  la configuracin original arrancando desde el disquete y ejecutando
  RESTORRB.EXE. Por favor fjense: si usa FIPS ms de una vez (esto no
  es frecuente pero puede ocurrir), se escribir mas de un rootboot.
  RESTORRB le permitir elegir que archivo de configuracin recuperar.
  El archivo restorrb.000 contiene la configuracin original. Procure no
  confundir las versiones. Necesitar este disco de seguridad
  (rootboot.00X) si quiere deshacer la particin ms tarde. Pero antes
  de comenzar con FIPS deber defragmentar el disco. Todo el espacio que
  se vaya a usar para la nueva particin deber estar vacio. Tenga en
  cuenta que el archivo de windows de swapping o fichero de intercambio
  de la memoria virtual no ser movido por la mayora de los
  defragmentadores. Deber desinstalarlo (en el icono Extendido 386 del
  panel de control de windows). Reinstalarlo despus de usar FIPS. Si
  usa IMAGE o MIRROR, el ltimo sector del disco contiene un archivo
  oculto que seala a tus archivos mirror o copia. Debe borrar este
  archivo antes de usar FIPS. Se crear la prxima vez que ejecute
  mirror). Ejecuta attrib -r -s -h image.idx  attrib -r -s -h
  mirorsasv.fil en el directorio raz, borrar a continuacin el archivo.
  Si FIPS no ofrece tanto espacio como cabra esperar puede ser que
  ocurra lo siguiente:

    a.Todava hay demasiados datos en la particin. Considere borrar
     parte de los datos o hacer una particin ms pequea.

    b. Hay archivos ocultos en el espacio para la nueva particin que
     no han sido movidos por el programa de defragmentacin. Se pueden
     ver los archivos ocultos con el comando dir /a:h /s. Compruebe a
     qu programa pertenecen. Si es un archivo de intercambio de un
     programa es posible eliminarlo de una forma segura y ser
     recuperado automticamente; mire el manual para ms detalles. Si el
     archivo pertenece a alguna clase de proteccin de copia debes
     desinstalar el programa.

  YA no puedo ofrecer ms ayuda sobre esto.

  ATENCIN no intentes mover ningn archivo oculto del DOS (msdos.sys,
  io.sys). Pueden acabar con un disco duro que no arranque nunca ms. No
  es necesario mover estos archivos ya que se encuentran el primer
  sector del disco. A partir de la versin DOS 5.0, por lo menos uno de
  los archivos del sistema puede se movido, no obstante no es una buena
  idea dejarlo slo.

  Una vez haya ejecutado FIPS tendr que rearrancar el ordenador,
  asegrate de desactivar cualquier programa del config.sys o del
  autoexec.bat que escriba al disco, en concreto mirror o imagen.
  Considere cambiar temporalmente el nombre de estos ficheros. Tenga
  presente que la ubicacin de sus particiones DOS en la tabla de
  particin puede cambiar despus de usar FIPS. Si usa la particin
  nueva bajo DOS y tiene una particin extendida y/ dos unidades de
  disco, esto significa que los nombres de las particiones pueden
  cambiar (ejemplo D: se puede convertir en E:). He procurado que C:
  permanezca siempre como C:, de forma que podr arrancar. De igual
  forma, si tiene un CD-ROM cambiar, en la mayora de casos la letra de
  unidad. Si usa el parmetro /L con el comando MSCDEX en el fichero
  autoexec.bat, tendr que cambiarlo en concordancia. Si no usa el
  modificador /L, MSCDEX escoger automticamente la primera letra
  libre, de forma que no es necesario cambiar nada

  En relacin a las letras de unidades, el DOS usa el orden siguiente
  para asignarlas:

  1. La primera particin de cada unidad

  2. Los volmenes dentro de las particiones extendidas en cada unidad

  3. Las restantes particiones primarias de todas las dems unidades.

  Ejemplo:

  C: primera particin primaria en el primer disco duro

  D: primera particin primaria en segundo disco duro

  E: primer volumen en la particin extendida del primer disco duro

  F: segundo volumen en la particin extendida del primer disco

  G: primer volumen en la particin extendida del segundo disco

  H: segunda particin primaria del segundo disco

  I: CD ROM

  No conozco una manera fcil cambiar este esquema. Concretamente no se
  puede asignar arbitrariamente una letra a una particin. Puede, sin
  embargo, influir en la ordenacin cambiando una particin primaria en
  una extendida.

  Para usuarios LINUX: El posible cambio en la ubicacin de la particin
  DOS en la tabla de particin tambin significa que el nmero que
  designa la esta particin bajo LINUX puede cambiar ( e.g /dev/hda3 se
  puede convertir en /dev/hda1). Cualquier particin Linux existente no
  cambiar, razn por la que no habr problema al arrancar. Slo es
  necesario editar el archivo /etc/fstab si usted monta su particin DOS
  al arrancar.

  7.  Empleo con un Sistema Operativo Multitarea

  No se debe usar FIPS en sistemas multitarea como OS/2, Desqview,
  Windows, Novell Task Manager o el emulador DOS de Linux. Estos
  sistemas pueden escribir en el disco despus de que FIPS haya cambiado
  la estructura del disco duro, que podra acabar corrompiendo el disco,
  aunque no ha de ser as necesariamente. Pero como la seguridad es mi
  preocupacin prioritaria, recomendara arrancar desde un disco de
  arranque DOS y ejecutar FIPS a continuacin, eso s sera seguro. En
  la versin 1.0 he agregado un cdigo de Dave McCaldon para detectar
  Desqview y Windows (gracias, Dave!). OS/ 2 y Novell Task Manager no
  son detectados todava. Tuve que quitar los cdigos para descubrir el
  emulador DOS de Linux porque causaba cuelgues en muchos mquinas.

  8.  Usar FIPS

  Si ya ha preparado un floppy de arranque como se describi en la
  seccin 6, arranque con el ahora mismo.

  Importante. Asegrese que no tiene un disco con un programa como
  Smartdrive ejecutndose. Ha habido casos en que los cambios que FIPS
  hizo se escribieron al disco slo en parte, lo que result en la
  posterior corrupcin del disco. Creo que esto puede ser causado por el
  uso de Smartdrive, en cuya configuracin estndar se retrasa la
  escritura al disco por unos segundos. Si se rearranca demasiado
  rpido, se pueden perder algunos de los cambios. Ejecute FIPS
  tecleando fips desde DOS, a continuacin <ENTER>. Se puede detener la
  ejecucin del programa en cualquier momento presionando
  simultneamente <CTRL-C>.

  FIPS intentar, en primer lugar, detectar bajo que sistema operativa
  se est ejecutando. Si es Windows o Desqview, se quejar e indicar
  que se arranque desde un disquete. No obstante, se puede continuar
  pero bajo su responsabilidad (ver seccin 9). A continuacin, FIPS
  detectar los discos duros y si tuviese ms de uno pedir sobre cual
  actuar. En versiones anteriores, FIPS fallaba al detectar el nmero
  correcto de discos duros con algunas BIOS (especialmente en Pentium).
  Espero haber corregido esto. Si fallase al detectar el nmero de
  discos, por favor hgamelo saber. Mientras tanto puede usar el la
  opcin -n para seleccionar manualmente el disco (ver a continuacin).
  FIPS lee el sector raz del disco y muestra la tabla de particin.

  Ejemplo:

  |     Start               |      End        | Start

  |Number of|

  Part.|bootable  |Head Cyl. Sector|System|Head Cyl. Sector  | Sector  |
  Sector  |  MB

  -----+----------------+------------------------+--------+--------------------------+-----------+---------------+-------

  1    |   yes    | 0   148       1|   83h | 15  295     63  |  149184|
  149184 | 72

  2    |     no   |   1   0       1|   06h | 15  139     63         63|
  141057 |  68

  3    |     no   |     140       1|   06h | 15  147     63  |  141120|
  8064 |   3

  4    |     no   |   0   0       0|   00h |  0    0      0  |       0|
  0 |   0

  Si no sabe que significa esto no importa demasiado. Sencillamente use
  el nmero de Megabytes para identificar las particiones. Se comprueba
  si hay errores en el sector raz. Si hay ms de una particin el
  disco, ser preguntado cual ser dividida. El sector de arranque de la
  particin es ledo y se indica alguna informacin.

  Ejemplo:

    Bytes per sector: 512

    Sectors per cluster: 8

    Reserved sectors: 1

    Number of FATs: 2

    Number of rootdirectory entries: 512

    Number of sectors (short): 0

    Media descriptor byte: f8h

    Sectors per FAT: 145

    Sectors per track: 63 Drive heads: 16

    Hidden sectors: 63

    Number of sectors (long): 141057

    Physical drive number: 80h

    Signature: 29h

  FIPS comprueba si la informacin es coherente con la tabla de
  particin e intenta detectar otros errores. A continuacin verifica
  que las dos copias de la FAT son idnticos, si no lo son, FIPS
  abortar con un mensaje de error.

  Si todo esta bien, FIPS buscar ahora espacio libre al final de la
  particin. La nueva particin debe tener al menos un cilindro, por lo
  que si el ltimo cilindro no est libre, no hay posibilidad de dividir
  la particin: FIPS abortar con un mensaje de error. Probablemente
  olvido eliminar un mirror o un fichero image. Ahora debe indicar en
  cual cilindro debe comenzar la nueva particin. Use las flechas del
  teclado para aumentar o disminuir el nmero. Durante el proceso se
  muestra el tamao de la particin actual y la nueva, por lo que no
  habr problema en seleccionar el cilindro adecuado. Con la tecla
  arriba/abajo se pude cambiar la cuenta es saltos de 10. Cuando est
  listo, teclee enter para continuar.

  FIPS comprobar nuevamente si el espacio para la nueva particin
  estar vaco -este es un paso de seguridad adicional y nunca debera
  mostrar un error, ya que el espacio libre fue determinado
  anteriormente. Despus de esto, FIPS calcular los cambios en el
  sector raz, chequear los cambios y mostrar la nueva tabla de
  particin. Podr elegir ahora entre reescribir la tabla (por lo que
  regresar al punto donde se seleccion la particin) o continuar. Si
  teclea 'c', FIPS calcular el sector de arranque, lo comprobar y le
  pedir confirmacin para proceder. Si teclea 'y' entonces, FIPS
  escribir los cambios al disco y finalizar la ejecucin.

  9.  Despus de fraccionar la particin

  Asegrese que los cambios han sido escritos en el disco. Si se ha
  empleado una cach de disco como Smartdrive (a pesar de mi
  recomendacin explcita de no hacerlo), espere unos segundos para que
  la memoria cach se vuelque al disco. La nueva particin ser
  reconocida por DOS despus de reinicializar el ordenador. NO ESCRIBA
  NADA AL DISCO ANTES DE ARRANCAR. Despus de rearrancar use CHKDSK or
  Norton Disk Doctor para asegurarse que su vieja ( y ahora ms pequea)
  particin esta bien. Ha habido casos donde las modificaciones
  realizadas por FIPS no fueron escritas correctamente. Para asegurarse
  que ste no es el caso, ejecuta FIPS con la opcin -t (modo prueba)
  despus de reinicializar. Seleccione la unidad y la particin que ha
  fragmentado. Si FIPS no muestra ningn error hasta la seccin de
  eleccin del cilindro, no hay ningn problema y puede detener el
  programa con CTRL-C. En caso contrario debe deshacer los cambios con
  RESTORRB y ponerte en contacto conmigo va E-mail.

  Si no ve ningn error ya puede ahora arrancar con los ficheros
  habituales autoexec.bat y config.sys. Ejecute algunos programas y
  asegrese que todava puede leer su datos. Si queres usar la nueva
  particin bajo DOS, debes formatearla. Si tiene varias particiones,
  asegrese de formatear la unidad correcta, las letras pueden haber
  cambiado.

  Si quiere usar la particin bajo Linux, debe cambiar el byte indicador
  del sistema con el fdisk de Linux, use a continuacin MKFS. Si quiere
  fragmentar la nueva particin de nuevo en dos ms pequeas, deber
  formatearla bajo DOS, en caso contrario FIPS se quejar.

  10.  Opciones ajustables

  Esta es la explicacin de los modificadores de linea de FIPS. Si
  prefiere el estilo DOS, puede usar '/ ' en lugar de '-' como el
  carcter indicador de la opcin. Las opciones se pueden combinar de
  forma arbitraria. Teclee fips -help para obtener un listado de las
  opciones. A continuacin una explicacin ms detallada:

    -t -test: modo prueba (no escribe a disco) No requiere mucha
     explicacin.

    -d o -debug: modo depuracin. En este modo, se escribe una completa
     transcripcin de la sesin en el archivo FIPSINFO.DBG en el
     directorio de trabajo. Puede enviar este fichero en caso de
     problemas (ver abajo).

    -h o -help: Pgina de ayuda, un corto resumen de las opciones.

    -n <num>: seleccione unidad <num> . Preseleccione el nmero de
     unidad con esta opcin. Los nmeros vlidos se encuentra entre 128
     y 255. Esto tambin se puede usar para obviar la deteccin
     automtica de la unidad, si por cualquier causa FIPS no encuentra
     la unidad, puede probar esta opcin.

    -p <num>: seleccionar la particin <numero>.

    -c <num>: primer cilindro <numero>

    -omb: eliminar "More than one Invalid bootable-flag". Hay algunos
     programas que admiten mas de una particin de arranque, simplemente
     usa la primera. Si tiene un programa as en el sector raz y el PC
     arranca normalmente, debe usar esta opcin para evitar el mensaje
     de error. Le recomiendo, sin embargo, borrar las banderas (flags)
     errneas, si tiene el programa adecuado.

    -obf: eliminar "Invalid bootable-flag"'bandera de arranque
     invlido'. Al modificar la bandera de arranque es tericamente
     posible arrancar desde un segundo disco. Si tiene esta
     configuracin, emplee esta opcin para evitar el mensaje de error.

    -ore: eliminar "Number of Rootdir entries must be multiple of 16"
     El DOS acepta un nmero invlido de entradas del directorio raz.
     Si no tiene otro medio para corregir la entrada, debe usar esta
     opcin para evitar este mensaje de error.

    -olf: eliminar "FAT too large". Como el nmero de sectores por FAT
     es un nmero de 2 bytes, es tericamente posible tener hasta 65535
     sectores por FAT. Esto es aceptado por DOS, pero un nmero mayor de
     256 no es til, ya que las FAT ms grandes tienen 256 sectores.

    - osf: eliminar "FAT too small". Si el nmero de clusters en la
     particin es mayor que las entradas en la FAT, DOS slo usa parte
     de la particin. Algo ha ido muy mal con esta particin, pero no
     todo esta perdido: usa esta opcin y reduce la nueva particin a un
     tamao para que sea usada adecuadamente.

    -omd: eliminar 'Wrong Media Descriptor Byte in FAT/Bootsector'. El
     byte descriptivo del medio debera ser F8h para discos duros, pero
     DOS acepta otros valores, as que puedes olvidarte de este mensaje
     con esta opcin.

  11.  Localizando errores

  FIPS tiene todava, de alguna forma, un carcter experimental, aunque
  ha sido usado por mucha gente con xito y sin problemas. En caso de
  duda, yo generalmente me fijo en los mensajes de error cuando
  encuentro configuraciones sospechosas. Algunos de los errores menores
  puede ser obviados. lase este documento cuidadosamente. Mire tambin
  el documento de Preguntas Frecuentes (PREF) incluido en este
  documento.

  Si no puede resolver por s mismo un problema, o tiene una
  configuracin no soportada por FIPS, o si sospecha de un error en
  FIPS, haga una transcripcin de la sesin mediante el comando -d y
  enve el archivo FIPSINFO.DBG completo con un breve comentario a
  schaefer@rbg.informatik.th-darmstadt.de Posiblemente su problema haya
  sido resulto con anterioridad.

  12.  Crditos

  FIPS est basado en el procedimiento descrito por Drew Eckhardt en el
  Linux digest 132. La mayora de lo que s acerca de la estructura de
  los discos duros viene de un excelente libro alemn 'Scheibenkleister
  II' (algn voluntario para traducirlo?) de Claus Brod y Anton
  Stepper. Est dirigido a el Atari ST, pero muchos cosas aplican a PCs
  tambin. La informacin sobre las interrupciones del disco fue
  recogida del listado de interrupciones de Ralf Brown. Gracias a Hamish
  Coleman por su informaciones y a Paul Smith por sus sugerencias.
  Gunnar Hilmarsson sugiri el procedimiento de discos apilados y Miguel
  lvarez me ayud a mejorar la clasificacin de la particin.
  ChetanPatil, Rand Phares y Eric Jung me indicaron fallos en la
  programacin y la documentacin del programa. Stefan Andreasen aport
  datos importantes sobre OS/ 2. Keith Crews sugiri adendas a la
  documentacin relativa al disco de arranque y las caractersticas de
  DOS 6.x. Dave McCaldon escribi el cdigo para detectar el OS. Scott
  Ellentuch y Billy Patton aportaron informacin acerca de OnTrack Disco
  Manager. Una informacin muy valiosa sobre discos EIDE y traduccin de
  direccin se encuentra en el Linux-EIDE-Mini-HOWTO de Patrick
  LoPresti. Gracias a todos los que me han enviado sugerencias. FIPS no
  sera lo mismo sin los innumerables emails recibidos. Arno
  Schaeferschaefer schaefer@rbg.informatik.th-darmstadt.de

  FIPS es gratuito; se puede redistribuir y/o modificar bajo los
  trminos expuestos en la Licencia Pblica General de la G N U (GNU)
  publicados por la Free Software Foundation; ya sea la versin 2 o
  cualquier otra posterior. FIPS se distribuye con la esperanza de que
  sea til, pero SIN NINGUNA GARANTA; sin ni si quiera garanta
  implcita de su COMERCIALIZACIN o CONVENIENCIA PARA UN USO
  PARTICULAR. En la  Licencia Pblica General de la GNU hay ms detalles
  que debera haber recibido junto con FIPS. Si no es as, escribir a

  Free Software Foundation

  675 Mass Ave, Cambridge

  MA 02139, USA

  Se pueden dirigir comentarios y problemas a:
  schaefer@rbg.informatik.th-darmstadt.de

  13.  Preguntas ms frecuentes sobre FIPS

  Aqu hay unas preguntas que la gente me pregunt por email. Este
  archivo puede ayudarle con algunos problemas comunes. Por favor lalo
  cuidadosamente antes de mandarlo. Si quiere saber de que se trata
  FIPS, lea el archivo README.1ST.Estn las respuestas a las siguientes
  preguntas:

  Q01. Ya que se puede dividir las participaciones con FIPS sera
  posible unir las particiones?

  Q02. Puedo invertir los cambios que FIPS hizo a mi disco duro?

  Q03. Qu pasara si no mantengo el sector raz y de arranque? Puedo
  todava deshacer la particin?

  Q04. He odo que el cluster depende del tamao de la particin y que
  el uso del espacio es mejor con tamaos pequeos de cluster. Puedo
  usar FIPS para disminuir el tamao del cluster de mi disco duro?

  Q05. Quiero dividir una particin grande en tres o cuatro ms
  pequeas. puedo usar FIPS varias veces?

  Q06. FIPS crea por defecto una segunda particin DOS primaria. Est
  esto permitido?

  Q07. Que significa el mensaje " Info: partition table inconsistency"?

  Q08. FIPS muestra un mensaje de error y se niega a trabajar. Qu debo
  hacer?

  Q09. FIPS no reconoce mi disco SCSI.

  Q10. FIPS slo reconoce una particin tipo 56h y ninguna DOS

  Q11. FIPS parece trabajar bien, y DOS reconoce la nueva particin,
  pero el fdisk de Linux reconoce una sola particin.

  Q12. Funciona FIPS con Windows 95?

  Q01. Ya que se puede dividir las participaciones con FIPS sera
  posible unir las particiones?

  A01.a

  NO en general. No quiero meterme en detalles tcnicos, slo un poco:
  Cada particin formada por DOS tiene una FAT que contiene las entradas
  para cada Cluster de la particin. Actualmente la FAT no es lo
  suficientemente grande como para sostener ambas particiones, por lo
  que esas particiones no sern unidas fcilmente. Es factible, pero no
  voy a incorporarlo dentro de FIPS. Hasta ahora he odo de dos paquetes
  de Software que dicen expandir las particiones. Uno es un programa
  gratuito llamado"Partition Resizer" (busca un archivo llamado
  presz???.zip en tu servicio favorito de BBS o FTP), el otro es un
  producto comercial llamado, PartitionMagic by Power quest. No la he
  probado todava.

  A01.b

  SI, si dividiste antes las particiones con FIPS. Como te esperabas el
  problema con FAT no existe en ese caso, desde que fuera originalmente
  formateado. En efecto la nica cosa requerida es restablecer el
  original root y boot sector (mientras tanto no importa como cambien
  los datos en la particin). Esto puede hacerse con el programa
  restorrb que viene con FIPS. Por favor ten en cuenta lo siguiente:

    Debes tener la imagen original de root and boot sector. Para eso
     debes salvarles con el Floppy disk Cuando FIPS te lo muestre.

    no debes formatear la primera particin (porque cuando es generado
     un nuevo FAT generalmente es muy pequeo).

    Los datos de la segunda particin (uno de los que fueron creados
     por FIPS estn perdidos , por supuesto. Los datos de la primera
     particin estn guardados.

  Q02. Puedo invertir los cambios que FIPS, hizo a mi disco duro ?

  A02.

  S, ver la respuesta-A01.b. Asegrate de que guardas los sectores de
  arranque y raz originales en un floppy disk con FIPS.

  Q03. Qu pasara si no mantengo el sector raz y de arranque? Puedo
  todava deshacer la particin?

  A03 Difcil. Por el momento tu nica opcin es leer el archivo que
  TECHINFO.TXT y aprender acerca del formato del disco duro, recalcula
  las particiones antiguas y formatear info a mano y usa un editor disco
  para cambiarlos. Debes proceder con astucia como indico a continuacin
  (llamar a la particin que fue dividida de la particin original la
  "segunda" particin, quedando la particin original como la "primera")
  :

  1. Asegrate de que no hay un dato importante a la izquierda de la
     segunda particin ya que podra ser borrado. Haz copias de todos
     los roots and boots sectors (en Floppy disk!) por si cometieras
     algn fallo. Tambin asegrate de que tienes un disco de arranque
     DOS, que funcione, con el editor disco en l .Haz una copia de
     seguridad de los datos!

  2. Elige ' edit physical drive' y edit participation table ' en el
     men del editor disk (en el caso de que tu editor disk lo soporte)

  3. Examina la tabla para asegurarte a que dos particiones, quieres
     unirte.

  4. Apunta la cabeza, cilindro y sector de la segunda particin e
     introduce los valores en los correspondientes campos de la primera
     particin.

  5. Suma al numero de sectores de la primera particin el nmero de
     sectores de la segunda e introduce el nuevo valor en el campo de
     sectores de la primera particin.

  6. Borra completamente la entrada para la segunda particin
     (sobrescribiendo con ceros).

  7. Busca el boot sector de la primera particin e introduce el nuevo
     nmero de sectores en el campo de sectores del boot sector.

  Por favor asegrate de que sabes lo que estas haciendo . Yo no me hago
  responsable de los los de su disco duro. Lete el archivo
  TECHINFO.TXT cuidadosamente.

  Q04. He odo que el cluster depende del tamao de la particin y que
  el uso del espacio es mejor con tamaos pequeos de cluster. Puedo
  usar FIPS para disminuir el tamao del cluster de mi disco duro?

  A04. En la particin que dividiste de la particin original, el tamao
  del cluster se adapta automticamente al nuevo tamao cuando lo
  formateaste. En la particin original no se puede cambiar el tamao
  del cluster sin reformatear y, por lo tanto, borrando todos los datos.
  Si tu nueva particin es lo bastante grande, debes copiar los datos de
  la nueva particin y formatear los antiguos, pero ten en cuenta dos
  cosas:

  1. No seras capaz de recuperar la particin antigua (ver A1.a).

  2. Los programas ms nuevos chequean para ver si la particin ha sido
     ya formateada y en este caso preservan el formato (para que la
     recuperacin de los datos sea mas fcil en el caso de que los
     formatos tengan algn fallo). Tienes que hacer engaar al Programa
     hacindole creer que la particin es nueva. Posiblemente el
     modificador /u har esto (No tengo posibilidad de chequear esto,
     por favor dime si funciona), pero si no, tienes que usar un editor
     de disco y sobrescribir el boot sector de la particin con ceros
     para anularlo.

  Nota: He recibido un informe que sobreescribiendo el boot sector no
  era bastante. Slo se me ocurre pensar que haba bastante informacin
  en las tablas de la BIOS sobre el viejo formato -recomiendo rearrancar
  despus de sobreescribir el boot sector y borrar todas las tablas. A
  veces las herramientas de DOS son demasiado inteligentes (si tienes
  problemas mndame un mensaje).

  El tamao normal de una particin es aproximadamente el siguiente:

  0 - 32 MB 512 BYTES

  32 - 64 MB 1024 BYTES

  64 - 128 MB 2048 BYTES

  128 - 256 MB 4096 BYTES

  256 - 512 MB 8192 BYTES

  512 -1024 MB 16384 BYTES

  Q05. Quiero dividir una particin grande en tres o cuatro ms
  pequeas. puedo usar FIPS varias veces?

  A05. Si. Debes formatear las particiones nuevamente creadas entre
  sucesivos usos de FIPS. A propsito para el tamao debers tener en
  cuenta el siguiente ejemplo:

  - Suponte que quieres dividir un 1GB hard disk en cuatro particiones
  de 256K cada una.

  - La particin original es formateada con un tamao del cluster de
  16KB.

  - La primera divisin es dividida en 256KB / 768KB. El tamao del
  cluster de la primera particin quedan 16KB, aunque 4 KB sern
  suficientes, Solo pueden ser cambiadas reformatendolas, ver A04.

  - La nueva particin de 768KB es formateada, todava con un tamao del
  cluster de 16KB.

  - La segunda divisin es hecha en 256KB / 256KB / 256KB.

  -La tercera particin es formateada con un cluster de un tamao de
  8KB.

  - La tercera divisin es hecha en 256KB / 256KB / 256KB.

  - La cuarta particin es formateada con un cluster de un tamao de
  4KB.

  - Ahora tienes los cluster de los tamaos: 16K - 16K - 8K - 4K.

  - Como las particiones segunda y tercera estn todava vacias, esto es
  posible reformatendolas a un tamao de cluster de 4K. Ver A04 para
  detalles sobre el formateo.

  Q06. FIPS crea por defecto una segunda particin DOS primaria. Est
  esto permitido?

  A06. Hecha un vistazo a la seccin " que hace FIPS " en FIPS.DOC para
  debatir este punto.

  Q07. Que significa el mensaje " Info: partition table inconsistency"?

  A07. La particin de la tabla en el sector de arranque maestra est
  formado por cuatro entradas con diferentes campos cada una . Lo raro
  sobre esta tabla es que algunos de los datos son redundantes.

  Los valores del principio y del final (Head/ cylinder/ sector) pueden
  ser calculadas a partir del sector de arranque y el nmero de sectores
  (despus de preguntar sobre el nmero de BIOS de cabezas y el nmero
  de sectores por pista), de hecho esto es lo que hace DOS. Este campo
  est completamente en desuso por DOS ( y los otros sistemas operativos
  que conozco ), entonces podrn ponerlos a cero. Sin embargo, no hace
  dao tenerlos de forma coherente.

  Cuando fdisk crea una particin de la tabla de entrada, debera
  introducir los valores correctos en estos campos. Ahora, como puede
  existir una inconsistencia? Hay por lo menos dos posibilidades:

  1. Algunos programas de fdisk parecen escribir valores incorrectos,
     especialmente el final de los cilindros que estn fuera por uno o
     dos.

  2. Puedes tener un EIDE drive que emplee traduccin de direcciones.
     Los discos modernos normalmente tienen mas de 1024 cilindros, pero
     DOS no permite usar ms de 1024. Esto hizo a los fabricantes de
     controladoras de disco emplear un truco: Reducen el numero de
     cilindros y aumentan el nmero de cabezas cuando el DOS pregunta
     por la geometra del disco. Entonces DOS piensa que tiene un drive
     con, por ejemplo 63 sectores, 32 cabezales y 1000 cilindros, cuando
     los valores correctos son 63 sectores, 16 heads, 2000 cilindros.
     Ahora, si DOS pregunta por el primer sector del cilindro 500,
     realmente consigue el primer sector del cilindro 1000. Este truco
     se llama address translation. Algunos de las unidades ms nuevas de
     discos EIDE permiten que la address translation se conecte y se
     anule en la BIOS. En algunos casos esto cambia despus que el disco
     es formateado. Esto significa que la geometra que el DOS obtiene
     cuando consulta al controlador de disco difiere de la geometra con
     la que la unidad fue formateada y que se refleja en la tabla de
     particin. Esto no es un problema para DOS, pero si lo era para
     FIPS hasta la versin 1.4. En la versin actual, si FIPS detecta
     esta clase de problemas, adaptar la tabla de particin a la
     geometra de disco alterada.

  Q08. FIPS muestra un mensaje de error y se niega a trabajar. Qu debo
  hacer?

  A08. Aunque esta completamente resuelto en FIPS.DOC, no puedo
  realzarlo suficientemente: si me mandas correo , por favor incluye el
  _DEBUG SCRIPT_ que puedes producir con la opcin -d. Si no tendr que
  pedrsela, y me llevar mucho tiempo resolver tu problema.

  Q09. FIPS no reconoce mi disco SCSI.

  A09. Existen unos adaptadores SCSI antiguos que necesita un driver que
  se carga en el config.sys antes de acceder al disco. Este dispositivo
   driver no proporciona una conexin a nivel de la BIOS si no que lo
  realiza a nivel DOS con el disco duro (para los tcnicos : se cuelga
  de la interrupcin 21h en lugar de la interrupcin de la BIOS 13h).
  Esto significa que la tabla de particin solo puede ser accesible por
  un programa fdisk especial que sepa sobre adaptadores internos. FIPS
  no trabajar con estos drivers (de hecho DOS tampoco). Posiblemente
  existen drivers nuevos para el adaptador que proporcionen un interface
  a nivel de la BIOS. pregunta al fabricante.
  Q10. FIPS slo reconoce una particin tipo 56h y ninguna DOS

  A10. Tienes Ontrack disk manager instalado. Lee la seccin adecuada en
  SPECIAL.DOC.

  Q11. FIPS parece trabajar bien, y DOS reconoce la nueva particin,
  pero el fdisk de Linux reconoce una sola particin.

  A11. De alguna manera DOS monta una tabla de particin distinta a la
  del disco maestro.

  Hay dos posibles razones :

  1. usas un mecanismo driver como ontrack disk manager. Ver el
     documento SPECIALDOC.

  2. Tienes un virus en el boot record maestro. Esto no suele pasar,
     pero es posible. Algunos de los virus se instalan ellos solos en el
     MBR y copian el MBR original a otro sitio. Cuando DOS intenta
     acceder a la tabla de particin, el virus intercepta el BIOS
     llamando y devolviendo la copia de seguridad, para esconderse de
     una posible deteccin. Comprueba esto con un scanner de virus
     despus de arrancar con un disco de arranque DOS limpio. Puedes
     quitar un virus desde el MBR usando el fdisk del DOS con la opcin
     /mbr, pero ten cuidado en caso de que la tabla de particin de
     seguridad no sea recuperada. Por esta razn el boot sector tendr
     la nueva informacin cambiada por FIPS, pero la tabla de particin
     tendr la configuracin original. Esta incoherencia deber ser
     corregida ( e.g con un editor de discos).

  Q12. Funciona FIPS con Windows 95?

  A.12 S. El sistema de archivo para Windows 95 es el mismo que para
  DOS. La nica diferencia es que los nombres de archivo son ms largos,
  pero FIPS trabaja en un nivel inferior al de los directorios, por lo
  que no es problema. Algunas personas han informado que FIPS ha
  funcionado sin problemas con particiones windows95.

  14.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Filtros de impresin con Ghostscript
  A. Gustavo Gonzlez agonzale@cica.es
  26 de Septiembre 1999

  En este artculo se introducen los fundamentos para componer filtros
  de impresin mediante el programa Ghostscript.
  ______________________________________________________________________

  ndice General:

  1.      Por qu este documento?

  2.      Lo primero es lo primero: Por qu necesito Ghostscript para
  imprimir en linux?

  3.      La orden gs y sus opciones

  3.1.    Entradas a gs

  3.2.    Dispositivo de salida

  3.3.    Resolucin de la impresin

  3.4.    Salida a un fichero

  3.5.    Escogiendo el tamao de papel

  3.6.    Otras opciones a considerar

  4.      Qu es un filtro de impresin y cmo se construye?

  5.      Filtros mgicos

  5.1.    Magicfilter

  5.2.    Apsfilter

  5.3.    Filtros de impresin Red Hat

  6.      El controlador uniprint

  7.      Impresin remota

  8.      Crditos

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Por qu este documento?

  Hace tiempo le un mini-Cmo sobre filtros de impresin maquetado por
  nuestro admirado compaero Ismael Olea olea@iname.com, extrado de la
  red Fidonet, y me dej con la miel en los labios, pues era muy corto.
  En este documento, cuyo carcter es fundamentalmente didctico --
  pensado para usuarios noveles de linux que ya conocen el
  funcionamiento de la impresin por spooling -- intento presentar de
  modo breve y resumido qu es Ghostcript y cmo usarlo para elaborar
  filtros de impresin.

  2.  en linux?  Lo primero es lo primero: Por qu necesito Ghostscript
  para imprimir

  Pues porque el formato estndar de los ficheros imprimibles en UNIX es
  PostScript (PS), pero no todo el mundo tiene una impresora PS.
  Ghostscript, escrito por Peter Deutsch, fundador de Aladdin
  Enterprises, es el intrprete por excelencia de documentos en formato
  PS (y tambin PDF). Ghostscript permite presentar datos PS y PDF en la
  pantalla y adems traducirlos de manera que puedan ser impresos en una
  impresora con capacidad grfica mediante el uso del controlador de
  dicha impresora. Como afortunadamente, adems, disponemos de
  herramientas para convertir otros formatos, tanto de documentos (como
  TEX, HTML, etc.) como de figuras (como GIF, TIFF, etc.) en PS, basta
  con disear filtros de impresin combinando el conversor de formato
  con el programa Ghostscript mediante tuberas (pipes, |).

  Aladdin Enterprises mantiene las nuevas versiones de Ghostscript hasta
  que alcanzan una cierta edad, y luego las libera a la Fundacin de
  Software libre (FSF, Free Software Foundation) para que se distribuya
  como GNU Ghostscript. Estas versiones son las que se distribuyen
  libres de cargo en las distribuciones de Linux. La versin
  Ghostscript 5.1 es de las ltimas liberadas y funciona de perlas para
  la creacin de filtros de impresin.

  3.  La orden gs y sus opciones

  El programa Ghostcript se ejecuta a travs de la orden gs con
  diferentes opciones

  3.1.  Entradas a gs

  Adems de las opciones a considerar, gs acta sobre un fichero de
  entrada en formato PS:

       gs [opciones] fichero.ps

  Donde fichero.ps es el fichero de entrada, pero uno tambin puede
  conectar una entrada por tubera (en el sentido de to pipe) en
  Ghostscript utilizando el nombre de fichero especial -, como por
  ejemplo

       {programa convertidor a formato PS} | gs [opciones] -

  La presencia del argumento - al final de la lnea de rdenes indica
  a Ghostscript que lea la entrada estndar (STDIN) desde un fichero o
  tubera en lugar de desde el teclado. Es la opcin de recibo cuando se
  disea un filtro de entrada para imprimir en PS.

  El fichero - presenta las siguientes caractersticas:

    Cuando Ghostscript termina de leer la tubera, deja de estar en
     modo interactivo. Por ello, - es til nicamente como ltimo
     argumento de la lnea de rdenes.

    - no puede usarse para conectar con una entrada PDF en tubera.

  3.2.  Dispositivo de salida

  Ghostscript dispone de una serie de dispositivos controladores para
  diversos tipos de impresora. Si invocamos gs -h, nos aparecer gran
  cantidad de informacin sobre nuestra versin instalada de
  Ghostscript, entre la que encontraremos los dispositivos
  controladores.  He aqu el listado correspondiente a dicha orden:

       GNU Ghostscript 5.10 (1998-12-17)
       Copyright (C) 1997 Aladdin Enterprises, Menlo Park, CA.  All rights reserved.
       Usage: gs [switches] [file1.ps file2.ps ...]
       Most frequently used switches: (you can use # in place of =)
       -dNOPAUSE           no pause after page   | -q       `quiet', fewer messages
       -g<width>x<height>  page size in pixels   | -r<res> pixels/inch resolution
       -sDEVICE=<devname>  select device         | -dBATCH  exit after last file
       -sOutputFile=<file> select output file: - for stdout, |command for pipe,
                                                embed %d or %ld for page #
       Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PDF
       Available devices:
          x11 x11alpha x11cmyk x11gray2 x11mono lvga256 vgalib t4693d2 t4693d4
          t4693d8 tek4696 appledmp ccr lp2563 lbp8 lips3 m8510 necp6 cp50 oce9050
          oki182 okiibm r4081 sj48 xes ln03 la50 la70 la75 la75plus sxlcrt deskjet
          djet500 laserjet ljetplus ljet2p ljet3 ljet4 declj250 paintjet pjetxl
          cdeskjet cdjcolor cdjmono cdj550 cdj500 djet500c dnj650c pj pjxl pjxl300
          hpdj uniprint epson eps9mid eps9high epsonc lq850 lp8000 st800 stcolor
          ap3250 ibmpro bj10e bj200 bjc600 bjc800 ljet3d lj4dith lj5mono lj5gray
          lj250 faxg3 faxg32d faxg4 dfaxhigh dfaxlow pcxmono pcxgray pcx16 pcx256
          pcx24b pcxcmyk pbm pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw
          pkm pkmraw tiffcrle tiffg3 tiffg32d tiffg4 tifflzw tiffpack cif bmpmono
          bmp16 bmp256 bmp16m tiff12nc tiff24nc psmono psgray bit bitrgb bitcmyk
          sgirgb pngmono pnggray png16 png256 png16m cgmmono cgm8 cgm24 jpeg
          jpeggray miff24 mgrmono mgrgray2 mgrgray4 mgrgray8 mgr4 mgr8 pdfwrite
          pswrite epswrite pxlmono pxlcolor nullpage
       Search path:
          . : /usr/lib/ghostscript/common : /usr/lib/ghostscript/5.10 :
          /usr/lib/ghostscript/fonts
       For more information, see /usr/doc/gs/use.txt.
       Report bugs to ghost@aladdin.com; use the form in bug-form.txt.

  As, si disponemos de una impresora HP Deskjet 550C y vamos a imprimir
  el fichero.ps, haremos:

       gs -sDEVICE=cdj550 fichero.ps

  3.3.  Resolucin de la impresin

  Algunas impresoras pueden imprimir a diferentes resoluciones (siendo
  la menor la que se toma por defecto). Para seleccionar la resolucin
  horizontal (num1) y vertical (num2) en pixels por pulgada, se utiliza
  la opcin
       -rnum1xnum2
       -rnum es equivalente a -rnumxnum (cuando num1=num2=num)

  3.4.  Salida a un fichero

  Si seleccionamos una impresora como dispositivo de salida, Ghostscript
  tambin permite controlar a dnde enva el dispositivo su salida. En
  el sistema DOS, la salida se dirige normalmente a a la impresora
  (PRN); en UNIX, generalmente se enva a un fichero temporal para su
  impresin en cola. Para dirigir la salida a un fichero (fichero.out),
  se utiliza la opcin

       -sOutputFile=fichero.out

  Pero en UNIX, tambin podemos usar esta opcin para enviar la salida a
  una conexin por tubera, por ejemplo al servidor de impresin,
  mediante la orden lpr

       -sOutputFile=\|lpr

  o enviarlo a la salida estndar (sOutputFile=-) para que, por ejemplo,
  el demonio lpd tome esos datos de la salida estndar y los entregue a
  la impresora. Esta es una de las opciones usadas en la construccin de
  filtros de impresin.

       gs [opciones] -sOutputFile=- -q |...

  En este caso es necesario emplear la opcin -q (quiet) que evita que
  el programa Ghostscript escriba mensajes en la salida estndar y se
  mezclen con la corriente de salida del dispositivo de impresin.

  3.5.  Escogiendo el tamao de papel

  Ghostscript se distribuye configurado para usar papel US letter, que
  es el tamao de pgina por defecto, pero existen otros tamaos que se
  configuran empleando la instruccin -sPAPERSIZE=opcin, como por
  ejemplo

       -sPAPERSIZE=a4
       -sPAPERSIZE=legal

  3.6.  Otras opciones a considerar

  En el caso de construccin de filtros de entrada, hay otras opciones
  interesantes:

    -dSAFER: Evita que acten los operadores de borrado o renombrado de
     ficheros, as como la posibilidad de abrir ficheros en cualquier
     otro modo que no sea de slo lectura. Esto es fundamental para el
     mecanismo de spooling del demonio de impresin.

    -dNOPAUSE: Deshabilita el prompt y la pausa al final de cada
     pgina. Se utiliza para producir salidas de impresin o para
     controlar gs desde otro programa.

    @fichero: Hace que gs lea el fichero y trate su contenido como si
     fueran lneas de rdenes. Las instrucciones dentro del fichero
     pueden estar separadas por al menos un espacio en blanco.

  4.  Qu es un filtro de impresin y cmo se construye?

  Antes que nada es necesario recordar el mecanismo de spooling tpico
  de los servidores de impresin en linux. En primer lugar el servidor
  lpr/lprng copia el fichero a imprimir en el directorio de spool (sd)
  indicado en el fichero /etc/printcap, creando en dicho directorio un
  fichero de control indicando el trabajo a imprimir, el usuario que
  solicita el servicio de impresin, parmetros pasados en lnea de
  rdenes, etc. Luego, el demonio de impresin (lpd) comprueba
  peridicamente si hay ficheros de control en el directorio spool, y si
  es as, realiza las siguientes tareas:

    Imprime la pgina de banner si no se ha suprimido (con la
     instruccin sh en el fichero /etc/printcap) y la pasa a travs del
     filtro de salida si lo hay (instruccin of del fichero
     /etc/printcap)

    Si no se indic al servidor de impresin que empleara algn filtro
     de impresin en concreto, entonces se utilizar el filtro de
     entrada, cuya ruta indica el parmetro if del fichero
     /etc/printcap.

    Al ejecutarse el filtro de entrada, se redirecciona su entrada
     estndar al fichero de control y su salida estndar a:

    la entrada estndar del filtro de salida (of) cuando lo haya, y la
     salida de dicho filtro al dispositivo de impresin asociado a la
     impresora (entrada lp del fichero /etc/printcap)

    al dispositivo de impresin indicado en /etc/printcap

  Por lo tanto un filtro de entrada de impresin no es ms que un
  programa (generalmente un guin) que teniendo en su entrada estndar
  (STDIN) un fichero en un formato determinado , p. ej., ps
  (postscript), escribe en su salida estndar (STDOUT) los cdigos
  necesarios para que la impresora imprima dicho fichero.

  Consideremos que disponemos de una impresora HP Laserjet Plus y vamos
  a escribir algunos filtros. La resolucin ser de 300x300; el formato
  de papel, A4; y el controlador de dispositivo es ljetplus.

  Vamos a escribir el filtro para ficheros PS como un shell script:

       #!/bin/bash/
       #Filtro de ficheros postscript
       /usr/bin/gs -q -dSAFER -dNOPAUSE -sDEVICE=ljetplus -r300 -sPAPERSIZE=a4 -sOutputFile=- -

  Como podemos ver, gs lee la STDIN desde el fichero de control que ha
  creado el servidor de impresin lpr; se ejecuta el filtro y la opcin
  -sOutputFile=- enva la salida a STDOUT. El demonio lpd tomar los
  datos que se encuentren en STDOUT y los enviar a la cola de
  impresin.

  Para procesar un fichero PDF aprovechando la utilidad pdf2ps (shell
  script que convierte un fichero PDF a PS), escribiremos el filtro:

       #!/bin/bash/
       #Filtro de ficheros pdf
       /usr/bin/pdf2ps | /usr/bin/gs -q -dSAFER -dNOPAUSE -sDEVICE=ljetplus -r300 -sPAPERSIZE=a4\
       -sOutputFile=- -

  Para un texto en formato troff, emplearamos este otro

       #!/bin/bash/
       #Filtro de ficheros troff
       /usr/bin/grops -g | /usr/bin/gs -q -dSAFER -dNOPAUSE -sDEVICE=ljetplus -r300 -sPAPERSIZE=a4\
       -sOutputFile=- -

  (la opcin -g para la orden grops permite generar documentos en
  formato letter o a4)

  Como puede verse el concepto de filtro sera un shell script con los
  siguientes campos:

       #!/bin/bash
       #Comentario 'filtro para ficheros XYZ'
       /usr/bin/XYZps | /usr/bin/gs -q -dSAFER -dNOPAUSE -sDEVICE=ljetplus -r300 -sPAPERSIZE=a4\
       -sOutputFile=- -

  Donde XYZps es un programa (con opciones) que convierte el formato XYZ
  a PS. Hay una gran cantidad de ellos que serviran para hacer filtros
  con posibilidad de imprimir grficos; as el formato TIFF se pasa
  directamente con la utilidad tiff2ps, mientras que los GIF y JPEG se
  pasan a formato PNM mediante los programas giftopnm y djpeg,
  respectivamente. Una vez en este formato, se traduce a PS con la
  utilidad pnmtops.
  5.  Filtros mgicos

  Un filtro puede ser tan sencillo como los que hemos visto, o
  complicarse substancialmente, llegando a ser capaz de reconocer el
  tipo de fichero que queremos imprimir y realizar las operaciones
  necesarias para que obtengamos una salida correcta. Un filtro mgico
  analiza la entrada que recibe y, de acuerdo con los datos que le
  llegan, manda el trabajo a otro filtro secundario. As, cuando le
  llega un fichero en formato PS, lo enva a ghostcript, cuando es JPEG,
  lo manda a otro filtro adecuado para la impresin correcta, etc. Los
  filtros mgicos ms conocidos son magicfilter, apsfilter y los filtros
  de impresin de RedHat.

  5.1.  Magicfilter

  Magicfilter es un programa escrito por H. Peter Anvin
  Peter.Anvin@linux.org que puede encontrarse en cualquier espejo de
  sunsite, en el directorio

       /mirror/linux/sunsite/system/printing/magicfilter-1.2.tar.gz

  y tambin existe como paquete .deb y .rpm. Es el filtro mgico
  recomendado en la distribucin Debian. Para configurar una impresora
  en este sistema, primero han de instalarse los paquetes magicfilter y
  recode.  El programa magicfilterconfig se crea al instalar el paquete
  magicfilter y permite una cmoda configuracin de la impresora,
  escribiendo el fichero /etc/printcap a partir de las respuestas a una
  serie de preguntas que nos hace interactivamente. Nos pregunta por el
  puerto del dispositivo (/dev/lp1 o /dev/lp0), as como los nombres que
  daremos a nuestra impresora: uno largo y descriptivo y otro ms corto
  que se usar como nombre para el directorio spool y luego muestra una
  serie de filtros disponibles para elegir. Lo mejor es mirar, antes de
  ejecutar magicfilterconfig, en el directorio /etc/magicfilter para ver
  cul es el filtro que mejor viene a nuestra impresora. Los filtros son
  archivos de texto en cuyo cabecera se indica la impresora que lo puede
  utilizar. magicfilterconfig genera el fichero /etc/printcap con toda
  la informacin que le hemos dado. Para el caso de mi Epson Stylus
  Color 600, el fichero /etc/printcap generado por magicfilterconfig es
  (En Debian 2.1 kernel 2.0.36):

  #
  # Copyright (c) 1983 Regents of the University of California.
  # All rights reserved.
  #
  # Redistribution and use in source and binary forms are permitted
  # provided that this notice is preserved and that due credit is given
  # to the University of California at Berkeley. The name of the University
  # may not be used to endorse or promote products derived from this
  # software without specific prior written permission. This software
  # is provided ``as is'' without express or implied warranty.
  #
  #       @(#)etc.printcap        5.2 (Berkeley) 5/5/88
  #
  # This file was generated by /usr/sbin/magicfilterconfig.
  #
  lp|eps|ESC600:\
          :lp=/dev/lp1:sd=/var/spool/lpd/eps:\
          :sh:pw#80:pl#72:px#1440:mx#0:\
          :if=/etc/magicfilter/stylus_color_360dpi-filter:\
          :af=/var/log/lp-acct:lf=/var/log/lp-errs:

  Una vez instalado, magicfilter permite que el sistema reconozca e
  imprima grficos (GIF, JPEG, TIFF, BMP...), ficheros PS, PDF, DVI,
  pginas de manual, ficheros ASCII con acentos y , e incluso cualquier
  tipo de fichero comprimido con gzip.

  5.2.  Apsfilter

  apsfilter es otro programa que permite configurar la impresora y
  escribir un fichero /etc/printcap con los filtros adecuados para
  muchos formatos de fichero (ASCII, DVI, PS, PDF, GIF, TIFF, BMP,
  BITMAP...) y diversos tipos de compresin (compress, gzip, freeze).
  apsfilter ha sido desarrollado por Andreas Klemm andreas@knobel.gun.de
  y es el paquete incluido en el YaST de SuSE para la configuracin de
  la impresora, as como el que recomienda Pat Volkerding en su mensaje
  de bienvenida a Slackware. Puede obtenerse de

       http://www.freebsd.org/~andreas/

  El programa apsfilter ofrece las siguientes colas de impresin para
  una computadora local:

    lp: Cola estndar para todos los formatos de fichero.

    lp-mono: Se genera para las impresoras de color cuando ha de
     imprimirse en blanco y negro. Procesa cualquier formato de fichero.

    ascii: Para imprimir ficheros de texto ASCII.

    raw: Para imprimir ficheros que ya tienen el formato especfico de
     la impresora y por lo tanto no hay ningn tipo de conversin.

  El fichero /etc/printcap correspondiente a mi Epson Stylus Color 600,
  obtenido con apsfilter, es el siguiente (En SuSE 6.2 kernel 2.2.10):

       ### BEGIN apsfilter: ### stcany.upp a4 color 360 ###
       #   Warning: Configured for apsfilter, do not edit the labels!
       #            apsfilter setup Thu Oct 14 01:30:42 CEST 1999
       #
       ascii|lp1|stcany.upp-a4-ascii-mono-360|stcany.upp a4 ascii mono 360:\
               :lp=/dev/lp0:\
               :sd=/var/spool/lpd/stcany.upp-a4-ascii-mono-360:\
               :lf=/var/spool/lpd/stcany.upp-a4-ascii-mono-360/log:\
               :af=/var/spool/lpd/stcany.upp-a4-ascii-mono-360/acct:\
               :if=/var/lib/apsfilter/bin/stcany.upp-a4-ascii-mono-360:\
               :la@:mx#0:\
               :tr=:cl:sh:
       #
       lp|lp2|stcany.upp-a4-auto-color-360|stcany.upp a4 auto color 360:\
               :lp=/dev/lp0:\
               :sd=/var/spool/lpd/stcany.upp-a4-auto-color-360:\
               :lf=/var/spool/lpd/stcany.upp-a4-auto-color-360/log:\
               :af=/var/spool/lpd/stcany.upp-a4-auto-color-360/acct:\
               :if=/var/lib/apsfilter/bin/stcany.upp-a4-auto-color-360:\
               :la@:mx#0:\
               :tr=:cl:sh:
       #
       lp-mono|lp3|stcany.upp-a4-auto-mono-360|stcany.upp a4 auto mono 360:\
               :lp=/dev/lp0:\
               :sd=/var/spool/lpd/stcany.upp-a4-auto-mono-360:\
               :lf=/var/spool/lpd/stcany.upp-a4-auto-mono-360/log:\
               :af=/var/spool/lpd/stcany.upp-a4-auto-mono-360/acct:\
               :if=/var/lib/apsfilter/bin/stcany.upp-a4-auto-mono-360:\
               :la@:mx#0:\
               :tr=:cl:sh:
       #
       raw|lp4|stcany.upp-a4-raw|stcany.upp a4 raw:\
               :lp=/dev/lp0:\
               :sd=/var/spool/lpd/stcany.upp-a4-raw:\
               :lf=/var/spool/lpd/stcany.upp-a4-raw/log:\
               :af=/var/spool/lpd/stcany.upp-a4-raw/acct:\
               :if=/var/lib/apsfilter/bin/stcany.upp-a4-raw:\
               :la@:mx#0:\
               :tr=:cl:sh:
       #
       ### END   apsfilter: ### stcany.upp a4 color 360 ###

  Despus de instalar el paquete apsfilter, la configuracin de la
  impresora se lleva a cabo fcilmente ejecutando el script SETUP que
  encontraremos en el directorio /var/lib/apsfilter o
  /usr/lib/apsfilter. SETUP nos ir mostrando mens de opciones que
  seleccionaremos convenientemente, y al final nos escribir el fichero
  /etc/printcap como arriba aparece. Existe un fichero de configuracin
  de apsfilter llamado /etc/apsfilterrc que permite un mayor control del
  trabajo de los scripts de apsfilter en el shell. Por ejemplo,
  apsfilter imprime los ficheros ASCII del siguiente modo:

  1. Convierte el fichero ASCII a PS mediante a2ps

  2. El comportamiento de a2ps por defecto es imprimir el contenido de 2
     pginas ASCII en una pgina apaisada

  Esto no gusta a muchos usuarios que prefieren una salida normal.
  Para cambiar esto editaremos el fichero /etc/apsfilterrc y
  observaremos que la variable FEATURE toma por defecto el valor 2n (To
  print two pages on one sheet without a header). Debemos comentar (o
  borrar) esa lnea y aadir esta otra:
       FEATURE=1n

  como se observa en este fragmento de mi fichero

       ##############################################################################
       # Description
       # -----------
       # FEATURE=1       tell a2ps to print 1 page  on one sheet with    header
       # FEATURE=2       tell a2ps to print 2 pages on one sheet with    header
       # FEATURE=1n      tell a2ps to print 1 page  on one sheet without header
       # FEATURE=2n      tell a2ps to print 2 pages on one sheet without header
       # FEATURE=1l      tell a2ps to print 1 pages in landscape with    header
       # FEATURE=1ln     tell a2ps to print 1 pages in landscape without header
       #
       # This is the default I use now(the original default option was FEATURE=2n)
       FEATURE=1n

  Para suprimir por completo la conversin de ASCII a PS, e imprimir
  directamente en el modo ASCII de la impresora, se debe quitar el
  smbolo de comentario (#) al comienzo de la orden
  USE_RECODE_NOT_AP2S=yes, y por supuesto haber instalado el programa
  recode.

  5.3.  Filtros de impresin Red Hat

  Red Hat cuenta con su propio sistema de configuracin de impresora
  (printtool) y su propio sistema de filtros de impresin
  (/usr/lib/rhs/rhs-printfilters), que incluye una herramienta de
  configuracin visual y un administrador grfico de trabajos de
  impresin.  La configuracin de una impresora mediante printtool es
  muy sencilla y puede hacerse sin muchos conocimientos sobre el
  sistema. El fichero /etc/printcap para mi Epson Stylus Color 600
  obtenido con printtool es (En RedHat 6.0 kernel 2.2.7):

       #
       # Please don't edit this file directly unless you know what you are doing!
       # Be warned that the control-panel printtool requires a very strict format!
       # Look at the printcap(5) man page for more info.
       #
       # This file can be edited with the printtool in the control-panel.
       ##PRINTTOOL3## LOCAL uniprint NAxNA a4 {} U_EpsonStylusColor stcany 0
       lp:\
               :sd=/var/spool/lpd/lp:\
               :mx#0:\
               :sh:\
               :lp=/dev/lp0:\
               :if=/var/spool/lpd/lp/filter:

  El filtro de RedHat se parece ms al de magicfilter que al de
  apsfilter porque genera slo una cola de impresin para una impresora
  nica lp.
  6.  El controlador uniprint

  A partir de la versin 5.0 de Ghostscript, ha aparecido un nuevo
  controlador paramtrico -- the uniprint driver-- desarrollado por
  Gunther Hess ghess@elmos.de, que se adapta a impresoras Canon BJC 610,
  HP Deskjet 550c, Prinwriter 2X y todas las Epson Stylus Color mediante
  un fichero de parmetros especificos. Por ejemplo, para la Epson
  Stylus Color 600 hay tres ficheros:

    stc600ih.upp: Para 1440x720dpi, inkjet paper

    stc600p.upp: Para 720x720dpi, plain paper

    stc600pl.upp: Para 360x360dpi, plain paper

  Si no deseamos ms que 360x360 dpi de resolucin, puede usarse el
  fichero stcany.upp que sirve para cualquier impresora Stylus Color.
  Este fichero contiene las siguientes lneas:

       -supModel="Any Epson Stylus Color, 360x360DpI"
       -sDEVICE=uniprint
       -dNOPAUSE
       -dSAFER
       -dupColorModel=/DeviceCMYKgenerate
       -dupRendering=/ErrorDiffusion
       -dupOutputFormat=/EscP2
       -r360x360
       -dupMargins="{ 9.0 39.96 9.0 9.0}"
       -dupComponentBits="{1 1 1 1}"
       -dupBeginPageCommand="<
          1b40   1b40
          1b2847 0100 01
          1b2869 0100 01
          1b2855 0100 0A
          1b5500
          1b2843 0200 0000
          1b2863 0400 0000 0000
       >"
       -dupAdjustPageLengthCommand
       -dupAdjustTopMarginCommand
       -dupAdjustBottomMarginCommand
       -dupEndPageCommand="(\033@\014)"
       -dupAbortCommand="(\033@\15\12\12\12\12    Printout-Aborted\15\014)"

  y por lo tanto, para realizar impresin de un fichero PS usando la
  orden gs, escribiramos (para la Epson Stylus Color) en un filtro para
  ficheros PS la lnea

       /usr/bin/gs @stcany.upp -sOutputFile=--

  en lugar de

  /usr/bin/gs -sDEVICE=stcolor -r360 -q -dSAFER - dNOPAUSE -sOutputFile=- -

  obteniendo el mismo resultado.

  7.  Impresin remota

  En la impresin remota, los filtros se emplean de manera diferente
  segn se trate de imprimir en una mquina remota unix o windows.  En
  el primer caso, el administrador de la mquina remota debe incluir la
  nuestra en su /etc/hosts.equiv o, mejor, en /etc/hosts.lpd, o
  permitirle la impresin solamente a ciertos usuarios empleando el
  atributo rs (ver la pgina man de lpd). Para imprimir en la mquina
  remota, aadiremos una nueva entrada a nuestro /etc/printcap.
  Supongamos que la impresora de la mquina remota (hercules.us.es) es
  una Epson EPL 5700 y la cola de impresin por defecto (lp) es la que
  queremos usar. La entrada sera:

       #Remote unix printer
       epl5700|Remote unix printer
               :sd=/var/spool/lpd/epl5700:\
               :rm=hercules.us.es:\ #nombre de la mquina remota (rm: remote machine)
               :rp=lp:\ #nombre de la cola de impresin en la mquina remota (rp: remote printer)
               :mx#0:\
               :lp=/dev/null:\
               :sh:\

  Es necesario tener un directorio spool en la mquina local, porque si
  la remota est ocupada o desconectada, el trabajo a imprimir esperar
  en dicho directorio hasta que sea enviado.

  Cuando se trata de imprimir en una mquina remota Windows, debemos
  usar el paquete SaMBa. Es posible establecer una cola de impresin
  mediante el programa smbclient (parte de samba) por el protocolo
  TCP/IP mediante el servicio de impresin SMB. Samba incluye un guin
  para realizar esto, llamado smbprint. En pocas palabras, se aade una
  entrada nueva al /etc/printcap de la mquina local para la impresora
  remota incluyendo en la entrada if el script smbprint. Si la impresora
  remota es, por ejemplo, una HP Laserjet, podramos poner:

       #Remote samba printer
       HPlaserjet|Remote samba printer
               :sd=/var/spool/lpd/HPlaserjet:\
               :mx#0:\
               :lp=/dev/null:\
               :if=/usr/local/sbin/smbprint #Ruta del guin smbprint
               :sh:\

  Para mayor informacin acerca de la impresin remota, consultar el
  Cmo correspondiente a la configuracin de impresin.

  8.  Crditos

  David Espada Garca bombadil@santandersupernet.com escribi un
  interesante artculo Configuracin de la impresora en el n4 de la
  revista Slo Programadores LINUX. Tambin me han sido muy tiles el
  Ghostscript User Manual de Thomas Merz tm@muc.de, el Linux Printing
  Howto de Grant Taylor gtaylor+pht@picante.com y el Manual de SuSE
  Linux 6.2, captulo 12.

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En ella encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.

  ``GNU Privacy Guard'' (GnuPG) Mini Como
  Michael Fischard v. Mollard fischer@math.uni-goettingen.de
  (versin alemana)
  J.S.A.A.F. de Winter brenno@dewinter.com (versin inglesa)
  castellana)
  v0.1.3, septiembre de 1999

  Este documento trata sobre la instalacin, configuracin y uso de Gnu
  Privacy Guard (GnuPG), un sistema de codificacin de cdigo libre y
  desarrollo abierto, compatible con OpenPGP.  Con el fin de mantener
  este programa totalmente libre, se ha evitado el uso de algoritmos con
  patentes propietarias restrictivas, como las de IDEA y RSA.  El docu
  mento original fue escrito en alemn por Michael Fischard v. Mollard,
  y posteriormente traducido, y revisado en algunos puntos, al ingls
  por Brenno J.S.A.A.F. de Winter.  La traduccin de este documento al
  castellano se ha llevado a cabo a partir de la versin inglesa.  El
  captulo 5 se ha aadido en la versin en castellano, y tambin se han
  incluido algunos recursos y otra informacin en castellano.  sta es
  una revisin de la versin 0.1.2, y no incluye ninguna temtica nueva,
  tan slo su conversin de cdigo HTML a cdigo SGML para su posterior
  reconversin a otros formatos.  Tambin se han corregido algunos
  errores de forma o traduccin.
  ______________________________________________________________________

  ndice general









































  1. Conceptos bsicos

     1.1 Sistemas de claves pblicas
     1.2 Firmas digitales
     1.3 Anillos de confianza
     1.4 Lmites de seguridad

  2. Instalacin y configuracin

     2.1 Cdigo fuente de GnuPG
     2.2 Configuracin
     2.3 Compilacin
     2.4 Instalacin

  3. Uso y gestin de las claves

     3.1 Generacin de una clave
     3.2 Exportacin de claves
     3.3 Importacin de claves
     3.4 Revocacin de claves
     3.5 Administracin de claves
     3.6 Firma de las claves

  4. Codificar y descodificar

     4.1 Codificar
     4.2 Descodificar

  5. GnuPG + PGP

     5.1 Uso de algoritmos
     5.2 Firma digital con GnuPG
     5.3 Importacin de anillos de claves PGP a GnuPG
     5.4 Uso de anillos de claves PGP con GnuPG

  6. Firmar y Verificar

     6.1 Firmar
     6.2 Verificar

  7. Fuentes de Informacin

     7.1 GnuPG
     7.2 PGP
     7.3 Recursos en castellano
     7.4 Servidores de claves
     7.5 Libros

  8. Sobre este Documento

     8.1 Versiones

  9. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Conceptos bsicos



  1.1.  Sistemas de claves pblicas



  Para poder entender mejor el sistema de codificacin usado por los
  sistemas de claves asimtricas (es decir, claves pblicas y privadas),
  es necesario entender las diferencias con los sistemas de claves
  simtricas (es decir, claves secretas).

  Los sistemas de cifrado con clave simtrica son aquellos en los que la
  clave que se usa para cifrar una serie de datos es la misma que la que
  se usar para descifrar estos datos.  En el caso del correo
  electrnico, el remitente cifrara el mensaje con una clave secreta, y
  para que el destinatario pueda descifrarlo, necesitara haber obtenido
  previamente esta misma clave de un modo seguro, o sea de modo que la
  clave no haya podido ser interceptada durante la entrega.  Si no
  tenemos la completa seguridad de que el intercambio de la clave ha
  sido seguro, la validez de este sistema es nula.

  Por el contrario, los sistemas de cifrado con claves asimtricas usan
  claves distintas para el cifrado y posterior descifrado de los datos.
  En un caso como el anterior, el remitente usara la clave pblica del
  destinatario para cifrar el mensaje, y el destinatario descifrara el
  mensaje con su propia clave privada.  As pues, la clave privada no
  debe ser accesible para nadie que no sea el propio dueo de la misma,
  mientras que la clave pblica, puede ser entregada a cualquier
  persona.  En un sistema de cifrado bien implementado, la clave privada
  no debe derivar nunca de la clave pblica.


  1.2.  Firmas digitales


  El concepto de la firma digital se basa en la verificacin de la
  autora de un mensaje.  Esto quiere decir que se puede comprobar que
  el destinatario del mensaje puede comprobar que el supuesto
  remitente es quien afirma ser.  Para ello, el remitente, una vez
  compuesto el mensaje, lo firma usando su propia clave privada.  El
  destinatario, una vez ha recibido el mensaje, comprobar la veracidad
  de ste, esto es, lo verificar usando la clave pblica del remitente.

  Este mtodo es de especial utilidad para reducir riesgos de seguridad
  en nuestros sistemas (nos podran enviar un supuesto parche para un
  programa, y ste en realidad ser un virus o un troyano);  tambin
  podran enviarnos informacin o datos, como provenientes de una fuente
  lcita o fiable.  En ambos casos, no sera muy difcil falsificar la
  direccin y nombre del remitente, pero s imposible falsificar la
  firma digital de ste.

  Como ya hemos dicho, la verificacin de un mensaje firmado
  digitalmente se lleva a cabo mediante el uso de la clave pblica del
  remitente sobre el texto del propio mensaje.  De este modo no slo
  podemos verificar la identidad del autor, sino que tambin podemos
  comprobar la integridad del mensaje, ya que la firma digital ha sido
  generada con el texto y la clave privada.  As pues, una alteracin o
  modificacin del texto a posteriori, o cualquier manipulacin del
  mensaje (especialmente si hacemos uso de las especificaciones
  MIME/PGP), dara como resultado un error en la verificacin.


  1.3.  Anillos de confianza


  Un punto flaco en los algoritmos de clave asimtrica es la transmisin
  del cdigo pblico.  Es posible que una persona ponga en circulacin
  cdigo con un identificador de usuario falso.  Si se codifican
  mensajes con este pseudo cdigo, el intruso los puede descodificar y
  leerlos.


  La solucin PGP (y por consiguiente la solucin GnuPG) est en firmar
  los cdigos.  La clave pblica de un usuario puede estar firmada con
  las claves de otros usuarios.  El objetivo de estas firmas es el de
  reconocer que el UID (identificador de usuario) de la clave pertenece
  al usuario a quien dice pertenecer.  A partir de ah es un problema de
  cada usuario de GnuPG el decidir hasta qu punto se puede fiar de la
  firma.  Una clave se puede considerar fiable cuando se confa en el
  remitente y cuando se sabe con seguridad que dicha clave pertenece a
  ste.  Slo cuando se puede confiar plenamente en la clave del
  firmante, se puede confiar en la firma que acompaa a la clave de un
  tercero.  Para tener la certeza de que la clave es correcta hay que
  compararla con la huella digital por medio de canales fiables (por
  ejemplo, podramos buscar el telfono en la gua y llamarle, y que nos
  la dijera de palabra para poder compararla), antes de darle una
  confianza absoluta.


  1.4.  Lmites de seguridad


  Si lo que se desea es mantener la confidencialidad de los datos que se
  poseen, no basta con determinar qu algoritmo de cifrado se va a usar;
  tambin es necesario pensar en la seguridad general del sistema.  En
  principio, PGP est considerado como suficientemente seguro, y hasta
  el momento no se sabe que haya habido ningn incidente en el que una
  clave PGP haya sido descodificada.  Pero eso no significa que todo lo
  cifrado sea seguro;  si la NSA (Agencia de Seguridad Nacional de los
  EE.UU.) hubiera conseguido descodificar una clave PGP mediante
  criptoanlisis, anlisis del cdigo, o cualquier otro modo, no es
  probable que lo hicieran pblico.  Pero an en el caso de que las
  claves PGP fueran a todas luces imposibles de descodificar, pueden ser
  utilizados otros tipos de ataques a la seguridad.  A principios de
  Febrero fue detectado un troyano que buscaba las claves PGP en el
  disco duro, y las transfera al atacante mediante FTP.  Si en este
  caso hubiramos escogido una contrasea dbil o fcil, un simple
  anlisis que consistiera en un ataque de diccionario la descubrira
  en poco tiempo.

  Otra posibilidad tcnica, aunque ms difcil, es la de los troyanos
  que recogen entradas de teclado y las transmiten al asaltante.
  Tambin es posible, aunque muy difcil, pasar el contenido de una
  pantalla a otra. En este ltimo caso no sera necesario ningn
  anlisis sobre datos cifrados, ya que se obtendran antes de su
  cifrado.

  Por todo esto es necesaria una planificacin de la seguridad que est
  bien prevista y que minimice los riesgos.

  La idea no es la de recrear una atmsfera de paranoia entre la gente,
  sino dejar claro que para implementar un sistema seguro no basta con
  la instalacin de un programa criptogrfico, que si bien es un paso
  hacia un sistema ms seguro, no es una solucin completa.  Troyanos
  como el aparecido en Marzo de 1999 (Melissa) probaron que muchas
  compaas no se encuentran preparadas en temas de seguridad.



  2.  Instalacin y configuracin



  2.1.  Cdigo fuente de GnuPG


  El sitio oficial para para la distribucin de GnuPG es el sitio
  oficial de GnuPG, ftp://ftp.guug.de/pub/gcrypt/gnupg/.  En las pginas
  oficiales de GnuPG, http://www.gnupg.org/download.html tambin se
  pueden encontrar enlaces a rplicas oficiales.

  Debido a restricciones legales no se permite bajar material
  criptogrfico desde servidores localizados en los EE.UU., a los no
  residentes en este pas.  En EE.UU. existen unas leyes que imponen
  restricciones a la exportacin de cdigo criptogrfico as como de
  programas que los incluyan.  Por esta razn PGP se encuentra siempre
  disponible en dos versiones:  una internacional y otra para los EE.UU.
  El cdigo fuente para la versin internacional fue exportado en
  formato ascii imprimido en un libro.  A continuacin fue escaneado en
  Europa (Oslo) y recompuesto.  Se puede obtener ms informacin al
  respecto en la pgina internacional de PGP, http://www.pgpi.com/.  La
  versin internacional de PGP puede ser importada libremente a los
  EE.UU. siempre y cuando no se vuelva a reexportar fuera de stos.  Una
  vez se ha instalado una versin de GnuPG o PGP, se debera verificar
  la firma digital que acompaa al fichero (Ver ``Firmar y Verificar'').


  2.2.  Configuracin


  GnuPG se puede obtener como un paquete de binarios de Debian,
  http://www.debian.org/ (.deb), como un paquete de binarios de RedHat,
  http://www.redhat.com/ (.rpm), o en cdigo fuente.  Los paquetes son
  archivos comprimidos de los ficheros binarios que se pueden instalar
  con las correspondientes herramientas, segn la distribucin.  Si se
  necesita instalar GnuPG en otros sistemas operativos, entonces lo debe
  compilar uno mismo a partir de los fuentes.  Se agradece que quien
  compile un paquete de instalacin para un sistema o arquitectura
  diferente, lo haga de dominio pblico.

  Dado que la mayora del desarrollo de GnuPG tiene lugar en mquinas
  x86 bajo Linux (http://www.linux.org/, la migracin a un sistema
  diferente no debera ser ningn problema.  La lista de sistemas
  operativos que estn soportados por GnuPG se puede encontrar en las
  pginas de GnuPG (http://www.gnupg.org/.  El procedimiento que se
  describe a continuacin no es exclusivo de ninguna plataforma.  Este
  procedimiento se puede usar para compilar e instalar GnuPG partiendo
  de un archivo comprimido del cdigo fuente (loquesea.tar.gz).

  Descomprimir y desempaquetar el paquete del cdigo fuente con la orden
  (si estamos usando GNU tar):



       $ tar zxvf gnupg-?.?.?.tar.gz




  El siguiente paso es cambiar al directorio que contenga el cdigo
  fuente, y ejecutar el guin de configuracin:



       $ ./configure




  Con este paso no debera suceder nada especial;  si ejecutamos




  $ ./configure --help




  se pueden ver las opciones de configuracin que existen para la
  compilacin.  Si durante la internacionalizacin (GET text) ocurriera
  algn problema, se puede incluir una versin que venga con cdigo
  fuente, usando la opcin



       --with-included-gettext




  o desactivarla usando la opcin



       --disable-NLS





  2.3.  Compilacin


  A continuacin, para empezar a compilar ejecutaremos la orden de
  compilacin:



       $ make




  Compilacin que deber finalizar sin problemas.  Si ocurriera algo
  anormal, se seguirn los siguientes pasos (en el mismo orden en el que
  se describen aqu): Primero, intentar solucionarlo por uno mismo
  (haciendo uso de la documentacin existente);  segundo, asegurarnos de
  que no es un error conocido (comprobar el fichero BUGS en
  http://www.gnupg.org.  Si estos pasos no resuelven el problema, enviar
  la pregunta a la lista de correo de GnuPG (en ingls) (ver ``Fuentes
  de Informacin'').  Por si el problema estuviera relacionado con la
  compilacin, se debera intentar make clean, ejecutar configure de
  nuevo, e intentar otra vez la compilacin.  Si nada de esto soluciona
  el problema, es el momento de preocuparse de verdad.


  2.4.  Instalacin


  Suponiendo que hayamos compilado el programa sin problemas, el
  siguiente paso es instalarlo.  Para ello ejecutaremos la orden de
  instalacin:



       $ make install



  que copiar el programa y las pginas de manual en el directorio de
  instalacin.  Si no hemos cambiado el directorio de instalacin cuando
  ejecutamos ./configure, ste ser /usr/local/share/gnupg/ por defecto.
  Es posible encontrar este directorio en el fichero options.skel.
  Cuando se cambie options.skel, si se copia a ~/.gnupg/options, se
  usarn los ajustes tpicos.  Al crear ~/.gnupg/ la accin copiar
  debera ser automtica.  Todas las opciones posibles estn bien
  documentadas, y tratar de explicarlas aqu no sera de utilidad.

  Se puede ejecutar GnuPG como suid root.  De este modo el programa se
  ejecutar con todos los permisos que tiene el superusuario, y se
  excluye la posibilidad de que ciertas partes del programa se guarden
  externamente y puedan ser ledas por cualquiera.  Sin entrar a valorar
  los riesgos de ejecutar el programa como superusuario, se debera
  alertar de los peligros que conllevara un troyano, ya que stos, si
  se est ejecutando como superusuario, pueden daar todo el sistema.
  Si por esta razn, o por cualquier otra, se decide no ejecutar GnuPG
  como root, es posible desactivar el aviso activando no-secmem-warning
  en ~/gnupg/options.


  3.  Uso y gestin de las claves



  3.1.  Generacin de una clave


  Con la orden



       $ gpg --gen-key




  se genera un nuevo par de claves (el par se compone de clave privada y
  clave pblica).  La primera pregunta es qu algoritmo se va a usar.
  Para ms informacin sobre algoritmos, ver la lista de respuestas a
  Preguntas de Uso Frecuente (PUF, FAQ en ingls) sobre PGP DH vs. RSA
  FAQ en http://www.hertreg.ac.uk/ss/pgpfaq.html o ``Applied
  Cryptography''.  El algoritmo recomendado por GnuPG es DSA/ElGamal, ya
  que ste no est patentado.

  La siguiente pregunta es la longitud de la clave.  Esta parte depende
  de los requerimientos del usuario.  Es necesario elegir entre la
  seguridad y el tiempo de los procesos.  Cuanto mayor sea una clave,
  menor ser el riesgo de que el mensaje sea descodificado si es
  interceptado, pero tambin aumentar el tiempo que emplear para el
  clculo de los procesos.  El tamao mnimo que requiere GnuPG es de
  768 bits, aunque mucha gente opina que debera ser de 2048 (que es el
  mximo con GnuPG en este momento).  Para DSA 1024 es un tamao fijo.
  Cuando la seguridad es una prioridad ms alta que el tiempo, la opcin
  es elegir el tamao de clave ms grande que se permita.

  El sistema nos pedir a continuacin que se introduzca el nombre,
  comentario y direccin de correo electrnico.  El cdigo se calcular
  en base a estas entradas.  Esto se puede cambiar ms tarde (ver
  ``Administracin de Claves'').  La direccin de correo electrnico que
  se escoja debera ser una vlida, ya que se usar para firmar el
  identificador de usuario.  Si esta direccin se modifica en algn
  modo, la firma no corresponder.  Finalmente, se puede introducir un
  comentario.


  El ltimo paso consiste en introducir una contrasea.  Ntese la
  diferencia entre los trminos anglosajones para la palabra
  contrasea: el trmino "password" indica una "palabra de paso",
  mientras que el trmino "passphrase" indica una "frase de paso".  Por
  tanto esta contrasea se debe componer de ms de una palabra.  Para
  que una contrasea sea efectiva (segura), deber cumplir los
  siguientes requisitos:


    que sea larga;

    que combine maysculas, minsculas y nmeros;

    que contenga caracteres especiales (no alfanumricos);

    que sea difcil de adivinar.  Por lo tanto, que no sean nombres,
     fechas significativas, nmeros de telfono, nmeros de documentos,
     ...

  En general, para una contrasea fuerte es aconsejable intercalar
  maYsCUlas con mInsCulas, nmeros, otros caracteres no alfanumricos,
  etc.  Al escoger las palabras y frases debemos evitar aquellas
  palabras demasiado obvias, o fechas significativas, y nunca usar citas
  de libros o frases famosas.  Dicho esto, debemos asegurarnos de que la
  contrasea que elijamos sea lo suficientemente difcil para que no
  pueda ser traspasada por un ataque de fuerza bruta, ni siquiera por
  un ataque de diccionario, pero lo suficientemente fcil como para
  que la recordemos.  Si olvidramos una contrasea nuestra clave
  quedara totalmente inutilizada, y los criptogramas con ella cifrados,
  indescifrables.  Ante esta posibilidad se recomienda crear siempre
  certificados de revocacin junto con las claves (ver ``Certificados de
  Revocacin'').

  Una vez se han introducido todos los datos requeridos, empieza el
  proceso de generacin de las claves, que tardar un tiempo dependiendo
  del tamao de stas.  Durante este proceso el programa recoge datos
  aleatorios que usar para generar las claves;  un modo para ayudar a
  generar estos datos es cambiando a una consola virtual diferente y
  usando el teclado mientras el proceso est en marcha.


  3.2.  Exportacin de claves


  La orden para exportar la clave es:



       $ gpg --export [UID]




  Si no designamos un identificador de usuario (UID) todas las claves
  presentes en el anillo de claves sern exportadas.  El resultado es
  enviado por defecto a stdout, pero con la opcin -o podemos
  especificar que sea enviado a un fichero.  Se recomienda usar la
  opcin -a para que el resultado sea un fichero de 7-bit ASCII en lugar
  de un fichero binario.

  Al exportar la clave pblica se ampla el abanico de personas con las
  que se podr comunicar de modo seguro.  La clave se puede exportar
  ponindola en una pgina web, mediante finger, ftp, hacindola
  accesible en un servidor de claves pblicas, o cualquier otro mtodo.


  3.3.  Importacin de claves


  Cuando se recibe la clave pblica de otra persona hay que aadirla a
  la base de datos (anillo de claves) para poder hacer uso de ella.  La
  orden para importarlas es la siguiente:



       $ gpg --import [fichero]




  Si se omite el nombre del fichero se leern los datos de stdin.  El
  fichero puede contener una sola clave o varias a la vez,
  pertenecientes a la misma o a diferentes personas.


  3.4.  Revocacin de claves


  Existen diversos motivos por los que se pueda querer revocar una
  clave.  Por ejemplo, si la clave secreta ha sido robada, o si se ha
  olvidado la contrasea de sta.  En cualquier caso la orden de
  revocacin es:



       $ gpg --gen-revoke




  Esto crear un Certificado de revocacin.  Para ello es necesaria la
  clave secreta, de lo contrario cualquiera podra hacer un certificado
  y revocar una clave que no le perteneciera.  En el caso anterior en el
  que la contrasea ha sido olvidada, se hace imposible generar un
  certificado de revocacin.  Por este motivo es muy aconsejable generar
  un certificado de revocacin a continuacin de la generacin de la
  clave.  Es primordial guardar este certificado en un lugar seguro para
  que nadie pueda usarlo y revocar la clave.


  3.5.  Administracin de claves


  Existe un fichero que es una suerte de base de datos, en el que se
  guardan todos los datos relacionados con las claves, incluidos los
  valores relativos al grado de confianza (Ownertrust);  para ms
  informacin sobre esto vase ``Firmar las claves''. Con la orden



       $ gpg --list-keys




  se muestran todas las claves existentes.  Para poder ver tambin las
  firmas en cada clave, utilice la orden:



       $ gpg --list-sigs

  (ver ``Firmar las claves'' para ms informacin).  Para ver las
  huellas digitales (fingerprints):



       $ gpg --fingerprint




  Las huellas digitales sirven para confirmar la identidad de la
  persona.  Esta orden nos muestra una lista alfanumrica que podemos
  comprobar, por ejemplo, por telfono, con la persona en cuestin.

  Para ver el listado de las claves secretas:



       $ gpg --list-secret-keys




  Nota: el listado de las huellas digitales y las firmas de las claves
  secretas no es de ninguna utilidad.

  Para eliminar una clave pblica:



       $ gpg --delete-key UID




  Para eliminar una clave secreta:



       $ gpg --delete-secret-key




  Existe otra orden que es relevante para trabajar con las claves:



       $ gpg --edit-key UID




  Para esta orden necesitaremos la contrasea, y podemos, entre otras
  cosas, editar la fecha de caducidad, aadir una huella digital y
  firmar la clave.



  3.6.  Firma de las claves


  Como se ha mencionado anteriormente en la introduccin, existe un
  taln de Aquiles en el sistema: la autentificacin de las claves
  pblicas.  Si se obtiene una clave pblica errnea, ya se puede
  despedir uno del valor del cifrado.  Para evitar estos riesgos est la
  posibilidad de firmar las claves.  Cuando tenemos la certeza de que
  una clave es vlida y pertenece a quien dice, podemos firmarla
  digitalmente, de modo que otros que confen en nuestra firma la puedan
  dar por vlida.

  Usando la orden



       $ gpg --edit-key UID




  para la clave que queremos firmar, nos llevar a la suborden



       Command> sign




  Slo se debe firmar una clave cuando se est ABSOLUTAMENTE SEGURO de
  que dicha clave es autntica!  En realidad, slo se puede estar
  totalmente seguro cuando la clave se ha recibido en mano, o por
  ejemplo si se ha recibido por correo y a continuacin se han
  comprobado las huellas digitales por correo.  Una clave no debe ser
  nunca firmada con base en una suposicin.

  Basndose en las firmas existentes en una clave y en el grado de
  confianza, GnuPG determina la validez de las claves.  El grado de
  confianza (Ownertrust) es un valor que el propietario de una clave usa
  para determinar el nivel de confianza para una cierta clave.  Estos
  valores son:


    1 = Don't know (No s, no conozco)

    2 = I do NOT trust (Confianza nula)

    3 = I trust marginally (Confianza marginal)

    4 = I trust fully (Confianza plena)

  Si el usuario no se fa de una firma puede indicarlo as, y rechazar
  la confianza en sta.  La informacin sobre la confianza no se guarda
  en el mismo fichero que el de las claves, sino en otro diferente.


  4.  Codificar y descodificar


  Despus de haber instalado y configurado todo tal y como queramos,
  podemos comenzar a cifrar y descifrar datos.

  Es posible que cuando estemos cifrando o descifrando un documento,
  tengamos ms de una clave privada en nuestro anillo de claves
  privadas.  Si esto es as, es necesario seleccionar una de ellas como
  activa.  Para ello se puede usar la opcin



       -u UID


  o bien la opcin



       --local-user UID




  Tambin podemos agregar la siguiente lnea en el fichero de
  configuracin $HOME/.gnupg/options:



       default-key UID




  Si se desea indicar el UID de un destinatario para cifrar un fichero
  con su clave, puede hacerse con la opcin



       -r




  o la opcin



       --recipient





  4.1.  Codificar


  La orden para cifrar es la siguiente:



       $ gpg -e [fichero]




  



       $ gpg --encrypt [fichero]




  Estas rdenes cifraran un fichero con la clave que hayamos definido
  por defecto en el fichero de configuracin options.  Para cifrar un
  fichero con la clave de otro usuario:



  $ gpg -er Destinatario [fichero]




  Pero como ya hemos comentado anteriormente esto producira un
  criptograma con el nombre de fichero.gpg;  se puede aadir la opcin



       --armor




  para que el criptograma sea del tipo 7-bit ASCII:



       $ gpg -a -er Destinatario [fichero]




  que producir un criptograma con la extensin fichero.asc.  Ya que los
  mensajes, ficheros, y otro tipo de datos que enviamos codificados van
  cifrdos con la clave del destinatario, existe el riesgo de que alguien
  lo haga suplantando nuestra identidad.  Para evitar esto basta con
  firmar digitalmente todo lo que se cifre (ver ``Firmas'').


  4.2.  Descodificar


  La orden para descifrar es:



       $ gpg [-d] [fichero]




  



       $ gpg [--decrypt] [fichero]




  En este caso no es necesario emplear [--decrypt], siendo opcional, ya
  que gpg usa por defecto



       --decrypt.




  En todos los casos que hemos nombrado aqu el resultado est
  direccionado a stdout, pero puede ser redireccionado con la opcin


       -o [fichero]




  a un fichero con cualquier otro nombre.


  5.  GnuPG + PGP


  Al ser PGP un programa ms antiguo que GnuPG, es normal que un nuevo
  usuario de GnuPG tenga ya instalado alguna versin de PGP en su
  sistema, y que desee mantener sus viejas claves despus de
  actualizarse a GnuPG.  Pues bien, no slo es posible importar el
  contenido de los anillos de claves sino que, alternativamente, es
  posible que GnuPG gestione los anillos de claves de PGP 2.6.3 y PGP
  5.0.

  Hay otros problemas de compatibilidad sobre los que tambin
  trataremos en este captulo, como son las firmas de tipo V4 generadas
  por GnuPG, o el uso por parte de PGP de los algoritmos propietarios
  RSA oIDEA.  Empezaremos por esto ltimo.


  5.1.  Uso de algoritmos no libres


  El uso de algoritmos con patentes restrictivas por parte de PGP
  representa un problema por cuanto la filosofa que inspira a GnuPG de
  implementar un sistema criptogrfico libre.  As pues, las patentes
  sobre estos algoritmos imposibilitan una implementacin total.  Pero
  GnuPG tambin pretende cumplir con las reglas de los estndares de
  OpenPGP http://www.d.shuttle.de/isil/gnupg/rfc2440.html.

  Existen extensiones para RSA, http://www.rsa.com e IDEA,
  http://www.ascom.ch que pueden ser instaladas y que permiten cierto
  uso de estos algoritmos.  Las claves generadas por PGP 2.6.x son del
  tipo RSA, y el algoritmo de cifrado que usa es IDEA (tambin puede ser
  usado por PGP 5.x).  Es posible conseguir el cdigo fuente de estos
  algoritmos en los ficheros
  ftp://ftp.guug.de/pub/gcrypt/contrib/rsa.c.Z e
  ftp://ftp.guug.de/pub/gcrypt/contrib/idea.c.Z.

  Tambin existen los binarios instalables de estas extensiones para
  algunas distribuciones de Linux, como Debian (comprobar para otras
  distribuciones).


  5.2.  Firma digital con GnuPG


  GnuPG es el nico sistema capaz de implementar firmas digitales V4 (de
  acuerdo con OpenPGP) y esta es la opcin por defecto, pero en este
  caso PGP no es capaz de verificarlas.  Es posible obligar a GnuPG a
  usar V3, de dos modos:


    Indicndolo en el fichero de configuracin $HOME/.gnupg/options
     aadiendo la lnea:



       force-v3-sigs


    Incluyendo esta opcin cada vez que se desee firmar un mensaje en
     V3:



       $ gpg [opcin] --force-v3-sigs [fichero]





  5.3.  Importacin de anillos de claves PGP a GnuPG


  Intentaremos explicar cmo exportar las claves pblicas y privadas
  desde nuestros anillos de claves PGP a los anillos de claves GnuPG.

  NOTA: este mtodo se ha extrado del PGP2GnuPG Howto,
  http://technocage.com/~caskey/gpg/pgp2gnupgp.html de Caskey L.
  Dickson y no lo he probado personalmente.  La ltima actualizacin del
  mismo data de Diciembre de 1998.  Por ello, y para poder integrar PGP
  con GnuPG, recomiendo el uso del mtodo que se explica en la
  ``siguiente seccin'' por ser ms sencillo y fiable.

  Suponiendo que tengamos instaladas las dos versiones de PGP para
  Unix/Linux, tenemos pues sus respectivos anillos de claves pblicas y
  privadas en $HOME/.pgp/:


    pubring.pgp -> fichero de claves pblicas de PGP 2.6.x

    secring.pgp -> fichero de claves privadas de PGP 2.6.x

    pubring.pkr -> fichero de claves pblicas de PGP  5.x

    secring.skr -> fichero de claves privadas de PGP  5.x

  A continuacin usaramos las rdenes que correspondan a cada versin
  para extraer la(s) clave(s) que deseemos.

  As, para extraer una clave de PGP 2.6.x:



       $ pgp -kx UID fichero anillo




  vg.:



       $ pgp -kx Pepe clavepepe2 ~/.pgp/pubring.pgp




  Esta operacin generara el fichero clavepepe2.pgp.  Para extraer
  nuestra clave privada, no tendramos ms que indicar nuestro UID y el
  fichero de las claves secretas ~/.pgp/secring.pgp.  No nos consta que
  haya modo alguno de indicar ms de un UID con PGP 2.6.3, si saben de
  alguno, por favor envenmelo a homega@ciberia.es.

  Una vez extrada la clave slo queda importarla al fichero de GnuPG:

       $ gpg --import clavepepe2




  Para extraer una clave de PGP 5.0:



       $ pgpk -x UID -o fichero




  vg.:



       $ pgpk -x Pepe -o clavepepe5




  En este caso, el fichero por defecto es el de las claves pblicas, y
  obtendramos el fichero clavepepe5 como hemos indicado.

  Una vez ms, slo queda importar la clave:



       $ gpg --import clavepepe5




  Ya que PGP 5.0 no nos permite indicarle el fichero sobre el que
  queremos operar, la extraccin de la clave secreta se complica un
  poco.  La solucin viene dada por un sistema superior como GnuPG:

  Este procedimiento pone en riesgo la clave secreta durante un breve
  periodo de tiempo, as que no debera ser usado en un sistema
  multiusuario o pblico.  Los pasos a seguir son:


    Extraer la clave pblica correspondiente a la clave privada que
     queremos exportar, e importarla a GnuPG.

    Borrar la contrasea de la clave secreta! (se recomienda hacer una
     copia de seguridad del fichero secring.skr):



       $ pgpk -e UID




  vg.:








  $ pgpk -e 0x614DB9FA

  sec  1024 0x614DB9FA 1998-03-22 ---------- DSS        Sign & Encrypt

  sub  1024 0x2B9E0571 1998-03-22 ---------- Diffie-Hellman

  uid  Horacio <homega@vlc.servicom.es>

  uid  Horacio <homega@correo.com>


  1024 bits, Key ID 0x614DB9FA, created 1998-03-22

  "Horacio <homega@vlc.servicom.es>

  "Horacio <homega@correo.com>"






       Do you want to unset this key as axiomatic [y/N]? N

       Do you want to unset this key as axiomatic [y/N]? N

       Do you want to add a new user ID [y/N]? N

       Do you want to change your pass phrase (y/N)? Y
       Need old passphrase. Enter pass phrase: <introducir contrasea>
       Need new passphrase. Enter pass phrase: <dejar vaco>
       Enter it a second time. Enter pass phrase: <dejar vaco>
       Changing master key passphrase...

       Changing subkey passphrase...

       Do want to set this as your default key [y/N]? N

       Keyrings updated.





    El paso siguiente ser exportar la clave privada.  Como ya hemos
     podido ver, PGP 5.0 es incapaz de hacerlo, as que usaremos GnuPG:



       $ gpg --export-secret-keys --secret-key-ring ~/.pgp/secring.skr 0x614DB9FA > miclave




  Todo esto en una una sola lnea; se crear el fichero miclave.


    Ahora ya podemos importar la clave secreta a GnuPG:



       $ gpg --import < miclave




  Acto seguido volveremos a introducir una contrasea a la clave desde
  GnuPG.


  5.4.  Uso de anillos de claves PGP con GnuPG


  Es posible evitar todo lo anterior, manteniendo instaladas las
  diferentes versiones de PGP al mismo tiempo que la de GnuPG.  Siendo
  GnuPG un sistema superior y ms reciente, puede reconocer los anillos
  de claves de PGP como propios.

  En el caso de PGP 5.0, basta con aadir el camino completo a los
  ficheros de claves de PGP 5.0, precedido por keyring o secret-keyring,
  al final del fichero ~/.gnupg/options segn corresponda:



       keyring ~/.pgp/pubring.pkr
       secret-keyring ~/.pgp/secring.skr




  Los ficheros de claves de PGP 2.6.3 son reconocidos por GnuPG por
  defecto.  Si no fuera as, bastara con repetir la misma operacin
  anterior adaptndola a las circunstancias:



       keyring ~/.pgp/pubring.pgp
       secret-keyring ~/.pgp/secring.pgp




  Si a continuacin hacemos un listado de las claves pblicas con GnuPG,
  observaremos que lee los tres ficheros, ~/.gnupg/pubring.gpg,
  ~/.pgp/pubring.pkr, y ~/pubring.pgp:



























  $ gpg --list-keys

       /home/usuario/.gnupg/pubring.gpg
       --------------------------------
       pub 1024D/57548DCD 1998-07-07 Werner Koch (gnupg sig)
       <dd9jn@gnu.org>
       pub 1024D/A95AF46C 1998-11-29 Brenno J.S.A.A.F. de Winter
       <brenno@dewinter.com>
       sub 3072g/A3CA62A0 1998-11-29

     (... y dems claves pblicas DSA/ElGamal...)

       /home/usuario/.pgp/pubring.pkr
       ------------------------------
       pub 1024D/FAEBD5FC 1997-04-07 Philip R. Zimmermann <prz@pgp.com>
       sub 2048g/42F0A0A0 1997-04-07

     (... etc DSS/Diffie-Helman...)

       /home/usuario/.pgp/pubring.pgp
       ------------------------------
       pub 1024R/88A17FF5 1995-09-11 IRIS-CERT, Spain

     (... etc RSA...)




  Lo mismo sucedera con las claves privadas:



       $ gpg --list-secret-keys

            /home/horacio/.gnupg/secring.gpg
            --------------------------------
            sec 1024D/42337AE6 1999-03-14 Horacio (comentario)
            <homega@vlc.servicom.es>
            ssb 2048g/1F177864 1999-03-14

            /home/horacio/.pgp/secring.skr
            ------------------------------
            sec 1024D/7992AB40 1998-05-04 Horacio <homega@vlc.servicom.es>
            uid Horacio <homega@correo.com>
            ssb 2048g/917366AE 1998-05-04

            /home/horacio/.pgp/secring.pgp
            ------------------------------
            sec 1024R/32D4A925 1997-09-23 Horacio <homega@vlc.servicom.es>





  6.  Firmar y Verificar


  Firmar y verificar firmas es una parte importante de los sistemas de
  criptografa de clave pblica.  El usuario puede firmar una serie de
  datos o un documento de varias maneras, para lo que usa su propia
  clave privada.  Para verificar las firmas de otros usuarios, es
  necesario poseer previamente las claves pblicas de stos.




  6.1.  Firmar


  Para firmar un fichero con la clave propia se usa la orden



       $ gpg -s [fichero]




  



       $ gpg --sign [fichero]




  Esta orden, adems de producir una firma digital, tambin comprime el
  fichero, por lo que el resultado es un fichero de tipo binario (y por
  tanto ilegible).  Para producir un fichero firmado legible (ascii), se
  usa la orden



       $ gpg --clearsign [fichero]




  De este modo, tanto la firma como los datos firmados, son legibles con
  un editor.

  Cuando queramos que la firma aparezca en un fichero separado, sobre
  todo cuando se trata de firmar un fichero binario, como por ejemplo un
  archivo comprimido, o un ejecutable, usaremos la orden



       $ gpg -b [fichero]




  



       $ gpg --detach-sign [fichero]




  Este es el modo que MIME/PGP usa para firmar los mensajes del correo
  electrnico.  Este modo es muy til cuando tengamos que firmar un
  binario, por ejemplo, para distribuirlo, ya que la firma se basa en el
  binario pero va en un fichero aparte.  La opcin --armor tambin puede
  ser de utilidad en estos casos.

  A menudo debemos cifrar y firmar un fichero a un tiempo. La orden que
  usaramos en este caso sera


       $ gpg [-u Remitente] [-r Destinatario] [--armor] --sign --encrypt [fichero]




  La funcionalidad de las opciones -u (--local-user) y -r (--recipient)
  es la que se ha descrito ya anteriormente.


  6.2.  Verificar


  Al descifrar un criptograma que tambin haya sido firmado
  digitalmente, la firma se verifica automticamente.  En todo caso es
  posible verificar la firma simplemente con la orden



       $ gpg [--verify] [fichero]





  7.  Fuentes de Informacin



  7.1.  GnuPG



    Pgina principal de GnuPG: http://www.gnupg.org/ (en ingls)

    Archivos de la lista de correo de GnuPG
     http://www.gnupg.org/docs.html (en ingls)

    La informacin contenida en el paquete de instalacin o de fuentes,
     sobre todo:



       $ gpg --help





  7.2.  PGP


  PGP es el programa de criptografa ms antiguo y, de momento, ms
  extendido.  Se ha escrito mucha documentacin en torno a PGP.  Mucha
  de esta informacin se puede usar para entender mejor el
  funcionamiento de GnuPG.


    La pgina internacional de PGP, http://www.pgpi.com/.  Desde aqu
     es posible acceder a mucha informacin sobre PGP en varias lenguas
     (aunque principalmente en ingls).

    PGP DH vs. RSA FAQ, http://www.hertreg.ac.uk/ss/pgpfaq.html.
     Preguntas y respuestas sobre las diferencias entre los algoritmos
     "Diffie-Hellman" y "RSA".


  7.3.  Recursos en castellano


  Existen multitud de recursos en la red para hispanohablantes.  Aqu
  nombraremos un par de ellos desde los que podremos acceder a muchos
  otros:


    Pgina del boletn electrnico sobre seguridad Kriptpolis:
     http://www.kriptopolis.com.

    Pginas sobre PGP de RedIris: http://www.rediris.es/pgp/


  7.4.  Servidores de claves



    Keyserver Net, Keyserver Net

    http://wwwkeys.eu.pgp.net/

    Servidor de RedIris: http://www.rediris.es/cert/keyserver/


  7.5.  Libros



    B. Schneier, ``Applied Cryptography, Second Edition'', Wiley, 1996
     Deutsche Ausgabe unter dem Titel ``Angewandte Kryptographie'',
     Addison-Wesley, 1996


  8.  Sobre este Documento


  Copyright  1999 J.H. M.G. (versin en castellano)
  Copyright  1999 Brenno J.S.A.A.F. de Winter (versin en ingls)
  Copyright  1999 Michael Fischer v. Mollard (versin original en
  alemn)

  Este documento es documentacin libre y puede ser redistribuido o
  modificado bajo los trminos de la Licencia Pblica GNU, segn
  publicada por la Free Software Foundation en su versin 2 (u otra
  posterior).

  Este documento se distribuye esperando que pueda ser til, pero SIN
  NINGUNA GARANTA.  Ver la GNU Library General Public License,
  (http://www.gnu.org/copyleft/gpl.html), o una traduccin de sta al
  castellano en http://visar.csustan.edu/~carlos/gpl-es.html, para
  obtener ms detalles.

  Debera haber recibido una copia de la GNU Library General Public
  License con la distribucin del programa;  si no es as, puede
  recibirla escribiendo a:



       Free Software Foundation, Inc.
       59 Temple Place - Suite 330
       Boston, MA 02111-1307
       USA



  8.1.  Versiones


  Versin original en alemn: La versin 0.1 fue la primera versin en
  alemn.

  Todos los cambios para la versin original, en alemn, estn
  documentados en un fichero diff: http://www.stud.uni-
  goettingen.de/~s070674/GnuPGMiniHowto/


    English version 0.1.0, del 30 de Mayo de 1999. Esta versin es una
     traduccin de la versin alemana al ingls, con algunos cambios.

    Deutsche Version 0.1.1

    Nueva seccin Lmites en seguridad

    Mejorada la explicacin sobre firmas

    Varios cambios sugeridos por Werner Koch (gracias!)


    Versin 0.1.2, del 29 de Mayo de 1999 (Anno 2752 ad Urbe condita).
     Esta versin en castellano es una traduccin de la versin inglesa,
     y se han realizado algunos cambios. Se ha aadido el captulo 5
     sobre compatibilidad e interoperabilidad de GnuPG con PGP.

    Versin 0.1.3, del 28 de Septiembre de 1999. Reescrito a cdigo
     SGML (LinuxDoc) desde el cdigo HTML.  Correccin de algunos
     errores en castellano.

  Notas para la versin espaola:  Cualquier comentario o correccin al
  documento que ayude a mejorarlo es bienvenido.  Por favor, enve
  cualquier sugerencia a homega@ciberia.es.

  Notas para la versin inglesa:  All remarks for this document can be
  send to Brenno J.S.A.A.F. de Winter brenno@dewinter.com. Comments help
  us make a better document and are greatly appreciated.

  Notas para la versin alemana:  Anregungen, Kritik, Verbesserungen und
  Erweiterungen einfach an Michael Fischer v. Mollard fischer@math.uni-
  goettingen.de senden, damit dieses Dokument weiter verbessert werden
  kann.


  9.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En ella encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.
  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.






















































  Gravis ULTRASOUND Plug n' Play Mini-Como
  J. F. Mammet, mammet@diva.univ-mlv.fr
  Traducido por Iaki Martnez Dez, imd@redestb.es
  Versin 0.01, 27 de Marzo de 1996

  Particularidades de configuracin de la Gravis ULTRASOUND Plug n' Play
  bajo Linux.

  1.  Introduccin

  Como fan de las tarjetas de sonido Gravis desde hace mucho tiempo, me
  alegr mucho cuando finalmente Gravis sac algo nuevo. Haba planeado
  comprar la nueva Ultrasound desde haca tiempo, y la compr con un
  mega de RAM tan pronto estuvo disponible aqu en Francia.

  La instal, y qu sorpresa, mi BIOS plug and play la detect, e
  incluso windows95 (lo siento, bromas estpidas sobre marketing95 hoy
  no). As que pens que la tarjeta funcionara en cualquier sitio ...

  Entonces arranqu Linux, no tuve problemas, la tarjeta fue detectada
  como una GUS rev 3.4, lo cual me pareci estar bien, pero no lo estaba
  ...

  Algn tiempo despus prob Quake, y no sonaba. Entonces le el manual
  del juego, y v que Quake estaba usando algn DMA no estndar que la
  GUS no poda proporcionar ...

  Pens que no era bueno para mi, tener tan buena tarjeta y no tener
  sonido en tan genial juego (la versin dos necesita la emulacin de
  sound blaster, y yo incluso prefiero sin sonido que eso).

  As que, Ahora qu? debera esperar hasta Mayo para un driver de GUS
  PnP?  Debera comprar una sound blaster (buag)? Que ocurrir en el
  prximo episodio de Expediente X?

  2.  GUS MAX?

  Entonces volv al dos, y jugu un poco con el programa iwinit, mir lo
  que el programa deca cuando usaba el modo verbose y vi algo como
  CODEC direccin 32c ...

  Qu? La GUS PnP tiene un Codec CS4231/CS1848 como la GUS MAX?

  Entonces mir en mis cintas de backup buscando los drivers de Gravis
  viejos, tom el ultrinit 2.31 de ellos y tecle:

       set ultrasnd=220,6,5,5,5
       set ultra16=32c,0,0,1,0
       set ultradir=c:\ultrapnp
       ultrinit

  y descubr que:  Ultrasound MAX detectada !!!

  Genial!, pens entonces, slo tengo que poner esto antes de cargar
  Linux y tendr soporte GUS MAX, y finalmente conseguir que el
  j****o Quake funcione con sonido!!

  No fue tan fcil 8(

  3.  Investigacin del Driver

  No soy un buen programador, pero se suficiente C para observar los
  fuentes de un driver y ver qu pasa (especialmente cuando est bien
  comentado).

  Mir el fichero gus_card.c, pero no encontr nada interesante.
  Entonces mir en gus_wave.c, y v esto:

         * Value 255 means pre-3.7 which don't have mixer.
         * Values 5 thru 9 mean v3.7 which has a ICS2101 mixer.
         * 10 and above is GUS MAX which has the CS4231 codec/mixer.

  que significa:

         * el Valor 255 se refiere a pre-3.7 la cual no tiene mixer.
         * los Valores 5 a 9 se refiere a v3.7 los cuales tienen un mixer ICS2101.
         * 10 y superior es GUS MAX la cual tiene el codec/mixer CS4231.

  Genial!, solo tengo que forzar el valor a 10, y funcionar ...  No!

  haciendo esto hara que el kernel pensase que se tiene una GUS MAX,
  pero no reconocer el chip Codec!

  Por lo que tena que forzar la deteccin del Codec tambin ...

  No fue tan fcil encontrar qu hacer, pero finalmente descubr una
  posisbilidad: En el fichero  gus_wave.c, haba una lnea:

       if (ad1848_detect (gus_base + 0x10c, NULL, hw_config->osp))

  lo que significaba que el kernel estaba intentando auto-detectar el
  chip AD1848, pens que no lo podra detectar con la GUS PnP, y estaba
  en lo cierto! Simplemente cambi la lnea a:

       if (!(ad1848_detect (gus_base + 0x10c, NULL, hw_config->osp)))

  recompil el kernel, y hey, Quake funcion de maravilla!!!

  Por cierto hay una etiqueta gus_pnp_flag en gus_card.c, pero no he
  notado ninguna diferencia con ella activada o desactivada 8( (quizs
  hice algo mal)
  4.  Qu debera hacer exactamente?

  No olvidar que esto no funcionara si no hay RAM en la GUS ...

  Primero de todo no usar LILO nunca ms, ya que es necesario
  inicializar la GUS PnP antes de ejecutar Linux ... (hacer un fdisk
  /mbr bajo dos, ver otros COMOs para ms detalles en esto).

  En el autoexec.bat, poner:

       set interwave=c:\ultrapnp\iw.ini
       c:\ultrapnp\iwinit
       set ultrasnd=220,6,5,5,5 (o cualquiera que se quiera o necesite)
       set ultra16=32c,0,0,1,0
       set ultradir=c:\ultrapnp
       c:\ultrapnp\ultrinit

  Se puede encontrar ultrinit en el fichero gus00045.zip, en cualquier
  site de Gravis ...

  Bajo Linux, abrir el fichero gus_wave.c, en
  /usr/src/linux/drivers/sound (o en cualquier otro sitio).  Buscar la
  lnea:

       if (val == 255 || val < 5) (line 3049 in 3.5b7)

  y una lnea antes, aadir:

       val=10;

  Entonces buscar la lnea:

       if (ad1848_detect (gus_base + 0x10c, NULL, hw_config->osp)) (line 3085)

  y cambiarla a:

       if (!(ad1848_detect (gus_base + 0x10c, NULL, hw_config->osp)))

  recompilar el kernel con soporte de GUS y GUS MAX.
  Mi configuracin es:

       BASE = 220
       IRQ = 5
       DMA1 = 6
       DMA2 = 5
       DMABUF = 65536

  Disfruta del sonido!!!

  5.  Crditos

  Yo us el kernel 1.3.75 para modificar, pero debera funcionar en
  cualquier 1.3.70 y superior (por favor escribirme si hay algn
  problema)

  Este mini-COMO esta escrito por:

    e-mail : mammet@diva.univ-mlv.fr

    www    : http://diva.univ-mlv.fr/~mammet/

  Se puede conseguir la ltima versin de este documento de mi pgina
  WEB en
  http://diva.univ-mlv.fr/~mammet/linux.html (pronto disponible)

  No asumo ninguna responsabilidad si se pierden informaciones o
  cualquier error que pudiese ocurrir (incluso fastidiar win95).

  Si se encuentra algn error tipogrfico (o incluso errores tcnicos
  8-p), escribirme libremente, soy slo un pobre francs perdido en un
  mundo anglosajn, intentando hablar el idioma de forma comprensible.

  6.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Instalacin de Oracle 8.0.5 para Linux
  Autor: Luis M . Cruz, lcruzva@clientes.unicaja.es y Angel
  Carrasco karrasko@arrakis.es
  v1.0, 14 de Julio de 1.999

  Existen programas cuya instalacin es difcil, existen programas cuya
  configuracin es difcil, existen programas cuyo manejo es difcil y
  existen programas cuya instalacin, configuracin y manejo es difcil,
  por ejemplo: ORACLE.  Este Mini-Como tiene una intencin especial:
  ayudar al usuario realizar por s mismo una instalacin de Oracle.
  ______________________________________________________________________

  ndice general


  1. Introduccin

  2. Copyright

  3. Preinstalacin

     3.1 Requerimientos tcnicos.
     3.2 Configuracin del Kernel
     3.3 Crear el usuario y el grupo DBA
        3.3.1 Primer mtodo
        3.3.2 Segundo mtodo
     3.4 Puntos de montaje
     3.5 Definicin de las variables de entorno

  4. Instalacin

     4.1 Montaje del CD-ROM
     4.2 Crear el fichero
     4.3 Ejecucin de
        4.3.1 Problemas que encontramos en
           4.3.1.1 Oracle Intelligent Agent (problema de enlazamiento de libreras)
           4.3.1.2 Instalacin de la documentacin

  5. Postinstalacin

  6. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Introduccin


  Desde el principio, siempre ha habido programas que han sido ms
  complicados en algn sentido que otro y como en todo siempre hay
  exageraciones. Oracle es una de las base de datos relacionales ms
  importantes del mundo pero a su vez es el programa que necesita unas
  condiciones preinstalatorias bastante rebuscadas y aadindose a este
  particular, algn fallo que recoge el script de instalacin hace que
  sea uno de los programas ms complicados de los que nos hayamos
  encontrado.

  Hemos intentado desde un principio explicarlo de una forma clara pero
  si desea hacer un comentario o alguna pregunta por favor no dude en
  hacerla.  Quejas, reclamaciones y todas esas cosillas van a ir a
  /dev/null.




  2.  Copyright


  Este documento es Copyright (C) 1999 de Luis M. Cruz y Angel Carrasco
  y es OpenContent (Contenido Abierto). Usted puede redistribuirlo y/o
  modificarlo bajo los trminos de la Licencia OpenContent (OPL) versin
  1.0, tal y como fue publicada por la OpenContent Organization. Este
  documento se distribuye con la esperanza de que sea til, pero SIN
  NINGUNA GARANTA; sin ni siquiera la garanta implcita de
  COMERCIABILIDAD o CONVENIENCIA PARA UN PROPOSITO PARTICULAR. Vea la
  Licencia OpenContent para ms detalles. Existe una versin disponible
  en http://www.opencontent.org/opl.shtml.

  El copyright no es para restringir los derechos a nadie, es para
  garantizar que todo el mundo pueda usarlo y que de paso no me intenten
  colgar algn muerto si a alguien le falla algo al intentar hacer lo
  que aqu indico. Como se suele decir en estos casos, a mi me funciona
  y su caso puede variar.


  3.  Preinstalacin


  Esta es la parte principal para que funcione todo. Aqu crear todos
  los pilares para que pueda usted instalar Oracle.


  3.1.  Requerimientos tcnicos.


  En el apartado hardware:


    32 MB de RAM, en caso de que haga cargas elevadas se requerir
     incluso 128 MB

    SWAP, aproximadamente el triple de la memoria RAM instalada

    400 MB de disco duro para la instalacin

    Al menos unas 150 MB de disco duro por defecto por cada base de
     datos Oracle crear alguna base de datos por defecto

  En el apartado software:


    Al menos el Kernel 2.0.34

    GLIBC 2.0.7, incluida en Red Hat 5.2 y superiores o Debian 2.0

    JDBC JDK 1.0.2  1.1.1

    ProC/C++ gcc 2.7.2.3 o superior

    Tcl8.0


  3.2.  Configuracin del Kernel


  Debe editar dos ficheros para configurar los parmetros referentes a
  la memoria compartida y a las seales. No es imprescindible pero si
  conveniente para poder tener un buen entorno de trabajo que soporte
  cargas elevadas.  El primero sera /usr/src/linux/include/asm-
  i386/shmparam.h Ajustaremos:

    SHMMAX  ->      0xFFFFFFFF

    SHMMIN  ->      1

    SHMMNI  ->      100

    SHMSEG  ->      10

  El segundo sera /usr/src/linux/include/linux/sem.h


    SEMMNS  ->      200

    SEMMNI  ->      70

  Acto seguido recompilar el Kernel del nuevo.


  3.3.  Crear el usuario y el grupo DBA


  El objetivo es crear un usuario, aqu llamado oracle, que actuar de
  administrador de la Base de datos dentro del grupo de usuarios DBA
  (Database Administrator).

  Para ello tiene dos mtodos.


  3.3.1.  Primer mtodo




       [root@root]# groupadd dba
       [root@root]# useradd oracle -g dba
       [root@root]# passwd oracle





  3.3.2.  Segundo mtodo


  Cree el usuario de esta forma.



       [root@root]# adduser oracle




  Edite el fichero /etc/group. En la lnea que lea:



       oracle:x:[numero]:




  Reescrbala as:



  dba:x:[numero]:oracle





  3.4.  Puntos de montaje


  Cree una serie de subdirectorios. El primero ser para la propia
  instalacin de Oracle (/usr/oracle) y los tres siguientes para la
  instalacin de las bases de datos (/u01, /u02 y /u03). Lo recomendable
  es que estos subdirectorios puedan ser particiones diferentes para
  aprovechar mejores ventajas tanto a seguridad, etc.  Aproveche la
  ocasin para crear un subdirectorio local para almacenar algunos
  scripts.



       [root@root]# mkdir /usr/oracle
       [root@root]# mkdir /u01
       [root@root]# mkdir /u02
       [root@root]# mkdir /u03
       [root@root]# mkdir /usr/local/bin




  Despus de crearlo, le har pertenecientes al usuario oracle y del
  grupo dba.



       [root@root]# chown -R oracle:dba /usr/oracle
       [root@root]# chown -R oracle:dba /u01
       [root@root]# chown -R oracle:dba /u02
       [root@root]# chown -R oracle:dba /u03





  3.5.  Definicin de las variables de entorno


  Para empezar asigne una mscara al usuario oracle para asegurarse que
  los usuarios de grupo y el resto slo tienen permiso de lectura y
  ejecucin, pero no de escritura.



       [root@root]# umask 022 oracle




  Aada las dems variables de entorno al fichero profile. Depende un
  poco si estamos usando bash y otros factores deber editar
  /etc/profile,/home/oracle/.profile o /home/oracle/.bash_profile.







  export ORACLE_BASE=/usr/oracle/app/oracle
  export ORACLE_HOME=$ORACLE_BASE/product/8.0.5
  export ORACLE_SID=ora8
  export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
  export PATH=$PATH:$ORACLE_HOME/bin
  export ORACLE_OWNER=oracle
  export LD_LIBRARY_PATH=$ORACLE_HOME/lib
  export ORACLE_TERM=vt220
  export TMPDIR=/var/tmp





  4.  Instalacin


  Proceder a la instalacin de Oracle 8.0.5. Para lo cual debe seguir
  los pasos siguientes:


  4.1.  Montaje del CD-ROM


  Ante todo, asegrese que el subdirectorio de montaje tenga todos los
  permisos de la siguiente forma:



       [root@root]# chmod 777 /cdrom




  Ahora mntelo:



       [root@root]# mount -t iso9660 /dev/cdrom /cdrom




  Pero se dan casos de que debido a la distribucin no pueda ejecutar
  correctamente los programas, para lo cual, recomendamos:



       [root@root]# mount /dev/cdrom /cdrom -o exec -t iso9660





  4.2.  Crear el fichero oratab


  Ahora se complican un poco las cosas. Este fichero es imprescindible;
  debe tener en cuenta que usar el shell sh y que lo buscar en
  /usr/bin/sh. Por ejemplo, los que usen Debian debern hacer lo
  siguiente:



       [root@root]# ln -s /bin/sh /usr/bin/sh

  Con esto se salvar el primer problema pero resulta que, oratab.sh
  emplea una variable GROUPS que en el entorno Bash se considera de slo
  lectura y no modificable. La solucin que nos queda es instalar otro
  shell como por ejemplo ash.  Entoces se ejecutara de la siguiente
  forma:



       cd /cdrom/orainst
       [root@root]# ash oratab.sh




  Luego edite el fichero y escriba en la parte final.



       [root@root]# joe /etc/oratab
       ORACLE_SID:ORACLE_HOME:Y




  Hay otra alternativa a esto y sera crear el fichero y aadir esta
  lnea. Es preferible seguir siempre la linea ms cercana al
  fabricante.


  4.3.  Ejecucin de orainst


  Ahora slo queda ejecutar orainst para poder instalar el programa. Ya
  est preparado para casi todo lo que nos va a surgir en la
  instalacin.  Debemos hacerlo como usuario oracle:



       [root@root]# su oracle
       [oracle@root]$ cd /cdrom/orainst
       [oracle@root]$ ./orainst





  4.3.1.  Problemas que encontramos en orainst


  Como todo en nuestras vidas tiene fallos. He aqui los dos ms graves:


  4.3.1.1.  Oracle Intelligent Agent (problema de enlazamiento de
  libreras)


  Todava no s porqu Oracle tiene fijacin con ciertas librerias a las
  cuales les asigna el nombre que quiere y no el que debera. Por lo
  tanto, tendremos problemas como ste: se busca tcl.so, cuando en
  realidad la librera se llama tcl8.0.so). La solucin es hacer un
  enlace simblico de la libreria tcl8.0 que tengamos instalada.



       [root@root]# ln -s /usr/lib/tcl8.0.so /usr/lib/tcl.so

  4.3.1.2.  Instalacin de la documentacin


  El problema surge porque a nuestro amigo orainst se le olvida crear el
  subdirectorio final. Haremos lo siguiente.



       [root@root]# cd /usr/oracle/app/oracle/product/8.0.5/doc
       [root@root]# mkdir -p server.805/install
       [root@root]# find | xargs chown oracle:dba





  5.  Postinstalacin


  Por ltimo, y ya como root, vamos a ejecutar root.sh



       [root@root]# cd /usr/oracle/app/oracle/product/8.0.5/orainst
       [root@root]# ./root.sh




  Ahora  dira que ORACLE_HOME no es vlido, simplemente limitese a decir
  que si a todo y habra finalizado la instalacin.  Este es el ltimo
  fallo. A partir de aqui todo deber funcionar como un reloj.


  6.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En ella encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.

































































  ircII Como
  Edith de la Torre, neptuno@vlc.servicom.es
  3 de Febrero de 1997

  Voy a escribir aqu todas mis penurias con el ircII. Primero sern un
  desastre, pero ya ir arreglndolas poco a poco.  Todos tenemos prob
  lemillas con este irc modo texto que en el fondo nos encanta.. pero no
  encontramos info en castellano.  Pues a ver si sale algo de aqu...
  ______________________________________________________________________

  ndice General:

  1.      Qu es ircII?

  2.      Cmo instalarlo.

  3.      Primeros pasos.

  4.      Teclado.

  5.      Alias y otras acciones.

  6.      Mens.

  7.      Despedida

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Qu es ircII?

  Es el mejor, y creo que nico, programa de chat modo-texto para Linux.
  Tiene muchas buenas caractersticas y un slo defecto para los amantes
  del modo grfico: que no hay ventanitas.

  Pero por lo dems, se le puede sacar mucho partido.

  2.  Cmo instalarlo.

  La ltima versin que hay actualmente creo que es la 2.8. o al menos,
  es la ltima que yo he visto y la que tengo instalada y en la cual las
  cosas que aqu relatar funcionan.

  Para instalarlo, como siempre, descomprimimos el fichero que se
  llamar ircii-2.8 o algo por el estilo :-))

  Hay un fichero que se llama easyinst, que si lo ejecutamos nos crea el
  fichero de configuracin. A partir de aqu, solo queda teclear tenemos
  el irc instalado as que solo falta ejecutarlo.

  3.  Primeros pasos.

  Una vez instalado, tecleamos 'irc' y en principio se pondr en marcha,
  eso s, deberemos estar conectados a internet para que pueda conectar
  con algn servidor...

  Al ejecutar el easyinst nos ha pedido el servidor por defecto, que es
  al que tratar de conectar siempre. Pero podremos conectar a otro
  servidor tecleando:

               /SERVER nombre.del.servidor.a.conectar

  Una vez estamos dentro de un servidor, debemos entrar en algn canal.
  Podemos listar los canales que existen mediante el comando:

               /LIST

  aunque esto puede hacer que el servidor nos desconecte, o que tarde
  mucho tiempo. Por eso lo ms interesante es que sepamos los canales a
  los que queremos entrar, por ejemplo #Linux, Unix, #Espaa,
  #Valencia...

  Casi siempre encontraremos un canal del tema que nos guste porque hay
  uno o dos millones de canales en marcha, ms o menos.

  Cuando sepamos ya el canal al que queremos entrar, teclearemos:

               /JOIN #Canal

  donde Canal es el nombre del canal al que queremos acceder, por
  ejemplo:

               /JOIN #Linux

  Aunque algunos piensen lo contrario (suelen ser los menos doctos en el
  tema), el ircII nos permite estar en ms de un canal a la vez.  Si
  estamos dentro de uno ya, para entrar en otro teclearemos:

               /WINDOW CHANNEL #Canal

  Lo que nos permite cada vez movernos entre los canales que tengamos
  abiertos o entrar en nuevos canales.

  Luego, para poder mandar mensajes a un canal en el que estemos pero
  que no sea el canal activo, teclearemos:

               /MSG #Canal Texto a enviar

  Aunque tenemos otra opcin mas divertida, que es la de tener dos o mas
  ventanitas, con lo que sera menos lioso el tema de hablar en varios
  canales.  Por lo pronto, para hacer una ventana nueva teclearemos:

               /WINDOW new

  y para meter un canal en ella, como siempre, con el /JOIN #Canal.  Si
  lo que queremos es cerrar una ventana:

               /WINDOW kill

  cerrar la ventana activa en ese momento.

  Luego, para movernos entre ventanas usaremos la combinacin de teclas:

    Ctrl-x p        ventana anterior

    Ctrl-x n        ventana siguiente

  Si lo que queremos es hablar con alguien, est o no en el canal, pero
  de manera privada, tenemos varias opciones:

               /MSG Nick Texto

  Esto mandar el mensaje del texto al nick indicado

               /QUERY Nick

  Abre un query con esa persona. Para cerrarlo pondremos de nuevo

               /QUERY

  Para hacer un chat directo:

               /DCC CHAT Nick

  y para hablarle a la persona con quien hemos iniciado el chat:

               /MSG =Nick

  o tambin

               /DMSG Nick

  Cuando queramos cerrar el chat:

               /DCC CLOSE CHAT Nick

  Si queremos enviarle un fichero a alguien, pondremos:

               /DCC SEND Nick fichero.con.su.ruta.y.todo

  Pero si es alguien quien nos lo manda a nosotros, entonces lo que
  pondremos ser:

               /DCC GET Nick

  Y aquello que nos est enviando dicha persona, lo recibiremos en el
  directorio activo.

  Podemos tambin, por ejemplo, guardar los logs de las sesiones :

               /SET LOGFILE fichero.guarda.logs
               /SET LOG ON

  o de las ventanas que deseemos

               /WINDOW LOGFILE fichero.guarda.logs
               /WINDOW LOG ON

  Estos son algunos de los comandos bsicos del irc, no particulares del
  ircII, con lo que cualquier manual de IRC seguro que es mucho ms
  completo en este campo. Slo he intentado poner los que ms se
  utilizan.

  4.  Teclado.

    Subir por la pantalla: alt + p

    Bajar por ella:        alt + n

    colorines:

    Ctrl-g                color rojo suave

    Ctrl-o

    Ctrl-w

    Ctrl-b                bold

    Ctrl-_                subrayado

    Ctrl_v                inversa

    Ctrl-backspace        azul subrayado

    Para cambiar ventanas

    Ctrl-x p        ventana siguiente

    Ctrl-x n        ventana anterior

    Ctrl-x 1  a  Ctrl-x 0  abre de 1 a diez ventanas

    Ctrl-x c        crea una nueva ventana

    Ctrl-x a        va a la ultima ventana

    Ctrl-x k        cierra la ventana activa

  5.  Alias y otras acciones.

  A menudo es recomendable hacerse unos cuantos alias, que sirven para
  agilizar el paseo por el ircII.

  Por ejemplo:

               /ALIAS l MSG #Linux $

  Este es un alias que yo utilizo a menudo. As, solo tengo que teclear
  en mi pantalla

               /l Texto

  y me encuentre en el canal que me encuentre, enva el texto al canal
  #Linux, y es ms cmodo que teclear cada vez /WINDOW CHANNEL #Linux.

  6.  Mens.

  Primero de nada tendremos que crear un men si queremos usarlo.  Por
  ejemplo, vamos a crear un fichero que se llame Mi_Menu.

  Veamos lo que debe contener este fichero:

       ______________________________________________________________________
       # Fichero Mi_Menu
       # Este es un ejemplillo, por supuesto ampliable

       MENU Mi Menu
               OPTION "Listar Canales" COMMAND LIST
               OPTION "Entrar en un canal" COMMAND JOIN $"Canal: "
               OPTION "Abandonar un canal" COMMAND PART *
               OPTION "Mensaje secreto" COMMAND MSG  $"Mensaje para: " $"Texto: "
               OPTION "Canal" COMMAND MSG #$"Canal: " $"Texto: "
               OPTION "Salir del Menu" COMMAND EXIT
       ______________________________________________________________________

  Hasta aqu es un ejemplo que se puede ampliar todo lo que se quiera
  con un montn de opciones ms de men.  Tengo que decir que a m el
  ircII slo me ha permitido incluir seis OPTION.  Si trato de incluir
  ms, al cargarlo me da un error 'Core Dumped'.  No s si el problema
  es mo o de la versin que tengo de ircII o de qu es.  Si a t te
  funciona con ms de seis, enhorabuena :-)

  Una vez hemos hecho este fichero, habr que cargar el men.  Ahora lo
  cargaremos:

  primero teclearemos

               LOAD Mi_Menu

  para cargarlo, y luego

               SET menu Mi Menu

  A partir de aqu, con la combinacin de teclas Ctrl+R nos aparecer el
  men. Podremos movernos entre las opciones, por ejemplo, con las
  teclas l y k.
  Para seleccionar una opcin, bastara con pulsar la tecla '.' o la
  barra espaciadora.

  Podremos tener submens dentro del men principal, aadiendo la lnea:

               OPTION "Sub Menu" COMMAND set menu Sub Menu

  7.  Despedida

  Esto es todo por ahora ......................

  Si encuentras un fallo o tienes alguna sugerencia, ya sabes, un mail a
  la autora.

  Edith de la Torre

  http://www.geocities.com/Athens/Acropolis/1211/

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Unidad JAZ: mini-COMO
  Bob Willmot, bwillmot@cnct.com
  Traductor: Iaki Martnez Dez, imd@redestb.es
  v1.3, 05 Agosto de 1996

  Este COMO cubre la configuracin y uso de la unidad extrable Iomega
  JAZ bajo Linux y las herramientas software disponibles para ella.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Los discos Jaz

  2.1.    La controladora Jet  del Jaz

  3.      Configuracin del kernel para la unidad Jaz

  4.      Identificando la unidad al arrancar

  4.1.    fdisk , mke2fs , mount , etc.

  4.1.1.  Discos con formato actual dos

  4.1.2.  Reformateo como disco Linux nativo

  4.1.3.  El disco de las Jaz Tools .

  5.      Jaztools .

  6.      Preguntas de Uso Frecuente (PUFs)

  6.1.    El Jaz bloquea el sistema tras parar el motor

  6.2.     Se puede arrancar desde una unidad Jaz ?

  6.2.1.  Nota del traductor

  6.3.     Por qu Iomega usa la particin nmero 4 ?

  6.4.     Cmo se puede montar un disco al arrancar ?

  6.5.     Qu ocurre si no hay un disco metido cuando se arranca ?

  7.      Consiguiendo informacin ms actual.

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  La unidad Iomega Jaz es una unidad de disco extrable cuyos discos
  tienen una capacidad de 1021 megabytes. Esta actualmente disponible en
  configuraciones SCSI externas e internas. Iomega planea sacar al
  mercado una versin IDE interna.

  Este documento describe cmo usar la unidad Jaz con Linux. Ya que ste
  es un dispositivo SCSI, es importante que se lea el SCSI HOWTO de Drew
  Eckhardt tambin: http://sunsite.unc.edu/pub/Linux/docs/HOWTO/SCSI-
  HOWTO

  Me gustara agradecer a la siguientes personas sus contribuciones e
  informaciones que me han proporcionado.

    Grant Gunther, grant@torque.net

    Tom Poindexter, tpoindex@nyx.net

    Todd Woods, woods@cs.uiowa.edu

  Si tienes algn comentario/sugerencia/correccin por favor envalos a:
  Bob Willmot, bwillmot@cnct.com

  2.  Los discos Jaz

  Los discos Jaz (cartuchos) contienen tres discos (floppys) de 3.5" que
  son el 1GB de datos.

  La unidad tiene un mecanismo motorizado que puede expulsar el disco
  mediante un botn en el frontal de la unidad o a travs de software
  (ver ms abajo en la informacin sobre las utilidades Jaz (``'') para
  Linux.

  2.1.  La controladora Jet  del Jaz

  Iomega vende una controladora SCSI bajo el nombre de Jaz Jet.

  Aparentemente hay actualmente dos versiones disponibles de esta
  controladora basada en dos chipsets SCSI diferentes.

  Una esta basada en las controladoras de la familia Adaptec 7800, y es
  compatible con las controladoras 2930/2940. Linux 2.0 soporta estas
  controladoras con el driver aic7xxx. (este driver fue introducido en
  la versin del kernel 1.3.?).

  La otra controladora esta basada en el chipset Advanced Systems.  Al
  arrancar la controladora muestra un mensaje como:

               Jaz Jet PCI SCSI adapter Copyright Advanced Systems 1996

  Compilar el kernel con la variable CONFIG_SCSI_ADVANSYS puesta.

  3.  Configuracin del kernel para la unidad Jaz

  Para usar la unidad Jaz con Linux, se debe tener un kernel configurado
  para la controladora que se vaya a usar.

  Informacin en compilar el kernel se puede encontrar en el fichero
  /usr/src/linux/README, o en el directorio
  /usr/src/linux/Documentation/ de los kernel 2.x. (-- Dispones de una
  versin en castellano del fichero Changes, aspecto especialmente
  importante si vas a compilar uno de los ltimos kernels, en:
  http://slug.ctv.es/~alfredo/Cambios.html--)

  Comprueba tambin el Kernel-Como (-- Traduccin de Juan Jos Amor--)

  de Brian Ward, el original (ingls) est en sunsite.unc.edu

  4.  Identificando la unidad al arrancar

  Cuando el sistema arranca debera mostrar informacin sobre la
  controladora, y cualquier disco que est introducido en la unidad.

  Los mensajes al arrancar variarn dependiendo de la controladora, y
  son grabados en el fichero /var/log/messages (o /var/adm/messages).
  Estos mensajes se pueden ver de nuevo desde el prompt con el comando
  dmesg.

  Aqu esta el arranque del sistema con kernel 2.0.10 con una
  controladora Adaptec 2940:

           aic7xxx: BurstLen = 8 DWDs, Latency Timer = 64 PCLKS
           aic7xxx: AHA-2940 Ultra Rev B.
           aic7xxx: devconfig = 0x580.
           aic7xxx: Reading SEEPROM...done.
           aic7xxx: Extended translation enabled.
           aic7xxx: Using 16 SCB's after checking for SCB memory.
           AHA-2940 Ultra (PCI-bus):
               irq 11
               bus release time 40 bclks
               data fifo threshold 100%
               SCSI CHANNEL A:
                   scsi id 7
                   scsi selection timeout 256 ms
                   scsi bus reset at power-on enabled
                   scsi bus parity enabled
                   scsi bus termination (low byte) enabled
           aic7xxx: Downloading sequencer code...done.
           aic7xxx: Resetting the SCSI bus...done.
           scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 3.2/3.1/3.0
           scsi : 1 host.
           aic7xxx: Scanning channel A for devices.
           aic7xxx: Target 4, channel A, now synchronous at 10.0MHz, offset(0xf).
             Vendor: iomega    Model: jaz 1GB           Rev: G.60
             Type:   Direct-Access                      ANSI SCSI revision: 02
           Detected scsi removable disk sda at scsi0, channel 0, id 4, lun 0
           scsi : detected 1 SCSI disk total.
           SCSI device sda: hdwr sector= 512 bytes. Sectors= 2091050 [1021 MB] [1.0 GB
       ]
           sda: Write Protect is off

  En la nota de arriba el nombre del dispositivo SCSI (sda,sdb, etc).
  Ser necesario para acceder a la unidad ms tarde.

  Si estas lneas no aparecen, entonces algo esta mal configurado en el
  hardware o en el kernel.

  Si la lnea scsi0: no aparece, entonces no se tiene configurada la
  controladora y su driver correctamente. Algunos drivers darn una
  pista sobre lo que esta mal. Si la unidad no es detectada,
  probablemente haya un problema con el cable. Si no se asigna un nombre
  de unidad, probablemente se haya olvidado incluir soporte de discos
  SCSI al configurar el kernel cuando se compil.

  Comprueba los ficheros README en el directorio drivers/scsi y el SCSI-
  Howto para la bsqueda de otras pistas con fines depurativos (debug).

  4.1.  fdisk , mke2fs , mount , etc.

  Una vez que se sepa el nombre de la unidad Jaz, se est preparado. Se
  puede manipular la unidad con los comandos habituales de manejo de
  discos del Linux, fdisk, mke2fs, mount, etc.

  Referirse a las pginas del manual de estos programas.

  4.1.1.  Discos con formato actual dos

  Los discos formateados de fbrica por Iomega estn particionados con
  una nica particin (por alguna desconocida razn se usa la cuarta
  particin).

  Se puede montar este disco (asumiendo que el disco Jaz es el
  dispositivo SCSI sda) con los comandos

       mkdir /jaz
       mount -t msdos /dev/sda4 /jaz

  O si se est usando los kernels 2.0 y se tiene compilado el kernel con
  soporte para VFAT Win95 se puede montar con

       mkdir /jaz
       mount -t vfat /dev/sda4 /jaz

  (esto permite leer/escribir ficheros con nombres largos)

  Los ficheros del disco aparecern en /jaz. Mientras el disco est
  montado, no podr ser expulsado.

  Para desmontar la unidad se usar el comando:

       umount /dev/sda4  # Atencion a la nota del traductor

  Nota del Traductor: para evitar problemas con el nmero de particin,
  aconsejo desmontar usando el nombre del directorio en vez de usar el
  nombre del dispositivo:

       umount /jaz

  Una vez que el punto de montaje (-- El Punto de montaje es el
  directorio donde se va ha montar la unidad.--) /jaz est hecho - no
  ser necesario hacerlo otra vez, (tambin se deber asegurar de no
  estar dentro del directorio /jaz cuando se intente desmontar la
  unidad).

  4.1.2.  Reformateo como disco Linux nativo

  Si se quiere borrar un disco Jaz y hacer un sistema de ficheros nativo
  de Linux en l, Se debera usar fdisk en el disco entero:

       fdisk /dev/sda

  y borrar cualquier particin existente (con el comando d). Entonces
  crear una nueva particin con el comando n, hacerla particin primaria
  nmero 1, usar w para escribir la tabla de particiones al disco, y
  salir con q.

  Formatear la particin:

       mke2fs /dev/sda1

  (el 1 es el nmero que se le asign a esta particin en el fdisk).

  Ahora se puede montar el disco:

       mount -t ext2 /dev/sda1 /jaz

  (reusando el punto de montaje que se cre anteriormente).

  4.1.3.  El disco de las Jaz Tools .

  Hay algn trabajo extra que hacer si se quiere usar el disco que viene
  con la unidad Jaz. De fbrica, la proteccin controlada por software
  est activada. La mayora de la gente desbloquea el disco bajo DOS
  antes de intentar usarlo con Linux. Linux no puede acceder a un disco
  bloqueado, y debe ser desbloqueado con las herramientas de Iomega.

  Nota del Traductor: En el caso de que por cualquier motivo no
  consigamos/podamos desbloquearlo con las JazTools Yo personalmente he
  conseguido desbloquear un disco Jaz (perdiendo la informacin, claro)
  formatendolo con las utilidades que vienen con algunas controladoras
  (como en algunas Adaptec) en la BIOS.

  5.  Jaztools .

  Hay disponible un programa nativo de Linux con soporte para algunas de
  las caractersticas especiales de Iomega (incluyendo expulsin y
  proteccin contra escritura controlada por software) en
  http://www.cnct.com/~bwillmot/jaztool/.

  Se prev que en breve haya una nueva versin de jaztools disponible,
  que contendr una interfaz GUI (=interfaz de usuario grfica) y
  soporte de escaneo de unidad, as como montaje y desmontaje de discos
  automatizada.

  6.  Preguntas de Uso Frecuente (PUFs)

  6.1.  El Jaz bloquea el sistema tras parar el motor

  Hay gente que ha informado de problemas con los kernels 1.2 (y
  primeros 1.3) cuando la unidad Jaz para el motor: les bloquea el
  sistema, o simplemente produce un lo de mensajes de error SCSI.

  Yo (el autor) no he tenido ningn tipo de problemas con los kernels
  2.0.x y las paradas de motor de los Jaz. Si alguno tuviese problemas
  que intente con el ltimo kernel 2.0.x disponible en

  http://sunsite.unc.edu/pub/Linux/kernel/v2.0/. (-- Nota para lectores
  espaoles/europeos: Se cuenta con un mirror de SunSite nacional, y
  considerablemente ms rpido, en ftp://sunsite.rediris.es--)

  6.2.   Se puede arrancar desde una unidad Jaz ?

  Esto depende en para qu se est usando la controladora. Si la
  controladora tiene una ROM BIOS con cdigo que puede arrancar los ID 5
  o 6, entonces s, se puede arrancar desde la unidad Jaz.

  6.2.1.  Nota del traductor

  Yo personalmente tengo una distribucin Slackware en un disco Jaz que
  arranco con un disco LILO (tambin se podra desde una particin DOS
  con LOADLIN) con soporte de mi controladora SCSI y funciona sin
  problemas. Mi controladora no tiene BIOS.

  A lo que el autor original se refiere, es a arrancar directamente (con
  el LILO instalado en) un disco Jaz. As pues el mtodo consistira en
  instalar el LILO bien en un disquete, bien en el MBR de algn disco
  arrancable. (Aunque slo tenga ms-dos)

  6.3.   Por qu Iomega usa la particin nmero 4 ?

  No tengo ni idea. Alguna pista?

  6.4.   Cmo se puede montar un disco al arrancar ?

  Todo lo que se necesita hacer es aadir una lnea al fichero
  /etc/fstab. Por ejemplo, si siempre se tiene un disco DOS en la unidad
  cuando se arranca, se puede poner

       /dev/sda4   /jaz  msdos  defaults  0 0

  en el /etc/fstab. Dependiendo de la distribucin, los scripts de
  inicializacin pueden intentar ejecutar fsck en las particiones
  listadas en el fstab. Hay que ser cuidadoso ya que esto podra causar
  problemas si se olvida meter el disco en la unidad cuando se arranca,
  o se tiene el disco equivocado.

  6.5.   Qu ocurre si no hay un disco metido cuando se arranca ?

  El kernel intentar leer la tabla de particiones, pero la operacin
  (eventualmente) acabar en un time out.

  Cuando se cambie de disco, es una buena idea usar siempre fsck para
  comprobar la estructura de la particin en el nuevo disco.

  La BIOS en algunas controladoras SCSI intentarn leer la tabla de
  particiones en el disco durante el arranque del sistema. Si no se
  puede desactivar esta comprobacin, ser obligatorio arrancar siempre
  con un disco metido en la unidad.

  7.  Consiguiendo informacin ms actual.

  La versin ms actualizada de este mini-COMO puede ser encontrada en:

  http://www.cnct.com/~bwillmot/jaztool/.

  Las pginas de Iomega estn en

  http://www.iomega.com/.

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Linux con Raz-NFS Mini-COMO
  Andreas Kostyrka andreas@ag.or.at
  Traducido por Rodolfo Pilas rodolfo@linux.org.uy
  v7, 3 Febrero 1997

  Este Mini-COMO intenta explicar el procedimiento para configurar una
  estacin de trabajo Linux sin disco, que monte la totalidad de su sis
  tema de archivos va NFS.
  ______________________________________________________________________

  ndice General:

  1.      Derechos

  1.1.    Contribuciones

  2.      Visin General

  3.      Configuracin del servidor

  3.1.    Compilacin del ncleo

  3.2.    Creacin del sistema de archivos raz

  3.2.1.  Copiando el sistema de archivos

  3.2.2.  Cambios en el sistema de archivos raz

  3.2.3.  Exportando el sistema de archivos

  3.2.4.  Configuracin RARP

  3.2.5.  Configuracin de BOOTP

  3.2.6.  Cmo averiguar las direcciones del hardware

  4.      Arranque de la estacin de trabajo

  4.1.    Uso de una ROM de inicio ( BOOT ROM )

  4.2.    Uso de un disquete de arranque

  4.3.    Uso de un gestor de arranque y RARP

  4.4.    Uso de un gestor de arranque sin RARP

  5.      Temas relacionados

  6.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Derechos

   1996 Andreas Kostyrka (andreas@ag.or.at o
  h9207884@albala.wuwien.ac.at)

  La ltima versin de este Mini-COMO se puede encontrar generalmente en
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/NFS-Root o en
  cualquier rplica de sunsite cerca de Usted.

  Salvo que se indique lo contrario, los documentos COMO de Linux son
  propiedad de sus respectivos autores. Los documentos COMO de Linux
  pueden ser reproducidos o distribuidos en su totalidad o en parte, en
  cualquier medio fsico o electrnico, siendo estas declaraciones de
  derechos aplicables a todas las copias.  Se permite y se fomenta las
  redistribuciones comerciales, pero en esos casos el autor debe ser
  notificado.

  Todas las traducciones y trabajos derivados de cualquier documento
  COMO de Linux estn cubiertos por esta declaracin de derechos. Esto
  significa que Usted no puede producir trabajos derivados de un COMO e
  imponerle restricciones adicionales. Se puede conceder excepciones a
  estas reglas bajo ciertas condiciones;  por favor, contacte el
  coordinador de los COMO de Linux en la direccin que se indica abajo.

  Resumiendo: deseamos promover la diseminacin de esta informacin a
  travs de tantos canales como sea posible.  Sin embargo, se desea
  retener los derechos sobre los documentos HOWTO, y nos gustara estar
  informados de cualquier plan de redistribucin.

  Si tiene preguntas, por favor, contacte con Andreas Kostyrka
  andreas@ag.or.at, el autor de este mini-COMO, o Greg Hankins, el
  coordinador de los HOWTO de Linux, gregh@sunsite.unc.edu va email o
  en el telfono +1 404 853 9989

  1.1.  Contribuciones

    Avery Pennarun apenwarr@foxenet.net (cmo arrancar sin LILO)

    Ofer Maor ofer@hadar.co.il (realiz un COMO muy bueno referido a
     configurar una estacin de trabajo sin discos)

    Christina Leutloff leutloff@sundancer.tng.oche.de (provee
     informacin sobre netboot)

  2.  Visin General

  Generalizando, existen los siguientes problemas en las estaciones de
  trabajo sin disco:

    Deben encontrar su propia direccin IP, y necesitan tambin el
     resto de la configuracin de red.

    Deben conocer el servidor NFS y el camino para montar su sistema de
     archivo raz.

  La actual implementacin de NFSROOT en el ncleo de Linux (a partir de
  la versin 1.3.7x) permite las siguientes soluciones:

    La direccin IP puede ser averiguada mediante RARP, o bien la
     configuracin total de la red puede ser pasada al ncleo va
     parmetros al ncleo usando LILO o LOADLIN.

    La ruta NFS a montar puede ser pasada va parmetros al ncleo. Si
     no se hace esto, el ncleo asume que el servidor RARP es tambin
     servidor NFS, y utilizar lo que est compilado por defecto como la
     ruta.  (el valor actual por defecto en el ncleo es:
     /tftpboot/direccion_IP_de_la_maquina)

    La configuracin del cliente puede averiguarse por BOOTP.

  Antes de iniciar la configuracin de un entorno sin disco, deber
  decidir si arrancar va LILO o LOADLIN.  La ventaja de hacerlo es la
  flexibilidad, la desventaja es la velocidad. El arranque de un ncleo
  de Linux sin LILO es ms rpido.  Esto puede ser o no de importancia.
  3.  Configuracin del servidor

  3.1.  Compilacin del ncleo

  Incluir soporte RARP en el ncleo del servidor ser probablemente una
  buena idea.  Deber estar habilitada si se arranca el ncleo sin
  parmetros.  Por otro lado, sto no le ayudar si el cliente no est
  en la misma subred que el servidor.

  El ncleo para la estacin de trabajo necesita como configuraciones
  mnimas compiladas las siguientes:

    Soporte para sistema de archivos NFS compilado (no es necesario que
     tenga soporte ext2 compilado monolticamente, como mdulo es
     suficiente)

    La opcin "Root on NFS" debe estar habilitada.

    El controlador que da soporte a la tarjeta de red de la estacin de
     trabajo debe estar compilado.

    De acuerdo a sus necesidades tendr que incluir soporte RARP o
     BOOTP para NFS-Root. (con esto me refiero a las opciones que siguen
     al apartado NFS del men configurador del ncleo)

  Si la estacin de trabajo va a ser iniciada sin pasar parmetros al
  ncleo, ser necesario declarar el dispositivo raz en 0:255.  Haga
  esto creando el fichero de dispositivo:

       mknod /dev/nfsroot b 0 255

  Una vez creado, puede establecer el directorio raz de la imagen del
  ncleo con:

       rdev imagen_del_nucleo /dev/nfsroot

  3.2.  Creacin del sistema de archivos raz

  3.2.1.  Copiando el sistema de archivos

  Atencin: si bien estas instrucciones pueden resultar suficientes para
  Usted, no significa que sean ptimas en un sistema de trabajo. Hay un
  mtodo mejor para configurar mquinas clientes con el sistema archivos
  raz en NFS en el Cliente-Con-Raz-NFS mini-COMO de Ofer Maor,
  ofer@hadar.co.il

  Una vez decida dnde va a ser colocado el rbol raz, cree ste con
  (por ejemplo):
       mkdir -p directorio
       tar cClf / - | tar xpCf directorio

  Si inicia el ncleo sin LILO, entonces el directorio raz tiene que
  ser /tftpboot/direccin-IP.  Si no le gusta esto, debe cambiarlo en la
  cabecera del Makefile de los fuentes del ncleo, busque una lnea
  como: NFS_ROOT = -DNFS_ROOT=. Si cambia esto, ser necesario
  recompilar el ncleo.

  3.2.2.  Cambios en el sistema de archivos raz

  Elimine los archivos innecesarios y revise las instrucciones de los
  ficheros de inicializacin de /etc/rc.d. Algunos puntos importantes:

    Un aspecto importante es la configuracin de la tarjeta ethernet.
     La estacin de trabajo llega con una, al menos parcial,
     configuracin de eth0.  Configurar la direccin-IP de la estacin
     de trabajo como la direccin-IP del servidor no es correcto. (Como
     comprob el autor en uno de sus primeros intentos)

    Otro punto es el archivo /etc/fstab de la estacin de trabajo, que
     debe estar configurado para un sistema de archivos NFS.

    CUIDADO: No confundir el sistema de archivos raz del servidor y el
     sistema de archivos raz de la estacin de trabajo.  (Yo
     configuraba el rc.inet1 del servidor y me sorprenda al ver que la
     estacin de trabajo segua sin funcionar)

  3.2.3.  Exportando el sistema de archivos

  Exporte el directorio raz a la estacin de trabajo. Consulte
  exports(5). Se deber reiniciar nfsd/mountd despus de este cambio.
  Con RedHat esto puede llevarse a cabo fcilmente ejecutando:

       /etc/rc.d/init.d/nfs stop
       /etc/rcd/init.d/nfs start

  3.2.4.  Configuracin RARP

  Configure RARP en algn servidor de su red.  Si arranca sin parmetros
  en nfsroot, el servidor RARP debe adems ser servidor NFS.
  Generalmente este ser el servidor NFS. Para poder hacerlo, se
  necesita que el ncleo tenga soporte RARP.

  Para hacer esto, ejecute (y coloque en algn lugar de /etc/rc.d en el
  servidor):

       /sbin/rarp -s direccion-ip direccion-MAC-de-la-tarjeta

  donde

     direccion-ip:
        Direccin IP de la estacin de trabajo y,

     direccion-MAC-de-la-tarjeta:
        Direccin MAC o hardware de la tarjeta de red de la estacin de
        trabajo.

  ejemplo:

       /sbin/rarp -s 131.131.90.200 00:00:c0:47:10:12

  Tambin puede usar un mnemnico en lugar de la direccin-IP, cuando el
  servidor est capacitado para resolverlo, bien por poder encontrarlo
  en (/etc/hosts o por bsquedas en DNS)

  3.2.5.  Configuracin de BOOTP

  Para configurar BOOTP necesita editar /etc/bootptab.  Por favor
  consulte las pginas man sobre bootpd(8) y bootptab(5).

  3.2.6.  Cmo averiguar las direcciones del hardware

  No s cules son las direcciones MAC o de hardware! Cmo puedo
  averiguarlas?

    Arranque Linux con el disquete que ha hecho y busque la lnea donde
     se reconoce la tarjeta de red. Normalmente se muestran 6 bytes
     hexadecimales que son la direccin de la tarjeta.

    Arranque la mquina con cualquier sistema operativo que tenga
     soporte TCP/IP y haga un ping a la estacin de trabajo desde el
     servidor.  Revise el cache-ARP ejecutando: /sbin/arp -a

  4.  Arranque de la estacin de trabajo

  4.1.  Uso de una ROM de inicio ( BOOT ROM )

  Como yo no he usado ninguna en mis pruebas, solamente puedo dar
  algunas ideas (cortesa de Christian Leutloff,
  leutloff@sundancer.tng.oche.de):

    No es posible utilizar ROMs de arranque "normales".

    Existe el paquete netboot de Gero Kuhlmann, que permite crear ROMs
     de inicio para Linux y que contiene la informacin necesaria.
     netboot est disponible en servidores ftp de Linux o como paquete
     Debian (netboot-0.4).
    Lea detenidamente la documentacin que viene con su ROM de
     arranque.

    Probablemente sea necesario habilitar tftpd en el servidor,
     depender de la forma en que su ROM de inicio cargue el ncleo.

    Cualquier informacin sobre vendedores de ROMs con estas
     caractersticas para Linux ser bienvenida, ya que nadie tiene
     acceso a una mquina grabadora (especialmente en Europa donde yo
     resido). Y yo la incluira aqu.

  4.2.  Uso de un disquete de arranque

  Si ha exportado el sistema de archivos con el nombre correcto y su
  servidor NFS es tambin el servidor RARP (lo cual implica que las
  mquinas estn en la misma subred), puede entonces simplemente
  arrancar Linux desde un disquete (necesita tener configurado como
  dispositivo raz de dicho ncleo 0:255).

  Esto asume que el directorio raz en el servidor es
  /tftpboot/direccin-IP (este valor puede ser modificado cuando se
  compila el ncleo).

  4.3.  Uso de un gestor de arranque y RARP

  Pase al ncleo todos los parmetros cuando arranca y agregue

       nfsroot=dir-IP-servidor:/ruta/a/montar

  donde dir-IP-servidor es la direccin IP de su servidor NFS, y
  /ruta/a/montar es la trayectoria (path) al directorio raz.

  Sugerencias:

    Cuando utilice LILO considere usar la opcin "lock": Simplemente
     escriba una vez los parmetros correctos y agregue "lock". La
     siguiente vez que arranque deje que LILO haga todo.

    Cuando genere un disco especfico para una estacin de trabajo,
     puede utilizar la opcin append= en el fichero de configuracin
     lilo.conf

  4.4.  Uso de un gestor de arranque sin RARP

  Adems de nfsroot ponga el argumento nfsaddrs=maq-IP:serv-IP:pasa-
  IP:masc-IP:nombre-maq como parmetros para el ncleo.  El ncleo
  configurar eth0 con los parmetros que le ha proporcionado:

     maq-IP
        Direccin IP de la estacin de trabajo

     serv-IP
        Direccin IP del servidor NFS

     pasa-IP
        Direccin de la pasarela

     masc-IP
        Mscara de red

     nombre-maq
        Nombre de la mquina

  5.  Temas relacionados

    Puede encontrar un cliente BOOTP en:
     ftp://sunsite.unc.edu/system/Network/admin/bootpc.v045.tgz

     Con las nuevas actualizaciones, bzImage y initrd (que segn
     entiendo se incorporan a partir de la versin 1.3.73), se puede
     hacer que funcione una estacin de trabajo correctamente.

    En el directorio de documentacin de las fuentes del ncleo se
     encuentra un archivo documentando los sistemas Raz-NFS.

    Existe una actualizacin en circulacin que permite tener un
     archivo de intercambio (swap) sobre NFS.

  6.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  DOS-Win95-OS/2-Linux Como
  Mike Harlan, r3mdh@dax.cc.uakron.edu
  Traductor: Manuel de Vega Barreiro, barreiro@arrakis.es
  v1.0, 06 MAR 1996

  Detalles para de configuracin y trucos para una adecuada convivencia
  de DOS, Win95, OS/2 y Linux en un mismo ordenador.
  ______________________________________________________________________

  ndice General:

  1.      Aviso:

  2.      Mensaje para que los abogados sean felices:

  3.      Instalacin

  4.      Del traductor

  5.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Aviso:

  Cualquier dao producido en cualquier mquina por ti despus de leer
  este Como, es responsabilidad tuya. S cuidadoso cuando leas apartados
  referentes a borrar particiones y dar formato a discos. Ten en cuenta
  que las operaciones anteriores pueden provocar prdida de datos.  Por
  tanto, haz Copias de Seguridad pronto, haz Copias de Seguridad a
  menudo.  Este es el primero de otros tantos avisos.

  2.  Mensaje para que los abogados sean felices:

  A no ser que se indique lo contrario, el autor mantiene los derechos
  de los documentos COMO de Linux. Las guas COMO pueden ser
  reproducidas y distribu das en todo o en parte, en cualquier medio
  fsico o electrnico, siempre que se incluya este Copyright en todas
  las copias. Se permite y anima su difusin comercial; sin embargo
  seria deseable avisar al autor en estos casos.

  Cualquier traduccin, trabajo derivado o ampliacin que incorpore
  guas COMO deber mantener este mismo tipo de Copyright. Esto es, no
  puedes utilizar como base para un trabajo una gua COMO y aadir
  restricciones adicionales a su distribucin.  En ciertas
  circunstancias podran concederse excepciones a estas reglas; dirgete
  al coordinador de las guas COMO en la direccin indicada mas abajo.

  Resumiendo, queremos promocionar la difusin de esta informacin en
  tantos medios como sea posible. De cualquier manera, queremos mantener
  los derechos de autor de las guas COMO, y nos gustara ser avisados
  de cualquier proyecto de distribucin de las guas.

  Si tienes alguna pregunta, por favor ponte en contacto con Greg
  Hankins, el coordinador de las Guas COMO, en la direccin
  gregh@sunsite.unc.edu va email, o en el telfono +1 404 853 9989.

  3.  Instalacin

  Ahora...............que empiece el espectculo.

  Despus de das de lucha y frustracin, comprend finalmente cmo
  llevar a cabo mis deseos. Tengo un PC con un disco duro de 1.2 GB y 16
  MB de memoria RAM. Quera tener 4 sistemas operativos en mi sistema:
  MSDOS v6.22, Windows 95, OS/2, y Linux. Hasta ahora, no he encontrado
  ningn Como de Linux para realizar la tarea de tener todos y cada uno
  de estos sistemas operativos en una mquina y tener la posibilidad de
  arrancarlos.  (es posible alojar los sistemas operativos en diferentes
  particiones, pero conseguir que arranquen y que no se cuelguen despus
  de mostrar por ejemplo el mensaje "Starting MSDOS", es algo que hay
  que comprender.  Bien, despus de muchas pruebas y errores, he dado
  con la siguiente receta para realizar esta hazaa:

  Nota: Los nmeros entre parntesis son los megabytes que he usado en
  mi disco duro de 1.2 GB.

  1. Ejecuta view.exe desde el CD de Linux Slackware y crea los
     disquetes Linux Boot y Linux Root.

     Por alguna razn, el programa de arranque de linux llama al
     disquete de Root Ramdisk. Me referir a este disco desde ahora como
     disquete Ramdisk.

  2. Realiza una copia de seguridad de cualquier informacin que desees
     conservar a cinta (o a cualquier otro medio que tengas a mano).

  3. Arranca con el disquete de instalacin de MSDOS original, disquete
     nmero 1.  Cuando aparezca el mensaje "Starting MSDOS", pulsa F5
     para no ejecutar config.sys y autoexec.bat

  4. ejecuta a:\fdisk.exe

  5. Borra todas las particiones (te he avisado: EL BORRADO o la
     MODIFICACIN DE CUALQUIER PARTICIN  CONLLEVA LA PRDIDA DE TODOS
     LOS DATOS DEL DISCO)

  6. Aade una particin primaria de MSDOS  (11MB).

  7. Da formato a esa particin.

  8. Ejecuta a:\setup.exe para instalar MSDOS  en esa particin.

  9. Arranca OS/2.

  10.
     Elige la opcin "Advanced Installation".

  11.
     Ejecuta FDISK (Esta opcin se presentar si elegimos navegar por la
     instalacin de OS/2).

  12.
     Aade una particin primaria despus de la de MSDOS. Esta particin
     ser la de Win95. (349MB).

  13.
     Aade el gestor de arranque (-- El boot manager del OS/2--) como
     siguiente particin primaria. (2MB)

  14.
     Aade una unidad lgica en la particin extendida. Esta unidad ser
     la de datos para MSDOS. (511MB)

  15.
     Aade otra unidad lgica en la particin extendida. Esta unidad
     ser la particin HPFS ("High Performance File System", sistema de
     ficheros de alto rendimiento) de OS/2. (127 MB)

  16.
     Aade una particin con el resto de espacio disponible en el disco
     duro. Esta particin se convertir posteriormente en las dos
     particiones de Linux -- la particin de intercambio (swap) y la
     particin nativa de Linux. Pero como OS/2 (al igual que DOS) puede
     escribir slo 6 particiones por disco duro (3 primarias y 3
     extendidas o 4 primarias), tenemos que crear slo una. Es adems
     necesario crearla. No dejes el espacio sobrante como libre y
     esperes despus ser capaz de crear dos particiones con Linux.
     Debido a la forma de trabajar del programa FDISK de OS/2, cuando
     aadimos la ltima unidad lgica, en la particin extendida, se
     crea una marca de final. No podrs aadir ninguna particin mas
     all de este punto. En otra palabras, creando esta ltima unidad
     lgica generamos un relleno para Linux . Despus borraremos esta
     particin y aadiremos dos nuevas en el espacio liberado.

  17.
     Aade las particiones 1,2 y 5 al gestor de arranque.

  18.
     Convierte la particin 5 en instalable.  La pantalla de FDISK
     tendr el siguiente aspecto (o algo muy similar):

                                      FDISK

       Disk 1
       ___________________________________________________________________________
       Partition Information
       Name            Status          Access          FS Type         MBytes
       ___________________________________________________________________________
       MSDOS           Bootable        C: Primary      FAT              11
       WIN 95          Bootable         : Primary      FAT             350
                       Startable        : Primary      BOOT MANAGER      2
                       None            D: Logical      Unformatted     511
       OS/2            Installable     E: Logical      FAT             127
                       None            F: Logical      Unformatted     219

  19.
     Prosiga con el proceso de instalacin  de OS/2.

  20.
     Arranque de nuevo y elija la particin 2 (Windows 95) del
     administrador de arranque.

  21.
     Cuando aparezca el mensaje de error indicando la ausencia de
     sistema operativo, arranque usando el disquete de instalacin de
     MSDOS.  Seleccionamos esta particin para ocultar la particin de
     MSDOS.

     El gestor de arranque de OS/2 nos permite ocultar una o ms
     particiones primarias al seleccionar la que queremos hacer visible.
     Se puede tener slo una particin primaria activa a la vez con el
     programa FDISK de IBM (MSDOS sigue la mismas reglas), as cuando
     DOS est oculto, OS/2 es la unidad C: y DOS no tiene unidad (letra)
     asignada, y cuando OS/2 est oculto se cumple lo contrario.

     Nuestra particin de datos DOS ser la unidad D para estas dos
     particiones. Como los IFS's ("Installable File Systems", Sistemas
     de ficheros instalables -- p.ej.  OS/2, Linux)-- no pueden ser
     vistos desde MSDOS, slo tendremos las unidades C: y D: en DOS y
     Windows 95. OS/2 ver nuestra particin de datos DOS, por lo que
     podremos usarla para volcar ficheros de OS/2, cumplindose lo mismo
     para Linux (por supuesto tendremos que montar la unidad de datos de
     DOS primero).

  22.
     Instala MSDOS en la particin 2.

  23.
     Arranca usando la particin 2.

  24.
     Instala Windows v3.1 en esta particin

  25.
     Instala Windows 95 en esta particin.

  26.
     Arranca usando la particin 1.

  27.
     Da formato a  la particin 4.

  28.
     Recupera  los Datos de DOS desde la cinta a las particiones 1 y 4.

  29.
     Arranca usando el disquete de arranque Linux.

  30.
     Prosigue con el disquete Ramdisk de Linux.

  31.
     Una vez presentados como superusuario (root)  y con el indicador #
     en pantalla, teclea fdisk y pulsa retorno.

  32.
     Borra la ultima particin (la que creamos en el paso 17).

  33.
     Aade una particin de 16 MB y etiqutala con el tipo Linux Swap.
     (17MB, tipo 82)

  34.
     Aade una ultima particin con el resto de los cilindros del disco
     y etiqutala con el tipo Linux native. (198MB, tipo 83)

  35.
     Escribe los cambios en el sector de arranque y arranca de nuevo el
     sistema.

  36.
     Cuando tengamos de nuevo el indicador # en pantalla, ejecutaremos
     setup.

  37.
     Instala Linux en la ultima particin.

  38.
     Cuando instalemos LILO, debemos asegurarnos de instalarlo en el
     superblock de la ltima particin (NO en el MBR, ya que sino
     destruiremos todo el trabajo anterior). Aade slo la ultima
     particin a LILO (-- Como arrancable--) y fija el temporizador (--
     N del R: El tiempo de espera una vez cargado LILO antes de cargar
     el sistema operativo seleccionado por defecto--) a cero. De esta
     forma, cuando seleccionemos Linux desde el administrador de
     arranque de OS/2, activaremos LILO y arrancaremos Linux desde la
     unidad lgica en la particin extendida. Como Linux es la nica
     particin que queremos activar desde LILO, no necesitamos ningn
     temporizador (a no ser que tengamos ms de un ncleo que deseemos
     cargar. En este caso sera deseable fijar el temporizador en un
     valor distinto de cero).

  39.
     Activa la particin de intercambio. (Averigua cmo hacerlo en el
     manual "Linux Installation and Getting Started (-- Disponible en
     castellano, como Linux, Instalacin y Primeros Pasos (LIPP; visitar
     http://www.infor.es/LuCAS--) " Manual de Matt Welsh

  40.
     Arranca OS/2.

  41.
     Ejecuta FDISK.

  42.
     Aade Linux al gestor de arranque (es la particin de tipo 83).

     La pantalla de FDISK tendr el siguiente aspecto (o algo muy
     similar):

                                      FDISK

       Disk 1
       ___________________________________________________________________________
       Partition Information
       Name            Status          Access          FS Type         MBytes
       ___________________________________________________________________________
       MSDOS           Bootable        C: Primary      FAT              11
       WIN 95          Bootable         : Primary      FAT             350
                       Startable        : Primary      BOOT MANAGER      2
                       None            D: Logical      FAT             511
       OS/2            Bootable        E: Logical      HPFS            127
                       None             : Logical      Type 82          17
       Linux           Bootable         : Logical      Type 83         198

  Envame tus comentarios/sugerencias/problemas (como ltimo recurso,
  por favor!) a la siguiente direccin: r3mdh@dax.cc.uakron.edu.

  Mike Harlan 06 MAR 1996

  4.  Del traductor

  Si tienes comentarios sobre la traduccin, no dudes en hacrmelos
  llegar.

  Manuel de Vega Barreiro. barreiro@arrakis.es

  En un lugar de la red de cuyo nombre no quiero acordarme..........

  Madrid. Espaa.

  http://www.arrakis.es/~barreiro

  5.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  NT OS Loader + Linux mini-COMO
  Bernd Reichert, reichert@dial.eunet.ch
  Traduccin: Diego Berrueta, berrueta@geocities.com
  v1.11, 2 de septiembre de 1997; traduccin: 17 de junio de
  1998

  Este documento describe el uso del Windows NT boot loader para arran
  car Linux. Estos procedimientos han sido probados con Windows NT 4.0
  WKS y Linux 2.0.
  ______________________________________________________________________

  ndice General:

  1.      Cmo trabaja el NT OS Loader?

  2.      Cmo instalar Windows NT y Linux en el mismo sistema?

  2.1.    Instalacin de Windows NT

  2.2.    Particionando

  2.3.    Instalacin de Linux

  2.4.    Lilo

  3.      Bootpart

  4.      Por parte de Linux

  4.1.    Por parte de Windows NT

  4.2.    Reptelo, otra vez, Sam

  5.      Resolucin de problemas

  6.      Referencias

  7.      Agradecimientos

  8.      Comentarios

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Cmo trabaja el NT OS Loader?

  El NT OS loader lee el sector de arranque de otros sistemas operativos
  si est disponible como fichero, y arranca el sistema operativo
  elegido, por ejemplo, Windows NT en diferentes modos, o cualquier otro
  sistema operativo.

  2.  Cmo instalar Windows NT y Linux en el mismo sistema?

  2.1.  Instalacin de Windows NT

  Intente instalar Windows NT primero. Si quiere utilizar NTFS para su
  particin de Windows NT, adelante, pero recuerde que la versin de
  Linux no puede acceder a este tipo de particiones (-- N. del T.:
  actualmente, las versiones ms recientes del ncleo s lo permiten--)
  Una version alfa del controlador que permite acceder a las particiones
  NTFS est disponible en http://www.informatik.hu-
  berlin.de/~loewis/ntfs . Usted puede crear una particin FAT separada
  para intercambiar datos, y puede usar disquetes con formato DOS.

  2.2.  Particionando

  Otro Mini-como recomienda no usar el "Administrador de discos" de NT
  para crear las particiones de Linux (tanto la principal como la de
  intercambio).  Es suficiente con dejar el espacio libre por el
  momento. Tambin se recomienda utilizar el fdisk de Linux despus.

  2.3.  Instalacin de Linux

  Arranque Linux desde disquetes, y cree la particin de intercambio y
  la principal. Fdisk considera que la particin NTFS es una particin
  HPFS. Esto es normal. Arranque de nuevo con disquetes e instale Linux
  como prefiera.

  En caso de que el procedimiento de instalacin le sugiera montar la
  particin HPFS que se ha encontrado, responda que no.

  2.4.  Lilo

  Cuando llegue a la seccin de Lilo, elija la particin Linux como
  dispositivo de arranque, porque el Registro Maestro de Arranque (MBR)
  de su disco duro est ocupado por Windows NT. Esto significa que los
  valores root y boot del fichero /etc/lilo.conf tendrn el mismo valor.
  Por ejemplo, si usted tiene un disco IDE y su particin Linux es la
  segunda particin, la entrada boot en /etc/lilo.conf ser:

       boot=/dev/hda2

  En cambio, si tiene dos discos duros y la particin Linux es la
  primera del segundo disco, tendr:

       boot=/dev/hdb1

  Ejecute lilo con un ncleo adecuado para su sistema. Compruebe el
  ncleo arrancando primero desde un disquete si no est seguro.

  Si usted no puede arrancar con Windows NT ahora, tiene un problema.
  Espero que haya creado un disco de rescate recientemente.

  3.  Bootpart

  Existe un programa para NT llamado bootpart escrito por G. Vollant que
  puede hacer los dos siguientes pasos por usted.  Bootpart est
  disponible en
  http://ourworld.compuserve.com/homepages/gvollant/bootpart.htm.
  Si quiere saber cmo funcionan las cosas realmente, utilice los
  procedimientos descritos en los dos siguientes apartados.

  4.  Por parte de Linux

  Tendr que arrancar desde disquetes hasta que la particin de NT est
  configurada.

  Ahora tiene que obtener el sector de arranque de su particin
  principal de Linux. Por ejemplo, si la particin es /dev/hda2, el
  comando a utilizar ser:

       # dd if=/dev/hda2 of=/bootsect.lnx bs=512 count=1

  Algo ha ido mal si su bootsect.lnx tiene ms de 512 bytes.

  Ahora copie el fichero bootsect.lnx a un disquete con formato DOS para
  pasarlo a la particin de NTFS.

  Puede hacer la copia con la orden:

       # mcopy /bootsect.lnx a:

  o con:

       # mount -t msdos /dev/fd0 /mnt
       # cp /bootsect.lnx /mnt
       # umount /mnt

  4.1.  Por parte de Windows NT

  Copie el fichero desde el disquete a C:\bootsect.lnx. Supongo que
  sabr hacerlo.

  El equivalente del lilo.conf de Linux es el C:\boot.ini en Windows NT.
  Elimine los atributos de sistema y slo lectura para poder
  modificarlo, de la siguiente manera:

       C:\attrib -s -r c:\boot.ini

  Ahora modifique el fichero boot.ini con un editor (el bloc de notas,
  por ejemplo), como sigue:

       [boot loader]
       timeout=30
       default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
       [operating systems]
       multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
       multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
       C:\BOOTSECT.LNX="Linux"

  En mi caso, slo he tenido que aadir la ltima lnea. Despus de
  guardar el boot.ini, restaure sus atributos con:

       C:\attrib +s +r c:\boot.ini

  Despus de reiniciar el ordenador, usted debera ver lo siguiente:

       OS Loader V4.00

       Seleccione el sistema operativo a arrancar:

       Windows NT Workstation Version 4.0
       Windows NT Workstation Version 4.0 [modo VGA]
       Linux

  Si elige Linux, ver:

       LILO loading zImage ....

  4.2.  Reptelo, otra vez, Sam

  Una nueva copia de bootsect.lnx debe ser transferida a C:\bootsect.lnx
  cada ver que el sector de arranque de su particin de Linux sea
  modificado. Esto ocurre, por ejemplo, cuando instala un nuevo ncleo
  con lilo. Como podr ver, este sistema no es ideal para probar ncleos
  experimentales.

  5.  Resolucin de problemas

  Si las cosas no han funcionado como se esperaba, pruebe a arrancar con
  un disquete. Si su particin Linux es /dev/hdb1, su fichero
  /etc/lilo.conf tendr las siguientes entradas:

       root=/dev/hdb1
       boot=/dev/fd0

  Ejecute lilo con un disquete insertado. Ahora intente arrancar desde
  el disquete. Si Linux no puede ser arrancado de esta forma, el NT OS
  loader tampoco lo conseguir. Si usted ve gran cantidad de 01 01 01
  01, su disco raz (particin principal de Linux) no es accesible.
  Compruebe si todos sus discos son reconocidos por la bios.

  Si el disquete consigue arrancar su particin Linux, podr obtener el
  sector de arranque para el NT OS loader con la orden:

       # dd if=/dev/fd0 of=/bootsect.lnx bs=512 count=1

  Un consejo: puede guardar este disquete como disquete de rescate, por
  si acaso la instalacin de Windows NT falla.

  6.  Referencias

    The Linux+WindowsNT mini-HOWTO

    The FAQ for FreeBSD 2.X

    N. del T.: Existe un documento que describe cmo se puede hacer
     convivir distintos sistemas operativos en un ordenador, y cmo
     gestionar el arranque de cada uno, escrito por Francisco Garca y
     Carlos Prado y disponible (en castellano) en
     http://www.croftj.net/~barreiro/spain/DUAL.htm.

  7.  Agradecimientos

    Gracias a Xiaoming Yi, z3c20@ttacs.ttu.edu, por aclararme que estos
     procedimientos no slo funcionan en el primer disco.

    Gracias a Frank Dennler, Frank.Dennler@zkb.ch, por el truco del
     disquete.

  8.  Comentarios

  Cualquier comentario es bienvenido.

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Linux sin disco Mini-COMO
  Robert Nemkin, buci@math.klte.hu
  rodolfo@linux.org.uy
  v0.0.3 12 Sep 1996

  Este documento describe cmo configurar un sistema Linux sin disco.
  ______________________________________________________________________

  ndice General:

  1.      Copyright

  2.      Cambios

  3.      Cmo configurar una mquina Linux sin disco

  4.      Documentacin de referencia.

  5.      Hardware

  6.      Conceptos fundamentales

  6.1.    Configuracin del PC

  6.2.    Instalacin de bootpd  en el servidor

  6.2.1.  Configuracin de bootpd  en el servidor

  6.3.    tftp

  6.4.    Servidor. Instalacin mnima de Linux remota.

  6.5.    Configuracin del servidor tftp

  6.6.    ltimos retoques

  6.7.    Requerimientos de memoria y espacio en disco; velocidad

  7.      Posibles errores

  8.      Errores y posibles ampliaciones futuras de este documento

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Copyright

  Los derechos de autor son propiedad de Robert Nemkin.  La poltica de
  derechos es GPL.  Deseo agradecer a Bela Kis bkis@cartan.math.klte.hu
  por traducir este documento al ingls.

  2.  Cambios

    v0.0.3 12 Sept 1996: Correccin de pequeos errores.

  3.  Cmo configurar una mquina Linux sin disco

  Este documento trata sobre cmo configurar una mquina Linux sin
  disco.  Algunas veces puede ser necesario correr Linux en PCs que no
  tienen ni discos ni disqueteras.  Esto es posible, por ejemplo, en red
  con otro sistema Unix corriendo bootp, tftp y servidor NFS, y una
  EPROM (burner) en las mquinas Linux sin disco/disquetera.

  4.  Documentacin de referencia.

    Raz-NFS Mini COMO

    Linux NET-2/3-HOWTO de Terry Dawson, 94004531@postoffice.csu.edu.au

    /usr/src/linux/README referido a la configuracin y compilacin de
     nuevos ncleos.

  5.  Hardware

  Para preparar este documento el sistema fue chequeado utilizando la
  siguiente configuracin:

    Sun-OS 4.1.3 como servidor de arranque

    Slackware 2.3 + Linux 1.2.8 + Tarjeta ethernet Western Digital 8013

    Red Ethernet

  6.  Conceptos fundamentales

  La idea fundamental es la siguiente:  el PC buscar su direccin IP en
  el servidor de arranque va protocolo bootp, usando 0.0.0.0 como
  direccin IP inicial y recibiendo su ncleo va el protocolo tftp.
  Arrancar a travs de segmentos (va un router o encaminador) no es
  simple: se puede o bien colocar ambos, servidor y las computadoras sin
  disco, en el mismo segmento de red o configurar un asistente de
  direcciones UDP en su encaminador hacia la direccin del servidor.
  Refirase al manual de su encaminador para obtener ms informacin.

  Para hacer esto siga los siguientes pasos:

  6.1.  Configuracin del PC

  Instale el paquete nfsboot (el paquete estar disponible en su
  servidor Linux favorito en el directorio /pub/Linux/system/Linux-
  boot). Este paquete contiene la imagen de una EPROM de arranque para
  la tarjeta wd8013 que puede ser grabada directamente.

  Existen varias vas alternativas para preparar el PC:

    si la mquina no est totalmente exenta de discos, entonces es
     posible utilizar un pequeo programa DOS, o

    la imagen binaria del disquete contenida en el mismo paquete.  Si
     elije esta ltima opcin puede escribir la imagen en el disquete
     con el comando dd:

  dd if=imagen of=/dev/fd0H1440

  Estas imgenes contienen un cliente bootp y tftp. Es necesario
  preparar tambin un ncleo de Linux, el cual tenga la opcin nfs-root
  habilitada.

    Si est usando un ncleo 1.2.13, es necesario poner al da el
     ncleo con el parche includo en el paquete nfsboot. Refirase a
     patch(1)

    Si est usando uno de los ltimos ncleos (1.3.x o superior)  tiene
     que habilitar la opcin nfs-root.

  Puede o no configurar soporte para dispositivos de sistemas de archivo
  (disquetes o discos duros), pero es obligatorio habilitar soporte
  TCP/IP, soporte para tarjeta ethernet y soporte de sistema de archivos
  nfs. Y, una vez realizado esto, recompilar el ncleo de la manera
  acostumbrada.

  6.2.  Instalacin de bootpd  en el servidor

  Bootpd puede encontrarse en el paquete bootpd-2.4.tar.gz (el cual se
  obtiene de su servidor favorito de software Linux en el directorio
  /pub/Linux/system/Network/boot.net).  Obtenga el paquete, complelo e
  instlelo.  Si alguna mquina Linux tiene la distribucin Slackware,
  es posible saltarse este paso instalando la distribucin normal
  conteniendo bootpd.  El demonio se puede ejecutar directamente
  utilizando el comando

       bootpd -s

  o a travs de inetd.  En ese caso ser necesario:

  1. editar /etc/inetd.conf, eliminando la marca de comentario (#) de
     las siguientes lneas:

       # tftp    dgram  udp  wait  root  /usr/sbin/in.tftpd   tftpd   /ex
       # bootps  dgram  udp  wait  root  /usr/sbin/in.bootpd  bootpd

  2. inserte o descomente las siguientes dos lneas en el archivo
     /etc/services:

               bootps          67/tcp          # BOOTP server
               tftp            69/udp          # TFTP server

  3. reiniciar inetd usando

       kill -HUP PID_de_inetd

  6.2.1.  Configuracin de bootpd  en el servidor

  Lo primero de todo: bootpd tiene un archivo de configuracin llamado
  bootptab el cual usualmente se encuentra en /etc. Debe ser modificado
  insertando la direccin IP de su pasarela, servidor de nombres y la/s
  direccin/es ethernet de su/s mquina/s sin disco.  Un ejemplo de
  /etc/bootptab:

        global.prof:\
            :sm=255.255.255.0:\
            :ds=192.168.1.5:\
            :gw=192.168.1.19:\
            :ht=ethernet:\
            :bf=linux:
        machine1:hd=/export/root/machine1:tc=global.prof:ha=0000c0863d7a:ip=192.1
        machine2:hd=/export/root/machine2:tc=global.prof:ha=0800110244e1:ip=192.1
        machine3:hd=/export/root/machine3:tc=global.prof:ha=0800110244de:ip=192.1

    global.prof: Archivo de esquema general para las configuraciones de
     cada mquina, donde:

    sm: Corresponde a la Mscara de subred

    ds: Direccin del servidor de nombres (DNS)

    gw: Direccin de la pasarela por defecto

    ht: Tipo de hardware de red

    bf: Nombre del archivo de arranque

  Despus de esto, cada mquina debe tener una lnea:

    El primer campo contiene el nombre de la mquina

    hd contiene el directorio del archivo de arranque

    el archivo de esquema general debe ser includo en el campo tc

    ha contiene la direccin de hardware de la tarjeta de red

    ip contiene la direccin ip que se asigna

  6.3.  tftp

  TFTP (Trivial File Transfer Protocol) es un protocolo de transferencia
  de archivos, como lo es ftp, pero mucho ms simple, a fin de que quepa
  en las EPROMs.  TFTP puede ser usado de dos maneras:

     tftp simple:
        El cliente puede acceder a la totalidad de su sistema de
        archivos.  Es simple pero puede generar un gran problema de
        seguridad (cualquiera puede obtener su archivo de claves va
        tftp).

     tftp seguro:
        El servidor tftp utiliza un llamada de sistema chroot.2 para
        cambiar a su propio directorio raz.  Cualquier cosa que est
        fuera del nuevo directorio raz es completamente inaccesible, ya
        que el directorio que sufre el chroot se transforma en el nuevo
        directorio raz;  el campo hd del archivo bootptab debe reflejar
        esta nueva situacin.

        Por ejemplo:  cuando se utiliza tftp simple, el campo hd
        contiene el path o camino completo del directorio de arranque:
        /export/root/machine1. Cuando se utiliza tftp seguro con /export
        como directorio raz, entonces /export pasa a ser / y el campo
        hd debe ser /root/machine1.

  Asimismo, cada implementacin Unix contiene el servidor tftp y,
  probablemente, no sea necesario que Usted instale su propio servidor.

  6.4.  Servidor. Instalacin mnima de Linux remota.

  El servidor debe contener los paquetes a, ap, n y x de la distribucin
  Slackware.  No hay inconvenientes para instalar ms cosas; sin
  embargo, los paquetes mencionados son suficientes para los propsitos
  de una terminal X sin disco.

  Para la instalacin se necesita un sistema Linux funcionando.

  Buscar algo de espacio en disco para exportarlo para lectura-escritura
  en la mquina remota.

  Montar el directorio exportado en algn lugar (por ej. /mnt) sobre el
  sistema de archivos de la mquina Linux.

  Iniciar la instalacin de Linux y cambiar el lugar de instalacin de /
  a /mnt. Instalar los paquetes referidos de la forma usual. Si se desea
  correr slo un Linux sin disco no son necesarios ms cambios. De otra
  forma, si se planea utilizar ms de una mquina sin disco esta
  instalacin no funcionar ya que algunos archivos y directorios deben
  ser privados para cada mquina.  El problema puede ser solucionado
  moviendo /usr (que no contiene elementos privados) y creando
  subdirectorios separados para cada mquina sin disco.  Por ejemplo, si
  /export/linux/machine1 fue montado en /mnt entonces la estructura de
  directorios despus de la instalacin inicial se ver as:

  /export/linux/machine1/bin
  /export/linux/machine1/sbin
  /export/linux/machine1/lib
  /export/linux/machine1/etc
  /export/linux/machine1/var
  /export/linux/machine1/usr

  Y despus de los cambios debe de quedar:

       /export/linux/machine1/bin
       /export/linux/machine1/sbin
       /export/linux/machine1/lib
       /export/linux/machine1/etc
       /export/linux/machine1/var
       /export/linux/usr

  Ahora es posible crear los subdirectorios para las otras mquinas.
  Asumimos que las mquinas sin disco son llamadas machine1, machine2,
  machine3, etc.; puede utilizar el siguiente macro de bash para
  instalar los otros directorios:

               cd /export/linux
               for x in machine2 machine3 ; do
                       mkdir $x; cd $x
                       (cd ../machine1; tar cf - *) | tar xvf -
               done

  Una vez hecho esto, realice las siguientes exportaciones:

    /export/linux/usr: Slo lectura para todo el mundo

    /export/linux/machine1: Solamente para machine1 con permisos
     rw,root

    /export/linux/machine2: Solamente para machine2 con derechos
     rw,root

    /export/linux/machine3: Solamente para machine3 con derechos
     rw,root

  como se indica a continuacin (el formato de este ejemplo est en la
  sintaxis de SunOs 4.1.3 para export)

          # Este archivo es /etc/export
          # para terminales X con Linux remotas
          # La siguiente linea es una unica:
          /etc/root/usr                   -access=linuxnet
          # Las siguientes lineas corresponden a una por cada maquina
          /export/root/machine1           rw=machine1,root=machine1
          /export/root/machine2           rw=machine2,root=machine2
          /export/root/machine3           rw=machine3,root=machine3

  No olvidar ejecutar exportfs -a

  6.5.  Configuracin del servidor tftp

  Ahora es el momento de configurar el servidor tftp.  Si no necesita
  seguridad en el protocolo tftp todo resultar ms simple para sus
  clientes ya que arrancarn desde el directorio /export.

  Si utiliza seguridad con el protocolo tftp entonces se debe crear una
  estructura de directorio completa /export/linux bajo /tftpboot (con un
  ncleo real y enlaces simblicos para las otras mquinas), o dejar que
  el directorio /export sea el directorio de arranque para el tftp
  seguro.  O, si dispone de un directorio tftpboot separado necesita, de
  igual forma, la estructura de directorios original con un ncleo nico
  y enlaces simblicos para los otros. Se puede conseguir esta
  configuracin ejecutando lo siguiente:

       mkdir -p /tftpboot/export/linux/machine1
       cd /tftpboot/export/linux/machine1
       cp /export/linux/machine1/nombre_del_nucleo

  Teclee lo siguiente:

       mkdir -p /tftpboot/export/linux/machine2
       cd ../machine2
       ln -s ../machine1/nombre_del_nucleo

  6.6.  ltimos retoques

  Para terminar, se debe insertar:

       /sbin/mount nombre_servidor_nfs:/export/linux/usr /usr

  como la primera lnea de

       /export/linux/machineX/etc/rc.d/rc.S

  6.7.  Requerimientos de memoria y espacio en disco; velocidad

  Todo lo indicado ha sido comprobado nicamente con Slackware 2.3; para
  otras distribuciones/versiones los datos que se indican a continuacin
  pueden variar.

    Espacio en disco:  28Mb + 6.5Mb/mquina

    RAM: Yo utilizo X con 8Mb.  Para lo cual se necesita 4Mb de swap,
     el cual puede ser creado, separadamente para cada mquina, mediante
     un fichero de swap en el directorio /tmp.  No olvide ponerlo a
     punto con mkswap y swapon.

    Velocidad: No he tenido problemas con un 486 DX2/66 con 8 Mb.

  7.  Posibles errores

    Me encontr con un extrao error:  SunOS corrompi los dispositivos
     del directorio /dev, por lo que me fue necesario ejecutar MAKEDEV
     montando los subdirectorios en un disco con Linux (La razn fueron
     las diferencias entre el nfs de Linux y el de SunOS:  ambos
     utilizan 32 bit para el nmero de dispositivo Mayor y Menor, pero
     mientras Linux usa campos de tamao 16 bit para ambos, SunOS
     utiliza 14 bit para el Mayor y 18 bit para el nmero Menor de
     dispositivo)

    Cuando la mquina Linux sin disco comienza el arranque, existe
     solamente una ruta incluida en la tabla de rutas del servidor tftp,
     por lo que es necesario configurar una tabla correcta de rutado; se
     disponen de dos opciones:

     1. configurar el fichero rc.S para cada mquina a mano

     2. usar un cliente bootp y escribir un macro de configuracin

  8.  Errores y posibles ampliaciones futuras de este documento

    Corrige citas de los documentos referidos

    SunOS est basado en BSD.  Necesita la inclusin de una
     configuracin basada en SVR4 (por ej. Solaris).

    Ya que Linux es muy semejante a SunOS en sus servidores bootp y
     tftp, el ejemplo de servidor basado en Linux podra ser de
     utilidad.

    Poner al da este documento con el paquete actual etherboot.

    Mostrar las diferencias entre ncleos con nfs-root incluido como
     parche y ncleos, posteriores al 1.3.x, que ya contengan nfs-root
     como opcin.

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  LS en Color COMO
  V. Inglesa: Thorbjoern Ravn Andersen ravn@imada.ou.dk
  V. Espaola: Toms Hidalgo, Guy Paul Gallardo thidalgo@albo
  ran.ualm.es
  v1.0, 15 de Noviembre 1996

  El comando ls includo en la distribucin Slackware de linux permite
  color. (Slackware 2.0.2 y ncleo 1.1.54 de Linux. Funciona tambin con
  agetty, o bien con mgetty_ps). Puede que los colores por defecto no le
  gusten o que les haya cogido mana. Este documento tiene como objetivo
  explicar el principio de funcionamiento y configuracin de colores
  usados por este comando.
  ______________________________________________________________________

  ndice General:

  1.      Cmo seleccionar los colores?

  2.      Cules son las combinaciones de colores posibles?

  2.1.    Inciso del traductor espaol.

  3.      Aspecto por tipos de ficheros.

  4.      Cmo dar una configuracin por defecto.

  5.      Copyright

  6.      La traduccin.

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Cmo seleccionar los colores?

  Existen dos mtodos:

    Primer mtodo:
     Utilizar el programa setterm que es vlido para una modificacin
     rpida y simple de la configuracin por defecto. Los manuales y
     ayudas de este comando estn escritos de forma farragosa y no
     intentar de ninguna manera traducirlos ms claros ;-).

     Las selecciones se realizan de la forma:

                setterm -foreground black -background white -store

  donde -store significa que dicha configuracin es grabada por defecto
  en la consola activa. Sera necesario repetir esta operacin para cada
  consola virtual nueva, por lo que parece una buena idea colocar esta
  lnea en el .login (en csh o tcsh) o en el .profile (sh, ksh o bash).
  En adelante sabr tanto sobre el comando setterm como yo :-).

    Segundo mtodo: Linux usa cdigos de escape ANSI del tipo:
     ESC[<parmetros>m donde ESC es el carcter ASCII 27 y <parmetros>m
     es uno o varios nmeros separados por puntos y comas. Por ejemplo:

    "\033[41;33;1m" que da un aspecto amarillo sobre fondo rojo.

    "\033[30;47m" que da un aspecto blanco sobre fondo negro.

    "\033[m" que restablece el aspecto por defecto.

     Estos ejemplos necesitan un shell que reconozca las construcciones
     del tipo \xxx. Si no es el caso, inserte directamente un carcter
     de escape en la cadena. En bash/vi teclee Ctrl-V ESC, y bajo
     tcsh/emacs teclee Ctrl-Q ESC.

  2.  Cules son las combinaciones de colores posibles?

  Este es un script en C-shell que muestra en la consola el conjunto de
  combinaciones de colores:

       ______________________________________________________________________

        #!/bin/csh
        #
        # Muestra los colores ANSI
        #
        set esc="\033["
        foreach fore (30 31 32 33 34 35 36 37)
        set line1="\*(dRfore " line2="  "
        foreach back (40 41 42 43 44 45 46 47)
        set line1="\*(dR{line1}\*(dR{esc}\*(dR{back};\*(dR{fore}m Normal \*(dR{esc}0m"
        set line2="\*(dR{line2}\*(dR{esc}\*(dR{back};\*(dR{fore}1m \*(dR{back} Bold \*(dR{esc}0m"
        end
        echo "\*(dRline1\n\*(dRline2"
        end

       ______________________________________________________________________

  El nmero de colores foreground crece hacia la izquierda, y el nmero
  de colores background sigue la misma norma. Si desea una intensidad
  alta coloque 01 como primer parmetro. Ponga un punto y coma entre
  cada parmetro y toda la secuencia de parmetros seguida.

  2.1.  Inciso del traductor espaol.

  Para una mayor facilidad a la hora de poder elegir el aspecto de
  colores para el comando ls se describen a continuacin la
  correspondencia entre los nmeros y los colores de las secuencias de
  escape.

  Funciones Grficas

    0............Desactivar todos los atributos

    1............Activar negrita (alta intensidad)

    4............Subrayar (slo en adaptadores monocromo)

    5............Activar parpadeo

    7............Activar vdeo inverso

    8............Activar ocultamiento

       Colores Primer Plano (Foreground)            Colores de Fondo (Background)

                30.....................Negro....................40
                31.....................Rojo.....................41
                32.....................Verde....................42
                33.....................Amarillo.................43
                34.....................Azul.....................44
                35.....................Magenta..................45
                36.....................Azul verdoso.............46
                37.....................Blanco...................47

  3.  Aspecto por tipos de ficheros.

  El comando ls comienza por mirar la definicin de asociaciones de
  color en el fichero ~/.dir_colors y si no existe usa el fichero
  /etc/DIR_COLORS. Dichos ficheros contienen entradas del tipo:

              LINK 36;1      # enlace simbolico
              FIFO 40;33     # pipeline
              SOCK 41;01;35  # socket
              BLK 41;33;01   # gestor en modo bloque
              CHR 41;33;01   # gestor en modo caracter

              EXEC 32;1      # ficheros ejecutables

              .tar 01;31     # ficheros y archivos comprimidos
              .tgz 01;31
              .zip 01;31
              .z   01;31
              .Z   01;31
              .gz  01;31

  Las secuencias de escape dadas en parmetros aqu poseen exactamente
  la misma sintaxis que para el comando setterm. Modifique esto a su
  gusto y ver el resultado ejecutando un ls en /sbin, /etc o /etc/dev.

  Con el fin de que el fichero /etc/DIR_COLORS o ~/.dir_colors sea
  tomado en cuenta es necesario aadir en /etc/profile o ~/.profile
  (sh/bash) o /etc/csh.login o ~/.login (csh/tcsh) la lnea:

       eval '/bin/dircolors'

  ATENCIN: Esta lnea debe ser colocada antes de cualquier definicin
  de alias para el comando ls. Este comando lee el fichero
  /etc/DIR_COLORS o ~/.dir_colors y une las variables de entorno
  LS_COLORS y LS_OPTIONS as como  los alias ls, dir, vdir, d y v.

  4.  Cmo dar una configuracin por defecto.

  Esto es realizado individualmente para cada consola virtual con la
  ayuda de la secuencia ANSI. (Esta informacin ha sido encontrada
  estudiando el cdigo fuente del ncleo. No puedo decir que se trate de
  un estndar.)

       ESC [8]

  que especifica los valores por defecto de colores foreground y
  background. La secuencia ANSI de recomposicin de atributos, ESC[m,
  permite entonces tener en cuenta esos colores antes que el blanco
  sobre fondo negro.

  El mtodo descrito aqu se ha supuesto para sistemas aislados, donde
  los accesos se hacen slo en la consola. Esto no funciona para logins
  realizados desde terminales remotos, conexiones por mdem o desde
  otras mquinas, ya que no interpretaran las secuencias. La
  interpretacin de cdigos ANSI es una propiedad de las consolas Linux
  y que slo existe en pocos programas de terminal.

  Si se encuentra en un sistema aislado, un buen medio de tener en
  cuenta los colores para cada consola es la de modificar el fichero
  /etc/issue, y ver el resultado generado. Generalmente (y en particular
  en las distribuciones Slackware) este fichero es ledo y mostrado en
  cada inicializacin del sistema. As si su /etc/rc.d/rc.S contiene
  (alrededor de la lnea 75):

           # Inicializa /etc/issue y etc/motd para dar la version del nucleo usado
           # ATENCION: los ficheros /etc/issue y /etc/motd son creados en cada inicio
           # Ponga esto en comentario si desea personalizar para siempre todos
           # estos ficheros.
           echo "">/etc/issue
           echo Bienvenido al mundo maravilloso de Linux \
                '/bin/uname -a | /bin/cut -d\ -f3'.>>/etc/issue
           echo >> /etc/issue

  Coloque estas lneas en comentario o modifquelas como sigue:

           # Ponga esto en comentario si desea personalizar para siempre todos
           # estos ficheros.
           ESCAPE="<sustituir esto por un solo caracter de escape>"
           echo "${ESCAPE}[H${ESCAPE}[37;44m${ESCAPE}[8]${ESCAPE}[2J">/etc/issue

  Mi shell de arranque no entiende el \033, debo especificar el cdigo
  ASCII 27 en mi script como indiqu en el primer prrafo. La lnea
  posee el aspecto:

       ESCAPE="^[".

  Este cdigo tiene por objeto colocar el cursor al principio de la
  ventana, cambiar los colores, salvar la seleccin y borrar la
  pantalla.  Dicha modificacin solo tendr efecto al reinicializar la
  mquina.

  Si su mquina Linux no est aislada, puede que aparezcan diversos
  problemas en las conexiones con usuarios remotos. Esto es debido al
  hecho de que su terminal no interpreta las secuencias de escape ANSI.

  Debe entonces ajustar a nivel de usuario:

        if ["\*(dRTERM"="console"]; then
          echo "\033[37;44m\033[8]"
        fi

  o bien,

        if ("\*(dRTERM"=="console") then
          echo "\033[37;44m\033[8]"
        endif

  Si se desea que la modificacin afecte a todos los usuarios del
  sistema, basta tan slo con que el root modifique los ficheros
  /etc/profile o /etc/csh.login. (Reitero una vez ms que si el shell no
  puede interpretar los \0xx, en particular el cdigo \033, basta con
  sustituir este ultimo por "ESC".

  5.  Copyright

  Esta versin bajo copyright (c)1995 es propiedad de Pierre
  Vassellerie.

  Como todo documento HOWTO (-- N del T: COMOs--) , este documento puede
  ser reproducido y distribuido en su integridad o en parte, por
  cualquier medio fsico. A pesar de todo queda sujeto a las condiciones
  siguientes:

    La mencin del copyright debe ser conservada, y la presente seccin
     debe preservarse en su integridad en toda copia, tanto completa
     como en parte.

    Las traducciones y trabajos derivados deben ser aprobadas por el
     autor antes de la distribucin.

    Si distribuye este trabajo parcialmente, debe mencionarse como
     obtener una versin completa de este documento y estar en
     condiciones de suministrarla.

    Pueden ser usadas pequeas porciones de este documento como
     ilustraciones de una revista o como reseas sin autorizacin previa
     siempre que se cite a los autores.

  Pueden ser acordadas excepciones a estas reglas con fines educativos;
  escriba al autor y pregunte. Estas restricciones tiene como nico
  objetivo proteger a los autores y su trabajo. Toda aportacin
  educativa a este documento ser valorada positivamente.

  6.  La traduccin.

  Este documento ha sido traducido por Toms Hidalgo Salvador para el
  grupo de usuarios de Linux INSFLUG coordinado por Francisco Jos
  Montilla.

  Dicha traduccin se encuentra amparada por los mismos derechos
  expresados en la seccin ``''.

  Toms Hidalgo Salvador, thidalgo@alboran.ualm.es

  7.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Navegador Pblico en Linux mini-COMO
  Donald B. Marti Jr., dmarti@best.com dmarti@best.com
  por Mauricio Rivera Pineda, rmrivera@hotmail.com
  v0.3, 5 Enero de 1998. Traducido el 14 de Octubre del 99.

  La idea bsica es la dar acceso WWW al pblico, pero limitando la
  posibilidad de desconfigurar el sistema, limitando su entorno nica
  mente al navegador.
  ______________________________________________________________________

  ndice general


  1. Derechos reservados

  2. Introduccin

  3. Antes de comenzar

     3.1 Necesitar un navegador grfico
     3.2 Debe tener la posibilidad de crear una cuenta de usuario.
     3.3 Necesita

  4. Agregue la cuenta invitado

  5. Creacin de los archivos para

     5.1 (TT
     5.2 (TT
     5.3 (TT
     5.4 (TT

  6. Cree un directorio

  7. Comprubelo

  8. Cambio de preferencias

  9. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Derechos reservados


  Derechos reservados 1997 Donald B. Marti Jr.  Este documento puede ser
  distribuido bajo los trminos de la licencia del Linux Documentation
  Project.

  Actualmente este documento contiene informacin para el Navegador
  Netscape nicamente, pero planeo agregar unas notas para otros
  navegadores tambin, en la medida que obtenga la informacin
  necesaria. Si prueba esto con otro navegador, hgamelo saber.


  2.  Introduccin


  La idea bsica aqu es la de dar acceso al WWW a la gente, pero
  limitando su capacidad de desconfigurar el sistema.

  El objetivo es proporcionar un entorno restringido, que posibilite el
  uso nicamente del navegador, y nada ms.

  Originalmente, esta configuracin fue proyectada para ferias
  comerciales, pero puede ser aplicable para otras situaciones en que
  usted quiera tener navegadores web disponibles para el pblico, sin
  que haya necesidad de tener una niera al lado del equipo.

  El seguir las instrucciones que se detallan a continuacin, no
  garantiza que su sistema se vuelva ni a prueba de balas ni de tontos.


  3.  Antes de comenzar



  3.1.  Necesitar un navegador grfico


  Este documento asume que usted ya tiene en su sistema un navegador
  grfico web, tal como Netscape. Debe tener permisos para ejecutar el
  navegador. Si quiere utilizar Netscape en un ambiente comercial, puede
  comprar una copia con la licencia apropiada.


  3.2.  Debe tener la posibilidad de crear una cuenta de usuario.


  Si usted no tiene el derecho de ser root (superusuario), consiga que
  el administrador del sistema agregue la cuenta invitado y obtenga la
  propiedad sobre el directorio hogar del usuario invitado.  Una vez
  halla logrado esto, salte al paso ``Crear o editar los siguientes
  archivos en el directorio <tt>/home/invitado</tt>''.


  3.3.  para navegar, desconectada de la red Necesita httpd  en caso que
  tenga una estacin


  Si est configurando una estacin de navegacin web para un sistema
  desconectado de una red, debe tener corriendo httpd; adems necesita
  tener los documentos web instalados en su equipo. Para saber si esto
  es as, ejecute:




       lynx -dump http://localhost/




  Debera obtener el texto de la pagina web de su sistema.


  4.  Agregue la cuenta invitado


  Siendo root, ejecute adduser para agregar un usuario llamado invitado.
  Luego teclee:



       passwd invitado





  para darle una contrasea a la cuenta invitado.  Esta contrasea debe
  ser algo fcil de recordar, como invitado.  Usted har pblica esta
  contrasea. No haga que coincida con su propia contrasea.

  Luego haga que el directorio hogar del usuario invitado le pertenezca
  a usted. Ejecute



       chown yo.migrupo /home/invitado




  Reemplace yo con su propio nombre de usuario, y migrupo con el nombre
  de su grupo.  (En Red Hat Linux, estos dos coincidirn, puesto que el
  nombre de cada usuario es igual que el nombre de su grupo primario.)

  Ahora deber salir para pasar a hacer los siguientes pasos como usted
  mismo, y no como root.


  5.  Creacin de los archivos para /home/invitado



  5.1.  .bashrc




       exec startx




  Esto significa que, cuando el usuario invitado entre en el sistema, el
  shell de ingreso iniciar, inmediatamente, el entorno grfico XWindow.


  5.2.  .Xclients




       netscape




  Esto significa que cuando X arranque, el usuario invitado solamente va
  a obtener el navegador web, sin manejador de ventanas. Si usted
  prefiere otro navegador tendr que modificar esta instruccin.

  El archivo .Xclients debe de tener permisos de ejecucin para el
  usuario invitado. Ejecute



       chmod 755 /home/invitado/.Xclients




  para lograr esto.

  5.3.  .xsession




       #!/bin/sh
       netscape




  Si usa xdm(1) para que la gente ingrese al sistema, este archivo
  deber hacer que el invitado obtenga el navegador web como si hubiera
  ingresado normalmente. El archivo .xsession debe ser ejecutable por el
  usuario invitado. Teclee




       chmod 755 /home/invitado/.xsession




  para lograr esto.


  5.4.  .Xdefaults




       ! Deshabilite drag-to-select.
       *hysteresis:                            3000

       ! Haga que los enlaces visitados del mismo color que los enlaces no visitados
       *linkForeground:                        #0000EE
       *vlinkForeground:                       #0000EE

       Netscape.Navigator.geometry: =NETSCAPE_GEOMETRY

       ! Deshabilite los comandos del teclado.
       *globalTranslations:

       ! Atajos con el Raton: haga que todos los botones del raton hagan lo mismo.
       *drawingArea.translations:              #replace           \
       <Btn1Down>:                     ArmLink()                      \n\
       <Btn2Down>:                     ArmLink()                       \n\
       <Btn3Down>:                     ArmLink()                       \n\
       ~Shift<Btn1Up>:                 ActivateLink()                  \
                                       DisarmLink()                    \n\
       ~Shift<Btn2Up>:                 ActivateLink()                  \
                                       DisarmLink()                    \n\
       ~Shift<Btn3Up>:                 ActivateLink()                  \
                                       DisarmLink()                    \n\
       Shift<Btn1Up>:                  ActivateLink()                  \
                                       DisarmLink()                    \n\
       Shift<Btn2Up>:                  ActivateLink()                  \
                                       DisarmLink()                    \n\
       Shift<Btn3Up>:                  ActivateLink()                  \
                                       DisarmLink()                    \n\
       <Btn1Motion>:                   DisarmLinkIfMoved()             \n\
       <Btn2Motion>:                   DisarmLinkIfMoved()             \n\
       <Btn3Motion>:                   DisarmLinkIfMoved()             \n\
       <Motion>:                       DescribeLink()                  \n\

  Este archivo deshabilita los marcadores intermitentes, arrastrar para
  seleccionar y algunos comandos del teclado.

  Tambin hace que los botones del raton hagan lo mismo, esconde la
  barra del men, y hace que los enlaces visitados y los no visitados
  tengan el mismo color, de esta forma cada visitante obtiene unos
  enlaces limpios y azules, y no unos enlaces prpura sobre los cuales
  otras personas hayan pasado.

  Debe situar la variable NETSCAPE_GEOMETRY en este archivo con una
  geometra X que se vea as: XxY+0-0, donde X es el ancho de su
  pantalla e Y es la altura de su pantalla +32. Esto situar la barra
  del men de Netscape por fuera de la parte de arriba de la pantalla,
  de esta forma el usuario no sera distraido.  Por ejemplo, si su
  pantalla es 800x600, la geometra debe ser 800x632+0-0.

  6.  Cree un directorio .netscape  para el usuario invitado


  Teclee



       mkdir /home/invitado/.netscape
       chmod 777 /home/invitado/.netscape




  para crear el directorio .netscape del usuario invitado y otorgar
  acceso de escritura para todos los usuarios.


  7.  Comprubelo


  Salga de la cuenta, e ingrese como el usuario invitado.


  8.  Cambio de preferencias


  Puesto que no podr usar la barra del men como el usuario invitado,
  deber editar las preferencias del invitado manualmente en caso de que
  tenga que cambiarlas. O bien, puede cambiar las preferencias en el
  navegador que usa en su cuenta de usuario personal de la forma en que
  quiere tenerlas en la cuenta invitado, y luego copiar el archivo de
  preferencias de su cuenta personal a la cuenta invitado.


  9.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.


























































  la traduccin 7 de Junio de 1998 Puntero X Gigante
  Jrg Schneider, joerg.schneider@ira.uka.de.
  Santurtn, iosu@bigfoot.com.
  v2, 11 de Agosto de 1997. Fecha de

  Este documento describe cmo usar punteros agrandados con el sistema X
  Window.
  ______________________________________________________________________

  ndice general


  1. Introduccin

  2. Acerca de este documento

  3. Cmo se hace

  4. Notas y limitaciones

  5. Discusin tcnica

  6. Otras ideas para hacer el puntero del ratn ms visible

  7. Informacin relacionada

     7.1 Cmo usar un servidor de tipos
     7.2 Instalar un servidor de tipos

  8. Cmo conseguir la fuente bdf para algn tipo

  9. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Introduccin


  Hay numerosas razones por las que el puntero X normal es difcil de
  seguir para algunas personas:


    al usar un sistema X en una agenda con pantalla LCD de bajo
     contraste.

    al utilizar pantallas normales con alta resolucin, p.e.
     1600x1200.

    al tratarse de impedidos visuales incluso utilizando un hardware
     normal.

  En todos los casos ayudara el uso de punteros de ratn agrandados.
  Idealmente esta tarea la debera realizar u nico programa X que
  automticamente agrandase todos los punteros del ratn.

  Por lo que yo s, no hay una forma fcil de hacer sto, ya que el
  protocolo X no prevee examinar los punteros del ratn. Para ms
  detalles, vase la seccin ``Discusin tcnica''

  Si nos ponemos una meta menos general, sin embargo, se puede hacer
  algo:

  Hay un conjunto de punteros estndar que se pueden encontrar en el
  tipo cursor (pruebe xfd -fn cursor para verlos).  La mayora de los
  programas usan estos punteros y la idea clave es reemplazar estos
  punteros con otros mayores.


  2.  Acerca de este documento


  La motivacin de este mini-COMO fue un compaero de estudios con
  discapacidad visual que me pregunt como agrandar el puntero de ratn
  bajo un sistema X. Una vez que encontr cmo hacer aquello, escrib
  una versin inicial de este documento. El conocimiento sobre el mtodo
  aqu descrito no parece ser muy general, as que decid compartirlo y
  envi este documento como un mini-COMO Linux, a pesar del hecho de que
  no es en absoluto especfico de Linux. Como el resto de mini-COMOs se
  puede encontrar en el servidor del LDP (Linux Documentation Project)
  http://unc.sunsite.edu/LDP/HOWTO/.

  (-- N.del T.
  mini-COMOs, se puede consultar el servidor de INSFLUG en
  http://www.insflug.org.--)


  El original de este documento
  http://i11www.ira.uka.de/~schneid/X11-big-cursor/master/ (N.del T. as
  como su traduccin) se mantiene en formato SGML/linuxdoc.  Esto hace
  posible proporcionar automticamente versiones en los siguientes
  formatos (que se pueden encontrar en el mismo lugar que el original):
  html, texto, LaTeX, DVI, PostScript, GNU info.

  Shinobu Miyata shinobu@emichan.rim.or.jp ha traducido este mini-COMO
  al japons. Se puede encontrar en
  http://i11www.ira.uka.de/~schneid/jp/X11-big-cursor/


  3.  Cmo se hace


  Siga los pasos indicados debajo. Si no quiere obtener y compilar el
  paquete bfdresize, puede saltarse los pasos 1 y 2 y descargar una
  fuente aumentada en lugar de crearla.


  1. obtenga cursor.bdf, la fuente del tipo cursor, de alguna
     distribucin X, por ejemplo de
     ftp://ftp.x.org/pub/R6.3/xc/fonts/misc/cursor.bdf (si no lo
     encuentra all pruebe una bsqueda archie o descrguelo de mi copia
     en http://i11www.ira.uka.de/~schneid/X11-big-cursor/cursor.bdf)

  2. obtenga, compile e instale el paquete bdfresize de
     ftp://ftp.cs.titech.ac.jp/X11/contrib/Local/bdfresize-1.4.tar.Z (o
     de mi copia en http://i11www.ira.uka.de/~schneid/X11-big-
     cursor/bdfresize-1.4.tar.gz):



               zcat bdfresize-1.4.tar.Z | tar xf -
               cd bdfresize-1.4
               xmkmf
               make





  En Linux probablemente tenga que usar:

               make CCOPTIONS='-include /usr/include/bsd/bsd.h' clean all





  3. cree un directorio e instale el tipo agrandado cursor en l (factor
     de agrandado 2 en este ejemplo)



               mkdir $HOME/fonts
               bdfresize -f 2 cursor.bdf | bdftopcf > $HOME/fonts/cursor2.pcf
               mkfontdir $HOME/fonts





  He preparado algunos tipos cursor en
  http://i11www.ira.uka.de/~schneid/X11-big-cursor/fonts/ con los sigu
  ientes factores de aumento: 1.5, 2, 2.5, 3, 4, 5, 6, 7, 8 y 16.  Puede
  descargar uno de ellos y copiarlo a $HOME/fonts si no quiere usar
  bdfresize.

  4. modifique su .xinitrc o .xsession: antes de arrancar ningn cliente
     (que use punteros) hay que ejecutar los siguientes comandos:



               xset +fp $HOME/fonts
               xsetroot -cursor_name X_cursor





  5. abandone su sesin X y reinicie.

  Eso es todo -- ahora todos los punteros del ratn deberan ser el
  doble de grandes.


  4.  Notas y limitaciones



    Los servidores X pueden tener un lmite mximo en el tamao del
     puntero, sobre todo si usan una implementacin hardware del
     puntero. Otros no tienen tal limitacin, p.e. XF86_S3 funciona
     incluso con un puntero de 512x512 (aunque bastante lentamente).

    El tipo agrandado cursor debe tener el mismo nombre que el tipo
     original; (el nombre de tipo debe ser cursor, el nombre del fichero
     no importa) eso no es problema ya que bdfresize no cambia el nombre
     del tipo.

    El directorio con el nuevo tipo cursor debe colocarse antes que el
     directorio con el tipo cursor estndar en el path de los tipos --
     esto se lleva a cabo con xset +fp (al contrario que con xset fp+).

    Los cambios en $HOME/fonts solamente sern visibles despus despus
     de los comandos:



          mkfontdir $HOME/fonts
          xset fp rehash





  y slo en clientes X arrancados de nuevo (ms exctamente: para pun
  teros creados nuevamente).

    xset +fp path puede que no funcione en un terminal X. En este caso
     se puede usar un servidor de fuentes si es soportado por el
     terimnal X (vase la seccin ``Cmo usar un servidor de tipos'')  u
     otro mtodo para instalar el tipo en el terminal X (normalmente
     esto solo lo puede hacer el administrador del sistema).

    La misma idea se puede usar para los tipos olcursor y decw$cursor y
     otros tipos de puntero que se puedan encontrar.

    Los tipos puntero generados por bdfresize no son suaves,
     especialmente con un factor de modificacin grande. Sera agradable
     si alguien pudiese crear una versin ms bonita a mano, de los
     tamaos ms comunes.


  5.  Discusin tcnica


  Cmo escribir un programa que agrande los punteros en X
  automticamente



     solucin 1
        Usar XTestCompareCursor de la extensin XTEST.  Para todas
        aquellas ventanas en las que entre el puntero del ratn,
        comparar el puntero con un grupo de punteros 'conocidos' (p.e.
        con los del tipo cursor). Si se encuentra el puntero,
        sustituirlo con el puntero agrandado, si no, dejarlo o sustituir
        un cursor estndar. Esto solo funciona si la extensin XTest
        est disponible.


     solucin 2
        Escribir un servidor X proxy que deje pasar las peticiones de
        los clientes al servidor X real, y que intercepte todas las
        peticiones correspondientes a las funciones de Xlib
        XCreate*Cursor.  Las peticiones XCreate*Cursor deberan ser
        modificadas para usar un puntero mayor.

        Este servidor proxy simula una nueva pantalla, p.e. :1. Todos
        los clientes que se conecten a esta pantalla (p.e xterm -display
        :1) se muestran en el servidor real (normalmente :0) y sus
        punteros de ratn son agrandados automticamente. Los punteros
        de los clientes que se conecten a :0 permanecern sin cambios.



  6.  Otras ideas para hacer el puntero del ratn ms visible


  He aqu algunas ideas para programas sencillos que podran hacer ms
  fcil el seguimiento del puntero del ratn.



    Cuando se pulse una determinada tecla (o combinacin de teclas)
     mostrar algo (un cursor grande, una ventana pequea, una ventana
     con una forma determinada) en la posicin actual del puntero
     durante medio segundo.

    Usar XRecolorCursor para cambiar el color del puntero cada dcima
     de segundo.

  Un proyecto ms exigente sera la estela del ratn al estilo de
  windows, por ejemplo, cuando se mueve el ratn y el puntero tiene que
  ser pintado en una posicin diferente, el antiguo no desaparece al
  momento, sino despus de un cierto retraso. Las estelas del ratn
  posiblemente fuera mejor implementarlas en el propio servidor, pero
  tambin se podra hacerlo como un cliente X, o mejor como un servidor
  proxy (Vase la seccin ``Discusin tcnica'').


  7.  Informacin relacionada



  7.1.  Cmo usar un servidor de tipos


  Un servidor de tipos es un servicio de red que proporciona un conjunto
  de tipos X11 con un protocolo simple. Se le puede consultar qu tipos
  proporciona y servir el mapa de bits de un tipo determinado a
  peticin.

  Podra usarse el servidor de fuentes para proporcionar al servidor X
  el tipo cursor modificado, en lugar de decirle dnde encontrarlo en el
  sistema de ficheros.

  Este sistema es especialmente apropiado si se utilizan varias mquinas
  que no comparten u sistema de ficheros comn o si se utilizan
  terminales X que soporten el protocolo del servidor de tipos.

  Un programa de servidor de tipos y algunas herramientas asociadas
  viene con la distribucin X11R5+ (hasta donde yo s).


  7.2.  Instalar un servidor de tipos


  Lea las pginas del manual fs(1), fslsfonts(1) (o xfs(1),
  xfslsfonts(1) bajo X11R6) e intntelo, no es difcil. Digamos que el
  servidor est funcionando en un.ordenador.edu en el puerto 7100. Se
  puede probar la instalacin haciendo



               fslsfonts -server un.ordenador.edu:7100




  Para utilizar realmente el servidor lance el comando



               xset +fp tcp/un.ordenador.edu:7100





  que debera devolver un mensaje de error.


  8.  Cmo conseguir la fuente bdf para algn tipo


  Si ha instalado un servidor de tipos, simplemente use fstobdf, que
  viene con el servidor de tipos.  Como alternativa, puede probar con
  getbdf que puede volcar cualquier tipo X11 instalado a un fichero.


  9.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En lla encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.






















  Ratones de 3 botones: Mini-Como
  Geoff Short, grs100@york.ac.uk
  Traducido por Iaki Martnez Dez, imd@redestb.es
  v1.06 2 de Julio de 1996

  Cmo configurar adecuadamente un ratn para que funcionen los tres
  botones
  ______________________________________________________________________

  ndice General:

  1.      Renuncia de responsabilidad

  2.      Introduccin

  3.      Puertos Serie.

  4.      Ratones con interruptor.

  5.      Ratones Normales

  6.      Cambiando a modo 3 botones.

  7.      Uso de gpm  para intercambiar los modos del ratn.

  8.      Ficheros de ejemplo XF86Config  y Xconfig .

  8.1.    Ratn serie Microsoft

  8.2.    Ratn serie Microsoft con emulacin 3 botones:

  8.3.    Ratn de 3 botones MouseSystems

  8.4.    Ratn serie Microsoft con gpm -R

  9.      Instalaciones y problemas en general.

  10.     Modelos testeados.

  11.     La cola del ratn.

  12.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Renuncia de responsabilidad

  El siguiente documento es ofrecido en buena fe as como contiene
  procedimientos y programacin segura nicamente. Ninguna
  responsabilidad ser aceptada por el autor por cualquier prdida o
  dao causado en cualquier modo a cualquier persona o equipo, como
  consecuencia directa o indirecta del seguimiento de estas
  instrucciones.

  2.  Introduccin

  Podrs encontrar la versin ms reciente de este documento en
  http://kipper.york.ac.uk/mouse.html

  La mayora de aplicaciones X estn escritas asumiendo que el usuario
  estar trabajando con un ratn de 3 botones. Los ratones serie son
  usados comnmente en ordenadores, siendo baratos de comprar. Muchos de
  estos ratones tienen 3 botones y afirman usar el protocolo Microsoft,
  lo cual significa en teora que son ideales para la configuracin de X
  Window.

  La mayora de los ratones de protocolo doble trabajarn en 2 modos:

    Modo Microsoft de 3 botones.

    Modo MouseSystems de 3 botones.

  Este documento conduce a travs de los diferentes pasos necesarios
  para configurar el ratn en estos dos modos, especialmente los pasos
  necesarios para usar el modo 3 botones, que es ms til.

  3.  Puertos Serie.

  La primera cosa a realizar es asegurarse de que el software puede
  encontrar el ratn. Determinar a qu puerto serie esta conectado el
  ratn --normalmente estar en  /dev/ttyS0 (COM1) o /dev/ttyS1
  (COM2).-- (ttyS0 es normalmente la clavija de 9 patillas (pins), ttyS1
  la de 25 patillas, pero por supuesto no es en absoluto obligatorio).
  Hacer un nuevo enlace /dev/mouse apuntando al puerto del ratn. Por
  ejemplo: para COM1:

       ln -s /dev/ttyS0 /dev/mouse

  4.  Ratones con interruptor.

  Algunos ratones, los ms baratos casi nunca, tienen un interruptor con
  la leyenda ``3/2''. Algunas veces puede ser ``PC/MS''.

  El interruptor ``PC/MS'' es un poco ms complicado. Posiblemente haya
  notado que la posicin ``MS'' es para protocolo Microsoft, y el ``PC''
  para MouseSystems. Puede que haya visto descrita la posicin ``PC''
  como ps/2, no obstante, funcionar como MouseSystems tambin.  Si
  posee un ratn de este tipo, puede colocar el interruptor en la
  posicin ``3'' o ``PC'', configurarlo como MouseSystems en sus
  XConfigs (ver ms adelante) y el ratn debera funcionar perfectamente
  en modo 3 botones.

  5.  Ratones Normales

  Si no se tiene ningn interruptor, y no hay instrucciones, entonces se
  requiere un poco de experiencia. La primera cosa a intentar es asumir
  que el fabricante del ratn esta diciendo la verdad, y que el ratn es
  completamente Microsoft. Configure el fichero XF86config para que
  espere encontrar un ratn Microsoft (ver ms adelante) y darle una
  oportunidad.

  Si el ratn no funcion en absoluto, entonces no es un ratn Microsoft
  o hay algn otro problema. Pruebe con los otros protocolos en las
  configuraciones, la pgina de ayuda para el fichero de configuracin
  es el mejor lugar para empezar a buscar. Mire tambin en la seccin
  ``'' ms adelante.

  Probablemente lo que ocurra es que al ejecutar X, el ratn funcionar
  bien pero slo los botones de los extremos hagan algo. Se puede, por
  supuesto, aceptar esto, y emular el tercer botn (pulsando ambos
  botones al mismo tiempo para simular el central) como se hara con un
  ratn de dos botones.  Para hacer esto, cambiar el fichero de
  configuracin como se muestra en la seccin ``'' ms adelante. Esto
  puede ser debido a que se compr un ratn de 3 botones por ninguna
  razn especialmente, cosa que seguro no volver a hacer. Por lo que a
  partir de ahora ser necesario tener ms en cuenta el hardware.

  6.  Cambiando a modo 3 botones.

  Incluso los ratones baratos pueden funcionar con el protocolo Mouse
  Systems, con los tres botones funcionando. El truco es conseguir que
  el ratn piense que es un Mouse Systems, algo que raramente ver en el
  manual.

  Antes de encender el ordenador, mantener pulsado el botn izquierdo
  (mantenindolo pulsado hasta que haya arrancado el ordenador, para
  estar seguro).

  Cuando llega corriente por primera vez al ratn, si el botn derecho
  est pulsado, se cambia a modo Mouse Systems. Un hecho simple, pero no
  siempre publicado. Tenga en cuenta que un reset en caliente puede no
  cortar la corriente al ratn, y por lo tanto puede no funcionar. Hay
  otras muchas formas de cambiar de modo, que podrn o no funcionar con
  un ratn en particular.  Alguna de ellas son menos drsticas que
  rearrancar el ordenador, menos una, que es peor!.

  Si el ordenador get-at-able, se puede desenchufar el ratn y volverlo
  a enchufar con el botn izquierdo pulsado, aunque yo por supuesto no
  recomiendo esto ya que no todos los ordenadores permiten enchufar
  cosas cuando estn en marcha (con corriente).

  Se puede resetear el ratn tecleando

       echo "*n" > /dev/mouse

  que debera tener el mismo efecto que desenchufarlo. Mantener el botn
  izquierdo pulsado para pasar al modo Mouse Systems, no para el modo
  Microsoft.  Se puede poner esto en cualquier script que se use para
  iniciar X.

  Bob Nichols, rnichols@interaccess.com ha escrito un pequeo programa
  en C para hacer lo mismo, que puede que funcione si echo "*n" no lo
  hace. Puede encontrar una copia del cdigo fuente en
  http://kipper.york.ac.uk/src/fix-mouse.c

  Alguien han comunicado que la lnea ``ClearDTR'' en el XF86Config es
  suficiente para cambiar sus ratones al modo Mouse Systems.

  Si es lo suficientemente valiente, abra el ratn (recuerde que esto
  invalidar su garanta) y eche un vistazo a su interior. En algunos
  casos, puede que el ratn tenga un interruptor interior, por alguna
  extraa razn conocida slo por el fabricante. Es ms probable, en
  ratones baratos, que haya un jumper que pueda cambiar. El interruptor
  o jumper (-- N. del T. Puente de latn o cable empleado para conmutar
  circuitos, tpicos en placas base y tarjetas de expansin hardware.--)
  pueden tener el mismo efecto que que el conmutar entre ``MS/PC'' como
  se describe en la seccin ``'' anterior.

  Puede que se encuentre tambin con que el circuito de la placa est
  diseado para conmutar entre los modos 2 y 3 botones, pero que no ha
  sido implementado.  Tendr el siguiente aspecto:

                -----------
               | o | o | o |  SW1
                -----------
                 1   2   3

  Intente unir las patillas (pins) 1-2 o 2-3, y vea si cambia el
  comportamiento del ratn. Si lo hace, se puede colocar un pequeo
  interruptor, o puede soldar los contactos para una solucin rpida y
  permanente.

  Es posible que necesite mantener presionado el botn izquierdo cuando
  arranque XWindow. Algunos sistemas pueden enviar algn tipo de seal
  al ratn cuando arranca X, tenga esto en cuenta tambin.

  As que ah est, la eleccin es suya. Aguantar los dos botones
  Microsoft que vienen por defecto, o intentar averiguar cmo cambiar el
  modo y configurar las X para aprovechar esto.

  7.  Uso de gpm  para intercambiar los modos del ratn.

  gpm es el programa que le permite usar el ratn en modo consola (--
  Modo texto o comando.--) . Normalmente est incluido en todas las
  distribuciones, y puede ser iniciado desde la lnea de comandos o en
  el fichero de arranque /etc/rc.d/rc.local. gpm es la causa de muchos
  de los problemas que sufren la gente que usa ratones de bus, ya que
  bloquea el ratn e impide a las X usarlo. Aquellos de nosotros que
  usamos ratones serie no tenemos este problema.

  Los dos modos principales para ratones serie bajo gpm son:

    gpm -t ms para modo Microsoft;

    gpm -t msc para modo MouseSystems.

  Puede emplear gpm para que interrogue al ratn por usted, y le diga
  qu protocolo est usando actualmente:

        gpm -t help

  No obstante, gpm es a veces capaz de reconocer los tres botones del
  ratn incluso bajo modo Microsoft. Y las ltimas versiones (Versin
  1.0 y posteriores (?)) pueden incluso hacer esta informacin accesible
  para otros programas. Para que esto tenga lugar, ha de ejecutar gpm
  con la opcin -R, as:

       gpm -R -t ms

  Esto har que gpm exporte los datos del ratn a un dispositivo nuevo,
  llamado /dev/gpmdata, que ser como un ratn para cualquier otro
  programa. Tenga en cuenta que este dispositivo SIEMPRE emplea el
  protocolo MouseSystems. Podr entonces configurar su XF86Config para
  hacer uso de ste en lugar de /dev/mouse como se muestra a
  continuacin, pero por supuesto habr de asegurarse de estar
  ejecutando gpm siempre antes de arrancar X Window. Algunas personas
  han informado que alguno de los eventos asociados al botn central no
  son interpretados correctamente cuando se usa esta tcnica, esto puede
  ser debido a una configuracin de ratn aislada.

  8.  Ficheros de ejemplo XF86Config  y Xconfig .

  La localizacin de los ficheros de configuracin de X depende en la
  versin y distribucin que se tiene en particular. Ser probablemente
  /etc/Xconfig, /etc/XF86Config o /usr/X11/lib/X11/XF86Config.  Cuando
  arranque X se podr ver cual de ellos es --se debera mostrar en
  pantalla antes de que se muestren todas las opciones--.  La sintaxis
  entre los ficheros XF86Config y Xconfig es ligeramente diferente, por
  lo que se proporcionan ambas:

  8.1.  Ratn serie Microsoft

    XF86config:

       Section "Pointer"
           Protocol "microsoft"
           Device "/dev/mouse"
       EndSection

    Xconfig:

       #
       # Definicion del Raton y parametros relacionados
       #
       Microsoft      "/dev/mouse"

  8.2.  Ratn serie Microsoft con emulacin 3 botones:

    XF86config:

       Section "Pointer"
           Protocol "microsoft"
           Device "/dev/mouse"
           Emulate3Buttons
       EndSection

    Xconfig:

       #
       # Definicion del Raton y parametros relacionados
       #
       Microsoft      "/dev/mouse"
       Emulate3Buttons

  8.3.  Ratn de 3 botones MouseSystems

    XF86config:

       Section "Pointer"

           Protocol "mousesystems"
           Device "/dev/mouse"

       #    ClearDTR           # Estas 2 lineas probablemente no sean necesarias
       #    ClearRTS           # intentar primero sin ellas y luego con solo DTR

       EndSection

    Xconfig:

       #
       # Definicion del Raton y parametros relacionados
       #

       MouseSystems    "/dev/mouse"

       #    ClearDTR           # Estas 2 lineas probablemente no sean necesarias
       #    ClearRTS           # intentar primero sin ellas y luego con solo DTR

  8.4.  Ratn serie Microsoft con gpm -R

    XF86Config:

       Section "Pointer"
             Protocol "MouseSystems"
             Device "/dev/gpmdata"
       EndSection

    Xconfig:

       #
       # Definicion del raton y parametros relacionados
       #
       MouseSystems      "/dev/gpmdata"

  9.  Instalaciones y problemas en general.

  Si se tienen problemas con el ratn en X o en consola, comprobar si se
  est ejecutando getty en la lnea serie, o cualquier otra cosa como
  puede ser un mdem. Compruebe que no existen conflictos de IRQ.

  Los problemas con dispositivos serie pueden ser debidos a que el
  puerto serie no sea inicializado correctamente al arrancar. Esto se
  lleva a cabo con el comando setserial, ejecutado desde el script de
  arranque /etc/rc.d/rc.serial. Compruebe la pgina man y el Serial-
  HOWTO para ms detalles. Puede valer la pena experimentar un poco con
  los tipos, por ejemplo pruebe setserial /dev/mouse uart 16550  16550a
  independientemente del tipo de puerto que posea, etc...

    Los ratones Logitech puede que requieran activar la lnea
     ChordMiddle para que el botn central funcione. Esta lnea
     reemplaza a Emulate3Buttons o va tras la lnea /dev/mouse en el
     fichero de configuracin. Puede necesitar posiblemente las lneas
     ClearDTR y ClearRTS en su Xconfig.

    Intercambio de botones: usar el comando xmodmap para cambiar qu
     botn fsico registra cada pulsacin del ratn. Ejemplo:

       xmodmap -e "pointer = 3 2 1"

  intercambiar los botones para ser usados con la izquierda. Si slo
  tiene dos botones, slo hay que poner los botones 1 y 2.

    Aceleracin: usar el comando xset m para cambiar la configuracin
     del ratn. Ejemplo:

       xset m 2

  Establecer la aceleracin a 2. Mirar la pgina del manual para ms
  detalles.

    Desplazamiento del cursor: Si la accin de pinchar con el ratn
     parece tener lugar a la izquierda o derecha de donde est el cursor
     realmente, puede ser que su pantalla no est alineada. Esto es un
     problema del controlador S3, que puede ser que corrija empleando
     xvidtune. Pruebe con Invert_VCLK/InvertVCLK, o EarlySC. Esta
     informacin proviene de Bill Lavender lavender@MCS.COM y Simon
     Hargrave. En XF86Config, deber aparecer como:

  Subsection "Display"
        Modes       "1024x768" "800x600" "640x480" "1280x1024"
        Invert_VCLK "*" 1

  10.  Modelos testeados.

  Hay un montn de ratones diferentes ah fuera, y yo honestamente no
  puedo decir que que se compre tal o cual ratn. Lo que puedo hacer es
  dar una lista de lo que esos ratones hacen, basado en experiencias y
  lo aqu expuesto. Incluso con esta informacin se debera ser un poco
  cauteloso --nosotros tenemos dos ratones idnticos en la oficina en
  dos ordenadores, algunas cosas funcionan en uno y no en el otro--. Las
  adiciones a esta lista sern bienvenidas.

    Ratn WiN, como tal es vendido por Office World a 8 libras.  Ratn
     estandard con modo dual Microsoft/MouseSystems.

    Agiler, estandard con modo dual Microsoft/MouseSystems. No
     soldable.

    Sicos, va bien, necesita ClearDTR y ClearRTS en la configuracin.

    Index vende un ratn por 10 libras. No funciona en modo 3 botones,
     pero tiene unas instrucciones muy bonitas :-)

    Artec, ratn tpico de doble protocolo, necesita ClearDTR en la
     configuracin, NO ClearRTS.

    DynaPoint, ratn serie de 3 botones. ratn tpico de doble
     protocolo, necesita ClearDTR Y ClearRTS.

    Genius, ratn de 3 botones. Steven Aizic est trabajando en este
     por m.

    Truemouse, ``made in Taiwan''; funciona bien, pero necesita
     ClearDTR en la configuracin. (De Tim MacEachern)

    Champ: necesita conmutar a modo PC, lo cual activa el protocolo
     MouseSystems.

    MicroSpeed: Ratn tpico de dos botones.

    Venus:Ratn conmutable, funciona  bien como MouseSystems en la
     posicin 3 botones.

    Ratn Manhattan: conmutador para  modos ``MS AM'' / ``PC AT'', MS
     funciona bien con el mtodo gpm -R. (De komanec@umel.fee.vutbr.cz)

    Inland. Conmutador para modos ``PC/MS'', funciona bien.
     (De http://ptsg.eecs.berkeley.edu/~venkates).

  11.  La cola del ratn.

  Se pueden encontrar detalles ms completos en los ficheros Xconfig y
  XF86Config en las pginas relevantes, y en la documentacin sobre la
  instalacin de X Window tales como el XFree86-COMO (-- Disponible en
  castellano. Ver seccin ``'' para ms detalles.--) Mucha de la
  informacin para este documento ha sido extrada de los varios grupos
  de noticias (newsgroups) de Linux. Siento no haber mantenido un
  registro de todos quienes han contribuido indirectamente en este
  fichero, muchas gracias a todos ellos.

  Resumiendo:

    Incluso los ratones de 3 botones Microsoft baratos pueden hacerse
     funcionar.

    Configurar el fichero de configuracin X para que espere un ratn
     Mouse Systems.

    Mantener pulsado el botn izquierdo al arrancar para cambiar el
     ratn al modo MouseSystems.

    Puede que sea necesario mantener pulsado el botn izquierdo cuando
     se arranca X.

    Los ratones son ms inteligentes de lo que se piensa.

  12.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Reescritura de direcciones con sendmail mini-COMO
  Thomas Roessler, roessler@guug.de
  davefx@bigfoot.com
  v0.1, 6 de Mayo de 1998

  Este documento es una breve descripcin de cmo modificar el fichero
  de configuracin de sendmail para un acceso telefnico domstico.

  1.  Introduccin


  Dar por sentado que tiene el tipo de acceso a Internet que parece ser
  comn en las universidades y en los proveedores de servicios de
  Internet hoy en da: usted se conecta con la red de su proveedor
  utilizando PPP sobre una conexin serie. Su correo entrante se
  almacena temporalmente en el servidor POP o IMAP de su proveedor,
  mientras que el correo saliente se enva mediante SMTP. No tiene un
  nombre de dominio propio, por lo que todo debe usar una direccin.

  Asumir tambin que ya ha instalado una versin bastante reciente de
  sendmail, realizado por Eric Allman (la versin ms reciente, al
  escribir estas lneas, era la 8.8.8  (-- Nota del editor: a da de la
  revisin, la ltima versin disponible es la 8.9.3; debera
  actualizarse.  De hecho, si hay un programa que tendra que mantener
  actualizado, es ste...  --) y con ella debera funcionar bien).

  Este documento se refiere particularmente a propiedades especficas de
  los sistemas Debian GNU/Linux; los usuarios de otras distribuciones
  deberan tener algo de cuidado.

  Asegrese de tener esta informacin a mano:


    El servidor de correo de su proveedor de servicios Internet.

    Su direccin de correo electrnico.

  La configuracin que planeamos tiene dos metas principales:


  1. Debe ser posible enviar correo entre los usuarios locales.

  2. El resto del planeta debe ver las direcciones de los usuarios del
     proveedor de servicios Internet, no las direcciones locales.

  Para alcanzar esto, haremos uso del la opcin genericstable de
  sendmail.


  2.  Mapa de ficheros


  Colocaremos todos los ficheros de configuracin de sendmail en un
  directorio aparte bajo /etc: /etc/mail. Normalmente, sendmail esperar
  que esos ficheros residan directamente bajo etc. Para evitar
  problemas, /etc/sendmail.cf debera ser un enlace simblico a
  /etc/mail/sendmail.cf.

  Los siguientes ficheros poblarn /etc/mail:


    aliases - contiene direcciones locales adicionales.

    genericsdomain - contiene alguna informacin acerca de la
     configuracin de su mquina local.

    genericstable - contiene las reglas reales de reescritura.

    sendmail.cf - fichero de configuracin de sendmail.

    sendmail.mc - la fuente de sendmail.cf.

  Algunos de estos ficheros sern acompaados por ficheros .db, que
  contienen bases de datos configuradas para el uso directo de sendmail.

  Asumimos que la parte cf del rbol de cdigo fuente de sendmail reside
  bajo un directorio llamado /usr/lib/sendmail.cf. Este es el caso de
  los sistemas Debian GNU/Linux. En otras distribuciones este directorio
  posiblemente est en un sitio diferente. Lea la documentacin de su
  distribucin para ms detalles.


  3.  Configuracin de sendmail



  3.1.  El fichero principal de configuracin


  Sendmail utiliza un sistema de reglas muy complejo para su
  configuracin.  Debido a que se pueden hacer millares de cosas con
  ellas, escribir un fichero sendmail.cf desde cero es bastante inusual
  y lleva mucho tiempo. Si est interesado en hacer eso, debera dejar
  de leer este documento ahora mismo y leer, en su lugar, el Bat Book de
  la editorial O'Reilly.

  En lugar de crear a mano estas reglas, confiaremos en el procesador de
  macros m4 para crear nuestro fichero de configuracin a partir de
  fragmentos escritos anteriormente que se distribuyen junto con
  sendmail.

  Echemos un vistazo a las primeras lneas del fichero sendmail.mc:



       include(/usr/lib/sendmail.cf/m4/cf.m4)
       VERSIONID(`sendmail.mc - roessler@guug.de')
       OSTYPE(debian)
       define(`ALIAS_FILE',`/etc/mail/aliases')




  Al comienzo, se incluye cf.m4. Este fichero de macros m4 contiene
  muchas definiciones de macro para el resto del fichero.  Asegrese de
  que la ruta de archivo que proporciona aqu es correcta (la que aqu
  se representa es la tpica de Debian GNU/Linux). La macro OSTYPE se
  utiliza para dar algunas configuraciones por defecto muy tiles. Si no
  utiliza un sistema Debian, reemplace la palabra debian por linux.
  ALIAS_FILE indica a sendmail dnde buscar la lista de alias.

  Las siguientes lneas dirn a sendmail que utilice la caracterstica
  genericstable, y dnde encontrar los ficheros de configuracin
  necesarios para usarla:



       FEATURE(masquerade_envelope)
       FEATURE(genericstable, `hash -o /etc/mail/genericstable')
       GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')


  La caracterstica masquerade_envelope le dice a sendmail que aplique
  la cabecera reescribiendo el sobre del remitente de un mensaje.  Esta
  es la direccin de correo a la que los subsistemas de reparto
  dirigirn los informes de fallo en el reparto y mensajes de
  advertencia. Los ficheros generics* se explicarn ms abajo.

  Ahora, debemos definir un, llammosle as, servidor inteligente
  (smart-host), esto es, una mquina que manejar el correo saliente de
  nuestro sistema. Dse cuenta de que esta mquina puede ser distinta de
  los servidores POP e IMAP de su proveedor. En caso de duda, llame al
  servicio tcnico. El cdigo en el fichero de configuracin maestra es:



       define(`SMART_HOST',`mensajes-salientes.su.proveedor')




  Reemplace mensajes-salientes.su.proveedor por la direccin completa de
  de la mquina de su proveedor de servicios Internet que gestionar el
  correo saliente.

  Las dos lneas finales incluyen las definiciones del cartero que son
  requeridas por sendmail para averiguar cmo manejar varios tipos de
  correo:



       MAILER(local)
       MAILER(smtp)




  Para generar el fichero sendmail.cf a partir de este sendmail.mc,
  teclee los siguientes comandos (como root):



       # m4 sendmail.mc > _sendmail.cf
       # mv -f _sendmail.cf sendmail.cf




  Fjese en que la tcnica de escribir las salidas m4 a un fichero
  temporal que ser movido a su lugar correcto.  Esto ayuda a prevenir
  que sendmail lea ficheros de configuracin parcialmente escritos.


  3.2.  Reescritura de direcciones


  Primero, le debemos comunicar a sendmail qu direcciones van a
  considerarse como locales (y de esta manera deberan estar sujetas a
  la reescritura). Esto es bastante simple: slo coloque el nombre
  completo de su mquina en el fichero /etc/mail/genericsdomain Para
  conseguir el nombre completo de su mquina, teclee el siguiente
  comando:



       $ hostname -f


  Ahora, vayamos con la tabla de reescritura propiamente dicha:
  /etc/mail/genericstable.  Este fichero consiste en dos columnas
  separadas por espacios en blanco.  La primera columna contiene la
  direccin local, la segunda columna contiene la direccin de correo
  electrnico que debera utilizarse en su lugar. El fichero podra
  tener este aspecto:



       harry   harryx@su.proveedor
       maude   maudey@el.proovedor.de.ella
       root    fredx@su.proovedor
       news    fredx@su.proovedor




  Note que debe haber una entrada para cada cuenta de la mquina local,
  de manera que el correo generado que salga del sistema local lleve,
  automticamente, informacin de cabecera correcta.

  Por razones de prestaciones, sendmail no utiliza este fichero
  directamente, utiliza una versin procesada en su lugar.  Para
  generarla utilice el siguiente comando:



       # makemap -r hash genericstable.db < genericstable




  Fjese en que las reglas de reescritura incluidas en genericstable no
  se aplican al correo local ni a los mensajes que recibe desde fuera;
  el mapeo slo se utiliza si un mensaje abandona su sistema local a
  travs del servidor inteligente de su proovedor de Internet.


  3.3.  Alias


  El fichero de alias contiene informacin adicional de los nombres
  locales que slo son vlidos para mensajes locales.  Esto es til para
  cuentas administrativas como root que recibe los mensajes generados
  automticamente por el sistema.

  Un comienzo razonable para /etc/mail/aliases podra ser el siguiente
  fichero:



       root: fred
       news: root
       postmaster: root
       mail: root
       www: root

       nobody: /dev/null
       MAILER-DAEMON: nobody




  Este ejemplo reenviar el correo local para los usuarios root, news,
  postmaster, mail, y www a fred, mientras que los mensajes para nobody
  y para MAILER-DAEMON se redirigirn a /dev/null.
  Al igual que el fichero genericstable, aliases puede contener cientos
  de entradas.  Esto es, podra ser ineficiente que sendmail utilizara
  el fichero de texto tal y como se describe.  El mismo mecanismo
  utilizado para genericstable se utiliza para aliases: se genera una
  tabla preformateada. En lugar de utilizar makemap directamente, puede
  utilizar el comando newaliases esta vez. Se encargar automticamente
  de lo que sea necesario para que los cambios tomen efecto.


  4.  Lectura ms profunda


  La distribucin del cdigo fuente de sendmail incluye bastante ms
  documentacin.  Lala, especialmente el fichero cf/README.

  Si est interesado en profundizar ms en las opciones de configuracin
  de sendmail, puede desear conseguir el Bat Book de la editorial
  O'Reilly:  Bryan Costales, Eric Allman, and Neil Rickert: sendmail.
  O'Reilly, 1993.


  5.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En lla encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.












  Sistema de Archivos Criptogrfico bajo Linux (CFS) COMO
  Copyright (C) 1996 Alexander O. Yuriev, alex@bach.cis.tem
  ple.edu
  Fernndez Barqun sferbar@internetica.net.mx
  Marzo 14, 1996

  Este documento describe cmo compilar, instalar y configurar CFS, el
  Cryptographical File System.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      Copyright

  3.      ACERCA DE CFS

  4.      Compilacin e instalacin de CFS.

  5.      Creacin del directorio CFS.

  6.      Proteccin del CFS.

  7.      Problemas conocidos de CFS

  8.      Crditos (Documento en ingls).

  9.      Nota de la traduccin.

  10.     scripts

  11.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  Este documento describe cmo compilar, instalar y configurar CFS, que
  fue escrito por Matt Blaze de AT&T, bajo Linux.

  2.  Copyright

  La siguiente nota de copyright, copiada directamente de CFS 1.12
  describe las restricciones sobre el uso de CFS:

  El autor de este software es Matt Blaze.  Copyright  1992, 1993, 1994
  por AT&T. Se permite usar, copiar, y modificar este software sin
  necesidad de permiso expreso, con la condicin que este aviso sea
  incluido ntegramente en todas las copias del software tal y como est
  en todas las copias o modificaciones de este software, as como en
  todas las copias de la documentacin de soporte para dicho software.

  Este software est sujeto a los controles de exportacin de los
  Estados Unidos. No est permitido exportarlo, en su totalidad o en
  parte, por cualquier motivo o permitir cualquier exportacin, por
  medio de acto u omisin, sin previa autorizacin de parte del gobierno
  de los Estados Unidos y permiso escrito de AT&T.

  En particular, usted no debe hacer disponible cualquier parte de este
  software para distribucin general o no restringida a otros, o no
  debera usted revelar este software a personas diferentes a los
  ciudadanos y residentes permanentes de los Estados Unidos y Canad.

  ESTE SOFTWARE SE PROVEE "TAL CUAL", SIN NINGUNA GARANTA EXPRESA O
  IMPLICADA. EN PARTICULAR, NI LOS AUTORES NI AT&T HACEN NINGUNA
  REPRESENTACION O GARANTA DE NINGN TIPO CONCERTANDO LA MERCANTILIDAD
  DE ESTE SOFTWARE O SUS PROPSITOS PARA ALGN PROPSITO EN PARTICULAR.

  A pesar que la informacin en este documento es considerada como
  correcta, ni el Autor ni los Laboratorios CIS, o la Universidad Temple
  da ninguna clase de GARANTAS y no es o se hace responsable de lo que
  pueda pasar si usted sigue esta gua.  La informacin en este
  documento se proporciona TAL CUAL!.

  3.  ACERCA DE CFS

  CFS proporciona una aplicacin independiente de encriptacin-
  desencriptacin de la capa del sistema de archivos que no requiere
  modificacin del cdigo principal del sistema de archivos o ninguna
  clase de modificacin del cdigo del kernel.

  El seguro simtrico implementado en la versin del flujo principal del
  CFS est basado sobre un seguro DES modificado, ejecutndose en modo
  CBC haciendo un ataque de fuerza bruta en contra del usual espacio de
  llave DES, no real de 56 bits.

  La estructura del CFS realiza un remplazo del flujo principal del
  seguro DES con un Fast-DES o algn otro seguro simtrico que provea un
  proceso extremadamente seguro. Por favor refirase al "White paper"
  referente al CFS para ms informacin.
  ftp://bach.cis.temple.edu/pub/Papers/cfs.ps

  4.  Compilacin e instalacin de CFS.

  CFS no se compila tal y como viene sobre Linux. Las siguientes
  instrucciones le llevarn a conseguir que CFS se ejecute en su sistema
  Linux. Hay diversos mtodos para hacer que CFS trabaje en Linux, el
  ms limpio de ellos es el basado sobre las modificaciones de Olaf
  Kirch. Su versin de CFS esta disponible en

  ftp://ftp.mathematik.th-darmstadt.de/pub/linux/okir/cfs-1.1.2.tar.gz

  Olaf firm el archivo modificado. La firma PGP de la versin
  modificada del cfs-1.1.2 puede ser obtenida de
  ftp://ftp.mathematik.th-darmstadt.de/pub/linux/okir/cfs-1.1.2.pgp

  En modo mono-usuario, se compila CFS usando la instruccin "make".

  Despus de la compilacin, instale cfsd, cdetach, ccat, cmkdir, cname
  y cattach en el directorio /usr/local/sbin con propietario-grupo
  root.wheel y el modo de acceso 551.

  Genere una lista de hashes MD5 de los binarios limpios. Copie estos
  archivos junto con el md5sum a un medio tal como un CD o un disquete y
  protjalo contra escritura.

  Cree el directorio /.cfsfs, el cual ser usado como un gancho por el
  servidor CFS. Cree este directorio como dueo root.root y protegido
  con el modo de acceso "000". Cree el directorio /securefs, el cual se
  convertir en la raz del rbol de CFS.

  Aada las siguientes lneas a su /etc/rc.d/rc.local:

               echo -n "Inicializando sistema de ficheros encriptado: "
       if [ -x /usr/local/sbin/cfsd ]; then
               /usr/local/sbin/cfsd > /dev/null
                       echo -n "cfsd "
               /bin/mount -o port=3049,intr localhost:/.cfsfs /securefs
                       echo -n "loopback "
               echo "done"
       else
                  echo "No se ha instalado el sistema de ficheros encriptado"
               fi

  Los usuarios de las distribuciones Caldera Network Desktop y Red Hat
  Commercial Linux deben aadir el archivo cfsfs que est includo al
  final de este documento en su directorio /etc/rc.d/init.d.  Realice un
  enlace simblico, S65cfsfs de ste en los directorios apropiados al
  nivel de ejecucin usando la instruccin:

       ln -s ../init.d/cfsfs S65cfsfs

  en /etc/rc.d/rcX.d, donde X es el nmero de nivel de ejecucin (init),
  aada la lnea:

       /.cfsfs         localhost

  en /etc/exports. Finalmente, aada la lnea:

       portmap: 127.0.0.1

  al el archivo /etc/hosts.allow.

  Reinicie su computadora. Esta entrar en modo multiusuario. Ejecute el
  comando mount para verificar que CFS est corriendo. Si todo esto fue
  superado con xito, ver una nueva lnea en el lista de los sistemas
  de archivos:

       localhost:/.cfsfs on /securefs type nfs (rw,port=3049,intr,addr=127.0.0.1)

  5.  Creacin del directorio CFS.

  Para crear un directorio CFS protegido llamado secreto use el comando

       cmkdir secreto

  Le pedir que la frase de paso y que la verifique. Si sale bien, un
  nuevo directorio llamado secreto aparecer en el directorio actual.
  Este directorio contendr informacin encriptada la cual no ser
  accesible, slo lo ser en el caso de que ste est aadido al rbol
  del CFS.

  Para ordenar que el directorio secreto se aada a la lista de
  directorios administrados por CFS, este ha de ser aadido a el rbol
  CFS usando la instruccin:

       cattach secreto Gran-Secreto

  CFS requerir que escriba la frase de paso para el acceso. Si sta
  coincide con la frase de paso proporcionada a la instruccin cmkdir
  que cre el directorio originalmente, la informacin en el directorio
  secreto ser accesible de forma no encriptada bajo /securefs/Gran-
  Secreto al usuario que proporcion la frase de paso correcta. Note que
  usualmente toma cerca de un minuto aadir el directorio protegido al
  rbol del CFS. Cuando el usuario ha terminado de manipular la
  informacin debe utilizar la instruccin:

       cdetach Gran-Secreto

  Para destruir la llave de acceso. Esta instruccin elimina el
  directorio secreto de la lista de directorios administrados por CFS
  haciendo imposible acceder a la informacin en forma de texto plano en
  este directorio hasta que nuevamente sea aadido usando la instruccin
  cattach.

  6.  Proteccin del CFS.

  Para conceder acceso a un usuario a partes encriptadas del rbol de
  directorios, CFS necesita que el usuario proporcione la frase de paso
  que es usada para generar un conjunto de llaves de acceso. Una
  vulnerabilidad de una frase de paso, permitir a un intruso acceder a
  la informacin encriptada a travs del modulo de seguridad Unix.

  Por ello, es extremadamente importante proteger el acceso a las frases
  de paso. Hay dos maneras bsicas que pueden ser utilizadas por los
  intrusos para obtener su frase de paso. Son:

  1. Ataques con Sniffers

  2. Ataques contra el protocolo.

  Las siguientes instrucciones pueden ser utilizadas para minimizar la
  posibilidad de un ataque exitoso contra CFS:

  1. Asegurar que los binarios de CFS no estn comprometidos de ninguna
     forma.

  2. Asegurar que cattach, ccat, cmkdir, cname, el servidor CFS cfsd y
     finalmente, cdattach no sern sustituidos por versiones
     ``troyanas'' que capturen las frases de paso o, en el caso del
     cfsd, las llaves de acceso.

  3. Asegurar que el Servidor CFS no est comprometido de modo que no se
     realice el procedimiento de encriptacin correctamente.

  4. Un ataque contra cdeattach usualmente involucra una pequea
     modificacin que evita la correcta destruccin de las llaves de
     acceso, permitiendo a un intruso obtener acceso a una parte
     supuestamente separada del rbol de directorios.

  5. La manera ms simple para asegurar que los binarios no sean
     comprometidos es compilarlos estticamente y guardarlos en un CD.
     Otra manera es compilar estticamente los binarios, usar md5sum, la
     calculadora de procesado de mensaje (message-digest) y escribir los
     hashes MD5 en un medio protegido contra escritura.

     Antes de usar alguno de los programas de CFS sobre un sistema,
     monte un disquete y compare los hashes MD5 de los binarios del
     sistema con los hashes de las copias limpias compiladas
     estticamente, localizadas en el disquete, sustituyendo las
     versiones comprometidas.

  6. Capturadores de teclado usados para capturar las frases de paso,
     tal como los usuarios las van tecleando. Dependiendo de las
     circunstancias, muchos usuarios no son lo bastante cuidadosos
     ignorando las siguientes indicaciones:

     a. Cuando escriba una frase de paso en una xterm, asegurar que el
        programa xterm no est comprometido y use la opcin "Teclado
        seguro" mientras se escribe la frase de paso. Esto previene que
        las pulsaciones sean interceptadas por capturadores X-Window.

     b. Escriba las frases de paso desde la terminal conectada
        directamente a un puerto serie del sistema cuando dicha terminal
        est disponible.

     c. Cercirese de que sus permisos en ptys y ttys no permitan a
        otros la lectura de tus pulsaciones directamente del
        dispositivo.

  7. Nunca escriba su frase de paso a travs de la red, aunque la red
     est localizada tras un cortafuegos y confe en que todos los que
     estn conectados a su red no usen sniffers. Esto es aplicable
     tambin a redes que usen routers seguros (scrambling routers),
     porque no hay garanta en absoluto que los routers usen un
     encriptamiento slido o no tengan una puerta trasera o un agujero
     de seguridad que potencialmente pueda permitir a un intruso anular
     la encriptacin usada por el router. Si tiene que escribir su clave
     de acceso a travs de la red, hgalo solamente si est usando un
     canal encriptado entre sistemas tal como el creado por el protocolo
     deslogin(8).

  8. Los rboles protegidos CFS deben ser desligados siempre (de-attach)
     del sistema de archivos cuando no sean usados, aun cuando vaya a
     dejar su sistema "slo" por un par de minutos.

  7.  Problemas conocidos de CFS

  Hasta este momento slo se conoce un problema que puede ser
  reproducido.  El error de "Permission denied" que se genera cuando un
  usuario intenta acceder a archivos localizados en un disco compacto.

  8.  Crditos (Documento en ingls).

  Las siguientes personas ayudaron en el proceso de preparacin de este
  documento: Topher Hughes del Colegio Dickinson, Elie Rosenblum del
  Montgomery Blair High School, Mario D. Santana de la Universidad del
  Estado de Florida, Daniel P. Zepeda y Olaf Kirch.

  9.  Nota de la traduccin.

  Mi nombre es Salvador Fernndez Barqun, formo parte del proyecto
  LUCAS/INSFLUG. Este documento es mi aportacin para que el proyecto
  Linux sea cada vez ms grande y conocido entre nosotros los que
  hablamos la lengua de Cervantes; ahora que la seguridad en los
  servidores de Internet (y Linux en particular) es un tema importante
  para todo administrador o usuario de Linux, consider esta una
  solucin muy interesante de aplicar.

  Particularmente, espero que este documento sea de ayuda e inters a
  todos aquellos que deseen implementar un esquema de seguridad a nivel
  sistema de archivos en su Linux.

  Hay mucho por traducir, as como tambin hay muchos documentos
  traducidos, visite http://www.infor.es/LuCAS o o sus mltiples espejos
  para conocer ms sobre este proyecto o obtener otros documentos en
  castellano.

  No est de ms decir que intentado ajustarme totalmente al original de
  Alexander O. Yuriev y he revisado la traduccin un par de veces. No
  obstante an puede quedar algo por pulir o se me ha podido colar
  alguna errata, de cuya responsabilidad me hago cargo, pero jams del
  buen o mal uso que pueda derivar la lectura de este documento.

  Para cualquier comentario, errata o consulta sobre la traduccin,
  mndeme un mensaje electrnico a: sferbar@internetica.net.mx.

  Un saludo y buen provecho

  Salvador Fernndez Barqun.

  10.  scripts

  #!/bin/sh
  #
  # $Header: /Secure/secure-doc/linux/CFS/RCS/CFS-Doc,v 1.4 1996/03/15 04:49:37 alex Exp alex $
  #
  # cfsfs         Crypto filesystem
  #
  # Author:       Alexander O. Yuriev <alex@bach.cis.temple.edu>
  #               Derived from cron

  # Cargamos la librara de funciones.
  \&. /etc/rc.d/init.d/functions

  # Averiguamos cmo se nos ha ejecutado.
  case "$1" in
   start)
          echo -n "Arrancando sistema de ficheros encriptado: "
          if [ -x /usr/local/sbin/cfsd ]; then
                  /usr/local/sbin/cfsd > /dev/null
                  /bin/mount -o port=3049,intr localhost:/.cfsfs /securefs
                  echo "listo"
          else
                  echo -n "El sistema de ficheros encriptados no ha sido iniciado"
          fi
          touch /var/lock/subsys/cfsfs
          ;;
   stop)
          echo -n "Deteniendo sistema de ficheros encriptado: "
          umount /securefs
          killproc cfsd
          echo
          rm -f /var/lock/subsys/cfsfs
          ;;
   *)
          echo "Empleo: cfsfs {start|stop}"
          exit 1
  esac

  exit 0

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  SLIP-MiniComo
  Manuel Soriano m_soriano@dapsys.ch
  Maquetador Linuxdoc-SGML: Antonio Ismael Olea Gonzlez,
  olea@iname.com 2:345/108.9@fidonet.org

  Cmo configurar Linux para usar TCP/IP por cable serie mediante SLIP.

  1.  Antes de nada

  Hay que considerar una cosa, qu es lo que se quiere configurar, si un
  cliente o un servidor de comunicaciones o, por qu no, ambos.

  Lo primero que hay que hacer es recompilar el kernel habilitando los
  siguientes parmetros:

       ``Networking support'' CONFIG_NET y
       ``TCP/IP networking'' CONFIG_INET y
       ``Assume subnets are local'' CONFIG_INET_SNARL y
       ``Network device support?'' CONFIG_NETDEVICES y
       ``Dummy net driver support'' CONFIG_DUMMY y
       ``SLIP (serial line) support'' CONFIG_SLIP y
       ``CSLIP compressed headers'' CONFIG_SLIP_COMPRESSED y
       ``PPP (point-to-point) support'' CONFIG_PPP y
       ``PLIP (parallel port) support'' CONFIG_PLIP y

  2.  Configuracin de un servidor de comunicaciones:

  Para ello usaremos el programa dip que hace el trabajo de
  configuracin y rutado por nosotros.

  Modificar el fichero /etc/hosts y poner las direcciones IP de ambas
  mquinas.

       75.0.1.10      obe_slip  # maquina servidora o local
       75.0.1.11      ide_slip  # maquina cliente o remota (la que llama, leche)

  Creamos un usuario slip con la utilidad adduser.

    usuario : Sidefix

    grupo : slip

    shell : /sbin/diplogin (asegurarse que diplogin est en /sbin)

    Directorio home : /tmp

    Password : Sidefix ( o el que quieras)

  Como adduser cambia los permisos del directorio al usuario, hacer lo
  siguiente:

       chown root /tmp
       chgrp root /tmp
       chmod 777 /tmp

  @:-)

  Editamos el fichero /etc/group e incluimos un nuevo grupo slip, la
  lnea quedar:

       slip::16:Sidefix

  NOTA : el nmero de grupo debe ser el ms bajo posible despus de man.

  Editamos el fichero /etc/diphosts e incluimos la siguiente lnea:

       Sidefix::75.0.1.11:75.0.1.10:255.255.255.0::CSLIP,296

  Esta lnea se compone de campos separados por ":" . Vamos a ver qu
  quiere decir cada campo.

    Usuario remoto

    Password, si queremos, ste no hace falta encriptarlo

    Direccin remota (ide_slip)

    Direccin local (obe_slip)

    Mscara de red (suele ser siempre 255.255.255.0)

    Comentarios

    Protocolo (SLIP, CSLIP, PPP, etc..), el protocolo va seguido del
     MTU (yo uso 296, se puede dar un valor mas alto si se tiene una
     UART que aguante, pero penaliza el trabajo que no sea ftp)

  Nos aseguramos que en /sbin tenemos:

       lrwxrwxrwx   1 root     root           10 Apr 30 19:35 dip -> dip-3.3.7l*
       -rws--x--x   1 root     bin         40964 Feb 16 13:37 dip-3.3.7l*
       lrwxrwxrwx   1 root     root           10 Apr 30 19:35 diplogin -> dip-3.3.7l*

  Si no los tenemos, instalar la serie N de disquetes (porting
  Slackware)

  Editar el fichero /etc/inittab y asegurarnos que tenemos la siguiente
  lnea:
  Se asume que la conexin se har por el segundo puerto serie (COM2)

  Para conexin directa, sin mdem:

       s2:45:respawn:/sbin/agetty 38400 ttyS1

  Para los que tengan mgetty primero va el puerto (ttyS1) y luego la
  velocidad.

  Para conexin con mdem:

       d2:45:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS1

  (Ojo una almohadilla indica comentario)

  Una vez el fichero inittab correcto hacer lo siguiente:

       init q

  Bueno, el servidor est configurado, vamos a ver el cliente;

  En esta mquina nos debemos asegurar que existen los mismos programas
  dip en /sbin.

  Tambin modificaremos el fichero /etc/hosts, pero con la salvedad de
  que:

       75.0.1.10      obe_slip  # maquina servidora o remota
       75.0.1.11      ide_slip  # maquina cliente o local (la que llama, leche)

  Asegurarnos que en el fichero /etc/inittab la lnea correspondiente al
  mdem o conexin est deshabilitada, comentada con #.

  El usuario que quiere llamar debe tener un fichero de ordenes dip
  (chat.dip) que se debe parecer a algo como sto:

    main:
      get $remote obe_slip
      get $local ide_slip
      port cua1   # (cua0 para com1 o el que quiera)
      speed 38400

      # Resetea el modem y la linea
      reset

      # Cadena de inicializacion del modem
      send ATQ0V1E1X4\r
      wait OK 2
      if $errlvl != 0 goto modem_trouble
      # con esto llamas obe_slip (mi maquina)
      dial 003461770949
      if $errlvl != 1 goto modem_trouble

      # Estamos conectados
    login:
      sleep 2
      send \r\n\r\n
      wait ogin: 20
      if $errlvl != 0 goto login_error
      send Sidefix\n
      wait ord: 20
      if $errlvl != 0 goto password_error
      send Sidefix\n
      if $errlvl != 0 goto password_error
      wait ord: 20
      if $errlvl != 0 goto password_error
      send \n # (esto es el password definido en /etc/dip.hosts)
    loggedin:
      default
      # Se acabo
    done:
      print CONECTADO $local ---> $remote
      mode CSLIP
      goto exit

    prompt_error:
      print TIME-OUT esperando el inicio de SLIPlogin ...
      goto error

    login_trouble:
      print Problemas esperando el login: prompt...
      goto error

    password:error:
      print Problemas esperando el password: prompt...
      goto error

    modem_trouble:
      print Problemas con el modem...
    error:
      print CONEXION con $remote fallada
      quit

    exit:
      exit

  Para iniciar una conversacin, hacer:

       dip chat.dip

  Segn lo que parezca por pantalla, actuar en consecuencia.

  Si aparece el mensaje:

       CONECTADO 75.0.1.11 ---> 75.0.1.10

  Entonces ya tienes acceso a todos los servicios TCP para esa conexin.

  Para finalizar la conexin, en la mquina cliente, hacer:

       dip -k

  Para configurar una mquina cliente/servidor de comunicaciones serie,
  crear todo lo que se ha visto en este texto en una sola mquina. Ojo
  con los puertos serie dependiendo si queremos ser cliente, servidor o
  cliente/servidor.

  Para los que quieran usar PPP o SLIP sin compresin, en los ficheros
  de configuracin (/etc/dip.hosts y chat.dip), cambiar CSLIP por PPP o
  SLIP. Fcil.

  Bueno pues esto es todo, que te diviertas comunicndote.

  3.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Linux COMO Servidor de Intranets
  Pramod Karnad, karnad@indiamail.com
  Fernndez Barqun sferbar@internetica.net.mx
  v2.11, Agosto 7 1997

  Este documento describe cmo configurar una Intranet usando Linux como
  servidor que enlace Unix, Netware, NT y Windows juntos. Desde ahora
  estableciendo la conexin con la mquina Linux estar otorgando acceso
  transparente a todas las plataformas.  Se proporcionan explicaciones
  detalladas para configurar HTTP usando el servidor NCSA y cmo conec
  tarse a ste usando clientes TCP/IP desde Novell, Microsoft Windows
  3.1, 3.11, Win95, WinNT y MacTCP para Apple PowerMac.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  1.1.    Qu se necesita?

  1.2.    Futuras versiones de este documento.

  1.3.    Sugerencias, crticas y comentarios.

  2.      Instalacin del servidor HTTP

  2.1.    Preparacin antes de descargar

  2.1.1.  El Sistema Operativo

  2.1.2.  Tipo de Procesamiento ( ServerType )

  2.1.3.  Puerto de Enlace ( Port )

  2.1.4.  Identidad del Servidor ( User )

  2.1.5.  Identidad de Grupo del servidor ( Group )

  2.1.6.  Direccin de correo del administrador del Servidor (
  ServerAdmin )

  2.1.7.  Directorio de localizacin del servidor ( ServerRoot )

  2.1.8.  Localizacin de los archivos HTML ( DocumentRoot )

  2.2.    Compilacin de HTTPd

  3.      Probando HTTPd

  4.      Conexin al Servidor Linux

  4.1.    Configuracin del Servidor Linux

  4.2.    Configuracin del Servidor Netware

  4.3.    Configuracin de Clientes Netware

  4.3.1.  Windows 3.x

  4.3.2.  Windows 95

  4.4.    Configuracin de Clientes Microsoft

  4.4.1.  Windows 3.11.

  4.4.2.  Windows 95

  4.4.3.  Windows NT

  4.5.    Configuracin de TCP/IP en Macintosh

  4.5.1.  MacTCP

  5.      Aumentando las prestaciones de la Intranet.

  5.1.    NCPFS

  5.1.1.  Instalacin

  5.1.2.  Montaje de sistemas de archivos NCPFS

  5.2.    SMBFS

  5.2.1.  Instalacin

  5.2.2.  Montaje de sistemas de ficheros SMBFS

  5.3.    NFS

  6.      Acceso al servidor Web

  6.1.    Acceso a los sistemas de archivos externos montados en el
  servidor Linux

  6.2.    Conexin a Internet

  6.3.    Otros usos

  7.      Ms cosas que hacer

  8.      Crditos y Legalidades

  8.1.    Agradecimientos

  8.2.    Informacin de Copyright

  9.      Nota del Traductor.

  10.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  En trminos simples, Intranet es el trmino descriptivo que est
  siendo usado para la implantacin de tecnologas de Internet en una
  organizacin corporativa, en lugar de la conexin externa a Internet
  global. Esta implementacin funciona como una alternativa al
  intercambio transparente de los inmensos recursos informacionales de
  una organizacin entre cada uno de los escritorios individuales con un
  mnimo costo, tiempo y esfuerzo. Este documento intenta explicar en
  trminos simples cmo configurar una intranet usando herramientas que
  son fcilmente obtenibles y que generalmente son de bajo coste o
  libres.

  Este documento asume que ya conoce cmo instalar TCP/IP en su servidor
  Linux y conectar ste fsicamente a su LAN (Red de rea Local) usando
  una tarjeta de red Ethernet. Tambin asume que tiene algn
  conocimiento bsico de Netware, WinNT y sistemas Mac.  La
  configuracin del Servidor Netware ha sido mostrada usando como base
  la versin 3.1x. Puede tambin usar INETCFG para obtener el mismo
  resultado. En el lado del cliente la discusin es con respecto a
  Windows 3.1, 3.11 y Win95, WinNT y PowerMac de Apple.

  Uso direcciones de red privada (-- Nota del Revisor:
  obstante, las ms usuales, y que suelen bastar para la mayora de los
  casos, en cuanto a nmero de mquinas posibles, son las de clase C
  192.168.0.0, que ser las que encuentre posiblemente en otros
  documentos relacionados--) (RFC-1918) de los rangos 172.16.0.0 y
  172.17.0.0 en el documento solamente como ejemplos.  Puede escoger las
  direcciones convenientes dependiendo de su configuracin.

                   Servidor    Servidor     Servidor
                   Linux       Netware      W3.11/WinNT
                  172.16.0.1   172.16.0.2   172.16.0.3
                     |           |           |    172.16.0.0
               ------+-----+-----+--------+--+--------------
                           |              | 172.16.0.254
                         E/T 1         Pasarela
                       172.16.0.5         | 172.17.0.254
                                          |
                                ----------+-------+--------
                           172.17.0.0             |
                                                E/T 2
                                              172.17.0.5

  1.1.  Qu se necesita?

  Necesitar el software siguiente antes de intentar la instalacin:

    El software de servidor HTTP el cual puede ser descargado desde
     OneStep NCSA, el enlace a HTTPd est en la pgina
     http://hoohoo.ncsa.uiuc.edu/docs/setup/OneStep.html

    El Cliente de Novell Netware disponible desde
     http://support.novell.com (Los archivos TCP/IP estn incluidos con
     el cliente).

    El cliente TCP/IP de Microsoft disponible en
     http://www.microsoft.com

    El cliente MacTCP de Apple disponible de http://www.apple.com

    Navegadores como Netscape en http://home.netscape.com o MS Internet
     Explorer en http://www.microsoft.com/ o NCSA Mosaic de
     http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/NCSAMosaicHome.html

  1.2.  Futuras versiones de este documento.

  Las versiones nuevas del Servidor-Intranet-Como sern peridicamente
  enviadas a comp.os.linux.announce y comp.os.linux.help. Estas tambin
  sern cargadas en varios servidores FTP de Linux, incluyendo
  sunsite.unc.edu.

  La versin ms reciente de este documento est disponible en formato
  HTML en:

  http://www.inet.co.th/cyberclub/karnadp/http.html

  1.3.  Sugerencias, crticas y comentarios.

  Si tiene preguntas o comentarios acerca de este documento, por favor
  sintase libre de mandar correo a Pramod Karnad, karnad@indiamail.com.
  Sugerencias, crticas o comentarios sern bienvenidos. Si encuentra un
  error en este documento, por favor hgamelo saber para poderlo
  corregir en la siguiente versin. Gracias.

  2.  Instalacin del servidor HTTP

  Cuando descargue el servidor tiene dos opciones: Obtener el fuente y
  compilarlo por s mismo, u obtener los binarios precompilados. Los
  binarios precompilados para la versin Linux (ELF) estn disponibles
  en NCSA, pero no para las versiones ms antiguas.

  2.1.  Preparacin antes de descargar

  El servidor en NCSA le guiar paso a paso por las opciones de
  configuracin y preparar varios archivos para Vd. Pero antes debe
  intentar descargar HTTPd estando preparado con las respuestas a las
  siguientes preguntas.

  2.1.1.  El Sistema Operativo

  Primero, debe escoger entre descargar el fuente o la versin
  precompilada del software. Si su sistema en particular no aparece en
  el men, entonces tendr que obtener el fuente por omisin, y
  compilarlo usted mismo.

  Compruebe la versin de Linux yendo a la linea de comandos de su
  mquina Linux y teclee:

              linux:~$  uname -a

  de esta forma responder con una lnea similar a esta:

          linux:~$  uname -a
          Linux linux 2.0.29 %4 Tue Sep 13 04:05:51 CDT 1994 i586
          linux:~$

  La versin de Linux es 2.0.29.

  Los parmetros restantes pueden ser especificados antes de descargar o
  configurados despus modificando el archivo srm.conf en el directorio
  /usr/local/etc/httpd/conf.  Los nombres de las directivas actuales
  aparecen en el archivo httpd.conf mostrados entre corchetes. La nica
  excepcin es la directiva DocumentRoot la cual aparece en el archivo
  srm.conf

  2.1.2.  Tipo de Procesamiento ( ServerType )

  Especifica cmo se ejecutar el Servidor HTTPd. El mtodo preferido es
  standalone. Este hace que el demonio HTTP sea ejecutado
  constantemente. Si escoge cargar HTTPd sobre inetd, el binario del
  servidor ser recargado en memoria para cada solicitud, lo cual puede
  ralentizar un poco el servidor.

  2.1.3.  Puerto de Enlace ( Port )

  Especifica qu puerto de su mquina ser enlazado al demonio HTTPd y
  escuchar las solicitudes de HTTP. Si inici sesin como root, use la
  configuracin por defecto, el puerto 80. En otro caso escoja entre los
  puertos 1025 y 65535.

  2.1.4.  Identidad del Servidor ( User )

  Es el usuario cuyos privilegios el servidor asumir cuando se den
  respuestas a las solicitudes y se acte sobre archivos. Esta directiva
  necesita ser contestada solamente si se est ejecutando el servidor
  como standalone.  Si Vd no tiene privilegios de root, nicamente podr
  usar su nombre de usuario. Si Vd. es el administrador del sistema,
  puede querer crear un usuario especial para controlar los permisos de
  control del archivo.

  2.1.5.  Identidad de Grupo del servidor ( Group )

  Es el grupo cuyos privilegios asumir el servidor cuando se den
  respuestas a las solicitudes y se acte sobre archivos. Es similar a
  Identidad del Servidor y es aplicable slo si se est ejecutando el
  servidor como standalone.

  Si no tiene privilegios de root, use el nombre del grupo primario al
  que pertenezca. Puede averiguar su grupo tecleando groups desde la
  lnea de comandos de Linux.

  2.1.6.  ( ServerAdmin ) Direccin de correo del administrador del
  Servidor

  Es la direccin de correo electrnico a la que el usuario deber
  mandar un mensaje de correo electrnico cuando informe de algn
  problema con el servidor. Puede poner su direccin personal de correo
  electrnico.

  2.1.7.  Directorio de localizacin del servidor ( ServerRoot )

  Localizacin del servidor en su sistema. Si tiene privilegios de root
  djelo en el lugar recomendado, /usr/local/etc/httpd. Si no tiene
  acceso como root, escoja un subdirectorio de su directorio personal.
  Puede averiguar la localizacin de su directorio personal con el
  comando finger usuario.
  2.1.8.  Localizacin de los archivos HTML ( DocumentRoot )

  Lugar donde residen los archivos HTML que son servidos. El lugar por
  omisin es /usr/local/etc/httpd/htdocs. Podra no obstante fijarse al
  directorio personal de un usuario especial que escoja en la Identidad
  del Servidor (seccin ``''), o un subdirectorio en su directorio
  personal si no tiene acceso como root.

  En caso de duda, use los parmetros por omisin. Existen algunas
  respuestas sobre esto que puede descargar de NCSA HTTPd en
  http://hoohoo.ncsa.uiuc.edu/docs/setup/OneStep.html. Debe leer la
  documentacin de HTTPd en http://hoohoo.ncsa.uiuc.edu/docs/ antes de
  intentar la instalacin. Si est planeando compilar el cdigo
  necesitar modificar los Makefile en cada uno de los directorios
  support, src y cgi-src. Si su versin de Linux est ya soportada
  entonces solamente tendr que escribir make linux en el directorio de
  ms alto nivel (p.ej. /usr/local/etc/httpd)

  2.2.  Compilacin de HTTPd

  La compilacin es simple, solamente tiene que teclear make linux en la
  lnea de comandos de su directorio raz del servidor. Nota: Usuarios
  de Linux pre-ELF tienen que descomentar #define NO_PASS en el archivo
  portability.h y fijar DBM_LIBS=-ldbm en el archivo Makefile antes de
  compilar HTTPd.

  3.  Probando HTTPd

  Despus haber instalado HTTPd, acceda como root e incielo
  escribiendo:

       httpd &

  (asumiendo que lo haya instalado como standalone) Debe ahora ser capaz
  de verlo en la lista de procesos generada por ps. La manera ms simple
  de probar HTTPd es por Telnet. Teclee

               linux:~$  telnet 172.16.0.1 80

  donde 80 es el puerto por omisin para HTTP. Si ha configurado Port
  (seccin ``'') con un valor diferente, escriba ese nmero en su lugar.
  Podr obtener una respuesta como esta:

               Trying 172.16.0.1...
               Connected to linux.midominio.
               Escape character is '^]'.

  Ahora puede escribir cualquier carcter y presionar retorno, deber
  obtener una respuesta similar a la que se muestra a continuacin.

          HTTP/1.0 400 Bad Request
          Date: Wed, 10 Jan 1996 10:24:37 GMT
          Server: NCSA/1.5
          Content-type: text/html

          <HEAD><TITLE>400 Bad Request < /TITLE> < /HEAD>
          <BODY><H1>400 Bad Request < /H1>
          Your client sent a query that this server could
          not understand.<P>
          Reason: Invalid or unsupported method.<P>
          < /BODY>

  Ahora estamos listos para conectar a este servidor usando otro PC y un
  navegador WWW.

  4.  Conexin al Servidor Linux

  Por favor refirase al diagrama mostrado en el captulo Introduccin
  (seccin ``'') para el esquema de direccionamiento usado. La Estacin
  de Trabajo 1 (E/T 1) est sobre la red 172.16.0.0 y puede acceder al
  Servidor Linux directamente considerando que la Estacin de Trabajo 2
  (E/T 2) est sobre la red 172.17.0.0 y necesita usar la mquina
  pasarela, 172.17.0.254 para acceder a la mquina Linux.  Esta pasarela
  es necesaria slo para los programas clientes de la mquina E/T 2.
  Netware se refiere a la pasarela como ip_router.

  Yo estoy usando E/T 2 para ilustrar la configuracin cliente. Para
  configurar E/T 1 cambie slo la direccin 172.17.0.5 por 172.16.0.5 e
  ignore todas las referencias a la mquina pasarela.

  Si no tiene ninguna mquina pasarela, puede pasar a la siguiente
  seccin y seguir con

    Configuracin de Servidor Netware, seccin ``'' si usa un servidor
     Netware.

    Configuracin de Clientes Windows, seccin ``'' si usa el Cliente
     Microsoft.

  4.1.  Configuracin del Servidor Linux

  Puede saltarse esta seccin si no tiene mquina pasarela.

  Ha de configurar el servidor Linux para reconocer la pasarela, de este
  modo permitimos a la Estacin de Trabajo 2 conectarse al servidor Web.
  Para establecer la configuracin del servidor Linux debe acceder como
  root. En la lnea de comandos del servidor escriba

       route add gw default 172.16.0.254

  Para que se use este gateway o pasarela cada vez que arranque el
  servidor Linux, edite el archivo /etc/rc.d/rc.inet1 (-- Nota del
  Revisor
  /etc/sysconfig/network--) y asigne el valor 172.16.0.254 al parmetro
  GATEWAY =.  Asegrese de que la lnea para aadir el gateway no est
  comentada.

  Alternativamente: Puede aadir la ruta a la red al otro lado del
  equipo pasarela. Esto puede hacerse as:

       route add -net 172.17.0.0 gw 172.16.0.254

  Para agregar la ruta cada vez que arranque Linux, adalo a su archivo
  /etc/rc.d/rc.local.

  4.2.  Configuracin del Servidor Netware

  Para configurar el Servidor Netware debe tener permisos de Supervisor
  o por lo menos permisos de operador de consola. Si no puede
  obtenerlos, pida ayuda a su Administrador de Red con la configuracin.
  Active el frame tipo Ethernet_II sobre su Red Local (LAN) tecleando
  los comandos o incluyndolos en el archivo AUTOEXEC.ncf.

               load NE2000 frame=Ethernet_II name=IPNET
               load TCPIP
               bind IP to IPNET addr=172.16.0.2 mask=FF.FF.FF.0

  Podra tener que especificar el slot o nmero de tarjeta cuando cargue
  el controlador de dispositivo NE2000 dependiendo de la configuracin
  de su mquina. (pe: load NE2000 slot=3 frame=.....)

  4.3.  Configuracin de Clientes Netware

  Tiene que escoger entre Windows 3.1, 3.11 o Win95. El procedimiento de
  instalacin difiere entre Win95 y los viejos windows, si est usando
  el cliente de 32 bits de Microsoft o Novell. Si va a usar el cliente
  de 16 bits, el procedimiento es el mismo y puede referirse a las
  instrucciones de instalacin de Windows 3.x. Para instalar el cliente
  de 32 bits para Win95 vaya directo a Instalacin Windows 95 (seccin
  ``'').

  4.3.1.  Windows 3.x

  Si est usando Win3.1 o W3.11 puede instalar el Cliente Netware (VLMs)
  y algunos archivos adicionales los cuales estn suministrados con el
  diskette TCP/IP, llamados:

  TCPIP.exe, VTCPIP.386, WINSOCK.dll y WLIBSOCK.dll

  Tenga en cuenta que el archivo WINSOCK.dll es diferente al
  suministrado con Win95 y Trumpet. Instale el Cliente Netware con el
  soporte para windows. Copie VTCPIP.386, WINSOCK.dll y WLIBSOCK.dll al
  directorio SYSTEM y TCPIP.exe al directorio NWCLIENT.  Modifique el
  fichero STARTNET.bat del directorio NWCLIENT:

               lsl
               ne2000                    ----> su controlador de tarjeta de red
               c:\windows\odihlp.exe     ----> Si usa W3.11
               ipxodi
               tcpip                     ----> Agregue esta linea
               nwip                      ----> Si usa Netware/IP
               vlm

  Cree un subdirectorio, por ejemplo \NET\TCP y copie los archivos
  HOSTS, NETWORKS, PROTOCOLS y SERVICES desde /etc del servidor Linux o
  del directorio SYS:ETC de su Servidor Netware.  Edite el archivo HOSTS
  copiado y aada una lnea para su nuevo servidor Linux. Esto le
  permitir referirse a su Servidor Linux como http://linux.midominio/
  en lugar de http://172.16.0.1/ en su navegador WWW.

               127.0.0.1       localhost
               172.16.0.1      linux.midominio

  Edite el archivo BET.cfg del directorio NWCLIENT

          Link Driver NE2000
              port 300
              int 3
              MEM D0000
              FRAME Ethernet_802.2

       ; ---- agregue estas lineas ----

             FRAME Ethernet_II

          Protocol TCPIP
             PATH TCP_CFG C:\NET\TCP
             ip_address  172.17.0.5
             ip_netmask  255.255.255.0
             ip_router   172.17.0.254   ; ---> agregue la direccion de su gateway
                                        ; ---> solo si tiene que usar este gateway
                                        ; ---> para alcanzar a su Servidor HTTP

          Link Support
             MemPool 6192       ; ---> el minimo es 1024. Pruebe con diferentes valores

             Buffers 10 1580    ; ---> tambien puede ser afinado.

       ;---------------------------------
       ; Necesita agregar lineas como estas si esta usando Netware/IP
       ;
          NWIP
             NWIP_DOMAIN_NAME  midominio
             NSQ_BROADCAST   ON
             NWIP1_1 COMPATIBILITY   OFF
             AUTORETRIES     1
             AUTORETRY SECS  10

  Edite el archivo SYSTEM.ini del directorio WINDOWS y aada esta
  entrada para VTCPIP.386

               [386Enh]
               .....
               network=*vnetbios, vipx.386, vnetware.386, VTCPIP.386
               .....

  Reinicie su PC, ejecute STARTNET.bat y podr ahora usar su navegador
  favorito para acceder a sus pginas Web. No necesita acceder a Netware
  y no necesita ejecutar TCPMAN (si est usando Trumpet Winsock).

  4.3.2.  Windows 95

  Esta seccin explica cmo instalar el cliente de 32 bits para Win95.
  Primeramente tiene que instalar lo siguiente:

    Cliente para Redes Netware (de Microsoft o Novell)

    Protocolo de Microsoft TCP/IP

    Adaptador de Red

  Para instalar estos mdulos, haga click en Mi PC, Panel de Control y
  Red. Haga click en Aadir. Estar ahora en una ventana que muestra
  Cliente, Adaptador, Protocolo y Servicios. Para Instalar el Cliente de
  Redes Netware:

  1. Haga doble click en Clientes

  2. Haga click en Microsoft o Novell

  3. Haga doble click en Cliente para Redes Netware

  Para instalar el protocolo TCP/IP:

  1. Haga doble click en Protocolos

  2. Haga click en Microsoft

  3. Haga doble click en TCP/IP

  Windows 95 por omisin instala varios protocolos adicionales
  automticamente. Elimnelos haciendo click en ellos y luego en el
  botn Eliminar.  Tpicamente Win95 instala el protocolo de Microsoft
  NetBeui, y el protocolo IPX/SPX compatible. Puede eliminar el
  protocolo NetBEUI, pero necesitar el protocolo IPX/SPX si desea
  acceder al Servidor Netware.

  Para configurar TCP/IP, haga click en TCP/IP, Propiedades, lengeta de
  direccin IP.

  1. Coloque su direccin IP en el campo Especificar una direccin IP
     como 172.17.0.5

  2. En Mscara de subred introduzca 255.255.255.0

  3. Seleccione la lengeta Gateway

  4. Coloque la direccin del gateway o pasarela en el cuadro Nuevo
     gateway como 172.17.0.254

  5. Haga click en el botn Agregar

  La direccin del gateway debe aparecer ahora en la ventana de gateways
  instalados. Haga click en Aceptar.

  Debe obtener un mensaje de reiniciar. Hgalo, debe ser capaz ahora de
  usar su navegador para conectarse a su Servidor HTTP.

  4.4.  Configuracin de Clientes Microsoft

  Si est usando el Cliente de Microsoft para acceder a la red, en esta
  seccin encontrar detalles acerca de cmo instalar TCP/IP para:

    Windows 3.11

    Windows 95

    Windows NT 4.0

  Nota: Para que sea posible referirse al servidor Linux como
  http://linux.midominio/ en lugar de http://172.16.0.1/ en los
  navegadores WWW y todos los comandos de intranet, necesitar editar el
  archivo HOSTS (-- N. del Revisor
  servidor de nombres (DNS) en el Linux y dirigir la resolucin de
  nombres de los dems equipos a l; vea el DNS-Como, disponible en
  castellano en cualquier rplica de sunsite en el directorio .  Puede
  aadir ms entradas por cada uno de los dems equipos (Netware, Unix,
  WinNT).

  La familia Windows mantiene este archivo HOSTS en \WINDOWS o en
  \WINDOWS\SYSTEM dependiendo de la versin.  Edite este archivo y aada
  una lnea para su servidor Linux como:

               127.0.0.1      localhost
               172.16.0.1     linux.midominio

               172.16.0.2     netware.midominio
               172.16.0.3     winNT.midominio
               172.16.0.5     et_1

  4.4.1.  Windows 3.11.

  Esta seccin explica cmo instalar el cliente de 32 bits para W3.11.
  Primeramente debe descargar los controladores TCP/IP para Windows del
  servidor de Microsoft en Internet. La versin actual es la 3.11b,
  estando disponible en ftp://ftp.microsoft.com o en otros servidores
  como tcp32b.exe. Asegrese de tener instalado Win32s antes de tratar
  de instalar el controlador TCP/IP de 32 bits.

  Habiendo expandido los archivos de TCP/IP en un directorio temporal
  (digamos C:\TEMP), compruebe que en el directorio \WINDOWS\SYSTEM no
  exista una copia de OEMSETUP.INF. Si tiene alguna, renmbrela. Copie
  el archivo OEMSETUP.INF desde el directorio TEMP al directorio
  \WINDOWS\SYSTEM. Si ha instalado alguna otra pila TCP/IP en el
  sistema, por favor elimnelas antes de proceder.

  Arrancar Configuracin de Red o Configurar Windows/Cambiar
  Configuracin de Red

  1. Haga click en el botn Redes.

  2. Haga click en Instalar Red de Microsoft Windows.

  3. Escoja soporte para redes adicionales (si se requiere).

  4. Haga click en Aceptar.

  Debe preguntarle sobre su adaptador de red, seleccione uno apropiado.
  Si no le pregunta, entonces:

  1. Haga click en el botn Adaptador.

    seleccione un adaptador (por ejemplo, NE2000)

    Haga click en Aceptar

  2. Haga click en el botn de protocolo

    Seleccione Protocolo TCP/IP-32 de Microsoft.

    Haga click en Aceptar

  Le ser requerido configurar la pila de protocolos TCP/IP.  Siempre
  puede volver a configurarlo escogiendo protocolo TCP/IP en el cuadro
  de dilogo Adaptadores mostrado y haciendo click en el botn
  Configurar.

  1. En el campo direccin IP introduzca 172.17.0.5

  2. En Mscara de Subred escriba 255.255.255.0

  3. Introduzca la direccin de su gateway o pasarela en el campo
     gateway por defecto, por ejemplo 172.17.0.254

  Haga click en Aceptar. La computadora le preguntar si desea
  reiniciar. Hgalo. Debe ser capaz de usar el navegador para conectarse
  a su Servidor HTTP.

  4.4.2.  Windows 95

  Esta seccin explica cmo instalar el Cliente de 32 bits de Microsoft
  para Win95. Primero deber instalar lo siguiente:

    Cliente para Redes Microsoft

    Protocolo TCP/IP de Microsoft

    Adaptador de Red

  Para instalar estos mdulos, vaya a Mi PC, Panel de Control, Red.
  Haga click en Agregar. Estar ahora en una ventana que muestra
  Cliente, Adaptador, Protocolo y Servicio. Para instalar el Cliente de
  Redes de Microsoft:

  1. Haga doble click en Cliente

  2. Haga click en Microsoft

  3. Haga doble click en Cliente para Redes de Microsoft

  Para instalar el Protocolo TCP/IP:

  1. Haga doble click en Protocolo

  2. Haga doble click en Microsoft

  3. Haga doble click en TCP/IP

  Windows 95 por omisin instala varios protocolos automticamente.
  Elimnelos seleccionndolos y haciendo click en el botn Eliminar.
  Win95 instala por defecto el Protocolo de Microsoft NetBeui.

  Para configurar TCP/IP, haga click en TCP/IP, click en Propiedades, y
  en la lengeta Direccin IP

  1. Introduzca su direccin IP en el cuadro Especificar una direccin
     IP como por ejemplo 172.17.0.5 En el cuadro de dilogo de Mscara
     de subred introduzca 255.255.255.0.

  2. seleccione la lengeta Gateway

  3. Escriba la direccin IP de su pasarela o gateway en el cuadro Nuevo
     gateway, por ejemplo 172.17.0.254. Haga click en el botn Agregar.

  La direccin de la mquina pasarela o gateway aparecer bajo el campo
  de gateways instalados. Haga click en Aceptar. Llegados a este punto,
  debera ser capaz de usar un navegador para conectar a su Servidor
  HTTP.

  4.4.3.  Windows NT

  Esta seccin detalla cmo instalar el cliente TCP/IP para WinNT 4.0.

  Vaya a Inicio, Panel de Control, Red.

  Seleccione la lengeta Adaptador. Haga click en Agregar nuevo
  adaptador (si no tiene ninguno).

  Deber preguntarle sobre su adaptador de red. Seleccione uno
  apropiado.

  Para agregar los protocolos:

  Seleccione la lengeta protocolos

  Haga click en Agregar

  Seleccione el protocolo TCP/IP

  Haga click en Aceptar.

  Le preguntar sobre la configuracin de la pila de protocolo TCP.
  Siempre puede volver a configurar esto seleccionado el protocolo
  TCP/IP y haciendo click en el botn Propiedades.

  Seleccione la lengeta Direccin IP

  Active la casilla de verificacin Especificar una direccin IP

  En la casilla de direccin IP introduzca 172.17.0.5

  En la casilla de mscara de subred introduzca 255.255.255.0

  Escriba la direccin de la mquina pasarela o gateway en la caja de
  Default Gateway, por ejemplo 172.17.0.254.

  Haga click en Aceptar. La computadora le preguntar si desea
  reiniciar.  Llegados a este punto debe poder ser capaz de utilizar
  cualquier navegador para conectar a su Servidor HTTP.

  4.5.  Configuracin de TCP/IP en Macintosh

  Si est usando algn Macintosh en su red, esta seccin le ayudar a
  instalar MacTCP para PowerMacs.

  Nota: Para habilitar el poder referirse al servidor Linux como
  http://linux.midominio/ en lugar de http://172.16.0.1/ en el navegador
  de WWW y todos sus comandos en la intranet necesitar editar el
  archivo hosts.

  El formato del archivo hosts est basado en el RFC-1035. Puede aadir
  ms entradas para cada uno de sus otros servidores (Netware, Unix,
  WinNT) tambin. El MacOS mantiene el archivo HOSTS en la carpeta de
  Preferencias bajo la carpeta de Sistema. Edite este archivo y aada
  una linea para su servidor Linux como:

              linux.midominio   A  172.16.0.1

              netware.midominio A  172.16.0.2
              winNT.midominio   A  172.16.0.3
              et_1              A  172.16.0.5

  4.5.1.  MacTCP

  Esta seccin explica cmo instalar MacTCP. Primero ha de descargar los
  archivos de MacTCP de Apple, o instalarlos desde el CD de Conexin a
  Internet. Para Configurar MacTCP, haga click en Men Apple, Paneles de
  Control, TCP/IP.

  1. Cambie los parmetros Connect via: a Ethernet.

  2. Cambie el parmetro Configurar a Manualmente.

  3. En el campo de direccin IP introduzca 172.17.0.5

  4. En la casilla de Mscara de subred introduzca 255.255.255.0

  5. Escriba la direccin de su equipo pasarela o gateway en la casilla
     de direccin de equipo pasarela (Router address), por ejemplo
     172.17.0.254.

  Haga click en Aceptar. Ahora deber ser capaz de usar el navegador
  para conectar a su Servidor HTTP.

  5.  Aumentando las prestaciones de la Intranet.

  Una Intranet no puede estar completa sin compartir recursos entre
  diferentes plataformas. Ser necesario soportar otros sistemas de
  archivos, y tener la informacin disponible en ellos.  Este documento
  provee instrucciones para conectar Linux con los siguientes sistemas
  de archivos populares:

    Sistema de archivos NCP para Netware.

    Sistema de archivos SMB para Windows

    Sistema de Archivos NFS para Unix

  Estos sistemas de archivos pueden ser compilados dentro del kernel de
  Linux o ser aadidos como mdulos, dependiendo de la versin de Linux.
  Si no est familiarizado con la compilacin del kernel puede referirse
  al Kernel-Como,
  http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Translations/es/Kernel-
  Como y el Module-HOWTO, http://sunsite.unc.edu/mdw/HOWTO/Module-
  HOWTO.html para compilar el kernel con los mdulos.

  5.1.  NCPFS

  Para compartir archivos con un Servidor Netware necesita soporte NCP
  (ncpfs). NCPFS funciona con los kernels 1.2.x y 1.3.71 en adelante.
  No funciona con cualquier kernel menor al 1.3.x. No puede acceder a la
  base de datos NDS (Servicios de Directorio) de Netware 4.x, pero podr
  hacer uso del bindery. Si est usando Netware 4.x, puede habilitar el
  soporte de bindery para contenedores especficos usando el comando Set
  Bindery Context desde la consola:

       set Bindery Context = CORP.MIDOMINIO;WEBUSER.MIDOMINIO

  En este ejemplo dos contenedores tienen el soporte bindery habilitado.

  Puede que necesite descargar las utilidades para el Sistema de
  archivos NCP de
  ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/ncpfs.tgz
  (actualmente ncpfs-2.0.10) de Sunsite.

  5.1.1.  Instalacin

  Para instalar las utilidades ncpfs, teclee:

       zcat ncpfs.tgz | tar xvf -

  para descomprimir los archivos en su propio directorio. En este caso
  obtendr el directorio ncpfs-2.0.10. Cambie a este directorio antes de
  proceder con la instalacin. Lea el fichero README y edite el archivo
  Makefile si es necesario.

  La instalacin de ncpfs depende de la versin de kernel que est
  usando.  Para el kernel 1.2, debe teclear nicamente make.  Tecleando
  make install instalar los ejecutables y las pginas man.

  Si usa el kernel 1.3.71 o posterior, tendr que recompilar el kernel.
  Con stos, la parte del kernel de ncpfs est incluida en el rbol de
  fuentes principal. Para comprobar si el kernel necesita ser
  recompilado escriba:

       cat /proc/filesystems

  Esto debera mostrar alguna lnea en la que aparezca ncpfs.

  Si ncpfs no est ah, puede escoger entre recompilar el kernel o
  aadir ncpfs como mdulo. Para recompilar el kernel, vaya a
  /usr/src/linux y teclee make config. Una de las preguntas ser:

       The IPX protocol (CONFIG_IPX) [N/y/?]

  Conteste y (s). Probablemente no lo necesitara para acceder al total
  de su red interna hasta este momento. Una vez que el kernel est
  correctamente instalado, reinicie, compruebe /proc/filesystems, y si
  todo es correcto proceda con la instalacin de las utilidades ncpfs.
  Cambie al directorio donde se encuentren los archivos ncpfs que
  descarg, y teclee make. Despus de la compilacin, escriba make
  install para instalar las diversas utilidades y las pginas man.

  5.1.2.  Montaje de sistemas de archivos NCPFS

  Compruebe la instalacin:

       ipx_configure --auto_interface=on --auto_primary=on
       slist

  Deber ser capaz de ver una lista de los servidores Netware. Ya
  estamos listos para compartir archivos desde el servidor Netware.

  Suponiendo que necesitsemos acceder a archivos HTML desde el
  directorio \home\htmldocs en el volumen VOL1: del servidor  MIDOM_NW,
  lo recomendable sera que crease un usuario nuevo, como por ejemplo
  EXPORT con la clave de acceso EXP123 en este servidor y concederle los
  derechos de acceso apropiados en este directorio usando SYSCON o
  NWADMIN.

  En la mquina Linux crea un directorio nuevo, /mnt/MIDOM_NW.

  Teclee:

       ncpmount -S MIDOM_NW -U EXPORT -P EXP123 /mnt/MIDOM_NW

  para montar el sistema de archivos de netware. Escriba el comando

       ls /mnt/MIDOM_NW/vol1/home/htmldocs

  Le mostrar una lista de todos los archivos en
  MIDOM_NW/VOL1:\HOME\HTMLDOCS (usando la notacin de archivos de
  Netware).  Si tiene algn problemas, lea el IPX-HOWTO, disponible en
  http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html para mayor informacin
  sobre el sistema IPX.

  5.2.  SMBFS

  Para compartir archivos con un servidor Windows necesitar soporte
  para SMB (smbfs).

  Necesitar descargar las utilidades del sistema de archivos SMB de
  ftp://sunsite.unc.edu/pub/Linux/system/filesystems/smbfs/smbfs.tgz
  (actualmente smbfs-2.0.1) en Sunsite.

  5.2.1.  Instalacin

  Para instalar las utilidades smbfs, escriba

               zcat smbfs.tgz | tar xvf -

  para descomprimir los archivos dentro de su propio directorio. En este
  caso obtendra el directorio smbfs-2.0.1. Cambie a este directorio
  antes de proceder con la instalacin. Lea el fichero README y edite el
  archivo Makefile si es necesario.

  La instalacin de smbfs depende de la versin de kernel que est
  usando. Para el kernel 1.2, basta con teclear make.  Teclee make
  install posteriormente para instalar los ejecutables y las pginas
  man.

  Si usa el kernel 2.0 o posterior, debe recompilar el kernel. Con estas
  versiones, el soporte smbfs est ya incluido en el rbol de fuentes
  principal del kernel. Para comprobar si el kernel necesita ser
  recompilado, escriba:

       cat /proc/filesystems

  Deber aparecer alguna lnea en la que aparezca el trmino smbfs (--
  Nota del Revisor
  aparezca, es posible que tenga el soporte compilado como mdulo; por
  ejemplo, para una versin de kernel 2.0.33, compruebe el contenido del
  directorio /lib/modules/2.0.33/fs/--)

  Si no tiene soporte smbfs, puede escoger entre recompilar el kernel o
  aadir smbfs como mdulo. Para recompilar el kernel, cambie al
  directorio /usr/src/linux y escriba make config respondiendo Y (yes) a
  la pregunta para aadir soporte para sistema de archivos SMB (SMB
  filesystem support).

  Una vez que el kernel est correctamente instalado, reinicie,
  compruebe /proc/filesystems y si todo es correcto proceda con la
  instalacin de las utilidades smbfs. Cambie al directorio donde se
  encuentre los archivos de las utilidades smbfs que descarg, y escriba
  make.

  Despus de la compilacin, teclee make install para instalar las
  varias utilidades y las pginas man.

  5.2.2.  Montaje de sistemas de ficheros SMBFS

  En nuestro ejemplo asumimos que el servidor WinNT fue llamado MIDOM_NT
  y que est compartiendo el directorio C:\PUB\HTMLDOCS con el nombre de
  recurso compartido HTMLDOCS sin clave de acceso. Cree el directorio
  /mnt/MIDOM_NT en la mquina Linux. Tecleando el comando

       smbmount //MIDOM_NT/HTMLDOCS /mnt/MIDOM_NT -n

  montar el sistema de archivos SMB. Si esto no funciona pruebe

       smbmount //MIDOM_NT/COMMON /mnt/MIDOM_NT -n -I 172.16.0.3

  Escribiendo el comando

       ls /mnt/MIDOM_NT

  aparecer una lista de todos los archivos en \\MIDOM_NT\PUB\HTMLDOCS
  (usando la notacin de archivos de windows).

  5.3.  NFS

  Primero necesitar que el kernel soporte el sistema de archivos NFS,
  bien compilado, o disponible como mdulo.

  Suponga que tiene una mquina Unix corriendo NFS con el nombre
  MIDOM_UNIX con la direccin IP 172.16.0.4. Puede comprobar qu
  directorios estn siendo exportados (compartidos) tecleando el comando

       showmount -e 172.16.0.4

  Una vez conozcamos los directorios exportados podr montarlos mediante
  el comando apropiado de montaje. Recomiendo que cree un subdirectorio
  bajo /mnt como por ejemplo MIDOM_UNIX y use ste como punto de
  montaje.

       mount -o rsize=1024,wsize=1024 172.16.0.4:/pub/htmldocs /mnt/MIDOM_UNIX

  rsize y wisize pueden recibir distintos valores dependiendo de su
  entorno.

  Si tiene algn problema, lea el NFS-HOWTO, disponible en
  http://sunsite.unc.edu/mdw/HOWTO/NFS-HOWTO.html para mayor informacin
  sobre el sistema NFS.

  6.  Acceso al servidor Web

  Ahora que tenemos configurado el servidor de HTTP, los clientes y el
  servidor Linux interconectado con otros servidores, es necesario hacer
  unos pequeos ajustes para permitir el acceso a los sistemas de
  archivos montados en la mquina Linux desde el navegador Web.

  6.1.  Linux Acceso a los sistemas de archivos externos montados en el
  servidor

  Para acceder a los directorios externos montados en el servidor Linux,
  donde residen las pginas HTML puede usar dos mtodos:

    Crear un enlace simblico en el directorio designado como
     DocumentRoot para el servidor HTTP, (/usr/local/etc/httpd/htdocs)
     que apunte al directorio montado (-- N. del Revisor
     en /usr/local/etc/httpd/htdocs--) :

       ln -s /mnt/MIDOM_NW/vol1/home/htmldocs netware

  o bien

          ln -s /mnt/MIDOM_NT    winNT

  o bien

          ln -s /mnt/MIDOM_UNIX    unix

    Editar el archivo srm.conf del directorio /usr/local/etc/httpd/conf
     y aadir un nuevo alias:

              # Alias pseudonimo nombre real
              Alias /icons/     /usr/local/etc/httpd/icons/

              # alias para sistemas de ficheros externos montados en la maquina
              Alias /netware/   /mnt/MIDOM_NW/vol1/home/htmldocs/
              Alias /winNT/     /mnt/MIDOM_NT/
              Alias /unix/      /mnt/MIDOM_UNIX

  reinicialice HTTPd. Podr acceder a los documentos del servidor net
  ware y referirse a ellos como http://linux.midominio/netware/index.htm
  para los archivos netware y notaciones similares para los otros.

  6.2.  Conexin a Internet

  Puede finalmente conectar su Intranet a Internet para acceder a correo
  electrnico (e-mail) y todo la maravillosa informacin disponible en
  l.  Le propongo escribir una breve nota de cmo hacer esto en una
  futura revisin. Hay explicaciones detalladas el ISP-Hookup-HOWTO (--
  Para aquellos en los que en su pas exista el servicio Infova, puede
  resultar de utilidad el Infobia-Como, disponible en
  sunsite.unc.edu/pub/Linux/docs/howto/translations/es--)

  disponible en http://sunsite.unc.edu/mdw/HOWTO/ISP-Hookup-HOWTO.html y
  el mini-Diald-HOWTO, de http://sunsite.unc.edu/mdw/HOWTO/mini/Diald
  para configurar este tipo de conexiones.

  6.3.  Otros usos

  El servidor HTTPD puede ser usado en la oficina para proveer acceso
  transparente a la informacin residente en diferentes servidores, en
  varias localizaciones y directorios. La informacin pueden ser simples
  documentos en Word, Hojas de clculo de Lotus o complejas bases de
  datos.

  La aplicacin de esta tecnologa esta siendo tpicamente usada como
  sigue:

    Publicacin de documentos corporativos:

     Estos documentos pueden incluir noticias, informes anuales, mapas,
     instalaciones de la compaa, listas de precios, informacin sobre
     productos, y cualquier documento que sea de valor en una entidad
     corporativa.

    Acceso a directorios de bsqueda:

     Acceso rpido a agendas telefnicas corporativas y similares. Esta
     informacin puede ser replicada en el sitio Web o, va scripts CGI,
     el servidor Web puede servir como interfaz a la base de datos
     preexistente o nuevas aplicaciones.

     Esto quiere decir que usando los mismos mecanismos de acceso
     estndar, la informacin puede hacerse ms accesible de una forma
     simple. Esto significa que puede ser usada para crear una interface
     con RDBMS como ORACLE y SYBASE para generar informacin en tiempo
     real.

     He aqu una lista de enlaces Web que usan este tipo de tecnologa:

    http://cscsun1.larc.nasa.gov/~beowulf/db/web_access.html

    Interfaces CGI:
     http://www.w3.org/hypertext/WWW/RDBGate/Overview.html

    Pginas Corporativas/Departamentales/Individuales:

     Las organizaciones deben tender a nivelar cada movimiento
     departamental cumpliendo su propia misin individual; la tecnologa
     de Intranet provee el medio ideal para acceder a la informacin ms
     reciente sobre departamentos o individuos. Potentes motores de
     bsqueda proporcionarn medios para que la gente busque al grupo o
     individuo que tiene las respuestas a las continuas preguntas que se
     originan en el curso normal de cada da y durante el desarrollo de
     los negocios.

    Aplicaciones simples de trabajo en grupo:

     Con el soporte de los formularios HTML, los servidores pueden
     proveer pginas para firma electrnica, supervisin o planificacin
     simple.

    Distribucin del Software:

     Los Administradores pueden usar la Intranet para liberar software y
     actualizaciones bajo demanda de los usuarios a travs de la red
     corporativa. Esto puede ser hecho con Java, que permite la creacin
     y distribucin transparente de objetos en demanda mas que solamente
     datos o aplicaciones. Esto es posible ms fcilmente con las nuevas
     versiones de Linux con soporte para Java integrado.

    Correo electrnico (email):

     Con la tendencia en alza del uso de productos de correo de Intranet
     como estndar, as como mtodos simples para compartir documentos,
     sonido, vdeo y otras tecnologas multimedia entre individuos, el
     correo est siendo impulsado ms all del simple mtodo de
     comunicacin de facto.  El correo es comunicacin esencialmente de
     individuo a individuo, o de individuo a un grupo pequeo. Las
     diversas utilidades disponibles sobre plataforma Linux permiten
     configurar un sistema de correo electrnico como sendmail, pop3d,
     imapd.

    Interfaz de Usuario:

     La tecnologa de Intranet est evolucionado tan rpidamente que las
     herramientas disponibles, en particular HTML, pueden ser usadas
     para cambiar dramticamente la manera en que nos relacionamos con
     los sistemas.

     El lenguaje HTML permite elaborar una interfaz limitada nicamente
     por la imaginacin de los autores. La belleza acerca de usar
     tecnologas de Intranet para esto reside en su extremada
     simplicidad. Haciendo click en un enlace HTML puede ir a otra
     pgina, accionar una alarma, ejecutar un procedimiento de cierre de
     fin de ao o cualquier cosa que se pueda hacer desde un programa de
     computadora.

  7.  Ms cosas que hacer

  Aqu hay una lista de otros aspectos interesantes que hacer con su
  servidor de Intranet Linux. Todo el software mencionado a continuacin
  es freeware o shareware.

    Acceder a su servidor Linux a travs del Entorno de Red en
     Win95/NT; Configurar WINS como servidor NBT. Compruebe la pgina
     Web de SAMBA en http://lake.canberra.edu.au/pub/samba/samba.html

    Implementar una motor de bsqueda en Internet. Conctese a Dig en
     http://htdig.sdsu.edu/

    Posibilitar el uso de CUSeeMe mediante un reflector local.
     Refirase a la pgina de la universidad de Cornell http://cu-
     seeme.cornell.edu/

    Configurar Conferencias Web. Use COW, disponible en
     http://thecity.sfsu.edu/COW/

    Implementar una base de datos SQL. Refirase a la pgina del mSQL
     en http://Hughes.com.au/

    Configurar servidores de FTP, Gopher, Finger, Bootp en el servidor
     Netware: obtngalos de http://mft.ucs.ed.ac.uk/

    Emular un servidor Netware. Compruebe las utilidades NCP de
     ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/

  Si encuentra otras cosas interesantes que hacer con su servidor Linux,
  sintase libre de escribirme.

  8.  Crditos y Legalidades

  8.1.  Agradecimientos

  Gracias a la gente de NCSA por proveer tal excelente documentacin, a
  David Anderson y a todos los otros que revisaron este COMO y me
  enviaron sus comentarios. Los detalles de Netware/IP son cortesa de
  Romel Flores, rom@mnl.sequel.net.

  8.2.  Informacin de Copyright

  Este documento est bajo los derechos de copyright de Pramod Karnad
  1996, 1997 y puede ser distribuido bajo los siguientes trminos:

    Los Documentos COMO de Linux pueden ser reproducidos y distribuidos
     total o parcialmente, en cualquier medio fsico o electrnico,
     incluyendo esta nota de derechos en todas las copias. La
     redistribucin comercial est permitida y alentada; el autor
     deseara ser informado de tales distribuciones.

    Todas las traducciones, trabajos derivados o adicionales
     incorporados en cualquier documento COMO de Linux debe ser cubierto
     bajo esta noticia de derechos. Esto es, no debe producir o derivar
     un trabajo de un COMO e imponer restricciones a su distribucin.
     Excepciones a estas reglas podrn ser concedidas bajo determinadas
     condiciones; por favor contactar con el coordinador de Linux HOWTO
     a la direccin que se dar a continuacin.

    Si tiene preguntas, por favor contacte con Greg Hankins, el
     coordinador de Linux HOWTO, en gregh@sunsite.unc.edu hgale un
     finger si quiere su nmero telefnico y direccin de correo
     convencional.

  9.  Nota del Traductor.

  Mi nombre es Salvador Fernndez Barqun, formo parte del proyecto
  LUCAS/INSFLUG. Este documento es mi aportacin al terreno de uso de
  Linux como Servidor de Intranet.

  Linux es el sistema operativo del presente y del futuro, su
  permanencia esta garantizada por cientos de programadores de todo el
  mundo que, en un esfuerzo sin precedentes se han dedicado a construir
  una plataforma de trabajo estable, libre y completa. Ese futuro est
  garantizado por su licencia GNU que asegura que el programa binario
  venga acompaado de sus fuentes; de esta forma, los programas nunca
  quedarn en el olvido y siempre habr alguien en el mundo que los
  pueda corregir, ampliar o darles mantenimiento.

  Este documento es mi aportacin para que el proyecto Linux sea cada
  vez ms grande y conocido entre nosotros los que hablamos la lengua de
  Cervantes, y ahora que la integracin de Servidores Intranet en las
  Universidades, Tecnolgicos, Empresas y Corporaciones es una realidad
  palpable, Linux es una solucin real y tangible.

  Particularmente espero que este documento sea de ayuda e inters a
  todos aquellos que deseen implementar una Intranet Educacional,
  Institucional o Corporativa con Linux.

  Hay mucho por traducir, y tambin hay muchos documentos traducidos,
  visite http://lucas.ctv.es o el INSFLUG, www.insflug.org (seccin
  ``'') o los mltiples servidores rplica para conocer ms sobre este
  proyecto u obtener otros documentos en castellano.

  No esta de ms decir que he intentado ajustarme lo mayor posible al
  original de Pramod Karnad y he revisado la traduccin un par de veces.
  No obstante an puede quedar algo por pulir o se me ha podido colar
  alguna errata, de cuya responsabilidad me hago cargo, pero jams del
  buen o mal uso que pueda derivar la lectura de este documento.

  Para cualquier comentario, errata o consulta sobre la traduccin,
  mndeme un correo electrnico a: sferbar@internetica.net.mx

  Un saludo,

  Salvador Fernndez Barqun.

  Nota: En los mensajes de los sistemas operativos que se conjugan con
  Linux como clientes en este documento, me he basado en las versiones
  en castellano que circulan en Espaa e Iberoamrica.

  10.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.
  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Servidor De Races NFS Mini-COMO
  Ofer Maor, ofer@hadar.co.il
  Traducido por Rodolfo Pilas, rodolfo@linux.org.uy
  v3, 5 Diciembre 1996

  El objetivo de este Mini-COMO es explicar cmo crear directorios en un
  servidor que los clientes montarn como su directorio raz por NFS.
  ______________________________________________________________________

  ndice General:

  1.      Derechos

  1.1.    Agradecimientos

  2.      Prefacio

  2.1.    Nota

  3.      Creacin del directorio raz de los clientes

  3.1.    Creacin del rbol de directorios

  3.2.    Creacin del sistema de archivos mnimo para arrancar

  3.2.1.  Creacin del directorio /dev

  3.2.2.  Copia de los binarios necesarios

  3.2.3.  El directorio /var

  3.2.4.  El resto de los directorios

  3.3.    Preparacin del directorio /etc  y configuracin de los
  clientes

  3.3.1.  Creacin del rbol etc  de los clientes

  3.3.2.  Creacin del directorio /etc  del cliente

  3.3.3.  Arrancando

  4.      Creacin de ms clientes

  5.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Derechos

   1996 Ofer Maor ofer@hadar.co.il

  Se puede encontrar la ltima versin de este Mini-COMO (HTML o texto)
  en http://www.hadar.co.il/ofer/nfs-root-client/

  Salvo que exista una aclaracin en contra, los documentos COMO de
  Linux son propiedad de sus respectivos autores. Los documentos COMO de
  Linux pueden ser reproducidos o distribuidos en su totalidad o en
  parte, en cualquier medio fsico o electrnico, siendo estas
  declaraciones de derechos aplicables a todas las copias.  Se permite y
  fomenta las redistribuciones comerciales, pero en esos casos el autor
  debe ser notificado.

  Todas las traducciones y trabajos derivados que incorporen cualquier
  documento COMO de Linux estn cubiertos por esta declaracin de
  derechos.  Esto es, Usted no puede producir trabajos derivados de un
  COMO e imponerle restricciones adicionales.  Pueden ser concedidas
  excepciones a estas reglas bajo ciertas condiciones; por favor,
  contacte con el coordinador de los COMO de Linux en la direccin que
  se indica ms adelante.

  En resumen, deseamos promover la diseminacin de esta informacin a
  travs de tantos canales como sea posible.  Sin embargo, se desea
  retener los derechos sobre los documentos COMO, y nos gustara estar
  informados de cualquier plan de redistribuir los COMOs.

  Si tiene preguntas, por favor, contacte con Ofer Maor
  ofer@hadar.co.il, o Greg Hankins, el coordinador de los Linux COMO,
  gregh@sunsite.unc.edu va correo electrnico.

  Si tiene cualquier cosa para agregar a este Mini-COMO, por favor enve
  un email al autor (Ofer Maor ofer@hadar.co.il), con la informacin.
  Toda informacin nueva que sea relevante ser bienvenida.

  1.1.  Agradecimientos

  Me gustara expresar mi agradecimiento al autor de Linux Con Raz NFS
  Mini-COMO, Andreas Kostyrca, andreas@medman.ag.or.at.  A partir de su
  Mini-COMO pude dar los primeros pasos para montar mis clientes con
  directorio raz por NFS.  Este Mini-Como no pretende, de ninguna
  forma, suplantar dicho trabajo; lo ampla usando mi experiencia en
  este proceso.

  Tambin quiero agradecer a Mark Kushinsky, mark026@ibm.net por pulir
  el ingls y las expresiones de este Como, hasta lograr hacerlo mucho
  ms legible.

  2.  Prefacio

  Este Mini-Como ha sido escrito para ayudar a las personas que desean
  preparar los directorios de un servidor para ser montados como
  directorio raz mediante por clientes NFS.

  Por favor, tenga en cuenta que existen muchas maneras de lograr esto,
  dependiendo de las necesidades y de sus intenciones.  Si cada cliente
  es individual, y cada uno de ellos tiene su propio usuario y
  administrador, ser necesario que una parte significativa de los
  directorios de cada cliente no sea compartida con otro cliente.  Por
  otro lado, si el cliente es accesible a muchos usuarios y estn todos
  administrados por la misma persona (como en un aula de clases), se
  buscar que la mayor cantidad posible de archivos estn compartidos a
  los efectos de hacer la administracin ms manejable.  Este Como se
  enfoca en esta segunda opcin.

  2.1.  Nota

  Cuando se construye el que ser el directorio raz del cliente, y se
  trata de ocupar un espacio mnimo, se debe atender principalmente a
  qu archivos pueden ser compartidos o montados desde el servidor.  En
  este Como recomiendo la configuracin de un cliente basado en mi
  experiencia.  Pero antes de empezar tenga en cuenta que:

    Este Mini-COMO no explica la importacin del directorio raz por
     NFS. Refirase al Linux-Con-Raz-NFS Mini-COMO si necesita mayor
     informacin sobre esto.
    Yo baso la mayora de las configuraciones de mis clientes en
     montajes y enlaces simblicos.  Muchos de los enlaces simblicos
     pueden ser reemplazados por enlaces rgidos (hardlinks).  Uno puede
     elegir de acuerdo a sus preferencias personales.  Utilizar enlaces
     rgidos sobre lo montado en vez de enlaces simblicos tiene sus
     ventajas, pero puede causar confusin.  Un archivo no es borrado
     definitivamente hasta que todos los enlaces rgidos sean
     eliminados.  Por esto, en previsin del caso en que algn archivo
     sea puesto al da y el enlace rgido todava se refiera a la
     versin vieja, es necesario tener especial cuidado en recordar cada
     enlace que utilice.

    Cuando se monta la informacin desde el servidor, pueden seguirse
     dos mtodos.  El primero (y ms comn), es montar la totalidad del
     directorio raz del servidor bajo un directorio local, y cambiar
     simplemente la trayectoria de bsqueda o enlazar los directorios
     relevantes all.  Personalmente no me gusta montar la particin
     raz del servidor en los clientes.  Por ello, este Como sugiere un
     mtodo para montar los directorios relevantes del servidor en los
     lugares apropiados del sistema.

    Este Como est basado en mi experiencia en la preparacin de
     directorios para clientes basados en la distribucin Slackware 3.1.
     Algunas cosas pueden resultar diferentes (especialmente en los
     archivos rc.*), para usuarios de otras distribuciones, sin embargo
     los mtodos y conceptos no varan.

  3.  Creacin del directorio raz de los clientes

  3.1.  Creacin del rbol de directorios

  Antes que nada, es necesario crear la estructura de directorios en s.
  Yo creo todos los clientes bajo /clients/nombre-maquina y usar esto
  en los ejemplos que cito a continuacin.  No obstante, se puede
  cambiar por cualquier otro nombre.  La primera etapa por tanto,
  consiste en crear los directorios relevantes en el que ser directorio
  raz del cliente.  Se deben crear los siguientes directorios:

       /bin
       /dev
       /etc
       /home
       /lib
       /mnt
       /proc
       /sbin
       /server
       /tmp
       /usr
       /var

  y cualquier otro directorio que desee tener en su sistema.

  Los directorios locales /proc y /dev deben ser utilizados
  separadamente por cada mquina, a diferencia del resto de directorios,
  que pueden estar compartidos parcial o completamente con el resto de
  los clientes.
  3.2.  Creacin del sistema de archivos mnimo para arrancar

  3.2.1.  Creacin del directorio /dev

  Si bien el directorio /dev puede ser compartido, es mejor crearlo
  separado para cada cliente.  Puede crear dicho directorio en el
  cliente con la macro MAKEDEV; sin embargo, en muchos casos resulta ms
  simple copiarlo del servidor:

       cp -a /dev /clients/nombre-maquina

  Debe recordar que /dev/mouse, /dev/cdrom y /dev/modem son enlaces
  simblicos a los dispositivos actuales y por tanto, asegurarse de que
  queden enlazados correctamente para apuntar al hardware
  correspondiente del cliente.

  3.2.2.  Copia de los binarios necesarios

  Aunque montemos todo desde el servidor, existe un grupo de binarios
  que necesitamos copiar para cada cliente.  Para empezar, necesitamos
  "init", ya que nuestro sistema no podr ejecutar nada antes de
  inicializarse (como su autor indica en los comentarios sobre el
  programa).

  Por tanto, primero deber copiar /sbin/init al directorio /sbin del
  cliente y como ejecutar rc.S, necesitar copiar /bin/sh al directorio
  /bin del cliente. Para poder montar necesitar copiar /sbin/mount al
  directorio /sbin del cliente.

  Esto es lo mnimo, asumiendo que la primera lnea de su rc.S es mount
  -av.  No obstante, recomiendo copiar algunos archivos ms: update, ls,
  rm, cp y umount, y as disponer de las herramientas bsicas en caso de
  que el cliente tenga problemas para montar.  Si elige tener el swap
  habilitado antes de montar, tambin tendra que copiar el binario
  swapon.

  Ya que muchos de estos binarios estn por defecto compilados
  dinmicamente, necesitar copiar una pequea parte de /lib:

       cp -a /lib/ld.* /lib/libc.* /lib/libcurses.* /client/nombre-maquina/lib

  Tambin es posible enlazar los binarios a s mismos, en lugar de
  copiarlos. Por favor, lea mis comentarios de la seccin ``'' de este
  documento.

  Tenga en cuenta que estamos asumiendo que el ncleo ha recibido todos
  los parmetros de red mientras se iniciaba. Si planea utilizar rarp o
  bootp, posiblemente necesite copiar tambin los binarios relevantes
  para esto.

  Generalmente, se necesitar tener un mnimo de archivos disponibles
  para configurar la red y ejecutar rc.S hasta el momento en que se
  monta el resto del sistema de archivos.

  3.2.3.  El directorio /var

  El directorio /var, en muchos casos, puede ser separado para cada
  cliente. Sin embargo, gran parte de la informacin puede estar
  compartida.  Cree bajo el directorio del servidor un directorio
  llamado var.  Montaremos el directorio /var de all. Para crear el
  directorio local /var, simplemente escriba:

       cp -a /var /clients/nombre-maquina

  Ahora, tiene la posibilidad de elegir lo que desea separar, y lo que
  desea compartir.  Para compartir cualquier directorio/archivo,
  elimnelo simplemente del directorio /var del cliente y enlcelo en al
  directorio /server/var.  Tenga en cuenta que debe enlazar tanto para
  /server/var como para ../server/var pero NO para /clients/nombre-
  maquina/server/var ya que esto no funcionar cuando cambie el
  directorio raz en cada cliente.

  Generalmente recomiendo separar /var/run, /var/lock, /var/spool y
  /var/log.

  3.2.4.  El resto de los directorios

    /etc se explica en la siguiente seccin.

    /mnt y /proc son para propsitos locales de cada cliente

    /usr y /home son solamente para montar

    /tmp depende de Usted.  Se puede crear un directorio tmp diferente
     para cada cliente, o crear un directorio /clients/tmp y montarlo
     para cada cliente en /tmp.  Yo recomiendo darle a cada cliente un
     directorio tmp separado.

  3.3.  clientes Preparacin del directorio /etc  y configuracin de los

  Tenga en cuenta lo siguiente: esta seccin se refiere a la creacin
  del directorio etc que est preferentemente compartido entre los
  clientes. Si sus clientes sin disco tienen administradores de sistema
  diferentes, lo mejor es configurar un directorio etc para cada
  cliente.

  3.3.1.  Creacin del rbol etc  de los clientes

  Aunque separemos el directorio etc para los clientes, mantendremos
  compartida una gran parte de los archivos que all se encuentran.
  Creo que compartir los archivos con el /etc del servidor es mala idea,
  y recomiendo crear un directorio /clients/etc que contenga la
  informacin compartida entre los clientes.  Para arrancar con esto,
  simplemente copie el contenido del /etc del servidor en el directorio
  /clients/etc.

  Se deber colocar en este directorio todos los archivos de
  configuracin que no sean especficos para una mquina, como pueden
  ser motd, issue, etc. y no los que sean especficos del cliente, como
  inittab o fstab.

  El cambio ms importante que deberemos realizar estar bajo el
  directorio rc.d. Primero, deberemos cambiar rc.inet1 para que refleje
  la configuracin local. Yo paso al ncleo todos los parmetros de red
  usando LILO/Loadlin, por lo que quito todo lo relacionado del archivo
  rc.inet1.  Lo nico que dejo all son los binarios ifconfig y route
  del cliente.  Si utiliza rarp o bootp, necesitar crearlo acorde a
  esto.

  En segundo lugar, deber editar su rc.S y eliminar todas las partes
  responsables de la comprobacin por parte de fsck que tiene lugar
  cuando arranca el servidor.  Debe encontrar la lnea que monta su
  fstab, que se parecer a:

       mount -avt nonfs

  El parmetro -t nonfs se debe a que los clientes normales ejecutan
  primero rc.S, usando despus rc.inet1 para configurar la red.  Como
  esto provoca que no sea montada ninguna partition NFS, la lnea es
  ignorada, y por ello, se debe cambiar a mount -av.  Si necesita
  ejecutar rarp/bootp para configurar la red, hgalo en rc.S (o incluya
  una llamada a alguna macro desde rc.S), antes de montar, y asegrese
  de que sus directorios /bin y /sbin tengan disponibles los archivos
  necesarios.

  Una vez se lleva a cabo mount -av, tendr un sistema de archivos
  funcionando.  Cree un fstab general, luego puede copiarlo en cada
  cliente.  Su fstab debe ser aproximadamente como este:

         server/nfs                                    default  1 1
         server:/bin           /bin            nfs     default  1 1
         server:/usr           /usr            nfs     default  1 1
         server:/sbin          /sbin           nfs     default  1 1
         server:/home          /home           nfs     default  1 1
         server:/lib           /lib            nfs     default  1 1
         server:/clients/etc   /server/etc     nfs     default  1 1
         server:/clients/var   /server/var     nfs     default  1 1
         none                  /proc           proc    default  1 1

  Asegrese tambin de que el /etc/exports del servidor sea algo como:

    /clients/<nombre-mquina>     maquina.dominio(rw,no_root_squash)
    /clients/etc                  maquina.dominio(ro,no_root_squash)
    /clients/var                  maquina.dominio(ro,no_root_squash)
    /usr                          maquina.dominio(ro,no_root_squash)
    /sbin                         maquina.dominio(ro,no_root_squash)
    /bin                          maquina.dominio(ro,no_root_squash)
    /lib                          maquina.dominio(ro,no_root_squash)
    /home                         maquina.dominio(ro,no_root_squash)

  Con excepcin de la primera lnea, que debe ser nica para cada
  mquina, el resto de las lneas pueden ser reemplazadas por nombres
  que engloben a todas las mquinas (por ejemplo pc*.dominio).  Le
  sugiero crear la mayora de los directorios como slo lectura, aunque
  esto es decisin suya. La indicacin no_root_squash har que los
  usuarios administradores de los clientes tengan tambin los permisos
  vigentes de root sobre nfsd. Revise la pgina man exports(5).  Si
  desea que los usuarios puedan ejecutar passwd desde los clientes,
  asegrese que /etc est con permisos rw y no ro.  Aunque esto no es
  obligatorio.

  Por favor, tenga en cuenta otro detalle en el archivo rc.S.  En
  Slackware, por defecto, se crea un nuevo /etc/issue y /etc/motd cada
  vez que se ejecuta.  Esta funcin DEBE ser deshabilitada si dichos
  archivos son montados como slo lectura desde el servidor, y
  recomiendo que estn deshabilitados en todos los casos.

  Finalmente, si desea mantener la misma base de usuarios tanto en el
  servidor como en los clientes, deber elegir entre:

  1. usar NIS (Pginas Amarillas - revise el NIS-Como), cada cliente
     deber disponer, por separado, de un /etc/passwd y un /etc/group
     tal y como lo recibe del servidor NIS.

  2. En la mayora de los casos, ser suficiente con un simple enlace
     simblico.  Por lo tanto, necesitar o bien un enlace rgido
     (hardlink) de /clients/etc/passwd a /etc/passwd, o si prefiere, un
     enlace simblico, enlazando /etc/passwd a /clients/etc/passwd (y no
     de la otra forma, ya que los clientes no montarn el directorio
     /etc del servidor).  Haga lo mismo para /etc/group.

  3.3.2.  Creacin del directorio /etc  del cliente

  Generalmente, la mayora de los archivos en el /etc del cliente
  estarn enlazados simblicamente con el directorio /server/etc.  Sin
  embargo, algunos archivos son diferentes para cada mquina, y otros
  solamente tienen que estar all cuando el ncleo los carga.  Lo mnimo
  que se necesita en el directorio /etc es lo siguiente:

       resolv.conf
       hosts
       inittab
       rc.d/rc.S
       fstab

  Ya que estos cinco archivos pueden ser idnticos para todos los
  clientes, los puede simplemente enlazar rgidamente o copiarlos una y
  otra vez.  No obstante, con los archivos rc.S y fstab debe tener
  presente que se necesita una copia separada para cada cliente.
  Tambin necesitar separar el /etc/HOSTNAME de cada cliente.  Yo
  personalmente recomiendo tener todos los archivos de rc.d separados
  para cada cliente, ya que la configuracin de hardware puede variar de
  uno a otro.

  Para cada cliente, agregue en el fstab una lnea apropiada para el
  archivo de intercambio:

          /dev/particion_swap              swap    swap    default 1 1

  Con el resto de los archivos del /etc del cliente, puede o bien
  enlazarlos rgidamente a los archivos /clients/etc/* o bien
  simblicamente con /server/etc (ya que es el punto de montaje de
  /clients/etc/)

  Asegrese de que su mquina puede resolver apropiadamente, tanto a
  travs de named como de etc/hosts.  No es mala idea mantener el nmero
  IP del servidor en /etc/hosts, en lugar de contar con resolverlo.  Si
  confa resolverlo con named solamente, cualquier problema con named
  puede impedir que sus clientes arranquen.

  3.3.3.  Arrancando

  Ahora, todo lo que necesita hacer es iniciar su mquina, cruzar los
  dedos y esperar que todo funcione como debe :-).

  4.  Creacin de ms clientes

  Si ha seguido mis instrucciones, lo cual debera haberle resultado
  simple, cambie al directorio /clients/ y escriba:

       cp -a hostname1 hostname2

  y asegrese de revisar estos puntos:

  los archivos rc.d/* coinciden con el hardware y la configuracin de
  software de /etc/HOSTNAME es correcta, la lnea del archivo de swap en
  fstab es correcta, y los enlaces simblicos a dev/mouse, dev/modem y
  dev/cdrom son correctos.

  Mucha suerte ...

  5.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

F BOGOMIPS.;1                       	BogoMIPS-mini-Como
F BRIDGE_C.;1                       	Bridge+Cortafuegos-Mini-Como
F BZIP2-CO.;1                       	Bzip2-Como
F CAMPANA-.;1                       	Campana-Visual-Como
F DHCPD-MI.;1                       	DHCPd-Mini-Como
F DISCOS-G.;1                       	Discos-Grandes-Como
F EN-HORA-.;1                       	En-Hora-Como
F FILTROS-.;1                       	Filtros-Impresion-Como
F FIPS-COM.;1                       	FIPS-Como
F GPG-MINI.;1                       	GPG-Mini-Como
F GRAVIS-U.;1                       	Gravis-UltraSound-Como
F INSTALAC.;1                       	Instalacion-Oracle-Mini-Como
F IRCII-CO.;1                       	IrcII-Como
F JAZ-COMO.;1                       	JAZ-Como
F LINUX-CO.;1                       	Linux-Con-Raiz-NFS-Como
F LINUX-DO.COM;1                    	Linux-DOS-Win95-OS2.Como
F LINUX-NT.;1                       	Linux-NT-Loader
F LINUX-SI.;1                       	Linux-Sin-Disco-Duro-Como
F LSCOLOR-.;1                       	Lscolor-Como
F NAVEGADO.;1                       	Navegador-Publico-Mini-Como
F PUNTERO-.;1                       	Puntero-X-Gigante-Como
F RATON_3_.;1                       	Raton_3_botones-Como
F REESCRIT.;1                       	Reescritura-Direcciones-En-Sendmail-Como
F SAC-COMO.;1                       	SAC-Como
F SERVIDOR.;1                       	Servidor-Raices-NFS-Como
F SERVIDOR.000;1                    	Servidor-Intranet-Como
F SLIP-COM.;1                       	SLIP-Como
F VESAFB-M.;1                       	Vesafb-Mini-Como
F ZIP-COMO.;1                       	ZIP-Como
  Vesafb Mini-COMO
  Autor: Alex Buell, alex.buell@tahallah.demon.co.uk Traducido
  por: Jess Martnez Mateo, jmartinez@sportec.es
  v0.5, 2 de Agosto de 1998

  Este documento describe cmo usar el dispositivo vesafb bajo Linux con
  una tarjeta grfica compatible VESA 2.0 en plataformas Intel.
  ______________________________________________________________________

  ndice general


  1. Aportaciones

  2. Qu es vesafb?

  3. Qu es un dispositivo framebuffer?

  4. Cmo activo los drivers vesafb?

  5. Qu modos VESA estn disponibles?

  6. Hay algn driver X11 para vesafb?

  7. Puedo compilar vesafb como mdulo?

  8. Miscelnea y Advertencias

  9. Acerca de la traduccin

  10. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Aportaciones


  Gracias a todas las personas nombradas a continuacin por su ayuda en
  la mejora de este documento (Vesafb Mini-HOWTO).


    Jeff Noxon jeff@planetfall.com

    Francis Devereux f.devereux@cs.ucl.ac.uk

    Andreas Ehliar ehliar@futurniture.se

    Martin McCarthy marty@ehabitat.demon.co.uk

    Simon Kenyon simon@koala.ie

    David Ford david@kalifornia.com

    Chris Negro cblack@cmpteam4.unil.ch

    N Becker nbecker@fred.net

    Bob Tracy rct@gherkin.sa.wlk.com

    Marius Hjelle marius.hjelle@roman.uib.no

    Aaron Tiensivu tiensivu@pilot.msu.edu


  y por supuesto los autores de los dispositivos framebuffer:


    Gerd Knorr kraxel@cs.tu-berlin.de

    Geert Uytterhoeven Geert.Uytterhoeven@cs.kuleuven.ac.be

    Martin Mares mj@ucw.cz

  Y a todas aquellas personas que deberan aparecer en este documento y
  no aparecen. :o)


  2.  Qu es vesafb?


  Vesafb es un controlador framebuffer para la arquitectura Intel que
  trabaja con las tarjetas grficas compatibles con la norma VESA 2.0.
  Este driver se encuentra estrechamente relacionado dentro del ncleo
  con los controladores de dispositivo para framebuffer.

  Vesafb es un driver de pantalla que habilita el uso de modos grficos
  en la plataforma Intel para las consolas de texto mediante mapas de
  bits (bitmapping).  Tambin permite desplegar un logotipo que
  probablemente es la razn principal por la que quiere usar vesafb :o)

  Desgraciadamente, no puede usar vesafb con las tarjetas que soportan
  la norma VESA 1.2. Esto es debido a que estas tarjetas no usan
  framebuffering. Puede ser que alguien decida escribir un driver de
  dispositivo (vesafb12) para estas tarjetas, pero esto usara la
  preciada memoria del ncleo. :o(

  Sin embargo, existe la posibilidad de habilitar extensiones VESA 2.0
  para tarjetas VESA 1.2.

  Puede conseguir un tipo de programa TSR que se ejecutar desde DOS, y
  usado en conjuncin con loadlin, puede ayudar a configurar la tarjeta
  para los modos grficos de consola apropiados.

  Tenga en cuenta que esto no siempre funcionar, por ejemplo algunas
  tarjetas como la serie VLB 54xx de Cirrus Logic son mapeadas en un
  rango de direcciones de memoria (por ejemplo, dentro del rango
  15MB-16MB) que exigen al sistema tener ms de 32MB de memoria para
  funcionar.

  (Hay una manera de solucionar esto, si tiene una opcin en la BIOS
  para dejar un hueco de memoria en el rango 15MB-16MB, podra
  funcionar, pero me han dicho que Linux no soporta esto).  Si desea
  experimentar con esta opcin, hay un completo repertorio de programas
  TSR disponibles (un ejemplo de ellos es UNIVBE) que pueden encontrarse
  en Internet.


  3.  Qu es un dispositivo framebuffer?


  Un dispositivo framebuffer es una abstraccin para el hardware
  grfico.  Representa un buffer de imagen para el hardware de vdeo, y
  permite a las aplicaciones software acceder al hardware grfico a
  travs de una interfaz bien definida, de manera que el software no
  necesita saber nada sobre la interfaz de bajo nivel (Tomado de
  /Documentation/fb/framebuffer.txt de Geert Uytterhoeven en las fuentes
  del kernel de linux).



  4.  Cmo activo los drivers vesafb?


  (nota: La informacin esta basada en lo que s y he logrado usando el
  ncleo de Linux 2.1.112 en un P75+ con una tarjeta grfica ATI
  VideoExpress 2MB. No dude en enviarme un email con informacin o casos
  especiales para tarjetas grficas diferentes).

  Asumiendo que usa menuconfig necesitar realizar los siguientes pasos:

  Entre en la seccin Code Maturity Level del men, y habilite la opcin
  para desarrollo y/o drivers incompletos (Development and/or Incomplete
  Drivers) (nota: esto puede cambiar para ncleos futuros; cuando esto
  suceda, este HOWTO ser revisado).

  Entre en el submen de dispositivos de consola (Console Drivers), y
  habilite lo siguiente:


  

    VGA Text Console

    Video Selection Support

    Support for frame buffer devices (experimental)

    VESA VGA Graphic console

    Advanced Low Level Drivers

    Select Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp y 32bpp packed

    Pixel drivers

    VGA character/attributes support

  VGA Chipset Support (text only) (vgafb) era parte de la lista
  anterior, pero ha sido eliminado ya que est obsoleto y no ser
  soportado. Se eliminar en breve. Use VGA Text Console en su lugar.

  Asegrese de que Mac variable bpp packed pixel support no est
  habilitado (A partir del 2.1.111, esto parece habilitarse si los
  Advanced Low Level Drivers son seleccionados inicialmente).  Asegrese
  de que no sean mdulos (No es seguro que sea posible compilarlos
  todava como mdulos; por favor corrjame si me equivoco en esto).

  A continuacin, recompile el ncleo, modifique el fichero
  /etc/lilo.conf de modo que incluya el parmetro VGA=ASK, y ejecute
  (instalando) lilo, esto permitir seleccionar el modo deseado en el
  momento de arrancar.

  Reinicie, y como prueba, introduzca la entrada 0301 tras la solicitud
  VGA (esto le dar una resolucin de 640x480 a 256 colores), y deber
  verse un logotipo con un pequeo Pingino durante el arranque.

  Una vez que pueda ver esto funcionando, puede explorar los distintos
  modos VESA (ver abajo) y decidir cul es el que ms le gusta, fije el
  parmetro "VGA=x" en el fichero /etc/lilo.conf.  Cuando haya escogido
  el que ms le guste, consulte el valor decimal equivalente de las
  tablas siguientes y use el nmero decimal correspondiente (es decir,
  para una resolucin de 1280x1024 a 256 colores, debe usar el valor
  "VGA=775"), y reejecutar lilo. Esto es todo!.

  Para referencias ms extensas, leer los documentos relacionados con
  LoadLin y LILO.
  5.  Qu modos VESA estn disponibles?


  Esto realmente depende del tipo de tarjeta grfica compatible con la
  norma VESA 2.0 que tenga en su sistema, y de la cantidad de memoria de
  vdeo disponible. El procedimiento anterior es slo una manera de
  comprobar qu modos funcionan mejor con su tarjeta grfica.

  La siguiente tabla muestra los nmeros de los modos que puede utilizar
  en la solicitud del parmetro VGA (realmente, a estos modos se le han
  sumado el valor 0x200 para facilitar su referencia en la tabla):



       Colores 640x480 800x600 1024x768 1280x1024 1600x1200
       --------+---------------------------------------------
         256   |   0301    0303     0305      0307      031C
        32,768 |   0310    0313     0316      0319      031D
        65,536 |   0311    0314     0317      031A      031E
        16.8M  |   0312    0315     0318      031B      031F




  La misma tabla expresada en trminos decimales:



       Colores 640x480 800x600 1024x768 1280x1024 1600x1200
       --------+--------------------------------------------
       256        769     771      773       775       796
        32,768    784     787      790       793       797
        65,536    785     788      791       794       798
        16.8M     786     789      792       795       799




  (El autor estara agradecido si le pudiera proporcionar los
  identificadores 03xx para los modos adicionales, esto es, 1152x900)


  6.  Hay algn driver X11 para vesafb?


  S, lo hay. Necesitar usar el driver XF86_FBdev si por alguna razn
  su driver X11 actual no es compatible con vesafb. Vaya a la pgina
  http://www.xfree86.org, y baje el archivo X332servonly.tgz,
  desempaqutelo, configrelo revisando xc/config/cf/xf86site.def, y
  active el #define para XF68FBDevServer. No se preocupe por la
  referencia m68k, esta soporta plataformas Intel. Recomplelo todo;
  tardar un tiempo considerable en funcin del tamao del cdigo
  fuente.

  Todava hay algo ms, no hay disponible ningn XF86_FBdev binario
  precompilado, pero creo que Debian puede estar trabajando en esto; y
  ellos podrn producir las dos variantes, libc5 y glibc2.

  Ha habido informes de que X11 no funciona con ciertas tarjetas
  grficas si esta caracterstica vesafb est habilitada, si esto le
  ocurre, pruebe el nuevo driver XF86_FBdev para X11.

  Este driver, junto con el vesafb tambin puede ayudar a ejecutar X11
  en resoluciones grficas mayores con algunos chipsets grficos que no
  son soportados por los drivers X11 actuales. Algunos ejemplos son MGA
  G200 y similares.
  Afortunadamente se solucionarn los problemas de X11 con el soporte de
  estas tarjetas grficas en futuras versiones.


  7.  Puedo compilar vesafb como mdulo?


  A partir del ncleo 2.1.112, los vesafb no pueden ser modularizados,
  aunque con el tiempo, algn desarrollador de vesafb puede decidir
  modificar los fuentes para permitir la modularizacin. Tenga en cuenta
  que incluso si fuera posible la modularizacin, durante el arranque no
  podra ver nada en la pantalla hasta que el driver vesafb fuera
  cargado (va modprobe o mediante una imagen initrd). Por esta razn,
  es una decisin inteligente dejarlo en el ncleo, para aquellos casos
  en los que existan problemas de arranque.


  8.  Miscelnea y Advertencias


  Esto slo es vlido para versiones del ncleo 2.1.112.Este COMO ser
  continuamente actualizado siguiendo los progresos de desarrollo del
  ncleo. No dude en mandarme un email con informacin o crticas :o)

  Otro asunto es que el scrollback buffering no funciona todava. Puede
  que sea solucionado en futuras versiones.


  9.  Acerca de la traduccin


  Este documento ha sido traducido por el grupo Linux-Kfe, integrado en
  el INSFLUG. Puede visitar nuestra pgina en la siguiente direccin:
  http://members.es.tripod.de/linuxkfe (tambin puede utilizar el
  enlace: http://go.to/linuxkfe).


  Actualmente gestionamos este grupo las siguientes personas:


     Director del Proyecto:
        Jess Martnez Mateo jmartinez@sportec.es, kfetro@cajamurcia.es


     Coordinadores:

       Juan Jos Roldn Guerrero jroldan@sportec.es

       Pedro Ruiz Maldonado bigplac@newmail.net

  Si desea colaborar con nosotros en futuras traducciones y distintos
  proyectos relacionados con el mundo de Linux (o si simplemente desea
  realizar alguna aportacin, crtica o sugerencia), enve un email a la
  siguiente direccin: linuxkfe@lycosmail.com. Procuraremos atenderle lo
  antes posible, de todas formas, si lo cree conveniente puede dirigirse
  de forma directa a cualquiera de los coordinadores nombrados
  anteriormente.

  Fecha de la ltima modificacin: 28 de Noviembre de 1999.


  10.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos,
  as como de la produccin de documentos originales en aquellos casos
  en los que no existe anlogo en ingls, centrndose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Dirjase a la sede del Insflug para ms informacin al respecto.

  En ella encontrar siempre las ltimas versiones de las traducciones
  oficiales:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Adems, cuenta con un sistema interactivo de gestin de fe de erratas
  y sugerencias en lnea, motor de bsqueda especfico, y ms servicios
  en los que estamos trabajando incesantemente.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relacin de las personas que hacen posible tanto esto como
  las traducciones.

  Dirjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  Cartel Insflug, cartel@insflug.org.






































  Unidad ZIP: mini-COMO
  Grant Guenther, grant@torque.net
  imd@redestb.es, revisin y actualizacin: pacopepe@ins
  flug.org
  Tercera revisin/actualizacin de la traduccin, 25 de Mayo
  de 1998.

  La unidad Iomega ZIP es una unidad de disco extrable y de moda. Est
  disponible en tres versiones principales, la hay con interfaz SCSI,
  IDE, y otra que se conecta a un puerto paralelo. Este documento
  describe cmo usar el ZIP con Linux. Se debera leer en conjuncin con
  el HOWTO SCSI a menos que posea la versin IDE.
  ______________________________________________________________________

  ndice General:

  1.      Introduccin

  2.      La unidad ZIP

  2.1.    Versin IDE

  2.2.    Versin SCSI

  2.3.    La controladora ZIP Zoom

  2.4.    Versin de puerto Paralelo

  3.      Configuracin del kernel para la unidad ZIP

  3.1.    Configuracin del kernel para la unidad IDE

  3.2.    Versin SCSI

  3.3.    Driver PPA  para 1.2.13

  3.4.    El driver PPA en kernels actuales

  3.5.    PPA: parmetros en la lnea de comandos

  4.      Uso de la unidad ZIP

  4.1.    Identificando la unidad al arrancar

  4.2.    Fdisk, mke2fs, mount,  etc.

  4.2.1.  Un disco formateado con DOS

  4.2.2.  Re-formatear como disco nativo de Linux

  4.2.3.  El disco ZIP Tools .

  4.2.4.  Eliminacin de la proteccin software desde Linux

  4.3.    Expulsin del disco

  5.      Preguntas de Uso Frecuente

  5.1.    Puedo arrancar desde la unidad ZIP?

  5.2.    Por qu Iomega usa la particin nmero 4 ?

  5.3.    Cmo puedo montar el disco al arrancar?

  5.4.    Qu ocurre si no hay un disco metido cuando arranco?

  5.5.    Qu controladoras SCSI son compatibles con la unidad ZIP?

  5.6.    Puedo usar la unidad de puerto paralelo como un disco SCSI
  real?

  5.7.    Puedo conectar una impresora con la unidad de puerto
  paralelo?

  5.8.    Hay algn plan de soportar los puertos EPP/ECP en PPA?

  5.9.    Puede usarse el PPA con unidades de cinta de puerto paralelo
  de Iomega?

  5.10.   Funcionar el PPA  con la unidad SyQuest EZ135  de puerto
  paralelo ?

  6.      Bsqueda de informacin actualizada.

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introduccin

  La unidad Iomega ZIP es una unidad de disco extrable, portable,
  barata, de bajo rendimiento y de moda. Sus discos tienen una capacidad
  de 96 megas, y la unidad est disponible en 3 versiones, una versin
  SCSI, otra IDE, y una versin para puerto paralelo. La versin de
  puerto paralelo es realmente un dispositivo SCSI tambin, configurada
  para usar el protocolo paralelo-sobre-SCSI PPA-3 propiedad de Iomega.

  Este documento describe como usar la unidad ZIP con Linux. Si tiene la
  versin SCSI o de puerto paralelo, que realmente funciona como un
  dispositivo SCSI, es importante leer el HOWTO SCSI tambin. Dicho
  documento da una introduccin al sistema SCSI del Linux. No contiene
  ninguna informacin especifica sobre la unidad ZIP, La tarjeta SCSI
  ZIP ZOOM o el adaptador PPA-3 paralelo-a-SCSI. Este mini-Como tiene el
  propsito de rellenar esos huecos.

  Este documento incorpora informacin reunida y publicada por otros, en
  particular:

    Scot Wilcoxon, sewilco@fielday.mn.org

    Joe Mack, mack@ncifcrf.gov

    Byron Jeff, byron@cc.gatech.edu

  Les agradezco sus importantes contribuciones, y acepto responsabilidad
  por cualquier error que pudiera introducir.

  2.  La unidad ZIP

  Hay cuatro versiones de la unidad Iomega ZIP. Todas ellas aceptan
  cartuchos especiales parecidos a los diskettes de 3.5" con capacidad
  de 100 megas.  Los discos normalmente tienen 96 cilindros de 2048
  sectores conteniendo 512 bytes cada uno. Esto sera normalmente
  llamado 96 megas.

  Una versin es una unidad interna de media altura 5.25", con interfaz
  SCSI, otras dos son unidades externas en pequeas unidades de plstico
  azules de poco peso, alimentadas mediante un transformador. Las
  unidades externas vienen en versin SCSI y puerto paralelo, y las
  internas en SCSI e IDE.

  Todas las unidades tienen un botn redondo en el frontal de la unidad.
  Este botn es para expulsar el disco. Linux impide la expulsin
  mientras se la unidad est montada, pero si el botn es pulsado
  mientras est bloqueada, la unidad ZIP recordar y expulsar el disco
  tan pronto como el software desbloquee (desmonte) la unidad.

  2.1.  Versin IDE

  Con esta versin, todo lo aplicable a dispositivos IDE entra en juego:
  bsicamente, la unidad puede colocarse como maestra o esclava del bus
  IDE en donde se ubique, y para ello habr que hacer uso de los jumpers
  o puentes correspondientes, situados en la parte trasera de la unidad.
  Por defecto viene configurada como esclava; si la coloca en el mismo
  bus que su disco duro, o en el que ya tenga un CD-Rom configurado como
  maestro, no tendr que hacer modificacin alguna. Si la coloca como
  nico dispositivo en alguno de los buses, deber colocar los puentes
  (jumpers) en la posicin master.

  2.2.  Versin SCSI

  La versin SCSI externa de la unidad ZIP tiene 2 conectores DB25F, y
  dos interruptores de configuracin. Un interruptor selecciona la
  direccin de la unidad: esta eleccin esta limitada a 5 y 6. El otro
  activa un terminador interno, en caso de que la unidad sea la ltima
  de la cadena.  Los conectores SCSI de 25 patillas son del estilo de
  Macintosh.

  La unidad viene con cable tipo Macintosh, pero el cable y los
  convertidores estndar son fciles de obtener (-- N del T: Los cables
  no son TAN fciles de conseguir y son MUY caros.  Un cable con mini-
  SCSI y DB25M a los extremos cuesta +8.000.--) si tu tarjeta SCSI viene
  con conector Centronics o conector mini SCSI.

  No he visto la unidad SCSI interna, pero esperara que tuviese un
  conector estndar de 50 patillas DIP. (-- N. del Revisor
  de una y lo certifico, tiene un conector estndar SCSI II, y dos
  grupos de puentes o jumpers; uno de ellos, de cuatro puentes, sirve
  para seleccionar combinndolos el ID SCSI, que es el 5 por defecto, y
  el otro es para activar o desactivar la terminacin en el caso en que
  el ZIP fuese o no la ltima unidad de la cadena SCSI.--)

  Asegrese de que la direccin que elija no entra en conflicto con
  cualquier otro dispositivo SCSI que pueda tener en el mismo bus.
  Asegrese tambin de que la ltima unidad en la cadena tiene el
  terminador activado, o un terminador instalado.

  Si tiene un disco o CD-Rom SCSI interno, y conecta su unidad ZIP al
  adaptador existente, debera comprobar si existe algn terminador en
  la tarjeta que se debiera quitar. Solo los dos extremos del bus SCSI
  deben estar terminados. Si el bus es parcialmente interno y
  parcialmente externo, debera haber un terminador en el ltimo
  dispositivo externo y otro en el ltimo dispositivo interno, pero
  ninguno en la propia tarjeta SCSI.

  Asegrese de que todos los cables estn firmemente conectados.

  2.3.  La controladora ZIP Zoom

  Iomega vende una controladora bajo el nombre ZIP Zoom. sta est
  basada en el diseo de la familia de controladoras Adaptec AHA1520.
  Tiene un conector DB25F externo tipo Macintosh, compatible con el
  cable que viene con la unidad ZIP.

  Linux Soporta esta controladora con el driver aha152x. Ver seccin
  ``''

  2.4.  Versin de puerto Paralelo

  La unidad Zip de puerto paralelo tambin tiene dos conectores DB25, el
  macho (DB25M) debe conectarse mediante el cable suministrado al puerto
  paralelo del ordenador. El otro (hembra, DB25F) es para conectar una
  impresora en cadena. Actualmente, Linux no soporta el uso simultneo
  de ambos, unidad ZIP e impresora. Es posible cargar mdulos. No hay
  interruptores de configuracin.

  La unidad ZIP de puerto paralelo es compatible con varios tipos de
  puertos paralelos, pero actualmente el driver de Linux solo soporta
  los puertos estndar y bi-direccional. Si su puerto paralelo tiene
  interruptores de configuracin (en hardware o en pantallas del setup
  de la CMOS) asegrese de configurar el puerto en uno de los
  soportados.

  Asegrese de que todos los cables estn firmemente conectados.

  3.  Configuracin del kernel para la unidad ZIP

  Para usar unidades ZIP con Linux, el kernel debe estar configurado
  para dar el soporte correspondiente: en el caso de unidades SCSI, o
  paralelas, son necesarios tres: soporte SCSI, soporte de discos SCSI y
  soporte para la controladora que est usando en el caso SCSI o para
  PPA en el caso paralelo. Si es IDE, bastar con soporte para unidades
  extrables ATAPI (IDE/ATAPI FLOPPY support).

  Si no est familiarizado con la compilacin del kernel, debera ir al
  directorio /usr/src/linux y estudiar el fichero README que all
  encontrar (-- N del T:  Tambin dispones del Kernel-COMO, comprueba
  la seccin ``''--) .  Tambin hay valiosa informacin en el
  subdirectorio Documentation en versiones recientes.

  Debe empezar el proceso de compilacin del kernel con la configuracin
  del mismo. Aqu, identificar los componentes especficos del kernel
  que necesita. make config es el mtodo tradicional, secuencial de
  preguntas y respuestas de configuracin del kernel.

  En kernels recientes (-- N del T: A partir de la versin 2.0--) hay
  nuevas alternativas:  make menuconfig hace lo mismo con interfaz
  orientado por mens, y make xconfig usa el kit tk para mostrar mens
  bajo X.

  Una vez haya configurado el kernel, use make dep, make clean y make
  zlilo (o make zImage si no usa LILO) para compilar el nuevo kernel e
  instalarlo, y por supuesto, no olvide reiniciar el sistema!.

  Tambin puede compilar todo o parte del sistema SCSI como mdulos. Si
  hace esto, adems de los comandos anteriores, deber hacer make
  modules; make modules_install. Asegrese de cargar scsi_mod.o,
  entonces sd_mod.o y finalmente el driver de su controladora, antes de
  acceder a la unidad ZIP SCSI (-- N de los T:  Generalmente, de esto se
  encarga el sistema de forma transparente si previamente se han
  computado las dependencias entre mdulos, (depmod -a al arrancar)  al
  cargar mdulos semi-manualmente con el comando modprobe, o mejor an,
  automticamente si se usa kerneld--)

  3.1.  Configuracin del kernel para la unidad IDE

  Para dar soporte especfico a esta unidad, lo nico necesario es
  incluir soporte en el kernel para ella en la seccin de configuracin
  del kernel Floppy, IDE, and other block devices, en el apartado
  Include IDE/ATAPI FLOPPY support.

  Dependiendo de la configuracin de la unidad, su nombre de dispositivo
  ser de la forma hdX, en donde X ser:

    a: Unidad maestra del canal IDE primario (muy raramente, ya que ah
     normalmente estar nuestro disco duro)

    b: Unidad esclava del canal IDE primario

    c: Unidad maestra del canal IDE secundario

    d: Unidad esclava del canal IDE secundario

  Lo cual comprobaremos al arrancar, por el mensaje del kernel en el
  registro del sistema (/var/log/messages):

       hdX: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive

  En cuanto a gestin de los discos, aplica exactamente lo mismo que
  para el resto de unidades, con la salvedad de que nos referiremos a
  ellos como hdX en lugar de sdX.

  Una vez comprendidos estos trminos, puede saltar directamente a la
  seccin ``''.

  3.2.  Versin SCSI

  Si ya tiene un disco SCSI en el sistema, y est conectando la unidad
  ZIP a la misma controladora, no hay necesidad de configurar el kernel.
  Si no, tendr que compilar un nuevo kernel.

  Si compila el kernel para soportar la versin SCSI de la unidad ZIP,
  debe seleccionar soporte SCSI y soporte de discos SCSI. Tambin debe
  seleccionar un driver para la controladora que usar. Si tiene la
  controladora ZIP Zoom, seleccione el driver aha152x.

  Asegrese de leer la documentacin de la controladora en el SCSI HOWTO
  y cualquier fichero README en el subdirectorio drivers/scsi del
  directorio raz de los fuentes de Linux. Preste atencin a lnea de
  parmetros que tendr que usar para ayudar al kernel a inicializar la
  controladora.

  Por ejemplo, si est usando la controladora ZIP Zoom, tendr que
  aadir algo como
               aha152x=0x340,11,7,1

  al arrancar (o incluirlo en el fichero /etc/lilo.conf mediante la
  clusula append (=aadir) ). Esto le dice al driver la direccin del
  puerto y la IRQ de su tarjeta ZIP Zoom. Asegrese de usar los
  parmetros que corresponden a la seleccin de los jumpers, que son por
  defecto IRQ 11 y direccin base 0x340. El tercer y cuarto parmetro
  son asumidos por el driver en su configuracin por defecto, adems de
  ser lo recomendable.

  Si por el contrario, prefiere (y es lo ms cmodo adems de
  recomendable) compilar soporte modularmente, y hacer uso de las
  ventajas de la carga-descarga automtica de mdulos mediante kerneld,
  deber aadir lo siguiente en el fichero /etc/conf.modules:

       alias scsi_hostadapter aha152x
       options aha152x aha152x=0x340,11,7,1

  S, la lnea options aha152x aha152x=0x340,11,7,1 es correcta, ha de
  aparecer dos veces el trmino aha152x.

  Tras hacer esto, reinicie el sistema si no lo hizo al compilar el
  kernel, o ejecute

       depmod -a

  Para que se genere la base de datos de dependencias entre mdulos.

  Se asume que la controladora est con la configuracin que trae de
  fbrica por defecto. Otras posibilidades (configurables por jumpers en
  la propia controladora) son:

    IRQs: 9, 10, 12.

    IOs: 0x140

  Tambin debe leer el BOOTPROMPT HOWTO de Paul Gortmaker para
  informacin sobre cmo configurar el kernel con LILO o LOADLIN.

  3.3.  Driver PPA  para 1.2.13

  Si quiere usar la unidad ZIP de puerto paralelo con el kernel versin
  1.2.13 (-- N del Revisor
  , debe conseguir la versin 0.18 del driver que esta disponible va
  ftp annimo en ftp://gear.torque.net/pub/ppa.c

  Las instrucciones de instalacin, as como cmo compilar el driver
  como mdulo cargable estn includas en el fichero fuente ppa.c.

  Tendr casi con toda seguridad que compilar un nuevo kernel. En
  particular, ninguno de los kernels pre-compilados de Slackware
  funcionarn con ppa.

  Sea cuidadoso al compilar el kernel con soporte SCSI y soporte de
  discos SCSI, pero no incluya soporte del driver de impresora lp.  En
  el 1.2.13, los drivers no pueden co-existir en el mismo kernel.

  Puede ajustar el nmero del puerto y algunos parmetros de reloj con
  el comando insmod cuando cargue el driver ppa.  Estos ajustes estn
  documentados en el fichero ppa.c.  Por defecto la unidad asume que la
  unidad ZIP esta conectada al puerto paralelo en la direccin 0x378.

  No habr ninguna mejora a este driver para el kernel 1.2.13.  Se
  espera que desaparezca unos meses despus de la salida del kernel 2.0
  y las principales distribuciones empiecen a usarlo.

  3.4.  El driver PPA en kernels actuales

  Desde la versin 1.3.74 el driver ppa ha sido una parte estndar del
  kernel.  Hubo algunos cambios a otras partes del kernel alrededor de
  la versin 1.3.78 que requeran ciertas mejoras internas, pero desde
  1.3.85 el driver ha sido completamente estable en su versin 0.26.
  Espero que la versin 0.26 est en la prxima versin estable del
  kernel.

  Para compilar el kernel con soporte ppa, ha de incluirse soporte SCSI,
  soporte de discos SCSI y seleccionar de la lista de controladoras SCSI
  de bajo nivel (low-level) soporte para Iomega ZIP / PPA-3.  Tambin
  puede compilar el driver como mdulo.

  Puede usar la lnea de parmetros en /etc/lilo.conf o con insmod para
  cargar el driver. Todo esto est documentado en
  drivers/scsi/README.ppa en la estructura del fichero fuente del
  kernel. He includo un sumario en la siguiente seccin.

  Si quiere usar tanto el driver lp como ppa en el mismo puerto
  paralelo, tendr que compilar ambos como mdulos y cargar uno u otro
  en cualquier momento, pero nunca los dos a la vez.

  Las prestaciones de Linux en cuanto a mdulos cargables se tornan cada
  vez ms potentes, y por tanto, ms complejas da a da. Debera leer
  el fichero Documentation/modules.txt en el rbol de directorios de los
  fuentes del kernel como punto de partida.

  3.5.  PPA: parmetros en la lnea de comandos

  Si ha compilado ppa dentro del kernel, puede ajustar sus parmetros
  desde la lnea de comando del LILO o LOADLIN con la siguiente
  sintaxis:

       ppa=base[,speed_high[,speed_low[,nybble]]]

  Donde base es la direccin i/o del puerto paralelo, speed_high es una
  constante de temporizacin para ciertos bucles rpidos del driver,
  speed_low es un parmetro de temporizacin similar para otros ms
  lentos, y nybble es un indicativo para forzar al driver a usar 4-bit,
  o modo nybble, incluso si el controlador quisiera hacerlo de otro
  modo.

  Por ejemplo, por defecto podra ser especificado como:

       ppa=0x378,1,6,0

  4.  Uso de la unidad ZIP

  Si ha compilado todos los componentes necesarios, el kernel debera
  reconocer la controladora y unidad al arrancar. Si est usando
  mdulos, lo siguiente se aplicar cuando el mdulo sea cargado.

  La unidad versin SCSI y la de puerto paralelo en se comportan de
  forma idntica, excepto que la versin paralelo es mas lenta.

  4.1.  Identificando la unidad al arrancar

  Cuando el sistema arranca debera mostrar varios fragmentos de
  informacin sobre la controladora, unidad y el disco dentro de la
  unidad (-- Si hemos compilado el soporte modularmente, dicha
  informacin aparecer al cargarse los mdulos correspondientes--) . Si
  no hay disco en la unidad, parte de esta informacin se perder y slo
  aparecer cuando se inserte un disco y haga algn tipo de acceso al
  disco. Se aconseja a usuarios noveles arrancar con un disco metido en
  la unidad, las cosas resultan menos confusas de esta forma!

  En dnde aparecern estos mensajes exactamente depende de cmo est
  configurado el sistema. A menudo sern mostrados en la pantalla, pero
  pueden ser enviados a un fichero de registro como por ejemplo
  /var/log/messages o /var/adm/messages. Normalmente, se puede volver a
  visualizar el ltimo par de pantallas de mensajes del kernel con el
  comando dmesg, si no lo encuentra en ningn otro lugar, o verlo
  conforme se va generando (til por ejemplo si hemos compilado soporte
  modular, cuando procedamos a cargar el mdulo las primeras veces) con
  el comando tail -f /var/log/messages

  Si necesita ayuda por parte de alguien, una copia de este registro de
  informacin es vital. Trate de enviar tanto como pueda de los mensajes
  relevantes registrados, junto con algn informe sobre el fallo.

  Aqu se puede ver un ejemplo de lo que debera aparecer en los
  mensajes del kernel:

       scsi0 : PPA driver version 0.26 using 8-bit mode on port 0x378.
       scsi : 1 host.
         Vendor: IOMEGA    Model: ZIP 100           Rev: N*32
         Type:   Direct-Access                      ANSI SCSI revision: 02
       Detected scsi disk sda at scsi0, channel 0, id 6, lun 0
       scsi : detected 1 SCSI disk total.
       SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
         sda: Write Protect is off
       Partition check:
         sda: sda1

  Esta salida es de un kernel 1.3.87 con una unidad ZIP paralela. La
  salida exacta puede variar dependiendo de la controladora y si existe
  otro dispositivo SCSI en el sistema.

  La primera lnea muestra el mensaje de inicializacin del driver de
  bajo nivel para la controladora, en este caso PPA. Lo siguiente es
  informacin de la identificacin de la unidad retornado por cada
  dispositivo encontrado en el bus SCSI. La lnea 5 muestra el nombre
  del dispositivo asignado a la unidad, en este caso /dev/sda.  y la
  ltima lnea el estado de la particin del disco en la unidad. Esta
  caso solo tiene una particin, /dev/sda1. Esta informacin viene de
  diferentes mdulos del kernel, si tiene ms de una controladora SCSI,
  o varios discos, cada seccin contendr ms informacin.

  Por ejemplo, para la unidad SCSI, con un kernel 2.0.33, conectada a la
  controladora ZIP-Zoom, con el identificativo SCSI 5:

       aha152x: BIOS test: passed, detected 1 controller(s)
       aha152x0: vital data: PORTBASE=0x340,
       IRQ=11, SCSI ID=7, reconnect=enabled, parity=enabled,
       synchronous=disabled, delay=100, extended translation=disabled
       aha152x: trying software interrupt, ok.
       scsi0 : Adaptec 152x SCSI driver; $Revision: 1.18 $
       scsi : 1 host.
         Vendor: IOMEGA   Model: ZIP 100          Rev: E.08
         Type:   Direct-Access                    ANSI SCSI revision: 02
       Detected scsi removable disk sda at scsi0, channel 0, id 5, lun 0

  Si utiliza otra controladora, la informacin ser similar a partir de
  la lnea 8.

  Y por ltimo, si la unidad es IDE:

       hdc: IOMEGA ZIP 100 ATAPI, ATAPI FLOPPY drive

  Que en este caso est como dispositivo maestro del segundo canal IDE.

  Si est usando un disco virgen (sin usar), directamente de Iomega, el
  chequeo de particin debera mostrar una particin, /dev/sda4.  Si
  tiene otros dispositivos SCSI la unidad ZIP podra aparecer en otro
  nombre de dispositivo como /dev/sdb, por eso es interesante comprobar
  estos mensajes.

  Si estas lneas no aparecen, entonces algo esta mal configurado: o el
  hardware en s, o el kernel. Compruebe todo cuidadosamente antes de
  enviar emails.

  Si la lnea scsi0: no aparece, entonces esta mal configurada la
  controladora y su driver correctamente. Algunos drivers dan una pista
  de lo que esta mal. Si el driver no es detectado, probablemente haya
  un problema con el cable. Si no es asignado el nombre de unidad
  probablemente olvid incluir soporte para discos SCSI cuando recompil
  el kernel.

  Compruebe los ficheros README en drivers/scsi y los SCSI HOWTO para
  otros aspectos relativos a la depuracin de la instalacin.
  4.2.  Fdisk, mke2fs, mount,  etc.

  Una vez conozca el nombre de la unidad ZIP, estar listo. Puede
  manipular la unidad con los comandos tpicos del gestin de discos del
  Linux.  fdisk (o quizs cfdisk) es usado para manipular las tablas de
  particin en el disco.  mke2fs puede ser usado para formatear una
  particin con el sistema de ficheros ext2 el ms usado en Linux.
  mount es usado para conectar una particin formateada a la jerarqua
  de directorios.

  Debera estudiar las pginas del manual de estas herramientas si no
  est familiarizado con ellas. Tenga cuidado: hay varias versiones
  diferentes del programa fdisk, sea cuidadoso.

  Describir dos situaciones comunes:

  4.2.1.  Un disco formateado con DOS

  Si tiene un disco ZIP con una estructura de ficheros DOS que fue
  creado originalmente por las herramientas de Iomega, la deteccin de
  la particin debera decir que en el disco hay una particin,
  /dev/sda4.

  Cree un directorio donde montar el disco, como por ejemplo /zip, y
  mntelo como un sistema de ficheros DOS:

       mkdir /zip
       mount -t msdos /dev/sda4 /zip

  Ahora, los ficheros en el disco deberan aparecer en /zip.  Mientras
  el disco est montado, no debe poder sacar el disco de la unidad.
  Cuando termines con el disco puede desmontarlo para extraer el disco y
  liberarlo de la jerarqua de directorios:

       umount /zip

  Una vez que haya creado un punto de montaje /zip no necesitas hacerlo
  otra vez, as puedes ms tarde volver a montar cualquier otra cosa.

  4.2.2.  Re-formatear como disco nativo de Linux

  Si quiere borrar un disco ZIP y hacer un sistema de ficheros nativo de
  Linux, deber usar fdisk en el disco entero:

       fdisk /dev/sda

  y borrar cualquier particin (con el comando d). Cree una nueva
  particin con el comando n, que sea particin primaria 1, usar w para
  escribir la tabla de particiones al disco y salir con q.

  Formateo de la particin:

       mke2fs /dev/sda1

  (El 1 es el nmero que dio a esta particin con el fdisk).  Ahora
  podr montar el disco:

       mount -t ext2 /dev/sda1 /zip

  (re-usando el punto de montaje que antes creamos).

  4.2.3.  El disco ZIP Tools .

  Hay trabajo extra que hacer si quiere usar el disco que viene con la
  unidad ZIP. De fbrica, el disco est protegido contra escritura por
  software. La mayora de la gente ha desprotegido el disco bajo DOS
  antes de intentar usarlo desde Linux (-- Y con una unidad de puerto
  paralelo, con la SCSI no suele poder hacerse--) . Linux no puede
  acceder a un disco protegido, y debe ser desprotegido con la
  herramientas de Iomega.

  Se espera que pronto est disponible un programa nativo de Linux para
  manejar la proteccin de escritura.

  4.2.4.  Eliminacin de la proteccin software desde Linux

  Nota del Revisor:

  Mi experiencia es que a menos que se use tanto un zip paralelo, y las
  herramientas windows, es imposible desproteger un zip por software o
  civilizadamente.

  Pero hay un truco:

  1. Inserte un disco no protegido. (El Zip-Tools, por ejemplo.)

  2. Extrigalo mediante el sistema de eyeccin de emergencia,
     introduciendo una aguja o similar por el orificio que hay en la
     esquina superior izquierda de la unidad.

  3. Introduzca el disco protegido y haga con l lo que quiera; la
     unidad zip no notar el cambio.

  :-) Por supuesto, todo ello bajo su cuenta y riesgo; a m y a otros
  nos ha funcionado, pero no asumo ninguna responsabilidad...

  4.3.  Expulsin del disco

  Solo se puede expulsar un disco cuando no est montado. Actualmente,
  no hay un comando Linux para expulsar el disco, as que se debe pulsar
  el botn que tiene la unidad para expulsar el disco.

  Linux se asegura de que todos los datos estn grabados en el disco
  antes de desbloquearlo.

  Se espera un nuevo programa ZIP Tools para Linux que soportar algunas
  posibilidades especiales de Iomega (incluyendo la expulsin por
  software y la proteccin contra escritura) tanto en versin SCSI como
  paralela.

  5.  Preguntas de Uso Frecuente

  Estas son algunas de las preguntas que se hacen. Por favor, lea las
  respuestas aqu antes de volver a preguntarlas !

  5.1.  Puedo arrancar desde la unidad ZIP?

  Esto depende de su controladora. Si la unidad es SCSI interna, y le
  asignamos las IDs 0 o 1 a la unidad, la controladora lo arrancar
  automticamente. Si tiene la unidad SCSI externa, y la controladora
  tiene BIOS ROM con cdigo que permita arrancar desde los IDs 5  6,
  entonces s, podr arrancar desde su unidad ZIP. No puede arrancar
  desde una unidad de puerto paralelo (directamente. s usando un
  disquete de arranque).

  Si tiene DOS en su disco principal y quiere arrancar Linux desde un
  disco ZIP, puede usar el cargador de arranque LOADLIN. La imagen del
  kernel debe estar en algn lugar en el disco DOS, pero el resto del
  sistema Linux puede estar en el ZIP. Asegrese de que el kernel que va
  a usar tiene incluidos los drivers necesarios.

  Por lo que yo conozco, no hay discos de arranque de instalacin para
  ninguna de la distribuciones ms populares que contengan el driver
  para la unidad ZIP de puerto paralelo, pero esto puede cambiar cuando
  la versin 2.0 salga.

  5.2.  Por qu Iomega usa la particin nmero 4 ?

  Esta es la pregunta ms realizada, pero creo que nadie tiene una
  respuesta definitiva a esta pregunta. Quizs no haya una buena razn.

  5.3.  Cmo puedo montar el disco al arrancar?

  Todo lo que se necesita es aadir una lnea al fichero /etc/fstab. Por
  ejemplo, si siempre se tiene un disco DOS en la unidad cuando se
  arranca, podra ser:

       /dev/sda4   /zip  msdos  defaults  0 0

  Dependiendo en la distribucin, los scripts de inicializacin pueden
  intentar ejecutar fsck en las particiones listadas en el fichero
  /etc/fstab.  Cuidado ya que esto podra causar problemas si no hay un
  disco metido en la unidad cuando se arrancar Linux, o si hay un disco
  errneo (-- N del T: Respecto a lo indicado en /etc/fstab en cuanto a
  particiones y sistema de ficheros--) .

  5.4.  Qu ocurre si no hay un disco metido cuando arranco?

  El kernel intentar leer la tabla de particiones, pero la operacin
  expirar.  No hay nada por que preocuparse. Una vez insertado el
  disco, e intentando hacer algo con l, el kernel se dar cuenta de que
  hay un disco ahora y re-escanear la tabla de particiones.

  AYUDA: Cuando cambie de disco, es una buena idea que uses fdisk para
  chequear la estructura de la particin en el nuevo disco.

  La BIOS de algunas controladoras SCSI intentarn leer la tabla de
  particiones en el disco durante el arranque. Si no puedes desactivar
  este chequeo, siempre puedes forzar el arranque con un disco metido en
  la unidad.

  5.5.  Qu controladoras SCSI son compatibles con la unidad ZIP?

  Iomega tiene una lista de las controladoras compatibles en:

  http://www.iomega.com/techs/zip/what063.html

  5.6.  Puedo usar la unidad de puerto paralelo como un disco SCSI
  real?

  El adaptador PPA-3 parallel-to-SCSI esta implementado como un chip
  ASIC nico que Iomega llama VPI0.  Est integrado en la controladora
  de la unidad ZIP. Hay un bus SCSI presente, pero no en una forma til.

  Aunque he intentado comparar las dos controladoras, parece lgico que
  el VPI0 reemplace los circuitos de buffer elctricos convencionales
  que seran necesarios si el bus SCSI estuviese extendido fuera de la
  caja.

  5.7.  Puedo conectar una impresora con la unidad de puerto paralelo?

  S, pero actualmente, no se puede tener los drivers lp y ppa activos a
  la vez en el mismo puerto paralelo. Se ha diseado un protocolo de
  comparticin y esta en las primeras etapas de implementacin, pero no
  estar disponible antes de que salga el kernel 2.0.

  Mientras tanto, se puede conectar a la vez la impresora y la unidad
  ZIP sin tener que rearrancar el sistema, si se tienen los drivers lp y
  ppa como mdulos. Si se tienen as, entonces cuando se quiera imprimir
  se carga el mdulo (insmod lp), y cuando se quiere utilizar la unidad
  ZIP se carga el driver ppa.

  Por supuesto, si se tienen dos puertos paralelos, se puede usar uno
  para imprimir y otro para la unidad ZIP. Se compila el kernel con
  ambos drivers lp y ppa incluidos, aadiendo entonces los parmetros de
  configuracin apropiados en la lnea de comandos del kernel.  Por
  ejemplo, si se usa LILO y se tiene la impresora en 0x378 y el ZIP en
  0x3bc se puede aadir la siguiente lnea en el fichero /etc/lilo.conf.

       append = "lp=0x378 ppa=0x3bc"

  5.8.  Hay algn plan de soportar los puertos EPP/ECP en PPA?

  ppa fue inicialmente desarrollado sin contar con el beneficio de
  ninguna especificacin tcnica para el protocolo de comandos en el bus
  paralelo. Sin embargo, se us el emulador del DOS para reunir
  informacin a fin de tratar de averiguar mediante ingeniera inversa
  cmo funcionaba dicho protocolo. Fue imposible conseguir que la unidad
  funcionase en el modo mejorado bajo el emulador.

  El manual de referencia tcnica de Iomega se encuentra ahora
  disponible, y he localizado la hoja del chip de puerto paralelo
  mejorado, as que es posible mejorar el driver.

  5.9.  Iomega?  Puede usarse el PPA con unidades de cinta de puerto
  paralelo de

  No. Esas son unidades de cinta de disquetera, el SCSI no esta
  involucrado.

  Varias personas han mostrado inters en aplicar mis mtodos para
  intentar determinar el protocolo y desarrollo de un driver para esas
  unidades de cinta. El primer paso en ese proceso es conseguir un
  driver para DOS que funcione bajo DOSemu. No he odo an que nadie lo
  haya conseguido.

  5.10.  paralelo ?  Funcionar el PPA  con la unidad SyQuest EZ135  de
  puerto

  No. La EX135 es una unidad IDE con un conversor de puerto paralelo
  ShuttlePort a IDE integrado.

  La labor ha comenzado por decodificar el protocolo, con la intencin
  de escribir un driver para Linux del EZ135 de puerto paralelo. Tengo
  el protocolo bsico funcionando, pero no tengo idea de cuando estar
  disponible un driver completo.

  Eche un vistazo a mi http://www.torque.net/ez135.html, Buscar
  eventualmente algn beta tester.

  6.  Bsqueda de informacin actualizada.

  Intentar tener un actualizacin de este mini-COMO disponible en mis
  pginas web. Puede comprobarlo en

  http://www.torque.net/zip.html.

  Hay una pgina web ms general sobre ZIP FAQ (con influencia de
  Macintosh) en

  http://earth.cnct.com/home/steveg/zip.html.

  Las pginas de Iomega estn en

  http://www.iomega.com/.

  Y si est buscando informacin general sobre programacin del puerto
  paralelo para PC, Puede visitar

  http://www.lvr.com/parport.htm

  7.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargndose de las traducciones al castellano de los Howtos
  (Comos), as como la produccin de documentos originales en aquellos
  casos en los que no existe anlogo en ingls.

  En el INSFLUG se orienta preferentemente a la traduccin de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Dirjase a la sede del INSFLUG para ms informacin al respecto.

  En la sede del INSFLUG encontrar siempre las ltimas versiones de las
  traducciones:  www.insflug.org. Asegrese de comprobar cul es la
  ltima versin disponible en el Insflug antes de bajar un documento de
  un servidor rplica.

  Se proporciona tambin una lista de los servidores rplica (mirror)
  del Insflug ms cercanos a Vd., e informacin relativa a otros
  recursos en castellano.

  Francisco Jos Montilla, pacopepe@insflug.org.

  Souris Srie 3 Boutons
  Geoff Short, geoff@kipper.york.ac.uk;
  Version Franaise par Arnaud Launay, asl@launay.org
  v1.33, 31 Mai 1998

  Comment avoir une souris 3 boutons qui fonctionne correctement sous
  Linux.
  ______________________________________________________________________

  Table des matires


  1. Mise en garde

  2. Introduction

  3. Ports Sries

  4. Souris  commutateur

  5. Souris Normale

  6. Passer la souris en mode 3 boutons

  7. Souris  roulettes

  8. Utiliser gpm pour changer le mode de la souris

     8.1 Changer la carte des boutons pour gpm et X

  9. Utiliser Deux Souris

  10. Fichiers d'exemples pour XF86Config et Xconfig

     10.1 Souris Srie Microsoft
     10.2 Souris Srie Microsoft (2 ou 3 boutons) avec Emulation Trois Boutons
     10.3 Souris Srie 3 Boutons MouseSystems
     10.4 Souris Srie Microsoft avec gpm -R

  11. Cbles, extensions et adaptateurs

  12. Problmes divers et Configurations

  13. Modles Tests

  14. Informations Complmentaires

  15. Queue de la Souris



  ______________________________________________________________________

  11..  MMiissee eenn ggaarrddee

  Le document qui suit est propos dans de bonnes intentions, et tente
  d'offrir un compromis correct entre des manipulations et de la
  programmation sres. Aucune responsabilit ne sera accepte par
  l'auteur ou le traducteur quelque soient les dommages ou les pertes
  causs de quelque faon que ce soit  une personne ou  du matriel,
  en tant que consquence directe ou indirecte des instructions
  suivantes.




  22..  IInnttrroodduuccttiioonn

  La version la plus rcente de ce document se trouve toujours sur
  http://kipper.york.ac.uk/mouse.html
  Il existe une traduction japonaise sur http://jf.gee.kyoto-
  u.ac.jp/JF/JF-ftp/euc/3-Button-Mouse.euc
  La dernire traduction franaise se trouve sur
  http://www.freenix.org/unix/linux/HOWTO/mini/3-Button-Mouse.html.


  La plupart des applications X avec la certitude que l'utilisateur
  utilisera une souris 3 boutons. Les souris sries sont couramment
  utilises sur les ordinateurs et sont conomiques. La plupart de ces
  souris ont 3 boutons et dclarent utiliser le protocole Microsoft, ce
  qui signifie en thorie qu'elles sont parfaites pour une configuration
  X Window. (Le record de la souris  3 boutons fonctionnelle la moins
  chre est de 1,14$ [6,9 FRF au 1 Juillet 1998]).


  La plupart des souris bi-protocole fonctionnent dans ces deux modes:

    Mode Microsoft 2 boutons.

    Mode MouseSystems 3 boutons MouseSystems.

  Ce document vous guidera pas--pas au cours des tapes ncessaires
  pour configurer votre souris, et plus spcialement les tapes
  ncessaires pour utiliser le fort utile mode 3 boutons.


  Comme les distributions deviennent de plus en plus simple  installer,
  la plupart des problmes disparaissent. Par exemple, la RedHat dispose
  du programme mouseconfig pour configurer les choses  votre place.
  Cependant, quelques versions de la RH5.0 ont un bug dans mouseconfig,
  donc vrifiez l'existence des corrections.


  33..  PPoorrttss SSrriieess

  La premire chose  faire est de s'assurer que les logiciels peuvent
  trouver la souris. Cherchez  quel port votre souris est connecte -
  habituellement ce sera /dev/ttyS0 (COM1 sous DOS) ou /dev/ttyS1
  (COM2). (ttyS0 est gnralement la prise 9 broches, ttyS1 la prise 25
  broches, mais bien entendu il n'y a aucune rgle pure et dure  ce
  propos.) Il y a galement un nombre quivalent de priphriques
  /dev/cua, qui sont principalement la mme chose que les ttyS, mais
  leur utilisation est dornavant dsapprouve. Pour plus de facilits,
  crez un nouveau lien /dev/mouse pointant sur ce port. par exemple,
  pour ttyS0:


       ln -s /dev/ttyS0 /dev/mouse



  44..  SSoouurriiss  ccoommmmuuttaatteeuurr

  Quelques souris, et en gnral pas les moins chres, ont un
  interrupteur sur le ct marqu "2/3". Quelques fois ce peut tre
  "PC/MS". Dans ce cas le "2" est la marque pour le mode 2 boutons
  Microsoft, et le "3" pour le mode 3 boutons MouseSystems. La notation
  "PC/MS" est quelque peu plus complique. Vous devriez probablement
  trouver que le "MS" indique le mode Microsoft et le "PC" le mode
  MouseSystems. (Vous pouvez trouver que "PC" indique le mode PS/2)., Si
  vous avez une telle souris, vous pouvez changer le commutateur sur "3"
  ou "PC", mettre le mode MouseSystems dans votre XConfigs (voir plus
  loin) et la souris devrait parfaitement fonctionner en mode 3 boutons.


  55..  SSoouurriiss NNoorrmmaallee

  Si vous n'avez ni commutateur ni instructions, alors un peu
  d'exprimentation est ncessaire. La premire chose  faire est de
  supposer que le fabricant de la souris dit la vrit, et donc que la
  souris est pleinement Microsoft.  Configurez votre XConfigs (voir la
  section Xconfig) de manire  esprer une souris Microsoft et essayez.


  Si la souris ne fonctionne pas du tout, soit vous n'avez pas une
  souris Microsoft, soit il y a un autre problme. Essayez les autres
  protocoles dans la configuration, la page man tant le meilleur
  endroit o regarder. Voyez galement la section Problmes divers plus
  bas.


  Vous trouverez probablement que lorsque vous lancez X, la souris
  fonctionne bien mais que seuls les 2 boutons les plus loigns
  fonctionnent. Vous pouvez bien sr accepter cel, et muler le 3me
  bouton (pressez les 2 boutons en mme temps pour cliquer avec le
  troisime) comme vous le feriez avec une souris 2 boutons. Pour cel,
  changez le fichier Xconfig comme indiqu dans la section Exemples de
  Xconfig plus loin. Cel peut signifier que vous avez achet une souris
  3 boutons sans raisons, et vous n'avez certainement pas besoin d'aller
  plus loin. Ceci dit, vous devez maintenant regarder votre matriel.


  66..  PPaasssseerr llaa ssoouurriiss eenn mmooddee 33 bboouuttoonnss

  Mme les souris les moins chres peuvent fonctionner en mode
  MouseSystems, avec les 3 boutons fonctionnels. Le truc est de pousser
  la souris  penser qu'elle est MouseSystems, quelque chose que vous
  verrez rarement dans les instructions.


    Avant d'allumer l'ordinateur, pressez le bouton gauche de la souris
     (et maintenez le enfonc jusqu' ce que le lancement ait atteint
     une phase sre).


  Quand la souris est alimente, si le bouton gauche est enfonc elle se
  met en mode MouseSystems. Un truc trs simple, mais pas toujours
  document. Notez qu'un relancement logiciel de votre ordinateur peut
  ne pas couper l'alimentation et donc continuer  fonctionner. Il y a
  un certain nombre d'autres moyens de changer ce mode, qui peuvent ou
  non fonctionner avec telle ou telle souris. Quelques uns sont bien
  moins drastiques qu'un reboot, et deux le sont beaucoup plus!


    Si votre ordinateur le permet, vous pouvez dbrancher la souris et
     la rebrancher avec le bouton gauche enfonc (alors que vous ne
     devriez pas brancher des outils sur un ordinateur allum, la
     spcification du RS232 dit que c'est bon).

    Vous devriez pouvoir relancer la souris en tapant echo "*n" >
     /dev/mouse, qui devrait avoir le mme effet que la dbrancher.
     Maintenez enfonc le bouton gauche pour le mode Mouse Systems, et
     pas pour Microsoft. Vous pouvez mettre ceci dans tout script que
     vous utilisez pour lancer X.

    Bob Nichols (rnichols@interaccess.com) a crit un court programme
     en C faisant la mme chose, et qui peut fonctionner si echo "*n" ne
     marche pas (et vice versa). Vous pouvez trouver une copie du source
     sur http://kipper.york.ac.uk/src/fix-mouse.c.

    Quelques uns ont rapport que la ligne "ClearDTR" dans le XConfig
     est suffisante pour placer leurs souris en mode Mouse Systems.

    Si vous tes suffisamment courageux, ouvrez la souris (rappelez
     vous que ceci annule votre garantie) et regardez  l'intrieur.
     Dans quelques cas, la souris peut avoir un interrupteur, pour
     quelque raison obscure connue uniquement du fabricant. Plus
     probablement sur les souris  bas prix, il y a un cavalier que vous
     pouvez bouger. L'interrupteur ou le cavalier peuvent avoir le mme
     effet que le commutateur "MS/PC" dcrit ci-dessus dans ``la section
     Souris  commutateur''.  Vous pouvez trouver que le circuit
     principal a t cr pour un interrupteur 2/3 boutons, mais qu'il
     n'a pas t pos. Il devrait ressembler  peu prs  ceci:


                -----------
               | o | o | o |  SW1
                -----------
                 1   2   3




  Essayez de joindre les broches 1-2 ou 2-3, et voyez si a change le
  comportement de la souris. Dans ce cas, vous pouvez soit placer un
  petit cavalier, soit soudre les contacts pour une solution rapide et
  permanente.

    Une autre solution par la soudure qui peut tre employe si rien
     d'autre ne fonctionne pour une souris qui ne comprend pas du tout
     le MouseSystems, de Peter Benie (pjb1008@chiark.chu.cam.ac.uk). Si
     le bouton du milieu de la souris est bipolaire, connectez un ct
     de l'interrupteur  l'interrupteur du bouton gauche, et l'autre
     ct  l'interrupteur du bouton droit. Si l'interrupteur n'est pas
     bipolaire, utilisez plutt des diodes que du fil. Maintenant, le
     bouton du milieu pousse les boutons droit et gauche en mme temps.
     Slectionnez "ChordMiddle" dans le XF86Config et vous avez un
     bouton du milieu fonctionnel.

    Le recours ultime avec de la soudure a tout d'abord t dcrit par
     Brian Craft (bcboy@pyramid.bio.brandeis.edu). 2 puces communes des
     souris gnriques sont les 16 broches ZZ88335500, et les 18 broches
     HHMM88335500AA. Sur chacune de ces puces, une broche contrle le mode de
     la puce, comme suit.


       Pin 3   Mode
       -----   ----
       Libre   Par dfaut Microsoft. Mouse Systems si un bouton est
                       enfonc au lancement.
       Terre   Toujours Mouse Systems.
       Vdd             Toujours Microsoft.




  (Les broches sont gnralement numrots comme suit:)







          ____
  pin1  -| \/ |-
  pin2  -|    |-
  pin3  -|    |-
        -|    |-
        -|    |-
        -|    |-
        -|    |-
  pin8  -|____|-




  (Cette info provient de Hans-Christoph Wirth et Juergen Exner, qui
  l'ont post sur de.comp.os.linux.hardware). Vous pouvez soudre un lien
  entre la broche 3 et la terre, ce qui fixera la souris en mode Mous
  eSystems.


    Peter Fredriksson (peterf@lysator.liu.se) a essay la puce
     SYSGRATION SSYYSS22000055, et a trouv que relier la broche 3  la terre
     force le mode MouseSystem.

    Uli Drescher (ud@digi.ruhr.de)  confirme que ceci fonctionne sur la
     puce HHNN88334488AA; Ben Ketcham (bketcham@anvilite.murkworks.net)
     confirme pour la puce HHMM88334488AA (la broche 9 correspond  la terre).

    Urban Widmark (ubbe@ts.umu.se) dit que la mme chose s'applique 
     la puce EECC33556677AA11, o la broche 8 est la terre. L'auteur du Howto a
     galement essay et ce truc fonctionne bien.

    Timo T Metsala (metsala@cc.helsinki.fi) a trouv que sur la puce
     HHTT66551100AA la broche 3 permet la slection du mode, et la broche 9 est
     la terre. La mme chose s'applique aussi  la HHTT66551133AA. Holtek
     produit galement la HHTT66551133BB et la HHTT66551133FF; sur celles-ci, la terre
     est la broche 8.

    Robert Romanowski (robin@cs.tu-berlin.de) dit que la broche 3 sur
     la broche 8 (terre) fonctionne aussi sur une EEMM8833770011BBPP.

    Robert Kaiser (rkaiser@sysgo.de) confirme que broche 3 sur terre
     fonctionne aussi sur une EECC33557766AA11.

    Sean Cross (secross@whidbey.com) a trouv que la broche 2 connecte
      la broche 7 (terre) sur une puce HHMM88337700GGPP fonctionne.

    Peter Fox (fox@roestock.demon.co.uk) a utilis une connection
     broche 3 - broche 8 sur la puce HHMM88334488AA.

    Jon Klein (jbklein@mindspring.com) a connect la broche 3  la
     broche 9 afin d'y arriver sur la puce UUAA55221122SS.


    En alternative avec les mthodes de soudage ci-dessus; vous pouvez
     avoir la souris conserver son bouton enfonc au lancement; le
     circuit est de Mathias Katzer (mkatzer@TechFak.Uni-Bielefeld.DE).










           -----
        ---  R  ---------O------ + Alimentation
       |   -----   |        |                     C = 100nF condensateur
       |           | E      |                     R = 100kOhm
       |       __ /         |                     T = BC557 transistor
       |      /  \          O
       |   B | #V | T         /
       |-----|-#  |          /   Interrupteur du bouton gauche de la souris
       |     | #\ |         O
       |      \__/          |
      ---         \  C      |
      --- C        ------O----------> (Vers quelque part dans les profondeurs
       |                               de la souris)
       |
      ###  Terre




  La souris-test tait un modle sans nom MUS2S - cependant son fonc
  tionnement pour une autre souris dpend de son circuit; si l'interrup
  teur est connect au sol et non  l'alimentation, un transistor NPN
  comme le BC547 devrait marcher; R et C devront aussi tre changs.


  Ainsi, le choix dpend de vous. Optez pour le mode Microsoft 2 Boutons
  par dfaut, ou tentez de changer le mode et de configurer X pour
  prendre cet avantage en compte.


  77..  SSoouurriiss  rroouulleetttteess

  Les souris  roulettes sont apparues ces dernires annes, en
  commenant avec la Microsoft Intellimouse et se dveloppant ensuite
  aux autres fabricants. La roulette peut tre clique comme un bouton,
  ou tourne vers le haut ou vers le bas.  Pour plus d'informations, la
  rfrence de loin la meilleure est sur
  http://www.inria.fr/koala/colas/mouse-wheel-scroll/ qui dcrit comment
  avoir de nombreuses applications X reconnaissant l'action de
  dplacement.


  En gnral, vous aurez besoin d'un serveur X relativement rcent pour
  utiliser cette action de dplacement, mais quelques serveurs anciens
  reconnatront les actions de cliquage. Par exemple, l'Intellimouse est
  supporte  partir d'XFree 3.3.1.


  88..  UUttiilliisseerr ggppmm ppoouurr cchhaannggeerr llee mmooddee ddee llaa ssoouurriiss

  gpm est le programme qui vous permet d'utiliser la souris sur une
  console en mode texte. Il est gnralement prsent dans les
  distributions linux, et peut tre lanc de la ligne de commande ou
  dans le script de lancement /etc/rc.d/rc.local.  Notez que les
  distributions n'ont pas toujours la version la plus rcente (1.14 lors
  de la parution de ce document) qui peut tre trouve sur les miroirs
  de sunsite.unc.edu.


  Les deux modes principaux pour une souris srie sous gpm sont:






  gpm -t ms
  gpm -t msc
  gpm -t help





  Pour les modes Microsoft ou MouseSystems, ou pour observer la souris 
  votre place et vous dire ce qu'il trouve.  Pour lancer gpm en mode
  MouseSystems, vous pouvez avoir besoin de l'option -3, et galement de
  l'option DTR, en utilisant -o dtr:


       gpm -3 -o dtr -t msc



  Cependant, gpm est souvent capable de reconnatre les 3 boutons de la
  souris, mme en mode Microsoft. Et les versions rcentes (Version 1.0
  et suivantes (?)) peuvent rendre cette information disponible pour
  d'autres programmes. Pour que ceci fonctionne, vous devrez lancer gpm
  avec l'option -R, comme suit:


       gpm -R -t ms



  Ceci permettra  gpm d'exporter les donnes de la souris vers un
  nouveau priphrique, /dev/gpmdata, qui semblera tre une souris pour
  tout autre programme. Notez que ce priphrique utilise ttoouujjoouurrss le
  protocole MouseSystems. Vous devez ensuite configurer votre Xconfig
  pour utiliser ceci  la place de /dev/mouse comme plus haut, mais vous
  devrez bien sur vous assurer que gpm tourne toujours lorsque vous
  lancez X. Quelques personnes ont rapport que quelques vnements lis
  au bouton du milieu ne sont pas correctement interprts par X en
  utilisant cette technique, cel peut tre rapport  une configuration
  spcifique pour la souris.


  88..11..  CChhaannggeerr llaa ccaarrttee ddeess bboouuttoonnss ppoouurr ggppmm eett XX

  Envoi de gustafso@math.utah.edu.


  Vous pouvez trouver que gpm utilise une carte des boutons diffrente
  de celle de X, donc utiliser les 2 systmes sur la mme machine peut
  tre confus. Pour que X utilise les mmes boutons pour le
  copier/coller que gpm, utilisez la commande X:


       xmodmap -e "pointer = 1 3 2"



  qui permet la slection par le bouton gauche et le collage par le
  bouton droit, pour une souris soit 2 soit 3 boutons. Pour forcer gpm 
  utiliser la carte standard de X, lancez le avec un -B:


       gpm -t msc -B 132




  99..  UUttiilliisseerr DDeeuuxx SSoouurriiss

  Dans quelques cas, par exemple un portable avec un priphrique de
  pointage inclus, vous pouvez dsirer utiliser une souris srie en tant
  que second priphrique. Dans la plupart des cas le systme intgr
  utilise le protocole ps/2, et peut tre ignor si vous ne dsirez pas
  l'utiliser. Configurez simplement gpm ou X pour utiliser /dev/ttyS0
  (ou autre) comme d'habitude.


  Pour utiliser les deux en mme temps, vous pouvez utiliser gpm -M pour
  r-exporter les priphriques. Plus de dtails dans la page man de
  gpm.  De plus, XFree 3.3.1 et suivants supportent l'entre par
  plusieurs priphriques de concert, en utilisant le mcanisme XInput.
  Les fichiers XF86Config auto-gnrs doivent contenir les commentaires
  ncessaires pour le mettre en place.


  1100..  FFiicchhiieerrss dd''eexxeemmpplleess ppoouurr XXFF8866CCoonnffiigg eett XXccoonnffiigg

  L'emplacement du fichier de configuration pour X dpend de la version
  et de la distribution que vous utilisez. Ce sera probablement soit
  /etc/Xconfig, /etc/XF86Config ou usr/X11/lib/X11/XF86Config.  Vous
  devriez voir duquel il s'agit lorsque vous lancez X - il sera affich
   l'cran avant les options. La syntaxe est quelque peu diffrente
  entre les fichiers XF86Config et Xconfig, donc les deux sont donns.


  1100..11..  SSoouurriiss SSrriiee MMiiccrroossoofftt


    XF86Config:

     Section "Pointer"
         Protocol "microsoft"
         Device "/dev/mouse"
     EndSection



    XConfig:

     #
     # Mouse definition and related parameters
     #
     Microsoft      "/dev/mouse"




  1100..22..  SSoouurriiss SSrriiee MMiiccrroossoofftt ((22 oouu 33 bboouuttoonnss)) aavveecc EEmmuullaattiioonn TTrrooiiss
  BBoouuttoonnss


    XF86Config:

     Section "Pointer"
         Protocol "microsoft"
         Device "/dev/mouse"
         Emulate3Buttons
     EndSection



    XConfig:

     #
     # Mouse definition and related parameters
     #
     Microsoft      "/dev/mouse"
     Emulate3Buttons




  1100..33..  SSoouurriiss SSrriiee 33 BBoouuttoonnss MMoouusseeSSyysstteemmss


    XF86Config:

     Section "Pointer"
         Protocol "mousesystems"
         Device "/dev/mouse"
         ClearDTR            #  These two lines probably won't be needed,
         ClearRTS            #  try without first and then just the DTR
     EndSection



    XConfig:

     #
     # Mouse definition and related parameters
     #
     MouseSystems    "/dev/mouse"
     ClearDTR                #  These two lines probably won't be needed,
     ClearRTS                #  try without first and then just the DTR




  1100..44..  SSoouurriiss SSrriiee MMiiccrroossoofftt aavveecc ggppmm --RR


    XF86Config:

     Section "Pointer"
         Protocol "MouseSystems"
         Device "/dev/gpmdata"
     EndSection



    XConfig:

     #
     # Mouse definition and related parameters
     #
     MouseSystems      "/dev/gpmdata"




  1111..  CCbblleess,, eexxtteennssiioonnss eett aaddaappttaatteeuurrss

  Les seuls cbles utiles dans un cble souris sont les suivants: TxD et
  RxD pour le transfert des donnes, RTS et/ou DTR pour les sources
  d'nergie, et la terre.


  Traduit en numro de broches, ce sont:

                  9-pin port      25-pin port
          TxD         3                 2
          RxD         2                 3
          RTS         7                 4
          DTR         4                20
          Gnd         5                 7




  Le tableau ci-dessus peut tre utilis si vous dsirez crer des
  adaptateurs entre prises 9 et 25 broches, ou des cbles d'extension.


  1122..  PPrroobbllmmeess ddiivveerrss eett CCoonnffiigguurraattiioonnss


    Si vous avez des problmes avec votre souris sous X ou sur une
     console, vrifiez que vous ne fates pas tourner un getty sur le
     port srie, ou quoi que ce soit d'autre comme un modem.  Vrifiez
     galement les conflits d'IRQ.

    Il est possible que vous deviez enfoncer le bouton gauche lorsque
     vous lancez XWindow. Quelques systmes peuvent envoyer une sorte de
     signal ou de pic  la souris quand X dmarre.

    Les problmes avec les priphriques srie peuvent tre ds  un
     port srie mal initialis au lancement. Ceci est ralis par la
     commande setserial, lance par le script /etc/rc.d/rc.serial.
     Vrifiez la page de man de setserial et le Serial-HOWTO pour plus
     de dtails. Il peut tre intressant d'exprimenter les types, par
     exemple essayer setserial /dev/mouse uart 16550 ou 16550a sans
     regarder quel port vous avez. (pour information, les souris
     n'aiment pas le 16c550AF).

    L'option ClearDTR peut ne pas fonctionner proprement sur certains
     systmes,  moins que vous ne dsactiviez la prise en main du
     RTS/CTS avec la commande:

    stty -crtscts < /dev/mouse

     (Test sur une UART 16450/Pentium par Vladimir Geogjaev,
     geogjaev@wave.sio.rssi.ru.

    Les souris Logitech peuvent ncessiter la ligne ChordMiddle pour
     obtenir le bouton du milieu fonctionnel. Cette ligne remplace
     Emulate3Buttons ou vient aprs la ligne /dev/mouse dans le fichier
     de configuration. Vous pouvez avoir besoin des lignes ClearDTR et
     ClearRTS dans votre Xconfig. Quelques souris Logitech n'ont pas
     besoin de la ligne ChordMiddle - un symptme de ce problme est que
     les menus semblent bouger avec la souris au lieu de descendre. (de:
     chang@platform.com).

    Echanger les boutons: utilisez la commande xmodmap pour changer
     quel bouton physique enregistrer   chaque clic de souris. eg:
     xmodmap -e "pointer = 3 2 1" tournera les boutons pour utiliser de
     la main gauche. Si vous avez simplement une souris 2 boutons alors
     ce sera juste les nombres 1 et 2.

    Acclration: utilisez la commande xset m pour changer les
     paramtres de la souris. eg xset m 2 donnera une acclration de 2.
     Regardez la page de man pour tous les dtails.

    Pointeur offset: si le fait de cliquer semble provenir de la droite
     ou de la gauche de l'endroit o se trouve le curseur, il se peut
     que votre cran ne soit pas align. C'est un problme du driver S3,
     que vous pouvez fixer en utilisant xvidtune. Essayez
     Invert_VCLK/InvertVCLK, ou EarlySC. De: Bill Lavender
     (lavender@MCS.COM) et Simon Hargrave.  Dans le XF86Config, a
     devrait ressembler  ceci:

    XF86Config:

         Subsection "Display"
             Modes       "1024x768" "800x600" "640x480" "1280x1024"
             Invert_VCLK "*" 1



    Si vous avez des problmes de "bondissement" des boutons de la
     souris, cd deux clics lorsque vous n'en voulez qu'un, il peut y
     avoir quelque chose avec la souris. Ce problme a t rsolu pour
     une souris Logitech par Bob Nichols (rnichols@interaccess.com) et
     utilise la soudure de quelques rsistances et d'une puce dans la
     souris pour "dboucher" les microswitches.

    Si quelques utilisateurs n'arrivent pas  obtenir une souris
     fonctionnel mais que d'autres (comme le root) le peuvent, il est
     possible que les utilisateurs ne lancent pas exactement la mme
     chose - par exemple une version diffrente de X ou de Xconfig.
     Vrifiez attentivement les messages de lancement de X pour en tre
     sr.

    Si vous trouvez que le pointeur souris efface des choses sur votre
     cran, vous avez un problme de configuration du serveur.  Essayez
     d'ajouter l'option linear, ou peut-tre nolinear dans la section
     des cartes graphiques, ou s'il s'agit d'une carte PCI, les options
     tgui_pci_write_off et tgui_pci_read_off. (Il semblerait que ce soit
     un problme de la carte Trident).

    Si votre souris arrte de fonctionner lorsqu'il y a du soleil ou
     lorsque vous allumez la lumire, il se peut que les capteurs soient
     submergs par la lumire autour du boitier. Vous pouvez essayer de
     peindre en noir l'intrieur du boitier, ou placer une carte dans le
     haut.

    Les souris de marque Microsoft sont souvent cause de problmes.  La
     rcente "Microsoft Serial Mouse 2.1A" ont t rapportes comme non
     fonctionnelle sur beaucoup de systmes. gpm version 1.13 et
     suivantes doivent galement supporter la souris 2.1A, en utilisant
     le type de souris pnp. (Voir la section gpm pour savoir comment
     r-exporter les donnes.  La "Microsoft Intellimouse" pose
     galement des problmes, cependant elle doit maintenant tre
     supporte par XFree version 3.3 et suivante.


  1133..  MMooddlleess TTeessttss

  Il existe beaucoup de souris diffrentes, et je ne peux honntement
  dire que vous devriez acheter celle-ci plutt que celle-l. Ce que je
  peux faire est vous donner une liste de ce que je pense que font ces
  souris, bas sur l'exprience et le bouche  oreille. Mme avec cette
  information vous devez tre vigilant - nous avons deux souris
  identiques dans notre bureau sur deux ordinateurs, et certaines choses
  fonctionnent sur l'un et pas sur l'autre !  Toute addition  cette
  liste sera la bienvenue.


  SSoouurriiss ooppttiiqquuee MMoouussee SSyysstteemmss,, vveerrssiioonn ssrriiee
  Fonctionne bien (comme vous pouvez l'esprer d'aprs le nom!) sans
  ClearDTR ou ClearRTS dans la config.
  SSoouurriiss WWiiNN,, vveenndduuee ppaarr OOffffiiccee WWoorrlldd ppoouurr 88 LLiivvrreess SStteerrlliinngg
  Standard double-mode Microsoft/MouseSystems.
  SSoouurriiss AAggiilleerr 22990000
  Standard double-mode Microsoft/MouseSystems. La puce SYSGRATION
  SYS2005 est soudable.
  SSoouurriiss SSiiccooss
  Fonctionne bien, ncessite ClearDTR et ClearRTS dans la config.
  IInnddeexx vveenndd uunnee ssoouurriiss ppoouurr 1100 LLiivvrreess SStteerrlliinn
  Ne fonctionne pas en mode 3 boutons, mais contient des instructions
  :-)
  AArrtteecc
  Souris bi-protocole classique, ncessite ClearDTR dans la config, mais
  PAS ClearRTS.
  SSoouurriiss ssrriiee DDyynnaaPPooiinntt 33 bboouuttoonnss
  Souris bi-protocole classique, ncessite ClearDTR et ClearRTS dans le
  Xconfig.
  SSoouurriiss GGeenniiuuss EEaassyymmoouussee 33 bboouuttoonnss
  Fonctionne bien avec le protocole Mouseman sans le paramtre
  ChordMiddle.  De Roderick Johnstone (rmj@ast.cam.ac.uk).
  TTrruueemmoouussee,, ffaabbrriiqquuee  TTaaiiwwaann
  Fonctionne bien, ncessite ClearDTR dans la config.  De Tim MacEachern
  (http://ccn.cs.dal.ca/~ae721/Profile.html).
  SSoouurriiss ddee mmaarrqquuee CChhaammpp
  Ncessite d'avoir l'interrupteur en mode PC, qui donne galement le
  protocole MouseSystems. De tnugent@gucis.cit.gu.edu.au.
  SSoouurriiss MMiiccrrooSSppeeeedd
  Souris bi-protocole classique.
  SSoouurriiss ddee mmaarrqquuee VVeennuuss ((77$$))
  Contient un cavalier pour changer entre les modes 2 et 3 boutons.  De
  mhoward@mth.com.
  SSaattuurrnn
  Souris  interrupteur, fonctionne bien en MouseSystems en position 3
  boutons.  De grant@oj.rsmas.miami.edu.
  SSoouurriiss MMaannhhaattttaann
  Interrupteur pour les modes "MS AM" / "PC AT", MS fonctionne bien avec
  la mthode gpm -R. De komanec@umel.fee.vutbr.cz.
  SSoouurriiss IInnllaanndd
  Interrupteur pour modes "PC/MS", fonctionne bien.  De
  http://ptsg.eecs.berkeley.edu/~venkates.
  qqMMoouussee ((33--bboouuttoonnss)),, FFCCCC IIDD EE66qqmmoouussee XX3311
  Vendue aux USA pour environ 10$. Fonctionne avec "gpm -t msc -r 20".
  Pas de cavalier ni interrupteur pour le mode MouseSystems 3 boutons.
  Non fiable sous X. Ne rpond pas  echo "*n" > /dev/mouse.
  SSoouurriiss MMiittssuummii ((22--bboouuttoonnss)),, FFCCCC IIDD EEWW44EECCMM--SS33110011
  Vendue aux USA pour environ 12$. Fiable sous X et gpm, double bouton
  lisse.  De gustafso@math.utah.edu.
  SSoouurriiss PPCC AAcccceessssoorriieess ddee CCoommppUUSSAA ppoouurr 1100$$
  Interrupteur "PC/MS" sur le ct. Fonctionne bien.  De
  steveb@communique.net.
  SSoouurriiss FFiirrsstt -- vveenndduuee ssrriieeuusseemmeenntt ppaarr TTeemmppoo  77..7799 LLiivvrreess SStteerrlliinngg
  Double protocole Microsoft/MouseSystems, mode choisi par pression du
  bouton  l'allumage. Ni interrupteurs ni liens. Connection par quatre
  cbles, echo '*n' ne fonctionne pas. gpm -R fonctionne.  De
  peterk@henhouse.demon.co.uk.
  SSoouurriiss TTrruusstt 33--bboouuttoonnss
  Double mode avec interrupteur, fonctionne bien avec MouseSystems en
  mode "PC". gpm n'apprcie cependant pas le mode Microsoft.
  CChhiicc 441100
  Fonctionne parfaitement lorqu'elle est laisse en mode ms et utilise
  avec la commande gpm -R.  De Stephen M. Weiss
  (steve@esc.ie.lehigh.edu).
  SSoouurriiss KKeeyyMMoouussee 33--bboouuttoonnss
  Pas d'interrupteur, fonctionne bien avec ClearDTR et ClearRTS dans le
  Xconfig; gpm ncessite -o dtr.  De EZ4PHIL@aol.com.
  CCllaavviieerr QQttrroonniixx ""SSccoorrppiioo 6600""
  Les trois boutons fonctionnent en mode MouseSystems.  De
  hwe@uebemc.siemens.de.
  PPoorrttaabbllee TTeeccrraa 772200
  Le pointeur intgr est en /dev/cua0; le stylo est en /dev/psaux.  De
  apollo@anl.gov.
  SSoouurriiss AAnnuubbiiss
  Fonctionne bien, ncessite de maintenir enfonc le bouton gauche ds
  qu'il faut changer vers la console X virtuelle.  De Joel Crisp
  (Joel.Crisp@bristol.ac.uk).
  SSoouurriiss YYaakkuummoo NNoo..11990000
  Fonctionne avec gpm -R -t ms exportant vers X.  D'Oliver Schwank
  (flinx.nbg.sub.org!oli@flinx.nbg.sub.org).
  TTrraacckkbbaallll GGeenniiuuss ""EEaassyy TTrraakk""
  N'est PAS compatible Microsoft, utilisez Mouseman dans le Xconfig et
  il marchera bien.  De VTanger@aol.com.
  HHiigghhssccrreeeenn MMoouussee PPrroo
  "Fonctionne bien" d'aprs alfonso@univaq.it.
  SSrriiee LLooggiitteecchh CCAA
  Fonctionne sous X en utilisant le protocole MMseries,  2400 Baud, 150
  SampleRate. (Doit aussi s'appliquer aux souris Logitech CC, CE, C7 et
  C9).  De vkochend@nyx.net.
  SSoouurriiss AA44--TTeecchh
  Fonctionne bien, ncessite la ligne DTR sous X et gpm.  De
  deane@gooroos.com.
  SSoouurriiss MMoouussee SSyysstteemmss ""SSccrroollll"" ((qquuaattrree bboouuttoonnss eett uunnee rroouulleettttee--bboouuttoonn))
  Dispose d'un interrupteur 2/3 - en mode 3 fonctionne comme une souris
  MouseSystems 3 boutons, ignorant l'extra-bouton et la roulette.  Ne
  ncessite pas ClearRTS/DTR.  De parker1@airmail.net.
  BBooeeddeerr MM--77 ""BBiitt SSttaarr"" ((eett lleess aauuttrreess ssrriieess MM  ppaarrttiirr ddee MM1133))
  Change vers le protocole Mousesystems en enfonant n'importe quel
  bouton au dmarrage.  De sjt@tappin.force9.co.uk.
  SSoouurriiss VVeerrtteecchh
  Environnement normal Microsoft/Mousesystems, peut tre soude pour une
  fixation permanente.  De duncan@fs3.ph.man.ac.uk.
  SSoouurriiss ssrriiee 33 bboouuttoonnss RRaaddiioo SShhaacckk
  Modle 26-8432, disponible chez Tandy pour environ 20 livres.
  Fonctionne en Mousesystems avec ClearDTR.  De
  Sherilyn@sidaway.demon.co.uk.
  SSoouurriiss ssrriiee DDeexxxxaa
  Fonctionne bien en utilisant le protocole Microsoft dans le Xconfig,
  pas de ChordMiddle ou autre ncessaire.  De
  mailto:slevy@ncsa.uiuc.edu.
  SSoouurriiss 33 bboouuttoonnss BBeellkkiinn
  Achete chez Sears, ncessite -o rts pour gpm (et probablement
  ClearRTS sous X) en mode PC.  De mailto:mmicek@csz.com.

  1144..  IInnffoorrmmaattiioonnss CCoommppllmmeennttaaiirreess


    Mouse Systems dispose d'un site web  http://www.mousesystems.com/.
     Ils ont un driver Windows si vous en avez besoin.

    Le Linux Serial HOWTO est disponible sur tous les miroirs de
     sunsite autour du monde. Si vous ne savez pas quel est le miroir le
     plus proche de chez vous, commencez 
     http://sunsite.unc.edu/mdw/linux.html. (NdT: Pour la France,
     utilisez ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/).

    Il y a une trs bonne explication sur le fonctionnement des souris
      http://www.4QD.co.uk/faq/meece.html.

    Les dtails complets sur les fichiers Xconfig et XF86Config sont
     trouvables dans les pages de man, et dans la documentation sur
     l'installation de X Window, comme le XFree86 HOWTO. Voyez galement
     la XFree86 FAQ sur un miroir de http://www.XFree86.org/.

    Les informations sur gpm peuvent tre trouces sur la page de man,
     voyez aussi la page web de Darin Ernst  http://www.castle.net/X-
     notebook/mouse.txt.

    Beaucoup d'informations sur le matriel et les logiciels souris
     peuvent tre trouves sur
     http://www.hut.fi/Misc/Electronics/pc/interface.html#mouse.


  1155..  QQuueeuuee ddee llaa SSoouurriiss

  La plupart des informations de ce document ont t rcupres dans les
  divers linux newsgroups. Je suis dsol je ne conserve pas de traces
  de ceux qui ont contribus, je vous remercie tous.


  Donc, en rsum:

    Mme les souris Microsoft 3 boutons les moins chres peuvent
     fonctionner;

    Configurez votre copie de X pour obtenir une souris Mouse Systems;

    Enfoncez le bouton gauche de la souris au lancement pour placer la
     souris en mode MouseSystems;

    Vous pouvez avoir besoin de presser le bouton gauche au lancement
     de X;

    Les souris sont plus intelligentes que vous ne le pensez.






































  Linux ADSM Mini-Howto
  par Thomas Knig, Thomas.Koenig@ciw.uni-karlsruhe.de
  v, 15 Janvier 1997

  Ce document dcrit l'installation et l'utilisation sur un poste de
  travail Linux d'un client pour le systme de sauvegarde commercial
  ADSM.
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Installation du module iBCS

  3. Installation du client ADSM

  4. Fonctionnement du client

  5. Problmes identifis



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  ADSM est un systme de sauvegarde en rseau vendu par IBM que l'on
  retrouve dans de nombreuses organisations. Les programmes clients
  existent pour une large palette de systmes : diffrents Unix,
  Windows, Novell, Mac, Windows NT. Malheureusement,  la date de
  rdaction de ce document, aucune version spcifique  Linux n'existe.

  L'utilisation d'ADSM implique donc le recours au binaire SCO et 
  l'mulateur iBCS2. Il est ici question d'ADSM v2r1.

  A ce jour, je ne connais qu'une version fonctionnant sous Linux, et
  uniquement sur plate-forme i386.


  22..  IInnssttaallllaattiioonn dduu mmoodduullee iiBBCCSS

  Le module iBCS est disponible  l'adresse suivante :
  ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2.  [NdT : un miroir franais
  ftp://ftp.lip6.fr/pub/linux/tsx-11/BETA/ibcs2 ] Si vous employez une
  version 1.2.13 du noyau, rcuprez ibcs-1.2-950721.tar.gz,
  dcompactez-le et appliquez les patches ibcs-1.2-950808.patch1 et
  ibcs-1.2-950828.patch2.  Vous pouvez alors invoquer "make" et insrer
  le module iBCS via "insmod".

  Pour un noyau 2.0, rcuprez ibcs-2.0-960610.tar.gz, dcompressez-le
  dans un rpertoire adquat, allez dans ce rpertoire et appliquez le
  patch ci-dessous :












  --- iBCSemul/ipc.c.orig Wed Jan 15 21:32:15 1997
  +++ iBCSemul/ipc.c      Wed Jan 15 21:32:31 1997
  @@ -212,7 +212,7 @@
          switch (command) {
                  case U_SEMCTL:
                          cmd = ibcs_sem_trans(arg3);
  -                       arg4 = (union semun *)get_syscall_parameter (regs, 4);
  +                       arg4 = (union semun *)(((unsigned long *) regs->esp) + (5));
                          is_p = (struct ibcs_semid_ds *)get_fs_long(arg4->buf);
   #ifdef IBCS_TRACE
                          if ((ibcs_trace & TRACE_API) || ibcs_func_p->trace)


  Copiez ensuite CONFIG.i386 en CONFIG et invoquez make.

  S'ils ne sont pas dj prsents, crez les priphriques requis en
  excutant :

  # cd /dev
  # ln -s null XOR
  # ln -s null X0R
  # mknod socksys c 30 0
  # mknod spx c 30 1



  33..  IInnssttaallllaattiioonn dduu cclliieenntt AADDSSMM

  Le binaire SCO est divis en trois fichiers tar. Positionnez-vous  la
  racine de votre systme de fichiers, vrifiez la valeur de umask et
  dcompactez-les en tant qu'utilisateur root. Un script d'installation
  apparatra dans votre rpertoire /tmp. Invoquez-le.

  ditez ensuite /usr/adsm/dsm.sys et /usr/adsm/dsm.opt.  Certaines
  lignes du fichier dsm.sys requirent une attention particulire :

     SSeerrvveerrnnaammee
        le nom du serveur

     TTCCPPSSeerrvveerraaddddrreessss
        le nom complet du serveur (FQDN)

     NNOODDeennaammee
        le nom de votre station

  Vous prciserez dans le fichier dsm.opt :

     SSeerrvveerr
        comme prcdemment

     FFoolllloowwssyymmbboolliicc
        s'il faut suivre les liens symboliques (c'est rarement une bonne
        ide)

     SSUUbbddiirr
        faut-il sauvegarder les sous-rpertoires ? (gnralement oui)

     ddoommaaiinn
        le systme de fichiers  archiver

  Crez ensuite un fichier /etc/mnttab  la mode SCO  partir de votre
  /etc/fstab. Le script Perl suivant, fstab2mnttab, le fera pour vous.




  ______________________________________________________________________
  #!/usr/bin/perl

  $mnttab_struct = "a32 a32 I L";

  open(MTAB, "/etc/mtab") || die "Impossible d'ouvrir /etc/mtab: $!\n";
  open(MNTTAB, ">/etc/mnttab") || die "Impossible d'ouvrir /etc/mnttab: $!\n";

  while(<MTAB>) {
      next if /pid/;
      chop;
      /^(\S*)\s(\S*)\s(\S*)\s.*$/;
      $device = $1;
      $mountpt = $2;
      $fstype = $3;
      if($fstype ne "nfs" && $fstype ne "proc") {
          $mnttab_rec =
              pack($mnttab_struct, $device, $mountpt, 0x9d2f, time());
          syswrite(MNTTAB, $mnttab_rec, 72);
          print "Entre cre pour : $device $mountpt $fstype\n";
      }
  }

  close(MNTTAB);
  exit 0;
  ______________________________________________________________________




  Le client ne rclame aucune bibliothque dynamique : il est li sta
  tiquement.


  44..  FFoonnccttiioonnnneemmeenntt dduu cclliieenntt

  Il existe deux clients. dsm propose une interface X11 tandis que dsmc
  reste en ligne de commande. Votre service informatique vous en dira
  davantage  leur sujet. Un script de dmarrage du style :

  dsmc schedule -quiet 2>&1 >/dev/null &


  s'avrera vraisemblablement ncessaire.

  55..  PPrroobbllmmeess iiddeennttiiffiiss

  SCO se rvle malheureusement incapable de supporter les noms de
  machines dpassant les 8 caractres. Si le nom de votre machine
  dpasse cette limite ou qu'il inclut le nom de domaine, vous devrez le
  prciser dans la ligne NODename du /usr/adsm/dsm.sys.

  Le recours  la variable DISPLAY requiert de la part de celle-ci
  qu'elle comprenne le nom complet de votre machine, c'est  dire
  DISPLAY=maMachine.monDomaine:0 au lieu de DISPLAY=maMachine:0.











  mini-HOWTO du linuxeur proselyte ("Advocacy")
  Paul  L.  Rogers Paul.L Rogers <mailto:Paul.L.Rogers@li.org>
  (adapte par Nat <mailto:nat@linux-france.com>)
  v0.5fr1, 19980508

  Ce  document  contient  diverses  suggestions  destinees  a  ceux  qui
  souhaitent voir le nombre d'utilisateurs de Linux augmenter.

  11..  AADDVVOOCCAACCYY HHOOWWTTOO

  11..11..  AA pprrooppooss ddee ccee ddooccuummeenntt

  Lors   du   NetDay96   <http://www.netday96.com>   diverses  personnes
  aborderent  le  theme  du  "Linuxeur  proselyte".   Les   observations
  formulees par Jon ``maddog'' Hall inspirerent l'auteur de ce document.
  Jon,  apres  lecture,  declara  que  cette  liste  de  recommandations
  beneficierait a la communaute des utilisateurs de Linux.

  Voici       la       version      HTML      du      document      (VO)
  <http://www.datasync.com/~rogerspl/Advocacy-HOWTO.html>.

  Nat  Makarevitch  <nat@nataa.fr.eu.org>  a  traduit  ce  document   en
  francais       <http://www.linux-france.com/article/advocacy/Advocacy-
  HOWTO_fr.html>.  Seule la diffusion des  versions  non  modifiees  est
  autorisee.

  Chie  Nakatani <jeanne@mbox.kyoto-inet.or.jp> a traduit ce document en
  japonais <http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/euc/Advocacy.euc>.

  Janusz Batko <janus@krakow.linux.org.pl>  a  traduit  ce  document  en
  polonais <http://www.jtz.org.pl/Html/mini/Advocacy.pl.html>.

  Bruno   H.  Collovini  <buick@icarai.microlink.com.br>  a  traduit  ce
  document                         en                          portugais
  <http://www.microlink.com.br/~buick/dragons/op1/minihowtos/br-
  advocacy.html>.

  Mauricio Rivera Pineda <rmrivera@hotmail.com> a traduit ce document en
  espagnol
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/es/mini/Advocacy-
  Mini-Como.gz>.

  L'auteur de ce document, <Paul L Rogers <mailto:Paul.L.Rogers@li.org>,
  attend vos commentaires et suggestions s'ils sont rediges en  anglais.
  Les  expedier  au  traducteur  nat@linux-france.com <mailto:nat@linux-
  france.com> (en rappelant le titre de ce  document  :  "mini-HOWTO  du
  proselyte Linux") si vous preferez le francais.

  Le    present    texte   releve   du   Linux   Documentation   Project
  <http://sunsite.unc.edu/mdw/linux.html>.   Lire  a   ce   propos   les
  documents             en             francais            (ftp.lip6.fr)
  <ftp://ftp.lip6.fr:/pub/linux/french>    et    HOWTO    en    francais
  (freenix.fr)  <http://www.freenix.fr/linux/howto.html>  ainsi  que les
  ressources Linux au LORIA <http://www.loria.fr/linux/>

  Tim Bynum postera chaque mois dans divers groupes Usenet la VO  de  ce
  document.

  Note  :  je  n'ai  pu, pour diverses raisons, tenir ce texte a jour et
  participer a la vie de la communaute Linux autant que j'aurais aime le
  faire.  Je  vous  prie  de  m'en  excuser  et  disposerai  sous peu de
  davantage de temps.  Merci  a  tous  ceux  qui  prirent  la  peine  de
  m'expedier des commentaires.
  11..22..  CCooppyyrriigghhtt

  Ce document est (c) 1996-1998 Paul L. Rogers. Tous droits reserves.

  (--  N.d.T   Merci  de consulter la version originelle pour obtenir le
  texte complet du copyright--)

  11..33..  IInnttrroodduuccttiioonn

  Linux (meme s'il n'est pas absolument parfait) demeure stable,  fiable
  et  robuste.  Ses  utilisateurs  le  savent  mais  certaines personnes
  potentiellement  concernees,  y  compris  des  "decideurs"  l'ignorent
  encore.

  De  nombreuses entreprises parviennent a vendre leurs produits grace a
  leur approche commerciale plutot qu'en  profitant  de  leurs  qualites
  techniques.   Cette  importance  (preponderance  ?)  des  aspects  non
  techniques  laisse  penser  que  Linux  et  tous  les  logiciels   GNU
  ("libres")  ou  relevant  du  domaine  public ne pourront probablement
  atteindre une diffusion maximale qu'au prix d'une  efficace  strategie
  de "publicite". Cette derniere ne greve pas le

  Qui  apprecie  Linux  et  aimerait contribuer a sa diffusion devrait a
  notre sens peser les suggestions  ci-apres  enoncees  et,  a  tout  le
  moins, informer toute personne interessee par Linux.  systeme lui-meme
  car n'implique aucun amenagement d'ordre technique.

  N.d.T le present document ressemble un peu, par endroits, a un baroque
  manuel  de  bonne  tenue  ou a un precis de manipulation de l'opinion.
  Cela correspond a une forme d'expose plus frequemment employee par les
  americains  que par les francais. J'ai procede a quelques amenagements
  stylistiques mais n'ai pu reformer l'" aura ". Merci de garder cela  a
  l'esprit lors de la lecture : "be positive" :-)

  11..44..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonnss

  Lars   Wirzenius,   ex  moderateur  du  groupe  comp.os.linux.announce
  <news:comp.os.linux.announce>,    publie    diverses    considerations
  <http://www.iki.fi/liw/texts/advocating-linux.html>.

  Eric       S.       Raymond       a       publie      une      analyse
  <http://www.earthspace.net/~esr/writings/cathedral-bazaar/> du  modele
  de  developpement  utilise  par  la  communaute  Linux (S. Blondeel en
  propose       une       http://www.lifl.fr/~blondeel/traduc/Cathedral-
  bazaar/Fichier_principal.html <adaptation francaise>).

  Le   site   Linux  PR  <http://www.cse.unsw.edu.au/~conradp/linux/pr/>
  traite de l'importance des communiques de presse.  Le  proselyte  peut
  organiser  un  "NetDay" dans une ecole grace aux explication proposees
  pas le NetDay How-To Guide <http://www.netday.org/how-to/>.

  Les tenants du logiciel libre s'apercurent que les  termes  americains
  "free   software"   et  "freely  available  software"  ne  sont  guere
  appropries car "free" signifie a la fois " libre "  et  "  gratuit  ".
  Lire   a   ce   propos   un   document   traitant   de  l'Open  Source
  <http://www.opensource.org/>

  Voici  une  methode   pratique   de   "   vente   "   :   Linuxmanship
  <http://electriclichen.com/people/dmarti/linuxmanship.html> (Donald B.
  Marti, Jr).

  L'un   des   objectifs   de   l'organisation    Linux    International
  <http://www.li.org> recoupe le notre.

  Le        site        du       Linux       Documentation       Project
  <http://sunsite.unc.edu/mdw/linux.html> recele de  nombreux  documents
  utiles.

  Le   projet  Linux  Center  Project  <http://www.linux-center.org/fr/>
  propose une liste thematique de liens vers des ressources libres.

  Le  document   Linux   Business   Applications   (version   francaise)
  <http://www.linux-france.com/article/lbiz-fr/>   contient   une  liste
  d'organisations employant Linux.

  Linux  Enterprise  Computing   <http://linas.org/linux/>   et   Freely
  Redistributable             Software            in            Business
  <http://www.cyber.com.au/misc/frsbiz/>  proposent   des   informations
  destinees a ceux qui souhaitent deployer Linux dans une entreprise.

  Le  Linux  Advocacy  Project  <http://www.10mb.com/linux/>  se propose
  d'encourager les developpeurs d'applications commerciales  a  proposer
  une version de leur produit destinee a Linux.

  Le  proselytisme  peut  aussi  passer  par  le  don d'un CD-ROM devenu
  inutile      :      Linux      CD      and      Support       Giveaway
  <http://visar.csustan.edu:8000/giveaway.html>.

  L'editeur     Specialized     Systems    Consultants,    Inc.    (SSC)
  <http://www.ssc.com/> publie le _L_i_n_u_x _J_o_u_r_n_a_l _<_h_t_t_p_:_/_/_w_w_w_._s_s_c_._c_o_m_/_l_j_/>
  _a_i_n_s_i  _q_u_e  _l_a  _L_i_n_u_x  _G_a_z_e_t_t_e _<_h_t_t_p_:_/_/_w_w_w_._s_s_c_._c_o_m_/_l_g_/> _d_o_n_t _c_e_r_t_a_i_n_e_s
  _s_e_c_t_i_o_n_s    _s_o_n_t    _t_r_a_d_u_i_t_e_s    _e_n    _f_r_a_n_c_a_i_s     _<_h_t_t_p_:_/_/_w_w_w_._l_i_n_u_x_-
  _f_r_a_n_c_e_._c_o_m_/_a_r_t_i_c_l_e_/_l_g_a_z_e_t_t_e_/>

  La    liste    des    "Linux    Mission   Critical   Systems"   survey
  <http://free.rmnet.it/linux/results.html>   propose   une   liste   de
  machines Linux supportant une forte charge 24 heures par jour.

  Voici  une liste non exhaustive des publications en ligne consacrees a
  Linux :

  +o  _L_i_n_u_x_F_o_c_u_s _<_h_t_t_p_:_/_/_m_e_r_c_u_r_y_._c_h_e_m_._p_i_t_t_._e_d_u_/_~_a_n_g_e_l_/_L_i_n_u_x_F_o_c_u_s_/>

  +o  _L_i_n_u_x_o_v_e _n_o_v_i_n_y _<_f_t_p_:_/_/_f_t_p_._i_n_e_t_._c_z_/_p_u_b_/_P_e_o_p_l_e_/_P_a_v_e_l_._J_a_n_i_k_/_n_o_v_i_n_y>

  +o  _L_i_n_u_x _G_a_z_e_t_t_e _<_h_t_t_p_:_/_/_w_w_w_._s_s_c_._c_o_m_/_l_g_/>

  +o  _P_L_U_T_O                                                       _J_o_u_r_n_a_l
     _<_h_t_t_p_:_/_/_w_w_w_._d_s_i_._u_n_i_v_e_._i_t_/_a_n_t_a_r_e_s_/_h_t_m_l_/_p_l_u_t_o_/_j_o_u_r_n_a_l_/_i_n_d_e_x_._h_t_m_l>_.

  11..55..  PPaarrttiicciippeerr aa llaa ddiiffffuussiioonn ddee LLiinnuuxx

  +o  Faites  etat  de  vos  experiences  personnelles  de Linuxeur, tant
     bonnes que mauvaises. Chacun sait que tout logiciel offre  son  lot
     de  bogues  et  de  limitations et l'honnetete nous oblige a ne pas
     dissimuler les points faibles  de  notre  systeme  favori.  J'adore
     cependant  expliquer  qu'en  trois  ans  d'exploitation  je n'ai du
     relancer ma machine qu'une fois a cause d'un blocage.

  +o  Si  quelqu'un  evoque  un  probleme  que  Linux  pourrait  resoudre
     fournissez-lui  toutes  les  indications  necessaires  (sites  Web,
     articles de magazines, livres, consultants ...). Si vous n'avez pas
     vous-meme   employe   les  solutions  suggerees  n'omettez  pas  de
     l'indiquer.

  +o  Si vous pouvez assurer une presentation de  Linux  enregistrez-vous
     au Linux Speakers Bureau <http://www.ssc.com/linux/lsb.html>.
  +o  Aidez  un complet debutant sous Linux, par exemple grace a Proselux
     <http://www.linux-france.com/article/proselux/>

  +o  Repondez, chaque semaine, a au moins un  article  Usenet  contenant
     une   question   de  debutant  (par  exemple  sur  fr.comp.os.linux
     <news:fr.comp.os.linux>).  Preferez les questions  difficiles  afin
     de progresser vous-meme mais ne repondez qu'a coup sur.

  +o  Certains  croient  encore  que  les  Unix n'offrent pas d'interface
     graphique. leur montrer les applications  graphiques,  par  exemple
     Gimp <http://www.gimp.org/>.

  +o  Presenter   Linux  aux  petites  entreprises  de  developpement  de
     logiciels.

  +o  Exposer l'interet de Linux au comite de veille technologique de  la
     direction informatique de votre entreprise.

  +o  Participer  aux  evenements  organises  connexes, par exemple a une
     edition du NetDay <http://www.netday.org>.

  +o  Ne jamais negliger le point de vue de la personne a  laquelle  vous
     "vendez"  Linux.  La  plupart  des  "decideurs" accordent davantage
     d'importance aux parametres lies au support, a la  fiabilite  et  a
     l'ouverture qu'a celui du cout immediat (d'acquisition du systeme).

  +o  L'assistance technique inquiete certains responsables. Faites  etat
     des  societe  en  proposant.  Consulter  par  exemple  le  document
     traitant     des     offres     commerciales     <http://www.linux-
     france.com/article/pro/>.  Lire  a  ce  propos le Linux Consultants
     HOWTO    <http://sunsite.unc.edu/LDP/HOWTO/Consultants-HOWTO.html>.
     Penser aussi aux forums Usenet (fr.comp.os.linux.*) et aux editeurs
     de distributions commerciales (SuSE,  Red  Hat  ...)  et  a  Cygnus
     Solutions <http://www.cygnus.com/>.

  +o  Inviter  tous  les  utilisateurs  de Linux a s'enregistrer grace au
     Linux Counter <http://counter.li.org/>.

  +o  Informer   les   instances   specialisees,   par   exemple    Linux
     International,  des  campagnes  de  promotions  assurees  de  facon
     efficace.

  +o  Insistez sur le fait  que  le  developpement  du  logiciel  GNU  ou
     domaine  public  s'effectue  de  facon ouverte et collaborative. Le
     produit resultant (par exemple Emacs, Perl, Linux ...) s'avere donc
     souvent bien teste et documente .

  +o  Faites etat (en anglais) des succes des campagnes de deploiement de
     Linux inspirees par vous. Linux  International  <http://www.li.org>
     (li@li.org   <mailto:li@li.org>)   et   les   autres  organisations
     semblables seront enchantees.

  +o  Offrez CD-ROM et livres traitant de Linux que vous n'employez  plus
     a  un  ami  interesse  (par  exemple  grace a un panneau d'annonces
     <http://www.linux-france.com/annonce/>),   a    une    bibliotheque
     publique  ou  a  un  club  d'informatique. Veillez a ne pas laisser
     ainsi un produit a disposition, par exemple grace a un BBS ou  site
     FTP,  si  sa licence d'utilisation ne vous y autorise pas. Informez
     le personnel de  la  bibliotheque  que  le  contenu  est  librement
     recopiable  dans  le  cas  contraire  et verifiez ensuite la mise a
     disposition des elements offerts.

  +o  Lors de l'achat d'ouvrages traitant d'un ensemble logiciel accordez
     toujours  faveur  a  celui  dont  l'auteur  participe reellement au
     projet  sous-jacent.  Les  droits  d'auteurs   percus   constituent
     probablement la seule compensation financiere de leurs efforts.
  +o  Encourager  les  responsables  de  sites  servis  grace  a  Linux a
     s'inscrire     sur     la     liste      Powered      by      Linux
     <http://sunsite.unc.edu/LDP/powered.html>,  leur  suggerer aussi de
     placer sur leur page de garde des vignettes de promotion des outils
     employes.               Exemples               :              Linux
     <http://www.cse.unsw.edu.au/~conradp/banners/>,              Apache
     <http://www.apache.org/>,     GNU    <http://www.gnu.org/>,    Perl
     <http://www.perl.com/>.

  +o  Participer ! Si l'informatique libre vous  rend  service  n'hesitez
     pas a oeuvrer pour elle en retour en :

  +o  soumettant des rapports de bogues detailles,

  +o  ecrivant de la documentation,

  +o  creant des images,

  +o  assurant des fonctions de gestion de projet,

  +o  suggerant des ameliorations,

  +o  offrant de l'assistance technique,

  +o  developpant du logiciel,

  +o  offrant des equipements,

  +o  accordant des donations.

     Il   existe   une   list   of   Linux  and  Linux-related  projects
     <http://sunsite.unc.edu/LDP/devel.html>.

  +o  Garder a l'esprit que nous devons tous prendre en charge des themes
     beaucoup   plus   importants   que   le  choix  d'un  environnement
     informatique.

  11..66..  RReegglleess ddee ccoonndduuiittee

  +o  En tant que membre de la communaute Linux tachez  donc  de  montrer
     l'exemple,   de   ne   participer  que  de  facon  constructive  et
     professionnelle aux forums de discussions et listes de diffusion ("
     lidies " ou "mailing lists"). N'injuriez pas vos opposants car cela
     ternira, aux yeux de certains lecteurs, la reputation de l'ensemble
     des utilisateurs de Linux.

  +o  Evitez  d'exagerer, de pousser en avant la superiorite de Linux par
     des affirmations non etayees, voire non etayables.

  +o  Une reponse pertinente s'avere utile  et  suscite  le  respect  des
     lecteurs  pour  les  opinions  de  son auteur. Elle demeure donc la
     meilleure alliee de l'avocat de Linux.

  +o  Ne mordez pas a l'hamecon  de  la  querelle  sterile.  De  nombreux
     echanges  degenerent  jusqu'aux affirmations gratuites telles que "
     mon systeme est mieux que  le  tien  ".  Contentez-vous  plutot  de
     decrire de facon precise les qualites de Linux.

  +o  N'insultez  ni  ne recouvrez de votre souverain mepris personne car
     cela ne grandira pas votre image ni celle de Linux. N'hesitez pas a
     presenter des excuses en cas d'ecart.

  +o  Traitez  plus  volontiers des qualites de Linux que des defauts des
     autres systemes.

  +o  Respectez les utilisateurs des autres systemes  car  nul  logiciel,
     pas meme Linux, n'est omnipuissant.

  +o  Designez tout produit par son nom habituel et non par une plaisante
     distorsion ou un homophone lapidaire. Nous ne pouvons guere esperer
     progresser grace a des jeux de mots.

  +o  Rendez  a  Cesar  ce  qui  lui  appartient : Linux n'est " que " le
     noyau, tous les outils annexes relevent  des  efforts  de  nombreux
     autres  individus  (GNU,  le  MIT,  Berkeley ...). Lire a ce propos
     Linux et le projet GNU  <http://www.linux-france.com/article/linux-
     et-gnu/>

  +o  Ne  tentez pas d'imposer Linux en tant que solution universelle car
     chacun doit conserver la possibilite de choisir.

  +o  Dans certains cas l'utilisation de Linux  n'est  pas  adequate,  ne
     tardez pas a le reconnaitre voire a suggerer d'autres solutions.

  11..77..  GGrroouuppeess dd''uuttiilliissaatteeuurrss

  +o  Participez  au  groupe  d'utilisateurs  local  ...  ou  fondez-le !
     Groupes connus en France (m'ecrire pour insertion dans ce  document
     !)   :   Club   des   Utilisateurs   de   Linux  Toulousains  (WEB)
     <http://excalibur.inp-fc.fr/anrtt/> Club des Utilisateurs de  Linux
     Toulousains  (contact  mail) <mailto:info@anrtt.inp-fc.fr> Provence
     Linux User Group (PLUG) <http://www.pipo.com/plug/> Consultez a  ce
     propos Groups of Linux Users <http://www.ssc.com/glue/>.

  +o  Trouvez   des  intervenants  capables  de  donner  consistance  aux
     reunions du groupe.

  +o  Informez les media locaux de vos activites.

  +o  Le groupe peut installer le systeme  employe  par  une  association
     locale.  Ne  negligez  pas  la  formation  des  utilisateurs  et la
     documentation de l'ensemble.

  +o  Trouvez de nouveaux conseils a inserer au present document.

  11..88..  RReellaattiioonnss aavveecc lleess ffoouurrnniisssseeuurrss

  +o  Avant d'acquerir un nouveau materiel demandez  systematiquement  au
     vendeur  s'il  fonctionne sous Linux et si d'autres utilisateurs de
     ce systeme s'en declarent satisfaits.

  +o  Achetez de preference aux vendeurs qui ne negligent pas Linux., par
     exemple       ceux       du       Linux       Commercial      HOWTO
     <http://sunsite.unc.edu/LDP/HOWTO/Commercial-HOWTO.html>.

  +o  Certains fournisseurs potentiels  reversent  une  partie  de  leurs
     benefices a des groupes utiles : privilegiez-les donc !  Citons :

  +o  Free Software Foundation <http://www.gnu.org/help/help.html>,

  +o  Linux              Development              Grant              Fund
     <http://www.li.org/About/Fund/Welcome.html>,

  +o  XFree86 Project <http://www.xfree86.org/donations.html>

  +o  Software          in          the          Public          Interest
     <http://www.debian.org/donations.html>.

     Il est aussi possible de leur expedier une donation.

  +o  Demandez  aux editeurs de realiser une version destinee a Linux des
     applications que vous employez par ailleurs.

  11..99..  RReellaattiioonnss aavveecc lleess mmeeddiiaa

  +o  Linux   International   rassemble   les    coupures    de    presse
     <http://www.li.org/Products/Articles/Welcome.html>  mentionnant les
     logiciels libres. Merci d'expedier en ce cas a clippings@li.org les
     informations suivantes :

  +o  Titre de l'ouvrage ou du periodique

  +o  Adresse de l'editeur

  +o  Auteur

  +o  Adresse de l'auteur

  +o  Titre de l'article

  +o  Numero de la premiere page de l'article

  +o  URL de l'article (le cas echeant)

  +o  Resume de l'article et votre opinion a son propos.

  +o  Linux  International li@li.org <mailto:li@li.org> federe le torrent
     de protestations parfois souleve par un  article  traitant  mal  de
     Linux.  Si  vous  decidez  de contacter directement l'editeur soyez
     correct, clair et precis.

  11..1100..  RReemmeerrcciieemmeennttss

  Merci a tous ceux qui contribuerent a la mise au point de ce document.
  Citons :

  Kendall G. Clark          <kclark@cmpu.net>
  Bruno H. Collovini        <buick@microlink.com.br>
  Allan "Norm" Crain        <allanc@idea-inc.com>
  Jon "maddog" Hall         <maddog@zk3.digital.com>
  Greg Hankins              <gregh@cc.gatech.edu>
  Eric Ladner               <eladner@goldinc.com>
  Chie Nakatani             <jeanne@mbox.kyoto-inet.or.jp>
  Daniel P. Kionka          <dkionka@worldtalk.com>
  Nat Makarevitch           <nat@nataa.fr.eu.org>
  Martin Michlmayr          <tbm@cyrius.com>
  Rafael Caetano dos Santos <rcaetano@dijkstra.ime.usp.br>
  Idan Shoham               <idan@m-tech.ab.ca>
  Adam Spiers               <adam.spiers@new.ox.ac.uk>
  C. J. Suire               <suire@datasync.com>
  Juhapekka Tolvanen        <juhtolv@silmu.cc.jyu.fi>
  Lars Wirzenius            <liw@iki.fi>
  Sean Woolcock             <sbwoolco@eos.ncsu.edu>

  VF : merci a _B_u_G.

  Alsa-sound-mini-HOWTO
  Valentijn Sessink
  13 Janvier 1999

  Ce document dcrit l'installation des gestionnaires sonores Alsa pour
  Linux.  Ces gestionnaires peuvent tre utiliss en remplacement des
  gestionnaires habituels, et sont entirement compatibles avec eux.
  ______________________________________________________________________

  Table des matires
























































  1. Introduction

     1.1 Remerciements
     1.2 Historique
     1.3 Nouvelles versions de ce document
     1.4 Commentaires
     1.5 Politique de distribution

  2. Avant de commencer

     2.1 Introduction
     2.2 Informations gnrales sur les gestionnaires Alsa
     2.3 Matriel support
     2.4 Autres HOWTO
        2.4.1 Cartes son
        2.4.2 Cartes Plug and Play
        2.4.3 Modules
        2.4.4 Kerneld

  3. Comment installer les gestionnaires sonores Alsa

     3.1 Ce dont vous avez besoin
     3.2 Obtenir les gestionnaires
     3.3 Extraction
     3.4 Compilation
     3.5 Prparer les priphriques

  4. Charger les gestionnaires

     4.1 Insrer avec modprobe
     4.2 Quel module pour quelle carte ?
        4.2.1 Gravis UltraSound Extreme
        4.2.2 Gravis UltraSound MAX
        4.2.3 ESS AudioDrive ES-1688 et ES-688
        4.2.4 Gravis UltraSound PnP
        4.2.5 UltraSound 32-Pro
        4.2.6 Soundblaster
        4.2.7 Soundblaster 16
        4.2.8 Yamaha OPL3-SA2/SA3
        4.2.9 S3 SonicVibes
        4.2.10 Ensoniq/Soundblaster PCI64
        4.2.11 CS4232/4232A
        4.2.12 CS4235 et suprieur
     4.3 Chargement par modprobe pour les pilotes sans dtection automatique
        4.3.1 OPL3-SA2 et OPL3-SA3
        4.3.2 CS4232 et CS4232A
        4.3.3 CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239
     4.4 Chargement par kerneld
     4.5 Compatibilit OSS

  5. Tester et utiliser

     5.1 Le systme de fichiers /proc
     5.2 Le mixer
     5.3 Les priphriques /dev/snd/
     5.4 Informations complmentaires
        5.4.1 /proc/asound/N/pcmN0
        5.4.2 /proc/asound/N/sb16

  6. Astuces et dpannage

     6.1 Dpannage : activation du gestionnaire
        6.1.1 Compatibilit des cartes son
        6.1.2 OSS/Lite ou le gestionnaire du noyau
        6.1.3 Vrifiez le rglage PnP
        6.1.4 Vos paramtres sont-ils corrects ?
        6.1.5 Essayez
        6.1.6 Lisez le fichier INSTALL.
        6.1.7 Messages de dboguage
        6.1.8 Si rien ne va plus...
     6.2 Rapports de bugs
     6.3 Astuce : utilisez les priphriques Alsa
     6.4 Astuce : retirer tous les modules


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce document explique comment installer et utiliser les gestionnaires
  sonores Alsa pour votre carte son. Les gestionnaires Alsa sont
  entirement modulariss et supportent kerneld et kmod, tout en tant
  compatibles avec l'API OSS, avec des possibilits suprieures. En deux
  mots : compatibles, mais meilleurs.


  11..11..  RReemmeerrcciieemmeennttss

  Ce document contient des informations que j'ai obtenues sur les pages
  des gestionnaires Alsa. La structure est inspire du SB-mini-HOWTO,
  principalement parce qu'il avait la structure que je recherchais.
  Grce aux SGMLTools, ce HOWTO est disponible dans plusieurs formats,
  gnrs  partir d'un seul fichier source. Merci  Erik Warmelink pour
  sa relecture, ainsi qu' Alfred Munnikes pour ses quelques questions
  et prcieuses suggestions.  Adaptation franaise par Miodrag Vallat
  <miodrag@multimania.com>.


  11..22..  HHiissttoorriiqquuee

  Version 0.1 alpha - janvier 1999, premire version, principalement
  HTML.

  Version 0.2 alpha - mi janvier 1999, premire version sgml.

  Version 0.3 beta - 20 janvier 1999. Un lien sur la page web d'Alsa.
  Nous voici officiel !

  Troisime version, moins d'erreurs.


  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  La dernire version peut tre trouve en
  http://huizen.dds.nl/~valentyn

  Yamahata Isaku a l'intention de faire une version japonaise, qui sera
  disponible sur le site japonais d'Alsa,
  http://plaza21.mbn.or.jp/ momokuri/alsa/index.html

  Si vous ralisez une traduction de ce document dans une autre langue,
  faites-le moi savoir et je rajouterai une rfrence ici.

  11..44..  CCoommmmeennttaaiirreess

  Je compte sur vous, les lecteurs, pour rendre ce HOWTO utile. Si vous
  avez des suggestions, des corrections, ou des commentaires, n'hsitez
  pas  me les envoyer (valentyn@dds.nl), et je tcherai de les inclure
  dans la prochaine version.

  Si vous publiez ce document sur CD-ROM ou sous forme imprime, un
  exemplaire serait apprci. Ecrivez-moi pour avoir mon adresse
  postale. Pensez galement  faire un don au Linux Documentation
  Project pour aider la documentation libre pour Linux. Contactez le
  coordinateur des HOWTO Linux, Tim Bynum linux-howto@sunsite.unc.edu,
  pour plus d'informations.

  11..55..  PPoolliittiiqquuee ddee ddiissttrriibbuuttiioonn

  Copyright 1998/1999 Valentijn Sessink

  Ce HOWTO est une documentation libre ; vous pouvez la redistribuer
  et/ou la modifier selon les termes de la Licence Publique Gnrale GNU
  publie par la Free Software Foundation (version 2 ou bien toute autre
  version ultrieure choisie par vous.

  Ce document est distribu car potentiellement utile, mais ssaannss aauuccuunnee
  ggaarraannttiiee, ni explicite, ni implicite, y compris les garanties de
  commercialisation ou d'adaptation dans un but spcifique. Reportez-
  vous  la Licence Publique Gnrale GNU pour plus de dtails.

  Vous pouvez obtenir une copie de la GNU General Public License en
  crivant  la Free Software Foundation, Inc., 59 Temple Place, Suite
  330, Boston, MA 02111-1307, tats-Unis.


  22..  AAvvaanntt ddee ccoommmmeenncceerr



  22..11..  IInnttrroodduuccttiioonn

  Ce document tente de vous aider  installer et  utiliser les
  gestionnaires sonores Alsa pour votre systme Linux. Le systme de
  rfrence est une distribution Slackware 3.5 tournant sur un
  ordinateur AMD/K6 (compatible x86), mais cela devrait fonctionner avec
  toute autre distribution Linux. Je ne sais pas si les pilotes Alsa
  fonctionnent sur d'autres plates-formes ; d'aprs la documentation,
  Alsa fonctionne galement sur les plates-formes Alpha. Je n'ai que des
  ordinateurs x86 ici, et toute information supplmentaire est la
  bienvenue.

  Il peut s'avrer utile de lire le Linux Sound HOWTO (cf. section
  Autres HOWTO), mais cet HOWTO ne traite que des gestionnaires du
  noyau.

  22..22..  IInnffoorrmmaattiioonnss ggnnrraalleess ssuurr lleess ggeessttiioonnnnaaiirreess AAllssaa

  Alsa a t initialement crit comme remplacement du gestionnaire
  sonore pour les cartes Gravis UltraSound (GUS). Il a volu vers un
  gestionnaire gnrique pour plusieurs cartes sonores, avec une
  conception entirement modulaire.

  Alsa est compatible avec les gestionnaires sonores OSS/Free et
  OSS/Linux (les gestionnaires du noyau), mais dispose de sa propre
  interface qui est encore meilleure que celle de l'OSS. Une liste des
  fonctionnalits se trouve en http://alsa.jcu.cz/intro.html

  La page Web du projet Alsa se trouve en http://alsa.jcu.cz/

  22..33..  MMaattrriieell ssuuppppoorrtt

  Les gestionnaires Alsa ne supportent qu'un sous-ensemble des cartes
  sonores existantes. Au moment de la rdaction de ce document, les
  cartes suivantes sont supportes :

    Gravis Ultrasound (GUS) : "PnP", Extreme, Classic/ACE, MAX

    cartes  base de chipset GUS : Dynasonic 3-D, STB Sound Rage 32,
     UltraSound 32-Pro (STB)

    Soundblaster : 1.0, 2.0, Pro, 16/AWE, PCI64

    ESS AudioDrive ESx688

    Yamaha : chipsets OPL3-SA2, OPL3-SA3

    OAK Mozart

    Schubert 32 PCI (PINE, chipset S3 SonicVibes PCI)

    Ensoniq AudioPCI ES1370/1371 PCI (Soundblaster PCI64)

    SonicVibes PCI (PINE Schubert 32 PCI)

     Un grand nombre de cartes  base de Crystal Semiconductors sont
     galement supportes. Ces chips se trouvent dans bon nombre de
     matriels, sous forme de carte spare (certaines cartes Philips
     PCA) ou sur les cartes mres (IBM Aptive, ordinateurs Dell). Les
     cartes utilisant les chipsets suivants sont supportes :

    4232

    4232A

    4235

    4236B

    4237B

    4238B

     Une liste plus rcente se trouve dans les sources du gestionnaire
     lui-mme,  savoir dans doc/SOUNDCARDS

  22..44..  AAuuttrreess HHOOWWTTOO

  Cet Alsa-sound-mini-HOWTO n'est qu'un mini-HOWTO. D'autres HOWTO
  peuvent vous aider quand celui-ci est trop concis. J'en indiquerai
  quelques-uns en essayant d'installer les gestionnaires Alsa. Les HOWTO
  se trouvent en gnral sur les miroirs de metalab (ex sunsite). Allez
  donc voir sur http://sunsite.unc.edu/LDP/mirrors.html quel est votre
  miroir le plus proche. Vous trouverez les HOWTO dans le rpertoire
  LDP/HOWTO/.  Notez que les liens dans ce document sont tous relatifs 
  /LDP/HOWTO/mini.  Si vous consultez ce document depuis un miroir
  suffisamment convenable, vous trouverez les HOWTO indiqus.

  22..44..11..  CCaarrtteess ssoonn

  Vous venez d'acheter une carte son, ou elle se trouve dj enferme
  dans votre ordinateur depuis des lustres. Et maintenant vous allez
  vous en servir ! Allez voir le Sound-HOWTO pour voir si cela en vaut
  la peine (Vous prfrerez peut-tre acheter d'abord cette nouvelle
  Mega-Rumble-Blaster, puis essayer les gestionnaires Alsa).

  22..44..22..  CCaarrtteess PPlluugg aanndd PPllaayy

  La plupart des cartes son modernes pour la plateforme Intel sont des
  cartes ISA PnP, une abrviation de ''Plug and Play''. Cela signifie
  que la carte doit tre configure par le systme d'exploitation, via
  une routine d'initialisation au dmarrage. Vous allez sans doute
  devoir configurer votre carte avec le paquetage PnP-utils. Toutes les
  distributions Linux suffisamment rcentes l'incluent. Pour vous en
  servir, jetez donc un oeil au Plug-and-Play-HOWTO.

  22..44..33..  MMoodduulleess

  Les gestionnaires Alsa sont construits comme des modules. Vous pouvez
  trouver plus d'informations sur les modules dans le Kernel-HOWTO. Il
  existe aussi un module-HOWTO, mais il n'est plus maintenu  l'heure
  actuelle ; consultez la section 'unmaintained' du Howto-HOWTO. Il
  existe aussi un Modules-mini-HOWTO qui peut tre utile.

  22..44..44..  KKeerrnneelldd

  Un autre HOWTO qui peut tre utile  certains est le Kerneld-mini-
  HOWTO. Kerneld est un daemon qui installe et retire les modules du
  noyau quand c'est ncessaire. (Je n'en ai aucune exprience, donc
  toute information  ce sujet est la bienvenue. La documentation des
  gestionnaires Alsa contient quelques informations sur la configuration
  de kerneld, qui ont t ajoutes  ce mini-HOWTO).


  33..  CCoommmmeenntt iinnssttaalllleerr lleess ggeessttiioonnnnaaiirreess ssoonnoorreess AAllssaa



  33..11..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn



    un systme Linux en tat de fonctionnement (par exemple une
     distribution Slackware), avec les paquetages de dveloppement
     installs (i.e. gcc, make, etc.) ;

    une carte son supporte ;

    un minimum de connaissance de Linux (savoir utiliser "ls", "cd",
     "tar", etc.) ;

    l'accs au compte administrateur (root) ;

     Si vous avez une carte PnP, vous aurez galement besoin :

    du paquetage isapnptools.

     Le texte INSTALL dans le rpertoire des gestionnaires laisse
     supposer que pour certaines cartes, le support PnP est intgr.
     J'ai aussi reu une note de Jaroslav  ce sujet. Quand j'aurai plus
     d'informations  ce sujet, je les ajouterai  ce mini-HOWTO.

  Notez que vous ne devez pas avoir le moindre gestionnaire sonore actif
  quand vous voulez utiliser les gestionnaires Alsa. Si votre noyau est
  compil avec les gestionnaires sonores "en dur", vous devrez le
  recompiler. Si vous avez le vieux module "sound.o" actif, vous devez
  le dsactiver. Les systmes RedHat rcents ont une configuration du
  son diffrente, avec plusieurs modules actifs.  Vous devrez tous les
  dsactiver.


  33..22..  OObbtteenniirr lleess ggeessttiioonnnnaaiirreess

  Les gestionnaires Alsa sont disponibles en ftp://alsa.jcu.cz/pub/, et
  il en existe un miroir en ftp://linux.a2000.nl/alsa. Pour une
  installation Alsa totalement fonctionnelle, il vous faut les
  gestionnaires, la bibliothque et les utilitaires ; par exemple, si
  vous avez choisi le miroir, vous allez rcuprer
  ftp://linux.a2000.nl/alsa/driver/alsa-driver-0.2.0-pre10p3.tar.gz,
  ftp://linux.a2000.nl/alsa/lib/alsa-lib-0.3.0pre2.tar.gz et
  ftp://linux.a2000.nl/alsa/utils/ alsa-utils-0.0.8.tar.gz (et NON il ne
  s'agit pas de liens complets, vous feriez mieux d'aller voir sur place
  s'il y a de nouvelles versions disponibles. Il vous suffit de
  rcuprer la dernire).

  33..33..  EExxttrraaccttiioonn

  Vous devez extraire les sources des gestionnaires par toute commande
  raisonnable, comme le bon vieux tar -zxf <fichier>. Pour les dbutants
  et les amnsiques :


       cd /usr/src
       tar -zxf ~/alsa-driver-0.2.0-pre10p3.tar.gz




  (Si cela a fonctionn, soit vous tes dj logu en root, ce qui est
  une mauvaise ide -- arrtez votre lecture et allez consulter le
  DOS/Win95-to-Linux-HOWTO --, soit vous avez dj pens qu'il
  s'agissait du genre de tche ncessitant les privilges
  administrateur. Donc : il vous faut les privilges root, tapez "su"
  puis le mot de passe).


       tar -zxf ~/alsa-lib-0.3.0pre2.tar.gz
       tar -zxf ~/alsa-utils-0.0.8.tar.gz




  Egalement utilisable et plus amusant : find ~ -name alsa* -exec tar
  -zxf {} \; (Pas la peine d'essayer a, c'est juste un exemple). Notez
  que si vous tlchargez les gestionnaires avec Netscape, vous risquez
  de rcuprer les gestionnaires dcompacts avec l'extension ".tgz". Si
  tar se plaint du format de fichier, vous obtiendrez peut-tre de
  meilleurs rsultats en retirant la lettre "z" des options de tar.

  33..44..  CCoommppiillaattiioonn

  Vous devez compiler les gestionnaires avant de pouvoir compiler et
  utiliser la bibliothque. Vous avez besoin de compiler la bibliothque
  avant de pouvoir compiler et utiliser les utilitaires. Commenons :


       cd alsa-driver-0.2.0-pre10p3
       ./configure
       make




  Maintenant vous avez besoin d'tre 'root' pour installer tout a (mais
  vous l'tiez peut-tre dj)


       make install




  Au tour de la bibliothque :



  cd ../alsa-lib-0.3.0
  ./configure
  make
  make install




  Vous avez compris le truc ? Alors pour les utilitaires :


       cd ../alsa-utils-0.0.8
       ./configure
       make
       make install




  Note : vous pouvez laisser de ct le "make install" des utilitaires
  pour l'instant. Vous pouvez mme laisser tomber la compilation de la
  bibliothque et des utilitaires, pour voir tout de suite si les
  gestionnaires fonctionnent.

  33..55..  PPrrppaarreerr lleess pprriipphhrriiqquueess

  Il y a un script dans le rpertoire des gestionnaires qui va installer
  les fichiers de priphriques Alsa dans votre rpertoire /dev. Lancez


       ./snddevices




  dans le rpertoire alsa-driver. Il devrait y avoir un rpertoire
  /dev/snd maintenant (vrifiez sa prsence. Si vous n'tes pas assez
  familier avec la commande "ls", allez plutt consulter d'autres HOWTO
  avant. Vous devez avoir un minimum de connaissances de Linux pour
  installer ces pilotes).

  Maintenant vous tes prt  insrer les gestionnaires, alors jetez-
  vous donc sur le paragraphe qui suit.

  44..  CChhaarrggeerr lleess ggeessttiioonnnnaaiirreess

  Il existe deux faons d'utiliser les modules Alsa. Je prfre
  personnellement utiliser la mthode manuelle,  savoir insrer le
  gestionnaire au dmarrage.  Les gestionnaires Alsa sont conus pour
  tre chargeables et dchargeables  volont -- par exemple ils ne
  rinitialisent pas le mixer au chargement -- donc vous pouvez
  facilement utiliser l'approche kerneld.

  44..11..  IInnssrreerr aavveecc mmooddpprroobbee

  Note : si vous avez une carte son PnP, vous devez tout d'abord la
  configurer aux bons IO/IRQ/DMA (ou au moins  des valeurs connues).
  Consultez le Plug-and-Play-HOWTO. Avez-vous configur votre carte
  PnP ? Bien, alors poursuivons. Le plus dur est de faire "modprobe
  snd-<carte son>". Cela devrait faire l'affaire. Notez que toutes les
  distributions ne mettent pas /sbin dans le PATH. Si vous obtenez
  "bash: modprobe: command not found", cela signifie probablement que
  modprobe n'est pas dans votre path. Essayez "/sbin/modprobe snd-sb16",
  ou tchez de trouver l'utilitaire modprobe quelque part.


  La plus grosse difficult vient des chipsets Crystal, que les
  gestionnaires Alsa ne dtectent pas automatiquement. Des informations
  plus rcentes peuvent tre trouves dans le fichier INSTALL du
  rpertoire alsa-driver. Deux exemples, puis une liste :

  Gravis UltraSound (GUS) et compatibles :


       /sbin/modprobe snd-gusclassic




  Pour toutes les cartes 16 bit compatibles Soundblaster (SoundBlaster
  16 (PnP), SoundBlaster AWE 32 (PnP), SoundBlaster AWE 64 PnP) :


       /sbin/modprobe snd-sb16





  44..22..  QQuueell mmoodduullee ppoouurr qquueellllee ccaarrttee ??



  44..22..11..  GGrraavviiss UUllttrraaSSoouunndd EExxttrreemmee

  modprobe snd-gusextreme


  44..22..22..  GGrraavviiss UUllttrraaSSoouunndd MMAAXX

  modprobe snd-gusmax


  44..22..33..  EESSSS AAuuddiiooDDrriivvee EESS--11668888 eett EESS--668888

  modprobe snd-audiodrive1688


  44..22..44..  GGrraavviiss UUllttrraaSSoouunndd PPnnPP

  Gravis UltraSound PnP, Dynasonic 3-D/Pro, STB Sound Rage 32 et toute
  autre carte son base sur un chipset AMD InterWave (tm).  modprobe
  snd-interwave


  44..22..55..  UUllttrraaSSoouunndd 3322--PPrroo

  UltraSound 32-Pro (carte produite par STB, utilise par Compaq) et
  toute autre carte son base sur un chipset AMD InterWave (tm) avec un
  circuit TEA6330T pour un contrle tendu des volumes grave, aigu et
  principal.  modprobe snd-interwave-stb


  44..22..66..  SSoouunnddbbllaasstteerr

  Cartes Soundblaster 8 bits (SoundBlaster 1.0, SoundBlaster 2.0,
  SoundBlaster Pro) modprobe snd-sb8





  44..22..77..  SSoouunnddbbllaasstteerr 1166

  Cartes SoundBlaster 16 bits (SoundBlaster 16 (PnP), SoundBlaster AWE
  32 (PnP), SoundBlaster AWE 64 PnP. Attention, ce module ne supporte
  pas la carte SoundBlaster VibraX16.  modprobe snd-sb16


  44..22..88..  YYaammaahhaa OOPPLL33--SSAA22//SSAA33

  Un "modprobe snd-opl3sa" ne fonctionnera pas, ce gestionnaire ne
  faisant pas de dtection automatique. Voyez plus loin.


  44..22..99..  SS33 SSoonniiccVViibbeess

  Cartes S3 SonicVibes PCI (PINE Schubert 32 PCI).  modprobe snd-
  sonicvibes


  44..22..1100..  EEnnssoonniiqq//SSoouunnddbbllaasstteerr PPCCII6644

  Cartes Ensoniq AudioPCI ES1370/1371 PCI (SoundBlaster PCI 64) modprobe
  snd-audiopci


  44..22..1111..  CCSS44223322//44223322AA

  Toutes les cartes  base de chipset CS4232/CS4232A.  Un "modprobe snd-
  card-cs4232" ne fonctionnera pas, ce gestionnaire ne faisant pas de
  dtection automatique. Voyez plus loin.


  44..22..1122..  CCSS44223355 eett ssuupprriieeuurr

  Toutes les cartes  base de chipset
  CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239. Un "modprobe snd-card-
  cs4236" ne fonctionnera pas, ce gestionnaire ne faisant pas de
  dtection automatique.  Voyez plus loin.


  44..33..  CChhaarrggeemmeenntt ppaarr mmooddpprroobbee ppoouurr lleess ppiillootteess ssaannss ddtteeccttiioonn aauuttoommaa
  ttiiqquuee

  Si vous avez un gestionnaire n'effectuant pas de dtection
  automatique, vous devez fournir des informations supplmentaires pour
  que le gestionnaire fonctionne. Vous pourrez trouver plus
  d'informations dans le fichier INSTALL du rpertoire alsa-driver.

  44..33..11..  OOPPLL33--SSAA22 eett OOPPLL33--SSAA33

  D'aprs le fichier INSTALL, vous devez fournir toutes les informations
  suivantes pour ce gestionnaire. Si vous avez initialis la carte avec
  les isapnptools, vous pouvez probablement trouver ces informations
  dans le fichier /etc/isapnp.conf :


       snd_port - port de contrle de l'OPL3-SA
       snd_wss_port - port WSS de l'OPL3-SA (0x530,0xe80,0xf40,0x604)
       snd_midi_port - port de l'UART MPU-401 (0x300,0x330), -1 pour dsactiver
       snd_fm_port - port FM de l'OPL3-SA (0x388), -1 pour dsactiver
       snd_irq - IRQ de l'OPL3-SA (5,7,9,10)
       snd_dma1 - canal DMA 1 de l'OPL3-SA (0,1,3)
       snd_dma1_size - taille de la mmoire tampon du DMA 1 en Ko (4-64Ko)
       snd_dma2 - canal DMA 2 de l'OPL3-SA (0,1,3), -1 si aucun
       snd_dma2_size - taille de la mmoire tampon du DMA 2 en Ko (4-64Ko)

  Lancez un "modprobe snd-opl3sa snd_port=0xNNN snd_wss_port=0x530
  snd_midi_port=-1 snd_fm_port=0x388 snd_irq=5 snd_dma1=0
  snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" pour charger ce gestion
  naire (sans support midi). Je reste convaincu que le support midi
  n'est ncessaire que pour connecter des synthtiseurs etc.  une
  machine Linux. Je n'ai jamais eu besoin du support midi, mme pour
  jouer des fichiers midi).

  Notez que les valeurs "NN" doivent tre prcises, mais je ne sais pas
  quelles valeurs sont les plus raisonnables. Je ne sais d'ailleurs pas
  si la spcification d'une taille DMA est rellement ncessaire.

  44..33..22..  CCSS44223322 eett CCSS44223322AA

  D'aprs le fichier INSTALL, vous devez fournir le port de la carte.
  Cependant, pour ce gestionnaire et le suivant, il m'a fallu fournir
  toutes les informations ( l'exception des tailles DMA) pour que le
  gestionnaire fonctionne.  Si vous avez initialis la carte avec les
  isapnptools, vous pouvez probablement trouver ces informations dans le
  fichier /etc/isapnp.conf :


       snd_port - port du CS4232 (PnP, par dfaut 0x534)
       snd_cport - port de contrle du CS4232 chip (PnP, par dfaut 0x120)
       snd_mpu_port - port de l'UART MPU-401 (PnP, par dfaut 0x300), -1 pour dsactiver
       snd_fm_port - port FM du CS4232 (PnP, par dfaut 0x388), -1 pour dsactiver
       snd_jport - port manette de jeu du CS4232 (PnP, par dfaut 0x200), -1 pour dsactiver
       snd_irq - IRQ du CS4232 (5,7,9,11,12,15)
       snd_mpu_irq - IRQ de l'UART MPU-401 (9,11,12,15)
       snd_dma1 - canal DMA 1 du CS4232 (0,1,3)
       snd_dma1_size - taille de la mmoire tampon du DMA 1 en Ko (4-64Ko)
       snd_dma2 - canal DMA 2 du CS4232 (0,1,3), -1 si aucun
       snd_dma2_size - taille de la mmoire tampon du DMA 2 en Ko (4-64Ko)




  Lancez un "modprobe snd-card-cs4232 snd_port=0x534 snd_cport=0x120
  snd_mpu_port=-1 snd_fm_port=0x388 snd_jport=-1 snd_irq=5 snd_dma1=0
  snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" pour charger ce gestion
  naire pour une carte configure avec ses valeurs par dfaut (sans le
  support midi, cf la note pour l'OPL-3, ni le support manette de jeu).
  Si vous utilisez d'autres valeurs dans /etc/isapnp.conf, reportez-les
  ici aussi.

  Notez que les valeurs "NN" doivent tre prcises, mais je ne sais pas
  quelles valeurs sont les plus raisonnables. Je ne sais d'ailleurs pas
  si la spcification d'une taille DMA est rellement ncessaire.

  44..33..33..  CCSS44223355//CCSS44223366//CCSS44223366BB//CCSS44223377BB//CCSS44223388BB//CCSS44223399

  D'aprs le fichier INSTALL, vous devez fournir le port de la carte.
  Cependant, pour une carte  base de CS4237B, il m'a fallu fournir
  toutes les informations ( l'exception des tailles DMA) pour que le
  gestionnaire fonctionne.  Si vous avez initialis la carte avec les
  isapnptools, vous pouvez probablement trouver ces informations dans le
  fichier /etc/isapnp.conf :









  snd_port - port du CS423x (PnP, par dfaut 0x534)
  snd_cport - port de contrle du CS423x (PnP, par dfaut 0x120)
  snd_mpu_port - port de l'UART MPU-401 (PnP, par dfaut 0x300), -1 pour dsactiver
  snd_fm_port - port FM du CS4232 (PnP, par dfaut 0x388), -1 pour dsactiver
  snd_jport - port manette de jeu du CS423x (PnP, par dfaut 0x200), -1 pour dsactiver
  snd_irq - IRQ du CS423x (5,7,9,11,12,15)
  snd_mpu_irq - IRQ de l'UART MPU-401 (9,11,12,15)
  snd_dma1 - canal DMA 1 du CS423x (0,1,3)
  snd_dma1_size - taille de la mmoire tampon du DMA 1 en Ko (4-64Ko)
  snd_dma2 - canal DMA 2 du CS423x (0,1,3), -1 si aucun
  snd_dma2_size - taille de la mmoire tampon du DMA 2 en Ko (4-64Ko)




  Lancez un "modprobe snd-card-cs4232 snd_port=0x534 snd_cport=0x120
  snd_mpu_port=-1 snd_fm_port=0x388 snd_jport=-1 snd_irq=5 snd_dma1=0
  snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" pour charger ce gestion
  naire pour une carte configure avec ses valeurs par dfaut (sans le
  support midi, cf la note pour l'OPL-3, ni le support manette de jeu).
  Notes :

    les valeurs "NN" doivent tre prcises, mais je ne sais pas
     quelles valeurs sont les plus raisonnables ;

    mon CS4237B fonctionne parfaitement sans utiliser les options de
     taille DMA.

  44..44..  CChhaarrggeemmeenntt ppaarr kkeerrnneelldd

  kerneld est un daemon qui charge les modules chaque fois que
  ncessaire, et les dcharge quand ils ne sont plus utiliss. N'ayant
  aucune exprience de kerneld, je ne sais pas si les renseignements que
  je donne ici sont fiables. Ils proviennent du fichier INSTALL des
  gestionnaires Alsa. Une excellente source d'informations sur kerneld
  est le Kerneld-mini-HOWTO.

  Procdez ainsi :

    Modifiez votre /etc/conf.modules (des exemples sont donns plus
     loin) ;

    Lancez 'modprobe snd-carte' o carte est le nom de votre carte.
     [Ce que je trouve tonnant, vu que kerneld est cens le charger
     lui-mme ?  VS]

     Exemple de /etc/conf.modules pour une carte Gravis UltraSound PnP :


       alias char-major-14 snd
       alias snd-minor-oss-0 snd-interwave
       alias snd-minor-oss-3 snd-pcm1-oss
       alias snd-minor-oss-4 snd-pcm1-oss
       alias snd-minor-oss-5 snd-pcm1-oss
       alias snd-minor-oss-12 snd-pcm1-oss
       alias snd-card-0 snd-interwave
       options snd snd_major=14 snd_cards_limit=1
       options snd-interwave snd_index=1 snd_id="guspnp" snd_port=0x220 snd_irq=5
       snd_dma1=5 snd_dma2=6




  Exemple pour utiliser plus d'une carte son sur votre machine (ici pour
  une Sound Blaster 16 et une Gravis UltraSound Classic) :

  alias char-major-14 snd
  alias snd-minor-oss-0 snd-mixer
  alias snd-minor-oss-3 snd-pcm1-oss
  alias snd-minor-oss-4 snd-pcm1-oss
  alias snd-minor-oss-5 snd-pcm1-oss
  alias snd-minor-oss-12 snd-pcm1-oss
  alias snd-card-0 snd-sb16
  alias snd-card-1 snd-gusclassic
  options snd snd_major=14 snd_cards_limit=2
  options snd-sb16 snd_index=1 snd_port=0x220 snd_irq=5 snd_dma8=1 snd_dma16=5
  options snd-gusclassic snd_index=2 snd_irq=11 snd_dma1=6 snd_dma2=7




  Exemple si deux cartes Gravis UltraSound Classic sont installes :


       alias char-major-14 snd
       alias snd-minor-oss-0 snd-mixer
       alias snd-minor-oss-3 snd-pcm1-oss
       alias snd-minor-oss-4 snd-pcm1-oss
       alias snd-minor-oss-5 snd-pcm1-oss
       alias snd-minor-oss-12 snd-pcm1-oss
       alias snd-card-0 snd-gusclassic
       alias snd-card-1 snd-gusclassic
       options snd snd_major=14 snd_cards_limit=2
       options snd-gusclassic snd_index=1,2 snd_port=0x220,0x260 snd_irq=5,11
       snd_dma1=5,6 snd_dma2=7,3





  44..55..  CCoommppaattiibbiilliitt OOSSSS

  Si vous souhaitez avoir une compatibilit avec OSS/Free ou OSS/Linux,
  il vous faut charger un gestionnaire de plus : le gestionnaire de
  compatibilit snd-pcm1-oss. Lancez


       modprobe snd-pcm1-oss




  Cela vous donnera le support de /dev/audio et /dev/dsp, comme le font
  les gestionnaires OSS/Free (ceux du noyau) et OSS/Linux (ceux vendus
  sparment).  Notez qu'il ne s'agit que d'une mulation.


  55..  TTeesstteerr eett uuttiilliisseerr

  Maintenant vous tes prt  tester si le gestionnaire sonore est
  rellement disponible, avant de l'utiliser.

  55..11..  LLee ssyyssttmmee ddee ffiicchhiieerrss //pprroocc

  Vous pouvez trouver beaucoup de renseignements sur votre systme dans
  le rpertoire /proc. /proc est un systme de fichiers "virtuel", ce
  qui signifie qu'il n'existe pas rellement, mais fournit grosso modo
  une vue sur les processus de votre ordinateur. Pour que /proc soit
  accessible, votre noyau doit tre compil avec le support de /proc, ce
  qui est le cas dans la plupart des distributions, mais si vous avez
  compil votre propre noyau sans /proc, vous n'aurez rien dans /proc.

  /proc/modules recense les modules chargs. Une fois les gestionnaires
  Alsa chargs, en tapant cat /proc/modules vous devriez avoir quelque
  chose de ce genre :


       snd-pcm1-oss      4            0
       snd-sb16          1            1
       snd-sb-dsp        4    [snd-sb16]      0
       snd-pcm1          4    [snd-pcm1-oss snd-sb-dsp]      0
       snd-pcm           3    [snd-pcm1-oss snd-sb16 snd-sb-dsp snd-pcm1]    0
       snd-mixer         3    [snd-pcm1-oss snd-sb16 snd-sb-dsp]      1
       snd-mpu401-uart   1    [snd-sb16]      0
       snd-midi          4    [snd-sb16 snd-sb-dsp snd-mpu401-uart]   0
       snd-opl3          1    [snd-sb16]      0
       snd-synth         1    [snd-sb16 snd-opl3]     0
       snd-timer         1    [snd-opl3]      0
       snd               8    [snd-pcm1-oss snd-sb16 snd-sb-dsp snd-pcm1 snd-pcm snd-mixer snd-mpu401-uart snd-midi snd-opl3 snd-synth snd-timer]    0




  Si quelque chose s'est mal pass pendant l'installation du gestion
  naire, vous aurez quand mme quelques gestionnaires "snd", mais pas de
  support audio.

  Par exemple (note : ne vous amusez surtout pas  entrer les commandes
  suivantes, le gestionnaire cs4236 a besoin de paramtres) :


       win3:~# modprobe snd-card-cs4236
       /lib/modules/2.0.35/misc/snd-card-cs4236.o: init_module: Device or resource busy
       snd-mixer: Device or resource busy
       win3:~# cat /proc/modules
       snd-cs4236        2           0
       snd-cs4231        3    [snd-cs4236]    0
       snd-timer         1    [snd-cs4231]    0
       snd-pcm1          4    [snd-cs4236 snd-cs4231] 0
       snd-mixer         3    [snd-cs4236 snd-cs4231] 0
       snd-pcm           3    [snd-cs4236 snd-cs4231 snd-pcm1]       0
       snd-mpu401-uart   1           0
       snd-midi          4    [snd-mpu401-uart]       0
       snd-opl3          1           0
       snd-synth         1    [snd-opl3]      0
       snd-timer         1    [snd-cs4231 snd-opl3]   0
       snd               8    [snd-cs4231 snd-timer snd-pcm1 snd-mixer snd-pcm]     0




  Vous pouvez vrifier l'existence d'une carte son en regardant
  /proc/asound/cards.  Par exemple :


       bash$ cat /proc/asound/cards
       0 [card1          : SB16 - Sound Blaster 16
                           Sound Blaster 16 at 0x220, irq 5, dma 1&5




  Dans l'exemple prcdent (o j'ai oubli les options) l'affichage
  aurait t :




  win3:~# cat /proc/asound/cards
  --- no soundcards ---




  Une carte CS4236 fonctionnelle donnerait


       0 [card1         ]: CS4236 - CS4237B
                           CS4237B at 0x534, irq 7, dma 1&0




  Si vous avez beau vrifier et revrifier vos rglages et que vous
  n'avez toujours rien, allez faire un tour dans la section dpannage.

  Le rpertoire virtuel /proc/asound fournit beaucoup d'autres
  renseignements sur le gestionnaire. Notez cependant que /proc/asound
  n'existera qu'une fois le premier module Alsa charg. S'il n'y a pas
  de /proc/asound, cela signifie simplement que le module snd n'a pas
  t charg convenablement.  Vous pouvez trouver la liste des cartes
  installes dans /proc/asound/cards, puis des renseignements sur la
  premire dans /proc/asound/0, sur la suivante dans /proc/asound/1,
  etc.

  Il existe une troisime faon d'obtenir des renseignements sur les
  gestionnaires sonores, si vous avez charg le module de compatibilit
  OSS,  savoir le priphrique /dev/sndstat. Le paquetage Alsa vous
  demande gentiment de ne pas vous fier  cette source d'informations,
  car elle n'est l que pour la compatibilit avec les gestionnaires
  OSS, et de meilleurs renseignements sont disponibles via /proc/asound.

  55..22..  LLee mmiixxeerr

  Une fois les gestionnaires de votre carte son installs, comme vous
  l'indique /proc, vous pouvez essayer de faire du bruit. Tout d'abord,
  installez le paquetage d'utilitaires, ou, tout au moins, placez la
  commande "amixer"  un endroit raisonnable (comme /usr/local/bin).
  Commencez par examiner les rglages du mixer en lanant "amixer". Le
  rsultat peut varier normment d'une carte  l'autre. Ma Soundblaster
  16 donne :


       Master         0  % (-14.00dB) : 0  % (-14.00dB)
       Bass           0  % (-14.00dB) : 0  % (-14.00dB)
       Treble         0  % (-14.00dB) : 0  % (-14.00dB)
       Synth          0  % (-62.00dB) : 0  % (-62.00dB)
       PCM            0  % (-62.00dB) : 0  % (-62.00dB)
       Line-In        0  % (-62.00dB) : 0  % (-62.00dB) Mute
       MIC            0  % (-62.00dB) : 0  % (-62.00dB) Mute
       CD             0  % (-62.00dB) : 0  % (-62.00dB) Mute
       In-Gain        0  % (-18.00dB) : 0  % (-18.00dB)
       Out-Gain       0  % (-18.00dB) : 0  % (-18.00dB)
       PC Speaker     0  % (-18.00dB) : 0  % (-18.00dB)




  Ma carte son  base de Crystal 4237B a beaucoup d'autres options :





  Master D       0  % (-22.00dB) : 0  % (-22.00dB) Mute
  3D Center      0  % (-22.50dB) : 0  % (-22.50dB)
  3D Space       0  % (-22.50dB) : 0  % (-22.50dB) Mute
  Synth          0  % (-94.50dB) : 0  % (-94.50dB) Mute
  FM             0  % (-94.50dB) : 0  % (-94.50dB) Mute
  DSP            0  % (-94.50dB) : 0  % (-94.50dB) Mute
  PCM            0  % (-94.50dB) : 0  % (-94.50dB) Mute
  Line-In        0  % (-34.50dB) : 0  % (-34.50dB) Mute
  MIC            0  % (-22.50dB) : 0  % (-22.50dB) Mute
  CD             0  % (-34.50dB) : 0  % (-34.50dB) Mute
  Record-Gain    0  % (  0.00dB) : 0  % (  0.00dB)
  In-Gain        0  % (-18.00dB) : 0  % (-18.00dB)
  Loopback       0  % (-94.50dB) : 0  % (-94.50dB) Mute
  Mono           0  % (-45.00dB) : 0  % (-45.00dB) Mute
  Aux A          0  % (-34.50dB) : 0  % (-34.50dB) Mute




  Vous aurez remarqu les indications Mute (Muet), y compris pour le
  canal principal du CS4237B ! Pour le CS4237B, il me faut lancer amixer
  "master d" unmute pour pouvoir entendre le moindre son. La sound
  blaster n'a pas de sortie en sourdine, mais amixer master 100 unmute
  rglerait le volume  100% et ractiverait le canal principal. Vous
  pouvez utiliser un nombre, un des mots mute et unmute, ou les deux.
  Lancez amixer "master d" 100 ; amixer pcm 100 unmute pour rgler le
  volume principal du CS4237B au maximum, activer le canal PCM et rgler
  son volume au maximum.

  Vous pouvez rgler le canal CD en enregistrement en entrant amixer cd
  rectt puis le remettre en lecture avec amixer cd norec.  Si vous
  prfrez enregistrer depuis un micro, vous devrez probablement
  utiliser amixer record-gain 100 ; amixer mic 100 rec mute (ne pas
  mettre l'entre micro en sourdine produit des parasites si le micro
  capte son propre signal par les haut-parleurs).  Malheureusement, je
  n'ai pas pu modifier le rglage des canaux "3d center" et "3d space"
  avec amixer. Si quelqu'un y parvient, faites-le moi savoir. Vous
  pouvez cependant utiliser alsamixer pour cela.

  La FAQ Alsa prtend qu'il est possible de restaurer les rglages du
  mixer avec cat <fichier> > /proc/asound/N/mixer0, o <ficher contient
  une prcdente copie de /proc/asound/N/mixer0. Je n'ai pas pu le faire
  sur mon systme, il se plaint de priphriques non existants.

  55..33..  LLeess pprriipphhrriiqquueess //ddeevv//ssnndd//

  Les gestionnaires Alsa ont des priphriques associs dans le
  rpertoire /dev/snd.  Si vous avez une carte, vous aurez les
  priphriques suivants :


       /dev/snd/pcm00 - la sortie PCM de la carte0
       /dev/snd/mixer0 - le mixer de la carte 0
       /dev/snd/control0 - le contrleur de la carte 0




  Le premier chiffre est le numro de la carte son, le deuxime (s'il y
  a lieu) tant le numro du priphrique. Une carte son ayant deux sor
  ties PCM aurait pcm00 et pcm01.

  Maintenant, vous tes prt  envoyer un fichier son dans la sortie PCM
  de la premire carte. Essayez de copier n'importe quel fichier texte
  dans /dev/snd/pcm00 ainsi : cat <fichier > /dev/snd/pcm00. Le fichier
  peut tre quelconque, pourvu qu'il ne soit pas de longueur nulle. Si
  vous avez un fichier son qui trane quelque part, vous pouvez
  l'essayer. Vous pouvez aussi rcuprer le fichier en
  http://www.ldp.org/sounds/english.au, pour entendre Linus Torvalds
  expliquer comment prononcer Linux.

  La configuration par dfaut de votre priphrique sonore est 8000 Hz,
  8 bits.  Ce qui signifie que le fichier "english.au" mentionn plus
  haut gnrera de la voix, tandis que les autres fichier gnreront
  probablement des parasites.  Si vous n'entendez rien, vrifiez vos
  haut-parleurs, essayez de relancer amixer ou consultez un mdecin.
  (Plus loin vous pourrez utiliser les fonctionnalits 48 kHz, 16 bit de
  votre carte son avec votre programme audio prfr, comme sox ou
  mpg123).

  Si vous avez charg le module "snd-pcm1-oss", vous pouvez galement
  utiliser la compatibilit OSS pour accder  votre carte son. Les
  correspondances suivantes sont alors effectues :


       /dev/snd/pcm00 -> /dev/audio0 (/dev/audio) -> numro mineur 4
       /dev/snd/pcm00 -> /dev/dsp0 (/dev/dsp) -> numro mineur 3
       /dev/snd/pcm01 -> /dev/adsp0 (/dev/adsp) -> numro mineur 12
       /dev/snd/pcm10 -> /dev/audio1 -> numro mineur 4+16 = 20
       /dev/snd/pcm10 -> /dev/dsp1 -> numro mineur 3+16 = 19
       /dev/snd/pcm11 -> /dev/adsp1 -> numro mineur 12+16 = 28
       /dev/snd/pcm20 -> /dev/audio2 -> numro mineur 4+32 = 36
       /dev/snd/pcm20 -> /dev/dsp2 -> numro mineur 3+32 = 39
       /dev/snd/pcm21 -> /dev/adsp2 -> numro mineur 12+32 = 44





  55..44..  IInnffoorrmmaattiioonnss ccoommppllmmeennttaaiirreess

  Le fichier INSTALL des gestionnaires Alsa mentionne quelques trucs et
  astuces pour indiquer leurs rglages aux gestionnaires. Leur utilit
  dpend des applications sonores dont vous vous servez. Les
  applications classiques, comme mpg123, sox (gnralement utilis par
  la commande play), ou RealPlayer, fonctionneront probablement
  parfaitement sans avoir recours  ces astuces.  Je n'en ai jamais eu
  besoin personnellement.

  55..44..11..  //pprroocc//aassoouunndd//NN//ppccmmNN00




       "Playback erase" - efface toutes les informations sur les applications OSS
       "Playback <application> <nombre de fragments> <taille des fragments> [<options>]"
       "Record erase" - efface toutes les informations sur les applications OSS
       "Record <application> <nombre de fragments> <taille des fragments> [<options>]"




  application - nom de l'application (avec ou sans chemin complet).

  nombre de fragments - nombre de fragments, ou zro pour laisser le
  choix  Alsa.

  taille des fragmentstt> - taille des fragments en octets, ou zro pour
  laisser le choix  Alsa.

  options - paramtres optionnels

  WR_ONLY - si l'application tente d'ouvrir le priphrique PCM en mode
  O_RDWR, modifier en O_WRONLY (pas d'enregistrement) - pour Quake etc.

  Exemples :


       echo "Playback x11amp 128 16384" > /proc/asound/0/pcm00
       echo "Playback squake 0 0 WR_ONLY" > /proc/asound/0/pcm00




  55..44..22..  //pprroocc//aassoouunndd//NN//ssbb1166




       "Playback 8" -> n'utiliser que le canal DMA 8 bits pour la lecture.
       "Playback 16" -> n'utiliser que le canal DMA 16 bits pour la lecture.
       "Playback auto" (par dfaut) -> choix automatique : la premier ouverture utilisera le canal DMA 16 bits.
       "Record 8" -> n'utiliser que le canal DMA 8 bits pour l'enregistrement.
       "Record 16" -> n'utiliser que le canal DMA 16 bits pour l'enregistrement.
       "Record auto" (par dfaut) -> choix automatique : la premire ouverture utilisera le canal DMA 16 bits.




  Exemple : echo "Record 16" > /proc/asound/0/sb16

  Pour plus d'informations, consultez le fichier INSTALL.

  66..  AAssttuucceess eett ddppaannnnaaggee

  Pensez  lire la FAQ dans le rpertoire des gestionnaires sonores.
  Cette section est toujours en construction.

  66..11..  DDppaannnnaaggee :: aaccttiivvaattiioonn dduu ggeessttiioonnnnaaiirree

  Vrifiez les lments suivants :

  66..11..11..  CCoommppaattiibbiilliitt ddeess ccaarrtteess ssoonn

  tes-vous sr  100% que votre carte son EESSTT supporte ?  Vrifiez
  encore. Il arrive qu'un modle X123 ne soit pas exactement un X123b et
  vous tes en train de perdre votre temps. D'un autre ct, une carte
  son supporte peut aussi poser problmes -- il m'a fallu deux heures
  pour installer une CS4237B, ce qui tait, aprs tout, un trs bon
  exemple de RTFM.


  66..11..22..  OOSSSS//LLiittee oouu llee ggeessttiioonnnnaaiirree dduu nnooyyaauu

  Il se peut que votre noyau ait le support audio intgr, ou qu'un
  module OSS/Lite ou OSS/Free soit charg (vrifiez avec cat
  /proc/modules).  Retirez le module, ou recompilez votre noyau (allez
  donc jeter un coup d'oeil au Kernel-HOWTO).


  66..11..33..  VVrriiffiieezz llee rrggllaaggee PPnnPP

  tes-vous sr que votre carte son est active ? Relisez donc le PnP-
  HOWTO, et vrifiez que votre carte son est correctement active.




  66..11..44..  VVooss ppaarraammttrreess ssoonntt--iillss ccoorrrreeccttss ??

  Vrifiez encore et toujours les paramtres de votre carte son. Et
  n'oubliez pas que 534 n'est pas la mme chose que 543, pas plus que
  0x534 et 534.


  66..11..55..  EEssssaayyeezz iinnssmmoodd

  Il est parfois utile de commencer avec insmod au lieu de kerneld.
  Comme cela, vous pourrez peut-tre voir un message d'erreur.


  66..11..66..  LLiisseezz llee ffiicchhiieerr IINNSSTTAALLLL..

  Le fichier INSTALL du rpertoire des gestionnaires contient beaucoup
  d'informations. Si votre gestionnaire ne fonctionne pas, regardez s'il
  n'y a pas d'informations complmentaires.


  66..11..77..  MMeessssaaggeess ddee ddbboogguuaaggee

  En dernier ressort, vous pouvez recompiler les gestionnaires en leur
  indiquant d'envoyer des informations de dboguage dans
  /var/log/messages. Allez dans le rpertoire des gestionnaires (cd
  /usr/src/alsa-driver-... et lancez :



       ./configure --with-debug=detect; make clean; make




  Retirez le gestionnaire (s'il est actif, voir plus bas pour une
  commande pratique).  Puis relancez la commande "modprobe" que vous
  aviez utilise prcdemment, pour charger le gestionnaire frachement
  compil.  Allez voir dans /var/log/messages s'il y a des messages.


  66..11..88..  SSii rriieenn nnee vvaa pplluuss......

  Si ces messages ne peuvent vous aider, envoyez un message  la liste
  de diffusion des dveloppeurs Alsa, alsa-devel@alsa.jcu.cz en
  prcisant les informations suivantes :

    nom de votre carte son, ainsi que les noms des composants prsents
     sur la carte ;

    votre fichier isapnp.conf si vous avez des cartes sons PnP ;

    votre fichier conf.modules ou la commande que vous utilisez pour
     activer les gestionnaires ALSA ;

    tous les messages de /var/log/messages concernant les gestionnaires
     Alsa.;/item>

  66..22..  RRaappppoorrttss ddee bbuuggss

  Si vous avez dcouvert un bug, les dveloppeurs d'Alsa seraient
  heureux de connatre les informations suivantes (au minimum) :

  1. versions de votre noyau et de vos gestionnaires : 'cat
     /proc/asound/version' ;


  2. informations sur la carte son ;

    nom de la carte son ;

    liste des composants prsents sur la carte ;

    contenu de 'cat /proc/asound/cards' ;

  3. tous les messages de /var/log/messages concernant les gestionnaires
     Alsa.;/item>

  4. une description du problme.

  66..33..  AAssttuuccee :: uuttiilliisseezz lleess pprriipphhrriiqquueess AAllssaa

  Si vous aviez le support son sous Linux prcdemment, vos applications
  se rfrent probablement  /dev/pcm0, /dev/audio et /dev/mixer. C'est
  parfait si vous utilisez la compatibilit OSS  l'aide du module snd-
  pcm1-oss. Il serait mieux, cependant, d'utiliser les vritables
  priphriques Alsa, ceux de /dev/snd.

  66..44..  AAssttuuccee :: rreettiirreerr ttoouuss lleess mmoodduulleess

  Retirer une dizaine de modules un par un est pnible. Heureusement,
  tous les modules commencent par le prfixe "snd-", et une petite ligne
  de commande fera l'affaire.  Vous pouvez retirer facilement les
  modules Alsa  l'aide de la commande suivante :



       cat /proc/modules|gawk '/^snd-/{print $1}|xargs -i rmmod {}




  Note : si un module est dpendant d'un autre, il n'est pas possible de
  commencer par retirer le premier. Cela signifie qu'il se peut que vous
  deviez relancer la commande de retrait une deuxime fois (je n'ai
  cependant jamais recontr cette situation, il semble qu'il soit
  possible de retirer les modules Alsa dans l'ordre dans lequel ils
  apparaissent dans /proc/modules).

























  Alsa-sound-mini-HOWTO
  Valentijn Sessink valentyn@alsa-project.org
  v 1.7, 29 Juillet 1999

  Ce document dcrit l'installation des gestionnaires sonores ALSA pour
  Linux.  Ces gestionnaires peuvent tre utiliss en remplacement des
  gestionnaires habituels, et sont entirement compatibles avec eux.
  ______________________________________________________________________

  Table des matires
























































  1. Introduction

     1.1 Remerciements
     1.2 Historique
     1.3 Nouvelles versions de ce document
     1.4 Commentaires
     1.5 Politique de distribution

  2. Guide d'installation rapide

     2.1 Installation
     2.2 Jouer et enregistrer du son

  3. Avant de commencer

     3.1 Introduction
     3.2 Informations gnrales sur les gestionnaires ALSA
     3.3 Matriel support
     3.4 Autres HOWTO
        3.4.1 Cartes son
        3.4.2 Cartes Plug and Play
        3.4.3 Modules
        3.4.4 Kerneld

  4. Comment installer les gestionnaires sonores ALSA

     4.1 Ce dont vous avez besoin
     4.2 Obtenir les gestionnaires
     4.3 Les versions d'ALSA
     4.4 Extraction
     4.5 Compilation
     4.6 Prparer les priphriques

  5. Charger les gestionnaires

     5.1 Insrer avec modprobe
     5.2 Quel module pour quelle carte ?
        5.2.1 Gravis UltraSound Extreme
        5.2.2 Gravis UltraSound MAX
        5.2.3 ESS AudioDrive ES-1688 et ES-688
        5.2.4 ESS AudioDrive ES-18xx
        5.2.5 Gravis UltraSound PnP
        5.2.6 UltraSound 32-Pro
        5.2.7 Soundblaster
        5.2.8 Soundblaster 16
        5.2.9 OAK Mozart
        5.2.10 OPTi 82C9xx
        5.2.11 AD1847/48 et CS4248
        5.2.12 Yamaha OPL3-SA2/SA3
        5.2.13 S3 SonicVibes
        5.2.14 Ensoniq/Soundblaster PCI64
        5.2.15 CS4231
        5.2.16 CS4232/4232A
        5.2.17 CS4235 et suprieur
        5.2.18 CS 4610/4612/4615 et 4680
        5.2.19 ESS Solo 1
        5.2.20 Trident 4DWave DX/NX
        5.2.21 ForteMedia FM801
     5.3 Chargement par modprobe pour les pilotes sans dtection automatique
        5.3.1 OPL3-SA2 et OPL3-SA3
        5.3.2 CS4231
        5.3.3 CS4232 et CS4232A
        5.3.4 CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239
     5.4 Chargement par kerneld
     5.5 Compatibilit OSS

  6. Tester et utiliser

     6.1 Le systme de fichiers /proc
     6.2 Le mixer
        6.2.1 Rglage du mixer en lecture
        6.2.2 lments du mixer
        6.2.3 Rglage du mixer en enregistrement
        6.2.4 Autres rglages du mixer
     6.3 Les priphriques /dev/snd/
     6.4 Informations complmentaires
        6.4.1 /proc/asound/N/pcmN0
        6.4.2 /proc/asound/N/sb16

  7. Astuces et dpannage

     7.1 Compilation des gestionnaires
        7.1.1 Arborescence des sources du noyau
     7.2 Chargement des gestionnaires
        7.2.1 Compatibilit des cartes son
        7.2.2 Priphrique ou ressource occupe (device busy) ou symboles non rsolus (unresolved symbols)
           7.2.2.1 Noyaux 2.0.x
           7.2.2.2 Noyaux 2.2.x
        7.2.3 Rfrences  d'autres gestionnaires
        7.2.4 Symboles non rsolus, deuxime
        7.2.5 Vrifiez le rglage PnP
        7.2.6 Vos paramtres sont-ils corrects ?
     7.3 Gestionnaire charg... mais aucun son (ou  peine audible)
        7.3.1 La sourdine
        7.3.2 Amplification
        7.3.3 Compatibilit avec OSS/Linux
        7.3.4 Impossible d'accder au mixer
     7.4 Quelques suggestions
        7.4.1 Essayez insmod
        7.4.2 Lisez le fichier INSTALL
        7.4.3 Messages de dboguage
        7.4.4 Si rien ne va plus...
     7.5 Rapports de bugs
     7.6 Astuce : jouer des CD audio
     7.7 Astuce : installation du gestionnaire srie MIDI
     7.8 Astuce :  nouveau noyau, nouveaux modules !
     7.9 Astuce : KDE et les gestionnaires ALSA
     7.10 Astuce : utilisez les priphriques ALSA
     7.11 Astuce : retirer tous les modules


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce document explique comment installer et utiliser les gestionnaires
  sonores ALSA pour votre carte son. Les gestionnaires ALSA sont
  entirement modulariss et supportent kerneld et kmod. Ils sont
  compatibles avec l'API OSS, avec des possibilits suprieures. En deux
  mots : compatibles, mais meilleurs.


  11..11..  RReemmeerrcciieemmeennttss

  Ce document contient des informations obtenues sur les pages des
  gestionnaires ALSA. La structure est inspire du SB-mini-HOWTO,
  principalement parce qu'il avait la structure recherche. Grce aux
  SGML Tools, ce HOWTO est disponible dans plusieurs formats, gnrs 
  partir d'un seul fichier source. Merci  Erik Warmelink pour sa
  relecture, ainsi qu' Alfred Munnikes pour ses quelques questions et
  prcieuses suggestions.
  Remerciements  Yamahata Isaku pour la traduction en japonais, et 
  Miodrag Vallat, miodrag@multimania.com, pour l'adaptation franaise.
  De plus, merci  Steve Crowder qui a fait un excellent travail de
  relecture et d'dition du texte, ainsi qu' Marc-Aurle Darche, Piotr
  Ingling, Juergen Kahrs, Tim Pearce, Patrick Stoddard, Rutger de Graaf,
  Shuly Wintner, Jyrki Saarela, Jonas Lofwander, Kumar Sankaran et bien
  d'autres personnes encore pour leurs conseils utiles et leurs ajouts.


  11..22..  HHiissttoorriiqquuee

  Version 1.7 - 29 juillet 1999. Quelques corrections.

  Version 1.6 - 26 juillet 1999. Ajout d'une section sur les versions
  d'Alsa.

  Version 1.5 - 21 mai 1999. Modifi la section sur le mixer, ajout une
  section installation rapide.

  Version 1.4 - 18 mai 1999. Ajout de l'URL de la version franaise,
  chang quelques URL.

  Version 1.3 - 16 mai 1999. Grce  Jaroslav le HOWTO dispose d'une
  place sur le site du projet ALSA. Du coup, quelques changements d'URL
  et d'adresses email.

  Version 1.2 - 11 mai 1999. Diverses mises  jour.

  Version 1.1 - 11 mars 1999. Ajout deux cartes sons des nouveaux
  gestionnaires 0.3, et quelques notes  propos des noyaux 2.2.

  Version 1.0 - 8 fvrier 1999. Ajout quelques notes  la section
  dpannage, qui semble dsormais complte.

  Version 0.3 beta - 20 janvier 1999. Un lien sur la page web d'ALSA.
  Nous voici officiels !

  Version 0.2 alpha - mi janvier 1999, premire version sgml.

  Version 0.1 alpha - janvier 1999, premire version, principalement
  HTML.


  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  La dernire version peut tre trouve sur http://www.alsa-
  project.org/~valentyn

  Des versions en d'autres formats se trouvent dans le rpertoire other-
  formats. Malheureusement, je n'ai pas russi  compiler une version
  Postscript, car le script sgml2latex choue avec un tas d'erreurs.

  Yamahata Isaku a ralis une version en japonais, qui sera disponible
  sur le site Japonais d'ALSA,
  http://plaza21.mbn.or.jp/~momokuri/alsa/index.html Miodrag Vallat a
  ralis une version en franais, disponible en
  http://www.freenix.fr/unix/linux/HOWTO/mini/Alsa.html.

  Si vous ralisez une traduction de ce document dans une autre langue,
  faites-le moi savoir et je rajouterai une rfrence ici.

  11..44..  CCoommmmeennttaaiirreess

  Je compte sur vous, les lecteurs, pour rendre ce HOWTO utile. Si vous
  avez des suggestions, des corrections, ou des commentaires, n'hsitez
  pas  me les envoyer ( alsa-howto@alsa-project.org), et je tcherai
  de les inclure dans la prochaine version.
  Remarque : Je ne reois pas beaucoup de courrier  propos des
  gestionnaires ALSA, mais toute addition sera la bienvenue. Mme un
  merci sera apprci - peut-tre qu'il ne sera pas une mauvaise ide
  d'ajouter une section J'ai bien apprci ou Ceci-ou-cela n'tait
  pas trs clair.

  Si vous publiez ce document sur CD-ROM ou sous forme imprime, un
  exemplaire serait apprci. crivez-moi pour avoir mon adresse
  postale. Pensez galement  faire un don au Linux Documentation
  Project pour aider la documentation libre pour Linux. Contactez le
  coordinateur des HOWTO Linux, Guylhem Aznar,  linux-
  howto@metalab.unc.edu, pour plus d'informations.

  11..55..  PPoolliittiiqquuee ddee ddiissttrriibbuuttiioonn

  Copyright 1998/1999 Valentijn Sessink

  Ce HOWTO est une documentation libre ; vous pouvez la redistribuer
  et/ou la modifier selon les termes de la Licence Publique Gnrale GNU
  publie par la Free Software Foundation (version 2 ou bien toute autre
  version ultrieure choisie par vous.

  Ce document est distribu car potentiellement utile, mais ssaannss aauuccuunnee
  ggaarraannttiiee, ni explicite, ni implicite, y compris les garanties de
  commercialisation ou d'adaptation dans un but spcifique. Reportez-
  vous  la Licence Publique Gnrale GNU pour plus de dtails.

  Vous pouvez obtenir une copie de la GNU General Public License en
  crivant  la Free Software Foundation, Inc., 59 Temple Place, Suite
  330, Boston, MA 02111-1307, tats-Unis.


  22..  GGuuiiddee dd''iinnssttaallllaattiioonn rraappiiddee

  Si vous voulez du son, immdiatement, sans attendre d'avoir lu ce
  HOWTO, ce bref aperu de l'installation des gestionnaires ALSA peut
  tre utile.

  22..11..  IInnssttaallllaattiioonn

  Les gestionnaires ALSA versions 0.3.0, 0.3.1 et 0.3.2 ont divers
  problmes ds  la restructuration de l'interface mixer. Veuillez
  utiliser une version adapte (cf. la section sur les versions). Vous
  devriez sans aucun doute utiliser la version 0.3.0-pre4.

  Puis la routine : ./configure ; make ; make install pour lleess
  ggeessttiioonnnnaaiirreess,, llaa bbiibblliiootthhqquuee eett lleess uuttiilliittaaiirreess.  Il vous faut les
  trois car vous avez besoin des utilitaires pour dsactiver la
  sourdine. Les noyaux 2.2.x ddooiivveenntt tre configurs avec le support son
  gnrique (Sound card support), mais sans choisir de carte son,
  tandis que les noyaux 2.0.x doivent avoir le ssuuppppoorrtt ssoonn ddssaaccttiivv.

  Les gestionnaires ALSA utilisent leur propres fichiers de
  priphriques, que vous pouvez crer  l'aide du script ..//ssnnddddeevviicceess.

  Vous devez charger le module pour votre carte (ou utiliser kmod) et si
  vous souhaitez avoir la compatibilit avec les gestionnaires sonores
  standard du noyau Linux (qui n'en voudrait pas ?) vous devez charger
  un autre module nomm ssnndd--ppccmm11--oossss. Consultez la section ``Quel module
  pour quelle carte~?'' pour dterminer quel module charger. Une fois
  les modules chargs, vous pouvez regarder dans /proc/asound pour plus
  d'informations sur les gestionnaires ALSA.




  22..22..  JJoouueerr eett eennrreeggiissttrreerr dduu ssoonn

  Quelques remarques. ALSA a ses propres fichiers de priphriques dans
  /dev/snd, par exemple /dev/snd/pcmC0D1 pour la carte 0, priphrique
  (device) 1.  Vous pouvez utiliser les anciens fichiers /dev/pcmXY si
  vous avez charg le module snd-pcm1-oss de compatibilit. Avant de
  pouvoir jouer du son, il vous faut dsactiver la sourdine avec amixer.
  Lancez amixer, puis essayez quelque chose du genre

  amixer pcm 100 unmute

  En rgle gnrale, vous pouvez utiliser les options mute ou
  unmute, rec ou norec, une valeur numrique ou une combinaison
  gauche:droite.

  Voil ! Maintenant si tout fonctionne, vous avez gagn. S'il y a des
  problmes, vous allez devoir lire quand mme ce HOWTO...

  33..  AAvvaanntt ddee ccoommmmeenncceerr



  33..11..  IInnttrroodduuccttiioonn

  Ce document tente de vous aider  installer et  utiliser les
  gestionnaires sonores ALSA pour votre systme Linux. Le systme de
  rfrence est une distribution Slackware 4.0 tournant sur un
  ordinateur AMD/K6 (compatible x86), mais cela devrait fonctionner avec
  toute autre distribution Linux. Je ne sais pas si les pilotes ALSA
  fonctionnent sur d'autres plates-formes ; d'aprs la documentation,
  ALSA fonctionne galement sur les plates-formes Alpha. Je n'ai que des
  ordinateurs x86 ici, et toute information supplmentaire que vous
  pourriez avoir sera la bienvenue.

  Il peut s'avrer utile de lire le Linux Sound HOWTO (cf. section
  Autres HOWTO), mais ce HOWTO ne traite que des gestionnaires du noyau.

  33..22..  IInnffoorrmmaattiioonnss ggnnrraalleess ssuurr lleess ggeessttiioonnnnaaiirreess AALLSSAA

  ALSA a t initialement crit comme remplacement du gestionnaire
  sonore pour les cartes Gravis UltraSound (GUS). Devant le succs de
  ces gestionnaires GUS, l'auteur a lanc le projet ALSA afin d'aboutir
   un gestionnaire gnrique pour plusieurs cartes sonores, avec une
  conception entirement modulaire.

  ALSA est compatible avec les gestionnaires sonores OSS/Free et
  OSS/Linux (les gestionnaires du noyau), mais dispose de sa propre
  interface qui est encore meilleure que celle d'OSS. Une liste des
  fonctionnalits se trouve en http://www.alsa-project.org/intro.html

  Veuillez noter que les gestionnaires ALSA sont toujours en
  dveloppement. Ils voluent au cours du temps, et certains programmes
  utilisant ALSA ne fonctionnent qu'avec certaines versions
  particulires. A part a : je les trouve super. J'utilise ALSA depuis
  dj 10 mois et je ne retournerai jamais aux temps anciens des
  gestionnaires sonores non libres ;) La page Web du projet ALSA se
  trouve en http://www.alsa-project.org/


  33..33..  MMaattrriieell ssuuppppoorrtt

  Les gestionnaires ALSA ne supportent qu'un sous-ensemble des cartes
  sonores existantes. Au moment de la rdaction de ce document, les
  cartes suivantes sont supportes (cependant, certaines ne le sont pas
  par ALSA 0.3.0-pre4, ce qui vous obligera  utiliser ALSA 0.3.2 ou une
  version plus rcente)  :
    cartes  base de chipset Trident 4D Wave DX/NX, grce  Trident
     Microsystems qui a fourni au projet ALSA des gestionnaires de base
     sous GPL (pour les priphriques mixer et PCM seulement) ainsi
     qu'une documentation sur leurs chipsets audio 4D Wave PCI.
     Reportez-vous 
     http://www.tridentmicro.com/HTML/products%20folder/audio.htm pour
     plus de dtails. Ces gestionnaires sont fournis dans la version
     ALSA 0.3.2.  Parmi les cartes utilisant ce composant, on trouve :
     Best Union Miss Melody 4DWave PCI, HIS 4DWave PCI, Warpspeed
     ONSpeed 4DWave PCI, AzTech PCI 64-Q3D, Addonics SV 750, CHIC True
     Sound 4DWave, Shark Predator4D-PCI et Jaton SonicWave 4D ;

    Gravis Ultrasound (GUS) : PnP, Extreme, Classic/ACE, MAX ;

    cartes  base de chipset GUS : Dynasonic 3-D, STB Sound Rage 32,
     UltraSound 32-Pro (STB), ExpertColor MED3201 et d'autres utilisant
     le chipset AMD InterWave(TM) ;

    Soundblaster : 1.0, 2.0, Pro, 16, AWE32/64, PCI64 ;

    ESS AudioDrive ESx688 ;

    chipsets ESS ES18xx. Notez que j'ai eu personnellement des
     problmes insolubles avec un modle ES1888, malgr tous les efforts
     du dveloppeur du gestionnaire ;

    ESS Solo-1 ES1938. Un seul des deux canaux fonctionne, ce qui
     empche l'energistrement. L'auteur du gestionnaire est au courant
     du problme et en train d'en chercher les causes ;

    Yamaha : chipsets OPL3-SA2, OPL3-SA3 ;

    OAK Mozart ;

    Schubert 32 PCI (PINE, chipset S3 SonicVibes PCI) ;

    Ensoniq AudioPCI ES1370/1371 PCI (Soundblaster PCI64) ;

    SonicVibes PCI (PINE Schubert 32 PCI) ;

    cartes  base de chipset ForteMedia FM801 (dans ALSA 0.3.2) ;

    cartes  base de chipset OPTI 82C9xx ;

    cartes  base de chipset AD1847, AD1848 et CS4248.

     Un grand nombre de cartes  base de Crystal Semiconductors sont
     galement supportes. Ces puces se trouvent dans bon nombre de
     matriels, sous forme de carte spare (certaines cartes Philips
     PCA) ou sur les cartes mres (par exemple IBM Aptiva, ordinateurs
     Dell). Les cartes utilisant les chipsets suivants sont supportes :

    4231

    4232

    4232A

    4235

    4236B

    4237B

    4238B

    4239

    4610 (dans ALSA 0.3.2)

    4612 (dans ALSA 0.3.2)

    4615 (dans ALSA 0.3.2)

    4680 (dans ALSA 0.3.2)

     Une liste plus rcente se trouve dans les sources du gestionnaire
     lui-mme,  savoir dans doc/SOUNDCARDS

  33..44..  AAuuttrreess HHOOWWTTOO

  Cet ALSA-sound-mini-HOWTO n'est qu'un mini-HOWTO. D'autres HOWTO
  peuvent vous aider si celui-ci est trop concis. J'en indiquerai
  quelques-uns en essayant d'installer les gestionnaires ALSA. Les HOWTO
  se trouvent en gnral sur les miroirs de Metalab (ex Sunsite). Allez
  donc voir sur http://metalab.unc.edu/LDP/mirrors.html quel est votre
  miroir le plus proche. Vous trouverez les HOWTO dans le rpertoire
  LDP/HOWTO/.  Notez que les liens dans ce document sont tous relatifs 
  /LDP/HOWTO/mini.  Si vous consultez ce document depuis un miroir
  suffisamment convenable, vous trouverez les HOWTO indiqus.

  Une note  propos des noyaux 2.2.x : avec cette srie, le support son
  est comme toute autre support : il fonctionne, mais diffremment de ce
   quoi vous tiez habitu. Ce HOWTO (comme tous les autres) se destine
  principalement aux noyaux 2.0, bien que j'essaierai d'indiquer les
  diffrences.  Je serai heureux d'ajouter tout ce qui sera ncessaire
  pour maintenir ce HOWTO  jour vis--vis des noyaux 2.2.

  33..44..11..  CCaarrtteess ssoonn

  Vous venez d'acheter une carte son, ou elle se trouve dj enferme
  dans votre ordinateur depuis des lustres. Et maintenant vous allez
  vous en servir ! Allez voir le Sound-HOWTO pour voir si cela en vaut
  la peine (Vous prfrerez peut-tre acheter d'abord cette nouvelle
  Mega-Rumble-Blaster, puis essayer les gestionnaires ALSA).

  33..44..22..  CCaarrtteess PPlluugg aanndd PPllaayy

  La plupart des cartes son modernes pour la plateforme Intel sont des
  cartes ISA PnP, une abrviation de Plug and Play, ce qui signifie
  que la carte doit tre configure par le systme d'exploitation. Ceci
  a lieu via une routine d'initialisation au dmarrage. Vous allez sans
  doute devoir configurer votre carte avec le paquetage PnP-utils.
  Toutes les distributions Linux suffisamment rcentes l'incluent. Pour
  vous en servir, jetez donc un oeil au Plug-and-Play-HOWTO.

  Les gestionnaires ALSA semblent disposer de leur propre support ISA-
  PnP pour quelques cartes son. Malheureusement, tant que je ne trouve
  pas de documentation  ce sujet, je ne peux pas vous expliquer comment
  il fonctionne. Si quelqu'un souhaite essayer ALSA en vitant sciemment
  les ISA-PnP-tools, qu'il m'envoie un message.

  33..44..33..  MMoodduulleess

  Les gestionnaires ALSA sont construits en tant que modules. Vous
  pouvez trouver plus d'informations sur les modules dans le Kernel-
  HOWTO. Il existe aussi un module-HOWTO, mais il n'est plus maintenu 
  l'heure actuelle ; consultez la section unmaintained du Howto-HOWTO.
  Il existe aussi un Modules-mini-HOWTO qui peut tre utile.



  33..44..44..  KKeerrnneelldd

  Un autre HOWTO qui peut tre utile  certains est le Kerneld-mini-
  HOWTO. Kerneld est un daemon qui installe et retire les modules du
  noyau quand c'est ncessaire (je n'en ai aucune exprience, donc toute
  information  ce sujet est la bienvenue. La documentation des
  gestionnaires ALSA contient quelques informations sur la configuration
  de kerneld, qui ont t ajoutes  ce mini-HOWTO).


  44..  CCoommmmeenntt iinnssttaalllleerr lleess ggeessttiioonnnnaaiirreess ssoonnoorreess AALLSSAA



  44..11..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn



    un systme Linux en tat de fonctionnement (par exemple une
     distribution Slackware), avec les paquetages de dveloppement
     installs (i.e. gcc, make, etc.) ;

    une carte son supporte ;

    un minimum de connaissance de Linux (savoir utiliser "ls", "cd",
     "tar", etc.) ;

    l'accs au compte administrateur (root).

     Si vous avez une carte PnP, vous aurez galement besoin :

    du paquetage isapnptools.

     Le texte INSTALL dans le rpertoire des gestionnaires laisse
     supposer que pour certaines cartes, le support PnP est intgr.
     J'ai aussi reu une note de Jaroslav  ce sujet. Lorsque j'aurai
     plus d'informations  ce sujet je les ajouterai  ce mini-HOWTO.

  Notez que vous ne devez pas avoir le moindre gestionnaire sonore actif
  quand vous voulez utiliser les gestionnaires ALSA. Si votre noyau est
  compil avec les gestionnaires sonores "en dur", vous devrez le
  recompiler. Si vous avez le vieux module "sound.o" actif, vous devez
  le dsactiver. Si vous utilisez kerneld, cela revient  effacer
  sound.o du rpertoire /lib/modules/<version_du_noyau>/misc. Les
  systmes RedHat rcents ont une configuration du son diffrente, avec
  plusieurs modules actifs. Vous devrez tous les dsactiver.

  Les noyaux 2.2 ont une autre approche du son. Vous devrez inclure le
  support sonore ! H oui, c'est vrai : vous ajoutez le support sonore
  au noyau, mais sans la moindre carte son. Ensuite, compilez et
  installez le noyau et ensuite, compilez les gestionnaires ALSA.


  44..22..  OObbtteenniirr lleess ggeessttiioonnnnaaiirreess

  Les gestionnaires ALSA sont disponibles en ftp://ftp.alsa-
  project.org/pub/, et il en existe un miroir en
  ftp://linux.a2000.nl/alsa. Pour une installation ALSA totalement
  fonctionnelle, il vous faut les gestionnaires, la bibliothque et les
  utilitaires ; par exemple, si vous avez choisi le miroir, vous allez
  rcuprer ftp://linux.a2000.nl/alsa/driver/alsa-
  driver-0.3.0-pre4.tar.gz, ftp://linux.a2000.nl/alsa/lib/alsa-
  lib-0.3.0pre4.tar.gz et ftp://linux.a2000.nl/alsa/utils/ alsa-
  utils-0.3.0-pre3.tar.gz (et NON il ne s'agit pas de liens complets,
  vous feriez mieux d'aller voir sur place quelles versions sont
  disponibles, cf. la section suivante).
  44..33..  LLeess vveerrssiioonnss dd''AALLSSAA

  Les gestionnaires ALSA ont parcouru une longue route. Leur
  dveloppement  commenc au temps des noyaux 2.0, puis les noyaux 2.2
  sont apparus (avec leur propre noyau sonore).

  La version actuelle d'ALSA va subir une rcriture de l'interface
  mixer.  L'ancienne interface tait un classique volume, graves/aigus,
  tandis que la nouvelle interface fournit des informations sur les
  entres et les sorties de chaque lment. En d'autres mots, un
  programme peut dsormais demander  la carte son si, par exemple, la
  sortie cd audio est connecte  l'entre enregistrement. Le mixer est
  prt, mais les utilitaires associs sont encore en dveloppement.

  Si vous souhaitez utiliser ALSA sans peine, vous devriez probablement
  choisir alsa-driver-0.3.0-pre4, alsa-lib-0.3.0-pre4 et alsa-
  utils-0.3.0-pre3.

  Les versions plus anciennes, 0.2.0-pre10p3 et plus anciennes
  fonctionnent sous un noyau 2.0.x, mais je n'arrive pas  les faire
  fonctionner sous 2.2.x (probablement parce qu'elles ne savent pas
  s'interfacer avec le module soundcore du noyau).

  La dernire version (0.3.2) fonctionne tout aussi bien sous 2.0.x que
  sous 2.2.x. Veuillez noter que cette version sera la dernire 
  supporter les noyaux 2.0.x, donc si une nouvelle version arrive, vous
  devrez migrer vers le noyau 2.2.

  Vous pouvez utiliser la version 0.3.2 s'il vous faut la toute dernire
  version, mais ce n'est pas recommand  cause de la rcriture de
  l'interface mixer.  J'ai rencontr des problmes avec le mixer OSS et
  l'utilitaire amixer a une toute nouvelle interface difficile d'emploi.


  44..44..  EExxttrraaccttiioonn

  Vous devez extraire les sources des gestionnaires par toute commande
  raisonnable, comme le bon vieux tar -zxf fichier. Pour les dbutants
  et les amnsiques :


       cd /usr/src
       tar -zxf ~/alsa-driver-0.3.0-pre4.tar.gz




  (Si cela a fonctionn, soit vous tes toujours logu en root, ce qui
  est une mauvaise ide -- arrtez votre lecture et allez consulter le
  DOS/Win95-to-Linux-HOWTO --, soit vous avez dj pens qu'il
  s'agissait du genre de tche ncessitant les privilges
  administrateur. Donc : il vous faut les privilges root, tapez "su"
  puis le mot de passe).


       tar -zxf ~/alsa-lib-0.3.0pre4.tar.gz
       tar -zxf ~/alsa-utils-0.3.0pre3.tar.gz




  galement utilisable et plus amusant : find ~ -name alsa* -exec tar
  -zxf {} \; (pas la peine d'essayer a, c'est juste un exemple). Notez
  que si vous tlchargez les gestionnaires avec Netscape, vous risquez
  de rcuprer les gestionnaires dcompacts avec l'extension .tar.gz.
  Si tar se plaint du format de fichier, vous obtiendrez peut-tre de
  meilleurs rsultats en retirant la lettre "z" des options de tar.

  44..55..  CCoommppiillaattiioonn

  Vous devez compiler les gestionnaires avant de pouvoir compiler et
  utiliser la bibliothque. Vous avez besoin de compiler la bibliothque
  avant de pouvoir compiler et utiliser les utilitaires. Commenons :


       cd alsa-driver-0.3.0-pre4
       ./configure




  Si vous souhaitez utiliser le support PnP intgr, vous devriez
  utiliser


       ./configure --with-isapnp=yes






       make




  Maintenant vous avez besoin d'tre root pour installer tout a (mais
  vous l'tiez peut-tre dj)


       make install




  Si vous obtenez un message vous indiquant que version.h n'a pas pu
  tre trouv, cela vient probablement du fait que votre arborescence
  des sources du noyau n'est pas correcte. Il vous faut quelques
  fichiers des sources du noyau afin de compiler les gestionnaires ALSA.
  Dcompactez votre linux-2.x.y prfr dans /usr/src, et lancez un make
  menuconfig. (En fait, make symlinks devrait suffire).

  Au tour de la bibliothque :


       cd ../alsa-lib-0.3.0-pre4
       ./configure
       make
       make install




  Vous avez compris le truc ? Alors pour les utilitaires :


       cd ../alsa-utils-0.3.0-pre3
       ./configure
       make
       make install

  Note : vous pouvez laisser de ct le make install des utilitaires
  pour l'instant. Vous pouvez mme laisser tomber la compilation de la
  bibliothque et des utilitaires, pour voir tout de suite si les
  gestionnaires fonctionnent.

  44..66..  PPrrppaarreerr lleess pprriipphhrriiqquueess

  Il y a un script dans le rpertoire des gestionnaires qui va installer
  les fichiers de priphriques ALSA dans votre rpertoire /dev. Lancez


       ./snddevices




  dans le rpertoire alsa-driver. Il devrait maintenant y avoir un
  rpertoire /dev/snd (Vrifiez sa prsence. Si vous n'tes pas assez
  familier avec la commande ls, allez plutt consulter d'autres HOWTO
  avant. Vous devez avoir un minimum de connaissances de Linux pour
  installer ces pilotes).

  Maintenant vous tes prt  insrer les gestionnaires, alors jetez-
  vous donc sur le paragraphe qui suit.

  55..  CChhaarrggeerr lleess ggeessttiioonnnnaaiirreess

  Il existe deux faons d'utiliser les modules ALSA. Je prfre
  personnellement utiliser la mthode manuelle,  savoir insrer le
  gestionnaire au dmarrage.  Les gestionnaires ALSA sont conus pour
  tre chargeables et dchargeables  volont -- par exemple ils ne
  rinitialisent pas le mixer au chargement -- donc vous pouvez
  facilement utiliser l'approche kerneld.

  Veuillez lire la section ``compatibilit OSS''.  Vous en aurez besoin
  pour avoir un support sonore  l'ancienne.

  55..11..  IInnssrreerr aavveecc mmooddpprroobbee

  Note : si vous avez une carte son PnP, vous devez tout d'abord la
  configurer aux bons paramtres IO/IRQ/DMA (ou au moins  des valeurs
  connues). Consultez le Plug-and-Play-HOWTO. Avez-vous configur votre
  carte PnP ? Bien, alors poursuivons. Le plus dur est de faire
  modprobe snd-carte son. Cela devrait faire l'affaire. Notez que
  toutes les distributions ne mettent pas /sbin dans le PATH. Si vous
  obtenez bash: modprobe: command not found, cela signifie
  probablement que modprobe n'est pas dans votre path. Essayez
  /sbin/modprobe snd-sb16, ou tchez de trouver l'utilitaire modprobe
  quelque part.

  La plus grosse difficult vient des chipsets Crystal, que les
  gestionnaires ALSA ne dtectent pas automatiquement. Des informations
  plus rcentes peuvent tre trouves dans le fichier INSTALL du
  rpertoire alsa-driver. Deux exemples, puis une liste :

  Gravis UltraSound (GUS) et compatibles :


       /sbin/modprobe snd-gusclassic




  Pour toutes les cartes 16 bit compatibles Soundblaster (SoundBlaster
  16 (PnP), SoundBlaster AWE 32 (PnP), SoundBlaster AWE 64 (PnP) :

  /sbin/modprobe snd-sb16





  55..22..  QQuueell mmoodduullee ppoouurr qquueellllee ccaarrttee ??



  55..22..11..  GGrraavviiss UUllttrraaSSoouunndd EExxttrreemmee

  modprobe snd-gusextreme


  55..22..22..  GGrraavviiss UUllttrraaSSoouunndd MMAAXX

  modprobe snd-gusmax


  55..22..33..  EESSSS AAuuddiiooDDrriivvee EESS--11668888 eett EESS--668888

  modprobe snd-audiodrive1688


  55..22..44..  EESSSS AAuuddiiooDDrriivvee EESS--1188xxxx

  Pour les cartes  base d'ESS AudioDrive 18xx

  modprobe snd-audiodrive18xx


  55..22..55..  GGrraavviiss UUllttrraaSSoouunndd PPnnPP

  Gravis UltraSound PnP, Dynasonic 3-D/Pro, STB Sound Rage 32,
  ExpertColor MED3201 et toute autre carte son base sur un chipset AMD
  InterWave(TM).

  modprobe snd-interwave


  55..22..66..  UUllttrraaSSoouunndd 3322--PPrroo

  UltraSound 32-Pro (carte produite par STB, utilise par Compaq) et
  toute autre carte son base sur un chipset AMD InterWave(TM) avec un
  circuit TEA6330T pour un contrle tendu des volumes grave, aigu et
  principal.

  modprobe snd-interwave-stb


  55..22..77..  SSoouunnddbbllaasstteerr

  Cartes Soundblaster 8 bits (SoundBlaster 1.0, SoundBlaster 2.0,
  SoundBlaster Pro)

  modprobe snd-sb8


  55..22..88..  SSoouunnddbbllaasstteerr 1166

  Cartes SoundBlaster 16 bits (SoundBlaster 16 (PnP), SoundBlaster AWE
  32 (PnP), SoundBlaster AWE 64 (PnP). Attention, ce module ne supporte
  pas la carte SoundBlaster VibraX16.


  modprobe snd-sb16


  55..22..99..  OOAAKK MMoozzaarrtt

  modprobe snd-mozart


  55..22..1100..  OOPPTTii 8822CC99xxxx

  Cartes  base de chipset OPTi 82C9xx.

  modprobe snd-opti9xx


  55..22..1111..  AADD11884477//4488 eett CCSS44224488


  modprobe snd-card-ad1848


  55..22..1122..  YYaammaahhaa OOPPLL33--SSAA22//SSAA33

  Un "modprobe snd-opl3sa" ne fonctionnera pas, ce gestionnaire ne
  faisant pas de dtection automatique. Voyez plus loin.


  55..22..1133..  SS33 SSoonniiccVViibbeess

  Cartes S3 SonicVibes PCI (PINE Schubert 32 PCI).

  modprobe snd-sonicvibes


  55..22..1144..  EEnnssoonniiqq//SSoouunnddbbllaasstteerr PPCCII6644

  Cartes Ensoniq AudioPCI ES1370/1371 PCI (SoundBlaster PCI 64)

  modprobe snd-audiopci


  55..22..1155..  CCSS44223311

  Un modprobe snd-card-cs4231 ne fonctionnera pas, ce gestionnaire ne
  faisant pas de dtection automatique. Voyez plus loin.


  55..22..1166..  CCSS44223322//44223322AA

  Toutes les cartes  base de chipset CS4232/CS4232A.  Un modprobe snd-
  card-cs4232 ne fonctionnera pas, ce gestionnaire ne faisant pas de
  dtection automatique. Voyez plus loin.


  55..22..1177..  CCSS44223355 eett ssuupprriieeuurr

  Toutes les cartes  base de chipset
  CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239. Un modprobe snd-card-
  cs4236 ne fonctionnera pas, ce gestionnaire ne faisant pas de
  dtection automatique.  Voyez plus loin.


  55..22..1188..  CCSS 44661100//44661122//44661155 eett 44668800



  modprobe snd-card-cs461x


  55..22..1199..  EESSSS SSoolloo 11

  Cartes ESS Solo-1, 128iPCI (es1938, ESS-SOLO-1). Ces cartes ne
  figurent pas dans le fichier INSTALL des gestionnaires. Jonas
  Lofwander m'a communiqu un lien vers un document expliquant comment
  configurer ces cartes -- en gros, rien de plus qu'un modprobe snd-
  esssolo1 mais... http://195.163.39.4/~dice/alsa-solo1.txt peut vous
  tre utile si vous utilisez ALSA 0.3.2. Si vous avez un IBM Thinkpad
  1412 vous pouvez aussi consulter
  http://www.geocities.com/SiliconValley/Peaks/3649/1412.html, merci 
  Kumar Sankaran.


  55..22..2200..  TTrriiddeenntt 44DDWWaavvee DDXX//NNXX

  Cartes Best Union Miss Melody 4DWave PCI, HIS 4DWave PCI, Warpspeed
  ONSpeed 4DWave PCI, AzTech PCI 64-Q3D, Addonics SV 750, CHIC True
  Sound 4Dwave, Shark Predator 4D-PCI, Jaton SonicWave 4D. Ces cartes
  sont supportes par ALSA 0.3.2.

  modprobe snd-trid4dwave


  55..22..2211..  FFoorrtteeMMeeddiiaa FFMM880011

  Cartes PCI  base de FM801.

  modprobe snd-card-fm801


  55..33..  CChhaarrggeemmeenntt ppaarr mmooddpprroobbee ppoouurr lleess ppiillootteess ssaannss ddtteeccttiioonn aauuttoommaa
  ttiiqquuee

  Si vous avez un gestionnaire n'effectuant pas de dtection
  automatique, vous devez fournir des informations supplmentaires pour
  que le gestionnaire fonctionne. Vous pourrez trouver plus
  d'informations dans le fichier INSTALL du rpertoire alsa-driver.

  55..33..11..  OOPPLL33--SSAA22 eett OOPPLL33--SSAA33

  D'aprs le fichier INSTALL, vous devez fournir toutes les informations
  suivantes pour ce gestionnaire. Si vous avez initialis la carte avec
  les isapnptools, vous pouvez probablement trouver ces informations
  dans le fichier /etc/isapnp.conf :


       snd_port - port de contrle de l'OPL3-SA
       snd_wss_port - port WSS de l'OPL3-SA (0x530,0xe80,0xf40,0x604)
       snd_midi_port - port de l'UART MPU-401 (0x300,0x330), -1 pour dsactiver
       snd_fm_port - port FM de l'OPL3-SA (0x388), -1 pour dsactiver
       snd_irq - IRQ de l'OPL3-SA (5,7,9,10)
       snd_dma1 - canal DMA 1 de l'OPL3-SA (0,1,3)
       snd_dma1_size - taille de la mmoire tampon du DMA 1 en Ko (4-64Ko)
       snd_dma2 - canal DMA 2 de l'OPL3-SA (0,1,3), -1 si aucun
       snd_dma2_size - taille de la mmoire tampon du DMA 2 en Ko (4-64Ko)




  Lancez un "modprobe snd-opl3sa snd_port=0xNNN snd_wss_port=0x530
  snd_midi_port=-1 snd_fm_port=0x388 snd_irq=5 snd_dma1=0
  snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" pour charger ce gestion
  naire (sans support midi). Je reste convaincu que le support midi
  n'est ncessaire que pour connecter des synthtiseurs etc.  une
  machine Linux. Je n'ai jamais eu besoin du support midi, mme pour
  jouer des fichiers midi).

  Notez que les valeurs "NN" doivent tre prcises, mais je ne sais pas
  quelles valeurs sont les plus raisonnables. Je ne sais d'ailleurs pas
  si la spcification d'une taille DMA est rellement ncessaire.

  Si vous avez un IBM Thinkpad avec ce composant, la lecture de
  http://www.cirs.org/patrick/index.html peut vous tre utile.


  55..33..22..  CCSS44223311

  D'aprs le fichier INSTALL, vous devez fournir le port de la carte.
  Cependant, pour le gestionnaire CS 4235/6/7/8/9 qui suit, il m'a fallu
  fournir toutes les informations ( l'exception des tailles DMA) pour
  que le gestionnaire fonctionne.  Si vous avez initialis la carte avec
  les isapnptools, vous pouvez probablement trouver ces informations
  dans le fichier /etc/isapnp.conf :


       snd_port - port du CS4231 (PnP, par dfaut 0x534)
       snd_mpu_port - port de l'UART MPU-401 (PnP, par dfaut 0x300), -1 pour dsactiver
       snd_irq - IRQ du CS4231 (5,7,9,11,12,15)
       snd_mpu_irq - IRQ de l'UART MPU-401 (9,11,12,15)
       snd_dma1 - canal DMA 1 du CS4231 (0,1,3)
       snd_dma1_size - taille de la mmoire tampon du DMA 1 en Ko (4-64Ko)
       snd_dma2 - canal DMA 2 du CS4231 (0,1,3), -1 si aucun
       snd_dma2_size - taille de la mmoire tampon du DMA 2 en Ko (4-64Ko)




  Lancez un "modprobe snd-card-cs4231 snd_port=0x534 snd_mpu_port=-1
  snd_irq=5 snd_dma1=0 snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN"
  pour charger ce gestionnaire pour une carte configure avec ses
  valeurs par dfaut (sans le support midi, cf la note pour l'OPL-3, ni
  le support manette de jeu). Si vous utilisez d'autres valeurs dans
  /etc/isapnp.conf, reportez-les ici aussi.

  Notez que les valeurs "NN" doivent tre prcises, mais je ne sais pas
  quelles valeurs sont les plus raisonnables. Je ne sais d'ailleurs pas
  si la spcification d'une taille DMA est rellement ncessaire.


  55..33..33..  CCSS44223322 eett CCSS44223322AA

  D'aprs le fichier INSTALL, vous devez fournir le port de la carte.
  Cependant, pour ce gestionnaire et le suivant, il m'a fallu fournir
  toutes les informations ( l'exception des tailles DMA) pour que le
  gestionnaire fonctionne.  Si vous avez initialis la carte avec les
  isapnptools, vous pouvez probablement trouver ces informations dans le
  fichier /etc/isapnp.conf :












  snd_port - port du CS4232 (PnP, par dfaut 0x534)
  snd_cport - port de contrle du CS4232 (PnP, par dfaut 0x120)
  snd_mpu_port - port de l'UART MPU-401 (PnP, par dfaut 0x300), -1 pour dsactiver
  snd_fm_port - port FM du CS4232 (PnP, par dfaut 0x388), -1 pour dsactiver
  snd_jport - port manette de jeu du CS4232 (PnP, par dfaut 0x200), -1 pour dsactiver
  snd_irq - IRQ du CS4232 (5,7,9,11,12,15)
  snd_mpu_irq - IRQ de l'UART MPU-401 (9,11,12,15)
  snd_dma1 - canal DMA 1 du CS4232 (0,1,3)
  snd_dma1_size - taille de la mmoire tampon du DMA 1 en Ko (4-64Ko)
  snd_dma2 - canal DMA 2 du CS4232 (0,1,3), -1 si aucun
  snd_dma2_size - taille de la mmoire tampon du DMA 2 en Ko (4-64Ko)




  Lancez un "modprobe snd-card-cs4232 snd_port=0x534 snd_cport=0x120
  snd_mpu_port=-1 snd_fm_port=0x388 snd_jport=-1 snd_irq=5 snd_dma1=0
  snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" pour charger ce gestion
  naire pour une carte configure avec ses valeurs par dfaut (sans le
  support midi, cf la note pour l'OPL-3, ni le support manette de jeu).
  Si vous utilisez d'autres valeurs dans /etc/isapnp.conf, reportez-les
  ici aussi.

  Notez que les valeurs "NN" doivent tre prcises, mais je ne sais pas
  quelles valeurs sont les plus raisonnables. Je ne sais d'ailleurs pas
  si la spcification d'une taille DMA est rellement ncessaire.


  55..33..44..  CCSS44223355//CCSS44223366//CCSS44223366BB//CCSS44223377BB//CCSS44223388BB//CCSS44223399

  D'aprs le fichier INSTALL, vous devez fournir le port de la carte.
  Cependant, pour une carte  base de CS4237B, il m'a fallu fournir
  toutes les informations ( l'exception des tailles DMA) pour que le
  gestionnaire fonctionne.  Si vous avez initialis la carte avec les
  isapnptools, vous pouvez probablement trouver ces informations dans le
  fichier /etc/isapnp.conf :


       snd_port - port du CS423x (PnP, par dfaut 0x534)
       snd_cport - port de contrle du CS423x (PnP, par dfaut 0x120)
       snd_mpu_port - port de l'UART MPU-401 (PnP, par dfaut 0x300), -1 pour dsactiver
       snd_fm_port - port FM du CS423x (PnP, par dfaut 0x388), -1 pour dsactiver
       snd_jport - port manette de jeu du CS423x (PnP, par dfaut 0x200), -1 pour dsactiver
       snd_irq - IRQ du CS423x (5,7,9,11,12,15)
       snd_mpu_irq - IRQ de l'UART MPU-401 (9,11,12,15)
       snd_dma1 - canal DMA 1 du CS423x (0,1,3)
       snd_dma1_size - taille de la mmoire tampon du DMA 1 en Ko (4-64Ko)
       snd_dma2 - canal DMA 2 du CS423x (0,1,3), -1 si aucun
       snd_dma2_size - taille de la mmoire tampon du DMA 2 en Ko (4-64Ko)




  Lancez un "modprobe snd-card-cs4236 snd_port=0x534 snd_cport=0x120
  snd_mpu_port=-1 snd_fm_port=0x388 snd_jport=-1 snd_irq=5 snd_dma1=0
  snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" pour charger ce gestion
  naire pour une carte configure avec ses valeurs par dfaut (sans le
  support midi, cf la note pour l'OPL-3, ni le support manette de jeu).
  Notes :

    les valeurs "NN" doivent tre prcises, mais je ne sais pas
     quelles valeurs sont les plus raisonnables ;

    mon CS4237B fonctionne parfaitement sans utiliser les options de
     taille DMA.

  55..44..  CChhaarrggeemmeenntt ppaarr kkeerrnneelldd

  kerneld est un daemon qui charge les modules chaque fois que
  ncessaire, et les dcharge quand ils ne sont plus utiliss. N'ayant
  aucune exprience de kerneld, je ne sais pas si les renseignements que
  je donne ici sont fiables. Ils proviennent du fichier INSTALL des
  gestionnaires ALSA. Une excellente source d'informations sur kerneld
  est le Kerneld-mini-HOWTO.

  Procdez ainsi :

    Modifiez votre /etc/conf.modules (des exemples sont donns plus
     loin) ;

    Lancez 'modprobe snd-carte' o carte est le nom de votre carte.
     [Ce que je trouve tonnant, vu que kerneld est cens le charger
     lui-mme ?  VS]

     Exemple de /etc/conf.modules pour une carte Gravis UltraSound PnP :


       alias char-major-14 snd
       alias snd-minor-oss-0 snd-interwave
       alias snd-minor-oss-3 snd-pcm1-oss
       alias snd-minor-oss-4 snd-pcm1-oss
       alias snd-minor-oss-5 snd-pcm1-oss
       alias snd-minor-oss-12 snd-pcm1-oss
       alias snd-card-0 snd-interwave
       options snd snd_major=14 snd_cards_limit=1
       options snd-interwave snd_index=1 snd_id="guspnp" snd_port=0x220 snd_irq=5
       snd_dma1=5 snd_dma2=6




  Exemple pour utiliser plus d'une carte son sur votre machine (ici pour
  une Sound Blaster 16 et une Gravis UltraSound Classic) :


       alias char-major-14 snd
       alias snd-minor-oss-0 snd-mixer
       alias snd-minor-oss-3 snd-pcm1-oss
       alias snd-minor-oss-4 snd-pcm1-oss
       alias snd-minor-oss-5 snd-pcm1-oss
       alias snd-minor-oss-12 snd-pcm1-oss
       alias snd-card-0 snd-sb16
       alias snd-card-1 snd-gusclassic
       options snd snd_major=14 snd_cards_limit=2
       options snd-sb16 snd_index=1 snd_port=0x220 snd_irq=5 snd_dma8=1 snd_dma16=5
       options snd-gusclassic snd_index=2 snd_irq=11 snd_dma1=6 snd_dma2=7




  Exemple si deux cartes Gravis UltraSound Classic sont installes :











  alias char-major-14 snd
  alias snd-minor-oss-0 snd-mixer
  alias snd-minor-oss-3 snd-pcm1-oss
  alias snd-minor-oss-4 snd-pcm1-oss
  alias snd-minor-oss-5 snd-pcm1-oss
  alias snd-minor-oss-12 snd-pcm1-oss
  alias snd-card-0 snd-gusclassic
  alias snd-card-1 snd-gusclassic
  options snd snd_major=14 snd_cards_limit=2
  options snd-gusclassic snd_index=1,2 snd_port=0x220,0x260 snd_irq=5,11
  snd_dma1=5,6 snd_dma2=7,3





  55..55..  CCoommppaattiibbiilliitt OOSSSS

  Si vous souhaitez avoir une compatibilit avec OSS/Free ou OSS/Linux,
  il vous faut charger un gestionnaire de plus : le gestionnaire de
  compatibilit snd-pcm1-oss. Lancez


       modprobe snd-pcm1-oss




  Cela vous donnera le support de /dev/audio et /dev/dsp, comme le font
  les gestionnaires OSS/Free (ceux du noyau) et OSS/Linux (ceux vendus
  sparment).  Notez qu'il ne s'agit que d'une mulation.


  66..  TTeesstteerr eett uuttiilliisseerr

  Maintenant vous tes prt  tester si le gestionnaire sonore est
  rellement disponible, avant de l'utiliser.

  66..11..  LLee ssyyssttmmee ddee ffiicchhiieerrss //pprroocc

  Vous pouvez trouver beaucoup de renseignements sur votre systme dans
  le rpertoire /proc. /proc est un systme de fichiers "virtuel", ce
  qui signifie qu'il n'existe pas rellement, mais fournit grosso modo
  une vue d'ensemble sur les processus de votre ordinateur. Pour que
  /proc soit accessible, votre noyau doit tre compil avec le support
  de /proc, ce qui est le cas dans la plupart des distributions, mais si
  vous avez compil votre propre noyau sans /proc, vous n'aurez bien
  videmment rien dans /proc.

  /proc/modules recense les modules chargs. Une fois les gestionnaires
  ALSA chargs, en tapant cat /proc/modules vous devriez avoir quelque
  chose de ce genre :














  snd-pcm1-oss      4            0
  snd-sb16          1            1
  snd-sb-dsp        4    [snd-sb16]      0
  snd-pcm1          4    [snd-pcm1-oss snd-sb-dsp]      0
  snd-pcm           3    [snd-pcm1-oss snd-sb16 snd-sb-dsp snd-pcm1]    0
  snd-mixer         3    [snd-pcm1-oss snd-sb16 snd-sb-dsp]      1
  snd-mpu401-uart   1    [snd-sb16]      0
  snd-midi          4    [snd-sb16 snd-sb-dsp snd-mpu401-uart]   0
  snd-opl3          1    [snd-sb16]      0
  snd-synth         1    [snd-sb16 snd-opl3]     0
  snd-timer         1    [snd-opl3]      0
  snd               8    [snd-pcm1-oss snd-sb16 snd-sb-dsp snd-pcm1 snd-pcm snd-mixer snd-mpu401-uart snd-midi snd-opl3 snd-synth snd-timer]    0




  Si quelque chose s'est mal pass pendant l'installation du gestion
  naire, vous aurez quand mme quelques gestionnaires snd, mais pas de
  support audio.

  Par exemple (note : ne vous amusez surtout pas  entrer les commandes
  suivantes, le gestionnaire cs4236 a besoin de paramtres) :


       win3:~# modprobe snd-card-cs4236
       /lib/modules/2.0.35/misc/snd-card-cs4236.o: init_module: Device or resource busy
       snd-mixer: Device or resource busy
       win3:~# cat /proc/modules
       snd-cs4236        2           0
       snd-cs4231        3    [snd-cs4236]    0
       snd-timer         1    [snd-cs4231]    0
       snd-pcm1          4    [snd-cs4236 snd-cs4231] 0
       snd-mixer         3    [snd-cs4236 snd-cs4231] 0
       snd-pcm           3    [snd-cs4236 snd-cs4231 snd-pcm1]       0
       snd-mpu401-uart   1           0
       snd-midi          4    [snd-mpu401-uart]       0
       snd-opl3          1           0
       snd-synth         1    [snd-opl3]      0
       snd-timer         1    [snd-cs4231 snd-opl3]   0
       snd               8    [snd-cs4231 snd-timer snd-pcm1 snd-mixer snd-pcm]     0




  Vous pouvez vrifier l'existence d'une carte son en regardant
  /proc/asound/cards.  Par exemple :


       bash$ cat /proc/asound/cards
       0 [card1          : SB16 - Sound Blaster 16
                           Sound Blaster 16 at 0x220, irq 5, dma 1&5




  Dans l'exemple prcdent (o j'ai oubli les options) l'affichage
  aurait t :


       win3:~# cat /proc/asound/cards
       --- no soundcards ---




  Une carte CS4236 fonctionnelle donnerait
       0 [card1         ]: CS4236 - CS4237B
                           CS4237B at 0x534, irq 7, dma 1&0




  Si vous avez beau vrifier et revrifier vos rglages et que vous
  n'avez toujours rien, allez faire un tour dans la section dpannage.

  Le rpertoire virtuel /proc/asound fournit beaucoup d'autres
  renseignements sur le gestionnaire. Notez cependant que /proc/asound
  n'existera qu'une fois le premier module ALSA charg. S'il n'y a pas
  de /proc/asound, cela signifie simplement que le module snd n'a pas
  t charg convenablement.  Vous pouvez trouver la liste des cartes
  installes dans /proc/asound/cards, puis des renseignements sur la
  premire dans /proc/asound/0, sur la suivante dans /proc/asound/1,
  etc.

  Si cat /proc/asound/card1/pcm0 donne quelque chose du genre :


             ES1370 DAC2/ADC
             Playback isn't active.
             Record isn't active.




  cela signifie que votre gestionnaire est prt  l'emploi, mais ne fait
  rien pour l'instant (donc tout s'est bien pass).

  Pour les utilisateurs de noyau 2.0.x, il existe une troisime faon
  d'obtenir des renseignements sur les gestionnaires sonores, si vous
  avez charg le module de compatibilit OSS,  savoir le priphrique
  /dev/sndstat. Les gestionnaires ALSA vous demandent poliment de ne pas
  vous fier  cette source d'informations, car elle n'est l que pour la
  compatibilit avec les gestionnaires OSS, et de meilleurs
  renseignements sont facilement disponibles via /proc/asound. Sous les
  noyaux 2.2.x, ALSA utilise le module soundcore du noyau et ne peut pas
  muler /dev/sndstat, car cela interfrerait avec les gestionnaires
  OSS.


  66..22..  LLee mmiixxeerr

  Une fois les gestionnaires de votre carte son installs, comme vous
  l'indique /proc, vous pouvez essayer de faire du bruit. Tout d'abord,
  installez le paquetage d'utilitaires, ou tout au moins placez la
  commande amixer  un endroit raisonnable (comme /usr/local/bin).

  Commencez par examiner les rglages du mixer en lanant amixer.
  Cette commande affiche les rglages du mixer,  savoir les rglages de
  volume des diffrentes parties de la carte son. Le rsultat peut
  varier normment d'une carte  l'autre. Ma Soundblaster 16 donne :












  Master         0  % (-14.00dB) : 0  % (-14.00dB)
  Bass           0  % (-14.00dB) : 0  % (-14.00dB)
  Treble         0  % (-14.00dB) : 0  % (-14.00dB)
  Synth          0  % (-62.00dB) : 0  % (-62.00dB)
  PCM            0  % (-62.00dB) : 0  % (-62.00dB)
  Line-In        0  % (-62.00dB) : 0  % (-62.00dB) Mute
  MIC            0  % (-62.00dB) : 0  % (-62.00dB) Mute
  CD             0  % (-62.00dB) : 0  % (-62.00dB) Mute
  In-Gain        0  % (-18.00dB) : 0  % (-18.00dB)
  Out-Gain       0  % (-18.00dB) : 0  % (-18.00dB)
  PC Speaker     0  % (-18.00dB) : 0  % (-18.00dB)




  Ma carte son  base de Crystal 4237B a beaucoup d'autres options :


       Master D       0  % (-22.00dB) : 0  % (-22.00dB) Mute
       3D Center      0  % (-22.50dB) : 0  % (-22.50dB)
       3D Space       0  % (-22.50dB) : 0  % (-22.50dB) Mute
       Synth          0  % (-94.50dB) : 0  % (-94.50dB) Mute
       FM             0  % (-94.50dB) : 0  % (-94.50dB) Mute
       DSP            0  % (-94.50dB) : 0  % (-94.50dB) Mute
       PCM            0  % (-94.50dB) : 0  % (-94.50dB) Mute
       Line-In        0  % (-34.50dB) : 0  % (-34.50dB) Mute
       MIC            0  % (-22.50dB) : 0  % (-22.50dB) Mute
       CD             0  % (-34.50dB) : 0  % (-34.50dB) Mute
       Record-Gain    0  % (  0.00dB) : 0  % (  0.00dB)
       In-Gain        0  % (-18.00dB) : 0  % (-18.00dB)
       Loopback       0  % (-94.50dB) : 0  % (-94.50dB) Mute
       Mono           0  % (-45.00dB) : 0  % (-45.00dB) Mute
       Aux A          0  % (-34.50dB) : 0  % (-34.50dB) Mute




  Si vous ne recevez qu'un laconique amixer: Specify command..., vous
  utilisez les utilitaires d'ALSA 0.3.2. Vous en avez besoin pour
  utiliser les gestionnaires 0.3.0+, mais il n'y a pas encore de
  documentation et comme la nouvelle interface du mixer est encore en
  beta test, je vous recommande de vous en tenir  ALSA 0.3.0-pre4. De
  plus, le nouvel amixer n'a pas encore de page man, vous devrez vous
  dbrouiller tout seul.


  66..22..11..  RRggllaaggee dduu mmiixxeerr eenn lleeccttuurree

  Vous aurez remarqu les indications Mute (Muet) pour certains
  priphriques. Cela signifie que ces priphriques n'mettront pas de
  son, quel que soit le rglage du volume. Certaines cartes (comme ici
  le CS4237B) mettent mme le canal principal en sourdine.  Ainsi, pour
  le CS4237B, il me faut lancer

  amixer "master d" unmute

  pour pouvoir entendre le moindre son. La Soundblaster n'a pas de
  sortie en sourdine, mais

  amixer master 100 unmute

  rglerait le volume  100% et ractiverait le canal principal. Vous
  pouvez utiliser un nombre, un des mots mute et unmute, ou les
  deux.  Lancez


  amixer "master d" 100; amixer pcm 100 unmute

  pour rgler le volume principal du CS4237B au maximum, activer le
  canal PCM et rgler son volume au maximum. Pour des rglages spars
  sur les canaux gauche et droite, utilisez un signe deux-points, par
  exemple

  amixer CD 25:50

  (et non, je ne sais pas lequel est le gauche et lequel est le droit,
  mais de toute faon cela dpend aussi fortement de la position de vos
  haut-parleurs).


  66..22..22..  llmmeennttss dduu mmiixxeerr

  Les diffrentes parties du mixer peuvent tre droutantes si vous
  n'avez pas de connaissances sur la production du son numrique. Le
  sound-HOWTO peut vous aider un peu, mais voici ici une brve
  explication.

  Vous aurez sans doute besoin de seulement quelques lments : l'un
  d'entre eux est le rglage CD (le volume de votre lecteur de cd-rom,
  pourvu qu'il soit connect  la carte son par un cble  3 ou 4 fils
  rouge,blanc et noir).

  Le rglage PCM est utilis pour la plupart des applications. Les
  programmes comme mpg123, xmms, speakfreely, realplayer et la plupart
  des autres utilisent le canal PCM.

  MIC reprsente le micro, line-in est une entre supplmentaire
  (pas toujours prsente) de votre carte son.

  Les rglages gain permettent un rglage supplmentaire
  d'amplification.


  66..22..33..  RRggllaaggee dduu mmiixxeerr eenn eennrreeggiissttrreemmeenntt

  Vous pouvez rgler le canal CD en enregistrement en entrant

  amixer cd rec

  puis le remettre en lecture avec

  amixer cd norec.

  Si vous prfrez enregistrer depuis un micro, vous devrez probablement
  utiliser

  amixer record-gain 100; amixer mic 100 rec mute

  (ne pas mettre l'entre micro en sourdine produit des parasites si le
  micro capte son propre signal par les haut-parleurs). La plupart des
  micros ont un rglage de gain permettant d'amplifier le volume ;
  vous allez probablement devoir l'utiliser si vous ne recevez pas le
  moindre son du micro.


  66..22..44..  AAuuttrreess rrggllaaggeess dduu mmiixxeerr

  Malheureusement, je n'ai pas pu modifier le rglage des canaux "3d
  center" et "3d space" avec amixer. Si quelqu'un y parvient, faites-le
  moi savoir. Vous pouvez cependant utiliser alsamixer pour cela.


  La FAQ ALSA prtend qu'il est possible de restaurer les rglages du
  mixer avec cat <fichier> > /proc/asound/N/mixerC0D0, o <ficher
  contient une prcdente copie de /proc/asound/N/mixerC0D0. Je n'ai pas
  pu le faire sur mon systme, il se plaint de priphriques non
  existants.

  66..33..  LLeess pprriipphhrriiqquueess //ddeevv//ssnndd//

  Les gestionnaires ALSA ont des priphriques associs dans le
  rpertoire /dev/snd.  Si vous avez une carte, vous devriez avoir les
  priphriques suivants :


       /dev/snd/pcmC0D0 - la sortie PCM de la carte0
       /dev/snd/mixerC0D0 - le mixer de la carte 0
       /dev/snd/controlC0D0 - le contrleur de la carte 0




  Le premier chiffre est le numro de la carte son, le deuxime (s'il y
  a lieu) tant le numro du priphrique. Une carte son ayant deux sor
  ties PCM aurait pcmC0D0 et pcmC0D1.  Note : les gestionnaires ALSA ont
  chang de notation par rapport  la prcdente version, qui utilisait
  /dev/snd/pcm00 (premier chiffre pour la carte, deuxime chiffre pour
  le priphrique). Si ce HOWTO emploie l'ancienne notation, prvenez-
  moi pour que je le corrige.

  Maintenant, vous tes prt  envoyer un fichier son dans la sortie PCM
  de la premire carte. Essayez de copier n'importe quel fichier texte
  dans /dev/snd/pcmC0D0 ainsi : cat <fichier > /dev/snd/pcmC0D0. Le
  fichier peut tre quelconque, pourvu qu'il ne soit pas de longueur
  nulle. Si vous avez un fichier son qui trane quelque part, vous
  pouvez l'essayer. Vous pouvez aussi rcuprer le fichier en
  http://www.ldp.org/sounds/english.au, pour entendre Linus Torvalds
  expliquer comment prononcer Linux.

  La configuration par dfaut de votre priphrique sonore est 8000 Hz,
  8 bits.  Ce qui signifie que le fichier "english.au" mentionn plus
  haut gnrera de la voix, tandis que les autres fichiers gnreront
  probablement des parasites.  Si vous n'entendez rien, vrifiez vos
  haut-parleurs, essayez de relancer amixer ou consultez un mdecin.
  (Plus loin vous pourrez utiliser les fonctionnalits 48 kHz, 16 bit de
  votre carte son avec votre programme audio prfr, comme sox ou
  mpg123).

  Si vous avez charg le module snd-pcm1-oss, vous pouvez galement
  utiliser la compatibilit OSS pour accder  votre carte son. Les
  correspondances suivantes sont alors effectues :


       /dev/snd/pcmC0D0 -> /dev/audio0 (/dev/audio) -> numro mineur 4
       /dev/snd/pcmC0D0 -> /dev/dsp0 (/dev/dsp) -> numro mineur 3
       /dev/snd/pcmC0D1 -> /dev/adsp0 (/dev/adsp) -> numro mineur 12
       /dev/snd/pcmC1D0 -> /dev/audio1 -> numro mineur 4+16 = 20
       /dev/snd/pcmC1D0 -> /dev/dsp1 -> numro mineur 3+16 = 19
       /dev/snd/pcmC1D1 -> /dev/adsp1 -> numro mineur 12+16 = 28
       /dev/snd/pcmC2D0 -> /dev/audio2 -> numro mineur 4+32 = 36
       /dev/snd/pcmC2D0 -> /dev/dsp2 -> numro mineur 3+32 = 35
       /dev/snd/pcmC2D1 -> /dev/adsp2 -> numro mineur 12+32 = 44






  66..44..  IInnffoorrmmaattiioonnss ccoommppllmmeennttaaiirreess

  Le fichier INSTALL des gestionnaires ALSA mentionne quelques trucs et
  astuces pour indiquer leurs rglages aux gestionnaires. Leur utilit
  dpend des applications sonores dont vous vous servez. Les
  applications classiques, comme mpg123, sox (gnralement utilise par
  la commande play), ou RealPlayer, fonctionneront probablement
  parfaitement sans avoir recours  ces astuces.  Je n'en ai jamais eu
  besoin personnellement.

  66..44..11..  //pprroocc//aassoouunndd//NN//ppccmmNN00




       "Playback erase" - efface toutes les informations sur les applications OSS
       "Playback <application> <nombre de fragments> <taille des fragments> [<options>]"
       "Record erase" - efface toutes les informations sur les applications OSS
       "Record <application> <nombre de fragments> <taille des fragments> [<options>]"




  application - nom de l'application (avec ou sans chemin complet).

  nombre de fragments - nombre de fragments, ou zro pour laisser le
  choix  ALSA.

  taille des fragments - taille des fragments en octets, ou zro pour
  laisser le choix  ALSA.

  options - paramtres optionnels

  WR_ONLY - si l'application tente d'ouvrir le priphrique PCM en mode
  O_RDWR, modifier en O_WRONLY (pas d'enregistrement) - pour Quake etc.

  Exemples :


       echo "Playback x11amp 128 16384" > /proc/asound/0/pcm00
       echo "Playback squake 0 0 WR_ONLY" > /proc/asound/0/pcm00




  66..44..22..  //pprroocc//aassoouunndd//NN//ssbb1166




       "Playback 8" -> n'utiliser que le canal DMA 8 bits pour la lecture.
       "Playback 16" -> n'utiliser que le canal DMA 16 bits pour la lecture.
       "Playback auto" (par dfaut) -> choix automatique : la premire ouverture utilisera le canal DMA 16 bits.
       "Record 8" -> n'utiliser que le canal DMA 8 bits pour l'enregistrement.
       "Record 16" -> n'utiliser que le canal DMA 16 bits pour l'enregistrement.
       "Record auto" (par dfaut) -> choix automatique : la premire ouverture utilisera le canal DMA 16 bits.




  Exemple : echo "Record 16" > /proc/asound/0/sb16

  Pour plus d'informations, consultez le fichier INSTALL.



  77..  AAssttuucceess eett ddppaannnnaaggee

  Pensez  lire la FAQ dans le rpertoire des gestionnaires sonores.
  Cette section est toujours en construction.

  77..11..  CCoommppiillaattiioonn ddeess ggeessttiioonnnnaaiirreess


  77..11..11..  AArrbboorreesscceennccee ddeess ssoouurrcceess dduu nnooyyaauu

  Si vous n'arrivez pas  compiler vos gestionnaires ALSA, avec des
  messages d'erreur mentionnant version.h ou d'autres fichiers d'en-
  ttes non trouvs, cela peut signifier que vous n'avez pas les
  fichiers d'en-ttes du noyau.  Allez consulter le kernel-HOWTO,
  dcompactez un noyau rcent dans /usr/src et lancez make config.


  77..22..  CChhaarrggeemmeenntt ddeess ggeessttiioonnnnaaiirreess

  Pensez  vrifier les points suivants :


  77..22..11..  CCoommppaattiibbiilliitt ddeess ccaarrtteess ssoonn

  tes vous certain que votre carte EST supporte ? Vrifiez encore.  Il
  arrive qu'un modle X123 ne soit pas exactement un modle X123b, et
  vous perdrez votre temps.  D'un autre ct, mme une carte supporte
  peut vous poser problme - il m'a fallu deux heures pour installer une
  carte CS4237B, ce qui, aprs tout, n'tait qu'un excellent cas de
  RTFM.


  77..22..22..  ((uunnrreessoollvveedd ssyymmbboollss)) PPrriipphhrriiqquuee oouu rreessssoouurrccee ooccccuuppee
  ((ddeevviiccee bbuussyy)) oouu ssyymmbboolleess nnoonn rrssoolluuss

  Il se peut que vous ayez un noyau 2.0.x avec le support son intgr,
  ou que le gestionnaire OSS/Lite (celui du noyau) soit charg (vrifiez
  par cat /proc/modules). Retirez le gestionnaire ou recompilez le noyau
  (reportez-vous au Kernel-HOWTO).

  Le module son des noyaux 2.0 est nomm sound.o et nnee doit ppaass tre
  actif (contrairement au gestionnaire ALSA snd.o, bien entendu).

  Si vous avez un noyau 2.2.x sans support son, les gestionnaires ALSA
  ne fonctionneront pas non plus.


  77..22..22..11..  NNooyyaauuxx 22..00..xx

  Je sais que c'est un peu confus, mais laissez-moi expliquer une fois
  de plus. Si vous avez un nnooyyaauu 22..00..xx (la commande uname -a renvoyant
  quelque chose du genre Linux pingouin 2.0.35 #6 Wed Sep 23 10:19:16
  CEST 1998 i686 unknown) alors vous devez ddssaaccttiivveerr ttoouutt ssuuppppoorrtt ssoonn
  dans le noyau.


  77..22..22..22..  NNooyyaauuxx 22..22..xx

  Si vous avez un nnooyyaauu 22..22..xx vous avez bbeessooiinn dduu ssuuppppoorrtt ssoonn. Un noyau
  2.2 doit tre compil avec le support son, mais sans le moindre
  gestionnaire de carte son. Il vous faut donc choisir le support son et
  vrifier qu'aucun autre gestionnaire spcifique n'est compil.




  77..22..33..  RRffrreenncceess  dd''aauuttrreess ggeessttiioonnnnaaiirreess

  Une autre raison pour laquelle le gestionnaire se plaint que le
  priphrique est occup peut tre que le fichier /etc/conf.modules
  rfrence encore les anciens gestionnaires. Vous devriez effacer ces
  rfrences et ne laisser que des rfrences aux gestionnaires ALSA
  (bien sr, laissez les gestionnaires non sonores tels quels).


  77..22..44..  SSyymmbboolleess nnoonn rrssoolluuss,, ddeeuuxxiimmee

  Une autre cause des messages symboles non rsolus peut tre un noyau
  plus rcent que les gestionnaires. Assurez-vous de recompiler les
  gestionnaires ALSA aprs chaque changement de noyau, de faon  tre
  certain d'avoir des gestionnaires correspondant  votre noyau.


  77..22..55..  VVrriiffiieezz llee rrggllaaggee PPnnPP

  tes-vous sr que votre carte son est active ? Relisez donc le PnP-
  HOWTO, et vrifiez que votre carte son est correctement active.


  77..22..66..  VVooss ppaarraammttrreess ssoonntt--iillss ccoorrrreeccttss ??

  Vrifiez encore et toujours les paramtres de votre carte son.
  N'oubliez pas que 534 n'est pas la mme chose que 543, pas plus que
  0x534 n'est 534.

  Pensez galement que certaines cartes doivent tre charges avec un
  nom diffrent de celui suppos. Faites une pause, allez boire une
  bire ou toute autre boisson, et vrifiez encore votre commande
  modprobe. Par exemple, le gestionnaire Crystal 4232 doit tre insr
  par modprobe snd-cs4232, pas snd-cs4231, et que celui de la
  SoundBlaster PCI64 se nomme snd-audiopci, pas snd-es1370 (tout est
  dans la documentation, et bien que je sois l'auteur du HOWTO, il m'est
  arriv de passer une soire  essayer de faire jouer du son  snd-
  cs4231).


  77..33..  GGeessttiioonnnnaaiirree cchhaarrgg...... mmaaiiss aauuccuunn ssoonn ((oouu  ppeeiinnee aauuddiibbllee))



  77..33..11..  LLaa ssoouurrddiinnee

  Les gestionnaires ALSA exploitent les possibilits de sourdine dont
  disposent la plupart des cartes son. Si vous avez charg les
  gestionnaires impeccablement mais qu'ils s'obstinent  rester
  silencieux, vous avez probablement oubli de dsactiver la sourdine.
  Il vous faut amixer ou alsamixer pour cela, tous deux prsents
  dans le paquetage alsa-utils.  Un simple


       amixer -c 1 master 70:70 unmute
       amixer -c 1 pcm 70:70 unmute
       amixer -c 1 cd 70:70 unmute




  devrait suffire  la plupart des applications.




  77..33..22..  AAmmpplliiffiiccaattiioonn

  La plupart des cartes son ont un rglage de mixer supplmentaire pour
  amplifier le son en entre ou en sortie. Ce rglage est communment
  appel gain, in-gain pour l'entre et out-gain pour la sortie.
  Agir sur ce rglage vous aidera beaucoup  obtenir le niveau sonore
  maximum de vos haut-parleurs (mais pensez  vos parents, voisins et 
  vos oreilles tout de mme).  Une commande comme


       amixer out-gain 100 unmute




  pourra probablement rendre service.


  77..33..33..  CCoommppaattiibbiilliitt aavveecc OOSSSS//LLiinnuuxx

  S'il s'agit de votre premire utilisation des gestionnaires ALSA, vous
  souhaiterez probablement utiliser le support son exactement comme vous
  le faisiez avant, (i.e.  l'aide des gestionnaires /dev/pcmX). Il vous
  faut pour cela le gestionnaire de compatibilit OSS. Faites un
  modprobe snd-pcm1-oss (reportez-vous  la fin de la section pour le
  chargement des modules).  Veuillez noter que snd-pcm1-oss est
  diffrent de snd-pcm1, vous avez rreelllleemmeenntt bbeessooiinn de snd-pcm1-oss
  pour le support  l'ancienne.


  77..33..44..  IImmppoossssiibbllee dd''aaccccddeerr aauu mmiixxeerr

  Si vous avez essay d'installer plusieurs versions diffrentes d'ALSA,
  il arrive que le mixer ne puisse plus tre utilis. Cela se produit
  quand vous avez install ALSA 0.3.2 puis tes revenu  ALSA 0.3.0-pre4
  (si ma mmoire est bonne). Dans ce cas, effacez tous les fichiers
  libasound et les liens dans /usr/lib et recompiler les bibliothques
  et les utilitaires :


       rm /usr/lib/libasound.*




  Pour tre vraiment tranquille, effacez tous les gestionnaires ALSA
  ensuite, puis recompilez et rinstallez les gestionnaires.


  77..44..  QQuueellqquueess ssuuggggeessttiioonnss



  77..44..11..  EEssssaayyeezz iinnssmmoodd

  Il est parfois utile de commencer avec insmod au lieu de kerneld.
  Comme a, vous pourrez peut-tre voir un message d'erreur.


  77..44..22..  LLiisseezz llee ffiicchhiieerr IINNSSTTAALLLL

  Le fichier INSTALL du rpertoire des gestionnaires contient beaucoup
  d'informations. Si votre gestionnaire ne fonctionne pas, regardez s'il
  n'y a pas d'informations complmentaires.


  77..44..33..  MMeessssaaggeess ddee ddbboogguuaaggee

  En dernier ressort, vous pouvez recompiler les gestionnaires en leur
  indiquant d'envoyer des informations de dboguage dans
  /var/log/messages. Allez dans le rpertoire des gestionnaires (cd
  /usr/src/alsa-driver-... et lancez :



       ./configure --with-debug=detect; make clean; make




  Retirez le gestionnaire (s'il est actif, voir plus bas pour une
  commande pratique).  Puis relancez la commande "modprobe" que vous
  aviez utilise prcdemment, pour charger le gestionnaire frachement
  compil.  Allez voir dans /var/log/messages s'il y a des messages.


  77..44..44..  SSii rriieenn nnee vvaa pplluuss......

  Si ces messages ne peuvent vous aider, envoyez un message  la liste
  de diffusion des dveloppeurs ALSA, alsa-devel@alsa-project.org en
  prcisant les informations suivantes :

    nom de votre carte son, ainsi que les noms des composants prsents
     sur la carte ;

    les sections appropries de votre fichier isapnp.conf si vous avez
     des cartes sons PnP ;

    votre fichier conf.modules ou la commande que vous utilisez pour
     activer les gestionnaires ALSA ;

    tous les messages de /var/log/messages concernant les gestionnaires
     ALSA.


  77..55..  RRaappppoorrttss ddee bbuuggss

  Si vous avez dcouvert un bug, les dveloppeurs d'ALSA seraient
  heureux de connatre les informations suivantes (au minimum) :

  1. versions de votre noyau et de vos gestionnaires : 'cat
     /proc/asound/version' ;

  2. informations sur la carte son :

    nom de la carte son ;

    liste des composants prsents sur la carte ;

    contenu de 'cat /proc/asound/cards' ;

  3. tous les messages de /var/log/messages concernant les gestionnaires
     ALSA ;

  4. une description du problme.


  77..66..  AAssttuuccee :: jjoouueerr ddeess CCDD aauuddiioo

  Si vous utilisez kmod ou kerneld et les gestionnaires ALSA pour jouer
  des CD audio, ni kmod ni kerneld ne vont probablement charger les
  gestionnaires comme attendu. Cela est d au fait que les lecteurs CD
  en ligne de commande ne font que demander au lecteur de cd-rom de
  lancer la lecture audio, sans utiliser les priphriques sonores qui
  pourraient indiquer  kmod ou kerneld qu'une sortie son va avoir lieu.
  L'utilisation de modprobe sera probablement votre seule solution  ce
  problme.


  77..77..  AAssttuuccee :: iinnssttaallllaattiioonn dduu ggeessttiioonnnnaaiirree ssrriiee MMIIDDII

  Normalement, le port srie est gr par le gestionnaire srie
  standard. Avant de pouvoir faire modprobe snd-serial il vous faut
  demander au gestionnaire de ne plus s'occuper du port srie.

  Voici comment faire :



       setserial /dev/ttyS0 none
       modprobe snd-serial




  (en remplaant /dev/ttyS0 par le gestionnaire /dev/ttySx correspondant
   votre priphrique MIDI).


  77..88..  AAssttuuccee ::  nnoouuvveeaauu nnooyyaauu,, nnoouuvveeaauuxx mmoodduulleess !!

  Aprs chaque mise  jour de votre noyau, vous devrez probablement
  recompiler les gestionnaires ALSA. S'ils se trouvent toujours dans le
  rpertoire /usr/src, n'oubliez pas de lancer un make clean avant de
  refaire la squence ./configure, make, make install.

  Oh, et il ya aussi ce problme de numrotation : le noyau 2.2.0ac1
  est vu comme un not a number (pas un nombre) par le script
  configure. Il me semble que cela a t rsolu dans les scripts plus
  rcents, sinon vous pouvez peut-tre modifier le numro de version du
  noyau dans les sources.


  77..99..  AAssttuuccee :: KKDDEE eett lleess ggeessttiioonnnnaaiirreess AALLSSAA

  Supposons que vous avez une installation de KDE en tat de marche,
  mais que vous n'arrivez pas  faire fonctionner les sons systme,
  comme pour l'ouverture des fentres, les changements de bureaux, etc.
  Le son fonctionne en gnral. Si votre lecteur de CD audio et votre
  lecteur mp3 fonctionnent, cela est probablement d au fait que
  kwmsound est manquant.

  Solution : vrifiez que "kwmsound" figure dans votre script de
  dmarrage ($KDEDIR/bin/startkde)


  77..1100..  AAssttuuccee :: uuttiilliisseezz lleess pprriipphhrriiqquueess AALLSSAA

  Si vous aviez le support son sous Linux prcdemment, vos applications
  se rfrent probablement  /dev/pcm0, /dev/audio et /dev/mixer. C'est
  parfait si vous utilisez la compatibilit OSS  l'aide du module snd-
  pcm1-oss. Il serait mieux, cependant, d'utiliser les vritables
  priphriques ALSA, ceux de /dev/snd.





  77..1111..  AAssttuuccee :: rreettiirreerr ttoouuss lleess mmoodduulleess

  Retirer une dizaine de modules un par un est pnible. Heureusement,
  tous les modules commencent par le prfixe "snd-", et une petite ligne
  de commande fera l'affaire.  Vous pouvez retirer facilement les
  modules ALSA  l'aide de la commande suivante :



       cat /proc/modules|gawk '/^snd-/{print $1}|xargs -i rmmod {}




  Juergen Kahrs ajoute : J'ai crit un script qui retire galement
  soundcore et soundlow s'ils sont prsents et que le son n'est plus
  utilis. Ce script traite trois fois /proc/modules afin de ne pas
  laisser traner trop de modules. Cette solution est :


       awk '/^snd/||/^sound/&&($3==0){system("rmmod " $1)}' /proc/modules /proc/modules /proc/modules




  Note : si un module est dpendant d'un autre, il n'est pas possible de
  commencer par retirer le premier. Cela signifie qu'il se peut que vous
  deviez relancer la commande de retrait une deuxime fois (je n'ai
  cependant jamais rencontr cette situation, il semble qu'il soit
  possible de retirer les modules ALSA dans l'ordre dans lequel ils
  apparaissent dans /proc/modules).



































  Comment installer un serveur FTP securise
  Christopher Klaus <cklaus@shadow.net>
  26 Juillet 94

  Ce  document pourra interesser tous ceux qui envisagent d'installer un
  serveur FTP anonyme sur leur systeme  Linux.  Ecrit  par   Christopher
  Klaus,  il  est  poste  regulierement  dans  le  groupes  de nouvelles
  comp.security.misc  sous  le  titre  ``computer-security/anonymous-ftp
  FAQ''.   Traduction et adaptation par Michel Billaud <billaud@labri.u-
  bordeaux.fr> (Septembre 1995).

  11..  IInnttrroodduuccttiioonn

  Ce qui suit est une liste  de  questions-reponses  sur  l'installation
  d'un serveur FTP securise.

  Il  est  bien  connu que les serveurs FTP sont utilises pour effectuer
  des transferts illegaux de fichiers.  Un  serveur  FTP  mal  configure
  offre   beaucoup d'opportunites d'acces a des pirates. Enfin, beaucoup
  de serveurs presentent des breches de securite.

  Cette FAQ (liste de questions frequentes) est destinee a  limiter  les
  degats  en donnant aux administrateurs une liste de points a controler
  pour s'assurer que leur serveur FTP  est  bien  configure,  et  qu'ils
  possedent bien la derniere version du demon FTP.

  22..  LLiissttee ddee qquueessttiioonnss--rreeppoonnsseess

  Le texte est organise comme suit :

  1. Description generale de l'installation d'un serveur de FTP anonyme

  2. Installation d'un serveur FTP securise a racine deplacee

  3. Informations specifiques au systeme d'exploitation et suggestions

  4. Ou obtenir d'autres demons FTP.

  5. Comment savoir si votre serveur FTP anonyme est securise

  6. Archie

  22..11..   DDeessccrriippttiioonn  ggeenneerraallee  ddee  ll''iinnssttaallllaattiioonn  dd''uunn  sseerrvveeuurr ddee FFTTPP
  aannoonnyymmee

  Comment installer un ftp anonyme securise  ?

  LLiisseezz ttoouutteess lleess nnootteess eett ttoouuss lleess aavveerrttiisssseemmeennttss !!

  1. Ajoutez  un  nouvel  utilisateur ftp dans /etc/passwd.  Utilisez un
     groupe ordinaire. Le repertoire d'accueil de cet  utilisateur  sera
     ~ftp,  ce  sera  la  racine  de l'arborescence que les utilisateurs
     anonymes verront.

     Utilisez un mot de  passe  et  un  shell  invalides  pour  plus  de
     securite.  Cette ligne du fichier passwd ressemblera a ceci :

     ftp:*:400:400:Anonymous FTP:/home/ftp:/bin/true

  2. Creez  le  repertoire  d'accueil ~ftp, et  donnez-en la propriete a
     root (ppaass aa ftp). Ainsi, les permissions  du  proprietaires  seront
     attribuees  a  root, et les permissions de groupes concerneront les
     utilisateurs anonymes. Mettez les droits  d'acces  de  ~ftp  a  555
     (lecture, pas d'ecriture, execution).

       Certaines pages de manuel recommandent d'attribuer le reper-
       toire ~ftp a l'utilisateur ftp. NNee llee ffaaiitteess ssuurrttoouutt ppaass  si
       vous tenez a la securite de votre systeme.

  3. Creez  le  repertoire ~ftp/bin appartenant a root (groupe wheel par
     exemple),  avec  les  droits  d'acces  111  (pas  de  lecture,  pas
     d'ecriture, execution).

  4. Copiez le programme ls dans  ~ftp/bin. ls appartiendra a root, avec
     les droits 111 (pas de lecture, pas  d'ecriture,  execution).  Vous
     donnerez  les  memes droits a toutes les commandes que vous mettrez
     ulterieurement dans  ~ftp/bin.

  5. Creez le repertoire ~ftp/etc, propriete de  root  avec  les  droits
     111.

  6. Creez  des fichiers passwd et group dans  ~ftp/etc, avec les droits
     444. Le fichier passwd ne devrait contenir que root,  daemon,  uucp
     et  ftp.   Le  fichier  group  contiendra  le  groupe  choisi  pour
     l'utilisateur ftp. Utilisez vos fichiers /etc/passwd et  /etc/group
     comme modeles pour ~ftp/etc/passwd et  ~ftp/etc/group.  Vous pouvez
     changer les noms  d'utilisateurs  dans  ce  fichier,  ils  ne  sont
     utilises  que  par  la  commande ls. Si par exemple les fichiers de
     votre arborescence ~ftp/pub/linux sont  geres  par  un  utilisateur
     balon ayant l'uid 156, vous pouvez mettre la ligne

             linux:*:156:120:Kazik Balon::

  dans  le  fichier   ~ftp/etc/passwd  (independemment de son vrai nom).
  Ne faites figurer que les utilisateurs qui possedent des fichiers dans
  l'arborescence  FTP, (c'est-a-dire root, daemon, ftp...)  et supprimez
  resolument ttoouuss les mots de passe en  les  replacant  par  une  etoile
  ``*''.  Les  lignes  du fichier   ~ftp/etc/passwd ressembleront donc a
  ceci :

          root:*:0:0:Ftp maintainer::
          ftp:*:400:400: Anonymous ftp::

  Pour  plus  de  securite,  vous  pouvez  tout   simplement   supprimer
  ~ftp/etc/passwd  et  ~ftp/etc/group (dans ce cas la commande ``ls -l''
  ne montrera pas les noms des groupes des repertoires). Le demon FTP de
  Wuarchive (et d'autres) se base egalement  sur le contenu des fichiers
  group et passwd : lire la documentation appropriee.

  7. Creez le repertoire ~ftp/pub. Ce repertoire  vous  appartiendra  et
     aura le meme groupe que ftp avec les droits 555. Sur la plupart des
     systemes  (comme  SunOs)  vous  pourrez  donner  les  droits   2555
     (positionnant le bit set-group-id) pour que les fichiers crees dans
     ce repertoire appartiennent au meme groupe.

     Les  fichiers  deposes  dans  ce  repertoire   seront   accessibles
     publiquement.  Vous mettrez les memes droits d'acces 555 a tous les
     sous-repertoires de  ~ftp/pub.

     Ni le repertoire d'accueil  ~ftp, ni aucun de ses  sous-repertoires
     ne  devra  appartenir  a  l'utilisateur ftp (ni aucun fichier nulle
     part ailleurs).  Les demons FTP  modernes  supportent  des  tas  de
     commandes  tres  utiles, comme chmod, qui permettent de modifier de
     l'exterieur  les  droits  d'acces  que  vous  avez   laborieusement
     positionnes. Des options de configurations permettent de desactiver
     ces commandes (ici WuFTP) :

     ___________________________________________________________________
     # all the following default to "yes" for everybody
     delete          no      guest,anonymous         # delete permission?
     overwrite       no      guest,anonymous         # overwrite permission?
     rename          no      guest,anonymous         # rename permission?
     chmod           no      anonymous               # chmod permission?
     umask           no      anonymous               # umask permission?
     ___________________________________________________________________

  8. Si vous voulez que les utilisateurs anonymes puissent  deposer  des
     fichiers, creez le repertoire ~ftp/pub/incoming (proprietaire root,
     droits  733).  Faites  un   ``chmod   +t    ~ftp/pub/incoming   ''.
     Normalement   le  demon  FTP  interdit  aux  utilisateurs  anonymes
     d'ecraser un fichier existant, mais un utilisateur normal  pourrait
     detruire  n'importe  quoi.  En mettant les droits a 1733 ce ne sera
     plus possible. Avec wuftpd vous pouvez configurer le demon pour que
     les fichiers crees le soient avec les droits 600 et appartiennent a
     root (ou tout autre utilisateur).

     Parfois repertoires ``incoming'' sont utilises frauduleusement pour
     echanger  de  fichiers pirates ou pornographiques.  Les fraudeurs y
     creent des sous-repertoires caches precisement  dans  ce  but.   Ca
     aide  un  peu  de  rendre  le repertoire incoming illisible par les
     utilisateurs anonymes.  Avec les serveurs FTP usuels,  on  ne  peut
     pas  empecher  la creation de repertoires dans incoming. Le serveur
     ftp  de  WUarchive  permet  de  limiter  les  depots   a   certains
     repertoires,  et  de  mettre des restrictions sur les noms que l'on
     peut donner aux fichiers, comme par exemple:

     ___________________________________________________________________
     # specify the upload directory information
     upload  /var/spool/ftp  *       no
     upload  /var/spool/ftp  /incoming       yes     ftp     staff   0600    nodirs

     # path filters                                                                                  # path-filter...
     path-filter  anonymous  /etc/msgs/pathmsg  ^[-A-Za-z0-9_\.]*$  ^\.  ^-
     path-filter  guest      /etc/msgs/pathmsg  ^[-A-Za-z0-9_\.]*$  ^\.  ^-
     ___________________________________________________________________

       SSuuggggeessttiioonn : installez votre arborescence FTP  (ou  tout  au
       moins  la  partie  incoming)  dans  un systeme de fichiers a
       part.  Ceci empechera une _a_t_t_a_q_u_e _p_a_r_a_l_y_s_a_n_t_e  consistant  a
       saturer  completement  votre  partition  principale  (via le
       repertoire incoming) avec des cochonneries.
  Si vous avez wuftpd vous pourrez installer quelques  extensions  comme
  la  compression-decompression  _a_u  _v_o_l, ou la creation de fichiers tar
  pour les  arborescences.  Recuperez  les  sources  necessaires  (gzip,
  gnutar,  compress),  compilez-les avec une edition des liens _s_t_a_t_i_q_u_e,
  et editez le  fichier  qui  contient  la  definition  des  conversions
  autorisees.  Le programme /usr/bin/tar est deja lie statiquement. Vous
  prefererez probablement utiliser  GNU-tar  de  toutes  facons.   Garry
  Mills a ecrit le petit programme qui fait ca :

       J'ai  pris compress sur ftp.uu.net, a la racine je crois, et
       je l'ai compile. Pour  tar et compress, j'ai ecrit un  petit
       programme  appele  ``pipe'',  que j'ai lie statiquement. Mon
       fichier  /etc/ftpconversions  ressemble a ceci : (-- Note du
       traducteur:  les  3  lignes  qui ne commencent pas par deux-
       points ou diese sont  la  continuation  de  celles  qui  les
       precedent.   J'ai  du  les tronquer pour des raisons de for-
       mattage.--)

       ____________________________________________________________
       #strip prefix:strip postfix:addon prefix:addon postfix:external command:
       #types:options:description
        :.Z:  :  :/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
        :-z:  :  :/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
        :  :  :.Z:/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
        :  :  :.tar:/bin/tar cf - %s:T_REG|T_DIR:O_TAR:TAR
        :  :  :.tar.Z:/bin/pipe /bin/tar cf - %s | /bin/compress -c:T_REG|T_DI
       R:O_COMPRESS|O_TAR:TAR+COMPRESS
        :  :  :.tar:/bin/gtar -c -f - %s:T_REG|T_DIR:O_TAR:TAR
        :  :  :.tar.Z:/bin/gtar -c -Z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR
       +COMPRESS
        :  :  :.tar.gz:/bin/gtar -c -z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TA
       R+GZIP
       ____________________________________________________________

       Voila le programme:

  ____________________________________________________________
  /* pipe.c: exec two commands in a pipe */

  #define NULL (char *)0
  #define MAXA 16

  main(argc, argv) int argc; char *argv[]; {
      char *av1[MAXA], *av2[MAXA];
      int i, n, p[2], cpid;
      i = 0; n = 0;
      while ( ++i < argc && n < MAXA ) {
          if ( *argv[i] == '|' && *(argv[i]+1) == '\0' ) break;
          av1[n++] = argv[i];
      }
      if ( n == 0 ) uexit();
      av1[n] = NULL;
      n = 0;
      while ( ++i < argc && n < MAXA )
        av2[n++] = argv[i];
      if ( n == 0 ) uexit();
      av2[n] = NULL;
      if ( pipe(p) != 0 ) exit(1);
      if ( ( cpid = fork() ) == (-1) ) exit(1);
      else if ( cpid == 0 ) {
          (void)close(p[0]);
          (void)close(1);
          (void)dup(p[1]);
          (void)close(p[1]);
          (void)execv(av1[0], av1);
          _exit(127);
      }
      else {
          (void)close(p[1]);
          (void)close(0);
          (void)dup(p[0]);
          (void)close(p[0]);
          (void)execv(av2[0], av2);
          _exit(127);                                                                   }
      /*NOTREACHED*/
  }

  uexit() {
      (void)write(2, "Usage: pipe <command> | <command>\n", 34);
      exit(1);
  }
  ____________________________________________________________

  9. Autres choses a faire :

  +o  Sous root creez des fichiers .rhosts et .forward vides, appartenant
     a rootn en faisant par exemple

             touch ~ftp/.rhosts ~ftp/.forward
             chmod 400 ~ftp/.rhosts ~ftp/.forward

  +o  Prevoyez  un  alias  de courrier pour que les utilisateurs puissent
     signaler leurs problemes a l'administrateur FTP.

  +o  Si vous montez des disques d'autres machines (ou meme de la  votre)
     dans l'arborescence  ftp, montez-les en lecture seulement. La ligne
     correcte dans /etc/fstab (sur la machine ou tourne ftpd)  ressemble
     a :

     other:/u1/linux /home/ftp/pub/linux nfs ro,noquota,nosuid,intr,bg 1 0

  Ceci   monte   le  disque  de  la  machine  other  sur  le  repertoire
  /home/ftp/pub/linux sans quotas, sans aucun programme a  ``suid''  (on
  ne  sait jamais), interruptible (pour le cas ou other s'arrete), et en
  arriere-plan ``bg'', pour que si vous redemarrez votre  machine  alors
  que  other  est  arrete, elle ne vous bloque pas en reessayant contin-
  uellement de monter  /home/ftp/pub/linux.

  22..22..  IInnssttaallllaattiioonn dd''uunn sseerrvveeuurr FFTTPP sseeccuurriissee aa rraacciinnee ddeeppllaacceeee

       Note  du  traducteur  : Il s'agit la des serveurs ``chrooted
       FTP'', c'est-a-dire qui ne montrent a tous les  utilisateurs
       (pas seulement les anonymes) qu'une sous-arborescence volon-
       tairement limitee, dont la racine  apparente  _n_'_e_s_t  _p_a_s  la
       vraie racine de la hierarchie de fichiers.

  Contribution de   Marcus J. Ranum <mjr@tis.com>.

  Etapes d'installation :

  1. Faites  une  version  de ftpd qui soit liee _s_t_a_t_i_q_u_e_m_e_n_t, et mettez
     dans ~ftp/bin. Assurez-vous que root en est le proprietaire.

  2. Si vous avez besoin de  /bin/ls,  faites-en  une  version  _s_t_a_t_i_q_u_e
     egalement, que vous mettrez dans ~ftp/bin.  Il y a un portage de la
     commande ls de BSD net2 pour SunOs sur ftp.tis.com dans
      pub/firewalls/toolkit/patches/ls.tar.Z . Verifiez que root en  est
     proprietaire.

  3. Remplissez  ~ftp/etc/passwd   ~ftp/etc/group  comme  vous le feriez
     normalement,  mmaaiiss  ssuurrttoouutt  ne  mettez  pas  la  racine  /   comme
     repertoire  d'accueil pour l'utilisateur ftp.  Assurez-vous que ces
     deux fichiers appartiennent a root.

  4. Ecrivez un ``lanceur'' (wrapper) pour  ftpd  et  installez-le  dans
     /etc/inetd.conf.  En  supposant  que  ~ftp  =  /var/ftp, le lanceur
     ressemble a ceci :

     ___________________________________________________________________
     main()
     {
             if(chdir("/var/ftp")) {
                     perror("chdir /var/ftp");
                     exit(1);
             }
             if(chroot("/var/ftp")) {
                     perror("chroot /var/ftp");
                     exit(1);
             }
             /* optional: seteuid(FTPUID); */
             execl("/bin/ftpd","ftpd","-l",(char *)0);
             perror("exec /bin/ftpd");
             exit(1);
     }
     ___________________________________________________________________

  Autres possibilites :

  +o  Vous pouvez utiliser netacl de la boite a outils standard,  ou  des
     ``tcp-wrappers'' pour obtenir le meme resultat.

  +o  Nous   utilisons   netacl   pour   pouvoir   activer/desactiver  le
     confinement pour que quelques machines qui se connectent au service
     FTP nnee ssooiieenntt ppaass confinees des le debut. Ceci rend le transfert de
     fichiers un peu moins penible.

  +o  Vous pouvez aussi modifier les sources de ftpd et enlever tous  les
     appels  a seteuid(). Ceux qui connaissent des trous de securite qui
     permettent de passer root n'y  arriveront  plus.  Detendez-vous  et
     imaginez combien ils vont etre frustres.

  +o  Si  vous  bricolez  les  sources  de  ftpd,  je  vous recommande de
     desactiver un tas d'options dans ftpcmd.y en enlevant  l'indicateur
     ``implemented''.  Ca  ne  sera commode que si votre serveur FTP est
     destine uniquement a la consultation.

  +o  Comme d'habitude, faites un tour dans votre zone FTP,  et  verifiez
     que  les  fichiers ont des droits convenables et que rien ne traine
     qui  puisse etre execute.

  +o  Notez que le fichier /etc/passwd de votre zone FTP  est  maintenant
     completement  separe  de  votre  vrai  /etc/passwd.   Il  y  a  des
     avantages et des inconvenients.

  +o  Certains programmes peuvent ne pas fonctionner, comme syslog, parce
     qu'il n'y a pas de /dev/log. Dans ce cas vous pouvez construire une
     version de ftpd avec une routine syslog() basee sur UDP, ou  encore
     faire  tourner un second syslogd reposant sur le code BSD Net2, qui
     avec l'option -p ~ftp/dev/log gerera un socket _u_n_i_x_-_d_o_m_a_i_n.

       RRaappppeelllleezz--vvoouuss :: si on peut passer root par  une  faille  de
       votre  ftpd,  on  peut  vous  causer  des degats meme sur un
       serveur a arborescence deplacee. Si vous n'avez pas peur  de
       bricoler  du  code,  s'arranger pour faire tourner ftpd sans
       permissions est une tres bonne chose. Vous  pouvez  verifier
       le  bon  fonctionnement  de  votre serveur bricole en vous y
       connectant et (pendant qu'il en est  a  la  chaine  d'invite
       utilisateur)  en  faisant un ps-axu pour voir s'il le tourne
       pas sous root.

  22..33..  IInnffoorrmmaattiioonnss sseecciiffiiqquueess aauu ssyysstteemmee dd''eexxppllooiittaattiioonn eett ssuuggggeessttiioonnss

  22..33..11..  VViieeuuxx ssyysstteemmeess SSVVRR22 eett SSVVRR33,, ......

  Concurrent Real Time UNIX), machines AT&T 3B1 et 3B2 :

  Ces systemes peuvent avoir besoin de dev/tcp.

  ((ddeevv//ttccpp)) Ces implementations de ftpd peuvent requerir un ~ftp/dev/tcp
  en etat de marche pour que le FTP anonyme fonctionne.

  Il  faut  creer un fichier special en mode caracteres avec les nombres
  majeur  et  mineur   convenables.   Les   nombres   convenables   pour
  ~ftp/dev/tcp sont ceux de /dev/tcp.

  ~ftp/dev est un repertoire, et  ~ftp/dev/tcp est un fichier special en
  mode caracteres. Fixez-en le groupe et le  proprietaire  a  root.  Les
  droits  d'acces de ~ftp/dev sont lecture-ecriture-execution pour root,
  et lecture-execution pour le groupe et les autres. Pour  ~ftp/dev/tcp,
  root aura le droit de lire et ecrire, les autres et le groupe le droit
  de lire seulement.

  22..33..22..  HHPPUUXX

  ((FFiicchhiieerrss ddee ttrraaccee)) Si vous utilisez  le  ftpd  de  HP,  la  ligne  de
  /etc/inetd.conf   devrait   lancer   ftpd  -l,  qui  fait  des  traces
  supplementaires.

  22..33..33..  SSuunnOOss

  ((BBiibblliiootthheeqquueess)) Pour que SunOs utilise  ses  bibliotheques  dynamiques
  partagees, suivez ces etapes :

  1. Creez  le  repertoire  ~ftp/usr. Le proprietaire est root, avec les
     droits 555.

  2. Creez le repertoire ~ftp/usr/lib. Le proprietaire  est  root,  avec
     les droits 555.

  3. Copiez  le  chargeur  dynamique ld.so dans  ~ftp/usr/lib pour qu'il
     soit utilisable par ls. ld.so appartient a  root  avec  les  droits
     555.

  4. Copiez  la  version  la plus recente de la bibliotheque X partagee,
     (libc.so.*) dans ~ftp/usr/lib pour qu'elle soit utilisee par ls. La
     copie libc.so.* appartiendra a root avec les droits 555.

     Utilisateurs de 4.1.2 (ou au-dela) : il faut aussi copier
      /usr/lib/libdl.so.* dans ~ftp/lib.

  5. Creez  le  repertoire ~ftp/dev. Proprietaire root et droits d'acces
     111.

  6. Le  chargeur  a  besoin  de  ~ftp/dev/zero.  Placez-vous  dans   le
     repertoire ~ftp/dev et creez-le par la commande :

             mknod zero c 3 12

  transferez-en la propriete a root. Assurez-vous qu'il est lisible.

       AAvveerrttiisssseemmeenntt   aauuxx   nnoovviicceess  ::  N'essayez  pas  de  copier
       /dev/zero dans ~/ftp/dev/zero !!! C'est un fichier sans  fin
       de zeros et il va remplir completement votre partition !

  7. Si  vous  voulez  que  l'heure  locale  s'affiche quand les gens se
     connectent,  creez  le  repertoire  ~ftp/usr/share/lib/zoneinfo  et
     copiez-y /usr/share/lib/zoneinfo/localtime.

  8. Si vous n'aimez pas l'idee de copier vos bibliotheques pour pouvoir
     utiliser le ls de  Sun  qui  est  lie  dynamiquement,  vous  pouvez
     essayer  de  recuperer un ls statique a la place.  Il y en a un sur
     le CD-ROM de distribution de SunOS. Dans ce cas  vous  pouvez  vous
     dispenser des etapes 6 a 8.

     Si vous voulez un autre ls statique, recuperez fileutils de GNU sur
     un serveur d'archives proche et liez-le statiquement.

  ((FFiicchhiieerrss ddee ttrraaccee)) Le demon ftpd standard de Sun enregistre _t_o_u_s  les
  mots de passe. Pour corriger ca, passez le patch :

  101640-03     SunOS 4.1.3: in.ftpd logs password info when -d option is used.

  Dans //eettcc//iinneettdd..ccoonnff trouvez la ligne qui commence par ftp.  La fin de
  la ligne qui devrait  etre  ``in.ftpd'',  remplacez-la  par  ``in.ftpd
  -dl>>. Dans /etc/syslog.conf, ajoutez une ligne

  daemon.*                                        /var/adm/daemonlog

  L'information peut-etre ventilee sur plusieurs fichiers, en faisant :

  daemon.info                                    /var/adm/daemon.info
  daemon.debug                                   /var/adm/daemon.debug
  daemon.err                                     /var/adm/daemon.err

  Attention, l'espace entre les deux colonnes doit contenir au moins une
  tabulation, et pas seulement des espaces, sinon ca ne va pas  marcher.
  Vous  pouvez  mettre  vos  fichiers de traces ou vous voulez. Ensuite,
  creez   les   fichiers   de   traces   (par    exemple    par    touch
  /var/adm/daemonlog).   Pour  finir,  relancez  inetd  et syslogd, soit
  manuellement, soit en demarrant le systeme. Ca devrait fonctionner.

  Si vous n'installez pas le  patch,  assurez-vous  que  le  fichier  de
  traces  appartient bien a root et qu'il a les droits 600, parce que le
  demon ftpd enregistrera absolument tout, y compris les mots  de  passe
  des utilisateurs.

       Pour  des  raisons  de  securite  les  fichiers de traces ne
       doivent etre lisibles que par root : si par erreur un  util-
       isateur  tape  son mot de passe au lieu de son nom, il pour-
       rait etre pirate par quiconque peut lire les traces.

  22..44..  OOuu ssee pprrooccuurreerr dd''aauuttrreess ddeemmoonnss FFTTPP ??

  WWuuaarrcchhiivvee FFTTPP 22..44 - Un demon FTP securise  qui  ameliore  le  controle
  d'acces, les fichiers de traces, les bannieres d'avant-login, et offre
  de nombreuses options de configuration. Par ftp sur ftp.uu.net dans le
  repertoire  /networking/ftp/wuarchive-ftpd.  Verifiez bien le checksum
  pour etre sur d'avoir charge une copie valide.  (AAvveerrttiisssseemmeenntt  :  les
  anciennes  versions  de  Wu-FTP sont tres vulnerables et certaines ont
  des chevaux de Troie.)

                          BSD        SVR4
       File               Checksum   Checksum    MD5 Digital Signature
       -----------------  --------   ---------   --------------------------------
       wu-ftpd-2.4.tar.Z  38213  181  20337 362  cdcb237b71082fa23706429134d8c32e
       patch_2.3-2.4.Z    09291    8  51092  16  5558a04d9da7cdb1113b158aff89be8f

       For DECWRL ftpd, sites can obtain version 5.93 via anonymous FTP
       from gatekeeper.dec.com in the "/pub/misc/vixie" directory.

                          BSD        SVR4
       File               Checksum   Checksum    MD5 Digital Signature
       -----------------  --------   --------- --------------------------------
       ftpd.tar.gz        38443  60  1710 119  ae624eb607b4ee90e318b857e6573500

       For BSDI systems, patch 005 should be applied to version 1.1 of
       the BSD/386 software.  You can obtain the patch file via
       anonymous FTP from ftp.bsdi.com in the "/bsdi/patches-1.1"
       directory.

                          BSD        SVR4
       File               Checksum   Checksum    MD5 Digital Signature
       -----------------  --------   ---------   --------------------------------
       BU110-005          35337 272  54935 543   1f454d4d9d3e1397d1eff0432bd383cf

  Sources dans le domaine public :

     ftp.uu.net            ~ftp/systems/unix/bsd-sources/libexec/ftpd
     gatekeeper.dec.com    ~ftp/pub/DEC/gwtools/ftpd.tar.Z

  22..55..  CCoommmmeenntt ssaavvooiirr ssii vvoottrree sseerrvveeuurr FFTTPP aannoonnyymmee eesstt sseeccuurriissee

  Cette  section  offre  a l'administrateur une petite liste de points a
  verifier pour verifier  que  son  serveur  n'est  pas  trop  facile  a
  fracturer.

  1. Verifiez  que  votre  serveur n'a pas la commande SITE EXEC en vous
     connectant par telnet sur le port 21 et en tapant ``SITE EXEC''. Si
     votre  demon FTP accepte cette commande, verifiez qu'il est dans sa
     version la  plus  recente  (c'est-a-dire  Wu-FTP  2.4).   Dans  les
     versions  plus  anciennes,  la  commande  permet  a  n'importe  qui
     d'executer un shell par le port 21.

  2. Verifiez que personne ne peut se connecter et creer des fichiers et
     des  repertoires  dans  le  repertoire principale. Si n'importe qui
     peut se connecter sous anonymous et creer des fichiers .rhosts,  et
     .forward, l'acces est alors ouvert a tout intrus.

  3. Verifiez  que le repertoire principal nn''aappppaarrttiieenntt ppaass a ftp. Sinon
     un intrus peut faire ``SITE CHMOD 777'' sur le repertoire principal
     et installer des fichiers qui lui donneront immediatement un acces.
     La commande  SITE  CHMOD  devrait  etre  supprimee  parce  que  les
     utilisateurs anonymes n'ont besoin d'aucun privilege particulier.

  4. Verifier  qu'aauuccuunn  fichier  ou  repertoire n'appartient a ftp.  Si
     c'etait le cas, un intrus pourrait les remplacer par un  cheval  de
     Troie.

  5. Il  y  a  plusieurs erreurs dans les vieux demons, il est donc tres
     important de vous assurer que  vous  avez  les  versions  les  plus
     recentes.

  22..66..  AArrcchhiiee

  Recherche  des  programmes  dans  les  sites FTP. Connectez-vous a ces
  sites sous le nom archie ou utilisez un client Archie  pour  un  acces
  plus  rapide. Pour faire ajouter votre site dans la liste des serveurs
  explores par  Archie,  envoyez  un  courrier  electronique  a  archie-
  updates@bunyip.com.

      archie.ac.il               132.65.20.254    (Israel server)
      archie.ans.net             147.225.1.10     (ANS server, NY (USA))
      archie.au                  139.130.4.6      (Australian Server)
      archie.doc.ic.ac.uk        146.169.11.3     (United Kingdom Server)
      archie.edvz.uni-linz.ac.at 140.78.3.8       (Austrian Server)
      archie.funet.fi            128.214.6.102    (Finnish Server)
      archie.internic.net        198.49.45.10     (ATT server, NY (USA))
      archie.kr                  128.134.1.1      (Korean Server)
      archie.kuis.kyoto-u.ac.jp  130.54.20.1      (Japanese Server)
      archie.luth.se             130.240.18.4     (Swedish Server)
      archie.ncu.edu.tw          140.115.19.24    (Taiwanese server)
      archie.nz                  130.195.9.4      (New Zealand server)
      archie.rediris.es          130.206.1.2      (Spanish Server)
      archie.rutgers.edu         128.6.18.15      (Rutgers University (USA))
      archie.sogang.ac.kr        163.239.1.11     (Korean Server)
      archie.sura.net            128.167.254.195  (SURAnet server MD (USA))
      archie.sura.net(1526)      128.167.254.195  (SURAnet alt. MD (USA))
      archie.switch.ch           130.59.1.40      (Swiss Server)
      archie.th-darmstadt.de     130.83.22.60     (German Server)
      archie.unipi.it            131.114.21.10    (Italian Server)
      archie.univie.ac.at        131.130.1.23     (Austrian Server)
      archie.unl.edu             129.93.1.14      (U. of Nebraska, Lincoln (USA))
      archie.uqam.ca             132.208.250.10   (Canadian Server)
      archie.wide.ad.jp          133.4.3.6        (Japanese Server)

  33..  RReemmeerrcciieemmeennttss

  Merci  a toutes les personnes suivantes, dont les suggestions ont aide
  a realiser cette FAQ :
  Tomasz Surmacz (tsurmacz@asic.ict.pwr.wroc.pl)
  Wolfgang Ley (Ley@rz.tu-clausthal.de)
  Russel Street (russells@ccu1.auckland.ac.nz)
  Gary Mills (mills@CC.UManitoba.CA)
  Nicholas Ironmonger (ndi@sam.math.ethz.ch)
  Morten Welinder (terra@diku.dk)
  Nick Christenson (npc@minotaur.jpl.nasa.gov)
  Mark Hanning-Lee (markhl@romoe.caltech.edu)
  Marcus J Ranum <mjr@tis.com>

  44..  CCooppyyrriigghhtt

  Ce document est (c) 1994 par  Christopher Klaus de  Internet  Security
  Systems, Inc.

  La permission de donner des copies gratuites est accordee. Vous pouvez
  distribuer, transferer ou repandre  ce  papier.  Vous  ne  pouvez  pas
  pretendre  en etre l'auteur. Cet avertissement doit figurer dans toute
  copie.

  This paper is Copyright ((c)) 1994 by Christopher  Klaus  of  Internet
  Security Systems, Inc.

  Permission  is  hereby  granted  to  give  away  free copies.  You may
  distribute, transfer, or spread this paper.  You may not pretend  that
  you  wrote  it.   This copyright notice must be maintained in any copy
  made.

  55..  DDeenneeggaattiioonn ddee rreessppoonnssaabbiilliitteess

  Les informations contenues  dans  ce  document  peuvent  changer  sans
  preavis.   Elles  sont  presentees  _e_n  _l_'_e_t_a_t,  et  leur  utilisation
  constitue une acceptation de cette condition. Elles ne sont  nullement
  garanties.  En  aucun  cas  l'auteur ou le traducteur ne pourront etre
  tenus  responsables  des  dommages  pouvant  resulter  directement  ou
  indirectement  de l'usage ou de la diffusion de ces informations. Tout
  usage se fait aux risques de l'utilisateur lui-meme.

  66..  AAddrreessssee ddee ll''aauutteeuurr

  Vous pouvez envoyer vos suggestions, mise-a-jour et commentaires a

  Christopher Klaus <cklaus@shadow.net>
  Internet Security Systems, Inc. <iss@shadow.net>
  Internet Security Systems, Inc.
  2209 Summit Place Drive,
  Atlanta,GA 30350-2430. (404)998-5871.

  Linux Apache SSL PHP/FI frontpage mini-HOWTO
  Marcus Faure, marcus@faure.de
  v1.1, July 1998

  Ce document traite de la mise en place d'un sseerrvveeuurr WWEEBB mmuullttiiffoonnccttiioonnss
  Il autorisera la cration dynamique des pages avec la langage PPHHPP,
  scurisera l'change des donnes grce  SSSSLL et fiabilisera
  l'excution des scripts CCGGII et des extensions FFrroonnttppaaggee de M$.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Description des diffrentes composantes
     1.2 Configurations oprationelles
     1.3 Historique

  2. Installation des diffrents lments

     2.1 Prparatifs
     2.2 Ajout de PHP
     2.3 Ajout de SSL
     2.4 Ajout de FrontPage

  3. Assemblons les morceaux du puzzle !

     3.1 Modules Apache  essayer
     3.2 Scuriser CGI
     3.3 Compilation et installation du dmon
     3.4 Ajout des fonctionnalits Frontpage au serveur Web
     3.5 Dmarrage du dmon
     3.6 Considrations diverses
     3.7 Bugs connus
     3.8 Le mot de la fin


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Avant tout : [NdT : l'auteur explique qu'il n'est pas un Mozart de la
  langue anglaise. Ca tombe bien, moi non plus !]


  11..11..  DDeessccrriippttiioonn ddeess ddiiffffrreenntteess ccoommppoossaanntteess

  Le serveur web dont vous disposerez grce  ce Howto comprend
  plusieurs parties : les sources Apache d'origine avec quelques ( ah,
  ah ) patches et divers excutables. Je vous conseille d'utiliser les
  mmes versions de logiciels que moi. Elles ne devraient pas poser de
  problmes et le dmon rsultant sera relativement stable. Les plus
  tmraires essayeront les dernires versions avec de toutes nouvelles
  fonctionnalits mais ce n'est pas ma faute si ca ne marche pas. Les
  configurations utilisables gagneront  tre signales afin que je les
  inclut dans les nouvelles versions de ce document.  Ma plate forme
  d'exprimentation repose sur un noyau Linux 2.0.35, d'o une certaine
  spcificit de ce Howto qui devrait rester applicable  d'autres Unix.

  Il n'est pas ncessaire de tout compiler. J'ai essay de structurer ce
  HOWTO de telle sorte que vous puissiez ignorer les parties qui ne vous
  concernent pas.

  Ce document n'est pas un manuel utilisateur pour Apache, SSL, PHP/FI
  ou FrontPage. Son objectif premier est de diminuer la consommation
  d'aspirine des fournisseurs de service WEB lors de la mise en place de
  leur premier serveur et d'apporter une contribution  la communaut
  Linux.

  PPHHPP est un langage de script qui autorise les pages HTML dynamiques.
  Il ressemble au SSI d'Apache mais en bien moins compliqu. Des modules
  existent pour les bases de donnes courantes. PHP requiert les
  librairies GD.

  SSSSLL est une mise en oeuvre du Secure Socket Layer de Netscape qui
  scurise les connections sur des rseaux douteux ( typiquement pour la
  transmission des numros de cartes de crdit  partir de formulaires
  web ).

  FFrroonnttppaaggee est un outil ouiziouigue de cration web qui propose des
  extensions, propres  un type de serveurs, appelles webbots. Certains
  trouvent Frontpage agrable en ce qu'il permet la mise en place de
  sites de discussion et de questionnaires en ignorant tout du HTML et
  du CGI. Il pargne mme au concepteur le tlchargement du site via
  ftp grce  son propre agent. Si vous souhaitez la compatibilit
  Frontpage sans le serveur  fentres, les extensions du serveur Apache
  sont faites pour vous.



  11..22..  CCoonnffiigguurraattiioonnss oopprraattiioonneelllleess

  Bien que ce document ait t tlcharg une centaine de fois depuis sa
  publication, je n'ai gure eu de retour. En particulier, personne ne
  m'a rapport la viabilit de nouvelles combinaisons. Voici les miennes
  :

    Linux 2.0.31, Apache 1.2.4, PHP 2.0.0, SSL 0.8.0, fp 98 3.0.3 (*)

    Linux 2.0.33, Apache 1.2.5, PHP 2.0.1, SSL 0.8.0, fp 98 3.0.3 (*)

    Linux 2.0.35, Apache 1.2.6, PHP 3, SSL 0.8.0, fp 98 3.0.4

     (*) la version 3.0.3 est ``dconseill''


  11..33..  HHiissttoorriiqquuee


  v0.0/Apr 98:  Version allge

  v1.0/Jun 98:  Apache 1.2.6, section FrontPage mise  jour, corrections
  mineures

  v1.1/Jul 98:  Restructuration et passage au SGML

  La dernire mouture de ce document est disponible via :
  <http://www.faure.de>


  22..  IInnssttaallllaattiioonn ddeess ddiiffffrreennttss llmmeennttss

  22..11..  PPrrppaarraattiiffss

  Il vous faudra :

    Apache 1.2.6  <http://www.apache.org/dist/apache_1_2_6.tar.gz>

    Extensions PHP/FI
     <http://php.iquest.net/files/download.phtml?/files/php-2.01.tar.gz>

    Librairie GD  <http://siva.cshl.org/gd/gd.html>

    SSL 0.8.0 <ftp://ftp.ox.ac.uk/pub/crypto/SSL/SSLeay-0.8.0.tar.gz>

    Patch SSL pour Apache 1.2.6
     <ftp://ftp.ox.ac.uk/pub/crypto/SSL/apache_1.2.6+ssl_1.17.tar.gz>

    Extensions pour serveur Frontpage 98 script d'installation
     <http://www.rtr.com/fpsupport/download.htm>

  Rcuprez les sources souhaites. Dtarez Apache, PHP, GD et SSL en
  /usr/src. Dtarez le patch SSL vers /usr/src/apache_1.2.6.


  22..22..  AAjjoouutt ddee PPHHPP

  Faites un cd vers /usr/src/gd1.2 suivi de make pour construire la
  librarie GD libgd.a qui devra tre copie en /usr/lib.  Allez ensuite
  en php-2.0.1 et lancez ./install.

  Voici les questions-cl :

  Would you like to compile PHP/FI as an Apache module? [yN] y
  Are you compiling for an Apache 1.1 or later server? [Yn] y
  Are you using Apache-Stronghold? [yN] y
  Does your Apache server support ELF dynamic loading? [yN] y
  Apache include directory (which has httpd.h)? [/usr/local/include/apache] /usr/src/apache_1.2.6/src
  Would you like to build an ELF shared library? [yN] y
  Additional directories to search for .h files []: /usr/src/gd1.2
  Would you like the bundled regex library? [yN] n



  De mme que les extensions FrontPage, phtml pose un problme au niveau
  de la scurit vu qu'il tourne avec l'UID du serveur Web. Enclenchez
  le mode sr dans src/php.h et limitez prudemment le chemin de
  recherche. Vous souhaiterez peut- tre changer d'autres valeurs dans
  le php.h. Si l'aspect scurit est crucial pour vous, compilez php en
  tant que cgi. L'ensemble sera cependant moins performant que la
  version module.

  Tapez make pour compiler les sources. Une fois la compilation acheve,
  copiez mod_php.* et libphp.a en /usr/src/apache_1.2.6/src. Ajoutez une
  ligne

  Module php_module mod_php.o


   la fin de /usr/src/apache_1.2.6/src/Configuration et

  -lphp -lm -lgdbm -lgd


   EXTRA_LIBS ( mme fichier ), ainsi que

  application/x-httpd-php phtml


  au mime.types d'Apache et

  AddType  application/x-httpd-php .phtml


  au srm.conf d'Apache.


  Peut-tre ajouterez vous aussi index.phtml  DirectoryIndex dans ce
  mme fichier de faon  ce qu'un fichier index.phtml soit
  automatiquement charg lors d'une requte sur son rpertoire.


  22..33..  AAjjoouutt ddee SSSSLL

  cd /usr/src/SSL-0.8.0; ./Configure linux-elf; make; make rehash Ceci
  compilera les librairies requises par Apache. make test vous permettra
  de vrifier le bon droulement de la compilation.  Il faut  prsent
  patcher Apache. Il est primordial d'appliquer ce patch avant le patch
  Frontpage sinon ce dernier sera inefficace.  Faites un cd vers
  /usr/src/apache_1.2.6/src et lancez patch <
  /usr/src/apache_1.2.6/SSLpatch.  Positionnez
  SSL_BASE=/usr/src/SSLeay-0.8.0 in Configuration.  Assurez vous de ce
  que Module proxy_module est dsactiv sinon Apache ne compilera pas.
  Si vous avez besoin d'un proxy, Squid vous tend les bras :
  <squid.nlanr.net>

  make certificate gnerera SSLconf/conf/httpsd.pem.


  22..44..  AAjjoouutt ddee FFrroonnttPPaaggee

  Renommez le fichier fp30.linux.tar.Z en fp30.linux.tar.gz ou bien le
  script d'install ne le verra pas. Lancez ./fp_install ainf de copier
  les fichiers d'extension en /usr/local/frontpage. zcat devrait
  s'excuter par /usr/bin/zcat.

  On applique  prsent le patch FrontPage : allez en
  /usr/src/apache_1.2.6/src et tapez patch <
  /usr/src/frontpage/version3.0/apache-fp/fp-patch-apache_1.2.5 Ceci
  crera les fichiers mod_frontpage.* et en modifiera d'autres (
  Configuration, ... ). Le patch 1.2.5 fonctionne aussi bien avec Apache
  1.2.5 qu'avec 1.2.6. Passez pour l'instant sur ce qui se rapporte 
  l'installation des serveurs ouaibe.


  33..  AAsssseemmbblloonnss lleess mmoorrcceeaauuxx dduu ppuuzzzzllee !!

  33..11..  MMoodduulleess AAppaacchhee  eessssaayyeerr

  J'utilise les modules suivants en plus de SSL, PHP et Frontpage :

  Module env_module          mod_env.o
  Module config_log_module   mod_log_config.o
  Module mime_module         mod_mime.o
  Module negotiation_module  mod_negotiation.o
  Module dir_module          mod_dir.o
  Module cgi_module          mod_cgi.o
  Module asis_module         mod_asis.o
  Module imap_module         mod_imap.o
  Module action_module       mod_actions.o
  Module alias_module        mod_alias.o
  Module rewrite_module      mod_rewrite.o
  Module access_module       mod_access.o
  Module auth_module         mod_auth.o
  Module anon_auth_module    mod_auth_anon.o
  Module digest_module       mod_digest.o
  Module expires_module      mod_expires.o
  Module headers_module      mod_headers.o
  Module browser_module      mod_browser.o




  33..22..  SSccuurriisseerr CCGGII

  Si vous tes un FAI (c'est surement le cas si vous lisez ces lignes),
  vous voudrez amliorer la scurit. L'utilitaire suexec vous le
  permettra dans la mesure o il excutera les CGI avec l'UID du
  propritaire du Web plutt qu'avec celle du serveur.  Allez en
  /usr/src/apache_1.2.6/support et lancez make suexec.  Faites un chmod
  4711 suxec et copiez le  l'emplacement prcis dans ../src/httpd.h,
  soit /usr/local/etc/httpd/sbin/suexec par dfaut. Si le chemin vous
  semble un peu obscur - ce ft le cas pour moi - ditez httpd.h et
  positionnez le  quelque chose de plus raisonnable.


  33..33..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn dduu ddmmoonn

  Allez en  /usr/src/apache_1.2.6/src et ditez Configuration afin de
  choisir les modules que vous voulez inclure dans votre dmon Apache.
  Ceci effectu, lancez ./Configure et make. Il s'agit l de la dernire
  tape de compilation, la plus complique. Croisez les doigts.  Si tout
  se droule normalement, copiez httpsd en /usr/sbin.  Ne ngligez pas
  la taille du dmon. Crez le rpertoire /var/httpd avec les sous-
  rpertoires cgi-bin, conf, htdocs, icons, virt1, virt2 et logs.
  Editez access.conf-dist, mime.types et srm.conf-dist ( rpertoire
  /usr/src/apache_1.2.6/conf ) selon vos besoins et copiez les en
  var/httpd/conf/access.conf, srm.conf et mime.types. Enfin, copiez le
  fichier httpsd.pem cr par make certificate en /var/httpd/conf.
  Utilisez le httpd.conf suivant :







































  ServerType standalone
  Port 80
  Listen 80
  Listen 443
  User wwwrun
  Group wwwrun
  ServerAdmin webmaster@yourhost.com
  ServerRoot /var/httpd
  ErrorLog logs/error_log
  TransferLog logs/access_log
  PidFile logs/httpd.pid
  ServerName www.yourhost.com
  MinSpareServers 3
  MaxSpareServers 20
  StartServers 3

  SSLCACertificatePath /var/httpd/conf
  SSLCACertificateFile /var/httpd/conf/httpsd.pem
  SSLCertificateFile /var/httpd/conf/httpsd.pem
  SSLLogFile /var/httpd/logs/ssl.log

  <VirtualHost www.virt1.com>
  SSLDisable
  ServerAdmin webmaster@virt1.com
  DocumentRoot /var/httpd/virt1
  ScriptAlias /cgi-bin/ /var/httpd/virt1/cgi-bin/
  ServerName www.virt1.com
  ErrorLog logs/virt1-error.log
  TransferLog logs/virt1-access.log
  User virt1admin
  Group users
  </VirtualHost>

  <VirtualHost www.virt1.com:443>
  ServerAdmin webmaster@virt1.com
  DocumentRoot /var/httpd/virt1
  ScriptAlias /cgi-bin/ /var/httpd/virt1/cgi-bin/
  ServerName www.virt1.com
  ErrorLog logs/virt1-ssl-error.log
  TransferLog logs/virt1-ssl-access.log
  User virt1admin
  Group users
  SSLCACertificatePath /var/httpd/conf
  SSLCACertificateFile /var/httpd/conf/httpsd.pem
  SSLCertificateFile /var/httpd/conf/httpsd.pem
  SSLLogFile /var/httpd/logs/virt1-ssl.log
  SSLVerifyClient 0
  SSLFakeBasicAuth
  </VirtualHost>

  <VirtualHost www.virt2.com>
  SSLDisable
  ServerAdmin webmaster@virt2.com
  DocumentRoot /var/httpd/virt2
  ScriptAlias /cgi-bin/ /var/httpd/virt2/cgi-bin/
  ServerName www.virt2.com
  ErrorLog logs/virt2-error.log
  TransferLog logs/virt2-access.log
  </VirtualHost>



  Les directives dpendent des modules compils.  Leur liste s'obtient
  avec httpsd -h.


  33..44..  AAjjoouutt ddeess ffoonnccttiioonnnnaalliittss FFrroonnttppaaggee aauu sseerrvveeuurr WWeebb

  Allez en /usr/local/frontpage/version3.0/bin et lancez ./fpsrvadm.
  Choisissez install et apache-fp.  Rpondez comme suit aux questions :

  Enter server config filename: /var/httpd/conf/httpd.conf
  Enter host name for multi-hosting []: www.virt2.com
  Starting install, port: www.virt2.com:80, web: ""
  Enter user's name []: virt2admin
  Enter user's password:
  Confirm password:
  Creating root web
  Recalculate links for root web
  Install completed.



  Le nom d'utilisateur doit correspondre au login Unix du ppropritaire
  du web. Le mot de passe peut diffrer. Ajoutez  la main
  sendmailcommand:/usr/sbin/sendmail %r au fichier
  /usr/local/frontpage/www.virt2.com:80.conf ou vos utilisateurs ne
  pourront envoyer de courriers gnrs via le web. Faites un kill -HUP
  sur votre httpsd de faon  ce que fp rexamine sa configuration.
  Votre client FrontPage peut  prsent accder  www.virt2.com

  Dans certains cas, fpsrvadm se plaint de l'absence d'un web  la
  racine. Cela ne sert gure, mais vous devrez surement le faire pour
  que fpsrvadm se taise.


  33..55..  DDmmaarrrraaggee dduu ddmmoonn

  Lancez Apache via httpsd -f /var/httpd/conf/httpd.conf. On accde 
  prsent  www.virt1.com aussi bien via http que via https.  C'est
  chouette la vie. Naturellement, vous acheterez un vritable certificat
  afin d'offrir un service Web SSL qui ne fasse pas rigoler les clients.

  Copiez un des fichiers du rpertoire d'exemples de php en virt1 pour
  essayer phtml.


  33..66..  CCoonnssiiddrraattiioonnss ddiivveerrsseess

  N'utilisez pas les extensions FrontPage 97. Elles ne fonctionnent pas
  sous Linux. A l'installation, les bibliothques C++ semblent
  fonctionner mais vos fichiers de logs se rempliront de premature end
  of script headers tandis que votre boite au lettre dbordera de
  rclamations.  Evitez les extensions FrontPage 98 avec des versions
  antrieures  la 3.0.2.1330. Les numros de version manquent
  singulirement d'homognit. Faites un telnet sur le port 80, tapez
  "get / http/1.0" suivi de deux retours  la ligne et vous obtiendrez
  un numro de version de 3.0.4 pour FrontPage.

  Des informations plus prcises sont disponibles en excutant :
  /usr/local/frontpage/currentversion/exes/_vti_bin/shtml.exe -version.
  Les versions plus anciennes sont bugges en ce qu'elles exigent du
  httpd.conf qu'il puisse tre crit sous le gid du serveur web. Voila
  de quoi faire hurler ceux qui tiennent  la scurit.  Les versions
  postrieures  la 3.0.2.1330 fonctionnent mieux.


  33..77..  BBuuggss ccoonnnnuuss

  L'utilisation de Recalculate Links par le client Frontpage lance au
  niveau du serveur un process qui consomme 99% du cpu et 10 Mo de
  mmoire.  Pour des webs de taille moyenne avec des machines rapides,
  le client reoit parfois un timeout et ce alors mme que le calcul
  parvient normalement  son terme. Demandez aux adeptes de FrontPage de
  rester patients et de ne pas activer Recalculate Links  rptition.
  Pensez  mettre au moins 64 Mo.

  A l'instant o j'cris ces lignes, SSL et Frontpage fonctionnent mais
  pas de faon simultane. Vous ne pouvez donc ni mettre  jour votre
  web via SSL, ni utiliser des webbots avec https. Vous pouvez
  actualiser votre web via le port 80 et y accder en chiffr via le
  port 443 mais les compteurs par exemple seront faux. Je considre ceci
  comme un bug. Il devrait disparaitre avec SSL 0.9.0.


  33..88..  LLee mmoott ddee llaa ffiinn

  Pour ceux qui trouvent que le titre de ce HOWTO est presque aussi long
  que son contenu : avez vous jamais cout Meat Loaf ?

  Bien, amis lecteurs, c'est tout pour aujourd'hui. N'hsitez pas  me
  transmettre vos expriences, votre reconnaissance ternelle, des
  fleurs, de l'argent, des voitures, des gisements de ptrole, ou des
  ratons laveurs.












































  Automount mini-Howto
  don@sabotage.org
  v0.2, 7 Septembre 1998

  Ce fichier dcrit autofs, le monteur automatique de systmes de
  fichiers, comment le configurer, et met en vidences quelques
  problmes  viter.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Automount - Qu'est ce que c'est, et  quoi a sert ?
     1.2 Types de monteurs automatiques

  2. Installation

  3. Configuration

  4. Qu'est ce que c'est long  se dmonter !

  5. Questions

     5.1 Je ne trouve pas
     5.2 Comment je sais ce qui est mont ?
     5.3 J'ai mis une disquette Win95 (
     5.4 Mon systme de fichiers
     5.5 Qui est ce que je remercie pour autofs ?


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  AAuuttoommoouunntt -- QQuu''eesstt ccee qquuee cc''eesstt,, eett  qquuooii aa sseerrtt ??

  Un monteur automatique est un processus qui automatise le montage (et
  le dmontage) de certains systmes de fichiers grce  un dmon. Si le
  systme de fichiers n'est pas mont, et qu'un utilisateur essaye d'y
  accder, il sera automatiquement (re)mont. Ceci est trs utile,
  surtout dans les grands rseaux et pour partager des systmes de
  fichiers entre plusieurs machines, spcialement lors qu'elles ne sont
  pas toujours allumes. Cela peut aussi tre trs utile pour les
  disques amovibles, ou quelques autres utilisations, tels le
  basculement entre un systme MS-DOS mont en mode ASCII forc activ,
  et le mme systme MS-DOS avec le mode ASCII forc dsactiv.


  11..22..  TTyyppeess ddee mmoonntteeuurrss aauuttoommaattiiqquueess

  Il y a deux types de monteurs automatiques sous Linux : _A_M_D et _a_u_t_o_f_s.
  AMD est le dmon automount, et fonctionne normalement comme l'AMD de
  SunOS. Il est ralis en tant que programme utilisateur, c'est  dire
  qu'il ne fait pas partie du noyau. Autofs est un systme plus rcent
  qui est assist par le noyau, cela signifie que le code du noyau
  grant les systmes de fichiers sait que les points de montages sont
  sur un autre systme de fichiers, et c'est l que le programme
  automount prend le relais. Seul autofs sera dcrit dans ce Mini-HowTo.


  22..  IInnssttaallllaattiioonn

  Comme autofs fonctionne dans l'espace noyau, vous devez avoir compil
  votre noyau avec le support pour autofs. Dans les 2.0.xx, c'est une
  option exprimentale, mais a  l'air d'tre stable. Dans les 2.1.xx
  (et certainement dans les 2.2.xx) il n'est plus exprimental.


  Le programme automount et ses fichiers de configuration sont aussi
  ncessaires. L'utilisation des rpms (depuis votre miroir prfr) est
  une trs bonne manire pour commencer. Le programme automount devrait
  tre dmarr par l'un des scripts plac dans le rpertoire
  /etc/rc.d/init.d. Le rpm installe tout a, mais vous aurez  vous
  assurer qu'il est lanc, soit en le liant dans vos rpertoire rc?.d,
  en utilisant le panneau de contrle de la Redhat, soit pour une autre
  distribution en le faisant dmarrer de la manire qu'il vous plat. Ne
  regardez pas trop ce que le script rc fait; car si vous lisez ce
  HowTo, vous ne voulez certainement pas savoir.


  33..  CCoonnffiigguurraattiioonn

  L'installation du rpm est trs facile, mais voici le morceau que vous
  risquez de rejouer une ou deux fois si vous ne l'avez jamais tent.


  Il y a deux fichiers dans /etc, un appel auto.master, et l'autre
  appel auto.misc. Mon fichier auto.master ressemble  a :


  ______________________________________________________________________
  /auto   /etc/auto.misc  --timeout 60
  ______________________________________________________________________




  La premire entre n'est pas le point de montage, c'est en fait l o
  se trouveront les points de montage (que l'on trouve dans la deuxime
  entre). La troisime option demande aux systmes de fichiers
  d'essayer de se dmonter automatiquement au bout de 60 secondes
  d'inutilisation. Ils ne peuvent bien sr pas tre dmonts si ils sont
  toujours utiliss.


  Auto.misc est une table. Plusieurs fichiers similaires peuvent tre
  utiliss dans auto.master. Mon auto.misc ressemble  ceci :


  ______________________________________________________________________
  kernel          -ro,soft,intr           ftp.kernel.org:/pub/linux
  cd              -fstype=iso9660,ro      :/dev/cdrom
  zip             -fstype=auto            :/dev/hdd4
  floppy          -fstype=vfat            :/dev/fd0
  ______________________________________________________________________




  La premire colonne (la "_c_l_") reprsente le point de montage. Dans ce
  cas, ce sera /auto/floppy, /auto/cd, etc. La colonne du milieu
  reprsente les options; parcourez la page man de mount pour plus de
  dtails. Et la dernire colonne spcifie d'o provient le systme de
  fichiers. L'entre "kernel" est suppose tre un montage NFS. Le
  symbole ":" sur les autres lignes signifient que c'est un disque
  local.




  44..  QQuu''eesstt ccee qquuee cc''eesstt lloonngg  ssee ddmmoonntteerr !!

  J'ai bien vu que certains d'entre vous regardaient ce timeout de 60
  secondes de travers et pensaient "_C_'_e_s_t _l_o_n_g _p_o_u_r _a_t_t_e_n_d_r_e _a_v_a_n_t
  _l_'__j_e_c_t_i_o_n _d_'_u_n_e _d_i_s_q_u_e_t_t_e_._._. _J_e _v_a_i_s _j_u_s_t_e _f_a_i_r_e _u_n _s_y_n_c _d_e_s _d_i_s_q_u_e_s
  _e_t _p_u_i_s _l_'__j_e_c_t_e_r _s_a_n_s _q_u_'_e_l_l_e _s_o_i_t _d__m_o_n_t__e_, _e_t _p_e_r_s_o_n_n_e _n_e _s_'_e_n
  _a_p_e_r_c_e_v_r_a_." Laissez moi vous suggrer une meilleure alternative. Tout
  d'abord, vous pouvez changer le timeout. Mais cela pourrait tre peu
  efficace de dire au systme de dmonter tout aprs 15 secondes
  d'inactivit. Il y a bien une manire de demander  automount de
  dmonter. Si vous envoyez (avec kill) le signal SIGUSR1 au processus
  automount, il dmontera tout ce qu'il peut. Mais avant que vous
  commenciez tous  faire un chtit bouton "Dmonter" dans votre
  gestionnaire de fentres, il y a un petit problme.


  Le processus automount est lanc par root, et il n'acceptera que les
  signaux venant de root. Pour une bonne part, vous voulez utiliser le
  montage automatique pour viter d'avoir  monter et dmonter les
  partitions en tant root. Il serait bien sur facile de faire un petit
  programme C suid-root qui ferait le sale boulot, ce qui le meilleur
  moyen de rgler le problme si les utilisateurs ne vous inspirent pas
  confiance.


  Si les utilisateurs sont srieux, un compromis serait d'utiliser sudo,
  en l'installant avec la ligne suivante :


  ______________________________________________________________________
  ALL     ALL=NOPASSWD:/bin/kill -SIGUSR1 [0-9]*
  ______________________________________________________________________




  Vous avez autoris tout le monde sur le systme  envoyer un signal
  SIGUSR1  nn''iimmppoorrttee qquueell processus. Ceci pourra avoir plusieurs effets
  sur diffrents programmes; il recyclera afterstep, mais tuera xemacs.
  Par consquent, si vous n'avez pas entirement confiance en vos
  utilisateurs, vous pouvez leur restreindre l'accs au seul daemon
  automount (grce  pidof par exemple) la ligne suivante pourra donc
  dmonter les trucs. Cela serait ralis grce  :


  /usr/bin/sudo /bin/kill -SIGUSR1 `/sbin/pidof automount`


  55..  QQuueessttiioonnss



  55..11..  JJee nnee ttrroouuvvee ppaass //aauuttoo//ffllooppppyy ,, oouu nn''iimmppoorrttee qquueell ppooiinntt ddee mmoonn
  ttaaggee qquuee jjee cchheerrcchhee..

  Si vous avez configur automount correctement, les points de montage
  que vous cherchez apparatront lorsque vous essayerez de les utiliser.
  Si vous utilisez un utilitaire graphique pour vous dplacer dans les
  rpertoire, vous aurez peut tre besoin de taper le rpertoire  la
  main. Malheureusement, le fait de ne pas pouvoir choisir parmi les
  points de montages invisibles est certainement le pire dfaut
  d'autofs. Si cela vous ennuie tant que a, ditez les fichiers de
  configuration (Astuce, ils se terminent par .c pour "configuration").



  55..22..  CCoommmmeenntt jjee ssaaiiss ccee qquuii eesstt mmoonntt ??

  Grce  la commande df. mount sans arguments fera de mme, et montrera
  en plus les options de montage.



  55..33..  JJ''aaii mmiiss uunnee ddiissqquueettttee WWiinn9955 ((""vvffaatt"")) eett eellllee eesstt ddtteeccttee ccoommmmee
  ttaanntt uunnee ddiissqquueettttee MMSS--DDOOSS nnoorrmmaallee..

  Cela n'est pas un problme d'automount. A l'heure ou j'cris ces
  lignes, le type de systme de fichier "auto" ne tente pas de monter
  une partition vfat si il a russi  monter une partition MS-DOS. VFAT
  est le systme de fichiers avec noms longs utilis par Win95/WinNT et
  est incrust dans une FAT MS-DOS. Ceci signifie que vous ne pouvez
  monter du vfat que si vous laissez tomber tous les autres types de
  systmes de fichiers. Heureusement, cela sera bientt rpar. D'ici
  l, vous pouvez toujours crer plusieurs points de montage.


  55..44..  MMoonn ssyyssttmmee ddee ffiicchhiieerrss //ttrruucccchhoossee  eesstt mmoonntt eett kkiillll --SSIIGGUUSSRR11
  nnee llee ddmmoonnttee ppaass..

  Il est utilis par autre chose. Root ne peut probablement pas le
  remonter non plus. Si vous tes celui qui l'a mont (il n'y a personne
  d'autre qui l'utilise) vrifiez qu'aucun shell qui pourrait tre dans
  ce rpertoire. Si il n'y en a pas, cherchez encore (particulirement
  quelque chose qui pourrais tre pass par l comme un gestionnaire de
  fichiers) qui pourrais avoir laiss un pied invisible sur le pas de la
  porte...


  55..55..  QQuuii eesstt ccee qquuee jjee rreemmeerrcciiee ppoouurr aauuttooffss ??

  Pas moi. Je n'y suis pour rien. J'ai juste voulu attirer l'attention
  de tout le monde sur l'excellent travail qui a t fait sur autofs, et
  sa facilit d'utilisation. Compar  l'AMD d'origine (Astuce, ils
  vendent une version hors de prix d'UNIX avec des outils gratuits
  prhistoriques) l'autofs est trs bien document et les auteurs ont
  tous mes remerciements.


























  Le Mini-HOWTO BTTV
  Par Eric Sandeen, eric_sandeen@bigfoot.com
  v0.3, Fvrier 2000

  Ce document dcrit le matriel, les logiciels, et les procdures
  ncessaires  l'utilisation d'une carte d'acquisition vido ou d'une
  carte tuner TV base sur les puces bt8*8 sous Linux.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Copyright de ce document
     1.2 O trouver ce document
     1.3 Remerciements
     1.4 Notification

  2. Matriel ncessaire

  3. Logiciels ncessaires

  4. Configuration du systme

     4.1 Installation matrielle
     4.2 Configuration du noyau
     4.3 Utilisation du paquetage 0.6.x mis  jour
     4.4 Fichiers spciaux dans
     4.5 Chargement des Modules
     4.6 Automatisation du processus

  5. Applications

  6. Appendice - Arguments pour tous les modules



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  La possibilit de capturer et de visionner des sources vido est une
  des fonctionnalits multimdia les plus intressantes de Linux.
  Beaucoup de priphriques vido diffrents sont supports par
  l'intermdiaire de l'API video4linux (), ceci inclut plusieurs cartes
  tuner TV bases sur les puces bt848 et bt878 de Conexant.  Ce document
  explique comment utiliser ces cartes sur un systme Linux.


  11..11..  CCooppyyrriigghhtt ddee ccee ddooccuummeenntt

  Ce HOWTO est sous le copyright 1999 Eric Sandeen.

  A moins que cela ne soit explicitement tabli, les documents Linux
  HOWTO sont la proprit de leurs auteurs respectifs. Les documents
  Linux HOWTO peuvent tre reproduits et distribus en entier ou par
  partie, sur n'importe quel mdium physique ou lectronique, tant que
  la notice du copyright est conserve sur toutes les copies.  La
  redistribution commerciale est autorise et encourage; nanmoins,
  l'auteur aimerait tre inform de ce genre de distribution.

  Toute traduction, travail driv, ou travail collectif incluant
  n'importe quel document Linux HOWTO doit tre couvert par cette notice
  du copyright. Cela tant, vous ne pouvez produire un travail driv de
  ce document et imposer des restrictions supplmentaires sur sa
  distribution. Des exceptions  ces rgles peuvent tre accordes sous
  certaines conditions; s'il vous plat contactez le coordinateur des
  Linux HOWTO  l'adresse donne plus bas.

  Pour faire court, nous voulons promouvoir la diffusion de cette
  information  travers autant de canaux que possible. Nanmoins, nous
  voulons conserver le copyright sur les documents HOWTO, et aimerions
  tre inform de tout projet de redistribution de ces HOWTO.

  Si vous avez des questions, veuillez contacter Tim Bynum, le
  coordinateur des HOWTO Linux,  _l_i_n_u_x_-_h_o_w_t_o_@_m_e_t_a_l_a_b_._u_n_c_._e_d_u via email.


  11..22..  OO ttrroouuvveerr ccee ddooccuummeenntt

  La version la plus rcente de ce document peut-tre obtenue du Linux
  Documentation Project  <http://metalab.unc.edu/LDP/>.


  11..33..  RReemmeerrcciieemmeennttss

  Merci  Ralph Metzler et Marcus Metzler pour avoir cod les pilotes
  bttv originels.  Merci aussi  Alan Cox pour avoir cr l'API
  (Architecture de programmation) Video4linux, Gerd Knorr pour son
  travail sur les cartes radio, pour les versions ultrieures des
  pilotes bttv et xawtv, et toutes les personnes contribuant  Linux
  pour le support de ces cartes. Merci  William Burrow, qui a aussi
  crit un HOWTO pour BTTV (Ce que j'ai appris _a_p_r__s avoir crit ce
  document...)  J'ai amlior ce guide, merci pour son travail.

  En crivant ce HOWTO je me suis trs fortement inspir de la
  documentation de bttv et xawtv.


  11..44..  NNoottiiffiiccaattiioonn

  Utilisez l'information de ce document  vos riques et prils. Je
  dcline toute responsabilit quand au le contenu de ce document.
  L'utilisation des concepts, exemples, et/ou autre contenu de ce
  document est entirement  votre propre risque.

  Tous les copyrights sont dtenus par leurs propritaires,  moins que
  cela ne soit explicitement spcifi. L'utilisation de termes dans ce
  document ne doit pas tre peru comme affectant la validit d'aucune
  marque dpose ou marque de service.

  La nomination de produit ou marque ne doit pas tre perue comme une
  recommandation particulire de ceux-ci. Vous tes fortement invit 
  faire une sauvegarde de votre systme avant toute installation majeure
  et sauvegarder  intervalles rguliers.



  22..  MMaattrriieell nncceessssaaiirree


  Extrait du README de bttv:

  Bttv est un pilote de priphrique pour cartes d'acquisition video
  utilisant la famille de dcodeur video Bt848 de Conexant (
  <http://www.conexant.com>), parmi lesquelles figurent le Bt848, le
  Bt848A, le Bt849, le Bt878 et le Bt879.  Les seules diffrences
  majeures entre ces cartes, de diffrents fabricants, sont les types de
  tuner et les composants supplmentaires sur la carte.  E.g., certaines
  cartes de Hauppauge possdent un dcodeur Videotext additionnel et/ou
  une puce de dcodage du son.  Seuls certains composants additionnels
  sont supports par bttv.  Ansi, le type (Composite ou S-Video) et le
  nombre d'entres diffre.

  Les cartes suivantes devraient fonctionner :

    AAvveerrMMeeddiiaa TTVV9988

    <http://www.aver.com/products.html>



    AAVVeerrMMeeddiiaa TTVV--PPhhoonnee

    <http://www.aver.com/lite/products/avertvphone.html>



    DDiiaammoonndd DDTTVV22000000

    <http://www.diamondmm.com/products/current/dtv-2000.cfm>



    HHaauuppppaauuggee WWiinn//TTVV ppccii (and other Hauppauge cards)

    <http://www.hauppauge.com/>



    IIDDSS IImmaaggiinngg FFAALLCCOONN

    <http://www.ids-imaging.de/>



    LLiiffeevviieeww FFllyyvviiddeeoo IIII

    <http://www.lifeview.de/lifeview/html/produkte.htm#karte>



    MMaattrriixx VViissiioonn MMVV--DDeellttaa

    <http://www.matrix-vision.de/>



    mmiirrooVVIIDDEEOO PPCCTTVV

    <http://www.pinnaclesys.com/>



    OOsspprreeyy--110000

    <http://www.mmac.com/products/osprey/osprey100.html>



    SSTTBB TTVV PPCCII

    <http://www.stb.com/products/multimedia/tvpci/tvpci.html>




    TTeerrrraatteecc TTEERRRRAA TTVV++

    <http://www.terratec.de/produkte/terratv/terratv_info.htm>



    VViiddeeoollooggiicc CCaappttiivvaattoorr PPCCII

    <http://www.videologic.com/Productinfo/capt_pci.htm>



  Si vous connaissez d'autres cartes qui fonctionnent, veuillez m'crire
  et je les ajouterai  la prochaine rvision de ce document.


  33..  LLooggiicciieellss nncceessssaaiirreess

  Pour utiliser ces cartes tuner TV sous linux, vous aurez besoin des
  pilotes du noyau appropris. Les pilotes bttv sont distribus avec le
  noyau depuis la version 2.2.0.

  Sinon, vous pouvez obtenir la dernire version des pilotes et
  l'utiliser avec le noyau 2.0.35 ou plus rcent. Nanmoins, il n'est
  pas garanti que cela fonctionne avec la vieille srie de noyaux 2.0.x.
  Le paquetage mis  jour bttv est disponible  et une version encore
  plus rcente est disponible chez Gerd Knorr 

  Ces paquetages incluent aussi le support de nouvelles puces audio,
  dont le TEA6300, le TDA8425, et le DPL3518.

  Si vous tes nouveau dans le monde des pilotes bttv, je vous suggre
  de commencer avec la version incluse avec le dernier noyau. Si vous
  rencontrez des problmes avec ceux-ci ou s'ils ne supportent pas votre
  carte, alors risquez vous  mettre  jour les pilotes de la srie 0.6
  sur le site cit plus haut. Si vous vous sentez vraiment aventurier,
  vous pouvez essayer la srie de pilote 0.7 de Gerd Knorr's, destine 
  tre incorpors dans le noyau 2.4.  La srie 0.7 est aussi disponible
   .

  Ce document est principalement bas sur les pilotes du noyau 2.2.14,
  avec quelques mentions des fonctionnalits disponibles dans la version
  mise  jour des pilotes de la srie 0.6. La srie 0.7 n'est pas
  actuellement couverte car en cours de dveloppement au moment de la
  rdaction de ce document.



  44..  CCoonnffiigguurraattiioonn dduu ssyyssttmmee


  44..11..  IInnssttaallllaattiioonn mmaattrriieellllee

  _(_M_e_r_c_i _ _W_i_l_l_i_a_m _B_u_r_r_o_w _p_o_u_r _c_e_t_t_e _s_e_c_t_i_o_n_._)

  Si vous avez peur d'ouvrir le botier de votre ordinateur, lisez
  pralablement en entier ce HOWTO et prenez des notes  propos de la
  carte, tel que le type de son tuner, le nombre de circuits intgrs,
  les frquences des cristaux etc.  Ensuite demandez  quelqu'un de
  comptent de vous installer votre carte.

  Autrement, ouvrez le botier et installez la carte dans un connecteur
  disponible.  Choisissez une carte conforme aux spcifications PCI 2.1
  capable d'oprer en tant que priphrique matre (bus mastering) sur
  le bus PCI, au cas o votre carte mre serait sensible sur ce point
  (rfrez-vous  son manuel).  Vous avez besoin de cela pour utiliser
  le mode overlay.

  Pour le son, il y a deux manire diffrentes de connecter votre carte
  d'acquisition et votre carte son. La premire solution est interne.
  Connectez le cble audio de votre CD-ROM vers l'entre sonore de votre
  carte vido et de la sortie de la carte vido vers l'entre audio CD-
  ROM ou Tuner de votre carte son.  L'autre manire est de connecter le
  jack 1/8'' externe de la carte video vers l'entre 1/8'' "line in" de
  la carte son. Vous pouvez aussi brancher des enceintes amplifies sur
  la sortie audio de votre carte d'acquisition si vous n'avez pas de
  carte son ou ne voulez pas passer par la carte son (quelques cartes
  rcentes bases sur un bt878 n'ont pas du tout de connecteur sonore,
  car elles envoient les donnes audio digitales au travers du bus PCI.
  Il n'y pas de support pour ces cartes  ce jour.


  Une source vido serait aussi utile, surtout pour dterminer si la
  carte fonctionne ou pas. Beaucoup de cartes comportent une entre
  vido composite, S-Vido et, si la carte est quipe d'un tuner, RF.
  Il y a un connecteur spar pour chacune de ces entres.



  44..22..  CCoonnffiigguurraattiioonn dduu nnooyyaauu


  Votre noyau devra tre correctement configur pour supporter votre
  carte.  La plupart des distributions rcentes sont livres avec les
  modules ncessaires dj compils, donc si vous pouvez trouver les
  modules videodev.o, bttv.o et tuner.o sous /lib/modules/2.x.x/misc,
  vous devriez tre prt.


  Sinon, vous allez devoir recompiler votre noyau avec

  CONFIG_VIDEO_DEV

  et

  CONFIG_VIDEO_BT848

  slectionns, de prfrence comme modules.  Voir le HOWTO du Kernel
  Linux ( <http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html>) pour plus
  de dtails sur la manire de recompiler votre noyau.



  44..33..  UUttiilliissaattiioonn dduu ppaaqquueettaaggee 00..66..xx mmiiss  jjoouurr

  Si vous voulez utiliser le  paquetage 0.6.x mis  jour, vous devriez
  d'abord tlcharger l'archive depuis l'un des sites mentionns plus
  haut.  Dcompactez le avec


  tar -xvzf bttv-0.6.x.tar.gz

  et entrez dans le rpertoire nouvellement cr.  su pour devenir root,
  et tapez

  make

  dans le rpertoire principal pour construire les pilotes. (Vous pouvez
  en toute scurit ignorer les informations dans le fichier INSTALL
  concernant l'dition des makefiles, puisque nous passerons ces
  informations au pilote comme paramtres des modules.)  Ensuite tapez

  make install

  pour les installer. Finalement, lancez

  /sbin/depmod -a

  pour mettre  jour les informations concernant les dpendances des
  modules.


  44..44..  FFiicchhiieerrss ssppcciiaauuxx ddaannss //ddeevv

  Ensuite, vous pourriez avoir besoin de crer les fichiers de
  caractres spciaux dans le rpertoire /dev. Tapez ls /dev/video*; ls
  /dev/radio* pour savoir si ces priphriques existent dj. Sinon,
  vous allez devoir les fabriquer. Tout ces fichiers possdent 81 comme
  numro de priphrique majeurs, les numros de priphrique mineurs
  sont spcifiques aux priphriques ainsi que de multiples cas de ces
  fichiers. Voir l'API Video4Linux () pour les dtails concernant la
  programmation.



  Il y  a un script MAKEDEV dans le rpertoire driver du paquetage des
  pilotes bttv qui crera quatre priphriques vido. Vous pouvez aussi
  le faire vous mme de manire assez aise si vous n'avez qu'une seule
  carte d'acquisition vido.  En tant que root, tapez:

  mknod /dev/video0 c 81 0

  chmod 666 /dev/video0

  ln -s /dev/video0 /dev/video


  mknod /dev/radio0 c 81 64

  chmod 666 /dev/radio0

  ln -s /dev/radio0 /dev/radio



  Il y a aussi les priphriques Videotext et VBI qui peuvent tre crs
  si vous avez une application qui les rclame. (Actuellement, elles
  sont peu nombreuses.)  Tapez:

  mknod /dev/vtx0 c 81 192

  chmod 666 /dev/vtx0

  ln -s /dev/vtx0 /dev/vtx


  mknod /dev/vbi0 c 81 224

  chmod 666 /dev/vbi0

  ln -s /dev/vbi0 /dev/vbi







  44..55..  CChhaarrggeemmeenntt ddeess MMoodduulleess

  Les pilotes bttv fournissent beaucoup de modules diffrents, avec de
  nombreuses options diffrentes, comme dcrit en appendice dans ce
  document. Avec autant de modules et d'options, vous devriez faire cela
   la main jusqu' ce que tout fonctionne. Si par malchance cela
  provoquait un plantage de votre machine, vous pourriez taper

  sync; sleep 1; sync

  pour chasser toutes les salets du cache du disque avant de
  poursuivre. Ensuite utilisez la commande insmod en tant que root, pour
  essayer de charger les modules.  Les deux premiers sont simples car
  ils ne ncessitent gnralement pas d'option :

  insmod videodev

  insmod i2c

  Vous tes maintenant prt  charger le module bttv lui-mme :

  modprobe bttv

  Par dfaut, le module bttv essaie de dtecter le type de votre carte.
  Regarder dans /var/log/messages pour voir ce qu'il trouve. s'il ne la
  dtecte pas proprement, vous pouvez ajouter l'option card=n  la fin
  de la commande prcdente pour forcer le type de carte, avec _n choisi
  parmi la liste suivante.  (Les types de 0  19 sont fournis dans la
  srie de pilote du noyau, bttv-0.6.4h contient le support pour les
  types de 20  27.)  Vous pouvez aussi ajouter l'option radio=1 Si
  votre carte possde un tuner FM.


  ______________________________________________________________________
  card=n          card type
                  0:  Auto-Detect
                  1:  Miro
                  2:  Hauppauge (old bt848 boards)
                  3:  STB
                  4:  Intel
                  5:  Diamond
                  6:  AVerMedia
                  7:  MATRIX Vision MV-Delta
                  8:  FlyVideo
                  9:  TurboTV
                  10: Hauppauge (new bt878 boards)
                  11: MIRO PCTV pro
                  12: Terratec/Vobis TV-Boostar
                  13: Newer Hauppauge WinCam (bt878)
                  14: MAXI TV Video PCI2
                  15: Terratec TerraTV+
                  16: Aimslab VHX
                  17: PXC200
                  18: AVermedia98
                  19: FlyVideo98 (newer FlyVideo cards)
                  20: Zoltrix TV-Max
                  21: iProTV
                  22: ADS Technologies Channel Surfer TV
                  23: Pixelview PlayTV (bt878)
                  24: Leadtek WinView 601
                  25: AVEC Intercapture
                  26: LifeView FlyKit w/o Tuner
                  27: Intel Create and Share PCI
  ______________________________________________________________________


  Ensuite, chargez le module tuner, avec

  modprobe tuner type=_n

  Vous aurez probablement  plonger dans votre botier pour voir quel
  tuner votre carte possde.  Certaines cartes (Miro et Hauppauge)
  permettent la dtection automatique du tuner, mais vous aurez
  peut-tre besoin de le spcifier. Le tuner devrait tre marqu avec le
  nom du fabricant, et vous pouvez jeter un oeil aux cristaux (petites
  boites d'aluminium) sur la carte pour voir si vous possdez un tuner
  NTSC ou PAL.  Pour le PAL, le cristal est marqu 28.xxxMHz (o xxx
  sont trois chiffres).  Pour NTSC, le botier devrait indiquer
  35.xxxMHz.  Une fois que vous avez identifi votre tuner, slectionnez
  la valeur de _n parmi la liste suivante (Les types 8 et 9 sont
  seulement inclus avec bttv-0.6.4h):


  ______________________________________________________________________
  type=n          type of the tuner chip. n as follows:
                  0: Temic PAL tuner
                  1: Philips PAL_I tuner
                  2: Philips NTSC tuner
                  3: Philips SECAM tuner
                  4: no tuner
                  5: Philips PAL tuner
                  6: Temic NTSC tuner
                  7: Temic PAL tuner
                  8: Alps TSBH1 NTSC tuner
                  9: Alps TSBE1 PAL tuner
  ______________________________________________________________________




  Enfin, insrez tous les modules sonores dont vous pouvez avoir besoin.
  Encore unhe fois, vous devrez probablement regarder attentivement la
  carte pour dterminer ce dont vous avez besoin.  Notez que les pilotes
  pour les puces TEA6300, TDA8425, TDA9855, and DPL3518 sont seulement
  inclus dans la srie 0.6.4h, et ne sont pas inclus avec les pilotes du
  noyau courant (2.2.14).


  modprobe msp3400 ou tea3600 ou tda8425 ou tda9855 ou dpl3518 (Voir
  l'appendice pour les dtails et les options)

  Lancez votre programme video4linux favori, et voyez si cela
  fonctionne.  Si vous ne pouvez pas changer de canal, vrifiez que vous
  avez insr le bon module tuner. Si vous n'entendez aucun son,
  vrifiez deux fois le module sonore, et vrifiez que le canal n'est
  pas en sourdine, si vous passez par la carte son.



  44..66..  AAuuttoommaattiissaattiioonn dduu pprroocceessssuuss

  Maintenant que vous connaissez les modules dont vous avez besoin et
  leurs options, vous pouvez automatiser le processus en crivant ces
  informations dans le fichier /etc/conf.modules. A partir de ce
  maintenant, lancer une application qui ncessite ces pilotes
  entranera leur chargement automatique.  J'utilise le fichier suivant:






  ______________________________________________________________________
  # TV
  alias   char-major-81   bttv
  pre-install bttv        modprobe -k tuner; modprobe -k msp3400
  options bttv            radio=1 card=3
  options tuner           type=2
  ______________________________________________________________________



  Fates attention de bien l'adapter pour qu'il reflte vos propres
  modules et options pour votre carte.  (Lancer un /sbin/depmod -a pour
  faire en sorte que les informations de dpendance soient  jour.)


  55..  AApppplliiccaattiioonnss


  Maintenant que votre noyau et vos priphriques sont configurs et que
  vos modules sont insrs, vous aurez aussi besoin d'applications pour
  visionner ou capturer les images de votre carte. Il y en a beaucoup de
  disponibles :


    bbttttvvggrraabb - Fournit une haute qualit de capture adapte 
     l'enregistrement video

  


    GGnnoommee--oo--VViissiioonn - Un visionneur pour l'environnement de bureau Gnome
     (actuellement en cours de dveloppement dans le CVS de Gnome)

  

    kkwwiinnttvv - Un visionneur TV bas sur Qt pour l'environnement KDE

  


    wwmmttuunnee - Une applet tuner radio pour window maker pour les cartes
     TV/radio bases sur bttv

  


    wwmmttvv - WindowMaker TV dock.app

  


    XXaawwTTVV - Une application TV et quelques utilitaires

  


    XXttTTVV - Un programme TV/Video simple pour Linux/X Windows

  


  Il y a aussi un pilote disponible pour la carte de contrle  distance
  pour le FlyVideo98 

  LLiisseezz llaa ddooccuummeennttaattiioonn pour chaque application que vous voulez
  d'utiliser. Beaucoup d'entre elles rclament l'dition de fichiers de
  configuration dtaills avant que l'application ne fonctionne
  correctement! A cause du grand nombre de cartes diffrentes
  disponibles, vous _d_e_v_e_z prendre le temps de lire la documentation de
  ces cartes, car les prrglages de l'application sont susceptibles de
  _n_e _p_a_s fonctionner pour votre carte.


  66..  AAppppeennddiiccee -- AArrgguummeennttss ppoouurr ttoouuss lleess mmoodduulleess

  Les items prcds d'une "*" sont seulement disponibles dans la srie
  0.6.4h.























































  ______________________________________________________________________

  videodev.o
          C'est le module de base de video4linux, tous les pilotes vido (y comprit bttv)
          s'enregistrent ici.

  i2c.o
          Module i2c gnrique. Il fait la plupart de la gestion du bus i2c,
          tous les autres modules l'utilisent (sauf videodev.o).

          Arguments pour insmod:
                  scan=1          scanne le bus pour trouver les priphriques i2c
                  verbose=0       dsactive le mode verbeux
                  i2c_debug=1     pour le dbogage, cela consigne tout le traffic
                                          (logiciel) du bus i2c dans la syslog

  bttv.o
          Pilote bt848 (puce d'acquisition).

          Arguments pour insmod:
                  remap=adr       reloge l'adresse mmoire du Bt848  adr<<20
                  vidmem=base     adresse>>20 du frame buffer (de la carte graphique)
                  triton1=0/1     pour la compatibilit Triton1
                                  Triton1 est reconnu automatiquement
                                  mais cela peut aussi aider avec d'autre puce
                  pll=0/1/2       rglages pll
                                  0: ne pas utiliser de PLL
                                  1: cristal 28 MHz install
                                  2: cristal 35 MHz install
                  radio=0/1       support des cartes radio
                  card=n          type de carte
                                  0:  Auto-Detect
                                  1:  Miro
                                  2:  Hauppauge (old bt848 boards)
                                  3:  STB
                                  4:  Intel
                                  5:  Diamond
                                  6:  AVerMedia
                                  7:  MATRIX Vision MV-Delta
                                  8:  FlyVideo
                                  9:  TurboTV
                                  10: Hauppauge (new bt878 boards)
                                  11: MIRO PCTV pro
                                  12: Terratec/Vobis TV-Boostar
                                  13: Newer Hauppauge WinCam (bt878)
                                  14: MAXI TV Video PCI2
                                  15: Terratec TerraTV+
                                  16: Aimslab VHX
                                  17: PXC200
                                  18: AVermedia98
                                  19: FlyVideo98 (newer FlyVideo cards)
                                  *20: Zoltrix TV-Max
                                  *21: iProTV
                                  *22: ADS Technologies Channel Surfer TV
                                  *23: Pixelview PlayTV (bt878)
                                  *24: Leadtek WinView 601
                                  *25: AVEC Intercapture
                                  *26: LifeView FlyKit w/o Tuner
                                  *27: Intel Create and Share PCI

          remap, card, radio et pll acceptent jusqu' quatre arguments spars par des virgules
          (pour plusieurs cartes).  Les arguments CARD et PLL dfinis  partir du Makefile sont
          utiliss comme arguments par dfaut.

  msp3400.o
          Pilote pour le processeur sonore msp34xx. Si vous avez une
          carte stro, vous devriez probablement charger ce module.

          Arguments pour insmod:
                  debug=1/2       crit des informations de dbogage dans la syslog,
                                  2 est plus verbeux.

  *tea6300.o
          Pilote pour la puce fader tea6300. Si vous avez une carte stro et que
          le msp3400.o ne marche pas, vous essayez celui-ci. Cette puce
          est disponible sur la plupart des cartes TV/FM de STB (gnralement en
          provenance de surplus de carte OEM de Gateway sur les sites de mise aux enchres).

          Arguments pour insmod:
                  debug=1         crit quelques informations de dbogage dans la syslog.

  *tda8425.o
          Pilote pour la puce fader tda8425. Ce pilote faisait partie de bttv.c,
          donc si votre son fonctionnait mais ne marche plus, essayez ce module.

          Arguments pour insmod:
                  debug=1         crit quelques informations de dbogage dans la syslog.

  *tda9855.o
          Pilote pour le dcodeur stro / puce sonore tda9855.

          Arguments pour insmod:
                  debug=1         crit quelques informations de dbogage dans la syslog.

  *dpl3518.o
          Pilote pour la puce Dolby Pro Logic dpl3518a.

          Arguments pour insmod:
                  debug=1         crit quelques informations de dbogage dans la syslog.

  tuner.o
          Pilote tuner. Vous avez besoin de celui-ci  moins de ne vouloir utiliser
          qu'une camera ou un tuner externe...

          Arguments pour insmod:
                  debug=1         crit quelques informations de dbogage dans la syslog.
                  type=n          type de la puce tuner. n dans la liste suivante:
                                  0: Temic PAL tuner
                                  1: Philips PAL_I tuner
                                  2: Philips NTSC tuner
                                  3: Philips SECAM tuner
                                  4: no tuner
                                  5: Philips PAL tuner
                                  6: Temic NTSC tuner
                                  7: Temic PAL tuner
                                  *8: Alps TSBH1 NTSC tuner
                                  *9: Alps TSBE1 PAL tuner

  i2c_chardev.o
          Fournit un priphrique caractre pour accder au bus i2c. Fonctionne pour
          les 2.1.x seulement, il n'est pas compil par dfaut.
  ______________________________________________________________________










  Battery Powered Linux Mini-HOWTO
  Hanno Mueller, hanno@lava.de http://www.lava.de/hanno/
  v , 21 dcembre 1997

  Version franaise par Philippe Gaucher, gaucher@easynet.fr. Ce docu
  ment explique comment rduire la consommation lectrique d'un ordina
  teur  fonctionnant sous Linux grce  un bon paramtrage de sa config
  uration. Il  sera utile  toute personne qui utilise Linux sur un
  ordinateur portable. Il  contient aussi quelques informations sur la
  faon d'entretenir une batterie.  Si vous utilisez Linux sur un ordi
  nateur de bureau, vous n'avez probablement  pas besoin de lire ce doc
  ument.

  11..  IInnttrroodduuccttiioonn

  " partir de 6 ans, batteries incluses."

  11..11..  AAvvaanntt qquuee vvoouuss ppoossiieezz llaa qquueessttiioonn

  Ce document n'explique pas comment installer Linux sur un portable
  mais comment y optimiser l'utilisation d'un Linux dj configur.
  Veuillez vous reporter s'il vous plat  l'Installation-HOWTO ou bien
  au mode d'emploi de votre distribution pour de l'aide concernant
  l'installation de Linux.

  Ce document n'explique pas comment utiliser une alimentation pour
  parer   toute coupure de courant ni comment utiliser le daemon powerd
  (mme si un UPS est une grosse batterie). Lire le UPS-HOWTO pour des
  dtails sur ce sujet.

  11..22..  DDee qquuooii ppaarrllee ccee ddooccuummeenntt

  De plus en plus de gens possdent des ordinateurs portables de nos
  jours, et de plus en plus de gens y installent Linux.

  L'installation et l'utilisation de Linux sur un portable ne prsentent
  en gnral aucun problme, donc lancez-vous et faites l'essai.
  Contrairement  d'autres systmes d'exploitation, Linux continue 
  supporter et fonctionne correctement mme sur du trs vieux matriel.
  Vous pouvez donc donner  votre vieux portable une nouvelle jeunesse
  en lui installant Linux.

  Si vous avez besoin d'aide pour l'installation de Linux sur un
  portable ou bien si vous avez des questions  propos du matriel
  composant les portables, vous pouvez jeter un oeil  l'excellente page
  web "Linux Laptop webpage" 
  http://www.cs.utexas.edu/users/kharker/linux-laptop/ o vous trouverez
  plein d'informations utiles et d'aides dtailles. Cette page dcrit
  la configuration matrielle pour des modles spcifiques de portables
  et de chipsets.

  Ce HOWTO se concentrera sur le problme commun  toutes les
  utilisations de portables : la consommation lectrique.

  Pour le moment, je n'ai pas encore trouv de distribution Linux qui
  s'installe avec une configuration optimise pour les portables.
  Puisque je n'ai pu trouver ce type d'informations nulle part ailleurs,
  j'ai commenc  collecter quelques exemples simples mais utiles
  d'astuces qui aident  prserver la batterie et qui ainsi augmentent
  le temps d'utilisation du systme quand il fonctionne sur batterie.

  (Apart) Un lecteur s'est plaint que ces indications n'taient pas
  trs efficaces sur son portable. Alors est-ce que les conseils donns
  ici marchent vraiment ? Oui, mais n'esprez pas de miracles. J'ai t
  quant  moi capable d'augmenter le temps d'utilisation de la batterie
  de mon portable de 90 minutes  plus de 120 minutes.
  11..33..  PPllaann ddee rroouuttee

  Si vous tes un pro des portables, vous pouvez probablement sauter la
  section "Informations gnrales" et dans ce cas, vous trouverez ce que
  vous cherchez vraiment  la section "Changement des paramtres
  gnraux du systme". Si vous tes un distributeur de Linux, lisez
  s'il vous plat "Un message aux distributeurs Linux".

  11..44..  CCoommmmeennttaaiirreess

  Tout commentaire est le bienvenu. Envoyez-les s'il vous plat 
  hanno@lava.de.  Est-ce-que cela marche pour votre systme ? Avez-vous
  trouv de nouvelles astuces ? Y a-t-il des liens ou des adresses
  incorrects dans ce texte ?

  J'en suis dsol, mais je ne pourrai pas vous aider pour des questions
  spcifiques  un modle de portable. Je ne prtends pas tre un gourou
  de ce type de machine. Il se trouve juste que j'en possde un et je
  cherche simplement  partager les informations que j'ai runies. S'il
  vous plat, vrifiez d'abord la page "Linux Laptop webpage", quelqu'un
  d'autre a probablement dj crit une page consacre  votre modle.
  Posez aussi des questions au support technique de votre fabriquant. Ou
  allez dans le forum de discussions comp.sys.laptops et posez-y votre
  question.

  11..55..  DDnnggaattiioonn

  Toutes les mthodes dcrites ici ont t testes par moi et marchent
  correctement sur mon portable, sauf mention explicite du contraire.
  Cependant je ne peux pas garantir que n'importe laquelle de ces
  mthodes ne pourra pas planter ou srieurement endommager votre
  systme. La vie est dangereuse, donc faites  des copies de sauvegarde
  avant de jouer avec la configuration de votre Linux. Si les choses se
  passent mal, je ne prends aucune responsabilit quant   la perte de
  vos donnes. En d'autres termes : n'engagez pas de poursuites pnales
  contre moi. Merci.

  11..66..  CCooppyyrriigghhtt

  Ce document doit tre distribu dans les termes standards du HOWTO-
  copyright, que vous pouvez trouver 
  http://sunsite.unc.edu/mdw/linux.html.

  22..  IInnffoorrmmaattiioonnss ggnnrraalleess

  Cette section expose des gnralits techniques sur les batteries de
  portables et quelques principes gnraux pour conomiser de la
  puissance lectrique.  Ces informations ne sont pas spcifiques 
  Linux et si vous avez dj de l'exprience avec les portables, il se
  peut que vous les connaissiez dj toutes.

  22..11..  SSooyyeezz aatttteennttiiff  vvoottrree bbaatttteerriiee

  (S'il vous plat, lisez la premire partie de la section
  "Remerciements")


  Il y a actuellement trois types de batteries couramment utilises par
  les ordinateurs portables.


    Les batteries NiCd ont t le standard technologique pendant des
     annes mais aujourd'hui elles sont dpasses et les plus rcents
     portables ne les utilisent plus. Elles sont lourdes et ont
     naturellement le problme de l'"effet mmoire". Quand on recharge
     une batterie NiCd qui n'a pas t compltement dcharge, elle se
     "souvient" de l'ancien niveau de charge et continue de s'en
     souvenir la prochaine fois que vous l'utilisez.

  L'effet mmoire est caus par la cristallisation de la substance
  chimique composant la batterie. Il peut rduire de faon permanente la
  dure d'utilisation de votre batterie, et mme la rendre inutilisable.
  Pour viter cela, vous devriez dcharger compltement votre batterie
  au moins une fois toutes les deux  trois semaines.

  Une remarque sur l'effet mmoire : James Youngman connait une mthode
  plutt radicale pour -hum- "rparer" une batterie NiCd : "Si votre
  batterie NiCd souffre de l'effet mmoire, retirez-la de votre
  ordinateur, tenez-l  peu prs  30 cm au dessus d'un bureau ou du
  sol, et lachez-l (assurez vous bien qu'elle retombe  plat)." Selon
  lui, a doit casser les cristaux qui se sont forms dans la batterie
  et qui sont la cause de l'effet mmoire au cas o votre batterie en
  serait affecte. "Je ne sais pas si cela marche pour les batteries
  d'un autre type que les NiCd".

  Le Cadmium est un poison extrmement dangereux mais si vous renvoyez
  votre batterie  votre revendeur, le matriel peut presque
  compltement tre recycl.

  Juste au cas o vous seriez intress, voici quelques donnes
  concernant le NiCd :


         Voltage : 1,2 V
         Energie / masse : 40 Wh/kg
         Energie / volume : 100 Wh/l
         Energie max. : 20 Wh
         Temp. de charge : 10 to 35 C (50 to 95 F)
         Temp. de fonctionnement : -20 to 50 C (-5 to 120 F)
         Temp. de stockage : 0 to 45 C (30 to 115 F)






    Les batteries NiMh sont le standard actuel pour la plupart des
     portables rcents. Elles peuvent tre fabriques plus petites et
     sont moins affectes par l'effet mmoire que les batteries NiCd.

  Cependant, elles prsentent quelques problmes  trs haute ou trs
  basse temprature ambiante. Et mme si elles utilisent des substances
  moins dangereuses, elles ne peuvent pas tre encore compltement
  recycles (mais cela changera probablement dans le futur). Voici
  quelques donnes concernant le NiMh :


         Voltage : 1,2 V
         Energie / masse : 55 Wh/kg
         Energie / volume : 160 Wh/l
         Energie max. : 35 Wh
         Temp. de charge : 10 to 35 C (50 to 95 F)
         Temp. de fonctionnement : 0 to 45 C (30 to 115 F)
         Temp. de stockage : 0 to 30 C (30 to 85 F)






    Les nouvelles batteries  haute performance utilisent la
     technologie LiIon.  En thorie, il n'y a pas du tout d'effet
     mmoire avec ces batteries. Mme si  l'occasion, elles peuvent
     avoir des problmes similaires. Leur composition chimique n'est pas
     dangereuse pour l'environnement, mais elles doivent tre galement
     rendues pour pouvoir tre recycles. Voici quelques donnes sur le
     LiIon :


         Voltage : 3,6 V
         Energie / masse : 100 Wh/kg
         Energie / volume : 230 Wh/l
         Energie max. : 60 Wh
         Temp. de charge : 0 to 45 C (30 to 115 F)
         Temp. de fonctionnement : -20 to 60 C (-5 to 140 F)
         Temp. de stockage : -20 to 60 C (-5 to 140 F)





  Mme si les batteries se ressemblent extrieurement, vous ne pouvez
  pas simplement passer d'une technologie de batterie  une autre. Le
  processus de rechargement est diffrent selon le type de batterie
  utilise.

  Certains fabriquants intgrent le circuit de rechargement 
  l'intrieur de l'adaptateur externe d'alimentation du portable. Dans
  ce cas, vous pouvez passer d'une technologie de batterie  une autre
  simplement en achetant un nouvel adaptateur d'alimentation. Une bonne
  indication que vous tes dans cette situation est quand l'adaptateur
  d'alimentation externe utilise un connecteur propritaire avec
  beaucoup de contacts.

  D'autres fabriquants mettent l'unit de rechargement  l'intrieur du
  portable et dans ce cas, l'utilisateur ne peut pas de faon simple la
  remplacer par une technologie plus rcente. Si votre adaptateur de
  courant alternatif n'utilise pour se connecter  l'ordinateur que deux
  contacts (justement comme le mien), l'unit de recharge est
  probablement  l'intrieur du portable.

  En cas de doute, vrifiez auprs de votre fabriquant si votre portable
  supporte ou pas une batterie plus moderne.

  Une batterie qui n'est pas utilise pendant une longue priode se
  dchargera petit  petit. Et mme avec les meilleurs soins, une
  batterie a besoin d'tre remplace aprs 500  1000 recharges. Il
  n'est quand mme pas recommand d'utiliser un portable sans batterie
  avec uniquement l'adaptateur externe branch car la batterie sert
  souvent de protection contre les pics de voltage de votre prise de
  courant.

  Les fabriquants changent la forme de leurs batteries  peu prs tous
  les mois. Vous pouvez donc avoir des problmes pour trouver une
  nouvelle batterie pour votre portable d'ici quelques annes. Achetez
  une batterie de rserve maintenant avant qu'il y ait rupture de stock.

  22..22..  ccoonnoommiisseerr ll''nneerrggiiee :: lleess ttrruuccss vviiddeennttss

  Il y a des choses videntes  faire pour rduire la consommation
  d'nergie de votre ordinateur portable. Enfin ceci dit, peut-tre pas
  aussi videntes, vu que peu de gens suivent ces rgles...


    Diminuez ou teignez le rtroclairage de votre cran quand vous
     n'utilisez pas votre portable. Signalons que les crans TFT 
     matrice active consomment plus d'nergie que les crans DSTN dual
     scan (et vous savez donc maintenant pourquoi vous avez achet un
     portable bon march et vous en avez une excuse toute trouve...).

  David Bateman m'a dit que l'utilisation  d'un moniteur externe CRT (
  tube) pendant qu'on est sur batterie tout en teignant l'cran du
  portable peut tendre le temps d'utilisation de la batterie d'environ
  30% : "Encore que ce ne soit pas une information vraiment utile 
  connaitre, car si votre cran est branch, pourquoi pas votre portable
  galement".


    De combien de puissance processeur avez vous rellement besoin ? Je
     doute fort que vous allez faire beaucoup plus que du traitement de
     texte quand vous serez en voyage (au moins je ne compile pas de
     noyau Linux pendant ces priodes).  Tant que vous tes sur
     batterie, la rduction de la vitesse de l'horloge du processeur
     permet aussi de diminuer la consommation lectrique. Assez peu de
     portables offrent la possibilit de slectionner la vitesse de
     l'horloge du processeur entre une vitesse normale et une vitesse
     lente.

    teignez le ventilateur du processeur (si vous en avez un).
     Beaucoup de portables rcents proposent une option dans le bios
     appele "cooling control". Si la CPU de votre machine devient trop
     chaude, cette option vous permet de la refroifir  l'aide d'un
     petit ventilateur (paramtrage "performance"), ou de ralentir
     l'horloge de la CPU (paramtrage "silence"). Pour augmenter votre
     dure d'utilisation sur batterie, rgler sur "silence".


    vitez d'utiliser des priphriques externes (imprimante, cran
     CRT, lecteur zip, camra portable, etc...) avec votre ordinateur
     sur batterie. Quand il est connect  une imprimante  jet d'encre
     standard, le temps d'utilisation de la batterie de mon portable
     passe de 120  20 minutes.

    vitez d'utiliser n'importe quel priphrique interne sauf
     ncessaire ; lecteur de disquette, disque dur, cd-rom. Surtout les
     accs au cd-rom qui diminuent de faon dramatique la dure
     d'utilisation de votre batterie.

    Les cartes PCMCIA peuvent galement consommer beaucoup
     d'lectricit, donc ne laissez pas votre modem ou votre adaptateur
     rseau branch quand ils sont inactifs. Mais il y a des diffrences
     entre les cartes PCMCIA de marques diffrentes, donc renseignez-
     vous sur les caractristiques techniques d'un produit avant de
     l'acheter (par exemple certaines cartes ne peuvent jamais
     s'teindre d'elles-mme, mme quand elles ne fonctionnent pas).

  En fait, j'ai lu rcemment que les cartes PCMCIA sont le plus gros
  problme des assistants numriques de type PalmPilot sous windows CE ;
  elles consomment tellement d'nergie que les petites batteries de ces
  machines doivent tre remplaces dans la minute...


    Utilisez des programmes simples. Une application multimdia
     sophistique engendrera une charge plus lourde du systme et plus
     d'activits disque dur / CD-Rom qu'un traitement de texte tout
     simple.

    Grant Taylor a quelques trucs pour ceux d'entre nous qui veulent
     mettre  niveau leur matriel : "Les versions plus rcentes de
     certains composants amovibles consomment nettement moins. Par
     exemple un disque dur 1,6 Go 2,5 pouces Travelstar de IBM consomme
     20% de moins que le disque dur Tohiba de 500 Mo fourni par dfaut
     avec mon portable".

    Si vous tes encore sur le point d'acheter un portable, n'achetez
     pas de portable avec un cache L2 si la dure d'utilisation de la
     batterie vous est importante.  Un ordinateur avec un cache L2 est
     environ 10  20% plus rapide et il sera bien meilleur avec les
     applications multimdias et le calcul intensif, mais en revanche il
     consomme beaucoup plus d'nergie. Bjoern Kriews m'a dit qu'il a
     deux portables quasiment identiques et celui sans cache dure 4h30
     tandis que celui avec cache dure 2h30.

  Si vous avez dj un cache L2 install, le dsactiver ne sera
  probablement pas d'une trs grande utilit. Faites un essai et
  crivez-moi pour me raconter votre exprience.


    Encore un autre truc pour ceux qui sont encore en train de
     rflchir  l'achat d'un portable : n'en achetez pas un quip de
     la dernire CPU rapide  la mode. Habituellement, les plus vieilles
     gnrations sont optimises par les fabriquants aprs quelques
     temps et sans qu'ils en parlent. Les "nouvelles" versions de vieux
     types de CPU dgagent souvent moins de chaleur et consomment moins
     d'nergie que les premires versions des mmes CPUs.

    On trouve aussi des portables " la Frankenstein" qui utilisent des
     CPUs qui ne sont pas optimises pour ce genre de systme. Comme je
     l'ai crit en mai 97, les plus rcentes gnrations de portables 
     base de Pentium 200 tournent  peu prs 20 minutes sur batterie et
     deviennent si chaud qu'ils brlent la coque. Quand j'tais en train
     d'crire la seconde rvision en octobre 97, les portables  base de
     Pentium 233 pouvaient fonctionner deux heures voire encore plus
     longtemps sans adaptateur. Pensez-y.

  Bon, vous voyez l'ide. La plupart de ces trucs sont des restrictions
  qui vous empcheront probablement de faire un travail srieux avec
  votre systme Linux. (Le meilleur moyen d'conomiser de l'nergie est
  ... de ne rien faire du tout. Cela augmente la dure d'utilisation de
  votre batterie de presque 100%).

  Donc, nous allons maintenant passer  d'autres mesures bien plus
  utiles, et qui conomiseront de l'nergie sans vous dranger dans
  votre travail.

  33..  GGeessttiioonn aavvaannccee ddee ll''nneerrggiiee ((AAPPMM))

  Les systmes portables, et mme pas mal d'ordinateurs de bureau, sont
  en gnral quips d'un support APM, ce qui signifie "gestion avance
  de l'nergie" (APM = Advanced Power Management en anglais). Cette
  section dcrit comment activer le support APM dans votre noyau Linux.
  Les gens qui ont de l'exprience dans Linux vont trouver cette section
  plutt ennuyeuse et pourront sauter  la suivante.

  33..11..  CCee qquuee ll''AAPPMM ppeeuutt ffaaiirree ppoouurr vvoouuss

  Je ne le dcrirai pas en dtail ici. Reportez-vous  la page "Linux
  APM drivers page"  http://www.cs.utexas.edu/users/kharker/linux-
  laptop/apm.html pour plus d'information. Tout ce que vous avez besoin
  de savoir est qu'avec l'aide de l'APM, la CPU peut dire au BIOS quand
  il ne se passe rien de rellement excitant afin que le BIOS soit
  capable de lui-mme d'conomiser de l'nergie (par exemple en
  rduisant la vitesse d'horloge de la CPU, en arrtant le disque dur,
  en teignant le rtroclairage de l'cran, etc...)

  L'APM gre aussi le mode "system suspend" ou "sleep" (systme
  suspendu, ou mode suspension) et le mode "suspend to disk" ou
  "hibernation" (arrt du disque) . Et une autre chose utile, bien que
  pas trs importante, est qu'avec l'aide de l'APM, un shutdown -h ne
  fait pas qu'arrter le systme, mais l'teint aussi.
  En fait, la plupart des systmes Linux mettent un shutdown -r dans
  leur /etc/inittab qui est reli  la squence de touches control-alt-
  delete. Je prfre avoir un shutdown -h ici ainsi quand je presse la
  fameuse combinaison de touches, mon portable s'teint tout simplement
  de lui-mme.

  Tous les fabriquants n'implmentent pas un BIOS APM correct. Par
  consquent certains portables ont des problmes avec les drivers APM
  de Linux (si votre machine a des problmes avec APM, vraisemblablement
  la machine bloquera au dmarrage, ou bien aprs tre revenue d'un
  "system suspend"). Si vous n'tes pas sr, vrifiez dans la page
  "Linux laptop" (mentionne au dbut de ce texte) pour votre modle
  particulier.

  33..22..  CCoommmmeenntt aaccttiivveerr llee ssuuppppoorrtt AAPPMM ssoouuss LLiinnuuxx

  C'est facile : il suffit de recompiler le noyau. Vrifiez dans le
  Kernel-HOWTO si vous ne savez pas comment faire a.

  Quand le script de configuration atteint la section "character
  devices", le paramtrage par dfaut pour un support complet de l'APM
  du BIOS dans le noyau 2.0.30 ou plus est :


         Advanced Power Management BIOS support: Yes
         Ignore USER SUSPEND: No
         Enable PM at boot time: Yes
         Make CPU Idle calls when idle: Yes
         Enable console blanking using APM: Yes
         Power off on shutdown: Yes





  Lisez s'il vous plat les textes d'aide du script de configuration.
  Ils expliquent dans le dtail ce que fait chaque option, donc je ne le
  rpterai pas ici.

  Si votre systme n'est pas compltement compatible avec le standard du
  BIOS APM, certaines de ces options peuvent planter votre systme.
  Testez toutes les fonctionnalits de l'APM avec les nouveaux noyaux
  pour bien vrifier que tout fonctionne comme a le devrait.

  (-- Une note concernant l'extinction de la console (console blanking)
  : David Bateman m'a dit que vous ne devriez pas l'activer parce
  qu'elle cause quelques problmes avec les version actuelles de XFree
  3.2 : "les symptmes sont un cran teint quand XFree dmarre, et cela
  peut tre corrig habituellement juste en pressant une touche. C'est
  un petit problme, un peu dsagrable. La prochaine version de XFree
  aura un bon support DPMS pour un grand nombre de chipsets de
  portables, et elle devrait contenir du code pour teindre l'cran LCD.
  Vrifier dans la page de manuel de xset dans XFree 3.2A." David a
  galement remarqu que la dure d'utilisation du rtroclairage de
  votre cran est fonction du nombre de fois qu'il passe de allum 
  teint : "Donc c'est un compromis entre la dure de vie de la batterie
  et la dure de vie de l'clairage".--)

  Mise  jour : avec XFree 3.3, le problme existe encore sur mon
  portable.  On m'a dit que le problme sera rgl dans une future
  version du noyau.





  33..33..  SSuuppppoorrtt AAPPMM eett ddrriivveerrss PPCCMMCCIIAA

  Aprs avoir recompil le noyau, n'oubliez pas de recompiler galement
  les pilotes PCMCIA.

  Les pilotes PCMCIA prcompils fournis avec la plupart des
  distributions Linux ont le support APM dsactiv pour que le BIOS ne
  puisse pas donner l'ordre  votre carte PCMCIA de s'teindre.

  Vous devez aussi recompiler le noyau si vous installez une nouvelle
  version du noyau et si votre prcdent noyau avait t compil avec
  l'option "informations sur la version dans les modules" activ (cette
  option se trouve dans la section "loadable module support" de la
  configuration du noyau).

  Lisez le PCMCIA-HOWTO pour des instructions dtailles sur la faon de
  compiler les pilotes ou bien allez  la page "Linux PCMCIA drivers" 
  http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html.


  33..44..  LLee ppaaqquueettaaggee aappmmdd

  Maintenant que vous avez le support APM install, procurez-vous le
  paquetage apmd, par exemple  la page "Linux PCMCIA drivers"
  mentionne ci-dessus.  Il n'est pas vraiment ncessaire mais c'est
  quand mme une collection trs intressante de programmes. Le dmon
  apmd enregistre le comportement de votre batterie et il vous enverra
  un avertissement s'il y a une baisse de puissance.  La commande apm
  suspendra votre systme avec une commande shell et xapm montre l'tat
  actuel de votre batterie.

  NB : si vous rencontrez des problmes avec votre carte PCMCIA quand
  vous revenez d'un mode "suspend", vous pouvez tester un package apmd
  diffrent  http://www.cut.de/bkr/linux/apmd/apmd.html. Il supprime le
  module contenant le pilote PCMCIA avant de passer en mode "suspend" et
  le recharge au retour.

  Grant Taylor a jou un peu avec le paquetage apmd et en a tir
  quelques trucs utiles. Il a trouv que le disque dur de son portable
  oublie sa priode d'arrt (avec hdparm -S) quand il revient du mode
  "suspend" : "J'ai modifi apmd afin de rinitialiser ce paramtrage 
  chaque retour du mode "suspend".  Cela peut tre spcifique au systme
  ; mais c'est une chose importante  faire..."

  Note : sur mon propre portable, le bios s'occupe de la priode d'arrt
  du disque dur et rinitialise les paramtrages correctement  chaque
  retour du mode "suspend".  Donc je n'ai pas pu tester si ce petit
  problme tait spcifique  un systme.  Si cela vous arrive aussi,
  envoyez-moi un message.

  Grant a galement un truc sympa pour l'extinction de la console avec
  le paquetage XFree86. Et vous le trouverez dans le fichier d'aide du
  paquetage apmd.


  33..55..  EEtt ssii mmoonn ppoorrttaabbllee nnee ssuuppppoorrttee ppaass ll''AAPPMM ??

  Si le bios de votre ordinateur ne propose pas de paramtrages pour les
  conomies d'nergie (mme les plus vieux sans APM devraient au moins
  permettre des rglages concernant le disque dur), vous pouvez utiliser
  hdparm -S pour rgler la priode d'arrt de votre disque dur. Cela
  vous aidera dj beaucoup car les disques durs en activit consomment
  normment d'nergie. Votre systme devrait avoir hdparm install,
  donc veuillez lire la page de manuel de hdparm pour la syntaxe de la
  commande.

  44..  CChhaannggeemmeenntt ddeess ppaarraammttrreess ggnnrraauuxx dduu ssyyssttmmee

  Aprs avoir install Linux et l'avoir fait tourner sur mon portable,
  je me suis aperu qu'il accdait sans arrt au disque dur, mme quand
  il n'y avait pas d'utilisateur logu sur le systme. Le disque dur ne
  pouvait pas rentrer dans son mode d'conomie d'nergie. Comme la
  rduction de l'activit du disque dur peut augmenter de faon
  importante la dure d'utilisation de la batterie, j'ai collect les
  ides gnrales qui suivent.

  Je les ai toutes testes sur une RedHat 4.1. Donc la localisation de
  certains fichiers de configuration peut tre diffrente sur votre
  distribution (si c'est le cas, s'il vous plat faites-le moi savoir).

  44..11..  LLee ddmmoonn ccrroonndd eett aattrruunn

  Vrifiez dans votre /etc/crontab s'il dmarre un processus toutes les
  minutes.  Vous trouverez souvent atrun l.

  Avec la commande at, vous pouvez mmoriser des commandes qui sont 
  excuter ultrieurement. Certains systmes Linux utilisent un dmon
  atd spcialement consacr  cela ; d'autres (comme la RedHat) laissent
  le dmon crond excuter atrun une fois par minute.

  Tout cela n'est pas rellement indispensable sur la plupart des
  systmes puisque les commandes at ont rarement besoin d'tre invoques
   une heure prcise.  Donc si vous trouvez une ligne comme celle qui
  suit dans votre /etc/crontab :


         # Run any at jobs every minute
         * * * * * root [ -x /usr/sbin/atrun ] && /usr/sbin/atrun





  vous pouvez sans risque la changer en :


         # Run any at jobs every hour
         00 * * * * root [ -x /usr/sbin/atrun ] && /usr/sbin/atrun





  Lire man 5 crontab pour les dtails. Certaines personnes peuvent mme
  travailler correctement sans le dmon crond. Donc si vous savez ce que
  vous faites, vous pouvez ventuellement envisager de le dsactiver
  compltement.

  44..22..  LLee ddmmoonn uuppddaattee // bbddfflluusshh

  Linux jongle  chaque instant avec un grand nombre de tampons
  correspondant  des fichiers ouverts. Donc votre systme doit tre
  assur que les changements  l'intrieur des fichiers sont sauvegards
  sur le disque dur ds que possible.  Sinon ces changements seront
  perdus aprs un crash systme.

  Le dmon update / bdflush s'occupe de cela. (Il y a deux noms pour le
  mme programme, donc vous pouvez utiliser n'importe lequel des deux
  noms pour dmarrer le dmon). Le paramtrage par dfaut fera en sorte
  que le dmon appelle flush toutes les 5 secondes et sync toutes les 30
  secondes.

  Sur mon disque Fujitsu, cela engendre des accs incessants.
  (Apparemment, ce disque dur vide son cache en ram mme si rien n'a
  chang. Mais cela dpend de la marque du disque dur : d'autres
  personnes m'ont dit que leur disque dur entre effectivement en mode
  "conomie d'nergie" sans mme les modifications qui suivent.)

  Puisque Linux ne plante pas vraiment souvent, j'ai remplac les deux
  valeurs ci-desssus par 3600 secondes (= une heure). Cela ne pose
  absolument aucun problme et de cette faon, l'accs incessant au
  disque cesse. (Mais si maintenant mon systme plante, il y aura plus
  de fichiers perdus, bien entendu.)


    RedHat 4.1 : dans /etc/inittab, changer l'appel  update en :


         ud::once:/sbin/update -s 3600 -f 3600






    Suze 4.4.1 : update est appel dans /sbin/init.d/boot.

    Slackware : update est appel dans /etc/rc.d/rc.S.

  Lire la page de manuel de update pour davantage de dtails.

  44..33..  LLee ddmmoonn ssyyssllooggdd

  Le dmon syslogd est responsable des diffrents fichiers de log du
  systme Linux qui se trouvent dans le rpertoire /var/log/. Par
  dfaut, syslogd crira dans le fichier de log  chaque fois qu'il
  recevra un message provenant du systme.


  Vous pouvez arrter cela en faisant prcder le nom du fichier d'un
  tiret dans /etc/syslog.conf. Voici un exemple comme trouv dans le
  syslog.conf de mon systme :


         # Logge tout (sauf le mail) de niveau info ou plus.
         # Ne pas logger les messages d'authentication prives !
         *.info;mail.none;authpriv.none                  -/var/log/messages





  Cela signifie encore que si le systme plante, le message qui a
  report le problme peut ne pas avoir t enregistr sur le disque
  dur. Dilemme...


  44..44..  LLaa ccoommmmaannddee iinniitt

  Pendant la squence de dmarrage, les processus initiaux et les dmons
  sont dmarrs  l'aide de la commande init. Cette commande appelle
  sync avant chaque processus qu'elle cre.

  Vous pouvez modifier cela en enlevant l'appel sync() dans le code
  source et en recompilant la commande.

  Pour viter des problmes de tampons de fichiers perdus, vous devriez
  ajouter un appel  sync dans le script systme /etc/rc.d/init.d/halt,
  juste avant que le script dmonte les systmes de fichier.

  44..55..  LLaa ppaarrttiittiioonn ddee sswwaapp

  La partition de swap de Linux est utilise pour augmenter la mmoire
  vive grce  une mmoire virtuelle. C'est encore une cause possible
  d'accs au disque dur. Si votre portable a dj beaucoup de RAM ou
  bien si les applications que vous utilisez sont trs rustiques (pensez
   vi), vous pouvez envisager de la dsactiver.

  Bien entendu, cela dpend de ce que vous avez l'intention de faire. De
  4  8 Mo, ce n'est pas suffisant et vous devez dans ce cas utiliser
  une partition de swap. De 8  16 Mo, des applications en console texte
  fonctionneront trs bien et si vous pouvez viter d'utiliser trop de
  fonctionnalits multitches, vous pouvez sans risque dsactiver le
  swap. L'environnement X Window ncessite beaucoup de RAM et vous ne
  devriez pas l'utiliser sans partition de swap  moins que vous ayez
  beaucoup plus que 16 Mo.

  Apart : mon portable avec ses 16 Mo et sa partition de swap
  dsactive peut excuter une session emacs, quatre shells bash et
  compiler un noyau sans dpassement de mmoire. C'est suffisant pour
  moi.


         echo "Should the system use swap?"
         echo "  0: No."
         echo "  1: Yes."
         /bin/echo "Your choice:  \  c"
         read SWAPCHOICE

         case "$SWAPCHOICE" in
             0)
                 # Do nothing.
                 echo "(Swap partitions disabled)"
                 ;;
             *)
                 # Start up swapping.
                 echo "Activating swap partitions"
                 swapon -a
         esac





  De cette faon, vous pouvez utiliser la partition de swap avec
  l'adaptateur branch et la dsactiver quand vous tes sur batterie.

  44..66..  LLee ddmmoonn ddee sseerrvveeuurr WWeebb hhttttppdd AAppaacchhee

  J'utilise mon portable pour dvelopper et tester des scripts CGI pour
  des sites Web, c'est pour cette raison que je fais tourner un serveur
  local sur mon portable. La configuration standard est un peu trop
  sophistique si la seule chose que vous voulez faire est juste de
  tester des scripts et vrifier des pages Web de temps en temps.

  Dans httpd.conf, vous n'avez qu' mettre les valeurs de
  MinSpareServers et de StartServers  1. a sera suffisant pour un site
  local de test.

  Si vous ne souhaitez plus que le dmon httpd logue ses messages, vous
  devez le recompiler. Lisez la documentation pour plus de dtails.

  Grant Taylor a recompil la partie log d'Apache et dcouvert que a
  "ne l'empche pas de dclencher le disque. J'ai donc utilis une
  autre, et AMHA meilleure, solution : j'ai configur Apache pour tre
  lanc par inetd au lieu de se lancer tout seul". Lire man inetd pour
  les dtails.

  44..77..  LLee ppaaqquueettaaggee XXFFrreeee

  Configurer XFree pour les portables est tout un pome. Et une fois
  encore, je dois vous renvoyer  la page "Linux laptop" o vous pourrez
  trouver beaucoup d'aide sur ce sujet.

  L'extinction de la console sous  X ne fait que rendre l'cran noir
  mais ne coupe pas ce dernier. Comme mentionn dans la note de bas de
  page sur cette fonctionnalit, vous pouvez utiliser les options dpm de
  xset pour changer cela. Cependant, cette fonctionnalit dpend du
  chipset et du BIOS de votre portable.

  Grant Taylor utilise le paramtrage suivant pour mettre en veille son
  portable avec l'aide de apmd et de l'conomiseur d'cran :


         # Run xscreensaver with APM program
         xscreensaver -timeout 5  \
                      -xrm xscreensaver.programs:apm_standby  \
                      -xrm xscreensaver.colorPrograms:apm_standby &





  o "apm_standby est un script perl suid qui permet seulement 
  certaines personnes de faire un apm -S".

  44..88..  LL''ddiitteeuurr eemmaaccss

  Nous sommes bien d'accord qu'Emacs n'est pas un diteur mais un art de
  vivre. Voici un truc de Florent Chabaud : "si vous utilisez emacs,
  peut-tre avez-vous remarqu que l'diteur fait des sauvegardes
  automatiques. C'est bien sr utile et cela ne doit pas tre dsactiv
  mais les paramtres par dfaut peuvent tre adapts  une utilisation
  sur un portable.

  J'ai mis dans le fichier /usr/share/emacs/site-lisp/site-start.el les
  deux lignes suivantes :


         (setq auto-save-interval 2500)
         (setq auto-save-timeout nil)





  Cela dsactive l'auto-sauvegarde rgle sur le temps et fait que
  l'auto-sauvegarde ne se fait que toutes les 2500 touches. Bien
  entendu, si vous tapez un texte, ce dernier paramtre devrait tre
  rduit, mais pour la programmation, c'est suffisant. Puisque chaque
  action est compte (touche flche, backspace, delete, copier-coller,
  etc...), le nombre de 2500 actions est atteint rapidement."


  44..99..  CCoommmmeenntt ttrroouuvveerr dd''aauuttrreess ffaaoonnss dd''ooppttiimmiisseerr

  Si votre systme Linux semble continuer  accder au disque dur trop
  souvent, vous pouvez essayer de comprendre ce qui se passe 
  l'intrieur en utilisant une commande ps ax. Cela montrera tous les
  processus en cours et leur nom complet.  Parfois, il rvle aussi
  l'argument en ligne de commande de chaque processus.


  Puis lisez la page de manuel de chaque processus pour comprendre ce
  qu'il fait et comment changer son comportement. Avec cette mthode,
  vous trouverez trs vraisemblablement le processus responsable. strace
  peut galement se rvler utile.

  S'il vous plat envoyez moi un email si vous dcouvrez quelque chose
  de nouveau.

  55..  AAnnnneexxee

  55..11..  UUnn mmeessssaaggee aauuxx ddiissttrriibbuutteeuurrss ddee LLiinnuuxx

  S'il se trouve que vous tes un distributeur Linux, merci de lire
  ceci.  Les portables deviennent de plus en plus populaires mais la
  plupart des distributions Linux ne sont pas encore vraiment prpares
  pour eux. S'il vous plat, faites en sorte que ce document devienne
  obsolte et changez cela sur votre distribution.



    Le programme d'installation devrait inclure une configuration
     optimise pour les portables. L'installation minimale n'est souvent
     pas assez rduite.  Il y a quantit de choses dont un utilisateur
     de portable n'a pas besoin en voyage. Juste quelques exemples. Il
     n'y a pas besoin de trois versions diffrentes de vi (par exemple
     dans la distribution Suse). La plupart des systmes portables n'ont
     pas besoin de support imprimante (ils ne seront jamais relis  une
     imprimante, car l'impression est fait en gnral avec l'ordinateur
     de bureau de la maison). Certains portables n'ont pas besoin de
     support rseau du tout.


    N'oubliez pas de dcrire les problmes d'installation spcifiques
     aux portables, par exemple comment installer votre distribution
     sans lecteur CD-Rom ou comment paramtrer le pilote de rseau PLIP.

    Ajoutez de meilleurs gestionnaires d'nergie et des supports PCMCIA
      votre distribution. Ajoutez des noyaux prcompils et un ensemble
     alternatif de pilotes PCMCIA avec support APM pour que
     l'utilisateur puisse l'installer  la demande.  Incluez un package
     apmd prcompil avec votre distribution.

    Ajouter un support pour pouvoir passer dynamiquement d'une
     configuration rseau  une autre.  La plupart des portables Linux
     voyagent entre des endroits ayant des configurations rseau
     distinctes (par exemple le rseau de la maison, celui du bureau et
     le rseau de l'universit) et doivent changer d'identit rseau
     frquemment. Et faire de tels changements est trs pnible avec la
     plupart des distributions.

  Merci de m'crire si votre distribution est optimise pour les
  ordinateurs portables en me signalant le type de fonctionnalits que
  vous avez ajoutes pour cela. Les versions futures de ce HOWTO
  inclueront une section o vous pourrez signaler les fonctionnalits
  ddies aux portables de votre distribution.

  55..22..  RReemmeerrcciieemmeennttss


    Les informations concernant la technologie des batteries sont
     issues principalement de l'article "Stromkonserve" de Michael
     Reiter, publi dans "c't Magazin fuer Computertechnik" (Heise
     Verlag Hannover, Germany), dition 10/96, page 204. Utilis avec
     leur permission. Visitez leur site http://www.heise.de/.

    Les personnes suivantes ont contribu  ce document :



         Frithjof Anders <anders@goethe.ucdavis.edu>
         David Bateman <dbateman@ee.uts.edu.au>
         Florent Chabaud <chabaud@celar.fr>
         Markus Gutschke <gutschk@uni-muenster.de>
         Kenneth E. Harker <kharker@cs.utexas.edu>
         Bjoern Kriews <bkr@rrz.uni-hamburg.de>
         R. Manmatha <manmatha@bendigo.cs.umass.edu>
         Juergen Rink <jr@ct.heise.de>
         Grant Taylor <gtaylor@picante.com>
         James Youngman <JYoungman@vggas.com>





  55..33..   pprrooppooss ddee ccee ddooccuummeenntt

  Ce texte mentionne le mot "batterie" 54 fois.

  La version la plus rcente de ce HOWTO et de tous les autres (qui pour
  la plupart sont plus utiles que celui-l) se trouvent sur le site
  principal de la documentation Linux
  http://sunsite.unc.edu/mdw/linux.html ou sur un de ses nombreux
  miroirs.

  La plus grande partie de ce document a t crite pendant mes voyages
  en train entre Hambourg et Hannovre (les nouveaux wagons ICE-2 ont
  mme des prises de courant pour les portables !).

  Et maintenant tous avec moi : "...on the road again..."






























  Mini-HOWTO  BogoMips
  Wim van Dorst, baron@clifton.hobby.nl
  v0, 8 fvrier 1999

  Ce texte donne des renseignements sur les BogoMips, tirs de diverses
  sources comme les News ou de courriers lectroniques personnels. Vous
  pouvez trouver l'original de ce mini-HOWTO dans les diffrentes
  archives Linux sous le rpertoire .../HOWTO/mini/BogoMips. La traduc
  tions de ce document est a priori disponible sur les archives appro
  pries en japonais, italien, allemand, polonais et portugais. Un arti
  cle explicatif complet intitul 'the Quintessential Linux Benchmark,'
  a t publi dans le numro de janvier 1996 du _L_i_n_u_x _J_o_u_r_n_a_l_(_t_m_). De
  nouvelles entres pour les processeurs non rfrencs seraient grande
  ment apprcies. Elles peuvent tre envoyes par e-mail  l'auteur.
  Traduction du 04 mars 1999 par Antoine Levavasseur <levavass@efrei.fr>
  ______________________________________________________________________

  Table des matires


  1. Les scores Bogomips records des systmes mono-processeur

     1.1 Le plus faible score BogoMips au boot de Linux
     1.2 Le meilleur score BogoMips au boot d'un Linux mono-processeur
     1.3 Le meilleur score BogoMips au boot d'un Linux multi-processeur
     1.4 Le meilleur score BogoMips non-Linux

  2. Que sont les BogoMips ?

  3. Comment calculer quelle devrait tre une vitesse en BogoMips ?

  4. Comment savoir quelle est la vitesse en BogoMips ?

  5. Fluctuation dans la mesure des BogoMips

  6. BogoMips ... failed

  7.  propos des processeurs clones (Cyrix, NexGen, AMD, etc.)

  8. Pourquoi se proccuper des BogoMips ?

  9. Compilation de mesures

     9.1 386, bizarrement ou mal configurs
     9.2 386, correctement configurs: SX, DX, NexGen
     9.3 486, bizarrement ou mal configurs
     9.4 486, correctement configurs
     9.5 Drivs du 486, correctement configurs : Cyrix/IBM, UMC
     9.6 Pentium, bizarrement ou mal configurs
     9.7 Pentium, correctement configurs
     9.8 Drivs du Pentium, correctement configurs : MMX, PPro, Cyrix, AMD
     9.9 Systmes Alpha correctement configurs
     9.10 Systmes Motorola correctement configurs
     9.11 Autres systmes : Sparc, PowerPC, MIPS, Intel 8086/8088
     9.12 Systme multi-processeurs correctement configurs
     9.13 Systmes autres que Linux (pour rfrence uniquement)

  10. Signature



  ______________________________________________________________________




  11..  LLeess ssccoorreess BBooggoommiippss rreeccoorrddss ddeess ssyyssttmmeess mmoonnoo--pprroocceesssseeuurr

  Voici le plus mauvais et le meilleur score obtenus en Bogomips,
  jusqu' aujourd'hui, envoys  l'auteur ou publis sur Usenet.


  11..11..  LLee pplluuss ffaaiibbllee ssccoorree BBooggooMMiippss aauu bboooott ddee LLiinnuuxx


    Tim Van der Linden, timvdl@innet.be

    Intel 8088, 4.77 MHz, ELKS

    0.02 BogoMips


  11..22..  LLee mmeeiilllleeuurr ssccoorree BBooggooMMiippss aauu bboooott dd''uunn LLiinnuuxx mmoonnoo--pprroocceesssseeuurr


    Ted E. Suter II, nexion@home.com

    AMD K6-2, at 450 MHz

    901.12 BogoMips


  11..33..  LLee mmeeiilllleeuurr ssccoorree BBooggooMMiippss aauu bboooott dd''uunn LLiinnuuxx mmuullttii--pprroocceesssseeuurr


    Jeff White, jwhite@ghq.com

    Pentium MMX, 2 CPUs, at 233 MHz

    927.33 BogoMips


  11..44..  LLee mmeeiilllleeuurr ssccoorree BBooggooMMiippss nnoonn--LLiinnuuxx


    omega@sequent.com

    Sequent NUMA-Q, 32 CPUs P6, at 180 MHz

    Dynix operating system

    3776.00 BogoMips




  22..  QQuuee ssoonntt lleess BBooggooMMiippss ??


  _D_'_a_p_r__s _L_a_r_s _W_i_r_z_e_n_i_u_s wirzeniu@kruuna.Helsinki.fi, courrier du 9
  septembre 1993, expliquant ce que sont les BogoMips, et quelques
  informations complmentaires de Win van Dorst :


       MIPS est l'abrviation de Millions d'Instructions Par Sec
       onde.  C'est une faon de mesurer la vitesse de traitement
       d'un programme par un microprocesseur. Comme la plupart des
       units de ce type, on l'utilise le plus souvent abusivement
       (il est trs difficile de comparer correctement les vitesses
       exprimes en MIPS de diffrents types de microprocesseurs).


  Les BogoMips sont une invention de Linus. Le noyau (ou peut-tre un
  pilote de priphriques ?) a besoin d'une boucle d'attente (le temps
  d'attente est trop court ou requiert une trop grande prcision pour
  utiliser une autre mthode qu'une attente active) qu'il est ncessaire
  de calibrer en fonction de la vitesse du processeur sur lequel Linux
  s'excute. Ainsi le noyau mesure lors du dmarrage la vitesse
  d'excution d'une boucle d'instructions dtermine.  _B_o_g_o vient de
  l'amricain _b_o_g_u_s, qui signifie faux, bidon. Une vitesse en BogoMips
  donne donc une indication de la vitesse d'un microprocesseur, mais
  l'unit est dfinie trop peu scientifiquement pour que l'on puisse
  l'appeler autrement qu'un BogoMips.


  Les raisons (il y en a deux) pour lesquelles la mesure de cette
  vitesse est affiche lors du dmarrage du noyau sont :


    cela peut servir pour le dbogage et pour vrifier que le cache et
     le bouton turbo d'une machine sont bien actifs ;

    Linus ne se lasse pas de lire les messages de gens paniqus  ce
     propos dans les _N_e_w_s.


  L'algorithme C qui calcule le nombre de BogoMips se trouve dans le
  fichier source /usr/src/linux/init/main.c, et c'est la variable du
  noyau associe loops_per_sec (_b_o_u_c_l_e_s _p_a_r _s_e_c_o_n_d_e) qui est utilise
  par de nombreux pilotes pour des besoins plus concrets. La fonction
  d'attente  proprement parler udelay() est en assembleur, c'est
  pourquoi chaque portage en a sa propre dfinition dans
  /include/asm/delay.h.  La variable loops_per_sec et la fonction
  udelay() sont utiliss dans de nombreux drivers, regarder :

  cd /usr/src/linux #o la ou les sources sont stockes
  find . -name '*.[hcS]' -exec fgrep loops_per_sec {} /dev/null \;
  find . -name '*.[hcS]' -exec fgrep udelay {} /dev/null \;





  33..  CCoommmmeenntt ccaallccuulleerr qquueellllee ddeevvrraaiitt ttrree uunnee vviitteessssee eenn BBooggooMMiippss ??


  D'aprs une initiative de Ian Jackson, ijackson@nyx.cs.du.edu, remise
   jour et dveloppe par Wim van Dorst pour les plate-formes courantes
  actuelles :


  Une faon trs approximative d'valuer une vitesse en BogoMips est la
  suivante :















  Systeme                  BogoMips                      Indice
  Intel 8088             horloge * 0,004                  0,02
  Intel/AMD 386SX        horloge * 0,14                   0,8
  Intel/AMD 386DX        horloge * 0,18                   1  (definition)
  Motorola 68030         horloge * 0,25                   1,4
  Cyrix/IBM 486          horloge * 0,34                   1,8
  Intel Pentium          horloge * 0,40                   2,2
  Intel 486              horloge * 0,50                   2,8
  AMD 5x86               horloge * 0,50                   2,8
  Mips R4000/R4400       horloge * 0,50                   2,3
  Nexgen Nx586           horloge * 0,75                   4,2
  PowerPC 601            horloge * 0,84                   4,7
  Alpha 21064/21064A     horloge * 0,99                   5,5
  Alpha 21066/21066A     horloge * 0,99                   5,5
  Alpha 21164/21164A     horloge * 0,99                   5,5
  Intel Pentium Pro      horloge * 0,99                   5,5
  Cyrix 5x86/6x86        horloge * 1,00                   5,6
  Intel Pentium II       horloge * 1,00                   5,6
  Intel Celeron          horloge * 1,00                   5,6
  Mips R4600             horloge * 1,00                   5,6
  Alpha 21264            horloge * 1,99                  11,1
  AMD K5/K6/K6-2         horloge * 2,00                  11,1
  Pentium MMX            horloge * 2,00                  11,1
  PowerPC 604            horloge * 2,00                  11,1
  Motorola 68060         horloge * 2,01                  11,20




  Nous remarquerons que la boucle de dtermination de la vitesse en
  BogoMips n'est pas optimise pour le paralllisme des diffrents
  processeurs comme le Pentium d'Intel ou l'Alpha 21164.

  Nous remarquerons aussi que cette boucle pour des processeurs autres
  que ceux d'Intel est similaire mais pas identique.


  44..  CCoommmmeenntt ssaavvooiirr qquueellllee eesstt llaa vviitteessssee eenn BBooggooMMiippss ??


  Il y a trois faons de connatre la vitesse effective en BogoMips de
  votre systme Linux :


  1. en regardant dans /proc/cpuinfo, par exemple par

  2. en regardant la sortie syslog pour relire ce qui a t affich lors
     du dmarrage (en rcuprant l'information avec dmesg ou syslogk) ;

  3. en utilisant le programme de calcul de BogoMips indpendant.

  La dernire possibilit, galement applicable pour des systmes non-
  Linux, comme des Crays et d'autres, est d'utiliser le programme
  indpendant BogoMips.  Tir du fichier readme (lisez-moi) accompagnant
  le programme de Jeff Tranter jeff_tranter@mitel.com.


       Ras le bal d'avoir  rebooter votre systme juste pour
       savoir combien de BogoMips il atteint aujourd'hui ? [...]
       "Bogomips" est un programme indpendant qui affiche les per
       formances de votre systme bas sur l'un des benchmarks les
       plus utiliss au monde. Il excute le mme code que celui
       utilis lors du dmarrage du noyau Linux, mais est
       disponible comme un programme utilisateur. [...] La version
       1.3 de BogoMips est maintenant portable et devrait fonction
       ner sur tout systme qui dispose du compilateur et des
  librairies ANSI C.



  Remarquons que, du fait de la charge du systme, les valeurs calcules
  par le programme _B_o_g_o_M_i_p_s peuvent tre infrieures  celles que vous
  trouverez plus loin. Cela est d au fait que la version indpendante
  ne peut donner exactement la mme information qu'au dmarrage, car les
  autres processus actifs seront en comptition avec ce programme, lanc
  par un utilisateur ordinaire, pour l'obtention des ressources systme.
  C'est pourquoi seuls les scores en BogoMips affichs au boot sont
  reports plus loin.



  Soyez conscient que le fichier
  sunsite.unc.edu:/pub/Linux/system/status/bogo-1.2.tar.gz/ qui contient
  la dernire version 1.3 (sic), est relativement obsolte.



  55..  FFlluuccttuuaattiioonn ddaannss llaa mmeessuurree ddeess BBooggooMMiippss


  _D_'_a_p_r__s _L_i_n_u_s _T_o_r_v_a_l_d_s_, torvalds@cc.helsinki.fi, qui a expliqu les
  variations observes dans comp.os.linux.development, le 28 avril 1994.


       La boucle de calcul des BogoMips est quantifie, et l'on
       obtient donc gnralement le mme nombre chaque fois. On
       obtiendra des valeurs diffrentes si la vitesse calcule est
        la limite d'un intervalle de quantification, et qu'il y a
       de petites variations (diffrences dans le temps de traite
       ment des interruptions), provoquant le passage d'une valeur
        une autre.


  Si un noyau n'est pas compil de faon spcifique pour un processeur
  donn, alors des variations (parfois grandes) des scores en BogoMips
  peuvent apparatre, principalement en raison d'erreurs d'alignement.
  Ce problme ne survient apparemment que sur les diffrents processeurs
  x86 (Intel et clones).  Heureusement, il peut facilement tre rsolu :
  recompiler le noyau spcifiquement pour votre processeur.

  L'algorithme BogoMips, contrairement  ce que beaucoup de monde croit,
  ne change pas de faon significative selon les diffrentes versions du
  noyau.




  66..  BBooggooMMiippss ...... ffaaiilleedd


  _S_u_i_t_e _ _d_i_v_e_r_s_e_s _q_u_e_s_t_i_o_n_s _s_u_r _l_e _N_e_t _e_t _d_a_n_s _d_e_s _c_o_u_r_r_i_e_r_s _p_r_i_v__s_,
  _c_o_m_m_e _c_e_u_x _d_e _L_i_l_y lbliao@alumni.caltech.edu et de Pierre Frenkiel
  frenkiel@cdfap2.in2p3.fr. En mars 1995, ils demandaient :


       Quand je dmarre Linux, j'ai le message suivant :

             Calibrating delay loop.. ok - 23.96 BogoMips
             failed



  Pourquoi la boucle de calibrage choue-t-elle ?


  Elle n'a pas chou. Si elle avait chou, vous auriez eu le message
  suivant :


  Calibrating delay loop.. failed




  En revanche, c'est l'initialisation du pilote d'un gadget que vous
  n'avez pas sur votre machine qui est susceptible d'avoir chou. Juste
  aprs le calcul du nombre de BogoMips, les diffrents pilotes sont
  initialiss. Tout chec est btement indiqu. Un exemple classique est
  celui du pilote de l'AHA152x. Les autres symptmes d'chec de pilotes
  (et non d'chec dans le calcul des BogoMips) sont des plantages
  systme, des attentes longues ou des blocages complets du systme.


  Depuis Linux 1.2, les messages d'erreurs ont t largement amliors.
  Mettez  jour votre systme avec au moins cette version pour
  dterminer quel est le pilote qui plante.


  77..   pprrooppooss ddeess pprroocceesssseeuurrss cclloonneess ((CCyyrriixx,, NNeexxGGeenn,, AAMMDD,, eettcc..))


  Les processeurs Cyrix du type 486 ncessitent un programme
  d'activation du cache, appel quelquefois programme BogoBoost. On peut
  radicalement amliorer le nombre de BogoMips des processeurs Cyrix
  5x86 et 6x86 en utilisant la prdiction de branchement (option du
  BIOS). Cette amlioration est parfois relativement faible. Il existe
  plusieurs paquetages permettant d'ajuster les processeurs Cyrix, comme
  le correcteur (_p_a_t_c_h) BogoBoost, cx5x86mod et set6x86, tous
  disponibles dans les archives habituelles. Certains indiquent que l'on
  obtient de meilleures performances avec les Cyrix 6x86 quand le noyau
  est compil avec une optimisation pour 486 plutt qu'une optimisation
  pour Pentium.

  Les performances des processeurs NexGen 386 amliors, rfrencs
  Nx586, sont donnes avec celles des 386, car le fait qu'ils
  fonctionnent comme des Pentium est sans incidence sur le mode de
  calcul des BogoMips.

  Les AMD 5x86, aussi rfrencs sous le nom AMD 486DX5, sont des 486/33
  quadrupls. Ils sont donc recenss avec les autres 486. Les AMD K5 et
  K6 sont des processeurs de type Pentium, avec leurs constantes propres
  pour la dtermination du nombre de BogoMips.


  88..  PPoouurrqquuooii ssee pprrooccccuuppeerr ddeess BBooggooMMiippss ??


  Prcisons qu'il n'y a que deux raisons de faire attention au nombre de
  BogoMips annonc lors du dmarrage de Linux :


  1. Pour vrifier qu'il correspond bien  ce que l'on peut attendre du
     processeur de la machine, de sa frquence d'horloge et d'un
     ventuel cache. De nombreux processeurs sont sujets  des erreurs
     de configuration de

    la configuration de la mmoire cache (write-back est mauvais pour
     les BogoMips, donne souvent moins de 5; write-through est bien)
    les boutons-turbo (doivent tre activs)

    un BIOS qui mule un faux cache (remplacer le cache par du vrai)

    d'autres problmes du genre lis au cache et  la frquence

  2. Pour voir si votre systme est plus rapide que le mien. Bien sr,
     c'est absolument faux, inutilisable, non-fond et surtout inutile,
     mais toutes les mesures de performances subissent le mme problme.
     Alors pourquoi ne pas l'utiliser ? C'est une btise inhrente qui
     n'a jamais empch les gens d'utiliser des indices de performances,
     n'est-ce pas ? :-)

  Remarquez que des utilisations plus srieuses des mesures de
  performances sont prsentes dans le Linux Benchmarking Howto de Andr
  D. Balsa.



  99..  CCoommppiillaattiioonn ddee mmeessuurreess


  Le tableau suivant donne des mesures de vitesse en BogoMips pour
  diffrents systmes (plus de 1000 entres par plus de 800 personnes
  diffrentes provenant de prs de 50 pays). Notez que les valeurs
  indiques ici sont celles obtenues lors du dmarrage, sauf pour la
  section portant sur les systmes autres que Linux.


  99..11..  338866,, bbiizzaarrrreemmeenntt oouu mmaall ccoonnffiigguurrss



     Systme              BogoMips  Source
     386DX/16 387 nocache   0,57   H. Peter Anvin <hpa@nwu.edu>
     386DX/25               0,82   P Wright <philip.wright@purplet.demon.co.uk>
     386DX/25 nocache       1,03   Mark A. Horton <mahmha@crl.com>
     386SX/16               1,50   Stefan Kromer <sk@galaxy.sunflower.sub.org>
     386SX/16               1,60   Bill Davidsen <davidsen@tmr.com>
     386SX/20               1,87   Paul C. Dulany <pcdulany@wam.umd.edu>
     386SX/20               2,45   Roger Harkess <roger@visi.com>
     386DX/25(?) 128c       6,03   Chuck Meo <meo@solbourne.com>
     386DX/20              13,00   Ed Runnion <erunnio@hubcap.clemson.edu>




  99..22..  338866,, ccoorrrreecctteemmeenntt ccoonnffiigguurrss:: SSXX,, DDXX,, NNeexxGGeenn


















     Systme             BogoMips  Source
     386SX/8 undercl        1,04   Andrew Costa <c_chaos@wahnapitae.on.ca>
     386SX/12               1,78   Klaus Kettner <kk@sesom.de>
     386SX/16               1,99   James Vahn <jvahn@short.circuit.com>
     386SX/16 Packard Bell  2,05   <root@Belvedere\%hip-hop.suvl.ca.us>
     386SX/16               2,09   David E. Fox <dfox@belvedere.sbay.org>
     386SX/16               2,15   W Stevens <wgsteven@math.uwaterloo.co>
     386SX/16               2,20   Lech Marcinkowski <puolalm@tekla.fi>
     386SX/16               2,23   Andrew Bulhak <acb@yoyo.cc.monash.edu.au>
     386SX/16               2,23   Steven M. Gallo <smgallo@cs.buffalo.edu>
     386SX/16               2,34   Kevin Burtch <kburtch@pts.mot.com>
     386SX/16 turbo         2,38   Andrew Haylett <ajh@gec-mrc.co.uk>
     386SX/16 0c            2,43   Adam Clarke <adamc@loose.apana.org.au>
     386SX/16               2,49   Waymon <waymon@pacifier.com>
     386SX/20               2,70   Alex Strasheim <astrashe@nyx.cs.du.edu>
     386SX/20               2,70   J.L. Brothers <brothers@halcyon.com>
     386SX/20               2,89   Anders Stenback <stenback@hehe.com>
     386SXL/25 AMD          2,90   Vaughan R. Pratt <pratt@sunburn.stanford.edu>
     386SX/25 AMD 0c        3,06   K.J. MacDonald <kenny@festival.ed.ac.uk>
     386SX/25 AMD           3,38   Hamish Coleman <hamish@zot.apana.org.au>
     386SX/25 0c            3,52   Rogier Wolff <r.e.wolff@et.tudelft.nl>
     386SL/25 Intel         3,57   S Harris <harris@teaching.physics.ox.ac.uk>
     386SX/25 AMD           3,62   S Harris <harris@teaching.physics.ox.ac.uk>
     386SXL/25 AMD 0c       3,71   David E.A. Wilson <david@cs.uow.edu.au>
     386SX/33 Intel         4,06   Kenneth J. Hoover <ken@psuedvax.psu.edu>
     386SX/33               4,71   Alexander Komlik <apkom@l.ukrcom.kherson.ua>
     386SX/40 Intel 0c      6,03   Michael Kenyon <u3g12@keele.ac.uk>

     386DX/16               2,49   Mike <mike@emgee.demon.co.uk>
     386DX/20 Intel         3,00   Malcolm Reeves <reeves@rocky1.usask.cs>
     386DX/20 Intel         3,08   Si. Harris <harris@teaching.physics.ox.ac.uk>
     386DX/20 Nec Powermate 3,22   David J Dawkins <davidd@isl.co.uk>
     386DX/20 Micronics     3,25   M Haardt <u31b3hs@informatik.rwth-aachen.de>
     386DX/20               3,67   Joost Helberg <jhelberg@nlsun8.oracle.nl>
     386DX/25               3,91   Ian McCloghrie <imcclogh@cs.ucsd.edu>
     386DX/25               3,95   Grant Edwards <grante@aquarius.rosemount.com>
     386DX/25 0cache        3,96   J.O. Williams <jow@techbase.com>
     386DX/25 32cache       4,53   J.M.A. Lahtinen <jmalahti@klaava.Helsinki.FI>
     386DX/33               5,86   Tim Lacy <timla@microsoft.com>
     386DX/33 64cache       5,99   Lars Wirzenius <wirzeniu@kruuna.Helsinki.FI>
     386DX/33 Intel         5,99   Harri Pasanen <hpasanen@cs.hut.fi>
     386DX/33 no387         6,03   Joel B.Levin <levin@bbn.com>
     386DX/33 387           6,03   Peter Bechtold <peter@fns.greenie.muc.de>
     386DX/40               6,21   J.L. Brothers <brothers@halcyon.com>
     386DX/33               6,46   Dennis Robinson <djrobins@uxa.cso.uiuc.edu>
     386DX/33               6,50    Dean Nelson <deannelson@aol.com>
     386DX/33 387 256cache  6,65   Wim van Dorst <baron@clifton.hobby.nl>
     386DX/33               6,65   Rick Lim <ricklim@opus.freenet.vancouver.bc.ca>
     386DX/33               6,70   Craig Hagan <hagan@cih.com>
     386DX/40               6,99   Ken Wilcox <wilcox@math.psu.edu>
     386DX/40 AMD           7,76   Joe Phillips <rchandra@letter.com>
     386DX/40 AMD           7,10   Kerry Person <kperson@plains.NoDak.edu>
     386DX/40               7,10   D. Bikram Singh <a336dhal@cdf.toronto.edu>
     386DX/40 128cache      7,23   Julian Francis Day <jfd0@aber.ac.uk>
     386DX/40 bogoboosted   7,23   Pat St Jean <stjean@math.enmu.edu>
     386DX/40 AMD 128cache  7,23   R.Bergs <rabe@akela.informatik.rwth-aachen.de>
     386DX/40 slow DRAM     7,26   John Lockwood <lockwood@pan.vlsi.uiuc.edu>
     386DX/40 128c          7,29   Karsten Friese <ftdkafr@ftd.ericsson.se>
     386DX/40               7,29   E.C. Garrison <ericg@nickel.ucs.indiana.edu>
     386DX/40               7,29   Darin Cowan <cowan@rubicon.org>
     386DX/40               7,29   Bonne van Dijk <bonne@cs.utwente.nl>
     386DX/40 AMD           7,76   Todd Lindner <tlindner@panix.com>
     386DX/40               7,76   Bear Giles <bear@indra.com>
     386DX/40 AMD 387 64c   7,91   <wires@gnu.ai.mit.edu>
     386DX/40               7,98   Frank Pilhofer <fp@informatik.uni-frankfurt.de>
     386DX/40 64c           7,98   Dean Junk <dpjunk@mm.com>
     386DX/40 AMD 32c       7,98   Tommy Olsen <tommyo@ifi.uio.no>
     386DX/40 AMD           7,98   James Reith <reith@racores.com>
     386DX/40               7,98   Aaron T. Baldie <atb@u.washington.edu>
     386DX/40 128c          7,98   John Pate <jpate@easynet.co.uk>
     386DX/40               7,98   Christian Nelson <cnelson@csugrad.cs.vt.edu>
     386DX/40               7,98   Alan Peckham <peckham@drei.enet.dec.com>
     386DX/40               8,06   Michael Guslick <michaelg@alpha2.csd.uwm.edu>
     386DX/40               8,06   Richard Brown <brown@midget.towson.edu>
     386DX/40               8,06   Bill G. Bohling <bs146@tali.uchsc.edu>

     Nx586/90 NexGen       67,44   <root@wgw.mnsinc.com>
     Nx586/90 NexGen       67,44   Robert Gehring <rag@cs.tu-berlin.de>
     Nx586/90 NexGen       67,48   David G. Eckard <dgeckard@eos.ncsu.edu>
     Nx586/100 NexGen      74,34   Cameron L. Spitzer <cls@truffala.sj.ca.us>
     Nx586/100 NexGen 256c 74,56   Marius Groenendijk <marius@cray-systems.lu>
     Nx586/110 NexGen 256c 81,51   Michael J. Micek <mmicek@muddcs.cs.hmc.edu>
     Nx586/110 NexGen      81,51   Ron Marsh <rmarsh@plains.nodak.edu>




  99..33..  448866,, bbiizzaarrrreemmeenntt oouu mmaall ccoonnffiigguurrss












































     Systme             BogoMips  Source
     486DX/33 0c            1,45   Mark Gray <vatavian@gvu1.gatech.edu>
     486SL/25 0c            1,95   Paraskevas Evripidou <skevos@seas.smu.edu>
     486DLC/40 0c           2,45   S.Schendel <sschend@magnus.acs.ohio-state.edu>
     486DX/33 128c          2,94   P.J. Nefkens <p.nefkens@student.utwente.nl>
     486DX4/120 AMD         3,04   Andrew Steinbach <stei0113@maroon.tc.umn.edu>
     486DX5/133 AMD         3,05   Eric Hagen <ehagen@hawaii.edu>
     486DX4/100 Cyrix       3,06   Stuart Harvey <sharvey@primenet.com>
     486DX5/133 AMD         3,06   Charles Galpin <chg@severn.wash.inmet.com>
     486DX4/100             3,06   Bear Giles <bear@indra.com>
     486DX2/80              3,08   Gerald E. Butler <gbutler@phoenix.kent.edu>
     486DX4/120 AMD         3,08   Charles Hines <chuck_hines@vnet.ibm.com>
     486DX4/66 256c         3,10   Riccardo Capella <mc8508@mclink.it>
     486DX4/100 wb-cache    3,10   Paul Close <pdc@sgi.com>
     486DX4/120             3,13   Brian Perkins <bperkins@netspace.com>
     486DX4/120 AMD         3,15   <eruston@net2.intserv.com>
     486DX4/100             3,17   Thomas Sudbrak <sudbrak@borneo.gmd.de>
     486SLC2/50 Cyrix       3,30   Colin J. Wynne <cwynne@sage.wlu.edu>
     486DX/33               3,61   Marten van de Laan <marten@cs.rug.nl>
     486DX/33 noturbo       3,61   Dimitris Evmorfopoulos <devmorfo@mtu.edu>
     486DX4/120             3,74   Brian Wheeler <bdwheele@indiana.edu>
     486DX4/120 AMD         3,74   Frank Pilhofer <fp@informatik.uni-frankfurt.de>
     486DX4/100 Cyrix 256c  4,00   Joel Kelso <joel@cs.murdoch.edu.au>
     486DX/33 256c noturbo  4,25   Wouter Liefting <wlieftin@cs.vu.nl>
     486DX/33               4,66   Mark Gray <vatavian@gvu1.gatech.edu>
     486Rx2 Cyrix 25/50     4,85   <cosc19v2@menudo.uh.edu>
     486SX/33 noturbo       5,21   Scott D. Heavner <sdh@fishmonger.nouucp>
     486DX2/66 overdrive    5,37   Jeremy Orr <jeremy@careercenter.sfsu.edu>
     486DX/33               5,66   Ryan Tucker <rtucker@ttgcitn.com>
     486DX2/66              5,88   P.J. Nefkens <p.nefkens@student.utwente.nl>
     486DX4/100             5,94   Howard Goldstein <hg@n2wx.ampr.org>
     486DX4/100 AMD         5,94   Mr Pink <vince@dallas.demon.co.uk>
     486DX4/100 notebook    6,55   Thomas <tom@dirac.physik.uni-konstanz.de>
     486DX4/100 notebook    6,55   Hugh McCurdy <hmccurdy@ix.netcom.com>
     486SLC Cyrix           7,00   Pieter Verhaeghe <pive@uia.ac.be>
     486SX/33               7,84   Paul Hedderly <prh6@unix.york.ac.uk>
     486DLC/40              7,98   Wil Cromer <nwc2@Ra.MsState.Edu>
     486DX/33 256c          8,27   Rohan Tronson <rohan@kihi.com.au>
     486DX4/100            11,11   NN <usenet@uxmail.ust.hk>
     486DX4/100            11,30   Earl Gooch <egooch@mc.com>
     486/66 Cyrix          13,02   Mike Baptiste <baptiste@bnr.ca>
     486SLC2/25            14,60   Vaughan R. Pratt <pratt@Sunburn.Stanford.EDU>
     486DX2/66 laptop      14,46   Robert Knop <rknop@netcom.com>
     486SLC2/66            18,94   <root@avalon.net>
     486DX/33 turbo        19,98   C Vetter <cbvetter@informatik.th-darmstadt.de>
     486DX4/75             21,50   Theo Scott <rkwtgs@pukrs3.puk.ac.za>
     486DX4/75             24,13   Sherman Hsieh <shieh@csua.berkeley.edu>
     486DX2/58             26,30   Vassili Leonov <leonov@iedv7.acd.com>
     486DX4/100 overclock  28,67   Theo Scott <rkwtgs@pukrs3.puk.ac.za>
     486DX2/80             36,00   Mark Lee <mlee@heartlab.rri.uwo.ca>
     486DX2/80             50,08   Mark Lee <mlee@heartlab.rri.uwo.ca>
     486DX4/100            60,00   Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
     486DX2/100 overclock  60,45   Tony D Shan <tdsst9+@pitt.edu>
     486DX5/133 AMD        75,40   Jeff Hyche <jwhyche@scott.net>
     486DX5/133 AMD        80,08   NN <guesta@slip-29-7.ots.utexas.edu>
     486DX5/133 AMD        87,00   John Wiggins <jwiggins@comp.uark.edu>




  99..44..  448866,, ccoorrrreecctteemmeenntt ccoonnffiigguurrss





     Systme            BogoMips   Source
     486SX/20 DECpc         9,98   Thomas Pfau <pfau@cnj.digex.com>
     486SX/25              12,24   M. Buchenrieder <mibu@scrum.greenie.muc.de>
     486SX/25              12,30   Darren McKay <e9bh@unb.ca>
     486SX/25              12,42   Mark R. Lindsey <mlindsey@nyx.cs.du.edu>
     486DX/25              12,50   Phillip Hardy <phillip@mserve.kiwi.gen.nz>
     486SX/25              12,52   Emmanual Emore <emor7672@elan.rowan.edu>
     486DX/33 256c         16,33   Eric Kemminan <ekemmina@pms709.ms.ford.com>
     486DX/33              16,35   Christopher L. Morrow <cm43@andrew.cmu.edu>
     486DX/33              16,43   Rob Janssen <pe1chl@amsat.org>
     486DX/33 64cache      16,44   H. Peter Anvin <hpa@nwu.edu>
     486DX/33 256c DIY     16,44   Wouter Liefting <wlieftin@cs.vu.nl>
     486DX/33 Intel 128c   16,44   Rafal Kustra <g1krakow@cdf.toronto.edu>
     486DX/33              16,50   Alex Freed <freed@europa.orion.adobe.com>
     486DX/33              16,60   Vaughan R. Pratt <pratt@Sunburn.Stanford.EDU>
     486DX/33 noturbo      16,61   C Vetter <cbvetter@informatik.th-darmstadt.de>
     486DX/33              16,61   Jeffrey L. Newbern <jnewbern@athena.mit.edu>
     486DX/33              16,61   Giuseppe De Marco <gdemarco@freenet.hut.fi>
     486DX/33              16,61   M Heuler <heuler@informatik.uni-wuerzburg.de>
     486DX/33              16,61   Frank Lofaro <ftlofaro@unlv.edu>
     486SX/33              16,64   Jacob Papenfuss <webmaster@the-corridor.com>
     486DX/33              16,77   Donald Lewis <dlewis@jackson.freenet.org>
     486DX/33              16,77   Stephan Boettcher <staphan@alzt.tau.ac.il>
     486DX/33 256c         16,77   David Manchester <mustang@tartarus.uwa.edu.au>
     486DX/40              19,80   Jose Calhariz <cal@minerva.inesc.pt>
     486DX/40              19,91   M Heuler <heuler@informatik.uni-wuerzburg.de>
     486DX/40              19,96   David A. Ranch <dranch@ecst.csuchico.edu>
     486DX/40 AMD          19,97   M Haardt <u31b3hs@informatik.RWTH-Aachen.DE>
     486DX/40 Intel        19,97   Paul van Spronsen <vspr@teppic.sun.ac.za>
     486DX/40              19,97   Ulf Tietz <ulf@rio70.bln.sni.de>
     486DX/40              19,97   <Eberhard_Moenkeberg@p27.rollo.central.de>
     486DX/40              19,97   Zoltan Lajber <lajbi@lajli.gau.hu>
     486DX/40              19,97   Wim van Dorst <baron@wiesje.hobby.nl>
     486DX/40 AMD          20,00   Chuck Munro <chuckm@canada.hp.com>
     486DX/40 AMD          20,09   Pieter Eendebak <peendebak@bbsw.idn.nl>
     486DX/50              24,48   Arnd Gehrmann <arnd@rea>
     486DX/50 AMD          24,85   Klaas Hemstra <hst@mh.nl>
     486DX/50 DTK          24,85   Randolph Christophers <randyc@lna.oz.au>
     486DX/50              24,85   Kevin Lentin <kevinl@bruce.cs.monash.edu.au>
     486DX2/50             24,85   Jason Matthew <jmatthew@kn.pacbell.com>
     486DX2/50             24,85   Gregory P. Smith <smithgr@cs.colorado.edu>
     486DX/50 VLB          24,97   Tom Miller <tvtom@en.com>
     486DX/50              24,99   Jeff <css@erols.com>
     486DX/50 Intel 256c   24,99   Mike <mike@emgee.demon.co.uk>
     486DX/50              25,00   Robert Herzog <rherzog@rc1.vub.ac.be>
     486DX2/50             25,00   M. Abrahamsson <swmike@uplift.df.lth.se>
     486DX2/50             25,00   Christian Holtje <choltje@ux1.cso.uiuc.edu>
     486DX2/50 DECpc       25,04   Thomas Pfau <pfau@cnj.digex.com>
     486DX2/50 Eisa        25,04   John Willing <willing@cimage.com>
     486DX2/50 256c        25,04   Zhou Yanmo <zhou@gauss.math.usf.edu>
     486DX/50              25,04   Michael Kress <kress@hal.saar.de>
     486DX2/50             25,04   Mats Wikholm <mwikholm@news.abo.fi>
     486DX2/50             25,04   Jean C Delepine <delepine@linux.u-picardia.fr>
     486DX/50              25,04   Jean C Delepine <delepine@linux.u-picardia.fr>
     486DX/50              25,04   Kevin Burtch <kburtch@pts.mot.com>
     486DX/50 notebook     25,04   Pierre Frenkiel <frenkiel@cdfap1.in2p3.fr>
     486DX/50              25,10   M Heuler <heuler@informatik.uni-wuerzburg.edu>
     486DX2/50             25,40   Brian Kennedy <bkenned@hubcap.clemson.edu>
     486DX2/66             32,00   Lee Sau Dan <h9210876@khuxa.hku.hk>
     486DX2/66             32,9    Frederick <niles@axp745.gsfc.nasa.gov>
     486DX2/66             33,00   Alec Muffett <alecm@uk-usenet.uk.sun.com>
     486DX2/66             33,00   NN <coolefa@pmifeg.com>
     486DX2/66             33,00   Steve Tinney <sjt@enlil.museum.upenn.edu>
     486DX2/66 Intel       33,00   Chuck Munro <chuckm@canada.hp.com>
     486DX2/66 VLB         33,00   Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
     486DX2/66 AMD         33,05   G. Skinner <gskinner@gwsunix1.crystalball.com>
     486DX2/66 VLB         33,18   Pablo Iranzo Gomez <iranzop@gong.ci.uv.es>
     486DX2/66 VLB         33,18   Dag Wieers <dag@digibel.be>
     486DX2/66             33,20   Arnd Gehrmann <arnd@rea>
     486DX2/66 Intel/PCI   33,22   C. Menke <carsten.menke@post.uni-bielefeld.de>
     486DX2/66             33,22   Brian Ricker <gt2327c@prism.gatech.edu>
     486DX2/66             33,22   Don Bennett <don@engr.mun.ca>
     486DX2/66             33,22   Robert Heller <heller@cs.umass.edu>
     486DX2/66             33,22   Warwick Ward-Cox <wwar@lostlink.alt.za>
     486DX2/66             33,22   Chien-An Chen <giant@nwu.edu>
     486DX2/66 Eisa/VL     33,22   Serge <sviznyuk@magnus.acs.ohio-state.edu>
     486DX2/66 AMD         33,22   Wayne Robinson <wayner@renoir.cftnet.com>
     486DX2/66 Intel       33,22   Jim Barber <yeul@marsh.cs.martin.edu.au>
     486DX2/66             33,22   Tom Lowery <tlowery@mcs.kent.edu>
     486DX2/66             33,27   S Viznyuk <sviznyuk@magnus.acs.ohio-state.edu>
     486SX2/66             33.28   Jacob Papenfuss <root@the-corridor.com>
     486DX2/66             33,30   Devon Tuck <devon@netcom.com>
     486DX2/66 256cache    33,40   H. Peter Anvin <hpa@nwu.edu>
     486DX2/66             33,50   Jongyoon Lee <mr2@netcom.com>
     486DX2/66             33,50   Petrovsky Alexey <gong@cs.msu.su>
     486DX2/66             33,50   Sung Lee <slee2@umbc.edu>
     486DX2/66             33,55   Gene McCulley <mcculley@greatwall.cctt.com>
     486DX2/66             33,55   W. Zeilinger <wzeil@doradus.ast.univie.ac.at>
     486DX2/66             33,55   Donald Lewis <dlewis@jackson.freenet.org>
     486DX2/66             33,55   Eric Malkowski <malk@world.std.com>
     486DX2/66 0c          33,55   Chris Petit <mystere@ix.net.com>
     486DX2/66             33,55   <al-b@minster.york.ac.uk>
     486DX2/66             33,55   Jesper de Jong <jesper@cas.et.tudelft.nl>
     486DX2/66             33,55   John Paul Morrison <jmorriso@bogomips.com>
     486DX2/66             33,55   Arash <ei39594@ios.chalmers.se>
     486DX2/66             33,55   Ralph Lewis <rlewis@mail.wsu.edu>
     486DX2/66             33,55   Ulisses Alonso Camaro <alonso@bebe.uv.es>
     486DX2/66             33,55   Bussmann <bussmann@wolpi.infomatik.uni-bonn.de>
     486DX2/66 Intel/PCI   33,55   Louis J. LaBash <labash@lcjones.aclib.siue.edu>
     486DX2/66 Intel       33,55   Andrew Tubbiolo <enigma@seds.lpl.arizona.edu>
     486DX2/66             33,55   W Fink <werner.fink@physik.uni-stuttgart.de>
     486DX2/66 ICL         33,55   Mathias Koerber <mathias@solomon.technet.sg>
     486DX2/66             33,55   Bill Pogue <gwp@dithots.dithots.org>
     486DX2/66 256c        33,58   Theo Scott <rkwtgs@pukrs3.puk.ac.za>
     486DX2/66             33,70   C Triantafillou <triant@pegasus.montcleair.edu>
     486DX2/66 256c Intel  33,81   S Harris <harris@teaching.physics.ox.ac.uk>
     486DX2/66             33,90   Magnus Back <erambk@eraj.ericsson.se>
     486DX2/66 notebook    33,90   Robert A Knop <rknop@mop.caltech.edu>
     486DX2/66             34,06   Al Clark <aclark@netcom.com>
     486DX4/75             37,47   G Asmundarson <grettir@wordperfect.com>
     486DX2/80             39,93   Andrew Tubbiolo <enigma@seds.lpl.arizona.edu>
     486DX2/80 overcl/66   39,94   Mario L. Guttierez <mgutier@mentor.sdu.edu>
     486DX2/80 AMD         39,94   Corey D Brenner <brenner@umr.edu>
     486DX2/80             39,94   Dan Delaney <cgdela01@homer.louisville.edu>
     486DX2/80             39,94   D t Haar <danny@caution.cistron.nl.mugnet.org>
     486DX2/80 overcl      39,94   Peter Suetterlin <ps@kis.uni-freiburg.de>
     486DX2/80 AMD         39,94   JL Gomez <kitana!sysop@caprica.com>
     486DX2/80 AMD         39,94   Pete Krawczyk <pkrawczy@uiuc.edu>
     486DX2/80 AMD         40,00   Rene Baart <baart@simplex.nl>
     486DX2/80 AMD         40,00   Wolfgang Kalthoff <wo@rio70.bln.sni.de>
     486DX2/80             40,00   Rick Brown <ccastrb@prism.gatech.edu>
     486DX2/80 AMD         40,14   Jon Lewis <jlewis@inorganic5.chem.ufl.edu>
     486DX2/80 AMD         40,14   Richard S. Stone <rstone@edgp.com>
     486DX2/80             40,15   Oleg <oleg@hpcms.co.il>
     486DX2/80 AMD         40,18   Adri Verhoef <a3@a3.xs4all.nl>
     486DX2/80             40,18   Mats Andtbacka <mandtback@abo.fi>
     486DX2/100 AMD overcl 49,14   Jon Lewis <jlewis@inorganic5.chem.ufl.edu>
     5x86/100 AMD undercl  49,66   NN <root@tailor.aleim.net>
     486DX4/100            49.66   Pete Cervasio <cervasio@airmail.net>
     486DX4/100 256c       49,71   Lutz Pressler <lutz.pressler@med-stat.GWDG.de>
     486DX4/100            49,71   Brett Gersekowski <bgrerseko@powerup.com.au>
     486DX4/100 Intel 256c 49,77   Angelo Haritsis <ah@doc.ic.ac.uk>
     5x86/100 AMB undercl  49,77   Bernd Hentig <bernd.hentig@guug.de>
     486DX4/100            49,78   Aurel Balmosan <aurel@xylo.owl.de>
     486DX4/100            49,87   Chris Saia <minkie@concentric.net>
     486DX4/100            49.87   Aaron Brick <abrick@dcc.uchile.cl>
     486DX4/100            50,00   Donald Lewis <dlewis@jackson.freenet.org>
     486DX4/100            50,02   Peter Skov Knudsen <gogol@ask.diku.dk>
     486DX4/100            50,02   Shadow Weaver <djamison@students.wisc.edu>
     486DX4/100 AMD        50,30   Dave <shodan@shodan.clark.net>
     486DX4/100 AMD        50,04   Tony Smolar <asmolar@fast.net>
     486DX4/100            50,05   fredk <fredk@shadow.net>
     486DX4/100            50,06   Ronald Prague <ronp@fisnet.net>
     486DX4/100            50,08   Matt Gisher <matt@matt.fidalgo.net>
     486DX4/100            50,08   Steven A. Duchene <sduchene@cis.ysu.edu>
     486DX4/100            50,08   Miles O'Neal <meo@schoneal.com>
     486DX4/100            50,08   Will <zxmvg07@hp12.zdv.uni-tuebingen.de>
     486DX4/100            50,08   Piet de Bondt <bondt@dutiws.twi.tudelft.nl>
     486DX4/100 laptop     50,08   Karl Kleinpaste <karl_kleinpaste@cs.cmu.edu>
     486DX4/100 256c       50,08   Thomas Kanschik <y0000997@ws.rz.tu-bs.de>
     486DX4/100            50,08   Linas Vepstas <linas@fc.net>
     486DX4/100            50,08   Ed Daiga <daiga@engin.umich.edu>
     486DX4/100 notebook   50,08   Gerry Quejada <fd863@cleveland.freenet.edu>
     486DX4/100 AMD        50,08   B Schuller <schuller@ind136a.wi.leidenuniv.nl>
     486DX4/100            50,08   J.L. Brothers <brothers@halcyon.com>
     486DX4/100            50,08   David E.A. Wilson <david@cs.uow.edu.au>
     486DX4/100            50,08   Mark Lumsden <root@titan2.physics.mcmaster.ca>
     486DX4/100            50,08   Ashar <ashar@netcom12.netcom.com>
     486DX4/100            50,08   Jacob Waltz <waltz@pcjiw.lampf.lanl.gov>
     486DX4/100            50,08   Tom Sinclair <sinner@cafe.net>
     486DX4/100 AMD        50,08   G. Skinner <gskinner@gwsunix1.crystalball.com>
     486DX4/100 AMD        50,08   Nick Savoiu <nick@ritz.mordor.com>
     486DX4/100            50,08   Thomas J Fisher <twb5odt@nmia.com>
     486DX4/100            50,08   Pascal Pensa <pensa@aurora.unice.fr>
     486DX4/100            50,08   Julian Bradbury <julian@xabcs.demon.co.uk>
     486DX4/100            50,51   Frederic Potter <frederic@swing.ibp.fr>
     486DX4/100            50,66   Bill Stegers <bill_ste@zeelandnet.nl>
     486DX4/120 256c       59,10   Kevin <kalichwa@oakland.edu>
     486DX4/120 AMD        59,80   Mark Tranchant <mat92@ecs.soton.ac.uk>
     486DX4/120 AMD        59,80   Fred Broce <fbroce@atlanta.com>
     486DX4/120 AMD        59,90   Marko Ovaska <ovaska@cc.helsinki.fi>
     486DX4/120 AMD        59,80   Bob Purdon <bobp@mpx.com.au>
     486DX4/120 AMD        59,80   Pat Young <dice@netbsd.warped.com>
     486DX4/120            59,91   Will <zxmvg07@hp12.zdv.uni-tuebingen.de>
     486DX4/120 AMD 256c   60,01   Angelo Haritsis <ah@doc.ic.ac.uk>
     486DX4/120 overcl     60,45   Pascal Pensa <pensa@aurora.unice.fr>
     486DX4/120            60,45   Neal Howard <neal@metronet.com>
     486DX4/120 AMD        60,45   Oscar Belmar Madrid <obelmar@anakena.usach.cl>
     486DX4/120            60,45   Jason Buchanan <jsb@digistar.com>
     486DX4/120            60,45   Foersterling <dirk@informatik.uni-frankfurt.de>
     486DX4/120            60,45   Bernd Hentig <bernd@finow.snafu.de>
     5x86/133 AMD          66,15   NN <root@tailor.aleim.net>
     5x86/133 AMD          66,15   Brad Wilson <bwilson@deltanet.com>
     5x86/133 AMD          66.15   Paul S. Doyle <paul.doyle@mci.com>
     5x86/133 AMD          66,44   P Yli-Krekola <perttu@ntcmar01ba.ntc.nokia.com>
     5x86/133 AMD          66,44   V. Tailor <vtailor@ibm.net>
     5x86/133 AMD          66,55   Andrew B. Cramer <cramer@ripco.com>
     5x86/133 AMD          66,56   Bob Nielsen <nielsen@primenet.com>
     5x86/133 AMD          66,65   Geoff Raye <gtraye@igsrsparc2.er.usgs.gov>
     5x86/133 AMD          66,70   Klaas Hemstra <hst@mh.nl>
     5x86/133 AMD          66,80   N.N. <vp24njcb@ubvms.cc.buffalo.edu>
     5x86/133 AMD   256c   67,10   Vasily Lewis
     5x86/133 AMD          67,10   James Reith <reith@racores.com>
     5x86/133 AMD   256c   67,10   Yves Rougy <yrougy%siam@cal.fr>
     5x86/133 AMD   256c   67,10   Peter A. Koren <pkoren@lvdc20.dseg.ti.com>
     5x86/133 AMD   256c   67,10   Wim Joppe <joppe@xs4all.nl>
     5x86/133 AMD   256c   67,10   Gunnar Stefansson <gunnars@rhi.hi.is>
     5x86/133 AMD   256c   67,10   Vernard Martin <vernard.martin@cc.gatech.edu>
     5x86/150 AMD overcl   74,75   Sergio Riveros <riveros@musca.unm.edu>
     5x86/150 AMD overcl   74,75   Arthur K. Chan <artchan@cs.ucr.edu>
     5x86/160 AMD overcl   79,87   M.Suencksen <msuencks@techfak.uni-bielefeld.de>
     5x86/160 AMD overcl   79,87   J. Chris Hammond <cosmo@pcisys.net>
     5x86/160 AMD overcl   79,87   Bird Chen <luca@linux.taiwan.hp.com>
     5x86/160 AMD overcl   79,89   Geir Skaugen <geir.skaugen@energy.sintef.no>
     5x86/160 AMD overcl   79,89   Martin Vernon <martin@gw6hva.demon.co.uk>
     5x86/160 AMD overcl   79,92   T. Zerucha <zerucha@shell.portal.com>
     5x86/160 AMD overcl   80,36   Paul Colucci <pcolucci@acsu.buffalo.edu>
     5x86/160 AMD overcl   80,36   Steinar Haug <sthaug@nethelp.no>
     5x86/160 AMD overcl   80,36   James Daniel <triadmin@bga.com>
     5x86/160 AMD          80,36   David H.S. Oh <david@std.net>




  99..55..  DDrriivvss dduu 448866,, ccoorrrreecctteemmeenntt ccoonnffiigguurrss :: CCyyrriixx//IIBBMM,, UUMMCC



    Systme              BogoMips  Source
     486DLC/33                 9,42  Dennis Robinson <djrobins@uxa.cso.uiuc.edu>
     486DLC/33 387DX/40        9,47  Denis Solaro <drzob@vectrex.login.qc.ca>
     486DLC/33 Cyrix wb        9,50  M. Asplund <matt@xenon.cchem.berkely.edu>
     486DLC/33 Cyrix 386      11,20  Alex Freed <freed@europa.orion.adobe.com>
     486DLC/40 256c           11,33  Schendel <sschend@magnus.acs.ohio-state.edu>
     486Dx/40 Cyrix           11,73  Malcolm Bremer <malcolm@strw.LeidenUniv.nl>
     486DRx2/40 Cyrix         13,10  Christopher Lau <clau@acs.ucalgary.ca>
     486DX/33 Cyrix           13,21  M Haardt <u31b3hs@informatik.RWTH-Aachen.DE>
     486DLC/40 bogoboost      13,21  Harry Pasanen <ps@tekla.fi>
     486DLC/40 487 Cyrix      13,21  Ian A. Verschuren <iav@po.CWRU.Edu>
     486DCL Cyrix             13,30  Tracer Bullet P.I. <ges@earth.baylor.edu>
     486DLC/40                13,31  Adam Frampton <frampton@access2.digex.net>
     486DLC/40                13,31  Rick Chow <crc@cacs.usl.edu>
     486SLC-S/33              13,51  Brad Pepers <pepersb@cuug.ab.ca>
     486DLC/40 no Cxpatch     15,47  Sergei O. Naoumov <serge@envy.astro.unc.edu>
     486DLC/40 TI 128c        15,97  Philip K. Roban <phil@seal.micro.umn.edu>
     486DLC/40 Cyrix          15,97  L.J. LaBash <labash@lcjones.aclib.siue.edu>
     486DRx2/40               15,99  Christopher Lau <lauc@fusion.cuc.ab.ca>
     486DX2/66 IBM no-FF      19,00  NN <coolefa@pmifeg.com>
     486SLC2/66 IBM 64c       18,95  Sujat Jamil <sujat@shasta.ee.umn.edu>
     486SLC2/66 IBM 128c      18,95  Sujat Jamil <sujat@shasta.ee.umn.edu>
     486SLC2/66               19,02  Harry Mangalam <mangalam@uci.edu>
     486SLC/50                19,28  Sion Arrowsmith <sion@bast.demon.co.uk>
     486BL3/75 IBM 256c       21,40  Anders Stenback <stenback@kuai.se>
     486BL3/75 IBM 256c       21,50  Ming S. Chan <ming.chan@canrem.com>
     486DX2/66 Cyrix 128c     26,63  Derek Kwan <dkwan@zeus.UWaterloo.ca>
     486DX2/66 Cyrix          26,63  Adrian Parker <adrian@willen.demon.co.uk>
     486DX2-S/66 256c         26,63  Jean-Marc Wislez <JeanMarc.Wislez@rug.ac.be>
     486DX2/66 Cyrix          26,63  Curran W. Fey <fey@biotech.washington.edu>
     486BL3/100 IBM 256c      28,36  Anders Stenback <stenback@kuai.se>

     486SX-S/33 UMC 0c        20,20  Hynek Med <xmedh02@manes.vse.cz>
     486SX-S/40 UMC 0c        26,52  Hynek Med <xmedh02@manes.vse.cz>
     486SX-U5/40 UMC 0c       26,63  Dusan Mihajlovic <zdule@herkules.co.yu>




  99..66..  PPeennttiiuumm,, bbiizzaarrrreemmeenntt oouu mmaall ccoonnffiigguurrss






    Systme              BogoMips  Source
     Pentium/66                2,18  Bob Myers <root@shyguy.lonestar.org>
     Pentium/90 notebook       9,50  Mark Maybee <markm@cs.colorado.edu>
     6x86/120 Cyrix           52,32  Joel Boring <dwild@eskimo.com>
     Pentium/83 Overdrive     82,85  Brian Smith <smithb@laraby.tiac.net>
     Pentium/83 Overdrive     83,32  Scott Francis <mord@netcom.com>
     Pentium/83 Overdrive     82,94  G. Spiegelberg <greg@owens.ridgecrest.ca.us>
     Pentium/83 Overdrive     83,35  Jacek Polewczak <jacek.polewczak@csun.edu>
     6x86/120 P120+overcl    104,86  Howard Poe <falcor@kingsnet.com>
     Pentium MMX/263 overcl  392,40  John Appleby <jma24@cam.ac.uk>
     AMD K6-2/300            399,95  Chris Ebenezer <chriseb@nortelworks.com>
     Pentium MMX/231         419,43  Juan Domenech <domenech@mail.seric.es>
     Pentium MMX/263 overcl  435,87  Juan Domenech <domenech@mail.seric.es>
     SMP4 Pentium Pro/200    700,13  R. Carrico <robert_carrico@themoneystore.com>




  99..77..  PPeennttiiuumm,, ccoorrrreecctteemmeenntt ccoonnffiigguurrss















































    Systme              BogoMips  Source
     Pentium/60               23,00  Chien-An Chen <giant@nwu.edu>
     Pentium/60               23,96  Joost Helberg <jhelberg@nlsun8.oracle.nl>
     Pentium/60               23,96  Ulf Tietz <ulf@rio70.bln.sni.de>
     Pentium/60 Gateway       23,96  Manoj Kasichainula <mvkasich@eos.ncsu.edu>
     Pentium/60               23,96  Pierre Frenkiel <frenkiel@cdfap1.in2p3.fr>
     Pentium/60               23,96  Tim Oosterbroek <tim@astro.uva.nl>
     Pentium/60 NCR 3455      24,00  Mathias Koerber <mathias@solomon.technet.sg>
     Pentium/60               24,00  Joe Sloan <jjs@engr.ucr.edu>
     Pentium/60               24,00  Mark H. Wood <mwood@indyvax.iupui.edu>
     Pentium/60               24,13  R.M. van Rijswijk <rijswijk@cs.utwente.nl>
     Pentium/66               25,00  Chuck Munro <chuckm@canada.hp.com>
     Pentium/66               26,63  Jason M. Naughton <jnaughto@ee.ryerson.ca>
     Pentium/66               26,84  Kelly Carmichael <kcarmich@cln.etc.bc.ca>
     Pentium/75 256c          29,50  Chris Dodd <cdodd@super.win.or.jp>
     Pentium/75               29,79  Scott M. Grim <sgrim@netwalk.com>
     Pentium/75               29,80  Torbjoern Kristoffersen <torbkris@online.no>
     Pentium/75               29,95  Steve Martin <smartin@mrg.uswest.com>
     Pentium/75               30,22  Zoran Marjanski <bagzor@enterprise.ca>
     Pentium/75               30,22  Andrew Buckby <c4ab1@dmu.ac.uk>
     Pentium/75               30,22  Stuart Nuttall <u9230106@sys.uea.ac.uk>
     Pentium/90 notebook      32,73  Rich Neves <neves@cs.colorado.edu>
     Pentium/90               34,07  A. Galbraith <ajgalb@postman.essex.ac.uk>
     Pentium/90 zappa 256c    35,60  Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
     Pentium/90               35,84  Jason Nunn <jsno@stormfront.com.au>
     Pentium/90               35,88  Joe Anderson <CPJJA@ttacs3.ttu.edu>
     Pentium/90               35,88  Warwick Allison <warwick@cs.uq.oz.au>
     Pentium/90               35,94  Erik Walthinsen <omega@teleport.com>
     Pentium/90               36,00  Joe Sloan <jjs@engr.ucr.edu>
     Pentium/90               36,00  Larry Auton <lda@nfa.research.att.com>
     Pentium/90               36,00  Richard Knipe <knipe@lobby.ti.com>
     Pentium/90               36,00  Werner Almesberger <almesber@lrc.epfl.ch>
     Pentium/90               36,06  Rob J. Nauta <rob@iaehv.nl>
     Pentium/90               36,08  Leung Hon Wa <cshwleun@cs.citu.edu.hk>
     Pentium/90 Zeos          36,08  Chris Laurel <claurel@mr.net>
     Pentium/90               36,08  Ronald Prague <ronp@fishnet.net>
     Pentium/90               36,08  Adrian Blues <adrian@hypereality.co.uk>
     Pentium/90               36,08  Pak Yin Tam "Fred" <ptam@eesun1.tamu.edu>
     Pentium/90               36,08  Jason Heiss <jheiss@cco.caltech.edu>
     Pentium/90               36,08  Tim Krantz <tek@dsinc.com>
     Pentium/90 Gateway       36,08  Pete Stewart <stewart@bae.bellcore.com>
     Pentium/90               36,08  Tom Manos <tmanos@infi.net>
     Pentium/90               36,08  Richard Mundell <R.Mundell@uea.ac.uk>
     Pentium/90               36,08  NN <usenet@uxmail.ust.hk>
     Pentium/90               36,08  Yavuz Batmaz <yavuzb@knidos.cc.metu.edu.tr>
     Pentium/90               36,08  Alan Skelley <askelley@gpu.srv.ualberta.ca>
     Pentium/90               36,08  Ralph Sims <ralphs@locus.halcyon.com>
     Pentium/90               36,08  Julian Bradbury <julian@xabcs.demon.co.uk>
     Pentium/90               36,08  Dan Langrill <langrlld@mussel.cig.mot.com>
     Pentium/90               36,08  Ravi Krishna Swamy <rkswamy@eos.ncsu.edu>
     Pentium/90               36,08  J.L. Brothers <brothers@halcyon.com>
     Pentium/90 Micronics     36,09  Andrew Brown <andrewbrown@acm.org>
     Pentium/90               36,27  Giao H. Phan <giao@concrete.resnet.upenn.edu>
     Pentium/90 Plato         36,40  Joe Valenzuela <smarm@ibm.net>
     Pentium/90               36,50  Mike Kelleher <mikejk@umfacad.maine.edu>
     Pentium/90               36,90  Ted Gaunt <tgaunt@pms701.pms.ford.com>
     Pentium/100 overcl       38,39  Stefan Onderka <stefan.onderka@metronet.de>
     Pentium/100              39,52  Adrian Blues <adrian@hypereality.co.uk>
     Pentium/100 overcl       39,73  Phil Howard <phil@clr.com>
     Pentium/100              39,73  <Peter.Weiss@informatik.uni-oldenburg.de>
     Pentium/100 0c           39,73  Jason Crawford <jasonc1@gramercy.ios.com>
     Pentium/100 overcl       39,83  Stefan Onderka <stefan.onderka@metronet.de>
     Pentium/100              39,93  Tom Miller <tvtom@en.com>
     Pentium/100 Cyrix        39,94  Mike Holland <myk@cygnus.uwa.edu.au>
     Pentium/100              39,94  KAZ Vorpal <kaz@upx.net>
     Pentium/100 overcl       39,94  Donar G.E. Alofs <donar@cs.vu.nl>
     Pentium/100              39,94  Larry Snyder <larry@trauma.iag.net>
     Pentium/100              39,94  Ian Hill <ian@hecate.phy.queensu.ca>
     Pentium/100              39,94  John Crawford <link@spu.edu>
     Pentium/100              39,94  Jered <jered@mit.edu>
     Pentium/100 overcl       39,94  Ian <irs2@tweedledum.amp.york.ac.uk>
     Pentium/100              39,94  Brian McGhee <brianm@iceonline.com>
     Pentium/100              39,94  M Skjelland <morten.skjelland@pvv.unit.no>
     Pentium/100              39,96  Dan Kha <dkha@yorku.ca>
     Pentium/100              39,98  Phillipe Charon <charron@ecoledoc.ibp.fr>
     Pentium/100              40,03  <bon@elektron.ikp.physik.th-darmstadt.de>
     Pentium/100              40,08  Ronny Spiegel <rspiegel@htwm.de>
     Pentium/100              40,18  David Baldwin <davidb@exis.net>
     Pentium/100              40,18  <habibie@catevr.fiu.edu>
     Pentium/120 Cyrix        47,80  Simon Ho <simon@epsilon.win-uk.net>
     Pentium/120              47,82  Jorge Juan-Chico <jjchico@imse.cnm.es>
     Pentium/120 Cyrix        47,92  Joel N. Squire <squire@colorado.edu>
     Pentium/120              47,92  Aaron Brick <abrick@dcc.uchile.cl>
     Pentium/120              47,93  Umberto d'Ortona <umberto@grenet.fr>
     Pentium/120 Cyrix        47,93  Jim T. Polk <jtpolk@cris.com>
     Pentium/120              47,93  Jon Trowbridge <trow@mcs.com>
     Pentium/120              47,98  Craig Bates <cbates@psu.edu>
     Pentium/120 Cyrix        48,00  Steve <horne@mhd2.pfc.mit.edu>
     Pentium/120              48,00  Michael Wazenski <mwazenski@dsrnet.com>
     Pentium/120 Intel        48,02  Scott M. Grim <sgrim@netwalk.com>
     Pentium/120 Cyrix        48,27  Glenn T. Jayaputera <gjt@budgie.apana.org.au>
     Pentium/120              48,27  Roman Mitnitski <mitnits@shany.net>
     Pentium/120              48,27  Peter Walsh <pwalsh@rain.org>
     Pentium/120 Cyrix        48,20  Viznyuk <sviznyuk@magnus.acs.ohio-state.edu>
     Pentium/120              49,27  Simon Hargrave <simon@revell.demon.co.uk>
     Pentium/133              53,04  Wayne Roberts <wroberts@aug.com>
     Pentium/133              53,04  Gregory Travis <greg@indiana.edu>
     Pentium/133 overcl       53,04  A. Kunigelis <algikun@santaka.sc-uni.ktu.lt>
     Pentium/133 Intel        53,04  Jimmie Farmer <calvin@malchick.com>
     Pentium/133              53,25  Chuck Mattern <cmattern@mindspring.com>
     Pentium/133              53,26  Glenn Holt <gholt@lsil.com>
     Pentium/133              53,26  Heikki Levanto <heikki@lsd.ping.dk>
     Pentium/133              53,26  Chaim Tarshish <chaim@ipl.med.nyu.edu>
     Pentium/133              53,26  Mitchell B. Hamm <hamm@one.net>
     Pentium/133              53,26  Donald Lewis <dlewis@jackson.freenet.org>
     Pentium/133              53,26  Jon Trowbridge <trow@kremlin.emccta.com>
     Pentium/133              53,26  Charny Peete Mitchell <cpmiche@eos.ncsu.edu>
     Pentium/133 256c         53,26  David Wuertele <dave@gctech.com>
     Pentium/133 256c         53,68  Guiseppe Miceli <ferdy@ccii.unipi.it>
     Pentium/133              53,68  Michael Kress <kress@hal.saar.de>
     Pentium/150 Intel        59,80  Joel D. Young <jdyoung@afit.af.mil>
     Pentium/150              60,01  Joost de Greef <joost@stack.nl>
     Pentium/150 overcl       60,21  Duarte Cordeiro <l38404@alfa.ist.utl.pt>
     Pentium/166              66,16  Pedro Soria-Rodriguez <sorrodp@wpi.edu>
     Pentium/166              66,35  K. Visweswaran <kviswesw@lehman.com>
     Pentium/166              66,36  T. Endo <enchan@trc.rwcp.or.jp>
     Pentium/166              66,44  Donald Lewis <dlewis@jackson.freenet.org>
     Pentium/166              66,76  F. Baitinger <baiti@herrenberg.netsurf.de>
     Pentium/166              67,10  Jon Trowbridge <trow@mcs.com>
     Pentium/166              67,10  Dylan <dylan@ert.com>
     Pentium/166 512c         67,10  Dirk Freese <freese@infra.de>
     C6/200 CenterHauls       79,46  James Rotenberry <rotenber@jmr.lasx.com>
     Pentium/200              79,66  Piete Brooks <Piete.Brooks@cl.cam.ac.uk>
     Pentium/200              79,69  Timm Gleason <timm@bess.net>
     Pentium/200              79,89  Dave S. Baker <dave@acedia.demon.co.uk>
     Pentium/200              78,87  Nick D'Apice <ndapice@erols.com>
     Pentium/200              80,08  Anders Stenback <stenback@hehe.com>
     Pentium/200              80,08  Steve Freeland <sfreel@cs.mcgill.ca>
     Pentium/200              81,92  Steve Baur <steve@xemacs.org>



  99..88..  DDrriivvss dduu PPeennttiiuumm,, ccoorrrreecctteemmeenntt ccoonnffiigguurrss :: MMMMXX,, PPPPrroo,, CCyyrriixx,,
  AAMMDD
































































    Systme                BogoMips  Source

     Pentium MMX/133         265,77  Ron Peters <rpeters@f15fast.al.intel.com>
     Pentium MMX/150         307,53  Sami Sihvonen <buggy@fix.no>
     Pentium MMX/166 notebk  331,75  n.n. <visionary@aura.title14.com>
     Pentium MMX/166         331,78  Rob Janssen <pe1chl@amsat.org>
     Pentium MMX/166         331,78  Dave Page <dave@vale-housing.co.uk>
     Pentium MMX/166         331,78  Matthew C. Sell <amtmcs@amsta.leeds.ac.uk>
     Pentium MMX/166         333,41  Sjoelie <patrick@sjoel.xs4all.nl>
     Pentium MMX/166         333,41  Viet Yen Nguyen <vt@multiweb.nl>
     Pentium MMX/166         333,41  Marcin Owsiany <porridge@lo4.ids.bielsko.pl>
     Pentium MMX/180         358,81  David Efflandt <efflandt@xnet.com>
     Pentium MMX/200         398,13  Andy Saunders <andi@numenor.oucs.ox.ac.uk>
     Pentium MMX/200         398,13  A. James Lewis <james@vrtx.net>
     Pentium MMX/200         398,13  Sean Horan <sean@psy.ed.asu.edu>
     Pentium MMX/200         398,19  Fabio Comolli <comolli@tin.it>
     Pentium MMX/200         398,95  Reinhold J. Gerharz <rgerharx@erols.com>
     Pentium MMX/200         398,95  Eric Beymer <beymer@soundex.com>
     Pentium MMX/200         398,95  Duane Steel <dsteele@direct.ca>
     Pentium MMX/200         398,95  <ndpilatz@undergrad.math.uwaterloo.ca>
     Pentium MMX/200         400,00  Rob Jokinen <rjokinen@rt66.com>
     Pentium MMX/200         400,59  Paul Black <paul@darwin.demon.co.uk>
     Pentium MMX/200         400,59  Juho Cederstrom <cederstrom@kolumbus.fi>
     Pentium MMX/200         400,59  Bart <bart@aceonline.com.au>
     Pentium MMX/210 overcl  416,97  John Saunders <john@nlc.net.au>
     Pentium MMX/225 overcl  448,92  Ingo Reimann <reimann@uni-muenster.de>
     Pentium MMX/225 overcl  448,92  Mattias Hembruch <mghembru@ece.uwaterloo.ca>
     Pentium MMX/225 overcl  448,92  Larry Lade <lade@btigate.com>
     Pentium MMX/230 overcl  461,85  Rene Stanneveld <edge@huizen.nhkanaal.nl>
     Pentium MMX/233         463,67  Rui M.B. Machado <rui@nifdl7.fd.ul.pt>
     Pentium MMX/233         463,67  Rob Janssen <pe1chl@amsat.org>
     Pentium MMX/233         465,31  Per Andersson <ppan@cntw.com>
     Pentium MMX/233         465,31  Jose Maria Perez Box <jmpbox@etsin.upm.es>
     Pentium MMX/233         466,94  Van Overbruggen <marcel@johannes.iconnect.nl>
     Pentium MMX/233         466,94  Erwin Lubbers <erwin@box.nl>
     Pentium MMX/250 overcl  498,07  Maarten van Rossum <m@vr.xs4all.nl>
     Pentium MMX/266 overcl  525,93  Frank <r2@xs4all.nl>

     Pentium Pro/133         132,88  John D. Sundberg <jdsundberg@mmm.com>
     Pentium Pro/150         149,50  Rogier Wolff <wolff@bitwizard.nl>
     Pentium Pro/180         179,61  Chuck Fee <fee@ch4549.org>
     Pentium Pro/200         197,42  Michael Griffith <grif@cs.ucr.edu>
     Pentium Pro/200         197,42  Curtis Varner <carner@cs.ucr.edu>
     Pentium Pro/200         198,84  Erik Max Francis <max@alcyone.com>
     Pentium Pro/200         198,84  Marc Winkler <marcus@healthchex.com>
     Pentium Pro/200         199,04  V. Bostrom <Vareck_Bostrom@ccm.jf.intel.com>
     Pentium Pro/200         199,06  Justin Clancy <justin@hippos.demon.co.uk>
     Pentium Pro/200         199,06  Glenn Lamb <mumford@netcom15.netcom.com>
     Pentium Pro/200         199,06  Laszlo Herczeg <las@light-house.com>
     Pentium Pro/200         199,07  Stefan <boresch@schuber.u-strasbg.fr>
     Pentium Pro/200         199,07  Greg Fausak <lgfausak@august.com>
     Pentium Pro/200         199,07  Chris Jones <chris@planetsymphone.com>
     Pentium Pro/200         199,07  Matthew S. Crocker <matthew@crocker.com>
     Pentium Pro/200         199,95  Reinhold J. Gerharz <rgerharx@erols.com>
     Pentium Pro/200         200,32  Gil Megidish <gmegidis@ort.org.il>
     Pentium Pro/200         200,32  Jose Navarro <jnavarro@aoc.nrao.edu>
     Pentium Pro/200         200,32  <Eric_Zucker@om.hp.com>
     Pentium Pro/200         200,32  Wayne Scott <wscott@ichips.intel.com>
     Pentium Pro/200         200,32  Adrian L. Hosey <ahosey@cs.indiana.edu>
     Pentium Pro/233 overcl  234,43  S. Curtarolo <auro@spiro.fisica.unipd.it>

     Pentium II/233          233,47  Torbjoern Kristoffersen <torbkris@online.no>
     Pentium II/233          233,47  Sorin Mitran <mitran@irs.fzk.de>
     Pentium II/266          265,42  Jon Trowbridge <trow@kremlin.emccta.com>
     Pentium II/266          265,42  A. Hochwimmer <a.hochwimmer@auckland.ac.nz>
     Pentium II/266          265,44  Nick Ullman <nick@avenza.com>
     Pentium II/266          266,24  Pieter Eendebak <p.t.eendebak@phys.uu.nl>
     Pentium II/266          267,06  James McKinnon <jmack@phys.ualberta.ca>
     Pentium II/266          267,06  James McKinnon <jmack@phys.ualberta.ca>
     Pentium II/266          267,06  Greg <gl2hughes@undergrad.math.uwaterloo.ca>
     Pentium II/266          267,06  Pros Robaer <pros@innet.be>
     Pentium II/266          272,79  Frank Hale <frankhale@worldnet.att.net>
     Pentium II/300 overcl   299,01  Martin Lathoud <nytral@endirect.qc.ca>
     Pentium II/448 overcl   447,28  Mathieu Bois <mathieu.bois@nomura.co.uk>
     Pentium II/450          447,28  Mathieu Bois <mathieu.bois@nomura.co.uk>
     Pentium II/466          462,03  Bjorn Lindgren <bjorn@chiba.cx>

     Intel Celeron/333       332,60  Florian <florian@egon-bbs.n-a-m.de>

     Cyrix 5x86/100          100,16  NN <root@anxa04.cc.ic.ac.uk>
     Cyrix 5x86/100          100,19  Valient Gough <vgough@teton.mines.edu>
     Cyrix 5x86/100          100,47  C.Chan <chan@alfrothul.uchicago.edu>
     Cyrix 5x86/120 P150+    119,60  Wynstan Tong <wynstan@eecg.toronto.ca>
     Cyrix 5x86/120 P150+    119,60  Joel N. Squire <squire@colorado.edu>
     Cyrix 5x86/120 P150+    119,83  Leland Olds <olds@eskimo.com>
     Cyrix 5x86/120 P150+    119,83  NN <root@anxa04.cc.ic.ac.uk>
     Cyrix 5x86/120 P150+    120,68  C.Chan <chan@alfrothul.uchicago.edu>
     Cyrix 5x86/120 P150+    122,01  Andre Coetzee <acoetzee@ctcc.gov.za>

     Cyrix 6x86/100           99,42  Stig M. Valstad <svalstad@sn.no>
     Cyrix 6x86/110 P133+    109,77  Matthew Flint <matthew@philtrum.demon.co.uk>
     Cyrix 6x86/110 P133+    109,77  John Merriam <suprnaut@esslink.com>
     Cyrix 6x86/110 P133+    109,77  Keith Smith <keith@ksmith.com>
     Cyrix 6x86/120 P150+    119,00  Jean-Claude Gouiran <jcg13@ibm.net>
     Cyrix 6x86/120 P150+    119,60  Taso Lyristis <taso@remus.rutgers.edu>
     Cyrix 6x86/120 P150+    119,60  Hrvoje Stipetic <stipe@zemris.fer.hr>
     Cyrix 6x86/120          119,60  Yakko J. Warner <yakko@wtower.com>
     Cyrix 6x86/120 P150+    119,60  B. James Philippe <bryan@terran.org>
     Cyrix 6x86/120 P150+    119,83  Roger Merchberger <zmerch@northernway.net>
     Cyrix 6x86/120          119,83  Daniel Wold <danw@panix.com>
     Cyrix 6x86/120          120,00  John C. Beasley <beaslej1@nevada.edu>
     Cyrix 6x86/120 P150+    120,01  Jay Thorne <jay@result.com>
     Cyrix 6x86/120 P150+    120,01  Jeawan Kim <jaewan@harc.edu>
     Cyrix 6x86/120 P150+    120,91  Cymen <cymen@ziplink.net>
     Cyrix 6x86/133 P166+    132,71  Holger Kemper <hok@balu.ping.de>
     Cyrix 6x86/133 P166+    132,71  Hrvoje Stipetic <stipe@zemris.fer.hr>
     Cyrix 6x86/133 P166+    132,82  Alex Liffers <aliffers@tartarus.uwa.edu.au>
     Cyrix 6x86/133 P166+    132,82  Brian C. Theobald <theobald@nortel.ca>
     Cyrix 6x86/133 P166+    132,88  Alvaro Lopes <alvieboy@utad.pt>
     Cyrix 6x86/133 P166+    132,88  Craig Andersen <andersen@fastlane.net>
     Cyrix 6x86/133 P166+    133,73  C. Drews <drews_c@informatik.fh-hamburg.de>
     Cyrix 6x86/133 P166+    132,88  Craig Andersen <andersen@fastlane.net>
     Cyrix 6x86/133 P166+    133,73  C. Drews <drews_c@informatik.fh-hamburg.de>
     Cyrix 6x86/133 P166+    133,12  Daniel Gritter <dgritt47@calvin.edu>
     Cyrix 6x86/150 P200+    149,50  Evan L. Schemm <elschemm@mtu.edu>
     Cyrix 6x86/150 P200+    149,50  Steven Rainwater <srainwater@ncc.com>
     Cyrix 6x86/150 P200+    149,91  Sid Boyce <szb50@amdahl.com>
     Cyrix 6x86/150 P200+    149,91  Eric Haas <haas@andrew.cmu.edu>
     IBM 6x86/150 P200       149,96  M.D. Guardia <mikedg@ghostbbs.pandora.it>
     Cyrix 6x86MX/166 A-Step 166,71  David Anderson <rovaughn@infoave.net>
     Cyrix 6x86MX/188 P233   186,78  Dominic Baines <rdab100@hermes.cam.ac.uk>
     Cyrix 6x86MX/188 P233   187,19  Dominic Baines <rdab100@hermes.cam.ac.uk>

     K5/75 AMD               149,91  Simon Karpen <slk@linux-shell.net>
     K5/90 AMD               179,40  <root@krabi.mbp.ee>
     K5/90 AMD               179,40  Ken Edwards <edwards@thor.xon.cuug.ab.ca>
     K5/90 AMD               179,40  Marcin Owsiany <porridge@lo4.ids.bielsko.pl>
     K5/90 AMD               179,81  Marcin Owsiany <porridge@lo4.ids.bielsko.pl>
     K5/90 AMD               180,22  Hector DC Gonzalez <turbo@linux.lsl.com.mx>
     K5/90 AMD               181,00  Drew Golden <golden@platinum.nb.net>
     K5/100 AMD PR133        198,66  Trond Solem <trond.solem@homemail.com>
     K5/100 AMD PR133        199,07  Henri Jamgotchian <hjamgot@planete.net>
     K5/100 AMD PR133        199,48  Dark Mind <root@dmh.ml.org>
     K5/100 AMD PR133        199,88  J. Grassel <grassel@heart.cas.und.nodak.edu>
     K5/100 AMD PR133        199,88  Berend Reitsma <berend@united-info.com>
     K5/100 AMD PR133        200,29  Tilman Sommer <sommer@vsun02.ag01.kodak.com>
     K5/100 AMD PR133        200,32  Carlo Politi <cpoliti@mare.gol.grosseto.it>
     K5/100 AMD PR133        199,07  Franco De Angelis <fda@ied.unipr.it>
     K5/100 AMD PR133        199,07  HaJo Simons <hajo@frodo.com>
     K5/116 AMD PR166        233,47  Hans-Joachim Baader <hans@grumber.ika.de>
     K5/116 AMD PR166        233,47  Sean Kelly <s.kelly@newcastle.ac.uk>
     K5/120 AMD PR133 overcl 239,21  Chris Harshman <harshman@paradigm.uor.edu>

     AMD K6/166              332,60  David Parsons <orc@pell.chi.il.us>
     AMD K6/166              331,00  Bill Petersen <brp@cuberramp.net>
     AMD K6/200              398,85  n.n. <uh886@freenet.victoria.bc.ca>
     AMD K6/200              398,89  Ian Hanschen <hanschen@uwyo.edu>
     AMD K6/200              398,98  Philip Lijnzaad <lijnzaad@columba.ebi.ac.uk>
     AMD K6/200              399,77  Murtaza Amiji <murti@wpi.edu>
     AMD K6/200              399,78  Dan Hetzel <dan@icor.fr>
     AMD K6/200              400,58  Paco Culebras Amigo <paco@hades.udg.es>
     AMD K6/200              400,59  Sverre H. Huseby <s.h.huseby@usit.uio.no>
     AMD K6/200              400,59  Steve Conley <sconley@muck.leonine.com>
     AMD K6/200              400,59  Mark Lehrer <edge@dux.raex.com>
     AMD K6/200              400,59  Chris Esser <ksqueak@erols.com>
     AMD K6/200              400,59  Federico Pellegrin <fede@triangolo.it>
     AMD K6/200              400,59  Howard Poe <falcor@kingsnet.com>
     AMD K6/200              400,64  Fabrizio Santini <sanfff@tin.it>
     AMD K6/208 overcl       416,15  Jani Halme <jaadha@utu.fi>
     AMD K6/208 overcl       416,15  Donnie Savage <dsavage@cris.com>
     AMD K6/208              417,97  J.F. Ursetto <ursetto@uiuc.edu>
     AMD K6/225              440,00  n.n. <uh886@freenet.victoria.bc.ca>
     AMD K6/225 overcl       448,92  Paco Culebras Amigo <paco@hades.udg.es>
     AMD K6/225 undercl      448,92  Henrik Storner <storner@image.dk>
     AMD K6/225 overcl       450,56  M. Cramer <mccramer@stuttgart.netscape.de>
     AMD K6/233              463,67  Aduanne Carter <drow@blazenet.net>
     AMD K6/233              465,31  Michael Haardt <haardt@gmd.de>
     AMD K6/233              466,50  R. Garcia <rgarciaitt@aol.com>
     AMD K6/233 overcl       466,84  Francesco <root@fly.cnuce.cnr.it>
     AMD K6/233 overcl       466,94  Paco Culebras Amigo <paco@hades.udg.es>
     AMD K6/233 overcl       466,84  Francesco <root@fly.cnuce.cnr.it>
     AMD K6/233 overcl       466,94  Paco Culebras Amigo <paco@hades.udg.es>
     AMD K6/233              466,94  Howard Poe <hpoe@nyx.net>
     AMD K6/233              466,94  Andreas Haumer <andreas@xss.co.at>
     AMD K6/233              466,94  Damien Castelltort <eznerald@mail.mnet.fr>
     AMD K6/233              466,94  G. Cantallops Ramis <gcantallopsr@jet.se>
     AMD K6/233              466,94  Juergen Hammelmann <juergen@neptun.stgt.de>
     AMD K6/233              466,94  Chris Gushue <seymour@iname.com>
     AMD K6/239              478,41  Torbjoern Kristoffersen <torbkris@online.no>
     AMD K6/239              478,41  Mark Neill <btech@styx.phy.vanderbilt.edu>
     AMD K6/239              478,41  Louis van Dompselaar <etaoin@xs4all.nl>
     AMD K6/266              534,12  Andreas Czerniak <cognac@toppoint.de>
     AMD K6-2/300            598,02  Pasa Guglielmo <gpasa@omedia.ch>
     AMD K6-2/300            599,65  Ivo Plana <ipv@tinet.fut.es>
     AMD K6-2/300            599,65  Juan Domenech <domenech@mail.seric.es>
     AMD K6-2/300            599,65  Ashley Penney <ashp@bastard.co.uk>
     AMD K6-2/300            599,65  Rob <im@home.com>
     AMD K6-2/300            599,65  Stephen Jenuth <jenuths@homacjen.ab.ca>
     AMD K6-2/308            614,40  Erv Walter <walter@chem.wisc.edu>
     AMD K6-2/333            663,55  <kuhn@ernie.lpr.e-technik.tu-muenchen.de>
     AMD K6-2/333            665,19  A. Bihlmaier <stormtank@gmx.net>
     AMD K6-2/338 overcl     675,02  Nicola Fabiano <mx8644@mclink.it>
     AMD K6-2/350            699,60  Juan Domenech <domenech@mail.seric.es>
     AMD K6-2/400 overcl     799,54  Ivo Plana <ipv@tinet.fut.es>
     AMD K6-2/400 overcl     801,18  Phillip Deackes <gsmh@gmx.net>
     AMD K6-2/400 overcl     801,18  Jon Riekenberg <jrr8208@ksu.edu>
     AMD K6-2/400 overcl     801,18  Ryan Bethke <immortal26@prodigy.net>
     AMD K6-2/400            801,18  Wolfgang Zekoll <wzk@um1.pce.de>
     AMD K6-2/400            801,18  Ted E. Suter <nexion@home.com>
     AMD K6-2/400            801,29  Birko Bergt <birko.bergt@cdc.com>
     AMD K6-2/440            878,18  Steve Bourland <sbourlan@ecn.purdue.edu>
     AMD K6-2/450 overcl     901,12  Ted E. Suter <nexion@home.com>




  99..99..  SSyyssttmmeess AAllpphhaa ccoorrrreecctteemmeenntt ccoonnffiigguurrss

























































    Systme                BogoMips  Source
     21064/150 Jensen        148,37  Linus Torvalds <torvalds@cc.helsinki.fi>
     21064/150 Jensen        149,49  J.L. Brothers <brothers@halcyon.com>
     21064/150 Jensen        148,89  Martin Osterman <ost@comnets.rwth-aachen.de>

     21064A/275 Cabriolet    271,58  <michal@ellpspace.math.ualberta.ca>
     21064A/275 Cabriolet    272,00  Linus Torvalds <torvalds@cc.helsinki.fi>
     21064A/275              272,00  Stephen Gaudet <sjg@tiac.net>
     21064A/275 Cabriolet    272,63  Jay Estabrook <jestabro@amt.tay1.dec.com>
     21064A/275 Cabriolet    273,37  David Mosberger-Tang <davidm@cs.arizona.edu>
     21064A/275              274,11  Kevin Jacobs <jacobs@eek.cwru.edu>
     21064A/300 Cabriolet    298,00  Jay Estabrook <jestabro@amt.tay1.dec.com>
     21064A/300              298,00  Stephen Gaudet <sjg@tiac.net>

     21066/166               162,53  Phil Bostley <pbostley@qualcomm.com>
     21066/166               163,05  Matthew Jacob <mjacob@feral.com>
     21066/166               163,05  Jon Spreha <jxs557@psu.edu>
     21066/166               164,59  David Mosberger-Tang <davidm@cs.arizona.edu>
     21066/166 Multia        164,63  Rudolf Gabler <rug@usm.uni-muenchen.de>
     21066/166               165,00  Gareth Bult <gareth@ftech.net>
     21066/166               165,04  Craig Ruff <cruff@ncar.ucar.edu>
     21066/200               196,90  Danny ter Haar <danny@cistron.nl>
     21066/200 UDB overcl    198,00  Kari Davidsson <d154402@cs.tut.fi>

     21066A/233 UDB          229,63  Toon van der Pas <toon@vdpas.hobby.nl>
     21066A/233 AS400        230,16  Ophir Ronen <ophir@connectsoft.com>
     21066A/233 AS200 Avanti 230,16  B. James Phillippe <bryan@terran.org>
     21066A/233 NoName       230,67  T. Bogendoerfer <tsbogend@bigbug.franken.de>
     21066A/233 UDB          230,68  Ted Schipper <ted@tedux.hobby.nl>
     21066A/233 NoName       230,76  Mikael Nykvist <viper@ludd.luth.se>
     21066A/233 UDB          231,21  Eric Smith <eric@goonsquad.spies.com>
     21066A/233 NoName       231,21  Jay Estabrook <jestabro@amt.tay1.dec.com>
     21066A/266 NoName ov,cl 261,62  Andreas Johansson <ajo@ludd.luth.se>
     21066A/266 UDB overcl   261,62  Michael Brennen <mbrennen@fni.net>
     21066A/266 NoName ov,cl 262,14  Wim van Dorst <baron@clifton.hobby.nl>
     21066A/266 Multia       264,00  Joshua Grubman <joshg@dn.net>
     21066A/284 NoName ov,cl 281,00  <imakino@gloria.cord.edu>
     21066A/297 NoName ov,cl 293,60  <imakino@gloria.cord.edu>
     21066A/300 UDB ov,cl    294,65  Topi Kanerva <tkanerva@nks.oulu.fi>

     21164/266 EB164         265,29  Jay Estabrook <jestabro@amt.tay1.dec.com>
     21164/300 EB164         297,79  Hilarius <maurice@ellpspace.math.ualberta.ca>
     21164/300 XLT Alcor     297,79  Dave Wreski <dave@nic.com>
     21164/300 AS1000        297,79  Salvador Pinto Abreu <spa@sc.uevora.pt>
     21164/333 Alcor         331,35  Linus Torvalds <torvalds@cs.helsinki.fi>
     21164/333 Alcor         331,35  David Mosberger-Tang <davidm@azstarnet.com>
     21164/366 PC164 Durango 363,85  Geerten Kuiper <geerten@bart.nl>
     21164/433 PC164         429,89  Paul D. Robertson <proberts@clark.net>
     21164/433 PC164         429,91  Bernd Meyer <bmeyer@cs.monash.edu.au>
     21164/433 Maita         429,91  Bill Broadley <bill@math.ucdavis.edu>
     21164/433 PC164         430,96  <rainer.landes@physik.uni-karlsruhe.de>
     21164/433 EB164         430,96  <Metod.Kozelj@rzs-hm.si>
     21164/433 PC164         430,96  H. Sumargo <habibie@robotic.eng.fiu.edu>
     21164/433 PC164         431,94  Timm Gleason <timm@bess.com>
     21164/466 PC164         464,51  Daryll Strauss <daryll@d2.com>
     21164/500               497,00  Alex Butcher <alex@asimov.annex.co.uk>
     21164/500 PC164         497,02  C.J. Grayce <cgrayce@wasatch.ps.uci.edu>
     21164/500               497,05  Heiner Kruener <hk@martian.ping.de>
     21164/500 AS500         497,03  Jim Nance <jlnance@avanticorp.com>
     21164/500 P7            497,03  Jan guldentops <jacko@ba.be>
     21164/500 EB164 Durango 497,43  Kevin Jacobs <jacobs@eek.cwru.edu>

     21164A/500  PWS         497,02  Robert Harley <robert.harley@inria.fr>
     21164A/500  PC164       497,02  Stephen Oberski <sfo@deterministic.com>
     21164A/533  PC164LX     529,53  Harvey J. Stein <hjstein@bfr.co.il>
     21164PC/533 PC164SX     529,53  Danny ter Haar <dth@cistron.nl>
     21164PC/533 PC164SX     529,53  Shane Sturrock <sss@holyrood.ed.ac.uk>
     21164PC/533 PC164SX     529,53  Wim van Dorst <baron@clifton.hobby.nl>
     21164A/533  PC164LX     530,57  Ronny Ranerup <ronny@axis.com>
     21164A/533  PC164LX     530,57  Bill Broadley <bill@math.ucdavis.edu>
     21164A/600  PC164LX     595,59  L.F. Donaldson <donaldlf@cs.rose-hulman.edu>
     21164A/600  PC164LX     595,59  <stepan@wesley.informatik.uni-freiburg.de>
     21164A/600  PC164       597,60  Fabrizio Santini <sanfff@tin.it>
     21164A/666  PC164LX     662,70  <stepan@wesley.informatik.uni-freiburg.de>

     21264/400 Pass-1        794,82  Jay Estabrook <jay.estabrook@digital.com>




  99..1100..  SSyyssttmmeess MMoottoorroollaa ccoorrrreecctteemmeenntt ccoonnffiigguurrss



    Systme                 BogoMips  Source
     68030/16 Atari Falcon     3,90  Jay T. Millar <jmillar@eaglequest.com>
     68030/16 Atari Falcon     3,95  J.L. Brothers <brothers@halcyon.com>
     68030/16 Atari Falcon     3,98  <Roman.Hodek@informatik.uni-erlangen.de>
     68030/20 MacII Si         4,88  Bill Maloy <maloy@goldinc.com>
     68030/20 0c               4,92  Chris Nadigh <chrnadig@iiic.ethz.ch>
     68030    Amiga 3000       6,08  Andy Wick <awick@vt.edu>
     68030/30 Amiga 4000       6,09  Karsten Merker <km@golf.dinet.com>
     68030/25 Amiga 3000       6,12  Glen Hewlett <hewlett@planeteer.com>
     68030/25 Amiga 3000       6,21  Hamish Macdonald <hamish@bnr.ca>
     68030/25 Amiga 3000       6,21  J.L. Brothers <brothers@halcyon.com>
     68030/32 Atari Falcon     7,91  Franz Korntner <fkorntne@bazis.nl>
     68030    Atari TT         7,96  <schwab@issan.informatik.uni-dortmund.de>
     68030/32 Atari MegaST     7,98  E.J. van den Bussche <busscheh@ksepl.nl>
     68030/33 Atari TT         7,98  <Roman.Hodek@informatik.uni-erlangen.de>
     68030    Atari TT         7,98  Wayne Booth <trek@ihgp114r.ih.att.com>
     68030/60                  8,06  Korey Budgen <kbudgen@st.nepean.uws.edu.au>
     68030/33 Amiga 2000       8,14  W. Haidinger <e9225662@stud1.tuwien.ac.at>
     68030/48 32c             11,89  Martin Rogge <Martin_Rogge@ki.maus.de>
     68030/50 Atari           12,00  <Roman.Hodek@informatik.uni-erlangen.de>
     68030/50 Amiga 1200      12,36  Chris Sumner <chris@ganymede.sonnet.co.uk>
     68030/50 Amiga 1200      12,40  Richard Jerome <etlrdje@tigger.ericsson.se>
     68030/50 32c             12,42  Michael Plonus <michi@pluto.ping.de>
     68030/50 Amiga 1200      12,33  Detrix <detrix@popd.ix.netcom.com>
     68030/50 Amiga 1200      12,36  E.J.M. Brocklesby <ejb@klamath.demon.co.uk>

     68040/24 Amiga 4000-40   16,60  Hamish Macdonald <hamish@bnr.ca>
     68040/24 Amiga 4000-20   16,60  J.L. Brothers <brothers@halcyon.com>
     68040/25 Amiga 4000-040  16,61  <Geert.Uytterhoeven@cs.ku-leuven.ac.be>
     68040/25 Amiga 4000      16,61  Lawrence <lawrenc@nextwork.rose-hulmand.edu>
     68040/60 Amiga 4000-40   18,99  Darren Enns <dmenns@surf.pangea.ca>
     68040/32 Medusa T40      21,25  <Hartmut.Koptein@et-inf.fho-emden.de>
     68040    Amiga 2000      21,86  Ron Flory <rjflory@feist.com>

     68060/50 Amiga 1200      99,53  baba <baba@pa.yokogawa.jp>
     68060/50 Amiga 4000      99,74  Stefan Tauche <otauche@uni-paderborn.de>
     68060/50 Amiga 4000     100,16  Jan Johansson <jj@mordor.it.kth.se>
     68060/66 Amiga CS MkII  132,71  Paul Hill <paul@lagernet.clara.co.uk>




  99..1111..  AAuuttrreess ssyyssttmmeess :: SSppaarrcc,, PPoowweerrPPCC,, MMIIPPSS,, IInntteell 88008866//88008888





    Systme                 BogoMips  Source
     Sparc Sun4c              17,94  J.L. Brothers <brothers@halcyon.com>
     Sparc SLC/20 S1          19,86  Simon Karpen <slk@linux-shell.net>
     Sparc sun4c/25           24,88  Paolo <paolo0@yahoo.com>
     Sparc IPX 4c             39,83  Paul D. Robertson <proberts@clark.net>
     Sparc SS10 super50 4m    39,93  Juan Cespedes <cespedes@etsit.upm.es>
     Sparc microS/50 SS-LX    49,76  Will Shaw <romulan@netwatch.clemson.edu>
     Sparc SS20               49,86  Gary A. Donahue <lordgad@webspan.net>
     Sparc hyperS Classic 4m  49,86  Juan Cespedes <cespedes@etsit.upm.es>
     Sparc Voyager portable   59,80  Edward Austin <eastin@shl.com>
     Sparc SS5 Netra          68,00  Craig Falconer <cf@papanui.school.nz>
     Sparc SS50               74,95  Kaz <kaz@latte.cafe.net>
     Sparc SS10 hyperS        99,73  Thomas B. Fox <tfox@oliverdesign.com>
     Sparc SS5/66            109,77  Lance S. Nehring <lnehrin@uswest.com>
     Sparc SS4/110           109,77  Chris Sylvain <csylvain@umms-itg.ab.umd.edu>
     Sparc hSparc/150 Sun4m  150,32  Tethys <tethys@ml.com>
     Sparc Ultra1 sun4u      284,05  Iban Cardona <icc@seric.es>

     Sparc UltraII/270       539,03  Pieter Krul <pieter@dare.demon.nl>
     Sparc UltraII/360       719,26  Bjoern Augustsson <d3august@dtek.chalmers.se>

     PowerPC 601/60 Mac6100   45,24  J.L. Brothers <brothers@halcyon.com>
     PowerPC 601/66 Mac       51,62  Fred Klein <klein@des3.u-strasbg.fr>
     PowerPC 601/60 Mac6100   59,38  Kent Radek <goo@itd.sterling.com>
     PowerPC 601/75 Mac7200   73,93  Dimitris Tsifakis <jimmy@typhoeus.dg.uoa.gr>
     PowerPC 601/100 Mac7500  98,91  Russ Hoffman <reh@fore.com>
     PowerPC 601/110 Mac8100 108,00  Charles Eicher <ceicher@inav.net>

     PowerPC 603/100          66,56  A. Costa <c_chaos@chaosnet.wahnapitae.on.ca>

     PowerPC 604/100 PPS6050  99,74  Evaldas Darcianovas <evaldas@isi.kvm.lt>
     PowerPC 604/100         199,00  Hamish Marson <hamish@aixrules.nz.ibm.com>
     PowerPC 604/100 PPS7248 199,48  Evaldas Darcianovas <evaldas@isi.kvm.lt>
     PowerPC 604/132 Mac7500 263,78  Patrick Murmann <murmann@mi.uni-erlangen.de>
     PowerPC 604/133 MOT PS  266,24  Christoper Harrel <cnh@eng.mindspring.net>
     PowerPC 604/150 Mac9500 297,73  Jean-Philippe Lord <jpl@binex.com>
     PowerPC 604/200 Mac8600 320,00  Julien Sebot <sebot@lri.fr>
     PowerPC 604e/195        359,63  Michael Potts <pottsjam@flyernet.udayton.edu>
     PowerPC 604e/200 SM4000 399,12  Roland Kuhn <kuhn@physik.uni-kassel.de>

     PowerPC 750/266 Mac     532,48  Fritz Anderson <fritza@tezcat.com>

     Mips R4000/100           48,30  J.L. Brothers <brothers@halcyon.com>
     Mips R4000/100 Magnum    50,03  Andreas Busse <andy@soft-n-hard.de>
     Mips R4400/134 Acer Pica 67,10  Andreas Busse <andy@soft-n-hard.de>
     Mips R4400/134 Acer Pica 67,10  Ralf Baechle <ralf@waldorf-gmbh.de>
     Mips R4600/133 Tyne     133,12  Ralf Baechle <ralf@waldorf-gmbh.de>
     Mips R4600/133 RM200    133,08  Ralf Baechle <ralf@julia.de>
     Mips R5000/150 Indy     154,83  Ralf Baechle <ralf@julie.de>

     Intel 8088/4,77           0,02  Tim Van der Linden <timvdl@innet.be>
     Intel 8088/10             0,05  Tim Van der Linden <timvdl@innet.be>
     Intel 8086                0,50  Kin Lau <gabe@zot.io.org>
     Intel 286 Tandy           0,75  Joey Hess <joey@kite.ml.org>
     Intel 286                 0,99  Anders Stenback <stenback@hehe.com>
     Intel 286/8 VAXMate       1,03  Andrew Costa <c_chaos@wahnapitae.on.ca>
     Intel 286/10 Commodore    1,30  Hans-Joachim Baader <hans@grumber.inka.de>
     Intel 286 PS2             2,32  Morillas C.H. Antonio <morilla@fie.us.es>
     Intel 286 PS2             2,34  Joey Hess <joey@kite.ml.org>







  99..1122..  SSyyssttmmee mmuullttii--pprroocceesssseeuurrss ccoorrrreecctteemmeenntt ccoonnffiigguurrss


     Systme               BogoMips  Source
     SMP2 Pentium/75          59,50  Michael Engel <engel@unix-ag.uni-siegen.de>
     SMP2 Pentium/90          71,68  Edwin Whitelaw <elw@ivc.com>
     SMP2 Pentium/90          71,98  Daniel Luhde-Thompson <dl10010@cam.ac.uk>
     SMP2 Pentium/90          72,08  Alan Cox <alan@cymru.net>
     SMP2 Pentium/100         79,46  Lam Dang <dangit@ix.netcom.com>
     SMP2 Pentium/100         80,08  Christian Tan <pigeon@xs4all.nl>
     SMP2 Pentium/100         80,08  McNalley <jmcnalle@attila.stevens-tech.edu>
     SMP2 Pentium/120         95.85  Maurice de Bijl <maurice.d.bijl@topic.nl>
     SMP2 Pentium/133        106,09  Maurice de Bijl <maurice.d.bijl@topic.nl>
     SMP2 Pentium/166        133,53  <Reinhard.Simkovics@jk.uni-linz.ac.at>
     SMP2 Pentium/200        158,72  Ed Hoppitt <edward@dcs.rhbnc.ac.uk>

     SMP2 Pentium MMX/200    794,62  Kristian Koehntopp <kris@koehntopp.de>
     SMP2 Pentium MMX/200    796,26  Eric Clark <eclark@opencominc.com>
     SMP2 Pentium MMX/233    927,33  Jeff White <jwhite@ghq.com>

     SMP2 Pentium Pro/150    299,00  Steven Gallo <smgallo@numenor.csgeeks.org>
     SMP2 Pentium Pro/150    299,01  Eric van Dijken <E.vanDijken@PTT-Telecom.nl>
     SMP2 Pentium Pro/166    331,78  Eric van Dijken <E.vanDijken@PTT-Telecom.nl>
     SMP2 Pentium Pro/180    358,81  Eric van Dijken <E.vanDijken@PTT-Telecom.nl>
     SMP2 Pentium Pro/180    358,81  Frankie East <fae2401@rit.edu>
     SMP2 Pentium Pro/180    358,81  James K. Wiggs <wiggs@wolfenet.com>
     SMP2 Pentium Pro/200    396,25  Will Shaw <shaww@dialup.dstm.com>
     SMP2 Pentium Pro/200    398,13  David Konerding <dek@cgl.ucsf.edu>
     SMP2 Pentium Pro/200    398,13  B. Heinen <benedikt.heinen@infrasys.ascom.ch>
     SMP2 Pentium Pro/200    398,13  Ramon Huerta <huerta@minerva.ii.uam.es>
     SMP2 Pentium Pro/200    398,14  C.-A. Possamai <camille@sugiton.cnrs-mrs.fr>
     SMP2 Pentium Pro/200    398,14  Leland <llucius@millcom.com>
     SMP2 Pentium Pro/200    398,14  John Lellis <lellis@dmccorp.com>
     SMP2 Pentium Pro/200    398,14  Jim Gifford <jim@mail.rath.peachnet.edu>
     SMP2 Pentium Pro/200    398,14  Manuel Galan <root@ulpgc.es>
     SMP2 Pentium Pro/200    398,60  Bill Davidsen <davidsen@tmr.com>
     SMP2 Pentium Pro/200    398,95  Fons Rademakers <f.rademakers@cern.ch>
     SMP2 Pentium Pro/200    398,98  Greg Fausak <glfausak@august.com>
     SMP2 Pentium Pro/200    400,18  Attila Karpati <karpati@cs.elte.hu>
     SMP2 Pentium Pro/233    464,49  F. Baitinger <baiti@zenon.toplink.net>
     SMP4 Pentium Pro/133    532,07  Erik Walthinsen <omega@sequent.com>
     SMP4 Pentium Pro/200    794,62  Kenneth Hedlund <c415khd@nll.se>
     SMP4 Pentium Pro/133    532,07  Erik Walthinsen <omega@sequent.com>
     SMP4 Pentium Pro/200    794,62  Kenneth Hedlund <c415khd@nll.se>
     SMP4 Pentium Pro/200    796,28  John Pelan <j.pelan@am.qub.ac.uk>

     SMP2 Pentium II/233     466,94  Eli Kane <eli@crl.nmsu.edu>
     SMP2 Pentium II/266     530,84  Shon Martin <cshoon@oberlin.edu>
     SMP2 Pentium II/266     534,12  n.n. <service@cprompt.sk.ca>
     SMP2 Pentium II/266     534,12  Emmanuel Tychon <manu@acm.org>
     SMP2 Pentium II/274     546,41  Richard Jellinek <rj@suse.de>
     SMP2 Pentium II/300     597,20  Paul Sheer <psheer@obsidian.co.za>
     SMP2 Pentium II/300     598,02  Hans Ameel <hans@pla.to>
     SMP2 Pentium II/300     599,76  S. Curtarolo <auro@spiro.fisica.unpd.it>
     SMP2 Pentium II/333 ov  665,73  S. Curtarolo <auro@spiro.fisica.unpd.it>
     SMP2 Pentium II/400     796,26  Michael Necaise <necaise@jlab.org>

     SMP2 Celeron/450        894,57  Stephan Eisler <stephan@lingo.gun.sub.org>








  99..1133..  SSyyssttmmeess aauuttrreess qquuee LLiinnuuxx ((ppoouurr rrffrreennccee uunniiqquueemmeenntt))

































































     Systme                     OS      BogoMips Source
     Z80 TRS80 model 4           TRSDOS     0,004 <cervasio@airmail.net>
     68000/8 Macintosh Classic   MacOS      0,53  <jimmy@typhoeus.dg.uoa.gr>
     68020/20 Sun 3              SUNOS      2,00  <korpela@ssl.berkeley.edu>
     68020/16 Macintosh LC       MacOS      3,09  <jimmy@typhoeus.dg.uoa.gr>
     68020/25 Sun 3-180          SUNOS      4,00  <korpela@ssl.berkeley.edu>
     Sparc Sun 3-60              SUNOS      4,00  <tranter@software.mitel.com>
     Sparc Sun 3-80              SUNOS      4,00  <tranter@software.mitel.com>
     68030/25 Macintosh IIci     NetBSD     5,62  <kirk-corey@uiowa.edu>
     68040/25 Macintosh LC475    MacOS     12,27  <jimmy@typhoeus.dg.uoa.gr>
     68040/33 HP9000-280         HP-UX     14,00  <niles@axp745.gsfc.nasa.gov>
     68040/25 Apollo 5500        DomainOS  14,00  <kirk-corey@uiowa.edu>
     Sparc Sun 4-280             SUNOS     16,00  <korpela@ssl.berkeley.edu>
     Sparc Sun IPC/40            Solaris   16,00  <gong@cs.msu.su>
     68040/25 HP9000-425         DomainOS  16,00  <kirk-corey@uiowa.edu>
     68040 NextStep              (?)       16,26  <petergun@coffeehaus.com>
     Sparc Sun SS1               SUNOS     18,00  <tranter@software.mitel.com>
     Sparc Sun SS1               SUNOS     18,00  <jimmy@typhoeus.dg.uoa.gr>
     IBM RS6000 320              AIX       18,00  <mg@svtpc3.fb12.tu-berlin.de>
     Sparc Sun SS1+              SUNOS     19,00  <swmike@uplift.df.lth.se>
     Sparc Sun SS1+              SUNOS     24,00  <tranter@software.mitel.com>
     Sparc Sun IPC               SUNOS     24,00  <tranter@software.mitel.com>
     IBM RS6000 320H             AIX       24,00  <mg@svtpc3.fb12.tu-berlin.de>
     Sparc Sun Sparcstation2     SUNOS     26,00  <gong@cs.msu.su>
     SparcClassic/50             Solaris   32,00  <gong@cs.msu.su>
     Sparc Sun ELC               SUNOS     32,00  <tranter@software.mitel.com>
     HP-PA 9000-720              HP-UX     32,00  <metod.kozelj@rzs-hm.si>
     Sparc Sun SS10              SUNOS     34,00  <tranter@software.mitel.com>
     Sparc Sun SS10              SUNOS     34,00  <makler@man.torun.pl>
     Pentium/100                 Win-NT    36,21  <marcus@healthchex.com>
     Sparc Sun Sparcstation2     SUNOS     38,00  <korpela@ssl.berkeley.edu>
     Mips R4000/100 Indy         (?)       48,00  <p.verwer@organon.akzonobel.nl>
     Mips R4000/100 SGI IndySC   Irix      48,00  <lziegler@csbsju.edu>
     HP-PA 9000-720              HP-UX     48,00  <metod.kozelj@rzs-hm.si>
     Sparc SS10                  SUNOS     48,00  <makler@man.torun.pl>
     IBM RS-6000-250/66          AIX       52,00  <gl23@e4.hrz.uni-giessen.de>
     Sparc Sun Sparcstation10d   SUNOS     54,00  <korpela@ssl.berkeley.edu>
     Sparc SS1000 2CPU           SUNOS     58,00  <gong@cs.msu.su>
     Sparc SS20                  SUNOS     60,00  <makler@man.torun.pl>
     IBM RS6000-250/80           AIX       62,00  <gl23@e4.hrz.uni-giessen.de>
     Alpha 21064/133 Decstation  OSF1      64,00  <niles@axp745.gsfc.nasa.gov>
     Alpha 21064/133 Dec3000     OSF1      66,00  <daniels@helplaxp1.harvard.edu>
     Sparc Sun SS5               SUNOS     68,00  <tranter@software.mitel.com>
     Sparc Sun SS20              SUNOS     72,00  <tranter@software.mitel.com>
     Sparc Sun SS20/712          Solaris   74,00  <spohr@qmos.com>
     Mips R4400/150 Challenge    (?)       74,00  <p.verwer@organon.akzonobel.nl>
     Mips R4400/150 Indigo2Extr  (?)       74,00  <p.verwer@organon.akzonobel.nl>
     HP-PA 9000-715              HP-UX     74,00  <metod.kozelj@rzs-hm.si>
     Sparc SS5 sun4m             SUNOS     84,00  <chrisv@allegria.com>
     Sparc SS1000E               SUNOS     84,00  <makler@man.torun.pl>
     Alpha                       OSF1      92,00  <petergun@coffeehaus.com>
     Mips R4400/200 Indigo2Extr  (?)       98,00  <p.verwer@organon.akzonobel.nl>
     HP-PA 9000-735/99           HP-UX     98,00  <lankhors@cs.rug.nl>
     Sparc SS5                   SUNOS    104,00  <makler@man.torun.pl>
     Sparc Sun SS4/110           Solaris  108,00  <spohr@qmos>
     Sparc Sun SS4               Solaris  108,00  <jimmy@typhoeus.dg.uoa.gr>
     Sparc Sun SS4/110           Solaris  108,00  <spohr@qmos>
     Sparc Sun SS4               Solaris  108,00  <jimmy@typhoeus.dg.uoa.gr>
     Sparc Sun SS5               SUNOS    110,00  <swmike@uplift.df.lth.se>
     Alpha 21064A/233            OSF1     114,00  <niles@axp745.gsfc.nasa.gov>
     Alpha 3000 21064/300        OSF1     120,00  <gl23@e4.hrz.uni-giessen.de>
     HP-PA 700/125               HP-UX    122,00  <niles@axp745.gsfc.nasa.gov>
     HP-PA 9000-735/125          HP-UX    122,00  <lankhors@cs.rug.nl>
     Mips R4600/133 SGI Indy     Irix     132,00  <lziegler@csbsju.edu>
     MIPS R5000/150              Irix     148,00  <nachiket@indimax.hydroqual.com>
     IBM 6x86                    OS/2     149,13  <mikedg@ghostbbs.pandora.it>
     Alpha                       OSF1     180,00  <mauger@ensinfo.univ-nantes.fr>
     MIPS R10000/195             Irix     194,00  <nachiket@indimax.hydroqual.com>
     Alpha 21164/333 AS500       OSF1     222,00  <daniels@helplaxp1.harvard.edu>
     Sparc Ultra-1 sun4u         Solaris  254,00  <alternat@rwth-aachen.de>
     PPC604/133 IBM RS6000       AIX      254,00  <kirk-corey@uiowa.edu>
     IBM RS-6000 43P powerpc     AIX      260,00  <gl23@e4.hrz.uni-giessen.de>
     Sparc U-1 sun4u             SunOS    284,00  <gl23@e4.hrz.uni-giessen.de>
     Alpha 21164/433 DPW433au    OSF1     286,00  <daniels@helplaxp1.harvard.edu>
     HP9000-C160/160             HP-UX    316,00  <nicolai@prz.tu-berlin.de>
     Sparc Sun US1/170           Solaris  330,00  <spohr@qmos>
     Sparc Sun US1/167           Solaris  330,00  <jimmy@typhoeus.dg.uoa.gr>
     Sparc Ultra-1 sun4u         SUNOS    334,00  <chrisv@allegria.com>
     Alpha 3000-600S             VMS      348,61  <metod.kozelj@rzs-hm.si>
     Alpha server 1000-4/200     VMS      397,68  <metod.kozelj@rzs-hm.si>
     Sparc Sun-Ultra30/248       Solaris  482,00  <marc.Quinton@stna.dgac.fr>
     Sparc US2/296 2cpu          SUNOS    596,00  <manu@acm.org>
     Cray J90 Y-MP/100 16cpu     Unicos   912,00  <lankhors@cs.rug.nl>
     Sequent Symmetry 6xP5/166   Dynix    984,00  <omega@sequent.com>
     Sequent Symmetry 16xP5/66   Dynix   1056,00  <omega@sequent.com>
     HP9000-C160/160             HP-UX   1278,00  <nicolai@prz.tu-berlin.de>
     Sequent NUMA-Q 12x P6/180   Dynix   1416,00  <omega@sequent.com>
     Sequent NUMA-Q 32x P6/180   Dynix   3776,00  <omega@sequent.com>




  1100..  SSiiggnnaattuurree

  Mon fils Roderick et sa soeur Isolde grandissent. Isolde, 4 ans, va 
  l'cole, et sait dja crire son nom. Son frre Roderick, 2 ans,
  annonce bruyamment qu'il connat galement ses initiales : P de papa,
  R de Roderick!

  Met vriendelijke groeten, Wim van Dorst.

  ------------------------------------------------------------------------
  Wim van Dorst, Clifton Scientific Text Services, tel/fax +31 355 242 319
                     This sentence have three erors




























  Bridging mini HOWTO
  Christopher Cole  <mailto:cole@coledd.com>
  Version franaise : Samuel Tribehou  <mailto:Samuel-
  TRIBEHOU@mail.cpod.fr>
  v1.11, 7 Septembre 1998.

  Ce document dcrit l'installation d'un pont ethernet. Un pont est une
  machine qui contrle des paquets de donnes  l'intrieur d'un sous-
  rseau dans le but de rduire le trafic.  Un pont est gnralement
  pla entre deux groupes diffrents d'ordinateurs qui peuvent communi
  quer entre eux, mais pas avec les ordinateurs de l'autre groupe.  Un
  bon exemple est de considrer un groupe de Macintosh et un autre de
  machines Unix.  Ces groupes de machines tendent  beaucoup communiquer
  entre eux, et le trafic qu'ils produisent sur le rseau engendre des
  collisions pour les autres machines qui tentent de communiquer.  Un
  pont sera pla entre ces groupes d'ordinateurs. Son rle sera alors
  d'examiner la destination des paquets de donnes un par un et de
  dcider de passer ou non les paquets de l'autre ct du segment ether
  net.  Le rsultat est un rseau plus rapide, silencieux, et engen
  drant moins de collisions.
  ______________________________________________________________________

  Table des matires


  1. Installation

  2. Questions frquemment poses.



  ______________________________________________________________________

  11..  IInnssttaallllaattiioonn


    Se procurer Bridge Config :
     <ftp://shadow.cabi.net/pub/Linux/BRCFG.tgz>


    Authoriser de multiples interfaces ethernet sur la machine en
     ajoutant ceci  votre /etc/lilo.conf, et en relanant lilo :


       append = "ether=0,0,eth1"




  Si vous avez trois interfaces sur votre pont, utilisez cette ligne 
  la place :



       append = "ether=0,0,eth1 ether=0,0,eth2"





  D'autres interfaces pourront tre trouves en rajoutant plus de dcla
  rations ether. Par dfaut le noyau ne cherche  dtecter qu'une seule
  carte ethernet, et ds qu'il en a trouv une la dtection cesse.  La
  dclaration append ci-dessus indique au noyau de continuer  chercher
  d'autres cartes ethernet une fois la premire trouve.  Alternative
  ment, les paramtres de boot peuvent tre utiliss  la place :
       linux ether=0,0,eth1





  ou, avec 3 interfaces, utilisez :



       linux ether=0,0,eth1 ether=0,0,eth2





    Recompilez le noyau en rajoutant l'option BRIDGING.


    Un pont ne devrait pas avoir d'adresse IP. Il PEUT, mais un
     vritable pont n'en a pas besoin. Pour enlever l'adresse IP de
     votre pont, allez dans /etc/sysconfig/network-scripts/ (pour une
     RedHat) et copiez ifcfg-lo0 dans ifcfg-eth0 et ifcfg-eth1. Dans ces
     deux fichiers, changez la ligne contenant DEVICE=lo en
     device=eth0 et DEVICE=eth1. Les autres distributions peuvent
     driver sur ce point. Faites ce que vous devez faire ! S'il y a
     plus de 2 interfaces sur ce pont, soyez sr de faire les
     configurations correspondantes pour les autres aussi.


    Rebootez, de faon  utiliser le nouveau noyau avec l'option
     bridging, et pour tre sr que des adresses IP ne sont pas
     attaches aux interfaces reseau.


    Une fois que le systme est prt, mettez les cartes ethernet en
     mode promiscuous, de faon  ce qu'elles regardent chaque paquet
     qui passe par leur interface :


       ifconfig eth0 promisc; ifconfig eth1 promisc




  Toutes les interfaces qui sont connectes aux segments rseau  relier
  doivent tre mises en promiscuous mode.


    Mettez le pont en route en utilisant le programme brcfg :


       brcfg -ena





    Vrifiez qu'il y a un trafic diffrent pour chaque interface :


       tcpdump -i eth0 (dans une fentre).
       tcpdump -i eth1 (dans une autre fentre).



    Lancez un sniffer ou tcpdump sur une autre machine pour vrifier
     que le pont spare les segments correctement.


  22..  QQuueessttiioonnss ffrrqquueemmmmeenntt ppoosseess..


    QQ ::
      _J_'_a_i _l_e _m_e_s_s_a_g_e _: ioctl(SIOCGIFBR) failed~: Package not installed.
     Qu'est-ce que a veut dire ?
     RR ::  Le support du pontage n'est pas intgr dans votre noyau.
     Utilisez un noyau 2.0 ou suprieur, et recompilez-le avec l'option
     BRIDGING.

    QQ :: _L_e_s _m_a_c_h_i_n_e_s _q_u_i _s_o_n_t _d_'_u_n _c__t_ _d_u _p_o_n_t _n_e _p_e_u_v_e_n_t _p_a_s __p_i_n_g_e_r_
     _l_e_s _a_u_t_r_e_s _!
     RR ::

     1. Avez vous activ le pontage en utilisant brcfg -ena ?  (brcfg
        devrait rpondre bridging is ENABLED )

     2. Avez vous mis l'interface en promiscuous mode ? (Tapez la
        commande ifconfig. Le drapeau (flag) devrait tre mis sur les
        deux interfaces.)

     3. Si vous utilisez des cartes pouvant grer plusieurs sortes
        d'interface, vrifiez que c'est la bonne qui est utilise. Il se
        peut que vous ayez besoin d'utiliser le programme de
        configuration qui est livr avec votre carte rseau.


    QQ :: _J_e _n_e _p_e_u_x _p_a_s _u_t_i_l_i_s_e_r _t_e_l_n_e_t _o_u _f_t_p _d_e_p_u_i_s _l_e _p_o_n_t _!
     _p_o_u_r_q_u_o_i _?
     RR :: C'est parce que le pont n'a d'adresse IP pour aucune de ses
     interfaces. Un pont doit tre une partie transparente d'un rseau.

    QQ :: _Q_u_e _d_o_i_s_-_j_e _c_o_n_f_i_g_u_r_e_r _p_o_u_r _q_u_e _l_e _r_o_u_t_a_g_e _s_e _f_a_s_s_e _b_i_e_n _?
     RR :: Rien ! Tout le mchanisme de routage est dlgu au code de
     pontage du noyau. Pour voir les adresses ethernet telles qu'elles
     sont comprises par le noyau, utilisez le programme brcfg en mode
     debug : bbrrccffgg --ddeebb

    QQ :: _L_e _p_o_n_t _s_e_m_b_l_e _m_a_r_c_h_e_r_, _m_a_i_s _p_o_u_r_q_u_o_i traceroute ne montre pas
     le pont comme faisant partie du chemin ?
     RR ::  cause de la nature d'un pont, traceroute ne devrait PAS
     montrer le pont comme faisant partie du chemin. Un pont doit tre
     transparent pour le reste du rseau.

    QQ :: _E_s_t_-_i_l _n__c_e_s_s_a_i_r_e _d_e _c_o_m_p_i_l_e_r _l_e _n_o_y_a_u _a_v_e_c _l_'_o_p_t_i_o_n
     IP_FORWARD ?
     RR :: Non. Le code de pontage dans le noyau se charge du transport
     des paquets. IP_FORWARD sert pour une passerelle qui a des adresses
     IP associes  ses interfaces.

    QQ :: _P_o_u_r_q_u_o_i _e_s_t_-_c_e _q_u_e _l_e_s _a_d_r_e_s_s_e_s _e_t_h_e_r_n_e_t _p_h_y_s_i_q_u_e_s _p_o_u_r _l_e
     _p_o_r_t _1 _e_t _2 _s_o_n_t _l_e_s _m__m_e_s _s_e_l_o_n brcfg ? Ne devraient-elles pas
     tre diffrentes ?
     RR :: Non. Chaque port sur un pont est intentionellement assign  la
     mme adresse ethernet physique par le code de pontage.

    QQ :: _B_r_i_d_g_i_n_g _n_'_a_p_p_a_r_a_i_t _p_a_s _d_a_n_s _l_e_s _o_p_t_i_o_n_s _l_o_r_s_q_u_e _j_e _f_a_i_s _u_n_/
     make config sur les sources du noyau. Comment faire pour pouvoir le
     slectionner ?
     RR :: Pendant la configuration du noyau, rpondez Y  la
     questionPrompt for development and/or incomplete code/drivers
     (CONFIG_EXPERIMENTAL) Y/n/?.
    QQ :: _T_r_o_p _d_e _h_u_b_s _(_4 _o_u _p_l_u_s_) _c_h_a__n__s _l_'_u_n _a_p_r__s _l_'_a_u_t_r_e _(_e_n _s__r_i_e_)
     _p_o_s_e_n_t _d_e_s _p_r_o_b_l__m_e_s _d_e _t_i_m_i_n_g _s_u_r _u_n _e_t_h_e_r_n_e_t_. _Q_u_e_l _e_f_f_e_t _a _u_n
     _p_o_n_t _d_a_n_s _u_n _s_o_u_s_-_r__s_e_a_u _a_c_c__d_ _p_a_r _d_e_s _h_u_b_s _?
     RR :: Un pont annule la rgle des 3/4/5 hubs. Un pont ne gre pas les
     paquets de la mme faon qu'un hub, et ne contribue donc pas aux
     problmes de timing dasns un rseau.

    QQ :: _E_s_t_-_c_e _q_u_'_u_n _p_o_n_t _p_e_u_t __t_r_e _i_n_t_e_r_f_a__ _a_v_e_c _d_e_s _s_e_g_m_e_n_t_s
     _e_t_h_e_r_n_e_t _d_'_u_n _c__t_ _d_e _1_0_M_b _e_t _d_e _l_'_a_u_t_r_e _d_e _1_0_0_M_b _?
     RR :: Oui, un pont peut joindre entre eux un segment de 10Mb avec un
     autre de 100Mb. Du moment que la carte rseau du ct rapide du
     rseau est une 100Mb, TCP prendra en charge le reste. Bien qu'il
     soit vrai que les paquets d'un hte dans le rseau  100Mb
     communiquant avec un autre du rseau  10Mb se dplaceront 
     seulement 10Mb/s, le reste du trafic sur l'ethernet rapide n'est
     pas ralenti.


















































  Linux Bridge+Firewall Mini-HOWTO version 1.2.0
  Peter Breuer (ptb@it.uc3m.es)
  Adaptation francaise par Etienne BERNARD (eb@via.ecp.fr)
  19 Decembre 1997

  11..  IInnttrroodduuccttiioonn

  Vous      devriez      lire     l'original     Bridging     mini-HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Bridge> (NdT : ou  en
  version                                                      francaise
  <ftp://ftp.lip6.fr/pub/linux/french/docs/mini/Bridge>) par Chris  Cole
  pour une vision differente sur le sujet. L'adresse email de Chris Cole
  est chris@polymer.uakron.edu. La version de cet HOWTO, a partir duquel
  ce document est construit est la version 1.03, date du 23 aout 1996.

  22..  QQuuooii,, eett ppoouurrqquuooii ((eett ccoommmmeenntt ??))

  22..11..  QQuuooii

  Un  pont  est  un element qui connecte intelligement des brins grace a
  deux cartes ethernet.  Un _f_i_r_e_w_a_l_l est un element isolant intelligent.

  22..22..  PPoouurrqquuooii

  Si  vous avez de nombreux ordinateur, vous pouvez desirer installer un
  pont :

  1. pour economiser le prix d'un nouveau _h_u_b lorsqu'il  se  trouve  que
     vous avez une carte ethernet libre ;

  2. pour  eviter  d'avoir a apprendre l'_I_P_-_f_o_r_w_a_r_d_i_n_g et d'autres trucs
     alors que vous _a_v_e_z deux cartes dans votre ordinateur ;

  3. pour eviter des travaux de maintenance pour d'eventuels changements
     futurs !

  Le  terme  ``nombreux  ordinateurs''  peut  meme representer seulement
  trois ordinateurs, si ceux-ci font du routage ou du pontage ou  qu'ils
  changent  de  place dans la piece de temps en temps ! Vous pouvez meme
  vouloir un pont pour vous amuser  a  trouver  a  quoi  cela  sert.  Je
  voulais un pont pour la raison ``2''.

  Si  vous  etes  interesse par le point ``1'', vous etes peu dans votre
  cas.                Lisez                le                NET-2-HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/NET-2-HOWTO> et le Serial-
  HOWTO  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/Serial-HOWTO>  pour
  de meilleurs astuces.

  Vous desirez un _f_i_r_e_w_a_l_l si :

  1. vous essayez de proteger votre reseau des acces exterieur, ou

  2. vous  desirez  interdire l'acces au monde exterieur aux machines de
     votre reseau.

  Bizarrement, j'avais besoin du point ``2'' ici aussi. La politique  de
  mon  universite  pour  le  moment  est  de  ne  pas  jouer  le role de
  fournisseur d'acces a Internet pour les _u_n_d_e_r_g_r_a_d_u_a_t_e_s.

  22..33..  CCoommmmeenntt

  J'ai commence par du pontage entre deux cartes reseau sur une  machine
  jouant  le  role de _f_i_r_e_w_a_l_l, et j'ai fini par lancer le _f_i_r_e_w_a_l_l sans
  avoir coupe le pont. Cela a l'air de fonctionner,  et  c'est  beaucoup
  plus  flexible  que  chaque  configuration  isolee. Je peux arreter le
  _f_i_r_e_w_a_l_l et continuer a faire fonctionner le pont ou arreter  le  pont
  lorsque je veux etre plus prudent.

  Je  suppose  que la partie ``pont'' du noyau se trouve juste au-dessus
  de la couche physique et que la partie _f_i_r_e_w_a_l_l  se  trouve  dans  une
  couche  reseau  superieure,  afin  que  les  parties  de pontage et de
  _f_i_r_e_w_a_l_l_i_n_g agissent en fait comme  si  elles  etaient  connectees  en
  ``serie''  et  non  pas  en  ``parallele''  (aie  !),  selon le schema
  suivant :

       -> Pont-entrant -> Firewall-entrant -> Noyau -> Firewall-sortant -> Pont-sortant ->

  Il n'y a pas d'autre facon d'expliquer comment une machine  peut  etre
  en  meme  temps  ``conducteur''  et  ``isolant''.  Il  existe quelques
  embuches, mais j'en parlerai plus tard.  Schematiquement,  vous  devez
  router  les  paquets  que vous  voulez filtrer. De toute facon, cela a
  l'air de fonctionner parfaitement pour moi, et voici comment...

  33..  PPOONNTT

  33..11..  LLooggiicciieell

  Recuperez     l'utilitaire     de      configuration      du      pont
  <ftp://shadow.cabi.net/pub/Linux/BRCFG.tgz> depuis la page personnelle
  d'Alan Cox. C'est la meme reference que dans le document de Chris.  Je
  n'ai pas compris que c'etait un URL _f_t_p en non un URL _h_t_t_p...

  33..22..  LLeeccttuurree pprreelliimmiinnaaiirreess

  Lisez           le           Multiple          Ethernet          HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Multiple-Ethernet>
  pour  obtenir  des  conseils pour faire reconnaitre et pour configurer
  plus d'une carte reseau.

  Vous pourrez trouver encore plus de details sur le type  de  commandes
  magiques  a  passer  au  _p_r_o_m_p_t  se trouvent dans le Boot Prompt HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/BootPrompt-HOWTO>.

  Pour    completer    vos    lectures,    lisez    le    NET-2    HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/NET-2-HOWTO>.   C'est   un
  document plutot long, et vous devrez y piocher les  details  qui  vous
  interessent.

  33..33..  CCoonnffiigguurraattiioonn ddee llaanncceemmeenntt

  Les  lectures  precedentes vont vous indiquer ce dont vous avez besoin
  pour preparer le noyau a reconnaitre un deuxieme peripherique ethernet
  lors  du  demarrage,  en ajoutant la ligne suivante dans votre fichier
  /etc/lilo.conf, et en relancant lilo :

       append = 'ether=0,0,eth1'

  Notez le 'eth1'. 'eth0' represente la premiere carte.  'eth1'  est  la
  seconde  carte.  Vous  pouvez  egalement  ajouter  les  parametres  de
  demarrage a la ligne de commande  que  lilo  vous  offre.  Pour  trois
  cartes :

       linux ether=0,0,eth1 ether=0,0,eth2

  J'utilise loadlin pour lancer mon noyau Linux depuis DOS :

       loadlin.exe c:\vmlinuz root=/dev/hda3 ro ether=0,0,eth1 ether=0,0,eth2

  Notez  que  cette  astuce  oblige  le  noyau  a detecter les cartes au
  demarrage. La  detection  ne  sera  pas  faite  si  vous  chargez  les
  gestionnaires  de  peripherique  ethernet  en  mmoodduullee  (par  securite,
  puisque l'ordre de detection ne peut etre  determine),  donc  si  vous
  utilisez  des  modules,  vous  aurez  a ajouter l'IRQ appropriee et le
  parametre de port pour le  gestionnaire  de  peripherique  dans  votre
  fichier /etc/conf.modules. Dans mon cas, j'ai les lignes :

       alias eth0 3c509
       alias eth1 de620
       options 3c509 irq=5 io=0x210
       options de620 irq=7 bnc=1

  Vous  pouvez  savoir  si  vous  utilisez les modules en utilisant ``ps
  -aux'' pour voir si kerneld est lance, et en verifiant qu'il y  a  des
  fichiers  .o  dans  un  sous-repertoire  du  repertoire  /lib/modules.
  Utilisez le nom de repertoire que vous donne la commande uname -r.  Si
  vous  avez  un  kerneld lance et/ou vous avez un fichier foo.o, editez
  /etc/conf.modules et lisez avec soin la page de manuel de depmod.

  Notez egalement que jusque recemment (noyau 2.0.25), le _d_r_i_v_e_r pour la
  carte  33cc550099  ne  pouvait  pas etre utilise pour plus d'une carte s'il
  etait utilise en module. J'ai vu un _p_a_t_c_h quelque part  pour  corriger
  cette  limitation.  Il  devrait etre inclus dans le noyau a l'heure ou
  vous lisez ces lignes.

  33..44..  CCoonnffiigguurraattiioonn dduu nnooyyaauu

  Recompilez le noyau avec le _b_r_i_d_g_i_n_g :

       CONFIG_BRIDGE=y

  J'ai egalement compile mon noyau avec le _f_i_r_e_w_a_l_l_i_n_g,  l'_I_P_-_f_o_r_w_a_r_d_i_n_g
  et  l'_I_P_-_m_a_s_q_u_e_r_a_d_i_n_g.  C'est  seulement  si  vous desirez utiliser le
  _f_i_r_e_w_a_l_l_i_n_g egalement...

       CONFIG_FIREWALL=y
       CONFIG_NET_ALIAS=y
       CONFIG_INET=y
       CONFIG_IP_FORWARD=y
       CONFIG_IP_MULTICAST=y
       CONFIG_IP_FIREWALL=y
       CONFIG_IP_FIREWALL_VERBOSE=y
       CONFIG_IP_MASQUERADE=y

  Vous aurez besoin en plus de la configuration reseau standard :

       CONFIG_NET=y

  et je ne pense pas que vous deviez vous preocupper des autres  options
  reseau.  Les  options  que  je  n'ai  pas  compile  dans le noyau sont
  selectionnees en tant que modules  afin  que  je  puisse  les  ajouter
  eventuellement plus tard.

  Installez le nouveau noyau, relancez lilo et redemarrez sur le nouveau
  noyau. Rien ne devrait avoir change pour l'instant !

  33..55..  AAddrreesssseess rreesseeaauu

  Chris dit qu'un pont ne doit pas avoir d'adresse IP mais ce n'est  pas
  la configuration qui est presente ici.

  Vous allez utiliser la machine pour vous connecter au reseau donc vous
  avez besoin d'une adresse et vous devez vous  assurer  que  le  device
  _l_o_o_p_b_a_c_k   configure   normalement   afin  que  vos  logiciels  puisse
  communiquer avec ce a quoi ils s'attendent. Si _l_o_o_p_b_a_c_k est desactive,
  le _r_e_s_o_l_v_e_u_r _d_e _n_o_m_s ou d'autres services ne fonctionneront pas. Voyez
  le NET-2-HOWTO, mais votre configuration standard devrait  deja  avoir
  fait cela :

       ifconfig lo 127.0.0.1
       route add -net 127.0.0.0

  Vous allez devoir donner des adresses a vos cartes reseau. J'ai change
  le fichier /etc/rc.d/rc.inet1 de ma slackware  (3.x)  pour  configurer
  deux   cartes   et   vous  devrez  juste  regarder  votre  fichier  de
  configuration du reseau et doubler ou tripler le nombre d'instructions
  s'y trouvant. Supposons que vous ayez deja une adresse a

       192.168.2.100

  (cette  adresse  fait  partie  des adresses reservees pour des reseaux
  prives, mais ne faites pas attention, cela ne  cassera  rien  si  vous
  utilisez  cette  adresse  par erreur) alors vous avez probablement une
  ligne ressemblant a

       ifconfig eth0 192.168.2.100 netmask 255.255.255.0 metric 1

  dans votre fichier de configuration. La premiere chose que vous  allez
  probablement  vouloir faire est couper l'espace des adresses atteintes
  par cette carte en deux afin de pouvoir eventuellement faire  un  pont
  ou  filtrer  entre les deux moities. Ajoutez donc une ligne qui reduit
  le masque de  sous-reseau  pour  adresser  un  plus  petit  nombre  de
  machines :

       ifconfig eth0 netmask 255.255.255.128

  Essayez  cette  configuration.  Cela restreint la carte a l'espace des
  adresses entre .0 et .127.

  A present,  vous  pouvez  configurer  votre  deuxieme  carte  dans  la
  deuxieme  moitie  de  l'espace  des adresses locales. Assurez vous que
  personne n'utilise l'adresse que vous allez prendre. Pour des  raisons
  de  symetrie,  j'utiliserai  ici 228=128+100. N'importe quelle adresse
  conviendra, a condition qu'elle ne se trouve pas  dans  le  masque  de
  l'autre  carte.  Evitez  les  adresses  speciales  comme .0, .1, .128,
  etc... a moins que vous sachiez ce que vous faites.

       ifconfig eth1 192.168.2.228 netmask 255.255.255.128 metric 1

  Cela restreint la deuxieme carte aux adresses entre .128 et .255.

  33..66..  RRoouuttaaggee rreesseeaauu

  C'est ici que les defauts de l'utilisation simultannee du pont  et  du
  firewall  :  vous  ne  pouvez  pas filtrer des paquets qui ne sont pas
  routes. Pas de route, pas de firewall. Cette  regle  est  verifiee  en
  tout cas dans les version 2.0.30 ou suivantes du noyau. Les filtres du
  firewall sont etroitement lies au code source de l'IP-Forwarding.

  Cela ne signifie pas que vous ne pouvez pas  utiliser  le  pont.  Vous
  pouvez  installer  un pont entre deux cartes et filtrer a partir d'une
  troisieme. Vous pouvez n'avoir que deux cartes et  les  faire  filtrer
  une  adresse  IP externe, comme celle d'un routeur proche, a condition
  que le routeur relie a une seule carte.

  En  d'autres  termes,  puisque  je  veux  utiliser  la  machine  comme
  firewall,  je dois controler avec precision la destination physique de
  certains paquets.

  J'ai le petit reseau de machines  sur  un  _h_u_b  connecte  a  eth0,  je
  configure donc un reseau de ce cote :

       route add -net 192.168.2.128 netmask 255.255.255.128 dev eth0

  Remplacez  le  128 par un 0 pour un reseau de classe C entier. Ici, je
  ne le fais pas puisque j'ai juste divise en deux l'espace d'adressage.
  Le  'dev eth0' n'est pas necessaire ici, puisque l'adresse de la carte
  fait partie de ce reseau, mais il peut  etre  necessaire  de  l'ecrire
  chez vous. On pourrait desirer plus d'une carte prenant ce sous reseau
  en charge (127 machines sur un  segment,  bravo  !)  mais  ces  cartes
  utiliseraient  le  meme  masque de sous-reseau et seraient considerees
  comme une seule par la partie routage du noyau.

  Sur l'autre carte, j'ai une ligne qui passe directement a  travers  un
  gros routeur, auquel je fais confiance.

                                               client 129
           __                                        |    __
  client 1   \    .0                    .128         |   /   net 1
  client 2 --- Hub - eth0 - Kernel - eth1 - Hub - Router --- net 2
  client 3 __/       .100            .228         .2 |   \__ net 3
                                                     |
                                               client 254

  J'utilise  une  route  fixe  (c'est-a-dire 'statique') depuis la carte
  vers ce routeur, puisque sinon il ferait partie  du  masque  de  sous-
  reseau  de  la premiere carte et le noyau se tromperait sur la maniere
  d'envoyer les paquets au routeur. Je veux filtrer ces paquets et c'est
  une raison de plus de les router explicitement.

       route add 192.168.2.2 dev eth1

  Je  n'en  ai  pas  besoin,  puisque je n'ai pas d'autres machines dans
  cette moitie de l'espace d'adressage, mais je declare un reseau sur la
  seconde  carte. La separation de mes interfaces reseau en deux groupes
  grace au routage me permettra eventuellement de faire du filtrage tres
  precis,  mais vous pouvez tres bien vous en sortir avec beaucoup moins
  de routage que cela.

       route add -net 192.168.2.128 netmask 255.255.255.128 dev eth1

  J'ai egalement besoin d'envoyez tous les paquets non-locaux  au  monde
  et je dis donc au noyau de les envoyer au gros routeur :

       route add default gw 192.168.2.2

  33..77..  ccoonnffiigguurraattiioonn ddee llaa ccaarrttee

  Nous avions auparavant une configuration standard pour le reseau, mais
  comme nous faisons du _b_r_i_d_g_i_n_g, nous devons ecouter sur  chaque  carte
  les  paquets  qui  ne  nous sont pas destines. Ceci doit aller dans le
  fichier de configuration reseau :

       ifconfig promisc eth0
       ifconfig promisc eth1

  La page de manuel indique d'utiliser allmulti=promisc,  mais  cela  ne
  fonctionnait pas pour moi.

  33..88..  RRoouuttaaggee aaddddiittiioonnnneell

  J'ai remarque une chose : j'ai du passer la seconde carte dans un mode
  lui permettant aux questions du gros routeur a propos des machines que
  je cache sur mon reseau local.

       ifconfig arp eth1

  Pour  faire  bonne  mesure, j'ai effectue cette operation pour l'autre
  carte aussi.

       ifconfig arp eth0

  33..99..  CCoonnffiigguurraattiioonn dduu ppoonntt

  Ajoutez la mise en route du pont dans votre fichier de configuration :

       brcfg -enable

  La  configuration  du pont mettra en route certains ports. Vous pouvez
  experimenter l'allumage et l'extinction des ports un a la fois :

       brcfg -port 0 -disable/-enable
       brcfg -port 1 -disable/-enable

  Vous pouvez obtenir un rapport sur l'etat courant avec :

       brcfg

  sans aucun parametres. Vous pourrez voir que le pont ecoute,  apprend,
  et  effectue  le  _f_o_r_w_a_r_d_i_n_g.  (Je  ne  comprends pas pourquoi le code
  repete la meme adresse materielle  pour  mes  deux  cartes,  mais  peu
  importe... le HOWTO de Chris affirme que c'est correct).

  33..1100..  EEssssaaiiss

  Si  le  reseau  est  encore  en  fonction,  essayez  votre  script  de
  configuration en vrai en arretant les deux cartes et en l'executant :

       ifconfig eth0 down
       ifconfig eth1 down
       /etc/rc.d/rc.inet1

  Avec un peu de chance, les divers systemes tel nnffss, yyppbbiinndd, etc...  ne
  s'en  rendront  pas  compte.  _N_'_e_s_s_a_y_e_z  _p_a_s  _c_e_c_i  _s_i _v_o_u_s _n_'_e_t_e_s _p_a_s
  _d_e_r_r_i_e_r_e _l_e _c_l_a_v_i_e_r _!

  Si vous desirez etre plus prudent que cela,  vous  devrez  arreter  le
  plus  de  demons  possible,  et  demonter les repertoires NFS. Le pire
  qu'il puisse vous arriver est d'avoir a rebooter en  mode  _s_i_n_g_l_e_-_u_s_e_r
  (le  parametre  'ssiinnggllee'  de  lilo  ou  loadlin),  et de restaurer les
  fichiers a leur valeur d'avant les modifications.

  33..1111..  VVeerriiffiiccaattiioonnss

  Verifiez qu'il existe un trafic different sur chaque interface :

       tcpdump -i eth0

       tcpdump -i eth1

  Vous devriez etre habitue a l'utilisation de ttccppdduummpp pour trouver  des
  evenements  qui  ne  devraient  pas se passer, ou qui existent mais ne
  devraient pas.

  Par exemple, recherchez les paquets qui ont traverse le pont  vers  la
  seconde  carte  depuis  le reseau interne. Ici, je cherche les paquets
  venant de la machine avec l'adresse .22 :

       tcpdump -i eth1 -e host 192.168.2.22

  A present, envoyez un ping depuis l'hote en .22 vers le routeur.  Vous
  devriez voir le paquet affiche par tcpdump.

  A  present,  vous devriez avoir un pont, et qui possede egalement deux
  adresses  reseau.  Verifiez  que  vous  pouvez   les   pinger   depuis
  l'exterieur  de  votre  reseau  local  et depuis l'interieur, que vous
  pouvez utiliser telnet et ftp depuis et vers l'interieur du reseau.

  44..  FFIIRREEWWAALLLLIINNGG

  44..11..  LLooggiicciieell eett lleeccttuurreess

  Vous         devriez          lire          le          Firewall-HOWTO
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/Firewall-HOWTO>.

  Il  vous indiquera ou trouver ipfwadm si vous ne l'avez pas deja. Vous
  pouvez egalement recuperer d'autres outils, mais seulement ipfwadm m'a
  ete  utile.  C'est  pratique  et  de  bas  niveau  !  Vous pouvez voir
  exactement ce qu'il fait.

  44..22..  VVeerriiffiiccaattiioonnss pprreelliimmiinnaaiirreess

  Vous avez compile l'IP-forwarding et le masquerading dans le noyau, et
  vous  allez  verifier que le _f_i_r_e_w_a_l_l est dans son etat par defaut (il
  accepte) grace a :

       ipfwadm -I -l
       ipfwadm -O -l
       ipfwadm -F -l

  Ce  qui,  dans  l'ordre,  'affiche  les  regles  affectant  la  partie
  ..'entrante  ou  sortante  ou  qui  fait  suivre (_m_a_s_q_u_e_r_a_d_i_n_g) '.. du
  _f_i_r_e_w_a_l_l'. L'option '-l' signifie 'lister'.

  Si vous avez compile l'IP accounting egalement :

       ipfwadm -A -l

  Vous devriez constater qu'aucune regle n'est definir et  que  l'action
  par  defaut  est  d'accepter tous les paquets. Vous pouvez retourner a
  cet etat a tout moment, avec :

       ipfwadm -I -f
       ipfwadm -O -f
       ipfwadm -F -f

  L'option '-f' signifie 'flush' (en francais, 'vider').  Vous  pourriez
  en avoir besoin.

  44..33..  RReeggllee ppaarr ddeeffaauutt

  Je  veux  interdire l'acces au monde entier depuis mon reseau interne,
  et rien d'autre, donc je vais donner comme derniere regle (comme regle
  par defaut) une regle indiquant d'ignorer les paquets venant du reseau
  interne et diriges vers l'exterieur. Je place toutes les regles  (dans
  cet  ordre) dans le fichier /etc/rc.d/rc.firewall que j'execute depuis
  /etc/rc.d/rc.local au demarrage.

       ipfwadm -I -a reject -S 192.168.2.0/255.255.255.128 -D 0.0.0.0/0.0.0.0

  Le '-S' represente l'adresse source/masque  de  sous-reseau.  L'option
  '-D' est pour l'adresse destination/masque de sous-reseau.

  Ce  format  n'a  plus  le  vent  en  poupe. ipfwadm est intelligent et
  connait des abreviations courantes. Verifier les pages de manuel.

  Il peut etre plus pratique de placer certaines ou  toutes  les  regles
  sur  la  partie  sortante du firewall en utilise '-O' au lieu de '-I',
  mais je supposerai que les regles sont concues pour etre utilisees sur
  la moitie entrante.

  44..44..  AAcccceess ppaarr aaddrreessssee

  Avant  la  regle  par  defaut,  je  dois placer des regles qui servent
  d'exceptions pour cette interdiction generale des services  exterieurs
  aux clients interieurs.

  Je  veux  traiter  les  adresses  des machines derriere le firewall de
  maniere speciale. Je veux empecher  aux  gens  de  se  loguer  sur  la
  machine  qui  sert  de  firewall a moins qu'elles aient une permission
  speciale, mais une fois connectees, elles devraient etre  capables  de
  parler au monde exterieur.

       ipfwadm -I -i accept -S 192.168.2.100/255.255.255.255 \
        -D 0.0.0.0/0.0.0.0

  Je veux egalement que les clients internes soient capables de parler a
  la machine faisant _f_i_r_e_w_a_l_l. Peut-etre pourront-elles la persuader  de
  les laisser sortir !

  ipfwadm -I -i accept -S 192.168.2.0/255.255.255.128 \
   -D 192.168.2.100/255.255.255.255

  Verifiez  que  vous  pouvez  joindre  les  machines  a  l'interieur du
  firewall depuis l'exterieur par telnet, mais que vous  ne  pouvez  pas
  sortir.  Vous pouvez faire le premier pas, mais les clients ne peuvent
  pas vous envoyer de messages. Essayez egalement rlogin  et  ping  avec
  tcpdump  lance  sur une carte ou l'autre. Vous devriez etre capable de
  comprendre ce que vous lirez.

  44..55..  AAcccceess ppaarr pprroottooccoollee

  J'assouplis les regles protocole par protocole. Je veux que les  pings
  depuis  l'exterieur  vers  l'interieur  obtiennent  une  reponse,  par
  exemple, donc j'ai ajoute la regle :

       ipfwadm -I -i accept -P icmp -S 192.168.2.0/255.255.255.128 \
        -D 0.0.0.0/0.0.0.0

  L'option '-P icmp' correspond au protocole tout entier.

  Avant que j'installe un _p_r_o_x_y _f_t_p, j'autorise egalement les appels ftp
  sortants  en  relachant  les restrictions sur un port donne. Ceci vise
  les ports 20, 21 et 115 sur les machines externes :

       ipfwadm -I -i accept -P tcp -S 192.168.2.0/255.255.255.128 \
        -D 0.0.0.0/0.0.0.0 20 21 115

  Je n'ai pas pu faire fonctionner sendmail  entre  les  clients  locaux
  sans   serveur  de  noms.  Au  lieu  d'installer  un  serveur  de  nom
  directement sur le _f_i_r_e_w_a_l_l, j'ai juste autorise les requetes  TCP  de
  resolution  de nom visant le plus proche serveur de nom, et j'ai place
  son adresse dans le fichier /etc/resolv.conf des clients. ('nameserver
  123.456.789.31' sur une ligne separee).

       ipfwadm -I -i accept -P tcp -S 192.168.2.0/255.255.255.128 \
        -D 123.456.789.31/255.255.255.255 54

  Vous  pouvez  trouver  quel  numero  de  port et protocole requiert un
  service grace a tcpdump. Utilisez ce service avec un ftp ou un  telnet
  ou  autre  vers  ou depuis une machine interne, et observez-le sur les
  ports d'entree et de sortie du _f_i_r_e_w_a_l_l avec tcpdump :
       tcpdump -i eth1 -e host client04

  par exemple. Le  fichier  /etc/services/  est  une  importante  source
  d'indices. Pour laisser ENTRER le telnet et le ftp depuis l'exterieur,
  vous devez autoriser un  client  local  a  envoyer  des  donnees  vers
  l'exterieur  sur  un  port  donne.  Je  comprends  pourquoi  ceci  est
  necessaire pour le ftp (c'est le serveur qui etablit la  connexion  de
  donnees), mais je me demande pourquoi telnet en a egalement besoin.

       ipfwadm -I -i accept -P tcp -S 192.168.2.0/255.255.255.128 ftp telnet \
        -D 0.0.0.0/0.0.0.0

  Il  existe  un probleme particulier avec certains demons qui cherchent
  le nom d'hote de la machine _f_i_r_e_w_a_l_l afin de decider quelle  est  leur
  adresse  reseau.  J'ai eu des problemes avec rpc.yppasswdd. Il insiste
  sur des informations _b_r_o_a_d_c_a_s_t qui indiquent qu'il se trouve en dehors
  du  _f_i_r_e_w_a_l_l  (sur  la seconde carte). Cela signifie que les clients a
  l'interieur ne peuvent pas le contacter.

  Au lieu de lancer l'IP aliasing ou de changer le code source du demon,
  j'ai  traduit  le nom vers l'adresse de la carte du cote interieur sur
  les clients, dans leur fichier /etc/hosts.

  44..66..  VVeerriiffiiccaattiioonnss

  Vous voudrez tester que vous pouvez toujours utiliser  telnet,  rlogin
  et  ping  depuis  l'exterieur.  Depuis  l'interieur, vous devriez etre
  capable d'utiliser ping vers la sortie. Vous  devriez  egalement  etre
  capables   d'utiliser  le  telnet  vers  la  machine  _f_i_r_e_w_a_l_l  depuis
  l'interieur, et cette derniere  manipulation  devrait  vous  permettre
  d'acceder au reste.

  Et  voila.  A  present,  vous voulez probablement apprendre rrppcc/YYellow
  PPages et leur interaction avec le fichier de mots de passe. Le  reseau
  derriere  le  firewall  devrait  vouloir empecher aux utilisateurs non
  privilegies de se logguer sur le _f_i_r_e_w_a_l_l, et donc  de  sortir.  C'est
  traite dans un autre HOWTO !

  Mini Howto Bzip2
  David Fetter, david@fetter.org;
  Version Franaise par Arnaud Launay, asl@launay.org
  v2.0, 22 aot 1999

  Ce document vous expliquera comment utiliser le nouveau programme de
  compression bzip2. Le document sgml original se trouve ici
  <http://fetter.org/Bzip2-HOWTO/>.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Historique des rvisions
        1.1.1 v2.00
        1.1.2 v1.92
        1.1.3 v1.91
        1.1.4 v1.9
        1.1.5 v1.8
        1.1.6 v1.7
        1.1.7 v1.6
        1.1.8 v1.5
        1.1.9 v1.4
        1.1.10 v1.3
        1.1.11 v1.2
        1.1.12 v1.1
        1.1.13 v1.0

  2. Obtenir bzip2

     2.1 Le Bzip2-HOWTO dans votre langue
     2.2 Obtenir des binaires prcompils de bzip2
     2.3 Obtenir les sources de bzip2
     2.4 Compiler bzip2 pour votre machine

  3. Utiliser bzip2 lui-mme

  4. Utiliser bzip2 avec tar

     4.1 Le plus facile  mettre en place
     4.2 Facile  mettre en oeuvre, relativement simple  utiliser, pas de ncessit d'avoir les privilges de super-utilisateur
     4.3 Aussi simple  utiliser, mais ncessite les privilges de super-utilisateur

  5. Utiliser bzip2 avec less

  6. Utiliser bzip2 avec emacs

     6.1 Changer emacs pour tous
     6.2 Changer emacs pour une seule personne

  7. Utiliser bzip2 avec wu-ftpd

  8. Utiliser bzip2 avec Netscape sous X

  9. Utiliser bzip2 pour recompresser en remplacement d'autres formats de compression



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Bzip2 est un nouvel algorithme dlirant de compression de donnes. Il
  produit gnralement des fichiers qui ne font que 60 ou 70% de la
  taille obtenue par compression par gzip.


  Ce document vous montrera quelques applications courantes pour bzip2.


  Les futures versions de ce document auront des applications de
  libbzip2, la bibliothque bzip2 en C que l'auteur de bzip2, Julian
  Seward <mailto:Julian_Seward@muraroa.demon.co.uk>, a sympathiquement
  crite. Le manuel de bzip2, qui dispose des informations de bas-
  niveau, se trouve ici
  <http://www.bzip2.org/bzip2/docs/manual_toc.html>.


  Les futures versions de ce document pourront galement inclure un
  rsum de la discussion sur l'ventualit (et la mthode)
  d'utilisation de bzip2 dans le noyau Linux.


  11..11..  HHiissttoorriiqquuee ddeess rrvviissiioonnss

  11..11..11..  vv22..0000

  Changement de la section ``Utiliser bzip2 avec less'' pour que les
  fichiers .tar.bz2 puissent tre lus. Merci  Nicola Fabiano
  <mailto:mc8644@mclink.it> pour la correction.

  Mise  jour de l'utilitaire buzzit.

  Mise  jour des informations sur tar.


  11..11..22..  vv11..9922

  Mise  jour de la section ``Obtenir des binaires de bzip2'', incluant
  les binaires S.u.S.E.


  11..11..33..  vv11..9911

  Correction d'une type et clarification de quelques problmes lis au
  shell dans la section ``section sur l'utilisation de bzip2 avec tar''.
  Merci  Alessandro Rubini.


  Mise  jour de l'utilitaire buzzit pour ne pas exploser l'archive
  bzip2 originale.


  Ajout de bgrep, un outil de type zgrep.


  11..11..44..  vv11..99

  Clarification du problme avec gcc 2.7.*. Merci  Ulrik Dickow de
  l'avoir fait remarquer.


  Ajout de la manire lgante d'utilisation de tar par Leonard Jean-
  Marc.


  Ajout de la traduction en sudois par Linus kerlund.



  Correction de la section wu-ftpd sur la suggestion d'Arnaud Launay.


  Dplacement des traductions vers leur propre section.


  11..11..55..  vv11..88

  Ajout de buzzit et tar.diff dans le sgml o ils doivent se trouver.
  Correction de la ponctuation et de la prsentation. Merci  Arnaud
  Launay pour m'aider  corriger ma copie. :-)


  Suppression du projet xv pour le moment, d au manque d'intrt
  populaire.


  Ajout d'un pense-bte pour les versions futures du document.


  11..11..66..  vv11..77

  Ajout de l'utilitaire buzzit. Correction du patch pour gnu tar.


  11..11..77..  vv11..66

  Ajout du truc de TenThumbs pour Netscape.


  Egalement, changement de lesspipe.sh d'aprs sa suggestion. Il doit
  mieux fonctionner maintenant.


  11..11..88..  vv11..55

  Ajout de la traduction en franais d'Arnaud Launay, ainsi que son
  fichier pour wu-ftpd.


  11..11..99..  vv11..44

  Ajout de la traduction en japonais de Tetsu Isaji.


  11..11..1100..  vv11..33

  Ajout du .emacs d'Ulrik Dickow pour les 19.30 et plus rcents.


  (Egalement corrig le patch jka-compr.el pour emacs d'aprs sa
  suggestion. Oops! Bzip2 ne possde pas encore(?) de drapeau "append").


  11..11..1111..  vv11..22

  Correction du patch pour emacs afin qu'il reconnaisse automagiquement
  les fichiers .bz2.


  11..11..1122..  vv11..11

  Ajout du patch pour emacs.



  11..11..1133..  vv11..00

  1re version.


  22..  OObbtteenniirr bbzziipp22

  La page web de bzip2 se trouve sur le site britannique
  <http://www.bzip2.org/>. Le miroir amricain est ici
  <http://www.digistar.com/bzip2/index.html>.


  22..11..  LLee BBzziipp22--HHOOWWTTOO ddaannss vvoottrree llaanngguuee

  Les francophones peuvent se rfrer aux traductions d'Arnaud Launay.
  La version web se trouve ici
  <http://www.freenix.org/unix/linux/HOWTO/mini/Bzip2.html>, et vous
  pouvez utiliser le ftp ici
  <ftp://ftp.traduc.org/pub/HOWTO/FR/Bzip2.gz>. Arnaud peut tre
  contact par courrier lectronique  cette adresse
  <mailto:asl@launay.org>.


  Les nippons peuvent se rfrer aux traductions de Tetsu Isaji, ici
  <http://jf.gee.kyoto-u.ac.jp/JF/JF.html>. Isaji peut tre joint sur sa
  page principale <http://www2s.biglobe.ne.jp/~kaien/>, ou par courrier
  lectronique  cette adresse <mailto:isaji@mxu.meshnet.or.jp>.


  Les sudois peuvent se rfrer aux traductions de Linus kerlund ici
  <http://user.tninet.se/~uxm165t/linux_doc.html>. Linus peut tre
  contact par courrier lectronique  cette adresse
  <mailto:uxm165t@tninet.se>.


  22..22..  OObbtteenniirr ddeess bbiinnaaiirreess pprrccoommppiillss ddee bbzziipp22

  Voir la page web.


  22..33..  OObbtteenniirr lleess ssoouurrcceess ddee bbzziipp22

  Elles se trouvent sur les sites officiels (voir ``Obtenir Bzip2'' pour
  les emplacements.


  22..44..  CCoommppiilleerr bbzziipp22 ppoouurr vvoottrree mmaacchhiinnee

  SSii vvoouuss aavveezz ggcccc 22..77..**, changez la ligne indiquant


       CFLAGS = -O3 -fomit-frame-pointer -funroll-loops




  pour avoir


       CFLAGS = -O2 -fomit-frame-pointer




  C'est--dire, remplacez le -O3 par un -O2 et supprimez le -funroll-
  loops.  Vous pouvez galement ajouter une option quelconque du type
  -m* (comme -m486, par exemple) que vous utilisez lorsque vous compilez
  un noyau.

  Eviter le -funroll-loops est le plus important, car la plupart des gcc
  2.7 gnreront le mauvais code, et tous les gcc 2.7 gnreront du code
  plus lent et plus gros. Pour les autres compileurs (lcc, egcs, gcc
  2.8.x) les CFLAGS par dfaut sont bons.

  Aprs a, lancez simplement make et installez-le d'aprs le README.


  33..  UUttiilliisseerr bbzziipp22 lluuii--mmmmee

  RTFM (Read the Fine Manual Page). En clair: lisez le manuel.


  44..  UUttiilliisseerr bbzziipp22 aavveecc ttaarr

  Sont lists ci-dessous trois mthodes d'utilisation de bzip2 avec tar,
  soit:


  44..11..  LLee pplluuss ffaacciillee  mmeettttrree eenn ppllaaccee

  Cette mthode ne ncessite pas de configurer quoi que ce soit. Pour
  dcompresser une archive foo.tar.bz2 en bzip2 dans le rpertoire
  courant, tapez


       /chemin/vers/bzip2 -cd foo.tar.bz2 | tar xf -




  ou


       tar --use-compress-prog=bzip2 xf foo.tar.bz2





  Ceci fonctionne, mais peut tre ennuyeux  taper souvent.


  44..22..  FFaacciillee  mmeettttrree eenn ooeeuuvvrree,, rreellaattiivveemmeenntt ssiimmppllee  uuttiilliisseerr,, ppaass
  ddee nncceessssiitt dd''aavvooiirr lleess pprriivviillggeess ddee ssuuppeerr--uuttiilliissaatteeuurr

  Merci  Leonard Jean-Marc <mailto:leonard@sct1.is.belgacom.be> pour ce
  truc.

  Dans votre .bashrc, vous pouvez mettre une ligne comme celle-ci:


       alias btar='tar --use-compress-program /usr/local/bin/bzip2 '





  Dans votre .tcshrc, ou .cshrc, la ligne ressemblera :


       alias btar 'tar --use-compress-program /usr/local/bin/bzip2 '

  44..33..  AAuussssii ssiimmppllee  uuttiilliisseerr,, mmaaiiss nncceessssiittee lleess pprriivviillggeess ddee ssuuppeerr--
  uuttiilliissaatteeuurr

  Mettez votre tar  jour avec la nouvelle version de GNU tar, qui est
  aujourd'hui la 1.13.10. On peut le trouver sur le site ftp de GNU
  <ftp://alpha.gnu.org/gnu/tar/> ou tout miroir.


  55..  UUttiilliisseerr bbzziipp22 aavveecc lleessss

  Pour dcompresser les fichiers de bzip2 au vol, c--d pour pouvoir
  utiliser "less" sur eux sans commencer par les bunzip2-er, vous pouvez
  crer un lesspipe.sh (man less) comme celui-ci:

  #!/bin/sh
  # Ceci est un prprocesseur pour 'less'. Il est utilis lorsque cette
  # variable d'environnement existe:  LESSOPEN="|lesspipe.sh %s"

    case "$1" in
    *.tar) tar tvvf $1 2>/dev/null ;; # Voir le contenu de fichiers .tar et .tgz
    *.tgz) tar tzvvf $1 2>/dev/null ;;
  # Celui-ci fonctionne pour la version non-modifie de tar:
    *.tar.bz2) bzip2 -cd $1 $1 2>/dev/null | tar tvvf - ;;
  # Celui-ci fonctionne avec la version patche de tar:
  # *.tar.bz2) tyvvf $1 2>/dev/null ;;
    *.tar.gz) tar tzvvf $1 2>/dev/null ;;
    *.tar.Z) tar tzvvf $1 2>/dev/null ;;
    *.tar.z) tar tzvvf $1 2>/dev/null ;;
    *.bz2) bzip2 -dc $1  2>/dev/null ;; # Voir correctement les fichiers compresss
    *.Z) gzip -dc $1  2>/dev/null ;;
    *.z) gzip -dc $1  2>/dev/null ;;
    *.gz) gzip -dc $1  2>/dev/null ;;
    *.zip) unzip -l $1 2>/dev/null ;;
    *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.man) FILE=`file -L $1` ; # groff src
      FILE=`echo $FILE | cut -d ' ' -f 2`
      if [ "$FILE" = "troff" ]; then
        groff -s -p -t -e -Tascii -mandoc $1
      fi ;;
    *) cat $1 2>/dev/null ;;
  #  *) FILE=`file -L $1` ; # Vrifier si c'est un binaire, alors -> voir avec 'strings'
  #    FILE1=`echo $FILE | cut -d ' ' -f 2`
  #    FILE2=`echo $FILE | cut -d ' ' -f 3`
  #    if [ "$FILE1" = "Linux/i386" -o "$FILE2" = "Linux/i386" \
  #         -o "$FILE1" = "ELF" -o "$FILE2" = "ELF" ]; then
  #      strings $1
  #    fi ;;
    esac




  66..  UUttiilliisseerr bbzziipp22 aavveecc eemmaaccss

  66..11..  CChhaannggeerr eemmaaccss ppoouurr ttoouuss

  J'ai crit le patch suivant pour jka-compr.el qui ajoute bzip2 au mode
  d'auto-compression.

  AAvveerrttiisssseemmeenntt:: Je l'ai uniquement test avec emacs-20.2, mais je n'ai
  pas de raisons de croire qu'une approche similaire ne fonctionnerait
  pas avec d'autres versions.

  Pour l'utiliser,

  1. Allez dans le rpertoire des sources emacs-20.2/lisp (quel que soit
     l'endroit o il se trouverait dcompact)
  2. Enregistrez le patch ci-dessous dans un fichier nomm jka-
     compr.el.diff (il doit tre seul dans ce fichier ;).

  3. Faites


        patch < jka-compr.el.diff




  4. Lancez emacs, et utilisez


        M-x byte-compile-file jka-compr.el




  5. Quittez emacs.

  6. Dplacez votre jka-compr.elc original vers un endroit sr en cas
     d'erreurs.

  7. Remplacez le par le nouveau jka-compr.elc.

  8. Amusez-vous !


     --- jka-compr.el        Sat Jul 26 17:02:39 1997
     +++ jka-compr.el.new    Thu Feb  5 17:44:35 1998
     @@ -44,7 +44,7 @@
      ;; The variable, jka-compr-compression-info-list can be used to
      ;; customize jka-compr to work with other compression programs.
      ;; The default value of this variable allows jka-compr to work with
     -;; Unix compress and gzip.
     +;; Unix compress and gzip.  David Fetter added bzip2 support :)
      ;;
      ;; If you are concerned about the stderr output of gzip and other
      ;; compression/decompression programs showing up in your buffers, you
     @@ -121,7 +121,9 @@


      ;;; I have this defined so that .Z files are assumed to be in unix
     -;;; compress format; and .gz files, in gzip format.
     +;;; compress format; and .gz files, in gzip format, and .bz2 files,
     +;;; in the snappy new bzip2 format from http://www.muraroa.demon.co.uk.
     +;;; Keep up the good work, people!
      (defcustom jka-compr-compression-info-list
        ;;[regexp
        ;; compr-message  compr-prog  compr-args
     @@ -131,6 +133,10 @@
           "compressing"    "compress"     ("-c")
           "uncompressing"  "uncompress"   ("-c")
           nil t]
     +    ["\\.bz2\\'"
     +     "bzip2ing"        "bzip2"         ("")
     +     "bunzip2ing"      "bzip2"         ("-d")
     +     nil t]
          ["\\.tgz\\'"
           "zipping"        "gzip"         ("-c" "-q")
           "unzipping"      "gzip"         ("-c" "-q" "-d")




  66..22..  CChhaannggeerr eemmaaccss ppoouurr uunnee sseeuullee ppeerrssoonnnnee

  Merci  Ulrik Dickow, ukd@kampsax.dk <mailto:ukdATkampsax.dk>,
  ingnieur systme  Kampsax Technology, pour celui-ci:

  Pour faire en sorte de pouvoir utiliser bzip2 automatiquement lorsque
  vous n'tes pas administrateur systme, ajoutez simplement ce qui suit
   votre fichier .emacs.


  ;; (D)compression automatique pour le chargement/sauvegarde de fichiers
  ;; (gzip(1) et simililaires)
  ;; Nous le lanons en tat stopp, ainsi le support pour bzip2(1) peut tre
  ;; ajout.
  ;; Cod par Ulrik Dickow pour ~/.emacs avec Emacs 19.34.
  ;; Doit fonctionner avec beaucoup d'anciens et de nouveaux emacs galement.
  ;; Pas de garantie, cependant.
  ;;
  (if (fboundp 'auto-compression-mode) ; Emacs 19.30+
      (auto-compression-mode 0)
    (require 'jka-compr)
    (toggle-auto-compression 0))
  ;; Ajouter le support bzip2 et autoriser la compression.
  (add-to-list 'jka-compr-compression-info-list
               ["\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'"
                "zipping"        "bzip2"         ()
                "unzipping"      "bzip2"         ("-d")
                nil t])
  (toggle-auto-compression 1 t)




  77..  UUttiilliisseerr bbzziipp22 aavveecc wwuu--ffttppdd

  Merci  Arnaud Launay pour ce gain de bande passante. Ce qui suit doit
  aller dans /etc/ftpconversions pour faire de la compression et
  dcompression au vol avec bzip2. Vrifiez que les chemins (comme
  /bin/compress) sont bons.


   :.Z:  :  :/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
   :   : :.Z:/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
   :.gz: :  :/bin/gzip -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:GUNZIP
   :   : :.gz:/bin/gzip -9 -c %s:T_REG:O_COMPRESS:GZIP
   :.bz2: :  :/bin/bzip2 -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:BUNZIP2
   :   : :.bz2:/bin/bzip2 -9 -c %s:T_REG:O_COMPRESS:BZIP2
   :   : :.tar:/bin/tar -c -f - %s:T_REG|T_DIR:O_TAR:TAR
   :   : :.tar.Z:/bin/tar -c -Z -f -
  %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
   :   : :.tar.gz:/bin/tar -c -z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP
   :   : :.tar.bz2:/bin/tar -c -y -f -
  %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+BZIP2




  88..  UUttiilliisseerr bbzziipp22 aavveecc NNeettssccaappee ssoouuss XX

  tenthumbs@cybernex.net nous dit:


       J'ai galement trouv un moyen pour obtenir l'utilisation de bzip2 par
       Netscape/Linux pour le Content-Encoding de la mme manire qu'il
       utilise gzip. Ajoutez ceci  $HOME/.Xdefaults ou $HOME/.Xresources.

  J'utilise l'option -s car je prfre perdre un peu de vitesse de
  dcompression et conserver de la mmoire. Vous pouvez supprimer cette
  option si vous le dsirez.



  Netscape*encodingFilters:      \
          x-compress :  : .Z     : uncompress -c  \n\
          compress   :  : .Z     : uncompress -c  \n\
          x-gzip     :  : .z,.gz : gzip -cdq      \n\
          gzip       :  : .z,.gz : gzip -cdq      \n\
          x-bzip2    :  : .bz2   : bzip2 -ds \n




  99..  UUttiilliisseerr bbzziipp22 ppoouurr rreeccoommpprreesssseerr eenn rreemmppllaacceemmeenntt dd''aauuttrreess ffoorrmmaattss
  ddee ccoommpprreessssiioonn

  Ce programme perl prend les fichiers compresss dans d'autres formats
  (.tar.gz, .tgz. .tar.Z, et .Z pour cette itration) et les recompresse
  pour un meilleur rsultat. Le source perl dispose de tous les types de
  documentation ncessaires sur ce qu'il fait et comment il fait ce
  qu'il fait. Cette dernire version prend les fichiers sur la ligne de
  commande. Sans argument en ligne de commande, il tente de recomprimer
  tous les fichiers du rpertoire courant.








































  #!/usr/bin/perl -w

  #######################################################
  #                                                     #
  # Ce programme prend les fichiers compresss et       #
  # gzip-s dans le rpertoire courant et les tranforme #
  # en fichiers bzip2. Il supporte proprement           #
  # l'extension .tgz, produisant un fichier .tar.bz2.   #
  #                                                     #
  #######################################################
  $counter = 0;
  $saved_bytes = 0;
  $totals_file = '/tmp/machine_bzip2_total';
  $machine_bzip2_total = 0;

  @raw = (defined @ARGV)?@ARGV:<*>;

  foreach(@raw) {
      next if /^bzip/;
      next unless /\.(tgz|gz|Z)$/;
      push @files, $_;
  }
  $total = scalar(@files);

  foreach (@files) {
      if (/tgz$/) {
          ($new=$_) =~ s/tgz$/tar.bz2/;
      } else {
          ($new=$_) =~ s/\.g?z$/.bz2/i;
      }
      $orig_size = (stat $_)[7];
      ++$counter;
      print "Recompacte $_ ($counter/$total)...\n";
      if ((system "gzip -cd $_ |bzip2 >$new") == 0) {
          $new_size = (stat $new)[7];
          $factor = int(100*$new_size/$orig_size+.5);
          $saved_bytes += $orig_size-$new_size;
          print "$new is about $factor% of the size of $_. :",($factor<100)?')':'(',"\n";
          unlink $_;
      } else {
          print "Arrgghh! Quelque chose est arriv  $_: $!\n";
      }
  }
  print "Vous avez "
      , ($saved_bytes>=0)?"sauv ":"perdu "
      , abs($saved_bytes)
      , " octets d'espace disque :"
      , ($saved_bytes>=0)?")":"("
      , "\n"
      ;

  unless (-e '/tmp/machine_bzip2_total') {
      system ('echo "0" >/tmp/machine_bzip2_total');
      system ('chmod', '0666', '/tmp/machine_bzip2_total');
  }


  chomp($machine_bzip2_total = `cat $totals_file`);
  open TOTAL, ">$totals_file"
       or die "Ne peut ouvrir le total sur tout le systme: $!";
  $machine_bzip2_total += $saved_bytes;
  print TOTAL $machine_bzip2_total;
  close TOTAL;

  print "Ceci nous donne un total de ",`cat $totals_file`," octets sauvs sur
  tout le systme.\n";


































































  Mini HOWTO Graveur de CDs
  Winfried  Truemper,  winni@xpilot.org,  traduit  par Olivier
  Tharan, tharan@int-evry.fr
  Version 1.9.8, 11 juillet 1997

  Je (Winfried Truemper) rejette toute garantie concernant ce  document,
  incluant  toutes  les  garanties  implicites  de mise sur le marche et
  d'utilite pour un certain usage ; en aucun cas on ne pourra  me  tenir
  compte  de  dommages  speciaux, indirects ou consecutifs a, ni d'aucun
  dommage quelqu'il soit resultant de la perte d'utilisation, de donnees
  ou  de  profits,  que ce soit dans une action contractuelle, de negli-
  gence ou autre action, decoulant de ou en relation avec  l'utilisation
  de ce document. EEnn ggrrooss,, lliisseezz eett uuttiilliisseezz aa vvooss pprroopprreess rriissqquueess..

  11..  IInnttrroodduuccttiioonn

  Ma  premiere  experience  avec des graveurs de CDs a ete guidee par le
  "Linux CD Writer mini-HOWTO" de Matt  Cutts,  cutts@ms.uky.edu.  Merci
  Matt !

  Bien  que  mon  intention n'etait que de mettre ce document a jour, je
  l'ai reecrit a partir du debut apres avoir realise combien tout  avait
  change depuis 1994.

  11..11..  LLeeccttuurreess ssuuggggeerreeeess

  La  FAQ  sur  les  CD-R a  <http://www.cd-info.com/CDIC/Technology/CD-
  R/FAQ.html> est une FAQ generale  portant  sur  les  disques  compacts
  enregistrables (CD-R).

  Le  HOWTO  CD-ROM  Linux  explique  ce  qu'on  devrait  savoir sur les
  lecteurs de CD-ROMs sous Linux. En supplement, vous pourrez  jeter  un
  coup d'oeil sur le HOWTO SCSI Linux et le HOWTO noyau Linux.

  11..22..  TTeerrmmiinnoollooggiiee...... LLaasseerrss aauu mmaaxxiimmuumm...... FFeeuu !!

  _C_D_-_R_O_M  veut  dire  ``Disque  compact  a  memoire  en  lecture seule''
  (Compact Disc Read Only Memory), un support de stockage  utilisant  un
  laser  optique  pour  lire  des  trous  microscopiques  sur  un disque
  brillant  en  argent.  (La  brillance  argentee  vient  d'une   couche
  aluminisee  qui  est  le support.) Les trous representent les morceaux
  d'information (en quelque sorte) et sont si petits que  des  milliards
  d'entre  eux  tiennent  sur  le  disque.  Un CD est donc un support de
  stockage de masse.

  Le terme _C_D_-_R  est  une  forme  abregee  de  ``CD-ROM  enregistrable''
  (Recordable) et se rapporte au CD qui n'a pas ces trous microscopiques
  sur sa surface...  Il  est  donc  vide.   A  la  place  de  la  couche
  aluminisee  (argentee) il possede un film special (colore) dans lequel
  des trous microscopiques peuvent y etre brules. Ceci  est  realise  en
  donnant au laser, qui normalement ne fait que palper les trous, un peu
  plus de puissance pour qu'il brule les trous. Cette action ne peut  se
  faire  _q_u_'_u_n_e  _s_e_u_l_e  _f_o_i_s  sur un CD-R. Vous pouvez toutefois laisser
  certaines parties vides pour une ecriture ulterieure, creant ce  qu'on
  appelle un CD multi-sessions.

  Ce  Mini  HOWTO  parle de la tache d'ecrire un CD-R. Bienvenue a bord,
  Capitaine.

  11..33..  GGrraavveeuurrss ddee CCDD--RROOMM ssuuppppoorrtteess

  Les logiciels de gravage de CDs pour Linux supportent les graveurs  de
  CD  des  fabricants  suivants  : Philips, IMS, Kodak, Yamaha, Hewlett-
  Packard ou les compatibles. La liste detaillee des modeles qu'on a  vu
  fonctionner     correctement     (ou    pas)    est    disponible    a
  <http://www.shop.de/cgi-bin/winni/lsc.pl>. La liste sera incluse  dans
  les versions futures de ce mini-HOWTO.

  Si  votre  materiel  n'est pas supporte, vous pouvez toujours utiliser
  Linux pour creer une image du CD ulterieur,  mais  vous  devrez  alors
  utiliser  un  logiciel sous DOS pour ecrire l'image sur le CD-R. (Vous
  aurez envie de faire ceci parce que la plupart des  logiciels  DOS  ne
  peuvent  pas gerer les noms de fichiers longs disponibles avec Linux.)
  Dans ce cas, vous pouvez  passer  toutes  les  sections  relatives  au
  materiel (celles sur les peripheriques SCSI generiques et cdwrite).

  11..44..  ````PPoossssiibbiilliitteess'''' ssuuppppoorrtteeeess

  En  ce  moment les logiciels pour graver des CDs sous Linux supportent
  les caracteristiques suivantes :

                               cd-write-2.0            cdrecord-1.5
       -------------------------------------------------------------
       "Multisession"          en partie               oui

       "RockRidge"             oui (mkisofs)           oui (mkisofs)
       "El Torito"             oui (mkisofs)           oui (mkisofs)

  Veuillez consulter la documentation jointe a ces logiciels  pour  plus
  de  details  sur  ces possibilites speciales. La section ``'' liste la
  disponibilite des logiciels mentionnes.

  11..55..  LLiisstteess ddee ddiissttrriibbuuttiioonn

  Si vous voulez rejoindre l'equipe de developpement  (avec  l'intention
  de les _a_i_d_e_r activement), envoyez un courrier electronique a

       cdwrite-request@pixar.com

  et mettez la commande subscribe dans le corps du message.

  11..66..  DDiissppoonniibbiilliittee

  La  toute  derniere  version  de ce document est toujours disponible a
  partir de  <http://www.shop.de/~winni/linux/>. (NdT : en France, c'est
  a  <http://www.freenix.fr/linux/>, mais la version peut ne pas etre la
  derniere en date.)

  22..  PPrreeppaarreezz vvoottrree mmaacchhiinnee LLiinnuuxx ppoouurr ggrraavveerr ddeess CCDD--RROOMMss

  22..11..  CCoonnffiigguurreezz llee mmaatteerriieell

  Eteignez votre ordinateur, et branchez le graveur de CDs  sur  le  bus
  SCSI. Veuillez noter que les graveurs de CDs necessitent un controleur
  SCSI, l'interface standard EIDE de votre PC n'a  pas  la  capacite  de
  piloter ces graveurs.

  Assurez-vous  que le bus SCSI est termine proprement et choisissez une
  ID SCSI libre pour le graveur. Regardez le HOWTO SCSI si  vous  n'etes
  pas sur. Si vous etes completement depasse, demandez a un expert.

  Remettez le courant et regardez les messages que le BIOS du controleur
  SCSI affiche immediatement apres l'allumage de l'ordinateur.  S'il  ne
  reconnait  pas  votre  graveur,  revenez  a  l'etape precedente.  Vous
  devriez voir un message comme celui-ci :

               (Image manquante ; quelqu'un en a-t-il une copie d'ecran ?)

  22..22..  NNoottee ssuurr llee ggrraavvaaggee ddee CCDDss ssoouuss LLiinnuuxx

  Au contraire d'autres rumeurs, le noyau Linux _n_'_a _p_a_s besoin de  patch
  pour  ecrire  sur des CDs. Bien que le fichier drivers/scsi/scsi.c des
  sources du noyau contienne les lignes

       case TYPE_WORM: case TYPE_ROM: SDpnt->writeable = 0;

  ceci veut seulement dire que ces CDs et WORMs ne sont pas  accessibles
  en  ecriture a travers les peripheriques standards /dev/sda - /dev/sdh
  ce qui est normal.

  Au lieu d'utiliser ces peripheriques, l'ecriture de CDs  est  faite  a
  travers  les peripheriques SCSI generiques qui permettent presque tout
  -- meme l'ecriture sur les CDs.

  22..33..  CCrreeeezz lleess ppeerriipphheerriiqquueess ggeenneerriiqquueess

  Le HOWTO SCSI Linux dit a propos des peripheriques SCSI generiques :

       Le pilote de peripherique SCSI generique fournit  une  interface  pour
       envoyer  des  commandes SCSI a tous les peripheriques SCSI -- disques,
       bandes, CDROMs, mecanismes de changement de support, etc.

  Parler des peripheriques generiques en tant  qu'interfaces  veut  dire
  qu'ils  fournissent  une maniere differente d'acceder au materiel SCSI
  par rapport aux peripheriques normaux.  Cette  maniere  detournee  est
  obligatoire  parce  que les peripheriques normaux sont faits pour lire
  des donnees a l'echelle du block a partir d'un disque, d'un lecteur de
  bandes  ou d'un lecteur de CD-ROM. D'un autre cote, piloter un graveur
  de CD-ROM (ou un scanner) est  plus  exotique,  par  exemple  on  doit
  positionner   le   laser.   Pour   avoir   des  peripheriques  normaux
  ``propres'', toutes  ces  actions  exotiques  doivent  (peuvent)  etre
  realisees a travers les peripheriques SCSI generiques.

  Puisque   l'on  peut  tout  faire  au  materiel  SCSI  a  travers  les
  peripheriques generiques, ils ne sont pas limites a un usage  --  d'ou
  le nom ``generique''.

  (Note  :  s'il  y avait une norme pour piloter les graveur de CDs, les
  developpeurs du noyau auraient  programme  un  module  du  noyau  pour
  ecrire  sur  les  CD-R  et  nous ne serions pas obliges d'utiliser les
  peripheriques generiques. Mais comme chaque fabricant  a  besoin  d'un
  pilote  individuel  pour  son  materiel  (argh  !), ce module du noyau
  deviendrait maladroit et plus gros que tout ce que vous voulez  mettre
  dans votre noyau.)

  Deplacez-vous  dans  le  repertoire /dev et verifiez les peripheriques
  SCSI generiques ; la commande ls devrait montrer sga - sgh :

                       bash> cd /dev
                       bash> ls -l sg*
                       crw-------   1 root   sys     21,   0 Jan  1  1970 sga
                       crw-------   1 root   sys     21,   1 Jan  1  1970 sgb
                       crw-------   1 root   sys     21,   2 Jan  1  1970 sgc
                       crw-------   1 root   sys     21,   3 Jan  1  1970 sgd
                       crw-------   1 root   sys     21,   4 Jan  1  1970 sge
                       crw-------   1 root   sys     21,   5 Jan  1  1970 sgf
                       crw-------   1 root   sys     21,   6 Jan  1  1970 sgg
                       crw-------   1 root   sys     21,   7 Jan  1  1970 sgh

  Si vous  n'avez  pas  ces  fichiers  de  peripheriques,  creez-les  en
  utilisant le script /dev/MAKEDEV :

                       bash> cd /dev/
                       bash> ./MAKEDEV sg

  Maintenant les fichiers de peripheriques devraient etre corrects.

  22..44..  EEttaabblliisssseezz ll''uuttiilliissaattiioonn ddeess ppeerriipphheerriiqquueess ````SSCCSSII ggeenneerriiqquuee'''' eett
  llooooppbbaacckk

  Le  noyau  Linux  necessite  un module qui lui donne la possibilite de
  gerer les peripheriques SCSI generiques.  Si  votre  noyau  courant  a
  cette  aptitude,  elle  devrait  etre  listee  dans  le pseudo-fichier
  /proc/devices :

                  bash> cat /proc/devices
                  Character devices:
                   1 mem
                   2 pty
                   3 ttyp
                   4 ttyp
                   5 cua
                   7 vcs
                  21 sg          <---------- veut dire "peripherique SCSI
                  30 socksys                            generique"

                  Block devices:
                   2 fd
                   7 loop        <---------- on peut meme utiliser le
                   8 sd                      loopback
                  11 sr          <---------- veut dire "CD-ROM SCSI"

  Vous devrez peut-etre taper la commande  insmod  sg,  insmod  loop  ou
  insmod sr_mod pour charger le module dans le noyau.  Re-verifiez apres
  avoir essaye ceci.

  Si l'une d'entre elle ne fonctionne pas, vous devez reconfigurer votre
  noyau et le compiler.

                        bash$ cd /usr/src/linux
                        bash$ make config

                        [..]
                        *
                        * Additional Block Devices
                        *
                        Loopback device support (CONFIG_BLK_DEV_LOOP) [M/n/y/?] M

                        [..]
                        *
                        * SCSI support
                        *
                        SCSI support (CONFIG_SCSI) [Y/m/n/?]
                        *
                        * SCSI support type (disk, tape, CD-ROM)
                        *
                        SCSI disk support (CONFIG_BLK_DEV_SD) [Y/m/n/?] Y
                        SCSI tape support (CONFIG_CHR_DEV_ST) [M/n/y/?] M
                        SCSI CD-ROM support (CONFIG_BLK_DEV_SR) [M/n/y/?] M
                        SCSI generic support (CONFIG_CHR_DEV_SG) [M/n/y/?] M

                        [..]
                        ISO9660 cdrom filesystem (CONFIG_ISO9660_FS) [Y/m/n/?] M

  Veuillez noter que j'ai omis les questions un peu moins importantes.

  22..55..  CCoonnssttrruuiirree eett iinnssttaalllleerr llee nnooyyaauu

  Si vous avez des questions concernant ceci, la lecture suggeree est le
  HOWTO Noyau Linux. De plus, votre distribution Linux devrait  contenir
  de la documentation sur ce probleme.
  (Astuce  :  pendant  la  recompilation,  vous pouvez continuer sur les
  etapes ``'' et au-dela)

  22..66..  RReeddeemmaarrrreerr ll''oorrddiinnaatteeuurr ppoouurr aammoorrcceerr llee cchhaannggeemmeenntt

  Ne paniquez pas si le noyau Linux affiche les messages plus rapidement
  que   vous   ne   pouvez  les  lire,  au  moins  l'initialisation  des
  peripheriques SCSI peut etre reaffichee avec la commande dmesg :

               scsi0 : NCR53c{7,8}xx (rel 17)
               scsi : 1 host.
               scsi0 : target 0 accepting period 100ns offset 8 10.00MHz
               scsi0 : setting target 0 to period 100ns offset 8 10.00MHz

                 Vendor: FUJITSU   Model: M1606S-512        Rev: 6226
                 Type:   Direct-Access                      ANSI SCSI
               Detected scsi disk sda at scsi0, channel 0, id 0, lun 0

                 Vendor: NEC       Model: CD-ROM DRIVE:84   Rev:  1.0a
                 Type:   CD-ROM                             ANSI SCSI
               Detected scsi CD-ROM sr0 at scsi0, channel 0, id 4, lun 0

               scsi : detected 1 SCSI disk total.
               SCSI device sda: hdwr sector= 512 bytes. Sectors= 2131992

  On  a   montre   ci-dessus   uniquement   la   partie   des   messages
  d'initialisation  qui  rapportent  la detection des peripheriques SCSI
  presents physiquement.

  22..77..  CCrreeaattiioonn ddeess ppeerriipphheerriiqquueess llooooppbbaacckk

  Deplacez-vous dans le repertoire /dev et  verifiez  les  peripheriques
  loopback.  Ce  n'est  pas  grave si vous n'avez pas ces peripheriques,
  mais c'est pratique si vous les avez (Voir la section ``'').  Si  vous
  les avez deja, la commande ls devrait montrer loop0 - loop7 :

                       bash$ cd /dev
                       bash$ ls -l loop*
                       brw-rw----   1 root  disk    7,   0 Sep 23 17:15 loop0
                       brw-rw----   1 root  disk    7,   1 Sep 23 17:15 loop1
                       brw-rw----   1 root  disk    7,   2 Sep 23 17:15 loop2
                       brw-rw----   1 root  disk    7,   3 Sep 23 17:15 loop3
                       brw-rw----   1 root  disk    7,   4 Sep 23 17:15 loop4
                       brw-rw----   1 root  disk    7,   5 Sep 23 17:15 loop5
                       brw-rw----   1 root  disk    7,   6 Sep 23 17:15 loop6
                       brw-rw----   1 root  disk    7,   7 Sep 23 17:15 loop7

  Si  vous  n'avez  pas  ces  fichiers  de  peripheriques,  creez-les en
  utilisant le script /dev/MAKEDEV :

  bash> cd /dev/ bash> ./MAKEDEV loop

  La derniere commande ne reussit que si vous avez le module  loop  dans
  votre  noyau  (voir la section ``'' pour la manipulation des modules).
  Si insmod loop ne donne rien, vous devez attendre que le nouveau noyau
  soit correctement installe (voir ``''.

  22..88..  OObbtteenneezz llee llooggiicciieell ppoouurr ggrraavveerr lleess CCDDss

  22..88..11..  UUttiilliittaaiirreess eenn lliiggnnee ddee ccoommmmaannddee

  Le paquetage suivant est obligatoire pour generer des maquettes de CD-
  R :

       ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs/mkisofs-1.11.tar.gz

  Selon le modele  de  votre  graveur  de  CDs  (voir  ``''),  l'un  des
  logiciels  suivants  est  necessaire pour ecrire les maquettes sur les
  CD-R :

       ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/cdwrite-2.0.tar.gz
       ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/cdrecord.tar.gz

  Veuillez utiliser les miroirs de ces serveurs FTP les plus proches  ou
  chargez-les a partir d'un CD.

  Assurez-vous  absolument que vous avez la version 2.0 ou superieure de
  cdwrite.  Aucune version plus ancienne et surtout aucune version  beta
  ne  fonctionneront  !  Ne  croyez  pas  les pages de manuel du (vieil)
  mkisofs qui indique que vous avez besoin de la version 1.5 de cdwrite.

  La  distribution Debian est fournie avec un patch pour la version 1.05
  de mkisofs qui lui ajoute l'option -K (voir ``'') ; il est  disponible
  sur

       ftp://ftp.debian.org/pub/debian/rex/source/misc/mkisofs_1.05-3.diff.gz

  Ce  patch  n'est  necessaire que si vous voulez monter l'image du CD a
  travers le peripherique loopback (voir ``'').

  Une correction pour scsi.c (dans le  noyau)  a  ete  ecrite  par  Eric
  Youngdale  pour  rendre  ce  patch  superflu  et  sera incluse dans la
  prochaine version stable du noyau Linux.

  22..88..22..  UUnnee iinntteerrffaaccee uuttiilliissaatteeuurr ggrraapphhiiqquuee ((ooppttiioonnnneellllee))

  X-CD-Roast est un programme de gravage de CDs fonctionnant entierement
  sous X, et succede a cdwtools-0.93. Il est disponible sur

       http://www.fh-muenchen.de/home/ze/rz/services/projects/xcdroast/e_overview.html

  En   ce  moment  X-CD-Roast  est  base  sur  une  version  patchee  de
  cdwrite-2.0 et possede par consequent les memes caracteristiques (voir
  ``'').  Les versions futures pourraient etre basees sur le logiciel de
  remplacementcdrecord.

  33..  EEccrriirree uunn CCDD

  ``Si en fumee tu te transformes, je ne cesserai de jouer  pendant  que
  tu  te  consumes.''  (L'empereur  Neron  en  ecrivant  ses propres CDs
  classiques)

  En general l'ecriture d'un CD se fait en deux etapes :

  +o  recolter les logiciels desires et les empaqueter dans une image ISO
     9660 avec mkisofs ;

  +o  ecrire  l'image  ISO  9660  sur le CD enregistrable avec cdwrite ou
     cdrecord.

  Il est aussi possible de combiner les deux etapes en une avec un  tube
  mais ceci n'est pas recommande parce que ce n'est pas fiable. Voir ci-
  dessous.

  33..11..  DDeetteerrmmiinneezz aa qquueell ppeerriipphheerriiqquuee SSCCSSII  ggeenneerriiqquuee  llee  ggrraavveeuurr  eesstt
  aattttaacchhee

  ( Veuillez noter : la facon actuelle de nommage des peripheriques SCSI
  sous  Linux  est compliquee a souhait et pas assez fiable. Le fait que
  je la decrive ici en maints details ne devrait pas etre mal interprete
  comme la confirmation de cette etat de faits. )

  Apres avoir suivi toutes les etapes du dernier chapitre, votre systeme
  devrait etre capable de gerer le gravage de CDs.  Cette  section  peut
  etre utilisee comme preuve que tout fonctionne comme prevu.

  Lancez la commande dmesg. Elle devrait rapporter les messages du noyau
  Linux, avec ceux imprimes lors du demarrage  (limitation  :  seulement
  les  200  derniers) et contient des informations sur le graveur de CDs
  connectes au bus SCSI.

  Exemple simple :

       Vendor:  YAMAHA   Model:   CDR100         Rev:   1.11   Type:     WORM
       ANSI  SCSI  revision: 02 Detected scsi CD-ROM sr1 at scsi0, channel 0,
       id 3, lun 0

  Cette machine possede quatre peripheriques  SCSI  connectes  (vous  ne
  pouvez  pas le voir donc je vous le dis), avec les ID SCSI allant de 0
  a 3. Le  graveur  est  le  quatrieme  peripherique  SCSI  physiquement
  present  et  doit  donc  etre  connecte  sur  /dev/sgd  (le  quatrieme
  peripherique SCSI generique en comptant commence a a). Dans ce cas, la
  commande

       cdwrite  --eject  --device /dev/sgd

  ouvre  le  tiroir  et  est  un  test  pour  voir  si  tout  fonctionne
  correctement.

  Un exemple plus complique :

                   scsi0 : AdvanSys SCSI 1.5: ISA (240 CDB)
                   scsi1 : Adaptec 1542
                   scsi : 2 hosts.

                     Vendor: HP      Model: C4324/C4325  Rev: 1.20
                     Type:   CD-ROM                      ANSI SCSI revision: 02
                   Detected scsi CD-ROM sr0 at scsi0, channel 0, id 2, lun 0

                     Vendor: IBM     Model: DPES-31080   Rev: S31Q
                     Type:   Direct-Access               ANSI SCSI revision: 02
                   Detected scsi disk sda at scsi1, channel 0, id 0, lun 0

                   scsi : detected 1 SCSI cdrom 1 SCSI disk total.
                   SCSI device sda: hdwr sector= 512 bytes.

  Dans cet exemple deux controleurs SCSI hebergent un peripherique  SCSI
  chacun.  Quel  gachis  (ils  sont  capables  d'heberger  jusqu'a  sept
  peripheriques chacun). Ce n'est pas ma configuration alors arretez  de
  demander  si  j'ai  trop  d'argent...  Cependant dans le but d'etre un
  exemple dont on peut se passer, cette  configuration  est  excellente.
  :-)

  Dans  l'exemple ci-dessus le graveur de CD a l'ID SCSI 2 mais elle est
  associee au premier peripherique SCSI  generique  /dev/sga  parce  que
  c'est  le  premier  peripherique SCSI physiquement present que Linux a
  detecte. J'espere que  ceci  montre  clairement  que  l'ID  SCSI  d'un
  peripherique n'a rien a voir avec le peripherique generique associe.

  Deux  questions  restent en suspens : qu'arrive-t-il si vous prenez le
  mauvais  peripherique   ?   Si   vous   ne   specifiez   ni   l'option
  --<MANUFACTURER>  ni  n'ecrivez  de  donnees  sur  le peripherique, en
  general un message d'avertissement est affiche et rien de plus :

                       bash$ cdwrite  --eject  --device /dev/sgb

                       Unknown CD-Writer; if this model is compatible with any
                       supported type, please use the appropriate command line
                       flag.

                       Manufacturer:  IBM
                       Model:         DPES-31080
                       Revision:      S31Q

  Dans ce cas le peripherique /dev/sbg est un disque dur SCSI (d'IBM).

  Si vous ecrivez des donnees  sur  le  mauvais  peripherique,  vous  en
  ecrasez  le  contenu  d'origine et endommagerez votre systeme de facon
  probablement irremediable. Faites attention, cela  m'est  deja  arrive
  par accident.

  33..22..  RRaasssseemmbblleerr lleess llooggiicciieellss

  En  general cela prend plus de temps qu'on ne le croit ; Rappelez-vous
  que les fichiers manquants ne peuvent pas etre ajoutes une fois que le
  CD est ecrit. :-)

  Gardez  aussi  a l'esprit qu'un certain montant de l'espace libre d'un
  CD est utilise  pour  stocker  les  informations  sur  le  systeme  de
  fichiers ISO 9660 (en general quelques Mo).

  33..33..  SSttoocckkeerr lleess ddoonnnneeeess ssuurr uunn CCDD

  Le  terme  _I_S_O _9_6_6_0 se rapporte au format dans lequel les donnees sont
  stockees sur le CD, pour etre  plus  precis  :  c'est  le  systeme  de
  fichiers sur le CD.

  Bien  sur,  l'apparence des fichiers stockes dans ce format est unifie
  par le noyau Linux comme pour tout autre systeme de fichiers. Si  vous
  montez  un  CD dans l'arborescence des repertoires, vous ne pouvez pas
  distinguer son contenu des autres fichiers... a part le fait qu'on  ne
  peut  ecrire  dessus...  meme pas pour root. :-) (Le mecanisme utilise
  pour unifier l'apparence des fichiers est appele _s_y_s_t_e_m_e  _d_e  _f_i_c_h_i_e_r_s
  _v_i_r_t_u_e_l, en abrege _V_F_S.

  Les  possibilites de ISO 9660 ne sont pas si riches comparees a celles
  du systeme de fichiers ext-2 qui est normalement utilise  sous  Linux.
  Par  contre,  le  CD n'est inscriptible qu'une seule fois et certaines
  possibilites n'ont meme pas de sens. Les  limitations  du  systeme  de
  fichiers ISO 9660 sont :

  +o  uniquement  huit  niveaux  de sous-repertoires autorises (comptes a
     partir  du  repertoire  racine  du  CD)  (utilisez  les  extensions
     RockRidge pour augmenter ce chiffre) ;

  +o  longueur maximale des noms de fichiers : 32 caracteres ;

  +o  capacite de 650 Mo.

  33..44..  CCrreeeerr uunn ssyysstteemmee ddee ffiicchhiieerrss IISSOO 99666600

  Avant  de  pouvoir  utiliser  un  support de stockage (par exemple une
  disquette, un disque dur ou un  CD),  il  doit  avoir  un  systeme  de
  fichiers  (en  langage DOS : etre formate). Ce systeme de fichiers est
  responsable de l'organisation et de l'incorporation des  fichiers  qui
  devraient etre stockes sur le support.

  Bon,  un  CD  inscriptible  ne  l'est  _q_u_'_u_n_e  _f_o_i_s  et donc si nous y
  ecrivons un systeme de  fichiers  vide,  il  serait  formate  --  mais
  resterait pour l'eternite completement vide. :-)

  Nous  avons  donc besoin d'un outil qui cree le systeme de fichiers en
  meme temps qu'il copie les fichiers sur le  CD.  Cet  outil  s'appelle
  mkisofs. Une utilisation simple ressemble a ceci :

                        mkisofs  -r -K  -o cd_image   collection_privee/
                                        `---------'   `----------------'
                                             |                |
                          ecrire la sortie vers    prendre repertoire comme entree

  L'option  -r positionne les permissions de tous les fichiers pour etre
  lisibles publiquement sur le CD et permet les extensions  Rock  Ridge.
  C'est  ce  qu'on  veut en general et l'utilisation de cette option est
  recommandee jusqu'a ce que vous sachiez ce que vous faites. (Astuce  :
  sans   le   -r,   le   point  de  montage  prend  les  permissions  de
  collection_privee !) L'option -K corrige simplement  une  erreur  dans
  l'implementation  Linux  et  empeche  le  dernier fichier du CD d'etre
  detruit (pas vraiment, mais Linux ne peut  pas  le  lire).  Vous  avez
  besoin  de  la  version patchee de mkisofs pour cela. Cette option est
  equivalente a l'option -P de cdwrite.

  Veuillez regarder la page de manuel de mkisofs pour plus de details.

  mkisofs essaiera de convertir tous les noms de fichiers au format  8.3
  utilise  par  DOS  pour  assurer une compatibilite maximale. En cas de
  conflits de noms (des fichiers differents qui  auraient  le  meme  nom
  8.3),  des  numeros  sont  utilises  dans  les noms de fichiers et les
  informations sur le nom de fichier choisi sont imprimees sur  l'erreur
  standard (en general l'ecran).

  NNee  ppaanniiqquueezz  ppaass  ::  sous  Linux,  vous  ne verrez jamais ces noms de
  fichiers 8.3 parce que Linux utilise les  extensions  Rock  Ridge  qui
  contiennent les informations d'origine du fichier (permissions, nom de
  fichier, etc.)

  Maintenant vous pouvez vous demander pourquoi  la  sortie  de  mkisofs
  n'est  pas envoyee directement au peripherique de gravage. Ceci est du
  a deux raisons :

  +o  mkisofs ne connait rien sur la maniere de piloter les  graveurs  de
     CD (voir la section ``'') ;

  +o  On ne peut pas compter sur cette methode (voir ``'').

  La  synchronisation d'un graveur de CD est un point tellement critique
  que nous ne le remplissons pas directement avec mkisofs (rappelez-vous
  que Linux n'est pas un systeme d'exploitation en temps reel et que les
  taches peuvent etre mal temporisees). A la place, il est recommande de
  stocker la sortie de mkisofs dans un fichier separe sur le disque dur.
  Ce fichier est alors une image parfaite du CD a venir et est  en  fait
  ecrite sur le CD avec l'outil cdwrite dans un deuxieme temps.

  L'image parfaite est stockee dans un fichier enorme, et vous avez donc
  besoin de la meme quantite d'espace disque libre que ce  que  prennent
  vos  logiciels  rassembles.  C'est  le  probleme. On pourrait penser a
  creer une partition supplementaire pour cela  et  ecrire  l'image  sur
  cette  partition  plutot  que  dans  un  fichier. Je suis contre cette
  strategie parce que si vous ecrivez sur la mauvaise partition (a cause
  d'une  faute  de  frappe),  vous  pouvez perdre votre systeme Linux en
  entier. De plus, c'est du gachis d'espace disque parce que l'image  du
  CD  represente  des  donnees temporaires que l'on pourra effacer apres
  avoir grave le CD.

  33..55..  TTeesstteerr ll''iimmaaggee CCDD

  Linux a la possibilite de monter des fichiers  comme  si  c'etait  des
  partitions  de  disques.  Ceci  est  tres  utile  pour  verifier si la
  structure des rerpertoires de l'image du CD est bonne.

  Pour monter le fichier cd_image  cree  ci-dessus  dans  le  repertoire
  /cdrom, envoyez la commande

       mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /cdrom

  Vous  pouvez  maintenant  inspecter  les  fichiers  sous /cdrom -- ils
  apparaissent exactement comme ils le seraient sur  un  _v_r_a_i  CD.  Pour
  demonter  l'image  CD,  tapez simplement umount /cdrom. Attention : si
  vous n'avez pas utilise l'option -K avec mkisofs, le  dernier  fichier
  sur /cdrom peut ne pas etre entierement lisible.

  Note  :  certaines versions anciennes de mount ne savent pas manipuler
  les peripheriques _l_o_o_p_b_a_c_k. Si vous  avez  une  version  de  mount  si
  vieille que ca, c'est une indication pour mettre votre systeme Linux a
  jour.

  Plusieurs personnes m'ont deja suggere de mettre des informations  sur
  la  maniere  d'obtenir  les  dernieres versions de mount dans ce mini-
  HOWTO.  Je refuse toujours de le faire. Si  votre  distribution  Linux
  contient  un  vieux  mount,  dites-leur que c'est une erreur. Si votre
  distribution Linux se met a jour difficilement, dites-leur  que  c'est
  une erreur.

  Si   je   devais  donner  toutes  les  informations  necessaires  pour
  contourner les erreurs des distributions Linux mal  faites,  ce  mini-
  HOWTO serait beaucoup plus gros et dur a lire.

  33..66..  RReemmaarrqquueess ssuurr lleess ddiissqquueess CCDD RReeiinnssccrriippttiibblleess vviieerrggeess

  Le  magazine  informatique  allemand  cc''tt  donne  une  liste  de trucs
  concernant les CD vierges dans leur numero de novembre 1996 :

  +o  les disques ``sans-noms'' ne sont en general pas de la plus  grande
     qualite et il vaut mieux ne pas les utiliser ;

  +o  si  un  CD reinscriptible est defectueux, il y a des chances que ca
     soit la meme chose pour le paquet entier (vous en avez achete  plus
     d'un  a  la  fois)  ; vous avez peut-etre de la chance et pouvez au
     moins utiliser les 500 premiers Mo de tels CDs...

  +o  ne touchez pas les CD sur leur face brillante avant l'ecriture.

  33..77..  EEccrriivveezz ll''iimmaaggee dduu CCDD ssuurr uunn CCDD

  Plus grand chose a faire. Avant de vous montrer la derniere  commande,
  laissez-moi  vous  avertir  que  les  graveurs  de  CDs  doivent  etre
  alimentes par un flot continu de donnees parce  qu'ils  n'ont  que  de
  petits caches de donnees. Le processus d'ecriture de l'image CD sur le
  CD ne doit donc pas etre interrompue ou bien le  resultat  est  un  CD
  corrompu.

  Pour  etre  sur que rien ne vient interrompre le processus, virez tous
  les utilisateurs de votre systeme et debranchez le  cable  Ethernet...
  Lisez le ``Bastard Operator From Hell'' pour en apprendre sur la bonne
  attitude a adopter. ;-)

  Si vous etes pret mentalement, mettez  une  blouse  noire,  multipliez
  l'ID SCSI du graveur de CD par son numero de version et allumez autant
  de bougies, recitez deux strophes de la FAQ ASR et finalement tapez :

       cdwrite --device /dev/sgd cd_image

  ou bien

       cdrecord -v speed=2 dev=4,0 cd_image

  selon le logiciel que  vous  voulez  utiliser.  Vous  devez  bien  sur
  remplacer  le  peripherique  d'exemple par le peripherique SCSI auquel
  votre graveur de CD est connecte.

  Veuillez noter qu'autant graveur ne peut repositionner  son  laser  et
  continuer au point ou il a ete derange. Par consequent toute vibration
  forte ou meme un choc detruira completement le CD  que  vous  etes  en
  train de graver.

  33..88..  SSii qquueellqquuee cchhoossee vvaa mmaall......

  dessous de bouteilles. :-)

  44..  QQuueessttiioonnss ffrreeqquueemmmmeenntt ppoosseeeess,, aavveecc lleess rreeppoonnsseess

  44..11..  ````AA qquueell ppooiinntt llee pprroocceessssuuss ddee bbrruulluurree eesstt--iill sseennssiibbllee ??''''

  Reponse  :  cela  depend  de  votre  graveur.  Les  graveurs  modernes
  devraient  avoir  un  tampon  de donnees de 1 Mo a peu pres et peuvent
  tenir une a deux secondes sans donnees. Voyez les manuels ou  demandez
  au  fabricant  si vous voulez connaitre les details. Independamment de
  la taille de ces tampons, vous devez garantir un debit constant de 300
  Ko/s ou 600 Ko/s sur une longue periode.

  Les  processus  qui utilisent beaucoup le disque, comme la mise a jour
  de la base  de  donnees  ``locate''  diminuent  le  debit  maximum  et
  abimeront  certainement  le  CD ; vous feriez mieux de verifier que de
  tels processus ne sont pas demarres par cron, at  ou  anacron  pendant
  que vous gravez des CD-Rs.

  Par  contre, certaines personnes m'ont dit qu'elles avaient compile un
  noyau pendant le gravage d'un CD sans aucun probleme. Vous aurez  bien
  sur besoin d'une machine rapide pour de telles experiences.

  44..22..  ````LLaa ffrraaggmmeennttaattiioonn aa--tt--eellllee ddeess mmaauuvvaaiiss eeffffeettss ssuurr llee fflloott ??''''

  La fragmentation est en general tellement basse qu'on ne remarque  pas
  son impact.

  Si  vous n'en etes pas certain, regardez les messages imprimes lors du
  demarrage, le  pourcentage  de  fragmentation  est  donne  los  de  la
  verification du systeme de fichiers. Vous pouvez verifier cette valeur
  avec la commande tres dangereuse

                       bash$ e2fsck -n  /dev/sda5        # '-n' est important !
                       [partie effacee -- ignorez toute erreur]
                       /dev/sda5: 73/12288 files (12.3% non-contiguous)

  Dans cet exemple, la fragmentation semble etre tres grande -- mais  il
  n'y  a que 73 fichiers tres petits sur ce systeme de fichiers (utilise
  sur /tmp) et la valeur _n_'_e_s_t _p_a_s alarmante.

  44..33..  ````EEsstt--iill ppoossssiibbllee ddee  ssttoocckkeerr  ll''iimmaaggee  CCDD  ssuurr  uunn  ssyysstteemmee  ddee
  ffiicchhiieerr UUMMSSDDOOSS ??''''

  Oui. Le seul systeme de fichiers ni assez fiable ni assez rapide  pour
  graver  des CD est NFS (_N_e_t_w_o_r_k _F_i_l_e_S_y_s_t_e_m, systeme de fichiers par le
  reseau).

  J'utilise moi-meme UMSDOS pour partager l'espace disque entre Linux et
  DOS/Win sur un PC (486/66) dedie au gravage des CDs.

  44..44..   ````YY aa--tt--iill uunn mmooyyeenn ddee ppaasssseerr oouuttrree lleess lliimmiittaattiioonnss ddee IISSOO 99666600
  ??''''

  Oui.  Vous  pouvez mettre le systeme de fichiers qui vous plait sur le
  CD.  Mais certains systemes d'exploitation ne pourront rien en  faire.

  Voici la recette :

  +o  creez un fichier vide d'une taille de 650 Mo :

                       dd if=/dev/zero of="fic_vide" bs=1024k count=650

  +o  creez un systeme de fichiers ext2 sur ce fichier :

                       bash$ /sbin/mke2fs fic_vide
                       fic_vide is not a block special device.
                       Proceed anyway? (y,n) y

  (NdT : mke2fs demande confirmation de creer le systeme de fichiers sur
  un fichier normal.) ;

  +o  montez ce fichier vide a l'aide du peripherique _l_o_o_p_b_a_c_k :

                       mount -t ext2 -o loop=/dev/loop1 fic_vide /mnt

  +o  copiez les fichiers vers /mnt et demontez-le apres (umount) ;

  +o  utilisez cdwrite ou cdrecord sur fic_vide  (qui  n'est  plus  vide)
     comme si c'etait une image ISO 9660.

  Si  vous  voulez  creer  une  entree  dans  /etc/fstab pour un tel CD,
  desactivez sa verification, par exemple :

               /dev/cdrom      /cdrom  ext2    defaults,ro     0  0

  Le premier 0 veut dire "ne me compte pas dans les dumps", la  deuxieme
  (importante) veut dire "ne verifie pas les erreurs au demarrage" (fsck
  n'arrivera pas a verifier les erreurs eventuelles sur le CD).

  44..55..  ````CCoommmmeenntt lliirree eett eeccrriirree ddeess CCDDss aauuddiioo ??''''

  Veuillez prendre les  paquetages  cdda2wav  et  sox,  disponibles  sur
  sunsite et ses miroirs :

       ftp://sunsite.unc.edu/pub/Linux/apps/sound/cds/cdda2wav0.71.src.tar.gz
       ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/sox-11gamma-cb2.tar.gz

  cdda2wav vous permet de prendre un intervalle specifique (ou une plage
  entiere) de votre CD audio et le convertit en un  fichier  .wav.   sox
  convertit  les  fichiers wav dans le format cdda (CD audio) pour qu'on
  puisse l'ecrire sur le CD-R avec cdwrite.

  44..66..  ````CCoommmmeenntt rreecchheerrcchheerr ddeess ppeerriipphheerriiqquueess SSCCSSII aapprreess  llee  ddeemmaarrrraaggee
  ??''''

  Le fichier drivers/scsi/scsi.c  contient  les  informations  suivantes
  (NdT : traduites en francais) :

  ______________________________________________________________________
  /*
   * Utilisation : echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
   * avec "0 1 2 3" remplaces par vos "Carte Canal Id Lun".
   * Considerez ceci comme une caracteristique BETA.
   *     ATTENTION : Ceci n'est pas fait pour brancher vos
   *     peripheriques a chaud. Comme le SCSI n'a pas ete fait
   *     pour ca, vous pouvez endommager votre materiel !
   * Cependant il est peut-etre autorise d'allumer un
   * peripherique deja branche. Il n'est peut-etre pas garanti
   * que ce peripherique ne corrompe pas un transfert de donnees
   * en cours.
   */
  ______________________________________________________________________

  44..77..   ````EEsstt--iill  ppoossssiibbllee ddee ffaaiirree uunnee ccooppiiee eexxaaccttee dd''uunn CCDD ddee ddoonnnneeeess
  ??''''

  Oui.  Mais  vous devriez etre conscient du fait que toute erreur faite
  en lisant l'original (due a la poussiere ou a des rayures) donnera une
  copie defectueuse.

  Premier  cas  :  vous  avez  un graveur de CDs et un lecteur de CD-ROM
  separe. En tapant la commande :

       cdwrite -v -D /dev/sgc --pad -b  `isosize  /dev/scd0` /dev/scd0

  ou

       cdrecord -v dev=3,0 speed=2 -isosize /dev/scd0

  vous lisez le flot de donnees du lecteur de CD-ROM attache a /dev/scd0
  et l'ecrivez directement sur le graveur par /dev/sgc.

  Deuxieme cas : vous n'avez pas de lecteur de CD-ROM separe. Vous devez
  utiliser le graveur pour lire le CD-ROM comme ceci :

       dd if=/dev/scd0 of=cdimage bs=1c count=`isosize  /dev/scd0`

  Cette commande est equivalente au  resultat  de  mkisofs,  vous  devez
  continuer  tel  que c'est decrit a la section ``''. Veuillez noter que
  cette methode ne fonctionnera pas sur des CDs audio !

  44..88..  ````LLiinnuuxx ppeeuutt--iill lliirree ddeess CCDDss JJoolliieett ??''''

  Oui. Mais vous devez patcher le noyau et le recompiler. Pour  plus  de
  details,                      voyez                       <http://www-
  plateau.cs.berkeley.edu/people/chaffee/joliet.html>.

  44..99..  ````CCoommmmeenntt ppuuiiss--jjee lliirree//mmoonntteerr ddeess CCDD--RROOMMss aavveecc llee ggrraavveeuurr ddee CCDDss
  ??''''

  Comme vous le feriez avec un lecteur de CD-ROM normal.  Aucune  astuce
  la-dessous.

  Notez que vous devez utiliser les peripheriques scd (CD-ROM SCSI) pour
  monter les CDs en lecture. Voici un exemple pour /etc/fstab :

               /dev/scd0       /cdrom  iso9660 ro,user,noauto  0  0

  55..  DDeeppaannnnaaggee

  55..11..  CCaa nnee mmaarrcchhee ppaass :: ssoouuss LLiinnuuxx

  Veuillez d'abord verifier que le  graveur  fonctionne  avec  un  autre
  systeme d'exploitation. Concretement :

  +o  Est-ce que le controleur reconnait le graveur comme un peripherique
     SCSI ?

  +o  Est-ce que le logiciel pilote reconnait le graveur ?

  +o  Est-il possible de fabriquer un CD avec les logiciels fournis ?

  55..22..  CCaa nnee mmaarrcchhee ppaass :: ssoouuss DDOOSS eett aassssiimmiilleess

  Essayez d'utiliser  Linux.  L'installation  et  la  configuration  des
  pilotes SCSI pour DOS est une horreur. Linux est trop complique ? Ha !

  55..33..  EErrrreeuurrss SSCCSSII ppeennddaanntt llaa pphhaassee ddee ggrraavvaaggee

  Il est fort probable que ces erreurs soient dues a :

  +o  possibilite de _d_i_s_c_o_n_n_e_c_t_/_r_e_c_o_n_n_e_c_t manquant sur le bus SCSI ;

  +o  materiel pas assez refroidi ;

  +o  materiel defectueux (devrait etre detecte par ``'').

  Sous des circonstances variees, les peripheriques SCSI se deconnectent
  et  se  reconnectent  par  eux-memes  (de maniere electronique) du bus
  SCSI.  Si  cette  possibilite  n'est  pas  disponible   (verifiez   le
  controleur  et  les  parametres  du  noyau), certains graveurs ont des
  problemes pendant le gravage ou le fixage du CD-R. En particulier,  le
  pilote SCSI NCR 53c7,8xx a cette possibilite desactivee par defaut, et
  vous devriez donc verifier ceci en premier :

               NCR53c7,8xx SCSI support                  [N/y/m/?] y
                  always negotiate synchronous transfers [N/y/?] (NEW) n
                  allow FAST-SCSI [10MHz]                [N/y/?] (NEW) y
                  allow DISCONNECT                       [N/y/?] (NEW) y

  66..  RReemmeerrcciieemmeennttss

  Andreas  Erdmann,  erdmann@zpr.uni-koeln.de,  a  fourni  l'exemple  du
  graveur Yamaha ;

  Art  Stone,  stone@math.ubc.ca,  a eu l'idee de mettre des systemes de
  fichiers non ISO 9660 sur un CD ;

  Bernhard Gubanka, beg@ipp-garching.mpg.de, a remarque le besoin  d'une
  version recente de mount pour utiliser le peripherique loopback ;

  Brian H. Toby a fignole l'orthographe ;

  Bruce  Perens,  bruce@pixar.com, a donne des informations sur la liste
  de distribution cdwrite ;

  Edwin H. Kribbs a remarque que -K necessite de patcher mkisofs ;

  Gerald C Snyder, gcsnyd@loop.com, a teste l'ecriture d'un CD-ROM ext-2
  (voir ``'') ;

  Ingo  Fischenisch,  ingo@mi.uni-koeln.de,  a fourni l'exemple des deux
  controleurs hebergeant deux peripheriques ;

  Janne Himanka, shem@oyt.oulu.fi, pointeur vers le patch du noyau  pour
  lire des CDs Joliet ;

  Joerg Schilling, schilling@fokus.gmd.de, informations sur cdrecord ;

  Jos van Geffen, jos@tnj.phys.tue.nl, a note le probleme dans ``'' ;

  Markus Dickebohm, m.dickebohm@uni-koeln.de ;

  Pierre  Pfister,  pp@uplift.fr,  a  aide  a  developper la recette des
  copies exactes ;

  Rick  Cochran,   rick@msc.cornell.edu,   indice   sur   dis-/reconnect
  desactive par defaut dans le pilote NCR ;

  Stephan Noy, stnoy@mi.uni-koeln.de, des informations et son experience
  sur l'ecriture de CDs audio ;

  Stephen Harris, sweh@mpn.com, a donne des indices sur  l'ecriture  des
  CDs audio ;

  The  Sheepy One, kero@escape.com, a suggere l'utilisation des CD rates
  en dessous de bouteilles ;

  Volker Kulhmann,  kuhlmav@elec.canterbury.ac.nz,  a  remarque  que  le
  paquetage cdwrite ne contient pas mkisofs.

  Le Modem Cble
  VVllaaddiimmiirr VVuukkssaann,, vuksan@veus.hr
  _a_d_a_p_t_a_t_i_o_n _f_r_a_n__a_i_s_e _: Thierry Le Quau (celeborn@club-
  internet.fr) _a_n_c_i_e_n_n_e _v_e_r_s_i_o_n _: David Cotton (dcot
  ton@nat.fr)
  v4.1, 20 May 1999

  Ce document essaie de rpondre aux questions de base pour configurer
  un modem cble ou vous connecter  un fournisseur d'accs  internet
  via le cble.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Nouvelles versions de ce document
     1.2 Commentaires
     1.3 Contributeurs
     1.4 Avertissement
     1.5 Informations de Copyright

  2. Installer votre carte Ethernet

  3. Fournisseur d'accs par modem cble standard

     3.1 MediaOne Express
     3.2 @Home
     3.3 RoadRunner
     3.4 Rogers Wave
     3.5 Sunflower Cablevision
     3.6 Jones Intercable
     3.7 GTE Worldwind
     3.8 SpeedChoice, Phoenix, Arizona
     3.9 Cedar Falls Cybernet, Iowa
     3.10 Telstra Bigpond Cable, Australia
     3.11 Fibertel, Buenos Aires, Argentina
     3.12 Videotron, Canada
     3.13 Telekabel (Teleweb), Austria
     3.14 Tebecai, Netherlands
     3.15 A2000, Netherlands
     3.16 Shaw Cable, Canada
     3.17 Cogeco Cable, Canada
     3.18 Optimum Online, New York et Connecticut
     3.19 Singapore Cable Vision, Singapore
     3.20 Wanadoo Cable, France
     3.21 Prime Cable Expressnet, Las Vegas, NV
     3.22 TVD, Belgium

  4. Modems cbles hybrides ISP

     4.1 Adelphia Powerlink
     4.2 LinkExpress, Brasil
     4.3 ExpressNet, Maryland
     4.4 Charter Pipeline, Riverside, CA
     4.5 Chambers Cable, Chico, CA / Fundy Cable, New Brunswick


  ______________________________________________________________________


  11..  IInnttrroodduuccttiioonn

  Le but principal de ce document est de configurer votre modem et votre
  accs internet par le cble.  Malheureusement,la plupart des
  fournisseurs d'accs  Internet (FAI) par cble ne vous fournissent
  que des logiciels fonctionnant sous Windows ou Macintoch.

  Ce HowTo essaie de vous expliquer comment configurer les modems et
  l'accs Internet via le cble sous Linux, les trucs et astuces pour
  que tout fonctionne correctement, et les piges  viter.  J'espre
  que ce document vous aidera, cependant je ne garantis pas la validit
  des informations.


  11..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document seront postes rgulirement sur
  _c_o_m_p_._o_s_._l_i_n_u_x_._a_n_s_w_e_r_s. Elles seront galement disponible sur de
  multiples sites FTP contenant des informations sur Linux,tels que  :





  De plus, vous devriez trouver ce document sur la page du Linux
  Documentation Project   :




  11..22..  CCoommmmeennttaaiirreess

  Vos commentaires sont fortement bienvenus. Sans vos remarques et
  ajouts, ce document n'existerait pas. Aussi, n'hsitez pas  m'crire
  pour vos ajouts, remarques et critiques  vuksan@veus.hr.


  11..33..  CCoonnttrriibbuutteeuurrss

  Les personnes suivantes ont contribu  ce mini-HowTo.



    Dan Sullivan, dsulli@home.com

    Andrew Novick

    Michael Strates


  11..44..  AAvveerrttiisssseemmeenntt

  Je n'endosserai aucune responsabilit sur le contenu de ce HowTo.
  Utilisez la mthode, les exemples et le reste  vos risques et prils.
  Comme toute nouvelle dition, celle-ci contient srement des erreurs,
  qui peuvent bien sr endommager votre systme, bien que ce soit peu
  probable. Procdez avec prudence, je me dgage de toute
  responsabilit.

  Gardez aussi en mmoire que ce n'est PAS une documentation officielle.
  Celle-ci est gnralement absente pour la plupart des fournisseurs
  d'accs  Internet.  Beaucoup de choses sont des prsomptions, qui
  fonctionnent pour beaucoup de monde. Utilisez ces informations  vos
  propres risques.


  11..55..  IInnffoorrmmaattiioonnss ddee CCooppyyrriigghhtt

  Ce document est la proprit de Vladimir Vuksan et est distribu selon
  les conditions suivantes  :
    Les documents HowTo sur Linux peuvent tre reproduits et distribus
     en totalit ou en partie, de n'importe qu'elle manire, qu'elle
     soit traditionnelle ou lectronique,  partir du moment o cette
     notice y apparat.  La redistribution commerciale est autorise et
     encourage  ; cependant, l'auteur souhaiterait en tre averti.

    Toute traduction, travaux drivs ou agrs inclus dans les HowTos
     de Linux doivent tre couverts par cette notice.  Je veux dire par
     l, que vous ne pouvez pas fournir un travail issu de ce HowTo en
     imposant des restrictions supplmentaires  sa distribution.  Des
     exceptions  ces rgles peuvent tre accordes sous certaines
     conditions  ; pour cela, ayez l'obligeance de contactez le
     coordinateur des HowTo pour Linux  l'adresse ci-dessous.

    Si vous avez des questions, svp, contactez le coordinateur des
     HowTo pour Linux   :

     linux-howto@sunsite.unc.edu


  22..  IInnssttaalllleerr vvoottrree ccaarrttee EEtthheerrnneett

  Toutes les installations ci-dessous utilisent des cartes Ethernet
  (cartes rseaux) pour se connecter  Internet. C'est pourquoi, avant
  toute chose, nous devons vrifier que votre carte fonctionne et, plus
  important, si elle est reconnue sous Linux.  Vous trouverez le HowTo
  Ethernet  http://sunsite.unc.edu/LDP/HOWTO/Ethernet-HOWTO.html _(_N_d_T _:
  _l_a _v_e_r_s_i_o_n _f_r_a_n__a_i_s_e _e_s_t _a_c_c_e_s_s_i_b_l_e _s_u_r
  _h_t_t_p_:_/_/_w_w_w_._f_r_e_e_n_i_x_._f_r_/_l_i_n_u_x_/_H_O_W_T_O_/_E_t_h_e_r_n_e_t_-_H_O_W_T_O_._h_t_m_l
  _<http://www.freenix.fr/linux/HOWTO/Ethernet-HOWTO.html> et
  ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/Ethernet-HOWTO.gz
  <ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/Ethernet-HOWTO.gz>) si
  vous tes intress par sa lecture, sinon essayez ce qui suit  :




  Lancez linux, durant le dmarrage vous pourrez lire un message du
  genre :

   eth0: 3c509 at 0x300 tag 1, 10baseT port, address  00 20 af ee 01 23,
  IRQ 10.
  3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov

  Si vous n'avez pas russi  le lire, relisez le fichier dmseg.

  Si vous pouvez lire ces lignes, c'est que votre carte est reconnue,
  vous pouvez passer  la section suivante. S'il n'y a aucune trace de
  ce message, deux possibilits  :
  - votre carte est PNP (Plug and Play)et vous avez besoin d'utiliser
  d'autres outils comme isapnptools pour la faire reconnatre (n'ayant
  pas de carte PNP, je ne suis pas tout  fait sr de cela, aussi
  corrigez-moi si besoin).
  - vous avez besoin de configurer votre carte.

  Aujourd'hui, la plupart des cartes ont un programme standard dos pour
  les configurer. Par exemple, pour faire fonctionner ma carte 3com
  3C509 j'ai juste besoin de dmarrer sous dos et de lancer l'utilitaire
  fourni pour la configurer.  Il y a gnralement une option pour la
  configurer automatiquement.  Si cela ne rsoud pas votre problme,
  essayer de changer l'IRQ et ressayez l'installation.  J'ai trouv que
  les IRQ 10, 11 et 12 fonctionnaient bien.  Si rien n'y fait, lisez le
  HowTo Ethernet  l'adresse ci-dessus ou postez un message sur le
  newsgroup comp.os.linux.setup ou comp.os.linux.networking.


  33..  FFoouurrnniisssseeuurr dd''aaccccss ppaarr mmooddeemm ccbbllee ssttaannddaarrdd

  Si vous pensez que votre carte est reconnue, vous devez maintenant
  vrifier les entres chez votre fournisseur. J'ai tri les infos par
  F.A.I.(Fournisseur d'Accs  Internet) parce qu'ils utilisent la
  plupart du temps une installation spcifique.


  33..11..  MMeeddiiaaOOnnee EExxpprreessss

  MediaOne Express est un service d'accs  Internet par le cble
  dispens par MediaOne. L'installation matrielle consiste en un modem
  cble produit par LanCity ou General Instrument qui se branche  une
  carte Ethernet au moyen d'un cble 10BaseT (UTP-45). La dtermination
  des adresses IP et autres information rseau est ralise grce au
  DHCP soit "Dynamic Host Configuration Protocol" _(_N_d_T _: _p_r_o_t_o_c_o_l_e
  _r__s_e_a_u _p_e_r_m_e_t_t_a_n_t _a_u _s_e_r_v_e_u_r _d_e _d__f_i_n_i_r _d_y_n_a_m_i_q_u_e_m_e_n_t _l_e_s _p_a_r_a_m__t_r_e_s
  _d_e _l_a _c_o_n_n_e_x_i_o_n_). L'unique chose dont vous ayez besoin est de lire le
  "mini-HOWTO" DHCPcd et de configurer votre systme en consquence.
  Aucune autre configuration n'est ncessaire. Le "mini-HOWTO" DHCPcd
  peut tre trouv  l'adresse
  http://sunsite.unc.edu/LDP/HOWTO/mini/DHCPcd.html
  <http://sunsite.unc.edu/LDP/HOWTO/mini/DHCPcd.html> _(_N_d_T _: _l_a
  _t_r_a_d_u_c_t_i_o_n _f_r_a_n__a_i_s_e _e_s_t _a_u_x _a_d_r_e_s_s_e_s
  _h_t_t_p_:_/_/_w_w_w_._f_r_e_e_n_i_x_._f_r_/_l_i_n_u_x_/_H_O_W_T_O_/_m_i_n_i_/_D_H_C_P_c_d_._h_t_m_l
  _<http://www.freenix.fr/linux/HOWTO/mini/DHCPcd.html> et
  ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/mini/DHCPcd.gz
  <ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/mini/DHCPcd.gz>).

  Les infos sur les services fournis par MediaOne peuvent tre trouvs
  sur http://www.mediaone.com.



  33..22..  @@HHoommee

  La configuration de @Home est similaire  celle de ``MediaOne''.
  Cependant, il y a quelques diffrences fondamentales, bauches par
  des contributeurs.  Depuis que @Home utilise diffrents points
  gographiques, vous pouvez tre confronts  d'autres quipements et
  avoir une installation lgrement diffrente.


  Avant de tenter quoi que ce soit, allez sous Windows dans Panneau de
  configuration / Rseau / Proprits  de votre carte rseau. Notez
  toutes les informations. Vous en aurez besoin plus tard.



  TCI, la compagnie qui gre @Home procure une carte Etherlink III
  3c509b NIC  tous ses abonns. Ce que TCI ne vous dit pas, c'est que
  lorsqu'ils installent votre carte Ethernet c'est en mode PNP. Avec la
  distribution Slackware, si vous tez le commentaire de la ligne
  concernant cette carte, tout semblera fonctionner correctement. Il n'y
  aura aucun problme avec le systme, mais la diode 'PC' de votre modem
  CyberSURFR ne s'allumera jamais. Si vous utilisez la Slackware, et que
  vous avez ce problme, redmarrez sous DOS et sautez le paragraphe
  suivant.


  Avec la RedHat5, votre systme aura quelques difficults pour dtecter
  automatiquement la carte. Si vous essayez de transmettre les
  paramtres manuellement, le systme s'effondrera. Il semble vident
  que votre carte n'est pas configure correctement. Avant de perdre
  encore plus de temps, redmarrez sous DOS (C'est une obligation due au
  fait qu'au 25/12/97 il n'existe toujours pas d'utilitaire sous Linux
  permettant de dsactiver le PNP au profit de l'ISA).


  TCI ne fournit pas de disquette d'utilitaires pour votre carte
  Ethernet, donc vous devez les tlcharger sur l'un des sites de 3Com.
  Voici un lien direct vers le fichier ncessaire  :
  ftp://ftp.3com.com/pub/network-interface-cards/shipping-
  drivers/3c509x.exe <ftp://ftp.3com.com/pub/network-interface-
  cards/shipping-drivers/3c509x.exe>



  ou http://support.3com.com/infodeli/tools/nic/index.htm

  Une fois les drivers tlchargs vous devrez les lancer pour
  dsactiver le mode PNP de votre carte rseau.


  Ce que vous venez de faire  "cass" le lien de votre carte pour
  Windows 95. Vous allez devoir aller dans Panneau de configuration /
  Rseau pour retirer votre carte et son adaptateur. Relancez votre
  machine et retournez  nouveau dans Panneau de configuration. Allez
  dans Ajout/Suppression de programmes  et acceptez la recherche
  automatique. Cela rglera automatiquement la bonne adresse d'E/S pour
  vous.  Vous aurez trs certainement besoin de redmarrer votre
  machine. Maintenant vous devriez tre sous Windows 95, avec la diode
  'PC' de votre modem cble allume.  Vous remarquerez aussi qu'aucune
  de vos applications Internet ne semble fonctionner, vous ne pouvez ni
  effectuer de ping, ni configurer vos DNS. Vous devez de nouveau aller
  dans Panneau de configuration / Rseau  et slectionner les Proprits
  de votre carte (pas de son adaptateur). Retapez toutes les donnes que
  vous aviez notes auparavant et redmarrez votre machine.



  Avec un peu de chance, votre carte Ethernet devrait fonctionner avec
  Windows 95 et tre prte  basculer sous Linux.

  Si vous rsidez  Hampton Roads, VA _(_N_d_T _: _V_i_r_g_i_n_i_e_) vous devriez lire
  la brve note de Mark Solomon :



  Avec le service de @Home  Hampton Roads, VA, il est absolument
  ncessaire d'utiliser dhcpcd-0.70 (ou suprieur) supportant l'option
  "-h" pour dterminer le nom de votre machine. Sans cette option, le
  serveur DHCPcd de @Home refusera d'assigner des adresses.


  Plus d'informations sur l'installation de dhcpcd-0.70 et les services
  de @Home avec les cartes Ethernets express d'Intel peuvent tre
  trouves sur leur site Web  l'adresse
  http://www.monmouth.com/~jay/Linux/



  NNootteess ppoouurr BBaallttiimmoorree,, MMDD aanndd CCoolllleeyyvviillllee,,TTXX:


  A Baltimore, on fournit aux abonns une carte Intel Ether Express Pro
  10 et une adresse IP statique.


  NNootteess ppoouurr MMiillppiittaass,,CCAA ((nnddtt ::CCaalliiffoorrnniiee)),, UUSSAA ((JJooee BByyrrnnee
  bbyyrrnnee@@wweellll..ccoomm))  :

  @Home service fournit des cartes 3Com 509b. Les adresses IP sont
  statiques.


  Les infos sur @Home Service peuvent tre trouves 
  http://www.home.com.


  33..33..  RRooaaddRRuunnnneerr

  RoadRunner est un service Internet cbl fournit par le groupe
  Excalibur (Time Warner). L'installation matrielle consiste en un
  modem cble produit par Motorola et Toshiba se connectant au moyen
  d'un cble 10BaseT (UTP-45)  une carte Ethernet. Pour les
  renseignements que j'ai pu rcolter, RR utilise le protocole DHCP.
  Pour l'installation sous Linux, vous aurez besoin de lire le mini-
  HowTo DHCP pour configurer votre systme de faon adquate.  Le mini-
  HowTo DHCP peut tre trouv   :
  http://metalab.unc.edu/LDP/HOWTO/mini/DHCP.html.


  Si a ne marche toujours pas, vous pouvez vrifier 
  http://www.math.uakron.edu/RoadRunner/ Pour Akron, l'Ohio et San
  Diego, Californie  http://people.qualcomm.com/karn/rr/index.html cela
  pourra vous aider  rsoudre votre problme.


  Un autre bon endroit  http://www.vortech.net/rrlinux/.


  Les infos sur RoadRunner Service peuvent tre trouves 
  http://www.rr.com.


  33..44..  RRooggeerrss WWaavvee

  La partie matrielle est constitue d'un modem cble produit par
  LanCity se branchant grce  un cble 10BaseT (UTP-45)  une carte
  Ethernet.



  Quand les techniciens de Roger Wave vous installent le modem cble,
  ils vous assignent une adresse IP statique. Ils vous fourniront aussi
  les infos sur votre masque de sous-rseau, les passerelles (gateway)
  et les noms de domaines (DNS).  Pour des infos supplmentaires  :
  http://home.on.rogers.wave.ca/mreid/rogwave/index.html.

  Les autres infos sur le service Roger Wave   :
  http://www.rogerswave.ca.




  33..55..  SSuunnfflloowweerr CCaabblleevviissiioonn

  Cette info est donne par Andrew Novick  :

  "J'ai rcemment dcouvert votre "HOWTO" sur les modem cble et j'ai un
  ajout  y apporter. Sunflower Cable est une socit strictement
  limite  Lawrence, KS _(_N_d_T _: _K_a_n_s_a_s_), cependant nous avons une
  communaut Linux assez dveloppe grce  l'Universit du Kansas. Sur
  notre liste de courrier locale, nous commenons  avoir de plus en
  plus de questions sur le moyen de configurer le modem cble sous
  Linux. Un simple adressage statique est utilis, et le modem est
  fabriqu par Zenith."
  Pour configurer votre station Linux, assurez-vous d'avoir obtenu
  toutes les informations pertinentes de la part du support technique de
  Cablevision et utilisez ce qui suit.




    IP address: Founies par SunFlower Cablevision

    Subnet mask: 255.255.255.0

    Gateway (router) address: 24.124.11.254

    Hostname: Fournies par SunFlower Cablevision

    Domain name: lawrence.ks.us

    Primary DNS server (nameserver): 24.124.0.1

    Secondary DNS server (nameserver): 24.124.0.6


  crivez tous ces nombres avant de procder. Pour vous inscrire,
  visitez le site http://www.sunflower.com.

  Pour adhrer au domaine lawrence.ks.us contactez Stephen Spencer   :
  gladiatr@artorius.sunflower.com


  Avec la RedHat, utilisez Panneau de contrle / Configuration rseau
  pour entrer ces nombres. Demandez simplement l'ajout d'une interface
  de type Ethernet (Device type=Ethernet) nomme eth0 (Device name=eth0,
  avec un zro et non pas un O) puis remplissez tous les champs de
  saisie. Slectionnez finalement l'option "Activate".


  Avec la Slackware, tapez netconfig. Quand vous aurez termin,
  redmarrez et vous devriez tre prt.


  Si cela ne marche pas, assurez vous que votre carte rseau n'a pas de
  problme (reportez vous au dbut de ce document).




  33..66..  JJoonneess IInntteerrccaabbllee

  Cette info est fournie par Bob Kimble  :


  Jones internet Cable fournit un  modem cble hybride qui se relie 
  votre machine/rseau au moyen d'un connecteur Ethernet 10BaseT. Ils
  vous donnent une adresse IP statique pour votre machine, et une autre
  pour votre modem.  Le modem agit comme une passerelle vers leur
  rseau. Votre adresse IP et celle du modem sont sur le mme rseau et
  ont le mme masque (dans mon cas 255.255.255.0 - 24 bits). Ils
  indiquent galement les adresses IP de deux DNS que vous devez ajouter
  dans votre configuration.

  J'ai juste saisi ces nombres lorsque j'ai install la Red Hat Linux 5
  et a a march impect ds le dbut. Depuis, j'ai configur ma station
  Linux pour autoriser l'"IP masquerading" (NdT : transformation des
  adresses apparentes) et les noms de domaines et elle fait dornavant
  office de passerelle pour l'ensemble de mon rseau priv. Mes autres
  machines sont relies via un rseau priv utilisant les adresses
  196.168.0.x.  Elles tournent sous Windows 95, Windows NT (Intel et
  Alpha) et OS/2. Ma machine Linux a deux adresses IP, celle de la
  compagnie du cble et celle de mon rseau priv "192.168.0.x". Tout
  fonctionne du tonnerre, les six machines pouvant naviguer sur le Web
  simultanment. Mes enfants peuvent mme se connecter  leur site de
  jeu favori, "The Realm" de Sierra.




  33..77..  GGTTEE WWoorrllddwwiinndd

  Cette info est fournie par Mike Hughes  :

  Les indications que vous avez donnes pour Rogers Wave s'appliquent
  aussi au service cbl de GTE WorldWind. Quoi qu'il en soit, les
  services de GTE sont EXTREMEMENT lents, gures plus rapides qu'ISDN
  (NdT : RNIS). Pour plus de prcisions, voyez le site
  http://www.psilord.com.




  33..88..  SSppeeeeddCChhooiiccee,, PPhhooeenniixx,, AArriizzoonnaa

  Avec la permission de Micah

  peenchee@asu.edu:


  Juste pour vous dire qu'il existe aussi chez moi (Phoenix, AZ, usa)une
  compagnie de service de  modem cble appele Speedchoice. Ils
  utilisent un modem cble hybride et l'installation est pratiquement
  identique  l'interface de Jones dans le HowTo.  voir ``Jones
  Cable''.Pour une version plus rcente crivez  Micah.


  33..99..  CCeeddaarr FFaallllss CCyybbeerrnneett,, IIoowwaa

  Cette info est fournie grce  Joe Breu breu@cfu.net


  Nous avons un FAI  Cedar Falls, Iowa qui utilise le systme "Zenith
  Homeworks Universal" avec un systme hybride Fibre/Coaxe.  Notre
  systme n'utilise pas d'interface propritaire pour se connecter mais
  directement des adresses TCP/IP.  Nous n'utilisons pas le protocole
  DHCP, mais fournirons une adresse IP statique aux abonns qui en
  feront la demande pour ceux que a drange.


  33..1100..  TTeellssttrraa BBiiggppoonndd CCaabbllee,, AAuussttrraalliiaa

  Cette info est fournie par Geoff Conway gconway@vic.bigpond.net.au



  AAnnnnoonnccee  ::


  L'information que je vous donne ici, n'est en aucun cas sous la
  responsabilit de Big Pond Cable, Telstra Multimedia, Telstra, IBM
  Global Services  Australia ou de tout autre compagnie cite. Toute
  perte ou dommages rsultant de l'installation du logiciel fournit par
  Big Pond Cable est sous l'entire responsabilit de quiconque suivra
  ces instructions.

  Big Pong Cable ne fournit pas actuellement de support technique pour
  Linux, aussi ce n'est pas la peine de leur signaler les problmes que
  vous pourriez rencontrer lors de l'installation ou de l'utilisation
  sous cet OS.



  BBiigg PPoonndd CCaabbllee,, nnoottiiccee dd''iinnssttaallllaattiioonn ssoouuss LLiinnuuxx VV 11..11 ((1122//0033//9988))

  Modification 1.1 12/3/98 -Orthographe corrige de dhcpcd & rrdhcpcd


  Big Pond Cable ne supporte pas officiellement Linux.  Cependant,
  l'infrastructure TMM permet de se connecter sous Linux.  Les notices
  d'installation suivantes vous permettront d'installer notre logiciel
  sous Linux sans trop de difficults.

  Le programme de rrclientd peut-tre tlcharg   :



  J'utilise une RedHat 5.0, mais la documentation prcise que a
  fonctionne sous les versions antrieures.


  Notez galement que vous trouverez une documentation  plus fournie
  dans le package de rrclientd.


  Procdure  :


    Copiez le fichier rrclientd-1.3.tar.gz sur votre disque dur.

    Connectez-vous sous root pour tout ce qui va suivre

    Dcompressez le fichier (avec gunzip) et dsarchivez le tout(vous
     pouvez le faire aussi par la commande tar xzvf nom_du_fichier).

    Dans le rpertoire rrclientd-1.3/bin vous trouverez tous les
     excutables dont vous avez besoin  :
     fetchmail (non utilis)
     kdestroy
     kinit
     rdate
     rrclientd
     rrdhcpcd
     rrpasswd



    Renommez /sbin/dhcpcd en /sbin/dhcpcd.orig. Copiez & renommez
     rrdhcpcd en /sbin/dhcpcd

    Copiez kdestroy,kinit,rdate,rrclientd,rrdhcpd,rrpasswd dans
     /usr/local/bin

    Configurez votre carte Ethernet pour utiliser dhcp et redmarrez.
     Si la configuration de dhcp est bonne une adresse IP sera attribue
     avec ses paramtres dans /etc/dhcpc/hostinfo-eth0 &
     /etc/dhcpc/resolv.conf.


     Vous pouvez apercevoir lors du redmarrage un message
     d'avertissement vous signalant qu'il ne trouve pas le fichier
     dhcp.conf - a ne semble pas avoir d'importance.
     ** A cette tape, vous devez pouvoir vrifier que votre serveur
     proxy est en ligne par la commande ping.

     (si vous ne le pouvez pas, vous n'aurez aucune possibilit de vous
     logger par la suite)


     Copiez le fichier krb5.ini (du rpertoire \netmanag sous Win95)
     dans /etc/krb5.conf.

     Vous aurez besoin de modifier le fichier comme suit (2 nouvelles
     sections ajoutes)

     Nous avons pris pour exemple le fichier krb5.ini de Melbourne - les
     abonns de Sydney devront faire les modifications appropries.

     Ceci est aussi spcifi dans le sous-rpertoire des exemples de la
     distribution.
















































     ___________________________________________________________________
     [libdefaults]
             ticket_lifetime = 600
             default_realm = c3.telstra-mm.net.au

     ** new *1
            kdc_req_checksum_type = 2
            ap_req_checksum_type = 2
            safe_req_checksum_type = 3
            ccache_type = 2
     ** end of new *1

     [realms]
     c3.telstra-mm.net.au = {
             kdc = dce-server
             admin_server = dce-server
             default_domain = c3.telstra-mm.net.au
             }

     wfh.c3.telstra-mm.net.au = {
             kdc = wfh.c3.telstra-mm.net.au
             admin_server = wfh.c3.telstra-mm.net.au
             default_domain = c3.telstra-mm.net.au
             }

     wfh1.c3.telstra-mm.net.au = {
             kdc = wfh1.c3.telstra-mm.net.au
             admin_server = wfh1.c3.telstra-mm.net.au
             default_domain = c3.telstra-mm.net.au
             }

     wfh2.c3.telstra-mm.net.au = {
             kdc = wfh2.c3.telstra-mm.net.au
             admin_server = wfh2.c3.telstra-mm.net.au
             default_domain = c3.telstra-mm.net.au
             }

     wfh3.c3.telstra-mm.net.au = {
             kdc = wfh3.c3.telstra-mm.net.au
             admin_server = wfh3.c3.telstra-mm.net.au
             default_domain = c3.telstra-mm.net.au
             }

     wfh4.c3.telstra-mm.net.au = {
             kdc = wfh4.c3.telstra-mm.net.au
             admin_server = wfh4.c3.telstra-mm.net.au
             default_domain = c3.telstra-mm.net.au
             }

     wfh5.c3.telstra-mm.net.au = {
             kdc = wfh5.c3.telstra-mm.net.au
             admin_server = wfh5.c3.telstra-mm.net.au
             default_domain = c3.telstra-mm.net.au
             }

     ** new *2

     [domain_realm]
         .c3.telstra-mm.net.au = c3.telstra-mm.net.au

     ** end *2
     ___________________________________________________________________




    Sauvegardez votre ancien fichier /etc/services en
     /etc/services.orig.

     Copier le fichier par exemple /Nassau/services en /etc/services.


    Crez un nouveau fichier /etc/rrpasswd - avec le contenu du fichier
     des mots de passe pour BPC


    Changez le chemin des variables d'environnement comme suit  :


     PATH=$PATH:/usr/local/bin ; export PATH (C'est plus propre pas
     obligatoire)


    Connectez-vous  BPC  :

     rrclientd -u <username> /etc/rrpasswd dce-server

     si votre nom est dupont

     rrclientd -u dupont /etc/rrpasswd dce-server

     Si tout ce passe bien, vous devriez avoir un message dans
     /var/log/messages vous signalant que tout est ok.

     tail /var/log/messages indiquera la fin du fichier.


    Dconnectez-vous de BPC en tapant rrclientd -k

    Pour rendre cela automatique, vous aurez besoin de configurer le
     chemin et d'appeler rrclientd chaque fois que le systme
     redmarrera.

    La commande rrpasswd n'a PAS t essaye.

    Alors, configurez les proxies de Netscape et allons-y !!

    En accord avec la documentation, la machine client devra se
     dconnecter puis se reconnecter automatiquement  15H. Cela n'a pas
     t vrifi.



  PPrroobbllmmeess


  Si vous ne configurez pas proprement le chemin, votre connexion
  chouera avec un message de GSS_API vous indiquant que le type du
  checksum n'est pas support.

  Si vous n'effectuez pas les modifications ncessaires  krb5.conf vous
  obtiendrez un message d'erreur similaire.

  Si vous utilisez plusieurs systmes d'exploitation (Win95/NT/Linux) en
  utilisant un gestionnaire de boot, l'horloge CMOS de votre PC sera
  modifie par Linux vous donnant des erreurs continuelles Kerberos si
  vous essayez de vous connecter en utilisant NT. Vous aurez besoin de
  lancer Win95 en premier (qui remettra les pendules  l'heure), puis de
  relancer NT pour vous connecter.

  Soyez certain de configurer correctement l'heure et le fuseau horaire
  sous Linux. Notez galement que l'heure que vous lirez dans le fichier
  /var/log/messages est un peu trange :) (sans doute prend-t-il
  rfrence sur l'heure universelle GMT).


  33..1111..  FFiibbeerrtteell,, BBuueennooss AAiirreess,, AArrggeennttiinnaa

  Cette info est fournie par Pablo Godel


  Mon nom est Pablo Godel, j'utilise les services cbls de Fibertel 
  Buenos Aires, en Argentine, et tout fonctionne merveilleusement bien
  sous linux.

  Ils m'ont fourni un adresse IP statique. Le modem cble fourni est un
  COM21 de chez ComPort.

  Je l'ai connect au rseau, configur sous Linux et tout marche
  parfaitement.

  Pour plus d'info sur Fibertel : http://www.fibertel.com.ar


  33..1122..  VViiddeeoottrroonn,, CCaannaaddaa

  Je n'ai pas beaucoup d'info sur Videotron mis  part la faon dont ils
  utilisent DHCP pour l'affectation des adresses IP et d'autres
  informations rseaux. Vous avez juste  lire le DHCP mini-HOWTO et 
  configurer votre systme de faon adquate. Il n'y a pas d'autre
  configuration ncessaire.Une autre chose importante  vous signaler,
  videotron distribue une carte Ethernet NE2000 compatible PCI pour
  laquelle vous avez besoin d'utiliser les drivers ne2k-pci


  Info supplmentaire de Philip Gwyn (gwynp@artware.qc.ca) :


  Ils utilisent des modems Motorola CyberSURFR (sic). Ils vous donneront
  une carte Ethernet NIC quand vous vous abonnerez. Pour ma part, j'ai
  reu un clone de la carte TMC NE2000 PCI, que Linux reconnat comme
  une carte "RealTek RTL-8029".  Cependant, vous ne pourrez pas la
  configurer correctement tant que vous n'aurez pas tlcharg les
  drivers du fabricant et chang le type du mdia en "auto-config".


  Tant qu'ils ne peuvent garantir un bon fonctionnement sous Linux, ils
  doivent vous donner un coup de main pour que a marche.  Beaucoup de
  services techniques ont quelques ides sur Linux. Par exemple, j'ai eu
  droit  quelques questions comme "quelle est la version du noyau que
  vous utilisez  ?" ou encore "Avez vous la dernire version de dhcpcd
   ?" Quand leur serveur DHCP plante, ils vont mme jusqu' me suggrer
  de vider le fichier cache dans /etc/dhcpcd pour repartir  zro. Et a
  marche.


  Info supplmentaire de Mihai Petre (mihaip@videotron.ca)  :


  Oui, ils utilisent DHCP pour la configuration du protocole tcp.  Ils
  ont aussi utilis dhcpcd sur leur serveur ftp
  (ftp://ftp.videotron.ca/pub/linux).  Bien sr leur service technique
  ne peut vous assurer une hotline pour Linux.  Leur seule limitation
  pour la cration d'un serveur est la taille. 1Go en limite d'mission
  et 6Go en rception.



  Les infos sur Videotron peuvent tre trouves 






  33..1133..  TTeelleekkaabbeell ((TTeelleewweebb)),, AAuussttrriiaa

  Avec la permission d'Andreas Kostyrka:




    Vous voudriez peut-tre ajouter que le FAI autrichien Telekabel
     (Teleweb)fonctionne avec Linux.Il semblerait que la configuration
     soit similaire  MediaOne Express (3c509+dhcp, etc.)

    Secundo, il y a une configuration des utilitaires 3COM sous Linux
     (mais n'essayez pas  l'aveuglette sur un systme oprationnel,
     3c509 pourrait bloquer le bus si vous vous trompez  :( ) :

     ftp://ftp.redhat.com/pub/contrib/hurricane/SRPMS/3c5x9utils-1.0-3.src.rpm
     ftp://ftp.redhat.com/pub/contrib/readmes/3c5x9utils-1.0-1.README


  Les infos sur Telekabel peuvent tre trouves 
  http://www.telekabel.at





  33..1144..  TTeebbeeccaaii,, NNeetthheerrllaannddss

  Avec la permission de Frodo Looijaard  :


  Tebecai est encore un fournisseur qui utilise un modem cble LANcity
  reli  une carte Ethernet 10BaseT. DHCP est utilis pour la
  configuration (voir le mini-HowTo DHCP).  Un guide d'installation pas
   pas du modem cble sous Linux peut tre trouv 
  http://huizen.dds.nl/~frodol (en hollandais), mais c'est vraiment trs
  comprhensible. Vous devez juste vous rappeler que votre adresse IP
  n'est pas visible  partir d'Internet (elle est sur le sous-rseau
  priv 10.x.y.z), aussi vous ne pouvez pas configurer un serveur
  accessible  tous.


  Les infos sur Tebecai  http://www.tebenet.nl (en hollandais
  seulement).



  33..1155..  AA22000000,, NNeetthheerrllaannddss

  Cette info est fournie par Johan List J.A.List@speed.A2000.nl:


  Dans le principe, l'installation est la mme que pour Tebecai.  A2000
  fournit un accs par cble  Internet par le biais d'un modem LANcity,
  reli  une carte Ethernet 10BaseT. Cela fonctionne galement avec les
  cartes 3COM "Vortex/Boomerang" (j'ai une carte 3COM Boomerang Fast
  Etherlink XL 10/100Mb TX Ethernet Adapter), vous aurez alors 
  compiler les drivers Vortex/Boomerang.  (Rfrez-vous au HowTo
  Ethernet).
  Vous pouvez configurer votre accs avec DHCP (voir le mini-HowTo
  DHCP).  Un guide, en hollandais, sur la configuration de l'accs
  internet pour A2000 est disponible 
  http://agvk.a2000.nl/LINUX/index.html.


  A la diffrence de Tebecai, votre adresse IP *est* visible  partir
  d'Internet, aussi prenez vos prcautions vis  vis de la scurit et
  de la sauvegarde de vos donnes lors de la configuration de votre
  machine sous Linux si vous utilisez un accs internet par A2000 !!


  33..1166..  SShhaaww CCaabbllee,, CCaannaaddaa

  Avec la permission de Peng F. Mok pmok@shaw.wave.ca:


  J'ai rcemment pris un abonnement pour un service cbl chez Shaw
  Cable ici au Canada, qu'ils ont surnomm `Shaw Wave'.  Il apparat
  qu'ils auraient un autre service appel `Shaw@Home' qu'ils
  utiliseraient pour d'autres localisations. Shaw a amlior son rseau
  cbl depuis un an et demi maintenant, et offre actuellement un
  service cbl en diffrents endroits  travers le Canada. Les infos
  sur 'Shaw Wave'  http://www.shaw.wave.ca celles sur 'Shaw@Home' 
  http://shaw.home.com.  Et les infos gnrales sur 'Shaw Cable' 
  http://www.shaw.ca.


  Juste un petit mot pour vous signaler que le DHCP mini-HOWTO" m'a t
  d'une grande aide pour configurer Linux avec mon FAI, et peut-tre
  voudrez-vous bien ajouter 'Shaw Wave' (ainsi que 'Shaw@Home')  votre
  mini-HowTo comme autres services possibles en expliquant comment
  configurer Linux. Je n'ai pas d'info spcifique sur 'Shaw@Home', mais
  d'aprs les conversations que j'ai eues avec le support technique de
  Shaw, il semblerait que 'Shaw@Home' soit associ  ``@Home'' et
  utilise les mmes caractristiques et configurations que celles qui
  ont t dcrites pour ``@Home'' dans ce mini-HowTo.


  Quel que soit le service utilis, les techniciens de Shaw Cable se
  dplacent et vous apportent le matriel -- un modem cble Motorola
  CyberSURFR et au choix une carte 3COM EtherLink III 16-Bit ISA 3C509B-
  TPO NIC ou une EtherLink XL PCI 3C900-TPO NIC suivant vos besoins.  Et
  ces modles n'ont qu'un connecteur RJ-45 (UTP). La carte ISA vous
  fournit un mode PNP par dfaut, aussi il vous sera sans doute
  ncessaire de dmarrer sous DOS pour dsactiver le mode PNP, ainsi que
  pour configurer les adresses d'E/S et les IRQ disponibles. Une fois
  cela fait, Linux ne devrait avoir aucun problme pour dtecter la
  carte au dmarrage.  Je ne suis pas sr de la marche  suivre pour une
  carte PCI et PNP, car je n'en ai pas encore.


  Note d'un autre abonn  :



  Shaw fournit maintenant des cartes Ethernets SMC PCI. Ils les donnent
  en version OEM (sans bote, ni doc). J'ai russi  savoir que c'tait
  des cartes SMC EtherPower PCI RJ45(model 8432T). Elles utilisent un
  chipset DEC 21041 aussi vous avez besoin du driver Ethernet tulip.


  Si vous avez besoin de configurer votre boite  lettre sous POP3 vous
  pouvez le faire  l'adresse suivante  :


  http://profile.home.net/Users/menu.htm


  Oh, pour la petite histoire, le service technique de Shaw est
  horrible.  Le meilleur endroit pour obtenir de l'aide est le newsgroup
  athome.users-unix (qui n'est mentionn nulle part) ou alors consultez
  la page http://www.ee.ualberta.ca/~pmok/linux.





  33..1177..  CCooggeeccoo CCaabbllee,, CCaannaaddaa

  Cette info est donne grce  Terry O'Grady togrady@cgocable.net


  J'utilise un modem cble par l'intermdiaire d'une compagnie appele
  Cogeco Cable situe en de nombreux endroits au Canada. Ils font partie
  du consortium Wave qui inclus Rogers Cable et Shaw Cable, bien que la
  configuration technique soit diffrente pour chaque prestataire. Ils
  m'ont fourni une carte Ethernet D-Link (le modle a d voluer mais je
  pense qu'ils utilisent toujours la D-Link) et un modem Zenith.  La
  configuration IP est facile depuis qu'ils utilisent le DHCP, aussi
  tout ce que j'ai fait tait d'installer le dmon DHCP (voir le mini
  HowTo DHCP.  Si vous avez des questions vous pouvez m'crire 
  togrady@cgocable.net.


  33..1188..  OOppttiimmuumm OOnnlliinnee,, NNeeww YYoorrkk eett CCoonnnneeccttiiccuutt

  Cette info est donne par Seth Greenfield (islesfan@nassau.cv.net) :


  Optimum Online utilise le DHCP, et rrclientd sous Linux, par John
  Clark.  Allez sur http://www.netaxis.com/~wharris/optimum/index.html
  pour trouver les instructions de configuration sous Linux.


  Dites aux personnes qui sont passes d'un serveur priv  un serveur
  public de changer leur /etc/resolv.conf pour qu'il ressemble  ceci
  ...
  domain nassau.cv.net (ou optonline.net suivant votre humeur)
  nameserver 167.206.112.3
  nameserver 167.206.112.4
  Mis  part cela c'est la mme procdure.
  note: le dmon rrclientd fonctionnera si vous utilisez le serveur dce
  et que vous spcifiez le domaine comme optonline.net






  33..1199..  SSiinnggaappoorree CCaabbllee VViissiioonn,, SSiinnggaappoorree

  Cette info est fournie par Jieyao (jieyao@letterbox.com) :


  SCV fournit un modem Motorola Cybersurfer reli  une carte rseau via
  un cble UTP. La configuration IP est aise depuis qu'ils utilisent le
  DHCP aussi tout ce que vous avez  faire est d'installer le dmon DHCP
  (voir le mini HowTo DHCP).  Si vous ne pouvez y accder la premire
  fois, teignez le modem et rallumez-le.


  33..2200..  WWaannaaddoooo CCaabbllee,, FFrraannccee

  Cette info est fournie par Jerome SAUTRET
  (Jerome.Sautret@wanadoo.fr) :


  Je viens juste de lire votre HowTo Cable Modem. Je vis en France, et
  utilise Wanadoo Cable, le service cbl de France Tlcom, qui est le
  principal oprateur tlphonique en France. Pour l'instant ce service
  n'est utilisable que dans peu de ville, comme Angers et Metz. Ce
  fournisseur donne une adresse IP dynamique via DHCP. Il utilise un
  modem COM 21 reli  une carte Ethernet 10BaseT.  La configuration est
  facile, lisez juste le mini HowTo DHCP.


  33..2211..  PPrriimmee CCaabbllee EExxpprreessssnneett,, LLaass VVeeggaass,, NNVV

  Cette info est fournie par Jedi jedi@penguin.lcvm.com:


  ils utlisent un modem Com21 qui peut tre connect directement  votre
  carte 10BaseT ou sur votre "router". Une adresse IP statique est
  disponible pour 60FF par mois et l'attribution des adresses se fait
  par DHCP (voir le mini HowTo DHCP)


  Pour plus d'infos http://penguin.lvcm.com


  33..2222..  TTVVDD,, BBeellggiiuumm

  Cette info est donne par Pierre-Yves Keldermans pykeldermans@usa.net
   :


  Chez moi, la compagnie cble s'appelle "TVD", c'est la premire
  socit offrant un accs internet via le cble en Belgique.


  Matriel : un modem cble LANcity et une carte Ethernet 10-Base-T NIC
  ( DLink ISA si vous l'achetez par TVD)



  Configuration : DHCP (voir le mini HowTo DHCP)



  Prix  :



    Bon march : pour une utilisation prive, une adresse IP mais
     dynamique, DHCP se coupe toutes les 10 mn, un utilisateur max (en
     thorie...), pas de problme avec les firewall, mon serveur web est
     mme accessible de l'extrieur..., haut dbit en entre, faible en
     sortie (pour l'accs  Internet).

    Un peu plus cher : pour une utilisation semi-professionelle, les
     mmes prestations que ci-dessus mais avec un dbit plus important
     en sortie.

    Trs cher : pour un serveur WWW &..., une adresse IP statique et
     une rservation (en fonction du prix) de la bande passante vers
     Internet.

  Vitesse  :

  Du site miroir de TVD : a monte jusqu' 250 kbytes/sec, super sympa
  (et OUI, ils ont quelques sites miroirs comme celui de RedHat....  :-)
  ).  A partir d'Internet : variable mais plutt bonne si le serveur
  distant n'est pas satur.


  Pour plus d'info  :

  http://www.tvd.be
  et

  http://www.tvd.net


  44..  MMooddeemmss ccbblleess hhyybbrriiddeess IISSPP

  Si vous pensez que votre carte est reconnue, regardez les adresses de
  votre FAI.  J'ai pris l'exemple d'un fournisseur sachant que la
  plupart du temps chacun a son propre ISP.



  Cette section est ddie  ceux qui utilisent les modems cbles
  "hybrides".  Les modems hybrides sont ceux qui ncessitent deux sortes
  de connexions, une par le cble TV et l'autre par la ligne
  tlphonique.


  44..11..  AAddeellpphhiiaa PPoowweerrlliinnkk

  Allez  l'adresse suivante pour savoir comment configurer Linux avec
  Powerlink http://home.adelphia.net/~siglercm/sb1000.html


  44..22..  LLiinnkkEExxpprreessss,, BBrraassiill

  Cette info est fournie par Rodrigo Severo (rodrigo@who.net):


  Tout d'abord, ici nous utilisons le modem cble MMD de General
  Instrument.  et une carte SurfBoard 1000 ISA pour tlcharger, ainsi
  qu'un modem standard pour communiquer. Je prfrerais utiliser une
  carte externe SurfBoard 1200 mais elle n'est disponible que pour les
  socits voulant bien payer 1200FF au lieu de 180FF aussi j'ai opt
  pour la carte interne ISA.  Pour les particuliers, Linkexpress (mon
  fournisseur) installe et assure le service aprs-vente de la carte ISA
  interne Surfboard 1000. Si vous voulez l'utiliser, vous devez
  installer Win95/98 et laisser les gars de Linkexpress installer le
  matriel. Aprs cela, faites votre installation de Linux comme a vous
  chante.

  J'ai commenc par tlcharger les fichiers  l'adresse suivante
  http://home.adelphia.net/~siglercm/.


  Ci-joint les donnes releves  :








  ______________________________________________________________________
      ISP: LinkExpress <http://www.linkexpress.com.br>
      DNS: 200.252.88.20
      Frequency: 351 MHz
      Phone number: 321 3300
      City: Brasilia
      Province: Distrito Federal
      Upload speed: 33.6K standard (seul le tlchargement passe par le modem cble)
  ______________________________________________________________________




  Pendant le tlchargement sur un site miroir local de tucows j'ai
  optenu un dbit de 70  300 Kb/s. A partir de sites plus loigns j'ai
  relev des dbits  30Kb/s plusieurs fois.


  Des infos supplmentaires sur LinkExpress 
  http://www.linkexpress.com.br


  44..33..  EExxpprreessssNNeett,, MMaarryyllaanndd

  J'ai rcemment fait l'acquisition d'un modem cble expressnet 
  Maryland.  C'est un modem com21 qui ne marche qu'en mission et j'ai
  eu bien du mal  le faire fonctionner. Aussi j'aimerais partager mon
  exprience. Bien, voici ce que j'ai appris  : pour la connexion par
  PPP et l'authentification de l'utilisateur on doit configurer PAP.
  Pour cela diter le fichier /etc/ppp/pap-secrets de la faon suivante
   :




  ______________________________________________________________________
  #/etc/ppp/pap-secrets
  #Ceci est le fichier des secrets PAP pour PPP
  #Les doubles quotes sont requises pour les deux
  "nom d'utilisateur"      *       "mot de passe"
  ______________________________________________________________________



  aprs cela crez un script PPP-on qui doit tre lanc pour n'importe
  quel nom




  ______________________________________________________________________
  exec /usr/sbin/pppd debug persist /dev/ttyS1 38400 0.0.0.0:0.0.0.0 connect "chat -v TIMEOUT 3 ABORT 'BUSY' ABORT 'NOANSWER' '' ATH TIMEOUT 30 'OK' ATDTTELEPHONE CONNECT ''"
  ______________________________________________________________________



  vous devez l'crire d'un seul bloc, sans retour chariot.


  L'tape suivante consiste  modifier le fichier /etc/ppp/ip-up.local
  (crez-le s'il n'existe pas) de la faon suivante





  ______________________________________________________________________
  #!/bin/bash
  #/etc/ppp/ip-up.local
  #Cela reconfigure le routage du priphrique ppp par dfaut  chaque
  #authentification du modem, ne l'incluez pas si vous ne le voulez pas
  route add default ppp0
  ______________________________________________________________________



  Puis l'utilisateur doit configurer sa carte Ethernet  ; sur la bote
  j'ai 3c905 je l'ai configure de la manire suivante


  ______________________________________________________________________
  ifconfig eth0 up
  ifconfig eth0 10.0.0.1 broadcast 10.0.0.15 netmask 255.255.255.240
  ______________________________________________________________________



  puis j'ai ajout quelques routes supplmentaires  la table route du
  noyau  :


  ______________________________________________________________________
  route add -host 10.0.0.1 eth0
  route add -net 10.0.0.0 eth0
  ______________________________________________________________________





  toutes ces commandes peuvent tre ajoutes dans un script  :




  ______________________________________________________________________
  #!/bin/bash
  #ceci est un fichier script pour tablir les proprits du  modem cble IF
  #de la mme manire que pour les routes
  ifconfig eth0 up
  ifconfig eth0 10.0.0.1 broadcast 10.0.0.15 netmask 255.255.255.240
  route add -host 10.0.0.1 eth0
  route add -net 10.0.0.0 eth0
  ______________________________________________________________________



  C'est tout, et votre modem cble est configur bien plus vite que a
  ne l'a t pour moi.


  Contributeurs: Chris (chris@wrm.grdn.net) & Mike Milbert
  (mike@milbert.com)




  44..44..  CChhaarrtteerr PPiippeelliinnee,, RRiivveerrssiiddee,, CCAA

  Cette info est fournie par Gabriel Peters (gpx1@earthlink.net)  :


  (Je suis chez Charter Pipeline, fourni par Earthlink, Riverside, CA)
  L'installation matrielle consiste en un modem cble Com21 ComPORT
  2000 qui se branche  une carte Ethernet Linksys 10/100 au moyen d'un
  cble 10BaseT (le tout fourni).  Le driver pour la carte Ethernet que
  j'ai inclus dans le noyau, est celui de la carte DEC Tulip.  Elle a
  ensuite t dtecte automatiquement et installe sans aucun problme.


  Ci-joint les infos dont j'ai eu besoin  :


  ______________________________________________________________________
  eth0 IP address - 10.0.0.1
  DNS Servers - 207.217.126.81, 207.217.120.83
  Subnet Mask - 255.255.255.240
  Gateway: None
  Le nom de l'hte doit tre CBL-(votre nom).hs.earthlink.net
  ______________________________________________________________________




  Puis vous avez besoin de configurer PPP pour qu'il appelle votre
  numro d'accs de la manire habituelle.


  Ce que j'ai eu  faire pour que a marche  : J'ai tap 'ifconfig eth0
  down' pour couper la liaison Ethernet, ppp-go pour appeler ; une fois
  rcupres mes adresses IP, j'ai tap


  Commentaire de l'diteur  :



  Chaque fois que le lien ppp est lanc ou coup, pppd excute le script
  /etc/ppp/ip-up (lien tabli)
  et /etc/ppp/ip-down (lien coup)
  aussi au lieu de couper et rtablir le lien ppp avec le rseau
  Ethernet ajouter tout simplement



  ifconfig eth0 up avant l'tat 'exit 0' dans le fichier /etc/ppp/ip-up


  et


  ifconfig eth0 down avant l'tat 'exit 0' dans le fichier /etc/ppp/ip-
  down .


  44..55..  CChhaammbbeerrss CCaabbllee,, CChhiiccoo,, CCAA // FFuunnddyy CCaabbllee,, NNeeww BBrruunnsswwiicckk

  Cette info est fournie par Brian Moore (bem@cmc.net)  :



  Pour ceux qui utilisent les services de Chambers Cable  Chico, CA, le
  modem cble fourni est un Scientific Atlanta data Xcellerator(tm).
  Mike Cumings de l'universit tatoriale de Californie a crit un super
  driver pour lui, disponible sur le site
  http://www.ecst.csuchico.edu/~mcumings/cablemodem/.
  Il doit aussi tre valable pour les autres FAI fournissant le mme
  modem, comme Fundy Cable au New Brunswick..


































































  Mini HOWTO Clock
  Ron  Bean,  Dec. 1996 rbean@execpc.com (Adaptation francaise
  par Gacquer frederic gacquer@neuronnexion.fr)
  Dec. 1996

  Jeudi 2 avril 1998 V 1.0.

  11..  IInnttrroodduuccttiioonn

  Les puces d'horloge temps-reel sur les cartes meres des  PC  (et  meme
  des  stations  de  travail  plus onereuses) sont de notoriete publique
  inexactes. Linux fourni une  maniere  simple  pour  corriger  cela  de
  maniere  logicielle,  rendant  virtuellement  l'horloge *tres* precise
  meme sans horloge externe. Mais la plupart des personnes  ne  semblent
  pas etre au courant, pour plusieurs raisons :

  1. Ce  n'est  pas  indique dans la plupart des documentations "Comment
     installer linux", et cela serait difficile de le  mettre  en  place
     automatiquement  au  moment  de l'installation du systeme (bien que
     pas impossible en theorie, si vous avez un modem).

  2. Si vous essayez "man clock" vous obtiendrez clock(3), ce qui  n'est
     pas ce que vous souhaitez. (Essayez "man 8 clock").

  3. La  plupart  des gens ne semblent pas tenir compte de l'heure qu'il
     est de toute facon.

  4. Le peu qui y  font  attention  regulierement  veulent  utiliser  le
     logiciel xntpd de louie.udel.edu pour se synchroniser a une horloge
     externe, comme un serveur reseau de temps ou une horloge radio.

  Ce mini-howto decrit une approche de bas-niveau. Si vous etes vraiment
  interesse par ce genre de chose, je vous recommende vivement de passer
  du temps a  <http://www.eecis.udel.edu/~ntp/> qui inclus toutes sortes
  de choses interessantes, incluant une documentation complete sur xntpd
  et  des  liens  sur  NIST  et   USNO   (j'ai   quelques   commentaires
  supplementaires sur xntpd a la fin.)

  _N_o_t_e  si vous avez plus d'un systeme d'exploitation sur votre machine,
  vous devez en laisser seulement un remettre  a  jour  l'horloge  CMOS,
  ainsi  ils  n'interfererons  pas l'un envers l'autre. Si vous executez
  regulierement a la fois linux et windows sur  la  meme  machine,  vous
  pourriez   eventuellement   preferer   quelques   uns  des  programmes
  sharewares de gestion de l'horloge disponible pour windows (suivre les
  liens a partir de l'URL ci-dessus).

  22..  UUttiilliisseerr llee pprrooggrraammmmee ''cclloocckk''

  Tout  ce  que  vous  devez savoir est dans la page de manuel clock(8),
  mais ce mini-HOWTO va vous guider pas a pas.

  _N_o_t_e Vous devez etre root pour executer  'clock',  ou  n'importe  quel
  autre programme qui modifie soit le temps systeme soit l'horloge CMOS.

  22..11..

  VVeerriiffiieerr vvoottrree iinnssttaallllaattiioonn

  Cherchez dans vos fichiers de demarrage une  commande  du  style  peut
  etre  dans  /etc/rc.local,  /etc/rc.d/rc.sysinit,  ou  dans un endroit
  similaire.

  Si c'est 'clock -s' ou 'clock  -us',  changez  le  's'  en  'a',  puis
  regardez  si  vous  avez  un fichier /etc/adjtime, ne contenant qu'une
  ligne ressemblant a quelque chose comme cela :

              0.000000 842214901 0.000000

  Ces nombres sont le facteur de correction (en secondes par  jour),  le
  moment  ou  l'horloge  a  ete  reajustee la derniere fois (en secondes
  depuis le 1er janvier 1970), et les secondes partielles  qui  ont  ete
  arrondies  la  derniere fois. Si vous n'avez pas ce fichier, connectez
  vous en tant que root et creez le, avec une seule ligne qui  ressemble
  a (que des zeros) :

                0.0 0 0.0

  Ensuite  executez  'clock  -a' ou 'clock -ua' manuellement a partir du
  shell pour mettre a jour le deuxieme nombre (utiliser le 'u' si  votre
  horloge est configuree en Universel plutot que temps local).

  22..22..

  MMeessuurreerr llee ttaauuxx ddee ddeerriivvee tteemmppoorreellllee ddee vvoottrree hhoorrllooggee

  Pour  commencer,  vous  devez  connaitre  l'heure qu'il est :-). Votre
  temps local du jour peut  ou  peut  ne  pas  etre  exact.  Ma  methode
  preferee  est  d'appeler  l'horloge  parlante  au 3699 (c'est un appel
  gratuit). Si vous avez acces a un serveur reseau de temps, vous pouvez
  utiliser   le  programme  ntpdate  du  progiciel  xntpd  (utiliser  le
  parametre -b pour empecher le noyau  de  cafouiller  l'horloge  CMOS).
  Sinon utiliser systeme. Vous devrez vous rappeler la derniere fois que
  vous avez change l'heure, donc ecrivez la date quelque part ou vous ne
  la  perdrez  pas.  Si  vous  avez utilise ntpdate, faire 'date +%s' et
  ecrire le nombre de secondes depuis le 1er janvier 1970.

  Puis revenez quelques jours ou semaines apres et regardez  de  combien
  l'horloge a derive. Si vous mettez l'horloge a jour a la main, je vous
  recommanderais d'attendre au moins  deux  semaines,  et  de  seulement
  calculer le taux de derive le plus proche d'un dixieme de secondes par
  jour. Apres plusieurs mois vous pourrez obtenir le  plus  proche  d'un
  centieme  de  secondes  par  jour  (quelques  personnes affirment etre
  encore plus precis mais je resterais prudent dans  ce  cas).  Si  vous
  utilisez  ntpdate, vous n'aurez pas a attendre si longtemps, mais dans
  tous les cas vous pourrez toujours affiner plus tard.

  Vous pouvez avoir cron qui execute 'clock -a' a des moments  reguliers
  pour  garder  le temps systeme en accord avec le temps (corrige) CMOS.
  Cette commande sera  aussi  executee  a  partir  de  vos  fichiers  de
  demarrage  a chaque fois que vous relancerez le systeme, ainsi si vous
  le faites souvent (comme quelques uns d'entre nous le font), cela peut
  suffire a vos besoins.

  Remarquez  que certains programmes peuvent se plaindrent si le systeme
  saute plus d'une seconde a la fois, ou s'il  retranche  du  temps.  Si
  vous  avez  ce  probleme,  vous  pouvez utiliser xntpd ou ntpdate pour
  corriger le temps plus graduellement.

  22..33..

  EExxeemmppllee

  22..33..11..

  MMeettttrree aa jjoouurr llee tteemmppss

  Se connecter root. Appeler  le  3699  (vocal),  ecouter  l'annonce  de
  l'heure.  Puis taper:

                date -s hh:mm:ss

  Mais  ne  tapez  Entree que lorsque vous entendez le bip. (vous pouvez
  utiliser  'ntpdate'  ici  plutot  que  'date',   et   eviter   l'appel
  telephonique).  Cela met a jour le 'temps noyau'. Puis taper :

              clock -w

  Cela met a jour l'horloge CMOS pour correspondre au temps noyau.  Puis
  taper:

              date +%j

  (ou 'date +%s' si vous  utilisez  'ntpdate',  plutot  que  'date'  ci-
  dessus) et ecrire le nombre qu'il vous donne pour la prochaine fois.

  22..33..22..

  PPoouurr rreemmeettttrree aa jjoouurr llee tteemmppss eett vveerriiffiieerr llee ttaauuxx ddee ddeerriivvee

  Trouver la date que vous avez ecrit la  derniere  fois.  Se  connecter
  root puis taper:
                  clock -a

  Cela  met  a  jour  le temps noyau qui correspond ainsi au temps CMOS.
  Appeler le 3699 (vocal), ecouter l'annonce. Puis taper :

                  date

  et appuyer sur Entree quand vous entendez le signal sonore, mais alors
  que  vous  attendez,  notez  le temps annonce, et ne raccrochez pas de
  suite. Cela vous dit a quel temps votre machine  pensait  etre,  quand
  cela aurait du etre exact a la minute. Maintenant entrez :

                  date hh:mm:00

  utilisant  la minute *apres* celle qui vient juste d'etre annoncee, et
  appuyez sur entree quand vous entendez  le  signal  sonore  a  nouveau
  (maintenant  vous pouvez raccrocher). Pour hh utiliser le temps local.
  Cela met a jour le 'temps noyau'.

  Puis taper :

                   clock -w

  qui ecrit le nouveau (correct) temps dans l'horloge CMOS.   Maintenant
  tapez :

                   date +%j

  (ou 'date +%s' si c'est ce que vous avez utilise avant).

  Vous  avez maintenant trois nombres (deux dates et une heure) qui vont
  vous permettre de calculer la derive de temps.

  22..33..33..

  CCaallccuulleerr llee ffaacctteeuurr ddee ccoorrrreeccttiioonn

  quand vous executez 'date' a l'instant, est-ce que votre machine etait
  en  avance  ou  en  retard ? Si elle avancait, vous aurez a retrancher
  quelques secondes, alors ecrivez le comme un nombre negatif.  Si  elle
  retardait,  vous  aurez  a ajouter quelques secondes, alors ecrivez le
  comme positif.

  Maintenant soustrayez les deux dates. Si vous avez utilise 'date +%j',
  les  nombres representent le jour de l'annee (1-365, ou 1-366 pour les
  annees bissextiles).  Si vous avez passe le 1er janvier  depuis  votre
  derniere  modification  horaire  vous  aurez a ajouter 365 (ou 366) au
  deuxieme nombre. Si vous avez utilise 'date +%s'  alors  votre  nombre
  est en secondes, et vous aurez a le diviser par 86400 pour obtenir des
  jours.

  Si vous avez deja un facteur de  correction  dans  /etc/adjtime,  vous
  aurez a tenir compte du nombre de secondes que vous avez deja corrige.
  Si vous avez trop corrige, ce nombre aura le signe oppose a celui  que
  vous  venez juste de mesurer; si vous n'avez pas assez corrige il aura
  le meme signe.  Multipliez  l'ancien  facteur  de  correction  par  le
  nombre  de  jour,  et  ensuite  ajouter  le nouveau nombre de secondes
  (addition signee  -- si les deux  nombres  ont  le  meme  signe,  vous
  obtiendrez  un  nombre  plus  grand, s'ils ont des signes opposes vous
  aurez un nombre plus petit).

  Puis divisez le nombre total de secondes par le nombre de  jours  pour
  obtenir   le   nouveau  facteur  de  correction,  et  le  mettre  dans
  /etc/adjtime a la place de l'ancien. Conservez la  nouvelle  date  (en
  secondes par jour) pour la prochaine fois.

  Voici a quoi ressemble mon /etc/adjtime :

                   -9.600000 845082716 -0.250655

  _N_o_t_e  (on  remarque  que 9.6 secondes par jour c'est presque 5 minutes
  par mois !)

  22..44..

  QQuueellqquueess mmoottss aa pprrooppooss ddee xxnnttppdd

  Votre systeme a en fait deux horloges  --  l'horloge  temps  reel  sur
  batterie  qui  garde trace du temps quand le systeme est eteint (aussi
  connue  comme "l'horloge CMOS", "horloge materielle" ou "RTC")  et  le
  'temps  noyau'  (parfois  appellee  "horloge  logicielle"  ou "horloge
  systeme") qui est base sur l'interruption timer et qui est initialisee
  a  partir  de  l'horloge  CMOS au demarrage du systeme.  Les deux vont
  deriver a des  rythmes  differents,  ainsi  elles  vont  graduellement
  s'ecarter l'une de l'autre, tout en s'ecartant du temps 'reel'.

  Toutes  les references a "l'horloge" dans la documentation de xntpd se
  referent a "l'horloge noyau". Quand vous executez xntpd ou  timed  (ou
  n'importe  quel autre programme qui utilise l'appel systeme adjtimex),
  le noyau linux suppose que l'horloge du noyau  est  plus  precise  que
  l'horloge CMOS, et remets a jour le temps CMOS toutes les 11 minutes a
  partir de ce moment (jusqu'a ce que l'on relance  l'ordinateur).  Cela
  signifie  que  'clock' ne sais plus quand l'horloge CMOS a ete modifie
  la derniere fois, ainsi vous ne pouvez plus  utiliser  le  facteur  de
  correction  dans /etc/adjtime. Vous pouvez utiliser ntpdate dans votre
  fichier de demarrage pour  mettre  a  jour  initialement  l'horloge  a
  partir d'un serveur de temps avant de lancer xntpd. Si vous n'avez pas
  toujours acces a une source fiable de  temps  lors  de  l'allumage  de
  l'ordinateur, cela peut etre un peu genant -- xntpd n'est pas vraiment
  concu pour etre utilise dans des situations comme celles la.

  Xntpd inclue des drivers pour plusieurs horloges radio, et  peut  etre
  configure  pour appeler le service de temps telephonique de NIST a des
  temps reguliers (soyez sur de calculer l'incidence sur  votre  facture
  telephonique  lors  du parametrage de l'intervalle entre deux appels).
  Il peut aussi appliquer un facteur de  correction  a  l'horloge  noyau
  s'il  perd  contact  avec les autres sources pour une periode de temps
  assez longue.

  La plupart des  horloges  radio  coutent  3-4000$,  mais  vous  pouvez
  obtenir  des plans pour une 'boite gadget' peu chere (en fait un modem
  300 baud) qui se met entre votre ordinateur et n'importe quelle  radio
  onde  courte  reglee  sur  la  station  de  temps canadienne CHU (voir
  <ftp://ftp.udel.edu/pub/ntp/gadget.tar.Z>). Le recepteur Heathkit  WWV
  ("l'Horloge  la  Plus  Precise") est aussi encore disponible (bien que
  n'etant pas en kit), et coute aux environs de 4-500 $. Les signaux GPS
  contiennent  aussi  des  informations de temps, et quelques recepteurs
  GPS peuvent se connecter sur le port serie. Cela peut etre la solution
  la moins onereuse dans un futur proche.

  En  theorie,  on  peut ecrire un programme pour utiliser le service de
  temps telephonique NIST  pour  calculer  automatiquement  le  taux  de
  derive  de  l'horloge  CMOS  et  de l'horloge noyau. Je ne suis pas au
  courant d'un quelconque programme  demon  qui  ferait  cela,  mais  la
  plupart du code peut etre emprunte a xntpd.

  Le ls en couleur
  Thorbjoern Ravn Andersen (ravn@imada.ou.dk)
  version   francaise  :  Pierre  Vassellerie  (Pierre.Vassel-
  lerie@obspm.fr)
  v1.0f2, 14 Octobre 1995

  La commande ls livree dans la distribution Slackware de  Linux  permet
  un  affichage  en  couleur  (Slackware 2.0.2 et noyau 1.1.54 de Linux.
  Ceci marche aussi bien avec agetty, qu'avec mgetty_ps).   Il  se  peut
  que  les  couleurs  par defaut ne vous plaisent pas et que vous prenne
  l'envie de les trifouiller.  Ce document a pour  unique  but  de  vous
  expliquer  le  principe  de  fonctionnement  et  la  configuration des
  couleurs utilises par cette commande.

  11..  CCoommmmeenntt sseelleeccttiioonnnneerr lleess ccoouulleeuurrss ??

  Il existe deux methodes :

  1. Premiere methode  :  utiliser  le  programme  _s_e_t_t_e_r_m  qui  s'avere
     parfait  pour une modification rapide et simple de la configuration
     par  defaut.  Les  manuels  et  aides  de   cette   commande   sont
     relativement  enigmatiques  et je ne tenterais en aucune maniere de
     vous les rendre plus clairs ;-).

     Les selections sont realisees par :

             setterm -foreground black -background white -store

  ou _-_s_t_o_r_e signifie que cette configuration  est  a  enregistrer  comme
  configuration  par  defaut  pour  la  console courante. Il vous faudra
  recommencer cette operation pour chaque nouvelle console virtuelle, et
  il  semble  alors une excellente idee de placer cette ligne dans votre
  .login (en csh ou tcsh) ou votre .profile (en sh, ksh ou bash).   Vous
  en connaissez desormais autant que moi sur la commande _s_e_t_t_e_r_m :-).

  2. Deuxieme  methode  :  Linux utilise les codes d'echappement ANSI du
     style

       ESC [ <parametres> m

  ou ESC est le caractere ASCII 27 et _p_a_r_a_m_e_t_r_e_s est aucun ou  plusieurs
  nombres separes par des points-virgules. Par exemple :

    "\033[41;33;1m" qui donne un affichage jaune sur fond rouge
    "\033[30;47m"   qui donne un affichage blanc sur fond noir
    "\033[m"        qui retablit l'affichage par defaut

  Ces  exemples  necessitent un shell reconnaissant les constructions du
  type \xxx. Si ce n'est pas le cas, inserez  directement  un  caractere
  d'echappement  directement  dans  la chaine. Sous bash/vi tapez Ctrl-V
  ESC, et sous tcsh/emacs tapez Ctrl-Q ESC.

  22..  QQuueelllleess ccoommbbiinnaaiissoonnss ddee ccoouulleeuurrss ssoonntt ppoossssiibblleess ??

  Ceci est un script  en  C-shell  faisant  apparaitre  sur  la  console
  l'ensemble des combinaisons de couleurs :

  ______________________________________________________________________
  #!/bin/csh
  #
  # Affiche les couleurs ANSI
  #
  set esc="\033["
  foreach fore (30 31 32 33 34 35 36 37)
    set line1="\*(dRfore  " line2="    "
    foreach back (40 41 42 43 44 45 46 47)
      set line1="\*(dR{line1}\*(dR{esc}\*(dR{back};\*(dR{fore}m Normal  \*(dR{esc}0m"
      set line2="\*(dR{line2}\*(dR{esc}\*(dR{back};\*(dR{fore};1m \*(dR{back} Bold \*(dR{esc}0m"
    end
    echo "\*(dRline1\n\*(dRline2"
  end
  ______________________________________________________________________

  Le  numero de la couleur d'avant-plan est croissant vers la gauche, et
  le numero de la couleur d'arriere-plan est donne  dans  le  pave.   Si
  vous  desirez  un  affichage  en  gras,  ajoutez  un  01 comme premier
  parametre.  Mettez un point-virgule entre chaque parametre, et  mettez
  l'ensemble de la sequence comme _p_a_r_a_m_e_t_r_e_s.

  33..  AAffffiicchhaaggee ppaarr ttyyppee ddee ffiicchhiieerrss

  La commande ls commence par regarder la definition des associations de
  couleurs dans le fichier ~/.dir_colors et s'il n'existe pas utilise le
  fichier  /etc/DIR_COLORS.   Ces  fichiers  contiennent  des entrees du
  style :

      LINK 36;1           # lien symbolique
      FIFO 40;33          # tube
      SOCK 41;01;35       # socket
      BLK 41;33;01        # gestionnaire en mode bloc
      CHR 41;33;01        # gestionnaire en mode caractere

      EXEC 32;1           # fichier avec droit d'execution

      .tar 01;31          # archives et fichiers compresses
      .tgz 01;31
      .zip 01;31
      .z   01;31
      .Z   01;31
      .gz  01;31

  les sequences ANSI donnees en parametres sont ici  donnees  exactement
  avec  la  meme  syntaxe que pour la commande _s_e_t_t_e_r_m.  Modifiez ceci a
  votre guise, et voyez le resultat d'un _l_s sur /sbin, /etc et /dev.

  Afin que le fichier /etc/DIR_COLORS  ou  ~/.dir_colors  soit  pris  en
  compte,   il  vous  faut  rajouter  dans  /etc/profile  ou  ~/.profile
  (sh/bash) ou /etc/csh.login ou ~/.login (csh/tcsh) la ligne :

   eval `/bin/dircolors`

  AATTTTEENNTTIIOONN : cette ligne doit etre placee avant une quelconque  defini-
  tion  d'alias  pour ls.  Cette commande lit le fichier /etc/DIR_COLORS
  ou ~/.dir_colors et fournit les variables d'environnement LS_COLORS et
  LS_OPTIONS ainsi que les alias ls, dir, vdir, d et v.

  44..  CCoommmmeenntt ddoonnnneerr uunnee ccoonnffiigguurraattiioonn ppaarr ddeeffaauutt

  Ceci  est  realise  individuellement  pour  chaque console virtuelle a
  l'aide de la sequence ANSI : (-- Cette information a  ete  trouvee  en
  parcourant  le  source du noyau. Je ne peux donc dire s'il s'agit d'un
  standard.--)

          ESC [ 8 ]

  qui specifie les valeurs par defaut des couleurs d'avant  et  arriere-
  plan.   La sequence ANSI de recomposition des attributs (ESC [ m) per-
  met alors de prendre en compte ces couleurs plutot que  du  blanc  sur
  fond noir.

  La  methode  decrite ici est supposee etre pour des systemes "isoles",
  dans le sens ou les logins ne se font que  sur  la  console.  Ceci  ne
  marche  pas  forcement pour des logins se faisant depuis des terminaux
  distants, des connexions par modem ou d'autres machines, qui  dans  ce
  cas  ne  comprendrait  pas  les sequences.  L'interpretation des codes
  ANSI est une propriete des consoles Linux et  n'existe  que  dans  peu
  d'autres programmes de terminal.

  Si  vous etes sur un systeme "isole", un bon moyen de faire prendre en
  compte les couleurs pour chaque console est  de  modifier  le  fichier
  /etc/issue, et d'en voir le resultat en se delogeant. Generalement (et
  en particulier dans les distributions Slackware) ce fichier est lu  et
  affiche  a chaque reboot.  Ainsi si votre /etc/rc.d/rc.S contient (aux
  environs de la ligne 75) :

    # Initialise /etc/issue et /etc/motd pour qu'il donne la version du noyau utilise
    # ATTENTION : les fichiers /ETC/ISSUE AND /ETC/MOTD sont crees a chaque boot.
    # Mettez ceci en commentaire si vous desirez personnaliser une bonne fois pour
    # toute ces fichiers.
    echo ""> /etc/issue
    echo Bienvenue dans le monde merveilleux de Linux \
         `/bin/uname -a | /bin/cut -d\  -f3`. >> /etc/issue
    echo >> /etc/issue

  Mettez ces lignes en commentaire ou modifiez comme suit :

    # Mettez ceci en commentaire si vous desirez personnaliser une bonne fois pour
    # toute ces fichiers
    ESCAPE="<remplacez ici par un seul caractere d'echappement>"
    echo "${ESCAPE}[H${ESCAPE}[37;44m${ESCAPE}[8]${ESCAPE}[2J"> /etc/issue

  Mon shell de  demarrage  ne  comprend  pas  le  \033,  je  dois  alors
  specifier  le  code  ASCII  27  dans  mon script comme indique dans le
  premier paragraphe.  La ligne ressemble alors a ESCAPE="^[".

  Ce code a pour effet de  ramener  le  curseur  en  debut  de  fenetre,
  changer  les  couleurs,  sauver la selection et effacer l'ecran. Cette
  modification n'aura un effet qu'au prochain reboot.

  Si votre "boite  Linux" n'est pas "isolee", il se  peut  que  certains
  problemes  apparaissent lors des connexions des utilisateurs distants.
  Ceci est du au fait que leur terminal ne comprend  pas  les  sequences
  d'echappement ANSI.

  Vous devez alors ajouter au niveau de l'utilisateur :

  ______________________________________________________________________
    if [ "\*(dRTERM" = "console" ]; then
        echo "\033[37;44m\033[8]"
    fi

  ou

    if ( "\*(dRTERM" == "console" ) then
      echo "\033[37;44m\033[8]"
    endif
  ______________________________________________________________________

  Si l'on desire que la modification se fasse pour tous les utilisateurs
  du systeme, il suffit alors que root modifie les fichiers /etc/profile
  ou  /etc/csh.login.  (Je rappelle une derniere fois que si le shell ne
  peut interpreter les \0xx  (en  particulier  l'echappement  \033),  il
  suffit de remplacer ce dernier par "ESC".

  55..  CCoommmmeennttaaiirreess eett ccrriittiiqquueess

  L'auteur original de ce document nous dit :

    This is still a rough draft, and English isn't my primary language.
  Please feel free to correct me on the above text in order to make it as
  clear and correct as possible.  This goes, of course, for the information
  provided as well.

  Comments and criticism goes to
  --
    Thorbjo/rn Ravn Andersen              "...and...Tubular Bells!"
    ravn@imada.ou.dk
    <http://www.imada.ou.dk/~ravn>

  et  je  suis  bien  d'accord  avec  lui.   Pour  la version francaise,
  n'hesitez pas une seconde  a  m'envoyer  vos  remarques,  corrections,
  ajouts, bouteilles de vin, etc...

  66..  CCooppyyrriigghhtt

  Cette  version est place sous copyright (c)1995 de Pierre Vassellerie.

  Comme tous les documents HOWTO, ce document  peut  etre  reproduit  et
  distribue  dans  son  integralite  ou partiellement, par quelque moyen
  physique que ce soit.  Il  reste  malgre  tout  sujet  aux  conditions
  suivantes :

  +o  La  mention  des  copyrights  doit  etre  conservee, et la presente
     section preservee dans son integralite sur toute copie integrale ou
     partielle.

  +o  Les  traductions  et travaux derives doivent etre approuves par les
     auteurs avant distribution.

  +o  Si vous distribuez ce ttrraavvaaiill  en  partie,  vous  devez  mentionnez
     comment  obtenir  une  version  integrale de ce document et etre en
     mesure de la fournir.
  +o  De petites portions de ce document  peuvent  etre  utilisees  comme
     illustrations   d'une   presentation   ou   comme   remarques  sans
     autorisation prealable si les citations d'usage sont realisees.

  Des exceptions a ces regles  peuvent  etre  accordees  dans  des  buts
  educatifs,  ecrivez  a l'auteur et demandez. Ces restrictions ont pour
  but unique de proteger  les  auteurs  et  leur  travail.   Toute  aide
  educative de ce document sera grandement appreciee.

  Mini HOWTO installation du serveur IMAP Cyrus
  Kevin Mitchell kevin@iserv.net v0.9
  21.01.98

  Adaptation  francaise  par  Gacquer  Frederic  gacquer@neuronnexion.fr
  Jeudi  25  mai  1998  V  1.0.  Relecture  par  Jean  Charles  Delepine
  delepine@lan.univ-lyon1.fr

  11..  IInnttrroodduuccttiioonn

  Ce document a pour but d'apporter un peu d'aide pour l'installation du
  serveur IMAP de Cyrus, sur une machine Linux.

  Je voudrais remercier Bob  Anderson  boba@iserv.net  et  Jorge  Paramo
  jorge@iserv.net pour leur aide dans mes aventures avec Linux.

  22..  QQuu''eesstt--ccee qquu''IIMMAAPP eett ppoouurrqquuooii ddeevvrraaiiss--jjee ll''uuttiilliisseerr ??

  IMAP  (Internet  Message  Access Protocol) est une maniere d'acceder a
  son courrier electronique ou ses messages BBS stockes sur  le  serveur
  de  courrier.  IMAP  est percu par beaucoup comme le successeur de POP
  (Post Office Protocol). IMAP permets aux utilisateurs d'acceder a leur
  courrier  a  partir  de  n'importe  quel  ordinateur  sans  avoir a le
  rapatrier.  Cette methode d'acces au courrier est plus sure  et  offre
  plusieurs avantages pour l'utilisateur final.

  Une        explication        plus        approfondie        a       :
  <http://www.imap.org/whatisIMAP.html> Une comparaison  entre  IMAP  et
  POP a : <http://www.imap.org/imap.vs.pop.brief.html>

  Pourquoi utiliser le serveur Cyrus ?

  Cyrus  est  concu pour etre utilise sur un serveur ou les utilisateurs
  n'ont pas le droit de se connecter. Cyrus semble aussi etre parmi  les
  deux  plus  populaires serveurs IMAP pour Unix. L'autre est le serveur
  IMAP         de          l'Universite          de          Washington.
  <ftp://ftp.cac.washington.edu/imap/imap.tar.Z>

  33..  LLeess ccaarraacctteerriissttiiqquueess ddee mmoonn ssyysstteemmee

  J'ai  installe  Cyrus  avec  succes  sur  des architectures 486DX66 et
  Pentium, utilisant respectivement le noyau  Linux  2.1.79  et  2.0.33.
  L'installation initiale est basee sur la Slackware 3.4.

  44..  IInnssttaallllaattiioonn ddee TTccll

  Assurez  vous  que  Tcl est installe sur votre machine avant de tenter
  d'installer Cyrus - sinon vous n'aurez pas la  possibilite  d'utiliser
  l'Outil d'Administration Cyrus (cyradm).

  Les     derniers    sources    de    Tcl    sont    disponibles    sur
  <ftp://ftp.sunlabs.com/pub/tcl/>

  Apres l'installation, assurez vous que le fichier libtcl.a  se  trouve
  dans   le  repertoire  /usr/local/lib/.  Tcl  8.0  genere  un  fichier
  libtcl8.0.a  sur  lequel  vous  devez  creer  un  lien  symbolique  en
  utilisant la commande :

       # ln -s libtcl8.0.a libtcl.a

  55..  IInnssttaallllaattiioonn ddee llaa ccoommmmaannddee mmaakkeeddeeppeenndd

  Verifiez que votre systeme a la commande makedepend. Si vous ne l'avez
  pas, ne vous inquietez pas - il est fourni avec le  source  de  Cyrus.
  (Je ne l'avais pas avec l'installation Slackware 3.4).

  Pour  installer  makedepend, extraire la distribution Cyrus, se mettre
  dans le repertoire makedepend, et taper les commandes suivantes :

               ./configure
               make
               cp ./makedepend /usr/local/bin/makedepend

  66..  IInnssttaallllaattiioonn ddee CCyyrruuss

  Suivre prudemment les conseils fournis  avec  la  distribution  Cyrus.
  Vous    pouvez    en    trouver    une    copie    en    ligne   a   :
  <http://andrew2.andrew.cmu.edu/cyrus/imapd/install.html>

  Quelques astuces pour quelques-unes des etapes:

  Si vous utilisez la Slackware 3.4 (avec les Shadow Passwords), assurez
  vous que vous utilisez configure comme suit:

  Avec make c'est plus direct:

               make depend
               make all CFLAGS=-O

  +o  Etape  1:  lorsque vous ajoutez l'utilisateur cyrus, ce dernier est
     verouille pour ameliorer la securite.

  +o  Etape 3: j'edite le fichier  /etc/syslog.conf  plutot  que  de  les
     copier.

  +o  Etape  9:  Avec  Linux,  assurez  vous  de  lancer pwcheck de cette
     maniere sinon le serveur ne fonctionnera pas correctement:

          umask 0;/usr/cyrus/bin/pwcheck &
          umask 022

  Puis ajoutez ces dernieres a un script de demarrage comme celui-la:

               if [ -f /usr/cyrus/bin/pwcheck ]; then
               echo -n "Starting pwcheck for imap"
               umask 0;/usr/cyrus/bin/pwcheck &
               umask 022
               fi

  J'ai mis le mien dans /etc/rc.d/rc.local et cela marche bien.

  +o  Etape  12:  Lorsque  vous  editez  /etc/inetd.conf,  assurez   vous
     d'include les TCP Wrappers dans la ligne, comme suit:

        imap    stream  tcp     nowait  cyrus   /usr/sbin/tcpd  /usr/cyrus/bin/imapd imap

  Et n'oubliez pas de kill -HUP inetd apres avoir termine cet ajout:

               # ps ax | grep inetd
                  61  ?  S    0:00 /usr/sbin/inetd
               # kill -HUP 61

  77..  CCoonnffiigguurraattiioonn ddee sseennddmmaaiill

  Telechargez  le  source  de sendmail si vous ne l'avez pas deja. Outre
  utiliser IMAP, vous pouvez faire des choses amusantes comme configurer
  l'anti-spam.

  Voici  mon  fichier  mc. Il delivrera le mail a IMAP sauf s'il y a une
  entree de l'utilisateur dans le fichier /etc/sendmail.cN. Cela  permet
  aux comptes systemes comme root de garder leur courrier dans le spool;
  Cependant, les comptes utilisateurs utilisent IMAP par defaut.  Ne pas
  faire un simple copier/coller de ce code car sendmail n'appreciera pas
  les espaces utilises a la place des tabulations:

   divert(-1)
    #
    #       (C) Copyright 1995 by Carnegie Mellon University
    #
    #                      All Rights Reserved
    #
    # Permission to use, copy, modify, and distribute this software and its
    # documentation for any purpose and without fee is hereby granted,
    # provided that the above copyright notice appear in all copies and that
    # both that copyright notice and this permission notice appear in
    # supporting documentation, and that the name of CMU not be
    # used in advertising or publicity pertaining to distribution of the
    # software without specific, written prior permission.
    #
    # CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
    # ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
    # CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
    # ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    # ARISING OUT OF OR IN CONNECTION WITH THE USE OR P ERFORMANCE OF THIS
    # SOFTWARE.
    #
    #       Contributed to Berkeley by John Gardiner Myers .
    #
    #       This sample mc file is for a site that uses the Cyrus IMAP server
    #       exclusively for local mail.
    #

    divert(0)dnl
    VERSIONID(`@(#)cyrusproto.mc    8.3 (Carnegie Mellon) @(#)cyrusproto.mc 8.3')
    OSTYPE(linux)
    define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')
    FEATURE(nouucp)
    FEATURE(nocanonify)
    FEATURE(always_add_domain)
    MAILER(smtp)
    MAILER(local)
    MAILER(cyrus)

    define(`confLOCAL_MAILER',`cyrus')

    LOCAL_RULE_0
    R$=N                 $: $#local $: $1
    R$=N                 $: $#local $: $1
    Rbb + $+             $#cyrusbb $: $1

    LOCAL_CONFIG
    FN /etc/sendmail.cN

    # end of mc file

  Arpes avoir configure le fichier /etc/sendmail.cf,  creer  le  fichier
  /etc/sendmail.cN et ajouter les comptes utilisateurs qui ne souhaitent
  pas utiliser IMAP:

               root
               majordom
               stan
               mothra

  Apres avoir installe Sendmail 8.8.8  j'ai  aussi  installe  mail.local
  comme  programme  de  livraison  du  courrier  local  pour  ces autres
  comptes.  Il y a une astuce pour configurer mail.local. Aller dans  le
  repertoire de mail.local, dans le source de sendmail et faire:

               cp Makefile Makefile.orig
               cp Makefile.dist Makefile
               make
               cp mail.local /bin/mail.local
               chmod 4555 /bin/mail.local

  Apres cela, redemarrer sendmail.

  Ne  pas  oublier  de  terminer  les  instructions de l'installation de
  Cyrus.

  88..  CCoonnffiigguurreerr lleess bbooiitteess aauuxx lleettttrreess

  Assurez vous de suivre les tests  du  serveur  IMAP.  Si  tout  semble
  correct, continuez et creez des boites au lettres.

  99..  MMiissee eenn ggaarrddee

  Aucune  garantie,  pas  de  remboursement,  utilisation  a vos propres
  risques.

  1100..  SSoouurrcceess

  Les logiciels requis

  +o  La        page        d'accueil        de         Cyrus         est
     <http://andrew2.andrew.cmu.edu/cyrus/imapd/>

  +o  Vous     pouvez     telecharger     la    derniere    version    a:
     <ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/>

  +o  La page d'accueil de Tcl est : <http://sunscript.sun.com/>

  +o  Vous   pouvez   telecharger    le    dernier    source    Tcl    a:
     <ftp://ftp.sunlabs.com/pub/tcl/>

  +o  La page d'accueil de Sendmail est : <http://www.sendmail.org/>

  +o  Vous     pouvez     telecharger     la    derniere    version    a:
     <ftp://ftp.sendmail.org/ucb/src/sendmail/>

  mini-HOWTO DHCP (DHCPd/DHCPcd)
  Vladimir Vuksan <mailto:vuksan@veus.hr>, traduction Arnaud
  Gomes-do-Vale <mailto:arnaud@carrosse.frmug.org>
  v4.6, 27 Septembre 1999

  Ce document a pour but de rpondre  des questions de base sur la con
  figuration de votre machine Linux comme serveur ou client DHCP.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Avertissements
     1.2 Nouvelles versions de ce document
     1.3 Retours
     1.4 Contributeurs
     1.5 Copyright

  2. Le protocole DHCP

  3. Configuration des clients

     3.1 Tlchargement du dmon client (
     3.2 Slackware
     3.3 Red Hat 6.x et Mandrake 6.x
     3.4 Red Hat 5.x
     3.5 Red Hat 4.x et Caldera OpenLinux 1.1/1.2
     3.6 Debian
     3.7 LinuxPPC et MkLinux
     3.8 La touche finale
     3.9 Notes diverses

  4. Problmes

     4.1 Votre carte rseau est mal configure.
     4.2 Votre serveur DHCP ne supporte que la RFC 1541 ou fonctionne sous      Windows NT.
     4.3 Au dmarrage, je vois le message d'erreur "Using DHCP for eth0      ... failed" mais mon systme fonctionne correctement.
     4.4 Mon rseau fonctionne pendant quelques minutes avant d'arrter de      rpondre.
     4.5 Ma carte ethernet est reconnue au dmarrage, mais j'ai toujours le      message "NO DHCPOFFER" dans le journal du systme. Il se trouve que j'ai      une carte ethernet PCMCIA.
     4.6 Mon client DHCP envoie des requtes, mais personne ne rpond.
     4.7 J'ai bien suivi toutes les tapes et ma machine ne se connecte      toujours pas.
     4.8 Je suis abonn  MediaOne Express et je ne peux toujours pas me      connecter.
     4.9 Un autre client DHCP (le

  5. Configurer un serveur DHCP

     5.1 Un serveur DHCP pour UNIX
     5.2 Configuration du serveur DHCP
     5.3 Options de DHCPd
     5.4 Dmarrage du serveur


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  AAvveerrttiisssseemmeennttss

  Nous dclinons toute responsabilit quant au contenu de ce document.
  L'utilisation des concepts, des exemples ou de tout autre contenu se
  fait entirement  vos propres risques. Dans la mesure o il s'agit
  d'une nouvelle dition de ce document, il peut comporter des erreurs
  ou des imprcisions susceptibles d'endommager votre systme. Bien que
  ce soit trs improbable, je n'en prends pas la responsabilit.

  De plus, gardez  l'esprit que les informations contenues dans ce
  document ne sont _p_a_s officielles. La majeure partie du contenu de ce
  document est constitue de suppositions, qui se trouvent donner
  l'effet prvu pour certaines personnes. Vous utilisez cette
  information  vos risques et prils.


  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document  (-- NdT: il s'agit ici de la
  version originale en anglais--) sont disponibles sur


       <url url="http://www.cs.unm.edu/~vuksan/linux/DHCP.html">




  De plus, vous devriez trouver ce document sur le site web du Linux
  Documentation Project <http://www.linuxdoc.org/>.

  Les versions traduites suivantes sont disponibles:


    Chinois -  <http://www.linux.org.tw/CLDP/mini/DHCP.html>

    Japonais -  <http://www.linux.or.jp/JF/JFdocs/DHCP.html>

  La version franaise se trouve avec les autres HOWTO:
  <http://www.freenix.org/linux/HOWTO/>.

  Vous tes explicitement autoriss  traduire ce document dans votre
  langue. Je vous demande simplement de mettre un lien vers la version
  originale et de me donner l'adresse URL de votre traduction pour que
  je puisse moi-mme mettre un lien.


  11..33..  RReettoouurrss

  Les retours concernant ce document seront vivement apprcis. Sans vos
  propositions, ce document n'existerait pas. Envoyez donc vos ajouts,
  commentaires et critiques  vuskan-feedback@veus.hr.

  Adressez vos commentaires concernant la version franaise 
  <mailto:arnaud@carrosse.frmug.org>.


  11..44..  CCoonnttrriibbuutteeuurrss

  Ce document est une version modifie de la version d'origine de Paul
  Makeev.

  Les personnes suivantes ont contribu  ce mini-HOWTO.

    Heiko Schlittermann

    Jonathan Smith

    Dan Khabaza

    Hal Sadofsky


    Henrik Stoerner

    Paul Rossington

    et de nombreux autres


  11..55..  CCooppyyrriigghhtt

  Ce HOWTO est  Vladimir Vuksan, 1998 et peut tre distribu selon les
  termes de la licence OpenContent (OPL)


       <url url="http://www.opencontent.org/opl.shtml">






  22..  LLee pprroottooccoollee DDHHCCPP

  DHCP est le protocole de configuration dynamique d'htes (Dynamic Host
  Configuration Protocol). Il est utilis pour contrler certains
  paramtres importants de la configuration rseau des htes (faisant
  tourner un client) au moyen d'un serveur. DHCP maintient une
  compatibilit ascendante avec BOOTP. Pour plus d'informations, voyez
  entre autres la RFC 2131 (anciennement la RFC 1541). Reportez-vous 
  la section _R_e_s_s_o_u_r_c_e_s _s_u_r _i_n_t_e_r_n_e_t  la fin du document. Vous pouvez
  aussi lire la FAQ DHCP
  <http://web.syr.edu/~jmwobus/comfaqs/dhcp.faq.html>.

  Ce mini-HOWTO dcrit aussi bien l'utilisation du dmon _s_e_r_v_e_u_r DHCP
  que celle du dmon _c_l_i_e_n_t DHCP. La plupart des gens utilisent le dmon
  client, qui est utilis par des stations pour obtenir des informations
  sur leur configuration rseau depuis un serveur distant. Le dmon
  serveur est utilis par les administrateurs rseau pour distribuer ces
  informations aux clients. Donc si vous tes juste un utilisateur, vous
  avez besoin du dmon _c_l_i_e_n_t.


  33..  CCoonnffiigguurraattiioonn ddeess cclliieennttss

   l'heure actuelle, il existe trois clients DHCP diffrents pour
  Linux: dhcpcd, pump et dhclient. Ce mini-HOWTO traite principalement
  de dhcpcd.


  33..11..  TTllcchhaarrggeemmeenntt dduu ddmmoonn cclliieenntt (( ddhhccppccdd ))

  En fonction de votre distribution, vous pouvez avoir besoin de
  tlcharger le dmon client DHCP. Si vous voulez le compiler  partir
  des sources, vous avez besoin du paquetage dhcpcd, dont la dernire
  version est la 1.3.18. Il est maintenu par Sergei Viznyuk
  sergei@phystech.com et est aujourd'hui livr sous forme de binaire
  avec la plupart des distributions.

  Les sources de dhcpcd peuvent tre tlcharges depuis :


    <ftp://ftp.phystech.com/pub/> (site principal)

    <http://www.cps.msu.edu/~dunham/out/dhcpcd-1.3.6.tar.gz>

  Ensuite, suivez les instructions ci-dessous. Elles devraient rester
  identiques.
  33..22..  SSllaacckkwwaarree

  Vous pouvez tlcharger la dernire version de dhcpcd depuis n'importe
  quel miroir de Metalab ou depuis l'un des sites suivants:

    <ftp://metalab.unc.edu/pub/Linux/system/network/daemons>

    <ftp://ftp.phystech.com/pub/> (site principal)


    Tlchargez la dernire version de dhcpcd.tar.gz.

    Dcompactez la:


       tar -zxvf dhcpcd-0.70.tar.gz




    Allez dans le nouveau rpertoire et compilez dhcpcd


       cd dhcpcd-0.70
       make




    Installez le (vous devez tre root pour lancer la commande
     suivante)


       make install




  Cela va crer un rpertoire /etc/dhcpc o dhcpcd va stocker des
  informations pour DHCP, et le fichier dhcpcd va tre copi dans
  /usr/sbin.

  Pour que le systme initialise DHCP au dmarrage, tapez:


       cd /etc/rc.d
       mv rc.inet1 rc.inet1.OLD




  Cela va renommer l'ancien script d'initalisation du rseau en
  rc.inet1.OLD. Maintenant, il vous faut crer un nouveau script
  rc.inet1. Voici tout ce dont vous avez besoin:












  ______________________________________________________________________
  #!/bin/sh
  #
  # rc.inet1      This shell script boots up the base INET system.

  HOSTNAME=`cat /etc/HOSTNAME` #This is probably not necessary but I
                               #will leave it in anyways

  # Attach the loopback device.
  /sbin/ifconfig lo 127.0.0.1
  /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

  # IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the
  # eth0 interface. If you're only using loopback or SLIP, don't include the
  # rest of the lines in this file.

  /usr/sbin/dhcpcd
  ______________________________________________________________________



  Sauvegardez le et redmarrez votre ordinateur.

  Quand vous aurez termin, allez  la section ``La touche finale''.


  33..33..  RReedd HHaatt 66..xx eett MMaannddrraakkee 66..xx

  La configuration de dhcpcd avec une Red Hat 6.0 ou plus rcente est
  vraiment facile. Vous devez simplement lancer le panneau de contrle
  en tapant:


       control-panel




  puis

    Slectionnez NNeettwwoorrkk CCoonnffiigguurraattiioonn

    Cliquez sur IInntteerrffaacceess

    Cliquez sur AAdddd

    Slectionnez EEtthheerrnneett

    Dans la fentre EEddiitt EEtthheerrnneett//BBuuss IInntteerrffaaccee, slectionnez AAccttiivvaattee
     iinntteerrffaaccee aatt bboooott ttiimmee et choisissez DDHHCCPP comme IInntteerrffaaccee
     ccoonnffiigguurraattiioonn pprroottooccooll.


  Notez que dans la Red Hat 6.x, le client DHCP par dfaut est un
  programme nomm pump qui remplace le dhcpcd mentionn ci-dessus. Un
  paquetage dhcpcd se trouve sur le CD-ROM, donc si vous ne vous en
  tirez pas avec pump, vous pouvez toujours essayer avec dhcpcd. Une
  fois dhcpcd install (par exemple par rpm -i
  dhcpcd-1.3.17pl2-1.i386.rpm), vous allez devoir faire quelques
  ``modifications''.

  Quelques notes supplmentaires d'Alexander Stevenson
  alexander.stevenson@home.com <mailto:alexander.stevenson@home.com>:

  Je n'ai pas russi  utiliser DHCPcd. Finalement, c'est pump, inclus
  dans la Mandrake 6.0 (et je suppose donc dans la Red Hat) qui a bien
  voulu fonctionner. J'ai utilis la commande suivante:


       pump -i eth0 -h hte




  Le nom d'hte est sans importance, mais sans lui, le serveur ne rpond
  pas.

  J'ai alors chang la ligne correspondante de mon script /sbin/ifup
  pour y intgrer cette modification; la version par dfaut n'inclut pas
  l'option -h et ne fonctionne donc pas chez moi.

  En rsum, si vous utilisez Linuxconf, et si a ne fonctionne pas
  aprs avoir choisi l'option "DHCP" pour votre interface, essayez
  d'ajouter "-h hte"  l'invocation de pump dans le script /sbin/ifup.
  Mon script ressemble maintenant  a:

  ______________________________________________________________________
  ...
  if [ -n "$PUMP" ]; then
      echo -n "Determining IP information for $DEVICE..."
      if /sbin/pump -i $DEVICE -h hostname; then
          echo " done."
      else
          echo " failed."
          exit 1
      fi
  else ...
  ______________________________________________________________________



  C'est tout. Il suffit maintenant de redmarrer votre machine ou de
  taper


       /sbin/ifup eth0




  sur la ligne de commande.


  33..44..  RReedd HHaatt 55..xx

  La configuration de dhcpcd avec une Red Hat 5.0 ou plus rcente est
  vraiment facile. Vous devez simplement lancer le panneau de contrle
  en tapant:


       control-panel




  puis

    Slectionnez NNeettwwoorrkk CCoonnffiigguurraattiioonn

    Cliquez sur IInntteerrffaacceess


    Cliquez sur AAdddd

    Slectionnez EEtthheerrnneett

    Dans la fentre EEddiitt EEtthheerrnneett//BBuuss IInntteerrffaaccee, slectionnez AAccttiivvaattee
     iinntteerrffaaccee aatt bboooott ttiimmee et choisissez DDHHCCPP comme IInntteerrffaaccee
     ccoonnffiigguurraattiioonn pprroottooccooll.

  Quand vous aurez termin, allez  la section ``La touche finale''.


  33..55..  RReedd HHaatt 44..xx eett CCaallddeerraa OOppeennLLiinnuuxx 11..11//11..22

  dhcpcd est inclus dans la distribution standard de Red Hat sous la
  forme d'un paquetage RPM. Vous pouvez le trouver dans le rpertoire
  RPMS de votre CD-ROM ou le tlcharger depuis
  <ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/dhcpcd-0.6-2.i386.rpm>
  et l'installer avec:


       rpm -i dhcpcd-0.6-2.i386.rpm




  Vous pouvez galement compiler votre propre version en suivant les
  instructions donnes pour la ``Slackware''.

  Ces informations m'ont t communiques par  <nothing@cc.gatech.edu>:


  ______________________________________________________________________
  J'ai enlev mon IP fixe et mon nom d'hte de /etc/resolv.conf. Par contre, j'y
  ai laiss la ligne "search ..." et les lignes de mes deux serveurs de noms
  (pour je ne sais quelle raison mon dhcpcd ne cre jamais de /etc/dhcpc/resolv.conf,
  et je dois utiliser un /etc/resolv.conf statique).

  Dans /etc/sysconfig/network, j'ai enlev les entres HOSTNAME et GATEWAY. J'ai
  laiss les autres entres (NETWORKING, DOMAINNAME, GATEWAYDEV) telles quelles.

  Dans /etc/sysconfig/network-scripts/ifcfg-eth0, j'ai enlev les entres
  IPADDR, NETMASK, NETWORK et BROADCAST. Je n'ai pas touch  DEVICE et
  ONBOOT. J'ai chang la ligne BOOTPROTO en BOOTPROTO=dhcp.

  Sauvegardez le fichier et redmarrez votre machine.
  ______________________________________________________________________



  Quand vous aurez termin, allez  la section ``La touche finale''.


  33..66..  DDeebbiiaann

  Vous pouvez ou bien utiliser le paquetage deb que vous trouverez 
  <ftp://ftp.debian.org/debian/dists/slink/main/binary-
  i386/net/dhcpcd_0.70-4.deb>, ou bien suivre les instructions
  d'installation sur Slackware. Pour dcompacter le paquetage deb,
  tapez:


       dpkg -i /l/endroit/ou/vous/mettez/vos/paquetages/deb/dhcpcd*deb




  Il semble que vous n'ayez rien  configurer. D'aprs Heiko Schlitter
  mann <mailto:heiko@os.inf.tu-dresden.de>:

  Comme les autres paquets Debian, le paquet dhcpcd installe son script
  d'initialisation en /etc/init.d/_<_n_o_m___d_u___p_a_q_u_e_t_a_g_e_>, ici
  /etc/init.d/dhcpcd, et cre des liens vers ce script dans les
  rpertoires /etc/rc?.d/.

  Le contenu des rpertoires /etc/rc?.d/ est ensuite xcut
  automatiquement  l'initialisation du systme.

  Si vous ne redmarrez pas votre systme aprs l'installation, vous
  devriez dmarrer le dmon manuellement:


       /etc/init.d/dhcpcd start




  Quand vous aurez termin, allez  la section ``La touche finale''.


  33..77..  LLiinnuuxxPPPPCC eett MMkkLLiinnuuxx

  La section suivante a t crite par R. Shapiro.

  Depuis la version "1999" (R5), LinuxPPC est pratiquement compatible
  avec le Red Hat 6,  l'exception du problme dcrit ci-dessous. En
  rgle gnrale, le mode d'emploi est le mme que pour la version
  actuelle de la ``Red Hat 6''

  Le problme est que par dfaut, la Red Hat 6.x utilise le client DHCP
  pump, qui ne fonctionne pas correctement sous LinuxPPC.

  Pour contourner ce problme, vous devez installer la dernire version
  du dhcpcd de Sergei Viznyuk et diter /sbin/ifup pour lui faire
  utiliser dhcpcd  la place de pump. Remplacez

  ______________________________________________________________________
  if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
       PUMP=true
   fi

   if [ -n "$PUMP" ]; then
  ______________________________________________________________________


  par

  ______________________________________________________________________
   if [  "$BOOTPROTO" = bootp ]; then
         echo " done."
       else
         echo " failed."
         exit 1
       fi
   elif [ "$BOOTPROTO" = dhcp ]; then
       echo -n "Determining IP information for $DEVICE..."
       if /sbin/dhcpcd -d $DEVICE ; then
         if [ -f /etc/dhcpc/dhcpcd-${DEVICE}.exe ]; then
             /etc/dhcpc/dhcpcd-${DEVICE}.exe
         fi
  ______________________________________________________________________


  et faites le changement correspondant dans /sbin/ifdown: remplacez

  ______________________________________________________________________
  if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
  ....
  fi
  ______________________________________________________________________


  par

  ______________________________________________________________________
  if [ "$BOOTPROTO" = bootp ]; then
  fi

  if [ "$BOOTPROTO" = dhcp ]; then
        if [ -f /var/run/dhcpcd-${DEVICE}.pid ]; then
                kill `cat /var/run/dhcpcd-${DEVICE}.pid`
                rm -f /var/run/dhcpcd-${DEVICE}.pid
        fi
  fi
  ______________________________________________________________________



  Une version RPM pour PPC de dhcpcd se trouve sur le CD de LinuxPPC
  1999; une version lgrement plus rcente se trouve dans le rpertoire
  contrib sur <ftp://ftp.linuxppc.org/>. Les sources, qui compilent
  telles quelles sur LinuxPPC 1999, sont disponibles 
  <ftp://ftp.phystech.com/pub/dhcpcd-1.3.17-pl9.tar.gz>.



  33..88..  LLaa ttoouucchhee ffiinnaallee

  Aprs la rinitialisation de votre machine, votre interface rseau
  devrait tre configure. Tapez:


       ifconfig




  Vus devriez obtenir quelque chose comme a:

  ______________________________________________________________________
  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
            UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
            RX packets:302 errors:0 dropped:0 overruns:0 frame:0
            TX packets:302 errors:0 dropped:0 overruns:0 carrier:0 coll:0

  eth0      Link encap:Ethernet  HWaddr 00:20:AF:EE:05:45
            inet addr:24.128.53.102  Bcast:24.128.53.255  Mask:255.255.254.0
            ^^^^^^^^^^^^^^^^^^^^^^^
            UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:24783 errors:1 dropped:1 overruns:0 frame:1
            TX packets:11598 errors:0 dropped:0 overruns:0 carrier:0 coll:96
            Interrupt:10 Base address:0x300
  ______________________________________________________________________


  Si vous avez un nombre  l'air normal dans "inet addr", c'est bon. Si
  vous voyez 0.0.0.0, ne dsesprez pas, c'est un rsultat temporaire,
  en attendant que dhcpcd obtienne l'adresse IP. Si au bout de quelques
  minutes, vous voyez toujours 0.0.0.0, consultez la sections
  ``problmes''. dhcpcd est un dmon qui continuera  tourner tant que
  votre machine restera allume. Toutes les trois heures, il contactera
  le serveur DHCP pour renouveler l'attribution de l'adresse IP. Il con
  signera tous les messages dans le journal du systme (/var/adm/syslog/
  sur Slackware, /var/log/syslog/ sur Red Hat ou OpenLinux).

  Une dernire chose : vous devez prciser vos serveurs de noms. Il
  existe deux faons de le faire. Vous pouvez demander les adresses de
  ses serveurs de noms  votre fournisseur d'accs et les mettre dans
  /etc/resolv.conf. Vous pouvez aussi laisser dhcpcd obtenir la liste
  des serveurs de noms depuis le serveur DHCP et le laisser crer un
  resolv.conf adapt dans /etc/dhcpc/. Pour ma part, j'ai dcid de
  laisser faire dhcpcd. Pour cela:

    Sauvegardez votre ancien /etc/resolv.conf


       mv /etc/resolv.conf /etc/resolv.conf.OLD




    Si le rpertoire /etc/dhcpc/ n'existe pas, crez le


       mkdir /etc/dhcpc




    Faites un lien de /etc/dhcpc/resolv.conf vers /etc/resolv.conf


       ln -s /etc/dhcpc/resolv.conf /etc/resolv.conf




  Si a ne fonctionne pas, essayez ceci (rparation suggre par noth
  ing@cc.gatech.edu, avec quelques modifications de Henrik Stoerner):


  J'ai du procder  ce changement car mon dhcpcd ne cre pas de fichier
  /etc/dhcpc/resolv.conf. Dans /etc/sysconfig/network-scripts/ifup, j'ai
  effectu le changement suivant, qui n'est qu'une malheureuse
  bidouille, mais qui marche pour moi: j'ai chang

  ______________________________________________________________________
  elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
      echo -n "Using DHCP for ${DEVICE}... "
      /sbin/dhcpcd -c /etc/sysconfig/network-scripts/ifdhcpc-done ${DEVICE}
      echo "echo \$$ > /var/run/dhcp-wait-${DEVICE}.pid; exec sleep 30" | sh

      if [ -f /var/run/dhcp-wait-${DEVICE}.pid ]; then
          ^^^^
          echo "failed."
          exit 1
  ______________________________________________________________________


  en:




  ______________________________________________________________________
  elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
      echo -n "Using DHCP for ${DEVICE}... "
      /sbin/dhcpcd
      echo "echo \$$ > /var/run/dhcp-wait-${DEVICE}.pid; exec sleep 30" | sh

      if [ ! -f /var/run/dhcp-wait-${DEVICE}.pid ]; then
          ^^^^^^
         echo "failed."
         exit 1
  ______________________________________________________________________


  Remarquez le point d'exclamation dans if [ ! -f /var/run/dhcp-
  wait-${DEVICE}.pid ];.

  Maintenant, admirez le rsultat! :-)


  33..99..  NNootteess ddiivveerrsseess

  Ce qui suit n'est pas  proprement parler ncessaire, mais peut tre
  utile  certaines personnes.

  Si vous n'avez besoin de votre connexion qu'occasionnellement, vous
  pouvez dmarrer dhcpcd depuis la ligne de commandes ( condition
  d'tre root) en tapant:


       /usr/sbin/dhcpcd




  Quand vous voulez couper la connexion, tapez:


       /usr/sbin/dhcpcd -k






  44..  PPrroobbllmmeess

  Si vous avez bien suivi toutes les tapes ci-dessus et si malgr tout
  vous ne pouvez pas accder au rseau, plusieurs explications sont
  possibles.


  44..11..  VVoottrree ccaarrttee rrsseeaauu eesstt mmaall ccoonnffiigguurree..

  Pendant l'initialisation du systme, Linux va rechercher votre carte
  rseau et devrait afficher quelque chose de ce genre:

  ______________________________________________________________________
  eth0: 3c509 at 0x300 tag 1, 10baseT port, address  00 20 af ee 11 11, IRQ 10.
  3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov
  ______________________________________________________________________


  Si aucun message de ce genre n'apparait, votre carte ethernet n'est
  vraisemblablement pas reconnue par Linux. Si votre carte est une carte
  gnrique (un clone de NE2000), vous devriez avoir une disquette avec
  des utilitaires DOS que vous pouvez utiliser pour la configurer.
  Essayez plusieurs IRQ jusqu' ce que Linux reconnaisse votre carte.
  Les IRQ 9, 10 ou 12 conviennent gnralement.


  44..22..  WWiinnddoowwss NNTT..  VVoottrree sseerrvveeuurr DDHHCCPP nnee ssuuppppoorrttee qquuee llaa RRFFCC 11554411 oouu
  ffoonnccttiioonnnnee ssoouuss

  Essayez de lancer dhcpcd par


       dhcpcd -r




  Utilisez ifconfig pour vrifier que votre interface rseau est
  configure (attendez quelques secondes que la configuration soit
  termine; au dpart, vous obtiendrez "inet addr: 0.0.0.0").

  Si cela rsoud votre problme, ajoutez l'option "-r"  vos scripts
  d'initialisation, c'est  dire remplacez /sbin/dhcpcd par /sbin/dhcpcd
  -r.

  Par exemple, sous Red Hat, ditez le script /etc/sysconfig/network-
  scripts/ifup et changez ce qui suit:

  ______________________________________________________________________
          IFNAME=$[ {DEVICE} \
          "/sbin/dhcpcd -r -c /etc/"- etc etc.
  ______________________________________________________________________




  44..33..  AAuu ddmmaarrrraaggee,, jjee vvooiiss llee mmeessssaaggee dd''eerrrreeuurr ""UUssiinngg DDHHCCPP ffoorr eetthh00

  Vous utilisez probablement une Red Hat et vous n'avez pas suivi
  scrupuleusement les instructions. Il vous manque un point
  d'exclamation dans un des scripts. Voyez ``ici'' pour corriger a.


  44..44..  rrppoonnddrree..  MMoonn rrsseeaauu ffoonnccttiioonnnnee ppeennddaanntt qquueellqquueess mmiinnuutteess aavvaanntt
  dd''aarrrrtteerr ddee

  Il semble que gated (le dmon de passerelle) puisse embrouiller le
  routage sur des machines Linux, avec le rsultat mentionn ci-dessus.
  Regardez s'il tourne:


       ps -auxww | grep gate




  S'il tourne effectivement, dsinstallez-le avec le gestionnaire RPM de
  Red Hat ou enlevez son entre dans /etc/rc.d/.


  44..55..  mmeessssaaggee ""NNOO DDHHCCPPOOFFFFEERR"" ddaannss llee jjoouurrnnaall dduu ssyyssttmmee.. IIll ssee ttrroouuvvee
  qquuee jj''aaii uunnee ccaarrttee eetthheerrnneett PPCCMMCCIIAA..  MMaa ccaarrttee eetthheerrnneett eesstt rreeccoonnnnuuee aauu
  ddmmaarrrraaggee,, mmaaiiss jj''aaii ttoouujjoouurrss llee

  Assurez-vous que le port 10baseT (la "prise de tlphone") de votre
  carte est activ. Le meilleur moyen de le vrifier est de regarder
  pour quel type de connecteur votre carte est configure  l'allumage,
  par exemple:
  ______________________________________________________________________
  eth0: 3c509 at 0x300 tag 1, 10baseT port, address  00 20 af ee 11 11, IRQ 10.
                              ^^^^^^^^^^^^
  3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov
  ______________________________________________________________________


  Des utilisateurs de micro-ordinateurs portables m'ont signal qu'ils
  avaient ce genre de problmes  cause des utilitaires PCMCIA (plus
  spcifiquement ifport), qui configurent la carte pour utiliser le port
  10base2 (ethernet fin). Vous devez vous assurer que vous utilisez le
  port 10baseT pour votre connexion. Si ce n'est pas le cas, reconfig
  urez votre carte et redmarrez la machine.


  44..66..  MMoonn cclliieenntt DDHHCCPP eennvvooiiee ddeess rreeqquutteess,, mmaaiiss ppeerrssoonnnnee nnee rrppoonndd..

  Cette partie est due  Peter Amstutz.

  Sur certains systmes, vous devez inclure un nom d'hte dans la
  requte DHCP. Avec dhcpcd, vous pouvez faire a comme a:


       dhcpcd -h hotetoto




  Le nom d'hte requis correspond probablement  votre nom d'utilisateur
  sur le rseau.


  44..77..  ttoouujjoouurrss ppaass..  JJ''aaii bbiieenn ssuuiivvii ttoouutteess lleess ttaappeess eett mmaa mmaacchhiinnee
  nnee ssee ccoonnnneeccttee

  En gnral, un modem cable mmorise l'adresse ethernet de votre carte
  rseau. Donc si vous connectez une nouvelle machine ou changez de
  carte rseau, vous allez devoir "apprendre"  votre modem 
  reconnaitre la nouvelle machine ou la nouvelle carte. En gnral, il
  suffit d'teindre le modem et de le rallumer avec l'ordinateur en
  marche. Sinon, vous devrez appeler le support technique pour leur
  signaler que vous avez chang de carte.

  Il se peut aussi que vous ayez des rgles de filtrage (installes par
  ipfwadm) qui interdisent le trafic sur les ports 67 et 68 utiliss par
  DHCP pour communiquer les informations de configuration. Vrifiez vos
  filtres avec attention.


  44..88..  ccoonnnneecctteerr..  JJee ssuuiiss aabboonnnn  MMeeddiiaaOOnnee EExxpprreessss eett jjee nnee ppeeuuxx ttoouu
  jjoouurrss ppaass mmee

  Il semble que MediaOne ait ajout quelques extensions  DHCP qui ne
  devraient pas y tre. C'est cens ne plus tre un problme, mais si
  malgr tout vous rencontrez des problmes, regardez de ce ct. Si
  vous avez la (mal)chance d'avoir Windows NT sur votre machine,
  vrifiez dans l'observateur dvnements, vous devriez y trouver un
  avertissement de ce style:

  ______________________________________________________________________
  DHCP received an unknown option 067 of length 005. The raw option data is
  given  below.

  0000: 62 61 73 69 63            basic
  ______________________________________________________________________

  S'il s'agit bien de ce problme, allez voir  <ftp://van
  buer.ddns.org/pub/> et tlchargez ou bien un binaire, ou bien les
  sources de la version corrige.



  44..99..  UUnn aauuttrree cclliieenntt DDHHCCPP ((llee ddhhcclliieenntt  ddee ll''IISSCC))

  Si vous n'arrivez pas  configurer votre connection au moyen de
  dhcpcd, vous voudrez peut-tre essayer le dhclient de l'ISC. dhclient
  fait partie de la distribution DHCP de l'ISC, qui contient un serveur
  et un client. Les instructions sur la faon de vous procurer et de
  compiler la distribution DHCP se trouvent dans la section ``Un serveur
  DHCP pour UNIX''. Quand vous aurez termin, revenez  la section
  prsente pour la configuration du client.

  Les informations qui suivent m'ont t fournies par Ted Lemon
  mellon@isc.org <mailto:mellon@isc.org>, un des auteurs de dhclient.

  Avec la version actuelle du client DHCP, vous n'avez pas rellement
  besoin d'un fichier dhclient.conf. Il vous suffit d'invoquer
  dhclient :


       /sbin/dhclient




  Cette commande va configurer toutes les interfaces pouvant faire de la
  diffusion  (-- NdT: broadcast--) . Si cela ne fonctionne pas, ou si
  vous ne voulez configurer qu'une seule interface, crez un fichier
  /etc/dhclient.conf  partir de l'exemple de configuration suivant :

  ______________________________________________________________________
  interface "eth0" {
    send dhcp-client-identifier 1:xx:xx:xx:xx:xx:xx;
    send dhcp-lease-time 86400;
  }
  ______________________________________________________________________


  Ici, nous supposons que votre interface ethernet est eth0 ; sinon,
  faites la modification adquate. Remplacez galement xx:xx:xx:xx:xx:xx
  par votre adresse ethernet. Ce fichier dhclient.conf fait ressembler
  votre client DHCP  un client Windows 95.



  55..  CCoonnffiigguurreerr uunn sseerrvveeuurr DDHHCCPP

  55..11..  UUnn sseerrvveeuurr DDHHCCPP ppoouurr UUNNIIXX

  Il existe plusieurs serveurs DHCP pour les systmes d'exploitation "
  la UN*X", aussi bien commerciaux que libres. L'un des plus populaires
  est le DHCPd de Paul Vixie et de l'ISC. Actuellement, la dernire
  version stable est la 2.0, mais la 3.0 est en bta-test. Vous pouvez
  les obtenir depuis  <ftp://ftp.isc.org/isc/dhcp/>.

  Certaines distributions fournissent un paquetage dhcpd prcompil; si
  vous l'avez obtenu de cette manire, vous pouvez ignorer ce qui suit.

  Aprs avoir tlcharg le serveur, dcompactez le. Ensuite, placez
  vous dans le rpertoire de la distribution et tapez:


  ./configure




  La configuration des diffrents paramtres va prendre quelques temps.
  Une fois qu'elle est termine, tapez:


       make




  puis


       make install





  55..22..  CCoonnffiigguurraattiioonn dduu sseerrvveeuurr DDHHCCPP

  Une fois le serveur install, tapez ifconfig -a. Vous devriez obtenir
  quelque chose comme a:

  ______________________________________________________________________
  eth0      Link encap:10Mbps Ethernet  HWaddr 00:C0:4F:D3:C4:62
            inet addr:183.217.19.43  Bcast:183.217.19.255  Mask:255.255.255.0
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:2875542 errors:0 dropped:0 overruns:0
            TX packets:218647 errors:0 dropped:0 overruns:0
            Interrupt:11 Base address:0x210
  ______________________________________________________________________


  Si le mot MULTICAST n'apparait pas, vous devez recompiler votre noyau
  avec le support multicast. Sur la plupart des systmes, a ne devrait
  pas tre ncessaire.

  Ensuite, ajoutez une route pour 255.255.255.255. D'aprs le fichier
  README du DHCPd :


       Pour que dhcpd fonctionne correctement avec des clients DHCP pointilleux
       (comme celui de Windows 95), il doit pouvoir envoyer des paquets IP avec une
       adresse de destination de 255.255.255.255. Malheureusement, Linux insiste pour
       changer 255.255.255.255 en l'adresse de diffusion du rseau (ici
       192.5.5.223). Ceci constitue une violation du protocole DHCP et, alors que
       beaucoup de clients DHCP ignorent ce problme, certains (par exemple tous ceux
       de Microsoft) le remarquent. Les clients qui ont ce problme sembleront ne pas
       voir les messages DHCPOFFER du serveur.




  Pour cela, tapez:


       route add -host 255.255.255.255 dev eth0




  Si vous voyez un message d'erreur:


       "255.255.255.255: Unknown host"




  essayez d'ajouter la ligne suivante  votre fichier /etc/hosts:


       255.255.255.255 tout-le-monde




  Ensuite, essayez:


       route add -host tout-le-monde dev eth0




  ou


       route add 255.255.255.0 dev eth0




  eth0 dsigne bien sr l'interface rseau que vous utilisez. Si vous en
  utilisez une autre, faites les changements ncessaires.


  55..33..  OOppttiioonnss ddee DDHHCCPPdd

  Maintenant, il vous faut configurer DHCPd. Pour cela, vous allez
  devoir crer ou diter /etc/dhcpd.conf. Il existe une interface
  graphique pour configurer /etc/dhcpd.conf sous KDE (
  <http://www.kde.org/>), appele kcmdhcpd, trs similaire  l'outil de
  configuration de DHCP de Windows NT. Lorsque KDE 2.0 sortira, il
  devrait inclure kcmdhcpd. Vous pouvez aussi vous le procurer
  directement   <ftp://ftp.us.kde.org/pub/kde/unstable/apps/network/>.

  Si vous prfrez configurer dhcpd  la main, suivez les instructions
  ci-dessous.

  La plupart du temps, vous voudrez assigner des adresses IP
  alatoirement. Cela peut se faire de la faon suivante:















  ______________________________________________________________________
  # Exemple de /etc/dhcpd.conf
  # (Ajoutez vos commentaires ici)
  default-lease-time 600;
  max-lease-time 7200;
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.1.255;
  option routers 192.168.1.254;
  option domain-name-servers 192.168.1.1, 192.168.1.2;
  option domain-name "mondomaine.org";

  subnet 192.168.1.0 netmask 255.255.255.0 {
     range 192.168.1.10 192.168.1.100;
     range 192.168.1.150 192.168.1.200;
  }
  ______________________________________________________________________


  Le serveur DHCP distribuera aux clients des adresses IP dans les
  intervalles 192.168.1.10-192.168.1.100 et 192.168.1.150-192.168.1.200.
  L'attribution de l'adresse IP sera de 600 secondes si le client ne
  demande pas une dure diffrente, et de 7200 secondes au maximum. Le
  serveur va galement "conseiller" au client d'utiliser le masque de
  sous-rseau 255.255.255.0, l'adresse de diffusion 192.168.1.255,
  192.168.1.254 comme routeur/passerelle et 192.168.1.1 et 192.168.1.2
  comme serveurs DNS.

  Si vous devez spcifier un serveur WINS pour vos clients Windows, vous
  devrez inclure l'option netbios-name-servers:

  ______________________________________________________________________
  option netbios-name-servers 192.168.1.1;
  ______________________________________________________________________



  Vous pouvez aussi assigner des adresses IP spcifiques en utilisant
  l'adresse ethernet du client:

  ______________________________________________________________________
  host haagen {
     hardware ethernet 08:00:2b:4c:59:23;
     fixed-address 192.168.1.222;
  }
  ______________________________________________________________________


  Cela assignera l'adresse IP 192.168.1.222  un client dont l'adresse
  ethernet est 08:00:2b:4c:59:23.

  Vous pouvez aussi mlanger ces diffrentes possibilits, par exemple
  si vous voulez donner des adresses IP statiques  certains clients
  (les serveurs, par exemple) et des adresses IP dynamiques  d'autres
  (par exemple les ordinateurs portables de certains utilisateurs). Il
  existe de nombreuses autres options: adresse du serveur NIS, du
  serveur d'horloge... Si vous avez besoin de ces options, lisez la page
  de manuel de dhcpd.conf.


  55..44..  DDmmaarrrraaggee dduu sseerrvveeuurr

  Il ne reste qu'une chose  faire avant de dmarrer le serveur. La
  plupart des installations de DHCPd ne crent pas par dfaut de fichier
  dhcpd.leases. Ce fichier est utilis par DHCPd pour stocker des
  informations  propos des attributions en cours de validit. Il est en
  format texte brut, donc vous pouvez le lire pendant le fonctionnement
  de DHCPd. Pour le crer, tapez:


       touch /var/state/dhcp/dhcpd.leases




  sur la ligne de commandes. Cela va crer un fichier vide (de taille
  nulle). Certaines vieilles versions de dhcpd 2.0 plaaient ce fichier
  en /etc/dhcpd.leases. Vous n'avez pas  y changer quoi que ce soit;
  c'est dhcpd qui le manipulera lui-mme. Si vous voyez un message
  d'erreur disant que le fichier n'existe pas, ignorez le et passez 
  l'tape suivante.

  Vous pouvez maintenant invoquer le serveur DHCP. Contentez vous de
  taper (ou de rajouter dans les scripts de dmarrage):


       /usr/sbin/dhcpd




  Cette commande invoquera dhcpd sur l'interface eth0. Pour l'utiliser
  sur une autre interface, prcisez-le simplement sur la ligne de com
  mande, par exemple:


       /usr/sbin/dhcpd eth1




  Pour vrifier que tout fonctionne correctement, vous devriez d'abord
  activer le mode de dbogage et mettre le serveur en avant-plan. Vous
  pouvez le faire en tapant:


       /usr/sbin/dhcpd -d -f




  Ensuite, allumez un de vos clients et regardez la console de votre
  serveur. Vous verrez apparaitre un certain nombre de messages de
  dbogage. Si tout se passe bien, vous avez termin. :-) Quittez dhcpd
  et relancez-le sans les options -d -f. Si vous voulez qu'il soit lanc
  au dmarrage, rajoutez dhcpd par exemple au fichier
  /etc/rc.d/rc.local.
















  Mini-HOWTO DHCPcd
  Vladimir Vuksan vuksan@veus.hr
   _T_r_a_d_u_c_t_i_o_n  _f_r_a_n_c_a_i_s_e  _:  _I_g_o_r  _G_e_n_i_b_e_l (genibel@emi.u-bor-
  deaux.fr) .
  v2.5, Derniere revision: 11 Janvier 1998.

  Comment configurer Linux en tant que client DHCP.

  Attention: Les informations contenues dans ce  document  NE  SONT  PAS
  officielles  et  il  n'y  a  aucune garanties quant a la fiabilite des
  donnees. Toutes les informations sont fournies de bonne foi.  Utilisez
  les a vos propres risques.

  11..  IInnttrroodduuccttiioonn

  Ce HOWTO explique comment configurer un systeme LLiinnuuxx pour fonctionner
  comme client (DHCPcd) dans un environnement DHCP. Si vous  faites  des
  recherches  a  propos  du  serveur  DHCP, vous aurez besoin de lire le
  Mini-HOWTO DHCPd situe a: http://sunsite.unc.edu/LDP/HOWTO/mini/DHCPd.

  DHCP  est  un protocole qui permet a une machine cliente d'obtenir des
  parametres reseau depuis un serveur. Nombre d'organisations commencent
  a  l'utiliser  car  il  permet  de  simplifier l'administration reseau
  specialement pour de grands reseaux ou bien des reseaux qui  possedent
  de  nombreux utilisateurs mobiles. DHCP est en passe d'etre enormement
  utilise par les Fournisseurs  d'Acces  Internet  par  le  cable  comme
  MediaOne  Express,  Time  Warner,  etc.  De  plus  amples informations
  concernant DHCP peuvent etre trouvees dans la FAQ DHCP.

  22..  LLee sseerrvviiccee RRooaadd RRuunnnneerr

  Si vous utilisez le service Road Runner par  le  cable  allez  voir  a
  http://people.qualcomm.com/karn/rr/index.html

  Si cela ne resoud pas votre probleme, essayez ce qui suit.

  33..  NNooyyaauuxx 22..11..xx

  Si  vous  utiliser  une  version de noyau superieur a 2.0.30 (je ne me
  souviens pas du nombre exact de plus, www.linuxhq.com est en ce moment
  hors  service)  vous  pourrez  rencontrer  des  problemes avec dhcpcd.
  D'apres Dan Khabaza:
   _`_`_L_e _c_h_a_n_g_e_m_e_n_t _e_s_t _d_u _a _l_a _d_i_f_f_e_r_e_n_c_e _d_a_n_s _l_e _p_a_q_u_e_t_a_g_e _r_e_s_e_a_u _i_p_v_4_,
  _d_a_n_s _l_a _f_a_c_o_n _d_e _d_e_f_i_n_i_r _d_e_s _v_a_l_e_u_r_s _p_a_r _d_e_f_a_u_t _p_o_u_r _c_e_r_t_a_i_n_s _c_h_a_m_p_s_'_'

  Dan a fourni un patch pour resoudre ce probleme que l'on peut  obtenir
  a  http://www.cro.net/~vuksan/dhcppatch.  Pour  l'appliquer, copier le
  simplement dans le repertoire source de dhcpcd (les instructions  pour
  rapatrier  les  sources  sont  situees  plus  loins)  et tapez patch <
  dhcppatch

  dhcpcd devrait se compiler normalement apres l'application du patch.

  Un autre patch est  fourni  par  Paul  Rossington  si  vous  avez  des
  problemes  avec  le  patch  precedent.  C'est  en fait le fichier if.C
  entier. Recuperez le a www.cro.net/~vuksan/if.C et copier le  dans  le
  repertoire source de dhcpcd.

  44..  UUttiilliissaatteeuurrss ddee llaa RReeddHHaatt 55..00

  La  configuration  sous  la RedHat 5.0 est extremement facile. Tout ce
  que vous avez  a  faire  est  de  demarrer  panneau  de  configuration
  (Control Panel) en tapant:

       control-panel

  Selectionnez  alors  "Configuration Reseau (Network Configuration)" et
  pour l'interface eth0 definissez  DHCP  comme  protocole.  Les  autres
  parametres devront etre laisse vide.

  55..  RReesseeaauu TTookkeenn RRiinngg

  Si  vous  essayez d'utiliser dhcpcd sur un reseau Token Ring, celui-ci
  ne fonctionnera pas. Voici la solution qui m'a ete proposee par Henrik
  Stoener:  _`_`_L_e  _p_r_o_b_l_e_m_e  _e_s_t  _q_u_e  _d_h_c_p_c_d  ne  connait que les cartes
  Ethernet. S'il trouve une carte Token Ring, il refuse  de  faire  quoi
  que ce soit avec et retourne "interface is not ethernet".

  _L_a  _s_o_l_u_t_i_o_n  _e_s_t _d_'_a_p_p_l_i_q_u_e_r _u_n _s_i_m_p_l_e _p_a_t_c_h _a_u_x _s_o_u_r_c_e_s _d_h_c_p_c_d_-_0_._7_0.
  J'ai mis une petite page Web avec le patch, les fichier RPM de  RedHat
  et une version precompilee a http://eolicom.olicom.dk/~storner/dhcp _L_e
  _p_a_t_c_h _a _e_t_e _e_n_v_o_y_e_e _a_u_x _d_e_v_e_l_o_p_p_e_u_r_s_, _i_l  _s_e_r_a_,  _e_s_p_e_r_o_n_s_-_l_e_,  _i_n_t_e_g_r_e
  _d_a_n_s _u_n_e _f_u_t_u_r_e _v_e_r_s_i_o_n _d_e _d_h_c_p_c_d.''

  66..  MMeetthhooddee

  66..11..  PPrreemmiieerree eettaappee

  Quel  que soit la distribution que vous utilisez, vous aurez besoin de
  telecharger le demon client pour LLiinnuuxx. Le paquetage  dont  vous  avez
  besoin  est  appele dhcpcd et sa version actuelle est 0.70. Le fichier
  de description du paquetage ecrit:

  Title:          dhcpcd
  Version:        0.70
  Entered-date:   05MAY97
  Description:    dhcpcd is an RFC2131 compliant DHCP client daemon. It
                  gets an IP address and other information from a
                  corresponding DHCP server, configures the network
                  interface automatically, and tries to renew the lease
                  time according to RFC2131. It works in the RFC1541
                  compliant mode when the '-r' option is specified.
                  So far it is found that dhcpcd 0.70 works fine with
                  the
                  following DHCP servers:
                    1. ISC's dhcpcd-BETA-5.15
                    2. DHCP server on Windows NT server 3.51
                    3. DHCP server version 1.3b by WIDE project.
                    4. DHCP server in the SolarNet PC-Admin 1.5 package
                    5. DHCP server used in Time Warner Cable's
                       Internet Access Service
                    6. DHCP server used in Bell Atlantic ADSL
                  See the "Changes" file if you want to know the
                  difference
                  from the previous version.
  Keywords:       DHCP, client, Linux
  Author:         yoichi@fore.com (Yoichi Hariguchi)
  Maintained-by:  yoichi@fore.com (Yoichi Hariguchi)
  Primary-site:   ftp.kobe-u.ac.jp:/pub/PC-UNIX/Linux/network/dhcp
                  33kB dhcpcd-0.70.tar.gz
  Alternate-site: sunsite.unc.edu:/pub/Linux/system/network/daemons
                  33kB dhcpcd-0.70.tar.gz
  Original-site:
  Platforms:       Linux 1.2.xx, 1.3.xx, 2.0.x
  Copying-policy: GPL

  66..11..11..  SSllaacckkwwaarree

  Vous pouvez telecharger la derniere copie de DHCPcd  depuis  n'importe
  quel          mirroir          de         sunsite         ou         :
  ftp://ftp.cdrom.com/pub/linux/sunsite/system/network/daemons/
  ftp://ftp.sunsite.unc.edu/pub/Linux/system/network/daemons/

  ftp://ftp.lip6.fr/pub/linux/sunsite/system/daemons/ (site de reference
  en France)

  Telechargez la derniere version de dhcpcd.tar.gz

  Decompressez-le: tar -zxvf dhcpcd-0.70.tar.gz,

  deplacez-vous dans le repertoire: cd dhcpcd-0.70,

  tapez: make.

  Vous aurez besoin d'etre root pour l'installer en tapant make install.

  Cela   creera   le  repertoire  /etc/dhcpcd  ou  DHCPcd  stockera  les
  parametres et dhcpcd sera copie dans le repertoire  /usr/sbin/.   Vous
  pouvez passer a la deuxieme etape.

  66..11..22..  RReeddHHaatt

  DHCPcd  est  inclu  dans la distribution standard de RedHat sous forme
  RPM et vous pouvez le  trouver  dans  le  repertoire  RPMS  du  CD-ROM
  contenant   la   distribution   ou   bien   le   telecharger   depuis:
  ftp://tsx-11.edu/pub/linux/distributions/redhat/redhat-4.2/i386/RedHat/RPMS/
  le fichier dhcpcd-0.6-2.i386.rpm

  et installez-le avec

  rpm -i dhcpcd-0.6-2.i386.rpm

  Vous  pouvez aussi compiler votre propre version en suivant les etapes
  de la Slackware. Lorsque vous avez fini, passez a l'etape 2.

  66..11..33..  DDeebbiiaann

  Il      y      a      un      package       pour       DHCPcd       a:
  ftp://ftp.debian.org/debian/stable/binary/net/.    Vous  pouvez  aussi
  suivre les etapes de la Slackware.

  Pour     decompresser     les     paquetage     tapez:     dpkg     -i
  /ou/se/trouve/votre/paquetage/dhcpcd*deb.

  Apres allez a l'etape 2.

  66..22..  DDeeuuxxiieemmee eettaappee

  L'(Les) instruction(s) suivante(s) depend(ent) de vos besoins.

  1. Si  vous  avez  besoin de ressources reseau occasionnellement, vous
     pouvez lancer dhcpcd depuis la ligne de commande (vous avez  besoin
     d'etre root pour l'executer) en tapant: /usr/sbin/dhcpcd.

     Lorsque vous avez besoin d'arreter le service, tapez:

     /usr/sbin/dhcpcd -k.

     Il  ne  vous manque, maintenant, que la configuration du serveur de
     noms (/etc/resolv.conf). Pour connaitre les  instructions  afin  de
     creer le fichier /etc/resolv.conf allez a l'etape 3.

  2. Si  vous  souhaitez (avez besoin) d'une connexion permanente, ainsi
     que l'execution du demon au demarrage suivez les  instructions  qui
     suivent.

  66..22..11..  SSllaacckkwwaarree..

  Pour  que le systeme utilise DHCP au demarrage tapez: cd /etc/rc.d, mv
  rc.inet1 rc.inet1.old.

  Cela renommera l'ancienne initilisation  du  reseau  en  rc.inet1.old.
  Vous  avez  maintenant besoin de creer le nouveau fichier rc.inet1. Il
  devrait ressembler a:

  #!/bin/sh
  #
  # rc.inet1      This shell script boots up the base INET system.
  #
  # Version:      @(#)/etc/rc.d/rc.inet1  1.01    05/27/93
  #

  HOSTNAME=`cat /etc/HOSTNAME` #This is probably not necessary but I
                               #will leave it in anyways

  # Attache le peripherique loopback.
  /sbin/ifconfig lo 127.0.0.1
  /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

  # SI VOUS AVEZ UNE CONNEXION ETHERNET, utilisez les lignes suivantes
  # pour configurer votre interface eth0. Si vous utilisez uniquement
  # le loopback ou bien SLIP, il ne faut pas inclure les lignes
  # restantes.

  /usr/sbin/dhcpcd

  Nommez le fichier precedant rc.inet1 et sauvegardez-le. Rebootez votre
  machine et allez a l'etape 3.

  66..22..22..  RReeddHHaatt..

  Cette  information  a  ete fournie par nothing (nothing@cc.gatech.edu)
  _`_`_J_'_a_i _e_n_l_e_v_e _m_o_n _a_d_r_e_s_s_e _i_p _s_t_a_t_i_q_u_e _a_i_n_s_i _q_u_e _l_e _n_o_m _d_e  _m_a  _m_a_c_h_i_n_e
  _d_a_n_s  _l_e  _f_i_c_h_i_e_r  _/_e_t_c_/_r_e_s_o_l_v_._c_o_n_f.  Toutefois,  j'ai laisse la ligne
  search ainsi que mes deux lignes nameserver (pour une raison inconnue,
  mon  dhcpcd  n'a  jamais cree de /etc/dhcpcd/resolv.conf, je dois donc
  utiliser un /etc/resolv.comf statique).

  _D_a_n_s _/_e_t_c_/_s_y_s_c_o_n_f_i_g_/_n_e_t_w_o_r_k j'ai  supprime  les  valeurs  de  HOSTNAME
  ainsi  que  de  GATEWAY.   J'ai laisse les autres entrees comme telles
  (NETWORKING, DOMAINNAME, GATEWAYDEV).

  _D_a_n_s  _/_e_t_c_/_s_y_s_c_o_n_f_i_g_/_n_e_t_w_o_r_k_-_s_c_r_i_p_t_s_/_i_f_c_f_g_-_e_t_h_0  j'ai   supprime   les
  entrees  IPADDR,  NETMASK,  NETWORK,  et  BROADCAST.  J'ai  laisse les
  entrees DEVICE et ONBOOT telles quelles. J'ai  modifie  la  valeur  de
  BOOTPROTO a BOOTPROTO=dhcp.''

  Savegardez le fichier et rebootez la machine.

  66..22..33..  DDeebbiiaann..

  Il  semblerait  qu'il  n'y ait pas besoin de configuration pour DHCPcd
  car: D'apres Heik Schlittermann _`_`_L_e  _p_a_q_u_e_t_a_g_e  _d_h_c_p_c_d  _i_n_s_t_a_l_l_e  _s_o_n
  _s_c_r_i_p_t  _d_e _d_e_m_a_r_r_a_g_e _c_o_m_m_e _n_'_i_m_p_o_r_t_e _q_u_e_l _p_a_q_u_e_t_a_g_e _d_a_n_s _/_e_t_c_/_i_n_i_t_._d_/,
  ici /etc/init.d/dhcpcd, et le lie a differents repertoire  /etc/rc?.d.
  Le contenu des differents /etc/rc?.d/ sont alors execute au demarrage.
  Si vous ne rebootez  pas  votre  machine  apres  l'installation,  vous
  pouvez  quand  meme demarrer le demon manuellement: /etc/init.d/dhcpcd
  start'' Allez a. l'etape 3.

  66..33..  TTrrooiissiieemmee eettaappee

  Cette etape devrait etre la meme pour toutes les distributions.

  Apres que votre machine ait reboote, votre  interface  reseau  devrait
  etre  configuree. Tapez ifconfig : et vous devriez avoir quelque chose
  du genre:
  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
            UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
            RX packets:302 errors:0 dropped:0 overruns:0 frame:0
            TX packets:302 errors:0 dropped:0 overruns:0 carrier:0 coll:0

  eth0      Link encap:Ethernet  HWaddr 00:20:AF:EE:05:45
            inet addr:24.128.53.102  Bcast:24.128.53.255  Mask:255.255.254.0
            ^^^^^^^^^^^^^^^^^^^^^^^
            UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:24783 errors:1 dropped:1 overruns:0 frame:1
            TX packets:11598 errors:0 dropped:0 overruns:0 carrier:0 coll:96
            Interrupt:10 Base address:0x300

  Si vous avez un numero normal apres inet addr, c'est bon.  DHCPcd  est
  un  demon  et  continuera de s'executer tant que votre machine restera
  allumee. Toutes les trois heures il  contactera  le  serveur  DHCP  et
  essaiera  de  renouveler  le bail de l'adresse IP. Il placera tous les
  messages  journaux  dans  le  "journal  systeme"  (pour  la  Slackware
  /var/adm/syslog) si vous avez besoin de le consulter.

  Une  derniere  chose.  Vous  avez  besoin de specifier vos serveurs de
  noms. Il y a deux manieres de le faire, vous pouvez demander  a  votre
  fournisseur d'acces de vos donner les adresses de vos serveurs de noms
  et de les placer dans le  fichier  /etc/resolv.conf  ou  bien,  DHCPcd
  obtient  la  liste  depuis  le  serveur  DHCP et construira un fichier
  /etc/dhcpcd/resolv.conf. J'ai decide  d'utiliser  les  resolv.conf  de
  DHCPcd en faisant les choses suivantes:

  +o  Sauvegarder   votre   ancien   resolv.conf:   mv   /etc/resolv.conf
     /etc/resolv.conf.old,

  +o  Si  le  repertoire  /etc/dhcpcd/  n'existe  pas,  creez  le:  mkdir
     /etc/dhcpcd/,

  +o  Faire un lien entre /etc/dhcpcd/resolv.conf et /etc/resolv.conf: ln
     -s /etc/dhcpcd/resolv.conf /etc/resolv.conf

  Si cela ne marche pas, essayez cela (propose par nothing@cc.gatech.edu
  avec une retouche de Henrik Stoerner)

  _C_e_t_t_e  _d_e_r_n_i_e_r_e  _e_t_a_p_e  _d_o_i_t _e_t_r_e _e_x_e_c_u_t_e_e _s_e_u_l_e_m_e_n_t _s_i _d_h_c_p_c_d ne cree
  pas     le     /etc/dhcpcd/resolv.conf.      Dans      le      fichier
  /etc/sysconfig/network-scripts/ifup  j'ai  effectue  les modifications
  suivantes (qui sont vraiment de petites bidouilles, mais qui  marchent
  pour moi).

  #################################
  elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
      echo -n "Using DHCP for ${DEVICE}... "
      /sbin/dhcpcd -c /etc/sysconfig/network-scripts/ifdhcpc-done ${DEVICE}
      echo "echo \$$ > /var/run/dhcp-wait-${DEVICE}.pid; exec sleep 30" | sh

      if [ -f /var/run/dhcp-wait-${DEVICE}.pid ]; then
          ^^^^
          echo "failed."
          exit 1
  #################################

   _J_e _l_'_a_i _c_h_a_n_g_e _e_n_:

  #################################
  elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
      echo -n "Using DHCP for ${DEVICE}... "
      /sbin/dhcpcd
      echo "echo \$$ > /var/run/dhcp-wait-${DEVICE}.pid; exec sleep 30" | sh

      if [ ! -f /var/run/dhcp-wait-${DEVICE}.pid ]; then
          ^^^^^^
         echo "failed."
         exit 1
  #################################

   _N_o_t_e_z  _l_e  _! _(_p_o_i_n_t _d_'_i_n_t_e_r_r_o_g_a_t_i_o_n_) _d_a_n_s _l_e _i_f _[ _! _-_f _/_v_a_r_/_r_u_n_/_d_h_c_p_-
  _w_a_i_t_-_$_(_D_E_V_I_C_E_)_._p_i_d _] _; Maintenant asseyez vous et contemplez <:^}

  77..  PPrroobblleemmeess

  Si vous  avez  suivi  les  etapes  particulieres  et  qu'il  vous  est
  impossible d'acceder au reseau, il y a peut-etre des explications:

  77..11..  VVoottrree ccaarrttee rreesseeaauu nn''eesstt ppaass ccoorrrreecctteemmeenntt ccoonnffiigguurreeee..

  Pendant  le processus de demarrage votre systeme LLiinnuuxx interroge votre
  carte reseau et devrait dire quelque chose comme ceci:

  eth0: 3c509 at 0x300 tag 1, 10baseT port, address  00 20 af ee 11 11, IRQ 10.
  3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov

  Si un message similaire n'apparait pas, il semblerait que votre  carte
  reseau  ne soit pas reconnue par votre systeme LLiinnuuxx. Si vous possedez
  une carte generique  (un  clone  ne2000)  vous  avez  certainement  du
  recevoir  un disquette avec des utilitaires Dos qui vous permettent de
  configurer la carte.  Essayez  plusieurs  IRQ  jusqu'a  ce  que  LLiinnuuxx
  reconnaisse votre carte. (les IRQ 9,10,12 sont generalement bon).

  77..22..  VVoottrree sseerrvveeuurr DDHHCCPP ssuuppppoorrttee llaa RRFFCC 11554411..

  Essayez de lancer dhcpcd en tapant: dhcpcd -r.  Utilisez ifconfig pour
  controler la configuration de votre carte (attendez quelques  secondes
  pour  le processus de configuration, initialement il doit donner inet.
  addr=0.0.0.0).  Si  cette  solution  resoud  votre  probleme,  ajoutez
  l'option ``-r'' aux scripts de demarrage presentes a l'etape 2. ie. Au
  lieu de /usr/sbin/dhcpcd vous devrez avoir /usr/sbin/dhcpcd -r.

  77..33..  ""UUssiinngg DDHHCCPP ffoorr eetthh00 ...... ffaaiilleedd mais  mon  systeme  continue  de
  fonctionner  normallement.''''   ````_D_u_r_a_n_t _l_e _d_e_m_a_r_r_a_g_e _j_'_o_b_t_i_e_n_s _l_e _m_e_s_-
  _s_a_g_e _s_u_i_v_a_n_t

  Vous etes pour la plupart des utilisateurs de la distribution  RedHat,
  et  vous  n'avez  pas  suivi  avec  assez  d'attention les intructions
  precedantes :-). Vous oubliez le ! (point d'exclamation) dans une  des
  instructions if. Retournez en arriere et lisez-le encore une fois.

  ______________________________________________________________________
  ______________________________________________________________________

       Merci  a toutes les personnes qui ont contribue grace a leurs idees et
       leurs suggestions. Specialement a:

  Heiko Schlittermann (heiko@os.inf.tu-dresden.de)

  Jonathan Smith (jps2@ra.msstate.edu)

  Dan Khabaza (dany@iil.intel.com)

  Hal Sadofsky (sadofsky@math.uoregon.edu)

  Henrik Stoener (henrik_stoener@olicom.dk)

  Paul Rossington (paulrossington@unn.unisys.com)

  DHCPd sous Linux
  Paul  Makeev, mac@RoSprint.net --- Adaptation francaise Eric
  Vinck, Eric.Vinck@mail.dotcom.fr
  v1.2, 24 June 1997

  11..  IInnttrroodduuccttiioonn

  DHCP  signifie  _D_y_n_a_m_i_c  _H_o_s_t  _C_o_n_f_i_g_u_r_a_t_i_o_n  _P_r_o_t_o_c_o_l  _(_P_r_o_t_o_c_o_l_e  _d_e
  _c_o_n_f_i_g_u_r_a_t_i_o_n  _d_y_n_a_m_i_q_u_e  _d_e  _m_a_c_h_i_n_e_s_).  Ce  protocole  permet  a une
  machine cliente  d'obtenir  des  parametres  de  configuration  reseau
  aupres  d'un  serveur  (qui,  oh surprise !, fait pour cela tourner un
  demon DHCPd).  DHCP  beneficie  d'une  compatibilite  ascendante  avec
  BOOTP.  Pour  plus  d'informations  voir la RFC 2131 (anciennement RFC
  1531 - Cf la section

  Ce document traite du serveur DHCP pour Linux :  le  demon  DHCPd.  Il
  existe  un  client  DHCP  pour  Linux  (le  demon  DHCPcd) que nous ne
  decrivons pas ici mais qui peut etre trouve aux adresses suivantes :

  Site primaire:   ftp.kobe-u.ac.jp /pub/PC-UNIX/Linux/network/dhcp 32kB
  dhcpcd-0.65.tar.gz              Miroir:                sunsite.unc.edu
  /pub/Linux/system/network/daemons 32kB dhcpcd-0.65.tar.gz

  Je vous invite par ailleurs a consulter le mini-howto sur DHCPcd.

  22..  LLee sseerrvveeuurr DDHHCCPPdd ppoouurr LLiinnuuxx

  Il existe plusieurs serveurs DHCP disponibles pour les OS U*X-like  (a
  la  Unix),  aussi  bien  payants  que  dans le domaine public. J'ai pu
  experimenter  avec  succes  celui   de   Paul   Vixie/ISC.   J'utilise
  actuellement  la version 5.0.14 aupres avoir utilise la Beta-5.0.9. Ce
  ne sont pas des versions specifiques  a  Linux  mais  elles  compilent
  facilement  et  fonctionnent  (pas  si  facilement  !). Vous pouvez en
  obtenir les dernieres version aux adresses suivantes :

   http://www.isc.org/dhcp/dhcp-beta.html   (pas  souvent  mise  a  jour
  toutefois)

  ou, la derniere version a l'heure actuelle :

   ftp://ftp.isc.org/isc/dhcp/DHCPD-BETA-5.16.tar.gz

  Il  n'y  a  plus  de  distributions de DHCP a  ftp.vix.com. Elles sont
  desormais a ftp.isc.org.

  NB!!! LISEZ ATTENTIVEMENT le  fichier  README  avant  de  compiler  et
  d'installer  DHCPd.  Il  contient  des  informations  specifiques pour
  Linux.

  33..  CCoonnffiigguurraattiioonn dduu nnooyyaauu

  L'option MULTICAST doit etre activee dans le  noyau;  evidemment,  les
  fonctions TCP/IP doivent etre elles aussi activees :-)

  44..  CCoonnffiigguurraattiioonn

  ifconfig -a doit donner les renseignements suivants :

       ______________________________________________________________________
       dhcps:~$ ifconfig -a
       eth0      Link encap:10Mbps Ethernet  HWaddr 00:C0:4F:D3:C4:62
                 inet addr:183.217.19.43  Bcast:183.217.19.255  Mask:255.255.255.0
                 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                 RX packets:2875542 errors:0 dropped:0 overruns:0
                 TX packets:218647 errors:0 dropped:0 overruns:0
                 Interrupt:11 Base address:0x210
       ______________________________________________________________________

  Si  la mention 'MULTICAST' n'apparait pas, vous devez re-configurer le
  noyau avec l'option MULTICAST (et rebooter evidemment). C'est la seule
  manipulation necessaire pour mettre en place le 'multicasting'.

  nestat -rn doit avoir cette tete la :

       ______________________________________________________________________
       dhcps:~$ netstat -rn
       Kernel routing table
       Destination     Gateway         Genmask         Flags Metric Ref Use    Iface
       255.255.255.255 0.0.0.0         255.255.255.255 UH    0      0   101    eth0
       ______________________________________________________________________

  c'est  a  dire  que  vous  avez un routage 'multicast' via votre carte
  Ethernet.

  55..  PPrroobblleemmeess aavveecc llee mmuullttiiccaassttiinngg

  Si  la  commande  route  add   -host   255.255.255.255   eth0   repond
  255.255.255.255:  Unknown  host,  essayez  d'ajouter  dans  le fichier
  /etc/hosts la machine bidon ayant pour adresse IP  255.255.255.255  et
  lancez  la  commande  route  add -host bidon eth0. Ca devrait marcher.
  Sinon, essayez avec des utilitaires reseaux plus recents et/ou  faites
  la mise a jour du noyau.

  66..  CCoonnffiigguurraattiioonn ddee DDHHCCPPdd

  Lisez  les docs fournies avec le package, qui sont trop complexes pour
  etre detaillees ici.

  77..  PPeeuutt--oonn llaanncceerr DDHHCCPP ssuurr uunnee mmaacchhiinnee aavveecc pplluussiieeuurrss ccaarrtteess EEtthheerrnneett
  ??

  D'apres la liste de distribution dhcp (Cf la section  'ressources  sur
  Internet'  a  la  fin  de ce document), c'est possible avec le dernier
  noyau (2.0.31 a ce jour) et la derniere version de DHCPd (5.0.15 a  ce
  jour). D'apres la liste de distribution dhcp-server, Linux 2.0.31 a du
  code SO_BINDTODEVICE qui  lui  permet  de  distinguer  les  interfaces
  physiques, si bien que la derniere version de DHCPd devrait fontionner
  avec 2 interfaces Ethernet a la fois sous Linux. Cette  possibiliteest
  toutefois en phase de developpement beta. Je ne l'ai pas verifiee mais
  je compte le faire pour la prochaine version de ce Howto.
  MERCI de ne pas me demander les sources du noyau 2.0.31. C'est un pre-
  patch non officiel a l'heure ou j'ecris ces lignes.

  88..  DDNNSS ddyynnaammiiqquuee

  Une integration des serveurs DNS et DHCP peut permettre de realiser un
  "DNS dynamique". Vous pouvez vous  referer  aux  RFCs  2136  et  2137.
  Certains serveurs DHCP et DNS peuvent avoir des mecanismes specifiques
  pour mettre a jour les informations du DNS.  BIND v.8 (aussi developpe
  par  ISC)  permet  des  mises a jour dynamiques. J'espere que DHCPD et
  BIND seront integres prochainement.

  J'ai ecrit un  programme  en  Python,  qui  automatise  l'ajout  d'une
  machine aux tables DHCP et DNS. Si vous voulez plus d'informations sur
  ce sujet, ecrivez-moi a mac@rosprint.net. Il n'est  pas  conforme  aux
  RFCs, mais il fait le sale boulot a votre place.

  99..  RReessssoouurrcceess ssuurr IInntteerrnneett

  +o  http://www.isc.org/dhcp.html
     C'est  la page web du DHCP de l'ISC. Vous pouvez y trouver beaucoup
     d'informations.  C'est d'ailleurs mon site prefere.

  +o  http://www.isc.org/bind.html.
     Informations sur BIND v.8.

  +o  http://www-leland.stanford.edu/%7Ellurch/win95netbugs/faq-c.html
     Une aide tres complete pour DHCPd sous Windaube-95

  +o  http://www.bucknell.edu/~droms/dhcp/index.html
     Un tres bon FAQ sur DHCP, beaucoup de liens (par Ralph Droms).

  +o  http://web.syr.edu/~jmwobus/comfaqs/dhcp.faq.html
     Un bon FAQ sur DHCP en general.  Beaucoup  d'infos,  une  liste  de
     ressources (par John Wobus).

  Les listes de distribution :

  +o  dhcp-server@fugue.com - liste sur le DHCPd de ISC/Vixie.

  +o  dhcp-v4@bucknell.edu - liste sur le DHCPd de Bucknell.

  Linux DPT Hardware RAID HAWTO
  Version originale : Ram Samudrala (me@ram.org) Version fran-
  caise : Nicolas Jadot (njadot@etu.info.unicaen.fr)
  v1.1,  15 Decmebre 1997

  Comment configurer un materiel RAID sous Linux

  11..  IInnttrroodduuccttiioonn

  Ce document decrit comment configurer un materiel  RAID  SCSI,  en  se
  focalisant  principalement sur les adaptateurs internes d'origine DPT,
  bien que les principes appliques ici soient assez generaux.

  Utilisez les informations ci-dessous a vos risques et perils. L'auteur
  (NDT  :  et  le traducteur) denient toute responsabilite concernant ce
  que le lecteur pourra faire apres avoir lu ce document. La version  la
  plus  recente  de  ce  HOWTO  sera  toujours  disponible  a  l'adresse
  http://www.ram.org/computing/linux/dpt_raid.html.

  22..  CCoonnttrroolleeuurrss ssuuppppoorrtteess

  Le seul controleur  RAID  actuellement  bien  supporte  (  c.a.d.   un
  controleur  pour  lequel  il  existe  un  pilote sous Linux) est celui
  fabrique par la societe DPT <http://www.dpt.com>. Cependant, il existe
  d'autres  controleurs  internes (NDT : _h_o_s_t_-_b_a_s_e_d, controleur installe
  sur la carte-mere, a l'interieur de la machine)  et  externes  (NDT  :
  _s_c_s_i_-_t_o_-_s_c_s_i, controleurs connectes sur une chaine SCSI existante ; on
  pourrait egalement dire additionnels) pouvant fonctionner sous  Linux.
  Ceci inclut les controleurs produits par Syred <http://www.syred.com>,
  ICP-Vortex <http://www.icp-vortex.com>, et  BusLogic  <http://www.bus-
  logic.com>.  De  plus, il existe de nombreux controleurs additionnels.
  Consultez     la     page      RAID      solutions      for      Linux
  <http://linas.org/linux/raid.html> pour plus d'informations.

  Si, dans l'avenir, de nouveaux modeles sont supportes, je ferai de mon
  mieux afin d'inclure ces informations dans ce document.

  33..  QQuueell mmaatteerriieell vvaauutt--iill mmiieeuuxx uuttiilliisseerr ??

  Connaissant ces donnees , vous devez, si vous  cherchez  une  solution
  RAID,  reflechir  a  deux fois a ce que vous voulez. En fonction de ce
  que vous voulez faire, et du niveau de redondance(NDT : ceci  est  une
  traduction  un  peu  libre  de  RAID  level),  certaines cartes seront
  meilleures que d'autres. Les adaptateurs externes peuvent par  exemple
  ne  pas etre aussi adaptes que les controleurs internes (consultez DPT
  comparison    between    host-based    and    SCSI-to-SCSI    adapters
  <http://www.dpt.com/hstvscsi.html>  pour  en  connaitre  les raisons).
  Michael Neuffer (neuffer@kralle.zdv.uni-mainz.de),  auteur  du  pilote
  EATA-DMA, discute de tout cela sur sa page Linux High Performance SCSI
  and RAID page <http://www.uni-mainz.de/~neuffer/scsi/>.

  Pour les besoins de ce document, je considererai que vous ne  disposez
  que  d'un  systeme  Linux  en ordre de marche. Cependant, notez que je
  n'ai fait l'essai que du controleur DPT Smartcache VI  PM2144UW,  avec
  la  tour  fournie  par  DPT  (SmartRAID  tower),  et  que  je n'ai pas
  l'experience d'une autre configuration. Les choses peuvent  donc  etre
  differentes pour votre configuration.

  44..  IInnssttaallllaattiioonn

  44..11..  IInnssttaalllleerr eett ccoonnffiigguurreerr llee mmaatteerriieell

  Reportez-vous  aux manuel d'instructions pour installer votre carte et
  vos disques. Pour le materiel DPT, comme il  n'existe  pas  encore  de
  gestionnaire  de  stockage   pour  Linux,  vous  devez creer un disque
  formatte MS-DOS avec  le  systeme  dessus  (generalement  grace  a  la
  commande "format \s" a l'invite MS-DOS ). Vous utiliserez egalement le
  gestionnaire de stockage DPT pour MS-DOS, dont vous devriez faire  une
  copie de sauvegarde par mesure de precaution.

  Une fois le materiel en place, demarrez en utilisant le disque systeme
  DOS. Remplacez le disque DOS  par  le  gestionnaire  de  stockage.  Et
  lancez celui-ci avec la commande :

       a:\ dptmgr

  Attendez  une minute et vous obtiendrez un sympathique menu d'options.
  Configurez l'ensemble des disques comme materiel RAID  (unite  logique
  unique   ).   Choisissez   "other"(NDT   :   autre(s))  comme  systeme
  d'exploitation.

  Le gestionnaire de stockage MS-DOS est beaucoup plus facile a utiliser
  a  la souris, et donc vous devriez avoir un gestionnaire de souris sur
  le premier disque systeme que vous creerez.

  Techniquement, il devrait etre possible de lancer le  gestionnaire  de
  stockage  de  SCO sous Linux, mais cela pourrait vous apporter plus de
  soucis que de facilites. Il est probablement bien mieux de  lancer  le
  gestionnaire MS-DOS sous Linux.

  44..22..  CCoonnffiigguurreerr llee nnooyyaauu

  Vous  devrez configurer le noyau en activant le support SCSI ainsi que
  le  gestionnaire  de  peripherique  approprie.  Voyez   Kernel   HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>(NDT    :   Kernel
  HOWTO     <http://www.freenix.fr/linux/HOWTO/Kernel-HOWTO.html>     en
  francais)  pour  toute information relative a la compilation du noyau.
  Une fois que vous aurez choisi "yes" pour  activer  le  support  SCSI,
  selectionnez, dans la section concernant les gestionnaires bas-niveau,
  celui de votre choix (EATA-DMA pour la majorite des cartes compatibles
  EATA-DMA  (DPT), EATA-PIO  pour les tres vieilles PM2001 et PM2012A de
  DPT). La plupart des pilotes, ainsi que le  pilote  EATA-DMA,  devrait
  etre disponible dans les versions recentes du noyau.

  Une  fois  que  vous avez compile le noyau, relancez la machine, et si
  vous avez tout configure correctement, vous  devriez  voir  le  pilote
  considerer  l'unite RAID comme un unique disque SCSI. Si vous utilisez
  RAID-5, vous constaterez que la taille de l'unite correspond aux  deux
  tiers de l'espace total de stockage. Les messages que vous verrez lors
  du demarrage devraient ressembler a :

  EATA (Extended Attachment) driver version: 2.59b
  developed in co-operation with DPT
  (c) 1993-96 Michael Neuffer, mike@i-Connect.Net
  Registered HBAs:
  HBA no. Boardtype    Revis  EATA Bus  BaseIO IRQ DMA Ch ID Pr QS  S/G IS
  scsi0 : PM2144UW     v07L.Y 2.0c PCI  0xef90  11 BMST 1  7  N  64 252 Y
  scsi0 : EATA (Extended Attachment) HBA driver
  scsi : 1 host.
    Vendor: DPT       Model: RAID-5            Rev: 07LY
    Type:   Direct-Access                      ANSI SCSI revision: 02
  Detected scsi disk sda at scsi0, channel 0, id 8, lun 0
  scsi0: queue depth for target 8 on channel 0 set to 64
  scsi : detected 1 SCSI disk total.
  SCSI device sda: hdwr sector= 512 bytes. Sectors= 35591040 [17378 MB] [17.4 GB]

  (La sortie ci-dessus correspond a une configuration comportant un seul
  controleur  DPT,  configure  en  RAID-5,  avec  trois  disques  de 9Go
  chacun.)

  55..  UUttiilliissaattiioonn

  55..11..  ffddiisskk,, mmkkee22ffss,, mmoouunntt,, eettcc..

  Vous pouvez desormais  utiliser  votre  unite  RAID  comme  un  disque
  normal.  Le premiere chose que vous aurez a faire sera de partitionner
  le disque (en utilisant fdisk). Vous devrez ensuite creer  un  systeme
  de fichiers ext2. Ceci se fait par la commande :

       % mkfs -t ext2 /dev/sdxN

  ou  /dev/sdxN  est le nom de votre partition SCSI. Une fois ceci fait,
  vous pourrez monter les partitions  et  les  utiliser  comme  vous  le
  feriez  pour  tout  autre  disque  (incluant l'ajout d'entrees dans le
  fichier /etc/fstab).

  55..22..  EEcchhaannggee aa cchhaauudd

  Nous  avons  d'abord  tente  un  echange  a  chaud(L'echange  a  chaud
  (hotswapping)  consiste  en  le remplacement d'une unite de l'ensemble
  RAID alors que l'ordinateur est en fonctionnement) en retirant puis en
  remettant  un  disque  dans  la  boite/tour  fournie par DPT (que vous
  pouvez acheter moyennant supplement). Avant que nous  ayons  pu  mener
  l'operation  a  son terme, un des disques est tombe en panne ( pendant
  que j'ecris ces lignes, la sonnerie commence a  me  rendre  dingue  ).
  Malgre  cette  panne  de l'un des disques, toutes les donnees stockees
  sur l'unite RAID sont accessibles.

  Au lieu de remplacer le disque, nous avons machinalement remis la meme
  unite.  L'unite s'est reconstruite et tout semble etre parfait. Durant
  tout le temps de la panne, ainsi que durant la reconstruction,  toutes
  les  donnees sont restees accessibles. Malgre tout, si un autre disque
  etait tombe en panne, nous aurions eu des serieux problemes.

  55..33..  PPeerrffoorrmmaanncceess

  Ici sont retranscrites les sorties du programme Bonnie, sur un  2144UW
  avec  une condiguration de 9x3=17Go -- faux ! --> RAID-5. L'unite RAID
  est connectee a une  machine  biprocesseurs  Pentium  Pro  avec  Linux
  2.0.32.  Pour comparer, les resultats de Bonnie sur les disques IDE de
  cette machine sont aussi indiques.

                  -------Sequential Output-------- ---Sequential Input--  --Random--
                  -Per Char- --Block--- -Rewrite-- -Per Char- --Block---  --Seeks---
               MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU   /sec  %CPU
       RAID   100  9210 96.8  1613  5.9   717  5.8  3797 36.1 90931 96.8 4648.2 159.2
       IDE    100  3277 32.0  6325 23.5  2627 18.3  4818 44.8 59697 88.0  575.9  16.3

  Il est clair que l'unite RAID est performante  pour  les  lectures  et
  ecritures de blocs (malgre la degradation des performances en ecriture
  due a l'utilisation du RAID-5), mais n'est pas tres bonne pour ce  qui
  est des reecritures sequentielles.

  66..  CCaarraacctteerriissttiiqquueess dduu ppiilloottee DDPPTT RRAAIIDD

  Cette  section  decrit  quelques-unes  des  commandes disponibles sous
  Linux pour verifier la configuration RAID. De nouveau, meme  s'il  est
  fait  reference  au  pilote  eata_dma,  ceci peut etre utilise pour la
  verification d'autres pilotes.

  Pour voir la configuration de votre pilote, tapez :

       % cat /proc/scsi/eata_dma/N

  ou N est l'identificateur du controleur. Vous devriez obtenir  quelque
  chose comme :

       EATA (Extended Attachment) driver version: 2.59b
       queued commands:         353969
       processed interrupts:    353969

       scsi0 : HBA PM2144UW
       Firmware revision: v07L.Y
       Hardware Configuration:
       IRQ: 11, level triggered
       DMA: BUSMASTER
       CPU: MC68020 20MHz
       Base IO : 0xef90
       Host Bus: PCI
       SCSI Bus: WIDE Speed: 10MB/sec.
       SCSI channel expansion Module: not present
       SmartRAID hardware: present.
           Type: integrated
           Max array groups:              7
           Max drives per RAID 0 array:   7
           Max drives per RAID 3/5 array: 7
       Cache Module: present.

      Type: 0
      Bank0: 16MB without ECC
      Bank1: 0MB without ECC
      Bank2: 0MB without ECC
      Bank3: 0MB without ECC
  Timer Mod.: present
  NVRAM     : present
  SmartROM  : enabled
  Alarm     : on
  Host<->Disk command statistics:
           Reads:      Writes:
      1k:           0            0
      2k:           0            0
      4k:           0            0
      8k:           0            0
     16k:           0            0
     32k:           0            0
     64k:           0            0
    128k:           0            0
    256k:           0            0
    512k:           0            0
   1024k:           0            0
  >1024k:           0            0
  Sum   :           0            0

  Pour obtenir les statistiques des commandes avancees, tapez :

       % echo "eata_dma latency" > /proc/scsi/eata_dma/N

  Ensuite, vous pouvez faire :

       % cat /proc/scsi/eata_dma/N

  pour obtenir des statistiques plus detaillees.

  Pour desactiver les statistiques avancees, tapez :

       % echo "eata_dma nolatency" > /proc/scsi/eata_dma/N

  77..  EEnn ccaass ddee pprroobblleemmee......

  77..11..  AAuuccuunnee uunniittee SSCCSSII nn''eesstt ddeetteecctteeee lloorrss dduu ddeemmaarrrraaggee

  Ceci  peut  avoir  de multiples causes, mais c'est probablement que le
  pilote addequat n'a pas ete  configure  dans  le  noyau.  Verifiez  et
  assurez-vous  que  le pilote (EATA-DMA pour la plupart des cartes DPT)
  est configure.

  77..22..  LLaa ccoonnffiigguurraattiioonn RRAAIIDD eesstt vviissiibbllee ccoommmmee NN ddiissqquueess ddiiffffeerreennttss

  Le  RAID  n'a  pas  ete  configure  correctement.  Si vous utilisez un
  gestionnaire de stockage DPT, vous devez configurer les  disques  RAID
  comme     une     seule     unite     logique.     Michael     Neuffer
  (neuffer@kralle.zdv.uni-mainz.de)  ecrit  "Quand  vous  configurez  le
  controleur  avec  le  SM  demarrez-le  avec  le  parametre  /FWO et/ou
  selectionnez Solaris comme systeme  d'exploitation.  Cela  configurera
  l'unite pour etre controlee en interne par le controleur."

  77..33..  SSii rriieenn nnee mmaarrcchhee......

  Relisez  le  SCSI-HOWTO.  Verifiez  le  cablage  et  les terminaisons.
  Essayez une machine differente si vous  en  avez  la  possibilite.  La
  cause la plus commune de problemes avec les unites et les pilotes SCSI
  est un materiel defectueux ou mal configure. Finalement,  vous  pouvez
  ecrire  dans  les  forums  de  discussion  ou  m'envoyer  un  courrier
  electronique (NDT : a l'auteur, pas au traducteur...), et je ferai  de
  mon mieux pour vous aider.

  88..  RReeffeerreenncceess

  Les   documents   suivants   vous  seront  tres  utiles  lorsque  vous
  configurerez une unite RAID :

  +o  DPT   RAID   Primer   and   other    RAID/SCSI-related    documents
     <http://www.dpt.com/techno.html>

  +o  EATA-DMA                  homepage                 <http://www.uni-
     mainz.de/~neuffer/scsi/dpt/index.html>

  +o  Linux Disk HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Disk-HOWTO.html>

  +o  Linux    Kernel   HOWTO   <http://sunsite.unc.edu/mdw/HOWTO/Kernel-
     HOWTO.html>

  +o  Linux SCSI HOWTO <http://sunsite.unc.edu/mdw/HOWTO/SCSI-HOWTO.html>

  +o  RAID Solutions for Linux <http://linas.org/linux/raid.html>

  99..  RReemmeerrcciieemmeennttss

  Les personnes suivantes m'ont beaucoup aide pour la realisation de cet
  HOWTO :

  +o  Boris Fain (fain@zen.stanford.edu)

  +o  Jos Vos (jos@xos.nl)

  +o  Michael Neuffer (neuffer@kralle.zdv.uni-mainz.de)

  +o  Ralph Wallace (rwallace@rwallace.interaccess.com)

  +o  Russell Brown (russell@lutton.lls.com)

  +o  Syunsuke Ogata (Syunsuke_Ogata@appear.ne.jp)

  Linux Dial-On-Demand mini-HOWTO
  Rodney van den Oever, Rodney.van.den.Oever@tip.nl
  Version 1.0, 28 Juillet 1996 mise a jour le 29 fevrier 1997

  (Adaptation  francaise par Olivier Fourmaux, Olivier.Fourmaux@lip6.fr,
  28 Novembre 1997). Mini-HOWTO decrivant comment utiliser  une  machine
  de  son reseau local comme routeur PPP avec connexion a la demande. Le
  ddiiaall--oonn--ddeemmaanndd correspond a l'utilisation au  besoin  du  modem,  soit
  litteralement  :  _c_o_m_p_o_s_i_t_i_o_n _a _l_a _d_e_m_a_n_d_e que nous traduisons en ccoonn--
  nneexxiioonn aa llaa ddeemmaannddee.

  11..  PPrreeaammbbuullee

  11..11..  BBllaabbllaa lleeggaall

  (C)opyright 1997 Olivier Fourmaux pour  la  version  francaise.  Toute
  ressemblance  avec  les  docs  Linux de mon co-burote et neanmoins ami
  Christophe Deleuze,  traducteur  forcene  depuis  sa  tendre  enfance,
  serait purement fortuite.

  11..22..  BBllaabbllaa ddee ll''aauutteeuurr ((_D_i_s_c_l_a_i_m_e_r))

  Ce document decrit une configuration qui fonctionne pour moi, utilisez
  la a vos propres risques. S'il manque quoi que ce soit d'important  ou
  si  quelque  chose est completement faux, s'il vous plait, communiquez
  le moi !

  Une chose que l'on peut rajouter, c'est la maniere  de  configurer  un
  serveur de noms local.

  11..33..  BBllaabbllaa dduu ttrraadduucctteeuurr

  Les  commentaires sur la traduction sont a envoyer a Olivier Fourmaux,
  Olivier.Fourmaux@lip6.fr. De meme si vous trouvez des erreurs de fond,
  demandez moi d'abord, j'ai peut-etre traduit un peu vite :)

  22..  IInnttrroodduuccttiioonn

  Ce  document  decrit  comment  gerer  une  connexion _d_i_a_l_-_o_n_-_d_e_m_a_n_d et
  comment utiliser un hote Linux connecte a un reseau local en tant  que
  _r_o_u_t_e_u_r _P_P_P gerant la connexion a la demande.

  Le  _k_e_r_n_e_l_d_-_m_i_n_i_-_H_O_W_T_O  decrit  deja comment kerneld (daemon du noyaux
  linux) execute le  script  request-route  pour  l'ajout  dynamique  de
  route.  Pour  plus  d'information,  le  _k_e_r_n_e_l_d_-_m_i_n_i_-_H_O_W_T_O  existe  en
  francais. Ici nous ne decrivons qu'une configuration detaille  adaptee
  a l'ajout de route avec une connexion modem.

  Si  vous  utilisez  un petit reseau local chez vous, la connexion a la
  demande fournit une solution interessante de gestion transparente d'un
  acces Internet pour plusieurs machines.

   ______________________________
   __|__                  ___|___            Liens PPP vers le
  |     |  reseau local  |       |   ______ fournisseur d'acces
  | PC  |  192.168.1.0   |Routeur|--| modem|------------------>
  |     |                | Linux |  |______|      x.x.x.x
  |_____|                |_______|            (adresse IP
                           named                  dynamique)
                           pppd

  Cette configuration necessite :

  +o  Noyau 2.0.0 ou plus recent

  +o  ppp-2.2.0f.tar.gz ou plus recent

  +o  modules-2.0.0.tar.gz ou plus recent

  +o  ipfwadm-2.3.tar.gz (http://www.xos.nl/linux/ipfwadm)

  Les etapes suivantes sont a realiser :

  1. Configuration du noyau

  2. Installation des modules

  3. Installation de PPP

  4. Configuration du port serie et du modem

  5. Configuration de PPP

  6. Installation de la connexion a la demande

  7. Configuration du reseau

  8. Configuration de l' IP-Masquerade

  9. Configuration des stations

  33..  CCoonnffiigguurraattiioonn dduu NNooyyaauu

  Avant  tout,  il  faut  compiler  un  noyau  avec  _k_e_r_n_e_l_d, _P_P_P et _I_P_-
  _m_a_s_q_u_e_r_a_d_e. Ci-dessous sont indiquees  les  options  necessaires  pour
  cette  configuration  (en Majuscule), les autres options reseau telles
  que _f_i_r_e_w_a_l_l _l_o_g_g_i_n_g ou _t_r_a_n_s_p_a_r_e_n_t  _p_r_o_x_y_i_n_g  peuvent  etre  choisies
  mais ne sont pas obligatoires.

       cd /usr/src/linux
       make config

  ou

  make menuconfig

  ______________________________________________________________________
  *
  * Code maturity level options
  *
  Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL) [Y/n/?]
  *
  * Loadable module support
  *
  Enable loadable module support (CONFIG_MODULES) [Y/n/?]
  Set version information on all symbols for modules (CONFIG_MODVERSIONS) [N/y/?]
  Kernel daemon support (e.g. autoload of modules) (CONFIG_KERNELD) [Y/n/?]
  *
  Networking support (CONFIG_NET) [Y/n/?]
  *
  * Networking options
  *
  Network firewalls (CONFIG_FIREWALL) [Y/n/?]
  TCP/IP networking (CONFIG_INET) [Y/n/?]
  IP: forwarding/gatewaying (CONFIG_IP_FORWARD) [Y/n/?]
  IP: firewalling (CONFIG_IP_FIREWALL) [Y/n/?]
  IP: masquerading (EXPERIMENTAL) (CONFIG_IP_MASQUERADE) [Y/n/?]
  *
  * Protocol-specific masquerading support will be built as modules.
  *
  IP: always defragment (CONFIG_IP_ALWAYS_DEFRAG) [Y/n/?]
  IP: optimize as router not host (CONFIG_IP_ROUTER) [Y/n/?]
  *
  * Network device support
  *
  Network device support (CONFIG_NETDEVICES) [Y/n/?]
  *
  PPP (point-to-point) support (CONFIG_PPP) [M/n/y/?]
  *
  * CCP compressors for PPP are only built as modules.
  *
  Ethernet (10 or 100Mbit) (CONFIG_NET_ETHERNET) [Y/n/?]
  NE2000/NE1000 support (CONFIG_NE2000) [Y/m/n/?]
  ______________________________________________________________________

  Cette derniere option depend bien sur de la carte reseau utilisee.

  Compilez le noyau avec :

       make zlilo
       make modules
       make modules_install

  Si        vous        n'utilisez        pas        LILO,        copiez
  /usr/src/linux/arch/i386/boot/zImage   a   la   bonne    place    pour
  l'initialisation.  Les modules sont installes dans /lib/modules/x.x.x,
  avec x.x.x correspondant a la version du noyau utilise.
  44..  IInnssttaallllaattiioonn ddeess MMoodduulleess

  Les programmes suivants sont necessaires :

     //ssbbiinn//iinnssmmooddee
        Charge les modules necessaires.

     //ssbbiinn//rrmmmmoodd
        Supprime les modules inutiles.

     //ssbbiinn//ddeeppmmoodd
        Cree les dependances.

     //ssbbiinn//kkeerrnneelldd
        Extension de Kerneld pour charger les modules automatiquement.

  Si vous ne les avez pas encore, installez les avec :

       cd /usr/src
       tar zxf modules-2.0.0.tar.gz
       make install

  Pour charger _K_e_r_n_e_l_d au demarrage, vous devez editer /etc/rc.d/rc.S ou
  creer  un  script  rc.modules  qui  est  appele  par  rc.S. Ajoutez ou
  modifiez les lignes suivantes :

  ______________________________________________________________________
  /etc/rc.d/rc.modules:

  if [ ! -f /lib/modules/`uname -r`/modules.dep ] ; then
          echo "Updating module dependencies for Linux `uname -r`:"
          /sbin/depmod -a
  fi

  [ -x /sbin/kerneld ] && /sbin/kerneld
  ______________________________________________________________________

  La premiere partie verifie les dependances des modules et les cree  si
  elles n'existent pas encore.

  55..  IInnssttaallllaattiioonn ddee PPPPPP

  Les programmes suivants sont necessaires pour l'installation d'un lien
  PPP :

     //uussrr//ssbbiinn//ppppppdd
        Daemon PPP.

     //uussrr//ssbbiinn//ppppppssttaattss
        Statistiques PPP.

     //uussrr//ssbbiinn//cchhaatt
        Execution de scripts.

  A installer avec :

       cd /usr/src
       tar zxf ppp-2.2.0f.tar.gz
       cd ppp-2.2.0f
       make kernel

  Les noyaux recents incluent le code de PPP, make kernel ne  remplacera
  donc  rien  du  tout. Verifier les fichiers README et Makefile pour le
  support du kit _S_h_a_d_o_w.  Executez alors :

       make
       make install

  66..  CCoonnffiigguurraattiioonn dduu PPoorrtt SSeerriiee eett dduu MMooddeemm

  Cette configuration necessite un modem. La configuration du port serie
  est realisee dans le fichier rc.serial :

  ______________________________________________________________________
  /etc/rc.d/rc.serial:

  ${SETSERIAL} /dev/cua0 uart 16450 port 0x3F8 irq 4
  ${SETSERIAL} /dev/cua1 uart 16550A port 0x2F8 irq 3 spd_vhi
  ______________________________________________________________________

  Dans  cette  configuration,  COM1  (cua0) est utilise par la souris et
  COM2 (cua1) par un modem interne a 28,8  kb/s.  Le  parametre  spd_vhi
  remplace  la  valeur  38400  bps  par  115200  bps  dans  la table des
  vitesses, de meme spd_hi est utilise pour la valeur 57600 bps.

  Il faut utiliser spd_vhi pour un modem a 28,8 kb/s et spd_hi pour un a
  14,4  kb/s.  Mais  on  peut demarrer par prudence avec la valeur 38400
  bps.

  Verifiez votre configuration modem a l'aide  d'un  programme  de  type
  emulation  de terminal, tel que _m_i_n_i_c_o_m. Le modem doit afficher (_e_c_h_o)
  les caracteres frappes. Utilisez Ctrl-A P pour changer les  parametres
  de communication. Verifiez si cela fonctionne encore a 57600 ou 115200
  b/s. Tapez ATZ, le modem devrait repondre OK.  Utilisez Ctrl-A X  pour
  quitter minicom.

  Minicom peut aussi etre utilise pour se connecter a son fournisseur de
  services manuellement. Notez prealablement ce  que  vous  devez  taper
  pour  initier  la  connexion  et  quelles sont les reponses du serveur
  distant. Si votre fournisseur de services n'utilise pas  PAP  ou  CHAP
  (protocoles d'echange de mots de passe), il faudra probablement entrer
  un nom d'utilisateur et un mot  de  passe,  et  peut  etre  aussi  une
  commande pour initialiser la liaison en mode PPP.

  77..  CCoonnffiigguurraattiioonn ddee PPPPPP

  Le daemon pppd recherche dans le repertoire /etc/ppp les scripts et le
  fichier options :

  ______________________________________________________________________
  /etc/ppp/options:

  /dev/modem 38400 crtscts modem noipdefault defaultroute idle-disconnect
  120
  ______________________________________________________________________

  Ce qui signifie :

     //ddeevv//mmooddeemm
        Dans ma configuration, un lien vers /dev/cua1.

     3388440000
        A    remplacer    par    115200    (parametre    spd_vhi    dans
        /etc/rc.d/rc.serial)

     ccrrttssccttss
        Controle  de flux materiel, RTS/CTS, _n_e _p_a_s _u_t_i_l_i_s_e_r _l_e _c_o_n_t_r_o_l_e
        _d_e _f_l_u_x _X_o_n_-_X_o_f_f_!

     mmooddeemm
        Utilisation avec un modem.

     nnooiippddeeffaauulltt
        L'adresse IP est attribuee automatiquement.

     ddeeffaauullttrroouuttee
        Affecte la route par defaut a l'interface PPP.

     iiddllee--ddiissccoonnnneecctt
        Avec PPP-2.2.0f deconnecte  automatiquement  un  lien  inutilise
        apres 120 secondes.

  Nous creons maintenant un script, nomme defaut, pour la connexion vers
  notre fournisseur de service habituel. Pour d'autres connexions, creer
  d'autres scripts vers ces autres sites et les nommer avec leur adresse
  IP distante, par exemple.

  ______________________________________________________________________
  /etc/ppp/defaut:

  "" ats11=55dtXXXXXXXX CONNECT "" rname: UUUUU sword: PPPPP > ppp
  ______________________________________________________________________

  Ce qui signifie :

     aattss1111==5555
        Racourcit la duree des tonalites pour accelerer la connexion.

     XXXXXXXXXXXXXXXX
        Correspond au numero de telephone du fournisseur de service.

     CCOONNNNEECCTT
        chat attend que le modem renvoi CONNECT.

     rrnnaammee::
        chat attend rname, et entre UUUUU.

     sswwoorrdd::
        chat attend sword, et entre PPPPP.

  Remplacez UUUUU et PPPPP par votre nom d'utilisateur et votre  mot  de
  passe.  Utilisez  rname  et sword (a la place de username et password)
  car  quelquefois  les  premieres  lettres  sautent  ou  sont  soit  en
  majuscules  soit  en  minuscules.  Certains  fournisseurs  de services
  demandent l'entree du mot ppp apres le nom d'utilisateur et le mot  de
  passe, d'ou l'attente de l'invite du routeur (>).

  Si  vous  avez  des  erreurs du type serial line looped back ou serial
  line not 8-bit clean, la liaison n'est pas encore sous PPP.

  La commande de lancement est assez longue pour meriter un petit script
  :

  ______________________________________________________________________
  /etc/ppp/ppp:

  #!/bin/sh
  /usr/sbin/pppd connect '/usr/sbin/chat -v -f /etc/ppp/default'
  ______________________________________________________________________

  Vous  devriez  etre  capable  de vous connecter a votre fournisseur de
  service.  Vous  pouvez  rajouter  le  parametre   debug   au   fichier
  /etc/ppp/options  et augmenter le _l_o_g_l_e_v_e_l de syslogd pour voir ce qui
  ce passe :

  ______________________________________________________________________
  /etc/syslog.conf:

  *.debug                                 /var/log/messages
  ______________________________________________________________________

  Si vous editez syslog.conf, soyez sur d'indiquer au daemon syslogd  le
  changement. Suivant la localisation de son fichier PID, faites :

  kill -1 `cat /var/run/syslog.pid`

  ou

       kill -1 `cat /etc/syslog.pid`

  Apres   que   la   connexion  soit  etablie,  verifiez  avec  ifconfig
  l'existence de l'interface ppp0. Verifiez la  route  par  defaut  avec
  netstat  -r, elle devrait indiquer le fournisseur de service.  Essayer
  aussi de _p_i_n_g_u_e_r (ping) un serveur distant, tel que le serveur de noms
  du fourniseur de service. Si ca marche, vous pouvez ajouter ce serveur
  de noms dans le fichier /etc/resolv.conf :

  ______________________________________________________________________
  /etc/resolv.conf:

  search your.isp.domain
  nameserver x.x.x.x
  ______________________________________________________________________

  88..  IInnssttaallllaattiioonn ddee llaa CCoonnnneexxiioonn aa llaa DDeemmaannddee

  Le daemon kerneld peut etre utilise pour  charger  a  la  demande  des
  modules  tels que PPP. Une autre possibilite signalee dans le kkeerrnneelldd--
  HHOOWWTTOO est le lancement d'un script si une route est  absente.  Kerneld
  surveille  le  fichier /sbin/request-route.  Le script qui suit est la
  copie de celui fourni dans modules-2.0.0.tar.gz :

  ______________________________________________________________________
  /sbin/request-route:

  #!/bin/sh
  LOCK=/var/run/request-route.pid
  export PATH=/usr/sbin:$PATH     # for ppp-2.2*
  #
  # Ce script sera appele par kerneld avec la route demandee $1
  #
  chatfile=/etc/ppp/$1
  #
  # Si aucun script chat utilise une valeur par defaut (lien symbolique
  # vers le script prefere) :
  #
  [ ! -f $chatfile ] && chatfile=/etc/ppp/default
  #
  # Verifie si le programme tourne toujours :
  #
  if [ ! -f $LOCK ] ; then
          pppd connect "chat -f $chatfile" &
          #
          # Temporisation supprimee par ip-up, a regler. Verifier les
          # delais de kerneld aussi.
          #
          sleep 60 &
          sleepid=$!
          echo $sleepid > $LOCK
          wait $sleepid
          rm -f $LOCK
          exit 0
  fi
  exit 1
  ______________________________________________________________________

  Kerneld execute ce script en utilisant la route absente comme argument
  :

       /sbin/request-route x.x.x.x

  Le  script  utilise  un  fichier verrou pour eviter plusieurs request-
  route simultanes.

  Au debut, j'utilisais un script qui etait declenche par une requete au
  serveur de noms, mais depuis je prefere fonctionner avec un serveur de
  noms local, le resultat sera dans la memoire cache et un second  acces
  ne  declenchera  pas  la connexion. C'est la raison pour laquelle j'ai
  change le script pour utiliser un script chat si aucun n'existe.

  Cela permet  aussi  de  creer  de  multiples  scripts  chat  pour  les
  differentes  liaisons  et d'utiliser un script chat par defaut pour se
  connecter a son fournisseur de service.

  Apres que la liaison ait ete initiee, le daemon pppd execute le script
  /ppp/ip-up  qui  retire  le  fichier verrou. Ajoutez les commandes que
  vous voulez executer a chaque fois que la  liaison  est  initiee,  par
  exemple surveiller la queue de sseennddmmaaiill :

  ______________________________________________________________________
  #!/bin/ash
  LOCK=/var/run/request-route.pid
  [ -f $LOCK ] && kill `cat $LOCK`
  #
  # Execute ces commandes apres la connexion (exemple) :
  #
  /usr/sbin/sendmail -q
  ______________________________________________________________________

  L'option   idle-disconnect   deconnecte  automatiquement  une  liaison
  inutilisee. Pour se deconnecter immediatement, utilisez ppp-off :

  ______________________________________________________________________
  /usr/sbin/ppp-off:.

  #!/bin/sh
  LOCK=/var/run/request-route.pid
  DEVICE=ppp0

  rm -f $LOCK
  #
  # Si le fichier ppp0.pid est present alors le  programme tourne. Stoppez
  # le.
  #
  if [ -r /var/run/$DEVICE.pid ]; then
          kill -INT `cat /var/run/$DEVICE.pid`
  #
  # Si ca marche, verifier que le fichier pid est retire.
  #
          if [ ! "$?" = "0" ]; then
                  echo "removing stale $DEVICE pid file."
                  rm -f /var/run/$DEVICE.pid
                  exit 1
          fi
  #
  # Reussite. Terminer avec le bon statut.
  #
          echo "$DEVICE link terminated"
          exit 0
  fi
  #
  # La liaison n'est pas active
  #
  echo "$DEVICE link is not active"

  exit 1
  ______________________________________________________________________

  99..  CCoonnffiigguurraattiioonn dduu RReesseeaauu

  Si votre machine Linux a une autre interface reseau, tel qu'une  carte
  ethernet  ou  si  vous utilisez PLIP pour vous connecter vers un autre
  hote, vous pouvez  configurer  la  machine  multi-interface  comme  un
  routeur.  C'est  ainsi que j'ai configure mon reseau. J'entre toujours
  toutes mes adresses IP dans /etc/hosts pour n'avoir  qu'un  fichier  a
  modifier.

  ______________________________________________________________________
  /etc/hosts:

  127.0.0.1       localhost
  10.0.0.1        your.domain.com host
  10.0.0.2        some.other.machine
  ______________________________________________________________________

  ______________________________________________________________________
  /etc/networks:

  loopback        127.0.0.0
  localnet        10.0.0.0
  ______________________________________________________________________

  ______________________________________________________________________
  /etc/rc.d/inet1:

  # Loopback interface:
  ifconfig lo localhost
  route add -net loopback

  # Local interface:
  ifconfig eth0 host
  route add -net localnet eth0
  ______________________________________________________________________

  La  derniere  ligne ajoute une route au reseau local. Nous n'avons pas
  besoin d'entrer la passerelle par defaut ici, puisque nous n'en  avons
  pas, tant que la liaison PPP n'existe pas.

  1100..  CCoonnffiigguurraattiioonn ddee ll''IIPP--MMaassqquueerraaddee

  Si  vous devez connecter differentes machines, mais possedez seulement
  une  adresse  IP,  vous  pouvez  utiliser  les  fonctionnalites  d'IP-
  masquerade  de  Linux.  Cela vous permet de configurer des adresses IP
  interne a un reseau qui seront converties en l'adresse IP  assignee  a
  l'intreface PPP.

  Vous pouvez utiliser librement les adresses de reseau suivantes :

       Class A: 10.0.0.0
       Class B: 172.16.0.0 - 172.31.0.0
       Class C: 192.168.0.0 - 192.168.254.0

  (NdT : _a _u_t_i_l_i_s_e_r _s_a_n_s _a_n_g_o_i_s_s_e_, _a_d_r_e_s_s_e_s _n_o_n _r_o_u_t_e_e_s _d_a_n_s _l_'_I_n_t_e_r_n_e_t)

  Ajouter ensuite les lignes suivantes a /etc/rc.d/rc.inet1 :

  ______________________________________________________________________
  /etc/rc.d/rc.inet1:

  FW=/sbin/ipfwadm

  ${FW} -F -f

  ${FW} -F -a m -P tcp -S localnet/8 -D default/0
  ${FW} -F -a m -P udp -S localnet/8 -D default/0

  # Masquerading timeout-values (tcp tcpfin udp), defaults:
  ${FW} -M -s 3600 0 0

  # Load module for special protocols:
  /sbin/modprobe ip_masq_ftp
  /sbin/modprobe ip_masq_raudio
  /sbin/modprobe ip_masq_irc
  ______________________________________________________________________

  Les deux lignes d'IP-masquerade vont adapter les trafics UDP et TCP  a
  l'adresse  IP utilisee par la passerelle par defaut (l'interface PPP).
  Les autres protocoles ne fonctionneront pas a partir des autres hotes.
  Par exemple ping qui utilise le protocole ICMP, ne fonctionnera que du
  routeur. Ici on utilise le reseau 1100..00..00..00  avec  le  masque  de  sous
  reseau 225555..00..00..00, ou en notation CIDR : //88.

  Les  lignes suivantes evitent la fin prematuree des connexions FTP, en
  augmentant la valeur des temporisation TCP (timeout).

  Les modules sont necessaires seulement si vous  desirez  utiliser  ces
  protocoles  a  travers  un  pare-feu (firewall). C'est a dire, si vous
  voulez utiliser un FTP  normal  a  travers  un  pare-feu,  vous  devez
  charger le module ip_masq_ftp.

  1111..  CCoonnffiigguurraattiioonn ddeess SSttaattiioonnss

  Configurez  vos  autres  machines  (stations) pour votre reseau local,
  puis pour utiliser la machine Linux  (routeur)  comme  passerelle  par
  defaut.

  Mise en place de diald pour Linux - un exemple
  GNU Copyright par Harish Pillay, h.pillay@ieee.org version
  franaise par Xavier Serpaggi
  1996

  Ce qui suit est un exemple de configuration que j'ai faite fonctionner
  sur plusieurs machines et qui autorise l'installation automatique de
  diald au moment du dmarrage. Quand une demande de connexion se
  prsente, il tlphone automatiquement  mon FAI (Fournisseur d'Accs
  Internet) prfr, Pacific Internet ici  Singapour.
  ______________________________________________________________________

  Table des matires


  1. Fichiers de configuration

     1.1 Fichier /etc/rc.d/rc.local
     1.2 Script PPP  l'aveuglette
     1.3 Fichier /etc/diald.conf
     1.4 Fichier diald.defs

  2. Ma configuration

  3. Remarques



  ______________________________________________________________________

  11..  FFiicchhiieerrss ddee ccoonnffiigguurraattiioonn

  Merci beaucoup  Eric Schenk pour le super outil qu'est diald.

  11..11..  FFiicchhiieerr //eettcc//rrcc..dd//rrcc..llooccaall































  #! /bin/sh
  # Mettez ici toutes les commandes de configuration locale
  # On lance gpm
  echo "Lancement de gpm..."
  gpm -t ms &

  # dmarrage d'innd
  /etc/rc.d/rc.news

  # dmarrage du dmon httpd du CERN
  echo "Dmarrage de CERN httpd avec proxy et cache."
  /usr/local/bin/httpd

  # chargement des modules ncessaires
  /etc/rc.d/rc.modules

  # dmarrage de diald
  echo "Dmarrage du dmon diald pour Pacific Internet ..."
  cd /usr/lib/ppp
  /usr/lib/ppp/diald.pacific.internet

  /usr/lib/ppp/diald.pacific.internet


  /usr/sbin/diald /dev/ttyS1 /dev/ttyS1 lock debug 20 -m ppp local 127.0.0.2 \
    remote 127.0.0.3 defaultroute modem crtscts \
    connect "chat -v -f /usr/lib/ppp/pppchat.pi" \
    dynamic -- debug noipdefault

  /usr/lib/ppp/pppchat.pi


  ABORT "NO CARRIER"
  ABORT BUSY
  "" ATZ OK
  ATm1s50=255s111=0DT1-800-555-1212
  CONNECT ""
  login MONNOMDELOGIN
  ssword MOMMOTDEPASSE




  11..22..  SSccrriipptt PPPPPP  ll''aavveeuugglleettttee


    Amorage de minicom.

    Connexion au fournisseur d'accs

    Invoquer PPP de l'autre ct

    Suspendre minicom (alt-A-J).

    Invoquer le script suivant











  #!/bin/sh
  #       Mise en place d'une liaison PPP  l'aveuglette - script appel blind.ppp

  DEVICE=ttyS1
  (
          stty 38400 -tostop
          pppd -detach debug noipdefault defaultroute mru 1500 /dev/$DEVICE &
          exit 0
  )  /dev/$DEVICE




  11..33..  FFiicchhiieerr //eettcc//ddiiaalldd..ccoonnff

  Mon fichier /etc/diald.conf (inchang par rapport  la distribution
  originale) :

















































  # Voici un ensemble de rgles de filtrages assez compliques
  # (Ce sont les rgles que j'utilise.)
  #
  # J'ai dcompos les rgles en quatre sections.
  # Les trames TCP, les trames UDP, les trames ICMP et enfin une rgle
  # gnrale pour tout le reste.
  #------------------------------------------------------------------------------
  # Rgles pour les trames TCP.
  #------------------------------------------------------------------------------
  # Commentaires gnraux sur cet ensemble de rgles :
  #
  # En gnral nous n'aimerions traiter que les donnes d'une liaison TCP
  # ayant un sens pour le temps de dconnexion. Cependant, nous essayons
  # d'ignorer les trames sans donne.
  # Puisque la taille minimale d'un en-tte dans une trame TCP est de 40 octets,
  # toutes les trames d'une longueur de 40 ne devraient pas contenir de donne.
  # De cette manire il est possible de manquer des trames vides (des informations
  # optionnelles de routage et d'autres choses supplmentaires peuvent tre
  # prsentes dans un en-tte IP), mais nous devrions en capter la majorit.
  # Remarquez que nous ne voulons pas rejetter les trames avec un champ tcp.live
  # vide puisque nous les utiliserons plus tard pour acclrer la dconnexion de
  # certaines liaisons TCP.
  #
  # Nous voulons galement nous assurer que les trames WWW restent en vie mme
  # si la socket TCP est arrte. Nous faisons cela parce que WWW ne garde pas la
  # connexion une fois que les donnes ont-t transfres, et il serait
  # gnant d'avoir la liaison qui se cree et se coupe  chaque document.
  #
  # En dehors de WWW l'utilisation la plus courante de TCP est pour les
  # connexions de longues dures dont la coupure signifie que vous n'allez plus
  # avoir besoin du rseau.
  # Nous ne voulons pas ncessairement avoir  attendre 10 minutes que la
  # connexion se termine alors que nous n'avons ni telnet ni rlogin en cours, donc
  # nous voulons acclrer le dlai de dconnexion sur les liaisons TCP qui sont
  # termines. Ceci est ralis en mettant dans un cache les trames qui n'ont pas l'indicateur
  # live positionn.

  # --- dbut proprement dit de l'ensemble de rgles ---

  # Quand on dbute une connexion on ne donne tout d'abord au lien que 15
  # secondes. L'ide ici est de pouvoir ventuellement se rendre compte que le
  # rseau de l'autre ct de la connexion n'est pas accessible. Dans ce cas
  # il n'est pas ncessaire de donner un temps de vie de 10 minutes au lien.
  # Avec la rgle ci-dessous nous ne lui donnons initialement que 15 secondes.
  # Si le rseau est accessible alors nous devrions normalement recevoir une
  # rponse contenant des donnes dans les 15 secondes. Si cela pose un problme
  # parce que vous avez des rponses lentes de la part de certains sites que vous
  # visitez rgulirement, vous pouvez augmenter le temps avant dconnexion ou
  # bien supprimer cette rgle.
  accept tcp 15 tcp.syn

  # Empcher named de garder la connexion active.
  ignore tcp tcp.dest=tcp.domain
  ignore tcp tcp.source=tcp.domain

  # (Argh! Le telnet de SCO commence par envoyer des SNY vides et n'initie la
  # connexion que s'il obtient une rponse. Pfuuutt...
  accept tcp 5 ip.tot_len=40,tcp.syn

  # Empcher les trames vides de maintenir le lien actif (autres que les trames
  # vides SNY).
  ignore tcp ip.tot_len=40,tcp.live

  # On s'assure que le transfert http maintient la ligne active pendant 2
  # minutes, mme aprs que ce soit termin.
  # REMARQUE : votre fichier /etc/services ne devrait pas dfinir le service tcp
  # www, auquel cas vous devez commenter les deux lignes suivantes et vous
  # procurer un fichier /etc/services plus rcent. Lisez la FAQ pour savoir
  # comment obtenir un nouveau fichier /etc/services.
  accept tcp 120 tcp.dest=tcp.www
  accept tcp 120 tcp.source=tcp.www

  # Une fois que le lien n'est plus actif, nous tentons de stopper la connexion
  # rapidement. Remarquez que si le lien est dj arrt, un changement d'tat
  # ne le ramnera pas  l'tat actif.
  keepup tcp 5 !tcp.live
  ignore tcp !tcp.live

  # une donne ftp ou une connexion ftp peut tre attendue pour rendre compte
  # du trafic relativement frquent.
  accept tcp 120 tcp.dest=tcp.ftp
  accept tcp 120 tcp.source=tcp.ftp

  # REMARQUE : les donnes ftp ne sont pas dfinies dans le fichier /etc/services
  # distribu dans les dernires versions de NETKIT, donc j'ai comment ce
  # passage.
  # Si vous dsirez le dfinir, ajoutez la ligne suivante  votre fichier
  # /etc/services :
  # ftp-data        20/tcp
  # et dcommentez les deux rgles suivantes
  #accept tcp 120 tcp.dest=tcp.ftp-data
  #accept tcp 120 tcp.source=tcp.ftp-data

  # Si nous n'avons pas russi  l'avoir avec les rgles au dessus, donnons au
  # lien 10 minutes de plus.
  accept tcp 600 any

  # Rgles pour les trames UDP.
  #
  # Nous donnons ds  prsent un temps limite aux requettes de domaine puisque
  # nous voulons juste qu'elles tablissent le lien, pas qu'elles le maintiennent
  # pour un long moment.
  # Ceci parce que le rseau sera gnralement tabli par un appel de la
  # bibliothque de rsolution de nom ( moins que vous n'ayez mis toutes les
  # adresses que vous utilisez frquemment dans /etc/hosts, auquel cas vous
  # dcouvrirez d'autres problmes.)
  # Remarquez que vous ne devez pas donner une valeur de temps limite de
  # dconnexion plus courte que le temps suppos que va mettre votre DNS pour
  # rpondre. Sinon quand le lien original s'tablit, il risque d'y avoir
  # une attente suprieure  celle qu'il y a entre les sries de trames initiales
  # avant qu'une trame destine  maintenir le lien passe par ce dernier.

  # Ne pas activer le lien pour rwho.
  ignore udp udp.dest=udp.who
  ignore udp udp.source=udp.who
  # Ne pas activer le lien pour RIP.
  ignore udp udp.dest=udp.route
  ignore udp udp.source=udp.route
  # Ne pas activer le lien pour NTP ou pour timed.
  ignore udp udp.dest=udp.ntp
  ignore udp udp.source=udp.ntp
  ignore udp udp.dest=udp.timed
  ignore udp udp.source=udp.timed
  # Ne pas activer les requtes de nom de domaine entre deux excutions de named.
  ignore udp udp.dest=udp.domain,udp.source=udp.domain
  # Activer le rseau pour les requtes de domaine qui ne viennent pas de
  # named.
  accept udp 30 udp.dest=udp.domain
  accept udp 30 udp.source=udp.domain
  # Faire la mme chose pour les diffusions de netbios-ns
  # REMARQUE : votre fichier /etc/services peut ne pas dfinir le service
  # netbios-ns, auquel cas vous devez commenter les trois lignes suivantes.
  ignore udp udp.source=udp.netbios-ns,udp.dest=udp.netbios-ns
  accept udp 30 udp.dest=udp.netbios-ns
  accept udp 30 udp.source=udp.netbios-ns
  # empcher les transferts de routed et gated de maintenir le lien actif
  ignore udp tcp.dest=udp.route
  ignore udp tcp.source=udp.route
  # Le reste a droit  2 minutes.
  accept udp 120 any

  # Rcuprer toutes trames que nous n'avons pas traites auparavant et donner 30
  # secondes de dure de vie  la connexion.
  accept any 30 any




  11..44..  FFiicchhiieerr ddiiaalldd..ddeeffss

  Mon fichier diald.defs (inchang par rapport  la distribution
  originale) :


  # Dfinition des rgles de protocole par dfaut
  prule tcp tcp 9:12:13:14:15:16:17:18:19:+0:+1:+2:+3:9:9:9
  prule udp udp 9:12:13:14:15:16:17:18:19:+0:+1:+2:+3:9:9:9
  prule icmp icmp 9:12:13:14:15:16:17:18:19:9:9:9:9:9:9:9
  prule any any 9:12:13:14:15:16:17:18:19:9:9:9:9:9:9:9
  # Dfinition des en-ttes des trames internet.
  var ip.ihl 0(24)&0xf
  var ip.version 0(28)&0xf
  var ip.tos 1(24)&0xff
  var ip.tot_len 2(16)&0xffff
  var ip.id 4(16)&0xffff
  var ip.frag_off 6(16)&0x3fff
  var ip.ttl 8(24)&0xff
  var ip.protocol 9(24)&0xff
  var ip.check 10(16)&0xffff
  var ip.saddr 12
  var ip.daddr 16
  # Dfinition des en-ttes des trames TCP.
  var tcp.source +0(16)&0xffff
  var tcp.dest +2(16)&0xffff
  var tcp.seq +4
  var tcp.ack_seq +8
  var tcp.doff +12(28)&0xf
  var tcp.fin +13(24)&0x1
  var tcp.syn +13(25)&0x1
  var tcp.rst +13(26)&0x1
  var tcp.psh +13(27)&0x1
  var tcp.ack +13(28)&0x1
  var tcp.urg +13(29)&0x1
  var tcp.live +127
  # Dfinition de en-ttes des trames UDP.
  var udp.source +0(16)&0xffff
  var udp.dest +2(16)&0xffff
  var udp.len +4(16)&0xffff
  var udp.check +6(16)&0xffff
  # Dfinition des en-ttes des trames ICMP.
  var icmp.type +0(24)&0xff
  var icmp.code +1(24)&0xff
  var icmp.checksum +2(16)&0xffff
  var icmp.echo.id +4(16)&0xffff
  var icmp.echo.sequence +6(16)&0xffff
  var icmp.gateway +4


  22..  MMaa ccoonnffiigguurraattiioonn


    Un 486/66 avec 20 Mo de ram et plein d'espace disque :-)

    des UART 16550 en abondance

    diald 0.11, pppd 2.2.0d, noyau 1.3.95 avec modules.


  33..  RReemmaarrqquueess


    Changez le nom du port srie /dev/ttyS1 ``ci-dessus'' de manire 
     ce qu'il corresponde  vos attentes.

    Assurez vous que vous pouvez vous connecter avec PPP en utilisant
     le script blind.ppp.

  Si vous avez des questions crivez  Harish Pillay  h.pillay@ieee.org














































  Mini Howto Linux pour systemes sans lecteur de disque(ttes)
  par Robert Nemkin buci@math.klte.hu
  Traducteur:  Sebastien  Blondeel  <http://www.lifl.fr/~blon-
  deel> (sebastien.blondeel@lifl.fr)
  v0.0.3 12 Sep 1996

  Ce document decrit la maniere de configurer un systeme sous Linux sans
  disque dur ni lecteur de disquettes. Ses droits appartiennent a Robert
  Nemkin, et il est place sous les termes de la Publique  Generale  GNU.
  L'auteur  remercie  Bela  Kis  <bkis@cartan.math.klte.hu>  pour  avoir
  traduit ce document en anglais. Sebastien  Blondeel,  <Sebastien.Blon-
  deel@lifl.fr> a traduit ce document en francais.

  11..  MMooddiiffiiccaattiioonnss

  +o  v0.0.3 12 Sep 1996: Quelques erreurs mineures ont ete corrigees

  22..    CCoommmmeenntt  ccoonnffiigguurreerr  uunn  ssyysstteemmee  ssoouuss  LLiinnuuxx  ssaannss  lleecctteeuurr  ddee
  ddiissqquuee((tttteess))

  Ce document decrit la maniere de configurer un systeme sous Linux sans
  disque  dur  ni  lecteur  de  disquette.  Il  peut  parfois   s'averer
  necessaire  de  faire  tourner  Linux  sur  des ordinateurs personnels
  ("PC") qui ne possedent ni disque dur ni lecteur de disquettes.  Si on
  dispose  d'un reseau, d'un autre systeme sous Unix avec bootp et tftp,
  d'un serveur NFS et d'un bruleur d'EPROM, alors  il  est  possible  de
  configurer  et  de faire tourner un systeme sous Linux sans disque dur
  ni disquette.

  33..  CCoonnssuulltteerr eeggaalleemmeenntt lleess ddooccuummeennttss ssuuiivvaannttss::

  +o  NFS-root Mini Howto

  +o  Linux        NET-2/3-HOWTO        par         Terry         Dawson,
     94004531@postoffice.csu.edu.au

  +o  /usr/src/linux/README  pour  la  configuration et la compilation de
     nouveaux noyaux

  44..  MMaatteerriieell

  Tout ce qui est decrit ici a ete teste avec la configuration suivante:

  +o  Sun-OS 4.1.3 comme serveur d'amorcage

  +o  Slackware 2.3 + Linux 1.2.8 + la carte ethernet wd 8013

  +o  Un reseau ethernet en etat de fonctionnement

  55..  IIddeeeess ffoonnddaammeennttaalleess

  L'idee  de  base  est  la suivante: le PC va obtenir son adresse IP du
  serveur d'amorcage par le protocole bootp, en utilisant 0.0.0.0  comme
  adresse  IP  initiale  et en obtenant son noyau par le protocole tftp.
  (-- Un amorcage a travers des segments (via un routeur) n'est  pas  un
  probleme  simple,  aussi  faut-il  mettre  a  la fois le serveur et la
  machine sans disque sur le meme segment de reseau, ou  configurer  une
  adresse  UDP  d'aide  dans  votre  routeur  pointant vers l'adresse du
  serveur.  Referez-vous au manuel de votre routeur pour de plus  amples
  informations sur le sujet.--)
  Pour cela, suivez les etapes ci-dessous.

  55..11..  CCoonnffiigguurreerr llee PPCC

  Obtenez  le  paquetage  nfsboot (ce paquetage est disponible sur votre
  site    miroir    de    Linux    prefere    dans     le     repertoire
  /pub/Linux/system/Linux-boot).  Il  contient une image d'amorcage pour
  l'EPROM de la carte wd8013 qui peut etre brulee telle quelle.

  Il y a d'autres manieres de preparer le PC:

  +o  si votre  machine  contient  un  petit  disque  ou  un  lecteur  de
     disquette, vous pouvez utiliser le petit programme sous DOS, ou

  +o  l'image   binaire  pour  disquette  qui  se  trouve  dans  le  meme
     paquetage.

     Si vous choisissez la deuxieme option, il faut utiliser la commande
     dd pour ecrire l'image sur la disquette.

  Ces  images contiennent un client bootp et un client tftp.  Vous devez
  egalement preparer un noyau pour linux, comportant  l'option  NFS-root
  (amorcage par NFS).

  +o  Si  vous  utilisez  le dernier noyau stable, linux-1.2.13, alors il
     faut corriger le noyau avec le fichier de correction  contenu  dans
     le paquetage nfsboot (-- Consulter patch(1)--)

  +o  Si  vous  utilisez  le dernier noyau en date, instable, de la serie
     linux-1.3.x, il vous faut configurer l'option NFS-root.

     Vous  pouvez  ou  non  choisir  de  configurer  le   support   pour
     peripherique  en  mode  bloc  (disque  dur ou disquette), mais vous
     devez configurer le support pour tcp/ip, pour la carte ethernet wd,
     et  pour  le  systeme  de fichiers NFS. Puis recompilez le noyau de
     maniere habituelle.

  55..22..  CCoonnffiigguurreerr uunn bboooottppdd ssuurr llee sseerrvveeuurr

  On peut le trouver dans le paquetage bootpd-2.4.tar.gz (qui se  trouve
  sur   votre   site   miroir   de  Linux  prefere  dans  le  repertoire
  /pub/Linux/system/Network/boot.net). Chargez le paquetage, compilez-le
  et  installez-le. Si votre autre systeme sous Linux se trouve etre une
  distribution Slackware, vous pouvez passer a l'etape suivante  puisque
  les  distributions  standard comportent un bootpd. On peut demarrer le
  demon, soit en tapant la commande

       ______________________________________________________________________
               bootpd -s
       ______________________________________________________________________

  soit en utilisant inetd. Dans ce dernier cas, il vous faut editer:

  +o  /etc/inetd.conf pour oter le signe diese de mise en commentaire  au
     debut des lignes suivantes:

  ______________________________________________________________________
  # tftp   dgram   udp     wait    root    /usr/sbin/in.tftpd     tftpd /export
  # bootps dgram   udp     wait    root    /usr/sbin/in.bootpd    bootpd
  ______________________________________________________________________

  +o  inserer  ou  otez  le  signe  de  commentaire  pour les deux lignes
     suivantes dans /etc/services:

       ______________________________________________________________________
       bootps          67/tcp          # serveur BOOTP
       tftp            69/udp          # serveur TFTP
       ______________________________________________________________________

  +o  redemarrez inetd en tapant

       ______________________________________________________________________
               kill -HUP <numero d'identification du processus de inetd>.
       ______________________________________________________________________

  55..33..  CCoonnffiigguurreerr llee bboooottppdd ssuurr llee sseerrvveeuurr..

  Tout d'abord, bootpd possede un fichier de configuration qui s'appelle
  bootptab  et  qui  se  trouve  habituellement dans /etc. Vous devez le
  modifier en indiquant les adresses IP de votre  passerelle,  de  votre
  serveur  dns,  et  les adresses ethernet de votre ou vos machines sans
  disques.  Voici un fichier /etc/bootptab d'exemple:

       ______________________________________________________________________

       global.prof:\
       :sm=255.255.255.0:\
       :ds=192.168.1.5:\
       :gw=192.168.1.19:\
       :ht=ethernet:\
       :bf=linux:
       machine1:hd=/export/root/machine1:tc=global.prof:ha=0000c0863d7a:ip=192.168.1.140:
       machine2:hd=/export/root/machine2:tc=global.prof:ha=0800110244e1:ip=192.168.1.141:
       machine3:hd=/export/root/machine3:tc=global.prof:ha=0800110244de:ip=192.168.1.142:
       ______________________________________________________________________

  global.prof est un patron general pour les entrees d'hotes, ou

  +o  le champ sm contient le masque pour le sous-reseau

  +o  le champ ds contient l'adresse du serveur de nom de domaine (DNS)

  +o  le champ gw contient l'adresse de la passerelle par defaut

  +o  le champ ht contient le type de carte reseau

  +o  le champ bf contient le nom du fichier d'amorcage

  Apres cela, chaque machine doit posseder  sa  propre  entree  sur  une
  ligne:

  +o  le premier champ contient le nom de l'hote

  +o  le champ hd contient le repertoire du fichier d'amorcage

  +o  on peut inclure le patron global avec le champ tc

  +o  le champ ha contient l'adresse materielle de la carte ethernet

  +o  le champ ip contient l'adresse IP qui a ete attribuee

  55..44..  CCoommpprreennddrree ttffttpp

  TFTP  (Trivial  File  Transfer  Protocol, ou protocole de transfert de
  fichiers banal) est un protocole de transfert de fichiers, comme  ftp,
  mais  il  est  beaucoup  plus facile a programmer dans des memoires de
  type EPROM. On peut utiliser TFTP de deux manieres:

  +o  tftp simple: cela signifie que le client peut acceder a la totalite
     de  votre  systeme  de  fichiers.  C'est  plus  simple,  mais  cela
     constitue un gros trou de  securite  (n'importe  qui  peut  obtenir
     votre fichier de mots de passe par tftp).

  +o  tftp  securise:  le  serveur tftp utilise un appel systeme chroot.2
     pour modifier son propre repertoire racine. Tout ce qui  n'est  pas
     dans   cette   racine   sera  absolument  inaccessible.   Comme  le
     repertoire chroot devient le nouveau repertoire racine, le champ hd
     liste  dans  le  fichier  bootptab  doit prendre cette situation en
     compte. Par exemple: lorsqu'on utilise tftp non securise, le  champ
     hd  contient  le  chemin  complet  menant au repertoire d'amorcage:
     /export/root/machine1.   Lorsqu'on  utilise  tftp   securise   avec
     /export  comme  repertoire  racine,  alors /export devient /  et le
     champ hd doit etre /root/machine1.

     Comme pratiquement toute  installation  Unix  comporte  un  serveur
     tftp, vous n'aurez probablement pas besoin d'installer la votre.

  55..55..  CCoonnffiigguurreerr uunn LLiinnuuxx mmiinniimmaall ssuurr llee sseerrvveeuurr ddiissttaanntt..

  Il  vous  faut pour cela, par exemple, les paquetages a, ap, n et x de
  la distribution Slackware. Il est possible d'installer plus de choses;
  ce  pendant  les  paquetages ci-dessus suffiront a l'installation d'un
  terminal X sans disque. Pour l'installation, il vous faut  un  systeme
  sous  Linux  en  etat de marche. Trouvez un peu d'espace disque sur la
  machine distante et exportez-le en lecture et en ecriture.  Montez  le
  repertoire  exporte quelque part (par exemple sur /mnt) sur le systeme
  de fichiers du systeme sous Linux. Demarrez Linux et modifiez l'option
  de racine dans la configuration; remplacez / par /mnt. Puis configurez
  les paquetages ci-dessus de maniere habituelle. Si vous  ne  souhaitez
  faire  tourner  qu'un  seul  Linux  sans  disque, il ne vous faut rien
  modifier d'autre. D'un autre cote, si vous pensez utiliser plus  d'une
  machine   sans   disque,   la   configuration   decrite  ci-dessus  ne
  fonctionnera pas parce que certains fichiers  et  repertoires  doivent
  etre  prives  pour  chaque machine.  On peut contourner ce probleme on
  deplacant  le  repertoire  /usr  (il   ne   contient   aucune   donnee
  personnelle)  et  ensuite  de  creer  un  sous-repertoire  pour chaque
  machine sans disque. Par exemple, si /export/linux/machine1 est  monte
  sur  /mnt  alors  la  structure des repertoires apres la configuration
  initiale ressemblera a:

       ______________________________________________________________________
       /export/linux/machine1/bin
       /export/linux/machine1/sbin
       /export/linux/machine1/lib
       /export/linux/machine1/etc
       /export/linux/machine1/var
       /export/linux/machine1/usr
       ______________________________________________________________________

  Apres les modifications vous obtiendrez

       ______________________________________________________________________
       /export/linux/machine1/bin
       /export/linux/machine1/sbin
       /export/linux/machine1/lib
       /export/linux/machine1/etc
       /export/linux/machine1/var
       /export/linux/usr
       ______________________________________________________________________

  Maintenant  creez  les  sous-repertoires  pour  les  autres  machines.
  Supposons  pour  l'instant  que  vos  machines sans disque s'appellent
  machine1, machine2, machine3, etc.;  vous  pouvez  alors  utiliser  le
  script bash qui suit pour configurer les autres repertoires:

       ______________________________________________________________________

               cd /export/linux
               for x in machine2 machine3; do
                       mkdir $x; cd $x
                       (cd ../machine1; tar cf - *) | tar xvf -
               done
       ______________________________________________________________________

  Puis exportez les repertoires qui suivent:

  +o  /export/linux/usr                        en lecture seule pour tout
     le monde.

  +o  /export/linux/machine1            uniquement   sur   machine1,   en
     lecture/ecriture et avec les droits de root.

  +o  /export/linux/machine2          idem, sur machine2.

  +o  /export/linux/machine3          idem, sur machine3.

     comme  suit  (-- le format de cet exemple est conforme a la syntaxe
     des exportations de fichiers pour SunOS 4.1.3--) :
       ______________________________________________________________________

       # Ce fichier est /etc/export
       # pour des terminaux sous le systeme Linux distants
       # Ecrit par Buci
       # N'ecrivez cette ligne qu'une fois
       /export/root/usr             -access=linuxnet
       # N'ecrivez ces lignes qu'une fois pour chaque hote
       /export/root/machine1       rw=machine1,root=machine1
       /export/root/machine2       rw=machine2,root=machine2
       /export/root/machine3       rw=machine3,root=machine3
       ______________________________________________________________________

  N'oubliez pas de lancer exportfs -a.

  55..66..  CCoonnffiigguurreerr llee sseerrvveeuurr ttffttpp

  C'est maintenant le moment de configurer  le  serveur  tftp.  Si  vous
  n'avez  pas besoin de tftp securise alors tout est tres simple puisque
  vos clients peuvent etre amorces depuis le repertoire /export.

  Si vous utilisez un tftp securise vous pouvez soit mettre en place une
  structure  de  repertoire  /export/linux  complete  sous /tftpboot (en
  n'utilisant qu'un seul veritable noyau et des liens  symboliques  pour
  les  autres  machines), ou laisser le repertoire /export jouer le role
  du repertoire d'amorcage pour le tftpd securise.  Ou encore,  si  vous
  disposez  d'un  repertoire  tftpboot  separe, de facon similaire, vous
  n'aurez besoin que d'un seul noyau dans la  structure  de  repertoires
  d'origine,  et  de  liens  pour  les  autres.  Vous  pouvez obtenir ce
  resultat en tapant ce qui suit:

       ______________________________________________________________________
             mkdir -p /tftpboot/export/linux/machine1
             cd /tftpboot/export/linux/machine1
             cp /export/linux/machine1/<nom du noyau>.
       ______________________________________________________________________

  Puis tapez ce qui suit:

       ______________________________________________________________________
             mkdir -p /tftpboot/export/linux/machine2
             cd ../machine2
             ln -s ../machine2/<nom du noyau>
       ______________________________________________________________________

  55..77..  DDeerrnniieerrss rreeggllaaggeess

  Enfin, il vous faut inserer

  ______________________________________________________________________
     /sbin/mount nfs_server:/export/linux/usr /usr
  ______________________________________________________________________

  a la premiere ligne de

       ______________________________________________________________________
          /export/linux/<machinex>/etc/rc.d/rc.S
       ______________________________________________________________________

  ou <machinex> signifie machine1, machine2, etc.

  66..  MMeemmooiirree eett eessppaaccee ddiissqquuee rreeqquuiiss;; vviitteessssee

  .  Je n'ai teste ceci que pour la  distribution  Slackware  2.3;  pour
  d'autres  distributions  ou  versions  les nombres qui suivent peuvent
  varier:

  +o  Espace disque: 28Mo + 6.5Mo/machine

  +o  RAM: J'utilise X avec 8Mo. Comme il ne faut que 8Mo de  systeme  de
     pagination  sur  memoire  de masse, on peut les mettre en place, je
     pense -- de facon separee pour chacune des machines --  dans  /tmp.
     N'oubliez pas de lancer mkswap.

  +o  Vitesse:  Je  n'ai  pas  eu  de  problemes sur un 486 DX2/66 avec 8
     Megaoctets.

  77..  EErrrreeuurrss ppoossssiibblleess

  +o  J'ai decouvert une erreur etrange: dans  le  sous-repertoire  /dev,
     SunOS  a  corrompu  les entrees de peripheriques de telle sorte que
     j'ai du relancer MAKEDEV  en  montant  le  sous-repertoire  sur  un
     systeme  sous  Linux  avec disque.  (La raison de cela provient des
     differences entre le NFS de linux et le NFS  de  SunOS:  tous  deux
     utilisent  32bits  pour  les  numeros  de  peripheriques  Mineur et
     Majeur, mais linux utilise des  champs  de  16bits  pour  ces  deux
     numeros,  alors que SunOS utilise un champ de 14bits pour le numero
     de peripherique Majeur, et un champ de 18bits  pour  le  numero  de
     peripherique Mineur.)

  +o  Quand  on  amorce  un  systeme  sous Linux sans disque, la table de
     routage au serveur tftp ne contient qu'un  seul  routage,  et  vous
     devez  configurer  des  tables de routage correctes. Vous avez pour
     cela deux possibilites:

  +o  configurer le rc.S de chacune des machines a la main

  +o  utiliser un paquetage de client  bootp  et  rediger  un  script  de
     configuration generalise

  88..  EErrrreeuurrss eett ddeevveellooppppeemmeennttss ppoossssiibblleess ddee ccee ddooccuummeenntt

  +o  Citer correctement les documents lies a tout ceci.

  +o  SunOS  est  fonde  sur  BSD.  Il  faut inclure une configuration de
     serveur fondee sur SVR4 (c'est-a-dire sur Solaris).

  +o  Meme si Linux ressemble  beaucoup  a  SunOS  en  tant  que  serveur
     bootp/tftp,  il  peut  etre  utile de fournir un exemple de serveur
     fonde sur Linux.

  +o  Mettre a jour ce document pour le paquetage etherboot en cours.

  +o  Montrer les differences entre le noyau version 1.2.13 corrige  pour
     la racine NFS et le dernier noyau 1.3.x, qui contient la correction
     de racine par NFS.

  +o  Besoin d'essayer d'autres cartes ethernet que la wd8013

  +o  Inclure des renseignements de configuration pour bootpc, un  client
     bootp  pour  Linux  qui  sert  a  configurer  des tables de routage
     correctes.

  +o  Fautes de frappe  et  autres:  notifiez-les,  s'il  vous  plait,  a
     buci@math.klte.hu   ou   a   Sebastien.Blondeel@lifl.fr   pour   la
     traduction francaise.  Merci.

  Dynamic IP Hacks Mini-HowTo
  Michael Driscollfenris@lightspeed.net
  V 2.1.3, 25 Mai 1997

  Comment s'en sortir avec une IP dynamique.
  ______________________________________________________________________

  Table des matires


























































  1. Copyright et Dfinitions...

     1.1 Ou trouver la dernire version de ce Mini-HowTo
     1.2 Commentaires
     1.3 Pourquoi ce Mini-HowTo ?
     1.4 Qu'est ce que l'adressage dynamique des IP, et pourquoi ais-je  m'en proccuper ?
     1.5 Pouvez-vous m'aider a configurer {pppd,telnetd,sendmail...} ?
     1.6 H, et le SLIP ?
     1.7 Copyright
     1.8 Avertissement

  2. Introduction aux hacks 1 au 3

  3. Hack 1 : Garder votre systme connect et accessible 24h/24 et 7j/7 (mthode 1)

     3.1 Ce dont vous avez besoin
     3.2 (TT

  4. Hack 2 : Garder votre systme connect et accessible 24h/24 et 7j/7 (mthode 2)

     4.1 Ce dont vous avez besoin
     4.2 Mise en place du script
        4.2.1 En utilisant
        4.2.2 Utilisation

  5. Hack 3 : Garder votre systme connect et accessible 24h/24 et 7j/7 (mthode 2)

     5.1 Ce dont vous avez besoin
     5.2 Jouons avec les runlevels

  6. Hack 4 : Envoi de l'IP par e-mail

     6.1 Ce dont vous avez besoin
     6.2 Mise en place de vos
     6.3 Comment rcuprer votre nouvelle adresse IP depuis un autre ordinateur ?
        6.3.1 Faire un telnet sur un serveur POP3

  7. Hack 5 : Changement dynamique de votre

     7.1 Ce dont vous avez besoin.
     7.2 Cration des patrons de hosts
     7.3 Et on retripote

  8. Hacks 6  8 : Divers hacks

     8.1 (TT
     8.2 (TT
     8.3 (TT

  9. Entres DNS dynamiques

  10. Hack 9 : Mettre  jour votre

  11. Hack 10 : Une recette simple avec

  12. Hack 11 : Une home page dynamique via ftp

     12.1 Pourquoi j'utiliserais a ?
     12.2 Mise en place de la page
        12.2.1 Une note sur les redirections
     12.3 Utilisation de
        12.3.1 (TT
        12.3.2 (TT
     12.4 Une routine de recherche/remplace simple avec

  13. Hack 12 : Envoyez un message sur votre pager avec votre nouvelle adresse IP
     13.1 Le programme qui compose le numro
     13.2 Appel depuis

  14. Hack 13 : logins

  15. Hack 14 : Home page dynamique via un CGI

     15.1 Voil ce que l'on va faire.
     15.2 Le script (

  16. Hack 15 : Suggestion pour les rc.*

  17. Hack 16 : Empcher les time-out imposs par votre FAI avec un ping

  18. Hack 17 : Utilisation des SSI pour retrouver son IP

  19. On a besoin d'autre hacks !

  20. CRDITS



  ______________________________________________________________________

  11..  CCooppyyrriigghhtt eett DDffiinniittiioonnss......

  par Michael Driscoll fenris@lightspeed.net


       [ 15 Janvier 1998 - Ce Mini-HowTo n'est plus maintenu par
       son auteur. Si vous tes intresss par la maintenance de ce
       Mini-HowTo, prenez contact avec moi  gregh@sun
       site.unc.edu.]


  Avec les Hacks de :


    Michael Driscoll fenris@lightspeed.net

    Ryan R. Klems rklems@primenet.com

    Matthew Driver mdriver@cfmeu.asn.au

    Matthew Nuckolls mnuck@umr.edu

    Justin Cragin beyond@lightspeed.net

    Brad Baker bpb@mlb.cca.rockwell.com

    Justin (Gus) Hurwitz ghurwitz@dyndns.com

    Jeremy D. Impson jdimpson@camelot.syr.edu

    Steve Przepiora gearhead@dreamscape.com

    Artur Skawina skawina@usa.net

    Dale Jolliff taftbbs@e-tex.com


  11..11..  OOuu ttrroouuvveerr llaa ddeerrnniirree vveerrssiioonn ddee ccee MMiinnii--HHoowwTToo

  La toute dernire version peut tre trouve  frob.base.org/howto.txt.


  L'adresse ou vous pourrez toujours trouver ce document est
  sunsite.unc.edu/pub/Linux/docs/howto/mini/Dynamic-IP-Hacks, toutefois,
  vous devriez utiliser un site miroir du LDP si vous en connaissez un.


  11..22..  CCoommmmeennttaaiirreess

  Tous les commentaires  propos de ce document devraient tre adresss
   Michael Driscoll fenris@lightspeed.net.


  11..33..  PPoouurrqquuooii ccee MMiinnii--HHoowwTToo ??

  Le problme est que Linux ne s'accommode pas aussi bien qu'il le
  pourrait de l'adressage dynamique des IP. Cet adressage dynamique
  pourrait tre l'quivalent Unix au fait de se rveiller tous les
  matins et constater que votre adresse postale a chang et que toutes
  vos cartes de visites sont dpasses. Malheureusement, les FAI (NdT :
  Fournisseur d'Accs Internet)  tendent de plus en plus  utiliser ce
  type d'adressage de nos jours, et tous ceux qui ne peuvent pas se
  permettre de dpenser un peut plus d'argent pour obtenir une IP fixe
  sont coinces avec a. Le but de ce document est donc de rendre votre
  Linux aussi  l'aise avec l'adressage dynamique d'IP que possible, il
  vous rendra plus heureux et sera plus pratique  utiliser.


  11..44..  QQuu''eesstt ccee qquuee ll''aaddrreessssaaggee ddyynnaammiiqquuee ddeess IIPP,, eett ppoouurrqquuooii aaiiss--jjee 
  mm''eenn pprrooccccuuppeerr ??

  Une adresse IP est une suite de quatre chiffres, chacun ayant une
  valeur comprise entre 0 et 255, et ces 4 chiffres sont spars par un
  point. Par exemple : 198.41.0.8. Chaque ordinateur sur Internet  une
  unique adresse IP. Les adresses que vous utilisez, telles
  sunsite.unc.edu et bac2.lightspeed.net, sont des alias qui sont
  traduits en adresses IP par un serveur de DNS chaque fois que vous y
  tentez d'y accder.

  L'adressage dynamique des IP est quelque-chose utilis par les FAI
  pour rduire le nombre d'adresses dont ils ont besoin de "possder".
  Chaque fois que vous vous connectez  votre FAI, ils vous donnent
  juste la dernire adresse IP dans la queue des celles disponibles.
  Ainsi, ils n'ont pas besoin d'une adresse par client, mais seulement
  pour les clients qui sont connectes  un instant donn.
  Habituellement, les FAI possdent une adresse pour dix clients, bien
  que ce ratio varie.

  Pourquoi font-ils a ? Et bien, la faon la plus simple de d'expliquer
  est de dire qu'il n'y a pas suffisamment d'adresses IP avec le
  protocole actuel. Une faon plus complexe est de dire que nous avons
  suffisamment d'adresses,  mais  qu'il y en a de plus en plus
  d'utilises, les tables de routage utilises par les routeurs des
  dorsales commencent  ressembler  des disque MS-DOS vieux de 10 ans
  et qui n'a jamais t dfragment :-) En utilisant tant d'adresses, il
  y a une perte d'efficacit dans les recherches. Le systme actuel est
  cens exploser entre 2000 et 2010. Heureusement, nous utiliserons tous
  le protocole IPv6  ce moment l, et nous aurons tous notre propre IP
  ce qui rendra ce Mini-HowTo inutile :-)


  11..55..  PPoouuvveezz--vvoouuss mm''aaiiddeerr aa ccoonnffiigguurreerr {{ppppppdd,,tteellnneettdd,,sseennddmmaaiill......}} ??

  Non, Dbrouillez vous tout seul. a forme le caractre :-)

  En fait, il me serait plutt inutile de rinventer la roue en vous
  aidant  les configurer, puisque beaucoup de documents existent dj
  pour vous permettre de vous en sortir. Commencez par essayer les
  suivants :


    La page man de pppd

    La page man de chat

    La page man de in.telnetd

    La page man de inetd

    le PPP-HOWTO

    le NET-2-HOWTO
     (Disponibles sur des sites tels :
     sunsite.unc.edu/pub/Linux/docs/howto)

    le NAG
     (Network Administrator's Guide par Olaf Kirch, disponible sur les
     sites du LDP, comme : sunsite.unc.edu/pub/Linux/docs/LDP)


  11..66..  HH,, eett llee SSLLIIPP ??

  Pour vous dire la vrit, je n'cris rien  ce sujet, c'est parce que
  je ne sais rien  ce sujet.

  Heureusement, cela ne devrait pas tre un trop gros problme, puisque
  PPP semble tre le standard actuel, spcialement en ce qui concerne
  l'adressage IP.

  Je suis dsol pour vous si vous faites partie des 0.3% de ceux qui
  ont leur adressage IP avec SLIP, mais je pense que vous pourrez
  peut-tre utiliser ce HowTo et dbrouillez-vous pour que a marche (si
  vous le faites, lisez l'appendice A pour voir votre hack ajoute a ce
  HowTo !)


  11..77..  CCooppyyrriigghhtt

  En absence de clause contraire, les documents HOWTOs ont un Copyright
  dpos par leurs auteurs respectifs. Ces documents peuvent tre copis
  et distribus en partie ou en totalit sur n'importe quel support
  mdia  condition que le Copyright soit conserve sur chaque copie. La
  distribution commerciale est autorise et encourage tant que l'auteur
  est tenu informe de telles initiatives.

  Toute traduction ou travail annexe incluant un document Linux HOWTO
  doit tre couvert sous les mentions du prsent Copyright. Cela
  signifie qu'il vous est impossible de prendre une partie d'un document
  et d'imposer des restrictions sur sa distribution. Certaines
  drogations peuvent tre obtenues. Pour cela, contacter le
  coordinateur  l'adresse indique ci dessous.

  Nous dsirons promouvoir la diffusion de ces informations le plus
  largement possible. Nous souhaitons cependant conserver notre
  Copyright sur les documents HOWTOs et tre tenus informs des projets
  visant  distribuer ces informations. Si vous avez des questions,
  contactez Greg Hankins, coordinateur des Linux HOWTOs 
  gregh@sunsite.unc.edu via e-mail, ou au +1 404 853 9989.


  11..88..  AAvveerrttiisssseemmeenntt

  Cela va sans dire, mais je le dis quand mme au cas o.

  Je ne suis pas sur que tout cela est fait de la meilleure faon, et si
  quelque chose que j'ai fait est trop bizarre, dites moi comment le
  rendre plus clair. Il se peut qu'il y ait des risques de scurit dans
  tout a, mais je ne les connais pas. Tout ceci marche bien sur ma
  machine, et je ne pense pas que cela risque de trop casser la votre
  :-) Par consquent, vous devriez quand mme faire attention et tre
  sur de bien comprendre au moins un petit peu ce que vous faites,
  ainsi, vous pourrez le rparer si a ne marche plus.

  Comme son nom l'indique, ce document parle de hhaacckkss. Les hacks, par
  dfinitions sont des faons plutt bizarres de configurer un systme,
  bien que parfois, ils soient la seule faon. En plusieurs endroits,
  ces hacks pourraient tre faits de faons plus lgantes, mais au cot
  de la simplicit. Je ne l'ai pas fait car il faut que la personne qui
  met en place les hacks les comprenne, pour qu'elle puisse les refaire
  en fonction de ses besoins.

  De plus, en lisant ce HowTo, gardez  l'esprit cette phrase venant du
  DNS-HOWTO de Nicolai Langfeldt janl@math.uio.nl :

  Dans ce document, j'nonce deux ou trois choses qui ne sont pas tout 
  fait vraies (mais qui le sont toujours au moins  moiti). Si je le
  fais, c'est toujours dans le but de rendre les choses plus simples.
  Tout marchera (probablement ;-) trs bien si vous croyez ce que je
  vous dis.


  22..  IInnttrroodduuccttiioonn aauuxx hhaacckkss 11 aauu 33

  par Michael Driscoll fenris@lightspeed.net

  Les trois premiers hacks de ce HowTo servent  maintenir une
  connection PPP constante en redmarrant pppd quand la liaison est
  perdue. J'ai pens au deuxime de ces hacks quand j'ai dmarr Linux,
  mais depuis, j'ai chang pour le troisime qui est quand mme plus
  efficace (et malheureusement plus difficile  mettre en place). Le
  premier hack n'a pas t fait par moi mais par Steve Przepiora
  gearhead@dreamscape.com, et qui est en fait meilleur et plus efficace
  que le second hack (celui que j'ai invent), et est aussi facile 
  mettre en oeuvre...

  Ces trois hacks fonctionnent trs bien avec le hack 4, qui va mettre
  automatiquement votre IP dans un endroit accessible (votre compte e-
  mail sur le serveur POP3 de votre FAI)  chaque fois que votre
  connection est de nouveau tablie. Avec ces deux hacks marchant
  ensemble (reconnection automatique + publication de l'IP par e-mail)
  vous pourrez facilement trouver l'IP dynamique de votre machine
  n'importe ou sur le rseau et tre capable de faire du telnet, ftp,
  etc. vers elle.

  Les mthodes 1 et 2 sont celles qui sont faciles  implmenter,
  puisqu'elles sont fournies avec une recette et tout ce que vous avez 
  faire c'est de suivre les instructions et remplir les blancs. La
  mthode 3 n'est pas fournie avec une recette car elle utilise les
  runlevels et l'init choses qui varient beaucoup d'une distribution 
  l'autre, et peuvent laisser votre machine dans un tat bizarre s'ils
  sont mal configurs.

  Alors, quelle mthode utiliser ? Je suggre la mthode 1, elle est
  facile et plutt efficace, ou si vous avez un peu plus de
  connaissances, jetez un coup d'oeil  la mthode 3 pour voir si vous
  pouvez russir  implmenter cela, puisque c'est la plus efficace. La
  mthode 2 est l parce que c'est la premire que j'ai crite, et parce
  que c'est la seule de ce howto que j'ai test (les autres sont de
  rcentes additions et devraient rapidement remplacer la 2 de toute
  faon).
  Si aucune de ces mthodes ne vous plat, crivez la votre, et envoyez-
  la-moi, je l'inclurais probablement si c'est utilisable par d'autres.

  Bon, maintenant, on passe aux choses srieuses :


  33..  HHaacckk 11 :: GGaarrddeerr vvoottrree ssyyssttmmee ccoonnnneecctt eett aacccceessssiibbllee 2244hh//2244 eett
  77jj//77 ((mmtthhooddee 11))

  par Steve Przepiora gearhead@dreamscape.com


  33..11..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn

  Une configuration PPP qui marche.


  33..22..  iipp--uupp ,, iipp--ddoowwnn ,, eett dd''aauuttrreess ssccrriippttss aassssoorrttiiss

  Bon, alors voici comment je l'ai fait :


  1. Lancez vi (NdT : l'utilisation de vi me parat inutile, un "touch
     /etc/ppp/ppp-check.dat"tant suffisant)  et crez un fichier appel
     /etc/ppp/ppp-check.dat. N'y mettez rien, sauvez le juste.

  2. Mettez au dbut du fichier /usr/sbin/ppp-on :
     echo on > /etc/ppp/ppp-check.dat
     Ceci mettra le mot 'on' int /etc/ppp/ppp-check.dat

  3. Mettez ceci dans /usr/sbin/ppp-off :
     echo off > /etc/ppp/ppp-check.dat

  4. Changez le nom de votre /etc/ppp/ip-down en /etc/ppp/ppp-off-final

  5. Puis sauvez le script suivant dans /etc/ppp/ip-down :






























  ______________________________________________________________________
  #!/bin/sh

  export LOGGING="yes" ## Changez a si vous ne voulez pas l'enregistrer.
  export LOG_STRING=""
  export PPP_CHECK=""

  ## Configuration de base
  PPP_CHECK=`cat /etc/ppp/ppp-check.dat`

  ## PPP a t dconnect -> on l'enregistre
  if [ "$LOGGING" = "yes" ]
   then
     logger -i -p local0.notice -t ppp-check  PPP- Disconnected
  fi

  ## Maintenant, on regarde comment le script a t appel
  if  [ "$PPP_CHECK" = "off" ]
    then
     if [ "$LOGGING" = "yes" ]
       then
       logger -i -p local0.notice -t ppp-check  PPP- Legal disconnect
       logger -i -p local0.notice -t ppp-check  PPP- Turning off NET \
  subsystem
       /etc/ppp/ppp-off-final
     fi
     exit
  fi

  ## Si on a t dconnect -> on recompose le numro
  if [ "$LOGGING" = "yes" ]
    then
     logger -i -p local0.notice -t ppp-check  PPP- Illegal disconnect
     logger -i -p local0.notice -t ppp-check  PPP- Attempting to reconnect
  fi
  /etc/ppp/ppp-off-final
  while test -e /var/run/ppp0.pid && test -e /var/lock/LCK..ttyS3
   do
    sleep 1
  done
    /usr/sbin/ppp-on
  ______________________________________________________________________




  Les tapes 2 et 3 permettent au script de savoir comment la connection
  a t rompue



  44..  HHaacckk 22 :: GGaarrddeerr vvoottrree ssyyssttmmee ccoonnnneecctt eett aacccceessssiibbllee 2244hh//2244 eett
  77jj//77 ((mmtthhooddee 22))

  par Michael Driscoll fenris@lightspeed.net

  Tout d'abord lisez les notes  propos de ce hack dans le chapitre 2.


  44..11..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn

  Pas grand chose. Une configuration PPP qui marche. Un cron qui marche.




  44..22..  MMiissee eenn ppllaaccee dduu ssccrriipptt kkeeeeppaalliivvee..sshh

  44..22..11..  EEnn uuttiilliissaanntt ccrroonnttaabb

  (note : Cette section sera probablement mieux avec diald, voir la
  section suivante)

  cron est un daemon qui lance des programmes  intervalles rguliers.
  Vous pouvez regarder votre crontab en excutant "crontab -e". Nous
  utiliserons crontab pour lancer le programme shell qui gardera la
  connection PPP.

  Lancez "crontab -e" en tant que root et ajoutez la ligne suivante :



       #*/2 * * * * /etc/ppp/keepalive.sh




  Ce que cela fait est de lancer le script /etc/ppp/keepalive.sh toutes
  les deux minutes. (Le # met l'entre en commentaire pour qu'elle ne
  soit pas excute tant que le script n'est pas prt).

  Puis mettez le script suivant appel keepalive.sh dans le rpertoire
  /etc/ppp :



       ______________________________________________________________________
       #!/bin/sh
       if [ -f /var/run/ppp0.pid ] ; then
        ping -c8 -l3 <your nameserver> 2>&1 | grep "0 packets" > /dev/null && \
        { /usr/sbin/ppp-off > /dev/null 2>&1 ; sleep 2 ; /usr/sbin/pppd }
       else
        /usr/sbin/pppd
       fi
       ______________________________________________________________________




  Maintenant tapez chmod 700 /etc/ppp/keepalive.sh en tant que root pour
  qu'il soit excutable.


     CCoonnsseeiill 11 ::
        Vrifiez les chemins ! Pour pppd et ppp-off insrez ce que vous
        utilisez pour lancer et arrter les connections.

     CCoonnsseeiill 22 ::
        J'utilise le serveur de DNS de votre FAI car s'il est en panne,
        votre connection  Internet est hors service de toute faon :-)

     CCoonnsseeiill 33 ::
        Utilisez l'adresse IP numrique de votre serveur de DNS, sinon,
        ping renvoie un message diffrent et le grep ne marchera pas.

  Maintenant, quand vous voulez rester connect, vous avez juste 
  lancer crontab -e et enlever le "#" pour dcommenter l'entre... et
  quand vous voulez rester dconnecter, relancez crontab -e et remettez
  le "#", puis arrtez votre connection avec ppp-off ou ce que vous
  utilisez.


  44..22..22..  UUttiilliissaattiioonn ddiiaalldd   llaa ppllaaccee dduu ccrroonn

  par Divya Mahajan vmahajan@giasdl01.vsnl.net.in

  L'entre crontab que nous venons de faire peut aussi tre faite (et
  probablement plus lgamment) par d'autres programmes, tel diald.
  Cette section explique comment utiliser tt/diald/ pour cette
  utilisation, vous devriez peut tre dcider d'utiliser cette manire.
  J'ai laiss la section avec le crontab pour rfrence et parce qu'il
  ne ncessite aucun package, mais vous voudrez peut-tre utiliser diald
   la place.


  1. Rcuprer la dernire version de diald (cela ne devrais pas tre
     loin de sunsite.unc.edu/pub/Linux/system/Network/serial/)

  2. Compilez le tout. (Vous trouverez peut tre une version compile de
     diald sur un site de la Slackware)

  3. Aprs avoir install diald, vous aurez  modifier /etc/diald.conf,
     ajoutez les lignes suivantes  la fin du fichier :



       ______________________________________________________________________
       > restrict 06:00 19:00 * * *
       > up
          (Ceci forcera  rester connect entre 6 heures et 19 heures tous les jours.
           Si vous voulez rester 24h/24 et 7j/7, supprimez le restrict.)
       > device /dev/modem
          (utilisez le bon priphrique...)
       > dynamic
       > reroute
       > connect-timeout 120
          (Modifiez cela si votre composeur prends plus ou moins de temps pour se
           connecter  votre FAI.)
       > redial-timeout 10
          (Intervalle entre 2 recomposition du numro)
       > defaultroute
       > accounting-log /var/adm/diald.log
          (Garde une trace de la dure de vos connections)
       >connect /path_to_myscript
          (Quand vous utilisez un script pour vous connecter mettez le sur la ligne
           ci dessus. Quand diald appele ce script, les entres et sorties standard
           sont rediriges vers le priphrique (le modem) donc, vrifiez que le
           script n'imprime pas de btises. J'utilise personnellement "/usr/sbin/dip
           mydipfile.dip >> /var/adm/dip.log 2> /var/adm/dip.err" qui enregistre les
           tentatives de connections. Au dpart, vous excuterez peut-tre dip avec
           l'option "-v" pour mettre au point le fichier dip, par exemple : #dip -v
           mydipfile.dip. N'oubliez pas de mettre la ligne "mode ppp" aprs que vous
           soyez connects et que vous ayez lanc les services PPP de votre FAI
           (utilisez dip-3.3.7n-uri). D'autre part, enregistrez tous les paramtres
           PPP dans /etc/ppp/options plutt que de faire confiance  la ligne de
           commande. Ds que votre fichier dip est au point est prt, il est temps de
           l'utiliser. Lancez diald /usr/sbin/diald, si tout s'est bien pass, il
           devrait commencer  se connecter  votre FAI. Quand la liaison PPP est
           close  cause d'un problme de modem, diald ressayera automatiquement.
           Ds que vous pensez que c'est au point, ajoutez /usr/sbin/diald dans votre
           /etc/rc.d/rc.local)
       ______________________________________________________________________




  a y est, vous avez une connection permanente.

  diald est aussi trs bon pour bien d'autres choses, allez jeter un
  coup d'oeil sur la page de diald www.dna.lth.se/~erics/diald.html pour
  quelques exemples.



  55..  HHaacckk 33 :: GGaarrddeerr vvoottrree ssyyssttmmee ccoonnnneecctt eett aacccceessssiibbllee 2244hh//2244 eett
  77jj//77 ((mmtthhooddee 22))

  par Michael Driscoll fenris@lightspeed.net

  Tout d'abord, allez voir les notes  propos de ce hack au chapitre 2.

  Voici la troisime mthode pour rester connect, c'est aussi celle que
  j'utilise. Je ne conseille  personne de l'utiliser  moins de bien en
  comprendre le fonctionnement. S'il y a des morceaux que vous ne
  comprenez pas, je vous suggre d'aller lire :


    man init

    man inittab

    Essential System Administration, par AEleen Frisch
     (Pas vraiment ncessaire, mais a aide  comprendre des trucs,
     comme les runlevels. Je pense que n'importe quel texte parlant des
     runlevels sera suffisant.)


  55..11..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn

  Une configuration PPP qui marche. Un init qui marche (Je pense que
  vous l'avez puisque c'est le programme qui lance tous les process sous
  Unix).


  55..22..  JJoouuoonnss aavveecc lleess rruunnlleevveellss

  Voici comment j'ai mis a en marche. Tout d'abord, j'ai change mon
  inittab et mes scripts rc, chose que je n'avais jamais fait depuis
  l'installation de ma Slackware 3.0, donc, ils ressemblaient  a :




       0) Halt
       1) Un setup mono-utilisateur pas franchement oprationnel
       2) Vide
       3) Vide
       4) xdm (X)
       5) Multi-utilisateur normal (le runlevel par dfaut)
       6) Reboot




  J'ai nettoy a et je les ai refait, et ils ressemblaient  a aprs :









  0) Halt
  1) Mode mono-utilisateur
  2) Multi-utilisateur normal  # Je vais expliquer ces deux la plus tard
  3) Multi-utilisateur normal  (le runlevel par dfaut)
  4) Vide
  5) Vide
  6) Reboot




  Puis, j'ai mis la ligne suivante dans /etc/inittab :



       pu:3:respawn:/usr/sbin/pppd -detach




  Ce que cela fait, c'est de garder pppd en excution quand mon systme
  est dans le runlevel 3, et donc, me reconnecter  chaque dconnection,
  et tuer ma connection quand je passe au runlevel 2. Quand je veux ma
  connection, je repasse dans le runlevel 3, et c'est reparti.

  Le -detach sur la ligne respawn empche pppd de se mettre en tache de
  fond, et donc, faire croire  init qu'il est mort (sinon, init va
  redmarrer pppd une douzaine de fois etc...).

  Pour ceux qui sont intresss par ma configuration exacte, j'ai fait
  un tar de mon /etc/inittab et de /etc/rc.d/* et je les ai mis sur mon
  site  frob.base.org/rc.tar.gz.



  66..  HHaacckk 44 :: EEnnvvooii ddee ll''IIPP ppaarr ee--mmaaiill

  par Michael Driscoll fenris@lightspeed.net

  Ce hack marche trs bien avec les scripts prcdents, car il envoie
  automatiquement votre IP quand elle change, donc, vous pouvez
  facilement trouver la nouvelle adresse de votre machine depuis
  n'importe ou sur le rseau aprs une reconnection.

  Les autres qui font la mme chose (envoi automatique de l'IP) en
  utilisant d'autres moyens sont les 6, 8, 9, 10, 11, 12, et 14 (presque
  la moiti, si on y pense :-).


  66..11..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn

  Juste une configuration PPP qui marche, juste a. Ce hack marche trs
  bien avec les hacks prcdemment dcris, car il vous permet de
  retrouver facilement votre machine aprs qu'elle se soit reconnect et
  que son adresse ai chang.


  66..22..  MMiissee eenn ppllaaccee ddee vvooss iipp--uupp  aanndd iipp--ddoowwnn

  Ce hack rends votre nouvelle IP accessible depuis  peu prs n'importe
  quelle machine sur Internet. Pour russir cet exploit :-) on va
  utiliser deux scripts /etc/ppp/ip-up et /etc/ppp/ip-down, qui sont
  automatiquement appels par pppd quand vous vous
  connectez/dconnectez.


  Crez un fichier (s'il n'existe pas dj) en tant que root appel
  /etc/ppp/ip-up avec dedans :



       ______________________________________________________________________
       #!/bin/sh
       # $4 Est notre nouvelle IP passe par pppd
       # /var/run/add gardera notre adresse
       echo $4 > /var/run/add
       # Envoie notre adresse au serveur mail de notre FAI. avec comme sujet :
       # "Nouvelle adresse  IP"
       mail -s "Nouvelle adresse  IP" votre_nom@votre_adresse < /var/run/add
       ______________________________________________________________________




  Puis crez /etc/ppp/ip-down et mettez-y :



       ______________________________________________________________________
       #!/bin/sh
       rm /var/run/add
       ______________________________________________________________________




  Puis faites un "chmod 700 /etc/ppp/ip-up /etc/ppp/ip-down" pour les
  rendre excutables.

  Voil (En franais dans le texte original :-))  ! Maintenant,  chaque
  fois que pppd dmarre, votre adresse sera envoye au serveur de mail
  de votre FAI. On le rcuprera dans la section suivante.


  66..33..  CCoommmmeenntt rrccuupprreerr vvoottrree nnoouuvveellllee aaddrreessssee IIPP ddeeppuuiiss uunn aauuttrree
  oorrddiinnaatteeuurr ??

  Et bien, cela va demander un peu de rflexion de votre part. Je ne
  puis vraiment pas vous aider  vous en sortir, car cela dpends depuis
  quel type de machine vous de la rcuprer. Depuis Windows, vous pouvez
  essayer de configurer un programme de mail pour rcuprer les mails
  depuis le serveur de votre FAI, et si vous tes sous Unix, allez voir
  s'il n'y aurais pas un programme appel "popclient", ou "fetchmail",
  ou quelque chose de ce style. Si tout cela ne marche pas, vous pouvez
  toujours essayer le telnet (allez jeter un coup d'oeil dans la section
  qui suit).


  66..33..11..  FFaaiirree uunn tteellnneett ssuurr uunn sseerrvveeuurr PPOOPP33

  Voil comment je rcupre mon adresse IP, car je suis rarement chez
  moi quand je fais tout a, et en plus, a impressionne toujours les
  gens  qui je le montre :-) Heureusement, votre FAI utilise un serveur
  POP3 pour le mail (j'espre), sinon, vous allez devoir vous
  dbrouiller par vous mme en parcourant les RFC pour le protocole dont
  vous avez besoin et en trouvant comment le faire par telnet.

  Bon, tout d'abord, vous devez faire un telnet sur le port 110 du
  serveur de mail de votre FAI. Sous Unix, on fait a avec "telnet
  your.mail.server.net 110", sur un VAX/VMS vous devrez faire "telnet
  your.mail.server.net/port=110", et depuis un navigateur Web, vous
  devrez utiliser "telnet://your.mail.server.net:110". Dbrouillez-vous
  :-)

  Ds que vous tes connect, vous devriez voir un truc ressemblant  :



       ______________________________________________________________________
       >Connected to new-ls.lightspeed.net.
       >Escape character is '^]'.

       >+OK QUALCOMM Pop server derived from UCB (version 2.1.4-R3) at
       >new-ls.lightspeed.net starting.

       Tapez "user votre_nom" pour vous loger.

       >+OK Password required for fenris.

       puis "pass votre_password"

       >+OK fenris has 2 message(s) (3030 octets).

       Tapez "list" pour regarder la liste des messages.

       >+OK 2 messages (3030 octets)
       >1 2400
       >2 630
       >.
       ______________________________________________________________________




  Vous voyez le message avec comme taille 630 ? C'est mon adresse IP !
  Comment le sais-je ? Parce que c'est toujours de cette taille :-)

  Tapez "retr numro_du_message" pour rcuprer le message que vous
  voulez.



       ______________________________________________________________________
       >+OK 630 octets
       >Received: from ulfheim.lightspeed.net (avatar@bak2-pp-ls.lightspeed.net
       >[204.216.66.74]) by new-ls.lightspeed.net (8.6.12/8.6.12) with ESMTP id
       >TAA12048 for <fenris@lightspeed.net>; Mon, 22 Apr 1996 19:15:37 -0700
       >Received: (from avatar@localhost) by ulfheim.lightspeed.net (8.7/8.6.9)
       >TAA00594 for fenris@lightspeed.net; Mon, 22 Apr 1996 19:15:29
       >Date: Mon, 22 Apr 1996 19:15:29 -0700
       >From: Deus In Machina <avatar@ulfheim.lightspeed.net>
       >Message-Id: <199604230215.TAA00594@ulfheim.lightspeed.net>
       >To: fenris@lightspeed.net
       >Subject: Nouvelle adresse IP
       >
       >204.216.66.74
       >
       >.
       ______________________________________________________________________




  Et voil ! Faites "dele numro_du_message" pour vous en dbarrasser ou
  juste un "quit" pour le laisser et quitter. Maintenant, faites juste
  un telnet sur votre machine  cette adresse et amusez-vous bien !


  Si tout a ne marche pas, allez jeter un coup d'oeil dans la RFC 1225,
  qui dcris le protocole POP3 en dtail.

  Par la mme occasion, si ce hack ne marche pas car vous avez cron qui
  rcupre votre mail automatiquement, alors, allez voir le hack 10 qui
  utilise procmail pour envoyer votre nouvelle IP  la demande.


  77..  HHaacckk 55 :: CChhaannggeemmeenntt ddyynnaammiiqquuee ddee vvoottrree //eettcc//hhoossttss

  par Michael Driscoll fenris@lightspeed.net

  Comme je l'ai dit plus tt, Linux n'est pas vraiment  l'aise avec les
  changements d'IP. Par exemple, il arrive que votre talkd ne marche pas
  avec quand il y a des choses fantaisistes dans votre /etc/hosts.
  Nanmoins, le hack qui suit s'arrange pour changer votre /etc/hosts
  avec l'adresse IP qu'on reoit  la connection.

  Pour moi, a  rgle les problmes avec "hostname" et "ntalk".


  77..11..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn..

  Juste une configuration PPP qui marche.

  Ce hack est vraiment facile, tout ce que vous avez  faire c'est de
  suivre ce qui est crit et remplir les blancs.


  77..22..  CCrraattiioonn ddeess ppaattrroonnss ddee hhoossttss

  NNOOTTEE :: D'abord, faite une sauvegarde de votre /etc/hosts, juste au cas
  ou plus rien ne marcherais (on ne sait jamais :-). Faites juste "cp
  /etc/hosts /etc/hosts.backup"

  D'abord, nous allons faire nos patrons de fichiers hosts. Le premier
  va s'appeler /etc/hosts-down et va contenir les lignes suivantes :



       ______________________________________________________________________
       127.0.0.1 myhostname.mydomain.net localhost myhostname
       ______________________________________________________________________




  Substituer vvooss hostname et domain names dans ces valeurs. Ce fichier
  est celui qui sera utilis quand vous serez dconnect.

  Le second fichier appel /etc/hosts-up contiendra au moins les lignes
  suivantes :



       ______________________________________________________________________
       127.0.0.1 localhost
       --IP-- myhostname.mydomain.net myhostname
       ______________________________________________________________________




  Comme prcdemment, faites les substitutions de vos hostnames et
  domain names, mais nnee ttoouucchheezz ppaass au "--IP--", car, il servira plus
  tard d'ancre pour faire un remplacement. Si vous ne comprenez pas, ce
  n'est pas grave, sachez simplement que vous tteess censs ne pas toucher
  au "--IP--" l dedans.

  Vous pouvez faire un /etc/hosts-up plus gros si vous le voulez, il
  peut contenir des adresses de machines que vous visitez souvent ou des
  surnoms que vous voulez leur donner. par exemple, mon /etc/hosts-up
  ressemble  a :



       ______________________________________________________________________
       127.0.0.1 localhost
       --IP-- ulfheim.lightspeed.net ulfheim
       136.168.201.9 ultrix6.cs.csubak.edu ultrix ultrix6
       128.214.48.39 linux.cs.helsinki.fi linux
       152.2.254.81 sunsite.unc.edu sunsite
       136.168.1.4 academic.csubak.edu academic
       128.214.248.6 nic.funet.fi ftp.funet.fi funet
       ______________________________________________________________________





  77..33..  EEtt oonn rreettrriippoottee iipp--uupp  eett iipp--ddoowwnn

  Ajoutez la ligne suivante  /etc/ppp/ip-up :



       ______________________________________________________________________
       cat /etc/hosts-up | sed -e s/--IP--/$4/g > /etc/hosts
       ______________________________________________________________________




  Ceci met en place le fichier hosts-up grce  un script sed qui
  substitue le mot "--IP--" par $4, la variable qui contient notre
  nouvelle adresse.

  Puis ajoutez la ligne suivante  /etc/ppp/ip-down :



       ______________________________________________________________________
       cp /etc/hosts-down /etc/hosts
       ______________________________________________________________________




  Cela copie le patron hosts-down vers /etc/hosts.



  88..  HHaacckkss 66  88 :: DDiivveerrss hhaacckkss

  Introduction par Michael Driscoll fenris@lightspeed.net

  Voici un peu de C envoy par Ryan R. Klems rklems@primenet.com
  <mailto:rklems@primenet.com>.

  Il y a trois programmes, le premier mail.c, est un CGI qui scanne
  votre fichier de mail pour trouver votre nouvelle adresse IP donne
  par le hack 1. Ensuite, il utilise l'adresse IP pour mettre en place
  une page qui contient un lien vers cette adresse IP.

  Le second, pppdm.c, peut probablement prendre la place du hack 1, car
  il cherche une connection PPP, redmarre pppd s'il est mort, et envoie
  votre nouvelle adresse au serveur de mail de votre FAI.

  Le troisime, portmsg.c, attends une connection telnet sur un port
  prcis. Ds qu'une connection s'tablis, il va rcuprer votre adresse
  dans votre fichier de mail, et enverra un message la contenant.

  Ces sources auront besoin d'un peu de personnalisation, alors, vous
  feriez mieux de ne pas y toucher si vous ne savez pas ce que vous
  faites :-)

  Oh, oui, et Ryan m'a crit pour me dire que a ne le drangerais pas
  de vous aider  mettre en place ce code chez vous si vous lui demandez
  gentiment :-)


  88..11..  mmaaiill..cc














































  ______________________________________________________________________
  /*
   * mail.c written by Ryan R. Klems (rklems@primenet.com)
   * Copyright 1996, Author releases this source freely, allowing
   * copying and modification, so long as the original copyright notice
   * is maintained.
   *
   * I request that if you use this file you mail me... Thats all I ask =)
   *
   * A CGI for reading through your mailfile and finding an IP
   * address that you had your computer mail to you.
   *
   * Compiling:
   *    gcc mail.c -o mail.cgi
   *
   * Make sure to 'chmod +s mail.cgi' afterwards...must run with set uid
   * bit on to be able to open the mail file.
   */

  #include <stdio.h>
  #include <string.h>
  #define MAILFILE "/var/mail/rklems" /* your mailfile */

  main(void)
  {
    FILE *mail;   /* file pointer for mail file */
    char bob[80], location[80];

    printf("Content-type: text/html\n\n");
    printf("<HTML><HEAD><TITLE>IP Address</TITLE></HEAD>\n");
    printf("<BODY><BASEFONT SIZE=4>\n");
    printf("<H1>IP Address</H1>\n");
    strcpy(bob, "42.**");
    if((mail = fopen(MAILFILE, "r")) == NULL)
      printf("Mail file is empty or does not exist.\n");
    else
    {
      /*
       * loop continues till end of file because you want most recent IP
       * 198.68. is the domain of my ISP, change to yours...
       */
      while(!feof(mail)) /* until reaching EOF, do this */
      {
        fgets(location, 80, mail); /* Grab a line, from mail */
        sscanf(location, "198.68.%s", bob); /* look for domain */
      }
      strcpy(location, "198.68.");
      strcat(location, bob);
      printf("The IP Address of your computer is: %s\n", location);
    }
    printf("</BODY></HTML>\n");
  }
  ______________________________________________________________________





  88..22..  ppppppddmm..cc







  ______________________________________________________________________
  /*
   * pppdm.c created by Ryan R. Klems (rklems@primenet.com)
   *   Released freely by the author to use/modify/copy/reditribute
   *   My only request is that if you use it...mail me and let me know =)
   *
   * This program keeps your link dialed up to an ISP and mails you
   * the newest IP address.  Useful for people with Dynamically allocated
   * IP addresses
   * uses the following files...
   * /root/ip        :   Outputs the IP to this file
   * /root/log       :   If logging is defined
   * /root/pppchat   :   The chat file set up for chat.
   *     My chat file looks like:
   *       ""  ATDT7917777 CONNECT "" "ogin:" "rklems" "assword:" "<password>"
   *  <password> is YOUR password of course (like I'm gonna give you mine ;)
   *  *NOTE* for silent dialing do ATMDT
   *
   *  Compiling...
   *    gcc pppdm.c -o pdm
   *  *NOTE* Don't call it anything like pppdm b/c it looks for pppd
   *  might accidentally kill itself off ;)
   */

  #include <stdio.h>
  #include <stdlib.h>
  #include <unistd.h>
  #include <signal.h>
  #include <time.h>
  #define DOLOG

  void main(void)
  {
    FILE *fin,            /* multiuse file pointer */
         *popen();        /* proto of popen() */
  #ifdef DOLOG
    FILE *log;            /* log file pointer */
  #endif
    char line[80],        /* a line of a file */
         bah[80],         /* just stuff, also used for holding IP addr */
         crap[80],        /* just stuff */
         bob;             /* single char placeholder, not used for anything */
    int j,                /* flag for if a link was found */
        k,                /* flag for if this is a new link */
        pid;              /* pid of pppd process to kill off */
  #ifdef DOLOG
    time_t now;           /* thing for time logging */
  #endif

    for(;;) /* Loop forever... */
    {
      /* look at ifconfig for IP addr */
      if ((fin = popen("ifconfig", "r")) != NULL)
        while(fgets(line, 80, fin) != NULL)
          if(sscanf(line, "ppp0 %s", bah))
          {
            fgets(line, 80, fin);
            sscanf(line, "          inet addr:%15s", bah);
            j=1;
          }
      fclose(fin);
      if (!j) /* no link */
      {
        if((fin = popen("ps -a -x", "r")) == NULL)
        {
          fprintf(stderr, "PPPdm error: cannot open file.\n");
          exit(1);
        }
        /* scan through processes & kill off any zombie pppd processes */
        while(fgets(line, 80, fin) != NULL)
          if (sscanf(line, "%d  ?  %c     %4s pppd%s", &pid, &bob, crap, bah) == 4)
            kill(pid, SIGKILL);
        fclose(fin);
        k=0; /* new dial attempt */
        system("pppd connect 'chat -v -f /root/pppchat'"); /* try again */
  #ifdef DOLOG
        now = time(NULL);
        if ((log = fopen("/root/log", "a")) == NULL)
        {
          fprintf(stderr, "Error in opening log file.\n");
          exit(1);
        }
        fprintf(log, "Initiating ppp-link. %s\n", ctime(&now));
        fclose(log);
  #endif
        sleep(60); /* wait 1 min and check again */
      }
      if(j && !k) /* first time with new address */
      {
        if ((fin = fopen("/root/ip", "w")) == NULL)
        {
          fprintf(stderr, "Error in opening output file.\n");
          exit(1);
        }
        fprintf(fin, "%s\n", bah); /* write out addr */
        fclose(fin);
        /* mail it to yourself */
        system("mail -s IP joker@your.moma.com < /root/ip");
        k=1;
      }
      else /* take a nap and check again when we wake up */
      {
        j = 0;
        sleep(300); /* wait 5 minutes to check again */
      }
    }
  }
  ______________________________________________________________________





  88..33..  ppoorrttmmssgg..cc


















  ______________________________________________________________________
  /*
   * Portmsg.c written by Ryan R. Klems (rklems@primenet.com)
   * Copyright 1996, Author releases this source freely, allowing
   * copying and modification, so long as the original copyright notice
   * is maintained.
   *
   * I request that if you use this program that you mail me.  Thats
   * all I ask.
   *
   * This program sets up a port on a server to accept telnets.  Upon
   * accepting a telnet, the program outputs a message, and then closes
   * the connection.
   *
   * address of message would be xxx.xxx.xxx.xxx yyyy where the x's
   * s the IP number or IP name, and yyyy is the port number set up
   * within this program.
   *
   * Compiling instructions:
   *      Linux : gcc portmsg_gen.c -o <your_file_name>
   *      SunOS : gcc portmsg_gen.c -lsocket -lnsl -o <your_file_name>
   * ***Note***
   *  I don't have access to any other operating systems, so if you
   *  compile this program on an OS I don't have listed, and use
   *  compiler options I didn't mention...please email me =)
   */

  #include <stdlib.h>
  #include <stdio.h>
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <sys/uio.h>
  #include <errno.h>
  #include <netinet/in.h>
  #include <strings.h>
  #include <netdb.h>
  #include <unistd.h>
  #define HOSTNAME "ares" /* hostname of computer */
  #define PORT 3000       /* tcp port to bind to */
  /* #define GETHOSTNAME */ /* uncomment if your server has gethostname() */

  void get_location(void);        /* proto of my mail reading function */
  char location[80];              /* The IP address */

  void main(void)
  {
    struct in_addr host_ip_number;
    struct sockaddr_in host_ip_addr;
    struct sockaddr_in addr;
    char host_name[100];
    struct hostent *hp;
    int s, new_sock;
    int tmp, length;

    /*
     * The server I wrote this for doesn't have gethostname()
     * so, I put in a little fix...
     */
  #ifdef GETHOSTNAME
    gethostname(host_name, sizeof(host_name));
  #else
    strcpy(host_name, HOSTNAME);
  #endif
    hp = gethostbyname(host_name);
    bzero((char *)&host_ip_addr, sizeof(host_ip_addr));
    memcpy((char *)&host_ip_addr.sin_addr, hp->h_addr, hp->h_length);
    host_ip_addr.sin_family = hp->h_addrtype;
    host_ip_number = host_ip_addr.sin_addr;
    host_ip_addr.sin_port = htons(PORT);
    host_ip_addr.sin_addr.s_addr = INADDR_ANY;
    /* open a socket s */
    s = socket(host_ip_addr.sin_family, SOCK_STREAM, 0);
    if ((int)s==-1)
    {
      fprintf(stderr, "Error in opening socket.\n");
      exit(1);
    }
    tmp = 1;
    if(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&tmp, sizeof(tmp))<0)
    {
      fprintf(stderr, "Error in setsockopt.\n");
      exit(1);
    }
    /* bind the socket to the server */
    if (bind(s, (struct sockaddr *)&host_ip_addr, sizeof(host_ip_addr))  == -1)
    {
      if(errno == EADDRINUSE)
      {
        fprintf(stderr, "Socket already bound!\n");
        exit(1);
      }
      else
      {
        fprintf(stderr, "Other error binding socket.\n");
        exit(1);
      }
    }
    /* tell the server to listen to the port */
    if (listen(s, 1) == -1)
  /* 1 is the maximum size of the connection queue */
    {
      fprintf(stderr, "Error in listen.\n");
      exit(1);
    }
   while(1) /* just keep looping */
   {
     length = sizeof(addr);
     /*
      * port has been opened with socket(), bound with bind(), and set
      * active with listen(), now accept() watches the port for
      * connections, it will wait here until it has one...
      * new_sock is the file descriptor for the new socket
      */
     new_sock = accept(s, (struct sockaddr *)&addr, &length);
  /*
   * The function get_location() and the send()'s are what I did to
   * suit my particular needs.  Put your own messages in here...
   */
     get_location();
     /* send just sends a string foo of length strlen(foo) with flags */
     send(new_sock, "Location:\n", 11, 0);
     send(new_sock, location, strlen(location), 0);
     close(new_sock); /* Close connection after message printed */
   }
  }

  void get_location(void)
  {
    FILE *mail;   /* file pointer for mail file */
    char a[80];   /* char array for holding ip addr */

  /*
   * FYI, this just opens my mail file, looks for a line with
   * 198.68.(the domain of my ISP), takes the last part, puts
   * the 198.68. in location, then cats the rest on the end
   */
    strcpy(a, "42.**");
    /* open /var/mail/ryan for read, and check to see there is a file */
    if((mail = fopen("/var/mail/ryan", "r")) == NULL)
    {
      strcpy(location, "Error in obtaining information.\n");
      return;
    }
    else
    {
      while(!feof(mail)) /* until reaching EOF, do this */
      {
        fgets(location, 80, mail); /* Grab a line, from mail */
        sscanf(location, "198.68.%s", a); /* look for domain */
      }
      strcpy(location, "198.68.");
      strcat(location, a);
      /* loops continues till end of file because I want most recent IP */
    }
  }
  ______________________________________________________________________





  99..  EEnnttrreess DDNNSS ddyynnaammiiqquueess

  Si a vous intresse de mettre en place un hack mettant en jeu des
  entres DNS dynamiques (Entres DNS qui changent pour pointer sur
  votre ordinateur quand votre IP change) alors, vous aimerez ces URLs :


  1. www.cfmeu.asn.au/matthew/virtualip.html
     Allez y faire un tour, Matthew a russi  le faire marcher et
     demande  de gnreux volontaires de le tester, pour le
     perfectionner. Ce hack demande d'avoir dj les connaissances d'un
     DNS sur une IP fixe.

  2. ietf.org/internet-drafts/draft-ietf-dnsind-dynDNS-11.txt
     A cette adresse, l'IETF (Internet Engineering Task Force, des gens
     qui mettent en place les futurs protocoles qui seront utiliss sur
     Internet)  donne le papier sur les DNS dynamiques sur lesquels ils
     travaillent et devrais tre lu par tous ceux qui veulent faire un
     pas dans cette direction.

  Pour ceux qui ne {veulent, peuvent} pas s'embarrasser avec des
  dtails, mais qui veulent juste une adresse dynamique mise en place
  sans problmes, allez voir chez DynDNS.com. J'ai entendu dire pas mal
  de bien  propos de ce service, alors, il se pourrait qu'il vous
  intresse. Leur site est  www.dyndns.com, et vous pouvez joindre Gus
  Hurwitz info@dyndns.com pour plus de dtails. Un autre service viens
  d'apparatre, il s'agit de dynip.com, que vous pouvez aller visiter 
  www.dynip.com.


  [De Artur Skawina skawina@usa.net] :
  Un autre projet de DNS dynamique existe  www.ml.org.  Il est
  oprationnel depuis janvier 1997 et marche trs bien.
  Il est trs facile  utiliser : vous avez juste  enregistrer votre
  hostname une fois, ensuite, vous n'avez qu' lancer un "client" 
  chaque fois que vous changez d'IP (Il existe dj plusieurs client
  pour Linux, par exemple : skawina.home.ml.org/mlddc.html). Pour plus
  de dtails sur ce service, allez visiter www.ml.org/dyndns/.



       [Note de l'diteur : Si vous utilisez les services de
       ml.org, Pensez  leur faire une donation pour les remercier
       d'avoir travaille sans relche sur ce projet. Apres tout,
       ils ne sont encore qu'un groupe de copains qui n'ont pas
       beaucoup de moyens et qui font des trucs que l'InterNIC vous
       ferais payer 100 $ pice -- MCD]



  1100..  HHaacckk 99 :: MMeettttrree  jjoouurr vvoottrree ..ppllaann

  par Matthew Nuckolls skawina@usa.net

  Ces deux scripts vous permettent de mettre votre IP dans votre .plan
  sur un serveur distant. Je l'utilise, comme a, mes amis et ma famille
  peuvent voir quand je suis connect, et ou envoyer les ytalk.

  Mettez quelque chose ressemblant 



       ______________________________________________________________________
       /etc/ppp/putip "Y'en a pas, la connection est morte "
       ______________________________________________________________________




  Sur la premire ligne de votre script ppp-off.

  Vous aurez besoin d'un $HOME/.netrc en tat de marche pour que putip
  marche. Le mien ressemble  a :




       ______________________________________________________________________
       machine rocket
       login mnuck
       password <mypassword>
       ______________________________________________________________________




  et est chmod 600

  ip-up:














  ______________________________________________________________________
  #!/bin/sh
  #
  # Assurez-vous que ce fichier est chmod 711
  # puisque le password apparais en clair dedans

  PLANLOC = /home/mnuck/.plan
  REMOTE_USER_NAME = mnuck
  REMOTE_PASSWORD =
  REMOTE_PLANLOC = /afs/umr.edu/users/mnuck/pub/.plan
  REMOTE_SERVER = rocket

  echo "Mon IP dynamique est : " $4 > /tmp/ip.myip

  cat $PLANLOC /tmp/ip.myip > /tmp/plan

  echo $REMOTE_USER_NAME > /tmp/ip.script
  echo $REMOTE_PASSWORD >> /tmp/ip.script
  echo "put /tmp/plan" $REMOTE_PLANLOC >> /tmp/ip.script
  echo "quit" >> /tmp/ip.script

  ftp $REMOTE_SERVER < /tmp/ip.script &> /dev/null

  rm -f /tmp/ip.myip
  rm -f /tmp/ip.script
  rm -f /tmp/plan
  ______________________________________________________________________




  putip:


       ______________________________________________________________________
       #!/bin/sh
       #
       # This script relies on a vaild .netrc file
       #  -see ftp man page for details

       PLANLOC = /home/mnuck/.plan
       REMOTE_PLANLOC = /afs/umr.edu/users/mnuck/pub/.plan
       REMOTE_SERVER = rocket

       echo "Mon IP dynamique est : " $1 > /tmp/ip.myip

       cat $PLANLOC /tmp/ip.myip > /tmp/plan

       echo "put /tmp/plan" $REMOTE_PLANLOC > /tmp/ip.script
       echo "quit" >> /tmp/ip.script

       ftp $REMOTE_SERVER < /tmp/ip.script &> /dev/null

       rm -f /tmp/ip.myip
       rm -f /tmp/ip.script
       rm -f /tmp/plan
       ______________________________________________________________________





  1111..  HHaacckk 1100 :: UUnnee rreecceettttee ssiimmppllee aavveecc pprrooccmmaaiill  ppoouurr rreettrroouuvveerr vvoottrree
  nnoouuvveellllee IIPP


  Par Justin Cragin beyond@lightspeed.net
  Ecrit par Michael Driscoll fenris@lightspeed.net

  En voil un facile, en supposant que vous avez dj le procmail de
  configur. Ce hack a besoin que vous ayez une adresse e-mail ddie 
  a sur internet, au cas ou vous auriez un job cron qui rapatrierais
  votre mail automatiquement.

  host.bogus.net sera le nom de la machine ou vous avez le compte mail
  ou votre IP sera envoye.

  Dans votre .procmailrc, ajoutez la recette suivante :



       ______________________________________________________________________
       :0:
       * ^Subject:.*envoiemonip
       |mail -s "Your new IP" other.mail.address@host.bogus.net < /var/run/add
       ______________________________________________________________________




  Cette adresse e-mail ne doit pas tre rcupre automatiquement par un
  job cron sur votre machine.

  /var/run/add est bien sur le fichier qui contient votre adresse IP,
  souvenez vous du hack 1, si vous n'avez pas utilis ce hack, mettez
  cette ligne dans votre /etc/ppp/ip-up:



       ______________________________________________________________________
       echo $4 > /var/run/add
       ______________________________________________________________________




  Pour utiliser a, envoyer vous un mail depuis n'importe ou sur
  Internet avec comme sujet : "envoiemonip", puis rcuprez le mail sur
  le compte ou sera envoy le mail, et attendez que le job cron chez
  vous rcupre le mail et que le procmail y rponde.

  C'tait trop dur ? Dites-le-moi, j'essayerais d'claircir tout a un
  peu.


  1122..  HHaacckk 1111 :: UUnnee hhoommee ppaaggee ddyynnaammiiqquuee vviiaa ffttpp

  par Michael Driscoll fenris@lightspeed.net

  Voici un hack trs simple qui permet de mettre sa nouvelle IP sur une
  page sur le serveur http de votre FAI. Il ncessite :


    ncftp (A moins que vous russissiez  crire un script qui utilise
     le ftp normal)

    Un accs ftp  votre FAI.

  Vous pouvez voir ce hack en marche  frob.base.org/.

  (J'ai aussi reu des scripts de shadow@indirect.com pour un autre hack
  qui fait pratiquement la mme chose, bien qu'il utilise le ftp normal
  et sont plus complexes. Vous pouvez les trouver  l'adresse
  frob.base.org/contrib.tar.gz).


       NNoottee : une alternative  ce hack (utilisant les CGI) est
       prsente dans le hack 14. C'est pratique pour ceux qui n'ont
       pas d'accs ftp  leur FAI.



  1122..11..  PPoouurrqquuooii jj''uuttiilliisseerraaiiss aa ??


  1. Parce que c'est un hack qui est simple et propre.

  2. Comme a, vos amis et votre famille pourront facilement trouver
     votre IP (Ok, ce n'est peut tre pas une bonne ide :-)

  3. Comme a vous pouvez lancer votre propre httpd, avec vos propres
     CGI (mettre un pointeur http:// sur votre nouvelle IP pour accder
      votre propre httpd

  4. Depuis quand on a besoin d'avoir une raison pour faire quelque
     chose ?


  1122..22..  MMiissee eenn ppllaaccee ddee llaa ppaaggee

  Tout d'abord, vous allez avoir  crire un peu de HTML pour aller sur
  la page du pointeur. Ce n'est pas trop l'objectif de ce HowTo de vous
  apprendre le HTML, alors, vous allez devoir l'apprendre par vous mme.
  Allez jeter un oeil sur w3.org et hoohoo.ncsa.uiuc.edu, ils ont de
  bons manuels de base en ligne. Bon, quand vous crivez les pages,  la
  place de l'adresse de votre machine, on va mettre une ancre
  reconnaissable (je vais utiliser le mot '--IP--' dans cet exemple)
  comme a, on va pouvoir utiliser un script qui remplacera l'ancre par
  l'adresse IP. Par exemple, une page pas mal serais :



       ______________________________________________________________________
       <HTML>
       <HEAD>
       <TITLE>Ceci est la page de l'IP dynamique de Mike Driscoll</TITLE>
       </HEAD>

       <BODY>
       <P>La derni&egrave;re adresse IP connue de ulfheim.lightspeed.net est :
       <P><a href="telnet://--IP--">--IP--</a>
       </BODY>
       </HTML>
       ______________________________________________________________________




  Remarquez que le href et le nom du lien utilis '--IP--', que le
  script va remplacer par votre IP avant l'envoi des pages sur le
  serveur.

  Pour cet exemple, je supposerais que vous avez nomm ce fichier
  /etc/ppp/index.html.




  1122..22..11..  UUnnee nnoottee ssuurr lleess rreeddiirreeccttiioonnss

  par Artur Skawina skawina@usa.net

  Au lieu de juste uploader la page avec votre IP courante, il est
  possible d'envoyer une page qui redirigera tout le monde sur votre
  machine, par exemple, un tag comme a dans la section HEAD d'une de
  vos pages :


  1122..33..  UUttiilliissaattiioonn ddee nnccffttpp  ppoouurr llaa mmiissee  jjoouurr aauuttoommaattiiqquuee ddeess
  ppaaggeess..

  Avant de faire cette partie, on va d'abord regarder quelle version de
  ncftp vous avez. Pour le savoir, excutez ncftp


  Voici deux exemples :



       fenris@ulfheim:~$ ncftp
       1.9.5 (October 29, 1995)
       ncftp>_






       mdriscol@ultrix6:/usr/stu/mdriscol$ ncftp
       NcFTP 2.0.5 (May 1, 1995), by Mike Gleason, NCEMRSoft.
       NcFTP> _




  Suivant la version de ncftp, on va faire tout d'une faon diffrente.
  Si la version est 1.x.x (la mienne est 1.9.5), utilisez la premire
  mthode, si la version est 2.x.x (celle de mon compte  l'cole est
  2.0.5) alors, utilisez la seconde mthode.


  1122..33..11..  nnccffttpp  11..xx..xx

  Maintenant, on va ajouter quelques trucs au .ncftprc de root. Dans le
  mien, j'ai ce qu'il suit :



       ______________________________________________________________________
       #set auto-binary on
       #set recent-list off

       machine Le.serveur.de.votre.FAI
               user Votre_nom_d'utilisateur
               password Votre_mot_de_passe
               macdef init
                       cd /vers/votre/repertoire
                       put /tmp/index.html index.html
                       quit
       ______________________________________________________________________




  Le auto-binary s'assure qu'on sera en mode binaire, le recent-list
  empche le fichier .ncrecent d'tre cre (je ne l'aime pas, c'est
  tout, vous pouvez en avoir un si vous voulez), et la l'entre machine
  dfinit le nom d'utilisateur, le mot de passe, et les actions  faire
  (vous n'aurez peut tre pas besoin du cd, moi, je n'en ai pas besoin,
  puisque le serveur de mon FAI me met automatiquement dans le bon
  rpertoire).


  1122..33..22..  nnccffttpp  22..xx..xx

  par Tomas Jamate tvj@miser.umass.edu


       [NNoottee : J'ai modifi le script de Tomas un peu avant de
       l'inclure dans le HowTo, si je l'ai cass, dites-le-moi ! --
       MCD]


  Voici les fichiers dont je me suis servi pour faire marcher ncftp
  v2.x.x avec le hack 8. Notez que ncftp v2.x.x met tous ses fichiers de
  configuration dans ~/.ncftp. Je ne garantis pas que cela marchera pour
  vous, mais a marche pour moi. Lisez les pages de man si vous voulez
  connatre les autres options de ncftp.

  Premirement, connectez-vous manuellement  votre FAI avec ncftp.



       $ ncftp -u service.provider.com




  Le -u oblige  demander le nom d'utilisateur et le mot de passe. Une
  fois connecte, faites un cd dans le rpertoire ou sont vos pages. Cela
  va crer une entre pour service.provider.com dans le bookmark de
  ncftp. (Je n'aime pas trop les bookmarks, mais h, a marche). Quittez
  ncftp.

  Editez ~/.ncftp/bookmarks. Vous allez voir une entre avec votre nom
  d'utilisateur, vous devrez ajouter le mot de passe juste aprs le nom
  d'utilisateur. a devrait ressembler  :



       NcFTP bookmark-file version: 6
       Number of entries: 1
       service,service.provider.com,Utilisateur,Motdepasse,,/repertoire/de/votre/page,[etc]




  Maintenant crez et diter ~/.ncftp/macros, il devra ressembler  a :



       ______________________________________________________________________
       macro .open.example
       put /tmp/index.html index.html
       exit
       end
       ______________________________________________________________________



  Maintenant, vous pouvez envoyer automatiquement votre page avec :
  "ncftp -L example", le -L force le programme en mode ligne de commande
  oouu
  "ncftp -Lf example", le -f force  recouvrir le fichier existant, pour
  le paranoaque ;-)


  1122..44..  UUnnee rroouuttiinnee ddee rreecchheerrcchhee//rreemmppllaaccee ssiimmppllee aavveecc sseedd

  Maintenant, on va crire la routine sed. Mettez les lignes qui suivent
  dans /etc/ppp/ip-up :



       ______________________________________________________________________
       # On commence le code de l'IP dynamique
       if [ -e /tmp/index.html ]; then
               mv /tmp/index.html /tmp/index.html-`date +%s`
       fi
       cat /etc/ppp/index.html | sed -e s/--IP--/$4/g > /tmp/index.html
       ncftp le.serveur.de.votre.fai > /dev/null 2>&1
       ______________________________________________________________________




  D'abord, on vrifie la prexistence de /tmp/index.html. Un cracker
  pourrait essayer d'exploiter notre utilisation de a pour sortir
  n'importe quel fichier du disque en le liant  /tmp/index.html et en
  attendant que le script soit lanc. Donc, si le fichier existe dj,
  on le sauvegarde gentiment pour que vous puissiez y jeter un coup
  d'oeil plus tard, empchant toutes manipulations frauduleuses...

  Puis, on lance le script sed. Il substitue toutes les occurrences de
  notre ancre '--IP--' avec notre nouvelle adresse IP et envoie le tout
  dans le nouveau index.html dans /tmp. ncftp est alors lance pour
  envoyer notre nouveau /tmp/index.html qui  l'IP actuelle en lui.

  Flicitations, vous l'avez fait, vous avez maintenant une home page
  dynamique que vous pouvez utiliser pour pointer sur votre machine !
  Amusez vous bien en le personnalisant ! ditez juste
  /etc/ppp/index.html, et il sera mis  jour la prochaine fois que vous
  vous connectez  votre FAI.



  1133..  HHaacckk 1122 :: EEnnvvooyyeezz uunn mmeessssaaggee ssuurr vvoottrree ppaaggeerr aavveecc vvoottrree nnoouuvveellllee
  aaddrreessssee IIPP

  par Michael Driscoll fenris@lightspeed.net

  Voici un joli hack qui ne sera probablement utilis par personne. Il
  requiert d'utiliser un programme pour faire composer  votre modem le
  numro de votre pager et lui envoie votre nouvelle IP. Il requiert :


    un modem (La vitesse n'est pas importante puisqu'on ne va faire que
     composer un numro [Vous n'tes pas super content d'avoir garde
     votre modem  300bps ? :-) ])

    Une ligne tlphonique supplmentaire (elle n'a pas besoin d'tre
     ddie, et heureusement, vous avez un modem qui abandonnera s'il y
     a dj une conversation sur la ligne (Je pense que c'est quelque
     chose qu'il faudra que vous vrifiiez, quelques modems sont un peu
     brutaux avec a (NdT : Je confirme, mon modem Olitec si il ne
     trouve pas la tonalit raccroche la ligne, redcroche, et ce tant
     qu'il n'a pas la tonalit :-() .

    Un pager ordinaire

    Un programme pour composer le numro


  1133..11..  LLee pprrooggrraammmmee qquuii ccoommppoossee llee nnuummrroo

  Pour ce hack, vous allez avoir besoin d'un programme qui sait composer
  depuis la ligne de commande. Pour l'exemple suivant, j'utilise 'modem-
  stats' par Kenneth J. Hendrickson kjh@usc.edu, qui peut tre trouv 
  sunsite.unc.edu/pub/Linux/apps/comm/modem-stats.tar.gz ou pas loin.

  J'imagine que d'autres programmes seraient tout  fait capables de
  faire la mme chose.


  1133..22..  AAppppeell ddeeppuuiiss iipp--uupp

  On va mettre les lignes suivantes dans /etc/ppp/ip-up :



       ______________________________________________________________________
       #On spare $4 (l'adresse IP) en quatre morceaux
       part1=`echo $4 | cut -f1 -d.`
       part2=`echo $4 | cut -f2 -d.`
       part3=`echo $4 | cut -f3 -d.`
       part4=`echo $4 | cut -f4 -d.`
       #On lance le programme
       /usr/sbin/modem-stats -c 'atz' /dev/cua2
       /usr/sbin/modem-stats -c 'ats7=15' /dev/cua2
       /usr/sbin/modem-stats \
        -c 'atdt6384658,,,'${part1}'*'${part2}'*'${part3}'*'${part4} /dev/cua2
       ______________________________________________________________________




  Explications :

  Le atz initialise le modem, le ats7=15 rgle le temps d'attente pour
  la porteuse, les ','s sont des pauses, les '*'s sont utilises pour
  remplacer les - (c'est ce que a fait sur mon pager en tout cas,
  esprons qu'il en sera de mme pour le votre).

  Oh, oui, vous aurez srement de meilleurs rsultats si vous mettez
  vvoottrree numro de pager  la place de 638-4658, car, c'est mmoonn numro de
  pager :-), de plus, remplacez /dev/cua2 par le nom de votre modem.

  Flicitations, vous avez russi !



  1144..  HHaacckk 1133 :: llooggiinnss xxtteerrmm   ttrraavveerrss uunn ffiirreewwaallll

  par Brad Baker bpb@mlb.cca.rockwell.com


       [Note de l'diteur : Comme l'auteur de ce hack le dit judi
       cieusement, ce hack peut avoir des problmes de scurit,
       comme la possibilit d'un vol de mot de passe ou d'ouvrir
       une brche dans la scurit du firewall  cause d'un login 
       l'extrieur de votre rseau local. Ce hack est inclus plus
       pour sa valeur que pour son utilit. Je ne vous conseille
  pas de l'utiliser  moins que vous soyez l'administrateur
  systme de ce rseau ou que vous soyez en trs bons termes
  avec lui ou elle :-) -- MCD]


  Voici un autre hack que vous pouvez essayer. Il marche, et je ne suis
  pas sr des risques de scurit, mais il est trs amusant.

  Cela serait sympa de pouvoir accder  ma machine de travail (une
  station Sun) depuis chez moi, et rciproquement, le problme est que
  le telnet est bloqu par le firewall au bureau. Voici une faon de le
  contourner.

  Pour cet exemple, je vais donner la faon d'accder  ma station Sun
  (au travail) depuis chez moi avec Linux, avec une connection PPP  mon
  FAI et une IP dynamique.



  >Chez moi, quand je veux accder  ma machine de travail, je me
  connecte et je lance X, je tape "xhost +", je trouve mon IP dynamique
  et je l'envoie  mon travail dans un e-mail avec un format
  particulier. Sur ma machine de travail, j'ai un script procmail qui
  lis les mails dont le sujet est spcial, disons "X-W". Si le texte du
  message  un format dfini, alors, l'IP est extraite du message, et il
  lance un xterm qui s'affiche directement chez moi comme a :



            xterm -display l.ip.que.j.ai.envoye:0.0 -e login




  Voila ! En  peu prs 30 secondes  une minute, j'ai un cran de login
  qui apparat chez moi ! Je n'ai pas essay d'aller dans l'autre
  direction car l'ordinateur de la maison n'est pas tout le temps
  connect, mais il devrait tre possible de faire la mme chose.

  Je suis assez proccup par les problmes de scurit, et je l'ai mis
  hors service pour l'instant jusqu' ce que j'en apprenne plus. Quand
  le xterm apparat, il donne un prompt de login, et je ne sais pas
  comment le Secure Keyboard (Clavier scuris, il permet d'empcher la
  rcupration de ce qui est tap)  marche dans un xterm. De plus, je ne
  suis pas sur des scurits fournies par X. Je suis plus proccup par
  le xterm apparaissant  une mauvaise IP ou sur une IP que je viens de
  quitter d  une dconnection, mais bon, la majorit des utilisateurs
  utilisent Windows, et l'accs X sera simplement ignor.

  D'autres scurits pourraient tre ajoutes en encryptant l'IP dans le
  mail avec PGP ou une encryption classique et de restreindre l'IP  un
  certain nombre, mais mon FAI refuse de me donner ce nombre.

  Voici le script .procmailrc, le script et un exemple de message mail
  que j'ai utilis pour tester (disons que 111.222.333.444 est l'IP
  dynamique).

  Le morceau de ~/.procmailrc








  ______________________________________________________________________
  :
  ^Subject: X-W
  | cat | $HOME/scripts/send_xterm
  ______________________________________________________________________




  ~/scripts/send_xterm



       ______________________________________________________________________
       #!/bin/sh
       XX=`cat $1 | grep "^IP: .*" | sed "s/IP: \(.*\)/\1/"`
       XX=`echo $XX | perl -e '$_ = <>; s/[^0123456789.]//g; print'`
       xterm -display $XX -e login &
       ______________________________________________________________________




  Exemple de message



       ______________________________________________________________________
       To: bpb@my.machine.com
       Subject: X-W

       IP: 111.222.333.444:0.0
       ______________________________________________________________________




  Vous pouvez essayer sur votre propre machine en vous envoyant un mail
   vous-mme (aprs avoir installe send_xterm et la rgle .procmailrc
  en interne bien sur).


  1155..  HHaacckk 1144 :: HHoommee ppaaggee ddyynnaammiiqquuee vviiaa uunn CCGGII

  par Michael Driscoll fenris@lightspeed.net

  Ce hack est similaire au hack 11, mais il diffre en la mthode
  employe. Alors que le hack 11 implique l'utilisation d'un accs ftp
  vers le serveur http de votre FAI pour mettre  jour la page, celui ci
  accde  un CGI sur le serveur pour mettre en place la page elle-mme.

  Pour utiliser ce script, vous allez devoir convaincre votre
  l'administrateur de votre FAI de mettre ce CGI sur le serveur. Il est
  tout  fait possible qu'ils vous demandent de l'argent pour vrifier
  la scurit de ce script, puisque cela va leur demander du temps, et
  c'est pour eux l'assurance que le script ne prsentera pas de risques
  une fois mis en place (je vais faire de mon mieux pour qu'il soit le
  plus 'sr' possible). Par exemple, mon FAI (lightspeed.net) me demande
  $50 par script pour le vrifier.

  AAtttteennttiioonn : Non seulement ce script est totalement nouveau et
  (largement) non test, mais en plus, je l'cris  3 heures du matin
  car je n'ai pas envie de faire ma philosophie. Si vous ne connaissez
  rien aux CGI ni comment les rendre sr, alors, je vous suggre
  d'attendre que les quelques bugs soient retirs avant de l'envoyer 
  votre pauvre administrateur systme.
  NNoottee : Bon, cela fait maintenant deux mois que j'ai crit ce message,
  et je n'ai rien entendu  propos de la scurit de ce CGI, ni pour, ni
  contre. Alors, soit-il eesstt sur et personne ne me l'a fait savoir, soit
  personne ne l'utilise :-) Par consquent, je vous conseille de faire
  attention.


  1155..11..  VVooiill ccee qquuee ll''oonn vvaa ffaaiirree..

  A la base, tout ce que vous avez  faire, c'est de prendre le script
  et de remplir quelques endroits.

  Dans le script, on va essayer de :


    Rcuprer un paramtre appel newip=, en s'assurant que c'est une
     IP qui convient.

    Rcuprer un paramtre appel password= ce qui est une ttrrss
     mauvaise scurit pour s'assurer que personne ne pourra utiliser le
     script pour mettre sa propre IP (Note : je sais que ce n'est pas
     100% efficace, mais bon, a ne devrais pas tre ttrroopp grave, et cela
     ne pourra rien dtruire, et puis il y aura les logs du serveur pour
     savoir qui a accd  la page...)

    Confronter les $REMOTE_HOST et $REMOTE_ADDR du CGI avec votre nom
     de domaine pour tre sur que c'est une requte locale.

    Et enfin, si tout marche, mettre en place la page...


  1155..22..  LLee ssccrriipptt (( ddyynniipp..ppll ))


































  ______________________________________________________________________
  #!/usr/bin/perl
  # Ecrit par Michael Driscoll <fenris@lightspeed.net>
  # Les suggestions sont les bienvenues

  require 5; # Requiert perl5
  use CGI; # Ceci est le module CGI.pm, disponible sur tous les sites CPAN tels
           # ftp://ftp.cdrom.com/pub/perl/CPAN/modules/by-module/CGI

  # Remplir les trucs qui suivent
  $givendomain = "domain.net";               # Mettez le domaine de votre FAI
                                             # (Pour l'instant, ce sont les deux
                                             # premires parties, mais cela peut
                                             # tre change en dessous avec le
                                             # split())
  $givenpassword = "potrzebie";              # Mettez le mot de passe  utiliser
  $filename = "/some/path/to/my/index.html"; # Demandez  votre admin de mettre
                                             # ici la page  mettre  jour
                                             # Note  l'administrateur :
                                             # le fichier devra avoir les
                                             # droits en criture pour l'uid
                                             # de httpd,  moins que vous
                                             # utilisiez la mthode suid
                                             # d'Apache ou un autre truc
                                             # (mais c'est pas recommand)

  # Ce qui suit joue avec les IP en utilisant la forme aaa.bbb.ccc.ddd
  $higha = "255"; # Mettez ici le plus grand numro de la partie aaa
                  # de votre FAI.
  $lowa = "0";    # De mme pour le plus petit numro de la partie aaa.
                  # probablement la mme que $higha vu que la majorit des
                  # FAI ne prennent pas plus qu'un domaine de classe A :-)
  $highb = "255"; # Mettez la borne suprieure pour bbb.
  $lowb = "0";    # La borne infrieure de bbb.
  $highc = "255"; # Vous avez compris.
  $lowc = "0";    #
  $highd = "255"; #
  $lowd = "0";    #

  # on fait un lien entre $query et le module cgi.pm
  $query = new CGI;

  # $newip est la nouvelle IP du paramtre newip
  $newip = $query->param("newip");

  # $trypassword est la tentative de mot de passe  confronter avec $givenpassword
  $trypassword = $query->param("password");

  # $hostname est le nom d'hote  confronter avec $givendomain
  $hostname = $query->remote_host;

  # Verifier le mot de passe avant tout
  unless ("$trypassword" eq "$givenpassword") {
          print "Content-type: text/plain\n\n";
          print "Sorry, wrong password\n";
          exit;
  }

  # On dcoupe l'IP dans @IP
  # On vire d'abord les caractres non numriques sauf le '.'
  # on le splice() pour supprimer les trucs aprs les quatre premier points
  # (Comment c'est arriv l ??  De toute faon, j'essaye de le rendre aussi
  # peu craquable que possible).
  $newip =~ s/[^\d\.]//g;
  @IP = split /\./, $newip;
  splice(@IP, 4);
  # On vrifie que l'IP est dans les bornes
  unless (($lowa <= $IP[0]) &&
          ($lowb <= $IP[1]) &&
          ($lowc <= $IP[2]) &&
          ($lowd <= $IP[3]) &&
          ($higha >= $IP[0]) &&
          ($highb >= $IP[1]) &&
          ($highc >= $IP[2]) &&
          ($highd >= $IP[3])) {
          print "Content-type: text/plain\n\n";
          print "Sorry, that IP address doesn't seem to be within bounds\n";
          exit;
  }

  # Maintenant, on vrifie le nom de l'hte
  # On le dcoupe dans @hostnamearray
  @hostnamearray = split /\./, $hostname;
  $dompart2 = pop @hostnamearray;
  $dompart1 = pop @hostnamearray;

  # On le vrifie
  unless (("$dompart1"."\.$dompart2" eq "$givendomain") ||
          ("$hostname" eq "localhost")) {
  # On affiche une erreur
          print "Content-type: text/plain\n\n";
          print "Sorry, you don't seem to have the right domain\n";
          exit;
  }

  # Tout  l'air d'tre OK, on va donc mettre en place la page
  # Prenez garde aux trucs dans le style de #, \, $, @, %, et '

  open(FILE, ">$filename") ||
          die "dynip.pl cannot open $filename to write: $!";
  flock(FILE, 2);

  # Ici commence le HTML. $newip est notre nouvelle adresse IP.
  print FILE "<html><head><title>Title etc.</title></head>\n\n";

  print FILE "<body><h1>body here</h1><hr>\n";
  print FILE "<p>blah blah blah\n";

  print FILE "<p>And <a href=telnet://$newip>here</a> is a link to my ";
  print FILE "current IP address.\n";

  print FILE "</body></html>\n";
  flock(FILE, 8);
  close(FILE);

  # On dit que tout s'est bien pass
  print "Content-type: text/plain\n\n";

  print "Setup was successful\n";

  # Fin
  ______________________________________________________________________




  Accder au CGI quand la connection s'tablis

  Maintenant, tout ce que nous avons  faire est y accder avec lynx
  dans notre /etc/ppp/ip-up. La ligne suivante devrait le faire,
  utilisant le $4 de /etc/ppp/ip-up comme nouvelle IP :

       ______________________________________________________________________
       lynx -dump \
       >> /etc/ppp/lynxlog
       ______________________________________________________________________




  Mettez le mot de passe que vous avez choisis  la place de
  'potrzebie', bien sur. Et assurez-vous de bien faire chmod 700
  /etc/ppp/ip-up quand c'est Ok, car il y a des informations sensibles
  dedans.

  (Au fait, les \ sont juste utiliss pour que la commande tienne en 80
  colonnes. Ils ne font qu'escaper les retours  la ligne pour que ce
  soit considr comme une seule commande)

  De plus, videz priodiquement le /etc/ppp/lynxlog sinon, il va tre
  trs gros aprs quelque temps :-)

  Voil... C'est fait !


  1166..  HHaacckk 1155 :: SSuuggggeessttiioonn ppoouurr lleess rrcc..**

  par Jeremy D. Impson jdimpson@camelot.syr.edu
  cris par Michael Driscoll fenris@lightspeed.net

  Jusqu'ici, ce HowTo avais pleins de morceaux d'instructions disperses
  dans plein de fichiers avec des morceaux dans les /etc/ppp/ip-down ou
  les rc.*, qui devaient tre excuts quand le systme plantait et que
  la connection PPP tais toujours l. Jeremy m'a suggr de lancer
  /etc/ppp/ip-down au dmarrage plutt que de le recopier petit  petit
  dans les rc.*. Bien sur, il faut s'assurer que les commandes dans
  /etc/ppp/ip-down ont un sens au dmarrage, et ne s'appuient pas sur
  des paramtres passs par pppd (si c'est le cas, vous pouvez toujours
  crire une fausse ligne de commande), il n'y a qu' ajouter la ligne
  suivante dans le rc de votre choix :



       ______________________________________________________________________
       # Excute /etc/ppp/ip-down si pppd n'a pas t arrte proprement
       if [ -f /var/run/ppp?.pid ]; then
               /etc/ppp/ip-down
       fi
       ______________________________________________________________________




  Un mot de Jeremy : Ce petit truc ne sera pas utile dans chaque
  situation, mais il l'est pour moi, et il le sera peut tre pour vous

  Merci Jeremy !


  1177..  HHaacckk 1166 :: EEmmppcchheerr lleess ttiimmee--oouutt iimmppoossss ppaarr vvoottrree FFAAII aavveecc uunn
  ppiinngg

  par Artur Skawina skawina@usa.net


       [Note de l'diteur : Comme Arthur le dit, celui ci peut
       aller trop loin, et peut rellement avoir un impact sur
       votre FAI s'ils sont un peu justes dans le nombre de leurs
  lignes. Si vous faites ceci et que votre FAI vous demande de
  l'enlever, vous devriez srieusement penser  dpenser un
  peu plus d'argent pour acheter un modem  votre FAI, ce qui
  vous fournira certainement une IP fixe, rendant ce HowTo
  inutile :-) -- MCD]


  Pour garder une connection rtc, il est parfois ncessaire de s'assurer
  que la connection n'est pas inactive pendant de longues priodes.
  Certains FAI vous dconnectent automatiquement s'il n'y a pas de
  trafic, et certains modems ont aussi la possibilit de mettre fin 
  une connection inactive. Alors qu'il est simple de reconfigurer votre
  modem, cela risque d'tre dur, voir impossible de convaincre votre FAI
  de faire la mme chose (Ils n'aiment pas les gens utilisent leurs
  ressources 24h par jours).

  La solution ? Ajoutez la ligne suivante  votre script ip-up :



       ______________________________________________________________________
       ping <une_machine> -i 180 &
       ______________________________________________________________________




  Ou <une_machine> peut tre le serveur DNS principal de votre FAI ou
  autre chose...

  Pour changer la dconnection automatique des modems, il va falloir
  regarder dans la documentation du modem. Par exemple, sur les modems 
  base de CirrusLogic, c'est ATS90=0



  1188..  HHaacckk 1177 :: UUttiilliissaattiioonn ddeess SSSSII ppoouurr rreettrroouuvveerr ssoonn IIPP

  par Dale Jolliff taftbbs@e-tex.com

  Ceci n'est pas spcialement pour Linux, mais pour n'importe quoi, et
  vous n'avez pas  faire des modifications. Il requiert nanmoins que
  votre FAI autorise les SSI (Server Side Includes : directives que le
  serveur http remplace par leur rsultat)  dans vos pages.

  Il y a un exemple  www.e-tex.com/personal/taftbbs/onlinecheck.shtml.
  Allez y jeter un coup d'oeil... ;>

  Vous allez avoir  connatre certaines choses  propos de votre FAI :


    Le nom (ou l'IP) du routeur sur lequel vous vous loggez

    La "gateway" et votre propre nom d'utilisateur, vous pouvez les
     rcuprer avec la commande "ifconfig", c'est l'IP qui n'est pas
     votre machine... pour les utilisateurs de Windows, Trumpet Winsock
     a un "default gateway",  et pour les utilisateurs de Win95, c'est
     dans le coin de la configuration TCP/IP.

  La partie la plus complique est que votre FAI vous laisse avoir votre
  "home page" -- C'est ce que font tous les FAI de nos jours. S'ils ne
  sont pas assez pointus pour limiter l'excution des CGI et des SSI, et
  y'a mme mieux... Mon FAI autorise les SSI, mais pas l'excution des
  CGI (bien sur, si vous pouvez faire des SSI, vous pouvez faire des
  CGI... il faut juste les appeler autrement).

  J'ai enlev tous les trucs inutiles, laissant juste la partie critique
  pour que a marche...

  Ajoutez ces lignes sur une page SSI (d'habitude, l'extension est
  ".shtml" pour la majorit des serveurs) :

  david5.e-tex.com est le routeur sur lequel je me logge quand je me
  connecte  mon FAI...
  taftbbs est mon nom d'utilisateur sur leur systme
  Voici donc une ligne  mettre dans une page...



       ______________________________________________________________________
       <pre><!--#exec cmd="finger @david5.e-tex.com | grep taftbbs"--></pre>
       ______________________________________________________________________






       ______________________________________________________________________
       <a href="http://<!--#exec cmd="finger @david5.e-tex.com | grep taftbbs |
       cut -c '66-'"-->">Click here to see if you can see anything!</a>
       ______________________________________________________________________




  La ligne ci dessus va faire un lien qui s'affichera sur la page.
  Faites un finger sur votre routeur, et regardez la sortie, le "cut -c
  '66-'" sera diffrent suivant le routeur. Si vous avez des comptes sur
  plusieurs FAI, et comme il semble que tous aient des routeurs
  diffrents, et chacun aura un format diffrent quand vous aller faire
  un finger dessus.

  Une petite explication de ce qui se passe :

  <a href="http://   <--Une ancre HTML standard

  <!--#exec cmd=" <-- Voici la commande  SSI. Cela signifie que ce sera
  lu et excut par le serveur avant de vous tre envoy. Donc, mme si
  vous regardez la source de la page depuis votre navigateur, vous ne
  verrez pas a, mais juste le rsultat de la commande.



       finger @david5.e-tex.com | grep taftbbs | cut -c '66-'




  Voil ce qui est excut. On fait un finger sur le routeur, on ne
  garde que le bon utilisateur, et on coupe tout sauf l'IP, ce qui sur
  le routeur que j'utilise commence  la colonne 66, jusqu' la fin de
  la ligne... Cela peut tre totalement diffrent pour les autres.



       "-->





  Et puis on ferme la commande SSI proprement, sinon, a ne marchera
  pas... Faites attention  la faon d'utiliser les apostrophes et les
  guillemets, il est trs facile de faire une erreur, jouez un peu avec,
  vous verrez.



       ">Click here to see if you can see anything!</a>




  Et bien sur, on ferme le lien HTML, et on met un texte cliquable.


  SS..  OOnn aa bbeessooiinn dd''aauuttrree hhaacckkss !!

  Si vous avez un hack concernant les IP dynamiques et que vous voudriez
  contribuer  ce HowTo, contactez moi. Attention, si vous faites a, il
  aura  tre couvert par le copyright de la section 1.7, pour des
  raisons de publications...

  Si vous {avez aim ce HowTo, dtest ce HowTo, pens que ce HowTo
  tais trop confus, trouv quelque chose ici qui ne marche pas ou qui
  est totalement faux, voulez m'envoyer un mail, ne voulez pas m'envoyer
  un mail, trouv un problme de scurit, etc} alors, s'il vous plat,
  envoyez un moi un e-mail  fenris@lightspeed.net. Je le pense,
  j'aimerais avoir nn''iimmppoorrttee qquueell retour sur ce HowTo, mme pour me dire
  que vous l'avez juste lu !

  Vraiment ! Envoyez-moi un e-mail pour n'importe quoi ! J'adore
  rreelllleemmeenntt recevoir des e-mails !

  Les remarques ngatives nn''iirroonntt ppaass vers /dev/null. Car je pense que
  si vous en tes  ce point, je ferais mieux de vous couter.

  Si vous crivez un chapitre pour ce HowTo, non seulement vous aiderez
  la communaut Linux, mais vous recevrez tous les honneurs  la fin de
  ce HowTo, vous serez remerci comme contributeur au dbut de ce HowTo,
  vos ides seront archives sur presque toutes les distributions de
  Linux  travers le monde, vous serez envis de vos pairs, etc.


  TT..  CCRRDDIITTSS

  _(_P_a_r _o_r_d_r_e _d_'_a_p_p_a_r_e_n_c_e_)

  MMiicchhaaeell DDrriissccoollll ffeennrriiss@@lliigghhttssppeeeedd..nneett

  CChhrriissttiiaann GG.. WWaarrddeenn ccwwaarrddeenn@@lloooopp..ccoomm

  JJuussttiinn CCrraaggiinn bbeeyyoonndd@@lliigghhttssppeeeedd..nneett

  sshhaaddooww@@iinnddiirreecctt..ccoomm

  AAjjiitt DDeesshhppaannddee aaddeesshhppaann@@ddddtt..eenngg..uucc..eedduu

  DDiivvyyaa MMaahhaajjaann vvmmaahhaajjaann@@ggiiaassddll0011..vvssnnll..nneett..iinn

  RRyyaann KKlleemmss rrkklleemmss@@pprriimmeenneett..ccoomm

  MMaatttthheeww DDrriivveerr mmddrriivveerr@@ccffmmeeuu..aassnn..aauu

  MMaatttthheeww NNuucckkoollllss mmnnuucckk@@uummrr..eedduu


  SSccootttt JJoohhnnssttoonn ssjj@@ooddiinn..iiaacc..nneett

  BBrraadd BBaakkeerr bbppbb@@mmllbb..ccccaa..rroocckkwweellll..ccoomm

  CChhrriissttiiaann HHaarrddmmeeiieerr 110011550022..11552211@@ccoommppuusseerrvvee..ccoomm

  JJuussttiinn ((GGuuss)) HHuurrwwiittzz hhuurrwwiittzz@@ddyynnddnnss..ccoomm

  TToommaass JJaammaattee ttvvjj@@mmiisseerr..uummaassss..eedduu

  JJeerreemmyy DD.. IImmppssoonn jjddiimmppssoonn@@ccaammeelloott..ssyyrr..eedduu

  SStteevvee PPrrzzeeppiioorraa ggeeaarrhheeaadd@@ddrreeaammssccaappee..ccoomm

  WWhhiitt BBllaauuvveelltt wwhhiitt@@ttrraannssppeecctt..ccoomm

  PPaauull CC.. RRiicchhaarrdd ppccrriicchhaa@@ccss..ccoonnccoorrddiiaa..ccaa

  PPeerr SSjjoohhoollmm SSooiillee..KKaaaassiillaa@@sstthh..ffrroonntteecc..ssee

  BBiillll DDuunnccaann bbdduunnccaann@@bbeeaacchhnneett..oorrgg

  AArrttuurr SSkkaawwiinnaa sskkaawwiinnaa@@uussaa..nneett

  SSccootttt DDiieerr -- DDiiEEMMaaNN ssddiieerr@@iissdd..nneett

  DDaallee JJoolllliiffff ttaaffttbbbbss@@ee--tteexx..ccoomm

  BBrryyaann RRiittttmmeeyyeerr bbrryyaannrr@@ffllaasshh..nneett

  MMaarreekk KKuubbiittaa kkuubbiittoovvii@@mmbbooxx..llaannttaanneett..cczz



































  Linux Ext2fs Undeletion mini-HOWTO
  Aaron Crane, aaronc@pobox.com
  v1.3, 2 Fvrier 1999

  (Adaptation franaise par Miodrag Vallat <mailto:miodrag@multima
  nia.com>, anciennement par Graud Canet <mailto:canet@labri.u-bor
  deaux.fr> et Sylviane Regnault <mailto:regnault@axpcalc.crpp.u-bor
  deaux.fr>).  Imaginez un peu. Vous avez pass les trois derniers jours
  sans dormir, sans manger, sans mme prendre une douche.  Votre
  bidouillomanie compulsive a enfin port ses fruits : vous avez achev
  ce programme qui vous apportera gloire et admiration du monde entier.
  Allez, plus qu' archiver tout a et l'envoyer  Metalab.  Ah, et puis
  virer toutes ces sauvegardes automatiques d'Emacs.  Alors vous tapez
  rm * ~.  Et, trop tard, vous remarquez l'espace en trop.  Vous avez
  dtruit votre _o_e_u_v_r_e _m_a__t_r_e_s_s_e !  Mais, heureusement, vous avez de
  l'aide  porte de main.  Ce document prsente une discussion de la
  rcupration de fichiers supprims depuis le Second systme de
  fichiers tendu ext2fs.  Esprez, peut-tre pourrez-vous distribuer
  votre programme malgr tout...
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Historique des rvisions
        1.1.1 Nouveauts de la version 1.1
        1.1.2 Nouveauts de la version 1.2
        1.1.3 Nouveauts de la version 1.3
     1.2 O trouver ce document

  2. Comment ne pas supprimer de fichiers

  3.  quel taux de rcupration puis-je m'attendre ?

  4. Bon, alors comment je rcupre un fichier ?

  5. Dmonter le systme de fichiers

  6. Prparer la modification directe des inodes

  7. Prparer l'criture  un autre endroit

  8. Trouver les inodes supprims

  9. Obtenir des dtails sur les inodes

  10. Rcuprer les blocs de donnes

     10.1 Les fichiers courts
     10.2 Les fichiers plus longs

  11. Modifier les inodes directement

  12. Cela va-t-il se simplifier dans l'avenir ?

  13. Existe-t-il des outils qui automatisent le processus ?

  14. Achev d'imprimer...

  15. Remerciements et bibliographie

  16. Bla-bla juridique


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce mini-HOWTO tente de fournir un certain nombre de conseils dans le
  but de rcuprer des fichiers supprims depuis un systme de fichiers
  ext2fs. Il contient galement une petite discussion sur les manires
  de commencer par viter de supprimer des fichiers.

  Mon but est naturellement d'en faire une rfrence utile  tous ceux
  qui ont eu un, disons... accident avec rm ; mais cependant je souhaite
  que les gens le lisent de toute faon.  On ne sait jamais : un jour,
  les renseignements donns ici pourraient vous sauver la couenne.

  La lecture de ce texte suppose un minimum de connaissances sur les
  systmes de fichiers Unix ; je me suis cependant efforc de le rendre
  accessible  la plupart des utilisateurs de Linux. Si vous tes un
  grand dbutant, je crains que la rcupration de fichiers sous Linux
  _e_x_i_g_e certaines connaissances techniques, ainsi que de la
  persvrance, au moins dans l'tat actuel des choses.

  Il vous sera impossible de rcuprer des fichiers supprims depuis un
  systme de fichiers ext2 sans au moins un accs en lecture au
  priphrique (fichier spcial) sur lequel le fichier tait plac. En
  gnral, cela signifie que vous devez tre _r_o_o_t, mais plusieurs
  distributions (comme Debian GNU/Linux) disposent d'un groupe disk dont
  les membres ont ces accs.  Vous aurez galement besoin de la commande
  debugfs, du paquetage e2fsprogs, qui devrait avoir t install par
  votre distribution.

  Pourquoi ai-je crit ceci ? Principalement par exprience personnelle,
  souvenir du dsastre d'un rm -r particulirement insens en tant que
  _r_o_o_t.  J'ai supprim 97 fichiers JPEG dont j'avais besoin et que je ne
  pouvais certainement pas rcuprer par ailleurs.  Suivant quelques
  conseils (voir la section ``Remerciements et bibliographie'') et en
  persvrant beaucoup, j'ai rcupr 91 fichiers intacts.  Je suis
  parvenu  en retrouver, au moins en partie, cinq autres (suffisamment
  pour voir quelle tait l'image reprsente par chacun).  Une seule
  n'tait pas affichable, et mme pour celle-l, je suis certain de
  n'avoir pas perdu plus de 1024 octets (mais hlas depuis le dbut du
  fichier ; sachant que je ne connais rien du format de fichier JFIF
  j'ai vraiment fait ce que j'ai pu).

  Je discuterai plus bas du taux de rcupration que vous pouvez esprer
  pour les fichiers supprims.


  11..11..  HHiissttoorriiqquuee ddeess rrvviissiioonnss

  Les rvisions de ce document (en version anglaise, NdT) dlivres au
  public, ainsi que leurs dates de publication, sont les suivantes :


    v1.0, 18 janvier 1997 ;

    v1.1, 23 juillet 1997 (voir ``Nouveauts v1.1'') ;

    v1.2, 4 aot 1997 (voir ``Nouveauts v1.2'') ;

    v1.3, 2 fvrier 1999 (voir ``Nouveauts v1.3'').


  11..11..11..  NNoouuvveeaauuttss ddee llaa vveerrssiioonn 11..11

  Quels sont les nouveauts de cette version ?  Primo, la rflexion dans
  l'exemple de la rcupration de fichiers a t corrige. Merci  tous
  ceux qui m'ont crit pour me signaler mon erreur ; cela m'apprendra,
  je l'espre,  faire plus attention en inventant des squences
  interactives.

  Secundo, la discussion sur le modle de systme de fichier Unix a t
  rcrite afin d'tre (esprons-le) plus comprhensible.  Je n'en tais
  pas entirement satisfait de prime abord, et d'aucuns se sont plaints
  de son manque de clart.

  Tertio, le gros-tas-de-tar-gzip-uu-encod de fsgrab au milieu du
  fichier a t retir. Le programme est dsormais disponible sur ma
  page <http://pobox.com/~aaronc/tech/fsgrab-1.2.tar.gz> et sur Metalab
  <http://metalab.unc.edu/pub/Linux/utils/file/> (et ses miroirs).

  Quarto, le document a t traduit en langage sgml, utilis par le
  Linux Documentation Project.  Ce langage peut tre facilement converti
  en un grand nombre d'autres langages (y compris HTML et LaTeX) pour un
  affichage et une impression simples et pratiques.  Cela a pour
  avantage une belle typographie, dans le cas d'une dition papier ; de
  plus, le document contient des rfrences et des liens bien commodes
  si vous le consultez sur le Web.


  11..11..22..  NNoouuvveeaauuttss ddee llaa vveerrssiioonn 11..22

  Cette rvision est plutt une augmentation.  Elle inclut
  principalement des modifications proposes par des lecteurs, dont
  l'une est particulirement importante.

  Le premier changement a t suggr par Egil Kvaleberg
  egil@kvaleberg.no, qui a signal la commande dump dans debugfs.  Merci
  encore, Egil.

  Le second changement a t de signaler l'utilisation de chattr pour
  viter de supprimer des fichiers importants.  Merci  Herman Suijs
  H.P.M.Suijs@kub.nl de l'avoir signal.

  Le rsum a t revu. Des URLs ont t ajoutes, qui indiquent des
  organisations ou des logiciels.  Ajoutez  cela quelques modifications
  mineures (dont des corrections de fautes de frappe, etc.).


  11..11..33..  NNoouuvveeaauuttss ddee llaa vveerrssiioonn 11..33

  Bien qu'il se soit coul 17 mois depuis la dernire version, bien peu
  de choses ont chang. Cette version corrige quelques erreurs mineures
  (fautes de frappe, URL incorrectes, etc -- principalement le non-lien
  vers l'Open Group), et les quelques paragraphes qui taient devenus
  atrocement dmods, comme ceux sur les versions de noyau et lde, ont
  t revus. Oh, et j'ai remplac `Sunsite' par `Metalab' partout.

  Cette version sera probablement la dernire avant la version 2.0, qui
  sera un vrai HOWTO, du moins je l'espre. J'ai travaill sur des
  changements d'importance qui mritent l'incrmentation du numro de
  version majeure.


  11..22..  OO ttrroouuvveerr ccee ddooccuummeenntt

  La version officielle la plus rcente de ce document devrait tre
  disponible au format texte auprs du site du Linux Documentation
  Project <http://metalab.unc.edu/LDP/> (et ses miroirs).  La dernire
  version est galement disponible sur ma page
  <http://pobox.com/~aaronc/> sous divers formats :


    source SGML <http://pobox.com/~aaronc/tech/e2-undel/howto.sgml>,
     tel que je l'ai crit ;

    HTML <http://pobox.com/~aaronc/tech/e2-undel/html/>, gnr
     automatiquement depuis le source SGML ;

    format texte <http://pobox.com/~aaronc/tech/e2-undel/howto.txt>,
     galement gnr automatiquement depuis le source SGML.


  22..  CCoommmmeenntt nnee ppaass ssuupppprriimmeerr ddee ffiicchhiieerrss

  Il est vital de se rappeler que Linux n'est pas semblable  MS-DOS en
  matire de rcupration de donnes. Pour MS-DOS (et son btard Windows
  95), il est gnralement trs simple de rcuprer un fichier
  supprim : le  systme d'exploitation  (il faut le dire vite) est
  mme accompagn d'un utilitaire qui automatise la procdure. Ce n'est
  pas le cas de Linux.

  Donc... rgle numro un (ou premire directive, si vous prfrez) :


       FFAAIITTEESS DDEESS SSAAUUVVEEGGAARRDDEESS


  peu importe comment. Pensez  toutes vos donnes. Peut-tre, comme
  moi, conservez-vous plusieurs annes d'archives de messages, contacts,
  documents sur votre ordinateur. Pensez au chamboulement dans votre vie
  si vous tiez victime d'une panne de disque catastrophique, ou -- pire
  encore ! -- si un cracker nettoyait votre disque sans vergogne. Ce
  n'est pas si improbable ; j'ai correspondu avec un bon nombre de gens
  placs dans une telle situation.  J'exhorte les utilisateurs senss de
  Linux de sortir acheter un priphrique de sauvegarde, de planifier
  leurs sauvegardes dans un emploi du temps digne de ce nom et de _s_'_y
  _c_o_n_f_o_r_m_e_r.  En ce qui me concerne, je me sers d'un disque ddi sur
  une deuxime machine, et rgulirement je fais un mirroir de mon
  rpertoire personnel par le rseau.  Pour plus d'information sur la
  planification des sauvegardes, lisez Frisch (1995) (voir la section
  ``Bibliographie et remerciements'').

  En l'absence de sauvegardes, que faire (en fait, mme en prsence de
  sauvegardes : dans le cas de donnes importantes, la ceinture et les
  bretelles, ce n'est pas du luxe) ?

  Essayez de donner aux fichiers importants les droits 440 (ou moins) :
  ne pas vous laisser les droits en criture provoque une demande de
  confirmation explicite de rm avant la destruction (mais si je veux
  supprimer rcursivement un rpertoire avec rm -r, j'interromprai le
  programme ds la premire ou deuxime demande de confirmation pour
  relancer la commande avec rm -rf).

  Un bon truc, pour les fichiers importants, est de crer un lien
  physique vers eux dans un rpertoire cach. J'ai entendu parler d'un
  administrateur systme qui, priodiquement, supprimait
  accidentellement /etc/passwd (et par l-mme dtruisait  moiti le
  systme). Un des remdes fut de lancer en tant que _r_o_o_t quelque chose
  comme :



       # mkdir /.backup
       # ln /etc/passwd /.backup




  Il est alors assez difficile de supprimer compltement le contenu du
  fichier : si vous dites



       # rm /etc/passwd




  alors



       # ln /.backup/passwd /etc




  permettra de le rcuprer. Naturellement, cela ne couvre pas le cas o
  vous avez cras le contenu du fichier par un autre fichier, donc de
  toutes faons gardez vos sauvegardes.

  Dans un systme de fichiers ext2, il et possible d'utiliser les
  attributs ext2 dans le but de protger ses donnes.  Ces attributs
  sont manipuls  l'aide de la commande chattr.  Il y a un attribut 
  ajout seulement  (_a_p_p_e_n_d_-_o_n_l_y) : il est possible d'ajouter des
  donnes  un fichier ayant cet attribut, mais pas de le supprimer, et
  le contenu du fichier ne peut pas tre cras.  Si un rpertoire a cet
  attribut, tous les fichiers et rpertoires qu'il contient peuvent tre
  normalement modifis, mais aucun fichier ne peut tre supprim. Cet
  attribut peut tre plac en tapant



       $ chattr +a FICHIER...




  Il existe aussi un attribut  immuable  (_i_m_m_u_t_a_b_l_e), qui ne peut tre
  plac ou retir qu'en tant que _r_o_o_t.  Un fichier ou rpertoire ayant
  cet attribut ne peut tre ni modifi, ni supprim, ni renomm, ni se
  faire ajouter un lien (physique).  Il peut tre plac comme suit :



       # chattr +i FICHIER...




  Ext2fs fournit galement l'attribut  rcuprable  (_u_n_d_e_l_e_t_a_b_l_e,
  option +u de chattr). Si un fichier ayant cet attribut est supprim,
  mais pas rellemnt rutilis, il est dplac vers un  endroit sr 
  afin d'tre supprim plus tard.  Hlas, cette fonctionnalit n'est pas
  encore implante dans les noyaux courants ; et bien que, par la pass,
  il y ait eu un peu d'intrt concernant une implantation ventuelle,
  elle n'est pas ( ma connaissance) disponible pour les noyaux actuels.

  Certains dfendent l'ide de faire de rm un alias ou une fonction du
  gestionnaire de commandes qui excute en fait rm -i (qui demande
  confirmation pour _t_o_u_s les fichiers  supprimer).  En effet, certaines
  versions de la distribution Red Hat <http://www.redhat.com/> le font
  par dfaut pour tous les utilisateurs, y compris _r_o_o_t. En ce qui me
  concerne, je ne supporte pas les logiciels incapables de tourner tous
  seuls, je ne le fais donc pas. Par ailleurs, un jour ou l'autre, vous
  ferez tourner le programme en mode mono-utilisateur, ou utiliserez un
  gestionnaire de commandes diffrent, ou simplement une autre machine,
  o votre fonction rm n'existera pas.  Si vous vous attendez  une
  confirmation, il est assez facile d'oublier o vous tes et spcifier
  un peu trop de fichiers  supprimer. De mme, les divers scripts et
  programmes servant  remplacer rm sont,  mon humble avis, trs
  dangereux.

  Une solution un peu meilleure serait de commencer  utiliser un
  paquetage qui manipulerait une destruction  recyclable  en
  fournissant une commande qui ne s'appellerait pas rm.  Pour plus de
  dtails, voir Peek _e_t _a_l (1993) (voir la section ``Bibliographie et
  remerciements'').  Cette solution a cependant l'inconvnient
  d'encourager les utilisateurs  avoir une attitude nonchalante
  vis--vis de la destruction, au lieu de l'attitude circonspecte qui
  est souvent ncessaire sous Unix.


  33..   qquueell ttaauuxx ddee rrccuupprraattiioonn ppuuiiss--jjee mm''aatttteennddrree ??

  a dpend. Parmi les problmes concernant la rcupration de fichiers
  dans un systme d'exploitation de haute qualit, multi-tches et
  multi-utilisateurs comme Linux, il se trouve que vous ne savez jamais
  quand quelqu'un veut crire sur le disque. Donc, quand le systme
  d'exploitation reoit l'ordre de supprimer un fichier, il suppose
  libres les blocs utiliss par ce fichier au moment d'allouer de
  nouveau de la place pour un nouveau fichier (c'est un exemple typique
  d'un principe gnral d'Unix : le noyau et les outils associs
  supposent que les utilisateurs ne sont pas des idiots). En gnral,
  plus votre machine est utilise, moins vous avez de chances de
  rcuprer vos fichiers avec succs.

  De plus, la fragmentation du disque peut affecter la facilit de
  rcupration. Si la partition contenant les fichiers supprims est
  trs fragmente, vous avez peu de chances de pouvoir lire un fichier
  entier.

  Si votre machine, comme la mienne, est effectivement une station
  destine  un seul utilisateur, et que vous n'utilisiez pas
  intensivement le disque au moment fatal de la destruction, je
  m'attendrais  un taux de rcupration du mme ordre de grandeur que
  dcrit prcdemment. J'ai rcupr presque 94 % des fichiers, intacts
  (et il s'agissait de fichiers binaires, notez bien). Si vous obtenez
  plus de 80 %, vous pouvez tre plutt content de vous.


  44..  BBoonn,, aalloorrss ccoommmmeenntt jjee rrccuupprree uunn ffiicchhiieerr ??

  La procdure consiste principalement en la recherche de donnes dans
  le priphrique de la partition en mode caractre, et en le fait de la
  rendre  nouveau visible par le systme d'exploitation.  Il y a
  principalement deux manires de le faire : la premire consiste 
  modifier le systme de fichier existant de telle faon que les inodes
  supprims aient leur indicateur  supprim  retir, et esprer que
  les donnes retombent comme par magie  leur place.  L'autre mthode,
  plus sre mais plus lente, est de rechercher o se trouvent les
  donnes dans la partition et de les crire dans un nouveau fichier.

  Vous devez suivre plusieurs tapes avant de commencer votre tentative
  de rcupration ; voir les sections ``Dmonter le systme de
  fichiers'', ``Prparer la modification directe des inodes'' et
  ``Prparer l'criture  un autre endroit'' pour plus de dtails.  Pour
  dcouvrir comment rcuprer rellement vos fichiers, voir les sections
  ``Trouver les inodes supprims'', ``Obtenir des dtails sur les
  inodes'', ``Rcuprer des blocs de donnes'' et ``Modifier les inodes
  directement''.


  55..  DDmmoonntteerr llee ssyyssttmmee ddee ffiicchhiieerrss

  Quelle que soit la mthode que vous choisissiez, la premire tape
  consiste  dmonter le systme de fichiers contenant les fichiers
  supprims.  Je vous conseille fortement de rfrner toute envie de
  bricoler un systme de fichiers mont. Cette tape doit tre effectue
  _l_e _p_l_u_s _t__t _p_o_s_s_i_b_l_e, ds que vous vous tes rendu compte que les
  fichiers sont supprims.

  La mthode la plus simple est la suivante : en supposant que les
  fichiers supprims soient dans la partition /usr, tapez :



       # umount /usr




  Vous pouvez cependant avoir besoin de garder certaines donnes
  disponibles dans /usr. Dans ce cas, remontez-le en mode lecture
  seule :



       # mount -o ro,remount /usr




  Si les fichiers supprims taient dans la partition racine, vous
  devrez ajouter une option -n, afin d'empcher que l'opration de
  montage ne dclenche une criture dans /etc/mtab :



       # mount -n -o ro,remount /




  Indpendamment de tout cela, il est possible qu'un autre processus
  utilise  ce moment-l ce systme de fichier (ce qui fera chouer le
  montage avec une erreur du genre _r_e_s_o_u_r_c_e _b_u_s_y). Il y a un programme
  qui peut envoyer un signal  tout processus utilisant un fichier ou
  point de montage donn : c'est fuser. Pour la partition /usr, essayez
  ceci :



       # fuser -v -m /usr




  Cela aura pour effet d'afficher la liste des processus concerns.  En
  admettant qu'aucun d'entre eux n'est vital, vous pouvez taper



       # fuser -k -v -m /usr


  afin d'envoyer  chaque processus un SIGKILL (qui le tuera
  d'autorit), ou, par exemple,



       # fuser -k -TERM -v -m /usr




  pour envoyer plutt  chacun un SIGTERM (qui priera le processus de
  terminer proprement).


  66..  PPrrppaarreerr llaa mmooddiiffiiccaattiioonn ddiirreeccttee ddeess iinnooddeess

  Mon conseil ? Ne faites pas a. Je ne pense vraiment pas qu'il soit
  raisonnable d'esprer un rsultat en jouant avec un systme de
  fichiers  un si bas niveau. Du reste, vous ne pourrez rcuprer de
  faon fiable que les 12 premiers blocs de chaque fichier. Donc, si
  vous avez des fichiers longs  rcuprer, vous devrez de toute faon
  utiliser l'autre mthode (mais lisez tout de mme la section ``Cela
  va-t-il se simplifier dans l'avenir~?'' pour plus d'information).

  Si vous sentez que vous devez le faire de cette manire, je vous
  conseille de copier les donnes de la partition en mode caractre dans
  une autre partition, puis monter le tout en utilisant le priphrique
  boucle (_l_o_o_p_b_a_c_k _d_e_v_i_c_e) :



       # cp /dev/hda5 /root/working
       # mount -t ext2 -o loop /root/working /mnt




  (Notez que les anciennes versions de mount peuvent avoir des problmes
  pour faire cela. Si votre mount ne fonctionne pas, je vous recommande
  fortement de vous procurer la dernire version, ou tout au moins la
  version 2.7, car plusieurs versions plus anciennes ont de graves
  problmes de scurit).

  Le but de la manoeuvre est que, quand vous aurez entirement dtruit
  le systme de fichiers (ce que vous ferez trs probablement), il ne
  vous restera plus qu' copier la partition dans l'autre sens et
  repartir  nouveau.


  77..  PPrrppaarreerr ll''ccrriittuurree  uunn aauuttrree eennddrrooiitt

  Vous devez vous assurer d'avoir quelque part une partition de secours.
  Esprons-le, votre systme a plusieurs partitions : peut-tre une
  racine, une /usr, et une /home. Avec tout ce choix, aucun problme :
  crez simplement un nouveau rpertoire dans l'une d'entre elles.

  Si vous n'avez qu'une partition racine dans laquelle vous fourrez
  tout, a risque d'tre un poil plus dlicat.  Peut-tre avez-vous une
  partition MS-DOS ou Windows que vous pourriez utiliser ? Ou vous avez
  le gestionnaire _r_a_m_d_i_s_k dans votre noyau, peut-tre en module ? Pour
  utiliser le _r_a_m_d_i_s_k (en supposant que votre noyau soit plus rcent que
  1.3.48), tapez les commandes suivantes :




  # dd if=/dev/zero of=/dev/ram0 bs=1k count=2048
  # mke2fs -v -m 0 /dev/ram0 2048
  # mount -t ext2 /dev/ram0 /mnt




  Cela a pour effet de crer un volume _r_a_m_d_i_s_k de 2 Mo, et de le monter
  en /mnt.

  Un petit mot d'avertissement : si vous utilisez kerneld (ou son
  remplaant kmod avec les noyaux 2.2.x et les derniers 2.1.x) pour
  charger et dcharger automatiquement les modules du noyau, alors ne
  dmontez pas le _r_a_m_d_i_s_k tant que vous n'avez pas copi tous les
  fichiers qu'il contient sur un support non volatile.  Une fois que
  vous l'aurez dmont, kerneld suppose qu'il peut dcharger le module
  (aprs la priode d'attente habituelle), et, ds qu'il l'a fait, la
  mmoire est rutilise par d'autres lments du noyau, causant la
  perte irrmdiable des heures de travail que vous aurez passes 
  rcuprer soigneusement vos donnes.

  Si vous avez un lecteur Zip, Jaz, ou LS-120, ou quelque chose
  d'quivalent, il s'agit probablement d'une bonne place pour une
  partition de secours. Sinon, il faudra faire avec les disquettes.

  Une autre chose dont vous devriez avoir besoin est un programme
  capable de lire les donnes ncessaires en plein milieu du
  priphrique contenant la partition.  la rigueur, dd pourrait le
  faire, mais pour lire  partir de, disons, 600 Mo dans une partition
  de 800 Mo, dd tient  lire les 600 premiers mgaoctets, quitte  les
  ignorer, et il va y passer un temps non ngligeable, mme sur des
  disques rapides.  Pour viter cela, j'ai crit un programme qui peut
  se positionner en plein milieu de la partition. Il s'appelle fsgrab ;
  vous pouvez trouver le paquetage des sources sur ma page
  <http://pobox.com/~aaronc/tech/fsgrab-1.2.tar.gz>, ou sur Metalab
  <http://metalab.unc.edu/pub/Linux/utils/file/> (et ses miroirs). Si
  vous souhaitez utiliser cette mthode, la suite de ce mini-HOWTO
  suppose que vous avez fsgrab.

  Si aucun des fichiers que vous voulez rcuprer n'occupe plus de 12
  blocs (o un bloc occupe habituellement un kilooctet), alors vous
  n'aurez pas besoin de fsgrab.

  Si vous avez besoin de fsgrab mais n'en voulez pas, il est fort simple
  de traduire une ligne de commande avec fsgrab en une avec dd. Si on a


       fsgrab -c _c_o_u_n_t -s _s_k_i_p _d_e_v_i_c_e


  alors la commande dd correpondante (et gnralement beaucoup plus
  lente) est


       dd bs=1k if=_d_e_v_i_c_e count=_c_o_u_n_t skip=_s_k_i_p


  Je dois vous avertir que, bien que fsgrab ait parfaitement fonctionn
  pour moi, je ne puis prendre aucune responsabilit sur son
  comportement. C'tait vraiment une bidouille rapide et sale pour
  arriver  mes fins. Pour plus de dtails sur l'absence de garantie,
  consultez la section _N_o _W_a_r_r_a_n_t_y dans le fichier COPYING inclus dans
  la distribution (li s'agit de la GPL, la licence publique gnrale
  GNU).


  88..  TTrroouuvveerr lleess iinnooddeess ssuupppprriimmss

  L'tape suivante consiste  demander au systme de fichiers quels
  inodes ont t rcemment librs. C'est une tche que vous pouvez
  accomplir avec debugfs. Lancez debugfs avec le nom du priphrique sur
  lequel le systme de fichiers rside :



       # debugfs /dev/hda5




  Si vous souhaitez modifier les inodes directement, ajoutez une option
  -w de manire  activer l'criture sur le systme de fichiers :



       # debugfs -w /dev/hda5




  La commande debugfs permettant de trouver les inodes dtruits est
  lsdel. Donc, tapez la commande suivante  l'invite :



       debugfs:  lsdel




  Aprs moult grincements et gmissements du disque, une longue liste
  est envoye par un _p_i_p_e  votre _p_a_g_e_r favori (la valeur de $PAGER).
  Maintenant vous aurez envie d'en sauver une copie autre part. Si vous
  avez less, vous pouvez taper -o suivi du nom du fichier qui devra
  contenir le rsultat. Sinon, vous devrez vous arranger pour envoyer la
  sortie ailleurs. Essayez ceci :



       debugfs:  quit
       # echo lsdel | debugfs /dev/hda5 > lsdel.out




  Maintenant, d'aprs la date et l'heure de la suppression, la taille,
  le type et les indications numriques des permissions et propritaire,
  vous devez deviner quelles inodes supprims vous voulez. Avec un peu
  de chance, vous les trouverez tout de suite parce c'est le gros paquet
  que vous avez supprim il y a  peine cinq minutes. Sinon, prenez bien
  garde en allant pcher dans la liste.

  Je vous suggre, autant que possible, d'imprimer la liste des inodes
  que vous voulez rcuprer. Cela vous facilitera nettement la vie.


  99..  OObbtteenniirr ddeess ddttaaiillss ssuurr lleess iinnooddeess

  debugfs a une commande stat, qui imprime des dtails sur un inode.
  Utilisez la commande pour chacun des inodes de votre liste 
  rcuprer. Par exemple, si vous tes intress par l'inode numro
  148003, essayez ceci :
       debugfs:  stat <148003>
       Inode: 148003   Type: regular    Mode:  0644   Flags: 0x0   Version: 1
       User:   503   Group:   100   Size: 6065
       File ACL: 0    Directory ACL: 0
       Links: 0   Blockcount: 12
       Fragment:  Address: 0    Number: 0    Size: 0
       ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996
       mtime: 0x313bf4d7 -- Tue Mar  5 08:01:27 1996
       dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       BLOCKS:
       594810 594811 594814 594815 594816 594817
       TOTAL: 6




  Si vous avez de nombreux fichiers  rcuprer, vous souhaiterez
  automatiser tout cela. En suposant que votre liste (d'aprs lsdel)
  d'inodes  rcuprer est dans lsdel.out, essayez ceci :



       # cut -c1-6 lsdel.out | grep "[0-9]" | tr -d " " > inodes




  Ce nouveau fichier inodes contient uniquement les numros des inodes 
  rcuprer,  raison d'un par ligne. On le sauvegarde parce qu'il va
  nous tre srement trs utile par la suite. Il ne vous reste plus qu'
  taper :



       # sed 's/^.*$/stat <\0>/' inodes | debugfs /dev/hda5 > stats




  et stats contient la sortie de toutes les commandes stat.


  1100..  RRccuupprreerr lleess bbllooccss ddee ddoonnnneess

  Cette partie est soit trs facile, soit nettement moins, selon que les
  fichiers que vous essayez de rcuprer occupent moins ou plus de 12
  blocs.


  1100..11..  LLeess ffiicchhiieerrss ccoouurrttss

  Si le fichier n'occupait pas plus de 12 blocs, alors les numros de
  blocs o sont situes toutes ses donnes sont crits dans l'inode :
  vous pouvez les lire directement sur la sortie de stat correspondant 
  l'inode. De surcrot, debugfs a une commande qui automatise cette
  tche. Pour reprendre l'exemple prcdent :









  debugfs:  stat <148003>
  Inode: 148003   Type: regular    Mode:  0644   Flags: 0x0   Version: 1
  User:   503   Group:   100   Size: 6065
  File ACL: 0    Directory ACL: 0
  Links: 0   Blockcount: 12
  Fragment:  Address: 0    Number: 0    Size: 0
  ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996
  atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996
  mtime: 0x313bf4d7 -- Tue Mar  5 08:01:27 1996
  dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996
  BLOCKS:
  594810 594811 594814 594815 594816 594817
  TOTAL: 6




  Ce fichier a six blocs. Puisqu'il est en-dessous de la limite des 12,
  nous demandons  debugfs d'crire le fichier dans un nouvel endroit,
  comme par exemple /mnt/recovered.000 :



       debugfs:  dump <148003> /mnt/recovered.000




  Bien sr, on peut faire a aussi avec fsgrab ; je le montre ici en
  guise d'exemple d'utilisation :



       # fsgrab -c 2 -s 594810 /dev/hda5 > /mnt/recovered.000
       # fsgrab -c 4 -s 594814 /dev/hda5 >> /mnt/recovered.000




  Que ce soit avec debugfs ou avec fsgrab, il y aura un peu de dchet 
  la fin de /mnt/recovered.000, mais ce n'est pas trs important. Si
  vous voulez vous en dbarrasser, la mthode la plus simple est de
  prendre le champ Size de l'inode, et le brancher sur l'option bs d'une
  ligne de commande dd.



       # dd count=1 if=/mnt/recovered.000 of=/mnt/resized.000 bs=6065




  Bien sr, il est possible qu'un ou plusieurs blocs o tait crit
  votre fichier aient t crass. Si c'est le cas, pas de chance : le
  bloc est mort et enterr (rendez-vous compte, si seulement vous aviez
  dmont plus tt !).


  1100..22..  LLeess ffiicchhiieerrss pplluuss lloonnggss

  Les problmes apparaissent lorsque le fichier tient sur plus de 12
  blocs de donnes. Ici, il vaut mieux en savoir un peu sur la manire
  dont sont structurs les systmes de fichiers Unix.  Les donnes du
  fichier sont stockes dans des units appeles  blocs .  Ces blocs
  peuvent tre numrots squentiellement. Un fichier a galement un 
  inode , o sont places des informations telles que propritaire,
  permissions ou type. Comme les blocs, les inodes sont numrots
  squentiellement, bien que la squence soit diffrente. Une entre de
  rpertoire consiste en un nom de fichier associ  un numro d'inode.

  Mais, si on en restait l, le noyau ne saurait toujours pas trouver
  les donnes correspondant  une entre de rpertoire.  Ainsi l'inode
  indique galement l'endroit o se trouvent les blocs de donnes du
  fichier, comme suit :


    Les numros de blocs des 12 premiers blocs sont indiqus
     directement dans l'inode (on les appelle parfois _b_l_o_c_s _d_i_r_e_c_t_s) ;

    L'inode contient le numro de bloc d'un _b_l_o_c _i_n_d_i_r_e_c_t.  Un bloc
     indirect contient les numros de bloc de 256 blocs de donnes
     additionnels ;

    L'inode contient le numro de bloc d'un _b_l_o_c _d_o_u_b_l_e_m_e_n_t _i_n_d_i_r_e_c_t.
     Un bloc doublement indirect contient les numros de bloc de blocs
     indirects supplmentaires ;

    L'inode contient le numro de bloc d'un bloc _t_r_i_p_l_e_m_e_n_t _i_n_d_i_r_e_c_t.
     Un bloc triplement indirect contient les numros de bloc de 256
     blocs doublement indirects supplmentaires.

  Relisez bien tout a : je sais que c'est compliqu, mais c'est
  important, aussi.

  Maintenant, l'implantation du noyau pour toutes les versions actuelles
  (2.0.36 inclue) efface malheureusement tous les blocs indirects (et
  doublement indirects, etc.) lors de la suppression d'un fichier.
  Alors, si votre fichier occupait plus de 12 blocs, vous n'tes pas
  garanti de pouvoir retrouver les numros de tous les blocs dont vous
  avez besoin (sans parler de leur contenu).

  La seule mthode que j'aie pu trouver jusqu'ici consiste  supposer
  que le fichier n'est pas fragment : s'il l'est, vous aurez des
  ennuis. En supposant que le fichier n'est pas fragment, il y a
  plusieurs dispositions de blocs de donnes, selon le nombre de blocs
  de donnes utiliss par le fichier :


     00  1122
        les numros de bloc sont indiqus dans l'inode, comme dcrit
        prcdemment ;


     1133  226688
        aprs les blocs directs, comptez un pour le bloc indirect, puis
        vous avez 256 blocs de donnes ;


     226699  6655880044
        comme avant, il y a 12 blocs directs, un bloc indirect
        (inutile), et 256 blocs. Ils sont suivis d'un bloc doublement
        indirect (inutile), et 256 rptitions de : un bloc indirect
        (inutile) et 256 blocs de donnes ;


     6655880055 oouu pplluuss
        la disposition des 65804 premiers blocs est identique  ce qui
        est dcrit di-dessus. Suivent un bloc triplement indirect
        (inutile) et 256 rptitions d'une squence  doublement
        indirect . Chaque squence doublement indirecte consiste en un
        bloc doublement indirect (inutile), suivi de 256 rptitions
        de : un bloc indirect (inutile) et 256 blocs de donnes.
  Bien entendu, mme si ces blocs sont supposs corrects, rien ne
  garantit que les donnes qu'ils contiennent sont intactes.  De plus,
  plus le fichier est long, moins vous avez de chances qu'il ait pu tre
  crit dans le systme de fichiers sans fragmentation raisonnable (sauf
  dans certaines circonstances particulires).

  Notez que j'ai suppos depuis le dbut que vos blocs occupaient la
  taille de 1024 octets, c'est--dire la valeur standard.  Si vos blocs
  sont plus grands, une partie des nombres crits plus haut doivent tre
  changs. Typiquement, puisque chaque numro de bloc occupe 4 octets,
  le nombre de numros de bloc pouvant tre placs dans chaque bloc
  indirect est taille_du_bloc/4.  Donc, chaque fois que le nombre 256
  apparat dans la dicussion qui prcde, remplacez-le par
  taille_du_bloc/4. Les limitations  nombre de blocs requis  devront
  galement tre modifies.

  Examinons un exemple de rcupration de fichier plus long.



       debugfs:  stat <1387>
       Inode: 148004   Type: regular    Mode:  0644   Flags: 0x0   Version: 1
       User:   503   Group:   100   Size: 1851347
       File ACL: 0    Directory ACL: 0
       Links: 0   Blockcount: 3616
       Fragment:  Address: 0    Number: 0    Size: 0
       ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996
       mtime: 0x313bf4d7 -- Tue Mar  5 08:01:27 1996
       dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       BLOCKS:
       8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8583
       TOTAL: 14




  Il semble y avoir de bonnes chances pour que ce fichier ne soit pas
  fragment : de faon vidente, les 12 premiers blocs lists dans
  l'inode (qui sont tous des blocs de donnes) sont contigus.  Nous
  pouvons donc commencer par rcuprer ces blocs :



       # fsgrab -c 12 -s 8314 /dev/hda5 > /mnt/recovered.001




  Maintenant, le bloc suivant list dans l'inode, 8326, est un bloc
  indirect, que nous pouvons ignorer. Mais nous nous fions  notre
  intuition qu'il sera suivi de 256 blocs de donnes (du numro 8327 au
  numro 8582).



       # fsgrab -c 256 -s 8327 /dev/hda5 >> /mnt/recovered.001




  Le dernier bloc list dans l'inode est le 8583. Notez que a ressemble
  toujours bien  un fichier contigu : le numro du dernier bloc que
  nous ayons crit tait le 8582, donc 8327 + 255.  Ce bloc 8583 est un
  bloc doublement indirect, que nous pouvons ignorer. Il est suivi par
  jusqu' 256 rptitions d'un bloc indirect (ignor) suivi de 256 blocs
  de donnes. Aprs un petit calcul mental, on en dduit les commandes
  suivantes.  Remarquez qu'on saute le bloc doublement indirect 8583 et
  le bloc indirect 8584, qui suivent immdiatement (esprons-le) et
  qu'on commence directement  lire les donnes depuis le bloc 8585.



       # fsgrab -c 256 -s 8585 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 8842 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9099 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9356 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9613 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9870 /dev/hda5 >> /mnt/recovered.001




  En rassemblant tout, on voit qu'on a crit depuis le dbut 12 + (7 *
  256) blocs, c'est--dire 1804. La commande  stat  nous a indiqu
  pour l'inode un  _b_l_o_c_k_c_o_u_n_t  de 3616 ; mais ces blocs occupaient
  malheureusement 512 octets (un reliquat d'Unix), ce que nous voulons
  rellement est alors 3616/2 = 1808 blocs de 1024 octets. Cela signifie
  que nous avons seulement besoin de quatre blocs de plus. Le dernier
  bloc de donnes crit portait le numro 10125. De la mme faon que
  depuis le dbut, on saute un bloc indirect (numro 10126) ; on peut
  alors crire ces quatre derniers blocs.



       # fsgrab -c 4 -s 10127 /dev/hda5 >> /mnt/recovered.001




  Et maintenant, avec un peu de chance, le fichier complet a t
  rcupr avec succs.


  1111..  MMooddiiffiieerr lleess iinnooddeess ddiirreecctteemmeenntt

  Cette mthode est apparemment beaucoup plus facile. Cependant, comme
  soulign plus haut, elle ne peut pas venir  bout de fichiers occupant
  plus de 12 blocs.

  Pour chaque inode que vous voulez rcuprer, vous devez mettre  1 le
  nombre de liens, et  0 la date de suppression.  Cela peut tre fait
  grce  la commande mi (modifier inode) de debugfs. Voici un exemple
  de sortie concernant la modification de l'inode 148003 :


















  debugfs:  mi <148003>
                          Mode    [0100644]
                       User ID    [503]
                      Group ID    [100]
                          Size    [6065]
                 Creation time    [833201524]
             Modification time    [832708049]
                   Access time    [826012887]
                 Deletion time    [833201524] 0
                    Link count    [0] 1
                   Block count    [12]
                    File flags    [0x0]
                     Reserved1    [0]
                      File acl    [0]
                 Directory acl    [0]
              Fragment address    [0]
               Fragment number    [0]
                 Fragment size    [0]
               Direct Block #0    [594810]
               Direct Block #1    [594811]
               Direct Block #2    [594814]
               Direct Block #3    [594815]
               Direct Block #4    [594816]
               Direct Block #5    [594817]
               Direct Block #6    [0]
               Direct Block #7    [0]
               Direct Block #8    [0]
               Direct Block #9    [0]
              Direct Block #10    [0]
              Direct Block #11    [0]
                Indirect Block    [0]
         Double Indirect Block    [0]
         Triple Indirect Block    [0]




  C'est--dire que je mets  0 la date de suppression et le nombre de
  liens  1, puis j'envoie juste un retour chariot pour chacun des
  autres champs. D'accord, ce n'est pas trs souple si vous avez
  beaucoup de fichiers  rcuprer, mais je pense que vous pourrez faire
  face. Si vous vouliez du velours, il fallait utiliser un  systme
  d'exploitation  graphique avec une jolie  corbeille .

   propos, le texte de sortie de mi indique un champ  cration 
  (_c_r_e_a_t_i_o_n _t_i_m_e). Il est totalement mensonger (ou en tout cas
  trompeur) ! En fait, sur un systme de fichiers Unix, vous ne pouvez
  pas dterminer quand un fichier a t cr. Le champ st_ctime d'une
  struct stat fait rfrence  la date de modification de l'inode (_i_n_o_d_e
  _c_h_a_n_g_e _t_i_m_e), c'est--dire la dernire fois qu'un quelconque des
  dtails de l'inode a t chang. Si finit la lessons d'huy.

  Notez que les versions plus rcentes de debugfs que celle que
  j'utilise n'incluent probablement pas certains des champs de la liste
  donne plus haut (typiquement Reserved1 et des champs sur les
  fragments).

  Une fois que vous aurez modifi les inodes, vous pourrez quitter
  debugfs et taper :



       # e2fsck -f /dev/hda5



  L'ide est que chacun des fichiers supprims a t littralement 
  d-supprim , mais qu'aucun d'entre eux n'apparat en entre de
  rpertoire. Le programme e2fsck peut le dtecter, et ajoutera une
  entre dans le rpertoire /lost+found du systme de fichiers (Donc, si
  la partition est normalement monte dans /usr, les fichiers vont
  apparatre dans /usr/lost+found). Tout ce qui reste  faire est de
  redonner son nom  chaque fichier d'aprs son contenu, et le remettre
   sa place dans l'arborescence du systme de fichiers.

  Quand vous lancerez e2fsck, vous obtiendrez des messages
  d'information, ainsi que des questions  propos des problmes 
  rparer. Rpondez oui (_y_e_s) partout o vous voyez _`_s_u_m_m_a_r_y
  _i_n_f_o_r_m_a_t_i_o_n_' ou  chaque rfrence aux inodes que vous avez modifis.
  Tout le reste vous regarde, bien qu'il soit en gnral une bonne ide
  de rpondre oui  toutes les questions.  Lorsque e2fsck a termin,
  vous pouvez remonter le systme de fichiers.

  En fait, il y a un autre moyen que de demander  e2fsck de laisser les
  fichiers dans /lost+found : vous pouvez utiliser debugfs pour crer un
  lien vers l'inode dans le systme de fichiers. Utilisez la commande
  link de debugfs quand vous avez fini de modifier l'inode.



       debugfs:  link <148003> toto.txt




  Ceci cre un fichier appel toto.txt dans ce que debugfs suppose tre
  le rpertoire courant ; toto.txt sera votre fichier. Vous aurez quand
  mme besoin de lancer e2fsck pour corriger le _`_s_u_m_m_a_r_y _i_n_f_o_r_m_a_t_i_o_n_',
  le nombre de blocs, etc.


  1122..  CCeellaa vvaa--tt--iill ssee ssiimmpplliiffiieerr ddaannss ll''aavveenniirr ??

  Oui. En fait, je pense que c'est dj le cas. Bien qu'au moment o ces
  lignes sont crites (2 fvrier 1999), les noyaux stables actuels (la
  srie 2.0.x) effacent les blocs indirects, ce n'est plus le cas des
  noyaux de dveloppement 2.1.x, ni des noyaux stables 2.2.x, dont le
  2.2.1 qui vient d'tre diffus ; nous allons voir apparatre des
  distributions  base de noyaux 2.2.x d'ici un ou deux mois.

  Une fois cette limitation retire des noyaux stables, bon nombre de
  mes objections au fait de modifier les inodes  la main disparatront.
  Il sera galement possible d'utiliser la commande dump de debugfs sur
  des fichiers longs, et d'utiliser d'autres outils de rcupration.


  1133..  EExxiissttee--tt--iill ddeess oouuttiillss qquuii aauuttoommaattiisseenntt llee pprroocceessssuuss ??

  En fait, il y en a. Hlas, je crains qu'ils souffrent du mme problme
  que la technique de modification manuelle des inodes : les blocs
  indirects sont irrcuprables. Cependant, selon la probabilit que
  cela ne soit plus un problme d'ici peu, a vaut srement le coup de
  chercher ces programmes maintenant.

  J'ai crit un utilitaire nomm e2recover, qui est essentiellement un
  enrobage Perl  fsgrab. Il fait un effort raisonnable pour grer les
  blocs indirects effacs, et semble trs bien fonctionner en l'absence
  de fragmentation. Il en profite pour remettre les permissions (et,
  quand c'est possible, le propritaire) des fichiers rcuprs, et
  s'assure mme que les fichiers rcuprs soient  la bonne taille.


  J'ai initialement crit e2recover pour la toute proche mise  jour de
  ce Howto ; malheureusement cela signifie que tous les renseignements
  utiles sur e2recover sont aussi prvus pour cette mise  jour. En
  attendant, il devrait s'avrer quand mme utile ds maintenant ; vous
  pouvez le tlcharger depuis ma page
  <http://pobox.com/~aaronc/tech/e2-undel/>, et prochainement sur
  Metalab.

  Scott D. Heavner est l'auteur de lde, (`Linux Disk Editor'). lde peut
  servir aussi bien d'diteur binaire de disque, que d'un quivalent de
  debugfs pour les systmes ext2 et minix, et mme pour les systmes xia
  (bien que le support xia ne soit plus disponible dans les noyaux 2.1.x
  et 2.2.x). Il dispose de fonctionnalits pour faciliter la
  rcupration, comme le parcours de la liste des blocs, et la recherche
  dans le contenu du disque.  Il possde galement une documentation sur
  les concepts de base des systmes de fichiers particulirement utile,
  ainsi qu'un document expliquant comment l'utiliser afin de rcuprer
  des fichiers supprims.  La version 2.4 de lde est disponible sur
  Metalab
  <http://metalab.unc.edu/pub/Linux/system/filesystems/lde-2.4.tar.gz>
  et ses mirroirs, et sur la page de son auteur
  <http://www.geocities.com/CapeCanaveral/Lab/7731/lde.html>.

  Une autre possibilit est fournie par le GNU Midnight Commander, mc.
  C'est un gestionnaire de fichiers en plein cran, inspir autant que
  je le sache d'un certain programme MS-DOS couramment dsign sous le
  nom de  nc .  mc supporte la souris dans la console Linux et dans un
  xterm, et fournit des systmes de fichiers virtuels qui permettent des
  trucs du genre de se dplacer dans une archive Tar. Parmi ses systmes
  de fichiers virtuels, il en est un concernant la rcupration sous
  Ext2. Tout a semble trs commode  manipuler, mais je dois avouer que
  que je ne l'ai jamais utilis moi-mme -- je prfre les bonnes
  vieilles commandes _s_h_e_l_l.  Apparemment il faut configurer le programme
  avec l'option --with-ext2undel ; vous aurez galement besoin des
  bibliothques de dveloppement et des fichiers d'en-tte (_i_n_c_l_u_d_e) qui
  viennent avec le paquetage e2fsprogs.  La version fournie par Debian
  GNU/Linux <http://www.debian.org/> est ainsi compil ; c'est peut-tre
  le cas pour d'autres distributions. Une fois que le programme est
  compil, vous pouvez y taper cd undel:/dev/hda5/, et obtenir, sous
  forme de contenu de rpertoire, le catalogue des fichiers supprims.
  Comme la plupart des outils actuels de rcupration, il gre trs mal
  les blocs indirects effacs -- la plupart du temps il ne rcupre que
  les 12 premiers Ko des gros fichiers.

  La dernire version peut tre rcupre depuis le site ftp officiel
  <ftp://ftp.nuclecu.unam.mx/Midnight/devel>.


  1144..  AAcchheevv dd''iimmpprriimmeerr......

  J'ai l'intention de produire des mises  jour rgulires de ce
  document, tant que j'aurai  la fois suffisamment de temps pour le
  faire et quelque chose d'intressant  dire. Ceci signifie que je suis
  avide de commentaires de la part de mes lecteurs. Ma rdaction peut-
  elle tre plus claire ? Pouvez-vous penser  quelque chose qui
  pourrait rendre l'affaire plus simple ? Existe-t-il un nouvel outil
  qui puisse faire tout cela automatiquement ?

  Quoi qu'il en soit : si vous avez quoi que ce soit  dire,  propos de
  ce document ou des outils fsgrab et e2recover, envoyez-moi un mot  :

  aaronc@pobox.com.




  1155..  RReemmeerrcciieemmeennttss eett bbiibblliiooggrraapphhiiee


       _S_i _j_'_a_i _v_u _p_l_u_s _l_o_i_n _q_u_e _d_'_a_u_t_r_e_s_, _c_'_e_s_t _p_a_r_c_e _q_u_e _j_'__t_a_i_s
       _h_i_s_s_ _s_u_r _d_e_s __p_a_u_l_e_s _d_e _g__a_n_t_s (Isaac Newton)


  Une grande partie de ce mini-Howto est drive d'un article post sur
  le groupe de _n_e_w_s comp.os.linux.misc par Robin Glover
  swrglovr@met.rdg.ac.uk.

  Je voudrais remercier Robin de m'avoir gracieusement autoris 
  reprendre ses ides dans ce mini-Howto.

  Je voudrais galement profiter de l'occasion pour remercier une fois
  de plus toutes les personnes qui m'ont contact  propos de ce Howto.
  Ce sont les remerciements chaleureux que l'on reoit qui justifient la
  peine que l'on se donne.

  Quelques rfrences bibliographiques :


    FFrriisscchh, leen (1995), _E_s_s_e_n_t_i_a_l _S_y_s_t_e_m _A_d_m_i_n_i_s_t_r_a_t_i_o_n, second
     edition, O'Reilly and Associates, Inc., ISBN : 1-56592-127-5.

    GGaarrffiinnkkeell, Simson, Daniel WWeeiissee et Steven SSttrraassssmmaannnn (1994), _T_h_e
     _U_n_i_x_-_H_a_t_e_r_s _H_a_n_d_b_o_o_k, IDG Books, ISBN : 1-56884-203-1.  Ce livre
     est compos pour la plus grande partie de pleurs d'adolescents qui
     pensent que _l_e_u_r systme d'exploitation est tellement mieux
     qu'Unix, et le reste ne s'applique pas si vous avez de bons
     programmes en espace utilisateur tels que les outils GNU. Mais il y
     a quelques pis de bl parmi la paille ; par exemple, la discussion
     autour de la facilit d'effacement de fichier sous Unix mrite
     qu'on s'y arrte.

    GGlloovveerr, Robin (31 Jan 1996), _H_O_W_-_T_O _: _u_n_d_e_l_e_t_e _l_i_n_u_x _f_i_l_e_s
     _(_e_x_t_2_f_s_/_d_e_b_u_g_f_s_), comp.os.linux.misc Usenet posting.

    PPeeeekk, Jerry, Tim OO''RReeiillllyy, Mike LLoouukkiiddeess _e_t _a_l (1993), _U_N_I_X _P_o_w_e_r
     _T_o_o_l_s, O'Reilly and Associates, Inc./Random House, Inc., ISBN :
     0-679-79073-X.



  1166..  BBllaa--bbllaa jjuurriiddiiqquuee

  Toutes les marques dposes sont la proprit de leurs auteurs
  respectifs. Spcifiquement :


    _M_S_-_D_O_S et _W_i_n_d_o_w_s sont des marques dposes de Microsoft
     <http://www.microsoft.com/> ;

    _U_N_I_X est une marque dpose de _t_h_e _O_p_e_n _G_r_o_u_p
     _<http://www.open.org/> ;

    _L_i_n_u_x est une marque dpose de Linus Torvalds aux USA et dans
     quelques autres pays.

  Ce document est Copyright  1997, 1999 Aaron Crane aaronc@pobox.com.
  Il peut tre librement et entirement redistribu  condition d'y
  inclure toujours la totalit de cette note de copyright, mais ne peut
  pas tre modifi sans l'autorisation, soit de son auteur, soit du
  coordinateur du Linux Documentation Project.  Une drogation est
  cependant accorde dans le cas de la copie de courts extraits sans
  modification pour des revues ou une citation ; dans ces circonstances,
  les sections peuvent tre reproduites accompagnes d'une citation
  approprie mais sans cette note de copyright.

  L'auteur demande, mais n'exige pas, que des parties souhaitant vendre
  des copies de ce document, sur un _m_e_d_i_u_m lisible par un ordinateur ou
  par un humain, informent de leurs intentions, soit l'auteur, soit le
  coordinateur des HOWTO Linux.

  Le coordinateur des HOWTO Linux est actuellement Tim Bynum linux-
  howto@metalab.unc.edu.
























































  Mini-HOWTO Fax-server
  Erez Strauss erez@newplaces.com Version v1.0
  8 November 1997

  Traduit  par Frederic Gacquer gacquer@neuronnexion.fr Mercredi 14 jan-
  vier 1998.

  Aucune garantie. Les commentaires  sont  les  bienvenus.  Ce  document
  decrit  en  detail  une  des  facons  les  plus simples d'installer un
  serveur de fax sur votre systeme linux. Le fax est disponible pour les
  utilisateurs sur le poste local et aux utilisateurs sur le reseau.

  11..  IInnttrroodduuccttiioonn

  Pour  faire  fonctionner une imprimante/fax sur une machine linux vous
  devez avoir quelques logiciels et un modem fax.

  Les logiciels pour l'Imprimante utiliseront le logiciel fax  comme  un
  filtre d'impression. Efax trouvera le numero de fax a partir du numero
  de la tache d'impression et enverra le fax. Le  logiciel  efax  a  ete
  ecrit par Ed Casas edc@cce.com.

  Le reste du document est construit autour de Question/Reponses.

  22..  QQuueessttiioonnss eett rreeppoonnsseess

  22..11..

  QQuu''eesstt--ccee qquu''uunn sseerrvveeuurr dd''iimmpprreessssiioonn ddee ffaaxx

  Un  serveur  d'impression  de  fax  est  une  installation de quelques
  programmes:  efax,  et  le  serveur  d'impression,  de  telle  maniere
  qu'envoyer un fax a partir de l'ordinateur est aussi simple qu'envoyer
  une impression a l'imprimante.

  22..22..

  CCoommmmeenntt ll''iinnssttaalllleerr ??

  Installer efax comme serveur  d'impression  de  fax  comporte  peu  de
  probleme.  Comme  j'ai  travaille  dessus quelque fois, j'ai decide de
  reunir ces connaissances dans ce petit  mini-HOWTO,  les  commentaires
  sont  les  bienvenus a erez@newplaces.com.Je les decrits ici ainsi que
  les solutions, et toutes les instructions en quelques etapes:

  22..22..11..

  LLee llooggiicciieell eeffaaxx

  Assurez-vous que vous avez le progiciel efax.

  Sur les systemes qui reposent sur RPM utilisez la  commande  'rpm  -qv
  efax'.
  Vous  pouvez obtenir les sources d'efax en format tar.gz chez sunsite:
  ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/efax08a.tar.gz  ou
  le            progiciel            binaire           en           rpm:
  ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/efax-0.8a-3.i386.rpm.

  22..22..22..

  LL''eennttrreeee pprriinnttccaapp

  Le documentation d'efax a oublie le : a la fin de l'entree printcap.

  Solution: ajouter ce qui suit a l'entree  /etc/printcap:

              fax:\
                      :lp=/dev/null:\
                      :sd=/var/spool/fax:\
                      :if=/usr/bin/faxlpr:

  22..22..33..

  LLaa ccoommmmaanndd ffaaxx

  Uilisez  des liens physique et non des liens symboliques a la commande
  fax.

  Executer la commande:

                   ln /usr/bin/fax /usr/bin/faxlpr

  22..22..44..

  LLee ffiicchhiieerr //uussrr//bbiinn//ffaaxx.

  Editez /usr/bin/fax a votre convenance.

  Choisir la bonne classe de votre modem:

              CLASS=2.0

  Positionner le champ FROM="votre numero de telephone international"

              NAME="votre nom"

  Ajouter la ligne de conversion du numero de telephone international en
  local, par exemple pour Israel vous pourriez utiliser:

                 TELCVT='sed -e s/+972/0/ -e s/+/00/'  # Israel

  Il  y  a  un  probleme  dans  le  fichier  a  la ligne 586, changer le
  cfile=...  avec les deux lignes suivantes:

              cfile=`/usr/bin/tail -1 lock`
              cfile=`cat $cfile`

  Aux lignes 586,587 il ne devriez pas y avoir le signe '-', les  lignes
  sont

              0) echo "$l" | mail -s "fax to $num succeeded" $user@$host ;;
              *) echo "$l" | mail -s "fax to $num failed   " $user@$host ;;

  22..22..55..

  LLee rreeppeerrttooiirree //vvaarr//ssppooooll//ffaaxx

  Creer le repertoire /var/spool/fax

              mkdir /var/spool/fax
              chmod 777 /var/spool/fax

  22..22..66..

  LLee ffiicchhiieerr lloocckk.

  Le  fichier  lock  (/var/spool/fax/lock) est cree avec des permissions
  incorrectes, utiliser les commandes  suivantes  pour  les  positionner
  correctement:

               touch /var/spool/fax/lock ; chmod 644 /var/spool/fax/lock

  22..22..77..

  llee ffiicchhiieerr ssppeecciiaall //ddeevv//mmooddeemm

  Le  programme  efax s'attend a un fichier device /dev/modem reel et ne
  fonctionnera pas avec des liens symobliques,  donc  creer  un  fichier
  device avec le meme nombre majeur et le meme mineur que /dev/cua?  qui
  est connecte au modem. Le fichier devra avoir les  permissions  rw-rw-
  rw-  pour  autoriser n'importe quel utilisateur a utiliser le logiciel
  de fax.

              ls -lL /dev/modem
              rm /dev/modem
              mknod /dev/modem c Mj Mi
              chmod 666 /dev/modem

  Mj est 5, et Mi est 64 pour cua0, 65 pour cua1 et ainsi de suite.  Par
  exemple (pour cua1) :

               mknod /dev/modem c 5 65

  22..22..88..

  LLee rreeppeerrttooiirree //vvaarr//lloocckk.

               chmod 1777 /var/lock

  22..33..

  CCoommmmeenntt ll''uuttiilliisseerr,, aavveecc llee sseerrvveeuurr ??

  Vous  devez  utiliser  l'imprimante  fax  en  utilisant l'option -P et
  l'option -J avec le numero de fax.

  Utiliser une des commandes lpr suivantes :

               lpr -Pfax -J <Numero-De-Fax> [nom-de-fichiers]
               toute commande | lpr -Pfax -J <Numero-De-Fax>

  22..44..

  OOuu iinnddiiqquuee tt oonn llee nnuummeerroo ddee ffaaxx ddeessttiinnaattaaiirree ??

  Apres l'option -J.

  22..55..

  CCoommmmeenntt ll''uuttiilliisseerr aa ppaarrttiirr dd''aauuttrreess uunniixx ??

  Ajouter les entrees suivantes dans  le  fichier  /etc/printcap  et  le
  systeme  client  Linux,  creer  le  repertoire  de  spool, et ainsi de
  suite...

                fax:\
                          :sd=/var/spool/fax:\
                          :mx#0:\
                          :sh:\
                          :rm=host.domain:\
                          :rp=fax:

  ajouter le nom de l'hote client dans  /etc/hosts.lpd  sur  la  machine
  serveur de fax.

  Utiliser comme precedemment.

  Note:

  La chaine de caractere d'entete qu'efax ajoute aux pages des fax n'est
  pas effectue par l'utilisateur qui envoi le  fax.  (peut  etre  mis  a
  jour).

  22..55..11..

  UUttiilliissaatteeuurrss ddee CCaallddeerraa,, LLPPRRnngg

  Le  logiciel  de  controle  d'impression  LPRng  utilise  une  methode
  differente pour prendre en charge le fichier de controle.

  Merci a Luca Montecchiani m.luca@usa.net, qui a trouve le probleme  et
  la solution. Voici une mise a jour du fichier /usr/bin/fax. Les lignes
  suivantes remplacent les deux simples lignes de cfile=...  aux  lignes
  586,587

         # Modified to work also with the LPRng package
         # Luca Montecchiani (08/11/97 m.luca@usa.net)
         if [ !-z "$CONTROL_FILE" ]
             then
                 cfile=`cat tail -1 lock`
                 cfile=`cat $cfile`
             else
                 cfile=$CONTROL_FILE
         fi

  33..

  DDeerrnniieerree vveerrssiioonn,, CCoonnttaacctteerr ll''aauutteeuurr..

  La  derniere version de ce fichier peut etre trouve a travers le world
  wide web en utilisant les URLs

  +o  <http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.sgml>

  +o  <http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.html>

  +o  <http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.txt>

  +o  <http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.info>

  Vous pouvez me contacter :

  Erez Strauss

  +o  erez@newplaces.com

  +o   <http://www.newplaces.com/linux/>

  +o   <http://www.newplaces.com/>

  Phone: +972 52 739737 Fax:  +972 9 954 3034

  Traduction franaise: Thierry Bzecourt, Avril 1999.  ( 14
  Octobre 1997 : La mini-HOWTO Linux HTML Validation n'est
  plus maintenue par son auteur. Si vous souhaitez vous en
  occuper, en franais ou en anglais, merci de contacter
  <gregh@sunsite.unc.edu> ) HTML Validation HOWTO
  Keith M. Corbett <kmc@specialform.com>
  v0.2, 29 Octobre 1995

  Cette documentation a pour objet d'expliquer l'utilisation du pro
  gramme nsgmls afin de vrifier qu'un document HTML est conforme  la
  dfinition de type de document (ou "DTD") HTML 2.0. Parmi les dfini
  tions de HTML  partir de SGML, ce DTD est la plus frquemment
  adopte. Il dfinit ainsi un sous-ensemble du balisage HTML correspon
  dant  la pratique courante, ayant les meilleures chances de porta
  bilit sur un nombre important d'agents utilisateurs de HTML (ou "nav
  igateurs").
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Cots et bnfices
     1.2 Pour dbuter

  2. Les Outils

     2.1 "HTML Check Toolkit"
     2.2 L'analyseur nsgmls
     2.3 Tlcharger les spcifications de HTML

  3. Analyser un document HTML

     3.1 Entre de l'analyseur
     3.2 Sortie de l'analyseur
     3.3 Messages de l'analyseur
     3.4 Code de retour

  4. Liens



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ceci est un guide d'utilisation de l'analyseur nsgmls pour valider et
  traiter des documents HTML.


  11..11..  CCoottss eett bbnnffiicceess

  Vous enrichirez vos documents HTML en utilisant toutes les capacits
  de SGML. Mais la validation de vos documents par rfrence au DTD HTML
  a un certain nombre d'avantages et d'inconvnients, avant tout parce
  que vous avez affaire  un dialecte de HTML plus restreint que celui
  qui est utilis actuellement. Les rgles "officielles" spcifiant la
  structure d'un document en HTML et les rgles concernant le balisage
  des donnes en SGML sont plus strictes que ne l'est la pratique
  courante sur le Web.

  La premier point, et le plus important, est d'avoir conscience que le
  codage HTML correct se rduit  un ensemble normalis de balises.


  Il n'existe pas de DTD couramment accept qui reflte exactement le
  "HTML des navigateurs", tel qu'il est compris par de nombreux
  programmes clients de navigation. Pour l'essentiel, le DTD HTML 2.0
  contient les balises et les attributs les plus communment utiliss
  sur le Web autour de juin 1994. Divers efforts visant  dfinir un DTD
  HTML+ ou HTML 3.0 se trouvent plus ou moins dans une impasse. Et aucun
  des DTD en circulation ne reconnatra l'ensemble des balises rendues
  populaires par des diteurs de navigateurs comme Netscape et
  Microsoft.


  11..22..  PPoouurr ddbbuutteerr

  Contrairement  ce que beaucoup de gens croient, il est possible de
  travailler en SGML sans y consacrer trop de temps ou d'argent. On peut
  mettre en place un environnement de dveloppement solide en utilisant
  exclusivement des logiciels disponibles gratuitement sur un grand
  nombre de plateformes, y compris Linux, DOS et la plupart des stations
  de travail Unix. Grce  quelques personnes qui s'y sont consacres,
  tous les outils dont vous avez besoin pour travailler en SGML sont
  disponibles publiquement sur Internet.

  La mise en place de votre environnement (l'analyseur et les
  bibliothques) prend un peu de temps, mais pas autant qu'on pourrait
  le croire.

  Au cas o vous prouveriez l'envie de lire un texte d'introduction 
  SGML (en anglais) : "SGML: An Author's Guide to the Standard
  Generalized Markup Language" par Martin Bryan, ou "Practical SGML" par
  Eric van Herwijnen.


  22..  LLeess OOuuttiillss


  22..11..  ""HHTTMMLL CChheecckk TToooollkkiitt""

  Si vous voulez un logiciel s'installant automatiquement et qui soit
  bien intgr, rcuprez HTML Check Toolkit  l'addresse
  <http://www.halsoft.com/html-tk/index.html>.

  Le seul inconvnient du logiciel HalSoft est qu'il utilise le vieil
  analyseur sgmls, qui produit des messages d'erreur parfois (encore)
  plus difficiles  comprendre que ceux de nsgmls.

  J'ai utilis nsgmls sur Linux et Windows (3.x et NT) ; il marche en
  principe sur de nombreuses autres plateformes.


  22..22..  LL''aannaallyysseeuurr nnssggmmllss

  James Clark a mis au point sun ensemble logiciel nomm sp, qui
  contient un analyseur et un validateur SGML, nsgmls (c'est le
  successeur de l'analyseur sgmls, longtemps considr comme le
  programme de rfrence).

  Pour plus d'informations sur sp, voyez l'URL
  <http://www.jclark.com/sp.html>.

  Et vous pouvez le tlcharger directement depuis
  <ftp://ftp.jclark.com/pub/sp/>.

  Vouz pouvez peut-tre aussi rcuprer des fichiers excutables pour
  votre plateforme. Ou bien tlcharger le code source, et dans ce cas
  suivez les instructions du fichier README pour lancer make.

  Il serait utile de crer un rpertoire public au sommet de la
  hirarchie, pour y mettre les fichiers relatifs  SGML. Par exemple,
  sur mon PC Linux, j'ai plusieurs rpertoires pour SGML, dont :


    /usr/sgml/bin

    /usr/sgml/html

    /usr/sgml/sgmls

    /usr/sgml/sp


  22..33..  TTllcchhaarrggeerr lleess ssppcciiffiiccaattiioonnss ddee HHTTMMLL

  Le projet de norme HTML 2.0 contient le fichier de dfinitions SGML
  dont vous aurez besoin pour utiliser l'analyseur, c'est--dire le DTD
  (Document Type Definition), la dclaration SGML, et le catalogue
  d'entit. Vous pouvez obtenir le texte public de HTML 2.0  l'adresse

  <http://www.w3.org/hypertext/WWW/MarkUp/html-spec/>

  Tlchargez et installez les fichiers suivants :


    DTD : html*.dtd

    Dclaration SGML : html.decl

    Catalogue d'entits : catalog

  Vous pouvez ajouter deux entres au catalogue des entits HTML pour
  faciliter l'utilisation de nsgmls :


     ______________________________________________________________________
             -- catalog: SGML Open style entity catalog for HTML --
             -- $Id: catalog,v 1.2 1994/11/30 23:45:18 connolly Exp $ --
      :
      :
             -- Ajouts pour faciliter l'utilisation de nsgmls --
     SGMLDECL        "html.decl"
     DOCTYPE HTML    "html.dtd"
     ______________________________________________________________________



  Ou bien vous pouvez crer un second catalogue contenant ces entres.
  Vous passerez ensuite ce catalogue  nsgmls comme argument, avec
  l'option -m.


  33..  AAnnaallyysseerr uunn ddooccuummeenntt HHTTMMLL

  Voici une "recette" pour valider un document unique. Lancez simplement
  le programme nsgmls en lui passant le chemin du (ou des) fichier(s) du
  catalogue HTML, ainsi que le document :


         % nsgmls -s -m /usr/sgml/html/catalog <test.html



  L'option -s supprime la sortie de l'analyseur (voyez ci-dessous).

  33..11..  EEnnttrree ddee ll''aannaallyysseeuurr

  Votre document doit tre conforme  la norme SGML, ce qui signifie,
  entre autres, que le type de document doit tre dclar au dbut de
  l'entre (vous pouvez contourner cette rgle en spcifiant cette
  information sur la ligne de commande de nsgmls).

  Voici un document HTML simple, qui peut tre analys sans erreur en
  suivant les rgles que j'ai dcrites :


     ______________________________________________________________________
     <!doctype html public "-//IETF//DTD HTML 2.0//EN">
     <html>
     <head>
     <title>Document HTML simple.</title>
     </head>
     <body>
     <h1>Document de test</h1>
     <p>Ceci est un document de test.</p>
     </body>
     </html>
     ______________________________________________________________________




  33..22..  SSoorrttiiee ddee ll''aannaallyysseeuurr

  La sortie standard du programme nsgmls est une forme concentre de
  l'entre SGML que les systmes de traitement peuvent utiliser comme un
  analyseur lexical afin de parcourir la structure du document. Pour les
  besoins de la validation, vous pouvez oublier la sortie standard et ne
  vous occuper que de l'erreur standard.

  Si vous souhaitez avoir la sortie complte, ne spcifiez pas l'option
  -s et redirigez la sortie vers un fichier


         % nsgmls -m /usr/sgml/html/catalog <test.html >test.out




  33..33..  MMeessssaaggeess ddee ll''aannaallyysseeuurr

  Les messages d'erreur et d'avertissement de nsgmls peuvent tre trs
  difficiles  dchiffrer. Et vous trouverez un grand nombre d'erreurs
  rsultant d'un balisage non-conforme.

  Pour rediriger les messages vers un fichier, utilisez l'option -f :


         % nsgmls -s -m /usr/sgml/html/catalog -f test.err <test.html




  33..44..  CCooddee ddee rreettoouurr

  L'analyseur indique si le document est conforme au DTD HTML de deux
  manires :

  Code de retour - l'analyseur renvoit un code de sortie de 0 en cas de
  succs, diffrent de 0 sinon.

  Sortie - si le document est conforme au DTD, la dernire ligne de la
  sortie standard contient un caractre C unique.


  44..  LLiieennss

  "HTML Check Toolkit" de HalSoft se trouve  l'adresse
  <http://www.halsoft.com/html-tk/index.html>.

  La page de James Clark sur sp se trouve  l'adresse
  <http://www.jclark.com/sp.html>.

  La page du W3C sur la spcification de HTML se trouve  l'adresse
  <http://www.w3.org/hypertext/WWW/MarkUp/html-spec/>.




















































  Hard Disk Upgrade Mini How-To
  Yves Bellefeuille, yan@ottawa.com
  traduction Eric Cano, Eric.Cano@cern.ch
  Version 1.0, 31 janvier 1998, traduction mars 1998

  Comment copier un systeme LLiinnuuxx d'un disque dur a un autre

  11..  IInnttrroodduuccttiioonn

  Recemment,  j'ai remplace mon petit disque dur de 249 Mo par un disque
  plus grand. Je voulais transferer mon LLiinnuuxx entier,  LILO  inclus,  de
  l'ancien au nouveau disque.  Voici comment je l'ai fait.

  Dans  les explications qui suivent, j'utilise "/dev/hda" pour designer
  mon "ancien" disque, "/dev/hda1" designe mon ancienne partition LLiinnuuxx.
  "/dev/hdb"  designe  le  nouveau  disque,  et  "/dev/hdb1" la nouvelle
  partition LLiinnuuxx.

  Je suppose donc que LLiinnuuxx est sur la  premiere  partition  du  premier
  disque.  Adaptez ceci a votre propre configuration.

  Ce  document est base sur mon propre systeme, qui fait tourner une RReedd
  HHaatt 44..22, et j'ai teste toutes les commandes  qui  suivent  sous  cette
  distribution.   Je  les  ai aussi testees sous une DDeebbiiaann 11..33..11 et une
  SSllaacckkwwaarree 33..33, et j'indique quelques differences a prendre  en  compte
  si vous utilisez ces distributions.

  Si  ces  commandes  ne  marchent  pas correctement sous votre systeme,
  faites le moi - _N_d_T _l_'_a_u_t_e_u_r_, _p_a_s _l_e _t_r_a_d_u_c_t_e_u_r - savoir, en indiquant
  la version de LLiinnuuxx que vous utilisez.

  22..  IInnssttaalllleezz lleess ddeeuuxx ddiissqquueess ddaannss vvoottrree ssyysstteemmee

  Comme  les  systemes  modernes  peuvent  accepter quatre peripheriques
  "EIDE" sur le controleur de disque dur, vous ne devriez pas  avoir  de
  probleme  pour  installer  en  meme  temps  les deux disques sur votre
  systeme, meme si vous avez d'autres peripheriques  EIDE.  Les  disques
  durs  et  les lecteurs de CD-ROM sont des peripheriques EIDE typiques.
  Les lecteurs de disquettes et de bandes sont connectes le plus souvent
  sur le controleur de disquettes plutot que sur le controleur de disque
  dur.

  Les controleurs SCSI  sont  plus  souples  et  peuvent  accepter  sept
  peripheriques.   Si  vous etes assez chanceux (et riche) pour avoir un
  controleur SCSI, vous savez  sans  doute  deja  cela,  et  vous  savez
  probablement  lesquels, parmi vos peripheriques, sont SCSI ! Pour plus
  d'information,         voyez          le          SCSI          How-To
  <http://www.freenix.fr/linux/HOWTO/SCSI-HOWTO.html>.

  Meme  les  systemes les plus vieux peuvent accepter deux peripheriques
  sur le controleur de disque dur, donc vous pouvez  toujours  installer
  deux  disques  en  meme  temps.  Toutefois,  si  vous  avez  un  autre
  peripherique installe en plus de votre disque dur,  (par  exemple,  si
  vous  avez  un  disque  dur  et un CD-ROM) vous devrez retirer l'autre
  peripherique pour pouvoir installer le nouveau et l'ancien disque  dur
  en meme temps.

  Vous  devez  configurer  les  disques  comme  "maitre" ou "esclave" en
  placant les cavaliers de facon appropriee.  Vous trouverez souvent des
  informations sur leur configuration sur les disques eux memes ; sinon,
  consultez les manuels ou les fabricants de vos disques.

  Vous devez aussi informer le BIOS de la presence  des  disques  et  de
  leur  "geometries".  En  general  vous entrez dans le Setup du BIOS en
  pressant une touche durant le demarrage du systeme. Voila la marche  a
  suivre avec quelques BIOS courants :

     AAmmeerriiccaann MMeeggaattrreennddss ((AAMMII))
        Touche _S_u_p_p_r pendant l'autotest de demarrage.

     AAwwaarrdd
        _C_t_r_l_-_A_l_t_-_E_c_h_a_p

     CCoommppaaqq
        Touche _F_1_0 apres que le carre soit apparu dans le coin en haut a
        droite de l'ecran a la mise en route.

     DDeellll
        _C_t_r_l_-_A_l_t_-_E_n_t_r_e_e

     DDTTKK
        Touche _E_c_h_a_p pendant l'autotest de demarrage.

     IIBBMM PPSS//22
        _C_t_r_l_-_A_l_t_-_S_u_p_p_r, puis _C_t_r_l_-_A_l_t_-_I_n_s_e_r quand le curseur est dans le
        coin en haut a droite de l'ecran.

     PPhhooeenniixx
        _C_t_r_l_-_A_l_t_-_E_c_h_a_p, ou _C_t_r_l_-_A_l_t_-_S, ou _C_t_r_l_-_A_l_t_-_E_n_t_r_e_e

     AAuuttrreess......
        De   nombreux   autres   systemes  ont  besoin  d'une  disquette
        d'_i_n_s_t_a_l_l_a_t_i_o_n ou de _r_e_f_e_r_e_n_c_e

  (Je - _N_d_T _: _l_'_a_u_t_e_u_r - suis interesse par  des  informations  sur  les
  autres BIOS pour les inclure dans cette liste.)

  Redemarrez le systeme et loguez-vous root.

  33..  DDeemmoonntteezz lleess ppaarrttiittiioonnss nnoonn--LLiinnuuxx

  Certains aiment monter les partitions d'autres systemes d'exploitation
  (DDOOSS, WWiinnddoowwss, OOSS//22, etc.)  pour pouvoir les utiliser sous LLiinnuuxx.  Ces
  partitions  devraient  etre creees et copiees sous leur propre systeme
  d'exploitation, et vous devriez les demonter  avant  de  copier  votre
  partition  LLiinnuuxx.  Par  exemple,  si vous avez une partition montee en
  /dos, vous devez la demonter avec cette commande :

          umount /dos

  Notez que la commande est "umount", avec le premier "n" qui manque par
  rapport au mot "_u_n_m_o_u_n_t" _- _N_d_T _"_d_e_m_o_n_t_e_r_" _e_n _a_n_g_l_a_i_s.

  44..  PPaarrttiittiioonnnneezz llee nnoouuvveeaauu ddiissqquuee

  Utilisez la commande :

          fdisk /dev/hdb

  pour partitionner le nouveau disque.

  Pour  plus d'informations sur le partitionnement, voyez l'Installation
  How-To <http://www.freenix.fr/linux/HOWTO/Installation-HOWTO.html>  et
  le   Partitionning   Mini  How-To  <http://www.freenix.fr/linux/HOWTO-
  vo/mini/Partition>.

  Si votre disque a plus de 1024 cylindres, voyez  le  Large  Disk  Mini
  How-To    <http://www.freenix.fr/linux/HOWTO-vo/mini/Large-Disk>.   En
  bref, vous devriez installer tous les fichiers  requis  pour  demarrer
  LLiinnuuxx dans les 1024 premiers cylindres.  Une facon de s'en assurer est
  de creer une petite partition (1Mo ou 2Mo) juste  pour  le  repertoire
  /boot  au debut du disque. (ssppeecciiffiicciittee SSllaacckkwwaarree : comme le noyau est
  plutot  en  /vmlinuz  qu'en  /boot/vmlinuz,  vous  devez  mettre   les
  repertoires / et /boot dans cette partition.)

  Les  partitions  pour  les  systemes  autres  que LLiinnuuxx devraient etre
  creees en utilisant leur propre fdisk plutot que celui de LLiinnuuxx.

  55..  FFoorrmmaatteezz llee nnoouuvveeaauu ddiissqquuee..

  Utilisez la commande suivante pour formater le nouveau disque :

          mkfs.ext2 /dev/hdb1

  Pour rechercher les mauvais blocs (defauts physiques) sur  le  disque,
  ajoutez l'option -c juste avant "/dev/hdb1".

  (_N_o_t_e  _:  Contrairement  a  ce  qu'indiquent  les  pages de manuel, la
  commande  "mkfs  -t  ext2  /dev/hdb1"  ne  recherche  pas  les   blocs
  defectueux, sous aucune de la RReedd HHaatt, DDeebbiiaann ou SSllaacckkwwaarree.)

  66..  MMoonntteezz llee nnoouuvveeaauu ddiissqquuee

  Creez un repertoire la ou vous monterez le nouveau disque, par exemple
  /new-disk, et montez le :

          mkdir /new-disk
          mount -t ext2 /dev/hdb1 /new-disk

  77..  CCooppiieezz lleess ffiicchhiieerrss ddee ll''aanncciieenn ddiissqquuee aauu nnoouuvveeaauu

  Il faut reproduire completement la structure du disque, liens  inclus.

  Toutefois,  il  ne faut _p_a_s copier le repertoire /new-disk, puisque ca
  reviendrait a recopier le nouveau disque sur lui-meme !

  De plus, il faut copier le repertoire /proc  sur  le  nouveau  disque,
  mais  pas  son  contenu : "/proc" est un systeme de fichiers "virtuel"
  qui ne contient pas de vrais fichiers, mais  plutot  des  informations
  sur les processus qui tournent sur le systeme.

  Voici  quatre facons de copier un vieux disque sur un nouveau. Ca peut
  prendre du temps, d'autant plus que le disque est gros ou  la  memoire
  peu  importante.   Vous pouvez vous attendre a copier 10Mo par minute,
  ou meme plus.

  Vous pouvez suivre la progression de la copie en utilisant la commande
  "df"  depuis un autre terminal. Si vous etes aussi bon public que moi,
  essayez "watch df" ou "watch ls -l /new-disk" pour voir un rapport mis
  a  jour  toutes  les  deux  secondes  ;  utilisez  _C_t_r_l_-_C pour arreter
  l'affichage. Soyez conscient que la commande "watch"  va  ralentir  la
  copie.

  1.      cp -ax / /new-disk

  Ceci  est la methode la plus simple, mais ne fonctionnera que si votre
  systeme LLiinnuuxx est sur une seule partition. L'option -a preserve autant
  que  faire  se peut le systeme original. L'option -x restreint cp a un
  seul systeme de fichiers. Ceci est necessaire pour  eviter  de  copier
  les repertoires /proc et /new-disk.

  2.  cd / && cp -a `/bin/ls -1A | egrep -v "^new-disk$|^proc$"` /newdisk

  Ceci  va  a la racine puis copie tous les fichiers et repertoires sauf
  /proc et /new-disk. Notez que la  premiere  option  apres  ls  est  le
  chiffre "1", et non la lettre "L" !

  Cette commande devrait fonctionner en toutes circonstances.

  3.       (cd / && tar cpf - . --exclude new-disk --exclude proc) | (cd
           /new-disk && tar xpf -)

  (Ecrire cette commande sur une seule ligne)

  Ceci  va dans le repertoire racine, "archive" tout sauf /proc et /new-
  disk, va dans /new-disk et "desarchive" tout la. Notez qu'il  ne  doit
  pas  y avoir de slash ("/") avant ou apres les noms de repertoire dans
  les options --exclude.

  (_N_o_t_e : L'option -l ne marche pas  ici,  puisque  tar  recreerait  les
  repertoires  /proc et /new-disk meme s'il ne copie pas leurs contenus.
  C'est pourquoi l'option -l de tar n'a pas  le  meme  comportement  que
  l'option -x de cp.)

  Cette methode est quelque peu plus lente que les autres.

  4.      cp -a /bin /boot /dev /etc /home /lib /lost+found /mnt /root /sbin
          /tmp /usr /var /new-disk

  (Ecrire la commande sur une seule ligne)

  Le  dernier repertoire, /new-disk, est la destination pour la commande
  cp. Tous les autres repertoires sont les sources.  C'est  pourquoi  je
  copie tous les repertoires listes dans /new-disk.

  Avec  cette  methode, vous faites simplement une liste des repertoires
  que vous voulez copier.  Ici  j'ai  indique  tous  mes  repertoires  a
  l'exception  de  /proc et /new-disk. Si vous ne pouvez utiliser aucune
  des   methodes  pour  une  raison  quelconque,  vous  pouvez  toujours
  utiliser  cette  commande  pour specifier manuellement les repertoires
  que vous voulez copier.

  Avec cette methode seulement, s'il y a des fichiers dans le repertoire
  racine  lui-meme,  vous  avez  besoin  d'une  autre  commande pour les
  copier.  En particulier, ceci est requis avec les DDeebbiiaann et SSllaacckkwwaarree,
  car ces distributions placent des fichiers dans le repertoire racine :

           cp -dp /* /.* /new-disk

  Apres avoir utilise une methode parmi les  quatre,  vous  devez  aussi
  creer le repertoire /proc sur le nouveau disque :

          mkdir /new-disk/proc

  A  ce point, vous pouvez, si vous le voulez, verifier la structure des
  fichiers sur le nouveau disque :

          umount /new-disk
          fsck.ext2 -f /dev/hdb1
          mount -t ext2 /dev/hdb1 /new-disk

  Vous pouvez aussi utiliser le script suivant pour  comparer  les  deux
  disques, et vous assurer que les fichiers ont ete copies correctement.

  #!/bin/sh
  cd /
  for file in `/bin/ls -1A | egrep -v '^new-disk$|^proc$'`
  do
      find $file -xtype f -exec cmp \{\} /new-disk/\{\} \;
  done

  (SSppeecciiffiicciittee SSllaacckkwwaarree : une installation de  base  n'inclut  pas  les
  commandes  "cmp"  et  "diff",  alors  vous  ne  pourrez pas lancer ces
  scripts si vous avez seulement installe les fichiers de base.)

  Ceci compare seulement les  fichiers  normaux,  et  non  les  fichiers
  speciaux  associes  a  des peripheriques (dans le repertoire /dev, les
  sockets, etc., car la commande cmp ne fonctionne pas correctement avec
  ceux-ci. Je - _N_d_T _l_'_a_u_t_e_u_r - serais interesse par toute suggestion sur
  le moyen de verifier ces fichiers "speciaux").

  88..  MMeetttteezz aa jjoouurr ""//eettcc//ffssttaabb"

  Si votre nouveau disque  n'a  pas  les  meme  partitions  ou  la  meme
  organisation   que   l'ancien,   modifiez  le  fichier  /etc/fstab  en
  consequence. Souvenez vous que ce fichier se  trouve  actuellement  en
  /new-disk/etc/fstab.

  Assurez  vous  que  les  partitions de disque dans la premiere colonne
  correspondent a l'organisation que vous aurez sur le  nouveau  disque,
  une  fois que l'ancien disque aura ete enleve, et que vous ne monterez
  plus qu'une partition en "/", comme indique dans la seconde colonne.

  99..  PPrreeppaarreezz LLIILLOO pour demarrer le nouveau disque

  C'est le point complique. Je suppose que LILO est installe sur le bloc
  principal  de demarrage (_m_a_s_t_e_r _b_o_o_t _r_e_c_o_r_d_, _M_B_R); ceci semble etre la
  configuration la plus courante.

  Vous voulez installer LILO sur  ce  qui  est  actuellement  le  second
  disque  dur.   Il  est clair que LILO ne peut pas etre _l_a_n_c_e depuis le
  second disque dur; toutefois, la documentation  de  LILO  anticipe  le
  fait  que  vous  vouliez  _i_n_s_t_a_l_l_e_r LILO sur le second disque dur, par
  exemple si le premier disque dur doit etre enleve :

       LILO ne peut etre stocke sur aucun des emplacements suivants :

       - sur le second disque dur. (A moins que, pour des besoins de
       sauvegarde, si le premier disque dur va etre retire ou desactive,
       ou si un autre lanceur, qui est capable de charger les secteurs de
       demarrage d'autres disques, est installe.)

  Toutefois, la documentation n'explique pas la facon  d'installer  LILO
  sur  le second disque dur si le premier va etre retire, et j'ai deduit
  apres de nombreux essais qu'il n'est pas possible d'installer LILO sur
  le MBR du second disque dur et de le faire marcher du premier coup.

  A  la  place,  je  suggere  d'utiliser une disquette de demarrage pour
  demarrer sur le nouveau disque dur la premiere fois.

  Inserez une disquette vide, formatez la, creez y un systeme de fichier
  et montez la :

           fdformat /dev/fd0H1440
           mkfs.ext2 /dev/fd0
           mount -t ext2 /dev/fd0 /mnt

  (DDeebbiiaann  sseeuulleemmeenntt  :  La  commande  "fdformat" n'est pas incluse dans
  l'installation de base chez DDeebbiiaann. Si vous n'avez pas cette commande,
  vous pouvez l'ignorer si la disquette est deja formatee.  Dans ce cas,
  vous devez rechercher les secteurs  defectueux  sur  la  disquette  en
  ajoutant l'option "-c" apres la commande "mkfs.ext2".)

  (DDeebbiiaann  eett  SSllaacckkwwaarree  sseeuulleemmeenntt  :  utilisez  la  commande "fdformat
  /dev/fd0h1440" avec un "h" minuscule)

  copiez tous les fichiers de /boot sur la disquette :

           cp -dp /boot/* /mnt

  (SSllaacckkwwaarree sseeuulleemmeenntt : Copiez le fichier /vmlinuz sur la disquette  de
  boot; utilisez la commande "cp /vmlinuz /mnt".)

  Creez un nouveau fichier /mnt/lilo.conf comme suit :

  boot=/dev/fd0           # Installe LILO sur la disquette.
  map=/mnt/map            # Emplacement du fichier de correspondance.
  install=/mnt/boot.b     # Fichier a copier sur le secteur d'amorce.
  prompt                  # Faire afficher l'invite "LILO boot:" par LILO.
  timeout=50              # Lancer le systeme par defaut apres 5 secondes.
                          # (La valeur est en dixiemes de seconde.)
  image=/mnt/vmlinuz      # Emplacement du noyau Linux sur la disquette.
      label=linux         # Etiquette du systeme Linux.
      root=/dev/hda1      # Emplacement de la racine sur le nouveau disque
                          # dur. Mettre en accord avec votre systeme.
                          # Notez que vous devez utiliser le nom du futur
                          # emplacement, une fois que l'ancien disque aura
                          # ete retire.

  (DDeebbiiaann  sseeuulleemmeenntt  :  Sur  la  ligne "image", utilisez le vrai nom du
  noyau  LLiinnuuxx.   Par   exemple   avec   la   DDeebbiiaann   1.3.1,   utilisez
  "/mnt/vmlinuz-2.0.29".)

  Installez LILO sur la disquette de demarrage :

           /sbin/lilo -C /mnt/lilo.conf

  L'option "-C" dit a "/sbin/lilo" quel fichier utiliser.

  Demontez la disquette :

           umount /mnt

  et lancez la procedure d'extinction du systeme.

  1100..  RReettiirreezz ll''aanncciieenn ddiissqquuee

  Apres  avoir  retire  l'ancien  disque,  n'oubliez pas de modifier les
  cavaliers de configuration du disque,  et  l'information  du  BIOS  en
  rapport avec les changements.

  1111..  RReeddeemmaarrrreezz llee ssyysstteemmee,, iinnssttaalllleezz LLIILLOO sur le nouveau disque

  Redemarrez le systeme depuis la disquette que  vous  venez  de  creer.
  Pour  cela, vous devez modifier la sequence de demarrage de votre BIOS
  en "A: C:"

  Faites tous les changement necessaires dans le fichier  /etc/lilo.conf
  et  lancez  /sbin/lilo pour installer LILO sur le nouveau disque. Avec
  une DDeebbiiaann, assurez vous que la ligne "boot" indique "/dev/hda" plutot
  que "/dev/hda1" ou quelque chose de similaire si vous voulez installer
  LILO sur le secteur d'amorce du disque dur.

  Vous pouvez essayer de redemarrer votre systeme depuis  votre  nouveau
  disque  dur  pour  verifier  que  tout  marche  bien. Si vous avez des
  problemes, vous pouvez toujours utiliser la  disquette  pour  demarrer
  votre systeme.

  1122..  RReemmeerrcciieemmeennttss

  Je  tiens  a  remercier  tout  specialement  le  _D_r  _K_o_n_r_a_d  _H_i_n_s_e_n de
  l'Institut  de  Biologie  structurale  de  Grenoble,  France,  qui   a
  gentiment  agit  comme mon gourou LLiinnuuxx personnel. Merci aussi a _F_r_a_n_k
  _D_a_m_g_a_a_r_d,  _P_a_u_l  _K_o_n_i_n_g,  et  _J_o_s_h  _R_a_b_i_n_o_w_i_t_z,   ainsi   qu'a   _S_c_o_t_t
  _C_h_r_i_s_t_e_n_s_e_n   pour   avoir   attire   mon   attention   sur   quelques
  particularites de la SSllaacckkwwaarree.

  Mini-HOWTO programmation des ports d'E/S sous Linux
  (c) 1995 Riku Saikkonen rjs@spider.compart.fi
  26 Dec 1995

  Ce  HOWTO traite de l'utilisation des ports d'E/S ainsi que de la pro-
  grammation  de  mini-temporisations  (de  quelques   microsecondes   a
  quelques  millisecondes)  en  C sous Linux (mode utilisateur) sur pro-
  cesseur Intel x86. Ce document est issu  du  minuscule  IO-Port  mini-
  HOWTO du meme auteur. Si vous avez des modifications a apporter ou des
  complements a ajouter, n'hesitez pas a m'envoyer un message  (rjs@spi-
  der.compart.fi)...  Innombrables  modifications  depuis  la precedente
  version (16 Nov 1995) dont l'ajout des specifications du  port  paral-
  lele.    Adaptation    francaise    realisee   par   Nicolas   Lejeune
  (nl@freenix.fr).

  11..  UUttiilliissaattiioonn ddeess ppoorrttss dd''EE//SS ddaannss lleess pprrooggrraammmmeess CC

  11..11..  MMeetthhooddee ccllaassssiiqquuee

  Les routines permettant l'acces aux ports  d'E/S  sont  definies  dans
  //uussrr//iinncclluuddee//aassmm//iioo..hh (ou lliinnuuxx//iinncclluuddee//aassmm--ii338866//iioo..hh dans les sources
  du noyau). Ce sont des macros "inline", il  suffit  donc  de  #inclure
  <<aassmm//iioo..hh>> ; Aucune autre bibliotheque (_l_i_b_r_a_r_y, NDT) n'est requise.

  Du  fait  d'une  limitation  de ggcccc (au moins jusqu'a la version 2.7.0
  comprise), vous ddeevveezz compiler tout code source utilisant ces routines
  avec les options d'optimisation (i.e. _g_c_c _-_O). Une autre limitation de
  ggcccc empeche de compiler a la fois avec les options  d'optimisation  et
  de  mise au point (_-_g). Cela signifie que si vous desirez utiliser ggddbb
  sur un programme manipulant les  ports  d'E/S,  il  est  judicieux  de
  mettre  les  routines utilisant les ports d'E/S dans un fichier source
  separe, puis, lors de la mise au point, de compiler ce fichier  source
  avec l'option d'optimisation, le reste avec l'option de mise au point.

  Avant d'utiliser  un  port,  il  faut  donner  a  votre  programme  la
  permission  de  le  faire.  Il  suffit pour cela d'appeler la fonction
  iiooppeerrmm((22)) (declaree dans uunniissttdd..hh et definie dans  le  noyau)  quelque
  part au debut de votre application (avant tout acces a un port d'E/S).
  La syntaxe est iiooppeerrmm((ffrroomm,,nnuumm,,ttuurrnn__oonn)), ou ffrroomm represente le premier
  numero  de  port  et  nnuumm  le  nombre  de  ports  consecutifs a rendre
  accessibles. Par exemple, iiooppeerrmm((00xx330000,,55,,11));; autoriserait l'acces  aux
  ports  0x300  a  0x304  (5 ports au total). Le dernier argument est un
  booleen precisant si l'on desire donner (vrai (1))  ou  retirer  (faux
  (0))  l'acces au port. Pour autoriser plusieurs ports non consecutifs,
  on peut appeler iiooppeerrmm(()) autant que necessaire. Consultez la  page  de
  manuel de iiooppeerrmm((22)) pour avoir des precisions sur la syntaxe.

  Votre  programme  ne  peut  appeler  iiooppeerrmm(())  que  s'il  possede  les
  privileges de root ; pour  cela,  vous  devez  soit  le  lancer  comme
  utilisateur  root,  soit le rendre suid root. Il devrait etre possible
  (Je n'ai pas essaye ; SVP, envoyez-moi un message si vous l'avez fait)
  d'abandonner  les privileges de root une fois l'acces aux ports obtenu
  par iiooppeerrmm(()). Il n'est pas necessaire d'appeler iiooppeerrmm((......,,00)) a la fin
  du programme pour abandonner explicitement les droits, cette procedure
  etant automatique.

  Les privileges accordes  par  iiooppeerrmm(())  demeurent  lors  d'un  ffoorrkk(()),
  eexxeecc(()) ou sseettuuiidd(()) en un utilisateur autre que root.

  iiooppeerrmm(()) ne permet l'acces qu'aux ports 0x000 a 0x3ff ; pour les ports
  superieurs, il faut utiliser iiooppll((22)) (qui donne des  droits  sur  tous
  les ports d'un coup) ; je ne l'ai jamais fait, regardez le manuel pour
  en savoir plus. Je suppose que l'argument lleevveell  doit  valoir  3  pour
  autoriser  l'acces.  SVP,  envoyez-moi  un  message  si  vous avez des
  precisions a ce sujet.

  Maintenant, l'utilisation proprement dite... Pour lire un octet sur un
  port,  appelez  iinnbb((ppoorrtt));;  qui  retourne  l'octet correspondant. Pour
  ecrire un octet, appelez oouuttbb((vvaalluuee,, ppoorrtt));; (attention a  l'ordre  des
  parametres). Pour lire un mot sur les ports x et x+1 (mot forme par un
  octet de chaque port, comme l'instruction INW en assembleur),  appelez
  iinnww((xx));;. Pour ecrire un mot vers deux ports, oouuttww((vvaalluuee,,xx));;.

  Les  macros  iinnbb__pp(()), oouuttbb__pp(()), iinnww__pp(()) et oouuttww__pp(()) fonctionnent de la
  meme facon que celles precedemment evoquees, mais elles respectent, en
  plus,  une  courte attente (environ une microseconde) apres l'acces au
  port;  vous  pouvez  passer  l'attente  a  quatre   microsecondes   en
  #definissant  RREEAALLLLYY__SSLLOOWW__IIOO  avant  d'inclure  aassmm//iioo..hh.  Ces  macros
  creent  cette  temporisation  en  ecrivant  (a  moins  que   vous   ne
  #definissiez  SSLLOOWW__IIOO__BBYY__JJUUMMPPIINNGG,  moins  precis certainement) dans le
  port 0x80, vous devez donc prealablement autoriser l'acces a  ce  port
  0x80  avec  iiooppeerrmm(())  (les ecriture vers le port 0x80 ne devraient pas
  affecter  le  fonctionnement  du  systeme  par  ailleurs).   Pour  des
  methodes de temporisations plus souples, lisez plus loin.

  Les  pages  de  manuels  associees  a  ces  macros paraitront dans une
  version future des pages de manuels de Linux.

  11..22..  PPrroobblleemmeess

  11..22..11..  ppoorrttss !!  JJee rreeccoollttee ddeess sseeggmmeennttaattiioonn ffaauullttss  lloorrssqquuee  jj''aacccceeddee
  aauuxx

  Soit votre programme n'a pas les privileges de root,  soit  l'appel  a
  iiooppeerrmm(())  a  echoue  pour  quelqu'autre raison.  Verifiez la valeur de
  retour de iiooppeerrmm(()).

  11..22..22..  ggcccc ssee ppllaaiinntt ddee rreeffeerreenncceess iinnccoonnnnuueess !!  JJee nnee ttrroouuvvee ppaass  lleess
  ddeeffiinniittiioonnss ddeess ffoonnccttiioonnss iinn**(()),, oouutt**(()),,

  Vous n'avez pas compile avec l'option d'optimisation (_-_O), et donc gcc
  n'a  pas pu definir les macros dans aassmm//iioo..hh. Ou alors vous n'avez pas
  #inclus <<aassmm//iioo..hh>>.

  11..33..  UUnnee aauuttrree mmeetthhooddee

  Une  autre  methode  consiste  a  ouvrir  //ddeevv//ppoorrtt  (un  peripherique
  caractere,  major  number 1, minor number 4) en lecture et/ou ecriture
  (en utilisant les fonctions habituelles d'acces aux  fichiers,  ooppeenn(())
  etc.  -  les  fonctions  ff**(()) de stdio utilisent des tampons internes,
  evitez-les). Puis positionnez-vous (_s_e_e_k, NDT) au  niveau  de  l'octet
  approprie  dans  le  fichier  (position  0  dans  le fichier = port 0,
  position 1 = port 1, etc.), lisez-y ou ecrivez-y ensuite un  octet  ou
  un  mot.  Je  n'ai  pas  vraiment  essaye et je ne suis pas absolument
  certain que cela marche ainsi ; envoyez-moi un message  si  vous  avez
  des details.

  Bien evidemment, votre programme doit posseder les bons droits d'acces
  en lecture/ecriture sur //ddeevv//ppoorrtt. Cette methode est probablement plus
  lente que la methode traditionnelle evoquee auparavant.

  11..44..  IInntteerrrruuppttiioonnss ((IIRRQQss)) eett DDMMAA

  Pour autant que je sache, il n'est pas possible d'utiliser les IRQs ou
  DMA directement dans un programme  en  mode  utilisateur.  Vous  devez
  ecrire  un  pilote dans le noyau  voyez le Linux Kernel Hacker's Guide
  (khg-x.yy) pour les details et les sources du noyau pour des exemples.

  22..  RReeggllaaggeess ddee hhaauuttee pprreecciissiioonn

  22..11..  TTeemmppoorriissaattiioonnss

  Tout  d'abord, je dois preciser que, du fait de la nature multi-taches
  preemptive de Linux, on ne peut pas garantir a un  programme  en  mode
  utilisateur  un  controle  exact du temps. Votre processus peut perdre
  l'usage du processeur a n'importe quel instant pour une periode allant
  d'environ  20  millisecondes  a  quelques  secondes  (sur  un  systeme
  lourdement  charge).  Neanmoins,  pour  la  plupart  des  applications
  utilisant  les  ports  d'E/S,  cela  ne  pose  pas  de problemes. Pour
  minimiser cet inconvenient, vous pouvez augmenter  la  priorite  (avec
  nniiccee) de votre programme.

  Il  y  a eu des discussions sur des projets de noyaux Linux temps-reel
  prenant ce phenomene en compte dans  _c_o_m_p_._o_s_._l_i_n_u_x_._d_e_v_e_l_o_p_m_e_n_t_._s_y_s_t_e_m,
  mais  j'ignore  leur  avancement  ;  renseignez-vous dans ce groupe de
  discussion. Si vous en savez davantage, envoyez-moi un message...

  Maintenant,  commencons  par  le  plus  facile.  Pour  des  delais  de
  plusieurs secondes, la meilleure fonction reste probablement sslleeeepp((33)).
  Pour des attentes de quelques dixiemes de secondes (20  ms  semble  un
  minimum),   uusslleeeepp((33))  devrait  convenir.  Ces  fonctions  rendent  le
  processeur aux autres processus, ce qui ne gache pas de temps machine.
  Consultez les pages des manuels pour les details.

  Pour   des  temporisations  inferieures  a  20  millisecondes  environ
  (suivant la vitesse de votre processeur et de votre machine, ainsi que
  la  charge  du systeme), il faut proscrire l'abandon du processeur car
  l'ordonnanceur de Linux ne rendrait  le  controle  a  votre  processus
  qu'apres  20  millisecondes minimum (en general). De ce fait, pour des
  temporisations courtes, uusslleeeepp((33)) attendra souvent  sensiblement  plus
  longtemps que ce que vous avez specifie, au moins 20 ms.

  Pour  les  delais  courts  (de  quelques  dizaines  de microsecondes a
  quelques millisecondes), la methode la plus simple consiste a utiliser
  uuddeellaayy(()),  definie  dans  //uussrr//iinncclluuddee//aassmm//ddeellaayy..hh (lliinnuuxx//iinncclluuddee//aassmm--
  ii338866//ddeellaayy..hh). uuddeellaayy(()) prend  comme  unique  argument  le  nombre  de
  microsecondes a attendre (unsigned long) et ne renvoie rien. L'attente
  dure quelques microsecondes de plus que le parametre specifie a  cause
  du  temps  de  calcul  de  la  duree d'attente (voyez ddeellaayy..hh pour les
  details).

  Pour utiliser uuddeellaayy(()) en dehors du noyau, la variable (unsigned long)
  llooooppss__ppeerr__sseecc doit etre etre definie avec la bonne valeur.  Autant que
  je sache, la seule facon de recuperer cette  valeur  depuis  le  noyau
  consiste  a  lire  le  nombre de BogoMips dans //pprroocc//ccppuuiinnffoo puis a le
  multiplier par 500000. On obtient ainsi une evaluation (imprecise)  de
  llooooppss__ppeerr__sseecc.

  Pour  les  temporisations  encore  plus  courtes,  il existe plusieurs
  solutions.  Ecrire n'importe quel octet sur le port 0x80  (voyez  plus
  haut la maniere de proceder) doit provoquer une attente d'exactement 1
  microseconde, quelque soit le type et la vitesse de votre  processeur.
  Cette  ecriture  ne  devrait  pas  avoir  d'effets secondaires sur une
  machine standard  (et  certains  pilotes  de  peripheriques  du  noyau
  l'utilisent). C'est ainsi que {{iinn||oouutt}}{{bb||ww}}__pp(()) realise normalement sa
  temporisation (voyez aassmm//iioo..hh).

  Si vous connaissez le type de processeur et la vitesse de l'horloge de
  la  machine  sur  laquelle votre programme tournera, vous pouvez coder
  des delais plus courts "en dur" en  executant  certaines  instructions
  d'assembleur  (mais  souvenez-vous  que votre processus peut perdre le
  processeur a tout instant, et, par consequent, que l'attente peut,  de
  temps  a  autres,  s'averer  beaucoup  plus importante). Dans la table
  suivante, la duree d'un cycle d'horloge est determinee par la  vitesse
  interne  du  processeur  ;  par  exemple,  pour  un processeur a 50MHz
  (486DX-50 ou 486DX2-50), un cycle prend 1/50000000 seconde.

       Instruction   cycles sur i386     cycles sur i486
       nop                   3                   1
       xchg %ax,%ax          3                   3
       or %ax,%ax            2                   1
       mov %ax,%ax           2                   1
       add %ax,0             2                   1

       {source : Borland Turbo Assembler 3.0 Quick Reference}

  (desole,  je  n'ai  pas  de  valeurs  pour  les  Pentiums    ce   sont
  probablement les memes que pour i486)

  (Je  ne  connais  pas d'instruction qui n'utilise qu'un seul cycle sur
  i386)

  Les instructions nnoopp et xxcchhgg du tableau n'ont pas  d'effets  de  bord.
  Les  autres peuvent modifier le registre des indicateurs, mais cela ne
  devrait pas avoir de consequences puisque ggcccc est sense le detecter.

  Pour vous servir de  cette  astuce,  appelez  aassmm((""iinnttrruuccttiioonn""));;  dans
  votre programme. Pour "instruction", utilisez la meme syntaxe que dans
  la table precedente ; pour avoir plusieurs instructions dans  un  meme
  aassmm(()),  faites  aassmm((""iinnssttrruuccttiioonn;;  iinnssttrruuccttiioonn;;  iinnssttrruuccttiioonn""));;. Comme
  aassmm(()) est traduit en langage d'assemblage "inline" par gcc, il  n'y  a
  pas de perte de temps consecutive a un eventuel appel de fonction.

  L'architecture   des   Intel  x86  n'autorise  pas  de  temporisations
  inferieures a un cycle d'horloge.

  22..22..  CChhrroonnoommeettrraaggeess

  Pour des chronometrages a la seconde pres,  le  plus  simple  consiste
  probablement   a   utiliser   ttiimmee((22)).   Pour  des  temps  plus  fins,
  ggeettttiimmeeooffddaayy((22))  fournit  une  precision  d'une  microseconde   (voyez
  toutefois, plus haut, les remarques concernant l'ordonnancement).

  Si vous desirez que votre processus recoive un signal apres un certain
  laps de temps, utilisez sseettiittiimmeerr((22)). Consultez les pages des  manuels
  des differentes fonctions pour les details.

  33..  QQuueellqquueess ppoorrttss uuttiilleess

  Voici  quelques informations concernant la programmation des ports les
  plus courants, pouvant servir, a des fins diverses, d'E/S TTL.

  33..11..  LLee ppoorrtt ppaarraalllleellee

  Le port parallele (BASE = 0x3bc pour /dev/lp0, 0x378 pour /dev/lp1  et
  0x278  pour  /dev/lp2)  :  {source  :  _I_B_M  _P_S_/_2 _m_o_d_e_l _5_0_/_6_0 _T_e_c_h_n_i_c_a_l
  _R_e_f_e_r_e_n_c_e, et quelques experiences}

  En plus du mode standard, monodirectionnel en sortie, il existe,  pour
  la  plupart des ports paralleles, un mode "etendu" bidirectionnel.  Ce
  mode possede un bit de sens qui peut etre  positionne  en  lecture  ou
  ecriture.  Malheurement,  j'ignore comment selectionner ce mode etendu
  (il ne l'est pas par defaut)...

  Le port BASE+0 (port de donnees) controle les signaux  de  donnees  du
  port  (D0  a  D7 pour les bits 0 a 7, respectivement ; etats : 0 = bas
  (0V), 1 = haut (5V)). Une ecriture sur ce port recopie (_l_a_t_c_h_e_s,  NDT)
  les  donnees  sur  les broches. En mode d'ecriture standard ou etendu,
  une lecture renvoie les dernieres donnees ecrites. En mode de  lecture
  etendu,  une  lecture renvoie les donnees presentes sur les broches du
  peripherique connecte.

  Le port BASE+1 (port d'etat), en lecture  seule,  renvoie  l'etat  des
  signaux d'entree suivants :

     BBiittss 00 eett 11
        reserves.

     BBiitt 22
        IRQ  status  (ne correspond a aucune broche, j'ignore comment il
        se comporte)

     BBiitt 33
        -ERROR (0=haut)

     BBiitt 44
        SLCT (1=haut)

     BBiitt 55
        PE (1=haut)

     BBiitt 66
        -ACK (0=haut)

     BBiitt 77
        -BUSY (0=haut)

  (Je ne suis pas certain des etats hauts et bas.)

  Le port BASE+2 (port de controle),  en  ecriture  seule  (une  lecture
  renvoie  la  derniere  donnee  ecrite),  controle  les signaux d'etats
  suivants :

     BBiitt 00
        -STROBE (0=haut)

     BBiitt 11
        AUTO_FD_XT (1=haut)

     BBiitt 22
        -INIT (0=haut)
     BBiitt 33
        SLCT_IN (1=haut)

     BBiitt 44
        si positionne a 1, autorise l'IRQ  associee  au  port  parallele
        (qui intervient lors de la transition de -ACK de bas a haut).

     BBiitt 55
        commande  le sens du mode etendu (0 = ecriture, 1 = lecture), en
        ecriture seule (une lecture ne renvoie rien d'utile sur ce bit).

     BBiittss 66 eett 77
        reserves.

  (La non plus, je ne suis pas certain des etats hauts et bas.)

  Brochage  (un  connecteur  25  broches femelle sur le port) (_e=entree,
  _s=sortie) :

  11_e_s -STROBE, 22_e_s D0, 33_e_s D1, 44_e_s D2, 55_e_s D3, 66_e_s D4, 77_e_s D5,  88_e_s  D6,
  99_e_s  D7,  1100_e  -ACK,  1111_e -BUSY, 1122_e PE, 1133_e SLCT, 1144_s AUTO_FD_XT, 1155_e
  -ERROR, 1166_s -INIT, 1177_s SLCT_IN, 1188--2255 Masse.

  Les specifications d'IBM precisent que les broches 1,  14,  16  et  17
  (les sorties de controle) sont a collecteurs ouverts, connectees au 5V
  a travers des resistances de 4,7kiloohms (puits 20mA,  source  0,55mA,
  niveau   de  sortie  haut  5V  moins  la  tension  aux  bornes  de  la
  resistance). Les autres broches ont un courant de puits  de  24mA,  de
  source  de  15mA  et  leur niveau de sortie haut est superieur a 2,4V.
  L'etat bas dans les deux cas est inferieur a 0,5V. Il est probable que
  les ports paralleles des clones s'ecartent de cette norme.

  Enfin,  un  avertissement  :  attention  a  la  mise a la masse.  J'ai
  endommage plusieurs ports paralleles en les connectant  alors  que  la
  machine  fonctionnait.  Il  est conseille d'utiliser un port parallele
  non integre a la carte mere pour faire des choses pareilles.

  33..22..  LLee ppoorrtt jjeeuu

  Le port jeu (ports 0x200-0x207) : je n'ai pas  de  specifications  la-
  dessus, mais je pense qu'il doit y avoir au moins quelques entrees TTL
  et  un  peu  de  puissance  en  sortie.  Si  quelqu'un  possede   plus
  d'informations, qu'il me le fasse savoir...

  33..33..  EE//SS aannaallooggiiqquueess

  Si vous voulez des E/S analogiques, vous pouvez connecter des circuits
  convertisseurs   analogiques-numeriques   (ADC)   et/ou    numeriques-
  analogiques  (DAC)  sur  ces  ports  (astuce  :  pour  l'alimentation,
  utilisez un connecteur d'alimentation (de lecteur) inutilise que  vous
  sortirez du boitier, a moins que votre composant ne consomme tres peu,
  auquel cas le port lui-meme peut fournir la puissance). Sinon, achetez
  une  carte AD/DA (la plupart sont controlees par les ports d'E/S). Ou,
  si vous pouvez vous contenter de  1  ou  2  voies,  peu  precises,  et
  (probablement)  mal  reglees  en  zero,  une  carte  son  a  bas prix,
  supportee par le pilote sonore de Linux, devrait faire  l'affaire  (et
  se montrera plutot rapide).

  44..  CCee qquu''iill rreessttee aa ffaaiirree

  +o  verifier ce dont je n'etais pas sur

  +o  donner des exemples simples d'utilisation des fonctions decrites

  Merci  pour  les  nombreuses  corrections et additions utiles que j'ai
  recues.

  Fin du mini-HOWTO programmation des ports d'E/S sous Linux

  Mini How-To sur la configuration de l'aliasing IP sous Linux
  Harish Pillay,  h.pillay@ieee.org
  Version Francaise par Laurent Caillat-Vallet,  caillat@univ-
  lyon1.fr
  13 Janvier 1997

  C'est une recette de cuisine pour configurer et utiliser l'aliasing IP
  sous Linux.

  11..  SSyynnooppssiiss

  C'est  une  recette  de  cuisine  sur  la  maniere  de  configurer  et
  d'utiliser  l'aliasing  IP  sur une machine Linux. De plus, il y a des
  instructions pour configurer la  machine  pour  recevoir  du  courrier
  electronique sur les numeros alias IP.
  adresses IP sur la meme interface reseau.)

  22..  MMaa ccoonnffiigguurraattiioonn

  +o  le        dernier        noyau        (2.0.27        -       depuis
     ftp.funet.fi:/pub/Linux/kernel/src/v2.0) cela fonctionne depuis les
     noyaux 1.3.7x.

  +o  Aliasing IP compile en module chargeable. Vous auriez du indiquer a
     la commande "make config", pour  compiler  votre  noyau,  que  vous
     voulez  compiler  l'option  IP  masquerade  en ((MM))odule (NDT: c'est
     plutot l'option IP Aliasing).  Verifiez  dans  le  HOW-TO  sur  les
     modules    (s'il    existe),    ou   verifiez   dans   le   fichier
     /usr/src/linux/Documentation/modules.txt.

  +o  Je dois fournir 2 adresses IP en  plus  de  celle  qui  m'est  deja
     attribuee.

  +o  Un  adaptateur  de poche D-Link DE620 (ce n'est pas important, cela
     fonctionne avec  n'importe  quel  adaptateur  reseau  supporte  par
     Linux).

  33..  CCoommmmaannddeess

  +o  Premierement,  chargez le module IP alias (vous pouvez sauter cette
     etape si vous avez compile ce module dans le noyau):

       /sbin/insmod /lib/modules/`uname -r`/ipv4/ip_alias.o

  +o  Deuxiemement, configurez les interfaces loopback, eth0 et tous  les
     numeros   IP,  en  commencant  par  le  numero  IP  principal  pour
     l'interface eth0:

       /sbin/ifconfig lo 127.0.0.1
       /sbin/ifconfig eth0 up
       /sbin/ifconfig eth0 172.16.3.1
       /sbin/ifconfig eth0:0 172.16.3.10
       /sbin/ifconfig eth0:1 172.16.3.100

  172.16.3.1 est le numero IP principal, alors que .10 et .100 sont  les
  aliases.   La  magie vient de eth0:x, ou x=0,1,3,...n pour les differ-
  ents numeros IP.  Le numero IP principal n'a pas besoin d'alias.

  +o  Troisiemement,  configurez  les  routes.  D'abord  la  route   pour
     l'interface  loopback, puis le reseau, et finalement les numeros IP
     varies en commencant par celui par defaut (alloue originellement):

       /sbin/route add -net 127.0.0.0
       /sbin/route add -net 172.16.3.0 dev eth0
       /sbin/route add -host 172.16.3.1 dev eth0
       /sbin/route add -host 172.16.3.10 dev eth0:0
       /sbin/route add -host 172.16.3.100 dev eth0:1
       /sbin/route add default gw 172.16.3.200

  C'est tout.

  Dans l'exemple ci-dessus, j'utilise les numeros IP prives  (RFC  1918)
  dans  un but d'illustration. Remplacez-les par vos propres numeros IP,
  officiels ou prives.

  L'exemple ne montre que 3 numeros IP. Le maximum est defini a 256 dans
  /usr/include/linux/net_alias.h.  256  numeros  IP sur UNE carte, c'est
  beaucoup :-) !

  Voila a quoi ressemble mon /sbin/ifconfig:

       lo        Link encap:Local Loopback
                 inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
                 UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
                 RX packets:5088 errors:0 dropped:0 overruns:0
                 TX packets:5088 errors:0 dropped:0 overruns:0

       eth0      Link encap:10Mbps Ethernet  HWaddr 00:8E:B8:83:19:20
                 inet addr:172.16.3.1  Bcast:172.16.3.255  Mask:255.255.255.0
                 UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
                 RX packets:334036 errors:0 dropped:0 overruns:0
                 TX packets:11605 errors:0 dropped:0 overruns:0
                 Interrupt:7 Base address:0x378

       eth0:0    Link encap:10Mbps Ethernet  HWaddr 00:8E:B8:83:19:20
                 inet addr:172.16.3.10  Bcast:172.16.3.255  Mask:255.255.255.0
                 UP BROADCAST RUNNING  MTU:1500  Metric:1
                 RX packets:0 errors:0 dropped:0 overruns:0
                 TX packets:0 errors:0 dropped:0 overruns:0

       eth0:1    Link encap:10Mbps Ethernet  HWaddr 00:8E:B8:83:19:20
                 inet addr:172.16.3.100  Bcast:172.16.3.255  Mask:255.255.255.0
                 UP BROADCAST RUNNING  MTU:1500  Metric:1
                 RX packets:1 errors:0 dropped:0 overruns:0
                 TX packets:0 errors:0 dropped:0 overruns:0

  Et /proc/net/aliases:

  device           family address
  eth0:0           2      172.16.3.10
  eth0:1           2      172.16.3.100

  Et proc/net/alias_types:

       type    name            n_attach
       2       ip              2

  Bien sur, les donnees de /proc/net ont  ete  creees  par  la  commande
  ifconfig, et non a la main!

  44..  QQuueessttiioonnss

  44..11..  CCoommmmeenntt ggaarrddeerr llaa ccoonnffiigguurraattiioonn aapprreess uunn rreebboooott??

  Reponse:

  +o  que  vous  utilisiez  un init a la maniere BSD ou a la maniere SysV
     (RedHat par  exemple),  vous  pouvez  toujours  inclure  cela  dans
     /etc/rc.d/rc.local.

  +o  Voici ce que j'ai dans mon systeme init SysV (RedHat 3.0.3 et 4.0):

  +o  Mon /etc/rc.d/rc.local: (edite pour  ne  montrer  que  les  parties
     interessantes)

       # configuration des interfaces avec IP alias
       echo "Configuration des aliases IP: 172.16.3.1, 172.16.3.10, 172.16.3.100..."
       /sbin/ifconfig lo 127.0.0.1
       /sbin/ifconfig eth0 up
       /sbin/ifconfig eth0 172.16.3.1
       /sbin/ifconfig eth0:0 172.16.3.10
       /sbin/ifconfig eth0:1 172.16.3.100
       # configuration des routes
       echo "Configuration des routes IP..."
       /sbin/route add -net 127.0.0.0
       /sbin/route add -net 172.16.3.0 dev eth0
       /sbin/route add -host 172.16.3.1 eth0
       /sbin/route add -host 172.16.3.10 eth0:0
       /sbin/route add -host 172.16.3.100 eth0:1
       /sbin/route add default gw 172.16.3.200
       #

  44..22..    CCoommmmeenntt  ccoonnffiigguurreerr  sseennddmmaaiill  ppoouurr  rreecceevvooiirr  ddeess  mmaaiillss  ssuurr
  pplluussiieeuurrss nnuummeerrooss IIPP??

  Reponse:

  +o  Creer  (s'il  n'existe  pas  deja)  un fichier appele, par exemple,
     /etc/mes_noms.cw. Il ne doit pas forcemement s'appeler ainsi, ni se
     trouver dans le repertoire /etc.

  +o  Dans  ce  fichier,  placer les noms officiels des numeros alias IP.
     Si ces numeros n'ont pas de nom dans un domaine, alors vous  pouvez
     indiquer le numero IP lui-meme.

       /etc/mes_noms.cw:
       -----------------
       # /etc/mes_noms.cw - inclure ici tous les aliases pour votre machine
       #                    # est un commentaire

       domaine.un.net
       domaine.deux.com
       domaine.trois.org
       4.5.6.7

  +o  Dans votre fichier sendmail.cf, a l'endroit ou on definit une macro
     de classe fichier Fw, ajoutez:

       #################
       # infos locales #
       #################
       # fichier contenant les noms des hotes pour lesquels on recoit du courrier
       Fw/etc/mes_noms.cw

  +o  Cela  devrait  suffire.  Testez  votre  nouvelle  configuration  en
     lancant sendmail en mode de test, par exemple:

  ganymede$ /usr/lib/sendmail -bt
  ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
  Enter < ruleset> < address>
  < 0 moi@4.5.6.7
  rewrite: ruleset  0   input: moi @ 4 . 5 . 6 . 7
  rewrite: ruleset 98   input: moi @ 4 . 5 . 6 . 7
  rewrite: ruleset 98 returns: moi @ 4 . 5 . 6 . 7
  rewrite: ruleset 97   input: moi @ 4 . 5 . 6 . 7
  rewrite: ruleset  3   input: moi @ 4 . 5 . 6 . 7
  rewrite: ruleset 96   input: moi < @ 4 . 5 . 6 . 7 >
  rewrite: ruleset 96 returns: moi < @ 4 . 5 . 6 . 7 . >
  rewrite: ruleset  3 returns: moi < @ 4 . 5 . 6 . 7 . >
  rewrite: ruleset  0   input: moi < @ 4 . 5 . 6 . 7 . >
  rewrite: ruleset 98   input: moi < @ 4 . 5 . 6 . 7 . >
  rewrite: ruleset 98 returns: moi < @ 4 . 5 . 6 . 7 . >
  rewrite: ruleset  0 returns: $# local $: moi
  rewrite: ruleset 97 returns: $# local $: moi
  rewrite: ruleset  0 returns: $# local $: moi
  < 0 moi@4.5.6.8
  rewrite: ruleset  0   input: moi @ 4 . 5 . 6 . 8
  rewrite: ruleset 98   input: moi @ 4 . 5 . 6 . 8
  rewrite: ruleset 98 returns: moi @ 4 . 5 . 6 . 8
  rewrite: ruleset 97   input: moi @ 4 . 5 . 6 . 8
  rewrite: ruleset  3   input: moi @ 4 . 5 . 6 . 8
  rewrite: ruleset 96   input: moi < @ 4 . 5 . 6 . 8 >
  rewrite: ruleset 96 returns: moi < @ 4 . 5 . 6 . 8 >
  rewrite: ruleset  3 returns: moi < @ 4 . 5 . 6 . 8 >
  rewrite: ruleset  0   input: moi < @ 4 . 5 . 6 . 8 >
  rewrite: ruleset 98   input: moi < @ 4 . 5 . 6 . 8 >
  rewrite: ruleset 98 returns: moi < @ 4 . 5 . 6 . 8 >
  rewrite: ruleset 95   input: < > moi < @ 4 . 5 . 6 . 8 >
  rewrite: ruleset 95 returns: moi < @ 4 . 5 . 6 . 8 >
  rewrite: ruleset  0 returns: $# smtp $@ 4 . 5 . 6 . 8 $: moi < @ 4 . 5 . 6 . 8 >
  rewrite: ruleset 97 returns: $# smtp $@ 4 . 5 . 6 . 8 $: moi < @ 4 . 5 . 6 . 8 >
  rewrite: ruleset  0 returns: $# smtp $@ 4 . 5 . 6 . 8 $: moi < @ 4 . 5 . 6 . 8 >
  >

  Notez  que  lorsque j'ai teste moi@4.5.6.7, cela a envoye le mail a la
  machine locale, alors que moi@4.5.6.8 a ete envoye a l'agent de trans-
  port smtp.  C'est la reponse correcte.

  +o  Tout est configure maintenant.

  55..  CCoonncclluussiioonn

  J'espere que ce qui precede sera utile a quelqu'un.

  Merci  a  tous  ceux  qui  ont  superbement  travaille  sur  Linux  et
  l'aliasing IP.

  Et particulierement a Juan Jose  Ciarlante  pour  avoir  clarifie  mes
  questions.   Merci  aussi  a  tous ceux qui ont remarque mes fautes de
  frappe et m'ont fourni des suggestions!

  Si vous trouvez ce document utile, ou si  vous  avez  des  suggestions
  pour  des  ameliorations,  envoyez  moi  un  courrier  electronique a:
  h.pillay@ieee.org.

  Amusez-vous bien.

  Des   questions?   envoyez   moi   un    courrier    electronique    a
  h.pillay@ieee.org.

  Linux IP Masquerade mini HOWTO
  Ambrose Au, ambrose@writeme.com; David Ranch, dranch@trin
  net.net
  Arnold, arn_mat@club-internet.fr
  v1.50, 7 Fvrier 1999

  Ce document dcrit la procdure pour mettre en place l'option IP mas
  querade sur un ordinateur Linux, permettant de connecter sur Internet
  des ordinateurs n'ayant pas d'adresses IP rserves,  travers votre
  ordinateur Linux.
  ______________________________________________________________________

  Table des matires





















































  1. Introduction

     1.1 Introduction
     1.2 Mise en garde, Feedback et Crdits
     1.3 Copyright & Dngation

  2. Connaissances de base

     2.1 Qu'est-ce que l'IP Masquerade?
     2.2 O cela en est ?
     2.3 A qui peut tre utile IP Masquerade?
     2.4 Qui n'a pas besoin d'IP Masquerade?
     2.5 Comment fonctionne IP Masquerade ?
     2.6 Ce qui est requis pour utiliser IP Masquerade sur un Linux 2.2.x
     2.7 Ce qui est requis pour utiliser IP Masquerade sur un Linux 2.0.x

  3. Mise en place d'IP Masquerade

     3.1 Compiler le noyau pour le support d'IP Masquerade
        3.1.1 Noyaus Linux 2.2.x
        3.1.2 Noyaux Linux 2.0.x
     3.2 Assignation d'adresse IP pour le rseau local
     3.3 Configurer les AUTRES machines
        3.3.1 Configurer Windows 95
        3.3.2 Configurer Windows pour Workgroup 3.11
        3.3.3 Configurer Windows NT
        3.3.4 Configurer les systmes UNIX
        3.3.5 Configuration sous DOS avec le package NCSA
        3.3.6 Configuration des systmes MacOS utilisant MacTCP
        3.3.7 Configuration des systmes MacOS utilisant Open Transport
        3.3.8 Configurer un rseau Novell utilisant le DNS
        3.3.9 Configurer OS/2 Warp
        3.3.10 Configurer les autres systmes
     3.4 Configurer les rgles d'IP Forwarding
        3.4.1 Noyaux Linux 2.2.x
        3.4.2 Noyaux Linux 2.0.x
     3.5 Tester IP Masquerade

  4. Autres sujets relatifs  IP Masquerade et au support logiciel

     4.1 Problmes avec IP Masquerade
     4.2 Services entrants
     4.3 Programmes clients supports et autres remarques pour la configuration
        4.3.1 Les clients qui fonctionnent
        4.3.2 Clients qui ne fonctionnent pas
        4.3.3 Plateformes/Systmes d'exploitations tests sur des machines clientes
     4.4 Administration du firewall IP (ipfwadm)
     4.5 Chaines IP Firewalling (ipchains)
     4.6 L'IP Masquerade et la numrotation  la demande.
     4.7 Faire suivre les paquets avec IPautofw
     4.8 CU-SeeMe et le mini-HOWTO Linux IP-Masquerade
        4.8.1 Introduction
        4.8.2 Le faire marcher...
        4.8.3 Restrictions/Mise en garde
           4.8.3.1 Reflecteurs protg par mot de passe
           4.8.3.2 Lancer un Rflecteur
           4.8.3.3 Plusieurs utilisateurs de CU-SeeMe
           4.8.3.4 Besoin d'aide pour CU-SeeMe ?
     4.9 Autres outils en relation

  5. Foire Aux Questions

     5.1 Est-ce que IP Masquerade marche avec une IP dynamique ?
     5.2 Puis-je utiliser des modems cable, DSL, liaison satellite, etc pour me connecter  Internet en utilisant IP masquerading ?
     5.3 Quels sont les programmes qui fonctionnent avec l'IP Masquerade ?
     5.4 Comment puis-je faire marcher l'IP Masquerading sur une RedHat, une Debian, une Slackware, etc ?
     5.5 Je viens de passer au noyau 2.2.x et a ne marche plus !
     5.6 Je viens de mettre  jour mon noyau avec un 2.0.30 ou plus rcent et a ne marche plus !
     5.7 Je n'arrive pas  faire marcher l'IP Masquerade ! Quelles sont les possibilits pour le faire avec Windows ?
     5.8 J'ai tout vrifi, et a ne marche toujours pas. Que dois-je faire ?
     5.9 Comment je m'inscris  la liste IP Masquerade ?
     5.10 Je veux aider au dveloppement de l'IP Masquerading. Comment faire ?
     5.11 O puis-je trouver plus d'informations sur l'IP Masquerading ?
     5.12 Je veux traduire ce HOWTO dans une autre langue. Comment faire ?
     5.13 Ce HOWTO semble  l'abandon, vous vous en occupez toujours ? Pouvez vous inclure plus d'informations sur ... ? Comptez vous l'amliorer ?
     5.14 J'ai reussi  faire marcher l'IP Masquerade, c'est gnial ! Qu'est ce que je pourrais faire pour vous remercier ?

  6. Divers

     6.1 Ressources utiles
     6.2 Ressources sur l'IP Masquerade
     6.3 Remerciements
     6.4 Rference


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  11..11..  IInnttrroodduuccttiioonn

  Ce document dcrit comment mettre en place l'option IP masquerade sous
  Linux, afin de permettre  des ordinateurs n'ayant pas d'adresse IP
  rserve de se connecter  Internet  travers votre ordinateur. Il est
  possible de connecter votre machine  l'hte Linux grce  de
  l'Ethernet, aussi bien que d'autres types de connexions comme un lien
  PPP. Ce document va se restreindre  une connexion Ethernet, puisque
  c'est l'hypothse la plus probable.


       CCee ddooccuummeenntt ssuuppppoossee qquuee vvoouuss uuttiilliisseezz lleess nnooyyaauuxx ssttaabblleess
       22..22..xx oouu 22..00..xx.. LLeess aanncciieennnneess vveerrssiioonnss tteelllleess 11..22..xx nnee ssoonntt
       PPAASS ccoouuvveerrtteess ppaarr ccee ddooccuummeenntt..



  11..22..  MMiissee eenn ggaarrddee,, FFeeeeddbbaacckk eett CCrrddiittss

  Je trouve que, en tant que dbutant, il est trs droutant de mettre
  en place l'IP masquerade sur un noyau rcent, comme sur un de la srie
  des 2.x. Bien qu'il y ait une FAQ et une mailing list, il n'y a pas de
  documents spcifiques pour cela, et il y a des demandes sur la mailing
  list pour des documents tels qu'un HOWTO. J'ai donc dcid d'crire ce
  document comme un point de dpart pour un nouvel utilisateur, et
  peut-tre comme un point de dpart pour qu'un utilisateur expriment
  crive une vritable documentation. Si vous pensez que ce document
  n'est pas parfait, n'hsitez pas  m'en faire part afin que je puisse
  l'amliorer.

  Ce document est largement inspir de la FAQ de Ken Eves, ainsi que de
  nombreux messages trs utiles de la mailing list d'IP Masquerading.
  Je tiens  adresser des remerciements tout particuliers  M. Matthew
  Driver qui, par ses messages sur la mailing list, m'a donn envie de
  mettre en place l'IP Masquerading et d'crire ce document.

  N'hsitez pas  nous envoyer tout commentaire  ambrose@writeme.com et
  dranch@trinnet.net pour toute erreur ou tout oubli dans ce document.
  L'avenir de cet HOWTO sera fortement influenc par les ractions que
  j'aurais de votre part.


  CCee HHOOWWTTOO aa tt ccoonnuu ppoouurr ttrree uunn gguuiiddee ppoouurr qquuee ll''IIPP MMaassqquueerraaddiinngg
  ffoonnccttiioonnnnee cchheezz vvoouuss rraappiiddeemmeenntt.. CCoommmmee jjee nnee ssuuiiss ppaass uunn tteecchhnniicciieenn,,
  iill ssee ppeeuutt qquuee vvoouuss ttrroouuvviieezz lleess iinnffoorrmmaattiioonnss ddee ccee ddooccuummeenntt mmooiinnss
  ggnnrraalleess eett mmooiinnss oobbjjeeccttiivveess.. LLeess ddeerrnniirreess nnoouuvveelllleess eett iinnffoorrmmaattiioonnss
  ppoouurrrroonntt ttrree ttrroouuvveess ssuurr llee ssiittee wweebb ddee ll''IIPP MMaassqquueerraaddiinngg RReessssoouurrccee,,
  ddoonntt nnoouuss nnoouuss ooccccuuppoonnss.. SSii vvoouuss ddssiirreezz ppoosseerr ddeess qquueessttiioonnss
  tteecchhnniiqquueess  pprrooppooss dd''IIPP MMaassqquueerraaddee,, vveeuuiilllleezz ssoouussccrriirree  llaa mmaaiilliinngg
  lliisstt IIPP MMaassqquueerraaddee aauu lliieeuu ddee mm''eennvvooyyeerr ddeess mmaaiillss.. JJ''aaii ppeeuu ddee tteemmppss
  ppoouurr vvoouuss rrppoonnddrree,, eett lleess ddvveellooppppeeuurrss dd''IIPP__MMaassqq ssoonntt pplluuss  mmmmee ddee
  rrppoonnddrree  vvooss qquueessttiioonnss..

  La dernire version de ce document peut tre obtenue  l'IP Masquerade
  Ressource, qui distribue galement des versions HTML et PostScript de
  ce document :

    http://ipmasq.cjb.net/

    http://ipmasq2.cjb.net/

    Veuillez consulter la liste des Sites Mirrors de l'IP Masquerade
     Ressource pour contacter un site plus proche de chez vous.


  11..33..  CCooppyyrriigghhtt && DDnnggaattiioonn

  Ce document est copyright  1999 Ambrose Au, et est un document
  gratuit. Vous pouvez le redistribuer sous la licence GPL de GNU
  (General Public License).

  Toutes les informations contenues dans ce document sont l'tat de mes
  connaissances. Cependant, l'IP Masquerading est _e_x_p__r_i_m_e_n_t_a_l, et il y
  a des chances que j'aie fait des erreurs ; c'est  vous de dcider si
  vous voulez suivre les informations contenues dans ce document.

  Personne n'est responsable pour un quelconque dommage sur vos
  ordinateurs ainsi qu'une quelconque autre perte due  l'utilisation
  des informations contenues dans ce document. C'est  dire :


       LL''AAUUTTEEUURR EETT LLEESS MMAAIINNTTEENNEEUURRSS NNEE SSOONNTT EENN AAUUCCUUNN CCAASS RREESSPPOONNSS
       AABBLLEESS DDEESS DDOOMMMMAAGGEESS OOCCCCAASSIIOONNNNEESS PPAARR LL''UUSSAAGGEE DDEESS IINNFFOORRMMAATTIIOONNSS
       CCOONNTTEENNUUEESS DDAANNSS CCEE DDOOCCUUMMEENNTT,, QQUUEELLSS QQUU''IILLSS SSOOIIEENNTT..








  22..  CCoonnnnaaiissssaanncceess ddee bbaassee


  22..11..  QQuu''eesstt--ccee qquuee ll''IIPP MMaassqquueerraaddee??

  L'IP Masquerade est une fonctionnalit rseau de Linux. Si un hte
  Linux est connect  Internet avec l'option IP Masquerade en place,
  alors les ordinateurs se connectant  celui-ci (que cela soit sur le
  rseau local ou par modem) peuvent atteindre Internet aussi, mme _s_'_i_l
  _n_'_o_n_t _p_a_s _d_'_a_d_r_e_s_s_e _I_P _o_f_f_i_c_i_e_l_l_e.

  Cela permet  un ensemble de machines d'accder de manire _i_n_v_i_s_i_b_l_e 
  Internet, cach derrire une passerelle, qui apparat comme tant le
  seul systme utilisant la connexion Internet. Il devrait tre
  normment plus difficile de contourner un systme bas sur le
  masquerade, s'il est bien configur, que de passer outre un bon
  firewall effectuant du filtrage de paquets (en supposant qu'il n'y a
  de bogues chez aucun des deux).


  22..22..  OO cceellaa eenn eesstt ??

  L'IP Masquerade est utilis depuis quelques annes et murit alors que
  Linux arrive dans les 2.2.x. Les noyaux, depuis la srie 1.3.x,
  supportent en standard cette fonctionnalit. De nombreuses personnes,
  et mme des entreprises l'utilisent, avec des rsultats satisfaisants.

  L'utilisation d'IP Masquerade pour parcourir le web, ou pour le telnet
  est tout  fait satisfaisante. FTP, IRC, et l'coute de Real Audio
  fonctionnent en utilisant certains modules. D'autres technologies de
  flux audio par rseau, telles que True Speech et Internet Wave
  fonctionnent galement. Certaines personnes, abonnes  la mailing
  list ont mme essay des logiciels de vido-confrence.  Ping
  fonctionne  prsent, avec le nouveau patch pour ICMP.


  Veuillez consulter la section 4.3 pour une liste complte des
  logiciels supports.

  L'IP masquerade fonctionne convenablement avec des 'machines clientes'
  utilisant divers systmes d'exploitation et diffrentes plate-formes.
  On a enregistr des succs pour des systmes utilisant Unix, Windows
  95, Windows NT, Windows pour Workgroups (avec l'extension TCP/IP),
  OS/2, MacOS avec Mac TCP, Mac Open Transport, DOS avec le package NCSA
  Telnet, VAX, Alpha sous Linux, et mme Amiga avec AmiTCP ou la pile
  AS225. La liste continue  n'en plus finir, en ralit, si votre
  systeme d'exploitation parle TCP/IP, cela marcher avec l'IP
  Masquerade.


  22..33..  AA qquuii ppeeuutt ttrree uuttiillee IIPP MMaassqquueerraaddee??


    Si vous avez un hte Linux connect  Internet, et

    si vous avez un ou plusieurs ordinateurs utilisant TCP/IP, connect
      cet hte Linux sur un rseau local, et/ou

    si votre hte Linux a un ou plusieurs modems et joue le rle de
     serveur PPP ou SLIP, et que

    ces AAUUTTRREESS machines ne possdent pas d'adresse IP officielle (ces
     machines seront dsormais rfrences sous le nom de AAUUTTRREESS).

    et bien sr, si vous dsirez que ces AAUUTTRREESS machines soient
     galement connectes sur Internet sans dbourser un centime de
     plus :-)


  22..44..  QQuuii nn''aa ppaass bbeessooiinn dd''IIPP MMaassqquueerraaddee??


    Si votre machine est un hte isol, connect sur Internet, alors
     c'est inutile de mettre en place l'IP Masquerading, ou

    si vous avez dj obtenu des adresses officielles pour vos AAUUTTRREESS
     machines, alors vous n'avez pas besoin d'IP Masquerade pour faire
     un firewall,

    et bien sr, si vous n'aimez pas l'ide de connecter toutes les
     AAUUTTRREESS machines gratuitement, de cette manire.

  22..55..  CCoommmmeenntt ffoonnccttiioonnnnee IIPP MMaassqquueerraaddee ??

  D'aprs la FAQ IP Masquerade, de Ken Eves :

    Voici un schma du plus simple cas possible~:

       SLIP/PPP         +------------+                         +-------------+
    vers le provider    |  Linux     |       SLIP/PPP          | Peu_importe |
      <---------- modem1|            |modem2 ----------- modem |             |
        111.222.333.444 |            |           192.168.1.100 |             |
                        +------------+                         +-------------+

      Dans le schma ci-dessus, un ordinateur sous Linux, utilisant
      ip_masquerading est connect  Internet par un lien SLIP ou PPP, utilisant
      modem1. Il possde l'adresse IP (officielle) 111.222.333.444. Il est
      configur de telle faon que modem2 permet aux appelants de se connecter
      et d'initier une connexion PPP ou SLIP.

      Le second systme (qui n'utilise par forcment Linux comme systme
      d'exploitation) se connecte par modem sur l'hte Linux et entame une
      liaison SLIP ou PPP. Il NE possde PAS d'adresse IP officielle donc il
      utilise 192.168.1.100 (voir ci-dessous).

      Avec l'option ip_masquerade et un routage configur correctement, la
      machine Peu_importe peut interagir avec Internet comme si elle tait
      rellement connecte ( quelques exceptions prs).

  Pour citer Pauline Middlelink~: N'oublie pas de rappeler que la machine
  Peu_importe doit dclarer l'hte Linux comme passerelle (que cela soit la
  route par dfaut ou juste un sous rseau importe peu). Si Peu_importe ne peut
  pas le faire, l'hte Linux devra faire du proxy arp pour toutes les adresses
  routes, mais la mise en place du proxy arp est hors du domaine de ce
  document.

  Ce qui suit est l'extrait d'un article de comp.os.linux.networking qui a t
  modifi pour utiliser les noms des machines de l'exemple ci-dessus~:
     o J'indique  la machine Peu_importe que le serveur Linux est sa
       passerelle.
     o Quand un paquet en provenance de Peu_importe arrive sur la machine Linux,
       elle va lui assigner un nouveau numro de port, et indiquer sa propre
       adresse IP dans l'entte du paquet, tout en sauvegardant l'entte
       originale. Elle va alors envoyer le paquet modifi  travers son
       interface SLIP ou PPP, vers Internet.
     o Lorsqu'un paquet en provenance d'Internet arrive sur la machine Linux, si
       le numro de port est un de ceux assigns  l'tape prcdente, elle va
       modifier  nouveau l'entte pour y remettre les numros de port et
       adresses IP originaux, et alors envoyer le paquet  la machine
       Peu_importe.
     o L'hte qui a envoy le paquet ne verra jamais la diffrence.




  UUnn eexxaammppllee dd''IIPP MMaassqquueerraaddiinngg

  Voici ci-dessous le schma d'un exemple classique :










      +----------+
      |          |  Ethernet
      | Ordi A   |::::::
      |          |2   ~:192.168.1.x
      +----------+    ~:
                      ~:   +----------+   lien
      +----------+    ~:  1|  Linux   |   PPP
      |          |    ~::::| masq-gate|:::::::::// Internet
      | Ordi B   |::::::   |          |
      |          |3   ~:   +----------+
      +----------+    ~:
                      ~:
      +----------+    ~:
      |          |    ~:
      | Ordi C   |::::::
      |          |4
      +----------+


      <-Rseau interne->


  Il y a dans cet exemple 4 ordinateurs qui nous intressent (il y a
  srement sur la droite quelque chose sur laquelle aboutit notre con
  nexion, et encore plus  droite une autre machine avec laquelle nous
  changeons des donnes). L'ordinateur sous Linux masq-gate est la
  passerelle qui effectue le masquerading pour le rseau interne des
  ordinateurs A, B, et C, afin de les relier  Internet.  Le rseau
  interne utilise une des adresses assignes des rseaux privs, 
  savoir dans ce cas le rseau de classe C 192.168.1.0, l'ordinateur
  Linux ayant l'adresse 192.168.1.1 et les autres ordinateurs ayant
  d'autres adresses sur ce rseau.

  Les trois machines A, B et C (qui peuvent utiliser n'importe quel
  systme d'exploitation, du moment qu'elles utilisent IP - comme par
  exemple WWiinnddoowwss 9955, MMaacciinnttoosshh MMaaccTTCCPP ou mme un autre Linux) peuvent
  se connecter  n'importe qu'elle machine sur Internet, mais masq-gate
  convertit toutes leurs connexions de faon  ce qu'elles semblent
  provenir de masq-gate, et s'arrange pour que toutes les donnes
  revenant d'Internet retournent au systme qui en est  l'origine.
  Ainsi, les ordinateurs du rseau interne voient une route directe vers
  Internet et ne sont pas au courant du fait que leurs donnes ont t
  "masquerades".



  22..66..  CCee qquuii eesstt rreeqquuiiss ppoouurr uuttiilliisseerr IIPP MMaassqquueerraaddee ssuurr uunn LLiinnuuxx 22..22..xx


        **** RRffrreezz vvoouuss  IIPP MMaassqquueerraaddee RReessoouurrccee
       <<http://ipmasq.cjb.net/> pour les dernieres informations (en
       anglais). **




    Les sources du noyau 2.2.x sont disponibles depuis
     ftp://ftp.lip6.fr/pub/linux/kernel/sources/v2.2/
     distributions de linux rcentes telle la RedHat 5.2 - livre avec
     un noyau 2.0.36 - ont le un noyau modulaire avec toutes les options
     ncessaires a l'IP Masquerading compiles. Dans ce genre de cas, il
     n'y a pas besoin de recompiler le noyau. Si vous mettez a jour
     votre noyau, alors vous devriez savoir ce dont vous avez besoin,
     nous y reviendrons un peu plus loin).


    Modules chargeables dynamiquement, de prfrence avec un 2.1.121 ou
     plus rcent.

    Ainsi qu'un rseau TCP/IP en bon tat de marche
     Linux NET-3 HOWTO
     <http://www.freenix.org/unix/linux/HOWTO/NET-3-HOWTO.html> et dans
     le Guide de l'administrateur rseau
     <ftp://ftp.ibp.fr/pub/linux/french/books/nag.french.eoit-1.0.tar.gz>
     Trinity OS Doc
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>, une
     documentation tres simple sur Linux et le reseau.


    Connectivity to Internet for your Linux host

    IP Chains 1.3.8 ou plus rcent, disponible sur
     http://www.rustcorp.com/linux/ipchains/
     les diffrentes versions, visitez Linux IP Firewalling Chains page
     <http://www.rustcorp.com/linux/ipchains/>

    Pour d'autres options, rfrez vous  Linux IP Masquerade Resource
     <http://ipmasq.cjb.net/>



  22..77..  CCee qquuii eesstt rreeqquuiiss ppoouurr uuttiilliisseerr IIPP MMaassqquueerraaddee ssuurr uunn LLiinnuuxx 22..00..xx


       **** VVeeuuiilllleezz ss''iill vvoouuss ppllaatt ccoonnssuulltteerr ll''IIPP MMaassqquueerraaddee
       RReessoouurrccee ppoouurr lleess ddeerrnniirreess iinnffoorrmmaattiioonnss..****




    Les sources d'un noyau de la srie 2.x, disponibles sur
     ftp://ftp.ibp.fr/pub/linux/kernel/sources/v2.0/
     distributions de linux rcentes telle la RedHat 5.2 ont le un noyau
     modulaire avec toutes les options ncessaires a l'IP Masquerading
     compiles. Dans ce genre de cas, il n'y a pas besoin de recompiler
     le noyau. Si vous mettez  jour votre noyau, alors, vous devriez
     savoir ce dont vous avez besoin, nous y reviendrons un peu plus
     loin).

    Les modules chargeables  la demande, de prfrence la version
     2.0.0 (ou ultrieure), disponible sur
     ftp://ftp.ibp.fr/pub/linux/kernel/sources/v2.0/modules-2.0.0.tar.gz
     (modules-1.3.57 tant le minimum)

    Un rseau TCP/IP fonctionnant convenablement
     Trinity OS Doc
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>, une
     documentation trs simple sur Linux et le rseau.

    Un accs Internet pour votre hte Linux

    Ipfwadm 2.3, tlchargeable sur
     ftp://ftp.xos.nl/pub/linux/ipfwadm/ipfwadm-2.3.tar.gz
     d'informations sur Linux IPFWADM page
     <http://www.xos.nl/linux/ipfwadm/>

    Vous pouvez, si vous le souhaitez, appliquer certains patches pour
     mettre en place certaines fonctionnalits. Vous trouverez plus
     d'informations sur la page des IP Masquerade Resources (ces patches
     s'appliquent  tout noyau de la srie 2.0.x).


  33..  MMiissee eenn ppllaaccee dd''IIPP MMaassqquueerraaddee


       SSii vvoottrree rrsseeaauu pprriivv ccoonnttiieenntt ddeess iinnffoorrmmaattiioonnss vviittaalleess,,
       rreeppeennsseezz yy  ddeeuuxx ffooiiss aavvaanntt dd''uuttiilliisseerr IIPP MMaassqquueerraaddee.. CCeellaa
       ccoonnssttiittuuee uunnee ppaasssseerreellllee ppoouurr vvoouuss,, ppoouurr aatttteeiinnddrree IInntteerrnneett,,
       mmaaiiss llaa rrcciipprrooqquuee eesstt vvrraaiiee eett qquueellqquu''uunn ssuurr IInntteerrnneett ppoouurr
       rraaiitt ppnnttrreerr ssuurr vvoottrree rrsseeaauu pprriivv..




  33..11..  CCoommppiilleerr llee nnooyyaauu ppoouurr llee ssuuppppoorrtt dd''IIPP MMaassqquueerraaddee


        SSii vvoottrree ddiissttrriibbuuttiioonn ddee LLiinnuuxx aa ddjj lleess ffoonnccttiioonnnnaalliittss
       nneecceessssaaiirreess eett lleess mmoodduulleess ddee ccoommppiillss ((llaa mmaajjoorriitt ddeess nnooyy
       aauuxx mmoodduullaaiirreess aauurroonntt ccee ddoonntt vvoouuss aavveezz bbeessooiinn)) mmeennttiioonnnnss
       ccii--ddeessssoouuss,, aalloorrss vvoouuss nn''aavveezz ppaass  rreeccoommppiilleerr llee nnooyyaauu.. LLaa
       lleeccttuurree ddee cceettttee sseeccttiioonn eesstt qquuaanndd mmeemmee llaarrggeemmeenntt rreeccoomm
       mmaannddee ccaarr eellllee ccoonnttiieenntt aauussssii dd''aauuttrreess iinnffoorrmmaattiioonnss ttrrss
       uuttiilleess..





  33..11..11..  NNooyyaauuss LLiinnuuxx 22..22..xx


    Tout d'abord, Vous avez besoin des sources du noyau 2.2.x

    Si c'est la premiere fois que vous compilez un noyau, ne vous
     inquietez pas, en fait, c'est assez facile et tout est expliqu
     dans Linux Kernel HOWTO
     <http://www.freenix.org/unix/linux/HOWTO/Kernel-HOWTO.html>.

    Dcompressez les sources du noyau dans /usr/src/ avec la commande :
     tar xvzf linux-2.2.x.tar.gz -C /usr/src, ou x est la version du
     noyau.
     appel linux )

    Appliquez les patchs appropris. Comme de nouveaux patch sortent
     rgulierement, les dtails ne sont pas dcrits ici. Rfrez vous 
     IP Masquerade Resources <http://ipmasq.cjb.net/> pour des
     informations au jour le jour.

    Rfrez vous au Kernel HOWTO et au fichier README des sources du
     noyau pour plus d'informations sur la compilation d'un noyau.

    Voici les options que vous devez compiler :


     Dites _Y_E_S aux options suivantes :












    * Prompt for development and/or incomplete code/drivers
      CONFIG_EXPERIMENTAL
      - Ceci vous permettra de selectionner le code experimental IP Masquerade.

    * Enable loadable module support
      CONFIG_MODULES
      - Vous permet de charger les modules ipmasq tel ip_masq_ftp.o

    * Networking support
      CONFIG_NET

    * Network firewalls
      CONFIG_FIREWALL

    * TCP/IP networking
      CONFIG_INET

    * IP: forwarding/gatewaying
      CONFIG_IP_FORWARD

    * IP: firewalling
      CONFIG_IP_FIREWALL

    * IP: masquerading
      CONFIG_IP_MASQUERADE

    * IP: ipportfw masq support
      CONFIG_IP_MASQUERADE_IPPORTFW
      - Recommand

    * IP: ipautofw masquerade support
      CONFIG_IP_MASQUERADE_IPAUTOFW
      - Optionnel

    * IP: ICMP masquerading
      CONFIG_IP_MASQUERADE_ICMP
      - Support pour masquerader les paquets ICMP, recommand

    * IP: always defragment
      CONFIG_IP_ALWAYS_DEFRAG
      - Chaudement recommand

    * Dummy net driver support
      CONFIG_DUMMY
      - Recommand

    * IP: ip fwmark masq-forwarding support
      CONFIG_IP_MASQUERADE_MFW
      - Optionnel




  NOTE : Voici juste les composants qu'il faut pour que l'IP Masquerade
  marche, selectionnez les options spcifiques dont vous avez besoin
  pour votre systeme.



    Aprs avoir compil le noyau, vous devriez compiler et installer
     les modules :



       make modules; make modules_install

    Enfin, vous devriez ajouter quelques lignes dans votre
     /etc/rc.d/rc.local (ou le fichier que vous trouvez plus appropri)
     pour charger les modules rsidants dans /lib/modules/2.2.x/ipv4/
     automatiquement  chaque redmarrage.



               .
               .
               .
       /sbin/depmod -a
       /sbin/modprobe ip_masq_ftp
       /sbin/modprobe ip_masq_raudio
       /sbin/modprobe ip_masq_irc
       (Et d'autres modules tels ip_masq_cuseeme, ip_masq_vdolive
        Si vous avez appliqus les patchs)
               .
               .
               .





  IIMMPPOORRTTAANNTT:: IIPP ffoorrwwaarrddiinngg eesstt ddssaaccttiivv ppaarr ddffaauutt ppoouurr lleess nnooyyaauuxx
  22..22..xx,, aalloorrss,, aassssuurreezz vvoouuss ddee bbiieenn ll''aavvooiirr aaccttiivv eenn ffaaiissaanntt ::
  /proc/sys/net/ipv4/ip_forwarding


  Pour les utilisateurs de RedHat, vous pouvez essayer de changer FOR
  WARD_IPV4=false en FORWARD_IPV4=true dans /etc/sysconfig/network

    Finalement, redmarrez votre machine.


  33..11..22..  NNooyyaauuxx LLiinnuuxx 22..00..xx


    Vous devez tout d'abord disposer des sources du noyau (de
     prfrence la derniere version 2.0.36 ou plus rcente).

    Si c'est la premire fois que vous compilez votre noyau, ne soyez
     pas effray. En fait, c'est pltot simple, et tout est expliqu
     dans le Kernel HOWTO
     <http://www.freenix.org/unix/linux/HOWTO/Kernel-HOWTO.html>

    Dcompressez les sources du noyau dans /usr/src/ avec la commande
     tar xvzf linux-2.0.x.tar.gz -C /usr/src, o x est le numro de
     rvision du noyau.
     symbolique nomm linux)

    Appliquez les patches appropris. Comme de nouveaux patches sortent
     souvent, aucun dtail ne sera inclus ici. Rfrez vous  l'IP
     Masquerade Resources pour une information rcente.

    Veuillez consulter le Kernel HOWTO et le fichier README dans le
     rpertoire des sources du noyau pour plus d'informations sur la
     compilation d'un noyau.

    Voici les options que vous devrez utiliser :


     Rpondre _Y_E_S  :



    * Prompt for development and/or incomplete code/drivers
      CONFIG_EXPERIMENTAL
      - Cela vous permettra de pouvoir slectionner IP Masquerade,
        qui est exprimental.

    * Enable loadable module support
      CONFIG_MODULES
      - Permet le chargement des modules.

    * Networking support
      CONFIG_NET

    * Network firewalls
      CONFIG_FIREWALL

    * TCP/IP networking
      CONFIG_INET

    * IP: forwarding/gatewaying
      CONFIG_IP_FORWARD

    * IP: firewalling
      CONFIG_IP_FIREWALL

    * IP: masquerading (EXPERIMENTAL)
      CONFIG_IP_MASQUERADE
      - bien que cela soit exprimental, il *FAUT* l'intgrer

    * IP: ipautofw masquerade support (EXPERIMENTAL)
      CONFIG_IP_MASQUERADE_IPAUTOFW
      -recommended

    * IP: ICMP masquerading
      CONFIG_IP_MASQUERADE_ICMP
      - support for masquerading ICMP packets, optionnel.

    * IP: always defragment
      CONFIG_IP_ALWAYS_DEFRAG
      - trs recommend

    * Dummy net driver support
      CONFIG_DUMMY
      - recommend




  NB : Ce sont juste les composants dont vous avez besoin pour l'IP
  Masquerade. Ajoutez toute autre option ncessaire pour votre
  configuration personnelle.

    Une fois le noyau compil, compilez et installez les modules :



       make modules; make modules_install




    Ajoutez alors quelques lignes dans votre fichier /etc/rc.d/rc.local
     (ou dans le fichier appropri), pour charger automatiquement les
     modules ncessaires dans /lib/modules/2.0.x/ipv4/, aprs chaque
     reboot :


          .
          .
          .
  /sbin/depmod -a
  /sbin/modprobe ip_masq_ftp.o
  /sbin/modprobe ip_masq_raudio.o
  /sbin/modprobe ip_masq_irc.o
  (et tout autre module, comme ip_masq_cuseeme, ip_masq_vdolive si vous avez appliqu les patches)
          .
          .
          .





  IIMMPPOORRTTAANNTT:: IIPP ffoorrwwaarrddiinngg eesstt ddssaaccttiivv ppaarr ddffaauutt ddeeppuuiiss llee nnooyyaauu
  22..00..3344 aalloorrss,, aassssuurreezz vvoouuss ddee bbiieenn ll''aavvooiirr aaccttiivv eenn ffaaiissaanntt ::
  /proc/sys/net/ipv4/ip_forwarding


  Pour les utilisateurs de RedHat, vous pouvez essayer de changer FOR
  WARD_IPV4=false en FORWARD_IPV4=true dans /etc/sysconfig/network

    Finalement, redmarrez votre machine.


  33..22..  AAssssiiggnnaattiioonn dd''aaddrreessssee IIPP ppoouurr llee rrsseeaauu llooccaall

  Puisque toutes les AAUUTTRREESS machines n'ont pas d'adresse IP officielle,
  il faut leur en allouer de manire intelligente.

  Selon la FAQ d'IP Masquerade :

  Il existe un RFC (#1597, qui doit etre obsolete maintenant) qui
  indique quelles adresses IP assigner  un rseau non connect. Il
  existe 3 plages rserves spcialement  cet effet. Une de celles que
  j'utilise est un sous rseau de classe C, faisant partie de la plage
  allant de 192.168.1.n  192.168.255.n.



       Selon le RFC 1597~:

       Section 3~: Adressage de rseaux privs

       L' "Internet Assigned Numbers Authority" (IANA) a rserv les 3 plages
       suivantes pour leur utilisation par des rseaux privs~:

                     10.0.0.0        -   10.255.255.255
                     172.16.0.0      -   172.31.255.255
                     192.168.0.0     -   192.168.255.255

       Nous ferons rfrence  la premire en tant que la "plage de 24 bits", la
       deuxime comme "plage de 20 bits" et la troisime comme "plage de 16 bits".
       Notez que la premire plage n'est rien d'autre qu'un rseau de classe A, la
       deuxime un ensemble de 16 rseaux de classe B contigus, et la troisime un
       ensemble de 255 rseaux de classe C contigus.




  Ainsi, si vous utilisez un rseau de classe C, vous devrez utiliser
  les adresses IP 192.168.1.1, 1.92.168.1.2, 1.92.168.1.3, ...,
  192.168.1.x

  192.168.1.1 est habituellement la machine passerelle, qui est ici
  votre machine Linux se connectant  Internet. Remarquez que
  192.168.1.0 et 192.168.1.255 sont respectivement les adresses de
  rseau et de broadcast, qui sont rserves. Evitez d'utiliser ces
  adresses sur vos machines.


  33..33..  CCoonnffiigguurreerr lleess AAUUTTRREESS mmaacchhiinneess

  En plus d'affecter les adresses IP pour chaque machine, vous devrez
  indiquer la bonne passerelle. En gnral, c'est plutt simple. Vous
  entrez juste l'adresse de votre machine Linux (gnralement
  192.168.1.1) en tant qu'adresse de passerelle.

  Pour le DNS, vous pouvez utiliser n'importe quel DNS utilisable. Le
  plus simple est d'utiliser celui qu'utilise votre machine Linux. Vous
  pouvez aussi, si vous le dsirez, ajouter des suffixes d'ordre de
  recherche DNS.

  Une fois configures ces adresses IP, n'oubliez pas de relancer les
  programmes concerns, ou de rebooter vos machines.

  Les instructions de configuration qui suivent supposent que vous
  utilisez un rseau de classe C, et que votre machine Linux a pour
  adresse 192.168.1.1. Notez que 192.168.1.0 et 192.168.1.255 sont
  rserves.



  33..33..11..  CCoonnffiigguurreerr WWiinnddoowwss 9955


  1. Si vous n'avez pas install votre carte rseau et son driver,
     faites le maintenant.

  2. Allez dans _P_a_n_n_e_a_u _d_e _c_o_n_f_i_g_u_r_a_t_i_o_n _/ _R__s_e_a_u .

  3. Ajoutez le _p_r_o_t_o_c_o_l_e _T_C_P_/_T_P si ce n'est pas dj fait.

  4. Dans les _p_r_o_p_r_i__t__s _d_e _T_C_P_/_I_P, allez dans _A_d_r_e_s_s_e _I_P et entrez
     votre adresse IP, 192.168.1.x (1 < x < 255).  Fixez le _M_a_s_q_u_e _d_e
     _s_o_u_s _r__s_e_a_u  255.255.255.0

  5. Ajoutez 192.168.1.1 dans _P_a_s_s_e_r_e_l_l_e.

  6. Dans _C_o_n_f_i_g_u_r_a_t_i_o_n _/ _O_r_d_r_e _d_e _r_e_c_h_e_r_c_h_e _D_N_S, ajoutez le DNS
     qu'utilise votre machine Linux (que l'on peut trouver dans
     /etc/resolv.conf). Vous pouvez ventuellement ajouter les suffixes
     de domaine adquats.

  7. Laissez les autres paramtres tels quels,  moins que vous sachiez
     ce que vous faites.

  8. Cliquez sur _O_K dans toutes les botes de dialogue et relancez le
     systme.

  9. Pinguez la machine Linux pour tester la connexion rseau : _D__m_a_r_r_e_r
     _/ _E_x_e_c_u_t_e_r, tapez: ping 192.168.1.1
     de connexion locale, vous ne pouvez pas encore pinguer
     l'extrieur).

  10.
     Vous pouvez ventuellement crr un fichier HOSTS dans le
     rpertoire de Windows, pour que vous puissiez utiliser les noms
     d'htes des autres machines de votre rseau local. Il y a un
     exemple nomm HOSTS.SAM dans le rpertoire Windows.
  33..33..22..  CCoonnffiigguurreerr WWiinnddoowwss ppoouurr WWoorrkkggrroouupp 33..1111


  1. Si vous n'avez pas encore install votre carte rseau et son
     driver, faites le maintenant.

  2. Installez le package TCP/IP 32b si ce n'est pas dj fait.

  3. Dans _G_r_o_u_p_e _P_r_i_n_c_i_p_a_l _/ _I_n_s_t_a_l_l_a_t_i_o_n _/ _C_o_n_f_i_g_u_r_a_t_i_o_n _r__s_e_a_u,
     cliquez sur _D_r_i_v_e_r_s.

  4. Slctionnez _M_i_c_r_o_s_o_f_t _T_C_P_/_I_P_-_3_2 _3_._1_1_b dans la section _D_r_i_v_e_r_s
     _R__s_e_a_u_x. Choisissez _C_o_n_f_i_g_u_r_a_t_i_o_n.

  5. Saisissez l'adresse IP 192.168.1.x (1 < x < 255), et positionnez le
     masque de sous rseau  255.255.255.0 et la passerelle par dfaut 
     192.168.1.1.

  6. Ne slectionnez pas _C_o_n_f_i_g_u_r_a_t_i_o_n _a_u_t_o_m_a_t_i_q_u_e _D_H_C_P et mettez
     n'importe quoi dans la case _S_e_r_v_e_r _W_I_N_S,  moins que vous ne
     fassiez partie d'un domaine Windows NT et que vous sachiez ce que
     vous faites.

  7. Cliquez sur _D_N_S, et remplissez les informations appropris,
     mentionnes  l'tape 6 de la section 3.3.1. Cliquez sur _O_K une
     fois que c'est fini.

  8. Cliquez sur _C_o_n_f_i_g_u_r_a_t_i_o_n _a_v_a_n_c__e, cochez _U_t_i_l_i_s_e_r _l_e _D_N_S _p_o_u_r _l_a
     _r__s_o_l_u_t_i_o_n _d_e _n_o_m_s, et _U_t_i_l_i_s_e_r _L_M_H_O_S_T_S si vous utilisez un fichier
     de rsolution, comme celui mentionn  l'tape 10 de la section
     3.3.1.

  9. Cliquez alors sur _O_K sur toutes les boites de dialogue, et
     redmarrez le systme.

  10.
     Pingez la machine Linux pour tester la connexion rseau : _F_i_c_h_i_e_r _/
     _E_x__c_u_t_e_r, taper : ping 192.168.1.1
     connexion locale, vous ne pouvez pas encore pinger le monde
     extrieur.


  33..33..33..  CCoonnffiigguurreerr WWiinnddoowwss NNTT


  1. Si vous n'avez pas encore install votre carte rseau et son
     driver, faites le maintenant.

  2. Allez dans _G_r_o_u_p_e _P_r_i_n_c_i_p_a_l _/ _P_a_n_n_e_a_u _d_e _c_o_n_f_i_g_u_r_a_t_i_o_n _/ _R__s_e_a_u.

  3. Ajoutez le protocole TCP/IP et les composants qui s'y rattachent
     depuis le menu _A_j_o_u_t _d_e _l_o_g_i_c_i_e_l_s si vous n'avez pas encore
     install le service TCP/IP.

  4. Dans la section _L_o_g_i_c_i_e_l _e_t _c_a_r_t_e _r__s_e_a_u, slectionnez _P_r_o_t_o_c_o_l_e
     _T_C_P_/_I_P dans la boite de choix _L_o_g_i_c_i_e_l_s _r__s_e_a_u_x _i_n_s_t_a_l_l__s.

  5. Dans _C_o_n_f_i_g_u_r_a_t_i_o_n _T_C_P_/_I_P, slectionnez l'adaptateur rseau
     appropries, par exemple [1]Novell NE2000 Adapter. Entrez l'adresse
     IP 192.168.1.x (1 < x < 255), positionnez le masque de sous rseau
     sur 255.255.255.0 et la passerelle par dfaut  192.168.1.1.

  6. Ne slectionnez pas _C_o_n_f_i_g_u_r_a_t_i_o_n _a_u_t_o_m_a_t_i_q_u_e _D_H_C_P et mettez
     n'importe quoi dans la case _S_e_r_v_e_r _W_I_N_S,  moins que vous ne
     fassiez partie d'un domaine Windows NT et que vous sachiez ce que
     vous faites.
  7. Cliquez sur _D_N_S, et remplissez les informations appropris,
     mentionnes  l'tape 6 de la section 3.3.1. Cliquez sur _O_K une
     fois que c'est fini.

  8. Cliquez sur _C_o_n_f_i_g_u_r_a_t_i_o_n _a_v_a_n_c__e, cochez _U_t_i_l_i_s_e_r _l_e _D_N_S _p_o_u_r _l_a
     _r__s_o_l_u_t_i_o_n _d_e _n_o_m_s, et _U_t_i_l_i_s_e_r _L_M_H_O_S_T_S si vous utilisez un fichier
     de rsolution, comme celui mentionn  l'tape 10 de la section
     3.3.1.

  9. Cliquez alors sur _O_K sur toutes les boites de dialogue, et
     redmarrez le systme.

  10.
     Pingez la machine Linux pour tester la connexion rseau : _F_i_c_h_i_e_r _/
     _E_x__c_u_t_e_r, taper : ping 192.168.1.1
     connexion locale, vous ne pouvez pas encore pinger le monde
     extrieur).


  33..33..44..  CCoonnffiigguurreerr lleess ssyyssttmmeess UUNNIIXX


  1. Si vous n'avez pas encore install votre carte rseau et recompil
     votre noyau avec le driver adquat, faites le maintenant.

  2. Installez des outils TCP/IP, comme par exemple le package nettools,
     si ce n'est dj fait.

  3. Affectez _I_P_A_D_D_R  192.168.1.x (1 < x < 255), puis _N_E_T_M_A_S_K 
     255.255.255.0, _G_A_T_E_W_A_Y  192.168.1.1 et _B_R_O_A_D_C_A_S_T  192.168.1.255.
     Par exemple, sur les systmes Red Hat Linux, vous pouvez diter le
     fichier /etc/sysconfig/network-scripts/ifcfg-eth0, ou simplement le
     faire par l'intermdiaire du _C_o_n_t_r_o_l _P_a_n_e_l.
     sur SunOS, BSDi, Slackware Linux, etc...)

  4. Ajoutez l'adresse IP de votre DNS et votre ordre de recherche DNS
     dans /etc/resolv.conf.

  5. Il sera ventuellement ncessaire de mettre  jout le fichier
     /etc/networks, selon votre configuration.

  6. Redmarrez les services adquats, ou, plus simplement, redmarrez
     votre systme.

  7. Testez votre connexion avec la passerelle en utilisant la commande
     ping : ping 192.168.1.1.
     local, vous ne pouvez pas encore pinger l'extrieur.


  33..33..55..  CCoonnffiigguurraattiioonn ssoouuss DDOOSS aavveecc llee ppaacckkaaggee NNCCSSAA


  1. Si vous n'avez pas encore install votre carte rseau, faites le
     maintenant.

  2. Chargez le driver adquat. Pour une carte NE2000, tapez nwpd 0x60
     10 0x300, si votre carte utilise l'IRQ 10 et l'adresse
     d'entre/sortie 0x300.

  3. Crez un nouveau rpertoire, et dcompressez-y l'archive NCSA
     Telnet : pkunzip tel2308b.zip

  4. Utilisez un diteur de texte pour ouvrir le fichier config.tel.

  5. Affectez myip=192.168.1.x (1 < x < 255), et netmask=255.255.255.0.

  6. Dans cet exemple, vous auriez  rgler hardware=packet,
     interrupt=10, ioaddr=60.

  7. Vous devriez avoir au moins une seule machine dclare comme
     passerelle,  savoir la machine sous Linux :


        name=default
       host=le_nom_de_votre_hote_linux hostip=192.168.1.1 gateway=1





  8. Pour mettre en place le DNS :


       name=dns.domain.com~; hostip=123.123.123.123; nameserver=1




  NB: remplacez les champs par les informations qu'utilise votre machine
  Linux.

  9. Sauvegardez votre nouveau fichier config.tel.

  10.
     Lancez un telnet vers la machine Linux pour tester la connexion
     rseau : telnet 192.168.1.1.


  33..33..66..  CCoonnffiigguurraattiioonn ddeess ssyyssttmmeess MMaaccOOSS uuttiilliissaanntt MMaaccTTCCPP


  1. Si vous n'avez pas encore install le driver pour votre carte
     Ethernet, a serait une excellente ide de le faire maintenant.

  2. Ouvrez le _T_a_b_l_e_a_u _d_e _b_o_r_d _M_a_c_T_C_P. Selectionnez le driver rseau
     adapt (Ethernet, PAS EtherTalk) et cliquez sur le bouton.

  3. Dans la section _O_b_t_e_n_i_r _l_'_a_d_r_e_s_s_e, slectionnez _M_a_n_u_e_l_l_e_m_e_n_t.

  4. Dans _A_d_r_e_s_s_e _I_P, choisissez _c_l_a_s_s _C dans le menu droulant. Vous
     pouvez ignorer le reste de cette boite de dialogue.

  5. Remplissez la section _I_n_f_o_r_m_a_t_i_o_n _D_N_S avec les informations qui
     conviennent.

  6. Dans _A_d_r_e_s_s_e _d_e _l_a _p_a_s_s_e_r_e_l_l_e, entrez 192.168.1.1.

  7. Cliquez sur _O_K pour sauvegarder les changements. Dans la fentre
     principale du _T_a_b_l_e_a_u _d_e _b_o_r_d _M_a_c_T_C_P, entrez l'adresse IP de votre
     Mac (192.168.1.x, 1 < x < 255) dans la zone _A_d_r_e_s_s_e _I_P.

  8. Refermez le _T_a_b_l_e_a_u _d_e _b_o_r_d _M_a_c_T_C_P. Si une boite de dialogue vous
     demande de redmarrer le systme, faites le.

  9. Vous pouvez si vous le dsirez pinger l'hte Linux pour tester la
     connexion rseau. Si vous avez le programme freeware _M_a_c_T_C_P
     _W_a_t_c_h_e_r, cliquez sur le bouton _P_i_n_g et entrez l'adresse de votre
     hte Linux (192.168.1.1) dans la bote de dialogue qui apparait.
     (C'est uniquement une connexion locale, vous ne pouvez pas encore
     pinger l'extrieur).


  10.
     Vous pouvez, si vous le dsirez, crer un fichier Hosts dans votre
     dossier systme, pour pouvoir utiliser les noms d'hte des machines
     de votre rseau local. Le fichier devrait dj exister dans votre
     dossier systme, et contenir quelques exemples comments, que vous
     n'avez qu' modifier pour correspondre  vos besoins.


  33..33..77..  CCoonnffiigguurraattiioonn ddeess ssyyssttmmeess MMaaccOOSS uuttiilliissaanntt OOppeenn TTrraannssppoorrtt


  1. Si vous n'avez pas encore install le driver pour votre carte
     Ethernet, a serait une excellente ide de le faire maintenant.

  2. Ouvrez le _T_a_b_l_e_a_u _d_e _b_o_r_d _T_C_P_/_I_P et choisissez _M_o_d_e _u_t_i_l_i_s_a_t_e_u_r_._._.
     dans le menu _E_d_i_t_i_o_n. Assurez nous que le mode utilisateur est mis
     au niveau _A_v_a_n_c_ et cliquez sur le bouton _O_K.

  3. Choisissez _C_o_n_f_i_g_u_r_a_t_i_o_n_s_._._. depuis le menu _F_i_c_h_i_e_r. Slectionnez
     la configuration _P_a_r _d__f_a_u_t et cliquez sur le bouton _R_e_c_o_p_i_e_r.
     Entrez

  Masq'
     s'agit d'une configuration spciale) dans la boite de dialogue _C_o_n_
     _f_i_g_u_r_a_t_i_o_n _d_e _c_o_p_i_e. Cliquez sur le bouton _O_K puis sur _R_e_n_d_r_e
     _a_c_t_i_v_e.

  4. Slectionnez _E_t_h_e_r_n_e_t depuis le menu _S_e _c_o_n_n_e_c_t_e_r _v_i_a_._._..

  5. Slectionnez l'option qui convient dans le menu _C_o_n_f_i_g_u_r_a_t_i_o_n. Si
     vous ne savez pas quelle option choisir, vous devriez sans doute
     reslectionner la configuration par dfaut et quitter. Je choisis
     _M_a_n_u_e_l_l_e_m_e_n_t.

  6. Saisissez l'adresse IP de votre Mac (192.168.1.x, 1 < x < 255) dans
     la zone _A_d_r_e_s_s_e _I_P.

  7. Mettez le _M_a_s_q_u_e _d_e _s_o_u_s _r__s_e_a_u  255.255.255.0.

  8. L'_A_d_r_e_s_s_e _d_e _r_o_u_t_e_u_r est 192.168.1.1.

  9. Remplissez la case _A_d_r_e_s_s_e _d_u _D_N_S en y mettant votre adresse IP.

  10.
     Entrez le nom de votre domaine Internet (par exemple
     'microsoft.com') dans la boite de dialogue _O_r_d_r_e _d_e _r_e_c_h_e_r_c_h_e _D_N_S.

  11.
     La procdure suivante est optionnelle. L'utilisation de valeurs
     incorrectes peut entrainer des comportements inattendus. Si vous ne
     savez pas ce que vous faites, il vaut mieux ne pas y toucher, et si
     ncessaire vider les cases et zones de slection. Pour ce que j'en
     sais, il n'est pas possible, par l'intermdiaire des boites de
     dialogue, de demander au systme de ne pas utiliser un fichier
     "Hosts" slectionn prcdemment. Si vous saviez comment faire, je
     serais trs intress.
     votre rseau ncessite des paquets de type 802.3.

  12.
     Cliquez sur le bouton _O_p_t_i_o_n_s_._._. pour vous assurer que le TCP/IP
     est activ. J'utilise l'option _C_h_a_r_g_e_r _u_n_i_q_u_e_m_e_n_t _s_i _b_e_s_o_i_n. Si
     vous lancez et quittez des applications utilisant TCP/IP assez
     souvent, sans relancer votre machine, vous pourrez sans doute
     dslectionner _C_h_a_r_g_e_r _u_n_i_q_u_e_m_e_n_t _s_i _b_e_s_o_i_n pour diminuer les
     effets sur le gestionnaire mmoire de votre machine. Lorsque
     l'option est dslectionne, les piles du protocole TCP/IP sont
     toujours en mmoire et prtes  l'emploi. Si l'option est coche,
     la pile TCP/IP est automatiquement charge lorsqu'elle est
     ncessaire, et dcharge sinon. Le processus de la charger et la
     dcharger en mmoire peut fragmenter la mmoire de votre
     ordinateur.

  13.
     Pingez la machine Linux pour tester la connexion rseau. Si vous
     avez le programme freeware _M_a_c_T_C_P _W_a_t_c_h_e_r, cliquez sur le bouton
     _P_i_n_g, et entrez l'adresse de votre machine Linux (192.168.1.1) dnas
     la boite de dialogue qui apparait. (C'est une connexion locale,
     vous ne pouvez pas encore pinger l'extrieur).

  14.
     Vous pouvez crer un fichier Hosts dans votre dossier Systme, pour
     pouvoir utiliser les noms d'hotes de votre rseau local. Le fichier
     peut exister ou non dans votre dossier Systme. Si c'est le cas, il
     devrait contenir des exemples (en commentaires) que vous pouvez
     modifier selon vos souhaits. Sinon, vous pouvez obtenir une copie
     d'un systme utilisant MacTCP, ou juste crer le votre (cela
     ressemble fortement au fichier /etc/hosts sur un systme Unix, qui
     est dcrit dans la RFC 952). Une fois le fichier cr, ouvrez le
     _T_a_b_l_e_a_u _d_e _b_o_r_d _T_C_P_/_I_P, cliquez sur le bouton _S__l_e_c_t_i_o_n_n_e_r _l_e
     _f_i_c_h_i_e_r _H_o_s_t_s_._._., et ouvrez le fichier Hosts.

  15.
     Cliquez sur _F_e_r_m_e_r ou choisissez _F_e_r_m_e_r ou _Q_u_i_t_t_e_r depuis le menu
     _F_i_c_h_i_e_r, et cliquez alors sur le bouton _E_n_r_e_g_i_s_t_r_e_r pour
     enregistrer vos changements.

  16.
     Les changements prennent effet immdiatement, mais cela ne fera pas
     de mal de rebouter le systme.



  33..33..88..  CCoonnffiigguurreerr uunn rrsseeaauu NNoovveellll uuttiilliissaanntt llee DDNNSS


  1. Si vous n'avez pas encore install le gestionnaire de priphrique
     de votre adaptateur Ethernet, faites le ds maintenant.

  2. Tlchargez tcpip16.exe depuis (NdT ???)

  3. Editez c:\nwclient\startnet.bat (voici une copie du mien) :

     SET NWLANGUAGE=ENGLISH
     LH LSL.COM
     LH KTC2000.COM
     LH IPXODI.COM
     LH tcpip
     LH VLM.EXE
     F:



  4. Editez c:\nwclient\net.cfg (changez le Link drivers, NE2000 dans
     mon cas) :








     Link Driver KTC2000
             Protocol IPX 0 ETHERNET_802.3
             Frame ETHERNET_802.3
             Frame Ethernet_II
             FRAME Ethernet_802.2

     NetWare DOS Requester
                FIRST NETWORK DRIVE = F
                USE DEFAULTS = OFF
                VLM = CONN.VLM
                VLM = IPXNCP.VLM
                VLM = TRAN.VLM
                VLM = SECURITY.VLM
                VLM = NDS.VLM
                VLM = BIND.VLM
                VLM = NWP.VLM
                VLM = FIO.VLM
                VLM = GENERAL.VLM
                VLM = REDIR.VLM
                VLM = PRINT.VLM
                VLM = NETX.VLM

     Link Support
             Buffers 8 1500
             MemPool 4096

     Protocol TCPIP
             PATH SCRIPT     C:\NET\SCRIPT
             PATH PROFILE    C:\NET\PROFILE
             PATH LWP_CFG    C:\NET\HSTACC
             PATH TCP_CFG    C:\NET\TCP
             ip_address      xxx.xxx.xxx.xxx
             ip_router       xxx.xxx.xxx.xxx



  5. et finalement, crez c:\bin\resolv.cfg :


     SEARCH DNS HOSTS SEQUENTIAL
     NAMESERVER 207.103.0.2
     NAMESERVER 207.103.11.9



  6. J'espre que cela vous aura aid  configurer vos rseaux Novell,
     mais cela ne fonctionne que pour Netware 3.1x ou 4.x.


  33..33..99..  CCoonnffiigguurreerr OOSS//22 WWaarrpp


  1. Si vous n'avez toujours pas configur votre adaptateur rseau
     Ethernet, c'est le moment de le faire.

  2. Installez le protocole TCP/IP s'il n'est pas dj prsent.

  3. Allez dans les paramtres _P_r_o_g_r_a_m_s_/_T_C_P_/_I_P_(_L_A_N_)_/_T_C_P_/_I_P

  4. Dans _'_N_e_t_w_o_r_k_', ajoutez votre adresse TCP/IP et configurez votre
     masque de sous rseau (255.255.255.0)

  5. Dans _"_R_o_u_t_i_n_g_" cliquez sur _"_A_j_o_u_t_e_r_". Slectionnez _"_d_e_f_a_u_l_t_" pour
     le _T_y_p_e and entrez l'adresse de votre machine Linux dans le champs
     _"_R_o_u_t_e_r _A_d_d_r_e_s_s_" (192.168.1.1).

  6. Utilisez la mme adresse DNS (Serveur de noms) que celle de votre
     machine Linux.

  7. Fermez le panneau de contrle de TCP/IP. Rpondez oui au ( la)
     question(s) suivante(s).

  8. Reboutez votre systme.

  9. Vous devriez tre en mesure de pinger votre hte Linux pour tester
     la configuration rseau. Taper 'ping 192.168.1.1" dans une bote de
     commande OS/2. Si vous recevez les paquets IP, tout fonctionne
     correctement.


  33..33..1100..  CCoonnffiigguurreerr lleess aauuttrreess ssyyssttmmeess

  Ces systmes devraient suivre la meme logique d'installation.  Lisez
  les sections prcdentes. Si vous tes intresss par l'criture de la
  documentation sur n'importe quel systme, comme OS/2, ou une varit
  quelconque de systme Unix, envoyez s'il vous plait des instructions
  dtailles  ambrose@writeme.com (Note du traducteur : en anglais bien
  sr).



  33..44..  CCoonnffiigguurreerr lleess rrgglleess dd''IIPP FFoorrwwaarrddiinngg

  A ce point du document, vous devriez avoir votre noyau et les autres
  packages installs, ainsi que les modules ncessaires chargs. De
  plus, les adresses IP, la passerelle, et le DNS devraient tre
  installs sur les AAUUTTRREESS ordinateurs.


  Maintenant, la seule chose  faire est d'utiliser l'outil de
  firewalling IP (ipfwadm) pour faire suivre les paquets appropris  la
  machine qui convient :




       ** Ceci peut tre fait de diverses faons. Les suggestions
       et exemples suivants fonctionnent pour moi, mais il se peut
       que vous ayez d'autres ides. Je vous renvoie  la section
       4.4 et aux pages de manuel de ipchains(2.2.x) /
       ipfwadm(2.0.x) pour plus de dtails. **




       **** CCeettttee sseeccttiioonn ffoouurrnniiss UUNNIIQQUUEEMMEENNTT llee mmiinniimmuumm ddee rrgglleess
       ppoouurr aavvooiirr uunn ll''IIPP MMaassqquueerraaddee oopprraattiioonnnneell,, lleess pprroobblleemmeess ddee
       ssccuurriittss nnee ssoonntt ppaass ccoonnssiiddrrss.. IIll eesstt ffoorrtteemmeenntt rreeccoomm
       mmaanndd qquuee vvoouuss ppaassssiieezz qquueellqquuee tteemmppss ppoouurr aapppplliiqquueerr qquueellqquueess
       rrgglleess ddee ffiirreewwaalllliinngg aapppprroopprriieess ppoouurr aauuggmmeenntteerr llaa
       ssccuurriitt.. ****











  33..44..11..  NNooyyaauuxx LLiinnuuxx 22..22..xx


  iippffwwaaddmm nn''eesstt pplluuss ll''oouuttiill  uuttiilliisseerr ppoouurr mmaanniippuulleerr lleess rrgglleess iippmmaassqq
  ppoouurr lleess nnooyyaauuxx 22..22..xx,, uuttiilliisseezz iippcchhaaiinnss..



       ipchains -P forward DENY
       ipchains -A forward -s yyy.yyy.yyy.yyy/x -j MASQ




  O x est le nombre correspondant a la classe de votre sous rseau, et
  yyy.yyy.yyy.yyy est l'adresse de votre rseau.



       netmask         | x  | Subnet
       ~~~~~~~~~~~~~~~~|~~~~|~~~~~~~~~~~~~~~
       255.0.0.0       | 8  | Class A
       255.255.0.0     | 16 | Class B
       255.255.255.0   | 24 | Class C
       255.255.255.255 | 32 | Point-to-point




  Vous pouvez aussi utiliser le format yyy.yyy.yyy.yyy/xxx.xxx.xxx.xxx,
  o xxx.xxx.xxx.xxx spcifie votre masque de sous rseau tel
  255.255.255.0

  Par exemple dans mon rseau de classe C, j'entrais ;



       ipchains -P forward DENY
       ipchains -A forward -s 192.168.1.0/24 -j MASQ




  ou


       ipchains -P forward DENY
       ipchains -A forward -s 192.168.1.0/255.255.255.0 -j MASQ






  Vous pouvez aussi le faire machine par machine. Par exemple, si je
  veux que 192.168.1.2 et 192.168.1.8 aient accs  Internet, mais pas
  les autres machines, j'aurais mis :



       ipchains -P forward DENY
       ipchains -A forward -s 192.168.1.2/32 -j MASQ
       ipchains -A forward -s 192.168.1.8/32 -j MASQ



  Il ne faut jjaammaaiiss que votre rgle par dfaut soit le masquerading,
  sinon n'importe qui pouvant manipuler ses tables de routage pourra
  utiliser votre machine Linux pour masquer son identit !



  De mme, vous pouvez ajouter ces lignes a votre /etc/rc.local, ou au
  fichier rc que vous prfrez, ou le faire manuellement  chaque fois
  que vous en avez besoin.


  Pour plus de dtails sur ipchain, rfrez vous au Linux IPCHAINS HOWTO
  <http://www.freenix.org/unix/linux/HOWTO-vo/IPCHAINS-HOWTO.html>



  33..44..22..  NNooyyaauuxx LLiinnuuxx 22..00..xx




       ipfwadm -F -p deny
       ipfwadm -F -a m -S yyy.yyy.yyy.yyy/x -D 0.0.0.0/0




  ou



       ipfwadm -F -p deny
       ipfwadm -F -a masquerade -S yyy.yyy.yyy.yyy/x -D 0.0.0.0/0




  O x est le nombre correspondant  la classe de votre sous reseau, et
  yyy.yyy.yyy.yyy est l'adresse de votre rseau.



       Masque de sous rseau | x  | Sous rseau
       ~~~~~~~~~~~~~~~~~~~~~~|~~~~|~~~~~~~~~~~~~~~
       255.0.0.0             | 8  | Classe A
       255.255.0.0           | 16 | Classe B
       255.255.255.0         | 24 | Classe C
       255.255.255.255       | 32 | Point-to-point (PPP)




  Vous pouvez aussi utiliser le format yyy.yyy.yyy.yyy/xxx.xxx.xxx.xxx,
  o xxx.xxx.xxx.xxx spcifie votre masque de sous rseau tel
  255.255.255.0

  Par exemple dans mon rseau de classe C, j'entrais ;



       ipfwadm -F -p deny
       ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0




  Puisque les paquets de demande de bootp arrivent sans adresse IP
  valide alors que le client ne connait rien de lui, les personnes
  utilisant un serveur bootp comme machine de masquerading/firewall
  devront utiliser la commande suivante avant la commande deny :



       ipfwadm -I -a accept -S 0/0 68 -D 0/0 67 -W bootp_clients_net_if_name -P udp





  Vous pouvez galement faire cela machine par machine. Par exemple, si
  je veux que 192.168.1.2 et 192.168.1.8 aient accs  Internet, mais
  pas les autres machines, j'utiliserai :



       ipfwadm -F -p deny
       ipfwadm -F -a m -S 192.168.1.2/32 -D 0.0.0.0/0
       ipfwadm -F -a m -S 192.168.1.8/32 -D 0.0.0.0/0





  Une erreur frquente est d'utiliser comme premire rgle la commande :

  ipfwadm -F -p masquerade




  Il ne faut jjaammaaiiss que votre rgle par dfaut soit le masquerading,
  sinon n'importe qui pouvant manipuler ses tables de routage pourra
  utiliser votre machine Linux pour masquer son identit !



  Une fois encore, vous pouvez ajouter ces lignes  vos fichiers
  /etc/rc.local, ou le faire manuellement  chaque fois que vous avez
  besoin de l'IP Masquerading.


  Veuillez lire la section 4.4 pour des instructions dtailles sur
  Ipfwadm.


  33..55..  TTeesstteerr IIPP MMaassqquueerraaddee

  Il est maintenant temps de tester notre travail. Assurez vous que la
  connexion de votre hte Linux  Internet est correcte.


  Vous pouvez par exemple essayer de parcourir quelques sites Web (sur
  _I_n_t_e_r_n_e_t !!!) depuis vos AAUUTTRREESS machines, et voir ce que vous obtenez.
  Je recommande d'utiliser une adresse IP plutt qu'un nom DNS lors de
  votre premier essai, puisque votre rglage pour le DNS peut tre
  incorrect.


  Par exemple, vous pouvez accder au site Web du Linux Documentation
  Project  http://metalab.unc.edu/mdw/linux.html en entrant
  http://152.19.254.81/mdw/linux.html

  Si vous voyez la page du LDP, flicitations ! Ca marche ! Vous pouvez
  alors essayer avec un autre hte, puis ping, telnet, ssh, ftp, Real
  Audio, True Speech, etc...


  Pour l'instant je n'ai eu aucun problme avec ces rglages, et c'est
  totalement grce aux personnes qui ont pass du temps  faire
  fonctionner cette superbe fonctionnalit de Linux.





  44..  AAuuttrreess ssuujjeettss rreellaattiiffss  IIPP MMaassqquueerraaddee eett aauu ssuuppppoorrtt llooggiicciieell



  44..11..  PPrroobbllmmeess aavveecc IIPP MMaassqquueerraaddee

  Certains protocoles ne marcheront pas avec l'IP masquerading, parce
  que soit ils supposent des choses sur les numros de port ou soit
  qu'ils encodent les donnes sur le port et les adresses dans leurs
  paquets. Ces protocoles ont besoin de _p_r_o_x_y intgrs dans le code du
  masquerading pour fonctionner.



  44..22..  SSeerrvviicceess eennttrraannttss

  Le masquerading ne peut pas du tout prendre en charge les services
  entrants. Il y a plusieurs faons de les autoriser, mais ces mthodes
  sont compltement en dehors du thme du masquerading et se rapprochent
  plutt de la technique des firewalls.


  Si vous n'avez pas besoin d'une grande scurit, vous pouvez
  simplement rediriger les ports. Il y a de nombreuses faons de faire
  cela - personnellement j'utilise une version modifie du programme
  redir (qui, je l'espre, sera disponible sur sunsite et ses mirrors
  prochainement). Si vous dsirez avoir des niveaux d'autorisation sur
  les connexions entrantes, vous pouvez alors utiliser les TCP Wrappers
  ou Xinetd par dessus redir (version 0.7 ou suprieure) pour autoriser
  seulement des adresses IP donnes, ou utiliser d'autre outils. La
  bote  outils pour firewall TIS (TIS Firewall Toolkit) est un bon
  produit pour ceux qui cherchent des outils et des informations.


  Une section en disant plus long sur le forwarding sera bientot
  ajoute.



  44..33..  PPrrooggrraammmmeess cclliieennttss ssuuppppoorrttss eett aauuttrreess rreemmaarrqquueess ppoouurr llaa ccoonnffiigg
  uurraattiioonn


        **** LLaa lliissttee ssuuiivvaannttee nn''eesstt pplluuss mmaaiinntteennuuee.. VVooyyeezz cceettttee ppaaggee
       ssuurr lleess aapppplliiccaattiioonnss ffoonnccttiioonnnnaanntt aauu ttrraavveerrss dd''IIPP MMaassqquueerraadd
       iinngg eett llaa ppaaggee IIPP MMaassqquueerraaddee RReessoouurrccee ppoouurr pplluuss ddee ddttaaiillss..
       ****




  En gnral, les applications qui utilisent TCP et/ou UDP devraient
  fonctionner. Si vous avez une quelconque suggestion ou question 
  propos des applications compatibles avec IP masquerade, visitez la
  page sur les applications fonctionnant avec IP Masquerading par Lee
  Nevo.


  44..33..11..  LLeess cclliieennttss qquuii ffoonnccttiioonnnneenntt

  Clients gnriques

     HHTTTTPP
        toutes les plateformes, naviguer sur le web ;


     PPOOPP && SSMMTTPP
        toutes les plateformes, clients de courrier lectronique ;


     TTeellnneett
        toutes les plateformes, sessions distantes ;


     FFTTPP
        toutes les plateformes, avec le module ip_masq_ftp.o (tous les
        sites ne fonctionnent pas avec certains clients ; par exemple,
        certains sites ne peuvent pas tre atteints en utilisant
        ws_ftp32 mais fonctionnent avec Netscape) ;


     AArrcchhiiee
        toutes les plateformes, client de recherche de fichiers (tous
        les clients ne fonctionnent pas) ;


     NNNNTTPP ((UUSSEENNEETT))
        toutes les plateformes, client news USENET ;


     VVRRMMLL
        Windows (peut tre toutes les plateformes), ralit virtuelle ;


     ttrraacceerroouuttee
        surtout les plateformes UNIX, certaines variantes ne devraient
        pas fonctionner ;


     ppiinngg
        toutes plateformes, avec le patch ICMP


     qquuooiiqquuee ccee ssooiitt,, bbaass ssuurr IIRRCC
        toutes les plateformes, avec le module ip_masq_irc.o ;


     CClliieenntt GGoopphheerr
        toutes les plateformes ;


     CClliieenntt WWAAIISS
        toutes les plateformes.



  Clients Multimdia


     RReeaall AAuuddiioo PPllaayyeerr 22..00
        Windows, flux audio par rseau, avec le module ip_masq_raudio


     TTrruuee SSppeeeecchh PPllaayyeerr 11..11bb
        Windows, flux audio par rseau


     IInntteerrnneett WWaavvee PPllaayyeerr
        Windows, flux audio par rseau


     WWoorrllddss CChhaatt 00..99aa
        Windows, programme client-serveur de discussion 3D


     AAllpphhaa WWoorrllddss
        Windows, programme client-serveur de discussion 3D


     IInntteerrnneett PPhhoonnee 33..22
        Windows, communications audio. Vous ne pouvez tre contact que
        si vous initiez la connexion, mais on ne peut pas vous appeler.


     PPoowwwwooww
        Windows, communication audio. Vous ne pouvez tre contact que
        si vous initiez la connexion, mais on ne peut pas vous appeler.


     CCUU--SSeeeeMMee
        toutes les plateformes, avec le module cuseeme, voir sur IP
        Masquerade  Resource <http://ipmasq.cjb.net> pour les dtails.


     VVDDOOLLiivvee
        Windows, avec le patch vdolive


  NB : Certains clients tels IPhone et Powwow peuvent fonctionner mme
  si vous n'tes pas la personne qui initie la connexion, en utilisant
  le _p_a_c_k_a_g_e _i_p_a_u_t_o_f_w (voir la section 4.6).



  Autres clients

     NNCCSSAA TTeellnneett 22..33..0088
        DOS, une suite de logiciels contenant telnet, ftp, ping, etc...


     PPCC--aannyywwhheerree ppoouurr WWiinnddoowwss 22..00
        MS-Windows, controle d'un PC  distance avec TCP/IP, fonctionne
        uniquement si la machine est un client et non un hte.


     SSoocckkeett WWaattcchh
        utilise ntp - network time protocol


     LLiinnuuxx nneett--aacccctt ppaacckkaaggee
        Linux, package d'administration par rseau




  44..33..22..  CClliieennttss qquuii nnee ffoonnccttiioonnnneenntt ppaass



     IInntteell IInntteerrnneett PPhhoonnee BBeettaa 22
        Connexion ok, mais la voix ne peut que sortir de votre rseau.


     IInntteell SSttrreeaammiinngg MMeeddiiaa VViieewweerr BBeettaa 11
        Connexion impossible au serveur.


     NNeettssccaappee CCoooollTTaallkk
        Connexion  l'hte distant impossible.


     ttaallkk,,nnttaallkk
        ne fonctionnera pas - ncessite l'criture d'un proxy noyau.


     WWeebbPPhhoonnee
        Ne peut pas fonctionner (il fait des suppositions

        invalides sur les adresses).


     XX  Non test, mais je pense que cela ne peut pas fonctionner 
        moins que quelqu'un crive un proxy X, qui est sans doute un
        programme externe au code de masquerading. Une faon de le faire
        fonctionner est d'utiliser sssshh comme lien, et X comme proxy.




  44..33..33..  PPllaatteeffoorrmmeess//SSyyssttmmeess dd''eexxppllooiittaattiioonnss tteessttss ssuurr ddeess mmaacchhiinneess
  cclliieenntteess




    Linux

    Solaris

    Windows 95

    Windows NT (workstation et serveur)

    Windows pour Workgroup 3.11 (avec le package TCP/IP)

    Windows 3.1 (avec le package Chameleon)

    Novel 4.01 Serveur

    OS/2 (y compris Warp v3)

    Macintosh OS (avec MacTCP ou Open Transport)

    DOS (avec le package NCSA Telnet, DOS Trumpet fonctionne
     partiellement)

    Amiga (avec AmiTCP ou AS225-stack)

    Stations VAX 3520 et 3100 avec UCX (pile TCP/IP pour VMS)


    Alpha/AXP avec Linux/Redhat

    SCO Openserver (v3.2.4.2 et 5)

    IBM RS/6000 sous AIX

  Normalement, tous les OS disposant d'une couche TCP/IP et permettant
  de specifier un firewall/gateway devraient marcher avec l'IP
  masquerading


  44..44..  AAddmmiinniissttrraattiioonn dduu ffiirreewwaallll IIPP ((iippffwwaaddmm))

  Cette section constitue un guide plus prcis sur l'utilisation
  d'ipfwadm.

  Voici un script d'initialisation pour un systme qui fait office de
  firewall et de masquerading. L'interface  laquelle on fait confiance
  est 192.168.255.1 (celle du rseau local) et l'interface PPP a t
  change pour des raisons de scurit. Toutes les interfaces sont
  listes individuellement pour intercepter l'IP spoofing et les
  routages inexacts. Tout ce qui n'est pas explicitement autoris est
  interdit !











































  #!/bin/sh
  #
  # /etc/rc.d/rc.firewall, dfinit la configuration du firewall.
  # appel depuis rc.local.
  #

  PATH=/sbin:/bin:/usr/sbin:/usr/bin

  # pour les tests, attend un moment puis efface toutes les rgles du
  # firewall. Dcommentez les lignes suivantes si vous voulez que le firewall
  # soit dsactiv automatiquement aprs 10 minutes.
  # (sleep 600; \
  # ipfwadm -I -f; \
  # ipfwadm -I -p accept; \
  # ipfwadm -O -f; \
  # ipfwadm -O -p accept; \
  # ipfwadm -F -f; \
  # ipfwadm -F -p accept; \
  # ) &

  # Connexions entrantes, efface tout et positionne le comportement par dfaut 
  # deny (refus). En fait, le comportement par dfaut est inadquat puisqu'il y
  # a une rgle pour tout intercepter, avec refus et logging.
  ipfwadm -I -f
  ipfwadm -I -p deny
  # interface locale, machines locales. Aller n'importe o est autoris.
  ipfwadm -I -a accept -V 192.168.255.1 -S 192.168.0.0/16 -D 0.0.0.0/0
  # interface distante, prtendant tre une machine locale. C'est de l'IP
  # spoofing, on refuse.
  ipfwadm -I -a deny -V votre.adresse.PPP.statique -S 192.168.0.0/16 -D 0.0.0.0/0 -o
  # interface distante, n'importe qu'elle source, l'accs  notre adresse PPP
  # est valide
  ipfwadm -I -a accept -V votre.adresse.PPP.statique -S 0.0.0.0/0 -D votre.adresse.PPP.statique/32
  # l'interface loopback est valide.
  ipfwadm -I -a accept -V 127.0.0.1 -S 0.0.0.0/0 -D 0.0.0.0/0
  # une fois toutes les rgles faites, toutes les autres connexions entrantes
  # sont refuses et loggues.
  ipfwadm -I -a deny -S 0.0.0.0/0 -D 0.0.0.0/0 -o

  # Connexions sortantes,efface tout et positionne le comportement par dfaut 
  # deny (refus).En fait, le comportement par dfaut est inadquat puisqu'il y a
  # une rgle pour tout intercepter, avec refus et logging.
  ipfwadm -O -f
  ipfwadm -O -p deny
  # interface locale, machines locales. N'importe quelle source allant vers le
  # rseau local est valide.
  ipfwadm -O -a accept -V 192.168.255.1 -S 0.0.0.0/0 -D 192.168.0.0/16
  # destination vers le rseau local  partir de l'interface sortante. C'est du
  # routage pirat, tout refuser.
  ipfwadm -O -a deny -V votre.adresse.PPP.statique -S 0.0.0.0/0 -D 192.168.0.0/16 -o
  # sortante depuis le rseau local sur l'interface sortante. C'est du
  # masquerading pirate, tout refuser.
  ipfwadm -O -a deny -V  votre.adresse.PPP.statique -S 192.168.0.0/16 -D 0.0.0.0/0 -o
  # sortante depuis le rseau local sur l'interface sortante. C'est du
  # masquerading pirate, tout refuser.
  ipfwadm -O -a deny -V votre.adresse.PPP.statique -S 0.0.0.0/0 -D 192.168.0.0/16 -o
  # l'interface loopback est valide.
  ipfwadm -O -a accept -V 127.0.0.1 -S 0.0.0.0/0 -D 0.0.0.0/0
  # une fois toutes les rgles faites, toutes les autres connexions sortantes
  # sont refuses et loggues.
  ipfwadm -O -a deny -S 0.0.0.0/0 -D 0.0.0.0/0 -o


  # Connexions  faire suivre (forwarding), efface tout et positionne le
  # comportement par dfaut  deny (refus). En fait, le comportement par dfaut
  # est inadquat puisqu'il y a une rgle pour tout intercepter, avec refus et
  # logging.
  ipfwadm -F -f
  ipfwadm -F -p deny
  # Masquerade depuis le rseau local sur l'interface locale vers n'importe o
  ipfwadm -F -a masquerade -W ppp0 -S 192.168.0.0/16 -D 0.0.0.0/0
  # une fois toutes les rgles faites, toutes les autres connexions  faire
  # suivre sont refuses et loggues.
  ipfwadm -F -a deny -S 0.0.0.0/0 -D 0.0.0.0/0 -o



  Vous pouvez bloquer le trafic vers ou depuis un site particulier en
  utilisant -I, -O ou -F. Souvenez vous que les rgles sont analyses de
  haut en bas, et -a signifie ajoute (_a_p_p_e_n_d)  l'ensemble des rgles
  existantes. Par exemple (non test) :

  En utilisant les rgles -I. Probablement le plus rapide mais stoppe
  uniquement les machines locales, le firewall peut encore accder au
  site "interdit". C'est peut tre d'ailleurs le comportement que vous
  dsirez.



  ... dbut des rgles -I ...
  # rejette et loggue l'interface locale et la machine locale allant sur
  # 204.50.10.13
  ipfwadm -I -a reject -V 192.168.255.1 -S 192.168.0.0/16 -D 204.50.10.13/32 -o
  # interface locale, machines locales. Aller n'importe o est autoris.
  ipfwadm -I -a accept -V 192.168.255.1 -S 192.168.0.0/16 -D 0.0.0.0/0
  ... fin des rgles -I ...




  En utilisant les rgles -O. C'est le plus lent puisque les paquets
  passent d'abord  travers le masquerading, mais cette rgle empche
  mme au firewall d'accder au site interdit.


  ... dbut des rgles -O ...
  # rejette et loggue les connexions sortantes vers 204.50.10.13
  ipfwadm -O -a reject -V votre.adresse.PPP.statique -S votre.adresse.PPP.statique/32 -D 204.50.10.13/32 -o
  # tout le reste, sortant vers l'interface distante est valide
  ipfwadm -O -a accept -V votre.adresse.PPP.statique -S votre.adresse.PPP.statique/32 -D 0.0.0.0/0
  ... fin des rgles -O ...



  En utilisant les rgles -F. Probablement plus lent qu'en utilisant les
  rgles -I, et cela stoppe uniquement les machines pour lesquelles on
  effetue du masquerading (c'est  dire les machines internes). Le
  firewall peut encore accder au site interdit.


  ... dbut des rgles -F ...
  # Rejette et loggue les connexions depuis le rseau local sur l'interface PPP
  # vers 204.50.10.13.
  ipfwadm -F -a reject -W ppp0 -S 192.168.0.0/16 -D 204.50.10.13/32 -o
  # Masquerade depuis le rseau local sur l'interface locale vers n'importe o
  ipfwadm -F -a masquerade -W ppp0 -S 192.168.0.0/16 -D 0.0.0.0/0
  ... fin des rgles -F ...



  Il n'y a pas besoin d'une rgle spciale pour autoriser 192.168.0.0/16
   se connecter sur 204.50.11.0, ce comportement est inclus dans les
  rgles globales.

  Il y a plus d'une faon d'crire les rgles prcdentes. Par exemple,
  au lieu de -V 192.168.255.1, vous pouvez utiliser -W eth0, au lieu de
  -V votre.adresse.PPP.statique, vous pouvez utiliser -W ppp0. C'est une
  question de got personnel.




  44..55..  CChhaaiinneess IIPP FFiirreewwaalllliinngg ((iippcchhaaiinnss))

  Voici l'outil de manipulation de rgles de firewalling cr pour les
  noyaux 2.2.x (il y a un patch qui permettra de l'utiliser avec le
  2.0.x).

  Nous mettrons  jour cette section pour donner plein d'exemples sur
  l'utilisation d'ipchains trs bientt.

  Rfrez vous  Linux IP Firewalling Chains page
  <http://www.rustcorp.com/linux/ipchains/> et Linux IPCHAINS HOWTO
  <http://www.freenix.org/unix/linux/HOWTO-vo/IPCHAINS-HOWTO.html> pour
  plus de dtails.




  44..66..  LL''IIPP MMaassqquueerraaddee eett llaa nnuummrroottaattiioonn  llaa ddeemmaannddee..


  1. Si vous voulez que votre rseau se connecte automatiquement 
     Internet, le package _d_i_a_l_d de numrotation  la demande sera une
     grande aide.

  2. Pour mettre en place _d_i_a_l_d, veuillez vous rfrer  la page (en
     anglais) Setting Up Diald for Linux Page
     <http://home.pacific.net.sg/~harish/diald.config.html>

  3. Une fois que diald et IP masq auront t installs, vous pouvez
     aller sur n'importe laquelle des machines clients et initier une
     connexion web, telnet ou ftp.

  4. _d_i_a_l_d va dtecter une demande, appeler votre provider Internet et
     tablir la connexion.

  5. Un _t_i_m_e_o_u_t (dlai d'attente dpass) sera invitable sur la
     premire connexion, mais c'est le lot des modems analogiques. Le
     temps mis  tablir la connexion va provoquer un timeout de votre
     programme client. Ceci peut tre vit si vous utilisez une
     connexion ISDN. Tout ce que vous devez faire est relancer le client
     qui a fait le timeout.


  44..77..  FFaaiirree ssuuiivvrree lleess ppaaqquueettss aavveecc IIPPaauuttooffww

  IPautofw est un module gnrique pour faire suivre les paquets TCP et
  UDP pour le Masquerading de Linux. Gnralement, pour utiliser un
  client utilisant UDP, un module spcifique doit tre charg. Ipautofw
  agit de manire plus gnrique, puisqu'il fait suivre tout type de
  trafic, y compris ceux pour lesquels les modules spcifiques ne feront
  rien suivre. Cela peut crer un trou de scurit, si ce n'est pas
  administr correctement.




  44..88..  CCUU--SSeeeeMMee eett llee mmiinnii--HHOOWWTTOO LLiinnuuxx IIPP--MMaassqquueerraaddee


  Fournis par Michael Owings <mailto:mikey@swampgas.com>.


  44..88..11..  IInnttrroodduuccttiioonn



       Cette section explique les tapes ncessaires pour faire en
       sorte que Cu-SeeMe (Les deux versions : Cornell ou White
       Pine) marche bien avec l'IP-Masquerade de Linux.


  Cu-SeeMe est un paquetage de vidoconfrence disponible pour Windows
  et Macintosh. Une version gratuite est disponible  Cornell University
  <http://cu-seeme.cornell.edu>. Une version commerciale largement
  amliore peut etre obtenue  White Pine Software
  <http://www.wpine.com>.

  L'IP masquerade permet  une ou plusieurs machines d'un LAN de se
  cacher derriere une seule machine Linux connecte  Internet. Les
  stations du LAN accedent  Internet d'une maniere presque transparente
  meme sans adresse IP valide. La machine Linux rcrit les paquets
  sortant du LAN pour aller vers Internet de telle sort qu'ils semblent
  venir de cette meme machine. Les paquets revenants sont rcrits et
  rerouts vers la bonne machine sur le LAN. Cet arrangement permet  la
  majorit des applications Internet de marcher de faon transparente
  depuis les stations du LAN. Pour quelques applications (comme CU-
  SeeME), nanmoins, le code de routage masquerading de Linux a besoin
  d'un peu d'aide pour router les paquets proprement. Cette aide vient
  de modules spciaux du noyau. Pour plus d'informations sur l'IP
  Masquerading, rfrez vous  The Linux IP Masquerading Website
  <http://www.indyramp.com/masq/>.


  44..88..22..  LLee ffaaiirree mmaarrcchheerr......


  Tout d'avord, vous avec besoin d'un noyau proprement configur. Vous
  devriez avoir un support complet de compil pour IP-Masquerading et
  IP-AutoForwarding. IP AutoForwarding est disponible depuis la version
  2.0.30 du noyau - vous aurez a patcher des noyaux plus anciens.
  Rfrez vous  Linux IP Masquerade Resource <http://ipmasq.cjb.net>
  pour des liens vers l'IP-AutoForwarding.

  Ensuite, vous aurez besoin de la derniere version de
  ip_masq_cuseeme.c. La derniere version est disponible via FTP depuis
  ftp://ftp.swampgas.com/pub/cuseeme/ip_masq_cuseeme.c. Ce nouveau
  module sera inclut dans la version 2.0.31 du noyau. Vous devriez
  remplacer le votre par celui l. ip_masq_cuseeme.c rside normalement
  dans le repertoire net/ipv4 des sources de linux. Vous devriez
  compiler et installer ce module.

  Maintenant, vous devriez mettre en place de l'ip autoforwarding pour
  les ports udp 7648 et 7649 comme il suit :


  ipautofw -A -r udp 7648 7649 -c udp 7648 -u



  Ou


  ipautofw -A -r udp 7648 7649 -h www.xxx.yyy.zzz



  La premiere forme autorisera les appels de/vers la derniere station 
  avoir utilis le port 7648 (le port Cu-SeeMe principal). Je prfere la
  premiere invocation car elle est plus flexible car il n'y a pas besoin
  de specifier une IP fixe. Bien sur, cela implique que la station aura
  eu  faire un appel sortant pour pouvoir recevoir un appel...

  Notez que que les deux lignes laissent les ports 7648 et 7649 des
  machines clients ouvertes au monde exterieur - et bien que cela ne
  pose pas un trop gros trou de scurit, vous devriez etre
  prcautionneux.

  Finalement, chargez le nouveau modules ip_masq_cuseeme comme a :


  modprobe ip_masq_cuseeme



  Vous devriez maintenant tre capable de lancer CU-SeeMe depuis une
  machine cache sur votre LAN et de vous connecter  un rflecteur
  distant, ou  un autre utilisateur de CU-SeeMe. Vous devriez aussi
  etre capable de recevoir des appels. Notez que les appelant de
  l'exterieur devront appeler l'IP de votre gateway, PAS la station
  cache.


  44..88..33..  RReessttrriiccttiioonnss//MMiissee eenn ggaarrddee


  44..88..33..11..  RReefflleecctteeuurrss pprroottgg ppaarr mmoott ddee ppaassssee


  Ce n'est mme pas la peine d'y songer. White Pine utilise l'IP source
  (comme cela est fait par le client) pour encrypter le mot de passe
  avant la transmission. Comme nous avons  rcrire l'adresse le
  rflecteur utilise une mauvaise IP pour pour le decrypter, ce qui
  donne un mot de passe invalide... Cela ne sera rpar que si White
  Pine change sa facon d'encryter (comme je leur ait suggr), ou si ils
  decident de rendre leurs routines d'encryption publique de telle sorte
  que l'on puisse rparrer ip_masq_cuseeme. Alors que les chances de
  voir la deuxieme solution s'envolent, j'encourage tous ceux qui lisent
  a  contacter White Pine et leur suggrer la premiere approche. Comme
  le trafic sur cette page est relativement gros, je suppose que nous
  pouvons gnrer suffisament d'email pour faire avancer ce probleme
  dans la liste de priorits de White Pine.

  Merci  Thomas Griwenka d'avoir port cela  mon attention.


  44..88..33..22..  LLaanncceerr uunn RRfflleecctteeuurr

  Vous ne devez pas essayer de lancer un rflecteur sur la mme machine
  o vous avez un ip_masq_cuseeme et un ipautoforwarding sur le port
  7648 de charg. Cela ne marcherais pas, car les deux requirent le
  port 7648. Donc, lancez le rflecteur soit sur une machine accessible
  depuis l'Internet, ou dchargez le support pour le client Cu-SeeMe
  avant de lancer le rflecteur.





  44..88..33..33..  PPlluussiieeuurrss uuttiilliissaatteeuurrss ddee CCUU--SSeeeeMMee

  Vous ne pouvez pas avoir plusieurs utilisateurs simultans de CU-SeeMe
  sur le LAN au mme instant. Ceci est du au fait que CU-SeeMe se borne
   toujours utiliser le port 7648, qui ne peut tre redirig
  (facilement) qu' une seule station en mme temps.

  En utilisant du -c (port controleur) en lancant ipautofw ci-dessus,
  vous pouvez eviter de spcifier une adresse de station fixe autorise
  a utiliser CU-SeeMe. La premire station qui envoie quelque chose sur
  le port 7648 sera dsigne pour recevoir le trafic sur les ports 7648
  et 7649. A peu pres 5 minutes aprs que cette station soit devenue
  inactive sur le port 7648, une autre station pourra utiliser CU-SeeMe.


  44..88..33..44..  BBeessooiinn dd''aaiiddee ppoouurr CCUU--SSeeeeMMee ??


  N'hsitez pas  envoyer un email avec vos commentaires ou vos
  questions  mikey@swampgas.com. Ou si vous prfrez, vous pouvez
  m'appeler via CU-SeeMe <http://www.swampgas.com/vc/vc.htm>.



  44..99..  AAuuttrreess oouuttiillss eenn rreellaattiioonn

  Nous mettrons  jour cette section trs prochainement pour traiter
  d'autres outils en relation avec ipmasq tels ipportfw ou masqadmin.





  55..  FFooiirree AAuuxx QQuueessttiioonnss


  Si vous trouvez une FAQ intressante, envoyez la  ambrose@writeme.com
  et dranch@trinnet.net (NdT: en anglais :-)). S'il vous plait, poser
  clairement la question et la rponse approprie. Merci !



  55..11..  EEsstt--ccee qquuee IIPP MMaassqquueerraaddee mmaarrcchhee aavveecc uunnee IIPP ddyynnaammiiqquuee ??

  Oui, bien sur que cela marche avec une adresse IP dynamique assigne
  par votre FAI, d'habitude, via un serveur DHCP. Aussi longtemps que
  vous avez une adresse Internet valide, cela devrait marcher. Bien
  entendu, les IP statiques conviennent aussi.


  55..22..  ccoonnnneecctteerr  IInntteerrnneett eenn uuttiilliissaanntt IIPP mmaassqquueerraaddiinngg ??  PPuuiiss--jjee
  uuttiilliisseerr ddeess mmooddeemmss ccaabbllee,, DDSSLL,, lliiaaiissoonn ssaatteelllliittee,, eettcc ppoouurr mmee

  Bien sr, tant que Linux supporte l'interface rseau, cela marchera.


  55..33..  QQuueellss ssoonntt lleess pprrooggrraammmmeess qquuii ffoonnccttiioonnnneenntt aavveecc ll''IIPP
  MMaassqquueerraaddee ??

  Il est trs difficile d'avoir une liste exhaustive des "programmes qui
  marchent". Toutefois, la majorit des applications internet sont
  supportes, telles que surfer sur Internet (Netscape, MSIE, etc.), ftp
  (comme WS_FTP), Real Audio, telnet, SSH, POP3 (courrier entrant -
  pine, Outlook), SMTP (courrier sortant), etc.


  Les programmes qui impliquent des protocoles plus compliqus ou des
  mthodes de connexion spciales necessitent des outils d'aide
  spciaux.

  Pour plus de dtails, rfrez vous  cette page : programmes qui
  marchent avec le Linux IP masquerading
  <http://dijon.nais.com/~nevo/masq/> par Lee Nevo.


  55..44..  DDeebbiiaann,, uunnee SSllaacckkwwaarree,, eettcc ??  CCoommmmeenntt ppuuiiss--jjee ffaaiirree mmaarrcchheerr ll''IIPP
  MMaassqquueerraaddiinngg ssuurr uunnee RReeddHHaatt,, uunnee

  La distribution de Linux que vous avez, les procdures pour mettre en
  place l'IP masquerading mentionnes dans ce HOWTO devraient suffire.
  Certaines distributions auront peut tre des programmes graphiques ou
  des fichiers de configuration spciaux pour rendre les rglages plus
  simples. Nous faisons en sorte de rendre ce HowTo aussi simple que
  possible.


  55..55..  JJee vviieennss ddee ppaasssseerr aauu nnooyyaauu 22..22..xx eett aa nnee mmaarrcchhee pplluuss !!

  Il y a plusieurs raisons qui peuvent faire que cela ne marche plus, en
  supposant que vous avez une bonne connection  Internet et  votre
  LAN :


    Assurez vous que vous avez les fonctionnalits et les modules
     ncessaires compils et chargs. Rfrez vous aux sections
     prcedentes pour cela.


    Vrifiez /usr/src/linux/Documentation/Changes et assurez vous que
     vous avez les bonnes versions des outils rseau installs.


    Assurez vous d'avoir bien activ l'IP forwarding. Essayez de lancer
     echo "1" > /proc/sys/net/ipv4/ip_forwarding.


    Vous devez utiliser ipchains
     <http://www.rustcorp.com/linux/ipchains/> pour manipuler les regles
     ipmasq et firewal.

    Refaites toute la prparation et la configuration encore ! La
     plupart du temps, c'est juste une erreur de typo ou une erreur
     stupide que vous verrez facilement.


  55..66..  aa nnee mmaarrcchhee pplluuss !!  JJee vviieennss ddee mmeettttrree  jjoouurr mmoonn nnooyyaauu aavveecc uunn
  22..00..3300 oouu pplluuss rrcceenntt eett

  Il y a plusieurs chose que vous devriez vrifier, en supposant que
  vous avez une bonne connection  Internet et  votre LAN :


    Assurez vous que vous avez bien toutes les fonctionnalits et
     modules de compils et chargs. Rfrez vous aux sections
     prcdentes pour plus de dtails.

    Verifiez dans /usr/src/linux/Documentation/Changes que vous avez
     bien mis a jour le minimum pour survivre.

    Assurez vous de bien avoir activ l'IP forwardinf. Essayez echo "1"
     > /proc/sys/net/ipv4/ip_forward.

    Vous devriez utiliser ipfwadm <http://www.xos.nl/> pour manipuler
     les regles ipmasq et firewall. Vous aurez a patcher les noyaux
     2.0.x pour utiliser ipchains.

    Refaites toute la prparation et la configuration encore ! La
     plupart du temps, c'est juste une erreur de typo ou une erreur
     stupide que vous verrez facilement.


  55..77..  ppoossssiibbiilliittss ppoouurr llee ffaaiirree aavveecc WWiinnddoowwss ??  JJee nn''aarrrriivvee ppaass 
  ffaaiirree mmaarrcchheerr ll''IIPP MMaassqquueerraaddee !! QQuueelllleess ssoonntt lleess

  Laisser tomber une solution gratuite, fiable, performante qui
  fonctionne sur un matriel minimal pour payer une fortune pour quelque
  chose qui ncessite plus de matriel, est moins performant et moins
  fiable ? (IMHO : Et oui, j'ai une exprience de ces choses ;-)

  Ok, c'est vous qui voyez, faites une recherche sur le web sur MS Proxy
  Server, Wingate, ou aller sur www.winfiles.com. Mais ne dites pas que
  c'est moi qui vous y envoie !



  55..88..  JJ''aaii ttoouutt vvrriiffii,, eett aa nnee mmaarrcchhee ttoouujjoouurrss ppaass.. QQuuee ddooiiss--jjee
  ffaaiirree ??


    Restez calme. Allez vous faire un th, et prenez une pose. Ensuite,
     essayez les suggestions ci-dessous.

    Faites une recherche dans l'Archive de la mailing list
     <http://home.indyramp.com/lists/masq/>, votre rponse vous y attend
     trs certainement.

    Posez la question dans la mailing list IP Masquerade, voyez ci-
     dessous pour plus de dtails. S'il vous plait, n'essayez cela que
     si vous ne trouvez pas la rponse dans les archives de la liste.

    Posez votre question dans les newsgroups parlant de rseau et de
     Linux.

    Envoyez un email  ambrose@writeme.com et dranch@trinnet.net. Vous
     avez plus de chance de recevoir une rponse si vous nous l'envoyez
      nous deux. David est plutt rapide a rpondre, et je ne
     commenterais pas ma vitesse de rponse.

    Revrifiez votre configuration :-)



  55..99..  CCoommmmeenntt jjee mm''iinnssccrriiss  llaa lliissttee IIPP MMaassqquueerraaddee ??

  Pour s'inscrire  la liste IP Masquerading envoyez un mail  masq-
  subscribe@indyramp.com.

  Le sujet et le corps de ce message sont iiggnnoorrss. Ceci vous permet de
  recevoir tous les messages de la liste alors qu'ils arrivent. Vous
  avez la possibilit de recevoir les messages sous cette forme, mais si
  vous pouviez plutot vous abonner au condens (digest), choisissez le
  plutt. Le digest charge moins les machines qui servent les listes.
  Notez aussi qu'il n'est possible de poster qu' partir de l'adresse o
  vous tes enregistrs.

  Pour plus de commandes, envoyez un email  masq-
  help@tori.indyramp.com.

  55..1100..  JJee vveeuuxx aaiiddeerr aauu ddvveellooppppeemmeenntt ddee ll''IIPP MMaassqquueerraaddiinngg.. CCoommmmeenntt
  ffaaiirree ??

  Abonnez vous  la liste de dveloppement de l'IP Masquerading, et
  contactez les grands dveloppeurs l-bas, en envoyant un email  masq-
  dev-subscribe@tori.indyramp.com (ou pour le digest masq-dev-digest-
  subscribe@tori.indyramp.com).

  NE posez pas de questions n'ayant pas de rapport avec le dveloppement
  sur cette liste !!


  55..1111..  OO ppuuiiss--jjee ttrroouuvveerr pplluuss dd''iinnffoorrmmaattiioonnss ssuurr ll''IIPP MMaassqquueerraaddiinngg ??

  Vous pouvez trouver plus d'informations sur l'IP Masquerading  Linux
  IP Masquerade Resource <http://ipmasq.cjb.net/> que David et moi
  maintenons. rfrez vous a la section 6.2 pour la disponibilit.

  Vous pouvez aussi trouver plus d'informations  The Semi-Original
  Linux IP Masquerading Web Site <http://www.indyramp.com/masq/>
  maintenu par Indyramp Consulting, qui fournissent aussi les listes
  ipmasq.



  55..1122..  JJee vveeuuxx ttrraadduuiirree ccee HHOOWWTTOO ddaannss uunnee aauuttrree llaanngguuee.. CCoommmmeenntt
  ffaaiirree ??

  Assurez vous que le langage dans lequel vous voulez traduire n'est pas
  dj couvert par quelqu'un d'autre; une liste des traductions faites
  est disponible sur Linux IP Masquerade Resource
  <http://ipmasq.cjb.net/>.

  Envoyez un email  ambrose@writeme.com et je vous enverrais la
  derniere version du SGML de ce HOWTO.



  55..1133..  CCee HHOOWWTTOO sseemmbbllee  ll''aabbaannddoonn,, vvoouuss vvoouuss eenn ooccccuuppeezz ttoouujjoouurrss ??
  PPoouuvveezz vvoouuss iinncclluurree pplluuss dd''iinnffoorrmmaattiioonnss ssuurr ...... ?? CCoommpptteezz vvoouuss
  ll''aammlliioorreerr ??

  Oui, ce HOWTO est toujours maintenu. Je suis coupable d'tre trop
  occup  travailler sur deux boulots et je n'ai pas beaucoup de temps
  pour travailler dessus, toutes mes excuses. Toutefois, avec l'arrive
  de David Ranch et tant que mainteneur, les choses devraient bouger un
  peu.

  Si vous pensez  un sujet qui devrais tre inclus dans ce HOWTO,
  envoyez nous un email. Cela serais encore mieux si vous pouviez nous
  fournir cette information. David et moi inclurons cette information
  dans le HOWTO si elle nous semble approprie. Et merci pour votre
  contribution.

  Nous avons beaucoup de nouvelles ides et de plans pour mettre  jour
  ce HOWTO, comme des tudes de cas, qui couvreraient differentes
  configurations rseau mettant en jeu l'IP Masquerading, plus de choses
  sur la scurit, l'utilisation d'ipchains, des exemples sur
  ipfwadm/ipchains, plus de FAQ, plus de choses sur les utilitaires de
  forwarding de port et de protocoles tels masqasmin, etc. Si vous
  pensez que vous pouvez aider, faites le. Merci.





  55..1144..  JJ''aaii rreeuussssii  ffaaiirree mmaarrcchheerr ll''IIPP MMaassqquueerraaddee,, cc''eesstt ggnniiaall !!
  QQuu''eesstt ccee qquuee jjee ppoouurrrraaiiss ffaaiirree ppoouurr vvoouuss rreemmeerrcciieerr ??

  Remerciez les developpeurs, et apprciez le temps et les efforts
  qu'ils ont passs dessus. Envoyez nous un email pour nous faire savoir
  que vous tes contents. Faites connaitre Linux autour de vous, et
  aidez les gens qui ont des problmes.






  66..  DDiivveerrss



  66..11..  RReessssoouurrcceess uuttiilleess

  Note du Traducteur : Tous les documents cits dans cette section sont
  en anglais,  moins d'une mention spciale de ma part.


    IP Masquerade Resource page <http://ipmasq.cjb.net/> devrait
     contenir assez d'information pour l'installation d'IP Masquerade

    L'archive de la mailing list IP Masquerade
     <http://www.indyramp.com/masq/list/> contient certains des messages
     envoys rcement sur la liste.

    Ce document, en anglais : Linux IP Masquerade mini HOWTO
     <http://ipmasq.cjb.net/ipmasq-HOWTO.html> pour les noyaux 2.2.x et
     2.0.x.

    Le IP Masquerade HOWTO pour les noyaux 1.2.x
     <http://ipmasq.cjb.net/ipmasq-HOWTO-1.2.x.txt> si vous utilisez un
     vieux noyau

    La FAQ IP Masquerade
     <http://www.indyramp.com/masq/ip_masquerade.txt> contient des
     informations gnrales

    Linux IPCHAINS HOWTO <http://www.freenix.org/unix/linux/HOWTO-
     vo/IPCHAINS-HOWTO.html> et http://www.rustcorp.com/linux/ipchains/
     contiennent plein d'informations sur l'utilisation d'ipchains,
     ainsi que les sources et les binaires pour ipchains.

    La page X/OS Ipfwadm page <http://www.xos.nl/linux/ipfwadm/>
     contient les sources, binaires, de la documentation et d'autres
     informations sur le package ipfwadm.

    Une page sur les applications qui marchent avec l'IP Masquerading
     de Linux <http://dijon.nais.com/~nevo/masq/> par Lee Nevo fournis
     des trucs et astuces pour faire marcher tout a avec l'IP
     Masquerading.

    Le LDP Network Administrator's Guide
     <http://metalab.unc.edu/mdw/LDP/nag/nag.html> est incontournable
     pour les dbutants essayant d'installer un rseau.

    Trinity OS Doc
     <http://www.ecst.csuchico.edu/~dranch/LINUX/TrinityOS.wri>, Une
     documentation trs complete sur l'utilisation de Linux en rseau.

    Le Linux NET-3 HOWTO
     <http://www.freenix.org/unix/linux/HOWTO/NET-3-HOWTO.html> (eenn
     ffrraannaaiiss) contient aussi beaucoup d'informations utiles sur
     l'utilisation du rseau sous Linux.

    Le Linux ISP Hookup HOWTO
     <http://www.freenix.org/unix/linux/HOWTO/ISP-Hookup-HOWTO.html> (eenn
     ffrraannaaiiss) et le PPP HOWTO
     <http://www.freenix.org/unix/linux/HOWTO/PPP-HOWTO.html> (eenn
     ffrraannaaiiss) vous donnent des informations pour connecter votre hte
     Linux sur Internet.

    Le Linux Ethernet-Howto
     <http://www.freenix.org/unix/linux/HOWTO/Ethernet-HOWTO.html> (eenn
     ffrraannaaiiss) est une bonne source d'informations sur la mise un place
     d'un rseau local utilisant Ethernet.

    Vous pouvez galement tre intress par le Linux Firewalling and
     Proxy Server HOWTO
     <http://www.freenix.org/unix/linux/HOWTO/Firewall-HOWTO.html> (eenn
     ffrraannaaiiss)


    Le Linux Kernel HOWTO
     <http://www.freenix.org/unix/linux/HOWTO/Kernel-HOWTO.html> (eenn
     ffrraannaaiiss) vous guidera pour pour la recompilation de votre noyau.

    D'autres HOWTOs, en franais
     <http://www.freenix.org/unix/linux/HOWTO/>, ou en anglais
     <http://www.caldera.com/LDP/HOWTO/HOWTO-INDEX-3.html>.


    Poster dans les newsgroups USENET : comp.os.linux.networking, ou,
     en franais, fr.comp.os.linux.configuration ou
     fr.comp.os.linux.moderated


  66..22..  RReessssoouurrcceess ssuurr ll''IIPP MMaassqquueerraaddee

  Le site Linux IP Masquerade Resource  <http://ipmasq.cjb.net/> est
  ddi  l'IP Masquerading, aussi maintenu par David Ranch et moi. Les
  dernieres informations y sont toujours disponibles, et il peut y avoir
  des choses non disponibles dans ce HOWTO.

  Vous trouverez les ressources sur l'IP Masquerading aux endroits
  suivants :

    http://ipmasq.cjb.net/, site primaire, redirig sur
     http://www.tor.shaw.wave.ca/~ambrose/

    http://ipmasq2.cjb.net/, site secondaire, redirig sur
     http://www.geocities.com/SiliconValley/Heights/2288/



  66..33..  RReemmeerrcciieemmeennttss


    David Ranch, dranch@trinnet.net
     page de l'IP Masquerading, ..., trop de choses pour tout mettre ici
     :)

    Michael Owings, mikey@swampgas.com
     CU-SeeMe et le Linux IP-Masquerade mini How-To

    Gabriel Beitler, gbeitler@aciscorp.com


    Ed Doolittle, dolittle@math.toronto.edu
     dans la commande ipfwadm pour une scurit amliore

    Matthew Driver, mdriver@cfmeu.asn.au
     criture de la section section 3.3.1 (configuration de Windows 95)

    Ken Eves, ken@eves.com

    Ed. Lott, edlott@neosoft.com
     systmes tests

    Nigel Metheringham, Nigel.Metheringham@theplanet.net
     au IP Packet Filtering et IP Masquerading HOWTO, ce qui fait de ce
     HOWTO un meilleur document plus technique

    Keith Owens, kaos@ocs.com.au
     section 4.2
     un trou de scurit et a clarifi le statut de ping sous IP
     Masquerade

    Rob Pelkey, rpelkey@abacus.bates.edu
     (configuration de MacTCP et Open Transport)

    Harish Pillay, h.pillay@ieee.org
     demande avec diald)

    Mark Purcell, purcell@rmcs.cranfield.ac.uk
     IPautofw

    Ueli Rutishauser, rutish@ibm.net

    John B. (Brent) Williams, forerunner@mercury.net
     (configuration d'Open Transport)

    Enrique Pessoa Xavier, enrique@labma.ufrj.br
     configuration de bootp

    Les dveloppeurs d'IP Masquerade pour cet excellent produit


         Delian Delchev, delian@wfpa.acad.bg

         Nigel Metheringham, Nigel.Metheringham@theplanet.net

         Keith Owens, kaos@ocs.com.au

         Jeanette Pauline Middelink, middelin@polyware.iaf.nl

         David A. Ranch, trinity@value.net

         Miquel van Smoorenburg, miquels@q.cistron.nl

         Jos Vos, jos@xos.nl

         Paul Russell, Paul.Russell@rustcorp.com.au

         Et tous ceux que j'ai pu oublier (faites-le moi savoir !)




    tous les utilisateurs envoyant des suggestions et des critiques 
     la mailing list, et plus particulirement ceux qui m'ont fait part
     d'erreurs dans ce document et les clients supports ou non.


    Je vous demande pardon si je n'ai pas inclus les informations que
     certains utilisateurs m'ont envoyes. De nombreuses ides et
     suggestions me sont envoyes, mais je n'ai pas le temps de les
     vrifier, ou je les gare. J'essaie de faire de mon mieux pour
     incorporer toutes les informations qu'on m'envoye pour rdiger ce
     HOWTO. Je vous remercie pour votre effort, et j'espre que vous
     comprenez ma situation.



  66..44..  RRffeerreennccee


    IP masquerade FAQ de Ken Eves

    Archive de la mailing list IP Masquerade de Indyramp Consulting

    La page sur Ipfwadm par X/OS

    Divers HOWTOs lis au rseau sous Linux














































  MiniHowto sur les Sous-Rseaux IP
  Robert Hart, hartr@interweft.com.au
  version franaise par Laurent Caillat-Vallet, caillat@univ-
  lyon1.fr
  v1.0, 31 Mars 1997

  Ce document dcrit pourquoi et comment dcouper un rseau IP en sous-
  rseaux - c'est  dire utiliser correctement une seule adresse de
  rseau de classe A, B ou C, pour plusieurs rseaux interconnects.
  ______________________________________________________________________

  Table des matires


  1. Copyright

  2. Introduction

     2.1 D'autres sources d'information

  3. L'anatomie des numros IP

     3.1 Les numros IP appartiennent aux Interfaces - PAS aux htes !
     3.2 Les numros IP sous forme de "quadruplets points"
     3.3 Les classes des rseaux IP
     3.4 Numros de rseaux, adresses d'interface, et adresses de diffusion
     3.5 Le masque de rseau

  4. Que sont les sous-rseaux?

  5. Pourquoi dcouper en sous-rseaux?

  6. Comment dcouper un numro de rseau IP en sous-rseaux

     6.1 Mettre en place la connectivit physique
     6.2 Choisir la taille des sous-rseaux
     6.3 Calculer le masque de sous-rseau et le numro de rseau

  7. Le routage

     7.1 Les tables de routage


  ______________________________________________________________________

  11..  CCooppyyrriigghhtt


  Ce document est distribu sous les termes de la Licence Publique GNU
  (GNU Public License, GPL).
  Ce document est directement support par InterWeft IT Consultants
  (Melbourne, Australie).
  La dernire version de ce document est disponible sur le site WWW
  d'InterWeft: http://www.interweft.com.au/ et depuis le Projet de
  Documentation de Linux (Linux Documentation Project, LDP):
  http://sunsite.unc.edu/LDP.


  22..  IInnttrroodduuccttiioonn


  Avec les numros de rseau IP devenant rapidement une espce en voie
  de disparition, l'utilisation efficace de ces ressources de plus en
  plus rares est importante.
  Ce document dcrit comment dcouper un numro de rseau IP afin de
  l'utiliser pour plusieurs rseaux diffrents.
  Ce document est focalis sur les numros de rseau IP de classe C -
  mais les principes s'appliquent de la mme manire aux rseaux de
  classes A et B.


  22..11..  DD''aauuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn


  Il y a beaucoup d'autres sources d'informations utiles, pour des
  informations aussi bien dtailles que plus gnrales sur les numros
  IP.  Celles recommandes par l'auteur sont:

    Administration Rseau sous Linux
     ftp://ftp.lip6.fr/pub/linux/french/books/nag.french.eoit-1.0.tar.gz
     pour la version franaise,
     http://sunsite.unc.edu/LDP/LDP/nag/nag.html pour la version
     anglaise.

    Le Guide de l'Administration Systme sous Linux (en anglais)
     http://linuxwww.db.erau.edu/SAG/.

    L'Administration de Rseau TCP/IP, de Craig Hunt, publi par
     O'Reilly and Associates
     http://www.ora.com/catalog/tcp/noframes.html.


  33..  LL''aannaattoommiiee ddeess nnuummrrooss IIPP


  Avant de plonger dans les dlices des sous-rseaux, nous devons poser
  les bases  propos des numros IP.


  33..11..  LLeess nnuummrrooss IIPP aappppaarrttiieennnneenntt aauuxx IInntteerrffaacceess -- PPAASS aauuxx hhtteess !!


  Tout d'abord, claircissons une cause classique de mauvaise
  comprhension - les numros IP ne sont pas assigns aux htes. Les
  numros IP sont assigns aux interfaces rseau sur les htes.
  Hein? C'est quoi a?
  Alors que la plupart des ordinateurs (pour ne pas dire tous) d'un
  rseau IP ne possderont qu'une seule interface rseau (et donc
  n'auront qu'une seule adresse IP), il n'en va pas toujours ainsi.
  Certains ordinateurs ou d'autres appareils peuvent avoir plusieurs
  (voire de nombreuses) interfaces rseau - et chaque interface a son
  propre numro IP.
  Donc un appareil avec 6 interfaces actives (comme un routeur) aura 6
  numros IP - un pour chaque interface vers chaque rseau sur lequel il
  est connect.  La raison en devient claire quand on regarde un rseau
  IP!

  Malgr cela, la plupart des gens font rfrence  des adresses d'htes
  quand ils veulent faire rfrence  des numros IP. Souvenez-vous
  juste que ce n'est qu'un raccourci pour le numro IP de l'interface de
  cet hte. La plupart (si ce n'est pas la majorit) des appareils sur
  Internet n'ont qu'une interface rseau, et donc qu'un numro IP.


  33..22..  LLeess nnuummrrooss IIPP ssoouuss ffoorrmmee ddee ""qquuaaddrruupplleettss ppooiinnttss""


  Dans l'implmentation actuelle des numros IP (IPv4), les numros IP
  sont composs de 4 octects (de 8 bits) - fournissant un total de 32
  bits d'information disponibles. Cela donne des numros plutt grands
  (mme quand on les crit en notation dcimale). Donc pour la
  lisibilite (et pour des raisons organisationnelles), les numros IP
  sont habituellement crits sous la forme de "quadruplets points".  Le
  numro IP


            192.168.1.24




  en est un exemple - 4 nombres (dcimaux) spars par des points (.).
  Comme chacun des quatre nombres est la reprsentation dcimale d'un
  octet de 8 bits, chacun de ces nombres est compris entre 0 et 255
  (c'est  dire qu'il peut prendre 256 valeurs - souvenez-vous que 0 est
  aussi une valeur).
  De plus, une partie du numro IP d'un hte identifie le rseau sur
  lequel l'hte est connect, les bits restants du numro IP indique
  l'hte lui-mme (oups - l'interface rseau). La classe de rseau
  dtermine combien de bits sont utiliss par l'identificateur de rseau
  et combien sont disponibles pour identifier les htes.


  33..33..  LLeess ccllaasssseess ddeess rrsseeaauuxx IIPP


  Il y a trois classes de numros IP

    Les numros des rseaux IP de classe A utilisent les 8 bits les
     plus  gauche (le nombre le plus  gauche du quadruplet point)
     pour identifier le rseau, laissant 24 bits (les 3 nombres restants
     du quadruplet) pour identifier les interfaces des htes de ce
     rseau.
     Les adresses de classe A ont toujours le dernier bit  gauche 
     zro - c'est  dire une valeur dcimale entre 0 et 127 pour le
     premier nombre du quadruplet. Il y a donc un maximum de 128 numros
     de rseaux de classe A disponibles, chacun d'eux contenant jusqu'
     1 677 214 interfaces (NDT: le mini-howto original indique 33 554
     430 interfaces... petite erreur de calcul...).
     Toutefois, les rseaux 0.0.0.0 (appel route par defaut) et
     127.0.0.0 (le rseau de boucle de retour - loopback) ont des
     significations spciales et ne sont pas disponibles pour identifier
     des rseaux. Il n'y a donc que 126 rseaux de classe A disponibles.

    Les numros de rseaux IP de classe B utilisent les 16 bits les
     plus  gauche (les deux nombres de gauche du quadruplet) pour
     identifier le rseau, laissant 16 bits (les deux derniers nombres
     du quadruplet) pour identifier les interfaces des htes.
     Les adresses de classe B ont toujours les 2 bits les plus  gauche
     mis  1 0. Cela laisse 14 bits pour spcifier l'adresse de rseau,
     donnant 32 767 rseaux de classe B disponibles. Les rseaux de
     classe B ont donc le premier nombre du quadruplet entre 128 et 191,
     chaque rseau pouvant contenir 65 534 interfaces (NDT: dans le
     document original: 32 766, encore une erreur...).

    Les numros de rseau IP de classe C utilisent les 24 bits les plus
      gauche (les trois nombres de gauche du quadruplet) pour
     identifier le rseau, laissant 8 bits (le nombre le plus  droite
     du quadruplet) pour identifier les interfaces des htes.
     Les adresses de classe C commencent toujours avec les 3 bits les
     plus  gauche positionns  1 1 0, soit un intervalle de 192  256
     pour le nombre le plus  gauche du quadruplet.  Il y a donc 4 194
     303 numros de rseaux de classe C disponibles, chacun contenant
     254 interfaces. (Les rseaux de classe C avec le premier octet
     superieur  223 sont toutefois rservs et non disponibles.)

  En rsum:

  Classe de rseau  Intervalle des valeurs (dcimales) utilisables du 1er octet
        A                        1  126
        B                      128  191
        C                      192  254




  Il y a aussi des adresses spciales, qui sont rserves pour des
  rseaux pas connects  l'Internet. Ces adresses sont:

    Un rseau de classe A: 10.0.0.0

    16 rseaux de classe B: 172.16.0.0 - 172.31.0.0

    256 rseaux de classe C: 192.168.0.0 - 192.168.255.0

  Vous remarquerez que dans tout ce document, on utilise ces intervalles
  pour ne pas crer de confusion avec de 'vrais' rseaux et de


  33..44..  NNuummrrooss ddee rrsseeaauuxx,, aaddrreesssseess dd''iinntteerrffaaccee,, eett aaddrreesssseess ddee ddiiffffuu
  ssiioonn


  Les numros IP peuvent avoir trois significations:

    l'adresse d'un rseau IP (un groupe d'appareils IP partageant un
     accs commun  un mdium de transmission - en tant par exemple sur
     un mme segment Ethernet). Un numro de rseau aura toujours les
     bits d'interface (hte) de l'espace d'adressage positionns  0
     (sauf si le rseau est dcoup en sous-rseaux, comme nous le
     verrons plus tard);

    l'adresse de diffusion d'un rseau IP (l'adresse utilise pour
     'parler' simultanment  tous les appareils d'un rseau IP). Les
     adresses de diffusion d'un rseau ont toujours les bits d'interface
     (hte) de l'espace d'adressage positionns  1 (encore une fois,
     sauf si le rseau est dcoup en sous-rseaux, comme nous le
     verrons plus tard);

    l'adresse d'une interface (comme une carte Ethernet ou une
     interface PPP sur un hte, un routeur, un serveur d'impression
     etc...). Ces adresses peuvent avoir n'importe quelle valeur pour
     les bits d'hte, sauf tous  0 ou tous  1 - car avec tous les bits
      0, c'est l'adresse d'un rseau, et avec tous les bits  1, c'est
     l'adresse de diffusion d'un rseau.

  En rsum et pour clarifier les choses

    Pour un rseau de classe A...  (un octet pour l'espace d'adressage
     du rseau, suivi de trois octets pour l'espace d'adressage
     d'interface)
     10.0.0.0 est un numro de rseau de classe A car tous les bits de
     l'espace d'adressage d'interface sont  0
     10.0.1.0 est une adresse d'interface sur ce rseau
     10.255.255.255 est l'adresse de diffusion de ce rseau car tous les
     bits de l'espace d'adressage d'interface sont  1

    Pour un rseau de classe B...  (deux octets pour l'espace
     d'adressage du rseau, suivi de deux octets pour l'espace
     d'adressage d'interface)
     172.17.0.0 est un numro de rseau de classe B 172.17.0.1 est une
     adresse d'interface sur ce rseau
     172.17.255.255 est l'adresse de diffusion de ce rseau

    Pour un rseau de classe C...  (trois octets pour l'espace
     d'adressage du rseau, suivi d'un octet pour l'espace d'adressage
     d'interface)
     192.168.3.0 est un numro de rseau de classe C
     192.168.3.42 est une adresse d'interface sur ce rseau
     192.168.3.255 est l'adresse de diffusion de ce rseau

     Quasiment tous les numros de rseaux IP encore disponibles de nos
     jours sont des adresses de classe C.


  33..55..  LLee mmaassqquuee ddee rrsseeaauu


  Le masque de rseau devrait plutt tre appel masque de sous-rseau.
  Toutefois, on y fait gnralement rfrence comme masque de rseau.
  C'est le masque de rseau et ses implications sur la manire
  d'interprter les adresses IP localement sur un segment de rseau IP
  qui nous concernent le plus, puisque cela dtermine le dcoupage en
  sous-rseau (s'il y en a un).
  Le masque de (sous-)rseau standard est tous les bits de rseau d'une
  adresse placs  '1', et tous les bits d'interface placs  '0'. Cela
  signifie que les masques de rseaux standards pour les 3 classes de
  rseaux sont:

    masque de rseau de classe A: 255.0.0.0

    masque de rseau de classe B: 255.255.0.0

    masque de rseau de classe C: 255.255.255.0

     Il faut se souvenir de deux choses importantes  propos des masques
     de rseau:

    le masque de rseau n'affecte que l'interprtation locale des
     numros IP (o locale signifie sur un segment de rseau
     particulier);

    le masque de rseau n'est pas un numro IP - il est utilis pour
     modifier localement l'interprtation des numros IP locaux.


  44..  QQuuee ssoonntt lleess ssoouuss--rrsseeaauuxx??


  Un sous-rseau est une faon de prendre une adresse d'un rseau, et de
  la dcouper localement pour que cette adresse de rseau unique puisse
  en fait tre utilise pour plusieurs rseaux locaux interconnects.
  Souvenez-vous, un seul numro de rseau IP ne peut tre utilis que
  sur un seul rseau.
  Le mot important ici est "localement": du point de vue du monde
  extrieur aux machines et rseaux physiques couverts par le rseau
  dcoup en sous-rseaux, absolument rien n'a chang - cela reste un
  unique rseau IP.
  Ceci est important - le dcoupage en sous-rseaux est une
  configuration locale et invisible au reste du monde.


  55..  PPoouurrqquuooii ddccoouuppeerr eenn ssoouuss--rrsseeaauuxx??


  Les raisons derrire ce type de dcoupage remontent aux premires
  spcifications d'IP - o il n'y avait que quelques sites fonctionnant
  sur des numros de rseau de classe A, ce qui permettait des millions
  d'htes connects.
  C'est videmment un trafic norme et des problmes d'administration si
  tous les ordinateurs IP d'un important site doivent tre connects sur
  le mme rseau: essayer de grer un tel monstre serait un cauchemar et
  le rseau s'croulerait (de manire quasi-certaine) sous la charge de
  son propre trafic (satur).

  Arrive le dcoupage en sous-rseaux: l'adresse de rseau de classe A
  peut tre dcoupe pour permettre sa distribution  plusieurs (voire
  beaucoup de) rseaux spars. La gestion de chaque rseau spar peut
  facilement tre dlgue de la mme faon.

  Cela permet d'tablir des rseaux petits et grables - en utilisant,
  c'est tout  fait possible, des technologies de rseaux diffrentes.
  Souvenez-vous, vous ne pouvez pas mlanger Ethernet, Token Ring, FDDI,
  ATM, etc... sur le mme rseau physique - ils peuvent toutefois tre
  interconnects !

  Les autres raisons du dcoupage en sous-rseaux sont:

    La topographie d'un site peut crer des restrictions (longueur de
     cble) sur les possibilits de connexion de l'infrastructure
     physique, ncessitant des rseaux multiples. Le dcoupage en sous-
     rseaux permet de le faire dans un environnement IP en n'utilisant
     qu'un seul numro de rseau IP. En fait, c'est trs souvent utilis
     de nos jours par les fournisseurs d'accs Internet qui veulent
     donner  leurs clients connects en permanence des numros de
     rseau local IP statiques.

    Le trafic rseau est suffisamment lev pour provoquer des
     ralentissements significatifs. En dcoupant le rseau en sous-
     rseaux, le trafic local  un segment de rseau peut tre gard
     localement - rduisant le trafic global et amliorant la
     connectivit du rseau sans ncessiter effectivement plus de bande
     passante pour le rseau.

    Des ncessits de scurit peuvent trs bien imposer que les
     diffrentes classes d'utilisateurs ne partagent pas le mme rseau
     - puisque le trafic d'un rseau peut toujours tre intercept par
     un utilisateur comptent.  Le dcoupage en sous-rseaux donne un
     moyen d'empcher que le dpartement marketing espionne le trafic
     sur le rseau de R & D (ou que les tudiants espionnent le rseau
     de l'administration)!


  66..  CCoommmmeenntt ddccoouuppeerr uunn nnuummrroo ddee rrsseeaauu IIPP eenn ssoouuss--rrsseeaauuxx


  Ayant dcid que vous aviez besoin d'un dcoupage en sous-rseau, que
  faut-il faire pour le mettre en place? Le paragraphe suivant est une
  prsentation des tapes qui seront expliques ensuite en dtail:

    mettre en place la connectivit physique (cblage de rseau,
     interconnexions de rseaux - comme les routeurs)

    choisir la taille de chaque sous-rseau en termes de nombre
     d'appareils qui y seront connects - i.e. combien de numros IP
     sont ncessaires pour chaque segment.

    calculer les masques et les adresses de rseau appropris

    donner  chaque interface sur chaque rseau sa propre adresse IP et
     le masque de rseau appropri.

    configurer les routes sur les routeurs et les passerelles
     appropris, les routes et/ou routes par dfaut sur les appareils du
     rseau.

    tester le systme, rgler les problmes, et ensuite se reposer!

  Pour les besoins de cet exemple, nous supposerons que nous allons
  dcouper un numro de rseau de classe C: 192.168.1.0

  Ce numro permet un maximum de 254 interfaces connectes (htes), plus
  les numros obligatoires de rseau (192.168.1.0) et de diffusion
  (192.168.1.255).


  66..11..  MMeettttrree eenn ppllaaccee llaa ccoonnnneeccttiivviitt pphhyyssiiqquuee


  Vous devrez installer l'infrastructure de cblage correcte pour tous
  les appareils que vous voulez interconnecter, dfinie pour
  correspondre  vos dispositions physiques.

  Vous aurez aussi besoin d'un dispositif pour interconnecter les
  diffrents segments (routeurs, convertisseurs de mdium physique
  etc...)

  Une discussion dtaille de ceci n'est videmment pas possible ici.
  Si vous avez besoin d'aide, il existe des consultants pour la
  conception et l'installation de rseau qui fournissent ce genre de
  service. Des conseils gratuits sont galement disponibles sur un bon
  nombre de groupes de discussion Usenet (comme
  comp.os.linux.networking).


  66..22..  CChhooiissiirr llaa ttaaiillllee ddeess ssoouuss--rrsseeaauuxx


  C'est un compromis entre le nombre de sous-rseaux que vous crez et
  le nombre de numros IP 'perdus'.

  Chaque rseau IP utilise deux adresses qui ne sont plus disponibles
  pour les adresses d'interfaces (htes) - le numro de rseau IP lui-
  mme, et l'adresse de diffusion sur ce rseau. Quand vous dcoupez en
  sous-rseaux, chaque sous-rseau a besoin de ses propres adresses de
  rseau et de diffusion - et celles-ci doivent tre des adresses
  valides, dans l'intervalle fourni par le rseau IP que vous dcoupez.

  Donc, en dcoupant un rseau IP en deux sous-rseaux spars, on a
  alors deux adresses de rseau et deux adresses de diffusion -
  augmentant le nombre d'adresses 'inutilisables' pour les interfaces
  (htes); crer 4 sous-rseaux cre huit adresses inutilisables, et
  ainsi de suite...

  En fait, le plus petit sous-rseau utilisable est compos de 4 numros
  IP:

    deux numros IP d'interface - un pour l'interface du routeur sur ce
     rseau, et un pour l'unique hte de ce rseau.

    un numro de rseau.

    une adresse de diffusion.

  Maintenant, pourquoi quelqu'un voudrait crer un si petit rseau est
  une autre question! Avec un seul hte sur ce rseau, toute
  communication en rseau devra sortir vers un autre rseau. Nanmoins,
  cet exemple montre le principe de diminution du nombre d'adresse
  d'interfaces qui s'applique au dcoupage en sous-rseaux.

  En thorie, on peut dcouper son numro de rseau IP en 2^n (o n est
  le nombre de bits d'interface dans votre numero de rseau, moins 1)
  sous-rseaux de tailles gales (vous pouvez aussi dcouper un sous-
  rseau et combiner des sous-rseaux).
  Soyez donc ralistes en concevant votre rseau - vous devriez vouloir
  le nombre minimal de rseaux locaux spars, qui corresponde  vos
  contraintes physiques, de gestion, d'quipement, et de scurit!


  66..33..  CCaallccuulleerr llee mmaassqquuee ddee ssoouuss--rrsseeaauu eett llee nnuummrroo ddee rrsseeaauu


  Le masque de rseau est ce qui produit la magie du dcoupage d'un
  rseau IP en sous-rseaux.

  Le masque de rseau pour un rseau IP non dcoup est simplement un
  "quadruplet point" dont tous les 'bits de rseau' du numro de rseau
  sont positionns  '1', et tous les bits d'interface  '0'.

  Donc, pour les trois classes de rseau IP, les masques de rseau sont:

    classe A (8 bits de rseau): 255.0.0.0

    classe B (16 bits de rseau): 255.255.0.0

    classe C (24 bits de rseau): 255.255.255.0

  Pour mettre en oeuvre le dcoupage en sous-rseaux, on rserve un ou
  plusieurs bits parmi les bits d'interface, et on les interprte
  localement comme faisant partie des bits de rseau. Donc, pour diviser
  un numro de rseau en deux sous-rseaux, on rservera un bit
  d'interface en positionnant  '1' le bit appropri dans le masque de
  rseau: le premier bit d'interface (pour un numro de rseau
  'normal').

  Pour un rseau de classe C, cela donnera le masque de rseau:


       11111111.11111111.11111111.10000000



  ou 255.255.255.128

  Pour notre numro de rseau de classe C 192.168.1.0, voici quelqu'unes
  des options de dcoupage en sous-rseaux possibles:


       Nombre de     Nbre d'htes Masque de
       sous-rseaux  par rseau   rseau
       2             126          255.255.255.128 (11111111.11111111.11111111.10000000)
       4             62           255.255.255.192 (11111111.11111111.11111111.11000000)
       8             30           255.255.255.224 (11111111.11111111.11111111.11100000)
       16            14           255.255.255.240 (11111111.11111111.11111111.11110000)
       32            6            255.255.255.248 (11111111.11111111.11111111.11111000)
       64            2            255.255.255.252 (11111111.11111111.11111111.11111100)




  En thorie, il n'y a aucune raison de suivre la faon de dcouper ci-
  dessus, o les bits du masque de rseau sont ajouts du bit
  d'interface le plus significatif au moins significatif. Nanmoins, si
  on ne le fait pas de cette faon, les numros IP seront dans un ordre
  trange! Cela rend extrment difficile pour nous, humains, la decision
  du sous-rseau auquel appartient un numro IP, puisque nous ne sommes
  pas spcialement dous pour penser en binaire (les ordinateurs d'un
  autre ct le sont, et utiliseront indiffremment tout schema que vous
  leur direz d'utiliser).

  Vous tant dcid sur le masque de rseau appropri, vous devez
  maintenant trouver quelles sont les diffrentes adresses de rseau et
  de diffusion - et l'intervalle de numros IP pour chacun de ces
  rseaux. A nouveau, en ne considerant qu'un numro de rseau IP de
  classe C et en ne listant que la partie finale (la partie
  d'interface), on a:


       Masque de   Sous-rseaux  Reseau Diffusion MinIP MaxIP Nbre    Nbre total
       rseau                                                 d'htes d'htes
       128         2             0      127       1     126   126
                                 128    255       129   254   126     252

       192         4             0      63        1     62    62
                                 64     127       65    126   62
                                 128    191       129   190   62
                                 192    255       193   254   62      248

       224         8             0      31        1     30    30
                                 32     63        33    62    30
                                 64     95        65    94    30
                                 96     127       97    126   30
                                 128    159       129   158   30
                                 160    191       161   190   30
                                 192    223       193   222   30
                                 224    255       225   254   30      240




  Comme on peut le voir, il y a un ordre simple pour ces nombres, ce qui
  permet de les vrifier trs facilement. L'"inconvnient" du dcoupage
  est aussi visible en termes de rduction du nombre total d'adresses
  d'interfaces (htes) disponibles, au fur et  mesure que le nombre de
  sous-rseaux augmente.

  Avec ces informations, vous pouvez maintenant assigner les numros IP
  d'interfaces et de rseaux, et les masques de rseau.


  77..  LLee rroouuttaaggee


  Si vous utilisez un PC sous Linux avec deux interfaces rseaux pour
  router le trafic entre deux (ou plus) sous-rseaux, vous devez avoir
  compil votre noyau avec l'option "IP Forwarding". Taper la commande:


         cat /proc/ksyms | grep ip_forward




  Vous devriez avoir quelque chose comme...


         00141364 ip_forward_Rf71ac834




  Si ce n'est pas le cas, alors vous n'avez pas activ l'option IP
  Forwarding lors de la compilation de votre noyau, et vous devrez
  recompiler et installer un nouveau noyau.
  Pour le bien de cet exemple, supposons que vous ayez dcid de
  dcouper votre adresse de rseau IP 192.168.1.0 en 4 sous-rseaux
  (chacun d'eux comprenant 62 numros IP d'interfaces/htes). Toutefois,
  deux de ces rseaux sont combins en un unique plus grand sous-rseau,
  donnant trois rseaux physiques.  C'est  dire:


       Rseau          Diffusion        Masque de rseau    Htes
       192.168.1.0     192.168.1.63     255.255.255.192     62
       192.168.1.64    192.168.1.127    255.255.255.192     62
       182.168.1.128   192.168.1.255    255.255.255.126     124 (voir la note)




  Note: la raison pour laquelle le dernier rseau n'a que 124 adresses
  utilisables (et pas 126 comme on pourrait le supposer d'aprs le
  masque de rseau) est que c'est en fait un 'super rseau' compos de
  deux sous-rseaux.  Les htes sur les deux autres sous-rseaux
  interprteront 192.168.1.192 comme l'adresse de rseau du sous-rseau
  'inexistant'. De la mme manire, ils interprteront 192.168.1.191
  comme l'adresse de diffusion du sous-rseau

  Donc, si vous utilisez 192.168.1.191 ou 192 comme des adresses
  d'interfaces dans le troisime sous-rseau, alors les machines des
  deux autres sous-rseaux ne pourront pas communiquer avec ces
  interfaces.

  Ceci illustre un point important du dcoupage en sous-rseaux - les
  adresses utilisables sont dtermines par le PLUS PETIT sous-rseau
  dans l'espace d'adressage du rseau.


  77..11..  LLeess ttaabblleess ddee rroouuttaaggee


  Supposons qu'un ordinateur fonctionnant sous Linux serve de routeur
  pour ce rseau. Il aura trois interfaces rseau vers les rseaux
  locaux, et ventuellement une troisime interface vers Internet (qui
  devrait tre sa route par dfaut).

  Supposons que l'ordinateur sous Linux utilise les plus petites
  adresses IP disponibles sur chaque sous-rseau pour son interface sur
  ce rseau. On configurerait ses interfaces rseau ainsi:


       Interface       Adresse IP      Masque de rseau
       eth0            192.168.1.1     255.255.255.192
       eth1            192.168.1.65    255.255.255.192
       eth2            192.168.1.129   255.255.255.128




  Le routage utilis serait:


       Destination    Passerelle   Masque          Interface
       192.168.1.0    0.0.0.0      255.255.255.192 eth0
       192.168.1.64   0.0.0.0      255.255.255.192 eth1
       192.168.1.128  0.0.0.0      255.255.255.128 eth2





  Sur chacun des sous-rseaux, les htes seraient configurs avec leur
  propre adresse IP et masque de rseau (appropris pour le rseau
  particulier).  Chaque hte dclarerait le PC sous Linux comme son
  routeur/passerelle, en spcifiant l'adresse IP de l'interface du PC
  sous Linux sur ce rseau particulier.

  Robert Hart Melbourne, Australia March 1997.



























































  ISP-Connectivity-mini-HOWTO
  Michael Strates, mstrates@croftj.net
  v2.0, 6 Novembre 1997

  Ce  document decrit comment configurer une liaison PPP, se connecter a
  son Fournisseur d'Acces Internet (F.A.I.), configurer le  courrier  et
  les  news,  obtenir  une  adresse  IP statique (si cela est possible),
  obtenir un nom de domaine et avoir un systeme serieux tournant  en  un
  peu plus de trente minutes.

  11..  IInnttrroodduuccttiioonn

  Le  but  principal  de ce document est, evidemment, de familiariser un
  nouvel utilisateur avec tout ce qui  concerne  la  connexion  d'un  PC
  Linux  a  Internet, l'obtention d'adresses IP, de noms de domaines, et
  la configuration des differentes parties. Ce guide est  destine  a  un
  utilisateur  moyen,  bien  que les debutants intelligents ne devraient
  pas, non plus, avoir de problemes.

  11..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document  seront  periodiquement  postees
  dans  _c_o_m_p_._o_s_._l_i_n_u_x_._a_n_s_w_e_r_s  (NDT : les versions francaises des Howtos
  et    Mini-Howtos    sont    postees    tous     les     mois     dans
  _f_r_._c_o_m_p_._o_s_._l_i_n_u_x_._a_n_n_o_n_c_e_s).   Elles   seront  aussi  placees  sur  les
  differents sites FTP  anonymes  qui  archivent  les  informations  sur
  Linux.  Parmi ceux-ci :

  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO

  Vous  trouverez aussi ce document sur la page du " Linux Documentation
  Project " :

  http://sunsite.unc.edu/LDP/

  La version francaise est disponible sur le site :

  ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO

  11..22..  CCoommmmeennttaaiirreess

  J'apprecierais tout commentaire sur ce HOWTO,  fautes  d'orthographes,
  comment  il  fonctionne,  remerciements  et  critiques. J'espere avoir
  aider certaines personnes avec ce HOWTO,  et,  si  je  l'ai  fait,  je
  serais heureux de vous l'entendre dire.

  mstrates@croftj.net

  http://linloft.home.ml.org/

  Les remarques concernant la traduction francaise peuvent etre envoyees
  a _E_r_i_c _J_a_c_o_b_o_n_i :

  jaco@mail.dotcom.fr

  11..33..  TTeerrmmeess dd''uuttiilliissaattiioonn

  Aucune responsabilite quant au contenu de ce  document  ne  peut  etre
  acceptee.  L'utilisation  des concepts, exemples et autres sont fait a
  vos propres risques. Comme il s'agit  d'une  nouvelle  edition  de  ce
  document,  celle-ci  peut contenir des erreurs et des imprecisions qui
  peuvent porter prejudice a votre systeme.  Procedez avec precaution et
  bien  que  qu'il  y  ait  de  fortes chances pour que cela ne soit pas
  necessaire, je decline toute responsabilite pour tout dommage.

  Il y a, bien sur, probablement  de  meilleures  facons  de  faire  les
  choses decrites dans ce document. Il y a toujours un autre chemin dans
  le monde Linux. C'est la voie que j'ai suivie, et c'est  celle-ci  que
  je vous presente dans ce HOWTO.

  11..44..  IInnffoorrmmaattiioonnss ddee CCooppyyrriigghhtt

  Ce  document  est  copyright (c)1997 Michael Strates et distribue sous
  les termes suivants :

  +o  Les documents HOWTOs Linux peuvent etre  reproduits  et  distribues
     dans  leur  integralite  ou en partie, sur tout support physique ou
     electronique, a condition que cette note de copyright soit presente
     sur toutes les copies. Une redistribution commerciale est autorisee
     et encouragee ; cependant, l'auteur souhaiterai en etre averti.

  +o  Toute traduction ou travail incluant  des  documents  HOWTOs  Linux
     doit etre couvert par cette notice. Vous ne pouvez donc produire un
     travail   derive   d'un   HOWTO   et   imposer   des   restrictions
     supplementaires  sur  sa  distribution. Des exceptions a ces regles
     peuvent etre accordees sous certaines  conditions  ;  contactez  le
     coordinateur des HOWTOs Linux a l'adresse donnee ci-dessous.

  +o  Si vous avez des questions, contactez Greg Hankins, le coordinateur
     des HOWTOs Linux a :

  gregh@sunsite.unc.edu

  22..  SSee ccoonnnneecctteerr aauu mmoonnddee eexxtteerriieeuurr..

  Dans ce document, nous expliquerons comment le faire en utilisant  PPP
  (Point  to  Point Protocol), un protocole presque toujours utilise sur
  Internet. Il permet a votre modem de parler au monde exterieur.  C'est
  ce  que  font des applications comme Trumpet Winsock sous Windows 3.x,
  et beaucoup d'autres programmes que vous  n'avez  probablement  jamais
  vus.

  Sous  Linux,  nous  utilisons  quelque chose appele chat pour realiser
  l'appel telephonique du F.A.I., puis nous  utilisons  un  outil  nomme
  pppd  pour  " utiliser " cette connexion. Dans un sens, chat est celui
  qui appelle, et pppd est notre protocole.  Nous  decrirons  plus  loin
  comment les configurer.

  22..11..  PPaarrlleerr eett ccoommmmuunniiqquueerr aavveecc ppppppdd et chat.

  La  facon probablement la plus facile de faire les choses est de creer
  un script shell nomme ppp-connect  dans  le  repertoire  de  root,  et
  d'invoquer  ce  script  a  chaque  fois  que vous voulez etablir votre
  connexion. Nous decrirons cette methode.

  En tant que root, ouvrez votre editeur  de  texte  favori  sur  ~/ppp-
  connect. Vous devez maintenant choisir vos parametres.

  _p_p_p_d _c_o_n_n_e_c_t _'_c_h_a_t _-_v _"_" _"_v_o_t_r_e___c_h_a_i_n_e_-_i_n_i_t_" _"_" _A_T_D_T_n_u_m_e_r_o___f_a_i _C_O_N_N_E_C_T
  _"_"  _o_g_i_n_:  _v_o_t_r_e___u_s_e_r_n_a_m_e  _w_o_r_d_:  _v_o_t_r_e___m_o_t___d_e___p_a_s_s_e_'  _/_d_e_v_/_t_t_y_(_0_/_1_/_2_)
  _v_i_t_e_s_s_e _m_o_d_e_m

  Sur  mon  systeme,  pppd  invoque /usr/sbin/pppd, puis lance chat pour
  realiser l'appel  telephonique.  chat  envoie  _v_o_t_r_e___c_h_a_i_n_e_-_i_n_i_t  puis
  appelle  _n_u_m_e_r_o___f_a_i.  Il  attend  alors CONNECT, puis attend ogin: (le
  caractere `l' est  omis  car  le  premier  caractere  est  quelquefois
  perdu),  envoie  _v_o_t_r_e___m_o_t___d_e___p_a_s_s_e,  chat se termine alors et rend la
  main a pppd.

  La fin  de  la  commande  specifie  votre  port  modem  (le  mien  est
  /dev/ttyS1).  Dans  la plupart des cas, ce sera ttyS1 (COM2 sous DOS),
  ttyS0 (COM1 sous DOS), ou, si vous  utilisez  la  Slackware,  cua1  ou
  cua0. La vitesse est celle du modem. J'utilise 115200 pour le mien (un
  33.6k). Si vous avez une machine relativement recente, disposant d'une
  UART  16550,  alors  n'allez  pas  en  dessous  de 57600.  Ou, pour un
  14.4k : 38400. _m_o_d_e_m indique simplement  a  pppd  qu'il  s'agit  d'une
  connexion serie/modem. Otez l'option -v si vous ne souhaitez pas avoir
  de longs messages dans vos fichiers logs.

  Le scenario ci-dessous est celui utilise pour appeler  un  F.A.I.  qui
  lance automatiquement PPP, ie. qu'il n'y a pas reellement de lancement
  d'un shell. Voici sa commande dans son ~/ppp-connect :

  _p_p_p_d _c_o_n_n_e_c_t _'_c_h_a_t _"_" _"_A_T_Z_" _"_" _A_T_D_T_5_5_5_-_1_8_0_0 _C_O_N_N_E_C_T  _"_"  _o_g_i_n_:  _j_o_h_n_n_y
  _w_o_r_d_: _b_l_a_c_k_j_a_k_' _/_d_e_v_/_t_t_y_S_1 _1_1_5_2_0_0 _m_o_d_e_m

  Cependant, pour certains, il y a des F.A.I. qui lancent un shell et ne
  lancent  pas  automatiquement  PPP.  Cela  peut  etre   un   probleme.
  Heureusement,  chat  peut  gerer  cela  aussi. Il suffit d'ajouter une
  autre commande a votre script de chat. Ci-dessous, par exemple, _j_o_h_n_n_y
  utilise un F.A.I. qui lui retourne un shell lui demandant de taper ppp
  pour obtenir une connexion ppp. Son invite de shell se termine par  $.

  _p_p_p_d  _c_o_n_n_e_c_t  _'_c_h_a_t  _"_" _"_A_T_Z_" _"_" _A_T_D_T_5_5_5_-_1_8_0_0 _C_O_N_N_E_C_T _"_" _o_g_i_n_: _j_o_h_n_n_y
  _w_o_r_d_: _b_l_a_c_k_j_a_k _$ _p_p_p_' _/_d_e_v_/_t_t_y_S_1 _1_1_5_2_0_0 _m_o_d_e_m

  S'il y a plus d'un mot, entourez les de quotes. J'espere que vous avez
  compris  toutes  ces  implications  et que vous etes capables de creer
  votre propre script convenant a votre connexion.  Modifiez  simplement
  le  premier  ou  le  deuxieme  script ci-dessus pour l'ajuster a votre
  port, serveur, etc. puis, sauvez ce fichier.

  Maintenant que le fichier est cree, il faut s'assurer  que  seul  root
  puisse  le  lancer,  le  lire  ou  y  ecrire. Ceci est tres important.
  Assurez-vous aussi que personne ne puisse lire vos fichiers  logs,  si
  vous  avez  decide  de  garder l'option -v, car votre mot de passe est
  clairement lisible dans ceux-ci (je ne vois pas beaucoup  d'utilite  a
  l'option -v, otez-la si vous n'en avez pas un besoin express).

  22..22..  AAddrreesssseess IIPP,, NNoommss ddee ddoommaaiinneess eett ssoouuss--rreesseeaauuxx..

  Pour  la plupart de ceux qui utilisent les options decrites ci-dessus,
  le fait qu'une adresse IP change ne les genera pas.  Les  utilisateurs
  de  base,  ceux qui veulent un acces simple, qui n'ont que des comptes
  accessibles par liaison telephonique et qui ne sont  pas  specialement
  motives par la technique, tous ceux-la peuvent survoler cette section.
  J'y aborderai les  aspects  importants  pour  configurer  correctement
  votre  systeme.  Les  debutants,  sautez  les  parties  concernant les
  adresses IP fixes, les noms de domaines, les sous-reseaux et ne  lisez
  que la derniere partie de cette section.

  Disposer  d'une adresse IP fixe est peut-etre une option gratuite pour
  votre F.A.I. : demandez-lui en cas de doute. Personnellement, je  dois
  payer  pour  avoir  une  adresse  IP  fixe.  Cela  permet d'envoyer du
  courrier en utilisant une adresse IP, un  domaine,  etc.  uniques.  Si
  vous desirez avoir une adresse permanente, envoyez un courrier a votre
  fournisseur d'acces et demandez-lui s'il peut le faire.
  Lorsque vous avez une adresse IP  fixe,  faites  un  grep  dans  votre
  repertoire  _/_e_t_c  pour  retrouver les fichiers contenant vos anciennes
  adresses IP.  J'ai  du  modifier  des  fichiers  dans  mon  repertoire
  _s_e_n_d_m_a_i_l  et  dans  _/_e_t_c_/_h_o_s_t_s.Il y a d'autres fichiers importants que
  vous ne retouverez qu'avec grep.  Ouvrez /etc/hosts et  ajoutez  votre
  nouvelle  adresse  IP au format standard. Relancez votre machine, vous
  devriez etre pret a continuer.

  Vous devez maintenant changer votre script chat pour repercuter  votre
  nouvelle  configuration. Si PPP est lance des que vous vous connectez,
  vous devez informer l'administrateur  systeme  de  votre  F.A.I.  pour
  qu'il  s'assure  que  leur  systeme  PPP reconnaisse que vous avez une
  adresse IP fixe et vous l'attribue plutot que de vous  en  donner  une
  autre.  Si  vous vous retrouvez devant une invite shell, et qu'il vous
  faut taper ppp ou autre pour lancer la connexion,  plutot  que  de  le
  faire,  modifiez  votre  script  ~/ppp-connect  pour envoyer ceci a la
  place de ppp ou autre lorsqu'il voit un $ ou autre prompt shell.

  _/_u_s_r_/_s_b_i_n_/_p_p_p_d _:_V_o_t_r_e___A_d_r_e_s_s_e___I_P

  Remplacez _V_o_t_r_e___A_d_r_e_s_s_e___I_P par  l'adresse  que  votre  F.A.I.  vous  a
  donnee.  Assurez vous de l'entourer de " " lorsque vous la placez dans
  votre script chat.  Si cela ne fonctionne pas, contactez votre  F.A.I.
  pour  lui  demander ou se trouve  votre serveur PPP et demandez-lui la
  commande a donner. Essayex pour voir si le serveur vous  reconnait  et
  vous donne votre adresse correctement.

  La  prochaine  chose  a  faire  est  probablement  d'obtenir un nom de
  domaine.  Je  sais   qu'en   Australie,   http://www.aunic.net/   pour
  enregistrer      vos      domaines.      Aux     Etats-Unis,     c'est
  http://www.internic.net/ .

  Pour enregistrer les domaines, vous devez fournir des services DNS  et
  autres  trucs  pointus.  Si votre F.A.I. ne peut les fournir, balancez
  par la fenetre les domaines .asn.au et autres  et  prenez  un  domaine
  Internet Monolith.

  Monolith  offre  des  domaines gratuits a tout le monde. Tout est fait
  sans intervention humaine, via une interface web que vous accedez avec
  votre  navigateur.  Votre  domaine est de la forme Votre_Choix.ml.org.
  Monolith hebergera alors localement le DNS pour vous. Si  vous  voulez
  envoyer et recevoir du courrier de ce domaine, demandez a votre F.A.I.
  de se transformer en passeur de courrier pour vous.

  Allez voir sur http://www.ml.org/ et remplissez le formulaire.  Entrez
  dans  NIC  avec  votre  identifiant et votre mot de passe, et creez un
  domaine GRATUIT. Vous devrez entrer votre adresse  IP.  Votre  domaine
  sera dans le DNS dans quelques jours.

  Ok,  nous  allons  passer maintenant a la partie pour les debutants ou
  pour ceux qui ne peuvent avoir d'adresse IP ou de domaine  fixe.  Tout
  ce  que vous avez a faire est d'editer /etc/hosts sous le compte root,
  nommer votre site avec un nom qui  ne  posera  pas  de  probleme,  lui
  donner une adresse IP 10.10.10 ou quelque chose comme ca et redemarrer
  votre machine.

  Maintenant, vous n'avez qu'a configurer votre  machine  avec  pppd  et
  chat.   Cela  ne  prend que 10 minutes. Passons a la section suivante,
  qui traite du courrier electronique.

  33..  CCoouurrrriieerr eelleeccttrroonniiqquuee ssuurr vvoottrree mmaacchhiinnee LLiinnuuxx

  L'un des aspects les plus importants de l'Internet est la  possibilite
  d'envoyer et de recevoir du courrier de par le monde. Linux dispose de
  tres nombreux paquetages de courriers  utilisables  en  mode  console.
  Celui  que  nous  allons  decrire  s'appelle  Pine  (programe  pour le
  courrier et les news Internet) de l'Universite  de  Washington.   Pour
  recuperer  le  courrier,  le programme s'appelant Fetchmail, ecrit par
  _E_r_i_c _S_. _R_a_y_m_o_n_d devrait  aussi  faire  partie  de  votre  distribution
  Linux.

  Fetchmail  est  un  programme  qui  recupere  votre couurier sur votre
  serveur en utilisant le protocole POP. Il transfere  ce  courrier  sur
  votre  machine,  puis  le  detruit  du  serveur,  comme  le  font  des
  programmes comme Eudora ou  Microsoft  Exchange.  Pour  configurer  et
  automatiser  fetchmail,  on  utilise  un  fichier .fetchmailrc dans le
  repertoire de base.  Ouvrez simplement ~/.fetchmailrc (faites-le  sous
  votre compte, pas sous root) avec votre editeur favori et observez les
  options decrites ci-dessous :

  _p_o_l_l _m_a_i_l_._v_o_t_r_e___f_a_i _p_r_o_t_o _p_o_p_3 _u_s_e_r _v_o_t_r_e___l_o_g_i_n _p_a_s_s_w_o_r_d _v_o_t_r_e___p_a_s_s_w_d

  _u_s_e_r _v_o_t_r_e___l_o_g_i_n _w_i_t_h _p_a_s_s _v_o_t_r_e___p_a_s_s_w_d _i_s _v_o_t_r_e___l_o_g_i_n _h_e_r_e

  Tout ce que vous avez a faire est de remplacer _m_a_i_l_._v_o_t_r_e___f_a_i  par  le
  nom du serveur de courrier de votre F.A.I., _v_o_t_r_e___p_a_s_s_w_d par votre mot
  de passe, et _v_o_t_r_e___l_o_g_i_n par votre identifiant.

  Point  important  a  noter  :  pour  que  Pine  et   cette   procedure
  fonctionnent  correctement, votre identifiant doit correpondre a celui
  que  vous  utilisez  pour  votre  F.A.I.  Ceci  veut  dire  que  votre
  identifiant  local  doit correspondre a celui que vous utilisez sur le
  serveur, et a votre adresse e-mail.

  Ensuite,  assurez-vous  que  .fetchmailrc  possede   les   permissions
  correctes  (lecture/ecriture  pour user). Fetchmail peut etre lance de
  deux facons : en mode standard (ou il recupere les messages du serveur
  et   se   termine),   ou  en  mode  serveur  (ou  il  reste  actif  et
  verifie/recupere le courrier toutes les x secondes).  Pour utiliser le
  mode serveur, tapez _f_e_t_c_h_m_a_i_l _-_a _-_d_(_S_e_c_o_n_d_e_s _e_n_t_r_e _l_e_s _v_e_r_i_f_i_c_a_t_i_o_n_s_).
  -a assure qu'il recuperera tous les courriers. Pour utiliser  le  mode
  standard, tapez simplement _f_e_t_c_h_m_a_i_l _-_a.

  Vous  devez  maintenant configurer Pine. Lancez Pine en tapant pine au
  prompt.  Choisissez Setup - Configuration.  Configurez  votre  domaine
  utilisateur  comme  le  domaine qui est dans votre adresse e-mail. Par
  exemple, pour jack@linux.org, ce serait linux.org.   Puis,  configurez
  smtp-server comme votre serveur de courrier POP (le meme que celui que
  vous avez utilise dans la configuration de fetchmail).  Pour  le  meme
  exemple,  nous  entrerions  mail.linux.org. Si vous desirez les forums
  Usenet, configurez votre serveur nntp avec le serveur de news de votre
  F.A.I.

  Bon, on a fini. Tout devrait fonctionner correctement maintenant. Pour
  vous connecter a votre F.A.I., lancez  ~/ppp-connect  sous  le  compte
  root.  Pour  recevoir  votre  courrier, lancez fetchmail -a sous votre
  compte. Pour parcourir votre courrier et les forums  Usenet,  utilisez
  Pine.   Si vous voulez naviguer sur le web, installez un navigateur en
  mode texte comme Lynx.

  _E_n_v_o_y_e_z _t_o_u_s _c_o_m_m_e_n_t_a_i_r_e_s _e_t _s_u_g_g_e_s_t_i_o_n_s _a _: _m_s_t_r_a_t_e_s_@_c_r_o_f_t_j_._n_e_t

  Installation de Linux a partir d'un lecteur ZIP parallele.
  by Kevin Snively, k.snively@seaslug.org
  Traduction Thierry Le Queau, Thierry.LeQueau@wanadoo.fr
  v01.02, 27 January 1998

  Ce  document  vous  explique  comment  installer  Linux  a partir d'un
  lecteur ZIP parallele.

  11..  PPrreeffaaccee

  11..11..  IInnttrroodduuccttiioonn::

  La  methode  suivante  a  ete  ecrite  pour  etre  utilisee  avec   la
  distribution  Slackware.  Elle  requiert  une  bonne  connaissance  de
  l'installation  de celle-ci.  De plus, l'utilisateur devra avoir acces
  a  un  systeme  d'exploitation  Linux  quel  qu'il  soit. Elle demande
  egalement 4 a 6 Mo de  memoire  vive.   Les  systemes  plus  puissants
  peuvent aussi utiliser cette methode, mais vous trouverez surement une
  voie plus simple et plus rapide pour ceux-ci.  Le but de  ce  document
  n'est pas de remplacer la documentation de la S lackware ou d'un autre
  HOWTO Linux et ne concerne  pas  une  premiere  installation.   Je  ne
  parlerai  ici  que  de l'utilisation d'un lecteur ZIP comme seul moyen
  d'installation possible.

  11..22..  CCoonntteexxttee::

  J'ai un vieux 486/20 Mhz avec un disque dur de 120 Mo,  4  Mo  memoire
  vive  et  un modem a 2400 Bds, et je veux utiliser Linux.  Je n'ai pas
  de lecteur de cederom ou PCMCIA, et n'ai jamais vu de  carte  ETHERNET
  (sur  port  parallele). Il ne reste aucune possibilite d'ameliorer cet
  ordinateur.

  Linux est apparu a la fin du regne des 486, mais a aussi insuffle  une
  nouvelle  vie  a ces vieux 486 et 386.  La documentation dit: " Un 386
  avec 2 Mo de memoire vive et sans coprocesseur mathematique "  ,  mais
  essayez  aujourd'hui  de  trouver une distribution qui le permette. La
  Slackware peut etre installee sur une machine avec  4  Mo  de  memoire
  vive  mais  avec beaucoup de travail et de prieres.  La manip suivante
  reduira grandement le boulot. Vous aurez toujours besoin des  prieres,
  meme  avec le meilleur systeme. J'ai utilise la methode suivante sur 3
  autres laptops et un 386, le moins puissant etant un  386  avec  4  Mo
  memoire   vive,   un   disque  dur  de  60  Mo,  pas  de  coprocesseur
  mathematique.   Puisque   cette   methode   fonctionne   correctement,
  j'aimerais  en  faire  autant  avec  la Debian, la RedHat, la SuSe, la
  Caldera Lite et d'autres distributions, ceci pour offrir plus de choix
  aux linuxiens.

  11..33..  AAvvaannttaaggeess::

  L'installation  par  cederom ou liaison ethernet est le meilleur choix
  s'il est disponible. Dans le cas ou le seul moyen d'installation passe
  par le lecteur de disquette 1.44, un lecteur ZIP en parallele offre de
  nombreux avantages (plus  rapide  qu'un  lecteur  3"1/2  et  moins  de
  changement  de  disquettes).  De  plus,  sur les machines ayant peu de
  memoire vive (6 Mo ou moins), la possibilite d'installer une partition
  swap  sur  le disque root et d'utiliser la disquette root: color.gz ou
  text.gz.  Sur les machines avec seulement 4 Mo  de  memoire  vive,  le
  fichier  color.gz  ne fonctionne pas pour une installation de base par
  lecteur 3"1/2. Avec une installation par  ZIP  pas  de  probleme.   Il
  permet   aussi   la   creation   d'une  disquette  de  secours  durant
  l'installation initiale, ce qui n'est pas  possible  avec  un  lecteur
  3"1/2 sur un systeme ayant peu de memoire.

  11..44..  MMaatteerriieell::

  Cette  methode  a  ete utilisee avec la Slackware (version 3.1, 3.2 et
  3.3).  Une installation complete requiert 2 disquettes ZIP, un lecteur
  ZIP  en  parallele avec cordon, une disquette boot 3"1/2, un crayon et
  du papier pour prendre quelques notes durant l'installation.

  Vous avez besoin d'au moins deux systemes pour utiliser cette methode.
  Le  1er  est  utilise  pour preparer l'installation proprement dite et
  doit donc tourner sous Linux. La second est bien sur  la  machine  sur
  laquelle  l'on  veut installer Linux.  Une fois que les disquettes ont
  ete creees, elles peuvent etre utilisees pour autant de  machines  que
  vous  voulez configurer.  J'utilise un lecteur de CD  mais vous pouvez
  telecharger une image disque si vous avez  une  connexion  internet  a
  haut debit. Pour ma part ce n'est pas pratique.

  11..55..  CCoonnvveennttiioonnss::

       supposons que (floppy)    represente le chemin pour monter votre
                                 lecteur 3.5" et son repertoire

       supposons que    (zip)    represente le chemin pour monter votre
                                 lecteur zip et son repertoire

       supposons que  (cdrom)    represente le chemin pour monter votre
                                 lecteur cdrom et son repertoire

       supposons que (verx.x)    represente la version que vous installez

  Si vous telechargez votre image disque, supposons que (cdrom)/slakware
  represente le chemin et le repertoire pour ces images.  Mon  port  Zip
  parallele est defini sur mon systeme par

               /dev/sda4

  Je n'ai pas rencontre de probleme jusqu'au lancement de fdisk. Ensuite
  j'obtenais toujours des messages d'erreurs quand j'essayais d'utiliser
  le  disque.  Vous avez egalement besoin de connaitre les noms systemes
  de vos lecteurs de cederom et de disquette 3.5". Sur  ma  machine  ils
  correspondent a

         /dev/hdc     cdrom
         /dev/fd0     1.44 meg floppy

  J'utiliserai mes devices, vous les votres ;-)

  Au  sujet  de Slackware et slakware (notez bien qu'il manque un c a ce
  dernier). Slackware est le nom de la distribution et slakware  le  nom
  du  repertoire  ou  Patrick  Volkerding  met les packages stables pour
  l'installation.  A chaque fois  que  j'ecris  slakware,  je  parle  du
  repertoire.

  11..66..  AAuuttrree lleeccttuurree::

  Linux Installation & Getting Started de Matt Welsh.

  Si vous avez des problemes pour acceder a votre lecteur Zip voyez le "
  Linux ZIP drive mini-HOWTO " de Grant Guenther.

  Je recommande egalement la lecture du  fichier  LOWMEM.TXT  disponible
  sur le CD de la Slackware ou sur le site ftp de la distribution.

  22..  TTeecchhnniiqquuee::

  22..11..  CCrreeaattiioonn dduu pprreemmiieerr ddiissqquuee ZZIIPP..

  1)     Branchez  le lecteur ZIP sur la machine hote, inserez le disque
  vierge et demarrez le systeme sous Linux.

  2)    Se loguer.  De preference Root ou,  si  vous  etes  utilisateur,
  vous  devez  avoir le droit  de creer des fichiers systemes, de monter
  ou demonter des disques, etc...

  3)    Formatez le disque ZIP sous Linux avec la commande:

                /sbin/mke2fs -b 1024 /dev/sda4

  4)    Montez le disque ZIP avec:

                mount /dev/sda4 /(zip)

  5)    Inserez votre cdrom dans le lecteur et montez le:

           mount /dev/hdc /(cdrom)

  6)    Creez le repertoire ou  vous  voulez  installer  l'image  disque
  slakware:

                mkdir /(zip)/slakware

  7)     Creez un repertoire de travail temporaire sur votre disque dur.
  Je vous suggere:

                mkdir /root/slakware/(verx.x)

  8)    Copiez l'image disque root sous le repertoire ci-dessus:

                cp /(cdrom)/rootdsks/text.gz /root/slakware/(verx.x)/

  9)    Allez dans le repertoire ou vous avez copie  l'image  disque  et
  decompressez le fichier avec la commande:

                cd /root/slakware/(verx.x)
                gunzip text.gz

  10)   Inserez une disquette 1.44 Mo formatee dos ou ext2fs et y copier
  l'image disque cette fois-ci avec la commande:

                dd if=text of=/dev/fd0

  11)   Montez la disquette 1.44 Mo avec:

                mount /dev/fd0 /(floppy)

  12)   Copiez l'image disque sur le ZIP:

           cp -dpR /(floppy)/* /(zip)/

  13)   Pour faciliter  le  processus  d'installation  plus  tard,  nous
  allons creer une partition swap de 8 Mo sur le ZIP avec:

                dd if=/dev/zero of=/(zip)/swap bs=1024 count=8208

  14)    Initialisez la partition swap avec:

                /sbin/mkswap /(zip)/swap 8208

  15)     Puis, avec votre editeur de texte favori, vous devez ouvrir le
  fichier  /(zip)/etc/rc  et apres la ligne  /bin/mount -av -t nonfs   ,
  inserez la ligne suivante :

                /sbin/swapon /swap

  16)   Copiez l'image disque sur le ZIP:

                cp -r /(cdrom)/slakware/[a-ty]* /(zip)/slakware/ &

  Enfermez  entre crochets a-ty* exactement comme ci-dessus.  Le signe &
  a la fin de la ligne rend l'execution possible  en  arriere  plan.  Il
  faut  environ 20mn pour le faire. Vous pouvez aller boire un cafe pen-
  dant ce temps ou lire d'autres HOWTO.

  17)  Les lecteurs ZIP externes ont 2 diodes -- les miennes sont vertes
  et  jaunes.  Le  lecteur  interne en a seulement une.  Quand mon ZIP a
  termine de recevoir des infos,  la  lumiere  jaune  s'eteint  laissant
  juste la lumiere verte allumee, sur l'interne la seule diode s'eteint.

  Vous pouvez maintenant demonter les differents disques en vue de  leur
  ejection:

                cd
                umount /dev/fd0
                umount /dev/sda4

  18)  La Slackware ne va pas apprecier, au redemarrage, si vous ne ver-
  ifiez pas maintenant que votre disque ZIP est bien systeme.

           /sbin/e2fsck -f /dev/sda4

  S'il n'y a pas d'erreur au retour du prompt, vous pouvez  ejecter  les
  disquettes.  N'oubliez pas de les etiquetter (nom et version). Vous ne
  pouvez pas savoir comme ca va vous faciliter la vie.

  22..22..  CCrreeeerr llaa sseeccoonnddee ddiissqquueettttee ZZIIPP..

  Si la surcouche graphique X Window doit etre installee ou si vous avez
  besoin d'un autre noyau, il est temps de creer la seconde disquette.

  x1)    Inserez  le  disque 2. Je prefere formater ce disque sous Linux
  egalement, mais si votre disque est  formate  dos  il  n'y  a  pas  de
  probleme.  J'utilise  la  "  fleche vers le haut " pour visualiser les
  commandes precedentes parce que je suis faineant, mais si vous  voulez
  retaper les instructions reprenez les 3) 4) et 6) du disque 1.

  x2)   Copiez les paquetages X11R6  "X Window" sur le ZIP (j'utiliserai
  par la suite le terme package, c'est plus seyant).

                cp -r /(cdrom)/slakware/x* /(zip)/slakware/ &

  Ca prendra a peu pres 2 fois moins de temps que l'etape 9).  Si  votre
  machine  pedalait, ca ne va pas aller plus vite.  Plus de cafe a boire
  et de HOWTO a lire.

  x3)  Il y a aussi de la place sur ce disque pour creer  le  repertoire
  du  noyau  personnalise.  C'est  la  classe  d'en  installer un qui se
  rapproche le plus possible de celui qui sera utilise pour  acceder  au
  ZIP.  Faites de ce noyau le noyau par defaut. Creons-lui maintenant un
  repertoire et copions-y les informations suivantes:

                mkdir /(zip)/kernels
                cp -r /(cdrom)/kernels/* /(zip)/kernels/ &

  Ca devrait vous prendre encore 10 a 15mn. Vous reprendrez  un  peu  de
  cafe ?  Un petit peu de lecture ?

  x4)  Quand c'est termine, demontez le ZIP et lancez fdisk:

                umount /dev/sda4
                /sbin/e2fsck -f /dev/sda4

  x5)   Quand  fdisk  en a fini avec le ZIP et que le prompt reapparait,
  ejectez le ZIP et etiquetez-le.
  22..33..  CCrreeeerr llaa ddiissqquueettttee ddee bboooott..

  b1)  Je cree maintenant une disquette boot 1.44 en  utilisant  l'image
  du fichier (cdrom)/bootdsks.144/iomega.s Inserez la nouvelle disquette
  et lancez la commande:

                dd if=/(cdrom)/bootdsks.144/iomega.s of=/dev/fd0

  Une fois la disquette creee et le prompt revenu, vous pouvez  si  vous
  le  souhaitez,  eteindre  la  machine  hote,  enlever le ZIP et partir
  gaiement installer Linux de Redmond jusque chez Billou avec votre ZIP.

  33..  LL''iinnssttaallllaattiioonn

  33..11..  PPrreemmiieerr RRoouunndd ..

  Apres  avoir connecte tout ce qu'il faut sur la machine de destination
  et insere le 1er disque ZIP, je lance le systeme sur la disquette boot
  et au prompt, je donne le parametre suivant a Lilo:

             mount root=/dev/sda4 ramdisk=0

  Suivez  attentivement  les instructions a l'ecran, loguez-vous root et
  lancez fdisk pour creer les  partitions  root  et  swap.  Relancez  la
  machine, en redonnant le parametre ci-dessus a Lilo.

  Relire avec attention les instructions a l'ecran, et se loguer root.

  Meme sur une machine qui a seulement 4 Mo de memoire vive, vous n'avez
  pas besoin de creer une partition swap  jusqu'a  qu'il  vous  le  soit
  demande  par  le  programme  d'installation.   Nous avons deja un swap
  operant sur le ZIP. Lancez le setup de la Slackware:

                 setup

  ATTENTION: lisez et suivez attentivement les instructions  des  menus.
  La  premiere  chose  que  le setup voudra faire est de creer et d'ini-
  tialiser une partition swap sur votre  disque  dur.  Contrairement  au
  message d'alerte, il n'y a pas de probleme et ca n'affectera pas celle
  du ZIP.

  Vous  ne  devez  pas  permettre  au   ZIP   /dev/sda4   d'etre   monte
  automatiquement.  Quand la question vous est posee dans le menu, ne le
  rajoutez pas a moins de vouloir laisser tout le temps le  lecteur  ZIP
  sur cette machine.

  Quand  vous arrivez au menu qui vous demande a partir de quelle source
  vous voulez installer Linux, selectionnez l'article  n4  "Installation
  d'un  repertoire  deja  monte".  L'ecran suivant vous demande son nom,
  c'est /slakware.
  Je vous recommande d'installer seulement le package "a" a  ce  niveau.
  Si  l'installateur voit grand en selectionnant les packages et remplit
  le  disque  dur  avant  que  Lilo  et  le  noyau   soient   installes,
  l'installation  avortera.   Durant l'installation primaire, j'installe
  seulement le noyau du disque boot.  Il y a relativement peu de choix a
  faire a partir d'ici et la documentation Slackware du cdrom ou du site
  ftp vous le dira mieux que moi.

  Laissez  le  lecteur  ZIP  ainsi  que  la  disquette  en  place  apres
  l'installation  initiale.  Enlever la disquette 1.44 quand vous pouvez
  le faire (au prompt) et relancer la machine.  Si tout va bien dans  le
  monde de Billou, votre copain aura bientot un systeme Linux operant.

  33..22..  SSeeccoonndd RRoouunndd..

  Apres  avoir  reboote  votre  machine,  loguz  vous root et remontez a
  nouveau le ZIP.

                 mount /dev/sda4 /mnt

  Verifiez l'espace disque disponible:

                 df

  Relancez le setup sur votre nouveau systeme:

                 setup

  Choisissez "s" SOURCE du menu et validez.  Selectionnez  l'article  n4
  "Install  from a premounted directory" (installer a partir d'un reper-
  toire deja monte) et validez.

  Entrez le nom du repertoire, cette fois-ci:

                 /mnt/slakware

  Choisissez les packages que vous voulez ou  dont  avez  besoin.   Tous
  sont  disponibles  sauf  ceux  commencant  par X. Quand vous avez fini
  d'installer les packages  de  ce  disque,  quitter  l'installation  et
  lancer:

                 umount /dev/sda4

  Vous  devez  maintenant  enlever  le  disque  et si X Window doit etre
  installe, inserez le 2eme disque ZIP et relancez le  setup  en  selec-
  tionnant  cette  fois-ci  seulement  les packages commencant par X. Si
  vous avez a installer un noyau personnalise a partir des  noyaux  pre-
  concus,  vous  devez  aussi  le  faire  pendant que le 2eme disque est
  installe.

  Ce mini-HOWTO vous est fourni sous les conditions de la licence GNU et
  du LDP.

  Je remercie specialement le Dr Randolph Bentson qui, par sa devotion a
  Linux, m'a inspire pour qu'a mon tour, je fasse quelque chose pour les
  personnes  qui  nous ont donne le SEUL systeme d'exploitation digne de
  ce nom.

           J'espere que cela aidera quelqu'un.

           Sincerement

           Kevin Snively
           P.O. Box 1013
           Everett Wa. 98206-1013
           USA

  k.snively@seaslug.org

           root@aldrovanda

  Le Mini-HOWTO JAZ-drive
  Edite par Bob Willmot, bwillmot@cnct.com
  Traduit par Olivier Tharan, Olivier.Tharan@int-evry.fr
  v1.3, 05 Aout 1996

  Ceci  est la traduction francaise du JAZ-drive mini-HOWTO, elle decrit
  la configuration et l'utilisation d'un lecteur Iomega Jaz  sous  Linux
  et les outils logiciels disponibles pour ce lecteur.

  11..  IInnttrroodduuccttiioonn

  Le  disque  Iomega  Jaz est un lecteur de disques a supports amovibles
  dont les  disques  ont  une  capacite  de  1021  mega-octets.  Il  est
  disponible  a  l'heure  actuelle  en versions SCSI interne et externe.
  Iomega projette de sortir une version IDE interne.

  Ce document decrit la maniere d'utiliser le lecteur  Jaz  avec  Linux.
  Puisque  c'est  un peripherique SCSI, il est important que vous lisiez
  aussi le HOWTO SCSI de Drew Eckhardt (traduit  en  francais  par  Jean
  Zundel) :

       http://sunsite.unc.edu/pub/Linux/docs/HOWTO/SCSI-HOWTO

  J'aimerais  remercier les personnes suivantes pour leurs contributions
  et les informations qu'elles ont fournies :

  +o  Grant Gunther, grant@torque.net

  +o  Tom Poindexter, tpoindex@nyx.net

  +o  Todd Woods, woods@cs.uiowa.edu

  Si vous avez  des  commentaires,  des  suggestions,  des  corrections,
  veuillez les envoyer a : Bob Willmot, bwillmot@cnct.com.

  22..  LLeess ddiissqquueess JJaazz

  Les  disques  Jaz  (cartouches)  ressemblent  a un empilement de trois
  disquettes 3,5" et contiennent 1 Go de donnees.

  Le lecteur possede un mecanisme motorise qui peut ejecter le disque  a
  l'aide  d'un  bouton-poussoir sur le devant du lecteur ou par logiciel
  (voir ci-dessous pour les logiciels Linux jaztools).

  22..11..  LL''aaddaappttaatteeuurr JJaazz JJeett

  Iomega commercialise un adaptateur SCSI sous le nom de Jaz Jet.

  Apparemment il y a en ce moment  deux  versions  disponibles  pour  ce
  controleur, basees sur deux chipsets SCSI differents.

  L'un  est  base  sur  la  famille  d'adaptateurs  Adaptec 7800, et est
  compatible avec les adaptateurs  2930/2940.  Linux  2.0  supporte  cet
  adaptateur  avec  le  pilote  aic7xxx.  (Ce pilote est apparu dans les
  versions 1.3.? du noyau).

  L'autre adaptateur est  base  sur  le  chipset  Advanced  Systems.  Au
  demarrage, la carte donne un message ainsi :
       Jaz Jet PCI SCSI adapter Copyright Advanced Systems 1996

  Compilez le noyau en positionnant la variable CONFIG_SCSI_ADVANSYS.

  33..  CCoonnffiigguurreerr uunn nnooyyaauu ppoouurr llee lleecctteeuurr JJaazz

  Pour  utiliser  le  lecteur  Jaz avec Linux, vous devez avoir un noyau
  configure pour votre adaptateur SCSI.

  Les informations pour construire le noyau se trouvent dans le  fichier
  /usr/src/linux/README,        ou        dans       le       repertoire
  /usr/src/linux/Documentation/ pour les noyaux 2.x.

  Allez aussi faire un tour sur le Kernel-HOWTO de Brian  Ward  (traduit
  par Eric Dumas) :

       http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Kernel-HOWTO
       http://www.loria.fr/linux/HOWTOFRENCH/Kernel-HOWTO/Kernel-HOWTO.html

  44..  IIddeennttiiffiieerr llee lleecctteeuurr aauu ddeemmaarrrraaggee

  Quand  votre systeme demarre, il devrait afficher des informations sur
  votre adaptateur, et sur tous les disques attaches au lecteur.

  Les messages de demarrage varient selon votre adaptateur SCSI et  sont
  aussi  ajoutes  au  fichier  /var/log/messages (ou /var/adm/messages).
  Vous pouvez aussi ``revoir'' ces messages a  partir  de  la  ligne  de
  commande avec la commande dmesg.

  Voici la sortie ecran d'un demarrage du noyau sur un noyau 2.0.10 avec
  un controleur Adaptec 2940 :

      aic7xxx: BurstLen = 8 DWDs, Latency Timer = 64 PCLKS
      aic7xxx: AHA-2940 Ultra Rev B.
      aic7xxx: devconfig = 0x580.
      aic7xxx: Reading SEEPROM...done.
      aic7xxx: Extended translation enabled.
      aic7xxx: Using 16 SCB's after checking for SCB memory.
      AHA-2940 Ultra (PCI-bus):
          irq 11
          bus release time 40 bclks
          data fifo threshold 100%
          SCSI CHANNEL A:
              scsi id 7
              scsi selection timeout 256 ms
              scsi bus reset at power-on enabled
              scsi bus parity enabled
              scsi bus termination (low byte) enabled
      aic7xxx: Downloading sequencer code...done.
      aic7xxx: Resetting the SCSI bus...done.
      scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 3.2/3.1/3.0
      scsi : 1 host.
      aic7xxx: Scanning channel A for devices.
      aic7xxx: Target 4, channel A, now synchronous at 10.0MHz, offset(0xf).
        Vendor: iomega    Model: jaz 1GB           Rev: G.60
        Type:   Direct-Access                      ANSI SCSI revision: 02
      Detected scsi removable disk sda at scsi0, channel 0, id 4, lun 0
      scsi : detected 1 SCSI disk total.
      SCSI device sda: hdwr sector= 512 bytes. Sectors= 2091050 [1021 MB] [1.0 GB]
      sda: Write Protect is off

  Dans la sequence ci-dessus, notez les noms de peripheriques SCSI bruts
  (sda,  sdb,  etc).  Vous  en  aurez besoin pour acceder au disque plus
  tard.

  Si ces lignes n'apparaissent pas, c'est  que  quelque  chose  est  mal
  configure dans votre materiel ou dans le noyau.

  Si la ligne scsi0: n'apparait pas, c'est que vous n'avez pas configure
  votre adaptateur et son pilote  correctement.  Certains  pilotes  vous
  donneront  un  indice sur ce qui ne va pas. Si votre lecteur n'est pas
  detecte, vous avez probablement un probleme de cable.  Si  un  nom  de
  lecteur  n'est  pas  donne, vous avez probablement oublie d'inclure le
  support pour disque SCSI quand vous avez construit le noyau.

  Verifiez les fichiers README dans drivers/scsi et le HOWTO  SCSI  pour
  d'autres indices de debogage.

  44..11..  FFddiisskk,, mmkkee22ffss,, mmoouunntt,, eettcc..

  Une fois que vous connaissez le nom de lecteur pour votre lecteur Jaz,
  vous etes sur la bonne voie. Vous pouvez manipuler le lecteur avec les
  commandes  traditionnelles  de  gestion  de disques sous Linux, fdisk,
  mke2fs, mount, etc.

  Reportez-vous aux pages de manuel pour ces programmes.

  44..11..11..  UUnn ddiissqquuee ddeejjaa ffoorrmmaattee ppoouurr DDOOSS

  Les disques formates en usine chez Iomega sont partitionnes  avec  une
  seule  partition  (pour  une  raison  inconnue,  ils utilisent la 4eme
  partition).

  Vous pouvez monter ce disque (en supposant que votre  disque  Jaz  est
  sur le peripherique brut sda) avec les commandes :

       mkdir /jaz
       mount -t msdos /dev/sda4 /jaz

  Ou  si  vous  utilisez les noyaux 2.0 et avez compile le noyau avec le
  support de la VFAT Win95, vous pouvez le monter avec :

       mkdir /jaz
       mount -t vfat /dev/sda4 /jaz

  (Ceci vous permettra de lire/ecrire les noms de fichiers longs).

  Les fichiers du disque apparaitront dans /jaz. Pendant que  le  disque
  est monte, vous ne serez pas capable de l'ejecter.

  Pour demonter le lecteur, vous pouvez lancer la commande :

       umount /dev/sda4

  Une  fois  que  vous  avez cree le point de montage /jaz, vous n'aurez
  plus besoin de le refaire. (Assurez-vous aussi  que  vous  n'etes  pas
  dans le repertoire /jaz quand vous essayez de demonter le lecteur.)

  44..11..22..  RRee--ffoorrmmaatteerr uunn ddiissqquuee ppoouurr LLiinnuuxx

  Si vous voulez effacer un disque Jaz et y creer un systeme de fichiers
  natif, vous devez utiliser fdisk sur le disque entier :

       fdisk /dev/sda

  et effacer toute partition existant (avec la commande d). Creez  alors
  une  nouvelle  partition  avec  la  commande n, faites-en la partition
  primaire numero 1, utilisez w pour ecrire la table de  partitions  sur
  le disque, et quittez avec q.

  Formattez la partition :

       mke2fs /dev/sda1

  (Le 1 est le numero que vous avez donne a cette partition dans fdisk).
  Maintenant vous pouvez monter le disque :

       mount -t ext2 /dev/sda1 /jaz

  (en re-utilisant le point de montage que nous avions cree auparavant).

  44..11..33..  LLee ddiissqquuee JJaazz TToooollss

  Il  y a un peu plus de travail si vous voulez utiliser le disque livre
  avec le lecteur Jaz. Livre tel qu'il est, la  protection  en  ecriture
  controlee  par  logiciel est activee. La plupart des gens ont debloque
  le disque sous DOS avant meme  d'essayer  de  l'utiliser  avec  Linux.
  Linux  ne  peut  pas  acceder  a  un  disque  protege, et il doit etre
  debloque avec les outils Iomega.

  55..  JJaazzttoooollss

  Un programme natif sous Linux, fait pour supporter certaines capacites
  speciales  de  Iomega  (comme  l'ejection controlee par logiciel et la
  protection en ecriture) est disponible a :

       http://www.cnct.com/~bwillmot/jaztool/

  Une nouvelle version de jaztool devrait etre disponible  sous  peu  et
  contiendra  une  interface graphique et supportera l'interrogation des
  disques et le montage et demontage automatique des disques.

  66..  QQuueessttiioonnss ffrreeqquueemmmmeenntt ppoosseeeess

  66..11..  LLee JJaazz bbllooqquuee mmoonn ssyysstteemmee aapprreess qquu''iill ss''eetteeiiggnnee......

  Certaines personnes ont rappporte des problemes avec  les  noyaux  1.2
  (et  1.3  au  debut)  disant  que  quand  le disque Jaz s'arretait, il
  bloquait leur systeme, ou produisait simplement des  tas  de  messages
  d'erreurs SCSI.

  Je  n'ai  pas eu de problemes avec les noyaux 2.0.x et l'arret du Jaz.
  Si vous avez des problemes, essayez le dernier noyau 2.0.x  disponible
  sur http://sunsite.unc.edu/pub/Linux/kernel/v2.0/.

  66..22..  PPuuiiss--jjee ddeemmaarrrreerr aa ppaarrttiirr dduu lleecctteeuurr JJaazz ??

  Ceci  depend  de  l'adaptateur  que vous utilisez. Si votre adaptateur
  possede un BIOS avec du code qui lui permet de demarrer sur la cible 5
  ou 6, alors oui, vous pouvez demarrer a partir du disque Jaz.

  66..33..  PPoouurrqquuooii IIoommeeggaa uuttiilliissee llaa ppaarrttiittiioonn nnuummeerroo 44 ??

  Je n'en ai aucune idee... Et vous ?

  66..44..  CCoommmmeenntt ppuuiiss--jjee aavvooiirr llee ddiissqquuee mmoonnttee aauu ddeemmaarrrraaggee ??

  Vous  devez  simplement  ajouter une ligne a votre fichier /etc/fstab.
  Par exemple, si vous avez toujours un disque DOS dans le lecteur quand
  vous demarrez, vous pourriez mettre

       /dev/sda4   /jaz  msdos  defaults  0 0

  dans  le fstab. Selon votre distribution, les scripts d'initialisation
  peuvent tenter de lancer fsck  sur  les  partitions  listees  dans  le
  fstab. Soyez avertis que ceci peut poser des problemes si vous oubliez
  de mettre le disque dans le lecteur quand vous demarrez, ou  y  mettez
  un mauvais disque.

  66..55..  QQuu''aarrrriivvee--tt--iill ssii aauuccuunn ddiissqquuee nn''eesstt pprreesseenntt aauu ddeemmaarrrraaggee ??

  Le noyau essaiera de lire la table des  partitions,  mais  l'operation
  finira par s'arreter.

  Quand  vous  changez  de  disque, c'est une bonne idee d'utiliser fsck
  pour verifier la structure de la partition sur le nouveau disque.

  Le BIOS de certains adaptateurs SCSI tentera  de  lire  la  table  des
  partitions sur votre disque durant le demarrage du systeme. Si vous ne
  pouvez pas enlever cette verification, vous serez peut-etre  contraint
  de toujours demarrer avec un disque dans le lecteur.

  77..  OObbtteenniirr ddeess iinnffoorrmmaattiioonnss pplluuss aa jjoouurr

  Vous pouvez trouver la version la plus a jour de ce mini-HOWTO a :

       http://www.cnct.com/~bwillmot/jaztool/

  Les pages Web de Iomega sont a :

       http://www.iomega.com/

  Le Mini-HOWTO JAZ-drive
  Edite par Bob Willmot, bwillmot@cnct.com
  Traduit par Olivier Tharan, Olivier.Tharan@int-evry.fr
  v1.6, 4 juin 1997

  Ceci  est la traduction francaise du JAZ-drive mini-HOWTO, elle decrit
  la configuration et l'utilisation d'un lecteur Iomega Jaz  sous  Linux
  et les outils logiciels disponibles pour ce lecteur.

  11..  IInnttrroodduuccttiioonn

  Le  disque  Iomega  Jaz est un lecteur de disques a supports amovibles
  dont les  disques  ont  une  capacite  de  1021  mega-octets.  Il  est
  disponible  a  l'heure  actuelle  en versions SCSI interne et externe.
  Iomega projette de sortir une version IDE interne.

  Ce document decrit la maniere d'utiliser le lecteur  Jaz  avec  Linux.
  Puisque  c'est  un peripherique SCSI, il est important que vous lisiez
  aussi le HOWTO SCSI de Drew Eckhardt (traduit  en  francais  par  Jean
  Zundel) :

       http://sunsite.unc.edu/pub/Linux/docs/HOWTO/SCSI-HOWTO
       http://www.freenix.fr/linux/HOWTO/SCSI-HOWTO.html

  J'aimerais  remercier les personnes suivantes pour leurs contributions
  et les informations qu'elles ont fournies :

  +o  Grant Gunther, grant@torque.net

  +o  Tom Poindexter, tpoindex@nyx.net

  +o  Todd Woods, woods@cs.uiowa.edu

  +o  Richard B. Melrose, rbm@math.mit.edu

  +o  Phil Howard, phil@charon.milepost.com

  +o  Rick Niess, rniess@ocean.st.usm.edu

  Si vous avez  des  commentaires,  des  suggestions,  des  corrections,
  veuillez les envoyer a : Bob Willmot, bwillmot@cnct.com.

  22..  LLeess ddiissqquueess JJaazz

  Les  disques  Jaz  (cartouches)  ressemblent  a un empilement de trois
  disquettes 3,5" et contiennent 1 Go de donnees.

  Le lecteur possede un mecanisme motorise qui peut ejecter le disque  a
  l'aide  d'un  bouton-poussoir sur le devant du lecteur ou par logiciel
  (voir ci-dessous pour les logiciels Linux jaztools).

  22..11..  LL''aaddaappttaatteeuurr JJaazz JJeett

  Iomega commercialise un adaptateur SCSI sous le nom de Jaz Jet.

  Apparamment il y a en ce moment  deux  versions  disponibles  pour  ce
  controleur, basees sur deux chipsets SCSI differents.

  L'un  est  base  sur  la  famille  d'adaptateurs  Adaptec 7800, et est
  compatible avec les adaptateurs  2930/2940.  Linux  2.0  supporte  cet
  adaptateur  avec  le  pilote  aic7xxx.  (Ce pilote est apparu dans les
  versions 1.3.? du noyau).

  L'autre adaptateur est  base  sur  le  chipset  Advanced  Systems.  Au
  demarrage, la carte donne un message ainsi :

       Jaz Jet PCI SCSI adapter Copyright Advanced Systems 1996

  Compilez le noyau en positionnant la variable CONFIG_SCSI_ADVANSYS.

  33..  CCoonnffiigguurreerr uunn nnooyyaauu ppoouurr llee lleecctteeuurr JJaazz

  Pour  utiliser  le  lecteur  Jaz avec Linux, vous devez avoir un noyau
  configure pour votre adaptateur SCSI.

  Les informations pour construire le noyau se trouvent dans le  fichier
  /usr/src/linux/README,        ou        dans       le       repertoire
  /usr/src/linux/Documentation/ pour les noyaux 2.x.

  Allez aussi faire un tour sur le Kernel-HOWTO de Brian  Ward  (traduit
  par Eric Dumas) :

       http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Kernel-HOWTO
       http://www.freenix.fr/linux/HOWTO/Kernel-HOWTO.html

  44..  IIddeennttiiffiieerr llee lleecctteeuurr aauu ddeemmaarrrraaggee

  Quand  votre systeme demarre, il devrait afficher des informations sur
  votre adaptateur, et sur tous les disques attaches au lecteur.

  Les messages de demarrage varient selon votre adaptateur SCSI et  sont
  aussi  ajoutes  au  fichier  /var/log/messages (ou /var/adm/messages).
  Vous pouvez aussi ``revoir'' ces messages a  partir  de  la  ligne  de
  commande avec la commande dmesg.

  Voici la sortie ecran d'un demarrage du noyau sur un noyau 2.0.10 avec
  un controleur Adaptec 2940 :

      aic7xxx: BurstLen = 8 DWDs, Latency Timer = 64 PCLKS
      aic7xxx: AHA-2940 Ultra Rev B.
      aic7xxx: devconfig = 0x580.
      aic7xxx: Reading SEEPROM...done.
      aic7xxx: Extended translation enabled.
      aic7xxx: Using 16 SCB's after checking for SCB memory.
      AHA-2940 Ultra (PCI-bus):
          irq 11
          bus release time 40 bclks
          data fifo threshold 100%
          SCSI CHANNEL A:
              scsi id 7
              scsi selection timeout 256 ms
              scsi bus reset at power-on enabled
              scsi bus parity enabled
              scsi bus termination (low byte) enabled
      aic7xxx: Downloading sequencer code...done.
      aic7xxx: Resetting the SCSI bus...done.
      scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 3.2/3.1/3.0
      scsi : 1 host.
      aic7xxx: Scanning channel A for devices.
      aic7xxx: Target 4, channel A, now synchronous at 10.0MHz, offset(0xf).
        Vendor: iomega    Model: jaz 1GB           Rev: G.60
        Type:   Direct-Access                      ANSI SCSI revision: 02
      Detected scsi removable disk sda at scsi0, channel 0, id 4, lun 0
      scsi : detected 1 SCSI disk total.
      SCSI device sda: hdwr sector= 512 bytes. Sectors= 2091050 [1021 MB] [1.0 GB]
      sda: Write Protect is off

  Dans la sequence ci-dessus, notez les noms de peripheriques SCSI bruts
  (sda,  sdb,  etc.).  Vous  en aurez besoin pour acceder au disque plus
  tard.

  Si ces lignes n'apparaissent pas, c'est  que  quelque  chose  est  mal
  configure dans votre materiel ou dans le noyau.

  Si la ligne scsi0: n'apparait pas, c'est que vous n'avez pas configure
  votre adaptateur et son pilote  correctement.  Certains  pilotes  vous
  donneront  un  indice sur ce qui ne va pas. Si votre lecteur n'est pas
  detecte, vous avez probablement un probleme de cable.  Si  un  nom  de
  lecteur  n'est  pas  donne, vous avez probablement oublie d'inclure le
  support pour disque SCSI quand vous avez construit le noyau.

  Verifiez les fichiers README dans drivers/scsi et le HOWTO  SCSI  pour
  d'autres indices de debogage.

  44..11..  FFddiisskk,, mmkkee22ffss,, mmoouunntt,, eettcc..

  Une fois que vous connaissez le nom de lecteur pour votre lecteur Jaz,
  vous etes sur la bonne voie. Vous pouvez manipuler le lecteur avec les
  commandes  traditionnelles  de  gestion  de disques sous Linux, fdisk,
  mke2fs, mount, etc.

  Reportez-vous aux pages de manuel pour ces programmes.

  44..11..11..  UUnn ddiissqquuee ddeejjaa ffoorrmmaattee ppoouurr DDOOSS

  Les disques formates en usine chez Iomega sont partitionnes  avec  une
  seule  partition  (pour  une  raison  inconnue,  ils utilisent la 4eme
  partition).

  Vous pouvez monter ce disque (en supposant que votre  disque  Jaz  est
  sur le peripherique brut sda) avec les commandes :

       mkdir /jaz
       mount -t msdos /dev/sda4 /jaz

  Ou  si vous utilisez un noyau de la serie 2.0 et avez compile le noyau
  avec le support de la VFAT Win95, vous pouvez le monter avec :

       mkdir /jaz
       mount -t vfat /dev/sda4 /jaz

  (Ceci vous permettra de lire/ecrire les noms de fichiers longs).

  Les fichiers du disque apparaitront dans /jaz. Pendant que  le  disque
  est monte, vous ne pourrez pas l'ejecter.

  Pour demonter le lecteur, vous pouvez lancer la commande :

       umount /dev/sda4

  Une  fois  que  vous  avez cree le point de montage /jaz, vous n'aurez
  plus besoin de le refaire. (Assurez-vous aussi  que  vous  n'etes  pas
  dans le repertoire /jaz quand vous essayez de demonter le lecteur.)

  44..11..22..  RRee--ffoorrmmaatteerr uunn ddiissqquuee ppoouurr LLiinnuuxx

  Si vous voulez effacer un disque Jaz et y creer un systeme de fichiers
  Linux natif, vous devez utiliser fdisk sur le disque entier :

       fdisk /dev/sda

  et effacer toute partition existant (avec la commande d). Creez  alors
  une  nouvelle  partition  avec  la  commande n, faites-en la partition
  primaire numero 1, utilisez w pour ecrire la table de  partitions  sur
  le disque, et quittez avec q.

  Formattez la partition :

  mke2fs /dev/sda1

  (Le 1 est le numero que vous avez donne a cette partition dans fdisk).
  Maintenant vous pouvez monter le disque :

       mount -t ext2 /dev/sda1 /jaz

  (en re-utilisant le point de montage que nous avions cree auparavant).

  44..11..33..  LLee ddiissqquuee JJaazz TToooollss

  Il  y a un peu plus de travail si vous voulez utiliser le disque livre
  avec le lecteur Jaz. Livre tel qu'il est, la  protection  en  ecriture
  controlee par logiciel est activee.

  Vous  avez  a  ce point deux options : debloquer le disque sous DOS ou
  Windows avec le programme reclaim.exe (ou en installant les  outils  a
  partir  du programme d'installation), ou bien debloquer le disque avec
  mon programme jaztools (voir la section ``'') avec la commande :

       jaztool /dev/sda rw

  (Corrigez le /dev/sda selon votre peripherique SCSI), et quand on vous
  demande un mot de passe, entrez

       APlaceForYourStuff

  55..  JJaazzttoooollss

  Un programme natif sous Linux, fait pour supporter certaines capacites
  speciales de Iomega (comme l'ejection controlee  par  logiciel  et  la
  protection en ecriture) est disponible a :

       http://www.cnct.com/~bwillmot/jaztool/

  Une  nouvelle  version  de jaztool devrait etre disponible sous peu et
  contiendra une interface graphique et supportera  l'interrogation  des
  lecteurs et le montage et demontage automatique des disques.
  66..  QQuueessttiioonnss ffrreeqquueemmmmeenntt ppoosseeeess

  66..11..  JJee nnee ppeeuuxx mmoonntteerr llee ddiissqquuee JJaazz TToooollss qquu''eenn lleeccttuurree sseeuullee..

  Le disque d'utilitaires est livre dans un  mode  special,  en  lecture
  seule et protege par un mot de passe. Pour debloquer le disque, lancez
  le programme reclaim.exe sous DOS ou  Windows,  ou  bien  utilisez  le
  programme Linux jaztools (voir la section ``'') avec la commande :

       jaztool /dev/sda rw

  (Corrigez le /dev/sda selon votre peripherique SCSI), et quand on vous
  demande un mot de passe, entrez

       APlaceForYourStuff

  66..22..  LLee JJaazz bbllooqquuee mmoonn ssyysstteemmee aapprreess qquu''iill ss''eetteeiiggnnee......

  J'ai l'impression que ceci peut avoir un rapport avec le  _f_i_r_m_w_a_r_e  du
  Jaz. Je demande a toutes les personnes qui ont ce probleme de me faire
  savoir quelle est la version de  votre  lecteur.  Pour  determiner  la
  version  du Jaz, cherchez dans la sortie du programme dmesg des lignes
  comme celles-ci :

           scsi0: Target 4, channel A, now synchronous at 10.0MHz, offset 15.
             Vendor: iomega    Model: jaz 1GB           Rev: G.60
             Type:   Direct-Access                      ANSI SCSI revision: 02

  Ceci n'arrive apparamment que dans certaines circonstances specifiques
  que l'utilisateur moyen de Linux a peu de chances de rencontrer. Quand
  une partition/systeme de fichiers d'un  lecteur  Jaz  est  montee,  le
  lecteur  s'arrete de tourner avec un systeme de fichiers encore monte,
  et une tentative de lecture est faite sur le peripherique  bloc  alors
  que  le  lecteur est encore inactif. Il semblerait que Linux essaie de
  lire le MBR a nouveau pour retablir les partitions, mais ceci peut  ne
  pas  fonctionner _c_e_r_t_a_i_n_e_s _f_o_i_s et laisse le peripherique dans un etat
  apparemment occupe. La lecture du MBR par le noyau et  la  lecture  du
  peripherique  par le processus echoueront toutes les deux et cet echec
  peut venir d'un blocage ou d'un etat occupe. Dans cet etat,  le  noyau
  pense  qu'il  est encore en train de lire meme si aucune entree/sortie
  n'est en attente ou en cours.  Ceci  m'est  arrive  principalement  en
  lisant par bloc le MBR lui-meme.

  66..33..  PPuuiiss--jjee ddeemmaarrrreerr aa ppaarrttiirr dduu lleecctteeuurr JJaazz ??

  Le  lecteur  Jaz peut selectionner n'importe quelle cible SCSI entre 0
  et 6.

  Si le lecteur Jaz cohabite avec d'autres disques durs SCSI, la plupart
  des BIOS voudront demarrer a partir de l'ID SCSI la plus basse qui est
  un disque. Certains detectent et enlevent les peripheriques  amovibles
  comme le Jaz.

  Si  le lecteur Jaz cohabite avec des disques durs IDE, a peu pres tous
  les BIOS voudront demarrer sur le premier  disque  dur  IDE.  Certains
  BIOS  permettront  d'enlever le premier disque IDE de la configuration
  et assigneront le premier  peripherique  SCSI  comme  peripherique  de
  demarrage  (Bios  0x80).  D'autres peuvent demander d'enlever tous les
  peripheriques  IDE  de  la  configuration.  D'autres  encore   peuvent
  demander  de detacher physiquement les disques IDE ou de ne pas mettre
  l'interface IDE en service.

  66..44..  PPoouurrqquuooii IIoommeeggaa uuttiilliissee llaa ppaarrttiittiioonn nnuummeerroo 44 ??

  La partition numero 4 est la partition par  defaut  utilisee  sur  les
  Macintosh.

  Sur  un  Mac,  la  premiere partition est reservee aux informations de
  demarrage, la deuxieme pour les  informations  systeme,  la  troisieme
  pour  la  branche  ressources  (_r_e_s_o_u_r_c_e  _f_o_r_k) et la quatrieme est la
  branche de donnees (_d_a_t_a _f_o_r_k).

  De toute maniere, les PC et la plupart  des  autres  systemes  peuvent
  supporter  le  fait  de  devoir  travailler sur la quatrieme partition
  alors que le Mac ne peut pas faire autrement. Iomega  livre  tous  ses
  supports  pre-formates  en  utilisant la partition 4 pour qu'a la fois
  les PC et les Mac puissent les lire et chacun evite des maux  de  tete
  en  ce qui concerne la compatibilite. (Les logiciels sur PC qui lisent
  les disques Mac s'attendent en general a trouver les  donnees  sur  la
  partition 4.)

  66..55..  CCoommmmeenntt ppuuiiss--jjee aavvooiirr llee ddiissqquuee mmoonnttee aauu ddeemmaarrrraaggee ??

  Vous  devez  simplement  ajouter une ligne a votre fichier /etc/fstab.
  Par exemple, si vous avez toujours un disque DOS dans le lecteur quand
  vous demarrez, vous pourriez mettre

       /dev/sda4   /jaz  msdos  defaults  0 0

  dans   le   fichier  fstab.  Selon  votre  distribution,  les  scripts
  d'initialisation peuvent tenter de  lancer  fsck  sur  les  partitions
  listees dans le fstab. Soyez avertis que ceci peut poser des problemes
  si vous oubliez de  mettre  le  disque  dans  le  lecteur  quand  vous
  demarrez, ou y mettez un mauvais disque.

  Pour  se debarasser de ces problemes, vous pouvez ajouter une commande
  mount separee dans /etc/rc.d/rc.local pour monter le disque Jaz.  Ceci
  evitera  les  problemes du mount -a habituel qui arrive quand il n'y a
  pas de cartouche dans le lecteur.
  66..66..  QQuu''aarrrriivvee--tt--iill ssii aauuccuunn ddiissqquuee nn''eesstt pprreesseenntt aauu ddeemmaarrrraaggee ??

  Le  noyau  essaiera  de lire la table des partitions, mais l'operation
  finira par s'arreter.

  Quand vous changez de disque, c'est une  bonne  idee  d'utiliser  fsck
  pour verifier la structure de la partition sur le nouveau disque.

  Le  BIOS  de  certains  adaptateurs  SCSI tentera de lire la table des
  partitions sur votre disque durant le demarrage du systeme. Si vous ne
  pouvez  pas enlever cette verification, vous serez peut-etre contraint
  de toujours demarrer avec un disque dans le lecteur.

  66..77..  CCoommmmeenntt ppuuiiss--jjee rreennddrree mmaa ccaarrttoouucchhee JJaazz aauuttoo--ddeemmaarrrraabbllee ((eenn ssuupp--
  ppoossaanntt qquuee mmoonn BBIIOOSS eesstt ccoonnffiigguurree ddee mmaanniieerree aa llee ppeerrmmeettttrree)) ??

  Le  disque  Jaz est un excellent DRU (Disque de Reparation d'Urgence).
  Ce peut etre amusant de pouvoir se pointer sur un systeme  Linux  neuf
  ou  d'essayer  Linux  sur  la machine de quelqu'un d'autre equipe d'un
  Jaz.

  Vous pourriez simplement suivre la procedure d'installation  de  votre
  distribution favorite avec le disque Jaz comme unique disque sur votre
  systeme.

  Cependant, si vous voulez faire une installation  a  partir  de  votre
  systeme  qui  tourne, vous pouvez souvent y arriver en construisant un
  systeme auto-demarrable sur une cartouche Jaz.

  1. partitionnez le disque et fabriquez les systemes de fichiers.  Vous
     aurez probablement aussi besoin d'une partition de swap, mais peut-
     etre pas si vous avez beaucoup de RAM. Montez  la  nouvelle  racine
     sur /jaz et toute partition supplementaire dans ce repertoire comme
     il le faut.

  2. copiez tous les fichiers a leur emplacement. Assurez-vous que  tous
     les  fichiers  de  /dev  soient copies. Assurez-vous que toutes les
     permissions, proprietes et numeros de groupes soient maintenues.

  3. modifiez les fichiers sur la cartouche Jaz pour s'accorder avec  le
     fait  qu'on  demarre dessus. En particulier, assurez-vous de chager
     /jaz/etc/fstab pour monter les partitions de la cartouche Jaz comme
     prevu. Changez aussi /jaz/etc/lilo.conf pour faire de meme.

  4. il y a deux possibilites :

     a. fabriquez  une  disquette pour stocker le noyau et utilisez rdev
        pour lui faire monter la cartouche Jaz a la racine. Demarrez sur
        la  disquette  quand  vous  etes pret pour la premiere fois puis
        lancez lilo pour rendre le MBR du Jaz demarrable.

     b. vous pouvez lancer lilo a partir de votre systeme en cours  (qui
        n'est  pas  sur  le Jaz) pour installer le MBR demarrable sur la
        cartouche Jaz. Ajoutez ces lignes (changez 1 en votre numero  de
        partition  racine  et  sda en votre nom de peripherique Jaz pour
        que ca concorde) au fichier /jaz/etc/lilo.conf avant la premiere
        definition du systeme :

             drive = /dev/sda1
             bios = 0x80

  quand  vous  etes pret a installer le MBR sur le Jaz, lancez lilo avec
  l'option -r pour le faire fonctionner a partir de l'arborescence  /jaz
  comme si c'etait /. La commande ressemble a :

               lilo -r /jaz

  Normalement  lilo  cherche quel sera le numero de peripherique BIOS du
  peripherique de  demarrage  au  prochain  demarrage.  Ceci  doit  etre
  contourne  puisque  le  disque Jaz n'est pas demarrable a cet instant.
  Les deux lignes ajoutees font ceci.

  Il y aura un certain nombre de messages d'erreurs donnes par  lilo  et
  le  noyau.  Lilo vous previent qu'il pourra y avoir des problemes, qui
  n'en seront pas dans ce cas. Le noyau indique des problemes relatifs a
  /dev/hdc  qui  sont  dus  a  des  tests sur des peripheriques que lilo
  effectue pour essayer de decouvrir certaines choses.  Lilo  essaie  de
  fabriquer un noeud de peripherique pour le vieux code majeur/mineur de
  hdc et le noyau reconnait la tentative comme une erreur.  Vous  pouvez
  ignorer  ces  messages.  Regardez  la LED du lecteur Jaz pour verifier
  qu'on ecrit dessus.

  A ce point, votre disque Jaz devrait etre demarrable.

  77..  OObbtteenniirr ddeess iinnffoorrmmaattiioonnss pplluuss aa jjoouurr

  Vous pouvez trouver la version la plus a jour de ce mini-HOWTO a :

       http://www.cnct.com/~bwillmot/jaztool/

  Les pages Web de Iomega sont a :

       http://www.iomega.com/

  Kerneld mini-HOWTO
  par Henrik Storner storner@osiris.ping.dk

  Version 1.7 19 juillet 1997

  (Adaptation franaise par Alexandre Devaure adevaure@mail.dotcom.fr,
  14 janvier 1999).

  ______________________________________________________________________

  Table des matires























































  1. Introduction

  2. Contributeurs

  3. Qu'est-ce que

  4. Pourquoi est-ce que je veux l'utiliser ?

  5. O puis-je trouver les outils ncessaires ?

  6. Comment le configure-t-on ?

  7. Tester kerneld

  8. Comment

     8.1 Les priphriques bloc
     8.2 Les priphriques caractres
     8.3 Les priphriques rseau
     8.4 Les formats binaires
     8.5 Les disciplines de ligne (slip, cslip et ppp)
     8.6 Les familles de protocoles rseau (IPX, AppleTalk, AX.25)
     8.7 Les systmes de fichiers

  9. Priphriques demandant une configuration spciale

     9.1 char-major-10 : souris, watchdogs, et random
     9.2 Charger les gestionnaires SCSI : l'entre
     9.3 Quand charger un module n'est pas suffisant : l'entre

  10. Espionner kerneld

  11. Utilisations spciales de kerneld

  12. Problmes courants

     12.1 Pourquoi est-ce que j'ai des messages ``Cannot locate       module for net-pf-X'' quand j'exccute
     12.2 Aprs voir lancer
     12.3 (TT
     12.4 (TT
     12.5 Le volume de ma carte son n'est pas initialis etc.
     12.6 DOSEMU a besoin de modules, comment
     12.7 Pourquoi ai-je des messages ``Ouch, kerneld time       out, message failed'' ?
     12.8 (TT
     12.9 (TT
     12.10 (TT
     12.11 J'ai tout recompil sous forme de modules et maintenant,       mon systme ne peut plus dmarrer :
     12.12 (TT
     12.13 J'ai ``Cannot load module xxx'' mais j'ai reconfigur       mon noyau sans la gestion de xxx !
     12.14 J'ai recompil mon noyau et les modules et j'ai toujours       des messages sur des symboles non rsolus au dmarrage
     12.15 J'ai install Linux 2.1 et aucun module ne se charge
     12.16 Que dire d'un rseau utilisant la ligne tlphonique ?

  13. Copyright



  ______________________________________________________________________

  11..

  IInnttrroodduuccttiioonn

  Ce document explique comment utiliser la fonction kerneld avec les
  noyaux Linux. Il dcrit :

    ce qu'est kerneld ;

    pourquoi l'utiliser ;

    comment avoir les outils ncessaires ;

    comment les configurer ;

    comment faire fonctionner kerneld avec des modules qu'il ne connat
     pas ;

    comment espionner kerneld (peut s'avrer trs utile lors de la mise
     au point) ;

    les utilisations spciales de kerneld ;

    les problmes courants et les dysfonctionnements.

  La dernire version de ce document peut tre trouve  l'adresse
  http://eolicom.olicom.dk/~storner/kerneld-mini-HOWTO.html.  Entre les
  versions du mini-HOWTO, vous pouvez trouver des mises  jour sur ma
  liste non trie des modifications 
  http://eolicom.olicom.dk/~storner/kern.html

  La dernire version franaise se trouve  l'adresse
  http://www.freenix.fr/linux/HOWTO/mini/.

  22..

  CCoonnttrriibbuutteeuurrss

  Si vous dcouvrez dans ce document des choses fausses, envoyez-moi un
  mot  ce sujet. Les personnes suivantes ont contribu  ce mini-HOWTO
  sur certains points :


    Bjorn Ekwall bjorn@blox.se

    Ben Gaillart bgalliac@luc.edu

    Cedric Tefft cedric@earthling.net

    Brian Miller bmiller@netspace.net.au

    James C. Tsiao jtsiao@madoka.jpl.nasa.gov

  J'apprcierai les encouragements et les suggestions des lecteurs de ce
  mini-HOWTO.

  33..

  QQuu''eesstt--ccee qquuee kkeerrnneelldd  ??

  kerneld est li  une fonctionnalit introduite lors du dveloppement
  des noyaux de la srie 1.3 par Bjorn Ekwall.  Il perdure avec les
  noyaux 2.0 et 2.1. Il permet aux modules du noyau (c'est--dire les
  pilotes de priphriques, de rseaux, les systmes de fichiers...)
  d'tre chargs automatiquement en fonction des besoins, sans
  utilisation manuelle des commandes modprobe ou insmod.

  Des aspects plus amusants, bien que ceux-ci ne soient pas (encore ?)
  intgrs dans le noyau standard :

    on peut configurer kerneld pour qu'il excute un programme
     utilisateur  la place de l'conomiseur d'cran, ce qui vous permet
     d'utiliser n'importe quel programme.
    dans le mme genre que l'conomiseur d'cran, vous pouvez aussi
     changer le traditionel ``beep'' en quelque chose de compltement
     diffrent...

  kerneld est compos de deux entits spares :

    gestion dans le noyau de Linux afin d'envoyer des requtes au dmon
     afin de savoir si un module doit tre utilis pour certaines tches
     ;

    un dmon au niveau utilisateur qui peut montrer quels modules
     doivent tre chargs pour accomplir la requte du noyau.

  Ces deux parties doivent fonctionner pour que  kerneld soit
  oprationnel. Le fait qu'une des deux soit initialise ne suffit pas.

  44..

  PPoouurrqquuooii eesstt--ccee qquuee jjee vveeuuxx ll''uuttiilliisseerr ??

  Il y a de bonnes raisons pour utiliser kerneld. Voici les miennes.
  D'autres peuvent l'utiliser pour d'autres raisons.

    Si vous devez construire des noyaux pour de nombreux systmes qui
     diffrent peu (par exemple, une marque diffrente de carte rseau),
     alors vous pouvez construire un seul noyau et des modules,  la
     place d'avoir  construire un noyau par systme.

    Les modules sont plus faciles  tester pour les dveloppeurs : il
     ne faut pas relancer le systme pour charger et enlever le pilote.
     Ceci s'applique pour tous les modules et non juste pour ceux qui
     sont monts par kerneld.

    Il rduit l'usage de la mmoire du noyau, ce qui donne plus de
     mmoire pour les applications. La mmoire utilise par le noyau
     n'est jamais ``swappe'' sur disque, donc si vous avez 100Ko de
     pilotes non utiliss compils dans le noyau, ils occasionnent
     simplement une perte de RAM.

    Certaines choses que j'utilise, le pilote ftape, par exemple ou
     iBCS, ne sont valables que sous forme de modules. Mais je ne veux
     pas m'embter avec leur chargement et leur dchargement  chaque
     fois que j'en ai besoin.

    Les personnes qui font des distributions Linux ne veulent pas
     construire 284 images de boot diffrentes, chaque utilisateur
     charge les pilotes dont il a besoin pour sa configuration. C'est la
     mthode retenue par la RedHat 4.0 dans son installation.

  Bien sr, il y a aussi des raisons pour que vous ne vouliez pas
  l'utiliser : vous prfreriez avoir juste un fichier image de votre
  noyau avec tous vos pilotes  l'intrieur. Dans ce cas, vous lisez le
  mauvais document.

  55..

  OO ppuuiiss--jjee ttrroouuvveerr lleess oouuttiillss nncceessssaaiirreess ??

  Le support dans le noyau de Linux a t introduit avec Linux 1.3.57.
  Si vous avez une version plus ancienne, vous devrez la mettre  jour
  si vous voulez qu'il supporte kerneld. Tous les sites ftp majeurs de
  Linux offrent les sources du noyau. Je recommande que vous le mettiez
   jour avec la dernire version 2.0 (actuellement la 2.0.36) :

    ftp://sunsite.unc.edu/pub/Linux/kernel/v2.0/linux-2.0.36.tar.gz

    ftp://tsx-11.mit.edu/pub/linux/sources/system/v2.0/linux-2.0.36.tar.gz

    ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/v2.0/linux-2.0.36.tar.gz

  Pour les utilisateurs franais, il vaut mieux utiliser le miroir
  francais
  ftp://ftp.lip6.fr/pub2/linux/kernel/sources/v2.0/linux-2.0.36.tar.gz

  Le dmon en mode utilisateur a t introduit avec le paquetage
  modules-1.2.8 et avec le nouveau paquetage modules-2.0. Ils sont
  normalement trouvables  la mme place que les sources des noyaux mais
  les sites officiels sont :

    ftp://sunsite.unc.edu/pub/Linux/kernel/v2.0/modules-2.0.0.tar.gz

    ftp://tsx-11.mit.edu/pub/linux/sources/sbin/modules-2.0.0.tar.gz

    ftp://ftp.funet.fi/pub/Linux/tools/modules-2.0.0.tar.gz

  Pour les utilisateurs franais :
  ftp://ftp.lip6.fr/pub2/linux/kernel/sources/v2.0/modules-2.0.0.tar.gz

  AVERTISSEMENT : si vous voulez essayer de charger des modules avec les
  derniers noyaux 2.1 (dveloppement), vous devrez utiliser le dernier
  paquetage modutils- (PAS modules-).  Mais regardez plus bas au sujet
  des problmes avec les modules et les noyaux 2.1.

  66..

  CCoommmmeenntt llee ccoonnffiigguurree--tt--oonn ??

  D'abord, ayez les parties ncessaires : un noyau et les derniers
  modules-utilities. Ensuite, vous devez installer les modules-
  utilities. C'est trs simple : il faut juste dsempaqueter les sources
  et lancer make install. Ceci compile et installe les programmes
  suivants dans /sbin : genkym, insmod, lsmod, modprobe, depmod,
  kerneld. Je recommande que vous ajoutiez quelques lignes dans les
  scripts de dmarrage pour faire les initialisations ncessaires lors
  du dmarrage de Linux. Ajoutez les lignes suivantes  votre fichier
  /etc/rc/rc.d/rc.sysinit (si vous utilisez la Slackware) ou 
  /etc/rc.d/rc.sysinit (si vous utilisez SysVinit, c'est--dire les
  distributions Debian, RedHat, Caldera) :

        # Demarrer kerneld - ceci doit arriver tres tot dans le
        # processus de demarrage, certainement AVANT que vous lanciez
        # fsck sur les systmes de fichiers qui ont besoins que les
        # pilotes de disque soient chargs automatiquement
        if [ -x /sbin/kerneld ]
        then
            /sbin/kerneld
        fi

        # Vos commandes fsck fonctionnent ici
        # et votre command mount monte le systme de fichiers racine
        # en lecture seule.

        # Mettez  jour le fichier de dpendance des modules du noyau
        # Votre systme de fichier racine doit tre mont en
        # lecture-criture  partir de maintenant
        if [ -x /sbin/depmod ]
        then
            /sbin/depmod -a
        fi



  La premire partie lance kerneld lui-mme.

  La second appelle depmod -a au dmarrage. Le programme depmod
  construit une liste de tous les modules disponibles et analyse leurs
  inter dpendances. Donc il sait si un module a besoin qu'un autre soit
  charg avant lui.

  NOTE : Les versions rcentes de kerneld ont une option pour utiliser
  la librairie GNU dbm : libgdbm. Si vous l'activez quand vous
  construisez les modules-utilities, kerneld ne se lancera pas si
  lidgdbm n'est pas disponible, ce qui pourrait tre le cas si vous avez
  /usr sur une partition spare et que vous lanciez kerneldavant que
  /usr ne soit monte. La solution recommande est de dplacer libgdm de
  /usr/lib vers /lib ou de faire un lien statique de kerneld.

  Ensuite, dfates les sources du noyau, configurez et construisez un
  noyau  votre convenance. Si vous ne l'avez jamais fait avant, vous
  devriez lire le fichire README  la racine des sources du noyau. Quand
  vous lancez make config pour configurer le noyau, vous devrez faire
  attention  des questions qui apparaissent au dbut :

        Enable loadable module support (CONFIG_MODULES) [Y/n/?] Y



  Vous devez slectioner la gestion des modules chargeables, sinon, il
  n'y aura pas de modules  charger pour kerneld.  Rpondez seulement
  oui (Y).

        Kernel daemon support (CONFIG_KERNELD) [Y/n/?] Y



  Ceci est aussi ncessaire. Ensuite, de nombreuses choses peuvent tre
  mises sous forme de modules. Vous verrez des questions du genre :

        Normal floppy disk support (CONFIG_BLK_DEV_FD) [M/n/y/?]



  o vous pouvez rpondre M pour Module. Gnralement, seuls les pilotes
  ncessaires lors du dmarrage de votre systme (le pilote du disque
  dur, le pilote du systme de fichiers racine) doivent tre mis dans le
  noyau ; le reste pouvant tre construit sous forme de modules.

  Quand vous avez fini avec make config, lancez make dep, make clean,
  make zImage ou make modules, make modules et make modules_install.

  Ouf !

  La commande make zImage cre la nouvelle image du noyau dans le
  fichier arch/i386/boot/zImage. Vous devrez le copier o vous mettez
  votre image de boot. N'oubliez pas de relancer LILO.

  Pour plus d'informations sur la configuration, la construction et
  l'installation de votre propre noyau, regardez le Kerneld-HOWTO post
  rgulirement au comp.os.linux.answers et disponible sur le site
  sunsite.unc.edu  /pub/Linux/docs/HOWTO. La version franaise est
  disponible  www.freenix.fr/linux

  77..

  TTeesstteerr kkeerrnneelldd

  Maintenant, relancez le systme avec le nouveau noyau. Quand le
  systme est prt, vous pouvez excuter un ps ax et vous devriez voir
  une ligne pour kerneld :

        PID TTY STAT  TIME COMMAND
        59  ?  S     0:01 /sbin/kerneld




  Une des choses intressantes de kerneld est qu'une fois le noyau et le
  dmon installs, seule une trs petite initialisation est ncessaire.
  Pour commencer, essayez d'utiliser un des pilotes que vous avez
  construit comme module. J'ai construit le pilote de disquette comme
  module, donc je peux mettre une disquette DOS dans le lecteur et :

        osiris:~ $ mdir a:
          Volume in drive A has no label
          Volume Serial Number is 2E2B-1102
          Directory for A:/

          binuti~1 gz       1942 02-14-1996  11:35a binutils-2.6.0.6-2.6.0.7.diff.gz
          libc-5~1 gz      24747 02-14-1996  11:35a libc-5.3.4-5.3.5.diff.gz
                  2 file(s)        26689 bytes



  le pilote de disquette fonctionne : il a t charg automatiquement
  par kerneld quand j'ai voulu utiliser la disquette.

  Pour voir que le module floppy est en effet charg, vous pouvez lancer
  /sbin/lsmod qui listera tous les modules chargs  l'instant :

        osiris:~ $ /sbin/lsmod
        Module:        #pages:  Used by:
        floppy            11    0 (autoclean)



  Le mot ``autoclean'' signifie que le module sera automatiquement
  enlev par kerneld quand il n'aura pas t utilis pendant plus d'une
  minute. Les 11 pages de mmoire (soit 44ko, une page faisant 4ko)
  seront donc seulement utilises quand j'accderai au lecteur de dis
  quette ; si je n'utilise pas la disquette pendant plus d'une minute,
  elles seront libres. Trs intressant si vous tes  court de
  mmoire pour vos applications !

  88..

  CCoommmmeenntt kkeerrnneelldd  ssaaiitt--iill qquueell mmoodduullee cchhaarrggeerr ??

  Bien que kerneld connaisse dj les types les plus communs de modules,
  il y a des situations dans lesquelles kerneld ne sera pas comment
  satisfaire une requte venant du noyau. C'est le cas avec les pilotes
  de CD-ROM ou de cartes rseau, o il existe plus d'un module possible
  susceptible d'tre charg.

  Les requtes que le dmon de kerneld reoit du noyau viennent d'un des
  lments suivants :

    un pilote de priphrique bloc ;

    un pilote de priphrique caractre ;

    un format binaire ;

    une discipline de ligne tty ;

    un systme de fichier ;

    un priphrique rseau ;

    un service rseau (par exemple rarp) ;

    un protocole rseau (par exemple IPX).

  kerneld dtermine quel module doit tre charg regardant le fichier de
  configuration /etc/conf.modules. Il y a deux types d'entre dans ce
  fichier : les chemins (o les fichiers des modules sont stocks) et
  les alias (quel module doit tre charg). Si vous n'avez pas dj ce
  fichier, vous devrez le crer en lanant /sbin/modprobe -c | grep -v
  '^path' > /etc/conf.modules

  Si vous voulez ajouter encore une autre directive ``path'' aux chemins
  par dfaut, vous devez inclure aussi tous les chemins par dfaut tant
  donn qu'une directive path dans /etc/conf.modules remplacera toutes
  celles que modprobe connat par dfaut.

  Normalement, vous ne voudrez pas ajouter de path par vous-mme tant
  donn que l'ensemble des chemins par dfaut prend en compte toutes les
  configurations normales, je vous le promets !

  D'un autre ct, si vous voulez juste ajouter un alias ou une
  directive d'option, vos nouvelles entres dans /etc/conf.modules
  seront ajoutes  celles que modprobe connat dj. Si vous deviez
  redfinir un alias ou une option, vos nouvelles entres dans
  /etc/conf.modules remplaceront celles dj prsentes.

  88..11..

  LLeess pprriipphhrriiqquueess bblloocc

  Si vous lancez /sbin/modprobe -c, vous aurez la liste des modules
  connus par  kerneld et  quelles requtes ils correspondent. Par
  exemple, la requte qui termine le chargement du gestionnaire de
  disquettes correspond au priphrique bloc dont le numro majeur est 2
  :

        osiris:~ $ /sbin/modprobe -c | grep floppy
        alias block-major-2 floppy




  Pourquoi block-major-2 ? Parce que les lecteurs de disquettes /dev/fd*
  utilisent un numro majeur gal  2 et sont de type bloc :

        osiris:~ $ ls -l /dev/fd0 /dev/fd1
        brw-rw-rw-   1 root     root       2,   0 Mar  3  1995 /dev/fd0
        brw-r--r--   1 root     root       2,   1 Mar  3  1995 /dev/fd1




  88..22..

  LLeess pprriipphhrriiqquueess ccaarraaccttrreess

  Les priphriques de type caractre sont utiliss de la mme manire.
  Par exemple, le lecteur de bande correspond au numro majeur 27 :




        osiris:~ $ ls -lL /dev/ftape
        crw-rw----   1 root     disk      27,   0 Jul 18  1994 /dev/ftape




  Toutefois, kerneld ne le connat pas par dfaut : il n'est pas list
  dans le rsultat de /sbin/modprobe -c.

  Donc, pour configurer kerneld de manire  charger le gestionnaire
  ftape, je dois ajouter une ligne au fichier de configuration
  /etc/conf.modules :

        alias char-major-27 ftape




  88..33..

  LLeess pprriipphhrriiqquueess rrsseeaauu

  Vous pouvez aussi utiliser le nom du priphrique  la place de char-
  major-xxx ou block-major-yyy. Ceci est particulirement utilis pour
  les gestionnaires rseaux. Par exemple, un pilote pour une carte
  rseau ne2000 utilise comme eth0 pourrait tre charg avec :

        alias eth0 ne




  Si vous devez passer des options au gestionnaire (comme de dire au
  module quelle IRQ la carte rseau utilise), vous ajoutez une ligne
  options :

        options ne irq=5




  Ainsi kerneld lancera le gestionnaire NE2000 avec la commande :

        /sbin/modprobe ne irq=5




  Bien sr, les options disponibles sont spcifiques aux modules que
  vous chargez.

  88..44..

  LLeess ffoorrmmaattss bbiinnaaiirreess

  Les formats binaires sont grs de la mme faon. A chaque fois que
  vous essayez de lancer un programme que le noyau ne sait pas comment
  excuter, kerneld lance une requte pour binfmt-xxx, ou xxx est le
  nombre dtermin  partir des tous premiers octets de l'excutable.
  Donc la configuration de kerneld pour la gestion du chargement du
  module binfmt_aout pour les excutable ZMAGIC (a.out) est :

        alias binfmt-267 binfmt_aout



  vu que le nombre magique pour les fichiers ZMAGIC est 267 (voir
  /etc/magic). Si vous regardez /etc/magic, vous verrez le nombre 0413,
  ceci parce que ce fichier utilise des nombres octaux alors que kerneld
  utilise des dcimaux ( 413 en octal correspond  267 en dcimal ). Il
  y a en ralit trois variantes des excutables a.out peu diffrentes
  (NMAGIC, QMAGIC et ZMAGIC).  Pour un support total du format a.out,
  vous devez avoir :

        alias binfmt-264 binfmt_aout  # pure executable (NMAGIC)
        alias binfmt-267 binfmt_aout  # demand-paged executable (ZMAGIC)
        alias binfmt-204 binfmt_aout  # demand-paged executable (QMAGIC)




  Les formats binaires a.out, Jave et iBCS sont reconnus automatiquement
  par kerneld sans la moindre configuration.

  88..55..

  LLeess ddiisscciipplliinneess ddee lliiggnnee ((sslliipp,, ccsslliipp eett pppppp))

  Les disciplines de lignes sont demandes avec _t_y_y_-_l_d_i_s_c_-_x o _x est
  gnralement 1 (pour SLIP) ou 3 (pour PPP). Ces deux sont reconnus
  automatiquement par kerneld.

  Concernant PPP, si vous voulez que kerneld charge le module de
  compression de donnes pour PPP bsd_comp, vous devez ajouter les deux
  lignes suivantes au fichier /etc/conf.modules :

        alias tty-ldisc-3 bsd_comp
        alias ppp0 bsd_comp




  88..66..

  LLeess ffaammiilllleess ddee pprroottooccoolleess rrsseeaauu ((IIPPXX,, AApppplleeTTaallkk,, AAXX..2255))

  Certains protocoles rseau peuvent tre aussi chargs sous la forme de
  modules. Le noyau demande  kerneld une famille de protocole (par
  exemple IPX) avec une requte pour _n_e_t_-_p_f_-_X o _X est un nombre
  indiquant la famille voulue. Par exemple, _n_e_t_p_f_-_3 correspond  AX.25,
  _n_e_t_-_p_f_-_4  IPX et _n_e_t_-_p_f_-_5  AppleTalk.  (Ces nombres sont dtermins
  par les macros AF_AX25, AF_IPX etc., que l'on trouve dans le fichier
  source include/linux/socket.h. Donc, pour charger automatiquement le
  module IPX, vous devrez ajouter une entre dans /etc/conf.modules :

        alias net-pf-4 ipx




  Consultez galement la section traitant des problmes courants pour
  viter des messages d'avertissment lors de l'amorage relatifs  des
  familles de protocoles indfinies.

  88..77..

  LLeess ssyyssttmmeess ddee ffiicchhiieerrss

  Les requtes soumises  kerneld pour les systmes de fichiers sont
  simplement constitues par le type du systme de fichiers. Un usage
  courant est de charger le module _i_s_o_f_s pour les systmes de fichiers
  des CD-ROM, c'est--dire les systmes de fichiers de type _i_s_o_9_6_6_0 :
        alias iso9660 isofs




  99..

  PPrriipphhrriiqquueess ddeemmaannddaanntt uunnee ccoonnffiigguurraattiioonn ssppcciiaallee

  Certains priphriques demandent un peu plus de configuration que le
  simple alias d'un priphrique et d'un module.

    les priphriques de type caractre de numro majeur 10 : divers
     priphriques ;

    les priphriques SCSI :

    les priphriques qui demandent une initialisation spciale.

  99..11..

  cchhaarr--mmaajjoorr--1100 :: ssoouurriiss,, wwaattcchhddooggss,, eett rraannddoomm

  Les priphriques sont habituellement identifis par leur nombre
  majeur, par exemple 27 pour ftape. Toutefois, si vous regardez les
  entres de /dev pour le nombre majeur 10, vous verrez un certain
  nombre de priphriques trs diffrents. Parmi ceux-ci :

    des souris de toutes sortes (souris bus, PS/2,...) ;

    les chiens de garde (watchdog) ;

    le priphrique noyau _r_a_n_d_o_m ;

    l'interface APM (Advanced Power Management).

  De faon vidente, ces priphriques sont contrls par diffrents
  modules et non un seul. Pour cela, kerneld utilise le nombre majeur et
  le nombre mineur :

        alias char-major-10-1 psaux     # For PS/2 mouse
        alias char-major-10-130 wdt     # For WDT watchdog




  Vous avez besoin d'un version du noyau 1.3.82 ou suprieure pour
  l'utiliser. Les versions plus anciennes ne passaient pas le nombre
  mineur  kerneld, ce qui ne permettait pas  kerneld de savoir quel
  module il fallait charger.

  99..22..  ssccssii__hhoossttaaddaapptteerr

  CChhaarrggeerr lleess ggeessttiioonnnnaaiirreess SSCCSSII :: ll''eennttrree

  Les gestionnaires de priphriques SCSI sont constitus d'un
  adaptateur pour la carte SCSI (par exemple pour une Adaptec 1542) et
  d'un gestionnaire pour le type de priphrique SCSI que vous utilisez,
  comme un disque dur, un lecteur de CD-ROM ou un lecteur de cartouche.
  Tous peuvent tre chargs sous forme de modules. Cependant, lorsque
  vous voulez accder  un lecteur de CD-ROM connect  une carte
  Adaptec, le noyau et kerneld savent seulement qu'il faut charger le
  module _s_r___m_o_d pour grer le CD-ROM SCSI, mais ils ignorent  quel
  contrleur SCSI il est connect, donc quel module charger pour grer
  le contrleur SCSI.

  Pour rsoudre cela, vous pouvez ajouter une entre pour le module du
  contrleur SCSI au fichier /etc/conf.modules qui indiquera  kerneld
  quel module charger parmi toutes les possibilits :

        alias scd0 sr_mod               # sr_mod pour SCSI CD-ROM's ...
        alias scsi_hostadapter aha1542  # ... doit utiliser le pilote
                                        # Adaptec 1542




  Cela ne fonctionne que pour un noyau de version 1.3.82 ou suprieure.

  Cela marche si vous n'avez qu'une carte SCSI, sinon, c'est un peu plus
  difficile. En gnral, vous ne pouvez pas avoir kerneld qui charge le
  pilote d'une carte SCSI si le gestionnaire d'un autre contrleur est
  dj install. Vous devez soit construire un noyau avec les deux
  gestionnaires (ils ne sont plus sous forme de modules) soit les
  charger manuellement.

  Il y a une possibilit pour que kerneldcharge plusieurs gestionnaires
  SCSI. James Tsiao a eu cette ide : vous pouvez avoir kerneld qui
  charge le second controleur SCSI en mettant la dpendance dans le
  fichier modules.dep  la main. Vous avez juste besoin d'une entre
  comme :

        /lib/modules/2.0.30/scsi/st.o: /lib/modules/2.0.30/scsi/aha1542.o



  Pour que kerneldcharge le module _a_h_a_1_5_4_2_._o avant qu'il charge _s_t_._o. Ma
  machine  la maison est configure exactement comme au-dessus et fonc
  tionne trs bien pour tous les priphrique de mon second contrleur
  SCSI, incluant lecteurs de cartouche, CD-ROM et des priphriques SCSI
  gnriques. L'inconvniant est que depmod -a ne peut pas dtecter ces
  dpendances. Donc, l'utilisateur doit les ajouter  la main et ne pas
  lancer depmod -a au dmarrage. Une fois configur, kerneld chargera
  automatiquement _a_h_a_1_5_4_2_._o comme il faut.

  Vous devez tre conscient que cette technique ne marche que si vous
  avez diffrents types de priphriques sur deux contrleurs. Par
  exemple les disques durs sur un contrleur et les lecteurs de CD-ROM,
  de cartouches et les priphriques gnriques sur l'autres.

  99..33..  ppoosstt--iinnssttaallll

  QQuuaanndd cchhaarrggeerr uunn mmoodduullee nn''eesstt ppaass ssuuffffiissaanntt :: ll''eennttrree

  Parfois, charger un module n'est pas suffisant pour qu'il fonctionne
  correctement. Par exemple, si vous avez compil le pilote de votre
  carte son en tant que module, il est souvent pratique de le rgler
  pour un certain volume sonore. Le seul problme, c'est que cette
  initialisation disparat lors du chargement suivant du module. Voici
  un truc de Ben Galliart bgailla@luc.edu :

  Il faut installer le paquetage setmix-0.1
  (ftp://sunsite.unc.edu/pub/Linux/apps/sound/mixers/setmix-0.1.tar.gz)

  et ensuite ajouter les lignes suivantes au fichier /etc/conf.modules :

        post-install sound /usr/local/bin/setmix -f /etc/volume.conf



  Ainsi kerneld excute la commande indique par l'entre post-install
  sound aprs que le module son ait t charg. Donc, le module son est
  configur par la commande /usr/local/bin/setmix -f /etc/volume.conf.

  Cela peut s'avrer trs utile pour d'autres modules, par exemple le
  module _l_p peut tre configur par le programme tunelp en ajoutant :

        post-install lp tunelp <options>



  Pour que kerneldreconnaisse ces options, vous devez avoir une version
  1.3.69 de kerneld ou suprieure.

  Note : une version prcdente de ce mini-HOWTO mentionne une option
  pre-remove qui peut tre utilise pour exccuter une commande juste
  avant que kerneld ne dcharge un module. Toutefois, cela n'a jamais
  march et son utilisation est dconseille. Heureusement, cette
  options disparaitra dans une future version de kerneld. L'ensemble des
  oprations d'initialisation des modules est en cours de modification
  en ce moment, et peut diffrer sur votre systme au moment o vous
  lirez ceci.

  1100..

  EEssppiioonnnneerr kkeerrnneelldd

  Si vous avez tout essay et que vous ne comprenez pas ce que le noyau
  demande  kerneld, il y a une solution pour voir les requtes que
  reoit kerneld et par consquent comprendre ce qu'il faut mettre dans
  /etc/conf.modules.  Pour cela, il faut utiliser l'utilitaire kdstat.

  Ce petit programme est livr avec le paquetage modules, mais il n'est
  ni compil, ni install par dfaut. Pour le compiler :

        cd /usr/src/modules-2.0.0/kerneld
        make kdstat




  Ensuite, pour que kerneld affiche les informations sur ce qu'il est en
  train de faire, il faut lancer :

        kdstat debug



  et kerneld commencera  envoyer des messages  la console sur son
  activit. Si vous essayez de lancer la commande que vous voulez
  utiliser, vous verrez les requtes adresses  kerneld. Elles peuvent
  tre copies dans le fichier /etc/conf.modules et mises en alias du
  module demand pour raliser la tche.

  Pour arrter le debuggage, lancez :

        /sbin/kdstat nodebug




  1111..

  UUttiilliissaattiioonnss ssppcciiaalleess ddee kkeerrnneelldd

  Je savais bien que vous me demanderiez comment configurer le module
  d'conomiseur d'cran...

  Le rpertoire kerneld/GOODIES dans le paquetage modules a un certain
  nombre de patches noyau pour la gestion de l'conomiseur d'cran ainsi
  que le beep de la console par kerneld. Ils ne font pas partie du noyau
  officiel. Vous devrez donc installer les patches noyau et le
  recompiler.

  Pour installer un patch, utilisez la commande ``patch'' :

        cd /usr/src/linux
        patch -s -p1 </usr/src/modules-2.0.0/kerneld/GOODIES/blanker_patch



  Ensuite recompilez et installez le nouveau noyau.

  Quand il sera temps de lancer l'conomiseur d'cran, kerneld excutera
  la commande /sbin/screenblanker (il peut s'agir d'un script shell qui
  lance votre conomiseur d'cran favorixt.

  Quand le noyau veut l'arrter, il envoie un signal SIGQUIT au
  processus excutant /sbin/screenblanker. Votre script shell ou
  conomiseur d'cran doit le capter et se terminer. Pensez  restaurer
  l'cran dans le mode texte initial !

  1122..

  PPrroobbllmmeess ccoouurraannttss

  1122..11..  mmoodduullee ffoorr nneett--ppff--XX'''' qquuaanndd jj''eexxccccuuttee iiffccoonnffiigg  ??

  PPoouurrqquuooii eesstt--ccee qquuee jj''aaii ddeess mmeessssaaggeess ````CCaannnnoott llooccaattee

  Le code du noyau a t modifi pour permettre le chargement des
  familles de protocoles rseau (comme IPX, AX25 et AppelTalk) comme
  modules vers la version 1.3.80. Cela a eu pour effet d'ajouter une
  nouvelle requte pour kerneld, _n_e_t_-_p_f_-_X, o _X est un nombre
  identifiant le protocole (voir le fichier
  /usr/src/linux/include/linux/socket.h pour la signification de ces
  nombres).

  Malheureusement, ifconfig envoie ces messages, donc un bon nombre de
  personnes recoivent ces messages lors le systme se lance et qu'il
  excute ifconfig pour initialiser le priphrique loopback. Ces
  messages sont sans danger et vous pouvez les retirer en ajoutant les
  lignes suivantes :

        alias net-pf-3 off  # oubliez AX.25
        alias net-pf-4 off  # oubliez IPX
        aliad net-pf-5 off  # oubliez AppleTalk



  au fichier /etc/conf.modules. Biensr, si vous utilisez IPX comme mod
  ule, n'ajoutez pas la ligne qui retire IPX.

  1122..22..  qquuaanndd jj''aaccttiivvee mmaa ccoonnnneexxiioonn PPPPPP

  AApprrss vvooiirr llaanncceerr kkeerrnneelldd ,, mmoonn ssyyssttmmee rraalleennttiitt

  Il y a bon nombre de messages  ce sujet. Il semble qu'il y ait une
  malheureuse interaction entre kerneld et le script tkPPP qui est
  utilis sur certains systmes pour configurer et surveiller la
  connexion PPP. Le script excute apparemment des boucles quand il
  lance ifconfig.  Celui-ci dclenche kerneld pour rechercher les
  modules _n_e_t_-_p_f_-_X (voir ci-dessous), ce qui provoque une surcharge du
  systme et l'envoi possible de messages ``Cannot locate module for
  net-pf-X''. Il n'y a pas d'autres solutions que de ne pas utiliser
  tkPPP ou de changer sa faon de surveiller la connexion.

  1122..33..

  kkeerrnneelldd nnee cchhaarrggee ppaass mmoonn ggeessttiioonnnnaaiirree SSCCSSII

  Ajoutez une entre pour la carte SCSI au fichier /etc/conf.modules.
  Regardez la description de l'entre scsi_hostadapter plus haut.

  1122..44..  nn''eesstt ppaass ddffiinnii

  mmooddpprroobbee  ssee ppllaaiinntt qquuee ggcccc22__ccoommppiilleedd

  Ceci est une erreur dans module-utilities qui ne se voit qu'avec
  binutils 2.6.0.9 ou suprieur et elle est aussi documente dans les
  notes de mises  jour du paquetage binutils. Lisez-le donc ou mettez 
  jour le paquetage des modules par un qui corrige ce problme, par
  exemple le modules-2.0.0.

  1122..55..

  LLee vvoolluummee ddee mmaa ccaarrttee ssoonn nn''eesstt ppaass iinniittiiaalliiss eettcc..

  Les options de configuration d'un modules sont stockes dans le module
  lui-mme quand il est charg. Donc, quand kerneld dcharge un module,
  la configuration que vous aviez faite est perdue et la prochaine fois
  que le module sera charg, il hritera de la configuration par dfaut.

  Vous pouvez indiquer  kerneld de configurer un module en excutant un
  programme aprs son chargement automatique. Voir la section sur
  l'entre post-install.

  1122..66..  ppeeuutt--iill lleess cchhaarrggeerr ??

  DDOOSSEEMMUU aa bbeessooiinn ddee mmoodduulleess,, ccoommmmeenntt kkeerrnneelldd

  Vous ne pouvez pas. Aucune des versions de dosemu (officielles ou de
  dveloppement) ne grent le chargement des modules  travers kerneld.
  Cependant, if vous avez un noyau 2.0.26 ou suprieur, vous n'avez pas
  besoin de modules dosemu particuliers. Installez juste dosemu 0.66.1.

  1122..77..  oouutt,, mmeessssaaggee ffaaiilleedd'''' ??

  PPoouurrqquuooii aaii--jjee ddeess mmeessssaaggeess ````OOuucchh,, kkeerrnneelldd ttiimmee

  Quand le noyau envoit une requte  kerneld, il s'attend  recevoir un
  acquittement dans un dlai d'une seconde. Si kerneld n'envoie pas cet
  acquittement, ce message est diffus. La requte est retransmise et
  peut ventuellement russir

  Cela arrive couramment sur des systmes lourdement chargs.  kerneld
  tant un processus en mode utilisateur, il est ordonnanc comme tout
  processus du systme. Sous de fortes charges, il peut ne pas
  s'excuter pour envoyer l'acquittement avant l'expiration du dlai.

  Si cela se produit quand la charge est faible, essayez de redmarrer
  kerneld. Tuez le processus kerneld et redmarrez-le avec la commande
  /usr/sbin/kerneld. Si le problme persiste, vous devrez envoyer un
  message d'erreur  linux-kernel@vger.rutgers.edu mais, ss''iill vvoouuss ppllaatt
  soyez sr que votre version du noyau et de kerneld soient  jour avant
  d'envoyer un message sur ce problme.




  1122..88..  llee mmoodduullee dduu ssyyssttmmee ddee ffiicchhiieerr

  mmoouunntt  nn''aatttteenndd ppaass qquuee kkeerrnneelldd  cchhaarrggee

  Il existe un certain nombre de messages sur le fait que la commande
  mount(8) n'attende pas que kerneld ait charg le module du systme de
  fichiers. lsmod montre que kerneld a charg le module et si vous
  rptez la commande mount immdiatement, le montage sera russi. Cela
  semble tre une erreur dans le paquetage modules version 1.3.69f qui
  affecte des utilisateurs de Debian (elle peut tre corrige en
  installant la dernire version de ce paquetage).

  1122..99..  nnccppffss

  kkeerrnneelldd  nn''aarrrriivvee ppaass  cchhaarrggeerr llee mmoodduullee

  Vous devez compiler les utilitaires ncpfs avec l'option
  -DHAVE_KERNELD. Voir le fichier Makefile de ncpfs.

  1122..1100..  ssmmbbffss

  kkeerrnneelldd  nn''aarrrriivvee ppaass  cchhaarrggeerr llee mmoodduullee

  Vous utilisez une vieille version des utilitaires smbmount. Prenez la
  dernire version (0.10 ou suprieure) 
  ftp://tsx-11.mit.edu/pub/linux/filesystems/smbfs/.

  1122..1111..  mmoonn ssyyssttmmee nnee ppeeuutt pplluuss ddmmaarrrreerr :: kkeerrnneelldd  nn''aarrrriivvee ppaass 
  cchhaarrggeerr llee mmoodduullee dduu ssyyssttmmee ddee ffiicchhiieerr rraacciinnee..

  JJ''aaii ttoouutt rreeccoommppiill ssoouuss ffoorrmmee ddee mmoodduulleess eett mmaaiinntteennaanntt,,

  Vous ne pouvez pas ttoouutt mettre sous forme de modules : le noyau doit
  avoir assez de gestionnaires pour monter votre systme de fichiers
  racine et excuter les programmes ncessaires au dmarrage de kerneld.
  Donc vous ne pouvez pas mettre sous forme de modules :

    le gestionnaire de votre disque dur o rside votre systme de
     fichiers racine ;

    le gestionnaire du systme de fichiers racine ;

    le chargeur du format de binaire pour init, kerneld et d'autres
     prgrammes.

  En fait ce n'est pas vrai. Les dernires version 1.3.x et toutes les
  2.x du noyau, supportent l'utilisation d'un disque ram qui est charg
  par lilo ou loadlin et il est possible de charger des modules de ce
  ``disque'' trs tt dans le processus de dmarrage. La marche  suivre
  est dcrite dans le fichier Documentation/initrd.txt dans
  l'arborescence des sources du noyau.

  1122..1122..  mmaacchhiinnee :: iill vveeuutt lliibbggddbbmm

  kkeerrnneelldd nnee ssee llaannccee ppaass lloorrss ddee ll''aammoorraaggee ddee llaa

  Les nouvelles versions de kerneld ont besoin de la librairie GNU dbm,
  _l_i_b_g_d_b_m_._s_o pour fonctionner. La plupart des installations ont ce
  fichier dans /usr/lib mais vous avez probablement lanc kerneld avant
  que le systme de fichiers de /usr ne soit mont. Un des symptomes de
  ceci est que kerneld ne marche pas lors du dmarrage du systme et de
  l'excution des script rc, mais fonctionne parfaitement si vous le
  lancez  la main aprs. La solution est soit de dplacer le lancement
  de kerneld aprs que /usr ne soit mont, soit de mettre la librairie
  _g_d_b_m dans le systme de fichiers racine (par exemple dans /lib).

  1122..1133..  mmoonn nnooyyaauu ssaannss llaa ggeessttiioonn ddee xxxxxx !!

  JJ''aaii ````CCaannnnoott llooaadd mmoodduullee xxxxxx'''' mmaaiiss jj''aaii rreeccoonnffiigguurr

  L'installation de la Slackware (et peut-tre d'autres) cre un fichier
  /etc/rc.d/rc.modules par dfaut qui fait un modprobe explicite sur une
  grande varit de modules.  Quels modules exactement sont
  ``modprobs'' ?, cela dpend de la configuration initiale du noyau.
  Vous avez probablement reconfigur votre noyau pour enlever un ou
  plusieurs modules qui est modprob dans rc.modules, d'o les messages
  d'erreur. Mettez  jour votre fichier rc.modules en commentant tout
  module que vous n'utilisez plus, ou enlevez entirement ce fichier et
  laissez kerneld charger les modules quand on en a besoin.

  1122..1144..  ddeess mmeessssaaggeess ssuurr ddeess ssyymmbboolleess nnoonn rrssoolluuss aauu ddmmaarrrraaggee

  JJ''aaii rreeccoommppiill mmoonn nnooyyaauu eett lleess mmoodduulleess eett jj''aaii ttoouujjoouurrss

  Vous avez probablement reconfigur et recompil votre noyau et exclu
  des modules. Vous avez d'anciens modules que vous n'utilisez pas dans
  le rpertoire /lib/modules.  La solution la plus simple est d'effacer
  le rpertoire /lib/modules/x.y.z et de retaper make modules_install
  depuis le rpertoire des sources du noyau.  Notez que ce problme
  arrive seulement quand vous reconfigurez le noyau sans changer de
  version. Si vous voyez cette erreur quand vous passer  une nouvelle
  version du noyau, vous avez un autre problme.

  1122..1155..

  JJ''aaii iinnssttaallll LLiinnuuxx 22..11 eett aauuccuunn mmoodduullee nnee ssee cchhaarrggee

  Linux 2.1 est un noyau de dveloppement. Pour cette raison, il se peut
  que certaines choses ne fonctionnent pas de temps en temps.  La faon
  dont les modules sont manipuls a chang de faon significative.
  Richard Henderson a la charge du dveloppement du noyau des modules.

  En bref, si vous voulez utiliser les modules avec un noyau 2.1, vous
  devez :

    lire le fichier Documentation/Changes et voir quels paquetages
     doivent tre mis  jour sur votre systme ;

    utiliser le dernier paquetage modutils, disponible sur
     ftp://ftp.redhat.com/pub/alphabits/ ou sur le site mirroir
     ftp://tsx-11.mit.edu/pub/linux/packages/alphabits/

  Je recommande le noyau 2.1.29, si vous voulez utiliser les modules
  avec un noyau 2.1.

  1122..1166..

  QQuuee ddiirree dd''uunn rrsseeaauu uuttiilliissaanntt llaa lliiggnnee ttllpphhoonniiqquuee ??

  kerneld peut  l'origine grer l'tablissement de connexions rseau 
  travers le rseau tlphonique  la demande : essayer d'envoyer des
  paquets  un rseau sans tre connect, peut entraner kerneld 
  lancer le script /sbin/request_route pour initialiser une connexion
  PPP ou SLIP.

  Il s'est avr que c'tait une mauvaise ide. Alan Cox, bien connu
  pour ses travaux sur le rseau dans Linux a crit sur la liste de
  diffusion linux-kernel que :

  ``Le truc request-route est obsolte, cass et non requis...  Il est
  aussi enlev des versions 2.1.x.''

  A la place d'utiliser le script request-route et kerneld, je vous
  encourage vivement  installer le paquetage diald d'Eric Schenk,
  disponible  l'url http://www.dna.lth.se/~erics/diald.html

  1133..

  CCooppyyrriigghhtt

  Ce document est copyright (c) Henrik Storner, 1996, 1997.

  Sauf contre-ordre, les documents HowTo pour Linux sont copyrights pas
  leurs auteurs respectifs. Ces documents peuvent tre reprodruits et
  distribus dans leur ensemble ou en partie, sur n'importe quel type de
  support physique ou lectronique, du moment que cette notice lgale se
  trouve sur toutes les copies.  Les redistributions commerciales sont
  autorises et encourages.  Toutefois, l'auteur aimerait bien tre
  avis de toute distribution de ce genre.

  Toute traduction, travail driv ou complmentaire incluant tout ou
  partie de document HowTo Linux doit tre couvert par ce copyriht. De
  cette manire, vous ne pouvez crer un document qui s'inspire de ce
  document et imposer des restrictions supplmentaires  sa diffusion.
  Des exceptions  ces conditions peuvent tre donnes sous certaines
  conditions. Contactez le coordonnateur des HowTo Linux  l'adresse
  donne un peu plus bas.

  En rsum, nous souhaitons promouvoir la diffusion de ces informations
   travers un maximum de moyens de communication.  Toutefois, nous
  souhaitions conserver un copyright sur les documents HowTo et  nous
  souhaitons tre avertis de leur redistribution.

  Si vous avez des questions, vous pouvez contacter Greg Hankins, le
  coordonnateur des HowTo Linux par courrier lectronique 
  gregh@sunsite.unc.edu
































  Mini-HOWTO LBX
  Paul  D. Smith, psmith@baynetworks.com, trad. : Xavier Glat-
  tard
  v1.04, 11 Decembre 1997, trad. Juin 1997

  LBX (Low Bandwidth X, X Faible Bande-passante) est  une  extension  du
  serveur  X  qui  effectue  une compression du protocole X. En d'autres
  termes, elle permet, dans le cas d'applications X et  d'un  serveur  X
  separes  par une connexion reseau lente, d'accelerer l'affichage et de
  reduire les temps de reponse.

  11..  IInnttrroodduuccttiioonn

  _L_o_w_-_B_a_n_d_w_i_d_t_h _X (LBX) prend en compte le fait que de nos jours tout le
  monde  ne travaille pas qu'a une ou deux connexions rapides du serveur
  sur lequel tournent ses applications.

  Le protocole X peut generer un trafic extraordinaire sur votre reseau,
  en  particulier  pour  des  choses  apparemment  simples telles que la
  creation de nouvelles fenetres. Quiconque aura essaye d'utiliser  X  a
  travers  une  connexion  modem  a  28,8 (ou meme mieux) vous le dira :
  creer de nouvelles fenetres X necessite une patience a toute  epreuve.

  Le  principe  est le suivant : LBX est un systeme de compression et de
  cache concu pour minimiser le trafic X genere entre deux systemes.

  22..  QQuueell eesstt llee ssttaattuutt ddee LLBBXX ??

  En tant que composant de la publication X11R6.3 du Consortium X datant
  de  decembre  1996,  LBX est une authentique extension du protocole X.
  Pour les utilisateurs de XFree86, cela correspond  a  XFree86  version
  3.3.

  33..  PPoouurrqquuooii uuttiilliisseerr LLBBXX ??

  Si  vous  utilisez  un  modem  pour vous connecter a un prestataire de
  service, et que vous executez des  applications  X  sur  des  machines
  distantes,  l'affichage  (variables  DISPLAYs)  etant dirige sur votre
  machine (et vice versa), alors LBX accelerera la connexion.  De  meme,
  si  vous redirigez l'affichage d'autres systemes a travers des reseaux
  etendus (d'autres pays, par  exemple)  ou  a  travers  des  connexions
  lentes, LBX peut vous etre utile.

  44..  PPoouurrqquuooii nnee ppaass uuttiilliisseerr LLBBXX ??

  LBX  est  inutile,  naturellement,  si  vous executer des applications
  localement, ou si vous n'utilisez pas X.

  De meme, si vous travaillez sur un reseau local rapide,  LBX  ne  vous
  sera  pas  d'une  grande  utilite. Certains disent : "si LBX reduit le
  trafic reseau, ne pourrait-on pas l'utiliser sur  des  reseaux  locaux
  rapides  ?"  On  pourrait,  si  le but est de reduire le trafic sur le
  reseau. Neanmoins, cela introduirait du cache et  de  la  compression,
  qui  consomment  des  ressources  a  chaque  extremites (de la memoire
  supplementaire pour le cache, et du temps CPU pour la  decompression).
  Si  votre  liaison  est  plutot performante, LBX causera sans doute un
  ralentissement global du reseau.

  55..  CCoommmmeenntt ffoonnccttiioonnnnee LLBBXX ??

  LBX fonctionne en introduisant un _s_e_r_v_e_u_r _p_r_o_x_y  du  cote  du  client,
  lequel  se charge du cache et de la compression. Le serveur X sait que
  le client utilise un serveur proxy, et decompresse en consequence.

  Voici un  exemple  de  configuration  classique  pour  des  clients  X
  distants.   Dans  la suite, LOCAL representera toujours la station qui
  se trouve en face de vous, et  dont  vous  regardez  le  moniteur,  et
  DISTANT  sera  la station distante, sur laquelle votre application est
  executee.

       ______________________________________________________________________
           DISTANT                               LOCAL
        +-----+                                             +-----+
        | APP |-\          Reseau            +-----------+  |     |\
        +-----+  \-------------------------->| SERVEUR X |=>|     ||
        +-----+  /     (Protocole X)         +-----------+  +-----+\
        | APP |-/                                          /_____//
        +-----+
       ______________________________________________________________________

  Lors  de  l'utilisation  de  LBX,  un  serveur  proxy  (lbxproxy)  est
  introduit  du  cote  distant, et les applications communiquent avec ce
  processus et non plus directement avec le serveur LOCAL. Ce  processus
  se  charge  alors  du cache et de la compression des requetes X et les
  transmet. Cela ressemble a ca :

       ______________________________________________________________________
            DISTANT                                     LOCAL
                                                                  +-----+
        +-----+  +-------+        Reseau           +-----------+  |     |\
        | APP |->| PROXY |------------------------>| SERVEUR X |=>|     ||
        +-----+  +-------+    (LBX/Protocole X)    +-----------+  +-----+\
        +-----+   /                                              /_____//
        | APP |--/
        +-----+
       ______________________________________________________________________

  Le detail des fonctions de cache et de  compression  de  LBX  sort  du
  cadre de ce document.

  66..  DDee qquuooii aaii--jjee bbeessooiinn ppoouurr uuttiilliisseerr LLBBXX ??

  Vous  avez  besoin sur votre systeme LOCAL d'un serveur X compile avec
  l'extension LBX. A moins que  vous  n'ayez  explicitement  demande  le
  contraire,  les  serveurs  X11R6.3  incluent automatiquement  LBX a la
  compilation. Par consequent, tous les serveurs  XFree86  3.3  incluent
  LBX par defaut.

  Vous  pouvez  utiliser  la commande xdpyinfo afin de verifier si votre
  serveur dispose de l'extension LBX : executez xdpyinfo et verifiez  la
  liste  qui  suit   "number  of extensions" (nombre d'extensions); vous
  devez voir "LBX" dans cette liste.

  Ensuite, vous avez besoin d'un  programme  lbxproxy  compile  pour  le
  systeme DISTANT. C'est le point le plus delicat. Si le systeme distant
  n'est pas du meme type que votre systeme local, le lbxproxy  de  votre
  systeme local ne sera pas bon, evidement.
  Malheureusement,  aucune  distribution  de  lbxproxy  n'a  jamais  ete
  publiee. Par consequent, vous devez soit (a) obtenir  et  compiler  la
  majeure partie, sinon la totalite, de X11R6.3 pour le systeme distant,
  soit (b) trouver quelque part un executable lbxproxy  precompile  pour
  votre  systeme.  Cette  derniere  solution  est  naturellement la plus
  simple.

  lbxproxy est constitue d'un unique fichier executable.  Aucun  fichier
  de configuration, de ressources, etc. ne lui est associe.

  77..  DDee qquuooii nn''aaii--jjee ppaass bbeessooiinn ppoouurr uuttiilliisseerr LLBBXX ??

  Le  systeme  DISTANT  nn''aa ppaass besoin d'un nouveau serveur X (dans tous
  les cas, le systeme DISTANT n'a besoin d'executer _a_u_c_u_n serveur X).

  L'application que vous voulez executer nn''aa ppaass besoin  d'etre  liee  a
  une  version  speciale de X, ou a une bibliotheque speciale; j'utilise
  regulierement des applications commerciales X11R5 a travers  LBX  sans
  aucun souci.

  Vous  nn''aavveezz ppaass besoin de droits d'acces "root" ou privilegies sur le
  systeme DISTANT; le processus  lbxproxy  utilise  vos  droits  d'acces
  normaux.  De  plus,  vous  pouvez  l'executer  depuis votre repertoire
  personnel  :  il  n'a  pas  besoin  d'etre  installe  a   un   endroit
  particulier.

  88..  CCoommmmeenntt jjee ddeemmaarrrree LLBBXX ??

  Bon,  nous  y  voila...  apres  tout,  rien  de bien complique jusqu'a
  present.  Remplacez dans la suite LOCAL et DISTANT respectivement  par
  les  noms  d'hote  de  votre  station locale et du systeme distant (ne
  melangez pas tout!).

  Sur LOCAL :

  1. Demarrez votre serveur X.

  2.  Donnez les droits d'acces  du  systeme  distant  aupres  de  votre
     serveur  X.  Avec  la  methode  de  la  liste  d'hotes, tapez xhost
     +DISTANT. Si vous  utilisez  xauth  cela  risque  de  ne  pas  etre
     suffisant; consultez le manuel _x_a_u_t_h_(_1_) pour plus d'informations.

     Vous  pourriez  consulter  efficacement le mini howto Remote X Apps
     <http://www.freenix.fr/linux/HOWTO/mini/Remote-X-Apps.html> si vous
     n'etes  pas  familier  avec  la  configuration  des  droits d'acces
     distants sous X.

  Sur DISTANT :

  1. Demarrez lbxproxy en precisant la redirection  vers  le  serveur  X
     LOCAL, comme cela :

         $ lbxproxy -display LOCAL :0 :1 &

  Cette commande indique a lbxproxy d'utiliser l'ecran ("display")
   :1  sur  le  systeme DISTANT; si ce systeme dispose deja de plus d'un
  ecran, vous pouvez choisir  :2, ou n'importe quoi d'autre.

  2.  Definissez votre variable  d'environnement  DISPLAY  afin  qu'elle
     pointe  vers l'ecran gere par lbxproxy, au lieu de l'ecran habituel
     :

         $ DISPLAY= :1
         $ export DISPLAY

  Ou, si vous utilisez csh ou un de ses clones :

         % setenv DISPLAY :1

  3.  Si vous utilisez xauth, vous aurez a verifier que  votre  "cookie"
     est  accessible  localement.  Consultez le mini howto Remote X Apps
     <http://www.freenix.fr/linux/HOWTO/mini/Remote-X-Apps.html>    pour
     plus d'informations a ce propos.

  4.  Demarrez vos applications X!

  Voila;  toute  application  demarree  vers  l'ecran  :1 utilisera LBX.
  Naturellement, il n'y a aucune raison pour que vous  ne  puissiez  pas
  egalement  demarrer  des  applis  X  vers  LOCAL  :0  et  les utiliser
  simultanement.

  99..  PPrroobblleemmeess

  Voici quelques problemes courants :

     QQ)) lbxproxy  se  termine  avec  l'erreur  "access  denied"  ("acces
        refuse").

     RR)) Cela  signifie que le systeme LOCAL n'accepte pas les connexions
        en   provenance   du   systeme   DISTANT   pour   des    raisons
        d'autorisation.    Consultez   le   mini  howto  Remote  X  Apps
        <http://www.freenix.fr/linux/HOWTO/mini/Remote-X-Apps.html> pour
        plus de details a ce sujet.

        En guise de test simple, essayez de lancer sur DISTANT une appli
        simple, comme xclock, en l'affichant sur le systeme local,  sans
        utiliser lbxproxy :

            $ xclock -display LOCAL :0

     Si  cela ne marche pas, le probleme vient de xhost, ou d'une simple
     anomalie de X, pas de LBX.
  1100..  DDooccuummeennttaattiioonn

  La seule documentation fournie avec une distribution  X  standard  est
  probablement la page de manuel de _l_b_x_p_r_o_x_y_(_1_).

  Si  vous  pouvez  consulter  l'arborescence  des sources de X, de tres
  interessantes informations sont disponibles la :

  +o  xc/doc/specs/Xext/lbx.mif (Framemaker MIF)

  +o  xc/doc/hardcopy/Xext/lbx.PS.Z (Postscript compresse)

  +o  xc/doc/hardcopy/Xext/lbxTOC.html (HTML)

  Une discussion plus precise a propos des algorithmes specifiques a LBX
  est disponible la :

  +o  xc/doc/specs/Xext/lbxalg.mif (Framemaker MIF)

  +o  xc/doc/specs/Xext/lbxalg.PS.Z (Postscript compresse)

  Si  vous  n'avez  pas  acces a l'arborescence des sources de X11, vous
  pouvez obtenir ces fichiers depuis le site FTP du  Consortium  X  <ftp
  ://ftp.x.org/pub/R6.3/xc/doc/>.

  1111..  AAlltteerrnnaattiivveess

  Si,  pour  quelque raison, vous n'aimez pas lbxproxy : vous n'etes pas
  satisfait des performances, ou bien ca ne marche  pas  pour  vous,  ou
  vous  ne  voulez  pas  vous casser la tete a creer un lbxproxy pour le
  systeme distant, ou encore vous avez tout simplement  envie  d'essayer
  d'autres  solutions,  alors  il  existe  au  moins  un   autre  kit de
  compression du protocole X (quelqu'un en connait d'autres?)

  1111..11..  ddxxppcc -- DDiiffffeerreennttiiaall XX PPrroottooccooll CCoommpprreessssoorr

  +o  Auteur initial : Brian Pane <brianp@cnet.com>

  +o  Actuel responsable : Zachary Vonler <lightborn@mail.utexas.edu>

  dxpc   <http://ccwf.cc.utexas.edu/~zvonler/dxpc/>   (Differential    X
  Protocol   Compressor,   Compresseur   Differentiel  de  protocole  X)
  fonctionne pour l'essentiel de la meme  maniere  que  LBX.  Cependant,
  afin  d'eviter  d'avoir a implementer une extension X et a modifier le
  code du serveur X, dxpc utilise ddeeuuxx proxys : le premier s'execute sur
  le  systeme  DISTANT,  comme lbxproxy, et l'autre s'execute sur l'hote
  LOCAL.

  Le proxy de l'hote DISTANT intervient dans la communication entre  les
  clients  X  et le proxy de l'hote LOCAL, tandis que le proxy de l'hote
  LOCAL intervient dans la communication entre le serveur X et le  proxy
  de l'hote DISTANT.

  Ainsi,  a  la  fois  pour  les  clients  X  et pour le serveur X, cela
  ressemble a une connexion X normale.

  1111..11..11..  AAvvaannttaaggeess

  +o  Comme il s'agit d'une  application  completement  independante  qui
     n'utilise  aucune  particularite  de  X,  elle  est  plus  simple a
     compiler et a installer.

  +o  Elle est maintenue separement, aussi vous n'avez pas a attendre  la
     publication  par  l'OSF  de  nouvelles  versions de X pour profiter
     d'ameliorations ou de corrections.

  +o  Elle fournie des informations et des statistiques  plus  nombreuses
     et plus completes que lbxproxy.

  1111..11..22..  IInnccoonnvveenniieennttss

  +o  Ce  n'est  pas  un composant standard de X; vous devez l'obtenir et
     l'installer separement.

  +o  dxpc est legerement plus complexe a configurer, puisqu'un proxy est
     necessaire sur LOCAL, en plus du proxy DISTANT.

  1111..11..33..  OOuu oobbtteenniirr ddxxppcc??

  Le   code   source   de   dxpc   est   disponible   a  ftp.x.org  <ftp
  ://ftp.x.org/contrib/utilities/>.

  Une page web sur dxpc donne beaucoup d'informations  interessantes,  y
  compris  des  liens  vers la liste de diffusion dxpc, un acces au code
  source,  et  un  certain   nombre   d'executables   precompiles   pour
  differentes plates-formes :

  <http://ccwf.cc.utexas.edu/~zvonler/dxpc/>

  1111..22..  SSsshh ((SSeeccuurree SShheellll))

  Ken      Chase      <lbxhowto@sizone.org>      precise     que     ssh
  <http://www.cs.hut.fi/ssh/> peut etre  utilise  pour  la  compression.
  Bien  que  sa  principale  fonction  soit  de  securiser, il compresse
  egalement les donnees qu'il envoie.

  Ainsi, si vous utilisez X a travers une connexion ssh, vous obtiendrez
  automatiquement un certain taux de compression.

  1111..33..  LLeeqquueell cchhooiissiirr ??

  Je  ne  sais pas. LBX et dxpc apportent certainement tous les deux une
  meilleure compression que  ssh. Bien sur, ssh a pour lui l'avantage de
  la  securisation. Et bien sur, il n'y a aucune raison pour que vous ne
  puissiez pas utiliser a la fois ssh et  l'un  des  deux  autres,  afin
  d'obtenir une bonne compression et une securisation.

  Il  ne  devrait pas etre tres difficile de realiser un test comparatif
  de ces differentes solutions, afin de disposer de mesures statistiques
  et  subjectives  des  performances. Mais je ne l'ai pas fait, et je ne
  connais personne qui l'ait fait.

  Lilo mini-Howto
  Cameron Spitzer (cls@truffula.sj.ca.us), Alessandro Rubini
  (rubini@linux.it).
  Traduction franaise Mathieu Arnold arn@mygale.org
  v2.02, 16 August 1998

  LILO est le LLiinux LLooader (chargeur de Linux) pour le version x86 de
  Linux. Je l'appellerai ici Lilo plutt que LILO car je n'aime pas trop
  les majuscules. Ce fichier dcrit quelques installations typiques de
  Lilo. Le but de ce document est d'tre un supplment au guide de
  l'utilisateur de Lilo. Je pense que des exemples aident  comprendre,
  mme si votre configuration n'est pas vraiment semblable  la mienne.
  J'espre que cela va vous viter des tracas. Comme la documentation de
  Lilo est dj trs bonne, ceux qui sont intresss par les dtails
  iront faire un tour dans /usr/doc/lilo*
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Informations gnrales et installation standard

     2.1 O dois-je installer Lilo ?
     2.2 Comment dois-je configurer mes disques IDE ?
     2.3 Comment puis-je interagir au boot ?
     2.4 Comment dsinstaller Lilo ?

  3. La configuration simple

     3.1 Comment s'en sortir avec les gros noyaux
     3.2 autres sources d'informations

  4. Configurons

  5. Utilisation de Lilo quand le BIOS ne voit pas la partition root

  6. Accder a de gros disques quand le BIOS n'en est pas capable

  7. Dmarrage depuis une disquette de secours



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Bien que la documentation fournie avec les sources de Lilo (celle
  installe dans /usr/doc/lilo-version) soit trs facilement
  comprhensible, la majorit des utilisateurs de Linux rencontrent des
  problmes en faisant leur propre /etc/lilo.conf. Ce document a pour
  but d'aider les utilisateurs en leur donnant un minimum
  d'informations, et en leur montrant cinq exemples d'utilisation :



    Le premier exemple montre une installation de base : "Linux et les
     autres".

    La suivante explique comment installer Lilo sur un disque dur
     connect sur /dev/hdc et qui bootera en tant que /dev/hda. C'est ce
     dont on a besoin quand on veux installer un nouveau disque Linux
     sur un systme qui marche dj. Il explique aussi comment booter
     sur un disque SCSI quand votre BIOS est suffisamment rcent.

    Le troisime exemple montre comment booter un systme Linux dont la
     partition root ne peut tre accde par le BIOS.

    L'exemple suivant est utilis pour accder  de trs gros disques
     auxquels ni le BIOS, ni le DOS ne peuvent accder facilement (cet
     exemple ci est un peu vieux)

    Le dernier exemple montre comment restaurer un disque endommag, si
     les dommages proviennent de l'installation d'un autre systme
     d'exploitation.


  Les trois derniers exemples sont de Cameron cls@truffula.sj.ca.us, qui
  est  l'origine de ce document. Alessandro rubini@linux.it, le
  mainteneur actuel n'a que Linux, et donc, ne peut pas vrifier ni non
  plus mettre  jour par lui mme. Il n'est pas ncessaire de dire que
  toutes les remarques seront les bienvenues.


  22..  IInnffoorrmmaattiioonnss ggnnrraalleess eett iinnssttaallllaattiioonn ssttaannddaarrdd

  Quand Lilo amorce le systme, il utilise des appels du BIOS pour
  charger le noyau de Linux depuis le disque (disque IDE, disquette, ou
  autre). Par consquent, le noyau doit rsider  un endroit accessible
  par le BIOS.


  Au boot, Lilo ne sais pas lire les donnes des systmes de fichiers,
  et le path que vous avez mis dans /etc/lilo.conf est rsolu 
  l'installation (quand vous avez lanc /sbin/lilo). L'installation est
  le moment o le programme construit les tables qui regroupent les
  secteurs qui sont utiliss pour charger le systme d'exploitation. Par
  consquent, tous les fichiers doivent tre dans un endroit que le BIOS
  peut lire (les fichiers sont gnralement placs dans le rpertoire
  /boot, cela signifie que seule la partition root de votre systme a
  besoin d'tre accessible depuis le BIOS).


  Une autre consquence du fait de se baser sur le BIOS est que vous
  devez rinstaller le chargeur (en relanant _/_s_b_i_n_/_l_i_l_o)  chaque fois
  que vous modifiez la configuration de Lilo. Lorsque vous recompilez le
  noyau et que vous remplacez votre image, vous devez rinstaller Lilo.


  22..11..  OO ddooiiss--jjee iinnssttaalllleerr LLiilloo ??

  La directive boot= de /etc/lilo.conf dit  Lilo o il doit placer son
  amorceur primaire. En gnral, vous spcifirez soit le Master Boot
  Record (MBR) (/dev/hda) soit la partition de root de Linux (par
  exemple /dev/hda1 ou /dev/hda2).


  Si vous avez un autre systme d'exploitation install sur votre
  disque, vous feriez mieux d'installer Lilo sur votre partition de boot
  plutt que sur le MBR. Dans ce cas, vous devez rendre la partition
  "bootable" en utilisant la commande "a" de _f_d_i_s_k ou la commande "b" de
  _c_f_d_i_s_k. Si vous n'crivez pas sur le MBR, il sera plus simple de
  dsinstaller Linux et Lilo si ncessaire.


  22..22..  CCoommmmeenntt ddooiiss--jjee ccoonnffiigguurreerr mmeess ddiissqquueess IIDDEE ??

  Pour ma part je n'utilise pas les options LBA ou LARGE du BIOS (mais
  il faut dire que je n'utilise que Linux sur ma machine); ce sont des
  monstruosits qui nous sont imposes par les lacunes de l'architecture
  intel x86. Ceci implique que le noyau doit rsider dans les 1024
  premiers cylindres, mais cela n'est pas un problme vu que vous avez
  partitionn votre disque et que votre partition de root est sense
  tre petite (en tous cas, c'est comme a que cela devrais tre).


  Si votre disque a un autre systme d'exploitation, vous ne devez pas
  modifier les paramtres du BIOS, sinon, l'ancien systme ne
  fonctionnera plus du tout. Toutes les distributions rcentes de Lilo
  savent quoi faire des rglages LBA et LARGE.


  Notez que le mot-cl "linear" dans le /etc/lilo.conf peut vous tre
  utile si vous avez des problmes de gomtrie. Il indique  Lilo que
  l'adressage des secteurs doit se faire linairement plutt qu'avec le
  triplet secteurs/ttes/cylindres. La conversion des adresses 3D est
  reporte  l'excution, par consquent, rendant la configuration
  immunise contre les problmes de gomtrie.


  Si vous avez plusieurs disques et que certains qui ne sont utiliss
  que par Linux ne sont pas ncessaires durant le boot, vous pouvez les
  enlever de votre BIOS, votre systme dmarrera plus rapidement et
  Linux dtectera tous les disques. Je change souvent les disques de mon
  ordinateur, mais je ne touche jamais au BIOS.


  22..33..  CCoommmmeenntt ppuuiiss--jjee iinntteerraaggiirr aauu bboooott ??

  Quand vous voyez le prompt Lilo, vous pouvez taper sur la touche <Tab>
  pour voir les diffrents choix possible. Si Lilo n'est pas configur
  pour tre interactif, gardez la touche <Tab> ou <Shift> presse avant
  que le message "LILO" n'apparaisse.


  Si vous choisissez de booter sur un noyau Linux, vous pouvez ajouter
  des arguments aprs le nom du systme que vous choisissez. Le noyau
  accepte de nombreux arguments. Tous les arguments sont lists dans le
  "BootPrompt-HOWTO" de Paul Gortmaker, et je ne vais pas le reproduire
  ici. Quelques arguments sont, par ailleurs, trs importants et se
  doivent de figurer ici :


    root= : vous pouvez dire au noyau de monter une partition root
     diffrente de celle qui se trouve dans le lilo.conf. Par exemple,
     mon systme a une toute petite partition qui a un systme Linux
     minimal, et j'ai russi  booter aprs avoir dtruit ma partition
     root par erreur.

    init= : depuis la version 1.3.43 du noyau, vous pouvez utiliser une
     commande autre que /sbin/init. si vous avez de graves problmes
     durant le dmarrage, vous pouvez accder  un systme minimal en
     spcifiant init=/bin/sh (quand vous arriverez au prompt du shell,
     vous aurez certainement besoin de vos partitions, essayez "mount -w
     -n -o remount /; mount -a", et n'oubliez pas de faire un "umount
     -a" avant d'teindre).

    Un nombre : en spcifiant un nombre sur la ligne de commande, vous
     demandez a _i_n_i_t de dmarrer dans un run-level spcifique (le run-
     level par dfaut est gnralement 3 ou 2 suivant la distribution
     que vous avez). Rferez-vous  la documentation d'_i_n_i_t,  votre
     /etc/inittab et  vos /etc/rc*.d si vous voulez creuser plus loin.





  22..44..  CCoommmmeenntt ddssiinnssttaalllleerr LLiilloo ??

  Quand Lilo crit sur un secteur de boot, il en sauve une copie dans
  /boot/boot._x_x_y_y, ou _x_x_y_y sont les nombres majeurs et mineurs du
  priphrique. Vous pouvez voir les nombres majeurs et mineurs de votre
  disque ou partition en lanant "ls -l /dev/_d_e_v_i_c_e". Par exemple le
  premier secteur de /dev/hda (majeur 3, mineur 0) sera sauv dans
  /boot/boot.0300, en installant Lilo sur /dev/fd0 on aura un fichier
  /boot/boot.0200 et sur /dev/sdb3 crera /boot/boot.0813. Notez que
  Lilo ne crera pas le fichier s'il existe dj, vous n'aurez donc pas
   faire une sauvegarde quand vous rinstallerez Lilo (aprs avoir
  recompil votre noyau par exemple). Les copies de /boot/ sont toujours
  les sauvegardes d'avant la premire installation de Lilo.


  Si jamais vous avez besoin de dsinstaller Lilo (par exemple, dans le
  cas o vous auriez malheureusement  dsinstaller Linux), vous aurez
  besoin de restaurer le secteur de boot original. Si Lilo est install
  sur /dev/hda, faites "dd if=/boot/boot.0300 of=/dev/hda bs=446
  count=1" (personnellement, je fais simplement "cat /boot/boot.0300 >
  /dev/hda", mais ce n'est pas toujours fiable, car cela restaurera la
  table des partitions, que vous avez peut tre modifi depuis). Cette
  commande est bien plus simple que d'essayer de lancer "fdisk /mbr"
  depuis la ligne de commande DOS : elle vous permet de supprimer Linux
  d'un disque  partir de Linux. Aprs avoir supprim Lilo, n'oubliez
  pas de supprimer la partition Linux avec _f_d_i_s_k (le _f_d_i_s_k du DOS est
  incapable de supprimer les partitions non-dos).


  Si vous avez install Lilo sur votre partition de root (par exemple
  /dev/hda2), vous n'avez rien de spcial  faire pour supprimer Lilo,
  lancez juste le _f_d_i_s_k de Linux pour supprimer la partition. Vous aurez
  aussi  marquer la partition DOS bootable.


  33..  LLaa ccoonnffiigguurraattiioonn ssiimmppllee

  La majorit des installations Lilo  utilisent un fichier de
  configuration tel celui ci :



       boot = /dev/hda   # ou la partition root
       delay = 10        # dlai, en diximes de secondes
       vga = 0           # optionnel, utilisez "vga=1" pour avoir du 80x50
       #linear           # essayez a si vous avez des problmes de gomtrie

       image = /boot/vmlinux  # votre zImage
         root = /dev/hda1     # votre partition root
         label = Linux        # ou un nom rigolo
         read-only            # monter la root en lecture seule

       other = /dev/hda4   # votre partition DOS, si y'en a une
         table = /dev/hda  # La table de partition courante
         label = dos       # ou un nom triste





  Vous pouvez avoir plusieurs sections "images" et "other" si vous
  voulez. Il est trs frquent de rencontrer de multiples images de
  noyau dans votre _l_i_l_o_._c_o_n_f, au moins si vous restez  jour dans le
  dveloppement du noyau.


  33..11..  CCoommmmeenntt ss''eenn ssoorrttiirr aavveecc lleess ggrrooss nnooyyaauuxx

  Si vous compilez un noyau "zImage" et qu'il est trop gros pour rentrer
  dans un demi mgaoctet (ce qui est frquent avec les noyaux 2.1), vous
  aurez  compiler un "big zImage"  la place : "make bzImage". Pour
  booter avec un gros noyau, vous n'aurez pas besoin de faire quoi que
  ce soit si votre version de Lilo est suprieure  18. Si votre
  installation est plus ancienne, vous aurez  mettre  jour votre
  paquetage Lilo.


  33..22..  aauuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonnss

  En addition aux documentations de Lilo, il y a un trs grand nombre de
  Mini-HowTo qui peuvent vous tre utiles. Ils sont tous appels
  "Linux+_n_u_l_O_S", pour quelques _n_u_l_O_S, ils parlent aussi de comment faire
  coexister Linux et des autres OS. De mme, le "Multiboot-with-LILO"
  dcrit comment les diffrentes versions de Windows coexistent avec
  Linux.


  44..  CCoonnffiigguurroonnss hhddcc  ppoouurr bbooootteerr eenn ttaanntt qquuee hhddaa  eenn uuttiilliissaanntt bbiiooss==

  Lilo permet de mapper l'image du noyau sur un disque et de dire au
  BIOS d'aller la chercher sur un autre disque. Par exemple, j'ai
  l'habitude d'installer Linux sur un disque connect sur hdc (disque
  matre du second contrleur IDE) et d'y booter comme systme unique
  sur le contrleur primaire d'un autre ordinateur. J'ai copi la
  disquette d'installations sur une petite partition, je peut donc faire
  un _c_h_r_o_o_t depuis une console virtuelle pour installer hdc quand
  j'utilise le systme pour faire autre chose.


  Voil le lilo.conf que j'utilise pour installer Lilo :



       # Ce fichier doit tre utilis sur un systme fonctionnant  partir
       # de /dev/hdc
       boot = /dev/hdc   # on rcrit le MBR d'hdc
       disk = /dev/hdc   # On lui dit qui sera hdc
          bios = 0x80    # Et le BIOS la verra en tant que premier disque
       delay = 0
       vga = 0

       image = /boot/vmlinux  # c'est sur /dev/hdc1
         root = /dev/hda1     # Mais au boot, a sera hda1
         label = Linux
         read-only





  Ce fichier de configuration doit tre lu par Lilo ddeeppuuiiss /dev/hdc1. La
  table de Lilo qui est crite sur le secteur de boot (/dev/hdc) doit se
  rfrer  un fichier dans /boot/ (en ce moment hdc). Ce fichier sera
  accd en tant que hda quand il bootera comme seul systme.


  J'ai appel ce fichier /mnt/etc/lilo.conf.hdc (/mnt est l'endroit o
  hdc est mont durant l'installation. J'installe Lilo en lanant "cd
  /mnt; chroot . sbin/lilo -C /etc/lilo.conf.hdc". Allez lire la page
  man de _c_h_r_o_o_t si vous trouvez a magique.


  Le "bios=" du lilo.conf est utilis pour dire  Lilo ce que le BIOS
  pense de vos priphriques. Le BIOS identifie les lecteurs de
  disquettes et les disques durs par des numros : 0x00 et 0x01
  slectionnent les disquettes, 0x80 et suivants, les disques durs (Les
  vieux BIOS ne peuvent accder qu' deux disques). La signification du
  "bios = 0x80" dans l'exemple prcdent est de dire  Lilo "utilise
  0x80 dans tes appels BIOS pour /dev/hdc".


  Cette directive Lilo peut tre trs pratique dans d'autres situations,
  par exemple, quand votre BIOS est capable de booter depuis un disque
  SCSI  la place d'un disque IDE. Quand des priphriques IDE et SCSI
  sont prsents, LILO ne sait pas  qui appartient 0x80, car
  l'utilisateur est capable de le changer depuis les menus du BIOS, et
  le BIOS ne peut pas tre accd quand Linux est lanc.


  Par dfaut, Lilo suppose que les disques IDE sont mapps en premier
  par le BIOS, mais il est possible de lui spcifier le contraire en
  utilisant ces instructions dans /etc/lilo.conf :



       disk = /dev/sda
         bios = 0x80





  55..  UUttiilliissaattiioonn ddee LLiilloo qquuaanndd llee BBIIOOSS nnee vvooiitt ppaass llaa ppaarrttiittiioonn rroooott

  J'ai deux disques IDE, et un disque SCSI. Le disque SCSI ne peut pas
  tre vu par le BIOS. Lilo utilise des appels BIOS, et peut uniquement
  voir ce que le BIOS voit. Mon stupide AMI BIOS ne peut booter que sur
  "A:" ou "C:", or ma partition de root se trouve sur le disque SCSI.


  La solution consiste en fait  stocker le noyau, la carte, et la
  chane d'amorage sur une partition Linux sur le premier disque IDE.
  Remarquez qu'il n'est pas ncessaire de garder le noyau sur la
  partition root.


  La deuxime partition de mon premier disque IDE (/dev/hda2, la
  partition Linux utilise pour booter sur le systme) est monte sur
  /u2. Et voici le /etc/lilo.conf que j'utilise.



















  #  On installe Lilo sur le MBR du premier disque IDE
  #
  boot = /dev/hda
  #  /sbin/lilo (l'installateur) copie le boot record de Lilo
  #  depuis le fichier suivant vers le MBR
  install = /u2/etc/lilo/boot.b
  #
  #  J'ai crit un menu dtaill. Lilo le trouvera l
  message = /u2/etc/lilo/message
  #  L'installateur construira le fichier suivant. Il dit 
  #  l'amorceur ou sont les blocs ou se trouvent les noyaux
  map = /u2/etc/lilo/map
  compact
  prompt
  #  on attende 10 seconds, puis on boot sur le noyau 1.2.1 par dfaut.
  timeout = 100
  #  Le noyau est stock ou le BIOS peut le trouver en faisant a :
  #      cp -p /usr/src/linux/arch/i386/boot/zImage /u2/z1.2.1
  image = /u2/z1.2.1
          label = 1.2.1
  #  Lilo dit au noyau de monter la premire partition SCSI en tant que
  #  root. Le BIOS n'a pas  savoir qu'elle existe.
          root = /dev/sda1
  #  Cette partition sera vrifie puis remonte par /etc/rc.d/rc.S
          read-only
  #  J'ai un noyau d'une vielle Slackware qui trane dans un coin au cas
  #  ou j'ai un noyau qui ne marche pas. J'en ai dj eu besoin une fois
  image = /u2/z1.0.9
          label = 1.0.9
          root = /dev/sda1
          read-only
  #  Ma partition DR-DOS 6
  other = /dev/hda1
          loader=/u2/etc/lilo/chain.b
          label = dos
          alias = m





  66..  AAccccddeerr aa ddee ggrrooss ddiissqquueess qquuaanndd llee BBIIOOSS nn''eenn eesstt ppaass ccaappaabbllee

  A mon travail, ma machine  un disque IDE de 1 Go. Le BIOS ne peut en
  voir que les premiers 504 Mo  (o Mo signifie 2^10 octets, pas 10^6
  octets). Donc, J'ai MS-DOS sur une partition de 350 Mo /dev/hda1 et ma
  partition root Linux sur une partition de 120 Mo /dev/hda2.


  MS-DOS tait incapable de s'installer correctement quand le disque
  tait tout neuf. Novell DOS 7 pareil. Le disque tait suppos arriver
  avec un disque appel "OnTrack Disk Manager". Malheureusement pour
  moi, suite  un oubli de la part d'IBM je n'avais pas la disquette
  avec "OnTrack" avec le disque. Si vous n'avez que MS-DOS, je vous
  souhaite d'en disposer.


  Donc, j'ai bti une table de partition avec le _f_d_i_s_k de Linux. MS-
  DOS-6.2 a refus de s'installer dans /dev/hda1, prtextant quelque
  chose du genre :


       "Cette version de MS-DOS est ddie aux nouvelles installations. MS-
       DOS est dj install sur votre ordinateur (ccee qquuii ttaaiitt ffaauuxx :: ddiissqquuee
       nneeuuff) donc, vous avez besoin d'obtenir une version de mise  jour chez
       votre vendeur."
  Quel ignare !  Donc, je relance le _f_d_i_s_k Linux et dtruis la premire
  partition de la table. Cela convient  MS-DOS 6.2 qui peut alors crer
  la mme partition que celle que je viens de dtruire et s'installer.
  MS-DOS 6.2 crit alors dans le secteur de lancement du disque, mais
  impossible de dmarrer.


  Par chance, j'avais un noyau de la Slackware sur disquette (ralis
  par le programme setup d'installation), et j'ai donc lanc Linux puis
  cras le secteur de dmarrage par celui de Lilo... et tout marche !


  Voici le fichier /etc/lilo.conf utilis :



       boot = /dev/hda
       map = /lilo-map
       delay = 100
       ramdisk = 0             # Ne cre pas le disque virtuel du noyau Slackware
       timeout = 100
       prompt

       disk = /dev/hda         # le BIOS ne voit que les 500 premiers Mo.
          bios = 0x80          # indique le premier IDE.
          sectors = 63         # prendre ces chiffres dans la documentation du disque
          heads = 16
          cylinders = 2100

       image = /vmlinuz
         append = "hd=2100,16,63"
         root = /dev/hda2
         label = linux
         read-only
         vga = extended

       other = /dev/hda1
         label = msdos
         table = /dev/hda
         loader = /boot/chain.b







  Aprs avoir install ces systmes, j'ai vrifi que les partitions
  contenant les fichiers zImage, boot.b, map, chain.b, et messages
  peuvent utiliser le systme de fichiers MS-DOS, tant que ni Stacker,
  ni Doublespace ne sont installs. Donc, j'aurais pu faire une
  partition DOS sur /dev/hda1 de 500 Mo.


  J'ai galement appris que _O_n_T_r_a_c_k aurait crit une table de partitions
  commenant  quelques douzaines d'octets sur le disque au lieu de
  l'crire au dbut. Il est possible de modifier le gestionnaire de
  priphrique IDE de Linux pour contourner ce problme. Mais
  l'installation aurait t impossible avec le noyau prcompil de la
  Slackware. En fin de compte, IBM m'a envoy une disquette _O_n_T_r_a_c_k.
  J'ai alors tlphon au support technique de _O_n_T_r_a_c_k. Ils m'ont dit
  que Linux tait bogg car il n'utilisait pas le BIOS. J'ai renvoy la
  disquette.



  77..  DDmmaarrrraaggee ddeeppuuiiss uunnee ddiissqquueettttee ddee sseeccoouurrss

  Ensuite, j'ai install Windows-95 sur mon ordinateur au bureau. Il a
  dtruit mon joli secteur de dmarrage LILO, mais n'a pas touch  mes
  partitions Linux. Les noyaux sont trs lents  charger  partir des
  lecteurs de disquettes. J'ai donc fait une disquette avec un fichier
  de configuration pour LILO qui me permet de lancer le noyau se
  trouvant sur le disque IDE. J'ai fait la disquette de cette manire :



          fdformat /dev/fd0H1440  : formatage de la disquette vierge
          mkfs /dev/fd0 1440      : disquette au format Minix
          mkdir /3                : montage
          mount /dev/fd0 /3
          cp -p /boot/chain.b /3  : copie du chargeur
          lilo -C /etc/lilo.flop  : installation de LILO
          umount /3






  Notez que la disquette DOIT TRE MONTE LORSQUE VOUS LANCEZ
  L'INSTALLATION pour que LILO puisse crire proprement le fichier de
  configuration.


  Ce fichier est /etc/lilo.flop, il ressemble  celui-ci :



       #  Cre une disquette qui puisse lancer des noyaux sur disque dur
       boot = /dev/fd0
       map = /3/lilo-map
       delay = 100
       ramdisk = 0
       timeout = 100
       prompt

       disk = /dev/hda        # 1 Go IDE, BIOS ne voit que les premiers 500 Mo.
          bios=0x80
          sectors = 63
          heads = 16
          cylinders = 2100

       image = /vmlinuz
         append = "hd=2100,16,63"
         root = /dev/hda2
         label = linux
         read-only
         vga = extended

       other = /dev/hda1
         label = msdos
         table = /dev/hda
         loader = /3/chain.b





  Enfin, j'avais besoin de MS-DOS 6.2 sur mon ordinateur du bureau, mais
  je ne voulais pas toucher au premier disque. J'ai donc ajout un
  contrleur SCSI et un disque, cr une partition au format MS-DOS avec
  le programme mkdosfs de Linux, et Windows-95 l'a reconnu comme disque
  "D:". Mais, bien sr, MS-DOS ne dmarrera pas sur "D:". Ce n'est pas
  un problme avec LILO. J'ai ajout :



       other = /dev/sda1
         label = d6.2
         table = /dev/sda
         loader = /boot/any_d.b





  au fichier lilo.conf de tout  l'heure. MS-DOS-6.2 fonctionne en
  pensant tre sur C:, et Windows 95 est sur D:.

















































  HOWTO - Disques de grande capacit
  Andries Brouwer, aeb@cwi.nl, version franaise par Xavier
  Serpaggi
  v2.2a, 26 April 1999

  Tout sur la gomtrie des disques durs et la limite des 1024 cylin
  dres.

  11..  EEnnoonncc dduu pprroobbllmmee

  Supposons que vous ayez un disque dur de plus de 1024 cylindres.
  Supposons galement que vous ayez un systme d'exploitation qui
  utilise l'ancienne interface INT13, d'Entre/Sortie sur disques.  Dans
  ce cas, vous avez un problme, parce que cette interface utilise un
  champ de 10 bits pour coder les cylindres sur lesquels sont effectues
  les Entres/Sorties, de telle manire que les cylindres 1024 et au-
  del sont inaccessibles.

  Heureusement, Linux ne se sert pas du BIOS, donc il n'y a pas de
  problme.

  Sauf peut-tre pour deux choses :

  (1) Quand vous dmarrez votre systme, Linux ne fonctionne pas encore
  et ne peut donc pas vous prserver des problmes lis au BIOS.  Ceci a
  certaines consquences pour LILO et d'autres programmes d'amorage du
  mme acabit.

  (2) Il est ncessaire que tous les systmes d'exploitation qui se
  partagent un mme disque dur se mettent d'accord sur la position
  physique de chaque partition. En d'autres termes, si vous utilisez
  Linux et disons, DOS sur un seul disque dur, alors, les deux se
  doivent d'interprter la table des partitions de la mme manire. Ceci
  a quelques consquences pour le noyau de Linux et pour fdisk.

  Vous trouverez ci-dessous une description assez pousse de tous les
  dtails importants. Prenez en compte le fait que j'utilise comme
  rfrence un noyau dans sa version 2.0.8. D'autres versions pourront
  donc prsenter quelques diffrences.



  22..  RRssuumm

  Vous avez un nouveau disque de grande capacit. Que faire ? Bon, du
  ct logiciel il faut utiliser fdisk (ou mieux, cfdisk), pour crer
  les partitions, ensuite mke2fs pour crer un systme de fichiers, et
  enfin mount pour faire le lien entre ce nouveau systme de fichiers et
  l'arborescence dj existante.

  Il n'est pas ncessaire de lire ce HOWTO  partir du moment o, de nos
  jours, il n'y a _p_a_s de problme avec les disques de grande capacit.
  La grande majorit des problmes constats est due au fait que les
  gens pensent qu'il peut y avoir un problme, et installent un
  gestionnaire de disques durs, ou passent en mode expert dans fdisk, ou
  encore spcifient explicitement une gomtrie de disque  LILO ou sur
  la ligne de commande du noyau.

  Cependant, les domaines dans lesquels interviennent typiquement les
  problmes sont :

    un matriel ancestral ;

    plusieurs systmes d'exploitation sur le mme disque dur ;


    le dmarrage.

  Conseil :

  Pour les disques durs SCSI de grande capacit : Linux les a trs tt
  supports. Il n'y a rien  faire.

  Pour les disques durs IDE de grande capacit : procurez-vous un noyau
  stable rcent (2.0.34 ou plus). Normalement, tout doit se passer
  correctement, surtout si vous avez eu la sagesse de ne pas dire au
  BIOS de faire des conversions du type LBA ou assimil.

  Si LILO reste suspendu au dmarrage, il faut essayer de spcifier
  linear dans le fichier de configuration /etc/lilo.conf.

  Il y a des problmes de gomtrie qui peuvent tre rsolus en passant
  explicitement une gomtrie au noyau/LILO/fdisk.

  Si vous avez un vieux fdisk et qu'il vous met des messages d'erreur du
  type ```overlapping partitions''' : ignorez-les ou vrifiez en
  utilisant cfdisk qui est vraiment bien.

  Si vous pensez que quelque chose cloche dans la taille de votre disque
  dur, assurez-vous que vous n'tes pas en train de confondre ``units''
  binaires et dcimales, et sachez que l'espace libre rapport par df
  pour un disque vide est de quelques pour-cent infrieur  la taille de
  la partition, ce  cause d'un en-tte de gestion.

  Maintenant, si vous pensez qu'il y a tout de mme des problmes, ou
  simplement si vous tes curieux, lisez la suite.


  33..  UUnniittss eett ttaaiilllleess

  Un kilo-octet (Ko) est gal  1000 octets (NdT : un octet se dit byte
  en anglais, et est abrg avec un `B' en majuscule. A ne pas confondre
  avec un bit, qui se dit bit et qui est abrg avec un `b' en minuscule
  !).  Un Mga-octet (Mo) est gal  1000 Ko.  Un Giga-octet (Go) est
  gal  1000 Mo.  Un Tra-octet (To) est gal  1000 Go.  Ceci est la
  norme dans le Systme International (SI).

  Cependant, il y a des personnes qui utilisent la conversion
  1Mo=1024000 octets et parlent de disquettes de 1,44Mo, et des
  personnes qui pensent que 1Mo=1048576 octets.  L, je me reporte au
  standard propos, et j'cris Ki, Mi, Gi, Ti pour les units binaires,
  de telle sorte que les disquettes ont une taille de 1440 Kio (1,47 Mo,
  1,41 Mio), 1 Mio est gal  1048576 octets (1,05 Mo), 1 Gio reprsente
  1073741824 octets (1,07 Go) et 1 Tio vaut 1099511627776 octets (1,1
  To).

  D'une manire assez normale, les constructeurs de disques durs suivent
  la norme SI et utilisent des units dcimales. Cependant, les messages
  de dmarrage de Linux et quelques programmes de type fdisk utilisent
  les symboles MB et GB (Mo et Go en franais) pour les units binaires,
  ou binaires-dcimales mlanges. Donc, avant que vous ne pensiez que
  votre disque est plus petit que ce qu'on vous avait promis lors de son
  achat, calculez sa vrai taille en units dcimales (ou simplement en
  octets).


  33..11..  TTaaiillllee dd''uunn sseecctteeuurr

  Dans le cadre de ce texte, un secteur a une taille de 512 octets.
  Ceci est pratiquement toujours vrai, mais certains disques Magnto-
  Optiques par exemple, utilisent une taille de secteur gale  2048
  octets, et toutes les capacits donnes ci-dessous doivent tre
  multiplies par quatre. (Si vous utilisez fdisk sur de tels disques,
  assurez-vous d'avoir une version 2.9i ou suprieure, et passez lui
  l'option `-b 2048'.)


  33..22..  TTaaiillllee dd''uunn ddiissqquuee

  Un disque avec C cylindres, H ttes (NdT : tte se dit head en
  anglais, d'o l'abrviation ;-)) et S secteurs par piste possde en
  tout C*H*S secteurs, et peut stocker C*H*S*512 octets.  Par exemple,
  si sur un disque dur il est crit C/H/S=4092/16/63, alors celui-ci a
  4092*16*63=4124736 secteurs, et peut contenir 4124736*512=2111864832
  octets (2,11 Go).  Il y a une convention dans l'industrie qui consiste
   donner C/H/S=16383/16/63 pour les disques durs de plus de 8,4 Go, et
  donc la taille du disque ne peut plus tre dduite des valeurs C/H/S
  rapportes par ce dernier.


  44..  AAccccss  uunn ddiissqquuee dduurr

  Si on veut lire ou crire quelque chose  partir de, ou sur un disque
  dur, il faut spcifier une position sur ce disque, en donnant par
  exemple un numro de secteur ou de bloc.  Si le disque dur est de type
  SCSI, alors ce numro de secteur va directement au moteur de commande
  SCSI et est compris par le disque.  Si le disque dur est de type IDE
  et qu'il utilise le mode LBA, alors il se passe exactement la mme
  chose. Mais si le disque dur est vieux, RLL, MFM ou IDE avant
  l'apparition du LBA, alors l'lectronique qui lui est attache attend
  un triplet (cylindre, tte, secteur) pour dsigner l'endroit voulu.

  La correspondance entre la numrotation linaire et cette notation
  tridimensionnelle est la suivante : pour un disque dur avec C
  cylindres, H ttes et S secteurs/pistes, la position (c,h,s) en 3D, ou
  la notation CHS, est la mme que la position c*H*S + h*S + (s-1) en
  notation linaire ou bien LBA.  (Le -1 est d au fait que
  traditionnellement les secteurs sont numrots  partir de 1 et non 0,
  dans cette notation 3D.)

  En consquence, pour permettre des accs  un trs vieux disque non-
  SCSI, nous devons connatre sa _g__o_m__t_r_i_e, c'est--dire les valeurs de
  C, H et S.


  44..11..  LLeess aaccccss ddiissqquueess dduu BBIIOOSS eett llaa lliimmiittee ddeess 11002244 ccyylliinnddrreess

  Linux ne se sert pas du BIOS, mais d'autres systmes d'exploitation le
  font. Le BIOS, qui existait avant le temps du LBA, offre avec INT13
  des routines d'Entre/Sortie disque qui prennent (c,h,s) comme
  arguments.  (Plus prcisment : AH slectionne la fonction  excuter,
  CH correspond aux 8 bits de poids faible du numro de cylindre, CL a
  dans ses bits 7-6 les deux bits de poids fort de ce mme numro et
  dans ses bits 5-0 le numro du secteur, DH est le numro de la tte,
  et DL est le numro du lecteur (80h ou 81h). Ceci explique en partie
  l'agencement de la table des partitions.)

  Donc, nous obtenons un CHS cod sur trois octets, avec 10 bits pour le
  numro du cylindre, 8 bits pour le numro de tte, et 6 bits pour le
  numro de secteur sur la piste (numrot de 1  63). Il s'ensuit que
  le numro de cylindre peut prendre des valeurs allant de 0  1023 et
  que le BIOS ne peut pas adresser plus de 1024 cylindres.

  Les logiciels DOS et Windows n'ont pas volu quand furent introduits
  les disques IDE avec le support LBA, et ont toujours eu besoin du
  soutien d'une gomtrie pour grer les disques durs, mme quand cela
  n'a plus t ncessaire pour effectuer des Entres/Sorties, mais
  uniquement pour converser avec le BIOS. Ceci signifie bien sr que
  Linux a besoin du support de la gomtrie du disque dur quand il est
  ncessaire de communiquer avec le BIOS ou avec d'autres systmes
  d'exploitation, mme sur des disques durs modernes.

  Cet tat de choses a dur pendant  peu prs quatre ans. Ont alors
  commenc  apparatre sur le march des disques durs qui ne pouvaient
  plus tre adresss avec les fonctions INT13 ( cause du fait que
  10+8+6=24 bits pour (c,h,s) ne peuvent pas adresser plus de 8,5 Go),
  et une nouvelle interface BIOS a t cre : les dnommes Fonctions
  INT13 Etendues, o DS:SI pointe sur un paquet reprsentant l'adressage
  du disque sur 16 octets, qui contient un nombre absolu de blocs
  commenant par 8 octets.

  Tout doucement, le monde Microsoft semble aller vers une utilisation
  de ces Fonctions INT13 Etendues. Probablement, dans quelques annes,
  plus aucun systme moderne plac dans un ordinateur moderne n'aura
  besoin du concept de `gomtrie de disque dur'.


  44..22..  HHiissttooiirree dduu BBIIOOSS eett ddeess lliimmiitteess ddee ll''IIDDEE


     SSppcciiffiiccaattiioonn AATTAA ((ppoouurr lleess ddiissqquueess dduurrss IIDDEE)) -- llaa lliimmiittee ddeess 113377
        GGoo
        Au plus 65536 cylindres (numrots de 0  65535), 16 ttes
        (numrotes de 0  15), 255 secteurs par piste (numrots de 1 
        255), pour une capacit totale maximale de 267386880 secteurs
        (de 512 octets chacun), ce qui fait 136902082560 octets (137
        Go). Ce n'est pas encore un problme (en 1999), mais a le
        deviendra dans quelques annes.


     BBIIOOSS IInntt 1133 -- llaa lliimmiittee ddeess 88,,55 GGoo
        Au plus 1024 cylindres (numrots de 0  1023), 256 ttes
        (numrotes de 0  255), 63 secteurs par piste (numrots de 1 
        63) pour une capacit totale maximale de 8455716864 octets (8,5
        Go). De nos jours, ceci est une srieuse limitation. Cela
        signifie que DOS ne peut utiliser les actuels disques de grande
        capacit.


     LLaa lliimmiittee ddeess 552288 MMoo
        Si les mmes valeurs c,h,s sont utilises pour les appels aux
        fonctions Int13 du BIOS et pour les oprations d'Entres/Sorties
        du disque dur, alors les deux limitations s'ajoutent, et l'on ne
        peut utiliser au plus que 1024 cylindres, 16 ttes, 63 secteurs
        par piste, ce qui donne une capacit totale maximale de
        528482304 octets (528 Mo), l'abominable limite des 504 Mio pour
        DOS avec un vieux BIOS.  Ceci a commenc  poser des problmes
        aux alentours de 1993, et les gens ont eu recours  toutes
        sortes de bidouillages, aussi bien au niveau matriel (LBA),
        qu'au niveau du microprogramme (NdT : le `firmware') (les
        conversions du BIOS), ou qu'au niveau logiciel (les
        gestionnaires de disques durs).  Le concept de `conversion' a
        t invent (1994) : un BIOS pouvait utiliser une gomtrie
        quand il s'adressait au lecteur, et une autre gomtrie, fausse
        celle-l, quand il parlait  DOS, et faire des conversions de
        l'une  l'autre.


     LLaa lliimmiittee ddeess 22,,11 GGoo ((aavvrriill 11999966))
        Quelques vieux BIOS n'utilisent qu'un champ de 12 bits en RAM
        CMOS pour donner le nombre de cylindres. De ce fait, ce nombre
        peut tre au plus gal  4095, et l'on ne peut accder qu'
        4095*16*63*512=2113413120 octets. Le fait d'avoir un disque dur
        de plus grande capacit se traduirait par un plantage au moment
        du dmarrage. Ceci a pour effet de rendre les disques avec une
        gomtrie de 4092/16/63 assez populaires. Et encore de nos
        jours, beaucoup de gros disques durs ont un cavalier qui permet
        de faire croire qu'ils ont une gomtrie de 4092/16/63.  Vous
        pouvez galement jeter un coup d'oeil  la page plus de 2 Go.


     LLaa lliimmiittee ddeess 33,,22 GGoo
        Il y avait un bug dans la gestion des BIOS Phoenix 4.03 et 4.04
        qui bloquait le systme lors de la configuration du CMOS pour
        des disques durs ayant une capacit suprieure  3277 Mo. Jetez
        un oeil  la page plus de 3 Go.


     LLaa lliimmiittee ddeess 44,,22 GGoo ((ffvvrriieerr 11999977))
        Une conversion simple du BIOS (ECHS = CHS Etendu, parfois appel
        `Large disk support' ou simplement `Large') fonctionne en
        doublant le nombre de ttes et en divisant par deux le nombre de
        cylindres montrs au DOS, de manire rpte, jusqu' ce que le
        nombre de cylindres soit au plus gal  1024.  Maintenant, DOS
        et Windows 95 ne peuvent pas supporter 256 ttes de lecture, et
        donc, dans le cas frquent o le disque dit avoir 16 ttes, cela
        signifie que cette moulinette ne fonctionne que jusqu' une
        taille de 8192*16*63*512=4227858432 octets (avec une fausse
        gomtrie de 1024 cylindres, 128 ttes et 63 secteurs par
        piste). Remarquez que ECHS ne modifie pas le nombre de secteurs
        par piste, donc si ce n'est pas 63, la limite sera encore plus
        basse. Voyez la page plus de 4 Go.


     LLaa lliimmiittee ddeess 77,,99 GGoo
        Des BIOS un peu plus malins que les autres vitent le problme
        prcdent en ajustant d'abord le nombre de ttes  15 (`revised
        ECHS'), de faon  ce qu'une fausse gomtrie comportant 240
        ttes soit obtenue. C'est donc valable pour une taille allant
        jusqu' 1024*240*63*512=7927234560 octets.


     LLaa lliimmiittee ddeess 88,,44 GGoo

        En dfinitive, si le BIOS fait tout ce qu'il peut pour russir
        la conversion, et utilise 255 ttes et 63 secteurs par piste
        (`assisted LBA' ou simplement `LBA') il peut atteindre
        1024*255*63*512=8422686720 octets, soit lgrement moins que la
        prcdente limite de 8,5 Go, ce parce que les gomtries avec
        256 ttes doivent tre vites. (Cette conversion utilisera pour
        le nombre de ttes la premire valeur H, prise dans la suite 16,
        32, 64, 128, 255, pour laquelle la capacit totale du disque dur
        tient dans 1024*H*63*512, et calcule alors le nombre de
        cylindres C comme tant gal  la capacit totale divise par
        (H*63*512).)

  Pour une autre discussion sur ce sujet, vous pouvez consulter la page
  Breaking the Barriers, et pour encore plus de dtails, IDE Hard Drive
  Capacity Barriers.

  Les disques durs de plus de 8,4 Go sont supposs donner leur gomtrie
  comme tant 16383/16/63. Cela signifie en fait que la `gomtrie' est
  obsolte, et qu'elle ne peut plus servir  calculer la taille totale
  d'un disque dur.






  55..  DDmmaarrrraaggee

  Quand le systme est mis en route, le BIOS lit le secteur 0 (connu
  sous le nom de MBR - le "Master Boot Record", la donne principale
  d'amorage) du premier disque dur (ou de la disquette, ou du cd-rom),
  et saute au code trouv  cet endroit - en gnral un chargeur
  d'amorce. Les petits chargeurs trouvs  cet endroit n'ont, par
  principe, pas leur propre gestionnaire de disques durs, et utilisent
  plutt les services du BIOS. Cela signifie qu'un noyau Linux ne peut
  tre charg que s'il est entirement situ dans les 1024 premiers
  cylindres du disque.

  Ce problme est rsolu de manire trs simple : assurez-vous que le
  noyau (et peut-tre d'autres fichiers utiliss pendant la phase de
  dmarrage, comme les fichiers `map' de LILO) soit situ sur une
  partition qui est comprise toute entire dans les 1024 premiers
  cylindres d'un disque dur auquel le BIOS peut accder - il est
  probable qu'il s'agisse du premier ou du second disque.

  Ainsi, crez une petite partition, disons d'une taille de 10 Mo, de
  telle manire  ce qu'il y ait de la place pour une poigne de noyaux,
  en vous assurant qu'elle soit contenue entirement dans les 1024
  premiers cylindres du premier ou du second disque dur. Montez-le en
  tant que rpertoire /boot ; ainsi, LILO pourra y mettre ses propres
  fichiers.



  55..11..  LLIILLOO eett ll''ooppttiioonn ``lliinneeaarr''

  Un autre point est que le programme d'amorage et le BIOS doivent tre
  d'accord sur la gomtrie du disque dur. LILO demande la gomtrie au
  noyau, mais de plus en plus d'auteurs de gestionnaires de disques durs
  suivent la mauvaise habitude qui consiste  dduire une gomtrie 
  partir de la table de partitions, plutt que de dire  LILO ce que le
  BIOS va utiliser. Donc, la gomtrie fournie par le noyau est souvent
  inutile.  Dans de tels cas on peut faciliter la tche  LILO en lui
  passant l'option linear.  Il en rsulte que LILO n'a pas besoin
  d'information sur la gomtrie au moment d'installer le programme
  d'amorage (il stocke des adresses linaires dans des cartes :
  fichiers `map') mais fait la conversion des adresses linaires au
  moment du dmarrage.  Pourquoi ceci n'est-il pas le comportement par
  dfaut ? En fait, il y a un inconvnient : avec l'option `linear',
  LILO ne connat plus les numros de cylindres, et par consquent ne
  peut plus vous avertir quand une partie du noyau a t enregistre au-
  del de la limite du cylindre 1024, et vous pouvez vous retrouver avec
  un systme qui ne dmarre plus.


  55..22..  11002244 ccyylliinnddrreess ccee nn''eesstt ppaass 11002244 ccyylliinnddrreess

  Tim Williams a crit : "J'avais ma partition Linux en dessous des 1024
  premiers cylindres, et a ne dmarrait quand mme pas. Au dbut quand
  je l'ai dplace en dessous de 1 Go, les choses fonctionnaient."
  Comment cela est-il possible ? En fait, c'tait un disque dur SCSI
  avec un contrleur AHA2940UW qui utilise soit H=64, S=32
  (c'est--dire, des cylindres de 1Mio = 1,05 Mo), soit H=255, S=63
  (c'est--dire, des cylindres de 8,2 Mo), en fonction des options du
  micro-code du disque dur, et du BIOS. Il ne fait aucun doute que le
  BIOS se basait sur le premier groupe de valeurs, c'est pourquoi la
  limite des 1024 cylindres tait trouve  1 Gio, alors que Linux
  utilisait la seconde mthode et LILO estimait que la limite tait 
  8,4 Go.



  66..  GGoommttrriiee dduu ddiissqquuee dduurr,, ppaarrttiittiioonnss eett ``oovveerrllaapp''

  Si vous avez plusieurs systmes d'exploitation sur vos disques durs,
  alors chacun utilise une ou plusieurs partitions. Un dsaccord sur la
  localisation de ces partitions peut avoir des consquences
  catastrophiques.


  Le MBR contient une _t_a_b_l_e _d_e_s _p_a_r_t_i_t_i_o_n_s qui dcrit o se situent les
  partitions (primaires). Il y a 4 entres  la table, pour 4 partitions
  primaires, et chacune ressemble  :


       struct partition {
               char active;    /* 0x80 : on peut dmarrer avec, 0 : on ne peut pas */
               char begin[3];  /* CHS pour le premier secteur */
               char type;
               char end[3];    /* CHS pour le dernier secteur */
               int start;      /* numro de secteur sur 32 bits (en commenant  0) */
               int length;     /* nombre de secteurs sur 32 bits */
       };




  (avec CHS qui signifie Cylinder/Head/Sector).

  Cette information est redondante : la position de la partition est
  donne  la fois par les champs begin et end cods sur 24 bits, et par
  les champs start et length cods sur 32 bits.

  Linux ne se sert que des champs start et length, et ne peut de ce fait
  que prendre en compte des partitions qui ne comportent pas plus de
  2^32 secteurs, c'est--dire, des partitions d'au plus 2 Tio. Cette
  capacit est des centaines de fois plus grande que celle des disques
  durs que l'on peut trouver de nos jours, alors peut-tre que cela sera
  suffisant pour, environ, les huit prochaines annes.  (Donc, les
  partitions peuvent tre trs grandes, mais il y a une srieuse
  restriction avec le systme de fichier ext2 quand il est utilis sur
  des machines avec des entiers cods sur 32 bits : la taille maximale
  d'un fichier est limite  2 Gio.)

  DOS utilise les champs begin et end, et se sert des appels INT13 du
  BIOS pour accder aux disques durs, il ne peut grer de ce fait que
  des disques dont la taille ne dpasse pas 8,4 Go, mme avec un BIOS
  qui fait des conversions. (La taille des partitions ne peut pas
  excder 2,1 Go  cause des restrictions du systme de fichier FAT16.)
  La mme chose est valable pour Windows 3.11, WfWG, Windows NT 3.* et
  Novel NetWare.

  Windows 95 intgre la gestion des interfaces INT13 Etendues, et
  utilise des types de partition spciaux (c, e, f  la place de b, 6,
  5) pour indiquer que l'on doit accder  la partition de cette
  manire.  Quand ces types de partition sont utiliss, les champs begin
  et end contiennent des informations factices (1023/255/63).  Windows
  95 OSR2 introduit le systme de fichier FAT32 (types de partition b ou
  c), qui permet d'avoir des partitions d'au plus 2 Tio.

  Qu'est ce que c'est que ce message insens que vous rapporte fdisk au
  sujet de partitions qui se chevauchent : `overlapping', quand pourtant
  tout est en ordre ?  En fait - il y a quelque chose de
  `problmatique' : si vous voyez les champs begin et end de telles
  partitions, comme DOS le fait, il y a chevauchement. (Et ceci ne peut
  pas tre corrig, parce que ces champs ne peuvent pas stocker des
  numros de cylindre plus grands que 1024 - il y aura toujours
  `chevauchement' ds que vous aurez plus de 1024 cylindres.)
  Cependant, si vous voyez les champs start et length, comme les voit
  Linux, et galement Windows 95 dans le cas de partitions types c, e
  ou f, alors tout apparat comme tant en ordre.  Donc, ne tenez pas
  compte de ces avertissements quand cfdisk ne se plaint pas et que vous
  avez un disque dur avec uniquement Linux dessus. Soyez prudents quand
  le disque dur est partag avec DOS. Servez-vous des commandes cfdisk
  -Ps /dev/hdx et cfdisk -Pt /dev/hdx pour voir la table des partitions
  du disque /dev/hdx.




  77..  CCoonnvveerrssiioonn eett GGeessttiioonnnnaaiirreess ddee DDiissqquueess DDuurrss

  La gomtrie des disques durs (avec ttes, cylindres et pistes) est
  une notion qui date de l'ge de MFM et RLL. En ces temps l cela
  correspondait  une ralit physique. Aujourd'hui, avec l'IDE ou le
  SCSI, plus personne n'est intress par les `vritables' valeurs de la
  gomtrie d'un disque dur.  En effet, le nombre de secteurs par piste
  est variable - il y en a plus pour les pistes proches du bord
  extrieur du disque - donc il n'y a pas de `bon' nombre de secteurs
  par piste.  Pratiquement  l'oppos : la commande IDE, INITIALIZE
  DRIVE PARAMETERS (91h) est utilise pour renseigner le disque dur sur
  le nombre de ttes et de secteurs par piste qu'il est sens avoir  ce
  moment prcis.  Il est assez normal de voir un gros disque dur rcent
  qui n'a que 2 ttes, rapporter qu'il en a 15 ou 16 au BIOS, pendant
  que le BIOS peut  son tour dire au logiciel qui va s'en servir qu'il
  en a 255.

  Pour l'utilisateur, le mieux est de voir le disque dur comme un
  tableau linaire de secteurs numrots 0, 1, ..., et de laisser le
  micro-code trouver o, sur le disque dur, est situ tel ou tel
  secteur. Cette numrotation linaire est appele LBA.

  Donc,  prsent, la vision conceptuelle est la suivante : DOS, ou quel
  que soit le programme d'amorage, converse avec le BIOS en se servant
  de la notation (c,h,s). Le BIOS convertit (c,h,s) en notation LBA en
  utilisant la gomtrie factice dont l'utilisateur se sert. Si le
  disque dur accepte le LBA, alors cette valeur est utilise pour les
  Entres/Sorties sur le disque. Autrement, elle est  nouveau convertie
  en (c',h',s') en utilisant la gomtrie dont le disque se sert cette
  fois l, et qui est utilise pour les Entres/Sorties.

  Remarquez qu'il y a une lgre confusion dans l'utilisation de
  l'expression `LBA' : En tant que terme dcrivant les possibilits d'un
  disque dur, cela signifie `Linear Block Adressing' - Adressage de
  blocs de manire linaire - (par opposition  un adressage CHS). En
  tant que terme de configuration du BIOS, il dcrit la mthode de
  conversion parfois appele `Assisted LBA' - voir plus haut : ```La
  limite des 8,4 Go'''.

  Un comportement  peu prs identique apparat quand le micro-code ne
  parle pas le LBA, mais que le BIOS connat la conversion. (Dans la
  configuration il est souvent mentionn `Large'.) Donc, le BIOS va
  prsenter une gomtrie (C,H,S) au systme d'exploitation, et va
  utiliser (C',H',S') quand il parlera au contrleur du disque dur.
  Habituellement, S = S', C = C'/N et H = H'*N, o N est la plus petite
  puissance de deux qui garantisse C' <= 1024 (ainsi un minimum d'espace
  disque est perdu au moment de l'arrondi dans C' = C/N).  Encore une
  fois, cela permet un accs  8,4 Go maximum (7,8 Gio).

  (La troisime option de configuration est `Normal', pour laquelle
  aucune conversion n'est effectue.)



  Si un BIOS ne connat pas `Large' ou `LBA', alors il existe quelque
  part une solution logicielle. Les gestionnaires de disques durs comme
  OnTrack ou EZ-Drive remplacent les routines de gestion de disque du
  BIOS par les leurs.  Ceci est souvent ralis en faisant rsider le
  code du gestionnaire de disque dans le MBR et les secteurs suivants
  (OnTrack nomme ce code DDO : Dynamic Drive Overlay - recouvrement
  dynamique de disque), comme a, il est charg avant n'importe quel
  autre systme d'exploitation. C'est pourquoi on peut avoir des
  problmes en dmarrant depuis une disquette quand un gestionnaire de
  disque dur a t install.

  Le rsultat est plus ou moins le mme avec un BIOS qui fait des
  conversions - mais particulirement, c'est quand on utilise plusieurs
  systmes d'exploitation sur le mme disque dur que ces gestionnaires
  peuvent poser beaucoup de problmes.

  Depuis sa version 1.3.14, Linux supporte le gestionnaire de disque dur
  OnTrack.  EZ-Drive quant  lui est support depuis la version 1.3.29.
  Quelques dtails supplmentaires sont donns dans ce qui suit.



  88..  LLeess ccoonnvveerrssiioonnss dduu nnooyyaauu ppoouurr lleess ddiissqquueess dduurrss IIDDEE

  Si le noyau de Linux dtecte la prsence de gestionnaire de disque sur
  un disque dur IDE, il va essayer de recartographier le disque de la
  mme manire que l'aurait fait le gestionnaire de disque, comme a
  Linux voit le mme partitionnement pour, par exemple, DOS avec OnTrack
  ou EZ-Drive.  Cependant, AUCUNE recartographie n'est effectue quand
  une gomtrie a t passe en ligne de commande - donc une option de
  la ligne de commande comme `hd=_c_y_l_s,_t__t_e_s,_s_e_c_s' peut trs bien briser
  la compatibilit avec un gestionnaire de disque.

  La nouvelle cartographie est obtenue en essayant les valeurs 4, 8, 16,
  32, 64, 128, 255 pour le nombre de ttes (H*C reste constant) jusqu'
  ce que C <= 1024 ou que H = 255.

  Ci-dessous les dtails - les titres des sous-sections sont les
  messages qui apparaissent dans les diffrents messages de dmarrage.
  Ici et partout ailleurs dans ce texte, les types des partitions sont
  donns en hexadcimal.



  88..11..  EEZZDD

  EZ-Drive est dtect par le fait que le type de la premire partition
  primaire est 55. La gomtrie est recartographie comme dcrit ci-
  dessus, et la table des partitions du secteur 0 est supprime -  la
  place, la table des partitions est celle lue sur le secteur 1. Le
  nombre de blocs du disque n'est pas chang, mais les critures sur le
  secteur 0 sont rediriges vers le secteur 1. Ce comportement peut tre
  modifi en recompilant le noyau avec  #define FAKE_FDISK_FOR_EZDRIVE
  0  dans ide.c.


  88..22..  DDMM66 :: DDDDOO

  OnTrack DiskManager (sur le premier disque dur) est dtect grce au
  type 54 de la premire partition primaire. La gomtrie est
  recartographie comme dcrit ci-dessus et la totalit du disque est
  dcale de 63 secteurs (comme a, l'ancien secteur 63 devient le
  numro 0). Ensuite un nouveau MBR (avec une table des partitions) est
  lu depuis le nouveau secteur 0. Bien sr ce dcalage a pour but de
  librer de la place pour le DD0 - c'est pourquoi il n'y a pas de
  dcalage sur les autres disques durs.
  88..33..  DDMM66 :: AAUUXX

  OnTrack DiskManager (sur les autres disques durs) est dtect grce au
  type 51 ou 53 de la premire partition primaire. La gomtrie est
  recartographie comme dcrit ci-dessus.


  88..44..  DDMM66 :: MMBBRR

  Une version plus ancienne de OnTrack DiskManager n'est pas dtecte
  grce au type de partition, mais par signature. (Un test est effectu
  pour savoir si la valeur de dcalage trouve dans les octets 2 et 3 du
  MBR n'est pas suprieure  430, et si le short trouv  cette valeur
  de dcalage est gal  0x55AA et qu'il est suivi par un octet impair.)
  Une fois encore, la gomtrie est recartographie comme dcrit ci-
  dessus.


  88..55..  PPTTBBLL

  Finalement, il y a un test qui tente de dduire une conversion 
  partir des valeurs start et end de la partition primaire : si
  n'importe quelle partition a comme secteurs de dbut et de fin
  respectivement 1 et 63, et comme dernier numro de tte 31, 63, 127 ou
  254, alors,  partir du moment o il est habituel de terminer des
  partitions sur une limite de secteur, et qui plus est depuis que
  l'interface IDE utilise au plus 16 ttes, il est suppos qu'une
  conversion du BIOS est active, et la geomtrie est recartographie
  pour utiliser respectivement 32, 64, 128 ou 255 ttes.  Cependant, le
  disque n'est pas recartographi quand la vision actuelle de la
  gomtrie a dj 63 secteurs par piste et au moins autant de ttes
  (cela signifie sans doute qu'il a dj t recartographi).


  99..  CCoonnssqquueenncceess

  Qu'est-ce que tout cela signifie ? Pour les utilisateurs de Linux
  seulement une chose : qu'ils doivent s'assurer que LILO et fdisk
  utilisent la bonne gomtrie, o `bonne' pour fdisk est dfinie comme
  la gomtrie utilise par les autres systmes d'exploitation sur le
  mme disque dur, et pour LILO comme la gomtrie qui va permettre des
  changes valides avec le BIOS au moment du dmarrage. (En gnral les
  deux vont de pair.)

  Comment fdisk connat-il la gomtrie ?  Il demande au noyau en
  utilisant l'ioctl HDIO_GETGEO.  Mais l'utilisateur peut passer outre
  ceci en prcisant la gomtrie de manire interactive, ou sur la ligne
  de commande.

  Comment LILO connat-il la gomtrie ?  Il demande au noyau en
  utilisant l'ioctl HDIO_GETGEO.  Mais l'utilisateur peut passer outre
  ceci en utilisant l'option `disk=' dans le fichier /etc/lilo.conf
  (voyez la page de manuel lilo.conf(5)).  On peut galement passer
  l'option linear  LILO, il va alors stocker des adresses LBA  la
  place des CHS dans son fichier `map', et retrouvera la gomtrie 
  utiliser au moment du dmarrage (en utilisant la fonction 8 de INT13
  pour connatre la gomtrie du disque dur).

  Comment le noyau sait-il rpondre ?  Et bien, en tout premier lieu,
  l'utilisateur doit avoir spcifi de manire explicite la gomtrie
  avec la commande en ligne du noyau `hda=_c_y_l_s,_t__t_e_s,_s_e_c_s' (voyez la
  page de manuel bootparam(7)).  Sinon, le noyau devra deviner,
  probablement en se servant des valeurs obtenues  partir du BIOS ou du
  matriel lui-mme.


  1100..  DDttaaiillss


  1100..11..  DDttaaiillss ddee ll''IIDDEE -- lleess sseepptt ggoommttrriieess

  Le gestionnaire IDE a cinq sources d'information concernant la
  gomtrie. La premire (G_user) est celle donne par l'utilisateur sur
  la ligne de commande.  La deuxime (G_bios) est la `BIOS Fixed Disk
  Parameter Table' - table des paramtres de disque fixe du BIOS - (pour
  le premier et second disque dur seulement) qui est lue au dmarrage du
  systme, avant le passage au mode 32 bits. Les troisime (G_phys) et
  quatrime (G_log) sont donnes par le contrleur IDE en rponse  la
  commande IDENTIFY - ce sont les gomtries `physique' et `logique du
  moment'.

  D'un autre ct, le gestionnaire a besoin de deux valeurs pour la
  gomtrie : d'abord G_fdisk, donne par un ioctl HDIO_GETGEO, et
  ensuite G_used, qui est effectivement utilise pour les
  Entres/Sorties. G_fdisk et G_used sont toutes deux initialises avec
  la valeur de G_user si elle est fournie, avec G_bios quand le CMOS dit
  que cette valeur est prsente, et avec G_phys autrement. Si G_log
  semble vraisemblable, alors G_used est positionne  cette valeur.
  Sinon, si G_used n'est pas vraisemblable et que G_phys semble l'tre,
  alors G_used prend la valeur de G_phys. Ici, `vraisemblable' signifie
  que le nombre de ttes est compris dans l'intervalle 1-16.

  En d'autres termes : la ligne de commande prend le pas sur le BIOS et
  va dterminer ce que va voir fdisk, mais si elle donne une gomtrie
  convertie (avec plus de 16 ttes), alors pour les Entres/Sorties
  qu'effectuera le noyau elle sera elle-mme remplace par les valeurs
  que fournira la commande IDENTIFY.

  Remarquez que G_bios est assez peu fiable : pour des systmes qui
  dmarrent depuis un priphrique SCSI, les premier et second disques
  durs peuvent trs bien tre SCSI ; et la gomtrie que le BIOS aura
  donn pour sda sera utilise par le noyau pour hda.  Du reste, les
  disques durs qui ne sont pas dclars dans la configuration du BIOS ne
  sont pas vus par ce dernier. Cela signifie que, par exemple, dans un
  systme uniquement IDE o hdb n'est pas dclar dans la configuration,
  les gomtries rapportes par le BIOS pour les premier et second
  disques vont tre appliques  hda et hdc.


  1100..22..  DDttaaiillss ppoouurr llee SSCCSSII

  La situation pour le SCSI est lgrement diffrente, puisque les
  commandes SCSI utilisent dj les numros de blocks logiques, donc une
  `gomtrie' est compltement hors de propos pour les vritables
  Entres/Sorties.  Cependant, le format de la table des partitions est
  toujours le mme, donc fdisk ne fait pas la diffrence entre des
  disques IDE et SCSI.  Comme on peut le voir  partir de la description
  dtaille ci-dessus, chaque gestionnaire de disques s'invente une
  gomtrie diffrente. Un gros foutoir en fait.

  Si vous n'utilisez pas DOS ou un quivalent, alors vitez toute
  configuration qui met en jeu des conversions tendues, et utilisez
  simplement 64 ttes, 32 secteurs par piste (cela a pour effet de
  donner une valeur tout  fait sympathique et commode de 1Mio par
  cylindre), si possible, comme a il n'y aura pas de problme quand
  vous dplacerez le disque dur d'un contrleur  un autre. Certains
  gestionnaires de disque SCSI (aha152x, pas16, ppa, qlogicfas,
  qlogicisp) sont si sensibles au sujet de la compatibilit avec le DOS
  qu'ils ne permettront pas  un systme uniquement Linux d'utiliser
  plus de 8 Gio. C'est un bug.


  Quelle est la vraie gomtrie ?  La rponse la plus facile est qu'elle
  n'existe pas.  Et si elle existait, vous ne voudriez pas la connatre,
  et  coup sr JAMAIS, AU GRAND JAMAIS ne devrez en dire quoi que ce
  soit  fdisk ou  LILO ou au noyau.  C'est uniquement une histoire
  entre le contrleur SCSI et le disque dur.  Laissez-moi le redire :
  seules les personnes stupides donnent  fdisk,  LILO ou au noyau la
  vritable gomtrie d'un disque SCSI.

  Mais si vous tes curieux et que vous insistez, vous devez demander au
  disque dur lui-mme. Il y a l'importante commande READ CAPACITY qui
  donnera la capacit complte du disque dur, et il y a la commande MODE
  SENSE, qui, dans la Rigid Disk Drive Geometry Page (page 04) donne le
  nombre de cylindres et de ttes (c'est une donne qui ne peut pas tre
  change), et dans la Format Page (page 03) donne le nombre d'octets
  par secteur, et de secteurs par piste. Ce dernier nombre est
  typiquement dpendant du rang, et le nombre de secteurs par piste
  varie - les pistes extrieures ont plus de secteurs que les pistes
  intrieures. Le programme Linux scsiinfo donnera cette information. Il
  y a de nombreux dtails et complications, et il est clair que personne
  (probablement mme pas le systme d'exploitation) ne dsire utiliser
  cette information. Du reste, tant que nous ne nous intressons qu
  fdisk et  LILO, on a typiquement des rponses du style
  C/H/S=4476/27/171 - valeurs qui ne peuvent pas tre utilises par
  fdisk parce que la table des partitions ne rserve que 10,8 et 6 bits
  pour respectivement C/H/S.

  Mais alors, d'o le HDIO_GETGEO du noyau tire-t-il ses informations ?
  Et bien, soit du contrleur SCSI, soit en faisant une supposition
  claire.  Certains gestionnaires de disque semblent croire que nous
  voulons connatre la `ralit', mais bien sr nous ne voulons savoir
  que ce que FDISK de DOS ou de OS/2 (ou AFDISK de Adaptec, etc...)
  utiliseront.

  Remarquez que le fdisk de linux a besoin des nombres H et S de ttes
  et de secteurs par piste pour convertir les nombres de secteurs LBA en
  adresses c/h/s, mais le nombre de cylindres C ne joue aucun rle.
  Quelques gestionnaires de disque utilisent (C,H,S) = (1023,255,63)
  pour signaler que la capacit du disque dur est d'au moins 1023*255*63
  secteurs. Ce n'est pas de chance, puisqu'ils ne rvlent pas la vraie
  taille, et limiteront les utilisateurs de la plupart des versions de
  fdisk  n'avoir accs qu' environ 8 Gio de leur disque - une srieuse
  limitation de nos jours.

  Dans le texte ci-dessous, M reprsente la capacit totale du disque
  dur, et C, H, S, le nombres de cylindres, de ttes et de secteurs par
  piste.  Il suffit de donner H, S si l'on voit C comme tant dfini par
  M / (H*S).

  Par dfaut, H=64 et S=32.


     aahhaa11774400,, ddttcc,, gg__NNCCRR55338800,, tt112288,, wwdd77000000 ::
        H=64, S=32.


     aahhaa115522xx,, ppaass1166,, ppppaa,, qqllooggiiccffaass,, qqllooggiicciisspp ::
        H=64, S=32  moins que C ne soit suprieur  1024, auquel cas
        H=255, S=63, C = min(1023, M/(H*S)).  (Comme a C est tronqu,
        et H*S*C n'est pas une approximation de la capacit M du disque
        dur. Ceci va drouter la plupart des versions de fdisk.) Le code
        de ppa.c utilise M+1  la place de M et dit qu' cause d'un bug
        dans sd.c, M est plus petit de 1.


     aaddvvaannssyyss ::
        H=64 et S=32  moins que C ne soit suprieur  1024 ou que,
        encore mieux, l'option du BIOS `> 1 GB' ait t active, auquel
        cas H=255 et S=63.


     aahhaa11554422 ::
        Demande au contrleur lequel des deux schmas de conversion est
        utilis, et se sert soit de H=255, S=63, soit de H=64, S=32.
        Dans le dernier cas, il y a un message au dmarrage qui dit
        "aha1542.c: Using extended bios translation" ("aha1542.c:
        Utilisation du mode de conversion tendu du bios")


     aaiicc77xxxxxx ::
        H=64 et S=32  moins que C ne soit suprieur  1024 ou que,
        mieux encore, le paramtre de dmarrage "extended" ait t
        pass, ou que le bit `extended' ait t positionn dans la
        SEEPROM ou dans le BIOS, auquel cas H=255, S=63.  Dans Linux
        2.0.36 ce mode de conversion tendu devrait toujours tre
        automatiquement utilis si il n'y a pas de SEEPROM, mais dans
        Linux 2.2.6, si le mme cas se prsente, le mode de conversion
        tendu est utilis seulement si l'utilisateur le demande au
        travers du paramtre de dmarrage (de ce fait, quand une SEEPROM
        est trouve, le paramtre de dmarrage est ignor).  Cela
        signifie qu'une configuration qui fonctionne en 2.0.36 peut ne
        pas dmarrer avec un noyau 2.2.6 (LILO ncessite alors le mot-
        cl `linear', ou le noyau a besoin du paramtre
        `aic7xxx=extended' au dmarrage).


     bbuussllooggiicc ::
        H=64 et S=32  moins que C ne soit suprieur  1024, ou que,
        encore mieux, le mode de conversion tendu ait t autoris au
        niveau du contrleur, auquel cas si M < 2^22 alors H=128, S=32 ;
        sinon H=255, S=63. Cependant, aprs avoir fait ce choix pour
        (C,H,S), la table des partitions est lue, et si pour l'une des
        trois possibilits (H,S) = (64,32), (128,32), (255,63) la valeur
        endH=H-1 est vue quelque part, alors cette paire est utilise,
        et le message "Adopting Geometry from Partition Table"
        ("Adoption de la gomtrie lue dans la table des partitions")
        est affich au dmarrage.


     ffddoommaaiinn ::
        Il trouve l'information sur la gomtrie dans la Table des
        Paramtres des Disques du BIOS (BIOS Drive Parameter Table), ou
        lit la table des partitions et utilise H=endH+1, S=endS pour la
        premire partition,  condition qu'elle ne soit pas vide, ou
        utilise H=64, S=32 pour M < 2^21 (1 Gio), H=128, S=63 pout M <
        63*2^17 (3.9 Gio) et H=255, S=63 dans les autres cas.


     iinn22000000 ::
        Il utilise le premier couple (H,S) = (64,32), (64,63), (128,63),
        (255,63) qui rendra C < 1024. Dans le dernier cas, C est ramen
         la valeur 1023.


     sseeaaggaattee ::
        Il lit C,H,S depuis le disque dur. (Horreur !) Si C ou S sont
        trop grands, alors il fixe S=17, H=2 et double la valeur de H
        tant que C <= 1024. Cela signifie que H sera mis  0 si M >
        128*1024*17 (1.1 Gio). C'est un bug.


     uullttrraassttoorr aanndd uu1144__3344ff ::
        Un de ces trois couples de rfrence est utilis ((H,S) =
        (16,63), (64,32), (64,63)) en fonction du mode de cartographie
        du contrleur.


  Si le gestionnaire ne prcise pas la gomtrie, nous retombons dans un
  mode de supposition guid par la table des partitions, ou par la
  capacit totale du disque dur.

  Regardez la table des partitions. Puisque par convention les
  partitions se terminent  la limite d'un cylindre, nous pouvons, tant
  donn que end = (endC,endH,endS) pour n'importe quelle partition,
  simplement fixer H = endH+1 et  S = endS. (Il est rappel que le
  dcompte des secteurs commence  1.)  Plus prcisment, voil ce qui
  est fait : s'il existe une partition non vide, prendre la partition
  avec le plus grand begin. Pour cette partition, regarder endH+1,
  calcul  la fois en additionnant start et length, et en assumant le
  fait que cette partition se termine  la limite d'un cylindre. Si les
  deux valeurs concordent, ou si endC = 1023 et start+length est un
  multiple entier de (endH+1)*endS, alors accepter le fait que cette
  partition se termine effectivement sur la frontire d'un cylindre, et
  fixer H = endH+1 et S = endS.  Si cela choue, soit parce qu'il n'y a
  pas de partition, soit parce qu'elles ont des tailles bizarres, il
  faut uniquement se fier  la capacit totale M du disque dur.
  Algorithme : fixer H = M/(62*1024) (arrondi au chiffre suprieur), S =
  M/(1024*H) (arrondi au chiffre suprieur), C = M/(H*S) (arrondi au
  chiffre infrieur).  Ceci a pour effet de gnrer un triplet (C,H,S)
  avec C gal  1024 au plus, et S gal  62 au plus.


  1111..  LLaa lliimmiittee ddee LLiinnuuxx ppoouurr ll''IIDDEE  88GGiioo

  Le gestionnaire IDE de Linux obtient la gomtrie et la capacit d'un
  disque (et beaucoup d'autres choses) en utilisant une requette ATA
  IDENTIFY. Rcemment encore le gestionnaire ne croyait pas en la valeur
  retourne pour lba_capacity si elle tait plus de 10% suprieure  la
  capacit calcule par C*H*S.  Cependant, par suite d'un accord entre
  les industriels, les disques IDE de grande capacit donnent les
  valeurs C=16383, H=16 et S=63, pour un total de 16514064 secteurs (7.8
  Go) indpendemment de leur taille relle, mais donnent cette taille
  relle dans lba_capacity.

  Les noyaux rcents de Linux (2.0.34, 2.1.90), savent cela et agissent
  en consquence. Si vous avez un noyau Linux plus ancien et que vous ne
  voulez pas passer  une version plus rcente, et que ce dit noyau ne
  voit que 8 Gio d'un bien plus gros disque dur, alors essayez de
  remplacer la routine lba_capacity_is_ok dans
  /usr/src/linux/drivers/block/ide.c par quelque chose du genre


       static int lba_capacity_is_ok (struct hd_driveid *id) {
               id->cyls = id->lba_capacity / (id->heads * id->sectors);
               return 1;
       }




  Pour une modification plus sre, voyez le noyau 2.1.90.


  1111..11..  CCoommpplliiccaattiioonnss dduu BBIIOOSS

  Comme nous venons de le dire, les gros disques durs donnent la
  gomtrie C=16383, H=16, S=63 indpendamment de leur vraie taille,
  alors que cette dernire est visible par la valeur de LBAcapacity.
  Certains BIOS ne savent pas cela, et convertissent ce 16383/16/63 en
  quelque chose qui a moins de cylindres et plus de ttes, par exemple
  1024/255/63 ou 1027/255/63. Donc, le noyau ne doit pas seulement
  reconnatre la gomtrie particulire 16383/16/63, mais galement
  toutes ses versions mutiles par le BIOS.  Depuis le noyau 2.2.2 ceci
  est fait correctement (en prenant la vision du BIOS de H et S, et en
  calculant C = capacit/(H*S)).  En gnral, ce problme est rsolu en
  mettant le disque en mode Normal dans la configuration du BIOS (ou,
  encore mieux, a None, ne le dclarant pas du tout au BIOS). Si cela
  est impossible parce que vous devez dmarrer  partir de ce disque
  dur, ou l'utiliser avec DOS/Windows, et que vous n'envisagez pas un
  passage au noyau 2.2.2 ou mieux, utilisez les paramtres de dmarrage
  du noyau.

  1111..22..  LLeess ccaavvaalliieerrss

  Beaucoup de disques durs IBM ont de cavaliers qui vous permettent de
  choisir entre des gomtries  15 ou  16 ttes. Le rglage par dfaut
  vous donnera une gomtrie  16 ttes. Parfois, les deux gomtries
  adressent le mme nombre de secteurs, parfois la version  15 ttes
  est plus petite.  Vous devez avoir une bonne raison pour changer cette
  valeur : Petri Kaukasoina a crit : `Un disque dur IBM Deskstar 16 GP
  de 10.1 Go (modle IBM-DTTA-351010) avait ses cavaliers positionns
  pour prsenter 16 ttes par dfaut mais ce vieux PC (avec un AMI BIOS)
  ne dmarrait pas et j'ai eu  modifier les cavaliers pour le faire
  passer en 15 ttes. hdparm -i donne RawCHS=16383/15/63 et
  LBAsects=19807200. J'utilise 20960/15/63 pour avoir la capacit
  totale.'  La gomtrie 16383/15/63 n'est pas encore reconnue par le
  noyau, donc des paramtres de dmarrage explicites sont ici
  ncessaires.  Pour le positionnement des cavaliers voyez
  http://www.storage.ibm.com/techsup/hddtech/hddtech.htm.



  1122..  LLaa lliimmiittee  6655553355 ccyylliinnddrreess ddee LLiinnuuxx

  L'ioctl HDIO_GETGEO retourne le nombre de cylindres dans un short.
  Cela signifie que si vous avez plus de 65535 cylindres, le nombre est
  tronqu, et (pour une configuration SCSI typique avec 1 Mio de
  cylindres) un disque de 80 Gio peut apparatre comme ne faisant que 16
  Gio. Une fois que le problme a t dtect, il est facile de
  l'viter.


  1133..  PPaarrttiittiioonnss tteenndduueess eett ppaarrttiittiioonnss llooggiiqquueess

  ``Ci-dessus'', nous avons vu la structure du MBR (secteur 0) : code du
  programme d'amorage suivi par 4 entres de la table des partitions de
  16 octets chacunes, suivies par une signature AA55. Les entres de la
  table des partitions de type 5 ou F ou 85 (en hexadcimal) ont une
  signification particulire : elles dcrivent les partitions __t_e_n_d_u_e_s :
  espaces qui seront ultrieurement fractionns en partitions _l_o_g_i_q_u_e_s.
  (Donc, une partition tendue n'est qu'une bote, et ne peut pas tre
  utilise par elle-mme ; on utilise alors les partitions logiques
  qu'elle contient.)  Ce n'est que la position du premier secteur de la
  partition tendue qui est important. Ce premier secteur contient une
  table des partitions avec quatre entres : une est une partition
  logique, une est une partition tendue et deux sont inutilises. De
  cette manire, on obtient une chane de secteurs de table des
  partitions, disperss sur le disque dur, o le premier dcrit trois
  partitions primaires et la partition tendue, et chaque secteur de
  table des partitions qui suit dcrit une partition logique et la
  position du prochain secteur de table des partitions.

  Il est important de comprendre cela : Quand les gens font des btises
  en partitionnant leur disque, ils veulent savoir : `est-ce que mes
  donnes sont toujours l ?' Et la rponse est gnralement : `oui'.
  Mais si des partitions logiques ont t cres, alors les secteurs de
  table des partitions les dcrivant sont crits au dbut des ces
  partitions logiques, et les donnes qui taient initialement  ces
  emplacements sont perdues.

  Le programme sfdisk montre la chane complte. Par exemple,


       # sfdisk -l -x /dev/hda

       Disk /dev/hda: 16 heads, 63 sectors, 33483 cylinders
       Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

          Device Boot Start     End   #cyls   #blocks   Id  System
       /dev/hda1          0+    101     102-    51376+  83  Linux
       /dev/hda2        102    2133    2032   1024128   83  Linux
       /dev/hda3       2134   33482   31349  15799896    5  Extended
       /dev/hda4          0       -       0         0    0  Empty

       /dev/hda5       2134+   6197    4064-  2048224+  83  Linux
           -           6198   10261    4064   2048256    5  Extended
           -           2134    2133       0         0    0  Empty
           -           2134    2133       0         0    0  Empty

       /dev/hda6       6198+  10261    4064-  2048224+  83  Linux
           -          10262   16357    6096   3072384    5  Extended
           -           6198    6197       0         0    0  Empty
           -           6198    6197       0         0    0  Empty
       ...
       /dev/hda10     30581+  33482    2902-  1462576+  83  Linux
           -          30581   30580       0         0    0  Empty
           -          30581   30580       0         0    0  Empty
           -          30581   30580       0         0    0  Empty

       #




  Il est possible de construire une mauvaise table des partitions.
  Beaucoup de noyaux entrent dans une boucle s'il y a des partitions
  tendues qui pointent sur elles-mmes ou sur une partition place
  avant dans la chane. Il est possible d'avoir deux partitions tendues
  dans un de ces secteurs de table des partitions, comme a la chane de
  la table de partitions se divise.(Ceci peut arriver par exemple avec
  un fdisk qui ne reconnat pas les partitions types 5, F ou 85 comme
  tendues, et qui cre une 5  la suite d'une F.) Des programmes de
  type fdisk non standards peuvent provoquer de telles situations, et
  quelques manipulations sont ncessaires pour les rparer.  Le noyau de
  Linux acceptera une division au niveau le plus extrieur. Ainsi, vous
  pouvez avoir deux chanes de partitions logiques. C'est parfois utile
  - par exemple, on peut utiliser pour l'une le type 5 afin qu'elle soit
  vue par DOS, et pour l'autre le type 85, invisible pour DOS, comme a
  DOS FDISK ne plantera pas  cause d'une partition logique au-del du
  cylindre 1024.



  1144..  RRssoolluuttiioonn ddeess pprroobbllmmeess

  Beaucoup de personnes pensent qu'elles ont des problmes, alors qu'en
  ralit rien ne cloche. Elles peuvent galement penser que leurs
  problmes sont dus  la gomtrie du disque, alors que cela n'a rien 
  voir. Tout ce que nous avons vu ci-dessus peut vous avoir paru
  compliqu, mais matriser le domaine de la gomtrie des disques durs
  est trs facile : ne faites rien du tout, et tout ira bien ; ou
  peut-tre faudra-t-il donner  LILO le mot-cl `linear' s'il ne
  dpasse pas le stade LI au dmarrage. Regardez bien les messages de
  dmarrage du noyau, et souvenez-vous qu'au plus vous tripoterez les
  gomtries (en spcifiant le nombre de ttes et de cylindres  LILO et
   fdisk, et en les passant comme argument au noyau), au moins cela
  aura de chances de fonctionner.  En gros, les valeurs par defaut sont
  les bonnes.

  Et souvenez-vous : la gomtrie des disques durs n'est utilise nulle
  par dans Linux, donc les problmes que vous pouvez avoir en vous
  servant de Linux ne sont pas dus  a. En fait, la gomtrie des
  disques durs n'est utilise que par LILO et par fdisk. Donc, si LILO
  ne parvient pas  charger le noyau, a peut tre un problme de
  gomtrie. Si d'autres systmes d'exploitation ne comprennent pas la
  table des partitions, a peut tre un problme de gomtrie. Rien
  d'autre. En particulier, si mount ne semble pas vouloir fonctionner,
  ne vous posez jamais de question sur la gomtrie - le problme est
  ailleurs.


  1144..11..  PPrroobbllmmee :: LLiinnuuxx iinnvveennttee uunnee ffaauussssee ggoommttrriiee ppoouurr mmoonn ddiissqquuee..

  Il est assez possible qu'un disque dur obtienne une mauvaise
  gomtrie. Le noyau de Linux questionne le BIOS au sujet de hd0 et hd1
  (les disques du BIOS numrots 80H et 81H) et suppose que ces donnes
  sont pour hda et hdb.  Mais, sur un systme qui dmarre depuis du
  SCSI, les deux premiers disques peuvent trs bien tre des disques
  durs SCSI, et de ce fait il peut arriver que le cinquime disque, qui
  est hda, c'est--dire le premier disque IDE, se voit assigner une
  gomtrie appartenant  sda. Ceci est facilement rsolu en donnant, au
  dmarrage ou dans le fichier /etc/lilo.conf, les paramtres pour hda
  `hda=C,H,S' avec les valeurs appropries pour C, H et S.



  1144..22..  FFaauuxx pprroobbllmmee :: DDeess ddiissqquueess iiddeennttiiqquueess oonntt ddeess ggoommttrriieess
  ddiiffffrreenntteess ??

  `Je possde deux disques durs IBM identiques de 10 Go. Cependant,
  fdisk donne des tailles diffrentes pour les deux. Voyez :


       # fdisk /dev/hdb
       Disk /dev/hdb: 255 heads, 63 sectors, 1232 cylinders
       Units = cylinders of 16065 * 512 bytes

          Device Boot  Start      End   Blocks   Id  System
       /dev/hdb1           1     1232  9896008+  83  Linux native
       # fdisk /dev/hdd
       Disk /dev/hdd: 16 heads, 63 sectors, 19650 cylinders
       Units = cylinders of 1008 * 512 bytes

          Device Boot  Start      End   Blocks   Id  System
       /dev/hdd1           1    19650  9903568+  83  Linux native




  Comment cela est-il possible ?

  Que se passe-t-il ici ? Bien, avant tout ces disques sont rellement
  de 10 Giga : hdb a comme taille 255*63*1232*512 = 10133544960, et hdd
  a pour taille 16*63*19650*512 = 10141286400, donc tout va bien, et le
  noyau voit les deux comme des 10 Go.  Pourquoi y a-t-il cette
  diffrence de taille ? C'est parce que le noyau obtient ses donnes du
  BIOS pour les deux premiers disques IDE, et le BIOS a recartographi
  hdb pour qu'il ait 255 ttes (et 16*19650/255=1232 cylindres).
  L'arondi infrieur cote ici au moins 8 Mo.

  Si vous voulez recartographier hdd de la mme manire, donnez au noyau
  l'option de dmarrage `hdd=1232,255,63'.


  1144..33..  FFaauuxx pprroobbllmmee :: ffddiisskk  vvooiitt bbeeaauuccoouupp pplluuss dd''eessppaaccee qquuee ddff ??

  fdisk vous donnera le nombre de blocs qu'il y a sur le disque dur. Si
  vous avez cr un systme de fichier sur le disque, disons avec
  mke2fs, alors ce systme de fichier a besoin d'un peu de place pour sa
  comptabilit - typiquement quelque chose comme 4% de la taille du
  systme de fichier, un peu plus si vous demandez beaucoup de inodes 
  mke2fs. Par exemple :


       # sfdisk -s /dev/hda9
       4095976
       # mke2fs -i 1024 /dev/hda9
       mke2fs 1.12, 9-Jul-98 for EXT2 FS 0.5b, 95/08/09
       ...
       204798 blocks (5.00%) reserved for the super user
       ...
       # mount /dev/hda9 /quelque/part
       # df /quelque/part
       Filesystem         1024-blocks  Used Available Capacity Mounted on
       /dev/hda9            3574475      13  3369664      0%   /mnt
       # df -i /quelque/part
       Filesystem           Inodes   IUsed   IFree  %IUsed Mounted on
       /dev/hda9            4096000      11 4095989     0%  /mnt
       #




  Nous avons une partition de 4095976 blocs, crez sur cette dernire un
  systme de fichier ext2, montez-la quelque part, et remarquez qu'elle
  n'a que 3574475 blocs - 521501 blocs (12%) ont t perdus en inodes et
  autres pour de la comptabilit. Remarquez que la diffrence entre le
  total de 3574475 blocs et les 3369664 disponibles pour l'utilisateur
  est gale aux 13 blocs utiliss plus les 204798 blocs rservs  root.
  Cette dernire valeur peut tre change  l'aide de tune2fs. Ce `-i
  1024' n'est raisonnable que dans le cadre d'un spoule de forums
  d'utilisateurs ou quelque chose du mme style, avec normement de
  petits fichiers. Par dfaut on mettrait :


       # mke2fs /dev/hda9
       # mount /dev/hda9 /quelque/part
       # df /quelque/part
       Filesystem         1024-blocks  Used Available Capacity Mounted on
       /dev/hda9            3958475      13  3753664      0%   /mnt
       # df -i /quelque/part
       Filesystem           Inodes   IUsed   IFree  %IUsed Mounted on
       /dev/hda9            1024000      11 1023989     0%  /mnt
       #




  A prsent, seulement 137501 blocs (3,3%) sont utiliss pour les
  inodes, comme cela, nous disposons de 384 Mo de plus qu'avant.
  (Apparemment, chaque inode occupe 128 octets.) D'un autre ct, ce
  systme de fichier peut avoir au plus 1024000 fichiers (plus
  qu'assez), contre 4096000 (trop) auparavant.


































































  Mini-HOWTO Gros IDE
  Ou comment utiliser ces gros hideux sous Linux et DOS
  Patrick  LoPresti,  patl@lcs.mit.edu,  version francaise par
  Herve Mignot
  v1.1, 19 Janvier 1995.

  Les noyaux des versions de Linux ulterieures a la  version  1.1.40  de
  Linux  gerent sans aucune difficulte de gros disques IDE (c'est-a-dire
  comportant plus de 1024 cylindres). Toutefois, de nombreuses distribu-
  tions  utilisent  des versions de noyau plus anciennes sur leur disque
  d'installation, et ce Mini-HOWTO peut donc  vous  etre  utile  (--  Il
  servira surtout aux personnes utilisant conjointement Linux et MS-DOS,
  sur une meme machine. En effet, si le BIOS de cette machine n'est  pas
  un BIOS EIDE, il est necessaire de proceder comme decrit dans ce mini-
  HOWTO pour permettre une cohabitation  tranquille  des  deux  systemes
  d'exploitation.  (_N_._D_._T_.)--)

  11..  IInnttrroodduuccttiioonn

  Il  est  possible d'utiliser Linux avec de gros disques durs EIDE sans
  aucune restriction. Seuls les cas de DOS et Linux seront abordes  dans
  ce document, mais je pense que l'approche presentee ici est utilisable
  avec tout autre systeme d'exploitation.

  J'utilise actuellement la version 1.0.9 du noyau, mais tout ce qui est
  dit  ici  s'applique  pareillement  jusqu'a  la  version  1.1.34.  Les
  versions ulterieures de Linux gerent completement les disques EIDE, ce
  qui  reduit l'interet de tout ce qui suit. Je pense toutefois que cela
  continuera de fonctionner avec les versions de noyau a venir, meme  si
  cela devient inutile.

  22..  UUnn ppeeuu ddee tteecchhnniiqquuee eett ddee tteerrmmiinnoollooggiiee

  Les  secteurs  des  disques  ATA  (IDE) comportent 512 octets. On peut
  adresser un secteur de deux manieres : par son adresse  logique  (_L_B_A_,
  _L_o_g_i_c_a_l _B_l_o_c_k _A_d_d_r_e_s_s), qui est un numero compris entre 0 et le nombre
  total de secteurs du disque, ou par son adresse physique  qui  est  un
  triplet   cylindre-tete-secteur   (_C_H_S_,   _C_y_l_i_n_d_e_r_-_H_e_a_d_-_S_e_c_t_o_r).  Pour
  convertir  des  adresses  logiques  en  adresses  physiques,  il   est
  necessaire de connaitre la _g_e_o_m_e_t_r_i_e _d_u _d_i_s_q_u_e, c'est-a-dire le nombre
  de tetes par cylindre, le nombre de secteurs par tete et le nombre  de
  cylindres  qu'il  comporte.   Ces  informations  permettent  aussi  de
  calculer la taille du disque.

  Les anciens controleurs et les vieux BIOS ne permettent d'utiliser que
  l'adresse  physique  pour adresser un secteur. Tous les controleurs et
  tous les BIOS permettent d'utiliser l'adresse physique pour reperer un
  secteur.   Linux  manipule  le  plus  souvent  possible  des  adresses
  logiques, sauf au plus bas niveau, ou il effectue  une  conversion  de
  ces  adresses en adresses physiques pour dialoguer avec le controleur.
  Linux n'utilise pas le BIOS pour tout cela, sauf  pour  determiner  la
  geometrie du disque.

  La  table  des partitions contient les adresses de debut et de fin des
  partitions sous forme logique ET physique. _f_d_i_s_k  sous  DOS  et  _f_d_i_s_k
  sous  Linux  s'attendent  bien  sur  a  ce  que les deux formes soient
  coherentes entre elles pour chaque partition.  _f_d_i_s_k sous DOS  demande
  au  BIOS  la  geometrie  du  disque, et _f_d_i_s_k sous Linux la demande au
  noyau.
  C'est ici que les  choses  se  corsent.  MS-DOS  et  l'interface  BIOS
  utilisent  un  champ de dix bits pour stocker les numeros de cylindre,
  ne permettant d'utiliser que des numeros compris entre 0 et  1023,  ce
  qui  est  tout  a  fait  insuffisant  pour  les  disques  modernes qui
  comportent habituellement 63 secteurs par tete, 16 tetes par cylindre,
  et  un  tres  grand  nombre de cylindres (_N_._D_._T_. plus de 2 000 pour un
  disque de 1 Go). La solution pour pouvoir exploiter  ces  disques,  en
  depit  de  cette  limitation  est une bidouille : un BIOS EIDE ment au
  sujet de la geometrie du disque en divisant par deux (ou  par  quatre)
  le nombre de cylindres et en doublant (respectivement, en quadruplant)
  le nombre de tetes. Quand une requete comportant une adresse  physique
  lui arrive, le BIOS considerera que cette requete utilise la geometrie
  bidon et la convertira pour dialoguer avec le controleur du disque. Ce
  mecanisme est appele une _c_o_n_v_e_r_s_i_o_n _d_'_a_d_r_e_s_s_e.

  33..  LLee pprroobblleemmee

  Quand  le  noyau  Linux  demande au BIOS la geometrie du disque (il se
  contente en fait de  lire  les  parametres  CMOS),  il  obtiendra  une
  reponse  erronee  indiquant  qu'il y a plus de seize tetes. Mais Linux
  sait que cela n'est pas possible,  et  le  noyau  (source  dans  hd.c)
  abandonne  et  ignore  le disque. (Notons que meme si le BIOS retourne
  une geometrie trafiquee, les requetes faites au controleur  de  disque
  doivent  se  faire  conformement  a  la  geometrie  reelle  du disque.
  Eliminer le test effectue dans hd.c ne suffit donc pas.)

  33..11..  LLaa mmaauuvvaaiissee ssoolluuttiioonn

  Une solution est d'utiliser le programme  de  parametrage  (_s_e_t_u_p)  du
  BIOS pour supprimer completement la conversion d'adresse. On peut soit
  fixer soi-meme le nombre de cylindres/tetes/secteurs conformement a la
  geometrie  du  disque, soit simplement inhiber la conversion d'adresse
  selon ce que permet son programme de parametrage du BIOS.

  Vous pouvez alors repartitionner votre disque dur avec _f_d_i_s_k sous  DOS
  et/ou  sous  Linux,  puis  installer les deux systemes d'exploitation.
  Cela fonctionnera sous reserve d'observer les restrictions  suivantes.

  Le  probleme  reste  que le BIOS ne peut etre utilise pour acceder aux
  cylindres au-dela du 1024-ieme. Toutes vos partitions DOS devront donc
  se situer avant cette limite, ainsi que toutes informations auxquelles
  le BIOS aura besoin d'acceder.  Ainsi, LILO utilise le BIOS pour faire
  le  sale  boulot  et  donc,  si  vous voulez utiliser LILO pour lancer
  Linux, vous devez vous assurer que le noyau (plus precisement toute la
  partition  racine)  se  situe avant cette limite du 1024-ieme secteur.
  Linux, lui, accedera sans probleme a l'integralite du disque.

  33..22..  LLaa bboonnnnee ssoolluuttiioonn

  Les limitations sont toujours  genantes,  et  nous  allons  donc  nous
  debrouiller  pour les eviter. Nous devons donc continuer a utiliser le
  mecanisme de conversion d'adresses et resoudre  chacun  des  problemes
  que cela engendre.

  Pour  resoudre  le  probleme au niveau du noyau, nous allons passer en
  parametre la veritable geometrie au noyau grace a une  ligne  d'option
  au demarrage. Ceci peut se faire a partir de l'invite d'initialisation
  de        LILO,         en         tapant         <image         name>
  hd=<nb.  cylindres>,<nb. tete>,<nb. secteurs>.  On peut aussi utiliser
  un ordre append= dans le fichier de configuration de LILO  (_l_i_l_o_._c_o_n_f)
  pour que cela se fasse automatiquement.

  Le  noyau  peut  maintenant  reconnaitre  et  utiliser le disque, mais
  lorsqu'un  programme  utilisateur  (comme  _f_d_i_s_k   ou   le   programme
  d'installation  de  LILO)  demande au noyau la geometrie du disque, le
  noyau lui renvoie la  vraie  geometrie  et  non  celle  obtenue  apres
  conversion. Et donc _f_d_i_s_k sous Linux (qui interroge le noyau) et _f_d_i_s_k
  sous DOS (qui interroge le BIOS) n'utilisent pas la meme geometrie, ce
  qui  est tres genant au niveau des informations a placer dans la table
  des partitions du disque dur.  De meme, le programme d'installation de
  LILO  calculera  des  adresses physiques incompatibles avec ce dont le
  BIOS (donc LILO lors du demarrage) a besoin.

  Le probleme avec _f_d_i_s_k est simple a resoudre  :  lorsque  vous  lancez
  _f_d_i_s_k  sous  Linux,  passez  en  mode  expert,  et  fixez le nombre de
  cylindres/tetes/secteurs aux valeurs utilisables  par  le  BIOS.  Puis
  editez  votre  table des partitions et ecrivez-la, _f_d_i_s_k sous Linux et
  sous DOS seront ainsi d'accord.

  Le probleme de LILO est aussi simple  a  resoudre  :  ajouter  l'ordre
  linear  a  votre  fichier _l_i_l_o_._c_o_n_f. LILO utilisera alors des adresses
  logiques et non des adresses physiques, l'obligeant ainsi  a  calculer
  les  adresses  physiques au demarrage et non lors de son installation.
  C'est donc la geometrie fournie par le BIOS qui sera utilisee,  plutot
  que celle fournie par le noyau, et ainsi tout fonctionnera.

  33..33..  EExxeemmppllee rreessuummee

  Nous disposons d'un disque EIDE d'un giga-octet sur lequel nous allons
  installer Linux. Voici comment proceder.

  1. Noter au niveau du programme de  parametrage  (_s_e_t_u_p)  du  BIOS  la
     geometrie  trafiquee  du disque. Par exemple, il est indique que le
     disque comporte 525 cylindres, 64 tetes, et 63 secteurs.  Comme  il
     n'est  pas  possible qu'il y ait plus de seize tetes sur ce disque,
     on en deduit qu'il comporte en fait 2100 cylindres, 16 tetes et  63
     secteurs.

  2. Demarrer sous DOS, lancer fdisk pour creer une partition DOS.

  3. A  partir  d'une  disquette  de  demarrage  de  la Slackware, taper
     ramdisk hd=2100,16,63 avant le lancement du  chargement  du  noyau.
     Puis  lancer  fdisk  (sous Linux). Si on tape p, un tas de messages
     d'erreur apparait.  Passer en mode expert x,  fixer  le  nombre  de
     cylindres  a  525, le nombre de tetes a 64. Une fois revenu en mode
     normal, si on tape p pour voir la liste des partitions,  il  n'y  a
     plus  d'erreur. Il est alors possible creer ses partitions.  Ecrire
     la table, puis redemarrer avec la disquette de la Slackware (il est
     conseille de redemarrer la machine apres avoir modifie la table des
     partitions).

  4. Proceder ensuite a l'installation de la Slackware, normalement,  en
     creant (entre autres) un fichier lilo.conf classique.

  5. Editer le fichier lilo.conf (dans ce cas /mnt/etc/lilo.conf) pour y
     ajouter les lignes suivantes au debut :

     append="hd=2100,16,63"
     linear

  6. Lancer la commande lilo -r /mnt.

  7. Installer, eventuellement,  si  c'est  absolument  necessaire,  DOS
     et/ou Windows.

  Bonne chance a tous !

       Patrick LoPresti

       patl@lcs.mit.edu

  Leased_Line_mini_HOWTO
  Rob Van der  putten, rob@sput.dsl.nl
  v1.2 , Mars 1998

  Ce document traite de la configuration de modem et de pppd dans le cas
  d'une liaison composee de deux paires       torsadees .

  11..  IInnttrroodduuccttiioonn

  11..11..

  CCee ddooccuummeenntt ......

  Le terme "leased line" est ici traduit par "ligne specialisee".  C'est
  ce  qui  me  semblait  le  plus  aproprie. Cette traduction etant loin
  d'etre parfaite  ,  n'hesitez  pas  a  m'envoyer  vos  remarques  a  :
  cappeau@dil.univ-mrs.fr  .

  Ce  document  explique  comment  configurer  votre  modem et pppd pour
  utiliser une liaison specialisee composee de deux paires torsadees .

  Il ne traite ni de SLIP , ni de comment se  procurer  et/ou  installer
  pppd , ni de communication synchrone , ou de bandes courte distance.

  11..22..

  QQuu''eesstt ccee qquu''uunnee "" lleeaasseedd lliinnee ""??

  Toute liaison de communication , permanente ,point a point , louee par
  une compagnie de telecom ou une organisation  similaire.   La  liaison
  specialisee  peut utiliser des cables , tel que des paires torsadees ,
  et toute sorte de materiels , tels que  bobines  ,  transformateurs  ,
  amplificateurs , et regenerateurs.

  11..33..  PPrreerreeqquuiiss

  Vous  devez  deja  avoir  pppd  tournant sur votre systeme , ainsi que
  minicom ( ou un programme similaire ) pour configurer vos modems .

  22..

  lleess mmooddeemmss

  Une liaison  specialisee n'est pas connectee a un central telephonique
  et  ne  fournit  donc  ,  ni  alimentation CC , ni tonalite, ni signal
  occupe, ni sonnerie .  Cela signifie que vos modems sont livres a  eux
  meme , et doivent etre capables de gerer cette situation.

  Vous  devez  avoir  deux modems externes identiques , supportant aussi
  bien une ligne specialisee que le "dumb  mode"  .   Verifiez  que  vos
  modems  en  sont  capables  et  assurez  vous qu'ils sont correctement
  documentes.

  Vous aurez aussi besoin de :

  +o  2  cables  RS232  blindes  .  Le  blindage  doit  etre  connecte  a
     l'enveloppe de la prise (pas a la broche 1) de chaque cote .

  +o  Une prise RS232 utile pour les tests.

  +o  2 cordon RJ11 , un pour chaque extremite de la ligne specialisee.

  +o  comprendre les commandes 'AT' de base

  22..11..

  CCoonnffiigguurraattiioonn

  Configurez les modems a leur plus grande  vitesse possible : 57600 bps
  pour un 14400 , et 115000 bps a partir d'un 28800 .  Une fois le modem
  configure en "dumb mode" , il utilisera la vitesse a laquelle il a ete
  configure.  Configurez le modem  ,  et  son  logiciel  (Minicom)  pour
  utiliser les parametres suivant.

  +o  taux de transfert fixe (en baud , pas d'auto baud)

  +o  Controle du flot materiel bidirectionnel RTS-CTS

  +o  8 bits, sans parite , 1 bitstop

  +o  Le modem doit produire le VRAI DCD statuts

  +o  le modem NE DOIT PAS ignorer le DCD statuts(&D2 ou &D3)

     Verifiez le avec AT &V ou AT &Ix (voir la documentation du modem)

  Trouver  comment  mettre  votre  modem  en  "dumb  mode"  ,  et , plus
  important  ,  comment  l'en  sortir  ,  car  le  modem  ne  peut  etre
  reconfigure que si il n'est pas en "dumb mode" .

  Maintenant, configurez le comme suit :

  +o  reset sur le commutateur DTR  (&D3 , c'est parfois un registre S)

  +o  "leased line mode"(&Lx , voir documentation)

  +o  le  modem distant "auto answer"(S0 =1) , le modem local "originate"
     (S0 = 0)

  +o  Desactiver les codes de resultat (Q1) , parfois  le  dumb  le  fait
     pour vous .

  +o  Dumb  mode (c'est parfois un jumper) Dans ce mode, les commandes AT
     sont ignorees.  Parfois , vous devrez desactiver le  caractere  esc
     aussi.

     Ecrivez la configuration dans la memoire volatile (&W).

  22..22..

  TTeesstt

  Maintenant  ,  connectez  les  modems a 2 ordinateurs en utilisant les
  cables RS232 , et connectez les modems entre  eux  grace  aux  cordons
  RJ11 .  Utilisez un programme tel que minicom (Linux), procom ou Telix
  (DOS) sur chacun des ordinateur pour tester les modems .   Vous  devez
  etre capable de taper un texte d'un ordinateur vers l'autre et vice et
  versa . Si vous avez des dechets a l'ecran,  verifiez  la  vitesse  du
  port  COM  et  les  autres  parametres  .  Maintenant deconnectez , et
  reconnectez le cable RJ11 . Attendez que la connexion  s  '  etablisse
  d'elle  meme . Deconnectez et reconnectez les cables RS232 , allumez ,
  eteignez les modems, arretez et relancer minicom.  Les modems  doivent
  toujours  se reconnecter a la vitesse la plus haute possible (certains
  modems ayant une LED pour indiquer la vitesse).  Verifier bien  qu'ils
  ignorent  le  caractere  ESC  (+++)  .  Il  faudra  le  desactiver  si
  necessaire .

  Si tout marche , vous voudrez peut  etre  reconfigurer  vos  modems  ;
  supprimer  le  son  du  modem  distant (M0) , mettez celui du local au
  volume le plus bas (L1).

  Exemples :

               Hi-Tech

               Originate (local):
                       ATL1 &C1 &D3 &L2%D1 &W &W1

               Answer (remote):
                        ATM0 &C1 &D3 &L2%D1S0=1 &W &W1

               Tron DF

  Le caractere  ESC peut etre desactive en fixant  S2 > 127;

                Originate:
                        ATL1 &L1Q1 &C1 &D3S2=171\D1 &W

               Answer:
                       ATM0 &L2Q1 &C1 &D3S0=1S2=171\D1 &W

  22..33..

  PPppppdd

  Vous aurez besoin d'un pppd (point to point protocol deamon , un demon
  qui  gere le protocole point a point) , et d'une bonne connaissance de
  son fonctionnement . Consulter le RFC le concernant , ou le Linux pppd
  HOWTO  <http://www.freenix.org/linux/HOWTO/> si necessaire .

  Puisque  vous  n'allez  pas  utiliser  une  procedure  de login , vous
  n'utiliserez pas (m)getty , et n'aurez  pas  besoin  d'un  utilisateur
  associe au pppd qui controle la liaison . Vous n'allez pas dialoguer ,
  vous n'aurez donc pas non plus besoin d'un script pour le chat  .   En
  fait  ,  le  circuit  et  la  configuration  que  vous  venez juste de
  construire , ressemble assez a un cable null modem .

  Pour une connexion fiable , votre  setup  doit  remplir  les  criteres
  suivant :

  +o  Peut apres avoir booter votre systeme , pppd doit envoyer le signal
     DTR sur le port RS232 , attendre que le DCD arrive , et negocier la
     connexion .

  +o  Si  le  systeme  distant  est  mort , pppd doit attendre jusqu'a ce
     qu'il fonctionne a nouveau .

  +o  Si la  connexion  s'etablit  et  s'interrompt  ensuite,  pppd  doit
     reinitialiser  le  modem (en mettant DTR au niveau bas , puis haut)
     puis essayer de se reconnecter .

  +o  Si la qualite de la  connexion   se  deteriore  trop  ,  pppd  doit
     reinitialiser le modem , et re-etablir la connexion.

  +o  Si  le  processus  controlant  la connexion , ici pppd , meurt , un
     watchdog doit le relancer.

  33..  CCoonnffiigguurraattiioonn

  33..11..  EExxeemmppllee

  On suppose que le modem est connecte au port COM2 ,  l'adresse  locale
  est  'Loc_Ip'  ,  et l'adresse Ip distante est 'Rem_Ip' . Nous voulons
  utiliser 576 pour  notre   MTU  .   Le  script  /etc/ppp/options.ttyS1
  devrait maintenant ressembler a :

       crtscts
       mru 576
       mtu 576
       passive
       Loc_Ip:Rem_Ip
       -chap
       modem
       -pap
       persist

  Donc , si le systeme local est 192.168.1.1 , et le systeme distant est
  10.1.1.1, alors /etc/ppp/options.ttyS1 devrait  etre  sur  le  systeme
  local :

  crtscts
  mru 576
  mtu 576
  passive
  192.168.1.1:10.1.1.1
  -chap
  modem
  -pap
  persist

  et sur le systeme distant ...

       crtscts
       mru 576
       mtu 576
       passive
       10.1.1.1:192.168.1.1
       -chap
       modem
       -pap
       persist

  Si  vous utiliser beaucoup telnet pendant un transfert de fichier (par
  FTP ou par Web ) ,vous pouvez avoir envie d'utiliser un plus petit MRU
  et  MTU , tel que 296 . Cela ameliorera le temps de reponse du systeme
  distant.

  Si cela vous importe peut , vous pouvez les mettre a la valeur 1500.

  L'option "passive" limite le nombre de  tentatives  de  (re)connexion.
  l'option "persist" maintiendra pppd en cas de deconnexion ou lorsqu'il
  ne peut se connecter en premier lieu .

  33..22..

  SSccrriippttss

  Le script /usr/local/sbin/test-Rem _Host-ppp est appele par le  script
  qui  configure votre carte reseau ( /etc/init.d/network sur une Debian
  , test-Rem _Host-ppp est a remplacer par le nom des hotes distants ) .
  Ce script verifie l'existence de l'interface distante , et essayera de
  lancer pppd dans la negative . Il commence avec un  sleep  ,  verifiez
  bien  que le processus de boot configure bien les ports COM en premier
  .

  #!/bin/bash
  /usr/bin/sleep 30

  while true
  do
       if ! ( /sbin/ifconfig | grep Rem_Ip > /dev/null )
       then
            # PPP gone
                 logger "Rem_Host PPP gone ; restarted"
                 /usr/local/sbin/PRem_Host.sh &     fi
       sleep 300
  done

  Vous pouvez bien sur  enlever le 'sleep 300' , et la boucle do-done et
  lancer le tout avec cron plutot .  Certaines personnes lancent pppd de
  /etc/inittab , mais je n'ai jamais essaye.

  La route par defaut peut etre initialisee avec  l'option  defaultroute
  ou avec le script /etc/ppp/ip-up .

               #!/bin/bash
       case $2 in
            /dev/ttyS1)
                 /sbin/route add -net 0.0.0.0 gw Rem_Ip netmask 0.0.0.0
                 ;;
       esac

  Ip-up peut aussi etre utilise pour synchroniser votre horloge a l'aide
  de netdate .

  Bien sur , la route definit dans Ip-up  n'est  pas  necessairement  la
  route par defaut . Votre Ip-up definit la route vers le reseau distant
  alors que script ip-up sur le systeme distant specifie la  route  vers
  votre  reseau  .  Si votre reseau est 198.168.1.0 , et votre interface
  pppd 192.168.1.1 , le script ip-up sur la machine distante ressemble a
  ca :

       #!/bin/bash
       case $2 in
          /dev/ttyS1)
             /sbin/route add -net 192.168.1.0 gw 192.168.1.1 netmask 255.255.255.0
             ;;
       esac

  Les  bits  'case  $2'  et  '/dev/ttyS1)'   sont  la  au  cas  ou  vous
  utiliseriez plus d'une liaison ppp . Ip-up sera lance  a  chaque  fois
  qu'une   connexion   apparaitra  ,  mais  seulement  la  partie  entre
  '/dev/ttySx)' et  ';;' sera execute , definissant  la bonne route pour
  le bon ttyS.  Vous trouverez plus d'information sur le routage dans le
  NET-3-HOWTO  <http://www.freenix.org/linux/HOWTO/> , dans  la  section
  qui y est consacre.
  Bien  que  l'option  'persist '  puisse le rendre superflue , le demon
  pppd peut aussi etre relance en utilisant  ip-down;

       #!/bin/bash
       case $s in
            /dev/ttyS1)
                 /usr/bin/sleep 30
                 /usr/local/sbin/PRem_Host.sh &
                 ;;
       esac

  Le  pppd est lance grace au script  /usr/local/sbin/PRem_Host.sh :

       #!/bin/bash
       ( /usr/sbin/pppd /dev/ttyS1 115200 crtscts Loc_Ip:Rem_Ip persist ) &

  Je suppose que certaines  options  des  lignes  de  commandes  rendent
  certaines  des  options  ennoncees superflues. Mais il vaut mieux etre
  prudent ,alors desole.

  33..33..  TTeesstt

  Testez le tout de la meme maniere qu'avec les modems .  Si ca marche ,
  prenez  votre  velo  et allez brancher votre modem distant a la partie
  distante de votre liaison.

  Linux-DOS-Win95-OS2 mini-HOWTO
  Mike Harlan, r3mdh@raex.com
  v1.3.1, 11 November 1997

  Ce document prsente la procdure pour faire coexister 4 systmes
  d'exploitation sur un seul disque dur.  Adaptation franaise par Syl
  vain Mielot (Mielot@multimania.com), Ralise le 14 Mars 1999.
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Procdure



  ______________________________________________________________________


     MMiissee eenn ggaarrddee ::
        Tout dommage caus par vous  une machine suite  la lecture de
        ce HOWTO reste VOTRE FAUTE. Quand vous lisez des informations
        concernant la suppression de partitions et le formatage de
        disques, rflchissez.  Rendez-vous compte que ces actions
        auront pour rsultat la perte de vos donnes.  Donc, SAUVEGARDEZ
        D'ABORD, ET SAUVEGARDEZ SOUVENT. Cela tait le dernier
        avertissement.


     TTrruuccss ppoouurr rreennddrree hheeuurreeuuxx lleess aavvooccaattss ::
        Jusqu' nouvel ordre, les documents HOWTO Linux sont copyrights
        par leurs auteurs respectifs. Les documents HOWTO Linux peuvent
        tre reproduits et distribus en entier ou en partie, par tout
        moyen physique ou lectronique aussi longtemps que l'information
        de copyright est maintenue sur chaque copie.  La redistribution
        commerciale est autorise et encourage. Toutefois l'auteur de
        ce document doit tre mis au courant de ce genre de
        distribution.

        Toute traduction, adaptation, ou bien tout travail incorporant
        tout document HOWTO Linux doit possder ce copyright.  De cette
        manire, vous ne pouvez pas imposer de restriction  la
        distribution de ce document.  Des exceptions peuvent tre
        ventuellement accordes sous certaines conditions : contactez
        le coordinateur des HOWTO Linux  l'adresse donne ci-dessous.

        En rsum, nous souhaitons voir diffuser l'information de la
        manire la plus large qui soit. Toutefois, nous souhaitons
        garder la matrise de ces documents et nous aimerions tre
        consults avant toute diffusion des HOWTO's.

        Si vous avez des questions, vous pouvez contacter Tim Bynum, le
        coordinateur des HOWTO Linux,  l'adresse lectronique suivante
        linux-howto@sunsite.unc.edu.


     MMiissee  jjoouurr ddeeppuuiiss llaa vveerrssiioonn 11..33 ::

       Mettez  jour mon adresse lectronique.  Mon adresse a chang de
        r3mdh@imperium.net vers r3mdh@raex.com.

     MMiissee  jjoouurr ddeeppuuiiss llaa vveerrssiioonn 11..00 ::


       Mettez  jour mon adresse lectronique.  Mon adresse a chang de
        r3mdh@dax.cc.uakron.edu vers r3mdh@imperium.net.

  Maintenant...........que le spectacle commence !

  11..  IInnttrroodduuccttiioonn

  Aprs plusieurs jours de lutte et de frustration, j'ai finalement
  russi  accomplir ce que je voulais.  J'ai un PC avec un disque dur
  de 1,2Go et 16Mo de mmoire. Je voulais avoir 4 systmes
  d'exploitation sur ma machine : MSDOS v6.22, Windows 95, OS/2, et
  Linux.  Jusqu' prsent, je n'ai pas pu trouver de HOWTO Linux pour
  russir  installer chacun de ces systmes d'exploitation sur une
  machine et avoir la possibilit de dmarrer sur chacun (Il est
  possible d'crire les OS sur des partitions diffrentes, mais les
  faire dmarrer sans tre accroch au message "Dmarrage de MSDOS" par
  exemple, tait quelque chose que je devais russir.  Eh bien, aprs de
  nombreux essais et de nombreuses erreurs, j'ai trouv la recette
  suivante pour russir cet exploit :

  Avant de commencer la procdure d'installation pas--pas, laissez-moi
  vous donner un aperu de ce que je souhaite accomplir :


       <NAME>                      <SIZE>   <LABEL>  <PARTITION NUMBER>
       ---------------------------------------------------------------------
       MSDOS v6.22                   11MB   P1       Primary Partition 1
       ---------------------------------------------------------------------
       Windows '95                  350MB   P2       Primary Partition 2
       ---------------------------------------------------------------------
       OS/2 Boot Manager              2MB   P3       Primary Partition 3
       ---------------------------------------------------------------------
       DOS/Win Data                 511MB   E1       Primary Partition 4
       OS/2 Warp 3.0                127MB   E2       Extended into 4 logical
       Linux Slakware 3.2 Swap        XMB   E3       drives (sub-partitions)
       Linux Slakware 3.2 Native  219-XMB   E4       labeled E1-E4
       ---------------------------------------------------------------------




  Qu'est-ce que cela signifie ? Laissez-moi vous l'expliquer.  Tout
  d'abord, nous avons besoin d'utiliser les 4 partitions de notre disque
  dur.  Les partitions 1  3 sont des partitions PRIMAIRES.  Nous allons
  y installer MSDOS, Win95 et le gestionnaire de dmarrage d'OS/2 (qui a
  besoin de sa propre partition). Il nous reste une partition libre.
  Mais nous voulons avoir un disque seulement pour les donnes du DOS et
  de Win95 (cela nous donnera une large place pour stocker tous les
  fichiers ZIP que nous tlchargeons depuis Internet, ainsi que les
  programmes et les donnes de Windows 95 que nous ne pouvons installer
  par manque de place sur la partition Win95), un disque pour OS/2 et
  deux pour Linux (une partition Linux native et une partition de swap).

  Plus tard, j'ai reu de nombreuses remarques par e-mail pour savoir
  pourquoi j'avais fait 2 partitions spares pour Win95 et pour le DOS,
  et une autre pour les donnes de Win95/DOS. Voici la rponse : faire
  des partitions spares pour Win95 et DOS n'est pas ncessaire pour
  tout le monde. Peut-tre que vous n'utilisez mme plus le DOS.
  Peut-tre que Win95 est votre rponse pour tous les logiciels crits
  pour la plate-forme Microsoft. Trs bien, mais il y a de nombreuses
  personnes qui utilisent encore le DOS et qui ne peuvent vivre sans.
  Parce que le DOS peut excuter plus rapidement et plus efficacement
  les applications 16 bits ou parce que certains programmes DOS que vous
  pourriez utiliser ne fonctionnent pas sous Windows (le programme de
  configuration de la carte Gravis Ultrasound par exemple), vous devez
  tre capable de dmarrer sous DOS de temps  autre. Ce HOWTO a t
  crit dans cet esprit. Si vous avez encore des difficults  admettre
  que le mot "MSDOS" intervienne dans ce HOWTO, alors asseyez-vous et
  crivez le LINUX-WIN95-OS/2-Seulement HOWTO. :)

  Retournons  prsent au diagramme prcdent.  Comme je l'ai dit, nous
  avons 1 partition pour installer 4 choses dessus : DOS/Win (donnes),
  OS/2, et Linux native & swap.  Cela peut tre fait en crant ce que
  l'on appelle des disques logiques (ou partitions logiques en fonction
  du livre qu'on lit) avec une partition principale.  Quand nous crons
  ces disques logiques avec une partition principale, nous nous rfrons
   cette partition primaire comme une PARTITION ETENDUE, parce qu'elle
  s'tend au-del de la zone d'une simple partition principale, et  la
  place contient plus de 3 sous-partitions (disques logiques). Perdu ?
  Si c'est le cas, vous pourriez lire le manuel d'OS/2 sur ce sujet. Il
  explique les choses de faon plus claire que je ne le fais.

  Maintenant, vous devez vous arracher les cheveux en vous disant : "il
  veut installer 4 trucs sur une partition tendue, mais il vient juste
  de dire qu'on ne peut avoir que 3 sous-partitions pour installer le
  tout !" Cela est vrai, tout au moins du point de vue de MS-DOS et
  d'OS/2.  Mais l'un des puissants avantages de Linux va nous venir en
  aide : Linux peut crer plus de 3 sous-partitions sur une partition
  tendue.  Combien exactement, je ne sais pas. Mais je sais qu'il peut
  crer AU MOINS 4 partitions (ce dont nous avons besoin). Donc, pendant
  les tapes de l'installation qui suit, gardez  l'esprit que lorsque
  nous crerons des partitions en utilisant un programme MS-DOS ou OS/2,
  nous ne pourrons crer que 3 disques logiques.  Ensuite, en utilisant
  Linux, nous dcouperons l'une des partitions en deux.  Pour
  l'essentiel, vous pouvez penser qu'il s'agit de tromper MS-DOS et OS/2
  en leur faisant voir 3 partitions, mais en ralit (et pour Linux) il
  y en a bien 4.

  22..  PPrrooccdduurree


     NNOOTTEE ::
        Les nombres entre parenthses sont les nombres de Mga-octets
        que j'ai utilis sur mon disque dur de 1.2 Giga-octets.

  Maintenant, dbutons la procdure pas  pas :

  1. Lancez view.exe sur le CD Linux Slakware et crez les deux
     disquettes Linux Boot et Linux Root.  Pour plusieurs raisons, le
     programme Linux bootstrap appelle le disque Root la disquette
     Ramdisk. Je ferai rfrence  ce disque  partir de maintenant
     comme la disquette Ramdisk.

  2. Sauvegardez toutes les informations que vous souhaitez conserver
     sur une bande (ou sur tout autre moyen de sauvegarde dont vous
     disposez).

  3. Dmarrez votre ordinateur avec votre disquette MSDOS d'installation
     n1.

  4. Quand ``Starting MSDOS'' apparat,appuyez sur F5 pour ne pas
     excuter les fichiers config.sys et autoexec.bat.

  5. Lancez a:\fdisk.exe.

  6. Effacez toutes les partitions (vous aurez t prvenu : LA
     SUPPRESSION OU LA MODIFICATION D'UNE PARTITION PROVOQUERA LA PERTE
     DE TOUTES LES DONNEES SUR CETTE PARTITION !).

  7. Ajoutez une partion principale MSDOS. (11Mo)


  8. Formatez cette partition.

  9. Lancez a:\setup.exe pour installer MSDOS sur cette partition.

  10.
     Dmarrez OS/2.

  11.
     Selectionnez "installation avance".

  12.
     Lancez FDISK.  (cela peut tre fait pour vous si vous tes dans le
     programme d'installation d'OS/2.)

  13.
     Ajoutez une partition primaire aprs la partition MSDOS.  Cela va
     devenir notre partition Windows 95. (349Mo)

  14.
     Ajoutez le gestionnaire de dmarrage  la prochaine partition
     primaire. (2Mo)

  15.
     Ajoutez une partition tendue.

  16.
     Ajoutez un disque logique  cette partition tendue.  Cela va
     devenir la partie donnes de notre systme MSDOS. (511Mo)

  17.
     Ajoutez un autre disque logique  la partition tendue.  Cela va
     devenir notre systme de fichier OS/2 HPFS (``High Performance File
     System''). (127Mo)

  18.
     Ajoutez un dernier disque logique  la partition tendue en
     utilisant tout l'espace disponible restant sur cette partition.
     Cela deviendra plus tard 2 partitions sous Linux -- notre partition
     de swap et notre partition native Linux.  Mais, comme OS/2 (de la
     mme faon que le DOS) ne peut crire que sur 6 partitions par
     disque (3 primaires et 3 disques logiques logs dans une partition
     tendue), nous ne pouvons en crer qu'une seule cette fois. Et nous
     DEVONS crer cette partition.  Ne laissez pas d'espace libre en
     esprant que Linux pourra ensuite crer ses deux partitions. A
     cause de la faon de travailler du programme FDISK d'OS/2, l'ajout
     du dernier disque logique sur la partition tendue marque la FIN de
     cette partition.  Vous ne pouvez ppaass ajouter de partitions au-del
     de ce point.  Donc, en d'autres termes, la cration de ce dernier
     disque logique sert  remplir l'espace pour Linux. Plus tard, nous
     dtruirons cette partition pour en ajouter 2 nouvelles dans
     l'espace  nouveau libr.

  19.
     Ajoutez les partitions 1, 2, et 5 au gestionnaire de dmarrage.

  20.
     Rendez la partition 5 installable.

     Votre cran FDISK devrait ressembler  ceci (ou  quelque chose
     comme ceci) :






  ______________________________________________________________________

                                 FDISK

  Disk 1
  ___________________________________________________________________________

  Partition Information
  Name            Status          Access          FS Type         MBytes
  ___________________________________________________________________________

  MSDOS           Bootable        C: Primary      FAT              11
  WIN 95          Bootable         : Primary      FAT             350
                  Startable        : Primary      BOOT MANAGER      2
                  None            D: Logical      Unformatted     511
  OS/2            Installable     E: Logical      FAT             127
                  None            F: Logical      Unformatted     219

  ______________________________________________________________________





  21.
     Continuez la procdure d'installation d'OS/2.

  22.
     Redmarrez et slectionnez la partition 2 (Windows 95)  partir du
     gestionnaire de dmarrage.

  23.
     Quand le message d'erreur du systme d'exploitation apparat,
     dmarrez avec la disquette d'installation MSDOS.  Nous avons
     slectionn cette partition dans le but de ``cacher'' la partition
     MSDOS.  Le gestionnaire de dmarrage d'OS/2 est assez trange. Pour
     chaque partition dmarrable que nous avons (dans notre cas, MSDOS
     et OS/2), nous ne pouvons en avoir qu'une seule visible au mme
     moment. Cela signifie que lorsque vous dmarrez sur une partition,
     MSDOS par exemple, l'autre partition (Win95) est invisible. LES
     partitionS MSDOS et Win95 partagent une seule lettre de disque.
     C'est pourquoi, sous ``Access'' du diagramme ci-dessus, MSDOS a la
     lettre de disque C et Win95 n'en a pas.  En de telles
     circonstances, MSDOS est visible avec la lettre C et Win95 est
     invisible sans aucune lettre de lecteur. Si vous aviez dmarr
     Win95, ce serait l'inverse : MSDOS serait invisible sans lettre de
     lecteur et Win95 serait visible sur le lecteur C.  OOnn nnee ppeeuutt ppaass
     aaccccddeerr dduu ttoouutt  uunn ddiissqquuee iinnvviissiibbllee..  Si vous voulez copier des
     fichiers entre 2 disques dont seulement un peut tre visible au
     mme moment, vous devrez utiliser un disque (non dmarrable)
     intermdiaire.  Dans notre cas, le disque de donnes DOS/Win95
     (disque D 511Mo au-dessus) servira de disque commun. Vous pourriez
     demander : ``Ne pourrions-nous pas galement dmarrer avec
     Linux ?''.  La rponse est oui, nous allons le faire. Mais ne nous
     embarrassons pas de a  prsent.

  24.
     Installez MSDOS sur la Partition 2 (nous avons besoin de cela pour
     installer Windows 95).

  25.
     Dmarrez sur la Partition 2.

  26.
     Installez Windows 95 sur cette partition (si vous installez la
     version de mise  jour de Win95, vous devriez avoir besoin de la
     disquette d'installation n1 de Win 3.1 prte  tre insre).

  27.
     Dmarrez sur la Partition 1.

  28.
     Formatez la Partition 4.

  29.
     Restaurez les donnes DOS  partir d'une sauvegarde (si besoin) sur
     les partitions 1 et 4.

  30.
     Dmarrez avec la disquette de Boot de Linux.

  31.
     Continuez avec la disquette Linux Ramdisk (Root).

  32.
     Quand vous tes logg en root et que l'invite # est affiche, tapez
     ``fdisk'' et appuyez sur entre.

  33.
     Supprimez la dernire partition (celle qui a t cre  l'tape
     18).

  34.
     Ajoutez une partition de 16Mo et dclarez-la comme Linux Swap.
     (17Mo)

  35.
     Ajoutez une dernire partition avec les cylindres restant sur le
     disque et dclarez-la avec le type Linux native. (198Mo)

  36.
     Ecrivez les changements sur le secteur de dmarrage et redmarrez.

  37.
     Quand vous avez l'invite #  nouveau, lancez setup.

  38.
     Installez Linux sur la dernire partition.

  39.
     Quand vous installez LILO, assurez-vous de l'installer sur la
     racine de la dernire partition (PAS sur le MBR, sinon vous
     dtruiriez tout le travail fait dans ce HOWTO). Ajoutez seulement
     la dernire partition  LILO et positionnez le timer  zro. En
     faisant cela, lorsque vous slectionnez Linux  partir du
     gestionnaire de dmarrage d'OS/2, LILO sera activ et dmarrera
     Linux sur le disque logique de la partition tendue. Comme Linux
     est la seule partition que nous voulons activer  partir de LILO,
     nous n'avons pas besoin de timer (except si vous avez plus d'un
     noyau  charger. Dans ce cas, vous devriez placer le timer  plus
     de 0 seconde).

  40.
     Activez la partition de swap Linux (rfrez-vous au manuel
     d'installation et de dmarrage de Linux de Matt Welsh pour cela).

  41.
     Dmarrez OS/2.

  42.
     Excutez FDISK.

  43.
     Ajoutez Linux au gestionnaire d'amorage en utilisant le type de
     partition Linux NATIVE (type 83 eett nnoonn 82 !).

     Votre cran FDISK devrait maintenant ressembler  ceci (ou 
     quelque chose comme ceci) :


       ______________________________________________________________________

                                      FDISK

       Disk 1
       ___________________________________________________________________________

       Partition Information
       Name            Status          Access          FS Type         MBytes
       ___________________________________________________________________________

       MSDOS           Bootable        C: Primary      FAT              11
       WIN 95          Bootable         : Primary      FAT             350
                       Startable        : Primary      BOOT MANAGER      2
                       None            D: Logical      FAT             511
       OS/2            Bootable        E: Logical      HPFS            127
                       None             : Logical      Type 82          17
       Linux           Bootable         : Logical      Type 83         198
       ______________________________________________________________________




  ...Et voil, c'est fini !

  Envoyez-moi vos commentaires/suggestions/problmes (en dernier
  ressort, s'il vous plat!)   l'adresse lectronique suivante :
  r3mdh@raex.com.

  Mike Harlan, 11 NOV 1997




























  Le mini-HOWTO Linux+FreeBSD
  Niels Kristian Bech Jensen, nkbj@image.dk
  v1.10, 15 janvier 1999

  _T_r_a_d_u_c_t_i_o_n _r__a_l_i_s__e _p_a_r _C_h_r_i_s_t_o_p_h_e _D_e_l_e_u_z_e
  _(_C_h_r_i_s_t_o_p_h_e_._D_e_l_e_u_z_e_@_l_i_p_6_._f_r_) _2_5 _m_a_r_s _1_9_9_9.  Ce document dcrit comment
  utiliser Linux et FreeBSD sur la mme machine. Il prsente FreeBSD et
  dcrit comment les deux systmes d'exploitation peuvent inter-agir,
  par exemple en partageant la zone de swap. Il faut probablement avoir
  une certaine exprience de Linux et du partitionnement de disque dur
  (fdisk) avant de lire ce document. Les trucs ont t tests avec
  FreeBSD 2.2.2 mais devraient tre valables pour les versions plus
  rcentes. N'hsitez pas  me mler si vous avez des commentaires,
  questions ou suggestions concernant ce document. J'aimerais aussi
  avoir des infos des gens ayant utilis Linux avec NetBSD ou OpenBSD.
  ______________________________________________________________________

  Table des matires


  1. Qu'est-ce que FreeBSD ?

  2. Nommage des disques durs sous FreeBSD

     2.1 ``Partitions'' et ``tranches'' (slices) sous FreeBSD
     2.2 Nommage des disques et des partitions sous Linux et FreeBSD

  3. Partage de l'espace de swap entre Linux et FreeBSD

     3.1 Installer et prparer Linux
     3.2 Installer FreeBSD
     3.3 Utiliser la partition de swap FreeBSD sous Linux

  4. Dmarrer FreeBSD avec LILO

  5. Monter les systmes de fichiers

     5.1 Monter des systmes de fichiers UFS sous Linux
     5.2 Monter des systmes de fichiers ext2fs sous FreeBSD

  6. Excuter des binaires ``trangers''

     6.1 Excuter des binaires FreeBSD sous Linux
     6.2 Excuter des binaires Linux sous FreeBSD

  7. Sources d'informations

  8. Remerciements et aspects lgaux

     8.1 Aspects lgaux


  ______________________________________________________________________

  11..  QQuu''eesstt--ccee qquuee FFrreeeeBBSSDD ??

  FreeBSD <http://www.freebsd.org/> est un systme d'exploitation libre
  de la famille Unix, tout comme Linux. La principale diffrence rside
  dans le fait que, au contraire de Linux qui a t crit  partir de
  rien, FreeBSD est bas sur 4.4BSD-lite, les parties librement
  distribuables de 4.4BSD (Berkeley Software Distribution). Ce fait
  amne certaines personnes  suggrer que FreeBSD est plus proche du
  ``vrai'' UNIX que Linux. FreeBSD tourne uniquement sur les
  plateformes PC Intel (i386 et suivants), des ports sur les plateformes
  DEC Alpha et Sun Sparc sont en cours. NetBSD <http://www.netbsd.org/>
  et OpenBSD <http://www.openbsd.org/> sont similaires  FreeBSD, et
  tournent tous deux sur plusieurs plateformes. Les exigences
  matrielles de tous ces systmes *BSD sont  peu prs les mmes que
  celles de Linux.


  Le dveloppement de FreeBSD est gr diffrement de celui de Linux.
  Une quipe (le noyau) de dveloppeurs sert d'arbitre et dirige le
  projet. Les gros changements sont d'abord discuts sur les listes de
  discussion (_m_a_i_l_i_n_g _l_i_s_t_s). Le projet FreeBSD comprend deux arbres de
  dveloppement (comme Linux) : _`_`_-_c_u_r_r_e_n_t_'_' (courant) et _`_`_-_s_t_a_b_l_e_'_'.
  Le dveloppement des nouvelles fonctionnalits est fait dans
  ``-current'', alors que les volutions des versions ``-stable'' sont
  limites  des corrections de bogues ou  de nouvelles fonctionnalits
  minitieusement testes.

  FreeBSD peut tre utilis et (re-)distribu librement comme Linux. La
  majorit du systme est place sous le copyright BSD, le reste est
  sous la licence GNU GPL ou d'autres licences open-source
  <http://www.opensource.org/>.



  22..  NNoommmmaaggee ddeess ddiissqquueess dduurrss ssoouuss FFrreeeeBBSSDD

  Linux et FreeBSD nomment les disques durs et les partitions selon deux
  principes diffrents. Cette section dcrit les principales diffrences
  entre les deux systmes. En fait le principe de nommage de FreeBSD est
  une variation du style de nommage BSD traditionnel adapt aux
  partitions de PC. Il est donc trs proche sur ce point des autres
  systmes Unix bass sur BSD tels que NetBSD, OpenBSD, Ultrix, Digital
  Unix, SunOS et Solaris.


  22..11..  ````PPaarrttiittiioonnss'''' eett ````ttrraanncchheess'''' ((sslliicceess)) ssoouuss FFrreeeeBBSSDD

  FreeBSD a besoin d'une entre dans la table de partition primaire de
  votre disque dur. Cette partition primaire est appele ``tranche''
  (_s_l_i_c_e en anglais) dans la terminologie FreeBSD. Il utilise ensuite le
  programme disklabel pour crer plusieurs partitions logiques dans
  cette partition primaire. Ces partitions logiques sont appeles
  _`_`_p_a_r_t_i_t_i_o_n_s_'_' dans la terminologie FreeBSD. Ce concept est similaire
   la faon dont Linux (et DOS) manipule les partitions logiques dans
  une partition tendue. Vous ne pouvez pas installer FreeBSD dans une
  partition tendue cre par Linux (ou DOS). Notez que le programme
  fdisk de Linux n'affiche pas les partitions d'une tranche FreeBSD
  depuis le menu principal, mais il peut afficher l'information de
  nommage de disque (_d_i_s_k_l_a_b_e_l) BSD si on utilise la commande 'b'. Le
  rsultat sera quelque chose comme ceci (/dev/hda4 est la tranche
  FreeBSD) :

















  # fdisk /dev/hda

  Command (m for help): p

  Disk /dev/hda: 64 heads, 63 sectors, 621 cylinders
  Units = cylinders of 4032 * 512 bytes

      Device Boot   Begin    Start      End   Blocks   Id  System
   /dev/hda1   *        1        1       27    54400+  83  Linux native
   /dev/hda2           28       28       55    56448   83  Linux native
   /dev/hda3           56       56      403   701568   83  Linux native
   /dev/hda4          404      404      621   439488   a5  BSD/386

   Command (m for help): b
   Reading disklabel of /dev/hda4 at sector 1624897.

   BSD disklabel command (m for help): p

   8 partitions:
   #        size   offset    fstype   [fsize bsize   cpg]
     a:    64512  1624896    4.2BSD        0     0     0   # (Cyl.  404 - 419)
     b:   104832  1689408      swap                        # (Cyl.  420 - 445)
     c:   878976  1624896    unused        0     0         # (Cyl.  404 - 621)
     e:    64512  1794240    4.2BSD        0     0     0   # (Cyl.  446 - 461)
     f:   645120  1858752    4.2BSD        0     0     0   # (Cyl.  462 - 621)

   BSD disklabel command (m for help): q
   #




  Les lettres `a'...`f' dans la premire colonne sont les mmes
  tiquettes (_l_a_b_e_l_s) que celles utilises plus bas dans l'exemple d'une
  tranche FreeBSD. Il y a trois partitions spciales dans le jargon
  FreeBSD. La lettre `a' dsigne la partition racine, `b' la partition
  de swap tandis que `c' dsigne la tranche en entier. Voyez la
  documentation pour plus d'information sur la faon ``standard''
  d'affecter ces lettres aux diffrents types de partitions.


  22..22..  NNoommmmaaggee ddeess ddiissqquueess eett ddeess ppaarrttiittiioonnss ssoouuss LLiinnuuxx eett FFrreeeeBBSSDD

  Les disques durs sont nomms des faons suivantes sous Linux et
  FreeBSD :


                               Linux           FreeBSD
       Premier disque  IDE     /dev/hda        /dev/wd0
       Second disque   IDE     /dev/hdb        /dev/wd1
       Premier disque SCSI     /dev/sda        /dev/sd0
       Second disque  SCSI     /dev/sdb        /dev/sd1




  Les partitions (tranches FreeBSD) d'un disque IDE sont nommes de la
  faon suivante (/dev/hda est utilis comme exemple) :


                                       Linux           FreeBSD
       Premire partition primaire     /dev/hda1       /dev/wd0s1
       Deuxime partition primaire     /dev/hda2       /dev/wd0s2
       Troisime partition primaire    /dev/hda3       /dev/wd0s3
       Quatrime partition primaire    /dev/hda4       /dev/wd0s4

  Les partitions de ma tranche FreeBSD sont nommes de la faon
  suivante. Ceci est le nommage par dfaut, qu'il est possible de
  changer en faisant une installation personnalise de FreeBSD
  (/dev/hda4 est la tranche FreeBSD) :



       Nom Linux       Nom FreeBSD     Point de montage FreeBSD
       /dev/hda5       /dev/wd0s4a     /
       /dev/hda6       /dev/wd0s4b     swap
       /dev/hda7       /dev/wd0s4e     /var
       /dev/hda8       /dev/wd0s4f     /usr




  Si vous lancez dmesg sous Linux vous verrez (le noyau linux doit avoir
  t compil avec le support UUFFSS. Voyez la section ``Installer et
  prparer Linux''):



       Partition check:
        hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >





  Si vous avez install FreeBSD dans la tranche /dev/sd1s3 (/dev/sdb3
  dans le jargon Linux), et que /dev/sdb2 est une partition Linux
  tendue contenant deux partitions logiques (/dev/sdb5 et /dev/sdb6),
  l'exemple prcdent ressemblera plutt  ceci :



       Nom Linux       Nom FreeBSD     Point de montage FreeBSD
       /dev/sdb7       /dev/sd1s3a     /
       /dev/sdb8       /dev/sd1s3b     swap
       /dev/sdb9       /dev/sd1s3e     /var
       /dev/sdb10      /dev/sd1s3f     /usr




  La commande dmesg montrera ceci sous la forme


       Partition check:
        sdb: sdb1 sdb2 < sdb5 sdb6 > sdb3 < sdb7 sdb8 sdb9 sdb10 >




  Si vous avez une partition tendue Linux _a_p_r__s votre tranche FreeBSD,
  vous allez avoir des problmes. La plupart des noyaux des disquettes
  d'installation Linux ne contiennent pas le support UUFFSS, ils ne
  reconnatront donc pas les partitions FreeBSD  l'intrieur de la
  tranche. Ce qui qui aurait d tre vu comme (/dev/hda3 est la tranche
  FreeBSD et /dev/hda4 est la partition tendue Linux)



       Partition check:
        hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 > hda4 < hda9 hda10 >

  est vu comme:


       Partition check:
        hda: hda1 hda2 hda3 hda4 < hda5 hda6 >




  Cela peut rsulter en un mauvais assignement de priphrique et
  provoquer des pertes de donnes. Je conseille de _t_o_u_j_o_u_r_s mettre votre
  tranche FreeBSD aprs toutes les partitions tendues Linux, et de ne
  changer aucune partition logique dans vos partitions tendues Linux
  une fois que FreeBSD est install !


  33..  PPaarrttaaggee ddee ll''eessppaaccee ddee sswwaapp eennttrree LLiinnuuxx eett FFrreeeeBBSSDD

  Cette section dcrit comment j'ai pu utiliser la mme partition de
  swap pour Linux et FreeBSD. Il peut y avoir d'autres faons d'obtenir
  le mme rsultat. Vous pouvez, si vous voulez, installer FreeBSD avant
  Linux mais faites attention  l'ordre des partitions dans la tranche
  FreeBSD.


  33..11..  IInnssttaalllleerr eett pprrppaarreerr LLiinnuuxx

  La premire tape est d'installer Linux normalement. Il faut laisser
  de la place pour la tranche FreeBSD sur le disque dur. Il n'est pas
  ncessaire de crer une partition de swap Linux, mais si vous en
  voulez une, placez-la dans l'espace que vous voulez allouer  FreeBSD.
  De cette faon, vous pourrez plus tard effacer la partition de swap de
  Linux et rcuprer l'espace pour FreeBSD.

  Quand Linux est install, il faut compiler un nouveau noyau. Lisez le
  HHOOWWTTOO dduu nnooyyaauu LLiinnuuxx si vous ne savez pas faire. Il _f_a_u_t inclure UUFFSS
  ffiilleessyysstteemm ssuuppppoorrtt ((rreeaadd oonnllyy)) et BBSSDD ddiisskkllaabbeell ((FFrreeeeBBSSDD ppaarrttiittiioonn
  ttaabblleess)) ssuuppppoorrtt:



       UFS filesystem support (read only) (CONFIG_UFS_FS) [N/y/m/?] y
       BSD disklabel (FreeBSD partition tables) support (CONFIG_BSD_DISKLABEL) [N/y/?]
       (NEW) y




  Installez le nouveau noyau et redmarrez. Enlevez toutes les lignes
  contenant le mot _s_w_a_p dans votre fichier /etc/fstab si vous avez cr
  une partition de swap pour Linux. _S_o_y_e_z _b_i_e_n _s__r _d_'_a_v_o_i_r _u_n_e _d_i_s_q_u_e_t_t_e
  _d_e _d__m_a_r_r_a_g_e _L_i_n_u_x _e_n __t_a_t _d_e _m_a_r_c_h_e _a_v_e_c _l_e _n_o_u_v_e_a_u _n_o_y_a_u_. Vous voil
  prts  installer FreeBSD.



  33..22..  IInnssttaalllleerr FFrreeeeBBSSDD

  Installez FreeBSD comme cela est dcrit dans sa documentation.
  Supprimez la partition de swap Linux si vous en avez fait une (vous
  pouvez utiliser le programme fdisk de FreeBSD). Faites attention 
  l'ordre des partitions dans la tranche FreeBSD. Si vous utilisez le
  nommage par dfaut la seconde partition sera le swap. Terminez
  l'installation de FreeBSD et redmarrez sous Linux _e_n _u_t_i_l_i_s_a_n_t _l_a
  _d_i_s_q_u_e_t_t_e _d_e _d__m_a_r_r_a_g_e.

  33..33..  UUttiilliisseerr llaa ppaarrttiittiioonn ddee sswwaapp FFrreeeeBBSSDD ssoouuss LLiinnuuxx

  Aprs avoir redmarr Linux, lancez dmesg, ce qui devrait donner
  quelque chose comme a :



       Partition check:
        hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >




  Cela signifie que /dev/hda4 est votre tranche FreeBSD, alors que
  /dev/hda5, /dev/hda6, /dev/hda7 et /dev/hda8 sont les partitions
  FreeBSD. Si votre partition de swap est la seconde partition de la
  tranche, c'est /dev/hda6.

  Il faut placer la ligne suivante dans votre fichier /etc/fstab pour
  valider la partition de swap :



       /dev/hda6       none            swap            sw              0       0




  Alors que FreeBSD peut utiliser n'importe quelle partition comme
  espace de swap, Linux a besoin d'une signature spciale dans cette
  partition. Cette signature est cre par mkswap. FreeBSD la dtruit
  quand il utilise la partition de swap partage, il faudra donc lancer
  mkswap  chaque fois que vous dmarrez sous Linux. Pour faire ceci
  automagiquement, il faut trouver le script qui lance swapon au
  dmarrage. Dans Red Hat Linux c'est /etc/rc.d/rc.sysinit. Dans Debian
  GNU/Linux, c'est /etc/init.d/boot. Placez la ligne suivante dans ce
  fichier juste _a_v_a_n_t swapon -a :



       awk -- '/swap/ && ($1 !~ /#/) { system("mkswap "$1"") }' /etc/fstab




  Ceci lancera mkswap sur toutes les partitions de swap dfinies dans
  /etc/fstab  chaque dmarrage sauf si elles sont commentes (ont ``#''
  comme premier caractre de la ligne).

  Sous Linux, lancez free pour vrifier la taille de l'espace de swap.
  Vous devriez aussi redmarrer sous FreeBSD et vous assurer que tout
  marche comme prvu. Si ce n'est pas le cas, vous avez probablement
  utilis la mauvaise partition pour le swap (depuis Linux). La seule
  solution est de rinstaller FreeBSD et ressayer. On apprend beaucoup
  par l'exprience. :-)



  44..  DDmmaarrrreerr FFrreeeeBBSSDD aavveecc LLIILLOO

  Vous pouvez facilement dmarrer FreeBSD avec LILO. N'installez pas le
  chargeur de FreeBSD (Booteasy) si vous voulez utiliser LILO. Ajoutez
  les lignes suivantes  votre fichier /etc/lilo.conf et relancez lilo
  (la tranche FreeBSD tant /dev/hda4) :


       other=/dev/hda4
               table=/dev/hda
               label=FreeBSD




  Si vous avez install FreeBSD sur le second disque SCSI, utilisez
  quelque chose du type (la tranche FreeBSD tant /dev/sdb2):



       other=/dev/sdb2
               table=/dev/sdb
               loader=/boot/chain.b
               label=FreeBSD





  55..  MMoonntteerr lleess ssyyssttmmeess ddee ffiicchhiieerrss

  55..11..  MMoonntteerr ddeess ssyyssttmmeess ddee ffiicchhiieerrss UUFFSS ssoouuss LLiinnuuxx

  Malheureusement le support pour UFS dans les noyaux Linux 2.0.xx est
  bogu. Quand on essaye de monter un systme de fichiers UFS, on
  obtient juste des messages d'erreur (le systme de fichiers est mont,
  mais on ne peut rien y lire ou crire). Ce problme a t rsolu dans
  les versions rcentes du noyau (depuis 2.1.87).

  Il y a une autre version du support du systme de fichiers UFS pour
  les noyaux Linux 2.0.xx (xx <= 30)  SunSite
  <ftp://sunsite.unc.edu/pub/Linux/ALPHA/ufs/>. Son nom est UU22FFSS et la
  version actuelle est u2fs-0.4.3.tar.gz. Une version d'U2FS
  (ufs-0.4.4.tar.gz) pour Linux 2.0.31 et suivants (2.0.xx, pas 2.1.xx)
  se trouve sur ce site <http://www.mathi.uni-
  heidelberg.de/~flight/projects/u2fs/> avec d'autres informations sur
  U2FS (et UFS.)

  Maintenant il faut construire un nouveau noyau avec le support pour
  UU22FFSS ffiillee ssyysstteemm et BBSSDD ddiisskkllaabbeell. Voyez la section ``Installer et
  prparer Linux'' pour plus d'informations. Vous pouvez laissez tomber
  le support pour UUFFSS ffiillee ssyysstteemm quand vous utilisez UU22FFSS ffiillee ssyysstteemm.

  Quand vous avez install le nouveau noyau, vous pouvez monter les
  systmes de fichiers UFS (toutes les partitions dans la tranche
  FreeBSD sauf la partition de swap) avec une commande du type :



       mount -t u2fs /dev/hda8 /mnt




  Il faudra utiliser une commande du type :



       mount -t ufs /dev/hda8 /mnt





  si vous utilisez un noyau 2.1.87 ou suprieur.  partir de la version
  2.1.112 il faut ajouter  la commande l'option  -o ufstype=44bsd :

  mount -t ufs -o ufstype=44bsd /dev/hda8 /mnt



  Le support UFS (et U2FS) est en lecture seule. Donc, vous pouvez lire
  depuis les systmes de fichiers UFS mais pas y crire. Un pilote UFS
  exprimental en lecture/criture a remplac le pilote en lecture seule
   partir du noyau 2.1.112. L'criture dans des partitions FreeBSD est
  supporte depuis la version 2.1.127.



  55..22..  MMoonntteerr ddeess ssyyssttmmeess ddee ffiicchhiieerrss eexxtt22ffss ssoouuss FFrreeeeBBSSDD

  Pour monter des systmes de fichiers ext2fs sous FreeBSD, il faut
  construire un nouveau noyau avec le support pour ext2fs. Lisez le
  manuel FreeBSD en anglais <http://www.freebsd.org/handbook/> ou en
  franais <http://www.freebsd-fr.org/handbook/> si vous ne savez pas
  faire. Placez la ligne



       options         "EXT2FS"




  dans votre fichier de configuration du noyau pour le nouveau noyau.

  Quand vous avez dmarr avec le nouveau noyau, vous pouvez monter un
  systme de fichiers ext2fs avec une commande comme :



       mount -t ext2fs /dev/wd0s3 /mnt




  Notez que vous ne pouvez pas monter de systme de fichiers ext2fs
  d'une partition tendue depuis FreeBSD.

   cause d'une bogue dans FreeBSD 2.2.8 et prcdents vous devrez
  dmonter tous les systmes de fichiers ext2fs _a_v_a_n_t d'arrter
  (shutdown) FreeBSD. Si vous arrtez FreeBSD avec un systme de
  fichiers ext2fs mont, FreeBSD ne peut pas faire le sync sur les
  systmes de fichiers UFS. Cela rsultera en un fsck au prochain
  dmarrage de FreeBSD. Vous pouvez arranger a en plaant la ligne:

  umount -a -t ext2fs


  dans le fichier /etc/rc.shutdown. Cette bogue devrait tre corrige
  dans FreeBSD-3.x (quelqu'un peut confirmer ?)



  66..  EExxccuutteerr ddeess bbiinnaaiirreess ````ttrraannggeerrss''''

  66..11..  EExxccuutteerr ddeess bbiinnaaiirreess FFrreeeeBBSSDD ssoouuss LLiinnuuxx

  Le paquetage iBCS permet d'excuter des binaires FreeBSD sous Linux,
  mais il est vieux et non maintenu. Je n'arrive pas  le faire marcher.
  Si vous avez eu plus de russite que moi, merci de m'en informer.



  66..22..  EExxccuutteerr ddeess bbiinnaaiirreess LLiinnuuxx ssoouuss FFrreeeeBBSSDD

  FreeBSD a la capacit d'excuter des binaires Linux, dans les deux
  formats a.out et ELF. Il faut procder en trois tapes :


  1. Il faut valider la compatibilit Linux. Pour ce faire, (pour
     FreeBSD 2.2.2 --- les dtails peuvent changer avec d'autres
     versions) il faut diter votre fichier /etc/rc.conf et changer



        linux_enable="NO"



  en


       linux_enable="YES"





  et redmarrer. Une autre faon de charger le support des binaires
  Linux est d'excuter la commande /usr/bin/linux. Vous n'aurez pas 
  redmarrer, et le support ne sera pas systmatiquement charg (gain de
  mmoire). N'oubliez pas d'ajouter la ligne

  options         COMPAT_LINUX


  au fichier de configuration du noyau FreeBSD si vous compilez un nou
  veau noyau.

  2. Il faut installer les bibliothques partages de Linux si vos
     binaires Linux utilisent l'dition de lien dynamique. Ces
     bibliothques sont incluses pour FreeBSD 2.2.{2,5,6} dans le
     paquetage linux_lib-2.4.tgz (il y a peut tre des versions plus
     rcentes). Lancez la commande


        pkg_add <rep_paquetage>/linux_lib-2.4.tgz




  pour installer le paquetage. <rep_paquetage> est le rpertoire o se
  trouve le paquetage.

  Vous pouvez aussi le charger depuis le rseau par :

  pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/packages-stable/All/linux_lib-2.4.tgz


  ou en relanant /stand/sysinstall. Entrez ``Configure'', ``Packages''
  et utilisez les menus. Si vous excutez des binaires Linux statique
  ment lis, excutez la commande suivante :

  brandelf -t Linux <nom_du_binaire_linux_statiquement_li>

  3. Installez les programmes Linux que vous voulez excuter. Les
     programmes peuvent tre installs aussi bien sur un systme de
     fichiers UFS que ext2fs. Voir la section ``Monter des systmes de
     fichiers ext2fs sous FreeBSD'' pour plus d'informations sur la
     faon d'utiliser des systmes de fichiers ext2fs sous FreeBSD.

  J'ai excut avec succs les versions Linux d'Applixware 4.3 et de
  Netscape 3.01 (toutes deux en format ELF) sous FreeBSD 2.2.2 en
  utilisant cette mthode (oui, je sais qu'il existe une version FreeBSD
  de Netscape 4). Les versions Linux d'acroread et StarOffice 3 et 4
  marchent bien sous FreeBSD. StarOffice 5 dpend des _t_h_r_e_a_d_s natives
  Linux et ne marche pas sous FreeBSD. Lisez la documentation de FreeBSD
  pour plus d'informations  ce sujet.


  77..  SSoouurrcceess dd''iinnffoorrmmaattiioonnss

  La dernire version de ce mini-HOWTO peut tre trouve sur ma page web
  <http://www.image.dk/~nkbj/> en plusieurs formats (y compris SGML et
  PostScript). La version franaise peut tre trouve sur celle du
  traducteur <http://www-rp.lip6.fr/~deleuze/HOWTOS/lfbsd.html>. Ce
  document a t traduit en Japonais par M. Teruyoshi Fujiwara comme
  partie du projet JF <ftp://jf.linux.or.jp/pub/JF/other-formats/>.

  Gregor Hoffleit maintient un site <http://www.mathi.uni-
  heidelberg.de/~flight/projects/u2fs/> sur le developement de U2FS et
  UFS.

  Annelise Anderson travaille sur une FAQ Linux+FreeBSD
  <http://freebsd.stanford.edu/FreeBSD/linux.html>, qui couvrira les
  mmes sujets (et plus) que ce mini-HOWTO. Cette FAQ fera partie du
  projet freebsd-doc.

  Quelques articles sur la diffrence entre Linux et FreeBSD se trouvent
  ici <http://www.futuresouth.com/~fullermd/freebsd/bsdvlin.html>.

  Vous pouvez trouver plus d'informations sur FreeBSD (et rapatrier tout
  le systme)  l'url FreeBSD Inc. <http://www.freebsd.org/>. Vous
  pouvez aussi acheter le systme sur CDROM chez Walnut Creek CDROM
  <http://www.cdrom.com/> (leurs serveurs sont sous FreeBSD).

  Le HOWTO du noyau Linux fait partie du Projet de Documentation Linux
  <http://sunsite.unc.edu/LDP/>.


  88..  RReemmeerrcciieemmeennttss eett aassppeeccttss llggaauuxx

  Merci aux membres du groupe d'utilisateurs *BSD du Danemark
  <http://hotel.prosa.dk/bsd-dk/> pour avoir rpondu aux questions d'un
  nul en FreeBSD,  M. Takeshi Okazaki pour avoir port  ma
  connaissance l'existence de UU22FFSS et  M. David O'Brien pour ses
  prcieuses suggestions.


  88..11..  AAssppeeccttss llggaauuxx

  Les marques appartiennent  leurs propritaires.

  Bien qu'ils pensent que les informations donnes dans ce document sont
  correctes, les auteurs n'accepteront aucune responsabilit quant au
  contenu de ce document. Utilisez les trucs et exemples  vos risques
  et pril.

  Copyright  1997, 1998, 1999 par Niels Kristian Bech Jensen. Ce
  document peut tre distribu uniquement sous les termes et conditions
  de la licence LDP tels que donns  the LDP license
  <http://sunsite.unc.edu/LDP/LDP-COPYRIGHT.html>.

  La version franaise est opyright Christophe Deleuze et peut tre
  distribue selon les mmes termes.






























































  NT OS Loader + Linux mini-HOWTO
  Bernd Reichert, <reichert@dial.eunet.ch>
  Version francaise : Etienne BERNARD <bernard@isia.cma.fr>
  v1.11, 2 September 1997

  Ce document decrit l'utilisation du chargeur de systeme d'exploitation
  de Windows NT pour demarrer Linux.  Cette procedure a ete testee  avec
  Windows NT 4.0 Workstation et Linux 2.0

  11..  CCoommmmeenntt ffoonnccttiioonnnnee llee CChhaarrggeeuurr NNTT

  Le  chargeur  de systeme d'exploitation de NT aime avoir le secteur de
  boot des autres systemes d'exploitation sous forme de fichier. Il  lit
  le  fichier,  et lance le systeme d'exploitation selectionne, c'est-a-
  dire Window NT, sous differents modes,  ou  n'importe  quel  autre  OS
  (systeme d'exploitation).

  22..   TTrruuccss  eett  aassttuucceess ppoouurr iinnssttaalllleerr WWiinnddoowwss NNTT eett LLiinnuuxx ssuurr llee mmeemmee
  ssyysstteemmee

  22..11..  IInnssttaallllaattiioonn ddee WWiinnddoowwss NNTT

  Essayez d'installer Windows NT en premier. Si vous desirez utiliser le
  systeme de fichier NTFS pour  votre  partition  dediee  a  Window  NT,
  n'oubliez  pas  que  Linux  ne  permet  pas  encore  d'ecrire  sur les
  partitions NTFS.  Le driver, encore beta, pour faire cela se trouve  a
  http://www.informatik.hu-berlin.de/~loewis/ntfs.  Vous  devriez  creer
  une partition FAT pour l'echange de  donnees,  ou  vous  pouvez  aussi
  utiliser des disquettes au format DOS.

  22..22..  PPaarrttiittiioonnnneemmeenntt

  Un    autre   Mini-HOWTO   vous   conseille   de   ne   pas   utiliser
  l'"administrateur de disque" de Windows NT pour creer  les  partitions
  racine  et  de  swap  de  Linux. Il est suffisant de laisser un espace
  libre. Je recommande egalement d'utiliser le fdisk de Linux plus tard.

  22..33..  IInnssttaallllaattiioonn ddee LLiinnuuxx

  A  present,  demarrez  Linux  a  partir  des disquettes, puis creez la
  partition root et celle de swap. fdisk considere que la partition NTFS
  est  une  partition  HPFS. C'est normal. Demarrez a nouveau depuis les
  disquettes, et installez Linux a votre convenance.

  Au cas ou la procedure d'installation vous proposerait  de  monter  la
  partition HPFS qu'il a trouve, ignorez cela.

  22..44..  LLiilloo

  Une  fois  que  vous  avez atteint la section dediee a Lilo, specifiez
  votre partition root de linux en tant que peripherique  de  demarrage,
  car  le  _M_a_s_t_e_r  _B_o_o_t  _R_e_c_o_r_d (MBR) de votre disque dur est occupe par
  Windows NT. Cela signifie que les entrees root et boot dans le fichier
  /etc/lilo.conf ont les memes valeurs.  Si vous avez un disque dur IDE,
  et que  la  partition  dediee  a  Linux  se  trouve  sur  la  deuxieme
  partition,   l'entree   correspondant   a   boot   dans   le   fichier
  /etc/lilo.conf devrait ressembler a :

  boot=/dev/hda2

  Si vous possedez deux disques dur, et  que  Linux  se  trouve  sur  la
  premiere  partition  du  second  disque,  la  section  boot du fichier
  /etc/lilo.conf ressemble a :

       boot=/dev/hdb1

  Configurez lilo pour utiliser un noyau correspondant a votre  systeme.
  Au  prealable,  si  vous  n'etes pas sur de vous, verifiez le noyau en
  demarrant depuis une disquette.

  Si vous ne pouvez pas booter sous Windows NT, vous avez  un  probleme.
  J'espere que vous avez cree une disquette de reparation recemment.

  33..  LLee pprrooggrraammmmee BBoooottppaarrtt

  Il existe un programme pour Windows NT, nomme bootpart et ecrit par G.
  Vollant qui peut realiser le travail des deux  prochains  points  pour
  vous.        bootpart        peut        etre       recupere       sur
  http://ourworld.compuserve.com/homepages/gvollant/bootpart.htm.

  Si vous decidez de faire vous meme ce que fait ce programme,  utilisez
  les procedures decrites aux points 5 et 6.

  44..  LLee ttrraavvaaiill aa ffaaiirree ssoouuss LLiinnuuxx

  Vous  devrez  demarrer  a  partir  de disquettes tant que la partie du
  travail a realiser sous NT ne sera pas achevee.

  Vous devez recuperer le secteur de demarrage de votre  partition  root
  Linux.  Si  on  suppose  que  votre  partition  Linux  se  trouve  sur
  /dev/hda2, la commande a utiliser est :

       # dd if=/dev/hda2 of=/bootsect.lnx bs=512 count=1

  Si le fichier bootsect.lnx fait plus de 512  octets,  il  y  a  eu  un
  probleme.

  A  present, copiez le fichier bootsect.lnx sur une disquette au format
  DOS, si c'est la moyen que vous utilisez pour transferer des  fichiers
  sur votre partition NTFS.

  Vous pouvez utiliser la commande

  # mcopy /bootsect.lnx a:

  ou bien

       # mount -t msdos /dev/fd0 /mnt
       # copy /bootsect.lnx /mnt
       # umount /mnt

  55..  LLee ttrraavvaaiill aa ffaaiirree ssoouuss WWiinnddoowwss NNTT

  Copiez  le  fichier  de  la  disquette sur C:\bootsect.lnx. Je ne vous
  explique pas comment faire.

  Le fichier c:\boot.ini est a Windows NT ce que /etc/lilo.conf/  est  a
  Linux.  Enlevez  les  attributs  _s_y_s_t_e_m_e  et _l_e_c_t_u_r_e _s_e_u_l_e avant de le
  modifier, avec la commande :

       C:\> attrib -s -r c:\boot.ini

  Editez, avec notepad par exemple, le fichier boot.ini, comme suit :

       [boot loader]
       timeout=30
       default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
       [operating systems]
       multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
       multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
       C:\BOOTSECT.LNX="Linux"

  Seule la derniere ligne a ete ajoutee sur cet exemple.  Si  vous  avez
  change  boot.ini,  restaurez  les attributs du fichiers a leur valeurs
  initiales, avec la commande :

       C:\attrib +s +r c:\boot.ini

  Apres un redemarrage de votre Windows NT, vous devriez voir apparaitre
  ceci :

    OS Loader V4.00

    Please select the operating system to start:

    Windows NT Workstation Version 4.0
    Windows NT Workstation Version 4.0 [VGA mode]
    Linux

  (NdT:  Je  ne  sais pas ce que cela donne pour la version francaise de
  Windows NT)

  Selectionnez Linux et vous verrez apparaitre

         LILO loading Linux ....

  66..  MMeemmee jjoouueeuurr jjoouuee eennccoorree

  A chaque fois que le secteur de demarrage de votre partition Linux est
  modifie, vous devez transferer une nouvelle copie de bootsect.lnx vers
  C:\BOOTSECT.LNX.  Cela  est  par  exemple  necessaire   lorsque   vous
  installez  un nouveau noyau avec lilo. Comme vous pouvez le constater,
  un tel systeme n'est pas ideal pour tester des noyaux experimentaux.

  77..  EEnn ccaass ddee pprroobblleemmee......

  Si cela ne fonctionne pas comme prevu, verifiez que vous pouvez booter
  a  l'aide  d'une  disquette.  Si  /dev/hdb1 est votre partition Linux,
  votre fichier /etc/lilo.conf devrait avoir les entrees suivantes :

       root=/dev/hdb1
       boot=/dev/fd0

  Lancez lilo avec une  disquette  dans  le  lecteur,  puis  essayez  de
  demarrer  a  partir de cette disquette. Si Linux sur /dev/hdb1 ne peut
  etre demarre, le chargeur NT ne pourra pas le  lancer  non  plus.   Si
  vous  voyez  apparaitre  une  floppee  de 01 01 01 01, c'est que votre
  secteur de demarrage ne  peut  etre  accede.  Verifiez  que  tous  vos
  disques sont reconnus par le BIOS.

  Si  votre  disquette  vous  permet  de  demarrer  Linux,  vous  pouvez
  recuperer le secteur de demarrage de la disquette pour le chargeur  NT
  avec la commande :

       # dd if=/dev/fd0 of=/bootsect.lnx bs=512 count=1

  Vous  pouvez  garder  cette  disquette,  qui  servira  de disquette de
  secours, au cas  ou  votre  installation  de  Windows  NT  empeche  le
  demarrage de Linux.

  88..  RReeffeerreenncceess

  +o  Le mini-HOWTO Linux+WindowsNT

  +o  La FAQ de FreeBSD 2.x

  99..  RReemmeerrcciieemmeennttss

  +o  Merci   a  Xiaoming  Yi  pour  m'avoir  indique  que  la  procedure
     fonctionnait egalement pour les disques autres que le premier.

  +o  Merci a Frank        Dennler pour l'astuce de la disquette.

  1100..  CCoommmmeennttaaiirreess

  Tous les commentaires sont les bienvenus.

  Linux et Windows 95 - HOWTO
  par Jonathan Katz jkatz@in.net
  Traducteur:  Sebastien  Blondeel  <http://www.lifl.fr/~blon-
  deel> (sebastien.blondeel@lifl.fr)
  26 Oct 1996

  Ce document decrit comment proceder pour installer a la fois Linux  et
  Windows 95 sur un ordinateur.

  11..  CCoorrrreeccttiioonnss

  +o  fevrier   1998:   traduit   en  francais  par  Sebastien  Blondeel,
     Sebastien.Blondeel@lifl.fr

  +o  26 octobre 1996: complete par Jonathan Katz

  +o  25 juin 1996: remis a jour par Jonathan Katz

  +o  10 avril 1996: relu et corrige par Jonathan Katz

  +o  novembre 1995: premier jet, par Jonathan Katz, jkatz@in.net

  22..  IInnttrroodduuccttiioonn

  De nombreuses personnes ont recemment achete  de  nouvelles  machines,
  sur  lesquelles Windows 95 etait (malheureusement) pre-installe. Apres
  avoir explore l'Internet, de nombreux utilisateurs entendent parler de
  Linux  et  de  ses  semblables,  et  veulent faire tourner un meilleur
  systeme d'exploitation pour bien moins cher. Il y a bien des sujets  a
  traiter,  parce que les nouveaux ordinateurs sont generalement equipes
  de gros disques EIDE, et parce que Windows 95 dispose d'extensions  au
  vieux systeme de fichiers FAT. Linux comprend bien ces problemes et il
  est capable de gerer tout cela, au niveau  logiciel  comme  au  niveau
  materiel.

  33..  CC''eesstt ppaarrttii!!

  Linux  et  Windows  95  peuvent tres bien cohabiter sur le meme disque
  dur.  Vous pouvez aussi installer Linux sur un autre disque  dur,  sur
  la  meme machine. Si vous avez assez d'economies pour acheter un autre
  disque dur, achetez-en un sans hesiter. Bien que la cohabitation entre
  les  deux  systemes  soit  fiable  et ne presente aucun danger, il est
  preferable d'avoir un autre disque. Cependant, comme je suis un pauvre
  etudiant (ainsi que la plupart des gens que je connais,) il me faut me
  contenter d'un unique disque.

  Je suppose que votre disque dur ressemble a ceci:

          +---------------------------------
  C:      |  800M environ, peut-etre plus?
          |
          +---------------------------------

  et que Windows 95, MS-Office, Qmodem Pro, ainsi que  tous  vos  autres
  logiciels  tournant  sous  DOS  ou Windows, prennent environ 400M plus
  l'espace de pagination (swap) (ceci  est  une  hypothese  quelque  peu
  hasardeuse et sarcastique)! Je suppose que vous ne voulez pas detruire
  tous ces logiciels que vous avez passe beaucoup de temps a  configurer
  et  a  installer,  et que par consequent vous ne souhaitez pas effacer
  cette partition pour recommencer a zero.

  44..  DD''aaccccoorrdd,, jj''aaii cceettttee ppaarrttiittiioonn eett jjee vveeuuxx ll''eeppaarrggnneerr!!

  Ne perdez pas espoir. Il existe un programme appele FIPS, qui peut re-
  partitionner  votre  disque  dur sans detruire vos donnees. CEPENDANT,
  assurez-vous avant de l'utiliser, que vous venez de defragmenter votre
  disque  dur (avec la methode de defragmentation optimale). Utilisez le
  defragmenteur livre avec Windows 95 et utilisez-le dans le systeme  de
  fenetres  -  sans  quoi vous perdrez vos noms de fichiers longs. Quand
  tout est defragmente, lancez FIPS et donnez a  votre  disque  l'aspect
  qui suit:

          +-------------------------------------
  C:      | Ceci est votre partition FAT/VFAT/Win95
   450M   |
          +------------------------------------
  ???     | Ceci est l'espace libre qui commence
          | EN DESSOUS du cylindre 1024
          +------------------------------------

  Vous  trouverez  FIPS  a  votre  site  FTP  (protocole de transfert de
  fichiers)  prefere  proposant  Linux  (par  exemple   sunsite.unc.edu,
  tsx-11.mit.edu,  ftp.redhat.com,  ftp.lip6.fr),  en  general  dans  le
  repertoire

  /pub/utils/msdos

  Si vous disposez d'un CD contenant Linux, il s'y trouve habituellement
  un repertoire

  \utils\msdos

  \utils

  C'est TRES IMPORTANT que votre partition pour Linux commence avant (en
  dessous) du cylindre 1024, sans quoi vous ne pourrez pas l'utiliser  a
  l'amorcage de l'ordinateur (et ce n'est pas une tres bonne chose).

  Qu'est-ce que le cyclindre 1024 exactement? C'est la ou se termine IDE
  et ou commence EIDE sur votre disque dur -- c'est la  ``marque''  528M
  sur votre disque dur. Faites commencer votre partition Linux a environ
  520M, de telle sorte que le noyau en  entier,  ainsi  que  les  autres
  fichiers  d'amorcage  et  le  chargeur se trouvent entierement sous ce
  cylindre.

  55..  EEtt eennssuuiittee??

  Continuez et installez Linux  sur  cet  espace  libre.  Si  vous  etes
  paranoiaque,  quand  la  procedure  d'installation  de  Linux reamorce
  l'ordinateur, vous pouvez redemarrer sous Windows 95 et  vous  assurez
  qu'il  fonctionne  encore  correctement.  VEUILLEZ, VEUILLEZ, VEUILLEZ
  lire les conseils prodigues a la fin de la section 3, sans  quoi  vous
  ne pourrez pas utiliser Linux.

  Quand  il s'agira de partitionner le disque, si vous faites comme tout
  le monde, vous mettrez en place une partition Linux de  400M  (ce  qui
  est  assez  confortable), ainsi que 30M d'espace de pagination (ce qui
  est plus qu'assez).

  Vous devriez maintenant pouvoir installer toute distribution de  Linux
  dont vous diposez sans problemes.

  66..  UUttiilliisseezz vvoottrree nnoouuvveeaauu ssyysstteemmee!!

  Linux  peut  monter, lire, et ecrire dans les partitions VFAT de Win95
  de plusieurs facons. Vous pouvez utiliser le support pour  systeme  de
  fichiers  msdos  qui  a ete mis en place dans tous les noyaux a partir
  des versions 1.0. Cependant, l'utilisation de commandes telles que:

  poubelle #: mount -t msdos /dev/hda1 /mnt

  ne vous laissera manipuler que des noms de fichiers dans le  format  8
  point  3.  Beurk!  Vous  avez  Windows 95 pour avoir acces aux noms de
  fichiers longs.

  Certains utilisateurs de Linux utilisent encore d'anciens noyaux (dans
  l'Histoire  de  Linux). En d'autres mots, des noyaux 1.2.xx. Il existe
  un module pour cette serie de noyaux de telle sorte qu'un  utilisateur
  peut lire des fichiers qui ne se conforment pas au vieux standard 8.3.
  Rendez-vous                       dans                       ftp://mm-
  ftp.cs.berkeley.edu/pub/multimedia/linux/xmsdos/  et  telechargez  une
  copie du fichier README (LISEZMOI) avant de faire quoi que ce soit.

  Enfin, les noyaux recents (1.3.4x) comme la serie  tant  attendue  des
  noyaux  2.0 proposent un support pour VFAT que vous pouvez compiler en
  interne. Ces noyaux vous permettent d'ecrire sur vos  partitions  VFAT
  en toute securite.

  NNOOTTEE:: Prenez garde!

  Si  vous  faites tourner une version "recente" de Windows 95 -- c-a-d,
  une version disponible sur des ordinateurs plus recents que juin 1996,
  ainsi que sur la serie P5-MMX, veuillez lire ce qui suit.

  Assurez-vous de la version de Windows 95 que vous faites tourner. Pour
  cela, ouvrez une session DOS et tapez: "ver /r". Voici un  exemple  de
  cela:

  C:\> ver /r

  Microsoft Windows 95 [4.00.1034]
          (C) 1981-1996 Microsoft Corporation.

  Remarquez  le  numero  de revision mineur. Si ce numero est PLUS GRAND
  que 950 il se peut que vous fassiez tourner une  version  du  type  de
  partition FAT connu sous le nom de FAT32. Si c'est le cas, vous pouvez
  quand meme utiliser Linux et Windows 95, CEPENDANT, il n'existe PAS de
  support pour lire ou ecrire sur des partitions FAT32. Si c'est le cas,
  vous etes foutu.

  Que vous fassiez tourner une version recente de Windows 95 ne signifie
  pas  que  vous  fassiez  tourner  FAT32.  Lancez  "fdisk"  et utilisez
  l'option "display partition information" (affichage  des  informations
  sur la partition) pour savoir si vous utilisez FAT32.

  77..  AAUU SSEECCOOUURRSS!! JJee ssuuiiss ccooiinnccee aavveecc FFAATT3322!!

  77..11..  JJ''aaii ccee nnoouuvveell oorrddiinnaatteeuurr aacchheettee aa CCaarrrroouuffee

  Si vous installez Linux sur un disque avec FAT32 suivez les etapes qui
  precedent concernant l'installation  de  Linux  sur  un  systeme  avec
  Windows  95, mais n'installez PAS LILO. Au lieu de cela, rendez-vous a
  la  section  5.1.3  intitulee  "loadlin,  c'est  quoi?"  et  lisez  la
  procedure pas a pas pour cette situation malheureuse.

  77..22..  JJee mmee ssuuiiss ttrroommppee ---- ttoouutt eesstt ccaassssee!!

  Cela  m'est  arrive -- j'utilisais une version beta de Windows 95 avec
  FAT32, je suis passe a la version superieure de  Windows  95,  et  mon
  systeme  est  mort.   Je  n'avais  pas  de  disquette d'amorce pour la
  version de Windows 95 a laquelle je venais de  passer.  Voici  comment
  contourner le probleme.

  Mettez  la  main sur une disquette d'amorce de MS QUELCONQUE utilisant
  la version 5.0, ou une version ulterieure, de DOS. Sous Linux,  montez
  le CD de la version BETA de Windows 95. Montez egalement la disquette.

  poubelle # mount -t iso9660 /dev/cdrom  /cdrom  poubelle  #  mount  -t
  msdos /dev/fd0 /mnt

  Sur  le  CD, trouvez le repertoire "beta stuff" (trucs beta). Les gens
  de  MS   ne   le   mettent   jamais   au   meme   endroit...   essayez
  /cdrom/admin/beta/floppy,   /cdrom/betaonly/floppy.  Copiez  (cp)  les
  fichiers  io.sys,  msdos.sys,  et  command.com   sur   la   disquette.
  Synchronisez  ("sync")  et  demontez les disques que vous avez montes.
  Reamorcez  l'ordinateur  et   cette   disquette   d'amorce   *devrait*
  fonctionner.

  77..33..  LLooaaddlliinn,, cc''eesstt qquuooii??

  Loadlin  est  un executable DOS qui charge une image du noyau a partir
  d'un disque dur (ou d'une disquette) et qui amorce le reste du systeme
  d'exploitation  Linux  a  partir d'une partition racine appropriee. Si
  vous savez bien bidouiller, vous pouvez de  cette  maniere  faire  une
  installation  de  Linux sans disquette, mais nous nous contenterons de
  presenter des usages plus traditionnels. Quand  vous  amorcez  Windows
  95, enfoncez la touche F8 (quand:

  Starting Windows 95...

  apparait)  et  selectionnez  "Safe  mode,  command prompt only." (mode
  securise,  ligne  de  commande  uniquement).   Rendez-vous   dans   le
  repertoire ou vous avez mis le noyau et lancez

  C:\LINUX> loadlin.exe zimage root=/dev/hda2 ro"

  a  partir  de  la. Si vous connaissez bien les configurations sous MS-
  DOS,  vous  pouvez  programmer  plusieurs  fichiers  AUTOEXEC.BAT   et
  CONFIG.SYS  pour  voir un menu apparaitre et pouvoir choisir sous quel
  systeme d'exploitation amorcer.

  88..  DDeess pprroobblleemmeess??

  Dans le scenario inverse de ce qui precede (vous avez une machine sous
  Linux  en  etat  de  marche  et  une puissance etrangere vous oblige a
  installer Windows  95)  Windows  95  VA  ecraser  votre  MBR  (secteur
  d'amorce)  et  ainsi  ecraser  LILO.   Vous  avez  deux  possibilites:
  utiliser loadlin.exe pour charger votre noyau, et utiliser  cela  pour
  lancer  Linux,  ou  amorcer  Linux  a  partir d'une disquette et/ou de
  loadlin, puis re-installer LILO.

  Bonne chance avec votre nouveau systeme!

  -Jon
  jkatz@mac.edu
  +1 217 479-7309
  Box 4454 MacMurray College
  Jacksonville, Illinois 62650
  Personal: http://www.in.net/~jkatz
  Corinne:  http://corinne.mac.edu
  Resume:   http://www.in.net/~jkatz/resume.html
  Room-101: http://room-101.1984.org
  HOWTO:    http://www.in.net/~jkatz/win95/Linux-HOWTO.html

  Linux-Modem-Sharing mini-HOWTO
  Friedemann Baitinger <mailto:baiti@toplink.net>, traduit par
  Arnaud Gomes-do-Vale <mailto:arnaud@carrosse.frmug.org>
  Version 1.01, 2 novembre 1997

  Ce mini-HOWTO dcrit la configuration d'un systme Linux dans le but
  de partager un modem avec d'autres systmes  travers un rseau
  TCP/IP.

  11..  IInnttrroodduuccttiioonn

  Ce mini-HOWTO dcrit la configuration d'un systme Linux dans le but
  de partager un modem avec d'autres systmes  travers un rseau
  TCP/IP.


  22..  CCoonnffiigguurraattiioonn dduu sseerrvveeuurr

  Je suppose que le serveur est une machine sous Linux avec

    soit un modem rattach  un priphrique /dev/ttyS_x ;

    soit un modem virtuel mul par isdn4linux sur un port /dev/ttyI_x.

  La configuration la plus simple  laquelle je peux penser utilise un
  script perl de cinq lignes comme "dmon modem" :


       $ cat /usr/sbin/modemd

       #!/usr/bin/perl
       select((select(STDOUT), $| = 1)[$[]);
       select((select(STDIN), $| = 1)[$[]);
       exec 'cu -s 115200 -l /dev/ttyS1';
       die '$0: Cant exec cu: $!\n';




  Ce dmon est lanc par le processus inetd si un client se connecte sur
  le port appropri, comme dcrit ci-dessous. Le modemd se contente de
  connecter le socket avec l'entre standard STDIN et la sortie standard
  STDOUT de la commande cu et laisse cu piloter le vritable modem. Si
  cu n'est pas install sur votre systme, installez le paquetage UUCP,
  dont il fait habituellement partie.

  inetd doit tre averti de l'existence du dmon modem. Pour cela, il
  faut mettre  jour son fichier de configuration, en gnral
  /etc/inetd.conf, comme ceci :


       #
       # modem daemon
       #
       modem stream tcp nowait root /usr/sbin/tcpd /usr/sbin/modemd /dev/ttyS1




  Pour que cela fonctionne, il faut aussi ajouter une entre au fichier
  /etc/services :


       modem           2006/tcp        modemd


  Cette entre associe un nom symbolique  un port explicite, 2006 dans
  cet exemple. Le numro du port peut tre n'importe quoi, du moment
  qu'il n'est pas dj assign  un service existant. Aprs avoir
  procd  ces changements, il faut envoyer un signal  inetd pour lui
  faire relire son fichier de configuration :


       $ ps |grep inetd
       194  ?  S     0:00 /usr/sbin/inetd

       kill -HUP 194





  Maintenant, le serveur est prt  accepter les requtes des clients.
  Vous pouvez vrifier son bon fonctionnement :


       $ telnet localhost modem

       Trying 127.0.0.1...
       Connected to localhost.
       Escape character is '^]'.




  Vous tes maintenant connect au modem. Vous pouvez lui passer des
  commandes AT pour vrifier la configuration :


       atz
       atz
       OK

       ati1
       ati1
       Linux ISDN
       OK

       ^]
       telnet>quit
       $




  A la place du script perl, vous pouvez utiliser le programme mserver,
  disponible sur  <ftp://ftp.innet.be/pub/staff/carl/>. S'il ne s'y
  trouve plus, vous pouvez utiliser archie ou tout autre moteur de
  recherche pour trouver l'archive mserver. Jusqu' prsent, je n'ai pas
  eu l'occasion de l'installer ni de l'utiliser.


  33..  CCoonnffiigguurraattiioonn dduu cclliieenntt

  A l'heure actuelle, seule la configuration d'un client Windows est
  dcrite ici. Sur le PC client, vous aurez besoin d'un redirecteur de
  port COM vers TCP/IP. Le meilleur que j'ai trouv est DialOut/IP de
  Tactical Software, pour Windows 3.1 et Windows 95. La version 3.1 peut
  tre utilise sous Windows NT avec des applications 16 bits ; une
  version 32 bits pour Windows NT doit sortir  la fin de l't 1997.
  NdT : Actuellement, Windows 98 et NT4 sont galement supports.

  DialOut/IP prsente le modem partag comme un nouveau port COM sur la
  machine Windows. Ce port COM virtuel peut tre utilis par les
  programmes Windows comme si le modem partag tait connect
  directement. La plupart des applications clientes (y compris l'accs
  rseau  distance de Windows 95) l'acceptent et fonctionnent comme
  s'il s'agissait d'un vritable port srie,  l'exception des
  applications de fax et de tout ce qui doit accder directement 
  l'UART. DialOut/IP peut tre configur pour utiliser le protocole
  TELNET, mais cette fonction ne s'applique qu' certains racks de
  modems et pas  la configuration de Linux dcrite ici. Notez que
  malgr son nom, DialOut/IP peut aussi tre utilis par les
  applications qui attendent des appels entrants.

  Sur  <http://www.tactical-sw.com>, vous trouverez une page o vous
  pouvez tlcharger une version d'valuation totalement fonctionnelle
  utilisable pendant une  deux semaines. L'installation et la
  configuration sont assures par un programme _a_d _h_o_c, et les dtails de
  l'installation sont couverts par le fichier README.TXT. Quand vous
  lancez DialOut/IP, vous entrez l'adresse IP et le numro du port du
  modem partag.

  DialOut/IP est un produit commercial dont la licence s'applique par
  modem, c'est  dire que le prix dpend du nombre de modems que vous
  partagez. La licence dit que vous pouvez installer le logiciel sur un
  nombre quelconque de PC qui utilisent les modems partags.


  44..  CCoonnssiiddrraattiioonnss ssuurr llaa ssccuurriitt


  Si vous n'avez qu'un seul modem pour toutes les machines de votre
  rseau local, vous n'avez probablement aucune inquitude  avoir quant
   la scurit. Par contre, si une ou plusieurs machines de votre
  rseau sont connectes  internet par d'autres moyens que votre
  serveur de modem, vous devez vous pencher sur la scurit, ou
  n'importe qui pourra taper telnet votre_machine modem et lancer des
  appels longue distance ou internationaux  volont.

  Je vous suggre d'installer et de configurer les TCP-wrappers pour
  protger le serveur de modem contre les accs non autoriss.


  55..  EExxeemmpplleess


  J'utilise la configuration dcrite dans les sections prcdentes avec
  Quicken sur mon ThinkPad sous Windows 95 pour contacter ma banque 
  domicile avec le modem de ma machine Linux. Le "modem" n'en est en
  fait mme pas un, c'est une mulation qui utilise une carte ISDN-So.
  Quicken voit simplement un port srie, il ne sait pas que le
  priphrique reli au port srie est en fait  l'autre bout du rseau
  local ethernet, ni qu'il ne s'agit pas d'un modem analogique standard
  mais d'un adaptateur ISDN qui se trouve comprendre les commandes AT.


  66..  HHiissttoorriiqquuee ddee ccee ddooccuummeenntt

  V1.01, 02/11/97 Conversion du source au format HTML. Ajout de
  rfrences sur les endroits o se procurer cu et mserver. Ajout du
  paramtre -s  l'exemple d'utilisation de cu.

  V1.00, 12/06/97 Premire version.




  Le Loadlin+Win95 mini-HOWTO
  Ecrit par Chris Fischer, protek@brigadoon.com Version
  franaise, Eric Maisonobe viret@nat.fr
  v1.4.3, 9 Novembre 1998

  Ce document dcrit comment utiliser Loadlin avec Windows 95 pour
  lancer Linux.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Copyright
     1.2 Nouvelles versions de ce document
     1.3 Ractions
     1.4 Dngation

  2. IMPORTANT: Information Prliminaire et Setup

     2.1 ATTENTION! pour les utilisateurs de Windows95 OSR2 (version 4.00.950b):
     2.2 Nous considrerons comme acquis:
     2.3 Ce dont vous avez besoin avant de commencer:

  3. AVANT DE COMMENCER:

     3.1 Dterminez quelle version de Windows 95 vous possdez.
     3.2 Dterminez si vous utilisez le systme de fichier FAT32.
     3.3 Soyez certain que les extensions de vos fichiers sont visibles dans l'Explorateur Windows.
     3.4 Renommez vos fichiers systme.
     3.5 Recommandation Importante.
     3.6 Editez vos fichiers systme.

  4. *** Ne consultez cette section QUE si vous utilisez une disquette de boot DOS 6.x. ***

     4.1 Editez et renommez vos fichiers systme DOS 6.x.

  5. Etape finale

     5.1 Bientt la fin
     5.2 Vous avez termin!
     5.3 Comment cela fonctionne.

  6. Mthodes alternatives pour le dmarrage automatique de Linux, spcialement pour les Utilisateurs ayant un systme de fichier FAT32.

     6.1 Premire Mthode.
     6.2 Seconde Mthode.

  7. Questions frquentes:

     7.1 Ou puis-je trouver plus d'informations sur l'utilisation de Loadlin?
     7.2 Je ne suis pas sr de savoir sur quelle partition est install Linux. Comment puis-je la dterminer?
     7.3 O puis-je trouver l'image de mon noyau et comment dois-je la copier dans ma partition MS-DOS?
     7.4 Est-ce le fait d'installer Linux ou Windows 95 en premier a de l'importance?
     7.5 J'ai dj le double lancement de Windows 95 et Windows 3.x, et je veux utiliser Linux en utilisant cette mthode?
     7.6 Est-il possible de lancer Linux du Bureau de Windows 95?
     7.7 Ou puis-je trouver une version de ce document au format texte?

  8. Remerciements



  ______________________________________________________________________


  11..  IInnttrroodduuccttiioonn


  Ce document dcrit comment utiliser facilement une combinaison du menu
  de boot de Windows 95 et de Loadlin.exe pour dmarrer automatiquement
  Linux en appuyant sur la touche de fonction F4.  Cette procdure
  devrait fonctionner avec les versions 4.00.950, 4.00.950a et 4.00.95b
  en FAT16 de Windows 95, et toutes les versions de Linux supportant
  Loadlin.  Si vous prfrez utiliser LILO boot manager, consultez le
  Linux+Win95 Mini-HOWTO.


  Il existe galement deux mthodes alternatives permettant le lancement
  de Linux par Loadlin pour les utilisateurs de Windows 95 en FAT32
  (version 4.00.950b).




  11..11..  CCooppyyrriigghhtt



  Le Loadlin+Win95 mini-HOWTO est copyright (C) 1997-1998 de Protek
  Computer Solutions. Ce document peut tre reproduit et distribu en
  tout ou partie, sur n'importe quel mdia physique ou lectronique,
  aussi longtemps que ce copyright reste prsent sur chaque copie.  La
  redistribution commerciale est autorise et encourage; cependant,
  l'auteur _a_i_m_e_r_a_i_t tre averti de telles distributions.



  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt


  Ce mini-HOWTO est prioritairement post  The Linux+Windows 95
  Reference Page, (Ndt : dans sa version anglaise), aussi recherchez sur
  ce site si vous voulez tre sr de dtenir la dernire version de ce
  mini-HOWTO.

  La prochaine version de ce document sera une refonte majeure et
  incluera galement des informations pour un dual boot sous Windows 98.


  11..33..  RRaaccttiioonnss



  Les questions, commentaires et suggestions sont les bienvenus. Je
  cherche constamment  perfectionner et tendre ce mini-HOWTO. Je
  compte beaucoup sur vos ractions pour faire des amliorations, et je
  ferai tout mon possible pour vous fournir une rponse constructive.
  Vous pouvez me contacter  protek@brigadoon.com (NdT : en anglais,
  bien sr ...).


  11..44..  DDnnggaattiioonn


  Tous les efforts ont t raliss pour tre certain que les
  informations prsentes dans ce mini-HOWTO sont sres et exactes.
  Nanmoins, ces informations sont livres sans aucune garantie, ni
  explicite ni implicite, sur le fait de convenir  un usage
  particulier. Il est gnralement considr comme une bonne chose (TM)
  de faire des sauvegardes de votre systme avant toute modification de
  configuration et/ou de fichiers. Je vous suggre de prendre cette
  prcaution "juste au cas o".



  22..  IIMMPPOORRTTAANNTT:: IInnffoorrmmaattiioonn PPrrlliimmiinnaaiirree eett SSeettuupp



  22..11..  AATTTTEENNTTIIOONN!! ppoouurr lleess uuttiilliissaatteeuurrss ddee WWiinnddoowwss9955 OOSSRR22 ((vveerrssiioonn
  44..0000..995500bb))::


  NE PPAASS essayer le dual booting avec Windows 95 sans avoir au pralable
  consult la Windows 95 OSR2 FAQ. La FAQ contient galement un grand
  nombre d'informations sur la FAT32. Toutefois, si vous avez OSR2 et
  que vous utilisiez le systme de fichiers FAT16, vous pouvez toujours
  lancer le dual boot en utilisant la touche de fonction F4.



  NNOOTTAA:: SSii vvoouuss aavveezz WWiinnddoowwss 9955 OOSSRR22,, eett qquuee vvoouuss uuttiilliissiieezz llee ssyyssttmmee
  ddee ffiicchhiieerrss FFAATT3322,, aalloorrss llaa mmtthhooddee ddee dduuaall bboooott vviiaa llaa ttoouucchhee FF44
  ddccrriittee ddaannss ccee mmiinnii--HHOOWWTTOO _n_e _f_o_n_c_t_i_o_n_n_e_r_a _p_a_s _e_t _n_e _d_o_i_t _p_a_s __t_r_e
  _m_i_s_e _e_n _o_e_u_v_r_e.


  Toutefois, il y a deux mthodes alternatives que vous pouvez utiliser
  pour automatiser le boot de Linux au dmarrage, qui sont dcrites dans
  la ``''.


  22..22..  NNoouuss ccoonnssiiddrreerroonnss ccoommmmee aaccqquuiiss::


    Vous avez install Windows 95 avec succs.

    Wndows 95 est install sur lecteur C.

    Vous avez install Linux avec succs.

    Vous savez sur quelle partition est install Linux.

    LILO n'est PAS install sur votre disque dur.

    Si vous utilisez Windows 95 OSR2 (version 4.00.950b), vous avez lu
     avec attention laWindows95 OSR2         FAQ.


  22..33..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn aavvaanntt ddee ccoommmmeenncceerr::



    Une disquette de boot avec les fichiers systme DOS 5.0 ou DOS 6.x
     (io.sys, msdos.sys, command.com) et un fichier config.sys. Si vous
     utilisez une disquette de boot DOS 5.0, vous avez galement besoin
     d'un fichier autoexec.bat. Si vous utilisez Windows 95 OSR2
     (version 4.00.950b), vous aurez galement besoin de crer un
     fichier appel Winboot.sys grce  un diteur de texte et de le
     placer dans la racine du disque c. Winboot.sys peut tre un fichier
     vide, du moment qu'il existe.




  NNOOTTAA:: Si les fichiers autoexec.dos, config.dos, io.dos, msdos.dos,et
  command.dos sont dj sur votre disque dur, alors vous n'aurez pas
  besoin de la disquette. Vous pouvez vrifier en tapant: dir eett dir /ah
  sur la racine du disque C.  Enfin, si vous avez install la version
  upgrade de Windows 95, il est prfrable de les avoir.



    Le fichier de programme Loadlin.exe


    Le fichier de l'image de votre noyau, habituellement zImage ou
     vmlinuz. (Voir la ``'' pour information).


    Un simple diteur de texte, comme Notepad.


  33..  AAVVAANNTT DDEE CCOOMMMMEENNCCEERR::



  33..11..  DDtteerrmmiinneezz qquueellllee vveerrssiioonn ddee WWiinnddoowwss 9955 vvoouuss ppoossssddeezz..


  Dmarrez votre ordinateur sous Windows 95 et cliquez sur le bouton
  droit de la souris sur l'icne Poste de travail. Maintenant, cliquez
  avec le bouton gauche de la souris sur Proprits. Sur l'onglet
  Gnral, regardez sous la ligne "Systme:". Vous y trouvez votre
  numro de version.


  33..22..  DDtteerrmmiinneezz ssii vvoouuss uuttiilliisseezz llee ssyyssttmmee ddee ffiicchhiieerr FFAATT3322..


  NNOOTTAA:: Si vous avez Windows 95 version 4.00.950b, _s_o_y_e_z _c_e_r_t_a_i_n _q_u_e
  _v_o_u_s _n_'_u_t_i_l_i_s_e_z ppaass le systme de fichier FAT32.. DDoouubbllee cclliiqquueezz ssuurr
  ll''iiccnnee PPoossttee ddee ttrraavvaaiill,, eett cclliiqquueezz eennssuuiittee ppaarr llee bboouuttoonn ddrrooiitt ssuurr
  ll''iiccnnee dduu ddiissqquuee CC.. CClliiqquueezz dduu bboouuttoonn ggaauucchhee ssuurr PPrroopprriittss.. SSuurr
  ll''oonngglleett GGnnrraall,, ,, llaa lliiggnnee ""TTyyppee::"" ddooiitt iinnddiiqquueerr ssii vvoouuss aavveezz oouu nnoonn
  uunn ssyyssttmmee ddee ffiicchhiieerr FFAATT3322.. SSii cc''eesstt llee ccaass,, ppaasssseezz ddiirreecctteemmeenntt  llaa
  ````'''' . Dans le cas contraire, passez  la SSeeccttiioonn 33..33.


  33..33..  SSooyyeezz cceerrttaaiinn qquuee lleess eexxtteennssiioonnss ddee vvooss ffiicchhiieerrss ssoonntt vviissiibblleess
  ddaannss ll''EExxpplloorraatteeuurr WWiinnddoowwss..


    Lancez le programme de gestion de fichiers Windows Explorer.

    Sur la barre de menu, cliquez sur Affichage, puis sur Options.  Sur
     l'onglet Affichage, vrifiez que le bouton "Afficher tous les
     fichiers " est coch. De mme, validez que le bouton "Masquer les
     extensions MSDOS pour les types de fichiers enregistrs " n'est pas
     coch. Cliquez sur le bouton OK.

  NNOOTTAA:: Si votre disque dur contient dj les fichiers *.dos mentionns
  dans la ``'', alors passez au ``'' suivant. Dans le cas contraire,
  passez  la SSeeccttiioonn 33..44.


  33..44..  RReennoommmmeezz vvooss ffiicchhiieerrss ssyyssttmmee..


    Insrez la disquette de boot DOS 5.0 ou DOS 6.x dans le lecteur A.
     Cliquez sur l'icne du lecteur A, ce qui vous permet de visualiser
     le contenu de la disquette.  (NdT : il est prudent, pour ne pas
     dire indispensable, de conserver une disquette de boot
     immdiatement exploitable. Aussi prfrez effectuer les
     modifications indiques ci-dessous sur une copie de votre disquette
     originale, celle-ci devant tre toujours en " tat de marche ", au
     cas o ...)

    Renommez chaque fichier avec une extension .dos. Pour cela, cliquez
     sur un fichier, pressez la touche F2 et tapez le nouveau nom. Ne
     vous inquitez pas si vous avez besoin de cette disquette pour
     booter : il vous suffira de renommer les fichiers avec leur nom
     d'origine  la fin de cette procdure.


  33..55..  RReeccoommmmaannddaattiioonn IImmppoorrttaannttee..


    EEXXTTRREEMMEEMMEENNTT IIMMPPOORRTTAANNTT:: Soyez certain de renommer les fichiers de la
     disquette AAVVAANNTT de les copier sur le lecteur C. Autrement, vous
     craseriez les fichiers systme de Windows 95. _V_o_u_s _a_v_e_z __t_
     _a_v_e_r_t_i_s.

     Maintenant, copiez tous les fichiers dans le rpertoire racine du
     disque C. Un moyen est de cliquer du bouton droit sur l'icne du
     lecteur A, de presser CTRL+A, puis de presser CTRL+C, de cliquer
     sur l'icne du lecteur C et de presser CTRL+V.



  NNOOTTAA:: Si vous  nn''aavveezz ppaass  Windows 95 OSR2 (version 4.00.950b), passez
   la ``''.


    Si (et seulement si) vous avez Windows95 version 4.00.950b, soyez
     certain d'avoir un fichier nomm Winboot.sys dans le rpertoire
     racine du lecteur C, comme dcrit dans la ``'' prcdente. NNee ppaass
     aavvooiirr WWiinnbboooott..ssyyss ddaannss llee rrppeerrttooiirree rraacciinnee dduu lleecctteeuurr CC bbllooqquueerraa
     vvoottrree ssyyssttmmee,, eett vvoouuss ccoonnttrraaiinnddrraa  bbooootteerr dd''uunnee vveerrssiioonn
     pprrccddeennttee ddee DDOOSS..


  NNOOTTAA:: Si vous utilisez une disquette de boot DOS 6.x, vous pouvez
  passer  la ``'', dans les autres cas, voyez l'tape suivante.


  33..66..  EEddiitteezz vvooss ffiicchhiieerrss ssyyssttmmee..


    Ouvrez Notepad. Dans la barre de menu, cliquez sur ouvrir. Modifiez
     le "Type de fichier" en "Tous (*.*)". Modifiez dans la zone
     "Chercher" le Bureau en Lecteur C. Maintenant ouvrez Config.dos en
     cliquant deux fois sur son nom. Supprimez tout son contenu. Cela
     crera un "fichier vide" ...je vous expliquerai plus tard.
     Sauvegardez le fichier.

    Utilisez Notepad pour ouvrir et diter Autoexec.dos et insrez la
     commande Loadlin. Cette commande doit avoir la syntaxe suivante:



       ______________________________________________________________________
           Loadlin LettreLecteur:\FichierNoyauLinux root=/dev/PartitionBootLinux ro
       ______________________________________________________________________





  A titre d'exemple, voici mon fichier Autoexec.dos:



       ______________________________________________________________________
           Loadlin f:\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________




  NNOOTTAA:: Le fichier du Noyau, tout comme Loadlin.exe, peut se trouver
  n'importe o sur votre disque dur du moment que vous renseignez le
  chemin d'accs correctement. Par exemple, si votre fichier Noyau se
  trouve dans le rpertoire e:\linux\kernels et que Loadlin.exe se
  trouve dans le rpertoire c:\utils, votre commande sera:



       ______________________________________________________________________
           c:\utils\loadlin e:\linux\kernels\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________





    Sauvegardez le fichier.


  44..  ****** NNee ccoonnssuulltteezz cceettttee sseeccttiioonn QQUUEE ssii vvoouuss uuttiilliisseezz uunnee ddiissqquueettttee
  ddee bboooott DDOOSS 66..xx.. ******



  44..11..  EEddiitteezz eett rreennoommmmeezz vvooss ffiicchhiieerrss ssyyssttmmee DDOOSS 66..xx..


    Ouvrez Notepad. Dans la barre de menu, cliquez sur ouvrir. Modifiez
     le " Type de fichier " en " Tous (*.*)". Modifiez dans la zone
     "Chercher" le Bureau en Lecteur C. Ouvrez le fichier Config.dos en
     double-cliquant sur son nom. Effacez tout le contenu. Maintenant
     vous allez devoir taper une commande shell avec la syntaxe suivante
     :



       ______________________________________________________________________
           shell=loadlin.exe LinuxKernelFile root=/dev/LinuxBootPartition ro
       ______________________________________________________________________




  Voici par exemple mon fichier Config.dos:



       ______________________________________________________________________
           shell=f:\loadlin.exe f:\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________





  NNOOTTAA:: Le fichier du Noyau, tout comme Loadlin.exe, peut se trouver
  n'importe o sur votre disque dur du moment que vous renseignez le
  chemin d'accs correctement. Par exemple, si votre fichier Noyau se
  trouve dans le rpertoire e:\linux\kernels et que Loadlin.exe se
  trouve dans le rpertoire f:\utils, votre commande sera:



       ______________________________________________________________________
           shell=f:\utils\loadlin.exe e:\linux\kernels\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________





    Sauvegardez le fichier.


  55..  EEttaappee ffiinnaallee



  55..11..  BBiieenntttt llaa ffiinn



    Un dernier fichier  diter et vous avez termin. Utilisez Notepad
     pour ouvrir et diter Msdos.sys. Allez  la section "Options".
     Recherchez une ligne contenant BootMulti=. Si vous ne la trouvez
     pas, ajoutez la et positionnez sa valeur  1. Elle doit ressembler
      cela:



       ______________________________________________________________________
               [Options]
               BootMulti=1
       ______________________________________________________________________





    S'il y a d'autres lignes, ne les modifiez pas. Maintenant
     sauvegardez le fichier.


  55..22..  VVoouuss aavveezz tteerrmmiinn!!


  Il ne vous reste plus qu' redmarrer (N'oubliez pas d'enlever la
  disquette). Ds que s'affichera "Dmarrage de Windows 95...", tapez la
  touche de fonction F4 et Linux devrait se lancer.


  55..33..  CCoommmmeenntt cceellaa ffoonnccttiioonnnnee..


  Windows 95 a un menu de boot intgr. Par dfaut, vous ne le voyez pas
  au dmarrage (ce qui peut tre modifi si vous le souhaitez), mais
  vous pouvez l'appeler en appuyant sur la touche de fonction F8 quand
  s'affiche "Dmarrage de Windows 95...". Dans le menu vous verrez
  plusieurs options. La dernire tant " Version prcdente de MS-DOS".
  Au lieu de taper F8 et de slectionner " Version prcdente de MS-
  DOS", vous pouvez utiliser le raccourci F4 en appuyant sur la touche
  de fonction F4 quand " Dmarrage de Windows 95......" apparat 
  l'cran. Lorsque Windows 95 dmarre sur la version prcdente de
  MSDOS, il utilise les fichiers se terminant par une extension .dos.
  C'est pour cette raison qu'il est trs important d'avoir un fichier
  Config.dos vide si vous initialisez Linux du fichier Autoexec.dos. Si
  Windows 95 ne trouve pas des fichiers avec des extensions .dos alors
  qu'il essaye de booter avec le systme d'exploitation prcdent, il
  chargera les fichiers de dmarrage de Windows 95. Donc, si vous n'avez
  pas de fichier Config.dos, Windows 95 chargera tous les drivers
  mentionns dans votre fichier Config.sys. Cela n'empchera pas Linux
  de dmarrer, mais cela prendra plus de temps. Avoir un fichier
  Config.dos vide permet d'empcher Windows 95 de lire votre fichier
  Config.sys pendant le dmarrage de la version prcdente de MS-DOS.


  66..  MMtthhooddeess aalltteerrnnaattiivveess ppoouurr llee ddmmaarrrraaggee aauuttoommaattiiqquuee ddee LLiinnuuxx,,
  ssppcciiaalleemmeenntt ppoouurr lleess UUttiilliissaatteeuurrss aayyaanntt uunn ssyyssttmmee ddee ffiicchhiieerr FFAATT3322..


  Cette section concerne toutes les versions de Windows 95 jusqu' ce
  jour, indpendamment du fait d'avoir ou non un systme de fichier
  FAT32. Il y a deux mthodes que je dvelopperai dans cette section. Je
  commencerai par la plus simple.


  66..11..  PPrreemmiirree MMtthhooddee..


  Cette mthode utilise le fichier Autoexec.bat pour appeler (ou
  excuter) un second fichier batch, nomm Linux.bat, pendant le
  dmarrage.


    Crez un simple fichier Linux.bat avec un diteur de texte simple
     tel que EDIT ou Notepad. Le contenu doit tre similaire  celui-ci:



       ______________________________________________________________________
               @echo off
               cls
               echo.
               echo.
               echo.
               echo.
               choice /t:o,5 "Souhaitez-vous lancer Linux? "
               if errorlevel 2 goto End
               c:\loadlin c:\vmlinuz root=/dev/hdc2 ro
               :End
       ______________________________________________________________________




  Ce fichier batch efface l'cran, affiche quatre lignes vides, puis le
  texte entre les guillemets + [O,N], et attend 5 secondes que vous
  appuyiez sur une touche. Si vous n'appuyez pas sur une touche sous 5
  secondes, il slectionne par dfaut la rponse O et lance Linux. Si
  vous slectionnez O ou N, le fichier dtermine l'option choisie et
  l'excute. Par exemple, si vous slectionnez 'N', alors l'excution du
  fichier batch se termine et rend la main  votre fichier Autoexec.bat,
  qui lance Windows 95. Si vous slectionnez 'O', alors bien sr Linux
  sera charg.



  Si vous ne souhaitez pas avoir 4 lignes vides avant le texte, alors
  modifiez le nombre de lignes echo. Si vous ne souhaitez pas que
  l'cran s'efface, supprimez la ligne contenant cls. L'option /t
  indique  la commande choice d'attendre 5 secondes et, si aucune
  touche n'est presse, de slectionner par dfaut O. Changez le o en n
  si vous souhaitez que Windows 95 se lance aprs le dlai de 5
  secondes: choice /t:n,5.  De mme, vous pouvez modifier le dlai
  d'attente de 0  99 secondes.  Pour plus d'informations sur la
  commande choice , allez dans le rpertoire c:\windows\command et
  tapez: choice /? au prompt.



  NNOOTTAA::Vous devrez modifier la ligne qui lance Linux selon votre
  configuration. Reportez-vous  la ``'' o quelques exemples indiquent
  comment configurer Loadlin pour lancer Linux.


    Maintenant crez un fichier Autoexec.bat (si vous n'en avez pas)
     avec un simple diteur de texte. Ensuite, ssuurr llaa pprreemmiirree lliiggnnee,
     ajoutez la commande suivante:



       ______________________________________________________________________
               call c:\linux
       ______________________________________________________________________






  Si le fichier Linux.bat se trouve dans un autre rpertoire, vous
  devrez renseigner le chemin complet. Par exemple, si Linux.bat est
  dans le rpertoire appel C:\batch, vous devrez ajouter:



       ______________________________________________________________________
               call c:\batch\linux
       ______________________________________________________________________






  sur la premire ligne de votre fichier Autoexec.bat. Sauvegardez le
  fichier et sortez de l'diteur.  Il vous suffit maintenant de relancer
  l'ordinateur. Il devrait vous demander si vous souhaitez lancer Linux.


  66..22..  SSeeccoonnddee MMtthhooddee..


  Cette mthode est un peu plus dlicate, mais offre une plus grande
  flexibilit. Elle cre votre propre menu de dmarrage, qui ne remplace
  pas nanmoins celui de Windows 95. Vous aurez besoin des fichiers
  Config.sys et Autoexec.bat.


    Premirement, vous allez devoir dfinir un Menu de Dmarrage dans
     votre Config.sys (mes commentaires vous tant destins sont entre
     parenthses):

       ______________________________________________________________________
               [menu]
               menuitem=Linux, Lancement de Linux (Cela dfinit une ligne du menu et
                                                  en donne une description).
               menuitem=Win95, Lancement de Windows 95
               menucolor=15,1 (Dfinition d'un fond d'cran bleu sur texte blanc)
               menudefault=Linux, 15 (Cela dtermine le menu par dfaut et un
                                     dlai d'attente de 15 secondes pour une slection).
               [linux]
               shell=f:\loadlin.exe f:\vmlinuz root=/dev/hdc2 ro (Reportez-vous  la
                                    Section 4 pour les exemples et la syntaxe).
               [win95]
               (Insrez le contenu normal de votre config.sys ici. Si vous
               n'aviez pas de fichier config.sys prcdemment, alors laissez
               cette section vide).

       ______________________________________________________________________





    Sauvegardez votre fichier Config.sys. Si vous le souhaitez, vous
     pouvez utiliser ce Modle de     Config.sys.




    Ensuite, ditez votre fichier Autoexec.bat (mes commentaires vous
     tant destins sont entre parenthses):



       ______________________________________________________________________
               goto %config%

               :win95
               (Insrez le contenu normal de votre fichier autoexec.bat ici. Si vous
               n'aviez pas de fichier autoexec.bat prcdemment, alors laissez cette
               section vide).

       ______________________________________________________________________





    Sauvegardez votre fichier Autoexec.bat. Si vous le souhaitez, vous
     pouvez utiliser ce Modle     d'Autoexec.bat Cela devrait faire
     l'affaire. La prochaine fois que vous lancerez votre ordinateur,
     vous devriez obtenir un menu de dmarrage et la possibilit de
     lancer Linux ou Windows 95.


  77..  QQuueessttiioonnss ffrrqquueenntteess::



  77..11..  OOuu ppuuiiss--jjee ttrroouuvveerr pplluuss dd''iinnffoorrmmaattiioonnss ssuurr ll''uuttiilliissaattiioonn ddee
  LLooaaddlliinn??



    La distribution Slackware versions 3.2 et 3.5 contient un fichier
     appel "loadlin.tgz" dans le rpertoire \slackware\A5, les
     Slackware 3.3 et 3.4 ont loadlin.tgz dans le rpertoire
     \slackware\A4. Dsarchivez ce fichier et recherchez dans le
     rpertoire \docs un fichier nomm manual.txt. Je ne connais pas les
     versions prcdentes de la Slackware.




    Les distributions RedHat 4.2  5.0 contiennent un fichier appel
     "loadlin16.tgz" dans le rpertoire \dosutils. Dsarchivez ce
     fichier et recherchez dans le rpertoire \docs un fichier nomm
     manual.txt. RedHat 4.1 ne semble pas avoir cette archive. Le
     manual.txt est galement tlchargeable :


       ftp://ftp.eskimo.com/u/p/praxis/manual.txt



    Informations supplmentaires disponibles sur:


       http://sunsite.unc.edu/LDP/HOWTO/BootPrompt-HOWTO-2.html#ss2.2



  77..22..  JJee nnee ssuuiiss ppaass ssrr ddee ssaavvooiirr ssuurr qquueellllee ppaarrttiittiioonn eesstt iinnssttaallll
  LLiinnuuxx.. CCoommmmeenntt ppuuiiss--jjee llaa ddtteerrmmiinneerr??



    Sous le prompt de Linux, lancez l'utilitaire fdisk et tapez la
     lettre "p". Vous devriez pouvoir identifier la partition Linux. Si
     vous avez besoin d'aide sur l'usage de fdisk, consultez l'aide
     fournie par man.


  77..33..  OO ppuuiiss--jjee ttrroouuvveerr ll''iimmaaggee ddee mmoonn nnooyyaauu eett ccoommmmeenntt ddooiiss--jjee llaa
  ccooppiieerr ddaannss mmaa ppaarrttiittiioonn MMSS--DDOOSS??



    Pour trouver le fichier de votre noyau, tapez:



       ______________________________________________________________________
               find / -name vmlinuz
       ______________________________________________________________________





  au prompt de Linux. Cela a pour effet de lancer une recherche dans
  toutes les partitions de Linux du fichier vmlinuz. Si vous avez
  plusieurs fichiers vmlinuz, soyez certain que d'utiliser le bon. Si
  vous n'en tes pas sr, le plus prudent est d'utiliser le plus rcent.



  Pour copier le fichier de votre noyau Linux, vous devez rendre votre
  partition DOS visible par Linux, c'est--dire la monter si ce n'est
  pas dj fait.  Gnralement, cela a du tre mise en place lorsque
  vous avez install Linux. Tout ce que vous avez  faire est de vous
  dplacer dans le rpertoire du fichier vmlinuz et de le copier vers le
  DOS en utilisant la commande cp.
  Toutefois, si Linux n'a pas t configur pour reconnatre votre
  partition DOS, copiez vmlinuz sur une disquette. Prenez n'importe
  quelle disquette formate en DOS (avec un espace libre suffisant pour
  recevoir votre fichier image du noyau) et insrez-la dans votre
  lecteur de disquettes. Tapez:



       ______________________________________________________________________
               mount /dev/fd0 /tmp
       ______________________________________________________________________




  sur le prompt de Linux. Dplacez vous ensuite dans le rpertoire
  contenant le fichier image de votre noyau et tapez:



       ______________________________________________________________________
               cp vmlinuz /tmp
       ______________________________________________________________________




  Cela copiera le fichier vmlinuz sur votre disquette et il sera lisible
  par DOS. Arrtez Linux, dmarrez sous DOS, et copiez vmlinuz dans le
  rpertoire que vous dsirez. Si vous recompilez votre noyau, n'oubliez
  pas de copier le nouveau fichier image du noyau sur votre partition
  DOS. Cela crasera votre ancien fichier, aussi c'est une bonne ide de
  renommer l'ancien fichier au cas o le nouveau ne fonctionnerait pas
  correctement.



  77..44..  EEsstt--ccee llee ffaaiitt dd''iinnssttaalllleerr LLiinnuuxx oouu WWiinnddoowwss 9955 eenn pprreemmiieerr aa ddee
  ll''iimmppoorrttaannccee??


    Techniquement non. Nanmoins, il est _b_e_a_u_c_o_u_p plus simple
     d'installer Win95 en premier. De cette faon il est plus facile de
     faire reconnatre  Linux votre(vos) partition(s) DOS, ce que vous
     pouvez normalement faire pendant l'installation de Linux.


  77..55..  JJ''aaii ddjj llee ddoouubbllee llaanncceemmeenntt ddee WWiinnddoowwss 9955 eett WWiinnddoowwss 33..xx,, eett
  jjee vveeuuxx uuttiilliisseerr LLiinnuuxx eenn uuttiilliissaanntt cceettttee mmtthhooddee??


    Franchement, si vous souhaitez faire cela je vous recommande
     d'utiliser LILO.  En fait, si vraiment vous ne souhaitez pas
     utiliser LILO, vous devrez lancer d'abord Win 3.x, puis la commande
     Loadlin. (Soyez certain que Windows 3.x n'est PAS lanc, et que
     vous tes sous DOS 5.0 ou 6.x).


  77..66..  EEsstt--iill ppoossssiibbllee ddee llaanncceerr LLiinnuuxx dduu BBuurreeaauu ddee WWiinnddoowwss 9955??


    Oui. D'abord, crez un batch spcial appel "linux.bat", par
     exemple. Editez le fichier pour y insrer une commande Loadlin
     comme:


  ______________________________________________________________________
          loadlin f:\vmlinuz root=/dev/hdc2 ro
  ______________________________________________________________________





  Maintenant, sauvegardez le fichier dans le rpertoire \windows\bureau.
  Ensuite, cliquez du bouton droit de la souris sur l'icne de
  Linux.bat, puis cliquez du bouton gauche sur l'icne Proprits. Main
  tenant, cliquez sur l'onglet Programme, puis sur le bouton Paramtres
  avancs. Cochez la ligne "Mode MS-DOS" et vrifiez que la ligne "
  Avertir avant de passer en mode MS-DOS " est coche.

  Cliquez OK, puis sur OK de nouveau. Dsormais, lorsque vous cliquerez
  sur l'icne de Linux, une boite d'avertissement apparatra avant que
  vous ne passiez en mode MS-DOS. Si vous cliquez sur "Oui" alors Win
  dows passera en mode MS-DOS et excutera le fichier Linux.bat.

  NNOOTTAA:: Vous devez tre en mode MS-DOS pour utiliser Loadlin. Merci de
  consulter le fichier manual.txt mentionn dans ``'' de cette ``'' pour
  plus d'informations.


  77..77..  OOuu ppuuiiss--jjee ttrroouuvveerr uunnee vveerrssiioonn ddee ccee ddooccuummeenntt aauu ffoorrmmaatt tteexxttee??


    Vous pouvez trouver une version de ce document au format texte sur:


       ftp://ftp.eskimo.com/u/p/praxis/loadlin.txt



  88..  RReemmeerrcciieemmeennttss


  _R_e_m_e_r_c_i_e_m_e_n_t_s _p_a_r_t_i_c_u_l_i_e_r_s _ _N_o_r_m _J_a_c_o_b_o_w_i_t_z _e_t _F_r_e_d _H_a_r_r_i_s _p_o_u_r _l_e_u_r
  _a_i_d_e _s_u_r _l_e_s _p_a_r_t_i_c_u_l_a_r_i_t__s _d_e _W_i_n_d_o_w_s _9_5 _O_S_R_2 _e_t _p_o_u_r _m_'_a_v_o_i_r _a_i_d_ _
  _a_m__l_i_o_r_e_r _c_e _m_i_n_i_-_H_O_W_T_O_.

























  The Loopback Root Filesystem HOWTO
  par Andrew M. Bishop, amb@gedanken.demon.co.uk
  traduction par Eric Cano Eric.Cano@cern.ch
  v1.0.0, 12 juin 1998, traduction octobre 1998

  Ce HOWTO explique comment utiliser le priphrique loopback pour faire
  une installation sur un systme de fichier Linux natif, qui peut
  rsider dans une partition DOS sans repartitionnement. D'autres utili
  sations de cette technique sont aussi prsentes.
  ______________________________________________________________________

  Table des matires


  1. Principes des priphriques "loopback" et des disques virtuels

     1.1 Priphrique loopback
     1.2 Les disques virtuels
     1.3 Le disque virtuel initial
     1.4 Le systme de fichiers racine
     1.5 La squence d'amorage de Linux

  2. Comment crer un priphrique loopback.

     2.1 Pr-requis
     2.2 Cration du noyau Linux
     2.3 Cration du priphrique disque virtuel initial
     2.4 Cration du priphrique racine
     2.5 Cration du priphrique de mmoire virtuelle.
     2.6 Cration du rpertoire MSDOS
     2.7 Cration de la disquette de dmarrage.

  3. Dmarrage du systme

     3.1 Problmes possibles et leurs solutions
     3.2 Documents de rfrence

  4. Autres possibilits de priphriques racine en loopback

     4.1 Installation "tout sur un disque DOS"
     4.2 Installation dmarre avec LILO
     4.3 Installation VFAT / NTFS
     4.4 Installer Linux sans repartitionner
     4.5 Dmarrer depuis un priphrique non amorable


  ______________________________________________________________________

  11..  PPrriinncciippeess ddeess pprriipphhrriiqquueess ""llooooppbbaacckk"" eett ddeess ddiissqquueess vviirrttuueellss

  Je vais d'abord dcrire quelques-uns des principes gnraux utiliss
  pour la mise en place d'un systme de fichier en loopback comme
  racine.



  11..11..  PPrriipphhrriiqquuee llooooppbbaacckk

  Sous Linux, un pprriipphhrriiqquuee llooooppbbaacckk est un priphrique virtuel, qui
  peut tre utilis comme tout autre priphrique.


  Des exemples de priphriques normaux sont les partitions de disques
  durs comme /dev/hda1, /dev/hda2, /dev/sda1, ou des disques entiers
  comme les disquettes /dev/fd0, etc... Ce sont tous des priphriques
  qui peuvent contenir une structure de fichiers et de rpertoires. Ils
  peuvent tre formats avec le systme de fichier voulu (ext2fs, msdos,
  ntfs, etc...) puis monts.



  Le priphrique loopback associe un fichier  un priphrique complet.
  Ce fichier peut appartenir  un autre systme de fichiers.

  Il peut alors tre mont comme tout autre priphrique cit plus haut.
  Pour cela le priphrique appel /dev/loop0 ou /dev/loop1 ou etc...
  est associ au fichier, puis ce nouveau priphrique virtuel est
  mont.



  11..22..  LLeess ddiissqquueess vviirrttuueellss

  Sous Linux, il est aussi possible d'avoir un autre type de
  priphrique virtuel mont en tant que systme de fichiers, c'est le
  ddiissqquuee vviirrttuueell (_r_a_m_d_i_s_k).


  Dans ce cas, le priphrique ne se rfre pas  un lment du
  matriel, mais  une portion de la mmoire qui est mise de ct dans
  ce but. La mmoire alloue ainsi n'est jamais swape sur le disque,
  mais reste dans le cache disque.


  Un disque virtuel peut tre cr  tout moment en crivant dans le
  priphrique correspondant /dev/ram0 ou /dev/ram1, etc... Il peut
  alors tre format et mont de la mme faon que le priphrique
  loopback.


  Quand un disque virtuel est utilis pour l'amorage (comme c'est
  souvent le cas avec les disquettes d'installation de Linux et les
  disquettes d'urgence), l'image du disque (le contenu complet du disque
  sous forme d'un seul fichier) peut tre stock sur la disquette de
  dmarrage sous une forme compresse.  L'image est automatiquement
  dtecte par le noyau quand celui-ci dmarre et dcompresse dans le
  disque virtuel avant d'tre monte.


  11..33..  LLee ddiissqquuee vviirrttuueell iinniittiiaall

  Le ddiissqquuee vviirrttuueell iinniittiiaall est, sous Linux, un autre mcanisme
  important dont nous aurons besoin pour utiliser le priphrique
  loopback comme systme de fichier racine.


  Quand le disque virtuel initial est utilis, l'image du systme de
  fichiers est copie dans la mmoire et monte pour que les fichiers
  soient accessibles. Un programme sur ce disque virtuel (appel
  linuxrc) est lanc.  Une fois termin un nouveau priphrique est
  mont comme systme de fichiers racine. Le disque virtuel prcdent
  existe toujours, il est mont sur le rpertoire /initrd si celui-ci
  est prsent, ou accessible  travers le priphrique /dev/initrd.


  C'est un comportement peu habituel, puisque la squence de dmarrage
  normale se lance depuis la partition racine choisie et continue 
  tourner ainsi. Avec l'option de disque virtuel initial, la partition
  racine a la possibilit de changer avant que ne commence la squence
  de dmarrage principale.


  11..44..  LLee ssyyssttmmee ddee ffiicchhiieerrss rraacciinnee

  Le systme de fichiers racine est le priphrique qui est mont en
  premier, et qui apparat donc dans le rpertoire appel  / aprs le
  dmarrage.



  Il y a un certain nombre de complications a propos du systme de
  fichiers racine, qui sont dues au fait qu'il contient tous les
  fichiers. Au boot, les scripts  rc sont lancs ; ce sont soit les
  fichiers dans /etc/rc.d ou /etc/rc?.d, suivant la version du programme
  /etc/init.


  Quand le systme a dmarr, il n'est plus possible de dmonter la
  partition racine ou d'en changer car tout les programmes l'utiliseront
  plus ou moins. C'est pourquoi le disque virtuel initial est si utile,
  puisqu'il peut tre utilis de faon telle que la partition racine
  finale n'est pas la mme que celle qui est charge au moment de
  l'amorage.



  11..55..  LLaa ssqquueennccee dd''aammoorraaggee ddee LLiinnuuxx

  Pour montrer comment le disque virtuel initial opre pendant la
  squence de dmarrage, l'ordre des vnements est prsent ci dessous.



  1. Le noyau est charg en mmoire, ceci est effectu par LILO ou
     LOADLIN. Vous pouvez voir le message Loading... pendant que ceci
     arrive.

  2. L'image du disque virtuel est charge en mmoire,  nouveau ceci
     est ralis par LILO ou LOADLIN. Vous pouvez voir le message
     Loading...   nouveau quand ceci arrive.

  3. Le noyau est initialis, y compris la lecture des options de ligne
     de commande et le montage du disque virtuel en tant que racine.

  4. Le programme /linuxrc est lanc sur le disque virtuel initial.

  5. Le priphrique racine est chang pour celui spcifi dans les
     paramtres du noyau.

  6. Le programme /etc/init est lanc, et va excuter la squence de
     dmarrage paramtrable par l'utilisateur.

  Ceci est juste une version simplifie de ce qui arrive, mais c'est
  suffisant pour expliquer comment le noyau dmarre et o le disque
  virtuel est utilis.



  22..  CCoommmmeenntt ccrreerr uunn pprriipphhrriiqquuee llooooppbbaacckk..

  Maintenant que les principes gnraux ont t prsents, la mthode
  pour crer le priphrique loopback peut tre explique.






  22..11..  PPrr--rreeqquuiiss

  La cration du priphrique loopback va ncessiter un certain nombre
  de choses.



    Un systme Linux install.

    Un moyen pour copier des gros fichiers sur la partition DOS de
     destination.

  Le point le plus important est l'accs  un systme Linux dj
  install. Ce point est ncessaire car le priphrique loop ne peut
  tre cr que sous Linux. Cela signifie qu'il ne sera pas possible
  d'installer un systme  partir de rien. Le systme Linux que vous
  utilisez devra tre capable de compiler un noyau.


  Une fois le priphrique loopback cr, il reprsentera un gros
  fichier. J'ai utilis un fichier de 80 Mo, mais si c'tait suffisant
  pour un terminal X, a ne sera sans doute pas suffisant pour une
  utilisation plus importante. Ce fichier doit tre copi sur la
  partition DOS, donc un rseau ou beaucoup de disquettes seront mis a
  contribution.


  Vous aurez besoin des logiciels suivants :


    LOADLIN version 1.6 ou suprieure

    Une version de mount qui supporte les priphriques loopback

    Une version du noyau qui inclut les options requises.

  Tout ceci devrait tre disponible en standard sur des installations
  rcentes de Linux.



  22..22..  CCrraattiioonn dduu nnooyyaauu LLiinnuuxx

  J'ai cr le priphrique loopback avec le noyau Linux version 2.0.31,
  d'autres versions devraient faire l'affaire, mais elles devront avoir
  au moins les options listes ci-dessous configures.


  Les options du noyau que vous devrez slectionner sont les suivantes :


    RAM disk support (CONFIG_BLK_DEV_RAM).

    Initial RAM disk (initrd) support (CONFIG_BLK_DEV_INITRD).

    Loop device support (CONFIG_BLK_DEV_LOOP).

    fat fs support (CONFIG_FAT_FS).

    msdos fs support (CONFIG_MSDOS_FS).

  Les deux premires sont le disque virtuel lui-mme et le disque
  virtuel initial. La suivante est le support pour les priphriques
  loopback.  Les deux dernires sont le support pour les systmes de
  fichiers msdos, qui est requis pour monter des partitions DOS.

  La compilation d'un noyau sans modules est la plus simple, mais si
  vous voulez utiliser les modules a devrait tre possible, bien que je
  ne l'aie pas essay. Si vous utilisez des modules, vous devez
  configurer les options prcdentes dans le noyau, et non comme des
  modules.


  Le code source du noyau lui-mme devra tre modifi d'une faon trs
  simple.  La version 2.0.34 du noyau telle que fournie ne permet pas au
  priphrique loopback d'tre utilis comme racine. Une trs petite
  modification du noyau peut rendre ceci possible.


  Le fichier /init/main.c a juste besoin qu'on lui ajoute une seule
  ligne comme montr dans la version modifie ci-dessous. La ligne qui
  dit "loop", 0x0700 est celle qui a t ajoute.




       static void parse_root_dev(char * line)
       {
               int base = 0;
               static struct dev_name_struct {
                       const char *name;
                       const int num;
               } devices[] = {
                       { "nfs",     0x00ff },
                       { "loop",    0x0700 },
                       { "hda",     0x0300 },

       ...

                       { "sonycd",  0x1800 },
                       { NULL, 0 }
               };

       ...

       }




  Une fois le noyau configur, il devra tre compil pour produire une
  fichier zImage (make zImage). Ce fichier devrait tre
  arch/i386/boot/zImage une fois compil.



  22..33..  CCrraattiioonn dduu pprriipphhrriiqquuee ddiissqquuee vviirrttuueell iinniittiiaall

  Le disque virtuel initial est simplement cre comme un priphrique
  loopback au dpart. Vous devrez faire ceci en tant que root. Les
  commandes que vous devez excuter sont listes ci dessous, elles
  supposent tre lances depuis le rpertoire principal de root (/root).










  mkdir /root/initrd
  dd if=/dev/zero of=initrd.img bs=1k count=1024
  mke2fs -i 1024 -b 1024 -m 5 -F -v initrd.img
  mount initrd.img /root/initrd -t ext2 -o loop
  cd initrd
  [crez les fichiers]
  cd ..
  umount /root/initrd
  gzip -c -9 initrd.img > initrdgz.img




  Il y a un certain nombre d'tapes, mais on peut les dcrire comme
  ceci.


  1. Crez un point de montage pour le disque virtuel initial (un
     rpertoire vide).

  2. Crez un fichier vide de la taille requise. Ici j'ai utilis
     1024ko, vous pourriez avoir besoin de plus ou de moins suivant le
     contenu. (la taille est le dernier paramtre).

  3. Crez un systme de fichiers ext2 dans le fichier vide.

  4. Montez le ficher au point de montage, ceci utilise le priphrique
     loopback.

  5. Changez le rpertoire courant pour le priphrique loopback.

  6. Crez les fichiers requis (voir plus bas pour les dtails).

  7. Sortez du priphrique loopback mont.

  8. Dmontez le priphrique.

  9. Crez une version compresse pour l'utiliser plus tard.

  CCoonntteennuu dduu ddiissqquuee vviirrttuueell iinniittiiaall

  Les fichiers dont vous avez besoin sur le disque virtuel reprsentent
  le minimum ncessaire pour pouvoir d'excuter une commande.


    /linuxrc Le fichier qui est lanc pour monter le systme de
     fichiers msdos (voir plus bas).

    /lib/* L'diteur de liens dynamiques et les librairies dont les
     programmes ont besoin.

    /etc/* Le cache utilis par l'diteur de liens dynamiques (pas
     strictement requis, mais a l'empche de se plaindre).

    /bin/* Un interprteur de commandes (ash car il est plus petit que
     bash). Les programmes mount et losetup pour manipuler le disque DOS
     et configurer les priphriques loopback.

    /dev/* Les priphriques qui seront utiliss. Vous avez besoin de
     /dev/zero pour ld-linux.so, /dev/hda* pour monter le disque msdos
     et /dev/loop* pour les priphriques loopback.

    /mnt Un rpertoire vide pour y monter le disque msdos.

  Le contenu du disque virtuel initial que j'ai utilis est numr ci-
  dessous.  Ces fichiers reprsentent environ 800ko, une fois pris en
  compte l'espace perdu par les structures du systme de fichiers.




       total 18
       drwxr-xr-x   2 root     root         1024 Jun  2 13:57 bin
       drwxr-xr-x   2 root     root         1024 Jun  2 13:47 dev
       drwxr-xr-x   2 root     root         1024 May 20 07:43 etc
       drwxr-xr-x   2 root     root         1024 May 27 07:57 lib
       -rwxr-xr-x   1 root     root          964 Jun  3 08:47 linuxrc
       drwxr-xr-x   2 root     root        12288 May 27 08:08 lost+found
       drwxr-xr-x   2 root     root         1024 Jun  2 14:16 mnt

       ./bin:
       total 168
       -rwxr-xr-x   1 root     root        60880 May 27 07:56 ash
       -rwxr-xr-x   1 root     root         5484 May 27 07:56 losetup
       -rwsr-xr-x   1 root     root        28216 May 27 07:56 mount
       lrwxrwxrwx   1 root     root            3 May 27 08:08 sh -> ash

       ./dev:
       total 0
       brw-r--r--   1 root     root       3,   0 May 20 07:43 hda
       brw-r--r--   1 root     root       3,   1 May 20 07:43 hda1
       brw-r--r--   1 root     root       3,   2 Jun  2 13:46 hda2
       brw-r--r--   1 root     root       3,   3 Jun  2 13:46 hda3
       brw-r--r--   1 root     root       7,   0 May 20 07:43 loop0
       brw-r--r--   1 root     root       7,   1 Jun  2 13:47 loop1
       crw-r--r--   1 root     root       1,   3 May 20 07:42 null
       crw-r--r--   1 root     root       5,   0 May 20 07:43 tty
       crw-r--r--   1 root     root       4,   1 May 20 07:43 tty1
       crw-r--r--   1 root     root       1,   5 May 20 07:42 zero

       ./etc:
       total 3
       -rw-r--r--   1 root     root         2539 May 20 07:43 ld.so.cache

       ./lib:
       total 649
       lrwxrwxrwx   1 root     root           18 May 27 08:08 ld-linux.so.1 -> ld-linux.so.1.7.14
       -rwxr-xr-x   1 root     root        21367 May 20 07:44 ld-linux.so.1.7.14
       lrwxrwxrwx   1 root     root           14 May 27 08:08 libc.so.5 -> libc.so.5.3.12
       -rwxr-xr-x   1 root     root       583795 May 20 07:44 libc.so.5.3.12

       ./lost+found:
       total 0

       ./mnt:
       total 0






  La seule tape complexe est la cration des priphriques dans dev.
  Utilisez le programme mknod pour les crer, et servez vous des
  priphriques dans /dev comme modles pour les paramtres requis.


  LLee ffiicchhiieerr //lliinnuuxxrrcc

  Le fichier /linuxrc sur le disque virtuel initial est ncessaire pour
  mettre en place le priphrique loopback, avant de l'utiliser comme
  racine.
  L'exemple suivant essaye de monter /dev/hda1 comme une partition msdos
  et en cas de russite assigne les fichiers /linux/linuxdsk.img et
  /linux/linuxswp.img respectivement aux priphriques /dev/loop0 et
  /dev/loop1.





       #!/bin/sh

       echo INITRD: Essaye de monter /dev/hda1 comme partition msdos

       if /bin/mount -n -t msdos /dev/hda1 /mnt; then

          echo INITRD: Montage russi
          /bin/losetup /dev/loop0 /mnt/linux/linuxdsk.img
          /bin/losetup /dev/loop1 /mnt/linux/linuxswp.img
          exit 0

       else

          echo INITRD: Echec du montage
          exit 1

       fi




  Le premier priphrique, /dev/loop0 deviendra la racine et le second,
  /dev/loop1 deviendra la mmoire virtuelle.


  Si vous voulez pouvoir crire sur la partition racine en tant
  qu'utilisateur normal quand vous aurez fini, alors vous devriez plutt
  utiliser mount -n -t msdos /dev/hda1 /mnt -o uid=0,gid=0,umask=000.
  Ceci associera tous les accs  la partition DOS  l'utilisateur root
  et placera les permissions en consquences.


  22..44..  CCrraattiioonn dduu pprriipphhrriiqquuee rraacciinnee

  Le priphrique racine que vous utiliserez est le fichier
  linuxdsk.img.  Vous devrez le crer de la mme faon que le disque
  virtuel initial, en plus grand.  Vous pouvez y mettre l'installation
  de Linux de votre choix.


  La mthode la plus simple est de copier une installation Linux
  existante sur ce disque. une alternative est d'y installer une
  distribution de Linux.


  En supposant que ceci est fait, vous avez encore des modifications
  mineures  apporter.


  Le fichier /etc/fstab doit rfrencer les partitions racine et swap en
  utilisant les deux priphriques loopback qui sont mis en place par le
  disque virtuel initial.





  /dev/loop0     /      ext2   defaults 1 1
  /dev/loop1     swap   swap   defaults 1 1





  Ceci permettra de s'assurer que quand le priphrique racine sera
  utilis, le noyau ne sera pas induit en erreur sur son emplacement.
  L'espace de swap pourra ainsi tre ajout de la mme faon qu'une
  partition de swap normale. Vous devez aussi retirer toute autre
  rfrence vers un disque racine ou swap.



  Si vous voulez tre capable d'accder  la partition DOS aprs le
  dmarrage de Linux, vous devrez faire quelques petites modifications.


  Crez un rpertoire appel /initrd, qui sera le point de montage du
  disque virtuel initial une fois que le systme de fichier racine sera
  mont en loopback.

  Crez un lien symbolique appel /DOS qui pointe sur /initrd/mnt o la
  partition DOS sera monte.

  Ajoutez un ligne dans le fichier rc qui monte les disques. Il devra
  lancer la commande mount -f -t msdos /dev/hda1 /initrd/mnt ; ceci
  crera un montage "fictif" de la partition DOS pour que tous les
  autres programmes (comme df) sachent que la partition DOS est monte
  et o la trouver.  Si vous avez utilis des options diffrentes dans
  /linuxrc, vous devrez videmment utiliser les mmes ici.


  Il n'y a plus de raison d'avoir le noyau Linux sur le priphrique
  racine puisqu'il a t charg plus tt. Toutefois, si vous utilisez
  les modules, vous devrez les inclure normalement sur ce priphrique.



  22..55..  CCrraattiioonn dduu pprriipphhrriiqquuee ddee mmmmooiirree vviirrttuueellllee..

  Le priphrique que vous utiliserez sera le fichier linuxswap.img.  Le
  priphrique de mmoire virtuelle _(_s_w_a_p_) est trs simple  fabriquer.
  Crez un fichier vide de la mme faon que pour le disque virtuel
  initial, puis excutez  mkswap linuxswap.img pour l'initialiser.


  La taille de la mmoire virtuelle dpendra de ce que vous comptez
  faire avec le systme install, mais je recommanderais entre 8 Mo et
  la quantit de RAM que vous avez.



  22..66..  CCrraattiioonn dduu rrppeerrttooiirree MMSSDDOOSS

  Les fichiers qui seront utiliss devront tre dplacs sur la
  partition DOS.


  Les fichiers qui devront tre dans le rpertoire DOS appel C:\LINUX
  sont les suivants :


    LINUXDSK.IMG L'image de la partition qui deviendra le priphrique
     racine.
    LINUXSWP.IMG L'espace de mmoire virtuelle.


  22..77..  CCrraattiioonn ddee llaa ddiissqquueettttee ddee ddmmaarrrraaggee..

  La disquette de dmarrage qui est utilise est juste une disquette
  amorable au format DOS.


  On la cre en utilisant format a: /s sous DOS.


  Sur ce disque vous devrez crer un fichier AUTOEXEC.BAT (comme ci-
  dessous) et copier le noyau, le disque virtuel initial sous forme
  compresse et l'excutable LOADLIN.


    AUTOEXEC.BAT Le fichier de commandes excut automatiquement par le
     DOS.

    LOADLIN.EXE L'excutable du programme LOADLIN.

    ZIMAGE Le noyau Linux.

    INITRDGZ.IMG L'image compresse du disque virtuel initial.

  Le fichier AUTOEXEC.BAT devrait contenir une seule ligne comme ci-
  dessous.



       \loadlin \zImage initrd=\initrdgz.img root=/dev/loop0 ro




  Ceci spcifie l'image du noyau  utiliser, l'image du disque virtuel
  initial, et le priphrique racine aprs que le disque virtuel ait
  fait son office, avec la partition racine monte en lecture seule.



  33..  DDmmaarrrraaggee dduu ssyyssttmmee

  Pour dmarrer depuis le nouveau priphrique racine, il suffit de
  faire dmarrer le PC sur la disquette prpare plus haut.


  Vous verrez les vnement suivants se succder :

  1. Chargement du DOS.

  2. Dmarrage AUTOEXEC.BAT

  3. Lancement de LOADLIN

  4. Copie du noyau Linux dans la mmoire

  5. Le disque virtuel initial est copi en mmoire

  6. Le noyau Linux dmarre

  7. Le fichier /linuxrc sur le disque virtuel initial est excut

  8. La partition DOS est monte, ainsi que les priphriques racine et
     de swap
  9. La squence de dmarrage continue depuis le priphrique loopback

  Une fois ceci accompli, vous pouvez retirer la disquette et utiliser
  le systme Linux.


  33..11..  PPrroobbllmmeess ppoossssiibblleess eett lleeuurrss ssoolluuttiioonnss

  Il y a un certain nombre d'tapes de ce processus qui peuvent chouer.
  Je vais essayer d'expliquer lesquelles, et ce qu'il faut vrifier.



  Le dmarrage du DOS est facile  reconnatre grce au message qu'il
  affiche  l'cran : Dmarrage de MS-DOS... . Si ceci n'est pas
  visible, soit la disquette n'est pas amorable, soit le PC ne dmarre
  pas sur le lecteur de disquettes.


  Quand le fichier AUTOEXEC.BAT est excut, les commandes qu'il
  contient devraient tre affiches sur l'cran par dfaut. Dans le cas
  prsent, il n'y a d'une seule ligne dans le fichier, qui lance
  LOADLIN.


  Quand LOADLIN se lancera, il excutera deux actions facile 
  distinguer : premirement il chargera le noyau en mmoire, ensuite il
  copiera le disque virtuel en mmoire. Chacune de ces actions est
  indique par un message Loading... .


  Le noyau commence par se dcompresser, ceci peut engendrer des erreur
  ccrrcc si l'image du noyau est corrompue. Ensuite, il lancera la squence
  d'initialisation qui est trs prolixe en messages de diagnostic. Le
  chargement du priphrique disque virtuel sera aussi visible durant
  cette phase.


  Quand le fichier /linuxrc est lanc, il n'y a pas de message de
  diagnostic, mais vous pouvez les ajouter pour vous aider  debugger.
  Si cette tape choue dans le montage du priphrique loopback en tant
  que priphrique racine, vous verrez un message avertissant qu'il n'y
  a pas de priphrique racine, et le noyau interrompra son excution.


  La squence de dmarrage normale du nouveau systme de fichiers racine
  va maintenant continuer, et cette partie est  nouveau gnreuse en
  messages.  Il pourrait y avoir des problmes ds au fait que le
  systme de fichiers racine est mont en lecture-criture, mais
  l'option de ligne de commande qui peut apparatre est la confusion de
  la squence de dmarrage  propos de l'emplacement du systme de
  fichiers racine ; ceci sera probablement d  un problme avec
  /etc/fstab.


  Quand la squence de dmarrage est ralise, le problme qui reste est
  que les programmes ne savent pas si la partition DOS est monte ou
  non. C'est pourquoi c'est une bonne ide d'utiliser une fausse
  commande mount dcrite plus tt.  Ceci rend la vie nettement plus
  simple si vous voulez accder au fichiers sur le priphrique DOS.






  33..22..  DDooccuummeennttss ddee rrffrreennccee

  Les document que j'ai utiliss pour crer mon premier priphrique
  racine en loopback sont :



    Les sources du noyau Linux, en particulier init/main.c

    La documentation du noyau Linux, en particulier
     Documentation/initrd.txt et Documentation/ramdisk.txt.

    La documentation de LILO.

    La documentation de LOADLIN.



  44..  AAuuttrreess ppoossssiibbiilliittss ddee pprriipphhrriiqquueess rraacciinnee eenn llooooppbbaacckk

  Une fois que le principe de dmarrer sur un systme de fichiers dans
  une partition DOS est acquis, il y a de nombreuses autres choses que
  l'on peut faire.


  44..11..  IInnssttaallllaattiioonn ""ttoouutt ssuurr uunn ddiissqquuee DDOOSS""

  S'il est possible de charger Linux depuis un fichier sur un disque dur
  DOS en utilisant une disquette de dmarrage, alors il est clair qu'on
  peut faire la mme chose en utilisant le disque dur lui-mme.


  Un menu de choix de configuration au dmarrage peut tre utilis pour
  donner l'option de lancer LOADLIN depuis l'AUTOEXEC.BAT. Ceci donnera
  une squence de dmarrage plus rapide, mais c'est la seule diffrence.


  44..22..  IInnssttaallllaattiioonn ddmmaarrrree aavveecc LLIILLOO

  Utiliser LOADLIN n'est qu'une des options possibles pour charger un
  noyau Linux. Il y a aussi LILO qui fait pratiquement la mme chose,
  mais sans ncessiter DOS.


  Dans ce cas, la disquette au format DOS peut tre remplace par une
  disquette au format ext2fs. A part cela, les dtails restent trs
  similaires, le noyau et le disque virtuel initial tant encore des
  fichiers sur cette disquette.


  La raison pour laquelle j'ai choisi la mthode avec LOADLIN est que
  les arguments qui doivent tre donnes  LILO sont lgrement plus
  complexes. Le contenu de la disquette est aussi plus clair pour un
  observateur lambda, puisqu'on peut la lire sous DOS.


  44..33..  IInnssttaallllaattiioonn VVFFAATT // NNTTFFSS

  J'ai essay la mthode NTFS, et je n'ai pas eu de problme avec. Le
  support du systme de fichier NTFS n'est pas une option standard du
  noyau, mais vous devez appliquer le patch de Martin von Lwis, qui est
  disponible sur sa page web.  http://www.informatik.hu-
  berlin.de/~loewis/ntfs/.  Ce logiciel est en version alpha et requiert
  un patch qui n'est pas totalement trivial  appliquer au noyau, mais
  pas trop difficile non plus.

  Les seuls changements pour les options VFAT ou NTFS sont sur le disque
  virtuel initial, le fichier /linuxrc doit monter un systme de
  fichiers de type vfat ou ntfs plutt que msdos.

  Je ne connais pas de raison pour laquelle ceci ne marcherait pas aussi
  sur une partition VFAT.


  44..44..  IInnssttaalllleerr LLiinnuuxx ssaannss rreeppaarrttiittiioonnnneerr

  Le processus d'installation de Linux sur un PC avec une distribution
  standard requiert de dmarrer sur une disquette et de repartitionner
  le disque dur. Cette tape pourrait tre remplace par une disquette
  de dmarrage qui cre un priphrique loopback vide et un fichier de
  swap.  Ceci permettrait  l'installation de procder normalement, sur
  le priphrique loopback plutt que sur une partition.


  Ceci pourrait tre une alternative  une installation UMSDOS, et
  serait plus efficace pour l'utilisation du disque, puisque l'unit
  d'allocation minimale sur un systme de fichiers ext2 est de 1ko
  contre 32ko sur une partition DOS. On peut aussi l'utiliser sur des
  disques VFAT et NTFS qui sinon posent un problme.



  44..55..  DDmmaarrrreerr ddeeppuuiiss uunn pprriipphhrriiqquuee nnoonn aammoorraabbllee

  Cette mthode peut aussi tre utilise pour dmarrer un systme Linux
  depuis un priphrique qui n'est pas normalement amorable.



    CD-Rom

    Disques Zip

    Lecteurs de disques sur port parallle

  Evidemment, de nombreux autres priphriques pourraient tre utiliss,
  les partitions racines en NFS sont dj incluses dans le noyau comme
  une option, mais la mthode prsente ici pourrait tre utilise  la
  place.























  Clavier MIDI sur carte Sound Blaster
  Hideki Saito <hideki@eskimo.com>
  1996

  Version 1.0

  11..  CCooppyyrriigghhtt

  Ce  document  a  ete  ecrit  par  Hideki  Saito.   La  diffusion  sans
  modifications est permise.  Pour toute publication me contacter.

  Mon adresse de courrier electronique est <hideki@eskimo.com>.

  22..  IInnttrroodduuccttiioonn

  On peut se demander comment utiliser un clavier MIDI  avec  une  carte
  Sound Blaster. En fait, il n'agit pas simplement de  relier le clavier
  MIDI a une prise MIDI 15 points  (le  port  MIDI  de  la  carte  Sound
  Blaster sert souvent a connecter aussi un joystick).

  33..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn

  Bien  evidemment  il vous faut un clavier MIDI. Verifiez que vous avez
  bien un port d'entree-sortie MIDI a l'arriere de  votre  carte  son  :
  c'est  une prise avec 15 petits trous.  Certaines cartes ``compatibles
  Sound Blaster'' en sont depourvues ; dans ce  cas  achetez  une  autre
  carte son, ou alors une carte d'interface MIDI.

  Il  vous  faut egalement un cable MIDI-Sound Blaster (de 100 a 200 Fr,
  selon la qualite et la longueur du  cable).  Connectez  la  prise  DIN
  MIDI-out  dans  le  port  MIDI-in  de  votre clavier et vice-versa, et
  branchez la prise a 15  broches  sur  votre  carte  sonore.   Verifiez
  ensuite que le port Joystick/MIDI est active, dans le cas contraire ca
  ne marchera pas.  Il y a deux types de cartes :

  +o  les cartes a configuration materielle : dans ce cas il faut  ouvrir
     votre  ordinateur et modifier le reglage des cavaliers sur la carte
     ;

  +o  les  cartes  a  configuration  logicielle  :  il  faut  lancer   un
     programme.  Il  faudra sans doute demarrer sous DOS si le programme
     fourni tourne sous ce systeme.

  44..  SSuuppppoorrtt ppaarr llee nnooyyaauu

  Le noyau doit supporter la gestion du son.  Les informations dont vous
  avez  besoin  sont  dans  le  manuel de votre carte sonore.  Lancez le
  programme de configuration du noyau, et  demandez  le  support  de  la
  carte  Sound  Blaster  (la  plupart  des clones Sound Blaster marchent
  correctement avec cette option). Demandez le  support  de  la  MPU-401
  (Note  du  traducteur: le programme de configuration de la carte Sound
  Blaster precise pourtant que l'option MPU-401 _n_'_e_s_t _p_a_s pour la  carte
  Sound Blaster 16), et de l'interface MIDI.

  Verifiez  dans  le manuel les adresses et les IRQ. Si ces informations
  sont incorrectes, il risque d'y avoir des conflits.  (Sur  la  plupart
  des cartes sonores, c'est 330, IRQ 7).
  Assurez-vous  que  les deux ports MPU-401 sont configures correctement
  (ce sont les memes nombres). Le menu de configuration du noyau vous  y
  aidera. Ensuite, il faut reconstruire le noyau.

  55..  IInnssttaallllaattiioonn  dduu llooggiicciieell

  Ceci  fait, vous pouvez installer vos programmes MIDI favoris. Si vous
  ne savez pas quoi  choisir,  utilisez  _J_A_Z_Z_!,  qui  est  un  excellent
  sequenceur  MIDI.  Vous  pourrez  le  trouver  sur SunSite et beaucoup
  d'autres sites. Il  est  egalement  recommande  d'installer  PlayMidi.
  Ensuite, tout devrait bien se passer.

  Le Mini-Howto Mac Terminal
  Robert Kiesling, traduit par Olivier Tharan, olive@laria.u-
  picardie.fr
  v1.4, 9 novembre 1997

  Ce mini Howto dcrit la 1002me utilisation d'un Macintosh mort (h
  h) : comment configurer le Mac pour en faire un terminal pour Linux.
  Des configurations utilisant getty et le programme de terminaux kermit
  sont dcrites, ainsi que l'utilisation de kermit en rseau point 
  point entre Linux et un Macintosh. Ce document peut tre reproduit
  librement, en totalit ou en partie,  la condition que toute utilisa
  tion soit conforme  la note gnrale de copyright du Projet de Docu
  mentation Linux. Voyez le fichier COPYRIGHT pour plus de dtails.
  Envoyez toutes les plaintes, suggestions, erreurs et autres  kies
  ling@terracom.net <mailto:kiesling@terracom.net>, pour que je puisse
  garder ce document aussi complet et  jour que possible.
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. tablissement d'une liaison srie

  3. Connexion client-serveur avec

     3.1 Ressources Macintosh

  4. Se logger grce 

     4.1 Autres programmes d'mulation de terminal sur Mac

  5. Conclusion



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Ce mini Howto devrait vous donner quelques ides Super Top pour faire
  fonctionner votre Macintosh avec Linux. Malheureusement, j'ai t trs
  occup et je n'ai donc pas pu inclure la moiti de ce que je prvoyais
  d'inclure, comme l'utilisation de MacTCP et d'OpenTransport pour vous
  connecter  votre machine Linux par l'intermdiaire d'une ligne PPP.
  Ceci devra attendre une version future.

  Ce mini Howto ne couvre pas non plus la mise en place sur un rseau
  LocalTalk ou AppleTalk. J'explorerai peut-tre ces thmes s'il y a
  suffisamment d'intrt dans, disons, l'impression sur une imprimante
  LaserWriter  partir de Linux. Sinon, il me semble que de telles
  applications, causant plus de tracas qu'il n'en faut (sans parler du
  prix), ne tiennent pas dans le cadre de ce document.

  Je ne compte pas parler de MkLinux non plus dans ce document. C'est
  bien mieux document autre part.

  Si vous avez donc des ides  propos de ce document, laissez-moi un
  mot  l'adresse lectronique ci-dessus. Les deux systmes renferment
  une bonne partie de l'tat d'esprit du dbutant, ainsi qu'une prouesse
  technique, et  mon sens ils ne communiquent pas assez entre eux.



  22..  ttaabblliisssseemmeenntt dd''uunnee lliiaaiissoonn ssrriiee


  Pour tablir une liaison srie entre un Mac et une machine Linux, vous
  avez besoin, du ct Linux, soit d'un cble srie DB9 femelle vers
  DB25 mle ou un cble srie DB25 femelle vers DB25 mle, selon votre
  port srie. Du ct du Macintosh, vous avez besoin d'un cble modem 
  grande vitesse DIN9 vers DB25 mle.

  Assurez-vous que le cble est bien un cble  "grande vitesse", car
  certains cbles Macintosh anciens sont configurs avec des lignes de
  prise de contact (handshaking) lies, ce qui les rend inutiles pour
  des connexions srie  grande vitesse.

  Vous aurez aussi besoin d'un adaptateur null modem, disponible chez
  tout revendeur informatique, et d'un changeur de genre srie DB25
  femelle vers DB25 femelle pour relier les deux cbles srie.

  J'ai entendu dire que les cbles d'imprimante pour Mac sont en fait
  des cbles null modem dguiss, mais je ne peux pas le confirmer.
  Certains d'entre eux sont de toute faon des DIN9 vers DIN9, et en
  connecter un sur une liaison srie engendrerait plus de tracas que
  ncessaire.

  Si cela ressemble  de l'Hbreu pour vous, lisez le Howto Serial pour
  plus de dtails sur la configuration des cbles RS 232 et sur les
  protocoles de transmission de donnes.

  Avant de connecter le Mac et la machine Linux, vous devriez dterminer
  si vous avez un port srie en tat de marche sur les deux machines,
  soit en connectant un modem et en appelant un autre ordinateur avec
  minicom (Linux), ZTerm (Mac), kermit (l'un ou l'autre), ou tout
  programme de communication de votre choix.

  La dernire version de minicom est disponible 
  sunsite.unc.edu/pub/Linux/apps/serialcomm/dialout
  <ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/dialout> et sur les
  sites miroir.

  ZTerm est un programme de communication complet et facile  utiliser.
  Malheureusement, c'est un shareware. Une version  jour est disponible
   mac.archive.umich.edu <ftp://mac.archive.umich.edu> et de telles
  archives.

  Le programme kermit a t port sur tous les ordinateurs et systmes
  d'exploitation qui existent. Les archives sont situes 
  ftp.columbia.edu/kermit <ftp://ftp.columbia.edu/kermit>.

  Vous devriez considrer srieusement l'utilisation de kermit sur les
  deux machines au moins  ce point, parce que 1) il est libre (bien
  qu'il ne soit pas couvert par la Licence Publique Gnrale de la Free
  Software Foundation) ; et 2) il est bien moins gnant d'avoir kermit
  sur les deux machines que d'avoir deux programmes de communication
  compltement diffrents.

  Si vous avez un autre moyen de dterminer si les ports srie des deux
  machines sont fonctionnels, n'hsitez pas  l'utiliser. Ce qui est
  important est de s'assurer que les deux machines possdent un port
  srie en tat de marche.

  La connexion srie relle devrait tre facile, si l'on a suivi les
  indications ci-dessus. Si ce n'est pas le cas, la connexion ressemble
   ceci :



   PC Linux    Cble srie    Adap-   Changeur  Cble srie     Mac
   ---------   DB9 ou DB25    tateur  de genre  DIN9 vers     --------
   |       |  vers DB25 mle |     |  |     |   DB25 Mac      |      |
   |       |-----------------|     |--|     |-----------------|      |
   |       |                 |     |  |     |                 |      |
   ---------                  Null                            --------
                              Modem




  33..  CCoonnnneexxiioonn cclliieenntt--sseerrvveeuurr aavveecc kkeerrmmiitt


  C'est la configuration la plus fluctuante parmi celles dcrites ici.
  Elle demande le moins de configuration systme, bien qu' l'usage ce
  soit le systme le plus difficile  utiliser parmi ceux dcrits ici.

  En bref, vous dmarrez kermit  la fois sur la machine Linux et sur le
  Mac et vous placez l'un d'entre eux en mode serveur. Que l'une soit le
  client et l'autre le serveur n'a aucune importance, parce que c'est
  une connexion point  point. Cependant, le kermit de Linux peut tirer
  partie des possibilits de script avances de Linux, et il semble donc
  logique (pour moi au moins) de donner au kermit ct Linux la fonction
  de serveur, car cette tche sera plus rapidement automatise.

  Vous devez vous assurer que kermit est install correctement  la fois
  sur le Mac et sur le PC Linux. Suivez les instructions des
  distributions kermit respectives. Sur la machine Linux tapez kermit 
  l'invite du shell pour le dmarrer. Vous aurez peut-tre besoin des
  droits root pour positionner la vitesse du port et de la connexion.

  Kermit, dans les versions POSIX rcentes pour Unix, supporte des
  vitesses de connexion jusqu' 115 Kbps. Les versions les plus rcentes
  pour Macintosh supportent des vitesses de port srie allant jusqu'
  57,6 Kbps. Ceci devrait tre plus que suffisant pour toute application
  basique de type terminal, mais si vous avez besoin d'une connexion 
  plus grande vitesse, c'est rat en ce qui concerne kermit et les
  liaisons srie. Cependant, kermit permet des communications aises sur
  une liaison TCP/IP, mais je n'ai pas pu tester cette possibilit.
  Regardez les autres solutions dans les sections suivantes. Rappelez-
  vous simplement, surtout du ct du Mac, d'utiliser avec kermit un
  port diffrent pour vos connexions srie que pour vos connexions
  TCP/IP, car kermit sur le Mac mobilisera de manire brutale un port
  srie en cours d'utilisation.

  Avec ceci en tte, votre fichier .kermrc devrait contenir quelque
  chose comme ceci :


  echo Lecture du fichier global /usr/local/bin/ckermit.local.ini....
  set prompt Chanel3 >
  set line /dev/ttyS0
  set baud 38400
  set send packet-length 2000
  set receive packet-length 2000
  set block 3
  set file type binary



  Puis, dans votre fichier ~/.kermrc, vous auriez une ligne telle que


  take /usr/local/bin/ckermit.local.ini

  Du ct du Macintosh, positionnez les mmes paramtres de
  communication pour les bits par seconde, les bits de stop, la parit
  et la longueur d'un mot.  Certaines versions anciennes de Kermit Mac
  ne supportent pas les paquets de 2 k, par consquent vous aurez
  peut-tre besoin d'indiquer une taille de paquet plus petite.
  Cependant, kermit positionne la longueur du paquet de communication
  selon le paramtrage de longueur de paquet reu, et donc vous aurez
  besoin de mettre une taille de paquet plus petite du ct Linux
  galement.

  Pour communiquer effectivement sur la liaison, vous devez entrer en
  mode serveur soit sur le Mac soit sur Linux. Lequel n'a pas
  d'importance. Voyez la documentation kermit pour avoir des dtails sur
  le mode serveur.


  33..11..  RReessssoouurrcceess MMaacciinnttoosshh


  Voici l'une des rares applications de kermit o le positionnement d'un
  type de fichier texte pour les transferts est utile. C'est parce que
  les fichiers Macintosh ont deux parties : la ppaarrttiiee ddoonnnneess et la
  ppaarrttiiee rreessssoouurrcceess. La partie donnes correspond  ce que nous
  appellerions un fichier dans le monde Linux : ce sont les donnes
  relles. La partie ressource contient des images pour les icnes, des
  jeux de claviers, des spcifications de polices, et ainsi de suite. Si
  vous transfrez un fichier de Linux vers le Mac, le fichier ne sera
  pas reconnu comme un fichier texte par le Mac, si vous utilisez le
  mode binaire.

  En transfrant des fichiers binaires entre les deux systmes, vous
  devriez utiliser le format BinHex Macintosh .hqx, qui est un codage
  sur 7 bits d'un fichier de donnes en 8 bits. Des utilitaires Mac
  comme BinHexer ou StuffIt convertiront le fichier en sa forme binaire.

  Si vous avez un fichier texte qui devient par inadvertance un fichier
  de donnes seules sur le Mac, il est probable qu'il n'apparatra
  jamais dans une liste de bote de dialogue d'ouverture de fichier. Ce
  que vous devrez faire est ouvrir le fichier avec ResEdit, disponible 
  mac.archive.umich.edu. ResEdit vous dira que le fichier que vous
  ouvrez n'a pas de partie ressources et vous demandera alors si vous
  voulez en ajouter une. Vous devriez rpondre "Yes" (oui)  cette
  question. Vous pourrez alors diter les champs Type et Creator du
  fichier en slectionnant l'option "Open Special" du menu Fichier. Tous
  les fichiers texte Macintosh sont du type TEXT, remplacez donc les
  points d'interrogation dans la bote de Texte avec cela. Le code
  Creator dpend de votre diteur de texte ou de votre traitement de
  texte. Chacun est unique, justement, et c'est ainsi que le Mac
  identifie des applications diffrentes. Le code Creator pour GNU Emacs
  sur le Mac est EMAC, par exemple. Si vous avez un doute sur le code du
  crateur de votre diteur de texte ou traitement de texte, utilisez
  ttxt, qui est le code crateur de TeachText (qui est l'quivalent Mac
  de EDLIN.EXE.) Votre traitement de texte ou diteur de texte rel
  pourra alors traduire le fichier de TeachText en son type natif.

  On peut faire bien d'autres choses avec TeachText, a vaut donc la
  peine de le garder en permanence sur votre Mac. Le livre _V_o_o_d_o_o _M_a_c,
  par Kay Yarborough Nelson, est une bonne source de trucs pour
  Macintosh qui ont fait leur preuve et qui utilisent ResEdit,
  TeachText, le Finder et d'autres programmes un peu oublis.


  44..  SSee llooggggeerr ggrrccee  kkeerrmmiitt



  Configurer Linux pour utiliser le Mac comme un terminal de login: est
  encore plus facile. kermit est idal pour cela, parce que c'est l'un
  des rares programmes de communication libres qui fournit une mulation
  VT100/120/220 crdible.

  De manire gnrale, ce que vous voudrez faire est lancer kermit sur
  le Macintosh comme dans la section prcdente, mais plutt que de
  taper des commandes sur le serveur, vous entrez en mode connect. C'est
  le mode normal d'mulation de terminal qu'utilisent de toute faon la
  plupart des gens.

  Du ct Linux, la ligne srie doit tre configure grce  un getty
  pour dmarrer un shell login:.  cette fin, vous devez dire  init
  qu'un terminal est attach  la ligne srie. Dans votre fichier
  /etc/inittab vous avez besoin d'une ligne comme celle-ci :


  T1:23:respawn:/sbin/getty -L ttyS0 9600 vt100



  Assurez-vous de mettre le priphrique srie appropri  la place de
  /dev/ttyS0 et la vitesse correcte pour le port  la place de 9600 dans
  la ligne de commande ci-dessus.

  Cette commande indique  getty de dmarrer login (le paramtre -L) sur
  l'affichage du terminal, et quand la priode de login est termine
  (timeout), de redmarrer (respawn, relancer) le programme de login
  jusqu' ce que quelqu'un se logge. Si aucun priphrique n'est
  connect  la ligne srie, ou si la connexion est mauvaise, vous
  pourrez voir un message sur la console du systme tel que : /dev/ttyS0
  respawning too fast: disabling for 5 minutes (/dev/ttyS0 se relance
  trop vite, je l'arrte pendant 5 minutes). Si c'est le cas, vous
  pouvez revenir  un comportement normal en (en tant que root) tuant
  avec kill le processus getty, ou en utilisant la commande init q. Les
  deux ont l'effet de relancer le(s) processus getty. Si tout est en
  ordre, vous devriez voir la bannire Linux et l'invite de login sur la
  fentre kermit du Mac. C'est tout.

  De plus, si vous utilisez autre chose que le getty de base, comme
  getty_ps, la commande ci-dessus sera lgrement diffrente. Ce qu'il
  convient de se rappeler est que tout ce qui est  droite de
  /sbin/getty est un argument de getty et non d'init.  Vous devriez
  jeter un coup d'oeil aux pages de manuel de getty, init et inittab si
  vous vous posez des questions sur la mise en oeuvre de init et de
  getty.

  Le Howto Serial fournit des dtails utiles sur la manire de
  configurer /etc/inittab pour getty_ps, si c'est ce que votre systme
  utilise.

  Pour transfrer des fichiers entre le Macintosh et la machine Linux,
  vous pouvez ( travers le Kermit du Mac) lancer la commande kermit -x
  pour dmarrer le kermit de Linux en mode serveur. Vous pouvez alors
  utiliser les commandes normales de transfert de fichiers pour envoyer
  des fichiers sur la ligne srie. Il est utile de positionner une
  invite dans votre ~/.kermrc avec une ligne telle que


  set prompt Linux-kermit >



  Sinon, se rappeler sur quelle machine on est peut vite devenir
  droutant.

  44..11..  AAuuttrreess pprrooggrraammmmeess dd''mmuullaattiioonn ddee tteerrmmiinnaall ssuurr MMaacc


  Cette mthode devrait fonctionner de manire quivalente sur n'importe
  quel autre programme d'mulation de terminal pour Mac. Si vous avez
  ZTerm, vous pouvez utiliser rz et sz sur la machine Linux pour
  transfrer des fichiers grce au protocole ZModem. Si Microphone Lite
  tait livr avec votre modem-fax, cela fonctionne  l'identique, bien
  que sans les possibilits volues de script et de configuration de
  kermit.


  55..  CCoonncclluussiioonn


  Si vous avez des questions  propos de tout ceci, ou des suggestions
  concernant l'volution future de la connectivit par liaison srie
  entre un Mac et Linux, n'hsitez pas  m'envoyer un mot 
  kiesling@terracom.net.















































  Mini Howto Mail vers News
  Robert  Hart, InterWeft IT Consultants Melbourne, Australie,
  iweft@ipax.com.au
  Traduit par Olivier Tharan, tharan@int-evry.fr
  v1.0, 4 novembre 1996

  Ce document decrit  comment  configurer  votre  logiciel  de  News  et
  mail2news.pl  pour  relier  des  listes de distribution aux groupes de
  news locaux.

  11..  CCooppyyrriigghhtt eett aauuttrreess cchhoosseess

  Le copyright de ce document est  retenu  par  l'auteur.  Il  donne  la
  permission  de  distribuer ce document par des moyens electroniques et
  sur des CDs, a condition qu'il soit garde entierement dans son  format
  d'origine.  Il  donne  aussi  la permission d'imprimer une copie de ce
  document pour usage personnel.

  La publication  de  ce  document  en  partie  ou  en  entier  sans  la
  permission  du  proprietaire  du  copyright  de  toute  maniere  autre
  qu'indiquee ci-dessus est interdite.

  Ce document est directement  supporte  par  InterWeft  IT  Consultants
  (Melbourne, Australie).

  La  derniere  version  de  ce  document est disponible sur le site WWW
  d'InterWeft chez InterWeft IT Consultants,  <http://203.29.72.65/>.

  22..  IInnttrroodduuccttiioonn

  La plupart des sites sur Internet sont toujours en train  de  chercher
  des moyens d'ameliorer l'utilisation de la bande passante limitee dont
  ils disposent sur leur lien a Internet.

  Supposons que plus d'un  utilisateur  s'abonne  a  la  meme  liste  de
  distribution,  et il y aura duplication de trafic. S'il y a un certain
  nombre de telles duplications, ou si le  trafic  sur  les  listes  est
  important, la consommation de bande passante s'accroit.

  En  abonnant  le site a une liste (si c'est permis par le proprietaire
  de la liste), et en _r_o_u_t_a_n_t le courrier electronique vers  le  serveur
  de  news  local,  il est possible de rendre les listes de distribution
  accessibles a tous les utilisateurs  du  site  ou,  en  utilisant  les
  principes   de   securite   d'innd,  de  limiter  l'acces  a  certains
  utilisateurs.

  Un tel abonnement de groupe (surtout s'il y a quelques listes a  grand
  trafic)  peut  generer  des  economies d'utilisation de bande passante
  importantes.

  La lecture des listes a travers un lecteur de  news  offre  aussi  aux
  utilisateurs  l'avantage du threading (NdT : creer des enfilades), qui
  n'est pas disponible dans de nombreux programmes  de  mail,  et  aussi
  l'avantage  de  liberer  leur boite aux lettres pour du courrier peut-
  etre plus urgent ou plus personnel.

  Ce mini Howto decrit la mise en  place  du  script  mail2news.pl  pour
  realiser ceci.

  22..11..  OOuu ttrroouuvveerr mmaaiill22nneewwss..ppll

  L'auteur  n'a  pas  pu  trouver  mail2news.pl  sur  le CPAN (le reseau
  complet d'archives Perl), mais il a pu passer devant sans le voir.  Il
  est   cependant  sur  sunsite.unc.edu  (quelque  part)  et  aussi  sur
  ftp.redhat.com.

  Comme ce script Perl n'est pas tres long, vous le trouverez a  la  fin
  de ce Howto.

  33..  VVuuee dd''eennsseemmbbllee dduu ssyysstteemmee

  Il  est probablement plus facile de comprendre le fonctionnement de ce
  systeme en suivant un message a partir de  la  liste  de  distribution
  vers  le groupe de news, puis d'un message poste sur le groupe de news
  local (route vers la liste de distribution) et  en  regardant  comment
  ils sont traites.

  33..11..  LLee ccoouurrrriieerr vveennaanntt ddee llaa lliissttee ddee ddiissttrriibbuuttiioonn

  Le  courrier  de  la  liste  de  distribution  est envoye a toutes les
  adresses mail abonnees. Un alias de mail special est abonne a la liste
  de  distribution  en  question  et  tout le trafic a destination et en
  provenance de la liste est ainsi envoye par  le  serveur  de  liste  a
  cette adresse.

  Quand  le  courrier  de la liste de distribution arrive sur la machine
  locale, l'alias de mail envoie le message entrant  dans  mail2news.pl.
  L'alias   de  mail  specifie  aussi  le  groupe  de  news  (local)  de
  destination.

  Le script mail2news.pl traite le message, en appliquant  de  nouvelles
  en-tetes et utilise ensuite rnews ou inews pour poster le message dans
  le groupe de news.

  33..22..  MMeessssaaggeess ppoosstteess ddaannss llee ggrroouuppee ddee nneewwss llooccaall

  Le groupe de news local  est  installe  en  tant  que  groupe  modere,
  puisque  ceci  nous  permet de beneficier des possibilites de courrier
  electronique d'innd. Tout message poste dans un  groupe  modere  n'est
  pas  transmis automatiquement au groupe. A la place, les messages sont
  envoyes par _e_m_a_i_l au moderateur du groupe.

  En declarant le  moderateur  du  groupe  de  news  local  comme  etant
  l'adresse de la liste de distribution, tous les messages postes sur le
  groupe  de  news  local  seront  envoyes  par  _e_m_a_i_l  a  la  liste  de
  distribution  par innd et n'apparaitront qu'une fois qu'ils auront ete
  recus par mail2news.pl qui ajoute la  ligne  _a_p_p_r_o_v_e_d  necessaire  aux
  messages pour qu'innd accepte de les poster dans le groupe de news.

  44..  CCoonnffiigguurreerr mmaaiill22nneewwss

  Placez  le  script mail2news.pl dans un endroit convenable. Je prefere
  /usr/local/scripts, mais l'endroit depend de vous.

  Vous devrez editer le script comme suit :

  +o  au debut du script, assurez-vous que vous pointez vers  le  binaire
     Perl local

     ___________________________________________________________________
     #!/usr/bin/perl
     # pointe vers l'endroit courant de Perl
     ___________________________________________________________________

  +o  j'ai  eu  des problemes avec les trois lignes suivantes. Les mettre
     en commentaire ne pose pas de problemes.

     ___________________________________________________________________
     ( $version  ) = $] =~ /(\d+\.\d+).*\nPatch level/;
     die "$program: demande au moins la version 3 de Perl\n"
            if $version < 3;
     ___________________________________________________________________

  +o  editez les lignes suivantes pour  pointer  vers  le  programme  qui
     poste (j'utilise rnews) et vers votre machine de news :

     ___________________________________________________________________
     # $inews = "/usr/bin/inews";
     # $iopts = "-h -o \"passerelle mail2news\"";
     $inews = "/usr/bin/rnews";
     $iopts = "";
     $postinghost = "votre.serveur.de.news";   # pointe vers votre serveur de news
     ___________________________________________________________________

  +o  assurez-vous que le script est executable (mode 755).

  55..  MMeettttrree eenn ppllaaccee lleess aalliiaass ddee mmaaiill

  Editez  /etc/aliases  pour  creer  des  entrees  pour  les  listes  de
  distribution que vous voulez envoyer vers les news. Chaque entree doit
  etre de la forme :

       <adresse email abonnee a la liste>: \
                 "| /usr/local/scripts/mail2news.pl <nom du groupe de news local>"

  Si  par  exemple  l'adresse  de  mail  a  laquelle  il faut envoyer le
  courrier de la liste (l'adresse _e_m_a_i_l abonnee) est  liste_site  et  le
  groupe  de news local dans lequel il faut poster le courrier s'appelle
  groupe.site.local, l'alias sera

       # adresse d'abonnement de groupe pour machin@une.certaine.liste
       liste_site: "|/usr/local/scripts/mail2news.pl groupe.site.local"

  Creez une entree pour chaque liste  de  distribution  que  vous  devez
  router  vers votre serveur de news local et lancez ensuite newaliases.

  66..  CCoonnffiigguurreerr lleess ggrroouuppeess ddee nneewwss eett llee sseerrvveeuurr ddee nneewwss ((iinnnndd)

  En  utilisant  ctlinnd, creez les groupes de news sur votre serveur de
  news. Rappelez-vous qu'ils doivent etre  locaux,  donc  nommez-les  de
  facon  distincte  avec  un  prefixe  de  facon  a les exclure de votre
  distribution de news (dans le fichier newsfeeds).

  Vous devez aussi dire a innd que le groupe est  modere  (en  utilisant
  ctlinnd).  Rappelez-vous  que innd est tres sensible aux proprietaires
  et permissions de fichiers, vous devez agir a ce niveau avec  innd  en
  tant qu'utilisateur _n_e_w_s. Vous indiquez un groupe modere en donnant le
  parametre m a la commande newgroup.

       ctlinnd newgroup <nom du nouveau groupe> m <administrateur>

  Le m indique a innd que le groupe est modere.

  Editez votre fichier newsfeeds  pour  vous  assurer  que  ces  groupes
  locaux  ne sont pas distribues (sauf si vous voulez specifiquement que
  ca se passe ainsi).

  Par   exemple,   si   votre   liste    de    distribution    s'appelle
  groupe.site.local,  vous  ajouterez  sans doute !local* dans le second
  champ des sites que vous distribuez (ou dont vous  recevez  les  news)
  dans votre fichier newsfeeds.

  Maintenant,  de facon a vous assurer que les messages des utilisateurs
  sont  envoyes  sur  la  liste   automatiquement   par   innd,   editez
  /etc/news/moderators  (ou /usr/local/news/moderators) pour ajouter une
  ligne  qui  declare  l'adresse  de  la  liste  de  distribution  comme
  moderateur.

       groupe.site.local:liste@un.site.de.liste

  77..  AAbboonnnneerr ll''aalliiaass mmaaiill22nneewwss a la liste de distribution

  Vous   devez  maintenant  abonner  l'alias  de  mail  a  la  liste  de
  distribution.  Verifiez avec l'information de la liste de distribution
  comment  s'abonner.   Certaines listes de distribution vous permettent
  d'abonner  une  adresse  _e_m_a_i_l  differente   de   celle   d'ou   vient
  l'abonnement (elles verifient la confirmation avec l'adresse a abonner
  avant d'abonner reellement cette adresse).

  D'autres listes de distribution ne permettent pas  ceci.  Vous  devrez
  donc _f_o_r_g_e_r une demande d'abonnement. Il y a plusieurs facons de faire
  ceci. L'une des plus simples est d'utiliser  Netscape  Mail  configure
  (de  maniere  temporaire)  avec  l'adresse  avec  laquelle la liste de
  distribution doit envoyer le courrier.

  Apres l'abonnement, vous devriez voir un message de  bienvenue  de  la
  part  du  serveur  de  listes dans votre serveur de news. Dans ce cas,
  tout s'est bien passe et vous pouvez maintenant tester l'autre sens en
  postant un message de news dans votre nouvelle liste.

  Le  message  _n_e _d_e_v_r_a_i_t _p_a_s apparaitre immediatement dans le groupe de
  news. Il devrait etre envoye  par  courrier  electronique  et  recu  a
  nouveau et poste dans le groupe de news.

  Si  cela fonctionne, vous avez reussi a router la liste vers les news.

  88..  SSii ccaa nnee ffoonnccttiioonnnnee ppaass......

  Si ca ne marche pas, vous devez retrouver la trace des  messages  pour
  voir  exactement ou ca s'arrete de fonctionner. Des outils utiles a ce
  niveau sont les logs de mail et de news.

  Robert Hart Melbourne, Victoria, Australie, octobre 1996

  99..  LLee ssccrriipptt mmaaiill22nneewwss..ppll

  ______________________________________________________________________
  #!/usr/bin/perl

  ($program = $0) =~ s%.*/%%;

  #( $version  ) = $] =~ /(\d+\.\d+).*\nPatch level/;
  #die "$program: demande au moins la version 3 de Perl\n"
  #        if $version < 3;

  # $inews = "/usr/bin/inews";
  # $iopts = "-h -o \"passerelle mail2news\"";
  $inews = "/usr/bin/rnews";
  $iopts = "";
  $postinghost = "votre.serveur.de.news";

  if ($#ARGV < 0) {
      # $newsgroup = "test";
      # nous attendons la ligne newsgroup dans le corps
  } elsif ($#ARGV == 0) {
      $newsgroup = $ARGV[0];
  } else {
      die "usage: $program [groupe de news]\n";
  }

  # si jamais inews fait un core dump ou quelque chose insense
  $SIG{'PIPE'} = "plumber";
  sub plumber { die "$program: \"$inews\" est mort trop tot !\n"; }

  open (INEWS, "| $inews $iopts") ||
      die "$program: ne peut pas lancer $inews\n";

  # boucle qui prend les en-tetes
  while (<STDIN>) {
     last if /^$/;

     # transforme la vraie ligne from: dans le vieux style
     s/^From:\s+(.*) <(.*)>/From: $2 ($1)/;

     s/Message-Id/Message-ID/;

     # transforme la ligne from_ en en-tete de chemin ;
     # fonctionne aussi en local
     s/^From\s+(\S+)@(\S+).*/Path: $2!$1/
       || s/^From\s+(\S+)[^@]*$/Path: $1\n/;

     print INEWS
  #       if /^(Date|From|Subject|Path|Newsgroups|Organization|Message-ID):/i;
     if /^(Date|From|Subject|Path|Newsgroups|Message-ID):/i;
     $saw_subject |= ( $+ eq 'Subject' );

     $saw_msgid |= ( $+ eq 'Message-ID' );

  #   $saw_newsgroup |= ( $+ eq 'Newsgroups' );
  }

  warn "$program: n'attendait pas le groupe dans les en-tetes et les arguments\n"
      if $newsgroup && $saw_newsgroup;

  die "$program: n'a pas obtenu le groupe des en-tetes ni des arguments\n"
      unless $newsgroup || $saw_newsgroup;

  $approved = $newsgroup;
  $approved =~ s/\./'-'/eg;

  ($sec,$min,$hour,$mday,$mon,$year)=localtime(time);
  $madeupid = "\<$year$mon$mday.$hour$min$sec.$$\@kepler.hedland.edu.au\>";
  printf INEWS "Newsgroups: %s\n", $newsgroup if $newsgroup;
  printf INEWS "Approved: %s\@kepler.hedland.edu.au\n", $approved;
  print  INEWS "Subject: Untitled\n" unless $saw_subject;
  printf INEWS "Message-ID: %s\n", $madeupid unless $saw_msgid;
  printf INEWS "NNTP-Posting-Host: %s\n", $postinghost;
  print  INEWS "Organisation: (mail2news gateway)\n";
  print  INEWS "\n";

  print INEWS while <STDIN>;   # avale le reste du message

  close INEWS;
  exit $?;
  ______________________________________________________________________

  Man page HOWTO
  Auteur : Jens Schweikhardt schweikh@noc.dfn.de

  www.shuttle.de/schweikh/home.html

  Mars 1998

  (Adaptation franaise par Alexandre Devaure adevaure@mail.dotcom.fr, 2
  juin 1999).  Ce HOWTO explique ce que vous devrez avoir en tte quand
  vous prvoyez d'crire une documentation en ligne (plus connue sous le
  nom de page de manuel) que vous voulez rendre accessible via la com
  mande man(1). Tout au long de ce HOWTO, une entre du manuel sera sim
  plement appele page de manuel, quelque soit sa longueur relle et
  sans intention sexiste.

  ______________________________________________________________________

  Table des matires


  1. Quelques vidences  propos de la documentation

  2. Comment accde-t-on aux pages de manuel ?

  3. A quoi ressemble une page de manuel formate ?

  4. Comment documenter plusieurs choses dans une seule page de manuel ?

  5. Quel ensemble de macros utiliser ?

  6. Quels prprocesseurs puis-je utiliser ?

  7. Dois-je distribuer les sources et/ou la documentation dj formate ?

  8. Quelles sont les conventions pour les fontes ?

  9. Comment dois-je prsenter ma page de manuel ?

  10. Comment puis-je avoir un texte en pur ASCII sans tous ces fichus ^H^ de contrle ?

  11. Comment avoir une belle page de manuel en PostScript  ?

  12. Comment faire fonctionner les programmes

  13. La langue franaise

  14. Les conditions de copie



  ______________________________________________________________________

  11..

  QQuueellqquueess vviiddeenncceess  pprrooppooss ddee llaa ddooccuummeennttaattiioonn

  Pourquoi crivons-nous une documentation ? C'est une question bte.
  Parce que nous voulons que d'autres personnes puissent utiliser notre
  programme, notre fonction dans une librairie ou quoi que ce soit que
  nous avons crit et rendu disponible. Mais crire une documentation
  n'est pas suffisant :

    la documentation doit tre accessible. Si elle est cache  un
     endroit non standard o les outils de recherche relatifs  la
     documentation ne la trouveront pas, comment peut-elle remplir son
     rle ?
    la documentation doit tre fiable et prcise. Il n'y a rien de plus
     irritant qu'un programme se comportant diffremment de ce qui est
     crit dans sa documentation. Les utilisateurs vous maudiront, vous
     enverront des courriers d'insulte, puis rejetteront  jamais tout
     autre travail venant de vous.

     La mthode traditionnelle pour accder  la documentation sous UNIX
     fait appel  la commande man(1). Ce HOWTO dcrit ce que vous devez
     faire pour crire une page de manuel qui sera correctement traite
     par les outils prvus  cet effet, dont les plus importants sont
     man(1), xman(1x), apropos(1), makewhatis(8) et catman(8).

  La qualit et la vracit des informations sont, bien sr, de votre
  ressort. Malgr tout, vous trouverez dans ce guide quelques ides qui
  vous permettront d'viter certains piges courants.

  22..

  CCoommmmeenntt aaccccddee--tt--oonn aauuxx ppaaggeess ddee mmaannuueell ??

  Vous devez connatre avec prcision le mcanisme d'accs aux pages de
  manuel afin de savoir donner un nom correct  vos documents, et d'tre
  capable de les installer au bon endroit. Chaque page de manuel
  appartient  une section spcifique, dnote par un simple chiffre.
  Les sections les plus courantes rencontres sous Linux sont :

    1 : commandes utilisateurs pouvant tre excutes par tout le
     monde ;

    2 : appels systmes, c'est--dire les fonctions fournies par le
     noyau ;

    3 : fonctions des bibliothques ;

    4 : priphriques, c'est--dire les fichiers spciaux que l'on
     trouve dans le rpertoire /dev ;

    5 : descriptions des formats de fichiers (comme par exemple
     /etc/passwd ;

    6 : les jeux, sans commentaire...

    7 : divers (macros, conventions particulires, ...) ;

    8 : outils d'administration excutables uniquement par le super
     utilisateur ;

    9 : un autre endroit (spcifique  Linux) destin  la
     documentation des services offerts par le noyau ;

    n : nouvelle documentation, qui pourra tre dplace vers un
     endroit appropri ;

    o : ancienne documentation, qui peut tre conserve encore un
     certain temps ;

    l : documentation locale, propre  ce systme particulier.

     Le nom du fichier source d'une page de manuel (le fichier d'entre
     du systme de formatage) est le nom de la commande dcrite (ou de
     la fonction, du fichier, etc.), suivi d'un point et du numro de
     section.  Si, par exemple, vous documentez le format du fichier
     "_p_a_s_s_w_d", vous devez appeler le fichier source "_p_a_s_s_w_d_._5". Nous
     avons ici un exemple d'un fichier qui porte le  mme nom qu'une
     commande ; nous aurions tout aussi bien avoir une fonction de
     bibliothque appele "_p_a_s_s_w_d". L'organisation en sections constitue
     la mthode habituelle pour rsoudre ces ambiguts : la description
     de la commande se trouvera dans le fichier "_p_a_s_s_w_d_._1" et notre
     hypothtique fonction de bibliothque dans "_p_a_s_s_w_d_._3".

  Quelquefois, une lettre est ajoute au numro de section comme par
  exemple "_x_t_e_r_m_._1_x" ou "_w_i_s_h_._1_t_k". Le but de cette notation est
  d'indiquer qu'il s'agit respectivement d'une documentation d'un
  programme  X Window ou d'une application Tk. Certains programmes
  d'affichage du manuel peuvent exploiter cette particularit ; xman,
  par exemple affichera "_x_t_e_r_m_(_x_)" et "_w_i_s_h_(_t_k_)" dans la liste des
  documents disponibles.

  S'il vous plat, n'utilisez pas les sections n, o et l : selon le
  standard du systme de fichiers (File System Standard), ces sections
  sont dconseilles, utilisez plutt les sections numriques.

  Attention aux ventuels conflits de noms avec des programmes,
  fonctions ou fichiers dj existants. Ce serait certainement une
  mauvaise ide d'crire un autre diteur de texte et de le nommer ed,
  sed (pour super ed) ou red (pour Roger edition). En vous assurant que
  le nom de votre programme est unique, vous viterez que quelqu'un
  excute votre programme et qu'il lise la page de manuel d'un autre ou
  _v_i_c_e _v_e_r_c_a. Vous pouvez ventuellement vous aider de la base de
  donnes "lsm" qui recense beaucoup de programmes disponibles pour
  Linux.

  Maintenant que nous savons quel nom donner  notre fichier, la
  prochaine dcision est de choisir le rpertoire dans lequel nous
  l'installerons (quand l'utilisateur lancera la commande "make
  install"). Sous Linux, toutes les pages de manuel sont dans des sous-
  rpertoires  partir d'une racine mmorise dans la variable
  d'environnement MANPATH. Les outils de traitement de la documentation
  l'utilisent de la mme manire que le shell utilise la variable PATH
  pour trouver les excutables. En fait, MANPATH a le mme format que
  PATH : toutes les deux sont une liste de rpertoires spars par des
  ":" (mais MANPATH n'autorise pas de champs vides ou des chemins
  relatifs, seulement des chemins absolus). Si MANPATH n'existe pas ou
  si elle n'est pas exporte, /usr/man est utilise comme valeur par
  dfaut. Dans le but d'acclerer la recherche et pour garder les
  rpertoires de taille raisonable, les rpertoires points dans MANPATH
  (aussi appels rpertoires de base) contiennent une multitude de sous-
  rpertoires nomms "_m_a_n_<_s_>" o <s> dsigne le caractre correspondant
   la section prsent plus haut. Toutes les sections ne sont pas
  reprsentes, il n'y a pas, par exemple de raison de garder une entre
  "_m_a_n_o". Vous pourrez y trouver galement des sous-rpertoires appels
  "_c_a_t_<_s_>", "_d_v_i_<_s_>" et "_p_s_<_s_>", qui contiennent toute la documentation
  formate, prte  tre affiche ou imprime : nous reviendrons sur ce
  sujet plus loin. Le seul fichier  tre prsent  ct de ces sous-
  rpertoires du rpertoire de base s'appelle "_w_h_a_t_i_s". Le but et la
  cration de ce fichier sera dcrit dans la section 11. La mthode la
  plus sre pour installer au bon endroit une page de manuel de la
  section "s" est de mettre le fichier dans le rpertoire
  "_/_u_s_r_/_m_a_n_/_m_a_n_<_s_>". Toutefois, un bon Makefile devra autoriser
  l'utilisateur de choisir un autre rpertoire de base, disons par
  exemple par le biais d'une variable d'environnement que l'on pourrait
  nommer MANDIR. La plupart des distributions GNU peuvent tre
  configures  l'aide de l'option --prefix=/nom/option. Les pages de
  manuels correspondantes seront alors installes  partir du rpertoire
  de base _/_m_o_n_/_o_p_t_i_o_n_/_m_a_n. Je vous suggre d'utiliser une mthode
  similaire pour vos ralisations personnelles.

  Depuis l'avnement du "_S_y_s_t__m_e _d_e _f_i_c_h_i_e_r_s _s_t_a_n_d_a_r_d" pour Linux (FS-
  STnd), les choses se sont compliques. Le FS-STnd 1.2 stipule que :

       des amnagements doivent tre faits dans la structure de
       _/_u_s_r_/_m_a_n pour supporter des pages de manuel crites dans
  diffrentes (ou mutiples) langues.


  Ceci est fait en introduisant un niveau de rpertoires supplmentaire
  qui distingue les diffrentes langues. Citant encore le FS-Stnd 1.2 :

       Le nommage des sous-rpertoires correspondants aux langues
       de _/_u_s_r_/_m_a_n est bas sur l'appendice E du standard POSIX
       1003.1 qui dcrit la chane de caractres d'authentification
       _l_o_c_a_l_e (qui est la mthode la mieux accepte pour dcrire un
       environement culturel). La chane _l_o_c_a_l_e se prsente sous la
       forme

                   <langage>[_<pays>][.<jeu-de-caracteres>][,<version>]





  (Reportez vous au FS-Stnd pour voir quelques chanes _l_o_c_a_l_ecourantes.)
  D'aprs ces recommandations, nous avons nos pages de manuel dans
  _/_u_s_r_/_m_a_n_/_<_l_o_c_a_l_e_>_/_m_a_n_[_1_-_9_l_n_o_]. Les versions formates se trouveraient
  alors bien entendu dans _/_u_s_r_/_m_a_n_/_<_l_o_c_a_l_e_>_/_c_a_t_[_1_-_9_l_n_o_] : nous pourrions
  ne les fournir que pour une seule langue.

  TOUTEFOIS, je (l'auteur du document, pas le traducteur) ne peut pas
  recommander de passer a cette structure en l'tat actuel des choses.
  Le FS-Stnd 1.2 autorise aussi que

       les systmes qui n'utilisent qu'une seule langue et jeu de
       caractres pour toutes les pages de manuel peuvent omettre
       la sous-chane _<_l_o_c_a_l_e_> et stocker toutes ces pages dans le
       rpertoire _m_a_n_d_i_r. Par exemple, les machines quipes seule
       ment de pages de manuel en anglais codes en ASCII peuvent
       mettre les pages de manuel (les rpertoires _m_a_n_[_1_-_9_])
       directement dans _/_u_s_r_/_m_a_n_/. Il s'agit en fait de l'arrange
       ment habituel.


  Je (l'auteur du document, pas le traducteur) ne changerai pas ma
  configuration tant que tous les outils (comme xman, info, tkman et
  beaucoup d'autres) ne seront pas tous adapts  cette nouvelle
  structure.

  33..

  AA qquuooii rreesssseemmbbllee uunnee ppaaggee ddee mmaannuueell ffoorrmmaattee ??

  Laissez-moi vous prsenter un exemple que j'expliquerai plus tard. En
  raison de la nature et du mode de ralisation de ce document, nous ne
  pouvons pas reproduire les caractres accentus, ni les diffrents
  enrichissements du texte (gras et italiques principalement) ;
  consultez la section traitant des polices de caractres pour obtenir
  des dtails sur ces possibilits.

  Voici comment se prsente la page de manuel de notre programme
  hyphothtique "prout" :









        PROUT(1)                Manuel utilisateur               PROUT(1)


        NAME
               prout - proutibule la bibliotheque plaf

        SYNOPSIS
               prout [-plaf] [-c fichier-config ] fichier ...

        DESCRIPTION
               prout  proutibule  la  bibliotheque plaf en mouglifiant la
               table des symboles.  Par  defaut,  la  commande  recherche
               tous  les segments glurb et les trie par ordre betagonique
               decroissant afin que  le  gloupeur  gloup(1)  les  trouve.
               L'entree  symdef  est  alors  compactee selon l'algorithme
               NABOB.   Les  fichiers  sont  traites  dans   leur   ordre
               d'apparition sur la ligne de commandes.

        OPTIONS
               -b     N'affiche  pas  `bidouille  en cours' sur la sortie
                      standard pendant le traitement.

               -c fichier-config
                      Utilise le fichier de configuration  fichier-config
                      au  lieu  du  fichier global /etc/prout.conf.  Cela
                      supprime   aussi    l'effet    de    la    variable
                      d'environnement PROUTCONF.

               -a     Traite  egalement  les  en-tetes froutz en plus des
                      segments glurb.

               -r     Mode  recursif.  Fonctionne  a  la  vitesse  de  la
                      lumiere,  mais  necessite  plusieurs  megaoctets de
                      memoire virtuelle.

        FICHIERS
               /etc/prout.conf
                      Fichier de  configuration  general,  pour  tout  le
                      systeme. Voir prout(5) pour plus de details.
               ~/.proutrc
                      Fichier  de  configuration propre a chaque utilisa
                      teur. Voir prout(5) pour plus de details.

        ENVIRONNEMENT
               PROUTCONF
                      Si elle existe, cette  variable  peut  contenir  le
                      chemin  d'acces  complet a un autre fichier de con
                      figuration global  prout.conf.   L'option  -c  rend
                      cette variable inoperante.

        DIAGNOSTICS
               Les  messages suivants peuvent etre affiches sur la sortie
               standard d'erreurs :

               Mauvais nombre magique.
                      Le fichier d'entree ne semble pas etre  un  fichier
                      archive.

               Segments glurb ancien style.
                      prout  ne peut traiter que le nouveau style de seg
                      ments glurb. Les bibliotheques GROBOL ne  sont  pas
                      supportees dans cette version.

        BOGUES
               Le  nom de cette commande aurait du etre choisi de maniere
               a mieux refleter sa fonction.
        AUTEUR
               Marcel Dugenou    <dugenou@renux.freenix.fr>

        VOIR AUSSI
               gloup(1), plaf(1), prout(5).

        Linux                      JANVIER 1996                         1




  Et voici les explications promises :

     LLaa sseeccttiioonn NNAAMMEE ::
        C'est la seule section requise.  Les pages de manuel sans une
        section "NAME" sont aussi utiles que des rfrigerateurs au Ple
        Nord. Cette section a aussi un format standardis constitu
        d'une liste de programmes ou noms de fonctions spars par des
        virgules suivie d'un tiret et d'une courte description
        (habituellement une ligne) de la fonctionnalit que le programme
        (fonction ou fichier) est suppos dispenser. A l'aide de
        makewhatis(8) les sections NAME sont incluses dans les fichiers
        de la base de donnes de whatis. makewhatis est la raison pour
        laquelle la section NAME doit exister et pourquoi elle doit
        adhrer au format que j'ai dcrit. Dans le source groff, elle
        doit ressembler  :

          .SH NAME prout \- proutibule de la bibliotheque plaf


     Le \- est important ici : le backslash sert a faire la diffrence
     entre le tiret et une marque de csure qui peut apparatre 
     l'intrieur du nom de la commande ou dans la ligne de description.

     AAtttteennttiioonn : en l'tat actuel des choses, vous ne pouvez pas
     traduire NAME par NOM en franais,  moins de modifier la plupart
     des programmes makewhatis existants. C'est bien dommage.


     LLaa sseeccttiioonn SSYYNNOOPPSSYYSS
        ... est cense donner un aperu sur les options du programme.
        Pour les fonctions, cette section fait la liste des fichiers 
        inclure et son prototype pour que le programmeur connaisse le
        type et le nombre d'arguments ainsi que le type de retour.


     LLaa sseeccttiioonn DDEESSCCRRIIPPTTIIOONN
        Elle explique en dtail pourquoi votre squence de 0 et de 1 est
        la meilleure de toutes. C'est ici que vous talez tout votre
        savoir ! Gagnez l'estime des autres programmeurs et des
        utilisateurs en faisant de cette section une source
        d'information sre et dtaille.  Expliquez  quoi servent les
        arguments, le format de fichier, les algorithmes qui effectuent
        le plus dur du travail.


     LLaa sseeccttiioonn OOPPTTIIOONNSS
        Elle donne une description pour chaque option, comment elle
        affecte le fonctionnement du programme. Vous le saviez, n'est-ce
        pas ?


     LLaa sseeccttiioonn FFIICCHHIIEERRSS
        Elle indique les fichiers utiliss par le programme ou la
        fonction. Par exemple, les fichiers de configuration, les
        fichiers de dmarrage, les fichiers sur lesquels le programme
        agit. Ce serait une bonne ide de donner les chemins absolus de
        ces fichiers et d'avoir un processus d'installation qui modifie
        la partie rpertoire selon les prfrences de l'utilisateur :
        les manuels de groff ont comme prfixe par dfaut _/_u_s_r_/_l_o_c_a_l,
        donc ils rfrencent _/_u_s_r_l_/_l_o_c_a_l_/_l_i_b_/_g_r_o_f_f_/_* par dfaut.
        Cependant, si vous installez en utilisant "make
        prefix=/opt/gnu", les rfrences dans la page de manuel change
        en _/_o_p_t_/_g_n_u_/_l_i_b_/_g_r_o_f_f_/_*.


     LLaa sseeccttiioonn EENNVVIIRROONNNNEEMMEENNTT
        fait la liste de toutes les variables d'environnement qui
        affectent votre programme ou fonction et, bien sr, explique
        comment. La plupart du temps, les variables contiendront les
        chemins, nom de fichiers, options par dfaut.


     LLaa sseeccttiioonn DDIIAAGGNNOOSSTTIIQQUUEESS
        Elle doit donner une vue d'ensemble des messages d'erreurs les
        plus courants de votre programme et des ventuelles solutions 
        ces problmes. Il n'est pas ncessaire d'expliquer les messages
        d'erreurs du systme (de perror(3)) ou des signaux fatals (de
        psignal(3)) qui peuvent apparatre pendant l'excution de tout
        programme.


     LLaa sseeccttiioonn BBOOGGUUEESS
        Devrait idalement ne pas exister. Si vous tes brave, vous
        pouvez dcrire ici les limitations, les inconvnients, les
        caractristiques que certains pourraient prendre pour des
        dfauts. Si vous n'tes pas brave, renommez-la en section "A
        FAIRE".


     LLaa sseeccttiioonn AAUUTTEEUURR
        Il est apprciable de l'avoir quand il y a des erreurs
        grossires dans la documentation ou dans le comportement du
        programme et que vous voulez envoyer un rapport de bogue.


     LLaa sseeccttiioonn VVOOIIRR AAUUSSSSII
        C'est une liste de pages de manuel relatives  l'application
        cites par ordre alphabtique. Par convention, c'est la dernire
        section.

  Vous tes libres d'en inventer d'autres si elles n'empietent pas sur
  celles dcrites au-dessus. Nous avons volontairement dcrit une ver
  sion francise de page de manuel, puisque ce document est destin aux
  pays francophones. Nanmoins, vous devez avoir conscience que si vous
  devez diffuser une application dans le monde entier, il vous faudra
  fournir un manuel en langue anglaise (ce qui est la version standard,
  traditionnelle), et que les noms "officiels" de ces sections sont en
  ralit, dans l'ordre : NAME, SYNOPSIS, DESCRIPTION, OPTIONS, FILES,
  ENVIRONMENT, DIAGNOSTICS, BUGS, AUTHOR et SEE ALSO.

  Donc comment gnrer cette page de manuel ? J'attendais cette
  question, voici le source :









   .\" Formater ce fichier par la commande :
   .\" groff -man -Tlatin1 prout.1  (si vous avez saisi des accents Iso-8859-1)
   .\" groff -man -Tascii  prout.1  (cas general )
   .\"
   .TH PROUT 1 "JANVIER 1996" Linux "Manuel utilisateur"
   .SH NAME
   prout \- proutibule la bibliotheque plaf
   .SH SYNOPSIS
   .B prout [-plaf] [-c
   .I fichier-config
   .B ]
   .I fichier
   .B ...
   .SH DESCRIPTION
   .B prout
   proutibule la bibliotheque plaf en mouglifiant la table des symboles.
   Par defaut, la commande recherche tous les segments glurb et les trie
   par ordre betagonique decroissant afin que le gloupeur
   .BR gloup (1)
   les trouve. L'entree symdef est alors compactee selon l'algorithme NABOB.
   Les fichiers sont traites dans leur ordre d'apparition sur la ligne
   de commandes.
   .SH OPTIONS
   .IP -b
   N'affiche pas `bidouille en cours' sur la sortie standard pendant
   le traitement.
   .IP "-c fichier-config"
   Utilise le fichier de configuration
   .I fichier-config
   au lieu du fichier global
   .IR /etc/prout.conf .
   Cela supprime aussi l'effet de la variable d'environnement
   .B PROUTCONF.
   .IP -a
   Traite egalement les en-tetes froutz en plus des segments glurb.
   .IP -r
   Mode recursif. Fonctionne a la vitesse de la lumiere, mais necessite
   plusieurs megaoctets de memoire virtuelle.
   .SH FICHIERS
   .I /etc/prout.conf
   .RS
   Fichier de configuration general, pour tout le systeme. Voir
   .BR prout (5)
   pour plus de details.
   .RE
   .I ~/.proutrc
   .RS
   Fichier de configuration propre a chaque utilisateur. Voir
   .BR prout (5)
   pour plus de details.
   .SH ENVIRONNEMENT
   .IP PROUTCONF
   Si elle existe, cette variable peut contenir le chemin d'acces complet
   a un autre fichier de configuration global
   .IR prout.conf .
   L'option
   .B -c
   rend cette variable inoperante.
   .SH DIAGNOSTICS
   Les messages suivants peuvent etre affiches sur la sortie standard d'erreurs :

   Mauvais nombre magique.
   .RS
   Le fichier d'entree ne semble pas etre un fichier archive.
   .RE
   Segments glurb ancien style.
   .RS
   .B prout
   ne peut traiter que le nouveau style de segments glurb. Les bibliotheques
   GROBOL ne sont pas supportees dans cette version.
   .SH BOGUES
   Le nom de cette commande aurait du etre choisi de maniere a mieux
   refleter sa fonction.
   .SH AUTEUR
   Marcel Dugenou    <dugenou@renux.freenix.fr>
   .SH "VOIR AUSSI"
   .BR gloup (1),
   .BR plaf (1),
   .BR prout (5).




  44..

  CCoommmmeenntt ddooccuummeenntteerr pplluussiieeuurrss cchhoosseess ddaannss uunnee sseeuullee ppaaggee ddee mmaannuueell ??

  De nombreux programmes (grep, egrep) et fonctions (printf,
  fprintf,...) sont documentes dans une seule page de manuel.
  Cependant, ces pages seraient inutilisables si elles n'taient
  accessibles que par un seul nom. Nous ne pouvous nous attendre  ce
  qu'un utilisateur se souviennent que la page de manuel de egrep est en
  fait celle de grep. Il est par consquent indispensable que la page
  soit accessible sous diffrents noms. Vous avez plusieurs possibilits
  pour y arriver :

  1. avoir des copies identiques pour chaque nom ;

  2. connecter toutes les pages de manuels en utilisant des liens
     physiques ;

  3. utiliser les liens symboliques pointant la page de manuel ;

  4. utiliser le mcanisme de "source" de groff fournie par la macro
     ".SO".

     La premire possibilit est une perte de place. La deuxime n'est
     pas recommande parce que les versions intelligentes du programme
     catman peuvent gagner beaucoup de temps en regardant le type du
     fichier et son contenu. Les liens physiques rduiraient
     l'efficacit de cet outil (dont le but est de formater toutes les
     pages de manuel pour qu'elles soient affiches plus rapidement). La
     troisime alternative comporte un pige si vous tes concern par
     la portabilit, vous devez savoir qu'il existe des systmes de
     fichiers qui ne supportent pas les liens symboliques. En bref, la
     Meilleure Chose (TM) est d'utiliser le mcanisme source de groff.

  Voila comment l'utiliser : si vous voulez que votre page soit
  accessible sous les noms truc et bidule dans la section 1, alors
  mettez la page de manuel dans truc.1 et ralisez le fichier bidule.1
  contenant :


           .SO man1/truc.1





  Il est important de spcifier le rpertoire _m_a_n_1_/ aussi bien que le
  nom du fichier truc.1 car lors de l'excution de groff, celui-ci aura
  comme rpertoire courant le rpertoire de base des pages de manuel, et
  il interprtera les arguments de .SO comme tant relatifs  cet
  emplacement.

  55..

  QQuueell eennsseemmbbllee ddee mmaaccrrooss uuttiilliisseerr ??

  Il y a de nombreux ensembles de macros tudis spcialement pour
  crire des pages de manuel. Ils sont habituellement dans le rpertoire
  de macro de groff _/_u_s_r_/_l_i_b_/_g_r_o_f_f_/_t_m_a_c. Les noms de fichiers sont du
  genre _t_m_a_c_._<_q_u_e_l_q_u_e _c_h_o_s_e_>, o _<_q_u_e_l_q_u_e_-_c_h_o_s_e_> est l'argument de
  l'option -m de groff. groff utilisera _t_m_a_c_._<_q_u_e_l_q_u_e_-_c_h_o_s_e_> quand
  l'option -m <quelque-chose> sera donne. Souvent, l'espace entre "-m"
  et  <quelque-chose> est oubli, on crira donc groff -man pour
  formater des pages de manuel en utilisant l'ensemble de macro tman.an.
  Voil la raison de ce nom bizarre "_t_m_a_n_._a_n".

  En plus de _t_m_a_n_._a_n, il existe un autre ensemble de macro populaire,
  _t_m_a_n_._d_o_c, originaire de l'universit de Californie  Berkeley (UCB).
  De nombreuses pages de manuels de BSD l'utilisent et il semble que UCB
  en a fait son standard pour la documentation. Les macros de _t_m_a_n_._d_o_c
  sont plus souples mais, hlas, il y a des lecteurs de pages de manuels
  qui ne les utilisent pas mais qui appellent toujours groff -man. Par
  exemple, toutes les versions du programme xman que j'ai rencontres
  faisaient la tte devant les pages de manuels requrant _t_m_a_n_._d_o_c. Donc
  fates-vous une faveur : utilisez _t_m_a_c_._a_n, utiliser un autre ensemble
  de macros est considr comme hasardeux. _t_m_a_c_._a_n_d_o_c est un pseudo
  ensemble de macros qui regarde le source et charge soit _t_m_a_c_._a_n ou
  _t_m_a_c_._d_o_c. En fait, tous les programmes de lecture du manuel devraient
  l'utiliser mais jusqu' prsent, peu le font, aussi il vaut mieux
  assurer le coup en se cantonnant au bon vieux _t_m_a_c_._a_n. Tout ce que je
  dirais  partir de maintenant concernant les macros est valable
  seulement pour _t_m_a_c_._a_n. Si vous voulez quand mme utiliser les macros
  de _t_m_a_c_._d_o_c, voici un pointeur vers leur documentation et un mode
  d'emploi trs dtaill : www.bsdi.com/bsdi-man.  Vous trouverez un
  formulaire de recherche sur cette page. Entrez mdoc et il vous
  trouvera mdoc(7) et mdoc.samples(7), un didacticiel sur la ralisation
  des pages de manuel BSD.

  66..

  QQuueellss pprrpprroocceesssseeuurrss ppuuiiss--jjee uuttiilliisseerr ??

  groff est fourni avec au moins 3 prprocesseurs, tbl, eqn et pic
  (certains systmes les nomment gtbl, geqn et gpic). Ils sont destins
   traduire leurs macros et leurs donnes en code source troff
  standard.  tbl est un prprocesseur de tableaux, eqn en est un
  d'quation et de mathmatiques et pic gre les images. Consultez leurs
  pages de manuel pour dcouvrir les fonctionalits qu'ils proposent.

  Mais autant tre clair : n'crivez pas de pages de manuel qui
  utilisent des prprocesseurs.

  eqn produira gnralement un rsultat catastrophique sur des
  priphriques du genre tltype, qui malheureusement reprsentent 99%
  des visualtions de pages de manuel. Par exemple _X_A_l_l_o_c_C_o_l_o_r_._3_x
  contient des formules avec des exposants. A cause de la nature de ces
  terminaux, l'exposant sera sur la mme ligne que la base. _N _p_u_i_s_s_a_n_c_e
  _d_e_u_x s'affichera "N2".

  Il vaut mieux viter tbl aussi, car je n'ai jamais vu aucun xman qui
  fonctionne avec lui.  xman 3.1.6 utilise la ligne de commande suivante
  pour formater les pages de manuel, par exemple _s_i_g_n_a_l_(_7_) :



  gtbl /usr/man/man7/signal.7 | geqn | gtbl | groff -Tascii -man \
  /tmp/xmana01760 2> /dev/null



  qui coince sur toutes les sources utilisant gtbl, car sa sortie est
  redirige encore une fois vers gtbl. Le rsultat donne une page de
  manuel sans votre tableau. Je ne sais pas si c'est un bogue ou une
  particularit de gtbl qui s'trangle sur sa propre sortie ou si xman
  devrait tre un peu plus gentil et ne pas utiliser gtbl deux fois...
  De toute faon, si vous voulez un tableau, formatez-le vous-mme et
  mettez-le entre les lignes .nf et .fi ce qui permettra de ne pas le
  formater. Vous ne pourrez pas avoir de gras ou d'italique par cette
  mthode mais elle permettra d'avoir votre tableau dans tous les cas.

  Je n'ai jamais vu une page de manuel ncessitant le prprocesseur pic
  mais je n'aimerais pas a. Comme vous pouvez le voir plus haut, xman
  ne l'utilise pas et groff ferait srement la danse de Saint-Guy en
  voyant les donnes en entre.

  77..

  DDooiiss--jjee ddiissttrriibbuueerr lleess ssoouurrcceess eett//oouu llaa ddooccuummeennttaattiioonn ddjj ffoorrmmaattee ??

  Voyons les avantages (+) et les inconvnients (-) de quelques
  possibilits choisies :

  1. code source uniquement :

    (+) distribution plus petite ;

    (-) inutilisable sur les systmes ne disposant pas de groff.

  2. verison formate non compacte uniquement :

    (+) utilisable mme sur des systmes dpourvus de groff ;

    (-) l'utilisateur ne peut pas gnrer un fichier dvi ou
     PostScript ;

    (-) gchis de l'espace disque sur les systmes sachant grer aussi
     les pages compresses.

  3. version formate et compacte seulement :

    (+) utilisables mme sur des systmes dpourvus de groff ;

    (-) l'utilisateur ne peut pas gnrer de fichier dvi ou
     PostScript ;

    (-) quel format de compactage utiliser ? .Z ? .z ?  .gz ? Tous ?.

  4. code source et la version formate non compacte :

    (+) accessible mme sur les systmes ne disposant pas de groff ;

    (-) taille de la distribution plus grande ;

    (-) certains systmes peuvent ncessiter des pages de manuels
     formattes et compactes ;

    (-) informations redondantes sur les systmes quips de groff.

  A mon avis, la meilleure solution est de distribuer uniquement le code
  source. L'argument selon lequel la documentation ne pourra pas tre
  accessible sur les systmes sans groff n'a aucune importance. Plus de
  500 pages de manuel du Projet de Documentation de Linux ne sont que
  sous forme de code source.  Les pages de manuel de XFree86 ne sont
  disponibles que sous forme de code source. Les pages de manuel de la
  FSF n'existent que sous forme de code source. En fait, j'ai rarement
  vu des logiciels distribus avec les pages de manuels formates. Si un
  administrateur a besoin que les pages de manuel soient accessibles, il
  aura forcment install groff.

  88..

  QQuueelllleess ssoonntt lleess ccoonnvveennttiioonnss ppoouurr lleess ffoonntteess ??

  Avant tout, n'utilisez pas les oprateurs directs de fonte comme \fB
  \fP, etc. Employez des macros avec des arguments.  Cette mthode vous
  vitera une erreur classique : oublier un changement de fonte  la fin
  d'un mot ce qui provoque la continuation du gras ou de l'italique
  jusqu'au prochain changement de fonte. Croyez-moi, a arrive plus
  souvent qu'on ne le pense !

  Les macros _t_m_a_c_._a_n offrent les possibilits suivantes :

    .B caractres gras

    .BI gras et italiques en alternance

    .BR gras et romain en alternance

    .I italiques

    .IB italiques et gras en alternance

    .IR italiques et romain en alternance

    .RB romain et gras en alternance

    .RI romain et italiques en alternance

    .SM taille rduite (9/10 du corps normal)

    .SB gras, taille rduite (NON petit et gras en alternance)

  X et Y en alternance signifie que les arguments impairs seront
  imprims en X et les pairs en Y. Par exemple :


       .BI "Arg 1 est gras, " "arg2 est en italiques, " "arg3 en gras"





  Les guillemets sont ncessaires pour placer des espaces dans un
  argument.

  Voil donc pour ce qui est possible. Voyons maintenant comment il faut
  utiliser ces possibilits (des parties ont t honteusement copies de
  man(7)) :

  Bien qu'il existe de nombreuses conventions typographiques pour les
  pages de manuel dans le monde UNIX, l'existence de plusieurs centaines
  de pages de manuel spcifiques  Linux dfinit nos standards :

  Pour les fonctions, les arguments sont toujours en italiques, mme
  dans la section SYNOPSYS, alors que le reste est en gras.  Vous
  crirez donc :

  .BI "mafonction(int " argc ", char **" argv );





  Les noms de fichiers sont toujours en italiques, hormis dans la
  section SYNOPSYS o les fichiers  inclure sont en gras.  Vous crirez
  alors :


       .I /usr/include/stdio.h





  et


       .B #include <stdio.h>





  Les noms des macros, qui sont habituellement en majuscules, sont en
  gras :


       .B MAXINT





  Lors de l'numration d'une liste de codes d'erreurs, ces codes sont
  en gras. Cette liste fait gnralement appel  la macro .TP
  (paragraphe avec titre) comme ci-dessous :


       .TP
       .B EBADF
       .I fd n'est pas un descripteur de fichier valide
       .TP
       .B EINVAL
       .I fd ne convient pas pour tre lu





  Toute rfrence  une autre page de manuel (ou  la page courante) est
  en gras. Si le numro de la section du manuel est indiqu, il s'crit
  en roman, sans espace :


       .BR man (7)





  Les acronymes sont plus lgants lorsqu'ils apparaissent dans un corps
  plus petit. Je recommande donc :

  .SM UNIX
  .SM ASCII
  .SM TAB
  .SM NFS
  .SM LALR(1)





  99..

  CCoommmmeenntt ddooiiss--jjee pprrsseenntteerr mmaa ppaaggee ddee mmaannuueell ??

  Voil quelques conseils pour rendre votre documentation plus sre,
  plus lisible et plus formatable :

    Les exemples doivent fonctionner : testez-les (utilisez le copier-
     coller pour passer  votre shell ce que contient votre page de
     manuel) et redirigez la sortie de votre commande dans votre page,
     ne tapez pas ce que vous PENSEZ que votre programme affichera.

    relisez-vous, corrigez toutes les ventuelles fautes de frappe ou
     d'orthographe, fates-vous relire par un tiers (surtout si vous ne
     rdigez pas le texte dans votre langue natale) . (d'ailleurs ce
     HOWTO n'a pas t relu...  Y a-t-il un volontaire ?)

    testez votre page de manuel : est-ce que groff trouve des erreurs
     lors du formatage ?  C'est agrable de trouver dans un commentaire
     la ligne de commande qu'il faut taper pour le formatage. Est-ce que
     la commande man(1) affiche des erreurs ou des avertissements
     lorsqu'on appelle "man votre_programme" ? Est-ce que la faon dont
     man(1) utilise le systme de formatage produit le rsultat
     escompt ? Est-ce que cela fonctionne aussi bien avec xman(1x) et
     tkman(1tk) ?  XFree86 3.1 contient la version 3.1.6 de xman qui
     dcompacte les pages avec :


       gzip -c -d < %s > %s
       zcat < %s > %s





    Est-ce que makewhatis(8) pourra extraire la ligne de description de
     la section NAME ?

  1100..

  CCoommmmeenntt ppuuiiss--jjee aavvooiirr uunn tteexxttee eenn ppuurr AASSCCIIII ssaannss ttoouuss cceess ffiicchhuuss ^^HH^^
  ddee ccoonnttrrllee ??

  Jetez un oeuil  la commande col(1), col peut enlever ces caractres
  d'effacement. Pour les impatients, voici la commande :


       $ groff -t -e -mandoc -Tascii manpage.1 | col -bx > manpage.txt





  Les options -t et -e disent  groff d'utiliser les prprocesseurs tbl
  et eqn.  C'est inutile pour les pages de manuel ne ncessitant pas de
  prprocesseur mais cela ne gne pas, si ce n'est une surcharge du
  processeur. D'un autre ct, ne pas utiliser -t alors qu'il est nces
  saire fera que les tableaux seront trs mal formats. Vous pourrez
  mme trouver ("deviner" serait un terme plus exact) la commande nces
  saire pour traiter tel ou tel document groff (pas uniquement des pages
  de manuel) par le biais de grog :


       $ grog /usr/man/man7/signal.7
       groff -t -man /usr/man/man7/signal.7





  En fait, grog signifie "_G_R_O_f_f _G_u_e_s_s", et cet outil fait bien ce qu'il
  dit (en anglais, guess = deviner...) : il tente de deviner la commande
  ncessaire pour formater un document groff en fonction de son contenu.
  S'il tait parfait, nous n'aurions jamais plus besoin d'options. Mais
  s'il arrive qu'il dtermine un mauvais jeu de macros, je ne l'ai par
  contre jamais vu se tromper sur les prprocesseurs  employer.

  Voici un petit script Perl ralis par l'auteur de ce document, qui
  peut supprimer les en-ttes et les pieds de page, ce qui permet de
  gagner quelques longueurs de papier lorsque l'on imprime de longues et
  complexes pages de manuel.  Sauvez-le dans un fichier nomm _s_t_r_i_p_-
  _h_e_a_d_e_r et mettez-le en mode 755.


       #!/usr/bin/perl -n
       #  pour qu'il avale tout le fichier en une seule fois:
       undef $/;
       #  on enleve les sauts de page:
       s/\n{4}\S.{50,}\n{6}\S.{50,}\n{3}/\n/g;
       #  le premier en-tete et le dernier pied de page:
       s/\n\S.{50,}\n//g;
       #  transorme deux ou plus lignes vides consecutives en une seule:
       s/\n{3,}/\n\n/g;
       #  et voila ce qui reste...
       print;





  Il faut appeler ce programme en tant que premier filtre aprs la
  comande man, car il se base sur le nombre de sauts de ligne issus de
  groff. Par exemple :


       $ man bash | strip-headers | col -bx > bash.txt





  1111..

  CCoommmmeenntt aavvooiirr uunnee bbeellllee ppaaggee ddee mmaannuueell eenn PPoossttSSccrriipptt  ??



       $ groff -t -e -mandoc -Tps manpage.1 > manpage.ps




  Imprimez-la  l'aide de votre imprimante PostScript prfre ou d'un
  interprteur. Voir la section prcdente pour les options.

  1122..

  CCoommmmeenntt ffaaiirree ffoonnccttiioonnnneerr lleess pprrooggrraammmmeess aapprrooppooss  eett wwhhaattiiss  ??

  Supposons que vous recherchiez les compilateurs installs sur votre
  systme et comment les invoquer (nous considrons le cas courant, o
  tout le manuel est en langue anglaise). Pour rpondre  cette question
  (frquemment pose), il faut faire :


       $ apropos compiler
       f77 (1) - Fortran 77 compiler
       gcc (1) - GNU C and C++ compiler
       pc (1) - Pascal compiler





  apropos et whatis sont utilises pour obtenir une rponse rapide sur
  les pages de manuels qui contiennent des informations sur un certain
  sujet. Les deux programmes cherchent dans des fichiers nomms _w_h_a_t_i_s
  qui sont dans chaque rpertoire de base du manuel. Comme je l'ai dj
  dit, les fichiers de la base de donnes _w_h_a_t_i_s contiennent une entre
  d'une ligne pour chaque page de manuel dans l'arborescence des
  rpertoires successifs. En fait, cette ligne est exactement celle de
  la section NAME (pour tre prcis : tout est rduit  une seule ligne
  et le tiret est supprim, la section tant place entre parenthses).
  Ces fichiers sont crs  l'aide du programme makewhatis(8). Il en
  existe plusieurs versions, donc rfrez-vous  la page de manuel du
  programme pour connatre les options possibles. Afin que makefile
  puisse extraire les sections NAME correctement, il est important que
  vous, le rdacteur du manuel, respectiez le format de cette section
  dcrit dans la partie 2. La diffrence entre apropos et whatis est ce
  qu'ils recherchent et o.  apropos (qui est l'quivalent de man -k)
  cherche la chane de caractres qui lui est passe en argument
  n'importe o dans la ligne alors que whatis (quivalent de man -f)
  recherche dans la partie avant le tiret un nom de commande complet.
  Par consquence, whatis dira s'il y a un manuel de cc mais restera
  muet pour gcc.

  1133..

  LLaa llaanngguuee ffrraannaaiissee

  C'est bien sr  vous de dcider si vous allez rdiger votre manuel en
  franais, en anglais ou dans ces deux langues. Le franais possde des
  rgles typographiques trs diffrentes de l'anglais : n'esprez pas
  pouvoir les respecter avec les outils de formatage du manuel.
  Consultez la documentation de groff si vous dsirez lui faire prendre
  en compte les motifs de csure de la langue de Molire, mais en ayant
  conscience que ce ne sera sans doute pas possible sur tous les
  systmes sur lesquels votre documentation est susceptible d'tre
  exploite.

  Vous pouvez utiliser les caractres accentus, pourvu qu'ils soient
  saisis selon la norme ISO-8859-1 (standard sous Linux). Les pages
  devront alors tre formates avec l'option -Tlatin1 .  Mais il faudra
  que toute la chane de visualisation soit capable de grer les
  caractres ISO sur 8 bits, ce qui est rarement le cas sans une
  configuration particulire des utilitaires more ou less gnralement
  employs.

  Vous voil prvenu !

  1144..

  LLeess ccoonnddiittiioonnss ddee ccooppiiee

  Copyright 1995, 96, 97 Jens Schweikardt schweikh@noc.dfn.de

  Tlphone : ++49 7151 909516

  Sauf mention contraire, les documents Linux _H_O_W_T_O portent le copyright
  de leurs auteurs respectifs. Ils peuvent tre reproduits et distribus
  en tout ou  partie, sur n'importe quel support physique ou
  lectronique,  condition que cette notice soit incluse dans chaque
  copie. La redistribution est autorise et encourage ; toutefois,
  l'auteur voudrait en tre prvenu.

  Toutes les traductions, travaux drivs ou compilation de travaux
  incluant des documents Linux _H_O_W_T_O doivent tre couverts par ce
  copyright. C'est--dire que vous ne pouvez pas produire un travail
  driv d'un HOWTO et imposer des restrictions supplmentaires sur sa
  distribution. Des drogations  ces rgles peuvent tre accordes sous
  certaines conditions : contactez le coordinateur des Linux _H_O_W_T_O dont
  l'adresse est donne plus loin.

  En rsum, nous dsirons promouvoir la diffusion de ces informations 
  travers tous les canaux de communication possibles. Cependant, nous
  voulons conserver la proprit des _H_O_W_T_O et aimerions tre tenu au
  courant de tout projet de redistribution.

  Si vous avez des questions, contactez Greg Hankins, le coordinateur,
  par courrier lectronique  l'adresse gregh@sunsite.unc.edu.


































  Mini-howto Modules
  rhw@bigfoot.com
  date ?

  Vendredi  14  janvier 1998.  traduit par Frederic Gacquer gacquer@neu-
  ronnexion.fr

  11..  BBuutt ddee ccee ddooccuummeenntt

  Les documents existants sur linux et les modules n'ont pas reussi a me
  fournir  une  explication  satisfaisante  comme  par  exmple  la facon
  d'installer  linux  avec  succes  avec  les  modules   configures   et
  operationnels.  La procedure expliquee dans ce document a ete utilisee
  avec succes plusieurs fois, aussi bien sur mon propre systeme que  sur
  Internet  pour  donner  des  indications a quelqu'un essayant de faire
  fontionner un element qui requiert un  driver  fourni  seulement  sous
  forme de module.

  Mon  prope  systeme  a  ete installe a partir d'une distribution linux
  Redhat 4.1, et ce fut lors de cette installation  que  j'ai  developpe
  cette  procedure.  Je  l'ai installee depuis avec succes sur plusieurs
  systemes avec la distribution slackware, et sur un  systeme  avec  une
  distribution   Debian.   La   procedure   qui   permet  de  configurer
  correctement les modules sous linux pour ces trois  distributions  est
  dans ce document.

  22..  AAVVEERRTTIISSSSEEMMEENNTT

  J'ai recemment utilise la meme procedure avec la RedHat 4.2, mais avec
  des resultats contradictoires sur des systemes apparement  identiques.
  Je n'ai PAS encore determine quel est le probleme, et ne peut donc PAS
  garantir aujourd'hui que cela va ou non fonctionner sur votre systeme.

  33..  PPrreerreeqquuiiss

  Avant  d'appliquer  les  etapes  de ce document, le lecteur DOIT avoir
  installe linux pour que l'on puisse se connecter en tant que root, car
  la  majorite des etapes impliquees ne peuvent etre entreprises que par
  le dit utilisateur.

  Le noyau existant peut etre compile soit  pour  utiliser  les  modules
  soit  pour  ne  pas  les  utiliser. Il peut meme afficher des messages
  d'erreurs pendant  le  demarrage  du  systeme  signalent  les  modules
  configures  qui  ne  sont pas disponible pour l'instant, pourvu que la
  condition ci-dessus soit remplie.

  L'emplacement du source du noyau en cours est supposee se trouver a la
  racine  /usr/src/linux  qui est suppose etre le repertoire courant, au
  travers de ce document, de n'importe quelle commande qui en est issue.

  44..  AAcccceelleerreerr llaa ccoommppiillaattiioonn

  Si votre machine a 16 mega ou plus de RAM, on peut accelerer utilement
  les choses  en permettant de compiler plusieurs modules en  parallele.
  Cela  augmentera  la charge cpu de la machine pendant la recompilation
  du  noyau  mais  reduira  le  temps  pendant  lequel  la   compilation
  s'effectuera.

  Avant d'utiliser cette methode, vous devez verifier la quantite de RAM
  presente dans votre machine, car si vous l'avez estimee  trop  grande,
  la  compilation  va en fait etre moins rapide.  L'experience a montree
  que la valeur optimum depend de la quantite de RAM dans votre  systeme
  selon  la formule suivante, au moins pour les systemes qui ont jusqu'a
  32 Mo de RAM, meme si elle est applicable aux systemes avec  une  plus
  grande quantite de RAM:

       N= [RAM en Mo] / 8 + 1

  Pour  ceux  qui  n'aime  pas les maths, les valeurs pour les quantites
  courante de RAM sont :

  La valeur a utiliser avec

  +o  16 Mo 3

  +o  24 Mo 4

  +o  32 Mo 5

  +o  40 Mo 6

  +o  48 Mo 7

  +o  56 Mo 8

  +o  64 Mo 9

  +o  80 Mo 11

  +o  96 Mo 13

  +o  112 Mo 15

  +o  128 Mo 17

  Quand  vous  avez  choisi  la  valeur  correcte,  editer  le   fichier
  /usr/src/linux/Makefile et trouver la ligne :

       MAKE=make

  La remplacer par:

       MAKE=make -j N

  ou N est le nombre calcule precedemment.

  55..  RReeccoommppiilleerr llee nnooyyaauu aavveecc lleess mmoodduulleess

  Le  noyau  peut  etre  reconfigure pour utiliser les modules pour tout
  sauf le systeme de fichier monte root (dans la plupart des cas,  c'est
  le systeme de fichier ext2).

  Cependant,  il  y  a certains elements qui semble difficle a installer
  proprement en tant que modules, aussi je propose de compiler  dans  le
  noyau:

  +o  Les pilotes des cartes ethernet

  +o  Les pilotes des CDROMs SCSI.

  D'autre  part,  il  y  a  certaines  combinaisons  de  pilotes  qui ne
  fonctionne QUE comme module, particulierement la combinaison  d'un  ou
  plusieurs des groupes suivants :

  +o  L'imprimante parallele

  +o  Un  pilote  de port parallele, comme le lecteur Zip de IOMEGA ou le
     lecteur Jazz, ou le CDROM de chez BackPack, et

  +o  Le demon PLIP

  Vous aurez a decider de ce qui sera compile dans le  noyau,  ou  comme
  module,  en  prenant  en compte les points cites ci-dessus.  Les vrais
  choix seront fait durant la compilation,  au  moment  de  la  sequence
  d'instructions suivante :

          cd /usr/src/linux
          make menuconfig
          make dep clean modules modules_install zImage

  Apres cela, les dependances de modules doivent etre referencees. C'est
  accompli par les commandes suivantes:

          depmod -a

  Maintenant le nouveau noyau a besoin d'etre insere  dans  la  sequence
  d'initialisation du boot. Je vais supposer que le lecteur utilise LILO
  dans ce but, puisque c'est le  seul  gestionnaire  de  boot  que  j'ai
  utilise.

  Je  recommande  que le nouveau noyau ne soit pas insere comme etant le
  noyau linux par defaut car s'il plante, il sera extremement  difficile
  de  recuperer le setup linux sans refaire une complete reinstallation,
  ce qui n'est pas recommande.  Pour  cette  raison,  j'ai  les  entrees
  suivantes dans mon fichier /etc/lilo.conf :

     image=/usr/src/linux/arch/i386/boot/zImage
        label=new
        alias=n
        read-only
        vga=ask
        optional

  Cette  entree indique qu'il y a une OPTION de boot (ignoree si l'image
  en question n'existe pas) qui charge le  fichier  /boot/newlinux  s'il
  est  selectionne,  et permet de selectionner le mode video dans lequel
  il sera execute.

  Supposant l'existence de l'entree  ci-dessus  dans  /etc/lilo.conf  le
  noyau   modifie  est  sauvegarde  au  bon  endroit  a  la  fin  de  la
  compilation, et il peut etre installe via les commandes suivantes:

          lilo

  Ayant fait cela, le lecteur a besoin de suivre  les  etapes  suivantes
  qui dependent de la distribution choisie :

  +o  Configurer Debian ou la Redhat pour les modules

  +o  Configurer la Slackware pour les modules

  +o  Configurer les autres distributions pour les modules

  55..11..  CCoonnffiigguurreerr DDeebbiiaann oouu llaa RReeddhhaatt ppoouurr lleess mmoodduulleess

  Avant  la  prise en compte des operations decrites ici, celles listees
  dans "Recompiler le noyau" pour les modules sont supposees  realisees.

  La  distribution  Debian  et  la  Redhat  ont  des  procedures de boot
  identiques, et ont aussi des procedures identiques pour configurer les
  modules inclus.

  1.  vous  etant  connecte root, utiliser votre editeur de texte favori
  pour creer un  nouveau  fichier  appele  /etc/rc.d/init.d/modules.init
  avec le contenu suivant :

          # Initialisation des modules
          #
          # Demarrer demon d'auto-chargement des modules
          /sbin/kerneld

          # Monter toutes les partitions courantes auto-montables non montees
          /sbin/mount -a

  2.  Ayant  cree  le  fichier  ci-dessus, executer les etapes suivantes
  alors que vous etes connecte root:

          cd /etc/rc.d
          chmod 755 init.d/*
          cd rc3.d
          ln -s ../init.d/modules.init 05modules.init

  Le systeme peut etre relance, les modules sont alors implementes.

  55..22..  CCoonnffiigguurreerr llaa SSllaacckkwwaarree ppoouurr lleess mmoodduulleess

  Avant la prise en compte des operations decrites ici,  celles  listees
  dans  "Recompiler le noyau" pour les modules sont supposees realisees.

  1- Le fichier /etc/rc.d/rc.M doit etre editer comme suit :

  +o  Aux alentours de la ligne 18, il y a une section du style :

          # Screen blanks after 15 minutes idle time.
          /bin/setterm -blank 15

  Juste apres, inserer le paragraphe suivant, avec  les  traditionnelles
  lignes blanches au dessus et en dessous:

          # Charger le chargeur automatique de module noyau
          /sbin/kerneld

  +o  A peut pres 12 lignes plus loin il y a ce qui suit :

          # if there is no /etc/HOSTNAME, fall back on this default:
          Immediately prior to this, insert the following paragraph, again
          with the usual blank lines either side of it:

          # Mount remaining unmounted auto-mount drives.
          /sbin/mount -a

  Quand  ces  changements  ont  ete  fait,  sauver  le  fichier.   Aucun
  changement supplementaire n'est requis pour la Slackware.

  55..33..  CCoonnffiigguurreerr lleess aauuttrreess ddiissttrriibbuuttiioonnss ppoouurr lleess mmoodduulleess

  Avant la prise en compte des operations decrites ici,  celles  listees
  dans  "Recompiler le noyau" pour les modules sont supposees realisees.

  La procedure  precise  pour  les  autres  distributions  n'a  pas  ete
  determinee,  mais  il  s'agit  probablement d'une de celle citees plus
  haut. Pour determiner laquelle,  afficher  le  contenu  du  repertoire
  /etc/rc.d, comme suit:

          cd /etc/rc.d
          ls -l *.d rc.*

  A  partir  du  resultat,  vous  pouvez  choisir  une des trois options
  suivantes:

  +o  Si cette  liste  inclu  un  repertoire  nomme  init.d  et  quelques
     repertoires  dont  les  noms  correspondent  a  rc?.d  (ou le point
     d'interrogation remplace un caractere unique), et  n'inclu  PAS  un
     fichier  nomme  rc.M,  cette distribution peut etre configuree pour
     les modules en suivant la procedure pour les  distributions  Debian
     et redhat.

  +o  Si  cette liste n'inclu pas un repertoires appele init.d mais inclu
     un fichier appele rc.M alors la distribution peut  etre  configuree
     pour  les  modules  en  suivant  la  procedure pour la distribution
     slackware.

  +o  Si a cette liste ne correspond aucun  des  criteres  ci-dessus,  la
     distribution  a  un  script de boot qui n'est pas presente dans cet
     Howto. Dans ce cas, vous etes invites a contacter  l'auteur  de  ce
     document pour conseils.

  66..  CCooppyyrriigghhtt eett LLooii

  Ce document est couvert par les termes de la Licence Generale Publique
  GNU (GPL), dont tous les termes et limitations s'appliquent.

  L'auteur peut etre contacte par email a rhw@bigfoot.com

  Mini-HOWTO Machines Multi-Ethernet
  Don Becker, becker@cesdis.gsfc.nasa.gov
  5 aout 1995

  Ce mini-Howto explique comment configurer Linux pour qu'il reconnaisse
  plusieurs cartes Ethernet sur une meme machine.

  11..  IInnttrroodduuccttiioonn

  Dans le cas de la plupart des distributions classiques  de  Linux,  il
  suffit   d'ajouter  la  ligne  suivante  au  debut  de  votre  fichier
  /etc/lilo.conf et de relancer lilo :

  append = "ether=0,0,eth1"

  C'est tout ce que vous avez a faire. Lors du prochain  redemarrage  de
  la machine, Linux devrait reconnaitre la seconde carte.

  22..  LLeess ddiiffffeerreenntteess ssoolluuttiioonnss

  Par  defaut,  le noyau Linux ne recherche qu'une seule carte Ethernet,
  et ne va pas plus loin des qu'il en a trouve une. Il y a trois  facons
  de  contraindre  le noyau a rechercher des cartes supplementaires. Par
  ordre de simplicite (et de souplesse) croissante :

  +o  fournir des parametres au noyau lors du demarrage ;

  +o  configurer   le   chargeur   pour    qu'il    fournisse    lui-meme
     systematiquement ces parametres au noyau ;

  +o  modifier  les tables de detection des cartes Ethernet du noyau dans
     le fichier drivers/net/Space.c (et recompiler le noyau apres coup).

  Dans  la  plupart  des cas, c'est la deuxieme solution qui convient le
  mieux, et correspond a ce que nous avons decrit en  introduction.  Les
  deux  premieres  solutions  reposent  sur  le passage de parametres au
  noyaux et  sont  decrites  dans  la  section  suivante.  La  troisieme
  solution est decrite ensuite.

  33..  TTrraannssmmeettttrree ddeess ppaarraammeettrreess aauu nnooyyaauu

  Le  noyau  Linux  admet  qu'on  lui  fournisse  un  certain  nombre de
  parametres lors de son  lancement.  Le  plus  souvent  ces  parametres
  decrivent  des  aspects  de  la  configuration  qui  ne  peuvent  etre
  determines qu'au moment du demarrage.  Pour  les  cartes  reseaux,  le
  parametre est le suivant :

  ether=IRQ,adresse-E/S,param1,param2,nom

  Les  valeurs  numeriques admises peuvent etre exprimees en decimal, en
  octal (precedees par un '0') ou en hexadecimal (precedees  par  '0x').
  Le  premier argument qui n'est pas une valeur numerique est pris comme
  _n_o_m du peripherique (ici  une  carte  reseau).  Les  parametres  vides
  (entre  virgules)  ont zero comme valeur par defaut, et les parametres
  manquants avant le nom ne sont pas modifies.
     IIRRQQ
        Ce parametre indique l'IRQ (ligne d'interruption)  a  configurer
        (pour  les cartes admettant un parametrage logiciel de l'IRQ) ou
        a utiliser  (pour  celles  ou  l'IRQ  est  configuree  avec  des
        cavaliers  sur  la  carte).  Une  valeur  nulle  (0)  indique de
        demander a la carte quelle IRQ utiliser (si elle le  permet)  ou
        d'utiliser l'autoIRQ si la carte ne le permet pas.

     aaddrreessssee--EE//SS
        Ce  parametre  indique  l'adresse  d'entree/sortie a tester. Une
        valeur  nulle  (0)  demande  le  test  de  toutes  les  adresses
        d'entree/sortie raisonnables. Celles-ci sont determinees d'apres
        une  carte  des  zones  d'entree/sortie  habituelles  pour   les
        differents  types  de  peripherique.  Cette  carte des zones est
        ignoree si une adresse d'entree/sortie  est  specifiee.  Utilise
        avec  le  parametre reserve=_b_a_s_e,_t_a_i_l_l_e,... (-- Se reporter a la
        documentation _L_i_l_o.--) ceci permet d'empecher l'auto-test  d'une
        zone  d'entree/sortie  par d'autres pilotes et d'eviter ainsi le
        dysfonctionnement d'un peripherique qui  se  trouverait  pertube
        par ces tests.

     ppaarraamm11,,ppaarraamm22
        Au  depart,  ces  parametres  permettaient  d'indiquer l'adresse
        d'une zone de memoire partagee pour les cartes  qui  utilisaient
        cette technique, comme la WD8013. Leur utilisation a ensuite ete
        etendue a la  transmission  d'autres  informations  propres  aux
        differents types de cartes.

     nnoomm
        Ce  parametre  indique  le  nom  d'un peripherique predefini. Le
        noyau standard definit ainsi au moins "eth0", "eth1", "eth2"  et
        "eth3".  D'autres  noms peuvent etre predefinis (pour PPP, SLIP,
        etc.)  mais  ils  ont  une  semantique  differente  (pour  toute
        precision, se reporter aux FAQ et HOWTO correspondants).

  Deux  methodes  peuvent  etre utilisees pour fournir ces parametres au
  noyau Linux lors de son lancement. La methode habituelle  est  de  les
  indiquer  directement  apres  le  nom  de  l'image  noyau  a  charger.
  L'exemple suivant permet de tester les quatre emplacements possibles :

  linux ether=0,0,eth1 ether=0,0,eth2 ether=0,0,eth3

  Pour  eviter  d'avoir  a  taper  ceci  a chaque demarrage, il est plus
  pratique de configurer votre chargeur.

  33..11..  CCoonnffiigguurreerr vvoottrree cchhaarrggeeuurr

  Il est suppose dans ce qui suit que vous utilisez  le  chargeur  Linux
  standard _L_i_l_o.

  Il est bien evidemment penible d'avoir a taper une serie de parametres
  lors de chaque demarrage, et de plus cela empecherait tout redemarrage
  involontaire  de  s'effectuer  correctement  (--  Bien  que ce type de
  redemarrage ne se produise pas sous Linux  ;-)(_N_._D_._T_.).--)  .  L'ajout
  d'une   ligne   append   a   votre   fichier   de  configuration  _L_i_l_o
  (/etc/lilo.conf) vous permet de fournir automatiquement ces parametres
  au  noyau  (n'oubliez  pas  de  relancer lilo pour mettre a jour votre
  configuration).

  append = "ether=0,0,eth1 ether=0,0,eth2 ether=0,0,eth3"

  Cet  exemple  est   equivalent   au   precedent   (test   des   quatre
  emplacements),  en utilisant cette fois _L_i_l_o pour transmettre a chaque
  demarrage ces parametres au noyau.

  44..  MMooddiiffiieerr llee nnooyyaauu

  Si vous pouvez configurer votre systeme sans toucher au code source du
  noyau, nous vous recommandons fortement de faire ainsi (cf. supra). Il
  est difficile de garder une trace d'une modification apportee au  code
  source  et  cela  complique  grandement  les  mises  a  jour du noyau.
  Toutefois, cela s'impose dans les situations suivantes :

  +o  lorsque vous avez besoin de plus de quatre cartes  (seules  eth0  a
     eth3 sont definies dans le source drivers/net/Space.c) ;

  +o  vous  devez  resteindre  les types de peripheriques recherches a un
     sous-ensemble precis de types de  cartes  quand,  par  exemple,  le
     mecanisme de detection confond des types de cartes differents ;

  +o  quand  vous  voulez  utiliser  un  nom de peripherique different de
     eth_x.

  55..  NNootteess ssuurr llaa ddeetteeccttiioonn ddee qquueellqquueess ccaarrtteess ppaarrttiiccuulliieerreess

  55..11..  CCaarrtteess LLaannccee//PPCCNNEETT

  Le pilote Lance a besoin de tampons DMA en memoire basse, ce qui  fait
  que  la  procedure  de  detection des cartes Lance est specifique a ce
  type  de  cartes,  et  effectuee  avant  la   detection   des   autres
  peripheriques  reseaux.  L'avantage est que les cartes Lance multiples
  sont automatiquement detectees par cette procedure, l'inconvenient est
  que  le pilote Lance ignore (pour le moment) les parametres _L_i_l_o telle
  l'IRQ.

  55..22..  LLaa 33CC550099 eenn mmooddee IISSAA

  La 3C509 presente la caracteristique unique de permettre une detection
  vraiment  sure par le bus ISA. C'est une caracteristique interessante,
  mais malheureusement pour les situations  qui  nous  interessent  ici,
  cela  ne  fait  pas  tres  bon  menage  avec  les autres mecanismes de
  detection.

  Le probleme le plus important est qu'il est difficile de savoir quelle
  carte  sera  reconnue  en  premier,  l'ordre  dependant  de  l'adresse
  Ethernet des cartes. Cela signifie que la carte avec l'adresse la plus
  basse  se  verra  affectee  a  eth0,  et  ainsi  de suite. Si la carte
  correspondant a eth0 est retiree, toutes les autres cartes voient leur
  nom de peripherique decale d'une unite vers eth0.
  Un  probleme  lie est qu'il n'est pas possible de laisser une premiere
  carte inactive, ou une carte  active  a  une  adresse  ou  a  une  IRQ
  differentes de celles indiquees dans l'EEPROM, ou encore de configurer
  une carte a une adresse specifique.

  55..33..  LLaa 33CC557799 EEIISSAA eett llaa 33CC550099 eenn mmooddee EEIISSAA

  Les noyaux de version  anterieure  a  la  1.1.25  ne  detecteront  pas
  correctement   les   cartes  multiples  en  mode  EISA.  Si  plusieurs
  peripheriques eth_x sont indiques, la _m_e_m_e carte  3C509  sera  detectee
  plusieurs fois. La solution est de specifier l'adresse d'entree/sortie
  directement. Les noyaux de version ulterieure detecteront correctement
  plusieurs cartes en mode EISA, et detecteront aussi des cartes en mode
  ISA supplementaires, une fois  toutes  les  adresses  potentielles  de
  cartes en mode EISA testees.

       Don Becker, becker@cesdis.gsfc.nasa.gov

  Mini HOWTO terminal X NCD
  Ian Hodge, ian@permedia.ca
  v1.07, 30 Novembre 1999

  Ce document explique comment connecter un terminal X NCD  une machine
  hte UNIX (traduction : Michel Billaud, billaud@labri.u-bordeaux.fr).
  ______________________________________________________________________

  Table des matires


  1. Copyright

  2. Introduction

     2.1 tapes

  3. Prliminaires

     3.1 Le terminal X
     3.2 Connexion physique
     3.3 Logiciel serveur X de NCD

  4. Configuration de la machine hte UNIX

     4.1 TFTP et BootP

  5. Configurer la procdure de dmarrage du terminal X

     5.1 Syntaxe des commandes du
     5.2 Menu de configuration
     5.3 Fichiers de configuration du terminal X
     5.4 Connexion sur une machine du rseau

  6. Le terminal X et les polices

     6.1 Le serveur de polices

  7. Divers

     7.1 Terminaux supports
     7.2 Rfrences
     7.3 Matriel utilis pour la prparation de ce document
     7.4 Remerciements
     7.5 Problmes restants
     7.6 Contact


  ______________________________________________________________________

  11..  CCooppyyrriigghhtt

  Le _N_C_D _X _t_e_r_m_i_n_a_l _m_i_n_i _H_O_W_T_O est copyright (C) 1998 par Ian Hodge.
  Les documents _H_O_W_T_O de Linux peuvent tre reproduits et diffuss en
  tout ou partie, par tout moyen physique ou lectronique, du moment que
  cette notice de copyright figure sur toutes les copies.


  22..  IInnttrroodduuccttiioonn

  Ce document explique comment connecter un terminal X fabriqu par NCD
  (Network Computing Devices)  une machine hte fonctionnant sous UNIX,
  en utilisant le protocole _B_o_o_t_P (_B_o_o_t _P_r_o_t_o_c_o_l).  De nombreux
  terminaux peuvent galement dmarrrer par RARP, NFS, ou depuis une
  carte PCMCIA ou une liaison  srie (directe ou par modem).

  Bien que le matriau de ce document soit bas sur l'exprience d'un
  seul type de terminal X, une grande partie des informations qui y
  figurent s'appliquent galement  d'autres modles.  Il existe
  galement un _L_i_n_u_x _X _T_e_r_m_i_n_a_l _m_i_n_i _H_O_W_T_O (qui est actuellement dclar
  obsolte par les responsables des HOWTO, et n'est donc peut-tre pas
  disponible avec toutes les distributions de Linux) qui recoupe en
  partie ce document. Celui-ci contient davantage d'informations sur les
  terminaux X.


  22..11..  ttaappeess

  La connexion d'un terminal X  un rseau Unix se rsume aux tapes
  suivantes :


    Relier physiquement le terminal X au rseau.

    Configurer la _m_a_c_h_i_n_e _h__t_e UNIX qui servira au _b_o_o_t (dmarrage) du
     terminal X.

    Paramtrer la procdure de boot du terminal X.

    Dmarrer le terminal X.

    Se connecter sur le rseau.



  33..  PPrrlliimmiinnaaiirreess

  33..11..  LLee tteerrmmiinnaall XX

  Un terminal X est un appareil capable d'afficher et de communiquer sur
  un rseau, en utilisant le systme de fentrage pour rseaux
  distribus connu sous le nom de X.  Typiquement, le logiciel du
  terminal X (ce qu'on appelle le _s_e_r_v_e_u_r _X) est charg depuis le rseau
  au dmarrage du terminal. Les programmes autres que le  serveur X
  (programmes _c_l_i_e_n_t_s _X) ne sont pas excuts localement ( part
  quelques exceptions) par le terminal X, qui affiche des programmes qui
  tournent sur d'autres machines du rseau. Le terminal X est donc un
  genre de _n_e_t_w_o_r_k _c_o_m_p_u_t_e_r qui utilise le protocole X pour accder aux
  ressources du rseau.


  33..22..  CCoonnnneexxiioonn pphhyyssiiqquuee

  Le terminal X NCD (nous avons utilis le modle _X_n_c_d_1_9_r pour la
  prparation de ce document) possde une prise RJ-45 (paire torsade)
  pour Ethernet 10 Base T.  Il faut un rpteur multiport (_h_u_b) pour
  relier plus de deux appareils en paire torsade. Si le terminal X et
  la machine hte sont les seules machines de votre rseau, vous pouvez
  les connecter par un cble crois qui est dcrit dans le _L_i_n_u_x
  _E_t_h_e_r_n_e_t _H_O_W_T_O.


  33..33..  LLooggiicciieell sseerrvveeuurr XX ddee NNCCDD

  Le fichier qui contient le logiciel serveur X du terminal est
  disponible auprs du constructeur, qui le fournit en principe avec le
  terminal.  Ce fichier va rsider sur la machine hte, d'o il sera
  tlcharg au dmarrage du terminal X. Il est spcifique du modle du
  terminal, mais indpendant du type de la machine hte.  Le terminal
  peut dmarrer depuis n'importe quelle machine qui supporte le
  protocole de communication _B_o_o_t_P (expliqu plus loin).  En plus du
  serveur, le logiciel X peut contenir des applications, comme un
  gestionnaire de fentres, qui s'excuteront localement sur le terminal
  X.


  44..  CCoonnffiigguurraattiioonn ddee llaa mmaacchhiinnee hhttee UUNNIIXX

  Au dmarrage, le terminal X va chercher ses fichiers (y compris le
  serveur X) sur une machine du rseau. Une fois dmarr, le serveur X
  contrlera les entres (clavier, souris), l'affichage, les clients
  locaux et la communication par le protocole X.  Le serveur X s'excute
  sur le terminal X, et n'a donc besoin d'aucune compatibilit
  logicielle avec la machine hte.




  44..11..  TTFFTTPP eett BBoooottPP


  Les protocoles TFTP (_T_r_i_v_i_a_l _F_i_l_e _T_r_a_n_s_f_e_r _P_r_o_t_o_c_o_l, protocole
  lmentaire de transfert de fichiers) et BootP (_b_o_o_t _p_r_o_t_o_c_o_l,
  protocole d'amorage) sont utiliss ensemble sur la machine hte pour
  permettre au terminal X de rcuprer le serveur X et les fichiers de
  configuration  travers le rseau. Ces deux services sont
  habituellement dmarrs par _i_n_e_t_d (Internet Daemon).

  Lorsque le terminal X est mis sous tension, si il est configur pour
  un dmarrage par le rseau, il met un appel gnral (_b_r_o_a_d_c_a_s_t) sur
  le rseau en utilisant le protocole _B_o_o_t_P (protocole d'amorage
  TCP/IP).  Ce message d'appel contient l'adresse matrielle (Ethernet)
  du terminal X, adresse qui sera utilise par la machine hte pour
  rpondre  la "demande de boot".

  Lorsque la machine hte reoit une demande de boot, _i_n_e_t_d (qui
  surveille un port dsign dans /etc/services) dmarre le dmon _B_o_o_t_P
  spcifi dans /etc/inetd.conf.


  Dans le fichier inetd.conf, ajoutez ou d-commentez les lignes qui
  concernent TFTP ou BootP. Dans l'exemple qui suit, le dernier
  paramtre de la ligne de TFTP indique le rpertoire qui contient les
  fichiers pour le terminal X.  Bien que les noms de rpertoires ne
  soient pas obligatoires, pour des raisons de scurit il faut toujours
  les mettre, de faon  restreindre l'accs TFTP  ces seuls
  rpertoires.


  Exemple de fichier /etc/inetd.conf (extrait) :


       # Le service TFTP sert principalement au boot. La plupart des sites
       # ne font tourner ceci que sur les machines qui sont des "serveurs de boot".
       tftp   dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd /usr/X11/lib/X11/ncd/
       bootps dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.bootpd





  Lors de son activation, le dmon du serveur BootP lit son fichier de
  donnes /etc/bootptab. Une description de ce terminal X doit s'y
  trouver.  Chaque description contient un ensemble d'lments spars
  par des deux-points ":". Le premier lment est le nom du terminal.



  lments utiles du fichier bootptab :

     hhdd (_h_o_m_e _d_i_r_e_c_t_o_r_y) Rpertoire contenant le fichier de boot du
        terminal X (ici /usr/X11/lib/X11/ncd/).


     iipp Addresse IP du terminal X (dans notre exemple 10.0.0.1).


     ssmm(_s_u_b_n_e_t _m_a_s_k)
        masque de sous-rseau (ici 255.0.0.0).  Pour comprendre l'usage
        des masques de sous-rseau et autres principes des rseaux IP,
        consultez le _L_i_n_u_x _N_E_T_-_3 _H_O_W_T_O.


     ggww(_g_a_t_e_w_a_y)
        adresse IP de la passerelle (ici 10.0.0.1).


     hhtt(_h_a_r_d_w_a_r_e _t_y_p_e)
        Type de matriel. C'est ethernet dans cet exemple.


     hhaa(_h_a_r_d_w_a_r_e _a_d_d_r_e_s_s)
        Adresse matrielle du terminal X (adresse Ethernet sur 6
        octets).  D'aprs la page _b_o_o_t_p_t_a_b du manuel UNIX, l'lment
        "hhtt" doit prcder le "hhaa". L'adresse Ethernet s'affiche  la
        mise sous tension du terminal X, sous forme d'une srie de 6
        nombres  deux chiffres hexadcimaux, spars par des deux-
        points. Par exemple

        00:00:A7:12:26:19




     ttcc(_t_a_b_l_e _c_o_n_t_i_n_u_a_t_i_o_n)
        Suite d'une autre description du fichier _b_o_o_t_p_t_a_b. Voir
        l'exemple ci-dessous.


     ddss(_d_o_m_a_i_n _n_a_m_e _s_e_r_v_e_r)
        Adresse IP du serveur de noms (par exemple 10.0.0.3). Inutile si
        la rsolution d'adresse n'utilise pas de serveur de noms (DNS).



     bbff(_b_o_o_t _f_i_l_e)
        Nom du fichier contenant le serveur du terminal X (d'habitude le
        nom du fichier est celui du modle du terminal X, ici Xncd19r).


  Ce qui suit est un exemple de fichier /etc/bootptab.  Le caractre "\"
  sert  neutraliser les fins de ligne.












  ______________________________________________________________________
  # Ceci est une description, appele ici ``default'', avec
  # des informations communes  tous les clients BootP

  default:hd=/usr/X11/lib/X11/ncd/:\
          ds=10.0.0.3:\
          sm=255.0.0.0:\
          gw=10.0.0.1:

  # Le terminal X s'appelle ``myxterm''. Remarquez l'lment
  # ``tc'' qui fait rfrence  la description ``default''.

  myxterm:ht=ethernet:\
          ha=0x0000a7122619:\
          ip=10.0.0.2:\
          tc=default:\
          bf=Xncd19r:
  ______________________________________________________________________




  Lorsque le dmon bootpd trouve (dans le fichier bootptab) une
  description qui correspond  l'adresse matrielle contenue dans une
  requte de boot, il envoie une rponse  l'adresse IP correspondante.
  Le transfert de fichiers peut alors se faire par TFTP au dessus de IP.


  On attribue un nom au terminal X en ajoutant une description dans le
  fichier /etc/hosts de la machine hte. Ce fichier sert  tablir une
  correspondance entre noms de machines et adresses IP.  Dans l'exemple
  ci-dessous, le terminal X (d'adresse 10.0.0.2) est nomm "myxterm" :



       10.0.0.1        linuxhost       # La machine hte (serveur de boot)
       10.0.0.2        myxterm         # terminal X





  55..  CCoonnffiigguurreerr llaa pprrooccdduurree ddee ddmmaarrrraaggee dduu tteerrmmiinnaall XX

  Lorsqu'il est mis sous tension, le terminal X tente de _b_o_o_t_e_r,
  c'est--dire de charger le logiciel serveur X en mmoire et de
  l'excuter.  Si le terminal X ne peut pas booter, la chane d'invite
  ">" du moniteur (_B_o_o_t _M_o_n_i_t_o_r) apparat.  Le Boot Monitor est un
  programme enregistr dans les mmoires mortes (_P_R_O_M _= _p_r_o_g_r_a_m_m_a_b_l_e
  _r_e_a_d_-_o_n_l_y _m_e_m_o_r_y) du terminal.   l'aide du moniteur, il est possible
  de configurer le terminal X pour qu'il aille chercher le serveur X sur
  la machine hte au dmarrage. Utilisez "?"  pour avoir la liste des
  commandes du moniteur.



  Les paramtres de configuration que vous modifiez grce au moniteur
  sont stocks dans une mmoire non volatile (NVRAM = non-volatile
  random access memory), et sont conservs lorsque le terminal est mis
  hors-tension.



  Pour booter le terminal depuis le moniteur, on a le choix entre la
  commande "bt" et un systme de menus.  Les deux mthodes permettent en
  gros de faire la mme chose, mais les menus donnent accs  davantage
  de paramtres.



  55..11..  SSyynnttaaxxee ddeess ccoommmmaannddeess dduu BBoooott MMoonniittoorr




       > bt fichier IP_terminal IP_hte IP_passerelle masque_sous-rseau





     ffiicchhiieerr
        Le nom du fichier, sur la machine hte, qui contient le logiciel
        du serveur X pour le terminal (dans notre exemple "Xncd19r").
        Vrifiez que c'est le mme nom que celui indiqu dans le fichier
        bootptab (expliqu dans la section prcdente) pour ce terminal
        X.


     IIPP__tteerrmmiinnaall
        L'adresse IP affecte au terminal X (ici 10.0.0.2).
        Pareillement, cette adresse doit tre celle indique dans
        bootptab.



     IIPP__hhttee
        L'adresse IP de la machine hte (10.0.0.1).


     IIPP__ppaasssseerreellllee
        L'adresse IP de la passerelle du sous-rseau (par exemple
        10.0.0.1).


     mmaassqquuee__ssoouuss--rrsseeaauu
        Le masque de sous-rseau, en notation IP dcimale ou
        hexadcimale (par exemple 255.0.0.0 ou ff000000).


  55..22..  MMeennuu ddee ccoonnffiigguurraattiioonn""sseettuupp"" dduu mmoonniitteeuurr

  Les menus de configuration sont appels par la touche "Setup" ou en
  tapant la commande "se" aprs l'invite '>' du moniteur.



     GGeett IIPP AAddddrreesssseess FFrroomm
        Normalement, l'adresse IP du terminal devrait tre obtenue
        depuis la configuration stocke dans la NVRAM. Ne selectionnez
        'Network' que si vous utilisez RARP (_r_e_v_e_r_s_e _A_R_P) pour
        dterminer l'adresse IP du terminal X depuis la machine hte.



     TTeerrmmiinnaall IIPP AAddddrreessss
        L'adresse IP affecte au terminal X (par exemple 10.0.0.2).
        C'est la mme chose que le paramtre 'IP_terminal' vu
        prcdemment.



     FFiirrsstt BBoooott HHoosstt IIPP AAddddrreessss
        L'adresse IP de la machine hte (ici  10.0.0.1). Mme chose que
        le paramtre 'IP_hte'.


     GGaatteewwaayy IIPP AAddddrreessss
        L'adresse IP de la passerelle de sous-rseau.  Correspond 
        "IP_passerelle".


     SSuubbnneett MMaasskk
        Le masque de sous-rseau, en notation IP dcimale (voir variable
        "masque_sous-rseau" plus haut).


     BBrrooaaddccaasstt IIPP AAddddrreessss
        L'adresse IP pour la diffusion vers le sous-rseau (par exemple
        10.255.255.255).


     BBoooott FFiillee
        Le nom du fichier qui, sur la machine hte, contient le logiciel
        serveur X du terminal (exemple "Xncd19r"). Mme chose que le
        paramtre "fichier" dcrit plus haut.



     TTFFTTPP BBoooott DDiirreeccttoorryy
        Le nom du rpertoire, sur la machine hte, qui contient le
        logiciel serveur (par exemple "/usr/X11/lib/X11/ncd/" ou
        "/tftpboot/").


     CCoonnffiigg ffiillee
        Le nom du fichier de configuration du terminal X sur la machine
        hte (voir plus loin).


     UUNNIIXX CCoonnffiigg DDiirreeccttoorryy
        Le nom du rpertoire qui contient le fichier de configuration
        (exemple  "/usr/X11/lib/X11/ncd/").


     TTFFTTPP OOrrddeerr,, NNFFSS OOrrddeerr,, LLooccaall OOrrddeerr
        Mettez "1" pour la mthode de dmarrage que vous prfrez,
        c'est--dire TFTP si vous dmarrez par BootP depuis une machine
        hte.


  55..33..  FFiicchhiieerrss ddee ccoonnffiigguurraattiioonn dduu tteerrmmiinnaall XX


  Pendant la procdure de boot, le terminal X va essayer d'aller
  chercher des fichiers depuis la machine hte.  Si un fichier manque,
  le terminal utilisera des options par dfaut.

  Voici les fichiers transfrs pendant le dmarrage du terminal X :


    Le fichier de configuration  (par exemple ncd.conf) qui contient
     les paramtres du terminal X.

    Le fichier des couleurs (par exemple rgb.txt).

    La base de donnes des symboles des touches (par exemple
     XKeysymDB).
    Les fichiers catalogues des polices (exemple font.dir, font.alias).


  Aprs un dmarrage russi, la fentre console du terminal X doit
  apparatre avec une barre de menus. La touche "Setup" du clavier fait
  apparatre/disparatre cette fentre. Le menu droulant "setup" permet
  de voir et changer les paramtres du terminal X, et de les sauver sur
  la machine hte, dans un fichier de configuration qui pourra tre
  rutilis plus tard.

  Si le transfert de fichiers se fait par TFTP, le fichier doit tre
  accessible en lecture pour tous. De la mme faon, pour pouvoir sauver
  un fichier de configuration sur la machine hte, le fichier doit
  exister pralablement et tre accessible en criture pour tout le
  monde. Si vous utilisez TFTP scuris (ce qui est recommand pour des
  raisons de scurit), l'accs aux fichiers ne pourra se faire  que
  dans des rpertoires dtermins.


  NNoottee :: le terminal peut rater son dmarrage si il tait configur pour
  fonctionner avec d'autres htes ou avec des paramtres diffrents.  Le
  problme peut tre rsolu en rinitialisant la NVRAM pour supprimer
  les paramtres mmoriss.


  Pour rinitialiser la NVRAM depuis le _b_o_o_t _m_o_n_i_t_o_r, tapez la commande
  "nv". Depuis ce sous-menu choisissez "l" pour charger les valeurs par
  dfaut, "s" pour sauver et enfin "q" pour quitter.  Relancez la
  procdure de dmarrage dcrite plus haut.






  55..44..  CCoonnnneexxiioonn ssuurr uunnee mmaacchhiinnee dduu rrsseeaauu

  Depuis la barre de menu de la console X, selectionnez le menu
  droulant "Terminals" et choisissez l'option "New Telnet...". Lorsque
  la fentre telnet apparat, tapez l'adresse d'une machine du rseau
  dans le champ "service" et cliquez sur "OK". La bannire du site
  choisi devrait apparatre alors.  Une fois connect, on peut lancer
  des programmes X, y compris un gestionnaire de fentres, depuis la
  fentre telnet.



  66..  LLee tteerrmmiinnaall XX eett lleess ppoolliicceess


  Le terminal X possde quelques polices internes, appeles "built-ins"
  dans les menus et fichiers de configuration. Le terminal peut
  fonctionner avec ces seules polices, mais, en gnral, on prfre en
  avoir davantage.  On peut ajouter des polices en indiquant des chemins
  d'accs dans les menus de configuration de la console X, dans les
  fichiers de configuration, ou par la commande xset.

  Lorsque le logiciel serveur X s'excute sur le terminal, cette
  commande xset permet de modifier ou consulter la liste de chemins
  d'accs des polices.

  Pour interroger le serveur X : xset -q

  Pour ajouter des chemins d'accs : xset +fp _c_h_e_m_i_n


  Pour enlever des chemins d'accs : xset -fp _c_h_e_m_i_n


  66..11..  LLee sseerrvveeuurr ddee ppoolliicceess


  Le serveur de polices (xfs : _X _F_o_n_t _S_e_r_v_e_r) tourne sur une des
  machines du rseau, et fournit des polices au terminal X et aux autres
  clients du rseau.  L'emploi d'un serveur de polices permet d'utiliser
  une grande varit de polices, parce que le logiciel du serveur X ne
  traite que des polices _b_i_t_m_a_p.  Lors d'un chargement de police, le
  serveur de polices peut dcompresser, ajuster et convertir des polices
  pour le serveur X, et peut aider  simplifier la gestion des polices
  pour des groupes de terminaux et de clients rseau.  Le serveur de
  polices est fourni avec de nombreuses distributions Linux, et a
  galement t incorpor dans le logiciel du consortium X disponible
  sur ftp.x.org <ftp://ftp.x.org>.


  Pour indiquer l'utilisation d'un serveur de polices, on met une
  rfrence  un service TCP  la place d'un chemin d'accs dans les
  menus ou fichiers de configuration du terminal X.


  Format des rfrences  des services TCP :


       tcp/<adresse IP du serveur de polices>:<port utilis>




  Exemple:


       tcp/10.0.0.1:7100





  Voici un exemple extrait du fichier de configuration d'un terminal X :



       xserver-default-font-path = {
               { "tcp/10.0.0.1:7100" }
               { "built-ins" }
       }




  La commande xset permet d'ajouter un serveur de polices dans la liste
  des chemins d'accs :



       xset +fp tcp/10.0.0.1:7100




  AVERTISSEMENT : Certaines versions de NCDWare (logiciel serveur)
  exigent que le serveur de polices soit indiqu en premier avant les
  polices prdfinies "built-ins". Ceci est en contradiction avec la
  documentation NCD "System Administrator's Guide for UNIX Systems".

  Faites des essais, et vrifiez le rsultat avec la commande "xset q".


  Sur la machine hte, le serveur de polices xfs est lanc au dmarrage
  par le script rc.local, par la commande suivante :



       xfs -config <fichier de configuration> -port <numro de port>




  Le numro de port standard pour le serveur de polices est 7100.
  Exemple:



       xfs -config /usr/X11/lib/X11/fs/config -port 7100




  Exemple de fichier de configuration du serveur de polices :



       ______________________________________________________________________
       # Fichier de configuration du serveur de polices

       # On autorise au plus 10 clients a se connecter  ce serveur de polices.
       client-limit = 10

       # lorsqu'un serveur de polices atteint le nombre maximum de client,
       # on en dmarre un autre.
       clone-self = on

       # On utilise le syslog d'UNIX pour noter les erreurs.
       use-syslog = on

       # liste des rpertoires de polices
       catalog = /usr/X11R6/lib/X11/fonts/misc/,
          /usr/X11R6/lib/X11/fonts/Speedo/,
          /usr/X11R6/lib/X11/fonts/Type1/,
          /usr/X11R6/lib/X11/fonts/75dpi/,
          /usr/X11R6/lib/X11/fonts/100dpi/

       # fichier pour noter les erreurs si syslog n'est pas employ
       error-file = /usr/X11R6/lib/X11/fs/fs-errors

       # 12 points en  decipoints
       default-point-size = 120

       # 100 x 100 et 75 x 75
       default-resolutions = 75,75,100,100
       ______________________________________________________________________








  77..  DDiivveerrss



  77..11..  TTeerrmmiinnaauuxx ssuuppppoorrttss


  On m'a dit que les procdures dcrites dans ce document fonctionnaient
  (plus ou moins) pour les terminaux suivants : _N_C_D _1_9_r_, _N_C_D _1_9_c_, _N_C_D
  _1_5_b et _N_C_D _M_C_X.


  77..22..  RRffrreenncceess



    Pages de manuel UNIX : _b_o_o_t_p_d(8), _t_f_t_p_d(8), _b_o_o_t_p_t_a_b(5), _x_d_m(1x),
     _x_f_s(1), _f_s_i_n_f_o(1), _x_s_e_t(1), _i_n_e_t_d(8),

    HOWTOs : _L_i_n_u_x _E_t_h_e_r_n_e_t _H_O_W_T_O, _L_i_n_u_x _N_e_t_-_3 _(_N_e_t_w_o_r_k_i_n_g_) _H_O_W_T_O,

    NCD Techtips Archive <ftp://ftp.ncd.com/pub/ncd/Archive/NCD-
     Articles/index.html>,

    NCD Techtips Archive Mirror at CERN
     <http://wsspinfo.cern.ch/file/NCD-Articles/>,

    Depuis la  sortie de la premire version de ce _m_i_n_i _H_O_W_T_O, j'ai
     dcouvert un document de NCD qui rend le mien presque inutile.  Le
     NCDware Reference Manual
     <http://www.ncd.com/doc/ncdware50ref/front.htm> couvre en dtail
     presque tous les points de la configuration.


    _N_C_D_w_a_r_e _S_y_s_t_e_m _A_d_m_i_n_i_s_t_r_a_t_o_r_'_s _G_u_i_d_e _f_o_r _U_N_I_X _S_y_s_t_e_m_s,


  77..33..  MMaattrriieell uuttiilliiss ppoouurr llaa pprrppaarraattiioonn ddee ccee ddooccuummeenntt



    Terminal X : NCD modle NCD19r avec cran monochrome 19 pouces
     1280x1024, 8Mo de RAM.

    Logiciel serveur X :  NCDware  V3.2.CV 19r_s

    Machines-htes : IBM Cyrix 686 P150+ distribution Slackware (noyau
     Linux version 2.0.31), IBM Cyrix M2 200 MMX distribution Red Hat
     5.0 (noyau version 2.0.32).

    Carte rseau : carte Ethernet 10 base T (clone NE 2000) et rpteur
     multiport 8 voies.

    Serveur de polices version 2, release 6300.


  77..44..  RReemmeerrcciieemmeennttss

  Je voudrais remercier Michael de Lind van Wijngaarden, Jamal Hadi-
  Salim et Dwight Hodge pour l'aide apporte pour la prparation de ce
  document.

  77..55..  PPrroobbllmmeess rreessttaannttss



    Est il possible (et raisonnable) de dmarrer le serveur de polices
     par _i_n_e_t_d ?

    Si la machine sur laquelle tourne le serveur de polices est
     arrte, puis redmarre et le serveur de polices ractiv, il
     arrive que le terminal X n'arrive pas  accder aux polices. Il
     faut redonner la liste des chemins d'accs des polices avec les
     menus de la console ou par xset. Pourquoi ?


    Les procdures sont-elles les mmes pour d'autres modles de
     terminaux X ?

    Quelle est la procdure pour dmarrer le terminal X en utilisant
     NFS (Nework File System) ou  RARP (Reverse Address Resolution
     Protocol)?

    Les messages suivants apparaissent dans la fentre console du
     terminal X. Je suspecte qu'ils sont causs par des extensions
     _X_F_r_e_e_8_6 qui ne font pas partie du serveur X. Quelqu'un peut-il
     infirmer ou confirmer ?



       %XSERVER-I-NEWCLIENT, host "localhost" connected with blank authorization
       %XSERVER-W-NOEXTENSION, client attempted to use non-existent extension "BIG-REQUESTS"
       %XSERVER-W-NOEXTENSION, client attempted to use non-existent extension "XKEYBOARD"
       %XSERVER-W-NOEXTENSION, client attempted to use non-existent extension "XFree86-Misc"





    Verrons-nous un portage de Linux sur les terminaux X ? Cela semble
     improbable, mais Linux existe dj sur d'autres plateformes
     improbables.


  77..66..  CCoonnttaacctt


  Vous pouvez m'crire  ian@permedia.ca pour tous commentaires,
  suggestions ou contributions.























  NFS-Root Mini-HowTo
  par Andreas Kostyrka, andreas@ag.or.at
  Version 8, 8 Aout 1997

  (Adaptation  francaise  par  Eric  Dumas dumas@Linux.EU.Org).  Ce mini
  HowTo presente comment configurer une station LLiinnuuxx "sans" disque, qui
  monte  sa  racine  via  NFS. La derniere version de ce mini HowTo peut
  toujours  etre  trouvee  et   recuperee   sur   le   site   ftp://sun-
  site.unc.edu/pub/Linux/docs/HOWTO/mini/NFS-Root, ou sur n'importe quel
  miroir pres de chez vous.

  11..  CCooppyyrriigghhtt

  (c)   1996   Andreas   Kostyrka   (e9207884@student.tuwien.ac.at    ou
  andreas@ag.or.at)

  Sauf  indication contraire, les documents HowTo LLiinnuuxx sont copyrightes
  par leurs auteurs respectifs. Les documents HowTo LLiinnuuxx  peuvent  etre
  reproduits  et  diffuses  d'une  maniere  complete  ou  partielle, sur
  n'importe quel support, qu'il soit physique ou electronique, du moment
  ou  ce  copyright  se  trouve  sur  toutes  les copies. Les diffusions
  commerciales sont autorisees et meme encouragees. Toutefois,  l'auteur
  aimerait bien etre averti de ce genre de distributions.

  Toute  traduction,  travail  derive, ou travaux plus generaux incluant
  n'importe  quel  document  HowTo  LLiinnuuxx  doit  etre  protege  par   ce
  copyright.  De  cette  maniere,  vous  ne pouvez pas creer un document
  derivant d'un HowTo et imposer des restrictions supplementaires sur sa
  distribution. Des exceptions a ces regles peuvent etre  accordees sous
  certaines conditions. Contactez dans ce cas le coordinateur des  HowTo
  LLiinnuuxx a l'adresse qui vous sera donnee a la fin de cette section.

  En resume, nous souhaitons promouvoir la diffusion de ces informations
  a travers le maximum de  moyens  de  communications.  Toutefois,  nous
  souhaitons  absolument  conserver  un  copyright sur ces documents, et
  nous voulons etre consultes pour toute redistribution des HowTos.

  Si  vous  avez  des  questions,  contactez  alors   _A_n_d_r_e_a_s   _K_o_s_t_y_r_k_a
  andreas@ag.or.at,  l'auteur  de  ce  mini-HOWTO,  ou  _G_r_e_g _H_a_n_k_i_n_s, le
  coordinateur des HowTo pour LLiinnuuxx, gregh@sunsite.unc.edu par  courrier
  electronique.

  11..11..  CCoonnttrriibbuutteeuurrss

  +o  _A_v_e_r_y  _P_e_n_n_a_r_u_n  (apenwarr@foxnet.net) : comment amorcer la machine
     sans LILO ;

  +o  Ofer Maor (ofer@hadar.co.il) : a ecrit un mini-HowTo bien  meilleur
     pour  configurer les stations de travail ne possedant pas de disque
     ;

  +o  Christian Leutloff (leutoff@sundancer.tng.oche.de)  :  informations
     sur netboot.

  22..  PPrreesseennttaattiioonn ggeenneerraallee

  En  general,  on peut rencontrer les problemes suivants concernant une
  station de travail :

  +o  elle doit recuperer sa propre adresse IP, et si  besoin,  egalement
     le reste de la configuration Ethernet ;

  +o  elle  doit  connaitre  le serveur NFS et le chemin de montage de sa
     partition racine.

  L'implementation actuelle de _N_F_S_R_O_O_T dans le noyau LLiinnuuxx (a partir  de
  la version 1.3.7x) autorise les "solutions" suivantes :

  +o  l'adresse  IP  peut  etre  trouvee  par  RARP,  ou la configuration
     Ethernet complete peut etre passee au noyau via  des  parametres  a
     LILO ou LOADLIN ;

  +o  le chemin NFS pour monter la partition peut etre passe au noyau via
     des parametres. Si cela n'est pas fait, alors le noyau suppose  que
     le  serveur RARP est egalement le serveur NFS, et utilise le chemin
     par defaut (le chemin par defaut est code en dur dans  le  noyau  :
     /tftpboot/_a_d_r_e_s_s_e_-_I_P _d_e _l_a _m_a_c_h_i_n_e.).

  +o  la configuration du client peut etre trouvee par BOOTP.

  Avant  de  commencer  a  configurer un environnement sans disque, vous
  devez decider si vous allez amorcer la machine en  utilisant  LILO  ou
  LOADLIN.  L'avantage  de les utiliser est la souplesse. L'inconvenient
  est la rapidite. Amorcer un noyau LLiinnuuxx sans LILO est plus rapide.

  33..  CCoonnffiigguurreerr llee sseerrvveeuurr

  33..11..  CCoommppiilleerr lleess nnooyyaauuxx

  Inclure le support RARP dans le noyau du serveur est surement une tres
  bonne idee. Vous devez absolument l'inclure si vous allez amorcer sans
  donner des parametres au noyau. D'un autre cote, cela ne  vous  aidera
  pas  vraiment  si  le  client n'est pas sur le meme sous reseau que le
  serveur.

  Le noyau de la station de travail doit posseder les  elements  suivant
  au minimum :

  +o  systeme de fichiers NFS inclu (ce n'est pas la peine de compiler le
     systeme de fichiers ext2 : un module suffira) ;

  +o  "Root on NFS" doit etre active ;

  +o  le gestionnaire Ethernet pour la carte reseau de  la  station  doit
     etre inclue dans le noyau ;

  +o  en  fonction de vos besoin, il est possible que vous ayez a inclure
     les protocoles RARP ou BOOTBP pour  Nfs-Root  (voir  les  questions
     posees lors de la configuration du noyau apres avoir active NFS).

  Si  la  station  de travail sera amorcee sans aucun parametre passe au
  noyau, vous devez egalement fixer  le  peripherique  de  la  _r_a_c_i_n_e  a
  0:255.  Pour faire cela, il suffit de creer un fichier de peripherique
  avec :

  mknod /dev/nfsroot b 0 255.

  Apres avoir cree un tel fichier de peripherique, vous pouvez fixer  le
  peripherique racine pour l'image du noyau avec :

  rdev_i_m_a_g_e_-_n_o_y_a_u /dev/nfsroot.

  33..22..  CCrreeaattiioonn dduu ssyysstteemmee ddee ffiicchhiieerrss rraacciinnee

  33..22..11..  CCooppiieerr llee ssyysstteemmee ddee ffiicchhiieerrss

  Attention  :  bien ces instructions peuvent tres bien fonctionner chez
  vous, elles  ne  sont  peut  etre  pas  tres  bien  adaptees  dans  un
  environnement  de  production. Consultez le mini-HowTo NFS-Root-Client
  de Ofer Maor (ofer@hadar.co.il) pour une meilleur solution.

  Apres avoir decide ou placer la racine de l'arborescence, il suffit de
  la creer avec par exemple :

  mkdir -p _r_e_p_e_r_t_o_i_r_e

  et

  tar cClf / - | tar xpCf _r_e_p_e_r_t_o_i_r_e -.

  Si  votre  noyau  s'amorce  sans  LILO,  alors  la  racine  doit  etre
  /tftpboot/_a_d_r_e_s_s_e_-_I_P. Si cela ne vous  plait  pas,  il  suffit  de  le
  changer dans le fichier Makefile dans les sources du noyau. Recherchez
  et modifiez la ligne NFS_ROOT = -DNFS_ROOT.  Si  vous  modifiez  cela,
  vous devrez alors recompiler le noyau.

  33..22..22..  CChhaannggeerr llaa rraacciinnee dduu ssyysstteemmee ddee ffiicchhiieerrss

  Maintenant,  supprimez  les  fichiers inutiles et verifiez les scripts
  situes dans /etc/rc.d. Certains points sont vitaux :

  +o  il est important que  le  peripherique  eth0  soit  configure.   La
     station  de  travaille  est lancee avec une interface eth0 au moins
     configuree partiellement. Donner comme  adresse  IP  a  la  station
     l'adresse   du  serveur  n'est  pas  vraiment  une  chose  vraiment
     intelligente a faire (comme cela est arrive  une  fois  a  l'auteur
     lors de ses essais...).

  +o  un  autre  point  important  concerne  le  fichier /etc/fstab de la
     station de travail. Il doit etre configure  pour  des  systemes  de
     fichiers nfs.

  +o  ATTENTION  : ne melangez pas la racine du systeme de fichiers situe
     sur le serveur la racine du systeme de fichiers de  la  station  de
     travail  (j'ai deja patche un fichier rc.inet1 sur le serveur et je
     me  demandais  pourquoi  la  station  de  travail  ne  fonctionnait
     toujours pas.).

  33..22..33..  EExxppoorrtteerr llee ssyysstteemmee ddee ffiicchhiieerrss

  Exporter  le  repertoire racine de la station de travail. Consultez la
  page de manuel exports(5). Vous devriez egalement relancer les  demons
  nfsd  et  mountd  apres ces modifications. Avec la RedHat, vous pouvez
  effectuer    tres    simplement    cette    operation    en    lancant
  /etc/rc.d/init.d/nfs stop puis /etc/rc.d/init.d/nfs start.

  33..22..44..  CCoonnffiigguurraattiioonn RRAARRPP

  Configurer le serveur RARP quelque part sur le reseau. Si vous amorcez
  sans un parametre _n_f_s_r_o_o_t, le serveur  RARP  doit  egalement  etre  un
  serveur  NFS.  En  principe,  ce  sera  le cas. Pour cela, vous devrez
  utiliser un noyau possedant le support RARP.

  Pour realiser cette operation, lancez (et inserez-le quelque part dans
  un fichier /etc/rc.d du serveur !) :

  /sbin/rarp -s _a_d_r_e_s_s_e_-_i_p _a_d_r_e_s_s_e_-_m_a_t_e_r_i_e_l

  ou

  +o  _a_d_r_e_s_s_e_-_i_p : est l'adresse IP de la station de travail ;

  +o  _a_d_r_e_s_s_e_-_m_a_t_e_r_i_e_l  : est l'adresse Ethernet de la carte reseau de la
     station de travail.

     Par exemple : /sbin/rarp -s 131.131.90.200 00:00:c0:47:10:12

  Vous pouvez egalement  utiliser  un  nom  symbolique  a  la  place  de
  l'adresse IP, du moment ou le serveur est capable de trouver l'adresse
  IP (fichier /etc/hosts ou resolution par le DNS).

  33..22..55..  CCoonnffiigguurraattiioonn ddee BBOOOOTTPP

  Pour configurer BOOTP, vous devrez editer  le  fichier  /etc/bootptab.
  Consultez les pages de manuel _b_o_o_t_p_d_(_8_) et _b_o_o_t_p_t_a_b_(_5_).

  33..22..66..  TTrroouuvveerr lleess aaddrreesssseess mmaatteerriieelllleess

  Je ne connais pas l'adresse de la carte ! Comment la trouver ?

  +o  amorcez  avec  la  disquette de boot, et regardez la ligne ou votre
     carte reseau est identifiee. Elle contient normalement  six  octets
     en  hexadecimal, qui devraient normalement correspondre a l'adresse
     de la carte.

  +o  amorcez la station  avec  un  systeme  d'exploitation  qui  utilise
     TCP/IP.  Ensuite,  lancez un ping depuis le serveur sur la station.
     Regardez enfin le cache ARP en executant /sbin/arp -a.

  44..  AAmmoorrcceerr llaa ssttaattiioonn ddee ttrraavvaaiill

  44..11..  UUttiilliisseerr uunnee RROOMM bboooottaabbllee

  Comme je ne l'ai pas utilise par moi-meme, je ne peut donc vous donner
  que    les    conseils   suivants   (merci   a   Christian   Leutloff,
  leutloff@sundancer.tng.oche.de).

  +o  utiliser des bootroms "normale" ;

  +o  utiliser le paquetage netboot ecrit par Gero Kuhlmann, et  qui  est
     disponibles  pour  Linux,  avec  des  informations supplementaires.
     netboot est recuperable sur les miroirs Linux, ou dans le paquetage
     de la Debian (netboot-0.4).

  +o  lire attentivement la documentation fournie avec votre bootrom ;

  +o  vous  devrez  probablement  a  activer  le  demon  tftpd  sur votre
     serveur, mais cela depend un peu de la maniere dont  votre  bootrom
     charge le noyau ;

  +o  toute  information  concernant  les  vendeurs de bootrom pour Linux
     sont les  bienvenues,  etant  donne  que  tout  le  monde  n'a  pas
     forcement  acces  a  un  grossiste  en  prom  (tout specialement en
     Europe, puisque c'est la ou je suis)

  44..22..  UUttiilliisseerr ssiimmpplleemmeenntt uunnee ddiissqquueettttee

  Si vous avez exporte la racine du  systeme  de  fichier  avec  un  nom
  correcte  et  que  votre serveur NFS est egalement le serveur RARP (ce
  qui implique que les deux machines soient sur  le  meme  sous-reseau),
  alors  il  suffit tout simplement d'amorcer la machine en utilisant un
  noyau qui aura ete copie sur la disquette (par exemple avec cat). Vous
  devez fixer le peripherique racine dans le noyau a 0:255. Cela suppose
  au  prealable  que  le  repertoire  racine   sur   le   serveur   soit
  /tftpboot/IP-Address (cette valeur peut etre modifee en recompilant le
  noyay).

  44..33..  UUttiilliisseerr uunn _b_o_o_t_l_o_a_d_e_r eett RRAARRPP

  Donnez au noyau tous les parametres necessaire lorsque vous  souhaitez
  amorcer la machine, et ajoutez :

  nfsroot=_a_d_r_e_s_s_e_-_i_p_-_s_e_r_v_e_u_r:_/_c_h_e_m_i_n _d_'_a_c_c_e_s

  ou  _a_d_r_e_s_s_e_-_i_p_-_s_e_r_v_e_u_r  est  l'adresse  IP  du  serveur NFS et _/_c_h_e_m_i_n
  _d_'_a_c_c_e_s est le chemin d'acces au repertoire racine.

  Quelques astuces :

  +o  lorsque vous utilisez LILO, pensez a  utiliser  la  caracteristique
     "lock".  Tapez  une  seule fois correctement tous les parametres et
     ajoutez "lock". La prochaine fois que vous  amorcerez  la  machine,
     LILO  lancera  un  timeout  directement et amorcera la machine sans
     plus attendre.

  +o  lorsque vous generez une  disquette  d'amorcage  specifique  a  une
     station,  vous  pouvez egalement utiliser l'option  append= dans le
     fichier lilo.conf.

  44..44..  UUttiilliisseerr uunn _b_o_o_t_l_o_a_d_e_r ssaannss RRAARRPP

  En plus de nfsroot, il est necessaire de donner en argument au noyau :

  nfsaddrs=_w_s_t_-_I_P:_s_r_v_-_I_P: _g_w_-_I_P:_n_e_t_m_-_I_P:_n_o_m_m_a_c_h_i_n_e

  Le noyau va alors configurer eth0 avec les parametres donnes :

  +o  wst-IP : adresse IP de la machine ;

  +o  srv-IP : adresse IP du serveur NFS ;

  +o  gw-IP  : adresse IP de la passerelle ;

  +o  netm-IP : masque reseau ;

  +o  nommachine : nom de la machine.

  55..  PPrroobblleemmeess ccoonnnnuuss

  55..11..  //ssbbiinn//iinniitt nnee ssee llaannccee ppaass

  Un  probleme  frequent avec /sbin/init est que certaines distributions
  recentes  sont  fournies  avec   une   version   du   programme   init
  dynamiquement lie. Donc, vous devez fournir une configuration correcte
  concernant le repertoire /lib au client.  Une  solution  assez  simple
  consiste  a  remplacer  /sbin/init  (pour  le client) par un programme
  statiquement  lie  "Hello  World".  De  cette  maniere,  vous   pouvez
  determiner  si  c'est  bien  la cause du probleme, ou bien un probleme
  plus grave.

  55..22..  PPrroobblleemmeess aavveecc llee rreeppeerrttooiirree //ddeevv

  Lors de l'amorcage de la machine, si  vous  obtenez  tout  un  tas  de
  messages  d'erreurs  concernant les ttys, vous devriez alors lancer un
  MAKEDEV sur le client dans le repertoire /dev.  Certaines rumeurs font
  part  que  cela ne fonctionne pas avec certains serveurs qui utilisent
  des numeros de peripheriques codes sur 64 bits.  Contactez-moi si vous
  avez  ce  genre de probleme. Une solution possible consiste a creer un
  petit disque mape en meoire (ram disc) contenant le repertoire /dev et
  de reinstaller les i-noeuds des peripheriques a chaque fois.

  66..  PPoouurr pplluuss ddee rreennsseeiiggnneemmeennttss......

  +o  il         existe         un         client         BOOTP         :
     _f_t_p_:_/_/_s_u_n_s_i_t_e_._u_n_c_._e_d_u_/_s_y_s_t_e_m_/_N_e_t_w_o_r_k_/_a_d_m_i_n_/_b_o_o_t_p_c_._v_0_4_5_._t_g_z.

     Avec initrd (inclus dans Linux 2.0), cela devrait fonctionner assez
     simplement  pour  les stations sans disque. Ce demon est en fait un
     choix judicieux surtout si vous  avez  besoin  d'une  configuration
     particuliere.

  +o  Pour  les  amorcages  bases  sur  bootpd,  cela  n'est pas vraiment
     necessaire puisque Linux 2.0 contient egalement l'option d'utiliser
     BOOTP  au  lieu de RARP. Pour etre plus precis, vous pouvez inclure
     les deux options dans le noyau lors  de  sa  configuration,  et  la
     reponse la plus rapide sera celle choisie.

  +o  dans le repertoire Documentation des sources du noyau, vous pourrez
     y trouver un fichier documentant les systemes NFS-Root ;

  +o  il existe un patch quelque part qui permet de swapper _v_i_a NFS.   On
     me l'a envoye (durant une periode tres surchargee), mais j'ai comme
     qui dirait perdu le mail...

  Vous le trouverez probablement sur  le  site  http://www.linuxhq.com/<
  dans la partie "patches non-officiels".

  Ma  clef  PGP  publique  peut etre consultee en effectuant un finger a
  l'adresse andreas@ag.or.at. Il s'agit de :

  F1 F7 43 D5 07 C4 6C 87  BF 6B 33 A2 2C EE 5A F9

  NFS-Root-Client Mini-Howto
  par Ofer Maor, ofer@hadar.co.il
  Version 4.1, le 02 Fvrier 1999

  (Adaptation franaise par Antoine Levavasseur levavass@efrei.fr, le 4
  mars 1999).  L'objectif de ce mini-howto est d'expliquer comment crer
  l'arborescence racine d'un client pour le serveur qui gre des clients
  utilisant NFS-Root. La dernire version de ce mini Howto peut tre
  rcupre  : http://www.hcs.co.il/oferm/NFS-Root-Client/

  11..  CCooppyyrriigghhtt


  (c) 1996 Ofer Maor (ofer@hadar.co.il)

  Sauf indication contraire, les documents HHoowwttoo LLiinnuuxx sont copyrights
  par leurs auteurs respectifs. Les documents HHoowwttoo LLiinnuuxx peuvent tre
  reproduits et diffuss d'une manire complte ou partielle, sur
  n'importe quel support, qu'il soit physique ou lectronique, du moment
  que ce copyright se trouve sur toutes les copies. Les diffusions
  commerciales sont autorises et mme encourages. Toutefois, l'auteur
  aimerait bien tre averti de ce genre de distributions.


  Toute traduction, travail driv, ou travaux plus gnraux incluant
  n'importe quel document HHoowwttoo LLiinnuuxx doit tre protg par ce
  copyright. De cette manire, vous ne pouvez pas crer un document
  drivant d'un Howto et imposer des restrictions supplmentaires sur sa
  distribution. Des exceptions  ces rgles peuvent tre accordes sous
  certaines conditions. Contactez dans ce cas le coordinateur des HHoowwttoo
  LLiinnuuxx  l'adresse qui vous sera donne  la fin de cette section.


  En rsum, nous souhaitons promouvoir la diffusion de ces informations
   travers le maximum de moyens de communications. Toutefois, nous
  souhaitons absolument conserver un copyright sur ces documents, et
  nous voulons tre consults pour toute redistribution des Howtos.


  Si vous avez des questions, contactez alors _O_f_e_r _M_a_o_r
  _(_o_f_e_r_@_h_a_d_a_r_._c_o_._i_l_), l'auteur de ce Mini-Howto, ou  _G_r_e_g _H_a_n_k_i_n_s, le
  coordinateur des Howto pour LLiinnuuxx, gregh@sunsite.unc.edu par courrier
  lectronique ou au +1 404 853 9989.


  Si vous avez quelque chose  ajouter  ce Mini-Howto, envoyez par
  courrier lectronique  l'auteur (Ofer Maor (ofer@hadar.co.il) vos
  informations.  Toute information intressante sera apprcie.


  11..11..  RReemmeerrcciieemmeennttss


  Je tiens  remercier l'auteur du Howto NFS-Root, Andreas Kostyrca
  (andreas@medman.ag.or.at).  Son Mini-Howto m'a aid lors de mes
  premiers pas pour mettre en place un client avec le systme NFS-Root.
  Mon Mini-Howto ne cherche en aucun cas  remplacer ce travail, mais 
  l'amliorer grce  ma propre exprience.


  J'aimerais galement remercier Mark Kushinsky (marc026@ibm.net)
  d'avoir relu et corriger les fautes de ce Howto, le rendant ainsi bien
  plus lisible.



  22..  PPrrffaaccee


  Ce Mini-Howto  t crit dans le but d'aider les gens qui veulent
  utiliser le montage par NFS-Root pour crer l'arborecence de leurs
  clients. Vous pourrez ainsi remarquer qu'il y a de nombreuses faon
  d'accomplir cela selon vos besoins et vos intentions. Si les clients
  sont individuels, et qu'ils ont tous leurs propres utilisateurs et
  administrateurs, il serai ncessaire de ne pas partager avec d'autres
  clients une partie significative des rpertoires.  Dans le cas ou le
  client est destin  de multiples utilisateurs, et qu'ils sont tous
  administrs par la mme personne (par exemple les ordinateurs d'une
  cole), il faudrait partager le maximum de fichier afin de simplifier
  l'administration. Ce Howto, se concentre sur la deuxime possibilit.


  22..11..  PPrrsseennttaattiioonn GGnnrraallee


  Lorsque l'on construit le rpertoire racine d'un client, en essayant
  de nous limiter  la taille minimale, nous chercherons principalement
  quels fichiers nous pouvons partager ou monter  partir du serveur.
  Dans ce Howto, je recommendrai la configuration d'un client bas sur
  ma propre exprience.  Mais avant de commencer, veuillez remarquer que
  :

    Ce Mini-Howto n'explique pas comment effectuer le montage de
     partition par NFS-Root. Se rfrer au mini HOWTO NFS-Root si vous
     avez besoin de plus d'informations  ce sujet.

    J'ai bas la configuration de la plupart de mes clients sur les
     montages et les liens symboliques. Bon nombre de ces liens
     symboliques peuvent tre remplacs par des liens durs. Chacun
     choisira selon ses prfrences personnelles. Mettre un lien dur 
     travers un fichier mont a ses avantages, mais peut prter 
     confusion. Un fichier ne sera pas effac tant que tous ses liens
     durs ne seront pas effacs. Ainsi, pour prvenir les cas ou vous
     mettez  jour un certain fichier, et que les liens durs rfrencent
     toujours l'ancienne version, vous devez tre trs attentifs et
     garder une trace de tous les liens que vous mettez.

    Lorsque vous montez les informations  partir du serveur, il existe
     2 possibilits. La premire (la plus courante), est de monter la
     totalit du rpertoire racine du serveur dans un rpertoire local,
     et de simplement changer le chemin ou mettre des liens vers les
     rpertoires correspondant.  Personnellement, je n'aime pas monter
     la partition racine du serveur sur les clients. Ainsi, ce Howto
     suggre une faon de monter les rpertoires appropris du serveur
     aux endroits appropris du systme.

    Ce Howto est bas sur mon exprience  construire les rpertoires
     clients sur la distribution Slackware 3.1. Certaines choses peuvent
     tre diffrentes (en particulier les fichiers rc.*), pour d'autres
     utilisateurs, cependant les concepts restent les mmes.


  33..  CCrreerr llee rrppeerrttooiirree rraacciinnee dduu cclliieenntt



  33..11..  CCrraattiioonn ddee ll''aarrbboorreesscceennccee


  Tout d'abord, vous devez crer la structure des rpertoires elle-mme.
  J'ai cr tous mes clients dans le rpertoire /clients/hostname et je
  l'utilise pour tous les exemples suivants. Cela peut toutefois tre
  remplac par n'importe quoi d'autre. La premire tape, est donc de
  crer les rpertoires appropris sur la racine. Vous devez crer les
  rpertoires suivants :


       bin, dev, etc, home, lib, mnt, proc, sbin, serveur, tmp, usr, var




  et tous les autres rpertoires que vous souhaitez avoir sur votre
  systme.

  Les rpertoires locaux proc et dev doivent tre distincts pour chaque
  machine alors que le reste des rpertoires peut tre soit en partie
  soit compltement partag avec les autres clients.


  33..22..  CCrraattiioonn dd''uunn ssyyssttmmee ddee ffiicchhiieerr mmiinniimmaall ppoouurr llee bboooott



  33..22..11..  CCrreerr llee rrppeerrttooiirree ddeevv..


  Bien que le rpertoire dev puisse tre partag, il est prfrable d'en
  crer un diffrent pour chaque client. Vous pouvez crer le rpertoire
  dev de votre client avec le script MAKEDEV appropri, cependant dans
  la plupart des cas, il est plus simple de le recopier  partir du
  serveur :



       cp -a /dev /clients/hostname




  Vous devez garder  l'esprit que /dev/mouse, /dev/cdrom et /dev/modem
  sont des liens vers les priphriques courants, il faut donc s'assurer
  qu'ils sont correctement relis pour correspondre au matriel du
  client.


  33..22..22..  CCooppiieerr lleess eexxccuuttaabblleess iinnddiissppeennssaabblleess..

  Bien que nous montons tout  partir du serveur, il y a un minimum que
  vous devez recopier pour chaque client. Avant tout, vous avez besoin
  de "init", car votre systme ne sera pas capable de faire marcher quoi
  que ce soit avant de s'tre initialis (l'auteur l'a difficilement
  trouv ;-). Donc premirement, vous devez copier /sbin/init dans le
  rpertoire sbin de votre client ensuite, pour que le fichier rc.S
  puisse tre lanc, vous devez copier /bin/sh dans le rpertoire
  binaire de votre client.  Ensuite, de manire  monter tout ce dont
  vous avez besoin, vous devez copier /sbin/mount dans le rpertoire
  sbin de votre client. C'est le minimum,  partir du moment ou la
  premire ligne de votre rc.S _(_r_c_._s_y_s_i_n_i_t _p_o_u_r _u_n_e _d_i_s_t_r_i_b_u_t_i_o_n _r_e_d_h_a_t_)
  est mount -av.


  Cependant, je recommande de copier quelques autres fichiers : update,
  ls, rm, cp et umount comme cela, vous aurez les outils minimum au cas
  ou le client  des problmes de montage. Si vous choisissez d'utiliser
  votre swap avant de monter la racine, vous devez galement copier
  l'excutable swapon.

  Bien que la plupart de ces excutables ont eu une dition des liens
  dynamique, vous devez aussi copier une petite partie de /lib :


       cp -a /lib/ld.* /lib/libc.* /lib/libcurses.* /client/hostname/lib




  _N_._d_._T_. _: _s_u_r _c_e_r_t_a_i_n_e_s _d_i_s_t_r_i_b_u_t_i_o_n_s _(_e_n _p_a_r_t_i_c_u_l_i_e_r _R_e_d_H_a_t_) _c_e _s_o_n_t
  _l_e_s _f_i_c_h_i_e_r_s _/_l_i_b_/_l_i_b_t_e_r_m_c_a_p_* _q_u_'_i_l _f_a_u_t _r_e_c_o_p_i_e_r _ _l_a _p_l_a_c_e _d_e
  _/_l_i_b_/_l_i_b_c_u_r_s_e_s_._*  _s_e_l_o_n _l_a _f_a__o_n _d_o_n_t _s_o_n_t _c_o_m_p_i_l__s _l_e_s _e_x__c_u_t_a_b_l_e_s_.

  Mettre des liens durs vers les fichiers eux-mmes, au lieu de les
  copier, est une solution  considrer. Relisez mes commentaires  ce
  sujet dans la partie 2.1 de ce Howto.


  Veuillez remarquer que toutes les informations prcdentes supposent
  que le noyau ai obtenu tous les paramtres lors du boot. Si vous
  pensez utiliser rraarrpp ou bboooottpp, vous aurez probablement besoin des
  fichiers qui leurs correspondent.


  Gnralement, vous aurez besoin du minimum de fichiers qui vous
  permettent de configurer le rseau et d'excuter rc.S _(_o_u _r_c_._s_y_s_i_n_i_t
  _s_u_r _R_e_d_h_a_t_) jusqu'au moment ou est mont le reste du systme de
  fichier. Assurez-vous que vous avez vrifixie vos fichiers /etc/init
  et rc.S, vrifiez qu'il n'y a pas de "surprises" ou quoi que ce soit
  d'autre qui aurait besoin d'accder  d'autres fichiers, avant que le
  premier montage ait lieu.  Si vous le faites toutefois, retrouvez ces
  fichiers, vous pouvez soit les recopier galement, soit enlever les
  parties correspondantes de vos fichiers init ou rc.S.


  33..22..33..  LLee rrppeerrttooiirree vvaarr

  Le rpertoire var, dans la plupart des cas, doit tre spar pour
  chaque client. Cependant, bon nombre des donnes peuvent tres
  partages. Crez dans le rpertoire /serveur, un rpertoire appel
  var.  Nous recopierons le rpertoire var du serveur  cet endroit.
  Pour crer le rpertoire var local, tapez simplement :


       cp -a /var /clients/hostname




  Maintenant, vous pouvez choisir ce que vous voulez sparer, et ce que
  vous voulez partager. Pour tout rpertoire/fichier que vous voulez
  partager, enlevez-le simplement du rpertoire var du client, et mettez
  un lien symbolique vers le rpertoire /serveur/var. Cependant, vous
  remarquerez que vous pouvez mettre un lien symbolique vers
  /serveur/var ou vers ../serveur/var mais surtout PAS vers
  /clients/hostname/serveur/varpuisque cela ne marchera plus lorsque la
  racine aura chang.


  Gnralement, je recommande de sparer /var/run, /var/lock, /var/spool
  et /var/log.





  33..22..44..  LLee ccaass ddeess aauuttrreess rrppeerrttooiirreess


    etc est dtaill dans la section suivante.

    mnt et proc sont utiliss localement

    usr et home sont simplement des points de montage

    tmp est  votre bon choix. Vous pouvez crer un rpertoire
     diffrent pour chaque client, ou crer un rpertoire /clients/tmp,
     et le monter sur chaque client dans /tmp. Je recommande de fournir
     un rpertoire tmp pour chaque client


  33..33..  CCoonnssttrruuiirree llee rrppeerrttooiirree eettcc eett ccoonnffiigguurreerr llee cclliieenntt


  Remarque -  cette section traite de la faon de crer un rpertoire
  etc qui est principalement spar entre les clients. Si votre station
  diskless a des administrateurs systmes diffrents, il est prfrable
  de faire un rpertoire etc spar pour chaque client.


  33..33..11..  MMeettttrree uunn ggrraanndd rrppeerrttooiirree eettcc

  Bien que nous sparions les rpertoires etc des clients, nous
  souhaitons toujours partager une bonne partie des fichiers de cet
  endroit. D'une faon gnrale, je pense que partager les fichiers de
  etc avec le rpertoire /etc du serveur est une mauvaise ide, et c'est
  pourquoi je recommande de crer un rpertoire /clients/etc, qui
  contiendra les informations dont les clients ont besoin. Pour
  commencer, recopier simplement le contenu de /etc du serveur vers le
  rpertoire /client/etc.


  Vous devrez ajouter  ce rpertoire tous les fichiers de configuration
  qui ne dpendent pas de la machine, par exemple motd, issue, etc. mais
  aucun de ceux dpendant du client (i.e. inittab ou fstab)


  Les changements les plus importants doivent tre faits dans le
  rpertoire rc.d. Premirement, vous devez changer rc.inet1 pour qu'il
  corresponde  votre paramtrage local. Je passe tous mes paramtres
  rseau au noyau avec LILO/Loadlin, c'est pourquoi j'ai enlev presque
  tout de mon fichier rc.inet1. La seule chose que j'ai laiss, est le
  iiffccoonnffiigg et la rroouuttee vers l'entre localhost. Si vous utilisez rarp ou
  bootp, vous devez en tenir compte lors de la cration du fichier.


  Deuximement, vous devez diter le fichier rc.S. D'abord, enlever
  toutes les parties qui sont responsable d'une recherche d'erreur avec
  fsck, puisque fsck aura lieu alors que le serveur est dj dmarr.
  Ensuite, vous devez trouver la ligne ou est mont votre fstab. Cela
  doit ressembler  :


       mount -avt nonfs




  Le --tt nnoonnffss. est jusque l normal puisque les client lancent en
  premier rc.S et seulement aprs rc.inet1 pour configurer l'Ethernet.
  Mais comme cette ligne ne va pas monter les partitions NFS, elle doit
  tre dtruite.  Il faut ensuite la remplacer par un mount -av . Si
  vous avez besoin d'utiliser rarp/bootp pour configurer votre rseau,
  faites le dans rc.S (ou appelez le script appropri dans rc.S), avant
  de monter, et assurez vous que les rpertoires bin et sbin contiennent
  les fichiers ncessaires.


  Aprs que le mount -av ait t accompli, vous devez avoir un systme
  de fichier oprationnel. Crez un fstab gnrique, que vous pourrez
  recopier sur chaque client.

  Votre fstab doit ressembler  :


       serveur:/clients/hostname    /               nfs     default  1 1
       serveur:/bin                 /bin            nfs     default  1 1
       serveur:/usr                 /usr            nfs     default  1 1
       serveur:/sbin                /sbin           nfs     default  1 1
       serveur:/home                /home           nfs     default  1 1
       serveur:/lib                 /lib            nfs     default  1 1
       serveur:/clients/etc         /serveur/etc    nfs     default  1 1
       serveur:/clients/var         /serveur/var    nfs     default  1 1
       none                         /proc           proc    default  1 1




  Veuillez remarquer, que le mot cl _default_ ne doit pas fonctionner
  avec toutes les versions de mount. Vous devrez alors le changer en
  _rw_ ou _ro_ ou enlever toute la partie _default 1 1_ .


  Assurez vous galement que sur votre serveur le /etc/exports ressemble
   :


       /clients/hostname   hostname.domainname(rw,no_root_squash)
       /clients/etc        hostname.domainname(ro,no_root_squash)
       /clients/var        hostname.domainname(ro,no_root_squash)
       /usr                hostname.domainname(ro,no_root_squash)
       /sbin               hostname.domainname(ro,no_root_squash)
       /bin                hostname.domainname(ro,no_root_squash)
       /lib                hostname.domainname(ro,no_root_squash)
       /home               hostname.domainname(rw,no_root_squash)




  Mise  part la premire ligne qui doit tre diffrente pour chaque
  client, les autres lignes peuvent tre remplaces par un masque pour
  s'appliquer  tout vos clients (comme pc*.domain - gardez  l'esprit,
  que * se substitue uniquement aux chanes de caractres ne contenant
  pas de point). Je propose de mettre la majorit des rpertoires en
  lecture seule _r_o, mais c'est  vous de choisir. Le no_root_squash
  assure que le super-utilisateur aura sur les clients les permissions
  correspondantes avec nfsd. Jetez un coup d'oeil au man exports(5). Si
  vous souhaitez que vos utilisateurs puissent utiliser ppaasssswwdd galement
   partir des clients, assurez-vous que /etc ai les permissions rw et
  non ro. Toutefois faites comme vous le souhaitez.


  Vouz remarquerez aussi, en ce qui concerne le fichier rc.S que sur la
  Slackware, par dfaut, un fichier /etc/issue et /etc/motd sont crs 
  chaque excution. Cette fonction DOIT tre dsactive si ces fichiers
  sont monts en ro  partir du serveur, je recommande de les dsactiver
  dans tous les cas.

  Pour terminer, si vous voulez avoir une base d'utilisateurs commune 
  votre serveur et vos clients, vous pouvez choisir entre 1), utiliser
  NIS (lire le NIS-Howto), et ainsi, chaque client aura un /etc/passwd
  et /etc/group spar puisqu'il les recevra du serveur. 2) Dans la
  plupart des cas, un lien symbolique suffira. Pour cela, vous pourrez
  soit mettre un lien dur de /client/etc/passwd vers /etc/passwd, ou si
  vous prfrez un lien symbolique, reliant /etc/passwd vers
  /client/etc/passwd (et pas dans l'autre sens puisque le client ne
  monte pas le rpertoire etc du serveur). Faire de mme avec /etc/group


  33..33..22..  CCrreerr llee rrppeerrttooiirree eettcc dduu cclliieenntt


  Gnralement, la plupart des fichiers du rpertoire etc du client
  doivent avoir des liens symboliques vers /serveur/etc. Toutefois,
  certains fichiers sont diffrents pour chaque machine, et certains
  doivent tre l lorsque le noyau est charg.  Le minimum dont vous
  avez besoin dans le rpertoire etc est :


       resolv.conf
       hosts
       inittab
       rc.d/rc.S
       fstab




  Puisque ces 5 fichiers peuvent tres identiques sur les clients, vous
  pouvez simplement les recopier ou mettre des liens durs. Cependant, il
  est judicieux de garder les fichiers fstab et rc.S diffrents pour
  chaque client. Vous devez galement sparer etc/HOSTAME pour chaque
  client. Personnellement, je recommande d'avoir les fichiers de rc.d
  distincts pour chaque client puisque la configuration et le matriel
  peuvent varier d'une machine  l'autre.


  Pour chaque client, ajouter dans la fstab la ligne swap approprie :


       /dev/swap_partition                             swap     swap   default 1 1




  Pour le reste des fichiers de /etc du client, vous pouvez soit mettre
  des liens durs vers /clients/etc/* , ou mettre des liens symboliques
  vers /serveur/etc (qui est l'endroit o est mont /clients/etc).


  Assurez-vous que votre machine peut rsoudre correctement, soit par
  nnaammeedd ou grce  eettcc//hhoossttss. Ce n'est pas une mauvaise ide de garder
  l'adresse IP du serveur dans /etc/hosts, plutt que de compter sur la
  rsolution. Si vous comptez uniquement sur la rsolution de noms, un
  problme avec named empchera vos clients de booter.


  33..44..  BBooootteerr llaa mmaacchhiinnee


  Maintenant que vous avez fait tout ce qu'il faut pour dmarrer votre
  machine, croisez vos doigts et priez pour que tout marche comme il
  faut :-)

  44..  CCrreerr dd''aauuttrreess cclliieennttss

  Si vous avez suivi mes instructions jusqu'ici, cela devrait tre
  facile - changer de rpertoire vers /clients et tapez :


       cp -a hostname1 hostname2




  et vrifiez bien les points suivants :

       Les fichiers rc.d/* correspondent au matriel et la configu
       ration logicielle eettcc//HHOOSSTTNNAAMMEE est correcte, la ligne de
       swap de fstab est correcte, les liens symboliques dev/mouse,
       dev/modem et /dev/cdrom sont corrects.







  Bonne Chance...









































  News Leafsite mini-HOWTO
  Florian Kuehnert, sutok@gmx.de

  v0.3, 4 January 1998

  Version franaise par Philippe Gaucher (gaucher@easynet.fr). Ce HOWTO
  vous aidera  mettre en place un petit site de news  l'aide du logi
  ciel libre Leafnode.  Pour toute question, suggestion ou tout commen
  taire, crire  Florian Kuehnert (sutok@gmx.de).  Vous pouvez aussi me
  signaler tous les problmes que vous trouvez dans ce document.  (C)
  1998 by Florian Kuehnert.


  11..  PPoouurrqquuooii uuttiilliisseerr LLeeaaffnnooddee ??

  Si vous voulez lire les news hors connexion sur votre ordinateur
  local, vous avez gnralement  installer un logiciel de serveur de
  news comme INN ou CNews. Et vous avez galement besoin d'une connexion
  nntp ou uucp pour alimenter ce serveur. Du fait que ces logiciels
  contiennent bien plus de fonctionnalits que ncessaire, les choses
  iront mieux en installant Leafnode.

  Leafnode est vraiment plus simple  utiliser et est aussi trs petit,
  mais il a quelques inconvnients : Leafnode est lent et il perd des
  messages ds qu'un problme se prsente. C'est pourquoi vous ne
  devriez pas l'utiliser pour un gros serveur de news. Il est quand mme
  appropri pour des utilisateurs privs qui ne veulent pas passer trop
  de temps  configurer INN.

  22..  OO ttrroouuvveerr LLeeaaffnnooddee ??

  Leanode est disponible  ftp://ftp.troll.no/pub/freebies/ et a t
  dvelopp par un employ de Troll Tech AS, Arnt Gulbrandsen. La
  version la plus rcente est 1.4 et dans certaines distributions (comme
  par exemple la Debian), Leafnode est inclus. Quoi qu'il en soit,
  vrifiez que vous avez au moins la version 1.4 car des bugs assez
  graves avaient t corrigs.

  33..  CCoommmmeenntt ll''iinnssttaalllleerr ??

  Un fichier d'aide  l'installation est inclus dans le package. Mais
  faisons-la ensemble :-). Si une version suprieure ou gale  1.4 de
  Leafnode est fournie avec votre distribution, il serait plus sage
  d'utiliser les binaires prcompils et de sauter les tapes 1  4.

  1) Vrifiez qu'il n'y a pas d'autre serveur de news qui tourne sur
  votre machine. Quand vous tapez


  $ telnet localhost nntp




  vous devez voir un message d'erreur. Si vous obtenez une connexion,
  retournez au prompt de votre shell, puis dsinstallez INN, CNews ou
  tout logiciel du mme type et commentez la ligne nntp dans
  /etc/inetd.conf.

  2) Vrifiez qu'il y a un utilisateur appel "news" :  regarder dans
  /etc/password.  S'il n'existe pas, crez-en un ou bien tapez


  $ adduser news


  ou bien utilisez tout outil fourni avec votre distribution.

  3) Dcompressez la source :


  $ tar xfz leafnode-1.4.tar.gz




  et placez-vous dans le rpertoire source


  $ cd leafnode-1.4




  4) Compilez le programme et installez-le :


  $ make; make install




  5) ditez /usr/lib/leafnode/config (il peut tre  une autre place
  comme par exemple /etc/leafnode quand vous utilisez une version
  pr-compile fournie avec votre distribution Linux). La ligne
  "server=" doit indiquer le serveur de news de votre FAI.

  6) ditez /etc/nntpserver. Il doit contenir le nom d'hte local
  (localhost ou tout nom donn  votre ordinateur ; la commande hostname
  devrait vous aider pour cela). Si dans un des fichiers de dmarrage
  comme /etc/profile ou ~/.bash_profile, la variable d'environnement
  correspondante est dfinie, vous devriez l'ajuster galement au nom de
  votre ordinateur.

  7) ditez le fichier /etc/inetd.conf : soyez certain qu'il n'y a pas
  de ligne commenant par "nntp". S'il y avait une telle ligne,
  commentez-la en mettant un "#" au dbut. Puis ajoutez la ligne
  suivante :


  nntp stream tcp nowait news /usr/sbin/tcpd /usr/local/sbin/leafnode




  Quand quelqu'un (par exemple vous :-)) se connecte  votre ordinateur
  par le port NNTP, Leafnode est lanc comme processus serveur.

  8) Connectez-vous  votre FAI et lancez le programme "fetch" comme
  utilisateur root ou news. La premire fois que fetch est lanc, il
  tlchargera une liste des groupes de nouvelles disponibles chez votre
  FAI. Cela peut prendre un certain temps ; a dpend de la vitesse de
  votre connexion et du nombre de groupes de nouvelles que votre FAI a
  dans son fichier "active" [NdT : c'est le nom du fichier].

  9) Dmarrez votre lecteur de news prfr (slrn, (r)tin et knews ne
  sont pas de mauvais points de dpart) et inscrivez-vous  tous les
  groupes de nouvelles que vous lisez. Veillez  ne pas seulement vous
  inscrire  ces groupes de nouvelles, mais aussi  entrer dedans, mme
  s'ils sont vides.


  10) Relancez "fetch" encore une fois pour tlcharger tous les
  articles de tous les groupes de nouvelles qui vous intressent.

  44..  CCoommmmeenntt mmaaiinntteenniirr lleeaaffnnooddee ??

  Maintenant vous avez obtenu un serveur de news fonctionnel et qui
  tourne mais vous avez encore quelques petites choses  faire. Vous
  pouvez diter le fichier /usr/lib/leafnode/config pour configurer les
  dates d'expiration de vos groupes de nouvelles. Ce nombre indique
  quand les vieux messages doivent tre effacs.  Le temps standard de
  20 jours est bien souvent trop long si vous lisez des groupes avec un
  trafic consquent ; 4 jours ou une semaine sont dans la plupart des
  cas un bon rglage pour votre systme. Vous pouvez changer la valeur
  pour tous les groupes ("expire=n" pour mettre tous les groupes  n
  jours), et vous pouvez dire  Leafnode de changer la date pour un
  groupe particulier en crivant groupexpire foo.bar n pour rgler le
  dlai d'expiration du groupe foo.bar  n jours.

  Ce rglage seul ne fera pas supprimer les messages par Leafnode. Un
  programme spar s'en charge : texpire. Il peut tre lanc par cron ou
  en ligne de commande.  Si votre ordinateur est allum en permanence,
  vous avez la possibilit d'ajouter la ligne suivante au fichier
  crontab de news (pour l'diter, en tant qu'utilisateur news tapez
  "crontab -e", ou bien tapez sous root "crontab -u news -e") :


  0 19 * * * /usr/local/sbin/texpire




  Cette ligne a pour consquence que le daemon cron dclenchera texpire
  chaque jour  19:00. Reportez-vous  la page man de crontab pour
  d'autres rglages.  Si votre ordinateur n'est pas constamment allum,
  vous avez la possibilit de dmarrer texpire de temps en temps
  manuellement, quand vous remarquez que fetch devient plus lent. Cela
  fonctionne aussi bien que le lancement par cron.

  55..  CCoommmmeenntt aa mmaarrcchhee ??

  Leafnode est un "vrai" serveur NNTP, ce qui signifie que vous pouvez
  galement vous y connecter  partir d'un autre ordinateur (via
  Internet ou un rseau local, etc.).  chaque fois que vous entrez dans
  un groupe de nouvelles avec votre lecteur de news, votre lecteur
  envoie l'information  Leafnode et lui demande. Si le groupe n'existe
  pas, Leafnode cre un fichier vide nomm comme le groupe dans
  /var/spool/news/interesting.groups. Quand vous actionnez fetch la fois
  suivante, les messages du groupe sont tlchargs. Si un groupe n'a
  pas t lu depuis un certain temps, Leafnode arrtera de le
  tlcharger et supprimera son nom dans
  /var/spool/news/interesting.groups.  Si vous vous abonnez  un groupe
   fort trafic par accident, vous avez aussi la possibilit de
  supprimer ce fichier manuellement pour que vous n'ayez pas 
  tlcharger tous ses articles pour toute la semaine suivante.

  Une semaine n'est pas assez pour vous ? Vous voulez partir en vacances
  et continuer  recevoir les news ? Malheureusement il n'y a pas
  d'options dans Leafnode pour changer cela. Mais vous pouvez diter le
  fichier leafnode.h et tout recompiler. Les constantes #defined sont
  TIMEOUT_LONG et TIMEOUT_SHORT : augmentez juste le temps d'une
  seconde. Une autre solution, plus simple, est de dfinir une tche
  cron chaque nuit qui fait "touch
  /var/spool/news/interesting.groups/*".



  Si vous voulez obtenir une liste de tous les groupes de nouvelles
  disponibles sur le serveur de news qui vous alimente (par exemple
  quand vous voulez lire un nouveau groupe), il suffit de supprimer le
  fichier /var/spool/news/active.read.  La commande fetch le recrera la
  fois suivante et tlchargera  nouveau la liste des groupes. Fetch
  relira galement la liste des groupes de temps en temps donc a priori
  vous n'avez pas  le faire manuellement.

  66..  QQuueell lleecctteeuurr ddee nneewwss ddeevvrraaiiss--jjee uuttiilliisseerr ??

  Il n'y a pas "un" lecteur de news ddi  Linux, de la mme faon
  qu'il n'y a pas "un" diteur. Mon lecteur de news prfr est emacs en
  mode gnus qui est le lecteur le plus configurable de Linux. Beaucoup
  de gens utilisent slrn et tin en terminal, beaucoup de gens utilisent
  knews sous X. Il y a aussi trn, nn et encore beaucoup d'autres, si
  bien que vous pouvez essayer celui que vous voulez. Le seul lecteur
  que vous ne devriez pas utiliser est Netscape : il est gros, sans
  fonctionnalit, et de temps en temps, il cre des problmes dans les
  news. Cela dit, c'est  vous de dcider.

  N'importe comment, knews n'est pas une mauvaise ide pour une premire
  exprience car il est trs agrable  utiliser et facile  comprendre.

  77..  OO ttrroouuvveerr pplluuss dd''iinnffoorrmmaattiioonnss ??

  De la documentation est fournie dans le package Leafnode (lisez les
  fichiers INSTALL et README, les sources sont galement trs
  intressantes). Si vous voulez en savoir plus sur les "gros" serveurs
  de news plus "professionnels", lisez la FAQ de INN (elle est fournie
  dans le package INN). Pour avoir plus d'informations sur votre lecteur
  de nouvelles, tapez "man le_nom_de_votre_lecteur" ou regardez ce que
  vous pouvez trouver dans /usr/doc.

  Si vous avez des questions concernant le systme de news, demandez
  dans un groupe de nouvelles appropri (regardez dans la hirarchie
  news.software.ALL). [NdT : en France, essayez le forum modr
  fr.usenet.logiciels].  ## fr.* n'est en aucun cas une ## hirarchie
  *_franaise_*, ni ## localise sur le territoire ## franais.

  Pour toute question, correction ou tout commentaire concernant ce
  HOWTO, crivez-moi (sutok@gmx.de).

  88..  RReemmeerrcciieemmeennttss

  J'aimerais remercier Michael Schulz (michaels@home.on-luebeck.de) pour
  son aide concernant les problmes de langage et Cornelius Krasel
  (krasel@wpxx02.toxi.uni-wuerzburg.de) pour ses remarques finales.



















  un compte) Mthode de messagerie off-line pour Linux
  (Adresses e-mail off-line avec
  Gunther Voet, freaker@tuc.ml.org - Belgium (CompuMed/TuCSRV)
  Traduction par Thierry Le Quau ThierryLeQueau@wanadoo.fr
  v1.3.2, 7 Fvrier 1998

  Utilisez votre systme de messagerie Linux hors connexion, recevez du
  courrier pour plusieurs utilisateurs avec seulement une adresse e-
  mail, et sans tre connect 24/24.  Si vous n'avez pas les moyens de
  payer une ligne directe pour tre connect 24/24 et voulez quand mme
  que vos utilisateurs recoivent leur courrier dans leur bote  lettre
  Linux; au lieu de payer un service de diffusion multi-utilisateur 
  votre fournisseur d'accs, vous pouvez utiliser ce systme pour redis
  tribuer aux diffrents comptes utilisateur le courrier en utilisant
  une seule adresse e-mail. Vous pouvez y avoir accs 24/24 depuis le
  serveur o vous avez votre compte pour recevoir votre courrier.  ``Ce
  howto est Copyright (c)1997-98 par Gunther Voet.''
  ______________________________________________________________________

  Table des matires














































  1. Prface.

     1.1 D'un point de vue lgal.
     1.2 Copyrights
     1.3 Ractions.
     1.4 Distribution.
     1.5 Corrections.
     1.6 Qu'est-ce que j'utilise ?
     1.7 Remerciements  ...

  2. Preliminaires.

     2.1 Prface & Description
     2.2 L'intrt d'une telle chose ...
     2.3 Les choses  connatre.
     2.4 Il y a deux voies diffrentes...

  3. Vos besoins.

     3.1 Une machine sous Linux
     3.2 Un compte supplmentaire sur votre machine sous Linux.
     3.3 Fetchmail
     3.4 Procmail
     3.5 Un compte e-mail.
        3.5.1 Un enregistrement DNS (MX).
        3.5.2 Faire suivre le courrier de compte  compte :)

  4. Bon, j'ai tout ce qu'il me faut, et maintenant ?

     4.1 Cration du fichier .fetchmailrc
     4.2 Cration du fichier .procmailrc
        4.2.1 Pour la distribution par le destinataire (m(A)):
        4.2.2 Pour la distribution avec comme "sujet: touser" (m(B))
     4.3 Il n'y a pas d'abonn ... (fichier nosuchuser)
     4.4 Fichier "crontab".
        4.4.1 Vrification du courrier
        4.4.2 crontab
     4.5 Chez votre fournisseur d'accs.
        4.5.1 (Ancienne version de sendmail) ajoutez les lignes suivantes au fichier sendmail.cf
        4.5.2 (Nouvelle version de sendmail) Ajoutez ces lignes au fichier sendmail.cf
        4.5.3 (Nouvelle version de sendmail) Editez le fichier /etc/sendmail.cw
        4.5.4 Crez un fichier /etc/maildomains file
        4.5.5 Au travail !

  5. Automatisation

     5.1 La structure.
        5.1.1 Le fichier de pre-routine ".procmailrc-header"
        5.1.2 Le fichier de post-routine ".procmailrc-footer"
     5.2 Script d'ajout de bote  lettre

  6. A l'aide ! (Sic)

     6.1 Le script d'automatisation ne fonctionne pas:
     6.2 Qu'est-ce que vous entendez par serveur de mail anonyme ?
     6.3 Mon chat est mort
     6.4 Mon chien est mort
     6.5 Linux?
     6.6 Pouvez vous m'aider  trouver un compte ?
     6.7 Pourquoi avoir enlev " peut-tre que plus tard je rajouterais quelques commentaires ..." ?
     6.8 Comment puis-je obtenir un "domaine" ?
     6.9 Pourquoi tes-vous un enc... en utilisant cette mthode ?
     6.10 Le fichier "nosuchuserfile" ?
     6.11 Est-ce que mes utilisateurs peuvent crire et envoyer du courrier ?
     6.12 Est-ce que chaque utilisateur a besoin d'un compte shell sur mon serveur ?
     6.13 sans objet
     6.14 l'ajout de courrier ?
     6.15 Pourquoi tes-vous si cruel ?
     6.16 Avez vous eu des plaintes  propos de langage excessif ?
     6.17 Pourquoi ce HowTo est-il si diffrent des autres ?
     6.18 Localement mon domaine fonctionne, mais semble rien recevoir de l'extrieur.
     6.19 Mon chien est mort

  7. The End



  ______________________________________________________________________

  11..  PPrrffaaccee..

  Dans ce chapitre je veux juste me mettre  l'abri de tous dommages et
  de retour de flamme - mme si je peux avoir tort ...Si vous avez des
  questions ou suggestions  rajouter aux FAQ ainsi que les erreurs que
  vous pourriez trouver, voir la section concerne plus loin ...

  Nota : tous les noms et types de fichier sont repertoris ainsi :


       (*** < file > *** text ***)     .procmailrc


  Il s'agit donc d'un fichier .procmailrc contenant du texte. La
  variable texte peut aussi tre code. Cela pour dfinir le nom du
  fichier  utiliser.  S'il n'y a pas de chemin, vous pouvez le choisir
   votre convenance (dans la plupart des cas ces fichiers rsident dans
  le rpertoire de l'utilisateur comme /home/mailer).


  11..11..  DD''uunn ppooiinntt ddee vvuuee llggaall..

  Ni l'auteur, ni les distributeurs de ce HowTo ne peuvent tre tenu en
  aucun cas pour responsable des dommages physiques, financiers ou
  moraux qui pourraient rsulter de l'application des suggestions ou
  exemples de ce texte.  L' information contenue dans ce document est la
  quintescence de mon savoir et de mon exprience, mais je peux encore
  faire des erreurs dans les informations ou les exemples. Chaque marque
  commerciale est la proprit de son dtenteur respectif (je ne veux
  pas faire de commerce ici - mais, bon - SI je veux rajouter quelque
  chose, je n'aurais pas besoin de modifier cette dclaration). Si votre
  chat meurt sous la charge de ce document, je n'en suis pas plus
  responsable ...


  11..22..  CCooppyyrriigghhttss

  Ce document et son contenu sont copyright (c)1997-98 de Gunther Voet.
  Toute reproduction non autorise sous toute forme que ce soit est
  explicitement autorise et mme chaudement encourage tant que vous
  n'en changez pas le contenu sans contacter l'auteur (Gunther Voet). Si
  vous utilisez ce document en entier ou en partie, vous devez y inclure
  une allusion au copyright ou un lien vers le HowTo complet." Les
  droits de copie des documents Howto sont rgits par leurs auteurs
  respectifs. Le "HowTo Copyright" donnera les directives de copie pour
  ce document. S'il est utilis dans un but commercial, l'auteur doit en
  tre averti. Les exceptions  ce copyright doivent tre demand 
  l'auteur par lettre ou par e-mail. Pour plus d'information sur le
  standard de diffusion des HowTo contacter gregh@sunsite.unc.edu.

  *SVP* *SI* vous voulez crer un systme bas sur ce HowTo, pensez 
  mon copyright :) heh... - je ne suis pas mchant :)).  Bien sr en
  tant qu'addon - PAS pour le programme de mail lui-mme - bien que ce
  soit agrable d'y tre inclus :))Je peux toujours avoir une adresse
  supplmentaire pour tre encore plus critiqu :)) (je plaisante).


  11..33..  RRaaccttiioonnss..

  J'espre que ce HowTo vous sera utile ainsi qu' tous ceux qui le
  voudront.  Si vous avez des suggestions, commentaires ou corrections (
  excepts les injures  :) ) - svp expdiez les moi  freaker@tuc.ml.org
  et j'en ferai la mise  jour pour la prochane version. Si vous
  publiez ce document dans un but commercial, une copie supplmentaire
  sera apprcie - vous pouvez me l'envoyer  mon adresse postale. Pour
  les critiques - vous pouvez me les expdier, mais elle finirons dans
  le rpertoire /dev/null ...  aussi - ce n'est pas la peine encombrer
  la bande passante avec ! En plus je peux empcher certains
  utilisateurs de recevoir des e-mail (expliqu dans ce document) (evil
  grin). Mon surnom est "freaker btw" :) ). Vous pouvez toujours essayer
  freaker@ibm.net.


  11..44..  DDiissttrriibbuuttiioonn..

  La dernire version de ce document peut tre tlcharge  l'adresse:

  http://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Offline-Mailing

  -et-

  http://tuc.ml.org/om/

  (essayez aussi  : http://tuc.ml.org)



  11..55..  CCoorrrreeccttiioonnss..


   v1.0.0        - Premire version, test interne, nous l'avons essay avant de
                   vous le donner :) ..  depuis il devient oprationnel et a
                   besoin de travailler ? vrai ? :)
   v1.1.0        - Corrections de nombreuses erreurs dans le texte, ajout de
                   nouveaux chapitres
                 - Corrections de quelques petites erreurs et typographie ...
   v1.2.0        - Corrections d'erreurs grammaticales
                 - Addon du chapitre "Qu'est-ce que nous utilisons ? "
                 - Addon de l'adresse de Sunsite
   v1.3.0        - Addon du support courrier virtuel pour l'administrateur
                 - Nouveau site et adresse e-mail
                 - Remerciements  ..
   v1.3.1        - Conversion au format sgml et corrections d'erreurs mineures
   v1.3.2        - Corrections d'erreurs majeures ( nom de fichier .fetchmailrc
                   vers .procmailrc) etc. (merci  Tetsu Isaji)
                 - Addon douveau support pour "Sendmail" v 8.8.0+
                 - Corrections d'erreurs mineures
                 - Mise  jour de mon systme YAY !
                 - La version japonaise arrivera bientt, je vous signalerais
                    son emplacement ds que je le connatrai ...
                    (merci  Tetsu Isaji)




  11..66..  QQuu''eesstt--ccee qquuee jj''uuttiilliissee ??

  J'utilise Linux 2.0.30, un Pentium 166, carte ATI pci-mach64, Metro-X
  et une connexion internet par mon fournisseur d'accs (actuellement
  ibmnet) via ppp en utilisant un modem ZyXEL 28 800 bauds, et de temps
  en temps un Bausch 28 800.

  Maintenant j'ai mis  jour mon noyau  la version 2.0.33, install un
  modem USRobotics, il fonctionne encore comme il le devrais :) (tout le
  monde devrait mettre  jour leur version Linux ds qu'il sort un patch
  :) croyez moi:) a vous pargnera beaucoup de temps et de recherche
  d'erreur en le faisant :).


  11..77..  RReemmeerrcciieemmeennttss  ......


    Fred, durban.hebel.net (pour autoriser les pages & bot)

    Lifesaver, parkside.net ( pour la validation des nouvelles pages,
     aide pour la foire aux questions de la messagerie, depuis a marche
     ici et l ... faites une visite  son ciber-caf ... leur caf est
     super bon :) )

    L'administrateur systme de lodus.net pour la maintenance de ce
     projet.


  22..  PPrreelliimmiinnaaiirreess..

  Bon, comment fonctionne ce systme? Qu'est-ce que vous pouvez faire
  avec ?  Quoi d'autres ? Et ai-je besoin de le lire ? A toutes ces
  questions - j'ai une rponse.



  22..11..  PPrrffaaccee && DDeessccrriippttiioonn

  Ce HowTo est ddi  tous les utilisateurs de mailing offline sous
  Linux...  Vous tes un groupe, ou une organisation, et vous voulez que
  tous vos membres aient une adresse e-mail, sans pour autant payer pour
  un accs direct 24/24 ou un compte pour chaque utilisateur.... Ou vous
  avez un rseau interne - avec un serveur camoufl et vous voulez  que
  tous les utilisateurs aient une adresse e-mail, vous pouvez utiliser
  cette mthode pour le faire. Personnellement je l'utilise pour fournir
  aux utilisateurs et membres de mon groupe de dmo un compte e-mail
  sans tre 24/24 connect, puisque c'est  but non lucratif - et nous
  n'avons pas beaucoup d'argent pour nous payer un ligne directe avec un
  accs e-mail permanent - et diffrentes adresses IP.  Tous ont une
  adresse e-mail, mme s'ils n'ont pas accs  internet. Le seul  avoir
  un accs internet peut recevoir leur courrier  leur adresse
  personnelle - via le systme dcrit ci-dessous.  Vos utilisateurs
  peuvent expdier leur courrier comme ils ont l'habitude de le faire,
  et votre systme grera les diffrentes boites aux lettres. La seule
  chose qui change pour les utilsateurs est l'ajout de leur adresse e-
  mail dans l a ligne du sujet ou de l'entte suivant la mthode
  choisie.


  22..22..  LL''iinnttrrtt dd''uunnee tteellllee cchhoossee ......


    Permettre de contacter tous les membres d'une organisation par
     adresse e-mail si ncessaire.

    Un service de mail anonyme - ils ne peuvent lire votre "mail setup
     file" - aussi ils ne peuvent savoir o le courrier est retransmis
     ou suivi.


    Un club qui n'a pas assez de sou (ne riez pas), ou qui est gratuit,
     et ne veut pas dpenser de l'argent pour a (eh eh) - et qui veut
     quand mme fournir une adresse e-mail  chacun de ses membres.

    Un rseau camoufl - avec un serveur connect sur le net, dont les
     utilisateurs ont besoin d'avoir compte e-mail.

    Vous voulez retransmettre certains documents automatiquement -
     comme je le fais avec mon HowTo, statistiques, ou documents ...
     comme "info@yourmail.dom" ou "document@yourmail.dom".

    Vous avez seulement besoin d' un compte chez votre fournisseur
     d'accs, pour les +200 comptes e-mail que vous pouvez crer sur
     votre serveur.

    J'utilise la mthode B avec plus de 300 comptes e-mail avec un
     serveur perso  base de 486DX4-100 et le tout fonctionne en une
     minute.


  22..33..  LLeess cchhoosseess  ccoonnnnaattrree..


    Tous les serveurs de mail (gratuit ou non) ne sont pas contents
     quand vous faites leur boulot chez vous, ou mettez en place un
     serveur anonyme, aussi SVP essayez de contacter votre
     administrateur rseau avant de le faire.

    C'est un moyen moins rapide qu'une connection on-line 24/24 puisque
     vous devez vous connecter pour distribuer le courrier.

    Cette mthode  besoin d'un administrateur pour grer la
     distribution du courrier et ajouter des utilisateurs ... a vous
     donnera un peu de boulot ce n'est pas automatique ! (je l'ai rendu
     semi-automatique sur mon serveur vous pouvez essayer de faire de
     mme).

    Une bonne bande passante et un espace virtuel consquent chez votre
     fournisseur d'accs est indispensable quand vous avez plusieurs
     utilisateurs ... et soyez sr d'y avoir assez de place quand vous
     expdiez les fichiers.

    Tout le courrier sera transfr en une seule fois - aussi - le
     dernier message que vous recevrez sur votre serveur sera aussi le
     dernier que vous aurez expdier. "Premier entr -  premier sorti".

    Dans la premire mthode (to : ) il n'y a pas de problme avec les
     noms des diffrents utilisateurs - mais dans la seconde mthode -
     vous ne pouvez pas donner de sujet puisqu'il sera utilis pour la
     dlivrance  son destinataire. Beaucoup d'utilisateurs oublient
     d'utiliser le sujet du message... - ou ils ont besoin de le savoir
     clairement.

    Si vous vrifiez souvent votre messagerie sur le serveur, (par
     exemple 4 fois par jour) - le courrier sera distribu  son
     destinataire au moins toutes les 6 heures. Aussi le traitement
     devient presque rgulier.

    Vous POUVEZ l'utiliser galement lorsque vous avez un accs
     permanent :) et lui faire vrifier le courrier toutes les XX
     minutes. Mais  - quand vous tes connect - pourquoi utiliser un
     autre serveur ? et pourquoi ne pas avoir alors votre propre
     domaine ? (fric).



  22..44..  IIll yy aa ddeeuuxx vvooiieess ddiiffffrreenntteess......


  1. methode 'A' - que nous appellerons "(m(A))".

     Le systme de courrier vrifie le destinataire du message d'aprs
     le "to:".  C'est la meilleure mthode puisque c'est l'adresse e-
     mail relle . Vous avez besoin d'un autre compte sur un serveur ET
     avez besoin'une entre DNS (MX) (votre propre domaine en
     l'occurrence). Si l'administrateur systme veux bien vous aider,
     alors il n'y aura aucun problme ! Il redirigera TOUS les messages
     envoys au nom de votre domaine sur votre compte ! Cela lui prendra
     du temps pour le faire :) aussi soyez sympa avec lui :)) Merci 
     mon administrateur systme (Fred) j'ai  obtenu un nom de domaine et
     le service utilisateur pour mon groupe de dmo. Il se peut qu'une
     entre DNS vous cote quelque chose,aussi vous aurez  voir si a
     vous convient ou non.

  2. methode 'B' - que nous appellerons "(m(B))".

     Le programme va voir la ligne du sujet, et transfre le courrier
     vers l'utilisateur concern. Si l'utilisateur n'est pas trouv, il
     renverra un message. Cela demande un serveur POP avec un seul
     compte, et vous n'avez pas besoin de votre propre entre DNS ou
     vous n'avez pas besoin d'tre gentil avec votre administrateur
     systme pour qu'il vous arrange votre adresse e-mail :). J'ai
     utilis cette mthode la premire fois pendant prs d'un an... je
     sais que c'est un peu truander, mais je ne vous ai pas dit que vous
     deviez utiliser cette mthode, aussi ne me tirez pas dessus -
     alors que je suis juste en train de vous fournir des solutions pour
     vos problmes de messagerie :) - vous pouvez utiliser la mthode A
     qui est elle rglo !


  33..  VVooss bbeessooiinnss..

  Bon, vous avez besoin (bien sr) d'une bcane sous Linux, qui peut se
  connecter  internet - Ok ! (que je suis bon - que je suis bon ! :)) -
  vous avez probablement un modem, pas vrai ? Une ligne tlphonique -
  ou n'importe quel moyen de vous connecter  votre fournisseur d'accs.
  Vous avez besoin aussi de quelque software comme Fetchmail, Procmail,
  un compte supplmentaire, et votre compte e-mail ou d'une entre  DNS
  avec un compte e-mail.


  33..11..  UUnnee mmaacchhiinnee ssoouuss LLiinnuuxx

  Ca peut-tre n'importe quelle bcane... mme un 8086... - mais il est
  prfrable -  puisqu'il y aura quelques chargements  effectuer -  de
  possder au moins un 386 :) plus votre babasse ira vite, plus votre
  logiciel sera rapide (pas vrai ?) :).


  33..22..  UUnn ccoommppttee ssuuppppllmmeennttaaiirree ssuurr vvoottrree mmaacchhiinnee ssoouuss LLiinnuuxx..

  Vous avez besoin de crer un compte supplmentaire sur votre systme.
  J'utilise pour mon exemple  mailservice . Cpeut tre aussi bien
  "mailserver" ou "mailtousers" - bref un nom que vous reconnaitrez !

  ! Vous n'avez pas besoin d'tre logu root !

  Ce compte vous servira  attribuer tous les messages aux diffrents
  destinataires de votre systme, ou les envoyer vers l'extrieur :)).
  Crez-le juste comme simple utilisateur. Vous aurez besoin de faire
  des tests sur ce compte, et l'administrateur du courrier peut
  l'utiliser pour le distribuer sans
  tre pour autant root -  c'est bien plus sr !


  33..33..  FFeettcchhmmaaiill

  J'utilise la version 1.9 avec le patch 9... je l'ai trouv  l'adresse
  et j'utilise seulement ce programme de mail dans mon exemple -   vous
  de voir si vous en prfrez un autre, vous tes seul juge ! Pour ma
  part il me satisfait :). Si vous le voulez plus personnalis vous
  devrez consulter le manuel de Fetchmail :).  Il peut tre install
  comme root aussi bien que comme simple utilisateur...  le mieux est de
  l'installer comme root :) puisque je suis sr qu'il fonctionne bien
  :).


  33..44..  PPrrooccmmaaiill

  J'utilise la version 3.10 - vous la trouverez aussi  , je pense que
  c'est le meilleur mda (mail delivery agent) sur le march... Il gre
  merveilleusement et est bien mieux que l'agent par dfaut puisqu'il
  dlivre les messages utilisateur par utilisateur !  Pour
  l'installation je vous donne les mmes conseils que pour Fetchmail.


  33..55..  UUnn ccoommppttee ee--mmaaiill..

  Vous aurez toujours besoin d'un compte e-mail -   partir duquel vous
  pourrez retirer vos messages. Un serveur POP - qui vous permet de
  retirer votre courrier quand vous le souhaitez, et qui permet aux
  diffrents utilisateurs d'envoyer des e-mail 24/24. Ca peut tre aussi
  bien un service de messagerie gratuit que payant -  bien que votre
  compte e-mail soit suffisant.  Avec la mthode B (adresse dans le
  corps du sujet) vous n'avez besoin de rien d'autre -  par contre la
  mthode A (adresse dans le champ "to ") en demande un peu plus -
  suivez le guide !


  33..55..11..  UUnn eennrreeggiissttrreemmeenntt DDNNSS ((MMXX))..

  Requis pour faire fonctionner votre propre domaine de messagerie -  il
  est indispensable puisque l'administrateur de votre fournisseur ne
  peut pas utiliser son domaine  l'usage exclusif de vos utilisateurs -
  il a d'autres clients qui ont besoin aussi d'tre contacts et qui
  pourraient interfrer avec vos utilisateurs.  Et vos enttes de
  messages doivent tre filtres sur ce domaine. Ce qui vous donne un
  domaine autonome pointant sur SON domaine. Par contre a vous cotera
  un peu plus cher, ou vous pouvez demander  votre administrateur
  systme de rajouter une adresse impersonnelle pointant sur son
  serveur, cependant a doit tre un autre domaine que le sien !


  33..55..22..  FFaaiirree ssuuiivvrree llee ccoouurrrriieerr ddee ccoommppttee  ccoommppttee ::))

  Bien, l'administrateur sytme a besoin de faire suivre tous les
  messages destins  votre domaine sur votre compte... c'est une tche
  relativement aise pour lui s'il sait le faire :) ..sinon il devra
  lire le manuel du sendmail :) ( ou qmail ). Vous rcuprez votre
  courrier sur votre compte et voil ! Tous les messages seront
  redistribus sur votre propre domaine.


  44..  BBoonn,, jj''aaii ttoouutt ccee qquu''iill mmee ffaauutt,, eett mmaaiinntteennaanntt ??

  Vous avez cr votre compte supplmentaire, rcupr votre adresse e-
  mail et/ou l'entre DNS pour rerouter sur votre compte... Procmail et
  Fetchmail sont installs, ok on peut balancer la sauce ! :) on y va !
  1. Vous devez crer un fichier .procmailrc qui contiendra les infos de
     routage vers vos utilisateurs.

  2. Vous avez besoin galement de crer un fichier nosuchuserfile
     pour que l'expditeur sache que son message n'as pas t dlivr.

  3. Pour un boulot au top :) vous pouvez utiliser crontab pour vrifier
     le courrier. C'est le moyen le plus facile pour vrifier toutes les
     XX minutes si vous avez du courrier lorsque vous tes connect.


  44..11..  CCrraattiioonn dduu ffiicchhiieerr ..ffeettcchhmmaaiillrrcc

  Vous avez besoin de crer un fichier .fetchmailrc qui contiendra  les
  informations de votre service (nom d'utilisateur, mot de passe, aussi
  bien que le mda (agent de distribution de courrier) pour attribuer les
  messages.  Exemple:


       (*** < file > *** text ***)     .fetchmailrc




       ______________________________________________________________________
       server my.mail.server.com
       proto pop3
       user myaccountthere
       pass deepestsecrets
       flush
       mda /usr/bin/procmail
       ______________________________________________________________________




  Ce fichier peut tre utilis pour grer votre courrier. Testez-le en
  utilisant fetchmail (fetchmail -vv) et voyez si votre courrier est
  bien transfr ... Il devrait y avoir quelques erreurs puisque le
  fichier de contrle procmail n'a pas encore t install. Vous pouvez
  attendre de crer le fichier .procmailrc avant d'effectuer le test
  mais je vous prviens SI il y a erreur :) a PEUT provenir de ce
  fichier :). Ce fichier doit tre accessible au propritaire du compte
  (dans mon exemple : mailservice) et doit tre lisible par
  l'utilisateur mais PAS lisible par le groupe/extrieur puisqu'il
  contient le mot de passe principal :) (vous devrez changer les droits
  du fichier .fetchmailrc en 600)


  44..22..  CCrraattiioonn dduu ffiicchhiieerr ..pprrooccmmaaiillrrcc

  Ce fichier de contrle distribuera le courrier vers son destinataire.
  Il y a deux manires de le faire comme nous l'avons vu prcdemment :
  par le destinataire (to: ) et par le corps du sujet (moins rglo).  Ce
  fichier contiendra les diffrents destinataires des messages. Tous les
  commentaires prcds d'un # ne sont pas obligatoires - ils sont l
  uniquement pour vous permettre de suivre ma dmarche... Vous pouvez
  aussi changer les droits de ce fichier en 600 - le reste du monde et
  le groupe nont pas besoin de connatre ces adresses prives :)...
  L'utilisateur doit aussi en tre le propritaire (comme mailservice)
  :). Le fichier "nosuchuserfile" renvoie un e-mail  l'expditeur si le
  destinataire n'est pas trouv dans le fichier procmail (le courrier
  n'est pas distribu) - aussi l'expditeur sait que son adresse n'est
  pas valide.


  44..22..11..  PPoouurr llaa ddiissttrriibbuuttiioonn ppaarr llee ddeessttiinnaattaaiirree ((mm((AA))))::


       (*** < file > *** text ***)     .procmailrc




       ______________________________________________________________________
       # Cette ligne sert uniquement au dbogage ! Il peut-tre enlever dans un but
       # de confidentialit puisque vous aurez accs  toute la messagerie transitant
       # par votre domaine... Tous les messages seront copis dans le fichier
       # "passtrough" avant d'tre distribus aux destinataires... ici vous pouvez
       # voir ce qui ne va pas ...
       :0 c
               passtrough

       # l'e-mail avec l'entte "to: freaker@mydom.com" me sera directement dirig,
       # les autres continuerons leur chemin...
       :0
       * ^To:.*freaker@mydom.com
       ! freaker

       # l'e-mail pour root@mydom.com sera dirig vers le root... et vers
       # l'administrateur du courrier !
       :0
       * ^To:.*root@mydom.com
       ! root

       :0
       * ^To:.*postmaster@mydom.com
       ! postmaster


       # l'e-mail pour barbara@mydom.com sera distribu  barbara ET sera retransmis
       # vers son adresse prive !

       :0 c
       * ^To:.*barbara@mydom.com
       ! barbara@her.private.one

       :0
       * ^To:.*barbara@mydom.com
       ! barbara

       # Ce script renvoie un e-mail vers l'expditeur s'il n'a pas trouv le
       # destinataire dans son fichier... il enverra le fichier "nosuchuser" dans le
       # corps du message comme rponse... attention ! vous avez absolument besoin
       # d'un tel fichier ! - le mien signale : " La personne que vous essayez de
       # joindre n'est pas abonne  ce serveur, essayez  nouveau svp, il se pourrait
       # qu'elle ne soit plus prsente".
       :0
         |(/usr/bin/formail -r -k \
            -A"X-loop: mailservice@mydomain.dom "| \
              /usr/bin/gawk '{print }\
              /^/ && !HEADER \
                { system("/bin/cat nosuchuser"); \
                print"--" ;\
                HEADER=1 }' ) |\
                /usr/bin/sendmail -t


       exit
       ______________________________________________________________________


  44..22..22..  PPoouurr llaa ddiissttrriibbuuttiioonn aavveecc ccoommmmee ""ssuujjeett:: ttoouusseerr"" ((mm((BB))))


       (*** < file > *** text ***)     .procmailrc






























































  ______________________________________________________________________
  # Cette ligne sert uniquement au deboggage ! Il peut-tre enlever dans un but
  # de confidentialit puisque vous aurez accs  toute la messagerie transitant
  # par votre domaine... Tous les messages seront copis dans le fichier
  # "passtrough" avant d'tre distribus aux destinataires... ici vous pouvez
  # voir ce qui ne va pas...
  :0 c
          passtrough

  # l'e-mail avec l'entte "to: freaker@mydom.com" me sera directement dirig,
  # les autres continuerons leur chemin... si vous avez un compte ddi pour
  # recevoir votre "mailservice" vous n'avez pas besoin de cette ligne :)
  :0
  * ^To:.*freaker@ibm.net
  ! freaker

  #  l'e-mail avec l'entte root@mydom.com sera dirig vers le root !
  :0
  * ^Subject:.root
  ! root

  # l'e-mail avec l'entte barbara@mydom.com sera distribu  barbara...
  :0
  * ^Subject:.barbara
  ! barbara

  # l'e-mail avec l'entte peul sera transmis vers son adresse prive.
  :0
  * ^Subject:.paul
  ! paul@his.personal.emailaddress

  # Tout e-mail avec l'entte john sera transmis  son compte et une copie vers
  # son adresse e-mail prive...
  :0 c
  * ^Subject:.john
  ! john@his.personal.emailaddress

  :0
  * ^Subject:.john
  ! john

  # Tous e-mail d'ibm, avec les infos de mise  jour, seront envoys  freaker,
  # comme il est le seul  vouloir administrer le service d'e-mail et que ibm ne
  # veut pas recevoir les retours de courrier non attribu !!
  # si votre fournisseur vous expdie des "newsletters" etc... cette ligne est
  # obligatoire.
  :0
  * ^From:.*newsletter@ibm.net
  ! freaker

  # Tous les messages que le dmon veut rejeter, ou dans mon cas, les sauve dans
  # un fichier... (utiliser  /dev/null pour les envoyer au fin fond des abysses).
  :0
  * ^FROM_DAEMON
  throwaway

  # Ce script renvoie un e-mail vers l'expditeur s'il n'a pas trouv de
  # destinataire dans son fichier... il enverra le fichier "nosuchuser" dans le
  # corps du message comme rponse... attention ! vous avez absolument besoin
  # d'un tel fichier ! - le mien signale: "L'utilisateur n'est pas reconnu dans
  # la ligne objet svp utilisez "Subject: nom de l'utilisateur" pour crire  la
  # personne concerne, par exemple "Subject: freaker" enverra un e-mail 
  # freaker". Ce fichier peut tre long, mais aussi court :)... l'adresse de
  # votre domaine "mailservice@mydomain.com" vitera de confondre vos
  # utilisateurs avec ceux de votre fournisseur d'accs - il a besoin de
  # connatre votre adresse exacte!
  # Sinon vous pouvez crer une boucle sans fin qui envoie un e-mail du style
  # "Ne dpensez pas 500$ chez votre ..."
  :0
    |(/usr/bin/formail -r -k \
       -A"X-loop: mailservice@mydomain.dom "| \
         /usr/bin/gawk '{print }\
         /^/ && !HEADER \
           { system("/bin/cat nosuchuser"); \
           print"--" ;\
           HEADER=1 }' ) |\
           /usr/bin/sendmail -t

  exit
  ______________________________________________________________________






  44..33..  IIll nn''yy aa ppaass dd''aabboonnnn ...... ((ffiicchhiieerr nnoossuucchhuusseerr))


       (*** < file > *** text ***)     nosuchuser




       ______________________________________________________________________

       La personne que vous dsirez contacter n'est pas abonne  cette adresse.

       S'il vous plat, utilisez la ligne rserve au sujet pour y crire le nom de
       votre correspondant - exemple: "subject: freaker" enverra un mail  freaker 
       cette adresse"
       ______________________________________________________________________






  44..44..  FFiicchhiieerr ""ccrroonnttaabb""..

  Si vous ne savez pas comment crontab fonctionne :) il vaut mieux que
  vous lisiez le manuel :)...  Vous avez besoin de crer un fichier pour
  contrle le courrier "checkmail" - celui-ci vrifiera si la connection
  est valide, de la mme manire que cron...  - j'utilise le protocole
  ppp :) - aussi l'exemple suivant vrifiera la connection - ainsi que
  la messagerie toutes les 10 minutes en utilisant cron.  Ca parat un
  peu louche - mais a ne l'est pas !



  44..44..11..  VVrriiffiiccaattiioonn dduu ccoouurrrriieerr

  Le fichier "checkformail" sera appel (il doit tre excutable pour
  cel) - et il vrifiera la connection.  Si elle est valide alors il
  ira rcuprer le courrier. Crontab utilisera ce fichier quand vous
  utilisez l'entre cron suivante ...


       (*** < file > *** code ***)     .checkformail



  ______________________________________________________________________
  #!/bin/sh
  #

          cd /home/mailservice

          if [ -f /var/run/ppp0.pid ]; then
          /usr/local/bin/fetchmail -s > /dev/null 2>&1
  fi
  ______________________________________________________________________





  44..44..22..  ccrroonnttaabb

  Cette entre cron doit tre charge dans crontab, elle appellera le
  fichier .checkformail toutes les 10 minutes.  Elle n'a aucune action
  sur le courrier ni sur la console - puisque le tout va directement
  dans le rpertoire /dev/null.


       (*** < file > *** text ***)     cronentry




       ______________________________________________________________________
       0,10,20,30,40,50 * * * *  /home/mailservice/.checkformail 1> /dev/null 2>
       /dev/null
       ______________________________________________________________________






  44..55..  CChheezz vvoottrree ffoouurrnniisssseeuurr dd''aaccccss..

  Ce qui suit doit tre fait si vous utilisez la mthode A... chez
  l'administrateur, l'e-mail va directement du domaine vers
  l'utilisateur.  C'est assez simple, et une fois que c'est install a
  roule d'enfer !  Ce n'est pas ncessaire ni chez vous ni chez votre
  administrateur systme si celui-ci utilise une autre mthode.

  Si vous utilisez une nouvelle version de sendmail, l'ancienne version
  ne fonctionnera sans doute pas, aussi rfrez vous au manuel
  d'utilisation  pour que le routage d'e-mail ait lieu.


  44..55..11..  sseennddmmaaiill..ccff ((AAnncciieennnnee vveerrssiioonn ddee sseennddmmaaiill)) aajjoouutteezz lleess lliiggnneess
  ssuuiivvaanntteess aauu ffiicchhiieerr

  Ajoutez les lignes suivantes au fichier /etc/sendmail.cf, ainsi le
  fichier du domaine sera lu. SVP il est  noter que la rgle 98 est
  ajoute ci-dessous, ceci pour rcuprer les erreurs :) c'est l'enfer
  pour les enlever ! (et je sait de quoi je parle :) DuH).


       (*** < file > *** add ***)    /etc/sendmail.cf





  ______________________________________________________________________
  # Base de donnes du domaine maintenu

  Kmaildomains btree /etc/maildomains.db

  # ajoutez ces lignes "dans" la rgle 98 ! (sous la rgle 98)

  R$+ < @ $+  . >         $: $1 < @ $2 > .
  R$+ < @ $+ > $*         $: $(maildomains $1@$2 $: $1 < @ $2 > $3 $)
  R$+ < @ $+ > $*         $: $(maildomains $2 $: $1 < # $2 > $3 $)
  R$+ < @ $* > .          $: $1 < @ $2 . >
  ______________________________________________________________________






  44..55..22..  ((NNoouuvveellllee vveerrssiioonn ddee sseennddmmaaiill)) AAjjoouutteezz cceess lliiggnneess aauu ffiicchhiieerr
  sseennddmmaaiill..ccff

  Avec la nouvelle version de sendmail (test avec la version 8.8.7 et
  8.8.8), ignorez la mthode A, et ajoutez les lignes suivantes :


       (*** < file > *** add ***)    /etc/sendmail.cf




       ______________________________________________________________________
       # Base de donnes du domaine maintenu

       Fw/etc/sendmail.cw
       Kvirtuser btree /etc/maildomains.db

       *OR*

       Fw/yourhomedir/sendmail.cw
       Kvirtuser btree /yourhomedir/maildomains.db
       ______________________________________________________________________






  44..55..33..  ((NNoouuvveellllee vveerrssiioonn ddee sseennddmmaaiill)) EEddiitteezz llee ffiicchhiieerr //eettcc//sseenndd
  mmaaiill..ccww

  Editez le fichier /etc/sendmail.cw (ou /votrerpertoire/sendmail.cw si
  vous n'utilisez pas le mme emplacement).  Un point positif 
  l'utilisation de votre rpertoire: vous n'avez pas besoin d'tre
  loguer root pour activer votre domaine. Bien que vous pouvez avoir des
  risques de scurit si vous n'tes pas rigoureux !

  Ce fichier peut dj exister, ou a besoin d'tre cr. S'il existe
  dj soyez sr de ne pas craser les anciennes donnes - ou je vous
  rappelerai ma dclaration :)

  En premier lieu crez un fichier /etc/sendmail.cw, qui sera utilis
  entre le domaine et l'utilisateur... (comme je vous l'ai dj dit, le
  nom "mailservice" est  votre convenance - a peut mme tre votre
  login (le mien est freaker)).  Exemple :


       (*** < file > *** text ***) /etc/sendmail.cw




       ______________________________________________________________________
       mydomain.dom            mailservice
       ______________________________________________________________________






  44..55..44..  CCrreezz uunn ffiicchhiieerr //eettcc//mmaaiillddoommaaiinnss ffiillee

  En premier lieu crez un fichier /etc/maildomains, qui sera utilis
  entre le domaine et l'utilisateur... (comme je vous l'ai dj dit, le
  nom "mailservice" est  votre convenance - a peut mme tre votre
  login (le mien est freaker)).  (Vous pouvez avoir ce fichier dans
  votre rpertoire, changez le chemin :).  Exemple :

  Avec l'ancienne version de sendmail:


       (*** < file > *** text ***)     /etc/maildomains




       ______________________________________________________________________
       mydomain.dom            mailservice
       ______________________________________________________________________




  Avec la nouvelle version de sendmail:


       (*** < file > *** text ***)     /etc/maildomains




       ______________________________________________________________________
       @mydomain.dom           mailservice
       ______________________________________________________________________






  44..55..55..  AAuu ttrraavvaaiill !!

  Avec l'ancienne et la nouvelle version de sendmail vous avez besoin de
  crer les fichiers btree (base de donnes), suivez le guide :


  cd /etc    (or /yourhomedir)
  makemap btree maildomains < maildomains




  aprs cel, tuez le dmon sendmail et redmarrez le. Maintenant a
  devrait marcher ! Bonne chance :)



  55..  AAuuttoommaattiissaattiioonn

  OK, tout ce que nous avons vu fonctionne... (sinon ne pensez mme pas
   l'automatisation, il faut d'abord que tout soit ok) maintenant il
  nous faut un script pour que l'administrateur ou le root ne se prenne
  pas la tte pour ajouter un utilisateur  votre fichier procmail...
  L'exemple suivant s'adresse  des utilisateurs plus expriments -
  parce que certaines choses ont besoin d'tre changes. J'ai dcid
  d'utiliser la M(B) parce qu'elle est plus utilise que la M(A) (moins
  chre). Mon exemple peut trs bien tre adapt  la M(A).


  55..11..  LLaa ssttrruuccttuurree..

  Puisque le fichier de post-routine termine le programme (tout ce qui
  va suivre ne fonctionnera pas sans lui) nous avons besoin d'un fichier
  de pre-routine.



  55..11..11..  LLee ffiicchhiieerr ddee pprree--rroouuttiinnee ""..pprrooccmmaaiillrrcc--hheeaaddeerr""

  Ce fichier servira  la fois au fichier de pre-routine et au fichier
  principal puisqu'ici seront rajouts ou supprims les diffrents
  utilisateurs. C'est un fichier trs important, une copie de sauvegarde
  sera la meilleure chose  faire avant l'ajout d'un utilisateur, il
  PEUT y avoir des problmes ... une machine n'est pas infaillible.


       (*** < file > *** text ***) .procmailrc-header































  ______________________________________________________________________
  :0 c
          passtrough

  :0
  * ^To:.*freaker@ibm.net
  ! freaker

  :0
  * ^Subject:.root
  ! root

  :0
  * ^Subject:.barbara
  ! barbara

  :0
  * ^Subject:.paul
  ! paul@his.personal.emailaddress

  :0 c
  * ^Subject:.john
  ! john@his.personal.emailaddress

  :0
  * ^Subject:.john
  ! john

  :0
  * ^From:.*newsletter@ibm.net
  ! freaker

  :0
  * ^FROM_DAEMON
  throwaway
  ______________________________________________________________________






  55..11..22..  LLee ffiicchhiieerr ddee ppoosstt--rroouuttiinnee ""..pprrooccmmaaiillrrcc--ffooootteerr""

  Comme mentionn ci-dessus, ce fichier doit tre la post-routine
  puisqu'il ne sera pas utilis pour dlivrer les donnes - ce fichier
  contient le code de "rejet" pour retourner le message  l'expditeur
  s'il ne trouve pas de correspondant ! C'est vraiment la fin de la
  boucle !


       (*** < file > *** text ***) .procmailrc-footer














  ______________________________________________________________________

  :0
    |(/usr/bin/formail -r -k \
       -A"X-loop: mailservice@mydomain.dom "| \
         /usr/bin/gawk '{print }\
         /^/ && !HEADER \
           { system("/bin/cat nosuchuser"); \
           print"--" ;\
           HEADER=1 }' ) |\
           /usr/bin/sendmail -t


  exit
  ______________________________________________________________________






  55..22..  SSccrriipptt dd''aajjoouutt ddee bboottee  lleettttrree

  Ce script ajoutera un utilisateur au fichier de pre-routine, et mettra
   jour le ".procmailrc" d'aprs le ".procmailrc-header" pour clturer
  le tout. Les commentaires (prcds de #) ne sont l que pour vous
  aider :) vous pouvez les supprimer.


       (*** < file > *** code ***)     addmail   (* chmod 500 *)




































  ______________________________________________________________________
  #/bin/sh
  #
  # Copyright (c)1997 par Gunther Voet. rev 1.0.1
  # SVP merci de laisser ce copyright si vous fournissez une machine avec ce
  # programme prinstall ...


  echo ""
  echo "Addmail v1.0.1 by Gunther Voet, Freaker / TuC'97-98 (21/04/97)"
  echo ""

  if [ $1 ]; then

          if [ $2 ]; then

  # Faites une sauvegarde!

          cp /home/mailserv/.procmailrc-header /home/mailserv/.procmailrc-backup

  # Ajoutez l'information (>>) au fichier .procmailrc-header

          echo ":0" >> /home/mailserv/.procmailrc-header
          echo "* ^Subject:.$1" >> /home/mailserv/.procmailrc-header
          echo "! $2" >> /home/mailserv/.procmailrc-header
          echo "" >> /home/mailserv/.procmailrc-header

  # Mettez  jour le fichier .procmailrc  partir des fichiers .procmailrc-header
  #  et .procmailrc-footer


          cat /home/mailserv/.procmailrc-header > /home/mailserv/.procmailrc
          cat /home/mailserv/.procmailrc-footer >> /home/mailserv/.procmailrc

  # Soyez sr que le fichier .procmailrc n'appartient qu' l'administrateur
  # "mailserv" et que ce dernier a l'exclusivit de l'criture/lecture...

          chown mailserv /home/mailserv/.procmailrc
          chgrp users /home/mailserv/.procmailrc
          chmod 600 /home/mailserv/.procmailrc
  else
          echo "No DESTINATION mail address has been given ..."
  fi

  else
          echo "usage:"
          echo ""
          echo "syntax:  addmail from_user to_user(domain)"
          echo ""
          echo "example: addmail freaker freaker@myemail.dom"
          echo ""
  fi
  ______________________________________________________________________




  Ok, ce script va donc ajouter les informations de l'utilisateur ainsi
  que son adresse dans le fichier .procmailrc-header, et mettra  jour
  le fichier .procmailrc  partir des deux autres fichiers (header  et
  footer).  Si vous voulez supprimer un utilisateur, vous n'avez juste
  qu' diter le fichier ".procmailrc-header" pour le modifier, ainsi la
  prochaine fois que vous ajouterez quelqu'un, l'utilisateur prcdent
  sera supprim du fichier .procmailrc. Pour effectuer une suppresion
  immdiate, il vous faut le supprimer  la fois dans le fichier
  .procmailrc et .procmailrc-header.
  Je vous crois assez comptent pour modifier le script pour que l'ajout
  d'un utilisateur  votre compte se fasse automatiquement et ce pour
  les deux mthodes.


  66..  AA ll''aaiiddee !! ((SSiicc))

  Bon, vous avez besoin d'un peu d'aide, non :) je pourrais tre
  sarcastique et seulement vous dire: "vous feriez mieux de tout
  rinstaller, parce que vu d'ici c'est un peu le bordel"... ou  je peux
  vous aider ... - j'ai dcris ici quelques problmes courants.  Si vous
  avez des problmes qui ne sont pas rpertoris ici, faites m'en part
  par e-mail et je rajouterais tout a  ce HowTo avec en sus votre nom
  et adresse e-mail - AVANT de m'crire svp, vrifiez que vous n'oubliez
  rien et si vous voulez que je vous aide expdiez moi le plus d'info
  possible incluant le script et la description de ce que vous voulez.
  Je n'ai PAS besoin des binaires, je ne veux pas le faire tourner.



  66..11..  LLee ssccrriipptt dd''aauuttoommaattiissaattiioonn nnee ffoonnccttiioonnnnee ppaass::


    est-il executable ?

    est-ce que votre emplacement par dfaut est /bin/sh ?

  66..22..  QQuu''eesstt--ccee qquuee vvoouuss eenntteennddeezz ppaarr sseerrvveeuurr ddee mmaaiill aannoonnyymmee ??


    Vous pouvez crer un compte comme "anon0001@votredomaine.dom" et le
     faire suivre vers une autre adresse e-mail... personne n'ayant
     accs au fichier .procmailrc, VOUS SEUL connaissez l'identit de
     vos utilisateurs !

  66..33..  MMoonn cchhaatt eesstt mmoorrtt


    La prochaine fois n'imprimez pas ce HowTo avec du papier de 200gr,
     parceque pour 10 pages ce sera 2kg pour le chat - c'est JUSTE TROP
     LOURD !

  66..44..  MMoonn cchhiieenn eesstt mmoorrtt


    Hmmm... je ne peux rien faire pour vous, pourquoi vous me posez
     cette question ? ... Enterrez le...

  66..55..  LLiinnuuxx??


    Un UNIX libre de droit - compatible Posix - cr par Linus Torvalds
     ...  Pourquoi tes-vous en train de lire cel si vous ne connaissez
     mme pas Linux ?

  66..66..  PPoouuvveezz vvoouuss mm''aaiiddeerr  ttrroouuvveerr uunn ccoommppttee ??


    Non! C'est un HowTo pour une utilisation personnelle, je me
     contrefous de votre fournisseur d'accs ainsi que de votre adresse
     e-mail.

  66..77..  PPoouurrqquuooii aavvooiirr eennlleevv "" ppeeuutt--ttrree qquuee pplluuss ttaarrdd jjee rraajjoouutteerraaiiss
  qquueellqquueess ccoommmmeennttaaiirreess ......"" ??


    Lisez le point 5.5 avec attention :) et verrez pourquoi... c'est
     parce que j'avais besoin de le rajouter sur demande gnrale :)


  66..88..  CCoommmmeenntt ppuuiiss--jjee oobbtteenniirr uunn ""ddoommaaiinnee"" ??


    Demandez  votre fournisseur d'accs, il vous y aidera. Ca peut
     prendre des jours voire des semaines pour le demander  Internic -
     votre fournisseur d'accs peut aider.

  66..99..  PPoouurrqquuooii tteess--vvoouuss uunn eenncc...... eenn uuttiilliissaanntt cceettttee mmtthhooddee ??


    Parce que je ne veux pas dpenser de l'argent et parce que j'aime
     bien tre un enc... en l'utilisant - JE l'utilise - pourquoi a
     vous ennuie ?

  66..1100..  LLee ffiicchhiieerr ""nnoossuucchhuusseerrffiillee"" ??


    Vous pouvez y mettre ce que vous voulez - pourvu que l'expditeur
     sache pourquoi son message a t refus.

  66..1111..  EEsstt--ccee qquuee mmeess uuttiilliissaatteeuurrss ppeeuuvveenntt ccrriirree eett eennvvooyyeerr dduu ccoouurr
  rriieerr ??


    Ce n'est pas le but de ce systme, lisez le manuel du sendmail...
     je vous explique ici comment RECEVOIR   du courrier et avoir
     toujours une adresse valide.

  66..1122..  EEsstt--ccee qquuee cchhaaqquuee uuttiilliissaatteeuurr aa bbeessooiinn dd''uunn ccoommppttee sshheellll ssuurr
  mmoonn sseerrvveeuurr ??


    Nan... Mais ! Ce sera difficile pour les utilisateurs qui n'ont pas
     accs  internet :) vous pourriez avoir un rseau camoufl (et
     utiliser un ordinateur qui y soit connect) pour que les
     utilisateurs puissent lire leur courrier de cette faon, ou bien
     vous pourriez crer un lien entre un BBS et le courrier
     lectronique, vous pourriez mme le transmettre vers une passerelle
     Fidonet :) Autant de circonstances qui permettraient d'viter de
     donner un compte shell.

  66..1133..  ssaannss oobbjjeett


    A priori un jeu de mot entre Skeletion et Skeleton

  66..1144..  ll''aajjoouutt ddee ccoouurrrriieerr ??


    Pas de question - pour l'automatisation - vous feriez mieux d'tre
     sr de ce que vous voulez, parce que a pourrait tre votre cheval
     de troie ;)) Ce que je veux vous dire, c'est que vous devez savoir
     comment faire un script avant de poser des questions.  C'est assez
     facile  interprter et en plus j'y ai ajout des commentaires.  Si
     vous avez l'intention de distribuer ce script, svp pensez  mon
     copyright !  merci ;)

  66..1155..  PPoouurrqquuooii tteess--vvoouuss ssii ccrruueell ??


    Je ne suis pas cruel :) je suis gentil :) je suis le plus gentil
     garon de la Terre, de l'univers ! MAINTENANT DEHORS ! ( je veux
     juste m'en tenir  mon HowTo et pas TROP driver de mon point de
     dpart - aussi :) that's all folks ! ).

  66..1166..  AAvveezz vvoouuss eeuu ddeess ppllaaiinntteess  pprrooppooss ddee llaannggaaggee eexxcceessssiiff ??


    Pas encore, mais, il se pourrait que je filtre toute chose
     contenant "excessif" et "langage" :) je ne sais pas :))

  66..1177..  PPoouurrqquuooii ccee HHoowwTToo eesstt--iill ssii ddiiffffrreenntt ddeess aauuttrreess ??


    Parce que le fait de lire beaucoup de HowTo peut devenir barbant...
     j'ai voulu y ajouter autre chose...

  66..1188..  LLooccaalleemmeenntt mmoonn ddoommaaiinnee ffoonnccttiioonnnnee,, mmaaiiss sseemmbbllee rriieenn rreecceevvooiirr ddee
  ll''eexxttrriieeuurr..


    Vrifiez votre fichier "sendmail.cw, le nom de domaine a BESOIN de
     s'y trouver !

  66..1199..  MMoonn cchhiieenn eesstt mmoorrtt


    Les rgles ne fonctionnent pas, je ne peux recevoir d'e-mail, ou
     sendmail plante, rfrez vous  la section  new sendmail  et ne
     ftes pas attention aux explications de l'ancienne version.  La
     nouvelle version de sendmail sera plus facile  utiliser avec les
     domaines virtuels.


  77..  TThhee EEnndd

  Il faut une fin  tout... si vous trouvez des bugs non repertoris (ou
  des particularits), alors laissez de ct vos critiques... envoyez
  moi vos commentaires et suggestions :) Si vous tes encore en colre
  aprs avoir lu cel, svp allez voir  .

  Mes remerciements :

  Hannes van de Vel: pour m'avoir support (hum) Tetsu Isaji: pour la
  version japonaise ainsi que pour m'avoir signal quelques erreurs :)
  Greg Hankins: pour m'avoir fait remarquer les erreurs de la version
  sgml.  Linus torvalds: bien sr, sans qui ce HowTo n'existerait pas !





















  Le Mini-HOWTO PLIP Linux
  Andrea Controzzi, controzzi@cli.di.unipi.it
  Traduction :Thierry Hamon thierry.hamon@lipn.univ-paris13.fr
  v2.1, 12 mars 1998

  Cet HOWTO vous permettra, je l'espre d'installer et d'utiliser PLIP
  (Parallel Line Interface Protocol).
  ______________________________________________________________________

  Table des matires


  1. Introduction : Qu'est-ce que PLIP et pourquoi l'utiliser ?

  2. Matriel ncessaire pour utiliser PLIP

  3. Reconfiguration du noyau

  4. Messages du noyau au dmarrage

  5. Configuration des fichiers

  6. Activation de la liaison PLIP

  7. FAQ

  8. Patches pour utiliser PLIP et LP ensembles

     8.1 AID CDATA avert
     8.2 PLIP et LP sur deux ports diffrents

  9. Connexion PLIP entre Dos et Linux

     9.1 Configuration d'une connexion entre Dos et Linux
     9.2 Exprience pratique de connexion PLIP entre Dos et Linux

  10. Connexion PLIP entre Linux et Windows95

  11. Questions ? Commentaires ? Envoyez-moi vos ractions

  12. O trouver les nouvelles versions de ce Mini-HowTo

  13. Remerciements

  14. Copyright



  ______________________________________________________________________


     NNOOTTEESS ::
        Cette nouvelle version du mini-HOWTO comporte de nombreux
        changements mais aussi beaucoup d'amliorations. Bien que ce
        soit peu probable, mais nanmoins possible, des informations
        peuvent tre fausses ou dpasses. S'IL VOUS PLAIT, informez moi
        des erreurs afin de fournir  chacun des informations correctes.

        Les changements les plus importants sont :


       L'utilisation du format SGML pour rdiger l'HOWTO ;

       Une rponse gnrale  la question la plus souvent pose : "PLIP
        et Windows 95" (la rponse est ngative, dsol) ;

       Une plus grosse et meilleure FAQ (merci aux compte-rendus des
        innombrables utilisateurs : nombreux sont ceux qui trouveront
        leur commentaires dans cette section, comme je l'avais promis) ;

       La suppression des fichiers d'Installation Rapide PLIP, qui
        taient inutiles et dpasss ;

       La mise  jour de la section sur la connexion PLIP Dos-Linux

        Pour toutes questions, corrections, commentaires et/ou
        suggestions, voici mon adresse lectronique :
        controzzi@cli.di.unipi.it. N'hsitez pas  m'crire si vous avez
        besoin d'aide. Il est possible que je ne rponde pas
        immdiatement, mais je rpondrai ! Si aprs deux semaines vous
        ne recevez pas de rien de ma part, cela veut dire que notre
        systme de courrier lectronique a un problme : n'hsitez pas 
        m'crire  nouveau, c'est mon devoir de vous aider. Je ne peux
        pas garantir que je rsoudrai vos problmes, mais j'essaierai.
        Si aprs plusieurs mails, vous ne recevez pas de rponse,
        vrifier votre adresse de retour. Plusieurs fois, mes rponses
        ne sont pas arrives  cause de ce genre de problme, le plus
        souvent l'adresse de retour tait root@myhost.

        Avant d'envoyer un mail, lisez la FAQ. Ma rponse  une question
        dj prsente dans la FAQ ne sera pas meilleure (mais
        probablement pire ou incomplete) que la rponse que vous avez
        dj lue.

        Pour toutes questions sur PLIP avec DOS et Windows 95, s'il vous
        plait, envoyez un mail aux auteurs de ces sections. Je ne peux
        pas vous aider.

        Tout d'abord, beaucoup d'informations techniques viennent du
        NET-2-HOWTO de Terry Dawson (Traduction franaise de Frederic
        Lepied et Jacques Chion -- NdT). Ce Mini-HOWTO n'est pas suppos
        couvrir tous ses aspects et/ou le remplacer : mon but est de
        vous donner les moyens d'installer rapidement une connexion PLIP
        permanente, et SEULEMENT a ! Toutes les autres informations
        viennent de mon exprience personnelle et de l'aide de nombreux
        utilisateurs qui m'ont envoy des commentaires et des
        informations.

        Lisez le NET-2-HOWTO et les autres documents pour les
        informations gnrale sur les rseaux et sur les fichiers de
        configuration que je propose de modifier.


  11..  IInnttrroodduuccttiioonn :: QQuu''eesstt--ccee qquuee PPLLIIPP eett ppoouurrqquuooii ll''uuttiilliisseerr ??


  Il y a de nombreuses manires de crer une connexion entre plusieurs
  machines en local. PLIP, comme SLIP, permet d'tablir une connexion
  locale entre deux machines mais utilise pour cela les ports
  parallles.

  Les ports parallles transfrent plus d'un bit  la fois. Il est ainsi
  possible d'obtenir des vitesses plus grandes qu'avec une interface
  srie.

  La vitesse atteinte dpend exclusivement de votre matriel (CPU et
  port parallle) et de la charge du systme, en gnral entre 5 Ko/s et
  40 Ko/s.

  L'interface PLIP est assez rapide pour permettre des fonctions TCP/IP
  dcentes, comme NFS. Vous pouvez donc avoir un ordinateur avec tout le
  systme Linux et un autre avec seulement le systme minimal o vous
  pouvez monter tout le reste  partir de la machine principale.

  Un inconvnient : la plupart des utilisateurs ont une machine ne
  possdant qu'un seul port parallle. Ainsi, vous ne pourrez imprimer
  et utiliser une connexion PLIP en mme temps. Mme avec deux ports
  parallles, ce n'est pas possible sans utiliser les modules du noyau.

  Si vous avez deux ports parallles ou plus, ce problme peut tre
  contourn en utilisant un patch.

  Enfin, je vous donnerai un bon moyen de configurer une liaison PLIP
  entre DOS et Linux.

  Je n'insisterai pas trop : jusqu' maintenant personne ne m'a rapport
  avoir russi une connexion entre Linux et Windows95.


  22..  MMaattrriieell nncceessssaaiirree ppoouurr uuttiilliisseerr PPLLIIPP


  Le matriel requis pour l'installation d'une interface PLIP est
  (videmment) un port parallle libre sur les deux machines et un
  cble. Si vous le pouvez, dans votre BIOS, configurez le port
  parallle, au moins, comme un port "bi-directionel", et si possible
  dans le mode ECP ou EPP.



  Pour le cble, voici un extrait du fichier plip.c des sources du
  kernel 2.0.33 :



         Le cble utilis est de facto un cble parallle standard null
         printer -- vendu comme un cble LapLink par divers magasins. Vous
         aurez besoin d'un cble 12 brins pour en faire un vous mme. Le
         cblage est le suivant :
           SLCTIN      17 - 17
           GROUND      25 - 25
           D0->ERROR   2 - 15          15 - 2
           D1->SLCT    3 - 13          13 - 3
           D2->PAPOUT  4 - 12          12 - 4
           D3->ACK     5 - 10          10 - 5
           D4->BUSY    6 - 11          11 - 6

         Ne pas connecter les autres broches, c'est--dire :

           D5, D6, D7 sont 7, 8, 9
           STROBE est 1, FEED est 14, INIT est 16
           Les masses supplmentaires sont 18, 19, 20, 21, 22, 23, 24




  Mais je vous recommande fortement de lire le fichier
  /usr/src/linux/drivers/net/README1.PLIP et README2.PLIP pour plus
  d'informations au sujet du cble.

  A mon avis, vous devez viter de construire votre propre cble
  parallle. Vous conomiserez un peu d'argent en le fabriquant vous-
  mme, mais vous pourrez aussi avoir pas mal de maux de tte. Si vous
  souhaitez vraiment construire votre cble parallle, rappelez vous que
  vous le faites  vos risques et prils. J'ai report exactement ce
  qu'il est crit dans le fichier plip.c mais je ne donne aucune
  garantie.

  Un dernier mot au sujet de la longueur du cble : les cbles longs
  (c'est--dire plus de 3 mtres, 10 pieds) peuvent crer des problmes
   cause des interfrences radio. Si vous avez besoin de cbles longs,
  vous devrez utiliser des cbles blinds de bonne qualit. Cependant,
  de trs longs cbles ne sont pas recommands : je pense que la taille
  maximale d'un cble doit tre de 15 mtres (50 pieds).

  Quoi qu'il en soit, quelqu'un m'a envoy un mail en m'indiquant que
  son cble de 30 mtres fonctionne trs bien. Si quelqu'un veut
  vraiment essayer une connexion PLIP entre son bureau et sa maison (200
  mtres de long, par exemple), et qu'il a de l'argent  dpenser, il
  peut essayer, mais  ses risques et prils.


  33..  RReeccoonnffiigguurraattiioonn dduu nnooyyaauu


  Je suppose que vous savez dj comment configurer et compiler le
  noyau, sinon vous devez vous rfrer  d'autres documents : le Kernel-
  HowTo ou d'autres guides (Le Guide du Rootard, par exemple -- NdT).
  Grce au travail des dveloppeurs du noyau, recompiler les derniers
  noyaux est vraiment devenu facile mme pour le _c_o_m_m_u_n _d_e_s _m_o_r_t_e_l_s,
  alors _j_u_s_t _d_o _i_t ;-) ! N'importe comment, pour tre complet, voici un
  rsum rapide de ce que vous devez faire.

  NNBB : Je suppose que vous utilisez un noyau de la srie 2.0.xx.
  Maintenant, il n'y a plus aucune raison pour garder les noyau 1.2.xx .
  Il n'y a aucune instructions en rapport avec les noyaux 2.1.xx
  puisqu'ils sont destins au dveloppement.

  Je suppose que vous utilisez menuconfig pour initialiser les options
  du noyau, mais les autres outils sont quivalents. Voici comment
  faire :



       #make menuconfig




  Je vous recommande fortement de slectionner :



       Loadable module support --->




  et de valider l'option :



       [*] Enable loadable module support




  et, si c'est possible (c'est--dire si vous avez les modules 2.0.0)
  l'option :



       [*] Kernel daemon support (e.g. autoload of modules)

  Ensuite retournez en arrire et choisissez :



       Networking options  --->




  o vous pourrez au moins valider les options :



       [*] Network firewalls
       [*] TCP/IP networking
       [*] IP: forwarding/gatewaying




  Puis retournez en arrire et valider au moins :



       [*] Network device support
       <M> PLIP (parallel port) support




  Si vous utilisez des modules, je vous conseille fortement de
  configurer PLIP comme module. Vous pouvez alors, si vous avez besoin
  d'utiliser une imprimante, aller  :



       Character devices  --->




  et configurer l'option comme module :



       <M> Parallel printer support




  Maintenant le support du noyau pour PLIP est disponible. Si c'est la
  premire fois que vous compiler le noyau, regardez les autres options
  puis sauvez et sortez du menu.

  Enfin compilez avec les commandes :



       #make dep ; make clean
       #make zlilo




  Et, si vous utilisez des modules :

       #make modules
       #make modules_install




  Maintenant relancer votre sytme.


  44..  MMeessssaaggeess dduu nnooyyaauu aauu ddmmaarrrraaggee


  Aprs avoir reconfigur et compil le noyau en slectionnant le
  support PLIP, quand vous dmarrez le systme si le noyau supporte
  directement PLIP, ou quand vous chargez ("plus tard", voir ci-dessous)
  le module PLIP au cas ou vous avez compil PLIP comme un module, vous
  devriez obtenir quelque chose comme a (les nombres peuvent
  diffrer) :



       NET3 PLIP version 2.0 gniibe@mri.co.jp
       plip1: Parallel port at 0x378, using assigned IRQ 7.




  Suivant la configuration de klogd et syslogd, le message pourra tre
  crit dans vos fichiers de messages systme : PAS DE PANIQUE si vous
  ne voyez pas ces messages. Si vous avez compil PLIP comme un module
  et que la commande lsmod montre que le module plip est charg, c'est
  suffisant.

  Prenez en note le nom de l'interface. Habituellement, il s'agit de
  plip1, mais a peut tre plip0 ou mme plip2, plip3, etc. Il dpend de
  l'adresse d'E/S.


  55..  CCoonnffiigguurraattiioonn ddeess ffiicchhiieerrss


  NNBB : Certaines distributions, comme la Debian, utilise des fichiers de
  configuration diffrents. Si vous avez une installation standard et
  que vous ne trouvez pas les fichiers rc.inet*, cherchez des fichiers
  de configuration dans le rpertoire /etc/init.d.

  Tout d'abord, n'oubliez pas de sauvegarder les fichiers que vous allez
  modifier :


  #cd /etc/rc.d
  #cp rc.inet1 rc.inet1.BACKUP



  a peut servir.

  Maintenant, si vous ne l'avez pas dj fait, vous devez choisir les
  adresses IP des deux machines. Dans mes exemples, j'utiliserais deux
  IPs fictives  la place de celles que vous utiliserez, dans le format
  standard xxx.xxx.xxx.xxx .

  Dans le fichier /etc/rc.d/inet1.rc des deux machines, ajoutez la ligne
  (il est prfrable de l'crire dans la dernire partie du fichier) :


  ______________________________________________________________________
  /sbin/route add -net $(NETWORK) netmask $(NETMASK)
  ______________________________________________________________________



  O les variables NETWORK et NETMASK ont t initialises au pralable.
  Si vous ne savez pas comment faire, reportez vous au NET-2-HOWTO.

  Si, aprs avoir lancer cette commande, vous obtenez le message comme
  celui-l :



       SIOCADDRT: network unreachable




  Alors utilisez plutt cette commande :


  ______________________________________________________________________
  /sbin/route add -net ${NETWORK} netmask ${NETMASK} dev plip1
  ______________________________________________________________________



  o, comme d'habitude, vous devrez utiliser le nom de l'interface
  donne dans les messages du noyau.

  Vous pouvez ignorer sans danger ces variables, uniquement pour le cas
  suivant :

  Si vous voulez seulement connecter deux machines dans un rseau
  autonome, vous pouvez donner n'importe quelle adresse IP, c'est--dire
  200.0.0.1 et 200.0.0.2 respectivement. Dans ce cas, vous pouvez mettre
  sans danger NETWORK="200.0.0.0" et NETMASK="255.255.255.0". Ce sont
  les exemples d'IPs que j'utilise dans l'Installation Rapide de PLIP
  (voir ci-dessous).

  NNBB : 200.0.0.1 et 200.0.0.2 ne sont que des exemples. Je vous
  conseille fortement de ne pas les utiliser  : il peut s'agir des
  adresses relles de machines sur Internet !

  Je recommande de choisir votre adresse dans les plages d'_a_d_r_e_s_s_e_s
  _p_r_i_v__e_s :



                 10.0.0.0        -   10.255.255.255
                 172.16.0.0      -   172.31.255.255
                 192.168.0.0     -   192.168.255.255




  Dans le fichier /etc/hosts des deux machines, vous devez ajouter les
  entres avec les IPs des machines que vous connectez via PLIP. Dans
  mon exemple, les entres sont:






  ______________________________________________________________________
  200.0.0.1       un      # c'est l'adresse IP de "un"
  200.0.0.2       deux    # c'est l'adresse IP de "deux"
  ______________________________________________________________________



  O un et deux sont les noms que vous avez choisis pour les deux
  machines.

  Si vous voulez activer le NFS, en plus de rpondre yes pendant la
  configuration du noyau, vous devez ajouter dans /etc/exports les
  entres qui dcrivent les rpertoires que vous souhaitez exporter.
  Dans mon exemple, pour tre capable de monter le rpertoire /usr, vous
  devez ajouter l'entre :


  ______________________________________________________________________
  /usr                    two  (ro)
  ______________________________________________________________________



  Pour plus d'informations sur NFS, lisez la documentation spcifique.
  Ne me rapportez pas des problmes au sujet de NFS, je ne pourrai pas
  vous aider.

  Maintenant, relancer votre systme.


  66..  AAccttiivvaattiioonn ddee llaa lliiaaiissoonn PPLLIIPP


  Enfin, voici les commandes qui active l'interface PLIP. Vous devez les
  excuter en tant root (et bien sr le cble doit tre correctement
  branch).

  NNBB : Si quelque chose d'inattendu survient, revrifiez le cable et les
  commandes. Si vous suivez les instructions correctement, mais qu'il y
  a toujours des erreurs, lisez la section concernant la FAQ. Beaucoup
  de reponses y sont dj.

  Tout d'abord, il faut vrifier qu'il n'y a pas de priphrique lp
  prsent :



       #cat /proc/devices




  Vous ne devez pas voir de rfrence  lp comme ci-dessous :



       6 lp




  Si vous voyez cette rfrence, supprimez (temporairement) le
  priphrique lp avant de continuer. Si PLIP fonctionne, alors vous
  pourrez l'essayer avec lp plus tard. Pour supprimer le priphrique
  lp, vous devrez utiliser la commande rmmod si c'est un module. Sinon,
  il est inclu dans le noyau, vous devez alors recompiler le noyau avec
  lp comme un module (une ide beaucoup plus sage).

  A nouveau, je vais utiliser les noms un et deux comme exemples. Sur
  un, vous devrez effectuer les tapes suivantes.

  Si vous n'utilisez pas le dmon pour l'automontage des modules et que
  vous compilez PLIP comme un module, vous devrez le charger :




       # insmod plip




  NNBB : Si votre port parallle a une IRQ difrente de 7 et/ou une
  adresse d'E/S diffrente de 0x378, vous devrez l'indiquer  insmod.
  Trouvez l'IRQ et l'adresse E/S qui conviennent (la commande DOS MSD
  sera probablement utile, mais ne lui faites pas trop confiance) et
  tapez quelque chose comme a :




       # insmod plip io=0x278 irq=5




  Habituellement, l'IRQ est 7 ou 5, et l'adresse E/S est 0x378, 0x278 ou
  0x3bc. C'est important de vrifier que l'adresse et l'IRQ
  correspondent  la configuration du matriel (regarder les cavaliers
  sur les vielles cartes, ou le BIOS sur les cartes mres plus
  rcentes).

  Si vous tes du genre paranoaque, vous pouvez vrifier que les
  modules sont chargs avec :



       #lsmod

       Module:        #pages:  Used by:
       plip               3            0




  Notez que le nom de l'interface (plip0, plip1, etc ; pour plus de
  dtails, lisez la section sur les messages du noyau ci-dessus), puis
  initialisez l'interface PLIP :



       #ifconfig plip1 un pointopoint deux up




  NNBB : Si votre port parallle a une IRQ difrente de 7 et/ou une
  adresse d'E/S diffrente de 0x378, vous devrez l'indiquer  ifconfig.
  Utilisez l'IRQ et l'adresse d'E/S indiques dans les messages du noyau
  et lancez quelque chose a :


       # ifconfig plip1 irq 7
       # ifconfig plip1 io_addr 0x3bc




  D'habitude, l'IRQ est 7 ou 5, alors que l'adresse d'E/S est 0x378,
  0x278 ou 0x3bc.

  Maintenant, vrifiez que a marche :



       #ifconfig

       .....
       .....
       plip1     Link encap:10Mbps Ethernet  HWaddr FC:FC:C8:00:00:01
                 inet addr:200.0.0.1  P-t-P:200.0.0.2  Mask:255.255.255.0
                 UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
                 RX packets:0 errors:0 dropped:0 overruns:0
                 TX packets:0 errors:0 dropped:0 overruns:0
                 Interrupt:7 Base address:0x378





  Ajoutez la route vers deux...



       #route add deux




  Et, si vous voulez aussi le systme NFS pour deux :



       #rpc.portmap
       #rpc.mountd
       #rpc.nfsd





  Sur deux, les commandes sont les mmes, mais vous devez crire un  la
  place de deux et _v_i_c_e_-_v_e_r_s_a.

  Une de vos machines doit avoir probablement une seule connexion PLIP.
  Si c'est le cas, vous devez aussi taper la commande :



       #route add default gw un




  sur cette machine. Dans mon exemple, deux est un portable qui ne
  possde qu'une connexion PLIP avec un. J'ai donc taper la commande ci-
  dessus.

  Enfin, on vrifie la connexion  partir de un :



       #ping deux




  et  partir de deux :



       #ping un




  Bien sr, toutes ces commandes peuvent tre excutes automatiquement
  avec un script ou au dmarrage. Vous devez seulement crer ce script
  et l'excuter en tant que root quand vous avez besoin d'une connexion
  PLIP. Vous pouvez galement ajouter une commande dans le fichier
  /etc/rc.d/rc.inet2 pour qu'il soit excut au dmarrage.

  Pour ajuster la connexion PLIP, vous pouvez utliser la commande
  plipconfig. Regarder les pages du manuel pour plus d'informations.

  Pour fermer la connexion PLIP, vous devez lancer la commande :



       # ifconfig plip1 down




  qui efface les entres dans la table de routage.  Si vous n'avez pas
  le dmon pour l'automontage, alors enlever le module :



       # rmmod plip





  77..  FFAAQQ


  Cette section rsoudra, je l'espre, vos problmes. Si vous avez
  d'autres questions, n'hsitez pas  m'envoyer un mail.



    J'ai ces messages au moment du dmarrage (ou lorsque je charge le
     module plip) :



       SIOCSIFADDR: No such device
       SIOCADDRT: Network is unreachable




  et quand j'essaie d'installer la connexion comme expliquer ci-dessus,
  j'obtiens les messages d'erreurs :



       SIOCSIFADDR: No such device
       SIOCSIFDSTADDR: No such device
       SIOCADDRT: Network is unreachable
       mount clntudp_create: RPC: Port Mapper failure - RPC: Unable to send






    Le support PLIP n'est pas disponible dans le noyau, pour
     diffrentes raisons :


    Vous n'avez pas rpondu yes  la question PLIP support? pendant la
     configuration du noyau ;

    Vous avez rpondu yes  la question Printer support pendant la
     configuration du noyau ;

    Vous avez compil PLIP comme un module, vous devez ensuite le
     charger ;

    Le numro du port n'est pas le bon. Vous avez, par exemple, crit
     plip1  la place de plip0.


    Est-ce qu'il y a un moyen pour que le noyau supporte  la fois PLIP
     et LP, en dehors des modules, peut-tre avec deux ports
     parallles ?


    Oui, les deux moyens d'y arriver sont dcrits dans la section
     _P_a_t_c_h_e_s _e_t _c_o_m_m_e_n_t _f_a_i_r_e _c_o_h_a_b_i_t_e_r _P_L_I_P _e_t _L_P ci-dessous :


    Vous pouvez appliquer un patch afin que le noyau les supporte tous
     les deux ;

    Vous pouvez appliquer un autre patch afin que le noyau utilise un
     port parallle pour PLIP et un autre pour LP.



    J'ai crit un script qui tablit la connexion entre mes deux
     machines. Je configure automatiquement la connexion dans mon
     rc.inet2 d'o j'appelle un script qui l'tablit et lance NFS. Ma
     machine deux monte des rpertoires de un ; j'ai ajout les entres
     correctes dans le fichier /etc/fstab de deux. Si je dmarre deux
     alors que un  est teinte, deux s'arrte plusieurs minutes sur le
     message  mounting remote file systems....


    Ce message est affich car deux attend pour monter les systmes de
     fichiers de un, mais si un est teinte, vous devez attendre la fin
     du dlai d'attente de deux. Pour viter a, vous pouvez :


    Mettre en commentaire dans rc.inet2, la commande qui monte les
     systmes de fichiers distants.

    Enlever l'entre dans le fichier /etc/fstab de deux et monter les
     systmes de fichiers distants manuellement quand vous en avez
     besoin.

    Une meilleur solution serait pour deux de dtecter au dmarrage si
     un fonctionne, et de monter le systme de fichier si c'est le cas.
     Ce peut tre ralis en remplaant la commande mount dans rc.d, ou
     autre part, par quelque chose comme ce qui suit :


     ___________________________________________________________________
          if ping -c 5 one ; then
            mount one:/.....
          fi
     ___________________________________________________________________




    Ma connexion fonctionne, mais la commande ping choue. Je reois le
     message suivant de la part du noyau :




       plip1: timed out (1, 89)





  ou bien par des messages similaires.


    Cela veut dire que votre _c__t_ _d_e _l_a _c_o_n_n_e_x_i_o_n fonctionne. Votre
     machine envoie le signal, mais l'_a_u_t_r_e _c__t_ ne rpond pas ou _v_o_t_r_e
     _c__t_ n'attend pas sur les bonnes IRQ/adresse d'E/S. C'est le
     problme le plus courant. Hlas, il y a beaucoup de raisons
     possible, habituellement un cble dfectueux ou une mauvaise IRQ
     et/ou d'adresse d'E/S. Le mauvais IRQ est la source 60% des
     problmes. Il est trs probable qu'en le changeant ou en effectuant
     des modifications de la configuration, cela rsolve le problme.
     Voici une liste dtaille des raisons possibles :


    Le cble n'est bien branch, ou bien il est coup ou de mauvaise
     qualit. Vrifiez le, si possible, entre deux machines sous Linux
     o la connexion PLIP fonctionne dj. Si ce n'est pas possible,
     alors vrifiez au moins le cble avec un testeur. Le fait que le
     cble fonctionne/ne fonctionne pas avec DOS/Windows95 est de
     bon/mauvais augure mais ce n'est pas une preuve.

    PLIP n'est pas install sur la machine de l'_a_u_t_r_e _c__t_ ;

    Il s'agit d'une connexion avec un portable qui ne possde pas de
     port parallle propre, voir la question suivante.

    Vous avez un port parallle vraiment bon march et qui n'est qu'un
     simple port d'imprimante. Il peut envoyer des donness mais pas en
     recevoir.

    Votre port parallle n'est pas configur (au moins) comme bi-
     directionel. Faites le dans le BIOS. Les configurations avances du
     port parallle comme EPP et ECP sont bien mieux.


    Les ports parallles ont diffrentes IRQ. Vous devez donc charger
     le module plip (ou le module lp) avec une IRQ diffrente. Retournez
      la section ``Activation de la liaison PLIP'' et choisissez une
     autre IRQ.

    Certains priphriques peuvent dj utiliser votre IRQ (qui est
     d'habitude l'IRQ 7). Ce peut tre la carte son. Ne fait pas
     confiance aux programmes DOS comme MSD, essayez plutt de charger
     le module plip avec une IRQ diffrente


    J'ai utilis la bonne IRQ et la bonne adresse d'E/S, mais a ne
     fonctionne toujours pas. J'ai rcupr les adresses  partir de la
     commande MSD.

    On m'a envoy message indiquant que MSD donnait des adresses
     errones concernant le port. Essayez plutt le programme :
     http://www.cs.caltech.edu/~huny/para13.zip.


    Ma connexion est install, ping fonctionne bien. Je reois quelques
     fois le message suivant du kernel :



       plip1: timed out (1, 89)





  ou des messages similaires.

    Ces messages veulent dire que l'autre machine n'a pas rpondu avant
     le delai d'expiration (timeout). Si tout fonctionne, vous pouvez
     les ignorer : habituellement, cela veut dire soit que l'autre
     machine est beaucoup plus lente que la votre, soit que c'est d 
     du matriel plus ancien ou un charge plus lourde du systme. Vous
     pouvez essayer d'ajuster la connexion PLIP avec la commande
     plipconfig.


    J'ai install une connexion PLIP, mais si je lance la commande
     ping, j'obtiens 100% de donnes perdues. J'ai connect ma machine 
     un portable.


    Certains ports parallles de portables ne sont pas bon pour PLIP,
     car il s'agit de _p_o_r_t_s _i_m_p_r_i_m_a_n_t_e uunniiqquueemmeenntt, c'est--dire qu'ils
     peuvent seulement transmettre mais pas recevoir de donnes. Je ne
     sais pas s'il existe un moyen d'y arriver.

     Le seul espoir est de :


    Regarder dans le menu de configuration de votre portable. Il est
     peut-tre possible de configurer le _p_o_r_t _p_a_r_a_l_l__l_e comme un port
     parallle  la place d'un port imprimante ;

    Essayer plip en mode 0. Hlas je ne sais pas comment faire et si a
     fonctionne, ou s'il est encore disponible dans les derniers noyaux.


    Quelles vitesses puis-je obtenir avec PLIP ?


    C'est une question  laquelle il est difficile de rpondre. Les
     performances dpendent fortement de diffrents facteurs :


    La vitesse du CPU des deux cts de la connexion ;

    Le type de port parallle et les configurations ;

    La charge du systme ;

    Le type de connexion PLIP utilise.


     Pour juste donner une ide, vous devriez obtenir environs
     40Koctets/sec, beaucoup plus rapide que n'importe quel taux avec
     une connexion srie et proche d'une carte Ethernet bas-niveau.


    Que se passe-t-il si j'ai besoin d'activer (ifconfig up) et
     dsactiver (ifconfig down) plusieurs fois plip1 ?


    Il semble que vous avez besoin d'ajouter l'option -arp  la
     commande ifconfig sauf la premire fois aprs chaque dmarrage. Je
     n'en est pas eu besoin, mais peut-tre que quelqu'un le fait.


    J'ai lu que des numros d'IP sont rservs pour les rseaux privs
     et que 200.0.0.1 et 200.0.0.2 ne sont pas dans ces intervalles.
     Doivent-ils tre changs ?


    Oui. Mais comme je l'ai soulign depuis le dbut, j'ai choisi ces
     adresses IPs uniquement pour leur simplicit. Vous tes libre de
     les changer si vous le souhaitez;. Voici un extrait de
     NET-2-HOWTO(Il s'agit ici d'un extrait du document traduit par
     Frederic Lepied et Jacques Chion -- NdT.) :



        RFC1597 spcifie quelques adresses IP rserves pour les rseaux
        privs. Vous devez les utiliser pour viter d'avoir des
        problmes si vous vous retrouvez reli  l'Internet par
        accident. Ces adresses sont :



          10.0.0.0        -   10.255.255.255
          172.16.0.0      -   172.31.255.255
          192.168.0.0     -   192.168.255.255







    Est-ce qu'il y a un moyen d'ajuster finement les paramtres de PLIP
     sans diter le code source ?


    Oui, il y en a un ! Essayez la commande /sbin/plipconfig. Voir la
     page du manuel pour plus d'informations.



    Mon systme fonctionne avec Debian GNU/Linux, et sous Debian, les
     fichiers /etc/rc.d.rc.inet1 et 2 n'existent pas. O dois-je crire
     les commandes de configuration de PLIP ?


    Sur Debian GNU/Linux vous devez diter le fichier
     /etc/init.d/network. Vous devez y mettre toutes les commandes que
     vous devriez crire dans rc.inet1 et 2.


    J'ai quelques problmes  connecter deux machines avec PLIP. La
     premire a le dernier noyau, la seconde utilise encore la version
     1.0.x de PLIP :est-ce un problme ?


    Oui, il vaut mieux avoir, dans la mesure du possible, la mme
     version de PLIP sur les deux machines. Il est crit dans le fichier
     plip.c que les versions actuelles de PLIP ne fonctionnent pas avec
     les versions 1.0.x de PLIP.


    Jusqu' maintenant, PLIP fonctionnait sur 4 bits. Qu 'en est-il de
     la connexion PLIP sur 8 bits dont j'ai pu lire une description dans
     la documentation du noyau ? Je pense qu'il s'agit du Mode 1.


    Ce Mini-HowTo est destin  la configuration. Pour des informations
     techniques, s'il vous plait, lisez les fichiers
     /usr/src/linux/net/README*.PLIP ou contactez l'auteur. Je sais
     seulement ceci : le standard PLIP utilise le cble "null printer"
     et c'est le Mode 0 (ne le confondez pas avec plip0, qui est le nom
     de l'interface) qui utilise 4 bits. Le Mode 1 utilise 8 bits et
     devrait dja tre disponible. Cependant, vous devrez faire vous-
     mme le cble et la connexion ne marchera qu'entre 2 machines
     Linux. Je ne sais, une fois que vous avez le cble, comment
     configurer la connexion PLIP en Mode 1. Si quelqu'un sait, s'il
     vous plait, faites le moi savoir.






  88..  PPaattcchheess ppoouurr uuttiilliisseerr PPLLIIPP eett LLPP eennsseemmbblleess


  Le meilleur moyen de faire cohabiter PLIP et LP est d'utiliser les
  modules du noyau : vous pouvez charger plip.o et le dcharger quand
  vous avez besoin d'imprimer et _v_i_c_e _v_e_r_s_a. Si vous avez vraiment
  besoin d'utiliser PLIP et LP ensembles, essayez les patches dcrits
  dans les sections suivantes.



  88..11..  PPLLIIPP eett LLPP ssuurr llee mmmmee ppoorrtt


  Si, pour une raison quelconque, vous souhaitez que PLIP et LP soient
  supports directement par le noyau, vous pouvez essayer ces patches.

  Vous devez modifier les parties de codes suivantes, MAIS sauvegarder
  d'abord les fichiers originaux :




  ______________________________________________________________________
  ******** modifications de linux/drivers/char/lp.c ***********************
  struct lp_struct lp_table[] = {
          { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL,
  NULL, },
  /*      { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL,
  NULL, },
          { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL,
  NULL, },
  */
  };
  #define LP_NO 1

  ******** modifications de linux/drivers/net/Space.c ********************
  #if defined(PLIP) || defined(CONFIG_PLIP)
      extern int plip_init(struct device *);
      static struct device plip2_dev = {
          "plip2", 0, 0, 0, 0, 0x278, 2, 0, 0, 0, NEXT_DEV, plip_init, };
      static struct device plip1_dev = {
          "plip1", 0, 0, 0, 0, 0x378, 7, 0, 0, 0, &plip2_dev, plip_init, };
  /*    static struct device plip0_dev = {
          "plip0", 0, 0, 0, 0, 0x3BC, 5, 0, 0, 0, &plip1_dev, plip_init, };
  */
  #   undef NEXT_DEV
  #   define NEXT_DEV     (&plip1_dev)
  #endif  /* PLIP */
  ______________________________________________________________________



  Bien sr, il y a l'avertissement standard : _j_'_a_i _r_e__u _c_e_s _p_a_t_c_h_e_s _e_t
  _j_e _l_e_s _a_i _m_i_s _i_c_i _t_e_l_s _q_u_e_l_s_, _c_'_e_s_t_-__-_d_i_r_e _q_u_e vvoouuss lleess eessssaayyeezz  vvooss
  rriissqquueess eett pprriillss !! Cela dit, votre plus gros dsagrment ne devrait
  tre que la restauration des fichiers et leur recompilation.


  88..22..  PPLLIIPP eett LLPP ssuurr ddeeuuxx ppoorrttss ddiiffffrreennttss


  Si vous avez au moins deux ports parallles, vous pouvez essayer ces
  patches. Ils devraient vous permettre d'utiliser PLIP sur un port et
  LP sur un autre.


  1. Mettre en commentaire un ligne du fichier source du noyau
     drivers/char/lp.c


     ___________________________________________________________________
     struct lp_struct lp_table[] = {
     { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
     { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
     /* { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, */
     };
         3 -> 2
     ___________________________________________________________________



  2. Configuration du noyau


       PLIP (parallel port) support (CONFIG_PLIP) [n] y

       Parallel Printer support [y] y

  3. Le message du noyau au dmarrage est alors :



       lp1 at 0x0378, using polling driver
       .....
       NET3 PLIP version 2.0 gniibe@mri.co.jp
       plip2: Parallel port at 0x278, using assigned IRQ 5.




  Et  nouveau l'avertissement, voir la section ``PLIP et LP sur le mme
  port''.


  99..  CCoonnnneexxiioonn PPLLIIPP eennttrree DDooss eett LLiinnuuxx


  Aprs la premire version de ce Mini-HOWTO, plusieurs personnes m'ont
  crites pour avoir des informations au sujet de la connexion entre une
  machine sous Linux et une autre sous Dos (ou Windows). Cet intrt me
  conduit donc  ajouter cette section qui, je l'espre, viendra en aide
   chacun.

  Cette section provient d'un article que j'ai trouv dans la _L_i_n_u_x
  _G_a_z_e_t_t_e dont l'auteur est James McDuffie mcduffie@scsn.net. Il couvre
  l'installation de base d'une connexion PLIP entre deux machines, l'une
  sous Linux, l'autre sous Dos utilisant Windows et Trumpet Winsock. Il
  donne aussi l'adresse d'un programme intressant qui permet d'ouvrir
  des fentres X-Window sous Windows.

  La partie suivante est un ensemble de notes envoyes par James Vahn
  jvahn@short.circuit.com o il dcrit en profondeur comment installer
  cette connexion et comment rsoudre plusieurs problmes.

  PPoouurr ttoouuttee qquueessttiioonn aauu ssuujjeett ddee cceettttee sseeccttiioonn,, ss''iill vvoouuss ppllaaiitt
  ccoonnttaacctteezz JJaammeess VVaahhnn,, ppaass mmooii..


  99..11..  CCoonnffiigguurraattiioonn dd''uunnee ccoonnnneexxiioonn eennttrree DDooss eett LLiinnuuxx


  Je suppose que vous avez dj installer correctement le support PLIP
  du cot de la machine Linux et que vous avez le bon cble. Sinon
  retournez aux chapitres prcdents.


  Maintenant, du cot du Dos, vous avez, avant tout, besoin d'un pilote
  de paquets Ethernet. Vous pouvez en trouver un  cette adresse :

  ftp://ftp.crynwr.com/drivers/plip.zip

  Le programme s'excute sous Dos et joue le rle d'un pilote de paquets
  Ethernet. Si vous voulez utiliser PLIP sous Windows, vous avez
  galement besoin de Trumpet Winsock. Il sert d'interface TCP/IP.
  Sinon, vous pouvez probablement trouver un logiciel TCP/IP pour Dos.

  Maintenant retournez  l'ordinateur sous Linux et ajoutez l'adresse de
  l'ordinateur sous Dos dans le fichier /etc/hosts. Si votre machine Dos
  n'a pas de d'adresse IP enregistre, vous pouvez choisir n'importe
  quelle adresse (Rappelez vous toutefois l'avertissement de la section
  ``Configuration des fichiers'' au sujet des adresses IP).

  Supposons que vous choisissez le nom linux pour la machine sous Linux
  et dos pour la machine sous Dos. Vous devez taper :
       ifconfig plip1 linux pointopoint dos arp up
       route add dos




  Bien sr si vous voulez que ce soit fait  chaque dmarrage de Linux,
  vous devez ajouter ces lignes dans le fichier /etc/rc.d/rc.inet :


  ______________________________________________________________________
  /sbin/ifconfig plip1 linux pointopoint dos arp up
  /sbin/route add dos
  ______________________________________________________________________



  Ces lignes configurent l'interface et lui ajoutent ensuite une route.
  Bien sr, si vous utilisez le second port parallle, vous devez crire
  plip2  la place de plip1.

  Retournez  la machine sous Dos/Windows et ditez le fichier
  autoexec.bat, vous devez ajouter les lignes suivantes :


  ______________________________________________________________________
  c:\plip\plip.com 0x60
  c:\tcpip\winsock\winpkt.com 0x60
  ______________________________________________________________________




  Je suppose que vous avez mis plip.com (le pilote de paquets) dans le
  rpertoire c:\plip et winpkt.com dans c:\tcpip, sinon vous devez
  mettre le bon chemin.


  Ces lignes configurent le programme plip.com sur le vecteur de paquets
  0x60 et chargent ensuite le programme winpkt.com qui vient sur le mme
  vecteur que le programme Trumpet Winsock. Si le cble est sur un autre
  port que LPT1, vous devrez donner  plip.com le numro d'IRQ et
  l'adresse d'E/S. Pour que le programme winpkt.com puisse tourner,
  Windows doit avoir accs au vecteur de paquets. A partir de
  maintenant, nous allons sous le programme de configuration de Trumpet
  Winsock. Vous n'avez qu' dslectionner SLIP ou PPP et d'entrer 60
  dans la bote nomm Packet vector. Puis indiquez lui l'adresse IP que
  vous donnez  la machine sous Dos, celle de l'ordinateur sous Linux
  comme la passerelle par dfaut et le Serveur de Nom comme l'IP de
  votre ordinateur, ou votre adresse d'ISP pour son serveur de nom (si
  vous allez vous connecter  l'Internet, voir ci-dessous). Fermez le
  programme de configuration, relancez Winsock, et ce devrait tre bon !
  Mettez Winsock dans le _g_r_o_u_p_e _d_e _d__m_a_r_r_a_g_e et il se lancera
  automatiquement  chaque dmarrage de Windows.

  Si vous voulez accder  l'Internet  partir de la machine sous
  Windows, par l'intermdiaire de la machine sous Linux, vous avez
  besoin de configurer l'_I_P _M_a_s_q_u_e_r_a_d_i_n_g. Pour plus d'informations
  dessus, lisez NET-2-HowTo. Votre ordinateur sous Windows utilise
  l'adresse IP de la machine sous Linux.

  J'ai aussi trouv un programme qui vous permet de lancer de programmes
  X-Window sous Windows ! Il se trouve  l'adresse
  http://www.tucows.com/.


  Configurez-le en fonction des directions, puis vous n'avez plus qu'
  faire un telnet depuis votre machine Windows et rediriger l'affichage
  sur votre machine (DISPLAY=duncan:0.0 par exemple). Vous pouvez alors
  lancer le programme dsir.

  Il n'y a rien de plus sympa que de faire tourner xv sous Windows !
  J'espre que tout ceci vous a aid.


  99..22..  EExxpprriieennccee pprraattiiqquuee ddee ccoonnnneexxiioonn PPLLIIPP eennttrree DDooss eett LLiinnuuxx


  NNBB :: J'ai reu ce document de James Vahn jvahn@short.circuit.com et je
  le mets ici sans le modifier. Ainsi, ppoouurr lleess qquueessttiioonnss aauu ssuujjeett ddee
  cceettttee sseeccttiioonn,, iill eesstt bbeeaauuccoouupp pplluuss qquuaalliiffii qquuee mmooii.. IIll vvaauutt ddoonncc
  mmiieeuuxx llee ccoonnttaacctteerr ppaarr ccoouurrrriieerr lleeccttrroonniiqquuee.. Son exprience de
  connexion PLIP entre un ordinateur sous Dos n'ayant qu'un lecteur de
  disquettes et une machine sous Linux est le parfait exemple de la
  manire d'aborder les problmes couramment rencontrs.

  DDeerrnniirree mmiissee  jjoouurr :: 1111 jjuuiilllleett 11999966

  Ma machine Dos qui ne possde qu'un lecteur de disquette est en rseau
  par une connexion PLIP sur le deuxime port parallle sur la machine
  Linux. Une imprimante est branche sur le premier port parallle. Les
  deux machines sont connectes en permanence et la machine sous Dos
  effectue un telnet sur Linux. Voici mes notes sur ma manire de
  l'obtenir.

  Quand le noyau recherche les ports d'imprimantes, il les rcupre
  tous,  moins que vous ayez spcifier de ne pas en rechercher un.
  Sinon PLIP ne pourrait pas trouver de port libre. Une mthode consiste
   charger les pilotes comme des modules lorsque c'est ncessaire...

  gniibe@mri.co.jp crit :


  Je recommande d'utiliser PLIP/LP comme des modules du noyau, pour les
  raisons suivantes :


    les modules sont flexibles en cas changement de configuration ;

    la (re)compilation du noyau n'est pas facile pour les novices ;

    la co-existance de PLIP et LP n'est possible qu'avec les modules.

  Avec PLIP/LP comme modules du noyau, vous pouvez spcifier sur quels
  ports seront PLIP et LP. Voici un exemple :



       # insmod lp.o io=0x378
       # insmod plip.o io=0x278 irq=2




  Vous pouvez mme utiliser deux ports parallles :



       # insmod plip.o io=0x278,0x3bc irq=2,5



  Dans l'exemple ci-dessus,


  plip0 est plac  l'adresse 0x278 et son IRQ est 2 ;

  plip1 est plac  l'adresse 0x3bc et son IRQ est 5.



  Les modules semblent apparemment tre le meilleur moyen pour utiliser
  PLIP et LP ensembles. La mthode suivante montre comment installer
  modifier les sources du noyau afin de permettre  la fois l'imprimante
  et PLIP sur diffrents ports sans utiliser de modules. Si vous n'tes
  pas familier avec les modules, vous pourrez trouver a plus rapide 
  configurer.

  Vous aurez besoin de modifier deux fichiers dans l'arborescence des
  sources du noyau. J'utilise le noyau 1.2.3 et effectuer quelques
  changements ncessaires dans le fichier ../linux/drivers/net/Space.c
  pour qu'il soit conforme  mon systme. Regardez aux alentours de la
  ligne 205 (Le numro de la ligne dpend de la version du noyau. Pour
  un version plus rcente (2.0.30), il faudra regarder autour de la
  ligne numro 295 -- NdT.) pour la dfinitions de PLIP afin d'tre sr
  que le port et l'IRQ conviennent, et noter quel pilote sera utilis
  (plip0, plip1, plip2). Dans mon cas, le port 0x278 utilise l'IRQ 5 (la
  carte est ainsi configure), alors que Space.c le dfinit avec l'IRQ
  2. J'ai prfr faire cette modification plutt que d'ouvrir la
  machine pour changer les jumpers. L'autre alternative consiste 
  spcifier l'IRQ dans la ligne de commande de ifconfig, mais le noyau
  dmarrera avec le mauvais IRQ pour PLIP et ce pourrait tre ennuyeux
  pour vous. Ici, ce n'est qu'un simple changement (un seul caractre).


  L'tape suivante est la plus dlicate :

  Dans le fichier ../drivers/char/lp.c, vous trouverez ce qui suit aux
  alentours de la ligne 35 (Mme numro de ligne pour la version 2.0.30
  du noyau -- NdT) :


  ______________________________________________________________________
  struct lp_struct lp_table[] = {
      { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
      { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
  /*  { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
   * 0x278 reserved for plip1
   *
   * };
   * #define LP_NO 3
   */
  };
  #define LP_NO 2
  ______________________________________________________________________



  Notez que les changements  faire : une des dfinitions de port est
  mise en commentaire. Seulement deux ports sont donc dfinis. Le port
  0x3bc ne fonctionnera probablement pas pour PLIP : la ligne d'IRQ
  n'est normalement pas conserver sur ces ports, comme on le trouve sur
  les vieux adaptateurs monochromes (MDA).

  Vous avez effectu une sauvegarde de ces fichiers avant les changer,
  non ? Maintenant, configurez le nouveau noyau avec les supports
  printer (imprimante), net (rseau), dummy (support fictif) et plip.

  Configuration du systme. Voici mon fichier /etc/rc.d/rc.inet1 :


  ______________________________________________________________________
  #!/bin/bash
  #
  /sbin/ifconfig lo 127.0.0.1
  /sbin/route add -net 127.0.0.0

  /sbin/ifconfig dummy 200.0.0.1
  /sbin/route add -net 200.0.0.0 netmask 255.255.255.0
  /sbin/ifconfig plip1 arp 200.0.0.1 pointopoint 200.0.0.2 up
  /sbin/route add 200.0.0.2
  /sbin/ifconfig dummy down
  ______________________________________________________________________




  Notez que arp est utilis pour la connexion Dos-Linux et n'est
  apparemment pas ncessaire pour lors de connexions Linux-Linux.

  Ensuite ajoutez dans le fichier /etc/hosts les lignes suivantes, elles
  assignent un nom  chaque machine :


  ______________________________________________________________________
  200.0.0.1       console1
  200.0.0.2       console2
  ______________________________________________________________________



  La machine Dos porte le nom de console2. Rappelez vous l'avertissement
  d'Andrea au sujet des IPs : il est prfrable d'utiliser les schmas
  officiels de numrotation.

  Redmarrez la machine afin que les changements et le nouveau noyau
  prennent effet. Pendant la squence de dmarrage (ou en lanant
  dmesg), vous devez avoir les messages suivants si vous avez utiliser
  les patches, sinon quand les modules sont chargs :



       lp0 at 0x03bc, using polling driver
       lp1 at 0x0378, using polling driver
       [....]
       NET3 PLIP version 2.0 gniibe@mri.co.jp
       plip1: Parallel port at 0x278, using assigned IRQ 5.




  La commande route affiche alors ceci :



       Kernel routing table
       Destination     Gateway         Genmask         Flags MSS    Window Use Iface
       console2        *               255.255.255.255 UH    1436   0      136 plip1
       loopback        *               255.0.0.0       U     1936   0      109 lo





  Et la commande ifconfig plip1 affiche :



       plip1     Link encap:10Mbps Ethernet  HWaddr FC:FC:C8:00:00:01
                 inet addr:200.0.0.1  P-t-P:200.0.0.2  Mask:255.255.255.0
                 UP POINTOPOINT RUNNING  MTU:1500  Metric:1
                 RX packets:132 errors:0 dropped:0 overruns:0
                 TX packets:136 errors:0 dropped:0 overruns:0
                 Interrupt:5 Base address:0x278




  Regarder dans le fichier /etc/inetd.conf s'il est possible d'effectuer
  un telnet. Vous pouvez lire la page de manuel de tcpd, l'utilisation
  des fichiers /etc/hosts.allow (ALL: LOCAL) et /etc/hosts.deny (ALL:
  ALL). Vous devriez tre capable de faire un telnet sur une machine
  locale.

  Pour Linux c'est fait, voyons maintenant du cot Dos. A nouveau,
  faites attention au port 0x3bc s'il y en a un prsent.

  J'utilise le programme telnet de NCSA et le pilote PLIP de Crynwr
  trouvs sur les sites suivants :


  ftp://ftp.ncsa.uiuc.edu/Telnet/DOS/ncsa/tel2308b.zip
  ftp://ftp.crynwr.com/drivers/plip.zip



  Soyez sr que vous utilisez la version 2.3.08 du telnet de NCSA et la
  version 11.1 du pilote PLIP de Crynwr. S'il vous plat, lisez le
  fichier SUPPORT.DOC de Crynwr qui doit se trouver quelque part.

  LLee ffiicchhiieerr CONFIG.TEL : la grande partie du fichier est utilisable par
  dfaut et pour conomiser de la place, je n'ai mis ci-dessous que les
  informations dont vous avez besoins (je l'espre). Le deuxime port
  sur cette machine est configur comme 0x278 sur l'IRQ 5.


  ______________________________________________________________________
  myip=200.0.0.2
  netmask=255.255.255.0       # masque de reseau
  hardware=packet             # ensemble d'adaptation du reseau (interface du pilote de paquets)
  interrupt=5                 # IRQ avec laquelle l'adaptateur est configure
  ioaddr=60                   # vecteur d'interruption logiciel que le pilote utilise
  #
  #[...partie inchangee...]
  #
  # a la fin du fichier, mettez cette ligne :
  name=console1 ; hostip=200.0.0.1 ; nameserver=1 ; gateway=1
  ______________________________________________________________________



  (console1 est le nom de la machine Linux, vous pouvez utiliser celui
  que vous dsirez.)

  J'ai fabriqu en cble de 3,5 mtre entre les deux machines, et (aprs
  m'tre aperu que je n'avais pas fait les bons cablges) il n'y a eu
  aucun problme. Un cble standard d'imprimante 11-brins devrait aussi
  faire l'affaire. Le fichier plip.c des sources de Linux montre le
  cblage. Bien que mon cble permettent une connexion 17-17, je ne
  pense pas qu'il soit utilis pour n'importe quoi et qu'il existe tel
  quel dans le commerce.


  ______________________________________________________________________
  @echo off
  plip.com 0x60 5 0x278
  telbin -s console1
  ______________________________________________________________________



  Les lignes prcdentes vous connectent  la machine Linux sur
  /dev/ttyp. Le programme telnet de NCSA fournit 8 crans virtuels et
  aussi agit comme un serveur ftp. L'interface PLIP fournit une assez
  bonne connexion, j'obtiens un taux de transfert de 6.5Koctets/s sur
  mes antiquits. J'espre que vous pourrez faire mieux.


  1100..  CCoonnnneexxiioonn PPLLIIPP eennttrree LLiinnuuxx eett WWiinnddoowwss9955


  Cette section est vide. Je n'utilise pas Windows95 pour des choses
  srieuses mais pour des jeux. Je n'ai donc pas essay et une connexion
  PLIP avec Linux ne m'interresse pas. La question au sujet d'une telle
  connexion a gagn le concours de la question la plus pose. Je donne
  donc ici une rponse (pour l'instant) dfinitive.

  Non, jusqu' maintenant, personne ne m'a rapport avoir russi une
  connexion entre PLIP et Windows95. Si quelqu'un y arrive, dites le moi
  immdiatement : des milliers d'utilisateurs de PLIP sont dans
  l'attente de ces nouvelles.




  1111..  QQuueessttiioonnss ?? CCoommmmeennttaaiirreess ?? EEnnvvooyyeezz--mmooii vvooss rraaccttiioonnss


  Vous pouvez m'envoyer toutes les questions et commentaires par
  courrier lectronique  l'adresse suivante : controzz@cli.di.unipi.it

  Toute raction est la bien venue, toute indication d'erreur est
  prcieuse. La Foire Aux Questions devrait tre plus importante dans la
  prochaine version, si vous m'envoyez des questions, et bien sr les
  rponses si vous les trouver par vous mme.

  S'il vous plait, n'envoyer pas de questions qui se trouve dj dans la
  FAQ.

  Si vous devez me demander de l'aide, s'il vous plait soyez sr de me
  faire connatre toutes les informations susceptibles de m'aider.
  Donnez moi au moins : la version du noyau, les commandes utilises,
  les messages d'erreurs, le cble que vous utilisez et d'autres
  messages du systme en rapport avec PLIP.

  SS''iill vvoouuss ppllaaiitt,, rraappppeelleezz vvoouuss ddee nnee ppaass mm''eennvvooyyeerr ddee qquueessttiioonnss aauu
  ssuujjeett ddeess ccoonnnneexxiioonnss PPLLIIPP aavveecc DDOOSS//WWiinnddoowwss 33..11// WWiinnddoowwss 9955,, jjee nnee ppeeuuxx
  ppaass vvoouuss aaiiddeerr.. CCeess qquueessttiioonnss ddooiivveenntt ttrree eennvvooyyeess  JJaammeess VVaahhnn
  jjvvaahhnn@@sshhoorrtt..cciirrccuuiitt..ccoomm qquuii mm''aa eennvvooyy llaa ppaarrttiiee ssuurr DDOOSS.. AA nnoouuvveeaauu ::
  cc''eesstt iinnuuttiillee ddee ppoosseerr  lluuii ccoommmmee  mmooii ddeess qquueessttiioonnss ssuurr lleess
  ccoonnnneexxssiioonnss PPLLIIPP aavveecc WWiinnddoowwss 9955..

  1122..  OO ttrroouuvveerr lleess nnoouuvveelllleess vveerrssiioonnss ddee ccee MMiinnii--HHoowwTToo



  Ce Mini-HowTo est maintenu par les coordinateurs des HowTos. Il est
  post tous les mois sur le newsgroup comp.os.linux.answers. Il peut
  tre trouv dans le rpertoire des HOWTOs de sunsite.unc.edu et de
  sites mirroirs de sunsite.

  Un autre moyen de trouver cet Mini-HowTo (et de me contacter) d'aller
  sur ma page web personnelle :

  http://www.cli.di.unipi.it/~controzz/intro.html (en italien)

  http://www.cli.di.unipi.it/~controzz/intro_e.html (en anglais)



  1133..  RReemmeerrcciieemmeennttss


  Tous mes remerciements  :


    Rick Lim ricklim@freenet.vancouver.bc.ca pour les patches
     permettant l'utilisation de PLIP et LP ensembles ;

    Takeshi Okazaki GBA03552@niftyserve.or.jp pour les patches
     permettant l'utilisation de PLIP et LP sur deux ports parallles
     diffrents ;

    Jim Van Zandt jrv@vanzandt.mv.com pour les conseils sur la partie
     _t_u_t_o_r_i_e_l_l_e de cet HowTo ;

    Fernando Molina fmolina@nexo.es pour les comentaires utiles au
     sujet des IRQs et des adresses d'entre-sortie.

    James Vahn jvahn@short.circuit.com pour la note sur la connexion
     PLIP entre Dos et Linux ;

    Ceux que ont posts des articles en rapport avec PLIP sur les
     newsgroupes linux et/ou qui m'ont envoy des messages. La liste de
     tous ceux qui m'ont aid avec des informations et des commentaires
     serait plus longue que le Mini-HowTo lui-mme : Merci  tous !


  1144..  CCooppyyrriigghhtt


  Ce HOWTO est  Andrea Controzzi, 1996.

  Sauf indication contraire, les droits d'auteur des HOWTO Linux sont
  dtenus par leurs auteurs respectifs. Les HOWTO Linux peuvent tre
  reproduits et distribus, en totalit ou en partie, sur tout mdia
  physique ou lectronique dans la mesure o ce copyright est prserv
  dans chaque copie. La distribution commerciale en est autorise et
  encourage. L'auteur apprcierait toutefois qu'on lui notifie
  individuellement ce genre de distribution.

  Le prsent copyright doit couvrir toute traduction, compilation et
  autre travail driv des HOWTO Linux. C'est--dire qu'il est interdit
  d'imposer des restrictions de diffusion allant au del du prsent
  copyright  des ouvrages inspirs, ou incorporant des passages, de
  HOWTO Linux. Sous certaines conditions, des exceptions  ces rgles
  seront tolres : contactez le coordinateur des HOWTO  l'adresse
  donne ci-dessous.

  Pour rsumer, nous souhaitons une diffusion aussi large que possible
  de ces informations. Nanmoins, nous entendons garder la proprit
  intellectuelle (copyright) des HOWTO, et apprcierions d'tre informs
  de leur redistribution.


  Si vous avez des questions, merci de contacter Greg Hankins, le
  coordinateur des HOWTO,  l'adresse lectronique
  howto@sunsite.unc.edu.




























































  PPP sur une connexion ISDN
  R. Marc Phillips rmarc@netcom.com
  Adaptation franaise Julien Garnault judge@club-internet.fr
  13 Avril 1996

  C'est un guide basique pour utiliser ppp avec un pripherique ISDN.
  Je ne connais pour l'instant aucun pilotes pour les cartes ISDN dj
  disponibles aux USA. C'est un guide pour l'utilisation de l'ISDN par
  un port srie.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Requis

  2. Installation

     2.1 Scripts et fichiers
     2.2 Vrifications
     2.3 Dconnexion

  3. Conclusion



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  RReeqquuiiss

  La premire chose qui soit ncessaire, c'est que PPP soit compil sur
  votre systme Linux. Avec la plupart des distributions Slackware,
  c'est une option  recompiler ou  installer. Si vous ne l'avez pas,
  vous pouvez rcuprer la dernire BETA sur :
  ftp.funet.fi/pub/Linux/BETA/ppp/ppp-2.2

  Notez que c'est pour les derniers noyaux (1.3.8 et suprieurs), pour
  des noyaux plus vieux vous devriez plutt chercher ppp2.2.0d ou e. Une
  recherche de ppp sur Yahoo <http://www.yahoo.com> devrait donner
  quelque chose.

  Une fois que c'est install, vous pouvez vrifier que cela fonctionne
  en tapant pppd au prompt. Vous verrez alors une suite de caractres
  bizarres qui dfileront sur votre cran. a signifie que vous avez
  russi l'installation. a s'arrtera tout seul au bout d'une minute ou
  deux mais vous pouvez aussi aller sur un autre terminal virtuel pour
  tuer le processus.


  22..  IInnssttaallllaattiioonn


  22..11..  SSccrriippttss eett ffiicchhiieerrss

  Maintenant, il faut faire un fichier nomm pap-secrets. C'est un
  fichier qui contient simplement le nom d'utilisateur et le mot de
  passe. PAP veut dire Password Authentication Protocol qui est une
  fonction de PPP et un composant requis de MultilinkPPP comme dfinit
  dans la documentation RFC : Multilink Protocols (protocole multiliens)
  <http://www.cis.ohio-state.edu/htbin/rfc/rfc1356.html>.


  Vous devez mettre ce fichier dans /etc/ppp et l'appeler, par exemple,
  pap ou pap-secrets. Le nom que vous lui donnerez n'est pas vraiment
  trs important. Le fichier devra avoir deux lignes. La premire
  contenant le nom d'utilisateur, la deuxime le mot de passe.

  Une fois ceci termin, vous pouvez essayer une connexion PPP. La faon
  la plus simple serait de faire un script appel pppfix ou quelque
  chose dans le genre. Voici un exemple :


  #!/bin/sh
  pppd modem crtscts defaultroute +ua [emplacement du fichier pap] connect \
  CONNECT' [votre port serie] 115200



  Vous remarquerez qu'il y a deux parties, celle pour pppd et l'autre
  pour chat.

  J'ai mis tout ce dont vous avez besoin de modifier entre crochets.
  Vous devez les remplacer par les informations appropries. Disons que
  vous ayez un fichier dans votre rpertoire /etc/ppp appel pap qui
  contient votre nom d'utilisateur et votre mot de passe. Vous remplacez
  donc "[emplacement du fichier pap]" par /etc/ppp/pap. Pour "[chaine
  d'init]", vous le remplacez par la chane approprie pour une
  connexion PPP multiliens, (a marchera galement pour un modem, donc
  si vous voulez utiliser un modem mettez une chane approprie). Vous
  pouvez regarder dans votre manuel pour trouver la chane approprie.
  Je vous en donne quelques unes :

  Pour un 3com impact mettez : s71=1s80=1&d2
  Pour un Bitsurfer mettez : %a2=92@b0=2&d2
  Pour un Bitsurfer Pro mettez : %a2=92@b0=2@m2=p&d2
  Pour un Adtran ISU express mettez : s54=12&d2

  Ajoutez tout ce que vous mettez normalement pour votre modem, mais ces
  chanes sont celles ncessaire pour une connexion PPP multiliens. De
  plus, le "&d2" assure que votre modem raccroche quand vous vous
  dconnectez. Certains modems mettent un temps assez long avant de
  raccrocher sans le "&d2" (spcialement les Bitsurfer et
  Bitsurfer pro).

  Aprs le ATD vous mettez le numro ISDN de votre FAI  la place de
  "[numero de telephone]" (notez qu'avec les Bitsurfer et Bitsurfer Pro
  il est ncessaire de dire de composer le mme numro deux fois spars
  par "&.", mais qu'il n'est pas ncessaire de mettre un espace).

  Vous devrez remplacer "[votre port serie]" par le nom du port
  appropri.  Dans la plupart des cas, ce sera /dev/cuaX ou X est un
  chiffre compris entre 0 et 3.  0 pour le port COM1 et 3 pour le port
  COM4.

  Maintenant rendez le fichier excutable en tapant chmod 755 <nom du
  fichier> ou d'autres permissions si vous le voulez (700 si vous voulez
  que seul root ait les droits). Vous vrifierez aussi que le fichier
  pap soit lisible par celui qui lance le processus pppd de telle
  manire qu'il puisse se connecter. Pour lancez la connexion il vous
  suffit de taper le nom du fichier.


  22..22..  VVrriiffiiccaattiioonnss

  Quand vous le lancez, a devrait vous connecter et si vous tapez
  ifconfig au prompt, vous devriez avoir inet addr sous Link encap:
  Point-Point Protocol comme a :

  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
            UP BROADCAST LOOPBACK RUNNING  MTU:2000  Metric:1
            RX packets:132 errors:0 dropped:0 overruns:0
            TX packets:132 errors:0 dropped:0 overruns:0

  ppp0      Link encap:Point-Point Protocol
            inet addr:204.31.114.199  P-t-P:163.179.20.26  Mask:255.255.255.0
            UP POINTOPOINT RUNNING  MTU:1500  Metric:1
            RX packets:47 errors:0 dropped:0 overruns:0
            TX packets:62 errors:0 dropped:0 overruns:0




  22..33..  DDccoonnnneexxiioonn

  Pour raccrocher, tuez le processus. Si vous ne savez pas comment
  faire, tapez man ps et man kill et lisez.

  Voici un exemple :

  kill `ps -x | grep pppd | head -1 | cut -c2-5`




  33..  CCoonncclluussiioonn

  Vous devriez vous crire des script pour grer vos connexions PPP.

  Ce n'est qu'un moyen d'y arriver, il y en a plein d'autres. Vous
  pouvez tlcharger des scripts pour a sur le site suivant :

  ftp.netcom.com/ftp/pub/rm/rmarc/lnxstuff.zip

  Il y a un fichier "ReadMe" avec. Je n'ai pas cris ces scripts et ce
  ne sont pas ceux que j'utilise. Ils sont bien pour les dbutants et
  n'utilisent pas PAP donc vous devez les modifier si vous voulez faire
  des connexions PPP multiliens.

  Bonne Chance.
























  mini-HOWTO PPP-par-minicom
  Winfried Truemper (winni@xpilot.org)
  Traduction : Philippe Martin (feloy@wanadoo.fr)
  v0.0  09 December 1996

  Vous  desirez  un  outil commande par menu pour traiter avec PPP ?  Un
  annuaire  telephonique  puissant  et  facile  d'utilisation  avec  les
  numeros  de telephone de votre ISP ?  Vous voulez voir ce qui se passe
  lors d'une connexion ?  Alors ce mini-HowTo est pour vous !

  11..  IInnttrroodduuccttiioonn

  PPP  est  devenu  le  protocole  reseau  standard  pour  se  relier  a
  l'internet  via  le reseau telephonique.  Le demon pppd associe est un
  outil  de  connexion   tres   primitif   qui   manie   seulement   des
  configurations tres simples.
  Je vais decrire ici une alternative basee sur minicom.

  Cette  documentation  est  une version simplifiee du document allemand
  _I_n_t_e_r_n_e_t_a_n_b_i_n_d_u_n_g _m_i_t _P_P_P (http://www.uni-koeln.de/themen/linux/ppp/).

  11..11..  LLee tteerrmmiinnaall mmiinniiccoomm

  minicom  est  un  outil  tres sophistique pour se connecter a d'autres
  ordinateurs (ISP ou BBS).  Il possede un menu en couleur d'une  grande
  qualite,  un  annuaire  telephonique et un puissant langage de script.
  Il convient donc absolument pour une utilisation conjointe avec  pppd.

  Mais  attention,  si  vous  executez  /sbin/mgetty  /dev/modem,  toute
  personne ayant un compte valide sur votre  machine  peut  utiliser  la
  connexion  (par  exemple  avec  minicom).  Mais  ceci  est  une  autre
  histoire.  Veuillez consulter la documentation sur  mgetty  pour  plus
  d'informations.

  11..22..  CCoommmmeennttaaiirreess

  Je  suis  uniquement  interesse par des remarques qui pourraient faire
  evoluer ce mini-HowTo. Je ne repondrai pas aux questions generales sur
  Linux, PPP, SLIP ou les reseaux.

  11..33..  BBoogguueess ccoonnnnuueess

  A  l'heure  ou  j'ecris ce document, il semble y avoir quelques bogues
  dans minicom, runscript et dans la methode decrite ci-dessous :

  +o  runscript n'attend pas que les programmes externes finissent

             print "ding"
             ! sleep 10
             print "dong"

  Ce script se termine immediatement (mais pas sous strace ...)

  +o  pppd retire le port serie a minicom (quand il  n'est  pas  alimente
     par stdin).

  Il  semblerait  que  Miquel van Smoorenburg (l'auteur de minicom) soit
  trop occupe pour y mettre le  doigt  dessus.  Les  volontaires  seront
  alors les bienvenus.

  22..  SSee ccoonnnneecctteerr aavveecc mmiinniiccoomm

  Un  grand  nombre  de  documentations  sur PPP recommandent de quitter
  minicom apres l'avoir utilise pour se  connecter.   Mais  vous  n'avez
  vraiment pas besoin de quitter cet agreable programme...

  22..11..  CCoonnffiigguurreerr mmiinniiccoomm

  Executez  minicom -s et choisissez l'article de menu _S_e_r_i_a_l _p_o_r_t _s_e_t_u_p
  (Configuration du port serie).  La premiere entree devrait etre _S_e_r_i_a_l
  _d_e_v_i_c_e  (Peripherique serie) et c'est le parametre le plus important :
  le  peripherique  serie  auquel  votre  modem  est   rattache.    (Des
  volontaires  pour  retoucher minicom afin qu'il puisse gerer plusieurs
  peripheriques serie a la fois ?)

  Pressez <<rreettuurrnn>> pour confirmer puis <<eesscc>> pour  revenir  au  menu  de
  configuration   initial.  Choisissez  _E_x_i_t  _t_o  _m_i_n_i_c_o_m  (Sortie  vers
  minicom) et tapez atdt99999.  Votre modem devrait commencer a composer
  le  numero  immediatement et vous devriez entendre un _c_l_i_c_k lorsque le
  modem se relie a la ligne. Heureusement, 99999 n'est pas un numero  de
  telephone valide.

  22..22..  DDeemmaarrrreerr PPPPPP aa llaa mmaaiinn

  Peut-etre  avez-vous deja essaye de composer le numero de telephone de
  votre ISP au lieu de 99999.  Vous avez alors surement vu de droles  de
  caracteres  apparaitre  a  l'ecran  apres  etre  entre dans le systeme
  (sinon, tapez ppp). Ils proviennent  du  demon  pppd  (ou  equivalent)
  demarre  a l'autre bout de la ligne.  Dans ce cas, vous pouvez essayer
  de demarrer le demon pppd de votre cote, et evaluer le fichier _l_o_g par
  la suite.

  Pour  demarrer  pppd  depuis minicom, vous pouvez definir une nouvelle
  methode de chargement (voyez comment par vous-meme)  ou  redefinir  le
  parametre  _k_e_r_m_i_t _p_r_o_g_r_a_m depuis le menu de configuration _F_i_l_e_n_a_m_e _a_n_d
  _p_a_t_h_s(Fichiers et repertoires) :

          A - Download directory :
          B -   Upload directory :
          C -   Script directory :
          D -     Script program : /usr/bin/runscript
          E -     Kermit program : /usr/sbin/pppd file /etc/ppp/mini_options

  Maintenant, si vous voyez  apparaitre  ces  droles  de  caracteres  la
  prochaine  fois  que  vous  appelez votre ISP, vous pouvez presser les
  touches <Alt>+<K> pour demarrer pppd.

  La suite de ce mini-HowTo traite de l'automatisation du  processus  de
  connexion et de demarrage de pppd.

  22..33..  EEvvaalluueerr llee ffiicchhiieerr lloogg

  Bien  que  mon  but ne soit pas d'expliquer comment configurer PPP, je
  donne un petit conseil pour lire le fichier  _l_o_g.  Pour  extraire  les
  informations   essentielles   du   fichier   _l_o_g   /var/log/debug  (ou
  /var/log/daemon.log), executez la commande

          tail -n 40  /var/log/debug |\
                  grep -E " pppd\[[0-9]*\]:" |\
                  sed -e "s/^.*pppd\[/[/"

  Vous devriez voir des messages comme

          sent [LCP ConfReq id=0x1 <mru 296>]
          rcvd [LCP ConfRej id=0x1 <mru 296>]

  qui indiquent que nous avons envoye (_s_e_n_t) une requete  de  configura-
  tion  (_C_o_n_f_i_g_-_r_e_q_u_e_s_t) pour mettre le bloc maximal de reception (_m_a_x_i_-
  _m_u_m _r_e_c_e_i_v_e _u_n_i_t _- _m_r_u) a 296.  Le second message refuse cette config-
  uration  (_c_o_n_f_i_g_u_r_a_t_i_o_n  _r_e_j_e_c_t_e_d).  Dans  ce  cas,  j'ai juste retire
  l'option mru dans /etc/ppp/options (voir plus loin).

  22..44..  CCoonnffiigguurreerr uunn nnuummeerroo ddee tteelleepphhoonnee

  Si tout a bien marche jusqu'ici, vous voudrez surement enregistrer  un
  numero de telephone dans l'annuaire de minicom. Pressez <ALT>+<D> pour
  faire apparaitre le menu de composition d'un numero (_d_i_a_l_i_n_g _m_e_n_u)  et
  utilisez les touches du curseur pour selectionner Edit :

          A -  Name                : Xeno
          B -  Number              : 022039697303
          C -  Dial string #       : 1
          D -  Local echo          : No
          E -  Script              : /etc/ppp/login.script
          F -  Username            : ppp-382
          G -  Password            : top-secret
          H -  Terminal Emulation  : VT102
          I -  Backspace key sends : Delete
          J -  Linewrap            : Off
          K -  Line Settings       : Curr 8N1

  Ceci est un exemple d'entrees pour me connecter a l'un de mes ISP.  Le
  script  /etc/ppp/login.script  apparait  plus  loin.   Deux  variables
  particulieres  sont  passees  au  script  :  $(LOGIN)  et  $(PASS) qui
  prennent les valeurs entrees comme nom d'utilisateur (_F _- _U_s_e_r_n_a_m_e) et
  mot de passe (_G _- _P_a_s_s_w_o_r_d).  Cette caracteristique rend minicom assez
  souple car il utilise un unique script pour automatiser la connexion a
  differents ISP.

  22..55..  UUnn ssccrriipptt ddee ccoonnnneexxiioonn

  minicom  lance  le  script  de connexion apres avoir recu la chaine de
  caracteres CONNECT.  Pour etre plus precis, minicom ne  le  lance  pas
  lui-meme,  mais  appelle  pour  ca  l'utilitaire runscript comme sous-
  procesus.

  En voici un exemple (que j'utilise pour mon ISP) :

          # v1.0, 20.08.96 Winfried Trumper <winni@xpilot.org>
          print ""
          print "Connexion automatique via /etc/ppp/login.script"

          ## Retirez le commentaire si vous devez presser Entree
          ## pour obtenir le prompt
          #send ""

          expect {
                  "ogin:"
                  "ogin>"
                  "sername:"
                  "sername>"
                  "NO CARRIER" exit 1
          }
          send "$(LOGIN)"
          expect {
                  "assword:"
                  "assword>"
                  timeout 20
          }
          send "$(PASS)"
          expect {
                  "port"  send "ppp"
                  "Start your PPP now"
                  "}!}!}"
                  timeout 10
          }
          print ""
          print "Passage en mode PPP ..."
          print ""

          ! /usr/sbin/pppd  file /etc/ppp/mini_options

          print ""
          print "la commande   killall -TERM pppd   termine pppd"

  L'aptitude de runscript a appeler des programmes externes est utilisee
  pour  demarrer pppd.  Copiez votre fichier d'options original pour ppp
  vers  /etc/ppp/options.ttyS1  (remplacez   ttyS1   par   le   nom   du
  peripherique  auquel votre modem est rattache) et supprimez toutes les
  lignes dans /etc/ppp/options specifiques a votre modem (comme connect,
  crtscts ou modem).

  Mettez  les  options  specifiques  a la connexion PPP via minicom dans
  /etc/ppp/mini_options.  Une de ces options devrait etre

          disconnect "chat '' '\d\d+++\d\dATH\r\c'"

  Ceci est indispensable car pppd est alimente par stdin et ne peut  pas
  racccrocher le modem via crtscts.

  22..66..  NNuummeerroottaattiioonn aauuttoommaattiiqquuee aauu ddeemmaarrrraaggee

  Utilisez l'option -d pour numeroter un numero de telephone particulier
  au demarrage de minicom.
  Vous pouvez aussi essayer

          open -sl -- minicom -d 1

  pour envoyer minicom sur une autre console (voir  le  mini-howTo  Con-
  soles-Many pour plus de details).

  22..77..  EExxtteennssiioonnss ffuuttuurreess

  pppd  etant  un  demon,  il  n'est pas concu pour une interaction avec
  l'utilisateur ou pour l'observation.  C'est clair.  Apres  tout,  nous
  utilisons un systeme unix...

  La solution canonique est un programme d'arriere-plan. Des volontaires
  pour tailler minicom en pieces ?

  Des extensions interessantes seraient :

  +o  la generation automatique du script de connexion par  l'observation
     de l'utilisateur se connectant manuellement,

  +o  l'evaluation automatique du fichier _l_o_g avec correction automatique
     des options,

  +o  l'extraction de messages comme ceux vus a la section  ``Evaluer  le
     fichier log''.

  Linux Partition Mini-HOWTO
  Kristan Koehntopp, kris@koehntopp.de Guillaume Bertucat,
  guillaume@ibpc.fr.
  Partition mini-HOWTO v 2.4, le 03 mars 1998

  Ce Mini-HOWTO de Linux dcrit comment prvoir et organiser l'espace
  disque de votre systme Linux. Il traite des aspects matriels des
  disques, des partitions, de la taille et du positionnement des zones
  de swap, des systmes de fichiers, des types de systmes de fichiers
  ainsi que de thmes apparents.  L'objectif est de donner quelques
  notions fondamentales, pas les modes opratoires.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 De quoi s'agit-il?
     1.2 De quoi ne s'agit-il pas (et HOWTO apparents) ?

  2. Qu'est-ce qu'une partition ?

     2.1 Les sauvegardes sont importantes
     2.2 Noms et numros des priphriques

  3. De quelles partitions ai-je besoin ?

     3.1 De combien de partitions ai-je besoin ?
     3.2 Quelle taille attribuer  ma zone swap ?
     3.3 O positionner ma zone swap ?
     3.4 Quelques bricoles au sujet des systmes de fichiers et de la fragmentation
     3.5 Dure de vie des fichiers et cycles de sauvegarde sont des critres dans le choix des partitions

  4. Un exemple

     4.1 Un modle  suivre pour dbutant ambitieux

  5. Comment je m'y suis pris personnellement



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  DDee qquuooii ss''aaggiitt--iill??


  Ceci est un Mini-HOWTO de Linux. Un Mini HOWTO est un court texte qui
  fait le point sur des questions relatives  l'installation et  la
  maintenance de Linux.  C'est Mini, parce que tant le texte que le
  thme trait sont trop "petits" pour justifier un vrai HOWTO ou un
  livre. Un HOWTO ne constitue pas une rfrence : les pages "man" sont
  l pour a.


  11..22..  DDee qquuooii nnee ss''aaggiitt--iill ppaass ((eett HHOOWWTTOO aappppaarreennttss)) ??


  Ce Mini-HOWTO de Linux explique comment prvoir et organiser l'espace
  disque de votre systme Linux. Il traite des aspects matriels des
  disques, des partitions, de la taille et du positionnement des zones
  de swap, des systmes de fichiers, des types de systmes de fichiers
  ainsi que de thmes apparents.  L'objectif est de donner quelques
  notions fondamentales, aussi nous parlerons essentiellement de
  principes et non pas d'outils dans ce texte.

  Dans des circonstances idales, ce document devrait tre lu avant
  votre premire installation, mais c'est sans doute peu raliste dans
  la  plupart des cas. Les dbutants ont gnralement d'autres problmes
  que d'optimiser l'organisation de leur disque. Par consquent, vous
  tes probablement quelqu'un qui vient juste de finir l'installation de
  Linux, et qui maintenant se demande comment optimiser cette
  installation, ou comment viter quelques dplaisantes erreurs de
  calculs pour la prochaine fois. Bien sr, j'espre que lorsqu'ils en
  auront fini avec ce document, certains voudront laisser tomber leur
  ancienne configuration pour une nouvelle installation. :-)

  Ce document se limite pour l'essentiel  la prvision et
  l'organisation de l'espace disque. Il ne dcrit pas l'utilisation de
  fdisk, LILO, mke2fs ou des programmes de sauvegarde. Il y a d'autres
  HOWTO qui traitent de ces problmes. Reportez-vous  la Liste-des-
  HOWTO de Linux pour obtenir les informations relatives aux diffrents
  HOWTOs de Linux. La liste contient galement les informations
  ncessaires pour obtenir les documents eux-mmes.

  Pour apprendre  estimer les besoins en taille et en vitesse pour les
  diffrentes parties du systme de fichiers, reportez-vous au "Linux
  Multiple Disks Layout mini-HOWTO", de Gjoen Stein <gjoen@nyx.net>.

  Pour obtenir des informations et des instructions concernant les
  disques de plus de 1024 cylindres, reportez-vous au "Linux Large Disk
  Mini-HOWTO", de Andries Brouwer <aeb@cwi.nl>.

  Pour obtenir des instructions sur la manire de limiter l'espace
  disque allou  chaque utilisateur, reportez-vous au "Linux Quota
  Mini-HOWTO", de Albert M.C.  Tam <bertie@scn.org>

  Actuellement il n'y a pas de documentation gnrale sur la sauvegarde
  des disques, mais il existe un certain nombre de documents qui font le
  point sur des solutions spcifiques de sauvegarde. Reportez-vous au
  "Linux ADSM Backup Mini-HOWTO" de Thomas Koenig
  <Thomas.Koenig@ciw.uni-karlsruhe.de> pour obtenir des renseignements
  sur la manire d'intgrer Linux dans un environnement de sauvegarde
  IBM ADSM. Reportez-vous au "Linux Backup with MSDOS Mini-HOWTO" de
  Christopher Neufeld <neufeld@physics.utoronto.ca> pour obtenir des
  informations sur les sauvegardes Linux pilots par MSDOS.

  Pour obtenir des instructions sur la manire d'crire et de soumettre
  un HOWTO, reportez-vous  la "Liste-des-HOWTO" de Linux de ric Dumas
  <dumas@Linux.EU.Org>.

  Butiner dans /usr/src/linux/Documentation peut aussi se rvler trs
  instructif.  Les fichiers ide.txt et scsi.txt fournissent quelques
  informations fondamentales sur les proprits de vos pilotes disque,
  et jeter un coup d'oeil  l'arborescence de votre systme de fichiers
  ne peut pas faire de mal.


  22..  QQuu''eesstt--ccee qquu''uunnee ppaarrttiittiioonn ??


  Lorsque les disques durs pour PC ont t mis au point, on a rapidement
  cherch  avoir la possibilit d'installer plusieurs systmes
  d'exploitation, mme si on ne disposait que d'un seul disque. Par
  consquent, il fallait un procd permettant de diviser un seul disque
  physique en plusieurs disques logiques. Une partition, c'est justement
  cela : une section contigu de blocs sur le disque dur, considre
  comme un disque totalement indpendant par la plupart des systmes
  d'exploitation.

  Il est bien vident que les diffrentes partitions ne doivent pas se
  recouvrir : un systme d'exploitation n'apprciera certainement pas
  qu'un autre OS install sur la mme machine crase des donnes
  importantes  cause d'un tel recouvrement. D'autre part, il ne devrait
  pas non plus y avoir de "trou" entre deux partitions adjacentes. Bien
  que ce ne soit pas nuisible en soi, vous gcheriez une place prcieuse
  en laissant vides de tels espaces.

  Il n'est pas indispensable que le disque soit entirement partitionn.
  Vous pouvez dcider de laisser de la place  la fin du disque qui ne
  soit attribue  aucun de vos systmes d'exploitation. Par la suite,
  lorsque vous saurez quel systme vous utilisez le plus souvent, vous
  pourrez partitionner l'espace restant, et crer dessus un systme de
  fichier appropri.

  Les partitions ne peuvent tre ni dplaces, ni redimensionnes sans
  dtruire le systme de fichiers qui s'y trouve. C'est pourquoi
  modifier la table de partition implique gnralement de sauvegarder
  puis de restaurer tous les systmes de fichiers touchs par cette
  opration. En fait il est assez facile de faire des dgts
  irrparables en repartitionnant, et vous devriez faire une sauvegarde
  intgrale de tous les disques de la machine en question avant mme de
  penser  utiliser un utilitaire comme fdisk.

  Bon,  vrai dire, certaines partitions contenant certains types de
  systme de fichiers _p_e_u_v_e_n_t tre coupes en deux sans perte de donnes
  (si vous avez de la chance). Par exemple, il y a un utilitaire appel
  fips pour couper en deux les partitions MS-DOS, ce qui permet de crer
  un espace pour installer Linux sans avoir  rinstaller MS-DOS. Mais
  vous n'avez pas vraiment l'intention de jouer avec a sans sauvegarder
  soigneusement tout ce qui ce trouve sur votre machine ?


  22..11..  LLeess ssaauuvveeggaarrddeess ssoonntt iimmppoorrttaanntteess


  Pour les sauvegardes, les lecteurs de bandes sont vos amis. Ils sont
  rapides fiables et faciles  utiliser, ce qui permet de faire de
  frquentes sauvegardes, de prfrence automatiquement, et sans
  s'embter.

  Je tiens particulirement  insister sur les points suivants : je
  parle de vrais lecteurs de bandes, pas de cette daube de ftape pilote
  par le contrleur du disque. Envisagez d'investir dans le SCSI : Linux
  supporte le SCSI de faon native. Vous n'aurez pas besoin de
  tlcharger des pilotes ASPI. Vous ne perdrez pas non plus de
  prcieuses HMA sous Linux ds que vous aurez install votre contrleur
  SCSI, vous n'aurez plus qu' y ajouter vos disques durs, lecteur de
  bandes et lecteurs CDROM. Pas d'autres adresses I/O, plus besoin de
  jongler avec les IRQ, ni de s'inquiter des compatibilits
  matre/esclave ou des niveaux PIO.  En outre, un contrleur SCSI
  appropri vous donne de hautes performances I/O sans augmenter
  notablement la charge du CPU. Mme en cas de grande activit du
  disque, vous pourrez constater de bons temps de rponse. Si vous
  envisagez d'utiliser un systme Linux comme un centre de distribution
  de news, ou si vous vous apprtez  vous lancer dans le domaine des
  services d'accs  Internet, ne pensez mme pas  un systme sans
  SCSI.


  22..22..  NNoommss eett nnuummrrooss ddeess pprriipphhrriiqquueess


  Le nombre de partitions sur un systme  base d'Intel  t limit
  depuis le commencement : la table de partitions originale faisait
  partie intgrante du secteur d'amorage, et la place prvue nous
  limitait  quatre partitions. Ces partitions sont maintenant appeles
  partitions primaires.  Lorsqu'il est devenu vident que beaucoup
  avaient besoin de plus de quatre partitions sur leurs systmes, les
  partitions logiques ont t cres. Le nombre de partitions logiques
  n'est pas limit : chaque partition logique contient un pointeur sur
  la suivante, et par consquent, vous disposez potentiellement d'une
  liste non limite de partitions.

  Pour des raisons de compatibilit, l'espace occup par les partitions
  logiques doit tre comptabilis. Si vous utilisez les partitions
  logiques, une des partitions primaires est donc note "partition
  tendue" ; son bloc initial et son bloc final dlimitent l'espace
  occup par les partitions logiques. Ceci signifie que l'espace
  attribu pour toutes les partitions logiques doit tre contigu. Il ne
  peut y avoir qu'une seule partition tendue : aucun fdisk n'acceptera
  de crer plus d'une partition tendue.

  Linux ne peut prendre en charge qu'un nombre limit de partitions par
  disque.  Ainsi avec Linux, vous disposez de 4 partitions primaires
  (dont 3 utilisables si vous utilisez les partitions logiques) et au
  mieux 15 partitions en tout sur un disque SCSI (63 en tout sur un
  disque IDE).

  Sous Linux, les partitions sont identifies par des fichiers
  priphriques. Un fichier priphrique est un fichier de type c (pour
  priphrique "caractre", les priphriques qui ne font pas usage de
  la cache tampon) ou b (pour priphrique "bloc", qui font usage de la
  cache tampon). Sous Linux, tous les disques sont reprsents sous la
  forme de priphriques blocs uniquement.  Contrairement  d'autres
  Unix, Linux ne propose pas de version strictement caractre des
  disques et de leurs partitions.

  Les seules choses importantes  retenir d'un fichier priphrique sont
  ses numros de priphrique, majeur et mineur, affichs  la place de
  la taille du fichier :



       ______________________________________________________________________
       $ ls -l /dev/hda
       brw-rw----   1 root     disk       3,   0 Jul 18  1994 /dev/hda
                                          ^    ^
                                          |    numro priphrique mineur
                                          numro priphrique majeur
       ______________________________________________________________________




  Lorsqu'on accde au fichier priphrique, le numro majeur dtermine
  quel pilote priphrique va tre appel pour raliser l'opration
  d'entre/sortie. Cet appel est fait en prenant comme paramtre le
  numro mineur, et c'est l'affaire du pilote d'interprter correctement
  ce numro mineur. La documentation du pilote dcrit gnralement la
  manire dont il interprte ces numros mineurs. Pour les disques IDE,
  cette documentation se trouve dans
  /usr/src/linux/Documentation/ide.txt. Pour les disques SCSI, on
  s'attendrait  trouver la documentation dans
  /usr/src/linux/Documentation/scsi.txt, mais elle ne s'y trouve pas. Il
  peut tre ncessaire de consulter la source du pilote pour tre sr
  (/usr/src/linux/driver/scsi/sd.c:184-196). Heureusement, il y a la
  liste des noms et numros de priphriques de Peter Anvin dans
  /usr/src/linux/Documentation/devices.txt; reportez vous dans cette
  liste  block devices, major 3, 22, 33, 34 pour les disques IDE, et
  major 8 pour les disques SCSI. Les numros majeurs et mineurs sont
  cods chacuns sur un bit, ce qui explique pourquoi le nombre de
  partition par disque est limit.

  Par convention, les fichiers priphriques ont un nom dfini, et la
  plupart des utilitaires systme sont compils en ayant connaissance de
  ces noms. Ils s'attendent  ce que vos disques IDE s'appellent
  /dev/hd* et vos disques SCSI /dev/sd*. Les disques sont numrots a,
  b, c et ainsi de suite, donc /dev/hda est votre premier disque IDE, et
  /dev/sda votre premier disque SCSI. Chaque priphrique reprsente un
  disque  part entire dmarrant au bloc un. crire sur un de ces
  priphriques avec les mauvais utilitaires dtruira l'enregistrement
  principal d'initialisation (MBR) et la table de partition, ce qui
  rendra toutes les donnes de ce disque inutilisables, et le systme ne
  pourra plus dmarrer sur ce disque. Donc soyez srs de ce que vous
  faites, et encore une fois, sauvegardez avant de faire quoi que ce
  soit.

  Les partitions primaires sur le disques sont numrotes 1, 2, 3 et 4.
  Par consquent, /dev/hda1 est la premire partition primaire du
  premier disque IDE, et ainsi de suite. Les partitions logiques se
  voient attribuer les numros 5 et suivants; /dev/sdb5 est donc la
  premire partition logique du second disque SCSI.

  Chaque partition se voit attribuer deux adresses pour les blocs
  initial et final, ainsi qu'un type. Le type est un code numrique (un
  bit) qui dfinit une partition pour un systme d'exploitation donn.
  Pour la plus grande joie des experts, il n'existe pas vraiment de code
  unique dfinissant les diffrents types de partition, aussi il y a
  toujours une possibilit que deux systmes d'exploitation utilisent le
  mme code pour des partitions de type diffrent.

  Linux rserve les codes 0x82 pour les partitions swap, et 0x83 pour
  les systmes de fichier "natif" (c'est  dire ext2 pour la plupart
  d'entre vous). Autrefois populaire et maintenant prim, le systme de
  fichiers Linux/Minix utilisait le code 0x81 pour ses partitions. OS/2
  marque ses partitions du type 0x07, tout comme les NTFS de Windows NT.
  MS-DOS attribue plusieurs codes pour les diffrentes FAT de ses
  systmes de fichier : on connat 0x01, 0x04 et 0x06.  DR-DOS utilisait
  0x81 pour indiquer une partition FAT protge, ce qui gnrait un
  conflit avec les partitions Linux/Minix, mais ni l'une ni l'autre ne
  sont trs utilises maintenant. La partition tendue qui sert de
  container pour les partitions logiques  le code 0x05.

  Les partitions sont cres et supprimes avec l'utilitaire fdisk. Tout
  systme d'exploitation qui se respecte possde un fdisk, qui
  d'ailleurs est traditionnellement appel fdisk (ou FDISK.EXE) dans
  quasiment tous les OS. Certains fdisk, dont celui du DOS, sont quelque
  peu limits pour grer les partitions d'autres systmes
  d'exploitation. Parmi ces limites, l'impossibilit de prendre en
  compte tout ce qui est identifi par un code de type tranger,
  l'impossibilit de prendre en compte plus de 1024 cylindres, et
  l'impossibilit de crer ou mme de reconnatre une partition dont la
  fin ne concide pas avec la borne d'un cylindre. Par exemple, le fdisk
  de MS-DOS ne peut pas supprimer les partitions NTFS, le fdisk de OS/2
  tait rput pour "corriger" silencieusement les partition cres par
  le fdisk de Linux dont la fin ne concidait pas avec une borne de
  cylindre, et tant le fdisk de MS-DOS que celui de OS/2 ont eu des
  problmes avec les disques de plus de 1024 cylindres (reportez-vous au
  "large-disk Mini-HOWTO" pour de plus amples dtails sur ces disques).


  33..  DDee qquueelllleess ppaarrttiittiioonnss aaii--jjee bbeessooiinn ??

  33..11..  DDee ccoommbbiieenn ddee ppaarrttiittiioonnss aaii--jjee bbeessooiinn ??



  Donc, de quelles partitions ai-je besoin ? Pour commencer, certains
  systmes d'exploitation ne croient pas au dmarrage  partir de
  partitions logiques pour des raisons qui sont  la porte de tout
  esprit sain. De ce fait, vous voudrez certainement rserver vos
  partitions primaires comme partitions d'amorage pour MS-DOS, OS/2 et
  Linux ou pour quelque autre systme que vous utilisiez.  Rappelez-vous
  toutefois qu'une partition primaire est ncessaire pour crer la
  partition tendue qui servira de container pour les partitions
  logiques qui occuperont le reste de votre disque.

  L'amorage des systmes d'exploitation se passe en mode rel et
  implique toutes les limitations lies au BIOS, et surtout celle des
  1024 cylindres. Vous voudrez donc probablement placer toutes vos
  partitions de dmarrage dans les 1024 premiers cylindres de votre
  disque dur, afin d'viter des complications. A nouveau, je vous invite
   lire le "large-disk Mini-HOWTO" pour les dtails saignants.

  Pour installer Linux, vous aurez besoin d'au moins une partition. Si
  le noyau est charg depuis cette partition (par exemple grce  LILO),
  cette partition doit tre lisible du BIOS. Si vous chargez votre noyau
  par d'autres moyens (par exemple depuis une disquette d'amorage ou
  avec LOADLIN.EXE, le lanceur de Linux depuis MS-DOS), cette partition
  peut tre n'importe o. Dans tous les cas, le type de cette partition
  sera "Linux native", code 0x83.

  Votre systme aura besoin d'espace swap. A moins de swaper sur des
  fichiers, il vous faudra une partition swap ddie. Du fait que ce
  type de partition n'est accessible que par le noyau de Linux, et que
  ce noyau n'est pas affect par les dficiences du BIOS de votre PC, la
  partition swap peut tre installe n'importe o. Je recommande
  d'utiliser pour cela une partition logique (/dev/?d?5 ou une des
  suivantes). Les partitions swap ddies de Linux sont de type "Linux
  swap", code 0x82.

  Ces exigences sont le minimum en terme de partitions. Il peut
  toutefois se rvler utile de crer plus de partitions pour Linux,
  comme la suite le montrera.



  33..22..  QQuueellllee ttaaiillllee aattttrriibbuueerr  mmaa zzoonnee sswwaapp ??


  Si vous avez dcid d'utiliser une partition ddie  la zone swap, ce
  qui est une Bonne Ide [tm], considrez les indications suivantes pour
  estimer sa taille :


    Sous Linux, la taille de la RAM et celle de la zone swap
     s'additionnent (ce qui n'est pas vrai pour tous les Unix). Par
     exemple, si vous avez 8 Mo de RAM et 12 Mo de swap, vous disposez
     d'un total d'environ 20 Mo de mmoire virtuelle.

    En choisissant la taille de votre zone swap, gardez prsent 
     l'esprit que vous devriez disposer d'au moins 16 Mo de mmoire
     virtuelle. Ainsi pour 4 Mo de RAM envisagez un minimum de 12 Mo de
     swap ; pour 8 Mo de RAM, envisagez un minimum de 8 Mo de swap.

     Sous Linux, une partition swap ne peut pas excder 128 Mo. En
     ralit, sa taille pourrait dpasser 128 Mo, mais l'espace en excs
     ne serait jamais utilis. Si vous voulez plus de 128 Mo de swap,
     vous devez crer plusieurs partitions swap.

     En choisissant la taille de votre zone swap, rappelez vous qu'une
     zone swap trop grande ne sera pas vraiment utile.

     Tout processus possde un "jeu d'instructions" qui correspond  un
     ensemble de pages mmoire, et auquel le processeur accdera 
     nouveau dans un temps trs court. Linux essaie de prvoir ces accs
     mmoire (en partant du principe que les pages rcemment utilises
     le seront  nouveau dans un futur proche) et conserve ces pages
     dans la RAM si c'est possible. Si le programme respecte strictement
     le principe de localit, cette hypothse sera vrifie, et
     l'algorithme de prdiction fonctionnera.

     Conserver en mmoire une zone de travail n'a de signification que
     s'il y a suffisamment de mmoire. Si trop de processus s'excutent
     en mme temps sur une mme machine, le noyau est alors dans
     l'obligation de paginer des donnes auxquelles il devra accder de
     nouveau trs rapidement (il faudra donc paginer sur disque des
     donnes provenant d'une autre zone de travail pour pouvoir les
     appeler en mmoire). Ceci induit gnralement une augmentation
     critique de l'activit de pagination, et donc une substantielle
     baisse de performances. On dit d'une machine dans cette situation
     qu'elle "rame".

     Sur une machine qui rame, les processus tournent essentiellement
     sur disque, et non dans la RAM. On peut donc s'attendre  une chute
     de performances de l'ordre de grandeur du rapport entre le temps
     d'accs mmoire et le temps d'accs disque.

     Mon petit doigt m'a parl d'une trs vieille rgle datant de
     l'poque du PDP et du Vax, et qui est la suivante : la taille du
     jeu d'instructions d'un programme est gale  environ 25 % de sa
     taille virtuelle. Ainsi, il est sans doute inutile de prvoir plus
     de swap que trois fois la taille de votre RAM.

     Mais rappelez-vous que c'est seulement mon petit doigt qui me l'a
     dit. On peut facilement imaginer des cas ou les programmes ont un
     trs grand, ou au contraire un trs petit jeu d'instructions. Par
     exemple, un programme de simulation avec un trs grand jeu de
     donnes auxquelles il accde de manire quasi alatoire ne
     respectera pas vraiment le principe de localit dans son segment de
     donnes, et donc son jeu d'instructions sera relativement
     important.

     D'un autre ct, xv avec de nombreux JPEGs ouverts simultanment,
     mais tous iconifis sauf un, aura un trs gros segment de donnes.
     Mais les oprations ne sont faites que sur une seule image  la
     fois, et donc la plus grande partie de la mmoire utilise par xv
     n'est jamais accde. C'est galement vrai dans le cas d'un diteur
     multi-fentres o seule une page  la fois est active. Ces
     programmes - s'ils sont conus correctement - respectent
     rigoureusement le principe de localit, et la plus grande partie de
     la place qu'ils occupent peut rester dans la swap sans qu'on
     observe de diminution substantielle des performances.

     On peut suspecter que ce chiffre de 25 % datant de l'poque de la
     ligne de commande n'est plus vrai pour les logiciels modernes dots
     d'une IHM graphique et capables d'diter simultanment plusieurs
     documents, mais je n'ai connaissance d'aucune donne rcente
     permettant d'actualiser ces chiffres.

  En rsum, si on dispose de 16 Mo de RAM, un configuration minimale
  peut se passer de swap, et attribuer plus de 48 Mo  la swap est sans
  doute inutile.  L'appoint exact de mmoire requise dpend des
  applications qui tournent sur la machine (qu'est-ce que vous vous
  tiez imagin ?).




  33..33..  OO ppoossiittiioonnnneerr mmaa zzoonnee sswwaapp ??



     Les mouvements mcaniques sont lents, et les mouvements
     lectroniques rapides.

     Les disques rcents on plusieurs ttes de lecture. Permuter entre
     les ttes qui se trouvent sur la mme piste est rapide, puisque
     c'est purement lectronique.  Par contre changer de piste est lent,
     puisque a implique un mouvement des ttes.

     Par consquent si vous avez un disque avec plusieurs ttes de
     lecture et un autre qui en a moins, les autres paramtres tant
     identiques, le disque qui a le plus de ttes de lectures sera le
     plus rapide.

     Dcouper la zone swap en la rpartissant sur les disques acclrera
     aussi la vitesse d'accs.

     Les anciens disques ont le mme nombre de secteurs sur toutes les
     pistes.  Avec ce type de disque, la vitesse maximum est
     gnralement obtenue en plaant la zone swap au milieu du disque,
     si on part du principe que la tte de lecture devra se dplacer
     d'une piste quelconque vers l'emplacement physique de la zone swap.

     Les disques plus rcents utilisent le ZBR (bit d'enregistrement de
     zone).  Les pistes externes contiennent un plus grand nombre de
     secteurs. Pour une vitesse de rotation constante, on obtient donc
     un bien meilleur rendement pour les pistes externes que pour les
     pistes internes. Placer de prfrence votre zone swap sur les
     pistes les plus rapides.

     Mais bien sr, la tte de lecture n'est pas anime de mouvement
     alatoires. Si le milieu du disque tombe entre une partition /home
     en accs constant et une partition d'archivage presque jamais
     utilise, vous feriez mieux de placer votre zone swap au milieu de
     la partition /home, pour limiter l'amplitude de mouvement des ttes
     de lecture. Le mieux, dans ce cas, serait mme de placer votre zone
     swap sur un autre disque, moins activement utilis.

  EEnn rrssuumm :: Placez votre zone swap sur un disque rapide quip de
  plusieurs ttes de lecture et qui n'est pas trop accapar par d'autres
  tches. Si vous avez plusieurs disques, rpartissez la zone swap sur
  tous ces disques, mme si leurs contrleurs sont diffrents.

  EEnnccoorree mmiieeuuxx :: Achetez plus de RAM.


  33..44..  QQuueellqquueess bbrriiccoolleess aauu ssuujjeett ddeess ssyyssttmmeess ddee ffiicchhiieerrss eett ddee llaa
  ffrraaggmmeennttaattiioonn


  L'espace disque est administr par le systme d'exploitation en units
  de blocs et fragments de blocs. En ext2, fragments et blocs doivent
  tre de la mme taille, aussi nous limiterons la discussion aux blocs.

  Les fichiers ont des tailles trs variables qui ne concident pas
  ncessairement avec la fin d'un bloc. Par consquent, pour chaque
  fichier, un partie du dernier bloc est gaspille. Supposons que la
  taille des fichiers soit alatoire, il y a en moyenne un demi-bloc
  perdu pour chaque fichier prsent sur le disque. Dans son livre
  "Operating systems", Tanenbaum appelle a la "fragmentation interne".

  On peut dduire le nombre de fichiers prsents sur le disque  partir
  du nombre d'inodes allous. Par exemple sur mon disque :
       ______________________________________________________________________
       # df -i
       Filesystem           Inodes   IUsed   IFree  %IUsed Mounted on
       /dev/hda3              64256   12234   52022    19%  /
       /dev/hda5              96000   43058   52942    45%  /var
       ______________________________________________________________________




  Il y a donc environ 12000 fichiers sur / et prs de 44000 sur /var.
  Pour des blocs d'une taille de 1 Ko,  peu prs 6+22 = 28 Mo d'espace
  disque sont perdus dans les derniers blocs des fichiers. Si j'avais
  choisi des blocs d'une taille de 4 Ko, j'aurais perdu 4 fois plus de
  place.


  Les transferts de donnes sont plus rapides avec de grands tronons
  contigus de donnes. C'est pourquoi l'ext2 s'efforce de pr-allouer
  l'espace en units de 8 blocs contigus pour les fichiers en cours
  d'criture. L'espace pr-allou non utilis est libr lors de la
  fermeture du fichier, ainsi il n'y a pas de gaspillage.

  Un rangement non contigu des blocs dans un fichier est prjudiciable
  pour les performances, du fait qu'on accde gnralement aux fichiers
  de manire squentielle. Cela oblige le systme d'exploitation 
  dcouper les accs disque et le disque  dplacer la tte de lecture.
  On appelle cela la "fragmentation externe", ou simplement la
  "fragmentation", qui est un problme courant avec les systmes de
  fichiers de type DOS.

  ext2 utilise plusieurs stratgies afin d'viter la fragmentation
  externe.  Normalement la fragmentation n'est pas un gros problme en
  ext2, mme avec des partitions trs utilises, comme une file
  d'attente news. Bien qu'il existe un utilitaire de dfragmentation des
  systmes de fichier ext2, personne ne l'utilise et il n'est pas  jour
  avec la dernire version de ext2. Utilisez le si vous y tenez, mais 
  vos risques et prils.

  Le systme de fichiers MS-DOS est rput pour sa gestion pathologique
  de l'espace disque. La conjugaison d'un cache tampon abyssal et de la
  fragmentation a des consquences tout  fait dommageables sur les
  performances. Les utilisateurs de DOS sont habitus  dfragmenter
  leurs disques toutes les quelques semaines et certains ont mme mis au
  point un rituel quasi religieux concernant la dfragmentation. Aucune
  de ces habitudes ne devrait tre transpose sous Linux et ext2. Le
  systme de fichiers natif de Linux n'a pas besoin de dfragmentation
  en utilisation normale, ce qui inclut n'importe quelle condition du
  moment que 5 % de l'espace disque reste libre.

  Le systme de fichiers MS-DOS est aussi rput pour perdre une grande
  quantit d'espace disque en raison de la fragmentation interne. Pour
  des partitions d'une taille suprieure  256 Mo, la taille des blocs
  DOS devient si importante qu'ils ne sont plus d'aucune utilit (cela a
  t corrig jusqu' un certain point avec la FAT32).

  ext2 ne force pas l'utilisation de grands blocs dans le cas de grand
  systmes de fichiers,  l'exception des trs grands systmes de
  fichier de l'ordre de 0.5 To (1 Tera-octet = 1024 Go) et plus, pour
  lesquels les blocs de petite taille deviennent inefficaces. Donc,
  contrairement au DOS, il n'est pas ncessaire de dcouper les grands
  disques en plusieurs partitions pour conserver des blocs de petite
  taille. Dans la mesure du possible, utilisez la taille par dfaut de 1
  Ko.  Vous voudrez peut tre exprimenter des blocs de 2 Ko pour
  certaines partitions, mais attendez vous  rencontrer quelques bugs
  peu courants : presque tout le monde utilise la taille par dfaut.
  33..55..  llee cchhooiixx ddeess ppaarrttiittiioonnss DDuurree ddee vviiee ddeess ffiicchhiieerrss eett ccyycclleess ddee
  ssaauuvveeggaarrddee ssoonntt ddeess ccrriittrreess ddaannss


  Sous ext2, les dcisions concernant le choix des partitions devraient
  tre diriges par des considrations lies aux sauvegardes, et de
  manire  viter la fragmentation externe due aux dures de vie des
  diffrents fichiers.

  Les fichiers ont une dure de vie. Une fois cr, un fichier restera
  un certain temps sur le systme avant d'tre supprim. La dure de vie
  des fichiers varie considrablement au sein du systme, et dpend en
  partie du chemin d'accs du fichier. Par exemple, les fichiers
  prsents dans /bin, /sbin, /usr/sbin, /usr/bin ou quelqu'autre
  rpertoire du mme type ont une dure de vie trs longue : de nombreux
  mois, voire plus. Les fichiers prsents dans /home ont une dure de
  vie intermdiaire :  peu prs quelques semaines. Les fichiers
  prsents dans /var ont gnralement une dure de vie courte :
  quasiment aucun fichier dans /var/spool/news ne restera plus de
  quelques jours, et dans /var/spool/lpd le temps de vie se mesure en
  minutes voire moins.

  Pour sauvegarder, il peut tre utile de s'assurer que la taille d'une
  sauvegarde journalire reste infrieure  la taille du support de
  sauvegarde. Une sauvegarde journalire peut tre complte ou
  diffrentielle.

  Vous pouvez dcider de conserver des tailles de partitions
  suffisamment petites pour tenir compltement sur un seul support de
  sauvegarde (auquel cas, faites des sauvegardes journalires
  compltes). Dans tous les cas, la taille d'une partition devrait tre
  telle que son "delta" journalier (tous les fichiers modifis) puisse
  tenir sur un seul support de sauvegarde (faites une sauvegarde
  diffrentielle, et prvoyez de changer le support pour la sauvegarde
  hebdomadaire/mensuelle complte).

  Votre stratgie de sauvegarde repose sur ces dcisions.

  Lorsque vous achetez et organisez de l'espace disque, pensez  mettre
  de cot une somme suffisante pour les sauvegardes affrentes ! Des
  donnes non sauvegardes sont sans valeur ! Le cot de reproduction
  des donnes est de loin plus lev que celui de la sauvegarde, pour
  qui que ce soit !

  Pour des raisons de performances, il est utile de conserver des
  fichiers ayant des dures de vie diffrentes sur des partitions
  diffrentes. De cette manire, les fichiers phmres de la partition
  .../news peuvent tre trs lourdement fragments. Cela n'aura aucune
  incidence sur les performances des partitions / ou /home.


  44..  UUnn eexxeemmppllee

  44..11..  UUnn mmooddllee  ssuuiivvrree ppoouurr ddbbuuttaanntt aammbbiittiieeuuxx


  Un modle courant propose la cration des partitions /, /home et /var
  pour des raisons abordes plus haut. Cela simplifie tant
  l'installation que la maintenance, et la diffrenciation est
  suffisante pour viter les effets pervers des dures de vie
  diffrentes. C'est aussi un bon modle en ce qui concerne la
  sauvegarde : personne ne se soucie de sauvegarder les files d'attente
  "news" et seulement quelques fichiers de /var peuvent tre utilement
  sauvegards (comme /var/spool/mail). D'un autre cot, / change trs
  peu souvent et peut n'tre sauvegard que ponctuellement (aprs un
  changement de configuration), et sa taille relativement faible permet,
  pour la plupart des supports modernes, de faire une sauvegarde
  complte (prvoyez de 250  500 Mo en fonctions des logiciels
  installs). /home contient les prcieuses donnes des utilisateurs et
  devrait tre sauvegard chaque jour.  Certaines configurations
  prsentent un /home trs important et doivent par consquent faire
  appel au sauvegardes diffrentielles.

  Certains systmes prvoient une partition spare pour /tmp, d'autres
  crent un lien symbolique sur /var/tmp pour obtenir un rsultat
  similaire (notez que cela peut affecter le mode "single user" pour
  lequel /var ne sera pas disponible,  moins de le crer ou de le
  monter manuellement) ; ou encore placez le sur disque RAM (comme c'est
  le cas sous Solaris). Cela tient /tmp spar de /, ce qui es une bonne
  ide.

  Ce modle est tout  fait adapt aux mises  jour ou aux
  rinstallations : sauvez vos fichiers de configuration (ou la totalit
  de /etc) dans un rpertoire de /home, dbarrassez vous de /,
  rinstallez et rcuprez votre ancienne configuration  partir du
  rpertoire de sauvegarde sur /home.


  55..  CCoommmmeenntt jjee mm''yy ssuuiiss pprriiss ppeerrssoonnnneelllleemmeenntt


  Un vieux 386/40 sur bus ISA tranait sur mon tagre depuis deux ans.
  J'avais l'intention de le transformer en un petit serveur non-X pour
  mon rseau local.

  Voici comment je m'y suis pris : j'ai rcupr ce 386 et l'ai dot de
  16 Mo de RAM. J'y ai ajout le disque le moins cher et le plus petit
  que j'ai pu trouver (800 MB), une carte Ethernet et une vieille
  Hercules parce que j'avais toujours le moniteur. J'ai install Linux,
  ce qui m'a permis de disposer d'un serveur NFS, SMB, HTTP, LPD/LPR et
  NNTP familial ainsi que d'un routeur mail et d'un serveur POP3. Avec
  en plus une carte RNIS, cette machine me sert maintenant en plus de
  routeur TCP/IP et de pare-flamme.

  L'essentiel de l'espace disque sur cette machine est pass dans les
  rpertoires de /var, /var/spool/mail, /var/spool/news et
  /var/httpd/html. J'ai plac /var sur un partition spare, que j'ai
  cre suffisamment grande. Comme il n'y aura autant dire pas
  d'utilisateurs sur cette machine, je n'ai pas cr de partition home,
  et j'ai donc mont /home depuis une autre station de travail via NFS.

  Une partition / de 250 Mo est amplement suffisante pour Linux sans X,
  dot de quelques utilitaires locaux supplmentaires. Cette machine a
  16 Mo de RAM, mais elle est destine  piloter de nombreux serveurs.
  16 Mo de swap serait correct, 32 Mo l'abondance. Comme l'espace disque
  le permet, disons 32 Mo de swap. Conservons une partition MS-DOS de 20
  Mo. Comme j'ai dcid d'importer /home depuis une autre machine, les
  500+ Mo constitueront /var.  C'est plus que suffisant pour un centre
  de distribution de news familial.


  Nous avons donc :










  ______________________________________________________________________
  Device     Mounted on                      Size
  /dev/hda1  /dos_c                           25 MB
  /dev/hda2  - (Swapspace)                    32 MB
  /dev/hda3  /                               250 MB
  /dev/hda4  - (Extended Container)          500 MB
  /dev/hda5  /var                            500 MB

  homeserver:/home /home                     1.6 GB
  ______________________________________________________________________




  J'effectue les sauvegardes de cette machine via le rseau en utilisant
  le lecteur de bande de homeserveur. Du fait que l'installation a t
  faite  partir d'un CDROM, je n'ai besoin de sauvegarder que quelques
  fichiers de /etc, mes fichiers *.tgz personnaliss installs
  localement sur /root/Source/Installed et /var/spool/mail ainsi que
  /var/httpd/html. Je copie chaque nuit ces fichiers dans un rpertoire
  ddi /home/backmeup sur homeserver, o la sauvegarde rgulire de
  homeserver les rcupre.












































  Mini-Howto sur la rcupration d'une partition
  AUTEUR Rolf Klausen, rolfk@romsdal.vgs.no
  v1.1, 22 Octobre 1997

  Ce document dcrit comment rcuprer une partition dtruite par MS-DOG
  ______________________________________________________________________

  Table des matires


  1. INTRODUCTION

     1.1 Dclaration
     1.2 Copyright

  2. PREPARATIONS ET BESOINS

     2.1 Ce dont vous avez besoin
     2.2 Je suppose que ...

  3. JE VEUX RETROUVER MA PARTITION!

     3.1 Le programme
     3.2 Changer la partition en partition Linux native
     3.3 La touche finale

  4. CONTRIBUTIONS

     4.1 Auteurs
     4.2 Remerciements
     4.3 Mes remerciements ne vont pas  ...


  ______________________________________________________________________

  11..  IINNTTRROODDUUCCTTIIOONN

  IInnttrroodduuccttiioonn J'ai install Linux sur mon ordinateur et je l'utilise
  depuis un an maintenant, et je pense que c'est le meilleur OS jamais
  cr. J'ai aussi MS-DOG ET Windows NT 4.0 install sur mon ordinateur.
  La raison pour laquelle j'utilise MS-DOG est trs simple, car comme
  l'a crit Lars Wirzenius une fois :" MS-DOS - you can't live with it,
  you can't live without it " (MS-dos - vous ne pouvez ni vivre avec, ni
  vivre sans).  Je l'utilise pour les jeux, les dmos, et aussi pour le
  travail. Mais cela suffit. J'ai deux partitions DOS, une partition
  primaire et un disque logique (je suppose que vous savez ce que c'est,
  sinon lisez le mini-HOWTO sur la Partition. On peut le trouver 
  sunsite.unc.edu et sans doute dans d'autres endroits). Mes partitions
  ont  peu prs 500 MB chacun (j'ai un disque dur de 3.2 GB et un autre
  de 1.2 GB). Ma partition Linux est de 1200 MB. J'ai un espace libre
  d'environ 800 MB dont je ne sais pas quoi faire pour l'instant, et je
  me demandais comment je m'y prendrais si j'avais besoin de plus
  d'espace pour DOS (un jeu important ou autre chose), parceque je ne
  savais pas combien de disques logiques DOS pouvait grer en tout. Je
  ne sais pas pourquoi mais je pensais que DOS ne pouvait en avoir qu'un
  (en plus de sa partition primaire).  Aussi je voulais vrifier que DOS
  pouvait accder   plusieurs disques logiques. Je dmarrais fdisk
  (DOS) et utilisais le menu pour crer un disque logique DOS. J'en
  crais un de 100 MB. Puis je le formattais et tout marchait
  parfaitement.Pense trs agrable ! Et alors je connus a! En realit
  je n'avais pas besoin de ce disque et je dcidais donc de le dtruire.
  J'utilisais de nouveau fdisk, choisissais dans le menu "delete DOS
  primary partition or logical drive"(dtruire une partition primaire ou
  un disque logique ou quelque chose de ce genre), slectionnais le
  disque E: pour le dtruire, tapais le label du volume (en ralit il
  n'y en avait pas donc je tapais enter), et fdisk m'avertit que le
  disque avait t dtruit avec succs.  Puis je redmarrais. Sur mon
  ordinateur j'utilise un programme appel System Commander. C'est un
  bon programme qui propose un menu sympa (comme le Boot Manager d'OS/2)
  avec icnes et quelques outils intressants. Il dtecte
  automatiquement les OS.

  Mais quand je redmarrais, Linux avait disparu du menu. Je dmarrais
  DOS, tapais e: suivi d'ENTER, et tout restait calme. Je redmarrais
  fdisk, choisissais d'afficher la table des partitions, mon disque E: y
  tait prsent et l o se trouvait ma partition Linux il n'y avait
  plus qu'un espace libre!  CHOC! HORREUR! je commenais  suer et
  trembler. Que pouvais-je faire! Je ne pouvais pas simplement tout
  rinstaller. Il devait y avoir un moyen pour tout rcuperer.Et, oui,
  il y en avait un! Merci mon Dieu (mme si je ne crois pas en lui) il y
  en avait un. J'avais un tas d'informations utiles et de programmes sur
  cette partition! Avant je me demandais comment rcuperer ma partition,
  je souhaitais que Bill Gates ne fut jamais n!  Avez-vous dj vcu la
  mme chose rcemment ? Ne soyez pas effray! La solution est l! lisez
  juste encore un peu plus loin...! Oh, en raison du fait que je vis en
  Norvge, mon anglais n'est probablement pas trs bon, mais j'espre
  que vous comprendrez quand mme.


  11..11..  DDccllaarraattiioonn

  DDccllaarraattiioonn Ce mini-howto est Copyright (C) 1997 Rolf Klausen. Tous
  droits rservs. Vous pouvez faire tout ce que vous voulez avec (enfin
  presque).  Cela m'est gal. Seulement gardez mon nom intact. Je
  souhaite simplement que cela soit utile aux utilisateurs de la
  communaut Linux.  Mais, s'il-vous-plat, lisez la section suivante.

  IIMMPPOORRTTAANNTT!!!!!!



  Je ne suis pas responsable des dommages causs  un ordinateur
  resultant de la lecture de ce HOWTO. Si vous causez des dommages, cela
  sera votre faute, pas la mienne! Soyez prudent quand vous partitionnez
  des disques, ne faites pas d'erreur, car cela peut tre fatal.
  Sauvegardez vos donnes importantes et vrifiez que tout ce que vous
  faites est correct. Ce qui est dcrit ici marche avec mon ordinateur,
  mais il peut ne pas marcher avec le vtre.  Normalement, il devrait
  marcher pour tout le monde mais je ne peux rien garantir. C'est le
  dernier avertissement que vous lirez : SSAAUUVVEEGGAARRDDEERR VVOOSS DDOONNNNEEEESS
  IIMMPPOORRTTAANNTTEESS!! ou pour rsumer, faite l'usage de ce HOWTO  vos propres
  risques.



  11..22..  CCooppyyrriigghhtt


  CCooppyyrriigghhtt Sauf indication contraire, les droits d'auteur des HOWTO
  Linux sont dtenus par leurs auteurs respectifs. Les HOWTO Linux
  peuvent tre reproduits et distribus, en totalit ou en partie, sur
  tout media physique ou lectronique dans la mesure o ce copyright est
  preserv dans chaque copie. La distribution commerciale en est
  autorise et encourage.  L'auteur apprcierait toutefois qu'on lui
  notifie individuellement ce genre de distribution.

  Le prsent copyright doit couvrir toute traduction, compilation et
  autre travail driv des HOWTO Linux. C'est--dire qu'il est interdit
  d'imposer des restrictions de diffusion allant au del du prsent
  copyright  des ouvrages inspirs, ou incorporant des passages, de
  HOWTO Linux. Sous certaines conditions, des exceptions  ces rgles
  seront tolres : contactez le coordinateur des HOWTO  l'adresse
  donne ci-dessous ou le coordinateur des traductions francaises, 
  l'adresse mailto:dumas@Linux.EU.ORG.

  Pour rsumer, nous souhaitons une diffusion aussi large que possible
  de ces informations. Nanmoins, nous entendons garder la proprit
  intellectuelle (copyright) des HOWTO, et apprcierions d'tre informs
  de leur redistribution.

  Si vous avez des questions, contactez Greg Hankins le coordinateur des
  documents HOWTO   de Linux, par e-mail  gregh@sunsite.unc.edu par
  tlphone +1 404 853 9989  ou Tim Bynum  l'adresse lectronique
  suivante tjbynum@sunsite.unc.edu



  22..  PPRREEPPAARRAATTIIOONNSS EETT BBEESSOOIINNSS




  22..11..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn

  VVOOSS BBEESSOOIINNSS  Donc, MS-dog a dtruit votre partition Linux?  Voil ce
  dont vous avez besoin pour le ramener d'entre les morts :

    une installation  MS-DOS en tat de marche, de prfrence sur un
     disque dur( peut-tre que cela marche aussi avec une disquette, je
     ne sais pas)

    un programme sous Dos appel Magique Partition (magic partition).


  22..22..  JJee ssuuppppoossee qquuee ......

  SSii vvoouuss tteess ddaannss ssee ccaass, alors votre chance de rcuprer votre
  partition est leve!


  33..  JJEE VVEEUUXX RREETTRROOUUVVEERR MMAA PPAARRTTIITTIIOONN!!

  LLee ssaauuvveettaaggee   OK! Soyez prt  sauver...attrapez une tasse de caf,
  relaxez-vous. Tout va bien aller  -  Pouvez-vous imaginer ce que j'ai
  ressenti quand MaSsy-DOS a dtruit ma partition? Je n'ai jamais t
  aussi en colre de toute ma vie (enfin presque). Mais j'ai trouv un
  moyen de rcuprer la partition, soit ...


  33..11..  LLee pprrooggrraammmmee PPaarrttiittiioonn MMaaggiiqquuee

  Rcuperer le programme mmaaggiiqquuee ppaarrttiittiioonn (partition magic program) sur
  internet. Le dmarrer et vous aurez une jolie interface utilisateur
  ressemblant  win95.  C'est trs facile  utiliser et si vous utilisez
  windoze95, vous n'aurez pas de problme. Cliquez sur le bouton OK, une
  reprsentation graphique de votre disque apparatra sur votre cran.
  Les diffrentes partitions et systemes de fichiers sont represents
  par des couleurs diffrentes. J'ai une partition primaire DOS, et vous
  aussi, je suppose. Ma partition Linux se trouve sur un de mes disques
  logiques. O l  il tait avant, maintenant il y a seulement une barre
  grise d'espace libre. A gauche ou  droite de cette barre vous devez
  avoir un petit disque logique qui est votre partition Linux Swap.
  Maintenant cliquez avec le bouton droit sur l'espace libre et
  slectionner crer ou choisissez  partir du menu. Vous devriez tre
  capable de comprendre comment a marche. Comme dit prcedemment, c'est
  trs facile d'utiliser l'interface. Quand la bote de  dialogue
  ccrreeaattiioonn apparait, vous pouvez choisir entre  FFAATT HHPPFFSS et  UUnnffoorrmmaatttteedd
  , slectionner uunnffoorrmmaatttteedd. Si vous choisissez FAT ou HPFS, un systme
  de fichiers FAT ou HPFS sera cree sur la partition et votre systme de
  fichiers Linux sera dtruit, aussi soyez certain de faire le bon
  choix.  Ensuite slectionnez OK et votre partition sera cre. Mais
  votre partition est marque comme une partition DOS FAT16 (dans la
  table de partition, chaque partition a une marque (un nombre
  hxadecimal) qui montre  quel OS la partition appartient). Que
  faites-vous maintenant ? Continuez sur la section suivante.



  33..22..  CChhaannggeerr llaa ppaarrttiittiioonn eenn ppaarrttiittiioonn LLiinnuuxx nnaattiivvee

  VVoouuss aavveezz bbeessooiinn maintenant des deux disquettes boot et root, aussi
  j'espre que vous les avez. Il est aussi possible d'utiliser loadlin.
  Soyez simplement sr de pouvoir dmarrer Linux et de lancer fdisk 
  partir de lui.  Premiere chose  faire est de login(ouvrir un
  session), dmarrer fdisk en tapant fdisk au prompt du shell. Si vous
  avez plus d'une partition, vrifiez que fdisk choisit bien la bonne.
  Tapez "p" (simplement la lettre p) et ENTER. Vous devriez avoir
  maintenant l'affichage de la table de partition. Il y a normalement
  plus d'un "DOS 16-BIT >=32M". Cherchez celle qui correspond  votre
  partition Linux (regardez la taille... etc) et notez son nombre
  (exemple le mien est /dev/hda6, ainsi je dois me rappeler le nombre 6
  ). Maintenant tapez "t" et ENTER pour changer le type de la partition,
  ou ID comme c'est nomm dans fdisk de Linux (je ne suis pas sur de
  celui qui est correct, type ou ID mais j'utilise le mot type).
  Maintenant tapez le nombre que vous avez mmoris et ENTER. Maintenant
  il vous faut taper le code hexadcimal correspondant  l'OS auquel
  appartient votre partition. Quand vous avez fait tout cela et sans
  erreur, votre partition devrait tre OK! OUI! C'EST VRAI!  Cela a
  march pour moi, et devrait marcher pour vous aussi! Il ne reste plus
  qu'une chose  faire.



  33..33..  LLaa ttoouucchhee ffiinnaallee

  IIll rreessttee eennccoorree qquueellqquueess ddttaaiillss. Avant tout redmarrez Linux comme
  vous le faites habituellement (LILO, etc) et regardez si tout marche.
  Si cela ne marche pas, soit vous vous tes tromp, soit ma mthode de
  rcupration ne marche pas pour vous (mais si cela dmarre
  correctement, flicitations! Vous avez fait tout correctement!
  Maintenant fsck va vrifier votre systhme de fichier une fois (il
  vrifiait le mien deux fois, je  ne sais pas pourquoi). Et tout
  marchera bien de nouveau! Si ce n'est pas le cas, ne me blamez pas.
  Comme je l'ai dit, cela a march pour moi, pas forcment pour vous. Si
  j'ai sauv votre partition, m'envoyez un e-mail serait trs sympa.




  44..  CCOONNTTRRIIBBUUTTIIOONNSS

  CCoonnttrriibbuuttiioonnss eett rreemmeerrcciieemmeennttss


  44..11..  AAuutteeuurrss

  AAUUTTEEUURRSS  il n'y en a qu'un et c'est moi : Rolf Klausen.

       EE--mmaaiill : rolkf@romsdal.vgs.no WWWWWW :
       http://www2.romsdal.vgs/no/ rolfk/ ccoouurrrriieerr : Rolf Klausen
       Neptunvn 10 6400 Molde NORWAY



  44..22..  RReemmeerrcciieemmeennttss

  MMeess rreemmeerrcciieemmeennttss vvoonntt   :

    Eivind Stormyr (eivind@ardata.no) pour m'avoir fait connatre
     Linux, le meilleur OS jamais cr et m'avoir appris un  tas de
     choses sur les ordinateurs

    Bjorn Olav Stormyr (bjorn@ardata.no)pour m'avoir fourni de grands
     morceaux de  mon ordinateur. Sans lui je n'aurais pas pu avoir
     d'ordinateur personnel

    chaque autre membre de la communaute de Linux et chaque personne
     qui soutient Linux, crit de la documentation et des programmes
     pour Linux et tous les auteurs de LDP et virtuellement toute
     personne ayant quelque chose  voir avec Linux.

    particulirement Linux B. Thorvalds -c'est le ROI

    et bien sr, Tone B. Skjoelsvik qui est la plus belle fille du
     monde.



  44..33..  MMeess rreemmeerrcciieemmeennttss nnee vvoonntt ppaass  ......

  JJee nnee rreemmeerrcciiee ppaass ......  Bill Gates (htt://Bill.gates@microsoft.com
  (?)) pour avoir cr le systme d'exploitation le plus affreux qui
  soit sur terre et pour avoir dtruit ma partition Linux (Oui, je le
  blme. S'il n'tait pas n, alors ma partition n'aurait pas t
  dtruite, je n'aurai pas eu  la sauver et je n'aurai jamais crit ce
  mini HOWTO).


































  PATH Mini-HowTo
  Esa Turtiainen (etu@dna.fi)
  Version 0.4, 15 Novembre 1997

  L'objectif de ce HOWTO est de traiter l'utilisation des variables
  d'environnement sous Unix, et en particulier de la variable PATH.
  Adaptation franaise par Mathieu Lafon (Mathieu.Lafon@insalien.org),
  ralise le 22 Octobre 1998.

  11..  IInnttrroodduuccttiioonn


  Ce document aborde les astuces et les problmes relatifs aux variables
  d'environnement sous Unix/Linux, et plus spcialement  la variable
  PATH.  PATH est une liste de rpertoires dans lesquels le systme
  recherche les commandes  excuter.  Ce document s'appuie sur la
  distribution Debian Linux 1.3.

  Remarque: Ce document est en phase de dveloppement (bta).  Vous
  pouvez m'envoyer vos commentaires ou vos corrections.

  Les commentaires sur la traduction sont  envoyer  Mathieu Lafon
  (Mathieu.Lafon@insalien.org).


  22..  DDrrooiittss dd''aauutteeuurr


  Cette documentation est libre, vous pouvez la redistribuer et/ou la
  modifier selon les termes de la Licence Publique Gnrale GNU publie
  par la Free Software Foundation (version 2 ou bien toute autre version
  ultrieure choisie par vous).

  Cette documentation est distribue car potentiellement utile, mais
  SANS AUCUNE GARANTIE, ni explicite ni implicite, y compris les
  garanties de commercialisation ou d'adaptation dans un but spcifique.
  Reportez-vous  la Licence Publique Gnrale GNU pour plus de dtails.

  Vous pouvez obtenir une copie de la Licence Publique Gnrale GNU en
  crivant  la Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
  MA 02139, Etats-Unis.


  33..  GGnnrraalliittss


  Tous les processus sous Unix possdent un _e_n_v_i_r_o_n_n_e_m_e_n_t.  C'est une
  liste de variables contenant un nom et une valeur, les deux sous la
  forme de chanes (pouvant contenir la majorit des caractres).  Tous
  les processus Unix possdent un processus parent, celui qui les a
  crs. Les processus fils hritent de l'environnement de leurs
  parents.  Ils peuvent ensuite y faire quelques modifications avant de
  le passer  leurs propres processus fils.

  Une variable importante de l'environnement est la variable PATH qui se
  prsente sous la forme d'une liste de rpertoires spars par le
  caractre deux-points (':').  Ces rpertoires sont parcourus pour
  rechercher les commandes.  Si vous essayez de lancer la commande
  bidule, tous les rpertoires contenus dans PATH seront examins (dans
  l'ordre),  la recherche de l'excutable bidule (un fichier avec le
  bit excutable positionn).  Si un tel fichier est trouv, il sera
  excut.

  Dans ce document, j'utilise le terme de _c_o_m_m_a_n_d_e pour un programme
  excutable qui est appel sans indication de son chemin, utilisant
  donc le mcanisme de PATH.
  Sous Linux, mme les appels de bas niveau pour lancer des processus
  (la famille des exec) se basent sur la variable PATH pour trouver les
  excutables : vous pouvez donc utiliser le mcanisme de PATH n'importe
  o, o vous voulez excuter une commande.  Si un appel de exec reoit
  le nom d'un fichier qui ne contient pas de '/', il cherchera dans la
  variable d'environnement PATH.  Mme si cette variable n'existe pas,
  les rpertoires /bin et /usr/bin seront examins  la recherche de
  cette commande.

  Pour crer ou modifier l'environnement, on utilisera export avec sh ou
  setenv avec csh. Par exemple :

   sh:
       export PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:.

   csh:
       setenv PATH /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:.


  Les programmes C peuvent utiliser la fonction setenv() pour modifier
  l'environnement. Perl, quand  lui, conserve l'environnement dans le
  tableau associatif %ENV, et vous pouvez donc modifier PATH avec :

      $ENV{PATH}="/bin"


  La commande env est le moyen le plus facile pour connatre les vari
  ables de l'environnement courant. Elle peut galement tre utilise
  pour les modifier.

  Pour trouver plus d'information sur les commandes d'accs 
  l'environnement, vous pouvez regarder les pages de manuel de environ,
  execl, setenv, le fichier info env, ainsi que la documentation des
  shells.

  Quand Linux dmarre, le premier processus a tre lanc est init. C'est
  un processus particulier car il n'a pas de parent.  De plus, il s'agit
  de l'anctre de tous les autres processus.  Son environnement restera
  celui des autres processus tant qu'ils ne le modifieront pas. La
  plupart le modifieront.

  Le programme init lance un groupe de processus spcifis dans le
  fichier /etc/inittab. Ces processus travaillent dans un environnement
  directement hrit de init. Ce sont d'habitude des processus comme
  getty, le programme qui crit 'login:'  l'cran. Si vous lancez une
  connexion PPP ici, vous devez savoir que vous travaillez avec
  l'environnement de init. L'initialisation du systme est souvent
  effectue par un script lanc  cet endroit.  Dans le cas de la Debian
  1.3, il s'agit de /etc/init.d/rc qui est charg de lancer  son tour,
  les scripts d'initialisation.

  Le systme comprend plusieurs dmons qui peuvent ou non utiliser
  l'environnement par dfaut. La plupart de ceux-ci sont lanc par les
  scripts d'initialisation et possdent donc l'environnement de init.

  Quand un utilisateur se connecte, l'environnement est modifi par les
  paramtres contenus dans les programmes, les scripts d'initialisation
  communs  tous, et ceux spcifiques  l'utilisateur.  C'est assez
  compliqu et la situation n'est pas compltement satisfaisante. En
  effet, le comportement est totalement diffrent suivant que
  l'utilisateur se connecte  partir du terminal texte, de XDM ou du
  rseau.




  44..  iinniitt


  init est le processus parent de tous les autres processus du systme.
  Ceux-ci hritent de son environnement et mme de sa variable PATH dans
  le rare cas o aucun autre PATH n'est indiqu.

  Le PATH de init est fix dans le code source du programme.  Il s'agit
  de :

      /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin


  Notez qu'il ne contient pas le rpertoire /usr/local/bin.

  Tous les programmes qui sont lancs  partir de /etc/inittab
  travaillent avec l'environnement de init, et en particulier les
  scripts d'initialisation contenus dans /etc/init.d (dans le cas de la
  Debian 1.3).

  Tout ce qui est lanc par les scripts d'initialisation possde par
  dfaut l'environnement de init.  Par exemple, syslogd, kerneld, pppd
  (lorsqu'il est lanc au dmarrage), gpm, et ce qui est le plus
  important, lpd et inetd possdent l'environnement de init et ne le
  modifient pas.

  Un certain nombre de programmes sont lancs par les scripts de
  dmarrage mais avec une variable PATH explicitement fixe dans le
  script. Les exemples de tels programmes sont atd, sendmail, apache et
  squid.

  D'autre programmes, par exemple cron, sont lancs par les scripts mais
  modifient totalement la variable PATH.


  55..  CCoonnnneexxiioonn


  Sur un terminal texte, il y a le programme getty qui attend le login
  de l'utilisateur. Il est charg d'crire 'login:' et quelques autres
  messages.  Il travaille avec l'environnement de init. Lorsque
  l'utilisateur commence  se connecter au moyen de getty, ce dernier
  invoque le programme login.  Celui-ci installe alors l'environnement
  utilisateur et lance le shell.

  Le programme login fixe le PATH comme dfini dans le fichier
  /usr/include/paths.h.

  Il s'agit, pour les utilisateurs normaux (_PATH_DEFPATH) de :

      /usr/local/bin:/usr/bin:/bin:.


  Et pour root (_PATH_DEFPATH_ROOT) de :

      /sbin:/bin:/usr/sbin:/usr/bin


  Le PATH des utilisateurs normaux ne contient aucun rpertoires sbin.
  Cependant, il contient le rpertoire courant '.', qui est considr
  comme dangereux pour l'utilisateur root. Mme /usr/local/bin n'est pas
  disponible pour root.

  Le PATH obtenu lors du login est souvent modifi par l'initialisation
  du shell.  Cependant, il est possible d'utiliser d'autres programmes
  que des shells dans /etc/passwd. Par exemple, j'utilise la ligne
  suivante pour lancer PPP quand je me connecte avec le nom
  d'utilisateur etu-ppp. Dans ce cas, pppd possde exactement le PATH du
  login.

      etu-ppp:viYabVlxPwzDl:1000:1000:Esa Turtiainen, PPP:/:/usr/sbin/pppd




  66..  SShheellllss


  Les processus utilisateurs sont souvent des processus fils du shell
  indiqu pour cet utilisateur dans le fichier /etc/passwd.  Les
  fichiers d'initialisation de ces shells modifient souvent la variable
  PATH.

  Lors de la connexion, le nom du shell est prcd d'un '-'. Par
  exemple, dans le cas de bash, on aura -bash. Cela indique au shell
  qu'il est en prsence d'un login shell et qu'il doit dans ce cas
  excuter les fichiers d'initialisation spcifiques  la connexion.
  Dans le cas contraire, on aura une initialisation plus lgre.  De
  plus, le shell dtermine s'il est interactif ou non, c'est  dire si
  les commandes viennent d'un terminal (tty) ou d'un fichier.  Cela
  modifie galement l'importance de l'initialisation si bien qu'un shell
  non interactif et qui n'est pas lanc avec une connexion effectue
  vraiment trs peu d'initialisation (bash n'excute aucune
  initialisation dans ce cas l).


  66..11..  bbaasshh


  Pour un login shell normal, bash parcourt le fichier /etc/profile,
  commun  tous, o les variables d'environnement, dont PATH, peuvent
  tre fixes pour les utilisateurs de bash. Cependant, ce fichier n'est
  pas relu lorsque le systme se trouve face  un shell non interactif.
  Le cas le plus important est rsh, o la commande est excute sur la
  machine voisine : le fichier /etc/profile n'est pas lanc et le PATH
  provient du dmon de rsh.

  bash accepte les arguments -login et -i qui sont utiliss pour obtenir
  respectivement un login shell et/ou un shell interactif.

  L'utilisateur peut redfinir les paramtres contenus dans /etc/profile
  en crant un fichier ~/.bash_profile, ~/.bash_login ou ~/.profile. Il
  faut noter que seul le premier fichier sera excut mme si cela
  diffre des habitudes de csh. En particulier, ~/.bash_login ne sera
  pas forcement excut pour un login shell, car si ~/.bash_profile
  existe, ce dernier sera prioritaire.

  Si bash est lanc par sh (qui est un lien symbolique sur bash), il se
  comporte comme le Bourne shell original : il ne parcourt que les
  fichiers /etc/profile et ~/.profile et uniquement dans le cas d'un
  login shell.


  66..22..  ttccsshh


  Pour un login shell, tcsh excute dans l'ordre les fichiers suivants :


    /etc/csh.cshrc


    /etc/csh.login

    ~/.tcshrc

    ~/.cshrc    (si ~/.tcshrc n'existe pas)

    ~/.history

    ~/.login

    ~/.cshdirs

  AAtttteennttiioonn.. tcsh peut tre compil pour excuter les scripts de
  connexion (login) avant les scripts cshrc.

  Les shells non interactifs n'excutent que les scripts *cshrc. Les
  scripts *login peuvent tre utiliss pour ne fixer le PATH que lors
  d'une connexion.


  77..  MMooddiiffiieerr ll''iiddeennttiitt ddee ll''uuttiilliissaatteeuurr



  77..11..  ssuu


  La commande su sert  indiquer la nouvelle identit  utiliser (sous
  rserve de connatre le mot de passe), root tant la valeur par
  dfaut.

  Normalement, su lance un sous-shell avec la nouvelle identit. Avec
  l'argument '-' (plus rcemment -l ou --login), su lance le shell comme
  un login shell. Cependant, il n'utilise pas le programme login pour
  cela mais encore un autre PATH intgr au programme pour simuler le
  login (termes employs dans le code source). Il s'agit de :

  pour les utilisateurs normaux :

      /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:.


  pour l'utilisateur root :

      /sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin


  su ralise galement quelques changements mineurs dans l'environ
  nement.


  77..22..  ssuuddoo


  Il y a un groupe de commandes qui permettent une utilisation plus sr
  des commandes du super utilisateur. Elles permettent un meilleur suivi
  (au sens o l'on garde une trace de chaque excution - NdT), des
  restrictions sur les utilisateurs et utilisent des mots de passe
  individuels.  La plus utilise est srement sudo.

      $ sudo env


  Cette commande excute env en tant que super utilisateur (si sudo est
  configur pour le permettre).

  La commande sudo a encore une autre approche en ce qui concerne la
  gestion du PATH. Elle modifie les rpertoires o chercher la commande
   excuter pour que le rpertoire courant soit toujours le dernier.
  Cependant, elle ne modifie pas la variable PATH, seulement quelques
  variables comme SUDO_USER.


  88..  SSeerrvveeuurrss


  La majorit des serveurs ne devrait pas lancer n'importe quelle sorte
  de processus. Pour des raisons de scurit, leur PATH doit donc tre
  minimal.

  La plus grosse exception est l'ensemble des services qui autorisent
  une connexion sur le systme  partir du rseau.  Cette section dcrit
  comment se trouve l'environnement dans ces cas prcis. En effet, une
  commande excut  distance avec rsh aura un PATH diffrent d'une
  commande excut avec ssh. De la mme faon, une connexion  l'aide de
  rlogin, telnet ou ssh est diffrente.


  88..11..  iinneettdd


  La plupart des serveurs ne possdent pas de processus charg
  d'attendre en permanence l'arrive d'une requte. Ce travail est
  laiss  un super serveur (Internet super server), appel inetd. Le
  programme inetd est  l'coute permanente du rseau et lance le
  serveur appropri en fonction du port sur lequel arrive la requte.
  Son comportement est dfini dans le fichier /etc/inetd.conf.

  inetd est dmarr par les scripts de dmarrage du systme. Il hrite
  donc du PATH de init.  Il ne le modifie pas et tous les serveurs
  lancs par inetd possdent donc le PATH de init. Un exemple de tel
  serveur est imapd, le serveur du protocole IMAP.

  D'autre exemples de processus lancs par inetd sont telnetd, rlogind,
  talkd, ftp, popd, certains serveurs http, etc...

  Souvent, l'utilisation de inetd est complique par l'utilisation du
  programme tcpd, charg de lancer le vritable serveur. C'est un
  programme qui effectue quelques vrifications du point de vue scurit
  avant de lancer le vritable serveur. Il ne touche pas au PATH
  (information non vrifie).


  88..22..  rrsshh


  Le dmon de rsh utilise le PATH dfini par _PATH_DEFPATH
  (/usr/include/path.h), c'est  dire, le mme que celui utilis par le
  programme login pour connecter les utilisateurs normaux.
  L'utilisateur root obtiendra le mme PATH que les autres.

  En ralit, rshd excute la commande dsire en se servant de la
  commande suivante :

      shell -c ligne_de_commande


  O shell n'est pas un login shell. Il est prfrable que tous les
  shells mentionns dans /etc/passwd prennent en compte l'option -c pour
  pouvoir leur envoyer ce genre de ligne de commande.


  88..33..  rrllooggiinn


  rlogin invoque login pour effectuer la procdure de connexion.  Si
  vous vous connectez avec rlogin, vous aurez le mme PATH qu'avec
  login. La plupart des autres faons de se connecter  un ordinateur
  sous Linux n'utilisent pas login. Notez la diffrence avec rsh.

  La commande de login utilise est de la forme :

      login -p -h nom_de_l_hote nom_d_utilisateur


  L'option -p conserve l'environnement  l'exception des variables HOME,
  PATH, SHELL, TERM, MAIL et LOGNAME. L'option -h indique le nom de
  l'ordinateur sur lequel doit se faire la connexion.


  88..44..  tteellnneett


  Le programme telnet est similaire  rlogin : il utilise le programme
  login et la ligne de commande utilise est de la mme forme.


  88..55..  sssshh


  ssh possde sa propre variable PATH,  laquelle il ajoute le
  rpertoire o se trouve ssh. Cela implique souvent que le rpertoire
  /usr/bin se retrouve en double :

      /usr/local/bin:/usr/bin:/bin:.:/usr/bin


  La variable PATH ne contient pas /usr/bin/X11 et le shell invoqu par
  ssh n'est pas un login shell. Ainsi, la commande

      ssh hote_distant xterm


  ne marchera pas et rien de ce qui est contenu dans /etc/profile ou
  /etc/csh.cshrc ne pourra changer cela.  Vous devrez toujours utiliser
  des chemins absolus, par exemple /usr/bin/X11/xterm.

  ssh cherche des variables d'environnement de la forme VARIABLE=VALEUR
  dans le fichier /etc/environment.  Malheureusement, cela provoque des
  problmes avec XFree86.


  99..  XXFFrreeee8866



  99..11..  XXDDMM


  XDM est la manire la plus courante pour se connecter  partir d'un
  terminal graphique. Mme s'il ressemble  login, il se comporte, en
  interne, d'une manire totalement diffrente.

  Les fichiers de configuration se trouvent dans le rpertoire
  /etc/X11/xdm et sont excuts pendant les diffrentes tapes de la
  connexion. Xstartup (et Xstartup_0 pour l'cran 0) contient les
  commandes  excuter juste aprs la connexion. Ces commandes sont
  lancs en tant que root.
  Le PATH qui est utilis pour les utilisateurs se trouve dans
  /etc/X11/xdm/xdm-config.  Ce sont les lignes :

  DisplayManager*userPath: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
  DisplayManager*systemPath: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11


  C'est le PATH par dfaut pour les utilisateurs normaux (userPath), et
  pour l'utilisateur root (systemPath) respectivement. Il est trs
  important que le rpertoire /usr/bin/X11 soit accessible pour les
  utilisateurs sous X. En effet, si un utilisateur se connecte  une
  autre machine pour lancer une application X, il faut qu'il aie
  /usr/bin/X11 dans son PATH car la machine hte ne saura pas qu'il dis
  pose d'un terminal X.

  Aprs Xstartup, XDM lance /etc/X11/Xsession en tant qu'utilisateur
  final. La configuration locale est contenue dans le fichier
  /etc/environment qui est parcouru, s'il existe, par Xsession.
  Xsession tant excut par /bin/sh, /etc/environment doit donc tre un
  script sh.  Cela interfre avec ssh qui suppose que /etc/environment
  est un fichier qui ne contient que des lignes de la forme
  VARIABLE=VALEUR.


  99..22..  xxtteerrmm --llss


  Par dfaut, le PATH de toutes les commandes lancs  partir des menus
  du gestionnaire de fentre est celui hrit de XDM. Pour en utiliser
  un autre, il faut le dfinir explicitement. Pour lancer un terminal X
  avec un PATH "normal", on doit utiliser des options spciales.  Pour
  xterm, l'option -ls (login shell) doit tre utilis pour obtenir un
  login shell avec le PATH dfini dans les fichiers d'initialisation du
  shell en question.


  99..33..  MMeennuuss eett bboouuttoonnss dduu ggeessttiioonnnnaaiirree ddee ffeennttrree


  Le gestionnaire de fentre hrite de l'environnement de XDM.  Tous les
  programmes lancs par lui hritent donc de cet environnement.

  L'environnement du shell de l'utilisateur n'affecte pas les programmes
  qui sont lancs par les menus ou les boutons. Par exemple, si un
  programme est lanc par un xterm (xterm -ls), il possde
  l'environnement par dfaut du login shell, par contre s'il est lanc
  par un menu, il aura l'environnement du gestionnaire de fentre.


  1100..  CCoommmmaannddeess "" rreettaarrddeemmeenntt"" ccrroonn eett aatt



  1100..11..  ccrroonn


  C'est le programme cron qui excute priodiquement les commandes
  spcifies dans /etc/crontab et dans les crontabs des utilisateurs. La
  Debian 1.3 possde en plus un mcanisme pour excuter les commandes de
  /etc/cron.daily, /etc/cron.weekly et /etc/cron.monthly, respectivement
  tous les jours, toutes les semaines et tous les mois.

  cron est lanc par les scripts de dmarrage mais il change son PATH en
  une valeur assez trange :


         /usr/bin:/binn:/sbin:/bin:/usr/sbin:/usr/bin


  IILL SS''AAGGIITT SSUURREEMMEENNTT DD''UUNN BBOOGGUUEE DDAANNSS CCRROONN.. Il s'agit en fait du PATH de
  init (/usr/bin:/bin) qui est copi ici, mais sans le 0 terminal
  (chane en convention C - NdT)! Ce bogue n'existe pas sur tous les
  systmes.

  Dans la crontab, on peut dfinir un PATH spcifique pour l'excution
  des commandes.  Pour la Debian 1.3, il s'agit de :

      PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin


  De cette faon, le PATH de crond n'est jamais utilis dans les pro
  grammes utilisateurs. Tous les scripts de /etc/cron.* obtiennent par
  dfaut le PATH de la crontab. Celui ci est utilis mme si le pro
  gramme n'est pas excut en tant que root.


  1100..22..  aatt


  La commande at est utilise pour lancer un programme  une heure
  fixe.

  Le programme atd est lanc avec le PATH de init.  Cependant, les
  programmes sont toujours lancs avec l'environnement utilisateur grce
   sh.  Les spcificits de sh s'appliquent donc ici.  Reportez vous au
  chapitre sur bash.


  1111..  QQuueellqquueess eexxeemmpplleess



  1111..11..  mmaaggiiccffiilltteerr


  magicfilter est un outil standard permettant de manipuler les fichiers
   destination de l'imprimante. Il analyse le type du fichier 
  imprimer et lance un filtre appropri pour l'imprimer de la meilleure
  faon. Les scripts utiliss pour filtrer sont lancs par lpd, lui mme
  lanc par le script /etc/init.d/lpd lanc par init. Le PATH est donc
  identique  celui de init et ne contient donc pas /usr/bin/X11.

  Si vous voulez envoyer des fichier PDF (Portable Data Format) 
  magicfilter, vous pouvez utiliser /usr/bin/X11/xpdf.  Mais vous ne
  devez pas oublier d'indiquer le chemin absolu. Sinon, magicfilter ne
  trouvera pas xpdf. La plupart des programmes utiliss avec
  magicfilter, ne ncessitent pas forcement un chemin explicite car ils
  se trouvent souvent dans /bin ou /usr/bin.


  1111..22..  IImmpprreessssiioonn  ppaarrttiirr dd''aapppplliiccaattiioonnss XX


  Au cas o vous utilisez la variable d'environnement PRINTER pour
  slectionner l'imprimante  utiliser, vous devez savoir que dans
  certains cas, certaines applications X risquent de ne pas la
  connatre.

  Vous vous souvenez srement que si la session X a t lanc par XDM,
  le gestionnaire de fentre ne se sert pas de vos scripts de login.
  Toutes les applications X que vous lancez  partir d'un xterm
  possdent donc la variable PRINTER.  Par contre, la mme application
  lance  partir d'un menu ou d'un bouton ne possdera pas cette
  variable.

  Parfois, la variable PRINTER peut tre hrite  un niveau encore plus
  bas. Par exemple, une application auxiliaire de Netscape pourra
  connatre votre variable PRINTER mme si Netscape ne la connat pas.


  1122..  QQuueessttiioonnss ddee ssccuurriitt


  Le mcanisme de PATH est souvent un gros problme du point de vue
  scurit. Utiliser une erreur dans la dfinition du PATH est une
  manire frquente de pirater un systme. Il est facile pour un pirate
  de fabriquer des chevaux de Troie, s'il arrive  forcer root ou un
  autre utilisateur  excuter ses propres programmes.

  Une erreur frquente par le pass (?) tait de laisser le rpertoire
  courant '.' dans le PATH de l'utilisateur root.  Un pirate malveillant
  peut alors crer son propre programme 'ls' dans son rpertoire.
  Ensuite, si root fait :

      # cd ~pirate
      # ls


  il excute le programme du pirate...

  De la mme faon, cela s'applique  tous les programmes excuts par
  root. Aucun important dmon ne devrait excuter quoi que ce soit qui
  puisse tre modifi par un utilisateur. Dans certains systmes,
  /usr/local/bin peut contenir des programmes jugs moins sr, mais le
  rpertoire est retir du PATH de root.  Cependant, si on sait qu'un
  dmon excute bidule avec 'PATH=/usr/local/bin:...', il est possible
  de tromper le dmon en lui faisant excuter /usr/local/bin/bidule  la
  place de /bin/bidule. Dans ce cas, n'importe qui pouvant crire dans
  /usr/local/bin peut srement pirater le systme.

  Il est donc trs important de faire attention  l'ordre dans lequel
  les rpertoires sont placs dans le PATH.  Si /usr/local/bin se trouve
  avant /bin, il y a un risque. Alors que s'il se trouve aprs, il est
  impossible de lancer la commande modifie /usr/local/bin/bidule  la
  place de /bin/bidule.

  Sous Linux, vous devez vous souvenir que la recherche dans le PATH est
  fate dans tous les mcanismes d'appels du systme d'exploitation.
  N'importe o, o le chemin d'un excutable est donn, vous pouvez
  utiliser le nom de la commande seul qui sera alors cherche au moins
  dans /bin et /usr/bin, et vraisemblablement dans beaucoup d'autres
  endroits.


  1133..  CCoommmmeenntt rrssoouuddrree lleess pprroobbllmmeess ??


  La commande la plus simple pour avoir accs  l'environnement est
  /usr/bin/env.

  Il est egalement possible d'utiliser le rpertoire /proc pour trouver
  le PATH de n'importe quel programme. Vous devez d'abord connatre le
  numro de processus du programme. Utilisez la commande ps pour
  l'obtenir. Par exemple, si xterm est le processus numro 1088, vous
  pouvez voir son environnement avec :

      # more /proc/1088/environ

  Cela ne marche pas avec des processus comme xdm. Pour accder 
  l'environnement d'un processus du systme ou d'un autre utilisateur,
  vous devez tre root.

  Pour deboguer Netscape, vous pouvez crer le script suivant :

      $ cat > /tmp/test
      #!/bin/sh
      /usr/bin/env > /tmp/env
      ^d
      $ chmod +x /tmp/test


  Ensuite, arrangez vous pour que votre programme soit appel  la place
  d'une application auxiliaire, par exemple RealAudio (audio/x-pn-
  realaudio). Lorsque vous essayerez d'accder  un lien RealAudio
  (quelque chose comme http://www.realaudio.com/showcase), Netscape
  lancera votre programme factice et sauvera l'environnement dans
  /tmp/env.


  1144..  MMtthhooddeess ppoouurr qquuee ttoouuss lleess uuttiilliissaatteeuurrss aaiieenntt llee mmmmee PPAATTHH


  Le rglage le plus important est  faire dans les fichiers commun
  d'initialisation des logins shells : /etc/csh.login pour tcsh et
  /etc/profile pour bash.

  Ceux qui n'obtiennent pas le bon PATH  partir de ces fichiers sont :
  rsh, ssh, les lments des menus du gestionnaire de fentres sous X ne
  lanant pas explicitement de login shell, les commandes lancs 
  partir de inittab, les travaux de cron, les travaux des dmons comme
  magicfilter (lanc par lprd), les scripts CGI (WWW), etc...

  Si le PATH est fix dans /etc/csh.cshrc, il sera utilis si rsh ou ssh
  lance des commandes sur une machine distante o l'utilisateur utilise
  tcsh/csh. Par contre, il n'est pas possible de rgler le PATH si
  l'utilisateur utilise bash/sh. Voici une mthode pour ne garder le
  PATH que dans un seul fichier, par exemple /etc/environnement-commun,
  dans lequel on crit :

    ${EXPORT}PATH${EQ}/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/X11:/usr/local/bin:/usr/games:.


  On peut ensuite l'utiliser  partir de /etc/csh.login (pour tcsh et
  csh)

    set EQ=" " set EXPORT="setenv "; source /etc/environnement-commun


  A partir de /etc/profile (pour bash, mais pas pour le vrai sh)

    EQ='=' EXPORT="export " . /etc/environnement-commun


  Et  partir de /etc/environment (pour XDM)

    EQ='=' EXPORT="export " . /etc/environnement-commun



  Cette mthode marchera la plupart du temps, sauf que ssh se plaindra
  des lignes contenues dans /etc/environment (ainsi que des variables EQ
  et EXPORT). De plus, rsh n'aura toujours pas le bon PATH s'il passe
  par bash.

  1155..  RReemmeerrcciieemmeennttss


  Une des raisons pour commencer l'criture de ce document a t la
  grosse frustration de Ari Mujunen. Juha Takala m'a donn de prcieux
  commentaires.




























































  INSTALLATION DE POSTGRES95 SUR LINUX
  Gilles DAROLD, darold@neptune.fr
  v1.0, 23 novembre 1996

  Ce  document  decrit  comment  installer  Postgres95 ou PostgreSQL sur
  Linux pour les versions 1.01 a 1.09.

  11..  CCrreeeerr uunn llooggiinn ppoossttggrreess

  Avant toute operation il faut creer un  compte  utilisateur  postgres.
  Ceci  requiert les privileges de root, certaines autres parties aussi,
  donc restez en root.

  22..  RReeccuuppeerraattiioonn eett iinnssttaallllaattiioonn ddeess ffiicchhiieerrss ssoouurrcceess

  L'URL  <http://www.postgresql.org/> pointe sur l'ensemble des adresses
  ou l'on peut recuperer les fichiers sources de POSTGRES95.  Les man en
  ligne des commandes de postgres95 sont disponibles a cette  adresse  :
  <http://www.eol.ists.ca/~dunlop/postgres95/>.          Le        Guide
  d'implementation en ligne est quant a lui accessible  depuis  l'url  :
  <http://www.postgresql.org/impguide/>.   Je  vous conseille surtout un
  site      tres      complet       sur       PostgreSQL       a       :
  <http://logical.thought.net/postgres95/>.

  Copiez  le  fichier  archive  dans le repertoire /usr/local/.  Il faut
  ensuite decomprimer le fichier avec gunzip puis le desarchiver avec la
  commande

       tar -xvf nomfichier.tar

  ou directement avec la commande :

       tar xvzf nomfichier.tar.gz

  33..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn

  Note  :  cette installation a ete faite sur un systeme linux slackware
  3, avec une configuration par defaut utilisant le format  binaire  ELF
  (format des executables de Linux).

  Les  Makefiles utilises pour compiler Postgres95 necessitent GNU make.

  Le  fichier  /usr/local/postgres95/src/Makefile.global  contient   les
  parametres de compilation a modifier :

     PPOORRTTNNAAMMEE
        specifie  la plate-forme sur laquelle Postgres sera installe. Il
        faut donc changer la valeur par defaut (alpha) par la valeur  ->
        linux.

     PPOOSSTTGGRREESSLLOOGGIINN
        specifie l'utilisateur qui realisera initdb et lancera le daemon
        postmaster. La valeur par defaut est postgres et c'est tres bien
        comme ca.
     PPOOSSTTGGRREESSDDIIRR
        specifie  le plus haut repertoire contenant tous les fichiers de
        postgres95, ici : /usr/local/postgres95/

     SSRRCCDDIIRR
        specifie ou sont disposes  les  fichiers  sources.  Ici  et  par
        defaut dans $(POSTGRESDIR)/src.

  Apres  avoir  edite  et  modifie  le fichier src/Makefile.global, vous
  pouvez commencer a compiler et installer  POSTGRES95.   Pour  cela  il
  faut, toujours en login root, taper les commandes suivantes :

       % cd /usr/local/postgres95/src
       % make
       % make install

  ce  qui peut prendre entre 1/4 d'heure et 1/2 heure suivant la machine
  sur laquelle vous realisez l'installation.

  Apres cette installation complete de  POSTGRES95,  verifiez  que  vous
  avez bien les fichiers suivants :

  - Dans /usr/local/postgres95/bin/

       cleardbdir*   destroydb*    monitor*      postgres*
       createdb*     destroyuser*  pg_id*        postmaster@
       createuser*   initdb*       pg_version*   psql*

  - Dans /usr/local/postgres95/data/files/

       global1.bki           local1_template1.bki
       global1.bki.source    local1_template1.bki.source

  Si  c'est le cas, l'installation est terminee et il ne reste plus qu'a
  changer le nom de l'utilisateur et de groupe de tous les fichiers qui,
  pour  l'instant  appartiennent  a  root.  Pour cela, si vous avez deja
  cree un utilisateur et un groupe postgres (cf plus  bas),  placez-vous
  dans le repertoire /usr/local/ et tapez les commandes suivantes :

       % chown -R postgres postgres95/
       % chgrp -R postgres postgres95/

  ainsi,  recursivement  (-R)  tous  les fichiers a partir du repertoire
  /usr/local/postgres95/, lui compris,  appartiendront  a  l'utilisateur
  postgres et au groupe postgres.

  Pour  creer  un  groupe  sur  linux,  editez  le fichier /etc/group et
  ajoutez la ligne suivante :

       postgres::500:root,postgres,darold

  ou postgres est le nom du groupe, 500 est le gid, et les noms suivants
  sont  les  utilisateurs  appartenant  a  ce groupe (attention a ne pas
  affecter un numero de gid deja existant).

  44..  IInniittiiaalliissaattiioonn ddeess bbaasseess ddee ddoonnnneeeess

  Apres avoir realise avec succes l'installation de postgres95 il  reste
  a  initialiser les bases de donnees.  Attention, toutes les bases deja
  existantes seront effacees. Logez-vous en tant qu'utilisateur postgres
  et tapez :

       % initdb

  55..  DDeemmaarrrreerr llee ddaaeemmoonn ppoossttmmaasstteerr

  Pour   rendre  POSTGRES95  operationnel,  il  faut  lancer  le  daemon
  postmaster, mais avant, il faut exporter les variables d'environnement
  dont il a besoin. C'est-a-dire :

       % export PGDATA=/usr/local/postgres95/data/
       % export PGPORT=5432
       % echo $PGDATA $PGPORT  (pour voir si elles sont positionnees).

  Le lancement de postmaster repond a la commande :

       % postmaster -S

  Celui-ci  tournera  donc  en  background et ne sera visible que par la
  commande :

       % ps -exf

  66..  TTeesstt ddee rreeqquueetteess ssuurr ppoossttggrreess

  Afin de s'assurer que tout va bien, il est  recommande  de  creer  une
  base  de  donnees  a partir du repertoire contenant les executables de
  postgres95 (/usr/local/postgres95/bin) et par la commande :

       % createdb essai

  puis de s'y connecter en tapant :

       % psql essai

  Si tout se passe bien, vous verrez le prompt postgres apparaitre :

       essai =>

  Faites un essai de creation de table, d'insertion, de selection et  de
  mise  a  jour sur une table.  Un manuel d'utilistion de POSTGRES95 est
  disponible dans le repertoire /usr/local/postgres95/doc/.

  Le login postgres ayant par defaut tous les droits, si vous voulez que
  d'autres  utilisateurs puissent utiliser les bases de donnees, il vous
  faut creer ces utilisateurs en tapant la commande a partir de bin/  si
  vous  n'avez  pas  encore ajoute le repertoire a votre path (voir plus
  loin) :

       % createuser darold

  Repondez oui  aux  droits  que  vous  souhaitez  donner  a  ce  nouvel
  utilisateur  POSTGRES.   Attention  :  ceci ne donne que les droits de
  cre,ation et d'effacement sur les bases de cet  utilisateur.  Si  vous
  voulez  que  d'autres  utilisateurs  puissent  utiliser  cette base de
  donnees, vous devez le faire en SQL  avec  le  mot  reserve  GRANT  et
  connecte a la base.

  77..  LLaanncceemmeenntt dduu ddaaeemmoonn ddee ppoossttggrreess9955 aauu bboooott LLIINNUUXX

  Afin  de  realiser un lancement automatique du daemon postmaster et de
  permettre aux utilisateurs, des le login, d'acceder a l'utilisation de
  postgres,   il   faut   generer  une  procedure  d'automatisation  par
  l'intermediaire d'un script et du fichier /etc/inittab, comme suit :

     11)) --
        Creer un fichier en script shell nomme postgres-start, placez-le
        dans  le repertoire /usr/local/scripts. Il doit etre execute par
        le  systeme.   Ce   fichier   contient   tous   les   parametres
        d'initialisation et de lancement du daemon postmaster.

        Le  source  de  ce fichier /usr/local/scripts/postgres-start est
        joint a la fin de ce document.

        Comme  ce  script  utilise  un   fichier   de   debogage   nomme
        postmaster.log,  vous  devrez  le  creer  et  le  placer dans un
        repertoire, a creer aussi, tel que propose dans ce script :

          /usr/local/postgres95/log/postmaster.log

     ou, si vous avez un repertoire a cet effet, modifiez en consequence
     le script.

     22)) --
        Il  vous  faut  ensuite  taper  les  lignes suivantes dans votre
        fichier /etc/inittab. Ce fichier sert au lancement de procedures
        lors  du  boot  systeme, et ici le lancement du script precedent
        (selon un run_level) :

          # Lancement du daemon de postgres95
          p1:45:wait:/usr/local/scripts/postgres-start

     ou p1 est le nom de la procedure, 45 le run  level,  et  wait  veut
     dire  d'attendre  la fin du deroulement du fichier inittab avant de
     continuer.

     33)) --
        Rebootez la machine, et  reportez-vous  a  la  documentation  de
        Postgres95 pour de plus amples informations.

  88..  CCooddee ssoouurrccee dduu ssccrriipptt ppoossttggrreess--ssttaarrtt

  #!/bin/sh

  #######################################################################
  #
  # MACHINE         : gdpc
  # SCRIPT_NAME     : postgres-start
  # SCRIPT LANGUAGE : sh
  #
  #       Created by: Gilles DAROLD
  #       Modify by : Gilles DAROLD on Sun Nov 24 18:36:24 1996
  #######################################################################

  # Variables d'environnement pour Postgres95 :
  POSTGRESHOME=/usr/local/postgres95
  PGDATA=$POSTGRESHOME/data
  PGPORT=5432

  # Chemin d'acces
  POSTGRESPATH=$POSTGRESHOME/bin

  # Ajout au path
  PATH=/sbin:/bin:/usr/bin:$POSTGRESPATH

  echo ""
  echo "Lancement du daemon de postgres95 : postmaster"

  # fichier de debugage du lancement de postmaster
  LOGf=$POSTGRESHOME/log/postmaster.log

  if [ -f $LOGf ] ; then
     mv $LOGf $LOGf.OLD
  fi

  #----------------------------------------------------------------------
  # Attention, le lancement du deamon doit se faire sous l'UID postgres!
  # Ne jamais lancer POSTMASTER en superutilisateur root, sinon vous
  # pouvez avoir de graves problemes...
  #----------------------------------------------------------------------
  # Lancement du daemon de Postgres95
  su postgres --command="postmaster -d 1 1>$LOGf 2>&1 &"

  # End of /usr/local/scripts/postgres-start
  #######################################################################

  99..  NNoottee

  1>$LOGf correspond a une redirection du canal de sortie sur le fichier
  LOGf.

  2>&1 correspond a la redirection du canal d'erreur  sur  le  canal  de
  sortie. Les erreurs sortiront donc sur le fichier LOGf.

  La checklist de preinstallation de Linux
  S. Parthasarathy algolog@hd1.vsnl.net.in (Algologic Research
  & Solutions, Secunderabad, Inde)
  Adaptation francaise : Pierre-Charles David david@essi.fr
  Ver. 1.5 - 17 Dec. 1997

  Combien de fois vous etes-vous retrouve a pester au beau  milieu  d'un
  processus d'installation de Linux parce qu'il vous manquait une infor-
  mation vitale sur la materiel de la machine  cible  ?  Avez-vous  deja
  croise  les  doigts  en  repondant a une simple question du genre "sur
  quel port COM votre souris est-elle connectee    ?"  ?   Admettons-le,
  tous  autant  que nous sommes, a un momemnt ou a un autre, avons senti
  que nous aurions du  mieux  nous  preparer  avant  d'installer  Linux.
  Algologic  Research & Solutions vous apporte ici une solution simple a
  ce probleme. Ceci est un aide-memoire qui fera pour vous de  l'instal-
  lation  de Linux une experience agreable.  Cette checklist n'est faite
  que pour l'installation de  Linux  sur  PCs.   Vous  pouvez  cependant
  l'utiliser  comme modele pour d'autres types de machines (par ex. SUN,
  Alpha...).

  11..  BBiieennvveennuu((ee))

  Bienvenu(e)  dans  le  monde  de  Linux.  Votre   premier   pas   dans
  l'installation  de  Linux  sur  votre  PC  sera de repondre a quelques
  questions simples (?) a propos de votre materiel.

  Cette checklist vous rendra, a vous comme a nous, l'installation  plus
  facile  et sans mauvaises surprises. Prenez donc tout votre temps pour
  la remplir. A chaque fois que cela a ete possible, et necessaire, nous
  avons  donnes  des  suggestions  et des indices pour vous faciliter la
  tache.

  Si vous ne connaissez pas tous les details, vous devriez  pouvoir  les
  trouver  dans les manuels de votre ordinateur. Sinon, demander a votre
  revendeur, ou bien au "gourou" local.

  Si vous avez toujours des problemes pour trouvez les reponses, ne vous
  en  faites  pas, vous pouvez ignorez les parties que vous ne comprenez
  pas. Bring in your machine and any manuals you have (NdT:  les  amener
  ou ?). L'installation marchera peut-etre apres quelques essais et avec
  beaucoup de chance.

  Souvenez-vous que Linux, comme beaucoup de logiciels, est  un  produit
  qui se evolue sans cesse. Une partie de votre materiel n'est peut-etre
  pas supportee par la version de Linux que vous voulez installez.

  Ceci est un service GRATUIT de  Algologic.  Algologic  n'offre  aucune
  garantie, et n'accepte aucune responsabilite dans cet exercice.

  Chacune  des  questions  ci-apres est identifiee par une lettre suivie
  d'un nombre (par ex. G4 est une  question  sur  la  vitesse  de  votre
  processeur). Si vous avez besoin d'aide ou d'explications a propos des
  questions   posees   dans   ce    formulaire,    veuillez    specifier
  l'identificateur  du chapitre (une lettre) et le numero de la question
  (un nombre), et envoyez un email a :  algolog@hd1.vsnl.net.in  (NdT  :
  j'ai conserve les identificateurs des questions).

  22..  PPrreerreeqquuiiss

  1. Vous avez l'intention d'installer Linux sur un PC (386 ou plus).

  2. Vous avez un lecteur de CD-ROM sur votre PC.

  3. Vous avez au moins un lecteur de disquettes 3.5' sur votre systeme.

  4. Le lecteur 3.5' est un lecteur amorcable.

  5. Vous avez a votre disposition  trois  disquettes  3.5'  formattees,
     vides,   et   sans   secteurs   defectueux,   pour   la   procedure
     d'installation.

  Si l'une des suppositions precedentes est fausse,  veuillez  commencer
  par contacter Algologic.

  33..  LLaa cchheecckklliisstt

  33..11..  ((AA) A propos de vous

  1. Votre nom :

  2. La numero de telephone ou vous contacter :

  3. Votre adresse email :

  4. Avez-vous   deja  utilise  Linux  auparavant    ?  Si  oui,  quelle
     distribution  ?

  5. Avez-vous deja utilise une version d'Unix aupravant  ? Laquelle   ?
     Sur quelle(s) plateforme(s)  ?

  6. Est-ce une mise a jour d'une distribution Linux deja installee  ?

  7. Quelle  sera l'utilisation finale de cette installation de Linux  ?

  8. Voulez-vous conserver DOS/Windows en meme temps que Linux sur votre
     systeme  ?

  9. Autres details que vous desirez ajouter  ?

  33..22..  ((GG) General

  1. Type de microprocesseur (i386, i486 DX2, ...) :

  2. Type de bus (ISA, EISA, VESA, PCI, MCA, ... ) :

  3. Vitesse du microprocesseur :

  4. Taille de votre memoire RAM (4 Mo necessaires au minimum) :

  5. Voulez-vous installer X Window (interface graphique pour Linux) sur
     votre systeme  ?

  6. Combien de ports serie votre PC comporte-t-il  ?

  7. Avez-vous l'intention de rajouter des terminaux "dumb" (NdT:   ??)a
     votre PC  ? Si oui, combien  ?

  8. Veuillez  mentionner  ci-apres  tous  les  autres  details qui vous
     semblent importants :

  33..33..  ((MM) La souris

  1. Sur quel port votre souris est-elle connectee  ? Quelle IRQ  ?

  2. Quel type de souris utilisez-vous (Microsoft, PS/2, ...)  ?

  33..44..  ((CC) CD-ROM

  1. Quelle est la marque et le type de votre lecteur de  CD-ROM  (  par
     ex. IDE ATAPI, Sony, S-B Pro/Panasonic, SCSI, veritable IDE...) :

  2. Sur  quelle  interface  (1er,  2eme,  3eme ou 4eme IDE) et sur quel
     lecteur (NdT: ??) le CD-ROM est-il connecte (par ex.  2eme  lecteur
     du 1er IDE)  ?

  33..55..  ((FF) Lecteur de disquettes

  1. Avez-vous un lecteur de disquettes 3.5'  ?

  2. Le lecteur de disquettes 3.5' est-il amorcable  ?

  3. Avez-vous un lecteur de disquettes 5.25'  ?

  4. Le lecteur de disquettes 5.25' est-il amorcable  ?

  33..66..  ((TT) Lecteurs de cassettes

  1. Quel  type  de  lecteur  de cassettes utilisez-vous (cela peut etre
     AUCUN)  (type  interface  lecteur   de   disquettes,   SCSI,   port
     parallele...)   ?

  2. Avez-vous  un  controlleur  de  disquettes  secondaire  pour  votre
     lecteur de cassettes  ?

  33..77..  ((DD) Disques

  1. Quel type  de  disque(s)  dur(s)  utilisez-vous  (IDE,  SCSI,  RLL,
     MFM...)  ?

  2. Combien  de  partitions  avez-vous sur votre premier disque  ? Nom,
     type, taille  ?

  3. Pouvez-vous  repartitionner  votre  disque  (toutes   les   donnees
     existantes seront perdues)  ?

  4. Quelles  partitions  peuvent  etre  reformattees  pour  devenir des
     partitions Linux  ?

  5. Quelle quantite d'espace disque voulez-vous allouer a Linux (50  Mo
     minimum)  ?

  6. Quel est votre deuxieme disque dur (s'il y a lieu)  ?

  7. Quel est votre troisieme disque dur (s'il y a lieu)  ?

  8. Quel est votre quatrieme disque dur (s'il y a lieu)  ?

  9. Avez-vous des peripheriques SCSI  ? Quel controlleur SCSI avez-vous
     (s'il y a lieu)  ?

  33..88..  ((VV) Video

  1. Quel  type  d'ecran  avez-vous  (Monochrome,  Couleur)  (EGA,  VGA,
     CGA...)  ? Quelle marque  ?

  2. Taille de votre ecran (14', 15', 19'...)  ?

  3. Quelles sont les resolutions et le nombre de couleurs possibles sur
     cet ecran (640x480, 800x600, 1024x768)  ?

  4. Quel est le taux de rafraichissement vertical de votre ecran  (peut
     etre un intervalle)  ?

  5. Quel  est  le  taux  de  rafraichissement horizontal de votre ecran
     (peut etre un intervalle)  ?

  6. Marque et modele de votre carte video  ?

  7. Chipset utilise par votre carte video  ?

  8. Frequence de synchronisation horizontale de l'ecran  ?

  9. Frequence de synchronisation verticale de l'ecran  ?

  10.
     Bande passante de l'ecran  ?

  11.
     Taille de la memoire video  ?

  33..99..  ((NN) Reseau

  1. Utilisez-vous un modem interne ou externe  ?

  2. Quelle marque  ?

  3. Sur quel port serie est-il connecte  ? Quelle IRQ  ?

  4. Quelle est la vitesse du modem (en bps)  ?

  5. Est-ce un modem "seulement pour Windows" (WIN-MODEM...)  ?

  6. Quelle type de carte ethernet avez-vous (10base2, 10baseT,  aucune)
     ?

  7. Votre machine fera-t-elle partie d'Internet ou d'un Intranet  ?

  8. Votre machine se connectera-t-elle en PPP a un serveur  ?

  33..1100..  ((PP) Imprimante

  1. Avez-vous  une imprimant connectee au port parallele de votre PC  ?

  2. Quelle sont la marque et le modele de votre imprimante  ?

  33..1111..  ((XX) Divers

  1. La prise de votre clavier est-elle ronds (DIN-5) ou de type PS/2  ?

  2. Voulez-vous  utiliser  un  clavier  non  americain (Francais, Grec,
     Cyrillique...)  ?

  3. Utilisez-vous des peripheriques Plug & Play  ?

  4. Avez-vous une carte son  ? Laquelle  ? Quelle adresse, IRQ  et  DMA
     utilise-t-elle  ?

  5. Combien de slots ISA avez-vous  ?

  6. Combien de slots EISA avez-vous  ?

  7. Combien de slots VESA avez-vous  ?

  8. Combien de slots PCI avez-vous  ?

  9. Combien d'autres (precisez) slots avez-vous  ?

  10.
     Avez-vous d'autre materiel interessant  ?

  11.
     Veuillez ajouter les details que vous jugez importants  ?

  44..  CCoonncclluussiioonn

  Avez-vous   trouve  ce  formulaire  clair    ?  Des  suggestions  pour
  l'ameliorer  ?

  C'est tout. Merci d'avoir rempli ce formulaire.

  Reverifiez les question precedentes, et conservez cette liste sous  la
  main lors de l'installation.

  44..11..  RReemmeerrcciieemmeennttss

  Algologic  remercie  les  nombreux membres de la communaute Linux pour
  leurs suggestions utiles a la preparation de  cette  checklist.  Cette
  checklist  est  la preuve de la cooperation et de la bonne volonte qui
  existe entre  les  utilisateurs  de  Linux.   Algologic  soumet  cette
  checklist  a  la communaute Linux comme son humble hommage a "l'esprit
  Linux".

  Dites-nous si vous avez trouve ce document clair, et si vous avez  des
  suggestions pour le rendre plus utile.

  Ce            document            est           disponible           a
  http://members.tripod.com/ algolog/lnxchk.htm

  Merci de votre attention.

  Comment activer la comptabilit des processus sous Linux
  Albert M. C. Tam, bertie@scn.org
  Adaptation franaise par Miodrag Vallat.
  8 Aot 1997

  Dcrit comment activer la comptabilit des processus sur un systme
  Linux, et l'emploi des diverses commandes de comptabilit des proces
  sus.
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Qu'est-ce que la comptabilit des processus ?

  3. O en est la comptabilit des processus sous Linux ?

  4. Besoins de la comptabilit des processus sous Linux

     4.1 Noyau
     4.2 Logiciels de comptabilit

  5. Mise en place de la comptabilit des processus sous Linux

     5.1 Compiler et installer les logiciels de comptabilit
     5.2 Modifier les scripts d'initialisation du systme pour lancer la comptabilit des processus au dmarrage
     5.3 Crer le fichier de statistiques pacct
     5.4 Redmarrer

  6. Commandes de comptabilit diverses

     6.1 ac
     6.2 accton
     6.3 last
     6.4 sa
     6.5 lastcomm


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce document dcrit comment activer la comptabilit des processus sur
  un systme Linux, et l'emploi des diverses commandes de comptabilit
  des processus. Il s'adresse aux utilisateurs des noyaux de version
  1.3.73 ou ultrieure (test rcemment avec un systme RedHat 4.1 de
  noyau 2.0.27). Les noyaux plus anciens que le 1.3.73 ncessitent une
  rustine afin de pouvoir disposer de la comptabilit des processus.

  Ce document est plac en copyleft par Albert M. C. Tam,
  bertie@scn.org.  Vous tes autoris  utiliser, copier et distribuer
  ce document  des fins non commerciales, tant que le nom de l'auteur
  et ce copyright est prserv dans chaque copie, et que le document
  n'est pas modifi. Ce document est distribu car potentiellement
  utile, mais ssaannss aauuccuunnee ggaarraannttiiee, ni explicite, ni implicite.  Bien
  qu'un grand soin ait t apport pour s'assurer de la justesse de ce
  document, l'auteur et le traducteur ne pourront tre tenus
  responsables de toute erreur ou dommage causs par l'utilisation des
  informations contenues dans ce document.

  N'hsitez pas  envoyer vos remarques et suggestions  l'auteur,
  bertie@scn.org si vous dcouvrez des erreurs ou s'il manque des
  informations. J'en serai ravi.

  22..  QQuu''eesstt--ccee qquuee llaa ccoommppttaabbiilliitt ddeess pprroocceessssuuss ??

  La comptabilit des processus est l'opration d'enregistrement et de
  rcapitulation des commandes excutes sous Linux. Les noyaux Linux
  rcents sont capables de maintenir des informations sur les commandes
  excutes, l'utilisateur les ayant excutes, le temps CPU consacr,
  et bien plus encore.

  La comptabilit des processus vous permet de conserver des
  informations dtailles sur les ressources systme utilises, leur
  rpartition entre les utilisateurs, et de surveiller le systme.


  33..  OO eenn eesstt llaa ccoommppttaabbiilliitt ddeess pprroocceessssuuss ssoouuss LLiinnuuxx ??

  Le support de comptabilit des processus a t intgr dans les noyaux
  rcents  partir de la version 1.3.73. Si vous utilisez un noyau plus
  ancien, il vous faudra des rustines. Celles-ci sont disponibles en


  44..  BBeessooiinnss ddee llaa ccoommppttaabbiilliitt ddeess pprroocceessssuuss ssoouuss LLiinnuuxx


  44..11..  NNooyyaauu

  Un noyau Linux de version 1.3.73 ou ultrieure ; je recommande une
  version 2.x.  Les sources du noyau sont disponibles en


  44..22..  LLooggiicciieellss ddee ccoommppttaabbiilliitt

  Selon votre distribution Linux, les logiciels de comptabilit seront
  ou ne seront pas installs sur votre systme. S'ils ne le sont pas,
  essayez de les tlcharger en


  55..  MMiissee eenn ppllaaccee ddee llaa ccoommppttaabbiilliitt ddeess pprroocceessssuuss ssoouuss LLiinnuuxx


  55..11..  CCoommppiilleerr eett iinnssttaalllleerr lleess llooggiicciieellss ddee ccoommppttaabbiilliitt

  Les logiciels de comptabilit sont disponibles en

  55..22..  ccoommppttaabbiilliitt ddeess pprroocceessssuuss aauu ddmmaarrrraaggee MMooddiiffiieerr lleess ssccrriippttss
  dd''iinniittiiaalliissaattiioonn dduu ssyyssttmmee ppoouurr llaanncceerr llaa

  Voici un exemple :


               # Activer la comptabilit des processus.
               if [ -x /sbin/accton ]
               then
                       /sbin/accton /var/log/pacct
                               echo "Comptabilit des processus active."
               fi





  55..33..  CCrreerr llee ffiicchhiieerr ddee ssttaattiissttiiqquueess ppaacccctt

  Vos logiciels de comptabilit excuteront leurs commandes sur le
  fichier /var/log/pacct par dfaut.


  Pour crer le fichier de statistiques :


               touch /var/log/pacct




  Ce fichier de statistiques doit tre la proprit de root, avec
  permission de lecture et d'criture pour root, et permission de
  lecture pour le reste du monde :


               chown root /var/log/pacct
               chmod 0644 /var/log/pacct





  55..44..  RReeddmmaarrrreerr

  Redmarrer le systme pour que les modifications prennent effet.


  66..  CCoommmmaannddeess ddee ccoommppttaabbiilliitt ddiivveerrsseess

  66..11..  aacc

  ac affiche des statistiques sur le temps de connexion des utilisateurs
  en heures, en fonction des logins et des logout du fichier
  /var/log/wtmp. ac est galement capable d'afficher les temps totaux
  par jour (option -d), et par utilisateur (option -p).


  66..22..  aaccccttoonn

  accton est utilis pour activer ou dsactiver la comptabilit des
  processus. Cette commande est gnralement excute au dmarrage ou 
  l'arrt du systme via les scripts d'initialisation.


  66..33..  llaasstt

  last parcourt le fichier /var/log/wtmp et affiche des informations sur
  le temps de connexion des utilisateurs.


  66..44..  ssaa

  sa rsume les statistiques de comptabilit de la commande prcdente,
  tries par temps d'entres/sorties, temps processeur, depuis le
  fichier /var/account/pacct.


  66..55..  llaassttccoommmm

  lastcomm affiche la liste de toutes les commandes prcdemment
  excutes, depuis le fichier /var/account/pacct.







  Mini-HOWTO ARP-Proxy
  Al Longyear, longyear@netcom.com
  5 Decembre 1994

  (Traduction  francaise  par  Eric  Dumas  Eric.Dumas@freenix.fr  (Aout
  1995)).

  11..  NNoottee dduu ttrraadduucctteeuurr

  Ce document utilise souvent le terme technique _p_r_o_x_y. Il est utile  de
  savoir  que  ce terme anglais signifie un mandataire, une procuration.
  Un serveur proxy peut alors etre  compare  a  un  serveur  servant  de
  mandataire  a toutes les machines s'y connectant. Ce serveur essaie de
  repondre aux requetes, dans ce cas precis, ARP.

  22..  IInnttrroodduuccttiioonn

  Ce document a ete concu pour aider les personnes qui veulent  utiliser
  le  systeme  ARP Proxy (Protocole de Resolution d'Adresses) avec LLiinnuuxx
  dans le cas de serveurs PPP et SLIP.

  ARP Proxy est egalement appele _l_'_A_R_P _g_r_a_c_i_e_u_x dans certains  ouvrages.
  Il  y  a  eu  pas  mal  de demandes au sujet de l'utilisation de l'ARP
  Proxy. Lorsqu'il ne peut etre utilise, certaines personnes considerent
  que c'est du a un defaut du programme et se demandent pourquoi cela ne
  fonctionne pas.

  J'espere qu'avec le support de ce document, les gens en sauront un peu
  plus a propos d'ARP proxy, que cela soit utile ou non.

  L'utilisation  d'ARP proxy est utile lorsque vous possedez un serveur.
  Il va permettre la connexion dynamique  des  machines  distantes  sans
  avoir  besoin  de  mettre a jour les tables de routages sur les autres
  machines, excepte le serveur associe.

  Le  terme  de  _s_e_r_v_e_u_r  est  fort  peu  approprie.   TCP/IP   est   un
  environnement  reseau  _P_e_e_r  _t_o _P_e_e_r. Il n'y a pas de client ayant une
  relation avec un serveur comme  d'autres  systemes  avec  des  donnees
  partagees  sur  des serveurs que les clients exploitent. Toutefois, il
  est pratique d'appeler serveur un systeme qui reponde au telephone  et
  client, un systeme qui appelle pour se connecter au serveur.

  Le  programme  de  gestion reseau de LLiinnuuxx gere directement ARP proxy.
  Il n'y a pas besoin d'un demon particulier comme proxyarpd utilise sur
  certains systemes.

  De  plus, le protocole PPP, pppd et au moins l'un des codes SLIP, dip-
  uri, gerent ARP proxy. Le programme reseau, arp va gerer  et  afficher
  la table.

  Pour  comprendre  comment  fonctionne ARP proxy et lorsqu'il doit etre
  utilise, vous devez avoir  une  connaissance  de  base  concernant  le
  fonctionnement d'un reseau en general.

  Les  trois  paragraphes   suivants  vont decrire brievement la gestion
  reseau TCP/IP et le fonctionnement du routage.

  33..  LLee ccoottee mmaatteerriieell dduu rreesseeaauu

  Tout reseau utilisant Ethernet ou Token Ring fonctionne  en  utilisant
  une  adresse  _M_A_C  (_M_e_d_i_u_m  _A_c_c_e_s  _C_o_n_t_r_o_l).  Il  s'agit d'une adresse
  materielle reseau associee a un controleur specifique.  Chaque adresse
  MAC   est   unique.  Elles  sont  assignees  par  le  constructeur  du
  controleur. Toutefois elles peuvent etre remplacees par  logiciel,  ce
  qui n'est pas une regle generale.

  Les adresses IP sont converties en adresses MAC en utilisant une table
  particuliere  a  l'intereur  du  logiciel  reseau  appele  _A_R_P  _c_a_c_h_e.
  Lorsque le logiciel reseau souhaite envoyer une trame IP a une adresse
  specifique, il consulte ce cache pour determiner  l'adresse  MAC.   Si
  l'entree n'est pas trouvee dans le cache, une requete particuliere est
  envoyee a toutes les machines du reseau pour convertir l'adresse IP en
  une adresse MAC. Ceci s'appelle une requete ARP.

  La reponse a la requete ARP est une reponse avec l'adresse MAC.  Cette
  adresse MAC est alors  ajoutee  au  cache  pour  que  les  conversions
  puissent etre realisees sans l'aide d'ARP.

  C'est  cette  requete  ARP qui est utilisee par le systeme d'ARP proxy
  pour realiser la gestion des connexions distantes.

  Il y a des regles selon lesquelles  des  entrees  sont  supprimees  du
  cache.   Ces  regles  ne  sont pas detaillees dans ce document et sont
  laissees a une documentation concernant la  description  technique  du
  reseau IP.

  (Comme  Token  Ring  est  actuellement en developement, et qu'il n'est
  disponible qu'en version de teste, le support de communication  reseau
  courant  sous  LLiinnuuxx  est Ethernet. J'emploierai le terme d'Ethernet a
  partir de maintenant. Des caracteristiques semblables sont disponibles
  pour Token Ring, independament du code source de routage.

  44..  LLeess rraaiissoonnss dd''uuttiilliisseerr ll''AARRPP PPrrooxxyy AARRPP

  Le  principe  d'ARP proxy est de permettre l'assignation de plus d'une
  adresse IP a une seule carte reseau.

  Le fonctionnement consiste a la creation d'une entree  dans  le  cache
  ARP  de  LLiinnuuxx  en  associant  l'adresse IP supplementaire a l'adresse
  materielle du controleur Ethernet. Cela permet  au  systeme  LLiinnuuxx  de
  repondre  a  une  requete  ARP pour traduire une adresse IP en adresse
  materielle.

  55..  RRoouuttaaggee TTCCPP//IIPP

  _U_n_e _c_o_u_r_t_e _p_r_e_f_a_c_e _e_s_t _n_e_c_e_s_s_a_i_r_e_. _E_l_l_e _d_e_c_r_i_t _l_e _p_r_i_n_c_i_p_e _d_e  _l_'_a_r_b_r_e
  _d_e  _r_o_u_t_a_g_e_.  _E_l_l_e  _n_e _t_r_a_i_t_e _p_a_s _l_e _r_o_u_t_a_g_e _s_o_u_r_c_e _d_e_s _t_r_a_m_e_s _I_P_.  _L_e
  _r_o_u_t_a_g_e _s_o_u_r_c_e _r_e_a_l_i_s_e _p_a_r _T_o_k_e_n _R_i_n_g _n_'_e_s_t _p_a_s _d_u _r_o_u_t_a_g_e  _I_P  _s_o_u_r_c_e
  _m_a_i_s   _i_l  _s_'_a_g_i_t  _d_'_u_n_e  _c_o_u_c_h_e  _M_A_C  _q_u_i  _r_e_a_l_i_s_e  _c_e_t_t_e  _o_p_e_r_a_t_i_o_n_.
  _L_'_u_t_i_l_i_s_a_t_i_o_n _d_u _r_o_u_t_a_g_e _s_o_u_r_c_e _I_P _e_s_t _d_e_c_o_n_s_e_i_l_l_e_. _L_e _r_o_u_t_a_g_e  _s_o_u_r_c_e
  _M_A_C   _d_e   _T_o_k_e_n  _R_i_n_g  _e_s_t  _n_e_c_e_s_s_a_i_r_e  _p_o_u_r  _r_e_a_l_i_s_e_r  _c_e  _s_t_y_l_e  _d_e
  _c_o_m_m_u_n_i_c_a_t_i_o_n_.

  Pour comprendre un peu mieux ARP proxy, vous devez comprendre  comment
  les  trames  IP  sont routees a travers le reseau. Je ne vais pas trop
  detailler ce partie. Si vous voulez des informations  supplementaires,
  bon  nombre  de  livres  disponibles  donnent  des  informations  plus
  poussees. (Si vous ne voulez pas  regarder  les  livres,  vous  pouvez
  alors lire les documents RFC.)

  Les  trames  IP  sont  routees  a chacune des etapes de leur passage a
  travers le reseau. Chaque machine, routeur  ou  passerelle  decide  de
  lui-meme et avec sa propre copie de la table de routage ou la trame IP
  doit etre envoyee.

  Le  routage  est  realise  en  utilisant  un  reseau  IP  (terme   que
  j'utiliserai).   A  chaque  interface  reseau, on assigne un reseau IP
  unique. Chacun possede une adresse IP. Chacun  possede  un  masque  de
  reseau.   Le  reseau  IP  est  simplement  une  operation  binaire  de
  l'adresse IP  avec  le  masque  reseau.   Par  exemple,  l'adresse  IP
  10.124.35.40  et  le masque de reseau 255.255.0.0 vont avoir un reseau
  IP de 10.124.0.0. J'utilise des masques reseau en octets mais la  meme
  logique  peut  s'appliquer a la limite a des masques reseaux qui ne le
  sont pas.

  LLiinnuuxx associe le masque du reseau a l'entree d'un chemin. Lorsque vous
  ajoutez un chemin dans le systeme, vous specifiez une adresse IP et le
  peripherique de destination.  Si  vous  ne  specifiez  pas  de  masque
  reseau, celui-ci est choisi comme etant le masque de reseau par defaut
  du  peripherique  de  destination.  Il  est  positionne   lorsque   le
  peripherique est configure par ifconfig.

  Pour mieux comprendre le routage, regardez la configuration suivante :

  Destination     Masque Reseau    Passerelle    Option   Peripherique

  10.124.0.0      255.255.0.0      0.0.0.0       U        eth0
  10.125.0.0      255.255.0.0      0.0.0.0       U        eth1
  10.126.0.0      255.255.0.0      10.125.31.1   UG       eth1
  10.124.12.5     255.255.255.255  0.0.0.0       UH       ppp0
  0.0.0.0         0.0.0.0          10.124.25.1   U        eth0

  Il s'agit d'un systeme possedant trois interfaces reseau.  Il  a  deux
  controleurs  Ethernet  et  un  peripherique PPP. Les trames IP peuvent
  penetrer dans ce systeme par n'importe laquelle des trois sources.  En
  plus,  des trames sont renvoyees a travers ce systeme a n'importe quel
  des trois peripheriques de destination.

  Le chemin par defaut est le peripherique de la passerelle  10.124.25.1
  comme  le  montre  la derniere entree.  Pour joindre la passerelle, la
  trame est envoyee a-travers le peripherique eth0.

  Un a peripherique PPP connecte. Son adresse IP est 10.124.12.5.

  Le peripherique eth0 est sur le reseau d'adresse IP  10.124.0.0  alors
  que le peripherique eth1 est sur celui d'adresse IP 10.125.0.0.

  En  plus, un chemin vers le reseau IP 10.126.0.0 est disponible par la
  passerelle associee 10.125.31.1.

  Pour comprendre comment le routage est realise, considerons une  trame
  IP qui doit etre envoyee a l'adresse 10.125.45.1.

  LLiinnuuxx  va  consulter  la table de routage et pour chacune des entrees,
  prendre le masque de reseau, puis effectuer une operation logique (et)
  sur  le masque reseau. Enfin il va le comparer a l'entree de l'adresse
  IP de destination. Si le resultat correspond, la trame est envoyee  au
  peripherique indique.

  Le  resultat  est que la dite trame pour l'adresse IP 10.125.45.1 sera
  envoyee au peripherique eth1.

  De plus, une trame emise de l'adresse IP 10.124.12.5 sera  envoyee  au
  peripherique  ppp0  alors  qu'une  trame  provenant  de  l'adresse  IP
  10.124.12.6 sera envoyee au  peripherique  eth0  car  le  peripherique
  accepte pour seule et unique adresse, l'adresse IP 10.124.12.5.

  Les  trames pour l'adresse 10.126.31.4 sont differentes. Elles ont une
  _p_a_s_s_e_r_e_l_l_e associee.  Le probleme  est  resolu  de  la  meme  maniere.
  Toutefois,  au  lieu d'envoyer les trames simplemement au peripherique
  eth1, elles sont envoyees au systeme unique  associe  a  l'adresse  IP
  10.125.31.1.  Il  s'agit  de  l'adresse  IP qui est transformee en une
  adresse MAC, plutot qu'en une adresse de destination 10.126.31.4.

  Lorsqu'elle arrive sur le systeme d'adresse 10.126.31.1,  celui-ci  va
  renvoyer  la  trame sur la destination finale 10.126.31.4 en utilisant
  sa propre table de routage qui peut lui indiquer de rediriger la trame
  sur l'interface eth3.

  De nombreuse conditions d'erreurs qui sont detectees par ce systeme de
  routage. Je ne veux  pas  toutes  les  detailler,  toutefois,  si  par
  exemple  10.126.31.1 ne connait pas le chemin pour atteindre l'adresse
  .4, alors il devrait renvoyer une trame ICMP (Protocole de Messages de
  Controles  d'Internet)  a  l'envoyeur initial comme quoi il n'a pas de
  chemin pour la machine specifiee.

  66..  RRoouuttaaggee aavveecc AARRPP PPrrooxxyy

  Enfin, nous atteignons le sujet de ce document maintenant  que  toutes
  les bases ont etes posees.

  Il  faut  se rappeler que LLiinnuuxx va mettre une entree dans le cache ARP
  pour l'adresse IP et l'adresse materielle MAC  associee  lorsque  l'on
  utilise  ARP  Proxy.  Souvenez-vous que c'est ce cache qui est utilise
  pour convertir une adresse IP en une adresse MAC.

  Lorsqu'un site distant se connecte  a  l'adresse  IP  10.124.12.5,  le
  systeme  LLiinnuuxx  ajoutera l'adresse IP ainsi que l'adresse MAC associee
  au controleur eth0, dans le cache ARP.

  Lorsqu'il recoit une requete pour convertir l'adresse  10.124.12.5  en
  une adresse MAC, LLiinnuuxx va envoyer l'entree de ses tables au demandeur.
  Le resultat est que la trame pour cette adresse  IP  sera  envoyee  au
  serveur et peut alors la transmettre au site distant.

  C'est  de  cette  maniere  qu'ARP  proxy fonctionne. Le serveur est un
  proxy (un agent, un intermediaire, etc.) pour  l'adresse  IP  du  site
  distant.   C'est le terme employe pour un reseau qui peut accepter des
  trames de l'adresse IP distante et le servir en repondant aux requetes
  ARP.

  Donc,  pour qu'ARP proxy fonctionne, l'adresse IP du site (10.124.12.5
  dans mon exemple) doit etre l'une  des  adresses  IP  pour  l'une  des
  cartes reseaux.

  Il y a deux raisons pour justifier cette obligation :

  1. L'adresse  MAC  d'un controleur est entree dans le cache ARP pour y
     etre associee a l'adresse IP. Une adresse MAC est  necessaire  pour
     l'assignation  ARP  depuis  que  le  cache  ARP  est une conversion
     d'adresse IP en une adresse MAC.

  2. Tout systeme du reseau realise son  propre  routage.  Ces  systemes
     savent  que  pour  envoyer  une trame IP a un autre systeme distant
     ayant une adresse IP, il doit 'mettre la trame dans  le  meme  fil'
     qui est branche a la carte reseau.

  77..  LLoorrssqquuee ll''AARRPP PPrrooxxyy nnee ffoonnccttiioonnnnee ppaass

  Considerons  ce  qui pourrait se passer si l'adresse IP distante etait
  10.200.3.1 plutot que 10.124.12.5.

  1. Les systemes distants  peuvent  ne  pas  savoir  ou  envoyer  cette
     adresse

     Ils  savent  tous  que  pour  joindre  le reseau IP 10.124.0.0, les
     trames doivent aller sur le cable connecte a  eth0.  Toutefois,  il
     n'y  a  pas  de reseau ayant l'adresse 10.200.0.0. Ils ne sauraient
     pas comment envoyer les trames au bon destinataire.

  2. Le  serveur  risque  ne  pas  savoir  quelle  carte  utiliser  pour
     l'adresse MAC appropriee lorsqu'il cree une entree ARP.

  C'est  la  raison  la  plus  frequente  pour  laquelle  ARP  proxy  ne
  fonctionne pas chez  certaines  personnes.  Elles  ont  un  reseau  IP
  different  associe a l'adresse IP du site distant plutot qu'a l'une de
  leurs interfaces reseau.

  88..  LLeess pprroobblleemmeess aavveecc AARRPP PPrrooxxyy eett qquuii ddooiivveenntt eettrree eevviitteess

  1. Ne pas avoir plus d'un systeme qui reponde  a  l'entree  ARP  proxy
     d'une adresse IP particuliere. Dans le cas de BSD, il faut verifier
     qu'il n'y ait pas de conflit entre les adresses avec le  proxy ARP.
     Pour  un  reseau  base  sur  un  systeme  de  type BSD, vous devrez
     orienter le reseau tout entier sur un seul serveur.

     Pour finir, les systemes BSD  n'aprecient  gere  de  recevoir  plus
     d'une reponse pour une requete ARP.

  2. N'essayez  pas  de  lancer ARP proxy pour une adresse deja presente
     sur le reseau.

     C'est une petite variation du probleme ci-dessus. Si  vous  essayez
     de  lancer  ARP proxy pour une adresse IP disponible sur le reseau,
     alors deux reponses vont etre generees. Cela signifie que  vous  ne
     devriez  pas  prendre des adresses IP du reseau et les envoyer dans
     une connexion distante. Cela peut avoir pour concequence que  votre
     serveur realise une operation ARP Proxy.

  99..   QQuuee  ffaaiirree  ssii  vvoouuss nnee ppoouuvveezz uuttiilliisseerr AARRPP PPrrooxxyy ttoouutt eenn vvoouullaanntt
  aavvooiirr lleess mmeemmeess ffoonnccttiioonnnnaalliitteess ??

  Il  y a plusieurs choix possibles si vous etes capables d'utiliser ARP
  proxy.

  La methode la plus simple est de creer un  sous-reseau  d'adresses  IP
  pour  que  toutes  les  adresses externes aient leur propre adresse IP
  reseau.  Puis, d'ajouter un chemin reseau  dans  chacun  des  routeurs
  (les  peripheriques  indiques  par l'adresse passerelle dans chacun de
  vos fichiers _h_o_s_t_s) pour que le reseau IP soit reconnu par le  serveur
  a partir duquel les adresses IP se connectent.

  Autrement,  vous  pouvez  egalement  utiliser des passerelles entre le
  serveur et les routeurs.

  Une autre maniere de faire est de mettre un chemin de machine si  vous
  ne  desirez pas employer un sous-reseau pour le reseau IP. Vous pouvez
  mettre les entrees dans chacun des routeurs pour toutes  les  adresses
  IP.

  Vous  ne  devrez  mettre  a  jour que les passerelles et les routeurs.
  Vous n'avez pas besoin  de  modifier  toutes  les  machines  de  votre
  reseau.  Le  chemin par defaut que les machines utilisent pour envoyer
  des trames aux routeurs va provoquer ce qui s'appelle un _I_C_M_P _r_e_d_i_r_e_c_t
  (une  redirection  ICMP)  de  trames  vers  la  machine  effectuant la
  requete.  Cela va alors automatiquement  ajouter  un  chemin  vers  le
  serveur approprie.

  1100..  CCoonncclluussiioonn

  J'espere  avoir  un  peu  eclairci  ARP  proxy  et son fonctionnement.
  Heureusement, si vous utilisez pppd ou dip-uri, vous n'avez pas besoin
  de  connaitre  les  differentes  etapes  du  mecanisme.  C'est realise
  automatiquement pour vous par ces programmes.

  ARP Proxy n'est pas destine a n'importe qui. C'est  une  solution  qui
  fonctionne dans certains cas. Pouvoir determiner ses besoins peux vous
  aider a resoudre vos problemes de reseaux.

  Des informations supplementaires peuvent etre trouvee  dans  le  livre
  _T_C_P_/_I_P  _I_l_l_u_s_t_r_a_t_e_d_,  _v_o_l_u_m_e _1 _"_T_h_e _p_r_o_t_o_c_o_l_s_"  par W. Richard Stevens
  et publie par Addison Wessley.

  Merci !

  ProxyARP Subnetting HOWTO
  Bob Edwards, <Robert.Edwards@anu.edu.au>
  Aot 1997

  Ce HOWTO explique l'utilisation d'un sous-rseau avec mandataire
  (_p_r_o_x_y) ARP (protocole de rsolution d'adresse), pour rendre visible
  un petit rseau de machines comme si ces machines taient relies
  directement au rseau principal.  (traduction : Michel Billaud, <bil
  laud@labri.u-bordeaux.fr>).
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Remerciements

  3. Pourquoi utiliser un sous-rseau avec mandataire ARP ?

  4. Comment marche le mandatement ARP d'un sous-rseau ?

  5. Installation du  mandataire ARP de sous-rseau

  6. Autres alternatives au mandatement ARP de sous-rseau

  7. Autres applications du mandatement ARP de sous-rseau

  8. Copyright



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Ce HOWTO explique l'utilisation d'un sous-rseau avec mandataire
  (_p_r_o_x_y) ARP (protocole de rsolution d'adresse), pour rendre visible
  un petit rseau de machines (nous l'appellerons _r__s_e_a_u _0 dans la
  suite) comme si ces machines taient relies directement au rseau
  principal (_r__s_e_a_u _1).


  Ceci n'a de sens que si les machines sont relies par Ethernet ou
  autres dispositifs de type _e_t_h_e_r (autrement dit a ne convient pas
  pour SLIP, PPP, CSLIP, etc.)




  22..  RReemmeerrcciieemmeennttss


  Ni ce document, ni mon implmentation du mandatement ARP, n'auraient
  t possibles sans l'aide :

    d'Andrew Tridgell, qui a implment sous Linux les options de sous-
     rseau pour _a_r_p, et qui m'a aid personnellement  le faire marcher
     ;

    du mini-HOWTO _P_r_o_x_y_-_A_R_P crit par Al LongYear ;

    du mini-HOWTO _M_u_l_t_i_p_l_e_-_E_t_h_e_r_n_e_t de Don Becker ;


    du code source et de la page de manuel de la commande arp(8), de
     Fred N. van Kempen et Bernd Eckenfels.




  33..  PPoouurrqquuooii uuttiilliisseerr uunn ssoouuss--rrsseeaauu aavveecc mmaannddaattaaiirree AARRPP ??




  Les applications d'un sous-rseau avec mandataire ARP sont assez
  spcifiques.



  Dans mon cas, j'avais une carte Ethernet sans-fil ISA 8 bits. Je
  voulais utiliser cette carte pour raccorder un certain nombre de
  machines. Aprs avoir crit un pilote (_d_r_i_v_e_r) pour cette carte ISA
  (c'est le sujet d'un autre document), je pouvais l'utiliser dans une
  machine Linux.  partir de l, il tait seulement ncessaire d'ajouter
  une seconde interface Ethernet  la machine Linux, et d'utiliser alors
  un mcanisme quelconque pour interconnecter les deux rseaux.


  Dans la suite, j'appellerai _r__s_e_a_u _0 le rseau local Ethernet reli 
  la machine Linux  par une carte Ethernet (clone   NE-2000) sur _e_t_h_0.
  Le _r__s_e_a_u _1  est le rseau principal connect par la carte Ethernet
  sans-fil sur _e_t_h_1.  La _m_a_c_h_i_n_e _A est la machine Linux avec ses deux
  interfaces. La _m_a_c_h_i_n_e _B est une station quelconque du rseau 0, et la
  _m_a_c_h_i_n_e _C est sur le rseau 1.


  Normalement, pour raliser l'interconnexion, on pourrait :


    utiliser le logiciel IP-Bridge (voir le _B_r_i_d_g_e _m_i_n_i_-_H_O_W_T_O) pour
     raliser un pont entre les deux interfaces rseau.
     Malheureusement, la carte Ethernet sans-fil ne peut pas tre mise
     en mode ``promiscuous'' (autrement dit elle ne peut pas voir tous
     les paquets circulant sur le rseau 1).  C'est principalement 
     cause de la faible bande passante de la carte Ethernet sans-fil (2
     Mbits/sec), ce qui implique  que nous ne voulons pas supporter le
     trafic qui n'est pas destin  une autre machine sans-fil - dans
     notre cas la machine A -, ou les diffusions gnrales (_b_r_o_a_d_c_a_s_t_s).
     De plus, un pont charge assez lourdement le processeur.

    ou bien utiliser des sous-rseaux et un routeur pour transmettre
     les paquets entre les rseaux (voir le _I_P_-_S_u_b_n_e_t_w_o_r_k_i_n_g _m_i_n_i_-
     _H_O_W_T_O).  C'est une solution dpendante du protocole, bnficiant du
     fait que le noyau Linux sait grer les paquets IP (Internet
     Protocol), mais demandant du logiciel supplmentaire pour router
     d'autres protocoles (tels qu'AppleTalk). De plus,  ceci ncessite
     d'allouer un nouveau numro de sous-rseau IP, ce qui n'est pas
     toujours possible.

  Dans mon cas, il n'tait pas possible d'obtenir un nouveau numro de
  sous-rseau, alors je voulais une solution qui permette aux machines
  du rseau 0 d'apparatre comme si elles taient sur le rseau 1.
  C'est  cela que sert le mandatement ARP.  D'autres solutions sont
  utilises pour connecter d'autres protocoles (non-IP), comme _n_e_t_a_t_a_l_k
  pour le routage AppleTalk.




  44..  CCoommmmeenntt mmaarrcchhee llee mmaannddaatteemmeenntt AARRPP dd''uunn ssoouuss--rrsseeaauu ??


  En fait, le mandatement ARP sert uniquement  faire passer les paquets
  du rseau 1 vers le rseau 0. Pour faire passer les paquets dans
  l'autre sens, on emploie le routage IP normal.


  Dans mon cas, le rseau 1 possde un masque de sous-rseau  8 bits
  255.255.255.0. Pour le rseau 0, j'ai choisi un masque  4 bits
  (255.255.255.240), qui permet d'avoir 14 noeuds IP sur le rseau 0
  (2^4 = 16, moins deux pour l'adresse de rseau remplie de zros et
  l'adresse de diffusion remplie de uns ). Remarquez que toute taille de
  masque de sous-rseau convient, jusqu' la taille - non comprise - du
  masque de l'autre rseau (dans notre cas : 2, 3, 4, 5, 6 ou 7 bits -
  pour un seul bit utilisez le mandatement ARP normal !).


  Les numros IP (au total 16) du rseau 0 apparaissent comme un sous-
  ensemble du rseau 1. Remarquez qu'il est trs important, dans ce cas,
  de ne pas donner aux machines qui sont connectes directement au
  rseau 1 un numro pris dans cet intervalle.  Dans mon cas, j'ai
  ``rserv'' les numros IP du rseau 1 qui se terminent par 64  79
  pour le rseau 0. Les numros IP qui se terminent par 64 et 79 ne
  peuvent pas tre attribus  des machines : 79 est l'adresse de
  diffusion pour le rseau 0.



  La machine A a deux numros IP, l'un dans la plage d'adresses du
  rseau 0 pour sa vraie carte Ethernet (_e_t_h_0), l'autre dans la plage du
  rseau 1 (mais en dehors de la plage du rseau 0) pour la carte
  Ethernet sans-fil (_e_t_h_1).


  Supposons que la machine C (du rseau 1) veuille envoyer un paquet 
  la machine B (du rseau 0). Comme le numro IP de la machine B laisse
  croire  la machine C que B est sur le mme rseau physique, la
  machine C va utiliser le protocole de rsolution d'adresse ARP pour
  envoyer un message de diffusion sur le rseau 1, demandant  la
  machine qui a le numro IP de B de rpondre avec son adresse
  matrielle (adresse Ethernet ou MAC). La machine B ne verra pas cette
  requte, puisqu'en ralit elle n'est pas sur le rseau 1, mais la
  machine A, qui est sur les deux rseaux, la verra.


  La premire chose magique se produit maintenant, lorsque le code _a_r_p
  du noyau de la machine Linux (configure en mandataire ARP avec sous-
  rseau) dtermine que la requte est arrive sur l'interface du rseau
  1 (_e_t_h_1), et que le numro IP  rsoudre est dans l'intervalle du
  rseau 0.  La machine A envoie alors sa propre adresse matrielle
  (adresse Ethernet)  la machine C dans un paquet de rponse ARP.


  La machine C met alors  jour son cache ARP en y ajoutant une entre
  pour la machine B, mais avec l'adresse matrielle (Ethernet) de la
  machine A (la carte Ethernet sans-fil).  La machine C peut alors
  envoyer le paquet pour B  cette adresse matrielle (Ethernet), et la
  machine A le reoit.


  La machine A remarque que l'adresse de destination IP n'est pas la
  sienne, mais celle de B. Le code de routage du noyau Linux de la
  machine A essaie alors de faire suivre ce paquet vers la machine B en
  cherchant dans ses tables de routage pour savoir quelle interface
  contient le numro de rseau de B. Quoi qu'il en soit, le numro IP de
  B est valide aussi bien pour le rseau 0 (_e_t_h_0) que pour le rseau 1
  (_e_t_h_1).


  C'est alors qu'un autre fait magique se produit : comme le masque de
  sous-rseau du rseau 0 a plus de bits  1 (il est plus spcifique)
  que celui du rseau 1, le code de routage du noyau Linux va associer
  le numro IP de B  l'interface du rseau 0, et ne va pas chercher 
  voir si il correspond  l'interface du rseau 1 (par laquelle le
  paquet est arriv).


  Maintenant la machine A doit trouver la ``vraie'' adresse matrielle
  (Ethernet) de la machine B (en supposant qu'elle ne l'a pas dj dans
  le cache ARP). La machine A utilise une requte ARP, mais cette fois-
  ci le code arp du noyau Linux voit que la requte ne vient pas de
  l'interface du rseau 1 (_e_t_h_1), et donc ne renvoie  pas l'adresse du
  mandataire ARP.  la place, il envoie la requte ARP sur l'interface
  du rseau 0 (_e_t_h_0), o la machine B le verra et rpondra en donnant sa
  propre adresse matrielle (Ethernet). La machine A peut alors envoyer
  le paquet (qui venait de C) vers la machine B.


  La machine B reoit le paquet de C (qui est pass par A) et veut alors
  envoyer une rponse. Cette fois, B remarque que C est sur un sous-
  rseau diffrent (le masque de sous-rseau 255.255.255.240 exclut
  toutes les machines qui ne sont pas dans la plage d'adresses IP du
  rseau 0).  La machine B est configure avec une route par dfaut vers
  l'adresse IP de A sur le rseau 0, et envoie le paquet  la machine A.
  Cette fois-ci, le code de routage du noyau Linux de A trouve que
  l'adresse IP de la destination (machine C) est sur le rseau 1, et
  envoie le paquet  la machine C par l'interface Ethernet _e_t_h_1.


  Des choses du mme genre (mais moins compliques) se produisent pour
  les paquets mis (ou reus) par la machine A en direction (ou
  provenant) d'autres machines sur l'un ou l'autre des deux rseaux.

  De la mme faon, il est vident que si une autre machine D du rseau
  0 envoie une requte ARP concernant B sur le rseau 0, la machine A
  recevra cette requte sur son interface du rseau 0 (_e_t_h_0) et
  s'abstiendra d'y rpondre, puisqu'elle n'est configure comme
  mandataire que sur son interface du rseau 1 (_e_t_h_1).

  Remarquez aussi que les machines B, C (et D) n'ont de spcial  
  faire, du point de vue IP. Dans mon cas, il y a un mlange de SUN, de
  MAC et de PC sous Windows 95 sur le rseau 0, qui se connectent toutes
  au reste du monde  travers la machine Linux A.


  Pour finir, notez qu'une fois que les adresses matrielles (Ethernet)
  ont t trouves par chacune des machines A, B, C (et D), elles sont
  places dans leur cache ARP, et que les paquets suivants sont
  tranfrs sans surcot d  l'ARP. Normalement, les caches ARP
  suppriment les informations au bout de 5 minutes d'inactivit.



  55..  IInnssttaallllaattiioonn dduu  mmaannddaattaaiirree AARRPP ddee ssoouuss--rrsseeaauu


  J'ai install le mandataire ARP du sous-rseau sur un noyau Linux
  version 2.0.30, mais il parait  que le code fonctionne  avec une
  version 1.2.x.


  La premire chose  noter est que le code ARP est en deux parties :
  une partie dans le noyau, qui envoie et reoit les requtes et les
  rponses ARP et met  jour le cache ARP, etc. ; l'autre partie est
  constitue de la commande arp(8) qui permet au super-utilisateur de
  mettre  jour manuellement le cache ARP, et  tout le monde de le
  consulter.


  Le premier problme que j'ai eu tait que la commande arp(8) de ma
  distribution Slackware 3.1 tait antique (date de 1994 !) et ne
  communiquait pas correctement du tout avec le code ARP du noyau (``arp
  -a'' donnait un rsultat trange).




  La commande arp(8) de ``net-tools-1.33a'', qui est disponible sur un
  grand nombre de sites, en particulier (d'aprs le README qui lui est
  joint) ftp.linux.org.uk:/pub/linux/Networking/PROGRAMS/NetTools/,
  fonctionne correctement, et contient de nouvelles pages de manuel
  arp(8) qui expliquent les choses bien mieux que les anciennes.



  Une fois muni d'une commande arp(8) dcente, il ne me restait plus
  qu' modifier le seul fichier /etc/rc.d/rc.inet1 (pour la Slackware -
  c'est probablement diffrent pour d'autres distributions).  Tout
  d'abord, il nous faut changer l'adresse de diffusion, le numro de
  rseau, et le masque de _e_t_h_0 :


  NETMASK=255.255.255.240 # pour la partie hte sur 4 bits
  NETWORK=x.y.z.64        # notre nouveau rseau
                          #     (remplacez x.y.z par votre rseau)
  BROADCAST=x.y.z.79      # pour moi.



  Il faut ensuite ajouter une ligne pour configurer la seconde interface
  Ethernet (aprs les chargements de modules qui sont ventuellement
  ncessaires pour lancer le pilote) :


  /sbin/ifconfig eth1 _n_o_m___s_u_r___l_e___r__s_e_a_u___1 broadcast _x_._y_._z_._2_5_5 netmask
  255.255.255.0


  Puis nous ajoutons une route pour la nouvelle interface :


  /sbin/route add -net _x_._y_._z_._0 netmask 255.255.255.0


  Et vous aurez sans doute besoin de changer la passerelle par dfaut
  pour utiliser celle du rseau 1.


  Arrivs  ce point, nous pouvons ajouter la ligne pour le mandatement
  ARP :


  /sbin/arp -i eth1 -Ds ${NETWORK} eth1 netmask ${NETMASK} pub




  Ceci demande  ARP d'ajouter au cache une entre statique (``s'') pour
  le rseau ${NETWORK}.  Le ``-D'' dit d'utiliser la mme adresse
  matrielle que l'interface _e_t_h_1 (la seconde interface), ce qui nous
  vite d'avoir  chercher l'adresse matrielle de _e_t_h_1 et de la coder
  directement dans la commande.



  L'option netmask indique qu'il s'agit d'une entre ARP concernant un
  _s_o_u_s_-_r__s_e_a_u, qui est constitu des numros IP tels que

       _n_u_m__r_o___i_p & ${NETMASK} == ${NETWORK} & ${NETMASK}


  L'option pub demande de _p_u_b_l_i_e_r cette entre ARP, c'est--dire qu'il
  s'agit d'_m_a_n_d_a_t_e_m_e_n_t, et qu'il faudra rpondre au nom de ces numros
  IP.  L'option ``-i eth1'' prcise qu'il ne faudra rpondre qu'aux
  requtes ARP arrivant par l'interface _e_t_h_1.


  Normalement,  ce point, si la machine est redmarre, tous les
  machines du rseau 0 sembleront tre sur le rseau 1.  Vous pouvez
  vrifier que l'entre de mandatement ARP de sous-rseau a t prise en
  compte correctement sur la machine A. Sur ma machine (j'ai chang les
  noms pour protger les innocents) c'est :

  #/sbin/arp -an
  Address                 HWtype  HWaddress           Flags Mask            Iface
  x.y.z.1                 ether   00:00:0C:13:6F:17   C     *               eth1
  x.y.z.65                ether   00:40:05:49:77:01   C     *               eth0
  x.y.z.67                ether   08:00:20:0B:79:47   C     *               eth0
  x.y.z.5                 ether   00:00:3B:80:18:E5   C     *               eth1
  x.y.z.64                ether   00:40:96:20:CD:D2   CMP   255.255.255.240 eth1



  Vous pouvez aussi regarder le fichier /proc/net/arp, par exemple avec
  cat(1).

  La dernire ligne est l'entre de mandatement pour le sous-rseau. Les
  indicateurs CMP rvlent qu'il s'agit d'une donne statique (entre
  Manuellement) qui doit tre Publie. Elle ne servira qu' rpondre
  qu'aux requtes ARP qui arrivent par _e_t_h_1 et pour lesquelles le numro
  IP, une fois masqu, correspond au numro de rseau (galement
  masqu).  Remarquez que la commande arp(8) a trouv automatiquement
  l'adresse matrielle de _e_t_h_1 et l'a employe comme adresse  utiliser
  ( cause de l'option ``-Ds'').

  De la mme faon il est probablement prudent de vrifier que la table
  de routage a t remplie correctement. Voici la mienne (ici aussi, les
  noms ont t changs pour protger les innocents) :


  #/bin/netstat -rn
  Kernel routing table
  Destination     Gateway         Genmask         Flags Metric Ref Use    Iface
  x.y.z.64        0.0.0.0         255.255.255.240 U     0      0       71 eth0
  x.y.z.0         0.0.0.0         255.255.255.0   U     0      0      389 eth1
  127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        7 lo
  0.0.0.0         x.y.z.1         0.0.0.0         UG    1      0      573 eth1




  Vous pouvez aussi regarder le contenu du fichier /proc/net/route (par
  exemple avec cat(1)).
  Remarquez que la premire entre concerne un sous-ensemble de la
  seconde, mais la table de routage les classe dans l'ordre des masques,
  et donc l'entre _e_t_h_0 sera teste avant celle de _e_t_h_1.



  66..  AAuuttrreess aalltteerrnnaattiivveess aauu mmaannddaatteemmeenntt AARRPP ddee ssoouuss--rrsseeaauu


  Dans la mme situation il y a d'autres possibilits que le mandatement
  ARP de sous-rseau et celles que j'ai dj mentionnes (utilisation
  d'un pont et routage direct) :


    ``_M_a_s_q_u_e_r_a_d_i_n_g _I_P'' (voir le _I_P_-_M_a_s_q_u_e_r_a_d_e _m_i_n_i_-_H_O_W_T_O), dans lequel
     le rseau 0 est ``cache'' du reste du monde derrire la machine A.
     Quand les machines du rseau 0 tentent de se connecter 
     l'extrieur  travers la machine A, celle-ci modifie l'adresse
     d'origine et le numro de port des paquets pour qu'ils aient l'air
     d'avoir t envoys par elle-mme, plutt que par la machine cache
     du rseau 0.  C'est une solution lgante, bien qu'elle empche
     toute machine du rseau 1 d'tablir une connexion vers une machine
     du rseau 0, puisque les machines du rseau 0 n'existent pas en
     dehors de celui-ci.

     Ceci amliore efficacement la scurit des machines du rseau 0,
     mais cela signifie aussi que les serveurs du rseau 1 ne peuvent
     pas vrifier l'identit des clients du rseau 0 en se basant sur
     leur numros IP (les serveurs NFS, par exemple, utilisent les noms
     IP pour contrler l'accs aux systmes de fichiers).

    Une autre possibilit serait un _t_u_n_n_e_l _I_P _s_u_r _I_P, ce qui n'est pas
     support par toutes les plateformes (comme les Macs et les machines
     sous Windows), et je n'ai donc pas opt pour cette solution.

    Utiliser le mandatement ARP sans sous-rseau. C'est tout  fait
     possible, cela signifie simplement qu'il faut crer une entre
     individuelle pour chaque machine du rseau 0, au lieu d'une seule
     entre pour toutes les machines (prsentes et futures) du rseau 0.

    Il se peut que l'_a_l_i_a_s_i_n_g _I_P puisse tre utilis ici (NdT:
     francheement a m'tonnerait), mais je n'ai pas du tout explor
     cette voie.


  77..  AAuuttrreess aapppplliiccaattiioonnss dduu mmaannddaatteemmeenntt AARRPP ddee ssoouuss--rrsseeaauu




  Je ne connais qu'une autre application du  mandatement ARP de sous-
  rseau, ici  l'Australian National University (ANU). C'est celle pour
  laquelle Andrew Tridgell a crit,  l'origine, les extensions du
  mandatement ARP pour les sous-rseaux. Quoiqu'il en soit, Andrew
  m'informe qu'il y a, de fait, plusieurs autres sites dans le monde qui
  l'utilisent galement (je n'ai aucun dtail).

   l'ANU, l'autre application concerne un laboratoire d'enseignement
  qui sert  apprendre aux tudiants comment configurer des machines
  pour utiliser TCP/IP, y compris pour configurer la passerelle.  Le
  rseau utilis est un rseau de classe C, et Andrew avait besoin de le
  dcouper en sous-rseaux pour des raisons de scurit, de contrle du
  trafic et la raison pdagogique mentionne plus haut. Il l'a fait en
  utilisant le mandatement ARP, et a alors dcid qu'une seule entre
  dans le cache ARP pour tout le sous-rseau serait plus rapide et plus
  propre qu'une pour chaque machine du sous-rseau. Et voil.
  Mandatement ARP de sous-rseau !

  Les corrections et les suggestions sont les bienvenues !



  88..  CCooppyyrriigghhtt


  Copyright 1997 par Bob Edwards <Robert.Edwards@anu.edu.au>


  Tlphone : (+61) 2 6249 4090



  Sauf mention contraire, les copyrights des documents ``_L_i_n_u_x _H_O_W_T_O''
  sont dtenus par leurs auteurs respectifs. Ces documents peuvent tre
  reproduits et distribus en tout ou partie, sur tout support physique
  ou lectronique, du moment que cette notice de copyright figure sur
  toutes les copies. La redistribution commerciale est autorise et
  encourage, cependant l'auteur souhaite en tre averti.  Toutes les
  traductions, les travaux drivs, ou ouvrages incorporant un _L_i_n_u_x
  _H_O_W_T_O doivent tre soumis  cette mme  notice de copyright.
  Autrement dit, vous ne pouvez pas produire un travail driv d'un
  HOWTO en imposant des restrictions supplmentaires  sa diffusion. Des
  drogations  cette rgle peuvent tre accordes sous certaines
  conditions, veuillez contacter le coordinateur des Linux HOWTO 
  l'adresse indique ci-dessous.  En rsum, nous souhaitons promouvoir
  la diffusion de cette information par autant de canaux que possible,
  tout en conservant le copyright sur les HOWTOs, et nous voudrions tre
  avertis de tout projet de redistribution de ces documents. Si vous
  avez des questions, veuillez contacter Grek Hankins, coordinateur des
  Linux HOWTOs, par courrier lectronique  <greg@sunsie.unc.edu>.
































  The Linux Public Web Browser mini-HOWTO
  par Donald B. Marti Jr., dmarti@best.com
  Adaptation francaise : Pierre-Charles David david@essi.fr
  v0.3, 5 Janvier 1998

  L'idee  de  base  ici est de rendre le web accessible a des visiteurs,
  tout en limitant leurs possibilites de causer des degats.

  11..  CCooppyyrriigghhtt eett mmiissee eenn ggaarrddee

  Copyright 1997 Donald B. Marti Jr. Ce document peut  etre  redistribue
  sous  les  termes  de  la  licence du Projet de Documentation de Linux
  (LDP).

  Ce document ne couvre pour l'instant que Netscape Navigator,  mais  je
  projette d'ajouter des notes pour d'autres navigateur des que j'aurais
  les informations necessaires. Si  vous  essayez  ceci  avec  un  autre
  navigateur, faites le moi savoir.

  22..  IInnttrroodduuccttiioonn

  L'idee  de  base  ici est de rendre le web accessible a des visiteurs,
  tout en limitant leurs possibilites de causer des degats.

  Cette  configuration  etait  au   depart   destinee   a   des   stands
  d'expositions,   mais  elle  devrait  etre  applicable  dans  d'autres
  circonstances ou vous voulez faire  tourner  un  navigateur  web  sans
  avoir a vous occuper de l'ordinateur.

  Suivre  ces  instructions  ne rend en aucun cas votre systeme immunise
  contre les attaques ou les erreurs idiotes.

  33..  AAvvaanntt ddee ccoommmmeenncceerr

  33..11..  VVoouuss aavveezz bbeessooiinn dd''uunn nnaavviiggaatteeuurr ggrraapphhiiqquuee

  Ce document presuppose que vous ayez deja un navigateur web  graphique
  fonctionnant,  tel  que  Netscape  Navigator, sur votre systeme.  Vous
  devez avoir l'autorisation d'utiliser votre navigateur. Si vous voulez
  utilisez  Netscape  Navigator dans un contexte commercial, vous pouvez
  en acheter une copie avec la licence appropriee aupres de Caldera.

  33..22..  VVoouuss ddeevveezz aavvooiirr llaa ppeerrmmiissssiioonn dd''aajjoouutteerr uunn ccoommppttee uuttiilliissaatteeuurr

  Si  vous  n'avez pas le droit d'etre root, demandez a l'administrateur
  systeme d'ajouter le compte guest et de vous  rendre  proprietaire  du
  repertoire  personnel  de guest. Sauter a la section ``Creer ou editer
  les fichiers suivants'' (``Creer ou editer les fichiers suivants  dans
  /home/guest'') lorsqu'il ou elle l'a fait.

  33..33..   aauuttoonnoommee  VVoouuss aavveezz bbeessooiinn ddee hhttttppdd pour une station de naviga-
  tion web

  Si  vous  mettez en place une station de navigation web autonome, sans
  connexion reseau, vous devez avoir un httpd fonctionnant  correctement
  et les documents webs installes. Pour savoir si c'est le cas, tapez :

       lynx -dump http://localhost/

  Vous devez obtenir le texte de la page d'accueil sur votre systeme.

  44..  AAjjoouutteerr uunn ccoommppttee gguueesstt

  En  tant  que  root,  lancez adduser pour ajouter un utilisateur nomme
  guest. Entrez alors

       passwd guest

  pour positionner le mot de passe de  l'utilisateur  guest.  Cela  doit
  etre  quelque  chose  de  simple a se souvenir, comme ``guest''.  Vous
  communiquerez ce mot de passe aux utilisateurs. Ne  mettez  pas  votre
  propre mot de passe.

  Rendez-vous  ensuite  proprietaire  du  repertoire personnel de guest.
  Entrez

              chown moi.mongroupe /home/guest

  Remplacez ``moi'' par votre nom d'utilisateur normal et  ``mongroupe''
  avec  votre  nom  de groupe. (Sur Red Hat Linux, les deux seront iden-
  tiques.)

  Vous  devez  maintenant  tapez  exit  et  effectuer   le   reste   des
  manipulations sous votre compte normal, pas en tant que rroooott.

  55..  CCrreeeerr oouu eeddiitteerr lleess ffiicchhiieerrss ssuuiivvaannttss ddaannss //hhoommee//gguueesstt

  55..11..  FFiicchhiieerr ..bbaasshh__llooggiinn

       ______________________________________________________________________
              exec startx
       ______________________________________________________________________

  Cela  signifie  que  lorsque  guest  entre sur le systeme, le shell de
  login lancera tout de suite le systeme X Window.

  55..22..  FFiicchhiieerr ..XXcclliieennttss

       ______________________________________________________________________
       netscape
       ______________________________________________________________________

  Cela signifie que lorsque X demarre, guest obtient seulement le  navi-
  gateur  web,  sans gestionnaire de fenetres. Si vous preferez un autre
  navigateur web, mettez quelque chose d'autre.

  Le fichier .Xclients doit etre executable par guest. Entrez pour cela

  chmod 755 /home/guest/.Xclients

  55..33..  FFiicchhiieerr ..xxsseessssiioonn

       ______________________________________________________________________
       #!/bin/sh
       netscape
       ______________________________________________________________________

  Si vous utilisez xdm(1) pour  loguer  les  gens  sur  le  systeme,  ce
  fichier  doit  faire  en  sorte que guest obtienne le navigateur de la
  meme maniere que s'il s'etait loge normalement. Le  fichier  .xsession
  doit etre executable par guest. Entrez pour cela

       chmod 755 /home/guest/.xsession

  55..44..  FFiicchhiieerr ..XXddeeffaauullttss

  ______________________________________________________________________
  ! Desactive la selection a la souris
  *hysteresis:                            3000

  ! Rend tous les liens, visites ou non, de la meme couleur par defaut
  *linkForeground:                        #0000EE
  *vlinkForeground:                       #0000EE

  Netscape.Navigator.geometry: =NETSCAPE_GEOMETRY

  ! Desactive les commandes clavier
  *globalTranslations:

  ! Fait en sorte que tous les boutons de souris aient le meme effet
  *drawingArea.translations:              #replace                        \
  <Btn1Down>:                     ArmLink()                       \n\
  <Btn2Down>:                     ArmLink()                       \n\
  <Btn3Down>:                     ArmLink()                       \n\
  ~Shift<Btn1Up>:                 ActivateLink()                  \
                                  DisarmLink()                    \n\
  ~Shift<Btn2Up>:                 ActivateLink()                  \
                                  DisarmLink()                    \n\
  ~Shift<Btn3Up>:                 ActivateLink()                  \
                                  DisarmLink()                    \n\
  Shift<Btn1Up>:                  ActivateLink()                  \
                                  DisarmLink()                    \n\
  Shift<Btn2Up>:                  ActivateLink()                  \
                                  DisarmLink()                    \n\
  Shift<Btn3Up>:                  ActivateLink()                  \
                                  DisarmLink()                    \n\
  <Btn1Motion>:                   DisarmLinkIfMoved()             \n\
  <Btn2Motion>:                   DisarmLinkIfMoved()             \n\
  <Btn3Motion>:                   DisarmLinkIfMoved()             \n\
  <Motion>:                       DescribeLink()                  \n\
  ______________________________________________________________________

  Ce  fichier  desactive  le  clignotement  de  texte, la selection a la
  souris, et certains raccourcis claviers. Il fait aussi  en  sorte  que
  tous  les  boutons  de souris fassent la meme chose, cache la barre de
  menu, et rend les liens, visites ou non, de la meme couleur, pour  que
  chaque  utilisateur  aie de jolis liens bleus et pas ceux que d'autres
  personnes ont visite en violet.

  Dans, ce fichier,  vous  devez  remplacer  NETSCAPE_GEOMETRY  par  une
  specification  de  geometrie X du genre : XxY+0-0, ou X est la largeur
  de votre ecran, et Y sa hauteur + 32. Cela positionnera  la  barre  de
  titre  de  la  fenetre  Netscape  en  dehors  de  l'ecran  pour ne pas
  distraire l'utilisateur. Par exemple, si votre ecran est  en  800x600,
  la specification de geometrie doit etre 800x632+0-0.

  66..  CCrreeeerr uunn rreeppeerrttooiirree ..nneettssccaappee pour guest

  Entrez

       mkdir /home/guest/.netscape
       chmod 777 /home/guest/.netscape

  pour  creer  le repertoire .netscape de guest et le rendre lisible par
  tout le monde.
  77..  LL''eessssaayyeerr

  Deloguez vous, puis loguez vous en tant que guest.

  88..  MMooddiiffiieerr lleess pprreeffeerreenncceess

  Puisque vous ne pourrez pas utiliser la barre  de  menu  en  tant  que
  guest, vous devez editer les preferences de guest manuellement si vous
  devez les modifier, ou bien changer vos propre preferences et recopier
  votre fichier de preferences sur celui de guest.

  Mini-HOWTO qmail + MH
  Christopher Richardson,(rdn@tara.n.eunet.de).  Traduit par
  Digo D'OLIVEIRA GRANJA (mortadel@free.fr)
  v1.4, 5 Mars 1998

  _D_a_n_s _c_e _d_o_c_u_m_e_n_t_, _j_e _f_a_i_s _p_a_r_t _d_e _m_e_s _e_x_p__r_i_e_n_c_e_s _d_'_i_n_s_t_a_l_l_a_t_i_o_n _a_f_i_n
  _d_'_a_i_d_e_r _l_e_s _u_t_i_l_i_s_a_t_e_u_r_s _q_u_i _d__s_i_r_e_n_t _u_t_i_l_i_s_e_r _l_a _c_o_n_f_i_g_u_r_a_t_i_o_n _c_i_-
  _d_e_s_s_u_s _p_o_u_r _l_a _g_e_s_t_i_o_n _d_e _l_e_u_r _c_o_u_r_r_i_e_r __l_e_c_t_r_o_n_i_q_u_e_.  vv11..44: _J_'_a_i _e_u
  _u_n_e _n_o_u_v_e_l_l_e _L_i_n_u_x_e_t_t_e_, _a_l_o_r_s _j_'_a_i _d__c_i_d_ _d_e _m_e_t_t_r_e _ _j_o_u_r _c_e _m_i_n_i_-
  _H_O_W_T_O_.
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Ma configuration systme

  3. Installation de qmail

  4. Maildir2smtp

  5. Installation de MH

     5.1 Mtstailor
     5.2 Mh_profile

  6. Fetchmail

  7. Exmh

  8. Procmail

  9. ISDN

  10. Sources

  11. Avertissements

  12. Post-Scriptum



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Mes remerciements  tous les citoyens du net qui m'ont aid,
  particulirement Tony Nugent (tony@trishul.sci.edu.au), et David
  Summers (david@summersoft.fay.ar.us), ainsi que l'quipe de S.u.S.E
  GmBH ( <http://www.suse.com>) qui ont rendu l'installation de Linux
  tellement plus aise, et enfin les auteurs des excellents programmes
  cits plus haut.

  Qu'est-ce que qmail et pourquoi devrions-nous l'utiliser ? Voici le
  "baratin publicitaire" de son auteur, Dan Bernstein :

  qmail est un agent de transport du courrier (MTA, Mail Transporter
  Agent), scuris, sr, efficace et simple. Il est conu pour remplacer
  compltement le systme sendmail-binmail sur les stations UNIX
  connectes  Internet.

  SSccuurriiss : La scurit n'est pas seulement un but  atteindre, c'est
  une exigence absolue. La distribution du courrier est d'une importance
  critique pour les utilisateurs : elle ne doit pas tre interrompue,
  alors elle doit tre compltement scurise. (C'est la raison pour
  laquelle j'ai commenc  crire qmail : je ne pouvais plus supporter
  les trous de scurit de sendmail et des autres MTAs)

  SSrr : La philosophie de qmail garantit qu'un message, une fois accept
  dans le systme, ne sera jamais perdu. De plus, qmail supporte
  maildir, un nouveau format de bote aux lettres utilisateur trs
  solide. Les maildirs,  la diffrence des fichiers mbox ou des
  dossiers MH, ne seront pas corrompus si le systme plante pendant la
  distribution. Encore mieux, non seulement un utilisateur peut lire son
  courrier en scurit sur NFS (Network File System), mais en plus un
  nombre illimit de clients NFS peuvent lui distribuer du courrier au
  mme moment.

  EEffffiiccaaccee : Sur un Pentium sous BSD/OS, qmail peut facilement supporter
  200000 messages locaux par jour -- il s'agit de messages distincts
  injects et distribus dans les botes aux lettres dans un test
  rel -- ! Malgr le fait que les livraisons lointaines soient limites
  par la lenteur des DNS (Domain Name Services : serveurs de noms de
  domaine) et de SMTP (Simple Mail Transfer Protocol : protocole simple
  de transfert de courrier), qmail dpasse 20 envois simultans par
  dfaut, de sorte qu'il permet de grer trs rapidement des mailing-
  lists (C'est la raison pour laquelle j'ai fini qmail : je devais
  mettre en place une grosse liste de diffusion).

  SSiimmppllee : Qmail est beaucoup plus petit que n'importe quel autre MTA.
  Voici quelques raisons :

  1. Les autres MTAs ont des mcanismes spars de forwarding, aliasing,
     et de gestion de mailing-lists. Qmail a UN simple mcanisme de
     forwarding qui permet aux utilisateurs de grer leurs propres
     listes de diffusion.

  2. Les autres MTAs offrent toute une gamme de modes d'envoi, allant de
     rapide (et peu sr)  lent (et mis en attente). L'envoi sous qmail
     est instantanment dclench par la mise en attente de nouvelles
     entres, aussi l'on peut dire que le systme qmail n'a qu'un seul
     mode d'envoi : rapide ET avec mise en attente.

  3. Les autres MTAs incluent une version spcialise d'inetd qui
     surveille la moyenne de chargement. La conception de qmail limite
     de manire interne la charge de la machine, ainsi le dmon SMTP de
     qmail (qmail-smtpd) peut s'excuter en toute scurit avec l'inetd
     de votre systme.


  RReemmppllaaaanntt ppoouurr sseennddmmaaiill : qmail supporte le masquerading hte et
  utilisateur, la dissimulation complte de l'hte, les domaines
  virtuels, les null-clients, les commandes de relais, les
  enregistrements  double rebond, les programmateurs de relance de
  messages indpendants... En rsum, qmail n'est pas en reste ct
  modernit des caractristiques. Qmail inclut galement une fonction de
  "couverture", c'est--dire qu'il se fait passer pour sendmail, afin
  d'tre utilis de manire transparente par votre agent utilisateur
  courrier (MUA, Mail User Agent).


  22..  MMaa ccoonnffiigguurraattiioonn ssyyssttmmee


    Distribution S.u.S.E Linux 5.1 avec un noyau 2.0.33

    Connection PPP  mon Fournisseur d'Accs Internet (FAI)



  33..  IInnssttaallllaattiioonn ddee qqmmaaiill

  Suivez exactement les instructions du fichier INSTALL.

  Remarques :

  Prenez le temps de lire compltement la documentation, s'il vous
  plat. Les numros suivants se rfrent aux tapes d'installation du
  fichier INSTALL sus-cit.


    2 - J'ai d organiser les groupes et les utilisateurs manuellement
     par INSTALL.ids.

    7 - ./qmail-makectl ne fonctionne pas sur mon systme. J'ai ajout
     mon nom de domaine (mickey.n.eunet.de) manuellement dans
     /var/qmail/control/me.

    23 - Assurez-vous que qmail-smtpd est correctement crit dans le
     fichier inetd.conf (Je l'avais mal crit (exemple : qmail-smpt), ce
     qui m'a pris deux jours  trouver :() ).


     ___________________________________________________________________
      smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env tcp-env
     /var/qmail/bin/qmail-smtpd
     ___________________________________________________________________




  44..  MMaaiillddiirr22ssmmttpp

  Dan Bernstein a fourni un paquetage pour l'envoi d'e-mail en attente
  vers un FAI via dial-in. Ce paquetage est disponible sur son site sous
  le nom de serialmailxxx.

  Installez ce paquetage comme dcrit dans la page de manuel (Merci 
  Rupert Mazzucco (maz@pap.univie.ac.at), cela marche du tonnerre !



























  ______________________________________________________________________

         maildir2smtp - transmet un maildir par SMTP

         maildir2smtp est conu pour transfrer des messages par le biais
         d'une connection SLIP ou PPP. Pour mettre cela en place en fin de
         dconnexion, crez un nouveau maildir en alias :

            # maildirmake ~alias/pppdir chown -R alias ~alias/pppdir

         Mettez

            :alias-ppp

         dans control/virtualdomains et

            ./pppdir/

         dans ~alias/.qmail-ppp-default.  N'oubliez pas l'anti-slash dans
         pppdir/. Alors dans le script de dmarrage PPP, mettez

            maildir2smtp ~alias/pppdir alias-ppp- $IP `hostname`

         en remplaant $IP avec l'adresse IP distante.

  ______________________________________________________________________




  Remarques :


    Lisez compltement la page de manuel, s'il vous plat.

    Maildir2smtp ncessite l'adresse IP numrique de votre serveur de
     courrier. Si vous ne l'avez pas, faites un ping sur votre adresse
     e-mail.

    Cette commande peut tre incluse dans votre script login pour
     expdier tout le courrier en attente aprs vous tre connect 
     votre FAI.


  55..  IInnssttaallllaattiioonn ddee MMHH

  En addition  cela, j'ai galement remplac le fichier
  /mh-6.8.4/mts/sendmail/smail.c par le mh-qmail-smail.c de Dan
  Bernstein.

  Voici  quoi ressemble mon fichier mh-6.8.4/conf/MH :















  bin     /usr/bin/mh
  etc     /usr/lib/mh
  #mail
  #mandir /usr/man
  #manuals        standard
  chown   /bin/chown
  #cp     cp
  #ln     ln
  #remove mv -f
  cc      gcc
  ccoptions -traditional -O2 -m486 -D_NFILE='getdtablesize()'
            -DSIGEMT=SIGUSR1
  curses  -lncurses
  #ldoptions      -s
  #ldoptlibs
  lex     flex
  #oldload        off
  #ranlib on
  mts     sendmail
  #mf     off
  #bboards        off
  #bbdelivery     off
  #bbhome /usr/spool/bboards
  pop     on
  popdir  /usr/lib/mh
  sharedlib       sys5
  slflags -fPIC
  slibdir /usr/lib
  mailgroup       mail
  signal  void
  sprintf int
  #editor prompter
  #debug  off
  #regtest        off
  options ATHENA
  options BIND
  options DPOP
  options DUMB
  options FCNTL
  options MHE
  options MHRC
  options MIME
  options MORE='"/usr/bin/less"'
  options OVERHEAD
  options POP2
  options POPSERVICE='"pop3"'
  options RENAME
  options RPATHS
  options RPOP
  options SOCKETS
  options SVR4
  options SYS5
  options SYS5DIR
  options TERMINFO
  options UNISTD
  options VSPRINTF




  Remarques :


    J'ai seulement compil mts sendmail ; j'ai lu quelque part dans le
     forum comp.mail.mh que SMTP peut poser des problmes.

     Dominic Mitchell(hdm@demon.net) a crit le 13 Juin 1997 :

     "Pas tout  fait. Avec cette option, MH converse toujours avec
     SMTP, mais juste au travers d'un pipe et non au travers d'un
     rseau. Vous devez nncceessssaaiirreemmeenntt avoir dans votre fichier
     /.mh_profile, une ligne qui dit :


      postproc:/usr/local/nmh/lib/spost



  ou l'endroit quel qu'il soit o il est conserv dans votre systme.
  Cela transmettra directement ce message  sendmail de manire
  traditionnelle.  Vous utilisez qmail bien entendu, alors sendmail sera
  en fait le script de couverture de qmail, mais c'est juste ce qu'il
  faut." Merci Dominic.


    J'ai vir "mail" parce que je voulais contrler avec mtstailor.


  55..11..  MMttssttaaiilloorr



  Comme qmail distribue le courrier dans le rpertoire home (~/Mailbox),
  j'ai ajout cela  mon mtstailor :




       localname:      mickey
       localdomain:    n.eunet.de
       mmdfldir:
       mmdflfil:       Mailbox
       uucpldir:
       uucplfil:
       mmdelim1:       \001\001\001\001\n
       mmdelim2:       \001\001\001\001\n
       mmailid:        0
       umincproc:
       lockldir:
       sendmail:       /usr/lib/sendmail




  Remarques :


    sendmail : /usr/lib/sendmail est un lien vers le script de
     couverture de qmail, dans /var/qmail/bin.

    MH n'apprcie gure le caractre tilde (~/), utilisez /home/  la
     place, ou laissez le champ vide, qui s'accorde par dfaut selon la
     documentation  $HOME.

    J'ai rcemment install MH et qmail sur ma machine au bureau, qui
     est connecte via Ethernet. J'ai ajout la ligne suivante 
     mtstailor :





  ______________________________________________________________________
   servers: serveur_de_mail.compagnie.pays
  ______________________________________________________________________




  55..22..  MMhh__pprrooffiillee


  Voici mon fichier .mh_profile :




       Path: Mail
       draft-folder: drafts
       unseen-sequence: unseen
       AliasFile: /home/rdn/.mh_aliases
       send: -msgid
       comp: -form /home/rdn/.mymh-components
       MailDrop: /home/rdn/Mailbox




  Remarques :


    J'ai ajout la ligne concernant MailDrop pour tre tout  fait sr.


  66..  FFeettcchhmmaaiill

  J'ai dcid d'utiliser fetchmail parce que mon systme Linux est
  utilis par plusieurs personnes diffrentes (ma famille :-)) et
  fetchmail transmet le courrier sur le port SMTP, o qmail le prend en
  charge.

  L'installation se fait sans problmes, le dpt multiple (Multi-drop)
  fonctionne avec le fichier .fetchmailrc suivant :




       poll PersonalMail.Germany.EU.net
       protocol pop3
       username myname
       password mypassword
       # Les deux lignes suivantes s'occupent du multidrop
       localdomains mydomain.de
       is * here
       # T2 des tats de la FAQ de fetchmail, dont qmail a besoin
       forcecr





  77..  EExxmmhh

  C'est mon gestionnaire de mail prfr. Je l'adore.

  Il y a un seul problme : la plupart des paquetages TCL/TK
  pr-compils ont l'option security active. Le fichier script
  .xserverrc.secure, qui tait fourni avec la S.u.S.E rsout ce
  problme :



       ______________________________________________________________________

       #!/bin/sh

       #
       # Dplacez ce fichier vers ~/.xserverrc, si vous
       # ne voulez pas que tout le monde puisse accder  votre
       # serveur X
       #
       if [ -x /usr/bin/keygen ]; then
           if [ ! -x /usr/bin/hostname -a ! -x /bin/hostname \
                -a ! -x /usr/bsd/hostname ];
           then
               echo "startx: can't get my hostname - exiting"
               exit 1
           else
               host=`hostname`
           fi

           xauth add $host:0 . `/usr/bin/keygen`
           sleep 2
           xauth add $host/"unix":0 . `/usr/bin/keygen`
           exec X :0 -auth .Xauthority $*
       else
           exec X :0 $*
       fi
       ______________________________________________________________________






  88..  PPrrooccmmaaiill

  La FAQ de qmail donne cette commande :

  Dans /.qmail, ajouter




       | preline procmail




  La version 3.11pre7 a chang la variable Boite aux Lettres dfinie par
  dfaut. Avant, cela se trouvait dans config.h; c'est maintenant dans
  src/authenticate.c :




       #define MAILSPOOLHOME "/Mailbox"        /* regarde l'entte / */
                                               /* dlivre  $HOME/Mailbox */




  J'ai runi quelques trucs, extraits des forums comp.mail.mh et
  comp.mail.misc, dans un fichier .procmailrc. Merci  tous !
       ______________________________________________________________________

       # UN EXEMPLE DE FICHIER .PROCMAILRC POUR LES DEBUTANTS
       # Ecrit par Catherine Hampton <ariel@best.com>
       # Version 1.1
       # Mis  jour le 25/01/98
       #
       # Dpos dans le Domaine Public
       #
       #
       # FIXER LES VARIABLES

       # Variables internes
       # Ce qui suit a t modifi par rdn le 03/03/1998

       # Tout le monde dit que la variable SHELL est essentielle
       SHELL=/bin/sh               #Shell utilis pour lancer procmail.
                                   #Soyez sr que cela pointe vers la
                                   #version de sh de votre systme. NE
                                   #LUI SUBSTITUEZ PAS un autre shell
                                   #sauf si vous connaissez bien UNIX

       LINEBUF=4096                #Ncessaire pour viter  Procmail de
                                   #s'touffer sur des longs champs "destinataires"
                                   #ou sur des instructions concernant la manire de
                                   #traiter des e-mails particuliers

       PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/mh:/usr/lib/mh:
                                   #Path pour vos programmes -- il vaut mieux
                                   #probablement le laisser ainsi.

       VERBOSE=off                 #Mettez-le  "on" si vous essayez un nouveau
                                   #champ "destinataire" afin que Procmail puisse
                                   #enregistrer littralement chaque tape.
                                   #NE LE LAISSEZ PAS INDEFINIMENT, sinon cela
                                   #cre d'normes fichiers-journaux (logfiles)

       # Programme par dfaut & situation des fichiers

       MAILDIR=$HOME/Mail          #Vous devriez vous assurer de l'existence de
                                   #cela.

       DEFAULT=$HOME/Mailbox       #Boite de rception par dfaut pour les
                                   #utilisateurs de shell2-5 sur Internet
                                   #Remplacez-la par la valeur correcte de
                                   #votre systme.


       LOGFILE=$MAILDIR/procmail.log #L'emplacement des fichiers log. Recommand,
                                     #autrement les erreurs vous seront envoyes
                                     #par e-mail :/

       FORMAIL=/usr/bin/formail        #Pratique pour les champs de rponse auto-
                                       #matique (autoreply recipes). Si vous n'tes
                                       #pas sur Internet, modifiez cela avec le
                                       #chemin de votre version de formail.

       SENDMAIL=/usr/sbin/sendmail     #Pratique pour les champs de rponse auto-
                                       #matique (autoreply recipes). Si vous n'tes
                                       #pas sur Internet, modifiez cela avec le
                                       #chemin de votre version de sendmail.
       ______________________________________________________________________




  Procmail est un logiciel excellemment bien document. Lisez les pages
  de manuel afin de trouver des exemples pour crer votre fichier
  .procmailrc.


  99..  IISSDDNN


  J'inclus cela alors que cela n'a rien  voir avec qmail ou MH. Mais
  sans une connexion PPP vers un FAI, il n'y a pas de courrier
  lectronique du tout.  J'ai eu quelques problmes pour faire
  fonctionner ma connexion ISDN. La distribution S.u.S.E propose une
  configuration pour ISDN, mais je voulais quelque chose de plus simple.
  Ce qui est prsent ici a t adapt des scripts de Bernhard Hailer
  (Merci, vraiment, merci !)

  Le fichier rc.config suivant charge les modules ncessaires pendant
  l'initialisation :
















































  ______________________________________________________________________
  #!/bin/bash
  # Ceci est adapt du vieux script de Bernhard Hailer

  LOCAL_NUMBER="91311234"        # numro de tlphone local. 091311234
  REMOTE_NUMBER="0911123456"     # numro de tlphone du FAI
  LOCAL_IP="192.168.0.99"            # J'ai une adresse IP dynamique alors ce
  REMOTE_IP="195.112.123.11"     # sera la passerelle de votre FAI
  DEVICE="ippp0"

  SYSPATH="/sbin"
  ISDNCTRL="$SYSPATH/isdnctrl"

  case "$1" in
  start)
          # turn on isdn
          insmod /lib/modules/2.0.33/net/slhc.o
          insmod /lib/modules/2.0.33/misc/isdn.o
          sleep 1
          # load the hisax module
          insmod /lib/modules/2.0.33/misc/hisax.o
                                     id=Tel0 type=5 protocol=2 irq=10 io=0x300
          echo "starting isdn4linux"
          # global
          $ISDNCTRL verbose 0

          $ISDNCTRL addif $DEVICE         # cre une nouvelle interface
          $ISDNCTRL addphone $DEVICE in $REMOTE_NUMBER
          $ISDNCTRL addphone $DEVICE out $REMOTE_NUMBER
          $ISDNCTRL eaz $DEVICE $LOCAL_NUMBER
          $ISDNCTRL l2_prot $DEVICE hdlc
          $ISDNCTRL l3_prot $DEVICE trans
          $ISDNCTRL encap $DEVICE syncppp
          $ISDNCTRL huptimeout $DEVICE 300
          $ISDNCTRL chargehup  $DEVICE off
          $ISDNCTRL secure $DEVICE on

          $SYSPATH/ifconfig $DEVICE $LOCAL_IP pointopoint $REMOTE_IP metric 1
          $SYSPATH/route add default $DEVICE
          $SYSPATH/ipppd /dev/ippp0 file /etc/ppp/options.ipppd &
          $SYSPATH/route del default

          ;;
  stop)
          #turn off isdn
          rmmod hisax.o
          sleep 1
          rmmod isdn.o
          rmmod slhc.o
          echo "Shutting down isdn4linux"
          $ISDNCTRL delif ippp0
          ;;
  *)
          echo "Usage: $0 (start|stop)"
          exit 1
          ;;
  esac
  ______________________________________________________________________




  J'utilise le script suivant pour appeler l'extrieur, il est nomm
  tout simplement isdn on|off.


       ______________________________________________________________________

       #!/bin/bash
       # Ceci est adapt du vieux script de Bernhard Hailer

       IP_ADDRESS="195.112.123.11"

       case "$1" in
       on)


               echo "Calling ippp0"
               /sbin/isdnctrl dial ippp0
       # la pause est importante car cela donne  PPP le temps de s'installer
               echo "Sleep for 8s for PPP handshake"
               sleep 8s
               /sbin/route add default ippp0
               echo "line open - checking...."

       # vrifie si la ngociation PPP est russie :
               set `ping -qc3 -i1 $IP_ADDRESS 2>/dev/null | grep transmitted`
               if [ $4 -gt 0 ];
               then
                       echo "succeeded."
                       echo "Starting fetchmail daemon"
                       /usr/bin/fetchmail -d 600 -k -v -a -L /var/log/fetchmail
                       echo "Flushing mail queue...."
                       /usr/local/bin/serialmail/maildir2smtp
                                   ~alias/pppdir alias-ppp- mail.server.ip.no `hostname`
               else
                       echo "failed!"
                       /sbin/isdnctrl hangup ippp0
               fi

       ;;

       off)
                       echo -n "Shutting down fetchmail daemon"
                       /usr/bin/fetchmail --quit

                       /sbin/isdnctrl hangup ippp0
                       /sbin/route del default         # and delete route
                       echo "You're off line"
       ;;

       *)
               echo -e "\aUsage:"
               echo "isdn on"
               echo "isdn off"
       ;;

       esac
       ______________________________________________________________________




  La portion suivante est le fichier d'options du dmon ipppd,
  /etc/ppp/options.ipppd :







  # Bas sur :
  # Klaus Franken, kfr@suse.de
  # Version: 27.08.97 (5.1)
  #
  # Ce fichier est une copie par YaST du fichier /etc/ppp/ioptions.YaST
  # vers le fichier options.<device>

  user "myuserid"

  # le nom de mon systme (only for CHAP !)
  # name my_system_name

  # accepte les adresses IP transmises par son homologue
  # utilis avec les adresses IP dynamiques
  ipcp-accept-local
  ipcp-accept-remote
  noipdefault

  # essaie d'obtenir l'adresse IP de l'interface
  # option spcifique  ipppd (contrairement  pppd)
  # utilis seulement avec des adresses IP statiques
  #useifip

  # dsactive toutes les compressions d'en-ttes
  -vj
  -vjccomp
  -ac
  -pc
  -bsdcomp

  # parfois, vous pouvez en avoir besoin
  #noccp

  # unit de rception maximale (mru, max receive unit)
  mru 1524
  # unit de transmission maximale (mtu, max transmit unit)
  mtu 1500

  # Si la machine est un serveur, forcez l'authentification en dcommentant
  # l'une des lignes suivantes. Toutefois, si la machine est un client, faire
  # cela empche la russite de la connexion (message "peer refused to authenticate").
  # Alors dcommentez SEULEMENT sur un serveur.
  # "+pap" / "+chap" NUR AKTIVIEREN, WENN DIES EIN SERVER IST!!!
  #+pap
  #+chap

  # Si vous avez des problmes avec la liaison (pas de rponse du premier
  # paquet-lcp), essayez de diminuer le dlai de r-essai (retry-cycle).
  # Fix par dfaut  3 secondes, essayez par exemple 2 secondes
  # lcp-restart 2





  1100..  SSoouurrcceess

  Paquetages requis :

  Le net est toujours en perptuel mouvement, aussi est-il un peu
  utopique de donner des sources fiables  100%. Nanmoins, cela ne
  mange pas de pain...


    Trouvez Qmail et setserial sur http://www.qmail.org/

    Trouvez MH sur http://www.ics.uci.edu/~mh/

    Trouvez glimpse sur http://glimpse.cs.arizona.edu/

    Trouvez Fetchmail sur http://sagan.earthspace.net/~esr/fetchmail

    Trouvez Exmh sur http://www.beedub.com/exmh

    Trouvez Procmail sur ftp://ftp.informatik.rwth-
     aachen.de/pub/packages/procmail


  1111..  AAvveerrttiisssseemmeennttss

  L'habituel sermon : ""PPaass ddee ggaarraannttiieess,, ppaass ddee rreemmbboouurrsseemmeennttss ;;
  uuttiilliisseezz  vvooss pprroopprreess rriissqquueess..""


  1122..  PPoosstt--SSccrriippttuumm

  Est-ce que quelq'un a fait fonctionner MH avec Maildi r? Je n'ai pas
  essay -- le principe de ne pas bloquer un systme qui tourne bien. Si
  oui, crivez-moi vos informations pour une inclusion dans la prochaine
  version de ce document.










































  Quota Mini-Howto
  par Albert M.C. Tam (bertie@scn.org)
  Version du 08 Aout 1997

  (Adaptation francaise par Antoine Levavasseur levavass@efrei.fr, le 14
  Octobre 1997).  L'objectif de ce mini-howto  est  d'expliquer  comment
  mettre en place et utiliser les quotas sous linux.

  PPrreeaammbbuullee   ::    Ce   document   a  ete  ecrit  par  Albert  M.C.  Tam
  (bertie@scn.org).  La possibilite d'utiliser,  copier,  distribuer  ce
  document pour une utilisation non-commerciale est permise, a partir du
  moment ou la  presente  remarque   et  les  noms  de  l'auteur  et  de
  l'editeur  apparaissent  sur  toutes  les  copies  et/ou  supports  du
  document; et que le  document  n'est  pas  modifie.  Ce  document  est
  diffuse  en  esperant  qu'il  sera  utile,  mais sans AUCUNE GARANTIE,
  exprimee ou implicite. Bien que tous les efforts ait  ete  faits  pour
  s'assurer  de  l'exactitude  des  informations  du  present  document,
  l'auteur / editeur / mainteneur n'assume  AUCUNE  RESPONSABILITE  pour
  des   erreurs,   ou   des   domages  resultant  de  l'utilisation  des
  informations du present document.

  Ce document decrit comment activer un quota sur le systeme de  fichier
  d'une machine Linux, attribuer des quotas pour les utilisateurs et les
  groupes, ainsi que l'utilisation de diverses commandes sur les quotas.
  Il  est  destine  aux  utilisateurs  utilisant  un  noyau  2.x  (teste
  recemment sur RedHat 4.1 avec un noyau 2.0.27). Les  utilisateurs  qui
  utilisent des noyaux plus vieux doivent se mettre a jour avec un noyau
  plus recent pour pouvoir utiliser les quotas.

  N'hesitez  pas  a  envoyer  vos   commentaires   et   point-de-vue   a
  bertie@scn.org  si  vous  trouvez  une  erreur,  ou qu'une information
  manquante. J'aprecierai.

  11..  LLeess QQuuoottaass,, qquu''eesstt--ccee qquuee cc''eesstt ??

  Les quotas permettent de specifier les limites  sur  deux  aspects  du
  stockage  sur  disque  :  le nombre d'i-noeuds qu'un utilisateur ou un
  groupe peux posseder; et le nombre de blocks disques qui peuvent etres
  alloues a un utilisateur ou un groupe d'utilisateurs.

  L'idee  des  quotas, c'est que les utilisateurs sont obliges de rester
  sous leur limite de consomation de disque, perdant leur possiblite  de
  saturer la totalite de l'espace disque d'un systeme.

  Les  quotas sont supportes sur une base par utilisateur et par systeme
  de fichier. Si il y a plus d'un systeme de fichiers ou un  utilisateur
  qui  est  cense  creer  des  fichiers,  alors  les quotas doivent etre
  configures separemment sur chaque systeme de fichier.

  11..11..  EEttaatt aaccttuueell ddeess qquuoottaass ssoouuss LLiinnuuxx

  Le support des quotas a ete integre dans le noyau  depuis  la  version
  1.3.8x  il me semble. Maintenant il est partie prenante du noyau Linux
  version 2.0.   Si  votre  systeme  ne  supporte  pas  les  quotas,  je
  recommande chaudement une mise a jour.

  Actuellement  les quotas ne fonctionnent qu'avec le systeme de fichier
  eexxtt22.

  11..22..  QQuuee ffaauutt--iill ppoouurr uuttiilliisseerr lleess QQuuoottaass ssuurr LLiinnuuxx

  11..22..11..  NNooyyaauu

  Les    sources    du    noyau     2.x     sont     disponibles     sur
  http://sunsite.unc.edu/pub/Linux/kernel/v2.0    ou   plus   pres   sur
  ffttpp..lliipp66..ffrr .

  11..22..22..  PPrrooggrraammmmeess ppoouurr lleess qquuoottaass

  Selon votre distribution Linux, vous avez, ou devez avoir, ou  ne  pas
  avoir  les  programmes des quotas installes sur votre systeme. Si vous
  ne les avez pas, alors telechargez les sources des programmes pour les
  quotas                                                             sur
  ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/subsystems/quota/all.tar.gz

  22..  PPaarrttiiee II :: LLaa ccoonnffiigguurraattiioonn

  22..11..  RReeccoonnffiigguurreerr vvoottrree nnooyyaauu

  Reconfigurez votre noyau et ajoutez le support des quotas en repondant
  'y' a :

       Quota support (CONFIG_QUOTA) n y

  22..22..  CCoommppiilleerr eett iinnssttaalllleerr lleess pprrooggrraammmmeess ddeess qquuoottaass

  Les   sources   des   programmes   des  quotas  sont  disponibles  sur
  ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/subsystems/quota/all.tar.gz

  22..33..  lleess aaccttiivveerr lloorrss dduu bboooott..  MMooddiiffiieerr lleess ssccrriippttss  iinniitt  ddee  vvoottrree
  ssyysstteemmee ppoouurr vveerriiffiieerr lleess qquuoottaass eett

  Voici un exemple :

       # Check quota and then turn quota on.
       if [ -x /usr/sbin/quotacheck ]
       then
            echo "Checking quotas. This may take some time."
            /usr/sbin/quotacheck -avug
            echo " Done."
       fi

       if [ -x /usr/sbin/quotaon ]
       then
             echo "Turning on quota."
             /usr/sbin/quotaon -avug
       fi

  La regle d'or est de ttoouujjoouurrss  activer  les  quotas  aapprreess  que  votre
  systeme  de fichier ait ete monte avec /etc/fstab, sinon les quotas ne
  fonctionneront pas. Je recommande d'activer les quotas  a  la  fin  de
  votre  script  init, ou, si vous preferez, juste apres la partie ou le
  script init monte les systemes de fichiers.

  22..44..  MMooddiiffiieerr //eettcc//ffssttaabb

  Les partitions sur lesquelles vous n'avez pas encore active les quotas
  ressemblant normalement a :

       /dev/hda1       /       ext2    defaults        1       1
       /dev/hda2       /usr    ext2    defaults        1       1

  Pour  activer  le  support  des  quotas utilisateur pour un systeme de
  fichiers, ajoutez "usrquota" dans le quatrieme champ contenant le  mot
  "defaults" (man fstab pour avoir des details).

       /dev/hda1       /       ext2    defaults                1       1
       /dev/hda2       /usr    ext2    defaults,usrquota       1       1

  Remplacez  "usrquota"  par  "grpquota", si vous avez besoin du support
  des quotas pour les groupes sur un syteme de fichiers.

       /dev/hda1       /       ext2    defaults                1       1
       /dev/hda2       /usr    ext2    defaults,grpquota       1       1

  Vous avez besoin a la fois du support des quotas pour les  groupes  et
  les utilisateurs ?

       /dev/hda1       /       ext2    defaults                        1       1
       /dev/hda2       /usr    ext2    defaults,usrquota,grpquota      1       1

  22..55..    CCrreeeerr   lleess   eennrreeggiissttrreemmeennttss   ddeess   qquuoottaass  ""qquuoottaa..uusseerr""  eett
  ""qquuoottaa..ggrroouupp""

  Les   deux   fichiers   d'enregistrement  des  quotas,  quota.user  et
  quota.group, doivent etre possedes par root, et avec  les  permissions
  lecture_ecriture pour root et personne d'autre.

  Logguez-vous  en  root.  Allez  sur  la  partition root ou vous voulez
  activer les quota, et creez quota.user et quota.group en faisant :

       touch /partition/quota.user
       touch /partition/quota.group
       chmod 600 /partition/quota.user
       chmod 600 /partition/quota.group

  22..66..  RReebbooootteerr

  Maintenant rebooter votre systeme pour que les  changements  que  vous
  avez fait prennent effet.

  Remarquez  que  pour  les partitions pour lesquelles vous souhaiteriez
  activer les quotas dans le futur,  vous  avez  seuleument  besoin  des
  etapes 4, 5 et 6.

  33..  PPaarrttiiee IIII :: AAttttrriibbuueerr lleess qquuoottaass aauuxx uuttiilliissaatteeuurrss eett aauuxx  ggrroouuppeess..

  Cette  operation est assuree par la commande eeddqquuoottaa (man edquota pour
  les details).

  J'utilise generalement qquuoottaacchheekk avec les flags --aavvuugg pour  avoir  les
  fichiers  les  plus  a  jour possible avant d'editer les quotas. C'est
  juste une habitude personnelle, mais pas une etape indispensable.

  33..11..  AAttttrriibbuueerr lleess qquuoottaass ppoouurr uunn uuttiilliissaatteeuurr ppaarrttiiccuulliieerr

  Voici un exemple. J'ai un utilisateur  avec  le  loggin  _b_o_b  sur  mon
  systeme.   La  commande  edquota  -u  bob  me  lance  vi (ou l'editeur
  specifie dans la variable d'environnement  $EDITOR)  pour  editer  les
  quotas  pour  l'utilisateur _b_o_b sur chacune des partitions ou le quota
  est active.

       Quotas for user bob:
        /dev/hda2: blocks in use: 2594, limits (soft = 5000, hard = 6500)
                    inodes in use: 356, limits (soft = 1000, hard = 1500)

  bblloocckk uuttiilliisseess est le nombre total de blocks (en Ko) que l'utilisateur
  a deja consomme sur la partition.

  ii--nnooeeuuddss  uuttiilliisseess  est  le nombre total de fichiers que l'utilisateur
  possede sur la partition.

  33..22..  AAttttrriibbuueerr lleess qquuoottaass ssuurr uunn ggrroouuppee ppaarrttiiccuulliieerr

  Maintenant, il y a un groupe _g_a_m_e_s sur mon systeme. eeddqquuoottaa  --gg  ggaammeess
  lance une nouvelle fois l'editeur vi pour editer le groupe _g_a_m_e_s :

  Quotas for group games:
     /dev/hda4: blocks in use: 5799, limits (soft = 8000, hard = 10000)
                inodes in use: 1454, limits (soft = 3000, hard = 4000)

  33..33..   AAttttrriibbuueerr  lleess  qquuoottaass  ppoouurr pplluussiieeuurrss uuttiilliiaatteeuurrss aavveecc llaa mmeemmee
  vvaalleeuurr

  Pour   attribuer   rapidement   les   quotas  pour,  par  exemple  100
  utilisateurs,  sur  mon  systeme  avec  la  meme   valeur   que   pour
  l'utilisateur _b_o_b, je vais d'abord editer les quotas de _b_o_b a la main,
  et ensuite executer :

       edquota -p bob `awk -F: '$3 > 499 {print $1}' /etc/passwd`

  en partant du principe que vous utilisez ccsshh, et que les  UID  de  vos
  utilisateurs commencent a partir de 500.

  En  plus de edquota, il y a trois termes avec lesquels vous devez vous
  familiariser : Limite douce (Soft Limit), Limite dure (Hard Limit), et
  delais (Grace Period).

  LLiimmiittee ddoouuccee ((SSoofftt LLiimmiitt))
  La  limite  douce  indique  la quantite maximale qu'un utilisteur peut
  utiliser sur une partition.  En  combinaison  avec  le  delais  (Grace
  Period),  il  agit  d'une frontiere, a partir de laquelle des messages
  d'avertissement sont envoyes pour informer  du  depassement  de  quota
  lorsqu'il survient.

  LLiimmiittee dduurree ((HHaarrdd LLiimmiitt))
  La limite dure ne fonctionne que lorsque le delais est configure. Cela
  definit  la  limite   absolue   de   l'utilisation   disque,   puisque
  l'utilisateur ne peut depasser la limite dure.

  DDeellaaiiss  ((GGrraaccee PPeerriioodd)) Lance par la commande eeddqquuoottaa --tt, le delais est
  une limite de temps avant que la limite douce soit  renforcee  sur  un
  systeme  de  fichiers  ou les quotas sont actives. Les unites de temps
  "sec(onds), min(utes), hour(s), day(s), week(s), and month(s)" peuvent
  etre utilisees. Voici ce que nous voyons avec la commande eeddqquuoottaa --tt :

       Time units may be: days, hours, minutes, or seconds
       Grace period before enforcing soft limits for users:
       /dev/hda2: block grace period: 0 days, file grace period: 0 days

  Changer la partie "0 days" pour une duree qui vous semble  resonnable.
  J'ai choisi personnellement "7 days" (ou une semaine).

  44..  DDiivveerrsseess ccoommmmaannddeess ppoouurr lleess qquuoottaass

  44..11..  QQuuoottaacchheecckk

  Quotacheck  est  utilise  pour  verifier  le systeme de fichier et les
  utilisations  disque  pour  mettre  le  plus  a  possible  le  fichier
  enregistrement "quota.user" Je recommande de lancer quotacheck au boot
  du systeme, ou regulierement avec cron (par exemple chaque semaine ?).

  44..22..  RReeppqquuoottaa

  Repquota affiche un resume des quotas pour le systeme de fichiers.
  Voici une sortie type de repquota :

       # repquota -a
                               Block limits               File limits
       User            used    soft    hard  grace    used  soft  hard  grace
       root      --  175419       0       0          14679     0     0
       bin       --   18000       0       0            735     0     0
       uucp      --     729       0       0             23     0     0
       man       --      57       0       0             10     0     0
       user1     --   13046   15360   19200            806  1500  2250
       user2     --    2838    5120    6400            377  1000  1500

  44..33..  QQuuoottaaoonn eett QQuuoottaaooffff

  Quotaon  est  utiliser pour activer la gestion des quotas; et quotaoff
  pour le terminer. Les fichiers  sont  en  fait  similaires.  Ils  sont
  executes au demarrage et a l'arret du systeme.

  Le MINI-HOWTO RCS
  Robert Kiesling
  Traduction Jean-Albert Ferrez, <Jean-Albert.Ferrez@epfl.ch>
  V1.4 1997/08/14

  Ce  document couvre les bases de l'installation et de l'utilisation de
  RCS, le systeme de controle de revisions (_R_e_v_i_s_i_o_n _C_o_n_t_r_o_l _S_y_s_t_e_m)  de
  GNU,  sous  Linux.  Il couvre egalement l'installation des utilitaires
  diff(1) et diff3(1) qui sont necessaires au fonctionnement de RCS.  Ce
  document peut etre reproduit librement, dans sa totalite ou en partie,
  pour autant que tout usage de ce document soit conforme  a  la  notice
  generale sur le copyright de la serie des Howto du _L_i_n_u_x _D_o_c_u_m_e_n_t_a_t_i_o_n
  _P_r_o_j_e_c_t. Referez-vous au  fichier  COPYRIGHT  pour  plus  de  details.
  Envoyez toute plainte, suggestion, correction et autre a kiesling@ter-
  racom.net, pour que je puisse maintenir ce document aussi complet et a
  jour que possible.

  11..  VVuuee dd''eennsseemmbbllee ddee RRCCSS..

  RCS,  le  systeme  de  controle  de  revisions,  est  un  ensemble  de
  programmes qui suivent les changements dans  des  fichiers  textes  et
  controlent les acces concurrents dans le cadre d'un travail collectif.
  Il est generalement utilise pour maintenir des  collections  de  codes
  sources.   Il   est   egalement   adapte  au  suivi  des  fichiers  de
  documentation.

  RCS a ete ecrit par Walter  F.  Tichy  et  Paul  Eggert.  La  derniere
  version  ayant  ete  portee sous Linux est la 5.7. Il existe egalement
  une version semi officielle  multitache  (_t_h_r_e_a_d_e_d).  La  plupart  des
  informations de ce Howto proviennent des pages de manuel de RCS.

  RCS  comprend  le  programme  rcs(1)  qui  controle  les  attributs de
  l'archive RCS, ci(1)  et  co(1),  qui  enregistrent  un  fichier  dans
  l'archive  (_c_h_e_c_k  _i_n)  et  extraient des fichiers de l'archive (_c_h_e_c_k
  _o_u_t), ident(1),  qui  recherche  un  mot-cle  dans  une  archive  RCS,
  rcsclean(1), qui fait le menage en eliminant les fichiers inchanges et
  sur lesquels personne ne travaille, rcsdiff(1),  qui  execute  diff(1)
  pour  comparer  les revisions, rcsmerge(1), qui fusionne deux branches
  de  developpement  en  un  seul  fichier,  et  rlog(1),  qui   affiche
  l'historique des modifications.

  Les  fichiers  archives  avec  RCS  peuvent  etre du texte d'un format
  quelconque, ou des fichiers binaires si le diff utilise  pour  generer
  les  changements supporte les donnees sur 8 bits. Les fichiers peuvent
  contenir un texte de description pour faciliter le  suivi  par  ident.
  RCS  utilise  les  programmes  diff(1)  and  diff3(1) pour generer les
  modifications entre les diverses revisions. Une archive  RCS  consiste
  en  la  revision  initiale  -  la  version  1.1  -  et  une  serie  de
  modifications, une pour chaque revision. Chaque fois qu'un fichier est
  extrait  de  l'archive  a  l'aide  de  co(1),  edite,  puis  a nouveau
  enregistre dans  l'archive  avec  ci(1),  le  numero  de  version  est
  incremente,  par  exemple  1.2,  1.3,  1.4,  etc.  pour  les revisions
  successives.

  Les fichiers archives eux-memes se trouvent generalement dans un sous-
  repertoire  ./RCS,  bien que RCS ait d'autres options pour le stockage
  des archives.

  Pour une vue d'ensemble de RCS, voyez egalement la page de  manuel  de
  rcsintro(1).

  22..  PPrreerreeqquuiiss

  RCS  a besoin de diff(1) et de diff3(1) pour generer les modifications
  entre les revisions. La suite d'utilitaires diff doit  etre  installee
  sur votre systeme; RCS s'assure de sa presence lors de l'installation.

  Des binaires pre-compiles des diffutils sont disponibles a l'adresse :

  ftp://sunsite.unc.edu/pub/Linux/utils/text/diffutils-2.6.bin.ELF.tar.gz

  ainsi  que  sur  les  sites  miroirs.  Si vous devez les compiler, les
  sources se trouvent a :

  ftp://prep.ai.mit.edu/pub/gnu/diffutils-2.7.tar.gz

  ainsi que sur les sites miroirs.

  NdT: En France, on trouve les diffutils sur ftp.lip6.fr  aux  adresses
  suivantes :

  ftp://ftp.lip6.fr/pub/linux/sunsite/utils/text/diffutils-2.6.bin.ELF.tar.gz
  ftp://ftp.lip6.fr/pub/gnu/diffutils-2.7.tar.gz

  Les librairies ELF doivent egalement etre installees sur votre systeme
  pour utiliser les binaires pre-compiles.  Reportez-vous  au  ELF-Howto
  pour plus de details.

  33..  CCoommppiilleerr RRCCSS

  Procurez-vous les sources de RCS version 5.7, disponibles a :

  ftp://sunsite.unc.edu/pub/Linux/devel/vc/rcs-5.7.src.tar.gz

  ainsi que sur les sites miroirs, en France a :

  ftp://ftp.lip6.fr/pub/linux/sunsite/devel/vc/rcs-5.7.src.tar.gz

  Apres  avoir  extrait  l'archive,  il  faut  configurer RCS pour votre
  systeme. Ceci se fait a l'aide du script configure dans le  repertoire
  source,  qu'il  faut executer en premier. Ceci va generer une Makefile
  ainsi que le conf.sh approprie pour votre systeme. Vous pouvez ensuite
  faire

  make install

  ce  qui va creer les binaires. Vous devrez peut-etre devenir root a un
  certain moment pour installer les binaires dans les bons  repertoires.

  44..  CCrreeeerr eett mmaaiinntteenniirr ddeess aarrcchhiivveess

  Le  programme  rcs(1)  s'occupe  de  creer des archives et de modifier
  leurs attributs. Les options de rcs(1) sont donnees dans  la  page  de
  manuel rcs(1).

  La  maniere  la  plus facile de creer une archive est d'executer mkdir
  RCS dans le repertoire courant, puis d'initialiser l'archive  avec  la
  commande

  rcs -i nom_du_fichier_de_travail

  Ceci  va creer une archive nommee ./RCS/nom_du_fichier_de_travail,v et
  reclamer un texte decrivant l'archive, mais ne depose aucune  revision
  dans l'archive. Vous pouvez enclencher et declencher le blocage strict
  avec les commandes

  rcs -L nom_du_fichier_de_travail

  et

  rcs -U nom_du_fichier_de_travail

  respectivement. Il y a  d'autres  options  pour  controler  l'acces  a
  l'archive,  fixer  son  format  et  ses numeros de revisions; tout est
  explique dans la page de manuel rcs(1).

  55..  ccii((11)) et co(1).

  ci(1) et co(1)  sont  les  commandes  utilisees  pour  enregistrer  un
  fichier  dans  son  archive  et  l'en extraire. La commande ci(1) peut
  egalement etre utilisee pour les deux operations. Dans leur  forme  la
  plus  simple,  ci(1) and co(1) ne necessitent que le nom du fichier de
  travail.

  ci nom_du_fichier_de_travail

  et

  co nom_du_fichier_de_travail

  La forme suivante

  ci -l nom_du_fichier_de_travail

  enregistre le ficher en mode bloque, et

  co -l nom_du_fichier_de_travail

  _e_s_t _e_x_e_c_u_t_e _a_u_t_o_m_a_t_i_q_u_e_m_e_n_t_. C'est-a-dire, ci -l extrait a nouveau  le
  fichier et le bloque.

  ci -u nom_du_fichier_de_travail

  enregistre  le  fichier  dans l'archive et l'extrait a nouveau sans le
  bloquer.  Dans tous les cas, l'utilisateur se voit demander un message
  pour l'historique.

  ci(1)  cree automatiquement une archive RCS si elle n'existe pas deja.

  Si vous ne specifiez pas de numero de revision,  ci(1)  incremente  le
  dernier numero present dans l'archive et y ajoute la version actuelle.
  Si vous specifiez un numero de revision dans une branche existante, il
  doit  etre  superieur  aux  numeros existants. ci(1) cree une nouvelle
  branche si vous specifiez un numero dans une branche qui n'existe pas.
  Referez-vous  a  la  page  de  manuel  de  ci(1) et co(1) pour plus de
  details.

  ci(1) et co(1) ont de nombreuses options, en mode interactif  ou  non.
  De  nouveau,  referez-vous  aux pages de manuel de ci(1) et co(1) pour
  plus de details.

  66..  HHiissttoorriiqquuee ddeess rreevviissiioonnss

  La commande rlog(1) donne des informations sur une archive  ainsi  que
  les  commentaires  associes  a chacune des revisions qu'elle contient.
  Par exemple :

  rlog nom_du_fichier_de_travail

  va afficher la liste des revisions du fichier, avec  pour  chacune  la
  date,  le  userid  de l'auteur et la personne qui a bloque le fichier.
  Vous pouvez specifier les attributs que vous desirez voir.

  77..  IInncclluurree ddeess ddoonnnneeeess RRCCSS ddaannss lleess ffiicchhiieerrss

  co(1) tient a jour une liste de mots-cles de l'archive RCS lorsque  le
  fichier  de travail est extrait. Le mot-cle $Id$ dans un document sera
  remplace par une chaine contenant le nom  du  fichier,  le  numero  de
  revision,  la  date d'extraction, l'auteur, l'etat de l'archive et, le
  cas echeant, la personne qui a bloque le fichier. Le mot cle $Log$ est
  lui remplace par l'historique du fichier.

  Ces  mots-cles  ainsi que d'autres peuvent etre utilises comme cles de
  recherche dans une archive RCS. Referez-vous a la page  de  manuel  de
  ident(1) pour plus de details.

  88..  RRCCSS eett llee ccoonnttrroollee ddee vveerrssiioonnss ddaannss eemmaaccss((11))

  Le controle de versions dans emacs(1) fonctionne comme une interface a
  RCS. Ce qui suit s'applique a la version 19.34 de GNU  Emacs  qui  est
  livree  avec  la  majorite des distributions Linux. Si l'on edite dans
  emacs(1) un fichier qui est sous le controle de RCS, la  commande  vc-
  toggle-read-only  (associee  par  defaut  a C-x C-q) va enregistrer le
  fichier dans le systeme de controle de version d'emacs, puis dans RCS.
  emacs  ouvre  un tampon (_b_u_f_f_e_r) dans lequel il est possible de saisir
  un message pour l'historique. Une  fois  ce  message  saisi,  C-c  C-c
  termine  l'edition  et  procede  a  l'enregistrement  de  la  nouvelle
  revision dans l'archive RCS.

  Si vous avez opte pour un blocage strict, vous devez bloquer a nouveau
  le  fichier  pour  l'editer  dans  emacs(1).  Vous  pouvez extraire le
  fichier a l'aide de la commande % dans le mode _b_u_f_f_e_r_-_m_e_n_u.

  Pour plus d'informations, consultez le manuel de GNU Emacs  ainsi  que
  les pages info.

  Le Mini-HowTo RPM+Slackware
  Edite par Dave Whitinger, wolf@redhat.com
  Traduit    par   Francois   Jeanmougin   jeanmougin@igbmc.u-
  strasbg.fr
  v1.0, 29 Aout 1997

  Ce document decrit comment installer et faire  fonctionner  proprement
  le systeme RPM avec la Slackware. Les informations presentees ici sont
  neanmoins probablement valables pour n'importe quelle distribution  de
  Linux.

  11..  IInnttrroodduuccttiioonn

  On  m'a tres souvent demande comment utiliser le RPM sur la Slackware.
  Trop c'est trop, alors aujourd'hui, j'ai decide que creer ce  document
  pourrait etre une bonne idee.

  RPM  signifie  "Red  Hat  Package Manager" et constitue le coeur de la
  distribution Red Hat. Sa  fonction  premiere  est  d'installer  et  de
  desinstaller  des  "suites" (package en anglais). Lire le RPM-HOWTO ou
  se procurer une copie du "Maximum RPM" pour  plus  d'informations  sur
  l'utilisation du RPM.

  Ce  document  tourne autour de l'installation et de l'usage du RPM sur
  une distribution Slackware et processeur Intel, mais les  informations
  donnees  ici  peuvent  aisement  etre  utilisees pour n'importe quelle
  distribution et n'importe quelle architecture.

  22..  OOuu ttrroouuvveerr llee ssyytteemmee RRPPMM

  La  version  la  plus  recente   de   RPM   est   disponible   sur   :
  ftp.rpm.org/pub/rpm/dist/latest
  Au  moment  de la redaction de ce document, la version la plus recente
  etait :
  rpm-2.4.5-1.i386.tar.gz

  Notez bien l'indication i386. Ceci signifie que la suite binaire a ete
  compilee  pour  une architecture Intel, prete a l'emploi. Assurez-vous
  que le fichier que vous telechargez contient ``i386''  dans  son  nom,
  dans  le  cas  contraire,  les  instructions  suivantes  ne seront pas
  valides.

  33..  IInnssttaallllaattiioonn dduu ssyysstteemmee RRPPMM

  Il  faut  etre  administrateur  (root)  pour   realiser   les   etapes
  suivantes.

  Tout  d'abord,  desarchiver  la  suite a partir du reepertoire racine.
  Voici les instructions :

          cd /
          tar zxvpf /home/wolf/rpm-2.4.5-1.i386.tar.gz

  Bien evidement, remplacez /home/wolf par le chemin correct du  fichier
  d'archive.
  Ensuite,  il faut creer un repertoire appele "rpm" dans l'arborescence
  /var/lib.

  mkdir /var/lib/rpm

  Ensuite, taper 'rpm --initdb' pour initialiser la  banque  de  donnees
  rpm.
  Si  tout  s'est  bien passe jusque la, vous avez un systeme compatible
  rpm! Testez-le en chargeant n'importe quel fichier rpm et en l'instal-
  lant par 'rpm -Uvh filename.rpm'

  mini-HOWTO Comment graver un CD-ROM RedHat
  Morten Kjeldgaard, mok@imsb.au.dk et Peter von der Ah,
  pahe+rhcd@daimi.au.dk Traduction franaise : Thierry Danis
  danis@mail.dotcom.fr
  v.00, 9 septembre 1998, traduction franaise du 12 dcembre
  1998

  Ce document explique comment fabriquer un CD-ROM de la distribution
  RedHat quivalent  ceux que vous pouvez vous procurer directement
  auprs de Red Hat.  Vous y trouverez une description de la structure
  des fichiers de la distribution, ainsi que la faon de procder pour
  inclure dans celle-ci des RPM  jour. Les prrequis sont une solide
  connexion  l'internet et un graveur de CD.
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Structure du site FTP de RedHat

     2.1 La racine
     2.2 Le rpertoire "RedHat" -- corps principal de la distribution

  3. Les paquets RPM

  4. Comment faire une copie locale d'une distribution ?

  5. Mettre  jour des paquets

     5.1 Vrifier les modes d'accs aux fichiers
     5.2 Remplacer les RPM mis  jour
     5.3 Regnrer le fichier hdlist

  6. Enfin : gravage du CD

  7. Installation depuis le CD-ROM

  8. AVERTISSEMENT



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Vous pouvez avoir plusieurs raisons de faire vos propres CD-ROM. Vos
  poches sont peut-tre perces et vous ne voulez pas dbourser les 50
  dollars de la distribution RedHat <http://www.redhat.com/>.  Vous
  pouvez aussi avoir besoin d'un CD-ROM avec les mises  jour les plus
  rcentes pour la dernire distribution. C'est d'autant plus vrai
  qu'aprs chaque version importante de la RedHat, de nombreuses mises 
  jour sont sorties, la plupart d'entre elles tant lies  des
  problmes de scurit. Allez jeter un oeil au fichier
  updates/00README.errata
  <ftp://ftp.redhat.com/pub/redhat/redhat-5.1/updates/00README.errata>.
  Il existe un errata spcifique  chaque plate-forme supporte. Allez
  faire un tour par exemple sur la page d'errata pour Intel
  <ftp://ftp.redhat.com/pub/redhat/updates/5.1/i386/00README.errata>.





  22..  SSttrruuccttuurree dduu ssiittee FFTTPP ddee RReeddHHaatt


  Dans l'esprit de la communaut linuxienne, Red Hat Software a mis 
  disposition sur son site FTP ses distributions de Linux pour plusieurs
  plate-formes. Elles sont toutes accessibles depuis la racine de
  l'arborescence.


  22..11..  LLaa rraacciinnee


  Le rpertoire de plus haut niveau pour la RedHat 5.1
  (pub/redhat/redhat-5.1 <ftp://ftp.redhat.com/pub/redhat/redhat-5.1/>)
  contient les distributions pour les diffrentes plate-formes ainsi
  qu'un rpertoire de mises  jour et de corrections pour des paquets
  sortis depuis cette version 5.1.



       SRPMS/     alpha/     i386/      sparc/     updates/




  Nous allons baser notre discours sur la distribution i386. La dmarche
  explique dans ce document devrait tre la mme pour toutes les
  architectures supportes par Red Hat (Alpha, SPARC, ppc, etc.) ; elle
  n'a cependant t teste que sur architecture i386 (les auteurs
  seraient intresss par tout complment d'information). La racine de
  l'arborescence i386 ressemble  ce qui suit :



       -rw-r--r--   8 ftpuser  ftpusers     19686 May 27  1997 COPYING
       -rw-r--r--   1 ftpuser  ftpusers      3023 May  7 09:58 README
       -rw-r--r--  10 ftpuser  ftpusers      2751 Sep 18  1997 RPM-PGP-KEY
       drwxr-xr-x   5 ftpuser  ftpusers        96 Jul 15 08:34 RedHat/
       drwxr-xr-x   5 ftpuser  ftpusers      8192 Jul 15 08:35 doc/
       drwxr-xr-x   5 ftpuser  ftpusers      8192 Jul 15 08:35 dosutils/
       drwxr-xr-x   5 ftpuser  ftpusers      8192 Jul 15 08:33 gnome/
       drwxr-xr-x   2 ftpuser  ftpusers        96 Jun  7 02:47 images/
       drwxr-xr-x   4 ftpuser  ftpusers        96 Jun  5 12:24 misc/




  Le rpertoire doc est une mine d'information. Point important, le
  manuel d'installation de la RedHat au format HTML se trouve dans le
  rpertoire doc/rhmanual/manual/
  <ftp://ftp.redhat.com/pub/redhat/redhat-5.1/i386/doc/rhmanual/manual/doc000.htm>.
  On y trouvera aussi de nombreuses FAQ (Foire Aux Questions) ainsi que
  tous les HOWTO et mini-HOWTO.

  Le rpertoire images contient les images binaires des disquettes de
  dmarrage. Dans les dernires distributions (5.1 et au-del), deux
  images sont disponibles. L'image de dmarrage s'appelle boot.img. Elle
  est ncessaire lorsque l'installation se fait directement depuis le
  CD-ROM. L'utilisateur pourra tre amen  fournir une disquette sur
  laquelle l'image supplmentaire (supp.img) aura t recopie si
  l'installation est lance depuis un disque dur local, via NFS ou par
  FTP. Reportez-vous  la section ``Installation depuis le CD-ROM'' pour
  plus de dtails.

  Le rpertoire misc contient les sources et les excutables d'un
  certain nombre de programmes utiliss lors de l'installation.
  22..22..  LLee rrppeerrttooiirree ""RReeddHHaatt"" ---- ccoorrppss pprriinncciippaall ddee llaa ddiissttrriibbuuttiioonn


  La partie la plus importante de l'arborescence se trouve dans le
  rpertoire RedHat :



       drwxr-xr-x   2 ftpuser  ftpusers     24576 Jul 15 08:35 RPMS/
       drwxr-xr-x   2 ftpuser  ftpusers      8192 Jul 15 08:32 base/
       -rw-rw-rw-  59 ftpuser  ftpusers         0 Aug 15 14:21 i386
       drwxr-xr-x   4 ftpuser  ftpusers        96 Jun  5 12:24 instimage/




  Les constituants principaux de la distribution sont situs dans le
  rpertoire RPMS. Ils sont forms d'un ensemble de fichiers au format
  RPM (Redhat Package Manager). Un paquet RPM est typiquement constitu
  d'excutables binaires, accompagns de leur documentation et de
  fichiers de configuration. Reportez-vous  la section ``Les paquets
  RPM'' pour plus de renseignements.

  Le rpertoire base regroupe plusieurs fichiers 'prcompils' utiliss
  lors de l'installation (par exemple, le fichier comps dcrit les
  _c_o_m_p_o_s_a_n_t_s (groupes de paquets) utiliss pendant la phase "Choix des
  paquets  installer" ("Choose packages to install").  Le fichier
  hdlist est un autre de ces fichiers : il contient la plupart des
  champs d'en-tte de chacun des paquets RPM du rpertoire RPMS).

  Cela signifie que le processus d'installation peut connatre les
  inter-dpendances entre paquets simplement en consultant le fichier
  hdlist plutt que de parcourir tous les paquets prsents ; c'est
  particulirement pratique dans le cas d'une installation par FTP.

  Une autre utilit du fichier hdlist est de pouvoir associer aux noms
  des paquets des noms de fichiers (perl  perl-5.004-6.i386.rpm par
  exemple). Cela signifie que si vous dsirez effectuer des mises  jour
  (voir section ``Mettre  jour des paquets'') ou ajouter vos propres
  paquets au rpertoire RPMS, vous devrez reconstruire le fichier
  hdlist.  La faon de procder est dcrite plus loin dans le chapitre
  ``Regnrer le fichier hdlist''.

  Le rpertoire instimage contient une arborescence "live" ncessaire 
  la procdure d'installation (on y trouve un certain nombre de
  programmes et de librairies dynamiques).


  33..  LLeess ppaaqquueettss RRPPMM


  La plus grande partie de la distribution est constitue de paquets RPM
  (Redhat Package Manager). Classiquement, un paquet RPM est form
  d'excutables binaires, de leur documentation associe et de fichiers
  de configuration.  Le programme rpm <http://www.rpm.org> est un
  gestionnaire de paquets trs puissant, qui peut tre utilis pour
  installer, consulter, vrifier, mettre  jour, effacer ou construire
  des paquets (logiciels) au format RPM. rpm maintient une base de
  donnes des paquets manipuls ; de cette manire, les informations
  relatives aux logiciels installs sont toujours disponibles.

  Les fichiers RPM prsents dans une distribution ont t construits sur
  un systme fonctionnant sous cette distribution. C'est un point
  important dans la mesure o la plupart des programmes compils
  s'appuyent sur les librairies dynamiques (shared libraries). A partir
  de la version 5.0, Red Hat se base sur la nouvelle librairie C du GNU
  (version 2, grant proprement les donnes en 64 bits). La version de
  cette librairie est communment appele glibc, ou, sous Linux, libc 6.
  L'dition de liens de tous les excutables de la distribution a t
  faite en utilisant cette librairie.  Si vous essayez d'installer des
  programmes d'autres distributions, vous courez le risque que rien ne
  marche,  moins d'avoir pris la prcaution d'installer le paquet libc5
  pour compatibilit ascendante.

  Les noms des paquets RPM contiennent le suffixe ._a_r_c_h.rpm ; _a_r_c_h est
  l'architecture (i386 pour les binaires Intel). Les paquets que vous
  installez doivent correspondre aux versions des librairies dynamiques
  prsentes sur votre machine. Le programme rpm <http://www.rpm.org>
  s'assure en gnral que c'est le cas. Il y a cependant moyen d'outre-
  passer ses vrifications, mais vous devez avoir bien conscience de ce
  que vous risquez si vous dcidez d'agir ainsi. Nanmoins, si vous
  utilisez le disque d'installation RedHat, les paquets corrects seront
  installs sur votre machine.

  Si vous vous apercevez qu'un paquet n'est pas prsent au terme de
  l'installation, ne dsesprez pas. Vous pouvez  tout moment installer
  (en tant que root) des paquets RPM :



       rpm --install  WindowMaker-0.18-1b.i386.rpm




  Vous pouvez aussi faire l'installation directement depuis l'internet,
  si vous connaissez l'URL du paquet :



       rpm --install ftp://rufus.w3.org/redhat-contrib/noarch/mirror-2.9-2.noarch.rpm




  Une variante des paquets RPM contient les sources d'origine qui ont
  servi  fabriquer un paquet binaire. Ces paquets possdent le suffixe
  .src.rpm et sont situs dans le rpertoire SRPMS. Il n'est pas
  ncessaire qu'ils se trouvent sur le CD-ROM d'installation. De toute
  faon, il n'y a pas suffisamment de place pour les y faire tenir.
  Bien entendu, vous pourrez graver un second CD-ROM avec les SRPMS.


  44..  CCoommmmeenntt ffaaiirree uunnee ccooppiiee llooccaallee dd''uunnee ddiissttrriibbuuttiioonn ??


  Vous devez recopier la distribution sur un disque inscriptible
  accessible par la machine possdant le graveur de CD (tonnant non ?).
  Si vous voulez y mettre les dernires mises  jour, l'arborescence
  devra aussi tre accessible en criture depuis votre machine Linux
  (disque local, partition NFS, disque JAZ...).

  Vous pouvez ou bien recopier le contenu d'un CD-ROM RedHat, ou bien
  rcuprer la distribution par FTP. Si vous choisissez cette seconde
  solution, le meilleur moyen pour avoir une copie correcte est
  d'utiliser le paquet mirror.

  mirror est un script volu en perl qui compare le contenu d'une
  arborescence avec celui d'une rfrence sur une autre machine. Il
  utilise FTP pour rcuprer les fichiers qui sont sur le site distant
  et qui sont absents du site local, il supprime les fichiers locaux qui
  n'apparaissent pas dans l'arborescence distante. Le programme mirror
  est configurable.  Le paquet peut tre rcupr au format RPM 
  l'adresse rufus.w3.org <http://rufus.w3.org/linux/RPM/mirror.html>.

  Faites votre copie locale du fichier de configuration de mirror
  (mirror.redhat) et modifiez les champs vous concernant au dbut du
  fichier. Aprs la section par dfaut, dfinissez les paquets
  suivants :



       package=updates
              site=ftp.sunsite.auc.dk
              exclude_patt=(alpha/|sparc/)
              remote_dir=/disk1/ftp.redhat.com/pub/redhat/redhat-5.1/updates
              local_dir=/jaz/redhat-5.1/updates

       package=dist
              site=ftp.sunsite.auc.dk
              exclude_patt=(alpha/|sparc/)
              remote_dir=/disk1/ftp.redhat.com/pub/redhat/redhat-5.1/i386
              local_dir=/jaz/redhat-5.1/i386




  La commande qui suit va recopier toute l'arborescence RedHat sur votre
  disque local. _*_R__f_l__c_h_i_s_s_e_z_* avant de la lancer, car vous tes sur le
  point de rcuprer prs de 350 Mo de donnes.



       mirror -pdist mirror.redhat




  Cela va dupliquer le site FTP de Red Hat sur votre disque local. Le
  contenu de la distribution ne change pas entre deux versions ; vous
  n'aurez donc  tlcharger l'arborescence qu'_U_N_E _S_E_U_L_E fois.  Toutes
  les modifications par rapport  la distribution se trouvent dans le
  rpertoire updates. En consquence, si vous dsirez maintenir un site
  miroir  jour de la distribution RedHat, la seule chose que vous aurez
   considrer est le rpertoire updates. Cela pourra tre fait par la
  commande :



       mirror -pupdates mirror.redhat




  Vous pouvez le faire rgulirement - disons une fois par semaine - par
  un script cron. La distribution RedHat est disponible un peu partout
  sur le globe  travers un grand nombre de serveurs FTP mis  jour
  quotidiennement depuis le site primaire ( <ftp://ftp.redhat.com/pub>).
  Essayez de choisir un site proche de vous (consultez l'URL RedHat FAQ
  <http://www.redhat.com/support/docs/rhl/RedHat-FAQ/RedHat-
  FAQ-12.html#ss12.1>).


  55..  MMeettttrree  jjoouurr ddeess ppaaqquueettss


  Afin de pouvoir faire des mises  jour, vous devez avoir accs en
  criture au rpertoire contenant la distribution. Vous devez aussi
  avoir install une version du programme rpm <http://www.rpm.org>.

  Vous procderez ensuite en trois tapes :


  1. Vrifiez les modes d'accs aux fichiers.

  2. Remplacez les RPM mis  jour.

  3. Regnrez le fichier hdlist.

  Si vous maintenez un miroir du rpertoire updates, vous pourrez
  produire  tout moment un CD-ROM incluant les dernires mises  jour
  en rptant ces trois tapes.


  55..11..  VVrriiffiieerr lleess mmooddeess dd''aaccccss aauuxx ffiicchhiieerrss


  Durant l'installation, certains programmes sont directement excuts
  depuis le CD-ROM. Malheureusement, le programme FTP ne prserve pas
  toujours les modes d'accs des fichiers et des arborescences copis.
  En consquence, il est ncessaire de s'assurer que les programmes, les
  scripts shell et les librairies dynamiques ont les droits d'excution
  idoines, avant que l'arborescence soit claque sur le CD. Lancez
  simplement le script updatePerm sur la copie locale de la
  distribution :


  ______________________________________________________________________
  #!/bin/bash

  LIST=/tmp/er3hd3w25
  CDDIR=/jaz/redhat-${RHVERSION}

  # Recherche tous les rpertoires et s'assure qu'ils ont le bit +x
  find $CDDIR -type d -exec chmod -c 755 {} \;

  # Recherche les excutables et les scripts shell ou perl
  find $CDDIR -type f | file -f - | grep -v RPM \
     | egrep -i 'executable|perl|bourne|shell' | cut -f1 -d: > $LIST

  # Recherche les bibliothques dynamiques
  find $CDDIR -name \*.so >> $LIST

  # Rend tout ce petit monde excutable
  while read file
  do
     if [ ! -x $file ] ; then
        chmod -c 755 $file
     fi
  done < $LIST

  /bin/rm $LIST

  exit 0
  ______________________________________________________________________




  55..22..  RReemmppllaacceerr lleess RRPPMM mmiiss  jjoouurr


  Le script suivant, appel updateCD, copie tous les fichiers depuis le
  rpertoire de mise  jour vers l'arborescence des RPM.  Le script
  utilise quelques commandes magiques de rpm pour dterminer quels
  paquets de la mise  jour sont plus rcents que ceux de la
  distribution. Les anciens paquets correspondants sont dplacs vers le
  rpertoire ${OLD}.


  ______________________________________________________________________
  #! /bin/bash
  # Ce script met  jour les RPM d'une distribution place dans $RPMDIR.
  # Les anciens RPM sont dplacs vers $OLDDIR.
  # Les nouveaux RPM doivent se trouver dans $UPDDIR.
  # L'architecture est $ARCH.

  RHVERSION=5.1

  ARCH=i386
  CDDIR=/jaz/redhat-${RHVERSION}
  RPMDIR=${CDDIR}/${ARCH}/RedHat/RPMS
  UPDDIR=${CDDIR}/updates/${ARCH}
  OLDDIR=${CDDIR}/old

  if [ ! -d $OLDDIR ] ; then
     echo making directory $OLDDIR
     mkdir $OLDDIR
  fi

  allow_null_glob_expansion=1

  for rpm in ${UPDDIR}/*.rpm ; do
    NAME=`rpm --queryformat "%{NAME}" -qp $rpm`
    unset OLDNAME
    for oldrpm in ${RPMDIR}/${NAME}*.rpm ; do
      if [ `rpm --queryformat "%{NAME}" -qp $oldrpm` = "$NAME" ]; then
        OLDNAME=$oldrpm;
        break
      fi
    done
    if [ -z "$OLDNAME" ]; then
      echo $NAME is new
      cp -pv $rpm $RPMDIR
    else
      if [ `basename $rpm` != `basename $OLDNAME` ]; then
        mv $OLDNAME $OLDDIR
        cp -pv $rpm $RPMDIR
      fi
    fi
  done


  # Copie les images de dmarrage au bon endroit...
  for newfile in ${UPDDIR}/images/* ; do
    file=${CDDIR}$/${ARCH}/images/$(basename ${newfile})
    if [ $newfile -nt $file ] ; then
       cp -pv $newfile $file
    fi
  done

  exit 0
  ______________________________________________________________________







  55..33..  RReeggnnrreerr llee ffiicchhiieerr hhddlliisstt


  Lors d'une installation par CD-ROM, le programme d'installation qui se
  trouve sur le CD-ROM (misc/src/install/genhdlist) s'appuie sur le
  fichier RedHat/base/hdlist dcrivant les paquets disponibles sur le
  CD-ROM. Ce programme doit tre lanc avec pour unique argument le nom
  de la racine de la distribution. Voici le script updateHdlist :


  ______________________________________________________________________
  #!/bin/bash

  echo Gnration du fichier hdlist...

  RHVERSION=5.1   # Ajout du traducteur par rapport  la version anglaise

  CDDIR=/jaz/redhat-${RHVERSION}
  ARCH=i386
  GENHDDIR=${CDDIR}/${ARCH}/misc/src/install

  chmod u+x ${GENHDDIR}/genhdlist
  chmod 644 ${CDDIR}/${ARCH}/RedHat/base/hdlist
  ${GENHDDIR}/genhdlist ${CDDIR}/${ARCH}

  exit 0
  ______________________________________________________________________



  Remarque : aprs avoir incorpor les mises  jour dans le rpertoire
  principal RedHat/RPMS, votre copie de la distribution n'est plus un
  miroir du site Red Hat. En fait, elle est plus  jour ! Par contre, si
  vous en refaites un miroir, les anciens paquets RPM qui ont t mis 
  jour vont tre de nouveau tlchargs et les mises  jour seront
  supprimes.


  66..  EEnnffiinn :: ggrraavvaaggee dduu CCDD


  Puisque nous supposons que vous avez un graveur de CD en tat de
  marche sur votre systme et que vous savez vous en servir, nous
  n'allons pas entrer dans les dtails sur la faon de graver le CD. Si
  vous voulez claquer le CD depuis Linux, nous ne saurions trop
  recommander l'excellent programme xcdroast <http://www.fh-
  muenchen.de/rz/xcdroast>.  Sous xcdroast, validez les extensions Rock
  Ridge ainsi que la cration du fichier TRANS.TBL.

  Assurez-vous alors simplement que _l_a _r_a_c_i_n_e de votre CD contient au
  moins les fichiers et rpertoires suivants :



       COPYING      RPM-PGP-KEY README       RedHat/




  Les arborescences suivantes peuvent galement se rvler pratiques :



       doc/         gnome/      misc/        dosutils/    images/


  77..  IInnssttaallllaattiioonn ddeeppuuiiss llee CCDD--RROOMM


  Lorsque vous faites l'installation depuis le CD-ROM, vous devez tout
  d'abord crer une disquette bootable. IMPORTANT : employez une
  disquette neuve, frachement formate DOS ! L'utilisation d'une
  vieille disquette, fatigue et au bout du rouleau, peut conduire 
  d'tranges problmes durant l'installation.

  Sous Linux, vous pouvez crer une disquette  l'aide de la commande
  dd :



       dd if=/mnt/cdrom/images/boot.img of=/dev/fd0 bs=1440k




  Sous DOS ou Windows-9x, utilisez le programme RAWRITE.EXE qui se
  trouve sur le CD-ROM dans le rpertoire dosutils.

  Arrtez la machine sur laquelle vous voulez faire l'installation ou la
  mise  jour, insrez la disquette de dmarrage et votre CD-ROM encore
  tout chaud, et laissez le systme dmarrer sur la disquette.  Pour
  plus d'information sur la procdure d'installation, rfrez-vous aux
  documents et aux HOWTO Installation-HOWTO et Bootdisk-HOWTO qui se
  trouvent sur le CD-ROM dans le rpertoire doc/HOWTO.


  88..  AAVVEERRTTIISSSSEEMMEENNTT


  LLee ccoonntteennuu ddee ccee ddooccuummeenntt eesstt ssuuppppooss ccoorrrreecctt.. CCeeppeennddaanntt,, sseess aauutteeuurrss
  eett llee ttrraadduucctteeuurr ssee ddggaaggeenntt ddee ttoouuttee rreessppoonnssaabbiilliitt qquuaanntt  uunnee
  ddggrraaddaattiioonn qquueellccoonnqquuee mmaattrriieellllee eett//oouu llooggiicciieellllee oouu  uunnee ppeerrttee ddee
  ddoonnnneess ssuuiittee  ll''aapppplliiccaattiioonn ddeess pprrooccdduurreess ddccrriitteess ddaannss llee
  ddooccuummeenntt..




























  mini-HOWTO : Comment excuter des applications X  distance
  Vincent Zweije, zweije@xs4all.nl
  V 0.6.1, 19 Novembre 1999

  Ce mini-HOWTO dcrit comment excuter des applications X  distance.
  C'est--dire, comment faire pour qu'un programme X s'affiche sur un
  cran d'ordinateur diffrent de celui sur lequel il s'excute. Ou,
  autrement dit, comment faire tourner un programme X sur un ordinateur
  diffrent de celui devant lequel vous tes assis. L'accent de ce mini-
  HOWTO sera mis sur les questions de scurit. Ce mini-HOWTO contient
  galement des informations sur la manire de faire tourner des appli
  cations X en local, mais avec un identificateur d'utilisateur (user-
  id) diffrent.  Adaptation franaise : Albert-Paul Bouillot apb@club-
  internet.fr
  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Lectures complmentaires

  3. Le contexte

  4. Un peu de thorie

  5. Dire au client ...

  6. Dire au serveur ...

     6.1 Xhost
     6.2 Xauth
        6.2.1 Fabrication du Cookie
        6.2.2 Transfert du Cookie
        6.2.3 Utilisation du Cookie
     6.3 Ssh

  7. Les applications X avec un identificateur d'utilisateur (User-id) diffrent

     7.1 Plusieurs utilisateurs sur le mme hte
     7.2 Root est l'utilisateur client

  8. Faire tourner un gestionnaire de fentres distant

  9. Maintenance



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce mini-HOWTO constitue un guide  sur la manire de faire tourner des
  applications X  distance.  J'ai rdig ce document pour plusieurs
  raisons :


  1. Il y a eu de nombreuses questions, sur Usenet, sur la manire de
     faire tourner des applications X  distance;

  2. J'ai vu beaucoup, beaucoup, de conseils d'utilisation de des
     connexions X.  CC''eesstt dd''uunnee iinnssccuurriitt ttoottaallee, et il existe de bien
     meilleures mthodes;


  3. Je n'ai pas connaissance d'un document simple dcrivant les options
     dont _o_n _p_e_u_t disposer. Si vous avez des informations
     complmentaires, s'il vous plat, faites-le moi savoir :
     <zweije@xs4all.nl>.

  Ce document a t crit en pensant  des systmes de type Unix.  Si le
  systme d'exploitation de votre ordinateur local ou de celui qui est 
  distance est de type diffrent, vous devriez trouver ici des
  informations sur la manire dont les choses se passent. Cependant, il
  vous faudra modifier les exemples par vous-mme pour les utiliser sur
  votre (vos) propre(s) systmes(s).

  La version (anglaise) la plus rcente de ce document est toujours
  disponible sur le WWW  http://www.xs4all.nl/~zweije/xauth.html.  Il
  est galement disponible en tant que mini-HOWTO Linux Applications X 
  distance (Remote X Apps)  :
  http://sunsite.unc.edu/LDP/HOWTO/mini/Remote-X-Apps. Les (mini-)HOWTOs
  Linux sont disponibles par http ou ftp sur sunsite.unc.edu.

  Ceci constitue la version 0.6.1. Aucunes garanties, seulement de
  bonnes intentions. Je suis ouvert aux suggestions, ides, ajouts,
  pointeurs utiles, corrections (typo), etc... Je veux que cela reste un
  document simple et lisible, dans la bonne moyenne du style HOWTO.  Les
  querelles seront rediriges vers /dev/null.

  Le contenu de ce mini-HOWTO a t mis  jour le 19 Novembre 1999 par
  Vincent Zweije


  22..  LLeeccttuurreess ccoommppllmmeennttaaiirreess

  Un document, en rapport avec cela, sur le WWW traite de ''Quoi faire
  quand Tk dit que votre cran n'est pas sr'', http://ce-
  toolkit.crd.ge.com/tkxauth/.  Il a t crit par Kevin Kenny. Il
  suggre une solution similaire  celle de ce document pour
  l'authentification X (xauth). Cependant, Kevin vise plus 
  l'utilisation de xdm pour diriger xauth  votre place.

  On m'a indiqu que le volume 8 du ``Guide de l'administrateur du
  systme X Window'' (X Window System Administrator's Guide Vol. 8) de
  chez O'Reilly and Associates tait une bonne source d'informations.
  Malheureusement, je n'ai pas pu le vrifier.

  Il y a galement un autre document qui ressemble beaucoup  celui que
  vous tes en train de lire, dont le titre est ''Securing X Windows'',
  et qui est disponible 
  http://ciac.llnl.gov/ciac/documents/ciac2316.html.

  Consultez galement les listes de diffusion usenet, telles que :
  comp.windows.x, comp.os.linux.x, et comp.os.linux.networking.


  33..  LLee ccoonntteexxttee

  Vous utilisez deux ordinateurs. Sur le premier, vous tes dans
  l'environnement X Window pour taper au clavier et regarder l'cran.
  Sur le second vous effectuez un important traitement graphique. Vous
  voulez que les sorties du second soient affiches sur l'cran du
  premier. Le systme X window rend cela possible.


  Naturellement, vous devez disposez de connexions  un rseau pour
  pouvoir le raliser. De prfrence rapides, car le protocole X est un
  dvoreur de ressources rseau. Mais, avec un peu de patience et un
  protocole de compression de donnes adapt, vous pouvez mme faire
  tourner des applications par l'intermdiaire d'un modem. Pour un
  protocole de compression pour X, vous pouvez aller consulter les sites
  : dxpc <http://ccwf.cc.utexas.edu/~zvonler/dxpc/> ou LBX
  <http://www.ultranet.com/~pauld/faqs/LBX-HOWTO.html> (galement connu
  comme tant le LBX mini-HOWTO).

  Vous avez deux choses  faire pour raliser tout cela :


  1. Indiquer  l'unit d'affichage locale (le serveur) qu'elle doit
     accepter les connexions venant de l'ordinateur  distance.

  2. Dire  l'application  distance (le client) de rediriger ses
     sorties vers votre unit d'affichage locale.


  44..  UUnn ppeeuu ddee tthhoorriiee

  Le mot magique est DISPLAY (unit d'affichage). Dans le systme X
  window, une unit d'affichage est constitue (en simplifiant) d'un
  clavier, d'un mulot et d'un cran. Une unit d'affichage est gre par
  un programme serveur, plus connu sous le nom de serveur X. Le serveur
  fourni des fonctionnalits d'affichage aux autres programmes qui se
  connectent  lui.


  Une unit d'affichage est identifie par un nom, de type, par exemple
  :


    DISPLAY=light.uni.verse:0

    DISPLAY=localhost:4

    DISPLAY=:0

  Un nom d'unit d'affichage est constitu d'un nom d'hte (par exemple
  : light.uni.verse et localhost), du signe deux point (:), et d'un
  numro de squence (tels que 0 et 4). Le nom d'hte de l'unit
  d'affichage est le nom de l'ordinateur sur lequel tourne le serveur X.
  Si le nom de l'hte est omis, cela signifie qu'il s'agit de
  l'ordinateur local.  D'habitude, le numro de squence est 0 -- cela
  peut changer s'il y a plusieurs units d'affichage connectes sur le
  mme ordinateur.

  Si jamais il vous arrive de voir le nom d'une unit d'affichage avec
  un .n supplmentaire accol  son nom, c'est qu'il s'agit d'un numro
  d'cran. Une unit d'affichage peut, en thorie, avoir plusieurs
  crans.  Cependant, d'habitude, il n'y en a qu'un, qui porte le numro
  n=0, et c'est le numro par dfaut.


  D'autres formes de DISPLAY existent, mais celle-ci suffira pour notre
  propos.

  Pour celui qui est curieux de technique :

    hostname:D.S signifie cran S sur unit d'affichage D de l'hte
     hostname; le serveur X de cette unit d'affichage est  l'coute du
     port TCP 6000+D.

    host/unix:D.S signifie cran S sur unit d'affichage D de l'hte
     host; le serveur X de cette unit d'affichage est  l'coute du
     socket de domaine UNIX /tmp/.X11-unix/XD (et donc, seul host peut
     l'atteindre).


    :D.S est quivalent  host/unix:D.S, o host est le nom de l'hte
     local.


  55..  DDiirree aauu cclliieenntt ......

  Le programme client (par exemple, votre application graphique) sait 
  quelle unit d'affichage il doit se connecter en consultant la
  variable d'environnement DISPLAY. Cependant ce paramtrage peut tre
  modifi, en lanant le client avec l'argument  -display hostname:0
  dans la ligne de commande. Quelques exemples peuvent clarifier les
  choses.


  Notre ordinateur est connu du monde extrieur sous le nom light, et
  nous sommes dans le domaine uni.verse.  Si nous fonctionnons avec un
  serveur X normal, l'unit d'affichage est connue comme tant
  light.uni.verse:0.  Nous voulons faire tourner le programme de dessin
  xfig sur un ordinateur  distance, appel dark.matt.er, et afficher sa
  sortie ici, sur light.

  Supposons que vous vous soyez dj connect par telnet  l'ordinateur
  distant, dark.matt.er.

  Si l'interprteur de commande de l'ordinateur loign est csh :



       dark% setenv DISPLAY light.uni.verse:0
       dark% xfig &




  Ou, d'une autre manire :



       dark% xfig -display light.uni.verse:0 &




  Si c'est sh qui tourne sur l'ordinateur  distance :



       dark$ DISPLAY=light.uni.verse:0
       dark$ export DISPLAY
       dark$ xfig &




  Ou, autrement :



       dark$ DISPLAY=light.uni.verse:0 xfig &




  Ou, bien sr, galement :


       dark$ xfig -display light.uni.verse:0 &




  Il parat que certaines versions de telnet transmettent
  automatiquement la variable DISPLAY  l'ordinateur hte loign. Si
  vous avez l'une ce celles-ci, vous avez de la chance, et c'est
  effectivement automatique. Si ce n'est pas le cas, la plupart des
  versions de telnet _d_o_i_v_e_n_t transmettre la variable d'environnement
  TERM, et avec un bidouillage judicieux, il est possible de superposer
  la variable DISPLAY sur la variable TERM.

  L'ide, sous-jacente  cette superposition, est de raliser une sorte
  de script pour effectuer ceci : avant la connexion par telnet, donner
  la valeur de DISPLAY  TERM. Puis de lancer telnet. Du ct de
  l'ordinateur distant, dans le fichier .*shrc concern, lire la valeur
  de DISPLAY  partir de TERM.


  66..  DDiirree aauu sseerrvveeuurr ......

  Le serveur n'acceptera pas de connexions venant de n'importe o. Vous
  ne voulez pas que n'importe qui puisse afficher des fentres sur votre
  cran. Ou lire ce vous tapez -- souvenez-vous que votre clavier fait
  partie de votre unit d'affichage!


  Trop peu de gens semble raliser que permettre l'accs  leur unit
  d'affichage pose des problmes de scurit. Quelqu'un qui dispose d'un
  accs  votre unit d'affichage peut lire et crire sur vos crans,
  lire vos frappes au clavier, et suivre les dplacements de votre
  mulot.

  La plupart des serveurs disposent de deux manires d'authentifier les
  demandes de connexions qui arrivent : le mcanisme de la liste d'htes
  (xhost) et le mcanisme du mot de passe secret (magic cookie) (xauth).
  De plus, il y a ssh, l'interprteur de commande scuris, qui peut
  acheminer les connexions X.


  66..11..  XXhhoosstt

  Xhost permet les accs bass sur les nom d'htes. Le serveur
  entretient une liste des htes qui sont autoriss  se connecter 
  lui. Il peut aussi dsactiver compltement la vrification des htes.
  Attention : cela signifie que plus aucun contrle n'est effectu, et
  donc, que _n_'_i_m_p_o_r_t_e _q_u_e_l hte peut se connecter!


  Vous pouvez contrler la liste des htes du serveur avec le programme
  xhost.  Pour utiliser ce mcanisme dans l'exemple prcdent, faites :



       light$ xhost +dark.matt.er




  Ceci permet toutes les connexions  partir de l'hte dark.matt.er.
  Ds que votre client X a ralis sa connexion et affiche une fentre,
  par scurit, supprimez les permissions pour d'autres connexions avec
  :


       light$ xhost -dark.matt.er




  Vous pouvez dsactiver la vrification des htes avec :



       light$ xhost +




  Ceci dsactive la vrification des accs des htes et donc permet 
  _t_o_u_t _l_e _m_o_n_d_e de se connecter. Vous ne devriez _j_a_m_a_i_s faire cela sur
  un rseau o vous n'avez pas confiance dans _t_o_u_s les utilisateurs (tel
  internet). Vous pouvez ractiver la vrification des htes avec :



       light$ xhost -




  xhost - par lui-mme _n_e _s_u_p_p_r_i_m_e _p_a_s tous les htes de la liste
  d'accs (ce qui serait tout  fait inutile - vous ne pourriez plus
  vous connecter de n'importe o, pas mme de votre hte local).

  _X_h_o_s_t _e_s_t _u_n _m__c_a_n_i_s_m_e _v_r_a_i_m_e_n_t _t_r__s _p_e_u _s__r_. Il ne fait pas de
  distinction entre les diffrents utilisateurs sur l'hte  distance.
  De plus, les noms d'htes (en ralit des adresses) peuvent tre
  manipuls. C'est mauvais si vous vous trouvez sur un rseau douteux
  (dj, par exemple, avec un accs PPP tlphonique  Internet).


  66..22..  XXaauutthh

  Xauth autorise l'accs  tous ceux qui connaissent le bon secret.  On
  appelle un tel secret un enregistrement d'autorisation ou cookie.  Ce
  mcanisme d'autorisation est dsign crmonieusement comme tant le
  MIT-MAGIC-COOKIE-1.


  Les cookies pour les diffrentes units d'affichage sont stocks
  ensembles dans ~/.Xauthority.Votre fichier ~/.Xauthority doit tre
  inaccessible pour les utilisateurs groupe/autres. Le programme xauth
  gre ces cookies, donc le surnom xauth dans ce schma.

  Au dmarrage d'une session, le serveur lit un cookie dans le fichier
  qui est indiqu par l'argument -auth. Ensuite, le serveur ne permet la
  connexion que des clients qui connaissent le mme cookie. Quand le
  cookie dans ~/.Xauthority change, _l_e _s_e_r_v_e_u_r _n_e _r__c_u_p__r_e_r_a _p_a_s _l_a
  _m_o_d_i_f_i_c_a_t_i_o_n.


  Les serveurs les plus rcents peuvent gnrer des cookies  la vole
  pour des clients qui le demandent. les cookies sont cependant encore
  conservs dans le serveur; ils ne finissent pas dans ~/.Xauthority 
  moins qu'un client ne les y mettent. Selon David Wiggins :


       Une possibilit supplmentaire , qui peut vous intresser, a
       t ajoute dans X11R6.3.  Par l'intermdiaire de la nou
       velle extension SECURITY, le serveur X lui-mme peut gnrer
  et renvoyer de nouveaux cookies  la vole. De plus on peut
  dsigner les cookies comme tant ``douteux'' de sorte que
  les applications qui se connectent avec de tels cookies
  auront une capacit opratoire restreinte. Par exemple, ils
  ne pourront pas regarder les entres au clavier/mulot, ou le
  contenu des fentres, d'autres clients ``fiables''.  Il y a
  une nouvelle sous-commande ``generate'' de xauth pour rendre
  cette fonctionnalit, pas forcment facile, mais au moins
  possible  utiliser.


  Xauth possde un avantage clair, au niveau de la scurit, sur xhost.
  Vous pouvez limiter l'accs  des utilisateurs spcifiques sur des
  ordinateurs spcifiques. Il ne permet pas l'usurpation d'adresse comme
  le permet xhost.  Et, si vous le dsirez, vous pouvez encore utiliser
  xhost en parallle pour permettre des connexions.


  66..22..11..  FFaabbrriiccaattiioonn dduu CCooookkiiee

  Si vous voulez utiliser xauth, vous devez lancer le serveur X avec
  l'argument -auth authfile. Si vous utilisez le script ssttaarrttxx pour
  lancer le serveur X, c'est le bon endroit pour le faire. Crez
  l'enregistrement d'autorisation comme indiqu ci-dessous dans votre
  script startx.

  Extrait de /usr/X11R6/bin/startx:



       mcookie|sed -e 's/^/add :0 . /'|xauth -q
       xinit -- -auth "$HOME/.Xauthority"




  Mcookie est un petit programme du paquetage util-linux, site primaire
  ftp://ftp.math.uio.no/pub/linux/. Autrement, vous pouvez utiliser
  md5sum pour crer quelques donnes alatoires (de, par exemple,
  /dev/urandom ou ps -axl) au format cookie :



       dd if=/dev/urandom count=1|md5sum|sed -e 's/^/add :0 . /'|xauth -q
       xinit -- -auth "$HOME/.Xauthority"




  Si vous ne pouvez pas diter le script startx (parce que vous n'tes
  pas root), demandez  votre administrateur de systme de configurer
  startx correctement, ou,  la place, laissez-le configurer xdm. S'il
  ne peut, ou ne veut, pas, vous pouvez crire un script ~/.xserverrc.
  Si vous avez ce script, il sera excut par xinit au lieu du vritable
  serveur X. Alors, vous pourrez lancer le serveur X vritable  partir
  de ce script avec les arguments adapts.  Pour faire cela, faites
  utiliser par votre ~/.xserverrc le mcookie de la ligne ci-dessus pour
  crer un cookie puis lancer le vritable serveur X :



       #!/bin/sh
       mcookie|sed -e 's/^/add :0 . /'|xauth -q
       exec /usr/X11R6/bin/X "$@" -auth "$HOME/.Xauthority"


  Si vous utilisez xdm pour grer vos sessions X, vous pouvez utiliser
  xauth facilement. Dfinissez les ressources du DisplayManager.authDir
  dans /etc/X11/xdm/xdm-config.  Xdm passera l'argument -auth au serveur
  X  son dmarrage. Au moment de la connexion sous xdm, xdm place le
  cookie dans ~/.Xauthority pour vous. Consultez xdm(1) pour de plus
  amples information.  Par exemple, mon /etc/X11/xdm/xdm-config contient
  la ligne suivante :



       DisplayManager.authDir: /var/lib/xdm





  66..22..22..  TTrraannssffeerrtt dduu CCooookkiiee

  Maintenant que vous avez lanc votre session X sur le serveur hte
  light.uni.verse et que vous avez votre cookie dans ~/.Xauthority, il
  vous faut transfrer le cookie sur le client, dark.matt.er.


  Le plus simple est que vos rpertoires sur light et dark soient
  partags. Les fichiers ~/.Xauthority sont les mmes, donc le cookie
  est transfr instantanment.  Cependant, il y a un pige : lorsque
  vous mettez un cookie pour :0 dans ~/.Xauthority, dark va croire que
  c'est un cookie pour lui au lieu de light. Il faut que vous utilisiez
  un nom d'hte explicite  la cration du cookie; on ne peut pas faire
  autrement. Vous pouvez installer le mme cookie pour,  la fois, :0 et
  light:0 avec :



       #!/bin/sh
       cookie=`mcookie`
       xauth add :0 . $cookie
       xauth add "$HOST:0" . $cookie
       exec /usr/X11R6/bin/X "$@" -auth "$HOME/.Xauthority"




  Si les rpertoires _h_o_m_e ne sont pas partags, vous pouvez transfrer
  le cookie au moyen de rsh, le shell  distance :



       light$ xauth nlist "${HOST}:0" | rsh dark.matt.er xauth nmerge -





  1. Extraire le cookie de votre fichier local ~/.Xauthority (xauth
     nlist :0).

  2. Le transfrer vers dark.matt.er (| rsh dark.matt.er).

  3. >Le mettre dans ~/.Xauthority l (xauth nmerge -).


  Notez l'utilisation de ${HOST}. Vous devez transfrer le cookie qui
  est explicitement associ  l'hte local. Une application X distante
  interprterait une valeur d'unit d'affichage gale  :0 comme tant
  une rfrence  la machine distante, ce qui ne correspond pas  ce que
  l'on veut !

  Il est possible que rsh ne fonctionne pas chez vous. En plus de cela,
  rsh a un inconvnient en ce qui concerne la scurit (noms d'htes
  parodis, si je me souviens bien). Si vous ne pouvez, ou ne voulez,
  pas utiliser rsh, vous pouvez galement transfrer le cookie
  manuellement, comme ceci :



       light$ echo $DISPLAY
       :0
       light$ xauth list $DISPLAY
       light/unix:0 MIT-MAGIC-COOKIE-1 076aaecfd370fd2af6bb9f5550b26926
       light$ rlogin dark.matt.er
       Password:
       dark% setenv DISPLAY light.uni.verse:0
       dark% xauth add $DISPLAY . 076aaecfd370fd2af6bb9f5550b26926
       dark% xfig &
       [15332]
       dark% logout
       light$




  Consultez galement rsh(1) et xauth(1x) pour de plus amples
  informations.

  Il doit tre possible de superposer le cookie sur la variable TERM ou
  DISPLAY quand vous utilisez telnet sur l'hte loign. Cela doit
  fonctionner de la mme manire que de superposer la variable DISPLAY
  sur la variable TERM. Regardez la section 5 : Dire au Client. De mon
  point de vue, sur ce sujet, vous prenez vos responsabilits, mais cela
  m'intresse si quelqu'un peut me confirmer ou m'infirmer cela.


  66..22..33..  UUttiilliissaattiioonn dduu CCooookkiiee

  Une application X, telle que xfig ci-dessus, sur dark.matt.er, ira
  automatiquement voir le cookie dans ~/.Xauthority pour s'authentifier.


  L'utilisation de localhost:D entrane une petite difficult.
  L'application X cliente peut traduire localhost:D en host/unix:D pour
  les besoins de recherche du cookie.  Effectivement, cela signifie
  qu'un cookie pour localhost:D dans votre ~/.Xauthority n'a _a_u_c_u_n
  effet.


  66..33..  SSsshh

  Les enregistrements d'autorisation sont transmis sans codage. Si vous
  vous souciez de ce que l'on puisse espionner vos connexions, utilisez
  ssh, le shell scuris. Il effectuera des transmissions X scurises
  au moyen de connexions cryptes. De plus, il est gnial pour d'autres
  choses aussi.  C'est une bonne amlioration structurelle de votre
  systme. Allez voir simplement http://www.cs.hut.fi/ssh/, la page
  d'accueil de ssh.

  Qui possde d'autres informations sur les mthodes d'authentification
  ou de cryptage des connexions X ?  Peut-tre Kerberos ?




  77..  LLeess aapppplliiccaattiioonnss XX aavveecc uunn iiddeennttiiffiiccaatteeuurr dd''uuttiilliissaatteeuurr ((UUsseerr--iidd))
  ddiiffffrreenntt

  Supposez que vous vouliez faire tourner un outil graphique de
  configuration qui ncessite d'avoir les privilges du compte _r_o_o_t
  alors que la session X actuelle se droule sous votre compte. Cela
  peut sembler trange au premier abord, mais le serveur X _n_e permettra
  _p_a_s  cet outil d'accder  votre unit d'affichage. Comment cela est-
  il possible alors que _r_o_o_t peut normalement tout faire ? Et comment
  contourner ce problme ?


  largissons le propos au cas o l'on veut faire tourner une
  application X, sous un identificateur d'utilisateur clientuser, alors
  que la session X a t lance par serveruser. Si vous avez lu le
  paragraphe sur les _c_o_o_k_i_e_s, il est vident que clientuser ne peut pas
  accder  votre unit d'affichage : ~clientuser/.Xauthority ne
  contient le cookie magique qui permet d'accder  l'unit d'affichage.
  Le cookie correct se trouve dans ~serveruser/.Xauthority.


  77..11..  PPlluussiieeuurrss uuttiilliissaatteeuurrss ssuurr llee mmmmee hhttee

  Naturellement, tout ce qui marche pour un X distant marchera aussi
  pour un X  partir d'un identificateur d'utilisateur diffrent
  (particulirement slogin localhost -l clientuser). Et ici l'hte
  client et l'hte serveur sont prcisment les mmes. Cependant, quand
  les deux htes sont les mmes, il y a quelques raccourcis pour
  transfrer le _c_o_o_k_i_e _m_a_g_i_q_u_e.


  On supposera que l'on utilise su pour passer d'un identificateur
  utilisateur  l'autre. Essentiellement, il faut crire un script qui
  appelle su, mais enveloppe la commande que su excute d'un peu de code
  qui effectue les tches ncessaires pour le X distant.  Ces tches
  ncessaires sont l'initialisation de la variable DISPLAY et le
  transfert du _c_o_o_k_i_e _m_a_g_i_q_u_e.


  L'initialisation de DISPLAY est relativement facile ; il faut
  simplement dfinir DISPLAY="$DISPLAY" avant d'excuter l'argument de
  la commande su. Donc, il faut simplement faire :



       su - clientuser -c "env DISPLAY="$DISPLAY" clientprogram &"





  Ce n'est pas tout, il faut encore transfrer le cookie. On peut le
  retrouver en utilisant xauth list "$DISPLAY".  Cette commande renvoie
  le cookie dans un format qui convient pour le mettre dans xauth; ce
  dont nous avons justement besoin ! Donc, on met le cookie obtenu dans
  xauth dans le commande su, on initialise DISPLAY ici, et on lance la
  commande dsire



       su - clientuser -c "xauth add `xauth list $DISPLAY`; \
                           exec env DISPLAY=$DISPLAY clientprogram"




  On peut crire un script pour raliser tout cela, en le paramtrant
  avec clientuser et clientprogram. Amliorons un peu le script pendant
  que nous y sommes, a va le rendre un peu moins comprhensible mais un
  peu plus robuste. Le tout ressemble  cela :



       #!/bin/sh
       if [ $# -lt 2 ]
       then echo "usage: `basename $0` clientuser command" >&2
            exit 2
       fi
       CLIENTUSER="$1"; shift
       exec su - "$CLIENTUSER" -c "xauth add `xauth list \"$DISPLAY\"`; \
                                   exec env DISPLAY='$DISPLAY' "'"$SHELL"'" -c '$*'"





  Je pense que c'est portable et que cela fonctionne suffisamment
  correctement dans la plupart des circonstances. Le seul dfaut auquel
  je pense en ce moment est d  l'utilisation de '$*', les guillemets
  simples dans command vont perturber les guillemets de l'argument('$*')
  de la commande su. Si cela entrane quelque chose de vraiment gnant,
  envoyez-moi un courrier lectronique.


  Nommez le script /usr/local/bin/xsu, et vous pouvez faire :



       xsu clientuser 'command &'





  Facile, non ?


  77..22..  RRoooott eesstt ll''uuttiilliissaatteeuurr cclliieenntt

  videmment, tout ce qui marche pour un client non root doit
  fonctionner pour root. Cependant, avec root vous pouvez faire cela
  encore plus facilement, car celui-ci peut lire le fichier
  ~/.Xauthority de tout le monde. Il n'y a pas besoin de transfrer le
  cookie. Tout ce qu'il y a  faire consiste  initialiser DISPLAY, et 
  faire pointer XAUTHORITY sur ~serveruser/.Xauthority. Donc, vous
  pouvez crire :



       su - -c "exec env DISPLAY='$DISPLAY' \
                         XAUTHORITY='${XAUTHORITY-$HOME/.Xauthority}' \
                         command"





  Et, en mettant cela dans un script, cela donne quelque chose comme




  #!/bin/sh
  if [ $# -lt 1 ]
  then echo "usage: `basename $0` command" >&2
       exit 2
  fi
  su - -c "exec env DISPLAY='$DISPLAY' \
                    XAUTHORITY='${XAUTHORITY-$HOME/.Xauthority}' \
                    "'"$SHELL"'" -c '$*'"





  Nommez le script /usr/local/bin/xroot, et vous pouvez faire :



       xroot 'control-panel &'





  Encore plus facile, non ??


  88..  FFaaiirree ttoouurrnneerr uunn ggeessttiioonnnnaaiirree ddee ffeennttrreess ddiissttaanntt

  Un gestionnaire de fentres (comme twm, wmaker, ou fvwm95) est une
  application comme n'importe quelle autre. La procdure normale devrait
  fonctionner.


  Enfin, presque. Il ne peut tourner, au plus, qu'un seul gestionnaire
  de fentres  un instant donn dans une unit d'affichage. Si vous
  faites dj tourner un gestionnaire de fentre local, vous ne pouvez
  pas lancer le gestionnaire distant (il le dira et s'arrtera). Il faut
  tuer (ou simplement quitter) le gestionnaire local en premier.


  Par manque de chance, beaucoup de scripts de sessions X se terminent
  par un



       exec le-gestionnaire-de-fenetre-de-votre-choix




  et cela signifie que quand le gestionnaire de fentre (local) se
  termine, votre session se termine, et le systme (xdm ou xinit)
  considre que votre session est termine, et effectivement, vous
  dconnecte.


  Vous aurez encore  faire quelques contorsions, mais vous devez y
  arriver et ce n'est pas trop difficile. Amusez-vous un peu avec votre
  script de session (normalement ~/.xsession ou ~/.xinitrc) pour arriver
   vos fins.


  Attention, un gestionnaire de fentres permet souvent de faire tourner
  de nouveaux programmes qui s'excuteront sur la machine locale.
  C'est--dire locale  la machine sur lequel tourne le gestionnaire de
  fentres. Si vous faites tourner un gestionnaire de fentres distant,
  il lancera des applications distantes, et ce n'est peut-tre pas ce
  que vous voulez.  Naturellement, elles continueront  s'afficher sur
  l'unit d'affichage qui est locale pour vous.


  99..  MMaaiinntteennaannccee

  D'ordinaire, la premire fois que vous allez essayer de faire tourner
  une application X  distance, a ne marchera pas. Voici quelques-uns
  des messages d'erreur habituels, leur cause probable et des solutions
  pour vous aider  progresser.




       xterm Xt error: Can't open display:




  Il n'y a pas de variable DISPLAY renseigne dans votre environnement
  et vous n'avez pas non plus lanc l'application avec le drapeau
  -display.  L'application assume que la variable display contient une
  chane de caractres vide, ce qui est syntaxiquement incorrect. La
  solution  cela consiste  s'assurer que la variable DISPLAY est
  correctement renseigne dans l'environnement (avec setenv ou export
  selon votre shell).



       _X11TransSocketINETConnect: Can't connect: errno = 101
       xterm Xt error: Can't open display: love.dial.xs4all.nl:0




  Erreur 101 signifie ``Rseau inaccessible''. L'application n'arrive
  pas  se connecter au serveur  travers le rseau.  Vrifiez que la
  variable  DISPLAY est correctement renseigne et que la machine
  serveur est accessible  partir de votre client (ce qui devrait tre
  le cas, car aprs tout vous tes probablement connect au serveur en
  ayant une session telnet avec votre client).



       _X11TransSocketINETConnect: Can't connect: errno = 111
       xterm Xt error: Can't open display: love.dial.xs4all.nl:0




  Erreur 111 signifie ``Connexion refuse''. La machine  laquelle vous
  tes en train d'essayer de vous connecter peut tre atteinte, mais le
  serveur indiqu n'existe pas  cet endroit.  Vrifiez que vous
  utilisez le nom d'hte correct et le numro d'unit d'affichage
  adquat.



       Xlib: connection to ":0.0" refused by server
       Xlib: Client is not authorized to connect to Server
       xterm Xt error: Can't open display: love.dial.xs4all.nl:0.0




  Le client pourrait raliser une connexion avec le serveur, mais celui-
  ci ne permet pas au client de l'utiliser (pas autoris). Assurez-vous
  que vous avez transfr le bon cookie au client, et qu'il n'est pas
  prim (le serveur utilise un nouveau cookie au dmarrage d'une
  nouvelle session).





























































  Mini-HOWTO Sendmail+UUCP
  Hadi Salim, jamal@glcom.com ou hadi@cyberus.ca
  25 octobre 1997

  11..  IInnttrroodduuccttiioonn..

  Apres  m'etre finalement calme et apres avoir lu le FM (le Livre de la
  Chauve Souris, pour etre precis) j'ai resolu l'enigme  de  Caramilk  !
  Les etapes suivantes ont ete testees avec les binaires fournis dans la
  RedHat. Peut-etre devrais-je soumettre aussi ces astuces au mainteneur
  de  la  FAQ  Sendmail  dans  la  mesure  ou  il  n'y  a aucune mention
  d'interconnexion entre UUCP et Sendmail dedans.

  11..11..  CCee qquuee ccee ddooccuummeenntt eessssaayyee ddee vvoouuss mmoonnttrreerr

  Comment  configurer  une  simple  machine,  denotee  par  me.com  dans
  l'exemple,  ne  possedant aucun acces direct a Internet pour router le
  courrier electronique pour vous via sendmail et UUCP vers une 'machine
  plus  intelligente'  i.e.  :  votre  ISP.   Vous pouvez optionellement
  configurer cette machine pour fournir d'autres machines  i.e.  :  vous
  etes  leur 'machine intelligente' (NDT : referee par smarthost dans le
  reste du document) ou encore passerelle.

  11..22..  CCee qquuee ccee ddooccuummeenntt nnee vvoouuss ddiitt ppaass

  J'ai recu un nombre incroyable  de  questions  concernant  des  sujets
  depassant le cadre de ce HOWTO. Le but de ce document n'est pas de les
  decrire, donc merci d'essayer de ne pas m'envoyer de questions sur  ce
  qui suit :

  11..22..11..  CCoommmmeenntt ccoonnffiigguurreerr UUUUCCPP..

  Consultez une des nombreuses references bien faites, telles ques :

  UUCP HOWTO (Vince Shakan)

  Using  and managing UUCP (Ed Revin et al -- editions O'Reilly) qui est
  je pense la meilleure reference sur UUCP

  Linux Network Administrator Guide (Olaf Kirch)

  11..22..22..  CCoommmmeenntt ccoonnffiigguurreerr llee DDNNSS..

  Consultez une des nombreuses references bien faites, telles ques :

  Caching named mini howto (Nicolai Langfeldt)

  The bat book (Sendmail;Costalles, Allman, Rickert ; editions O'Reilly)

  DNS and BIND (Editions O'Reilly)

  TCP/IP Network Administration (Hunt, Craig ; editions O'Reilly)

  Linux Network Administrator Guide (Olaf Kirch)

  sendmail  Theory  and  Practice  (Avolio  et  Vixie ; editions Digital
  press)

  11..22..33..  ppoouurr ffoonnccttiioonnnneerr aavveecc sseennddmmaaiill..  CCoommmmeenntt ccoonnffiigguurreerr ddeess  bbaasseess
  ddee ddoonnnneeeess ((aauuttrreess qquuee llaa mmaaiilleerrttaabbllee))

  Consultez une des nombreuses references bien faites, telles ques:

  The bat book  (Sendmail  ;  Costalles,  Allman,  Rickert  --  editions
  O'Reilly)

  TCP/IP administration (Editions O'Reilly)

  Sendmail  Theory  and  Practice  (Avolio  et  Vixie ; editions Digital
  press)

  Documentations attachees a sendmail

  11..22..44..  CCoommmmeenntt eeccrriirree oouu mmooddiiffiieerr ddeess eennsseemmbblleess rreeggllee oouu ddeess mmaaiilleerrss

  Toutes les references du dessus en XXX

  Vous  pouvez  aussi  trouver  de  l'aide dans les groupes de nouvelles
  suivants:

  comp.mail.sendmail comp.mail.uucp comp.os.linux.networking

  Canaux IRC

  #linux, #unix

  22..  LLaa ccoonnffiigguurraattiioonn

  C'est  pour  un  systeme,  hypothetiquement  appele  me.com,  dont  le
  courrier  est envoye uniquement via UUCP. mysmarthost est le nom de la
  machine de mon FAI tel qu'il est configure dans le fichier uucp sys et
  me.com  est  le  nom de machine que nous utilisons ou sous lequel nous
  sommes connus dans les enregistrements MX sur  Internet.   mysmarthost
  est connecte a Internet. Nous nous moquons vraiment de savoir comment,
  nous savons juste qu'elle sait comment nous y conduire.  me.com,  dont
  la configuration que nous decrivons dans l'exemple, alimente les sites
  down.com et system1.org et leurs sous-noeuds.  me.com  se  connecte  a
  down.com  via  TCP/IP  et  se connecte a system1.org via une connexion
  UUCP directe  par  une  ligne  telephonique.   La  description  de  la
  configuration est indiquee ci-dessous :

          ------------------------
          |                       |
          |     Internet          |
          |                       |
          -----------------------
                      |
                      | Ligne dediee a PPP utilisant TCP-IP
                      |
                  -------------
                  |            |
                  |mysmarthost | Serveur de noms autoritaire pour
                  |            | *.me.com, *.down.com, *.system1.org
                  |            |
                  --------------
                      |
                      | UUCP par reception ligne telephonique pour
                      | system1.org, *.system1.org,*.down.com, down.com
                      | ainsi que me.com et *.me.com
                   ------------
                  | * *****  *  |
     ------------ | * me.com *  | ------
                  | *        *  |      |
     |            | * *****  *  |      |
     |             ------------        |
     |UUCP via ligne telephonique      | uucp via TCP/IP
     |                                 |
   -----------                  -----------
  |           |                |           |
  |system1.org|                | down.com  |-------
  |           |                |           |      |
   ----------                  ------------       |
       |                                          |
       |                                          |
       |                                          |
       | LAN_: smtp vers le noeud            | UUCP ligne telephonique
       |                                          |
  -----------------                             ----------------
  |               |                             |              |
  |Sous-noeuds de |                             | Reseau local |
  |de system1     |                             | de down      |
  |               |                             ----------------
  -----------------

  Prerequis

  1)  Si vous avez deja un DNS qui marche ou avez un pointeur sur un DNS
  (dans votre /etc/resolv.conf) et avez une connexion directe au  reseau
  alors  passez  cette partie. Vous etes sauf. Vous n'avez pas de choses
  "intelligentes" a faire.

  2) Si vous etes sur une machine utilisant uucp pour le courrier  alors
  vous   n'avez   pas  vraiment  besoin  de  compiler  bind/resolv  dans
  sendmail ;

  Comment survivre a la  mise  sous  forme  canonique  sur  une  machine
  independante sans DNS

  22..11..  PPAARRTTIIEE II

  Si  vous  prenez  un sendmail pre-compile avec BIND dedans vous pouvez
  toujours y arriver (comme c'est le cas avec le sendmail de RedHat).

  a) Vous referer a ma solution pour ca basee sur le fichier  m4  decrit
  (mon  favori). Essayez d'utiliser cette option a moins que vous teniez
  a b) ou c) ci-dessous. OU

  b) Si vous me contactez je  pourrais  vous  fournir  une  version  non
  compilee avec BIND (8.8.5). Peut-etre que RedHat devrait considerer la
  fourniture de deux binaires sendmail (comme slackware) un avec BIND et
  l'autre sans BIND.  OU

  c)  La  solution  la  plus rapide pour avoir un sendmail sans bind est
  d'editer les lignes de src/conf.h ci-dessous comme je l'ai montre :

  # ifndef NAMED_BIND conf.h:#  define  NAMED_BIND  0  /*  use  Berkeley
  Internet Domain Server */

  22..22..  PPAARRTTIIEE IIII

  Sendmail  devrait cependant normallement insister a faire les requetes
  de noms pour resoudre la partie machine en  utilisant  gethostbyaddr()
  pour chaque mail qu'il envoie (meme si vous lui dites de ne pas mettre
  les noms sous forme canonique).

  a) utiliser une adresse IP  de  la  RFC1597  (10.0.0.0-10.255.255.255,
  172.16.0.0-172.31.255.255,     192.168.0.0-192.168.255.255)     Editez
  /etc/hosts et ajoutez ce qui suit comme exemple pour la machine myhost
  10.0.0.1 myhost.me.com myhost OU

  b)  Si  vous utilisez NIS (et NIS est compile dans sendmail comme cela
  semble etre le cas dans  la  RedHat.)  assurez  vous  que  le  fichier
  /etc/nsswitch.conf  contienne : hosts: files dns et dans /etc/hosts et
  ajoutez ce qui suit comme exemple pour la machine myhost  toujours  en
  utilisant l'adressage IP de la RFC1597 10.0.0.1 myhost.me.com myhost

  NOTE  :  Dans a) et dans b) ci-dessus il est vital que vous listiez le
  long (completement qualifie) dans le fichier /etc/hosts utilise.   i.e
  la  ligne doit etre 10.0.0.1 myhost.me.com et NON 10.0.0.1 myhost vous
  aurez aussi besoin de  definir  la  macro  sendmail  $j  pour  qu'elle
  contienne   myhost.me.com   ajoutez   ce  qui  suit  a  votre  fichier
  /etc/sendmail.cf apres qu'il ait ete genere  Dmyhost.me.com  (ou  vous
  pouvez  utiliser  MASQUERADE_AS(myhost.me.com) dans le fichier .mc ci-
  dessous)

  NOTE !!!!! myhost comme nom de domaine est donne a titre  d'exemple  ;
  vous  n'avez  pas  a l'utiliser tel quel. Choisissez-vous votre propre
  nom de machine si vous n'en avez pas deja un.

  2) Assurez-vous  que  vous  avez  makemap  et  qu'il  est  capable  de
  supporter hash et/ou le format plus commun dbm ou meme le format btree
  (La version RedHat ne supporte  pas  dbm).  Makemap  est  normallement
  distribue avec sendmail.

  22..33..  CCOONNFFIIGGUURRAATTIIOONN ((llee ffiicchhiieerr mmcc))

  I) creez votre fichier .mc avec votre editeur favori ; j'appellerai ce
  fichier my.mc

  a) Pas de DNS -- machine independante

  include(`../m4/cf.m4')
  VERSIONID(`me.com setup with uucp created by xxxx --no dns ')
  dnl OSTYPE(linux)
  FEATURE(nodns)dnl
  FEATURE(nocanonify)dnl
  FEATURE(always_add_domain)dnl
  FEATURE(mailertable, hash /etc/mailertable)dnl
  MAILER(local)dnl
  MAILER(smtp)dnl
  MAILER(uucp)
  define(`SMART_HOST', uucp-dom:mysmarthost)

  Dissequons ceci :

  include(`../m4/cf.m4') requiert l'inclusion de  la  macro  m4  qui  se
  trouve dans ../m4/cf.m4 afin de resoudre certaines choses.

  VERSIONID(`me.com  setup  with  uucp created by xxxx --no dns ') C'est
  utilise pour distinguer les differentes versions du  fichier  .cf  que
  vous pourriez finir par creer.

  OSTYPE(linux)  Ca  sert  a  definir/redefinir les choses specifiques a
  Linux. Il est prudent de l'avoir ici.

  FEATURE(nodns)dnl Cela veut dire que nous n'avons pas de  serveur  DNS
  (comme  nous  n'utilisons  uucp  que  pour le mail. Sendmail doit etre
  compile pour ne pas utiliser bind). C'est devenu obsolete. Je vais  le
  laisser ici juste au cas ou vous utiliseriez une version plus ancienne
  de sendmail.

  FEATURE(nocanonify)dnl Cela veut dire Ne passez pas les addresses a la
  regle  $[ ... ]$ pour la mise en forme canonique. Normallement si vous
  avez BIND  compile  dans  sendmail,  il  essayerait  et  developperait
  l'alias/l'adresse  IP en un nom canonique grace au DNS. Vous n'en avez
  pas besoin si tout ce que vous avez ne sont que  des  approvionnements
  par UUCP i.e. : vous avez une machine independante.

  FEATURE(always_add_domain)dnl Ceci ajoute le nom de domaine local meme
  au mail local. Ce n'est pas necessaire mais j'aime  bien  ;  Ce  n'est
  peut-etre  pas  prudent  dans  la  mesure  ou  les spammeurs, avec une
  configuration appropriee, peuvent  vous  embeter.   me.com  n'est  pas
  connecte au reseau via tcp/ip donc c'est sans danger.

  FEATURE(mailertable,     hash    /etc/mailertable)dnl    Le    fichier
  /etc/mailertable sera une base de donnee hashee ou nous allons stocker
  les informations de routage de certains sites. Si vous n'approvisionez
  personne vous n'en avez pas besoin. J'en  dirai  plus  la-dessus  plus
  tard.   Si   vous   vouliez   utiliser   le  format  dbm  vous  auriez
  FEATURE(mailertable, dbm /etc/mailertable)dnl Si vous vouliez utiliser
  le    format    btree    vous    auriez   FEATURE(mailertable,   btree
  /etc/mailertable)dnl

  MAILER(local)dnl MAILER(smtp)dnl MAILER(uucp) Ce sont les mailers  que
  nous utilisons.

  define(`SMART_HOST',  uucp-dom:mysmarthost)  Notre  smarthost est chez
  notre FAI, il est defini dans le fichier sys comme system mysmarthost.
  Tous les messages que nous ne pouvons pas traiter (i.e : ceux dont les
  domaines ou les mailers nous sont etrangers) seront  envoyes  a  notre
  smarthost/FAI qui s'en debrouillera. Notez que nous utilisons uucp-dom
  comme mailer  uucp.  Ce  mailer  particulier  utilise  des  regles  de
  reecritures de type smtp.

  b) Avec DNS

  include(`../m4/cf.m4')
  VERSIONID(`me.com setup with uucp created by xxxx --dns enabled')dnl
  OSTYPE(linux)
  FEATURE(always_add_domain)dnl
  FEATURE(mailertable, hash /etc/mailertable)dnl
  MAILER(local)dnl
  MAILER(smtp)dnl
  MAILER(uucp)
  define(`SMART_HOST', uucp-dom:mysmarthost)

  II) Creez votre fichier sendmail.cf

  a) Sauvegardez votre ancien fichier /etc/sendmail.cf
  b)  Remplacez  votre  fichier  sendmail.cf  avec le nouveau : m4 my.mc
  /etc/sendmail.cf
  c) Verifiez que le fichier sendmail.cf a ete correctement cree sur les
  bases de vos specifications.
  Les quelques problemes que j'ai eus sont : le mailer uucp-dom manquant
  C'etait parceque je n'avais pas mis le  mailer  smtp.  En  fait,  j'ai
  compris que c'est important de le mettre avant l'uucp.

  III) Creez votre fichier /etc/mailertable
  Si vous n'alimentez pas de sites uucp vous pouvez omettre cette etape.
  a)  creez/editez  le  fichier  /etc/mailertable  exemple  de   fichier
  /etc/mailertable :

  system1.org uucp-dom:system1
  down.com uucp-dom:down
  up.down.com  error: Host is unknown at me.com

  Cela  veut  dire  que  tout  ce  qui  est  adresse  a system1.org ou a
  *.system1.org et que nous recevons sera envoye a system1 en  utilisant
  uucp-dom  en  autres  termes  nous  faisons  le  routage  de mail pour
  *.system1.org; idem pour down.com et ses sous-noeuds sauf  en  ce  qui
  concerne  le  filtrage  additionnel ; nous renvoyons tout mail pour le
  sous-noeud de down up.down.com en utilisant le mailer error integre  a
  sendmail  avec  le  message  "Host  is  unknown  at  me.com" ; Tout ca
  parceque l'administrateur de down.com nous l'a demande. Pour  renvoyer
  les  sous-domaines  qui  nous sont inconnus nous utilisons la derniere
  ligne de mailertable (ce que sont nous les sous-noeuds par defaut).

  b) creez la base de donnees avec makemap

  si  vous   utilisez   hash   :   makemap   hash   /etc/mailertable   <
  /etc/mailertable  si  vous utilisez dbm : makemap dbm /etc/mailertable
  </etc/mailertable   si   vous   utilisez   btree   :   makemap   btree
  /etc/mailertable </etc/mailertable

  a faire a chaque fois que vous modifiez le fichier.

  IV) Redemarrez sendmail

  V)  Testez  sendmail  i)  sendmail  -bv  user@destination ii) utilisez
  sendmail -bt et entrez plusieurs adresses en utilisant  la  regle  3,0
  pour  voir ou elles arrivent et les differentes regles et cheminements
  "cf" pris.  Vous y etes !

  33..  AA ffaaiirree

  1) Ajouter des informations sur la mise en place du  systeme  down.com
  (afin  de  montrer  comment  prendre  en compte de ces noeuds smtp) 2)
  Ajouter des informations sur comment mettre en place  la  distribution
  de  news  via  UUCP (INN de preference). Cela necessitera peut-etre de
  changer le titre du document.

  sendmail address rewriting mini-HOWTO
  Thomas Roessler, roessler@guug.de
  v0.0, 6 May 1998

  Ce document dcrit brivement la mise en place du fichier de configu
  ration de sendmail pour un accs individuel  l'Internet via le rseau
  tlphonique commut.

  11..  IInnttrroodduuccttiioonn

  On suppose que votre accs  l'Internet repose sur le principe le plus
  couramment rencontr de nos jours : une connexion au rseau d'un
  fournisseur d'accs via une liaison PPP au dessus d'une liaison srie.
  Le courrier qui vous est destin est rcupr auprs d'un serveur POP
  ou IMAP tandis que le courrier sortant est transmis via SMTP. Comme
  vous ne possdez pas de nom de domaine, tout doit transiter par la
  _m__m_e adresse.


  On suppose vous avez dj install une version rcente du sendmail
  d'Eric Allman. A l'criture de ces lignes, la version courante est la
  8.8.8.  Elle devrait fonctionner sans problmes.


  Le texte fait parfois rfrence  certaines spcificits des
  distributions GNU/Linux de Debian. Les utilisateurs de systmes
  diffrents adapteront.


  Vrifiez que vous disposez bien des informations suivantes :


    Le nom du serveur de courrier de votre Fournisseur d'Accs Internet

    Votre adresse lectronique



  On attend de la configuration  venir :


  1. que l'envoi de courrier entre utilisateurs locaux soit possible,

  2. que le reste de l'Internet voit les adresses des utilisateurs
     telles qu'elles sont dfinies au niveau du FAI ( et non les
     adresses locales ! ).


  Pour atteindre cet objectif, on utilisera la fonctionnalit
  genericstable de sendmail.


  22..  FFiicchhiieerrss iimmpplliiqquuss

  On regroupe tous les fichiers de configuration de sendmail dans un
  rpertoire particulier sous /etc : /etc/mail. Sendmail s'attendant 
  les trouver en /etc, /etc/sendmail.cf sera un lien symbolique vers
  /etc/mail/sendmail.cf.


  On trouvera dans /etc/mail :

    aliases - des adresses supplmentaires

    genericsdomain - diverses informations sur la configuration du
     systme
    genericstable - rgles de traduction

    sendmail.cf - fichier de configuration de sendmail

    sendmail.mc - la matrice du sendmail.cf.

  Certains de ces fichiers s'accompagnent de fichiers .db contenant les
  bases de donnes haches que sendmail utilise directement.


  L'arborescence d'origine de sendmail est cense se trouver en
  /usr/lib/sendmail.cf ainsi que c'est le cas avec les distributions
  GNU/Linux Debian. Reportez vous  la documentation de votre
  distribution si celle-ci diffre.


  33..  CCoonnffiigguurraattiioonn ddee sseennddmmaaiill

  33..11..  LLee ffiicchhiieerr ddee ccoonnffiigguurraattiioonn pprriinncciippaall

  La configuration de Sendmail repose sur un ensemble de rgles assez
  complexes. Bien que cela puisse s'avrer trs puissant, il n'est pas
  courant de fabriquer ex-nihilo un sendmail.cf. Il faudrait de surcroit
  y passer pas mal de temps. Si vous tes motiv, lancez vous dans la
  lecture de la bible disponible chez O'Reilly.


  Au lieu de forger  la main les rgles, on utilise le pr-processeur
  de macros m4 pour fabriquer un fichier de configuration  partir des
  lments prts  l'emploi qui sont fournis avec sendmail.


  Jetons un oeil sur les premires lignes du sendmail.mc :


  ______________________________________________________________________
  include(/usr/lib/sendmail.cf/m4/cf.m4)
  VERSIONID(`sendmail.mc - roessler@guug.de')
  OSTYPE(debian)
  define(`ALIAS_FILE',`/etc/mail/aliases')
  ______________________________________________________________________



  Tout d'abord, on inclut cf.m4. Ce fichier m4 contient de nombreuses
  macros utiles pour la suite. Ne vous trompez pas dans les chemins
  d'accs.  Ceux que nous donnons ici correspondent typiquement  un
  systme GNU/Linux Debian. La macro OSTYPE positionne les valeurs par
  dfaut de certaines variables. Si vous n'utilisez pas une Debian,
  remplacez ici "debian" par "linux". ALIAS_FILE fournit  sendmail
  l'emplacement du fichier d'alias.


  Les lignes suivantes forcent l'utilisation des fonctionnalits
  genericstable et prcisent o trouver les fichiers ncessaires :

  ______________________________________________________________________
  FEATURE(masquerade_envelope)
  FEATURE(genericstable, `hash -o /etc/mail/genericstable')
  GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')
  ______________________________________________________________________


  masquerade_envelope rclame qu'une mise en forme du type en-tte soit
  applique  l'enveloppe des messages  expdier. Est concerne
  l'adresse vers laquelle les agents de transport extrieurs dirigeront
  leurs messages d'avertissement ou leurs avis d'checs. Les fichiers
  generics* seront dtaills plus loin.


  A prsent, on dfinit un hte intelligent ( "smart agent" ), c'est 
  dire une machine capable de grer le courrier sortant  notre place.
  Il ne s'agit pas ncessairement des serveurs POP ou IMAP de l'ISP. La
  hotline vous aidera le cas chant  dissiper les doutes.

  ______________________________________________________________________
  define(`SMART_HOST',`relai-de-sortie.mon.fournisseur')
  ______________________________________________________________________


  Remplacez _r_e_l_a_i_-_d_e_-_s_o_r_t_i_e_._m_o_n_._f_o_u_r_n_i_s_s_e_u_r par le nom complet ( FQDN )
  correspondant  votre fournisseur d'accs.


  Les deux dernires lignes incluent les dfinitions des "mailer" grce
  auxquels sendmail dtermine comment manipuler les diffrents types de
  courrier :

  ______________________________________________________________________
  MAILER(local)
  MAILER(smtp)
  ______________________________________________________________________




  Pour gnrer le fichier sendmail.cf  partir du sendmail.mc, excutez
  les commandes suivantes en tant qu'utilisateur root :

  ______________________________________________________________________
  # m4 sendmail.mc > _sendmail.cf
  # mv -f _sendmail.cf sendmail.cf
  ______________________________________________________________________


  Notez la technique qui consiste  enregistrer la sortie de m4 dans un
  fichier temporaire avant de l'installer au bon endroit. On vite ainsi
  que sendmail ne lise des fichiers de configuration incomplets !


  33..22..  MMooddiiffiiccaattiioonn ddeess aaddrreesssseess

  On commence par prciser  sendmail les adresses  considrer comme
  locales. Pas de difficults : rentrez le nom complet de votre machine
  dans le fichier /etc/mail/genericsdomain. Pour obtenir ce nom,
  excutez la commande suivante :

  ______________________________________________________________________
   $ hostname -f
  ______________________________________________________________________




  Passons aux rgles de recriture proprement dites :
  /etc/mail/genericstable. Ce fichier est form de deux colonnes
  spares par des blancs. La premire contient les adresses locales et
  la seconde les adresses lectroniques qui doivent tre employes  la
  place.  Le fichier devrait ressembler  a :



  ______________________________________________________________________
  harry   harryx@mon.fai
  maude   maudey@son.fai
  root    francois@mon.fai
  news    francois@mon.fai
  ______________________________________________________________________



  Il devrait y avoir une entre pour _c_h_a_q_u_e compte sur la machine isole
  de faon  ce que le courrier sortant du systme comporte des
  informations d'en-tte correctes.


  Afin d'amliorer les performances, sendmail n'utilise pas directement
  ce fichier mais une version hache. Pour la crer, excutez la
  commande suivante :


  ______________________________________________________________________
  # makemap -r hash genericstable.db < genericstable
  ______________________________________________________________________




  Notez que les rgles issues de genericstable ne s'appliquent _p_a_s au
  courrier local ni  celui que vous recevez de l'extrieur. La
  traduction n'a lieu que si un message est transmis au relai de votre
  FAI.


  33..33..  AAlliiaass

  Le fichier d'alias contient des adresses supplmentaires qui ne sont
  valables que pour les messages locaux. Ceci s'avre utile pour les
  comptes de maintenance tels root qui reoivent des messages crs
  automatiquement par le systme d'exploitation.


  Le point de dpart d'un /etc/mail/aliases pourrait ressembler  a :


  ______________________________________________________________________
  root: francois
  news: root
  postmaster: root
  mail: root
  www: root

  nobody: /dev/null
  MAILER-DAEMON: nobody
  ______________________________________________________________________



  Dans l'exemple ci-dessus, le courrier  destination des utilisateurs
  root, news, postmaster, mail, et www sont renvoys vers francois,
  tandis que ceux pour nobody et MAILER-DAEMON seront redirigs vers le
  /dev/null.


  De mme que le genericstable, le fichier aliases peut contenir
  _b_e_a_u_c_o_u_p de donnes. Comme il serait inefficace que sendmail utilise
  le fichier texte tel quel, le mcanisme employ pour le genericstable
  s'applique encore : on gnre une base de donnes hache. Au lieu de
  la commande makemap, rentrez cette fois la commande newaliases. Tout
  fonctionne automagiquement.


  44..  RRffrreenncceess

  Les sources de sendmail sont fournies avec une documentation
  abondante.  Lisez la donc, et tudiez plus particulirement le fichier
  /cf/README.


  Si vous souhaitez explorer davantage les options de configuration de
  sendmail, procurez vous la rfrence en la matire par Bryan Costales,
  Eric Allman et Neil Rickert : "Sendmail" ( O'Reilly, 1993 ).




















































  Le probleme du signal 11
  Rogier             Wolff             (R.E.Wolff@BitWizard.nl
  <mailto:R.E.Wolff@BitWizard.nl>)
  (traduit   par    Nat    Makarevitch    nat@linux-france.com
  <mailto:nat@linux-france.com>)
  Version 19970716fr

  Cette FAQ dresse liste des causes possibles d'un probleme que connais-
  sent ces derniers temps certains utilisateurs de Linux :  la  compila-
  tion d'un important ensemble logiciel (-- (par exemple le noyau)--)

  echoue  a  cause  d'un  _s_i_g_n_a_l _1_1.  Ce probleme peut etre cause par un
  dysfonctionnement d'ordre materiel (cas le plus  frequemment  observe)
  ou logiciel.

  11..  AA pprrooppooss ddee ccee ddooccuummeenntt

  La  version  originale <http://www.bitwizard.nl/sig11/> de ce document
  est a present integree a la collection des "Mini-Howto" de Linux.
  La version publiee sur le Web etait consultee 300 fois par semaine  en
  juin 1996 (augmentation : facteur 3 en 3 mois).

  La  plus  recente version de ce texte, librement utilisable s'il n'est
  pas   modifie,   sur   trouve    sur    son    site    de    reference
  <URL:http://www.linux-france.com/> <http://www.linux-france.com/>

  Tout  commentaire  et  compte-rendu  d'experience  interesse  l'auteur
  (Rogier                 Wolff                 <R.E.Wolff@BitWizard.nl>
  <mailto:R.E.Wolff@BitWizard.nl>)   mais   les   suggestions   d'ajouts
  techniquement sans valeur seront rejetees.
  Expedier  a  nat@linux-france.com  <mailto:nat@linux-france.com>   les
  commentaires concernant cette adaptation francaise.

  Note  : le probleme detaille ici concerne aussi les autres systemes un
  tant  soit  peu  exigeants  :  Windows  3.1,  FreeBSD,   Windows   NT,
  NextStep...

  Cette adaptation francaise doit beaucoup a J. Chion.

  22..  QQuueessttiioonn ccllee

  Voici la question-cle traitee par ce document :

  Lorsque je compile un noyau Linux la procedure avorte avec un message:
        gcc: Internal compiler error: program cc1 got fatal signal 11
  Que se passe-t-il ?

  22..11..  RReeppoonnssee ssuucccciinnccttee

  Le  probleme  est  vraisemblablement cause par un dysfonctionnement du
  materiel.  De  nombreux  composants  de  l'ordinateur   peuvent   etre
  impliques et diverses manieres de resoudre le probleme existent.

  33..  CCoommmmeenntt ss''aassssuurreerr qquuee llee mmaatteerriieell eesstt eenn ccaauussee ??

  Sitot apres l'echec du make, invoquez-le a nouveau.

  Si  la  machine  parvient  a  compiler  quelques autres fichiers, nous
  pouvons penser que le materiel est defaillant.

  Si, par contre, la compilation cesse tout de suite  (message  "nothing
  to  be  done  for xxxx" avant nouvel echec au meme endroit), il faudra
  determiner si  le  contenu  de  la  memoire  vive  est  toujours  bien
  preserve. Pour cela :

          dd if=/dev/DISQUE_DUR of=/dev/null bs=1024k count=MEGAS

  _D_I_S_Q_U_E___D_U_R  remplace  ici  le nom du fichier special associe au disque
  dur stockant les sources. Pour  connaitre  son  nom,  rester  dans  le
  repertoire  abritant  les sources et introduire df  . ("df" suivi d'un
  espace puis un point).
  _M_E_G_A_S remplace ici le nombre de Mo de memoire  vive  dont  la  machine
  dispose (indique par free).

  Cette  commande  va  obliger  Linux a lire les informations placees au
  debut du disque  de  facon  a  "gaver"  le  contenu  du  cache  disque
  ("buffer-cache").  Il  devra  donc,  par la suite, relire les fichiers
  source a compiler ainsi que les binaires de gcc.

  Invoquer make.

  Si la compilation echoue toujours au meme "endroit", le  probleme  est
  probablement  d'ordre logiciel. Etudier en ce cas la section consacree
  aux ``autres causes possibles''.

  Si la compilation echoue a un autre stade, nous pouvons  conclure  que
  les  transferts  de donnees entre le disque et la memoire vive ne sont
  pas assures correctement.

  44..  QQuuee ssiiggnniiffiiee ccee ""ssiiggnnaall 1111"" ??

  Linux avorte grace au "signal 11" tout programme tentant  d'acceder  a
  une  adresse  memoire  ne  lui  appartenant  pas. Parmi les nombreuses
  causes possibles, nous ne  pouvons  retenir  dans  l'absolu  que  deux
  possibilites,  dans  le cas ou cela concerne une version stable de gcc
  utilisee sur une machine tres commune  :  probleme  materiel  ou  bien
  inadequation  de  certaines  composantes  des utilitaires logiciels du
  systeme.

  Lorsque ce probleme survient sur une machine sans defaut materiel,  il
  ne  peut  etre  cause  que  par  une  erreur  de  programmation  ou de
  compilation (en l'occurrence du  binaire  de  gcc).  Mais  lorsque  le
  materiel  est  defaillant, et que des valeurs stockees en memoire vive
  changent plus ou moins aleatoirement, un programme  exigeant  tel  que
  gcc  ne parviendra pas a mener a bien sa mission car il tentera tot ou
  tard de dereferencer un pointeur au contenu ainsi modifie.

  Un pointeur, sur une machine a processeur Intel, s'etend sur  32  bits
  et  permet  donc  d'acceder  a  4  Go. Peu de machines Intel disposent
  d'autant de memoire vive dont la majeure partie serait allouee a gcc !
  Une  adresse  de 32 bits aleatoire est donc tres probablement illegale
  et Linux tuera le  programme  qui  tente  avec  elle,  selon  lui,  de
  manipuler des donnees ne lui appartenant pas.

  55..  QQuueell ccoommppoossaanntt iinnccrriimmiinneerr ??

  Voici une liste des diverses causes de dysfonctionnement du materiel :

  +o  Composants trop lents.  De mauvaises surprises sont a  craindre  si
     l'une   des   "barrettes"   de   memoire  vive  ne  fonctionne  pas
     convenablement.  Meme une carte mere capable de controler par  test
     de  parite  ne  detectera pas les erreurs survenant lors des cycles
     d'ecriture.

     Inventaire des causes et solutions :

  +o  Latence des composants trop importante ("memoire trop lente")
     Le controleur de bus ne parvient pas toujours en ce cas a obtenir a
     temps  la  donnee requise par le processeur car la memoire "reagit"
     trop lentement. Solution :augmenter le nombre de  cycles  d'attente
     ("wait states") grace au SETUP de la machine. Probleme frequent sur
     les machines 486 cadence a plus de 80 MHz  equipees  d'un  BIOS  de
     marque AMI. (Pat V.)
     Il est parfois necessaire de remplacer les composants pour diminuer
     la latence. Les systemes ayant un  bus  cadence  a  33  MHz  (P100,
     P133...)  ne  doivent  pas  employer  de  RAM  avec plus de 60ns de
     latence, surtout si la carte mere est de  marque  ASUS.  L'ensemble
     peut sembler fonctionner avec des composants a 70ns mais une petite
     erreur est alors toujours possible (Andrew Eskilsson).

  +o  Composant defecteux
     Demonter une barrette (ou changer temporairement la seule  barrette
     employee) puis relancer le systeme et tester. Recommencer autant de
     fois  que  necessaire  afin  d'isoler  le  (ou  les  !)  composants
     defectueux.  Prendre garde, le cas echeant, lors de la manipulation
     des memoires statiques, car  une  decharge  _d_'_e_l_e_c_t_r_i_c_i_t_e  _s_t_a_t_i_q_u_e
     peut les _c_o_n_d_a_m_n_e_r.

     Temoignage  (kettner@cat.et.tudelft.nl)  :  nous  avons  eprouve de
     grandes difficultes avec une machine dont il s'avera que les quatre
     barrettes etaient defectueuses et modifiaient a peu pres un bit par
     heure de fonctionnement. La machine "plantait" environ une fois par
     jour  et  les compilations de noyau echouaient environ une fois par
     heure. Cette machine a pu executer  le  test  memoire  durant  2300
     cycles  complets  sans  erreur,  puis detecta environ 10 erreurs et
     continua  ensuite  sans  probleme  durant  plusieurs  centaines  de
     cycles.  La  compilation  de noyau s'avera le test le plus efficace
     car meme le cas le plus favorable ne  permettait  pas  de  compiler
     plus  de  14  noyaux  a  la  suite.  Nous  avons  donc  echange ces
     barrettes.

  +o  Convertisseurs defectueux
     De  nombreux  supports  de  memoire,  permettant  de   monter   des
     composants  32  bits sur des supports 72 points, ne sont pas concus
     de facon correcte, en particulier les plus anciens.

     Temoignages : nous avons tres longtemps utilise  sans  probleme  un
     jeu  de  composants sans support de ce type. Mais ils ne furent pas
     utilisables    avec     un     convertisseur     (Naresh     Sharma
     (n.sharma@is.twi.tudelft.nl)).

     Paul   Gortmaker   (paul.gortmaker@anu.edu.au)   indique   que  les
     convertisseurs doivent tous comporter au moins quatre condensateurs
     de regulation du courant.

  +o  Mode de rafraichissement de la memoire vive inadequat
     Les  composants  "perdent"  alors  peu  a peu les donnees stockees.
     Causes    (Hank    Barta    (hank@pswin.chi.il.us),    Ron    Tapia
     (tapia@nmia.com))  : certaines cartes mere donnent la possiblite de
     rarefier les cycles de rafraichissement en vue d'augmenter la bande
     passante  utile  du  bus  (option  "hidden  refresh"  du SETUP). Un
     programme, souvent appele dram, offre le moyen de configurer le jeu
     de  composants  ("chipset")  au  plus bas niveau afin d'obtenir des
     effets semblables.

  +o  Trop faible nombre de cycles d'attente
     Certains composants de la carte mere  peuvent  ne  pas  fonctionner
     toujours  correctement  si  le  nombre  de  cycles d'attente ("wait
     states") n'est pas approprie. L'augmenter grace au SETUP.

  +o  Defaillance de la memoire cache
     Le contenu de la memoire cache n'est generalement pas certifie  par
     un test de parite et une defaillance ne sera donc pas diagnostiquee
     par la carte mere. Test : utiliser le SETUP pour invalider le cache
     externe  ("L2") puis faire fonctionner le systeme. Si les problemes
     disparaissent le cache est defectueux. Solutions :

  +o  Vitesse ou latence de la memoire cache inadequate.
     Augmenter, grace au SETUP, le nombre de cycles d'attente.

  +o  Composant de memoire defecteux
     Il faut alors changer de composant cache.  _A_T_T_E_N_T_I_O_N  :  il  s'agit
     tres  souvent de memoire statique, donc _t_r_e_s fragile (Joseph Barone
     (barone@mntr02.psf.ge.com)).

  +o  Mode d'exploitation du cache inadequat
     Le mode "ecriture differee"  ("write  back"),  par  exemple,  cause
     parfois des problemes lorsque le jeu de composants de la carte mere
     n'est pas correctement concu (cas  observe  sur  une  carte  "MV020
     486VL3H" (20 Mo RAM) par Scott Brumbaugh).

  +o  Configuration incorrecte de la carte mere
     Un  cavalier ("jumper") determine parfois le cache qui sera employe
     (le modele monte sur  une  micro  carte  d'extension  ou  bien  les
     composants  de memoire classiques). Exemple : cavalier JP16 sur les
     ASUS P/I-P55TP4XE version 2.4.

  +o  Transferts de donnees entre disque et memoire
     Un bloc de donnees lu sur le  disque  peut  se  trouver  stocke  en
     memoire avec un bit errone.
     Determiner  si c'est la cause du probleme en recopiant des fichiers
     puis en comparant la copie a l'original. Repeter ce test : apres un
     dd  (consulter a ce propos la section consacree a l'``expiration du
     buffer cache'') la compilation avortera tres vraisemblablement a un
     autre stade.

  +o  Interruptions masquees durant des transferts IDE
     Certains   disques   IDE   ne   tolerent   pas  le  demasquage  des
     interruptions lors des transferts, en  particulier  en  periode  de
     forte charge systeme ("hdparm -u0").

  +o  Disque de marque Kalok
     La  qualite  des  disques  Kalok de la serie 31xx laisse beaucoup a
     desirer, mieux vaut eviter de les employer. Ils ne sont  de  toutes
     facons  pas  compatibles  avec  Linux.  Les reformer ou laisser aux
     utilisateurs de systemes d'exploitation sans cache disque.

  +o  Disques SCSI
     Verifier terminateurs et  cables.   Un  cable  court  peut  sembler
     fonctionner  avec  une  terminaison  inadequate  mais  les  donnees
     transferees peuvent en patir. Essayer de  valider  les  options  de
     test de parite.

  +o  Augmentation abusive de la cadence d'horloge ("overclocking")
     Le  resultat  est le plus souvent aleatoire. Essayer d'exploiter la
     machine a la cadence d'horloge normale.

     Dans un  cas  au  moins  (Samuel  Ramac  (sramac@vnet.ibm.com))  un
     processeur  P120  ne  tolerait  pas 120 MHz mais fonctionnait a 100
     MHz. La carte mere n'etait pas en cause car le bus est en fait plus
     rapide  lorsque l'horloge bat a 100 MHz (-- CPU a 120 : bus a 60 (x
     2), CPU a 100 : bus a 66 (x 1,33)--) . Un  autre  processeur  P120,
     monte en lieu et place, fonctionne d'ailleurs normalement.
     Tous les "fondeurs" (constructeurs de processeurs) produisent ainsi
     de rares "rates", ce n'est en rien specifique a Intel.

  +o  Refroidissement du processeur
     L'elevation de la  temperature  du  processeur  provoquee  par  une
     augmentation de la cadence d'horloge ou par une panne du dispositif
     de  refroidissement  peut  generer  des   dysfonctionnements.   Bon
     revelateur : interdire au noyau d'utiliser l'instruction HALT grace
     au  parametre  LILO  adequat  (lire  le  "BootPrompt  HOWTO").   La
     temperature  du  circuit  augmentera alors beaucoup plus vite, meme
     sous faible  charge  systeme,  et  la  frequence  d'apparition  des
     problemes  augmentera. Le Pentium a l'instruction "FDIV" boguee est
     particulierement concerne car son ventilateur n'etait pas concu  au
     mieux.   Notons  aussi  que  la  colle  employee  pour assujetir le
     radiateur au processeur  doit  presenter  des  caracteristiques  de
     conduction  thermique  correcte  (Arno Griffioen (arno@ixe.net), W.
     Paul Mills (wpmills@midusa.net), Alan Wind (wind@imada.ou.dk))

     Intel indique que la temperature de la surface du  processeur  doit
     etre comprise entre :

  +o  0 et +85 C: Intel486 SX, Intel486 DX, IntelDX2, IntelDX4

  +o  0 et +95 C: IntelDX2, IntelDX4 OverDrive

  +o  0 et +80 C: 60 MHz Pentium

  +o  0 et +70 C: 66 to 166 MHz Pentium

     Consulter  a  ce  propos  les sections Q6, Q7 et Q13 de ce document
     Intel <http://pentium.intel.com/procs/support/faqs/iarcfaq.htm>

  +o  Voltage de l'alimentation du processeur
     Certains processeurs 5 Volts fonctionnent sous 3,3 Volts, mais  pas
     toujours  de  facon  parfaite. Pis : les documentations de certains
     systemes  sont  incorrectes  et  recommandent   une   configuration
     inadequate (Karl Heyes (krheyes@comp.brad.ac.uk))

  +o  Voltage de l'alimentation de la memoire
     Les  plus  recentes cartes ne tolerent que la memoire 3,3 Volts. Ne
     jamais utiliser les composants sous un voltage inadequat (risque de
     destruction).

  +o  Surexploitation du bus local
     Le  nombre  de  cartes  connectables a un bus local decroit avec sa
     frequence d'exploitation : 3 cartes a 25 MHz, 2 a 33 MHz, une seule
     a 40 MHz et aucune a 50 MHz (frequence maximale). Certains systemes
     tolerent mal la surcharge et les donnees echangees peuvent alors en
     patir.  Essayer  d'augmenter  les etats d'attente inseres entre les
     cycles du bus local (Richard Postgate (postgate@cafe.net)).

  +o  Fonctions d'economie d'energie ("power management", "APM")
     Certains portables, en particulier, offrent une fonction de reprise
     immediate (mode "resume") et des programmes pilotes ne tolerent pas
     toujours cela. Debrayer  ces  fonctions  ou  bien  compiler  l'"APM
     support" dans le noyau (Elizabeth Ayer (eca23@cam.ac.uk)).

  +o  Processeur defectueux
     Certains  exemplaires  des processeurs courants recelent des bogues
     aux effets pervers. Aucune solution n'existe, il faut remplacer  le
     composant.   Des  cas  d'incompatibilite  entre processeur et carte
     mere auraient ete observes. Depuis fevrier 1997 la  premiere  vague
     de   problemes,  qui  concernait  les  processeurs  Intel,  decroit
     nettement tandis que l'exploitation de processeurs  Cyrix/IBM  6x86
     sur certaines cartes mere s'avere difficile.  Le manuel d'une carte
     mere precise qu'elle est incompatible avec les  premieres  versions
     du  6x86. C'est regrettable car les performances de ces processeurs
     sont fort bonnes.

  66..  MMaaiiss ttoouutt ffoonnccttiioonnnnaaiitt ccoorrrreecctteemmeenntt ddeeppuuiiss lloonnggtteemmppss !!

  Le fait que la configuration  deficiente  fonctionnait  sans  probleme
  depuis  un  moment  n'implique malheureusement pas que le materiel est
  hors de cause.

  L'exemple  classique  concerne  les  composants  de   memoire.   Leurs
  fabricants  ne  disposent pas d'une ligne de production distincte pour
  chaque type de  memoire.  Les  circuits  proviennent  tous  des  memes
  machines  et  matieres  premieres,  seul le test final determine si un
  composant donne sera par exemple vendu en tant que 60 ns  ou  bien  70
  ns.   Vos  composants  fonctionnaient  peut-etre  a  merveille  depuis
  longtemps a la limite de leurs capacites mais  un  facteur  quelconque
  (la  temperature,  par exemple, ralentit les memoires) peut les rendre
  assez vite inadequats.

  Un climat estival ou bien une  lourde  charge  de  travail  processeur
  place   donc   parfois   le   systeme   dans  des  conditions  ou  son
  fonctionnement  correct  n'est  plus  certain,  voire  plus   possible
  (Philippe Troin (ptroin@compass-da.com)).

  77..  MMoonn pprrooggrraammmmee ddee tteesstt mmeemmooiirree nnee rreevveellee aauuccuunn pprroobblleemmee

  Le  test  memoire effectue par le BIOS lors du demarrage de la machine
  n'en est  le  plus  souvent  pas  un.  Des  conditions  d'exploitation
  extremes  peuvent  seules  permettre de lever le doute. Tester grace a
  memtest86.

  88..  LLee pprroobblleemmee eesstt--iill lliimmiittee aa llaa ccoommppiillaattiioonn dduu nnooyyaauu ??

  Non, mais la compilation du noyau  exige  beaucoup  de  ressources  et
  constitue donc un excellent test ou revelateur.

  Autres cas observes :

  +o  Certaines  machines  se  bloquent parfois lorsqu'elles executent le
     script    d'installation    de    la     distribution     Slackware
     (dhn@pluto.njcc.com).

  +o  Le noyau stoppe parfois une tache a cause d'une "general protection
     error" (message confie a syslog) (fox@graphics.cs.nyu.edu).

  99..  mmaacchhiinnee !!  DD''aauuttrreess ssyysstteemmeess dd''eexxppllooiittaattiioonn ffoonnccttiioonnnneenntt  ppoouurrttaanntt
  bbiieenn ssuurr cceettttee

  Linux exploite mieux le materiel que la plupart des  autres  systemes,
  comme ses performances le laissent imaginer.

  Certains  autres  systemes,  par  exemple  edites  par  Microsoft,  se
  "plantent parfois" de facon incomprehensible. Peu d'utilisateurs  s'en
  plaignent,    semble-t-il,    et    cette    societe    leur    repond
  <http://www.cantrip.org/nobugs.html> en ce cas d'une  maniere  quelque
  peu etrange.

  Le  mode de conception et d'utilisation de ces systemes d'exploitation
  produit un ensemble le plus souvent plus "predictible" que Linux  dans
  la  mesure ou une application donnee sera le plus souvent chargee dans
  la meme section de la memoire vive.  Les  aleas  dus  a  un  composant
  defectueux  sont donc parfois portes au compte d'un programme donne et
  non du materiel.

  Une chose demeure cependant certaine : un systeme Linux bien  installe
  sur  une  machine  saine  doit  pouvoir compiler cent fois de suite un
  noyau sans aucun probleme.

  Temoignage : Linux et gcc testent a  merveille  la  machine.  Hors  de
  Linux  le  test  "Winstone"  produit  le meme genre d'effets (Jonathan
  Bright (bright@informix.com))

  1100..  ssiiggnnaall 1111"" eesstt--iill llee sseeuull eeffffeett ??

  Ce n'est malheureusement pas le cas. Les signaux 6 et 4 peuvent  aussi
  relever  de  ce  genre de probleme (lorsque la memoire n'accomplit pas
  correctement son office n'importe quel type  d'erreur  peut  survenir)
  mais le 11 est le plus commun.

  Autres problemes constates :

  +o  free_one_pmd: bad directory entry 00000008

  +o  EXT2-fs warning (device X:Y): ext_2_free_blocks bit already cleared
     for block Z

  +o  Internal error: bad swap device

  +o  Trying to free nonexistent swap-page

  +o  kfree of non-kmalloced memory ...

  +o  scsi0: REQ before WAIT DISCONNECT IID

  +o  Unable to handle kernel NULL pointer dereference at virtual address
     c0000004

  +o  put_page: page already exists 00000046 invalid operand: 0000

  +o  Whee.. inode changed from under us. Tell Linus

  +o  crc error    System halted  (lors du demarrage)

  +o  Segmentation fault

  +o  "unable to resolve symbol"

  +o  make 1: *** ... Error 139 make: *** ... Error 1

  +o  X Window avorte brusquement avec un mesage

  Les  premiers  exemples  relevent  d'arrets provoques par le noyau qui
  "suspecte"  une  erreur  de  programmation  l'affectant.   Les  autres
  concernent les applications.

  (S.G.de      Marinis      (trance@interseg.it),     Dirk     Nachtmann
  (nachtman@kogs.informatik.uni-hamburg.de))

  1111..  QQuuee ffaaiirree ??

  +o  Demonter des barrettes, les remplacer

  +o  Debrayer (SETUP) le cache de second niveau du processeur

  +o  Diminuer la cadence du processeur et du bus

  +o  Restaurer la cadence de rafraichissement de la memoire preconisee

  +o  Demarrer avec un noyau sous  option  "mem=4M"  pour  lui  interdire
     d'exploiter la memoire au-dessus des 4 premiers Mo

  +o  Tester :

           tcsh
           cd /usr/src/linux
           make zImage
           foreach i (0 1 2 3 4 5 6 7 8 9)
             foreach j (0 1 2 3 4 5 6 7 8 9)
               make clean;make zImage > log."$i"$j
             end
           end

  Tous  les contenus des fichiers de trace resultants doivent etre iden-
  tiques.  Cela exige environ 24 heures sur un P100 / 16 Mo RAM et envi-
  ron 3 mois sur un 386 / 4 Mo :-)

  Le  moyen  le  plus efficace reste de remplacer tous les composants de
  memoire. Ce n'est cependant pas toujours facile.

  1122..  EEtt llee tteesstt pphhyyssiiqquuee ??

  Meme certains  equipements  electroniques  de  test  des  memoires  ne
  mettent  pas toujours en evidence les problemes dont nous traitons ici
  car ils peuvent  par  exemple  dependre  du  mode  d'exploitation  des
  composants par la carte mere.

  1133..  QQuueelllleess ssoonntt lleess aauuttrreess ccaauusseess ppoossssiibblleess ??

  +o  pgcc
     Utilisation de la version de gcc "pgcc", dont le generateur de code
     est optimise pour le Pentium. La compilation, avec ses options  par
     defaut, de certains modules du noyau (par exemple floppy.c) produit
     un signal 11. Les causes se trouvent a la fois dans  le  noyau,  la
     libc  et  pgcc.  On constate vite qu'il ne s'agit pas d'un probleme
     materiel  car  il  se  produit  toujours  au  meme  stade   de   la
     compilation.
     Solution : utiliser un gcc standard ou bien des options interdisant
     certaines optimisations  (par  exemple  "-fno-unroll-loops")  (Evan
     Cheng (evan@top.cis.syr.edu)).

  +o  Composants de gcc heteroclites
     Lorsque  les  fichiers  appartenant  a  gcc  proviennent de sources
     differentes des problemes peuvent appraitre.  Il  faut  alors  tout
     remplacer par une version complete et correcte (Richard H. Derr III
     (rhd@Mars.mcs.com)).

  +o  Edition de liens avec bibliotheque pour SCO
     Sous iBCS  les applications dont le LDFLAGS  contient  -Llib/  sont
     exposees.

  +o  a.out et ELF
     Compilation  d'un noyau a.out au sein d'un environnement ELF (ou le
     contraire).. Le premier appel a "ld" causera  toujours  un  "signal
     11"(REW).

  +o  Carte Ethernet ISA sur bus PCI mal configure
     Cela  peut  causer de graves problemes logiciels (sigsegv, arret du
     noyau...).  Il  faut  alors  utiliser  le  SETUP  pour   configurer
     l'"aperture"  (zone  de  memoire  commune  a la carte et a l'espace
     d'adressage du systeme).

  +o  Contenu de la partition de memoire virtuelle ("swap") endommage
     Tony Nugent (T.Nugent@sct.gu.edu.au) precise qu'il a pu resoudre le
     probleme en re-preparant la partition grace a "mkswap".
     Louis  J. LaBash Jr. (lou@minuet.siue.edu) nous rappelle qu'il faut
     invoquer "sync" apres un "mkswap".
  +o  Cartes Ethernet bas de gamme de type NE2000
     La qualite de certaines cartes est si mediocre qu'elles mettent  en
     peril  la  stabilite  du  systeme.  Les  noyaux Linux posterieurs a
     1.3.48 les tolerent semble-t-il mieux (REW).

  +o  Alimentation electrique
     Cas peu probable, meme une machine  tres  bien  equipee  n'approche
     guere  les  limites  des  alimentations  200  W.  Seul  un  systeme
     utilisant  de  nombreux  anciens  disques  (gros  consommateurs  de
     courant)     peut     poser    un    probleme    (Greg    Nicholson
     (greg@job.cba.ua.edu)).
     Thorsten Kuehnemann (thorsten@actis.de) indique qu'une alimentation
     defectueuse peut provoquer des signaux 11.

  +o  Compilation du code ext2
     Dans  certains  cas la compilation du code de gestion du systeme de
     fichiers   ext2   provoque   un   signal   11   (Morten    Welinder
     (terra@diku.dk)).

  +o  Memoire disponible insuffisante
     gcc    produit    alors    d'etranges    erreurs    (Paul   Brannan
     (brannanp@musc.edu)).

  1144..  CCeettttee lliissttee mmee llaaiissssee sscceeppttiiqquuee !!

  Nous ne traitons ici que de cas rreeeellss !!
  (N.d.T : la version originale <http://www.bitwizard.nl/sig11/>  de  ce
  document propose une liste des auteurs de temoignages).

  Mini-HOWTO SLIP+ProxyARP
  Dave Kennedy davek@melita.com
  v1.2 04/02/1994

  Ce  document  montre comment utiliser SLIP et Proxy ARP pour relier un
  reseau local Ethernet a un autre reseau connecte a Internet.   Adapta-
  tion  francaise  realisee par Nicolas Lejeune (nl@freenix.fr), fevrier
  1996.

  11..  IInnttrroodduuccttiioonn

  En deux mots, j'ai chez moi un petit  reseau  local  Ethernet  que  je
  souhaitais connecter a Internet. Comme je n'ai pas d'adresse de reseau
  personnelle, je voulais vampiriser l'adresse du reseau de mon  bureau.
  Je suis parvenu a mes fins en utilisant SLIP et proxy ARP. Ce document
  explique rapidement comment.

  22..  RReessuullttaatt

  Je vais d'abord presenter le resultat, puis comment l'atteindre.

  Le reseau final appartient a un reseau de classe C (a.b.c.0) :

                  Internet
                     |
             o-------+---------+----------------o     <- Ethernet distant
                               | .126
                           NetBlazer
                               | .215                 <- SLIP (par modem 14.4)
                              gw
                               | .253
             o-----------------+--------+-------o     <- Ethernet local
                                        | .254
                                       mus

  33..  IInnssttaallllaattiioonn

  La solution repose sur l'utilisation du routage et de Proxy ARP.

  Voici la table de routage de gw :

       Kernel routing table
       Destination     Gateway    Genmask         Flags Metric Ref    Use Iface
       a.b.c.254       *          255.255.255.255 UH    0      0     5628 eth0
       a.b.c.253       *          255.255.255.255 UH    0      0        0 eth0
       a.b.c.126       *          255.255.255.255 UH    0      0       22 sl0
       127.0.0.0       *          255.0.0.0       U     0      0       32 lo
       default         a.b.c.126  *               UG    0      0        9 sl0

  Cette table a ete creee grace aux commandes suivantes :

  1. La connexion SLIP a ete etablie, ce qui a cree une entree  pour  la
     passerelle par defaut ("gateway", NDT) et une autre pour a.b.c.126.

  2. ifconfig eth0 a.b.c.253

  3. route add a.b.c.253 eth0

  4. route add a.b.c.254 eth0

  Gw est desormais configure pour parler aussi bien  avec  eth0  qu'avec
  sl0  (ca pourrait etre le moment de signaler que mon noyau est compile
  avec l'option "IP forwarding"). Il est peut-etre inutile de  justifier
  la  route  explicite  vers  a.b.c.253,  mais,  sans elle, un ping .253
  depuis .253 sort par la liaison SLIP.

  Voici la table de routage de mus :

       Kernel routing table
       Destination     Gateway    Genmask         Flags MSS    Window Use Iface
       a.b.c.253       *          255.255.255.255 UH    1436   0       59 eth0
       127.0.0.0       *          255.0.0.0       U     1936   0       52 lo
       default         a.b.c.253  *               UG    1436   0    21661 eth0

  Cette table a ete creee grace aux commandes suivantes :

  1. ifconfig eth0 a.b.c.254

  2. route add a.b.c.253 eth0

  3. route add default gw 192.68.22.253

  A ce moment, j'ai essaye un ping vers NetBlazer. Je voyais sortir  les
  paquets  par  le  modem  (SD  clignotait),  mais  il  n'y avait pas de
  reponse. C'etait bon signe puisque cela montrait que gw  recevait  les
  paquets par eth0 (Ethernet) et les renvoyait par sl0 (SLIP).

  L'etape  suivante consistait a configurer l'autre cote de la connexion
  SLIP (NetBlazer) afin qu'elle me reconnaisse et sache  me  parler.  Ce
  fut le role de sa commande proxy arp.

           Usage: proxy <hostid> ether|token|<interface> <mac-addr>

           proxy a.b.c.253 ether 00:c0:6d:11:66:d3
           proxy a.b.c.254 ether 00:c0:6d:11:66:e4

  Je  pouvais  desormais  faire  un ping depuis mus vers Internet : tout
  allait pour le mieux. :)

  44..  NNooyyaauu eett llooggiicciieellss

  Le noyau utilise sur gw etait un  1.1.88  compile  avec  l'option  "IP
  Forwarding",  indispensable  ici.  Le  noyau de mus etait egalement un
  1.1.88 mais sans "IP Forwarding" (inutile).

  Il convient de remarquer que l'on aurait pu utiliser  PPP  aussi  bien
  que SLIP.

  55..  EEnn rreessuummee

  (paragraphe vide dans le texte original, NDT)

  66..  PPrroobblleemmeess eett qquueessttiioonnss eenn ssuussppeennss

  La  principale  question  s'est posee alors que je redigeais ce HOWTO.
  Quand j'ai verifie  la  table  ARP  sur  NetBlazer,  mes  entrees  ARP
  n'etaient  plus  la,  alors que, pourtant, tout marchait correctement.
  J'ai retape l'entree  associee  a  mus  et  ca  n'a  rien  change.  Si
  quelqu'un a une idee sur la question, qu'il m'en fasse part.

  77..  RReemmeerrcciieemmeennttss

  Mes  remerciements  a  John Garnett garnett@actlab.rtf.utexas.edu pour
  son message du 21 Dec 1994 "A Guide on Using SLIP with ProxyARP..." Je
  ne  suis  pas sur que mon document soit autre chose qu'un rechauffe de
  ce qu'il avait ecrit, si ce n'est que j'utilise un NetBlazer  du  cote
  d'Internet  et  que lui avait un modem connecte a un ordinateur.  Quoi
  qu'il en soit, merci, John !

  88..  DDooccuummeennttaattiioonn ccoommpplleemmeennttaaiirree

  +o  Dawson,              Terry              ;               NET-2-HOWTO
     <http://www.loria.fr/linux/HOWTOFRENCH/Net2-HOWTO/Net2-HOWTO.html>.

  +o  Garnett,    John;    A    (client)    SLIP    Guide    for    Linux
     <http://www.compbio.caltech.edu/~garnett/linux/slip/>.

  +o  De  nombreux  autres HOWTO (en particulier, le mini-HOWTO Proxy-ARP
     <http://www.loria.fr/linux/HOWTOFRENCH/mini/Proxy-ARP/Proxy-
     ARP.html>, NDT).

       | Dave Kennedy (davek@melita.com)                Voice: 404-409-4575 |
       | UUCP: emory!melupl!davek                       Whois: DK87         |

  Comment reduire la consommation memoire sous Linux.
  TToodddd BBuurrggeessss ((ttbbuurrggeessss@@uuoogguueellpphh..ccaa))
  _a_d_a_p_t_a_t_i_o_n _f_r_a_n_c_a_i_s_e _: David Cotton (dcotton@nat.fr)
  v0.1, derniere mise a jour le 21 mars 1998.

  L'objet de ce mini HowTo est de decrire comment utiliser Linux avec un
  systeme disposant de peu de memoire. En  considerant  que  l'achat  de
  plus  de memoire est hors de question, il existe de nombreux moyens de
  reduire la consommation de memoire sous Linux.  De nombreuses  distri-
  butions  Linux sont, telles qu'elles sont livrees, sont boulimiques du
  point de vue de la memoire. Elles lancent plus de services et  offrent
  plus  de  fonctionnalites  que  ce  dont  la plupart d'entre nous aura
  jamais besoin. En supprimant beaucoup  de  ces  services  vous  pouvez
  liberer  plusieurs  megas de veritable memoire. Mon propre systeme est
  un 486DX2-66  avec  12Mo  de  memoire  physique  et  12Mo  de  fichier
  d'echange.  Il  fait  tourner  Linux  avec  bonheur  depuis  les trois
  dernieres annees et, on peut l'esperer, il continuera a faire  tourner
  Linux pendant encore quelques annees. :)

  11..  LLee nnooyyaauu ddee LLiinnuuxx..

  Tous  les  noyaux  Linux  fournis  avec  les  distributions sont assez
  bouffis et contiennent plus de fonctions que ce qu'aucun d'entre  nous
  utilisera jamais.  Si vous n'avez pas recompile votre propre noyau, il
  est fortement recommande de le faire. Comment recompiler un noyau  est
  en dehors du domaine de ce document mais d'excellents livres et guides
  sur Linux couvrent ce sujet en details.

  Si vous recompilez votre noyau,  pensez  a  ne  pas  inclure  plus  de
  fonctions  que ce dont vous avez besoin. Par exemple : combien d'entre
  vous ont inclus le support de PLIP dans leur noyau ? Combien  de  ceux
  qui  l'ont  inclus  l'utilisent effectivement ? Les noyaux plus petits
  requierent moins de temps pour se charger, utilisent moins de  memoire
  et de cycles CPU.

  Autre possibilite : les modules. Je ne les utilise pas personnellement
  parce que je les trouve encombrants. Si vous les utilisez et les aimez
  alors ils peuvent aider a soulager "l'embonpoint du noyau".

  22..  LLeess ccoonnssoolleess vviirrttuueelllleess

  Les  consoles  virtuelles  sont  un merveilleux moyen de liberer de la
  memoire. La majorite  des  distributions  de  Linux  lance  environ  6
  consoles  par defaut. En moyenne l'execution de 6 consoles necessite a
  peu pres 4Mo de  memoire.  En  retirer  deux  ou  trois  peut  liberer
  quelques megas de memoire.

  La  plupart des utilisateurs peuvent demarrer en ne lancant que 3 ou 4
  consoles.  Combien vous choisirez d'en retirer  est  une  question  de
  preferences  personnelles.  Souvenez vous simplement que moins vous en
  executerez, plus vos applications auront de la memoire pour tourner.

  Le fichier qui indique combien de  consoles  virtuelles  doivent  etre
  lancees est /etc/inittab. Pour desactiver des consoles :

  1. Chargez /etc/inittab dans un editeur de texte.

  2. Recherchez  une  ligne  ressemblant a (le point cle etant une ligne
     commencant par c1) :

     c1:12345:respawn:/sbin/getty tty1 38400 linux

     Commencez par le nombre le plus eleve  (ici  c6)  et  commentez  la
     ligne en inserant un '#' a la premiere colonne. Repetez cette etape
     autant de fois que necessaire. Souvenez vous que chaque  ligne  que
     vous mettez en commentaire est une console virtuelle de moins.

  3. Relancez votre machine pour que les changements prennent effet.

  33..  LLeess ddeemmoonnss

  Beaucoup  de distributions de Linux lancent de nombreux demons dont la
  majorite d'entre nous n'aura jamais l'usage. La plupart de ces  demons
  se  charge  par des scripts. La localisation de ces scripts, ainsi que
  leur nom dependent de votre distribution  de  Linux.  Les  scripts  de
  demarrage de la Slackware sont regroupes dans /etc/rc.d/rc.* .

  Avant  de  poursuivre,  une connaissance de la programmation de shell-
  scripts Unix serait un avantage  certain.  Si  toutefois  vous  n'avez
  aucune  experience  dans  l'ecriture de scripts pour Unix, ce qui suit
  est probablement la plus courte introduction  a  la  programmation  de
  scripts jamais ecrite.

  Prenez le script suivant :

       #!/bin/sh
       echo "salut tout le monde"
       #echo "adieu monde cruel"

  Ce  script  va  afficher  la  chaine  "salut tout le monde". Les shell
  scripts doivent contenir la ligne "#!/bin/sh" en toute premiere ligne.
  Apres  cela  chaque ligne sera executee comme si vous l'aviez tapee au
  clavier (considerez les scripts comme rien d'autre que des  macros  du
  clavier ameliorees).

  Les  lignes  qui commencent par un '#' sont dites commentees car elles
  ne sont pas executees par  l'interpreteur  de  commande.  Beaucoup  de
  scripts de demarrage, quand ils chargent des demons, ressemblent a :

       if conditionquelconque
         do quelquechose
       fi

  Ce  que  vous  voulez  faire,  c'est  mettre en commentaire toutes les
  lignes allant de la marque if a la marque fi.

  Vouloir localiser ou un demon est charge c'est rechercher  le  nom  du
  demon  dans  les  scripts de demarrage. Si je voulais trouver ou inetd
  est charge dans la Slackware je ferais :

       cd /etc/rc.d
       grep -n inetd rc.*

  33..11..  iinneettdd

  inetd permet de faire des choses telles que telnet, ftp et envoyer des
  requetes  de  type  talk a votre machine. Si vous n'utilisez pas votre
  systeme en tant que serveur et que vous n'avez pas besoin d'acceder  a
  l'un de ces services a distance vous pouvez supprimer inetd.

  33..22..  llppdd

  lpd  est  utilise  pour  imprimer des fichiers sur votre imprimante en
  employant la commande lpr. Si vous n'imprimez jamais a partir de votre
  station  Linux vous pouvez retirer lpd. Si toutefois vous possedez une
  imprimante HP Deskjet et aimeriez  imprimer  je  recommande  fortement
  l'ensemble      dj-printcap      disponible      sur      le      site
  <ftp://sunsite.unc.edu/pub/Linux/system/Printing/dj-printcap.tar.gz>

  33..33..  nnffssdd eett mmoouunnttdd

  Ces deux demons sont utilises pour lancer  un  serveur  NFS.  Si  vous
  n'utilisez  jamais  votre  systeme Linux comme serveur NFS vous pouvez
  les retirer en toute securite.

  33..44..  ppoorrttmmaapp

  Le demon portmap permet de  gerer  les  services  RPC  (NdT  :  Remote
  Procedure  Call  =  Execution  de fonctions sur une autre machine). Si
  vous ne lancez pas de serveur NFS ou tout autre  programme  RPC,  vous
  pouvez enlever portmap.

  33..55..  sseennddmmaaiill

  sendmail  est  un  autre demon necessitant pas mal de memoire. Si vous
  n'utilisez jamais votre station Linux pour relayer l'envoi de courrier
  electronique  et  que  vous  ne recevez jamais de courrier vous pouvez
  probablement le retirer. Si vous envoyez du courrier de votre  station
  Linux,  la  plupart des logiciels clients peuvent etre configures pour
  poster le courrier a partir d'un autre serveur.

  33..66..  lleess aauuttrreess

  Il peut y avoir d'autres demons lances par  votre  systeme  dont  vous
  n'avez  pas  besoin.  Retirez  ce  que vous jugez inutile. Deux demons
  doivent imperativement etre lances : syslogd et klogd.

  44..  CCoonncclluussiioonn

  Ce qui precede illustre le chemin que j'ai suivi  pour  economiser  la
  memoire sur ma station Linux. J'espere vous avoir fourni quelques cles
  pour vous permettre de conserver toute la  memoire  de  votre  station
  Linux.

  Bonne chance et bon bidouillage !

  Todd Burgess

  <tburgess@uoguelph.ca>

  <http://eddie.cis.uoguelph.ca/~tburgess>

  Sound Blaster AWE 32/64 HOWTO
  Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de;
  Version Franaise par Arnaud Launay, asl@launay.org
  v1.2, 11 Janvier 1998

  Ce document dcrit l'installation et la configuration d'une Sound
  Blaster 32 (SB AWE 32, SB AWE 64) de Creative Labs dans un systme
  Linux en utilisant les extensions du priphrique sonore crites par
  Takashi Iwai. Il couvre galement quelques outils spciaux et lecteurs
  pour la srie des SB AWE. Le systme de rfrence est le Debian
  GNU/Linux, mais toute autre distribution Linux devrait fonctionner.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Remerciements
     1.2 Histoire des rvisions
     1.3 Nouvelles versions de ce document
     1.4 Contacter l'auteur
     1.5 License de Distribution

  2. Avant de commencer

     2.1 Introduction
     2.2 Quelques notes gnrales sur les cartes SB AWE
     2.3 Quelques notes gnrales sur les cartes Plug and Play
     2.4 Quelques notes gnrales sur les modules chargeables par le noyau
     2.5 Quelques notes gnrales sur le pilote sonore du noyau

  3. Comment installer le support des SB AWE

     3.1 Les choses dont vous aurez besoin
     3.2 Avant de commencer
     3.3 Compiler le noyau
     3.4 Redmarrage

  4. Tester le pilote sonore

     4.1 (TT
     4.2 Sortie - Le priphrique audio brut
     4.3 Sortie - Le Synthtiseur OPL-2/OPL-3
     4.4 Sortie - Le Synthtiseur Wave Table
     4.5 Mixer
     4.6 Entre - sampler avec le priphrique audio brut
     4.7 Le Port MIDI

  5. Logiciels du pilote AWE

     5.1 (TT
     5.2 (TT

  6. Appendice

     6.1 Informations Supplmentaires
     6.2 Sources
     6.3 Fichier d'exemple d'


  ______________________________________________________________________




  11..  IInnttrroodduuccttiioonn


  Ceci est le Sound Blaster AWE HOWTO. Il vous donne des informations
  dtailles sur la manire de tirer le maximum de votre carte Sound
  Blaster 32 ou meilleure, incluant le synthtiseur Wave Table. Ce
  document couvre toutes les cartes SB jusqu' la SB 32.

  La srie des Sound Blaster est bien connue des communauts DOS et
  Windows, et beaucoup d'utilisateurs de Linux dsirent galement
  utiliser cette carte son sous Linux.  Malheureusement, Creative Labs
  fournit uniquement un pilote pour Windows et DOS, et il n'est donc pas
  trivial d'installer et d'utiliser une carte SB sous Linux. Ce document
  essaye de dcrire comment utiliser les spcificits de la srie des SB
  AWE dans un environnement Linux.


  11..11..  RReemmeerrcciieemmeennttss


  Ce document contient des informations que j'ai tir de la Foire Aux
  Questions (FAQ) du pilote AWE et de celle de l'ISA PnP. Voyez la
  section ``Sources'' pour les auteurs et l'emplacement de ces
  documents. Merci aux auteurs, qui ont permis de rendre possible le
  support des SB AWE.

  Hannu Savolainen <http://www.4front-tech.com/usslite> a dvelopp la
  plus grande partie du pilote sonore qui vient avec le noyau Linux.
  Merci !

  Je voudrais remercier Nicola Bernardelli
  <mailto:n.bern@mail.protos.it> pour tester la partie sur l'AWE64. Sans
  lui, beaucoup d'erreurs seraient restes indtectes.

  Grce au paquetage SGML Tools
  <ftp://sunsite.unc.edu/pub/Linux/utils/text/sgml-tools-0.99.0.tar.gz>,
  ce HOWTO est disponible en divers formats, venant tous d'un fichier
  source commun.


  11..22..  HHiissttooiirree ddeess rrvviissiioonnss




     VVeerrssiioonn 11..00
        premire version.

     VVeerrssiioonn 11..11
        orthographe corrige (merci Curt!), ajout des versions
        ncessaires pour isapnp, disponible dornavant sur sunsite et
        ses miroirs.

     VVeerrssiioonn 11..22
        version franaise disponible, corrections mineures, un grand
        nombre de fautes d'orthographes fixes (VO) (merci  ispell).



  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt


  La dernire version peut tre trouve sur ma page principale,  Sound
  Blaster AWE HOWTO <http://homepage.ruhr-uni-
  bochum.de/Marcus.Brinkmann/soundblaster.html>.  La dernire version
  franaise se trouve sur
  <http://www.freenix.org/unix/linux/HOWTO/mini/Soundblaster-AWE.html>.

  Les nouvelles versions de ce document seront envoyes  divers sites
  ftp anonymes qui archivent de telles informations, incluant
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini> (NdT: et
  <ftp://ftp.traduc.org/pub/HOWTO/FR/mini> pour la version franaise).

  Les versions hypertextes de ce HOWTO et de nombreux autres HOWTOs
  Linux sont disponibles sur beaucoup de sites World-Wide-Web, incluant
  <http://sunsite.unc.edu/LDP/>. La plupart des distributions Linux sur
  CD-ROM contiennent les HOWTOs, souvent dans le rpertoire /usr/doc.

  Si vous traduisez ce document dans une autre langue, fates le moi
  savoir et je rajouterais une rfrence ici.


  11..44..  CCoonnttaacctteerr ll''aauutteeuurr


  Je compte sur vous, le lecteur, pour rendre ce HOWTO utile. Si vous
  avez eds suggestions, des corrections, ou des commentaires, veuillez
  me les envoyer, Marcus.Brinkmann@ruhr-uni-bochum.de, et je tenterais
  de les inclure dans la version suivante.

  J'aimerais spcialement recevoir des informations sur la procdure de
  lancement (scripts de lancement, etc..) d'autres fameuses
  distributions de Linux, comme la Red Hat ou la SuSE Linux.

  Si vous publiez ce document sur un CD-ROM ou sous forme papier, une
  copie serait apprcie. Ecrivez moi pour mon adresse postale.
  Considrez galement une donation au Linux Documentation Project pour
  aider le support de la documentation gratuite pour Linux.  Contactez
  le coordinateur des HOWTOs Linux, Greg Hankins gregh@sunsite.unc.edu,
  pour plus d'informations.


  11..55..  LLiicceennssee ddee DDiissttrriibbuuttiioonn


  Copyright 1997 Marcus Brinkmann.

  Cette documentation est libre, vous pouvez la redistribuer et/ou la
  modifier selon les termes de la Licence Publique Gnrale GNU publie
  par la Free Software Foundation (version 2 ou bien toute autre version
  ultrieure choisie par vous).

  Cette documentation est distribue car potentiellement utile, mais
  SSAANNSS AAUUCCUUNNEE GGAARRAANNTTIIEE, ni explicite ni implicite, y compris les
  garanties de ccoommmmeerrcciiaalliissaattiioonn ou dd''aaddaappttaattiioonn ddaannss uunn bbuutt ssppcciiffiiqquuee.
  Reportez-vous  la Licence Publique Gnrale GNU pour plus de dtails.

  Vous pouvez obtenir une copie de la Licence Publique Gnrale GNU en
  crivant  la Free Software Foundation <http://www.fsf.org>, Inc., 675
  Mass Ave, Cambridge, MA 02139, tats-Unis.


  22..  AAvvaanntt ddee ccoommmmeenncceerr



  22..11..  IInnttrroodduuccttiioonn


  Ce document essaye de vous aider  installer et  utiliser une Sound
  Blaster AWE 32 ou une Sound Blaster AWE 64 de chez Creative Labs pour
  votre systme Linux. Le systme de rfrence est le Debian GNU/Linux
  <http://www.debian.org> sur un plateforme Intel i586, mais il devrait
  fonctionner avec toute autre distribution Linux ainsi que sur toute
  plateforme supportant le pilote son Linux (less diffrences sont
  mentionnes lorsqu'elles apparaissent).

  Lisez attentivement le HOWTO Linux Sound (voir section ``Informations
  Complmentaires''). Je considre ce document comme un supplment au
  Sound HOWTO, et vous pourrez souvent y trouver plus d'informations sur
  les choses que j'ai laisses de ct ici.


  22..22..  QQuueellqquueess nnootteess ggnnrraalleess ssuurr lleess ccaarrtteess SSBB AAWWEE


  La carte son SB AWE 32 propose un priphrique audio brut, un
  synthtiseur standard OPL-2/OPL-3, un port MIDI MPU-401 et un
  synthtiseur 32 voix EMU 8000 Wave Table (pour une explication de ces
  termes et d'autres voyez le Linux Sound HOWTO). Un des buts de ce
  document est de vous aider  faire fonctionner proprement toutes ces
  spcificits.

  La SB AWE 64 a les capacits de la SB AWE 32 et un synthtiseur Wave
  Guide additionnel dont Creative Labs est trs fier. Le problme pour
  les utilisateurs Linux est que les 32 voix supplmentaires sont
  gnres par un logiciel et sorties par les priphriques wave bruts.
  Parce que Creative Labs ne voit aucun march dans les pilotes Linux,
  un pilote son pour le synthtiseur Wave Guide est disponible
  uniquement sous Windows 3.1 et Windows 95.

  Cel signifie que, du point de vue d'un utilisateur Linux, la SB AWE
  32 et la SB AWE 64 sont quasiment identiques. A partir de maintenant
  je me rfrerais seulement aux SB AWE en gnral et mentionnerait
  simplement les diffrences lorsqu'elles apparatront.


  22..33..  QQuueellqquueess nnootteess ggnnrraalleess ssuurr lleess ccaarrtteess PPlluugg aanndd PPllaayy


  La plupart des cartes modernes pour les plateformes Intel sont les
  cartes ISA PnP, qui est une abbrviation pour `Plug and Play''. Cel
  signifie que la carte doit tre configure par le systme
  d'exploitation, et ceci est fait au travers d'un routine
  d'initialisation au lancement. En gnral, il y a au moins trois
  moyens pour le faire:


  1. Vous avez un Bios PnP, ce qui signifie que votre Bios est au
     courant de la prsence des cartes PnP et qu'il peut les configurer.
     Si vous pensez pouvoir utiliser toutes les spcificits de votre SB
     AWE PnP juste parce que vous avez un Bios PnP, ce n'est pas de
     chance. Mme si le Bios dclare supporter les cartes PnP il
     initialise seulement une partie des ports et des adresses utilises
     par votre carte son. Vous pourrez probablement jouer des donnes
     brutes, mais vous serez incapable de jouer de la musique MIDI, par
     exemple. Pour cette raison, un Bios PnP n'est pas une option.

  2. Vous disposez d'un systme d'exploitation qui supporte les cartes
     PnP. Le noyau Linux stable actuel (2.0.x) n'en est pas un, vous
     devrez donc attendre les prochaines versions du noyau, qui
     supporteront les priphriques PnP.

  3. Vous avez un programme spcial, lanc au dmarrage, qui initialise
     vos cartes PnP. C'est ce que nous allons employer.

  Le logiciel le plus communmenet utilis pour initialiser les cartes
  PnP sous Linux sont les `isapnptools'' (voir la section ``Sources'' et
  la section ``Commencer'').  Ils fournissent un moyen simple pour
  configurer toutes les cartes ISA PnP de votre machine, et pas
  seulement votre carte son.


  22..44..  ppaarr llee nnooyyaauu QQuueellqquueess nnootteess ggnnrraalleess ssuurr lleess mmoodduulleess cchhaarrggee
  aabblleess


  Quelques pilotes de priphriques peuvent tre construits en tant que
  modules au lieu de les compiler dans le noyau. Vous pourrez trouver
  plus d'informations sur les modules dans le Kernel HOWTO et le Module
  HOWTO (voir section ``Informations Complmentaires'').

  Si vous avez une carte PnP, vous _d_e_v_e_z installer le support sonore en
  tant que module chargeable par le noyau. Cel signifie que vous ne
  pouvez construire le pilote sonore dans le noyau, mais que vous devez
  le compiler en tant que module, afin qu'il puisse tre charg dans le
  noyau au lancement. Ceci, parce que votre noyau sera install avant la
  configuration de votre carte ISA PnP, et votre pilote sonore doit tre
  charg aprs la configuration de votre carte ISA PnP.

  Le module du son peut tre charg manuellement via insmod sound ou
  modprobe -a sound ou dans le script de lancement de votre systme
  Linux (sous Debian, il suffit d'ajouter une simple ligne contenant
  sound  /etc/modules). Une autre approche consiste  lancer kerneld,
  un dmon qui installe et supprime les modules suivant les ncessits.

  Notez que kerneld peut ne pas tre la meilleure solution pour le
  module de l'AWE, car il prend du temps  charger le module dans le
  noyau, surtout si vous voulez utiliser le synthtiseur Wave Table et
  charger de grosses banques Sound Font, ce que vous aurez  faire 
  chaque insertion du module. Parce que kerneld supprime les modules
  inutilises aprs une minute par dfaut, il serait prfrable de
  charger le module son manuellement ou au lancement. Notez que
  l'insertion manuelle ou au lancement du module empche kerneld de le
  supprimer lorsqu'il est inutilis. Mais vous pouvez insrer
  manuellement le module et utiliser kerneld en mme temps. Les deux
  mthodes ne sont pas conflictoires, mais kerneld ne s'occupera plus du
  module son.

  C'est particulirement utile si vos options pour le mixer sont
  changes aprs la suppression puis la rinstallation du module. Une
  solution  ce problme sera donne dans la section ``Mixing'' (elle
  dcrit le lancement automatique d'un mixer lorsque vous chargez le
  modules du son).  Cependant, kerneld peut prendre du temps pour
  charger le module, pour charger la banque sound font et pour lancer le
  mixer, et pour cette raison (et quelques autres) il vaut mieux
  installer le module son au lancement et ne pas laisser kerneld le
  supprimer.


  22..55..  QQuueellqquueess nnootteess ggnnrraalleess ssuurr llee ppiilloottee ssoonnoorree dduu nnooyyaauu

  Vous pouvez compiler le support sonore dans le noyau ou en tant que
  module chargeable. Si vous avez une carte PnP, vous devez installez le
  support sonore en tant que module, car les cartes PnP ncessitent
  d'tre initialiss via les isapnptools avant le chargement du module.

  Comme vous pouvez l'imaginer, vous devrez recompiler le noyau. Je vous
  donnerai quelques trucs  ce propos plus bas. Pour l'instant, parlons
  du support sonore dans les sources du noyau. Le noyau vient avec la
  version gratuite (allge) du pilote sonore OSS (USS). La version
  actuelle (3.5.4) ne supporte pas entirement la SB AWE, mais seulement
  sa partie SB 16. Vous aurez ainsi le priphrique brut et les
  synthtiseurs OPL-2/OPL-3 si vous l'utilisez, mais vous ne pourrez pas
  jouer de musique midi avec le synthtiseur Wave Table.

  Si vous dsirez utiliser le priphrique Wave Table, vous pouvez soit
  acheter le pilote sonore commercial de 4Front Technologies
  <http://www.4front-tech.com> (si quelqu'un pouvait me confirmer que ce
  pilote peut le faire), ou corriger votre noyau avec les extensions du
  pilote sonore AWE 32 par Takashi Iwai. Le premier est en dehors des
  vues de ce document, je supposerais donc que vous utiliserez le
  dernier.

  Les extensions du pilote sonore AWE 32 (voir section ``Sources'') est
  publi sous la licence GNU et vient avec un certain nombre d'outils
  pour utiliser le synthtiseur wave EMU 8000 des cartes SB AWE.

  Le logiciel awedrv est dj inclut dans les sources des noyaus les
  plus rcents ( partir des noyaus 2.1.x, mais vous devrez peut-tre
  mettre  jour vos sources dans l'arborescence du noyau, elles peuvent
  tre anciennes).


  33..  CCoommmmeenntt iinnssttaalllleerr llee ssuuppppoorrtt ddeess SSBB AAWWEE



  33..11..  LLeess cchhoosseess ddoonntt vvoouuss aauurreezz bbeessooiinn


  Ce qui suit est requis pour le support SB AWE sous Linux:

    un systme Linux fontionnel (par ex. la distribution Debian
     GNU/Linux),

    une carte SB AWE 32 ou compatible (cd SB32, SB32 PnP, SB AWE64,
     ...),

    les sources du noyau Linux, incluant le pilote sonore OSS/Free
     (normalemnt inclus, vrifiez dans
     /usr/src/Linux/drivers/sound/Readme),

    Les extensions du pilote AWE 32.

  Si vous avez une carte PnP, vous aurez galement besoin de:


    le paquetage logiciel des isapnptools.

  Regardez dans la section ``Sources'' pour les informations concernant
  l'obtention de ces programmes.

  Si vous avez un systme Debian GNU/Linux, vous aurez besoin des
  paquetages kernel-source-<version>, awe-drv et peut-tre le paquetage
  isapnptools.  Vous dsirez peut-tre quelques-uns des autre paquetages
  awe-*, mais cependant ils ne sont pas essentiels. Je recommande
  fortement le kernel-package pour compiler et installer facilement le
  noyau.


  33..22..  AAvvaanntt ddee ccoommmmeenncceerr


  Assurez vous que vous avez proprement install votre carde dans un
  emplacement sur votre carte mre et peut-tre l'avoir dj teste dans
  un environnement DOS ou Windows.

  La prochaine tape est d'initialiser la carte au lancement si et
  seulement si c'est une carte PnP. Suivez la documentation dans les
  sources pour compiler et installer isapnptools (ou utilisez simplement
  le paquetage binaire Debian), et lancez



       # pnpdump > /etc/isapnp.conf





  en tant que super-utilisateur. Cel gnrera un fichier de
  configuration propre  votre carte PnP, mais avec tous les
  priphriques comments. Editez attentivement ce fichier, et comparez
  les values des canaux DMA, des bases IO et des interruptions avec la
  configuration des cartes sous les environnements DOS ou Windows si
  possible (Avec Win95, regardez les ressources utilises par la carte
  sous resources dans le device manager). Si vous avez des problmes,
  lisez attentivement la documentation fournie avec les isapnptools.

  _A_V_E_R_T_I_S_S_E_M_E_N_T_: les isapnptools chouent souvent dans la dtection des
  trois ports I/O du priphrique SB AWE Wave Table. Veuillez vrifier
  attentivement l'entre Wave Table de votre isapnp.conf avec l'exemple
   la fin de ce HOWTO. Ajustez les adresses I/O de bases si ncessaire.


  _A_V_E_R_T_I_S_S_E_M_E_N_T_: D'aprs l' isapnp-faq, quelques fois les isapnp
  chouent  programmer le nombre de priphriques logiques. Si vous
  rencontrez un message d'erreur comme celui-ci:



       Error occurred executing request 'LD 2' on or around line...




  essayez alors d'ajouter (VERIFYLD N) au dbut de isapnp.conf. Vous
  devez utiliser au minimum la version 1.10 pour que ceci fonctionne. Si
  vous ne pouvez utiliser la version 1.10 ou ultrieure, vous pouvez
  galement POKE directement les nombres des priphriques logiques.
  Veuillez vous rfrer  l'isapnp-faq pour plus d'informations sur
  cette approche. Si a ne marche pas pour vous, contactez moi (et les
  personnes d'isapnp seront intresses galement, je pense).

  _A_V_E_R_T_I_S_S_E_M_E_N_T_: Vrifiez que la dernire ligne est (WAITFORKEY), cel
  sera parfois omis par les anciennes versions de pnpdump.

  Un isapnp.conf d'exemple pour seulement une seule carte PnP (la carte
  son) peut-tre trouve  la fin de ce document (voir la section
  ``Exemple d'<tt>isapnp.conf</tt>'').

  Si vous avez un systme Debian, aucun ajustement supplmentaire n'est
  ncessaire. isapnp sera lanc au lancement dans /etc/init.d/boot avec
  ce petit bout de script, que vous devrez peut-tre inclure dans vos
  scripts d'initialisation:










  ______________________________________________________________________
  # Configure les cartes isa plug and play avant de charger
  # les modules. Ncessite de faire ceci avant le chargement
  # des modules pour avoir une chance de configurer et de
  # lancer les cartes PnP avant que les pilotes ne viennent
  # foutre le bordel.
  #
  if [ -x /etc/init.d/isapnp ]
  then
    /etc/init.d/isapnp start
  fi
  ______________________________________________________________________


  o /etc/init.d/isapnp est

  ______________________________________________________________________
  #! /bin/sh
  # /etc/init.d/isapnp: configure les cartes Plug and Play
  test -x /sbin/isapnp || exit 0
  /sbin/isapnp /etc/isapnp.conf
  exit 0
  ______________________________________________________________________



  Si vous avez une autre distribution Linux, vous tes chez vous. Je ne
  sais pas ce qu'il faut faire (personne ne peut envoyer des
  informations plus spcifiques ?). Soyez certains qu'isapnp sera lanc
  _a_v_a_n_t que les modules ne soient chargs (voir plus haut).


  33..33..  CCoommppiilleerr llee nnooyyaauu


  Avant de recompiler le noyau, vous devez ajouter les extensions AWE au
  pilote sonore. Mme si vos sources du noyau ont dj les extensions
  awedrv (voyez /drivers/sound/lowlevel/ pour a), vous pouvez avoir 
  mettre le logiciel  jour.  Suivez les instructions des sources de
  awedrv pour l'installation. En bref, vous devez lancer un script
  d'installation qui applique les corrections  vos sources du noyau.

  Faites attention si vous avez mis  jour vos sources du noyau en
  lanant le script. En effet le script vrifie simplement qu'un certain
  fichier existe - s'il existe, il n'applique pas les corrections
  ncessaires. Vous seriez avis de retirer le fichier
  drivers/sound/lowlevel/awe_wav.c avant de lancer le script aprs avoir
  mis  jour les sources du noyau.

  Ensuite vous avez  configurer le noyau pour le support du son.
  J'espre que vous connaissez quelque chose sur la compilation du
  noyau; voyez le Sound HOWTO et le Kernel HOWTO pour les dtails. Allez
  dans le rpertoire o se trouvent vos sources du noyau (/usr/src/linux
  par exemple), et lancez:



       # make config




  ou make menuconfig ou make xconfig. Ensuite vous devez configurer
  votre noyau normalement. Utilisez cette opportunit pour crer un
  noyau petit et puissant, spcialement constitu pour votre systme.
  Rpondez bien Y  la question Enable loadable module support, si vous
  dsirez installer le pilote sonore en tant que module chargeable.
  (vous _d_e_v_e_z le faire si vous avez une carte PnP), mais je ne suis pas
  certain que vous dsiriez le faire, cependant.

  A un moment, on vous demandera si vous dsirez le support des cartes
  son.  Vous tes libres de rpondre avec Y ou avec M si vous _n_'_a_v_e_z _p_a_s
  de carte PnP.  Vous _d_e_v_e_z rpondre avec M, pour module, si vous avez
  une carte PnP. Vous avez  compiler le support carte son en module si
  vous avez une carte PnP car les cartes PnP doivent tre initialises
  avant que les modules ne soient chargs.

  Vous devez rpondre Y aux questions suivantes, toutes les autres avec
  N:


  ______________________________________________________________________
  Sound Blaster (SB, SBPro, SB16, clones) support (CONFIG_SB) [Y/n/?]
  Generic OPL2/OPL3 FM synthesizer support (CONFIG_ADLIB) [Y/n/?]
  /dev/dsp and /dev/audio support (CONFIG_AUDIO) [Y/n/?]
  MIDI interface support (CONFIG_MIDI) [Y/n/?]
  FM synthesizer (YM3812/OPL-3) support (CONFIG_YM3812) [Y/n/?]
  lowlevel sound driver support [Y/n/?]
  AWE32 support (CONFIG_AWE32_SYNTH) [Y/n/?]
  ______________________________________________________________________



  En fait, seul le dernier est pour le synthtiseur Wave Table. Les
  autres sont les options SB 16 du pilote OSS/Free.

  De plus, vous devrez configurer le port I/O de la carte son. Voyez le
  fichier isapnp.conf pour de l'aide, si vous en avez un. Pour moi, les
  valeurs par dfaut sont suffisantes. Notez que les valeurs par dfaut
  des scripts de configuration du kernel peuvent tre fausses
  (principalement les valeurs SBC_IRQ et SB_MPU_BASE qui semblent
  incorrectes pour la plus grande partie des cartes).


  ______________________________________________________________________
  I/O base for SB Check from manual of the card (SBC_BASE) [220]
  Sound Blaster IRQ Check from manual of the card (SBC_IRQ) [5]
  Sound Blaster DMA 0, 1 or 3 (SBC_DMA) [1]
  Sound Blaster 16 bit DMA (_REQUIRED_for SB16, Jazz16, SMW) 5, 6 or 7
  (use 1 for 8 bit cards) (SB_DMA2) [5]
  MPU401 I/O base of SB16, Jazz16 and ES1688 Check from manual of the card
  (SB_MPU_BASE) [330]
  SB MPU401 IRQ (Jazz16, SM Wave and ES1688) Use -1 with SB16 (SB_MPU_IRQ)
  [-1]
  ______________________________________________________________________



  Maintenant recompilez le noyau. Les utilisateurs Debian doivent
  utiliser le kernel-package. Ce paquetage rend les compilations de
  noyau aussi facile que l'installation d'un paquetage debian. Voyez la
  documentation dans /usr/doc/kernel-package/. Par exemple:



       # make-kpkg clean
       # make-kpkg -revision custom.1.0 kernel_image





  puis dpkg -i /usr/src/kernel-image-2.0.29_custom.1.0_i386.deb.

  Si vous avez une autre distribution Linux, suivez le moyen normal de
  compilation d'un nouveau noyau. N'oubliez pas make modules et make
  modules_install. Voyez le Sound HOWTO et peut-tre le Kernel HOWTO
  pour plus d'informations.


  33..44..  RReeddmmaarrrraaggee


  Aprs l'installation d'un nouveau noyau, vous devez relancer votre
  machine (vrifiez que vous avez une disquette de lancement sous la
  main). Croisez les doigts.

  Si vous avez une carte PnP, vrifiez que vous lancez isapnp soit dans
  un script de lancement (comme dcrit plus haut) ou manuellement:



       # /sbin/isapnp /etc/isapnp.conf
       Board 1 has Identity 74 00 00 e3 10 48 00 8c 0e:  CTL0048 Serial No 58128
       [checksum 74]




  Maintenant vous pouvez installer le pilote sonore, aprs l'avoir
  compil en tant que module:



       # modprobe -a sound
       AWE32 Sound Driver v0.3.3e (DRAM 2048k)




  Si vous pensez que la dtection de la mmoire n'tait pas correcte
  (j'ai eu des chos de quelqu'un qui a une AWE64 avec 4096k, et
  `detected'' a t de 28672k), vous pouvez soit essayer de mettre 
  jour le logiciel awedrv ou spcifier la taille de la mmoire ddans le
  fichier /usr/src/linux/drivers/sound/lowlevel/awe_config.h, par
  exemple:



       #define AWE_DEFAULT_MEM_SIZE  4096   /* kbytes */




  Dsol, vous devez alors recompiler le noyau (compiler les modules
  pourrait suffire, mais je n'en suis pas sr).

  Si a marche, vous pouvez dsirer que le module sonore se charge
  automatiquement. Vous pouvez utiliser kerneld (pourquoi c'est une
  mauvaise ide est expliqu dans la section 1.4) ou ajouter une simple
  ligne contenant sound  votre /etc/modules/ (pour Debian) ou ajouter
  /sbin/modprobe -a sound  votre script de lancement.


  44..  TTeesstteerr llee ppiilloottee ssoonnoorree



  44..11..  //pprroocc//ddeevviicceess,, //ddeevv//ssnnddssttaatt


  Si vous avez intgr le support sonore, vous obtiendez quelques
  informations utilies au lancement. Si vous avez le support sonore en
  tant que module chargeable, vous pouvez obtenir la mme information
  (peut-tre en retirant le module sound avec modprobe -r sound d'abord)
  avec:



       # modprobe -a sound trace_init=1
       Sound initialization started

       <Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
       <Sound Blaster 16> at 0x330 irq 5 dma 0
       <Yamaha OPL3 FM> at 0x388
       Sound initialization complete
       AWE32 Sound Driver v0.3.3e (DRAM 2048k)




  Si vous avez un systme de fichiers virtuel /proc, vous pouvez
  regarder pour le priphrique sonore avec:



       # cat /proc/devices
       Character devices:
       [...]
       14 sound
       [...]




  Vrifier ensuite que vous avez les priphriques corrects installs
  sous /dev/. Regardez le Sound HOWTO pour les dtails. Demandez ensuite
   /dev/sndstat le status du module sound:


























  # cat /dev/sndstat
  Sound Driver:3.5.4-960630 (Sat Oct 11 19:35:14 CEST 1997 root,
  Linux flora 2.0.29 #1 Sat Oct 11 19:12:56 CEST 1997 i586 unknown)
  Kernel: Linux flora 2.0.29 #1 Sat Oct 11 19:36:23 CEST 1997 i586
  Config options: 0

  Installed drivers:
  Type 1: OPL-2/OPL-3 FM
  Type 2: Sound Blaster
  Type 7: SB MPU-401

  Card config:
  Sound Blaster at 0x220 irq 5 drq 1,5
  SB MPU-401 at 0x330 irq 5 drq 0
  OPL-2/OPL-3 FM at 0x388 drq 0

  Audio devices:
  0: Sound Blaster 16 (4.13)

  Synth devices:
  0: Yamaha OPL-3
  1: AWE32 Driver v0.3.3e (DRAM 2048k)

  Midi devices:
  0: Sound Blaster 16

  Timers:
  0: System clock

  Mixers:
  0: Sound Blaster
  1: AWE32 Equalizer




  Si vous n'avez pas de sortie ressemblant  celle-ci, il y a peut-tre
  une erreur dans votre configuration. Repartez et cherchez ce qui ne va
  pas, puis retournez  l'tape ``Avant de commencer'', en vrifiant
  tout.


  44..22..  SSoorrttiiee -- LLee pprriipphhrriiqquuee aauuddiioo bbrruutt


  Tchez d'obtenir un fichier .au (Sun) ou un fichier brut de test, et
  fates



       # cat bell.au > /dev/audio




  ou



       # cat sample > /dev/dsp




  Vous devriez entendre le contenu du fichier via le Audio Device 0:
  Sound Blaster 16 (4.3).
  44..33..  SSoorrttiiee -- LLee SSyynntthhttiisseeuurr OOPPLL--22//OOPPLL--33


  Si vous dsirez utiliser le synthtiseur OPL-2/OPL-3 FM pour jouer des
  fichiers MIDI avec votre carte son, essayez le programme playmidi
  (voir Appendice B). Commencez avec



       # playmidi -f dance.mid





  ou




       # playmidi -4 dance.mid




  Le premier vous donnera du OPL-2, le dernier de la musique MIDI OPL-3.
  Si vous tes embarasss par le son, ne blmez pas playmidi: c'est le
  synthtiseur FM qui rend mal.

  Imaginez si vous aviez seulement le pilote OSS/Free: ceci serait la
  meilleure qualit de musique MIDI que vous pourriez avoir (en dehors
  de la synthse logicielle). Heureusement, vous avez une SB AWE, et
  vous pouvez utiliser les possibilits Wave Table avec les extensions
  AWE.


  44..44..  SSoorrttiiee -- LLee SSyynntthhttiisseeuurr WWaavvee TTaabbllee


  Les extensions AWE viennent avec des outils spciaux (awesfx) pour
  pouvoir utiliser le synthtiseur EMU 8000 Wave Table. Tout d'abord,
  vous devrez charger une banque Sound Font sur votre carte - mme si
  vous dsirez utiliser les samples de la ROM! Vous pouvez utiliser les
  fichiers de votre installation Windows - regardez pour des fichiers se
  terminant en *.sfb ou *.sf2.

  Les samples de la ROM peuvent tre chargs avec SYNTHGM.SBK, de vrais
  samples sont dans SYNTHGS.SBK et SYNTHMT.SBK, ainsi que dans
  SAMPLE.SBK. Vous pouvez obtenir d'autres banques Sound Font via ftp ou
  www, essayer la EMU Homepage, le site web de Creative Labs, et
  regarder pour les samples Chaos, ils sont vraiment bons (vrifiez sur
  le site web du pilote AWE).

  Essayez de charger le standard GM (ROM) avec:



       # sfxload -i synthgm.sbk




  puis jouer un des fichiers midi qui viennent avec la SB AWE:



  # drvmidi dance.mid





  44..55..  MMiixxeerr


  Prenez votre mixer prfr et lancez le. Lancez un sample audio brut
  et deux fichiers MIDI en mme temps, et testez les options du mixer.
  Jouez un peu, ce doit tre trs facile. Voici une liste des
  priphriques et de leur nom:


     YYaammaahhaa OOPPLL--33
        Synth ou FM

     AAWWEE3322 DDrriivveerr
        Synth ou FM (est ce que quelqu'un connait un mixer o ces deux
        sont spars ?)

     SSoouunndd BBllaasstteerr 1166 ((44..1133))
        PCM ou DSP

     hhaauutt ppaarrlleeuurr dduu PPCC ((ttoouujjoouurrss aaccttiiff))
        Spkr

  Les autres options se rfrent au CD ROM, probablement connect  la
  carte son, au volume principal, aux basses,  la balance et au niveau
  d'enregistrement des diverses lignes d'entre. Vous pouvez spcifier
  quelles lignes doivent tre enregistres.


  44..66..  EEnnttrree -- ssaammpplleerr aavveecc llee pprriipphhrriiqquuee aauuddiioo bbrruutt


  Vous pouvez enregistrer  partir de diffrentes sources: un CD ROM, un
  microphone connect  mic, et tout ce que vous pouvez mettre dans line
  in. Placez le mixer dans la position approprie. Jouez un son et
  enregistrez le dans un fichier, en lisant le priphrique audio brut,
  par exmple:



       # cdplay
       # dd bs=8k count=5 </dev/dsp >music.au
       5+0 records in
       5+0 records out
       # cat music.au >/dev/dsp




  enregistre et joue cinq secondes d'audio  partie du priphrique
  d'entre.


  44..77..  LLee PPoorrtt MMIIDDII


  Dsol, pas encore d'informations sur le port AMIDI !




  55..  LLooggiicciieellss dduu ppiilloottee AAWWEE



  55..11..  ssffxxllooaadd


  Vous pouvez charger des samples dans votre DRAM de la carte son avec
  l'outil sfxload. Notez que vous pouvez seulement charger un fichier de
  sample par banque, avec la banque 0 par dfaut. Ainsi, aprs sfxload
  synthgs.sbk, les seuls samples de votre carte son sont les samples GS.
  si vous dsirez charger des banques Sound Font supplmentaires, vous
  devez utiliser l'option -b, par exemple:



       # sfxload synthgs.sbk
       # sfxload -b1 sample.sbk
       # drvmidi sfx.mid




  Vous pouvez charger une banque Sound Font par dfaut automatiquement
  en installant le module. Ajoutez juste une ligne comme



       post-install sound /usr/bin/sfxload synthgm.sbk




   votre fichier /etc/conf.modules.

  Voyez la documentation pour plus de dtails sur sfxload.


  55..22..  ddrrvvmmiiddii


  Avec le programme drvmidi, vous pouvez utiliser votre pilote AWE pour
  jouer des fichiers MIDI. Spcifiez juste le nom de votre fichier midi
  aprs la commande:



       # drvmidi waltz.mid




  Voyez la documentation pour des dtails supplmentaires sur drvmidi.


  66..  AAppppeennddiiccee



  66..11..  IInnffoorrmmaattiioonnss SSuuppppllmmeennttaaiirreess



     LLee LLiinnuuxx SSoouunndd HHOOWWTTOO
        Auteur: Jeff Tranter, <jeff_tranter@pobox.com>

        Dernire Version: v1.19, 23 Janvier 1998

        Lisez bien le Sound HOWTO (disponible sur sunsite.unc.edu et
        ftp.lip6.fr pour la france). Il contient un bon nombre de
        donnes sur la compilation du noyau avec le support sonore, et
        explique beaucoup de choses sur les priphriques audio, les
        applications, etc...

        Je prends ce HOWTO comme une addition au Sound HOWTO.


     LLee LLiinnuuxx SSoouunndd PPllaayyiinngg HHOOWWTTOO
        Auteur: Yoo C. Chung, <wacko@laplace.snu.ac.kr>

        Dernire Version: v1.5b, 2 Fvrier 1998

        Vous devriez galement lire le Sound Playing HOWTO. Il vous dit
        tout sur les diffrents formats sonores et les applications pour
        les jouer.


     LLaa FFAAQQ dduu ppiilloottee AAWWEE
        Auteur: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>

        Source:  <http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/awedrv-
        faq.html>

        Si vous avez des problmes pour installer le pilote AWE ou
        utiliser le synthtiseur Wave Table ou votre carte Sound
        Blaster, regardez ici.


     LLaa FFAAQQ IISSAA PPnnPP
        Auteur: Peter Fox <fox@roestock.demon.co.uk>

        Source:
        <http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html>

        Si vous avez des problmes pour configurer votre carte ISA PnP,
        alors ceci est votre livre de chevet.



  66..22..  SSoouurrcceess




     isapnptools
        Auteur: Peter Fox <fox@roestock.demon.co.uk>

        Dernire Version: 1.15

        Source:
        <http://www.roestock.demon.co.uk/isapnptools/index.html>

        Si vous envoyez des patchs, des reports d'erreurs ou des
        commentaires, veuillez mettre 'isapnp' quelque part sur la ligne
        du sujet, et crire  isapnp@roestock.demon.co.uk.


     awedrv
        Auteur: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>

        Dernire Version: 0.4.2d

        Source:  <http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/>


     NNooyyaauu LLiinnuuxx ((kkeerrnneell))
        Auteur: Linus Torvald et beaucoup d'autres

        Dernire Version: En ce moment, vous devriez utiliser la 2.0.35

        Source: partout, l o vous pouvez obtenir Linux :)


     OOSSSS//FFrreeee
        Auteur: Hannu Savolainen (Veuillez voir  <http://www.4front-
        tech.com/usslite> avant de m'crire).

        Dernire Version: J'ai la 3.8s9

        Source: avec les sources du noyau Linux ou
        <ftp://ftp.opensound.com/ossfree/>

        Information:   <http://www.4front-tech.com/usslite> ou miroir
        europen <http://personal.eunet.fi/pp/voxware>.



  66..33..  FFiicchhiieerr dd''eexxeemmppllee dd'' iissaappnnpp..ccoonnff


  Dans le fichier de configuration ISA PnP cr par pnpdump, les
  priphriques de vos cartes PnP apparaissent en sections. Dans le
  fichier suivant, une carte a t dtecte (la carte son), avec quatre
  priphriques logiques:


    LD 0: Priphrique Audio

    LD 1: Interface IDE

    LD 2: Wave Table

    LD 3: Port Joystick

  J'ai laiss LD 1 non configur, car je n'ai pas de CD ROM attach au
  port IDE de ma carte son. Si vous n'avez pas de port IDE sur votre SB,
  alors LD 1 sera le port joystick et LD 3 n'apparatra pas.

  Veuillez vous rfrer  la section ``Avant de Commencer'' pour plus
  d'informations (importantes!) sur ce fichier.


















  ______________________________________________________________________
  # $Id: Soundblaster-AWE.fr.sgml,v 1.1 2000/03/12 20:05:04 launay Exp $
  # This is free software, see the sources for details.
  # This software has NO WARRANTY, use at your OWN RISK
  #
  # For details of this file format, see isapnp.conf(5)
  #
  # For latest information on isapnp and pnpdump see:
  # http://www.roestock.demon.co.uk/isapnptools/
  #
  # Compiler flags: -DREALTIME -DNEEDSETSCHEDULER

  (READPORT 0x0203)
  (ISOLATE)
  (IDENTIFY *)

  # Try the following if you get error messages like
  # Error occurred executing request 'LD 2' on or around line...

  #(VERIFYLD N)

  # ANSI string -->Creative SB32 PnP<--

  (CONFIGURE CTL0048/58128 (LD 0
  #     ANSI string -->Audio<--

    (INT 0 (IRQ 5 (MODE +E)))
    (DMA 0 (CHANNEL 1))
    (DMA 1 (CHANNEL 5))
    (IO 0 (BASE 0x0220))
    (IO 1 (BASE 0x0330))
    (IO 2 (BASE 0x0388))

    (ACT Y)
  ))

  (CONFIGURE CTL0048/58128 (LD 1
  #     ANSI string -->IDE<--

  # (INT 0 (IRQ 10 (MODE +E)))
  # (IO 0 (BASE 0x0168))
  # (IO 1 (BASE 0x036e))

  # (ACT Y)
  ))

  (CONFIGURE CTL0048/58128 (LD 2
  #     ANSI string -->Wave Table<--

    (IO 0 (BASE 0x0620))
    (IO 1 (BASE 0x0A20))
    (IO 2 (BASE 0x0E20))

    (ACT Y)
  ))

  (CONFIGURE CTL0048/58128 (LD 3
  #     ANSI string -->Game<--

    (IO 0 (BASE 0x0200))
    (ACT Y)
  ))

  # Returns all cards to the "Wait for Key" state
  (WAITFORKEY)
  ______________________________________________________________________


































































  StarOffice mini-HOWTO
  Matthew Borowski <mailto:mkb@poboxes.com>,
  Adapte par Nat Makarevitch <mailto:nat@linux-france.com>
  Version 0.8fr8b

  Installation de StarOffice (StarDivision, GmbH) sous Linux.

  11..  IInnttrroodduuccttiioonn

  Site      de      reference      de      la      Version     Originale
  <http://www.jnpcs.com/mkb/linux>

  La plus recente version francaise de ce texte se trouve sur  son  site
  de  reference  <http://www.linux-france.com/>.  Seule la diffusion des
  versions non modifiees est autorisee.

  L'ensemble logiciel _S_t_a_r_O_f_f_i_c_e, redige en langage C et  exploitant  la
  bibliotheque Motif, rassemble plusieurs outils de bureautique :

  +o  StarWriter, traitement de texte

  +o  StarCalc, tableur

  +o  StarImage, logiciel de dessin

  +o  StarDraw, logiciel de dessin objet

  +o  StarChart, grapheur

  +o  StarMath, editeur d'equations

  La  version Linux de StarOffice est librement utilisable en dehors des
  contextes  commerciaux  mais  tout  utilisateur   professionnel   doit
  acquerir une licence dont le cout est pour le moment non determine.

  Seule   la   distribution   _O_p_e_n_L_i_n_u_x   (commercialisee   par  Caldera
  <http://www.caldera.com/>) permet d'employer partout StarOffice.

  11..11..  MMoottiiff

  StarOffice utilise la version 2.0 de la bibliotheque Motif.
  _M_o_t_i_f _1_._2 ou _L_e_s_s_T_i_f ne permettront donc pas  d'exploiter  le  binaire
  dependant de bibliotheques dynamiques.

  La  version  "statique"  du programme, generee de facon a integrer les
  bibliotheques, fonctionne partout mais induit  une  charge  severe  du
  systeme.

  StarOffice  fonctionne  bien sur mon Pentium 100 disposant de 48 Mo de
  memoire vive, sous Linux Red Hat 4.1 et Motif 2.0.  Le  chargement  de
  la  version  "dynamique"  exige  beaucoup  moins  de ressources que la
  version "statique" et dure environ une minute.

  22..  PPoouurr oobbtteenniirr SSttaarrOOffffiiccee

  La la plus recente disponible <ftp://ftp.gwdg.de/pub/linux/staroffice>
  se  trouve  sur  le serveur FTP de Lire le fichier "README.StarOffice"
  avant de telecharger les archives proposees.

  Ces fichiers se trouvent aussi sur d'autres serveurs FTP, par  exemple
  (France              metropolitaine)              au              LIP6
  <ftp://ftp.lip6.fr/pub/linux/staroffice/>

  Liste des archives a telecharger (cas de la version 3.1) :

  +o  StarOffice31-common.tar.gz

  +o  l'une des archives de documents standard et d'exemples :

  +o  StarOffice31-english.tar.gz (version anglaise) ou

  +o  StarOffice31-german.tar.gz (version allemande)

  +o  l'une des archives de binaires :

  +o  StarOffice31-dynbin (dynamiques) ou

  +o  StarOffice31-statbin.tar.gz (statiques)

  +o  (le cas echeant) StarOffice31-upgrade2final.tar.gz

  Note  :  l'editeur  Caldera  <http://www.caldera.com/>  propose  aussi
  StarOffice,  par  exemple  sous  forme  de  CD-ROM  vendu 7,99 dollars
  americains.

  33..  IInnssttaallllaattiioonn

  Voici les etapes de l'installation de StarOffice :

  +o  l'utilisateur _r_o_o_t doit decompacter sous  /usr/local  les  archives
     _t_a_r fournies

  +o  chaque  utilisateur  doit  lancer  au  moins  une fois le programme
     d'installation locale

  +o  chaque  utilisateur  doit  "sourcer"  un  fichier  cree   lors   de
     l'installation locale

  +o  chaque  utilisateur  lira  avec  profit  la  section de ce document
     consacree a ``LANG''.

  33..11..  BBiibblliiootthheeqquuee CC ((lliibbcc))

  Les binaires de  StarOffice  reposent  sur  la  version  5.4.4  de  la
  bibliotheque  C, et fonctionneront avec la libc 5.3, mmaaiiss le programme
  d'installation ne donne satisfaction qu'avec une version  de  libc  au
  moins egale a 5.4.4.

  Une  solution  (non  testee)  permettant  d'installer le logiciel sans
  mettre a jour consisterait a desarchiver une  libc  adequate  dans  un
  repertoire   temporaire   puis   a  la  referencer  dans  la  variable
  d'environnement   _L_D___L_I_B_R_A_R_Y___P_A_T_H   avant   d'invoquer    l'utilitaire
  d'installation.

  Il  est  inutile  d'essayer  d'employer  une libc trop ancienne car la
  procedure d'installation echoue en ce cas avec le message d'erreur :

   line 1: Syntax error at token 'I' expected declarator;

  33..11..11..  MMiissee aa jjoouurr ddee llaa lliibbcc

  La plus recente version de la libc  se  nomme  _l_i_b_c_-_V_E_R_S_I_O_N_._b_i_n_._t_a_r_._g_z
  (par  exemple  _l_i_b_c_-_5_._4_._3_3_._b_i_n_._t_a_r_._g_z) et se trouve dans le repertoire
  /pub/linux/GCC des sites FTP (par exemple _f_t_p_._l_i_p_6_._f_r).

  En extraire le contenu dans un repertoire temporaire puis, en tant que
  root,  copier  le  fichier  libc.so.* dans le repertoire /lib. Etablir
  ensuite le lien symbolique necessaire a sa prise en charge grace a  la
  commande :

  ln -sf /lib/libc.so.VERSION /lib/libc.so.5

  ou _V_E_R_S_I_O_N remplace le numero de version.

  Les  utilisateurs  de  la  distribution  Red Hat utiliseront plutot le
  paquet _r_p_m adequat.

  Le _D_r_. _R_o_m_a_n_o  _G_i_a_n_n_e_t_t_i  (romano@iet.unipi.it)  nous  revele  comment
  installer sans mise a jour de la libc sur une machine Red Hat 4.2 avec
  libc5.3 :

  1. recuperer une libc.so.5.4.x, pas exemple sous forme de rpm  (il  se
     trouve  dans  le repertoire contrib des sites FTP). L'extraire dans
     un repertoire temporaire vide grace  a  :  rpm2cpio  libc.so.5.4.x-
     y.rpm  |  cpio  --extract  --make-directories.  La  bibliotheque se
     trouvera dans le repertoire ./lib

  2. deplacer libc.so.5.4.x idans votre repertoire home.  Puis  (correct
     sous  un  shell  de la famille sh): ln -s libc.so.5.4.x libc.so.5 ;
     export LD_LIBRARY_PATH=$HOME:/lib:/usr/lib

  3. invoquer setup

  33..11..22..  IInnssttaallllaattiioonn dduu pprrooggrraammmmee

  Il suffit, en tant que _r_o_o_t, d'extraire  les  archives  de  StarOffice
  sous /usr/local/ :

  cd /usr/local
  tar -xzvf NOM_DU_FICHIER.tar.gz

  33..11..33..  CCoonnffiigguurraattiioonn

  Chaque  futur  utilisateur  de  StarOffice doit invoquer les commandes
  suivantes :

  cd /usr/local/StarOffice-3.1

  puis  opter  pour  la  "standard  installation".   Il  est  recommande
  d'accepter  d'installer dans le chemin de repertoire propose ("default
  installation path").

  StarOffice utilise un certain  nombre  de  variables  d'environnement.
  Les  fichiers  ~/.sd.sh  (pour  le shell Bourne) et ~/.sd.csh (pour le
  shell C) mettent en place les valeurs adequates. Les  utilisateurs  de
  _b_a_s_h devront placer a la fin de leur fichier ~/.bashrc une ligne :

  source ~/.sd.sh

  Cette  necessaire  modification  ne  sera prise en charge que lors des
  connexions ("login") suivantes.

  33..11..44..  BBoogguuee ddee CCaallddeerraa OOppeennLLiinnuuxx

  Phil  Reardon  <mailto:pcr@busprod.com>  indique  que   la   procedure
  d'installation  du StarOffice d'OpenLinux ajoute a l'un des chemins de
  repertoires un caractere '/' inutile. Pour  resoudre  ce  probleme  il
  suffit  de  supprimer  le  premier  caractere '/' apparaissant dans la
  ligne :

  exec ${pfad:='.'}/linux-x86/bin/$name;;

  Il faut donc supprimer le '/' place avant "linux-x86".

  33..11..55..  VVaarriiaabbllee dd''eennvviirroonnnneemmeenntt LLAANNGG

  Les fichiers ~/.sd.sh et ~/.sd.csh lient la  variable  d'environnement
  _L_A_N_G  a une valeur, ce qui oblige divers programmes (dont _P_e_r_l et _m_a_n)
  a emettre  des  messages  d'avertissement,  par  exemple  :  "warning:
  setlocale(LC_CTYPE,  "")..."  ou  bien  "Failed  to  open  the message
  catalog man on the path NLSPATH=".

  Il suffit, pour s'en affranchir, de supprimer la  ligne  "LANG=us"  de
  ~/.sd.sh et la ligne "setenv LANG us" de ~/.sd.csh.

  Merci  a  Adam  L.  Klein  <mailto:alklein@adelphia.net>,  de  m'avoir
  indique cela.

  44..  IInnvvooccaattiioonn

  Lancer au prealable une seule instance par machine de :

  +o  "svdaemon" afin de disposer de l'aide en ligne

  +o  "svportmap" afin d'assurer la communication entre les applications

  Pour invoquer StarOffice :

       export LANG=fr
       \&. ~/sd.sh
       /usr/local/StarOffice-3.1/linux-x86/bin/soffice3

  Lors de la premiere invocation  bien  verifier  que  les  chemins  des
  fichiers de configuration sont corrects (menu " options ").

  Les   binaires   sont  abrites  dans  /usr/local/StarOffice-3.1/linux-
  x86/bin/ et se nomment soffice3,  sdraw3,  swriter3,  scalc3,  smath3,
  schart3 et simage3.

  55..  AAssttuucceess

  Voici    diverses    astuces    communiquees   par   _P_a_t_r_i_c_k   _D_'_C_r_u_z_e
  (pdcruze@netpal.com.au)

  1. Les  variables  d'environnement  mises  en  place  par  .sd.sh  (ou
     supprime  leur  "sourcing"  dans  mes  fichiers d'initialisation du
     shell (par exemple .bash_profile). Puis ai copie le fichier  .sd.sh
     sous  le  nom de /usr/local/bin/swriter et y ai ajoute une premiere
     ligne #!  /bin/bash et une ligne exec swriter3  $*  a  la  fin.  Il
     suffisait   des   lors   de   le   rendre  executable  (chmod  a+rx
     /usr/local/bin/swriter) afin de permettre a  tout  utilisateur,  en
     l'invoquant, d'utiliser StarWriter.

  2. De  nombreux utilisateurs affirment que le chargement de StarOffice
     exige beaucoup de temps (jusqu'a une minute). Ce delai  correspond,
     selon  les  auteurs de la plupart des articles Usenet pertinents, a
     l'allocation de memoire effectuee par l'editeur de liens dynamiques
     ld.so  pour  chaque  symbole  reference par Star Office. Ce dernier
     exploite un nombre  eleve  de  bibliotheques,  l'editeur  de  liens
     explore  par  consequent  une  quantite importante de fichiers. Une
     solution consiste a confiner StarOffice, grace a chroot,  dans  une
     arborescence  ou  se trouveront dupliquees les seules bibliotheques
     necessaires (/usr/X11R6/lib, libc/libm et  libg++/libstdc++),  afin
     d'epargner  a  l'editeur de liens dynamiques d'inutiles recherches.
     StarWriter, sur mon P13/32 Mo, demarre ainsi en 15 secondes.

  66..  PPrroobblleemmeess ddiivveerrss

  En    cas    de    probleme    de    fontes    :    chmod    -R    a+r
  /usr/local/StarOffice3.1/Xp3

  En  cas  de  probleme  d'impression  invoquer,  en  tant que root, les
  commandes suivantes :

  ______________________________________________________________________
  mkdir /tmp/XpSp_
  mkdir /tmp/Xp_
  mkdir /tmp/XpSp_/tmp
  mkdir /tmp/Xp_/tmp
  chgrp -R users /tmp/XpSp_
  chgrp -R users /tmp/Xp_
  ______________________________________________________________________

  77..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  +o  StarDivision  <http://www.stardivision.com/>,  en  particulier   le
     forum <http://www.stardivision.com/support/foren/grplist.html>.

  +o  M.  Hoennig <http://www.on-line.de/~michael.hoennig/soffice4-linux-
     faq-01.html>, donc la GUILDE propose  une  adaptation  en  francais
     <http://www.guilde.asso.fr/guilde/contrib/soffice4-linux-
     faq-33.html>.

     Voici   un    autre    document    traitant    de    Star    Office
     <http://www.waldherr.org/soffice/> (concerne surtout la Red Hat 5).

  88..  SSeeccttiioonn aajjoouutteeee ddaannss ll''aaddaappttaattiioonn eenn ffrraannccaaiiss

  88..11..  FFrraannccoopphhoonneess

  Voici comment faire  fonctionner  les  touches  mortes  d'accentuation
  <http://web.fdn.fr/~tquinot/dead-keys.fr.html>.

  Saisir  les  accents  sous  Applixware  est possible grace a une table
  xmodmap <../Fr-HOWTO/point_Xmodmap.gz> adequate.

  88..22..  IInnssttaallll ddee _J_P _L_e_c_a_i_l_l_e _<_m_a_i_l_t_o_:_l_u_l_l_a_b_y_@_c_l_u_b_-_i_n_t_e_r_n_e_t_._f_r>  _(_S_O  _4
  _s_o_u_s _R_H _5_)

  Je precise que j'utilise la Red Hat 5.

  je decompresse so40_lnx_01.tar.gz dans le repertoire /usr/local,  puis
  libc-5.4.44.bin.tar.gz dans le meme repertoire (je ne me rappelle plus
  ou j'ai trouve la libc, je suppose que c'est accessible sur FTP Search
  <http://ftpsearch.ntnu.no/>).

  Ensuite je me place dans le repertoire /usr/local/Office40_Install/lib
  et je fais :

       ln -s libc.so.5.4.44 libc.so
       ln -s libc.so.5.4.44 libc.so.5
       ln -s libm.so.5.0.9 libm.so
       ln -s libm.so.5.0.9 libm.so.5

  J'edite le fichier setup du repertoire /usr/local/Office40_Install  et
  je le change en :

       #!/bin/sh
       #
       # StarOffice setup script
       # (c) 1997, Star Division GmbH

       cd `dirname $0`
       sd_archive_path=`pwd`
       sd_setup_binary=setup.bin
       sd_platform=`uname -s`

       # some platforms may need an additional search path for X11 shared libraries
       case $sd_platform in
         SunOS)
                LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/openwin/lib
                export LD_LIBRARY_PATH
                ;;
             *)
                LD_LIBRARY_PATH=/usr/local/Office40_Install/lib/:$LD_LIBRARY_PATH
                export LD_LIBRARY_PATH
                ;;
       esac

               export SAL_FONTPATH XPPATH

       # execute setup binary
       exec $sd_archive_path/$sd_setup_binary $*

  Il ne reste plus qu'a invoquer ~/Office40_Install/setup /net.

  99..  CCoonnttrriibbuuttiioonnss

  Merci  de  contacter  l'auteur ou le traducteur de ce document si vous
  disposez d'informations interessantes.

  Cette adaptation francaise doit beaucoup a J. Chion et a P. Vaur.

  1100..  CCooppyyrriigghhtt

  Ce document est (C) 1997 by Matthew Borowski.

  La redistribution de ce  document  par  tout  moyen  electronique  est
  permise  sous condition qu'il demeure inchange. Si vous voulez inclure
  ce document dans un CD-ROM ou  un  livre,  demandez  une  autorisation
  auparavent (je prefere que les demandes soient effectuees par courrier
  electronique).

  L'auteur decline toute responsabilite quant a ce qui pourrait  advenir
  directement  ou indirectement du fait de l'utilisation de ce document.
  L'auteur n'est pas employe chez de StarDivision, GmbH ou Caldera, Inc.

  Commentaires et questions peuvent etre adresses directement a l'auteur
  a mkb@poboxes.com.

  Partage des fichiers d'echange entre LINUX et Ms-Windows
  H. Peter Anvin  hpa@yggdrasil.com
  v 1.3, 19 Juin 1995

  Copyright  (c)  1994,  1995 H. Peter Anvin.  Toute remarque ou commen-
  taire concernant la traduction de ce HOWTO peuvent etre envoyees a  la
  personne concernee. Traduction de Pierre Tane tanep@usa.net

  11..  IInnttrroodduuccttiioonn

  Nombreux sont ceux qui utilisent conjointement Linux et Ms-Windows. La
  possibilite de le faire tient une place importante dans la 'revolution
  Linux'. En effet, cela permet aux gens d'experimenter (et d'en devenir
  accro)  Linux  tout  en  etant  toujours  capables  d'executer   leurs
  programmes commerciaux. Comme Linux et Ms-Windows utilisent un systeme
  de memoire virtuelle sous la  forme  d'un  fichier  d'echange  sur  le
  disque  dur,  une  question  frequemment  postee a comp.os.linux.setup
  etait 'Comment partager le fichier d'echange de  maniere  a  minimiser
  l'espace disque necessaire ?'.

  Il  y  a  diverses  methodes  pour  partager l'espace d'echange, celle
  decrite ici etant sans doute la plus compliquee tout en etant la seule
  parmi  celles  que  j'ai  rencontrees  qui  autorise  les performances
  maximales pour les deux environnements  sans  risque  de  planter  une
  partition du disque.

  NOTE : si vous aviez une version precedente de ce document et que vous
  ayez eu des problemes avec la recuperation de votre fichier  d'echange
  (Windows  disant  que  celui-ci  est  corrompu),  essayez  la  version
  legerement modifiee du script shutdown incluse dans cette version.

  22..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn

  Il y a des prerequis avant d'entamer la procedure decrite  ci-dessous.
  Je  vous  recommande  fortement  de remplir strictement les conditions
  enoncees sous peine de problemes serieux avec les anciennes  versions.

  +o  MS-DOS 5.0 ou plus

  +o  MS-Windows 3.1 ou plus

  +o  Un fichier shutdown ou init qui sache lancer un programme au moment
     du shutdown (comme le paquetage SysVinit-2.50, qui peut-etre obtenu
     sur  sunsite.unc.edu dans /pub/Linux/system/Daemons. Presque toutes
     les distributions utilisent ce paquetage pour init). NdT : la  date
     de ce document etant ancienne, cela n'est peut-etre plus le cas.

  33..  LLaa pprroocceedduurree

  +o  Lancez  le  DOS.  Creez  une  partition  DOS (a l'aide de FDISK) de
     taille egale a  la  taille  que  vous  voulez  pour  votre  fichier
     d'echange.  Il  va  lui  etre  assigne une lettre par laquelle vous
     allez remplacer X a chaque fois que la procedure fait mention d'une
     commande telle que 'LABEL X: ' ou 'COPY FOO X:DUMMY.DAT'

  +o  Formatez cette partition en utilisant la commande FORMAT du DOS :

       ______________________________________________________________________
       FORMAT X:
       ______________________________________________________________________

  +o  Changez  le  nom  de  volume de cette partition pour 'SWAP SPACE' a
     l'aide de la commande DOS LABEL. Verifiez ensuite avec la  commande
     DIR.  Veillez  a  faire  l'operation  en  deux  temps car certaines
     versions de FORMAT n'ecrivent pas le nom de volume dans le  secteur
     de  demarrage comme elles le devraient. (Note : certaines personnes
     m'ont ecrit pour me dire que le nom de voume  est  stocke  dans  le
     repertoire  racine.  Cela est vrai mais depuis DOS 5.0 au moins, il
     figure aussi dans le secteur de demarrage.)

       ______________________________________________________________________
       LABEL X:
       DIR X:
       ______________________________________________________________________

  +o  Demarrez  Windows.  Allez  dans  le   Panneau   de   Configuration,
     selectionnez '386 Enhanced' et creez un fichier d'echange permanent
     sur le lecteur X : de la taille maximale (Windows vous informera de
     la  taille maximale). Window se plaindra peut-etre du fait qu'il ne
     va pas utiliser un fichier d'echange aussi gros. Ignorez le message
     et creez tout de meme le fichier.

  +o  Sortez de Windows

  +o  Demarrez Linux et loggez vous en tant que root

  +o  Utilisez  la  commande fdisk pour trouver le nom de la partition et
     sa taille en blocks. Creez un lien symbolique de /dev/winswap  vers
     cette partition. Si la partition est /dev/hda7 alors vous taperez :

       ______________________________________________________________________
       ln -s /dev/hda7 /dev/winswap
       ______________________________________________________________________

  (Note pour les puristes : Veuillez etablir un lien symbolique. Le  nom
  de  cette  partition va se retrouver dans de nombreux fichiers de con-
  figuration et des incoherences seraient fatales.)

  +o  Ce qui suit est un fichier binaire encode par uuencode qui  analyse
     la  partition et en extrait des informations particulieres. Decodez
     le fichier par uudecode, gunzip-pez le et executez le par :

       ______________________________________________________________________
       msinfo /dev/winswap
       ______________________________________________________________________

  begin 755 msinfo.gz
  M'XL(`$$YNRT"`Y557TQ;51@_MW]HZ0AM'"$U.28W([..>84%1%D2QH>',9*M2S&VC);
  V=FV]T*;WWBD+1I)K'YH;DOJF#YH80GPR^J""D"R8K('MS2;#Q*SM%Y,EP&592A$V:[?.;?M"F
  P/?DG/G^_[?7_Z_3G7PL313TT(?8P0<J"CI':8M$5H^#:=5<KT^MQ`^UAQ1O*QUH0<.]B
  7S/FC[U!98Y;))]<*N^AG"^LB((J%EMAFIM[A9U0O`;%:*7N#[L%G!_IH34V(J,WUZ.CK%O6I#N
  4DTE,E144Q7T)M>]_PX\M<3@!`'ZZ26[`I7A.F!%$;JK.;21`!#.\,5A/CK)\=B3FL:3F8PH
  M<#$QDSO91Q%^>L%"Z@KW*"NR3;""5SN,A?'NI[0=P0Q=#[P&&$5@3UNZ3VWM=(V
  `NYQ/)6CX)DC2F`KD!&C/!:R7"Q%]L6`8'D+=]8T*^$V8@RR\;5\P9(M^;\&T:F]E`Q`EI
  ,_6YHCZBT#BJ09M0VV9!:XVKLF]0NX%'Z4R];\W](3A%JMI:`_&12!>@33QC0S'V8]?O5+0
  `;3UC23K)!"?@97N8R#:29MF/>R)PI>UJF)MK%/4QR39OSJE8,8MHZ)UC#`?1ZX'N!ZU`L'X
  ;@.?X["C<1DUT%,9QW32C''M"<98PQR#8#=(L'>96NQWR/4W1@>H3\'!OC3,MMN_"[
  ,=A1OVK^XEH($[$S^HMY@28=MB78$/`=8)(L=\P*$5*I_LS@)_G7!=\Z9V@F"``Y$XQM[T!T>(W
  HNUM/T9CH)YIZI("&9ZK32AR=DTN/QNZ."&7?27H_<(=_^=Q"U1N3Y.>!E`$BY(M
  ;(4ZG)/[\_0F_54HY7\5[<!33)\2M%:Y(.THX_N%K?%2L9&(O=4>8F^@IV9(M,<HE
  DU:17T'23M)GA#ANW<F'J5]>6!G2;BU+YN)@<RL.JBIFD4[:<###UGMO3Z77WO?L?O
  +@@G\+(<"X&QT"&#_N7@_\2;JGAEF&U1`JR#ZCD/Z]7HJ'ZHM09_JNAZGJ^N?X5
  &J#UYJW>4#"7/#D,0/GG`0ZI@__`;6>]K!>C[<GDM31/IQP>:!B]D?DT,*
  <;Y6=9Y]3:P][^W`?+>8F(1!*ZY7B1:BN=@D_XY9?0IM'?ZT0=V@BBWIIV$47#Y@7,9Q>
  0<*=7;NMWNS2>9#_X3V)8()?A$;!`ALRWM#&\%RO_^@9F6TP<]'M8J@'AFA"[JM]0
  (WCQ!`[.826!F&A@HG4JWU5R_KKL&M9GNQF$;J[?NZ\YUZ?B].C,OEWI*\94J`:6LB?U,R
  K^2.([0QRQK(W!D2[K5MM,G>&0B7A'K03F"'17*&L#9XU@+U2L9K4GCIG(K(NE:SM,
  >SM,?;X,T:&U6,MT./E%NAUTNE_$,^E(A0M!B7K[D'>X6'\FC25Q3W=+V3YLR^CXJW.S
  0>#54*#M#ZE^AI+N35^_>![U4!?@VQ%ET<L!BC>MC5"\GH>"T6'4/2NS>((N
  0,DT>_9K6^!S%65KRS`,`,UVB43\!]-BKG]B`<``#5"`
  end

  Prenez en note le nombre apres 'Total special sectors' et verifiez que
  le  nom  du  volume est 'SWAP SPACE'. Si ce n'est pas le cas, rebootez
  DOS et renommez le par LABEL. Si ca ne marche toujours  pas,  veuillez
  me  communiquer la version de DOS que vous avez et j'essaierai de vous
  aider.

  +o  (Etape optionnelle) Windows laissera peut-etre de la place  sur  la
     partition  meme si on lui indique de ne pas le faire. N'essayez pas
     d'occuper cet espace car il  sera  efface  a  chaque  lancement  de
     Linux.  Si vous voulez eviter de l'utiliser accidentellement (et de
     perdre des donnees), vous pouvez  creer  un  fichier  qui  remplira
     l'espace laisse vacant avec :

       ______________________________________________________________________
       mkdir /mnt
       mount -t msdos /dev/winswap /mnt
       dd if=/dev/zero of=/mnt/dummy.fil
       umount /mnt
       ______________________________________________________________________

  La commande dd renverra 'No space left on device'. C'est exactement ce
  que vous vouliez.

  +o  Verifiez le nom  du  fichier  shutdown.  Pour  SysVinit,  c'est  le
     fichier mentionne dans la ligne suivante de /etc/inittab ; veuillez
     la rajouter si elle n'y est pas.

  ______________________________________________________________________
  # Runlevel 0 means shut down the system
  l0:0:wait:/etc/brc
  ______________________________________________________________________

  Pour le reste de la procedure, je considererai que le nom  du  fichier
  est /etc/brc.

  +o  Tapez :

       ______________________________________________________________________
       dd if=/dev/winswap bs=512 count=XXX | gzip -9 > /etc/winswap.gz
       ______________________________________________________________________

  ou XXX est remplace par le nombre 'Total special sectors'.

  +o  Ajoutez le code suivant a votre fichier /etc/rc (ou le nom que init
     lui donne), juste avant la commande 'swapon -a'  (s'il  n'y  a  pas
     cette  commande,  ajoutez  la  a  votre  fichier  /etc/rc avant les
     commandes mount).

     Si vous avez un repertoire /etc/rc.d, le fichier dans  lequel  vous
     introduirez  ce  qui  precede devrait s'appeler '/etc/rc.d/rc.S' ou
     '/etc/rc.d/rc.boot'.

     Si swapon est dans /etc, remplacez  /sbin/swapon  par  /etc/swapon.
     S'il  est  dans  /bin, remplacez-le par /bin/swapon. Faites la meme
     chose pour mkswap.

     Remplacez XXXXX par la taille de votre  partition  en  blocs  telle
     qu'elle vous fut donnee par fdisk.

       ______________________________________________________________________
       ---[BEGIN CODE SEGMENT]---
       #
       # Verify and initialize swap space
       #
       echo -n 'Verifying swap space... '
       if [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=10 skip=4086`" \
          = 'SWAP-SPACE' ]; then
         echo 'Linux signature found'
         /sbin/swapon /dev/winswap
       elif [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=11 skip=43`" \
          = 'SWAP SPACE ' ]; then
         echo 'DOS signature found'
         /sbin/mkswap /dev/winswap XXXXX
         /sbin/swapon /dev/winswap
       else
         echo 'No signature found'
         echo 'ERROR: Will not swap'
       fi
       ---[END CODE SEGMENT]---
       ______________________________________________________________________

  +o  Ajoutez  la  section  de  code  suivante  a  votre fichier /etc/brc
     (quelque soit son nom, a savoir /etc/rc.d/rc.0 ou /etc/rc.d/rc.halt
     si  vous  avez  un  repertoire  /etc/rc.d).  Ajoutez le apres toute
     commande qui necessite que le swap soit en place.

       ______________________________________________________________________
       ---[BEGIN CODE SEGMENT]---
       #
       # Terminate swapping and restore DOS/Windows swap info
       #
       /sbin/swapoff /dev/winswap
       if [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=10 skip=4086`" \
          = 'SWAP-SPACE' ]; then
         echo 'Restoring DOS/Windows swap info'
         /bin/zcat /etc/winswap.gz > /dev/winswap
       else
         echo 'ERROR: /dev/winswap lacks swap signature, skipping restore'
       fi
       ---[END CODE SEGMENT]---
       ______________________________________________________________________

  +o  Relancez Linux. Vous  devriez  normalement  utiliser  la  partition
     creee comme partition d'echange.

  44..  QQuueellqquueess rreemmaarrqquueess

  +o  Pas   besoin   de  rajouter  votre  /dev/winswap  dans  le  fichier
     /etc/fstab, il est d'ailleurs preferable de ne pas le  faire  (sauf
     peut-etre en commentaire).

  +o  Si  votre  session  Linux  se  plante  ou  fonctionne  sans  lancer
     /etc/brc, vous aurez a rebooter et a sortir de Linux avant  que  le
     swap  ne  marche  sous  Windows. Il est egalement possible de faire
     FORMAT X : et de recreer le fichier d'echange de Windows. La  seule
     maniere  de  contourner  ce probleme serait de mettre un equivalent
     des commandes de /etc/brc  dans  le  fichier  AUTOEXEC.BAT  du  DOS
     (malheureusement, je ne connais aucune maniere de le faire sous DOS
     !).

  +o  Si le FDISK du DOS reconnait la partition comme etant 'logical  DOS
     drive',  elle  a  un numero de 5 ou plus (comme dans /dev/hda5). Ce
     n'est pas la partition denommee 'extended' qui a un numero de 4  ou
     moins  !  Si  votre  fdisk  de  Linux  n'affiche pas les partitions
     logiques, votre fdisk  Linux  est  endommage  (Slackware  2.2,  par
     exemple  comprenait un fdisk endommage). Vous pouvez essayer cfdisk
     si vous l'avez dans votre distribution ou vous devrez recuperer une
     version de fdisk qui fonctionne.

  +o  Si  vous obtenez une exception float en lancant msinfo, vous l'avez
     surement execute sur la mauvaise partition. Voir  la  remarque  ci-
     dessus.

  +o  Veuillez  ne  pas m'envoyer de mail a moins que vous n'ayez verifie
     et reverifie que vous avez recopie vos scripts  correctement.  Plus
     de  la  moitie des problemes concernant ce Mini-HOWTO etaient dus a
     des erreurs typographiques dans le recopiage des scripts. (utilisez
     le copier-coller si vous le pouvez !).

F 3-BUTTON.;1                       	3-Button-Mouse
F ADSM-BAC.;1                       	ADSM-Backup
F ADVOCACY.;1                       	Advocacy
F ALSA.;1                           	Alsa
F ALSA-SOU.;1                       	Alsa-sound
F ANON-FTP.;1                       	Anon-ftp
F APACHE_S.;1                       	Apache+SSL+PHP+fp
F AUTOMOUN.;1                       	Automount
F BATTERY-.;1                       	Battery-Powered
F BOGOMIPS.;1                       	BogoMips
F BRIDGE.;1                         	Bridge
F BRIDGE_F.;1                       	Bridge+Firewall
F BTTV.;1                           	BTTV
F BZIP2.;1                          	Bzip2
F CABLE-MO.;1                       	Cable-Modem
F CD-WRITI.;1                       	CD-Writing
F CLOCK.;1                          	Clock
F COLOUR-L.;1                       	Colour-ls
F CYRUS-IM.;1                       	Cyrus-IMAP
F DHCP.;1                           	DHCP
F DHCPCD.;1                         	DHCPcd
F DHCPD.;1                          	DHCPd
F DIAL-ON-.;1                       	Dial-On-Demand
F DIALD.;1                          	Diald
F DISKLESS.;1                       	Diskless
F DPT-HARD.;1                       	DPT-Hardware-RAID
F DYNAMIC-.;1                       	Dynamic-IP-Hacks
F EXT2FS-U.;1                       	Ext2fs-Undeletion
F FAX-SERV.;1                       	Fax-Server
F HARD-DIS.;1                       	Hard-disk-upgrade
F HTML-VAL.;1                       	HTML-Validation
F INSTALL-.;1                       	Install-From-ZIP
F IO-PORT.;1                        	IO-Port
F IP-ALIAS.;1                       	IP-Alias
F IP-MASQU.;1                       	IP-Masquerade
F IP-SUBNE.;1                       	IP-Subnetworking
F ISP-CONN.;1                       	ISP-Connectivity
F JAZ.;1                            	Jaz
F JAZ-DRIV.;1                       	Jaz-Drive
F KERNELD.;1                        	Kerneld
F LARGE-DI.;1                       	Large-Disk
F LARGE-ID.;1                       	Large-IDE
F LBX.;1                            	LBX
F LEASED-L.;1                       	Leased-Line
F LILO.;1                           	LILO
F LINUX-MO.;1                       	Linux-Modem-Sharing
F LINUX_DO.;1                       	Linux+DOS+Win95+OS2
F LINUX_FR.;1                       	Linux+FreeBSD
F LINUX_NT.;1                       	Linux+NT-Loader
F LINUX_WI.;1                       	Linux+Win95
F LOADLIN_.;1                       	Loadlin+Win95
F LOOPBACK.;1                       	Loopback-Root-FS
F MAC-TERM.;1                       	Mac-Terminal
F MAIL2NEW.;1                       	Mail2News
F MAN-PAGE.;1                       	Man-Page
F MIDI_SB.;1                        	MIDI+SB
F MODULES.;1                        	Modules
F MULTI-ET.;1                       	Multi-Ethernet
F NCD-X-TE.;1                       	NCD-X-Terminal
F NEWS-LEA.;1                       	News-Leafsite
F NFS-ROOT.;1                       	NFS-Root-Client
F NFS-ROOT.000;1                    	NFS-Root
F OFFLINE-.;1                       	Offline-Mailing
F PARTITIO.;1                       	Partition-Rescue
F PARTITIO.000;1                    	Partition
F PATH.;1                           	Path
F PLIP.;1                           	PLIP
F POSTGRES.;1                       	Postgres
F PPP-OVER.;1                       	PPP-over-ISDN
F PPP-OVER.000;1                    	PPP-over-minicom
F PRE-INST.;1                       	Pre-Installation-Checklist
F PROCESS-.;1                       	Process-Accounting
F PROXY-AR.;1                       	Proxy-ARP
F PROXY-AR.000;1                    	Proxy-ARP-Subnet
F PUBLIC-W.;1                       	Public-Web-Browser
F QMAIL_MH.;1                       	Qmail+MH
F QUOTA.;1                          	Quota
F RCS.;1                            	RCS
F REDHAT-C.;1                       	RedHat-CD
F REMOTE-X.;1                       	Remote-X-Apps
F RPM_SLAC.;1                       	RPM+Slackware
F SENDMAIL.;1                       	Sendmail+UUCP
F SENDMAIL.000;1                    	Sendmail-Address-Rewrite
F SIG11.;1                          	Sig11
F SLIP_PRO.;1                       	Slip+ProxyARP
F SMALL-ME.;1                       	Small-Memory
F SOUNDBLA.;1                       	Soundblaster-AWE
F STAROFFI.;1                       	StarOffice
F SWAP-SPA.;1                       	Swap-Space
F TERM-FIR.;1                       	Term-Firewall
F TKRAT.;1                          	TkRat
F TOKEN-RI.;1                       	Token-Ring
F ULTRA-DM.;1                       	Ultra-DMA
F UPDATE.;1                         	Update
F UPGRADE.;1                        	Upgrade
F VAIO_LIN.;1                       	VAIO+Linux
F VESAFB.;1                         	Vesafb
F VIRTUAL-.;1                       	Virtual-wu-ftpd
F VISUAL-B.;1                       	Visual-Bell
F WIN95_WI.;1                       	Win95+Win+Linux
F WIN95_WI.000;1                    	Win95+Win3x+Linux
F WINDOWS-.;1                       	Windows-Modem-Sharing
F X-TERMIN.;1                       	X-Terminal
F XFREE86-.;1                       	XFree86-XInside
F XTERM-TI.;1                       	Xterm-Title
F ZIP-DRIV.;1                       	Zip-Drive
F ZIP-DRIV.000;1                    	ZIP-Drive
F ZIP-INST.;1                       	ZIP-Install
  Mini-HOWTO Term-Firewall
  Barak Pearlmutter, barak.pearlmutter@alumni.cs.cmu.edu
  22 Mai 1996

  (Version   francaise   realisee   par  Eric  Dumas,  dumas@freenix.fr,
  dumas@Linux.EU.Org, 1er  Juillet  1997).   Ce  document  decrit  comme
  utiliser  Term pour traverser un Firewall Internet, ce que vous n'etes
  pas suppose pouvoir faire.

  11..  AAvveerrttiisssseemmeennttss ((IImmppoorrttaanntt !!))

  Je  decline  sur  le  present  document  toute  responsabilite   d'une
  quelconque  application  de  ce  qui  va  suivre.  Si  cela  echoue de
  n'importe quelle maniere, c'est votre probleme. Ce n'est pas ma faute.
  Si  vous  ne comprenez pas les risques qui decoulent de cette methode,
  ne l'utilisez pas. Si vous employez cette methode et que cela permet a
  des pirates vicieux de penetrer dans votre systeme informatique et que
  cela vous coute votre travail et a votre entreprise  des  millions  de
  dollars, ce n'est que de votre faute. Ne venez pas pleurer.

  22..  CCooppyyrriigghhtt

  Sauf contre-indication, les documents HOWTO Linux sont copyrightes par
  leurs auteurs respectifs.  Les  documents  Linux  HOWTO  peuvent  etre
  reproduits  et  diffuses  totalement ou en partie, sous n'importe quel
  support physique ou electronique du moment  ou  la  notice  legale  se
  trouve  sur  toute copie.  Les diffusions commerciales sont autorisees
  et encouragees. Toutefois, l'auteur souhaiterait etre tenu au  courant
  de telles diffusions.

  Toute  traduction,  travail  derive  contenant n'importe quel document
  HOWTO Linux doit etre convert par cette note legale.  Ainsi,  vous  ne
  pouvez  pas  creer  un  document  derive  d'un  HOWTO  et  ajouter des
  restrictions sur sa diffusion. Des exceptions  a  ces  regles  peuvent
  etre  eventuellement acceptees dans certaines conditions. Contactez le
  coordinateur des HOWTO a l'adresse qui suit.

  En  resumant,  nous  souhaitons  favoriser  la  dissemination  de  ces
  informations  _v_i_a  le  maximum de moyens de communications. Toutefois,
  nous souhaitons garder un copyright sur ces documents et souhaiterions
  etre  tenu  au  courant  de  toute  initiative  de  diffusion  de  ces
  documents.

  Si vous avez des questions, contactez Greg  Hankins,  le  coordinateur
  des  HOWTO  Linux a gregh@sunsite.unc.edu par courrier electronique ou
  par telephone au 1 404 853 9989.

  33..  IInnttrroodduuccttiioonn

  Le programme term est normalement  utilise  sur  une  ligne  serie  ou
  modem,  pour  permettre  a  plusieurs  services  machine-a-machine  de
  communiquer grace a cette simple connexion serie.  Toutefois,  il  est
  assez  utile  quelquefois  d'etablir une connexion entre deux machines
  communiquant par telnet avec term.

  L'utilisation la plus interessante reside dans la  connexion  de  deux
  machines  separees  par  des _f_i_r_e_w_a_l_l_s ou par des serveurs _s_o_c_k_s.  Les
  _f_i_r_e_w_a_l_l_s permettent l'etablissement  de  connexions  a  travers  eux-
  memes, typiquement en utilisant le protocole _s_o_c_k_s.  Ce dernier permet
  aux machines du reseau interne  de  se  connecter  a  l'exterieur,  et
  oblige  les  utilisateurs  exterieurs a se connecter en premier sur la
  machine passerelle qui leur demande un mot de  passe.   Ces  _f_i_r_e_w_a_l_l_s
  rendent  impossible,  par  exemple, la communication entre un client X
  sur  une  machine  interieure  et  un  serveur  exterieur.   Mais,  en
  configurant   une   connexion  term,  ces  restrictions  peuvent  etre
  contournees assez facilement, au niveau de l'utilisateur.

  44..  MMiissee eenn ooeeuuvvrree ggeenneerraallee

  Configurer une connexion term par-dessus une session telnet se fait en
  deux phases.

  Dans  un  premier temps, votre client habituel telnet est utilise pour
  configurer une connexion telnet et pour  se  connecter.   Ensuite,  le
  client  telnet  est  mis en sommeil, et fait en sorte que la connexion
  telnet soit transmise a term.

  55..  PPrroocceedduurree ddeettaaiilllleeee

  En detail, la marche a suivre est la suivante :

  1. A partir d'une machine a l'interieur du _f_i_r_e_w_a_l_l, se connecter  par
     telnet a l'exterieur de celui-ci et s'y loger.

  2. Sauf  si  vous  etes  sous LLiinnuuxx et que vous utilisez le systeme de
     fichiers _/_p_r_o_c (voir ci-dessous), verifiez que votre shell  est  du
     genre  sh.  C.a.d.  que votre shell par defaut soit une variante de
     csh. Appelez telnet par (setenv SHELL /bin/sh;  telnet  machine.la-
     bas.dehors).

  3. Apres s'etre loge, lancer la commande sur la machine de l'exterieur
     : term -r -n off telnet.

  Maintenant revenez  a  l'invite  telnet  sur  la  machine  locale,  en
  utilisant  le caractere d'echappement  ^]  (ou celui que vous voulez),
  puis utilisez la commande de telnet pour executer une  commande  shell
  !  pour lancer term :

  telnet> ! term -n on telnet <&3 >&3

  _E_t _v_o_i_l_a _!_!_! (Ndt : En francais dans le texte).

  (Si  vous possedez une autre version de telnet, vous risquez d'avoir a
  utiliser d'autres descripteurs de  fichiers  que  3.  C'est  facile  a
  determiner  en utilisant trace. Mais 3 semble fonctionner sur tous les
  telnet de type bsd que j'ai testes. J'ai egalement essaye sous Sun  OS
  4.x et les distributions LLiinnuuxx standard.)

  Certains  clients telnet ne possedent pas de caractere d'echapement !.
  Par exemple, client telnet diffuse  avec  la  Slackware  3.0  en  fait
  partie.    Les   sources   de   ce  client  sont  senses  provenir  de
  ftp://ftp.cdrom.com:/pub/linux/slackware-3.0/source/n/tcpip/NetKit-
  B-0.05.tar.gz,  paquetage  qui contient le caractere d'echapement. Une
  solution  assez  simple  est  de  recuperer  ces  sources  et  de  les
  recompiler.  Je n'y suis malheureusement pas arriver. De plus, si vous
  etes a l'interieur d'un firewall socks, vous devrez  avoir  un  client
  telnet  a  la  SOCKS. J'ai reussi a compiler un tel cient en utilisant
  ftp://ftp.nec.com/pub/security/socks.cstc/socks.cstc.4.2.tar.gz ou  si
  vous         etes         a         l'exterieur        des        USA,
  ftp://ftp.nec.com/pub/security/socks.cstc/export.socks.cstc.4.2.tar.gz

  Autrement,  sous  LLiinnuuxx  version  1.2.13  ou  precedentes, vous pouvez
  mettre telnet en sommeil avec  ^]^z , recuperer son pid et lancer :

     term -n on -v /proc/ < telnetpid > /fd/3 telnet

  Cela ne fonctionne plus avec les noyaux  1.3  et  superieur,  qui  ont
  verouille  certaines  failles  de securite pour eviter les acces a des
  descripteurs  de  fichiers  n'appartenant  pas  au   proprietaire   du
  processus ou a ses fils.

  66..  SSoocckkeettss ppoouurr tteerrmm multiples

  C'est  une  bonne idee de donner un nom explicite a la socket de term.
  C'est l'argument donne a telnet dans la ligne de commande ci-dessus. A
  moins   que   vous   n'ayez  la  variable  d'environnement  TERMSERVER
  positionnee  a  telnet,  vous  pouvez  appeler  les  clients  avec  le
  parametre -t, c'est-a-dire : trsh -t telnet.

  77..  LLee ffiicchhiieerr dd''iinniittiiaalliissaattiioonn ..tteerrmm//tteerrmmrrcc..tteellnneett

  J'ai  attendu  que la ligne soit claire en utilisant un verficateur de
  ligne sur ce media. J'esperais qu'il soit totalement transparent, mais
  cela semble impossible. Toutefois, le seul caractere perturbant semble
  etre le  255.  Le  fichier   /.term/termrc.telnet  que  j'emploie  (le
  fichier .telnet est le nom de la connexion term, cf. supra) contient :

  baudrate off
  escape 255
  ignore 255
  timeout 600

  Il peut etre ameliore en trichant, j'ai un debit de  seulement  30.000
  cps  (caracteres  par  secondes) pour une connexion longue distance a-
  travers un _f_i_r_e_w_a_l_l lent.  FTP  peut  aller  jusqu'a  100.000  cps  en
  suivant le meme chemin. Une vitesse en bps (bits par seconde) realiste
  peut eviter quelques temps morts.

  88..  AAddmmiinniissttrraattiioonn

  Manifestement, si vous attaquez de l'exterieur  du  _f_i_r_e_w_a_l_l,  et  que
  vous  employez  une  carte  avec un identificateur securise ou quelque
  chose de ce genre,  vous  voudrez  surement  inverser  les  roles  des
  serveurs  de connexion et local (si vous ne comprennez pas ce que cela
  signifie, vous n'etes peut-etre pas  assez  familier  avec  term  pour
  utiliser l'astuce decrite dans ce document d'une maniere responsable).

  99..  SSeeccuurriittee

  Ce n'est rien moins qu'une  faille  que  la  possibilite  d'avoir  une
  connexion   telnet   detournee   sur  une  machine  non  securisee  de
  l'exterieur.  Le premier risque supplementaire provient des  personnes
  capables  d'utiliser  la socket term que vous avez configuree sans que
  vous soyez au courant. Donc, soyez prudents (personnellement, je  fais
  cela  sur  une  machine externe que je sais etre securisee.  Pour etre
  plus precis, un portable sous LLiinnuuxx que j'administre moi-meme  et  qui
  n'accepte aucune connexion de l'exterieur).

  Une    autre    possibilite    est    d'ajouter    socket   off   dans
  ~/.term/termrc.telnet ou ajouter -u off. Cela evide que la socket soit
  accessible  du  site  distant,  avec une perte de fonctionnalite assez
  mineure.

  1100..  MMooddee tteellnneett

  Verifiez que le demon telnetd distant n'est pas dans un  mauvais  mode
  sept  bits. Si c'est le cas, vous devez l'indiquer a term lorsque vous
  le lancez en ajoutant un -a sur la ligne  de  commande  (j'emploie  de
  temps  en  temps  un  ^]  telnet> set outbin ou un set bin ou bien, je
  lance telnet avec l'option _-_8 pour  forcer  la  connexion  en  mode  8
  bits).

  1111..  BBuuggss eett mmeess ssoouuhhaaiittss ccoonncceerraanntt tteerrmm

  Le  programme  de  verification  de ligne a de temps en temps quelques
  problemes pour controler la connexion telnet. Cela provient parfois du
  fait  qu'il  ne verifie pas le code de retour de l'appel read().  Pour
  des connexions reseau, cet appel peut retourner le  code  d'erreur  -1
  avec  _E_I_N_T_R  (interrompu)  ou _E_A_G_A_I_N (reessayer).  Manifestement, cela
  serait une bonne chose que cela soit verifie.

  Un   certain   nombre   de   caracteristiques   pourraient   faciliter
  l'utilisation  de term sur telnet. Cela provient essentiellement d'une
  hypothese qui a influence le developpement de term,  qui  est  que  la
  connexion dispose d'une largeur de bande faible, d'une latence reduite
  et qu'elle est quelque peu bruitee.

  Une connexion telnet possede  en  general  une  bande  passante  assez
  importante,  une  grande  latence  et qui contient peu d'erreurs. Cela
  signifie que la connexion pourrait etre mieux utilisee si :

  1. la taille maximale de la fenetre etait augmentee, bien  au-dela  de
     la limite imposee par la formule _N___P_A_C_K_E_T_S_/_2 _= _1_6 de term

  2. une  option  pour desactiver l'envoi et la verification du _c_h_e_c_k_s_u_m
     des paquets etait implementee

  3. de plus grands paquets etaient permis lorsque cela est approprie.

  Egalement, pour ameliorer la securite, il serait  sympathique  d'avoir
  une  option  dans term pour afficher la liste des connexions realisees
  par la socket dans un fichier ou sur stderr, ou bien  dans  les  deux.
  Cela permettrait de verifier si une connexion term a ete corrompue par
  des pirates situes du cote non securise de la machine.

  1122..  TTrruuccss qquuii sseemmbblleenntt nnee ppaass ffoonnccttiioonnnneerr

  Quelques  clients  et  serveurs  telnet  acceptent   d'encoder   leurs
  communications    pour    tromper    la   surveillance   sur   reseau.
  Malheureusement,  la  methode  employee  ci-dessus  (en  utilisant  la
  connexion  reseau que le client telnet a configure pendant que l'autre
  client est en attente) ne fonctionne pas dans  ce  cas.   Au  lieu  de
  cela,  il  doit  reellement  traverser  le client telnet, donc ne peut
  realiser l'encodage. Il semble qu'il faille modifier  que  le  client,
  pour  y  a jouter une commande qui lance un processus avec leurs stdin
  et stdout connectes au telnet en cours.  Cela serait  egalement  utile
  pour des processus de connexion automatiques, peut-etre quelqu'un l'a-
  t-il deja fait.

  1133..  SSoouurrcceess

  J'ai legerement consulte la bibliotheque Term. Les details  ainsi  que
  les  patches  a  SOCKS sont disponibles en les demandant a Steven Danz
  (danz@wv.mentorg.com).

  1144..  RReemmeerrcciieemmeenntt

  Mes remerciements a

  +o  Gary Flake (flake@scr.siemens.com)

  +o  Bill Riemers (bcr@physics.purdue.edu)

  +o  Greg Louis (glouis@dynamicro.on.ca)

  1155..  CCooppiiee ssuupppplleemmeennttaaiirree ddeess aavveerrttiisssseemmeennttss --LLiisseezz--llee !!

  Je  decline  sur  le  present  document  toute  responsabilite   d'une
  quelconque  application  de  ce  qui  a  ete expose. Si cela echoue de
  n'importe quelle maniere, c'est votre probleme. Ce n'est pas ma faute.
  Si  vous  ne comprenez pas les risques qui decoulent de cette methode,
  ne l'utilisez pas. Si l'emploi de cette methode permet a  des  pirates
  vicieux  de  penetrer dans votre systeme informatique et que cela vous
  cote votre travail et a votre entreprise des millions de  dollars,  ce
  n'est que de votre faute. Ne venez pas pleurer.

  TkRat mini-HOWTO
  Dave Whitinger, dave@linuxtoday.com
  Version franaise : Philippe Martin, feloy@wanadoo.fr

  v1.2, 15 Septembre 1999

  Voici le TkRat mini-HOWTO.  Ce document est destin  quiconque
  voudrait utiliser Linux pour envoyer et recevoir des messages lec
  troniques par l'Internet.

  ______________________________________________________________________

  Table des matires


  1. Introduction

  2. Installer TkRat

  3. Rcuprer vos messages

  4. Configurer

  5. Utiliser

  6. Tri automatique des messages dans les classeurs

  7. Copyright

  8. Remerciements



  ______________________________________________________________________

  11..

  IInnttrroodduuccttiioonn

  Ce document est maintenu par Dave Whitinger (dave@linuxtoday.com).
  Merci de me contacter pour toutes questions ou ides relatives  cet
  HOWTO.

  Ce document va tenter de dcrire comment :


  1. Installer le programme de messagerie TkRat,

  2. Rcuprer ses messages chez un Fournisseur de Services Internet
     (FFSSII),

  3. Lire, stocker et envoyer des messages,

  4. Trier ses messages dans diffrents classeurs.

  Ce document suppose que vous utilisez Linux avec le systme X Window,
  avez dj tabli une connexion avec votre Fournisseur de Services
  Internet, et avez un compte POP chez ce fournisseur.

  Responsabilits : Toutes responsabilits habituelles s'appliquent.
  L'auteur ne peut en aucun cas tre tenu responsable d'une (mauvaise)
  utilisation des informations donnes ici.  Ce document ne tente en
  aucun cas de faire autorit. L'auteur a volontairement cr ce
  document sparment de toute entit avec laquelle il pourrait tre
  impliqu. En lisant ce document, vous acceptez de ne crer  l'auteur
  ni ennuis ni griefs.  :)
  22..

  IInnssttaalllleerr TTkkRRaatt

  Je voudrais souligner qu'il existe un grand nombre d'excellents
  programmes de messagerie disponibles sous Linux. C'est toujours une
  question de got personnel que de choisir lequel utiliser.

  Cela dit, je dois vous avouer que j'utilise un programme appel TkRat
  depuis plus de deux ans maintenant -- et je l'adore. C'est un
  programme avec une interface graphique qui a toutes les
  caractristiques que vous attendez d'un programme de messagerie de
  qualit : il est simple d'apprentissage, il est puissant, et il est
  libre. Pour ces raisons, cet HOWTO ne traitera que de TkRat.

  La premire chose  faire est de rcuprer TkRat. Vous pouvez soit
  obtenir les sources que vous compilerez, soit obtenir les excutables.

  Voici quelques URL pour le logiciel :


    ftp://ftp.md.chalmers.se/pub/tkrat/tkrat-2.0b3.tar.gz
     <ftp://ftp.md.chalmers.se/pub/tkrat/tkrat-2.0b3.tar.gz>
     (Tlchargement via ftp)


    http://www.dtek.chalmers.se/~maf/ratatosk/tkrat-2.0b3.tar.gz
     <http://www.dtek.chalmers.se/~maf/ratatosk/tkrat-2.0b3.tar.gz>
     (Tlchargement via http)


    http://www.dtek.chalmers.se/~maf/ratatosk/download.html
     <http://www.dtek.chalmers.se/~maf/ratatosk/download.html> (Page de
     tlchargement - vrifiez la dernire version !)


  Lorsque vous avez tlcharg l'archive, vous tes prt  l'installer
  sur votre systme.

  Pour installer les sources tar.gz, utilisez les commandes :

  ______________________________________________________________________
            tar -zcvpf tkrat-2.0b3.tar.gz
            cd tkrat-2.0b3
            ./configure
            make
            make install

  ______________________________________________________________________


  Si quelque chose choue, consultez les fichiers INSTALL et README se
  trouvant dans le rpertoire tkrat-2.0b3. Notez que vous aurez besoin
  d'une version de tcl suprieure  8.1 pour compiler.  Vous pouvez
  obtenir la dernire version de tcl depuis scriptics.com
  <http://www.scriptics.com/>.

  Bravo - TkRat devrait tre install sur votre systme maintenant.


  33..

  RRccuupprreerr vvooss mmeessssaaggeess

  Afin de lire vos messages, le mieux est gnralement d'utiliser le
  programme appel fetchmail. Les instructions suivantes sont rputes
  marcher parfaitement pour la version 2.2 de fetchmail -- bien qu'elles
  doivent tre applicables  d'autres versions.

  (Note : fetchmail est trs certainement dj install sur votre
  systme, celui-ci tant inclus dans toutes les distributions Linux que
  je connaisse - si tel n'est pas le cas, prire de me le faire savoir
  !)

  Excutez les tapes suivantes :


  ______________________________________________________________________
            echo "server pop.fr protocol pop3 username dave password xxxxx" > ~/.fetchmailrc

  ______________________________________________________________________



  (N'oubliez pas de remplacer _p_o_p_._f_r par le nom du serveur POP de votre
  FSI. Remplacez _d_a_v_e par votre identifiant de messagerie et _x_x_x_x_x par
  votre mot de passe associ.)

   partir de maintenant, chaque fois que vous voulez voir si vous avez
  des messages, tapez juste fetchmail sur la ligne de commande.
  fetchmail va partir rcuprer tous vos messages et les stocker dans
  votre classeur de messages local.


  44..

  CCoonnffiigguurreerr TTkkRRaatt


  Depuis la ligne de commande, tapez tkrat suivi d'_E_n_t_r__e.
  Cliquez sur Create.
  Lisez le message qu'il vous prsente, puis cliquez sur Continue.

   ce point, vous tes amen au programme principal de TkRat. La
  premire chose  faire est de l'adapter  votre systme local.


  1. Allez dans le menu Admin, et choisissez Preferences,

  2. Cliquez sur Sending,

  3. Entrez votre adresse lectronique dans le champ Default Reply-To,

  4. Entrez votre adresse lectronique, suivie de votre nom entre
     parenthses dans le champ Use from address, par exemple
     dave@linuxtoday.com (Dave Whitinger)

  5. Entrez votre nom de domaine dans le champ Domain. Si votre adresse
     lectronique est utilisateur@xyz.fr, entrez xyz.fr

  6. Cliquez sur Apply,

  7. Cliquez sur Method,

  8. Pour Send Via, slectionnez SMTP,

  9. Dans le champ SMTP host, entrez l'adresse du serveur SMTP de votre
     FSI (ils devraient tre capable de vous fournir cette information),

  10.
     Cliquez sur Apply, puis sur Dismiss.

  55..

  UUttiilliisseerr TTkkRRaatt

  Au dmarrage de TkRat, vous noterez que vous tes dans un classeur
  appel INBOX. Utilisez fetchmail pour rcuprer vos messages. Si vous
  en avez, ils apparatront dans le classeur INBOX.

  TkRat a une interface intuitive. La moiti suprieure de l'cran
  montre la liste des messages que vous avez reus (chaque ligne tant
  un message diffrent). La moiti infrieure montre le contenu du
  message slectionn.

  Vous pouvez lire un message en cliquant simplement sur ce message dans
  la liste.

  Lorsque vous avez fini de lire un message, vous pouvez aller voir un
  autre message, rpondre  ce message, crire un nouveau message, ou
  dplacer ce message vers un autre classeur.

  Les Folders sont un moyen de stocker vos messages lectroniques dans
  diffrents _c_l_a_s_s_e_u_r_s. Ainsi, vous pouvez conserver plusieurs
  classeurs, chacun contenant les messages sur un certain sujet.

  Excutez les instructions suivantes pour crer des classeurs :

  1. Choisissez le menu Admin, puis New/Edit Folders

  2. Vous voyez une bote avec un classeur INBOX. Cliquez (avec le
     bouton gauche) sur cette bote.

  3. Il vous est alors prsent un menu, slectionnez-y New File Folder.

  4. Il vous sera prsent une bote de dialogue vous demandant des
     informations.

  5. Dans le premier champ, entrez un nom pour le classeur.

  6. Dans le second, entrez le nom de fichier qui sera utilis pour y
     stocker les messages.
     Un petit conseil : utilisez quelque chose comme
     /home/utilisateur/mail/nom_du_classeur. Par exemple, si le premier
     champ est _P_e_r_s_o_n_n_e_l, le second serait quelque chose comme
     home/dave/mail/personnel (en supposant que votre nom d'utilisateur
     soit _d_a_v_e.)

  7. Cliquez sur OK. Vous noterez que votre nouveau classeur apparat
     maintenant dans la liste des classeurs. Allez alors dans Window,
     puis Close.

  Vous pouvez maintenant dplacer vos messages vers le nouveau classeur
  - et basculer vers ce classeur en slectionnant son nom sous le menu
  Folders.

  Envoyer des messages est aussi simple. Cliquez sur Compose, tapez
  l'adresse lectronique du destinataire, le sujet, puis le message.

  Lorsque vous avez termin, cliquez sur Send.


  66..

  TTrrii aauuttoommaattiiqquuee ddeess mmeessssaaggeess ddaannss lleess ccllaasssseeuurrss

  Si vous tes comme moi, vous recevez prs de 3500 messages par jour.
  Chaque fois que vous allez chercher vos messages (Note : _f_e_t_c_h _m_a_i_l _e_n
  _a_n_g_l_a_i_s), vous devez parcourir tous vos messages pour trouver ceux qui
  vous intressent.

  Ce n'est plus un problme, grce  Procmail.

  Procmail fonctionne ainsi :

  Procmail examine chaque message au moment o il est rcupr, et
  excute une srie de tches fondes sur certaines rgles que vous lui
  avez spcifies.

  Disons, par exemple, que je reoive 200 messages par jour d'une
  certaine liste (prenons ici la liste _l_i_n_u_x_-_m_a_c_h_i_n). Plutt que de voir
  tous ces messages partir directement dans mon classeur INBOX, je
  prfre qu'ils soient automatiquement filtrs et dirigs dans un
  classeur appel _l_i_s_t_e_-_m_a_c_h_i_n.

  La premire chose  faire est de prendre quelques exemples de messages
  provenant de cette liste et d'en examiner les enttes.

  Je commence  discerner un motif rptitif. Chaque message provenant
  de cette liste contient une ligne disant :


            Sender: owner-linux-machin@bidule.chouette.fr




  Je peux maintenant dire  procmail de placer chaque message contenant
  cette ligne dans un certain classeur.

  Je peux le prciser  procmail  travers un fichier .procmailrc.

  Je vais utiliser mon diteur de texte prfr pour crer un fichier
  texte dans mon rpertoire racine, appel .procmailrc.

  Ce fichier ressemblera  :


  ______________________________________________________________________
            LOGFILE=$HOME/.pmlog
            MAILDIR=$HOME/mail
            VERBOSE

            # liste linux-machin
            :0 Hw
            * ^.*[Ss]ender: owner-linux-machin@bidule.chouette.fr
            liste-machin

            # S'il arrive ici, l'envoyer dans mon classeur 'nouveaux'
            :0 Hw
            nouveaux


  ______________________________________________________________________



  Examinez la ligne [Ss]ender. Vous noterez que cette ligne est ce que
  tous les messages provenant de cette liste ont en commun.

  Cette section dit  procmail de placer les messages arrivant avec une
  entte comme celle-ci dans le classeur _l_i_s_t_e_-_m_a_c_h_i_n.


  La section suivante dit que si le message ne correspond  aucune rgle
  prcdente, alors il faut le placer dans le classeur _n_o_u_v_e_a_u_x.

  Maintenant, disons que je veuille que les messages de la part de mon
  ami _E_J aillent dans un classeur nomm _E_J.

  Il suffit de rajouter une section  mon fichier .procmailrc :


  ______________________________________________________________________
            LOGFILE=$HOME/.pmlog
            MAILDIR=$HOME/mail
            VERBOSE

            # liste linux-machin
            :0 Hw
            * ^.*[Ss]ender: owner-linux-machin@bidule.chouette.fr
            liste-machin

            # Message de E.J. !
            :0 Hw
            * ^.*[Ff]rom: ej@monpote.fr
            ej

            # S'il arrive ici, l'envoyer dans mon classeur 'nouveaux'
            :0 Hw
            nouveaux

  ______________________________________________________________________



  Remarquez la nouvelle section pour _E_J. Lorsqu'un message y arrive avec
  son adresse dans le champ From, il sera automatiquement plac dans mon
  classeur ej.

  Maintenant, disons qu'il y ait un boiteux par-l qui tienne 
  m'crire. Je ne veux pas entendre parler de lui, mais il insiste.
  Encore une fois - procmail  la rescousse.

  Disons alors que ne ne veuille recevoir aucun message de _B_i_l_l _G_a_t_e_s.
  Je peux dfinir un expditeur dont tous les messages seront effacs.
  Voyez alors mon nouveau .procmailrc :























  ______________________________________________________________________

            LOGFILE=$HOME/.pmlog
            MAILDIR=$HOME/mail
            VERBOSE

            # Provient-il de Bill Gates?  Si oui, A LA POUBELLE !!!
            :0 Hw
            * ^.*[Ff]rom: bgates@microsoft.com
            /dev/null

            # liste linux-machin
            :0 Hw
            * ^.*[Ss]ender: owner-linux-machin@bidule.chouette.fr
            liste-machin

            # Message de EJ !
            :0 Hw
            * ^.*[Ff]rom: ej@monpote.fr
            ej

            # S'il arrive ici, l'envoyer dans mon classeur 'nouveaux'
            :0 Hw
            nouveaux

  ______________________________________________________________________



  Maintenant, j'ai un fichier .procmailrc plutt bien. Examinons ce que
  procmail va faire de chaque message qu'il reoit.

  Premirement, il regarde si ce message provient de
  _b_g_a_t_e_s_@_m_i_c_r_o_s_o_f_t_._c_o_m. Si oui, il l'efface et c'est fait.

  Si le message est pass  travers la premire vrification, procmail
  regarde s'il contient _o_w_n_e_r_-_l_i_n_u_x_-_m_a_c_h_i_n_@_b_i_d_u_l_e_._c_h_o_u_e_t_t_e_._f_r dans
  l'entte. Si oui, il le dpose dans le classeur liste-machin, et
  voil.

  Si le message est aussi pass  travers celle-l, il regarde s'il
  provient d'_E_J. Si oui, il le place dans le classeur ej.

  Maintenant, si le message est pass  travers tous ces tests, alors il
  le place dans le classeur nouveaux.

  Une fois ces classeurs mis en place et procmail filtrant correctement
  vos messages, vous pouvez aller dans TkRat, Admin - New/Edit Folder et
  crer les classeurs pour chaque fichier. Ils seront placs dans
  /home/utilisateur/mail/nom_classeur


  77..

  CCooppyyrriigghhtt

  Ce HOWTO est Copyright 1998, 1999 par Dave Whitinger, et c'est un
  document libre.  Vous pouvez le redistribuer et/ou le modifier sous
  les termes de la GPL (GNU General Public License) publie par la FSF
  (Free Software Foundation) ; soit la version 2 de la Licence, soit une
  version ultrieure.





  88..

  RReemmeerrcciieemmeennttss

  Je remercie tout particulirement Martin Forsse'n
  (_m_a_f_@_d_t_e_k_._c_h_a_l_m_e_r_s_._s_e) pour avoir cr l'_a_g_e_n_t _u_t_i_l_i_s_a_t_e_u_r _d_e
  _m_e_s_s_a_g_e_r_i_e TkRat.

  Je remercie galement le _N_o_r_t_h _T_e_x_a_s _L_i_n_u_x _U_s_e_r_'_s _G_r_o_u_p (Dallas,
  Texas), pour qui j'ai  l'origine crit ce document dbut 1998.
  Aujourd'hui aucun remerciement ne va plus  aucun groupe
  d'utilisateurs, car je vis dans les montagnes de l'Est du Tennessee,
  o je pense tre le seul utilisateur de Linux (ou mme utilisateur
  d'un ordinateur)  50 miles  la ronde.

  Notez aussi : Nic Bernstein <mailto:nic@postilion.org> a fait
  bifurquer le code de TkRat pour crer un agent de messagerie appel
  Postilion <http://www.postilion.org/>.  Il semble tre un excellent
  agent de messagerie avec un grand nombre de nouvelles fonctionnalits
  qui ne sont pas dans TkRat, mais, nammoins, je continue  utiliser
  TkRat.













































  Token-Ring HOWTO
  Mike Eckhoff (meckhoff@zaphod.wayne.esu1.k12.ne.us).
  (eb@via.ecp.fr)
  Version 3, 5 Juillet 1995

  L'Ethernet-HOWTO  fait reference au driver Token Ring qui est en cours
  d'ecriture. Ce Howto a ete cree dans le but de vous aider a  installer
  le  patch  pour  le  noyau  et aussi essayer de mettre en evidence les
  points a surveiller. Je suggere que vous lisiez, au moins  rapidement,
  ce document, avant d'essayer d'installer quelque partie que ce soit du
  driver Token Ring pour Linux.

  11..  IInnttrroodduuccttiioonn

  11..11..  RReemmeerrcciieemmeennttss

  Remerciements a Mark Swanson, Peter  De  Schrijver,  David  Morris  et
  toutes  les  autres  personnes  que  j'aurais pu oublier qui ont rendu
  possible le support Token Ring pour Linux.

  Remerciements aussi a Larry Sanders (lsanders@iadfw.net) qui m'a  aide
  a corriger ce document.

  11..22..  MMiissee eenn ggaarrddee

  Nous ne garantissons pas que ce Howto sera valable pour votre systeme.
  De nombreuses personnes l'ont utilise avec de tres bons resultats pour
  installer Linux sur un reseau Token Ring.

  VOUS  UTILISEZ  CE DOCUMENT A VOS PROPRES RISQUES ! ... Nous ne sommes
  responsables d'aucun des problemes pouvant vous arriver  en  utilisant
  ce Howto.

  Si  vous  avez  un  quelconque  probleme qui n'est pas signale dans ce
  document, envoyez moi un mail a  meckhoff@zaphod.wayne.esu1.k12.ne.us.

  Ce  document est copyright (c) 1995 Michael Eckhoff. Vous pouvez faire
  des copies  de  ce  document  (en  entier  ou  certaines  portions  du
  document),  sur  quelque support physique ou electronique que ce soit,
  du moment que cette notice  de  copyright  soit  incluse  dans  chaque
  copie.  Une  redistribution  commerciale est autorisee et encouragee ;
  cependant, veuillez me tenir au courant afin que je verifie  que  vous
  avez la derniere version.

  22..  EExxiiggeenncceess mmaatteerriieelllleess

  Verifiez  que  vous avez une carte Token Ring qui est supportee par le
  driver. Jusqu'a present, les seules cartes supportees sont celles  qui
  utilisent le chipset Tropic.

  Les cartes qui sont reputees marcher sous Linux sont :

  +o  IBM Token Ring 16/4 Adapter ;

  +o  IBM Token Ring Adapter ;

  +o  IBM Token Ring Adapter II (4 Megabit seulement) ;

  +o  Carte IBM 16/4 ISA Token Ring (16 bit) ;

  +o  Carte IBM 16/4 ISA Token Ring (8 bit) ;

  +o  3Com TokenLink Adapter (mode IBM et 3Com) ;

  +o  HyperRing Classic 16/4.

  Veuillez  noter  qu'IBM fabrique une carte IBM Token-Ring Network 16/4
  Adapter II. Cette carte nn''eesstt ppaass rreeccoonnnnuuee ssoouuss LLiinnuuxx. Il ne faut  pas
  la confondre avec la carte IBM Token Ring Adapter II (4mbit), qui elle
  est supportee.

  Si vous trouvez une autre carte qui fonctionne sous Linux, envoyez-moi
  un  mail decrivant la marque et le type de la carte afin que je puisse
  l'inclure          dans          la          liste          precedente
  (meckhoff@zaphod.wayne.esu1.k12.ne.us).

  33..  LLeess llooggiicciieellss rreeqquuiiss

  Si  vous  utilisez  une  version  du  noyau  Linux  de la serie 1.3 ou
  superieur, le support pour le Token Ring y est deja inclus.

  Sinon, je vous encourage vivement a mettre a jour  votre  noyau  Linux
  vers un de ceux de la serie 2.0 ou superieur.

  44..  IInnssttaallllaattiioonn eett ccoonnffiigguurraattiioonn

  Installez  la carte Token Ring dans l'ordinateur et configurez-la pour
  les reglages que vous voulez utiliser. Il est  conseille  de  verifier
  que  la  carte  fonctionne  sous  Dos  ou  Windows  avant d'essayer de
  l'utiliser sous Linux. Si elle marche sous Dos ou Windows, il y  a  de
  fortes chances pour que cela marche sous Linux.

  Configurez  votre  noyau  Linux  pour  l'utilisation de la carte Token
  Ring.

       cd /usr/src/linux
       make config

  Repondre ''y'' (yes) a la question :

       Token Ring support (CONFIG_TR) [N/y/?]

  Ainsi qu'a la question :

       IBM Tropic chipset based adaptor support (CONFIG_IBMTR) [N/y/m/?] (NEW)

  Reconstruire le noyau avec les commandes :

       make dep
       make clean
       make zImage

  Il faut ensuite reconfigurer lilo pour demarrer sur ce nouveau  noyau.
  Pour   cela,   il  faut  d'abord  renommer  votre  noyau  /vmlinuz  en
  /vmlinuz.old et copier le nouveau en /vmlinuz. Sur mon  systeme,  cela
  revient a copier /usr/src/linux/arch/i386/boot/zImage en /vmlinuz et a
  editer /etc/lilo.conf pour demarrer sur ce noyau.   N'oubliez  pas  de
  lancer  lilo (avec la commande lilo) afin que les changements de noyau
  soient pris en compte.

  Si ce n'est pas deja fait, lancez le programme ``netconfig'' sur votre
  systeme. Configurez votre machine comme si celle-ci se trouvait sur un
  reseau Ethernet.

  Editez  votre  fichier  /etc/rc.d/rc.inet1   (ou   un   fichier   dans
  /etc/init.d  pour  certaines  distributions)  et  changez  toutes  les
  references a eth0 en tr0. Vous devriez avoir une ligne ressemblant a

       /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

  qu'il faut changer en

       /sbin/ifconfig tr0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

  Vous devriez maintenant pouvoir rebooter votre systeme et utiliser  la
  carte Token Ring avec votre ordinateur.

  55..  PPrroobblleemmeess ccoonnnnuuss

  J'ai  personnellement  eu  quelques  petits  problemes avec ce driver.
  Selon Peter De Schrijver, un des problemes principaux avec  ce  driver
  est le routage.

       From: Peter de Schrijver <Peter.DeSchrijver@linux.cc.kuleuven.ac.be>

       La cause principale du probleme est le routage. Si vous ne pouvez pas
       atteindre un noeud du reseau situe derriere un pont,
       vous avez un probleme
       de routage. Contactez-moi si vous rencontrez ce probleme, et j'essaierai
       de faire ce que je peux. Je n'ai pas moi-meme acces a un
       anneau comportant
       un pont, il devrait donc etre difficile de resoudre le
       probleme.

       Peter.

  Notre  reseau, ici, a la Wayne Community Schools est constitue de deux
  anneaux et d'un reseau Ethernet dont le pont est realise par  des  IBM
  8229.  Je n'ai eu aucun probleme de routage avec ces ponts.

  J'ai  aussi teste le driver sur un reseau constitue de 7 ponts, relies
  par une combinaison d'IBM 8229 et d'IBM PC utilisant le logiciel  IBM.
  Aucun probleme la non plus.

  66..  QQuueessttiioonnss

  Voici  quelques  questions  que j'ai recues par mail a propos du Token
  Ring sous Linux.

  +o  Au demarrage, j'ai le message

       tr0: Can't assign device to adapter

  Lorsque c'est le seul message produit au demarrage, cela signifie  que
  la  requete PIO d'information sur l'adaptateur est tellement en dehors
  de l'intervalle qu'il n'y a pas de carte a cette adresse d'entree-sor-
  tie (voir segment = inb(PIOaddr) dans ibmtr.c).

  +o  Ma  carte est une Olicom 16/4 Adapter. J'ai le message suivant dans
     /var/log/messages :

       May  2 10:03:14 linux kernel: tr0: Unable to assign adapter to device.
       May  2 10:03:14 linux kernel: tr1: Unable to assign adapter to device.

  Cette carte ne doit pas utiliser le chipset Tropic. Essayez d'utiliser
  une des cartes de la liste du debut du document.

  +o  J'ai  une  carte Token Ring IBM, mais j'ai les messages suivants au
     demarrage :

       May  2 16:23:07 linux kernel: tr0: PIOaddr:  a20 seg/intr: b8 mmio base:
       000dc000 intr: 0
       May  2 16:23:07 linux kernel: tr0: Channel ID string not found for PIOaddr:  a20
       May  2 16:23:07 linux kernel: tr0: Expected for ISA: 5049434f3631313039393020
       May  2 16:23:07 linux kernel: tr0:            found: 000902003021111000182000
       May  2 16:23:07 linux kernel: tr0: Expected for MCA: 4d4152533633583435313820
       May  2 16:23:07 linux kernel: tr0: Unable to assign adapter to device.
       May  2 16:23:07 linux kernel: tr1: Unable to assign adapter to device.

  Ce message indique soit un conflit memoire soit une carte  Token  Ring
  qui  n'est pas reconnue (la signature de cette carte n'est en tout cas
  pas connue).

  +o  Je trouve dans mon fichier /var/log/messages des dizaines de lignes
     de ce type :

  May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50
  msec. Donald resets adapter, but resetting
  May  3 15:11:47 linux kernel:  the IBM tokenring adapter takes a long time.
  It might not even help when the
  May  3 15:11:47 linux kernel:  ring is very busy, so we just wait a little
  longer and hope for the best.

  Ces  messages apparaissent lorsque j'essaye un telnet, un rlogin ou un
  ftp sur une machine distante. La connexion est alors  bloquee  pendant
  longtemps.

  Certaines  personnes  travaillent  a  la correction de ce probleme. Je
  mettrai a jour cette reponse lorsqu'une solution sera trouvee.

  Le Linux Ultra-DMA Mini Howto
  Brion Vibber, brion@pobox.com -- traduction : Maxime Baudin
  mbaudin@club-internet.fr
  v2.0, 7 Aot 1998

  Ce document est destin  expliquer comment utiliser des disques et
  des  interfaces UltraDMA (aussi connus sous le nom de Ultra-ATA ou
  bien Ultra-33) sous linux. La version la plus rcente de ce document
  peut tre trouve,en version originale,  l'adresse suivante :
  http://pobox.com/~brion/linux/Ultra-DMA.html. Et en version franaise
   : http://www.freenix.org/linux/mini/Ultra-DMA.html.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Mise en garde
     1.2 Remerciements
     1.3 Historique de ce document
     1.4 Copies et distribution

  2. Qu'est ce que l'Ultra DMA et pourquoi l'utiliser

     2.1 IDE, EIDE et ATAPI
     2.2 Bus Master DMA
     2.3 Ultra-DMA, ou bien Ultra-ATA, ou bien Ultra33 et tous ce qui commence par Ultra...
     2.4 Est-ce vraiment le "nec plus Ultra"
     2.5 Comparer l'UDMA au SCSI

  3. Utiliser vos disques UDMA avec une interface EIDE

  4. Utiliser vos disques avec une interface UDMA

  5. Cartes d'interfaces UDMA PCI

     5.1 La carte Promise Ultra33 IDE
     5.2 Artop ATP850UF
     5.3 Ajouter des priphriques

  6. Les interfaces UDMA intgres

     6.1 Intel FX, HX, VX, TX et LX
     6.2 Le VIA VPx et les jeux de composants apparents
     6.3 TX Pro et autres cartes "Pro"

  7. UDMA gnrique

  8. Activer et dsactiver l'UDMA

     8.1 Donner des paramtres au noyau  l'amorage
     8.2 Utiliser hdparm

  9. Problmes

     9.1 La liste noire
     9.2 Avez-vous "overclock" votre machine ?
     9.3 Votre BIOS l'accepte-t-il ?
     9.4 Et si a ne marche toujours pas...

  10. Si vous avez des infos sur l'UDMA qui ne sont pas recenses ici




  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Ce document est destin  expliquer comment utiliser des disques et
  des interfaces UltraDMA (aussi connus sous le nom de Ultra-ATA ou bien
  Ultra-33) sous Linux. Dans certains cas, vous n'aurez aucun problme
  pour exploiter ce type de matriel, mais quelques conseils permettront
  d'accrotre ses performances. Dans d'autres cas vous devrez faire
  d'normes efforts simplement pour accder  vos disques.


  11..11..  MMiissee eenn ggaarrddee


  Les informations contenues dans ce document sont (autant que je sache)
  correctes et devraient fonctionner. Toutefois, il peut y avoir des
  erreurs de frappe, de mystrieuses erreurs de transmission, ou bien
  des incompatibilits dans votre systme qui rendront inefficaces les
  techniques dcrites dans ce document. Alors avant de "faire le malin"
  avec vos disques : FAITES DES SAUVEGARDES DE VOS DONNES VITALES !!!
  Si vous ne faites pas de sauvegardes rgulires, il serait temps de
  commencer pour plus de scurit.


  11..22..  RReemmeerrcciieemmeennttss


  Michel Aubry <mailto:giovanni@sudfr.com> - patch permettant
  l'utilisation de l'UDMA sur les jeux de composants (chipsets) VIA et
  apparents pour les noyaux <=2.0.33 & d'autres infos, patch "grand
  unified UDMA" pour le 2.0.34 et +

  Andrew Balsa <mailto:andrebalsa@altern.org> - Pour ses infos gnrales
  sur l'UDMA et le patch gnrique UDMA pour les jeux de composants
  (chipsets) INTEL TX, SiS et VP1

  Maxime Baudin <mailto:mbaudin@club-internet.fr> - Traduction franaise

  Bokonon - ``Contrleur'' contre ``interface''

  John G (prefect@ipass.net) - pour la cration du patch VIA VP2 et pour
  les informations qu'il m'a donnes

  John G. <mailto:prefect@ipass.net> - Patch pour l'UDMA et le VIA plus
  quelques informations

  Martin Gaitan - pour la carte Promise ide0/ide1

  Andre M. Hedrick <mailto:hedrick@Astro.Dyer.Vanderbilt.Edu> - Patch
  "Grand unified UDMA" pour le noyau 2.0.34+, Artop ATP850UF

  Norman Jacobowitz - pour m'avoir donn des infos sur le VIA3

  John Levon - Info sur les jeux de composants TX Pro mobos

  Peter Monta - Info sur l'utilisation de deux cartes Ultra33

  Masayoshi Nakano - Traduction Japonaise


  Gadi Oxman <mailto:gadio@netvision.net.il> - pour la cration du patch
  pour la carte Promise Ultra33 et pour avoir trouv les nombres
  magiques permettant un contournement logiciel du problme.

  Andy Pearce - Suggested adding info on the additional device files for
  hde-h

  Andrei Pitis <mailto:pink@roedu.net> - LILO patch

  Brion Vibber <mailto:brion@pobox.com> - Ce document


  11..33..  HHiissttoorriiqquuee ddee ccee ddooccuummeenntt


  V2.0, 7 Aot 1998 : Grosses modifications et restructuration presque
  totale du document en deux parties : les interfaces intgrs aux
  cartes mres et les cartes d'extensions. Ajout du patch "Grand Unified
  UDMA" (composantes du patch Jumbo) pour le noyau 2.0.35. Les
  remerciements sont dsormais dans l'ordre alphabtique. Changement du
  mot "contrleur" par "interface" paraissant plus correct techniquement
  dans beaucoup de cas. Ajout d'info  propos de
  l'activation/dsactivation de l'UDMA, de la liste noire et de bien
  d'autres choses.

  v1.45, 6 Juillet 1998 : mise , jour - Red Hat 5.1 et un patch du
  noyau 2.0.34 pour la carte Promise Ultra33. Patch de LILO permettant
  de dmarrer indpendamment des cartes contrleurs PCI telles que la
  carte Promise Ultra33.

  v1.41, 3 Mai 1998 : Correction de quelques fautes, ajouts des
  traducteurs dans la section Remerciement.

  v1.4, 28 Avril 1998 : Patch gnrique pour L'UDMA, plus quelques
  informations gnrale. Ajout de la section Copie et distribution.

  v1.3, 5 Mars 1998 : infos sur le VIA VP3, de meilleures instructions
  pour les patchs, mise  jour des pointeurs pour patcher la carte
  Promise.

  v1.2, 27 Janvier 1998 : Infos supplmentaires pour l'environnement de
  la carte Promise.

  v1.1, 21 Janvier 1998 : Nouvelles infos sur le jeu de composant VIA,
  installation avec une Promise Ultra33 et validation des modes de
  transfert Bus Master et UDMA.

  v1.0, 19 Janvier 1998 : Plus ou moins complet, premire version en
  SGML.


  11..44..  CCooppiieess eett ddiissttrriibbuuttiioonn


  Ce document peut tre copi et distribu sans restriction  titre
  d'information.  Il ne doit pas tre modifi, except pour tre remis
  en page, sans la permission de l'auteur. Vous pouvez traduire ce
  document dans une autre langue, cependant il est conseill de
  contacter l'auteur en premier lieu, de sorte que les mises  jour de
  ce document vous soient envoyes en mme temps qu'au Linux
  Documentation Projet.


  22..  QQuu''eesstt ccee qquuee ll''UUllttrraa DDMMAA eett ppoouurrqquuooii ll''uuttiilliisseerr


  Voici un rapide survol des diffrentes technologies bases sur l'IDE.



  22..11..  IIDDEE,, EEIIDDEE eett AATTAAPPII


  Ce sont les "anciens" standards. La plupart des disques et contrleurs
  non-SCSI que l'on trouve actuellement sont, dsormais, au standard
  EIDE. Cependant les disques les plus rcents sont au standard UDMA.


  22..22..  BBuuss MMaasstteerr DDMMAA


  Le Bus Master DMA est une technologie permettant d'acclrer le dbit
  de vos disques durs. Elle requirt des cartes mres ainsi que des BIOS
  spcifiques et bien entendu un disque exploitant ces possibilits.

  Vous trouverez de plus amples informations  l'adresse suivante :
  http://developer.intel.com/design/pcisets/busmatr/FAQs.htm


  22..33..  UUllttrraa--DDMMAA,, oouu bbiieenn UUllttrraa--AATTAA,, oouu bbiieenn UUllttrraa3333 eett ttoouuss ccee qquuii
  ccoommmmeennccee ppaarr UUllttrraa......

  Comme vous pouvez le constater, l'Ultra-DMA a beaucoup de noms,
  appelons-le UDMA.

  L'UDMA est la technologie IDE la plus avance  l'heure actuelle. Elle
  permet d'atteindre des taux de transfert de 33.3 Mb/s, c'est  dire
  deux fois plus que l'EIDE, et pour un prix largement infrieur au
  SCSI. La plupart des nouveaux ordinateurs sont dsormais livrs avec
  des contrleurs et des disques UDMA. Il est aussi possible d'ajouter
  un contrleur UDMA sur un systme pour en augmenter les performances
  (comme la carte Promise Ultra33), mme si vous utilisez de "vieux"
  disques IDE.

  Pour en apprendre plus sur l'UDMA, allez donc jeter un coup d'oeil 
  l'adresse suivante : http://www.quantum.com/src/whitepapers/ultraata/

   noter que la longueur des nappes des disques UDMA doit tre plus
  courte qu'avec du DMA ordinaire, prfrez en gnral des cbles longs
  de 30 cm (12') au maximum.


  22..44..  EEsstt--ccee vvrraaiimmeenntt llee ""nneecc pplluuss UUllttrraa""

  Avant d'aller plus loin, claircissons un malentendu. Le taux de
  transfert de 33 Mb/s indiqu est le ttaauuxx ddee ttrraannssffeerrtt eenn mmooddee rraaffaallee,
  et ce n'est pas quelque chose que vous verrez trs souvent. Pour
  comprendre, voici un extrait de l'"udma-generic" : UDMA.txt



       Les taux de transfert en rafale sont supposs aller de 16.6Mb/s (mode PIO 4)  16.6Mb/s
       (DMA mode 2) et jusqu' 33Mb/s (UDMA). Dans son patch pour le noyau 2.1.55, Kim-Hoe 
       mesur des taux de transfert en rafale avec un analyseur logique : 60ns/mot, ce qui
       quivaut  33Mb/s.

        noter que ces taux de transfert ne s'appliquent de sur/depuis le cache disque (476kB pour le
       disque IBM 6.4 Gb) et  mon avis ne sont pas particulirement significatifs pour la
       majorit des utilisateurs de Linux.


       Le noyau de Linux utilise le plus de RAM possible comme cache disque, et donc si les donnes
       ne sont pas dans le cache du noyau, il y a peu de chances qu'elles soient dans le cache disque (de
       taille moins important).


  Le ttaauuxx ddee ttrraannssffeerrtt ccoonnttiinnuu, la vitesse  laquelle les donnes
  peuvent tre transfres du disque  la mmoire centrale o elles
  pourront tre utilises, est beaucoup plus significatif. Un moyen
  simple pour mesurer le "taux de transfert continu" est d'utiliser la
  commande hdparm, par exemple " hdparm -Tt /dev/hda" permet de mesurer
  le taux de transfert du premier disque IDE.




       Voici quelques informations rassembles aprs de nombreux tests, en utilisant
        l'utilitaire hdparm (crit aussi par Mark Lord) :

       Taux de transfert du mode PIO 4 sous Linux :    +/- 5.2 Mb/s

       Taux de transfert du DMA mode 2 sous Linux :    +/- 7.2 Mb/s

       Taux de transfert de l'UDMA mode 2 sous Linux : +/- 9.8 Mb/s




  Comme vous pouvez le constater, l'UDMA est toujours deux fois plus
  rapide que l'EIDE simple et plus rapide que le bus Mastering.


  22..55..  CCoommppaarreerr ll''UUDDMMAA aauu SSCCSSII


  Je n'ai pas de chiffres  vous donner, mais le consensus gnral est
  que le SCSI haut de gamme donne de bien meilleures performances que
  l'UDMA. Cependant si vous avez rcemment regard les prix des disques
  durs, vouz avez sans doute remarqu que les disques UDMA sont
  largement moins chers. Le rapport qualit/prix est en faveur de l'UDMA
  dans pratiquement tous les cas.


  33..  UUttiilliisseerr vvooss ddiissqquueess UUDDMMAA aavveecc uunnee iinntteerrffaaccee EEIIDDEE


  C'est relativement simple. Dans la mesure o les disques UDMA
  respectent la compatilibit descendante avec la norme EIDE, vous
  n'avez qu' brancher votre disque sur votre contrleur EIDE comme
  n'importe quel disque et Linux ne devrait avoir aucun problme pour le
  dtecter. Toutefois vous serez bien entendu limit aux taux de
  transfert de l'EIDE.


  44..  UUttiilliisseerr vvooss ddiissqquueess aavveecc uunnee iinntteerrffaaccee UUDDMMAA


  Bon, j'ai une bonne nouvelle et une mauvaise nouvelle.  La bonne
  nouvelle c'est que le contrleur UDMA peut piloter en mme temps des
  disques UDMA et des disques EIDE, et beaucoup plus rapidement qu'avec
  un contrleur EIDE videmment.

  La mauvaise nouvelle, c'est que l'actuel noyau stable de Linux
  (2.0.35) ne supporte pas parfaitement l'UDMA.  Les noyaux de
  dveloppement (actuellement 2.1.114) intgrent un support UDMA, mais
  il existe de nombreux patchs applicables aux noyaux actuels. De plus
  certains disques UDMA possdant leur propre carte intgre, plutt que
  sur la carte mre, requirent soit d'utiliser un patch spcifique soit
  de ruser pour tre fonctionnel. C'est pourquoi ce document existe :
  pour expliquer o trouver les patchs et comment ruser.


  55..  CCaarrtteess dd''iinntteerrffaacceess UUDDMMAA PPCCII

  Il existe des cartes d'interfaces PCI qui permettent d'utiliser l'UDMA
  sur un ordinateur sans changer de carte mre, ou pour ajouter quatre
  disques supplmentaires sur une machine dont les interfaces intgres
  sont toutes utilises. Elles peuvent aussi tre trouves prinstalles
  sur certains ordinateurs, tels que les Gateway 2000 ou les Dell.

  La plupart de ces cartes ne sont pas supportes par les versions
  stables du noyau (comme le 2.0.35), vous devez appliquer un patch sur
  le noyau ou utiliser un noyau de dveloppement (la srie 2.1.x). Si
  vous devez installer Linux sur un disque prsent sur l'une de ces
  interfaces, vous aurez besoin d'utiliser quelques ruses un peu
  "tordues".


  55..11..  LLaa ccaarrttee PPrroommiissee UUllttrraa3333 IIDDEE

  C'est une carte PCI possdant deux canaux UDMA, permettant de
  connecter 4 disques. Toutes les informations concernant les prix, les
  spcificits etc.  sont disponibles  l'adresse :
  http://www.promise.com.

  Cette carte est (par exemple) vendue avec les derniers modles Gateway
  2000  base de Pentium II, mais rien ne permet de savoir si elle sera
  livre avec les futurs modles.

  Le noyau 2.0.35 supporte explicitement l'UDMA et les noyaux de
  dveloppement (actuellement 2.1.114) intgrent un support IDE PCI
  gnrique, ce qui inclut la dtection automatique de la Promise
  Ultra33.  Toutefois, les anciennes versions stables (2.0.34 et au
  dessous) n'intgrent pas ce support et dans la mesure o la plupart
  des distributions Linux incluent ces anciens noyaux, il peut s'avrer
  un peu difficile d'installer Linux.

  IInnssttaalllleerr LLiinnuuxx aavveecc uunnee ccaarrttee PPrroommiissee

  Bien qu'il existe un patch pour ce contrleur, ce n'est pas trs
  vident de l'appliquer et de recompiler votre noyau si Linux n'est pas
  encore install !  Il existe pourtant une solution, qui peut peut-tre
  marcher sur votre systme.  Merci  Gadi Oxman pour les informations
  ci-dessous, permettant d'accder  la configuration de la carte.



       Si l'on peut accder  une console,  partir de la disquette
       d'installation, alors on peut utiliser la commande "cat /proc/pci"
       permettant d'afficher les paramtres de la carte:

               RAID bus controller: Promise Technology Unknown device (rev 1).
               Vendor id=105a. Device id=4d33
               Medium devsel.   IRQ12.   Master capable.   Latency=32
               I/o at 0xe000.    (a)
               I/o at 0xd804     (b)
               I/o at 0xd400     (c)
               I/o at 0xd004     (d)
               I/o at 0xc800     (e)

       et passer en paramtre du noyau la commande suivante:
       "ide2=a,b+2 ide3=c,d+2"




   noter que les adresses ne seront srement pas les mmes sur votre
  systme. Par exemple, si l'on prend celles dcrites ci-dessus, la
  commande sera : l'IRQ, ce qui donnera : ''ide2=0xe000,0xd806,12
  ide3=0xd400,0xd006,12''.Si vous n'utilisez que le premier canal IDE de
  la carte (si, par exemple, vous ne possdez qu'un disque, ou deux en
  matre et esclave sur le mme canal), il n'est alors pas ncessaire de
  spcifier ide3.

  RReedd HHaatt 55..11:: Dmarrer avec la disquette d'amorage et tapez sur la
  touche "enter"  l'invite de commande. Le noyau se chargera puis il
  vous sera demand de choisir une langue, un type de clavier et le type
  d'installation. D'autres informations, telles que le type de support
  contenant les sources, vous seront demandes. Vos rponses  tout cela
  importent peu pour le moment, le tout tant d'arriver  l'tape
  suivante. Ensuite, vous devriez tomber sur un cran avec le message
  suivant : ``Select Installation Path''. Appuyez sur Alt-F2 pour
  obtenir un invite de commande. Tapez ``cat /proc/pci'', notez les
  paramtres comme ci-dessus et redmarrez  partir de la disquette.
  Cette fois-ci, tapez ''linux ide2= _(_e_n_t_r_e_z _v_o_s _p_a_r_a_m__t_r_e_s_)
   ide3=_(_e_n_c_o_r_e_)''.Il devrait dsormais tre possible de faire
  l'installation sur votre disque sans difficult, cependant, LILO ne
  pourra probablement pas s'installer ; faites plutt une disquette de
  dmarrage  laquelle vous passerez les paramtres dcrits ci-dessus
  tant que vous n'aurez pas patch LILO ainsi que le noyau.

  Avec la RReedd HHaatt 55..00 et la SSllaacckkwwaarree 33..44 : elles sont trs similaires,
  mais avec une combine pour que les programmes d'installation ignorent
  /dev/hde-h (ce sont les disques identifiant l'ide2 et l'ide3). Pour
  installer  partir de ces disques ou sur ceux-ci, il est ncessaire de
  "surcharger" une interface ou les deux intgres sur votre carte mre.
  Cependant, assurez-vous de ne pas craser un priphrique que vous
  dsirez installer ; par exemple si vous installez Linux  partir d'un
  lecteur de CD-ROM sur /dev/hdd (ide1 - interface intgre) sur un
  disque dur sur /dev/hde (ide2 - la carte Ultra33), vous devrez
  surcharger le port ide0 (peu important) avec le port ide2 et laisser
  le port ide1 intact. En utilisant les numros prcdents vous
  dmarrerez avec "ide0=0xe000,0xd806". Avec la RedHat 5.0 vous aurez
  une invite de commande en dmarrant avec la disquette "rescue" ; la
  Slackware vous propose cette invite avec la disquette d'amorage
  standard. Cependant la RedHat 5.0 a des difficultes pour dmarrer
  aprs l'installation ; si vous avez des problmes, vous pouvez
  tlcharger une disquette d'amorage Slackware sur
  ftp://ftp.cdrom.com/pub/linux/slackware-3.5/bootdsks.144/ et dmarrer
  avec.

  Avec d'autres distributions Linux, vous devrez improviser un peu, mais
  la procdure devrait tre globalement identique.

  _I_M_P_O_R_T_A_N_T _: Sans le patch (prsent dans le chapitre ``UDMA
  gnrique''), le noyau aa bbeessooiinn de ces paramtres pour accder  vos
  disques. De plus il est indispensable qu' la configuration de LILO
  (que ce soit sur un disque ou sur une disquette) vous donniez
  eexxaacctteemmeenntt lleess mmmmeess ppaarraammttrreess que ceux utiliss  l'installation.
  Autrement votre systme ne dmarrera pas. Il est toujours possible de
  les fournir au prompt de LILO (pressez la touche Majuscule, puis tapez
  ''linux ide2=_._._._.'')  chaque dmarrage  condition de toujours avoir
  vos paramtres  porte de la main. Il est recommand de patcher le
  noyau le plus vite possible pour ne plus avoir  se soucier de a 
  chaque dmarrage.  Une fois dmarr avec le noyau patch, vous n'aurez
  plus jamais  vous soucier de ces paramtres.  Autant que je sache, il
  n'y a aucun moyen de passer des paramtres au dmarrage d'une
  disquette contenant un noyau (cre avec la commande ''make zdisk''),
  vous ddeevvrreezzdonc utiliser LILO ou autres 'loaders' permettant le
  passage de paramtres Au dmarrage.

  Cependant, certains noyaux non patchs ont parfois des difficults
  pour utiliser les adresses ide2 et ide3, mme lorsque les disques sont
  correctement reconnus.  Par consquent, si vous n'avez pas russi 
  installer linux  partir des infos ci-dessus, essayez de spcifier les
  adresses ide0 et ide1  la place de ide2 et ide3 (merci  Martin
  Gaitan pour cette technique). Cela remplace alors les contrleurs
  intgrs de votre carte mre (s'il y en a)avec ceux de la carte
  Promise. Notons que si vous avez un lecteur de CDROM IDE, branch sur
  votre carte mre,  partir duquel vous installez Linux, vous devrez
  vous assurer que vous ne supplanterez pas le contrleur sur lequel ce
  lecteur est branch sous peine de ne pas pouvoir lancer l'installation
  ! Si le lecteur de CD est sur hda ou hdb, utilisez le port ide1 pour
  vos disques ; si le lecteur est sur hdc ou hdd, utilisez le port ide0.

   IInnssttaalllleerr LLiinnuuxx...... ppuuiiss llaa ccaarrttee PPrroommiissee

  Si a ne marche toujours pas, vous devrez tenter une approche
  lgrement plus brutale. La mthode suivante fonctionne de faon
  pratiquement garantie, mais elle requiert que vous ouvriez votre
  ordinateur et tripatouilliez dedans.  AATTTTEENNTTIIOONN :: si vous n'avez pas
  l'habitude de brancher et dbrancher des disques IDE, avant toute
  chose : lliisseezz lleess mmaannuueellss livrs avec votre ordinateur, vos disques
  durs et/ou la carte Promise ! Si vous bousillez quelque chose sans
  savoir le rparer, vous pourriez le regretter.

  Cela dit, c'est trs simple. De nos jours, la plupart des cartes mres
  possdent des contrleurs EIDE intgrs. Dconnectez vos disques de la
  carte Promise, et branchez-les sur les contrleurs de votre carte
  mre. Si vous avez d'autres prripriques IDE sur votre carte mre,
  tels qu'un lecteur de CD-ROM ou un ZIP, l'installation sera plus
  facile si vous branchez votre disque UDMA sur un port libre (le
  secondaire si le primaire est utilis), ou si vous retirez
  temporairement un priphrique dont vous n'avez pas immdiatement
  besoin (le lecteur ZIP IDE, ou votre lecteur de bande par exemple).
  Installez Linux, tlchargez et installez le patch pour la carte
  Promise (dcrit dans la section suivante).

  Dsormais, vous voil prt  rebrancher votre disque sur la carte
  Promise....  enfin presque. Pour plus de sret faites une disquette
  d'amorage (cd /usr/src/linux; make zdisk)  partir de laquelle vous
  pourrez dmarrer si LILO ne fonctionne pas. Soyons _t_r__s prudent
  :faites-en deux et mettez la seconde de cot pour le moment.

  Bien, maintenant c'est le moment de rflchir un peu... Si vous n'avez
  qu'un disque et qu'il est sur la carte Promise, il est alors srement
  dclar en /dev/hde ( a et b pour le contrleur primaire de la carte
  mre, c et d pour le secondaire). Si vous branchez d'autres disques
  sur la carte Promise, alors le disque esclave sera en /dev/hdf, le
  disque matre du port secondaire sera en /dev/hdg et l'esclave en
  /dev/hdh.

  ditez le fichier /etc/fstab, et changez le nom de toutes les
  partitions des disques que vous dplacez du contrleur de la carte
  mre vers la carte Promise (/dev/hda -> /dev/hde ...). Si vous
  dplacez d'autres priphriques (tels que le CD-ROM, le lecteur ZIP..)
  que vous laissez sur la carte mre, pensez aussi  les renommer comme
  il se doit. Par exemple si votre CD-ROM tait en matre sur le port
  primaire (/dev/hda), puis dplac en /dev/hdc durant l'installation
  (pour pouvoir brancher votre disque dur en /dev/hda) et que vous le
  voulez le remettre en /dev/hda, alors pensez  modifier la fstab.

  Si vous utilisez LILO, n'oubliez pas de le reconfigurer pour que vos
  modifications soient prises en compte (la configuration de LILO sort
  du cadre de ce document, pour en savoir plus sur LILO, consultez le
  LILO mini-Howto <http://sunsite.unc.edu/LPD/HOWTO/mini/LILO.html>),
  sans quoi vous ne pourrez pas redmarrer,  moins d'utiliser la
  disquette d'amorage prcdemment cre; disquette que vous voudrez
  aussi configurer pour pouvoir dmarrer sur la nouvelle partition.
  Utilisez pour cela la commande rdev. Insrez la disquette dans le
  lecteur puis tapez ''rdev /dev/fd0 /dev/hde1''. Bien entendu cela
  signifie que votre partition root est la premire partition de votre
  disque UDMA. Si ce n'est pas le cas (la mienne est sur /dev/hde7 par
  exemple), utilisez videmment le bon numro de partition.

  Redmarrez. Votre systme devrait dsormais fonctionner correctement.

   PPaattcchh ppoouurr llaa ccaarrttee PPrroommiissee

  Les noyaux 2.0.35 et suprieurs incluent un support la carte Promise
  en natif, tlchargez et mettez  jour votre noyau  partir de votre
  distribution Linux ou  partir de http://www.kernel.org.

  Pour avoir plus d'instructions  propos de la compilation d'un noyau,
  consultez le Kernel HOWTO

  UUttiilliisseerr ddeeuuxx UUllttrraa3333 ssuurr uunnee mmaacchhiinnee

  Cela ne fonctionne pas correctement actuellement... Ne le faites pas 
  moins d'tre dispos  bricoler le noyau pour tenter de faire en sorte
  que cela fonctionne.


  55..22..  AArrttoopp AATTPP885500UUFF

  Cette carte est supporte par le "udma-generic". L'installation de
  Linux sur un systme possdant une telle interface doit tre trs
  similaire  celle effectue pour l'installation de la carte Promise
  Ultra33.


  55..33..  AAjjoouutteerr ddeess pprriipphhrriiqquueess

  Les interfaces IDE tertiaire et quaternaire (ide2 et ide3) utilisent
  des priphriques de la forme /dev/hde* jusqu' /dev/hdh*. Sur les
  anciens noyaux, ces priphriques n'taient pas crs automatiquement,
  vous devrez donc les ajouter manuellement pour que tout fonctionne
  correctement.

  Cela peut facilement tre fait si vous avez install les sources du
  noyau Linux.  Lancez simplement /usr/src/linux/scripts/MAKEDEV.ide
  pour crer tous les priphriques ncessaires.


  66..  LLeess iinntteerrffaacceess UUDDMMAA iinnttggrreess

  Ce sont des contrleurs de disques UDMA intgrs aux cartes mres. Ils
  utilisent les E/S IDE standards et sont donc pleinement utilisables 
  des vitesses "non-UDMA" plus lentes tels qu'ils (les contrleurs) sont
  exploits avec des noyaux non patchs (comme ceux fournis lors de
  l'installation de Linux). Par consquent, ces derniers  ne devraient
  pas poser de difficults durant la phase d'installation, et les
  patcher pour exploiter la vitesse de l'UDMA tient plus du luxe que
  d'une tape fondamentale.


  66..11..  IInntteell FFXX,, HHXX,, VVXX,, TTXX eett LLXX

  Encore merci  Gadi pour ces infos


       Le bus mastering est support sur les jeux de composants  TX  partir du noyau
       2.0.31 et suprieur.



  Avec un noyau plus ancien ( comme la version 2.0.30 de la slackware
  3.4) le contrleur fonctionnera comme un contrleur EIDE. Dans tous
  les cas, le contrleur sera automatiquement dtect par le noyau et
  vous ne devriez avoir aucun problme pour l'utiliser.

  Le support UDMA complet pour ces jeux de composants (chipsets) est
  dcrit dans le chapitre: ``UDMA gnrique''.


  66..22..  LLee VVIIAA VVPPxx eett lleess jjeeuuxx ddee ccoommppoossaannttss aappppaarreennttss

  Cette interface est immdiatement reconnue par un noyau non patch
  comme un contrleur EIDE, mais si en possdez un, vous serez intress
  par le fait qu'il existe un patch permettant d'un part d'amliorer les
  taux de transfert, et d'autre part de se dbarrasser du message
  "unknown PCI device".

  Vous trouverez un patch  l'adresse http://www.ipass.net/~prefect/
  <http://www.ipass.net/~prefect/>. Il a t conu pour le jeux de
  composants VIA VP2/97 que l'on trouve sur les cartes mres FIC PA-2007
  et PA-2011, mais il devrait fonctionner sur des contrleurs
  apparents. Ce patch fonctionne aussi sur les derniers contrleurs VIA
  VP3, mais ce n'est pas une rgle absolue.

  Ce patch permet uniquemement de faire du Bus Mastering (et pas de
  l'UDMA), mais c'est toujours mieux que le bon vieux mode EIDE. Suivez
  les instructions du site pour activer le Bus Mastering.

  Il existe un autre patch qui supporte toutes les fonctionnalits de
  l'UDMA, disponible  http://www.pyreneesweb.com/Udma/udma.html
  <http://www.pyreneesweb.com/Udma/udma.html>, crit pour le jeux de
  composants  VIA VT82C586B, et qui devrait aussi fonctionner sur les
  VP2, VP3, VPX, P6 et AGP Appolo. Suivez les instructions
  d'installation et de mise en oeuvre, mais il est conseill de
  sauvegarder vos donnes importantes au cas o votre carte mre serait
  incompatible. Cependant, si a marche la premire fois, a marchera
  pour les suivantes.

   noter que ce patch ne fonctionne pas sur le jeu de composants VP1,
  mais ce dernier est support par le patch ``gnrique''.


  66..33..  TTXX PPrroo eett aauuttrreess ccaarrtteess ""PPrroo""

  L'UDMA n'est pour le moment pas support par les cartes mres TX Pro.
  Ce ne sont pas les mme que les TX mobo, et elles indiquent
  apparemment mal leurs possibilits DMA, d'o le problme.  J'ai
  entendu dire que quelqu'un travaillait dessus. Un patch devrait donc
  apparatre dans le futur.


  77..  UUDDMMAA ggnnrriiqquuee

  Le patch gnrique pour l'UDMA, modifi par Andr Balsa
  (andrebalsa@altern.org) et Michel Aubry <mailto:giovanni@sudfr.com> 
  partir du driver DMA pour le jeu de composants Triton (crit par Mark
  Lord), permet l'utilisation du mode UDMA pour les jeux de composants
  suivants (pour la version 0.3) :


    Tous les jeux de composants Intel: FX, HX, VX, TX, LX

    Tous les jeux de composants SiS (seul le SiS5598 a t test, mais
     toute la famille a le mme priphrique intgr : le SiS5513).


    Les jeux de composants  VIA (seul le 82C586B a t test, mais ils
     sont tous basss sur la mme interface). Un support de diagnostic
     spcifique est disponible pour l'interface  base de VIA.

    Les cartes interfaces Promise et Artop PCI UDMA. Le support pour la
     carte interface Triones PCI UDMA n'est pas encore inclus.

  Il a t crit pour pouvoir intgrer simplement de nouveaux jeux de
  composants.

  L'UDMA gnrique, aussi connu sous le nom de Grand Unified UDMA patch
  (GUUP - prononcez "goop" (NDT: "goupe"...avec un accent bien d'chez
  nous) ) a t incorpor dans le patch "Jumbo" qui intgre beaucoup
  d'autres caractristiques trs utiles telles que la dtection
  automatique de plus de 64 Mo de mmoire et la dtection de la
  frquence d'horloge du microprocesseur. Vous pouvez obtenir le patch
  Jumbo pour le noyau 2.0.35   http://www.altern.org/andrebalsa/linux/.
  Ce patch devrait aussi s'appliquer sur le noyau 2.0.36pre1 et peut
  tre au del.

  Voici quelques notes de l'auteur :


       Les performances avec un disque IBM UDMA sur une bonne carte mre avoisinent les
       10 Mb/s de taux de transfert maximum (mesur avec hdparm -T -t).

       Le jeu de composant Intel TX ne possde qu'une FIFO simple partage pour ses deux
       contrleurs IDE, par consquent utiliser 2 disques UDMA n'apportera pas de
       grandes amliorations par rapport  l'utilisation d'un seul disque.
       Par contre le jeu de composant SiS5598 possde deux contrleurs spars, chacun
       avec sa
       propre FIFO. Thoriquement, on peut approcher les 66 Mb/s de taux de transfert
       sur les cartes mres possdant un SiS5598, en utilisant le driver md et en
       faisant le transfert entre deux disques. Le jeu de composant SiS5571 est globalement
       identique. Je n'ai pas les spcifications du chipset VIA, je ne peux donc pas
       dire grand-chose  leur propos.

       Le driver (U)DMA crit par Mark Lord possde des temps de setup
       particulirement faibles (temps de latence entre les transfert de donnes). C'est
       une mthode idale pour des transferts de donnes frquents, avec des
       petits
       fichiers (comme ceux d'un serveur de news sous Linux), qui peut s'avrer parfois
       suprieur  son homologue SCSI.






  88..  AAccttiivveerr eett ddssaaccttiivveerr ll''UUDDMMAA

  Normalement, un noyau intgrant l'UDMA doit automatiquement permettre
  le support UDMA sur les disques et les interfaces adquats. Cependant
  dmarrant  partir du noyau 2.1.113, les transferts DMA sont
  dsactivs par dfaut tant que vous n'aurez pas configur
  spcifiquement votre noyau pour l'activer automatiquement. Cela peut
  vous sembler un inconvnient, mais quelques disques et certaines
  interfaces ne fonctionnent pas correctement avec l'UDMA activ : voyez
  la "liste noire" ci-dessous.


  88..11..  DDoonnnneerr ddeess ppaarraammttrreess aauu nnooyyaauu  ll''aammoorraaggee


  Sur les noyaux 2.1.113 et suprieurs, vous pouvez activer les
  transferts DMA sur les deux disques d'une interface donne en
  utilisant le paramtre ideX=dma, o X est le numro de l'interface (la
  premire est 0).

  Les paramtres de dmarrage du noyau peuvent tre appliqus en
  utilisant LILO, LOADLIN ou la plupart des mtodes d'amorage de Linux.
  Pour plus d'informations, consultez le Bootdisk HOWTO


  88..22..  UUttiilliisseerr hhddppaarrmm


  hdparm est un programme permettant de forcer les paramtres de vos
  disques durs sous Linux. Parmi toutes ses possibilits, vous pouvez
  l'utiliser pour activer ou dsactiver l'UDMA d'un disque et tester son
  taux de transfert continu.

  La plupart des distributions Linux incluent hdparm, mais vous devrez
  appliquer un patch pour inclure le support UDMA. Vous pouvez
  tlcharger hdparm 
  ftp://sunsite.unc.edu/pub/Linux/system/hardware/hdparm-3.3.tar.gz et
  le patch  htmlurl
  name="http://pobox.com/ brion/linux/hdparm-3.3-udma.patch.gz"
  url="http://pobox.com/ brion/linux/hdparm-3.3-udma.patch.gz">.

  Compilez-le et installez-le comme suit :




       cd /usr/src
       tar zxvf /tmp/download/hdparm-3.3.tar.gz
       cd hdparm-3.3
       gzip -cd /tmp/download/hdparm-3.3-udma.patch.gz | patch -p0
       make
       if [ -f /sbin/hdparm ]; then rm -f /sbin/hdparm ; fi
       make install
       cp /usr/local/sbin/hdparm /sbin/hdparm




  PPoouurr aaccttiivveerr ll''UUDDMMAA ssuurr uunn ddiissqquuee dduurr :: hdparm -d1 /dev/hda

  PPoouurr ddssaaccttiivveerr ll''UUDDMMAA :: hdparm -d0 /dev/hda

  PPoouurr mmeessuurreerr llee ttaauuxx ddee ttrraannssffeerrtt dd''uunn ddiissqquuee :: hdparm -Tt /dev/hda

  PPoouurr vvooiirr qquueelllleess ooppttiioonnss ssoonntt aaccttiivveess :: hdparm /dev/hda

  PPoouurr aavvooiirr pplluuss ddee ddttaaiillss ssuurr vvoottrree ddiissqquuee :: hdparm -i /dev/hda

  Pour plus de prcisions, lisez le man (``man 8 hdparm'').


  99..  PPrroobbllmmeess

  99..11..  LLaa lliissttee nnooiirree


  Les disques suivants sont sur liste noire. Vous nnee ddeevveezz ppaass utiliser
  l'UDMA avec ces disques sous peine de corrompre vos donnes.



    Western Digital WDC AC22100H

  La partie UDMA du patch Jumbo-2.0.35-9 dsactivera automatiquement le
  DMA sur ce disque.


  99..22..  AAvveezz--vvoouuss ""oovveerrcclloocckk"" vvoottrree mmaacchhiinnee ??


  Si oui, prenez garde ! Voici un extrait de la documentation de
  l'"udma-generic" :



       N'OVERCLOCKEZ PAS le bus PCI. La frquence maximum supporte par le bus PCI est de
       37.5 Mhz. Certains (supposs compatibles) disques UDMA ne fonctionneront mme pas
        37.5 Mhz, mais devraient tre OK  33.3 Mhz.

       Dans tous les cas,ne JAMAIS, JAMAIS configurer le bus PCI a 41.5 Mhz

       La frquence RECOMMANDE et sans danger est de 33 Mhz.





  99..33..  VVoottrree BBIIOOSS ll''aacccceeppttee--tt--iill ??

  Voici un autre extrait de la documentation de l'"udma-generic" :



       Le vritale travail impliquant le paramtrage des composants pour les transferts DMA
        est ralis principalement par le BIOS de chaque carte mre. Maintenant, bien
        entendu, il faut esprer que le BIOS a t correctement programm...

       Par exemple, la carte mre ASUS SP-97V avec son BIOS original (Rev. 1.03)
        aura un dysfonctionnement avec les pilotes modifis pour les modes UMDA et DMA mode 2;
        Cela fonctionnera correctement si vous utilisez le mode PIO 4, ou sous Windows 95 dans tous
        les modes. J'ai tlcharg la dernire image du BIOS (1.06) 
        partir du site Web ASUS et flash l'EPROM avec cette version. Cela fonctionne
        parfaitement depuis (avec un bus  66 Mhz).

       Cela nous indique bien que c'est le BIOS qui initialise le contrleur DMA avec des
        timing spcifiques, Ma rvision de  BIOS initiale avait probablement
        de mauvais timings. Comme les pilotes de Windows 95 les initialise lui-mme(c.a.d. qu'
        il ne se sert pas du BIOS pour paramtrer les timings de l'interface), je n'avais des
        problmes qu'avec les pilotes de Linux, tandis que Windows 95 fonctionnait correctement.

       Donc, laissez-moi vous le rpter encore une fois : les pilotes (U)DMA Linux s'appuient
        sur des donnes du BIOS en supposant qu'elles sont correctes. Si vous avez le moindre
        problme, vrifiez d'abord que vous avez la dernire rvision du BIOS de
        votre carte mre.

       ...

       Les dernires versions du BIOS sont disponibles sur le site Web de votre fabriquant
        de carte mre. "Flasher" une nouvelle image du BIOS est une opration simple, mais
        vous devez respecter strictement les intructions du manuel de votre carte mre.

       Les dernires rvisions des BIOS Award semblent suffisamment stables pour utiliser
        l'UDMA. Tout ce qui possde une date avec 1998 devrait tre correct.






  99..44..  EEtt ssii aa nnee mmaarrcchhee ttoouujjoouurrss ppaass......


  Si aucune des explications contenues dans ce document ne s'avrent
  utile ou au moins suffisante pour faire fonctionner votre machine, le
  mieux est d'envoyer un message dcrivant prcisment votre problme,
  votre contrleur UDMA (que ce soit sur un carte mre ou fille), si vos
  disques sont UDMA ou non, leur configuration, votre version de Linux
  (distribution + version de noyau) et tout ce qui peut vous sembler
  utile.


  1100..  SSii vvoouuss aavveezz ddeess iinnffooss ssuurr ll''UUDDMMAA qquuii nnee ssoonntt ppaass rreecceennsseess iiccii

  Merveilleux ! Si vous savez des choses que je ne sais pas, envoyez-les
  moi par tous les moyens (brion@pobox.com) et je les inclurai dans ce
  document le plus rapidement possible.

















































  Comment se tenir inform (Update mini HOWTO)
  Kjetil Bakkeskaug, Kjell Sundby and Stein Gjoen,
  sgjoen@nyx.net
  Traduction Jean-Albert Ferrez, <Jean-Albert.Ferrez@epfl.ch>
  v0.22, 19 Septembre 1999

  Ce document dcrit comment se tenir inform des dveloppements ayant
  lieu dans le monde Linux. Bien que la plupart de ce texte soit
  spcifique  Linux, il y a galement de nombreuses informations
  gnrales sur la recherche d'informations pouvant tre utile  une
  large audience.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Copyright
     1.2 Dngation
     1.3 Historique
     1.4 Crdits

  2. Documentation installe sur votre disque dur

  3. Abonnement

     3.1 Les forums Usenet
     3.2 Listes de diffusion
     3.3 Magazines

  4. Runions

  5. Recherche d'informations

  6. Conclusion



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Le dveloppement dans le monde de Linux va trs vite. Il peut tre
  difficile de suivre les dernires volutions. Ce HOWTO vise  donner
  quelques rgles sur la manire d'obtenir rapidement et efficacement
  l'information que vous cherchez. La plupart des gens savent utiliser
  le World Wide Web (WWW) et les forums de discussions (Usenet News),
  mais d'autres sources existent, qui peuvent tre aussi bonnes, voire
  meilleures.

  Une traduction en polonais
  <http://www.ict.pwr.wroc.pl/jtz/Html/mini/Update.pl.html> est
  disponible.


  11..11..  CCooppyyrriigghhtt

  Ce HOWTO est copyright 1998 Kjell Sundby, Kjetil Bakkeskaug et Stein
  Gjoen.

  Sauf indication contraire, les droits d'auteur des HOWTO Linux sont
  dtenus par leurs auteurs respectifs. Les HOWTO Linux peuvent tre
  reproduits et distribus, en totalit ou en partie, sur tout mdia
  physique ou lectronique dans la mesure o ce copyright est prserv
  dans chaque copie. La distribution commerciale en est autorise et
  encourage. L'auteur apprcierait toutefois qu'on lui notifie
  individuellement ce genre de distribution.

  Le prsent copyright doit couvrir toute traduction, compilation et
  autre travail driv des HOWTO Linux. C'est--dire qu'il est interdit
  d'imposer des restrictions de diffusion allant au del du prsent
  copyright  des ouvrages inspirs, ou incorporant des passages, de
  HOWTO Linux. Sous certaines conditions, des exceptions  ces rgles
  seront tolres : contactez le coordinateur des HOWTO  l'adresse
  donne ci-dessous.

  En bref, nous souhaitons une diffusion aussi large que possible de ces
  informations. Nanmoins, nous entendons garder la proprit
  intellectuelle (copyright) des HOWTO, et apprcierions d'tre informs
  de leur redistribution.

  Pour toute question plus gnrale, merci de contacter le coordinateur
  des HOWTO  l'adresse lectronique linux-howto@metalab.unc.edu.


  11..22..  DDnnggaattiioonn

  Vous utilisez les informations contenues dans ce document  vos
  propres risques. Nous dclinons toute responsabilit quant  son
  contenu.  L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entirement  vos propres risques.

  Tous les droits sont dtenus par leurs propritaires respectifs, sauf
  mention contraire explicite. L'utilisation d'un terme dans ce document
  ne constitue pas une limitation  sa validit en tant que marque.

  Le fait de citer un produit ou une marque particulire ne constitue
  pas un endossement.

  Il est fortement conseill d'effectuer une sauvegarde de votre systme
  avant une installation importante ainsi qu' intervalles rguliers.


  11..33..  HHiissttoorriiqquuee

  Ajout plus d'informations sur le fonctionnement des listes de
  diffusion.  Un indexage adquat a galement t ajout.

  Renomm Dejanews en Deja. Chang un titre de chapitre. Ajout une note
  sur les traductions en cours. Corrig quelques coquilles mineures.

  Ajout un lien vers la traduction polonaise.


  11..44..  CCrrddiittss



       Tomasz Sienicki | tsca <tsca@cryogen.com>








  22..  DDooccuummeennttaattiioonn iinnssttaallllee ssuurr vvoottrree ddiissqquuee dduurr



  Lorsque vous dbutez avec une installation de Linux, vous recevez
  normalement une bonne dose d'informations : le manuel d'installation,
  l'aide en ligne, les fichiers d'information et les HOWTO. Tout cel
  constitue un bon point de dpart, mais au bout d'un certain temps,
  vous voudrez en savoir plus, mettre votre systme  jour et vous tenir
  inform. Pour plus de clart, nous distinguons ici les informations
  auxquelles vous vous abonnez de celles que vous recherchez
  explicitement.

  Mme si elle ne vient sans aucune documentation imprime, toute
  distribution de Linux digne de ce nom va vous installer un certain
  nombre de documents, allant du plus simple _R_E_A_D_M_E (_L_I_S_E_Z_-_M_O_I) pour
  certains logiciels, aux _H_O_W_T_O_s qui eux couvrent un sujet plus en
  profondeur.

  Jetez donc un oeil au rpertoire des documents <file:///usr/doc> o la
  plupart des logiciels mettent leur propre documentation. De mme, on y
  trouve les HOWTO <file:///usr/doc/HOWTO> et les mini-HOWTO
  <file:///usr/doc/HOWTO/mini>.

  Les sources du noyau <file:///usr/src/linux> sont, bien entendu, la
  documentation suprme. En d'autres termes, _Q_u_e _l_e_s _s_o_u_r_c_e_s _s_o_i_e_n_t _a_v_e_c
  _t_o_i_, _L_u_k_e. Notez galement que le noyau vient non seulement avec ses
  sources, qui sont d'ailleurs commentes (au moins en partie), mais
  galement avec un rpertoire de documentation
  <file:///usr/src/linux/Documentation>.  Vous devriez lire tout cela
  avant de poser une question ayant trait au noyau : vous vous viterez
  ainsi pertes de temps et situations gnantes.

  La documentation en ligne est parfaite pour la consultation et la
  recherche, mais ne ngligez pas pour autant la version imprime. Si
  vous ne parvenez mme plus  faire dmarrer la machine, comment allez-
  vous faire pour retrouver l'information qui vous manque pour rtablir
  le systme ?


  33..  AAbboonnnneemmeenntt

  En gros, vous vous abonnez  un service quelconque, puis recevez les
  informations comme elles viennent. Prenez garde  ne pas tre trop
  gourmand  : Trop d'information tue l'information. De plus, il y a de
  nos jours trop de bruit : ayez l'esprit critique et soyez prts  vous
  dsabonner.

  Il y a deux manires de recevoir des informations : les forums et les
  listes de distributions (mme si des passerelles entre les deux
  existent parfois). En gnral, les forums engendrent un volume plus
  important et ont un rapport signal/bruit moins favorable que les
  listes. Vouloir suivre trop de forums quivaut  vouloir boire d'une
  lance d'incendie.


  33..11..  LLeess ffoorruummss UUsseenneett

  L'accs aux forums Usenet dpasse le cadre de ce HOWTO, il y en a
  d'autres qui vous aideront  le faire sur un systme Linux. Si vous
  n'avez jamais utilis les forums auparavant, lisez soigneusement une
  introduction. Bien que ces forums aient l'air d'une vraie anarchie,
  ils ont leur propre culture. Suivez les dbats pendant un certain
  temps avant d'y participer. Et surtout, soyez attentifs aux messages
  intituls _F_A_Q, _F_o_i_r_e _A_u_x _Q_u_e_s_t_i_o_n_s, _F_r_e_q_u_e_n_t_l_y _A_s_k_e_d _Q_u_e_s_t_i_o_n_s, _R__g_l_e_s
  _d_'_u_t_i_l_i_s_a_t_i_o_n... Ils vous indiqueront les grandes lignes du forum et
  contiendront probablement l'information que vous recherchez. Posez une
  question  laquelle il a dj t rpondu et votre crdibilit s'en
  trouvera bien diminue. Cela vous vaudra peut tre mme une place dans
  de nombreux _k_i_l_l_f_i_l_e_s.
  Les FAQ sont postes rgulirement, mais s'il y en a une que vous ne
  trouvez pas, allez voir  l'archive principale des FAQ
  <ftp://rtfm.mit.edu> au MIT.

  Elles sont galement disponibles sur le web <http://www.cis.ohio-
  state.edu/hypertext/faq/>.

  Malgr tout, il y a beaucoup de messages indsirables (bruit) dans les
  forums et c'est l qu'interviennent les _k_i_l_l_f_i_l_e_s. Avec un lecteur
  adapt et bien configur, vous pouvez slectionner dans un forum les
  messages les plus intressants (selon vos critres) et supprimer
  (_k_i_l_l) automatiquement ceux que vous ne voulez pas voir. Ceci permet
  d'augmenter le rapport signal/bruit et vous permet de vous concentrer
  sur les sujets importants. De mme, si vous ne respectez pas les
  rgles, les autres vous placeront dans leur _k_i_l_l_f_i_l_e, et si plus tard
  vous posez une question pertinente, ils ne la verront pas.

  Voici une liste des forums internationaux (donc en anglais)
  intressants :

    annonces <news:comp.os.linux.announce>

    rponses <news:comp.os.linux.answers>

    dveloppement d'applications <news:comp.os.linux.development.apps>

    dveloppement du systme <news:comp.os.linux.development.sys>

    matriel <news:comp.os.linux.hardware>

    divers <news:comp.os.linux.misc>

    rseau <news:comp.os.linux.networking>

    installation <news:comp.os.linux.setup>

    X11 sous Linux <news:comp.os.linux.x>

  Un bon nombre de hirarchies nationales ont des forums ddis  Linux.
  En France, on trouve :

    divers <news:fr.comp.os.linux>

    divers, mais modr <news:fr.comp.os.linux.moderated>

    annonces <news:fr.comp.os.linux.annonces>

  Si vous ne trouvez pas le nom d'un forum national ou local, Deja
  <http://www.deja.com> peut vous y aider.



  33..22..  LLiisstteess ddee ddiiffffuussiioonn

  Contrairement aux forums Usenet, une liste de diffusion est
  centralise : quelqu'un envoie un message  un serveur et le serveur
  le propage vers tous les abonns. Ces listes engendrent un volume
  limit, et pratiquement aucun bruit. Tout abus est jug svrement et
  risque d'entraver le projet auquel la liste est ddie. Vous recevez
  lors de l'abonnement un message d'introduction donnant la charte de la
  liste, vous avez tout intrt  le lire attentivement.

  Il y a plusieurs types de serveurs capables de grer une liste de
  diffusion, voici o et comment vous abonner.


  L'un des principaux serveur de listes de diffusion est _M_a_j_o_r_d_o_m_o qui
  est d'ailleurs en service  vger.rutgers.edu
  <mailto:majordomo@vger.rutgers.edu>.  Pour en connatre le
  fonctionnement, envoyez-lui un message contenant le mot help. Si vous
  lui envoyez quelque chose qu'il ne parvient pas  dcoder, il vous
  renverra galement le mme message d'aide. Si vous lui donnez le mot
  lists, vous recevrez la liste des listes qu'il gre, qui peuvent
  parfois tre nombreuses.

  D'autres listes utilisent plusieurs adresses, une pour envoyer les
  commandes telles que subscribe et unsubscribe, et une pour envoyer (et
  de laquelle vous recevez) des messages. L aussi, le mot help ou
  quelque chose d'incomprhensible vous donnera de l'aide. Par exemple,
  vous envoyez subscribe  l'adresse corned-beef-
  requests@somelistserver.org alors que vous envoyez (et recevez) les
  messages  l'adresse corned-beef-list@somelistserver.org, et ce
  jusqu' ce que vous vous dsabonniez.

  Quelques conseils avant de vous lancer :

    N'envoyez pas de subscribe etc.  la liste elle-mme, mais
     uniquement au serveur, sinon vous risquez de passer pour un rigolo
     aux yeux de milliers de personnes.

    Lisez soigneusement le message de bienvenue, il contient
     probablement les rponses  plusieurs de vos premires questions.

    Ne mettez pas en place une passerelle entre une liste de diffusion
     et un forum Usenet sans l'avoir demand au pralable, sous risque
     de provoquer des boucles et du spam.

  vger.rutgers.edu <mailto:majordomo@vger.rutgers.edu> est un des
  principaux serveurs de listes de diffusion. Voici un aperu de ce
  qu'il propose  la communaut Linux :


    linux-8086

    linux-admin

    linux-alpha

    linux-apps

    linux-arm

    linux-bbs

    linux-c-programming

    linux-config

    linux-console

    linux-diald

    linux-doc

    linux-fido

    linux-fsf

    linux-ftp

    linux-gcc

    linux-gcc-digest

    linux-hams           Amateur Radio and Linux discussions

    linux-hppa

    linux-ibcs2

    linux-ipx

    linux-isdn

    linux-japanese

    linux-kernel

    linux-kernel-announce

    linux-kernel-digest

    linux-kernel-patch

    linux-laptop

    linux-linuxss

    linux-lugnuts

    linux-mca

    linux-mips

    linux-msdos

    linux-msdos-devel

    linux-msdos-digest

    linux-net

    linux-new-lists

    linux-newbie

    linux-newbiew

    linux-nys

    linux-oasg

    linux-oi

    linux-opengl

    linux-pkg

    linux-ppp

    linux-pro

    linux-qag

    linux-raid

    linux-scsi

    linux-serial

    linux-seyon

    linux-smp

    linux-sound

    linux-standards

    linux-svgalib

    linux-tape

    linux-term

    linux-userfs

    linux-word

    linux-x11

    linux-x25

    sparclinux

    ultralinux

  Il y a galement un bon nombre d'autres listes et serveurs. Comme ce
  monde est relativement dynamique, il ne sert  rien d'en dresser ici
  une liste exhaustive. Voyez plutt une liste mise  jour en permanence
  <http://summer.snu.ac.kr/~djshin/linux/mail-list/index.shtml> des
  divers serveurs relatifs  Linux. Cette page offre galement un
  mcanisme convivial pour s'abonner et se dsabonner aux diverses
  listes.

  Il y a galement une page <http://www.NeoSoft.com/internet/paml/>
  donnant une liste norme de listes de diffusion sur des sujets divers.


  33..33..  MMaaggaazziinneess

  Nous sommes nombreux  tre dus du manque d'informations sur Linux
  dans la presse informatique. Ceci est probablement d au fait que
  certains produits commerciaux ne tiendraient pas la comparaison, et
  donc les annonceurs ne supporteraient pas cette situation.
  Heureusement, il existe un journal spcifique  Linux, le _L_i_n_u_x
  _J_o_u_r_n_a_l. Voyez auprs de SSC <http://www.ssc.com> pour plus
  d'informations. La table des matires est gnralement disponible sur
  leur site.

  Parmi les e-zines les plus populaires, citons Linux Gazette
  <http://www.linuxgazette.com>.  et Linux focus
  <http://www.linuxfocus.com> et d'autres, puisqu'ils semblent en
  apparatre frquemment.  Consultez LinuxHQ <http://www.linuxhq.com>
  pour des informations  jour sur ces services.

  Des sites web comportant des nouvelles quotidiennes  propos de Linux
  surgissent de partout, et un bon nombre d'entre eux sont trs
  professionnels dans leur prsentation ainsi que dans leur contenu. Un
  des plus importants est Freshmeat <http://freshmeat.net> qui sert des
  infos chaque jour.

  Pour ceux qui ne peuvent se permettre de suivre le net en permanence
  mais qui ont rapidement besoin des principales informations, il y a
  Linux Weekly News <http://lwn.net>, qui donne un rsum hebdomadaire
  des nouvelles importantes, y compris les alertes de scurit et les
  annonces de logiciels, nouveauts et mises  jour.

  A l'autre extrme, il y a ceux qui vivent branchs en permanence et
  qui veulent suivre un peu toutes les infos  mesure qu'elles
  parassent sur Slashdot <http://slashdot.org>, minute aprs minute en
  utilisant le service "ticker" ou l'interface web.

  Il existe aussi quelques sites plus orients vers le matriel mritant
  le dtour, tels Toms Hardware <http://www.tomshardware.com>, Anandtech
  <http://www.Anandtech.com> et Storage review
  <http://www.storagereview.com>.



  44..  RRuunniioonnss

  Linux est le fruit d'un effort collectif massif, principalement 
  travers le rseau Internet. Nanmoins, il reste possible de rencontrer
  des gens dans le cadre de groupes d'utilisateurs de Linux un peu
  partout  travers le monde. Il peut y en avoir un prs de chez vous,
  consultez les listes.

  Des confrences, des runions d'installation, de nouveaux groupes...
  Tout cela est annonc rgulirement dans le forum announcements
  <news:comp.os.linux.announce>.  De tels vnements sont parfaits pour
  se tenir inform des derniers dveloppements ou pour se faire aider.


  55..  RReecchheerrcchhee dd''iinnffoorrmmaattiioonnss

  Plusieurs possibilits s'offrent  vous lorsque vous recherchez
  quelque chose de spcifique. Souvenez-vous que les moteurs de
  recherche sur le web, tels que

    Altavista <http://www.altavista.digital.com>

    Excite <http://www.excite.com>

    Hotbot <http://www.hotbot.com>

     peuvent galement faire des recherches dans les archives des forums
     Usenet.

  Souvenez-vous galement que Deja <http://www.deja.com> est un moteur
  de recherche ddi  ces forums, et maintient une archive depuis 1995.

  Bien que de nos jours le web ait pris une part prpondrante,
  n'oubliez pas que les divers serveurs ftp contiennent beaucoup
  d'informations. Certains moteurs de recherche pour le web indexent
  galement ces serveurs ftp, mais l'outil de prdilection reste Archie.
  Il s'agit d'un systme qui parcourt rgulirement les principaux
  serveurs ftp et tient  jour des listes des fichiers qui s'y trouvent.
  Ces listes peuvent tre consultes au moyen des clients archie (ou sa
  version graphique xarchie) disponibles sur tout systme Linux qui se
  respecte. A dfaut, vous pouvez vous connecter  l'un des serveurs
  Archie par un simple telnet


    Australie <telnet://archie.au>

    Autriche <telnet://archie.univie.ac.at>

    Belgique <telnet://archie.belnet.be>


    Finlande <telnet://archie.funet.fi>

    Allemagne <telnet://archie.th-darmstadt.de>

    Core <telnet://archie.kornet.nm.kr>

    Italie <telnet://archie.unipi.it>

    Japon <telnet://archie.kuis.kyoto-u.ac.jp>

    Pologne <telnet://archie.icm.edu.pl>

    Sude <telnet://archie.luth.se>

    Espagne <telnet://archie.rediris.es>

    Royaume Uni <telnet://archie.doc.ic.ac.uk>

    Etats Unis <telnet://archie.bunyip.com>

    Etats Unis <telnet://archie.internic.net>

  Vous avez tout intrt  choisir le serveur le plus proche de vous.
  Pour voir la liste des serveurs disponibles, dmarrez le client sans
  options ou utilisez l'option ad hoc via telnet. Il y a une aide en
  ligne. Tous ces serveurs ne sont pas forcment synchroniss, vous
  devrez peut-tre en interroger plusieurs avant de trouver ce que vous
  cherchez.

  Rcemment, un index ftp plus convivial, ftpsearch
  <http://ftpsearch.ntnu.no>, a fait son apparition. Il propose de
  nombreuses options avec une interface dans la plus pure tradition
  Unix.

  Ces services proposent une aide sur les techniques efficaces de
  recherche.  Cette lecture vous permettra d'acclrer vos recherches, 
  long terme vous y gagnerez  coup sr.

  Si vous n'avez accs  Internet que par le mail, vous pouvez consulter
  la FAQ _a_c_c_e_s_s _v_i_a _m_a_i_l. Vous pouvez l'obtenir par email depuis ce
  serveur amricain <mailto:mail-server@rtfm.mit.edu> avec uniquement
  cette ligne dans le corps du message :

  send usenet/news.answers/internet-services/access-via-email

  ou depuis ce serveur europen <mailto:mailbase@mailbase.ac.uk> avec
  uniquement cette ligne dans le corps du message :

  send lis-iis e-access-inet.txt

  ou dans ce forum Usenet si vous y avez accs : news.answers newsgroup
  <news:news.answers>.

  Enfin, si vous cherchez  contacter quelqu'un par email, par exemple
  l'auteur d'un programme, vous trouverez son adresse dans la
  documentation du programme rsidant dans le rpertoire des documents
  <file:///usr/doc/> mais  dfaut ou si l'adresse donne n'est plus
  valable, la FAQ trouver des adresses email
  <http://www.qucis.queensu.ca/FAQs/email/finding.html> peut vous aider.


  66..  CCoonncclluussiioonn

  Trouver une information rapidement et efficacement s'apparente plus 
  un art qu' une science. Nous n'avons pas abord la partie la plus
  difficile : comment dterminer la _q_u_a_l_i_t_ de l'information ?  Rpondre
   cette question dpasse le cadre de ce HOWTO, mais vous devriez
  toujours la garder  l'esprit. Vrifiez au moins que l'information est
  suffisamment rcente pour rpondre de manire pertinente  votre
  problme.

  Au minimum, vous devez vous assurer que la documentation est valable
  pour vous viter des conseils dplacs voir dangereux. Beaucoup de
  gens suggrent par exemple rm -rf /  comme solution  un problme
  donn. Si la plupart reconaissent l une boutade, le nophyte peut se
  retrouver en train d'effacer compltement son installation. Pour
  viter ce genre de situations, vous devriez vrifier certains points
  avant de vous lancer tte baisse :


    L'information est-elle signe ? Les gens qui crivent des choses
     senses n'ont pas besoin de le faire anonymement.

    L'information est-elle date ? Les documentations doivent voluer
     au rythme de la technologie et il vaut mieux lire les dernires
     versions. Les moteurs de recherches sur Internet sont ici d'un
     grand secours.

    L'information a-t-elle donn lieu  une suite ? Consultez-les,
     sinon vous risquez de manquer un avertissement ou une correction.

  Si vous gardez ceci  l'esprit, vous viterez la plupart des piges
  qui circulent sur Internet, des jeux de pyramides au rcent problmes
  des chevaux de Troie pour Linux qui visent  vous faire dvoiler votre
  mot de passe par email.

  Il existe de nombreuses FAQs  propos des mthodes de recherche,
  notamment ici <http://cn.net.au>.

  Repris d'une signature :

  _B_e _a_l_e_r_t_! _T_h_e _w_o_r_l_d _n_e_e_d_s _m_o_r_e _l_e_r_t_s_.

  _N_d_T_: _C_e_l_u_i _q_u_i _t_r_o_u_v_e _u_n_e _t_r_a_d_u_c_t_i_o_n _p_e_r_t_i_n_e_n_t_e _d_e _c_e_t_t_e _c_i_t_a_t_i_o_n
  _g_a_g_n_e _u_n_e _b_i__r_e _v_i_r_t_u_e_l_l_e_.



























  Mini_HOWTO Mettez  jour votre distribution Linux
  Greg Louis, glouis@dynamicro.on.ca
  v1.11, 6 Juin 1996

  Trucs et astuces pour mettre  jour une distribution  partir d'une
  autre.
  ______________________________________________________________________

  Table des matires


  1. IMPORTANT !!! Dsistement de responsabilit et proprit lgale

  2. Modifications depuis la version 1.1

  3. Introduction

     3.1 Comment tuer et rincarner votre machine Linux !
     3.2 Pourquoi quelqu'un voudrait-il faire cela ?
     3.3 Ai-je  dtruire et rinstaller ?
     3.4 Combien de temps cela va-t-il prendre ?

  4. Notez tout ce que vous faites.

  5. Faites une sauvegarde complte du systme actuel.

  6. Sauvegardez /etc et ses sous-rpertoires sur une ou plusieurs disquettes.

  7. Faites des sauvegardes spares pour chaque groupe de fichiers que vous souhaitez garder.

  8. Prparez des disquettes root et boot pour la nouvelle installation.

  9. Formattez des disquettes pour le noyau temporaire et l'installation finale.

  10. Bloquez les connexions et sauvegardez les arborescences /root et /home.

  11. Dmarrez  partir des nouvelles disquettes boot et root.

  12. Effacez les partitions Linux avec fdisk et recrez-les.

  13. Lancez la nouvelle installation.

  14. Configurez le swap.

  15. Restaurez la configuration du rpertoire /etc et de ses sous-rpertoires.

  16. Configurez et recompilez le noyau Linux.

  17. Restaurez le contenu des sauvegardes faites prcdemment.

  18. Revoyez la scurit.

  19. Autorisez les connexions.

  20. Dsol, mais une fois encore :

  21. Remerciements

  22. Traduction



  ______________________________________________________________________



  11..  IIMMPPOORRTTAANNTT !!!!!! DDssiisstteemmeenntt ddee rreessppoonnssaabbiilliitt eett pprroopprriitt llggaallee

  Le procd pour lequel ce document essaie d'tre un guide est par
  nature dangereux pour les programmes et les donnes stockes sur votre
  ordinateur. Vous utilisez une telle mthode  vos risques et prils.
  Les tapes dcrites dans ce document ont fonctionn pour l'auteur ; il
  n'y a aucune garantie qu'elles fonctionnent chez vous, ni que vous
  pouvez les suivre sans dgts importants pour les programmes et/ou les
  donnes de votre ordinateur. Vous effectuez sous votre propre
  responsabilit toutes les utilisations des informations contenues ici,
  et l'auteur (NdT : ou le traducteur) ne peut(vent) tre tenu(s) pour
  responsable(s) en aucune faon, quels que soient les dommages ou les
  problmes dont vous pourriez souffrir par ces utilisations.

  Ce document est sous copyright 1996, Dynamicro Consulting Limited, et
  est distribu suivant les termes de la GNU General Public License.
  Plus simplement, cela signifie que vous pouvez le copier et le
  modifier  volont, mais que vous ne pouvez pas priver les autres de
  ces possibilits.

  Les commentaires et les questions peuvent tre envoyes  l'auteur.
  Les rapports de mises  jour de systmes complexes russies sont
  particulirement les bienvenues, pour tre utilises dans les
  prochaines versions.


  22..  MMooddiiffiiccaattiioonnss ddeeppuuiiss llaa vveerrssiioonn 11..11


    Ajout de cette section historique.

    Ajout de la suggestion de Zoltn Hidvgi concernant mtime et ctime.
     Merci Zoltn !

    Ajout d'une section Remerciements


  33..  IInnttrroodduuccttiioonn


  33..11..  CCoommmmeenntt ttuueerr eett rriinnccaarrnneerr vvoottrree mmaacchhiinnee LLiinnuuxx !!

  Le but de ce document est d'offrir des astuces vous aidant dans la
  suppression et la rinstallation d'un systme Linux.  Ce n'est en
  aucun cas un livre de recettes parfaites, mais j'espre qu'il vous
  donnera des indications concernant ce  quoi vous devez penser et dans
  quel ordre vous devez faire les choses. Cela aurait t une aide pour
  moi si quelqu'un d'autre avait crit quelque chose comme cela avant
  que je fasse ma premire mise  jour ; c'est pourquoi j'espre que
  cela sera une aide pour vous si vous avez une machine Linux  mettre 
  jour.

  Ne suivez pas tout  la lettre nanmoins : vous pouvez avoir plus ou
  moins de bouteille. Mme les noms de rpertoires cits dans ce
  document peuvent tre diffrents de ceux que vous devrez utiliser :
  par exemple, certains personnes utilisent /usr/home  la place de
  /home, d'autres l'appellent /u, et certains (petit frisson :) mettent
  mme tous leurs utilisateurs directement dans /usr mme ! Je ne peux
  tre spcifique pour votre systme, donc j'ai simplement utilis les
  noms tels qu'ils taient sur le mien.

  Vous noterez aussi que j'utilise les distributions Slackware, et que
  je suppose que vous disposez de suffisamment de mmoire vive et
  d'espace disque pour installer les sources du noyau Linux et compiler
  votre propre noyau. Si votre systme est diffrent, certaines de mes
  recommandations ne s'appliqueront pas ; mais j'espre que vous
  trouverez l'ide gnrale sous-jacente utile dans votre projet de mise
   jour.


  33..22..  PPoouurrqquuooii qquueellqquu''uunn vvoouuddrraaiitt--iill ffaaiirree cceellaa ??

  Bonne question ! S'il est possible de l'viter, ne le faites pas !
  (Ceci est la plus importante recommandation de tout ce guide !!!).
  Mais il existe des cas o vous devrez le faire.

  Par exemple, j'ai install un disque dur de 4 Go et j'ai alors
  dcouvert que le cru Linux Slackware 2.0 ne savait pas grer un disque
  dur d'une taille suprieure  2 Go ; j'ai alors t terriblement
  embarrass. Donc je devais faire une mise  jour vers la Slackware
  2.3. Cette mise  jour a t une exprience puisante, et c'est en
  partie pour cela que j'ai crit ces notes. J'ai quasiment tout fait de
  travers, et c'est seulement la chance et le fait que je possde une
  autre machine sous Linux qui m'ont sauvs du dsastre.

  Voici un autre exemple : j'ai dcouvert que je ne pouvais pas russir
   compiler un noyau Linux a.out qui marche dans la srie des 1.3 en
  utilisant une Slackware 2.3 directement aprs l'installation (sur une
  autre machine, pas sur celle que j'ai charcute).  J'ai retrouss mes
  manches, achet une Slackware 3.0 en cd-rom et je suis pass en format
  ELF. Cette fois, la rinstallation s'est mieux passe, en partie 
  cause de la premire exprience douloureuse, et cela est l'origine de
  la plupart des ides que je vous propose ici.


  33..33..  AAii--jjee  ddttrruuiirree eett rriinnssttaalllleerr ??

  Chose trange, cela est plus sr. Si vous installez par dessus un
  systme Linux, il y a des chances que vous ayez un mlange de nouveaux
  et d'anciens excutables, d'anciens et de nouveaux fichiers de
  configuration, et gnralement un fouillis  essayer d'organiser.
  Faire un nettoyage par le vide et ensuite rinstaller seulement ce que
  vous savez ncessaire est une mthode violente mais efficace pour
  avoir un rsultat propre. (Bien sur nous parlons ici de l'installation
  d'une distribution Linux complte et non pas de la mise  jour d'un ou
  deux paquetages ! La meilleure faon d'viter d'avoir  faire une
  rinstallation complte est prcisment de garder chaque composant --
  en particulier gcc et ses bibliothques, et les binutils --  jour. Si
  les programmes que vous utilisez sont raisonnablement  jour, et vous
  pouvez raliser ceci en rcuprant, et en compilant si ncessaire, les
  derniers sources de temps en temps, alors il n'y a nul besoin d'une
  mise  jour massive.)

  Comme Patrick Volkerding le souligne (lui aussi recommande la
  procdure du grand nettoyage pour les mises  jour), installer ELF par
  dessus un systme bas sur a.out engendre un dsastre ; en tout cas,
  si vous en savez assez pour essayer cela, vous n'avez pas besoin de
  lire ce guide !

  Mme sans cette complication, vous feriez mieux d'installer  partir
  de zro.


  33..44..  CCoommbbiieenn ddee tteemmppss cceellaa vvaa--tt--iill pprreennddrree ??

  Cela dpend, bien sur, de la complexit de votre systme. Mais je
  suppose que, pour l'installation russie (pour l' autre ? -- ne me le
  demandez pas ! :) j'ai pass environ 10 heures  faire des
  sauvegardes, six heures  installer tout le systme jusqu'au point 
  partir duquel j'ai pu autoriser les connexions, et une autre demi-
  journe, ou quasiment,  restaurer les choses moins importantes.
  Ensuite, au fur et  mesure, j'ai bien dcouvert des petites choses
  qui n'taient pas exactement comme je les voulais -- je les ai
  corriges ds que je les rencontrais -- mais pour l'essentiel, une
  vingtaine d'heures devraient suffire pour rinstaller un systme
  raisonnablement complexe. Peut-tre moins si vous rinstallez  partir
  d'un disque dur (j'ai utilis un cd-rom) ou plus  partir de
  disquettes. Peut-tre moins si vous utilisez un Pentium rapide, plus
  si vous utilisez un 386. Mais c'est de cet ordre de grandeur.

  Cette introduction est finie. Voyons maintenant comment raliser cela,
  une fois que vous avez dcid que cela devait tre fait. Armez vous de
  courage, respirez un bon coup, et :


  44..  NNootteezz ttoouutt ccee qquuee vvoouuss ffaaiitteess..

  C'est extrmement profitable d'avoir un rapport sur tout ce que vous
  avez fait pour prparer, et raliser, les modifications.  En
  particulier, la liste de toutes les sauvegardes que vous allez
  raliser durant la prparation de la destruction de votre systme
  actuel est trs importante.


  55..  FFaaiitteess uunnee ssaauuvveeggaarrddee ccoommppllttee dduu ssyyssttmmee aaccttuueell..

  De faon gnrale, les sauvegardes sont crites sur des mdia  accs
  squentiel. Dans ce cas l, vous ne voudrez pas utiliser cette
  sauvegarde complte pour restaurer un nombre important de fichiers ;
  il y a trop de fichiers dedans que vous ne souhaitez pas restaurer. Il
  vaut mieux crer des petites sauvegardes de zones que vous savez que
  vous restaurerez entirement. J'ai list un ensemble d'exemples plus
  loin.

  Pourquoi alors devez-vous commencer par une sauvegarde totale ? Deux
  raisons simples : d'abord en cas d'chec catastrophique durant
  l'installation du nouveau systme, vous aurez une solution pour
  retourner au point de dpart avec une peine minimale. Ensuite, quelle
  que soit la mticulosit avec laquelle vous avez prpar la nouvelle
  installation, il y a une large probabilit qu'un ou deux fichiers
  importants aient t oublis. Dans ce cas la contrainte de la
  restauration de ces un ou deux fichiers de la sauvegarde complte sera
  prfrable  la gne d'une continuation sans eux.

  Pour conomiser du temps et de l'espace disque, si vous avez encore le
  mdium contenant la distribution de votre ancienne version de Linux,
  vous pouvez ne sauvegarder que les fichiers dans les mtime ou ctime
  sont plus rcents que ceux de la date de son installation.


  66..  SSaauuvveeggaarrddeezz //eettcc eett sseess ssoouuss--rrppeerrttooiirreess ssuurr uunnee oouu pplluussiieeuurrss ddiiss
  qquueetttteess..

  Ceci est l'autre extrmit : vous n'allez pas restaurer ces fichiers
  (pour la plupart en tout cas) ; vous allez les comparer avec les
  nouveaux crs durant l'installation. Pourquoi ? Parce que les
  nouveaux peuvent contenir des informations que les anciens ne
  contenaient pas, ou exprimer ces informations de faons diffrentes.
  Changements de protocoles, ajout de nouveaux outils ou implantation de
  nouvelles fonctionnalits dans des outils existants peuvent engendrer
  des changements dans les formats des fichiers de configuration et dans
  ceux des scripts de lancement que la sous-arborescence /etc contient,
  et vous devrez srement editer vos anciennes donnes contenues dans
  ces fichiers pour respecter les nouveaux formats et tirer avantage des
  amliorations.



  77..  FFaaiitteess ddeess ssaauuvveeggaarrddeess ssppaarreess ppoouurr cchhaaqquuee ggrroouuppee ddee ffiicchhiieerrss qquuee
  vvoouuss ssoouuhhaaiitteezz ggaarrddeerr..

  Ceci est la partie la plus variable du travail, et tout ce que je peux
  rellement faire pour vous aider est de vous dcrire ce que je fais
  sur mon systme, dans l'espoir que cela vous servira comme un guide de
  base. Basiquement, vous devez regarder dans chaque rpertoire qui
  contient :


    des fichiers qui ne font pas partie de l'installation Linux
     standard

     ou

    des fichiers qui sont actuellement plus rcents que ceux que vous
     allez installer lorsque vous ferez votre nouvelle installation de
     Linux

  et isoler seulement ceux que vous voulez garder.

  (Une autre stratgie possible est de sauvegarder tous les fichiers
  dont les mtime ou ctime sont plus rcents que le jour de votre
  prcdente installation de Linux, comme mentionn plus haut, et
  ensuite de les restaurer  partir de l. Si vous faites cela, vous
  devez prendre en compte le fait que la nouvelle distribution de Linux
  peut contenir des versions de certains fichiers qui sont plus rcentes
  que celles que vous avez sauvegardes.

  Dans mon cas, je suis arriv  faire un fichier .tgz sur un mdia de
  sauvegarde pour chacun des lments


    /usr/lib/rn

    /usr/lib/smail

    /usr/lib/trn (le reste de /usr/lib sera rinstall)

    /usr/local/src

    /usr/local/bin

    /usr/local/lib

    /usr/local/lpfont

    /usr/local/man

    /usr/local/sbin

    /usr/local/thot (il y avait d'autres fichiers dans /usr/local dont
     je n'avais pas besoin)

    /usr/openwin

    /usr/src/lilo-17 (car ma nouvelle Slackware avait encore une
     version 16)

    /usr/src/linux-1.2.13 (car j'avais fait ma configuration)

    /usr/X11R6/lib/X11/app-defaults

    /usr/X11R6/lib/X11/initrc (le reste de XFree86 sera rinstall)


    /var/named

    /var/openwin

    /var/texfonts

  Ma machine tait relativement simple car il n'y avait aucun fichier de
  spool  prendre en compte. Je n'utilisais pas de spool pour les news
  sur cette machine, et il y avait seulement deux utilisateurs ; il
  tait trs facile de rcuprer tout le courrier lectronique lu avant
  l'arrt. Sinon, les rpertoires /var/spool auraient t sauvegards 
  la dernire minute. (Et, bien sur, les rpertoires contenant la liste
  de news et des serveurs !)


  88..  PPrrppaarreezz ddeess ddiissqquueetttteess rroooott eett bboooott ppoouurr llaa nnoouuvveellllee iinnssttaallllaa
  ttiioonn..

  Des dtails pour faire ceci peuvent tre trouvs dans le guide
  d'installation de votre nouvelle distribution.


  99..  FFoorrmmaatttteezz ddeess ddiissqquueetttteess ppoouurr llee nnooyyaauu tteemmppoorraaiirree eett ll''iinnssttaallllaa
  ttiioonn ffiinnaallee..

  Vous aurez besoin de deux disquettes, une pour chaque.

  Lorsque tout cela est fait, vous tes prts pour le Grand Moment.
  L'tape suivante met le systme hors service.


  1100..  BBllooqquueezz lleess ccoonnnneexxiioonnss eett ssaauuvveeggaarrddeezz lleess aarrbboorreesscceenncceess //rroooott eett
  //hhoommee..

  Ceci est la dernire chose  faire sur le vieux systme avant que vous
  ne l'effaciez, pour conserver la version la plus  jour des
  informations sur les utilisateurs et le super-utilisateur.


  1111..  DDmmaarrrreezz  ppaarrttiirr ddeess nnoouuvveelllleess ddiissqquueetttteess bboooott eett rroooott..


  1122..  EEffffaacceezz lleess ppaarrttiittiioonnss LLiinnuuxx aavveecc ffddiisskk eett rreeccrreezz--lleess..

  Le guide d'installation vous expliquera comment faire cela, ce qui va
  effacer votre ancien systme. A partir de maintenant, vous tes
  dpendants de la qualit des sauvegardes que vous avez faites aux
  tapes prcdentes ! Vous avez t averti !


  1133..  LLaanncceezz llaa nnoouuvveellllee iinnssttaallllaattiioonn..

  Il y a dj plusieurs bons documents dcrivant comment faire cela,
  donc je ne vais pas dtailler. Reprenez ici quand le nouveau systme
  bootera  partir de son disque dur.

  Pendant ce processus, pensez  faire une disquette de boot, car le
  noyau que l'installation de Linux installe doit tre remplac, et des
  accidents peuvent survenir durant cette tape. Pensez aussi 
  installer les paquetages de dveloppement et les sources du noyau.


  1144..  CCoonnffiigguurreezz llee sswwaapp..

  Avec le nouveau systme Linux dmarr  partir du disque dur, ditez
  /etc/fstab et ajoutez votre partition de swap.  Ensuite lancer la
  commande "swapon -a". Je ne sais pas pourquoi, mais l'installation de
  la Slackware ne vous propose pas ceci lorsque la partition de swap
  existe dj. Donc, lorsque vous dmarrez votre nouveau systme et que
  les scripts rc.S essaient d'activer le swap, la partition ne peut tre
  trouve dans le fichier fstab et le swap n'est pas activ. Cette tape
  corrige cela.


  1155..  RReessttaauurreezz llaa ccoonnffiigguurraattiioonn dduu rrppeerrttooiirree //eettcc eett ddee sseess ssoouuss--
  rrppeerrttooiirreess..

  Comme dcrit plus haut, vous ne pouvez pas juste recopier tous les
  vieux fichiers dans /etc et esprer que tout va marcher correctement
  aprs. Avec certains fichiers, vous pouvez faire cela ; par exemple
  /etc/XF86Config (aussi longtemps que vous utilisez la mme version de
  Xfree86 -- et le mme matriel vido -- dans l'ancienne et la nouvelle
  installation). Pour la plus grande partie cependant, il vaut mieux
  utiliser diff pour comparer les anciens et les nouveaux fichiers avant
  de faire les copies. En particulier, surveiller les changements
  significatifs dans les fichiers de /etc/rc.d, qui peuvent ncessiter
  de rtablir votre ancienne configuration en ditant  la main, plutt
  que de recopier vos anciens scripts rc  partir de votre sauvegarde.
  Une fois que tout est fini, rebootez.


  1166..  CCoonnffiigguurreezz eett rreeccoommppiilleezz llee nnooyyaauu LLiinnuuxx..

  Mme si vous n'avez absolument pas besoin de faire cela pour obtenir
  un noyau qui supporte votre matriel, il est important de faire cela
  pour avoir un noyau qui ne contienne pas des quantits de pilotes
  inutiles pour votre machine. Pour plus de dtails, regardez le Kernel
  HOWTO. Installez le noyau recompil sur une disquette d'abord ; une
  fois que vous avez vrifier qu'il dmarre, ok, installez le sur le
  disque dur, lancez lilo si vous l'utilisez, et redmarrez.


  1177..  RReessttaauurreezz llee ccoonntteennuu ddeess ssaauuvveeggaarrddeess ffaaiitteess pprrccddeemmmmeenntt..

  Certains excutables peuvent ncessiter d'tre rinstalls  partir
  des rpertoires des sources ; j'ai eu  faire cela pour lilo par
  exemple, car ma version tait plus rcente que celle de l'installation
  de la Slackware et que je ne m'tais pas proccup de sauvegarder
  l'excutable plac dans /sbin. Vous devrez vrifier les programmes
  restaurs et confirmer l'existence et l'exactitude des fichiers de
  configuration, des bibliothques, etc. Dans certains cas, vous pourrez
  avoir  restaurer des choses dans un ordre prcis ; vous aviez pris
  des notes pendant la sauvegarde, n'est-ce pas ? ;-)


  1188..  RReevvooyyeezz llaa ssccuurriitt..

  Vrifier les permissions sur les fichiers et les rpertoires pour tre
  sur que l'accs n'est ni trop restrictif ni trop libre. Je trouve que
  la Slackware laisse un environnement trop ouvert  mon gout, donc je
  me promne en changeant les 755 en 711 pour les excutables dans les
  rpertoires bin/ et autres choses du genre.  Ou mme en 700 pour ceux
  des rpertoires sbin/. Une attention particulire est ncessaire si
  vous avez un serveur FTP ; mais vous y avez alors probablement dj
  pens. :)


  1199..  AAuuttoorriisseezz lleess ccoonnnneexxiioonnss..

  a tourne et a fonctionne. Pendant un petit moment, il y aura
  probablement des dtails  rgler, mais le gros du travail est fait.
  Rjouissez-vous !
  2200..  DDssooll,, mmaaiiss uunnee ffooiiss eennccoorree ::

  VVOOUUSS UUTTIILLIISSEEZZ CCEESS IINNFFOORRMMAATTIIOONNSS  VVOOSS RRIISSQQUUEESS EETT PPRRIILLSS !!

  (Voir le dsistement de responsabilit au dbut du document.)


  2211..  RReemmeerrcciieemmeennttss

  Je remercie Zoltn Hidvgi pour sa contribution au contenu de ce mini-
  HOWTO.


  2222..  TTrraadduuccttiioonn

  Ce document a t traduit par Benot Sibaud (pas d'adresse fixe,
  cherchez dans les news).  NdT : N'hsitez pas  user et  abuser des
  HOWTO et Mini-HOWTO, ils sont l pour a. Certaines parties de ce
  document sont dcrites en dtails dans d'autres HOWTO et Mini-HOWTO.















































  Linux sur Sony VAIO mini-HOWTO
  Hideki Saito (hideki@chatlink.com)
  (Adaptation franaise par Nicolas Duboc (duboc@essi.fr)
  Octobre 1999)
  v1.1, 16 septembre 1998

  Ce document explique comment installer Linux sur les ordinateurs Sony
  VAIO.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1  propos de ce document
     1.2 Informations sur les diffrents systmes
     1.3 Historique des mises  jour
     1.4 Mise en garde
     1.5 De quoi parle ce document ?

  2. Compatibilit matrielle

     2.1 Composants matriels incompatibles avec Linux
     2.2 Composants matriels partiellement compatibles
        2.2.1 La carte son
        2.2.2 La carte vido

  3. Comment installer Linux?

  4. Pour finir...

  5. Quelques penses d'ordre lgal

  6. Remerciements



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..   pprrooppooss ddee ccee ddooccuummeenntt

  Ce document est d'abord paru sur la page personnelle de Hideki Saito 
  l'adresse http://ryoohki.anime.net/~hideki/.  Cette version du HOWTO a
  t mise  jour pour tenir compte de nouvelles informations. Il en
  existe une version HTML  l'adresse
  http://ryoohki.anime.net/~hideki/VAIO+Linux.html .  (NdT: cette
  adresse est invalide et je ne connais pas son nouvel emplacement.)

  Vous pouvez distribuer ce document librement. Si vous le publiez,
  envoyez moi un mail; je veux juste suivre son utilisation :)

  (NdT: pour toutes remarques, corrections et suggestions sur la
  traduction, une seule adresse : duboc@essi.fr)


  11..22..  IInnffoorrmmaattiioonnss ssuurr lleess ddiiffffrreennttss ssyyssttmmeess

  Rcemment, j'ai reu des courriers lectroniques m'indiquant que
  certaines parties de ce document taient incorrectes. Cela est d au
  fait que les derniers ordinateurs intgrent des composants plus
  rcents.  Je ferai une mise  jour pour inclure ces diffrences. Mais
  puisque, bien sr, je ne dispose pas de tous les modles, je demande 
  tous les possesseurs de VAIO Sony de me donner plus d'informations 
  ce sujet. Cela m'aiderait beaucoup si vous pouviez faire commencer le
  sujet du courrier par [VAIO Information], pour que je puisse y porter
  attention plus rapidement. Ajoutez galement, s'il vous plait, le
  numro de modle du systme. S'il s'agit d'un portable, indiquez-le
  dans le texte ou dans le sujet du message. Je m'excuse auprs de ceux
  que le document n'aidera pas.  (Ajout du 29/12/1998)


  11..33..  HHiissttoorriiqquuee ddeess mmiisseess  jjoouurr

  29/12/1998 Ajout de nombreuses mises  jour


  11..44..  MMiissee eenn ggaarrddee

  Bien que les manipulations dcrites dans ce document aient t
  testes, je dcline toute responsabilit en ce qui concerne les
  problmes occasionns lors de l'application des informations donnes
  ici. Comme stipul dans la licence GPL (NdT: General Public License,
  Licence Publique Gnrale, en franais), utilisez ces informations 
  vos risques et prils. Ma langue maternelle n'tant pas l'anglais,
  vous trouverez de nombreuses fautes au cours de votre lecture. Merci
  de m'en excuser. Toutes les corrections et conseils sont les
  bienvenus ; envoyez-les moi  hideki@chatlink.com.


  11..55..  DDee qquuooii ppaarrllee ccee ddooccuummeenntt ??

  Dans ce HOWTO, je vais expliquer comment installer Linux sur un
  ordinateur VAIO de Sony. Les ordinateurs VAIO sont excellents, mais ne
  sont pas vraiment faits pour Linux. Cela ne signifie pas que vous ne
  pouvez pas l'utiliser, en fait vous pouvez vraiment l'utiliser !  Tout
  au long de ce document, je prsumerai que vous possdez soit un PVC 70
  soit un PVC 90. Puisqu' peu prs tous les modles VAIO ont une
  architecture similaire (bien que les plus rcents possdent des
  disques plus gros, des cartes vido plus rcentes et une mmoire plus
  grande, etc.), une grande partie de ce texte devrait s'appliquer 
  tous les modles de VAIO.


  22..  CCoommppaattiibbiilliitt mmaattrriieellllee


  22..11..  CCoommppoossaannttss mmaattrriieellss iinnccoommppaattiibblleess aavveecc LLiinnuuxx

  La plupart des composants matriels installs sur la machine sont
  compatibles avec Linux. Toutefois, il existe des exceptions qui sont
  le modem, le port USB et le dcodeur MPEG. Soyez prvenus que vous ne
  pouvez pas utiliser le modem, ce qui peut reprsenter un problme pour
  certains d'entre vous. Le modem install sur les VAIO est un modem
  DSVD, qui est une variante des "winmodems".

  (Ajout du 28/12/1998) Des modles plus rcents ont, apparemment, des
  modems normaux au lieu des winmodems.

  (NdT : les winmodems sont des modems conus pour Windows et dont il
  n'est,  priori, pas possible de porter les drivers sous Linux.)


  22..22..  CCoommppoossaannttss mmaattrriieellss ppaarrttiieelllleemmeenntt ccoommppaattiibblleess

  Les cartes son et vido installes sont partiellement compatibles.




  22..22..11..  LLaa ccaarrttee ssoonn

  La carte son est compatible avec Linux grce au support des cartes
  Microsoft Sound System et Sound Blaster. Si vous voulez utiliser MIDI
  sous Linux, vous devrez faire une croix sur les entres son de la
  carte. Dans ce cas, n'utilisez pas le pilote SoundBlaster. Si vous
  avez besoin du support MIDI et des entres son, vous devrez envisager
  d'acheter OSS/Linux, qui permet d'utiliser toutes les capacits de la
  carte son. La carte qui quipe les VAIO est une Yamaha OPL3SA, et
  OSS/Linux possde un support complet pour celle-ci. Il semble que le
  synthtiseur par table d'onde dont parle la spcification de la
  machine soit dj un synthtiseur logiciel, donc vous ne perdrez
  aucune possibilit matrielle avec ce gestionnaire de carte son. Au
  moment o j'cris ces lignes, l'OSS/Free 3.8 possde un support de
  cette carte sous le nom de contrleur audio Yamaha OPL3-SA1.

  Il faut noter que ces pilotes ne sont pas inclus dans les noyaux Linux
  2.0.x. Il vous faudra les tlcharger sur le site d'OSS. La srie de
  noyau 2.1.x contient une version mise  jour de OSS/Free, mais je n'ai
  pas test sa compatibilit avec la carte son des VAIO. Si vous
  remarquez qu'elle fonctionne, faites-le moi savoir.


  22..22..22..  LLaa ccaarrttee vviiddoo

  La carte vido est partiellement supporte par Linux. Vous n'aurez
  aucun problme en l'utilisant en mode console. Si vous voulez
  l'utiliser sous X Window, vous aurez besoin d'une version 3.3.1 ou
  suprieure de XFree86, qui supporte les cartes ATI Rage. Il est
  possible que d'autres systmes commerciaux X Window fonctionnent
  galement. Toutefois, l'acclration 3D de cette carte de marchera pas
  sous Linux, puisqu'il n'existe pas de pilote pour cela.

  (Ajout du 29/12/1998) Pour les modles 505, XFree86 v3.3.3 et
  suprieur contient les pilotes ALSA qui sont compatibles.


  33..  CCoommmmeenntt iinnssttaalllleerr LLiinnuuxx??

  L'installation de Linux sur la machine ne sera pas un gros problme.
  Vous devez tout de mme savoir qu'il y a initialement une partition
  non-DOS sur le disque dur. Elle occupe 400 MB et on peut la voir avec
  fdisk. J'ai supprim cette partition pour l'allouer  Linux. Je n'ai
  eu aucun problme, elle doit avoir un rapport avec l'installation
  logiciel par dfaut.  (Ajout du 29/12/1998) Cette partition de 400 MB
  n'apparat que sur les anciens modles, elle devait en fait tre une
  partition DOS, mais Sony a fait une erreur.

  Rapportez-vous  d'autres documentations pour une description gnrale
  de l'installation de Linux. Le VAIO possde une fonctionnalit
  intressante qui est de pouvoir dmarrer directement depuis un CD-ROM,
  s'il est bootable. Puisque le BIOS le supporte, vous pourrez
  l'utiliser avec certaines distributions. Trs intressant car vous
  pourrez alors raliser l'installation sans disquette. En particulier,
  la distribution RedHat est capable de dmarrer depuis le CD-ROM. Mais,
  puisque je ne l'ai pas encore test, je n'en suis pas compltement
  sr. Si cette mthode de dmarrage ne marche pas sur votre machine,
  vrifiez les paramtres du BIOS  ce propos.  La configuration du
  noyau ne devrait pas poser de problme, exception faite de la carte
  son. J'ai dj parl de celle-ci dans la section ``ci-dessus'', je
  n'en reparlerai pas ici. Le VAIO est quip d'un BIOS APM, ou encore
  Advanced Power Management (NdT : Gestion avance de l'nergie). Je
  recommande personnellement de ne pas activer ce support sous Linux.
  J'ai eu des problmes aprs l'avoir utilis.


  (Ajout du 29/12/1998) J'ai reu des messages m'indiquant qu'avec le
  modle 505, l'installation par le CD-ROM est difficile et
  l'installation en rseau plus facile.


  44..  PPoouurr ffiinniirr......

  Tout s'est bien pass ? Je l'espre pour vous. Maintenant votre
  ordinateur Sony VAIO est une des meilleures stations Linux. Si vous
  avez des problmes, il se peut que j'ai des rponses  vos questions.
  Envoyez-les moi  tout moment  l'adresse hideki@chatlink.com.
  J'essaierai d'y rpondre aussi vite que possible.


  55..  QQuueellqquueess ppeennsseess dd''oorrddrree llggaall

  VAIO est une marque dpose de Sony.  Toutes les autres marques
  dposes apparaissant dans ce document appartiennent  leur
  dpositaires respectifs.  Le copyright de ce document est rserv 
  Hideki Saito.


  66..  RReemmeerrcciieemmeennttss

  Je voudrais remercier les personnes suivantes, dans aucun ordre
  particulier : Daniel Nunes. Si vous pensez que votre nom devrait
  figurer dans cette section, faites-le moi savoir par courrier
  lectronique.  (J'ai rcemment perdu une grande partie de mes mails
  par accident, un des vtres pouvait en faire partie)





































  Vesafb mini-HOWTO
  Alex Buell, alex.buell@tahallah.demon.co.uk
  v0.5, 2 August 1998

  Ce document dcrit l'utilisation du gestionnaire vesafb sous Linux
  pour un pc comprenant une carte graphique conforme aux spcifications
  VESA 2.0.
  ______________________________________________________________________

  Table des matires


  1. Remerciements

  2. Vesafb, qus acco ?

  3. Qu'est-ce qu'un gestionnaire de mmoire graphique ?

  4. Comment fais-je fonctionner le gestionnaire vesafb ?

  5. De quels modes VESA puis-je me servir ?

  6. Existe-t-il un serveur X11 adapt  vesafb ?

  7. Vesafb peut-il tre modularis ?

  8. Divers



  ______________________________________________________________________

  11..  RReemmeerrcciieemmeennttss

  Merci aux personnes dont les noms suivent pour avoir aid 
  l'amlioration du HOWTO vesafb.


    Jeff Noxon jeff@planetfall.com

    Francis Devereux f.devereux@cs.ucl.ac.uk

    Andreas Ehliar ehliar@futurniture.se

    Martin McCarthy marty@ehabitat.demon.co.uk

    Simon Kenyon simon@koala.ie

    David Ford david@kalifornia.com

    Chris Black cblack@cmpteam4.unil.ch

    N Becker nbecker@fred.net

    Bob Tracy rct@gherkin.sa.wlk.com

    Marius Hjelle marius.hjelle@roman.uib.no

    Aaron Tiensivu tiensivu@pilot.msu.edu

  et bien sr l'auteur du pilote:


    Gerd Knorr kraxel@cs.tu-berlin.de


    Geert Uytterhoeven Geert.Uytterhoeven@cs.kuleuven.ac.be

    Martin Mares mj@ucw.cz

    S'il y en a d'autres, qu'ils lvent la main. :o)


  22..  VVeessaaffbb,, qquuss aaccccoo ??

  Vesafb est un gestionnaire de mmoire vido sur compatible PC ddi
  aux cartes cartes graphiques conformes aux spcifications VESA 2.0.
  Son fonctionnement est li de prs aux gestionnaires de mmoire vido
  gnriques du noyau.

  Vesafb permet le recours aux modes graphiques sur PC pour
  l'utilisation des consoles textes en point par point. Vesafb autorise
  galement l'affichage d'un logo et c'est vraisemblablement ce pour
  quoi vous voulez vous en servir :o)

  On ne peut malheureusement pas utiliser vesafb avec des cartes VESA
  1.2.  En effet, ces cartes n'utilisent pas l'adressage linaire.
  Quelqu'un crira peut-tre un gestionnaire de priphriques vesafb12
  pour ce type de cartes, mais cela consommera de la mmoire par
  ailleurs prcieuse pour le noyau. :o(

  Il existe cependant un moyen dtourn d'accder aux fonctionnalits
  VESA 2.0 sur une carte VESA 1.2. Peut-tre pouvez vous charger depuis
  le DOS un programme de type TSR qui, utilis conjointement avec
  loadlin, aidera  configurer la carte pour les modes graphiques
  voulus. Cela ne marchera pas toujours. Ainsi, certaines cartes de chez
  Cirrus Logic, telles les VLB 54xx, se retrouvent  une position en
  mmoire ( par exemple entre 15 et 16 Mo ) qui en interdit
  l'utilisation sur les systmes munis de plus de 32 Mo de mmoire.  Ce
  n'est pas rdhibitoire si l'on dispose d'un BIOS permettant de ne pas
  affecter de mmoire entre 15 et 16 Mo ( "Memory Hole" ) mais il m'a
  sembl comprendre que Linux n'aime pas a. Si l'exprience vous tente,
  vous pouvez essayer UNIVBE ( disponible sur l'Internet ).


  33..  QQuu''eesstt--ccee qquu''uunn ggeessttiioonnnnaaiirree ddee mmmmooiirree ggrraapphhiiqquuee ??

  Ce gestionnaire fournit une abstraction du matriel graphique. Il
  reproduit le tampon mmoire de certains composants vido et offre aux
  applications l'accs au matriel via une interface bien dfinie.
  Ainsi, les logiciels n'ont plus  se proccuper des dtails de bas-
  niveau [ Traduit approximativement de
  /usr/src/linux/Documentation/fb/framebuffer.txt ]


  44..  CCoommmmeenntt ffaaiiss--jjee ffoonnccttiioonnnneerr llee ggeessttiioonnnnaaiirree vveessaaffbb ??

  [NB : les informations qui suivent sont bases sur mon exprience
  concernant le noyau Linux 2.1.112 sur un P75+ muni d'une carte ATI
  VideoExpress avec 2Mo de mmoire vido. N'hsitez pas  me faire part
  de vos expriences particulires. ]

  A supposer que vous utilisiez menuconfig, vous devrez passer par les
  tapes suivantes :

  Dans le menu "Code maturity level options" :

    Prompt for development and/or incomplete code/drivers

     [ceci peut changer dans les futurs noyaux. Ce HOWTO sera alors
     modifi]

  Dans le menu "Console drivers" :


    VGA Text Console

    Video Selection Support

    Support for frame buffer devices (experimental)

    VESA VGA Graphic console

    Advanced Low Level Drivers

    Choisissez les gestionnaires Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp
     et 32bpp .

    VGA character/attributes support

  Le support des composants VGA (en mode texte) - vgafb - appartenait 
  la liste ci-dessus mais il en a t supprim en raison de son
  obsolescence. Il disparaitra sous peu. Slectionnez plutt "VGA Text
  Console".

  Vrifiez bien que le support "Mac variable bpp packed pixel" n'est pas
  activ.  [ En 2.2.111, il semblerait qu'il le soit si "Advanced Low
  Level Drivers" l'est ].

  Assurez vous que rien n'est modularis. [J'ai des doutes quand aux
  possibilits de modularisation de l'ensemble - les prcisions seront
  les bienvenues]

  Recompilez le noyau, modifiez l'/etc/lilo.conf de faon  ajouter le
  paramtre VGA=ASK, lancez lilo. Ceci vous permettra de choisir le mode
  graphique que vous voulez.

  Redmarrez le noyau et essayez comme test d'entrer 0301 au prompt VGA.
  Vous devriez vous retrouver en 640x480 sur 256 couleurs avec un
  dlicieux petit logo de pingouin.

  Maintenant que a fonctionne, il vous reste  essayer les diffrents
  modes VESA ( cf ci-dessous ),  choisir celui que vous prfrez et 
  le figer via le paramtre "VGA=toto" du lilo.conf. Pour cela, aprs
  avoir fait votre choix, cherchez sa reprsentation dcimale dans les
  tables qui suivent et utilisez ce nombre. Par exemple, pour du 1280
  par 1024 en 256 couleurs, vous utiliserez "VGA=775". N'oubliez pas de
  relancer lilo. C'est tout. Pour davantage d'informations sur le sujet,
  reportez vous aux HOWTO sur LILO et Loadlin.


  55..  DDee qquueellss mmooddeess VVEESSAA ppuuiiss--jjee mmee sseerrvviirr ??

  Cela dpend de votre carte graphique,  en particulier de la quantit
  de mmoire dont elle dispose. A vous de voir quels sont les modes qui
  fonctionnent le mieux.

  La table suivante fournit les numros des modes que vous pouvez passer
   l'invite VGA ( en fait les indices se sont vus ajouter 0x200 afin de
  s'y retrouver plus facilement dans la table ).








  Couleurs | 640x480 800x600 1024x768 1280x1024 1600x1200
  ---------+---------------------------------------------
  256      |  0301    0303     0305     0307      031C
  32,768   |  0310    0313     0316     0319      031D
  65,536   |  0311    0314     0317     031A      031E
  16.8M    |  0312    0315     0318     031B      031F



  La mme chose en dcimal :


  Couleurs | 640x480 800x600 1024x768 1280x1024 1600x1200
  ---------+---------------------------------------------
  256      |   769     771      773      775       796
  32,768   |   784     787      790      793       797
  65,536   |   785     788      791      794       798
  16.8M    |   786     789      792      795       799



  [L'auteur apprcierait fortement de recevoir les codes 03xx pour les
  modes manquants, i.e. 1152x900]


  66..  EExxiissttee--tt--iill uunn sseerrvveeuurr XX1111 aaddaapptt  vveessaaffbb ??

  Oui. Si pour une raison ou une autre votre serveur habituel digre mal
  vesafb, vous devrez utiliser la version XF86_FBdev. Tlchargez
  X332servonly.tgz depuis  ou un de ses mirroirs, dcompressez le,
  effectuez les modifications ncessaires dans le fichier
  xc/config/cf/xf86site.def et dcommentez le #define relatif 
  XF68FBDevServer. Ne prtez pas attention  ce qui se rapporte  m68k.
  L'architecture PC est supporte. Compilez le tout, il y en a pour un
  moment. Ooommmm...

  Il n'y a pas encore actuellement de binaire XF86_FBdev disponible tel
  quel mais Debian y travaille et les versions libc5/glibc devraient
  sortir.

  Certains ont signal que X11 n'est pas exploitable sur certaines
  cartes lorsque le gestionnaire vesafb est activ. Si vous vous
  retrouvez dans ce cas, essayez le dernier serveur XF86_FBdev pour X11.

  Ce gestionnaire, utilis avec vesafb, peut permettre de faire
  fonctionner X11 avec certains chipsets  des rsolutions qui ne
  seraient pas autrement supportes par quelque serveur X que ce soit (
  ex. MGA G-200 ).

  Esperons que les problmes de support des cartes graphiques avec X11
  seront rsolus par les versions  venir.


  77..  VVeessaaffbb ppeeuutt--iill ttrree mmoodduullaarriiss ??

  En ce qui concerne le 2.1.112, vesafb ne peut tre compil en tant que
  module.  D'ailleurs, aprs modularisation, on ne verrait rien 
  l'cran jusqu' ce que l'on effectue un modprobe sur vesafb. Il est
  donc surement plus sage pour l'instant de le laisser dans le noyau,
  des fois que le boot ne se droule pas correctement.


  88..  DDiivveerrss

  Les infos donnes ici sont valables pour la version 2.1.112 du noyau.
  Ce HOWTO sera mis  jour selon l'avancement du dveloppement du noyau.
  N'hsitez pas  transmettre  l'auteur vos commentaires et
  approfondissements.

  A noter : le dfilement en arrire ne fonctionne pas encore.






























































  Serveurs FTP virtuels avec wu-ftpd
  Winfried Truemper, (winni@xpilot.org)
  avec l'aide de Brian Grossman, (brian@SoftHome.Net)
  Traduit par David Tilloy, (dav@neuronnexion.fr)
  Version 1.2 - 27 janvier 1997

  Ce document decrit comment parametrer les serveurs ftp virtuels.

  11..  IInnttrroodduuccttiioonn

  Linux  offre  la  possibilite  d'executer plusieurs "serveurs" sur une
  seule machine. De  nombreuses  personnes  se  servent  deja  de  cette
  possibilite afin de disposer de plus d'un service WWW sur leur machine
  Linux, e.g.

                       www.sharpers.com                (192.168.55.37)
                       www.usurers.com                 (192.168.55.38)
                       www.swindlers.com               (192.168.55.39)

  apparaissent comme trois machines distinctes, mais ne sont en  realite
  qu'une seule et unique machine Linux assurant ces services.

  La  technique utilisee derriere cette fonction est appelee "multihome"
  et est basee sur la capacite de Linux d'assigner plusieurs adresses IP
  a  une seule interface reseau (carte ethernet ou modem). En fait, vous
  n'avez pas besoin de disposer de plusieurs cartes  ethernet  pour  que
  Linux  soit  a  l'ecoute  de  plusieurs  addresses/noms sur le reseau.
  Linux manipule les adresses IP additionnelles a l'aide d'  "interfaces
  virtuelles"  qui representent physiquement le meme materiel, mais sont
  logiquement  distinguees  a  l'aide  de  leurs  adresses  IP  par  les
  logiciels (et le noyau).

  Ces  interfaces  virtuelles  sont  nommees  de  maniere  similaire que
  l'interface reelle sur laquelle  elles  pointent,  et  ont  simplement
  comme suffixe un (plus ou moins) numero arbitraire.

  Le  terme propre pour chaque interface virtuelle est "alias ip".  Pour
  les hotes virtuels, la commande ifconfig donne la (lourde) sortie:

               interface adresse IP   address de diffusion      masque
               ------------------------------------------------------------
               eth0      192.168.55.37    192.168.55.63     255.255.255.224

               eth0:0    192.168.55.38    192.168.55.63     255.255.255.224
               eth0:1    192.168.55.39    192.168.55.63     255.255.255.224
               eth0:2    192.168.55.40    192.168.55.63     255.255.255.224
               eth0:3    192.168.55.41    192.168.55.63     255.255.255.224
                    ^-- numero de l'alias ip

  Pour disposer et utiliser cette  facilite  des  alias  ip,  vous  avez
  besoin  d'un  "module"  pour votre noyau Linux, qui peut etre intregre
  dans le noyau a la compilation ou charge a la volee  par  la  commande
  (en tant que root):

                  insmod ipalias

  La  plupart des distributions actuelles distribuent ce module, donc je
  ne passerai pas plus de temps a decrire comment  le  creer  (note:  Si
  vous ne l'avez pas, lisez le document Linux Kernel-HOWTO).

  L'alias ip pour les hotes definis ci-dessus ont ete cree avec un petit
  script lors du demarrage:

       8<----- couper ici 8<-----
       #!/bin/sh

       NETMASK="255.255.255.224"      # remplacez par votre masque de reseau
       BROADCAST="192.168.55.63"      # remplacez par votre adresse de diffusion
       MAIN_IF="eth0"                 # interface "de base"

       IPALIASES="192.168.55.38   192.168.55.39   192.168.55.40 \
                  192.168.55.41   192.168.55.42   192.168.55.43 \
                  192.168.55.44   192.168.55.45   192.168.55.46"

       # Vous n'avez plus besoin de modifier quoi que ce soit apres ce point
       i=0
       for ALIAS in $IPALIASES
       do
           /sbin/ifconfig  ${NETTYPE}:${i}  ${ALIAS} \
                           broadcast ${BROADCAST}  netmask ${NETMASK}
           /sbin/route add -host ${ALIAS} dev ${NETTYPE}:${i}
           i=$[$i+1]
       done
       8<----- couper ici 8<-----

  Si vous avez d'autres questions a propos des alias  ip,  consultez  le
  document    Linux    "IP    Alias    mini-HOWTO"    et    le   fichier
  "Documentation/aliases.txt" dans le repertoire contenant  les  sources
  du noyau Linux (generalement, dans le repertoire "/usr/src/linux").

  22..  SSeerrvviicceess eett SSeerrvveeuurrss VViirrttuueellss

  Si  un  nom  d'hote appartient a une interface virtuelle, c'est ce que
  l'on nomme communement un "hote virtuel".  Un  demon  qui  execute  un
  service  sur  un  hote  virtuel  (ou  sur une interface virtuelle) est
  appele "serveur virtuel".

  22..11..  SSeerrvveeuurrss WWWWWW VViirrttuueellss

  Nous  avons  deja  donne  un  exemple  de  3  serveurs  WWW   virtuels
  precedemment:

                  www.sharpers.com, www.usurers.com, www.swindlers.com

  La  configuration  d'une  grande  partie  de  ces  demons  http que je
  connaisse (c.f. l'excellente conception du "Roxen  Challenger"  ou  le
  largement  repandu  "Apache")  pour utiliser ces serveurs virtuels est
  facile,  et  largement  documentee.   En   quelques   mots:   attachez
  simplement  le  port  www (num 80) a l'interface reseau virtuelle avec
  l'adresse ip/nom desire pour chaque serveur WWW que vous executez.  Il
  n'y a aucune astuce.

  Lisez  le document Linux "Virtual Web mini-HOWTO" si vous desirez plus
  d'informations sur cette technique.

  22..22..  AAddddrreesssseess ddee ccoouurrrriieerr vviirrttuueelllleess

  Dans le cas le plus simple, vous souhaitez  recevoir  chaque  courrier
  pour tous les hotes virtuels, et pour les domaines concernes:

                       www.sharpers.com, www.usurers.com, www.swindlers.com,
                           sharpers.com,     usurers.com,     swindlers.com

  Meme  la  configuration de "smail" ou de "sendmail" (les demons qui se
  charge  du  traffic  de  courrier  sur  votre   machine   Linux)   est
  relativement  simple:  ajoutez  les  noms/domaines  additionnels  dans
  "/etc/smail/config"    (ajoutez    'hostnames='     et     'domains=')
  respectivement  "/etc/mail/sendmail.cw" (un nom de domaine par ligne).

  Pour implementer un "reel" domaine virtuel a l'aide de smail, regarder
  la FAQ sur smail (smail-FAQ), disponible sur

  http://www.sbay.org/smail-faq.html

  22..33..  SSeerrvveeuurrss ffttpp vviirrttuueellss

  Le  concept  de serveur ftp virtuel n'est pas supporte par defaut dans
  les demons ftp que je connaisse.

  Le tres largement diffuse "wu-ftpd" dispose  d'un  patch  realise  par
  Brian   Grossman  brian@SoftHome.Net  pour  realiser  un  service  FTP
  distinct du serveur FTP  anonyme  traditionnel.   Vous  trouverez  des
  precisions pour recuperer ce patch dans le chapitre 3.

  Il  semble  qu'il  n'y ait pas d'autres patch disponible pour realiser
  cette operation.

  L'idee generale du patch multihote de Brian est de faire operer a  wu-
  ftpd un "chroot()" sur

                       REPERTOIRE_DE_BASE_DU_COMPTE_FTP/NOM_D_HOTE_DEMANDE/

  au lieu de juste faire un chroot() sur

                                       REPERTOIRE_DE_BASE_DU_COMPTE_FTP/

  Dans  l'exemple  presente  precedemment, l'utilisateur qui se connecte
  sur "ftp.swindlers.com" par un compte  ftp  anonyme  est  bloque  dans
  "/home/ano-ftp/ftp.swindlers.com/"  au lieu de "/home/ano-ftp/".  Vous
  pouvez imaginer que la configuration de base est simple et ne  differe
  que tres peu de la configuration d'un serveur anonyme simple.

  Gloire  a  Brian  pour  cette  strategie  de  configuration  simple et
  efficace.

  Laissez moi m'assurer que vous disposez de cette version  speciale  de
  wu-ftp  deja  compilee par vous meme, ou que vous vous etes procure le
  binaire, et laissez moi vous renvoyer pour toute question a la fin  de
  ce document.

  Je  vais  vous donner un exemple de la vie courante, et vous expliquer
  les manipulations que j'ai effectuees pour un de mes clients (je  n'ai
  change que le nom de ses machines par des noms fictifs...).

  (a)  Creez  un repertoire "/home/ano-ftp" pour les differents serveurs
  ftp anonymes.

                       mkdir  /home/ano-ftp  &&  cd /home/ano-ftp
                       mkdir  ftp.sharpers.com  ftp.usurers.com  ftp.swindlers.com

  Vous obtenez alors comme arborescence:

               /home/ano-ftp/
                         |-- ftp.sharpers.com
                         |-- ftp.swindlers.com
                         `-- ftp.usurers.com

  (b) Copiez les fichiers necessaires pour un service ftp anonyme depuis
  le   repertoire   "/home/ftp"  du  serveur  deja  configure  dans  les
  repertoires nouvellements crees.

                       cd     /home/ano-ftp/ftp.sharpers.com
                       cp -a  /home/ftp/* .

                       cd     ../ftp.swindlers.com
                       cp -a  /home/ftp/* .

                       cd     ../ftp.usurers.com
                       cp -a  /home/ftp/* .

  N'oubliez pas d'effacer les fichiers superflus  du  repertoire  "pub/"
  (ou  simplement,  ne  les  copiez  pas).   Par  exemple, le repertoire
  "/home/ftp" de la distribution Debian ressemble a ceci:

               /home/ftp                       Permissions   Propr  Groupe Taille
                       |-- bin                 d--x--x--x   2 root   root
                       |   |-- gzip            ---x--x--x   1 root   root   45121
                       |   |-- ls              ---x--x--x   1 root   root   22945
                       |   `-- tar             ---x--x--x   1 root   root   77769
                       |
                       |-- etc                 d--x--x--x   2 root   root
                       |   |-- group           -r--r--r--   1 root   root      18
                       |   |-- passwd          -r--r--r--   1 root   root      44
                       |   `-- pathmsg         -r--r--r--   1 root   root     172
                       |
                       |-- lib                 d--x--x--x   2 root   root
                       |   |-- ld-linux.so.1   -r-xr-xr-x   1 root   root   21375
                       |   |-- libc.so.5.2.18  -rwxr-xr-x   1 root   root  536252
                       |   `-- libc.so.5 -> libc.so.5.2.18
                       |
                       |-- pub                 dr-xr-xr-x   3 root   root
                       |   `-- whatever
                       |
                       `-- welcome.msg         -rw-r--r--   1 root   root     323

  (c)  Changez  le  repertoire  de  base  du  compte  ftp  anonyme   par
  "/home/ano-ftp" en editant le fichier "/etc/passwd".

               ftp:*:11:11:Anonymous FTP:/home/ano-ftp:/bin/sh
                                         ^^^^^^^^^^^^^
                                       repertoire de base

  Ces  trois  etapes  decrivent la configuration minimale, et permettent
  deja la separation des zones ftp pour chacun  des  3  hotes  virtuels.
  Mon  travail  actuel  etait  un  peu  plus  complique, puisque j'ai du
  activer  les  quotas  sur  les  disques  (limitant   l'espace   disque
  consommable   par  utilisateur/groupe)  dans  chacun  des  repertoires
  incoming, donc l'histoire continue:

  (d)  Activez  les  zones  de  telechargement  dans   le   fichier   de
  configuration de wu-ftp "/etc/ftpd/ftpaccess"

       8<----- couper ici 8<-----
       upload  /home/ano-ftp/www.sharpers.de  *         no
       upload  /home/ano-ftp/www.sharpers.de  /incoming yes sharpers ftp 0660 nodirs
       upload  /home/ano-ftp/www.swindlers.de *         no
       upload  /home/ano-ftp/www.swindlers.de /incoming yes swindler ftp 0660 nodirs
       upload  /home/ano-ftp/www.usurers.de   *         no
       upload  /home/ano-ftp/www.usurers.de   /incoming yes usurers  ftp 0660 nodirs
       #                                                |      |      |    |     |
       #                    telechargements autorises --+      |      |    |     |
       #     les fichiers telecharges appartiennent            |      |    |     |
       #                            a cet utilisateur ---------+      |    |     |
       #                          idem pour le groupe ----------------+    |     |
       # droits d'acces pour les fichiers telecharges ---------------------+     |
       #        creation de repertoires non autorisee ---------------------------+
       8<----- couper ici 8<-----

  Maintenant,  chaque fichier telecharge sur ce serveur ftp appartient a
  un utilisateur separe, pour qui les quotas peuvent etre actives.

  (e) Configurer les quotas sur les disques.

  Je vous suggere de lire:  "/usr/doc/quotas.txt"  et  le  Linux  "Quota
  mini-HOWTO".

  *  Ajoutez  "usrquota=/etc/quota/ano-ftp.users"  dans  les  options de
  montage  de  la  partition   "/home/an-ftp"   qui   se   trouve   dans
  "/etc/fstab".

  * Creez "/etc/quota/ano-ftp.users" a l'aide de la commande "touch".

  * Activez les quotas par la commande "quotaon"

  * Fixez les quotas avec "edquota swindlers", etc.

  Quotas pour l'utilisateur swindlers:

                   /dev/sdb8: blocks in use: 0, limits (soft = 0, hard = 10000)
                              inodes in use: 1, limits (soft = 0, hard = 1000)

  L'espace disque  correspondant depend de la taille en block du systeme
  de fichier que vous avez cree (le standard est 1 block = 1 kb).

  33..  DDiissppoonniibbiilliittee

  Le patch multihote (20kb) pour wu-ftpd peut etre telecharge depuis

           ftp://ftp.softhome.net/pub/users/brian/multihomed-wu-ftpd-2.4-23.patch

  S'il vous plait, lisez-le pour plus de details sur le copyright.

  Les sources de "wu-ftpd" sont disponibles a plusieurs endroits sur  le
  net,  utilisez  archie  pour trouver le serveur le plus proche de vous
  mettant a disposition ces sources. Changez  le  repertoire  ou  a  ete
  decompresse les sources et tapez

                   patch < ../multihomed-wu-ftpd-2.4-23.patch

  pour  concatener  le  patch  avec  les sources. La FAQ sur wu-ftpd est
  disponible a l'adresse

  http://www.hvu.nl/ koos/wu-ftpd-faq.html

  Bip visuel mini-Howto (Visual bell mini-Howto)
  Alessandro Rubini, rubini@linux.it
  Traduction Jean-Albert Ferrez, Jean-Albert.Ferrez@epfl.ch
  v2.2, 11 Novembre 1997

  Ce  document  explique comment utiliser termcap pour configurer un bip
  visuel sur son systeme et comment  desactiver  a  la  demande  le  bip
  sonore.

  11..  IInnttrroodduuccttiioonn

  La  console  Linux  emet  un  bip sonore lorsqu'un caractere BEL (code
  ASCII 7) est produit. Bien que ce soit un choix  raisonnable  dans  la
  plupart   des  cas,  bien  des  utilisateurs  n'aiment  pas  que  leur
  ordinateur fasse du bruit. Ce mini-howto est cense  expliquer  comment
  indiquer  aux  applications  de  ne  pas produire de caractere BEL. Il
  explique egalement comment faire en sorte que le noyau et le serveur X
  Window  ne  sonnent  pas  en presence d'un caractere BEL. Notez que la
  plupart de ce document concerne la console texte, etant donne  que  la
  configuration du serveur X est triviale pour ceux qui travaillent dans
  un environnement graphique.

  A mon avis, la meilleure attitude  a  adopter  face  a  un  ordinateur
  bruyant  consiste a operer au niveau du materiel, le mien n'a meme pas
  de haut-parleur.

  22..  SSppeekkeeaarreeccttoommyy"",, aabbllaattiioonn dduu hhaauutt--ppaarrlleeuurr

  L'ablation du haut-parleur est de loin la solution la  plus  brillante
  au  probleme  du  bip sonore. Comme son nom l'indique, elle consiste a
  supprimer le  bip  a  la  source.  L'operation  est  simple,  elle  ne
  necessite pas d'anesthesie.

  Les  PC  sont  habituellement  equipes  d'un bouton ridicule servant a
  reduire la frequence du CPU. Ce bouton n'est jamais  utilise  dans  un
  environnement  multitache,  puisque l'on n'a jamais besoin de ralentir
  la  machine  pour  utiliser  des  jeux  bases  sur  des   boucles   de
  temporisation. Malheureusement, on ne peut pas utiliser ce bouton pour
  augmenter  la  frequence  du  CPU,  mais  on  peut   l'utiliser   pour
  activer/desactiver le haut-parleur. Parfois, ce dernier est utile meme
  si vous preferez un ordinateur silencieux, par exemple  pour  signaler
  la  fin  d'une  longue  compilation.  Pour  modifier la fonction de ce
  bouton, il suffit de le deconnecter de la carte-mere et de le brancher
  en serie avec le haut-parleur.

  Cela  dit,  les  possesseurs  de  portables  n'ont  pas acces au haut-
  parleur,  pas  plus  qu'ils  ne  disposent  d'un  bouton   inutile   a
  reassigner.   La   solution  pour  ces  utilisateurs  reside  dans  la
  configuration de leurs logiciels, comme indique ci-dessous.

  33..  CCoonnffiigguurraattiioonn dduu bbiipp ccoonnssoollee ppaarr ccoonnssoollee

  Depuis la version 1.3.43, Martin Mares a modifie console.c, y ajoutant
  la  possibilite  de  configurer  la hauteur et la duree du bip. Chaque
  console peut etre configuree pour avoir un bip de hauteur et/ou  duree
  differente.  Ce  but  est  atteint au moyen de sequences d'echappement
  interpretees par le gestionnaire de la console. Vous pouvez configurer
  vos  fichiers  ~/.profile  ou ~/.login pour choisir un bip particulier
  pour chaque console (ou, le cas echeant, pas de bip du tout).

  Les sequences d'echappement fonctionnent comme suit :

  +o  ESC-[10;xx] selectionne la hauteur du bip en Hertz. La valeur  doit
     etre dans la plage 21-32766, sinon le resultat est indetermine.  Si
     l'argument `xx' manque (ESC-[10]), la valeur par defaut est 750 Hz.

  +o  ESC-[11;xx]  selectionne la duree du bip en millisecondes.  Au dela
     de 2 secondes, la valeur par defaut de 125 ms est appliquee.  Cette
     derniere est egalement utilisee si l'argument 'xx' manque.

  Pour  avoir par exemple un bip a 50Hz durant une seconde, faites "echo
  -e "\\33[10;50]\\33[11;1000]"" avec bash (le "-e" signifie `digere les
  sequences   d'echappement'.   Avec  tcsh  la  commande  devient  "echo
  "\\033[10;50]\\033[11;1000]"".

  Bien que je ne connaisse aucune version de  la  commande  setterm  qui
  supporte  une  telle  configuration,  il  est  possible qu'une version
  future offre une option permettant de configurer le bip.

  Si vous  utilisez  Linux-1.3.43  ou  plus  recent,  vous  pouvez  vous
  contenter  des  sequences  d'echappement  et interrompre votre lecture
  ici. Si votre noyau est plus vieux, ou si vous desirez un bip  visuel,
  vous aller aimer le reste de ce document.

  44..  CCoonncceeppttss ddee bbaassee aauu ssuujjeett ddee TTeerrmmccaapp eett TTeerrmmiinnffoo

  Le  fichier  /etc/termcap est un fichier texte contenant les "terminal
  capabilities"   (capacites   des   terminaux,    N.d.T.).    Plusieurs
  applications  utilisent  les  informations de termcap pour deplacer le
  curseur sur l'ecran ou d'autres actions en relation avec  ce  dernier.
  tcsh,  bash, vi et toutes les applications basees sur curses utilisent
  la base de donnees termcap.

  La base de donnees decrit plusieurs types de  terminaux.  La  variable
  d'environnement  TERM  selectionne  le  comportement  correct  lors de
  l'execution en indiquant aux applications  quelle  entree  de  termcap
  utiliser.

  Dans la base de donnees, chaque capacite d'un terminal est representee
  par un code de deux lettres  et  une  representation  de  la  sequence
  d'echappement permettant d'obtenir l'effet desire. Les deux-points ":"
  servent de separateur entre les differentes capacites. Par exemple, le
  bip  sonore  dont le code est "bl" apparait generalement sous la forme
  "bl=^G", ce qui signifie que le  bip  est  obtenu  en  "affichant"  le
  caractere control-G, correspondant au code ASCII BEL.

  En  plus  de  bl,  la capacite vb est reconnue. Elle est utilisee pour
  representer le "bip visible". vb est generalement absent  de  l'entree
  linux du fichier termcap.

  La  plupart  des applications et librairies modernes utilisent la base
  de donnees terminfo au lieu de termcap. Cette base de donnees  utilise
  un  fichier par type de terminal et est situee dans /usr/lib/terminfo;
  pour eviter de trop grands repertoires,  les  descriptions  de  chaque
  type  de  terminal  sont  stockees dans un repertoire nomme d'apres la
  premiere   lettre   :   ainsi,   l'entree   linux   se   situe    dans
  /usr/lib/terminfo/l/linux. Pour construire une entree terminfo il faut
  "compiler" une description termcap, voir le programme tic et  sa  page
  de manuel.

  55..  MMiissee ssuurr ppiieedd dd''uunn bbiipp vviissiibbllee

  Vous  pouvez ajouter une entree pour la capacite vb dans votre fichier
  termcap, si ce n'est pas deja fait. Dennis Henriksen (duke@diku.dk)  a
  suggere  la  ligne  suivante dans l'entree linux (appelee console dans
  les anciennes distributions) du fichier termcap :

       :vb=\E7\E[?5h\E[?5l\E[?5h\E[?5l\E[?5h\E[?5l\E[?5h\E[?5l\E8:\

  Le backslash final sert a cacher le retour a la ligne  dans  la  base.
  Le code de Dennis fonctionne comme suit (selon ses propres mots) :

  +o  Sauvegarde de la position du curseur (par precaution).

  +o  Bascule du fond d'ecran plusieurs fois entre normal et inverse.

  +o  Restauration de la position du curseur.

  66..  DDeessaaccttiivvaattiioonn dduu bbiipp ssoonnoorree ddaannss llaa ccoonnssoollee tteexxttee

  Si  vous  desirez  imposer  le bip visuel dans la console, vous pouvez
  utiliser l'entree "bl" dans la termcap et lui donner  la  meme  valeur
  que  pour "vb" ci-dessus. Cette aproche est pratique si vous ne voulez
  pas configurer chaque application (cela est de  toutes  facons  decrit
  ci-dessous).  J'utilise  cette  solution  sur  toutes les machines sur
  lesquelles j'utilise Linux sans pouvoir deconnecter le haut-parleur.

  77..  EEmmppeecchheerr lleess aapppplliiccaattiioonnss dd''eemmeettttrree ddeess bbiippss

  Ceci  est  une  liste  incomplete  d'applications  qui  peuvent   etre
  configurees pour utiliser l'entree vb pour le type de terminal utilise
  (utilisant soit termcap soit terminfo) :

  +o  Le serveur X : utilisez la commande "xset b" pour  selectionner  le
     comportement  du  bip.  Elle  prend  trois  arguments  numeriques :
     volume, hauteur et duree. "xset -b" desactive completement le  bip.
     La   configuration  du  serveur  affecte  toutes  les  applications
     tournant dessus.

  +o  xterm : xterm peut convertir chaque bip soit en  un  signal  visuel
     soit  en un signal sonore. Si vous utilisez un bip sonore, il obeit
     a la configuration issue de "xset". Par defaut xterm utilise un bip
     sonore,  mais  l'option "-vb" sur la ligne de commande ainsi que la
     ressource "xterm*visualBell: true" le remplace par un flash visuel.
     Vous  pouvez passer de l'un a l'autre en cours d'execution au moyen
     du menu obtenu par control-clic-bouton-gauche. Si  vous  travaillez
     sous  X  vous  n'avez  probablement pas besoin des informations qui
     suivent.

  +o  tcsh (6.04 et ulterieurs) : "set visiblebell".   Cette  instruction
     peut etre placee dans .cshrc ou executee directement. Pour retablir
     le bip  sonore,  "unset  visiblebell".  Pour  n'avoir  ni  l'un  ni
     l'autre, utilisez "set nobeep".

  +o  bash  (n'importe quel bash, pour autant que je sache) : Mettez "set
     bell-style  visible"  dans  votre  ~/.bashrc.  Les  autre   valeurs
     possibles sont "none" et "audible".

  +o  bash  (avec  readline,  ainsi  que d'autres applications basees sur
     readline) : Mettez "set prefer-visible-bell" dans ~/.inputrc.

  +o  nvi et elvis : Mettez "set flash"  dans  ~/.exrc  ou  faites  ":set
     flash" directement. (notez les deux points). Pour desactiver le bip
     visuel, utilisez noflash au lieu de flash.

  +o  emacs : Mettez "(setq visible-bell t)" dans votre ~/.emacs. Pour la
     desactiver : "(setq visible-bell nil)".
  +o  less  :  Utilisez l'option "-q" sur la ligne de commande pour avoir
     un bip visuel, utilisez "-Q" pour n'avoir  aucun  bip.  Pour  avoir
     l'une  ou  l'autre  de  ces  options par defaut, mettez-les dans la
     variable d'environnement "LESS".

  +o  screen : Faites "Ctrl-A - Ctrl-G". Cela change le  comportement  de
     tous   les   ecrans   virtuels.   Voyez  la  page  du  manuel  sous
     "CUSTOMIZATION" pour fixer le comportement par defaut.

  88..  LLaa ffaaccee ccaacchheeee dduu pprroobblleemmee

  La mauvaise nouvelle est que toutes les applications  n'utilisent  pas
  termcap ou terminfo. La plupart des petits programmes ont le caractere
  'backslash-a' (l'alarme) dans le  code  source  C.  Le  code  "alarme"
  devient  un  caractere ASCII BEL dans les chaines de caractere du code
  binaire. Les vraies applications ne sont en principe pas de  ce  type,
  mais mefiez-vous des debutants en C qui vous donnent leurs programmes.
  Les pires, je vous assure, sont les etudiants en informatique.

  La seule maniere  de  reduire  ces  applications  au  silence  est  de
  proceder   a   une   "spekearectomy",   ou  d'utiliser  les  sequences
  d'echappement dues a Martin Mares.

  Le HOWTO Windows 95 + Windows 3.x + Linux
  Robert   Goodwin,  <Robert.Goodwin@mcc.ac.uk>,  traduit  par
  Olivier Tharan, <Olivier.Tharan@int-evry.fr>
  Aout 1996

  11..  IInnttrroodduuccttiioonn

  Ce document a d'abord ete ecrit en janvier 1996. J'y ai inclus  divers
  commentaires, informations et questions recus depuis lors. Ce document
  est aussi disponible en japonais ; voyez l'ensemble de  documentations
  Linux en japonais a  <http://epsenewsc.kyoto-u.ac.jp/JF/JF.html>.

  22..  DDeemmaarrrreerr pplluussiieeuurrss ssyysstteemmeess dd''eexxppllooiittaattiioonn

  Si vous voulez demarrer plusieurs systemes d'exploitation (et que vous
  ne voulez pas les demarrer a partir  d'une  disquette  !),  vous  avez
  besoin d'utiliser une sorte de _g_e_s_t_i_o_n_n_a_i_r_e _d_e _d_e_m_a_r_r_a_g_e.

  Windows  95  n'a pas _v_r_a_i_m_e_n_t de gestionnaire de demarrage -- il a des
  options  de  demarrage,  mais  pour  moi   on   peut   configurer   un
  ``gestionnaire de demarrage'' pour demarrer n'importe quoi.

  On  peut configurer Lilo pour demarrer quasiment n'importe quoi, comme
  le peuvent les gestionnaires de demarrage d'OS/2  et  de  Windows  NT.
  Lequel  vous  utilisez  depend entierement de vous ; cela depend de ce
  que vous voulez sur votre systeme. Si vous utilisez le gestionnaire de
  demarrage  d'OS/2,  par  exemple,  il  vous  ``cache''  les ``autres''
  partitions de genre DOS.

  33..  AAuuttrreess eennddrrooiittss aa rreeggaarrddeerr

  Si vous voulez juste Windows 95 et Linux, vous aurez  surement  besoin
  du HOWTO Windows 95 + Linux. On peut trouver la derniere version a :

       http://www.in.net/~jkatz/win95/Linux-HOWTO.html

  On  peut  installer  Windows  95  et  Linux  sur  un meme disque ; les
  problemes couverts dans le reste de ce  document  tournent  autour  du
  fait  que  DOS ne permet pas d'avoir plus d'_u_n_e partition DOS primaire
  par lecteur.

  Si vous voulez utiliser le gestionnaire de demarrage de NT,  jetez  un
  coup  d'oeil  a   <http://www.bcpl.lib.md.us/~dbryan/directboot.html>.
  Pour ajouter Linux  (ou  d'autres,  comme  OS/2),  il  y  a  un  petit
  programme  sympa  qui  fabrique  des fichiers de secteurs de demarrage
  pour les  utiliser  avec  le  chargeur  NT.  Vous  pouvez  trouver  de
  l'information la-dessus a  <http://www.winimage.com/bootpart.htm>.

  Vous  pouvez  aussi  fouiller  dans  LOADLIN.EXE  qui  vous  permet de
  ``demarrer'' Linux en demarrant d'abord sous DOS.

  44..  PPoouurrqquuooii ccee HHOOWWTTOO ??

  Ce document traite des problemes suivants :

  +o  Comment arriver a faire cohabiter Windows 3.x sur la  meme  machine
     que Windows 95 sans problemes (et que pourraient etre ces problemes
     de toute facon) ;

  +o  Comment eviter les problemes sur une machine sous  Windows  95  qui
     peut aussi etre demarree sous DOS a distance ;

  +o  Comment  installer  Windows  95  avec Linux sans devoir reinstaller
     Lilo (avec le demarrage fastidieux de Linux sur disquette).

  Bien que le systeme de fichiers de Windows 95 vive au-dessus de la FAT
  standard  DOS,  il  lui  fait  certaines choses deplaisantes. Demarrez
  votre machine Windows 95 a partir  d'une  disquette  DOS  bootable  et
  lancez  Norton  pour  verifier  le  disque  (mais _n_e le laissez tenter
  aucune reparation ou vous mettrez en l'air quelques noms  de  fichiers
  ``longs'').

  On  me  demande  en  ce moment de supporter des applications a la fois
  dans l'environnement Windows 95 et Windows 3.x (les deux tournent soit
  en  local  soit  demarrent  a  partir  du  reseau).  J'ai developpe la
  procedure decrite dans ce document pour me  permettre  de  faire  tout
  ceci avec un seul PC.

  Ne  demandez  pas  pourquoi  une  personne d'Unix a termine dans cette
  position :-)

  55..  EElleemmeennttss nneecceessssaaiirreess

  Si vous etes prepare a vous plonger dans les sources de Lilo (Lilo 1.7
  ou  plus, je crois), il est possible de faire tout ceci avec _u_n disque
  dur.  Ceci  fonctionne  en  changeant  le  contenu  de  la  table  des
  partitions  au  moment  du  demarrage  du systeme ; si vous n'etes pas
  confiant pour essayer ca, ne le faites pas !

  Sinon, vous aurez besoin de _d_e_u_x disques durs. Ceci est du a certaines
  limitations de DOS/Windows concernant le demarrage et l'allocation des
  lettres de lecteurs. Croyez-moi, j'ai essaye de le  faire  fonctionner
  avec un seul (mais je ne voulais pas changer les sources de Lilo).

  66..  CCee qquu''iill eenn rreessssoorrttiirraa

  Un  mot  sur  les  noms  de  peripheriques.  J'ai  vu des systemes qui
  utilisent /dev/hdc pour nommer le troisieme disque IDE (premier disque
  IDE  sur  le  deuxieme controleur) et /dev/hdd pour le quatrieme. J'ai
  aussi vu des systemes qui utilisent /dev/hd1a  et  /dev/hd1b  (ce  qui
  donne  des  partitions comme /dev/hd1a3, etc.). Mon systeme utilise la
  deuxieme methode de nommage, mais j'ai change les noms en /dev/hdc  et
  /dev/hdd pour limiter les confusions.

  Voici  une breve description de ce que j'ai maintenant -- regardez les
  lettres de lecteurs parce qu'elles changent...

  Si vous utilisez un controleur IDE secondaire,  vous  aurez  peut-etre
  besoin  de  creer  les  entrees  dans  /dev  vous-meme  (/dev/hdc*  et
  /dev/hdd*).  Ceci peut etre le cas si vous ajoutez un deuxieme  disque
  a  une  machine  qui  a  deja  un  disque IDE et un CD-ROM IDE ; votre
  deuxieme disque dur serait /dev/hdc.  J'ai essaye cet arrangement sans
  problemes.

  J'ai :

       /dev/hda  -  premier  disque  dur /dev/hdb - lecteur CD-ROM /dev/hdc -
       deuxieme disque dur

     OOppttiioonn 11 ::
        En allumant la machine, je peux permettre a la _b_o_o_t  _R_O_M  de  la
        carte  Ethernet de demarrer DOS a distance. Le lecteur C: est la
        premiere partition DOS sur le _p_r_e_m_i_e_r disque IDE (dans  mon  cas
        /dev/hda1).  Le  lecteur D: est la premiere partition DOS sur le
        _d_e_u_x_i_e_m_e disque IDE (dans mon cas /dev/hdc1), et le  lecteur  F:
        est  la  deuxieme  partition  DOS  sur  le  _d_e_u_x_i_e_m_e  disque IDE
        (/dev/hdc2). Le CD-ROM devient F:.

     OOppttiioonn 22 ::
        Permettre a Lilo de  demarrer  le  systeme  par  defaut  (Linux,
        naturellement).

     OOppttiioonn 33 ::
        Interrompre  Lilo  et lui demander une option que j'appelle dos.
        Ceci demarre DOS a partir de /dev/hda1 et, comme  avec  l'option
        1,  le disque C: est /dev/hda1, le disque D: est /dev/hdc1 et le
        disque E: est /dev/hdc2. Le CD-ROM devient F:.

     OOppttiioonn 44 ::
        Interrompre Lilo et demander une  option  que  j'appelle  win95.
        Ceci  demarre  Windows  95 a partir de la premiere partition DOS
        sur le _d_e_u_x_i_e_m_e disque IDE (dans mon cas /dev/hdc1). Suivez ceci
        avec  attention  :  le  disque  C:  est  maintenant  la premiere
        partition DOS sur le _d_e_u_x_i_e_m_e disque IDE (/dev/hdc1), le  disque
        D:  est  maintenant  la premiere partition du _p_r_e_m_i_e_r disque IDE
        (/dev/hda1), et le disque E: reste la deuxieme partition DOS sur
        le _d_e_u_x_i_e_m_e disque IDE (/dev/hdc2). Le CD-ROM devient F:.

  Remarquez  que  le  disque C: change selon votre methode de demarrage.
  Ceci veut dire que quand vous installez Windows 95,  vous  l'installez
  dans C:\WINDOWS, et quand vous installez Windows 3.x, vous l'installez
  dans C:\WINDOWS mais ce n'est pas le meme endroit :-)

  Remarquez aussi que la troisieme partition DOS  (que  j'utilise  comme
  disque  de  donnees  general)  est  E:  quelle  que soit la maniere de
  demarrer, et que le CD-ROM reste aussi constant.

  77..  CCoommmmeenntt llee ffaaiirree

  En premier, installez Linux ; le disque sur  lequel  vous  l'installez
  n'a  pas  d'importance,  mais  comme vous utilisez deux disques il est
  sense de creer une partition de swap sur les deux.

  Creez  une  partition   DOS   primaire   sur   le   deuxieme   disque.
  Malheureusement,  le  programme  DOS  FDISK ne vous laissera pas faire
  ceci, vous devez donc utiliser le programme Linux fdisk pour creer  la
  partition,  mettre le type (6 pour DOS 16 BIT FAT > 32Mb), positionner
  la partition bootable, et suivre _a_t_t_e_n_t_i_v_e_m_e_n_t les conseils de la page
  de  manuel  de fdisk. Celle-ci decrit comment forcer DOS a reconnaitre
  une partition creee de cette maniere en utilisant la commande dd  pour
  mettre  a zero les 512 premiers octets de la partition. (En gros, vous
  faites dd if=/dev/zero of=/dev/XXXX bs=512  count=1  ou  XXXX  est  le
  peripherique  mais  soyez _t_r_e_s prudent puisque c'est une bonne methode
  pour crasher un disque -- par exemple en mettant /dev/hda au  lieu  de
  /dev/hda1 !)

  Creer  la  partition  DOS primaire sur le premier disque dur peut etre
  fait avec le programme DOS FDISK. Toute autre partition DOS necessaire
  peut etre creee de la meme maniere.

  Les  deux  partitions  primaires  doivent  etre  formatees  comme  des
  partitions DOS bootables ; utilisez FORMAT C: /S et FORMAT  D:  /S  en
  ayant  demarre  a  partir  d'une  disquette. Pour eviter la confusion,
  donnez aux partitions des noms de volume reconnaissables !

  Editez /etc/lilo.conf pour vous donner l'option de demarrer  a  partir
  de  l'une  des  deux  partitions  DOS primaires. J'ai mis en annexe un
  exemple. Notez l'utilisation  de  la  ligne  loader  dans  ce  fichier
  d'exemple.  C'est  vous  qui  choisissez  sur  quelle  partition  vous
  installez Windows 95 et Windows 3.x ; j'ai utilise le deuxieme  disque
  dur  pour  Windows 95 puisque le demarrage par le reseau de la machine
  donne alors la lettre C: pour le disque DOS  normal.  De  meme  (c'est
  utile),  installer Windows 95 sur le deuxieme disque dur evite d'avoir
  a demarrer Linux a partir d'une disquette de secours et de reinstaller
  Lilo  (pourquoi  vous  devriez  faire  ceci  est  explique  plus bas).
  Rappelez-vous de lancer lilo pour installer les options.

  Si vous pensez (a juste titre) installer Windows 95 a partir d'un  CD-
  ROM,  vous  devrez inclure les pilotes correspondants sur la partition
  Windows 95 pour que quand vous demarrez dessus, le lecteur  de  CD-ROM
  soit accessible.

  Maintenant  demarrez, en utilisant Lilo, sur le disque que vous voulez
  utiliser pour DOS/Windows 3.x et installez  le  reste  de  DOS  et  de
  Windows  3.x  --  l'installation  de  Windows  devrait  aller  dans le
  repertoire C:\WINDOWS comme d'habitude.

  Une fois ceci fait, redemarrez  la  machine  et,  en  utilisant  Lilo,
  demarrez sur la partition Windows 95. Lancez l'installation de Windows
  95.  La  procedure  d'installation  peut  suggerer   D:\WINDOWS   pour
  installer Windows 95 parce qu'il recherche sur la machine les versions
  existantes de Windows -- _n_'_a_c_c_e_p_t_e_z _p_a_s _c_e_c_i -- installez  Windows  95
  sur C:\WINDOWS.

  Maintenant,  la  bonne  nouvelle  !  Windows  95 est un systeme plutot
  arrogant -- quand vous l'installez,  il  suppose  que  c'est  le  seul
  systeme  d'exploitation  sur  la  machine  et continue en ecrivant son
  propre MBR (Master Boot Record) sur le disque dur. Voici pourquoi vous
  devez  en  general  reinstaller Lilo. Si vous avez installe Windows 95
  sur le deuxieme disque dur, vous  avez  fait  quelque  chose  que  les
  programmeurs  de  Microsoft(tm)  n'ont  pas  pris  en  compte. Sur une
  machine ou j'ai fait cette operation, Windows 95 a ecrit  son  MBR  de
  remplacement  sur  le  MBR  du _d_e_u_x_i_e_m_e disque dur.  Sur une autre, je
  n'ai pas trouve de preuve du tout qu'il l'avait fait.  La  consequence
  pratique  de  ceci  est que le MBR qui compte, celui du premier disque
  dur, n'est pas change. Donc quand vous redemarrerez la  machine,  vous
  serez accueilli par le prompt amical et familier de Lilo.

  Exemple de liste de partitions :

  /dev/hda1       *       partition DOS                   (C: ou D: selon le demarrage)
  /dev/hda2               partition etendue
  /dev/hda5               /
  /dev/hda6               swap
  /dev/hda7               /home

  /dev/hdc1       *       partition Windows 95    (C: ou D: selon le demarrage)
  /dev/hdc2               partition DOS                   (toujours E:)
  /dev/hdc3               swap

  (Les  partitions  avec  une * sont positionnees bootables (ou _a_c_t_i_v_e_s)
  par fdisk.)

  Exemple de lilo.conf :

       # /etc/lilo.conf
       install = /boot/boot.b
       compact
       delay = 20              # optionnel, pour les systemes qui demarrent tres rapidement
       #prompt                 # a utiliser a la place de delay pour forcer une reponse au prompt
       #vga = normal   # forcer un etat sain
       #ramdisk = 0    # parametre de paranoiaque
       #root = current # utiliser la racine "courante"
       boot = /dev/hda
       image = /boot/vmlinuz
         read-only
         label = linux
       other = /dev/hdc1
         label = win95
         loader = /boot/any_d.b
       other = /dev/hda1
         table = /dev/hda
         label = dos
       image = /boot/vmlinuz.old
         label = linux.old
         optional
         read-only

  88..  QQuueellqquueess qquueessttiioonnss eett rreeppoonnsseess

     EEsstt--ccee qquuee cceettttee mmeetthhooddee ffoonnccttiioonnnnee aavveecc lleess ddiissqquueess SSCCSSII ??
        On m'a dit que ca fonctionnait, mais je n'ai  pas  pu  l'essayer
        moi-meme.

     EEsstt--ccee qquuee cceettttee mmeetthhooddee ffoonnccttiioonnnnee ssii LLiinnuuxx eesstt ccoommpplleetteemmeenntt ssuurr
        un  disque,  et  DOS  et  Windows 95 sont sur des partitions sur
        l'autre disque ?"  Non. Les parties DOS et  Windows  95  doivent
        etre  toutes  les  deux  sur  des  partitions primaires _D_O_S d'un
        disque. Il est possible de contourner ceci en recompilant  Lilo.

     JJ''aaii tteelleecchhaarrggee uunnee FFAAQQ ssuurr WWiinnddoowwss 9955 qquuii ppaarrllee ddee llaa
        possibilite  de demarrer soit DOS soit Windows 95. Si j'installe
        Windows 3.11 dans un autre repertoire que windows elle  dit  que
        je peux faire tourner Windows 95 et Windows 3.11 en harmonie. Il
        y a une partition."  Oui, on peut le faire. Ceci peut  cependant
        causer des problemes. Windows 95 fait des choses bizarres sur le
        disque FAT et certaines operations que vous effectuerez avec vos
        anciens  DOS  et  Windows  (3.x) peuvent facilement detruire les
        informations sur  les  noms  de  fichiers  longs.  Par  exemple,
        defragmenter  le  lecteur en utilisant un utilitaire DOS/Windows
        3.x le fera. Vous vous creez aussi des difficultes quand  ca  ne
        fonctionne  pas  ;  vous devez vous soucier des fichiers INI sur
        chaque systeme _e_t de la _r_e_g_i_s_t_r_y Windows 95.

     EEsstt--ccee qquuee llee LLBBAA eesstt iimmppoorrttaanntt ??
        Oui. Houla ! Les BIOS posterieurs a environ 1994  supportent  le
        LBA  pour  contourner  une  limite  quelque part dans le DOS qui
        empeche DOS de  pouvoir  se  debrouiller  avec  des  numeros  de
        cylindres  superieurs  a  1024  (ceci est couvert en plus grands
        details dans les FAQs sur le materiel PC). Le LBA joue  avec  la
        geometrie  des disques , en multipliant le nombre de tetes par 2
        ou 4 (etc.) pour diviser le nombre apparent de cylindres  par  2
        ou  4 (etc.) et obtenir un nombre de cylindres inferieur a 1024.
        Ceci contourne la limite.

        Linux peut manipuler plus de 1024 cylindres (a condition que  la
        partition  a  partir  de laquelle vous demarrez soit entierement
        en-dessous de 1024 cylindres), et peut donc manipuler des grands
        disques  (superieurs  a  504  Mo) meme sur des vieilles machines
        (BIOS anterieur a 1994). Il  peut  aussi  manipuler  des  grands
        disques  avec  les  BIOS  qui supportent le LBA, que le LBA soit
        active ou pas.

        Il est vital que _t_o_u_s les systemes d'exploitation voient  chaque
        disque  sous  la meme geometrie -- ceci parce que les numeros de
        la table des partitions sont les numeros de cylindres _p_e_r_c_u_s, et
        non  les  numeros  reels.  Ainsi, changer les parametres du BIOS
        pour activer le LBA invalidera le contenu existant d'un  disque.

        Si votre systeme Linux ne _v_o_i_t pas la geometrie _c_o_r_r_e_c_t_e (c'est-
        a-dire la meme que _v_o_i_t DOS), vous devrez ajouter une ligne dans
        lilo.conf  :  append="hd=x,y,z"  ou  x,  y,  z  representent  la
        geometrie du disque (voyez les pages de manuel correspondantes).

     MMoonn BBIIOOSS nnee ccoonnttiieenntt ddeess iinnffoorrmmaattiioonnss qquuee ssuurr ddeeuuxx ddiissqquueess dduurrss
        et  non  quatre.  Est-ce que ca a de l'importance ?"  Surement !
        Avoir  quatre  disques  durs  avec  des  vieux  BIOS,  sous  DOS
        demandait  l'utilisation  d'un  logiciel  pilote.  Les BIOS plus
        recents contiennent les informations sur les quatre disques.

        Linux peut sans problemes utiliser quatre disques durs meme avec
        la  plupart  de  ces  BIOS plus anciens, mais si vous mettez une
        partition DOS sur le disque 3 vous ne serez capable d'y  acceder
        que par Linux.

        Ceci  est  pertinent  puisque  beaucoup de machines possedent un
        disque IDE, un CD-ROM IDE et, si vous voulez mettre ce  document
        en pratique, un autre disque IDE.

  Si vous avez trouve ce document utile, merci de me le faire savoir.

  Le HOWTO Windows 95 + Windows 3.x + Linux
  Robert   Goodwin,  <Robert.Goodwin@mcc.ac.uk>,  traduit  par
  Olivier Tharan, <Olivier.Tharan@int-evry.fr>
  Aout 1996

  11..  IInnttrroodduuccttiioonn

  Ce document a d'abord ete ecrit en janvier 1996. J'y ai inclus  divers
  commentaires, informations et questions recus depuis lors. Ce document
  est aussi disponible en japonais ; voyez l'ensemble de  documentations
  Linux en japonais a  <http://epsenewsc.kyoto-u.ac.jp/JF/JF.html>.

  22..  DDeemmaarrrreerr pplluussiieeuurrss ssyysstteemmeess dd''eexxppllooiittaattiioonn

  Si vous voulez demarrer plusieurs systemes d'exploitation (et que vous
  ne voulez pas les demarrer a partir  d'une  disquette  !),  vous  avez
  besoin d'utiliser une sorte de _g_e_s_t_i_o_n_n_a_i_r_e _d_e _d_e_m_a_r_r_a_g_e.

  Windows  95  n'a pas _v_r_a_i_m_e_n_t de gestionnaire de demarrage -- il a des
  options  de  demarrage,  mais  pour  moi   on   peut   configurer   un
  ``gestionnaire de demarrage'' pour demarrer n'importe quoi.

  On  peut configurer Lilo pour demarrer quasiment n'importe quoi, comme
  le peuvent les gestionnaires de demarrage d'OS/2  et  de  Windows  NT.
  Lequel  vous  utilisez  depend entierement de vous ; cela depend de ce
  que vous voulez sur votre systeme. Si vous utilisez le gestionnaire de
  demarrage  d'OS/2,  par  exemple,  il  vous  ``cache''  les ``autres''
  partitions de genre DOS.

  33..  AAuuttrreess eennddrrooiittss aa rreeggaarrddeerr

  Si vous voulez juste Windows 95 et Linux, vous aurez  surement  besoin
  du HOWTO Windows 95 + Linux. On peut trouver la derniere version a :

       http://www.in.net/~jkatz/win95/Linux-HOWTO.html

  On  peut  installer  Windows  95  et  Linux  sur  un meme disque ; les
  problemes couverts dans le reste de ce  document  tournent  autour  du
  fait  que  DOS ne permet pas d'avoir plus d'_u_n_e partition DOS primaire
  par lecteur.

  Si vous voulez utiliser le gestionnaire de demarrage de NT,  jetez  un
  coup  d'oeil  a   <http://www.bcpl.lib.md.us/~dbryan/directboot.html>.
  Pour ajouter Linux  (ou  d'autres,  comme  OS/2),  il  y  a  un  petit
  programme  sympa  qui  fabrique  des fichiers de secteurs de demarrage
  pour les  utiliser  avec  le  chargeur  NT.  Vous  pouvez  trouver  de
  l'information                        la-dessus                       a
  <http://ourworld.compuserve.com/homepages/gvollant/otherl.htm>.

  Vous pouvez  aussi  fouiller  dans  LOADLIN.EXE  qui  vous  permet  de
  ``demarrer'' Linux en demarrant d'abord sous DOS.

  44..  PPoouurrqquuooii ccee HHOOWWTTOO ??

  Ce document traite des problemes suivants :

  +o  Comment  arriver  a faire cohabiter Windows 3.x sur la meme machine
     que Windows 95 sans problemes (et que pourraient etre ces problemes
     de toute facon) ;

  +o  Comment  eviter  les  problemes sur une machine sous Windows 95 qui
     peut aussi etre demarree sous DOS a distance ;

  +o  Comment installer Windows 95 avec  Linux  sans  devoir  reinstaller
     Lilo (avec le demarrage fastidieux de Linux sur disquette).

  Bien que le systeme de fichiers de Windows 95 vive au-dessus de la FAT
  standard DOS, il lui fait  certaines  choses  deplaisantes.   Demarrez
  votre  machine  Windows  95  a  partir d'une disquette DOS bootable et
  lancez Norton pour verifier le  disque  (mais  _n_e  le  laissez  tenter
  aucune  reparation  ou vous mettrez en l'air quelques noms de fichiers
  ``longs'').

  On me demande en ce moment de supporter des  applications  a  la  fois
  dans l'environnement Windows 95 et Windows 3.x (les deux tournent soit
  en local soit  demarrent  a  partir  du  reseau).  J'ai  developpe  la
  procedure  decrite  dans  ce  document pour me permettre de faire tout
  ceci avec un seul PC.

  Ne demandez pas pourquoi une personne  d'Unix  a  termine  dans  cette
  position :-)

  55..  EElleemmeennttss nneecceessssaaiirreess

  Si vous etes prepare a vous plonger dans les sources de Lilo (Lilo 1.7
  ou plus, je crois), il est possible de faire tout ceci avec _u_n  disque
  dur.  Ceci  fonctionne  en  changeant  le  contenu  de  la  table  des
  partitions au moment du demarrage du systeme  ;  si  vous  n'etes  pas
  confiant pour essayer ca, ne le faites pas !

  Sinon, vous aurez besoin de _d_e_u_x disques durs. Ceci est du a certaines
  limitations de DOS/Windows concernant le demarrage et l'allocation des
  lettres  de  lecteurs. Croyez-moi, j'ai essaye de le faire fonctionner
  avec un seul (mais je ne voulais pas changer les sources de Lilo).

  66..  CCee qquu''iill eenn rreessssoorrttiirraa

  Un mot sur les  noms  de  peripheriques.  J'ai  vu  des  systemes  qui
  utilisent /dev/hdc pour nommer le troisieme disque IDE (premier disque
  IDE sur le deuxieme controleur) et /dev/hdd pour  le  quatrieme.  J'ai
  aussi  vu  des  systemes  qui utilisent /dev/hd1a et /dev/hd1b (ce qui
  donne des partitions comme /dev/hd1a3, etc.). Mon systeme  utilise  la
  deuxieme  methode de nommage, mais j'ai change les noms en /dev/hdc et
  /dev/hdd pour limiter les confusions.

  Voici une breve description de ce que j'ai maintenant --- regardez les
  lettres de lecteurs parce qu'elles changent...

  Si  vous  utilisez  un controleur IDE secondaire, vous aurez peut-etre
  besoin  de  creer  les  entrees  dans  /dev  vous-meme  (/dev/hdc*  et
  /dev/hdd*).   Ceci peut etre le cas si vous ajoutez un deuxieme disque
  a une machine qui a deja un disque  IDE  et  un  CD-ROM  IDE  ;  votre
  deuxieme disque dur serait /dev/hdc.  J'ai essaye cet arrangement sans
  problemes.

  J'ai :

       /dev/hda - premier disque dur /dev/hdb -  lecteur  CD-ROM  /dev/hdc  -
       deuxieme disque dur

     OOppttiioonn 11 ::
        En  allumant  la  machine, je peux permettre a la _b_o_o_t _R_O_M de la
        carte Ethernet de demarrer DOS a distance. Le lecteur C: est  la
        premiere  partition  DOS sur le _p_r_e_m_i_e_r disque IDE (dans mon cas
        /dev/hda1). Le lecteur D: est la premiere partition DOS  sur  le
        _d_e_u_x_i_e_m_e  disque  IDE (dans mon cas /dev/hdc1), et le lecteur F:
        est la  deuxieme  partition  DOS  sur  le  _d_e_u_x_i_e_m_e  disque  IDE
        (/dev/hdc2). Le CD-ROM devient F:.

     OOppttiioonn 22 ::
        Permettre  a  Lilo  de  demarrer  le  systeme par defaut (Linux,
        naturellement).

     OOppttiioonn 33 ::
        Interrompre Lilo et lui demander une option que  j'appelle  dos.
        Ceci  demarre  DOS a partir de /dev/hda1 et, comme avec l'option
        1, le disque C: est /dev/hda1, le disque D: est /dev/hdc1 et  le
        disque E: est /dev/hdc2.  Le CD-ROM devient F:.

     OOppttiioonn 44 ::
        Interrompre  Lilo  et  demander  une option que j'appelle win95.
        Ceci demarre Windows 95 a partir de la  premiere  partition  DOS
        sur le _d_e_u_x_i_e_m_e disque IDE (dans mon cas /dev/hdc1). Suivez ceci
        avec attention  :  le  disque  C:  est  maintenant  la  premiere
        partition  DOS sur le _d_e_u_x_i_e_m_e disque IDE (/dev/hdc1), le disque
        D: est maintenant la premiere partition du  _p_r_e_m_i_e_r  disque  IDE
        (/dev/hda1), et le disque E: reste la deuxieme partition DOS sur
        le _d_e_u_x_i_e_m_e disque IDE (/dev/hdc2). Le CD-ROM devient F:.

  Remarquez que le disque C: change selon votre  methode  de  demarrage.
  Ceci  veut  dire que quand vous installez Windows 95, vous l'installez
  dans C:\WINDOWS, et quand vous installez Windows 3.x, vous l'installez
  dans C:\WINDOWS mais ce n'est pas le meme endroit :-)

  Remarquez  aussi  que  la troisieme partition DOS (que j'utilise comme
  disque de donnees general) est  E:  quelle  que  soit  la  maniere  de
  demarrer, et que le CD-ROM reste aussi constant.

  77..  CCoommmmeenntt llee ffaaiirree

  En  premier,  installez  Linux ; le disque sur lequel vous l'installez
  n'a pas d'importance, mais comme vous utilisez  deux  disques  il  est
  sense de creer une partition de swap sur les deux.

  Creez   une   partition   DOS   primaire   sur   le  deuxieme  disque.
  Malheureusement, le programme DOS FDISK ne  vous  laissera  pas  faire
  ceci,  vous devez donc utiliser le programme Linux fdisk pour creer la
  partition, mettre le type (6 pour DOS 16 BIT FAT > 32Mb),  positionner
  la partition bootable, et suivre _a_t_t_e_n_t_i_v_e_m_e_n_t les conseils de la page
  de manuel de fdisk. Celle-ci decrit comment forcer DOS  a  reconnaitre
  une  partition creee de cette maniere en utilisant la commande dd pour
  mettre a zero les 512 premiers octets de la partition. (En gros,  vous
  faites  dd  if=/dev/zero  of=/dev/XXXX  bs=512  count=1 ou XXXX est le
  peripherique mais soyez _t_r_e_s prudent puisque c'est une  bonne  methode
  pour  crasher  un disque -- par exemple en mettant /dev/hda au lieu de
  /dev/hda1 !)

  Creer la partition DOS primaire sur le premier disque  dur  peut  etre
  fait avec le programme DOS FDISK. Toute autre partition DOS necessaire
  peut etre creee de la meme maniere.

  Les  deux  partitions  primaires  doivent  etre  formatees  comme  des
  partitions  DOS  bootables  ; utilisez FORMAT C: /S et FORMAT D: /S en
  ayant demarre a partir d'une disquette.   Pour  eviter  la  confusion,
  donnez aux partitions des noms de volume reconnaissables !

  Editez  /etc/lilo.conf  pour vous donner l'option de demarrer a partir
  de l'une des deux partitions DOS primaires.  J'ai  mis  en  annexe  un
  exemple.  Notez  l'utilisation  de  la  ligne  loader  dans ce fichier
  d'exemple.  C'est  vous  qui  choisissez  sur  quelle  partition  vous
  installez  Windows 95 et Windows 3.x ; j'ai utilise le deuxieme disque
  dur pour Windows 95 puisque le demarrage par le reseau de  la  machine
  donne  alors  la  lettre  C: pour le disque DOS normal. De meme (c'est
  utile), installer Windows 95 sur le deuxieme disque dur evite  d'avoir
  a demarrer Linux a partir d'une disquette de secours et de reinstaller
  Lilo (pourquoi  vous  devriez  faire  ceci  est  explique  plus  bas).
  Rappelez-vous de lancer lilo pour installer les options.

  Si  vous pensez (a juste titre) installer Windows 95 a partir d'un CD-
  ROM, vous devrez inclure les pilotes correspondants sur  la  partition
  Windows  95  pour que quand vous demarrez dessus, le lecteur de CD-ROM
  soit accessible.

  Maintenant demarrez, en utilisant Lilo, sur le disque que vous  voulez
  utiliser  pour  DOS/Windows  3.x  et  installez  le reste de DOS et de
  Windows 3.x  --  l'installation  de  Windows  devrait  aller  dans  le
  repertoire C:\WINDOWS comme d'habitude.

  Une  fois  ceci  fait,  redemarrez  la  machine et, en utilisant Lilo,
  demarrez sur la partition Windows 95. Lancez l'installation de Windows
  95.   La   procedure  d'installation  peut  suggerer  D:\WINDOWS  pour
  installer Windows 95 parce qu'il recherche sur la machine les versions
  existantes  de  Windows -- _n_'_a_c_c_e_p_t_e_z _p_a_s _c_e_c_i -- installez Windows 95
  sur C:\WINDOWS.

  Maintenant, la bonne nouvelle !  Windows  95  est  un  systeme  plutot
  arrogant  --  quand  vous  l'installez,  il  suppose que c'est le seul
  systeme d'exploitation sur la machine  et  continue  en  ecrivant  son
  propre  MBR  (Master  Boot  Record) sur le disque dur.  Voici pourquoi
  vous devez en general reinstaller Lilo.  Si vous avez installe Windows
  95  sur  le  deuxieme disque dur, vous avez fait quelque chose que les
  programmeurs de Microsoft(tm)  n'ont  pas  pris  en  compte.  Sur  une
  machine  ou  j'ai  fait cette operation, Windows 95 a ecrit son MBR de
  remplacement sur le MBR du _d_e_u_x_i_e_m_e disque dur. Sur une autre, je n'ai
  pas  trouve  de  preuve  du  tout  qu'il  l'avait fait. La consequence
  pratique de ceci est que le MBR qui compte, celui  du  premier  disque
  dur,  n'est  pas change. Donc quand vous redemarrerez la machine, vous
  serez accueilli par le prompt amical et familier de Lilo.

  Exemple de liste de partitions :

  /dev/hda1       *       partition DOS                   (C: ou D: selon le demarrage)
  /dev/hda2               partition etendue
  /dev/hda5               /
  /dev/hda6               swap
  /dev/hda7               /home

  /dev/hdc1       *       partition Windows 95    (C: ou D: selon le demarrage)
  /dev/hdc2               partition DOS                   (toujours E:)
  /dev/hdc3               swap

  (Les partitions avec une * sont positionnees  bootables  (ou  _a_c_t_i_v_e_s)
  par fdisk.)

  Exemple de lilo.conf :

       # /etc/lilo.conf
       install = /boot/boot.b
       compact
       delay = 20              # optionnel, pour les systemes qui demarrent tres rapidement
       #prompt                 # a utiliser a la place de delay pour forcer une reponse au prompt
       #vga = normal   # forcer un etat sain
       #ramdisk = 0    # parametre de paranoiaque
       #root = current # utiliser la racine "courante"
       boot = /dev/hda
       image = /boot/vmlinuz
         read-only
         label = linux
       other = /dev/hdc1
         label = win95
         loader = /boot/any_d.b
       other = /dev/hda1
         table = /dev/hda
         label = dos
       image = /boot/vmlinuz.old
         label = linux.old
         optional
         read-only

  88..  QQuueellqquueess qquueessttiioonnss eett rreeppoonnsseess

     EEsstt--ccee qquuee cceettttee mmeetthhooddee ffoonnccttiioonnnnee aavveecc lleess ddiissqquueess SSCCSSII ??
        On  m'a  dit  que ca fonctionnait, mais je n'ai pas pu l'essayer
        moi-meme.

     EEsstt--ccee qquuee cceettttee mmeetthhooddee ffoonnccttiioonnnnee ssii LLiinnuuxx eesstt
        completement sur un disque, et DOS et Windows 95  sont  sur  des
        partitions  sur  l'autre  disque  ?"   Non.  Les  parties DOS et
        Windows 95 doivent etre  toutes  les  deux  sur  des  partitions
        primaires _D_O_S d'un disque. Il est possible de contourner ceci en
        recompilant Lilo.

     JJ''aaii tteelleecchhaarrggee uunnee FFAAQQ ssuurr WWiinnddoowwss 9955 qquuii ppaarrllee
        de la possibilite de demarrer  soit  DOS  soit  Windows  95.  Si
        j'installe  Windows  3.11  dans  un autre repertoire que windows
        elle dit que je peux faire tourner Windows 95 et Windows 3.11 en
        harmonie.   Il  y a une partition."  Oui, on peut le faire. Ceci
        peut cependant causer des problemes. Windows 95 fait des  choses
        bizarres  sur  le  disque  FAT  et certaines operations que vous
        effectuerez avec  vos  anciens  DOS  et  Windows  (3.x)  peuvent
        facilement  detruire  les  informations sur les noms de fichiers
        longs. Par exemple, defragmenter  le  lecteur  en  utilisant  un
        utilitaire  DOS/Windows  3.x  le fera. Vous vous creez aussi des
        difficultes quand ca ne fonctionne pas ; vous devez vous soucier
        des  fichiers  INI  sur chaque systeme _e_t de la _r_e_g_i_s_t_r_y Windows
        95.

     EEsstt--ccee qquuee llee LLBBAA eesstt iimmppoorrttaanntt ??
        Oui. Houla ! Les BIOS posterieurs a environ 1994  supportent  le
        LBA  pour  contourner  une  limite  quelque part dans le DOS qui
        empeche DOS de  pouvoir  se  debrouiller  avec  des  numeros  de
        cylindres  superieurs  a  1024  (ceci est couvert en plus grands
        details dans les FAQs sur le materiel PC). Le LBA joue  avec  la
        geometrie  des disques , en multipliant le nombre de tetes par 2
        ou 4 (etc.) pour diviser le nombre apparent de cylindres  par  2
        ou  4 (etc.) et obtenir un nombre de cylindres inferieur a 1024.
        Ceci contourne la limite.

        Linux peut manipuler plus de 1024 cylindres (a condition que  la
        partition  a  partir  de laquelle vous demarrez soit entierement
        en-dessous de 1024 cylindres), et peut donc manipuler des grands
        disques  (superieurs  a  504  Mo) meme sur des vieilles machines
        (BIOS anterieur a 1994). Il  peut  aussi  manipuler  des  grands
        disques  avec  les  BIOS  qui supportent le LBA, que le LBA soit
        active ou pas.

        Il est vital que _t_o_u_s les systemes d'exploitation voient  chaque
        disque  sous  la meme geometrie -- ceci parce que les numeros de
        la table des partitions sont les numeros de cylindres _p_e_r_c_u_s, et
        non  les  numeros  reels.  Ainsi, changer les parametres du BIOS
        pour activer le LBA invalidera le contenu existant d'un  disque.

        Si votre systeme Linux ne _v_o_i_t pas la geometrie _c_o_r_r_e_c_t_e (c'est-
        a-dire la meme que _v_o_i_t DOS), vous devrez ajouter une ligne dans
        lilo.conf  :  append="hd=x,y,z"  ou  x,  y,  z  representent  la
        geometrie du disque (voyez les pages de manuel correspondantes).

     MMoonn BBIIOOSS nnee ccoonnttiieenntt ddeess iinnffoorrmmaattiioonnss qquuee ssuurr ddeeuuxx ddiissqquueess dduurrss eett
        nnoonn
        quatre. Est-ce que ca a de l'importance  ?"   Surement  !  Avoir
        quatre  disques  durs  avec  des  vieux BIOS, sous DOS demandait
        l'utilisation  d'un  logiciel  pilote.  Les  BIOS  plus  recents
        contiennent les informations sur les quatre disques.

        Linux peut sans problemes utiliser quatre disques durs meme avec
        la plupart de ces BIOS plus anciens, mais  si  vous  mettez  une
        partition  DOS sur le disque 3 vous ne serez capable d'y acceder
        que par Linux.

        Ceci est pertinent puisque beaucoup  de  machines  possedent  un
        disque  IDE, un CD-ROM IDE et, si vous voulez mettre ce document
        en pratique, un autre disque IDE.

  Si vous avez trouve ce document utile, merci de me le faire savoir.

  Windows-Modem-Sharing mini-HOWTO
  Friedemann Baitinger <mailto:baiti@toplink.net>, traduit par
  Arnaud Gomes-do-Vale <mailto:arnaud@carrosse.frmug.org>
  Version 1.01, 2 novembre 1997

  Ce mini-HOWTO dcrit la configuration d'un systme Linux dans le but
  de partager un modem avec d'autres systmes  travers un rseau
  TCP/IP.

  11..  IInnttrroodduuccttiioonn

  Ce mini-HOWTO dcrit la configuration d'un systme Linux dans le but
  de partager un modem avec d'autres systmes  travers un rseau
  TCP/IP.


  22..  CCoonnffiigguurraattiioonn dduu sseerrvveeuurr

  Je suppose que le serveur est une machine sous Linux avec

    soit un modem rattach  un priphrique /dev/ttyS_x ;

    soit un modem virtuel mul par isdn4linux sur un port /dev/ttyI_x.

  La configuration la plus simple  laquelle je peux penser utilise un
  script perl de cinq lignes comme "dmon modem" :


       $ cat /usr/sbin/modemd

       #!/usr/bin/perl
       select((select(STDOUT), $| = 1)[$[]);
       select((select(STDIN), $| = 1)[$[]);
       exec 'cu -s 115200 -l /dev/ttyS1';
       die '$0: Cant exec cu: $!\n';




  Ce dmon est lanc par le processus inetd si un client se connecte sur
  le port appropri, comme dcrit ci-dessous. Le modemd se contente de
  connecter le socket avec l'entre standard STDIN et la sortie standard
  STDOUT de la commande cu et laisse cu piloter le vritable modem. Si
  cu n'est pas install sur votre systme, installez le paquetage UUCP,
  dont il fait habituellement partie.

  inetd doit tre averti de l'existence du dmon modem. Pour cela, il
  faut mettre  jour son fichier de configuration, en gnral
  /etc/inetd.conf, comme ceci :


       #
       # modem daemon
       #
       modem stream tcp nowait root /usr/sbin/tcpd /usr/sbin/modemd /dev/ttyS1




  Pour que cela fonctionne, il faut aussi ajouter une entre au fichier
  /etc/services :


       modem           2006/tcp        modemd


  Cette entre associe un nom symbolique  un port explicite, 2006 dans
  cet exemple. Le numro du port peut tre n'importe quoi, du moment
  qu'il n'est pas dj assign  un service existant. Aprs avoir
  procd  ces changements, il faut envoyer un signal  inetd pour lui
  faire relire son fichier de configuration :


       $ ps |grep inetd
       194  ?  S     0:00 /usr/sbin/inetd

       kill -HUP 194





  Maintenant, le serveur est prt  accepter les requtes des clients.
  Vous pouvez vrifier son bon fonctionnement :


       $ telnet localhost modem

       Trying 127.0.0.1...
       Connected to localhost.
       Escape character is '^]'.




  Vous tes maintenant connect au modem. Vous pouvez lui passer des
  commandes AT pour vrifier la configuration :


       atz
       atz
       OK

       ati1
       ati1
       Linux ISDN
       OK

       ^]
       telnet>quit
       $




  A la place du script perl, vous pouvez utiliser le programme mserver,
  disponible sur  <ftp://ftp.innet.be/pub/staff/carl/>. S'il ne s'y
  trouve plus, vous pouvez utiliser archie ou tout autre moteur de
  recherche pour trouver l'archive mserver. Jusqu' prsent, je n'ai pas
  eu l'occasion de l'installer ni de l'utiliser.


  33..  CCoonnffiigguurraattiioonn dduu cclliieenntt

  A l'heure actuelle, seule la configuration d'un client Windows est
  dcrite ici. Sur le PC client, vous aurez besoin d'un redirecteur de
  port COM vers TCP/IP. Le meilleur que j'ai trouv est DialOut/IP de
  Tactical Software, pour Windows 3.1 et Windows 95. La version 3.1 peut
  tre utilise sous Windows NT avec des applications 16 bits ; une
  version 32 bits pour Windows NT doit sortir  la fin de l't 1997.
  NdT : Actuellement, Windows 98 et NT4 sont galement supports.

  DialOut/IP prsente le modem partag comme un nouveau port COM sur la
  machine Windows. Ce port COM virtuel peut tre utilis par les
  programmes Windows comme si le modem partag tait connect
  directement. La plupart des applications clientes (y compris l'accs
  rseau  distance de Windows 95) l'acceptent et fonctionnent comme
  s'il s'agissait d'un vritable port srie,  l'exception des
  applications de fax et de tout ce qui doit accder directement 
  l'UART. DialOut/IP peut tre configur pour utiliser le protocole
  TELNET, mais cette fonction ne s'applique qu' certains racks de
  modems et pas  la configuration de Linux dcrite ici. Notez que
  malgr son nom, DialOut/IP peut aussi tre utilis par les
  applications qui attendent des appels entrants.

  Sur  <http://www.tactical-sw.com>, vous trouverez une page o vous
  pouvez tlcharger une version d'valuation totalement fonctionnelle
  utilisable pendant une  deux semaines. L'installation et la
  configuration sont assures par un programme _a_d _h_o_c, et les dtails de
  l'installation sont couverts par le fichier README.TXT. Quand vous
  lancez DialOut/IP, vous entrez l'adresse IP et le numro du port du
  modem partag.

  DialOut/IP est un produit commercial dont la licence s'applique par
  modem, c'est  dire que le prix dpend du nombre de modems que vous
  partagez. La licence dit que vous pouvez installer le logiciel sur un
  nombre quelconque de PC qui utilisent les modems partags.


  44..  CCoonnssiiddrraattiioonnss ssuurr llaa ssccuurriitt


  Si vous n'avez qu'un seul modem pour toutes les machines de votre
  rseau local, vous n'avez probablement aucune inquitude  avoir quant
   la scurit. Par contre, si une ou plusieurs machines de votre
  rseau sont connectes  internet par d'autres moyens que votre
  serveur de modem, vous devez vous pencher sur la scurit, ou
  n'importe qui pourra taper telnet votre_machine modem et lancer des
  appels longue distance ou internationaux  volont.

  Je vous suggre d'installer et de configurer les TCP-wrappers pour
  protger le serveur de modem contre les accs non autoriss.


  55..  EExxeemmpplleess


  J'utilise la configuration dcrite dans les sections prcdentes avec
  Quicken sur mon ThinkPad sous Windows 95 pour contacter ma banque 
  domicile avec le modem de ma machine Linux. Le "modem" n'en est en
  fait mme pas un, c'est une mulation qui utilise une carte ISDN-So.
  Quicken voit simplement un port srie, il ne sait pas que le
  priphrique reli au port srie est en fait  l'autre bout du rseau
  local ethernet, ni qu'il ne s'agit pas d'un modem analogique standard
  mais d'un adaptateur ISDN qui se trouve comprendre les commandes AT.


  66..  HHiissttoorriiqquuee ddee ccee ddooccuummeenntt

  V1.01, 02/11/97 Conversion du source au format HTML. Ajout de
  rfrences sur les endroits o se procurer cu et mserver. Ajout du
  paramtre -s  l'exemple d'utilisation de cu.

  V1.00, 12/06/97 Premire version.




  Le HOWTO du Terminal X
  Scot W. Stevenson (scot@catzen.gun.de)
  Adaptation  francaise  :  Pierre Vassellerie (Pierre.Vassel-
  lerie@obspm.fr)
  Version 1.0f BETA (11 Novembre 1996)

  Ce document est une breve introduction a "Comment connecter un  Termi-
  nal  X  a  un PC sous Linux". Il necessite une connaissance de base du
  systeme X Window, de l'adressage TCP/IP et des cartes Ethernet.

  11..  HHoommmmaaggee eett ddeeddiiccaaccee

  ""AA RReennee,, llee ttrraadduucctteeuurr..""

  22..  IInnttrroodduuccttiioonn

  Ceci est la premiere version du  document  et  devra  etre  consideree
  comme  BETA.   Ce  document  est plus une methode d'installation qu'un
  document complet sur les interactions entre les terminaux X et  Linux.
  Les  discussions  sur  les  mecanismes  de  controle  d'acces  (c-a-d.
  xaccess, xhost, MIT-COOKIEs) et  l'utilisation  de  NFS  ne  sont  pas
  incluses pour l'instant.

  La   plupart   des   terminaux  X  ont  maintenant  une  multitude  de
  caracteristiques avancees qui  leur  permettent  d'etre  plus  que  de
  simples  serveurs  X. Pour la plus grande partie, ces caracteristiques
  seront ignorees.

  22..11..  CChhaannggeemmeenntt ppaarr rraappppoorrtt aauuxx vveerrssiioonnss pprreecceeddeenntteess

  (Il n'y a pas de version precedente  donc  rien  n'a  change)  (NdT  :
  pareil)

  22..22..  RReessppoonnssaabbiilliitteess

  L'auteur,  les  distributeurs  (NdT : ni le traducteur) de ce HOWTO ne
  peuvent en  aucun  cas  etre  tenus  pour  responsables  des  dommages
  physiques, financiers ou moraux survenus en suivant les suggestions de
  ce texte.

  22..33..  CCooppyyrriigghhtt

  Le  HOWTO  du  TTeerrmmiinnaall  XX  LLiinnuuxx  est  copyright  (C)  1995  Scot  W.
  Stevenson.   Les  documents  HOWTO  Linux  peuvent  etre reproduits et
  distribues en  entier  ou  en  extrait,  sur  n'importe  quel  support
  physique  ou  electronique  tant  que  cette remarque de copyright est
  maintenue sur toutes les copies.  La  redistribution  commerciale  est
  autorisee  et  encouragee. L'auteur, cependant, aimerait etre avise de
  telles distributions.

  Toutes  les  traductions,  travaux  derives  ou   travaux   d'ensemble
  incorporant  des documents Linux HOWTO doivent etre couverts par cette
  notice de copyright. Par ailleurs  vous  pouvez  produire  un  travail
  derive  d'un  HOWTO  et imposer des restrictions additionnelles sur sa
  distribution.  Des exceptions a ces regles peuvent etre accordees sous
  certaines conditions.

  En   bref   nous  souhaitons  promouvoir  la  dissemination  de  cette
  information a travers autant de moyens que  possible.  Cependant  nous
  souhaitons conserver le copyright sur les documents HOWTO et aimerions
  etre avises des projets de redistribution des HOWTOs.

  Si vous  avez  des  questions  veuillez  contacter  Greg  Hankins,  le
  coordinateur  des HOWTO Linux, a Greg Hankins (gregh@sunsite.unc.edu).
  Vous pouvez utiliser finger avec son adresse pour obtenir  son  numero
  de  telephone  et  de de plus amples informations sur la maniere de le
  contacter.

  22..44..  NNoouuvveelllleess vveerrssiioonnss eett rreeaaccttiioonnss

  Les nouvelles  versions  de  ce  document  peuvent  etre  trouves  sur
  sunsite.unc.edu:/pub/Linux/docs/HOWTO/. Si vous n'avez pas d'acces FTP
  vous pouvez essayer d'obtenir  les  fichiers  d'aide  Linux  par  Bill
  Riemers.  Envoyez  un  courrier  electronique a bcr@physics.purdue.edu
  avec comme sujet "help" pour plus d'information et un fichier d'index.

  Toutes  additions,  corrections ou commentaires sur ce document seront
  les bienvenues ! Pour cela, veuillez envoyer un courrier  electronique
  a  Scot  W.  stevenson  (scot@catzen.gun.de)  (NdT  :  pour la version
  francaise a Pierre.Vassellerie@obspm.fr)

  J'aimerais particulierement avoir de vos nouvelles si vous  avez  deja
  l'experience de la liaison d'un terminal X a une machine Linux meme si
  c'est seulement quelque chose comme "a  travaille  sur  cette  machine
  depuis ce terminal."

  Dans les cartons pour les prochaines versions il y a les mecanismes de
  controle d'acces et l'utilisation des systemes de fichiers NFS pour le
  demarrage.

  33..  CCoonntteexxttee

  Cette  section  fournit  de  l'information  tres basique pour les non-
  familiers avec le systeme X Window  et  sa  terminal-ologie.  Si  vous
  connaissez  deja  les  rudiments  de X ou les terminaux X vous devriez
  pouvoir sauter cette partie sans effet indesirable.

  33..11..  QQuu''eesstt--ccee qquuee XX ??

  Le systeme X Window ou juste X (jamais X Windows), est un  systeme  de
  fenetrage  portable et transparent pour le reseau comme indique (NdT :
  en  anglais)  dans  la  page  du  manuel  en  ligne.  Il  fournit   un
  environnement   graphique   qui  permet  la  communication  a  travers
  differents  systemes  d'exploitation,  constructeurs   et   types   de
  materiels.  Quand  les  gens  parlent  d'un  systeme  de  fenetrage en
  connexion avec Unix, ils font allusion presque toujours a X.

  La plus importante caracteristique de X dans notre cas est la  stricte
  separation  entre les programmes qui controlent le materiel local avec
  lequel l'utilisateur s'interface (ecran, clavier, souris, etc.) et les
  programmes que l'utilisateur veut reellement lancer (editeur, tableur,
  jeux). Ceci signifie que l'interface logicielle, qui  est  appelee  le
  serveur X, peut etre sur une machine, tandis que les programmes reels,
  ou clients X, peuvent etre sur une ou meme plus d'une  machine  a  des
  endroits  totalement  differents.   Notez  que les termes "serveur" et
  "client" sont utilises dans le  sens  inverse  dans  lequel  ils  sont
  utilises generalement avec d'autres applications client/serveur.
  33..22..  QQuu''eesstt--ccee qquu''uunn tteerrmmiinnaall XX ??

  Un  terminal  X  (ecrit  TX  a  partir  de maintenant) est un ensemble
  specialise de materiel et de logiciel qui se combinent pour former  un
  serveur X, qui est la partie de X qui gere les entrees et sorties vers
  et en provenance de l'utilisateur. Dans le cas le plus primitif,  seul
  le programme serveur de X et le logiciel de communication tournent sur
  le TX. Meme le gestionnaire de fenetre tourne  sur  l'ordinateur  hote
  auquel  le  TX est connecte par Ethernet (ou dans de rares cas par des
  lignes series ou d'autres types de reseaux), en utilisant TCP/IP.

  Le materiel constituant un TX incluera au moins un (grand)  ecran,  un
  clavier,  une  souris,  de  la  RAM et des cordons pour la connexion a
  Ethernet. La plupart des TXs n'ont pas de disque dur,  de  lecteur  de
  disquette  ni  d'autres  materiels  de  transfert  de  donnees.   Ceci
  signifie que le TX a son systeme d'exploitation en ROM (rare) ou alors
  le charge depuis un hote sur le reseau auquel il est connecte.

  Pour  recuperer  son  systeme d'exploitation d'un ordinateur hote sous
  Linux au moment du lancement le TX  joue  le  scenario  suivant  :  il
  envoie  un appel a l'aide a travers le reseau avec son numero Ethernet
  comme nom d'etiquette. Un ordinateur sur le reseau recherche ce numero
  dans  la  liste  des  numeros  des  TX  qu'il  est  autorise a aider a
  demarrer. Si ce numero est trouve, il envoie au TX le  numero  IP  qui
  lui  a  ete assigne (par le daemon bootpd). Ceci permet alors au TX de
  charger son systeme d'exploitation et les autres  donnees  dont  il  a
  besoin  depuis  le  disque  dur de l'ordinateur hote (generalement par
  tftp ou nfs). Ceci est la procedure generalement  employee,  expliquee
  rapidement.

  Un  TX  est  donc  en  fait un ordinateur completement equipe avec son
  propre numero IP, sa RAM, son programme et son  materiel  independant.
  C'est  en  fait  un  savant  idiot.  Il est doue pour ce qu'il fait le
  mieux, c'est a dire gerer les  communications  et  graphiques  par  le
  protocole X11.

  33..33..  AAvvaannttaaggeess eett iinnccoonnvveenniieennttss

  Idealement, un TX est silencieux, rapide. D'habitude sans ventilateur,
  lecteur de disquette ni disque dur, ils ne creent pas de bruit du tout
  et  avec  quelques  metres  de cable Ethernet vous pouvez placer votre
  ordinateur bruyant dans une piece differente et avoir le TX silencieux
  sur votre bureau. Le TX est construit pour gerer du graphisme X et est
  donc sense etre plus rapide que, disons, un  programme  de  serveur  X
  sous  MS  Windows,  DOS ou MacOS (NdT : vu la rapidite des processeurs
  actuels et des reseaux, est-ce encore le cas ?).

  Avec le serveur sur une  machine  et  le  client  sur  une  autre,  le
  processeur  n'a  pas  a  se charger des deux a la fois. Cependant ceci
  n'est guere perceptible en termes de vitesse (les donnees devant alors
  etre  transportees par Ethernet), et seuls la charge du CPU et l'usage
  de la memoire du client sous Linux sont remarquables.

  En  revanche,  vous  aurez  besoin  d'une  carte   Ethernet   ce   qui
  generalement  signifie  renoncer  a  un  slot et a une IRQ. Suivant le
  fabricant, le logiciel pour le TX peut prendre environ 20  Moctets  de
  l'espace  du  disque dur sur votre machine Linux. Vous pouvez toujours
  effacer quelques fichiers inutilises une fois que vous etes  arrive  a
  comprendre  ce  qui  est reellement necessaire. La plupart des TXs ont
  besoin que la machine hote ait les daemons bootpd et  tftpd  installes
  et  actifs  -  chacun pouvant engendrer des trous dans votre securite.
  Vous voudrez probablement avoir un demon supplementaire, xdm, lance en
  tache  de  fond (NdC : xdm est le gestionnaire d'acces X, equivalent a
  getty sur un terminal texte). Et finalement,  le  grand  ecran  du  TX
  prendra beaucoup de place sur votre bureau, deja bien encombre.

  33..44..  DDee qquuooii aaii--jjee bbeessooiinn??

  Question pertinente !

  Tout  d'abord,  vous  avez  besoin  d'un  TX.  Si  vous  avez beaucoup
  d'argent, et j'ai bien dit beaucoup, vous pouvez  sortir  et  vous  en
  payer un. Jim Morton (jim@applix.com) poste regulierement une liste de
  TXs et leur prix dans  comp.windows.x.   La  chance  peut  aussi  vous
  sourire. Certains vieux TXs ne peuvent pas etre utilises avec certains
  systemes comme MSDOS, Windows ou OS/2.  Certaines entreprises decident
  donc de s'en debarrasser plutot que de s'en encombrer.

  Du cote de l'ordinateur Linux, vous aurez besoin d'une carte Ethernet.
  Bien qu'il soit en theorie possible d'utiliser un  TX  via  une  ligne
  serie  et  SLIP,  ceci  n'est pas recommande a moins que vous ayez des
  tendances masochistes.  Jettez alors un coup  d'oeil  sur  l'Ethernet-
  HOWTO,  maintenu  par Paul Gortmaker, (Paul.Gortmaker@anu.edu.au), qui
  contient des informations sur comment bien acheter  et  installer  les
  cartes  Ethernet. SLIP et CSLIP sont traites dans le meme document, au
  cas ou vous n'auriez pas d'autre choix.  Dans ce cas, il  vous  faudra
  aussi  consulter le Serial-HOWTO de Greg Hankins (gregh@cc.gatech.edu)
  afin d'obtenir les meilleures performances.

  Vous aurez egalement besoin d'avoir un noyau supportant  TCP/IP  ainsi
  qu'un  numero  IP  pour votre machine et pour le TX. Le Net-2-HOWTO de
  Terry Dawson (terryd@extro.ucc.su.oz.au) traite de tout ceci.

  Enfin vous aurez besoin d'avoir X installe sur votre machine Linux. En
  theorie  vous  avez  uniquement besoin des clients X et des programmes
  comme xdm, les serveurs etant inutiles. Mais autant faire  un  dernier
  effort et installer le serveur X sur votre hote sous Linux a l'aide du
  XFree86-HOWTO de Helmut Geyer (Helmut.Geyer@uni-heidelberg.de).

  44..  CCaabblleess,, rreesseeaauuxx eett ddaaeemmoonnss

  Cette section traite des configurations necessaires du materiel et  du
  logiciel  pour  reussir  a  connecter  le  TX  a la machine Linux. Par
  convention, le TX est appele "murmure" (parce qu'il  ne  fait  pas  de
  bruit)  et  la  machine  Linux  hote  "nunux"  (parce qu'elle est sous
  Linux).  Ils font tout deux partie du domaine "grenouille"  en  France
  (.fr)  (NdT  :  les  noms et domaines ont ete adaptes pour un usage en
  France :-)). Leurs numeros IP sont :

                 192.168.13.1   pour  nunux.grenouille.fr   (la machine Linux)
                 192.168.13.41  pour  murmure.grenouille.fr (le TX).

  Notez que ceux-ci sont des numeros IP pour des  systemes  isoles,  non
  connectes   a  un  reseau  plus  grand  comme  Internet,  et  qu'a  ma
  connaissance il n'y a aucun domaine grenouille en France (mais  ca  ne
  saurait tarder). Nous supposerons qu'il n'y a aucune autre machine sur
  le reseau et que NFS n'est pas installe.

  N.B. Si quelqu'un a  utilise  NFS  pour  la  connexion  avec  son  TX,
  j'aimerais vivement le savoir.

  44..11..  CCoonnnneexxiioonn pphhyyssiiqquuee

  Ceci devrait etre aussi facile que de brancher les cables sur les deux
  machines. Notez que certains TXs ont deux entrees serie qui ne peuvent
  fonctionner qu'a certaines vitesses si les deux sont utilisees en meme
  temps. Verifiez le manuel de votre TX pour  les  details.  Vous  aurez
  besoin  du  numero  Ethernet  du  TX  plus  tard.  Il  est affiche des
  l'allumage du TX meme si aucune connexion n'est encore etablie.

  Des que vous aurez les cables en place, vous serez en mesure de tester
  le  lien  Ethernet. Apres avoir allume le TX, il devrait commencer par
  se plaindre que ses appels a l'aide a un bootpd et/ou un  tftpd  n'ont
  pas   de  reponse,  et  ensuite  realisera  le  lancement  du  systeme
  d'exploitation (generalement implante dans la  ROM  du  TX).  Celui-ci
  inclut  souvent  une  commande  ping  qui  vous permettra de tester la
  connexion par Ethernet du TX a la machine Linux. Ne  paniquez  pas  si
  cela  ne  fonctionne  pas  dans  l'autre  sens  (la machine sous Linux
  tentant un ping sur le TX) car certains (rares) TX necessitent d'avoir
  leur systeme d'exploitation complet pour etre en mesure de repondre.

  44..22..  CCoonnffiigguurreerr ll''aacccceess aauu rreesseeaauu

  La  configuration  de l'acces au reseau est traitee dans le Net2-HOWTO
  comme mentionne plus haut. Nous considererons ici que vous  avez  deja
  TCP/IP  tournant  sans  aucun  probleme  sur votre machine.  Le TX est
  desormais considere comme un banal ordinateur  connecte  sur  le  meme
  reseau.  Vous devez vous assurer que la machine sous Linux comme le TX
  connaissent  chacun  le  numero  IP  de  l'autre  et  que  le   reseau
  fonctionne.

  44..22..11..  CCoonnffiigguurraattiioonn ddee llaa mmaacchhiinnee ssoouuss LLiinnuuxx

  L'information sur le TX doit etre au minimum incluse dans les fichiers
  :

      //eettcc//hhoossttss
        Ajoutez une ligne avec le numero IP attribue au  TX,  comme  par
        exemple :

                          # /etc/hosts
                          #
                          # adresse et nom de la machine.
                          # lprhost et loghost sont optionels
                          #
                          192.168.13.1    nunux.grenouille.fr nunux lprhost loghost

                          # nouvelle ligne d'informations sur le TX
                          192.168.13.41   murmure.grenouille.fr murmure

      //eettcc//eetthheerrss
        fournit  une liste de numeros Ethernet avec les noms de machines
        correspondants. Cela ressemble a :

                     04:03:e8:cc:0d:24     nunux
                     0f:03:11:31:45:f1     murmure

                     (eh oui, ces numeros Ethernet sont factices)

  Vous  aurez  besoin  de  modifier  d'autres  fichiers  suivant   votre
  configuration,  selon que vous utilisez named, routed, ou gated. Comme
  ce n'est pas mon cas, je serais  reconnaissant  si  quelqu'un  pouvait
  m'envoyer la liste des fichiers a modifier.

  Vous  devez ensuite relancer votre machine afin d'etre certain que ces
  modifications soient prises en compte.

  44..22..22..  CCoonnffiigguurraattiioonn dduu tteerrmmiinnaall XX

  Cette configuration ne dependant que du type de  terminal  X  utilise,
  reportez-vous  au  manuel  de  votre  terminal  X. Dans mon cas, le TX
  contient un fichier de configuration dans lequel je dois modifier  les
  entrees :

               ip_host_table            192.168.13.1    nunux
               ip_host_table            192.168.13.1    nunux.grenouille.fr
               ip_host_table            192.168.13.41   murmure
               ip_host_table            192.168.13.41   murmure.grenouille.fr

               file_access_1            TFTP
               file_host_name_1         nunux.grenouille.fr
               file_path_1              /usr/local/xterm/cestici

               display_access_table     murmure
               display_access_table     nunux
               enable_access_control    YES

               xdmcp_server             nunux
               broadcast_address        192.168.13.255
               default_telnet_host      nunux

  Notez  que  le  TX  charge ses fichiers par le reseau, en utilisant le
  protocole TFTP, dans le repertoire /usr/local/xterm/cestici, et  qu'il
  comprend le protocole XDMCP (qui permet l'utilisation de xdm).

  Vous  devrez aussi modifier d'autres parametres comme celui donnant la
  liste des polices. Vous pourrez ainsi utiliser celles deja  installees
  sous  Linux.   Dans  mon  cas, le fichier de configuration relatif aux
  polices est font..tbl et ressemble a :

          /usr/lib/X11/fonts/75dpi
          /usr/lib/X11/fonts/100dpi
          ...
          /usr/local/xterm/misc
          /usr/local/xterm/openlook

  Ensuite, quand le TX demarrera sur la machine Linux,  vous  verrez  la
  liste des polices qu'il aura reussi a charger.

  Une  autre  chose  dont vous aurez besoin est le "backing store". Ceci
  signifie que les parties  de  fenetres  recouvertes  par  d'autres  ne
  seront  pas  stockees  dans  la RAM de la machine sous Linux mais dans
  celle du TX (ce qui fait gagner enormement  en  vitesse  d'affichage).
  Consultez le manuel de votre TX pour de plus amples renseignements.

  44..33..  bboooottppdd

  Bootpd  est  le daemon qui reste a l'ecoute des appels a l'aide de vos
  terminaux X, et qui leur repondra en leur disant qui ils sont,  et  ou
  ils  vont  pouvoir  trouver  les logiciels qu'ils doivent telecharger.
  Pour d'etranges  raisons,  bootpd  n'est  pas  inclus  dans  certaines
  distributions  comme  la  Slackware  2.2.0.1.  Il  vous faudra donc le
  recuperer sur un serveur  FTP  ou  autre.  Il  doit  etre  place  dans
  /usr/sbin/  (et  non  dans /etc, contrairement a ce qu'indique dans la
  page de manuel) sous le nom in.bootpd. Ajoutez ou decommentez la ligne
  suivante dans le fichier /etc/inetd.conf :

              bootps dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.bootpd

  et relancez inetd par :

               kill -HUP `ps -aexu | grep inetd | grep -v grep`

  Ceci  permettra  ensuite  a  inetd  de lancer bootpd si une requete de
  demarrage est detectee.

  Le fichier de configuration de bootpd est /etc/bootpd. La syntaxe  est
  expliquee  dans  le  manuel  en  ligne. Dans notre exemple, le fichier
  /etc/bootpd ressemble a ("serveur" est de nouveau utilise dans le sens
  classique du terme) :

         #
         # Exemple de fichier /etc/bootpd
         #
         # Entree utilisee par l'ensemble des terminaux
         #
         allhost:hd=/usr/local/xterm/cestici:\   # Repertoire pere contenant
  le logiciel du TX
               :ds=192.168.13.1:\                # Serveur de noms du domaine
               :sm=255.255.255.0:\               # Masque de sous-reseau
               :gw=192.168.13.1:\                # Passerelles
               :ts=192.168.13.1:\                # Serveurs d'heure
               :lp=192.168.13.1:\                # Serveurs d'impression
               :to=-7200:                        # Decalage d'heure (en secondes)
         #
         # Ensuite, les descriptions pour chaque client.
         #
         murmure:ht=ethernet:\         # Type du lien physique
                :ha=0f03113145f1:\     # Numero Ethernet du terminal X
                :ip=192.168.13.41:\    # numero IP du terminal X (murmure)
                :tc=allhost:\          #
                :bf=xtermOS:           # Nom du fichier contenant l'OS du TX

  Dans  notre  exemple,  le  TX  va charger son systeme d'exploitation a
  partir du fichier xtermOS  (entree  bf)  contenu  dans  le  repertoire
  /usr/local/xterm/cestici (entree hd).

  bootpd  va  tracer les informations sur les differents lancements dans
  les fichiers /var/adm/syslog et /var/adm/messages (voir  configuration
  du fichier /etc/syslog.conf). Un demarrage reussi donnera :

              Jul 17 05:19:42 nunux in.bootpd[110]: connect from 0.0.0.0
              Jul 17 05:19:42 nunux bootpd[110]: reading "/etc/bootptab"
              Jul 17 05:19:42 nunux bootpd[110]: read 2 entries from "/etc/bootptab"
              Jul 17 05:19:43 nunux bootpd[110]: request from hardware address
       0F03113145F1 Type 1
              Jul 17 05:19:43 nunux bootpd[110]: found 192.168.13.41 murmure

  Apres  avoir aide le TX a demarrer, bootpd va continuer a tourner dans
  l'attente d'autres appels a l'aide durant environ quinze minutes, puis
  se terminer si aucun travail supplementaire n'est requis.

  44..44..  ttffttppdd

  Le  protocol trivial de transfert de fichier (TFTP) est utilise par le
  terminal X pour charger son systeme d'exploitation  depuis  le  disque
  dur  du  serveur  de demarrage. Il devrait etre inclus dans toutes les
  distributions et ne  possede  aucun  fichier  de  configuration.  Vous
  pouvez tester tftp en tapant la commande tftp.

  Comme  avec  bootpd,  vous  devrez  ajouter  ou  decommenter  la ligne
  suivante dans le fichier /etc/inetd.conf :

         tftp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd

  et relancer inetd par :

               kill -HUP `ps -aexu | grep inetd | grep -b grep`

  Remarquez que tftp ne peut acceder qu'aux fichiers ayant un  droit  en
  lecture  pour  tout  le monde. Il faut aussi remarquer que tftp est un
  trou de securite potentiel que vous devez  garder  a  l'esprit  (c'est
  pourquoi  il  est  bon  de  verifier quels sont les fichiers ayant des
  droits en lecture universels sur son systeme, ou de faire un chroot de
  tptfd  a  l'aide  du  TCP-wrapper  /usr/sbin/tcpd). La version de tftp
  incluse dans certains paquetages de Linux ne contient pas les  options
  "-r" ou "-s" permettant une utilisation securisee.

  tftp   renvoie   aussi   des   messages   systeme   dans   le  fichier
  /var/adm/messages.  Si le lancement est reussi, des lignes de ce genre
  apparaissent :

              Jul 17 05:19:43 nunux in.tftpd[111]: connect from murmure
              Jul 17 05:19:58 nunux in.tftpd[113]: connect from murmure
              Jul 17 05:19:59 nunux in.tftpd[115]: connect from murmure
              Jul 17 05:20:00 nunux in.tftpd[117]: connect from murmure
              etc...

  Cela  montre  que  le  TX charge les fichiers dont il a besoin dans le
  repertoire situe sur le serveur Linux. Des messages doivent apparaitre
  sur le TX au fur et a mesure du chargement.

  44..55..  TTeesstt ddee llaa ccoonnnneexxiioonn

  Une  fois  que vous aurez modifie les fichiers ci-dessus, vous devriez
  etre pret a demarrer le TX. Suivant le constructeur, des messages plus
  ou  moins explicites doivent apparaitre. Faites attention aux messages
  indiquant une erreur au chargement d'un fichier.

  Si tout va bien, on devriez en arriver au stade  ou  le  TX  lance  sa
  propre  version  de X. On a alors un fond gris et un curseur en croix.
  Si vous avez deja lance xdm, vous devriez meme  avoir  la  fenetre  de
  login xdm. Il se peut que des choses bizarres apparaissent si certains
  champs de la configuration de xdm ne sont pas corrects.  Preparez-vous
  a tuer xdm en tant que root en ultime recours.

  La  plupart des terminaux X ont des fonctionalites integrees, comme un
  client telnet, dans le systeme  d'exploitation  charge  au  demarrage.
  Cela  vous  permet  alors  de tester la connexion en faisant un telnet
  vers le serveur ou une autre machine.

  Vous pouvez desormais lancer des programmes X sur  le  terminal  X  en
  utilisant l'option display. Par exemple :

                        xclock -display murmure:0 &

  doit faire apparaitre l'horloge "xclock" sur votre TX.

  Vous   pouvez   meme   (et  c'est  d'ailleurs  recommande)  lancer  un
  gestionnaire de fenetres tel que fvwm de la meme maniere.

  55..  FFaaiirree ttoouurrnneerr XX

  Cette section porte sur la configuration de xdm afin qu'une invite  de
  connexion  soit  disponible  sur  les  terminaux X, et que le retour a
  celle-ci soit realise quand un utilisateur se deloge. Le programme xdm
  est  l'equivalent  pour  TX  des  programmes de connexion sur consoles
  texte. Il est normalement inclus  dans  toutes  les  distributions  de
  Linux.

  55..11..  CCoonnffiigguurraattiioonn ddee xxddmm

  Les    fichiers   de   configuration   de   xdm   se   trouvent   dans
  /usr/X11R6/lib/X11/xdm (/usr/X11R6 peut etre un  lien  sur  /usr/X11).
  Le  principal  fichier  de  configuration est xdm-config. Vous devez y
  trouver, parmi d'autres, les lignes :

              DisplayManager._0.authorize:    true
              DisplayManager._0.setup:        /usr/X11R6/lib/X11/xdm/Xsetup_0
              DisplayManager._0.startup:      /usr/X11R6/lib/X11/xdm/GiveConsole
              DisplayManager._0.reset:        /usr/X11R6/lib/X11/xdm/TakeConsole

  Ces lignes indiquent les fichiers controlant l'ecran quand X est lance
  sur  la  machine Linux elle-meme.  Pour  la gestion du TX, nous devons
  ajouter les lignes :

              DisplayManager.murmure_0.authorize:     true
              DisplayManager.murmure_0.setup:   /usr/X11R6/lib/X11/xdm/Xsetup_murmure
              DisplayManager.murmure_0.startup: /usr/X11R6/lib/X11/xdm/Xstartup
              DisplayManager.murmure_0.reset:   /usr/X11R6/lib/X11/xdm/Xreset

  Remarquez que murmure_0 est la notation xdm de murmure:0,  tout  comme
  _0  est  l'equivalent  de  :0.   Remarquez aussi que GiveConsole a ete
  remplace par Xstartup, qui dans mon cas est un script ne faisant rien,
  et  que  TakeConsole  a  ete remplace par Xreset, qui est lui aussi un
  script ne  faisant  rien.   Ces  fichiers  controlent  a  la  fois  la
  "possession"  de  la  console  quand  X est utilise directement sur la
  machine Linux, et qu'il n'y ait pas de probleme d'acces a  la  console
  uniquement parce qu'un TX est connecte a la machine.

  Ces  fichiers  de  demarrage  lancent  differents programmes avant que
  l'invite de connexion soit  placee  a  l'ecran.  C'est  est  l'endroit
  indique pour vous dire d'utiliser xv ou un programme similaire afin de
  placer une image en fond d'ecran.  Dans  ce  cas,  copier  le  fichier
  Xsetup_0 en tant que Xsetup_murmure et modifier ce dernier.

  Comme  cette question reapparait encore et encore : une methode simple
  de mettre une image en fond d'ecran est de mettre la ligne :

                nice xv -root -quit -rmode 5 <fichier_image> &

  ou  quelque  chose  du  meme  style  dans  le  fichier  de  demarrage.
  fichier_image  sera alors affiche en fond d'ecran derriere l'invite de
  connexion de xdm. Notez que certains TX renverront un message d'erreur
  si cette image est trop grande.

  Le   fichier  Xaccess  permet  de  controler  l'acces  a  la  machine.
  Generalement vous n'aurez pas a le modifier. Xaccess permet  aussi  de
  donner  a  l'utilisateur a choisir dans une liste de machine (chooser)
  si plusieurs machines du reseau acceptent l'acces depuis un TX.

  Le fichier Xresources permet de  fixer  la  taille,  la  forme  et  le
  message  de bienvenue de la fenetre de l'invite de connexion. Ainsi en
  remplacant la ligne :

              DisplayManager*resources:       /usr/X11R6/lib/X11/xdm/Xresources

  par les lignes

              DisplayManager._0.resources:        /usr/X11R6/lib/X11/xdm/Xres_0
              DisplayManager.murmure_0.resources: /usr/X11R6/lib/X11/xdm/Xres_mu_0

  ou Xres_mu_0 est le fichier  de  ressources  pour  le  TX  murmure  et
  Xres_0, celui pour la console de la machine Linux. Vous pourrez donner
  des valeurs differentes pour le TX et pour la machine sous Linux.

  Normalement vous ne devriez pas avoir a modifier le fichier  Xsession.

  La  configuration  du  fichier Xservers est aussi presque triviale. Au
  pire vous aurez  a  decommenter  (cas  de  la  distribution  Slackware
  2.2.0.1) la ligne :

                           :0 local /usr/X11R6/bin/X

  ou une ligne ayant le meme effet. Cela permet le demarrage automatique
  du serveur X sur la machine hote nunux lors de l'appel de xdm. Si vous
  commentez  cette  ligne, X ne sera pas lance sur la machine nunux lors
  d'un appel a xdm. C'est le cas si vous desirez que X ne  soit  utilise
  que  sur  les TX et non sur la machine hote. Dans ce cas, vous pourrez
  demarrer X sur la machine nunux par la  commande  startx  et  pour  le
  temps que vous voudrez, sans que cela ait d'incidence sur le TX.

  Si  votre  TX n'a pas XDMCP, vous devrez alors ajouter une ligne telle
  que :

                                murmure:0 foreign

  XDMCP est un protocole standardise qui, par exemple,  laisse  les  TXs
  discuter  avec  leurs  hotes. Si votre TX supporte XDMCP vous ne devez
  pas ajouter cette ligne. Ceci laisserait  pense  a  xdm  qu'un  TX  ne
  comprend  pas  XDMCP,  alors  qu'au  meme  moment  celui-ci  tenterait
  d'utiliser ce protocole pour se connecter. Cela  peut  conduire  a  de
  nombreux effets fortement desagreables comme la lutte de deux xdm pour
  la prise de controle.

  Vous pouvez utiliser les entrees du fichier xdm-config meme s'il n'y a
  pas  de  ligne  dans  Xservers  pour  le  TX.  Vous  pourrez  toujours
  personnaliser l'invite de connexion, etc., si le TX utilise XDMCP.

  Afin que xdm demarre a chaque lancement de Linux, vous pouvez  ajouter
  la ligne :

               /usr/bin/X11/xdm

  dans  /etc/rc.d/rc.local.  Certains  demarrent  xdm  par  le  biais du
  fichier /etc/inittab en remplacant :

       # Default runlevel.
       id:3:initdefault:

  (premiere entree du fichier) par

       # Default runlevel.
       id:5:initdefault:

  Dans tous les cas vous devez avoir xdm dans  la  liste  des  processus
  actifs apres le redemarrage.

  55..22..  QQuueessttiioonnss ssuurr ll''aacccceess

  (Cette   importante   partie   sera  developpee  ulterieurement,  nous
  travaillons dessus.)

  Pour savoir si un utilisateur peut acceder a l'environnement  d'un  TX
  depuis  la  machine nunux, connectez vous (en autre chose que root) et
  lancez la commande :

                  xsetroot -solid white -display murmure:0 &
           ou
                  xterm -display murmure:0 &

  Essayez cela quand quelqu'un est connecte sur le TX et qu'il n'y a que
  l'invite  de  connexion de xdm. Suivant votre position, la possibilite
  d'acces au TX depuis une session sur la console sera plus ou moins une
  possibilite inattendue qu'un bug.

  66..  EErrrreeuurrss eett iinnccoonnnnuueess

  66..11..  PPrroobblleemmeess ccoonnnnuuss

  Certains   problemes   apparaissent   alors,   tout   comme  certaines
  possibilites interessantes, qui pourraient s'averer a  leur  tour  des
  problemes.   Si vous decouvrez d'autres problemes de ce type, faite-le
  moi savoir.

     ttaallkk
        La discussion interactive fonctionnera si un utilisateur sur  le
        TX se loge comme utilisateur sur la machine nunux, mais pas dans
        l'autre sens. Il existe une possibilite de supprimer ce probleme
        mais je ne m'en souviens plus.

     wwhhoo
        Un  utilisateur  loge  sur un TX n'apparaitra pas, meme si cette
        commande est lancee depuis le TX. Ceci est  surement  la  raison
        pour  laquelle  talk  plante  quand l'utilisateur sur la console
        tente de se connecter a l'utilisateur sur le TX.

     xxlloocckk
        Un appel standard de la commande xlock a pour  unique  effet  de
        faire apparaitre un message disant que l'ecran du TX est bloque.
        L'option -remote doit donc etre utilisee afin que  xlock  bloque
        effectivement  le  TX. Il faut noter que certains modes de xlock
        sont de  gros  consommateurs  de  ressources.  Qix  semble  plus
        approprie  aux TXs que les autres modes (consultez la FAQ de Art
        Mulder, cf. ci-dessous, pour de plus amples details).

     xxvv Certains TX n'ont  pas  suffisamment  de  memoire  pour  pouvoir
        afficher  des  images trop grandes ou trop complexes, en plus du
        en fond d'ecran. Dans ce cas utilisez xsetroot pour supprimer ou
        changer  l'image  de  fond  avant  d'utiliser  xv (NdT : de tels
        problemes sont  aussi  tres  frequents  avec  le  trop  gourmand
        Netscape).

  66..22..  TTeerrmmiinnaauuxx tteesstteess

  Les  differentes  procedures decrites dans ce document ont ete testees
  serieusement pour la connexion d'un terminal X Tektronix XP23  sur  un
  386DX-33MHz  avec  16Mo  de  RAM  tournant sous Linux 1.2.3 et XFree86
  Version 3.1.1 (les fichiers de la distribution Slackware 2.2.0.1).

  66..33..  EEnnrriicchhiisssseemmeenntt ppeerrssoonnnneell

  De plus ample informations sur X peuvent etre trouvees sur Internet :

  +o  David B. Lewis (dbl@ics.com) poste sur comp.windows.x la FAQ (Foire
     Aux  Questions)  de  ce  groupe,  ainsi  que  sur  news.answers  et
     comp.answers. Ce document contient  entre  autre  les  adresses  ou
     trouver plus d'informations sur X.

  +o  Steve  Kotsopoulos  (steve@ecf.toronto.edu)  poste  dans  les memes
     groupes sa FAQ "X on Intel-based".

  +o  Art Mulder (art@cs.ualberta.ca, poste regulierement sur  le  groupe
     comp.windows.x  sa  FAQ  "Getting  more  performance out of X", qui
     contient de nombreux renseignements utiles pour l'installation de X
     sous Linux.

  77..  RReemmeerrcciieemmeennttss

  77..11..  RReemmeerrcciieemmeennttss oorriiggiinnaauuxx

  Comme  toujours  les  premiers  remerciements vont a Linus B. Torvalds
  torvalds@kruuna.helsinki.fi.
  De nombreux autres vont a Klaus ter  Fehn  ktf@bc3.gun.de  pour  avoir
  rendu    possible    ce   document   et   a   Douglas   K.   Stevenson
  duck@catzen.gun.de pour l'avoir rendu passable.

  77..22..  RReemmeerrcciieemmeennttss dduu ttrraadduucctteeuurr

  Histoire  de   copier,   je   remercie   aussi   Linus   B.   Torvalds
  torvalds@kruuna.helsinki.fi.
  Mais aussi les relecteurs

  +o  Bernard  Choppy  (choppy@imaginet.fr)  qui  nous  fait  toujours un
     travail d'excellente qualite.

  +o  Olivier Tharan (tharan@galaxie.int-evry.fr) qui vient de se  lancer
     dans cette grande aventure de la traduction de HOWTO.

  Mini-HOWTO Linux de XFree vers XInside
  par Marco Melgazzi, marco@techie.com
  Traducteur:  Sebastien  Blondeel  <http://www.lifl.fr/~blon-
  deel> (sebastien.blondeel@lifl.fr)
  version 1.3 / septembre 1997

  Comment convertir une ligne de mode video XFree86  en  ligne  de  mode
  video XInside/XiGraphics

  11..  IInnttrroodduuccttiioonn

  Au  printemps 1996, j'ai lu dans comp.os.linux.x (groupe de discussion
  consacre a  la  partie  graphique  du  systeme  d'exploitation  Linux)
  beaucoup  d'articles demandant comment convertir les modes video entre
  XFree86 et une de ses alternatives  commerciales:  XInside  (desormais
  appele   XiGraphics,  mais  vous  remarquerez  que  dans  ce  document
  j'utiliserai  l'ancien  nom  de  produit,   puisque   je   me   refere
  principalement a cette version-la).

  J'avais  deja  evalue  le produit auparavant et j'avais encore sur mon
  disque dur cette  version  d'evaluation:  comme  j'aime  resoudre  des
  problemes,  j'ai  decide  de  m'y  mettre et, apres quelques heures de
  tatonnements  et  de  calculs,  j'ai  redige  un  article  cense  etre
  interessant, qui fut rapidement poste.

  Les  discussions  parlant  de  la conversion prirent subitement fin et
  j'ai recu 1 (un) courrier electronique me remerciant pour l'article de
  telle  sorte  que,  puisque  quelqu'un  d'autre risque de se poser ces
  questions a l'avenir, j'ai decide de transformer  cet  article  en  ce
  mini HOWTO.

  Mettons  tout  de  suite les choses au clair: je ne travaille PAS pour
  XInside et je n'ai eu acces qu'a leur version  d'evaluation  1.2  pour
  Linux. Je sais que maintenant (en mai 1997) AccelX a atteint le numero
  de version 3.1, mais je  pense  que  l'information  contenue  dans  ce
  document  est  toujours  utilisable,  au  prix  peut-etre  de quelques
  modifications mineures.

  Puisque ce HOWTO a ete mis au point a l'aide d'une version de  XInside
  assez  vieille,  il  se  peut  que certaines donnees presentees ici ne
  soient pas tout a fait exactes. Comme vous le lirez plus loin, grace a
  l'avenement  de  XFree  3.2, je n'ai pas achete ce serveur commercial.
  Aussi, si vous l'avez achete,  et  que  vous  remarquez  des  erreurs,
  veuillez   prendre  le  temps  de  me  les  communiquer  par  courrier
  electronique.

  Attention, bidouiller les reglages d'un moniteur est  assez  dangereux
  et, pour cette raison, je ne garantis rien du tout. Si cela fonctionne
  pour votre ordinateur, tant mieux. Si vous le faites exploser, ne m'en
  tenez pas pour responsable.

  22..  EEnn aaii--jjee vvrraaiimmeenntt bbeessooiinn??

  Je  ne comprends absolument pas le choix de XInside de ne pas proposer
  d'utilitaire pour regler vos modes video (comme xvidtune)  et/ou  pour
  importer  vos  modes  video de XFree dans la version d'evaluation (qui
  est, pour autant que je sache, commerciale).  J'ai passe environ trois
  heures  a  mettre  tout  ceci  au point (indice: j'ai compare l'entree
  concernant le VESA 1024x768 a 70Hz dans les deux formats (et  je  suis
  presque ingenieur en electronique ;-)) alors qu'un programmeur de chez
  XInside aurait pu ecrire  un  article  comparatif  en  bien  moins  de
  temps...
  Je n'ai pas telecharge les versions d'evaluation a partir de la 1.3 et
  j'espere vraiment qu'ils ont regle cela. Et si c'est le cas,  on  peut
  penser  que  ce  mini  HOWTO  est  devenu inutile mais puisque vous le
  lisez, esperons qu'il vous aidera a mieux comprendre comment tout cela
  fonctionne...

  33..  AAlllloonnss--yy

  Supposons  que  vous  ayez  votre  mode  XFree86 bien aime et que vous
  vouliez evaluer XInside dans les memes conditions: suivez  les  etapes
  presentees  ci-dessous  et  vous devriez pouvoir le faire; nous allons
  utiliser a titre d'exemple vecu mon mode video par defaut et  je  vais
  vous expliquer ce que vous devrez faire pour le convertir.

  Une entree de XFree86 ressemble a ceci:

       Modeline "blabla" DOTCLK  A B C D  a b c d

  Chacun  des  nombres de A a D et de a a d a une signification precise:
  si vous le voulez, vous pouvez faire des recherches dans le "Guide  du
  Rootard     pour     les     modes     video     sous    X386/XFree86"
  (/usr/lib/X11/doc/VideoModes.doc)  mais  vous  n'avez  pas  besoin  de
  connaitre  toute  la theorie sous-jacente pour realiser une conversion
  couronnee de succes...

  Mon entree dans /usr/lib/X11/XF86Config est:

       Modeline "1168x876" 105  1168 1256 1544 1640  876 877 891 900
                            |     |    |    |    |    |   |   |   |
                         DOT_CLK  A    B    C    D    a   b   c   d

  Sous XInside,  il  vous  faut  ajouter  une  entree  dans  le  fichier
  Xtimings,  qui  devrait  se trouver dans etc/ (a partir de maintenant,
  nous supposerons que vous vous trouvez dans le  repertoire  racine  de
  Xaccel,      qui      devrait     etre     quelque     chose     comme
  /usr/X11/lib/X11/AcceleratedX).

  !    Quelque part dans le fichier, mettez ici le nom desire

  [MODE_PREAJUSTE]
      NomDuModePreajuste = "1168x876 @ 72Hz";

  !
  !    Les quatre lignes suivantes sont evidentes... pour qui parle anglais
  !
      HorPixel          = 1168;         // pixels
      VerPixel          = 876;          // lignes
      PixelWidthRatio   = 4;            // taux de largeur des pixels
      PixelHeightRatio  = 3;            // taux de hauteur des pixels

  !
  !   hsync: DOT_CLK / D * 1000 [KHz]
  !
  !   hsync = 105 / 1640 * 1000 = 64.024 KHz
  !
  !   vsync: ( 1 / (( D / DOT_CLK ) * d) ) * 1,000,000 [Hz]
  !
  !   vsync: ( 1 / (( 1640 / 105 ) * 900) ) * 1,000,000
  !           ( 1 / 14057.1428571 ) * 1,000,000 = 71.138 Hz
  !

      HorFrequency      = 64.180;        // kHz
      VerFrequency      = 71.138;        // Hz

  !   Type de balayage

      ScanType          = NONINTERLACED;

  !
  !   Mettez ici les options de XFree86 +/-hsync et +/-vsync
  !
      HorSyncPolarity   = POSITIVE;
      VerSyncPolarity   = POSITIVE;

  !   Cela ne devrait pas changer

      CharacterWidth    = 8;             // largeur des caracteres, en pixels

  !   ici, c'est DOT_CLK

      PixelClock        = 105.000;       // MHz
  !
  !
  !   section des reglages horizontaux: [usec, ou microsecondes]
  !
      HorTotalTime  = D / DOT_CLK                  = 15.619;
      HorAddrTime   = A / DOT_CLK                  = 11.124;
      HorBlankStart = A / DOT_CLK                  = 11.124;
      HorBlankTime  = HorTotalTime - HorBlankStart =  4.495;
      HorSyncStart  = B / DOT_CLK                  = 11.962;
      HorSyncTime   = C / DOT_CLK - HorSyncStart   =  2.743;

   !
   !  section des reglages verticaux:    [msec, ou millisecondes]
   !

      VerTotalTime  = ( HorTotalTime * d ) / 1000  = 14.057;
      VerAddrTime   = ( HorTotalTime * a ) / 1000  = 13.682;
      VerBlankStart = ( HorTotalTime * a ) / 1000  = 13.682;
      VerBlankTime  = VerTotalTime - VerBlankStart =  0.375;
      VerSyncStart  = ( HorTotalTime * b ) / 1000  = 13.698;
      VerSyncTime   = ( HorTotalTime * ( c - b ) ) / 1000
                                                   = 0.219
   ! C'est tout !

  Il vous faut maintenant positionner ce mode  video  nouvellement  cree
  dans les fichiers indiques dans la section suivante, au bon endroit.

  44..  MMeettttrree lleess cchhoosseess aauu ppooiinntt

  Dans  les  extraits  ci-dessous, le signe -> vous indique ce qui a ete
  modifie: ne l'incluez PAS dans vos fichiers!

  Entree du moniteur (la mienne est monitors/mfreq/mfreq64.vda)

           [MODES_ETABLIS]
               "640x480 @ 60Hz",
               "640x480 @ 72Hz",
               "640x480 @ 75Hz",
               "800x600 @ 56Hz",
               "800x600 @ 60Hz",
               "800x600 @ 72Hz",
               "800x600 @ 75Hz",
               "1024x768 Interlaced",
               "1024x768 @ 60Hz",
               "1024x768 @ 70Hz",
               "1024x768 @ 75Hz",
           "1152x900 Interlaced",
               "1152x900 @ 60Hz",
               "1152x900 @ 67Hz",
       ->      "1168x876 @ 72Hz",
               "1280x1024 Interlaced",
               "1280x1024 @ 60Hz",
           "1600x1200 Interlaced";

  Dans le fichier d'informations  propre  a  la  carte  (la  mienne  est
  (boards/s3/764-2.xqa,  je  me  demande pourquoi ils ont presque toutes
  les cartes Hercules sauf la mienne: Terminator 64/Dram).

      [VISUEL]
      BitsPerPixel   = 8;
      MemoryModel    = Packed;
      ColorModel     = Indexed;
      BitsRGB        = 6;
      NumberOfColors = 256;

      [RESOLUTIONS]
      640x480,
      800x600,
      1024x768,
  ->  1168x876,
      1152x900,
      1280x1024

      [BUREAUX]
      640x480,
      800x600,
      1024x768,
      1152x900,
  ->  1168x876,
      1280x1024,
      1600x1200

  Si la carte le permet (ce qui n'est PAS le cas  pour  ma  carte)  vous
  pouvez meme mettre cette entree dans les sections 16bpp et 32bpp (bpp:
  bit par pixel).

  Le fichier etc/Xaccel.ini ressemblera a ce qui suit:

       --------------------------------------------------------------
           Board   = "s3/764-2.xqa";
           Monitor = "mfreq/mfreq64.vda";
           Depth   = 8;
       ->  Desktop = 1168x876;

           [RESOLUTIONS]
       ->      1168x876,
               1024x768;

  L'entree du mode correspondant pour XInside dans etc/Xtimings:

  --------------------------------------------------------------
  [MODE_PREAJUSTE]
      NomDuModePreajuste = "1168x876 @ 72Hz";

      HorPixel          = 1168;          // pixels
      VerPixel          = 876;           // lignes
      PixelWidthRatio   = 4;
      PixelHeightRatio  = 3;
      HorFrequency      = 64.024;        // kHz
      VerFrequency      = 71.138;        // Hz
      ScanType          = NONINTERLACED;
      HorSyncPolarity   = POSITIVE;
      VerSyncPolarity   = POSITIVE;
      CharacterWidth    = 8;             // pixels
      PixelClock        = 105.000;       // MHz
      HorTotalTime      = 15.619;        // (usec) =  205 caracteres
      HorAddrTime       = 11.124;        // (usec) =  146 caracteres
      HorBlankStart     = 11.124;        // (usec) =  146 caracteres
      HorBlankTime      =  4.495;        // (usec) =   59 caracteres
      HorSyncStart      = 11.962;        // (usec) =  157 caracteres
      HorSyncTime       =  2.743;        // (usec) =   36 caracteres
      VerTotalTime      = 14.057;        // (msec) =  900 lignes
      VerAddrTime       = 13.682;        // (msec) =  876 lignes
      VerBlankStart     = 13.682;        // (msec) =  876 lignes
      VerBlankTime      =  0.375;        // (msec) =   24 lignes
      VerSyncStart      = 13.698;        // (msec) =  877 lignes
      VerSyncTime       =  0.219;        // (msec) =   14 lignes

  Vous pouvez verifier votre conversion en lancant le  programme  vgaset
  sans parametres alors que le serveur XInside tourne: cela produira une
  ligne a la XFree et, si tout s'est bien passe,  cette  ligne  sera  la
  meme  que  celle  de  laquelle  vous  etiez parti (sauf si b et c sont
  egaux, je n'ai pas reussi a reproduire cette situation  dans  XInside:
  le meilleur cas qui s'est produit etant c=b+1).

  55..  LLaa ffiinn......

  C'est  tout pour cette fois-ci ! J'espere que cela vous sera utile. Je
  ne pense pas acheter le serveur XiGraphics dans un futur  proche  pour
  une  raison  simple:  la  sortie  de  XFree86  3.2  a  resolu tous les
  problemes de vitesse que je rencontrais avec mon  humble  carte  video
  Trio 64 ;)

  Il semble toutefois que le serveur XiGraphics reconnait un ensemble de
  puces et de cartes video bien  plus  large  que  XFree,  aussi  est-il
  possible  que  l'  "alternative  commerciale" soit la seule disponible
  pour vous. Si c'est  le  cas,  et  si  vous  avez  achete  le  serveur
  XiGraphics,  j'aimerais vraiment avoir de vos nouvelles afin de savoir
  si l'information presentee ici  vous  a  ete  utile,  si  vous  l'avez
  trouvee trop compliquee, ou quoi que ce soit.

  66..  RReennddrree llee pprroocceessssuuss aauuttoommaattiiqquuee

  Le petit script qui suit automatise la plupart du travail. Faites tres
  attention au ScanType (type de balayage) et aux deux  lignes  Polarity
  (polarite):  le  script  ne  les  positionne  pas  et, si vous avez la
  paresse de  ne  pas  les  corriger,  les  risques  d'endommager  votre
  moniteur augmentent en fleche.

  Remarquez  que  je  ne  sais  pas si le drapeau "Doublescan" (balayage
  double) a une signification quelconque dans XInside: si vous tentez de
  convertir  un  mode  de  double  balayage  de faible resolution FAITES
  ATTENTION, vous pouvez assez facilement casser votre moniteur  puisque
  le  taux de rafraichissement que vous obtenez sera double (en fait mon
  400x300 a 72Hz est devenu un 400x300 a 144Hz!).

  #!/bin/sh
  ##########################################################################
  # XF2XInside
  #
  # Ce script convertit les lignes de mode video du format XF86Config au
  # format XInside pour remplir les besoins du fichier etc/Xtimings.
  #
  # C'est une bidouille vite programmee, n'en attendez pas des verifications
  # d'erreurs fines (et ne parlons pas de l'interface utilisateur).
  #
  # Si vous l'appelez sans argument, il devrait vous dire quoi faire.
  #
  #                               (juillet 1996, hcz@tazlwurm.bb.bawue.de)
  #
  # Au fait: Les nouveaux modes crees comme expliques dans ce HOWTO
  # fonctionnent, mais n'apparaissent pas dans le menu de Xsetup. Quelqu'un
  # sait-il pourquoi ?
  #
  ##########################################################################
  #----------------------------------------------- On y va:
  # Modifiez ceci si votre fichier de lignes de modes video est ailleurs:
  XF=/usr/X11/lib/X11/XF86Config
  if [ $# -ne 1 ] ; then
    echo "utilisation: ${0##*/} <mode>"
    echo " exemple: ${0##*/} 1024x764"
    echo -e " role: convertit une entree de ligne de mode video de $XF au\nformat XInside (stdout, ou la sortie standard)"
    exit 1
  fi
  egrep -i "^[\t ]*modeline.+\"$1\""  /usr/X11/lib/X11/XF86Config |
  gawk '
  NF < 11  { print "! mauvaise ligne:\n! " $0 "\n!"; next }
  {
    print "//", $0  ":"
    name = $2
    DOT_CLK = $3;
    A = $4;
    B = $5;
    C = $6;
    D = $7;
    a = $8;
    b = $9;
    c = $10;
    d = $11;
    VerFrequency =  1000000 / ((D / DOT_CLK) * d)
    print "[MODE_PREAJUSTE]"
    printf "  NomDuModePreajuste = \"%dx%d @ %.0dHz\";\n", A, a, VerFrequency
    print "  HorPixel\t\t= " A ";"
    print "  VerPixel\t\t= " a ";"
    print "  PixelWidthRatio\t= 4;\n  PixelHeightRatio\t= 3;"
    print "  HorFrequency\t\t= " DOT_CLK / D * 1000 ";\t// kHz"
    print "  VerFrequency\t\t= " VerFrequency  ";\t// Hz"
    print "  ScanType\t\t= NONINTERLACED;\t\t// *VERIFIEZ*"
    print "  HorSyncPolarity\t= NEGATIVE;\t\t\t// *VERIFIEZ*"
    print "  VerSyncPolarity\t= NEGATIVE;\t\t\t// *VERIFIEZ*"
    print "  CharacterWidth\t= 8;"
    print "  PixelClock\t\t= " DOT_CLK ";"
    HorTotalTime = D / DOT_CLK
    print "  HorTotalTime\t\t= " HorTotalTime ";"
    print "  HorAddrTime \t\t= " A / DOT_CLK ";"
    print "  HorBlankStart\t\t= " A / DOT_CLK ";"
    print "  HorBlankTime\t\t= " D / DOT_CLK - A / DOT_CLK ";"
    print "  HorSyncStart\t\t= " B / DOT_CLK ";"
    print "  HorSyncTime\t\t= " C / DOT_CLK - B / DOT_CLK ";"
    VerTotalTime  = ( HorTotalTime * d ) / 1000
    print "  VerTotalTime\t\t= " VerTotalTime ";"
    print "  VerAddrTime\t\t= " ( HorTotalTime * a ) / 1000 ";"
    VerBlankStart = ( HorTotalTime * a ) / 1000
    print "  VerBlankStart\t\t= " VerBlankStart ";"
    print "  VerBlankTime\t\t= " VerTotalTime - VerBlankStart ";"
    print "  VerSyncStart\t\t= " ( HorTotalTime * b ) / 1000 ";"
    print "  VerSyncTime\t\t= " ( HorTotalTime * ( c - b ) ) / 1000
    print ""
  }'

  77..  MMeerrccii aa

  +o  Heike Claudia Zimmerer hcz@tazlwurm.bb.bawue.de pour  m'avoir  fait
     remarquer une petite contradiction et pour m'avoir envoye un script
     qui automatise une grande partie du travail.

  +o  Bartosz  Maruszewski   B.Maruszewski@zsmeie.torun.pl   pour   avoir
     traduit  ce  mini  HOWTO en polonais et pour m'avoir fait remarquer
     une petite faute de frappe.

  88..  CCooppyyrriigghhtt//ppooiinntt ddee vvuuee lleeggaall

  (c)opyright 1996-7 par Marco Melgazzi (marco@techie.com) - couvert par
  la  GPL  (licence  publique  de  GNU). Pour obtenir une copie de cette
  licence, ecrivez a la Fondation pour un Logiciel Libre,  a  l'adresse:
  Free  Software  Foundation,  Inc.,  675 Mass Ave, Cambridge, MA 02139,
  USA.

  Les marques  deposees  appartiennent  a  leurs  proprietaires.  Aucune
  garantie  ne couvre la justesse ou l'utilite de l'information que vous
  trouverez dans ce document.

  Comment changer le titre d'un xterm
  Ric Lister, ric@giccs.georgetown.edu
  traduction Jean-Albert Ferrez, Jean-Albert.Ferrez@epfl.ch
  Dernire modification : 22.11.1999, v2.0

  Ce document explique comment utiliser des squences d'chappement pour
  modifier dynamiquement le titre de la fentre et de l'icne d'un
  xterm. Des exemples sont donns pour plusieurs shells, et l'annexe
  donne les squences pour d'autres types de terminaux.
  ______________________________________________________________________

  Table des matires


  1. O trouver ce document

  2. Titres statiques

  3. Titres dynamiques

     3.1 Les squences d'chappement xterm
     3.2 Afficher les squences d'chappement

  4. Exemples pour quelques shells

     4.1 zsh
     4.2 tcsh
     4.3 bash
     4.4 ksh
     4.5 csh

  5. Afficher le nom de la commande en cours d'excution

     5.1 zsh
     5.2 Autres shells

  6. Annexe : squences d'chappement pour d'autres mulateurs de terminaux

     6.1 (TT
     6.2 (TT
     6.3 (TT
     6.4 CDE dtterm
     6.5 HPterm

  7. Annexe : exemples dans d'autres langages

     7.1 C
     7.2 Perl

  8. Crdits



  ______________________________________________________________________

  11..  OO ttrroouuvveerr ccee ddooccuummeenntt

  Ce document fait dsormais partie des HOWTOs Linux
  <http://sunsite.unc.edu/LDP/HOWTO/> et peut tre trouv  :
  <http://sunsite.unc.edu/LDP/HOWTO/mini/Xterm-Title.html>.


  La dernire version en date se trouve  :
  <http://www.giccs.georgetown.edu/~ric/howto/Xterm-Title/>.


  Ce document remplace le howto initial crit par Winfried Trmper.


  Ndt : La version franaise de ce document se trouve  :
  <http://www.freenix.fr/linux/HOWTO/mini/Xterm-Title.html>


  22..  TTiittrreess ssttaattiiqquueess

  Les titres des mulateurs de terminaux xterm, color-xterm ou rxvt
  peuvent tre donns sur la ligne de commande avec les options -T et
  -n :



       xterm -T "Le titre de mon XTerm" -n "Le titre de son icne"





  33..  TTiittrreess ddyynnaammiiqquueess

  Bon nombre de personnes trouvent utile de faire apparatre dans le
  titre de leur terminal une information qui change dynamiquement, telle
  que le nom du serveur sur lequel on est connect, le rpertoire
  courant, etc.


  33..11..  LLeess ssqquueenncceess dd''cchhaappppeemmeenntt xxtteerrmm

  On peut changer le titre de la fentre et de l'icne dans un xterm
  lanc en utilisant les squences d'chappement XTerm. Les squences
  suivantes sont utiles dans ce but :

    ESC]0;nnoommBEL -- Change le titre de la fentre et de l'icne

    ESC]1;nnoommBEL -- Change le titre de l'icne

    ESC]2;nnoommBEL -- Change le titre de la fentre

  o ESC est le caractre escape (chappement, \033), et BEL est le
  caractre bell (bip, \007).


  Afficher l'une de ces squences dans un xterm causera le changement du
  titre de la fentre ou de l'icne.


  NNoottee: Ces squences fonctionnent galement avec la plupart des drivs
  de xterm, tels que nxterm, color-xterm et rxvt. D'autres mulateurs de
  terminaux utilisent d'autres squences ; quelques exemples sont donns
  en annexe. La liste complte des squences d'chappement est donne
  dans le fichier ctlseq2.txt
  <http://www.giccs.georgetown.edu/~ric/howto/Xterm-Title/ctlseq2.txt>
  de la distribution de xterm, ou dans le fichier xterm.seq
  <http://www.giccs.georgetown.edu/~ric/howto/Xterm-Title/xterm.seq> de
  la distribution de rxvt <http://www.rxvt.org/>.


  33..22..  AAffffiicchheerr lleess ssqquueenncceess dd''cchhaappppeemmeenntt

  Pour les informations qui ne changent pas au cours de l'xcution du
  shell, telles que le serveur et le nom d'utilisateur, il suffit
  d'afficher les squences depuis le fichier rc du shell :

  echo -ne "\033]0;${USER}@${HOST}\007"




  devrait donner un titre du genre nom@serveur, pour autant que les
  variables $USER et $HOST soient correctes. Les options requises pour
  echo peuvent dpendre du shell (cf ci-dessous).


  Pour les informations qui peuvent changer au cours de l'excution du
  shell, telles que le rpertoire courant, ces squences doivent
  vraiment tre donnes lors de chaque changement de l'invite.  De cette
  faon, le titre est mis  jour lors de chaque commande et peut ainsi
  reflter des informations telles que le rpertoire en cours, le nom
  d'utilisateur, le nom du serveur, etc. Certains shells offrent des
  fonctions spciales pour y parvenir, d'autres pas : il faut dans ce
  cas insrer la chane directement dans le texte de l'invite.


  44..  EExxeemmpplleess ppoouurr qquueellqquueess sshheellllss

  Nous donnons ci-dessous des exemples pour les shells les plus
  courants. Nous commenons avec zsh car il offre des possibilits qui
  facilitent grandement notre tche. Nous progresserons ensuite vers des
  exemples de plus en plus difficiles.


  Dans tous les exemples ci-dessous, on teste la variable
  d'environnement TERM pour tre certain de n'appliquer ces squences
  que si l'on est dans un xterm (ou driv). Le test est fait sur
  TERM=xterm*, de manire  inclure au passage les variantes telles que
  TERM=xterm-color (dfini par rxvt).


  Encore une remarque au sujet des drivs du C shell tels que tcsh et
  csh. Dans ces shells, les variables non-dfinies causent des erreurs
  fatales. Il est ds lors ncessaire avant de tester la valeur de la
  variable $TERM, de tester si elle existe pour ne pas interrompre un
  shell non-interactif. Pour y parvenir, il faut inclure les exemples
  ci-dessous dans quelque chose du genre :


         if ($?TERM) then
             ...
         endif




  ( notre avis, il s'agit d'une raison parmi beaucoup d'autres de ne
  pas utiliser les C shells. Voir _C_s_h _P_r_o_g_r_a_m_m_i_n_g _C_o_n_s_i_d_e_r_e_d _H_a_r_m_f_u_l
  _<http://language.perl.com/versus/csh.whynot> pour une discussion
  utile).


  Pour utiliser les exemples suivants, placez-les dans le fichier
  d'initialisation du shell apropri, c'est--dire un fichier lu lors du
  lancement d'un shell interactif. Le plus souvent il s'agit de ._s_h_e_l_lrc
  (ex : .zshrc, .tcshrc, etc.)






  44..11..  zzsshh

  On utilise quelques fonctions et codes offerts par zsh :


       precmd ()   fonction excute juste avant chaque invite
       chpwd ()    fonction excute lors de chaque changement de rpertoire
       \e          code du caractre escape (ESC)
       \a          code du caractre bip (BEL)
       %n          code remplac par $USERNAME
       %m          code remplac par le hostname jusqu'au premier '.'
       %~          code remplac par le rpertoire, avec '~'  la place de $HOME




  De nombreux autres codes sont disponibles, voir 'man zshmisc'.


  Ainsi, le code suivant, mis dans ~/.zshrc, affiche
  "nom@serveur:rpertoire" dans le titre de la fentre (et de l'icne).


       case $TERM in
          xterm*)
              precmd () {print -Pn "\e]0;%n@%m: %~\a"}
              ;;
       esac




  On arrive au mme rsultat en utilisant chpwd() au lieu de precmd().
  La commande interne print fonctionne comme echo, mais donne accs aux
  squences %.



  44..22..  ttccsshh

  tcsh offre des possibilits similaires  celles de zsh :


       precmd ()   fonction excute juste avant chaque invite
       chpwd ()    fonction excute lors de chaque changement de rpertoire
       %n          code remplac par $USERNAME
       %m          code remplac par le hostname jusqu'au premier '.'
       %~          code remplac par le rpertoire, avec '~'  la place de $HOME





  Malheureusement, il n'y a pas d'quivalent  la fonction print de zsh
  qui permette d'utiliser les codes de l'invite dans la chane du
  titre ; le mieux que l'on puisse faire est d'utiliser les variables du
  shell (dans ~/.tcshrc) :


       switch ($TERM)
          case "xterm*":
              alias precmd 'echo -n "\033]0;${HOST}:$cwd\007"'
              breaksw
       endsw


  mais on obtient alors le chemin complet du rpertoire, sans '~'. Par
  contre, on peut mettre la chane dans l'invite :


       switch ($TERM)
          case "xterm*":
              set prompt="%{\033]0;%n@%m:%~\007%}tcsh%# "
              breaksw
          default:
              set prompt="tcsh%# "
              breaksw
       endsw




  ce qui donne "tcsh% " comme invite, et "_n_o_m@_s_e_r_v_e_u_r: _r__p_e_r_t_o_i_r_e" dans
  le titre (et l'icne) de xterm. Les "%{...%}" doivent tre placs
  autour des squences d'chappement (et ne peuvent pas tre le dernier
  lment de l'invite, 'man tcsh' donne plus de dtails).



  44..33..  bbaasshh

  bash offre la variable PROMPT_COMMAND qui contient une commande 
  excuter avant d'afficher l'invite. Ce code (insr dans ~/.bashrc)
  affiche nom@serveur: rpertoire dans le titre de la fentre (et de
  l'icne).


       PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'




  o \033 est le caractre ESC et \007 BEL.


  Il convient de noter que les guillemets jouent un rle important : les
  variables entre "..." sont values, alors que celles entre "..." ne
  le sont pas. Ainsi, PROMPT_COMMAND reoit bien le nom des variables,
  ces dernires tant values lorsque PROMPT_COMMAND est invoque.


  Cependant, $PWD donne le rpertoire complet. Si l'on veut utiliser le
  raccourci ~, il faut placer toute la squence d'chappement dans
  l'invite pour avoir accs aux codes suivants :


       \u          est remplac par $USERNAME
       \h          est remplac par le hostname jusqu'au premier '.'
       \w          est remplac par le repertoire, avec '~'  la place de $HOME
       \[...\]     signale une suite de caractre non-imprimables





  Ainsi le code suivant produit l'invite bash$ , et place nom@serveur:
  rpertoire dans le titre (et l'icne) de xterm.





  case $TERM in
     xterm*)
         PS1="\[\033]0;\u@\h: \w\007\]bash\$ "
         ;;
     *)
         PS1="bash\$ "
         ;;
  esac




  L'utilisation de \[...\] signale  bash la prsence de caractres non-
  imprimables, information dont il a besoin lorsqu'il calcule la
  longueur de l'invite. Sans cette prcaution, les commandes d'dition
  de ligne ne savent plus trs bien o placer le curseur.



  44..44..  kksshh

  ksh n'offre pas grand chose en terme de fonctions et codes, il faut
  donc mettre notre chane dans l'invite pour qu'elle soit mise  jour
  dynamiquement. L'exemple suivant produit l'invite ksh$ , et place
  nom@serveur: rpertoire dans le titre (et l'icne) de xterm.


       case $TERM in
          xterm*)
              HOST=`hostname`
              PS1='^[]0;${USER}@${HOST}: ${PWD}^Gksh$ '
              ;;
          *)
              PS1='ksh$ '
              ;;
       esac




  Cependant, $PWD donne le rpertoire complet. On peut ter le prfixe
  $HOME/ en utilisant la construction ${...##...}. De mme, on peut
  tronquer le nom du serveur  l'aide de ${...%%...}.


       HOST=`hostname`
       HOST=${HOST%%.*}
       PS1='^[]0;${USER}@${HOST}: ${PWD##${HOME}/}^Gksh$ '




  Les caractres ^[ et ^G dsignent ESC et BEL (ils peuvent tre saisis
  dans emacs  l'aide de C-q ESC et C-q C-g).



  44..55..  ccsshh

  C'est assez difficile  raliser avec csh. On finit par mettre ce qui
  suit dans le ~/.cshrc :





  switch ($TERM)
     case "xterm*":
         set host=`hostname`
         alias cd 'cd \!*; echo -n "^[]0;${user}@${host}: ${cwd}^Gcsh% "'
         breaksw
     default:
         set prompt='csh% '
         breaksw
  endsw




  Il a fallu faire un alias de la commande cd pour mettre  jour
  l'invite. Les caractres ^[ et ^G dsignent ESC et BEL (ils peuvent
  tre saisis dans emacs  l'aide de C-q ESC et C-q C-g).


  Notes : sur certains systmes hostname -s peut tre utilis pour
  obtenir le nom de la machine au lieu du nom qualifi. Les utilisateurs
  ayant des liens symboliques sur des rpertoires trouveront `pwd` plus
  prcis que $cwd.



  55..  AAffffiicchheerr llee nnoomm ddee llaa ccoommmmaannddee eenn ccoouurrss dd''eexxccuuttiioonn

  Souvent un utilisateur lance une longue commande en avant plan telle
  que top, un diteur, un lecteur de courrier lectronique, etc, et
  voudrait que le nom de cette commande figure dans le titre de la
  fentre.  C'est un problme dlicat qui n'est facile  rsoudre
  qu'avec zsh.


  55..11..  zzsshh

  zsh offre une fonction idale pour cet objectif :


       preexec()   fonction excute juste avant qu'une commande soit excute
       $*,$1,...   arguments passs  preexec()




  On peut donc insrer le nom de la commande de la manire suivante :


       case $TERM in
           xterm*)
             preexec () {
               print -Pn "\e]0;$*\a"
             }
           ;;
       esac




  Note: la fonction preexec() est apparue vers la version 3.1.2 de zsh,
  vous devrez peut-tre mettre  jour votre ancienne version.





  55..22..  AAuuttrreess sshheellllss

  Ce n'est pas facile avec les autres shells qui n'ont pas l'quivalent
  de la fonction preexec(). Si quelqu'un a des exemples, merci de les
  communiquer par email  l'auteur.



  66..  tteerrmmiinnaauuxx AAnnnneexxee :: ssqquueenncceess dd''cchhaappppeemmeenntt ppoouurr dd''aauuttrreess mmuullaa
  tteeuurrss ddee

  De nombreux mulateurs de terminaux modernes sont des drivs de xterm
  ou rxvt et acceptent les squences d'chappement que nous avons
  utilises jusqu'ici. Certains terminaux propritaires fournis avec les
  diverses variantes d'unix utilisent leur propres squences.



  66..11..  aaiixxtteerrmm  dd''IIBBMM

  aixterm reconnat les squences d'chappement de xterm.



  66..22..  wwsshh ,, xxwwsshh  eett wwiinntteerrmm  ddee SSGGII

  Ces terminaux dfinissent $TERM=iris-ansi et utilisent :

    ESCP1.y_t_e_x_t_eESC\    Pour le titre de la fentre

    ESCP3.y_t_e_x_t_eESC\    Pour le titre de l'icne

     La liste complte des squences est donne dans la page man
     xwsh(1G).


  Les terminaux d'Irix supportent galement les squences de xterm pour
  dfinir individuellement le titre de la fentre et de l'icne, mais
  pas celle pour dfinir les deux en mme temps.



  66..33..  ccmmddttooooll  eett sshheellllttooooll  ddee SSuunn

  cmdtool et shelltool dfinissent $TERM=sun-cmd et utilisent :

    ESC]l_t_e_x_t_eESC\    Pour le titre de la fentre

    ESC]L_t_e_x_t_eESC\    Pour le titre de l'icne

     Ce sont des programmes vraiment horribles, il vaut mieux utiliser
     autre chose.


  66..44..  CCDDEE ddtttteerrmm

  dtterm dfinit $TERM=dtterm. Il semble qu'il reconnaisse  la fois les
  squences xterm standard ainsi que celles du cmdtool de Sun (test sur
  Solaris 2.5.1, Digital Unix 4.0, HP-UX 10.20).



  66..55..  HHPPtteerrmm

  hpterm dfinit $TERM=hpterm et utilise les squences suivantes :

    ESC&f0k_l_o_n_g_u_e_u_rD_t_e_x_t_e  Donne le texte _t_e_x_t_e de longueur _l_o_n_g_u_e_u_r
     comme titre de fentre

    ESC&f-1k_l_o_n_g_u_e_u_rD_t_e_x_t_e  Donne le texte _t_e_x_t_e de longueur _l_o_n_g_u_e_u_r
     comme nom de l'icne


  Un programme C simple pour calculer la longueur et afficher la bonne
  squence ressemble  :


       #include <string.h>
       int main(int argc, char *argv[])
       {
           printf("\033&f0k%dD%s", strlen(argv[1]), argv[1]);
           printf("\033&f-1k%dD%s", strlen(argv[1]), argv[1]);
           return(0);
       }





  On peut galement crire un shell-script quivalent, utilisant
  ${#string} (zsh, bash, ksh) ou ${%string} (tcsh) pour obtenir la
  longueur d'une chane. L'exemple suivant est pour zsh :


       case $TERM in
           hpterm)
               str="\e]0;%n@%m: %~\a"
               precmd () {print -Pn "\e&f0k${#str}D${str}"}
               precmd () {print -Pn "\e&f-1k${#str}D${str}"}
               ;;
       esac






  77..  AAnnnneexxee :: eexxeemmpplleess ddaannss dd''aauuttrreess llaannggaaggeess

  Il peut tre utile d'crire des bouts de codes pour changer le titre
  de la fentre  l'aide des squences xterm. Voici quelques exemples :



  77..11..  CC



       #include <stdio.h>

       int main (int argc, char *argv[]) {
         printf("%c]0;%s%c", '\033', argv[1], '\007');
         return(0);
       }








  77..22..  PPeerrll



       #!/usr/bin/perl
       print "\033]0;@ARGV\007";






  88..  CCrrddiittss

  Merci aux personnes suivantes pour leur contribution  ce document.


  Paul D. Smith <psmith@BayNetworks.COM> et Christophe Martin
  <cmartin@ipnl.in2p3.fr> ont tous les deux remarqu que j'avais
  interverti les guillemets dans le PROMPT_COMMAND pour bash. Les avoir
  dans le bon ordre garantit que les variables sont values
  dynamiquement.


  Paul D. Smith <psmith@BayNetworks.COM> a propos de protger les
  caractres non-imprimables dans l'invite de bash.


  Christophe Martin <cmartin@ipnl.in2p3.fr> a donn la solution pour
  ksh.


  Keith Turner <keith@silvaco.com> a donn les squences d'chappement
  pour les cmdtool et shelltool de Sun.


  Jean-Albert Ferrez <ferrez@dma.epfl.ch> a signal un manque de
  cohrence dans l'utilisation de "PWD" et "$PWD", ainsi que de "\" et
  "\\".


  Bob Ellison <papillo@hpellis.fc.hp.com> et Jim Searle
  <jims@broadcom.com> ont test dtterm sur HP-UX.


  Teng-Fong Seak <seak@drfc.cad.cea.fr> a suggr l'option -s de
  hostname, l'utilisation de `pwd`, et de echo sous csh.


  Trilia <trilia@nmia.com> a suggr les exemples dans d'autres
  langages.


  Brian Miller <bmiller@telstra.com.au> a fourni les squences
  d'chappement et les exemples pour hpterm.


  Lenny Mastrototaro <lenny@click3x.com> a expliqu l'utilisation des
  squences xterm dans les mulateurs de terminaux Irix.


  Paolo Supino <paolo@init.co.il> a suggr l'utilisation de \\$ dans le
  prompt de bash.



  Zip Drive Mini-HOWTO
  Kyle Dansie, dansie@ibm.net
  v2.4, 10 Janvier 1999

  Ce document constitue un guide de rfrence rapide pour configurer et
  utiliser l'unit Iomega ZIP avec Linux.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Site de rfrence de ce document

  2. Mise En Route Rapide

  3. Configuration d'un noyau pour l'unit ZIP

     3.1 version SCSI

  4. L'unit ZIP

     4.1 Version Port Parallle Zip100
     4.2 Version SCSI externe
        4.2.1 L'adaptateur hte ZIP ZOOM
     4.3 Version SCSI interne
     4.4 Le pilote IMM pour le ZIP Plus
     4.5 Version ATAPI
     4.6 Version IDE
     4.7 Version USB
     4.8 Version ZIP250

  5. Utilisation de l'unit ZIP

     5.1 Fdisk, mke2fs, mount, etc.
     5.2 Un disque format DOS existant
     5.3 Re-formatage en tant que disque  Linux natif
     5.4 enregistrements dans fstab
     5.5 Le disque des outils ZIP

  6. Performances

  7. Questions frquemment poses

     7.1 Puis-je brancher une imprimante dans le port parallle d'une unit   ZIP ?
     7.2 Avez-vous prvu le support des ports EPP/ECP dans PPA ?
     7.3 Puis-je faire tourner Linux  partir d'une unit ZIP ?
     7.4 Puis-je lancer le systme  partir d'une unit ZIP ?
     7.5 Pourquoi le Iomega utilise la partition numro 4 ?
     7.6 Comment puis-je avoir le disque mont au lancement ?
     7.7 Que se passe-t-il s'il n'y a pas de disque au lancement du systme ?
     7.8 Puis-je utiliser l'unit parallle comme un vrai disque SCSI ?
     7.9 PPA peut-il tre utilis avec le port parallle des units de bande ?
     7.10 PPA fonctionnera-t-il avec le port parallle SyQuest EZ135 ?

  8. Trouver l'information la plus rcente



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Adaptation franaise : Albert-Paul Bouillot apb@club-internet.fr

  L'unit de disque amovible Iomega ZIP est rpandue et disponible en
  plusieurs versions.

    port parallle;

    SCSI;

    IDE - ATAPI;

    Plus.

     La version Port Parallle semble la plus populaire. Elle est
     disponible depuis un moment et bon march. La version SCSI existe
     aussi depuis un moment, mais elle ncessite une carte scsi que
     beaucoup ne possdent pas, et n'est donc pas aussi populaire. La
     version ATAPI semble maintenant plus disponible. La version Plus
     constitue la version la plus rcente de l'unit ZIP. Elle peut
     dtecter dans quel port elle est installe, scsi ou parallle. Ce
     document concernera la version Port Parallle, mais on y trouvera
     quelques conseils pour les autres versions.


  Ce document incorpore des informations collectes et publies par
  d'autres, et en particulier par :

    Grant Guenther, grant@torque.net

    Scot Wilcoxon, sewilco@fielday.mn.org

    Joe Mack, mack@ncifcrf.gov

    Byron Jeff, byron@cc.gatech.edu


  Je les remercie pour leurs importantes contributions, et assume la
  responsabilit des erreurs que j'ai pu introduire.

  Des remerciements spciaux vont  Grant Guenther qui a crit la
  version 0.26 du programme ppa ainsi que la version originale de cet
  HOWTO.  Si vous dcouvrez des erreurs ou des omissions dans ce
  document, merci de m'en avertir.  dansie@ibm.net


  11..11..  SSiittee ddee rrffrreennccee ddee ccee ddooccuummeenntt

  La version la plus rcente de ce document se trouve  :
  <http://www.njtcom.com/dansie/zip-drive.html>



  22..  MMiissee EEnn RRoouuttee RRaappiiddee

  Bon, vous avez achet une nouvelle unit zip et maintenant, vous
  voulez l'utiliser. Quelques distributions possdent dj les modules
  installs.  Pour les dbutants, vous pouvez essayer insmod ppa.
  (Assurez-vous que l'unit est connecte et qu'elle contient un
  disque).  Si le programme ppa n'est pas prsent, il vous faut alors
  configurer le noyau. Ma machine possde 2 ports parallles, un pour
  l'unit zip et l'autre pour l'imprimante. Cela rend les choses faciles
  : pas de permutations de cbles.

  Configuration du noyau :

    cd /usr/src/linux


    make xconfig

    scsi support = Y

    scsi disk support = Y

    mettre le support du Iomega zip en module

    mettre galement le support de l'imprimante en module

    sauver ces paramtres et quitter

    make dep

    make clean

    make zImage ou zlilo ou zdisk

    make modules

    make modules_install

  Maintenant, pour utiliser l'unit :

    charger le module : insmod ppa

    crer un point de montage : mkdir /zip

    insrer un disque de pr-format de type windoze dans l'unit;

    monter le disque : mount -t vfat /dev/sda4 /zip

    utiliser les commandes habituelles pour les fichiers telles que
      l /zip, ls /zip, df, cp,

    Quand vous avez termin :  umount /zip

  Si vous avez des problmes dans l'une quelconque des tapes ci-dessus,
  consultez les paragraphes suivants pour obtenir des instructions plus
  dtailles.




  33..  CCoonnffiigguurraattiioonn dd''uunn nnooyyaauu ppoouurr ll''uunniitt ZZIIPP

  Pour pouvoir utiliser l'unit  sous Linux, votre noyau doit tre
  configur pour le support du systme SCSI, le support des disques SCSI
  et le support du coupleur que vous utilisez. Si la construction du
  noyau ne vous est pas familire, vous devriez lire Linux Kernel HOWTO
  <http://metalab.unc.edu/mdw/HOWTO/Kernel-HOWTO.html> pour trouver des
  indications.

  La construction d'un noyau commence obligatoirement par l'tape de
  configuration. L, vous identifiez les composants spcifiques du noyau
  dont vous avez besoin.  Premire tape  cd /usr/src/linux. Il y a en
  ralit plusieurs moyens de faire la configuration. Sous X Window,
  j'utilise mmaakkee xxccoonnffiigg. On trouve galement make menuconfig ou make
  config si l'on travaille  partir de la ligne de commande.  La mthode
  la plus simple consiste  utiliser xconfig.

  Dans la section SSuuppppoorrtt SSCCSSII rpondez oui au support SCSI (SSCCSSII
  ssuuppppoorrtt == YY).  Rpondez galement oui pour le support des disques SCSI
  (SSCCSSII ddiisskk ssuuppppoorrtt == YY).


  Dans la section sur les pilotes de bas niveau (SSCCSSII llooww--lleevveell ddrriivveerrss)
  choisissez le support SCSI de l'unit ZIP sur le port parallle
  (IIOOMMEEGGAA PPaarraalllleell PPoorrtt ZZIIPP ddrriivvee SSCCSSII ssuuppppoorrtt == MM).  La lettre M
  signifiant module.

  Dans la section concernant les priphriques en mode caractres
  CChhaarraacctteerr DDeevviicceess cherchez et choisissez le support du port imprimante
  parallle (PPaarraalllleellll PPrriinntteerr ssuuppppoorrtt == MM)

  Si vous vous sentez un peu hsitant sur tout cela, utilisez zdisk dans
  l'tape du make. Comme cela, le noyau sera construit et install sur
  le disque souple. Si vous faites une mauvaise manipulation quelque
  part, vous aurez toujours un systme en bon tat pour redmarrer 
  partir du disque dur.

  Maintenant, reconstruisez le noyau en effectuant les tapes
  suivantes :

    make dep

    make clean

    make zImage ou zlilo ou zdisk

    make modules

    make modules_install

  aassttuuccee si vous voulez avoir un journal de la sortie de l'tape make
  zImage, vous pouvez utiliser


          make zImage 2>&1 | tee zImage.out





  C'est vraiment la chose  faire, si vous avez des erreurs de compila
  tion ou des conflits dans la configuration, vous disposerez d'un
  fichier contenant les messages d'erreur ou les erreurs de compilation.
  Cela facilitera les demandes d'aide.

  Il vous faut galement charger les modules quelque part. Sur mon
  systme, je n'ai eu qu' ajouter une paire de lignes dans le fichier
  boot.local.

    insmod ppa

    insmod lp

     J'utilise le systme Suse 5.3 et ce fichier se trouve dans
     /etc/rc.d.  L'emplacement de ce fichier peut varier selon les
     distributions, mais, il y a un fichier quelque part, pour y mettre
     les personnalisations  faire au dmarrage. Vous devez utiliser le
     fichier correspondant  votre distribution.

  Puis shutdown et reboot.

  Vous pouvez galement mettre tout ou partie du systme SCSI en
  modules.  Si vous le faites, assurez-vous de charger scsi.o, puis sd.o
  et finalement le pilote de votre coupleur avant de tenter un accs 
  votre unit ZIP.



  33..11..  vveerrssiioonn SSCCSSII


  Si vous avez dj un disque SCSI dans votre systme, et que vous
  connectiez l'unit ZIP sur le mme contrleur, il n'y a rien  ajouter
  dans la configuration du noyau. Autrement, vous aurez srement un
  nouveau noyau  construire.

  Si vous construisez un noyau qui supporte la version SCSI de l'unit
  ZIP, vous devez choisir le support SCSI et le support des disques
  SCSI. Vous devez galement choisir un pilote pour la carte d'interface
  que vous allez utiliser. Si vous avez un  ZIP Zoom, choisissez le
  pilote pour aha152x.

  Assurez-vous d'avoir lu la documentation pour votre adaptateur dans le
  SCSI HOWTO ainsi que les fichiers README (LISEZ-MOI) dans le sous-
  rpertoire drivers/scsi de l'arborescence du source de Linux.  Faites
  attention aux paramtres de la ligne de commande que vous pourriez
  avoir  utiliser pour aider le noyau  initialiser votre adaptateur.

  Par exemple, si vous utilisez la carte ZIP Zoom, vous devrez ajouter
  quelque chose comme



                 aha152x=0x340,11,7,1




   la commande de dmarrage (ou vous devrez l'inclure dans voter
  fichier /etc/lilo.conf dans une clause append).  Ceci indique au
  pilote l'adresse du port et l'IRQ de votre carte ZIP Zoom - assurez-
  vous que les chiffres correspondent  la faon dont les cavaliers sont
  configurs sur la carte.

  Sur la manire de configurer le noyau avec LILO et LOADLIN, vous
  pouvez galement consulter le document de Paul Gortmaker BOOTPROMPT
  HOWTO <http://metalab.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html>.




  44..  LL''uunniitt ZZIIPP

  Il existe au moins cinq ou six versions de l'unit Iomega ZIP 100.  La
  page Iomega pour ces units se trouve 
  <http://www.iomega.com/product/zip/> Elles acceptent toutes des
  cartouches spciales qui ressemblent  des disques souples  3.5" qui
  peuvent contenir 100 megabytes de donnes.  Les disques comportent, en
  fait, 96 cylindres de 2048 secteurs, chacun des secteurs stockant 512
  bytes.  On devrait donc normalement parler de 96 Megabytes.

  L'unit externe est livre dans les types suivants :

    Port Parallle

    SCSI

    Plus

  L'unit interne, quant  elle, est disponible dans les types :

    SCSI


    IDE

    ATAPI

  Les versions internes peuvent tre installes dans des emplacements
  pour units 3.5 ou 5.25.  Les versions externes sont dans une petite
  bote bleue en plastique, dont l'alimentation se fait par un bloc
  mural externe.

  Toutes les units disposent d'un grand bouton poussoir en face avant.
  Il sert  jecter le disque.  Linux verrouille la porte pendant
  l'utilisation de l'unit, et si l'on pousse le bouton alors que la
  porte est bloque, l'unit ZIP s'en souvient et jecte le disque ds
  que le logiciel la dverrouille.


  44..11..  VVeerrssiioonn PPoorrtt PPaarraallllllee ZZiipp110000

  Cette unit est dcrite 
  <http://www.iomega.com/product/zip/zippp.html>

  Le pilote Linux est disponible en diffrentes versions. La version
  0.26 du programme ppa.c est la version standard des noyaux 2.0.x.  Si
  la version de votre noyau est plus ancienne que 2.0.35, alors, vous
  avez le VVIIEEUUXX programme.  Consultez

  David Campbell's page <http://www.torque.net/~campbell/> pour
  connatre la version la plus rcente de ce programme. Au moment de la
  rdaction de ce document, c'tait la 1.42.


  Les fonctions d'auto configuration du programme 1.4x sont trs
  agrables.  Vous n'avez PAS  dire au programme quelle est l'adresse
  de base du port parallle. Le programme teste les adresses standards
  des ports parallles et y connecte le priphrique quand il la trouve.

  Le problme le plus courant survient lorsque l'on charge le module
  d'imprimante lp avant le programme ppa. Le programme ppa doit tre
  charg avant le module lp. Le module lp s'approprie le port dont
  l'unit ZIP a besoin, c'est la raison pour laquelle il faut charger le
  programme ppa en premier.


  Assurez-vous galement que les cbles sont solidement connects.

  Si vous avez tout fait correctement :) vous verrez des messages comme
  celui-ci au dmarrage.



















    VFS: Mounted root (ext2 filesystem) readonly.
    Adding Swap: 102528k swap-space (priority -1)
    ppa: Version 1.42
    ppa: Probing port 03bc
    ppa: Probing port 0378
    ppa:     SPP port present
    ppa:     EPP 1.9 with hardware direction protocol
    ppa: Found device at ID 6, Attempting to use EPP 32 bit
    ppa: Communication established with ID 6 using EPP 32 bit
    ppa: Probing port 0278
    ppa:     SPP port present
    scsi0 : Iomega parport ZIP drive
    scsi : 1 host.
      Vendor: IOMEGA    Model: ZIP 100           Rev: D.09
      Type:   Direct-Access                      ANSI SCSI revision: 02
    Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
    SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
    sda: Write Protect is off
      sda: sda4
    lp2 at 0x0278, (polling)




  Vous pouvez visualiser ces messages avec dmesg | more.  Vous pouvez
  sauvegarder les messages dans un fichier avec dmesg > dmesg.txt.
  C'est souvent utile lorsque vous essayez de mettre au point
  l'installation.

  Consultez galement le paragraphe ``Obtenir plus d'informations''


  44..22..  VVeerrssiioonn SSCCSSII eexxtteerrnnee

  Cette unit est dcrite 
  <http://www.iomega.com/product/zip/zipscsi.html>

  La version SCSI externe de l'unit ZIP possde deux connecteurs DB25F,
  et deux commutateurs de configuration.  L'un des commutateurs permet
  de choisir l'adresse de l'unit.  Ce choix est limit aux numros 5 et
  6.  L'autre permet, dans le cas de plusieurs units chanes, de
  mettre en fonction un circuit de charge interne, et alors, l'unit
  doit tre la dernire de la chane.  Les connecteurs 25 points SCSI
  sont cbls dans le style habituel du Macintosh.  L'unit est livre
  avec un cble de type Macintosh, mais vous pouvez obtenir facilement
  des cbles standards et des convertisseurs si vous utilisez un
  adaptateur hte ayant un connecteur Centronics ou haute densit.

  Je n'ai pas vu d'unit SCSI interne, mais je pense qu'elle doit avoir
  un connecteur standard 50 points DIP et les deux mmes commutateurs.

  Assurez-vous que l'adresse que vous choisissez pour votre unit
  n'entre pas en conflit avec d'autres priphriques SCSI que vous
  pouvez avoir sur le mme bus.  Assurez-vous galement que le circuit
  de charge de la dernire unit, dans le cas d'units chanes, est
  bien en fonction, ou qu'un circuit de charge externe est connect.

  Si vous avez une unit de disque interne SCSI  ou un lecteur de CD-
  ROM, et que vous connectez votre unit ZIP  l'adaptateur existant,
  vous devez regarder s'il n'y a pas  enlever une charge sur la carte.
  Uniquement les deux extrmits du bus SCSI doivent tre charges.  Si
  votre bus est en partie interne et en partie externe, il doit y avoir
  une charge sur le dernier priphrique interne et une sur le dernier
  priphrique externe, mais rien sur la carte adaptatrice elle-mme.


  Assurez-vous que les cbles sont solidement connects.

  La configuration du noyau est pratiquement la mme que pour la version
  interne. Consultez le paragraphe ci-dessous, sur la version SCSI
  Interne, pour avoir un exemple de configuration.


  44..22..11..  LL''aaddaappttaatteeuurr hhttee ZZIIPP ZZOOOOMM

  Iomega met sur le march un adaptateur hte SCSI sous le nom  ZIP
  Zoom.  Il est en ralit bas sur l'architecture de la famille
  d'adaptateurs AAddaapptteecc AAHHAA11552200.  Il possde un connecteur externe DB25F
  du type Macintosh, compatible avec le cble livr avec l'unit ZIP.

  Linux supporte cet adaptateur avec le pilote aahhaa115522xx.


  44..33..  VVeerrssiioonn SSCCSSII iinntteerrnnee



  Installer le matriel comme indiqu dans "Le Guide de Rfrence et
  d'Installation" en notant quels sont les SCSI ID, IRQ et adresse de
  port e/s doivent tre utiliss. (Vous aurez besoin de ces informations
  plus tard.) Les choses se passeront mieux si l'unit et la carte
  adaptatrice utilisent diffrents identificateurs SCSI (SCSI ID).

  AAvveerrttiisssseemmeenntt ::  La carte ZIP zoom est cble pour avoir un numro
  scsi ID 7. Le scsi id dans la ligne de commande ci-dessous concerne la
  carte et non l'unit. La carte et l'unit doivent avoir des numros
  scsi id diffrents. Par exemple, si la carte utilise le numro 7,
  utilisez le numro 5 ou un autre pour l'unit.

  Re-compiler le noyau aprs l'avoir reconfigur en y incluant le
  support de

  Dterminer  quoi doit ressembler votre ligne de commande :

   aha152x=[I/O Port][,IRQ][,SCSI ID][,RECONNECT][,PARITY]

  Par exemple :

    aha152x=0x140,10,7,1

  Si vous utilisez LILO ajouter votre ligne de commande au fichier
  lilo.conf avec la commande append.

  (ie. append = "aha152x=0x140,10,7,1")

  Si vous utilisez LOADLIN ajouter votre ligne de commande  la commande
  que vous utilisez pour lancer loadlin.


    (ie. loadlin c:\vmlinuz root=/dev/hda3 aha152x=0x140,10,5,1 ro)






  44..44..  LLee ppiilloottee IIMMMM ppoouurr llee ZZIIPP PPlluuss

  Cette unit est dcrite 
  <http://www.iomega.com/product/zip/zipplus.html>


  C'est une nnoouuvveellllee version de l'unit Zip externe. Le
   ZZiipp PPlluuss  n'utilise par le pilote ppa,  la place, il utilise le
  pilote  iimmmm .  Philippe Andersson a envoy cet excellent paragraphe
  sur le pilote imm driver pour le Zip Plus.  Merci Philippe.

  D'abord, recrez votre noyau en y incluant les points suivants :


    support des modules

    support SCSI

    support des disques SCSI

    lp en tant que module (si vous en avez besoin)

  Vous aurez not que nous n'avons pas slectionn de pilote SCSI de bas
  niveau.  C'est normal -- nous le crerons  part, ultrieurement.

  Puis, vous aurez besoin du code source du pilote, que vous trouverez
  sur le site de Dave Campbell
  (http://www.torque.net/~campbell/imm.tar.gz
  <http://www.torque.net/~campbell/imm.tar.gz>). La version 0.18 est la
  version en cours  la date de rdaction de ce document (Aot 98). Vous
  le dcompacterez et le dsarchiverez quelque part (sous /usr/src, par
  exemple). Puis vous lancerez simplement make. Vous obtiendrez alors le
  module dont vous avez besoin (imm.o). Copiez le dans

   /lib/modules/$(uname -r)/scsi



  Si le module lp est charg (vrifiez en utilisant llssmmoodd(1)),
  dchargez-le (rmmod lp), puis chargez imm.o (insmod imm) et, dans
  l'ensemble, tout est configur.

  Si l'unit ZIP n'tait pas connecte et sous tension  ce moment, vous
  aurez le message "init_module: Device or resource busy" (init_module :
  priphrique ou ressource occup), et le module ne sera pas charg. (
  ce propos, il semblerait que vous n'ayez pas besoin de mettre votre PC
  hors tension pour connecter l'unit ZIP -- assurez-vous simplement que
  le module n'est pas charg et que l'unit n'est pas sous tension, puis
  branchez-la, mettez l'unit sous tension et chargez le module.)

  Si l'unit ZIP est connecte et sous tension, mais qu'il n'y a pas de
  disque  l'intrieur, le module se chargera correctement, mais vous
  aurez un message disant qu'il est impossible de lire la table de
  partitions. Cela ne pose pas de problme puisque la table de
  partitions sera lue automatiquement lors de l'insertion du disque dans
  l'unit ZIP.

  S'il y a un disque dans l'unit ZIP, l'information complte sera alors
  affiche, y compris une liste des partitions dfinies sur le disque et
  l'tat de sa Protection en criture. Voici un exemple de message
  obtenu au moment du chargement :











  vger:~# insmod imm
  imm: Version 0.18
  imm: Probing port 03bc
  imm: Probing port 0378
  imm:     SPP port present
  imm:     ECP with a 16 byte FIFO present
  imm:     PS/2 bidirectional port present
  imm:     Passed Intel bug check.
  imm: Probing port 0278
  scsi0 : Iomega ZIP Plus drive
  scsi : 1 host.
    Vendor: IOMEGA    Model: ZIP 100 PLUS      Rev: J.66
    Type:   Direct-Access                      ANSI SCSI revision: 02
  Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
  SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
  sda: Write Protect is off
   sda: sda1
  vger:~#



  Une dernire remarque pour mentionner que cette version du pilote
  verrouille la porte de l'unit lorsque le disque est mont. Si l'on
  appuie sur le bouton d'jection dans cette situation, rien ne se
  passe, mais l'unit s'en "souvient" et jecte le disque ds que celui-
  ci est dmont.




  44..55..  VVeerrssiioonn AATTAAPPII

  Cette unit est dcrite 
  <http://www.iomega.com/product/zip/zipatapi.html>

  Une version IDE de l'unit a t produite pendant un certain temps.
  Je pense qu'elle a t remplace par la version ATAPI.

  Donald Stidwell a envoy les commentaires suivants sur la version
  ATAPI.  Merci Don.

  J'utilise une unit ATAPI Zip qui fonctionne avec les noyaux 2.0.32 et
  2.0.33. Je l'ai utilise avec les deux distributions RH 5.0 et
  OpenLinux 1.2 ( distribution que j'utilise actuellement ).  Pour la
  faire fonctionner sous OpenLinux, j'ai uniquement valid le support de
  disques souples ATAPI AATTAAPPII ffllooppppyy ssuuppppoorrtt dans le noyau.  OpenLinux
  n'a pas ce support compil dans le noyau par dfaut.

  Il n'y a pas besoin d'autre pilote.  L'unit sera monte comme
  partition tendue sur la partition 4.  I.E, dans mon cas elle est
  monte sur HDB4.  Je la monte sous /mnt/zip avec l'option noauto, bien
  que je suppose que cela ne cre aucun rel problme avec le montage
  automatique.  Je fais simplement attention pour jecter les disques.
  Je dmonte (n.d.t. au sens Unix !) toujours l'unit avant d'jecter
  une cartouche.

  Il y a des instructions plus dtailles concernant l'installation pour
  ATAPI dans le numro de Mai 1998 de la gazette Linux. Voir la section
  : le tuyau  2 sous.


    <url url="http://www.linuxgazette.com/issue28/lg_tips28.html#atapi">




  44..66..  VVeerrssiioonn IIDDEE


  Je n'ai pas utilis la version IDE. Eric Backus m'a envoy ces
  commentaires.  Merci Eric.

  J'ai utilis l'une d'entre elles.  Je l'ai eue avec mon ordinateur
  Gateway 2000 il y a un an.  Je pense que la plupart ont t livres
  par de grandes compagnies OEM telles que celle-ci, avant que la
  version ATAPI de l'unit ZIP ne soit disponible.

  La bonne nouvelle concernant cette unit : son support ne ncessite
  pas de modules du noyau ni de modifications.  Elle est vue par le
  noyau comme une unit de disque dur IDE. Pour moi, elle a fonctionn
  sans difficults avec les noyaux 2.0.31 and 2.0.32.

  La mauvaise nouvelle concernant cette unit : comme elle n'utilise pas
  l'interface ATAPI, vous ne pouvez pas utiliser la translation SCSI-
  vers-ATAPI, ce qui signifie que vous ne pouvez pas utiliser mtools
  pour protger les disques en criture (ou les jecter).




  44..77..  VVeerrssiioonn UUSSBB

  Cette unit est dcrite 
  <http://www.iomega.com/product/zip/imac.html>

  Ces units semblent trs bien ainsi que l'interface USB. Le seul
  problme rside dans le fait que l'interface USB pour Linux est encore
  en phase de dveloppement. Donc, pour l'instant, cette unit n'est pas
  utilisable sous Linux. Consultez cette adresse pour suivre la
  situation.

  <http://peloncho.fis.ucm.es/~inaky/USB/news.html>


  44..88..  VVeerrssiioonn ZZIIPP225500

  Cette unit est dcrite 
  <http://www.iomega.com/product/zip/zip250.html>

  C'est une unit nouvelle en Janvier. Je viens juste d'en acheter une
  et elle fonctionne parfaitement bien sous Linux. Il faut simplement
  utiliser le pilote IMM de <http://www.torque.net/~campbell/imm.tar.gz>
  Configurez le pilote de la mme faon que pour le ZIP plus. Pour
  l'essentiel, rcuprez le pilote, dcompressez-le et faites tourner
  make. Ensuite, copiez l'excutable imm.o dans le rpertoire des
  modules.  Par exemple, /lib/modules/2.0.35/scsi (2.0.35 tant la
  version du noyau.  Si vous n'tes pas sr de votre numro de version,
  faites uname -r.





  55..  UUttiilliissaattiioonn ddee ll''uunniitt ZZIIPP

  S'il contient tous les composants requis, le noyau devrait reconnatre
  votre adaptateur et votre unit au moment du dmarrage.  Si vous
  utilisez un module chargeable pour votre pilote, ce qui suit ne
  s'applique qu'une fois le module charg.

  Les versions SCSI et parallle de l'unit se comportent en grande
  partie de la mme faon, sauf que la version parallle est un peu plus
  lente.



  55..11..  FFddiisskk,, mmkkee22ffss,, mmoouunntt,, eettcc..

  Une fois que vous connaissez le nom de votre unit ZIP, vous tes
  prts.  Vous pouvez manipuler l'unit avec les commandes Linux
  normales de gestion des disques.  On utilise fdisk (ou ventuellement
  cfdisk) pour grer les tables de partition du disque.  On peut
  utiliser mke2fs pour formater une partition utilisant le systme de
  fichiers ext2 - le plus couramment utilis sous Linux. On utilise
  mount pour connecter (monter) une partition formate  la hirarchie
  des rpertoires.

  Vous devez tudier les pages de manuel concernant ces outils s'ils ne
  vous sont pas familiers.  Il y a maintenant plusieurs versions trs
  diffrentes du programme fdisk  - Faites attention.

  Je vais maintenant dcrire deux scnarios habituels.


  55..22..  UUnn ddiissqquuee ffoorrmmaatt DDOOSS eexxiissttaanntt

  Si vous avez un disque ZIP, cr  l'origine  l'aide des outils
  Iomega, ayant une structure de fichiers DOS, la vrification de la
  partition vous indiquera que le disque possde une partition,
  /dev/sda4.

  Vous devez crer un point de montage du disque, disons /zip, puis le
  monter en tant que systme de fichier MS-DOS :



              mkdir /zip
              mount -t vfat /dev/sda4 /zip




  Vous pouvez galement utiliser msdos au lieu de vfat. vfat supporte
  les noms de fichiers longs alors que msdos ne le fait pas.
  Maintenant, les fichiers du disque doivent apparatre dans le
  rpertoire /zip.  Tant que le disque sera mont, il vous sera
  impossible de l'enlever.  Quand vous en avez fini avec le disque, vous
  pouvez le dmonter pour le librer et l'enlever de la hirarchie des
  rpertoires.



              umount /zip




  Une fois que vous avez cr le point de montage /zip - vous n'avez
  plus  le refaire, et donc vous pouvez y revenir plus tard et y monter
  autre chose.



  55..33..  RRee--ffoorrmmaattaaggee eenn ttaanntt qquuee ddiissqquuee  LLiinnuuxx nnaattiiff


  Si vous voulez effacer un disque ZIP et crer dessus un systme de
  fichiers Linux natif, vous devrez utiliser fdisk pour la totalit du
  disque :



              fdisk /dev/sda




  puis supprimer toutes les partitions existantes (au moyen de la
  commande d ), crer une nouvelle partition avec la commande n, la
  dclarer partition primaire numro 1, utiliser w pour crire la table
  de partition sur le disque et enfin quitter fdisk avec la commande q.

  Formatage de la partition



              mke2fs /dev/sda1




  (Le 1 est le numro que vous avez donn  cette partition avec fdisk).
  Maintenant, vous pouvez monter le disque :



              mount -t ext2 /dev/sda1 /zip




  (en rutilisant le point de montage que vous avez cr prcdemment).


  55..44..  eennrreeggiissttrreemmeennttss ddaannss ffssttaabb

  Le fichier /etc/fstab permet de configurer la commande mount.
  J'aimerais tre capable de monter et d'crire sur le disque zip 
  partir de n'importe quel compte utilisateur du systme. J'ai ajout
  les 2 lignes suivantes  la fin du fichier fstab :


     /dev/sda1    /zip            ext2            noauto,rw,user,nosuid,sync
     /dev/sda4    /zipdos         vfat            noauto,rw,user,nosuid,sync,mode=0777




  Ces enregistrements supposent que vous avez les rpertoires /zip et
  /zipdos. Si vous voulez que tous les utilisateurs puissent lire et
  crire, n'oubliez pas de mettre les bonnes permissions.  Par exemple,
  cchhmmoodd 666666 //zziipp . Vous devez excuter la commande chmod en tant
  qu'utilisateur root.  Les entres fstab supposent galement que vous
  disques dos sont partitionns comme unit 4 (sda4 dans mon cas), et
  que les disques ext2(linux) sont partitionns comme unit 1 (sda1).
  Vous pouvez obtenir des informations complmentaires sur les options
  de fstab  l'aide de la commande mmaann mmoouunntt

  Avec les enregistrements fstab donns ci-dessus, vous pouvez monter un
  disque dos avec la commande   mmoouunntt //zziippddooss Si vous utilisez un disque
  linux ext2, alors, utilisez la commande
   mmoouunntt //zziipp


  55..55..  LLee ddiissqquuee ddeess oouuttiillss ZZIIPP


  Il y a du travail supplmentaire  accomplir si vous voulez utiliser
  le disque livr avec l'unit ZIP.  A la livraison, la protection en
  criture logicielle est active.  Mais plupart des gens dverrouillent
  le disque sous DOS avant d'essayer de l'utiliser sous Linux.  Linux ne
  peut pas accder  un disque verrouill, il doit tre dverrouill
  auparavant en utilisant les outils Iomega.

  Entre autres choses, on attend pour bientt un programme de gestion de
  la protection en criture crit pour Linux.



  66..  PPeerrffoorrmmaanncceess

  La version 0.26 du programme ppa.c est incluse dans les versions
  standards des noyaux 2.0.x. C'est un programme simple et trs fiable.
  Il a t trs utilis et s'est comport particulirement bien. Sa
  lenteur constitue le seul point ngatif concernant ce programme. Sur
  ma machine, j'ai la version 2.0.30 du noyau et 2 ports parallles.
  C'est une machine pentium 133 conomique - 16 meg de mmoire, un
  disque maxtor eide de 5 giga maxtor. La machine m'a cot 500 Dollars
  U.S. et l'unit ZIP 250. Je fais  l'conomie, mais c'est comme .

  J'avais l'unit ZIP sur le second port et l'imprimante sur le premier.
  Le second port consistait en une vieille carte d'extension, sans mode
  epp. Ce qui faisait fonctionner l'unit en mode 4 bits.

  Pour tablir une base de comparaison des performances, j'ai copi le
  fichier tar de netscape du disque dur vers l'unit ZIP. Ce fichier
  fait environ 10.6 meg.  La copie s'est effectue en 7 minutes 15
  secondes. Pour copier du ZIP vers le disque dur cela a dur 7 minutes
  pile. Pas vraiment un foudre de guerre.

  J'ai alors effectu deux modifications. En premier lieu, j'ai mis
  l'unit ZIP sur le premier port et activ le mode EPP dans le bios
  pour le premier port.  En mme temps, j'ai connect l'imprimante sur
  le second port.

  Deuxime modification, j'ai tl-charg la nouvelle version du
  programme de David Campbells page <http://www.torque.net/~campbell/>
  Puis je l'ai install. Consultez le fichier README qui est inclus.

  Alors, j'ai excut le mme test de copie, dans les deux sens, du
  fichier tar de Netscape sur l'unit ZIP. La copie vers le disque C a
  dur 1 minute 55 secondes et du disque dur vers l'unit ZIP, 1 minute
  tout juste. Temps a comparer aux 7'15" et 7'00" obtenus avec l'ancien
  programme.  C'tait une grosse amlioration par rapport au programme
  version  0.26.  Tout ceci ayant t effectu en utilisant l'unit ZIP
  avec un systme de fichiers de type.

  Ensuite, j'ai format un disque ZIP au format ext2. Puis, j'ai relanc
  les mmes tests.  La copie vers le disque dur n'a dur que 50
  secondes. La copie du disque dur vers l'unit ZIP seulement 40
  secondes.

   RRssuumm ddeess ppeerrffoorrmmaanncceess

  Pour ce test consistant  copier un fichier de 10.6 meg, le mode port
  standard 4 bits et le programme version 0.26 donne le rsultat le plus
  lent 7'00" et 7'15"

  Le nouveau programme (1.41) le mode EPP avec un systme de fichiers de
  type ext2 est le plus rapide  50 secondes and 40 secondes.
  77..  QQuueessttiioonnss ffrrqquueemmmmeenntt ppoosseess

  Voici quelques questions qui m'ont souvent t poses.  Merci de lire
  les rponses qui suivent avant de me les poser  nouveau !


  77..11..  ZZIIPP ??  PPuuiiss--jjee bbrraanncchheerr uunnee iimmpprriimmaannttee ddaannss llee ppoorrtt ppaarraallllllee
  dd''uunnee uunniitt

  Oui, mais.  Actuellement, vous ne pouvez pas avoir  la fois, les
  pilotes lp et ppa actifs sur le mme port parallle.  Un protocole de
  partage de ressources a t conu et son implmentation en est  ses
  dbuts, mais il ne sera pas disponibles avant la sortie de la version
  2.2.0 de Linux.

  Si vous aimez vivre  la pointe des choses, rcuprez le noyau version
  2.1.x et vous disposerez du partage des ports. Consultez

  <http://www.cyberelk.demon.co.uk/parport.html>

  L'utilisation de deux ports parallles constitue la meilleure solution
  avec un noyau 2.0.x. J'ai achet mon second port environ 15 dollars et
  il fonctionne parfaitement.  Vous pouvez en utiliser un pour
  l'impression et l'autre pour l'unit ZIP.  Vous avez juste  crer un
  noyau avec les pilotes lp et ppa en modules. J'utilise la nouvelle
  version (1.41) de ppa, et donc, je n'ai qu' charger en premier ppa
  (insmod ppa). Il dtecte alors l'unit ZIP sur le premier port. Puis
  je charge lp (insmod lp) et il affecte l'imprimante au second port.

  Si vous utilisez la version 0.26 du programme, utilisez la version
  1.41 ou une version plus rcente. Mettez votre programme  jour sera
  la seule rponse que vous obtiendrez  toutes les questions concernant
  ce pilote.


  77..22..  AAvveezz--vvoouuss pprrvvuu llee ssuuppppoorrtt ddeess ppoorrttss EEPPPP//EECCPP ddaannss PPPPAA ??


  La version 0.26 du programme ne supporte pas EPP. La version 1.41
  ssuuppppoorrttee EPP. Ce programme est galement beaucoup plus rapide.
  Regardez le paragraphe concernant les performances pour avoir plus de
  dtails.


  77..33..  PPuuiiss--jjee ffaaiirree ttoouurrnneerr LLiinnuuxx  ppaarrttiirr dd''uunnee uunniitt ZZIIPP ??

  Certains l'on fait. On peut penser que cela peut faire un grand disque
  de secours ou une mthode pour tester une installation.

  <http://metalab.unc.edu/LDP/HOWTO/mini/ZIP-Install.html>



  77..44..  PPuuiiss--jjee llaanncceerr llee ssyyssttmmee  ppaarrttiirr dd''uunnee uunniitt ZZIIPP ??

  Cela dpend de ce que vous utilisez comme adaptateur hte.  Si celui-
  ci possde une BIOS ROM dont le code puisse permette de dmarrer des
  units 5 ou 6, alors, oui, vous pouvez lancer le systme  partir de
  l'unit ZIP SCSI.  Il n'est pas possible de lancer le systme  partir
  d'une unit port parallle.

  Si vous avez DOS sur votre disque principal et que vous dsirez lancer
  le systme Linux d'un disque ZIP, vous pouvez le faire en utilisant le
  chargeur de lancement LOADLIN.  L'image de votre noyau doit tre
  quelque part sur votre disque  DOS, mais le reste du systme Linux
  peut rsider sur le ZIP.  Assurez-vous que le noyau contient les
  pilotes corrects.

  Pour autant que je le sache, il n'y a aucune disquette de lancement
  dans les distributions populaires qui contienne un pilote pour l'unit
  ZIP parallle.


  77..55..  PPoouurrqquuooii llee IIoommeeggaa uuttiilliissee llaa ppaarrttiittiioonn nnuummrroo 44 ??

  C'est l'une des questions les plus frquentes, mais je pense que
  personne ne dtienne de rponse dfinitive.  Peut-tre ont-ils la tte
  dans un lieu o le soleil ne brille pas. Peut-tre n'y a-t-il aucune
  raison.


  77..66..  CCoommmmeenntt ppuuiiss--jjee aavvooiirr llee ddiissqquuee mmoonntt aauu llaanncceemmeenntt ??

  Tout ce dont vous avez besoin, c'est d'ajouter une ligne  votre
  fichier /etc/fstab.  Par exemple, si vous voulez toujours avoir un
  disque DOS dans l'unit au lancement, vous pouvez mettre



              /dev/sda4   /zip  vfat  defaults  0 0




  dans le fichier fstab.  Selon votre distribution, les scripts
  d'initialisation peuvent essayer d'excuter fsck sur les partitions
  dont la liste est dans votre fichier fstab.  Rappelez-vous que cela
  peut vous causer des problmes si vous oubliez de mettre le disque
  dans l'unit au lancement ou si vous n'avez pas le bon disque en
  place.


  77..77..  QQuuee ssee ppaassssee--tt--iill ss''iill nn''yy aa ppaass ddee ddiissqquuee aauu llaanncceemmeenntt dduu
  ssyyssttmmee ??

  Le noyau va essayer de lire la table de partition, mais l'opration va
  chouer. Il n'y a pas  s'en faire. Une fois que vous aurez insr le
  bon disque et que vous essaierez de travailler avec, le noyau
  s'apercevra qu'il y a maintenant un disque et relira la table de
  partition.

  CONSEIL : quand vous changez les disques, c'est une bonne ide de
  toujours utiliser fdisk pour vrifier la structure de la partition sur
  le nouveau disque.

  Le BIOS, avec quelques adaptateurs htes SCSI, essaiera de lire la
  table de partition du disque pendant le lancement du systme.  Si vous
  ne pouvez pas dsactiver cette option, vous pouvez tre oblig de
  toujours lancer votre systme avec un disque dans l'unit.


  77..88..  PPuuiiss--jjee uuttiilliisseerr ll''uunniitt ppaarraallllllee ccoommmmee uunn vvrraaii ddiissqquuee SSCCSSII ??

  L'adaptateur parallle-vers-SCSI PPA-3 est ralis dans un simple
  circuit ASIC appel VPI0 par Iomega.  Il est intgr sur la carte
  contrleur de l'unit ZIP.  Il y a un vrai bus SCSI, mais il n'est pas
  utilisable.

  Bien que je n'ai pas essay de comparer les deux cartes, il semble
  logique que le VPI0 remplace les circuits lectriques tampons
  conventionnels qui seraient ncessaires si le bus SCSI tait tendu 
  l'extrieur de l'ensemble.
  77..99..  PPPPAA ppeeuutt--iill ttrree uuttiilliiss aavveecc llee ppoorrtt ppaarraallllllee ddeess uunniittss ddee
  bbaannddee ??

  Non.  Ces units sont des units de bandes souples. Il n'est pas
  question de SCSI.

  Plusieurs personnes ont manifest leur intrt dans l'application de
  mes mthodes pour essayer de dterminer le protocole et dvelopper un
  pilote pour ces units de bande.  La premire tape de ce processus
  consiste  trouver un pilote DOS qui fonctionne sous DOSemu.  Je n'ai
  pas entendu parler de quelqu'un qui aurait russi  le faire.


  77..1100..  PPPPAA ffoonnccttiioonnnneerraa--tt--iill aavveecc llee ppoorrtt ppaarraallllllee SSyyQQuueesstt EEZZ113355 ??

  Non. L'EZ135 est une unit IDE avec un convertisseur de port parallle
  ShuttlePort vers IDE intgr.

  Cependant un certain nombre de travaux ont t effectus sur ce
  pilote.  Consultez :

  <http://www.torque.net/linux-pp.html>



  88..  TTrroouuvveerr ll''iinnffoorrmmaattiioonn llaa pplluuss rrcceennttee

  On peut trouver les versions du programme (ppa.c) et les informations
  techniques sur le pilote les plus rcentes concernant l'unit ZIP port
  parallle 

  <http://www.torque.net/~campbell/>

  On peut trouver des informations sur de nombreux pilotes de
  priphriques externe utilisant un port parallle 

  <http://www.torque.net/linux-pp.html>

  L'information sur le partage du port parallle se trouve 

  <http://www.cyberelk.demon.co.uk/parport.html>

  Installation de Linux  partir d'une unit zip (pour les machines sans
  CD)

  <http://metalab.unc.edu/mdw/HOWTO/mini/Install-From-ZIP.html>

  On peut trouver un frontal X pour le programme ziptool 

  <http://www.scripps.edu/~jsmith/jazip/>

  On peut trouver l'information sur la configuration de Lilo 

  <http://metalab.unc.edu/mdw/HOWTO/mini/LILO.html>

  On peut trouver l'information sur l'utilisation des options de
  lancement 

  <http://metalab.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html>


  Si vous voulez installer le systme d'exploitation Linux sur un disque
  ZIP et que vous vouliez l'excuter  partir de l'unit ZIP

  <http://metalab.unc.edu/LDP/HOWTO/mini/ZIP-Install.html>

  Les pages web de Iomega sont 

  <http://www.iomega.com/>.

  Et si vous chercher de l'information gnrale concernant la
  programmation du port parallle du PC, vous pouvez visiter

  <http://www.lvr.com/parport.htm>


























































  Mini-HOWTO : installation de Linux sur un lecteur ZIP sur
  port parallle.
  John Higgins, jwiggins@comp.uark.edu
  Traduit par Franois Jeanmougin pingouin@crystal.u-
  strasbg.fr
  13,4 floral 2456.
  v0.7, 26 Janvier 1998 (version Franaise : 01 Fvrier 1998)

  Ce document n'est destin qu' ceux qui disposent d'un lecteur ZIP sur
  port parallle et qui veulent avoir un systme Linux portable ou de
  sauvegarde.
  ______________________________________________________________________

  Table des matires




















































  1. Mise en garde

  2. Introduction

     2.1 Nouveauts
     2.2 Conventions
     2.3 Mises  jour
     2.4 Autres lectures utiles
        2.4.1 Remerciements, contributeurs

  3. Prparation du disque ZIP (commune aux distributions Slackware et Red Hat)

     3.1 Partitionnement du disque ZIP
     3.2 Formater et monter le disque ZIP
     3.3 Crer une disquette de dmarrage (boot)
        3.3.1 Configurer et compiler le noyau
        3.3.2 Installer le noyau sur une disquette
           3.3.2.1 Installation via LILO
              3.3.2.1.1 Crer un systme de fichier ext2
              3.3.2.1.2 Copier les fichiers essentiels
           3.3.2.2 Installation du noyau seulement
              3.3.2.2.1 Localiser la racine et le swap sur la disquette

  4. Installation de la RedHat 4.2 Dans l'univers de l'informatique, tout ce qui a plus de 3 mois est considr comme obsolte et ncessite une mise  jour. Comme je n'aurai pas le temps de retoucher ce document  chaque mise  jour, je ferai de mon mieux pour le faire  chaque nouvelle version majeure. Comme pour les autres distributions,  moins que les auteurs dsirent envoyer des corrections, cel restera en l'tat.

     4.1 Ma configuration
     4.2 Installation des paquetages
        4.2.1 Quels paquetages installer?
           4.2.1.1 Mises  jour; errata
        4.2.2 Comment installer les paquetages en utilisant rpm; sans glint
        4.2.3 Lequel est arriv en premier, pamconfig ou pam?
     4.3 Problmes aprs l'installation des paquetages
        4.3.1 L'absence de ld.so.cache et libc.so.5
           4.3.1.1 /etc/ld.so.cache
           4.3.1.2 libc.so.5
        4.3.2 Configurer le mot de passe de root
        4.3.3 Ce que le programme d'installation a cr
        4.3.4 Configuration du rseau

  5. Installation pour la Slackware 2.2

     5.1 quipement ncessaire
     5.2 Installation
     5.3 Qu'y mettre ?

  6. Crer le fichier /etc/fstab (commun aux deux distributions.)

  7. Installation avec Debian 1.2

     7.1 Conditions requises
     7.2 Vue d'ensemble
     7.3 Cration du disque de secours modifi
        7.3.1 Utiliser
        7.3.2 Construction d'un noyau avec le support ZIP ppa
        7.3.3 Monter le disque de secours
        7.3.4 Copier l'image du noyau
        7.3.5 diter le script
        7.3.6 Lancer le script
     7.4 Installer le systme de base sur le disque ZIP
     7.5 Cration de la disquette de dmarrage
     7.6 Redmarrer le systme
     7.7 Configuration du systme de base et poursuite de l'installation
     7.8 Installation des modules que vous avez construits en

  8. pilogue

  ______________________________________________________________________

  11..  MMiissee eenn ggaarrddee

  NOTE : Je n'ai aucune ide si le lecteur IDE fonctionne de la mme
  manire que la version sur port parallle, puisque je n'en ai pas,
  donc merci de ne pas me le demander.


  La partie consacre  la Debian a juste t recopie avec pas ou peu
  de modification par l'auteur. En consquence, il peut y avoir des
  redondaces dans les instructions.

  Pr-requis :

    Vous avez un lecteur ZIP pour port parallle (comme le ZIP Plus a
     les deux, je pense qu'il va fonctionner aussi bien).

    Vous avez dj Linux install et qui marche ; nous n'allons pas
     parler d'une premire installation de Linux.

    Le pilote ppa du port parallle est prsent dans le noyau ou le
     module correspondant a t charg.

    Le disque ZIP est mont sur le rpertoire /iomega.


  22..  IInnttrroodduuccttiioonn

  Ce document est dcoup en quatres parties qui dcrivent chacune
  l'installation d'un systme Linux minimal sur un disque ZIP de 100Mo
  utilisant le lecteur ZIP sur port parallle. La premire partie dcrit
  comment prparer le disque ZIP, elle est commune aux distributions
  Slackware et Red Hat.  Les deuxime, troisime et quatrimes parties
  dcrivent respectivement l'installation des distributions RedHat 4.2,
  Slackware 2.2 et Debian 1.2 sur le disque ZIP.

  NOTE : J'ai bien vu que la Red Hat 5.0 tait enfin sortie, mais entre
  les cours et le travail, bref, disons que je ne pourrai pas travailler
  dessus avant la fin mai. J'espre pouvoir aussi tester les autres
  distributions.


  22..11..  NNoouuvveeaauuttss

  J'ai finalement trouv assez de temps (il faut dire que je prparais
  un concours de sociologie...) pour mettre  jour ce document. Merci 
  tous ceux qui m'ont envoy des commentaires.

  Nouveauts pour ce document

    La distribution Debian

    Lilo sur disquette

    Red Hat nouvelle version (4.2 Biltmore)

    Configuration rseau (non-test pour la Red Hat)


  22..22..  CCoonnvveennttiioonnss

  Le sigle ====>> indique que le texte qui suit est une commande.
  Ceci indique une remarque importante :


  ______________________________________________________________________
    NOTE:
  ______________________________________________________________________




  Ceci indique une "capture d'cran"


       ______________________________________________________________________
         Texte visible  l'cran
       ______________________________________________________________________





  22..33..  MMiisseess  jjoouurr

  Pour les mises  jour, aussi rares qu'elles puissent tre, consulter
  l'URL http://comp.uark.edu/~jwiggins/linuxZIP/



  22..44..  AAuuttrreess lleeccttuurreess uuttiilleess


    Installation-HOWTO

    SCSI-HOWTO

    NET-3-HOWTO (pour sa section 4.3.3)

    ZIP-Drive (mini-HOWTO)

    la patch noyau ParPort (permet d'accder au port imprimante)
     http://www.cyberelk.demon.co.uk/parport/

  22..44..11..  RReemmeerrcciieemmeennttss,, ccoonnttrriibbuutteeuurrss

  La section Slackware 2.2 m'a t confie par Michael Littlejohn
  mike@mesa7.mesa.colorado.edu


  La section Debian 1.2 m'a t confie par John D. Blair
  jdblair@uad.edu


  Les informations concernant LILO et beaucoup d'autres informations
  prcises m'ont t confies par Barcy Boese possum@niagara.com et
  Javier Rodriguez jrodriguez@nextgeninter.net.mx


  33..  PPrrppaarraattiioonn dduu ddiissqquuee ZZIIPP ((ccoommmmuunnee aauuxx ddiissttrriibbuuttiioonnss SSllaacckkwwaarree eett
  RReedd HHaatt))

  Avant de dmarrer, assurez-vous d'avoir accs au lecteur ZIP; soit en
  ayant le pilote ppa du port parallle dans le noyau ou en faisant
  charger le module correspondant. Un moyen facile de le vrifier est
  d'interroger dmesg :

  ====>> ddmmeessgg

  On peut rediriger la sortie vers less vu que dmesg a tendance  tre
  un peu long.  Voici un extrait du mien :
       ______________________________________________________________________
         scsi0 : PPA driver version 0.26 using 4-bit mode on port 0x3bc.
         scsi : 1 host.
           Vendor: IOMEGA    Model: ZIP 100           Rev: D.08
           Type:   Direct-Access                      ANSI SCSI revision: 02
         Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
         SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
          sda: Write Protect is off
          sda: sda1 sda2
       ______________________________________________________________________




  Si vous voyez seulement quelque-chose du genre :


       ______________________________________________________________________
                 scsi : 0 hosts.
                 scsi : detected total.
       ______________________________________________________________________




  Alors vous avez le support SCSI mais le lecteur ZIP n'a pas t
  dtect.


  33..11..  PPaarrttiittiioonnnneemmeenntt dduu ddiissqquuee ZZIIPP

  Pour partitionner le disque ZIP, lancer fdisk

  ====>> ffddiisskk //ddeevv//ssddaa

  Voici un aperu de la table de partition que j'ai faite :


       ______________________________________________________________________
               Disk /dev/sda: 64 heads, 32 sectors, 96 cylinders
               Units = cylinders of 2048 * 512 bytes

                  Device Boot   Begin    Start      End   Blocks   Id  System
               /dev/sda1            1        1       81    82928   83  Linux native
               /dev/sda2           82       82       96    15360   82  Linux swap
       ______________________________________________________________________




  J'ai dcid d'utiliser une partition de swap afin de pouvoir
  l'utiliser sur n'importe quelle machine (systme portable).


  33..22..  FFoorrmmaatteerr eett mmoonntteerr llee ddiissqquuee ZZIIPP

  Aprs avoir utilis fdisk, formater la nouvelle partition :

  ====>> mmkkee22ffss --cc //ddeevv//ssddaa11

  Ensuite, crer la partition de swap  (15360 blocs comme le montre
  fdisk)

  ====>> mmkksswwaapp --cc 1155336600 //ddeevv//ssddaa22


  Finalement, monter le disque ZIP

  ====>> mmoouunntt //ddeevv//ssddaa11 //iioommeeggaa --tt eexxtt22



  33..33..  CCrreerr uunnee ddiissqquueettttee ddee ddmmaarrrraaggee ((bboooott))

  tant donn que le lecteur ZIP sur port parallle n'est pas un vrai
  priphrique SCSI, ce n'est pas un priphrique bootable, et donc, il
  ncessite une disquette de dmarrage qui possde le pilote ppa dans le
  noyau et non sous forme de module.


  33..33..11..  CCoonnffiigguurreerr eett ccoommppiilleerr llee nnooyyaauu

  D'abord, il faut configurer et compiler un noyau qui a le pilote ppa
  du port parallle actif et pas comme un module chargeable.  Afin
  d'obtenir l'option port parallle, slectionner le support des
  priphriques SCSI :

   _S_C_S_I _s_u_p_p_o_r_t _(_C_O_N_F_I_G___S_C_S_I_) _[_Y_/_m_/_n_/_?_]

  Puis, le support des disques SCSI:

   _S_C_S_I _d_i_s_k _s_u_p_p_o_r_t _(_C_O_N_F_I_G___B_L_K___D_E_V___S_D_) _[_Y_/_m_/_n_/_?_]

  Et finalement, sous la rubrique des pilotes SCSI de bas niveau (SCSI
  low-level drivers), on trouve le pilote ppa pour port parallle.

   _I_O_M_E_G_A _P_a_r_a_l_l_e_l _P_o_r_t _Z_I_P _d_r_i_v_e _S_C_S_I _s_u_p_p_o_r_t _(_C_O_N_F_I_G___S_C_S_I___P_P_A_)
  _[_Y_/_m_/_n_/_?_]

  Encore une fois, il ne faut pas utiliser le pilote pour port parallle
  en module, mais bien inclus dans le noyau. Jusqu'ici, sans le patch
  noyau PortPar (voir 1.4), le pilote du port parallle ne permettra pas
  d'utiliser le port passif du lecteur ZIP pour une imprimante, donc il
  est alors prfrable de dsactiver le support pour imprimante sur port
  parallle :

  _P_a_r_a_l_l_e_l _p_r_i_n_t_e_r _s_u_p_p_o_r_t _(_C_O_N_F_I_G___P_R_I_N_T_E_R_) _[_N_/_y_/_m_/_?_]



       ______________________________________________________________________
         NOTE/ : Pour plus d'informations sur le pilote du port parallle,
                      prire de se reporter au ZIP-Drive mini-HOWTO.<newline>
       ______________________________________________________________________




  Une fois le noyau configur, le compiler ainsi :

  ====>> mmaakkee ddeepp;; mmaakkee cclleeaann;; mmaakkee zzIImmaaggee

  Le nouveau noyau devrait se trouver dans arch/i386/boot/zImage.


  33..33..22..  IInnssttaalllleerr llee nnooyyaauu ssuurr uunnee ddiissqquueettttee

  Aprs avoir du me coltiner 4 disquetes diffrentes, en raison de
  diffrents noyaux ncessitant diffrents paramtres, (ainsi qu'aprs
  avoir lu le magnifique e-mail m'expliquant comment le faire), j'ai
  inclus une section sur LILO comme tant un des moyens de crer un
  disque de dmarrage.
  33..33..22..11..  IInnssttaallllaattiioonn vviiaa LLIILLOO

  Pour ceux qui ont besoin, ou pour ceux que a intresserait, d'avoir
  plusieurs noyaux sur une disquette (ces derniers temps, les miens sont
  trop gros) ou qui veulent juste pouvoir passer des arguments (comme le
  mode utilisateur unique (single)), j'ai reu un email dtaillant
  comment installer LILO sur une disquette.


  33..33..22..11..11..  CCrreerr uunn ssyyssttmmee ddee ffiicchhiieerr eexxtt22

  Pour crer un systme de fichier ext2 sur une disquette, utiliser
  juste la mme commande que pour e disque ZIP

  ====>> mmkkee22ffss --tt //ddeevv//ffdd00


  33..33..22..11..22..  CCooppiieerr lleess ffiicchhiieerrss eesssseennttiieellss

  D'abord, s'assurer qu'il y ait un dossier cible pour le montage, et
  monter la disquette (j'utilise /dev/floppy) :

  ====>> mmoouunntt //ddeevv//ffdd00 //mmnntt//ffllooppppyy --tt eexxtt22

  Pour dmarrer correctement, vous avez besoin des mmes fichiers que
  ceux que LILO utilise sur votre installation de Linux actuelle.


       ______________________________________________________________________
       NOTE : Les chemins de fichiers donns ici sont ceux
                   de ma machine et peuvent ne pas tre les mmes pour tout
                   le monde
       ______________________________________________________________________




  ====>> ccpp //bboooott//bboooott..bb //mmnntt//ffllooppppyy

  ====>> ccpp //bboooott//mmaapp //mmnntt//ffllooppppyy

  ====>> ccpp //uussrr//ssrrcc//lliinnuuxx//aarrcchh//ii338866//bboooott//zzIImmaaggee //ddeevv//ffdd00
  //mmnntt//ffllooppppyy//vvmmlliinnuuzzDDEESSKK


  Maintenant, pour crer le fichier de configuration pour LILO,  ce
  point, j'ignore le programme liloconfig... (merci  Javier Rodriguez
  pour cette information). Premirement, crer le fichier de
  configuration de LILO, /mnt/floppy/lilo.conf, pour le(s) noyau(x) pour
  le lecteur ZIP. Voici ce que j'ai utilis et qui m'a permis d'avoir
  plusieurs noyaux  tester :















  ______________________________________________________________________
  boot=/dev/fd0
  map=/mnt/floppy/map
  install=/mnt/floppy/boot.b
  prompt
  compact
  timeout=50
  image=/mnt/floppy/vmlinuzLAP
     label=Laptop
     root=/dev/sda1
     read-only
  image=/mnt/floppy/vmlinuzDESK
     label=Desktop
     root=/dev/sda1
     read-only
  image=/mnt/floppy/vmlinuzDESK
     label=rescue
     root=/dev/hdc1
     read-only
  ______________________________________________________________________




  J'ai ainsi deux noyaux. Un pour mon portable 486 qui a besoin de
  l'mulation du co-processeur mathmatique dans le noyau, et l'autre
  pour mon ordinateur de bureau. Le "rescue" me permet de faire un
  dmarrage dde secours sur le disque dur.

  Enfin et surtout, lancer LILO pour l'installer sur la disquette grace
   la commande :

  ====>> lliilloo --CC //mmnntt//ffllooppppyy//lliilloo..ccoonnff

  Une fois LILO install sur la disquette, sauter les deux tapes
  suivantes, sauf si vous avez envie de tout recommencer :).


  33..33..22..22..  IInnssttaallllaattiioonn dduu nnooyyaauu sseeuulleemmeenntt




       ______________________________________________________________________
       NOTE : Ceci n'a rien  voir avec l'installation
              via LILO.
       ______________________________________________________________________





  Copier le nouveau noyau sur une disquette :

  ====>> ccpp aarrcchh//ii338866//bboooott//zzIImmaaggee //ddeevv//ffdd00

  ou

  ====>> ccaatt aarrcchh//ii338866//bboooott//zzIImmaaggee >> //ddeevv//ffdd00


  Bien sur, il existe plthore de manires de copier un noyau sur une
  disquette, mais la dernire, ma favorite, est un peu plus cryptique.
  Essayez de ne pas oublier le > sauf si vous adorez voir des fichiers
  binaires.

  33..33..22..22..11..  LLooccaalliisseerr llaa rraacciinnee eett llee sswwaapp ssuurr llaa ddiissqquueettttee



       ______________________________________________________________________
       NOTE : Ceci n'a rien  voir avec l'installation
              via LILO.
       ______________________________________________________________________




  Une fois que le noyau est sur la disquette, il faut dfinir le
  rpertoire racine comme tant sur le disque ZIP :

  ====>> rrddeevv //ddeevv//ffdd00 //ddeevv//ssddaa11

  Je ne suis pas sur que l'option suivante soit ncessaire, quoiqu'il en
  soit, je le fais. Pour dfinir le swap :

  ====>> rrddeevv --ss //ddeevv//ffdd00 //ddeevv//ssddaa22


  44..  DDaannss ll''uunniivveerrss ddee ll''iinnffoorrmmaattiiqquuee,, ttoouutt ccee qquuii aa pplluuss ddee 33 mmooiiss eesstt
  ccoonnssiiddrr ccoommmmee oobbssoollttee eett nncceessssiittee uunnee mmiissee  jjoouurr.. CCoommmmee jjee
  nn''aauurraaii ppaass llee tteemmppss ddee rreettoouucchheerr ccee ddooccuummeenntt  cchhaaqquuee mmiissee  jjoouurr,, jjee
  ffeerraaii ddee mmoonn mmiieeuuxx ppoouurr llee ffaaiirree  cchhaaqquuee nnoouuvveellllee vveerrssiioonn mmaajjeeuurree..
  CCoommmmee ppoouurr lleess aauuttrreess ddiissttrriibbuuttiioonnss,,  mmooiinnss qquuee lleess aauutteeuurrss ddssiirreenntt
  eennvvooyyeerr ddeess ccoorrrreeccttiioonnss,, cceell rreesstteerraa eenn ll''ttaatt..  IInnssttaallllaattiioonn ddee llaa
  RReeddHHaatt 44..22

  44..11..  MMaa ccoonnffiigguurraattiioonn

  Pour mon installation, j'ai utilis :

    noyau 2.0.30

    Lecteur ZIP Iomega sur port parallle

    RedHat 4.2


  44..22..  IInnssttaallllaattiioonn ddeess ppaaqquueettaaggeess

  La premire fois que j'ai tent d'installer la Red Hat sur un disque
  ZIP, j'ai pens qu'il aurait t plus simple de juste utiliser un
  disque de dmarrage (boot disk) de la Red Hat. Je me suis alors
  rveill. Je suis presque arriv  crer un disque de dmarrage, mais
  mme avec l'aide par e-mail de plusieurs personnes de chez Red Hat,
  j'ai commenc  renoncer  tout ce projet lorsque j'ai dcouvert
  l'option --root du rpm.


  44..22..11..  QQuueellss ppaaqquueettaaggeess iinnssttaalllleerr??

  J'ai trouv quels taient les paquetages ncessaires en compulsant un
  fichier que j'ai trouv sur un miroir RedHat. Ce fichier peut tre
  trouv sur n'importe quel miroir RedHat dans :


       redhat/redhat4.2/i386/RedHat/base/comps





  Pour cette installation, j'ai voulut inclure le support du rseau,
  mais,  cause de la La configuration du rseau sous X de la RedHat,
  j'ai du configurer  la main, ou plutot, tenter de configurer, les
  scripts qui se trouvent dans le /etc/sysconfig (cf section 4.3.3.).
  J'ai dcid de ne pas installer  de paquetage de dveloppement, car le
  lecteur ZIP, en tout cas avec un noyau non patch, est plutot lent
  pour compiler quoi que ce soit. J'ai aussi choisit de ne pas installer
  X, surtout pour des raisons d'espace disque disponible. Plus tard,
  j'essaierai de monter mon disque dur et de crer un lien symbolique
  avec /usr pour voir si j'arrive  faire fonctionner X.

  Voici une liste des paquetages que j'ai installs, dans l'ordre de
  leur installation. Ceux marqus d'une * ont t mis  jour suit  des
  errata de RedHat.  Entre parenthse, j'ai indiqu le numro du paquet
  de mise  jour.


       Par exemple NetKit-B-0.09-6 a t mis  jour par NetKit-B-0.99-8, et
                   apparait donc comme: *91) NetKit-B-0.99-6 (-8)















































  ______________________________________________________________________
          (Liste cre par la commande rpm --root /iomega -qa)

           1) setup-1.7-2                   2) pamconfig-0.51-2
           3) filesystem-1.3-1              4) MAKEDEV-2.2-9
           5) adduser-1.7-1                 6) libc-5.3.12-18
           7) SysVinit-2.64-8               8) ash-0.2-8
           9) at-2.9b-2                    10) libtermcap-2.0.8-4
          11) bash-1.14.7-1                12) bc-1.03-6
          13) bdflush-1.5-5                14) cpio-2.4.2-4
          15) cracklib-dicts-2.5-1         16) tmpwatch-1.2-1
          17) crontabs-1.5-1              *18) db-1.85-10 (-11)
          19) dev-2.5.1-1                  20) diffutils-2.7-5
          21) etcskel-1.3-1                22) file-3.22-5
          23) fileutils-3.16-1             24) findutils-4.1-11
          25) grep-2.0-5                   26) groff-1.10-8
         *27) ld.so-1.7.14-4 (-5)          28) getty_ps-2.0.7h-4
          29) gzip-1.2.4-7                 30) mingetty-0.9.4-3
         *31) initscripts-2.92-1 (93-1)    32) ed-0.2-5
          33) info-3.9-1                   34) ncurses-1.9.9e-4
          35) libg++-2.7.1.4-5            *36) pwdb-0.54-3 (-4)
          37) rootfiles-1.5-1             *38) pam-0.57-2 (-4)
          39) redhat-release-4.2-1         40) less-321-3
          41) mount-2.5l-2                 42) zlib-1.0.4-1
          43) rpm-2.3.11-1                 44) e2fsprogs-1.10-0
          45) sysklogd-1.3-15              46) tar-1.11.8-11
          47) passwd-0.50-7                48) gawk-3.0.2-1
          49) gdbm-1.7.3-8                 50) gpm-1.10-8
          51) hdparm-3.1-2                 52) kbd-0.91-9
          53) slang-0.99.37-2              54) newt-0.8-1
          55) kbdconfig-1.4-1              56) ncompress-4.2.4-7
         *57) sh-utils-1.16-4 (-5)         58) procinfo-0.9-1
         *59) logrotate-2.3-3 (4-1)        60) lilo-0.19-1
          61) losetup-2.5l-2               62) linuxthreads-0.5-1
         *63) mkinitrd-1.6-1 (7-1)         64) mailcap-1.0-3
         *65) man-1.4h-5 (j-1)             66) mt-st-0.4-2
          67) modules-2.0.0-5              68) mailx-5.5.kw-6
          69) net-tools-1.32.alpha-2       70) procmail-3.10-10
          71) procps-1.01-11               72) psmisc-11-4
          73) quota-1.55-4                 74) readline-2.0-10
          75) sed-2.05-6                   76) setconsole-1.0-1
          77) sendmail-8.8.5-4             78) shadow-utils-960530-6
          79) stat-1.5-5                   80) tcsh-6.06-10
          81) termcap-9.12.6-5             82) textutils-1.22-1
          83) time-1.7-1                   84) timeconfig-1.8-1
          85) util-linux-2.5-38            86) vim-4.5-2
          87) vixie-cron-3.0.1-14          88) which-1.0-5
          89) zoneinfo-96i-4               90) tcp_wrappers-7.5-1
         *91) NetKit-B-0.09-6 (-8)        *92) lpr-0.18-1 (19-1)
         *93) bind-4.9.5p1-2 (9.6-1)      *94) bind-utils-4.9.5p1-2 (9.6-1)
         *95) wu-ftpd-2.4.2b12-6 (b15-1)   96) anonftp-2.3-3
          97) zip-2.1-1                    98) unzip-5.12-5
          99) statserial-1.1-7            100) minicom-1.75-2
         101) lrzsz-0.12.14-1             102) dip-3.3.7o-9
         103) ppp-2.2.0f-3                104) portmap-4.0-3
         105) perl-5.003-8               *106) traceroute-1.0.4.4bsd-2 (1.4a5-1)
        *107) elm-2.4.25-7 (-8)           108) lynx-2.6-2
         109) ncftp-2.3.0-5               110) pine-3.95-2
         111) rdate-0.960923-1            112) apache-1.1.3-3
        *113) nfs-server-2.2beta16-7     *114) nfs-server-clients-2.2beta16-7
              (2.2beta16-8)                    (2.2beta16-8)
  ______________________________________________________________________




  Et avec tout a, j'ai encore 32Mo de libre!


  44..22..11..11..  MMiisseess  jjoouurr;; eerrrraattaa

  Comme beaucoup d'utilisateurs de la RedHat (j'espre) le savent,
  certains paquetages peuvent prsenter des trous de scurit ou quelque
  chose d'autre qui pose problme. Pour cette raison, RedHat diffuse des
  mises  jour pour certains paquetages. J'ai install ceux que j'ai
  signal comme mis  jour ci-dessus.  Veuillez vous rfrer  la page
  web RedHat qui concerne les mises  jour sur:
  http://www.redhat.com/support/docs/rhl/rh42-errata-general.html



       ______________________________________________________________________
          NOTE: avant les mises  jour de paquetages, il faut
                lancer ldconfig comme dcrit  la section 3.3.1.1.
       ______________________________________________________________________







  44..22..22..  CCoommmmeenntt iinnssttaalllleerr lleess ppaaqquueettaaggeess eenn uuttiilliissaanntt rrppmm;; ssaannss gglliinntt

  Avec rpm, utiliser l'option --root pour spcifier le dossier mont
  comme la racine pour l'installation. J'ai dcouvert que plusieurs
  paquetages ne pouvaient pas tre installs, en raison de scripts de
  prinstallation et/ou postinstallation qui ne s'excutaient pas
  correctement  cause du rpertoire racine diffrent. En consquence,
  utiliser l'option --noscript :

  ====>> rrppmm ----rroooott //iioommeeggaa --ii ----nnoossccrriippttss PPAAQQUUEETTAAGGEE..ii338866..rrppmm

  Comme, j'en suis sur, beaucoup vont le voir, vous devriez avoir une
  erreur du style :


       ______________________________________________________________________
         failed to open /iomega/var/lib/rpm/packages.rpm

         error: cannot open /iomega/var/lib/rpm/packages.rpm
       ______________________________________________________________________




  Bon, ben, il suffit de crer le rpertoire /var/lib/rpm

   ====>> mmkkddiirr //iioommeeggaa//vvaarr;; mmkkddiirr //iioommeeggaa//vvaarr//lliibb;; mmkkddiirr
  //iioommeeggaa//vvaarr//lliibb//rrppmm


  44..22..33..  LLeeqquueell eesstt aarrrriivv eenn pprreemmiieerr,, ppaammccoonnffiigg oouu ppaamm??

  Si quelqu'un a dj essay d'installer pamconfig, celui-ci se plaint
  de dpendre de pam; alors, si l'on essaie d'installer pam, celui-ci se
  plaint d'avoir besoin de pamconfig! Ceci tant une nouvelle version de
  l'histoire de la poule et de l'oeuf, m'a laiss perplexe quelques
  temps, mais grce  l'option --nodeps, on peut  forcer l'installation
  de pamconfig; en outre, pam a plus de dpendances en chec que
  pamconfig.

   ====>> rrppmm ----rroooott //iioommeeggaa --ii ----nnooddeeppss ----nnoossccrriippttss ppaammccoonnffiigg--00..5511--22


  44..33..  PPrroobbllmmeess aapprrss ll''iinnssttaallllaattiioonn ddeess ppaaqquueettaaggeess

  Une fois que le dernier paquetage a t parfaitement install,
  malheureusement, le disque n'est pas entirement fonctionnel, pour
  ainsi dire. Ce que je veux dire, c'est que, si vous essayez de
  dmarrer maintenant avec la disquette, vous n'irez pas trs loin. Ds
  qu'init essaie de dmarrer, vous aurez deux adorables petites erreurs;
  chacune se plaignant de quelques fichiers qui auraient t l si les
  scripts avaient t lancs.


  44..33..11..  LL''aabbsseennccee ddee lldd..ssoo..ccaacchhee eett lliibbcc..ssoo..55

  Si vous essayez de dmarrer, vous avez donc deux messages d'erreurs.
  Le premier concerne l'absence du fichier /etc/ld/so.cache. Le second
  rle  propos de libc.so.5.


  44..33..11..11..  //eettcc//lldd..ssoo..ccaacchhee

  Comme me l'ont signal pas mal de lecteurs, mes prcdentes
  instructions ne fonctionnaient pas comme prvu. Pour crer ce fichier,
  il faut lancer ldconfig lorsque le ZIP est encore mont.

   ====>> cchhrroooott //iioommeeggaa //ssbbiinn//llddccoonnffiigg

  Merci  Javier Rodriguez pour cette solution.


  44..33..11..22..  lliibbcc..ssoo..55

  Pour rsoudre le cas de l'absence de cette librairie, il faut crer un
  lien symbolique qui aurait du tre cr par les scripts
  d'installation.

   ====>> ccdd //iioommeeggaa//lliibb;; llnn --ss lliibbcc..ssoo..55..33..1122 lliibbcc..ssoo..55

  Merci  Darcy Boese pour cette solution.


  44..33..22..  CCoonnffiigguurreerr llee mmoott ddee ppaassssee ddee rroooott

  De mme qu'il a fallut lancer ldconfig en 4.3.1.1, il faudrait
  changer, crer le mot de passe de root pour ce nouveau systme :

   ====>> cchhrroooott //iioommeeggaa ppaasssswwdd rroooott


  44..33..33..  CCee qquuee llee pprrooggrraammmmee dd''iinnssttaallllaattiioonn aa ccrr



       ______________________________________________________________________
              NOTE: Ceci est just une configuration rapide, que je n'ai pas
              t capable de tester pour voir si elle marche. En thorie, elle
              devrait, mais ne venez pas pleurer si
              elle ne fonctionne pas.
       ______________________________________________________________________





  En parcourant mon CD Red Hat 4.2, je suis tomb sur quelque-chose de
  plutt intressant; le code source du programme d'installation. Je
  l'ai trouv dans /misc/src/install et une chose que j'ai trouv utile
  a t le fichier net.c. L-dedans, j'ai trouv quels autres fichiers
  devaient tre crs au lancement du programme d'installation.  La
  plupart participent au support du rseau (d'o le nom net.c) mais,
  mme si vous n'avez pas de carte rseau, vous pouvez avoir  utiliser
  le localhost en rseau (en plus, apache va rler s'il ne peut pas
  dterminer de hostname).  Ces fichiers comprennent :


             /etc/hosts
             /etc/HOSTNAME
             /etc/resolv.conf
             /etc/sysconfig/network
             /etc/sysconfig/network-scripts/ifcfg-eth0
             (ou tout autre priphrique rseau que vous auriez.)




  44..33..44..  CCoonnffiigguurraattiioonn dduu rrsseeaauu

  Pour rdiger ce document, il m'a fallut le support rseau pour ma
  carte fast-ethernet 3Com 3c595 (qui avait t utilise ces derniers
  mois sur une autre machine).

  D'abord, il me fallait un nom, et comme j'entretiens mon propre
  serveur de noms (ce qui est une autre et longue histoire), j'ai moi-
  mme donn le nom : _d_a_s_h_-_d_o_t_._w_i_g_._o_r_g (J'aime bien comme a sonne).
  Avoir un nom sans adresse IP est un peu vain, donc j'ai utilis un
  numro rseau rserv hors internet 192.168.10.0, que mon serveur de
  nom utilise aussi. Mme si le nom de machine est logiquement indiqu
  dans /etc/HOSTNAME, Red Hat cherche ce nom dans
  /etc/sysconfig/network; alors allons-y : Extrait de mon
  /etc/sysconfig/network  :


       ______________________________________________________________________
         NETWORKING=yes
         HOSTNAME=dash-dot
         DOMAINNAME=wig.org
         GATEWAY=
         GATEWAYDEV=eth0
         NS1=192.168.10.7
       ______________________________________________________________________




  Ensuite, simplement, il faut recopier la mme information, ici dans
  /etc/HOSTNAME, /etc/resolv.conf, et /etc/hosts:

  //eettcc//HHOOSSTTNNAAMMEE::



       ______________________________________________________________________
       dash-dot.wig.org
       ______________________________________________________________________






  //eettcc//rreessoollvv..ccoonnff::



       ______________________________________________________________________
       search wig.org
       nameserver ns.wig.org
       ______________________________________________________________________





  //eettcc//hhoossttss::



       ______________________________________________________________________
       127.0.0.1 localhost
       192.168.10.99 dash-dot.wig.org dash-dot
       192.168.10.7  ns.wig.org ns
       ______________________________________________________________________




  Red Hat configure tous les periphriques rseau  partir des scripts
  trouvs dans /etc/sysconfig/network-scripts. La configuration de
  chaque priphrique est habituellement cre une premire fois par le
  programme d'installation, j'ai donc du crer ces fichiers de config 
  la main. Ils commencent tous par ifcfg-XXX o XXX est l'interface
  rseau qu'ifconfig va activer; par exemple ppp0, eth0, etc. Dans cet
  exemple, j'ai du crer un fichier ifcfg-eth0 qui contient ceci :;


       ______________________________________________________________________
         DEVICE=eth0
         ONBOOT=yes
         BOOTPROTO=none
         BROADCAST=192.168.10.255
         NETWORK=192.168.10.0
         NETMASK=255.255.255.0
         IPADDR=192.168.10.99
       ______________________________________________________________________




  Et pour finir, afin que tout aille bien aprs a, tant que l'on est
  dans /etc/sysconfig/network-scripts, lancer juste :

   ====>> ..//iiffuupp iiffccffgg--eetthh00 bboooott

  Ceci va lancer le script qui configure l'interface rseau, si cette
  interface est configure pour tre lance au dmarrage.

  Pour plus d'informations, prire de se reporter au NET-3-HOWTO.



  55..  IInnssttaallllaattiioonn ppoouurr llaa SSllaacckkwwaarree 22..22





  ______________________________________________________________________
      NOTE : Cette partie n'a pas t mise  jour.
  ______________________________________________________________________




  55..11..  qquuiippeemmeenntt nncceessssaaiirree


    Disque et lecteur ZIP (videment)

    Noyau avec support ZIP

    ZIP HowTo (recommand)

    Une disquette formatte HD

    1  2 heures de votre temps

  55..22..  IInnssttaallllaattiioonn

  Bon, d'abord, le plus jouissif : dterminer quels sont les fichiers
  qui sont ncessaires pour le disque systme, et quels sont les
  paquetages que l'on veut (et que l'on peut) faire rentrer sur le
  disque ZIP.

  J'ai pens que le moyen le plus facile pour dmarrer tait d'installer
  directement la Slackware sur le lecteur ZIP.  J'ai pens  cette
  approche surtout parce que la Slackware est une distribution plus
  petite que la RedHat, et qu'il serait plus facile de supprimer ce que
  je ne voulais pas. Cela, et le fait que j'utilise de toute faon la
  distribution Slackware ont rendu ce choix logique.

  Installer la Slackware sur un disque ZIP est facile, en tant que root,
  lancer le programme setup, et choisir /iomega comme partition
  d'installation.  Configurer l'installation depuis la partition o se
  trouvent les sources de la Slackware (cdrom, disque dur, etc),
  slectionner 'install' et suivre les instructions.


  55..33..  QQuu''yy mmeettttrree ??


  La plus grosse difficult est de dcider ce que l'on doit ajouter et
  ce dont on peut se passer. Bien videmment, on a besoin de la srie
  'A' (qui fait a peu prs 8 Mo), le reste dpend de chacun.

  J'ai essay de ramener la Slackware  une taille raisonnable de 70 Mo,
  et cela inclut gcc/g++, perl, X11R6 (MAIS PAS TOUT!), sendmail, de la
  doc (moins les pages de man des outils de dveloppement, mais avec
  tous les howto), et un assortiment d'autres bonnes choses, ce qui
  laisse environ 10 Mo de libre pour les fichiers utilisateurs. YMMV
  (note du traducteur : hein???).  C'est selon votre choix.


  66..  CCrreerr llee ffiicchhiieerr //eettcc//ffssttaabb ((ccoommmmuunn aauuxx ddeeuuxx ddiissttrriibbuuttiioonnss..))

  La dernire chose que l'on doit faire avant de redmarrer est de crer
  le fichier fstab sur la partition qui va bientt devenir root. diter
  le fichier /iomega/etc/fstab qui devra au minimum ressembler  a:





         /dev/sda1      /         ext2        defaults   1   1
         /dev/sda2      none      swap        sw
         none           /proc     proc        defaults   1   1




  Sauver le fichier, et redmarrer  partir de la disquette frachement
  prpare, et amusez-vous bien!

  (Un grand merci  Mike pour m'avoir rappel ce point trs important et
  mme crucial. - John)


  77..  IInnssttaallllaattiioonn aavveecc DDeebbiiaann 11..22



       ______________________________________________________________________
       NOTE : l'auteur de cette section me l'a envoye le 11 juin 1997
       ______________________________________________________________________






  77..11..  CCoonnddiittiioonnss rreeqquuiisseess



    disque et lecteur ZIP pour port parallle.

    2 disquettes 1,44 M vierges

    un jeu complet de disquettes d'installation Debian (voir la doc
     d'installation Debian si vous ne savez pas comment les faire)

    2 ou 3 heures de libres


  77..22..  VVuuee dd''eennsseemmbbllee

  Aprs avoir pass quelques heures  me dbattre avec dpkg, j'ai dcid
  qu'il serait plus simple de modifier le disque de secours (_r_e_s_c_u_e
  _d_i_s_k) Debian pour qu'il reconnaisse le lecteur ZIP ppa. Cela s'est
  avr tre trs facile. Vous pouvez utiliser ce disque modifi pour
  effectuer l'installation de base normale du systme Debian. Une fois
  que vous avez install le systme de base vous pouvez utiliser une
  disquette de dmarrage pour dmarrer le nouveau systme de base et
  complter l'installation avec dselect. Pour utiliser cette technique,
  il faut construire deux noyaux - un avec le support ppa et disque
  mmoire initial, et un autre sans le support du disque mmoire.


  Si vous voulez, vous pouvez sauter toutes les tapes de la section 2
  et laisser la procdure d'installation de Debian formatter le disque
  ZIP pour vous.


  77..33..  CCrraattiioonn dduu ddiissqquuee ddee sseeccoouurrss mmooddiiffii

  Le disque de secours Debian est un disque de dmarrage de type
  SYSLINUX, qui utilise un formattage DOS et un lanceur (_b_o_o_t _l_o_a_d_e_r)
  spcial pour empcher le chargement de MS-DOS. Ce type de disque est
  trs facile  modifier pour fabriquer vos propres disques de dmarrage
  personnaliss. Le paquetage Debian ``boot-floppies'' contient un
  ensemble de scripts pour automatiser la cration de disques de
  dmarrage. Mais c'est tellement simple que j'ai prfr le faire  la
  main. C'est s'carter un peu de la philosophie Debian, mais je suis au
  dessus de a :). De brves instructions se trouvent dans le fichier
  'readme.txt' de la disquette de secours.


  77..33..11..  ddiissqquueettttee ddee sseeccoouurrss UUttiilliisseerr dddd  ((oouu RRAAWWRRIITTEE  ssoouuss DDOOSS)) ppoouurr
  ccrreerr llaa nnoouuvveellllee

  Consultez les docs d'installation de Debian si vous ne vous rappelez
  pas comment faire.


  77..33..22..  CCoonnssttrruuccttiioonn dd''uunn nnooyyaauu aavveecc llee ssuuppppoorrtt ZZIIPP ppppaa

  Construisez un nouveau noyau avec le support ZIP ppa (comme  l'tape
  3.3.1), mais slectionnez galement les supports ``RAM disk'' et
  ``initial RAM disk''. Vous devez aussi slectionner le support pour
  les systmes de fichiers msdos, fat, minix, ext2fs et procfs.


  Configurez galement les modules que vous voulez avoir dans votre
  installation finale sur le disque ZIP.


  Une fois la configuration du noyau effectue, compilez le avec :


   ====>> mmaakkee ddeepp;; mmaakkee cclleeaann

   ====>> mmaakkee bbzzIImmaaggee


  Compilez les modules avec :

   ====>> mmaakkee mmoodduulleess

  Vous les installerez plus tard.



       ______________________________________________________________________
       NOTE : soyez bien sur d'utiliser 'make bzImage' et pas 'make zImage'.
       ______________________________________________________________________





  77..33..33..  MMoonntteerr llee ddiissqquuee ddee sseeccoouurrss

   ====>> ffddmmoouunntt ffdd00

  ou

   ====>> mmoouunntt //ddeevv//ffdd00 //mmnntt

  ou

   ====>> qquuee ssaaiiss--jjee ::))




  77..33..44..  CCooppiieerr ll''iimmaaggee dduu nnooyyaauu

  Copiez l'image du noyau (sur les plateformes i386 c'est le fichier
  arch/i386/boot/bzImage) dans le fichier 'linux' de la disquette.


  77..33..55..  ddiitteerr llee ssccrriipptt ``rrddeevv..sshh''

  Ouvrez le script `rdev.sh' du disque de secours avec votre diteur
  favori. Remplacez la dernire ligne :



       rdev /mnt/linux /dev/ram0




  par



       rdev /mnt/linux /dev/sda1




  Il faudra aussi remplacer toutes les occurrences de /mnt/linux par le
  chemin appropri. Comme je monte mes disquettes sous /fd0, j'ai d
  changer /mnt/linux en /fd0/linux.


  77..33..66..  LLaanncceerr llee ssccrriipptt ``rrddeevv..sshh''  mmooddiiffii

   ====>> ..//rrddeevv..sshh


  77..44..  IInnssttaalllleerr llee ssyyssttmmee ddee bbaassee ssuurr llee ddiissqquuee ZZIIPP

  Dmarrez  partir du disque de secours. Si tout se passe bien vous
  retrouverez le processus d'installation  base de menu de la Debian,
  sauf qu'il sait maintenant que votre disque ZIP ppa existe. Effectuez
  l'installation normalement, comme s'il s'agissait d'un disque dur,
  mais montez /dev/sda1 comme racine et choisissez /dev/sda2 comme swap.


  Il y a une diffrence par rapport au processus d'installation standard
  -- n'installez pas et ne configurez pas de modules chargeables. Vous
  installerez les modules que vous avez compils  l'tape 7.3.2 plus
  tard.



  77..55..  CCrraattiioonn ddee llaa ddiissqquueettttee ddee ddmmaarrrraaggee

  Vous pouvez crer la disquette de dmarrage comme dcrit aux tapes
  3.3.1  3.3.2, ou, si vous prfrez, utiliser simplement l'option
  ``Create Boot Disk'' pendant l'installation Debian. J'aime bien la
  seconde possibilit car elle me permet d'avoir une autre disquette de
  dmarrage SYSLINUX dans laquelle je peux modifier le message de
  bienvenue pour dcrire la nature de ce disque de dmarrage
  personnalis et ajouter des paramtres noyau. Vous pouvez mme inclure
  des fichiers d'aide accessibles depuis les touches de fonctions. Vous
  pouvez galement recompiler le noyau et modifier  la main la
  disquette pour enlever le support RAM disk.  vous de voir.

  77..66..  RReeddmmaarrrreerr llee ssyyssttmmee

  Insrez votre disquette de dmarrage et choisissez l'option ``Reboot''
  du menu d'installation.


  77..77..  CCoonnffiigguurraattiioonn dduu ssyyssttmmee ddee bbaassee eett ppoouurrssuuiittee ddee ll''iinnssttaallllaattiioonn

  Quand le systme redmarre vous avez une installation de base Debian
  tout  fait utilisable (mais lente) depuis votre disque ZIP ppa.
  Continuez l'installation normalement. j'ai install tous les
  utilitaires UNIX classiques, avec les documentations, make, gcc, les
  bibliothques (_l_i_b_r_a_r_i_e_s), et divers utilitaires de manipulation de
  fichiers. Le rsultat est un systme de dmarrage de secours trs
  puissant que je peux utiliser pour ``secourir'' :-) n'importe lequel
  des systmes de mon dpartement qui aurait un gros problme.



       ______________________________________________________________________
       NOTE : vous devrez au moins installer ``make'' pour raliser l'tape suivante.
       ______________________________________________________________________





  77..88..  IInnssttaallllaattiioonn ddeess mmoodduulleess qquuee vvoouuss aavveezz ccoonnssttrruuiittss eenn````CCoonnssttrruucc
  ttiioonn dd''uunn nnooyyaauu aavveecc llee ssuuppppoorrtt ZZIIPP ppppaa''''

  Si vous avez install make  l'tape prcdente, vous devriez pouvoir
  monter la partition du disque dur qui contient votre noyau, aller dans
  le rpertoire appropri et lancer make modules_install. Par exemple :

   ====>> mmoouunntt //ddeevv//hhddaa22 //mmnntt

   ====>> ccdd //mmnntt//uussrr//ssrrcc//lliinnuuxx

   ====>> mmaakkee mmoodduulleess__iinnssttaallll



       ______________________________________________________________________
       NOTE : vous n'aurez pas  modifier le fichier /etc/fstab, comme expliqu 
       l'tape 5. Le processus d'installation Debian s'en est dj occup.
       ______________________________________________________________________




  88..  ppiilloogguuee

  Yahou, et snif. Aprs avoir entass 31 disques ZIP et un pack de
  batteries pour ZIP autonome, mon aventure suivante est de faire
  fonctionner le pcmcia sur mon transportable (NdT : Il faut bien que je
  m'amuse aussi).










  Zip Drive Mini-HOWTO
  Kyle Dansie, dansie@ibm.net
  v2.2, 26 Aot 1998

  Ce document constitue un guide de rfrence rapide pour configurer et
  utiliser l'unit Iomega ZIP avec Linux.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Site de rfrence de ce document

  2. Mise En Route Rapide

  3. L'unit ZIP

     3.1 Version Port Parallle
     3.2 Version SCSI externe
        3.2.1 L'adaptateur hte ZIP ZOOM
     3.3 Version SCSI interne
     3.4 Le pilote IMM pour le ZIP Plus - IMM driver
     3.5 Version ATAPI
     3.6 Version IDE

  4. Configuration d'un noyau pour l'unit ZIP

     4.1 Version SCSI
     4.2 Pilote PPA pour 1.2.13
     4.3 Le pilote PPA dans les noyaux actuels
     4.4 Paramtres de ligne de commande de PPA

  5. Utilisation de l'unit ZIP

     5.1 Identification de l'unit au dmarrage
     5.2 Fdisk, mke2fs, mount, etc.
     5.3 Un disque format DOS existant
     5.4 Re-formatage en tant que disque  Linux natif
     5.5 Le disque des outils ZIP

  6. Performances

  7. Questions frquemment poses

     7.1 Puis-je brancher une imprimante dans le port parallle d'une unit   ZIP ?
     7.2 Avez-vous prvu le support des ports EPP/ECP dans PPA ?
     7.3 Puis-je faire tourner Linux  partir d'une unit ZIP ?
     7.4 Puis-je lancer le systme  partir d'une unit ZIP ?
     7.5 Pourquoi le Iomega utilise la partition numro 4 ?
     7.6 Comment puis-je avoir le disque mont au lancement ?
     7.7 Que se passe-t-il s'il n'y a pas de disque au lancement du systme ?
     7.8 Puis-je utiliser l'unit parallle comme un vrai disque SCSI ?
     7.9 PPA peut-il tre utilis avec le port parallle des units de bande ?
     7.10 PPA fonctionnera-t-il avec le port parallle SyQuest EZ135 ?

  8. Trouver l'information la plus rcente



  ______________________________________________________________________




  11..  IInnttrroodduuccttiioonn

  Adaptation franaise : Albert-Paul Bouillot apb@club-internet.fr

  L'unit de disque amovible Iomega ZIP est rpandue et disponible en
  plusieurs versions.

    port parallle;

    SCSI;

    IDE - ATAPI;

    Plus.

     La version Port Parallle semble la plus populaire. Elle est
     disponible depuis un moment et bon march. La version SCSI existe
     aussi depuis un moment, mais elle ncessite une carte scsi que
     beaucoup ne possdent pas, et n'est donc pas aussi populaire. La
     version ATAPI semble maintenant plus disponible. La version Plus
     constitue la version la plus rcente de l'unit ZIP. Elle peut
     dtecter dans quel port elle est installe, scsi ou parallle. Ce
     document concernera la version Port Parallle, mais on y trouvera
     quelques conseils pour les autres versions.


  Ce document incorpore des informations collectes et publies par
  d'autres, et en particulier par :

    Grant Guenther, grant@torque.net

    Scot Wilcoxon, sewilco@fielday.mn.org

    Joe Mack, mack@ncifcrf.gov

    Byron Jeff, byron@cc.gatech.edu


  Je les remercie pour leurs importantes contributions, et assume la
  responsabilit des erreurs que j'ai pu introduire.

  Des remerciements spciaux vont  Grant Guenther qui a crit la
  version 0.26 du programme ppa ainsi que la version originale de cet
  HOWTO.  Si vous dcouvrez des erreurs ou des omissions dans ce
  document, merci de m'en avertir.  dansie@ibm.net


  11..11..  SSiittee ddee rrffrreennccee ddee ccee ddooccuummeenntt

  La version la plus rcente de ce document se trouve  :
  <http://www.njtcom.com/dansie/zip-drive.html>



  22..  MMiissee EEnn RRoouuttee RRaappiiddee

  Bon, vous avez achet une nouvelle unit zip et maintenant, vous
  voulez l'utiliser. Quelques distributions possdent dj les modules
  installs.  Pour les dbutants, vous pouvez essayer insmod ppa.
  (Assurez-vous que l'unit est connecte et qu'elle contient un
  disque).  Si le programme ppa n'est pas prsent, il vous faut alors
  configurer le noyau. Ma machine possde 2 ports parallles, un pour
  l'unit zip et l'autre pour l'imprimante. Cela rend les choses faciles
  : pas de permutations de cbles.


  Configuration du noyau :

    cd /usr/src/linux

    make xconfig

    scsi support = Y

    scsi disk support = Y

    mettre le support du Iomega zip en module

    mettre galement le support de l'imprimante en module

    sauver ces paramtres et quitter

    make dep

    make clean

    make zImage ou zlilo ou zdisk

    make modules

    make modules_install

  Maintenant, pour utiliser l'unit :

    charger le module : insmod ppa

    crer un point de montage : mkdir /zip

    insrer un disque de prformat de type windoze dans l'unit;

    monter le disque : mount -t vfat /dev/sda4 /zip

    utiliser les commandes habituelles pour les fichiers telles que
      l /zip, ls /zip, df, cp,

    Quand vous avez termin :  umount /zip

  Si vous avez des problmes dans l'une quelconque des tapes ci-dessus,
  consultez les paragraphes suivants pour obtenir des instructions plus
  dtailles.





  33..  LL''uunniitt ZZIIPP

  Il existe au moins cinq ou six versions de l'unit Iomega ZIP 100.
  Elles acceptent toutes des cartouches spciales qui ressemblent  des
  disques souples  3.5" qui peuvent contenir 100 megabytes de donnes.
  Les disques comportent, en fait, 96 cylindres de 2048 secteurs, chacun
  des secteurs stockant 512 bytes.  On devrait donc normalement parler
  de 96 Megabytes.

  L'unit externe est livre dans les types suivants :

    Port Parallle

    SCSI

    Plus

  L'unit interne, quant  elle, est disponible dans les types :

    SCSI

    IDE

    ATAPI

  Les versions internes peuvent tre installes dans des emplacements
  pour units 3.5 ou 5.25.  Les versions externes sont dans une petite
  bote bleue en plastique, dont l'alimentation se fait par un bloc
  mural externe.

  Toutes les units disposent d'un grand bouton poussoir en face avant.
  Il sert  jecter le disque.  Linux verrouille la porte pendant
  l'utilisation de l'unit, et si l'on pousse le bouton alors que la
  porte est bloque, l'unit ZIP s'en souvient et jecte le disque ds
  que le logiciel la dverrouille.


  33..11..  VVeerrssiioonn PPoorrtt PPaarraallllllee

  L'unit port parallle ZIP dispose de deux connecteurs DB25, le mle
  (DB25M) doit tre connect, avec le cble fourni, au port parallle de
  l'ordinateur.  L'autre (femelle, DB25F) est destin au branchement, en
  parallle, d'une imprimante.  Linux 2.0.x ne supporte pas actuellement
  l'utilisation simultane, et en parallle, d'une unit ZIP et d'une
  imprimante.  On peut contourner ce problme en utilisant les modules
  chargeables.  Il n'y a pas de commutateurs de configuration. Ceci
  devrait changer dans les versions futures. Consultez Linux Parallel
  Port Sharing Project <http://www.cyberelk.demon.co.uk/parport.html>
  pour avoir des informations complmentaires.


  Le pilote Linux est disponible en diffrentes versions. La version
  0.26 du programme ppa.c est la version standard des noyaux 2.0.x.
  Consultez

  David Campbell's page <http://www.torque.net/~campbell/> pour
  connatre la version la plus rcente de ce programme. Au moment de la
  rdaction de ce document, c'tait la 1.41.


  Le port parallle de l'unit ZIP est compatible avec plusieurs types
  de ports parallles, mais actuellement, la version 0.26 du pilote
  Linux ne supporte que le port Standard et bi-directionnel. Les
  versions les plus rcentes supportent EPP.  Si votre port parallle
  possde des commutateurs de configuration ( soit matriels soit par
  l'intermdiaire d'un cran de configuration CMOS ), assurez-vous de
  configurer le port pour qu'il fonctionne dans l'un des deux modes du
  programme 0.26.

  Assurez-vous que les cbles sont solidement connects.

  Consultez galement le paragraphe ``Obtenir plus d'informations''


  33..22..  VVeerrssiioonn SSCCSSII eexxtteerrnnee

  La version SCSI externe de l'unit ZIP possde deux connecteurs DB25F,
  et deux commutateurs de configuration.  L'un des commutateurs permet
  de choisir l'adresse de l'unit.  Ce choix est limit aux numros 5 et
  6.  L'autre permet, dans le cas de plusieurs units chanes, de
  mettre en fonction un circuit de charge interne, et alors, l'unit
  doit tre la dernire de la chane.  Les connecteurs 25 points SCSI
  sont cbls dans le style habituel du Macintosh.  L'unit est livre
  avec un cble de type Macintosh, mais vous pouvez obtenir facilement
  des cbles standards et des convertisseurs si vous utilisez un
  adaptateur hte ayant un connecteur Centronics ou haute densit.

  Je n'ai pas vu d'unit SCSI interne, mais je pense qu'elle doit avoir
  un connecteur standard 50 points DIP et les deux mmes commutateurs.

  Assurez-vous que l'adresse que vous choisissez pour votre unit
  n'entre pas en conflit avec d'autres priphriques SCSI que vous
  pouvez avoir sur le mme bus.  Assurez-vous galement que le circuit
  de charge de la dernire unit, dans le cas d'units chanes, est
  bien en fonction, ou qu'un circuit de charge externe est connect.

  Si vous avez une unit de disque interne SCSI  ou un lecteur de CD-
  ROM, et que vous connectez votre unit ZIP  l'adaptateur existant,
  vous devez regarder s'il n'y a pas  enlever une charge sur la carte.
  Uniquement les deux extrmits du bus SCSI doivent tre charges.  Si
  votre bus est en partie interne et en partie externe, il doit y avoir
  une charge sur le dernier priphrique interne et une sur le dernier
  priphrique externe, mais rien sur la carte adaptatrice elle-mme.

  Assurez-vous que les cbles sont solidement connects.


  33..22..11..  LL''aaddaappttaatteeuurr hhttee ZZIIPP ZZOOOOMM

  Iomega met sur le march un adaptateur hte SCSI sous le nom  ZIP
  Zoom.  Il est en ralit bas sur l'architecture de la famille
  d'adaptateurs AAddaapptteecc AAHHAA11552200.  Il possde un connecteur externe DB25F
  du type Macintosh, compatible avec le cble livr avec l'unit ZIP.

  Linux supporte cet adaptateur avec le pilote aahhaa115522xx.


  33..33..  VVeerrssiioonn SSCCSSII iinntteerrnnee



  Installer le matriel comme indiqu dans "Le Guide de Rfrence et
  d'Installation" en notant quels sont les SCSI ID, IRQ et adresse de
  port e/s doivent tre utiliss. (Vous aurez besoin de ces informations
  plus tard.) Les choses se passeront mieux si l'unit et la carte
  adaptatrice utilisent diffrents identificateurs SCSI (SCSI ID).

  Recompiler le noyau aprs l'avoir reconfigur en y incluant le support
  de

  Dterminer  quoi doit ressembler votre ligne de commande :

   aha152x=[I/O Port][,IRQ][,SCSI ID][,RECONNECT][,PARITY]

  Par exemple :

    aha152x=0x140,10,7,1

  Si vous utilisez LILO ajouter votre ligne de commande au fichier
  lilo.conf avec la commande append.

  (ie. append = "aha152x=0x140,10,7,1")

  Si vous utilisez LOADLIN ajouter votre ligne de commande  la commande
  que vous utilisez pour lancer loadlin.

  (ie. loadlin c:\vmlinuz root=/dev/hda3 aha152x=0x140,10,5,1 ro)


  33..44..  LLee ppiilloottee IIMMMM ppoouurr llee ZZIIPP PPlluuss -- IIMMMM ddrriivveerr

  C'est une nnoouuvveellllee version de l'unit Zip externe. Le
   ZZiipp PPlluuss  n'utilise par le pilote ppa,  la place, il utilise le
  pilote  iimmmm .  Philippe Andersson a envoy cet excellent paragraphe
  sur le pilote imm driver pour le Zip Plus.  Merci Philippe.



  Attention : le dveloppement de ce pilote en est encore  la phase
  alpha, ce qui signifie que 1./ vous ne le trouverez pas dans
  l'ensemble normal des fichiers sources du noyau (vous ne pourrez pas
  non plus le slectionner avec make config et ses amis, naturellement)
  et 2./ il peut ne pas fonctionner dans votre configuration spcifique.
  Malgr cela, ne vous effrayez pas -- continuer simplement et essayez-
  le.

  D'abord, recrez votre noyau en y incluant les points suivants :


    support des modules

    support SCSI

    support des disques SCSI

    lp en tant que module (si vous en avez besoin)

  Vous aurez not que nous n'avons pas slectionn de pilote SCSI de bas
  niveau.  C'est normal -- nous le crerons  part, ultrieurement.

  Puis, vous aurez besoin du code source du pilote, que vous trouverez
  sur le site de Dave Campbell
  (http://www.torque.net/~campbell/imm.tar.gz
  <http://www.torque.net/~campbell/imm.tar.gz>). La version 0.17 est la
  version en cours  la date de rdaction de ce document (Aot 98). Vous
  le dcompacterez et le dsarchiverez quelque part (sous /usr/src, par
  exemple). Puis vous lancerez simplement make. Vous obtiendrez alors le
  module dont vous avez besoin (imm.o). Copiez le dans
  /lib/modules/$(uname -r)/scsi.

  Si le module lp est charg (vrifiez en utilisant llssmmoodd(1)),
  dchargez-le (rmmod lp), puis chargez imm.o (insmod imm) et, dans
  l'ensemble, tout est configur.

  Si l'unit ZIP n'tait pas connecte et sous tension  ce moment, vous
  aurez le message "init_module: Device or resource busy" (init_module :
  priphrique ou ressource occup), et le module ne sera pas charg. (
  ce propos, il semblerait que vous n'ayez pas besoin de mettre votre PC
  hors tension pour connecter l'unit ZIP -- assurez-vous simplement que
  le module n'est pas charg et que l'unit n'est pas sous tension, puis
  branchez-la, mettez l'unit sous tension et chargez le module.)

  Si l'unit ZIP est connecte et sous tension, mais qu'il n'y a pas de
  disque  l'intrieur, le module se chargera correctement, mais vous
  aurez un message disant qu'il est impossible de lire la table de
  partitions. Cela ne pose pas de problme puisque la table de
  partitions sera lue automatiquement lors de l'insertion du disque dans
  l'unit ZIP.

  S'il y a un disque dans l'unit ZIP, l'information complte sera alors
  affiche, y compris une liste des partitions dfinies sur le disque et
  l'tat de sa Protection en criture. Voici un exemple de message
  obtenu au moment du chargement :


  vger:~# insmod imm
  imm: Version 0.17
  imm: Probing port 03bc
  imm: Probing port 0378
  imm:     SPP port present
  imm:     ECP with a 16 byte FIFO present
  imm:     PS/2 bidirectional port present
  imm:     Passed Intel bug check.
  imm: Probing port 0278
  scsi0 : Iomega ZIP Plus drive
  scsi : 1 host.
    Vendor: IOMEGA    Model: ZIP 100 PLUS      Rev: J.66
    Type:   Direct-Access                      ANSI SCSI revision: 02
  Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
  SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
  sda: Write Protect is off
   sda: sda1
  vger:~#



  Une dernire remarque pour mentionner que cette version du pilote
  verrouille la porte de l'unit lorsque le disque est mont. Si l'on
  appuie sur le bouton d'jection dans cette situation, rien ne se
  passe, mais l'unit s'en "souvient" et jecte le disque ds que celui-
  ci est dmont.




  33..55..  VVeerrssiioonn AATTAAPPII

  Une version IDE de l'unit a t produite pendant un certain temps.
  Je pense qu'elle a t remplace par la version ATAPI.

  Donald Stidwell a envoy les commentaires suivants sur la version
  ATAPI.  Merci Don.

  J'utilise une unit ATAPI Zip qui fonctionne avec les noyaux 2.0.32 et
  2.0.33. Je l'ai utilise avec les deux distributions RH 5.0 et
  OpenLinux 1.2 ( distribution que j'utilise actuellement ).  Pour la
  faire fonctionner sous OpenLinux, j'ai uniquement valid le support de
  disques souples ATAPI dans le noyau.  OpenLinux n'a pas ce support
  compil dans le noyau par dfaut.

  Il n'y a pas besoin d'autre pilote.  L'unit sera monte comme
  partition tendue sur la partition 4.  I.E, dans mon cas elle est
  monte sur HDB4.  Je la monte sous /mnt/zip avec l'option noauto, bien
  que je suppose que cela ne cre aucun rel problme avec le montage
  automatique.  Je fais simplement attention pour jecter les disques.
  Je dmonte (n.d.t. au sens Unix !) toujours l'unit avant d'jecter
  une cartouche.

  Il y a des instructions plus dtailles concernant l'installation pour
  ATAPI dans le numro de Mai 1998 de la gazette Linux. Voir la section
  : le tuyau  2 sous.

  <http://www.linuxgazette.com/issue28/lg_tips28.html#atapi>


  33..66..  VVeerrssiioonn IIDDEE


  Je n'ai pas utilis la version IDE. Eric Backus m'a envoy ces
  commentaires.  Merci Eric.

  J'ai utilis l'une d'entre elles.  Je l'ai eue avec mon ordinateur
  Gateway 2000 il y a un an.  Je pense que la plupart ont t livres
  par de grandes compagnies OEM telles que celle-ci, avant que la
  version ATAPI de l'unit ZIP ne soit disponible.

  La bonne nouvelle concernant cette unit : son support ne ncessite
  pas de modules du noyau ni de modifications.  Elle est vue par le
  noyau comme une unit de disque dur IDE. Pour moi, elle a fonctionn
  sans difficults avec les noyaux 2.0.31 and 2.0.32.

  La mauvaise nouvelle concernant cette unit : comme elle n'utilise pas
  l'interface ATAPI, vous ne pouvez pas utiliser la translation SCSI-
  vers-ATAPI, ce qui signifie que vous ne pouvez pas utiliser mtools
  pour protger les disques en criture (ou les jecter).



  44..  CCoonnffiigguurraattiioonn dd''uunn nnooyyaauu ppoouurr ll''uunniitt ZZIIPP

  Pour utiliser l'unit ZIP avec Linux, vous devez avoir un noyau
  configur pour le support du systme SCSI, le support des disques
  SCSI, et le support de l'adaptateur hte que vous utilisez.  Si la
  cration d'un noyau ne vous est pas familire, vous devriez lire :

  Linux Kernel HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Kernel-
  HOWTO.html> pour information.

  Vous devez commencer le processus de cration du noyau par une tape
  de configuration. L, vous identifiez les composants spcifiques du
  noyau dont vous avez besoin. Premire tape  cd /usr/src/linux. Il y a
  plusieurs manires de raliser effectivement la configuration. Sous X
  window, j'utilise make xconfig. Il y a aussi make menuconfig ou make
  config en mode ligne de commande. La manire la plus simple est
  d'utiliser xconfig.

  Dans la section SSCCSSII SSuuppppoorrtt slectionnez SSCCSSII ssuuppppoorrtt == YY.
  Slectionnez galement SSCCSSII ddiisskk ssuuppppoorrtt == YY.

  Dans la section SSCCSSII llooww--lleevveell ddrriivveerrss vous slectionnerez IIOOMMEEGGAA
  PPaarraalllleell PPoorrtt ZZIIPP ddrriivvee SSCCSSII ssuuppppoorrtt == MM. La lettre M signifie :
  modules.

  Dans la section CChhaarraacctteerr DDeevviicceess cherchez et slectionnez PPaarraalllleellll
  PPrriinntteerr ssuuppppoorrtt == MM

  Si vous avez quelques doutes concernants l'un de ces points, utilisez
  zdisk pour l'tape de cration. Cela crera et installera le noyau sur
  une disquette. Comme cela, si vous cafouillez un peu, vous aurez
  encore un systme en bon tat, capable de dmarrer, sur le disque dur.

  Maintenant, avec les tapes suivantes, crez le noyau :

    make dep

    make clean

    make zImage ou zlilo ou zdisk

    make modules

    make modules_install

  ccoonnsseeiill si vous voulez crer un journal des messages de l'tape de
  cration de zImage, vous pouvez utiliser


     make zImage 2>&1 | tee zImage.out





  C'est vraiment une trs bonne chose de le faire, car, si vous avez des
  erreurs de compilation ou d'autres conflits dans la configuration,
  vous aurez alors un fichier contenant les messages d'erreur ou les
  erreurs de compilation. En cas de demande d'aide, cela facilite les
  choses.

  Il vous faut aussi charger les modules quelque part. Sur mon systme,
  j'ai simplement ajout une paire de lignes dans le fichier boot.local.

    insmod ppa

    insmod lp

     J'utilise le systme Suse 5.0 et ce fichier se trouve dans
     /etc/rc.d.  La localisation de ce fichier change selon les
     distributions, mais il y a un fichier, quelque part, pour mettre
     les modifications locales  faire au moment du dmarrage. Vous
     devez utiliser le fichier de votre distribution qui est destin 
     cela.

  Maintenant arrt et redmarrage.

  Vous pouvez galement crer des modules pour tout ou partie du systme
  SCSI.  Si vous le faites, assurez vous de charger scsi.o, puis sd.o et
  finalement le pilote de votre adaptateur hte avant d'essayer
  d'accder  l'unit ZIP.


  44..11..  VVeerrssiioonn SSCCSSII


  Si vous avez dj un disque SCSI dans votre systme et que vous
  connectiez l'unit ZIP sur le mme contrleur, il n'y a pas de
  configuration supplmentaire  raliser au niveau du noyau.
  Autrement, vous avez intrt  crer un nouveau noyau.

  Si vous crez un noyau pour supporter la version SCSI de l'unit ZIP,
  vous devrez slectionner le support SCSI et le support de disque SCSI.
  Vous devez galement slectionner un pilote pour la carte d'interface
  que vous utiliserez. Si vous possdez un ZIP Zoom, choisissez le
  pilote aha152x.

  Lisez bien la documentation concernant votre adaptateur dans le SCSI
  HOWTO ainsi que les fichiers README dans le sous-rpertoire
  drivers/scsi de l'arborescence des sources de Linux.  Faites attention
  aux paramtres de la ligne de commande que vous pourriez avoir 
  utiliser pour faciliter l'initialisation de votre adaptateur par le
  noyau.

  Par exemple, si vous utilisez la carte ZIP Zoom, vous devrez ajouter
  quelque chose comme :



                 aha152x=0x340,11,7,1





   la commande de dmarrage (ou de l'inclure dans votre fichier
  /etc/lilo.conf dans une clause append).  Cette ligne indique l'adresse
  du port et l'IRQ de votre carte ZIP Zoom - assurez-vous que ces
  chiffres correspondent  la faon dont la carte est configure.

  Vous devriez galement lire le

  BOOTPROMPT HOWTO <http://sunsite.unc.edu/mdw/HOWTO/BootPrompt-
  HOWTO.html>

  de Paul Gortmaker pour avoir des informations concernant la
  configuration du noyau avec LILO ou LOADLIN.


  44..22..  PPiilloottee PPPPAA ppoouurr 11..22..1133


  Le noyau 2.0.x a t diffus depuis longtemps maintenant. Si vous
  utilisez encore la version 1.2.13 ou quelque chose de plus vieux que
  2.0.x
   SS''iill vvoouuss ppllaatt,, ffaaiitteess uunnee mmiisseess  jjoouurr. Je ne rpondrai pas aux
  questions concernant ces vieilles versions et je doute que l'un des
  dveloppeurs ne le fasse.


  44..33..  LLee ppiilloottee PPPPAA ddaannss lleess nnooyyaauuxx aaccttuueellss

  Depuis la version 1.3.74 le pilote ppa constitue un composant standard
  du noyau.  Il y a eu des modifications dans d'autres parties du noyau,
  vers la version 1.3.78 qui ont ncessit une rvision intermdiaire,
  mais depuis la version 1.3.85 le pilote est rest tout  fait stable 
  la version 0.26.  Depuis que le gel de la version 2.0 de Linux est
  maintenant effective, je m'attends  ce que cette version 0.26 soit
  dans le prochain noyau stable.

  Pour crer un noyau assurant le support de ppa, il faut inclure le
  support SCSI, le support de disque SCSI et slectionner le support de
  Iomega ZIP / PPA-3  partir d'une liste d'adaptateurs SCSI de bas
  niveau.  Vous pouvez galement crer le pilote en tant que module
  chargeable.

  Pour ajuster le pilote, vous pouvez utiliser les paramtres de ligne
  de commande de /etc/lilo.conf ou de insmod.   Tout ceci est document
  dans drivers/scsi/README.ppa, situ dans l'arborescence des sources du
  noyau.  J'en ai mis un rsum dans le paragraphe suivant.

  Si vous voulez utiliser  la fois les pilotes lp et ppa sur le mme
  port parallle, vous devez crer les deux en tant que modules
  chargeables et charger l'un ou l'autre  un moment donn, mais pas les
  deux en mme temps.

  Les caractristiques des modules chargeables de Linux deviennent plus
  puissantes et galement plus complexes chaque jour.  Comme point de
  dpart vous devriez lire le fichier Documentation/modules.txt dans
  l'arborescence des sources du noyau.


  44..44..  PPaarraammttrreess ddee lliiggnnee ddee ccoommmmaannddee ddee PPPPAA

  Si ppa est prsent dans votre noyau, vous pouvez ajuster ses
  paramtres  partir de la ligne de commande de LILO ou de LOADLIN en
  utilisant la syntaxe suivante :




         ppa=base[,speed_high[,speed_low[,nybble]]]




  O base est l'adresse d' e/s de votre port parallle, speed_high est
  une constante de temporisation pour certaines boucles rapides du
  pilote, speed_low est un paramtre de temporisation similaire pour
  quelques boucles plus lentes et nybble est un drapeau pour forcer le
  pilote  utiliser le mode 4-bit, ou mode nybble, mme s'il veut faire
  autrement.

  Par exemple, les paramtres par dfaut pourraient tre spcifis par :



              ppa=0x378,1,6,0





  55..  UUttiilliissaattiioonn ddee ll''uunniitt ZZIIPP

  S'il contient tous les composants requis, le noyau devrait reconnatre
  votre adaptateur et votre unit au moment du dmarrage.  Si vous
  utilisez un module chargeable pour votre pilote, ce qui suit ne
  s'applique qu'une fois le module charg.

  Les versions SCSI et parallle de l'unit se comportent en grande
  partie de la mme faon, sauf que la version parallle est un peu plus
  lente.


  55..11..  IIddeennttiiffiiccaattiioonn ddee ll''uunniitt aauu ddmmaarrrraaggee

  Quand votre systme dmarre, il doit afficher un certain nombre
  d'informations concernant votre adaptateur, votre unit, et le disque
  se trouvant dans l'unit.  Si vous n'avez pas de disque dans l'unit,
  une partie des informations fera dfaut et n'apparatra que lorsque
  vous insrerez un disque et qu'ensuite vous y ferez rfrence
  (tenterez d'y accder).  On conseille aux utilisateurs dbutants de
  dmarrer leur systme avec un disque dans l'unit - Comme cela, les
  choses sont moins droutantes !

  L'endroit d'apparition de ces messages dpend de la configuration de
  votre systme.  Il seront souvent affichs sur la console systme,
  mais ils peuvent tre redirigs dans un fichier journal tel que
  /var/adm/messages.  Si vous n'arrivez pas  le trouver, d'habitude,
  vous pouvez retrouver les deux derniers crans de messages du noyau
  avec la commande dmesg.

  Si vous avez besoin de demander de l'aide  quelqu'un en quoi que ce
  soit, une copie de l'enregistrement de cette information est capitale.
  Essayer d'envoyer, avec votre rapport d'erreur, autant
  d'enregistrements de messages pertinents que vous pouvez.

  Voici un exemple de ce  quoi peut ressembler un enregistrement des
  messages du noyau :







         scsi0 : PPA driver version 0.26 using 8-bit mode on port 0x378.
         scsi : 1 host.
         Vendor: IOMEGA    Model: ZIP 100           Rev: N*32
         Type:   Direct-Access                      ANSI SCSI revision: 02
         Detected scsi disk sda at scsi0, channel 0, id 6, lun 0
         scsi : detected 1 SCSI disk total.
         SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
         sda: Write Protect is off
         Partition check: sda: sda1




  Cette sortie provient d'un systme 1.3.87 ayant une unit ZIP
  parallle.  La nature exacte de la sortie varie en fonction de votre
  adaptateur hte et de la prsence ou non d'autres units SCSI dans
  votre systme.

  La premire ligne affiche le message d'initialisation du pilote de bas
  niveau de l'adaptateur hte, dans ce cas PPPPAA. Ensuite, on trouve les
  informations d'identification renvoyes par chaque unit trouve sur
  le bus SCSI. La ligne 5 affiche le nom d'unit affect  l'unit, ici
  /dev/sda.  Enfin, la dernire ligne donne le rsultat du test de la
  partition du disque qui est dans l'unit.  Celui-ci possde une
  partition, /dev/sda1.  Ces rapports proviennent de diffrents modules
  du noyau. Si vous avez plus d'un adaptateur SCSI, ou plusieurs
  disques, chaque section contiendra plus d'informations.

  Si vous utilisez un disque neuf, venant directement de Iomega, le test
  de partition doit vous indiquer une partition, /dev/sda4.  Si vous
  avez d'autres units SCSI, il faut vous attendre  ce que l'unit ZIP
  puisse apparatre sous un autre nom tel que /dev/sdb - aussi,
  consultez ces messages.

  Si ces lignes n'apparaissent pas, alors, quelque chose n'est pas
  correctement configur dans votre matriel ou dans le noyau. Vrifiez
  tout soigneusement avant d'envoyer un courrier.

  Si la ligne scsi0: n'apparat pas, alors, c'est que vous n'avez pas
  configur correctement votre adaptateur hte et son pilote.  Quelques
  pilotes vous donnent une ide de ce qui ne va pas. Si votre unit
  n'est pas dtecte, vous avez probablement un problme de cble. S'il
  n'y a pas d'affectation de nom d'unit, vous avez probablement oubli
  d'inclure le support des disques SCSI lorsque vous avez cr le noyau.

  Consultez les fichiers README dans drivers/scsi et le SCSI HOWTO pour
  avoir d'autres conseils de mise au point.


  55..22..  FFddiisskk,, mmkkee22ffss,, mmoouunntt,, eettcc..

  Une fois que vous connaissez le nom de votre unit ZIP, vous tes
  prts.  Vous pouvez manipuler l'unit avec les commandes Linux
  normales de gestion des disques.  On utilise fdisk (ou ventuellement
  cfdisk) pour grer les tables de partition du disque.  On peut
  utiliser mke2fs pour formater une partition utilisant le systme de
  fichiers ext2 - le plus couramment utilis sous Linux. On utilise
  mount pour connecter (monter) une partition formate  la hirarchie
  des rpertoires.

  Vous devez tudier les pages de manuel concernant ces outils s'ils ne
  vous sont pas familiers.  Il y a maintenant plusieurs versions trs
  diffrentes du programme fdisk  - Faites attention.

  Je vais maintenant dcrire deux scnarios habituels.

  55..33..  UUnn ddiissqquuee ffoorrmmaatt DDOOSS eexxiissttaanntt

  Si vous avez un disque ZIP, cr  l'origine  l'aide des outils
  Iomega, ayant une structure de fichiers DOS, la vrification de la
  partition vous indiquera que le disque possde une partition,
  /dev/sda4.

  Vous devez crer un point de montage du disque, disons /zip, puis le
  monter en tant que systme de fichier MS-DOS :



              mkdir /zip
              mount -t vfat /dev/sda4 /zip




  Vous pouvez galement utiliser msdos au lieu de vfat. vfat supporte
  les noms de fichiers longs alors que msdos ne le fait pas.
  Maintenant, les fichiers du disque doivent apparatre dans le
  rpertoire /zip.  Tant que le disque sera mont, il vous sera
  impossible de l'enlever.  Quand vous en avez fini avec le disque, vous
  pouvez le dmonter pour le librer et l'enlever de la hirarchie des
  rpertoires.



              umount /zip




  Une fois que vous avez cr le point de montage /zip - vous n'avez
  plus  le refaire, et donc vous pouvez y revenir plus tard et y monter
  autre chose.



  55..44..  RRee--ffoorrmmaattaaggee eenn ttaanntt qquuee ddiissqquuee  LLiinnuuxx nnaattiiff


  Si vous voulez effacer un disque ZIP et crer dessus un systme de
  fichiers Linux natif, vous devrez utiliser fdisk pour la totalit du
  disque :



              fdisk /dev/sda




  puis supprimer toutes les partitions existantes (au moyen de la
  commande d ), crer une nouvelle partition avec la commande n, la
  dclarer partition primaire numro 1, utiliser w pour crire la table
  de partition sur le disque et enfin quitter fdisk avec la commande q.

  Formatage de la partition



              mke2fs /dev/sda1



  (Le 1 est le numro que vous avez donn  cette partition avec fdisk).
  Maintenant, vous pouvez monter le disque :



              mount -t ext2 /dev/sda1 /zip




  (en rutilisant le point de montage que vous avez cr prcdemment).


  55..55..  LLee ddiissqquuee ddeess oouuttiillss ZZIIPP


  Il y a du travail supplmentaire  accomplir si vous voulez utiliser
  le disque livr avec l'unit ZIP.  A la livraison, la protection en
  criture logicielle est active.  Mais plupart des gens dverrouillent
  le disque sous DOS avant d'essayer de l'utiliser sous Linux.  Linux ne
  peut pas accder  un disque verrouill, il doit tre dverrouill
  auparavant en utilisant les outils Iomega.

  Entre autres choses, on attend pour bientt un programme de gestion de
  la protection en criture crit pour Linux.



  66..  PPeerrffoorrmmaanncceess

  La version 0.26 du programme ppa.c est incluse dans les versions
  standards des noyaux 2.0.x. C'est un programme simple et trs fiable.
  Il a t trs utilis et s'est comport particulirement bien. Sa
  lenteur constitue le seul point ngatif concernant ce programme. Sur
  ma machine, j'ai la version 2.0.30 du noyau et 2 ports parallles.
  C'est une machine pentium 133 conomique - 16 meg de mmoire, un
  disque maxtor eide de 5 giga maxtor. La machine m'a cot 500 Dollars
  U.S. et l'unit ZIP 250. Je fais  l'conomie, mais c'est comme .

  J'avais l'unit ZIP sur le second port et l'imprimante sur le premier.
  Le second port consistait en une vieille carte d'extension, sans mode
  epp. Ce qui faisait fonctionner l'unit en mode 4 bits.

  Pour tablir une base de comparaison des performances, j'ai copi le
  fichier tar de netscape du disque dur vers l'unit ZIP. Ce fichier
  fait environ 10.6 meg.  La copie s'est effectue en 7 minutes 15
  secondes. Pour copier du ZIP vers le disque dur cela a dur 7 minutes
  pile. Pas vraiment un foudre de guerre.

  J'ai alors effectu deux modifications. En premier lieu, j'ai mis
  l'unit ZIP sur le premier port et activ le mode EPP dans le bios
  pour le premier port.  En mme temps, j'ai connect l'imprimante sur
  le second port.

  Deuxime modification, j'ai tl-charg la nouvelle version du
  programme de David Campbells page <http://www.torque.net/~campbell/>
  Puis je l'ai install. Consultez le fichier README qui est inclus.

  Alors, j'ai excut le mme test de copie, dans les deux sens, du
  fichier tar de Netscape sur l'unit ZIP. La copie vers le disque C a
  dur 1 minute 55 secondes et du disque dur vers l'unit ZIP, 1 minute
  tout juste. Temps a comparer aux 7'15" et 7'00" obtenus avec l'ancien
  programme.  C'tait une grosse amlioration par rapport au programme
  version  0.26.  Tout ceci ayant t effectu en utilisant l'unit ZIP
  avec un systme de fichiers de type.

  Ensuite, j'ai format un disque ZIP au format ext2. Puis, j'ai relanc
  les mmes tests.  La copie vers le disque dur n'a dur que 50
  secondes. La copie du disque dur vers l'unit ZIP seulement 40
  secondes.

   RRssuumm ddeess ppeerrffoorrmmaanncceess

  Pour ce test consistant  copier un fichier de 10.6 meg, le mode port
  standard 4 bits et le programme version 0.26 donne le rsultat le plus
  lent 7'00" et 7'15"

  Le nouveau programme (1.41) le mode EPP avec un systme de fichiers de
  type ext2 est le plus rapide  50 secondes and 40 secondes.



  77..  QQuueessttiioonnss ffrrqquueemmmmeenntt ppoosseess

  Voici quelques questions qui m'ont souvent t poses.  Merci de lire
  les rponses qui suivent avant de me les poser  nouveau !


  77..11..  ZZIIPP ??  PPuuiiss--jjee bbrraanncchheerr uunnee iimmpprriimmaannttee ddaannss llee ppoorrtt ppaarraallllllee
  dd''uunnee uunniitt

  Oui, mais.  Actuellement, vous ne pouvez pas avoir  la fois, les
  pilotes lp et ppa actifs sur le mme port parallle.  Un protocole de
  partage de ressources a t conu et son implmentation en est  ses
  dbuts, mais il ne sera pas disponibles avant la sortie de la version
  2.2.0 de Linux.

  Si vous aimez vivre  la pointe des choses, rcuprez le noyau version
  2.1.x et vous disposerez du partage des ports. Consultez

  <http://www.cyberelk.demon.co.uk/parport.html>

  La prsence de deux ports parallles constitue la meilleure solution
  avec un noyau 2.0.x. J'ai achet mon second port environ 15 dollars et
  il fonctionne parfaitement.  Vous pouvez en utiliser un pour
  l'impression et l'autre pour l'unit ZIP.  Vous avez juste  crer un
  noyau avec les pilotes lp et ppa en modules. J'utilise la nouvelle
  version (1.41) de ppa, et donc, je n'ai qu' charger en premier ppa
  (insmod ppa). Il dtecte alors l'unit ZIP sur le premier port. Puis
  je charge lp (insmod lp) et il affecte l'imprimante au second port.

  Si vous utilisez la version 0.26 du programme, il faut alors inclure
  lp and ppa comme composants du noyau, (pas comme des modules). Mettez
  alors quelques commandes de configuration appropries dans la ligne de
  commande du noyau.  Par exemple, si vous utilisez LILO et que vous
  ayez une imprimante en 00xx337788 et une unit ZIP en  00xx33bbcc vous devrez
  ajouter la ligne suivante  votre fichier /etc/lilo.conf.



              append = "lp=0x378 ppa=0x3bc"






  77..22..  AAvveezz--vvoouuss pprrvvuu llee ssuuppppoorrtt ddeess ppoorrttss EEPPPP//EECCPP ddaannss PPPPAA ??


  La version 0.26 du programme ne supporte pas EPP. La version 1.41
  ssuuppppoorrttee EPP. Ce programme est galement beaucoup plus rapide.
  Regardez le paragraphe concernant les performances pour avoir plus de
  dtails.


  77..33..  PPuuiiss--jjee ffaaiirree ttoouurrnneerr LLiinnuuxx  ppaarrttiirr dd''uunnee uunniitt ZZIIPP ??

  Certains l'on fait. On peut penser que cela puisse faire un grand
  disque de secours ou une mthode pour tester une installation.

  <http://sunsite.unc.edu/LDP/HOWTO/mini/ZIP-Install.html>



  77..44..  PPuuiiss--jjee llaanncceerr llee ssyyssttmmee  ppaarrttiirr dd''uunnee uunniitt ZZIIPP ??

  Cela dpend de ce que vous utilisez comme adaptateur hte.  Si celui-
  ci possde une BIOS ROM dont le code puisse permette de dmarrer des
  units 5 ou 6, alors, oui, vous pouvez lancer le systme  partir de
  l'unit ZIP SCSI.  Il n'est pas possible de lancer le systme  partir
  d'une unit port parallle.

  Si vous avez DOS sur votre disque principal et que vous dsirez lancer
  le systme Linux d'un disque ZIP, vous pouvez le faire en utilisant le
  chargeur de lancement LOADLIN.  L'image de votre noyau doit tre
  quelque part sur votre disque  DOS, mais le reste du systme Linux
  peut rsider sur le ZIP.  Assurez-vous que le noyau contient les
  pilotes corrects.

  Pour autant que je le sache, il n'y a aucune disquette de lancement
  dans les distributions populaires qui contienne un pilote pour l'unit
  ZIP parallle.


  77..55..  PPoouurrqquuooii llee IIoommeeggaa uuttiilliissee llaa ppaarrttiittiioonn nnuummrroo 44 ??

  C'est l'une des questions les plus frquentes, mais je pense que
  personne ne dtienne de rponse dfinitive.  Peut-tre ont-ils la tte
  dans un lieu o le soleil ne brille pas. Peut-tre n'y a-t-il aucune
  raison.


  77..66..  CCoommmmeenntt ppuuiiss--jjee aavvooiirr llee ddiissqquuee mmoonntt aauu llaanncceemmeenntt ??

  Tout ce dont vous avez besoin, c'est d'ajouter une ligne  votre
  fichier /etc/fstab.  Par exemple, si vous voulez toujours avoir un
  disque DOS dans l'unit au lancement, vous pouvez mettre



              /dev/sda4   /zip  vfat  defaults  0 0




  dans le fichier fstab.  Selon votre distribution, les scripts
  d'initialisation peuvent essayer d'excuter fsck sur les partitions
  dont la liste est dans votre fichier fstab.  Rappelez-vous que cela
  peut vous causer des problmes si vous oubliez de mettre le disque
  dans l'unit au lancement ou si vous n'avez pas le bon disque en
  place.


  77..77..  QQuuee ssee ppaassssee--tt--iill ss''iill nn''yy aa ppaass ddee ddiissqquuee aauu llaanncceemmeenntt dduu
  ssyyssttmmee ??


  Le noyau va essayer de lire la table de partition, mais l'opration va
  chouer. Il n'y a pas  s'en faire. Une fois que vous aurez insr le
  bon disque et que vous essaierez de travailler avec, le noyau
  s'apercevra qu'il y a maintenant un disque et relira la table de
  partition.

  CONSEIL : quand vous changez les disques, c'est une bonne ide de
  toujours utiliser fdisk pour vrifier la structure de la partition sur
  le nouveau disque.

  Le BIOS, avec quelques adaptateurs htes SCSI, essaiera de lire la
  table de partition du disque pendant le lancement du systme.  Si vous
  ne pouvez pas dsactiver cette option, vous pouvez tre oblig de
  toujours lancer votre systme avec un disque dans l'unit.


  77..88..  PPuuiiss--jjee uuttiilliisseerr ll''uunniitt ppaarraallllllee ccoommmmee uunn vvrraaii ddiissqquuee SSCCSSII ??

  L'adaptateur parallle-vers-SCSI PPA-3 est ralis dans un simple
  circuit ASIC appel VPI0 par Iomega.  Il est intgr sur la carte
  contrleur de l'unit ZIP.  Il y a un vrai bus SCSI, mais il n'est pas
  utilisable.

  Bien que je n'ai pas essay de comparer les deux cartes, il semble
  logique que le VPI0 remplace les circuits lectriques tampons
  conventionnels qui seraient ncessaires si le bus SCSI tait tendu 
  l'extrieur de l'ensemble.



  77..99..  PPPPAA ppeeuutt--iill ttrree uuttiilliiss aavveecc llee ppoorrtt ppaarraallllllee ddeess uunniittss ddee
  bbaannddee ??

  Non.  Ces units sont des units de bandes souples. Il n'est pas
  question de SCSI.

  Plusieurs personnes ont manifest leur intrt dans l'application de
  mes mthodes pour essayer de dterminer le protocole et dvelopper un
  pilote pour ces units de bande.  La premire tape de ce processus
  consiste  trouver un pilote DOS qui fonctionne sous DOSemu.  Je n'ai
  pas entendu parler de quelqu'un qui aurait russi  le faire.


  77..1100..  PPPPAA ffoonnccttiioonnnneerraa--tt--iill aavveecc llee ppoorrtt ppaarraallllllee SSyyQQuueesstt EEZZ113355 ??

  Non. L'EZ135 est une unit IDE avec un convertisseur de port parallle
  ShuttlePort vers IDE intgr.

  Cependant un certain nombre de travaux ont t effectus sur ce
  pilote.  Consultez :

  <http://www.torque.net/linux-pp.html>



  88..  TTrroouuvveerr ll''iinnffoorrmmaattiioonn llaa pplluuss rrcceennttee

  On peut trouver les versions du programme (ppa.c) et les informations
  techniques sur le pilote les plus rcentes concernant l'unit ZIP port
  parallle 

  <http://www.torque.net/~campbell/>

  On peut trouver des informations sur de nombreux pilotes de
  priphriques externe utilisant un port parallle 

  <http://www.torque.net/linux-pp.html>

  L'information sur le partage du port parallle se trouve 

  <http://www.cyberelk.demon.co.uk/parport.html>

  Installation de Linux  partir d'une unit zip (pour les machines sans
  CD)

  <http://sunsite.unc.edu/mdw/HOWTO/mini/Install-From-ZIP.html>

  On peut trouver un frontal X pour le programme ziptool 

  <http://www.scripps.edu/~jsmith/jazip/>

  On peut trouver l'information sur la configuration de Lilo 

  <http://sunsite.unc.edu/mdw/HOWTO/mini/LILO.html>

  On peut trouver l'information sur l'utilisation des options de
  lancement 

  <http://sunsite.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html>


  Si vous voulez installer le systme d'exploitation Linux sur un disque
  ZIP et que vous vouliez l'excuter  partir de l'unit ZIP

  <http://sunsite.unc.edu/LDP/HOWTO/mini/ZIP-Install.html>

  Les pages web de Iomega sont 

  <http://www.iomega.com/>.

  Et si vous chercher de l'information gnrale concernant la
  programmation du port parallle du PC, vous pouvez visiter

  <http://www.lvr.com/parport.htm>




























  Database-SQL-RDBMS HOW-TO pour Linux
  Al Dev (Alavoor Vasudevan)        aldev@hotmail.com
  v2.0, 17 November 1997, version francaise Janvier 1998

  Ce document explique COMMENT mettre en place une Base de Donnees Rela-
  tionnelle SQL Objet de la nouvelle generation "PostgreSQL"  sur  votre
  systeme  unix  qui  pourra etre utilisee comme Base de Donnees Serveur
  d'Application ou Serveur Web. PostgreSQL se rapproche chaque  mois  un
  peu  plus  des standards Internationaux ISO et ANSI SQL 1998,92,89. Ce
  document donne aussi des informations sur les programmes d'interface a
  la  base  de donnees tels que frontaux GUIs, outils RAD (Developpement
  Rapide d'Application ),  interfacage  des  langages  de  programmation
  ("C",  "C++", Java, Perl), pilotes ODBC, JDBC ainsi que sur les outils
  et programmes interfacage d'une Base de Donnees  Web  .  L'information
  donnee ici est valable pour toutes autres plates-formes unix et autres
  Bases de Donnees. Cette information sera tres utile aux nouveaux util-
  isateurs de PostgreSQL, des Bases de Donnees et du langage SQL.

  11..  IInnttrroodduuccttiioonn

  Tout systeme informatique au monde a besoin d'une base de donnees pour
  stocker/retrouver  les  informations.  Sans  base   de   donnees,   un
  ordinateur  devient  inutile.  La  premiere  raison  pour  laquelle on
  utilise  un  ordinateur  est  de   stocker,   retrouver   et   traiter
  l'information  et  de  faire  cela  tres rapidement, et donc, de faire
  economiser du temps. En  meme  temps  le  systeme  doit  etre  simple,
  robuste,  rapide,  fiable,  economique  et  d'utilisation  aisee.  Les
  systemes de gestion de base de donnees les plus  courants  sont  bases
  sur  les  specifications ISO (International Standard Organisation) SQL
  lesquelles sont egalement basees sur  les  standards  americains  ANSI
  SQL.  Les  specifications courantes generalement utilisees sont l'ANSI
  SQL 92 et l'ANSI SQL 89. Le prochain standard est le SQL 1998/99 aussi
  appele  SQL-3.  Les  systemes  de gestion de bases de donnees les plus
  repandus tels que  Oracle,  Sybase  et  Informix  s'appuient  sur  ces
  standards ou essaient de les implanter.

  Ainsi  qu'il est indique dans ce document, il y a plus de 20 varietes,
  commerciales/internet,  de systemes de  gestion  de  base  de  donnees
  actuellement utilises dans le monde et beaucoup, beaucoup plus dans un
  futur proche. En l'absence d'un standard tel que  l'ANSI/ISO  SQL,  il
  serait tres difficile pour l'utilisateur de developper une application
  une fois pour toutes et  de  l'utiliser  avec  tous  les  systemes  de
  gestion   de   bases   de  donnees.  Aujourd'hui,  l'utilisateur  veut
  developper son application une  fois  pour  toutes  en  utilisant  les
  normes  ISO  SQL,  ODBC,  JDBC  et  la vendre afin qu'elle puisse etre
  utilisee sur une grande variete de systemes  de  gestion  de  base  de
  donnees a travers le monde.

  PostgreSQL  est la Base de Donnee LIBRE la plus populaire au monde qui
  implante   la plupart des standards ISO SQL, ANSI  SQL/98,  SQL/92  et
  ANSI  SQL/89  RDBMS.  PostgreSQL est une base de donnees relationnelle
  Objet de la nouvelle generation et les futurs standards ANSI SQL  tels
  que le SQL 1998 (SQL-3) et au-dela traiteront de maniere croissante de
  bases de donnees Objet et de types de donnees Objet. PostgreSQL est le
  seul  SGBD  (RDBMS  - Relational Data Base Management System) au monde
  qui supporte les bases de donnees  Objet  et  SQL.  Ce  document  vous
  explique  comment  installer  le systeme de gestion de base de donnees
  ainsi que tous les paquetages concernant les bases de donnees, comment
  mettre en place la base de donnees Web, la base de donnees application
  , les frontaux GUIs et les programmes interfacage. On ne saurait  trop
  RECOMMANDER   d'ecrire   vos  applications  bases  de  donnees  100  %
  compatibles avec les standards ISO/ANSI SQL, ODBC, JDBC  ceci  rendant
  votre application portable sur de multiples SGDBD (Systemes de gestion
  de Bases de Donnees) tels que  PostgreSQL,  Oracle,  Sybase,  Informix
  etc.

  La  haute  qualite, et un large ensemble de possibilites de PostgreSQL
  viennent du fait que ce systeme est developpe suivant le  principe  du
  'Modele  de  developpement  de  Systemes Ouvert'. Les systemes ouverts
  sont ceux ou  la  totalite  du  code  source  est  fournie  et  ou  le
  developpement  se  fait  a  travers  l'internet  par  une  tres  large
  communaute de cerveaux humains  en  reseau.  La  tendance  future  des
  developpement  logiciels  reside  dans  ce que l'on appelle les "super
  autoroutes de l'information" qui s'etendent a travers le monde entier.
  Dans les annees a venir, la croissance d'internet va etre explosive et
  de ce fait favorisera l'adoption de PostgreSQL par les utilisateurs.

  Avec l'application des principes de la physique (quantique, classique,
  thermodynamique),  des  mathematiques et des statistiques a la qualite
  des  logiciels,  on  obtient  la  meilleure  qualite   des   logiciels
  'Systemes  Ouverts'  tel  que PostgreSQL en mettant le code source des
  programmes a la disposition d'un  grand  nombre  de  cerveaux  humains
  interconnectes  par  les  super-autoroutes  de  l'information. Plus le
  nombre de cerveaux au travail sera grand, meilleure sera la qualite du
  logiciel produit. Le modele "Systeme Ouvert" evite aussi de reinventer
  la roue tout en etant particulierement economique,  en  diminuant  les
  delais  de  distribution  et  en suivant les lois economiques modernes
  d'optimisation des ressources nationales et globales.  Dans  un  futur
  proche,  a  l'aube  du  21-ieme  siecle,  la maniere de se procurer un
  logiciel va changer. Les utilisateurs accorderont en premier lieu leur
  preference  aux  logiciels ouverts tel PostgreSQL. Acheter un logiciel
  PEUT devenir une attitude archaique. On a seulement  besoin  d'acheter
  un  bon  materiel, cela vaut mieux de depenser de l'argent en materiel
  et trouver le logiciel sur internet.

  Puisqu'une masse importante de travail a ete effectuee sur  PostgreSQL
  au  cours des 12 dernieres annees, cela n'aurait aucun sens de recreer
  ex-nihilo un autre systeme de gestion de base de donnees  satisfaisant
  aux  normes  ANSI/ISO  SQL. Il est bien plus interessant de prendre le
  code existant de PostgreSQL, de commencer a l'utiliser, de l'ameliorer
  et d'y ajouter les fonctionnalites manquantes.

  PostgreSQL  n'est  pas  seulement un SGBD libre mais aussi un "Produit
  Internet" et a ce titre merite respect et reconnaissance  de  tout  un
  chacun.

  22..  QQuu''eesstt--ccee qquuee PPoossttggrreeSSQQLL ??

  PostgreSQL  Version  6.2.1  patch  level 3 est un SGBD libre, son code
  source complet est fourni. De plus, c'est  un  SGBD  Relationnel-Objet
  pratiquement  conforme  (de  plus  en  plus  conforme) aux normes ANSI
  SQL1998,92,89. Il fonctionne sur  diverses  plates-formes  materielles
  sous   differents   Systemes   d'Exploitation.    PostgreSQL  est  une
  amelioration du SGDB POSTGRES, prototype de recherche de  SGDB  de  la
  prochaine  generation.  PostgreSQL,  tout  en  conservant  le puissant
  modele de donnees et la richesse des types  de  donnees  de  POSTGRES,
  remplace le langage de requete PostQuel par un sous-ensemble etendu de
  SQL.

  Le  developpement  de  PostgreSQL  est  realise  par  une  equipe   de
  developpeurs  Internet  qui sont tous inscrits a la liste de diffusion
  "PostgreSQL development mailing list".  Son  coordinateur  actuel  est
  Marc  G. Fournier scrappy@postgreSQL.org . Cette equipe est maintenant
  responsable des developpements actuels et futurs de PostgreSQL.

  Les auteurs de  PostgreSQL 1.01 sont Andrew  Yu  et  Jolly  Chen.   De
  nombreux  autres  ont  contribue  au  portage, aux tests, a la mise au
  point et a l'amelioration du code. Le code original  Postgres,  duquel
  PostgreSQL est issu, est le resultat de l'effort de nombreux etudiants
  de troisieme  cycle,  de  deuxieme  cycle  et  d'enseignants  sous  la
  direction   du  Professeur  Michael  Stonebraker  de  l'universite  de
  Californie, Berkeley.

  Le nom original du logiciel a Berkeley etait Postgres. Lors de l'ajout
  des fonctionnalites SQL en 1995, il fut renomme Postgres95. Ce nom fut
  change a la fin de 1996 en PostgreSQL.

  Des millions d'exemplaires du SGBD  PostgreSQL  sont  installes  comme
  serveurs,  serveurs  Web  et  serveurs d'application. Ce SGBD est tres
  avance, c'est un SGBD Relationnel-Objet (ORDBMS).

  PostgreSQL peut stocker  plus  de  types  de  donnees  que  les  types
  traditionnels  entier, caracteres, etc. - L'utilisateur peut creer des
  types, des fonctions, de l'heritage  de  type  etc.  (La  Version  7.0
  rendra  ces  fonctions  avancees  encore  plus puissantes). PostgreSQL
  fonctionne sur Solaris, SunOS, HPUX, AIX, Linux, Irix,  Digital  Unix,
  BSDi,  NetBSD,  FreeBSD, SCO unix, NEXTSTEP, Unixware et toutes sortes
  d'unix. Un portage pour Windows 95/NT est en cours de realisation.

  +o  Titre :           PostgreSQL SQL RDBMS Database (Systeme de Gestion
     de Base de Donnees Relationnelle Objet)

  +o  Version actuelle : 6.2.1 patch level 3

  +o  Age :           PostgreSQL a 12 ans. En developpement depuis 1985

  +o  Auteurs      :              Developpe      par     des     millions
     d'universites/compagnies sur internet au  cours  des  12  dernieres
     ANNEES

  33..  OOuu llee ttrroouuvveerr??

  On  peut  acheter  le CDROM Redhat 4.2 qui contient deja postgresql en
  paquetage rpm (a la fois en code source et en binaires) chez :

  +o  Linux System  Labs  Web  site  :   <http://www.lsl.com/>   6  (U.S.
     dollars)

  +o  Cheap  Bytes  Inc  Web site :  <http://www.cheapbytes.com/> 6 (U.S.
     dollars)

  Distributions uniquement en binaire de PostgreSQL :

  +o  On peut executer PostgreSQL sans compiler le source. Recuperer  les
     binaires          pour         Intel-Linux         de         l'url
     <http://www.redhat.com/pub/contrib/i386/>  le  fichier   se   nomme
     postgresql-6.2-3.i386.rpm.  Son format est de type paquetage redhat
     'rpm'. Il  contient  a  la  fois  le  source  et  les  binaires  de
     PostgreSQL.

  +o  Sites   binaires   pour   Solaris,   HPUX,   AIX,   IRIX,  Linux  :
     <ftp://ftp.postgresql.org/pub/bindist>   Si   vous    faites    une
     compilation  pour  n'importe  laquelle des plates-formes envoyer le
     binaire a ce site, cela peut etre utile aux autres.

  +o  ftp  site  :   recuperer   les   binaires   pour   Intel-Linux   de
     <ftp://ftp.redhat.com/pub/contrib/i386/>   le   fichier   se  nomme
     postgresql-6.2-3.i386.rpm. Son format est de type paquetage  redhat
     'rpm'.  Il  contient  a  la  fois  le  source  et  les  binaires de
     PostgreSQL..

  Sites WWW Web :

  +o  Site Web primaire :    <http://www.postgresql.org/>

  +o  Site Web secondaire :  <http://logical.thought.net/postgres95/>

  +o  <http://www.itm.tu-clausthal.de/mirrors/postgres95/>

  +o  <http://s2k-ftp.cs.berkeley.edu:8000/postgres95/>

  +o  <http://xenium.pdi.net/PostgreSQL/>

  +o  <http://s2k-ftp.cs.berkeley.edu:8000/postgres95/>

  Les sites ftp sont indiques ci-dessous :-

  +o  Primaire FTP :       <ftp://ftp.postgresql.org/pub>

  +o  Secondaire FTP :     <ftp://ftp.chicks.net/pub/postgresql>

  +o  <ftp://ftp.emsi.priv.at/pub/postgres/>

  +o  <ftp://ftp.itm.tu-clausthal.de/pub/mirrors/postgres95>

  +o  <ftp://rocker.sch.bme.hu/pub/mirrors/postgreSQL>

  +o  <ftp://ftp.jaist.ac.jp/pub/dbms/postgres95>

  +o  <ftp://ftp.luga.or.at/pub/postgres95>

  +o  <ftp://postgres95.vnet.net:/pub/postgres95>

  +o  <ftp://ftpza.co.za/mirrors/postgres>

  +o  <ftp://sunsite.auc.dk/pub/databases/postgresql>

  +o  <ftp://ftp.task.gda.pl/pub/software/postgresql>

  +o  <ftp://xenium.pdi.net/pub/PostgreSQL>

  Le code source de PostgreSQL est aussi disponible sur tous  les  sites
  miroirs  de  sunsite.unc (soit environ 1000 sites autour du globe). Il
  se  trouve  dans  la  distribution  Linux  Red  Hat  dans  le  fichier
  /pub/contrib/i386/postgresql.rpm.

  +o  Pour   obtenir   la   liste   des   sites  miroirs  aller  a  l'url
     <ftp://sunsite.unc.edu>

  44..  PPoossttggrreeSSQQLL SSuuppppoorrttee ddeess BBaassee ddee DDoonnnneeeess eexxttrreemmeemmeenntt ggrraannddeess >>  220000
  GGiiggaass

  Si vous avez  besoin  d'utiliser  des  bases  de  donnees  extremement
  grandes  (superieures  a  5  gigaoctets),  il est fortement recommande
  d'utiliser des machines 64-bit telles que :  Digital  Alpha  cpu,  Sun
  Ultra-sparc  64-bit  cpu,  Silicon  graphics 64-bit cpu, a venir Intel
  Merced IA-64 cpu, machines HPUX 64bit , IBM 64-bit machines.  Si  l'on
  compile  PostgreSQL  avec  un cpu 64-bit il pourra supporter d'enormes
  bases de Donnees et de larges requetes. Les performances de PostgreSQL
  pour  des  interrogations sur de grandes tables et de grandes bases de
  donnees sera plus rapide de plusieurs ordres de grandeurs  que sur des
  machines  a  cpu  32-bit . L'avantage des machines 64-bit est qu'elles
  disposent d'un grand espace d'adressage  memoire  et  que  le  systeme
  d'exploitation  peut  gerer  de tres grands systemes de fichiers. Cela
  permet des meilleures performances avec de grandes bases  de  donnees,
  plus de memoire centrale (RAM), plus de possibilites etc...

  55..  PPoossttggrreeSSQQLL eesstt--iill ffiiaabbllee??

  Le  paquetage  de  "Test de Regression" permet de s'assurer de son bon
  fonctionnement.  Il est inclus (src/test/regress) dans la distribution
  et  permet  a  l'ordinateur d'effectuer la verification des operations
  SQL standard ainsi que des capacites de PostgreSQL. L'avantage  de  ce
  test  effectue  par  l'ordinateur  vient  du  fait  que  celui-ci peut
  effectuer plusieurs millions de test SQL tres rapidement.  La  vitesse
  de  l'ordinateur  est  un  milliard  de  fois plus rapide que celle de
  l'esprit humain! Le paquetage  de  tests  contient  des  centaines  de
  programmes  de test SQL. Si vous le jugez utile vous pouvez en ajouter
  beaucoup d'autres. Dans ce cas penser a  envoyer  ces  tests  au  site
  PostgreSQL  primaire  si  vous  pensez  que  cela  peut etre utile aux
  autres. Le  paquetage  de  Test  de  Regression  permet  d'asseoir  la
  confiance  des  utilisateurs  en PostgreSQL et facilite le deploiement
  rapide de PostgreSQL sur des systemes en  production  sans  inquietude
  majeure.

  66..    OOuuttiill   GGUUII   ffrroonnttaall  ppoouurr  PPoossttggrreeSSQQLL  ((IInntteerrffaaccee  UUttiilliissaatteeuurr
  GGrraapphhiiqquuee))

  PostgreSQL  est  dote  d'une  librairie  d'interface  TCL/TK  dans  la
  distribution appelee 'pgtcl'. TCL/TK est  un  outil  de  developpement
  rapide  d'application et un langage de script extremement puissant. On
  developpe une fois pour toutes et on utilise sur NT, Win 95, Linux  et
  tous  les  systemes Unix! TCL/TK est egalement largement utilise comme
  langage de script sur internet. Ce qui permet de  n'avoir  qu'un  seul
  langage  pour couvrir tous ses besoins - applications et internet. TCL
  est l'abreviation de Integre) pour TCL/TK nomme SpecTCL.  Verifiez  la
  presence  de  ce  paquetage  (format  rpm)  dans la distribution linux
  Redhat ou dans l'un des sites sunscript indiquees ci-apres. TCL/TK est
  normalement  inclus  dans  tous  les  cdrom  linux.  On peut egalement
  l'obtenir a partir des sites -

  +o  <http://sunscript.sun.com/>

  +o  <http://sunscript.sun.com/TclTkCore/>

  +o  <ftp://ftp.sunlabs.com/pub/tcl/tcl8.0a2.tar.Z>

  +o  Manuels  de  reference:  de  nombreux  livres   sur   TCL/TK   sont
     disponibles sur le marche.

  +o  Visual TCL  <ftp://ftp.redhat.com/pub/contrib/i386/visualtcl*.rpm>

  77..   OOuuttiillss ddee ddeevveellooppppeemmeenntt iinntteeggrreess ppoouurr PPoossttggrreeSSQQLL ((IInntteerrffaaccee UUttiill--
  iissaatteeuurr GGrraapphhiiqquuee))

  Essayez les outils de developpement suivants utilisable en conjonction
  avec les  pilotes  odbc/jdbc.   Ils  sont  similaires  a  Borland  C++
  Builder, Borland JBuilder.

  Vibe est un IDE Java et C++ (Environnement de Developpement Integre) a
  ete nomme IDE de l'annee par la revue "Unix Review". Ce produit a  800
  US  dollars est disponible pour linux au prix extremement bas de 79 US
  dollars  pour  un  duree  limitee.  Essayez  le!  C'est  le  reve   du
  developpeur.

  +o  Des   informations  complementaire  sur  Vibe  sont  disponibles  a
     <http://www.LinuxMall.com/products/00487.html>
     Vous  pouvez  aussi  utiliser  Borland   C++   Builder,   JBuilder,
     PowerBuilder  sur  Windows95 pour se connecter a PostgreSQL sur une
     machine unix au travers de pilotes odbc/jdbc.

  Outils IDE gratuits -

  Regardez le CDROM de la distribution RedHat.

  +o  FreeBuilder  <ftp://ftp.redhat.com/pub/contrib/i386/free*.rpm>

  +o  SpecTCL  <ftp://ftp.redhat.com/pub/contrib/i386/spec*.rpm>

  +o  JccWarrior  <ftp://ftp.redhat.com/pub/contrib/i386/jcc*.rpm>

  +o  Applixware Tool  <http://www.redhat.com>

  +o  XWPE        X        Windows        Programming         Environment
     <http://www.rpi.edu/~payned/xwpe/>
     <ftp://ftp.redhat.com/pub/contrib/i386/xwpe*.rpm>

  +o  XWB           X            Windows            Work            Bench
     <ftp://ftp.redhat.com/pub/contrib/i386/xwb*.rpm>

  +o  NEdit  <ftp://ftp.redhat.com/pub/contrib/i386/nedit*.rpm>

  88..  OODDBBCC PPiillootteess ppoouurr PPoossttggrreeSSQQLL

  ODBC  signifie 'Open DataBase Connectivity'. C'est un standard repandu
  pour acceder aux informations  des  bases  de  donnees  de  differents
  vendeurs.  Le fonctionnement des applications ecrites en utilisant les
  pilotes ODBC est garanti  quelle  que  soient  les  bases  de  donnees
  utilisees PostgreSQL, Oracle, Sybase, Informix etc..

  +o  <http://www.openlinksw.com>    Open   Link   Software   Corporation
     distribue des ODBC pour PostgreSQL et d'autres  bases  de  donnees.
     Open Link dispose aussi d'ODBC gratuits (quantite limitee) verifier
     aupres d'eux.

  +o  <http://stud1.tuwien.ac.at/~e9025461/> C'est le  site  primaire  de
     PostODBC   (PostgreSQL   ODBC)  .  Malheureusement  c'est  un  site
     particulierement lent.

  +o  <http://www.MageNet.com/postodbc/DOC> Ce miroir  est  maintenu  par
     Julia Anne Case qui est aussi un developpeur PostODBC majeur.

  Il  existe  aussi un projet interessant appele FreeODBC Pack Package .
  Il  n'y  a  pas  de  version  PostgreSQL,  peut-etre  pouvez  vous   y
  participer.

  +o  <http://www.ids.net/~bjepson/freeODBC/>  c'est une version gratuite
     d'ODBC.

  99..  PPiillootteess UUDDBBCC ppoouurr PPoossttggrreeSSQQLL

  UDBC est une version statique de pilote  de  gestionnaire  et  de  DLL
  d'ODBC  independant,  pour integrer le support de la connectivite base
  de donnees directement au niveau des applications.

  +o  <http://www.openlinksw.com> Open Link  Software  Corporation  vends
     UDBC  pour  PostgreSQL  et  autres  SGBD.   Open Link dispose aussi
     d'UDBC gratuits (quantite limitee) verifier aupres d'eux.

  1100..  PPiillootteess JJDDBBCC ppoouurr PPoossttggrreeSSQQLL

  JDBC signifie 'Java DataBase Connectivity'. Java  est  un  langage  de
  developpement  independant  de  la plate-forme d'utilisation developpe
  par Sun Microsystems. Les programmeurs Java sont encourages  a  ecrire
  leurs  applications  en  utilisant  JDBC pour faciliter la portabilite
  entre  differentes  plates-formes  telles  que   PostgreSQL,   Oracle,
  informix, etc. Si vous ecrivez des applications Java applications vous
  pouvez obtenir les pilotes JDBC pour PostgreSQL  a  partir  des  sites
  suivants :

  Le pilote JDBC est inclus dans la distribution PostgreSQL.

  +o  <http://www.demon.co.uk/finder/postgres/index.html>    Sun's   Java
     connectivity to PostgreSQL

  +o  <ftp://ftp.ai.mit.edu/people/rst/rst-jdbc.tar.gz>

  +o  <http://www.openlinksw.com> Open Link  Software  Corporation  vends
     JDBC  pour  PostgreSQL  et  autres  SGBD.   Open Link dispose aussi
     d'JDBC gratuits (quantite limitee) verifier aupres d'eux.

  1111..  KKaanncchheennjjuunnggaa -- JJaavvaa RRAADD TTooooll ffoorr PPoossttggrreeSSQQLL

  Kanchenjunga est un Outil de Developpement Rapide  d'Application  Java
  pour PostgreSQL. On peut utiliser cet outil pour developper rapidement
  une application JAVA s'interfacant a  PostgreSQL.

  +o  <http://www.man.ac.uk/~whaley/kj/kanch.html>

  1122..  CCllaasssseess JJaavvaa ppoouurr PPoossttggrreeSSQQLL

  Ces classes pour PostgreSQL seront tres utiles au programmeur JAVA.

  +o  <ftp://www.blackdown.org/pub/Java/Java-Postgres95>

  +o  <http://www.blackdown.org>

  1133..  PPiilloottee dd''iinntteerrffaaccee ddee SSGGBBDD PPeerrll ((DDaattaabbaassee  IInntteerrffaaccee   DDBBII))  ppoouurr
  PPoossttggrreeSSQQLL

  1133..11..  iinntteerrffaaccee PPeerrll 55 ppoouurr PPoossttggrreeSSQQLL

  Cette interface est incluse dans la distribution de PostgreSQL. On  la
  trouve dans le repertoire src/pgsql_perl5.

  +o  Email : E.Mergl@bawue.de

  +o  On la trouve aussi dans -

  +o  Page d'accueil Perl :

  1133..22..  QQuu''eesstt--ccee qquuee DDBBII ??????

  L'interface  de  SGBD  Perl  (Perl  Database  Interface - DBI) est une
  interface  logicielle  d'acces  a  un  SGBD  (Application  Programming
  Interface - API) pour le langage PERL. Les specifications de l'API DBI
  perl  definissent  un  ensemble  de  fonctions,  de  variables  et  de
  conventions d'acces a un SGDB coherent et independant du SGBD utilise.

  1133..33..  AAnnnnoonnccee dduu ppiilloottee DDBBII DDBBDD--PPgg--00..6633 DDBBII ppoouurr PPoossttggrreeSSQQLL

  Sur le site CPAN on trouve DBD-Pg-0.63.tar.gz.  Depuis  sortie  de  la
  derniere   version  publique,  les  modifications  suivantes  ont  ete
  effectuees :

  - - adaptation a  PostgreSQL-6.2  :  o  $  sth->rows  de  meme  que  $
  sth->execute et $ sth->do renvoient le nombre de lignes affectees meme
  pour les instructions non-Select.  o ajout du  support  d'autorisation
  par mot de passe, lire la page du manuel concernant pg_passwd.

  -  -  the  data_source  parameter  of  the  connect method accepts two
  additional  parameters  which  are   treated   as   host   and   port:
  DBI->connect("dbi:Pg:dbname:host:port", "uid", "pwd")

  -  -  support de l'instruction AutoCommit. Lire la documentation de ce
  module pour evaluer son impact sur vos scripts !

  - - prise en compte dans un meilleur style  perl  du  type  de  donnee
  bool,  Lire  la documentation de ce module pour evaluer son impact sur
  vos scripts !

  Pour de plus amples informations voir:

  1133..44..  NNootteess ccoonncceerrnnaanntt cceettttee vveerrssiioonn eett ffiicchhiieerr LLIISSEEZZ--MMOOII

       #---------------------------------------------------------
       #
       # $Id: README,v 1.10 1997/10/05 18:25:55 mergl Exp $
       #
       # Portions Copyright (c) 1994,1995,1996,1997 Tim Bunce
       # Portions Copyright (c) 1997                Edmund Mergl
       #
       #---------------------------------------------------------

       **********************************************************
       *                                                        *
       *         Cette version contient des modifications       *
       *                     INCOMPATIBLES                      *
       *                     _------------                      *
       *              avec les versions precedentes.            *
       *                                                        *
       *            Lire la documentation du module             *
       *               pour l'attribut AutoCommit               *
       *               et le type de donnee bool.               *
       *                                                        *
       **********************************************************

  DESCRIPTION :

  ------------

  Ceci est  la  version  0.63  de  DBD-Pg.   DBD-Pg  est  une  interface
  PostgreSQL pour Perl 5 utilisant DBI.

  Pour des informations complementaires concernant DBI consulter:

  COPYRIGHT :

  -----------

  La  distribution  de  ce  document  est  soumise  aux conditions de la
  licence publique generale GNU ou la  licence  protegeant  la  creation
  Artistique  (Artistic  License),  ainsi  que  c'est  specifie  dans le
  fichier LISEZ-MOI perl.

  SI VOUS AVEZ DES PROBLEMES :

  ---------------------------

  Envoyez vos commentaires et vos rapports d'erreur a E.Mergl@bawue.de

  Pensez a inclure les messages affiches par perl -v,  et  perl  -V,  la
  version de PostgreSQL, la version de DBD-Pg, et la version de DBI dans
  votre rapport d'erreur.

  CONTRAINTES LOGICIELLES :

  ------------------------

  - compiler, tester et installer Perl  5          (au  moins  5.002)  -
  compiler,  tester  et  installer  le  module  DBI   (au  moins 0.89) -
  compiler, tester et installer PostgreSQL     (au moins 6.2)

  PLATEFORMES :

  -------------

  Cette version  def  DBD-Pg  a  ete  developpee  pour  Linux  2.0  avec
  chargement  dynamique des extensions perl. Merci de me faire savoir si
  vous rencontrez des problemes sur d'autres plates-formes.

  INSTALLATION :

  --------------

  Dans le fichier Makefile il y a un test  la  variable  d'environnement
  POSTGRES_HOME  ainsi  que  de  quelques  arborescences  standard, pour
  trouver le repertoire racine de votre installation Postgres. Taper les
  commandes suivantes:

  1.   perl Makefile.PL 2.   make 3.   make test 4.   make install

  ( de 1. a 3. comme utilisateur normal, pas comme root ! )

  TEST :

  ------

  Lancer  'make  test'.   Noter que l'utilisateur lancant ce script doit
  avoir ete cree avec des droits d'acces lui  permettant  de  creer  des
  bases  de  donnees "ET" des utilisateurs !. Ne pas lancer ce script en
  tant que root!.

  Si le test echoue avec le message 'login failed', verifier que l'acces
  a  template1  de  la base de donnees ainsi qu'a pgperltest ne sont pas
  proteges dans pg_hba.conf.

  Si vous utilisez la bibliotheque partagee libpq.so verifiez que  votre
  chargeur  dynamique  trouve libpq.so. La commande Linux /sbin/ldconfig
  -v devrait vous renseigner sur l'endroit ou  se  trouve  libpq.so.  Si
  ldconfig  ne  trouve  pas libpq.so, soit ajoutez une entree appropriee
  dans /etc/ld.so.conf et relancez ldconfig ou ajouter son  chemin  dans
  la  variable  d'environnement  LD_LIBRARY_PATH.  On aura comme message
  typique resultant de ce type  d'erreur  :  install_driver(Pg)  failed:
  Can't  load  './blib/arch/auto/DBD/Pg/Pg.so'  for module DBD::Pg: File
  not found at

  Quelques distributions Linux ont une installation incomplete de  perl.
  Si vous avez des erreurs de compilation du style "XS_VERSION_BOOTCHECK
  undeclared", executez un Si ce  fichier  n'est  pas  present,  il  est
  indispensable de recompiler et de reinstaller perl.

  Utilisateurs  SGI  :  si vous avez un defaut de segmentation, assurez-
  vous que vous utilisez la version de malloc obtenue avec perl lors  de
  la  compilation  de  perl (ce n'est pas le cas par defaut).  "David R.
  Noble" drnoble@engsci.sandia.gov drnoble@engsci.sandia.gov

  ---------------------------------------------------------------------------

  E.Mergl@bawue.de                     October 05, 1997

  ---------------------------------------------------------------------------

  1133..55..  FFAAQQ ppoouurr DDBBII

  On trouvera ci-dessous les Questions  Frequemment  Posees  (FAQ)  pour
  DBI. La page Web d'accueil se trouve a

  <http://www.hermetica.com/technologia/perl/DBI>

                           DBI Foire Aux Questions v.0.35
                         Derniere mise a jour : 20 Juin, 1997

  * NAME
  * SYNOPSIS
  * VERSION
  * DESCRIPTION
  * Information & Sources d'Informations

     * 1.1 Qu'est-ce que DBI, DBperl, Oraperl and *perl?
     * 1.2. Ou puis-je les trouver?
     * 1.3. Ou puis-je trouver plus d'informations?

  * Problemes de compilation

     * 2.1. Problemes de compilation ou "echec aux tests!"

  * Questions de Plates-formes et de Pilotes

     * 3.1 Quelle est la difference entre ODBC et DBI?
     * 3.2 DBI est-il supporte sur les plates-formes Windows 95 / NT ?
     * 3.3 Puis-je acceder a des bases de donnees Microsoft Access ou SQL-Server avec DBI?
     * 3.4 Y-a-t'il un DBD pour X?
     * 3.5 Qu'est-ce que DBM? Et pourquoi dois-je utiliser DBI a sa place?
     * 3.6 Quand mSQL-2 sera t'il supporte?
     * 3.7 Quel systeme de gestion de base de donnees me recommandez vous?
     * 3.8 Est-ce que X est supporte dans DBI?

  * Questions de programmation

     * 4.1 Est-ce que DBI est d'une quelconque utilite pour la programmation CGI?
     * 4.2 Comment puis-je obtenir des temps de connexion plus rapides avec DBD::Oracle et CGI?
     * 4.3 Comment puis-je obtenir des connexions persistantes avec DBI et CGI?
     * 4.4 ``Quand je lance un script perl a partir de la ligne de commande, ca
           marche, mais, quand je le lance a partir de C, ca echoue!" Pourquoi?
     * 5.1 Puis-je faire de l'execution en parallele avec DBI?
     * 5.2 Comment manipuler des donnees BLOB avec DBI?
     * 5.3 Comment puis-je invoquer des procedures enregistrees avec DBI?
     * 5.4 Comment puis-je recuperer les valeurs de retour des procedures enregistrees avec DBI?
     * 5.5 Comment puis-je creer ou detruire une base de donnees avec DBI?
     * 5.6 Comment puis-je enregistrer ou annuler une instruction avec DBI?
     * 5.7 Comment les valeurs NULL sont-elles prises en compte par DBI?
     * 5.8 Qu'est-ce que c'est que ces histoires de methodes func?

  * Support et formation

     * Assistance Commerciale
     * Formation

  * Autres References
  * AUTEUR
  * COPYRIGHT

  ----------------------------------------------------------------------------

  NAME

  DBI::FAQ -- Foire Aux Questions pour l'interface de SGBD Perl5

  ----------------------------------------------------------------------------

  SYNOPSIS

      perldoc DBI::FAQ

  ----------------------------------------------------------------------------
  VERSION

  La version actuelle de ce document , du 20 Juin, 1997, porte le numero 0.35.

  ----------------------------------------------------------------------------

  DESCRIPTION

  Ce document contient les reponses aux questions les plus frequemment posees
   a la fois sur les Mailing Lists DBI et personnellement aux membres de l'equipe
  de developpement DBI.

  ----------------------------------------------------------------------------

  Information de base & Sources d'Information

  ----------------------------------------------------------------------------

  1.1 Qu'est-ce que c'est que DBI, DBperl, Oraperl and *perl?

  Pour citer Tim Bunce, l'architecte et l'auteur de DBI :

      ``DBI est une interface logicielle d'acces aux bases de donnees (Application
        Programming Interface  -API) pour le langage Perl. Les specifications DBI
        API definissent un ensemble de fonctions, de variables et de conventions
        coherents d'interfacage a une base de donnees independant de la base de
        donnees utilisee.''

  En langage simple, l'interface DBI permet aux utilisateurs d'acceder de maniere transparente
  a de multiples base de donnees. Ainsi, Si vous vous connectez a une
  base de donnees Oracle, Informix, mSQL, Sybase ou n'importe quelle autre, vous n'avez
  pas besoin de connaitre les mecanismes sous-jacents de la couche 3GL. L'API
  definie par DBI fonctionnera sur tous ces types de bases de donnees.

  On obtient un benefice du meme ordre en ayant la possibilite de se connecter a deux bases de
  donnees de differents fournisseurs a l'aide du meme script perl, i.e., je veux lire des
  donnees d'une base de donnees Oracle et les inserer dans une Informix a partir du meme
  programme. La couche logicielle DBI permet de le realiser simplement et efficacement.

  Voici un diagramme decrivant ce principe :

                              [ Architecture DBI  ]

  DBperl est le nom ancien des specifications de l'interface. Il est utilise maintenant
  pour designer les modules perl4 d'interfacage des bases de donnees tels que oraperl,
  isqlperl, ingperl et autres. Ces interfaces n'ont pas d'API standard et ne sont
  generalement pas supportes.

  Voici une liste des modules DBperl, de leur equivalent DBI correspondants et du
  support d'information. Notez que les auteurs cites ici ne maintiennent generalement
  pas le module DBI de la base de donnees. Les adresses E-mail n'ont pas ete verifiees
  et ne doivent etre utilisees que pour les questions concernant les modules perl4 listes
  ci-dessous. Les questions sur les pilotes DBI doivent etre directement
  adressees aux listes de diffusion des utilisateurs DBI.

      Module Name SGBD requis         Auteur          DBI
      ----------- -----------------   ------          ---
      Sybperl     Sybase              Michael Peppler DBD::Sybase
                                      <mpeppler@itf.ch>
      Oraperl     Oracle 6 & 7        Kevin Stock     DBD::Oracle
                                      <dbi-users@fugue.com>
      Ingperl     Ingres              Tim Bunce &     DBD::Ingres
                                      Ted Lemon
                                      <dbi-users@fugue.com>
      Interperl   Interbase           Buzz Moschetti  DBD::Interbase
                                      <buzz@bear.com>
      Uniperl     Unify 5.0           Rick Wargo      None
                                      <rickers@coe.drexel.edu>
      Pgperl      Postgres            Igor Metz       DBD::Pg
                                      <metz@iam.unibe.ch>
      Btreeperl   NDBM                John Conover    SDBM?
                                      <john@johncon.com>
      Ctreeperl   C-Tree              John Conover    None
                                      <john@johncon.com>
      Cisamperl   Informix C-ISAM     Mathias Koerber None
                                      <mathias@unicorn.swi.com.sg>
      Duaperl     X.500 Directory     Eric Douglas    None
                  User Agent

  Cependant, certains modules DBI possedent des couches logicielles d'emulation. Ainsi
  DBD::Oracle est livre avec une couche d'emulation Oraperl, ce qui permet d'executer
  d'anciens scripts oraperl sans modification. La couche logicielle d'emulation traduit
  les appels oraperl API en appels DBI et les execute.

  Voici une table des  couches d'emulation :

      Module        Couche d'emulation     Etat
      ------          ---------------     ------
      DBD::Oracle     Oraperl             Complete
      DBD::Informix   Isqlperl            En cours de  developpement
      DBD::Sybase     Sybperl             Fonctionnelle? ( Necessite une
                                          verification)
      DBD::mSQL       Msqlperl            En version experimentale avec
                                          DBD::mSQL-0.61

  L'emulation Msqlperl est un cas particulier. Msqlperl est un pilote perl5 pour les
  bases de donnees mSQL , mais il ne se conforme pas aux specifications DBI. On
  desapprouve son utilisation en faveur de  DBD::mSQL. On peut telecharger Msqlperl a
  partir du site CPAN via :

      http://www.perl.com/cgi-bin/cpan_mod?module=Msqlperl

  ----------------------------------------------------------------------------

  1.2. Ou puis-je le trouver?

  DBI est disponible en premier sur :

      ftp://ftp.demon.co.uk/pub/perl/db

  Il faut utiliser le site CPAN (Comprehensive Perl Archive Network) pour recuperer les
  versions a jour des pilotes, en general absentes des sites miroirs. On peut acceder
  a CPAN grace au splendide programme "CPAN multiplexeur" de Tom Christiansen's situe
  a:

      http://www.perl.com/CPAN/

  Pour des informations plus specifiques ainsi que pour les URL exactes des pilotes,
  veuillez consulter la liste des pilotes DBI et les pages concernant les modules sur:

      http://www.hermetica.com/technologia/perl/DBI

  ----------------------------------------------------------------------------

  1.3. Ou puis-je trouver plus d'informations?

  Il existe quelques sources d'information sur  DBI.

  Specifications DBI

           http://www.hermetica.com/technologia/perl/DBI/doc/dbispec

       On trouve deux specifications disponibles a cette adresse: la nouvelle
       specification Draft (edition provisoire) DBI qui est un document en
       evolution rapide a mesure que l'equipe de developpement s'approche d'une
       version stable de l'interface, et l'ancienne specification historique
       DBperl a partir de laquelle l'interface DBI actuelle a evolue.

       Il faut considerer ce dernier document comme ne presentant qu'un interet
       historique et ne pas l'utiliser en tant que manuel de programmation ou
       document de reference. Il demeure cependant une source d'informations
       tres utile.

  Documentation POD (Plain Old Documentation)
       Les PODs sont des morceaux de documentation generalement noyes a
       l'interieur des programmes perl qui documentent le code "sur place".
       Ce sont des ressources tres utiles pour les programmeurs et les
       utilisateurs des modules. Les PODs pour DBI et pour les pilotes
       deviennent monnaie courante et la documentation pour les modules
       contenant ces PODs peut etre lue avec les commandes suivantes.

       La Specification DBI
            Les PODs pour la specification DBI peut etre lue avec la commande :

                perldoc DBI

       Oraperl
            Les utilisateurs de la couche d'emulation fournie avec DBD::Oracle,
            peuvent s'informer sur la maniere de programmer en utilisant
            l'interface Oraperl en tapant:

                perldoc Oraperl

            Ce qui permettra d'obtenir une copie a jour de la page de manuel
            originale ecrite par Kevin Stock pour perl4. L'API oraperl y est
            entierement listee et decrite.

       DBD::mSQL
            Les utilisateurs du module DBD::mSQL peuvent lire des informations
            sur quelques fonctions privees et bizarreries de ce pilote en tapant :

                perldoc DBD::mSQL

       Foire Aux Questions (FAQ)
            Ce document, la Foire Aux Questions, est aussi disponible en tant
            que documentation POD! Vous pouvez le lire sur votre propre systeme
            en tapant :

                perldoc DBI::FAQ

            Ceci peut etre plus pratique pour ceux qui ne sont pas connectes a
            l'Internet ou le sont d'une maniere peu pratique.

       Les POD en general
            On peut lire des informations sur la maniere d'ecrire des PODs,
            ainsi que sur la philosophie des PODs en general en tapant :

                perldoc perlpod

            Les utilisateurs ayant le module Tk installe seront peut-etre
            interesses d'apprendre qu'il existe un lecteur de POD base sur Tk
            nomme tkpod. Il formate les POD de maniere pratique et lisible.

  Discussions, Cancans et Observations

           http://www.hermetica.com/technologia/perl/DBI/tidbits

       Il y a , de temps en temps, une serie de discussions de la part de
       certaines personnes, dans les listes de diffusion sur DBI,
       qui, pour essayer d'eclaircir un simple point, finissent par
       transformer en brouillon des documents tout a fait complets. Ces
       documents sont souvent de qualite variable, mais donnent un
       apercu du fonctionnement des interfaces.

  ``DBI -- L'interface de SGBD en perl5''
       C'est un article ecrit par Alligator Descartes et Tim Bunce sur la structure
       de DBI. Il a ete publie dans le numero 5 de ``The Perl Journal''.
       Il est extremement bon. Allez acheter ce magazine. En fait, achetez les tous!
       Le site WWW de ``The Perl Journal'' est :

           http://www.tpj.com

  ``DBperl''
       Cet article, publie dans l'edition de novembre 1996 du ``Dr. Dobbs
       Journal'' traitait de DBperl. L'auteur de cet article n'a apparemment
       pas contacte un seul membre de l'equipe de developpement DBI pour
       verifier l'information contenue dans son article. Plusieurs critiques
       de cet article dans les listes de diffusion des utilisateurs
       de dbi ont ete peu flatteuses, c'est le moins que l'on puisse dire.
       Le fait que l'article traite de DBperl au lieu de DBI est un indice
       du manque de fraicheur de l'information.

       Cependant, cette reference est donnee par soucis d'exhaustivite.

  ``The Perl5 Database Interface''
       Cette reference est celle d'un livre a ecrire par Alligator Descartes
       (pour lui, c'est moi) publie par O'Reilly et Associes a paraitre
       cet hiver.

       La table des matieres de ce livre devrait contenir :

            * Introduction
                 + Les Bases de Donnees
                 + CGI / WWW
                 + perl
            * Concepts de Base des Bases de donnees
                 + Types de Bases de Donnees
                      o Flat File
                      o AnyDBM
                      o RDBMS
                 + Utiliser Quelle Base de Donnees, pour Quoi faire...
            * SQL
                 + Pourquoi SQL?
                 + Structuration de l'Information dans les Bases de Donnees
                 + Extraction des Donnees d'une Base de Donnees
                 + Manipulation des Donnees et des Structures de Donnees
            * Architecture DBI
            * Programmation avec DBI
                 + Initialisation DBI
                 + Identifiants
                      o Identifiants de pilotes
                      o Identifiants de bases de donnees
                      o Identifiants d'instructions
                 + Connexion and Deconnexion
                 + Gestion des Erreurs
                 + Emission de Requetes Simples
                 + Execution d'Instructions Atomiques
                 + Instructions MetaDonnees
                 + Instruction plus dans le style perl
                 + Liaison
                 + Gestion des Transactions
                 + Methodes utilitaires
                 + Gestion des Attributs et des Variables Dynamiques
            * DBI et ODBC
            * Les Pilotes de Bases de Donnees
                 + DBD::Oracle et oraperl
                 + DBD::Informix et isqlperl
                 + DBD::mSQL et Msqlperl
            * Etude de Cas
                 + DBI et le WWW
                 + Migration des Donnees et Stockage
                 + Logiciel d'Administration
            * Appendice: API Reference / Specification
            * Appendice: Ressources

  Fichiers LISEZMOI
       Les fichiers LISEZMOI fournis avec chaque pilote contiennent de temps
       en temps quelques informations utiles (non, vraiment! ) pouvant etre
       pertinentes pour l'utilisateur.
       S'il vous plait, lisez-les. Cela rendra nos pauvres existences plus
       supportables. On peut toutes les trouver depuis la page WWW DBI
       principale a :

           http://www.hermetica.com/technologia/perl/DBI

  Listes de diffusion
       Il y a trois listes de diffusion pour DBI gerees par Ted Lemon.
       On peut s'inscrire a toutes et resilier cette inscription a
       travers le World Wide Web a l'URL :

           http://www.fugue.com/dbi

       Les listes ou les utilisateurs peuvent participer sont:

       dbi-announce
            Cette liste de diffusion est reservee uniquement aux annonces.
            Tres peu de trafic. Les annonces sont generalement postees
            sur la page WWW DBI principale.

            Si vous n'arrivez pas a utiliser le formulaire sur la page WWW
            indiquee ci-dessus, inscrivez-vous a cette liste de la maniere
            suivante :

                Email: 'dbi-announce-request@fugue.com' avec le mot 'subscribe'
            dans le corps du message.

       dbi-dev
            Cette liste de diffusion est a l'usage des developpeurs pour discuter
            des idees et des concepts de l'interface DBI, API et des mecanismes
            des pilotes. Seulement utiles pour les developpeurs et les personnes
            interessees. Trafic faible.

            Si vous n'arrivez pas a utiliser le formulaire sur la page WWW
            indiquee ci-dessus, inscrivez-vous a cette liste de la maniere
            suivante :

                Email: 'dbi-dev-request@fugue.com' with a message body of
                'subscribe'

       dbi-users
            Cette liste de diffusion est un lieu de discussion generale utilisee
            pour les rapports d'erreurs, la discussion sur differents problemes
            et des demandes de renseignement d'interet general. Trafic moyen.

            Si vous n'arrivez pas a utiliser le formulaire sur la page WWW
            indiquee ci-dessus, inscrivez-vous a cette liste de la maniere
            suivante :

                Email: 'dbi-users-request@fugue.com' with a message body of
                'subscribe'
  Archives des Listes de Diffusion
       Archives des Listes de Diffusion US

                http://outside.organic.com/mail-archives/dbi-users/

           Cette archive, avec recherches par hyper-liens, de ces trois listes de
           diffusion, avec un peu du trafic beaucoup plus ancien a ete mis en place
           pour permettre une recherche par les utilisateurs.

       Archives des Listes de Diffusion Europeennes

                http://www.rosat.mpe-garching.mpg.de/mailing-lists/PerlDB-Interest

            Identique a l'archive US ci-dessus.

  ----------------------------------------------------------------------------

  Problemes de compilation

  ----------------------------------------------------------------------------

  2.1. Problemes de compilation ou "Il echoue aux tests!"

  En premier lieu, consulter la documentation en ligne concernant ce module, que ce
  soit DBI lui-meme ou un module DBD, et verifier que ce n'est pas un probleme de
  compilation connu pour votre architecture. On peut trouver ces documents a :

      http://www.hermetica.com/technologia/perl/DBI

  Si c'est un probleme connu, vous devrez probablement attendre qu'il ait ete corrige.
  Si vraiment vous avez besoin d'une solution, essayez l'une des solutions suivantes :

  Essayez de le corriger vous meme
       Cette technique n'est generalement par recommandee aux craintifs. Si vous pensez
       que vous y etes arrive, alors, envoyer un fichier patch (context diff ) a
       l'auteur en expliquant les points suivants :

          o Quel etait le probleme, et, si possible, des jeux d'essai.

          o Ce que vous avez du faire pour le corriger. Assurez vous que vous
            n'oubliez rien.

          o Donnez des informations concernant la Plate-forme utilisee, les versions :
            de la Base de Donnees, de Perl, du module et de DBI.

  Envoyez un Email a l'auteur SANS RALER!
       S'il vous plait, postez votre email a l'adresse indiquee dans les pages
       WWW du pilote avec lequel vous avez rencontre des problemes. Ne pas poster
       directement a une adresse que vous connaissez a moins qu'elle ne
       corresponde a l'une de celles qui sont indiquees.

       Nous avons un vrai travail a faire, et nous devons consulter les listes de
       diffusion traitant des problemes rencontres. De plus nous ne pouvons pas
       forcement avoir acces a <inserez ici le nom de votre plate-forme favorite,
       celle qui vous cause des lesions cerebrales> et de ce fait vous apporter
       une quelconque assistance!
       Desole de vous paraitre dur, mais c'est comme cela!

       Cependant, vous pouvez tomber sur l'un de ces genies creatifs, qui, a 3
       heures du matin resoudra votre probleme et vous fournira une rustine en 5
       minutes. L'ambiance dans le cercle DBI est que nous apprecions de
       connaitre les problemes des utilisateurs puisque nous travaillons dans
       le meme environnement.

       Si vous envisagez d'envoyer un Email a un auteur, essayez de fournir le
       plus d'informations possible, i.e. :
          o TOUS les renseignements provenant du fichier LISEZMOI du module
            posant probleme.
            Je dis bien TOUS. Nous n'ajoutons pas de lignes dans la documentation
            pour le plaisir, ou pour que les fichiers LISEZMOI se conforment
            a une quelconque norme de taille.

          o Si vous disposez d'un vidage memoire, essayer de generer une trace du
            contenu de la pile (stack) a partir du vidage memoire (core dump) en
            utilisant le module Devel::CoreStack. L'envoyer egalement. On peut
            trouver le module Devel::CoreStack sur CPAN a :

                http://www.perl.com/cgi-bin/cpan_mod?module=Devel::CoreStack

          o Les numeros de version du Module, de perl, des jeux d'essai, du
            systeme d'exploitation ainsi que tout autre information pertinente.

       Souvenez-vous que, plus vous nous enverrez d'informations plus vite
       nous pourrons resoudre le probleme. Si vous n'envoyez rien, n'attendez
       rien en retour.

  Envoyez un Email dans la liste de diffusion des utilisateurs de dbi
       C'est en general une idee astucieuse de rapporter les problemes
       rencontres dans les listes de diffusion. Les auteurs lisent tous
       ces listes d'une part et d'autre part vous ne perdez rien a le faire,
       donc, faites-le.

  ----------------------------------------------------------------------------

  Questions de Plates-formes et de Pilotes

  ----------------------------------------------------------------------------

  3.1 Quelle est la difference entre ODBC et DBI?

  Ca, c'est une bonne question! Reponse a rediger de maniere detaillee!

  ----------------------------------------------------------------------------

  3.2 DBI est-il supporte sur les plates-formes Windows 95 / NT ?

  Finalement, oui! Jeff Urlwin s'est employe avec constance a porter DBI et DBD::Oracle
  sur ces plates-formes, et, depuis la disponibilite d'un perl plus stable et d'un
  portage de MakeMaker, le projet a progresse a pas de geant.

  Les portages de DBI et de DBD::Oracle pour Win32 ports font maintenant partie
  integrante de DBI, donc, la recuperation d'une version de DBI superieure a 0.81 doit
  donner satisfaction. Pour ce qui est des rustines necessaires pour DBD::Oracle,
  veuillez lire la page d'information de portage pour Win32 a :

      http://www.hermetica.com/technologia/perl/DBI/win32

  ----------------------------------------------------------------------------

  3.3 Puis-je acceder aux bases de donnees Microsoft Access ou SQL-Server avec DBI?

      Contribution de Tim Bunce et Jeff Urlwin

  Il existe une couche logicielle d'emulation experimentale pour le module Win32::ODBC
  fournie avec DBI-0.79 ( et suivants ). Elle s'appelle DBI::W32ODBC et est, pour le
  moment, minimale. Vous aurez besoin du module Win32::ODBC disponible a :

      http://www.roth.net

  Etant donne son etat, les rapports de problemes, sans correction, ont de bonnes
  chances d'etre ignores. Vous aurez egalement besoin du patch kit Win32 DBI tel qu'il
  est fourni par Jeff Urlwin. Pour trouver l'endroit ou il est disponible, lire la
  reponse a la question precedente.

  Jeff Urlwin fournit actuellement un gros travail sur la couche logicielle ODBC.
  Pour en revenir a la question initiale, theoriquement, oui, on peut acceder aux bases
  de donnees Microsoft Access ou SQL-Server avec DBI via ODBC!

  ----------------------------------------------------------------------------

  3.4 Existe-t-il in DBD pour <inserez le nom de votre SGBD favori ici>?

  Est-il cite dans la liste des pilotes DBI ?

      http://www.hermetica.com/technologia/perl/DBI/DBD

  Sinon, non. L'absence complete d'un pilote pour un SGBD donne dans cette page
  signifie que personne n'a manifeste l'intention d'y travailler.

  Comme corollaire a l'affirmation ci-dessus, cela signifie que si vous voyez une
  annonce pour un pilote qui n'est pas dans cette page, il y a une bonne chance que ce
  soit reellement un pilote DBI, et qu'il puisse ne pas respecter les specifications.
  Par consequent, les questions pour des problemes concernant ce code ne doivent
  pas etre posees dans les listes de diffusion DBI.

  ----------------------------------------------------------------------------

  3.5 Qu'est-ce que DBM? Et pourquoi dois-je utiliser DBI a sa place?

  Extrait de ``DBI - L'Interface de Base de Donnees pour Perl 5'' :

      ``A l'origine UNIX etait bienheureux avec sa "Base de Donnees" rustique reposant
  sur des fichiers, nommee systeme dbm. Avec dbm vous enregistrez les donnees dans des
  fichiers et les retrouvez rapidement. Cependant, il souffre de serieux
  inconvenients.

          Verrouillage des fichiers

          Les systemes dbm ne permettent par un verrouillage particulierement
          robuste des fichiers, de meme qu'il n'y a pas de possibilite de
          corriger les problemes survenants lors d'ecritures [ dans la base
          de donnees ] simultanees.

          Structures de Donnees Arbitraires

          Les systemes dbm permettent seulement une simple structure de donnees
          fixe: paires cle-valeur. Cette valeur peut etre un objet complexe,
          tel qu'une structure [ C ], mais la cle doit etre unique. Ce fut une
          grande limitation dans l'utilite des systemes dbm.

      Cependant, les systemes dbm continuent a offrir des fonctions utiles pour les
      utilisateurs ayant des ensembles de donnees simples et des ressources limitees,
      puisqu'ils sont rapides, robustes et extremement bien testes. Les modules Perl
      pour acceder aux systemes dbm font maintenant partie integrante de la
      distribution Perl via le module AnyDBM_File.''

  Pour resumer, DBM est une solution parfaitement satisfaisante pour les bases de
  donnees essentiellement en lecture seule, ou pour des ensembles de donnees simples
  et reduits. Toutefois, pour des ensembles de donnees plus importants, sans
  mentionner un verrouillage des transactions robuste, on recommandera aux utilisateurs
  de preferer DBI.

  ----------------------------------------------------------------------------

  3.6 Quand mSQL-2 sera t'il supporte?

  De meme que pour DBD::mSQL-0.61, il y a eu un support pour mSQL-2. Cependant, il
  n'y a encore aucun reel support pour les nouvelles methodes func, concernant les
  index, ajoutees a la bibliotheque de base mSQL. Celles-ci seront prochainement
  disponibles et seront accessibles a DBD::mSQL au travers de methodes func privees.
  Vous pouvez obtenir plus d'informations concernant ces methodes func privees dans
  le POD DBD::mSQL en tapant :

      perldoc DBD::mSQL

  a condition d'avoir une installation correcte de DBD::mSQL.

  ----------------------------------------------------------------------------

  3.7 Quel systeme de gestion de base de donnees me recommandez vous?

  C'est un sujet particulierement epineux pour lequel une reponse objective est
  delicate dans la mesure ou, chaque ensemble de donnees, chaque usage et chaque
  configuration du systeme est different d'un utilisateur a l'autre.

  Du point de vue de l'auteur, si l'ensemble de donnees est relativement petit, donnant
  des tables de moins de 1 million de lignes, et qu'il y ait moins de 1000 tables dans
  une base de donnees, alors mSQL est une solution parfaitement acceptable. Ce SGBD
  est extremement bon marche, est merveilleusement robuste et beneficie d'un excellent
  support. Des informations complementaires sont disponibles sur le site WWW Hughes
  Technology a :

      http://www.hughes.com.au

  Si l'ensemble de donnees entraine des tables de plus de  1 million de lignes ou plus
  de 1000 tables, ou si vous disposez de, soit plus d'argent, soit de machines plus
  puissantes, je vous recommanderai le RDBMS (SGBDR en francais) Oracle7. Le site WWW
  Oracle's est une excellente source d'information complementaire.

      http://www.oracle.com

  Informix est un autre RDBMS de haut niveau qu'il faut envisager. Il existe plusieurs
  differences entre Oracle et Informix qui sont trop complexes pour etre detaillees
  dans ce document. On trouvera l'information sur Informix sur leur site WWW a :

      http://www.informix.com

  En cas d'utilisation dans des applications en frontal WWW, mSQL peut etre un
  meilleur choix du fait de ses temps de connexion courts entre le script CGI et le
  SGBD que Oracle RDBMS qui, a chaque connexion, reclame plus de ressources. mSQL est
  moins gourmand en ressources et plus rapide.

  Ce point de vue n'est pas forcement partage par tout le monde et n'est pas sponsorise
  ou dicte par une quelconque societe. Il est donne tel quel.

  ----------------------------------------------------------------------------

  3.8 Est-ce que <inserez une fonctionnalite ici> est supporte par DBI?

  Si l'on suppose que la fonctionnalite en question n'est pas, en standard, specifique
  d'un SGBD, alors la reponse sera non.

  DBI represente un API qui doit fonctionner avec la plupart des SGBD, et n'a pas de
  fonctionnalite specifique a un SGDB particulier.

  Cependant, les auteurs d'un pilote peuvent, s'ils le desirent, ajouter une
  fonctionnalite specifique a un SGBD a travers les methodes func definies dans l'API
  DBI. Les developpeurs de Scripts doivent noter que l'utilisation de cette
  fonctionnalite au travers de ces methodes func a de bonnes chances d'en sacrifier la
  portabilite entre les differents SGDB.

  ----------------------------------------------------------------------------

  Questions de Programmation
  ----------------------------------------------------------------------------

  4.1 Est-ce que DBI est d'une quelconque utilite pour la programmation CGI?

  En un mot, oui! DBI est extremement utile pour la programmation CGI! En fait, je
  serais tente de repondre que la programmation CGI est une des deux principales
  utilisation de DBI.

  DBI confere aux programmeurs CGI la possibilite d'offrir des base de donnees WWW a
  leurs utilisateurs, ce qui donne a ces utilisateurs la possibilite d'utiliser de
  grandes quantites de donnees bien organisees. DBI donne aussi la possibilite , si un
  site recoit un trafic trop important pour les performances du serveur, d'ameliorer
  ce serveur de base de donnees de facon transparente, sans modifier les scripts CGI.

  ----------------------------------------------------------------------------

  4.2 Comment puis-je obtenir un temps de connexion plus rapide avec DBD::Oracle et CGI CGI?

      Contribution de John D. Groenveld

  Le serveur httpd Apache maintient un ensemble de processus fils httpd pour servir les
  requetes clients.

  En utilisant le module mod_perl Apache de Doug MacEachern, l'interpreteur perl est
  inclus dans le processus fils httpd. Les modules CGI, DBI, et vos autres modules
  favoris peuvent etre charges au lancement de chaque processus fils. Ces modules ne
  seront pas recharges a moins d'etre modifies sur disque.

  Pour de plus amples informations sur Apache, consultez le site WWW du Projet Apache
  a :

      http://www.apache.org

  Le module mod_perl peut etre recupere de CPAN via :

      http://www.perl.com/cgi-bin/cpan_mod?module=mod_perl

  ----------------------------------------------------------------------------

  4.3 Comment puis-je obtenir une connexion persistante avec DBI et CGI?

      Contribution de by John D. Groenveld

  En utilisant le module Apache::DBI de Edmund Mergl, les connexions a la base de
  donnees sont enregistrees dans une table avec chacun des processus httpd fils. Si
  votre application utilise une base de donnees simple utilisateur, cette connexion
  peut etre lancee avec chaque processus fils. Actuellement, les connexions a la base
  de donnees ne peuvent pas etre partagees entre processus httpd fils.

  Apache::DBI peut etre telecharge de CPAN via :

      http://www.perl.com/cgi-bin/cpan_mod?module=Apache::DBI

  ----------------------------------------------------------------------------

  4.4 ``Quand je lance un script perl de la ligne de commande, ca marche, mais, quand
  je le lance sous httpd, ca echoue!" Pourquoi?

  Fondamentalement, il y a une bonne chance que cela provienne du fait que
  l'utilisateur a partir duquel vous avez lance la ligne de commande a
  un ensemble de variables d'environnement correctement configure, ce sont, dans la
  cas de DBD::Oracle, des variables telles que $ORACLE_HOME, $ORACLE_SID or TWO_TASK.

  Le processus httpd s'execute habituellement sous un utilisateur id ne correspondant
  pas a un utilisateur, ce qui implique qu'il n'y a pas d'environnement configure.
  Tous scripts essayant de s'executer dans ces circonstances echoueront.
  Pour resoudre ce probleme, initialisez l'environnement de votre base de donnees dans
  un bloc BEGIN ( ) en tete de votre script. Ceci devrait resoudre votre probleme.

  De meme, vous devriez regarder votre fichier registre d'erreurs pour y trouver des
  indices, ainsi que les guides ``Idiot's Guide To Solving Perl / CGI Problems'' et
  ``Perl CGIProgramming FAQ'' pour avoir des informations complementaires. Il est peu
  probable que ce probleme concerne DBI.

  Le guide ``Idiot's Guide To Solving Perl / CGI Problems'' peut etre trouve a :

      http://www.perl.com/perl/faq/index.html

  ainsi que ``Perl CGI Programming FAQ''. Lisez ces DEUX documents tres soigneusement!

  ----------------------------------------------------------------------------

  5.1 Puis-je faire de l'execution en parallele avec DBI?

  A la date de ce document ( voir en tete ), non. perl ne permet pas l'execution en
  parallele. Cependant, l'execution en parallele doit faire partie de la distribution
  perl de base a compter de la version 5.005, ce qui sous-entend que le support de
  l'execution en parallele pour DBI devrait suivre rapidement.

  Pour quelques exemples de code OCI pour Oracle ayant des instructions SELECT avec
  execution en parallele, voir :

      http://www.hermetica.com/technologia/oracle/oci/orathreads.tar.gz

  ----------------------------------------------------------------------------

  5.2 Comment manipuler des donnees BLOB avec DBI?

  A ecrire.

  ----------------------------------------------------------------------------

  5.3 Comment puis-je invoquer des procedures enregistrees avec DBI?

  En supposant que vous avez cree une procedure enregistree a l'interieur de la base
  de donnees cible, eg, une base de donnees Oracle, vous pouvez utiliser $dbh->do pour
  executer immediatement cette procedure. Par exemple,

      $dbh->do( "BEGIN someProcedure END" );

  ----------------------------------------------------------------------------

  5.4 Comment puis-je recuperer les valeurs de retour de procedures enregistrees avec DBI?

      Contribution de Jeff Urlwin

      $sth = $dbh->prepare( "BEGIN foo(:1, :2, :3); END;" );
      $sth->bind_param(1, $a);
      $sth->bind_param_inout(2, \$path, 2000);
      $sth->bind_param_inout(3, \$success, 2000);
      $sth->execute;

  N'oubliez pas d'effectuer un test d'erreur, strict!

  ----------------------------------------------------------------------------

  5.5 Comment puis-je creer ou supprimer une base de donnees avec DBI?

  La creation et la suppression de bases de donnees sont des concepts qui sont
  beaucoup trop abstraits pour etre supportes par DBI. Par exemple, Oracle ne supporte
  pas le concept de detruire une base de donnees du tout! Ainsi, dans Oracle, le
  serveur de base de donnees est essentiellement la base de donnees elle-meme alors
  que dans mSQL, le processus serveur s'execute tranquillement sans aucune base de
  donnees creee. C'est un probleme trop heterogene pour s'y attaquer.

  Quelques pilotes, cependant, supportent la creation et la suppression de bases de
  donnees a travers des methodes func privees. Il vous faut regarder dans la
  documentation des pilotes que vous utilisez pour verifier s'ils supportent de tels
  mecanismes.

  ----------------------------------------------------------------------------

  5.6 Comment puis-je valider ou annuler une instruction avec DBI?

  A ecrire.

  ----------------------------------------------------------------------------

  5.7 Comment les valeurs NULL sont-elles prises en compte par DBI?

  Les valeurs NULL dans DBI sont traitees comme la valeur undef. Des NULLs peuvent
  etre inseres dans les bases de donnees en tant que NULL, par exemple :

      $rv =
          $dbh->do( "INSERT INTO table VALUES( NULL )" );

  mais lors d'une interrogation, les NULLs devront etre testes comme des undef. C'est
  un standard pour tous les pilotes.

  ----------------------------------------------------------------------------

  5.8 Qu'est-ce que c'est que ces histoires de methodes func?

  Une methode func est definie a l'interieur de DBI comme etant un point d'entree pour
  une fonctionnalite d'une base de donnees specifique, eg, la possibilite de creer ou
  supprimer des bases de donnees. L'invocation de ces methodes specifiques aux pilotes
  est simple. Par exemple, pour invoquer une methode createDatabase qui n'a qu'un seul
  argument, on ecrira :

      $rv =
          $dbh->func( 'argument', 'createDatabase' );

  Les developpeurs de logiciels doivent cependant noter que ces methodes func ne sont
  pas portables entre SGDB.

  ----------------------------------------------------------------------------

  Assistance et formation

  L'interface aux SGBD Perl5 est un logiciel LIBRE. IL EST DISTRIBUE SANS GARANTIE
  D'AUCUNE SORTE.

  Cependant, quelques organisations fournissent soit une assistance technique soit des
  programmes de formation pour DBI. L'auteur de ce document n'a aucune information sur
  la qualite de ces services (le traducteur non plus!). Les liens ci-dessous ne sont
  indiques qu'a titre de reference.

  ----------------------------------------------------------------------------

  Assistance technique

  The Perl Clinic
       The Perl Clinic peut mettre en place des contrats commerciaux d'assistance pour
  Perl, DBI, DBD::Oracle et Oraperl. Cette assistance est effectuee par la compagnie
  pour laquelle Tim Bunce, auteur de DBI, travaille. Pour des informations
  complementaires sur leurs services, veuillez voir :

           http://www.perl.co.uk/tpc
  ----------------------------------------------------------------------------

  Formation

  Aucun programme de formation n'est connu a ce jour.

  ----------------------------------------------------------------------------

  Autres References

  Dans cette section, on trouvera des liens WWW divers pouvant presenter un interet
  pour les utilisateurs de DBI. Ils n'ont pas ete verifies et peuvent mener a des
  sites inconnus ou a des documents inexistants.

      http://www-ccs.cs.umass.edu/db.html
      http://www.odmg.org/odmg93/updates_dbarry.html
      http://www.jcc.com/sql_stnd.html

  ----------------------------------------------------------------------------

  AUTEUR

  Alligator Descartes <descarte@hermetica.com>

  ----------------------------------------------------------------------------

  COPYRIGHT

  Ce document est Copyright (c)1994-1997 Alligator Descartes, avec des parties
  Copyright (c)1994-1997 leurs auteurs originaux. Ce module est publie selon les
  conditions d'une licence 'Artistique' que vous pouvez trouver dans la distribution
  de perl.

  Ce document est Copyright (c)1997 Alligator Descartes. Tous droits reserves.
  La permission de distribuer ce document, en entier ou en partie, via email,
  Usenet, archives ftp ou http est accordee a condition que ce soit gratuitement, on a
  fait un effort raisonnable pour utiliser les versions les plus actuelles et tous les
  avis d'attribution et de copyright ont ete maintenus ( Se referer aux sections AUTEUR
  et COPYRIGHT ). Les demandes pour d'autres droits de distribution, y compris
  l'incorporation dans des produits commerciaux, tels que livres, articles de magazines
  ou CD-ROMs doit etre effectuee aupres de Alligator Descartes
  <descarte@hermetica.com>.

  ----------------------------------------------------------------------------
                               (c) 1995-97 Hermetica
                        Alligator Descartes - Hermetica

  1144..  PPGGAACCCCEESSSS -- UUnn GGUUII ppoouurr llaa ggeessttiioonn ddeePPoossttggrreeSSQQLL

  Il est deja inclus dans la distribution de PostgreSQL.  Pour une copie
  plus recente, vous pouvez acceder au site web site

  +o  <http://www.flex.ro/pgaccess>

  +o  Si  vous  avez  des  commentaires,   des   suggestions   pour   des
     ameliorations, n'hesitez pas a envoyer un courrier electronique a :
     teo@flex.ro

  Voici ce que dit la page d'accueil de pgaccess :

       PgAccess - une interface Tcl/Tk pour PostgreSQL

       La derniere version de PgAccess est 0.62 , du Samedi 25 Octobre 1997

       Je pense qu'il y a eu quelques problemes au chargement de la bibliotheque libpgtcl.
       Je vous invite a lire la section speciale concernant libpgtcl

       Que fait PgAccess maintenant!
       Voici quelques images des fenetres de PgAccess : Fenetre principale, createur
       de tables, vue de table (interrogation), createur visuel d'interrogation .

       Tables
       - Ouverture de tables pour la visualisation, 200 enregistrements maximum
         ( modifiable dans le menu des preferences )
       - redimensionnement d'une colonne en tirant la ligne verticale de la grille
         ( plus pratique a realiser a l'interieur meme de la table que dans l'en-tete)
       - texte encadre dans les cellules - disposition enregistree pour chacune des tables)
       - importation/exportation vers des fichiers externes (SDF,CSV)
       - possibilite de filtres (filtre de saisie, tel que (prix>3.14)
       - possibilites de tri (saisie manuelle de(s) champ(s) a trier)
       - edition en ligne
       - assistant generateur de table ameliore
       - edition de champ amelioree
       Requetes
       - definition, edition et enregistrement de "requetes definies par l'utilisateur"
       - enregistrement de requetes en tant que vues
       - execution des requetes
       - visualisation des resultats de requetes de type select
       - suppression et changement de nom de requete
       - NOUVEAU !!! Createur visuel de requetes avec possibilites de "glisser/deposer".
         Pour tous ceux d'entre vous qui ont l'extension pour Netscape Navigator de Tcl/Tk
         installee, vous pouvez le voir au travail en cliquant ici
       Sequences
       - definition de sequences, ainsi que leurs suppression et inspection
       Fonctions
       - definition, inspection et suppression de fonctions en langage SQL

       Sur la liste A FAIRE!
       - conception des tables (ajout de nouveaux champs, changement de nom, etc.)
       - definition de fonction
       - generateur de rapport
       - langage de script de base

       Informations complementaires concernant libgtcl

       Vous aurez egalement besoin de la bibliotheque d'interface de PostgreSQL a Tcl,
       disponible comme moduleTcl/Tk chargeable. Son nom est libpgtcl et le source est
       situe dans le repertoire PostgreSQL /src/interfaces/libpgtcl. Precisement, vous
       aurez besoin d'une bibliotheque libpgtcl qui soit "chargeable" a partir de Tcl/Tk.
       Ce qui est techniquement different d'un fichier objet chargeable PostgreSQL
       ordinaire, car libpgtcl est constituee d'un ensemble de fichiers objets. Sous Linux,
       on l'appelle libpgtcl.so. Vous pouvez telecharger a partir d'ici une version deja
       compilee pour les systemes Linux i386. La seule chose a faire est de copier
       libpgtcl.so dans le repertoire bibliotheque systeme (/usr/lib) et c'est tout. Une
       solution possible est de supprimer dans le source la ligne contenant load libpgtcl.so
       et de charger pgaccess.tcl non pas avec wish, mais avec pgwish (ou wishpg) le wish
       qui a ete lie avec la bibliotheque libpgtcl!

       De toute maniere, l'application devrait fonctionner sans problemes

  1155..  OOuuttiill WWiinnddoowwss iinntteerraaccttiiff ddee ggeenneerraattiioonn ddee rreeqquueettee ppoouurr PPoossttggrreeSSQQLL

  ("Windows Interactive Query Tool" WISQL ou MPSQL) Il est identique  au
  serveur  de  requete  SQL  de  Microsoft  WISQL!  Il  dispose d'un GUI
  agreable et d'un historique des commandes.  Vous  pouvez  utiliser  le
  coupe/colle  ainsi  que  d'autres  fonctionnalites  sympathiques  pour
  accroitre votre productivite.

  +o  <http://www.troubador.com/~keidav/index.html>

  +o  Email : keidav@whidbey.com

  +o  <http://www.ucolick.org/~de/> in file tcl_syb/wisql.html

  +o  <http://www.troubador.com/~keidav/index.html>

  +o  Email : de@ucolick.org

  1166..  OOuuttiill iinntteerraaccttiiff ddee ggeenneerraattiioonn ddee rreeqquueettee ppoouurr PPoossttggrreeSSQQLL -- IISSQQLL

  ISQL  est  destine  aux  terminaux  fonctionnants  en  mode  ligne  de
  commande.  C'est inclus dans la distribution et  nomme  PSQL.  Il  est
  tres  similaire  a   Sybase ISQL, et a Oracle SQLplus. A l'invite unix
  tapez la commande 'psql' qui en retour  vous  affichera  le  caractere
  d'attente de commande: psql> . Tapez /h pour obtenir de l'aide sur les
  commandes utilisables. C'est tres convivial et  d'utilisation  facile.
  C'est  aussi tres utile pour ecrire des scripts pour les interpreteurs
  de commandes Bourne, Korn et C-shells.

  1177..  MMiissee eenn ppllaaccee ddee pplluussiieeuurrss mmaacchhiinneess PPoossttggrreeSSQQLL aavveecc uunn sseeuull mmoonnii--
  tteeuurr

  Vous pouvez empiler  plusieurs  cpu  et  les  connecter  a  un  unique
  moniteur  en  utilisant  un commutateur pour choisir la connexion avec
  une unite centrale particuliere. Ce qui economise de l'espace et evite
  l'utilisation   de   plusieurs  ecrans(200  US  dollars),  claviers(60
  dollars) et mulots(50 dollars) et evite aussi pas mal de pagaille.

  Veuillez consulter ces sites :

  +o  <http://www.networktechinc.com/servswt.html>  (120   dollars/PC   8
     ports) qui propose 'Server Switches' and 'Video only switches'

  +o  <http://www.scene.demon.co.uk/qswitch.htm>

  +o  <http://www.cybex.com/products/control/4xp.htm>

  +o  <http://www.betterbox.com/info.html>

  Utilisez le moteur de recherche yahoo pour trouver d'autres compagnies
  en utilisant la cle de recherche 'Server Switches'.

  On trouvera ci-dessous un extrait du catalogue de networktechnic Inc

  Commandez maintenant, appelez le  800-742-8324 (appel gratuit a partir des USA)

  Pour recevoir notre catalogue, veuillez envoyer votre adresse par courrier electronique a :
  sales@networktechinc.com

  PILOTEZ PLUSIEURS PC's avec un seul clavier, ecran et mulot
  Ces commutateurs electroniques permettent de piloter jusqu'a 64 PC's avec un unique
  clavier, ecran et mulot. Son microprocesseur interne simule la presence constante du
  clavier, de l'ecran et du mulot pour chacun des PC's connectes.

  Fonctionnalites et Applications

  * Clavier, face avant ou commande a distance
  * utilisation de connecteurs de mulots 9 broches D Serial ou 6 broches miniDIN
  * utilisation de connecteurs de clavier 5 broches DIN ou 6 broches miniDIN
  * resolution video 1600x1200 sans degradation
  * Utilisation de cables standards
  * Boitier pour bureau ou pour montage en rack

  Specifications - Clavier

  * Tous les connecteurs dont femelles
  * 5 broches DIN ou 6 broches miniDIN
  * Permettent un redemarrage (boot) materiel ou logiciel de tous les PC's a chaque instant

  Controles - Boutons en face avant

  * Le toucher d'un bouton permet la connexion au PC correspondant
  * L'appui sur un bouton pendant plus de 0.5 secondes entraine le fonctionnement dans
  les modes SCAN, BROADCAST ou COMMAND
  * Les LEDs en face avant indiquent le mode d'operation du clavier
  * L'appui sur CTRL+* entraine le fonctionnement en mode COMMAND
  * Les modes SCAN, BROADCAST ou COMMAND sont disponibles

  Mulot

  * 9 broches D serie
          o Le commutateur NTI emule le mulot Microsoft serie pour tous les PC's
          o 9 broches D male pour mulot
          o 9 broches D femelle pour PC's
  * 6 broches miniDIN
          o Le commutateur NTI emule le mulot IBM PS/2 pour tous les PC's
          o Tous les connecteurs sont femelles

  Par cable, a distance

  * Optionnel--doit etre acquis separement
  * Fonctionnement identique a celui "Boutons en face avant"

  Information technique

  * Demander le manuel technique MAN025

  Moniteur (ecran) - VGA

  * La bande passante est de 150 MHz
  * Resolution 1600X1200 sans degradation
  * Tous les connecteurs sont des connecteurs femelles

  Alimentation

  * 110 ou 220 VAC a 50 ou 60 Hz

  1188..  OOuuttiill SSyysstteemmee ddee ssuuiivvii ddee PPrroobblleemmee//PPrroojjeett ppoouurr PPoossttggrreeSSQQLL

  Se trouve a l'url :

  +o  <http://www.homeport.org/~shevett/pts/>

  1199..  CCoonnvveerrssiioonn ddee ffiicchhiieerrss ddbbaassee ddbbff eenn ffiicchhiieerrss PPoossttggrreeSSQQLL

  Le programme dbf2msql fonctionne parfaitement avec mSQL et PostgreSQL.
  Vous pouvez le trouver a

  +o  <ftp.nerosworld.com/pub/SQL/dbf2sql/>

  +o  <ftp://gopher.library.tudelft.nl/pub/misc/dbf2msql-0.4.tar.gz>

  Ce  programme  a ete ecrit par Maarten Boekhold, Faculty of Electrical
  Engineering TU Delft, NL Computer Architecture and  Digital  Technique
  section M.Boekhold@et.tudelft.nl

  Vous  pouvez  egalement  utiliser  une  methode  python  pour lire des
  fichiers dbf et les charger dans une base de donnees postgres.

  +o  Voir  <http://www.python.org>

  2200..  PPoossttggrreeSSQQLL 44GGLL ppoouurr lleess aapppplliiccaattiioonnss ddee bbaasseess ddee ddoonnnneeeess wweebb -- LLee
  ssyysstteemmee ddee ddeevveellooppppeemmeenntt AAppppGGEENN

  AppGEN peut etre telecharge de

  <http://www.man.ac.uk/~whaley/ag/appgen.html>

  <ftp://ftp.mcc.ac.uk/pub/linux/ALPHA/AppGEN>.

  On trouvera ci-dessous un extrait de la page d'accueil de AppGEN :-

  AppGEN est un langage de haut niveau de la quatrieme generation  ainsi
  qu'un   generateur   d'application   pour  produire  des  applications
  destinees au World Wide Web (WWW). Ces applications  sont  typiquement
  utilisees  a  travers l'internet ou dans le cadre d'un reseau intranet
  d'entreprise. Les applications AppGEN sont  implantees  en  scripts  C
  respectants  le standard Common Gateway Interface (CGI) utilise par la
  plupart des serveurs Web.

  Pour utiliser AppGEN il vous faudra disposer de :-

  PostgresSQL, systeme de gestion de base de donnees relationnel

  Un serveur web compatible CGI tel que HTTPD du NCSA

  D'un compilateur ansi C tel que GCC

  AppGEN est constitue des executables Unix (Linux) suivants :-

  +o  defgen, qui produit une application cadre, de base, a partir de  la
     structure  logique  des  donnees.  Ces  applications  sont capables
     d'ajouter, de mettre a jour, de  supprimer  et  de  rechercher  les
     enregistrements   d'une   base   de   donnees  tout  en  conservant
     automatiquement l'integrite referentielle de cette base.

  +o  appgen, le compilateur AppGEN qui compile le code source appgen  en
     code  source  C  CGI executable et en documents formates HTML prets
     pour leur deploiement sur un serveur web.

  +o  dbf2sql, un utilitaire de conversion de fichiers  .dbf  compatibles
     dBase  III  en scripts SQL executables. Ce qui permet de migrer les
     donnees stockees dans la plupart des bases de  donnees  DOS/Windows
     vers un serveur SQL tel que PostgresSQL.

  +o  De  plus,  AppGEN  comprend  un  ensemble  de  documents  HTML , de
     fichiers GIF et d'applets Java qui sont  utilises,  a  l'execution,
     par le systeme. Et, naturellement, comme pour tout bon logiciel, la
     totalite du code source est fournie.

  L'auteur,     Andrew     Whaley,     peut     etre     conctacte     a
  andrew@arthur.smuht.nwest.nhs.uk  tous les commentaires ou suggestions
  concernant ce logiciel seront les bienvenus.

  2211..  OOuuttiill ddee CCoonncceeppttiioonn//IImmpplleemmeennttaattiioonn ppoouurr SSGGBBDD WWeebb ppoouurr  PPoossttggrreeSSQQLL
  -- EEAARRPP

  <http://www.oswego.edu/Earp>

  <ftp://ftp.oswego.edu> dans le repertoire 'pub/unix/earp'.

  On trouvera ci-dessous un extrait de la page d'accueil de EARP:-

  Le "Programme de Reponse  Facilement  Ajustable"  ("Easily  Adjustable
  Response Program" - EARP) cree par David Dougherty

  2211..11..  EEAARRPP,, cc''eesstt qquuooii??

  EARP  est  un  outil de Conception/Implementation pour Base De Donnees
  Web, realise par-dessus le systeme  de  gestion  de  base  de  donnees
  Postgres95. Ses fonctionnalites comprennent:

  +o  Un systeme de conception visuel.

  +o  Une interface d'envoi de courrier electronique. (pouvant prendre en
     charge le courrier entrant et sortant)

  +o  Un Mecanisme de Securite ameliore.

  +o  Un pilote cgi.

  2211..22..  IImmppllaannttaattiioonn

  L'implantation principale de EARP  consiste  en  un  binaire  CGI  qui
  s'execute  sous  le demon http pour fournir l'acces au serveur de base
  de donnees. Tous les  outils  de  conception  sont  integres  dans  le
  pilote,  aucune conception ne se fait sur le web. Les outils eux-memes
  requierent un navigateur graphique, la compatibilite des objets concus
  avec  ces  outils  est  independante de l'implantation, elle ne depend
  uniquement que des preferences de conception individuelles.

  2211..33..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn ppoouurr ffaaiirree ffoonnccttiioonnnneerr EEAARRPP

  EARP est sense fonctionner sur une  grande  variete  de  plates-formes
  avec  peu  de  modifications sinon pas du tout. Les plates-formes pour
  lesquelles le fonctionnement est connu sont les suivantes:

  +o  Solaris 2.5

  +o  Linux 1.2.13+

  +o  GNU C++

  +o  Postgres95 (Version 1.01 / 1.02)

  +o  netsite server

  +o  NCSA httpd

  +o  GNU C++

  +o  Postgres95 (Version 1.01 / 1.02)

  +o  NCSA httpd

  +o  Apache httpd

  2211..44..  NNoouuvveelllleess FFllaasshh

  La version courante (1.3) de Earp a ete concue au-dessus de la version
  de  libpq  livree  avec  Postgres95  v1.01/1.02.  Si vous utilisez une
  version plus recente de Postgres, vous devez vous attendre a ce que le
  programme    necessite   quelques   modifications   pour   fonctionner
  correctement.  Dans la version de developpement (Earp 2.0),  la  prise
  en charge de libpq est en cours de prise en compte en tant que module,
  et de ce fait pourra supporter autant de versions de postgres que nous
  aurons  de  temps pour ecrire ces modules. La version de developpement
  est  attendue,  pour  le  public,   aux   alentours   du   milieu   du
  printemps(97).

  2211..55..  CCoommmmeenntt ffoonnccttiioonnnnee--tt--iill??

  Une  des  fonctionnalites  principales  de  EARP  est  d'utiliser  une
  approche orientee objet pour produire des pages html qui s'interfacent
  a  la  base  de  donnees.  La  plupart  des  pages sont constituees de
  plusieurs objets. Chaque objet est produit par une  sorte  d'outil  et
  recoit  un  nom,  les  objets  sont alors lies ensembles et appeles en
  sequence par l'outil de gestion de pages. Les  objets  sont  egalement
  reutilisables  a  l'interieur de plusieurs pages. Il existe des outils
  de base pour  HTML,  pour  les  Requetes,  pour  la  saisie  dans  des
  formulaires,  le  formatage  variable  des  requetes  et des objets en
  entree, ainsi que pour lier des objets pour en former de nouveaux.  On
  trouve  egalement des outils plus avances tels que l'outil de courrier
  electronique et l'outil de creation de requetes en parallele.

  La  gestion  perfectionnee  de  la  securite  est   une   des   autres
  fonctionnalites  de  EARP.   L'acces  aux differentes zones du systeme
  EARP peut etre limite par une grande variete de moyens. Pour faciliter
  cette  securite  perfectionnee,  EARP  effectue des controles a chaque
  connexion  au  systeme,  et  determine  a  quels  "ids"  et   "groups"
  appartient  l'agent  qui se connecte. Les acces aux zones sont definis
  separement, et la combinaison des deux permet de decider si l'acces  a
  une  certaine  zone  de  Earp  est autorise. De plus , tout ce qui est
  requis pour realiser les fonctionnalites de securite se trouve dans un
  serveur  http  qui  effectue  une  authentification  de  l'utilisateur
  minimale (ou meilleure).

  2211..66..  QQuueellqquueess eexxeemmpplleess eenn lliiggnnee

  Partie integrante de l'aide au SGBD ICC  Help  Database,  la  Page  du
  Catalogue  de  Recherche  est  un  document  EARP  qui  peut  executer
  plusieurs requetes.  Les boites de  selection  sont  generees  par  le
  programme EARP a partir de listes dans la base de donnees.

  Comme autre exemple de ce que l'on peut faire avec EARP... vous pouvez
  maintenant voir la Liste des Objets de la Base de Donnees d'aide.

  La creation de ces trois interfaces m'a pris moins de quinze  minutes.

  2211..77..  OOuu ppuuiiss--jjee llee ttrroouuvveerr??

  EARP  est disponible via un ftp anonyme a  <ftp://ftp.oswego.edu> dans
  le repertoire 'pub/unix/earp'.  La  version  courante  a  la  date  de
  redaction de ce texte est 1.3.1

  S'il  vous plait, apres avoir recupere et mis en service EARP, envoyez
  moi un mot pour en decrire le succes ou les echecs.

  2211..88..  DDooccuummeennttaattiioonn ddiissppoonniibbllee

  Toute la documentation a ete deplacee a la page index "User  Docs  and
  Tutorials" (Documentation Utilisateur et Cours).

  2211..99..  LL''HHiissttooiirree dd''EEAARRPP

  Earp  0.1  a  demarre  en  tant  que  programme  a  l'automne 1995. Je
  travaillais a la realisation d'un livre d'or accessible  par  le  web,
  dynamiquement configurable.  A ce moment la, il y avait tout un tas de
  programmes cgi faisant tous quelque chose  de  different  et  d'utile,
  agreges  par  un  peu  de  colle SSI et un peu de programmation c.  Je
  realisais alors que je faisais beaucoup de travail repetitif,  et  que
  la  plupart  des  choses  que  je  faisais  devaient  executer dans de
  nombreuses fenetres a la fois (netscape, emacs, shell, mail) alors que
  la  mise  au  point  etait  rapidement  devenue un cauchemar.  A cette
  epoque mon ami et patron Don Michaels me contacta. Il etait  interesse
  par  l'automatisation d'une grosse partie de notre support utilisateur
  et par la tenue d'une base de donnees gerant l'historique  des  appels
  et des reponses.

  Peu de temps apres, j'avais termine le schema initial de ce qui est en
  train de devenir rapidement notre base de donnees  d'aide.  Seulement,
  je  rechignais  a  l'idee  de  construire une base de donnees d'aide a
  partir de ce qui etait alors un ensemble tres primitif  d'utilitaires.
  Lorsque  les cours du printemps 96 debuterent, je demarrais quand meme
  le projet, principalement sous le coup de l'ennui,  mais  aussi  parce
  que  j'etais dans un cours d'architecture de base de donnees et que je
  voulais m'entrainer un peu les meninges. Peu de temps apres j'avais un
  prototype acceptable en etat de marche, ce qui rendit Don tres heureux
  car il avait renonce a l'idee de quelqu'un creant une base de  donnees
  d'aide  pour  lui.  (Le  prototype  tourne  encore  sur  l'un  de  mes
  serveurs...(juin 96)) Le prototype faisait  vraiment  quelques  choses
  tres  interessantes,  mais  en avril, j'etais a nouveau decourage... A
  chaque fois que je desirais modifier quelque chose, j'entrais dans  un
  lent  processus  de  recompilation, ou je tombais sur un fichier texte
  particulierement distrayant. Je n'avais aussi aucun  moyen  d'utiliser
  le  concept  de  building block si utile dans EARP... J'ai realise pas
  mal d'enormes coupes-colles. Vers la fin de l'annee  scolaire  je  fus
  encore  une  fois  decourage sur le deroulement des choses et decidais
  que ce dont  j'avais  besoin,  c'etait  d'un  ensemble  d'outils  plus
  adaptes  a  ce  que  je  faisais.  De  plus,  je voulais aussi que mon
  prototype fonctionne sur un e VRAIE base de donnees  relationnelle  et
  je  ne  cherissais  pas  l'idee de recommencer tout ce travail d'acces
  codes en dur, de liens, et de methodes de sortie.

  J'eus un bref moment de repit, si l'on peut dire. Nous  soutenions  la
  Conference  SUNY  CIT et j'ai tellement ete occupe pendant une semaine
  et demi que je pris du recul par rapport a tout ce que  j'avais  ecrit
  sur  le  prototype  de base de donnee d'aide excepte sur les idees que
  j'avais eu quand j'avais ecrit la serie d'utilitaires initiale et  que
  ce qui m'irritait le plus etait l'etat actuel des choses.

  Peu  de  temps  apres  la conference, je commencais le prototype de la
  version actuelle de EARP(may96),  en  utilisant  le  SGBD  relationnel
  postgres95  comme  support. A la mi-juin, le prototype avait evolue en
  une suite integree de prototypes d'outils tout a fait seduisante, avec
  comme  premier  avantage  de tous tourner en html, et de stocker leurs
  donnees d'initialisation dans la base de donnee. La plus grande partie
  de la deuxieme moitie de juin fut consacree a la mise au point du code
  et a l'utilisation de l'interface.( Pendant  ces  deux  semaines  j'ai
  accede  plus  de  5000  fois  a  notre serveur web.) A la fin juin, la
  plupart des bogues importants etaient chasses de EARP, et il  y  avait
  un nombre suffisant d'objets dans la "nouvelle" base de donnees d'aide
  que l'on pouvant en faire  l'annonce  officielle  a  notre  equipe  de
  support.

  A  propos,  j'ai egalement tenu un journal pendant le developpement de
  EARP et Don Michaels et moi presentons un papier decrivant la Base  de
  Donnees  d'Aide  a la conference ACM/SIGUCCS a Chicago en Septembre de
  cette annee.

  2222..  WWWWWW WWeebb iinntteerrffaaccee ppoouurr PPoossttggrreessSSQQLL -- ddbbeennggiinnee

  <http://www.cis-computer.com/dbengine/ >

  Un extrait de la page d'accueil de dbengine est donne ci-dessous:-

  dbengine est une interface Web plug 'n play pour Postgres95 creee  par
  Ingo Ciechowski

  Version 0.82 alpha Documentation au 11/23/96

  A propos de dbengine

  dbengine  est  une  interface entre le WWW et Postgres95 qui permet un
  acces simple a n'importe quelle base de donnees existante en seulement
  quelques minutes.

  Ce  petit  programme  Perl program est ne apres avoir essaye un tas de
  paquetages disponibles tels que AppGen,  PHP-FI  et  d'autres.  Alors,
  pourquoi ai-je, en quelque sorte, reinvente la roue ?

  Eh  bien,  PHP-FI  offre une sorte de langage Perl dans vos documents,
  mais pas le vrai  Perl  alors  que  AppGen  et  wdb-p95  necessite  la
  creation  d'un  fichier  de configuration pour chacune de vos bases de
  donnees -- c'est un peu comme si  vous  deviez  apprendre  un  nouveau
  metalangage avant de pouvoir commencer a travailler.

  C'est a ce moment que je commencais a me sentir plus a l'aise avec une
  petite applet Perl de mon cru... et maintenant mon dbengine est devenu
  un outil qui, je pense, est pret a etre partage avec les autres.

  A  la  difference  des  autres  outils, vous n'avez pas a apprendre un
  langage de programmation particulier ou  un  langage  de  script  pour
  commencer  a  utiliser  dbengine.   De  plus,  il n'y a pas a creer de
  fichier de configuration pour chaque base de donnees, et  vous  n'avez
  donc  pas  besoin de vous familiariser avec sa structure.  Cependant -
  au cas ou  vous  voudriez  profiter  de  toutes  les  possibilites  de
  dbengine, ce serait une bonne idee de connaitre le langage Perl.

  Le  systeme  tout  entier  peut  etre  configure  a  l'aide de simples
  manipulations d'une base de donnees complementaire  qui  contient  les
  informations  de  detail  sur  la maniere de visualiser vos acces a la
  base de donnees. Vous pouvez meme specifier des  Champs  Virtuels  qui
  sont calcules en temps reel avant d'etre affiches a l'ecran.

  Licence

  dbengine  est  un  logiciel libre selon les memes conditions que Perl.
  Lisez sa licence si vous n'etes pas sur de ce que vous  pouvez  ou  ne
  pouvez pas faire. La derniere ligne indique que c'est une version plus
  gentille et plus moderee que celle de la licence GNU -- une  de  celle
  qui  n'affecte  pas  votre  travail  si  vous  extrayez des parties de
  dbengine ou du paquetage pour l'inclure dans un produit commercial!

  2233..  MMoodduullee AAppaacchhee WWeebbsseerrvveerr ppoouurr PPoossttggrreeSSQQLL -- NNeeooSSoofftt NNeeooWWeebbSSccrriipptt

  Apache   est  un  serveur  Web  bien  connu.  On  trouvera  un  module
  d'interface  de  PostgreSQL  pour  le   serveur   Web   Apache   a   -
  <http://www.neosoft.com/neowebscript/>

  Voici, ci-dessous, un extrait de la page d'accueil de NeoWebScript:-

  NeoWebScript  est un langage de programmation qui permet d'inclure des
  programmes simples ou compliques dans des fichiers HTML.

  Quand une page HTML contenant un script NeoWebScript est  appelee,  le
  serveur  Web  ,  ayant le NeoWebScript active, execute le(s) script(s)
  inclus, produisant une page Web dont le contenu, personnalise,  a  ete
  cree par le programme.

  NeoWebScript  est  un  moyen rapide, sure, facile a apprendre de creer
  des programmes interactifs puissants directement en code HTML dans des
  pages  Web.  Avec  NeoWebScript,  les  compteurs,  les  formulaires de
  courrier electronique, "graffiti walls",  livres  d'or  et  suivi  des
  visiteurs  sont  aises,  meme  pour  un programmeur debutant. Regardez
  comment NeoWebScript se defend bien par rapport a PERL et  JavaScript.

  NeoWebScript  2.2  vient  de  sortir!   Le  24 juin 1997, NeoSoft rend
  disponible la version 2.2 de NeoWebScript 2.2, en l'integrant avec  le
  nouveau serveur Apache 1.2.0 .

  Si  vous  utilisez  un  serveur web ayant NeoWebScript installe et que
  vous  vouliez  commencer  a  l'utiliser,  il  y  a  un  tout  un   tas
  d'Informations  Utilisateur  disponibles.  Les  reponses de bases pour
  demarrer  se  trouvent  dans  la   "FAQ   Nouvel   Utilisateur".   Des
  didacticiels  vous  guident dans l'apprentissage du langage, alors que
  des Demonstrations vous apportent des applications toutes  faites  que
  vous  pouvez  telecharger  et  adapter.  Le document "Commandes et les
  Variables" constitue la reference complete du  langage,  et  celui  de
  Maintenance  contient  des  conseils  et des astuces pour vous aider a
  resoudre tous les problemes.

  Au cas ou vous souhaiteriez installer NeoWebScript sur  votre  serveur
  web,  votre  webmestre  doit  lire notre "FAQ Syso" pour se lancer. Le
  document "Theorie de  fonctionnement"  explique  comment  NeoWebScript
  fonctionne, celui d'Installation est un guide pas a pas des operations
  a effectuer. Le guide de Gestion traite de la maniere de configurer et
  de  faire fonctionner le serveur, celui de Tests permet de verifier le
  fonctionnement correct de NeoWebScript, enfin,  celui  de  Maintenance
  traite des problemes de serveur.

  He,   attendez   une   minute   direz-vous,   combien  voulez-vous  en
  contrepartie d'un tel logiciel, hein?  Il  n'y  a  aucuns  frais  pour
  l'utilisation  de  NeoWebScript-2.2  que ce soit pour votre ISP, votre
  intranet, ou votre extranet. Vous pourrez  voir  un  licence  complete
  quand  vous  vous  enregistrerez  pour  telecharger  le logiciel, mais
  l'essentiel est que nous aimerions recevoir la somme monstrueuse de  $
  99  si  vous desirez l'inclure dans votre propre produit ou l'utiliser
  dans un serveur commercial (eg. SSL).

  NeoWebScript est un module pour le serveur web Apache qui vous  permet
  d'inclure  ,  en  tant  que  langage de script, pour vos pages web, le
  langage  de  programmation  Tcl/Tk  .   Il  a  ete  invente  par  Karl
  Lehenbauer,  Directeur  Technique chez NeoSoft, et documente, renforce
  et etendu par les  programmeurs  de  NeoSoft  et  par  des  redacteurs
  techniques.

  Le  serveur  Apache  est  le  serveur  web le plus populaire au monde,
  totalisant 42  %des  1  044  163  sites  interroges  lors  de  l'etude
  "Netcraft  Web  Server"  de  Mai  1997. La deuxieme plus grande valeur
  enregistree concerne les  differents  serveurs  Microsoft,  totalisant
  legerement  plus  de  16  %,  soit  une  difference  d'environ 270,000
  serveurs.

  Tcl/Tk est un langage de script puissant, libre  et  multi-plateformes
  developpe  par  le  Dr. John Ousterhout, maintenant "Sun Distinguished
  Engineer" (n.d.t. : distinction honorifique de la Cie Sun). Selon  ses
  propres termes :

  "Tcl/Tk  permet  aux  developpeurs de logiciels de realiser un travail
  dix fois plus rapidement qu'avec des outils bases sur C ou C++.  C'est
  aussi  un  grand  langage  de  synthese permettant de faire travailler
  ensemble des applications existantes en les rendant plus graphiques et
  orientees Internet."

  Avec  une  communaute de developpement de plus de 500 000 personnes de
  par le monde et des milliers d'applications  commerciales,  Sun  vient
  juste  d'annoncer  la  creation  d'un  nouveau groupe de travail nomme
  SunScript, pour soutenir cette communaute  avec  un  environnement  de
  developpement  integre  et  pour developper une suite de produits pour
  etablir un lien entre Tcl le Web et Java.

  Karl Lehenbauer,  Fondateur  et  Directeur  Technique  de  NeoSoft,  a
  participe  au  developpement  de  Tcl/Tk  des le tout debut. Avec Mark
  Diehkans, ils sont les auteurs de Tcl etendu   (Extended  Tcl),  connu
  egalement  sous  le  nom  de  TclX  ou  NeoSoft  Tcl, qui constitue un
  ensemble puissant d'extensions  au  langage.  Beaucoup  des  commandes
  courantes  essentielles  de  Tcl  proviennent de Tcl etendu, et furent
  introduites dans le langage par le Dr.  Ousterhout.

  NeoSoft Inc., 1770 St. James Place, Suite 500, Houston, TX 77056 USA

  2244..  HHEEIITTMMLL,, eexxtteennssiioonn,, ccoottee sseerrvveeuurr ddee HHTTMMLL eett llaannggaaggee 44GGLL ppoouurr PPoosstt--
  ggrreeSSQQLL

  Heitml est un autre outil d'interfacage de postgres avec le  monde  du
  world wide web.  Pour plus de details contacter

                 Helmut Emmelmann H.E.I. Informationssyteme GmbH
                 Wimpfenerstrasse 23 Tel. 49-621-795141
                 68259 Mannheim Germany Fax. 49-621-795161

  +o  E-mail Mr.Helmut Emmelmann at emmel@h-e-i.de

  +o  Heitml site web principal  <http://www.heitml.com>

  +o  Heitml site web secondaire  <http://www.h-e-i.deom>

  Heitml  est  a  la  fois  une  extension,  cote serveur, de HTML et un
  langage de la quatrieme generation (4GL). Avec lui, on peut ecrire des
  applications  web  dans  un  style  HTML  et en utilisant de nouvelles
  balises de style HTML.

  heitml (prononce "H-ail"-TML) est une extension de HTML et un  langage
  de  quatrieme generation complet permettant aux Applications utilisant
  le web d'interagir avec des donnees stockees dans des bases de donnees
  SQL, sans meriter l'ecriture de scripts CGI complexes.

  heitml etend HTML cote serveur, convertissant de maniere dynamique les
  fichiers ".hei" au format HTML et ainsi, les rendant compatibles  avec
  n'importe quel butineur web. Il englobe la syntaxe simple et familiere
  de HTML et apporte un large assortiment de Balises et de Bibliotheques
  predeveloppees  pour  prendre  en  charge  les  taches  qui auparavant
  necessitaient CGI. De meme que XML,  heitml  permet  l'utilisation  de
  balises  definies par l'utilisateur. Avec heitml les marqueurs definis
  par l'utilisateur peuvent etre  traduits  en  HTML  et  envoyes  a  un
  butineur.

  heitml  est destine a la fois aux concepteurs HTML et aux programmeurs
  professionnels. Les concepteurs  HTML  peuvent  utiliser  les  Balises
  heitml pour fabriquer des pages web dynamiques, des acces aux bases de
  donnees SQL ou creer des applications web completes. On peut creer des
  Compteurs,  des  bases  de  donnees d'inscriptions, des formulaires de
  recherche, des formulaires  de  courrier  electronique  ou  des  menus
  hierarchises  en  utilisant  simplement  des  Balises  de  style  HTML
  predeveloppees que l'on trouve dans les  nombreuses  Bibliotheques  de
  Composants.

  Pour   les   programmeurs,  heitml  inclut  un  langage  de  quatrieme
  generation complet en HTML

                 (e.g. <if>, <while>, et <let> Balises),

  plus un evaluateur d'expression puissant pour  les  types  de  donnees
  entiers, reels, booleens chaine de caracteres et tuple. Les tuples ont
  une reference semantique comme dans les langages orientes objets  mod-
  ernes  et  sont  stockes  sur  un  tas. Les variables heitml y compris
  toutes les structures de donnees complexes stockees sur le tas conser-
  vent leur valeur de page en page par l'utilisation du Mode Session. Il
  vous est possible de  definir  vos  propres  balises  ou  vos  balises
  d'environnement et meme de redefinir les balises HTML.

  Avec heitml il devient possible de

  -  -  -  developper  des Sites Web de maniere structuree et modulaire,
  tout  en  reduisant  de  facon  drastique  la  surcharge  due   a   la
  maintenance.

  -  -  -  developper des Sites Web intelligents et interactifs, dont le
  contenu s'adapte dynamiquement aux besoins de l'utilisateur.

  - - - de visualiser le contenu de bases  de  donnees  SQL  sans  autre
  programmation  que  l'utilisation  de  notre  bibliotheque  de Balises
  predefinies "dba".

  - - - de developper des applications de bases de donnees complexes  et
  de Catalogue d'Achat en utilisant les Variables Session

  heitml  tourne  sous  Linux  avec n'importe quel Serveur Web utilisant
  l'interface CGI, et il est particulierement  rapide  (mis  a  part  la
  surcharge due a CGI) avec le Serveur Web APACHE (version 1.1.1, 1.1.3,
  ou 1.2.4) en utilisant l'API apache. Actuellement MSQL (Version  1  et
  2),  PostgreSQL  (Version 6), mysql, et les bases de donnees yard sont
  supportes. heitml tourne sous Linux, BSDi, Solaris et SunOS,  de  meme
  que sous Windows NT avec CGI, ISAPI et ODBC et Windows 95.

  heitml  (sous  linux)  est  libre  pour  la  recherche,  et  pour  une
  utilisation privee et  non  commerciale.  Les  Sites  Web  commerciaux
  doivent  payer  une  licence.  La version totalement operationnelle de
  heitml  est  disponible  pour  une  periode  d'essai  et   peut   etre
  telechargee  librement.  (Notez, cependant, que chaque page Web ".hei"
  que vous developperez affichera  un  message  indiquant  qu'il  s'agit
  d'une  version  a  usage  non  commerciale. Apres enregistrement, vous
  recevrez une cle pour effacer ce message sans avoir a  reinstaller  le
  programme.)

  Les nouvelles fonctionnalites de la version 1.2 sont

  -  -  -  Bibliotheque  de Composants pour des Formulaires de Recherche
  dans  un  Base  de  Donnees,  menus  hierarchises  d'ouverture  et  de
  fermeture, formulaires de courrier electronique

  -  - - Le Mode Session a ete reconcu et ameliore pour conserver toutes
  les  variables  (y  compris  le  tas  tout  entier)  au  travers   des
  differentes  pages. Cela signifie que les donnees, de n'importe quelle
  taille  sont  conservees  a  l'interieur  d'une  session.  Ceci  offre
  l'opportunite   d'un   champ   plus  large  pour  creer  de  nouvelles
  applications, e.g. stockage complet des resultats d'une  interrogation
  dans la memoire de la session.

  -  -  -  Les  instructions  d'installation,  la  documentation  et les
  bibliotheques d'exemples ont ete augmentees de maniere  significative,
  un cours d'autoformation a ete ajoute

  -  -  -  Des balises pour executer des commandes shell et pour envoyer
  des courriers electronique ont ete ajoutees

  - - - Le support du formatage d'impression et de  la  mise  au  point.
  heitml  affiche  votre  code source en couleurs dans votre butineur et
  signale les erreurs de facon intuitive. En cas d'erreur a l'execution,
  toutes  les  structures  de  donnees  internes  sont affichees dans le
  butineur en indiquant et  preservant  leurs  positions  dans  le  code
  source original.

  -  - - Diverses nouvelles variables serveur et fonctions integrees ont
  ete ajoutees

  - - - En mode production, heitml collecte maintenant des  informations
  completes   sur  les  erreurs  survenues  lors  de  l'acces,  par  des
  utilisateurs, a votre site.

  Voici ce que dit la page d'accueil de heitml -

  heitml  (prononcer   "H-ail"-TML)   etend   et   augmente   de   facon
  significative   les   fonctionnalites   de   HTML  grace  aux  balises
  definissables et aux possibilites completes de programmation.  Ce  qui
  permet  de  creer  simplement des applications au contenu dynamique et
  orientees bases de donnees dans  le  monde  HTML,  sans  CGI  et  sans
  scripts  externes  ou  langages  de  programmation.  Cela signifie que
  vous, en tant qu'auteur HTML, vous  pouvez  inclure  des  applications
  dans  vos  pages  web,  simplement,  en  utilisant  quelques nouvelles
  balises sans  CGI  et  sans  programmation.  D'un  autre  cote,  comme
  utilisateur   avance   ou  comme  programmeur  vous  pouvez  creer  et
  programmer de puissantes bibliotheques  de  balises.   Cette  approche
  rend  heitml  souhaitable  a la fois pour les utilisateurs nouveaux de
  HTML et pour les programmeurs professionnels.  heitml  tourne  sur  le
  serveur  web  et  genere  dynamiquement  du  HTML,  aussi  heitml  est
  compatible avec les standards internet et avec n'importe quel butineur
  web.  Il  permet un acces total aux bases de donnees tout en evitant a
  l'utilisateur toute  la  complexite  inutile  de  CGI.  heitml  a  ete
  developpe  selon  les plus recents criteres en matiere de construction
  de compilateurs et de systemes transactionnels.

  Les pages heitml sont developpees exactement de la meme facon que  les
  pages   HTML,  a l'aide d'un editeur de texte ou d'un editeur HTML, et
  placees comme d'habitude sur le serveur  web.  Cependant,  maintenant,
  les  pages peuvent contenir des balises heitml dynamiques et des acces
  a des bibliotheques de balises. Vous pouvez utiliser ces balises  pour
  acceder  a  une base de donnees, pour creer un contenu dynamique, pour
  envoyer des courriers electronique, et meme pour creer  de  puissantes
  applications  telles  que  les  bases  de donnees d'inscriptions ou de
  systemes d'achats.

  Les nouveaux venus a HTML et les  programmeurs  professionnels  seront
  stupefaits de la vitesse et de la facilites avec lesquelles il peuvent
  concevoir des applications passionnantes telle que  notre  Livre  d'Or
  Interactif sans necessiter la complexite et l'apprentissage difficiles
  des scripts CGI, simplement en utilisant les outils fournis dans notre
  bibliotheque dba.

  heitml est accompagne d'un large eventail de bibliotheques de balises,
  pour creer des livres d'or, des applications de maintenance  de  bases
  de  donnees,  des formulaires puissants de courrier electronique ou de
  structuration de votre site web a l'aide de menus  hierarchiques.  Ces
  outils  sont prets a etre utilises, il suffit simplement d'ajouter les
  balises correspondantes a votre site web.

  En tant que programmeur experimente, vous pouvez  pleinement  utiliser
  l'architecture  dynamique persistante de tuple d'heitml : heitml n'est
  pas  simplement  un  langage  de  script  a  typage  dynamique,   avec
  evaluateur d'expression, procedures recursives et capacites de passage
  de parametres etendues, mais il  apporte  aussi  des  possibilites  de
  tuples  persistants  dynamiques  pour  conserver  automatiquement  des
  donnees de session de n'importe quelle taille.

  heitml a tellement de nouvelles possibilites  et  d'usages  que  c'est
  impossible  de  les decrire tous dans une simple page web.  Pour cette
  raison, nous avons concu ce site Web de maniere  a  fournir  soit  une
  simple  vue  d'ensemble du produit, soit a fouiller aussi profondement
  que vous le desirez dans les "tenants  et  aboutissants"  du  langage.
  Quelle  que  soit l'approche que vous choisirez, nous pensons que vous
  trouverez que heitml a beaucoup a offrir, et nous  esperons  que  vous
  serez d'accord pour trouver que reellement "il porte le monde du World
  Wide Web a un niveau plus eleve!"

  Le menu, sur le cote gauche de l'ecran vous  aidera  a  naviguer  dans
  notre  Site  Web  Site  de  maniere organisee et methodique, mais vous
  pouvez aussi utiliser notre  Menu  Rapide  (Quick  Menu)  pour  sauter
  directement a n'importe quelle page avec un seul clic sur le mulot.

  Si  vous  visitez  ce  Site pour la premiere fois, nous vous suggerons
  d'essayer  le  Livre  d'Or  Interactif   d'heitml   pour   avoir   une
  demonstration  vraiment  impressionnante  de la facon dont heitml peut
  rendre vos Pages Web plus interactives. Si  vous  signez  notre  Livre
  d'Or,  vous  pouvez  nous  laissez  vos commentaires ou nous parler de
  votre Site Web favori en utilisant les commandes de formatage de HTML.
  C'est comme si vous creiez votre propre page Web privee et que vous la
  voyiez publiee immediatement!

  La section traitant des Fonctionnalites de heitml Features  fourni  un
  Sommaire  Rapide  de  ses Fonctionnalites et de ses Avantages, de meme
  que des Pages destinees a repondre  aux  besoins  specifiques  et  aux
  questions  des Concepteurs et des Programmeurs. Notre Guide du Langage
  offre un didacticiel, en  ligne,  qui  montre,  de  maniere  pratique,
  quelques  unes  des  facons  dont  vous  pouvez  utiliser  heitml pour
  developper, ameliorer et simplifier vos Pages Web et vos Applications.

  Le  document Reference du Langage est destine a ceux qui cherchent une
  information specifique sur la syntaxe, la structure, et  l'utilisation
  des  differents  elements  du langage. Cependant, ce pourrait etre une
  bonne idee pour tout le monde de lire la Page concernant la Conception
  Generale  qui  offre  une  vue  d'ensemble  sur les types de problemes
  specifiques pour lesquels heitml a ete concu  afin  d'y  apporter  une
  solution.

  Naturellement,  vous  voudrez  savoir  si heitml tourne sur le Systeme
  d'Exploitation specifique, le Serveur Web, ou le  SGBD  SQL  que  vous
  utilisez,  vous  trouverez  toutes ces informations dans notre section
  des Plates-formes Supportees.

  Enfin, nous vous invitons a Telecharger une copie d'essai du programme
  pour  l'utiliser  sur  votre propre systeme. Nous sommes surs que vous
  apprecierez cette "methode d'essai avant  achat",  et  nous  sommes  a
  l'ecoute  de  tout  retour  d'informations  que vous voudrez bien nous
  donner.

  (c) 1996-1997 H.E.I. Tous droits reserves. (All Rights Reserved)

  2255..  PPHHPP//FFII LLaannggaaggee ddee ssccrriipptt ccoottee sseerrvveeuurr,, aavveecc  HHTTMMLL  iinntteeggrree,,  ppoouurr
  PPoossttggrreeSSQQLL

  Outil d'Interfacage WWW  <http://www.vex.net/php>

  Pour  les   questions   envoyer   un   courrier   electronique   a   :
  rasmus@lerdorf.on.ca

  On trouvera ci-dessous un extrait de la page d'accueil de PHP/FI :-

  PHP/FI  est  un  langage  de  script  cote  serveur, avec langage HTML
  integre.  Il vous permet d'ecrire des scripts simples directement dans
  vos  fichiers .HTML a la maniere JavaScript, sauf que, a la difference
  de  JavaScript,  PHP/FI  n'est  pas  dependant  du  butineur  utilise.
  JavaScript  est  un  langage, cote client, avec HTML integre alors que
  PHP/FI est un langage cote serveur. PHP/FI  est  similaire,  dans  son
  concept,  au  produit  LiveWire Pro pour Netscape. Si vous en avez les
  moyens, vous utilisez le serveur du  commerce  Netscape  et  l'un  des
  systemes  d'exploitation  supportes,  et vous jetterez probablement un
  oeil sur LiveWire Pro. Si vous preferez un  logiciel  libre,  evoluant
  rapidement,  qui  est  disponible avec la totalite de son code source,
  vous apprecierez probablement PHP/FI.

  2255..11..  FFoonnccttiioonnnnaalliitteess pprriinncciippaalleess

  Support de CGI Standard, FastCGI et du module Apache.  Comme programme
  CGI  standard,  PHP/FI peut etre installe sur n'importe quelle machine
  Unix sur laquelle tourne n'importe quel  serveur  web  Unix.  Avec  le
  support  du nouveau standard FastCGI, PHP/FI peut trouver avantage des
  gains de vitesse apportes  par  ce  mecanisme.  Comme  module  Apache,
  PHP/FI devient une alternative extremement puissante et brillante a la
  programmation CGI.

  +o  Enregistrement des acces Avec les possibilites d'enregistrement des
     acces  de  PHP/FI,  les utilisateurs peuvent entretenir leur propre
     compteur d'acces et l'enregistrer. Il n'utilise en aucune facon les
     fichiers  de d'enregistrement des connexions du systeme central, et
     il  permet  un  suivi  des  acces  en  temps  reel.  Le  Script  du
     Visualisateur de Connexions fournit un resume rapide des acces a un
     ensemble de pages possedees par un utilisateur individuel. De plus,
     le  paquetage peut etre configure pour generer un pied de page, sur
     chaque page, qui montre l'information sur les  acces.  Regardez  au
     bas de cette page pour en avoir un exemple.

  +o  Controle  d'acces  Un  ecran  de configuration integre, base sur le
     web, permet la configuration du controle des acces. Il est possible
     de  creer des regles d'acces pour toutes ou quelques unes des pages
     web  possedees  par  une  certaine  personne   qui   met   diverses
     restrictions  sur  qui  peut voir ces pages et comment elles seront
     vues.  Les pages peuvent  etre  protegees  par  un  mot  de  passe,
     completement interdites, a connexion desactivee et l'acces base sur
     le  domaine  du  client,  le  butineur,   l'adresse   de   courrier
     electronique ou meme le document auquel on se refere.

  +o  Support  de  Postgres  Postgres  est un SGBDR (RDBMS) avance libre.
     PHP/FI supporte les requetes Postgres95 et PostgreSQL SQL  incluses
     directement dans les fichiers .html.

  +o  RFC-1867  Support du telechargement de fichier Le telechargement de
     fichier est une nouvelle fonctionnalite de Netscape 2.0.  Il permet
     aux  utilisateurs  de telecharger des fichiers vers le serveur web.
     PHP/FI realise le decodage Mime  reel  pour  faire  ce  travail  et
     fournit aussi le cadre additionnel pour faire quelque chose d'utile
     avec le fichier telecharge une fois que celui-ci a ete recu.

  +o  Controle d'authentification base sur HTTP PHP/FI peut etre  utilise
     pour  creer  des  mecanismes d'authentification personnalises bases
     sur HTTP pour le serveur web Apache.

  +o  Variables,  Tableaux,  Tableaux  associatifs  PHP/FI  supporte  des
     variables  typees,  des tableaux et meme des tableaux associatifs a
     la Perl. Ils peuvent etre  passes  d'une  page  web  a  l'autre  en
     utilisant les methodes GET ou POST.

  +o  Conditions,  Boucles  Tant que (While) PHP/FI possede un langage de
     script aux fonctionnalites completes de style C. Vous disposez  des
     instructions de tests conditionnels if/then/elseif/else/endif ainsi
     que  des  boucles  while  et  des  instructions  switch/case   pour
     controler l'ordre logique et la maniere dont les pages html doivent
     etre affichees.

  +o  Expressions Regulieres etendues  Les  expressions  regulieres  sont
     tres  utilisees  pour  le filtrage, le remplacement de sequences et
     les  manipulations  generales  de  chaines  de  caracteres.  PHP/FI
     supporte   toutes  les  operations  communes  sur  les  expressions
     regulieres.

  +o  Controle de l'En-tete HTTP brute La possibilite d'envoyer a  partir
     de  pages  web  des en-tetes HTTP brutes personnalisees en fonction
     d'une condition est essentielle pour creer  un  site  web  de  haut
     niveau. Un usage frequent est l'envoi d'un emplacement: en-tete URL
     pour rediriger le client appelant vers  une  autre  URL.   Il  peut
     aussi  etre  utilise  pour  stopper  le  stockage  ou  manipuler la
     derniere mise a jour de l'en tete de pages.

  +o  Creation d'images  GIF  a  la  volee  PHP/FI  prend  en  compte  la
     bibliotheque   d'image  GD  de  Thomas  Boutell  ce  qui  offre  la
     possibilite de generer des images GIF a la volee.

  +o  Prise en charge du mode securite ("Safe Mode") ISP PHP/FI prend  en
     charge  un  "Mode  de  Securite" exceptionnel qui permet d'avoir de
     multiples utilisateurs executant des scripts PHP en toute  securite
     sur le meme serveur.

  +o  C'est Libre!  Pour finir, et c'est un point essentiel. Le paquetage
     est entierement libre.  Il est sous les conditions  de  la  licence
     GPL  qui  vous  permet  d'utiliser  ce logiciel pour n'importe quel
     objectif, commercial ou autre.  Reportez-vous  au  document  de  la
     Licence Publique GNU pour des renseignements detailles.

  2255..22..  CCrreeddiittss

  *  De  grandes  parties  de  ce  code  ont  ete  developpees a et pour
  l'universite de Toronto. De grands Mercis a Lee Oattes du  Departement
  de  Developpement  des  Reseaux  a  l'universite  pour  ses  critiques
  constructives permanentes.

  * Le code de prise en charge  de  Postgres95  a  ete  ecrit  par  Adam
  Sussman asussman@vidya.com

  *  d'autres,  innombrables,  ont  participe  aux tests et a la mise au
  point du paquetage.

  PHP/FI Version 2.0

  2255..33..  BBrreeff HHiissttoorriiqquuee

  PHP a commence sa vie comme simple  petite  enveloppe  cgi  ecrite  en
  Perl.   Je  l'ai  ecrit  en un apres-midi, dans une periode entre deux
  contrats, alors que j'avais besoin d'un outil rapide  pour  avoir  une
  idee de la personne qui etait en train de lire mon curriculum vitae en
  ligne. Je n'avais eu l'intention de le voir utiliser en dehors de  mon
  propre  usage.  Le serveur web sur lequel j'avais mon curriculum vitae
  etait extremement  surcharge  et  avait  des  problemes  constants  de
  creation de processus. Je reecris le petit programme Perl en C pour me
  debarrasser de la surcharge considerable generee par la creation  d'un
  processus  d'execution  du  programme  Perl  a  chaque  fois  que  mon
  curriculum vitae etait consulte.

  Par la suite d'autres personnes, sur  le  meme  serveur  web,  prirent
  connaissance  de mon petit programme et me demanderent s'ils pouvaient
  l'utiliser. Alors, comme cela devait arriver, ils  commencerent  a  me
  demander  plus  de fonctionnalites. J'ajoutais plus de fonctionnalites
  et finalement constituais une  semi-distribution  en  y  incluant  une
  documentation,  une  liste  de  diffusion  et  une  FAQ.  Le nom de ce
  paquetage etait "Outils pour une Page d'Accueil Personnelle" (Personal
  Home  Page  Tools),  nom  qui devint plus tard "Kit de Construction de
  Page d'Accueil Personnelle" (Personal Home Page Construction Kit).

  A la meme epoque, je commencais a m'amuser avec les bases  de  donnees
  et  j'ecrivis  un  outil pour inclure facilement des requetes SQL dans
  des pages web. C'etait fondamentalement un autre petit  programme  CGI
  qui   analysait   les  requetes  SQL  et  facilitait  la  creation  de
  formulaires et de tables bases sur ces requetes. Cet outil fut  appele
  FI "Interpreteur de Formulaire" (Form Interpreter).

  La  version  2.0  PHP/FI  est  une  reecriture  complete  de  ces deux
  paquetages combines pour former un simple programme. il  a  maintenant
  evolue  au point de devenir un simple langage de programmation integre
  dans les fichiers HTML.  L'acronyme original, PHP, lui est  reste.  Il
  n'est  plus reellement approprie.  PHP/FI est aujourd'hui plus utilise
  pour mettre en place des sites web entiers que pour de  petites  pages
  d'accueil personnelles. Quel que soit son nom, il elimine le besoin de
  recourir a de  nombreux  petits  programmes  cgi  Perl  en  permettant
  d'inserer de simples scripts directement dans vos fichiers HTML.  Ceci
  ameliore les  performances  globales  de  vos  pages  web  puisque  la
  surcharge  due  au  lancement  de  processus  Perl  successifs  a  ete
  eliminee. La gestion de larges sites web a egalement ete facilitee  en
  placant  tous  les  composants  d'une  page  web  dans un fichier html
  unique. En incluant le support de differentes  bases  de  donnees,  il
  devient  trivial  de  developper  des  pages web mettant en oeuvre des
  bases  de  donnees.  Nombreux  sont  ceux  qui  trouvent   que   cette
  integration  est  plus  facile  a  gerer  que  d'essayer  de creer des
  fichiers HTML et CGI separes.

  Tout au long de cette documentation, toute  reference  a  PHP,  FI  ou
  PHP/FI  traite  de  la  meme  chose. La difference entre PHP et FI est
  seulement conceptuelle. Les deux sont construits a partir de  la  meme
  distribution  du  code  source. Lorsque je construit le paquetage sans
  aucun support de connexion d'acces ou de restriction d'acces, je nomme
  mon  binaire FI.  Quand je le construit avec ces options, je l'appelle
  PHP.

  2255..44..  BBoonn,, qquuee ppuuiiss--jjee ffaaiirree aavveecc PPHHPP//FFII??

  La premiere chose que vous allez noter, si  vous  faites  tourner  une
  page par l'intermediaire de PHP/FI, c'est qu'il ajoute un pied de page
  vous informant du nombre d'acces a votre  page  (si  vous  incluez  le
  support des connexions d'acces dans votre binaire). C'est seulement un
  tout petit exemple de ce que PHP/FI peut  faire  pour  vous.  Il  joue
  egalement  le  role  tres  important d'interpreteur de formulaire cgi,
  d'ou la partie FI de son nom. Par exemple si vous creez un  formulaire
  dans  l'une  de  vos pages web, vous avez besoin de quelque chose pour
  traiter l'information  contenue  dans  ce  formulaire.  Meme  si  vous
  desirez  simplement  passer  l'information  a une autre page web, vous
  aurez besoin  d'un  programme  cgi  pour  le  faire.  PHP/FI  facilite
  grandement  le  processus de prise en charge des donnees du formulaire
  pour en faire quelque chose.

  2255..55..  UUnn ssiimmppllee eexxeemmppllee

  Supposons que vous ayez le formulaire :

       <FORM ACTION="/cgi-bin/php.cgi/~userid/display.html" METHOD=POST>
       <INPUT TYPE="text" name="name">
       <INPUT TYPE="text" name="age">
       <INPUT TYPE="submit">
       <FORM>

  Votre fichier display.html doit contenir quelque chose du genre :

  < ?echo "Hi $ name, vous avez $ age ans!

  " >

  C'est aussi simple que cela! PHP/FI cree automatiquement une  variable
  pour  chaque  champ  de  saisie de votre formulaire. Vous pouvez alors
  utiliser ces variables dans le fichier ACTION URL.

  L'etape suivante, apres avoir vu comment utiliser ces  variables,  est
  de  commencer  a jouer avec quelques balises de gestion du deroulement
  logique de vos pages. Par exemple, si vous voulez afficher  differents
  messages  dependants  de  des  informations entrees par l'utilisateur,
  vous pouvez utiliser la logique si/alors (if/else). Dans notre exemple
  ci-dessus,  on  peut  afficher  differentes  choses dependant de l'age
  entre par l'utilisateur en modifiant notre fichier display.html en :

       <?
           if($age>50);
               echo "Hi $name, vous etes un fossile!<p>";
           elseif($age>30);
               echo "Hi $name, vous etes tres vieux!<p>";
           else;
               echo "Hi $name.";
           endif;
       >

  PHP/FI fournit un langage de  script  tres  puissant  qui  peut  faire
  beaucoup plus que ce qui est expose dans l'exemple ci-dessus. Regardez
  la section sur le langage  de  Script  PHP/FI  pour  des  informations
  complementaires.

  Vous  pouvez  egalement utiliser PHP/FI pour configurer qui a le droit
  d'acceder a vos pages. Ceci  est  effectue  en  utilisant  l'ecran  de
  configuration  inclus.   Par  son  intermediaire  ,  vous pourrez, par
  exemple, specifier que seulement les gens  appartenant  a  un  certain
  domaine seront autorises a voir vos pages, vous pouvez egalement creer
  une regle protegeant certaines pages par un  mot  de  passe.  Voir  la
  section Controle d'Acces pour plus de details.

  PHP/FI  est egalement capable de recevoir des fichiers telecharges par
  n'importe  quel  butineur  conforme  a  la   norme   RFC-1867.   Cette
  fonctionnalite  permet  aux gens de telecharger egalement des fichiers
  de texte ou binaire.  Avec le controle  de  PHP/FI  et  les  fonctions
  logiques,  vous  disposez  d'un  controle total sur qui est autorise a
  telecharger un fichier et sur ce que l'on peut faire de ce fichier une
  fois  telecharge.  Voir  la  section Telechargement de fichier pour de
  plus amples details.

  PHP/FI supporte le paquetage Postgres95. Il supporte les requetes  SQL
  incluses  dans  vos  fichiers  .HTML.  Consultez  la  section  Support
  Postgres95 pour plus d'informations.

  PHP/FI supporte egalement le paquetage du SGBD mysql. Il supporte  les
  requetes  SQL  incluses  dans vos fichiers .HTML. Consultez la section
  Support mysql pour plus d'informations.

  2255..66..  RReeddiirreeccttiioonn CCGGII

  Notes Apache 1.0.x

  Une bonne maniere de faire tourner PHP/FI est d'utiliser un module  de
  redirection cgi avec le serveur Apache. Veuillez noter que vous n'avez
  pas a vous soucier des modules de  redirection  si  vous  utilisez  la
  version  module  Apache  de PHP/FI. Deux de ces modules de redirection
  sont disponibles. L'un est developpe par Dave Andersen  angio@aros.net
  et                  est                  disponible                  a
  ftp://ftp.aros.net/pub/util/apache/mod_cgi_redirect.c    et    l'autre
  arrive  inclus  avec  Apache  et  est  appele  mod_actions.c. Ces deux
  modules sont extremement similaires.  Ils  different  tres  legerement
  dans  leur  utilisation.  Les deux ont ete testes et fonctionnent avec
  PHP/FI.

  Mise en garde importante: a la date de cette redaction (Apr.20/96), la
  version  courante  officielle  (1.0.5)  a  de  severes limitations qui
  empechent les requetes de redirection  cgi  d'avoir  des  donnees  ???
  post-method  data  associees.  J'ai etudie ce problemes et l'ai resolu
  dans ma version d'Apache. Il  y  a  un  colmatage  officiel  dans  les
  Fichiers Archives de la Page d'Accueil.

  Une  autre mise en garde particulierement importante au sujet d'Apache
  1.0.x est qu'il n'aligne pas correctement les  types  doubles  sur  la
  plupart  des architectures. Vous decouvrirez d'etranges erreurs de bus
  provenant de votre  httpd en utilisant mod_php. Comme  solution,  soit
  vous  passez  a  la  version  Apache  1.1, soit vous editez le fichier
  source Apache alloc.c. Dans ce fichier vous trouverez  le  morceau  de
  code suivant :

  union  align  { /* Types which are likely to have the longest RELEVANT
  alignment * restrictions... we don't do much with doubles.  */

  char *cp; void (*f)(); long l; FILE *fp; };

  Il vous faudra ajouter un type double a ce source et recompiler  votre
  serveur Apache. Le morceau de code correct est :

  union  align  { /* Types which are likely to have the longest RELEVANT
  alignment * restrictions... we don't do much with doubles.  */

  char *cp; void (*f)(); long l; FILE *fp; double d; };

  Regardez dans la documentation Apache  sur  la  maniere  d'ajouter  un
  module.   En  general  vous  ajoutez  le nom de module dans un fichier
  appele Configuration. La ligne a ajouter si vous  voulez  utiliser  le
  module mod_actions est :

  Module action_module mod_actions.o

  Si  vous  envisagez  d'utiliser  le  module mod_cgi_redirect.c ajoutez
  cette ligne :

  Module cgi_redirect_module mod_cgi_redirect.o

  Puis  compilez  votre  httpd  et  installez-le.  Pour  configurer   la
  redirection  cgi  il  vous faudra soit creer un nouveau type mime dans
  votre fichier mime.types soit utiliser la commande AddType dans  votre
  fichier  srm.conf  pour  ajouter  le type mime. Le type mime a ajouter
  doit etre quelque chose comme :

  application/x-httpd-php phtml

  Si vous vous appretez a  utiliser  le  module  mod_actions.c  il  vous
  faudra ajouter la ligne suivante dans votre fichier srm.conf:

  Action application/x-httpd-php /cgi-bin/php.cgi

  Si  vous  vous  appretez  a  utiliser  mod_cgi_redirect.c  vous devrez
  ajouter cette ligne a srm.conf :

  CgiRedirect application/x-httpd-php /cgi-bin/php.cgi

  N'essayez   pas   d'utiliser   en   meme   temps   mod_actions.c    et
  mod_cgi_redirect.c .

  Une fois que vous avez l'un de ces modules de redirection cgi installe
  et configure correctement, vous pouvez specifier que vous voulez qu'un
  fichier  soit  filtre  par  php/fi  en  mettant simplement l'extension
  .phtml au fichier. De plus, si vous ajoutez index.phtml a votre  ligne
  de  configuration  DirectoryIndex dans votre fichier srm.conf alors la
  page de plus haut niveau d'un repertoire sera automatiquement  filtree
  par php si vous appelez votre fichier index index.phtml.

  HTTPD Netscape

  Vous  pouvez  rediriger automatiquement les requetes pour des fichiers
  ayant une extension donnee de facon a ce qu'ils soient pris en  compte
  par  PHP/FI  en  utilisant  le  module  de  Redirection du Serveur CGI
  Netscape.  Ce module est disponible dans le  Fichier  Archives  de  la
  Page  d'Accueil  de the PHP/FI. Le fichier LIZSEZ_MOI (README) dans le
  paquetage explique clairement comment le  configurer  pour  l'utiliser
  avec PHP/FI.

  HTTPD NCSA

  Actuellement  NCSA  ne  supporte pas les modules, donc, pour effectuer
  une redirection cgi avec ce serveur, il vous faudra modifier  le  code
  source  de  votre  serveur. Un colmatage pour faire cela avec NCSA 1.5
  est disponible dans le fichier archives de PHP/FI.

  2255..77..  LLaanncceerr PPHHPP//FFII aa ppaarrttiirr ddee llaa lliiggnnee ddee ccoommmmaannddee

  Si vous fabriquez la version CGI de  PHP/FI,  vous  pouvez  l'utiliser
  simplement  a  partir  de  la  ligne  de  commande, en tapant: php.cgi
  nom_de_fichier ou  nom_de_fichier  est  le  fichier  que  vous  voulez
  filtrer.  Vous  pouvez egalement creer des scripts PHP/FI autonomes en
  faisant ressembler la premiere ligne de votre script a  quelque  chose
  comme :

           #!/usr/local/bin/php.cgi -q

  L'option  "-q"  supprime  l'impression  des en-tetes HTTP. Vous pouvez
  vous passer de cette option si vous le desirez.

  2266..  IInntteerrffaaccee PPyytthhoonn ppoouurr PPoossttggrreeSSQQLL

  PyGres95 est une  interface  pour  PostgreSQL.  Il  est  disponible  a
  <ftp://ftp.via.ecp.fr/pub/python/contrib/Database/PyGres95-1.0b.tar.gz
  >

  On trouvera ci-dessous un extrait de la page d'accueil de PyGres95:-

  PyGres - v1.0b : module Postgres95 pour Python

  PyGres95, version 1.0b Une interface Python pour la  base  de  donnees
  Postgres95.  Ecrit par Pascal Andre, andre@chimay.via.ecp.fr

  Postgres95  est un SGBD derive de Postgres4.2. Il est conforme a (pour
  la plupart) ANSI SQL et offre beaucoup de  possibilites  interessantes
  (Liens  dynamiques  C  pour les fonctions ou les definitions de types,
  temps de reponse, ...). Ce paquetage est protege par un  copyright  de
  l'Universite  de Californie (Regents of the University of California),
  et est diffusable librement.

  Python est un langage de  programmation  interprete.  Il  est  oriente
  objet  et facile d'utilisation (syntaxe legere, simple et instructions
  simples), et dispose de  nombreuses  extensions  pour  construire  des
  GUIs,  des  interfaces  WWW,...  Un  butineur  web "intelligent" (a la
  HotJava) est actuellement en cours de developpement  (november  1995),
  et  cela  devrait ouvrir de nombreuses portes aux programmeurs. Python
  est protege  par  un  copyright  de  Stichting  Mathematisch  Centrum,
  Amsterdam, Pays-Bas, et est diffusable librement.

  PyGres95  est  un  module  python  d'interface  a  la  base de donnees
  Postgres95 . Il  comprend  une  bibliotheque  de  requetes  Postgres95
  permettant  une  utilisation  facile des fonctionnalites puissantes de
  Postgres95 en cooperation avec tous les autres modules python.   Il  a
  ete  developpe  sur un systeme Linux 1.3/ELF, mais a ete teste sur une
  plate-forme Solaris 2.4. De toutes facons, il devrait fonctionner  sur
  toute plate-forme ou  python et postgres95 sont disponibles.

  2266..11..  OOuu llee ttrroouuvveerr ...... ??

  Les sites principaux des differents paquetages sont :

  +o  Python :      <ftp.python.org:/pub/python>

  +o  Postgres95 :  <ftp.s2k-ftp.cs.berkeley.edu:/pub/postgres95>

  +o  PyGres95 :    <ftp.via.ecp.fr:/pub/python/contrib>

  Vous  devriez  cependant  essayer  de trouver un site miroir proche de
  votre propre site. Consultez les sources  d'information  pour  trouver
  ces  sites.   PyGres95 devrait se trouver dans les repertoires contrib
  des sites Python et Postgres95.

  2266..22..  IInnffoorrmmaattiioonn eett ssuuppppoorrtt

  Si vous avez besoin d'informations concernant ces paquetages  veuillez
  consulter leurs sites web:

  +o  Python :      <http://www.python.org/>

  +o  Postgres95                                                        :
     <http://epoch.cs.berkeley.edu:8000/postgres95/index.html>

  +o  PyGres95 :    <http://www.via.ecp.fr/via/products/pygres.html>

  Pour un support :

  +o  Python :     newsgroup comp.lang.python

  +o  Postgres95  :  mailing  list   (see   package   documentation   for
     information)

  +o  PyGres95   :     contact  me  andre@via.ecp.fr  pour  des  rapports
     d'erreurs, des idees et des remarques

     J'essaierai de repondre dans la mesure ou mon  temps  libre  me  le
     permettra.

  2277..  PPaasssseerreellllee eennttrree PPoossttggrreeSSQQLL eett WWWWWW -- WWDDBB--PP9955

  WDB-P95 - Une interface Web interface aux bases de donnees Postgres95.
  C'est a   <http://www.eol.ists.ca/~dunlop/wdb-p95/>

  Voici un extrait de la page d'accueil de WDB-P95 :-

  Version 1.4b2 beta - Creee par J. Douglas Dunlop

  A propos de wdb-p95

  C'est une version modifiee de wdb-1.3a2 qui fournit une passerelle WWW
  a Postgres95. Cette version necessite egalement un Butineur capable de
  prendre en compte les Tables HTML pour avoir une sortie tabulee.  Ceci
  n'est  pas  requis  pour  le   wdb  original  et  on peut facilement y
  revenir.  (Je voulais seulement les tables parce que  je  n'etais  pas
  d'accord avec les commandes < et >!)

  Vous  pouvez  essayer ma Bande CASI et ma Requete d'Image. Vous pouvez
  jeter un coup d'oeil au Fichier de Definition de Formulaire (FDF)  que
  j'ai utilise pour creer la Bande CASI et egalement la Requete d'Image,
  qui comprends une jointure (JOIN) de 2 tables.

  Cette version contient tous les fichiers necessaires pour installer et
  faire  tourner  WDB-P95  en  tant  qu'interface a vos bases de donnees
  Postgres95 . Le portage de ce systeme pour une autre base  de  donnees
  devrait etre relativement facile - a condition qu'elle supporte le SQL
  standard et possede une interface Perl.

  2277..11..  LLee sseerrvveeuurr PPoossttggrreess9955,, ppggppeerrll,, eett hhttttppdd ddooiivveenntt--iillss rreessiiddeerr ssuurr
  llee mmeemmee hhoottee??

  Non - Le serveur Postgres95 n'a pas a etre sur  le  meme  hote.  Comme
  WDB-P95  est appele par le demon http, ils doivent resider sur le meme
  hote. - Et comme WDB-P95 a ete ecrit pour utiliser Pg.pm - pgperl doit
  etre  sur  le  meme hote egalement. Pgperl a ete ecrit en utilisant la
  bibliotheque libpq, donc, il sera capable d'acceder a  n'importe  quel
  serveur  Postgres95  n'importe ou sur le reseau, juste comme n'importe
  quel autre client Postgres95. Comme illustre ci-dessous

  {WWW Client (Netscape)} => {HTTP Server  (NCSA's  http)  +  WDB-P95  +
  pgperl + libpq}=> {Postgres95 server}

  Les parentheses () representent les machines.

  Chaque  machine  peut etre d'un type different : NT, SUN, HP, ... mais
  il faut que vous ayez la bibliotheque d'interface libpq pour  le  type
  de  machine  sur  lequel  vous envisagez d'utiliser WDB-P95, puisqu'il
  vous faut compiler pgperl.  (Le systeme a ete concu pour utiliser  les
  tables HTML donc un client WWW recent est meilleur)

  2277..22..  NNoouuvveellllee VVeerrssiioonn

  Les  nouvelles  versions  du  logiciel  et  des  pages  ci-dessus sont
  toujours disponibles  a  partir  de  la  page  d'Accueil  de  WDB-P95.
  <http://www.eol.ists.ca/~dunlop/wdb-p95/>

  Pour  les  questions  et  pour  s'inscrire  aux  listes  de  diffusion
  contacter dunlop@eol.ists.ca

  2288..  IInntteerrffaaccee aauu llaannggaaggee ""CC"" ppoouurr PPoossttggrreeSSQQLL

  Elle est incluse dans la distribution et s'appelle 'libpq'.  Elle  est
  similaire   aux  bibliotheques  OCI  Oracle,  DB-lib  Sybase,  ou  CLI
  Informix.

  2299..  IInntteerrffaaccee aauu llaannggaaggee ""CC++++"" ppoouurr PPoossttggrreeSSQQLL

  Elle est incluse dans la distribution et est nommee 'libpq++'.

  3300..  EESSQQLL//CC ppoouurr PPoossttggrreeSSQQLL

  C'est un precompilateur C integre pour PostgreSQL ESQL/C  comme  Pro*C
  d'Oracle, et ESQL/C d'Informix :

  +o  <ftp://ftp.lysator.liu.se/pub/linus>

  +o  Email : linus@epact.se

  ESQL/C pour PostgreSQLest une interface de programmation d'application
  SQL (API) qui permet  au  programmeur  C  de  creer  des  applications
  personnalisees  avec  des  possibilites de gestion de base de donnees.
  ESQL/C pour PostgreSQL vous permet d'utiliser un langage de  troisieme
  generation  avec  lequel  vous  etes familiarise tout en profitant des
  avantages d'un Langage de Requetes Structure (SQL).

  ESQL/C est compose des elements logiciels suivants:

  +o  Les bibliotheques ESQL/C de fonctions C fournissent  les  acces  au
     serveur de base de donnees.

  +o  Les   fichiers  d'en-tete  ESQL/C  apportent  les  definitions  des
     structures de donnees, les constantes et les macros utiles dans  un
     programme ESQL/C.

  +o  Le  preprocesseur  ESQL/C,  qui est un preprocesseur de code source
     qui transforme un fichier  C  contenant  des  instructions  SQL  en
     fichier executable.

  3311..  OOppeerraatteeuurrss BBiitt--ppaarr--BBiitt ppoouurr PPoossttggrreeSSQQLL

  Les  operateurs  Bit-par-Bit  ont  ete  ecrits  par  Nicolas Moldavsky
  nico@overnet.com.ar

  Ce sont des fonctions "C" qui implantent  les  operateurs  bit-par-bit
  (AND,  OR,  XOR,  bit  complement) dans pgsql. Si quelqu'un desire les
  utiliser, il peut les recuperer par ftp anonyme de

  +o  <ftp://ftp.overnet.com.ar/pub/utils/linux/bitpgsql.tgz>

  De plus, il y a un "Makefile" qui marche bien sous Linux.

  3322..  LLeess CCooddeess KKaannjjii JJaappoonnaaiiss ppoouurr PPoossttggrreeSSQQLL

  Sont tres utiles pour les Japonais.  On les trouvera au site suivant :
  <ftp://ftp.sra.co.jp/pub/cmd/postgres/>

  3333..  PPoorrttaaggee ddee PPoossttggrreeSSQQLL PPoorrtt ppoouurr WWiinnddoowwss 9955//WWiinnddoowwss NNTT

  Un portage pour Windows 95/Windows NT est en cours de realisation.  Ce
  portage de fait en utilisant  gcc, gmake pour Win NT/95. Le  programme
  gnu-win32  est  utilise  pour compiler le code source sous win32.  GNU
  gcc est disponible pour win32. Consultez ce site -

  +o  <http://www.cygnus.com/misc/gnu-win32>

     Recuperez-y le fichier cdk.exe (fichier auto-extractible pour  gnu-
     win32)

  Le   portage   peut  egalement  etre  realise  en  utilisant   l'outil
  "Emulateur Unix sous NT" (Unix-Emulator on NT) suivant de

  +o  <http://www.softway.com>

  3344..  LLiisstteess ddee DDiiffffuussiioonn eett GGrroouuppeess ddee DDiissccuussssiioonn

  Il y a un groupe de discussion pour PostgreSQL  a  news.postgresql.org
  Veuillez suivre les etapes suivantes pour vous inscrire

  1. Choisir : Fenetre | Netscape News
  2. Choisir : Fichier | Open News Host
  3. Taper news.postgresql.org dans la boite de dialogue.
  4. Le nom du groupe de discussion est comp.databases.postgresql.questions.
  Pour l'ajouter, cliquez avec le bouton de droite sur news.postgresql.org, et
  choisir : Add Newsgroup.
  Taper alors le nom du groupe de discussion dans la boite de dialogue. Le
  groupe de discussion sera ajoute a la liste dans l'ecran de gauche.
  5. Les noms des Groupes de Discussion seront listes dans l'ecran de gauche.
  Tous les messages, dans les groupes selectionnes, seront affiches dans
  l'ecran de droite.

  Regardez les Titres des Listes de Diffusion sur la page web principale
  a : <http://www.postgresql.org/>

  +o  Envoyez  vos  questions  par  courrier   electronique   a:   pgsql-
     questions@postgresql.org

  +o  Developpeurs pgsql-hackers@postgresql.org

  +o  Questions specifiques a un portage pgsql-ports@postgresql.org

  +o  Questions concernant la documentation pgsql-docs@postgresql.org

     Vous  recevrez  une  reponse,  par  courrier  electronique, dans la
     journee qui suit!!

  Vous pouvez egalement vous inscrire aux  listes  de  diffusion.   Pour
  vous inscrire ou vous radier d'une liste, envoyez un courrier a

  +o  pgsql-questions-request@postgresql.org

  +o  pgsql-hackers-request@postgresql.org

  +o  pgsql-ports-request@postgresql.org

  +o  pgsql-docs-request@postgresql.org

     Le corps du message doit uniquement contenir la simple ligne

  subscribe

  (ou)

  unsubscribe

  Il y a aussi des listes de diffusion qui sont archivees au format html
  a l'endroit suivant -

  +o  <ftp://ftp.postgresql.org> dans le repertoire /pub/majordomo

  3355..  LLiivvrreess eett DDooccuummeennttaattiioonnss

  On trouve dans la distribution

  +o  Le 'Guide Utilisateur' pour PostgreSQL,

  +o  Le 'Guide de Realisation' detaillant  la  constitution  interne  de
     PostgreSQL.

  +o  Les manuels "en ligne".

  +o  Le manuels en ligne au format HTML.

  +o  Egalement  les manuels au format Postscript pour faire des editions
     papier.

  Documents de Reference: Ouvrages de reference utiles :

  +o  "Understanding the  New  SQL:  A  Complete  Guide"  (Comprendre  le
     Nouveau  SQL:  Un  Guide  Complet)-  by Jim Melton and Alan R.Simon
     Morgan Kaufman Publisher. C'est un des meilleurs livres sur SQL.

  +o  "A Guide to THE SQL STANDARD" (Un  Guide  du  STANDARD  SQL)  -  by
     C.J.Date  Addison-Wesley Publishing company. C'est egalement un bon
     livre

            Stephen Cannan and Gerard Otten
            SQL - The Standard Handbook ,  Novembre 1992 (SQL - Le Manuel Standard)
            McGraw-Hill Book Company Europe , Berkshire, SL6 2QL, England

            Martin Gruber, Technical Editor: Joe Celko
            SQL Instant Reference , 1993 (SQL Reference Immediate)
            SYBEX Inc.  2021 Challenger Drive Alameda, CA 94501

  Des  centaines  d'autres  titres  concernant  SQL  sont   disponibles!
  Verifiez-le dans une librairie.

  3366..  SSuuppppoorrtt TTeecchhnniiqquuee ppoouurr PPoossttggrreeSSQQLL

  +o  Vous  pouvez  envoyer  par  courrier  electronique les questions ou
     problemes techniques auxquels vous devez  faire  face  a  :  pgsql-
     questions@postgresql.org

     et  vous  recevrez  par  courrier  electronique une reponse dans la
     journee qui suit.

  Dans un futur proche,  l'organisation  PostgreSQL  vendra  un  support
  technique  aux  petites  et  grandes  compagnies, les revenus de cette
  activite serviront a entretenir plusieurs sites miroirs (web and  ftp)
  partout  dans  le monde. Ces revenus pourront aussi servir a creer une
  documentation imprimee, des guides, des livres pour aider les clients.
  Les  profits seront egalement a organiser des conferences annuelles ou
  les clients et professionnels pourront trouver et echanger  des  idees
  et   des   papiers   techniques.  Ceci  devrait  aider  l'organisation
  PostgreSQL a se tenir debout.

  3377..  AAssppeeccttss EEccoonnoommiiqquueess eett CCoommmmeerrcciiaauuxx

  Les bases de donnees commerciales paient de  nombreuses  taxes  telles
  que des taxes federales, d'etat, sur les ventes, sur les salariees, la
  securite sociale, les taxes pour les soins  medicaux,  des  Indemnites
  pour  les  employes,  des couts de marketing et de publicite. Tous ces
  couts ne sont pas destines directement au developpement de la base  de
  donnee.  Quand vous achetez une base de donnees commerciale une partie
  du montant est  destine  aux  taxes,  aux  depenses  de  recherche  et
  developpement  (  R&D ). Donc la valeur reelle pour la base de donnees
  est beaucoup plus faible.
  De plus les bases de donnees commerciales  doivent  payer  pour  leurs
  immeubles/biens et pour l'achat de machines Unix, leur installation et
  leur maintenance. Tous ces couts sont repercutes sur les clients.

  PostgreSQL possede l'avantage, sur les bases de donnees  commerciales,
  de  ne  pas  supporter  de taxes puisque developpee sur l'internet. Un
  tres grand nombre de personnes contribuent a  son  developpement.  Par
  exemple,  dans  un cas hypothetique, s'il y a un million de compagnies
  aux U.S.A et que chacune contribue pour environ $  10  (en  valeur  de
  logiciel pour PostgreSQL) alors, chaque compagnie recevra dix millions
  de dollars!! C'est cela la magie du developpement sur internet.

  Actuellement, le code source de PostgreSQL est constitue d'environ 200
  000  lignes  de  code "C" et "C++". Si le cout de chaque ligne de code
  "C" est evalue a $ 10, alors le cout total de  PostgreSQL,  tel  qu'il
  est aujourd'hui est de $ 2 000 000 (deux millions de dollars!!).

  De  nombreuses  compagnies  ont deja developpe de grandes quantites de
  code "C", "C++" maison. Donc, en prenant le code source de  PostgreSQL
  et  en  collaborant avec les autres compagnies sur internet, cela leur
  beneficierait beaucoup en leur faisant  economiser  du  temps  et  des
  efforts.

  3388..  SSppeecciiffiiccaattiioonnss AANNSSII//IISSOO SSQQLL -- SSQQLL 11999922,, SSQQLL 11999988

  3388..11..  DDooccuummeennttss dduu ssttaannddaarrdd NNaattiioonnaall eett IInntteerrnnaattiioonnaall AANNSSII//IISSOO SSQQLL

  Ces documents sont situes a l'endroit indique ci-dessous. Il y a  deux
  documents, le premier et le second, veuillez lire les deux.

  +o  Aller         a         l'endroit         indique        ci-dessous
     <ftp://ftp.postgresql.org/pub/incoming/ANSI-ISO-SQL-SPECIFICATIONS>
     Et  cliquer  sur  les  deux  fichiers nommes CLICK_ME_FIRST.html et
     CLICK_ME_SECOND.html

  +o  <http://www.naiua.org/std-orgs.html>

  +o  <http://www.ansi.org/docs> cliquer sur  le  fichier  cat_c.html  et
     effectuer une recherche de "Database SQL"

  +o  Standard  SQL92   <http://www.jcc.com>  et  cliquer  sur le fichier
     sql_stnd.html

  3388..22..  SSyynnttaaxxee ddee ll'' AANNSSII//IISSOO SSQQLL 11999922

  Ce fichier contient la grammaire en BNF du langage, arborescence
  exploree d'abord en profondeur, realisee le 27-AOUT-1992 11:03:41.64.
  La version specifique de BNF donnee ici est :
  ANSI et SQL2-seulement.

  <SQL terminal character> ::=
        <SQL language character>
      | <SQL embedded language character>

  <SQL language character> ::=
        <simple Latin letter>
      | <digit>
      | <SQL special character>

  <simple Latin letter> ::=
        <simple Latin upper case letter>
      | <simple Latin lower case letter>

  <simple Latin upper case letter> ::=
            A | B | C | D | E | F | G | H | I | J | K | L | M | N | O
      | P | Q | R | S | T | U | V | W | X | Y | Z

  <simple Latin lower case letter> ::=
            a | b | c | d | e | f | g | h | i | j | k | l | m | n | o
      | p | q | r | s | t | u | v | w | x | y | z

  <digit> ::=
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

  <SQL special character> ::=
        <space>
      | <double quote>
      | <percent>
      | <ampersand>
      | <quote>
      | <left paren>
      | <right paren>
      | <asterisk>
      | <plus sign>
      | <comma>
      | <minus sign>
      | <period>
      | <solidus>
      | <colon>
      | <semicolon>
      | <less than operator>
      | <equals operator>
      | <greater than operator>
      | <question mark>
      | <underscore>
      | <vertical bar>

  <space> ::= !! <EMPHASIS>(space character in character set in use)

  <double quote> ::= "

  <percent> ::= %

  <ampersand> ::= &

  <quote> ::= '

  <left paren> ::= (

  <right paren> ::= )
  <asterisk> ::= *

  <plus sign> ::= +

  <comma> ::= ,

  <minus sign> ::= -

  <period> ::= .

  <solidus> ::= /

  <colon> ::= :

  <semicolon> ::= ;

  <less than operator> ::= <

  <equals operator> ::= =

  <greater than operator> ::= >

  <question mark> ::= ?

  <underscore> ::= _

  <vertical bar> ::= |

  <SQL embedded language character> ::=
        <left bracket>
      | <right bracket>

  <left bracket> ::= [

  <right bracket> ::= ]

  <token> ::=
        <nondelimiter token>
      | <delimiter token>

  <nondelimiter token> ::=
        <regular identifier>
      | <key word>
      | <unsigned numeric literal>
      | <national character string literal>
      | <bit string literal>
      | <hex string literal>

  <regular identifier> ::= <identifier body>

  <identifier body> ::=
      <identifier start> [ ( <underscore> | <identifier part> )... ]

  <identifier start> ::= <EMPHASIS>(!! See the Syntax Rules)

  <identifier part> ::=
        <identifier start>
      | <digit>

  <key word> ::=
        <reserved word>
      | <non-reserved word>

  <reserved word> ::=
        ABSOLUTE | ACTION | ADD | ALL
      | ALLOCATE | ALTER | AND
      | ANY | ARE
      | AS | ASC
      | ASSERTION | AT
      | AUTHORIZATION | AVG
      | BEGIN | BETWEEN | BIT | BIT_LENGTH
      | BOTH | BY
      | CASCADE | CASCADED | CASE | CAST
      | CATALOG
      | CHAR | CHARACTER | CHAR_LENGTH
      | CHARACTER_LENGTH | CHECK | CLOSE | COALESCE
      | COLLATE | COLLATION
      | COLUMN | COMMIT
      | CONNECT
      | CONNECTION | CONSTRAINT
      | CONSTRAINTS | CONTINUE
      | CONVERT | CORRESPONDING | COUNT | CREATE | CROSS
      | CURRENT
      | CURRENT_DATE | CURRENT_TIME
      | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR
      | DATE | DAY | DEALLOCATE | DEC
      | DECIMAL | DECLARE | DEFAULT | DEFERRABLE
      | DEFERRED | DELETE | DESC | DESCRIBE | DESCRIPTOR
      | DIAGNOSTICS
      | DISCONNECT | DISTINCT | DOMAIN | DOUBLE | DROP
      | ELSE | END | END-EXEC | ESCAPE
      | EXCEPT | EXCEPTION
      | EXEC | EXECUTE | EXISTS
      | EXTERNAL | EXTRACT
      | FALSE | FETCH | FIRST | FLOAT | FOR
      | FOREIGN | FOUND | FROM | FULL
      | GET | GLOBAL | GO | GOTO
      | GRANT | GROUP
      | HAVING | HOUR
      | IDENTITY | IMMEDIATE | IN | INDICATOR
      | INITIALLY | INNER | INPUT
      | INSENSITIVE | INSERT | INT | INTEGER | INTERSECT
      | INTERVAL | INTO | IS
      | ISOLATION
      | JOIN
      | KEY
      | LANGUAGE | LAST | LEADING | LEFT
      | LEVEL | LIKE | LOCAL | LOWER
      | MATCH | MAX | MIN | MINUTE | MODULE
      | MONTH
      | NAMES | NATIONAL | NATURAL | NCHAR | NEXT | NO
      | NOT | NULL
      | NULLIF | NUMERIC
      | OCTET_LENGTH | OF
      | ON | ONLY | OPEN | OPTION | OR
      | ORDER | OUTER
      | OUTPUT | OVERLAPS
      | PAD | PARTIAL | POSITION | PRECISION | PREPARE
      | PRESERVE | PRIMARY
      | PRIOR | PRIVILEGES | PROCEDURE | PUBLIC
      | READ | REAL | REFERENCES | RELATIVE | RESTRICT
      | REVOKE | RIGHT
      | ROLLBACK | ROWS
      | SCHEMA | SCROLL | SECOND | SECTION
      | SELECT
      | SESSION | SESSION_USER | SET
      | SIZE | SMALLINT | SOME | SPACE | SQL | SQLCODE
      | SQLERROR | SQLSTATE
      | SUBSTRING | SUM | SYSTEM_USER
      | TABLE | TEMPORARY
      | THEN | TIME | TIMESTAMP
      | TIMEZONE_HOUR | TIMEZONE_MINUTE
      | TO | TRAILING | TRANSACTION
      | TRANSLATE | TRANSLATION | TRIM | TRUE
      | UNION | UNIQUE | UNKNOWN | UPDATE | UPPER | USAGE
      | USER | USING
      | VALUE | VALUES | VARCHAR | VARYING | VIEW
      | WHEN | WHENEVER | WHERE | WITH | WORK | WRITE
      | YEAR
      | ZONE

  <non-reserved word> ::=

        ADA
      | C | CATALOG_NAME
      | CHARACTER_SET_CATALOG | CHARACTER_SET_NAME
      | CHARACTER_SET_SCHEMA | CLASS_ORIGIN | COBOL | COLLATION_CATALOG
      | COLLATION_NAME | COLLATION_SCHEMA | COLUMN_NAME | COMMAND_FUNCTION
      | COMMITTED
      | CONDITION_NUMBER | CONNECTION_NAME | CONSTRAINT_CATALOG | CONSTRAINT_NAME
      | CONSTRAINT_SCHEMA | CURSOR_NAME
      | DATA | DATETIME_INTERVAL_CODE
      | DATETIME_INTERVAL_PRECISION | DYNAMIC_FUNCTION
      | FORTRAN
      | LENGTH
      | MESSAGE_LENGTH | MESSAGE_OCTET_LENGTH | MESSAGE_TEXT | MORE | MUMPS
      | NAME | NULLABLE | NUMBER
      | PASCAL | PLI
      | REPEATABLE | RETURNED_LENGTH | RETURNED_OCTET_LENGTH | RETURNED_SQLSTATE
      | ROW_COUNT
      | SCALE | SCHEMA_NAME | SERIALIZABLE | SERVER_NAME | SUBCLASS_ORIGIN
      | TABLE_NAME | TYPE
      | UNCOMMITTED | UNNAMED

  <unsigned numeric literal> ::=
        <exact numeric literal>
      | <approximate numeric literal>

  <exact numeric literal> ::=
        <unsigned integer> [ <period> [ <unsigned integer> ] ]
      | <period> <unsigned integer>

  <unsigned integer> ::= <digit>...

  <approximate numeric literal> ::= <mantissa> E <exponent>

  <mantissa> ::= <exact numeric literal>

  <exponent> ::= <signed integer>

  <signed integer> ::= [ <sign> ] <unsigned integer>

  <sign> ::= <plus sign> | <minus sign>

  <national character string literal> ::=
      N <quote> [ <character representation>... ] <quote>
        [ ( <separator>... <quote> [ <character representation>... ] <quote> )... ]

  <character representation> ::=
        <nonquote character>
      | <quote symbol>

  <nonquote character> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <quote symbol> ::= <quote><quote>

  <separator> ::= ( <comment> | <space> | <newline> )...

  <comment> ::=
      <comment introducer> [ <comment character>... ] <newline>

  <comment introducer> ::= <minus sign><minus sign>[<minus sign>...]

  <comment character> ::=
        <nonquote character>
      | <quote>

  <newline> ::= !! <EMPHASIS>(implementation-defined end-of-line indicator)

  <bit string literal> ::=
      B <quote> [ <bit>... ] <quote>
        [ ( <separator>... <quote> [ <bit>... ] <quote> )... ]

  <bit> ::= 0 | 1

  <hex string literal> ::=
      X <quote> [ <hexit>... ] <quote>
        [ ( <separator>... <quote> [ <hexit>... ] <quote> )... ]

  <hexit> ::= <digit> | A | B | C | D | E | F | a | b | c | d | e | f

  <delimiter token> ::=
        <character string literal>
      | <date string>
      | <time string>
      | <timestamp string>
      | <interval string>
      | <delimited identifier>
      | <SQL special character>
      | <not equals operator>
      | <greater than or equals operator>
      | <less than or equals operator>
      | <concatenation operator>
      | <double period>
      | <left bracket>
      | <right bracket>

  <character string literal> ::=
      [ <introducer><character set specification> ]
      <quote> [ <character representation>... ] <quote>
        [ ( <separator>... <quote> [ <character representation>... ] <quote> )... ]

  <introducer> ::= <underscore>

  <character set specification> ::=
        <standard character repertoire name>
      | <implementation-defined character repertoire name>
      | <user-defined character repertoire name>
      | <standard universal character form-of-use name>
      | <implementation-defined universal character form-of-use name>

  <standard character repertoire name> ::= <character set name>

  <character set name> ::= [ <schema name> <period> ]
        <SQL language identifier>

  <schema name> ::=
      [ <catalog name> <period> ] <unqualified schema name>

  <catalog name> ::= <identifier>

  <identifier> ::=
      [ <introducer><character set specification> ] <actual identifier>

  <actual identifier> ::=
        <regular identifier>
      | <delimited identifier>

  <delimited identifier> ::=
      <double quote> <delimited identifier body> <double quote>

  <delimited identifier body> ::= <delimited identifier part>...

  <delimited identifier part> ::=
        <nondoublequote character>
      | <doublequote symbol>

  <nondoublequote character> ::= <EMPHASIS>(!! See the Syntax Rules)

  <doublequote symbol> ::= <double quote><double quote>

  <unqualified schema name> ::= <identifier>

  <SQL language identifier> ::=
      <SQL language identifier start>
         [ ( <underscore> | <SQL language identifier part> )... ]

  <SQL language identifier start> ::= <simple Latin letter>

  <SQL language identifier part> ::=
        <simple Latin letter>
      | <digit>

  <implementation-defined character repertoire name> ::=
      <character set name>

  <user-defined character repertoire name> ::= <character set name>

  <standard universal character form-of-use name> ::=
      <character set name>

  <implementation-defined universal character form-of-use name> ::=
      <character set name>

  <date string> ::=
      <quote> <date value> <quote>

  <date value> ::=
      <years value> <minus sign> <months value>
          <minus sign> <days value>

  <years value> ::= <datetime value>

  <datetime value> ::= <unsigned integer>

  <months value> ::= <datetime value>

  <days value> ::= <datetime value>

  <time string> ::=
      <quote> <time value> [ <time zone interval> ] <quote>

  <time value> ::=
      <hours value> <colon> <minutes value> <colon> <seconds value>

  <hours value> ::= <datetime value>

  <minutes value> ::= <datetime value>

  <seconds value> ::=
        <seconds integer value> [ <period> [ <seconds fraction> ] ]

  <seconds integer value> ::= <unsigned integer>

  <seconds fraction> ::= <unsigned integer>

  <time zone interval> ::=
      <sign> <hours value> <colon> <minutes value>

  <timestamp string> ::=
      <quote> <date value> <space> <time value>
          [ <time zone interval> ] <quote>

  <interval string> ::=
      <quote> ( <year-month literal> | <day-time literal> ) <quote>

  <year-month literal> ::=
        <years value>
      | [ <years value> <minus sign> ] <months value>

  <day-time literal> ::=
        <day-time interval>
      | <time interval>

  <day-time interval> ::=
      <days value>
        [ <space> <hours value> [ <colon> <minutes value>
          [ <colon> <seconds value> ] ] ]

  <time interval> ::=
        <hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ]
      | <minutes value> [ <colon> <seconds value> ]
      | <seconds value>

  <not equals operator> ::= <>

  <greater than or equals operator> ::= >=

  <less than or equals operator> ::= <=

  <concatenation operator> ::= ||

  <double period> ::= ..

  <module> ::=
      <module name clause>
      <language clause>
      <module authorization clause>
      [ <temporary table declaration>... ]
      <module contents>...

  <module name clause> ::=
      MODULE [ <module name> ]
        [ <module character set specification> ]

  <module name> ::= <identifier>

  <module character set specification> ::=
      NAMES ARE <character set specification>

  <language clause> ::=
      LANGUAGE <language name>

  <language name> ::=
      ADA | C | COBOL | FORTRAN | MUMPS | PASCAL | PLI

  <module authorization clause> ::=
        SCHEMA <schema name>
      | AUTHORIZATION <module authorization identifier>
      | SCHEMA <schema name>
            AUTHORIZATION <module authorization identifier>

  <module authorization identifier> ::=
      <authorization identifier>

  <authorization identifier> ::= <identifier>

  <temporary table declaration> ::=
      DECLARE LOCAL TEMPORARY TABLE
          <qualified local table name>
        <table element list>
        [ ON COMMIT ( PRESERVE | DELETE ) ROWS ]

  <qualified local table name> ::=
      MODULE <period> <local table name>

  <local table name> ::= <qualified identifier>

  <qualified identifier> ::= <identifier>

  <table element list> ::=
        <left paren> <table element> [ ( <comma> <table element> )... ] <right paren>

  <table element> ::=
        <column definition>
      | <table constraint definition>

  <column definition> ::=
      <column name> ( <data type> | <domain name> )
      [ <default clause> ]
      [ <column constraint definition>... ]
      [ <collate clause> ]

  <column name> ::= <identifier>

  <data type> ::=
        <character string type>
             [ CHARACTER SET <character set specification> ]
      | <national character string type>
      | <bit string type>
      | <numeric type>
      | <datetime type>
      | <interval type>

  <character string type> ::=
        CHARACTER [ <left paren> <length> <right paren> ]
      | CHAR [ <left paren> <length> <right paren> ]
      | CHARACTER VARYING <left paren> <length> <right paren>
      | CHAR VARYING <left paren> <length> <right paren>
      | VARCHAR <left paren> <length> <right paren>

  <length> ::= <unsigned integer>

  <national character string type> ::=
        NATIONAL CHARACTER [ <left paren> <length> <right paren> ]
      | NATIONAL CHAR [ <left paren> <length> <right paren> ]
      | NCHAR [ <left paren> <length> <right paren> ]
      | NATIONAL CHARACTER VARYING <left paren> <length> <right paren>
      | NATIONAL CHAR VARYING <left paren> <length> <right paren>
      | NCHAR VARYING <left paren> <length> <right paren>

  <bit string type> ::=
        BIT [ <left paren> <length> <right paren> ]
      | BIT VARYING <left paren> <length> <right paren>

  <numeric type> ::=
        <exact numeric type>
      | <approximate numeric type>

  <exact numeric type> ::=
        NUMERIC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | DECIMAL [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | DEC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | INTEGER
      | INT
      | SMALLINT

  <precision> ::= <unsigned integer>

  <scale> ::= <unsigned integer>

  <approximate numeric type> ::=
        FLOAT [ <left paren> <precision> <right paren> ]
      | REAL
      | DOUBLE PRECISION

  <datetime type> ::=
        DATE
      | TIME [ <left paren> <time precision> <right paren> ]
            [ WITH TIME ZONE ]
      | TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
            [ WITH TIME ZONE ]

  <time precision> ::= <time fractional seconds precision>

  <time fractional seconds precision> ::= <unsigned integer>

  <timestamp precision> ::= <time fractional seconds precision>

  <interval type> ::= INTERVAL <interval qualifier>

  <interval qualifier> ::=
        <start field> TO <end field>
      | <single datetime field>

  <start field> ::=
      <non-second datetime field>
          [ <left paren> <interval leading field precision> <right paren> ]

  <non-second datetime field> ::= YEAR | MONTH | DAY | HOUR
      | MINUTE

  <interval leading field precision> ::= <unsigned integer>

  <end field> ::=
        <non-second datetime field>
      | SECOND [ <left paren> <interval fractional seconds precision> <right paren> ]

  <interval fractional seconds precision> ::= <unsigned integer>

  <single datetime field> ::=
        <non-second datetime field>
            [ <left paren> <interval leading field precision> <right paren> ]
      | SECOND [ <left paren> <interval leading field precision>
            [ <comma> <interval fractional seconds precision> ] <right paren> ]

  <domain name> ::= <qualified name>

  <qualified name> ::=
      [ <schema name> <period> ] <qualified identifier>

  <default clause> ::=
        DEFAULT <default option>

  <default option> ::=
        <literal>
      | <datetime value function>
      | USER
      | CURRENT_USER
      | SESSION_USER
      | SYSTEM_USER
      | NULL

  <literal> ::=
        <signed numeric literal>
      | <general literal>

  <signed numeric literal> ::=
      [ <sign> ] <unsigned numeric literal>

  <general literal> ::=
        <character string literal>
      | <national character string literal>
      | <bit string literal>
      | <hex string literal>
      | <datetime literal>
      | <interval literal>

  <datetime literal> ::=
        <date literal>
      | <time literal>
      | <timestamp literal>

  <date literal> ::=
      DATE <date string>

  <time literal> ::=
      TIME <time string>

  <timestamp literal> ::=
      TIMESTAMP <timestamp string>

  <interval literal> ::=
      INTERVAL [ <sign> ] <interval string> <interval qualifier>

  <datetime value function> ::=
        <current date value function>
      | <current time value function>
      | <current timestamp value function>

  <current date value function> ::= CURRENT_DATE

  <current time value function> ::=
        CURRENT_TIME [ <left paren> <time precision> <right paren> ]

  <current timestamp value function> ::=
        CURRENT_TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]

  <column constraint definition> ::=
      [ <constraint name definition> ]
      <column constraint>
        [ <constraint attributes> ]

  <constraint name definition> ::= CONSTRAINT <constraint name>
  <constraint name> ::= <qualified name>

  <column constraint> ::=
        NOT NULL
      | <unique specification>
      | <references specification>
      | <check constraint definition>

  <unique specification> ::=
      UNIQUE | PRIMARY KEY

  <references specification> ::=
      REFERENCES <referenced table and columns>
        [ MATCH <match type> ]
        [ <referential triggered action> ]

  <referenced table and columns> ::=
       <table name> [ <left paren> <reference column list> <right paren> ]

  <table name> ::=
        <qualified name>
      | <qualified local table name>

  <reference column list> ::= <column name list>

  <column name list> ::=
      <column name> [ ( <comma> <column name> )... ]

  <match type> ::=
        FULL
      | PARTIAL

  <referential triggered action> ::=
        <update rule> [ <delete rule> ]
      | <delete rule> [ <update rule> ]

  <update rule> ::= ON UPDATE <referential action>

  <referential action> ::=
        CASCADE
      | SET NULL
      | SET DEFAULT
      | NO ACTION

  <delete rule> ::= ON DELETE <referential action>

  <check constraint definition> ::=
      CHECK
          <left paren> <search condition> <right paren>

  <search condition> ::=
        <boolean term>
      | <search condition> OR <boolean term>

  <boolean term> ::=
        <boolean factor>
      | <boolean term> AND <boolean factor>

  <boolean factor> ::=
      [ NOT ] <boolean test>

  <boolean test> ::=
      <boolean primary> [ IS [ NOT ]
            <truth value> ]

  <boolean primary> ::=
        <predicate>
      | <left paren> <search condition> <right paren>

  <predicate> ::=
        <comparison predicate>
      | <between predicate>
      | <in predicate>
      | <like predicate>
      | <null predicate>
      | <quantified comparison predicate>
      | <exists predicate>
      | <unique predicate>
      | <match predicate>
      | <overlaps predicate>

  <comparison predicate> ::=
      <row value constructor> <comp op>
          <row value constructor>

  <row value constructor> ::=
         <row value constructor element>
      | <left paren> <row value constructor list> <right paren>
      | <row subquery>

  <row value constructor element> ::=
        <value expression>
      | <null specification>
      | <default specification>

  <value expression> ::=
        <numeric value expression>
      | <string value expression>
      | <datetime value expression>
      | <interval value expression>

  <numeric value expression> ::=
        <term>
      | <numeric value expression> <plus sign> <term>
      | <numeric value expression> <minus sign> <term>

  <term> ::=
        <factor>
      | <term> <asterisk> <factor>
      | <term> <solidus> <factor>

  <factor> ::=
      [ <sign> ] <numeric primary>

  <numeric primary> ::=
        <value expression primary>
      | <numeric value function>

  <value expression primary> ::=
        <unsigned value specification>
      | <column reference>
      | <set function specification>
      | <scalar subquery>
      | <case expression>
      | <left paren> <value expression> <right paren>
      | <cast specification>

  <unsigned value specification> ::=
        <unsigned literal>
      | <general value specification>

  <unsigned literal> ::=
        <unsigned numeric literal>
      | <general literal>

  <general value specification> ::=
        <parameter specification>
      | <dynamic parameter specification>
      | <variable specification>
      | USER
      | CURRENT_USER
      | SESSION_USER
      | SYSTEM_USER
      | VALUE

  <parameter specification> ::=
      <parameter name> [ <indicator parameter> ]

  <parameter name> ::= <colon> <identifier>

  <indicator parameter> ::=
      [ INDICATOR ] <parameter name>

  <dynamic parameter specification> ::= <question mark>

  <variable specification> ::=
      <embedded variable name> [ <indicator variable> ]

  <embedded variable name> ::=
      <colon><host identifier>

  <host identifier> ::=
        <Ada host identifier>
      | <C host identifier>
      | <COBOL host identifier>
      | <Fortran host identifier>
      | <MUMPS host identifier>
      | <Pascal host identifier>
      | <PL/I host identifier>

  <Ada host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <C host identifier> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <COBOL host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <Fortran host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <MUMPS host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <Pascal host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <PL/I host identifier> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <indicator variable> ::=
      [ INDICATOR ] <embedded variable name>

  <column reference> ::= [ <qualifier> <period> ] <column name>

  <qualifier> ::=
        <table name>
      | <correlation name>

  <correlation name> ::= <identifier>

  <set function specification> ::=
        COUNT <left paren> <asterisk> <right paren>
      | <general set function>

  <general set function> ::=
        <set function type>
            <left paren> [ <set quantifier> ] <value expression> <right paren>

  <set function type> ::=
      AVG | MAX | MIN | SUM | COUNT

  <set quantifier> ::= DISTINCT | ALL

  <scalar subquery> ::= <subquery>

  <subquery> ::= <left paren> <query expression> <right paren>

  <query expression> ::=
        <non-join query expression>
      | <joined table>

  <non-join query expression> ::=
        <non-join query term>
      | <query expression> UNION  [ ALL ]
            [ <corresponding spec> ] <query term>
      | <query expression> EXCEPT [ ALL ]
            [ <corresponding spec> ] <query term>

  <non-join query term> ::=
        <non-join query primary>
      | <query term> INTERSECT [ ALL ]
            [ <corresponding spec> ] <query primary>

  <non-join query primary> ::=
        <simple table>
      | <left paren> <non-join query expression> <right paren>

  <simple table> ::=
        <query specification>
      | <table value constructor>
      | <explicit table>

  <query specification> ::=
      SELECT [ <set quantifier> ] <select list> <table expression>

  <select list> ::=
        <asterisk>
      | <select sublist> [ ( <comma> <select sublist> )... ]

  <select sublist> ::=
        <derived column>
      | <qualifier> <period> <asterisk>

  <derived column> ::= <value expression> [ <as clause> ]

  <as clause> ::= [ AS ] <column name>

  <table expression> ::=
      <from clause>
      [ <where clause> ]
      [ <group by clause> ]
      [ <having clause> ]

  <from clause> ::= FROM <table reference>
      [ ( <comma> <table reference> )... ]

  <table reference> ::=
        <table name> [ [ AS ] <correlation name>
            [ <left paren> <derived column list> <right paren> ] ]
      | <derived table> [ AS ] <correlation name>
            [ <left paren> <derived column list> <right paren> ]
      | <joined table>

  <derived column list> ::= <column name list>

  <derived table> ::= <table subquery>

  <table subquery> ::= <subquery>

  <joined table> ::=
        <cross join>
      | <qualified join>
      | <left paren> <joined table> <right paren>

  <cross join> ::=
      <table reference> CROSS JOIN <table reference>

  <qualified join> ::=
      <table reference> [ NATURAL ] [ <join type> ] JOIN
        <table reference> [ <join specification> ]

  <join type> ::=
        INNER
      | <outer join type> [ OUTER ]
      | UNION

  <outer join type> ::=
        LEFT
      | RIGHT
      | FULL

  <join specification> ::=
        <join condition>
      | <named columns join>

  <join condition> ::= ON <search condition>

  <named columns join> ::=
      USING <left paren> <join column list> <right paren>

  <join column list> ::= <column name list>

  <where clause> ::= WHERE <search condition>

  <group by clause> ::=
      GROUP BY <grouping column reference list>

  <grouping column reference list> ::=
      <grouping column reference>
          [ ( <comma> <grouping column reference> )... ]

  <grouping column reference> ::=
      <column reference> [ <collate clause> ]

  <collate clause> ::= COLLATE <collation name>

  <collation name> ::= <qualified name>

  <having clause> ::= HAVING <search condition>

  <table value constructor> ::=
      VALUES <table value constructor list>

  <table value constructor list> ::=
      <row value constructor> [ ( <comma> <row value constructor> )... ]

  <explicit table> ::= TABLE <table name>

  <query term> ::=
        <non-join query term>
      | <joined table>

  <corresponding spec> ::=
      CORRESPONDING [ BY <left paren> <corresponding column list> <right paren> ]

  <corresponding column list> ::= <column name list>

  <query primary> ::=
        <non-join query primary>
      | <joined table>

  <case expression> ::=
        <case abbreviation>
      | <case specification>

  <case abbreviation> ::=
        NULLIF <left paren> <value expression> <comma>
              <value expression> <right paren>
      | COALESCE <left paren> <value expression>
              ( <comma> <value expression> )... <right paren>

  <case specification> ::=
        <simple case>
      | <searched case>

  <simple case> ::=
      CASE <case operand>
        <simple when clause>...
        [ <else clause> ]
      END

  <case operand> ::= <value expression>

  <simple when clause> ::= WHEN <when operand> THEN <result>

  <when operand> ::= <value expression>

  <result> ::= <result expression> | NULL

  <result expression> ::= <value expression>

  <else clause> ::= ELSE <result>

  <searched case> ::=
      CASE
        <searched when clause>...
        [ <else clause> ]
      END

  <searched when clause> ::= WHEN <search condition> THEN <result>

  <cast specification> ::=
      CAST <left paren> <cast operand> AS
          <cast target> <right paren>

  <cast operand> ::=
        <value expression>
      | NULL

  <cast target> ::=
        <domain name>
      | <data type>

  <numeric value function> ::=
        <position expression>
      | <extract expression>
      | <length expression>

  <position expression> ::=
      POSITION <left paren> <character value expression>
          IN <character value expression> <right paren>

  <character value expression> ::=
        <concatenation>
      | <character factor>

  <concatenation> ::=
      <character value expression> <concatenation operator>
          <character factor>

  <character factor> ::=
      <character primary> [ <collate clause> ]

  <character primary> ::=
        <value expression primary>
      | <string value function>

  <string value function> ::=
        <character value function>
      | <bit value function>

  <character value function> ::=
        <character substring function>
      | <fold>
      | <form-of-use conversion>
      | <character translation>
      | <trim function>

  <character substring function> ::=
      SUBSTRING <left paren> <character value expression> FROM <start position>
                  [ FOR <string length> ] <right paren>

  <start position> ::= <numeric value expression>

  <string length> ::= <numeric value expression>

  <fold> ::= ( UPPER | LOWER )
       <left paren> <character value expression> <right paren>

  <form-of-use conversion> ::=
      CONVERT <left paren> <character value expression>
          USING <form-of-use conversion name> <right paren>

  <form-of-use conversion name> ::= <qualified name>

  <character translation> ::=
      TRANSLATE <left paren> <character value expression>
          USING <translation name> <right paren>

  <translation name> ::= <qualified name>

  <trim function> ::=
      TRIM <left paren> <trim operands> <right paren>

  <trim operands> ::=
      [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>
  <trim specification> ::=
        LEADING
      | TRAILING
      | BOTH

  <trim character> ::= <character value expression>

  <trim source> ::= <character value expression>

  <bit value function> ::=
      <bit substring function>

  <bit substring function> ::=
      SUBSTRING <left paren> <bit value expression> FROM <start position>
          [ FOR <string length> ] <right paren>

  <bit value expression> ::=
        <bit concatenation>
      | <bit factor>

  <bit concatenation> ::=
      <bit value expression> <concatenation operator> <bit factor>

  <bit factor> ::= <bit primary>

  <bit primary> ::=
        <value expression primary>
      | <string value function>

  <extract expression> ::=
      EXTRACT <left paren> <extract field>
          FROM <extract source> <right paren>

  <extract field> ::=
        <datetime field>
      | <time zone field>

  <datetime field> ::=
        <non-second datetime field>
      | SECOND

  <time zone field> ::=
        TIMEZONE_HOUR
      | TIMEZONE_MINUTE

  <extract source> ::=
        <datetime value expression>
      | <interval value expression>

  <datetime value expression> ::=
        <datetime term>
      | <interval value expression> <plus sign> <datetime term>
      | <datetime value expression> <plus sign> <interval term>
      | <datetime value expression> <minus sign> <interval term>

  <interval term> ::=
        <interval factor>
      | <interval term 2> <asterisk> <factor>
      | <interval term 2> <solidus> <factor>
      | <term> <asterisk> <interval factor>

  <interval factor> ::=
      [ <sign> ] <interval primary>

  <interval primary> ::=
        <value expression primary> [ <interval qualifier> ]
  <interval term 2> ::= <interval term>

  <interval value expression> ::=
        <interval term>
      | <interval value expression 1> <plus sign> <interval term 1>
      | <interval value expression 1> <minus sign> <interval term 1>
      | <left paren> <datetime value expression> <minus sign>
            <datetime term> <right paren> <interval qualifier>

  <interval value expression 1> ::= <interval value expression>

  <interval term 1> ::= <interval term>

  <datetime term> ::=
        <datetime factor>

  <datetime factor> ::=
        <datetime primary> [ <time zone> ]

  <datetime primary> ::=
        <value expression primary>
      | <datetime value function>

  <time zone> ::=
      AT <time zone specifier>

  <time zone specifier> ::=
        LOCAL
      | TIME ZONE <interval value expression>

  <length expression> ::=
        <char length expression>
      | <octet length expression>
      | <bit length expression>

  <char length expression> ::=
      ( CHAR_LENGTH | CHARACTER_LENGTH )
          <left paren> <string value expression> <right paren>

  <string value expression> ::=
        <character value expression>
      | <bit value expression>

  <octet length expression> ::=
      OCTET_LENGTH <left paren> <string value expression> <right paren>

  <bit length expression> ::=
      BIT_LENGTH <left paren> <string value expression> <right paren>

  <null specification> ::=
      NULL

  <default specification> ::=
      DEFAULT

  <row value constructor list> ::=
      <row value constructor element>
          [ ( <comma> <row value constructor element> )... ]

  <row subquery> ::= <subquery>

  <comp op> ::=
        <equals operator>
      | <not equals operator>
      | <less than operator>
      | <greater than operator>
      | <less than or equals operator>
      | <greater than or equals operator>

  <between predicate> ::=
      <row value constructor> [ NOT ] BETWEEN
        <row value constructor> AND <row value constructor>

  <in predicate> ::=
      <row value constructor>
        [ NOT ] IN <in predicate value>

  <in predicate value> ::=
        <table subquery>
      | <left paren> <in value list> <right paren>

  <in value list> ::=
      <value expression> ( <comma> <value expression> )...

  <like predicate> ::=
      <match value> [ NOT ] LIKE <pattern>
        [ ESCAPE <escape character> ]

  <match value> ::= <character value expression>

  <pattern> ::= <character value expression>

  <escape character> ::= <character value expression>

  <null predicate> ::= <row value constructor>
      IS [ NOT ] NULL

  <quantified comparison predicate> ::=
      <row value constructor> <comp op> <quantifier> <table subquery>

  <quantifier> ::= <all> | <some>

  <all> ::= ALL

  <some> ::= SOME | ANY

  <exists predicate> ::= EXISTS <table subquery>

  <unique predicate> ::= UNIQUE <table subquery>

  <match predicate> ::=
      <row value constructor> MATCH [ UNIQUE ]
          [ PARTIAL | FULL ] <table subquery>

  <overlaps predicate> ::=
      <row value constructor 1> OVERLAPS <row value constructor 2>

  <row value constructor 1> ::= <row value constructor>

  <row value constructor 2> ::= <row value constructor>

  <truth value> ::=
        TRUE
      | FALSE
      | UNKNOWN

  <constraint attributes> ::=
        <constraint check time> [ [ NOT ] DEFERRABLE ]
      | [ NOT ] DEFERRABLE [ <constraint check time> ]

  <constraint check time> ::=
        INITIALLY DEFERRED
      | INITIALLY IMMEDIATE

  <table constraint definition> ::=
      [ <constraint name definition> ]
      <table constraint> [ <constraint attributes> ]

  <table constraint> ::=
        <unique constraint definition>
      | <referential constraint definition>
      | <check constraint definition>

  <unique constraint definition> ::=
              <unique specification> even in SQL3)
      <unique specification>
        <left paren> <unique column list> <right paren>

  <unique column list> ::= <column name list>

  <referential constraint definition> ::=
      FOREIGN KEY
          <left paren> <referencing columns> <right paren>
        <references specification>

  <referencing columns> ::=
      <reference column list>

  <module contents> ::=
        <declare cursor>
      | <dynamic declare cursor>
      | <procedure>

  <declare cursor> ::=
      DECLARE <cursor name> [ INSENSITIVE ] [ SCROLL ] CURSOR
        FOR <cursor specification>

  <cursor name> ::= <identifier>

  <cursor specification> ::=
      <query expression> [ <order by clause> ]
        [ <updatability clause> ]

  <order by clause> ::=
      ORDER BY <sort specification list>

  <sort specification list> ::=
      <sort specification> [ ( <comma> <sort specification> )... ]

  <sort specification> ::=
      <sort key> [ <collate clause> ] [ <ordering specification> ]

  <sort key> ::=
        <column name>
      | <unsigned integer>

  <ordering specification> ::= ASC | DESC

  <updatability clause> ::=
      FOR
          ( READ ONLY |
            UPDATE [ OF <column name list> ] )

  <dynamic declare cursor> ::=
      DECLARE <cursor name> [ INSENSITIVE ] [ SCROLL ] CURSOR
          FOR <statement name>

  <statement name> ::= <identifier>
  <procedure> ::=
      PROCEDURE <procedure name>
          <parameter declaration list> <semicolon>
        <SQL procedure statement> <semicolon>

  <procedure name> ::= <identifier>

  <parameter declaration list> ::=
        <left paren> <parameter declaration>
            [ ( <comma> <parameter declaration> )... ] <right paren>
      | <parameter declaration>...

  <parameter declaration> ::=
        <parameter name> <data type>
      | <status parameter>

  <status parameter> ::=
      SQLCODE | SQLSTATE

  <SQL procedure statement> ::=
        <SQL schema statement>
      | <SQL data statement>
      | <SQL transaction statement>
      | <SQL connection statement>
      | <SQL session statement>
      | <SQL dynamic statement>
      | <SQL diagnostics statement>

  <SQL schema statement> ::=
        <SQL schema definition statement>
      | <SQL schema manipulation statement>

  <SQL schema definition statement> ::=
        <schema definition>
      | <table definition>
      | <view definition>
      | <grant statement>
      | <domain definition>
      | <character set definition>
      | <collation definition>
      | <translation definition>
      | <assertion definition>

  <schema definition> ::=
      CREATE SCHEMA <schema name clause>
        [ <schema character set specification> ]
        [ <schema element>... ]

  <schema name clause> ::=
        <schema name>
      | AUTHORIZATION <schema authorization identifier>
      | <schema name> AUTHORIZATION
            <schema authorization identifier>

  <schema authorization identifier> ::=
      <authorization identifier>

  <schema character set specification> ::=
      DEFAULT CHARACTER
          SET <character set specification>

  <schema element> ::=
        <domain definition>
      | <table definition>
      | <view definition>
      | <grant statement>
      | <assertion definition>
      | <character set definition>
      | <collation definition>
      | <translation definition>

  <domain definition> ::=
      CREATE DOMAIN <domain name>
          [ AS ] <data type>
        [ <default clause> ]
        [ <domain constraint>... ]
        [ <collate clause> ]

  <domain constraint> ::=
      [ <constraint name definition> ]
      <check constraint definition> [ <constraint attributes> ]

  <table definition> ::=
      CREATE [ ( GLOBAL | LOCAL ) TEMPORARY ] TABLE
          <table name>
        <table element list>
        [ ON COMMIT ( DELETE | PRESERVE ) ROWS ]

  <view definition> ::=
      CREATE VIEW <table name> [ <left paren> <view column list>
                                    <right paren> ]
        AS <query expression>
        [ WITH [ <levels clause> ] CHECK OPTION ]

  <view column list> ::= <column name list>

  <levels clause> ::=
      CASCADED | LOCAL

  <grant statement> ::=
     GRANT <privileges> ON <object name>
       TO <grantee> [ ( <comma> <grantee> )... ]
         [ WITH GRANT OPTION ]

  <privileges> ::=
        ALL PRIVILEGES
      | <action list>

  <action list> ::= <action> [ ( <comma> <action> )... ]

  <action> ::=
        SELECT
      | DELETE
      | INSERT [ <left paren> <privilege column list> <right paren> ]
      | UPDATE [ <left paren> <privilege column list> <right paren> ]
      | REFERENCES [ <left paren> <privilege column list> <right paren> ]
      | USAGE

  <privilege column list> ::= <column name list>

  <object name> ::=
        [ TABLE ] <table name>
      | DOMAIN <domain name>
      | COLLATION <collation name>
      | CHARACTER SET <character set name>
      | TRANSLATION <translation name>

  <grantee> ::=
        PUBLIC
      | <authorization identifier>

  <assertion definition> ::=
      CREATE ASSERTION <constraint name> <assertion check>
        [ <constraint attributes> ]

  <assertion check> ::=
      CHECK
          <left paren> <search condition> <right paren>

  <character set definition> ::=
      CREATE CHARACTER SET <character set name>
          [ AS ]
        <character set source>
        [ <collate clause> | <limited collation definition> ]

  <character set source> ::=
        GET <existing character set name>

  <existing character set name> ::=
        <standard character repertoire name>
      | <implementation-defined character repertoire name>
      | <schema character set name>

  <schema character set name> ::= <character set name>

  <limited collation definition> ::=
      COLLATION FROM <collation source>

  <collation source> ::=
        <collating sequence definition>
      | <translation collation>

  <collating sequence definition> ::=
        <external collation>
      | <schema collation name>
      | DESC <left paren> <collation name> <right paren>
      | DEFAULT

  <external collation> ::=
      EXTERNAL <left paren> <quote> <external collation name> <quote> <right paren>

  <external collation name> ::=
        <standard collation name>
      | <implementation-defined collation name>

  <standard collation name> ::= <collation name>

  <implementation-defined collation name> ::= <collation name>

  <schema collation name> ::= <collation name>

  <translation collation> ::=
      TRANSLATION <translation name>
          [ THEN COLLATION <collation name> ]

  <collation definition> ::=
      CREATE COLLATION <collation name> FOR
          <character set specification>
        FROM <collation source>
          [ <pad attribute> ]

  <pad attribute> ::=
        NO PAD
      | PAD SPACE

  <translation definition> ::=
      CREATE TRANSLATION <translation name>
        FOR <source character set specification>
          TO <target character set specification>
        FROM <translation source>

  <source character set specification> ::= <character set specification>

  <target character set specification> ::= <character set specification>

  <translation source> ::=
        <translation specification>

  <translation specification> ::=
        <external translation>
      | IDENTITY
      | <schema translation name>

  <external translation> ::=
      EXTERNAL <left paren> <quote> <external translation name> <quote> <right paren>

  <external translation name> ::=
        <standard translation name>
      | <implementation-defined translation name>

  <standard translation name> ::= <translation name>

  <implementation-defined translation name> ::= <translation name>

  <schema translation name> ::= <translation name>

  <SQL schema manipulation statement> ::=
        <drop schema statement>
      | <alter table statement>
      | <drop table statement>
      | <drop view statement>
      | <revoke statement>
      | <alter domain statement>
      | <drop domain statement>
      | <drop character set statement>
      | <drop collation statement>
      | <drop translation statement>
      | <drop assertion statement>

  <drop schema statement> ::=
      DROP SCHEMA <schema name> <drop behavior>

  <drop behavior> ::= CASCADE | RESTRICT

  <alter table statement> ::=
      ALTER TABLE <table name> <alter table action>

  <alter table action> ::=
        <add column definition>
      | <alter column definition>
      | <drop column definition>
      | <add table constraint definition>
      | <drop table constraint definition>

  <add column definition> ::=
      ADD [ COLUMN ] <column definition>

  <alter column definition> ::=
      ALTER [ COLUMN ] <column name> <alter column action>

  <alter column action> ::=
        <set column default clause>
      | <drop column default clause>

  <set column default clause> ::=
      SET <default clause>

  <drop column default clause> ::=
      DROP DEFAULT

  <drop column definition> ::=
      DROP [ COLUMN ] <column name> <drop behavior>

  <add table constraint definition> ::=
      ADD <table constraint definition>

  <drop table constraint definition> ::=
      DROP CONSTRAINT <constraint name> <drop behavior>

  <drop table statement> ::=
      DROP TABLE <table name> <drop behavior>

  <drop view statement> ::=
      DROP VIEW <table name> <drop behavior>

  <revoke statement> ::=
      REVOKE [ GRANT OPTION FOR ]
          <privileges>
          ON <object name>
        FROM <grantee> [ ( <comma> <grantee> )... ] <drop behavior>

  <alter domain statement> ::=
      ALTER DOMAIN <domain name> <alter domain action>

  <alter domain action> ::=
        <set domain default clause>
      | <drop domain default clause>
      | <add domain constraint definition>
      | <drop domain constraint definition>

  <set domain default clause> ::= SET <default clause>

  <drop domain default clause> ::= DROP DEFAULT

  <add domain constraint definition> ::=
      ADD <domain constraint>

  <drop domain constraint definition> ::=
      DROP CONSTRAINT <constraint name>

  <drop domain statement> ::=
      DROP DOMAIN <domain name> <drop behavior>

  <drop character set statement> ::=
      DROP CHARACTER SET <character set name>

  <drop collation statement> ::=
      DROP COLLATION <collation name>

  <drop translation statement> ::=
      DROP TRANSLATION <translation name>

  <drop assertion statement> ::=
      DROP ASSERTION <constraint name>

  <SQL data statement> ::=
        <open statement>
      | <fetch statement>
      | <close statement>
      | <select statement: single row>
      | <SQL data change statement>

  <open statement> ::=
      OPEN <cursor name>

  <fetch statement> ::=
      FETCH [ [ <fetch orientation> ] FROM ]
        <cursor name> INTO <fetch target list>

  <fetch orientation> ::=
        NEXT
      | PRIOR
      | FIRST
      | LAST
      | ( ABSOLUTE | RELATIVE ) <simple value specification>

  <simple value specification> ::=
        <parameter name>
      | <embedded variable name>
      | <literal>

  <fetch target list> ::=
      <target specification> [ ( <comma> <target specification> )... ]

  <target specification> ::=
        <parameter specification>
      | <variable specification>

  <close statement> ::=
      CLOSE <cursor name>

  <select statement: single row> ::=
      SELECT [ <set quantifier> ] <select list>
        INTO <select target list>
          <table expression>

  <select target list> ::=
      <target specification> [ ( <comma> <target specification> )... ]

  <SQL data change statement> ::=
        <delete statement: positioned>
      | <delete statement: searched>
      | <insert statement>
      | <update statement: positioned>
      | <update statement: searched>

  <delete statement: positioned> ::=
      DELETE FROM <table name>
        WHERE CURRENT OF <cursor name>

  <delete statement: searched> ::=
      DELETE FROM <table name>
        [ WHERE <search condition> ]

  <insert statement> ::=
      INSERT INTO <table name>
        <insert columns and source>

  <insert columns and source> ::=
        [ <left paren> <insert column list> <right paren> ]
              <query expression>
      | DEFAULT VALUES

  <insert column list> ::= <column name list>

  <update statement: positioned> ::=
      UPDATE <table name>
        SET <set clause list>
          WHERE CURRENT OF <cursor name>

  <set clause list> ::=
      <set clause> [ ( <comma> <set clause> )... ]

  <set clause> ::=
      <object column> <equals operator> <update source>

  <object column> ::= <column name>

  <update source> ::=
        <value expression>
      | <null specification>
      | DEFAULT

  <update statement: searched> ::=
      UPDATE <table name>
        SET <set clause list>
        [ WHERE <search condition> ]

  <SQL transaction statement> ::=
        <set transaction statement>
      | <set constraints mode statement>
      | <commit statement>
      | <rollback statement>

  <set transaction statement> ::=
      SET TRANSACTION <transaction mode>
          [ ( <comma> <transaction mode> )... ]

  <transaction mode> ::=
        <isolation level>
      | <transaction access mode>
      | <diagnostics size>

  <isolation level> ::=
      ISOLATION LEVEL <level of isolation>

  <level of isolation> ::=
        READ UNCOMMITTED
      | READ COMMITTED
      | REPEATABLE READ
      | SERIALIZABLE

  <transaction access mode> ::=
        READ ONLY
      | READ WRITE

  <diagnostics size> ::=
      DIAGNOSTICS SIZE <number of conditions>

  <number of conditions> ::= <simple value specification>

  <set constraints mode statement> ::=
      SET CONSTRAINTS <constraint name list>
          ( DEFERRED | IMMEDIATE )

  <constraint name list> ::=
        ALL
      | <constraint name> [ ( <comma> <constraint name> )... ]

  <commit statement> ::=
      COMMIT [ WORK ]

  <rollback statement> ::=
      ROLLBACK [ WORK ]

  <SQL connection statement> ::=
        <connect statement>
      | <set connection statement>
      | <disconnect statement>

  <connect statement> ::=
      CONNECT TO <connection target>

  <connection target> ::=
        <SQL-server name>
          [ AS <connection name> ]
            correspondence with Tony Gordon)
          [ USER <user name> ]
      | DEFAULT

  <SQL-server name> ::= <simple value specification>

  <connection name> ::= <simple value specification>

  <user name> ::= <simple value specification>

  <set connection statement> ::=
      SET CONNECTION <connection object>

  <connection object> ::=
        DEFAULT
      | <connection name>

  <disconnect statement> ::=
      DISCONNECT <disconnect object>

  <disconnect object> ::=
        <connection object>
      | ALL
      | CURRENT

  <SQL session statement> ::=
        <set catalog statement>
      | <set schema statement>
      | <set names statement>
      | <set session authorization identifier statement>
      | <set local time zone statement>

  <set catalog statement> ::=
      SET CATALOG <value specification>

  <value specification> ::=
        <literal>
      | <general value specification>

  <set schema statement> ::=
      SET SCHEMA <value specification>

  <set names statement> ::=
      SET NAMES <value specification>

  <set session authorization identifier statement> ::=
      SET SESSION AUTHORIZATION
          <value specification>

  <set local time zone statement> ::=
      SET TIME ZONE
          <set time zone value>
  <set time zone value> ::=
        <interval value expression>
      | LOCAL

  <SQL dynamic statement> ::=
        <system descriptor statement>
      | <prepare statement>
      | <deallocate prepared statement>
      | <describe statement>
      | <execute statement>
      | <execute immediate statement>
      | <SQL dynamic data statement>

  <system descriptor statement> ::=
        <allocate descriptor statement>
      | <deallocate descriptor statement>
      | <set descriptor statement>
      | <get descriptor statement>

  <allocate descriptor statement> ::=
      ALLOCATE DESCRIPTOR <descriptor name>
         [ WITH MAX <occurrences> ]

  <descriptor name> ::=
      [ <scope option> ] <simple value specification>

  <scope option> ::=
        GLOBAL
      | LOCAL

  <occurrences> ::= <simple value specification>

  <deallocate descriptor statement> ::=
      DEALLOCATE DESCRIPTOR <descriptor name>

  <set descriptor statement> ::=
      SET DESCRIPTOR <descriptor name>
          <set descriptor information>

  <set descriptor information> ::=
        <set count>
      | VALUE <item number>
          <set item information> [ ( <comma> <set item information> )... ]

  <set count> ::=
      COUNT <equals operator> <simple value specification 1>

  <simple value specification 1> ::= <simple value specification>

  <item number> ::= <simple value specification>

  <set item information> ::=
      <descriptor item name> <equals operator> <simple value specification 2>

  <descriptor item name> ::=
        TYPE
      | LENGTH
      | OCTET_LENGTH
      | RETURNED_LENGTH
      | RETURNED_OCTET_LENGTH
      | PRECISION
      | SCALE
      | DATETIME_INTERVAL_CODE
      | DATETIME_INTERVAL_PRECISION
      | NULLABLE
      | INDICATOR
      | DATA
      | NAME
      | UNNAMED
      | COLLATION_CATALOG
      | COLLATION_SCHEMA
      | COLLATION_NAME
      | CHARACTER_SET_CATALOG
      | CHARACTER_SET_SCHEMA
      | CHARACTER_SET_NAME

  <simple value specification 2> ::= <simple value specification>

  <item number> ::= <simple value specification>

  <get descriptor statement> ::=
      GET DESCRIPTOR <descriptor name> <get descriptor information>

  <get descriptor information> ::=
        <get count>
      | VALUE <item number>
          <get item information> [ ( <comma> <get item information> )... ]

  <get count> ::=
      <simple target specification 1> <equals operator>
           COUNT

  <simple target specification 1> ::= <simple target specification>

  <simple target specification> ::=
        <parameter name>
      | <embedded variable name>

  <get item information> ::=
      <simple target specification 2> <equals operator> <descriptor item name>>

  <simple target specification 2> ::= <simple target specification>

  <prepare statement> ::=
      PREPARE <SQL statement name> FROM <SQL statement variable>

  <SQL statement name> ::=
        <statement name>
      | <extended statement name>

  <extended statement name> ::=
      [ <scope option> ] <simple value specification>

  <SQL statement variable> ::= <simple value specification>

  <deallocate prepared statement> ::=
      DEALLOCATE PREPARE <SQL statement name>

  <describe statement> ::=
        <describe input statement>
      | <describe output statement>

  <describe input statement> ::=
      DESCRIBE INPUT <SQL statement name> <using descriptor>

  <using descriptor> ::=
      ( USING | INTO ) SQL DESCRIPTOR <descriptor name>

  <describe output statement> ::=
      DESCRIBE [ OUTPUT ] <SQL statement name> <using descriptor>

  <execute statement> ::=
      EXECUTE <SQL statement name>
        [ <result using clause> ]
        [ <parameter using clause> ]

  <result using clause> ::= <using clause>

  <using clause> ::=
        <using arguments>
      | <using descriptor>

  <using arguments> ::=
      ( USING | INTO ) <argument> [ ( <comma> <argument> )... ]

  <argument> ::= <target specification>

  <parameter using clause> ::= <using clause>

  <execute immediate statement> ::=
      EXECUTE IMMEDIATE <SQL statement variable>

  <SQL dynamic data statement> ::=
        <allocate cursor statement>
      | <dynamic open statement>
      | <dynamic fetch statement>
      | <dynamic close statement>
      | <dynamic delete statement: positioned>
      | <dynamic update statement: positioned>

  <allocate cursor statement> ::=
      ALLOCATE <extended cursor name> [ INSENSITIVE ]
          [ SCROLL ] CURSOR
        FOR <extended statement name>

  <extended cursor name> ::=
      [ <scope option> ] <simple value specification>

  <dynamic open statement> ::=
      OPEN <dynamic cursor name> [ <using clause> ]

  <dynamic cursor name> ::=
        <cursor name>
      | <extended cursor name>

  <dynamic fetch statement> ::=
      FETCH [ [ <fetch orientation> ] FROM ] <dynamic cursor name>
          <using clause>

  <dynamic close statement> ::=
      CLOSE <dynamic cursor name>

  <dynamic delete statement: positioned> ::=
      DELETE FROM <table name>
        WHERE CURRENT OF
            <dynamic cursor name>

  <dynamic update statement: positioned> ::=
      UPDATE <table name>
        SET <set clause>
            [ ( <comma> <set clause> )... ]
          WHERE CURRENT OF
              <dynamic cursor name>

  <SQL diagnostics statement> ::=
      <get diagnostics statement>

  <get diagnostics statement> ::=
      GET DIAGNOSTICS <sql diagnostics information>

  <sql diagnostics information> ::=
        <statement information>
      | <condition information>

  <statement information> ::=
      <statement information item> [ ( <comma> <statement information item> )... ]

  <statement information item> ::=
      <simple target specification> <equals operator> <statement information item name>

  <statement information item name> ::=
        NUMBER
      | MORE
      | COMMAND_FUNCTION
      | DYNAMIC_FUNCTION
      | ROW_COUNT

  <condition information> ::=
      EXCEPTION <condition number>
        <condition information item> [ ( <comma> <condition information item> )... ]

  <condition number> ::= <simple value specification>

  <condition information item> ::=
      <simple target specification> <equals operator> <condition information item name>

  <condition information item name> ::=
        CONDITION_NUMBER
      | RETURNED_SQLSTATE
      | CLASS_ORIGIN
      | SUBCLASS_ORIGIN
      | SERVER_NAME
      | CONNECTION_NAME
      | CONSTRAINT_CATALOG
      | CONSTRAINT_SCHEMA
      | CONSTRAINT_NAME
      | CATALOG_NAME
      | SCHEMA_NAME
      | TABLE_NAME
      | COLUMN_NAME
      | CURSOR_NAME
      | MESSAGE_TEXT
      | MESSAGE_LENGTH
      | MESSAGE_OCTET_LENGTH

  <embedded SQL host program> ::=
        <embedded SQL Ada program>
      | <embedded SQL C program>
      | <embedded SQL COBOL program>
      | <embedded SQL Fortran program>
      | <embedded SQL MUMPS program>
      | <embedded SQL Pascal program>
      | <embedded SQL PL/I program>

  <embedded SQL Ada program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL C program> ::=
        !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL COBOL program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL Fortran program> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL MUMPS program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL Pascal program> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL PL/I program> ::= !! <EMPHASIS>(See the Syntax Rules.)

  <embedded SQL declare section> ::=
        <embedded SQL begin declare>
          [ <embedded character set declaration> ]
          [ <host variable definition>... ]
        <embedded SQL end declare>
      | <embedded SQL MUMPS declare>

  <embedded SQL begin declare> ::=
      <SQL prefix> BEGIN DECLARE SECTION
          [ <SQL terminator> ]

  <SQL prefix> ::=
        EXEC SQL
      | <ampersand>SQL<left paren>

  <SQL terminator> ::=
        END-EXEC
      | <semicolon>
      | <right paren>

  <embedded character set declaration> ::=
      SQL NAMES ARE <character set specification>

  <host variable definition> ::=
        <Ada variable definition>
      | <C variable definition>
      | <COBOL variable definition>
      | <Fortran variable definition>
      | <MUMPS variable definition>
      | <Pascal variable definition>
      | <PL/I variable definition>

  <Ada variable definition> ::=
      <Ada host identifier> [ ( <comma> <Ada host identifier> )... ] :
      <Ada type specification> [ <Ada initial value> ]

  <Ada type specification> ::=
        <Ada qualified type specification>
      | <Ada unqualified type specification>

  <Ada qualified type specification> ::=
        SQL_STANDARD.CHAR [ CHARACTER SET
           [ IS ] <character set specification> ]
            <left paren> 1 <double period> <length> <right paren>
      | SQL_STANDARD.BIT
            <left paren> 1 <double period> <length> <right paren>
      | SQL_STANDARD.SMALLINT
      | SQL_STANDARD.INT
      | SQL_STANDARD.REAL
      | SQL_STANDARD.DOUBLE_PRECISION
      | SQL_STANDARD.SQLCODE_TYPE
      | SQL_STANDARD.SQLSTATE_TYPE
      | SQL_STANDARD.INDICATOR_TYPE

  <Ada unqualified type specification> ::=
        CHAR
            <left paren> 1 <double period> <length> <right paren>
      | BIT
            <left paren> 1 <double period> <length> <right paren>
      | SMALLINT
      | INT
      | REAL
      | DOUBLE_PRECISION
      | SQLCODE_TYPE
      | SQLSTATE_TYPE
      | INDICATOR_TYPE

  <Ada initial value> ::=
      <Ada assignment operator> <character representation>...

  <Ada assignment operator> ::= <colon><equals operator>

  <C variable definition> ::=
        [ <C storage class> ]
        [ <C class modifier> ]
        <C variable specification>
      <semicolon>

  <C storage class> ::=
        auto
      | extern
      | static

  <C class modifier> ::= const | volatile

  <C variable specification> ::=
        <C numeric variable>
      | <C character variable>
      | <C derived variable>

  <C numeric variable> ::=
      ( long | short | float | double )
        <C host identifier> [ <C initial value> ]
              [ ( <comma> <C host identifier> [ <C initial value> ] )... ]

  <C initial value> ::=
      <equals operator> <character representation>...

  <C character variable> ::=
      char [ CHARACTER SET
               [ IS ] <character set specification> ]
        <C host identifier>
          <C array specification> [ <C initial value> ]
          [ ( <comma> <C host identifier>
            <C array specification>
                   [ <C initial value> ] )... ]

  <C array specification> ::=
      <left bracket> <length> <right bracket>

  <C derived variable> ::=
        <C VARCHAR variable>
      | <C bit variable>

  <C VARCHAR variable> ::=
      VARCHAR [ CHARACTER SET [ IS ]
          <character set specification> ]
          <C host identifier>
              <C array specification> [ <C initial value> ]
            [ ( <comma> <C host identifier>
                <C array specification>
                        [ <C initial value> ] )... ]

  <C bit variable> ::=
      BIT <C host identifier>
          <C array specification> [ <C initial value> ]
        [ ( <comma> <C host identifier>
          <C array specification>
                     [ <C initial value> ] )... ]

  <COBOL variable definition> ::=
      (01|77) <COBOL host identifier> <COBOL type specification>
        [ <character representation>... ] <period>

  <COBOL type specification> ::=
        <COBOL character type>
      | <COBOL bit type>
      | <COBOL numeric type>
      | <COBOL integer type>

  <COBOL character type> ::=
      [ CHARACTER SET [ IS ]
            <character set specification> ]
      ( PIC | PICTURE ) [ IS ] ( X [ <left paren> <length> <right paren> ] )...

  <COBOL bit type> ::=
      ( PIC | PICTURE ) [ IS ]
          ( B [ <left paren> <length> <right paren> ] )...

  <COBOL numeric type> ::=
      ( PIC | PICTURE ) [ IS ]
        S <COBOL nines specification>
      [ USAGE [ IS ] ] DISPLAY SIGN LEADING SEPARATE

  <COBOL nines specification> ::=
        <COBOL nines> [ V [ <COBOL nines> ] ]
      | V <COBOL nines>

  <COBOL nines> ::= ( 9 [ <left paren> <length> <right paren> ] )...

  <COBOL integer type> ::=
        <COBOL computational integer>
      | <COBOL binary integer>

  <COBOL computational integer> ::=
      ( PIC | PICTURE ) [ IS ] S<COBOL nines>
        [ USAGE [ IS ] ] ( COMP | COMPUTATIONAL )

  <COBOL binary integer> ::=
      ( PIC | PICTURE ) [ IS ] S<COBOL nines>
        [ USAGE [ IS ] ] BINARY

  <Fortran variable definition> ::=
      <Fortran type specification>
      <Fortran host identifier>
          [ ( <comma> <Fortran host identifier> )... ]

  <Fortran type specification> ::=
        CHARACTER [ <asterisk> <length> ]
            [ CHARACTER SET [ IS ]
                  <character set specification> ]
      | BIT [ <asterisk> <length> ]
      | INTEGER
      | REAL
      | DOUBLE PRECISION

  <MUMPS variable definition> ::=
      ( <MUMPS numeric variable> | <MUMPS character variable> )
          <semicolon>

  <MUMPS numeric variable> ::=
      <MUMPS type specification>
        <MUMPS host identifier> [ ( <comma> <MUMPS host identifier> )... ]

  <MUMPS type specification> ::=
        INT
      | DEC
            [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | REAL

  <MUMPS character variable> ::=
      VARCHAR <MUMPS host identifier> <MUMPS length specification>
        [ ( <comma> <MUMPS host identifier> <MUMPS length specification> )... ]

  <MUMPS length specification> ::=
      <left paren> <length> <right paren>

  <Pascal variable definition> ::=
      <Pascal host identifier> [ ( <comma> <Pascal host identifier> )... ] <colon>
        <Pascal type specification> <semicolon>

  <Pascal type specification> ::=
        PACKED ARRAY
            <left bracket> 1 <double period> <length> <right bracket>
          OF CHAR
            [ CHARACTER SET [ IS ]
                  <character set specification> ]
      | PACKED ARRAY
            <left bracket> 1 <double period> <length> <right bracket>
          OF BIT
      | INTEGER
      | REAL
      | CHAR [ CHARACTER SET
                                  [ IS ] <character set specification> ]
      | BIT

  <PL/I variable definition> ::=
      (DCL | DECLARE)
          (   <PL/I host identifier>
            | <left paren> <PL/I host identifier>
                  [ ( <comma> <PL/I host identifier> )... ] <right paren> )
      <PL/I type specification>
      [ <character representation>... ] <semicolon>

  <PL/I type specification> ::=
        ( CHAR | CHARACTER ) [ VARYING ]
            <left paren><length><right paren>
            [ CHARACTER SET
                  [ IS ] <character set specification> ]
      | BIT [ VARYING ] <left paren><length><right paren>
      | <PL/I type fixed decimal> <left paren> <precision>
            [ <comma> <scale> ] <right paren>
      | <PL/I type fixed binary> [ <left paren> <precision> <right paren> ]
      | <PL/I type float binary> <left paren> <precision> <right paren>

  <PL/I type fixed decimal> ::=
        ( DEC | DECIMAL ) FIXED
      | FIXED ( DEC | DECIMAL )

  <PL/I type fixed binary> ::=
        ( BIN | BINARY ) FIXED
      | FIXED ( BIN | BINARY )

  <PL/I type float binary> ::=
        ( BIN | BINARY ) FLOAT
      | FLOAT ( BIN | BINARY )

  <embedded SQL end declare> ::=
      <SQL prefix> END DECLARE SECTION
          [ <SQL terminator> ]

  <embedded SQL MUMPS declare> ::=
      <SQL prefix>
        BEGIN DECLARE SECTION
          [ <embedded character set declaration> ]
          [ <host variable definition>... ]
        END DECLARE SECTION
      <SQL terminator>

  <embedded SQL statement> ::=
      <SQL prefix>
        <statement or declaration>
      [ <SQL terminator> ]

  <statement or declaration> ::=
        <declare cursor>
      | <dynamic declare cursor>
      | <temporary table declaration>
      | <embedded exception declaration>
      | <SQL procedure statement>

  <embedded exception declaration> ::=
      WHENEVER <condition> <condition action>

  <condition> ::=
      SQLERROR | NOT FOUND

  <condition action> ::=
      CONTINUE | <go to>

  <go to> ::=
      ( GOTO | GO TO ) <goto target>

  <goto target> ::=
        <host label identifier>
      | <unsigned integer>
      | <host PL/I label variable>

  <host label identifier> ::= !!<EMPHASIS>(See the Syntax Rules.)

  <host PL/I label variable> ::= !!<EMPHASIS>(See the Syntax Rules.)

  <preparable statement> ::=
        <preparable SQL data statement>
      | <preparable SQL schema statement>
      | <preparable SQL transaction statement>
      | <preparable SQL session statement>
      | <preparable implementation-defined statement>

  <preparable SQL data statement> ::=
        <delete statement: searched>
      | <dynamic single row select statement>
      | <insert statement>
      | <dynamic select statement>
      | <update statement: searched>
      | <preparable dynamic delete statement: positioned>
      | <preparable dynamic update statement: positioned>

  <dynamic single row select statement> ::= <query specification>

  <dynamic select statement> ::= <cursor specification>

  <preparable dynamic delete statement: positioned> ::=
     DELETE [ FROM <table name> ]
        WHERE CURRENT OF <cursor name>

  <preparable dynamic update statement: positioned> ::=
     UPDATE [ <table name> ]
        SET <set clause list>
        WHERE CURRENT OF <cursor name>

  <preparable SQL schema statement> ::=
        <SQL schema statement>

  <preparable SQL transaction statement> ::=
        <SQL transaction statement>

  <preparable SQL session statement> ::=
        <SQL session statement>

  <preparable implementation-defined statement> ::=
      !! <EMPHASIS>(See the Syntax Rules.)

  <direct SQL statement> ::=
      <directly executable statement> <semicolon>

  <directly executable statement> ::=
        <direct SQL data statement>
      | <SQL schema statement>
      | <SQL transaction statement>
      | <SQL connection statement>
      | <SQL session statement>
      | <direct implementation-defined statement>

  <direct SQL data statement> ::=
        <delete statement: searched>
      | <direct select statement: multiple rows>
      | <insert statement>
      | <update statement: searched>
      | <temporary table declaration>

  <direct select statement: multiple rows> ::=
      <query expression> [ <order by clause> ]

  <direct implementation-defined statement> ::=
      !!<EMPHASIS>(See the Syntax Rules)

  <SQL object identifier> ::=
      <SQL provenance> <SQL variant>

  <SQL provenance> ::= <arc1> <arc2> <arc3>

  <arc1> ::= iso | 1 | iso <left paren> 1 <right paren>

  <arc2> ::= standard | 0 | standard <left paren> 0 <right paren>

  <arc3> ::= 9075

  <SQL variant> ::= <SQL edition> <SQL conformance>

  <SQL edition> ::= <1987> | <1989> | <1992>

  <1987> ::= 0 | edition1987 <left paren> 0 <right paren>

  <1989> ::= <1989 base> <1989 package>

  <1989 base> ::= 1 | edition1989 <left paren> 1 <right paren>

  <1989 package> ::= <integrity no> | <integrity yes>
  <integrity no> ::= 0 | IntegrityNo <left paren> 0 <right paren>

  <integrity yes> ::= 1 | IntegrityYes <left paren> 1 <right paren>

  <1992> ::= 2 | edition1992 <left paren> 2 <right paren>

  <SQL conformance> ::= <low> | <intermediate> | <high>

  <low> ::= 0 | Low <left paren> 0 <right paren>

  <intermediate> ::= 1 | Intermediate <left paren> 1 <right paren>

  <high> ::= 2 | High <left paren> 2 <right paren>

  3388..33..  SSyynnttaaxxee ddee ll''AANNSSII//IISSOO SSQQLL 11999988

  Specification de la syntaxe SQL ANSI/ISO SQL 1998 egalement appele SQL-3
  -
  Voici une copie de SQL3 bnf.  SQL3 est un sur-ensemble de SQL-92
  [qui est un sur-ensemble de SQL-89 niveau 2].  SQL3 n'est pas encore
  un standard, alors que SQL-92 en est un.
  ENTRY LEVEL SQL-92 represente l'etat de l'implantation pour la plupart
  des vendeurs.  Il n'y a que peu de differences entre SQL-92 ENTRY LEVEL
  et SQL-89 Niveau II, mais deux d'entre elles sont tres importantes:

     - Les identificateurs delimites

     - Le traitement de l'option WITH CHECK sur les vues CASCADE par defaut.
       Dans SQL-89 la valeur par defaut etait [en realite] LOCAL.

  pour le langage, et effectuees aux environs du  1-SEP-1993 15:13:55.88.
  La version BNF specifique incluse ici correspond a :
    ANSI et SQL3-seulement.

  <SQL terminal character> ::=
      <SQL language character>

  <SQL language character> ::=
        <simple Latin letter>
      | <digit>
      | <SQL special character>

  <simple Latin letter> ::=
        <simple Latin upper case letter>
      | <simple Latin lower case letter>

  <simple Latin upper case letter> ::=
            A | B | C | D | E | F | G | H | I | J | K | L | M | N | O
      | P | Q | R | S | T | U | V | W | X | Y | Z

  <simple Latin lower case letter> ::=
            a | b | c | d | e | f | g | h | i | j | k | l | m | n | o
      | p | q | r | s | t | u | v | w | x | y | z

  <digit> ::=
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

  <SQL special character> ::=
        <space>
      | <double quote>
      | <percent>
      | <ampersand>
      | <quote>
      | <left paren>
      | <right paren>
      | <asterisk>
      | <plus sign>
      | <comma>
      | <minus sign>
      | <period>
      | <solidus>
      | <colon>
      | <semicolon>
      | <less than operator>
      | <equals operator>
      | <greater than operator>
      | <question mark>
      | <left bracket>
      | <right bracket>
      | <circumflex>
      | <underscore>
      | <vertical bar>

  <space> ::= !! <EMPHASIS>(space character in character set in use)

  <double quote> ::= "

  <percent> ::= %

  <ampersand> ::= &

  <quote> ::= '

  <left paren> ::= (

  <right paren> ::= )

  <asterisk> ::= *

  <plus sign> ::= +

  <comma> ::= ,

  <minus sign> ::= -

  <period> ::= .

  <solidus> ::= /

  <colon> ::= :

  <semicolon> ::= ;

  <less than operator> ::= <

  <equals operator> ::= =

  <greater than operator> ::= >

  <question mark> ::= ?

  <left bracket> ::= [

  <right bracket> ::= ]

  <circumflex> ::= ^

  <underscore> ::= _

  <vertical bar> ::= |

  <separator> ::= ( <comment> | <space> | <newline> )...

  <comment> ::=
        <simple comment>
      | <bracketed comment>

  <simple comment> ::=
      <simple comment introducer> [ <comment character>... ] <newline>

  <simple comment introducer> ::= <minus sign><minus sign>[<minus sign>...]

  <comment character> ::=
        <nonquote character>
      | <quote>

  <nonquote character> ::= !! <EMPHASIS>(See the Syntax Rules.)
  <newline> ::= !! <EMPHASIS>(implementation-defined end-of-line indicator)

  <bracketed comment> ::=             !! (<EMPHASIS>(See the Syntax Rules))
      <bracketed comment introducer>
        <bracketed comment contents>
      <bracketed comment terminator>

  <bracketed comment introducer> ::= <solidus><asterisk>

  <bracketed comment contents> ::=
      [ ( <comment character> | <separator> )... ]

  <bracketed comment terminator> ::= <asterisk><solidus>

  <token> ::=
        <nondelimiter token>
      | <delimiter token>

  <nondelimiter token> ::=
        <regular identifier>
      | <key word>
      | <unsigned numeric literal>
      | <national character string literal>
      | <bit string literal>
      | <hex string literal>
      | <user-defined operator symbol>

  <regular identifier> ::= <identifier body>

  <identifier body> ::=
      <identifier start> [ ( <underscore> | <identifier part> )... ]

  <identifier start> ::= !! <EMPHASIS>(See the Syntax Rules)

  <identifier part> ::=
        <identifier start>
      | <digit>

  <key word> ::=
        <reserved word>
      | <non-reserved word>

  <reserved word> ::=
        ABSOLUTE | ACTION | ACTOR | ADD | AFTER | ALIAS
      | ALL | ALLOCATE | ALTER
      | AND | ANY | ARE
      | AS | ASC | ASSERTION
      | ASYNC | AT
      | ATTRIBUTES
      | AUTHORIZATION | AVG
      | BEFORE | BEGIN | BETWEEN | BIT | BIT_LENGTH
      | BOOLEAN | BOTH | BREADTH | BY
      | CASCADE | CASCADED | CASE | CAST
      | CATALOG
      | CHAR | CHARACTER
      | CHAR_LENGTH | CHARACTER_LENGTH | CHECK | CLASS | CLOSE | COALESCE
      | COLLATE
      | COLLATION | COLUMN | COMMIT | COMPLETION
      | CONNECT | CONNECTION | CONSTRAINT
      | CONSTRAINTS | CONSTRUCTOR | CONTINUE | CONVERT | CORRESPONDING
      | COUNT
      | CREATE | CROSS | CURRENT | CURRENT_DATE
      | CURRENT_PATH
      | CURRENT_TIME
      | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR | CYCLE
      | DATA | DATE | DAY | DEALLOCATE
      | DEC | DECIMAL | DECLARE | DEFAULT
      | DEFERRABLE | DEFERRED | DELETE | DEPTH
      | DESC | DESCRIBE
      | DESCRIPTOR
      | DESIGNATOR
      | DESTROY | DESTRUCTOR | DICTIONARY
      | DIAGNOSTICS | DISCONNECT | DISTINCT | DOMAIN
      | DOUBLE | DROP
      | EACH
      | ELEMENT
      | ELSE
      | END | END-EXEC | EQUALS
      | ESCAPE | EXCEPT
      | EXEC | EXECUTE | EXISTS | EXTERNAL | EXTRACT
      | FACTOR
      | FALSE | FETCH | FIRST | FLOAT | FOR | FOREIGN
      | FOUND | FROM | FULL
      | FUNCTION
      | GENERAL | GET | GLOBAL | GO | GOTO
      | GRANT | GROUP
      | HAVING | HOUR
      | IDENTITY | IGNORE | IMMEDIATE
      | IN | INDICATOR
      | INITIALLY | INNER | INOUT
      | INPUT | INSENSITIVE | INSERT
      | INSTEAD
      | INT | INTEGER | INTERSECT | INTERVAL
      | INTO | IS | ISOLATION
      | JOIN
      | KEY
      | LANGUAGE | LAST | LEADING | LEFT
      | LESS | LEVEL | LIKE | LIMIT
      | LIST
      | LOCAL | LOWER
      | MATCH | MAX | MIN | MINUTE | MODIFY | MODULE
      | MONTH
      | MOVE | MULTISET
      | NAMES | NATIONAL | NATURAL | NCHAR | NEW
      | NEW_TABLE
      | NEXT | NO
      | NONE | NOT| NULL | NULLIF | NUMERIC
      | OCTET_LENGTH | OF | OFF
      | OID | OLD
      | OLD_TABLE
      | ON | ONLY | OPEN | OPERATION
      | OPERATOR
      | OPERATORS
      | OPTION | OR | ORDER
      | OUT | OUTER | OUTPUT | OVERLAPS
      | PAD | PARAMETERS | PARTIAL
      | PATH
      | PENDANT | POSITION | POSTFIX | PRECISION | PREFIX
      | PREORDER | PREPARE | PRESERVE | PRIMARY | PRIOR | PRIVATE
      | PRIVILEGES | PROCEDURE | PROTECTED | PUBLIC
      | READ | REAL | RECURSIVE
      | REFERENCES | REFERENCING | RELATIVE | REPRESENTATION
      | RESTRICT | REVOKE | RIGHT
      | ROLE | ROLLBACK
      | ROUTINE
      | ROW | ROWS
      | SAVEPOINT | SCHEMA | SCROLL | SEARCH | SECOND | SECTION
      | SELECT
      | SENSITIVE
      | SEQUENCE
      | SESSION | SESSION_USER | SET
      | SIMILAR | SIZE | SMALLINT | SOME | SPACE | SPECIFIC
      | SQL | SQLCODE
      | SQLERROR | SQLEXCEPTION | SQLSTATE | SQLWARNING
      | START | STATE
      | STRUCTURE
      | SUBSTRING | SUM
      | SYMBOL
      | SYSTEM_USER
      | TABLE | TEMPLATE | TEMPORARY
      | TERM
      | TEST | THAN
      | THEN | THERE | TIME | TIMESTAMP
      | TIMEZONE_HOUR
      | TIMEZONE_MINUTE | TO | TRAILING | TRANSACTION
      | TRANSLATE | TRANSLATION
      | TRIGGER | TRIM | TRUE | TYPE
      | UNDER | UNION | UNIQUE | UNKNOWN
      | UPDATE | UPPER | USAGE | USER | USING
      | VALUE | VALUES | VARCHAR | VARIABLE | VARIANT
      | VARYING | VIEW
      | VIRTUAL | VISIBLE
      | WAIT | WHEN | WHENEVER | WHERE
      | WITH | WITHOUT
      | WORK | WRITE
      | YEAR
      | ZONE

  <non-reserved word> ::=
        ADA
      | C | CATALOG_NAME
      | CHAIN
      | CHARACTER_SET_CATALOG | CHARACTER_SET_NAME
      | CHARACTER_SET_SCHEMA | CLASS_ORIGIN | COBOL | COLLATION_CATALOG
      | COLLATION_NAME
      | COLLATION_SCHEMA | COLUMN_NAME | COMMAND_FUNCTION
      | COMMITTED | CONDITION_NUMBER | CONNECTION_NAME | CONSTRAINT_CATALOG
      | CONSTRAINT_NAME | CONSTRAINT_SCHEMA | CURSOR_NAME
      | DATA | DATETIME_INTERVAL_CODE | DATETIME_INTERVAL_PRECISION
      | DYNAMIC_FUNCTION
      | FORTRAN
      | HOLD
      | KEY_MEMBER | KEY_TYPE
      | LENGTH
      | MESSAGE_LENGTH | MESSAGE_OCTET_LENGTH | MESSAGE_TEXT | MORE | MUMPS
      | NAME | NULLABLE | NUMBER
      | PASCAL | PLI
      | REPEATABLE | RETURNED_LENGTH | RETURNED_OCTET_LENGTH | RETURNED_SQLSTATE
      | ROUTINE_CATALOG | ROUTINE_NAME | ROUTINE_SCHEMA | ROW_COUNT
      | SCALE | SCHEMA_NAME | SERIALIZABLE | SERVER_NAME | SPECIFIC_NAME
      | SUBCLASS_ORIGIN
      | TABLE_NAME | TYPE
      | UNCOMMITTED | UNNAMED

  <unsigned numeric literal> ::=
        <exact numeric literal>
      | <approximate numeric literal>

  <exact numeric literal> ::=
        <unsigned integer> [ <period> [ <unsigned integer> ] ]
      | <period> <unsigned integer>

  <unsigned integer> ::= <digit>...

  <approximate numeric literal> ::= <mantissa> E <exponent>

  <mantissa> ::= <exact numeric literal>

  <exponent> ::= <signed integer>

  <signed integer> ::= [ <sign> ] <unsigned integer>

  <sign> ::= <plus sign> | <minus sign>

  <national character string literal> ::=
      N <quote> [ <character representation>... ] <quote>
        [ ( <separator> <quote> [ <character representation>... ] <quote> )... ]

  <character representation> ::=
        <nonquote character>
      | <quote symbol>

  <quote symbol> ::= <quote><quote>

  <bit string literal> ::=
      B <quote> [ <bit>... ] <quote>
        [ ( <separator> <quote> [ <bit>... ] <quote> )... ]

  <bit> ::= 0 | 1

  <hex string literal> ::=
      X <quote> [ <hexit>... ] <quote>
        [ ( <separator> <quote> [ <hexit>... ] <quote> )... ]

  <hexit> ::= <digit> | A | B | C | D | E | F | a | b | c | d | e | f

  <user-defined operator symbol> ::= !! <EMPHASIS>(See the Syntax Rules)

  <delimiter token> ::=
        <character string literal>
      | <date string>
      | <time string>
      | <timestamp string>
      | <interval string>
      | <delimited identifier>
      | <SQL special character>
      | <not equals operator>
      | <greater than or equals operator>
      | <less than or equals operator>
      | <concatenation operator>
      | <double period>
      | <double colon>
      | <assignment operator>
      | <left bracket>
      | <right bracket>

  <character string literal> ::=
      [ <introducer><character set specification> ]
      <quote> [ <character representation>... ] <quote>
        [ ( <separator> <quote> [ <character representation>... ] <quote> )... ]

  <introducer> ::= <underscore>

  <character set specification> ::=
        <standard character repertoire name>
      | <implementation-defined character repertoire name>
      | <user-defined character repertoire name>
      | <standard universal character form-of-use name>
      | <implementation-defined universal character form-of-use name>

  <standard character repertoire name> ::= <character set name>

  <character set name> ::= [ <schema name> <period> ]
        <SQL language identifier>
  <schema name> ::=
      [ <catalog name> <period> ] <unqualified schema name>

  <catalog name> ::= <identifier>

  <identifier> ::=
      [ <introducer><character set specification> ] <actual identifier>

  <actual identifier> ::=
        <regular identifier>
      | <delimited identifier>

  <delimited identifier> ::=
      <double quote> <delimited identifier body> <double quote>

  <delimited identifier body> ::= <delimited identifier part>...

  <delimited identifier part> ::=
        <nondoublequote character>
      | <doublequote symbol>

  <nondoublequote character> ::= !! <EMPHASIS>(See the Syntax Rules)

  <doublequote symbol> ::= <double quote><double quote>

  <unqualified schema name> ::= <identifier>

  <SQL language identifier> ::=
      <SQL language identifier start>
         [ ( <underscore> | <SQL language identifier part> )... ]

  <SQL language identifier start> ::= <simple Latin letter>

  <SQL language identifier part> ::=
        <simple Latin letter>
      | <digit>

  <implementation-defined character repertoire name> ::=
      <character set name>

  <user-defined character repertoire name> ::= <character set name>

  <standard universal character form-of-use name> ::=
      <character set name>

  <implementation-defined universal character form-of-use name> ::=
      <character set name>

  <date string> ::=
      <quote> <date value> <quote>

  <date value> ::=
      <years value> <minus sign> <months value>
          <minus sign> <days value>

  <years value> ::= <datetime value>

  <datetime value> ::= <unsigned integer>

  <months value> ::= <datetime value>

  <days value> ::= <datetime value>

  <time string> ::=
      <quote> <time value> [ <time zone interval> ] <quote>

  <time value> ::=
      <hours value> <colon> <minutes value> <colon> <seconds value>

  <hours value> ::= <datetime value>

  <minutes value> ::= <datetime value>

  <seconds value> ::=
        <seconds integer value> [ <period> [ <seconds fraction> ] ]

  <seconds integer value> ::= <unsigned integer>

  <seconds fraction> ::= <unsigned integer>

  <time zone interval> ::=
      <sign> <hours value> <colon> <minutes value>

  <timestamp string> ::=
      <quote> <date value> <space> <time value>
          [ <time zone interval> ] <quote>

  <interval string> ::=
      <quote> ( <year-month literal> | <day-time literal> ) <quote>

  <year-month literal> ::=
        <years value>
      | [ <years value> <minus sign> ] <months value>

  <day-time literal> ::=
        <day-time interval>
      | <time interval>

  <day-time interval> ::=
      <days value>
        [ <space> <hours value> [ <colon> <minutes value>
          [ <colon> <seconds value> ] ] ]

  <time interval> ::=
        <hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ]
      | <minutes value> [ <colon> <seconds value> ]
      | <seconds value>

  <not equals operator> ::= <>

  <greater than or equals operator> ::= >=

  <less than or equals operator> ::= <=

  <concatenation operator> ::= ||

  <double period> ::= ..

  <double colon> ::= ::

  <assignment operator> ::= :=

  <SQL-client module definition> ::= <module>

  <module> ::=
      <module name clause>
        <module remainder>
      [ END MODULE ]

  <module name clause> ::=
      MODULE [ <module name> ]

  <module name> ::=
        <SQL-server module name>
      | <SQL-client module name>

  <SQL-server module name> ::= <qualified identifier>

  <qualified identifier> ::= <identifier>

  <SQL-client module name> ::= <identifier>

  <module remainder> ::=
      [ <module character set specification> ]
      <language clause>
      <module authorization clause>
        [ <module path specification> ]
      <module contents>...

  <module character set specification> ::=
      NAMES ARE <character set specification>

  <language clause> ::=
      LANGUAGE <language name>

  <language name> ::=
      ADA | C | COBOL | FORTRAN | MUMPS | PASCAL | PLI | SQL

  <module authorization clause> ::=
        SCHEMA <schema name>
      | AUTHORIZATION <module authorization identifier>
      | SCHEMA <schema name> AUTHORIZATION <module authorization identifier>

  <module authorization identifier> ::=
      <authorization identifier>

  <authorization identifier> ::= <identifier>

  <module path specification> ::=
      PATH <schema name list>

  <schema name list> ::=
      <schema name> [ ( <comma> <schema name> )... ]

  <module contents> ::=
        <global declaration> [ <semicolon> ]
      | <routine>

  <global declaration> ::=
        <declare cursor>
      | <temporary abstract data type declaration>
      | <temporary table declaration>
      | <temporary view declaration>

  <declare cursor> ::=
      DECLARE <cursor name> [ <cursor sensitivity> ]
        [ SCROLL ] CURSOR
        [ WITH HOLD ]
        FOR <cursor specification>
  <cursor sensitivity> ::=
        SENSITIVE
      | INSENSITIVE

  <cursor name> ::= <local qualified name>

  <local qualified name> ::=
      [ <local qualifier> <period> ] <qualified identifier>

  <local qualifier> ::= MODULE

  <cursor specification> ::=
      <query expression> [ <order by clause> ]
        [ <updatability clause> ]

  <query expression> ::=
      <possibly updatable query expression> [ <trigger definition>... ]

  <possibly updatable query expression> ::=
        <non-join query expression>
      | <joined table>

  <non-join query expression> ::=
        <non-join query term>
      | <query expression> UNION  [ ALL ]
            [ <corresponding spec> ] <query term>
      | <query expression> EXCEPT [ ALL ]
            [ <corresponding spec> ] <query term>

  <non-join query term> ::=
        <non-join query primary>
      | <query term> INTERSECT [ ALL ]
            [ <corresponding spec> ] <query primary>
      | <recursive union>

  <non-join query primary> ::=
        <simple table>
      | <left paren> <non-join query expression> <right paren>

  <simple table> ::=
        <query specification>
      | <table value designator>
      | <explicit table>
      | <collection expression>

  <query specification> ::=
      SELECT [ <set quantifier> ] <select list>
        <table expression>

  <set quantifier> ::= DISTINCT | ALL

  <select list> ::=
        <asterisk>
      | <select sublist> [ ( <comma> <select sublist> )... ]

  <select sublist> ::=
        <derived column>
      | <qualifier> <period> <asterisk>

  <derived column> ::=
      <value expression> [ <as clause> ]

  <value expression> ::=
        <numeric value expression>
      | <string value expression>
      | <datetime value expression>
      | <interval value expression>
      | <enumerated value expression>
      | <boolean value expression>
      | <attributes function>
      | <abstract data type value expression>
      | <table value expression>
      | <collection value expression>

  <numeric value expression> ::=
        <term>
      | <numeric value expression> <plus sign> <term>
      | <numeric value expression> <minus sign> <term>

  <term> ::=
        <factor>
      | <term> <asterisk> <factor>
      | <term> <solidus> <factor>

  <factor> ::=
      [ <sign> ] <numeric primary>

  <numeric primary> ::=
        <value expression primary>
      | <numeric value function>

  <value expression primary> ::=
        <unsigned value specification>
      | <column reference>
      | <row reference>
      | <set function specification>
      | <table subquery>
      | <case expression>
      | <left paren> <value expression> <right paren>
      | <cast specification>

  <unsigned value specification> ::=
        <unsigned literal>
      | <general value specification>

  <unsigned literal> ::=
        <unsigned numeric literal>
      | <general literal>

  <general literal> ::=
        <character string literal>
      | <national character string literal>
      | <bit string literal>
      | <hex string literal>
      | <datetime literal>
      | <interval literal>
      | <enumeration literal>
      | <boolean literal>
      | <oid literal>

  <datetime literal> ::=
        <date literal>
      | <time literal>
      | <timestamp literal>

  <date literal> ::=
      DATE <date string>

  <time literal> ::=
      TIME <time string>

  <timestamp literal> ::=
      TIMESTAMP <timestamp string>

  <interval literal> ::=
      INTERVAL [ <sign> ] <interval string> <interval qualifier>

  <interval qualifier> ::=
        <start field> TO <end field>
      | <single datetime field>

  <start field> ::=
      <non-second datetime field>
          [ <left paren> <interval leading field precision> <right paren> ]

  <non-second datetime field> ::= YEAR | MONTH | DAY | HOUR | MINUTE

  <interval leading field precision> ::= <unsigned integer>

  <end field> ::=
        <non-second datetime field>
      | SECOND
          [ <left paren> <interval fractional seconds precision> <right paren> ]

  <interval fractional seconds precision> ::= <unsigned integer>

  <single datetime field> ::=
        <non-second datetime field>
            [ <left paren> <interval leading field precision> <right paren> ]
      | SECOND [ <left paren> <interval leading field precision>
            [ <comma> <interval fractional seconds precision> ] <right paren> ]

  <enumeration literal> ::=
      <domain name> <double colon> <enumeration name>

  <domain name> ::= <schema qualified name>

  <schema qualified name> ::=
      [ <schema name> <period> ] <qualified identifier>

  <enumeration name> ::= <identifier>

  <boolean literal> ::=
        TRUE
      | FALSE

  <oid literal> ::= OID <oid string>

  <oid string> ::= <quote> <oid value> <quote>

  <oid value> ::= <character representation>...

  <general value specification> ::=
        <item reference>
      | USER
      | CURRENT_USER
      | SESSION_USER
      | SYSTEM_USER
      | CURRENT_PATH
      | VALUE
      | <function invocation>
      | <attribute reference>
      | <template parameter name>

  <item reference> ::=
      <parameter name> [ <indicator parameter> ]

  <parameter name> ::= <colon> <identifier>

  <indicator parameter> ::= [ INDICATOR ] <parameter name>

  <function invocation> ::= <routine invocation>

  <routine invocation> ::=
      <routine name> <argument list>

  <routine name> ::= <local or schema qualified name>
  <local or schema qualified name> ::=
      [ <local or schema qualifier> <period> ] <qualified identifier>

  <local or schema qualifier> ::=
        <schema name>
      | MODULE

  <argument list> ::=
        <left paren> <positional arguments> <comma> <keyword arguments> <right paren>
      | <left paren> <positional arguments> <right paren>
      | <left paren> <keyword arguments> <right paren>
      | <left paren> <right paren>

  <positional arguments> ::=
      <argument> [ ( <comma> <argument> )... ]

  <argument> ::=
        <value expression>
      | <generalized expression>

  <generalized expression> ::=
      <value expression> AS <abstract data type name>

  <abstract data type name> ::= <local or schema qualified name>
  <attribute name> ::=
        <identifier>
      | OID

  <keyword arguments> ::=
      <keyword argument> [ ( <comma> <keyword argument> )... ]

  <keyword argument> ::=
      <parameter name> <keyword parameter tag> <argument>

  <keyword parameter tag> ::= =>

  <attribute reference> ::=
      <value specification> <period> <attribute name>

  <value specification> ::=
        <literal>
      | <general value specification>

  <literal> ::=
        <signed numeric literal>
      | <general literal>

  <signed numeric literal> ::=
      [ <sign> ] <unsigned numeric literal>

  <template parameter name> ::= <colon> <identifier>

  <column reference> ::= [ <qualifier> <period> ] <column name>

  <qualifier> ::=
        <table name>
      | <correlation name>

  <table name> ::=
        <local or schema qualified name>

  <correlation name> ::= <identifier>

  <column name> ::=
        <identifier>
      | OID
  <row reference> ::= ROW <qualifier>

  <set function specification> ::=
        COUNT <left paren> <asterisk> <right paren>
      | <general set function>

  <general set function> ::=
        <set function type>
            <left paren> [ <set quantifier> ] <value expression> <right paren> ]

  <set function type> ::=
      AVG | MAX | MIN | SUM | COUNT

  <table subquery> ::= <subquery>

  <subquery> ::= <left paren> <query expression> <right paren>

  <case expression> ::=
        <case abbreviation>
      | <case specification>

  <case abbreviation> ::=
        NULLIF <left paren> <value expression> <comma>
              <value expression> <right paren>
      | COALESCE <left paren> <value expression>
              ( <comma> <value expression> )... <right paren>

  <case specification> ::=
        <simple case>
      | <searched case>

  <simple case> ::=
      CASE <case operand>
        <simple when clause>...
        [ <else clause> ]
      END

  <case operand> ::= <value expression>

  <simple when clause> ::= WHEN <when operand> THEN <result>

  <when operand> ::= <value expression>

  <result> ::= <result expression> | NULL

  <result expression> ::= <value expression>

  <else clause> ::= ELSE <result>

  <searched case> ::=
      CASE
        <searched when clause>...
        [ <else clause> ]
      END

  <searched when clause> ::= WHEN <search condition> THEN <result>

  <search condition> ::=
      <boolean value expression>

  <boolean value expression> ::=
        <boolean term>
      | <boolean value expression> OR <boolean term>

  <boolean term> ::=
        <boolean factor>
      | <boolean term> AND <boolean factor>

  <boolean factor> ::=
      [ NOT ] <boolean primary>

  <boolean primary> ::=
        <predicate>
      | <value expression primary>

  <predicate> ::=
        <comparison predicate>
      | <between predicate>
      | <in predicate>
      | <like predicate>
      | <null predicate>
      | <quantified comparison predicate>
      | <exists predicate>
      | <unique predicate>
      | <match predicate>
      | <overlaps predicate>
      | <similar predicate>
      | <quantified predicate>
      | <there is predicate>
      | <distinct predicate>
      | <boolean predicate>

  <comparison predicate> ::=
      <row value designator> <comp op> <row value designator>

  <row value designator> ::=
         <row value designator element>
      | <left paren> <row value designator list> <right paren>
      | <row subquery>

  <row value designator element> ::=
        <value expression>
      | <null specification>
      | <default specification>

  <null specification> ::=
      NULL [ <left paren> <null state> <right paren> ]

  <null state> ::= <identifier>

  <default specification> ::=
      DEFAULT

  <row value designator list> ::=
      <row value designator element>
          [ ( <comma> <row value designator element> )... ]

  <row subquery> ::= <subquery>

  <comp op> ::=
        <equals operator>
      | <not equals operator>
      | <less than operator>
      | <greater than operator>
      | <less than or equals operator>
      | <greater than or equals operator>

  <between predicate> ::=
      <row value designator> [ NOT ] BETWEEN
        <row value designator> AND <row value designator>

  <in predicate> ::=
      <row value designator>
        [ NOT ] IN <in predicate value>

  <in predicate value> ::=
        <table subquery>
      | <left paren> <in value list> <right paren>

  <in value list> ::=
      <value expression> ( <comma> <value expression> )...

  <like predicate> ::=
      <match value> [ NOT ] LIKE <pattern>
        [ ESCAPE <escape character> ]

  <match value> ::= <character value expression>

  <character value expression> ::=
        <concatenation>
      | <character factor>

  <concatenation> ::=
      <character value expression> <concatenation operator>
          <character factor>

  <character factor> ::=
      <character primary> [ <collate clause> ]

  <character primary> ::=
        <value expression primary>
      | <string value function>

  <string value function> ::=
        <character value function>
      | <bit value function>

  <character value function> ::=
        <character substring function>
      | <regular expression substring function>
      | <fold>
      | <form-of-use conversion>
      | <character translation>
      | <trim function>

  <character substring function> ::=
      SUBSTRING <left paren> <character value expression> FROM <start position>
                  [ FOR <string length> ] <right paren>

  <start position> ::= <numeric value expression>

  <string length> ::= <numeric value expression>

  <regular expression substring function> ::=
      SUBSTRING <left paren> <character value expression> FROM
                  <character value expression> FOR
                        <escape character> <right paren>

  <escape character> ::= <character value expression>

  <fold> ::= ( UPPER | LOWER )
       <left paren> <character value expression> <right paren>

  <form-of-use conversion> ::=
      CONVERT <left paren> <character value expression>
          USING <form-of-use conversion name> <right paren>

  <form-of-use conversion name> ::= <schema qualified name>
  <character translation> ::=
      TRANSLATE <left paren> <character value expression>
          USING <translation name> <right paren>

  <translation name> ::= <schema qualified name>

  <trim function> ::=
      TRIM <left paren> <trim operands> <right paren>

  <trim operands> ::=
      [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>

  <trim specification> ::=
        LEADING
      | TRAILING
      | BOTH

  <trim character> ::= <character value expression>

  <trim source> ::= <character value expression>

  <bit value function> ::=
      <bit substring function>

  <bit substring function> ::=
      SUBSTRING <left paren> <bit value expression> FROM <start position>
          [ FOR <string length> ] <right paren>

  <bit value expression> ::=
        <bit concatenation>
      | <bit factor>

  <bit concatenation> ::=
      <bit value expression> <concatenation operator> <bit factor>

  <bit factor> ::= <bit primary>

  <bit primary> ::=
        <value expression primary>
      | <string value function>

  <collate clause> ::= COLLATE <collation name>

  <collation name> ::= <schema qualified name>

  <pattern> ::= <character value expression>

  <null predicate> ::= <row value designator>
      IS [ NOT ] NULL
          [ <left paren> <null values specification> <right paren> ]

  <null values specification> ::= <asterisk> | <null state>

  <quantified comparison predicate> ::=
      <row value designator> <comp op> <quantifier> <table subquery>

  <quantifier> ::= <all> | <some>

  <all> ::= ALL

  <some> ::= SOME | ANY

  <exists predicate> ::= EXISTS <table subquery>

  <unique predicate> ::= UNIQUE <table subquery>

  <match predicate> ::=
      <row value designator> MATCH [ UNIQUE ]
          [ PARTIAL | FULL ] <table subquery>

  <overlaps predicate> ::=
      <row value designator 1> OVERLAPS <row value designator 2>

  <row value designator 1> ::= <row value designator>

  <row value designator 2> ::= <row value designator>

  <row value designator 1> ::= <row value designator>

  <row value designator 2> ::= <row value designator>

  <similar predicate> ::=
      <match value> [ NOT ] SIMILAR TO
          <similar pattern>
        [ ESCAPE <escape character> ]

  <similar pattern> ::= <character value expression>

  <quantified predicate> ::=
        <existential clause> <left paren> <search condition> <right paren>
      | <universal clause> <left paren> <search condition> <right paren>
      | <quantified comparison predicate>

  <existential clause> ::=
      FOR SOME <table reference list>

  <table reference list> ::=
      <table reference> [ ( <comma> <table reference> )... ]

  <table reference> ::=
        <table name> [ [ AS ] <correlation name>
            [ <left paren> <derived column list> <right paren> ] ]
      | <derived table> [ AS ] <correlation name>
            [ <left paren> <derived column list> <right paren> ]
      | <joined table>

  <derived column list> ::= <column name list>

  <column name list> ::=
      <column name> [ ( <comma> <column name> )... ]

  <derived table> ::= <table subquery>

  <joined table> ::=
        <cross join>
      | <qualified join>
      | <left paren> <joined table> <right paren>

  <cross join> ::=
      <table reference> CROSS JOIN <table reference>

  <qualified join> ::=
      <table reference> [ NATURAL ] [ <join type> ] JOIN
        <table reference> [ <join specification> ]

  <join type> ::=
        INNER
      | <outer join type> [ OUTER ]
      | UNION

  <outer join type> ::=
        LEFT
      | RIGHT
      | FULL

  <join specification> ::=
        <join condition>
      | <named columns join>
      | <constraint join>

  <join condition> ::= ON <search condition>

  <named columns join> ::=
      USING <left paren> <join column list> <right paren>

  <join column list> ::= <column name list>

  <constraint join> ::=
      | USING PRIMARY KEY
      | USING FOREIGN KEY
      | USING CONSTRAINT <constraint name>

  <constraint name> ::= <schema qualified name>

  <universal clause> ::=
      FOR ALL <table reference list>

  <there is predicate> ::=
      <left paren> <there is clause> <where clause> <right paren>

  <there is clause> ::=
      THERE IS <table reference list>

  <where clause> ::= WHERE <search condition>

  <distinct predicate> ::=
      <row value designator 1> IS DISTINCT FROM
          <row value designator 2>

  <boolean predicate> ::=
      <boolean value expression> [ IS [ NOT ]
            <truth value> ]

  <truth value> ::=
        TRUE
      | FALSE
      | UNKNOWN

  <cast specification> ::=
      CAST <left paren> <cast operand> AS
          <cast target> <right paren>

  <cast operand> ::=
        <value expression>
      | NULL

  <cast target> ::=
        <domain name>
      | <data type>

  <data type> ::=
        <predefined type>
      | <abstract data type name>
      | <generated type reference>
      | <template parameter name>
      | <collection type>

  <predefined type> ::=
        <character string type>
             [ CHARACTER SET <character set specification> ]
      | <national character string type>
      | <bit string type>
      | <numeric type>
      | <enumerated type>
      | <boolean type>
      | <datetime type>
      | <interval type>

  <character string type> ::=
        CHARACTER [ <left paren> <length> <right paren> ]
      | CHAR [ <left paren> <length> <right paren> ]
      | CHARACTER VARYING <left paren> <length> <right paren>
      | CHAR VARYING <left paren> <length> <right paren>
      | VARCHAR <left paren> <length> <right paren>

  <length> ::= <unsigned integer>

  <national character string type> ::=
        NATIONAL CHARACTER [ <left paren> <length> <right paren> ]
      | NATIONAL CHAR [ <left paren> <length> <right paren> ]
      | NCHAR [ <left paren> <length> <right paren> ]
      | NATIONAL CHARACTER VARYING <left paren> <length> <right paren>
      | NATIONAL CHAR VARYING <left paren> <length> <right paren>
      | NCHAR VARYING <left paren> <length> <right paren>

  <bit string type> ::=
        BIT [ <left paren> <length> <right paren> ]
      | BIT VARYING <left paren> <length> <right paren>

  <numeric type> ::=
        <exact numeric type>
      | <approximate numeric type>

  <exact numeric type> ::=
        NUMERIC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | DECIMAL [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | DEC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
      | INTEGER
      | INT
      | SMALLINT

  <precision> ::= <unsigned integer>

  <scale> ::= <unsigned integer>

  <approximate numeric type> ::=
        FLOAT [ <left paren> <precision> <right paren> ]
      | REAL
      | DOUBLE PRECISION

  <enumerated type> ::=
      <left paren> <enumeration name list> <right paren>

  <enumeration name list> ::=
      <enumeration name> [ ( <comma> <enumeration name> )... ]

  <boolean type> ::= BOOLEAN

  <datetime type> ::=
        DATE
      | TIME [ <left paren> <time precision> <right paren> ]
            [ WITH TIME ZONE ]
      | TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
            [ WITH TIME ZONE ]
  <time precision> ::= <time fractional seconds precision>

  <time fractional seconds precision> ::= <unsigned integer>

  <timestamp precision> ::= <time fractional seconds precision>

  <interval type> ::= INTERVAL <interval qualifier>

  <generated type reference> ::=
      <type template name> <template parameter list>

  <type template name> ::= <schema qualified name>

  <template parameter list> ::=
      <left paren>
        <template parameter> [ ( <comma> <template parameter> )... ]
      <right paren>

  <template parameter> ::=
        <value specification>
      | <data type>

  <collection type> ::=
        <set type>
      | <multiset type>
      | <list type>

  <set type> ::= SET <left paren> <data type> <right paren>

  <multiset type> ::= MULTISET <left paren> <data type> <right paren>

  <list type> ::= LIST <left paren> <data type> <right paren>

  <numeric value function> ::=
        <position expression>
      | <extract expression>
      | <length expression>

  <position expression> ::=
      POSITION <left paren> <character value expression>
          IN <character value expression> <right paren>

  <extract expression> ::=
      EXTRACT <left paren> <extract field>
          FROM <extract source> <right paren>

  <extract field> ::=
        <datetime field>
      | <time zone field>

  <datetime field> ::=
        <non-second datetime field>
      | SECOND

  <time zone field> ::=
        TIMEZONE_HOUR
      | TIMEZONE_MINUTE

  <extract source> ::=
        <datetime value expression>
      | <interval value expression>

  <datetime value expression> ::=
        <datetime term>
      | <interval value expression> <plus sign> <datetime term>
      | <datetime value expression> <plus sign> <interval term>
      | <datetime value expression> <minus sign> <interval term>

  <interval term> ::=
        <interval factor>
      | <interval term 2> <asterisk> <factor>
      | <interval term 2> <solidus> <factor>
      | <term> <asterisk> <interval factor>

  <interval factor> ::=
      [ <sign> ] <interval primary>

  <interval primary> ::=
        <value expression primary> [ <interval qualifier> ]

  <interval term 2> ::= <interval term>

  <interval value expression> ::=
        <interval term>
      | <interval value expression 1> <plus sign> <interval term 1>
      | <interval value expression 1> <minus sign> <interval term 1>
      | <left paren> <datetime value expression> <minus sign>
            <datetime term> <right paren> <interval qualifier>

  <interval value expression 1> ::= <interval value expression>

  <interval term 1> ::= <interval term>

  <datetime term> ::=
        <datetime factor>

  <datetime factor> ::=
        <datetime primary> [ <time zone> ]

  <datetime primary> ::=
        <value expression primary>
      | <datetime value function>

  <datetime value function> ::=
        <current date value function>
      | <current time value function>
      | <current timestamp value function>

  <current date value function> ::= CURRENT_DATE

  <current time value function> ::=
        CURRENT_TIME [ <left paren> <time precision> <right paren> ]

  <current timestamp value function> ::=
        CURRENT_TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]

  <time zone> ::=
      AT <time zone specifier>

  <time zone specifier> ::=
        LOCAL
      | TIME ZONE <interval primary>

  <length expression> ::=
        <char length expression>
      | <octet length expression>
      | <bit length expression>

  <char length expression> ::=
      ( CHAR_LENGTH | CHARACTER_LENGTH )
          <left paren> <string value expression> <right paren>

  <string value expression> ::=
        <character value expression>
      | <bit value expression>

  <octet length expression> ::=
      OCTET_LENGTH <left paren> <string value expression> <right paren>

  <bit length expression> ::=
      BIT_LENGTH <left paren> <string value expression> <right paren>

  <enumerated value expression> ::=
        <domain name> <left paren> <value expression> <right paren>
      | <enumerated primary>

  <enumerated primary> ::=
        <value expression primary>

  <attributes function> ::=
      ATTRIBUTES
        <left paren> <abstract data type value expression> <right paren>

  <abstract data type value expression> ::= <ADT expression>

  <ADT expression> ::=
      <ADT term>
      | <ADT expression> <term operator> <ADT term>

  <term operator> ::= <ADT operator>

  <ADT operator> ::= <user-defined operator symbol)

  <ADT term> ::=
      <ADT factor>
      | <ADT term> <factor operator> <ADT factor>

  <factor operator> ::= <ADT operator>

  <ADT factor> ::=
      <ADT primary>
      | <prefix operator> <ADT primary>
      | <ADT primary> <postfix operator>

  <ADT primary> ::=
      <value expression primary>

  <prefix operator> ::= <ADT operator>

  <postfix operator> ::= <ADT operator>

  <table value expression> ::=
      <table type>
        <left paren>
          [ <value expression> [ ( <comma> <value expression> )... ] ]
        <right paren>

  <table type> ::=
        TABLE
      | SET
      | LIST

  <collection value expression> ::=
        <set value designator>
      | <multiset value designator>
      | <list value designator>

  <set value designator> ::=
      SET <left paren> [ <collection list> ] <right paren>

  <collection list> ::=
      <collection element> [ ( <comma> <collection element> )... ]

  <collection element> ::= <value expression>

  <multiset value designator> ::=
      MULTISET <left paren> [ <collection list> ] <right paren>

  <list value designator> ::=
      LIST <left paren> [ <collection list> ] <right paren>

  <as clause> ::= [ AS ] <column name>

  <table expression> ::=
      <from clause>
      [ <where clause> ]
      [ <group by clause> ]
      [ <having clause> ]

  <from clause> ::= FROM <table reference>
      [ ( <comma> <table reference> )... ]

  <group by clause> ::=
      GROUP BY <grouping column reference list>

  <grouping column reference list> ::=
      <grouping column reference>
          [ ( <comma> <grouping column reference> )... ]

  <grouping column reference> ::=
      <column reference> [ <collate clause> ]

  <having clause> ::= HAVING <search condition>

  <table value designator> ::=
      VALUES <table value designator list>

  <table value designator list> ::=
      <row value designator> [ ( <comma> <row value designator> )... ]

  <explicit table> ::= <table type> <table name>

  <collection expression> ::=
      <value expression>

  <query term> ::=
        <non-join query term>
      | <joined table>

  <corresponding spec> ::=
      CORRESPONDING [ BY <left paren> <corresponding column list> <right paren> ]

  <corresponding column list> ::= <column name list>

  <query primary> ::=
        <non-join query primary>
      | <joined table>

  <recursive union> ::=
      <left paren> <initial expression>
        RECURSIVE UNION <correlation name list>
            [ <left paren> <recursive column list> <right paren> ]
        <iteration expression>
        [ <search clause> ]
        [ <cycle clause> ]
        [ <limit clause> ] <right paren>

  <initial expression> ::= <query expression>

  <correlation name list> ::=
      <correlation name> [ ( <comma> <correlation name> )... ]

  <recursive column list> ::= <column name list>

  <iteration expression> ::= <query expression>

  <search clause> ::=
      SEARCH <search order> SET <sequence column>

  <search order> ::=
        PREORDER
      | ( DEPTH | BREADTH ) FIRST BY <sort specification list>

  <sort specification list> ::=
      <sort specification> [ ( <comma> <sort specification> )... ]

  <sort specification> ::=
      <sort key> [ <collate clause> ] [ <ordering specification> ]

  <sort key> ::=
      <value expression>

  <ordering specification> ::= ASC | DESC

  <sequence column> ::= <column name>

  <cycle clause> ::=
      CYCLE [ <cycle column list> ]
        SET <cycle mark column>
            [ TO <cycle mark value> ]

  <cycle column list> ::=
      <cycle column> [ ( <comma> <cycle column> )... ]

  <cycle column> ::= <column name>

  <cycle mark column> ::= <column name>

  <cycle mark value> ::= <value expression>

  <limit clause> ::=
      [ RETURN | EXCEPTION ] LIMIT
          <left paren> <value specification> <right paren>

  <trigger definition> ::=
      [ CREATE ] TRIGGER [ <trigger name> ]
        <trigger action time> <trigger event>
          [ ON <table name> ]
          [ ORDER <order value> ]
          [ REFERENCING <old or new values alias list> ]
        <triggered action>

  <trigger name> ::= <schema qualified name>

  <trigger action time> ::=
        BEFORE
      | AFTER
      | INSTEAD OF

  <trigger event> ::=
        INSERT
      | DELETE
      | UPDATE [ OF <trigger column list> ]

  <trigger column list> ::= <column name list>

  <order value> ::= <unsigned integer>

  <old or new values alias list> ::=
      <old or new values alias>...

  <old or new values alias> ::=
        OLD [ AS ]
            <old values correlation name>
      | NEW [ AS ]
            <new values correlation name>
      | OLD_TABLE [ AS ]
            <old values table alias>
      | NEW_TABLE [ AS ]
            <new values table alias>

  <old values correlation name> ::= <correlation name>

  <new values correlation name> ::= <correlation name>

  <old values table alias> ::= <identifier>

  <new values table alias> ::= <identifier>

  <triggered action> ::=
      [ FOR EACH ( ROW | STATEMENT ) ]
        [ WHEN <left paren> <search condition> <right paren> ]
        <triggered SQL statement>

  <triggered SQL statement> ::=
      <SQL procedure statement> <semicolon>

  <SQL procedure statement> ::=
      [ ASYNC <left paren> <async statement identifier> <right paren> ]
            <SQL executable statement>

  <async statement identifier> ::= <numeric value expression>

  <SQL executable statement> ::=
        <SQL schema statement>
      | <SQL data statement>
      | <SQL transaction statement>
      | <SQL connection statement>
      | <SQL session statement>
      | <SQL diagnostics statement>

  <SQL schema statement> ::=
        <SQL schema definition statement>
      | <SQL schema manipulation statement>

  <SQL schema definition statement> ::=
        <schema definition>
      | <table definition>
      | <view definition>
      | <grant statement>
      | <role definition>
      | <grant role statement>
      | <domain definition>
      | <null class definition>
      | <character set definition>
      | <collation definition>
      | <translation definition>
      | <assertion definition>
      | <trigger definition>
      | <routine>
      | <abstract data type definition>
      | <type template definition>

  <schema definition> ::=
      CREATE SCHEMA <schema name clause>
        [ <schema character set specification> ]
        [ <schema path specification> ]
        [ <schema element>... ]

  <schema name clause> ::=
        <schema name>
      | AUTHORIZATION <schema authorization identifier>
      | <schema name> AUTHORIZATION <schema authorization identifier>

  <schema authorization identifier> ::=
      <authorization identifier>

  <schema character set specification> ::=
      DEFAULT CHARACTER SET <character set specification>

  <schema path specification> ::=
      PATH <schema name list>

  <schema element> ::=
        <table definition>
      | <view definition>
      | <domain definition>
      | <null class definition>
      | <character set definition>
      | <collation definition>
      | <translation definition>
      | <assertion definition>
      | <trigger definition>
      | <routine>
      | <abstract data type definition>
      | <type template definition>
      | <grant statement>
      | <role definition>
      | <grant role statement>

  <table definition> ::=
      CREATE [ <table scope> ] <table type> <table name>
        [ <constant or updatable> ]
        ( <table element list> | <subtable clause> )
        [ ON COMMIT <table commit action> ROWS ]

  <table scope> ::=
      <global or local> TEMPORARY

  <global or local> ::=
        GLOBAL
      | LOCAL

  <constant or updatable> ::=
        CONSTANT
      | UPDATABLE

  <table element list> ::=
      <left paren> <table element> [ ( <comma> <table element> )... ] <right paren>

  <table element> ::=
        <column definition>
      | <table constraint definition>
      | <like clause>

  <column definition> ::=
      <column name>
      ( <data type> | <domain name> )
      [ <default clause> ]
      [ <column constraint definition>... ]
      [ <collate clause> ]
      [ <null clause> ]

  <default clause> ::=
        ( DEFAULT | <assignment operator> ) <default option>

  <default option> ::=
        <literal>
      | <datetime value function>
      | USER
      | CURRENT_USER
      | SESSION_USER
      | SYSTEM_USER
      | NULL [ <left paren> <null state> <right paren> ]
      | <function invocation>

  <column constraint definition> ::=
      [ <constraint name definition> ]
      <column constraint> [ <constraint attributes> ]

  <constraint name definition> ::= CONSTRAINT <constraint name>

  <column constraint> ::=
        NOT NULL
      | <unique specification>
      | <references specification>
      | <check constraint definition>

  <unique specification> ::=
        UNIQUE
      | PRIMARY KEY

  <references specification> ::=
      REFERENCES [ PENDANT ] <referenced table and columns>
        [ MATCH <match type> ]
        [ <referential triggered action> ]

  <referenced table and columns> ::=
       <table name> [ <left paren> [ <reference column list> ] <right paren> ]

  <reference column list> ::= <column name list>

  <match type> ::=
        FULL
      | PARTIAL

  <referential triggered action> ::=
        <update rule> [ <delete rule> ]
      | <delete rule> [ <update rule> ]

  <update rule> ::= ON UPDATE <referential action>

  <referential action> ::=
        CASCADE
      | SET NULL [ <left paren> <null state> <right paren> ]
      | SET DEFAULT
      | RESTRICT
      | NO ACTION
  <delete rule> ::= ON DELETE <referential action>

  <check constraint definition> ::=
      CHECK <left paren> <search condition> <right paren>

  <constraint attributes> ::=
        <constraint check time> [ [ NOT ] DEFERRABLE ]
      | [ NOT ] DEFERRABLE [ <constraint check time> ]

  <constraint check time> ::=
        INITIALLY DEFERRED
      | INITIALLY IMMEDIATE

  <null clause> ::=
      NULL IS <null class name>

  <null class name> ::= <schema qualified name>

  <null clause> ::=
      NULL IS <null class name>

  <table constraint definition> ::=
      [ <constraint name definition> ]
      <table constraint> [ <constraint attributes> ]

  <table constraint> ::=
        <unique constraint definition>
      | <referential constraint definition>
      | <check constraint definition>

  <unique constraint definition> ::=
                                  even in SQL3)
        <unique specification> [ <left paren> <unique column list>
            <right paren> ]
      | UNIQUE ( VALUE )

  <unique column list> ::= <column name list>

  <referential constraint definition> ::=
      FOREIGN KEY [ <left paren> <referencing columns> <right paren> ]
        <references specification>

  <referencing columns> ::=
      <reference column list>

  <like clause> ::= LIKE <table name>

  <subtable clause> ::=
      UNDER <supertable clause>
          [ ( , <supertable clause> )... ]

  <supertable clause> ::=
      <supertable name>
        [ WITH ( <member renaming element>
            [ ( , <member renaming element> )... ] ) ]

  <supertable name> ::= <table name>

  <member renaming element> ::=
      <supertable member name> AS <subtable member name>

  <supertable member name> ::=
        <column name>
      | <routine name>

  <subtable member name> ::=
        <column name>
      | <routine name>

  <table commit action> ::=
        PRESERVE
      | DELETE

  <view definition> ::=
      CREATE VIEW <table name> [ <left paren> <view column list> <right paren> ]
        AS <query expression>
        [ WITH [ <levels clause> ] CHECK OPTION ]

  <view column list> ::= <column name list>

  <levels clause> ::=
        CASCADED
      | LOCAL

  <domain definition> ::=
      CREATE DOMAIN <domain name>
          [ AS ] <data type>
        [ <default clause> ]
        [ <domain constraint>... ]
        [ <collate clause> ]
        [ <null clause> ]

  <domain constraint> ::=
      [ <constraint name definition> ]
      <check constraint definition> [ <constraint attributes> ]

  <null class definition> ::=
      CREATE NULL CLASS <null class name> [ AS ]
          ( <null state list> )

  <null state list> ::=
      <null state> [ ( <comma> <null state> )... ]

  <character set definition> ::=
      CREATE CHARACTER SET <character set name>
          [ AS ]
        <character set source>
        <form-of-use specification>
        [ <collate clause> | <limited collation definition> ]

  <character set source> ::=
        GET <existing character set name>
            [ <plus sign> <character set source> ]
      | <left paren> <character list> <right paren>

  <character list> ::=
      <character specification> [ ( <comma> <character specification> )... ]

  <character specification> ::=
        <character string literal>
      | <ISO 10646 position>
      | <ISO 10646 character name>

  <ISO 10646 position> ::=
      <val> [ <sep> <val> [ <sep> <val> [ <sep> <val> ] ] ]

  <val> ::= <unsigned numeric literal>

  <sep> ::= <ampersand>

  <ISO 10646 character name> ::= !! <EMPHASIS>(See the Syntax Rules)

  <form-of-use specification> ::= <identifier>

  <limited collation definition> ::=
      COLLATION FROM <collation source>

  <collation source> ::=
        <collating sequence definition>
      | <translation collation>
      | <collation dictionary specification>
      | <collation routine specification>

  <collating sequence definition> ::=
        <external collation>
      | <schema collation name>
      | <internal collation source>
      | DESC <left paren> <collation name> <right paren>
      | DEFAULT

  <external collation> ::=
      EXTERNAL
          <left paren> <quote> <external collation name> <quote> <right paren>

  <external collation name> ::=
        <standard collation name>
      | <implementation-defined collation name>

  <standard collation name> ::= <collation name>

  <implementation-defined collation name> ::= <collation name>

  <schema collation name> ::= <collation name>

  <internal collation source> ::= <left paren> <collation options> <right paren>

  <collation options> ::=
      <collation option> [ ( <comma> <collation option> )... ]

  <collation option> ::=
        USING <left paren> <collating basis> <right paren>
      | SEQUENCE <left paren> <enumerated collating sequence> <right paren>
      | MODIFY <left paren> <collating modifiers> <right paren>
      | WHEN NOT FOUND
          ( IGNORE | MAX | MIN )

  <collating basis> ::=
      <collating foundation> [ ( <plus sign> <collating foundation> )... ]

  <collating foundation> ::=
      <collating sequence definition>
      <collating sequence definition> [ ( <asterisk> <translation name> )... ]

  <enumerated collating sequence> ::=
      <collating chars> [ ( <comma> <collating chars> )... ]

  <collating chars> ::=
        <character specification>
      | <character range>

  <character range> ::=
      <character specification> <minus sign> <character specification>

  <collating modifiers> ::=
        <collating modifier> [ ( <comma> <collating modifier> )... ]

  <collating modifier> ::=
      <collating chars>
        ( <less than operator> | <greater than operator> | <equals operator> )
      <collating chars>

  <translation collation> ::=
      TRANSLATION <translation name>
          [ THEN COLLATION <collation name> ]

  <collation dictionary specification> ::=
      DICTIONARY <dictionary name> [ <plus sign> <dictionary name> ]

  <dictionary name> ::=
      <quote> <implementation-defined dictionary name> <quote>

  <implementation-defined dictionary name> ::= !! <EMPHASIS>(See the Syntax Rules)

  <collation routine specification> ::=
        ROUTINE <left paren> <implementation-defined routine name>
            <left paren> <params> <right paren> <right paren>

  <implementation-defined routine name> ::= !! <EMPHASIS>(See the Syntax Rules)

  <params> ::= !! <EMPHASIS>(Not yet defined)

  <params> ::= !! <EMPHASIS>(Not yet defined)

  <existing character set name> ::=
        <standard character repertoire name>
      | <implementation-defined character repertoire name>
      | <schema character set name>

  <schema character set name> ::= <character set name>

  <collation definition> ::=
      CREATE COLLATION <collation name> FOR
          <character set specification>
        FROM <collation source>
          [ <pad attribute> ]

  <pad attribute> ::=
        NO PAD
      | PAD SPACE

  <translation definition> ::=
      CREATE TRANSLATION <translation name>
        FOR <source character set specification>
          TO <target character set specification>
        FROM <translation source>

  <source character set specification> ::= <character set specification>

  <target character set specification> ::= <character set specification>

  <translation source> ::=
        <translation specification>
      | <translation routine>

  <translation specification> ::=
        <external translation>
      | IDENTITY
      | <schema translation name>
      | <internal translation source>

  <external translation> ::=
      EXTERNAL
          <left paren> <quote> <external translation name> <quote> <right paren>

  <external translation name> ::=
        <standard translation name>
      | <implementation-defined translation name>

  <standard translation name> ::= <translation name>

  <implementation-defined translation name> ::= <translation name>

  <schema translation name> ::= <translation name>

  <internal translation source> ::=
      <left paren> <translation options> <right paren>

  <translation options> ::=
      <translation option> [ ( <comma> <translation option> )... ]

  <translation option> ::=
        USING <left paren> <translation basis> <right paren>
      | MODIFY <left paren> <translation modifiers> <right paren>

  <translation basis> ::=
      <translation definition> [ ( <asterisk> <translation definition> )... ]

  <translation modifiers> ::=
        <translation modifier> [ ( <comma> <translation modifier> )... ]

  <translation modifier> ::=
      <collating chars> <equals operator> <collating chars>

  <translation routine> ::=
        ROUTINE <left paren> <implementation-defined routine name>
            <left paren> <params> <right paren> <right paren>

  <assertion definition> ::=
      CREATE ASSERTION <constraint name>
        <assertion trigger>...
        <triggered assertion> [ <constraint attributes> ]

  <assertion trigger> ::=
        <immediate assertion trigger>
      | <deferred assertion trigger>

  <immediate assertion trigger> ::=
      AFTER ( <assertion trigger statement>
        [ ( <comma> <assertion trigger statement> )... ] ON
             <table name> )...

  <assertion trigger statement> ::=
        INSERT
      | DELETE
      | UPDATE [ OF <left paren> <assertion column list> <right paren> ]

  <assertion column list> ::= <column name list>

  <deferred assertion trigger> ::= BEFORE COMMIT

  <triggered assertion> ::=
      CHECK <left paren> <search condition> <right paren>
        [ FOR
            [ EACH [ ROW OF ] ] <table name> ]

  <routine> ::=
      [ CREATE | DECLARE ] <routine header> <routine name> <parameter list>
      [ <returns clause> ]
      [ <caller language clause> ]
      [ SPECIFIC <specific name> ] <semicolon>
      <routine body> <semicolon>

  <routine header> ::=
        PROCEDURE
      | [ <function type> ] FUNCTION

  <function type> ::=
        CONSTRUCTOR
      | DESTRUCTOR
      | DESIGNATOR
      | ACTOR

  <parameter list> ::=
      <left paren>
        [ <parameter declaration> [ (  <comma> <parameter declaration> )... ] ]
      <right paren>

  <parameter declaration> ::=
        [ <parameter mode> ] [ <parameter name> ] <data type>
            [ <default clause> ]
      | <status parameter>

  <parameter mode> ::=
        IN
      | OUT
      | INOUT

  <status parameter> ::=
        SQLSTATE
      | SQLCODE

  <returns clause> ::= RETURNS <returns data type> [ <result cast> ]

  <returns data type> ::= <data type>

  <result cast> ::= CAST FROM <data type>

  <caller language clause> ::= <language clause>

  <specific name> ::= <schema qualified name>

  <routine body> ::=
        <SQL routine body>
      | <external body reference>

  <SQL routine body> ::= <SQL procedure statement>

  <external body reference> ::=
      EXTERNAL [ NAME <external routine name> ]
      <external routine language clause>
      [ <variant attribute> ]

  <external routine name> ::= <identifier>

  <external routine language clause> ::= <language clause>

  <variant attribute> ::=
        VARIANT
      | NOT VARIANT

  <abstract data type definition> ::=
        <distinct type definition>
      | <explicit abstract data type definition>

  <distinct type definition> ::=
      CREATE DISTINCT TYPE <distinct type name>
        AS <data type>

  <distinct type name> ::= <abstract data type name>

  <explicit abstract data type definition> ::=
      CREATE TYPE <abstract data type name>
        <abstract data type body>

  <abstract data type body> ::=
      [ <oid options> ]
      [ <subtype clause> ]
      [ [ <constant or updatable> ] [ <member list> ] ]

  <oid options> ::=
        WITH OID [ [ NOT ] VISIBLE ]
      | WITHOUT OID

  <subtype clause> ::=
      UNDER <supertype clause>
          [ ( <comma> <supertype clause> )... ]

  <supertype clause> ::=
      <abstract data type name> [ <component renaming clause> ]

  <component renaming clause> ::=
      WITH <left paren> <component renaming element>
          [ ( , <component renaming element> )... ] <right paren>

  <component renaming element> ::=
      <supertype component name> AS <subtype component name>

  <supertype component name> ::= <component name>

  <component name> ::= <identifier>

  <subtype component name> ::= <component name>

  <member list> ::=
      <left paren> <member> [ ( <comma> <member> )... ] <right paren>

  <member> ::=
        <attribute definition>
      | <routine declaration>
      | <operator name list>
      | <equals clause>
      | <less-than clause>
      | <cast clause>
      | <table constraint definition>

  <attribute definition> ::=
        <stored attribute>
      | <virtual attribute>

  <stored attribute> ::=
      [ <encapsulation level> ]
      <attribute name> [ <constant or updatable> ]
      ( <data type> | <domain name> )
      [ <default clause> ]
      [ <column constraint definition>... ]
      [ <collate clause> ]
      [ <null clause> ]

  <encapsulation level> ::=
        PRIVATE
      | PROTECTED
      | PUBLIC
  <virtual attribute> ::=
      [ <encapsulation level> ]
        <attribute name> <derivation clause>
      [ <check constraint definition>... ]
      [ <collate clause> ]

  <derivation clause> ::=
      [ READ ONLY | CONSTANT | UPDATABLE ] <data type>
        VIRTUAL [ <derivation functions> ]

  <derivation functions> ::=
        <get function> [ <set function> ]
      | <set function> [ <get function> ]

  <get function> ::=
      GET WITH <routine name>

  <set function> ::=
      SET WITH <routine name>

  <routine declaration> ::=
      [ <encapsulation level> ] <routine>

  <operator name list> ::=
      OPERATORS <specific routine designator>...

  <specific routine designator> ::=
        SPECIFIC <specific name>
      | <member name>

  <member name> ::= <routine name> [ <data type list> ]

  <data type list> ::=
      <left paren> <data type> [ ( <comma> <data type> )... ] <right paren>

  <equals clause> ::=
      EQUALS <equals function specification> <semicolon>

  <equals function specification> ::=
        <routine name>
      | STATE
      | OID

  <less-than clause> ::=
      LESS THAN <less-than function specification> <semicolon>

  <less-than function specification> ::=
        <routine name>
      | NONE

  <cast clause> ::=
      CAST <left paren> <operand data type> AS
          <result data type>
           WITH <cast function> <right paren> <semicolon>

  <operand data type> ::= <data type>

  <result data type> ::= <data type>

  <cast function> ::=
      <routine name>

  <type template definition> ::=
      CREATE TYPE TEMPLATE <type template name>
        <template parameter declaration list>
        <abstract data type body>
  <template parameter declaration list> ::=
      <left paren>
        <template parameter declaration>
          [ ( <comma> <template parameter declaration>)... ]
      <right paren>

  <template parameter declaration> ::=
      <template parameter name> <template parameter type>

  <template parameter type> ::=
        <data type>
      | TYPE

  <grant statement> ::=
      GRANT <privileges>
        TO <grantee> [ ( <comma> <grantee> )... ]
          [ WITH GRANT OPTION ]

  <privileges> ::=
        ALL SCHEMA PRIVILEGES
      | <object privileges> ON <object name>

  <object privileges> ::=
        ALL PRIVILEGES
      | <action> [ ( <comma> <action> )... ]

  <action> ::=
        SELECT [ <left paren> <privilege column list> <right paren> ]
      | DELETE
      | INSERT [ <left paren> <privilege column list> <right paren> ]
      | UPDATE [ <left paren> <privilege column list> <right paren> ]
      | REFERENCES [ <left paren> <privilege column list> <right paren> ]
      | USAGE
      | TRIGGER
      | EXECUTE
      | UNDER

  <privilege column list> ::= <column name list>

  <object name> ::=
        [ <table type> ] <table name>
      | DOMAIN <domain name>
      | COLLATION <collation name>
      | CHARACTER SET <character set name>
      | TRANSLATION <translation name>
      | NULL CLASS <null class name>
      | DATA TYPE <abstract data type name>
      | MODULE <module name>
      | TYPE TEMPLATE <type template name>
      | EXTERNAL ROUTINE <specific routine designator>

  <grantee> ::=
        PUBLIC
      | <authorization identifier>
      | <role name>

  <role name> ::= <authorization identifier>

  <role definition> ::= CREATE ROLE <role name>

  <grant role statement> ::=
      GRANT <role granted> [ ( <comma> <role granted> )... ]
        TO <grantee> [ ( <comma> <grantee> )... ]
          [ WITH ADMIN OPTION ]

  <role granted> ::= <role name>
  <SQL schema manipulation statement> ::=
        <drop schema statement>
      | <alter table statement>
      | <drop table statement>
      | <drop view statement>
      | <revoke statement>
      | <revoke role statement>
      | <drop role statement>
      | <alter domain statement>
      | <drop domain statement>
      | <drop null class statement>
      | <drop character set statement>
      | <drop collation statement>
      | <drop translation statement>
      | <drop assertion statement>
      | <drop trigger statement>
      | <drop routine statement>
      | <drop data type statement>
      | <drop type template statement>

  <drop schema statement> ::=
      DROP SCHEMA <schema name> <drop behavior>

  <drop behavior> ::= CASCADE | RESTRICT

  <alter table statement> ::=
      ALTER <table type> <table name> <alter table action>

  <alter table action> ::=
        <add column definition>
      | <alter column definition>
      | <drop column definition>
      | <add supertable clause>
      | <drop supertable clause>
      | <add table constraint definition>
      | <drop table constraint definition>

  <add column definition> ::=
      ADD [ COLUMN ] <column definition>

  <alter column definition> ::=
      ALTER [ COLUMN ] <column name> <alter column action>

  <alter column action> ::=
        <set column default clause>
      | <drop column default clause>
      | <drop column domain clause>

  <set column default clause> ::=
      SET <default clause>

  <drop column default clause> ::=
      DROP DEFAULT

  <drop column domain clause> ::=
      DROP DOMAIN [ <constraint disposition> [ <constraint name list> ] ]

  <constraint disposition> ::=
        KEEP COLUMN CONSTRAINT
      | DROP COLUMN CONSTRAINT

  <constraint name list> ::=
        ALL
      | <constraint name> [ ( <comma> <constraint name> )... ]

  <drop column definition> ::=
      DROP [ COLUMN ] <column name> <drop behavior>

  <add supertable clause> ::=
      ADD <supertable clause>

  <drop supertable clause> ::=
      DROP <supertable clause> <drop behavior>

  <add table constraint definition> ::=
      ADD <table constraint definition>

  <drop table constraint definition> ::=
      DROP CONSTRAINT <constraint name> <drop behavior>

  <drop table statement> ::=
      DROP <table type> <table name> <drop behavior>

  <drop view statement> ::=
      DROP VIEW <table name> <drop behavior>

  <revoke statement> ::=
      REVOKE [ GRANT OPTION FOR ]
          <privileges>
        FROM <grantee> [ ( <comma> <grantee> )... ] <drop behavior>

  <revoke role statement> ::=
      REVOKE <role revoked> [ ( <comma> <role revoked> )... ]
        FROM <grantee> [ ( <comma> <grantee> )... ]

  <role revoked> ::= <role name>

  <drop role statement> ::= DROP ROLE <role name>

  <alter domain statement> ::=
      ALTER DOMAIN <domain name> <alter domain action>

  <alter domain action> ::=
        <set domain default clause>
      | <drop domain default clause>
      | <add domain constraint definition>
      | <drop domain constraint definition>

  <set domain default clause> ::= SET <default clause>

  <drop domain default clause> ::= DROP DEFAULT

  <add domain constraint definition> ::=
      ADD <domain constraint>

  <drop domain constraint definition> ::=
      DROP CONSTRAINT <constraint name>
        [ <constraint disposition> ]

  <drop domain statement> ::=
      DROP DOMAIN <domain name> <drop behavior>
        [ <constraint disposition> [ <constraint name list> ] ]

  <drop null class statement> ::=
       DROP NULL CLASS <null class name>

  <drop character set statement> ::=
      DROP CHARACTER SET <character set name>

  <drop collation statement> ::=
      DROP COLLATION <collation name>
        <drop behavior>
  <drop translation statement> ::=
      DROP TRANSLATION <translation name>

  <drop assertion statement> ::=
      DROP ASSERTION <constraint name>

  <drop trigger statement> ::= DROP TRIGGER <trigger name>

  <drop routine statement> ::=
      DROP ( PROCEDURE | FUNCTION ) <specific routine designator> <drop behavior>

  <drop data type statement> ::=
      DROP DATA TYPE
          <abstract data type name> <drop behavior>

  <drop type template statement> ::=
      DROP TYPE TEMPLATE <type template name>
        <drop behavior>

  <SQL data statement> ::=
        <open statement>
      | <fetch statement>
      | <close statement>
      | <select statement: single row>
      | <new statement>
      | <destroy statement>
      | <SQL data change statement>

  <open statement> ::=
      OPEN <cursor name>
        [ <open cascade option> ]

  <open cascade option> ::=
        CASCADE ON
      | CASCADE OFF

  <fetch statement> ::=
      FETCH [ [ <fetch orientation> ] FROM ]
        <cursor name> INTO <fetch target list>

  <fetch orientation> ::=
        NEXT
      | PRIOR
      | FIRST
      | LAST
      | ( ABSOLUTE | RELATIVE ) <simple value specification>

  <simple value specification> ::=
        <item reference>
      | <literal>

  <fetch target list> ::=
      <target specification> [ ( <comma> <target specification> )... ]

  <target specification> ::=
        <item reference>
      | <template parameter name>

  <close statement> ::=
      CLOSE <cursor name>

  <select statement: single row> ::=
      SELECT [ <set quantifier> ] <select list>
        INTO <select target list>
          <table expression>

  <select target list> ::=
      <target specification> [ ( <comma> <target specification> )... ]

  <new statement> ::=
      NEW <item reference>

  <destroy statement> ::=
      DESTROY <object parameter name>

  <object parameter name> ::= <parameter name>

  <SQL data change statement> ::=
        <delete statement: positioned>
      | <delete statement: searched>
      | <insert statement>
      | <update statement: positioned>
      | <update statement: searched>

  <delete statement: positioned> ::=
      DELETE [ FROM <table name> ]
        WHERE CURRENT OF <cursor name>

  <delete statement: searched> ::=
      DELETE FROM <table reference>
        [ WHERE <search condition> ]

  <insert statement> ::=
      INSERT INTO ( <table reference> | CURSOR <cursor name> )
        <insert columns and source>
        [ <insert point> ]

  <insert columns and source> ::=
        [ <left paren> <insert column list> <right paren> ]
              <query expression>
      | DEFAULT VALUES

  <insert column list> ::= <column name list>

  <insert point> ::=
      <relative insert point> ELEMENT <where clause>

  <relative insert point> ::=
        BEFORE
      | AFTER

  <update statement: positioned> ::=
      UPDATE [ <table reference> ]
        SET [ <update type> ] <set clause list>
          WHERE CURRENT OF <cursor name>

  <update type> ::= ALL | SOME | NONE

  <set clause list> ::=
      <set clause> [ ( <comma> <set clause> )... ]

  <set clause> ::=
      <update target> <equals operator> <row value designator>

  <update target> ::=
        <object column>
      | <left paren> <object column list> <right paren>

  <object column> ::= <column name>

  <object column list> ::=
      <object column> [ ( <comma> <object column> )... ]
  <update statement: searched> ::=
      UPDATE <table reference>
        <update mechanism>
        [ WHERE <search condition> ]

  <update mechanism> ::=
        <update by setting>
      | <update by moving>

  <update by setting> ::=
      SET [ <update type> ] <set clause list>

  <update by moving> ::=
      MOVE <insert point>

  <SQL transaction statement> ::=
        <start transaction statement>
      | <set transaction statement>
      | <set constraints mode statement>
      | <test completion statement>
      | <savepoint statement>
      | <release savepoint statement>
      | <commit statement>
      | <rollback statement>

  <start transaction statement> ::=
      START TRANSACTION <transaction mode>
          [ ( <comma> <transaction mode> )...]

  <transaction mode> ::=
        <isolation level>
      | <transaction access mode>
      | <diagnostics size>

  <isolation level> ::=
      ISOLATION LEVEL <level of isolation>

  <level of isolation> ::=
        READ UNCOMMITTED
      | READ COMMITTED
      | REPEATABLE READ
      | SERIALIZABLE

  <transaction access mode> ::=
        READ ONLY
      | READ WRITE

  <diagnostics size> ::=
      DIAGNOSTICS SIZE <number of conditions>

  <number of conditions> ::= <simple value specification>

  <set transaction statement> ::=
      SET [ LOCAL ] TRANSACTION <transaction mode>
          [ ( <comma> <transaction mode> )... ]

  <set constraints mode statement> ::=
      SET CONSTRAINTS <constraint name list>
          ( DEFERRED | IMMEDIATE )

  <test completion statement> ::=
      ( TEST | WAIT )
         ( ALL | ANY | <async statement identifier list> )
      COMPLETION

  <async statement identifier list> ::=
      <left paren> <async statement identifier>
          [ ( <comma> <async statement identifier> )... ] <right paren>

  <savepoint statement> ::= SAVEPOINT <savepoint specifier>

  <savepoint specifier> ::=
        <savepoint name>
      | <simple target specification>

  <savepoint name> ::= <identifier>

  <simple target specification> ::=
      <item reference>

  <release savepoint statement> ::=
      RELEASE SAVEPOINT <savepoint specifier>

  <commit statement> ::=
      COMMIT [ WORK ] [ AND [ NO ] CHAIN ]

  <rollback statement> ::=
      ROLLBACK [ WORK ] [ AND[ NO ]  CHAIN ]
        [ <savepoint clause> ]

  <savepoint clause> ::=
      TO SAVEPOINT <savepoint specifier>

  <SQL connection statement> ::=
        <connect statement>
      | <set connection statement>
      | <disconnect statement>

  <connect statement> ::=
      CONNECT TO <connection target>

  <connection target> ::=
        <SQL-server name>
          [ AS <connection name> ]
            correspondence with Tony Gordon)
          [ USER <user name> ]
      | DEFAULT

  <SQL-server name> ::= <simple value specification>

  <connection name> ::= <simple value specification>

  <user name> ::= <simple value specification>

  <set connection statement> ::=
      SET CONNECTION <connection object>

  <connection object> ::=
        DEFAULT
      | <connection name>

  <disconnect statement> ::=
      DISCONNECT <disconnect object>

  <disconnect object> ::=
        <connection object>
      | ALL
      | CURRENT

  <SQL session statement> ::=
        <set session authorization identifier statement>
      | <set role statement>
      | <set local time zone statement>

  <set session authorization identifier statement> ::=
      SET SESSION AUTHORIZATION <value specification>

  <set role statement> ::=
      SET ROLE ( <role name> | NONE )

  <set local time zone statement> ::=
      SET TIME ZONE
          <set time zone value>

  <set time zone value> ::=
        <interval value expression>
      | LOCAL

  <SQL diagnostics statement> ::=
      <get diagnostics statement>

  <get diagnostics statement> ::=
      GET DIAGNOSTICS <sql diagnostics information>

  <sql diagnostics information> ::=
        <statement information>
      | <condition information>

  <statement information> ::=
      <statement information item> [ ( <comma> <statement information item> )... ]

  <statement information item> ::=
      <simple target specification>
          <equals operator> <statement information item name>

  <statement information item name> ::=
        NUMBER
      | MORE
      | COMMAND_FUNCTION
      | ROW_COUNT
      | TRANSACTIONS_COMMITTED
      | TRANSACTIONS_ROLLED_BACK
      | TRANSACTION_ACTIVE

  <condition information> ::=
      EXCEPTION <condition number>
        <condition information item>
            [ ( <comma> <condition information item> )... ]

  <condition number> ::= <simple value specification>

  <condition information item> ::=
      <simple target specification>
          <equals operator> <condition information item name>

  <condition information item name> ::=
        CONDITION_NUMBER
      | RETURNED_SQLSTATE
      | CLASS_ORIGIN
      | SUBCLASS_ORIGIN
      | SERVER_NAME
      | CONNECTION_NAME
      | CONSTRAINT_CATALOG
      | CONSTRAINT_SCHEMA
      | CONSTRAINT_NAME
      | TRIGGER_CATALOG
      | TRIGGER_SCHEMA
      | TRIGGER_NAME
      | CATALOG_NAME
      | SCHEMA_NAME
      | TABLE_NAME
      | COLUMN_NAME
      | CURSOR_NAME
      | ROUTINE_CATALOG
      | ROUTINE_SCHEMA
      | ROUTINE_NAME
      | SPECIFIC_NAME
      | MESSAGE_TEXT
      | MESSAGE_LENGTH
      | MESSAGE_OCTET_LENGTH

  <order by clause> ::=
      ORDER BY <sort specification list>

  <updatability clause> ::=
      FOR
          ( READ ONLY |
            UPDATE [ OF <column name list> ] )

  <temporary abstract data type declaration> ::=
      DECLARE TEMPORARY TYPE <abstract data type name>
          <abstract data type body>

  <temporary table declaration> ::=
      DECLARE LOCAL TEMPORARY <table type> <table name>
        <table element list>
        [ ON COMMIT <table commit action> ROWS ]

  <temporary view declaration> ::=
      DECLARE TEMPORARY VIEW <table name>
          [ <left paren> <view column list> <right paren> ]
          AS <query expression>

  <scalar subquery> ::= <subquery>

  <regular expression> ::=
        <regular term>
      | <regular expression> <vertical bar> <regular term>

  <regular term> ::=
        <regular factor>
      | <regular term> <regular factor>

  <regular factor> ::=
        <regular primary>
      | <regular primary> <asterisk>
      | <regular primary> <plus sign>

  <regular primary> ::=
        <character specifier>
      | <percent>
      | <regular character set>
      | <left paren> <regular expression> <right paren>

  <character specifier> ::=
        <non-escaped character>
      | <escaped character>

  <non-escaped character> ::= !! <EMPHASIS>(See the Syntax Rules)

  <escaped character> ::= !! <EMPHASIS>(See the Syntax Rules)

  <regular character set> ::=
        <underscore>
      | <left bracket> <character enumeration>... <right bracket>
      | <left bracket> <circumflex> <character enumeration>... <right bracket>
      | <left bracket> <colon> <regular character set identifier> <colon> <right bracket>

  <character enumeration> ::=
        <character specifier>
      | <character specifier> <minus sign> <character specifier>

  <regular character set identifier> ::= <identifier>

  <SQL object identifier> ::=
      <SQL provenance> <SQL variant>

  <SQL provenance> ::= <arc1> <arc2> <arc3>

  <arc1> ::= iso | 1 | iso <left paren> 1 <right paren>

  <arc2> ::= standard | 0 | standard <left paren> 0 <right paren>

  <arc3> ::= 9075

  <SQL variant> ::= <SQL edition> <SQL conformance>

  <SQL edition> ::= <1987> | <1989> | <1992>

  <1987> ::= 0 | edition1987 <left paren> 0 <right paren>

  <1989> ::= <1989 base> <1989 package>

  <1989 base> ::= 1 | edition1989 <left paren> 1 <right paren>

  <1989 package> ::= <integrity no> | <integrity yes>

  <integrity no> ::= 0 | IntegrityNo <left paren> 0 <right paren>

  <integrity yes> ::= 1 | IntegrityYes <left paren> 1 <right paren>

  <1992> ::= 2 | edition1992 <left paren> 2 <right paren>

  <SQL conformance> ::= <low> | <intermediate> | <high>

  <low> ::= 0 | Low <left paren> 0 <right paren>

  <intermediate> ::= 1 | Intermediate <left paren> 1 <right paren>

  <high> ::= 2 | High <left paren> 2 <right paren>

  3388..44..  EExxtteennssiioonn TTeemmppoorreellllee aa SSQQLL9922

  +o  Document     pour     l'Extension     Temporelle      a      SQL-92
     <ftp://FTP.cs.arizona.edu/tsql/tsql2/>

  +o  Specification                    SQL-3                   Temporelle
     <ftp://FTP.cs.arizona.edu/tsql/tsql2/sql3/>

  Ce  repertoire  contient  les  specifications   pour   une   extension
  temporelle  au  standard  du  langage  SQL-92.  Ce nouveau langage est
  appele TSQL2.

  Les specifications  du  langage  presentees  ici  correspondent  a  la
  version finale du langage.
  La correspondance doit etre adressee au bureau du Comite de Conception
  du Langage TSQL2, Richard T.Snodgrass, Department of Computer Science,
  University  of  Arizona,  Tucson,  AZ  85721, rts@cs.arizona.edu.  Les
  affiliations et les adresses electroniques des membres  du  Comite  de
  Conception  du  langage  TSQL2 peuvent etre trouvees, dans un chapitre
  separe, a la fin des specifications du langage.

  Le contenu du repertoire est le suivant :

  spec.dvi,.ps    Specifications du langage TSQL2, publie en  Septembre,
  1994

  bookspec.ps      Specifications  du  langage  TSQL2,  telles  qu'elles
  apparaissent dans le livre sur TSQL2, publie en Septembre, 1995  (voir
  ci-dessous).

  sql3            proposition de modification soumise au comites ANSI et
  ISO SQL3.

  Un ensemble de commentaires, associes aux specifications  du  langage,
  parle  des decisions de conception, fournit des exemples, et traite de
  la facon dont le langage peut etre implante. Ces commentaires sont,  a
  l'origine,  des propositions faites au Comite de Conception du Langage
  TSQL2. Ils poursuivent actuellement un objectif different: fournir des
  exemples  de syntaxe, expliquer les nombreuses decisions prises durant
  la conception du langage, et  comparer  TSQL2  aux  nombreuses  autres
  propositions  de  langage faites au cours des quinze dernieres annees.
  Il faut insister sur le fait que ces commentaires ne font  pas  partie
  integrante  des  specifications  du  langage  TSQL2  en lui-meme, mais
  plutot qu'elles le completent et constituent un apport. Le mot  de  la
  fin est donne par les specifications de TSQL2 proprement dit.

  Les  commentaires,  ainsi que les specifications du langage, plusieurs
  index, et d'autres elements de support ont ete publies dans un livre :

  Snodgrass,  R.T.,  editeur,  The  TSQL2  Temporal  Query Language, (Le
  Langage de  Requetes Temporel TSQL2) Kluwer Academic Publishers, 1995,
  674+xxiv pages.

  Les  commentaires  d'evaluation sont donnes sous forme abregee dans le
  livre; La totalite  des  commentaires  est  fournie  dans  le  fichier
  eval.ps situe dans ce repertoire

  Le  fichier tl2tsql2.pl est un programme prolog qui traduit la logique
  temporelle autorisee en TSQL2. Ce programme a ete  ecrit  par  Michael
  Boehlen  boehlen@iesd.auc.dk  Il  peut  etre  contacte pour obtenir un
  papier qui decrit cette traduction.  C'est une  version  tout  a  fait
  ancienne  du  programme.  Les  nouvelles  versions  sont disponibles a
  <http://www.cs.auc.dk/general/DBS/tdb/TimeCenter/Software> (the TimeDB
  and Tiger systems).

  3399..  DDiiddaaccttiicciieell SSQQLL

  On       peut       trouver       ce       didacticiel      SQL      a
  <http://w3.one.net/~jhoffman/sqltut.htm>

  Pour les commentaires ou suggestions, envoyer un courrier electronique
  a jhoffman@one.net

  Vous     pouvez     egalement    souhaiter    jeter    un    oeil    a
  <http://w3.one.net/~jhoffman/index.html>

  John Hoffman suggere de visiter les sites suivants :

  <http://www.contrib.andrew.cmu.edu/~shadow/sql.html>Reference SQL

  <http://www.inquiry.com/techtips/thesqlpro/>Demandez le Pro. de SQL

  <http://www.inquiry.com/techtips/thesqlpro/usefulsites.html>Sites
  utiles au Pro. du SGBD Relationnel SQL

  <http://infoweb.magi.com/~steve/develop.html>Les  Sites  de sources du
  programmeur SGBD

  <http://info.itu.ch/special/wwwfiles> Allez-y et regardez  le  fichier
  comp_db.html

  <http://www.compapp.dcu.ie/databases/f017.html>Ingredients pour SGBD

  <http://www.stars.com/Tutorial/CGI/>Creation Web

  <http://wfn-shop.princeton.edu/cgi-bin/foldoc>Dictionnaire
  d'Informatique

  <http://www-ccs.cs.umass.edu/db.html>DBMS Lab/Liens

  SQL  FAQ   <http://epoch.CS.Berkeley.EDU:8000/sequoia/dba/montage/FAQ>
  Allez-y et regardez le fichier SQL_TOC.html

  <http://chaos.mur.csu.edu.au/itc125/cgi/sqldb.html>SGBD SQL

  <http://www.it.rit.edu/~wjs/IT/199602/icsa720/icsa720postings.html>Page
  de Conception de Bases de Donnees RIT

  <http://www.pcslink.com/~ej/dbweb.html>Site de liens vers des Bases de
  Donnees  <http://www.eng.uc.edu/~jtilley/tutorial.html>Didacticiels de
  programmation sur le Web

  <http://www.ndev.com/ndc2/support/resources.htp>Ressources   pour   le
  Developpement

  <http://ashok.pair.com/sql.htm>Liste de Requetes

  <http://jazz.external.hp.com/training/sqltables/main.html>IMAGE    SQL
  Diverses

  <http://www.eit.com/web/netservices.html>Liste de Ressources Internet

  Voici, ci-dessous, un extrait de la page d'accueil du didacticiel SQL.

  Introduction au Langage de Requete Structure

  Version 3.31

  Cette page contient un didacticiel du Langage de Requete Structure( Structured
  Query Language, egalement connu sous le nom de SQL). Ce didacticiel constitue
  une nouveaute sur le World Wide Web, car c'est le premier didacticiel SQL
  complet disponible sur l'Internet. SQL permet l'acces aux donnees dans les
  systemes  de gestion de bases de donnees relationnels tels que Oracle,
  Sybase, Informix, Microsoft SQL Server, Access, et autres en permettant aux
  utilisateurs de decrire les donnees qu'ils desirent obtenir. SQL permet aussi
  aux utilisateurs de definir l'organisation des donnees dans la base et de les
  manipuler. Le but de cette page est de decrire l'utilisation de SQL, et de
  donner des exemples. C'est le langage ANSI SQL, ou standard SQL, qui sera
  utilise dans ce document. Il ne sera pas question ici des fonctionnalites
  specifiques a un SGBD particulier, qui seront traitees dans la section "SQL
  non-standard". Nous vous recommandons d'imprimer cette page afin de pouvoir
  vous referer facilement aux differents exemples.
  ----------------------------------------------------------------------------
  Table des matieres

       Principes fondamentaux de l'instruction SELECT
       Selection Conditionnelle
       Operateurs Relationnels
       Conditions Composees
       IN & BETWEEN
       Utilisation de LIKE

       Jointures
       Cles
       Realisation d'une Jointure
       Elimination des Doubles
       Alias & In/Sous-requetes

       Fonctions d'Agregation
       Vues
       Creation de Nouvelles Tables
       Modification des Tables
       Ajout de Donnees
       Suppression de Donnees
       Mise a Jour des Donnees

       Index
       GROUP BY & HAVING
       Sous-requetes Supplementaires
       EXISTS & ALL
       UNION & Jointures Externes
       SQL Integre
       Questions Courantes sur SQL
       SQL Non-standard
       Resume de la Syntaxe
       Liens Importants

  ----------------------------------------------------------------------------
  Principes fondamentaux de l'instruction SELECT

  Dans une base de donnees relationnelle, les donnees sont stockees dans des
  tables. Par exemple,  une table pourrait mettre en relation le Numero de
  Securite Sociale, le Nom et l'Adresse:

                          TableAdresseEmploye

   NSS      Prenom    Nom       Addresse        Ville       Etat
   512687458Joe       Smith     83 First Street Howard      Ohio
   758420012Mary      Scott     842 Vine Ave.   LosantivilleOhio
   102254896Sam       Jones     33 Elm St.      Paris       New York
   876512563Sarah     Ackerman  440 U.S. 110    Upton       Michigan

  Maintenant, supposons que nous voulions obtenir l'adresse de chaque employe.
  On utilisera SELECT, comme ceci :

  SELECT Prenom, Nom, Adresse, Ville, Etat
  FROM TableAdresseEmploye;

  Voici le resultat de l'interrogation de notre base de donnees :

   Prenom    Nom        Adresse         Ville        Etat
   Joe       Smith      83 First Street  Howard       Ohio
   Mary      Scott      842 Vine Ave.    Losantiville Ohio
   Sam       Jones      33 Elm St.       Paris        New York
   Sarah     Ackerman   440 U.S. 110     Upton        Michigan

  Explication de ce que l'on vient de faire : on vient de rechercher dans toutes
  les donnees de la table TableAdresseEmploye les colonnes nommees Prenom, Nom,
  Adresse, Ville et Etat. Noter que les noms de colonnes et les noms de tables
  sont sans espaces... ils doivent etre saisis en un seul mot; et que
  l'instruction se termine par un point-virgule (;). La forme generale d'une
  instruction SELECT, qui permet de retrouver toutes les lignes d'une table
  est :

  SELECT NomColonne, NomColonne, ...
  FROM NomTable;

  Pour obtenir toutes les colonnes d'une table sans avoir a taper tous les noms
  de colonne, utiliser :

  SELECT * FROM NomTable;

  Chaque Systeme de Gestion de Base de Donnees (SGBD) et chaque logiciel de
  base de donnees utilisent differentes methodes pour se connecter a la base
  de donnee et pour entrer les instructions SQL; consultez le "guru" de votre
  ordinateur pour qu'il vous aide a vous connecter de facon a pouvoir utiliser
  SQL.
  ----------------------------------------------------------------------------
  Selection Conditionnelle

  Pour etudier plus avant l'instruction SELECT , jetons un oeil a un nouvel exemple de table
  (exemple uniquement hypothetique) :

                        EmployeeStatisticsTable

   EmployeeIDNo      Salary           Benefits         Position
   010               75000            15000            Manager
   105               65000            15000            Manager
   152               60000            15000            Manager
   215               60000            12500            Manager
   244               50000            12000            Staff
   300               45000            10000            Staff
   335               40000            10000            Staff
   400               32000            7500             Entry-Level
   441               28000            7500             Entry-Level

  ----------------------------------------------------------------------------
  Operateurs Relationnels

  Il y a six Operateurs Relationnels en SQL, et, apres les avoir presentes,
  nous verrons comment les utiliser :

   =            Egal
   <> or !=
   (voir le manuel) Different
   <            Plus Petit Que
   >            Plus Grand Que
   <=           Plus Petit Que ou Egal a

   >=           Plus Grand Que ou Egal a

  La clause WHERE est utilisee pour specifier que l'on affichera seulement
  certaines ligne de la table, selon un critere definit par cette clause WHERE.
  Ce sera plus clair en prenant une paire d'exemples.

  Si l'on desire voir les numeros d'identification des employes (EMPLOYEEIDNO)
  dont le salaire est egal ou superieur a 50 000, on utilisera la requete
  suivante :

  SELECT EMPLOYEEIDNO
  FROM EMPLOYEESTATISTICSTABLE
  WHERE SALARY >= 50000;

  Noter que le symbole >= (plus grand que ou egal a) est utilise, puisque l'on
  desire voir tout ceux qui gagnent plus de 50 000, ou 50 000, sur la meme
  liste. On aura l'affichage :

  EMPLOYEEIDNO
  ------------
  010
  105
  152
  215
  244

  La description de WHERE, SALARY >= 50000, est appelee une condition. On pourrait
  effectuer le meme traitement sur des colonnes de texte :

  SELECT EMPLOYEEIDNO
  FROM EMPLOYEESTATISTICSTABLE
  WHERE POSITION = 'Manager';

  Ceci entrainera l'affichage des Numeros d'Identification de tous les Managers.
  En general, avec les colonnes contenant du texte, n'utiliser que egal a ou
  different de, et assurez vous que tout texte apparaissant dans l'instruction
  est entoure d'apostrophes (').

  ----------------------------------------------------------------------------
  Conditions plus complexes: Conditions Composees

  L'operateur AND (ET) combine deux ou plusieurs conditions et n'affiche une
  ligne que si cette ligne satisfait TOUTES les conditions requises (i.e. ou
  toutes les conditions sont realisees). Par exemple, pour afficher tout le
  personnel gagnant plus 40 000, ecrire :

  SELECT EMPLOYEEIDNO
  FROM EMPLOYEESTATISTICSTABLE
  WHERE SALARY > 40000 AND POSITION = 'Staff';

  L'operateur OR (OU) combine deux ou plusieurs conditions mais retourne cette
  ligne si N'IMPORTE LAQUELLE des conditions requises est remplie. Pour
  visualiser tous ceux qui gagnent moins de 40 000 ou qui recoivent moins de 10
  000 en participation aux benefices, utilisez la requete suivante :

  SELECT EMPLOYEEIDNO
  FROM EMPLOYEESTATISTICSTABLE
  WHERE SALARY < 40000 OR BENEFITS < 10000;

  Les operateurs AND et OR peuvent etre combines, par exemple :

  SELECT EMPLOYEEIDNO
  FROM EMPLOYEESTATISTICSTABLE
  WHERE POSITION = 'Manager' AND SALARY > 60000 OR BENEFITS > 12000;

  En premier lieu, SQL recherche les lignes pour lesquelles la valeur de la
  colonne salaire est superieure a 60 000 et celle de position est egale a
  Manager, puis, a partir de cette liste de lignes, SQL recherche alors celles
  qui satisfont a la condition AND (ET) precedente ou a la condition specifiant
  que la colonne Indemnites est superieure a  12 000. En consequence, SQL n'affiche
  seulement que cette seconde liste de lignes, en gardant a l'esprit que tous ceux
  dont les Indemnites sont superieures a 12 000 en feront partie puisque l'operateur
  OR (OU) inclue la ligne si l'une des conditions est verifiee. Notez en passant
  que l'operation AND (ET) est effectuee en premier.

  Pour generaliser ce processus, SQL effectue l(es) operation(s) AND pour determiner
  les lignes ou l(es) operation(s) AND sont verifiees (souvenez-vous bien : toutes
  les conditions sont verifiees), puis ces resultats sont utilises pour tester les
  conditions OR, et, ne seront affichees que les lignes ou les conditions requises
  par l'operateur OR seront verifiees.

  Pour que les OR's soient effectues avant les AND's, par exemple si vous vouliez voir
  une liste des employes dont le salaire est eleve (>50 000) OU beneficiant d'indemnites
  importantes (>10 000), ET qui soient cadres, utilisez des parentheses :

  SELECT EMPLOYEEIDNO
  FROM EMPLOYEESTATISTICSTABLE
  WHERE POSITION = 'Manager' AND (SALARY > 50000 OR BENEFIT > 10000);

  ----------------------------------------------------------------------------
  IN et BETWEEN

  Une methode plus facile pour utiliser les conditions composees consiste a utiliser
  IN ou BETWEEN. Par exemple, si vous desirez une liste des cadres et du personnel :

  SELECT EMPLOYEEIDNO
  FROM EMPLOYEESTATISTICSTABLE
  WHERE POSITION IN ('Manager', 'Staff');

  ou une liste de ceux dont le salaire est superieur ou egal a 30 000, mais inferieur
  ou egal a 50 000, utilisez:

  SELECT EMPLOYEEIDNO
  FROM EMPLOYEESTATISTICSTABLE
  WHERE SALARY BETWEEN 30000 AND 50000;

  Pour obtenir la liste de ceux qui n'entrent pas dans ces criteres, essayez :

  SELECT EMPLOYEEIDNO
  FROM EMPLOYEESTATISTICSTABLE
  WHERE SALARY NOT BETWEEN 30000 AND 50000;

  De la meme facon, NOT IN donne la liste de toutes les lignes exclues de la liste
  obtenue par l'operateur IN.

  ----------------------------------------------------------------------------
  Utilisation de LIKE

  Regardons la table EmployeeStatisticsTable, et disons que l'on veut voir tous les
  gens dont le nom commence par "L"; essayons :

  SELECT EMPLOYEEIDNO
  FROM EMPLOYEEADDRESSTABLE
  WHERE LASTNAME LIKE 'L%';

  Le signe pourcentage (%) est utilise pour representer n'importe quel caractere
  possible (nombre, lettre, ou signe de ponctuation) ou ensemble de caracteres
  qui peut apparaitre apres le "L". Pour trouver les gens dont le Nom se termine
  avec "L", utiliser '%L', ou si vous desirez le "L" au milieu du mot, essayez
  dont la position est relative par rapport a des caracteres donnes. NOT LIKE
  affiche les lignes qui ne correspondent pas a la description donnee. Il y a
  d'autres manieres d'utiliser LIKE, de meme que n'importe lesquelles des
  conditions composees dont nous venons de parler, bien que cela depende du SGBD
  que vous utilisez; comme d'habitude, consultez un manuel ou le gestionnaire ou
  administrateur de votre systeme pour en connaitre les fonctionnalites, ou
  simplement, assurez vous que ce que vous essayer de faire est possible et
  autorise. Cet avertissement est aussi valable pour les fonctionnalites de SQL
  exposees ci-dessous. Cette section est donnee a titre d'exemple des requetes
  qui peuvent etre ecrites en SQL.
  ----------------------------------------------------------------------------
  Jointures

  Dans cette section, nous allons parler uniquement des jointures internes et
  des equi-jointures, dans la mesure ou ce sont les plus utiles. Pour avoir plus
  d'informations, voyez les liens sur des sites SQL au bas de cette  page.

  On suggere qu'une bonne maniere de concevoir une base de donnees implique que
  chaque table ne contienne des donnees qui ne concernent qu'une seule entite,
  et que des informations detaillees peuvent etre obtenues, dans une base de
  donnees relationnelle, en utilisant des tables supplementaires et en effectuant
  une jointure.

  Premierement, jetons un oeil a ces exemples de tables :

              AntiqueOwners

   OwnerIDOwnerLastName OwnerFirstName
   01     Jones         Bill
   02     Smith         Bob
   15     Lawson        Patricia
   21     Akins         Jane
   50     Fowler        Sam

  ---------------------------------------------------------

         Orders

   OwnerIDItemDesired
   02     Table
   02     Desk
   21     Chair
   15     Mirror

  --------------------------------------

             Antiques

   SellerIDBuyerID Item
   01      50      Bed
   02      15      Table
   15      02      Chair
   21      50      Mirror
   50      01      Desk
   01      21      Cabinet
   02      21      Coffee Table
   15      50      Chair
   01      15      Jewelry Box
   02      21      Pottery
   21      02      Bookcase
   50      01      Plant Stand

  ----------------------------------------------------------------------------
  Cles

  En premier lieu, nous allons parler du concept de cles. Une cle primaire est
  une colonne ou en ensemble de colonnes qui identifie de maniere unique les
  autres donnees d'une ligne donnee. Par exemple, dans la table AntiqueOwners,
  la colonne OwnerID identifie de maniere unique cette ligne. Ceci signifie deux
  choses: que deux lignes ne peuvent avoir le meme OwnerID, et que, meme si
  deux proprietaires les memes noms et prenoms la colonne OwnerID garantit que
  ces deux proprietaires ne seront pas confondus l'un avec l'autre, puisque la
  colonne OwnerID unique sera utilisee a travers la base de donnees pour se
  referer a un proprietaire, plutot que son nom.

  Une cle externe est une colonne d'une table qui est cle primaire d'une autre
  table, ce qui signifie que toutes les donnees d'une cle externe doivent avoir
  des donnees correspondantes dans l'autre table, ou cette colonne est la cle
  primaire.
  Pour parler SGBD, cette correspondance est connue sous le nom d'integre
  referentielle. Par exemple, dans la table Antiques, BuyerID et SellerID sont
  tous les deux des cles externes a la cle primaire de la table AntiqueOwners
  (OwnerID; pour les besoins de notre argumentation, on doit d'abord etre
  reference dans la table AntiqueOwners avant de pouvoir acheter ou vendre quoi
  que ce soit), puisque, dans les deux tables, les colonnes ID sont utilisees
  pour identifier les proprietaires, les acheteurs ou les vendeurs, et que
  OwnerID est la cle primaire de la table AntiqueOwners. En d'autres termes,
  toutes ces donnees "ID" sont utilisees pour se referer aux proprietaires,
  acheteurs et vendeurs sans avoir a utiliser les noms effectifs.

  ----------------------------------------------------------------------------
  Realisation d'une jointure

  Le but de ces cles est ainsi de pouvoir mettre en relation les donnees a
  travers les tables sans avoir a repeter les donnees dans chaque tables,
  --c'est toute la puissance des bases de donnees relationnelles. Par exemple,
  on peut trouver les noms de ceux qui ont achete une chaise sans avoir a lister
  la totalite du nom de l'acheteur dans la table Antiques... vous pouvez trouver
  ce nom en mettant en relation ceux qui ont achete une chaise avec les noms
  dans la table AntiqueOwners en utilisant le OwnerID, qui met en relation les
  donnees dans les deux tables. Pour trouver les noms de ceux qui ont achete
  une chaise, utilisez la requete suivante :

  SELECT OWNERLASTNAME, OWNERFIRSTNAME
  FROM ANTIQUEOWNERS, ANTIQUES
  WHERE BUYERID = OWNERID AND ITEM = 'Chair';

  Notez ce qui suit au sujet de cette requete... notez que les deux tables mise
  en jeux dans cette relation sont listees dans la clause FROM de l'instruction.
  Dans la clause WHERE, notez, en premier lieu, que la partie ITEM = 'Chair' de
  la clause limite la liste a ceux qui ont achete (et, dans cet exemple, de ce
  fait possedent) une chaise. En second lieu, notez comment les colonnes ID sont
  mises en relation d'une table a la suivante par l'utilisation de la clause
  BUYERID = OWNERID. Ne seront listes que les noms  de la table AntiqueOwners
  dont les ID correspondent a travers les tables et dont l'article achete est
  une chaise (a cause du AND). Parce que la condition de jointure utilisee est
  un signe egal, cette jointure est appelee une equi-jointures. le resultat de
  cette requete donnera deux noms: Smith, Bob et Fowler, Sam.

  La notation avec un point (.) fait reference a l'utilisation du nom de colonne
  en suffixe du nom de table pour eviter toute ambiguite, comme par exemple:

  SELECT ANTIQUEOWNERS.OWNERLASTNAME, ANTIQUEOWNERS.OWNERFIRSTNAME
  FROM ANTIQUEOWNERS, ANTIQUES
  WHERE ANTIQUES.BUYERID = ANTIQUEOWNERS.OWNERID AND ANTIQUES.ITEM = 'Chair';

  Cependant, puisque les noms de colonnes sont differents dans chaque table,
  cela n'etait pas necessaire.

  ----------------------------------------------------------------------------
  DISTINCT et l'Elimination des Doubles

  Disons que vous ne vouliez seulement que la liste des Identificateurs (ID) et
  des noms des gens qui ont vendu une antiquite. Evidemment, vous ne desirez
  une liste ou chaque vendeur n'apparait qu'une fois--vous ne voulez pas savoir
  combien d'antiquites ont ete vendues par une personne, mais uniquement le fait
  que cette personne en a vendu une (pour les comptages, voir la fonction
  d'Agregation ci-dessous). Cela signifie qu'il vous faudra dire a SQL d'eliminer
  les doubles des lignes des ventes, et de ne seulement lister chaque personne
  qu'une fois. Pour realiser cela, utilisez le mot-cle DISTINCT.

  Premierement, vous aurez besoin de faire un equi-jointures sur la table
  AntiqueOwners pour obtenir les donnees concernant le Nom et le Prenom de la
  personne. Cependant, gardez a l'esprit que, puisque la colonne SellerID dans
  la table Antiques est une cle externe de la table AntiqueOwners, un vendeur
  ne sera liste que s'il y a une ligne dans la table AntiqueOwners contenant les
  ID et les noms. Nous voulons egalement eliminer les multiples occurrences du
  SellerID dans notre liste, donc, nous utiliserons le mot-cle DISTINCT pour les
  colonnes ou les repetitions peuvent se produire.

  Pour ajouter une difficulte, nous voulons aussi que cette liste soit classee
  par ordre alphabetique des Noms, puis des Prenoms (a l'interieur des noms),
  puis des  OwnerID (a l'interieur des noms et des prenoms). Pour cela, nous
  utiliserons la clause ORDER BY :

  SELECT DISTINCT SELLERID, OWNERLASTNAME, OWNERFIRSTNAME
  FROM ANTIQUES, ANTIQUEOWNERS
  WHERE SELLERID = OWNERID
  ORDER BY OWNERLASTNAME, OWNERFIRSTNAME, OWNERID;

  Dans cet exemple, puisque tout le monde a vendu un article, nous aurons une
  liste de tous les proprietaires, classes par ordre alphabetique sur les noms.
  Pour reference ulterieure (au cas ou quelqu'un le demande), ce type de jointure
  est considere comme appartenant a la categorie des jointures internes.

  ----------------------------------------------------------------------------
  Alias et In/Sous-requetes

  Dans cette section, nous parlerons des Alias, In et de l'utilisation des
  sous-requetes, et de la maniere de les utiliser dans un exemple de 3-table.
  En premier lieu, regardez cette requete qui imprime le nom des proprietaires
  qui ont passe une commande et la nature de cette commande, en ne listant
  seulement que les commandes qui peuvent etre satisfaites (c'est a dire qu'il
  y a un vendeur qui possede l'article commande) :

  SELECT OWN.OWNERLASTNAME Last Name, ORD.ITEMDESIRED Item Ordered
  FROM ORDERS ORD, ANTIQUEOWNERS OWN
  WHERE ORD.OWNERID = OWN.OWNERID
  AND ORD.ITEMDESIRED IN

       (SELECT ITEM
       FROM ANTIQUES);

  Ce qui donne :

  Last name Item Ordered
  --------- ------------
  Smith     Table
  Smith     Desk
  Akins     Chair
  Lawson    Mirror

  Il y a plusieurs choses a noter a propos de cette requete :

    1. Tout d'abord, les mots "Last Name" et "Item Ordered" dans les lignes
       SELECT donnent les en-tetes du rapport.
    2. Les mots OWN et ORD sont des alias; ce sont de nouveaux noms pour les
       deux tables donnees dans la clause FROM qui sont utilises comme prefixes
       pour toutes les notations point (.) de noms de colonnes dans les requetes
       (voir ci-dessus). Ceci elimine les risques ambiguite, specialement dans
       l'equi-jointure de la clause WHERE ou les deux tables ont une colonne
       nommee OwnerID, et cette notation point (.) precise a SQL que nous
       designons deux OwnerID differents de deux tables differentes.
    3. Notez que la table des commandes (ORDERS) est indiquee la premiere dans
       la clause FROM; ceci apporte la certitude que la liste sera realisee a
       partir de cette table, et que la table AntiqueOwners
       est utilisee uniquement pour obtenir les informations detaillees (Last
       Name / Nom).
    4. Plus important, la clause AND dans la clause WHERE (OU) force l'utilisation
       de la Sous-requete  In ("= ANY" ou "= SOME" sont deux utilisations
       equivalentes de IN). Cela entraine que la sous-requete est effectuee,
       retournant une liste de tous les articles (Items) appartenant a la table
       Antiques, comme s'il n'y avait pas de clause WHERE (OU). Donc, pour lister
       une ligne de la table ORDERS, le ItemDesired (article_desire) doit etre
       dans la liste retournee des articles appartenant a la table Antiques, et
       donc un article ne sera liste que si la commande ne peut etre honoree
       que par un autre proprietaire. On peut se le representer comme ceci: la
       sous-requete retourne un ensemble d'articles (Items) auquel chaque
       ItemDesired (Article_Desire) dans la table des commandes (ORDERS) est
       compare; la condition IN (DANS) n'est vraie que si le ItemDesired
       appartient a l'ensemble provenant de la table ANTIQUES.
    5. Notez egalement, comme c'est le cas ici, qu'il y a un objet ancien pour
       chaque demande, ce qui, evidemment, n'est pas toujours le cas... De plus,
       notez aussi que, lorsque  IN, "= ANY", ou "= SOME" est utilise, ces
       mots-cles font reference a toutes les lignes qui conviennent, pas aux
       colonnes... c'est a dire que vous ne pouvez pas mettre de multiples
       colonnes dans un clause SELECT de sous-requete, pour tenter de faire
       correspondre la colonne de la clause WHERE externe avec l'une des
       multiples valeurs de colonnes possibles de la sous-requete; une seule
       colonne peut etre indiquee dans la sous-requete, et la correspondance
       possible provient de multiples valeurs de lignes, dans cette colonne
       unique, et non pas l'inverse.

  Ouf! Ce sera tout sur ce sujet des requetes SELECT complexes pour l'instant.
  Maintenait, voyons d'autres instructions SQL.
  ----------------------------------------------------------------------------
  Instructions SQL Diverses

  Fonctions d'Agregation

  Je parlerai de cinq fonctions d'agregation importantes: SUM, AVG, MAX, MIN, et
  COUNT. On les appelle fonctions d'agregation parce qu'elles resument les
  resultats d'une requete, plutot que de donner une liste de toutes les lignes.

     * SUM () donne la somme, pour une colonne donnee, de toutes les lignes qui
  satisfont aux conditions requises, et ou la colonne donnee est numerique.
     * AVG () donne la moyenne de la colonne donnee.
     * MAX () donne la plus grande valeur dans la colonne donnee.
     * MIN () donne la plus petite valeur dans la colonne donnee.
     * COUNT(*) donne le nombre de lignes qui satisfont aux conditions.

  En utilisant les tables du debut de ce document, regardons trois exemples :

  SELECT SUM(SALARY), AVG(SALARY)
  FROM EMPLOYEESTATISTICSTABLE;

  Cette requete donne la somme des de salaires tous les salaries presents dans
  la table et le salaire moyen.

  SELECT MIN(BENEFITS)
  FROM EMPLOYEESTATISTICSTABLE
  WHERE POSITION = 'Manager';

  Cette requete donne le chiffre de la colonne indemnites le plus faible des
  employes qui sont Managers, cette valeur est 12 500.

  SELECT COUNT(*)
  FROM EMPLOYEESTATISTICSTABLE
  WHERE POSITION = 'Staff';

  Cette requete vous donne le nombre d'employes ayant le statut de cadre (Staff,
  i.e. 3).

  ----------------------------------------------------------------------------
  Les Vues

  En SQL, vous pouvez (verifiez aupres de votre Administrateur de Base de Donnees,
  DBA) avoir acces a la creation de vues par vous-meme. Une vue vous permet d'affecter
  les resultats d'une requete a une nouvelle table personnelle, que vous pourrez
  utiliser dans d'autres requetes, pour laquelle vous donnez le nom de la vue dans
  votre clause FROM. Quand vous accedez a une vue, la requete qui est definie dans
  l'instruction de creation de la vue est effectuee (generalement), et les resultats
  de cette requete ont la meme allure qu'une autre table dans la requete que vous
  avez ecrit en invoquant la vue. Par exemple, pour creer une vue :

  CREATE VIEW ANTVIEW AS SELECT ITEMDESIRED FROM ORDERS;

  Maintenant, ecrivons une requete utilisant cette vue comme une table, ou la
  table est seulement une liste de tous les articles desires (ITEMDESIRED) de
  la table ORDERS :

  SELECT SELLERID
  FROM ANTIQUES, ANTVIEW
  WHERE ITEMDESIRED = ITEM;

  Cette table montre tous les Identifiants de Vendeurs (SellerID) de la table
  ANTIQUES ou l'article (Item) dans cette table apparait dans la vue ANTVIEW,
  qui consiste justement en tous les Articles Desires (Items Desired) dans la
  table ORDERS. La liste est cree en parcourant les articles AntiquesItems un
  par un jusqu'a ce qu'il y ait correspondance avec la vue ANTVIEW. Les vues
  peuvent etre utilisees pour restreindre les acces a la base de donnees,
  ainsi que, dans ce cas, pour simplifier une requete complexe.

  ----------------------------------------------------------------------------
  Creation de Nouvelles Tables

  Toutes les tables, dans une base de donnees doivent etre creees a un certain
  moment... voyons comment mous pourrions creer la table des commandes (ORDERS) :

  CREATE TABLE ORDERS
  (OWNERID INTEGER NOT NULL,
  ITEMDESIRED CHAR(40) NOT NULL);

  Cette instruction donne un nom a la table et renseigne le SGBD sur la nature
  de chaque colonne de la table. Veuillez noter que cette instruction utilise
  des types de donnees generiques, et que les types de donnees peuvent etre
  differents, selon le SGBD que vous utilisez. Comme d'habitude, verifiez vos
  conditions locales. Voici quelques types de donnees generiques courants:

     * Char(x) - Une colonne de caracteres, ou x est un nombre indiquant le
       nombre maximum de caracteres permis (taille maximale) de la colonne.
     * Integer - Une colonne de nombres entiers, positifs ou negatifs.
     * Decimal(x, y) - Une colonne de nombre decimaux, ou x est la taille
       maximum, en digits, des nombres decimaux dans cette colonne, et y le
       nombre maximal de digits autorises apres la virgule. Le nombre maximal
       (4,2) sera 99.99.
     * Date - Une colonne de date dans un format specifique au SGBD.
     * Logical - Une colonne qui ne peut contenir que deux valeurs: VRAI ou FAUX.

  Autre remarque, l'indication NOT NULL (non nul) signifie que la colonne doit
  avoir une valeur pour chacune des lignes. Si l'on avait utilise NULL (nul),
  cette colonne peut etre laissee vide dans certaines lignes.

  ----------------------------------------------------------------------------
  Modification des tables

  Ajoutons une colonne a la table ANTIQUES pour permettre la saisie du prix d'un
  article donne :

  ALTER TABLE ANTIQUES ADD (PRICE DECIMAL(8,2) NULL);

  On verra plus tard comment les donnees pour cette nouvelle colonne peuvent
  etre mises a jour ou ajoutees.

  ----------------------------------------------------------------------------
  Ajout de Donnees

  Pour inserer des lignes dans une table, faites ce qui suit :

  INSERT INTO ANTIQUES VALUES (21, 01, 'Ottoman', 200.00);

  Ceci insere les donnees dans la table, en tant que nouvelle ligne, colonne
  par colonne, dans un ordre predefinit. Au lieu de cela, changeons cet ordre
  et laissons le Prix vide:

  INSERT INTO ANTIQUES (BUYERID, SELLERID, ITEM)
  VALUES (01, 21, 'Ottoman');

  ----------------------------------------------------------------------------
  Suppression de donnees

  Supprimons cette nouvelle ligne de la base de donnees :

  DELETE FROM ANTIQUES
  WHERE ITEM = 'Ottoman';

  Mais s'il y a une autre ligne qui contient 'Ottoman', cette ligne sera
  egalement supprimee. Supprimons toutes les lignes (une, dans ce cas) qui
  contient les donnees specifiques que nous avons ajoute plus
   tot :

  DELETE FROM ANTIQUES
  WHERE ITEM = 'Ottoman' AND BUYERID = 01 AND SELLERID = 21;

  ----------------------------------------------------------------------------
  Mise a Jour des Donnees

  Mettons un Prix a jour dans une ligne qui n'en contient pas encore :

  UPDATE ANTIQUES SET PRICE = 500.00 WHERE ITEM = 'Chair';

  Ceci met le Prix de toutes les Chaises (Chair) a 500.00. Comme indique
  ci-dessus, conditions WHERE supplementaires, utilisation de AND, il faut
  utiliser ces conditions pour limiter la mise a jour a des lignes specifiques.
  De plus, des colonnes supplementaires peuvent etre renseignees en separant
  les instructions "egal" par des virgules.

  ----------------------------------------------------------------------------
  Considerations Diverses

  Index

  Les Index permettent a un SGBD d'acceder au donnees plus rapidement (veuillez
  noter que cette fonctionnalite est non-standard/indisponible sur certains
  systemes). Le systeme cree une structure de donnee interne (l'index) qui
  entraine une selection de lignes beaucoup plus rapide, quand la selection
  est basee sur des colonnes indexees. Cet index indique au SGBD ou se trouve
  une certaine ligne dans une table etant donne une valeur de colonne indexee,
  exactement comme l'index d'un livre vous indique a quelle page un mot donne
  se trouve. Creons un index pour le OwnerID dans la colonne AntiqueOwners :

  CREATE INDEX OID_IDX ON ANTIQUEOWNERS (OWNERID);

  Maintenant sur les noms:

  CREATE INDEX NAME_IDX ON ANTIQUEOWNERS (OWNERLASTNAME, OWNERFIRSTNAME);

  Pour etre debarrasse d'un index, supprimez le :

  DROP INDEX OID_IDX;

  A propos, vous pouvez aussi bien "supprimer" une table (attention!--cela
  signifie que votre table est detruite). Dans le second exemple, l'index est
  construit a partir des deux colonnes, agregees ensembles--un comportement
  bizarre peut resulter de cette situation... verifiez dans votre manuel avant
  d'effectuer une telle operation.

  Quelques SGBD n'imposent pas l'utilisation de cles primaires; en d'autres
  termes, l'unicite d'une colonne n'est pas imposee automatiquement. Cela
  signifie que, par exemple, j'aurais pu essayer d'inserer une autre ligne
  dans la table  AntiqueOwners avec un OwnerID de 02, quelques systemes me
  permettent de faire cela, bien qu'il ne le faille pas, puisque cette colonne
  est supposee etre unique dans cette table (chaque valeur de ligne est supposee
  etre differente). Une maniere de contourner cela est de creer un index unique
  sur la colonne que nous souhaitons voir etre la cle primaire pour forcer le
  systeme a interdire les doubles :

  CREATE UNIQUE INDEX OID_IDX ON ANTIQUEOWNERS (OWNERID);

  ----------------------------------------------------------------------------
  GROUP BY et HAVING

  Une utilisation speciale de la clause GROUP BY est l'association d'une fonction
  agregee (specialement COUNT; qui compte le nombre de lignes dans chaque groupe)
  avec des groupes de lignes. Premierement, supposons que la table ANTIQUES
  possede la colonne Prix (Price)t, et que chaque ligne contienne une valeur
  dans cette colonne. Nous voulons voir le prix de l'article le plus cher achete
  par chaque proprietaire. Il nous faut donc dire a SQL de grouper les achats de
  chacun des proprietaires, et de nous dire le prix d'achat maximum :

  SELECT BUYERID, MAX(PRICE)
  FROM ANTIQUES
  GROUP BY BUYERID;

  Maintenant, disons que nous ne voulons voir que le prix maximum si l'achat
  depasse 1000, nous devrons utiliser la clause HAVING :

  SELECT BUYERID, MAX(PRICE)
  FROM ANTIQUES
  GROUP BY BUYERID
  HAVING PRICE > 1000;

  ----------------------------------------------------------------------------
  Sous-requetes Supplementaires

  Un autre usage commun des sous-requetes amene a l'utilisation des operateurs
  pour permettre a une condition WHERE d'inclure la sortie SELECT d'une
  sous-requete. En premier, demandons la liste des acheteurs ayant achete un
  article cher (le prix de cet article est superieur de 100 au prix moyen de tous
  les articles achetes) :

  SELECT OWNERID
  FROM ANTIQUES
  WHERE PRICE >

       (SELECT AVG(PRICE) + 100
       FROM ANTIQUES);

  La sous-requete calcule le Prix moyen, ajoute 100, et, et en utilisant ce
  chiffre on imprime un OwnerID pour chaque article coutant plus que ce chiffre.
  On peut utiliser DISTINCT OWNERID, pour eliminer les doubles.

  Listons les Noms (Last Names) de ceux qui sont dans la table AntiqueOwners,
  SEULEMENT s'ils ont achete un article :

  SELECT OWNERLASTNAME
  FROM ANTIQUEOWNERS
  WHERE OWNERID =

       (SELECT DISTINCT BUYERID
       FROM ANTIQUES);

  Cette sous-requete retourne une liste des acheteurs, et le Nom du proprietaire
  d'un objet ancien est imprime seulement si l'identificateur du Proprietaire
  (Owner's ID) dans la liste obtenue par la sous-requete (appelee quelquefois
  liste des candidats).

  Voici un exemple de mise a jour: nous savons que la personne qui a achete la
  bibliotheque a un Prenom errone dans la base de donnees... Ce devrait etre
  John :

  UPDATE ANTIQUEOWNERS
  SET OWNERFIRSTNAME = 'John'
  WHERE OWNERID =

       (SELECT BUYERID
       FROM ANTIQUES
       WHERE ITEM = 'Bookcase');

  Tout d'abord, la sous-requete trouve le BuyerID pour la (les) personne(s) qui
  a (ont) achete(s) la bibliotheque, puis la requete externe met a jour son
  Prenom.

  Souvenez vous de cette regle a propos des sous-requetes: quand vous avez une
  sous-requete faisant partie d'une condition WHERE, la clause SELECT dans la
  sous-requete doit avoir des colonnes qui correspondent en nombre et en type
  a celle de la clause WHERE de la requete externe. En d'autres termes, si vous
  avez "WHERE ColumnName = (SELECT...);", le SELECT ne peut faire reference qu'a
  une seule colonne, pour pouvoir correspondre a la clause WHERE externe, et
  elles doivent etre du meme type (les deux etant soit entiers, soit chaines
  de caracteres, etc.).

  ----------------------------------------------------------------------------
  EXISTS et ALL

  EXISTS utilise une sous-requete comme condition, ou cette condition est Vraie
  si la sous-requete retourne au moins une ligne et Fausse si la sous-requete
  n'en retourne aucune; c'est une fonctionnalite qui n'est pas intuitive et
  n'est utilisee que dans peu de cas. Cependant, si un client eventuel voulait
  consulter la liste des proprietaires pour voir s'il y a des chaises (Chairs),
  essayez :

  SELECT OWNERFIRSTNAME, OWNERLASTNAME
  FROM ANTIQUEOWNERS
  WHERE EXISTS

       (SELECT *
       FROM ANTIQUES
       WHERE ITEM = 'Chair');

  S'il y a des Chaises (Chair) dans une colonne de la table ANTIQUES, la
  sous-requete renverra une ou plusieurs lignes, rendant la clause EXISTS
  vraie, ce qui amenera SQL a donner une liste des proprietaires dans
  ANTIQUEOWNERS. S'il n'y avait eu aucune Chaise, la requete externe n'aurait
  pas renvoye de ligne.

  ALL est une autre fonctionnalite peu commune, et en general, on peut realiser
  une requete avec ALL de manieres differentes et eventuellement plus simples;
  regardons cet exemple de requete :

  SELECT BUYERID, ITEM
  FROM ANTIQUES
  WHERE PRICE >= ALL

       (SELECT PRICE
       FROM ANTIQUES);

  Ceci va nous retourner l'article de prix le plus eleve (ou plus d'un article
  s'il y a des ex-aequo), et son acheteur. La sous-requete renvoie la liste de
  tous les Prix (PRICE) dans la table ANTIQUES, puis la requete externe examine
  chaque ligne de la table ANTIQUES et si son Prix est superieur ou egal a chacun
  (ou ALL, TOUS) des Prix de cette liste, il est affiche, donnant ainsi l'article
  de prix le plus eleve. La raison pour laquelle ">=" doit etre utilise est que
  l'article de prix le plus eleve sera egal au prix le plus eleve, puisque cet
  Article est dans la liste de Prix.

  ----------------------------------------------------------------------------
  UNION et Jointure Externe

  Il y a des occasions  ou vous pouvez desirer voir ensembles les resultats de
  requetes multiples, leurs sorties etant combinees; pour cela utilisez UNION.
  Pour fusionner la sortie des deux requetes suivantes, en affichant l'identificateur
  de tous les Acheteurs plus tous ceux qui ont passe une Commande :

  SELECT BUYERID
  FROM ANTIQUEOWNERS
  UNION
  SELECT OWNERID
  FROM ORDERS;

  Il faut noter que SQL necessite que les types de donnees des listes des clauses
  SELECT correspondent colonne par colonne. Dans cet exemple, les identificateurs
  BuyerID et OwnerID sont du meme type (entier). Notez egalement que SQL
  effectue automatiquement une elimination des doubles quand on utilise la clause
  UNION (comme si c'etaient deux "ensembles"); dans une requete simple, il faut
  utiliser la clause DISTINCT.

  La jointure externe est utilisee quand une requete de jointure est "unifiee",
  les lignes n'etant pas incluses dans la jointure. Ceci est particulierement
  utile si des "balises" de type constante texte sont inclus. D'abord,
  regardez la requete :

  SELECT OWNERID, 'is in both Orders & Antiques'
  FROM ORDERS, ANTIQUES
  WHERE OWNERID = BUYERID
  UNION
  SELECT BUYERID, 'is in Antiques only'
  FROM ANTIQUES
  WHERE BUYERID NOT IN

       (SELECT OWNERID
       FROM ORDERS);

  La premiere requete effectue une jointure pour lister tous les proprietaires
  qui sont dans les deux tables, et met une balise apres l'identificateur (ID)
  en inserant le texte correspondant a la balise. La clause UNION fusionne cette
  liste avec la liste suivante. La seconde liste est generee premierement en
  listant les identificateurs (ID) qui ne sont pas dans la table ORDERS, c'est a
  dire en generant une liste des ID exclus de la requete de jointure.. Puis,
  chaque ligne de la table ANTIQUES est analysee, et, si l'identifiant de
  l'acheteur (BuyerID) n'est pas dans cette liste d'exclusion, il est liste avec
  le texte correspondant a sa balise. Il y aurait peut-etre une meilleure
  maniere de creer cette liste, mais c'est difficile de generer des balises
  informationnelles.

  Ce concept est utile dans des situations ou une cle primaire est en relation
  avec une cle externe, et ou la valeur de la cle externe est NULLE (NULL) pour
  quelques cles primaires. Par exemple, dans une table, la cle primaire est
  vendeur, et dans une autre table client, avec le vendeur enregistre dans la
  meme ligne. Cependant, si un vendeur n'a pas de clients, le nom de cette
  personne n'apparaitra pas dans la table des clients. Une jointure externe sera
  utilisee pour imprimer une liste de tous les vendeurs, avec leurs clients, que
  le vendeur ait un client ou pas--c'est a dire qu'il n'y aura pas de client
  imprime (valeur logique NULL) si le vendeur n'a pas de client, mais existe dans
  la table des vendeurs. Autrement, le vendeur sera liste avec chaque client.

  ASSEZ DE REQUETES!!! Qu'est-ce que vous dites?...Eh bien, maintenant voyons
  quelque chose de completement different...

  ----------------------------------------------------------------------------
  SQL incorpore--un vilain exemple (n'ecrivez pas un programme comme cela... il
  est la UNIQUEMENT a titre d'exemple)

  /* -Voici un exemple de programme qui utilise le SQL incorpore (Embedded
      SQL). Le SQL incorpore permet aux programmeurs de se connecter a une
      base de donnees et d'inclure du code SQL en plein programme, et ainsi,
      leurs programmes peuvent utiliser, manipuler, et traiter les donnees
      d'une base de donnees.
     -Cet exemple de Programme C (qui utilise du SQL incorpore) doit imprimer
      un rapport.
     -Les instructions SQL devront etre precompilees avant d'effectuer la
      compilation normale.
     -Si vous utilisez un langage different les parties EXEC SQL seront les
      memes (standard), mais le code C qui les entourent devront etre
      modifiees, y compris les declarations de variables hotes.
     -Le SQL incorpore differe de systeme a systeme, aussi, encore une fois,
      verifiez la documentation locale, specialement les declarations de
      variables et les procedures de connexion pour lesquelles le reseau, le
      SGBD, et le systeme d'exploitation sont cruciaux. */

  /***************************************************/
  /* CE PROGRAMME N'EST PAS COMPILABLE OU EXECUTABLE */
  /* IL EST UNIQUEMENT DONNE A TITRE D'EXEMPLE       */
  /***************************************************/

  #include <stdio.h>

  /* Section de declaration des variables hotes; ce seront les variables
  utilisees par votre programme, mais egalement celles utilisees par SQL
  pour y mettre ou y lire des valeurs,. */
  EXEC SQL BEGIN DECLARE SECTION;
    int BuyerID;
    char Prenom[100], Nom[100], Item[100];
  EXEC SQL END DECLARE SECTION;

  /* Cette section,insere les variables SQLCA, de facon a pouvoir tester les erreurs. */
  EXEC SQL INCLUDE SQLCA;

  main() (

  /* Ceci est une possibilite pour se connecter a la base de donnees */
  EXEC SQL CONNECT UserID/Password;

  /* Cette partie de code soit vous indique que vous etes connecte  soit
  teste si un code erreur a ete genere, signifiant que la connexion etait
  incorrecte ou impossible. */
    if(sqlca.sqlcode) (
      printf(Printer, "Erreur de connexion au serveur de base de donnees.\n");
      exit();
    )
    printf("Connecte au serveur de base de donnees.\n");

  /* Ici, on declare un "Curseur". C'est utilise lorsqu'une requete retourne
     plus d'une ligne, et qu'on doit effectuer un traitement sur chaque ligne
     obtenue de la requete. Je vais utiliser pour le rapport, chaque ligne obtenue
     par cette requete. Ensuite, on utilisera "FETCH" (va chercher) pour recuperer
     les lignes, une par une, mais pour que la requete soit effectivement executee,
     il faut utiliser l'instruction "OPEN". La "Declaration" (Declare) sert
     uniquement a construire la requete. */
  EXEC SQL DECLARE ItemCursor CURSOR FOR
    SELECT ITEM, BUYERID
    FROM ANTIQUES
    ORDER BY ITEM;
  EXEC SQL OPEN ItemCursor;

  /*
   +-- Inserer ici un test d'erreur similaire au precedent si vous le desirez --+
  */

  /* L'instruction FETCH insere les valeurs de la ligne suivante respectivement
  dans chacune des variables hotes. Cependant un "priming fetch" (technique de
  programmation) doit etre execute en premier. Lorsque le curseur n'a plus de
  donnees un code (sqlcode) est genere nous permettant de sortir de la boucle.
  Notez que, pour des raisons de simplicite, on abandonne la boucle pour n'importe
  quel sqlcode, meme s'il correspond a un code erreur. Autrement, il faut
  effectuer un test d'erreur specifique. */
  EXEC SQL FETCH ItemCursor INTO :Item, :BuyerID;
    while(!sqlca.sqlcode) (

  /* Nous effectuerons egalement deux traitements pour chaque ligne. Premierement,
  augmenter le prix de 5 (retribution du marchand) et ensuite, lire le nom de
  l'acheteur pour le mettre dans le rapport. Pour faire cela, j'utiliserai les
  instructions Update et Select, avant d'imprimer la ligne sur l'ecran. La mise a
  jour suppose, cependant, qu'un acheteur donne n'a achete qu'un seul article,
  ou, sinon, le prix sera augmente de trop nombreuses fois. Sinon, il aurait
  fallu utiliser une logique "RowID" (consulter la documentation). De plus,
  notez la presence du signe : (deux points) qui doit etre place devant les
  noms de variables hotes quand elles sont utilisees dans des instructions
  SQL. */

  EXEC SQL UPDATE ANTIQUES
    SET PRICE = PRICE + 5
    WHERE ITEM = :Item AND BUYERID = :BuyerID;

  EXEC SQL SELECT OWNERFIRSTNAME, OWNERLASTNAME
    INTO :Prenom, :Nom
    FROM ANTIQUEOWNERS
    WHERE BUYERID = :BuyerID;

      printf("%25s %25s %25s", Prenom, Nom, Item);

  /* Rapport grossier--uniquement a but d'exemple! Aller chercher la ligne suivante */
  EXEC SQL FETCH ItemCursor INTO :Item, :BuyerID;
    )

  /* Fermer le curseur, enregistrer les modifications (voir ci-dessous),
  et quitter le programme. */
  EXEC SQL CLOSE DataCursor;
  EXEC SQL COMMIT RELEASE;
    exit();
  )

  ----------------------------------------------------------------------------
  Questions courantes sur SQL--Sujets avances
  (Consulter les liens FAQ pour en avoir plusieurs autres)

    1. Pourquoi ne puis-je pas demander uniquement les trois premieres lignes
       d'une table? --Parce que, dans une base de donnees relationnelle, les
       lignes sont inserees sans aucun ordre particulier, c'est a dire que le
       systeme les inserent dans un ordre arbitraire; de ce fait, vous ne pouvez
       demander des lignes qu'en utilisant des fonctionnalites SQL valides,
       telles que ORDER BY, etc.
    2. Que sont ces DDL et DML dont j'entends parler ? --DDL (Data
       Definition Language - Langage de Definition de Donnees) fait reference a
       (en SQL) l'instruction de Creation de Table (Create Table)...DML (Data
       Manipulation Language - Langage de Manipulation de Donnees) fait reference
       aux instructions Select, Update, Insert, et Delete.
    3. Les tables des base de donnees ne sont elles pas simplement des fichiers?
       --Eh bien, les SGBD stockent les donnees dans des fichiers declares par
       le gestionnaire du systeme avant que de nouvelles tables ne soient creees
       (sur les grands systemes), mais le systeme stocke les donnees dans un
       format special, et peut repartir les donnees d'une table dans plusieurs
       fichiers. Dans le monde des bases de donnees, un ensemble de fichiers
       crees pour une base de donnees est appele un "espace de tables". En
       general, sur les petits systemes, tout ce qui concerne une base de donnees
       (definitions et toutes les tables de donnees) est stocke dans un seul
       fichier.
    4. (Question en relation avec la precedente) Les bases de donnees ne sont
       elles pas simplement que des tableurs? --Non, et ceci pour deux raisons.
       Premierement, les tableurs peuvent avoir des donnees dans une cellule, mais
       une cellule est plus qu'une intersection ligne-colonne. Selon votre
       tableur, une cellule peut aussi contenir des formules et un formatage,
       ce que les bases de donnees (actuelles) ne permettent pas. Deuxiemement,
       les cellules dependent souvent des donnees presentes dans d'autres
       cellules. Dans les bases de donnees, les "cellules" sont independantes,
       sauf que les colonnes sont en relation logique (heureusement: ensembles,
       une ligne et une colonne decrivent une entite), et, en dehors des
       contraintes de cle primaire et de cle externe, chaque ligne d'une table
       est independante des autres.
    5. Comment puis-je importer un fichier texte de donnees dans une base de
       donnees? --Eh bien, vous ne pouvez pas le faire directement...il vous faut
       utiliser un programme utilitaire, tel que le SQL*Loader pour Oracle,
       ou ecrire un programme pour charger les donnees dans la base de donnees.
       Un programme pour realiser cela lit simplement chaque enregistrement du
       fichier texte, le separe en colonnes, et effectue une insertion (INSERT)
       dans la base de donnees.
    6. Qu'est-ce qu'un schema? --Un schema est un ensemble logique de tables, tel
       que la base de donnees ANTIQUES ci-dessus...habituellement, on s'y refere
       simplement en tant que "base de donnees", mais une base de donnees peut
       contenir plus d'un schema. Par exemple, un schema en etoile est un ensemble
       de tables ou une table centrale, de grande taille, contient toutes les
       informations importantes, et est liee, via des cles externes, a des tables
       de dimension qui contiennent l'information detaillee, et qui peuvent etre
       utilisees dans une jointure pour creer des rapports detailles.
    7. Quels conseils generaux pourriez vous donner pour rendre mes requetes SQL
       et mes bases de donnees meilleures et plus rapides (optimisees)?
          o Vous devriez essayer, si vous le pouvez, d'eviter, dans les clauses
            SELECT, des expressions telles que SELECT ColumnA + ColumnB, etc.
            L'optimiseur de requetes de la base de donnees, partie du SGBD qui
            determine la meilleure maniere d'extraire les donnees requises de la
            base de donnees elle-meme, traite les expressions d'une facon telle
            que cela demande en general plus de temps pour extraire les donnees
            que si les colonnes avaient ete selectionnees normalement, et que
            l'expression elle-meme calculee par programme.
          o Minimisez le nombre de colonnes incluses dans une clause Group By.
          o Si vous effectuez une jointure, tachez d'avoir les colonnes, de cette
            jointure, indexees (dans les deux tables).
          o Si vous avez un doute, creez un index.
          o A moins que vous ne fassiez de multiple comptages ou une requete
            complexe, utilisez COUNT(*) (le nombre de lignes sera genere par la
            requete) plutot que COUNT(Column_Name).
    8. Qu'est-ce que la Normalisation? --La Normalisation est une technique de
       conception de base de donnees qui suggere qu'un certain critere doit etre
       pris en compte quand on definit l'organisation des tables (prise de
       decision sur le nombre de colonnes de chaque table, et creation de la
       structure des cles), ou l'idee est d'eliminer la redondance a travers les
       tables des donnees qui ne sont pas des cles. On parle de la normalisation
       en s'y referant habituellement en termes de "formes", et j'introduirais ici
       uniquement les trois premieres, bien qu'il soit tout a fait courant d'en
       utiliser d'autres formes, plus avancees (quatrieme, cinquieme, Boyce-Codd;
       consultez la documentation).

       La Premiere Forme Normale consiste a placer les donnees dans des tables
       separees ou les donnees dans chaque tables sont de type similaire, et a
       donner a chaque table une cle primaire.

       Mettre les donnees en Seconde Forme Normale consiste a mettre les donnees
       dans les tables ou elle ne dependent uniquement que d'une partie de la cle.
       Par exemple, si j'avais laisse les noms des proprietaires d'objets anciens
       dans la table des articles, ce n'aurait pas ete une seconde forme normale
       puisque les donnees auraient ete redondantes; le nom aurait du etre
       repete pour chaque article possede, donc, les noms ont ete places dans
       leur propre table. Les noms en eux-memes n'ont rien a voir avec les
       articles, seules les identites des acheteurs et des vendeurs sont
       concernees.

       La Troisieme Forme Normale consiste a se debarrasser, dans une table, a
       tout ce qui ne depend pas uniquement de la cle primaire. On met uniquement
       l'information qui depend de la cle, et l'on deplace, dans d'autres tables,
       tout ce qui est independant de la cle primaire, et l'on cree des cles
       primaires pour les nouvelles tables.

       Il y a une certaine forme de redondance dans chaque forme, et si les
       donnees sont en 3NF (abrege pour 3ieme forme normale), elles sont deja en
       1NF et 2NF. En terme d'organisation des donnees, organisez vos donnees de
       facon que les colonnes qui ne sont pas des cles primaires dependent
       seulement de la cle primaire entiere. Si vous jetez un oeil sur la base de
       donnees en exemple, vous verrez que, lorsque vous naviguez a travers la
       base de donnees, c'est au travers de jointures qui utilisent les colonnes
       de cle commune.

       Deux autre points importants dans la conception de bases de donnees sont
       l'utilisation de noms significatifs, bien choisis, coherents et logiques
       pour les tables et les colonnes et l'utilisation de noms significatifs pour
       la base de donnees elle-meme. Sur le dernier point, ma base de donnees
       peche, puisque j'utilise des codes numeriques comme identificateurs. C'est
       en general bien meilleur d'utiliser, si possible, des cles qui ont, en
       elles-memes, un sens; par exemple, une meilleure cle pourrait consister
       des quatre premieres lettres du nom et de la premiere initiale du prenom,
       comme JONEB pour Bill Jones (ou pour eviter les doubles, ajoutez-y des
       nombres a la fin pour differencier deux ou plusieurs personnes ayant le
       meme nom, ainsi, on pourrait essayer JONEB1, JONEB2, etc.).
    9. Quelle est la difference entre une requete simple ligne et une requete
       multi-lignes et pourquoi est-ce important de connaitre cette
       difference? --Premierement, pour parler de ce qui est evident, une requete
       simple ligne est une requete qui retourne une ligne unique comme resultat,
       et le resultat d'une requete multi-lignes est constitue de plusieurs
       lignes. Qu'une requete retourne une ligne ou plusieurs depend completement
       de la conception (ou schema) des tables qui constituent la base de donnees.
       Assurez-vous d'inclure suffisamment de conditions, et structurez vos
       instructions SQL correctement, de facon a obtenir le resultat desire (soit
       une ligne, soit plusieurs). Par exemple, si vous vouliez etre sur qu'une
       requete sur la table AntiqueOwners ne retourne qu'une ligne, employez une
       condition d'egalite sur la cle primaire, OwnerID.

       Trois raisons, concernant l'importance de ce sujet, viennent immediatement
       a l'esprit.
       Premierement, l'obtention de plusieurs lignes alors que vous n'en attendez
       qu'une, ou vice-versa, peut signifier que la requete est erronee, que la
       base de donnees est incomplete, ou simplement que vous decouvrez quelque
       chose de nouveau concernant vos donnees.
       Deuxiemement, si vous utilisez une instruction de mise a jour (UPDATE) ou
       de suppression (DELETE), il vaudrait mieux vous assurer que l'instruction
       que vous ecrivez effectue bien l'operation sur la ligne desiree (ou les
       lignes)...ou sinon, vous pourriez supprimer ou mettre a jour plus de lignes
       que vous ne le desirez.
       Troisiemement, il faut soigneusement penser au nombre de lignes qui seront
       retournees pour toutes les requetes redigees  en SQL incorpore. Si vous
       ecrivez une requete simple ligne, une seule instruction SQL peut suffire
       pour satisfaire a la logique du programme. D'un autre cote, si votre
       requete retourne de multiples lignes, il vous faudra utiliser
       l'instruction FETCH, et tres certainement quelque chose comme une structure
       de boucle sera necessaire dans votre programme pour traiter chaque ligne
       retournee par la requete.
   10. Que sont les relations? --C'est une autre question de conception...le
       terme "relation" fait habituellement reference aux relations entre cles
       primaires et externes entre les tables. Ce concept est important parce que,
       quand les tables d'une base de donnees relationnelle sont concues, ces
       relations doivent etre definies parce que cela determine quelles colonnes
       sont ou ne sont pas des cles primaires ou externes. Vous avez peut-etre
       entendu parler des diagrammes Entites-Relations, qui sont une
       representation graphique des tables dans les schema de la base de donnees.
       Voyez l'exemple de diagramme a la fin de cette section ou consultez
       quelques sites indiques ci-dessous concernant ce sujet, car il y a de
       nombreuses manieres de dessiner les diagrammes E-R. Mais d'abord, jetons
       un oeil a chaque type de relation...

       Une relation 1-a-1 (ou 1:1, ou 1-1) signifie que vous avez une colonne cle
       primaire  et que chaque cle primaire est en relation avec une cle externe.
       Par exemple, dans le premier exemple, dans la table des adresses des
       employes TableAdresseEmploye nous avons une colonne numero d'identification
       de l'employe (EmployeeIDNo). Donc, la table TableAdresseEmploye est en
       relation avec la table EmployeeStatisticsTable (deuxieme exemple de table)
       par l'intermediaire du numero EmployeeIDNo. Plus precisement, chaque
       employe, de la table TableAdresseEmploye possede des statistiques (une
       ligne de donnees) dans la table EmployeeStatisticsTable. Meme si c'est un
       exemple invente, c'est une relation "1-1". Inscrivez en caracteres gras le
       "has" ("a" ou "possede")...quand on decrit une relation, il est important
       de decrire une relation en utilisant un verbe.

       Les deux autres types de relations peuvent ou pas utiliser une cle primaire
       logique et des contraintes par rapport aux cles externes...cela depend
       strictement des souhaits du concepteur. La premiere de ces relations est la
       relation un-a-plusieurs ("1-M").
       Cela signifie que pour chaque valeur d'une colonne dans une table, il y a
       une ou plusieurs valeurs correspondantes dans une autre table. Des
       contraintes de cle peuvent etre ajoutees au modele, ou eventuellement une
       colonne d'identification peut etre utilisee pour etablir une relation. Un
       exemple serait que pour chaque OwnerID dans la table AntiqueOwners, il y
       ait un ou plusieurs (la valeur zero est egalement autorisee) articles
       (Items) achetes dans la table  ANTIQUES (verbe: acheter).

       Finalement, la relation plusieurs-a plusieurs ("M-M") n'utilise
       generalement pas de cles, et habituellement utilise des identificateurs de
       colonnes. L'apparition inhabituelle d'une relation "M-M" signifie qu'une
       colonne, dans une table est en relation avec une autre colonne dans une
       autre table, et que pour chaque valeur de l'une de ces deux colonnes, il y
       a une ou plusieurs valeurs correspondantes dans la colonne correspondante
       de l'autre table (et vice-versa), ou possibilite plus courante, les deux
       tables ont une relation  1-M avec l'autre (deux relations, une 1-M dans
       chaque direction). Un [mauvais] exemple de la situation la plus courante
       consisterait, si vous avez une bases de donnees de fonctions, a avoir une
       table possedant une ligne pour chaque employe et sa fonction, et d'avoir
       une autre table contenant une ligne pour chaque fonction avec un des
       employes l'occupant. Dans ce cas, vous auriez plusieurs lignes pour chaque
       employe dans la premiere table, une pour chaque fonction, et plusieurs
       lignes pour chaque fonction dans le seconde table, une pour chaque employe
       ayant cette fonction.
       Ces tables sont en relation M-M: chaque employe, dans la premiere table a
       plusieurs fonctions dans la seconde table, et chaque fonction, dans la
       seconde table, a plusieurs attributaires dans la premiere table. Ceci est
       la partie emergee de l'iceberg concernant ce sujet...consultez les liens
       ci-dessous pour avoir de plus amples informations et regardez le diagramme
       ci-dessous donnant un exemple simplifie de diagramme E-R.
       [Exemple Simplifie de Diagramme Entites-Relations]

   11. Quelles sont quelques unes des fonctionnalites importantes, non standard,
       de SQL (Question extremement courante)? --Eh bien, nous allons voir ca dans
       la section suivante...

  ----------------------------------------------------------------------------
  SQL Non-standard..."A verifier pour votre site"

     * INTERSECT et MINUS sont comme des instructions UNION , sauf que INTERSECT
       produits des lignes qui apparaissent dans les deux requetes, et que MINUS
       produit des lignes provenant de la premiere requete mais pas de la
       seconde.
     * Fonctionnalites de la Generation de Rapport: la clause COMPUTE est placee
       a la fin d'une requete pour placer le resultat d'une fonction agregee a
       la fin d'une liste, comme COMPUTE SUM (PRICE); Une autre solution est
       d'utiliser une logique d'interruption: definir une interruption pour
       diviser les resultats de la requete en groupes bases sur une colonne,
       comme BREAK ON BUYERID. Alors, pour sortir un resultat apres la liste d'un
       groupe, utilisez COMPUTE SUM OF PRICE ON BUYERID. Si, par exemple, vous
       avez utilise ces trois clauses ("BREAK" en premier, "COMPUTE on break" en
       second, "COMPUTE overall sum" en troisieme), vous obtiendrez un rapport qui
       regroupera les articles par acheteurs, listera la somme de Prix pour chaque
       groupe d'articles d'un acheteur, puis, apres que tous les groupes aient ete
       listes, listera la somme de tous les Prix, le tout, avec des en-tetes et
       des lignes generes par SQL.
     * En plus des fonctions agregees indiquees ci-dessus, quelques SGBD ont des
       fonctions supplementaires qui peuvent etre utilisees dans des listes de
       selection (SELECT), sauf que ces fonctions (quelques fonctions caracteres
       autorisent des resultats de plusieurs lignes) doivent etre utilisees avec
       une valeur individuelle (pas de groupes), pour des requetes simple ligne.
       De plus, les fonctions ne doivent etre utilisees qu' avec les types de
       donnees appropries. Voici quelques Fonctions Mathematiques:

        ABS(X)       Valeur A-convertit les nombres negatifs en nombres positifs
                     et laisse les positifs inchanges
        CEIL(X)      X est une valeur decimale qui sera arrondie a la valeur
                     superieure.
        FLOOR(X)     X est une valeur decimale qui sera arrondie a la valeur
                     inferieure.
        GREATEST(X,Y)Retourne la plus grande des deux valeurs.
        LEAST(X,Y)   Retourne la plus petite des deux valeur.
        MOD(X,Y)     Retourne le reste de X / Y.
        POWER(X,Y)   Retourne X a la puissance Y.

        ROUND(X,Y)   Arrondit X a Y positions decimales. i Y n'est pas donne, X
                     est arrondi a la valeur de l'entier le plus proche.
        SIGN(X)      Retourne le signe - si X < 0, sinon retourne un signe plus.
        SQRT(X)      Retourne la racine carree de  X.

                                 Fonctions Caracteres

        LEFT(<string>,X)
                             Retourne les X caracteres les plus a gauche de la
                             chaine de caracteres.

        RIGHT(<string>,X)
                             Retourne les X caracteres les plus a droite de la
                             chaine de caracteres.
        UPPER(<string>)
                             Convertit tous les caracteres de la chaine en
                             majuscules.
        LOWER(<string>)
                             Convertit tous les caracteres de la chaine en
                             minuscules.
        INITCAP(<string>)
                             Convertit les caracteres initiaux de la chaine en
                             Capitales.
        LENGTH(<string>)
                             Retourne le nombre de caracteres de la chaine.

        <string>||<string>
                             Combine les deux chaines en une seule chaine,
                             concatenee, ou la premiere chaine est immediatement
                             suivie par la seconde.

        LPAD(<string>,X,'*')
                             Insere des caracteres * (ou n'importe quel autre, mis
                             entre guillemets) a gauche de la chaine de
                             caracteres pour lui donner une longueur de X
                             caracteres.

        RPAD(<string>,X,'*')
                             Insere des caracteres * (ou n'importe quel autre, mis
                             entre guillemets) a droite de la chaine de
                             caracteres pour lui donner une longueur de X
                             caracteres.

        SUBSTR(<string>,X,Y)
                             Extrait Y lettres de la chaine a partir de la
                             position X.

        NVL(<column>,<value>)
                             La fonction NVL va substituer la valeur <value>
                             pour chaque valeur nulle dans la colonne <column>. Si
                             la valeur courante dans la colonne <column> n'est pas
                             nulle (NULL), NVL est sans effet.

  ----------------------------------------------------------------------------
  Resume de la Syntaxe--Pour Utilisateurs Avances Seulement

  Voici la forme generale des instructions dont il a ete question dans ce
  didacticiel, avec, en plus, quelques autres, (des explications sont donnees).
  SOUVENEZ-VOUS que toutes ces instructions peuvent ne pas etre disponibles sur
  votre systeme, aussi verifiez leur disponibilite dans la documentation:

  ALTER TABLE <TABLE NAME> ADD|DROP|MODIFY (COLUMN SPECIFICATION[S]...voir
  Create Table); --vous permet d'ajouter ou de supprimer une ou plusieurs colonnes
  d'une table, ou de changer les specifications(donnees, types, etc.) d'une colonne
  existante;
  cette instruction est egalement utilisee pour changer les specifications
  physiques d'une table
  (comment la table est stockee, etc.), mais ces definitions sont specifiques au
  SGBD, aussi, lire la documentation. De meme, ces specifications physiques sont
  utilisees avec les instructions de creation de table, lorsqu'une table est creee
  pour la premiere fois. De plus, seulement une seule option peut etre executee
  par instruction de modification: (Alter Table)--soit add (ajout), drop
  (suppression), OU modify (modification) dans une simple instruction.

  COMMIT; --rend les modifications effectuees sur une bases de donnees permanentes
  (depuis le dernier COMMIT; connu sous le nom de transaction)

  CREATE [UNIQUE] INDEX <INDEX NAME>
  ON <TABLE NAME> (<COLUMN LIST>); --UNIQUE est optionnel; entre parentheses.

  CREATE TABLE <TABLE NAME>
  (<COLUMN NAME> <DATA TYPE> [(<SIZE>)] <COLUMN CONSTRAINT>,
  --ou SIZE est uniquement utilise avec certains types de donnees (voir
  ci-dessus), et les contraintes incluent les possibilites suivantes (impose
  automatiquement par le SGBD;
  (un non respect entraine la generation d'une erreur) :

    1. NULL ou NOT NULL (voir ci-dessus)
    2. UNIQUE impose que deux lignes ne peuvent avoir la meme valeur pour cette
  colonne
    3. PRIMARY KEY indique a la base de donnees que cette colonne est la colonne
  cle primaire (utilise uniquement si la cle est une colonne cle, autrement une
  instruction
       PRIMARY KEY (column, column, ...) apparait apres la derniere definition de
  colonne.
    4. CHECK permet de tester une condition quand on insere ou on met a jour une
  donnee dans cette colonne; par exemple, CHECK (PRICE > 0) amene le systeme a
  tester si la colonne Prix est superieure ou egale a zero avant d'accepter la
  valeur...quelquefois implante comme instruction CONSTRAINT.
    5. DEFAULT insere une valeur par defaut dans la base de donnees si l'on veut
  inserer une ligne qui ne contienne pas de valeur pour cette colonne; par
  exemple,
       BENEFITS INTEGER DEFAULT = 10000
    6. FOREIGN KEY fonctionne comme la Cle Primaire, mais est suivi par:
       REFERENCES <TABLE NAME> (<COLUMN NAME>), qui fait reference a la cle primaire
       de reference.

  CREATE VIEW <TABLE NAME> AS <QUERY>;

  DELETE FROM <TABLE NAME> WHERE <CONDITION>;

  INSERT INTO <TABLE NAME> [(<COLUMN LIST>)]
  VALUES (<VALUE LIST>);

  ROLLBACK; --Annule toutes les modifications effectuees dans la base de donnees,
  celles qui ont ete faites depuis la derniere commande COMMIT...Attention!
  Quelques logiciels travaillant en transactions, donc, la commande ROLLBACK peut
  ne pas fonctionner.

  SELECT [DISTINCT|ALL] <LIST OF COLUMNS, FUNCTIONS, CONSTANTS, ETC.>
  FROM <LIST OF TABLES OR VIEWS>
  [WHERE <CONDITION(S)>]
  [GROUP BY <GROUPING COLUMN(S)>]
  [HAVING <CONDITION>]
  [ORDER BY <ORDERING COLUMN(S)> [ASC|DESC]]; --ou ASC|DESC permet le classement en
  ordre ascendant (ASCending) ou descendant (DESCending)

  UPDATE <TABLE NAME>
  SET <COLUMN NAME> = <VALUE>
  [WHERE <CONDITION>]; --si la clause WHERE n'est pas donnee, toutes les lignes
  seront mises a jour selon l'instruction SET

  ----------------------------------------------------------------------------
  Liens Importants

  Liens Informatique & SQL/DB : Netscape -- Oracle -- Sybase -- Informix
  --Microsoft
  Page de Reference -- Ask the SQL Pro -- SQL Pro's Relational DB
  Sites Utiles
  Programmer's Source -- DBMS Sites -- inquiry.com -- DB Ingredients
  Web Authoring -- Computing Dictionary -- DBMS Lab/Links -- SQL FAQ -- SQL
  Databases
  RIT Database Design Page -- Database Jump Site -- Didacticiels de programmation sur le Web
  Ressources pour le Developpement -- Query List -- IMAGE SQL

  Divers: CNN -- USA Today -- Pathfinder -- ZDNet -- Metroscope -- CNet

  Liste de ressources sur Internet -- Netcast Weather -- TechWeb -- LookSmart

  Moteurs de Recherche: Yahoo -- Alta Vista -- Excite -- WebCrawler -- Lycos --
  Infoseek -- search.com

  L'auteur n'est pas reponsable de ces sites.
  ----------------------------------------------------------------------------
  Avertissement

  J'espere que vous aurez appris quelque chose de ce premier regard sur un langage
  tres important qui est en train de devenir plus repandu dans le mode de
  l'informatique client-serveur. J'ai redige cette page web pour apporter quelque
  chose d'utile au  web et a la communaute des utilisateurs du web. En realite,
  j'ai appris que ce document est utilise dans plusieurs colleges pour des cours
  sur les bases de donnees et par des chercheurs. En outre, lisez cette page dans
  le nouveau livre, edite par Waite Publishing, sur Borland C++ Builder, qui sera
  publie cet ete et dans une version a venir chez Sams Publishing. De plus, je
  voudrais remercier tous les gens, sur les cinq continents, qui m'ont contactes
  a propos de cette page.

  J'espere aussi continuer a ajouter plus d'elements a ce didacticiel, tels que
  des articles sur la conception d'une base de donnees et les extensions SQL non
  standard, meme si je souhaite me tenir a l'ecart de particularites propres a
  un Systeme de Gestion de Base de Donnee. Bonne chance pour vos developpements
  en SQL et autres aventures informatiques.

  Jim Hoffman
  ----------------------------------------------------------------------------
  Commentaires ou Suggestions? Envoyez-moi un courrier electronique a jhoffman@one.net.

  Ou vous pouvez desirer jeter un oeil aux pages Web de  Jim Hoffman's Web Pages
  pour plus d'informations me concernant.

  Copyright 1996-1997, James Hoffman. Ce document peut etre utilise gratuitement
  par n'importe quel utilisateur d'Internet, mais ne peut pas etre inclus dans
  un autre document, publie sous une autre forme, ou produit en masse de quelque
  facon que ce soit.

  Netscape Navigator donne le meilleur affichage de cette page; celui-ci n'est pas
  tres bon si l'on utilise Microsoft Internet Explorer.

  Derniere mise a jour : 8-25-1997; ajout de quelques elements.

  4400..  LLiissttee ddeess aauuttrree BBaasseess ddee DDoonnnneeeess

  On  trouvera  ci-dessous la liste des autres bases de donnees SQL pour
  Unix, Linux.
  +o  Cliquez       et       allez       a       Applications->databases.
     <http://www.caldera.com/tech-ref/linuxapps/linapps.html>

  +o  Click        et        allez       a       Applications->databases.
     <http://www.xnet.com/~blatura/linapps.shtml>

  +o  Ressources pour Bases de Donnees <http://linas.org/linux/db.html>

  +o  Liste       des        Bases        de        Donnees        libres
     <http://cuiwww.unige.ch:80/~scg/FreeDB/FreeDB.list.html>

  +o  Liste des SGBDR de Browne <http://www.hex.net/~cbbrowne/rdbms.html>

  +o  Liste des SGBDR de SAL <http://SAL.KachinaTech.COM/H/1/>

  +o  Liste      des      SGBD      Orientes      Objets      de      SAL
     <http://SAL.KachinaTech.COM/H/2/>

  +o  Liste     des    Utilitaires    et    d'Autres    SGDB    de    SAL
     <http://SAL.KachinaTech.COM/H/3/>

  +o  Index des Logiciels de Base de Donnees  Publics   de  l'ACM  SIGMOD
     <http://bunny.cs.uiuc.edu/sigmod/databaseSoftware/>

  4411..  CCoonncclluussiioonn

  Apres avoir cherche toutes les bases de donnees disponibles qui soient
  libres et dont le code source est disponible,  j'ai  trouve  que  SEUL
  PostgreSQL,  le SGDBR (Relationnel Objet)SQL libre, est le plus mature
  et le plus largement utilise au monde. PostgreSQL est  tres  attractif
  en ce que beaucoup de travail a deja ete effectue et qu'il possede des
  pilotes  ODBC   et   JDBC   permettant   d'ecrire   des   applications
  independantes  des  bases  de  donnees.  Les  applications  ecrites en
  PostgreSQL qui  utilisent  les  pilotes  ODBC,  JDBC  sont  facilement
  portables  sur  d'autres systemes tels que Oracle, Sybase et Informix.
  Et les applications  ecrites  pour  Oracle,  Sybase  et  Informix  qui
  utilisent les pilotes ODBC, JDBC sont facilement portables sur la base
  de donnees PostgreSQL.

  4422..  FFAAQQ -- QQuueessttiioonnss ssuurr PPoossttggrreeSSQQLL

  4422..11..  FFooiirree AAuuxx QQuueessttiioonnss ((FFAAQQ)) ssuurr PPoossttggrreeSSQQLL

  Derniere mise a jour: Mercredi 11  Juin  10:44:40  EDT  1997  Version:
  6.1.1

  Gestionnaire actuel: Bruce Momjian (maillist@candle.pha.pa.us)

  La  version  la plus recente de ce document peut etre consultee sur le
  site Web de postgreSQL,  <http://www.postgreSQL.org>

  On  trouvera  les  reponses  aux  questions  specifiques  a  Linux   a
  <http://www.postgreSQL.org/docs/FAQ-Linux.phtml>

  On   trouvera   les  reponses  aux  questions  specifiques  a  Irix  a
  <http://www.postgreSQL.org/docs/FAQ-Irix.phtml>

  Modifications dans cette version (* = modifie, + = nouveau) :

  * 3.42) Qu'est-ce qu'une Optimisation de Requete Genetique?   *  3.43)
  J'utilise Solaris et l'affichage de mes dates est faux. Pourquoi?

  ---------------------------------------------------------------------------

  4422..22..  QQuu''eesstt--ccee qquuee PPoossttggrreeSSQQLL??

  PostgreSQL est une amelioration du  systeme  de  gestion  de  base  de
  donnees  POSTGRES,  un  prototype  de recherche de SGBD de la nouvelle
  generation. Alors que  PostgreSQL garde le  puissant modele de donnees
  et  les riches types de donnees de POSTGRES, il remplace le langage de
  requetes  PostQuel  par  un  sous-ensemble  etendu  du  langage   SQL.
  PostgreSQL est libre et le code source est disponible.

  Le  developpement  de  PostgreSQL  est  effectue  par  une  equipe  de
  developpeurs Internet qui sont tous inscrits a la liste  de  diffusion
  PostgreSQL  developpement. Le coordinateur actuel est Marc G. Fournier
  (scrappy@postgreSQL.org). (Voir ci-dessous comment le joindre).  Cette
  equipe  est  maintenant responsable de tous les developpements actuels
  et futurs de PostgreSQL.

  Les auteurs de PostgreSQL 1.01sont Andrew Yu et Jolly  Chen.  Beaucoup
  d'autres  ont  contribue  au  portage,  aux  tests, au debogage et aux
  ameliorations du code; Le code original de Postgres, a  partir  duquel
  PostgreSQL  est  derive,  est  le  resultat  de  l'effort  de nombreux
  etudiants de troisieme cycle, de deuxieme cycle et d'enseignants  sous
  la  direction  du  Professeur  Michael  Stonebraker de l'universite de
  Californie, Berkeley.

  Le nom original du logiciel a Berkeley etait Postgres. Lors de l'ajout
  des fonctionnalites SQL en 1995, il fut renomme Postgres95. Ce nom fut
  change a la fin de 1996 en PostgreSQL.

  4422..33..  SSuurr qquueelllleess mmaacchhiinneess ttoouurrnnee PPoossttggrreeSSQQLL??

  Les auteurs ont compile et  teste  PostgreSQL  sur  les  plates-formes
  suivantes(quelques unes de ces compilations requierent gcc 2.7.0) :

  * aix - IBM sous AIX 3.2.5

  * alpha - DEC Alpha AXP sous OSF/1 2.0

  * BSD44_derive - OSs derive de 4.4-lite BSD (NetBSD, FreeBSD)

  * bsdi - BSD/OS 2.0, 2.01, 2.1, 3.0

  * dgux - DG/UX 5.4R3.10

  * hpux - HP PA-RISC sous HP-UX 9.0

  * i386_solaris - i386 Solaris

  * irix5 - SGI MIPS sous IRIX 5.3

  * linux - Intel x86 sous Linux 1.2 et Linux ELF (Pour le Linux non-ELF
  Linux, voir LINUX_ELF ci-dessous).

  * sparc_solaris - SUN SPARC sous Solaris 2.4

  * sunos4 - SUN SPARC sous SunOS 4.1.3

  * svr4 - Intel x86 sous Intel SVR4 * ultrix4 - DEC  MIPS  sous  Ultrix
  4.4

  Pour les plates-formes suivantes, il y a des problemes/bogues connus :

  * nextstep - Motorola MC68K ou Intel x86 sous NeXTSTEP 3.2

  4422..44..  OOuu ppuuiiss--jjee ttrroouuvveerr PPoossttggrreeSSQQLL??

  Le premier site ftp anonyme pour PostgreSQL est :

  *  <ftp://ftp.postgreSQL.org/pub>

  Il existe un site miroir a :

  *             <ftp://postgres95.vnet.net/pub/postgres95>             *
  <ftp://ftp.luga.or.at/pub/postgres95>                                *
  <ftp://cal011111.student.utwente.nl/pub/postgres95> *  <ftp://ftp.uni-
  trier.de/pub/database/rdbms/postgres/postgres95>                     *
  <ftp://rocker.sch.bme.hu>

  4422..55..  QQuueell eesstt llee rreeggiimmee ddee ccooppyyrriigghhtt ddee PPoossttggrreeSSQQLL??

  PostgreSQL est sujet au COPYRIGHT suivant.

  Systeme de Gestion de Base de Donnees PostgreSQL

  Copyright (c) 1994-6 Universite de Californie. Tous droits reserves

  La permission d'utiliser, de copier, de modifier, et de distribuer  ce
  logiciel  et sa documentation pour n'importe quel usage, gratuitement,
  et sans autorisation ecrite est accordee, a  la  condition  que  cette
  notice  de  copyright  et  que  ce  paragraphe et les deux paragraphes
  suivants apparaissent dans toutes les copies.

  EN AUCUN CAS L'UNIVERSITE DE CALIFORNIE  NE  POURRA  ETRE  TENUE  POUR
  RESPONSABLE  VIS  A  VIS DE QUI QUE CE SOIT POUR DES DOMMAGES DIRECTS,
  INDIRECTS, SPECIAUX, FORTUITS, OU CONSECUTIFS, INCLUANT  LA  PERTE  DE
  PROFITS,  QUI  POURRAIENT  RESULTER DE L'USAGE DE CE LOGICIEL ET DE SA
  DOCUMENTATION, MEME SI L'UNIVERSITE DE CALIFORNIE A ETE AVERTIE DE  LA
  POSSIBILITE D'UN TEL DOMMAGE.

  L'UNIVERSITE  DE  CALIFORNIE  REJETTE PARTICULIERMENT TOUTE GARANTIES,
  INCLUANT , MAIS PAS LIMITE  A,  LES  GARANTIES  IMPLICITES  DE  VALEUR
  MARCHANDE  ET D'ADAPTATION A UNE UTILISATION PARTICULIERE. LE LOGICIEL
  FOURNIT  CI-DESSOUS  EST  FOURNIT  "EN  L'ETAT",  ET  L'UNIVERSITE  DE
  CALIFORNIE  N'A  AUCUNE  OBLIGATION  DE  FOURNIR MAINTENANCE, SUPPORT,
  MISES A JOUR, AMELIORATIONS OU MODIFICATIONS.

  4422..66..  SSuuppppoorrtt ppoouurr PPoossttggrreeSSQQLL

  Il n'y a aucun support officiel pour PostgreSQL  de  la  part  des  de
  l'equipe  de support initiale de l'Universite de Californie, Berkeley.
  Il est maintenu uniquement grace a l'effort de volontaires.

  La  liste  de  diffusion  est:  questions@postgreSQL.org.   Elle   est
  disponible pour des discussions sur des sujets concernants PostgreSQL,
  incluant, mais non limite aux rapports d'erreurs et corrections.  Pour
  avoir  des  informations  sur  la  maniere  de  s'inscrire, envoyer un
  courrier electronique avec les  lignes  suivantes  dans  le  corps  du
  message (pas dans la ligne sujet)

  subscribe end

  a questions-request@postgreSQL.org.

  Il y a aussi une liste resumee. Pour s'inscrire a cette liste, envoyez
  un courrier  electronique  a:  questions-digest-request@postgreSQL.org
  avec, dans le CORPS du message :

  subscribe end

  Des resumes sont envoyes aux membres de cette liste chaque fois que la
  liste principale a recu environ 30k de messages.

  Il y a une liste de diffusion des erreurs.  Pour  s'inscrire  a  cette
  liste,  envoyez un courrier electronique a bugs-request@postgreSQL.org
  avec, dans le CORPS du message :

  Il y a aussi un  forum  de  discussion  pour  les  developpeurs.  Pour
  s'inscrire  a cette liste, envoyer un courrier electronique a hackers-
  request@postgreSQL.org avec, dans le CORPS du message :

  subscribe end

  Des informations complementaires sur PostgreSQL peuvent etre  trouvees
  via la page d'accueil WWW de PostgreSQL a :

  <http://www.postgreSQL.org>

  4422..77..  DDeerrnniieerree vveerrssiioonn ddeePPoossttggrreeSSQQLL

  La  derniere  version  de  PostgreSQL  est  la  version  6.0,  qui est
  disponible depuis le 31 Janvier 1997. La version  6.1  est  programmee
  pour  bientot.  Pour  avoir  des informations sur les nouveautes de la
  version  6.1, consulter le fichier TODO sur notre page WWW.

  Nous attendons la version 7.0 dans quelques mois qui sera plus  rapide
  et  reduira  de  50  %  la  taille  des  colonnes systeme, sur disque,
  necessaire pour chaque ligne  d'une  table.  Cette  version  disposera
  aussi   des  fonctionnalites  de  vidage  (dump)  et  de  restauration
  (restore).

  4422..88..  EExxiissttee--tt--iill uunnee vveerrssiioonn ccoommmmeerrcciiaallee ddee PPoossttggrreeSSQQLL??

  Illustra  Information  Technology  (filiale  possedee  totalement  par
  Informix  Software,  Inc.)  vend  un  SGBD  Relationnel  Objet  appele
  Illustra qui etait, a l'origine, base sur  postgres.  Illustra  a  des
  similarites   d'aspect   avec   PostgreSQL   mais   possede   plus  de
  fonctionnalites, est plus  robuste,  plus  performant  et  dispose  de
  documentation  et  d'un  support  reels.  D'un autre cote, il coute de
  l'argent.  Pour de plus informations, contactez sales@illustra.com

  4422..99..  QQuueellllee ddooccuummeennttaattiioonn eesstt ddiissppoonniibbllee ppoouurr PPoossttggrreeSSQQLL??

  Un  manuel  utilisateur,  des  pages  de  manuel,  et  quelques petits
  exemples de test sont compris  dans  la  distribution.  Les  pages  de
  manuel  concernant  sql  et  les  fonctions  internes  (built-in) sont
  particulierement importantes.
  La page www contient des liens sur un guide  d'implementation  et  sur
  cinq   papiers   concernants   les   concepts  d'architecture  et  les
  fonctionnalites de postgres .

  4422..1100..  QQuueellllee vveerrssiioonn ddee SSQQLL PPoossttggrreeSSQQLL uuttiilliissee--tt--iill??

  PostgreSQL supporte un sous-ensemble de SQL-92.  Ils  en  possede  les
  constructions   les   plus   importantes   mais  manque  de  certaines
  fonctionnalites. Les differences les plus visibles sont :

  * les sous-requetes imbriquees ne sont pas supportees * pas de  clause
  HAVING sous un GROUP BY

  D'un   autre   cote,   vous   pouvez   creer  des  types  definis  par
  l'utilisateur, des fonctions, de l'heritage  etc.  Si  vous  souhaitez
  participer  a  la programmation de PostgreSQL, vous pouvez ajouter les
  fonctionnalites manquantes enumerees ci-dessus.

  4422..1111..  PPoossttggrreeSSQQLL ffoonnccttiioonnnnee--tt--iill aavveecc lleess  vveerrssiioonnss  pprreecceeddeenntteess  ddee
  ppoossttggrreess??

  PostgreSQL v1.09 est compatible avec les bases de donnees creees  avec
  la  version  v1.01.  Ceux  qui  veulent  faire une mise a niveau de la
  version  1.0  doivent  lire  les   indications   dan   le   repertoire
  MIGRATION_1.0_TO_1.02.

  Une  mise a niveau vers la version 6.0 necessite de faire un vidage et
  une restauration a partir des versions precedentes.

  Une mise a niveau vers la version 6.1 necessite de faire un vidage  et
  une restauration a partir des versions precedentes.

  Ceux qui font une mise a niveau de versions anterieures a 1.09 doivent
  d'abord  faire  une  mise  a  niveau  vers  la   version   1.09   sans
  vidage/restauration,  puis  vider  les  donnees de la version 1.09, et
  enfin les recharger dans la version 6.0 ou 6.1.

  4422..1122..  CCoommbbiieenn ddee ppeerrssoonnnneess uuttiilliisseenntt PPoossttggrreeSSQQLL??

  Puisque nous n'avons aucune procedure de licence ou  d'enregistrement,
  c'est  impossible  a  dire. Nous savons que des centaines de copies de
  PostgreSQL v1.*  ont ete rapatriees, et qu'il y a plusieurs  centaines
  d'inscrits aux listes de diffusion.

  ---------------------------------------------------------------------------

  4433..  FFAAQQ -- QQuueessttiioonnss ccoonncceerrnnaanntt ll''IInnssttaallllaattiioonn

  4433..11..  IInniittddbb nnee ttoouurrnnee ppaass

  * verifiez que  vous  avez  les  chemins  appropries  *  verifiez  que
  l'utilisateur  'postgres'  dispose  des  droits  necessaires  sur  les
  fichiers * assurez-vous qu'il y a des fichiers dans $ PGDATA/files, et
  qu'ils  ne  sont  pas  vides.  S'ils  n'y  sont  pas, c'est que "gmake
  install" a echoue pour une raison quelconque

  4433..22..  QQuuaanndd jjee ddeemmaarrrree llee ppoossttmmaasstteerr,, jj''aaii llee  mmeessssaaggee  ""FFiinnddBBaacckkeenndd--
  ccoouulldd  nnoott  ffiinndd  aa bbaacckkeenndd ttoo eexxeeccuuttee......"" ""ppoossttmmaasstteerr-- ccoouulldd nnoott ffiinndd
  bbaacckkeenndd ttoo eexxeeccuuttee......""

  Vous n'avez probablement pas le bon chemin de  specifie.  L'executable
  'postgres' a besoin d'etre dans votre chemin.

  4433..33..   ddeess  ddaatteess..   LLee ssyysstteemmee ppaarraaiitt ppeerrttuurrbbee ppaarr lleess vviirrgguulleess,, lleess
  ppooiinnttss ddeecciimmaauuxx,, eett llee ffoorrmmaatt

  Verifiez  votre  configuration  locale. PostgreSQL utilise les options
  locales  choisies  par  l'utilisateur  qui  a   lance   le   processus
  postmaster. Adaptez les selon votre environnement de travail.

  4433..44..    CCoommmmeenntt   ppuuiiss--jjee  iinnssttaalllleerr  PPoossttggrreeSSQQLL  aaiilllleeuurrss  qquuee  ddaannss
  //uussrr//llooccaall//ppggssqqll??

  Il vous faut editer le fichier Makefile.global et modifier POSTGRESDIR
  suivant vos souhaits, ou creer un fichier Makefile.custom  et  definir
  POSTGRESDIR ici.

  4433..55..   QQuuaanndd  jjee  llaannccee  ppoossttmmaasstteerr,, jj''aaii uunn mmeessssaaggee ""BBaadd SSyysstteemm CCaallll
  ccoorree dduummppeedd""..

  Cela  peu  etre  du  a  de  nombreux problemes, mais, en premier lieu,
  verifiez que vous disposez bien des extensions  system  V  dans  votre
  noyau.  PostgreSQL  necessite un support de la memoire partage dans le
  noyau.

  4433..66..  QQuuaanndd jj''eessssaaiiee ddee llaanncceerr ppoossttmmaasstteerr,, jj''aaii ddeess mmeessssaaggeess dd''eerrrreeuurr
  ""IIppccMMeemmoorryyCCrreeaattee""..

  Soit votre  gestion  de  la  memoire  partagee  n'est  pas  configuree
  correctement  dans  le  noyau ou vous avez besoin d'etendre la memoire
  partagee disponible dans le noyau. La quantite dont vous  avez  besoin
  depend de l'architecture de votre systeme et du nombre de tampons avec
  lesquels postmaster a ete configure pour tourner. Pour la plupart  des
  systemes,  avec  des tampons de la taille par defaut, vous avez besoin
  d'un minimum de ~ 760K.

  4433..77..  JJ''aaii mmooddiiffiiee uunn  ffiicchhiieerr  ssoouurrccee,,  mmaaiiss  uunnee  rreeccoommppiillaattiioonn  nnee
  rreefflleettee ppaass lleess mmooddiiffiiccaattiioonnss??

  Les fichiers Makefile ne contiennent  pas  les  dependances  correctes
  pour  les  fichiers inclus. Il vous faut executer 'make clean' puis un
  autre 'make'.

  ---------------------------------------------------------------------------

  4444..  FFAAQQ -- FFoonnccttiioonnnnaalliitteess ddee PPoossttggrreeSSQQLL

  4444..11..   CCoommmmeenntt  ddooiiss--jjee ssppeecciiffiieerr uunnee CCLLEE oouu dd''aauuttrreess ccoonnttrraaiinntteess ssuurr
  uunnee ccoolloonnnnee??

  Les   contraintes  sur  les  colonnes  ne  sont  par  supportees  dans
  PostgreSQL.  En consequence, le systemes ne verifie pas l'existence de
  doublons.

  Sous  6.0,  creez  un  index  unique sur la colonne. Les tentatives de
  creer des doubles dans cette colonne donneront une erreur.

  4444..22..  EEsstt--ccee qquuee PPoossttggrreeSSQQLL ssuuppppoorrttee lleess ssoouuss--rreeqquueetteess iimmbbrriiqquueeeess??

  Les sous-requetes imbriquees ne sont pas encore implantees, mais elles
  peuvent etre simulees en utilisant des fonctions sql.

  4444..33..  CCoommmmeenntt ddooiiss--jjee ddeeffiinniirr ddeess iinnddeexx ""uunniiqquuee""??

  PostgreSQL 6.0 supporte les index "unique".

  4444..44..  JJ''aaii eeuu uunn ttaass ddee pprroobblleemmeess ddaannss ll''uuttiilliissaattiioonn ddeess rreegglleess..

  Actuellement,  le systeme de regle dans PostgreSQL est pour la plupart
  non  fonctionnel.  Il  fonctionne  suffisamment  pour   supporter   le
  mecanismes   de  vue,  mais  c'est  tout.  Vous  utilisez  les  regles
  PostgreSQL a vos risques et perils.

  4444..55..  IIll nnee mmee sseemmbbllee ppaass  ppoossssiibbllee  dd''eeccrriirree  aauu  mmiilliieeuu  ddee  ggrraannddss
  oobbjjeettss ddee mmaanniieerree ffiiaabbllee..

  Le systeme de gestion des grands objets est egalement non  fonctionnel
  dans  PostgreSQL.  Il  fonctionne  juste assez pour stocker de grandes
  paquets de donnees et de les relire, mais l'implementation souffre  de
  quelques  problemes  sous-jacents.   Vous  utilisez  les grands objets
  PostgreSQL a vos risques et perils.

  4444..66..  PPoossttggrreeSSQQLL aa--tt--iill uunn iinntteerrffaaccee uuttiilliissaatteeuurr ggrraapphhiiqquuee?? UUnn ggeenneerr--
  aatteeuurr ddee rraappppoorrtt?? UUnn iinntteerrffaaccee ddee llaannggaaggee dd''iinntteerrrrooggaattiioonn iinntteeggrree??

  Non. Non. Non. Au moins, pas dans la distribution officielle. Quelques
  utilisateurs  ont  indique  quelques  succes  dans  l'utilisation   de
  'pgbrowse'  et  de  'onyx'  comme  frontaux  a  PostgreSQL.  Plusieurs
  contributeurs travaillent sur des outils frontaux bases sur Tk.  Posez
  la question dans la liste de diffusion.

  4444..77..  CCoommmmeenntt ppuuiiss--jjee eeccrriirree uunnee aapppplliiccaattiioonn cclliieennttee ppoouurr PPoossttggrreeSSQQLL??

  PostgreSQL  supporte  une  bibliotheque  d'interfacage  que  l'on peut
  appeler a partir  de  C  nommee  libpq  de  meme  qu'une  bibliotheque
  d'interfacage basee sur Tcl appelee libtcl.

  D'autres  ont contribue a une interface perl et a une passerelle WWW a
  PostgreSQL.  Consulter la  page  d'accueil  PostgreSQL  pour  plus  de
  details.
  4444..88..   CCoommmmeenntt  ppuuiiss--jjee mmee pprreemmuunniirr dd''aacccceess aa mmoonn pprroocceessssuuss dd''aarrrriieerree
  ppllaann PPoossttggrreeSSQQLL ppaarr dd''aauuttrreess hhootteess??

  Utilisez une authentification basee sur l'hote en modifiant le fichier
  $ PGDATA/pg_hba en consequence.

  4444..99..  CCoommmmeenntt ppuuiiss--jjee mmeettttrree eenn ppllaaccee uunn ppgg__ggrroouupp??

  Actuellement, il n'y a pas d'interface aisee pour mettre en place  des
  groupes  d'utilisateurs.   Vous  devez  explicitement inserer/mettre a
  jour la table pg_group . Par exemple :

               jolly=> insert into pg_group (groname, grosysid, grolist)
               jolly=>     values ('posthackers', '1234', '5443, 8261');
               INSERT 548224
               jolly=> grant insert on foo to group posthackers;
               CHANGE
               jolly=>

  Les champs dans le fichier pg_group sont :

  * groname: le nom de groupe. C'est un char16 et il doit etre  purement
  alphanumerique.  Ne pas inclure de soulignes ou d'autres ponctuations.
  * grosysid: l'identificateur de groupe. C'est un int4.  Il  doit  etre
  unique pour chaque groupe.  * grolist: la liste des identificateurs de
  pg_user qui appartiennent au groupe.

          C'est un int4[].

  4444..1100..  QQuueellllee ll''eexxaaccttee ddiiffffeerreennccee eennttrree lleess ccuurrsseeuurrss bbiinnaaiirreess eett  lleess
  ccuurrsseeuurrss nnoorrmmaauuxx??

  Les curseurs normaux retournent les donnees en format  ASCII.  Puisque
  les donnees sont stockees d'origine en format binaire, le systeme doit
  effectuer une conversion pour produire le format ASCII. De  plus,  les
  formats  ASCII  sont  souvent  plus  grands  en  taille  que le format
  binaire. Une fois que les attributs sont retournes en  ASCII,  souvent
  l'application  cliente doit alors les convertir en format binaire pour
  les manipuler.

  Les curseurs binaires  vous  renvoient  les  donnees  dans  le  format
  binaire,  natif,  de  representation.  Donc, les curseurs binaires ont
  tendance a  etre  plus  rapides  puisqu'il  y  a  moins  de  temps  de
  traitement du a la conversion.

  Toutefois,  l'ASCII est neutre en ce qui concerne l'architecture alors
  que  la  representation  binaire  peut  differer   entre   differentes
  architectures de machines.  Donc, si votre machine cliente utilise une
  representation  des  donnees  differente  de  votre  machine  serveur,
  recevoir  les  attributs  en format binaire ne correspond certainement
  pas a ce que vous desirez.  Donc,  si  votre  objectif  principal  des
  d'afficher  les  donnees  en  ASCII,  alors les recevoir en ASCII vous
  evitera quelques efforts cote client.

  4444..1111..  PPoouurrqquuooii ll''ooppeerraatteeuurr !!== nnee ffoonnccttiioonnnnee--tt--iill ppaass??

  SQL specifie les operateurs d'inegalite < > , et  c'est  ce  que  nous
  avons definit comme types internes.

  En 6.0, != est equivalent a < > .

  4444..1122..  QQuu''eesstt--ccee qquu''uunn iinnddeexx RR--ttrreeee eett aa qquuooii eesstt--iill uuttiilliissee??

  Un index R-tree est utilise pour indexer  les  donnees  spatiales.  Un
  index  obtenu  par  hachage  ne  peut effectuer de recherches dans une
  gamme de  donnees.  Un  index  B-tree  peut  seulement  effectuer  des
  recherches  dans une gamme de donnees sur une dimension.  Les index R-
  tree permettent  de  traiter  des  donnees  multidimensionnelles.  Par
  exemple,  si  un  index  R-tree peut etre construit sur un attribut de
  type 'point' le systeme peut repondre plus efficacement a des requetes
  telles  que selectionner tous les points a l'interieur d'un rectangle.

  Le papier de reference qui decrit la conception  originale  du  R-Tree
  est :

  Guttman,   A.   "R-Trees:   A  Dynamic  Index  Structure  for  Spatial
  Searching."   (R-Trees:  une  Structure  d'Index  Dynamique  pour  les
  Recherches  Spatiales)  Proc of the 1984 ACM SIGMOD Int'l Conf on Mgmt
  of Data, 45-57.

  Vous pouvez egalement trouver ce papier dans le livre  de  Stonebraker
  "Readings  in  Database Systems" (Lectures sur les Systemes de Gestion
  de Base de Donnees)

  4444..1133..  QQuueellllee eesstt llaa ttaaiillllee mmaaxxiimmuumm dd''uunn ttuuppllee??

  Les Tuples sont limites a 8K octets. En tenant compte des attributs du
  systeme et autre surcharge, on devrait rester bien a l'ecart des 8,000
  octets pour etre tranquille. Pour utiliser des attributs superieurs  a
  8K, essayez d'utiliser l'interface pour les grands objets.

  Les  Tuples  ne doivent pas franchir la frontiere des 8k donc un tuple
  de 5k necessitera un espace de stockage de 8k.

  4444..1144..  JJ''aaii ddeeffiinnii ddeess iinnddeexx,, mmaaiiss mmeess rreeqquueetteess nnee ppaarraaiisssseenntt ppaass  eenn
  ffaaiirree uussaaggee.. PPoouurrqquuooii??

  PostgreSQL ne maintient pas automatiquement de statistiques.  On  doit
  realiser  un  appel  a  une "reorganisation" explicite pour mettre les
  statistiques a jour. Apres que les  statistiques  aient  ete  mises  a
  jour,  l'optimiseur  fera  un  meilleur  usage  des  index.  Notez que
  l'optimiseur des limite et n'utilise  pas  les  index  dans  certaines
  circonstances (telles que les dans les clauses OR).

  Si  le  systeme ne voit toujours pas l'index, c'est probablement parce
  que vous avez cree un index sur un champ de  type   *_ops   incorrect.
  Par  exemple, vous avez cree un champ CHAR(4), mais vous avez specifie
  un index de type_class char_ops.

  Consultez  la  page  du  manuel  sur  create_index  pour   avoir   des
  informations   sur   les   types   de  classes  disponibles.  Il  doit
  correspondre au type de champ.

  Postgres ne previent pas l'utilisateur quand un  index  incorrect  est
  cree.

  Les index ne sont pas utilises dans les operations ORDER BY.

  4444..1155..  EExxiissttee--tt--iill ddeess ppiillootteess OODDBBCC ppoouurr PPoossttggrreeSSQQLL??

  Il y a deux pilotes ODBC disponibles, PostODBC et OpenLink ODBC.

  Pour  tous  ceux  qui  sont interesses par PostODBC, il y a maintenant
  deux listes de diffusion consacrees aux discussions sur  PostODBC.  Ce
  sont :

  *         postodbc-users@listserv.direct.net        *        postodbc-
  developers@listserv.direct.net

  ces  listes  sont  des  listes  de  diffusion  ordinaires  gerees  par
  majordomo.   Vous   pouvez  vous  inscrire  en  envoyant  un  courrier
  electronique a :

  * majordomo@listserv.direct.net

  OpenLink ODBC est actuellement en version beta sous Linux. Vous pouvez
  le    rapatrier    de   <http://www.openlinksw.com/postgres.html>   Il
  fonctionne avec notre logiciel client ODBC standard  vous  aurez  donc
  Postgres ODBC disponible sur toutes les plates formes clients que nous
  supportons (Win, Mac, Unix, VMS).

  Nous vendrons probablement ce produit aux gens  qui  ont  besoin  d'un
  support  de  qualite commerciale, mais une version libre sera toujours
  disponible. Adressez vos questions a postgres95@openlink.co.uk.

  4444..1166..  CCoommmmeenntt ppuuiiss--jjee uuttiilliisseerr ppoossttggrreess aavveecc uunn iinnddeexxaaggee mmuullttiiddiimmeenn--
  ssiioonnnneell ((>> 22 ddiimmeennssiioonnss))??

  Les R-Trees integres peuvent traiter les polygones et les  boites.  En
  theorie,  les  R-trees  peuvent etre etendus pour prendre en charge un
  plus grand nombre de dimensions. En pratique, l'extension des  R-trees
  demande  un  peu de travail et n'avons actuellement aucun document sur
  la maniere de le faire.

  4444..1177..  CCoommmmeenntt ppuuiiss--jjee eeffffeeccttuueerr ddeess  rreecchheerrcchheess  dd''eexxpprreessssiioonnss  rreegg--
  uulliieerreess??  uunnee  rreecchheerrcchhee  dd''eexxpprreessssiioonn rreegguulliieerree ssaannss tteenniirr ccoommppttee ddeess
  mmaajjuussccuulleess oouu ddeess mmiinnuussccuulleess??

       PostgreSQL supporte une syntaxe de type SQL LIKE de meme qu'un systeme de recherche
       d'expressions regulieres plus general avec l'operateur ~. L'operateur  !~ est
       l'operateur de negation de recherche d'expressions regulieres. ~* et !~* sont les
       operateurs d'expression regulieres indifferents aux majuscules et aux minuscules.

  4444..1188..  JJee nnee ppeeuuxx ppaass aacccceeddeerr aa llaa bbaassee ddee ddoonnnneeeess eenn  ttaanntt  qquu''uuttiill--
  iissaatteeuurr ''rroooott''..

  Vous ne devriez pas creer  d'utilisateurs  de  base  de  donnees  avec
  l'identificateur   d'utilisateur   0(root).   Ils   seront  incapables
  d'acceder a la base de donnees. C'est une mesure de precaution a cause
  de  la  possibilite  pour chaque utilisateur de lier dynamiquement des
  modules objets au moteur de base de donnees.

  4444..1199..  JJ''aaii ssuubbiitt uunn ccrraasshh dduu  sseerrvveeuurr  ppeennddaanntt  uunnee  rreeoorrggaanniissaattiioonn..
  CCoommmmeenntt ppuuiiss--jjee ssuupppprriimmeerr llee ffiicchhiieerr ddee vveerrrroouuiillllaaggee??

  Si  le serveur se crash pendant une commande de reorganisation, il y a
  des chances pour qu'il laisse un fichier de  verrouillage  en  suspend
  quelque  part. Une tentative de relancer la commande de reorganisation
  resultera dans le

  WARN:can't create lock file -- another vacuum cleaner running?

  Si vous etes sur qu'il n'y a pas  de  reorganisation  en  cours,  vous
  pouvez  supprimer  le  fichier appele "pg_vlock" dans le repertoire de
  votre base de donnees (qui est $ PGDATA/base/< dbName >)

  4444..2200..  QQuueellllee eett llaa ddiiffffeerreennccee eennttrree lleess ddiiffffeerreennttss ttyyppeess ccaarraacctteerreess??

       Type            Nom Interne     Notes

       --------------------------------------------------

       CHAR            char            1 caractere

       CHAR2           char2           2 caracteres

       CHAR4           char4           4 caracteres  optimise pour une longueur fixe

       CHAR8           char8           8 caracteres

       CHAR16          char16          16 caracteres

       CHAR(#)         bpchar          complete par des blancs jusqu'a la longueur fixe specifiee

       VARCHAR(#)      varchar         la taille specifie la longueur maximum, pas de remplissage

       TEXT            text            longueur limitee seulement par la longueur maximum du tuple

       BYTEA           bytea           tableau d'octets de longueur variable

       Rappelez vous, il vous faut utiliser le nom interne lorsque vous  creez des index
       sur ces champs ou quand vous effectuez d'autres operations internes.

       Les quatre derniers types ci-dessus sont des types "varlena" (i.e. les quatre
       premiers octets donnent la longueur, suivie par les donnees). CHAR(#) et VARCHAR(#)
       allouent le nombre maximum d'octets quelle que soient les donnees stockees dans le
       champ.
       TEXT et BYTEA sont les seuls types caracteres qui ont une longueur variable sur le
       disque.

  4444..2211..  DDaannss uunnee rreeqquueettee,, ccoommmmeenntt ppuuiiss--jjee ddeetteecctteerr  ssii  uunn  cchhaammpp  eesstt
  NNUULLLL??

  PostgreSQL possede deux mots-cles intrinseques, "isnull" et  "notnull"
  (notez  qu'il  n'y a pas d'espaces). La Version 1.05 et suivante ainsi
  que la 6.* comprennent IS NULL et IS NOT NULL.

  4444..2222..  CCoommmmeenntt ppuuiiss--jjee vvooiirr qquuee ll''ooppttiimmiisseeuurr ddee rreeqquueettee eesstt eenn  ttrraaiinn
  dd''eevvaalluueerr mmaa rreeqquueettee??

  Inserez le mot 'EXPLAIN' au debut de la requete, par exemple :

  EXPLAIN SELECT * FROM table1 WHERE age = 23;

  4444..2233..  CCoommmmeenntt ppuuiiss--jjee ccrreeeerr uunn cchhaammpp sseerriiee??

  Postgres ne permet  pas  a  l'utilisateur  de  specifier  une  colonne
  utilisateur  comme  ayant  le  type  SERIAL.  A  la place, vous pouvez
  utiliser le champ oid de chaque ligne comme valeur unique.  Cependant,
  si  vous avez besoin de vider et de recharger la base de donnees, vous
  serez obliges d'utiliser pgdump de postgres version 1.07 ou  ulterieur
  ou 6.* avec l'option -o'ou COPY avec l'option WITH OIDS pour conserver
  les oids.

  Une autre maniere valide de le faire est de creer une fonction :

  create table my_oids (f1 int4);

  insert into my_oids values (1);

  create function new_oid () returns int4 as language 'sql';

  puis:

  create table my_stuff (my_key int4, value text);

  insert into my_stuff values (new_oid(), 'hello');

  Cependant, il faut garder a l'esprit qu'il y a competition ici  ou  un
  serveur  peut  effectuer  une  mise  a  jour,  puis  un  autre serveur
  effectuer une mise a jour et que les deux selectionnent le meme nouvel
  identificateur.  Cette  instruction  doit etre effectuee dans le cadre
  d'une transaction.

  Les Sequences sont implantees dans la version 6.1

  4444..2244..  CCoommmmeenntt ppuuiiss--jjee ccrreeeerr uunn iinnddeexx mmuullttiiccoolloonnnneess??

  Dans la version 6.0, vous ne pouvez pas  directement  creer  un  index
  multicolonnes  en utilisant l'instruction "create index". Il vous faut
  definir une fonction  qui  agit  sur  les  colonnes  multiples,  puis,
  utiliser "create index" avec cette fonction.

  En 6.1, cette fonctionnalite est disponible.

  4444..2255..   QQuuee  ssoonntt lleess ffiicchhiieerrss tteemmpp__XXXXXX ddaannss llee rreeppeerrttooiirree ddee mmaa bbaassee
  ddee ddoonnnneeeess??

  Ce  sont  les fichiers temporaires "temp_ files" crees par l'executeur
  de requete.  Par exemple, si un tri doit etre effectue  pour  realiser
  une  instruction ORDER BY, quelques fichiers temporaires sont crees en
  resultat du tri.

  Si vous n'avez pas de transactions ou de tri en cours a  cet  instant,
  vous  pouvez  supprimer  ces  fichiers  temporaires "temp_ files" sans
  risques.

  4444..2266..  PPoouurrqquuooii mmeess ffiicchhiieerrss nnee ddeevviieennnneenntt--iillss ppaass ppeettiittss  aapprreess  uunnee
  ssuupppprreessssiioonn??

  Si vous executer une reorganisation  avec  une  version  pre-6.0,  les
  lignes  non  utilisees seront marquees pour etre reutilisees, mais les
  blocs du fichier ne seront pas liberes.

  En 6.0, une reorganisation reduit la taille des tables correctement.

  4444..2277..  PPoouurrqquuooii jjee nnee ppeeuuxx ppaass mmee ccoonnnneecctteerr aa mmaa bbaassee  ddee  ddoonnnneeeess  aa
  ppaarrttiirr dd''uunnee aauuttrree mmaacchhiinnee??

  La configuration par defaut permet uniquement de se connecter a partir
  de  l'hote  tcp/ip  localhost (machine locale). Vous devez ajouter une
  entree pour un hote supplementaire dans le fichier  pgsql/data/pg_hba.

  4444..2288..   JJ''aaii  ll''eerrrreeuurr  ''ddeeffaauulltt  iinnddeexx ccllaassss uunnssuuppppoorrtteedd'' ((iinnddeexx ppaarr
  ddeeffaauutt,, ccllaassssee nnoonn ssuuppppoorrtteeee)) eenn  ccrreeaanntt  uunn  iinnddeexx..  CCoommmmeenntt  ddooiiss--jjee
  ffaaiirree??

  Vous avez probablement utilise :

  create index idx1 on person using btree (name);

  Les  index  PostgreSQL sont extensibles, et par consequent en pre-6.0,
  vous devez specifier un type de classe (class_type) quand  vous  creez
  un   index.   Lisez   la  page  de  manuel  de  create  index  (nommee
  create_index).

  Avec la version 6.0, si vous  ne  specifiez  pas  de  type  de  classe
  (class_type),  il prend par defaut le type correspondant a la premiere
  colonne.

  4444..2299..  PPoouurrqquuooii llaa ccrreeaattiioonn dd''uunn iinnddeexx eennttrraaiinnee uunn ccrraasshh ddee mmaa  ttaacchhee
  ddee ffoonndd sseerrvveeuurr??

  Vous avez probablement definit un type de classe *_ops type  incorrect
  pour le champ que vous voulez indexer.

  4444..3300..  CCoommmmeenntt ppuuiiss--jjee ttrroouuvveerr qquueellss iinnddeexx eett qquueelllleess ooppeerraattiioonnss ssoonntt
  ddeeffiinniiss ddaannss llaa bbaassee ddee ddoonnnneeeess??

  Executez   le   fichier   pgsql/src/tutorial/syscat.source.  Il  donne
  l'illustration de beaucoup de 'selections' ('select's)  a  faire  pour
  obtenir  des informations sur les tables du systeme de gestion de base
  de donnees.

  4444..3311..  PPoouurrqquuooii lleess iinnssttrruuccttiioonnss oonntt--eelllleess bbeessooiinn dd''uunn ccaarraacctteerree ssuupp--
  pplleemmeennttaaiirree  tteerrmmiinnaall?? PPoouurrqquuooii ''ccrreeaatteeuusseerr'' rreettoouurrnnee ''uunneexxppeecctteedd llaasstt
  mmaattcchh iinn iinnppuutt(())''?? PPoouurrqquuooii ppgg__dduummpp nnee ffoonnccttiioonnnnee--tt--iill ppaass??

  Vous  avez  compile  postgres avec flex version 2.5.3. Il y a un bogue
  dans cette version de flex. Utilisez la version 2.5.2 ou 2.5.4 de flex
  a  la  place.  Il  y  a  un  fichier doc/README.flex qui doit faire un
  colmatage correct du code source flex 2.5.3.

  4444..3322..  TToouuss mmeess sseerrvveeuurrss ssee ppllaanntteenntt lloorrss dd''uunn aacccceess ccoonnccuurrrreenntt aa uunnee
  ttaabbllee.. PPoouurrqquuooii??

  Ce probleme peut avoir  son  origine  dans  le  noyau  qui  n'est  pas
  configure pour supporter les semaphores.

  4444..3333..   QQuueellss  ssoonntt lleess oouuttiillss ddiissppoonniibblleess ppoouurr aajjoouutteerr ddeess ffoonnccttiioonn--
  nnaalliitteess aauuxx ppaaggeess WWeebb ddee??

  Pour  une  integration  au  web,  PHP/FI est une excellente interface.
  L'URL pour cela est  <http://www.vex.net/php/>

  PHP est tres bien pour des choses simples, mais  pour  si  c'est  plus
  complique, certains utilisent encore l'interface perl et CGI.pm.

  Un  exemple  d'utilisation  de WWW avec C pour dialoguer avec Postgres
  peut etre essaye, il est a:

  *  <http://www.postgreSQL.org/~mlc>

  Une passerelle WWW basee sur WDB utilisant perl peut etre  telechargee
  de :

  *  <http://www.eol.ists.ca/~dunlop/wdb -p95>

  4444..3344..   QQuu''eesstt--ccee  qquuee  llaa ffoonnccttiioonnnnaalliittee ""ttiimmee--wwaarrpp"" eett eenn qquuooii cceellaa
  ccoonncceerrnnee--tt--iill llaa rreeoorrggaanniissaattiioonn??

  PostgreSQL  traite  les modifications de donnees de maniere differente
  de la plupart des systemes de gestion de bases de donnees.  Quand  une
  ligne est modifiee dans une table, la ligne originale est marquee avec
  un horodatage du moment ou cette modification est intervenue,  et  une
  nouvelle  ligne  est  creee  avec  les  donnees actuelles. Par defaut,
  seulement les donnees actuelles sont utilisees  dans  une  table.   Si
  vous  specifiez  une  donnee  date/heure a la suite du nom de la table
  dans une clause FROM, vous pouvez avoir acces aux donnees qui  etaient
  "actuelles" a ce moment la, i.e.

  SELECT * FROM employees 'July 24, 1996 09:00:00'

  affiche  les  lignes d'employes dans la ligne au moment specifie. Vous
  pouvez specifier des intervalles tels que date,date, date,, ,date,  ou
  ,.  Cette derniere option permet d'acceder a toutes les lignes qui ont
  jamais existe.
  L'insertion (INSERT) de lignes recoit egalement un  horodatage,  donc,
  les  lignes  qui  n'etaient  pas  dans  la table a l'instant desire ne
  seront pas affichees.

  La reorganisation supprime les lignes qui  ne  sont  plus  "actuelles"
  (courantes).  La fonctionnalite "time-warp" est utilisee par le moteur
  du SGBD pour l'annulation des modifications et  pour  la  restauration
  apres  un plantage. Les dates/heures d'expiration peut etre fixes avec
  la commande purge.

  En 6.0, apres le nettoyage d'une table,  la  date  de  creation  d'une
  ligne  peut  etre incorrecte, causant l'echec d'un parcours de la base
  de donnees base sur les dates (time-travel).

  Cette fonctionnalite de "time-travel" a ete supprime dans  la  version
  7.0.

  4444..3355..   CCoommmmeenntt  ddooiiss--jjee  aajjuusstteerr  mmoonn  mmootteeuurr  ddee SSGGBBDD ppoouurr aavvooiirr ddee
  mmeeiilllleeuurreess ppeerrffoorrmmaanncceess??

  On  peut  faire  deux choses. Vous pouvez utilisez l'option "Openlink"
  pour desactiver fsync() en lancant le  postmaster  avec  l'option  '-o
  -F'.  Ceci  evitera  que  des  fsync()  mettent a jour les donnees sur
  disque apres chaque transaction.

  Vous  pouvez  egalement  utiliser  l'option   -B  du  postmaster  pour
  accroitre  le  nombre  de  memoires  tampon  partagees  que doivent se
  partager les differents processus en tache de fond. Si vous donnez une
  valeur  trop  elevee a ce parametre, le processus ne sera pas lance ou
  se plantera de maniere inattendue.  Chaque  tampon  fait  8K  et  leur
  nombre est de 64 par defaut.

  4444..3366..   QQuueelllleess  ssoonntt lleess ffoonnccttiioonnnnaalliitteess ddiissppoonniibblleess ppoouurr llaa mmiissee aauu
  ppooiinntt ddaannss PPoossttggrreeSSQQLL??

  PostgreSQL dispose de plusieurs fonctions qui donnent des informations
  sur son etat qui peuvent etre utiles pour des besoins de debogage.

  Tout d'abord, en compilant avec DEBUG definit, de nombreux  assert()'s
  permettent  de  suivre  l'avancement  du  processus de fond de plan et
  arretent le programme quand quelque chose d'inattendu se produit.

  A la fois le postmaster et postgres ont plusieurs options de debogage.
  Premierement,  a chaque fois que lancez le postmaster, assurez-vous de
  rediriger la sortie standard et les messages d'erreurs vers un fichier
  d'enregistrement, comme :

               cd /usr/local/pgsql
               ./bin/postmaster >server.log 2>&1 &

  Ceci  creera  un  fichier  server.log  en  tete  de  l'arborescence du
  repertoire de PostgreSQL. Ce fichier peut  contenir  des  informations
  utiles  concernant  les  problemes  et  les  erreurs rencontres par le
  serveur. Postmaster possede une option -d  qui  permet  d'obtenir  des
  informations plus detaillees. L'option -d peut prendre une valeur de 1
  a 3 qui specifie le niveau de  debogage.  On  obtient  un  fichier  de
  debogage  bavard  qui  peut  etre  formate  en  utilisant le programme
  'indent'. (Il vous faudra peut etre supprimer les lignes  '===='  dans
  les  versions  1.*.) Faites attention au fait qu'un niveau de debogage
  superieur a un entraine la  generation  de  fichiers  d'enregistrement
  volumineux dans les versions 1.*.

  Vous  pouvez  , en realite, faire tourner le processus de fond de plan
  postgres a partir de la ligne de commande, et taper  vos  instructions
  SQL   directement.  Ceci  n'est  recommande  que  SEULEMENT  dans  des
  situations de debogage. Notez qu'un caractere saut de ligne termine la
  requete,  pas  un point-virgule. Si vous avez compile en utilisant les
  symboles de debogage, vous pouvez peut-etre utiliser un debogueur pour
  voir  ce  qui  se  passe. Le processus de fond de plan n'ayant pas ete
  lance par le postmaster,  il  ne  tourne  pas  dans  un  environnement
  identique   et  les  problemes  d'interaction  processus  de  fond  de
  plan/verrouillage peuvent ne pas etre  reproduits.  Quelques  systemes
  d'exploitation  peuvent  se  connecter  a un processus de fond de plan
  directement pour diagnostiquer les problemes.

  Le programme postgres possede les options a -s,  -A,  -t  qui  peuvent
  etre  tres  utiles  pour  la  mise  au  point  et  pour  la  mesure de
  performances.

  La commande EXPLAIN (Voir dans  cette  FAQ)  permet  de  voir  comment
  PostgreSQL interprete votre requete.

  4444..3377..  QQuu''eesstt--ccee qquu''uunn ooiidd?? QQuu''eesstt--ccee qquu''uunn ttiidd??

  Les  Oid  sont  la  reponse de Postgres a des identificateurs de ligne
  uniques ou a des colonnes serielles. Chaque ligne qui est  creee  dans
  Postgres  recoit un oid unique.  Tous les oids generes par initdb sont
  inferieurs a 16384  (voir  backend/access/transam.h).  Tous  les  oids
  post-initdb  (crees  par  un  utilisateur)  sont egaux ou superieurs a
  cette valeur. Tous ces oids sont uniques, non pas seulement  dans  une
  table,   ou  une  base  de  donnees,  mais  uniques  a  l'interieur de
  l'installation postgres toute entiere.

  Postgres utilise les oids dans ses tables systeme internes pour relier
  les  lignes  de  tables  separees. Ces oids peuvent etre utilises pour
  identifier des  lignes  specifiques  a  un  utilisateur  et  dans  les
  jointures.  On  recommande  l'utilisation de colonnes de type oid pour
  stocker des valeurs d'oids. Consulter les pages de manuel sql(l)  pour
  voir les autres colonnes internes.

  Les   tids   sont   utilises  pour  identifier  des  lignes  physiques
  specifiques contenant des valeurs de bloc ou  de  decalage.  Les  tids
  changent  apres  une  modification  ou un rechargement des lignes. Ils
  sont utilises par des enregistrements d'index  pour  pointer  sur  des
  lignes physiques. On ne peut pas y acceder par sql.

  4444..3388..  QQuueell eesstt llee sseennss ddee qquueellqquueess tteerrmmeess uuttiilliisseess ddaannss??

  Des parties du code source et d'anciennes documentations utilisent des
  termes qui sont d'un usage plus commun. En voici quelques uns :

  *   row,   record,  tuple            ligne,  enregistrement,  tuple  *
  attribute, field, column     attribut, champ, colonne *  table,  class
  table, classe * retrieve, select             retrouver, selectionner *
  replace, update              remplacer, mettre a jour * append, insert
  ajouter, inserer * oid, serial value            oid, valeur serielle *
  portal, cursor               portail, curseur * range variable,  table
  name,  table  alias  variable  indiquant une etendue, nom de la table,
  alias de la table
  Merci de me faire savoir si vous pensez a d'autres.

  4444..3399..  QQuu''eesstt--ccee qquuee ll''OOppttiimmiissaattiioonn ddee RReeqquueettee GGeenneettiiqquuee??

  Le  module  GEQO  dans  PostgreSQL  est  sense  resoudre  le  probleme
  d'optimisation de requete sur la jointure de plusieurs tables au moyen
  d'un  Algorithme  Genetique   (GA). Il permet le traitement de grandes
  jointures par l'intermediaire d'une recherche non--exhaustive.

  Pour de  plus  amples  informations  voir  README.GEQO  utesch@aut.tu-
  freiberg.de.

  4444..4400..   JJ''uuttiilliissee  SSoollaarriiss  eett  ll''aaffffiicchhaaggee  ddee  mmeess  ddaatteess eesstt ffaauuxx..
  PPoouurrqquuooii??

  Il y avait un bogue dans 6.0 qui causait ce probleme sous Solaris avec
  l'optimisation -O2. Passez a la version 6.1.

  4444..4411..  CCoommmmeenntt ppuuiiss--jjee aavvooiirr pplluuss ddee 3322 pprroocceessssuuss dd''aarrrriieerree ppllaann ccoonn--
  ccuurrrreennttss??

  Editez  include/storage/sinvaladt.h,   et   changez   la   valeur   de
  MaxBackendId.  Dans  le futur, nous avons prevu de rendre ce parametre
  configurable.

  ---------------------------------------------------------------------------

  4455..  FFAAQQ -- EEtteennddrree PPoossttggrreeSSQQLL

  4455..11..   JJ''aaii  eeccrriitt uunnee ffoonnccttiioonn ddeeffiinniiee ppaarr ll''uuttiilliissaatteeuurr eett qquuaanndd jjee
  llaa ffaaiitt ttoouurrnneerr ssoouuss ppssqqll,, jj''aaii uunn ppllaannttaaggee aavveecc vviiddaaggee mmeemmooiirree..

  Ce probleme  peut  provenir  d'un  certains  nombre  de  causes.  Tout
  d'abord,  essayez  de  tester votre fonction dans un programme de test
  independant. Assurez-vous egalement  que  vous  n'etes  pas  en  train
  d'envoyer  des NOTICES elog quand le frontal attend des donnees, comme
  dans les fonctions type_in() or type_out()

  4455..22..   JJ''aaii  ddeess  mmeessssaaggeess  dduu   ttyyppee   ""NNOOTTIICCEE--PPoorrttaallHHeeaappMMeemmoorryyFFrreeee--
  00xx440022225511dd00 nnoott iinn aalllloocc sseett""!!

  Vous etes en train de liberer (pfree) quelque chose qui  n'a  pas  ete
  alloue  (palloc).   Quand  vous  ecrivez  des  fonctions  definies par
  l'utilisateur, n'incluez pas le fichier "libpq-fe.h". Si  vous  faites
  cela,  va  entrainer  que votre  palloc soit un malloc a la place d'un
  free. Puis, quand la tache de fond libere (pfrees)  la  memoire,  vous
  recevez le message NOTICE.

  4455..33..   JJ''aaii eeccrriitt qquueellqquueess nnoouuvveeaauuxx ttyyppeess eett qquueellqquueess ffoonnccttiioonnss aassttuu--
  cciieeuuxx ppoouurr  PPoossttggrreeSSQQLL..

  S'il   vous   plait,  partagez-les  avec  les  autre  utilisateurs  de
  PostgreSQL. Envoyez vos extensions dans  la  liste  de  diffusion,  et
  elles finiront peut-etre dans le sous-repertoire contrib/.

  4455..44..  CCoommmmeenntt ddooiiss--jjee eeccrriirree uunnee ffoonnccttiioonn CC qquuii rreettoouurrnnee uunn ttuuppllee??

  Cela necessite beaucoup de genie,  tellement  que  les  auteurs  n'ont
  jamais essayer, bien que, en principe, cela soit possible. Une reponse
  breve sera ... vous ne pouvez pas.  Cette  possibilite  est  envisagee
  dans le future.

  ---------------------------------------------------------------------------

  4466..  FFAAQQ -- BBoogguueess

  4466..11..  CCoommmmeenntt ddooiiss ffaaiirree uunn rraappppoorrtt ddee bboogguuee??

  Regardez la FAQ courante a  <http://www.postgreSQL.org>

  Regardez aussi a notre site ftp   <ftp://ftp.postgreSQL.org/pub>  pour
  voir s'il n'y a pas une version plus recente de PostgreSQL.

  Vous  pouvez  aussi  remplir  le  fichier formulaire "bug-template" et
  l'envoyer a :

  * bugs@postgreSQL.org

  C'est l'adresse de la liste de diffusion des developpeurs.

  4477..  FFAAQQ LLiinnuuxx--PPoossttggrreeSSQQLL -- CCoommppiillaattiioonn ddee PPoossttggrreeSSQQLL

  =====================================================

  Foire Aux Questions (FAQ) de PostgresSQL V6.0 Specifique Linux A  LIRE
  EN PARALLE AVEC LA FAQ NORMALE

  =====================================================

  Derniere mise a jour:     Wed Jan 29 20:16:00 GMT 1997

  Gestionnaire        actuel:             Andrew       C.R.       Martin
  (martin@biochem.ucl.ac.uk)

  Auteur       original:                Andrew        C.R.        Martin
  (martin@biochem.ucl.ac.uk)

  4477..11..  QQuueelllleess mmooddiiffiiccaattiioonnss ddooiiss--jjee aappppoorrtteerr aa ssrrcc//MMaakkeeffiillee..gglloobbaall oouu
  ssrrcc//MMaakkeeffiillee..ccuussttoomm??

  Ces  modifications  sont  realisees  plus  facilement  en executant le
  script d'adaptation dans le  repertoire  src  qui  creera  un  fichier
  Makefile.custom pour vous.

  Si  vous  le faites par vous-meme, vous *devez* renseigner la variable
  suivante : PORTNAME=       linux

  Il vous faudra aussi modifier  celle-ci  pour  refleter  votre  propre
  installation: POSTGRESDIR

  Si  vous  validez  l'option  USE_TCL  option,  vous  devrez renseigner
  celles-ci : TCL_INCDIR=  TCL_LIBDIR=  TCL_LIB=  TK_INCDIR=  TK_LIBDIR=
  TK_LIB= X11_INCDIR= X11_LIBDIR= X11_LIB=

  Sur   mon   systeme  Slackware3.0,  ces  donnees  sont  :  TCL_INCDIR=
  /usr/include/tcl  TCL_LIBDIR=       /usr/lib   TCL_LIB=          -ltcl
  TK_INCDIR=        /usr/include/tcl  TK_LIBDIR=       /usr/lib  TK_LIB=
  -ltk X11_INCDIR=      /usr/include/X11  X11_LIBDIR=      /usr/X386/lib
  X11_LIB=        -lX11

  Vous  pouvez  aussi  effectuer  d'autres  modifications dont vous avez
  besoin, ceci etant documente dans les fichiers the INSTALL file and in
  Makefile.global

  4477..22..  PPoouurrqquuooii aaii--jjee ddeess pprroobblleemmeess aavveecc ""lliibbrreeaaddlliinnee"" mmaannqquuaanntt??

  Les  systemes  Linux  ne  sont  generalement  pas   livres   avec   la
  bibliotheque  GNU  readline installee. Soit vous vous assurez que vous
  n'avez pas active les options  readline  dans  src/Makefile.global  ou
  src/Makefile.custom  soit vous installez la bibliotheque GNU readline.

  Notez que  Debian  Linux  (comme  FreeBSD)  est  livre  avec  readline
  installe.

  4477..33..  RREEDDHHAATT PPoouurrqquuooii aaii--jjee ddeess pprroobblleemmeess aavveecc lliibbddll aanndd ddllffccnn..hh mmaann--
  qquuaannttss??

  La  bibliotheque  libdl  est  utilisee  pour  la  liaison dynamique de
  fonctions fournies par l'utilisateurs au moment de l'execution.   Pour
  une  raison  quelconque,  cette  bibliotheque  a  ete  oubliee dans la
  distribution Redhat. Il semble que ce probleme a ete  resolu  dans  la
  version Redhat 4.0 (Colgate).

  RedHat  possede maintenant un nouveau paquetage ld.so RPM sur son site
  FTP. Recuperez simplement :

  <ftp://ftp.redhat.com/pub/redhat/devel/i386/RedHat/RPMS/ld.so-1.7.14-4.i386.rpm>

  Installez le fichier RPM de la maniere habituelle et c'est tout!

  Il y a eu des rapports indiquant que des systemes ont ete abimes suite
  a l'acces a ces bibliotheques par  certains  programmes  pendant  leur
  mise a jour (ce qui n'est pas tout a fait surprenant). En consequence,
  c'est une bonne idee de redemarrer le systeme avant l'installation  de
  nouvelle  bibliotheques  et  d'avoir  le minimum de choses en fonction
  pendant ces mises  a  niveau.  Passer  en  mode  mono-utilisateur  est
  certainement aussi une bonne idee!

  Si  vous  voulez le faire de la maniere difficile, vous pouvez obtenir
  la bibliotheque et le fichier en-tete a :

  <ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ld.so-1.7.14.tar.gz>

  Autrement,  vous  pouvez  obtenir  les   binaires   precompiles   dans
  distributions/debian/buzz/binary-i386/base/ld.so-1.7.14-4.deb  sur  le
  meme site, ou suivre les instructions donnees pour la question 1.2  de
  correction  de la meme erreur avec les premieres versions de Slackware
  3.1.  Ne pas utiliser cette methode, a moins que vous sachiez  ce  que
  vous faites!
  4477..44..   SSLLAACCKKWWAARREE  33..11  PPoouurrqquuooii  aaii--jjee  ddeess  pprroobblleemmeess aavveecc lliibbddll aanndd
  ddllffccnn..hh mmaannqquuaannttss ??

  Voir  la  reponse  a la question 1.3. Slackware jusqu'a la version 3.0
  etait fourni avec cette bibliotheque et le fichier  "include"  et  ils
  ont  semble  revenir  en arriere avec les dernieres versions 3.1, mais
  les premieres livraisons 3.1  (avant  le  9  Septembre  1996)  ne  les
  avaient  pas  et beaucoup de versions CD-ROM ont ete realises a partir
  de ces premieres versions 3.1.

  Il y a eu des rapports indiquant que des systemes ont ete abimes suite
  a  l'acces  a  ces  bibliotheques par certains programmes pendant leur
  mise a jour (ce qui n'est pas tout a fait surprenant). En consequence,
  c'est  une bonne idee de redemarrer le systeme avant l'installation de
  nouvelle bibliotheques et d'avoir le minimum  de  choses  en  fonction
  pendant  ces  mises  a  niveau.  Passer  en  mode mono-utilisateur est
  certainement aussi une bonne idee!

  La meilleure  maniere  de  corriger  cela  est  d'obtenir  le  fichier
  ldso.tgz du disque a4 d'une distribution plus recente de Slackware 3.1
  de decompacter ce fichier a partir du repertoire  root  (/),  puis  de
  faire

  sh install/doinst.sh

  pour terminer l'installation, a la suite de cela, faites

  ldconfig

  Si  vous voulez l'installer manuellement, vous devez d'abord installer
  le fichier dlfcn.h in /usr/include.

  Puis, installer  le  fichier  libdl.so.1.7.14  (ou  une  version  plus
  recente) dans /lib, puis faire :

  cd /lib ln -sf libdl.so.1.7.14 libdl.so.1 ln -sf libdl.so.1 libdl.so

  Sur  quelques  systemes (dependant de la configuration de GCC) il peut
  etre necessaire de faire :

  cd /usr/lib ln -sf /lib/libdl.so .

  Finalement

  ldconfig

  4477..55..  MMaa ccoommppiillaattiioonn dduu pprroocceessssuuss dd''aarrrriieerree ppllaann eecchhoouuee rreeccllaammaanntt  llee
  ""ffiicchhiieerr iinncclluuddee""         ddllffccnn..hh mmiissssiinngg

  Voir la reponse aux questions  1.3/1.4.  N'oubliez  pas  que  si  vous
  utilisez  un  systeme  a.out  vous  devez auparavant avoir installe le
  paquetage dld (qui n'est pas  fourni  avec  la  plupart  des  systemes
  a.out) pour avoir dlfcn.h en entier. Voir Question 1.11.

  4477..66..  GGCCCC ssee ppllaaiinntt dd''uunnee ooppttiioonn iiggnnoorreeee --ffppiicc

  Le  premiere  versions  de  GCC acceptaient soit -fpic soit -fPIC.  Il
  apparait que les plus recentes versions  (V2.7.2?)  requierent  -fPIC.
  Si  vous  utilisez une version ELF de Linux, on peut ignorer cela sans
  probleme, puisque -fPIC est la valeur par defaut.

  Vous pouvez apporter une correction  a  cela  en  editant  le  fichier
  src/Makefile.global et en changeant CFLAGS_SL

  4477..77..   ""wwaarrnniinngg-- ccaasstt ffrroomm ppooiinntteerr ttoo iinntteeggeerr ooff ddiiffffeerreenntt ssiizzee"" JJ''aaii
  ddeess mmeessssaaggeess dd''aavveerrttiisssseemmeenntt dduu ttyyppee

  Ils apparaissaient  dans  les  premieres  versions  de  Postgres95  et
  peuvent,  sans  risque,  etre ignores. PostgreSQL V6.0 doit pouvoir se
  compiler sans messages d'avertissement sauf ceux relatifs aux fichiers
  en-tetes systeme (qui peuvent egalement etre ignores sans risque).

  4477..88..  SSuuSSEE--LLiinnuuxx 44..22 OOuu ssoonntt ccuurrsseess eett tteerrmmccaapp??

  SuSE-Linux  a ncurses et non pas curses. Fixer la valeur de CURSES_LIB
  dans   src/Makefile.custom   a   -lncurses   (ou   faites   ceci   par
  l'intermediaire d'un script personnalise).

  SuSE-Linux    possede    la    bibliotheque   termcap   library   dans
  /usr/lib/termcap au lieu de  /usr/lib. Si vous avez  un  probleme,  il
  vous faut ajouter la ligne suivante a src/Makefile.custom:

  LDADD_BE+= -L/usr/lib/termcap

  Vous pouvez avoir besoin d'editer src/bin/psql/Makefile et d'effectuer
  la modification de:

  ifeq ($(PORTNAME), linux) LD_ADD+= -ltermcap  en:  ifeq  ($(PORTNAME),
  linux) LD_ADD+=

  4477..99..  PPoouurrqquuooii aaii--jjee ddeess pprroobblleemmeess aavveecc lldd..ssoo??

  Si  vous  avez  des  problemes  avec  ld.so,  une  autre  bibliotheque
  necessaire en format ELF pour les liens dynamiques,  alors  c'est  que
  vous  avez  bricole votre systeme ou (plus vraisemblablement) effectue
  une mise a niveau de Linux.

  Voyez les reponses aux questions 1.3/1.4.  Vous  pouvez  avoir  besoin
  d'installer ld.so.x.y.z dans /lib et de faire tourner ldconfig.

  La  version  stable la plus recente du paquetage ld package est 1.7.14
  Au moment de la redaction de ce texte, les versions 1.8.x de  ld  sont
  experimentales.

  4477..1100..  PPoouurrqquuooii aaii--jjee lleess eerrrreeuurrss ``yyyy__fflluusshh__bbuuffffeerr uunnddeeffiinneedd''??

  Ce n'est pas reellement specifique a Linux, mais c'est courant sur les
  installations  Linux  les  plus  anciennes.  Il  vous faut une version
  recente de flex (2.5.2 ou suivantes) pour compiler  PostgreSQL.  Notez
  que flex 2.5.3 a un bogue: voir la Question 3.4.

  4477..1111..  CCoommmmeenntt ddooiiss--jjee ccoommppiilleerr PPoossttggrreeSSQQLL ssuurr uunn ssyysstteemmee aa..oouutt??

  Premierement, vous  devez  installer  la  bibliotheque  dld.  On  peut
  l'obtenir     sur     le     site    Sunsite    sous    le    nom    :
  Linux/libs/dld.3.2.7.tar.gz

  Deuxiemement,    ajouter    la    ligne    suivante     au     fichier
  src/Makefile.custom: LINUX_ELF= (ou utilisez un script personnalise)

  4477..1122..    yyaacccc  --dd  //ddiisskk22//PPoossttggrreeSSQQLL//ssrrcc//bbaacckkeenndd//ppaarrsseerr//ggrraamm..yy  mmaakkee--
  //uussrr//bbiinn//mmaakkee-- ccaannnnoott eexxeeccuuttee bbiinnaarryy ffiillee  PPoouurrqquuooii  mmaakkee  eecchhoouuee--tt--iill
  aavveecc --

  Ce  fut  un  probleme  des  premieres  versions  de  Postgres95.  Pour
  PostgreSQL on utilise  bison -y par defaut plutot que yacc.

  yacc est generalement implante comme script qui invoque bison -y  Pour
  une  raison quelconque (certaines versions de make? certaines versions
  de bash?) make est incapable d'executer ce fichier script.

  Pour corriger cela,  editez  simplement  src/mk/port/postgres.mk.linux
  et,  a  la fin du fichier, changez : # YACC = bison -y en YACC = bison
  -y

  4477..1133..  QQuuee ssoonntt lleess rreeffeerreenncceess aa lliibbssoocckkeett ddaannss  XX1111__LLIIBB   eett  lliibbnnssll
  ddaannss ssrrcc//MMaakkeeffiillee..gglloobbaall??

  Ce fut un probleme dans la version 1.08 (elles sont specifiques a  Sun
  Solaris).  Cela a ete corrige dans 1.09 et 6.0

  4477..1144..  DDEEBBIIAANN OOuu ssee ttrroouuvvee lliibbtteerrmmccaapp??

  Le  Linux  de  Debian  est  livre sans bibliotheque termcap et utilise
  ncurses (qui a la place utilise terminfo). Il  n'y  a  pas  besoin  de
  modifier  la  variable  CURSES_LIB  dans src/bin/psql/Makefile puisque
  Debian fournit un lien de libncurses vers libcurses (a  la  difference
  de SuSE-Linux --- voir la Question 1.8).

  Vous pouvez avoir besoin d'editer src/bin/psql/Makefile et de changer:

  ifeq ($(PORTNAME), linux) LD_ADD+= -ltermcap  en:  ifeq  ($(PORTNAME),
  linux) LD_ADD+=

  4488..  FFAAQQ LLiinnuuxx--PPoossttggrreeSSQQLL -- CCoommppiillaattiioonn ddeess pprrooggrraammmmeess aacccceessssooiirreess

  4488..11..  LL''eeddiitteeuurr ddee lliieennss nn''aarrrriivvee ppaass aa ttrroouuvveerr lliibbXX1111 qquuaanndd oonn  ccoomm--
  ppiillee ppggttccllsshh

  Ajoutez ce qui suit a src/Makefile.custom X11_LIBDIR = /usr/X11R6/lib

  4499..  FFAAQQ LLiinnuuxx--PPoossttggrreeSSQQLL --  PPrroobblleemmeess dd''eexxeeccuuttiioonn

  4499..11..  JJ''aaii uunnee eerrrreeuurr  iinnddiiqquuaanntt  __ffUUnnKKyy__PPOOSSTTPPOORRTT__ssTTuuFFff__  nnoonn  ddeeffiinnii
  qquuaanndd jj''eexxeeccuuttee lleess ssccrriippttss tteellss qquuee ccrreeaatteeuusseerr

  C'est un bogue dans la V1.06-V1.07 de Postgres et il est corrige  dans
  la version V1.08 et au-dessus.

  4499..22..   JJee  llaannccee ppoossttmmaasstteerr eett eennssuuiittee llee ssyysstteemmee aaffffiicchhee ''BBaadd ssyysstteemm
  ccaallll((CCoorree         dduummppeedd))''

  Ceci  indique  que  vous  n'avez  pas compile le support de la memoire
  partagee dans votre noyau. Il vous faut recompiler le noyau  Linux  en
  incluant cette fonctionnalite.

  4499..33..   FFaaiilleedd AAsssseerrttiioonn((""!!((ffiillee !!== 00))  -- ((nnuullll))"",, FFiillee QQuuaanndd jj''eessssaaiiee
  ddee llaanncceerr llee PPoossttmmaasstteerr,, ppoouurrqquuooii aaii--jjee uunnee eerrrreeuurr ddee llaa ffoorrmmee

  Failed        Assertion("!(file       !=       0):(null)",       File:
  "/usr/local/PostgreSQL/src/backend/storage/file/fd.c",   Line:    257)
  !(file  !=  0)  (0) initdb: could not create template database initdb:
  cleaning up.

  Vos permissions sur le fichier /dev/null ne sont pas bonnes.

  ls -l /dev/null devrait vous donner quelque chose comme:

  crw-rw-rw-  1 root  wheel    2,   2 Oct  8 18:41 /dev/null

  Corrigez les permissions en utilisant :

  chmod a+rw /dev/null

  4499..44..  PPoouurrqquuooii ccrreeaatteeuusseerr nnee ffoonnccttiioonnnnee--tt--iill ppaass??

  Il y a un probleme avec la Version 2.5.3 de GNU flex et de createuser.
  Vos  options  sont de revenir a la version V2.5.2 de flex, d'appliquer
  une rustine a la version  V2.5.3  (fournie  dans  doc/README.flex)  ou
  d'attendre la version V2.5.4 qui corrigera ce bogue.

  4499..55..   IIppccMMeemmoorryyCCrreeaattee-- mmeemmKKeeyy==115555335566339966 ,, ssiizzee==776600663322 ,, PPoouurrqquuooii aaii--
  jjee uunnee eerrrreeuurr ccoommmmee

  permission=384IpcMemoryCreate:  shmget(...,  create,   ...)    failed:
  Invalid argument

  Vous  n'avez pas inclus le support IPC dans votre noyau Linux. Il vous
  faudra reconstruire le noyau et valider cette option.

  4499..66..  ppssqqll-- ccaann''tt llooaadd lliibbrraarryy ''lliibbppqq..ssoo..11'' PPoouurrqquuooii ppssqqll eecchhoouuee aavveecc

  Psql  a  ete  compile pour etre lie dynamiquement avec la bibliotheque
  libpq.

  Pour remedier a cela, vous devez vous connecter comme root  et  editer
  le fichier /etc/ld.so.conf Ajouter une simple ligne a la fin qui donne
  le nom du repertoire de la bibliotheque PostgreSQL (le sous-repertoire
  lib de votre installation pour PostgreSQL) et executer /sbin/ldconfig

  5500..  FFAAQQ IIRRIIXX--PPoossttggrreeSSQQLL -- CCoommppiillaattiioonn ddee PPoossttggrreeSSQQLL

  =====================================================     Foire    Aux
  Questions (FAQ)  for  PostgresSQL  V6.1  Specifique  IRIX  A  LIRE  EN
  PARALLELE            AVEC           LA           FAQ           NORMALE
  ===================================================== Derniere mise  a
  jour:      Vendredi 13 Juin 09:54:00 BST 1997

  Gestionnaire        actuel:             Andrew       C.R.       Martin
  (martin@biochem.ucl.ac.uk)  Auteur  original  author:     Andrew  C.R.
  Martin (martin@biochem.ucl.ac.uk)

  Modifications  dans  cette  version  (*  =  modifie,  + = nouveau, - =
  supprime): +1.5)   Puis-je installer PostgreSQL sous Irix 6.4?

  Ce fichier est divise approximativement comme suit :

  +o  1.*)    Installation de Postgres95

  +o  2.*)    Desinstallation de Postgres95

  +o  3.*)    Extension de Postgres95

  5511..  FFAAQQ--IIRRIIXX IInnssttaallllaattiioonn ddee PPoossttggrreess9955

  5511..11..  DDee qquueellss eelleemmeennttss ssuupppplleemmeennttaaiirreess aaii--jjee bbeessooiinn  ppoouurr  iinnssttaalllleerr
  PPoossttggrreess9955 ssoouuss IIrriixx??

  Vous *devez* avoir les elements suivants installes:

  +o  a) Gnu make (installe sous le nom gmake)

  Nous vous recommandons d'installer ce qui suit :

  +o  a) GNU install (installe sous le nom ginstall)

  Vous pouvez choisir d'installer :

  +o  a) La bibliotheque GNU readline (si vous desirez que  psql  ait  le
     support de readline).

  +o  b) Tcl/Tk (si vous souhaitez compiler pgtclsh)

  5511..22..   ssrrcc//MMaakkeeffiillee..ccuussttoomm??  QQuueelllleess mmooddiiffiiccaattiioonnss ddooiiss--jjee aappppoorrtteerr aa
  ssrrcc//MMaakkeeffiillee..gglloobbaall oouu

  La  maniere  la  plus  simple  de  faire cela est d'utiliser le script
  personnalise dans le repertoire src.

  Vous  *devez*  renseigner  les   variables   suivantes   :   PORTNAME=
  irix5

  Vous  aurez aussi besoin de changer ce qui suit pour s'adapter a votre
  propre installation : POSTGRESDIR

  Si vous activez l'option USE_TCL, vous  aurez  besoin  de  renseigner:
  TCL_INCDIR= TCL_LIBDIR= TCL_LIB = TK_INCDIR= TK_LIBDIR= TK_LIB =

  Vous  pouvez egalement faire toutes les autres modifications dont vous
  avez besoin comme  indique  dans  le  fichier  INSTALL  file  et  dans
  Makefile.global

  5511..33..   ssrrcc//MMaakkeeffiillee..gglloobbaall??  QQuuee ssoonntt lleess rreeffeerreenncceess aa lliibbssoocckkeett ddaannss
  XX1111__LLIIBB eett aa lliibbnnssll ddaannss

  Ce  fut un probleme dans la version 1.08 (elles sont specifiques a Sun
  Solaris).  Cela a ete corrige dans 1.09 et 6.0

  5511..44..  AArree tthheerree aannyy ootthheerr cchhaannggeess II sshhoouulldd mmaakkee??

  Si vous avez  installe  le  programme  GNU  install  (ginstall),  vous
  devriez    ajouter    la   ligne   suivante   a   src/Makefile.custom:
  CUSTOM_INSTALL=ginstall

  Pour une explication sur ce point, voir la Question 2.1

  5511..55..  PPuuiiss--jjee iinnssttaalllleerr PPoossttggrreeSSQQLL ssoouuss IIrriixx 66..44??

  Irix 6.4 a un bogue  dans  ld  qui  l'empeche  de  prendre  en  compte
  correctement  les adresses des procedures statiques quand les fichiers
  objets sont assembles en fichiers objets plus grands en utilisant  'ld
  -r'.  Ce bogue a ete rapporte a Silicon Graphics.  La rustine suivante
  peut etre appliquee pour le contourner.  (Fourni  par  Bob  Bruccoleri
  bruc@bms.com)

  ***   ./backend/Makefile.orig       Thu   May  22  00:00:15  1997  ---
  ./backend/Makefile  Thu Jun  5 16:47:27 1997 *************** *** 54,60
  ****    all:    postgres     $    (POSTGRES_IMP)    global1.bki.source
  local1_template1.bki.source

  postgres:  $ (OBJS) ../utils/version.o !        $ (CC) -o postgres   $
  (OBJS) ../utils/version.o  $ (LDFLAGS)

  $ (OBJS):  $ (DIRS:%=%.dir)

  ---  54,64  ----  all:  postgres   $ (POSTGRES_IMP) global1.bki.source
  local1_template1.bki.source

  postgres:  $ (OBJS) ../utils/version.o

       ! #      \*(dR (CC) -o postgres  \*(dR (OBJS) ../utils/version.o  \*(dR (LDFLAGS)
       !       -rm -f *.o
       !       find . -name "*.o" -exec cp (flower-brackets) . \;

  !       rm -f SUBSYS.o !        $ (CC) -o postgres  *.o  ../utils/ver-
  sion.o  $ (LDFLAGS)

  $ (OBJS):  $ (DIRS:%=%.dir)

  5522..  FFAAQQ--IIRRIIXX DDeessiinnssttaallllaattiioonn ddee PPoossttggrreess9955

  5522..11..  PPoouurrqquuooii nnee ppuuiiss--jjee ppaass ddeeppllaacceerr lleess ffiicchhiieerrss eexxeeccuuttaabblleess??

  Par defaut, le portage IRIX  utilise  la  version  compatible  BSD  du
  programme  install  de  /usr/bin/X11.  Si vous lisez la page de manuel
  pour cette version d'install, vous verrez que  son  utilisation  n'est
  pas  destinee  a  l'utilisateur  final;  il  possede  l'effet  de bord
  interessant de changer le proprietaire des fichiers qu'ils installe en
  root.

  Vous  devriez  encore  pouvoir  detruire  les  fichiers  puisque  vous
  (utilisateur postgres) etes proprietaire du repertoire dans lequel ils
  sont stockes.

  Le  programme  install  normal  de  IRIX  ne  peut  pas  etre  utilise
  facilement car il prend ses arguments en ordre inverse. De ce fait, on
  recommande  d'utiliser la version GNU du programme install (ginstall).
  Voir la Question 1.4

  5533..  FFAAQQ--IIRRIIXX EExxtteennddiinngg PPoossttggrreess9955

  5533..11..  PPoossttggrreess9955 CCoommmmeenntt ddooiiss--jjee ccoommppiilleerr uunn pprrooggrraammmmee CC  ppoouurr  ccrreeeerr
  uunnee ffoonnccttiioonn dd''eexxtteennssiioonn aa

  Voici une ligne de commande en exemple :

  cc                                    -I/usr/local/postgres95/include/
  -I/usr/local/postgres95/src/backend -shared -o funcs.so funcs.c

  5544..  FFAAQQ--IIRRIIXX PPoossttggrreeSSQQLL ccoonnttaacctt ddeess AAUUTTEEUURRSS

  Dr.  Andrew C.R. Martin                             University College
  Londres

  EMAIL: (Work) martin@biochem.ucl.ac.uk

  (Home) andrew@stagleys.demon.co.uk

  URL:    <http://www.biochem.ucl.ac.uk/~martin>

  Tel:   (Work) +44(0)171 419 3890

  Tel:    (Home) +44(0)1372 275775

  5555..  NNoottiiccee ddee CCooppyyrriigghhtt

  Copyright (c) 1997 Al Dev (Alavoor Vasudevan). Tous droits reserves.

  La permission d'utiliser, de copier, de modifier et de  distribuer  ce
  document, gratuitement, et sans accord ecrit est accordee, a condition
  que la notice de  copyright  ci-dessus,  ce  paragraphe  et  les  deux
  paragraphes   suivants  apparaissent  dans  toutes  les  copies.   Les
  marques, les compagnies et les noms de  produits  mentionnes  dans  ce
  document sont des marques de fabrique ou des marques deposees de leurs
  proprietaires  respectifs.  Veuillez  vous  referer  aux  notices   de
  copyright  individuelles de marques, compagnies et produits mentionnes
  dans ce document.

  Ce document est  delivre  "tel  quel"  et  l'auteur  n'apporte  aucune
  garantie explicite ou implicite.

  Le HOWTO ELF
  Daniel Barlow <daniel.barlow@linux.org>
  v1.29, 14 Juillet 1996

  Ce  document  explique comment modifier votre systeme Linux afin qu'il
  puisse compiler et executer les programmes au format  executable  ELF.
  Il se decompose en trois sous parties (1) ce qu'est ELF et les raisons
  qui vous pousseront a vous y mettre, (2) comment mettre a  jour  votre
  systeme  pour utiliser ELF et (3) ce qu'il vous sera alors possible de
  faire.

  11..  QQuu''eesstt--ccee qquuee EELLFF?? IInnttrroodduuccttiioonn..

  ELF (Executable and Linking Format) est un format de donnees  binaires
  originellement   developpe  par  USL  (UNIX  System  Laboratories)  et
  desormais utilise dans Solaris et dans le Systeme 5 Version 4. De  par
  sa  flexibilite  accrue  par rapport a l'ancien format a.out que Linux
  utilisait precedemment, les  developpeurs  de  GCC  et  de  librairies
  deciderent  l'an  dernier  de  se  mettre a ELF et d'ainsi modifier le
  format standard des fichiers binaires de Linux.

  Cette flexibilite accrue a en fait deux interets  essentiels  pour  le
  programmeur d'applications moyen :

  +o  Il est bien plus simple de faire des librairies partagees avec ELF.
     Usuellement, il suffit de compiler tous les  fichiers  objets  avec
     -fPIC et d'ensuite etablir les liens avec une commande telle que :

       gcc -shared -Wl,-soname,libfoo.so.y -o libfoo.so.y.x *.o

  Si  vous  trouvez cela complexe, c'est que vous n'avez visiblement pas
  eu affaire a la procedure equivalente pour  les  librairies  partagees
  avec  a.out  ou  il faut compiler la librairie par deux fois, en ayant
  reserve la place pour toutes les  donnees  dont  vous  pensez  que  la
  librairie  va  avoir  besoin  dans  le  futur  et  en ayant enregistre
  l'espace d'adressage aupres d'une tierce partie. Tout cela est  decrit
  dans     un     document     de     plus    de    20    pages    (voir
  <ftp://tsx-11.mit.edu/pub/linux/packages/GCC/src/tools-2.17.tar.gz>
  pour les details).

  +o  Il  est  egalement  plus simple de gerer le chargement dynamique en
     memoire  (c'est-a-dire  les  programmes  qui  peuvent  charger  des
     modules  au  moment  de  l'execution). Ceci est utilise par Perl 5,
     Python et  Java  (entre  autres).  D'autres  possibilites  pour  le
     chargement  dynamique  : des Donjons Multi-Utilisateurs (Multi User
     Dungeons) ou le code supplementaire pourrait etre compile et lie au
     programme  en  fonctionnement  sans  avoir  a  l'arreter  et  a  le
     relancer.

  Cependant, il faut prendre en compte qu'ELF est peut-etre un peu moins
  rapide.  Les chiffres les plus couramment cites font etat d'une baisse
  de performance de 1 a 5%, bien que les tests effectues jusqu'a present
  indiquent  que  la  difference  est suffisamment faible pour se perdre
  dans le bruit du autres evenements qui arrivent  au  meme  moment.  Si
  vous  avez  un  visualiseur ou un moyen d'imprimer des fichiers TeX ou
  PostScript, vous pourrez  lire  speed.comp-1.0.tar.gz  qui  se  trouve
  quelque part sur SunSite.

  Le  ralentissement  vient  du  fait  que  les codes des librairies ELF
  doivent etre independants de la position (c'est  ce  que  signifie  le
  commutateur -fPIC vu ci-dessus signifie) : un registre doit alors etre
  dedie pour la conservation des offsets. C'est un  de  moins  pour  les
  variables,  alors  que  les  80x86 ont deja une penurie de registres a
  usage  general.  Notez  bien  que  les  differences  de   vitesse   ne
  s'appliquent  qu'aux  parties  du  code qui font partie des librairies
  partagees. Pour  les  applications  ou  le  noyau,  il  n'y  a  aucune
  difference de vitesse entre a.out et ELF.

  11..11..  CCee qquu''EELLFF nn''eesstt ppaass

  Il y a bon nombre d'erreurs de commises quant a ce que ELF va apporter
  a votre systeme :

     CCee nn''eesstt ppaass uunn mmooyyeenn dd''eexxeeccuutteerr ddeess pprrooggrraammmmeess SSVVRR44 oouu SSoollaarriiss
        Bien que ce soit le meme conteneur binaire  que  celui  que  les
        systemes  SVR4 utilisent, cela n'implique pas que les programmes
        SVR4 vont soudainement se mettre a fonctionner sous Linux. Il en
        va  de meme que pour un format de disque - vous pouvez conserver
        des programmes Linux sur des disques au format MSDOS  ou  Minix,
        et  vice  versa,  mais  cela ne signifie pas pour autant que ces
        systemes seront alors en mesure d'executer  les  programmes  des
        autres.

        Il est possible d'executer une application prevue pour une autre
        implementation d'Unix pour des systemes  x86  sous  Linux  (cela
        depend  de  l'application)  mais  suivre  les instructions de ce
        HOWTO _n_'_a_u_r_a _p_a_s cet effet-la. Commencez par essayer  le  module
        iBCS du noyau (quelque part sur tsx-11.mit.edu) et voyez s'il ne
        satisfait pas vos besoins.

     CCee nn''eesstt ppaass iinnttrriinnsseeqquueemmeenntt pplluuss ccoommppaacctt oouu pplluuss rraappiiddee
        Vous  pouvez  tres  bien  vous  retrouver  avec   des   fichiers
        executables plus petits compte tenu du fait que vous pouvez plus
        aisement creer des librairies partagees  de  code  commun  a  de
        nombreux  programmes.  En  general,  si  vous utilisez les memes
        options de compilation et que vous obtenez des executables  plus
        petits qu'avec a.out, ce sera du soit a un coup de chance soit a
        une version differente du compilateur. Pour ce  qui  est  de  la
        mention  plus  rapide, j'en serais surpris. Des augmentations de
        performances peuvent apparaitre si  vos  fichier  compiles  sont
        plus  petits,  du  fait  de  la  baisse  des transferts avec des
        fichiers d'echange ou des domaines fonctionnels plus grands  qui
        rentrent dans le cache.

     IIll nn''eesstt ppaass nneecceessssaaiirree ddee rreemmppllaacceerr cchhaaccuunn ddeess eexxeeccuuttaabblleess ddee
        vvoottrree ssyysstteemmee
        A la fin  des  procedures  indiquees  ci-apres,  vous  aurez  un
        systeme  capable  de  compiler  et  d'executer  a  la  fois  des
        programmes a.out et ELF. Les nouveaux programmes seront compiles
        par  defaut  en  ELF  bien  que  cela  puisse  etre  modifie par
        l'intermediaire d'un commutateur sur la ligne  de  commande.  Il
        est  communement  admis qu'on encourt une perte de memoire quand
        on dispose d'un systeme a la fois a.out et ELF : ainsi, si  vous
        avez  les  deux sortes de programmes qui tournent en meme temps,
        il va s'en suivre deux copies de la meme librairie C en  memoire
        et  ainsi de suite. Cela dit, il semblerait que cette difference
        de vitesse est  imperceptible  en  utilisation  normale  sur  un
        systeme avec 8Mo (je n'en ai en tout cas pas remarque avec 8Mo).
        Vous perdez bien plus de memoire chaque jour quand vous utilisez
        des  programmes  gourmands  comme  Emacs!  !  !  !  !  !  ou les
        executables statiques de Mosaic ou de Netscape :-).

     RRiieenn aa vvooiirr aavveecc TToollkkiieenn
        Du moins pas dans ce contexte.

  11..22..  PPoouurrqquuooii ssee ccoonnvveerrttiirr aa EELLFF ??

  Il y a essentiellement deux raisons pour mettre a jour  votre  systeme
  pour  ELF,  la  premiere etant la flexibilite accrue decrite plus haut
  pour la programmation et la seconde etant que, au vu de  la  premiere,
  tout le monde le fera (ou l'a deja fait). Les dernieres versions de la
  librairie C et de GCC sont compilees seulement pour ELF et les  autres
  developpeurs se mettent egalement a ELF.

  Beaucoup de personnes ont pour souci la stabilite (ce qui est legitime
  bien que terre-a-terre). ELF a ete utilise sous Linux depuis Aout 1994
  et  a  ete publiquement disponible aux alentours de Mai ou Juin 1995 ;
  les problemes les plus graves ne sont plus  qu'un  lointain  souvenir.
  Vous devriez permettre quelques menus defauts -- comme avec toute mise
  a jour d'importance -  mais  la  technologie  a  laquelle  vous  allez
  adherer  n'est  plus experimentale. Pour un systeme sur lequel on fait
  un tant soit peu de developpement ou sur lequel vous avez  l'intention
  d'executer  les  programmes  precompiles  d'autres  personnes, ELF est
  presque devenu une necessite. Pensez a vous y mettre quand vous  ferez
  la mise a jour pour le noyau 2.0.

  11..33..  CCoommmmeenntt ssee ccoonnvveerrttiirr aa EELLFF

  Au  moment  ou  ce HOWTO fut originellement ecrit, il n'y avait qu'une
  seule maniere : celle decrite ci-dessous. De nos jours,  il  y  a  des
  distributions  de haute qualite faciles a mettre a jour -- a moins que
  vous n'ayez investi un temps certain a peaufiner la  configuration  de
  votre machine, vous trouverez certainement que faire une sauvegarde de
  vos donnees personnelles et reinstaller a  partir  d'une  distribution
  RedHat  ou  Debian est plus facile que de jouer avec les librairies et
  les compilateurs decrits ici.

  Je me dois d'insister. L'installation decrite ici est  un  travail  de
  plutot  faible  envergure  en elle-meme (elle peut etre faite en moins
  d'une heure, mis a part le temps de telechargement des logiciels) mais
  elle  peut  donner  lieu  a  de multiples erreurs qui risquent de vous
  laisser avec un systeme non bootable. Si vous ne vous sentez  pas  sur
  de vous dans la mise a jour des librairies partagees, si les commandes
  ldconfig et  ldd ne vous disent rien et si construire des paquetages a
  partir du code source ne vous enchante pas, vous devriez considerer la
  solution de facilite. Meme si la description ne vous  correspond  pas,
  pensez  y  tout  de  meme  : si vous voulez un systeme totalement ELF,
  _q_u_e_l_q_u_'_u_n va devoir en compiler tous les executables.

  Vous etes toujours la ?

  22..  IInnssttaallllaattiioonn

  22..11..  PPrreerreeqquuiiss

  Le but de cette mise a jour est de vous fournir un systeme qui  puisse
  compiler  et  executer  aussi  bien les programmes bases sur a.out que
  ELF, en s'assurant que  chaque  type  de  programme  soit  capable  de
  trouver la version appropriee des bibliotheques partagees. Il apparait
  aisement que cela demande plus de travail que simplement chercher dans
  /lib,  dans  /usr/lib  ou  n'importe  ou  ailleurs  selon le chemin de
  recherche indique dans la compilation, strategie dont certains  autres
  systemes se satisfont.

  Le travail necessaire est centralise au niveau d'un _c_h_a_r_g_e_u_r _d_y_n_a_m_i_q_u_e
  qui existe  en  un  seul,  ou  deux,  endroit  du  systeme.  Pour  les
  programmes  a.out,  il  est  appele /lib/ld.so et, pour les programmes
  ELF, on fait appel a /lib/ld-linux.so.1.  Le compilateur et  l'editeur
  de  liens  n'encodent  pas les chemins absolus des librairies dans les
  programmes qu'ils produisent ; ils fournissent en effet le nom  de  la
  librairie  et  son chemin absolu au chargeur dynamique approprie et se
  contentent de ca pour apparier le nom de  la  bibliotheque  au  chemin
  correspondant lors de l'execution. Cela a une consequence d'importance
  : les bibliotheques peuvent etre deplacees dans  d'autres  repertoires
  _s_a_n_s  _r_e_c_o_m_p_i_l_e_r  _l_e  _p_r_o_g_r_a_m_m_e  des  lors que ld.so (ou ld-linux.so.1
  selon le cas) a ete informe de chercher dans le nouveau repert!  !   !
  !   !  !  oire. C'est une fonctionnalite essentielle pour l'echange de
  repertoires qui va suivre.

  Le corollaire de ce qui precede  est  bien  sur  que  toute  tentative
  d'effacer  ou de deplacer ld.so ou ld-linux.so.1 pourrait provoquer _l_e
  _p_l_a_n_t_a_g_e _d_e _t_o_u_t _p_r_o_g_r_a_m_m_e _d_y_n_a_m_i_q_u_e_m_e_n_t _l_i_e  _s_u_r  _l_e  _s_y_s_t_e_m_e.  C'est
  generalement vu comme une Mauvaise Chose.

  Le  schema  general  est  alors  de  mettre  tout  ce  qui concerne le
  developpement   ELF   (compilateurs,   bibliotheques    et    fichiers
  d'inclusions) dans /usr/{bin,lib,include} et de mettre ce qui concerne
  a.out  dans  /usr/i486-linuxaout/{bin,  lib,  include}.   Le   fichier
  /etc/ld.so.conf  est  la liste de tous les endroits du systeme ou l'on
  s'attend a trouver les  bibliotheques  et  ldconfig  est  suffisamment
  malin pour distinguer les versions ELF des versions a.out.

  Il  y  a  neanmoins  quelques  exceptions  quant  au  placement  de la
  bibliotheque :

  +o  Certains vieux programmes ont ete compiles  sans  l'utilisation  de
     ld.so. Ceux-ci cesseraient alors de fonctionner si leurs librairies
     devaient etre deplacees. Ainsi libc.so* et libm.so* doivent  rester
     ou  ils  sont  dans  /lib  et les versions ELF ont vu leurs numeros
     majeurs mis a jour afin qu'ils n'ecrasent pas les  versions  a.out.
     Les vieilles bibliotheques X (avant la version 6) feraient mieux de
     rester ou elles  sont  alors  que  les  plus  recentes  (libX*so.6)
     doivent etre deplacees. Deplacer les anciennes bloquera xview et ne
     pas deplacer les nouvelles fera qu'elles seront  ecrasees  lors  de
     l'installation des bibliotheques ELF.

     Si   vous  avez  des  programmes  non  ld.so  qui  necessitent  des
     bibliotheques autre que celles citees ci-dessus (si vous  savez  de
     quels  programmes  il  s'agit, vous pouvez executer ldd sur ceux-ci
     afin de determiner quelles  bibliotheques  leurs  sont  necessaires
     _a_v_a_n_t de les bloquer), deux solutions s'offrent a vous. La premiere
     est d'extraire la librairie ELF dans un repertoire  temporaire,  de
     voir  si votre precieuse librairie va etre ecrasee et, si le cas se
     presente, de deplacer la  version  ELF  de  la  bibliotheque  dans,
     disons,  /usr/i486-linux/lib  en lieu et place de /lib.Assurez vous
     que ld.so.conf contient /usr/i486-linux/lib  et  executez  ldconfig
     puis n'y pensez plus. La seconde est de recompiler ou d'obtenir une
     nouvelle  version  du  programme  incrimine.  Cela  n'est  pas  une
     mauvaise idee, si c'est possibl!  !  !  !  !  !  e.

  +o  Si  vous  avez /usr et / sur des partitions differentes, toutes les
     bibliotheques que vous deplacerez  de  /lib  devront  se  retrouver
     autre part sur le disque racine et pas sur /usr. J'ai utilise /lib-
     aout pour les instructions qui suivent.

  22..22..  AAvvaanntt ddee ccoommmmeenncceerr :: nnootteess eett mmiisseess eenn ggaarrddeess

  +o  Il va vous falloir tourner sous un noyau posterieur au 1.1.52  aavveecc
     ssuuppppoorrtt ddeess ffiicchhiieerrss eexxeeccuuttaabblleess EELLFF. Le 1.2.13 ainsi que le 2.0.30
     font l'affaire ainsi que la plupart des noyaux de la serie 1.3 bien
     que  l'interet de tourner sous des anciens noyaux experimentaux est
     maintenant discutable avec l'arrivee du 2.0.

  +o  Il est recommande de se  munir  d'une  disquette  d'amorcage  Linux
     telle  que  la disquette de sauvetage de Slackware. Vous n'en aurez
     probablement pas besoin mais si vous n'en avez pas et que  vous  en
     ayez  besoin,  vous  serez  dans le petrin. Dans le meme esprit "il
     vaut mieux prevenir que guerir", des copies statiquement  liees  de
     mv,  ln ou d'autres commandes de manipulation de fichier pourraient
     vous aider a sortir des situations perilleuses dans lesquelles vous
     pourriez vous mettre.

  +o  Si  vous  avez  suivi le developpement de ELF depuis le debut ou si
     vous  avez  installe   certaines   versions   de   Slackware,   vos
     bibliotheques  ELF peuvent etre dans /lib/elf. Les applications que
     vous avez compilees avec celles-ci doivent etre  recompilees  avant
     d'effacer ce repertoire. /lib/elf n'est pas necessaire!

  +o  La  plupart  des installations Linux modernes se sont rejointes sur
     l'adoption du systeme de fichiers standard "FSSTND" mais il y en  a
     sans  nul doute quelques unes qui sont en retard. Si vous voyez des
     references  a  /sbin/_q_u_e_l_q_u_e  _c_h_o_s_e  et  que  vous  n'avez  pas  de
     repertoire  /sbin/,  vous  trouverez  probablement  le programme en
     question dans /bin ou /etc/. Ceci  est  particulierement  important
     quand  vous  installez  de  nouveaux  programmes: si /etc est place
     avant /sbin dans  le  chemin  de  recherche,  vous  obtiendrez  des
     erreurs parce que vous ferez appel aux anciennes versions alors que
     vous n'auriez pas du.

  +o  C'est une  bonne  idee  de  choisir  un  moment  ou  nul  n'utilise
     l'ordinateur  ou de le lancer en mode mono-utilisateur. Relancez-le
     d'une disquette d'amorcage de maniere a ne pas rester bloque,  meme
     si, pour ma part, j'aime bien jouer avec le feu...

  22..33..  NNoottiioonnss

  Tout  ce  qui  est decrit ci-apres par "sur tsx-11" peut etre trouve a
  <ftp://tsx-11.mit.edu/pub/linux/packages/GCC/>,
  <ftp://sunsite.unc.edu/pub/Linux/GCC/>, et d'autres sites miroir (NdT:
  comme   <ftp://ftp.lip6.fr/pub/linux/>  pour  la  France).    Veuillez
  consulter  le  site  miroir le plus proche de chez vous plutot que les
  sites generaux des que cela est possible. Cela  ira  plus  vite,  pour
  vous et pour les autres.

  Ces  paquetages  (que  ce  soit la version listee ou une plus recente)
  sont requis. Pensez egalement a telecharger les notes concernant votre
  version   pour   chacun   d'entre   eux:   elles   sont  de  la  forme
  release._n_o_m___d_u___p_a_q_u_e_t_a_g_e. Cela  est  particulierement  vrai  pour  les
  versions  plus recentes que celles presentees ici (l'installation a pu
  changer).

  Meme si vous avez pour habitude de compiler a partir des  sources,  je
  vous  recommande de prendre les versions binaires quand je l'indique a
  moins que vous n'ayez  _r_e_e_l_l_e_m_e_n_t  plus  besoin  de  vos  cheveux.  La
  plupart  d'entre  eux  ne  sont  pas prevus pour la compilation sur un
  systeme mixte et vous vous exposez a de graves ennuis si vous essayez.

  22..33..11..  LLeess eesssseennttiieellss

  +o  ld.so-1.7.14.tar.gz  --- le nouveau generateur de liens dynamiques.
     Il contient a la fois les sources et les versions compilees.  Notez
     que  la  version a venir necessitera une prise en charge d'ELF meme
     pour les executables a.out; si vous recuperez la version  1.8.1  ou
     plus  recente  en  lieu et place de la version mentionnee, verifiez
     que votre noyau a ete compile avec l'option support d'ELF _a_v_a_n_t  de
     l'installer.

  +o  libc-5.3.12.bin.tar.gz  ---  les  images  partagees  pour  ELF  des
     bibliotheques C et de maths, plus les bibliotheques correspondantes
     en  statique  et les fichiers include necessaires pour compiler les
     programmes. Si vous voulez le code source, preparez  vous  alors  a
     attendre pendant des heures pendant la compilation, si jamais il se
     compile (a moins que vous n'ayez deja un systeme ELF).

  +o  gcc-2.7.2.bin.tar.gz --- le paquetage  du  compilateur  C  ELF  qui
     comprend  egalement  un  compilateur C a.out qui tient compte de la
     nouvelle disposition des repertoires. Si vous vous voulez  compiler
     gcc  vous  meme  (ce que vous trouverez certainement plus simple si
     vous  utilisez   deja   ELF),   il   est   recommande   d'appliquer
     gcc-2.7.2-linux.diff.gz aux sources GNU avant de le faire.

  +o  binutils-2.6.0.12.bin.tar.gz  ---  les  utilitaires  GNU en version
     Linux. Ce sont des programmes tels que gas, ld, strings et ainsi de
     suite,  la  plupart  d'entre  eux  etant requis pour l'execution du
     compilateur C. Notez bien que les binutils GNU "vanilla" (a  savoir
     ceux  de  prep.ai.mit.edu)  ne sont pas un substitut acceptable. Si
     vous voulez reellment les  compiler  vous  meme,  faites  appel  au
     paquetage  modifie  pour Linux binutils-2.6.0.12.tar.gz plutot qu'a
     la version GNU.

  +o  ncurses-1.9.9e.tar.gz --- c'est une bibliotheque curses  compatible
     SVR4,   c'est   donc  la  bibliotheque  consideree  comme  standard
     concernant curses sous Linux. On peut en obtenir le code source sur
     des  sites GNU tels que  <ftp://prep.ai.mit.edu/gnu/> ou encore sur
     <ftp://ftp.netcom.com/pub/zm/zmbenhal>. Il y a  aussi  une  version
     compilee  du  paquetage sur tsx-11. Avant que vous installiez cela,
     vous  disposerez  d'un  systeme  de  developpement  ELF  pleinement
     fonctionnel,  je  vous  recommande donc le paquetage source si vous
     avez la moindre once de puissance pour la compilation.

  +o  gdbm-1.7.3.tar.gz est un ensemble de routines de base de donnes qui
     fait  appel  au hachage et qui fonctionne de maniere comparable aux
     routines dbm et ndbm standards d'UNIX. Le  source  est  recuperable
     sur   <ftp://prep.ai.mit.edu/gnu/>  et  vous  aurez besoin du patch
     <ftp://ftp.uk.linux.org/pub/Linux/libc/non-core/gdbm.patch> pour en
     obtenir  des  bibliotheques  partagees.  Le patch corrige egalement
     quelques petites choses (une  coquille  dans  le  Makefile  et  une
     predisposition  a  utiliser  une  mauvaise option de protection des
     fichiers).

  22..33..22..  AAuuttrreess

  Il y a d'autres bibliotheques et fichiers qui ne sont  pas  essentiels
  mais  que vous voudrez probablement avoir de toute facon. Cette  liste
  comporte seulement des paquetages qui necessitent d'etre  mis  a  jour
  pour  fonctionner  de maniere utile vis-a-vis d'ELF. Plus loin dans ce
  document, une nouvelle liste indique les programmes qui continueront a
  fonctionner  mais  qu'il vous faudra mettre a jour pour les recompiler
  en ELF.

  +o  Le paquetage ccoommppaattiibbiilliittee aa..oouutt : libc.so-4.7.6.   Il  est  marque
     optionnel parce que vos bibliotheques a.out existantes continueront
     a marcher avec vos executables actuels. Vous ne le prendrez que  si
     vous  considerez  de  continuer  a developper en a.out pour quelque
     raison que ce soit.

  +o  BBSSDD  ccuurrsseess.  Si  vous  trouvez  des  executables  qui  necessitent
     libcurses.so.1,  c'est l'ancienne version de la bibliotheque curses
     de BSD. Ils sont plutot rares, ce qui est plutot  une  bonne  chose
     car je ne peux pour l'instant pas mettre la main sur une version en
     code source de cette bibliotheque. Il est  probablement  preferable
     de  recompiler  de  tels  programmes  de maniere a fonctionner avec
     ncurses. Vous trouverez une version  compilee  de  libcurses.so  ds
     libc-5.0.9.bin.tar.gz sur les sites miroirs de tsx-11.

  +o  BBeerrkkeelleeyy  ddbb:  les  nouvelles  routines  BSD  4.4  libdb de base de
     donnees.        Le        source         est         telechargeable
     <ftp://ftp.cs.berkeley.edu/ucb/4bsd/db.1.85.tar.gz/>  et  le  patch
     pour    les    bibliotheques    partagees    sous     Linux     est
     <ftp://ftp.uk.linux.org/pub/Linux/libc/non-core/db.patch>.

  +o  CC++++:  le  paquetage  gcc  est  fourni  avec  g++,  mais  vous aurez
     egalement  besoin  de   libg++-2.7.1.4.bin.tar.gz   pour   compiler
     n'importe  quel programme C++ utile. Pour ma part, je n'utilise pas
     C++  mais je suis en mesure de comprendre qu'il n'est pas  aise  de
     compiler  cela a partir du code source d'ou la recommandation quant
     aux versions compilees.

  +o  tteerrmmccaapp ccoommppaattiibbllee GGNNUU. Le passage a  ncurses  ne  s'est  pas  fait
     simultanement  au  passage  a  ELF  -  vous  pourriez  avoir besoin
     d'executer des programmes d'autres personnes qui font appel a cette
     bibliotheque.  gdb  en est un bon exemple. Si vous avez l'intention
     de deboguer des bibliotheques partagees et que gdb est trouble  par
     celles  qui sont liees a elles-memes, vous voudrez certainement une
     copie statiquement liee de celle-ci. Dans ce  cas,  vous  trouverez
     qu'un  veritable termcap est bien moins encombrant que des routines
     compatibles termcap dans ncurses.

     termcap-2.0.8.tar.gz se trouve sur tsx-11.  Ce _n_'_e_s_t _p_a_s le Termcap
     GNU,   mais   il  lui  est  compatible  (les  differences  resident
     apparamment dans le controle des erreurs). C'est  un  paquetage  en
     version code source.

  +o  MMAAKKEEDDEEVV.   Dans  certaines implementations, cette utilitaire efface
     les entrees existantes des peripheriques pour les  recreer  par  la
     suite.  Cela  peut planter certaines versions de ld-linux.so.1 s'il
     efface  /dev/zero.  Une   nouvelle   version   est   disponible   a
     <ftp://sunsite.unc.edu/pub/Linux/system/Admin/MAKEDEV-C-1.5.tar.gz>
     ou
     <ftp://sunsite.unc.edu/pub/Linux/system/Admin/MAKEDEV-2.2.tar.gz>.

  +o  modules-2.0.0. Si vous utilisez des modules, la  mise  a  jour  des
     binutils   que   vous   allez  bientot  effectuer  va  empecher  le
     fonctionnement de tous les utilitaires de modules plus vieux que la
     1.3.69.  Les  nouvelles  versions des modules peuvent etre obtenues
     sur  <http://www.pi.se/blox/>.

  +o  Le systeme XX wwiinnddooww  comporte  un  grand  nombre  de  bibliotheques
     partagees.  Comme vos nouveaux programmes seront en ELF, et que les
     programmes ELF ne peuvent tirer  partie  des  bibliotheques  a.out,
     vous  allez  avoir  besoin d'une nouvelle installation de X si vous
     voulez faire un tant soit peu  de  developpement  sous  X.  XFree86
     3.1.2  est  diponible  sous les formats ELF et a.out. Allez par ftp
     sur ftp.xfree86.org, lisez le message "too  many  users"  que  vous
     n'allez  pas  manquer  de lire et choisissez le site miroir le plus
     proche  de  chez  vous.  Une  fois  que  vous  avez  recupere   les
     repertoires   common   et   elf,   vous   aurez   alors   a  editer
     /usr/X11R6/lib/X11/config/linux.cf   pour   modifier   les   lignes
     suivantes:

       #define LinuxElfDefault         NO
       #define UseElfFormat            NO

  en  mettant YES a la place. Autrement, une compilation de xpm conduira
  a utiliser les anciens utilitaires du passe. Notez que les executables
  de Xfree86 necessitent maintenant qu'une bibliotheque termcap partagee
  en ELF (libtermcap.so.2) soit installee.

  Si vous utilisez Motif, contactez votre fournisseur pour  savoir  s'il
  est  en  mesure de vous fournir des librairies partagees Motif en ELF.
  Ne l'utilisant pas, je ne vous suis d'aucune utilite a ce sujet.

  +o  Si vous passez a Linux 2.0 en meme temps que votre mise  a  jour  a
     ELF,  n'oubliez  pas  de consulter le fichier Documentation/Changes
     qui est fourni avec les sources du noyau pour  voir  de  quoi  vous
     aurez besoin par ailleurs.

  22..44..  RReeaarrrraannggeemmeenntt ddee vvoottrree ssyysstteemmee ddee ffiicchhiieerrss..

  Bien!  Pour  la  suite, veuillez noter que quand j'ecris "effacer", je
  veux dire "sauvegarder puis effacer" :-). Une bonne inspiration et  on
  y va...

  1.

      pprriimmoorrddiiaall ------ iinnssttaallllaattiioonn ddeess eexxeeccuuttaabblleess

  2. Creez les nouveaux repertoires dans lesquels vous allez deplacer ce
     qui concerne a.out

       mkdir -p /usr/i486-linuxaout/bin
       mkdir -p /usr/i486-linuxaout/include
       mkdir -p /usr/i486-linuxaout/lib
       mkdir /lib-aout

  3. Detarrez le paquetage de l'editeur de liens dynamique  ld.so-1.7.14
     dans  le  repertoire dans lequel vous mettez habituellement le code
     source et lisez de suite  le  script  ld.so-1.7.14/instldso.sh  qui
     vient  d'etre  decompresse.  Si  vous  avez  reellement  un systeme
     standard, lancez-le en tapant sh instldso.sh, mais si il y  a  quoi
     que ce soit d'anormal, installez-le a la main. Par anormal, je veux
     dire:

  +o  utiliser zsh comme shell (certaines  versions  de  zsh  definissent
     $VERSION, ce qui semble gener instldso.sh)

  +o  avoir  des liens symboliques de /lib/elf vers /lib (ce dont vous ne
     devriez pas avoir besoin mais c'est  une  bien  pietre  consolation
     quand vous etes a la recherche de votre disquette de sauvetage)

  4. Editez   /etc/ld.so.conf  pour  y  ajouter  le  nouveau  repertoire
     /usr/i486-linuxaout/lib  (et  /lib-aout  si  vous  allez  en  avoir
     besoin).   Relancez  ensuite  /sbin/ldconfig -v pour verifier qu'il
     prend en compte les nouveaux repertoires.

  5. Deplacez toutes les bibliotheques a.out dans /usr/lib et /usr/*/lib
     vers   /usr/i486-linuxaout/lib.    Notez   que   j'ai   ecrit   les
     bibliotheques et non pas tous les fichiers. Ce  sont  les  fichiers
     qui  correspondent  a  la  specification  lib*.so*  ,  lib*.sa*, ou
     lib*.a.  Ne commencez pas a deplacer par exemple  /usr/lib/gcc-lib.

  6. Regardez  maintenant  dans  /lib.  Laissez  tranquille les fichiers
     libc.so*,  libm.so*,  et  libdl.so*.  Si  vous  disposez  de  liens
     symboliques  vers  les  bibliotheques  X (libX*.so.3*), laissez-les
     egalement la car  Xview  et  d'autres  paquetages  en  ont  besoin.
     Laissez  les  fichiers  ld.so*,  ld-linux.so*  et  tous  les autres
     fichiers  commencant  par  ld.  Pour  ce   qui   est   des   autres
     bibliotheques  (s'il  en reste), si vous avez /usr sur la partition
     racine, mettez-les dans /usr/i486-linuxaout/lib. Si /usr est  monte
     separement,  mettez-les  dans /lib-aout. Lancez maintenant ldconfig
     -v.

  7. Effacez le repertoire /usr/lib/ldscripts s'il  existe,  en  vue  de
     l'installation des binutils (qui va le recreer)

  8. Effacez  toutes  les  copies de ld et de  as (_e_x_c_e_p_t_e ld86 et as86)
     que vous trouverez dans /usr/bin.

  9. Vous devez nettoyez votre arborescence /usr/include. Sur un systeme
     normal,  certains  des   fichiers  qui  se  trouvent  ici  sont des
     fonctionnalites de base  et  sont  fournis  avec  libc,  alors  que
     d'autres  proviennent  d'autres  paquetages que vous ou l'auteur de
     votre distribution avez installe. En  tenant  compte  de  cela,  je
     suggere que vous la reconstruisiez a partir de rien: renommez-la en
     /usr/include.old, et extractez libc-5.2.18.bin.tar.gz a  partir  du
     repertoire racine.

  10.
     Installez      le      paquetage      binutils.       tar     -xvzf
     binutils-2.6.0.12.bin.tar.gz -C /  est  une  bonne  maniere  de  le
     faire.

  11.
     Le  paquetage  gcc  doit  etre  extracte  a partir de la racine. Il
     installe quelques fichiers dans /usr/bin et bien plus  encore  dans
     /usr/lib/gcc-lib/i486-linux/2.7.2          et         /usr/lib/gcc-
     lib/i486-linuxaout/2.7.2. Tapez:

       $ tar ztf gcc-2.7.2.bin.tar.gz

  pour voir ce qu'il contient, sauvegardez tout ce qu'il va  ecraser  et
  que  vous  voudriez conseerver (par exemple, si vous avez installe Gnu
  ADA, vous voudrez conserver /usr/bin/gcc), et tapez juste:

  # tar -zxf gcc-2.7.2.bin.tar.gz -C /

  A cette etape, vous devriez etre en mesure d'executer  gcc  -v  et  de
  compiler des programmes tests. Essayez:

       $ gcc -v
       Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2/specs
       gcc version 2.7.2
       $ gcc -v -b i486-linuxaout
       Reading specs from /usr/lib/gcc-lib/i486-linuxaout/2.7.2/specs
       gcc version 2.7.2
       $ ld -V
       ld version 2.6 (with BFD 2.6.0.2)
         Supported emulations:
          elf_i386
          i386linux
          i386coff

  suivi  bien  sur  du programme traditionnel "Hello, world". Essayez-le
  avec gcc et avec gcc -b i486-linuxaout pour verifier que les  compila-
  teurs a.out et ELF sont bien configures.

  Termine?  Pas exactement. Les bibliotheques qui ne sont pas de base ne
  sont pas encore installees  et  de  nombreux  liens  symboliques  sont
  encore a etablir. Courage...

   LLiieennss ssyymmbboolliiqquueess

  12.
     Certains  programmes (notamment de nombreux programmes X) utilisent
     /lib/cpp,  qui  sous  Linux   est   generalement   un   lien   vers
     /usr/lib/gcc-lib/i486-linux/_v_e_r_s_i_o_n/cpp. Comme l'etape precedente a
     tres certainement  efface  la  version  de  cpp  vers  laquelle  il
     pointait, vous allez devoir recreer le lien:

       # cd /lib
       # ln -s /usr/lib/gcc-lib/i486-linux/2.7.2/cpp .

  13.
     Quand  vous  avez  deplace /usr/include vers /usr/include.old, vous
     avez perdu les liens  symboliques  a  l'interieur  des  sources  du
     noyau. Faites:

  # cd /usr/include
  # ln -s ../src/linux/include/linux .
  # ln -s ../src/linux/include/asm .

  (en considerant que vos sources du noyau sont dans /usr/src/linux).

  14.
     Les  gens de FSSTND se sont justifies de l'avoir garde en deplacant
     les fichiers utmp et wtmp de /var/adm  vers  /var/run  et  /var/log
     respectivement.  Vous  allez  devoir creer des liens en fonction de
     leurs emplacements et vous aurez peut-etre a creer les  repertoires
     /var/log  et /var/adm. Je reproduis ci-dessous le resultat de ls -l
     sur mon systeme:

       $ ls -ld /var/adm /var/log /var/run /var/log/*tmp /var/run/*tmp
       lrwxrwxrwx   1 root     root            3 May 24 05:53 /var/adm -> log/
       drwxr-xr-x   9 root     root         1024 Aug 13 23:17 /var/log/
       lrwxrwxrwx   1 root     root           11 Aug 13 23:17 /var/log/utmp -> ../run/utmp
       -rw-r--r--   1 root     root       451472 Aug 13 23:00 /var/log/wtmp
       drwxr-xr-x   2 root     root         1024 Aug 13 23:17 /var/run/
       -rw-r--r--   1 root     root          448 Aug 13 23:00 /var/run/utmp

  Consultez  FSSTND  (a  partir  des  archives  de  la  LDP  telles  que
  <ftp://sunsite.unc.edu/pub/Linux/docs/fsstnd/>) pour les details.

  RReejjoouuiisssseezz--vvoouuss!!

  A   cet   instant,   vous   devriez  disposer  d'un  environnement  de
  developpement  ELF  pleinement  fonctionnel  (enfin  plus  ou  moins).
  Relaxez vous et fetez cela pendant quelques minutes.

  PPaaqquueettaaggeess eesssseennttiieellss eenn ccooddee ssoouurrccee

  15.
     LL''  iinnssttaallllaattiioonn  ddee  nnccuurrsseess est un travail de longue haleine bien
     que vous puissiez  profiter  du  temps  de  compilation  pour  lire
     l'Usenet.  Apres avoir decompresse le fichier tar, lisez le fichier
     INSTALL en vous considerant comme "un constructeur de  distribution
     Linux  ou  de  paquetages", a savoir que vous allez probablement le
     configurer avec une commande du style

       $ ./configure --with-normal --with-shared --disable-termcap --enable-overwrite --prefix=/usr

  Prenez egalement garde aux commentaires qui concernent le type de ter-
  minal  par defaut: dans les noyaux 1.3 et 2.0, on le definit par linux
  au moment du boot mais vous aurez peut-etre a editer /etc/inittab pour
  eviter de le redefinir en tant que console par getty.
  Si  /usr/lib/terminfo  ne se trouve pas sur le disque racine (qui con-
  tient /), vous allez avoir  affaire  au  "support  du  fallback"  avec
  ncurses.  Ceci  est  documente  dans  le fichier INSTALL mentionne ci-
  dessus: c'est simple mais penible car vous allez  devoir  compiler  la
  bibliotheque  deux fois. Si le fait d'avoir linux et vt100 comme fall-
  backs ne vous derange pas, vous  pouvez  copier  fallback.c  que  vous
  trouverez   a    <ftp://ftp.uk.linux.org/pub/Linux/libc/non-core/fall-
  back.c> sur l'existant.

  Apres avoir  installe  ncurses,  vous  allez  devoir  bidouiller  dans
  /usr/lib  car il y fait des choses non optimales qu'il est plus simple
  de reparer a la main. Notez que les contradictions entre  les  numeros
  de  version,  bien  que  peu agreables, ne sont d'aucun danger pour la
  sante humaine.

     a. /usr/lib/libncurses.so.1.9.9e devrait etre deplace vers /lib  de
        maniere  a ce que les programmes curses qui fonctionnent en mode
        mono-utilisateur continuent a le faire. Si  /usr/lib  se  trouve
        sur  votre  partition racine, cela n'est pas necessaire bien que
        cela ne fasse pas de mal.

     b. Dans /lib, etablissez un lien vers  libncurses.so.1.9.9e  appele
        libncurses.so.3.0.

     c. Vous  aurez  egalement  besoin des liens /usr/lib/libncurses.so,
        /usr/lib/libcurses.so et /usr/lib/libtermcap.so qui doivent tous
        pointer vers /lib/libncurses.so.3.0.

  Pour resumer, cela donne:

       # cd /lib
       # mv /usr/lib/libncurses.so.1.9.9e .
       # ln -s libncurses.so.1.9.9e libncurses.so.3.0
       # cd /usr/lib
       # ln -s /lib/libncurses.so.3.0 libncurses.so
       # ln -s /lib/libncurses.so.3.0 libcurses.so
       # ln -s /lib/libncurses.so.3.0 libtermcap.so

  16.
     Installation   de   ggddbbmm.  Decompressez  le  code  source  dans  un
     repertoire de  code  source,  appliquez  le  patch  gdbm.patch,  et
     consultez les fichiers README et INSTALL.

     La procedure de compilation sera alors du genre:

  $ tar zxf gdbm-1.7.3.tar.gz
  $ patch -p0 < gdbm.patch
  $ cd gdbm-1.7.3
  $ ./configure --prefix=/usr
  $ make
  $ make progs
  $ su
  # make install
  # make install-compat
  # cd /usr/lib
  # ln -s libgdbm.so.1 libgdbm.so
  # ln -s libgdbm.so.1 libgdbm.so.2
  # ldconfig

  La derniere etape est pour la compatibilite ascendante: certaines dis-
  tributions utilisent  libgdbm.so.2  qui  contient  le  meme  code  que
  libgdbm.so.1 mais mal numerote pour des raisons historiques.

  PPaaqquueettaaggeess  ooppttiioonnnneellss  eenn  ccooddee  ssoouurrccee. En general, vous pouvez vous
  contenter de les installer en suivant les procedures qu'ils  indiquent
  que je ne vais donc pas repeter. Il y a toutefois deux exceptions:

  17.
     Si  vous voulez tteerrmmccaapp vveerrssiioonn GGNNUU (optionnel a strictement parler
     mais necessaire pour utiliser les  executables  XFree86),  il  doit
     etre  compile a partir du code source mais cela ne devrait pas etre
     plus complique que

       $ tar zxf termcap-2.0.8.tar.gz
       $ cd termcap-2.0.8
       $ make
       $ su
       # cp libtermcap.so.2.0.8 /usr/lib
       # ldconfig

  Je vous recommande de _n_e _p_a_s faire make install pour ne pas compromet-
  tre  l'installation anterieure de ncurses. Si vous avez besoin de com-
  piler des choses a partir de cette bibliotheque plutot que  simplement
  executer  des executables faits avec elle, pensez a placer en lieu sur
  les fichiers d'en-tete et les bibliotheques statiques  et  a  utiliser
  les  commutateurs  -I  et -L quand vous compilerez les choses en ques-
  tion. L'aspect vague de cette description  devrait  rendre  clair  que
  l'utilisation  de  termcap est deconseillee a moins que vous n'ayez de
  bonnes raisons.

  18.
     Pour libdb, c'est quelque chose du genre:

  $ tar zxf db.1.85.tar.gz
  $ patch -p0 <db.patch
  $ cd db.1.85/PORT/linux
  $ make
  $ su
  # mkdir /usr/include/db
  # ldconfig
  # cp libdb.so.1.85.3 /usr/lib ; ( cd /usr/lib && ln -s libdb.so.1 libdb.so )
  # cp ../../include/*.h /usr/include/db

  Veuillez noter

  +o  vous n'appliquez pas PORT/linux/OTHER_PATCHES car  il  est  contenu
     dans ce patch

  +o  vous   installez   les  fichiers  d'en-tete  autre  part  que  dans
     /usr/include --- il y  a  en  effet  conflit  avec  ceux  que  gdbm
     utilise.  Pour  compiler les programmes qui necessitent libdb, vous
     devrez  ajouter   -I/usr/include/db  a  la  ligne  de  commande  du
     compilateur C.

  22..55..  AA qquuooii cceellaa ddeevvrraaiitt rreesssseemmbblleerr ((lleess ggrraannddeess lliiggnneess ddee ll''aarrbboorreess--
  cceennccee ddeess rreeppeerrttooiirreess))

  Ceci  est  un guide deliberement vague qui indique en gros ce que sont
  les fichiers que vous venez d'installer. Cela peut etre utile dans  un
  contexte de depannage ou si vous decidez d'effacer quelque chose.

  22..55..11..
   //lliibb

  +o  L'editeur  dynamique  de liensld.so (a.out) et ld-linux.so.1 (ELF).
     Chacun d'entre eux peut etre un lien symbolique mais  verifiez  que
     les fichiers vers lesquels ils pointent existent.

  +o  Les bibliotheques partagees de base libc.so.4 et libm.so.4 (a.out).
     Ce sont des liens symboliques dont il faut verifier qu'ils pointent
     vers des fichiers reels.

  +o  Les   bibliotheques   partagees   de   base  libc.so.5,  libm.so.5,
     libdl.so.1,libncurses.so.1,libtermcap.so.2,  (ELF).    Encore   des
     liens symboliques, meme remarque que ci-dessus

  22..55..22..  //uussrr//lliibb

  +o  Tous  les  fichiers  qui  ne  sont  pas  des  bibliotheques  et les
     repertoires qui etaient la auparavant.

  +o  libbfd.so*,libdb.so*, libgdbm.so*: bibliotheques partagees ELF.

  +o  Encore des liens symboliques. Pour chacune des  bibliotheques  dans
     /lib ou /usr/lib, il devrait y avoir un lien symbolique ici. Le nom
     du lien devrait etre le veritable nom du  fichier  en  enlevant  le
     numero de version. Par exemple libc,

  lrwxrwxrwx   1 root     root           14 May  2 20:09 /lib/libc.so.5 -> libc.so.5.3.12
  -rwxr-xr-x   1 bin      bin        583795 Apr 25 06:15 /lib/libc.so.5.3.12
  lrwxrwxrwx   1 root     root           12 Oct 27  1995 /usr/lib/libc.so -> /lib/libc.so.5

  Ces liens sont utilises par ld au moment de l'edition des liens.

  +o  libbsd.a,  libgmon.a, libmcheck.a, libmcheck.a et un fichier lib*.a
     pour chacune des bibliotheques partagees ELF dans /lib et /usr/lib.
     Les  bibliotheques  ELF statiques. Celles qui sont l'equivalent des
     librairies partagees ne seront pas d'une  grande  utilite  pour  la
     plupart  des gens --- quand vous utilisez ELF, vous pouvez employer
     le commutateur gcc -g avec les bibliotheques partagees,  il  n'y  a
     donc  plus  de  raison  d'utiliser les versions statiques.  _V_o_u_s _e_n
     _a_u_r_e_z _b_e_s_o_i_n si vous voulez deboguer les bibliotheques elles-memes.

  +o  crt0.o,  gcrt0.o.   fichiers de "debut de programme" en a.out; l'un
     d'entre eux est lie en tant que premier fichier dans tout programme
     a.out  que  vous  compilez, a moins que vous ne vous arrangiez pour
     qu'il n'en soit pas ainsi.

  +o  crt1.o,  crtbegin.o,  crtbeginS.o,  crtend.o,  crtendS.o,   crti.o,
     crtn.o,  gcrt1.o.   Fichiers  de  demarrage  ELF.  Ils font la meme
     chose que les fichiers *crt0.o ci-dessus pour les programmes ELF.

  22..55..33..
   //uussrr//lliibb//llddssccrriippttss

  +o  C'est la que les scripts de gestionnaires de peripheriques pour  ld
     vont, comme le nom le suggere. Cela devrait ressembler a:

       $ ls /usr/lib/ldscripts/
       elf_i386.x      elf_i386.xs     i386coff.xn     i386linux.xbn
       elf_i386.xbn    elf_i386.xu     i386coff.xr     i386linux.xn
       elf_i386.xn     i386coff.x      i386coff.xu     i386linux.xr
       elf_i386.xr     i386coff.xbn    i386linux.x     i386linux.xu

  22..55..44..  //uussrr//ii448866--lliinnuuxx//bbiinn

  +o  ar, as, gasp, ld, nm, ranlib, strip.  Ce sont des liens symboliques
     vers les binutils reels de /usr/bin.

  22..55..55..  //uussrr//ii448866--lliinnuuxxaaoouutt//bbiinn

  +o  as --- l'assembleur a.out, and gasp, son preprocesseur de macro

  +o  ar, ld, nm, ranlib, strip --- liens symboliques vers  les  binutils
     reels de /usr/bin

  22..55..66..  //uussrr//ii448866--lliinnuuxx//lliibb

  +o  ldscripts est un lien symbolique vers /usr/lib/ldscripts.

  22..55..77..  //uussrr//ii448866--lliinnuuxxaaoouutt//lliibb

  +o  lib*.so*. Images de la bibliotheque partagee a.out. Necessaire pour
     executer des programmes a.out.

  +o  lib*.sa. Bases de la bibliotheque partagee a.out. Necessaires  pour
     compiler  les  programmes  a.out  qui  utilisent  des bibliotheques
     partagees. Si vous n'en avez  pas  l'intention,  vous  pouvez  sans
     probleme les effacer.

  +o  lib*.a.  Bibliotheques  statiques  a.out. Necessaires pour compiler
     les programmes statiques a.out (a savoir quand vous  compilez  avec
     -g).  Vous  pouvez aussi les effacer si vous n'avez pas l'intention
     de compiler de tels programmes.

  +o  ldscripts est un lien symbolique vers /usr/lib/ldscripts

  22..55..88..  //uussrr//lliibb//ggcccc--lliibb//ii448866--lliinnuuxx//22..77..22

  +o  Ce repertoire contient une version de  gcc  2.7.2  configuree  pour
     compiler les programmes ELF.

  22..55..99..  //uussrr//lliibb//ggcccc--lliibb//ii448866--lliinnuuxxaaoouutt//22..77..22

  +o  Ce  repertoire  contient  une  version de gcc 2.7.2 configuree pour
     compiler les programmes a.out  qui  tient  compte  de  la  nouvelle
     arborescence  de  repertoires.   Si  vous n'avez pas l'intention de
     compiler quoi que ce  soit  en  a.out,  l'effacer  devrait  liberer
     environ  4Mo.  Notez  que  vous  devez les conserver si vous voulez
     compiler des noyaux 1.2 non-patches.

  22..66..  EErrrreeuurrss ccoommmmuunneess ------ NNee ppaanniiqquueezz ppaass!!

  +o  Vous avez deplace la mauvaise chose  et  maintenant  plus  rien  ne
     fonctionne

     Votre  shell tourne toujours et en vous donnant un peu de mal, vous
     pouvez faire  beaucoup  avec  les  commandes  integrees  du  shell.
     Souvenez  vous  que  echo  *  remplace  tres  bien  ls, et que echo
     >>filename peut etre utilise pour ajouter des lignes a un  fichier.
     N'oubliez  pas  non plus que ldconfig est lie statiquement. Si vous
     avez deplace, par exemple,  libc.so.4 vers  /lib-aout  par  erreur,
     vous  pouvez faire echo "lib-aout" >>/etc/ld.so.conf ; ldconfig -v/
     et vous retrouver sur vos pieds. Si vous avez  deplace  /lib/ld.so,
     vous  pourrez  surement faire sln /silly/place/ld.so /lib/ld.so, si
     ln est lie statiquement, et une fois de plus vous retrouver sur vos
     pieds.

  +o   bad address

     quand vous essayez d'executer quoi que ce soit d'ELF. Vous utilisez
     un noyau 1.3._x, ou _x<3. Arretez tout de suite. Ce sont probablement
     les  noyaux les plus bogues de la planete. Passez au 2.0 ou revenez
     au 1.2.13.  Certaines personnes  font  egalement  etat  de  "kernel
     panics" dans des circonstances similaires; je ne me suis pas penche
     sur la question principalement parce que je ne vois pas de  raisons
     d'utiliser  les  noyaux  de  developpement  sans suivre les mises a
     jour.

  +o   gcc: installation problem, cannot exec _q_u_e_l_q_u_e _c_h_o_s_e: No such file
     or directory

     quand  vous  essayez de faire des compilations a.out (_q_u_e_l_q_u_e _c_h_o_s_e
     est generalement cpp ou cc1). Ou bien cela est vrai  ou  bien  vous
     avez tape

       $ gcc -b -i486-linuxaout

  quand vous auriez du taper

       $ gcc -b i486-linuxaout

  Le "i486" ne commence _p_a_s par un tiret.

  +o  make: *** No targets specified and no makefile found.  Stop.

     indique  que  vous n'avez pas patche ou recompile make, ou que vous
     en avez toujours une vieille version quelque part sur le systeme.

  +o   no such file or directory: /usr/bin/gcc

     (ou n'importe quel autre fichier que vous essayez d'executer) quand
     vous  _s_a_v_e_z  qu'un  tel fichier existe. Cela veut generalement dire
     que le chargeur dynamique ELF /lib/ld-linux.so.1 n'est pas installe
     ou  est illisible pour une raison ou pour une autre. Vous auriez du
     l'installer anterieurement, aux alentours de l'etape 2.

  +o   not a ZMAGIC file, skipping

     selon ldconfig. Vous avez une vieille version du  paquetage  ld.so,
     donc recuperez-en une plus recente. Voir etape 2 de l'installation.

  +o   _setutent: Can't open utmp file

     Ce message apparait souvent en groupe de trois quand vous lancez un
     xterm.  Veuillez  consulter  la  tirade  sur FSSTND vers la fin des
     instructions d'installation.

  33..  CCoommppiillaattiioonn ddeess pprrooggrraammmmeess

  33..11..  PPrrooggrraammmmeess oorrddiinnaaiirreess

  Pour compiler un programme en ELF, utilisez gcc comme  toujours.  Pour
  compiler en a.out, utilisez gcc -b i486-linuxaout .
       $ cat >hello.c
       main() { printf("hello, world\n"); }
       ^D
       $ gcc -o hello hello.c
       $ file hello
       hello: ELF 32-bit LSB executable i386 (386 and up) Version 1
       $ ./hello
       hello, world

  Le  moment  est  peut-etre venu de repondre a la question "si l'option
  par defaut des compilateurs a.out est de produire un programme  appele
  a.out,  quel  nom  un  compilateur  ELF  donne-t-il  en sortie?''.  La
  reponse est toujours a.out.

  33..22..  CCoommppiillaattiioonn ddeess bbiibblliiootthheeqquueess

  Pour compiler libfoo.so  en  une  bibliotheque  partagee,  les  etapes
  fondamentales sont du genre:

       $ gcc -fPIC -c *.c
       $ gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 *.o
       $ ln -s libfoo.so.1.0 libfoo.so.1
       $ ln -s libfoo.so.1 libfoo.so
       $ export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH

  Cela  generera une bibliotheque partagee appelee libfoo.so.1.0, et les
  liens appropries pour que ld (libfoo.so)  et  l'editeur  dynamique  de
  liens  (libfoo.so.1)  la  trouvent. Comme test, ajoutons le repertoire
  courant a LD_LIBRARY_PATH.

  Quand vous etes satisfaits du fonctionnement de la bibliotheque,  vous
  pourrez  la  deplacer  vers /usr/local/lib par exemple, et recreer les
  liens appropries.  Notez que le lien libfoo.so  devrait  pointer  vers
  libfoo.so.1,  ainsi  n'est-il  pas  necessaire  de  le mettre a jour a
  chaque changement du numero mineur de version. Le lien de  libfoo.so.1
  vers  libfoo.so.1.0  est  garde a jour par ldconfig que la plupart des
  systemes executent lors du processus d'amorcage.

       $ su
       # cp libfoo.so.1.0 /usr/local/lib
       # /sbin/ldconfig
       # ( cd /usr/local/lib ; ln -s libfoo.so.1 libfoo.so )

  33..33..  CCoommppiilleerr eenn aa..oouutt

  Vous pourriez avoir besoin de continuer a compiler des programmes dans
  l'ancien  format  a.out. Pour les programmes normaux, tout ce que vous
  avez a faire pour utiliser  le  compilateur  a.out  est  de  specifier
  l'option  -b i486-linuxaout quand vous appellerez gcc, et -m i386linux
  quand (si) vous appellerez ld. Si vous  devez  toujours  compiler  des
  bibliotheques  partagees DLL a.out, vous avez toute ma sympathie. A ce
  que j'en sais, la reponse la plus courte est que cela ne  marche  pas.
  Envoyez-moi un mail si vous pensez differemment.

  44..  PPaattcchheess eett eexxeeccuuttaabblleess

  Arrive  a ce point, vous pouvez, si vous le voulez, vous arreter. Vous
  avez installe tout ce  qui  est  necessaire  a  la  compilation  et  a
  l'execution de programmes ELF.

  Vous  pourriez cependant vouloir recompiler des programmes en ELF, que
  ce soit par amour du travail bien fait ou pour minimiser l'usage de la
  memoire.  Pour  la  plupart des applications destinees a l'utilisateur
  final, c'est plutot simple. Cependant certains paquetages se  reposent
  trop sur le systeme sur lequel ils tournent et pourraient planter pour
  l'une ou plusieurs des raisons qui suivent:

  +o  Conventions differentes pour  le  soulignement  dans  l'assembleur:
     dans  un executable a.out, les labels externes recoivent le prefixe
     _; pas en ELF. Cela ne fait pas de  difference  a  moins  que  vous
     n'integriez  des  instructions assembleur ecrites a la main: toutes
     les etiquettes de la forme _foo doivent etre traduites en  foo,  ou
     (si  vous  voulez  conserver  la  portabilite)  en EXTERNAL(foo) ou
     EXTERNAL est une macro qui retourne soit son argument  (si  __ELF__
     est  defini)  soit  _  concatene  avec  son  argument  dans  le cas
     contraire.

  +o  Differences de libc 5 par rapport a libc  4.  L'interface  pour  le
     support local a change, pour une fois.

  +o  L'application  ou le processus de compilation selon la connaissance
     du format binaire utilise --- emacs, par exemple, ecrit l'image  de
     sa memoire sur le disque sous format binaire, vous avez donc besoin
     de savoir quel format vos fichiers compiles utilisent.

  +o  L'application est ou comprend des bibliotheques partagees  (X11  en
     est  un  exemple  trivial). Il faudra de maniere evidente faire des
     modifications pour adapter les differentes methodes de creation  de
     bibliotheques partagees en ELF.

  Voici  maintenant deux listes: la premiere presente les programmes qui
  necessitaient des modifications pour pouvoir etre  compiles  sous  ELF
  (c'est-a-dire  dont  vous  devez  obtenir  une  nouvelle  version pour
  pouvoir les compiler en ELF) et la seconde comporte des programmes qui
  necessitent toujours des patches exterieurs.

  44..11..  MMiissee aa jjoouurr::

  +o  DDoosseemmuu.  Maintenant, dosemu tourne avec ELF. Les versions actuelles
     de          dosemu          sont          disponibles           sur
     <ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/>

  +o  ee22ffssuuttiillss.   Les  utilitaires  pour  e2fs  versions 0.5c et plus se
     compilent sans modifications en ELF.

  +o  EEmmaaccss. Il y a potentiellement  deux  problemes:  (i)  Emacs  a  une
     maniere  tout  a fait particuliere de se construire, a savoir qu'il
     faut en executer une version minimale, charger toutes  les  parties
     utiles  en  tant  que  lisp, et ecrire l'image de sa memoire sur le
     disque en tant que fichier binaire. (FSF)  Emacs  19.29  et  XEmacs
     19.12  (anciennement  Lucid  Emacs)  peuvent tous deux detecter que
     vous compilez en ELF et s'y adapter automatiquement.  (ii) Si  vous
     compilez  une  version de emacs sous ncurses, cela va rater a moins
     que vous n'editiez au prealable src/s/linux.h dans la  distribution
     emacs pour y ajouter la ligne #define TERMINFO quelque part pres du
     debut. Cela n'est pas necessaire pour la version 19.31  mais  l'est
     pour  la  version  XEmacs 19.13. Il semblerait que cela soit repare
     dans la 19.14.

  +o  ggddbb 44..1166. Votre copie actuelle de  gdb  continuera  de  fonctionner
     comme par le passe mais le support de la bibliotheque partagee dans
     la 4.16 est  bien  meilleur,  donc  si  vous  voulez  deboguer  des
     programmes  qui manipulent bizarrement cette zone, c'est une mise a
     jour qui vaut le coup.

  +o  LLee NNooyyaauu. Les versions 2.0 du noyau (ou plus recentes) fonctionnent
     a  merveille  avec  ELF;  vous  devez  repondre "yes" a chacune des
     questions:

       Kernel support for ELF binaries (CONFIG_BINFMT_ELF) [Y/m/n/?]
       Compile kernel as ELF - if your GCC is ELF-GCC (CONFIG_KERNEL_ELF) [Y/n/?]

  quand vous executez make config (c'est egalement valable pour la  plu-
  part  des  noyaux  de  la  serie 1.3). Si vous utilisez encore le 1.2,
  veuillez consulter la liste qui suit.

  +o  ppeerrll 55.  Perl 5.001m et + se compilent  sans  modification  sur  un
     systeme   ELF  complet  avec  chargement  dynamique.  Les  versions
     actuelles de Perl  peuvent etre obtenues sur le CPAN (Comprehensive
     Perl               Archive              Network):              voir
     <ftp://ftp.funet.fi/pub/mirrors/perl/CPAN> pour  le  site  le  plus
     proche de chez vous.

  +o  ppss  et  ttoopp.  Procps 0.98 et + marcheront avec ELF (les precedentes
     versions aussi mais elles ne sont pas en mesure de lire  les  WCHAN
     si  vous en avez besoin). Prenez en consideration que les noyaux de
     la serie 2.0 ont de toute maniere besoin de procps 0.99a ou plus.

  +o  Le programme cal dans uuttiill--lliinnuuxx 22..22 ne fonctionne  pas.  Passez  a
     version 2.5 <ftp://tsx-11.mit.edu/pub/linux/packages/utils> ou plus
     recent.

  +o  MMoossaaiicc. Je ne suis pas en mesure de le compiler par  moi-meme  mais
     l'executable  Mosaic  2.7b1  est  disponible par l'intermediaire de
     NCSA en ELF. Il a ete lie sous une configuration  X  etrange,  avec
     pour  resultat  sur  les  systemes normaux qu'il dit ne pas trouver
     libXpm.so.4.5.  Une maniere simple de reparer cela est de  l'editer
     avec precaution avec emacs ou une autre editeur qui prend en charge
     les  fichiers  executables.  Cherchez  l'occurrence  de  la  chaine
     libXpm.so.4.5^@  (ou  ^@  est  un  zero  ASCII --- caractere NUL)),
     effacez le .5 et ajoutez deux caracteres de plus apres le NUL  pour
     ne pas modifier la longueur du fichier.

  44..22..  PPaattcchh

  +o  ffiillee.  Il  fonctionne  de  toute  maniere  mais peut etre ameliore:
     <ftp://ftp.uk.linux.org/pub/Linux/libc/non-core/file.patch>.

  +o  make-3.74 --- soit vous recuperez le code source sur un site GNU et
     appliquez  le patch qui accompagne libc-5.3.12, soit vous recuperez
     l'executable make-3.74.gz sur tsx-11. Il y a un bogue dans le  make
     de  GNU  qui  ne se manifeste qu'avec les nouvelles versions ELF de
     libc --- cela vient en fait d'un bogue dans les anciennes  versions
     de  la  libc  de  GNU,  qui  etait aussi present dans la libc Linux
     jusqu'a peu. Si vous conservez votre vieux programme make en a.out,
     il continuera de fonctionner mais si vous en voulez une version ELF
     il vous faut le patch.

     Les developpeurs GNU de Make sont au courant du bogue et  devraient
     un jour sortir une version corrigee.

  +o  LLee nnooyyaauu 11..22..xx . 3 options s'offrent a vous:

     1. patcher   legerement  le  Makefile  de  maniere  a  utiliser  le
        compilateur a.out.  cd /usr/src/linux/, coupez le patch qui suit
        et  mettez-le  dans  patch  -p1.  Ou  encore  editez le Makefile
        manuellement  en  utilisant  ce  qui  suit  comme  guide;  c'est
        suffisamment  clair  (effacez  les  lignes  comportant  un  - et
        rajoutez les ligne avec un +.

          diff -u linux-1.2.13/Makefile.orig linux/Makefile
          --- linux-1.2.13/Makefile.orig  Wed Aug 16 20:53:26 1995
          +++ linux/Makefile      Fri Dec  8 16:19:49 1995
          @@ -12,9 +12,9 @@
           TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)

          -AS     =as
          -LD     =ld
          -HOSTCC =gcc -I$(TOPDIR)/include
          -CC     =gcc -D__KERNEL__ -I$(TOPDIR)/include
          +AS     =/usr/i486-linuxaout/bin/as
          +LD     =ld  -m i386linux
          +HOSTCC =gcc -b i486-linuxaout -I$(TOPDIR)/include
          +CC     =gcc -b i486-linuxaout -D__KERNEL__ -I$(TOPDIR)/include
           MAKE   =make
           CPP    =$(CC) -E
           AR     =ar

     Autrement,

     2. Appliquez le patch de H J Luqui permet de compiler le  noyau  en
        ELF  (et  ajoute  egalement  comme possibilite de faire des core
        dumps      ELF).      On      peut      le       trouver       a
        <ftp://ftp.cdrom.com/pub/linux/slackware_source/kernel-
        source/v1.2/linuxelf-1.2.13.diff.gz>.

        Si vous utilisez une distribution ELF (RedHat 2.1, Slackware  3)
        qui est fournie avec un noyau de la serie 1.2, vous vous rendrez
        certainement compte que ce patch ou un qui lui est  similaire  a
        deja ete applique.

        La meilleure idee est cependant de probablement

     3. Passer  a la 2.0!  1.2 n'a jamais ete prevu pour ELF apres tout.

     Un autre probleme va se poser pour la compilation  du  1.2.13  avec
     gcc  2.7.2  et superieur; il y avait un bogue dans asm/io.h qui est
     seulement detecte par gcc 2.7.2. Vous devez  vous  munir  du  patch
     <ftp://ftp.uk.linux.org/pub/Linux/libc/misc/io.h>.

  55..  IInnffoorrmmaattiioonnss ccoommpplleemmeennttaaiirreess

  +o  GCC-HOWTO  <GCC-HOWTO.html> comporte un grand nombre d'informations
     utiles quant au developpement de Linux (c'est du moins  ce  que  je
     pense,  j'en  suis le regisseur). Il devrait pouvoir etre obtenu au
     meme endroit que la ou vous avez trouve ce HOWTO, c'est pourquoi le
     lien ci-dessus est un lien relatif.

  +o  La  liste  de  diffusion  linux-gcc (qui est egalement le newsgroup
     linux.dev.gcc, si vous avez un  filtre  de  news  linux.*)  est  le
     meilleur  endroit pour se tenir au courant de ce qui se passe, meme
     sans y poster. N'oubliez pas que ce n'est pas  Usenet:  gardez  vos
     questions a moins que vous ne fassiez du developpement. Pour savoir
     comment rejoindre cette liste  de  diffusion,  envoyez  un  message
     contenant le mot help a majordomo@vger.rutgers.edu. Les archives de
     cette liste sont dans  <http://www.linux.ncm.com/linux-gcc/>.

  +o  Il y a une certaine masse d'information  relative  a  ce  que  fait
     cette   liste   de   diffusion   a  l'adresse  linux-gcc  web  page
     <http://ftp.uk.linux.org/~barlow/linux/gcc-list.html>,   quand   je
     pense  a  la mettre a jour. Vous y trouverez egalement un lien vers
     la derniere version de ce  HOWTO  et  les  patches  auquels  il  se
     refere. Pour les personnes des USA et ceux qui ont de mauvais acces
     sur les sites universitaires de Grande-Bretagne (a savoir quiconque
     est   en   dehors   de   l'universite),   il   y   a  un  miroir  a
     <http://www.blackdown.org/elf/elf.html>

  +o  D'autres documents sur  le  format  de  fichiers  sont  sur  tsx-11
     <ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ELF.doc.tar.gz>.    Ce
     sera probablement d'une  grande  utilite  pour  les  personnes  qui
     veulent  comprendre,  deboguer  ou bien reecrire des programmes qui
     ont directement a voir avec des objets executables.

  +o  Le document de H  J  Lu  ELF:  From  The  Programmer's  Perspective
     <ftp://tsx-11.mit.edu/pub/linux/packages/GCC/elf.latex.tar.gz>
     contient  un  grand  nombre  d'informations  tres  utiles  et  plus
     detaillees quant a la programmation avec ELF. Si vous n'avez pas de
     capacites LaTeX, il existe egalement au format PostScript.

  +o  Des informations sur la bibliotheque nnccuurrsseess et la base de  donnees
     terminfosont  disponibles  sur Eric Raymond's ncurses resource page
     <http://www.ccil.org/~esr/ncurses.html>.

  +o  Une page de manuel traite de dlopen(3) et des fonctions afferentes,
     elle est fournie avec le paquetage ld.so.

  66..  GGeenneerraalliitteess

  66..11..  CCoommmmeenntt mmee ccoonnttaacctteerr

  Envoyez  moi  un  mail a daniel.barlow@linux.org.  Ma cle publique PGP
  (ID     5F263625)     se     trouve     sur     mes     pages      web
  <http://ftp.uk.linux.org/~barlow/>, si vous tenez a confidentialite.

  Pour  toute question auquel ce document aurait du repondre mais ne l'a
  pas fait, ecrivez moi. Si vous avez une question qui n'a pas sa  place
  ici  mais  dont vous pensez que j'en possede la reponse, veuillez tout
  d'abord la poster  sur  le  newsgroup  comp.os.linux.*  approprie;  je
  reponds generalement au mail mais il m'est arrive d'oublier.

  Quiconque   s'autoriserait  a  me  rajouter  a  des  listes  d'adresse
  publicitaires s'expose a de graves consequences.
  66..22..  TTrraadduuccttiioonnss

  Si vous desirez traduire ce document, faites-le mais parlez m'en!  Les
  chances  que  je parle la langue dans laquelle vous voulez le traduire
  sont tristement faibles mais cela mis a part, je serai heureux de vous
  aider de quelque maniere que ce soit.

  Les traductions dont j'ai connaissance sont:

  +o  Italian  <http://www.psico.unipd.it/ildp/docs/HOWTO/ELF-HOWTO.html>
     par Favro Renata.  (d'autres HOWTOs sont disponibles en italien sur
     <http://www.psico.unipd.it/ildp/docs/HOWTO/INDEX.html>.

  +o  Kojima  Mitsuhiro  a  fait une traduction japonaise, disponible sur
     <http://jf.gee.kyoto-u.ac.jp/JF/index.html>.

  +o  Traduction de Pierre Tane  <ftp://ftp.lip6.fr/pub/linux/french>

  66..33..  NNoottiioonnss lleeggaalleess

  Toutes  les  marques  deposees  mentionnees  dans  ce  document   sont
  reconnues comme etant la propriete de leurs auteurs respectifs.

  Le  droit de Daniel Barlow a etre reconnu comme l'auteur de ce texte a
  ete certifie en accord avec les sections 77 et 78 du Copyright Designs
  and Patents Act 1988.

  (C)   1996   Daniel  Barlow  <daniel.barlow@linux.org>  Il  peut  etre
  reproduit et distribue en entier ou en morceaux, que  le  medium  soit
  physique  ou  electronique,  tant que l'avertissement de copyright est
  conserve dans chacune des copies. La  redistribution  commerciale  est
  permise  et  encouragee;  cependant,  l'auteur  voudrait  etre tenu au
  courant de telles distributions.

  Toutes les traductions, travaux  derives  ou  travaux  de  compilation
  incorporant  n'importe  lequel des documents HOWTO  Linux tombent sous
  le coup de cette notification de copyright.  Ainsi, vous ne pouvez pas
  produire  un  travail  derive  d'un  HOWTO et imposer des restrictions
  additionnelles quant a sa  diffusion.  Des  exceptions  a  ces  regles
  peuvent  etre  accordees sous certaines conditions; veuillez contacter
  le coordinateur des Linux HOWTOs a l'adresse donnee plus bas.

  En resume, nous voulons promouvoir la diffusion de ces informations  a
  travers  le  plus  grand  nombre  de  canaux possible. Cependant, nous
  souhaitons  conserver  le  copyright  sur  les  documents  HOWTO,   et
  voudrions etre notifies de tout projet de redistribution des HOWTOs.

  Si  vous  avez  des questions, contactez Greg Hankins, le coordinateur
  des Linux HOWTOs, a gregh@sunsite.unc.edu.

  Linux HAM-HOWTO, Radio Amateur
  Terry   Dawson,   VK2KTJ,  terryd@perf.no.itg.telstra.com.au
  Adaptation  francaise  :  Vahagn  Donabedian,  F1ICI,  vdon-
  abed@stdin.gatelink.fr.net (pour la version v1.5) et Jacques
  Chion, F6CWO, Jacques.Chion@wanadoo.fr.
  v2.3 1 Avril 1997

  Ceci est une liste qui aidera, j'espere, les Radioamateurs  a  trouver
  et  essayer  les  differents  logiciels faits pour eux et qui tournent
  sous Linux.  J'espere  aussi  qu'elle  poussera  les  radioamateurs  a
  utiliser  Linux  comme plate-forme pour leurs experimentations, et les
  programmeurs comme systeme d'exploitation afin de promouvoir ce  genre
  de systeme dans le monde Amateur.

  11..  IInnttrroodduuccttiioonn

  Cette liste est constituee de commentaires et remarques effectues dans
  les differents newsgroups par des radioamateurs  utilisant  Linux.  Il
  est  maintenant  clair que Linux devient une plate-forme appreciee par
  tout le monde  pour  le  travail  de  developpement  chez  les  Radio-
  Amateurs.   Cette  liste  etait appelee a l'origine "RADIOLINUX list",
  mais Matt Welsh a pense qu'il n'y avait pas de raisons pour qu'elle ne
  soit  pas  distribuee  avec  les  documents de la "Linux Documentation
  Project" : elle a donc ete renommee HAM-HOWTO et sera disponible  avec
  le reste de la documentation Linux. Je ne fais donc pas d'excuses pour
  le nom.

  11..11..  CChhaannggeemmeennttss ddeeppuuiiss llaa vveerrssiioonn pprreecceeddeennttee

  Ajouts :
          Mise a jour des dernieres versions entrees.
          bpf - calcul de filtres
          BayBox - BBS Packet
          digiinfo - base de donnees d'information sur les repeteurs digitaux
          Contest - Programme de log
          Chirp - programme de log
          bip
          pileup
          twclock
          Observateur DX Cluster
          BBS F6FBB

  Corrections/mises a jour:
          Changer tous les ftp: les url pointent sur le repertoire et
                                non sur le fichier.
          CLX, et presque tout le reste.
          Mise a jour de l'emplacement du miroir de John Gotts.
  A faire:
          Trouver un moyen de faire cela automatiquement, ou trouver
          une autre maniere de presenter ce document.

  22..  OOuu oobbtteenniirr lleess nnoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt..

  La Linux Documentation Project est sur le serveur Web et  cette  liste
  apparait     sous     la     denomination     :     The      HAM-HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html>.

  Dennis Boylan N4ZMZ <dennis@nanovx.atl.ga.us> la tient  a  disposition
  sur les trois sites suivants :

  www.com      <http://www.com/linux/radio/index.html>,     www.hboc.com
  <http://www.hboc.com/linux/index.html>         et          www.lan.com
  <http://www.lan.com/linux/index.html>.

  John Gotts N8QDW <jgotts@engin.umich.edu> la tient a disposition sur :
  www-personal.engin.umich.edu                              <http://www-
  personal.engin.umich.edu/~jgotts/linux/HOWTO/HAM/HAM-HOWTO.html>.

  Dan Todd <dantodd@fusilli.ucdavis.edu> la tient a disposition aux deux
  endroits suivants:

  wheel.dcn.davis.ca      <http://wheel.dcn.davis.ca/~dantodd/Linux/HAM-
  HOWTO.html>,                   et                  fusilli.ucdavis.edu
  <http://fusilli.ucdavis.edu/Linux/HAM-HOWTO.html>

  Alan Hargreaves VK2KVF <alan@dap.CSIRO.AU> la tient a  disposition  en
  Australie sur : www.dap.csiro.au <http://www.dap.csiro.au/RadioLinux>.

  Le radio-club de Tuebingen  la  tient  a  disposition  sur  leur  page
  d'accueil     a:     Page     d'accueil    DARC    <http://www.neckar-
  alb.de/darc/welcome.html>

  S'il vous plait, prevenez-moi si vous voulez la  maintenir  sur  votre
  site.   J'aimerais  la  voir sur des serveurs Web qui sont accessibles
  par radio (note du traducteur : attention a la legislation en France).

  33..  PPrrooggrraammmmee SSaatteelllliittee

  Les  programmes  ci-dessous  permettent  des experimentations avec les
  satellites radioamateur.

  33..11..  MMiiccrrooSSaatt GGrroouunndd SSttaattiioonn

     AAuutteeuurr
        John Melton, G0ORX/N6LYT,  g0orx@amsat.org  et  Jonathan  Naylor
        G4KLX, g4klx@amsat.org

     DDeessccrriippttiioonn
        Logiciel Microsat pour station au sol.

     SSttaattuutt
        BETA. Version 0.91.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Le  noyau  base sur du AX25 d'Alan Cox (version 1.1.12 ou plus).
        X- Windows. Le programme utilise les Widgets Athena et est  plus
        joli avec les bibliotheques 3D.

     DDeettaaiillss
        Ce  logiciel  vous  permet  d'utiliser  un TNC en mode KISS pour
        communiquer  directement  avec  les  satellites  de   la   serie
        Microsat.  Il  est  fourni  avec  les  Widget  Athena  bases sur
        l'interface X-Windows et vous permet d'avoir des  moyens  clairs
        d'interagir avec le satellite.  Le programme devrait fonctionner
        avec tous les "window manager".

        Les programmes suivants sont fournis :

        xxppbb::
           pour visualiser les broadcast
        xxppgg::
           programme d'upload de fichiers ftl0,  programme  d'upload  de
           messages

        xxttllmm::
           pour visualiser la telemetrie

        ddoowwnnllooaaddeedd::
           pour visualiser les fichiers telecharges

        ddiirreeccttoorryy::
           pour visualiser la liste du repertoire

        mmeessssaaggee::
           application pour la preparation de messages

        vviieewwtteexxtt::
           pour visualiser les fichiers texte non compresses ASCII

        vviieewwlloogg::
           visualise le contenu de certains fichiers de log

        xxwweebbeerr::
           programme special pour ramener des images de Webersat

        pphhss::
           decodeur d'entete pour PACSAT

     OOuu eett ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee
        Le  programme  de  John  est  disponible sur : ftp.cs.nott.ac.uk
        <ftp://ftp.cs.nott.ac.uk/jsn/>         ou          ftp.amsat.org
        <ftp://ftp.amsat.org/amsat/software/Linux/>    ou   ftp.funet.fi
        <ftp://ftp.funet.fi/pub/ham/satellite/pacsat/>  La  version   en
        vigueur  au  moment  ou  j'ecris  est  microsat-0.91.tar.gz. SVP
        verifiez s'il n'y a pas une nouvelle version.

     LLiicceennccee//CCooppyyrriigghhtt
        GNU Public License. Distribution gratuite, sans garantie.

     MMeerrccii aa::
        John Melton, G0ORX/N6LYT, Alan  Cox,  GW4PTS,  Jonathon  Naylor,
        G4KLX

  33..22..  SSaattTTrraacckk -- PPrrooggrraammmmee ddee ppoouurrssuuiittee SSaatteelllliittee

     NNoomm
        SatTrack

     AAuutteeuurr
        Manfred Bester, DL5KR, manfred@ssl.berkeley.edu, (510) 849-9922

     DDeessccrriippttiioonn
        Programme de poursuite Satellite et de prediction d'orbites base
        sur le mode X11.

     SSttaattuutt
        La version 4.0 est purement commerciale. La version 3.1.5 est la
        derniere disponible gratuitement.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu::
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Un  terminal  VT100  et  (ou)  un  serveur  X11. Un coprocesseur
        mathematique est utile pour de meilleures performances, mais non
        essentiel.

     DDeettaaiillss
        SatTrack  est  un  programme de poursuite de satellite qui a ete
        ecrit en langage C sur une station de travail UNIX.  Il  fournit
        deux  modes d'affichage en temps reel, pour un seul ou plusieurs
        satellites,  et  deux  systemes  de  prediction  d'orbite.   Les
        affichages  avec  curseur  utilises dans les deux modes en temps
        reel sont compatibles avec le standard VT100, ce qui  permet  au
        programme de fonctionner a partir de n'importe quel terminal. Un
        mode d'affichage optionnel sous  X  Window  donne  la  carte  de
        poursuite  typique sur le globe terrestre. La prevision d'orbite
        peut etre faite soit de maniere interactive, soit par traitement
        de  lots.  Dans ce dernier cas, tous les parametres doivent etre
        specifies sur la meme ligne de commande.  Le  programme  utilise
        les elements kepleriens NORAD/NASA en 2 lignes directement.

        La  version  actuelle  de  SatTrack  permet  de  suivre  un seul
        satellite et/ou d'afficher plusieurs satellites a  partir  d'une
        seule station au sol. Il permet egalement de prendre le controle
        du materiel necessaire, tels que les  antennes  et  l'equipement
        radio,  et  possede un mode de poursuite automatique sous lequel
        il  bascule  automatiquement  entre  un   nombre   specifie   de
        satellites.  Dans un but de calibration le suivi du soleil et de
        la lune sont egalement fournis. Les versions futures auront plus
        de  possibilites. SatTrack requiert environ 5 Mo d'espace disque
        avec la distribution complete qui possede huit cartes terrestres
        differentes  (  2  styles,  avec  4  tailles  differentes,  pour
        s'adapter a chaque ecran et chaque gout) et moins de 1,5  Mo  de
        memoire quand il tourne. Pour plus d'informations consultez Page
        d'accueil                      WWW                      SatTrack
        <http://www.primenet.com/~bester/sattrack.html>.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        La  version  commerciale  de  SatTrack  est disponible sur: Page
        d'accueil                      WWW                      SatTrack
        <http://www.primenet.com/~bester/sattrack.html>.

        La   version   gratuite  de  SatTrack  peut  etre  trouvee  sur:
        ftp.jvnc.net    <ftp://ftp.jvnc.net/priv/kupiec/sattrack/>    ou
        ftp.amsat.org <ftp://ftp.amsat.org/amsat/software/Linux/>.

     LLiicceennccee//CCooppyyrriigghhtt
        Les  droits  de  copies  appartiennent a Manfred Bester. Il peut
        etre utilise sans autorisation speciale en vue d'une utilisation
        non   lucrative,   non   commerciale.   Pour   les  apllications
        commerciales, une licence de l'auteur est demandee.  La  version
        4.0 est supportee commercialement en totalite.

     MMeerrccii aa::
        Manfred Bester, DL5KR

  33..33..  PPrreeddiicctt

     AAuutteeuurr
        John A. Magliacane, KD2BD, kd2bd@amsat.org

     DDeessccrriippttiioonn
        Un  programme  de  prediction  d'orbite  de  satellite qui donne
        egalement la position du soleil pour  predire  les  passages  de
        satellites visibles.
     SSttaattuutt
        Complet et operationnel.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu::
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        predict est un programme oriente ecran utilisant la bibliotheque
        ncurses-1.8.5 (ou plus recente).  Un  terminal  couleur  est  un
        plus, mais pas necessaire.

     DDeettaaiillss
        Les possibilites de predict incluent l'affichage de l'azimuth et
        de l'elevation du passage du satellite, sa  phase  orbitale,  la
        position  des points sous le satellite, l'inclinaison, le numero
        d'orbite, la visibilite de la lumiere du jour en fonction de  la
        date et de l'heure. Le programme est simple, rapide, et facile a
        utiliser. Predict contient une base de donnees orbitale pour  21
        satellites  pouvant  etre mise a jour par l'utilisateur a l'aide
        du clavier ou en utilisant les fichiers contenant  les  elements
        orbitaux  a  2  lignes  de  la  NASA.  Sachant  que le programme
        travaille  sous  un  environnement  multi-utilisateurs,   chacun
        possede  et  met  a  jour  sa  propre  et unique base de donnees
        orbitales.

        Ce programme a ete compile avec le degre d'optimisation le  plus
        eleve   pour  avoir  une  vitesse  d'execution  la  plus  rapide
        possible, et utilise le format binaire a.out pour la plus grande
        compatibilite.

        Pour installer le paquetage procedez comme suit:

          # cd /
          # tar xvfz predict.tgz

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Vous     pouvez     obtenir     predict.tgz    sur:    amsat.org
        <ftp://amsat.org/amsat/software/Linux/>

     LLiicceennccee//CCooppyyrriigghhtt
        Ce logiciel est disponible gratuitement et ne doit etre  utilise
        qu'a des fins non commerciales.

     MMeerrccii aa
        John A. Magliacane, KD2BD

  33..44..  UUOO1111

     AAuutteeuurr
        John A. Magliacane, KD2BD, kd2bd@amsat.org

     DDeessccrriippttiioonn
        Un  simple  programme  de decodage de la telemetrie du satellite
        UoSAT-OSCAR-11.

     SSttaattuutt
        Complet et en ordre de fonctionnement.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avr 97
     SSyysstteemmee rreeqquuiiss
        Un demodulateur  FSK  1200  bauds  UoSAT-OSCAR-11  (Un  Bell-202
        convient),  un  recepteur  VHF FM pouvant s'accorder sur 145,825
        Mhz, une petite antenne Yagi et un programme  de  communication,
        tel   que   minicom,  capable  de  sauvegarder  les  donnees  de
        telemetrie 1200 bauds ASCII dans un fichier texte.

     DDeettaaiillss
        uo11 decode les donnees de  telemetrie  ASCII  acquises  par  le
        biais d'un programme de terminal, verifie si il y a des erreurs,
        et applique des equations de calibration aux donnees recues pour
        obtenir un rapport facilement comprehensible et analysable. uo11
        est distribue sous forme precompilee  (format  a.out)  avec  une
        page de manuel pour faciliter son utilisation.

        Pour l'installer utilisez les commandes suivantes:

          # cd /
          # tar xvfz uo11.tgz

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous      pouvez      obtenir     uo11.tgz     sur     amsat.org
        <ftp://amsat.org/amsat/software/Linux/>

     LLiicceennccee//CCooppyyrriigghhtt
        Ce logiciel est disponible gratuitement et ne dot  etre  utilise
        qu'a des fins non commerciales.

     MMeerrccii aa
        John A. Magliacane, KD2BD

  33..55..  DDoovvee

     AAuutteeuurr
        John A. Magliacane, KD2BD, kd2bd@amsat.org

     DDeessccrriippttiioonn
        Un  simple  programme  de decodage telemetrie du satellite DOVE-
        OSCAR-17.

     SSttaattuutt
        Complet et en ordre de fonctionnement.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Un terminal node controller (TNC), un recepteur  VHF-FM  pouvant
        s'accorder  sur  145,825  MHz,  une  petite  antenne Yagi, et un
        programme de communication tel que Minicom qui peut  sauvegarder
        les  donnees  de  telemetrie  ASCII  1200  bauds dans un fichier
        texte.

     DDeettaaiillss
        dove decode les donnees de telemetrie ASCII qui ont ete recues a
        l'aide  d'un  programme  terminal  et  applique des equations de
        calibration   en   vue   de   produire   un   rapport   aisement
        comprehensible  et  analysable.  dove  est  distribue sous forme
        precompilee  (format  a.out)  avec  une  page  de  manuel   pour
        faciliter son emploi.
        Pour installer Dove faites les commandes suivantes:

          # cd /
          # tar xvfz dove.tgz

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous      pouvez     obtenir     dove.tgz     sur:     amsat.org
        <ftp://amsat.org/amsat/software/Linux/>

     LLiicceennccee//CCooppyyrriigghhtt
        Ce logiciel est disponible gratuitement et ne doit etre  utilise
        qu'a des fins non commerciales.

     MMeerrccii aa
        John A. Magliacane, KD2BD

  33..66..  KKeeppggeenn

     AAuutteeuurr
        John A. Magliacane, KD2BD, kd2bd@amsat.org

     DDeessccrriippttiioonn
        Un  simple  utilitaire  bien pratique qui genere des fichiers de
        donnees kepleriennes au format 2 lignes NASA a partir de donnees
        entrees au clavier.

     SSttaattuutt
        Complet.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        kepgen  est un programme oriente ecran utilisant la bibliotheque
        ncurses-1.8.5 (ou ulterieure). Un terminal couleur est un  plus,
        mais n'est pas necessaire.

     DDeettaaiillss
        kepgen  permet a son utilsateur de creer des fichiers de donnees
        kepleriennes avec somme de controle au format NASA  2-lignes,  a
        partir  de donnees orbitales transmises lors des emissions audio
        de WA3NAN pendant les  missions  de  la  navette  spatiale.  Les
        fichiers  ainsi  crees  peuvent  etre theoriquement lus par tout
        programme de prediction d'orbite ou de poursuite  de  satellite.
        kepgen  est fourni precompile (au format a.out) avec une page de
        manuel pour en faciliter l'utilisation.

        Pour installer kepgen executez les commandes uivantes:

          # cd /
          # tar xvfz kepgen.tgz

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous    pouvez     obtenir     kepgen.tgz     sur:     amsat.org
        <ftp://amsat.org/amsat/software/Linux/>

     LLiicceennccee//CCooppyyrriigghhtt
        Ce  logiciel  est fourni gratuitement et doit etre utilise a des
        fins non commerciales.

     MMeerrccii aa
        John A. Magliacane, KD2BD

  44..  PPrrooggrraammmmeess dd''aaiiddee ddaannss llee SShhaacckk

  Programmes pour simplifier le travail dans le shack. Par  exemple  les
  programmes  permettant de tenir un log, de controler de nouveaux types
  de radios (emetteurs recepteurs), de gerer une base de donnees de  QSL
  ou la rotation des antennes.

  44..11..  CCoonnttrroollee aa ddiissttaannccee dd''uunn FFTT--889900

     AAuutteeuurr
        Emarit Ranu, KG0CQ, drranu@holly.ColoState.EDU

     DDeessccrriippttiioonn
        Un  simple  programme  pour controler un transceiver FT-890 avec
        son interface CAT a partir de linux.

     SSttaattuutt
        Fonctionne

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Un Yaesu FT-890, une interface Yaesu FIF-232C ou  un  equivalent
        fabrique  par  vous-meme  (voir "QST" de Fevrier 1993, page 37).
        Linux et un cable serie.

     DDeettaaiillss
        Le programme est demarre avec un parametre  specifiant  le  port
        serie  a  utiliser.  Une  fois demarre le programme est pilote a
        partir  d'un  menu.  Les  futures  versions   comprendront   une
        interface X-Window.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Ce programme n'est a l'heure actuelle distribue que par l'auteur
        via courrier electronique.

     LLiicceennccee//CCooppyyrriigghhtt
        Vous pouvez copier ce programme des millions de fois, les seules
        restrictions etant:

     +o  Vous   ne  pouvez  demander  retribution  a  QUICONQUE  pour  le
        programme lui-meme

     +o  Vous ne pouvez distribuer des versions modifiees du programme

     +o  Si vous distribuer le programme, ce DOIT  etre  le  fichier  tar
        INITIAL  comme  concu  par l'auteur. Le fichier README doit etre
        inclus.

     MMeerrccii aa
        Emarit Ranu, KG0CQ

  55..  PPaacckkeett RRaaddiioo

  Programme pour utiliser avec, ou pour faciliter le packet.

  55..11..  BBBBSS ppaacckkeett FF66FFBBBB

     AAuutteeuurr
        Jean-Paul Roubelat, F6FBB, jpr@f6fbb.org

     DDeessccrriippttiioonn
        BBS pour packet-radio completement equipee,  avec  interface  X-
        Window

     SSttaattuutt
        Beta Version 7.00b45.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Noyau  avec  configuration  reseau AX.25/NetRom/Rose. Systeme de
        fenetrage X11 pour la version X11.

     DDeettaaiillss
        Il s'agit du portage du celebre systeme  BBS  Packet  F6FBB  sur
        Linux.  Ce  BBS  supporte  des connexions AX.25, NetRom, Rose et
        TCP/IP et offre toutes les fonctionnalites que vous attendez  de
        ce  produit.  L'interface  X11 optionnelle fournit une interface
        sysop bien presentee.

        Une liste de courrier (mailing list) pour F6FBB est  disponible.
        Pour  y souscrire envoyer un message a: majordomo@f6fbb.org avec
        la ligne `subscribe xfbb' dans le corps du message. La liste  de
        courrier        est        archivee       sur       zone.pspt.fi
        <http://zone.pspt.fi/archive/fbb/>

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Vous pouvez obtenir le paquetage F6FBB depuis son site personnel
        a: Page d'accueil F6FBB <http://www.f6fbb.org/>.

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc....
        Le  logiciel  F6FBB  est gratuitement disponible pour tout usage
        non commercial.

  55..22..  OObbsseerrvvaatteeuurr DDXX CClluusstteerr

     AAuutteeuurr
        Pierluigi Guerzoni, IZ4AKO, iz4ako@ing49.unife.it

     DDeessccrriippttiioonn
        Affiche des informations DX recues  passivement  a  partir  d'un
        Node DX Cluster.

     SSttaattuutt
        Version 4, stable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Demande un noyau incluant une configuration AX.25.
     DDeettaaiillss
        Les  observateurs  DX Cluster ecoutent le traffic the DX Cluster
        sur votre frequence,  le  saisissent  et  l'affichent  dans  une
        fenetre  avec  texte  colore.  Ils  saisissent le traffic sur la
        frequence mais ne necessitent pas d'etre effectivement  connecte
        au node cluster.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Vous  pouvez  obtenir  l'observateur  DX Cluster Watcher sur: DX
        Cluster              Watcher              Home              Page
        <http://ing49.unife.it/~iz4ako/project_inglese.html>.

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        GNU GPL

     MMeerrccii aa
        Pierluigi Guerzoni, IZ4AKO, iz4ako@ing49.unife.it

  55..33..  DDiiggiiiinnffoo

     AAuutteeuurr
        Mario Lorenz, DL5MLO, dl5mlo@vdazone.org

     DDeessccrriippttiioonn
        Une base de donnees d'information sur le reseau packet radio.

     SSttaattuutt
        La version 2.5.1 est stable.

     ppooiinntt aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Rien de special.

     DDeettaaiillss
        _d_i_g_i_i_n_f_o  est  un  programme  initialement  ecrit pour Atari par
        Karsten DC7OS. Digiinfo est un programme de base de donnees pour
        afficher des informations concernant les reseaux packet radio.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Vous pouvez obtenir le paquetage digiinfo et une base de donnees
        sur            son             site:             www.vdazone.org
        <http://www.vdazone.org/~dl5mlo/digiinfo/>.

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        ALAS, c'est a dire seulement pour amateur licencie.

     MMeerrccii aa
        Mario Lorenz, DL5MLO, dl5mlo@vdazone.org

  55..44..  BBBBSS BBaayyBBooxx

     AAuutteeuurr
        Flori Radlherr, DL8MBT, flori@t-online.de

     DDeessccrriippttiioonn
        Un BBS pour Linux.

     SSttaattuutt
        Version 1.38, stable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avr 97

     SSyysstteemmee rreeqquuiiss
        Le materiel recommande est un 80486/33Mhz avec 8MB de RAM

     DDeettaaiill
        Malheureusement  la  documentation  est  en  allemand et je suis
        incapable  d'en   comprendre   la   totalite.   J'ai   cependant
        l'impression  que  c'est  un  BBS  qui  possede  la  plupart des
        fonctionnalites d'un bbs packet  radio,  avec  forwarding,  etc,
        mais  la  documentation  semble suggerer que la version Linux ne
        supporte que l'acces telnet. Cela n'est pas vraiment une  grosse
        contrainte,  car  vous  pouvez facilement configurer une session
        sous le programme  Linux  _a_x_2_5_d  pour  accepter  les  connexions
        AX.25/NetRom/Rose et connecter le BBS via telnet.

        Si  vous pouvez m'aider en donnant une meilleure description, je
        l'apprecierai.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Vous  pouvez  obtenir  BayBOX  sur  le   site:   members.aol.com
        <http://members.aol.com/baybox/>

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        Le  programme  BayCom-Mailbox  a  ete  concu  pour  etre utilise
        uniquement dans un contexte radio-amateur. Tout usage en  dehors
        d'un  reseau radio-amateur AX.25 , specialement pour un usage ou
        une distribution commercial est interdit.  Compte-tenu de  cette
        limitation,  l'usage  et la copie de BayCom-Mailbox gratuitement
        est amors encourage. Dans tous les cas, le logiciel  est  fourni
        "tel  quel"  et  ne  possede  aucune  garantie,  ni implicite ni
        exprimee.

     MMeerrccii aa
        Iztok Saje, S52D, s52d@s55tcp.ampr.org

  55..55..  JJNNEETT

     AAuutteeuurr
        Takeshi Shoji, JF2CEX, taka@myk.ilc.or.jp

     DDeessccrriippttiioonn
        Une version amelioree de NOS KA9Q pour Linux  et  autres  plate-
        formes.

     SSttaattuutt
        Version 961210, stable, distribuee.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Pas de systeme special, necessite un TNC avec KISS.

     DDeettaaiillss
        C'est un autre paquetage derive du NOS KA9Q, maintenu de maniere
        active. Cette version a ete portee sur un grand nombre de plate-
        formes   et   offre  quelques  ameliorations  qui  ne  sont  pas
        disponibles sur d'autres NOS. Un petit inconvenient est  que  la
        plupart de la documentation est en japonais.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Vous  pouvez  obtenir  la  derniere version de JNET sur le site:
        www.myk.ilc.or.jp
        <http://www.myk.ilc.or.jp/~taka/software.html#jnetcex>.

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        Je  ne  suis en fait pas sur. Je pense cependant que comme c'est
        un derive de NOS, il est librement utilisable par les operateurs
        radio-amateurs.

     MMeerrccii aa
        Isao SEKI, http://www.prug.or.jp/people/jm1wbb

  55..66..  XXNNeett

     AAuutteeuurr
        Richard R. Parry, W9IF, rparry@qualcomm.com

     DDeessccrriippttiioonn
        Analyseur de traffic pour les reseaux AX.25.

     SSttaattuutt
        Stable, distribue.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avr 97

     SSyysstteemmee rreeqquuiiss
        TCL-7.5/Tk-4.1, TNC avec KISS.

     DDeettaaiill
        Le  logiciel  XNet  fournit  un  certain  nombre  d'outils qu'un
        administrateur de reseau local AX.25 peut utiliser pour analyser
        et  gerer.  Les  outils  donnent  une  vue  graphique de tout le
        traffic recu sur un node, permettant  a  l'observateur  de  voir
        facilement   ou  le  traffic  s'ecoule  facilement  et  d'autres
        informations telles que:

     +o  Comptage de paquets

     +o  Statistiques sur le node

     +o  Chiffres d'utilisation du reseau

        Le reseau est affiche sous forme d'icones representant les hotes
        et  de  lignes  entr'elles  representant  le  flux  du  traffic.
        L'affichage graphique fournit une vue  instantannee  du  traffic
        reseau que l'on surveille.  Richard donne plus d'informations et
        des     exemples     d'affichage      sur:      www.qualcomm.com
        <http://www.qualcomm.com/~rparry/xnet.html>.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Vous   pouvez   obtenir   le   logiciel   sur:  www.qualcomm.com
        <http://www.qualcomm.com/~rparry/xnet/xnet-1.1.tar>

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        XNET est un graticiel. Il est librement distribuable.

     MMeerrccii aa
        Richard Parry, W9IF

  55..77..  mmoonnaaxx2255

     AAuutteeuurrss
        Skip Hansen, WB6YMH et Harold Price, NK6K.

     MMaaiinntteennuu ppaarr
        Jonathon Naylor, jsn@cs.nott.ac.uk

     DDeessccrriippttiioonn
        Le programme _m_o_n_a_x_2_5 fournit  un  certain  nombre  d'utilitaires
        pour  obtenir  des  statistiques  sur  l'utilisation  d'un canal
        AX.25.

     SSttaattuutt
        Version 1.11, Stable

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avr 97

     SSyysstteemmee rreeqquuiiss
        TNC avec KISS.

     DDeettaaiillss
        Les programmes originaux _a_x_2_5_m_o_n furent ecrits  pour  MSDOS.  Ce
        paquetage est un portage sous Linux.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Le   paquetage   `monax25'  peut  etre  obtenu  sur:  repertoire
        applications           radio-amateurs            sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>.

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        Copiable librement, mais pas GPL.

  55..88..  sspplliittssccrreeeenn

     AAuutteeuurr
        Dave Brown, N2RJT, dcb@vectorbd.com

     DDeessccrriippttiioonn
        Programme qui divise l'ecran comme `ttylink' avec possibilite de
        retour en arriere et de sauvegarder dans un fichier.

     SSttaattuutt
        Version 1.4.1, stable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avr 97

     SSyysstteemmee rreeqquuiiss
        Requiert le paquetage `_n_c_u_r_s_e_s'.

     DDeettaaiillss
        Le programme _s_p_l_i_t_s_c_r_e_e_n  est  une  implementation  unix  de  la
        commande  _t_t_y_l_i_n_k de NOS. Elle permet d'avoir un ecran divise en
        deux, rendant les discussions d'utilisateur a  utilisateur  plus
        faciles  que l'interface telnet habituelle. Le tampon qui permet
        un retour en arriere et l'enregistrement dans  un  fichier  sont
        utiles  lorsque  vous  utilisez  le  programme  _s_p_l_i_t_s_c_r_e_e_n pour
        acceder a des services tels que _c_o_n_v_e_r_s.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Le  paquetage  `splitscreen'est   disponible   sur:   repertoire
        applicateurs            radio-amateurs           sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        Domaine public.

  55..99..  ttaallkk--aaxx2255

     AAuutteeuurr
        Dave Brown, N2RJT, dcb@vectorbd.com

     DDeessccrriippttiioonn
        Client Berkeley `talk' modifie pour Linux AX.25

     SSttaattuutt
        Version 960426, en ordre de marche.

     SSyysstteemmee rreeqquuiiss
        Requiert le paquetage `_n_c_u_r_s_e_s'.

     DDeettaaiillss
        Le programme `talk-ax25' est une version modifiee  du  programme
        Berkeley  conventionnel  `talk'  pour  supporter un travail sous
        AX.25 Linux.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Le  programme  `talk-ax25'  est   disponible   sur:   repertoire
        applications            radio-amateurs           sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/> ou sur: ftp.ucsd.edu
        <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/linux/>.

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        Style   Berkeley.   Librement  distributable,  les  messages  de
        copyright doivent etre conserves.

  55..1100..  77PPlluuss ppoouurr LLiinnuuxx

     AAuutteeuurr
        Axel Bauda, DG1BBQ, DG1BBQ@DB0CL.#HB.DEU.EU

     DDeessccrriippttiioonn
        Codeur de fichier du style Uuencode pour  envoyer  et  forwarder
        des fichiers binaires sur un BBS.

     SSyysstteemmee rreeqquuiiss
        Rien de special

     DDeettaaiillss
        Donne  la  possibilite d'encoder des fichiers binaires en 7Plus,
        en vue de pouvoir les transmettre dans des  messages  transitant
        sur BBS.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Le  paquetage  de  l'encodeur  `7pl217sr'  est  disponible  sur:
        sunsite.unc.edu        ham        applications         directory
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>.

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        Hamware - Libre d'utilisation pour les radio-amateurs.

  55..1111..  TTNNOOSS

     AAuutteeuurr
        Brian A. Lantz, brian@lantz.com

     DDeessccrriippttiioonn
        TNOS  est  un  derive  de  NOS  qui  est  activement supporte et
        disponible a la fois pour DOS  et  Linux.  Il  apporte  beaucoup
        d'ameliorations qui ne se trouvent pas dans d'autres versions de
        NOS.

     SSttaattuutt
        Version 2.21. Stable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avr 97

     SSyysstteemmee rreeqquuiiss
        Le support slip integre dans le noyau si vous voulez relier  les
        possiblites  reseau  de  Linux  avec celles de TNOS. Un tnc avec
        kiss.

     DDeettaaiillss
        Brian maintient un serveur WWW qui contient des  informations  a
        jour  sur  TNOS.  Vous  pouvez  le  trouver  sur:  www.lantz.com
        <http://www.lantz.com/tnos/tnos.html>.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        La  version  courante  de  TNOS  est  toujours  disponible  sur:
        ftp.lantz.com          <ftp://ftp.lantz.com/tnos/current/unix/>,
        sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>,  ou
        ftp.ucsd.edu <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/tnos/>.

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        Gratuit  pour les operateurs radio-amateurs et les organisations
        liees a l'education.

  55..1122..  NN00AARRYY BBBBSS PPaacckkeett ppoouurr UUNN**XX

     AAuutteeuurr
        Bob Arasmith, N0ARY, porte sur Linux (et autres) par Bob Proulx,
        KF0UW, rwp@fc.hp.com

     DDeessccrriippttiioonn
        Un BBS packet implementee pour UN*X.

     SSttaattuutt
        ALPHA.  Bob fait fonctionner la version ARY-0.9 sur Linux et HP-
        UX. La version suivante de NOARY  appelee  4.0  est  en  version
        alpha  test/developpement.  Bob n'est pas encore en mesure de la
        mettre a disposition et il conseille d'utiliser la version 0.9 +
        les  modifications  de  kf0uw.  Bob a travaille la moitie de son
        temps avec Alan Cox sur le  noyau  AX.25  qui  devrait  etre  la
        combinaison souhaitable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     CCoonnffiigguurraattiioonn rreeqquuiissee
        Linux, un compilateur C, un TNC.

     DDeettaaiillss
        Ce  BBS  a  une  excellente  interface  utilisateur. Il a un jeu
        d'instructions compatible avec les  BBS  RLI,  les  utilisateurs
        seront  familiarises  immediatement.  Le  jeu de commandes a ete
        etendu pour donner une tres bonne interface  se  rapprochant  du
        langage  naturel  (c.a.d.  "liste  sur  le KPC-3").  Beaucoup de
        commandes du style csh  sont  supportees.   Il  y  a  aussi  une
        interface  pour  faire  transiter  les  mail  packets  vers  une
        passerelle Internet.

        Pour  l'instant  vous  devez  adapter  les  sources  pour  votre
        installation, il est necessaire d'avoir des notions de C.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Pour  avoir  la  version Linux ou bien obtenir des informations,
        envoyez un mail a rwp@fc.hp.com. Pour la version SunOS contactez
        bob@arasmith.com.   Ce  code  n'est pas encore valable pour etre
        inclus dans des distributions, il est encore au stade  alpha  du
        developpement.   Une  version  du  logiciel  est  disponible sur
        ftp.funet.fi <ftp://ftp.funet.fi/pub/ham/unix/packet/n0ary/>

     LLiicceennccee//CCooppyyrriigghhtt
        Copyright Bob Arasmith, N0ARY, distribution gratuite.

     MMeerrccii aa ::
        Bob Proulx, KF0UW

  55..1133..  LLBBBBSS -- PPaasssseerreellllee BBBBSS ppoouurr mmeessssaaggeerriiee

     AAuutteeuurr
        Daryl L Miles, G7LED, dlm@frink.demon.co.uk

     DDeessccrriippttiioonn
        Un paquetage BBS concu pour travailler soit avec le  code  AX.25
        inclus dans le noyau, soit avec le paquetage Wampes.

     SSttaattuutt
        En developpement, en etat de marche.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Support  AX.25  dans  le noyau ou le paquetage Wampes. sendmail,
        CNEWS.

     DDeettaaiillss
        L'objectif de Daryl etait de faire une plate-forme sur  laquelle
        des amateurs pourraient avoir un BBS Packet jouant le role d'une
        passerelle smtp pour Linux.  Je ne suis pas sur que la situation
        actuelle  soit celle de la derniere version que j'ai pu trouver,
        datee du 30 juin 1995.  La derniere version binaire supporte:

     +o  MBL, le traitement par lot FBB, la compression FBB,  le  forward
        FBB type 1 compresse avec possibilite de redemarrage, la mise en
        attente et la rejection.

     +o  Divers mecanismes de transport Linux incluant le noyau avec TCP,
        le noyau avec AX.25, NetRom sous Wampes, AX25 ou TCP.

     +o  Un  simple  numeroteur, pour permettre des connexions au travers
        de nodes AX.25 ou NetRom.

     +o  Pages Blanches

     +o  Traitement transitoire de type A (ACK).

     +o  Passerelle SMTP/NNTP<>BBS implementee de sorte que l'utilisateur
        puisse   acceder  au  spool  de  nouvelles  pour  recuperer  des
        articles.

     +o  Mecanisme de filtrage des messages

     +o  Echange de champs (comme SWAPP.SYS dans FBB).

     +o  Connexion multiutilisateur.

        Pour l'installer, j'ai fait comme suit:

          # cd /usr/src
          # mkdir LBBS
          # tar xvfz LBBS-0.1.6A.tar.gz
          # cd LBBS
          # ./Install.sh

     Ceci  permet  de  creer  un  repertoire  /usr/lbbsy.   Le   fichier
     README.Setup suggere un ordre a respecter pour configurer le BBS.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous  pouvez  obtenir  le  paquetage  `LBBS'  sur:  ftp.ucsd.edu
        <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/linux/>.

     LLiicceennccee//CCooppyyrriigghhtt
        Librement  distribuable  pour  tout  usage   amateur-radio   non
        commercial  uniquement.  Sans  garantie.  Sera sous GPL quand le
        logiciel sera stable.

  55..1144..  CCoonnvveerrttiisssseeuurr ddee mmeessssaaggeess MMBBLL//RRLLII vveerrss NNNNTTPP eett eemmaaiill

     AAuutteeuurr
        SM0OHI, pme@it.kth.se

     DDeessccrriippttiioonn
        Programme de conversion des messages MBL/RLI  vers  les  formats
        NNTP ou RFC-822.

     SSttaattuutt
        En cours de developpement, pas encore finalise.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Inconnu.

     DDeettaaiillss
        Ce  programme  devrait  etre ideal pour ceux qui veulent etablir
        une passerelle pour  mail  et  news  entre  une  liaison  tcp/ip
        conventionnelle et le reseau amateur.

     OOuu eett ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee
        Non encore disponible.

     LLiicceennccee//CCooppyyrriigghhtt
        Inconnu.

     MMeerrccii aa::
        SM0OHI

  55..1155..  PPrrooggrraammmmee CCLLXX PPaacckkeett DDXX CClluusstteerr

     AAuutteeuurr
        Franta  Bendl,  DJ0ZY,  et  Bernhard  ("Ben")  Buettner, DL6RAI,
        root@dl6rai.muc.de

     DDeessccrriippttiioonn
        Un systeme ressemblant a PacketCluster tournant sous Linux.

     SSttaattuutt
        Version actuelle 2.07

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Noyau Linux version 2.0 ou plus recent, reseau TCP/IP, SysV IPC.
        Egalement necessite Perl et de maniere facultative Expect.

     DDeettaaiillss
        Les  nodes  PacketCluster  existent  depuis  environ  7  ans. Le
        programme initial fut ecrit par Dick Newell, AK1A,  et  tournait
        sous  DOS.   CLX est un systeme qui clone un node PacketCluster.
        Pour   l'utilisateur   exterieur   les    commandes    et    les
        fonctionnalites   sont   pratiquement   identiques.   Les  nodes
        PacketCluster distants, qui peuvent etre mis sur le  reseau,  ne
        voient  pas  la difference entre un node PacketCluster generique
        et CLX. Aussi il s'adapte bien dans un reseau  de  PacketCluster
        deja en service.

        CLX  n'est pas une application utilisateur, c'est un logiciel de
        noeud reseau. Tel  quel  il  n'a  pas  beaucoup  d'utilite  pour
        l'amateur  individuel.  Les  SysOPs de nodes PacketCluster ayant
        une certaine experience a la fois  dans  PcketCluster  et  Linux
        trouveront cette application interessante.

        Ci-dessous quelques fonctionnalites de CLX:

     +o  Il  est  totalement  compatible  avec le protocole interne PCxx,
        meme du point de vue utilisateurs. Il autorise le multitache  et
        differentes priorites.

     +o  Le  logiciel detecte les spots DX qui sont en boucle,pour ne pas
        generer des messages sans fin. CLX filtrent ces informations  en
        double.  On  a implemente un concept qui permet une connexion au
        reseau en points multiples, ce qui aurait  ete  appele  dans  le
        temps une "Boucle Cluster". CLX reconnait de tels liens "actifs"
        et "passifs". Le resultat est que plus  d'informations  DX  sont
        vues par les utilisateurs de CLX.

     +o  Une  interface  pour  pouvoir  utiliser  CLX  avec  vos  propres
        programmes et applications.

     +o  Une possibilite de connexion par le biais de scripts.  CLX  peut
        maintenant  etablir  et  maintenir virtuellement toute connexion
        utilisant TCP/IP, UUCP ou tout autre programme de communication.

     +o  CLX  utilise  des  concepts  de  programmation modernes comme le
        partage de memoire pour les  donnees  communes,  les  appels  de
        procedure  a distance pour les communications interprocessus. Il
        est tres modularise avec ses propres processus dedies  a  chaque
        tache principale.

     +o  Comprend plusieurs modules tournat comme processus independants.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr
        Vous   pouvez   obtenir    le    logiciel    sur    ftp.funet.fi
        <ftp://ftp.funet.fi/pub/ham/unix/Linux/cluster>

        Le paquetage est compose de cinq fichiers:

          00Index
          clx_206.tgz
          clx.txt
          README

     LLiicceennccee//CCooppyyrriigghhtt
        CLX  (c)  par  Franta  Bendl (DJ0ZY) et est disponible pour tout
        utilisation non commerciale, mais  les  auteurs  veulent  garder
        trace   de  ceux  qui  utilisent  leur  programme,  aussi  avant
        d'utiliser le logiciel vous devez demander une chaine comprenant
        votre  indicatif  sous forme cryptee a placer dans le fichier de
        configuration.  Pour  ce  faire,  vous  envoyez  un  courrier  a
        clx_us@dl6rai.muc.de.

     MMeerrccii aa
        Bernhard ("Ben") Buettner, DL6RAI

  55..1166..  PPaaqquueettaaggee TTeerrmmiinnaall DDPPTTNNTT eett BBBBSS DDPPBBOOXX

     AAuutteeuurr
        Mark                        Wahl,                        DL4YBG,
        DL4YBG@DB0GR.#BLN.DEU.EU,wahlm@berlin.snafu.de    et     Joachim
        Schurig,     DL8HBS,    DL8HBS@DB0GR.#BLN.DEU.EU,h0187akk@rz.hu-
        berlin.de

     DDeessccrriippttiioonn
        Ensemble de programmes avec BBS et terminal pour Linux.

     SSttaattuutt
        Stable et en ordre de marche.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        TNC supportant le protocole WA8DED ou KISS.

     DDeettaaiillss
        TNT est un programme de terminal hostmode complet.  Le  compiler
        sous Linux est aussi difficile que de desarchiver les sources et
        taper `make'. Il y a deux versions : terminal texte, et X11.  Il
        est livre avec une documentation claire qui decrit en detail les
        possibilites. Entre autres :

        SSeessssiioonnss mmuullttiipplleess ::
           TNT supporte des connexions packet multiples sur  des  ecrans
           virtuels  que  vous  pouvez permuter. Chaque session offre un
           ecran divise en deux parties (transmission et  reception)  et
           une  ligne  d'etat de la liaisone. Les commandes peuvent etre
           transmises dans  une  session  commande,  ou  dans  n'importe
           quelle  session  en utilisant une touche de commande.  Chaque
           ecran virtuel peut etre plus grand que  l'ecran  physique  et
           peut etre "scrolle".

        CCaappttuurree ddee ddoonnnneeeess,, ttrraannssffeerrtt ddee ffiicchhiieerrss,, eett lloogg ::
           Beaucoup d'options sont disponibles pour maintenir un log des
           fichiers recus. Vous pouvez faire un  log  des  transmissions
           des  receptions ou des deux. Vous pouvez remplacer ou ajouter
           a la suite les donnees dans un fichier  deja  existant.  Vous
           pouvez  utiliser  le  protocole "autobin" pour transmettre ou
           recevoir des fichiers binaires.

        OOppeerraattiioonnss SShheellll aa ddiissttaannccee ::
           Vous pouvez offrir un shell a vos utilisateurs  qui  pourront
           ainsi avoir acces a d'autres programmes sur votre ordinateur.
           Vous pouvez aussi executer  un  programme  et  rediriger  ses
           entrees/sorties   sur   un   canal   pour   permettre  a  vos
           utilisateurs de l'exploiter.

        RReeddiirreeccttiioonn dd''uunn ccaannaall ssuurr uunn ppeerriipphheerriiqquuee ::
           TNT autorise la redirection des  entrees/sorties  d'un  canal
           sur un peripherique, un modem par exemple.

        CCoonnvveerrssiioonn UUmmllaauutt ::
           TNT permet des conversions umlaut si necessaire.

        MMooddee RReemmoottee ::
           Les  utilisateurs  distants peuvent executer des commandes si
           les autorisations leur ont ete accordees.

        MMooddee SSoocckkeett ::
           Vous pouvez configurer TNT pour qu'il ouvre  un  socket  pour
           les  utilisateurs  de telnet ce qui leur permettra d'avoir la
           meme chose que vous sur votre console.  C'est  utile  lorsque
           votre  machine Linux est connectee sur un reseau ethernet, et
           que vous voulez avoir un terminal radio sur le reseau.

     OOuu eett ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee
        Le paquetage `dpnt' est disponible sur :

        ftp.funet.fi <ftp://ftp.funet.fi/pub/ham/unix/packet/dptnt/>  ou
        ftp.tapr.org   <ftp://ftp.tapr.org/pub/tapr/software_lib/Linux/>
        ou                                                  ftp.ucsd.edu
        <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming/>.

        Les    pages    d'accueil    des   developpeurs   sont:   DL4YBG
        <http://www.snafu.de/~wahlm/> et  DL8HBS  <http://hppool0.rz.hu-
        berlin.de/~h0187akk/>

     LLiicceennccee//DDrrooiitt ddee ccooppiieess
        Les  programmes  TNT  et  DPBOXT sous couverts par la GNU Public
        License. Le programme TFKISS est couvert par  ALAS  (un  licence
        allemande pour l'usage radio-amateur), et le programme DPBOX est
        distribuable gratuitement pour un usage radio-amateur.

  55..1177..  DDeemmoonn dd''eennccaappssuullaattiioonn IIPPIIPP

     NNoomm
        Demon d'encapsulation IPIP de Mike Westerhof.

     AAuutteeuurr
        Mike  Westerhof  KA9WSB  (code  initial),  Bdale  Garbee   N3EUA
        (portage sur BSD), puis Ron Atkinson N8FOW et John Paul Morrison
        (portage sur Linux),et  enfin  Bdale  remit  tout  ensemble  une
        nouvelle fois.

     DDeessccrriippttiioonn
        Demon permettant a votre machine Linux de devenir une passerelle
        d'encapsulation IPIP._N_o_t_e_: _i_l _n_'_e_s_t _p_r_o_b_a_b_l_e_m_e_n_t _p_a_s  _n_e_c_e_s_s_a_i_r_e
        _d_a_n_s _l_a _p_l_u_p_a_r_t _d_e_s _i_n_s_t_a_l_l_a_t_i_o_n_s _c_a_r _l_e_s _n_o_y_a_u_x _r_e_c_e_n_t_s _p_e_u_v_e_n_t
        _s_'_o_c_c_u_p_e_r _d_e _l_'_e_n_c_a_p_s_u_l_a_t_i_o_n_.

     SSttaattuutt
        Ron  fait  tourner  lui  meme  son  code,  et  l'autre   version
        fonctionne parfaitement.

     SSyysstteemmee rreeqquuiiss
        Un  TNC  KISS , n'importe quelle version de Linux supportant les
        sockets RAW.

     DDeettaaiillss
        Si vous avez deja utilise une  passerelle  Internet  avec  votre
        installation  packet,  vous  vous etes probablement connecte via
        une passerelle "d'encapsulation". Beaucoup fonctionnent avec  le
        NOS  KA9Q et DOS, mais les autres utilisent Unix et ce demon. Ce
        dernier vous permet d'encapsuler de l'IP  dans  de  l'IP,  ainsi
        vous  pouvez  avoir  une  connexion  IP  a  travers Internet. Le
        programme vous permet de connecter un TNC KISS a  votre  machine
        Linux,  et ainsi de pouvoir recevoir tous les datagrammes venant
        de l'internet par le biais d'une telle passerelle.  Bdale  donne
        les instructions d'installation dans le paquetage.

     OOuu eett ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee
        Ce   programme  est  disponible  via  le  site  ftp:  col.hp.com
        <ftp://col.hp.com/hamradio/packet/etc/ipip/ipip.tar.gz>.

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        Distribution gratuite, mais Bdale suggere  de  lui  envoyer  une
        carte  QSL  ou  une  carte postale si vous utilisez et aimez son
        code.

     MMeerrccii aa::
        Ron Atkinson, N8FOW, et Bdale Garbee, N3EUA

     NNoottee::
        Vous pouvez maintenant envisager d'utiliser  le  noyau  avec  le
        demon d'encapsulation.

  55..1188..  DDeemmoonn dd''eennccaappssuullaattiioonn AAXXIIPP

     NNoomm
        Demon d'encapsulation AXIP de Mike Westerhof.

     AAuutteeuurr
        Mike Westerhof KA9WSB, porte sur Linux par Ron Atkinson N8FOW.

     DDeessccrriippttiioonn
        Demon permettant d'utiliser votre machine Linux comme passerelle
        d'encapsulation AXIP.

     SSttaattuutt
        Par encore completement teste, mais semble bien fonctionner.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 avril 97

     SSyysstteemmee rreeqquuiiss
        Un TNC KISS , n'importe quelle version de Linux  supportant  les
        sockets RAW.

     DDeettaaiillss
        Ce  demon  est  un  compagnon  du demon d'encapsulation IPIP. Il
        permet d'encapsuler des trames  AX.25  dans  de  l'IP  pour  les
        transmettre  a  travers  l'Internet.  C'est ideal pour relier un
        reseau AX.25 avec un  site  distant.  Ron  a  cree  un  Makefile
        special  Linux  grace  auquel  j'ai  compile  sans erreur sur ma
        machine avec un  noyau  recent.   Ron  a  aussi  ecrit  quelques
        fichiers  README qui vous donneront les details pour compiler et
        configurer le programme.

     OOuu eett ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee
        Ce programme est disponible sur le repertoire  des  applications
        ham                      de                      sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/ax25ip.tar.gz>.    Une
        version   amelioree   de   ce  logiciel  est  incluse  dans  les
        utilitaires AX.25  pour  Linux.  Voyez  le  document  AX25-HOWTO
        <http://sunsite.unc.edu/LDP/HOWTO/AX25-HOWTO.html>.

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        Distribution  gratuite  tant que le copyright original n'est pas
        efface.

     MMeerrccii aa::
        Ron Atkinson, N8FOW

  55..1199..  SSeerrvveeuurr ddee ddiiaalloogguuee PPiinngg--PPoonngg

     NNoomm
        Serveur de dialogue de Fred Baumgartens pour Linux.

     AAuutteeuurr
        Fred  Baumgarten,  DC6IQ,  dc6iq@insu1.etec.uni-karlsruhe.de  et
        Brian Lantz brian@lantz.com.

     DDeessccrriippttiioonn
        Ce  programme  permet  a  plusieurs utilisateurs de dialoguer en
        direct les uns avec les autres. Compatible avec  le  serveur  de
        dialogue   NOS,   mais   avec   des   possibilites   telles  que
        sauver/restaurer sa page de texte et  les  attributs  du  canal.
        Brian   a   ameliore   le  logiciel  avec  des  caracteristiques
        supplementaires.

     SSttaattuutt
        Utilise par beaucoup de serveurs de dialogue,  apparemment  tres
        stable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 avril 97

     SSyysstteemmee rreeqquuiiss
        Linux, le make GNU, compilateur C.

     DDeettaaiillss
        Toutes  les  instructions  d'installation  sont incluses dans le
        fichier INSTALL de la distribution.

     OOuu eett ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee
        La distribution est accessible sur :

        sunsite.unc.edu  dans  le  repertoire   des   applications   ham
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/convers>.    Le   site
        d'origine du programme est

        serveur      ftp       insu1.etec.uni-karlsruhe.de       serveur
        <ftp://insu1.etec.uni-karlsruhe.de/pub/hamradio/convers/convers>

     LLiicceennccee//CCooppyyrriigghhtt,, eettcc..
        Je  presume  que  c'est  un  copyright  Fred  Baumgarten,   mais
        certaines  parties  sont  gratuites  pour  une  utilisation  non
        commerciale, et la copie  doit  laisser  intacte  la  notice  du
        copyright.

  55..2200..  RRSSPPFF DDaaeemmoonn

     NNaammee
        RSPF  -  Demon de routage `Radio Shortest Path First' (le chemin
        radio le plus court d'abord) pour Linux

     AAuutteeuurr
        Craig Small vk2xlz csmall@triode.apana.org.au

     DDeessccrriippttiioonn
        Une implementation du protocole de routage `Radio Shortest  path
        First' pour linux. Le demon supporte la version 2.2 du protocole
        qui corrige un grand nombre de bogues et de  problemes  presents
        dans la version 2.1.

     SSttaattuutt
        Alpha - qui tourne, necessite des rapports d'essai et de bogues.
        La version actuelle est la 0.08

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss..
        Necessite le noyau avec le code AX.25 d'Alan Cox.

     DDeettaaiillss
        Ce programme permet a Linux  de  devenir  un  routeur  RSPF.  Il
        accede  a certaines des bizarreries de RPSF v2.1, la version qui
        signifie a NOS qu'il est incompatible avec sa version. Il permet
        egalement des demandes distant/local via une session tcp, en vue
        de deboguages et diagnostics.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Les  versions   en   cours   sont   toujours   disponibles   sur
        sunsite.unc.edu  <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>  ou
        ftp.ucsd.edu <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming>
        ou aupres de l'auteur.

     LLiicceennccee//CCooppyyrriigghhtt
        GNU Public License vers 2.0

     MMeerrccii aa::
        Craig Small, VK2XLZ

  55..2211..  DDeemmoonn TTTTYYLLIINNKK ddee MMiicchhaaeell WWeessttffaallll

     NNoomm
        ttylinkd - un demon ttylink pour Linux.

     AAuutteeuurr
        Michael Westfall, N6KUY, mwestfal@.csci.csusb.edu

     DDeessccrriippttiioonn
        Un  programme  terlinal avec ecran separe en deux qui ecoute sur
        le port ttylink et accepte le demandes de connexion entrante.

     SSttaattuutt
        Semble bien marcher.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        rien de special.

     DDeettaaiillss
        Il s'agit d'un programme se  suffisant  a  lui-meme  et  qui  ne
        necessite absolument pas de changement dans votre configuration.
        Si vous avez un acces root sur votre machine, alors vous  faites
        tourner  le  programme  dans  un  terminal  VT  ou  Xterm, et il
        rafraichira l'ecran, en attendant une connexion entrante sur  le
        port  87  (ttylink).  Lorsqu'une  connexion est recue, il separe
        l'ecran en deux, avec lequel vous pourrez dialoguer avec l'autre
        personne.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous    pouvez    obtenir    ttylinkd    sur:    sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/ttylinkd.tgz>       ou
        ftp.ucsd.edu
        <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming/ttylinkd.tgz>.

     LLiicceennccee//CCooppyyrriigghhtt
        Inconnu, je suppose librement distribuable.

  55..2222..  DDeemmoonn TTTTYYLLIINNKK ddee CCrraaiigg SSmmaallll

     NNoomm
        ttylinkd - un demon ttylink pour Linux.

     AAuutteeuurr
        Craig Small, VK2XLZ, csmall@triode.apana.org.au

     DDeessccrriippttiioonn
        Un demon pour accepter une connexion tcp/ip ttylink (port 87) et
        la convertir en une demande de discussion pour un utilisateur de
        la  machine  hote.  Il  peut  etre egalement configure pour etre
        utilise avec le programme _a_x_2_5_d en  sorte  que  les  utilsateurs
        AX.25 puisse aussi l'utiliser pour se connecter chez vous.

     SSttaattuutt
        Alpha, mais en ordre de marche.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss..
        support  reseau  dans  le  noyau  avec  support AX.25 si vous le
        desirez.

     DDeettaaiillss
        Parce que le protocole talk n'est pas standardise, c'est a  dire
        qu'il  n'est  en  fait  defini  nulle  part  (excepte  dans  les
        sources), le  protocole  ttylink  tire  de  NOS  est  devenu  un
        standard  de facto, au moins pour les amateurs, pour fournir une
        communication de clavier a clavier par-dessus tcp/ip.  Ce  demon
        repond au besoin d'avoir quelque chose pour les requetes ttylink
        sur des machines linux.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous  pouvez  obtenir  la  derniere  version  de  ttylinkd  sur:
        sunsite.unc.edu  <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>  ou
        ftp.ucsd.edu
        <ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming>.

        Une  version  legerement amelioree de ce logiciel est maintenant
        incluse dans le paquetage des utilitaires AX25 pour Linux.

     LLiicceennccee//CCooppyyrriigghhtt
        GNU Public License version 2.0

  66..  CCooddee MMoorrssee

  Logiciel pour  utilisation  en  conjonction,  ou  pour  faciliter  les
  communications Morse.

  66..11..  PPiilleeuupp

     AAuutteeuurr
        Richard Everitt G4ZFE richard@babbage.demon.co.uk. Base sur _s_c_c_w
        de Steve Merrifield.

     DDeessccrriippttiioonn
        Programme d'entrainement au pileup CW

     SSttaattuutt
        v1.0. Stable mais developpement prevu.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Linux avec support carte son

     DDeettaaiillss
        Entrainement au pileup CW  (similaire  a  PED)  base  sur  _s_c_c_w.
        Jusqu'a  9 stations au meme moment avec des vitesses differentes
        et des volumes/tonalites differents pour simuler un pileup.  Les
        indicatifs  sont extraits du log de M6A pendant le contest CQ WW
        CW pour ajouter un certain realisme.

        J'ai injecte /usr/dict/words au programme  et  c'etait  vraiment
        marrant.  Meme  si  vous  pas  fana  du morse ca vaut le coup de
        l'essayer pour rigoler.

     UUuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous  pouvez  obtenir  le  paquetage  pileup  depuis  son   site
        d'origine:            Page            d'accueil           Pileup
        <http://www.babbage.demon.co.uk/pileup.html> ou  sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>

     LLiicceennccee//CCooppyyrriigghhtt
        GNU GPL

     MMeerrccii aa
        Richard Everitt G4ZFE richard@babbage.demon.co.uk.

  66..22..  bbiipp

     AAuutteeuurr
        Marcin  Skubiszewski,  Marcin.Skubiszewski@inria.fr.   24 rue de
        l'Oasis, 92800 Puteaux, France

     DDeessccrriippttiioonn
        Un programme pour apprendre le morse  (pour  differentes  plate-
        formes du type Unix)

     SSttaattuutt
        Version definitive

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Fonctionne  sur  beaucoup de systeme type Unix, y compris Linux.
        Avec linux fonctionne avec ou sans X11 et une carte son.

     DDeettaaiillss
        _b_i_p offre un grand nombre d'options qui  le  rend  tout  a  fait
        adapte  comme programme d'entrainement. Il peut emettre un texte
        tire d'un fichier  texte  ou  bien  des  groupes  de  caracteres
        aleatoires, ainsi que d'autres fonctionnalites.Parmi celles-ci:

     +o  Morse compatible avec les specifications ARRL

     +o  volume et tonalte ajustables

     +o  vitesse ajustable, y compris la methode Farenheit

     +o  Hesitation pour simuler du morse envoye a la main

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Non  disponible  sur  le  reseau,  mais  quiconque peut ecrire a
        Marcin.Skubiszewski@inria.fr pour  obtenir  une  copie  du  code
        source.

     LLiicceennccee//CCooppyyrriigghhtt
        Shareware $10.

     MMeerrccii aa
        Marcin Skubiszewski, Marcin.Skubiszewski@inria.fr.

  66..33..  ccww22hheexx

     AAuutteeuurr
        G. Forrest Cook, WB0RIO, cook@stout.atd.ucar.edu

     DDeessccrriippttiioonn
        cw2hex convertit du texte ascii en fichier hexadecimaux pour les
        EPROMS de manipulateurs.

     SSttaattuutt
        La version 1.1 est testee et peut fonctionner.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Programme se suffisant a lui-meme, a besoin  de  gcc  pour  etre
        compile.

     DDeettaaiillss
        Ce  programme  transforme  une  entree  de type texte en signaux
        morse codes sous la forme d'un fichier hexadecimal  au  standard
        Intel.  Le fichier hexadecimal peut etre utilise pour programmer
        une EPROM qui sera connectee a un simple  circuit  generera  les
        messages  stockes.  Ce peut etre des machines a faire des appels
        CW et des manipulateurs automatiques pour balises CW. Un  schema
        de manipulateur accompagne le logiciel.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous     pouvez     obtenir    cw2hex    sur    www.atd.ucar.edu
        <http://www.atd.ucar.edu/homes/cook/software.html>

     LLiicceennccee//CCooppyyrriigghhtt
        GPL

     MMeerrccii aa::
        G. Forrest Cook, WB0RIO

  66..44..  SSoouunnddCCaarrdd CCWW

     AAuutteeuurr
        Steve Merrifield, VK3ESM, sjm@ee.latrobe.edu.au

     DDeessccrriippttiioonn
        Entrainement au morse pour Linux, utilisant une carte son

     SSttaattuutt
        Complet

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        carte son supportee sous Linux avec support FM.

     DDeettaaiillss
        Ce programme genere des caracteres  en  morse  en  utilisant  la
        carte  son.   Il  n'utilise pas les caracteristiques sonores des
        consoles  virtuelles  de  Linux  et  peut  donc   etre   utilise
        indifferemment sous X11 ou a partir d'une console virtuelle. Ses
        possiblites incluent:

     +o  Frequence ajustable

     +o  Volume ajustable

     +o  Vitesse ajustable

     +o  Delai ajustable

     +o  Taille des groupes ajustable

     +o  Generation de groupes aleatoires

     +o  Capable de decoder et de transmettre des fichiers textes

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Le  logiciel  peut  etre  obtenu   sur   son   site   d'origine:
        livewire.ee.latrobe.edu.au
        <http://livewire.ee.latrobe.edu.au/~sjm/morse>.

     CCooppyyrriigghhtt//LLiicceennccee
        Droiys de copie du style Berkeley. Le logiciel peut etre utilise
        librement pour autant que l'on fasse reference a l'auteur.

     MMeerrccii aa::
        Steve Merrifield, VK3ESM

  66..55..  EEnnttrraaiinneemmeenntt aauu mmoorrssee GGWW44PPTTSS..

     AAuutteeuurr
        Alan Cox, GW4PTS, alan@lxorguk.ukuu.org.uk

     DDeessccrriippttiioonn
        Un  logiciel  d'entrainement  au morse utilisant le haut-parleur
        interne du PC

     SSttaattuutt
        stable, Fonctionne assez bien, non termine.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Linux, toutes versions

     DDeettaaiillss
        Alan ecrivit ce petit programme en seulement une heure.  Il  est
        tout a fait propre, et vous permet de faire du morse a plusieurs
        vitesses et frequences avec le haut-parleur interne du PC.  Vous
        pouvez  specifier  le texte qui doit etre utilise, soit a partir
        de la ligne de commande, soit a partir d'un fichier, ou bien  le
        programme  est  capable  de  generer  des  groupes de caracteres
        aleatoires. Tel qu'il est, vous devez  appeler  le  programme  a
        partir  d'une  console  virtuelle  Linux,  car  il  s'appuie sur
        certains appels au noyau pour produire le  son,  et  ceux-ci  ne
        marchent pas aussi bien a partir d'un Xterm. A chaque fois qu'il
        joue un caractere, il imprime celui-ci sur  l'ecran  sous  forme
        verbale   (Di,  Dit,  Dah  etc..).  Alan  espere  que  quelqu'un
        reprendra les sources et l'ameliorera avec  les  fonctionnalites
        qu'il a listees dans les commentaires en tete du fichier source.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        J'ai eu un grand nombre de reponses de personnes recherchant  le
        code,  aussi  ai-je  obtenu  l'autorisation  d'Alan de le rendre
        disponible.   Vous   pouvez   l'obtenir   sur    sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/GW4PTS.morse.tar.z>.

     CCooppyyrriigghhtt//LLiicceennccee
        GNU  Public License 2, librement redistributable, sans garantie.

  66..66..  mmoorrssee ((aakkaa ssuuppeerriioorrmmoorrssee))

     AAuutteeuurr
        Joe Dellinger,  joe@sep.stanford.edu,  jdellinger@trc.amoco.com,
        joe@soest.hawaii.edu

     DDeessccrriippttiioonn
        Un  programme  d'entrainement  au  morse  pour  les  stations de
        travail UNIX.

     SSttaattuutt
        Tout a fait stable

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        A l'heure actuelle supporte X11, Sun4, HP, Indigo, et Linux

     DDeettaaiillss
        Beaucoup de fonctionnalites et d'options. Comprend un utilitaire
        pour  generer  des  QSO  au contenu aleatoire, semblables a ceux
        utilises dans les examens FCC.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr::
        morse.tar.gz  peut   etre   obtenu   sur:   sepftp.standford.edu
        <ftp://sepftp.stanford.edu/pub/UNIX_utils/morse/>.

     LLiicceennccee//CCooppyyrriigghhtt
        Librement Redistributable

     MMeerrccii aa::
        Brian Suggs, AC6GV, et John Gotts

  77..  LLooggiicciieellss AAMMTTOORR

  Programmes pour utiliser avec, ou pour faciliter l'AMTOR.

  88..  LLooggiicciieellss PPAACCTTOORR

  Programmes pour utiliser avec, ou pour faciliter le PACTOR.

  99..  LLooggiicciieellss ppoouurr llaa tteelleevviissiioonn aa bbaallaayyaaggee lleenntt

  Programmes  pour  utiliser  avec,  ou  pour  faciliter la television a
  balayage lent.

  1100..  LLooggiicciieellss ddee ffaaccssiimmiillee

  Programmes pour utiliser avec, ou pour faciliter le facsimile.

  1111..  LLooggiicciieellss ppoouurr ccoonncceevvooiirr eett ccoonnssttrruuiirree

  Programmes pour faciliter la conception et  la  construction  d'objets
  ayant  rapport  avec le radioamateurisme. Les logiciels pour antennes,
  circuits, filtres et cartes QSL sont  de  bons  candidats  pour  cette
  section.

  1111..11..  oossccooppee -- PPrrooggrraammmmee OOsscciilllloossooppee aammeelliioorree

     AAuutteeuurr
        Tim Witham, twitham@pcocd2.intel.com

     DDeessccrriippttiioonn
        `oscope'  est un oscilloscope 44 kHz digital pour /dev/dsp. Il a
        pour base le  travail  original  de  Jeff  Tranter,  decrit  ci-
        dessous, mais a ete ameliore de maniere significative.

     SSttaattuutt
        Premiere version de production.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        A besoin d'une carte son supportee par le noyau et pouvant aller
        de 8800 Hz a 44 kHz, du paquetage  `_l_i_b_s_x'  pour  construire  le
        client  _x_o_s_c_o_p_e,  du  paquetage `_s_v_g_a_l_i_b' pour construire _o_s_c_o_p_e
        fonctionnant sur  la  console,  du  paquetage  `_g_3_v_g_a'  pour  la
        console  texte,  et  d'un  programme  de  mixage pour choisir la
        source d'entree et son niveau.

     DDeettaaiillss
        Inclut oscope pour l'affichage sur une console SVGA et  xoscope,
        un  client  X11.  Les possibilites comprennent un echantillonage
        8-bit de 2 canaux 44kHz, une echelle de temps de 5  us/div  a  5
        ms/div,  5  mesures  automatiques,  des  fonctions mathematiques
        internes et externes comme sum, diff, avg, et FFT, 26 tampons de
        memoire,  8  affichages  de signal simultanes, et possibilite de
        charger/sauvegarder des fichiers.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        le paquetage oscope peut etre obtenu soit sur  www.bobsplace.com
        <http://www.bobsplace.com/~twitham/>  soit  sur  sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/>.

     LLiicceennccee//CCooppyyrriigghhtt
        GNU Public License, Librement redistributable, sans garantie.

     MMeerrccii aa::
        Tim Witham

  1111..22..  LLooggiicciieell OOsscciilllloossccooppee

     AAuutteeuurr
        Jeff Tranter, Jeff_Tranter@Mitel.COM

     DDeessccrriippttiioonn
        Scope est un programme  simple  d'emulation  d'oscilloscope.  Il
        donne une vision graphique de la tension en fonction du temps.

     SSttaattuutt
        ALPHA. Premiere version.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 avril 97

     SSyysstteemmee rreeqquuiiss
        Carte  son avec une entree supportee par le pilote son du noyau.
        Pour le graphisme SVGALIB est utilise.

     DDeettaaiillss
        Scope  utilise  le  peripherique  /dev/dsp  pour   les   donnees
        provenant  de la carte sonore, et l'affiche a l'ecran tout comme
        un oscilloscope.  Jeff affirme que Scope a ete ecrit  plus  pour
        s'amuser que pour une utilisation serieuse.

     OOuu eett ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee
        Pour obtenir les sources, le makefile et les man page de Scope :

        sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/>

     LLiicceennccee//CCooppyyrriigghhtt
        GNU Public License, Distribution gratuite, sans garantie.

  1111..33..  OOuuttiill ddee ccoonncceeppttiioonn ddee ccaarrtteess ddee cciirrccuuiitt iimmpprriimmee..

     AAuutteeuurr
        Thomas Nau, Thomas.Nau@rz.uni-ulm.de

     DDeessccrriippttiioonn
        Un  outil  de conception de carte de circuit imprime interactif,
        base sur X11.

     SSttaattuutt
        Vers 1.4.1, stable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Systeme de fenetrage X11 et programme flex recent.

     DDeettaaiillss
        Ce paquetage est live avec de bonnes instructions sur la maniere
        de  compiler  et  d'installer  le logiciel. Je l'ai compile sans
        erreurs sous X11R6. Il est livre avec les dessins  de  plusieurs
        composants  bien  connus et l'exemple de dessin montre tres bien
        les possibilites du paquetage.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous  pouvez  obtenir  le  paquetage  pcb  sur:   ftp.uni-ulm.de
        <ftp://ftp.uni-ulm.de/pub/pcb/current>  ou  sur: sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/>

     LLiicceennccee//CCooppyyrriigghhtt
        GNU Public License

  1111..44..  OOuuttiill ddee ssiimmuullaattiioonn eett ddee ccoonncceeppttiioonn ddee cciirrccuuiitt CChhiippmmuunnkk

     AAuutteeuurr
        Dave    Gillespie    daveg@synaptics.com    et    John   Lazzaro
        lazzaro@cs.berkeley.edu

     DDeessccrriippttiioonn
        Ensemble d'outils de conception de  schemas,  et  de  simulation
        analogique ou digitale.

     SSttaattuutt
        vers 5.10, stable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Systeme   de  fenetrage  X11  et  bibliotheques  plus  anciennes
        (XFree86-2.x), uniquement 8 bpp (256 couleurs)

     DDeettaaiillss
        Je ne l'ai pas encore essaye. C'est un ensemble d'outils pour la
        conception et la simulation de circuits.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous   pouvez   obtenir  le  paquetage  Chipmunk  sur  son  site
        d'origine:                                  www.pcmp.caltech.edu
        <http://www.pcmp.caltech.edu/chipmunk/>.

     LLiicceennccee//CCooppyyrriigghhtt
        GNU  Public License modifiee, Caltech denie specifiquement toute
        responsabilite.

  1111..55..  iirrssiimm

     AAuutteeuurr
        Dmitry Teytelman, dim@leland.stanford.edu

     DDeessccrriippttiioonn
        Un simulateur de niveaux logiques dirige par les evenements pour
        les circuits MOS.

     SSttaattuutt
        Version 9.2, production.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 avril 97

     SSyysstteemmee rreeqquuiiss
        X-Windows.

     DDeettaaiillss
        irsim est un simulateur base sur X11 pour les circuits MOS. Il y
        a deux modes  de  simulation,  soit  le  mode  _s_w_i_t_c_h  :  chaque
        transistor  est  modelise  comme un interrupteur controle par la
        tension, soit _l_i_n_e_a_r chaque transistor  est  modelise  comme  un
        interrupteur   controle   par  la  tension  en  serie  avec  une
        resistance et chaque couple a une capacite.

     OOuu eett ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee..
        Pour obtenir irsim :

        sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/>.

     LLiicceennccee//CCooppyyrriigghhtt
        Distribution gratuite

  1111..66..  SSppiiccee vveerrssiioonn 33ff44

     AAuutteeuurr
        Universite     de     Californie,     Berkeley,    portage    de
        Jeff@RyeHam.EE.Ryerson.Ca

     DDeessccrriippttiioonn
        Spice est un emulateur de circuits analogiques.

     SSttaattuutt
        Version stable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 avril 97

     SSyysstteemmee rreeqquuiiss
        Inconnu.

     DDeettaaiillss
        Spice permet  la  creation  et  le  test  de  circuits  dans  un
        environnement   informatique  pour  voir  comment  ils  vont  se
        comporter sans toucher au fer a  souder  ou  a  la  soudure.  Un
        fichier  readme  accompagne le paquetage. Pour l'installer, j'ai
        fait ce qui suit:

          # cd /usr/src
          # gzip -dc spice3f4.tar.gz | tar xvf -
          # cd spice3f4
          # ./utils/build linux
          # .utils/build linux install

     OOuu ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee..
        Version 3f4 de Spice disponible sur :

        sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/spice3f4.tar.z>

     LLiicceennccee//CCooppyyrriigghhtt
        Copyright  par  University  California,  Berkeley.  Distribution
        gratuite si vous n'etes pas hostile aux US.

  1111..77..  ssvvggaafffftt -- AAnnaallyysseeuurr ddee ssppeeccttrree

     AAuutteeuurr
        Andrew Veliath, veliaa@rpi.edu

     DDeessccrriippttiioonn
        svgafft est un analyseur de spectre pour Linux.

     SSttaattuutt
        Alpha, mais utilisable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        F77, une carte son supportee par Linux, svgalib, un  486DX33  ou
        mieux.

     DDeettaaiill
        svgafft  utilise  le pilote de peripherique /dev/dsp et supporte
        actuellement une resolution d'echantillonage de  16  bits  et  8
        bits  sur les cartes son supportees. Son affichage s'apparente a
        un analyseur de spectre de haut niveau  a  pente  raide.  Andrew
        travaille sur une version X-Motif qui sera bientot disponible.
     OOuu eett ccoommmmeenntt ll''oobbtteenniirr::
        Vous  pouvez  trouver  le  paquetage  svgafft sur tsx-11.mit.edu
        <ftp://tsx-11.mit.edu/pub/linux/ALPHA/svgafft/>              and
        sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/sound/freqs/>.

     LLiicceennccee//CCooppyyrriigghhtt
        GNU Public License.

     MMeerrccii aa::
        Andrew Veliath

  1111..88..  AAnnaallyysseeuurr ddee ssppeeccttrree aauuddiioo

     AAuutteeuurr
        Philip VanBaren, phillipv@eecs.umich.edu

     DDeessccrriippttiioonn
        Un analyseur de spectre audio pour SVGALIB Linux ou X-Window.

     SSttaattuutt
        Alpha mais utilisable

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Une carte son supportee par Linux, svgalib ou X-Window.

     DDeettaaiillss
        freq5a1   utilise   le   pilote   de   peripherique    /dev/dsp,
        echantillonne  le  son  entrant,  effectue  une  transformee  de
        Fourier sur les  donnees  et  affiche  la  sortie  soit  en  VGA
        640x480, soit sous X-Window.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr::
        Vous   pouvez   obtenir   freq5a1.tar.gz   sur:  sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/sound/freqs/>    ou     en
        ecrivant a l'auteur.

     LLiicceennccee//CCooppyyrriigghhtt
        GNU Public License vers 2.0.

  1111..99..  OObbjjeeccttPPrrooDDSSPP

     AAuutthhoorr
        Paul Budnik, Mountain Math Software, support@mtnmath.com

     DDeessccrriippttiioonn
        ObjectProDSP  est  un outil oriente objet pour la conception, le
        developpement  et  l'implementation  de  traitement  de  signaux
        digitaux   (DSP:   Digital  Signal  Processing).  Il  permet  de
        concevoir votre reseau DSP, effectue des simulations avec traces
        comme  pour  un  oscilloscope  et  un  etat  de  la  situation a
        n'importe quel point du reseau.

     SSttaattuutt
        Alpha version 0.2.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        XFree86 3.1.1 ou ulterieur, g++ de gcc 2.6.3 ou ulterieur,  32Mb
        de  memoire  totale  (reelle  + swap) recommandee, 6 Mo d'espace
        disque  pour  la  configuration   minimale   et   40   Mo   pour
        l'installation complete.

     DDeettaaiillss
        Il  y a un grand nombre de fichiers dans le paquetage. Il existe
        un paquetage ne contenant que les binaires avec lequel  je  vous
        conseille  de  demarrer.  Une  documentation claire est incluse,
        avec laquelle vous obtiendrez les instructions d'installation et
        le mode operatoire.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous    pouvez   obtenir   ObjectProDSP   sur:   sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/devel/opd>,      tsx-11.mit.edu
        <ftp://tsx-11.mit.edu/pub/linux/packages/dsp>,  or  ftp.funet.fi
        <ftp://ftp.funet.fi/pub/Linux/util/electronics/opd>.  il y a  un
        grand  nombre de fichiers dans le paquetage et certains des plus
        gros, soyez donc prets.

     LLiicceennccee//CCooppyyrriigghhtt
        GNU Public License vers 2.0., Licence commerciale possible.

  1111..1100..  bbppff -- ccaallccuullaatteeuurr ddee ffiillttrree ppaassssee--bbaannddee..

     AAuutteeuurr
        G. Forrest Cook, WB0RIO, cook@stout.atd.ucar.edu

     DDeessccrriippttiioonn
        bpf aide a la conception de filtres passe-bande deux poles.

     SSttaattuutt
        Stable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Programme texte se suffisant a lui-meme, necessite gcc  pour  la
        compilation.

     DDeettaaiillss
        _b_p_f  est un simple programme a interface texte qui vous offre un
        menu  d'options  avec  differentes  possibilites  d'entrer   les
        donnees  de  conception.  Apres  les  avoir entrees, il donne un
        diagramme de circuit et une liste de  valeurs  appropriees  pour
        les  composants.  Cela  parait  simple,  et ca l'est, mais c'est
        aussi original, et bien ficele.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous   pouvez    obtenir    bpf.tar.Z    sur    www.atd.ucar.edu
        <http://www.atd.ucar.edu/homes/cook/software.html>

     LLiicceennccee//CCooppyyrriigghhtt
        GPL

  1122..  LLooggiicciieellss ddee ffoorrmmaattiioonn//eedduuccaattiioonn

  Programmes  pour l'entrainement ou l'apprentissage pour radioamateurs.
  Apprendre la CW, base de donnees pour l'examen  technique,  et  autres
  seront listes ici.
  1133..  LLooggiicciieellss ddiivveerrss

  Programmes que je n'ai pu mettre ailleurs.

  1133..11..  ttwwcclloocckk -- HHoorrllooggee ddoonnnnaanntt ll''hheeuurree ddaannss llee mmoonnddee ppoouurr rraaddiioo--aammaa--
  tteeuurrss..

     AAuutteeuurr
        Ted Williams, ted@bluestone.com

     DDeessccrriippttiioonn
        Une  horloge  pour  le  monde, concue pour les operateurs radio-
        amateurs.

     SSttaattuutt
        Version 1.0, stable.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr aauu
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Bibliotheques Motif si vous voulez le recompiler. Seulement  X11
        si vous voulez utiliser les binaires precompiles.

     DDeettaaiillss
        Toute  personne  qui  a  besoin  de l'heure quelque part dans le
        monde, ou  toute  personne  lassee  de  voir  toujours  la  meme
        horloge,  touvera un interet dans ce logiciel. Il est implemente
        avec des widgets Motif, et affiche  l'heure  courante  dans  les
        plus grandes villes du monde.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous  pouvez  obtenir  le  paquetage twclock sur sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>.

     LLiicceennccee//CCooppyyrriigghhtt
        GNU GPL

  1133..22..  CChhiirrpp -- UUnn jjoouurrnnaall ddee CCoonntteesstt

     AAuutteeuurr
        Kenneth E. Harker, N1PVB, kharker@cs.utexas.edu

     DDeessccrriippttiioonn
        programme de journal de contest

     SSttaattuutt
        En developpement actif

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr llee
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Necessite la bibliotheque ncurses et les  fichiers  header  pour
        compiler.

     DDeettaaiillss
        Un  programme  de journal de contest base sur Linux. Kenneth l'a
        ecrit et ainsi il peut l'utiliser sur son portable  pendant  les
        contests  VHF.  Il  l'a  egalement  ecrit  comme  pretexte  pour
        apprendre la programmation de ncurses. Son but  est  d'avoir  un
        journal  de contest d'interet general en sorte qu'un utilisateur
        peut enregistrer de nouveaux contests au fur et a mesure  qu'ils
        arrivent. Il supporte toutes les bandes et tous les modes.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Quand  la  version  1.0 sera disponible, vous devriez la trouver
        sur:              Page              d'acceuil              Chirp
        <http://www.cs.utexas.edu/users/kharker/chirp/>

     LLiicceennccee//CCooppyyrriigghhtt
        Probabement GNU GPL.

     MMeerrccii aa
        Kenneth E. Harker, N1PVB, kharker@cs.utexas.edu

  1133..33..  CCoonntteesstt -- UUnn pprrooggrraammmmee ddee jjoouurrnnaall ddee ccoonntteesstt

     AAuutteeuurr
        Carsten Wilderotter, carsten.wilderotter@student.uni-ulm.de

     DDeessccrriippttiioonn
        Un programme pour journal de contest

     SSttaattuutt
        Version 0.0.1, Alpha

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr llee
        01 Avril 97

     SSyysstteemmee rreeqquuiiss
        Rien de special.

     DDeettaaiillss
        programme de journal de contest Linux.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Vous  pouvez  obtenir  le paquetage contest sur: sunsite.unc.edu
        <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>

     LLiicceennccee//CCooppyyrriigghhtt
        GNU GPL

  1133..44..  CCDD--RROOMM LLiinnuuxx ppoouurr lleess rraaddiioo--aammaatteeuurrss..

     AAuutteeuurr
        Bruce Perens, bruce@pixar.com

     DDeessccrriippttiioonn
        Une distribution complete linux sur CDROM dediee  specifiquement
        aux radio-amateurs.

     SSttaattuutt
        Pas encore disponible.

     IInnffoorrmmaattiioonnss mmiisseess aa jjoouurr llee
        01 Avril 97

     SSyysstteemmee rreeqquuiiss..
        Un  materiel  compatible  Linux,  quelques logiciels demanderont
        evidemment un materiel adequat pour tourner.  Pas  de  logiciels
        supplementaires demandes.

     DDeettaaiillss
        Une  distribution complete de Linux qui s'adresse specifiquement
        aux  radio-amateurs.  Elle  comprendra  une  installation  Linux
        complete  plus un certain nombre de logiciels specifiques radio-
        amateurs comme ceux listes dans  ce  document.  Bruce  donne  le
        detail  et  l'etat  de  la mise a jour sur LinuxForHams WWW page
        <http://www.rahul.net/perens/LinuxForHams>.  Bruce  a  ete  fort
        occupe  avec  le  projet Debian et a reduit son temps disponible
        pratiquement a zero. Il a  vraiment  l'intention  de  continuer.
        Pourquoi  n'aideriez-vous pas en maintenant un des paquetages de
        logiciel en tant que paquetage Debian ? Pour plus d'information,
        voir Debian Web Site <http://www.debian.org/>.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr::
        Non  encore  disponible,  des  details  viendront  au  moment de
        l'edition.

     LLiicceennccee//CCooppyyrriigghhtt
        GNU Public License.

     MMeerrccii aa::
        Bruce Perens

  1133..55..  SSuunnCClloocckk

     AAuutteeuurr
        John Mackin, john@cs.su.oz.AU

     DDeessccrriippttiioonn
        Une horloge qui  vous  montre  quelles  parties  du  globe  sont
        exposees au soleil ou pas.

     SSttaattuutt
        Remis a jour.

     SSyysstteemmee rreeqquuiiss..
        X-Windows.

     DDeettaaiillss
        _s_u_n_c_l_o_c_k est un de ces gadgets que beaucoup apprecient mais n'en
        ont pas vraiment besoin. Je l'utilise pour avoir l'heure dans le
        monde entier en un coup d'oeil. Sous forme d'icone il represente
        une projection de Mercator. En l'ouvrant on a la meme image mais
        plus grande et avec plus de details. On peut avoir aussi la date
        l'heure locale ou UTC. sunclock calcule quelles  parties  de  la
        terre sont eclairees ou pas sans tenir compte de l'atmosphere.

     OOuu eett ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee
        Je  n'ai  jamais vu une version precompilee pour Linux, regardez
        sur votre site prefere. sunclock se compile tres  bien  en  tout
        cas pour moi.

     LLiicceennccee//CCooppyyrriigghhtt
        Domaine  Public  et  peut etre copie gratuitement tant que l'en-
        tete du fichier sunclock.c reste intacte.

  1133..66..  XXeeaarrtthh

     AAuutteeuurr
        Kirk Lauritz Johnson, tuna@cag.lcs.mit.edu, modifie par Dimitris
        Evmorfopoulos, devmorfo@cs.mtu.edu.

     DDeessccrriippttiioonn
        Une  terre  en  rotation  pour  la  fenetre root d'X-windows. Le
        programme montre les zones d'ombre en temps  reel,  et  comporte
        une option pour une vue geostationnaire ou pas. Une version plus
        complete et plus recente existe mais reclame plus  de  puissance
        du processeur.

     SSttaattuutt
        Stable.

     SSyysstteemmee rreeqquuiiss
        X-Windows.

     DDeettaaiillss
        _x_e_a_r_t_h  ressemble  a  _s_u_n_c_l_o_c_k  sauf qu'il dessine la terre dans
        votre fenetre principale en bleu et vert,  exactement  comme  si
        elle  etait  regardee  depuis l'espace. Il y a beaucoup d'option
        pour modifier la vue. Vous pouvez voir toujours la  meme  region
        de  la terre, donc les passages jour/nuit, ou bien avoir une vue
        du soleil vers la terre et la voir tourner. Il est  possible  de
        specifier  la  latitude  et  la longitude du centre de la scene.
        _x_e_a_r_t_h est aussi capable de produire des  fichiers  _g_i_f  et  _p_p_m
        pour  garder  une  trace  de la terre a un moment donne. Sur mon
        486sx25 j'ai note une petite degradation des  performances  lors
        des calculs de _x_e_a_r_t_h.

     OOuu eett ccoommmmeenntt oobbtteenniirr llee pprrooggrraammmmee
        Une   version   precompilee  de  _x_e_a_r_t_h  est  disponible  sur  :
        ssuunnssiittee..uunncc..eedduu,  et  les  sources  sont  disponibles  dans   le
        repertoire  X11/contrib.  Essayez  eexxppoorrtt..llccss..mmiitt..eedduu si vous ne
        pouvez les trouver ailleurs.

     LLiicceennccee//CCooppyyrriigghhtt
        Copyright (C) 1989, 1990, 1993  par  Kirk  Lauritz  Johnson.  La
        notice  du  copyright  indique  que  _x_e_a_r_t_h  peut etre distribue
        gratuitement tant que cette notice est livree  intacte  avec  la
        documentation.

     MMeerrccii aa::
        Kirk Johnson

  1144..  CCoommmmeenntt ccoonnttrriibbuueerr oouu rreemmeettttrree aa jjoouurr ccee HHOOWWTTOO

  je  souhaiterais  que cette liste demeure aussi complete et a jour que
  possible. Aussi je suis  desireux  de  prendre  connaissance  de  tout
  developpement ou produit dont je n'aurais pas eu connaissance, ou dont
  les donnees sont obsoletes ou perimees.

  Ce que je souhaiterais comme  minimum  d'informations  serait  quelque
  chose dans le style:

     NNoomm
        Le nom du logiciel en question.

     AAuutteeuurr
        Qui  a ecrit, ou porte le logiciel. Une adresse electronique, ou
        tout autre moyen de contact est aussi necessaire.

     DDeessccrriippttiioonn
        Une seule ligne pour decrire ce que fait le logiciel.

     SSttaattuutt
        Une indication sur l'etat du logiciel. Est-il toujours en  essai
        ?  Est-ce  que c'est une version de production ? Est-il toujours
        au stade de conception ?

     SSyysstteemmee rreeqquuiiss
        De quoi a besoin ce logiciel pour tourner ? A-t-il besoin de  X-
        Window  ?  A-t-il  besoin  d'une  carte son ? Necessite-t-il une
        certaine version du noyau ? A-t-il besoin  d'un  autre  logiciel
        pour le supporter ?

     DDeettaaiillss
        Je ne suis partisan d'inclure une grande quantite de details sur
        chaque logiciel car cela prendra beaucoup de temps pour lire  et
        pour essayer de mettre a jour. Des lors je prefererais mettre ce
        qui rend ce logiciel unique, tout ce qui le rend special.  Peut-
        etre  ses  fonctionnalites qui ressortent le plus, ou ce type de
        choses.

     OOuu eett ccoommmmeenntt ll''oobbtteenniirr..
        Si le logiciel est librement distribuable,  donnez  des  details
        pour  savoir  comment le telecharger, ce serait bien.  Si il est
        de  type  commercial,  donnez  alors  le  nom  de   la   societe
        distributrice,  une  adresse  et  un numero de telephone.  Si il
        n'est disponible que par d'autres moyens, par  exemple  commande
        par courrier, donnez alors des details pour savoir ou et comment
        l'obtenir.

     LLiicceennccee//CCooppyyrriigghhtt
        Est-ce que le logiciel  est  depose?  Copyright?  Shareware?  du
        domaine  public? a usage restreint d'une maniere ou d'une autre?

  Ne vous en faites pas si vous ne  connaissez  pas  tous  les  details,
  envoyez  moi  seulement ce que vous savez et je transmettrai ce que je
  peux. je prefere avoir une liste incomplete que pas de liste du  tout.

  SVP envoyez le courrier et contributions a:

  terry@perf.no.itg.telstra.com.au

  J'avais une adresse packet-radio egalement, mais je ne suis pas encore
  veritablement operationnel apres avoir demenage.

  1155..  DDiissccuussssiioonnss rreellaattiivveess aauu RRaaddiioo aammaatteeuurriissmmee eett aa LLiinnuuxx

  Il y a plusieurs endroits ou ces discussions peuvent etre entreprises.
  Dans  les  newsgroups  comp.os.linux.* mais aussi dans la liste linux-
  hams sur vger.rutgers.edu. Il y a aussi la  liste  de  diffusion  tcp-
  group de ucsd.edu (discussion sur tcp/ip amateur).

  Pour rejoindre la liste Linux lliinnuuxx--hhaammss, envoyez un mail a:

       Majordomo@vger.rutgers.edu

  avec la ligne :

       sunscribe linux-hams

  en haut du message (pas sur la ligne subject).
  Pour rejoindre la liste tcp-group, envoyez un mail a:

       listserver@ucsd.edu

  avec la ligne :

       subscribe tcp-group

  dans le message.

  NNoottee :: SVP souvenez-vous que tcp-group a ete cree pour les discussions
  concernant l'utilisation de protocoles de  haut  niveau,  dont  tcp/ip
  fait  partie,  pour radioamateurs. _L_e_s _q_u_e_s_t_i_o_n_s _s_p_e_c_i_f_i_q_u_e_s _s_u_r _L_i_n_u_x
  _n_e _s_o_n_t _p_a_s _e_n _g_e_n_e_r_a_l _a _a_d_r_e_s_s_e_r _d_a_n_s _c_e _g_r_o_u_p_e_.

  1166..  CCooppyyrriigghhtt..

  HAM-HOWTO, une introduction aux logiciels  radio-amateurs  disponibles
  sur  Linux  et  des  informations  sur  la  configuration de certains.
  Copyright (c) 1995,1996 Terry Dawson.

  Cette documentation est libre, vous pouvez la  redistribuer  et/ou  la
  modifier  selon les termes de la Licence Publique Generale GNU publiee
  par la Free Software Foundation (version 2 ou bien toute autre version
  ulterieure choisie par vous).

  Cette  documentation  est  distribuee  car potentiellement utile, mais
  SANS AUCUNE  GARANTIE,  ni  explicite  ni  implicite,  y  compris  les
  garanties de commercialisation ou d'adaptation dans un but specifique.
  Reportez-vous a la Licence Publique Generale GNU pour plus de details.

  Vous  pouvez  obtenir une copie de la Licence Publique Generale GNU en
  ecrivant    a    la    Free    Software     Foundation     www.fsf.org
  <http://www.fsf.org>,  Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-
  Unis.

  HOWTO Java pour Linux
  maintenu par Eric S. Raymond (esr@snark.thyrsus.com)
  Adaptation francaise par Arnaud Ruch (ruch@donald.fdn.fr)
  v.2.2, 10 Fev 1996

  Ce document decrit de facon succinte la mise en place et l'utilisation
  de Java et HotJava sous Linux. Il s'adresse aussi  bien  aux  utilisa-
  teurs qu'aux programmeurs.

  11..  IInnttrroodduuccttiioonn

  Ce document est une introduction Linux-centrique aux mondes de Java et
  HotJava. Ces technologies  connaissant  une  evolution  rapide,  toute
  contribution est la bienvenue.

  Certaines  parties  de  ce  document  demandent  serieusement  a  etre
  verifiees  ou  completees  [cf.  ``A  ajouter...''].  Pour   aider   a
  l'amelioration de ce HOWTO, envoyez toute demande de mise a jour et de
  modification a esr@snark.thyrsus.com.

  22..  QQuueessttiioonnss dd''oorrddrree ggeenneerraall ssuurr JJaavvaa eett HHoottJJaavvaa

  Cette partie est une introduction generale (non specifique a Linux)  a
  Java et HotJava.

  22..11..  QQuuee ssoonntt JJaavvaa eett HHoottJJaavvaa ?? EEnn qquuooii ssoonntt--iillss iinntteerreessssaannttss ??

  Java est un langage oriente reseau. Similaire  au  C++,  il  est  plus
  compact  et  a ete concu plus proprement. Il met en oeuvre une gestion
  memoire semblable a celle du Lisp (ramasse-miettes), mais  dispose  en
  plus  d'une  verification  statique des types, raison pour laquelle il
  est parfois decrit avec ironie comme un "Smalltalk dote d'une  syntaxe
  coherente".  Les  processus  legers  (threads)  y  sont integres et il
  dispose de nombreuses  possibilites  en  termes  de  securite  reseau.
  Jusqu'a  present,  la principale application realisee grace a Java est
  le navigateur WWW HotJava, mais l'avenir  de  Java  comme  langage  de
  developpement d'applications de tous types semble prometteur.

  HotJava  est  un  navigateur WWW ecrit en Java. Son principal avantage
  sur ses concurrents est de pouvoir traiter une  nouvelle  construction
  HTML  appelee "APPLET". Une applet est un programme Java qui s'execute
  sur la machine cliente.  Les  documents  WWW  peuvent  par  consequent
  contenir des objets "vivants" et non plus de simples donnees.

  La  possibilite  de  transferer  des  objets executables represente le
  progres le plus significatif de  la  technologie  du  World  Wide  Web
  depuis  l'apparition de Mosaic. L'application la plus immediate en est
  de  pouvoir  concevoir  un  navigateur  Web  qui  ne  necessite   plus
  d'incessantes  mises  a jour pour etre capable de traiter les nouveaux
  formats d'images et les nouvelles constructions.

  Un programme Java est transforme par  compilation  en  un  pseudo-code
  appele  "J-code" que l'interpreteur Java a pour role d'executer. Il se
  pourrait bien que le J-code soit en passe  de  devenir  une  reference
  universelle en matiere de code independant s'executant sur une machine
  virtuelle, ou encore comme langage de compilation  intermediaire.  Des
  rumeurs  courent  a  propos  de  l'existence  d'un  compilateur ADA-95
  generant du J-code et sur le developpement d'un tel  compilateur  pour
  le  langage  C.  Il  est  probable  qu'en  fin  de compte, de nombreux
  langages de haut  niveau  permettront  d'ecrire  des  applets  ou  des
  programmes  complets  sur  toute  machine  disposant d'un interpreteur
  Java.  On peut aussi signaler l'apparition  de  microprocesseurs  Java
  dont le jeu d'instruction est le J-code.
  22..22..  DD''oouu vviieennnneenntt JJaavvaa eett HHoottJJaavvaa ?? QQuuii aa llee ddrrooiitt ddee lleess uuttiilliisseerr ??

  Java  et  HotJava  ont  ete  developpes chez Sun Microsystems, par une
  equipe conduite par James Gosling (deja largement connu  pour  Gosling
  Emacs et NeWS).

  La derniere tentative menee par Sun pour imposer un standard technique
  majeur a ete NeWS, son systeme de  fenetrage  reseau  (Network  Window
  System).  Bien  que  la  superiorite  de  NeWS  sur X ait ete reconnue
  presque unanimement, X a gagne la bataille pour la simple  raison  que
  les  sources  en  etaient  gratuitement  disponibles.  Cet echec a ete
  formateur pour Sun : Java et HotJava sont  aisement  accessibles,  les
  fichiers  source  peuvent  etre  telecharges  selon  les  termes d'une
  licence  relativement   souple   [cf.   ``Java,   logiciel   librement
  diffusable'']  et  Sun  encourage les portages vers des environnements
  autres que Sun.

  Netscape est deja capable d'interpreter du Java. Microsoft a acquis la
  licence  de  la  technologie  en  Decembre 1995. Il semble donc que le
  support de Java soit en passe de devenir universel en 1996.

  A l'origine, Java s'appelait Oak. HotJava  fut  quant  a  lui  denomme
  WebRunner.

  22..33..  QQuueellllee eesstt llaa mmaattuurriittee ddee JJaavvaa ??

  Le  12  Decembre  1995, Sun mettait a disposition du public la version
  'Beta 2' de Java. Un mois plus tard venait le tour de la version  1.0,
  premiere  version dite de "production". L'API (Application Programmers
  Interface) de l'environnement Java, qui definit son acces  au  systeme
  d'exploitation  et  au systeme de fenetrage de la machine hote, semble
  avoir ete "gelee" : elle pourra etre etendue, mais ne sera pas  rendue
  incompatible avec la version actuelle.

  La  version 1.0 de ce document a ete rendue publique en meme temps que
  la version beta 1.0 du kit de developpement  Java  (JDK)  pour  Linux,
  dont le portage a ete realise par Randy Chapman.

  C'est  un  fait  connu  que de serieux trous de securite existent dans
  l'implementation de Java. Ce n'est donc pour l'instant  pas  une  tres
  bonne  idee  que  d'utiliser Java pour des applications sensibles. Ces
  problemes seront certainement resolus dans les versions de  production
  (post-beta).

  22..44..  OOuu ppeeuutt--oonn ttrroouuvveerr ddee llaa ddooccuummeennttaattiioonn ssuurr JJaavvaa eett HHoottJJaavvaa ??

  Sun tient a jour un serveur Web complet proposant  des  documents  sur
  Java et HotJava a l'adresse : http://java.sun.com.
  Des copies de ces documents se trouvent en d'autres endroits, tels que
  http://java.blackdown.com (Sun fournit une liste de sites miroirs).

  22..55..  CCeerrtteess,, mmaaiiss oouu ttrroouuvveerr uunnee ddooccuummeennttaattiioonn ppaappiieerr ??

  La serie officielle des manuels Java de SunSoft Press est en cours  de
  production  chez  Addison-Wesley. On peut trouver quelques details sur
  ces ouvrages dans comp.lang.java FAQ

  Certains des pionniers de Java ont  recommande  l'ouvrage  "Hooked  on
  Java",  ecrit  par  les  membres de l'equipe de developpement de Java.
  L'un des commentaires qui ont ete faits  sur  ce  livre  est  :  "Bien
  ecrit, mais j'aurais apprecie quelque chose de moins basique".

  O'Reilly  &  Associates  travaille  actuellement  sur  sa propre serie
  d'ouvrages traitant de Java, en collaboration avec Sun.   On  trouvera
  (au  moins)  un  "Nutshell  Guide  to Java", un manuel de reference du
  langage, un manuel de reference des bibliotheques  de  classes  et  un
  ouvrage  traitant  de  la machine virtuelle sous-jacente a Java (celle
  qui execute le J-code).

  Information tout a fait non confidentielle : l'auteur de  ce  HOWTO  a
  ete  prie  par  O'Reilly & Associates de servir de principal relecteur
  technique de ces ouvrages et il est remunere pour ce travail.

  SamsNet a publie un livre intitule "Learning Java in 21  Days".  Aucun
  commentaire n'en a ete fait pour l'instant.

  Un  des  contributeurs  de  ce  document  a trouve dans des librairies
  proches de chez lui trois ouvrages deja publies :

  +o  L'un, appele "Java in  60  minutes"  semble  n'etre  qu'une  simple
     description syntaxique du langage (environ $20) ;

  +o  Le  second,  publie  par  SamsNet, s'appelle tout simplement "Java"
     (environ $20) ;

  +o  Le troisieme, ecrit par Tim Ritchey, est intitule "Java!".  Un  CD-
     ROM est fourni avec (environ $35).

  Notre  informateur poursuit : "J'ai achete le troisieme (ecrit par Tim
  Ritchey). Les delais d'impressions etant ce qu'ils sont, le CD-ROM  ne
  contient  que  des  versions  alpha, bien qu'il signale que la version
  beta est probablement disponible au moment de la publication,  et  que
  les  informations  les  plus a jour se trouvent sur java.sun.com. Cela
  mis a part, c'est un  bon  ouvrage  et  il  juge  meme  necessaire  de
  signaler  qu'il  est inutile de s'embarrasser de centaines de pages de
  description de l'API parce que  :  cela  quadruplerait  la  taille  du
  livre,  l'API est encore en evolution, et ces informations se trouvent
  on-line..."

  Dave Dittrich indique : "Je dirais  que  "Java  in  60  minutes"  peut
  certes   etre   lu  en  60  minutes,  mais  qu'il  ne  vous  apprendra
  certainement pas en 60 minutes comment programmer en  Java  (surprise,
  surprise  !).  J'ai l'impression que "Java in 60 minutes" est l'une de
  ces nombreuses tentatives de publication d'un ouvrage sur un  sujet  a
  la  pointe  de l'actualite.  On n'y trouve apparemment pas grand'chose
  de plus que ce qui est disponible sur le Web et une grande quantite de
  texte  donne l'impression d'avoir ete reproduite telle quelle a partir
  du document  "Java  Language  Specification"  http://java.sun.com/JDK-
  beta2/psfiles/javaspec.ps."

  Dave  poursuit  :  "Il  en  va  de  meme avec "Java!", mais ce dernier
  detaille beaucoup plus  les  concepts  de  la  programmation  orientee
  objet. Quelqu'un m'a signale un autre ouvrage qui traite assez bien de
  l'abstraction  donnees/methodes  et  des   autres   concepts   de   la
  programmation   orientee   objet.   Il   s'agit   de   "Structure  and
  Interpretation of Computer Programs", par Abelson, Sussman et  Sussman
  (MIT Press)."

  Derniere  mise  en  garde  :  a l'heure actuelle (Janvier 1996), c'est
  probablement une bonne idee que d'eviter le livre de Ritchey  ou  tout
  ce   qui   peut   etre   base   sur   l'API   alpha.  L'API  beta  est
  substantiellement differente et Java 1.0,  qui  devrait  bientot  etre
  disponible, aura encore ses propres differences.

  22..66..   OOuu  ppeeuutt--oonn  ttrroouuvveerr  ddeess  ccoolllleeccttiioonnss ddee ccooddee JJaavvaa ddiissppoonniibblleess
  oonn--lliinnee ??

  On trouve des archives d'applets sur le WWW, aux adresses suivantes :

  +o  http://java.sun.com/ ;

  +o  http://www.applets.com/ ;

  +o  http://www.gamelan.com/ ;

  +o  http://www.javasoft.com/applets/applets.html.

  La  plupart  des applets presentees sur ces pages sont accompagnees de
  leur code source et les programmeurs sont encourages a les utiliser.

  Des pointeurs vers d'autres ressources peuvent etre  trouves  dans  le
  comp.lang.java FAQ.

  33..   JJaavvaa,, llooggiicciieell lliibbrreemmeenntt ddiiffffuussaabbllee ((FFrreeeellyy RReeddiissttrriibbuuttaabbllee SSoofftt--
  wwaarree))

  Nombreux  sont  les  programmeurs  Linux  qui  tiennent  a  ce que les
  logiciels  qu'ils  produisent  soient  librement  diffusables  et  qui
  evitent de consacrer trop de temps aux outils dont les sources ne sont
  pas largement  disponibles.  Dans  cette  partie  sont  discutees  les
  relations  de  Sun  et  de  Java  avec  le monde du logiciel librement
  diffusable.

  (Attention : l'auteur  n'est  pas  juriste.  Il  n'est  pas  non  plus
  employe,  agent  ni actionnaire de Sun Microsystems.  Cette partie est
  fondee sur son interpretation des lois actuelles sur le  copyright  et
  sur  la  licence de Sun.  Considerez-la comme une simple introduction,
  la page de Sun http://www.blackdown.org/Java/licensing.html  etant  la
  seule  autorite  en  la  matiere.  Si  vous avez du mal a en saisir la
  signification, consultez un avocat.)

  33..11..  PPeeuutt--oonn rreeddiissttrriibbuueerr lliibbrreemmeenntt ddeess pprrooggrraammmmeess eeccrriittss eenn JJaavvaa ??

  Tout a fait, si vous en etes l'auteur et choisissez de les placer sous
  une licence de type GPL ou BSD, ou encore  si  vous  les  declarez  du
  domaine public.

  33..22..   QQuueelllleess ssoonntt lleess ddrrooiittss eett oobblliiggaattiioonnss aassssoocciieess aauuxx eexxeeccuuttaabblleess
  ddee JJaavvaa ??

  La  page  de  Sun concernant la licence indique que les executables de
  Java et  HotJava  peuvent  etre  redistribues  dans  des  applications
  (commerciales  ou  non),  a condition qu'ils le soient gratuitement et
  sans etre modifies.   Les  entreprises  ou  individus  qui  souhaitent
  effectuer  un  nouveau  portage  du  langage  Java  peuvent mettre les
  executables de ce portage a disposition sur l'Internet,  mais  ceux-ci
  doivent  etre  gratuits  et  passer avec succes les tests publiquement
  disponibles (ces tests devraient etre disponibles a la  mi-1996).  Les
  fichiers  "diff"  peuvent egalement etre diffuses, a condition que les
  sources auxquels ils s'appliquent ne le soient pas.

  Ainsi, vous pouvez donner a  vos  amis  les  executables  de  Java  et
  HotJava  ou  bien  les mettre sur un CD-ROM, ou encore en faire ce que
  vous voudrez, sauf les modifier et en diffuser les versions  modifiees
  comme etant Java (ceci est comprehensible, Sun doit se proteger contre
  les chevaux de Troie diffuses  sous  le  deguisement  de  Java).   Les
  executables peuvent etre redistribues librement.
  33..33..   QQuueelllleess  ppaarrttiieess  ddeess  ssoouurrcceess  ddee  JJaavvaa  ppeeuutt--oonn  rreeddiissttrriibbuueerr
  lliibbrreemmeenntt ??

  Selon  la  page  de Sun, aucune. Cependant, les choses sont en realite
  moins strictes que cela. En pratique, tout le monde peut  obtenir  les
  sources de Java et HotJava a des fins non commerciales, d'enseignement
  ou de portage, et ce en remplissant sur le Web un  formulaire  qui  en
  interdit la redistribution. De plus, il est permis de redistribuer des
  fichiers "diff" a appliquer aux sources.

  Le seul cas ou il faut signer un accord commercial avec  Sun  et  leur
  verser  de  l'argent est celui de l'utilisation des sources a des fins
  commerciales. Cependant, il est dans l'esprit de cet accord de  signer
  la   licence   d'utilisation   non-commerciale  des  sources,  de  les
  recuperer, de les porter et de  distribuer  totalement  librement  les
  executables resultants !

  Sun  affirme  que le but principal d'un tel controle est d'empecher le
  langage de muter vers des dialectes incompatibles.  C'est ce vers quoi
  tend  la  licence.  Elle  semble cependant avoir ete concue de facon a
  permettre aux hackers de s'amuser gratuitement.

  33..44..  QQuueellllee eesstt ll''aattttiittuuddee ddee SSuunn vviiss--aa--vviiss  ddeess  iimmpplleemmeennttaattiioonnss  eett
  oouuttiillss JJaavvaa ggrraattuuiittss ??

  D'apres la page de licence de Sun :

       Les  specifications  du  langage  Java  et  de  la   machine
       virtuelle  Java  sont  OUVERTES  et  sous  copyright  de Sun
       Microsystems, Inc.

       Les nouvelles implementations du compilateur et de  l'inter-
       preteur Java sont autorisees sans avoir besoin de licence de
       Sun, du moment que de telles implementations sont  creees  a
       partir  des  specifications  publiees  et  sans  utilisation
       directe ou indirecte d'implementations, de proprietes intel-
       lectuelles ou marques commerciales de Sun.

  (NdT   la traduction ci-dessus n'engage ni Sun ni l'auteur de ce docu-
  ment) Ainsi, si vous voulez vous lancer dans la  creation  d'un  clone
  gratuit de Java a partir des specifications publiees, Sun ne fera rien
  pour vous en empecher.

  Les gens de Sun utilisent le terme de "portage sauvage" pour  designer
  les  implementations  de Java qui sont realisees ailleurs que chez Sun
  ou ne s'appuient pas sur du code dont Sun detient la licence.  Parfois
  le  terme  semble  avoir l'une de ces significations, parfois l'autre.
  Ils ont l'air de penser que de telles implementations  existent  deja,
  mais  nous  ne  savons  pas ou l'on peut les trouver, ni si elles sont
  gratuites. Les gens de Sun semblent  envisager  cette  situation  avec
  serenite.

  Sun a mis au point un ensemble de logiciels de validation. Sun affirme
  que sera certifie tout portage Java qui passe ces tests  avec  succes.
  Cela  sera-t-il  gratuit ? Nous n'en savons rien, mais Sun affirme que
  ces logiciels seront "disponibles publiquement" en 1996, ce qui semble
  orienter  vers  la  gratuite. Ils sont egalement prets a certifier des
  "portages sauvages" ce qui, apparemment, n'est pas encore arrive.

  33..55..  PPeeuutt--oonn ttrroouuvveerr ddeess cclloonneess  ddee  JJaavvaa  ddoonntt  lleess  ssoouurrcceess  ssooiieenntt
  lliibbrreemmeenntt rreeddiissttrriibbuuaabblleess ??

  On  peut  trouver  un  clone  du  compilateur   Java   en   debut   de
  developpement.  Il  s'appelle  guavac  et  vous  pourrez  trouver  des
  informations       a        son        sujet        a        l'adresse
  http://http.cs.berkeley.edu/~engberg/guavac.

  Des  rumeurs ont couru indiquant que le projet GROW de Cygnus Software
  prevoyait d'integrer un interpreteur de code objet Java. Elles etaient
  fausses  :  ce  qui est en cours de developpement est un traducteur de
  Java vers Scheme qui ne passe pas par le J-code. Pour plus de  details
  sur le projet GROW, consultez http://www.cygnus.com/tiemann/grow/.

  Erik  Troan de Red Hat et l'auteur de ce document tentent de former un
  groupe de developpement  pour  mener  a  bien  le  reste  du  travail.
  Actuellement,  l'idee  est  d'utiliser  guavac comme compilateur, Erik
  Troan s'occupant de la bibliotheque de classes et l'auteur de ce HOWTO
  de  l'interpreteur  de J-code (si Cygnus n'y parvient pas auparavant).
  Ce projet devait etre nomme "Mr Coffee", ce qui  etait  tentant,  mais
  s'appellera probablement JOE (Java Open to Everyone).

  33..66..  PPeeuutt--oonn ttrroouuvveerr ddeess oouuttiillss JJaavvaa lliibbrreemmeenntt rreeddiissttrriibbuuaabblleess ??

  Vous pourrez trouver un mode  GNU  Emacs  pour  l'edition  de  Java  a
  l'adresse
  ftp://java.sun.com/pub/java/contrib/emacs.
  Note  : ce mode requiert l'utilisation de c++-mode.el et ne fonctionne
  pas avec le mode cc-mode.el distribue avec Emacs 19.

  44..  QQuueessttiioonnss ccoonncceerrnnaanntt JJaavvaa ssoouuss LLiinnuuxx

  Vous apprendrez ici les astuces de  base  permettant  d'utiliser  Java
  sous Linux.

  44..11..  PPeeuutt--oonn ttrroouuvveerr JJaavvaa eett HHoottJJaavvaa ddaannss uunnee ddiissttrriibbuuttiioonn LLiinnuuxx ??

  Pas pour l'instant, mais cela  ne  devrait  etre  qu'une  question  de
  semaines.

  44..22..  OOuu ttrroouuvveerr llaa ddeerrnniieerree ddiissttrriibbuuttiioonn ddee JJaavvaa ppoouurr LLiinnuuxx ??

  Jetez un coup  d'oeil  a  ftp://java.blackdown.org/pub/Java/linux.  Le
  dernier  Java pour Linux peut y etre recupere. Il vaut mieux cependant
  commencer par lire ftp://java.blackdown.org/pub/Java/linux/README.

  Les fichiers dont vous aurez besoin sont :

               linux.jdk-1.0-try1.common.tar.gz
       et soit :
               linux.jdk-1.0-try3.static-motif-bin.tar.gz
          soit :
               linux.jdk-1.0-try3.shared-motif-bin.tar.gz,

  suivant la presence ou non des bibliotheques partagees Motif sur votre
  systeme.

  Si  vous utilisez Red Hat Linux ou tout autre systeme connaissant RPM,
  vous pouvez installer la beta 1.0 a partir de :
  ftp://java.blackdown.org/pub/Linux/RPMS/i386/JDK-linux-
  common-1.0b-1.i386.rpm
  et
  ftp://java.blackdown.org/pub/Linux/RPMS/i386/JDK-linux-
  static-1.0b-1.i386.rpm
  ou
  ftp://java.blackdown.org/pub/Linux/RPMS/i386/JDK-linux-
  shared-1.0b-1.i386.rpm

  Pour     les     utilisateurs     Europeens,     le     contenu     de
  ftp://java.blackdown.org/pub/Java/linux et
  ftp://java.blackdown.org/pub/Linux/RPMS/i386/JDK-linux* est  desormais
  replique       en       Grande-Bretagne       a       l'adresse      :
  ftp://ftp.linux.org.uk/pub/linux/java.  Si cela  interesse  quelqu'un,
  il  s'agit de la machine zen.btc.uwe.ac.uk.  Le miroir est reactualise
  tous les jours vers 6 heures du matin, heure locale.

  Ce portage (realise par Randy Chapman a partir des sources de Sun) est
  celui  auquel  il est fait reference partout ailleurs dans ce document
  sous le nom de JDK (Java Development Kit).

  44..33..  QQuueell eesstt ll''eennvviirroonnnneemmeenntt rreeqquuiiss ppoouurr eexxeeccuutteerr JJaavvaa ??

  Pour commencer, il faut un systeme  Linux  ELF.  Aucun  support  a.out
  n'est  disponible et, vue la vitesse a laquelle le monde Linux passe a
  ELF, il est peu probable qu'il y en ait jamais un.

  Il vous faut un noyau 1.2.13 ou plus recent. Il semble y avoir un  bug
  dans  la  fonction getcwd(3) des noyaux anterieurs, ce qui est fatal a
  bin/javac qui n'en verifie pas le code de retour.

  Ces bibliotheques sont egalement necessaires :

     lliibbcc..ssoo..55 ==>> //lliibb//lliibbcc..ssoo..55..22..1188
        (La bibliotheque C standard)

     lliibbXX1111..ssoo..66 ==>> //uussrr//XX1111//lliibb//lliibbXX1111..ssoo..66..00
        (La bibliotheque de base de X11R6)

     lliibbXXtt..ssoo..66 ==>> //uussrr//XX1111//lliibb//lliibbXXtt..ssoo..66..00
        (La bibliotheque de la boite a outils Athena)

     lliibbXXeexxtt..ssoo..66 ==>> //uussrr//XX1111//lliibb//lliibbXXeexxtt..ssoo..66..00
        (La bibliotheque d'extensions X)

     lliibbXXppmm..ssoo..44 ==>> //uussrr//XX1111//lliibb//lliibbXXppmm..ssoo..44..33
        (La bibliotheque X de gestion des pixmaps)

     lliibbddll..ssoo..11 ==>> //lliibb//lliibbddll..ssoo..11..77..99
        (Le support du chargement dynamique de modules objet)

  Il n'est pas impossible que les bibliotheques de support du C et de  X
  soient deja installees sur votre systeme.

  Si  vous  ne  l'avez  pas  deja,  recuperez libc.5.2.18.bin.tar.gz sur
  ftp://tsx-11.mit.edu/pub/linux/packages/GCC/.
  Decompressez  et  detarez-le,  puis  copiez  dans  /lib  les  fichiers
  contenus dans le repertoire lib cree.

  Si  vous  n'avez pas une version recente de ld.so (ou libdl.so.1.7.*),
  il  vous  faut  la  mettre  a  jour.   ld.so.1.7.9   et   ld.so.1.7.11
  fonctionnent,  mais  pas  les versions plus anciennes ni ld.so.1.7.10.
  Recuperez ld-so.1.7.14.tar.gz sur ftp://ftp.ods.com/linux/.
  Decompressez-le et detarez-le, puis lancez _i_n_s_t_l_d_s_o_._s_h qui se trouve a
  la racine de l'arborescence ainsi creee.

  Vous     trouverez     une     bibliotheque     Xpm    adequate    sur
  ftp://sunsite.unc.edu/pub/Linux/libs/X/libXpm.3.4f-ELF.tar.gz.

  44..44..  AAii--jjee bbeessooiinn ddee NNeettssccaappee ?? PPuuiiss--jjee ll''uuttiilliisseerr ??

  Netscape est indispensable, car HotJava n'est  pas  encore  disponible
  pour les versions beta 1.0. Selon Randy Chapman,

       Sun  a fortement modifie l'interface awt dans le JDK et Hot-
       Java n'a pas encore ete adapte. Sun a promis de le faire  et
       la nouvelle version de HotJava devrait fonctionner parfaite-
       ment avec linux-jdk.

  Aucune date n'a ete annoncee.

  Netscape supporte Java depuis la  version  2.0b3.  On  le  trouve  sur
  ftp[1-7].netscape.com        (i.e.        sur       ftp1.netscape.com,
  ftp2.netscape.com,... etc.). La  version  2.0b4  permet  de  lire  des
  applets  depuis  les  URL  de  type file:, ce que ne permettait pas la
  version 2.0b3. Ceci devrait etre d'un grand secours pour ceux  qui  ne
  disposent  que  de  peu  de memoire (il n'est plus necessaire de faire
  tourner un demon httpd). La version actuelle est la 2.0b6.

  Le  fichier  a   recuperer   est   :   /2.0beta6/unix/netscape-v20b6a-
  export.i486-unknown-linux.tar.Z.

  Notez  que  Netscape  tourne aussi sur des systemes a.out. Il est donc
  possible, en theorie, d'ecrire  une  application  Java,  de  la  faire
  compiler  par  quelqu'un  d'autre  (comme par exemple BlackStar Public
  Compiler), et d'en voir le resultat sur votre  systeme.   Si  cela  ne
  vous suffit pas, passez en ELF.

  Assurez-vous  que  la  variable  d'environnement CLASSPATH ne soit _p_a_s
  positionnee lorsque vous lancez netscape : cela a tendance a provoquer
  des  plantages  de  celui-ci.  Si  vous  suivez  ces conseils, vous ne
  devriez pas avoir trop de problemes.

  La version Linux de netscape a quelques problemes connus. D'une  part,
  il  n'y  a  pas  de  son.  D'autre  part,  seul  l'affichage en 8 bits
  fonctionne : l'affichage en 16 bits provoque des plantages. La version
  2.0b3  est parfois sujette a des 'bus errors' lorsqu'elle fait appel a
  la fonction 'dispose' des frames.

  Bien que relativement robuste (cela mis a part), elle ne resiste pas a
  l'applet 'Impressionism' de Gamelan.

  44..55..   QQuueellss ssoonntt lleess nneewwssggrroouuppss eett mmaaiilliinngg lliissttss ttrraaiittaanntt ddee JJaavvaa ssuurr
  LLiinnuuxx ??

  +o  _j_a_v_a_-_l_i_n_u_x  :  (maintenue  by  karl@blackdown.org)  Discussions  et
     developpements  concernant  le  portage  de  Java  sur  le  systeme
     d'exploitation    Linux.    Envoyez    un    mail   a   java-linux-
     request@java.blackdown.org avec le mot "subscribe" pour etre ajoute
     a la liste ;

  +o  _j_a_v_a_-_l_i_n_u_x_-_a_n_n_o_u_n_c_e   :  (maintenue  by  karl@blackdown.org)  Liste
     moderee des annonces concernant les projets de portage  Java-Linux.
     Envoyez  un  mail  a java-linux-announce-request@java.blackdown.org
     avec le mot "subscribe" pour etre ajoute a la liste ;

  +o  comp.lang.java : Newsgroup traitant de Java en general ;

  +o  alt.www.hotjava : Newsgroup traitant du navigateur HotJava.

  55..  MMiissee eenn ppllaaccee ddee JJaavvaa ssuurr lleess pprriinncciippaalleess ddiissttrriibbuuttiioonnss  LLiinnuuxx  dduu
  mmaarrcchhee

  Dans cette partie, nous rassemblons les recettes que nous avons recues
  concernant  la  mise en place du portage de Java par Randy Chapman sur
  les principales distributions de Linux.

  55..11..  DDiissttrriibbuuttiioonn SSllaacckkwwaarree EELLFF nnooyyaauu 11..22..1133..

  John Franks (john@math.nwu.edu) indique que les etapes  suivantes  ont
  ete fructueuses :

  +o  Recuperez           linux-x86.jdk.static-motif.tar.gz           sur
     ftp://www.blackdown.org/pub/Java/linux/,     decompressez-le     et
     detarez-le  (les  noms  des fichiers a recuperer ont change pour le
     JDK beta 1.0) ;

  +o  Recuperez libc.5.2.18.bin.tar.gz (la distribution compilee, pas les
     sources) sur
     ftp://tsx-11.mit.edu/pub/linux/packages/GCC/.   Decompressez-le  et
     detarez-le, puis  copiez  dans  le  repertoire  /lib  les  fichiers
     presents dans le sous-repertoire lib de la racine de l'arborescence
     creee.  Assurez-vous que /lib/libc.so.5  soit  un  lien  symbolique
     vers ce fichier ;

  +o  Recuperez    ld-so.1.7.14.tar.gz    sur   ftp://ftp.ods.com/linux/.
     Decompressez-le et detarez-le , puis executez "instldso.sh", qui se
     trouve a la racine de l'arborescence resultante.

  Vous  devriez  maintenant  etre  en mesure de compiler et de tester le
  programme et l'applet "hello world" de Sun en suivant les  indications
  de http://java.sun.com/progGuide/index.html.

  55..22..  RReeddHHaatt 22..11//CCaallddeerraa PPrreevviieeww 22

  Steve  Greene (sgreene@access.digex.net) rapporte le succes des etapes
  suivantes. Nous avons quelque peu modifie la  recette  ;  les  erreurs
  sont  donc a porter a notre compte. Le JDK auquel il fait allusion est
  le portage du Java Developer's Kit realise par Randy Chapman.

  +o  Recuperez le fichier rpm contenant ld.so.1.7.14 sur un site  miroir
     de      Red      Hat.      Pour      le      trouver,      cherchez
     /pub/mirrors/redhat-2.1/updates/RPMS/ld.so-1.7.14-i386.rpm dans  un
     site miroir quelconque de Red Hat.

     Je  sais  qu'on peut le trouver sur ftp.pht.com et ftp.caldera.com.
     Il se trouve probablement  egalement  sur  d'autres  sites  miroir.
     Recuperez-le et lancez `rpm -Uvh ld.so-1.7.14-1.i386.rpm' sur votre
     machine ;

  +o  Les utilisateurs de Red Hat 2.0 ou de Caldera  Preview  2  pourront
     avoir  besoin du programme 'which' (qui est appele par certains des
     scripts du JDK). Un fichier rpm pour 'which' est disponible sur les
     sites  miroir habituels de RedHat, comme element de la distribution
     Red  Hat  2.1.  Recuperez  et  installez  which-1.0.i386.rpm.   Les
     utilisateurs de RedHat 2.1 doivent normalement deja avoir which sur
     leur machine ou disponible dans leur distribution ;

  +o  Recuperez le(s) fichier(s) tar du JDK linke en statique. Detarez-le
     en un endroit pratique. J'ai place le mien dans /usr/local, si bien
     qu'est cree /usr/local/java/... ;

  +o  Afin de pouvoir executer java en tant qu'utilisateur autre que root
     (ce  qui est une bonne idee !), faites un chmod 666 /dev/zero.  Red
     Hat et  Caldera  ont  par  defaut  des  droits  incorrects  sur  ce
     peripherique ;

  +o  Si  vous  ne l'avez pas deja fait, lancez ldconfig en tant que root
     pour  charger  les  nouvelles  bibliotheques.  Si   vous   utilisez
     'ldconfig  -v',  vous pourrez verifier que toutes les bibliotheques
     soient bien chargees (au moins, nous n'avons pas  a  commencer  par
     batir un systeme ELF !) ;

  +o  Assurez-vous d'etre connecte en tant qu'utilisateur classique (e.g.
     pas root). Lancez X-Window, un xterm et essayez quelque chose !

  55..33..  UUnniiffiixx

  Stefan Middenforf ecrit : Unifix est  une  distribution  de  Linux  en
  langue  allemande,  assez populaire. Quelques autres distribution s'en
  servent comme base : Linux Universe, vendue aux Etats-Unis,  Linux  4U
  qui  n'est  pour l'instant distribuee qu'en Allemagne et Linux FT, que
  l'on trouve en  Grande-Bretagne.  La  recette  qui  suit  marche  avec
  Unifix  1.7, Linux 4U 1st Edition, Linux Universe 2nd Edition et Linux
  FT 1.1.

  +o  Copiez  linux-x86.jdk.static-motif.tar.gz   que   l'on   trouve   a
     l'adresse :
     ftp://www.blackdown.org/pub/Java/linux/    dans    le    repertoire
     /usr/local, puis restaurez l'archive (grace a gzip et tar) ;

  +o  Modifiez la premiere ligne du script .java_wrapper  PRG=`which  $0`
     >/dev/null 2>&1/ ennbsp;:

     PRG=`type $0 | cut -d ' ' -f 3` >/dev/null 2>&1/ ;

  +o  Recuperez   libc-5.2.18.bin.tar.gz   (cela  fonctionne  aussi  avec
     libc-5.2.16.bin.tar.gz),  puis  restaurez  cette  archive  dans  le
     repertoire / ;

  +o  Recuperez   ld-so.1.7.12.tar.gz  sur  tsx-11.mit.edu  (ou  un  site
     miroir) et  restaurez-le  dans  /usr/local.   Placez-vous  dans  le
     repertoire  cree  et  lancez  instldso.sh. Ceci executera egalement
     ldconfig. Il est probable que des versions plus recentes         de
     ld-so fonctionneront egalement ;

  +o  Ajoutez /usr/local/java/bin a la variable d'environnement PATH ;

  +o  Recuperez     netscape-v20b4-export.i486-unknown-linux.tar.Z,    et
     restaurez-le dans /usr/local/<votre_Repertoire_Netscape> ;

  +o  Creez       un       lien       de       /usr/local/bin        vers
     ../<votre_Repertoire_Netscape>/netscape ;

  +o  Placez    /usr/local/<votre_Repertoire_Netscape>/moz2_0.zip    dans
     /usr/local/lib/netscape/.

  Une alternative a la modification du PATH  est,  selon  Ralf  Strobel,
  de :

  +o  Copier  les  scripts  .java_wrapper  et appletviewer, ainsi que les
     liens   @java,   @javac,    @javadoc,    @javap    et    @jdb    de
     /usr/local/java/bin  vers  /usr/local/bin,  de  facon a pouvoir les
     utiliser depuis n'importe ou ;

  +o  Dans /java/bin/i586 vous pouvez ajouter un script appele 'javadoc'

     #!/bin/sh    `dirname    $0`/java     sun.tools.javadoc.Main     -d
     <votre_Repertoire_HTML> $

     ou,  si  vous  etes  l'utilisateur jrandom, <votre_Repertoire_HTML>
     correspond a  jrandom/.java-html.

  66..  VViissuuaalliissaattiioonn ddeess aapppplleettss

  Pour lancer une demonstration sans  passer  par  l'appletviewer,  vous
  pouvez  lancer  la  commande suivante depuis le haut de l'arborescence
  Java (/usr/local/java sur la plupart des machines) :

            bin/java sun.applet.AppletViewer demo/<nom_repertoire>/exampleN.html

  ou <nom_repertoire> est le repertoire de  la  demonstration  et  N  le
  numero  du  fichier  d'exemple  (certains  repertoires  en contiennent
  plusieurs).

  Steve Green raconte qu'il a teste les  tutoriels  disponibles  sur  le
  site java de SUN et sur celui du NTMUG. Son experience revele quelques
  problemes dans la syntaxe du tutoriel de Sun. C'est  pourquoi  il  est
  passe a celui du NTMUG.

  L'application  appletviewer  requiert  comme  argument un fichier HTML
  contenant un marqueur APPLET.

  Par exemple, si votre fichier HTML Hello.html ressemble a :

     <HTML>
     <HEAD>
     <TITLE> Programme Test Hello </TITLE>
     </HEAD>
     <BODY>
     Ceci est un test de l'appletviewer
     <APPLET CODE="Hello1.class" WIDTH=150 HEIGHT=25>
     </APPLET>
     </BODY>
     </HTML>

  La commande appletviewer Hello.html vous montrera l'applet. L'avantage
  de  l'appletviewer est que les evenements envoyes a l'applet (start(),
  init(), etc) sont conformes aux specifications de Sun,  ce  qui  n'est
  pas le cas de Netscape 2.0b4 (probablement a cause d'un bug).

  L'un  des  inconvenients  d'appletviewer  est  sa  grande  lenteur par
  rapport a Netscape.

  Lorsque vous lancez Java pour la premiere fois, une fenetre de licence
  similaire a celle de Netscape est affichee.

  77..  PPrroobblleemmeess ccoonnnnuuss

  77..11..  GGNNUU mmaakkee nnee ffoonnccttiioonnnnee pplluuss aapprreess ll''iinnssttaallllaattiioonn ddee JJaavvaa

  Les versions recentes de libc corrigent un bogue  qui  en  cachait  un
  autre  dans  la  version  GNU  de make (le symptome en est que make ne
  cherche plus les regles dans les Makefile).  Un  patch  corrigeant  ce
  probleme est inclus dans la distribution 5.2.8 de libc.

  77..22..  VVoouuss aavveezz ddeess eerrrreeuurrss ddiirrnnaammee:: ttoooo mmaannyy aarrgguummeennttss

  Votre   variable   d'environnement  CLASSPATH  n'est  pas  initialisee
  correctement.  Dans  le  fichier  .java_wrapper,  on  trouve  quelques
  lignes ressemblant a :

          PRG=`which $0`
          J_HOME=`dirname $PRG`/..

  Malheureusement, la commande which generalement fournie avec Linux est
  horriblement defectueuse et certains shells risquent d'affecter  a  $0
  le  chemin  complet.  Selon  Randy Chapman, la solution est d'utiliser
  soit :

           J_HOME=`dirname $0`/..

  soit, de facon plus sure :

      J_HOME=/usr/local/java

  Un autre correctif, propose par Dave Dittrich, est :

           PRG=`csh -c "which $0"`

  Quant a Tim Farnum, il propose de changer la ligne PRG=`which $0` en :

           PRG=$0

  Lutz Behnke, enfin, suggere :

           PRG=`type -path $0` >/dev/null 2>&1

  Une   modification   similaire   doit   etre   appliquee   au   script
  d'appletviewer.

  77..33..  VVoouuss aavveezz ddeess eerrrreeuurrss dduu ttyyppee ccaannnnoott ffiinndd ccllaassss jjaavvaa//llaanngg//TThhrreeaadd

  Votre  variable  d'environnement  CLASSPATH  n'est   pas   initialisee
  correctement. Voir plus haut.

  77..44..  UUnn mmeessssaaggee dd''eerrrreeuurr ffaaiitt rreeffeerreennccee aa //ddeevv//zzeerroo

  Passez root et faites un  chmod 666 /dev/zero.

  77..55..  SSEEGGFFAAUULLTT

  Il  peut  arriver  que votre ecran se remplisse de messages d'erreurs,
  que le systeme remplisse joyeusement votre memoire virtuelle, puis  se
  bloque.

  Dans  ce  cas,  il  vous  manque probablement une bibliotheque quelque
  part. Lancez ldconfig -v et regardez ce qu'il manque. Il est egalement
  possible   que   les   variables  d'environnement  LD_LIBRARY_PATH  ou
  CLASSPATH ne  soient  pas  positionnees.   Enfin,  il  se  trouve  que
  certaines  applets  sont  boguees  et  bloquent  le  JDK Linux (il y a
  d'ailleurs un moyen d'eviter le blocage en ayant un autre  xterm  dans
  lequel  tourne  top.  Il  suffit  alors  d'utiliser  top  pour tuer le
  processus java AVANT qu'il remplisse la memoire virtuelle et bloque le
  systeme).

  Java semble necessiter d'importantes ressources. Il est donc conseille
  de restreindre au maximum le nombre  d'applications  ouvertes  ou  qui
  s'executent.  Il  parvient a se charger sur un 486DX-2-75 avec 8 Mo de
  RAM et 16 Mo de swap (cela prend tout de meme une minute).  L'auteur a
  ainsi  reussi a faire tourner deux applets animees simultanement (ou a
  peu pres) avant  que  le  systeme  se  retrouve  a  court  de  memoire
  virtuelle et se bloque.

  77..66..  bbiinn//jjaavvaa,, bbiinn//jjaavvaacc,, oouu bbiinn//aapppplleettvviieewweerr vvoouuss rreennvvooiiee uunn mmeessssaaggee
  dd''aaiiddee

  Vous avez oublie des parametres de la ligne de commande.

  77..77..   LLeess  aapppplleettss  aappppaarraaiisssseenntt  bbiieenn  ddaannss ll''aapppplleettvviieewweerr,, mmaaiiss ppaass
  lloorrssqquu''eelllleess ssoonntt ppllaacceeeess ssuurr uunn sseerrvveeuurr WWeebb..

  Une  erreur  classique  ayant  cette  consequence  est  d'associer aux
  applets un type MIME  incorrect.  Votre  serveur  doit  renvoyer  avec
  l'applet  un  en-tete  indiquant  qu'elle est du type MIME text/plain,
  application/octet-stream ou tout autre type pour lequel le  client  ne
  dispose pas d'un module de traitement special.  La maniere de remedier
  a cela depend du serveur que vous utilisez.  (John Franks)

  Il semble egalement que tinyhttpd, un  serveur  HTTP  ecrit  en  Perl,
  renvoie  un  content  type  incorrect.   Apache,  en  revanche, semble
  fonctionner relativement correctement.

  77..88..  FFiicchhiieerr ddee ttrraacceess

  Selon Joey Oravec, HotJava conserve un fichier de traces  des  actions
  qu'il  accomplit  et  des eventuels problemes qu'il rencontre. Si vous
  devez  etablir  un  diagnostic  par  vous-meme,  examinez  le  fichier
  $HOME/.hotjava/weblog,  dans le repertoire racine de l'utilisateur. Ce
  fichier vous permettra de reperer plus aisement s'il vous  manque  une
  bibliotheque ou s'il s'agit d'un probleme similaire.

  88..  RReessssoouurrcceess aassssoocciieeeess

  Les  informations generales concernant Java peuvent etre trouvees dans
  la FAQ publiee dans  le  newsgroup   comp.lang.java  et  disponible  a
  l'adresse http://www.city-net.com/~krom/java-faq.html.

  Un  autre  document  du  type  FAQ,  plus ancien, a ete ecrit par Joey
  Oravec joey@sun.science.wayne.edu. On  peut  le  trouver  a  l'adresse
  http://www.science.wayne.edu/~joey/java/linux.html.      Il     traite
  principalement de la version alpha, mais il se pourrait qu'il fusionne
  avec la FAQ citee ci-dessus.

  Voici une liste de quelques pages WWW traitant de Java :

  +o  Karl Asha's General Linux Java Page ;

  +o  LinuxJava Mailing List ;

  +o  Netrek for Java ;

  +o  Blue-Skies for Java ;

  +o  Java Hints Page.

  99..  AA aajjoouutteerr......

  +o  Plus de recettes propres aux differentes declinaisons de Linux.

  1100..  RReemmeerrcciieemmeennttss

  L'auteur  adresse  ses  plus  vifs  remerciements  a tous ceux qui ont
  contribue a ce document, en particulier a :

  +o  John Franks <john@math.nwu.edu> ;

  +o  Zachary DeAquila <zachary@zachs.place.org> ;

  +o  Steve Greene <sgreene@access.digex.net> ;

  +o  Dave Dittrich <dittrich@cac.washington.edu> ;

  +o  Dave Flanagan <dave@ora.com> ;

  +o  Joey Oravec <joey@sun.science.wayne.edu> ;

  +o  Adam Smith <aws@cs.brown.edu> ;

  +o  Joe Buck <jbuck@Synopsys.com> ;

  +o  Omar Loggiodice <ologgio@netdepot.com> ;

  +o  Stefan Middendorf <mdorf@stud.fh-heilbronn.de>.

  La presente version de ce  document  inclut  le  mini-HOWTO  de  Steve
  Greene  pour  Red  Hat/Caldera,  souvent  annonce  mais jamais publie.
  L'auteur a egalement peche quelques informations utiles  sur  la  page
  WWW de Joey Oravec -- graces lui en soit rendues.

  La  liste  des  autres HOWTOs et FAQs maintenus par l'auteur peut etre
  consultee          sur           sa           page           d'accueil
  http://www.locke.ccil.org/~esr/home.html.

  La   liste   des   HOWTOs   en   francais   peut  etre  consultee  sur
  http://www.loria.fr/linux/.

  Le  traducteur,   enfin,   souhaite   remercier   Pierre   Vassellerie
  (Pierre.Vassellerie@obspm.fr)  et  Bernard Choppy (choppy@imaginet.fr)
  pour leur aide dans la mise en forme et la correctionde ce document.

  Linux Module-HOWTO
  Lauri Tischler, Editeur.
  v1.1, 20 Octobre 1996

  (Adaptation  francaise  par  Eric Dumas dumas@freenix.fr, 1er Decembre
  1996). Voici le Module-HowTo, qui contient une compilation des differ-
  ents   parametres   qui  peuvent  etre  passes  aux  modules  lors  de
  l'amorcage.  Les informations contenues dans ce  documents  concernent
  le noyau Linux version 2.0.23.

  11..  IInnttrroodduuccttiioonn

  Ce document est inspire de l'excellent BootPrompt-HowTo ecrit par Paul
  Gortmaker. Avec la permission de Paul, je me  suis  base  dessus  pour
  realiser  la  structure  de  ce  document,  tout  en  y  rajoutant des
  elements. Les differentes  parties  de  ce  document  ont  ete,  d'une
  maniere  ehontee et sans aucune permission de qui que ce soit, pillees
  dans divers fichiers _R_E_A_D_M_E et _*_._t_x_t dans l'arborescence  des  sources
  de Linux.  Mes sinceres remerciements a tous les differents auteurs de
  ces textes qui ont rendu la realisation de ce document possible.

  Ce document suit d'une maniere  generale  la  meme  structure  que  le
  programme  de  configuration  du  noyau menuconfig lorsqu'il est lance
  mode single_menu_mode=TRUE.

  Toutes les sections designees comme etant Modular dans ce programme de
  configuration  sont inclues ici, qu'elles aient des parametres ou pas.

  Chaque section suit l'exemple suivant :

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ne.o io=0x300 irq=5

          io = 0          (demande explicitement une valeur "io=0xNNN")
          irq = 0         (essaye de trouver l'IRQ via autoIRQ)
          (Recherche sur les ports : 0x300, 0x280, 0x320, 0x340, 0x360)

          Utilise 8390.o
  ______________________________________________________________________

  Le Module-HowTo est edite et maintenu par :

       Lauri Tischler, ltischler@efore.fi

  11..11..  AAvveerrttiisssseemmeennttss eett ccooppyyrriigghhtt

  Ce document  n'est  _p_a_s  la  parole  divine.  Toutefois,  il  contient
  probablement  l'information  la plus a jour que vous puissiez trouver.
  Personne n'est  responsable  de  ce  qui  pourrait  advenir  de  votre
  materiel, sauf vous-meme.  Si votre materiel part en fumee (...presque
  impossible !),  je  n'ai  aucune  responsabilite,  c'est  a  dire  que
  L'AUTEUR  N'EST  AUCUNEMENT  RESPONSABLE DE TOUT DOMMAGE SURVENUE A LA
  SUITE D'ACTIONS BASEES SUR LES INFORMATIONS INCLUES DANS CE  DOCUMENT.

  Ce document est copyrighte (c) 1996 par Lauri Tischler.

  Il  est  permit  de reproduire et de diffuser des copies papiers de ce
  manuel en incluant cette note legale dans son  integralite  sur  toute
  copie.

  Il  est  permit  de copier et de diffuser des versions modifiees de ce
  document, a condition que cette  note  legale  soit  inclue  dans  son
  integralite  et  dans  sa version originale et que tout travail derive
  soit diffuse dans les termes d'une notice legale identique a celle-ci.

  Il  est  autorise  de  copier  et  de  diffuser  des traductions de ce
  document dans d'autres langues, en respectant les conditions ci-dessus
  concernant les versions modifiees.

  Si  vous  souhaitez  integrer  ce  document  dans  un document publie,
  contactez-moi s'il vous plait, et je ferais un effort  pour  m'assurer
  que  vous possedez bien la version la plus a jour.  Il est deja arrive
  dans le passe que certains documents HowTo pour  Linux  perimes  aient
  ete  publies, ce qui a provoque la colere de certains developpeurs car
  ils furent ennuyes par des questions dont les reponses  se  trouvaient
  dans les versions a jour de ces documents.

  11..22..  DDooccuummeennttaattiioonn ddee rreeffeerreennccee

  Consulter ces HOWTO est grandement recommande :

  +o  BBoooottPPrroommpptt--HHOOWWTTOO  par  Paul  Gortmaker (Paul.Gortmaker@anu.edu.au).
     Les nouvelles versions de ce document peuvent etre  recuperees  via
     FTP    anonyme    sur    sunsite.unc.edu,    dans   le   repertoire
     /pub/Linux/docs/HOWTO/* ainsi que d'autres sites miroirs.

  +o  kkeerrnneelldd mmiinnii--HHOOWWTTOO par Henrik Storner (storner@osiris.ping.dk).  La
     derniere   version   de  ce  document  peut-etre  trouvee  a  l'URL
     http://eolicom.olicom.dk/~storner/kerneld-mini-HOWTO.html.    Entre
     deux  mises  a  jour de ce mini-howto, vous pouvez trouver quelques
     mises   a   jour   dans   une   liste   non-structuree   a    l'URL
     http://eolicom.olicom.dk/~storner/kern.html.

  Le  fichier  Documentation/Configure.help donne de bonnes informations
  generales  concernant  les  parties  du   noyau   qui   peuvent   etre
  transformees en module ou pas.

  Toute la plethore des fichiers README, (malheureusement) dissemine aux
  quatre coins de l'arborescence des  sources  sont  de  bonnes  sources
  d'information.

  La  documentation  la  plus  a jour sera toujours les sources du noyau
  eux-memes. Par exemple, si vous cherchez quels parametres peuvent etre
  passes  aux  cartes Ethernet smc-ultra, alors jetez un coup d'oeil aux
  fichiers du repertoire  linux/drivers/net,  et  plus  particulierement
  dans le fichier smc-ultra.c. En principe vous devriez trouver a la fin
  du fichier une fonction appellee init_module.  A l'interieur ou a cote
  se trouvent les definitions des parametes et des structures concernant
  les parametres du module.

  11..33..  LLeess ffoorruumm UUsseenneett LLiinnuuxx

  Si vous avez des questions sur le passage de  parametres  aux  modules
  lors  de  l'amorcage de la machine, lisez ce document.  Si ce document
  ainsi que ceux cites ci-dessus ne  repondent  pas  a  votre  question,
  alors essayez les forum Usenet (news).

  Les  questions  generales  sur  la maniere de configurer votre systeme
  peuvent etre posees directement dans le groupe comp.os.linux.setup. On
  vous  demande  par  contre  de  respecter,  _s_'_i_l _v_o_u_s _p_l_a_i_t les regles
  generales concernant le contenu, et ne cross-postez pas votre question
  dans d'autres groupes.
  11..44..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les  nouvelles versions de ce document peuvent etre recuperees via ftp
  anonyme   sur   le   site   sunsite.unc.edu,   dans   le    repertoire
  /pub/Linux/docs/HOWTO/*  ainsi que sur les sites miroirs.  Les mises a
  jour  seront  effectuees  lorsque  de  nouvelles  informations  ou  de
  nouveaux   gestionnaires  de  peripheriques  seront  disponibles.   Si
  l'exemplaire du document que vous possedez a plus de trois mois, alors
  il  est  fort  probable  qu'il soit depasse, ou bien que j'ai ete trop
  occupe (ou paresseux !) pour le mettre a jour.

  N.d.T : les mises  a  jours  de  la  version  francaise  peuvent  etre
  trouvees  sur  ftp.ibp.fr dans /pub/linux/french/docs/HOWTO et a l'URL
  http://www.freenix.fr.

  Ce document a ete genere a partir du systeme SGML qui  a  ete  mis  en
  place  specifiquement  pour le projet de HowTo Linux, et qui permet la
  generation des versions dans differents formats comme postscript, dvi,
  ascii, html, et bientot TeXinfo.

  Je  vous  recommande  de  consulter  ce  document  au  format  (via un
  arpenteur) ou en utilisant le format Postscript/dvi.  Ces deux formats
  permettent d'utiliser les references croisees qui sont perdues lors de
  la conversion en format ascii.

  Si  vous  souhaitez  recuperer  la  copie  officielle  de  la  version
  anglaise, voici l'URL :

  Module-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Module-HOWTO.html>

  11..55..   MMoodduulleess  eexxppeerriimmeennttaauuxx  ((vveerrssiioonnss aallpphhaa)) oouu iinnffoorrmmaattiioonnss iinnccoomm--
  pplleetteess

  Voici une liste de modules qui sont declares comme etant eexxppeerriimmeennttaauuxx
  dans  les  scripts  de  configuration  ou  bien  qui   possedent   des
  informations incompletent, ou bien que je n'ai pas reussi a comprendre
  le fonctionnement en consultant les sources.  Faites votre choix.

  N.d.T : les noms des modules  ont  ete  laisses  en  anglais  car  ils
  correspondent a ce que l'on rencontre lorsque l'on recompile le noyau.

  +o  Support for JAVA binaries ;

  +o  Frame Relay DLCI driver ;

  +o  Sangoma S502A FRAD driver ;

  +o  BAYCOM driver for AX.25 ;

  +o  WIC Radio IP Bridge ;

  +o  3Com 3c505 Ethernet driver ;

  +o  3Com 3c507 Ethernet driver ;

  +o  Allied Telesis AT1700 Ethernet driver ;

  +o  Intel Ether Express Pro driver ;

  +o  Fujitsu FMV-18x Ethernet driver ;

  +o  ICL EtherTeam 16i/32 Ethernet driver ;

  +o  NI 5210 Ethernet driver ;

  +o  Ansel Communications EISA 3200 Ethernet driver ;

  +o  Amiga FSS Filesystem.

  11..66..  HHiissttooiirree..

  +o  premiere diffusion : 1.0, 20 Juin 1996 ;

  +o  mise a jour : 1.1, 20 Octobre 1996.

  22..  UUttiilliittaaiirreess ppoouurr lleess mmoodduulleess

  Les utilitaires pour  les  modules  sont  un  ensemble  de  programmes
  necessaires  pour gerer les modules. Au moment ou j'ecris ces mots, la
  derniere   version   est   modules-2.0.0.tar.gz.    Des   informations
  concernant   la   version   actuelle   peut   etre   trouvee  a  l'URL
  http://www.pi.se/blox.

  Ces informations proviennent des personnes suivantes : Jacques Gelinas
  jacques@solucorp.qc.ca    et    Bjoern   Ekwall   bj0rn@blox.se   dans
  /usr/src/linux/Documentation/modules.txt.

  22..11..  CCrreeeerr lleess mmoodduulleess

  La premiere etape consiste a compiler le noyau,  comme  l'explique  le
  fichier linux/README.  Cela ressemble generalement a ca :

  +o  make config

  +o  make dep

  +o  make clean

  +o  make zImage ou make zlilo

  Dans  make  config,  vous  choisissez  quelles  caracteristiques  vous
  souhaitez inclure d'une maniere _p_e_r_m_a_n_e_n_t_e dans le  noyau,  et  celles
  que  vous  voulez  sous  la  forme de modules chargeables.  Vous allez
  generalement choisir d'inclure le minimum de choses, c'est a  dire  ce
  qu'il est necessaire pour pouvoir amorcer la machine :

  +o  le systeme de fichier de votre partition racine ;

  +o  un gestionnaire SCSI (si vous avez une carte) ;

  +o  la gestion d'un disque dur ;

  +o  le support reseau (CONFIG_NET) ;

  +o  le support TCP/IP (CONFIG_INET), mais aucun gestionnaire !

  +o  plus les petites choses sans lesquelles vous ne pouvez pas vivre...

  L'ensemble des modules est en constante augmentation  et  vous   serez
  capable   de   choisir  l'option  m  lors  du  make  config  pour  les
  caracteristiques que vous souhaitez voir comme modules.

  Vous avez egalement la possibilite de creer des  modules  quoi  soient
  moins  dependants  de  la  version  du  noyau.  Cette option peut etre
  choisie lors du make config, en activant CONFIG_MODVERSIONS,  et  cela
  est  assez  pratique  sur  les noyau _s_t_a_b_l_e_s comme les versions 1.2 et
  2.0. Si vous  possedez  des  modules  qui  ne  sont  pas  inclus  dans
  l'arborescence  des  sources  du noyau, alors vous aprecierez surement
  cette option...

  Lorsque le noyau est genere, il suffit de creer les modules en lancant
  :

       make modules

  Cela  va  compiler  tous  les modules et les mettre dans le repertoire
  linux/modules. Vous trouverez dans ce repertoire tout un tas de  liens
  symboliques sur des fichiers objets de l'arborescence des sources.

  Ensuite,  apres  avoir  cree  tous  les modules, il vous suffit de les
  installer :

       make modules_install

  Cela copiera tous  les  nouveaux  modules  dans  les  sous-repertoires
  /lib/modules/version_noyau/,  ou  version_noyau ressemble a 2.0.26, ou
  le numero de la version du noyau.

  Des que vous avez reamorce la machine  avec  le  nouveau  noyau,  vous
  pouvez  installer  et  desinstaller  les  modules  avec les programmes
  insmod et rmmod. Apres avoir lu la page  de  manuel  de  insmod,  vous
  comprendrez  qu'il  est tres simple de configurer un module en faisant
  insmod module symbole=valeur.

  22..22..  OOuuttiillss eetteenndduuss :: mmooddpprroobbee et depmod.

  Vous pouvez egalement utiliser deux outils : modprobe  et  depmod,  ou
  modprobe  est  une  extension  de  insmod.  Ces  outils  utilisent  et
  maintienent un ensemble de fichiers qui  decrivent  tous  les  modules
  disponibles  pour  le  noyau  actuel  dans l'arborescence /lib/modules
  ainsi que leurs interdependances.

  En utilisant le programme modprobe, vous pouvez charger n'importe quel
  module

       /sbin/modprobe module

  sans  se  preoccuper  du  noyau  qui  tourne,  ou des modules qui sont
  utilises par ce module.

  Grace  a   l'aide   du   fichier   de   configuration   de   modprobe,
  /etc/conf.modules,  vous  pouvez  regler  le comportement de modprobe,
  voir inclure un ensemble d'options par defaut pour chaque  module.  Et
  oui, il _e_x_i_s_t_e des pages de manuel pour cela !

  Pour  utiliser  correctement  modprobe,  vous  inserez generalement le
  script suivant dans le fichier /etc/rc.d/rc.S script (voir le  fichier
  rc.hints    dans   paquetage   des   utilitaires   modules,   modules-
  x.y.z.tar.gz.).

       /sbin/depmod -a

  Cela genere les dependances entre les differents modules. Ensuite,  si
  vous faites par exemple

       /sbin/modprobe umsdos

  alors vous chargerez automatiquement les modules msdos et umsdos etant
  donne que umsdos se base sur le module msdos.

  22..33..  LLaa cceerriissee ssuurr llee ggaatteeaauu :: kkeerrnneelldd.

  Bon, vous avez lu tout  ceci,  et  je  vous  sens  febrile  et  presse
  d'essayer...  Maintenant, oubliez tout ce que vous savez concernant le
  chargement et le dechargement des modules !

  Grace au  demon  kerneld,  toutes  ces  operations  seront  effectuees
  automatiquement.  Repondez  simplement  "Y"  a l'option CONFIG_KERNELD
  lors du make config, et assurez-vous que le  demon  /sbin/kerneld  est
  lance le plus tot possible lors de l'amorcage de la machine, et que la
  commande /sbin/depmod -a a ete executee pour le noyau  courant  (lisez
  la documentation fournie dans le paquetages des modules).

  A   chaque   fois  qu'un  programme  veut  que  le  noyau  utilise  un
  gestionnaire qui n'est disponible que sous la forme  d'un  module,  et
  que  le  noyau ne l'a pas deja installe, alors le noyau va demander au
  demon de bien vouloir s'occuper du probleme.

  Voici ce qui se passe :

  +o  le noyau  s'apercoit  qu'une  caracteristique  est  demandee,  mais
     qu'elle n'est pas disponible dans le noyau ;

  +o  le   noyau  envoie  un  message  a  kerneld  avec  une  description
     symbolique des caracteristiques demandees ;

  +o  le demon demande par exemple a modprobe de charger  un  module  qui
     corresponde a cette description ;

  +o  modprobe  regarde dans ses tables de conversions internes pour voir
     si quelque chose correspond. Cette table peut etre reconfiguree  et
     etendue   en   utilisant   des   lignes   _a_l_i_a_s   dans  le  fichier
     /etc/conf.modules ;

  +o  insmod insert ensuite le(s)  module(s)  que  modprobe  a  identifie
     comme  etant  necessaire  aux  modules.  Tout module sera configure
     suivant les lignes options du fichier /etc/conf.modules ;

  +o  modprobe se termine et kerneld indique au noyau que  la  requete  a
     reussi (ou echouee...) ;

  +o  le  noyau  utilise  la nouvelle caracteristique comme si elle avait
     ete inclue dans le noyau d'une maniere _p_e_r_m_a_n_e_n_t_e.

  La cerise sur le gateau provient que lorsqu'un module  automatiquement
  installe  n'est pas utilise pendant une certaine periode (generalement
  une minute), alors le module sera automatiquement supprime du noyau.

  Cela permet de faire en sorte que le noyau  utilise  l'espace  memoire
  minimal  a  n'importe  quel  moment,  le  rendant  donc plus productif
  liberant la place inutilement occupee par du code non utilise.

  En fait, il n'existe qu'un seul cote vraiment positif a kerneld : vous
  n'avez  qu'a  creer  un  noyau  minimal qui plus ou moins dependant de
  votre configuration materielle. La configuration de ce  _n_o_y_a_u  _v_i_r_t_u_e_l
  est  plutot  controle  par un fichier de configuration specialisant le
  comportement de la machine et de son noyau.

  Cela devrait etre plutot une bonne nouvelle pour  les  administrateurs
  de  plusieurs  machines  aussi  bien  que  pour  les  mainteneurs  des
  distributions.

  Pour utiliser kerneld avec le moins de  perte  de  place,  vous  devez
  utiliser  une  version  de  modprobe  qui  soit consideree comme etant
  _r_e_c_e_n_t_e,  ainsi  qu'un  noyau  recent,  et   enfin   un   fichier   de
  configuration pour modprobe, le fichier (/etc/conf.modules).

  Comme  modprobe  connait  deja  la  plupart des modules, le fichier de
  configuration minimal ressemble a quelque chose comme ca :

               alias scsi_hostadapter aha1542  # ou n'importe quel controleur SCSI
               alias eth0 3c509                # ou n'importe quelle carte reseau

               # Vous avez besoin d'une ligne "options" pour certaines cartes reseau :
               options 3c509 io=0x300 irq=10

               # egalement une ligne "options" pour d'autres modules :
               options cdu31a cdu31a_port=0x1f88 sony_pas_init=1

  Vous pouvez egalement ajouter ces trois lignes, mais elles ne sont  la
  que pour des raisons _c_o_s_m_e_t_i_q_u_e_s:

               alias net-pf-3 off      # pas de mode ax25 disponible
               alias net-pf-4 off      # si vous n'utilisez pas le module ipx
               alias net-pf-5 off      # si vous n'utilisez pas le module appletalk

  Enfin,   pour  les  puriste,  vous  pouvez  placer  votre  fichier  de
  configuration    soit    dans     /etc/conf.modules,     soit     dans
  /etc/modules.conf, comme modprobe sait ce qu'il doit faire dans chacun
  des cas...

  33..  CCoonnffiigguurraattiioonn ggeenneerraallee dduu nnooyyaauu

  Note : il n'est pas possible d'avoir a la fois le support a.out _e_t ELF
  compiles  sous  la  forme  de  modules.  Sinon, vous allez obtenir une
  erreur Catch-22  lorsque  insmod  essayera  d'installer  les  supports
  a.out/ELF car vous ne pouvez pas executer insmod ;-). Si vous possedez
  un systeme tout ELF, mais que vous avez besoin du support  a.out  pour
  lancer  de  temps  en  temps  une  session Netscape, alors vous pouvez
  mettre le support a.out sous la forme de module.  Sinon,  vous  pouvez
  toujours  le laisser dans le noyau, et si vous n'utilisez toujours pas
  le format ELF, vous pouvez meme le retirer completement du noyau.

  33..11..  KKeerrnneell ssuuppppoorrtt ffoorr aa..oouutt bbiinnaarriieess ((bbiinnffmmtt__aaoouutt..oo).

  ______________________________________________________________________
  Commande de chargement :

          /sbin/modprobe binfmt_aout.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  33..22..  KKeerrnneell ssuuppppoorrtt ffoorr EELLFF bbiinnaarriieess ((bbiinnffmmtt__eellff..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe binfmt_elf.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  33..33..  KKeerrnneell ssuuppppoorrtt ffoorr JJAAVVAA bbiinnaarriieess ((bbiinnffmmtt__jjaavvaa..oo).

  JAVA est un lanage de programmation oriente objet developpe  par  SUN.
  Les  programmes  JAVA  sont  compiles en un pseudo-code qui peut alors
  etre interprete par le systeme d'execution sur n'importe quel  systeme
  d'exploitation.  Ces  binaires JAVA sont en train de devenir un format
  universel  d'executables.  Cette  option  vous  permet  d'executer  un
  programme  JAVA tout comme n'importe quel autre programme : en tappant
  son seul nom.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe binfmt_java.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  44..  LLeecctteeuurr ddee ddiissqquueetttteess eett aauuttrreess ppeerriipphheerriiqquueess mmooddee bblloocc

  44..11..  LLee ggeessttiioonnnnaaiirree dduu lleecctteeuurr ddee ddiissqquueetttteess ((ffllooppppyy..oo).

  Il existe beaucoup d'options concernant le gestionnaire du lecteur  de
  disquettes,  mais  elles  sont enumerees et detaillees dans le fichier
  README.fd situe dans le repertoire linux/drivers/block. Pour  plus  de
  details, consultez ce fichier.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe floppy.o 'floppy="<options>"'

          Voir les explications ci-dessous.
  ______________________________________________________________________

  mask,allowed_drive_mask  -  fixe  le  masque des lecteurs autorisees a
  mask. Par defaut, seules les unites 0 et 1  de  chaque  controleur  de
  lecteur  sont  autorisees.   C'est  ainsi  car  certaines  cartes  non
  standards (comme les cartes meres ASUS PCI)  provoquent  des  conflits
  avec  le  clavier  lorsque l'on accede aux unites 2 ou 3. Cette option
  est quelque peu obsolete grace a l'option cmos.

  all_drives -  fixe  le  masque  des  lecteurs  autorises  a  tous  les
  lecteurs.  Utilisez ceci si vous avez plus de deux disques connectes a
  un controleur de lecteur de disquettes.

  asus_pci - fixe le masque des unites activees a 0 et 1.  (par defaut)

  daring - indique au lecteur de disquette que vous avez  un  controleur
  qui  possede  un  comportement  correcte.  Cela lui permet d'etre plus
  efficace mais peut eventuellement echouer  sur  certains  controleurs.
  Cela peut meme accelerer certains acces sur le lecteur.

  0,daring  -  specifie  que  le lecteur de disquettes doit etre utilise
  avec precaution.

  one_fdc - indique au lecteur que vous n'avez qu'un seul controleur  de
  lecteur de disquettes (defaut).

  two_fdc  _o_u  address,two_fdc  - specifie au lecteur que vous avec deux
  controleurs de disquettes.  Le second controleur est  suppose  etre  a
  address. Cette option n'est pas necessaire si le second controleur est
  a l'adresse 0x370, et si vous utilisez l'option cmos.

  thinkpad - indique que le  lecteur  est  un  Thinkpad.  Les  Thinkpads
  utilisent  une  convention  inversee  pour  le  changement de ligne du
  disque.

  0,thinkpad - specifie au gestionnaire du lecteur de disquette que vous
  ne possedez pas de Thinkpad.

  omnibook  _o_u  nodma - indique que le gestionnaire n'utilise pas le Dma
  pour le transfert de donnees. C'est necessaire sur les  Omnibooks  HP,
  qui  n'ont  pas  un canal DMA utilisable pour le lecteur de disquette.
  Cette option est  egalement  utile  si  vous  obtenez  frequement  des
  messages  "Unable  to  allocate  DMA memory".  En fait, la memoire dma
  doit etre continue d'un  point  de  vue  physique  et  elle  est  donc
  difficile a touver, alors que les tampons non-dma peuvent etre alloues
  dans la memoire virtuelle.  Toutefois, je ne le conseille pas si  vous
  possedez  un  FDC sans FIFO (8272A ou 82072). 82072A et superieur sont
  bons. Vous avez egalement besoin  d'au  moins  un  486  pour  utiliser
  nodma.  Si  vous utilisez le mode nodma, je vous suggere de configurer
  egalement le seuil de FIFO a 10 ou inferieur, pour limiter  le  nombre
  d'interruption de transfert de donnees.

  dma  -  indique  au  gestionnaire  qu'un canal DNA est disponible (par
  defaut).

  nofifo - desactive totalement la FIFO. Cela  est  necessaire  si  vous
  obtenez  un "Bus master arbitration error" de votre carte Ethernet (ou
  d'un autre peripherique) lorsque vous accedez au lecteur.

  fifo - active la FIFO (par defaut)

  [threshold],fifo_depth - fixe le seuil FIFO. Cela a beaucoup  plus  de
  rapport  avec  le  mode DMA. S'il est haut, le gestionnaire du lecteur
  tolere plus d'interruption, mais  il  declenche  plus  d'interruptions
  (c'est  a  dire  qu'il  impose  une charge plus importante au reste du
  systeme). S'il est bas, la latence des interruptions devrait egalement
  etre faible (sur des processeurs rapides). Le benefice d'un seuil plus
  faible implique une baisse des interruptions.

  Pour regler le seuil de la  FIFO,  acitver  l'option  d'affichage  des
  messages  en utilisant floppycontrol --messages.  Accedez ensuite a un
  lecteur de disquette. Si vous  obtienez  alors  beaucoup  de  messages
  "Over/Underrun  -  retrying",  alors le seuil est trop faible. Essayez
  avec une valeur  plus  importante,  jusqu'a  ce  que  vous  n'obteniez
  uniquement un message accasionnel. C'est une bonne idee de compiler le
  gestionnaire de lecteur  de  disquettes  sous  la  forme  d'un  module
  lorsque  vous faites cette mise au point. En fait, il permet d'essayer
  differentes valeurs de FIFO sans avoir a reamorcer la machine a chaque
  test.   Notez  que  vous  devez rajouter un floppycontrol --messages a
  chaque vous que vous re-inserez  le  module.  Normalement,  regler  le
  seuil de FIFO ne devrait pas etre necessaire, car la valeur par defaut
  (0xa) est bien souvent raisonable.

  [drive],[type],cmos - fixe le type CMOS de  drive  a  type.  Ceci  est
  obligatoire  si  vous  possedez  plus  de  deux lecteurs de disquettes
  (seuls deux peuvent decrits dans le CMOS physique), ou si  votre  BIOS
  utilise  des types CMOS qui ne sont pas standards. Les types CMOS sont
  :

  ______________________________________________________________________
            0 - Utiliser la valeur du CMOS physique
                  1 - 5 1/4 DD
                  2 - 5 1/4 HD
                  3 - 3 1/2 DD
                  4 - 3 1/2 HD
                  5 - 3 1/2 ED
                  6 - 3 1/2 ED
                 16 - inconnu ou non installe
  ______________________________________________________________________

  (Note : il existe deux types valides pour les lecteurs ED. C'est  tout
  simplemente parce que 5 a initialement ete choisis pour represente les
  lecteurs de cartouches, et 6 pour les lecteurs ED.  AMI a ignore  cela
  et  a utilis 5 pour les lecteurs ED. C'est pourquoi le gestionnaire de
  lecteurs de disquettes gere les deux.)

  unexpected_interrupts - affiche  un  message  lorsqu'une  interruption
  imprevue est recue (comportement par defaut)

  no_unexpected_interrupts   _o_u   L40SX   -  n'affiche  pas  un  message
  lorsqu'une interruption imprevue est recue. C'est necessaire  sur  les
  portables  IBM L40SX dans certains modes videos (il semble y avoir une
  interaction entre la video et le lecteur de disquettes. L'interruption
  ne  fait  qu'affecter  les  performances  et peut donc etre ignoree en
  toute securite).

  44..22..  LLooooppbbaacckk bblloocckk ddeevviiccee ssuuppppoorrtt ((lloooopp..oo).

  En activant cette option, vous pourrez  monter  un  fichier  comme  un
  systeme de fichiers. C'est utile si vous voulez verifier un systeme de
  fichiers ISO9660 avant de gaspiller  des  CD,  ou  si  vous  souhaitez
  ecrire des images disques sans les ecrire sur disquette.

  Cette  option permet egalement de monter un systeme de fichier cryote.
  Pour utiliser cette possibilite,  vous  aurez  besoin  d'utiliser  une
  version  recente de mount ainsi que des patches pour DES et IDEA.  Ils
  peuvent           etre           trouves            a            l'URL
  http://www.binary9.net/nicholas/linuxkernel/patches.    Notez  que  ce
  _l_o_o_p _d_e_v_i_c_e n'a rien a voir avec le _l_o_o_p_b_a_c_k _d_e_v_i_c_e utilise  pour  les
  connexions reseau depuis la meme machine.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe loop.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  44..33..  MMuullttiippllee ddeevviicceess ddrriivveerr ssuuppppoorrtt ((RRAAIIDD))..

  Ce  gestionnaire  de  peripheriques  vous permet de combiner plusieurs
  partitions de disques dur en une seule partition logique.

  Les outils permettant de manipuler les peripheriques md  peuvent  etre
  trouves dans sweet-smoke.ufr-info-p7.ibp.fr/public/Linux/md035.tar.gz.
  Au meme endroit, vous pourrez egalement trouver un document :  la  _m_d_-
  _F_A_Q.
  Il  existe  plusieurs  niveaux de RAID (RRedundant AArray of IInexpensive
  (or IIndependent) DDisks).

  +o  RRAAIIDD--00,, les donnees sont distribuees sur tous les  disques.  Aucune
     gestion d'erreurs.

     PPrrooss..
        Meilleur  taux  de  transfert de donnees RAID.  Transparent pour
        les applications.

     CCoonnss..
        Aucune gestion des erreurs ou des redondances.  Un crash de l'un
        des  disque  dans  le  tableau  provoque  la perte de toutes les
        donnees stoquees dans le tableau. Tout  calcul  MTBF  doit  etre
        vraiment recalcule.

  +o  RRAAIIDD--11,, Miroir de disques.

     PPrrooss..
        Aucune perte en ecriture. Redondance des donnees a 100%.  Aucune
        perte de performance apres echec.

     CCoonnss..
        Cout augmente de 100%. Necessite de doubler l'espace disque.

  +o  RRAAIIDD--55,, Repartition orientee secteurs des donnees et des parites.

     PPrrooss..
        Bonnes performances  pour  des  systemes  transactionnels.   Pas
        d'ecriture  avec  anticipation comme avec RAID-4.  Ecriture avec
        anticipation au maximum  sur  un  des  disques.   Peut  lire  en
        parallele a travers le tableau.

     CCoonnss..
        Degradation   des  performances  durant  la  reconstruction  des
        donnees.

  +o  RRAAIIDD--66,, Miroir du tableau RAID-0.

     PPrrooss..
        Taux de transfert de donnees RAID comparable a RAID-0.  100%  de
        redondance  des  donnees.   Aucune  perte  de  performance apres
        echec.

     CCoonnss..
        100% de cout suplementaire.  Demande un doublement de la surface
        de disque par rapport a un systeme normal.

  Seul  RAID-0  est  disponible pour Linux actuellement. Le mode lineair
  n'est pas considere comme faisant partie de la  definition  RAID.   Le
  _R_a_i_d  _A_d_v_i_s_o_r_y _B_o_a_r_d ne considere pas egalement que RAID-0 fait partie
  de la definition de RAID puisqu'il manque la redondance des donnees.

  Les modes utiles a implementer sont RAID-0, RAID-1, RAID-5 et  RAID-6.

  44..33..11..  MMuullttiippllee ddeevviiccee iinn LLiinneeaarr ((aappppeenndd)) mmooddee ((lliinneeaarr..oo).

  Si vous utilisez cette option, alors vos  multiples  gestionnaires  de
  peripheriques  pourront  utiliser  le  mode dir lineaire, c'est a dire
  combiner les partitions des disque dur en les  ajoutant  les  uns  aux
  autres.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe linear.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  44..33..22..  MMuullttiippllee ddeevviiccee iinn RRAAIIDD--00 ((ssttrriippeedd)) mmooddee ((rraaiidd00..oo).

  Si vous utilisez cette option, alors vos  multiples  gestionnaires  de
  peripheriques  seront  capable  d'utiliser  le mode dit raid0, c'est a
  dire que vous  pouvez  combiner  des  partitions  disque  en  un  seul
  peripherique.   Les   donnees  s'enregistreront  sur  les  differentes
  partitions.  Cela accel_re le taux de transfert si les  partitions  se
  trouvent sur des disques distincts.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe raid0.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  44..44..  RRAAMM ddiisskk ssuuppppoorrtt ((rrdd..oo).

  Activer  cette option va vous permettre d'utiliser une partie de votre
  RAM comme d'un peripherique en mode block, pour y creer  des  systemes
  de  fichier  en  lecture et en ecriture, pour y faire n'importe quelle
  operation qu'un peripherique en mode bloc normal  (comme  les  disques
  durs).  C'est generalement utilise pour charger et conserver une copie
  d'un systeme de fichier racine minimal lors de l'installation initiale
  de Linux.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe rd.o

          Aucun parametre pour le module.
          Parametres lors de l'amorcage disponibles, consultez le BootPrompt-HOWTO.
  ______________________________________________________________________

  44..55..  XXTT hhaarrddddiisskk ssuuppppoorrtt ((xxdd..oo).

  Les  vieux  controleurs 8 bits de disques dur utilises par les IBM XT.
  Maintenant, l'existance de ce support ne signifie pas que vous  pouvez
  utiliser Linux sur un IBM XT ;-).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe xd.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  55..  OOppttiioonnss TTCCPP//IIPP eett rreesseeaauu..

  55..11..  IIPP TTuunnnneelliinngg ((iippiipp..oo eett nneeww__ttuunnnneell..oo).

  Cette  option  provoque  l'encapsulation  des  donnees  d'un  type  de
  protocole dans un autre protocole et l'envoie a travers un cannal  qui
  comprends le protocol incapsule. Deux modules sont necessaires ipip.o,
  decodeur de protocole IP/IP,  et  le  gestionnaire  new_tunnel.o,  (il
  s'agissait  avant  de  tunnel.o  et  la  documentation  traite utilise
  toujours   ce    nom).     La    documentation    se    trouve    dans
  /usr/src/linux/drivers/net/README.tunnel.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ipip.o
          /sbin/modprobe new_tunnel.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  55..22..  IIPP AAlliiaassiinngg ssuuppppoorrtt ((iipp__aalliiaass..oo).

  Parfois,  il  est  tres utile de donner plusieurs adresses a une seule
  interface reseau (un port serie ou une carte Ethernet). Le cas le plus
  repandu  est  si  vous voulez avoir plusieurs serveurs WWW sur la meme
  machine, ayant des noms d'acces differents.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ip_alias.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  55..33..  IIPP RReevveerrssee AARRPP ((rraarrpp..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe rarp.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  55..44..  IIPPXX PPrroottooccooll ((iippxx..oo).

  Il s'agit de la gestion du protocole pour les  reseaux  Novell,   IPX,
  utilise pour les reseaux locaux sous Dos ou sous Windows.

  Ce protocole est necessaire si :

  +o  vous  voulez vous connecter a des serveurs Netware en se servant de
     l'emulateur Dos _D_O_S_E_M_U ;

  +o  vous voulez monter  des  disques  Netware  comme  des  systemes  de
     fichiers en utilisant le client Novell pour Linux, _n_c_p_f_s ;

  +o  vous  voulez  vous  connecter  au serveur Linux a partir de clients
     Netware, ou monter des repertoires Linux comme des disques Netware.
     Il existe deux demons pour cela : _l_i_n_w_a_r_e_d et _n_w_s_e_r_v.

  La page centrale pour ncpfs est ftp.gwdg.de/pub/linux/misc/ncpfs, mais
  sunsite et ses tres nombreux miroirs doit egalement l'avoir.

  Le site central de _L_i_n_w_a_r_e est klokan.sh.cvut.cz/pub/linux/linware,

  Le   paquetage   _n_w_s_e_r_v,   _M_a_r_s___n_w_e   se    trouve    egalement    sur
  ftp.gwdg.de/pub/linux/misc/ncpfs.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ipx.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  55..55..  AApppplleettaallkk DDDDPP ((aapppplleettaallkk..oo).

  Appletalk  est le protocole de communication entre les machines Apple.
  EtherTalk est le nom utilise pour appletalk sur Ethernet et  Localtalk
  est en fait appletalk sur les lignes series Apple.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe appletalk.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  66..  GGeessttiioonn SSCCSSII..

  La  gestion  SCSI dans le noyau Linux peut etre transformee en modules
  de plusieurs maniere, selon le besoin de  l'utilisateur  final.   Pour
  comprendre ces options, definissons tout d'abord quelques termes.

  Le noyau SCSI contient le noyau de la gestion SCSI. Sans cela, vous ne
  pouvez rien faire avec aucun autre gestionnaire SCSI.  Ce  noyau  SCSI
  peut  etre  transforme  en  module (scsi_mod.o), ou il peut etre inclu
  dans le noyau. S'il s'agit d'un module, il doit etre le premier module
  charge  et  si  vous  dechargez  les modules, il devra etre le dernier
  decharge.

  Les gestionnaires de plus haut ou de  plus  bas  niveau  peuvent  etre
  charge  dans  n'importe  quel  ordre  du  moment  ou le noyau SCSI est
  present dans le noyau (qu'il soit originalement inclu ou sous forme de
  module).  Le  gestionnaire de disque (sd_mod.o), de CD-ROM (sr_mod.o),
  de lecteur de cartouches  (st.o)  ainsi  que  les  gestionnaires  SCSI
  generiques  (sg.o)  representent  les gestionnaires de haut niveau qui
  peuvent  etre  controlles.  Vous  pouvez  par   exemple   charger   le
  gestionnaire  de  lecteurs  de  cartouches  pour  utiliser  le lecteur
  correspondant, et ensuite le decharger lorsque  vous  n'en  avez  plus
  besoin (et ainsi liberer la memoire correspondante).

  Les  gestionnaires  bas  niveau  sont  ceux qui gerent les cartes SCSI
  supportees par votre machine. Par exemple, pour la carte Adaptec 1542,
  aha1542.o.

  66..11..  GGeessttiioonn dduu nnooyyaauu SSCCSSII

  66..11..11..  GGeessttiioonn dduu nnooyyaauu SSCCSSII ((ssccssii__mmoodd..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe scsi_mod.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  66..22..  GGeessttiioonn hhaauutt nniivveeaauu SSCCSSII

  66..22..11..  GGeessttiioonn ddiissqquuee SSCCSSII ((ssdd__mmoodd..oo)

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe sd_mod.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  66..22..22..  GGeessttiioonn lleecctteeuurr ddee ccaarrttoouucchhee SSCCSSII ((sstt..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe st.o

          Aucun parametre pour le module.
          Certains parametres d'amorcage sont disponibles, consultez le
          BootPrompt-HOWTO.
  ______________________________________________________________________

  66..22..33..  GGeessttiioonn ddeess CCDD--RROOMM SSCCSSII ((ssrr__mmoodd..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe sr_mod.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  66..22..44..  GGeessttiioonn dduu SSCCSSII ggeenneerriiqquuee ((ssgg..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe sg.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  66..33..  GGeessttiioonnnnaaiirreess SSCCSSII bbaass nniivveeaauu

  Bon  nombre  de  cartes  SCSI  ne  gerent pas de parametres pour leurs
  modules, ils font une _d_e_t_e_c_t_i_o_n  _a_u_t_o_m_a_t_i_q_u_e  des  cartes.   Lisez  le
  document    SCSI-HOWTO    ainsi    que    le   fichier   README   dans
  /usr/src/linux/drivers/scsi pour  trouver  votre  materiel.  Si  votre
  carte  se  trouve a une adresse non standard, alors vous devez inclure
  d'une maniere permanente votre gestionnaire dans le noyau et  utiliser
  les  options  d'amorcage  de  votre  machine  (voir BootPrompt-HOWTO).
  Sinon, vous pouvez toujours modifier les sources et les recompiler.

  66..33..11..  77000000FFAASSSSTT SSCCSSII ssuuppppoorrtt ((wwdd77000000..oo),

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe wd7000.o

          Aucun parametre pour le module.
          Detection automatique la carte, a besoin d'un BIOS installe.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..22..  AAddaapptteecc AAHHAA115522XX//22882255 ssuuppppoorrtt ((aahhaa115544xx..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe aha154x.o

          Aucun parametre pour le module.
          Auto detection de la carte, a besoin d'un BIOS installe.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..33..  AAddaapptteecc AAHHAA11554422 ssuuppppoorrtt ((aahhaa11554422..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe aha1542.o

          Aucun parametre pour le module.
          Auto detection de la carte aux adresses 0x330 et 0x334.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..44..  AAddaapptteecc AAHHAA11774400 EEIISSAA ssuuppppoorrtt ((aahhaa11774400..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe aha1740.o

          Aucun parametre pour le module.
          Auto detection de la carte.
  ______________________________________________________________________

  66..33..55..  AAddaapptteecc AAHHAA227744XX//228844XX//229944XX ssuuppppoorrtt ((aaiicc77xxxxxx..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe aic7xxx.o

          Aucun parametre pour le module.
          Auto detection de la carte, le BIOS doit etre active.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..66..  AAddvvaannSSyyss SSCCSSII ssuuppppoorrtt ((aaddvvaannssyyss..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe advansys.o [parametres]

          asc_iopflag=1               observation du port active=1, desactive=0
          asc_ioport=0x110,0x330      ports a scruter
          asc_dbglvl=1                niveau de debogage
                                        0: uniquement les erreurs
                                        1: haut niveau de trace
                                        2-N: option verbeuse

          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..77..  AAllwwaayyss IINN22000000 SSCCSSII ssuuppppoorrtt ((iinn22000000..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe in2000.o

          Aucun parametre pour le module.
          Auto detection de la carte, BIOS non necessaire.
  ______________________________________________________________________

  66..33..88..  BBuussLLooggiicc SSCCSSII ssuuppppoorrtt ((BBuussLLooggiicc..oo).

  La liste des cartes BusLogic  supportees  est  _l_o_n_g_u_e.   Consultez  le
  fichier  /usr/src/linux/drivers/scsi/README.BusLogic  pour en avoir la
  liste complete.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe BusLogic.o

          Aucun parametre pour le module.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..99..  DDTTCC33118800//33228800 SSCCSSII ssuuppppoorrtt ((ddttcc..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe dtc.o

          Aucun parametre pour le module.
          Auto detection de la carte.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..1100..   EEAATTAA  IISSAA//EEIISSAA  ((DDPPTT   PPMM22001111//002211//001122//002222//112222//332222))   ssuuppppoorrtt
  ((eeaattaa..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe eata.o

          Aucun parametre pour le module.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..1111..  EEAATTAA--DDMMAA ((DDPPTT,, NNEECC,, AATT&&TT,, SSNNII,,  AASSTT,,  OOlliivveettttii,,  AAllpphhaattrroonniixx))
  ((eeaattaa__ddmmaa..oo).

  Inclue DPT Smartcache, Smartcache III et SmartRAID.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe eata_dma.o

          Aucun parametre pour le module.
          L'auto detection fonctionne dans toutes les configurations.
  ______________________________________________________________________

  66..33..1122..  EEAATTAA--PPIIOO ((oolldd DDPPTT PPMM22000011,, PPMM22001122AA)) ssuuppppoorrtt ((eeaattaa__ppiioo..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe eata_pio.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  66..33..1133..  FFuuttuurree DDoommaaiinn 1166xxxx SSCCSSII ssuuppppoorrtt ((ffddoommaaiinn..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe fdomain.o

          Aucun parametre pour le module.
          Auto detection de la carte, a besoin d'un BIOS installe.
  ______________________________________________________________________

  66..33..1144..  GGeenneerriicc NNCCRR55338800//5533cc440000 SSCCSSII ssuuppppoorrtt ((NNCCRR55338800..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe NCR5380.o

                  ncr_irq=xx      l'interruption
                  ncr_addr=xx     le port ou adresse de base (pour respectivement
                                  le port et la memoire mappee)
                  ncr_dma=xx      le canal DMA
                  ncr_5380=1      pour une carte NCR5380
                  ncr_53c400=1    pour une carte NCR53C400

          modprobe g_NCR5380 ncr_irq=5 ncr_addr=0x350 ncr_5380=1
           - pour un port sur une carte NCR5380 ou

          modprobe g_NCR5380 ncr_irq=255 ncr_addr=0xc8000 ncr_53c400=1
           - pour une carte NCR53C400 avec les interruptions desactivees.

          (255 devrait etre specifie pour aucune interruption ou aucun DMA,
           254 pour auto detecter une IRQ si elle est redefinie par la ligne de
           commande.)

          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..1155..  NNCCRR5533cc440066aa SSCCSSII ssuuppppoorrtt ((NNCCRR5533cc440066aa..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe NCR53c406a.o

          Aucun parametre pour le module.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..1166..  NNCCRR5533cc77,,88xxxx SSCCSSII ssuuppppoorrtt ((5533cc77,,88xxxx..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe 53c7,8xx.o

          Aucun parametre pour le module.
          Auto detection de la carte, necessite un BIOS installe.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..1177..  PPCCII--SSCCSSII NNCCRR553388xxxx ffaammiillyy ssuuppppoorrtt ((nnccrr5533cc88xxxx..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ncr53c8xx.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  66..33..1188..  IIOOMMEEGGAA PPaarraalllleell PPoorrtt ZZIIPP ddrriivvee SSCCSSII ssuuppppoorrtt ((ppppaa..oo).

  Consultez le fichier /usr/src/linux/drivers/scsi/README.ppa  pour  des
  informations detaillees.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ppa.o ppa_base=0x378 ppa_nybble=1

          Voici le detail des parametres ainsi que leur role :

          Variable        Defaut    Description

          ppa_base        0x378   Adresse de base du port parallele.
          ppa_speed_high  1       Delai en microsecondes utilise pour
                                  le transfert des donnees
          ppa_speed_low   6       Delai en microsecondes utilise dans d'autres
                                  operations
          ppa_nybble      0       1 pour force le gestionnaire a utiliser le
                                  mode 4 bits.
  ______________________________________________________________________

  66..33..1199..  PPAASS1166 SSCCSSII ssuuppppoorrtt((ppaass1166..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe pas16.o

          Aucun parametre pour le module.
          Auto detection de la carte, BIOS non necessaire.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..2200..  QQllooggiicc FFAASS SSCCSSII ssuuppppoorrtt ((qqllooggiiccffaass..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe qlogicfas.o

          Aucun parametre pour le module.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..2211..  QQllooggiicc IISSPP SSCCSSII ssuuppppoorrtt ((qqllooggiicciisspp..oo).

  A besoin de _f_i_r_m_w_a_r_e.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe qlogicisp.o

          Aucun parametre pour le module.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..2222..   ((sseeaaggaattee..oo).   Seagate  ST-02 and Future Domain TMC-8xx SCSI
  support

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe seagate.o

          Aucun parametre pour le module.
          Auto detection des adresses uniquement. L'IRQ est fixee a 5.
          A besoin d'un BIOS installe.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..2233..  TTrraannttoorr TT112288//TT112288FF//TT222288 SSCCSSII ssuuppppoorrtt ((tt112288..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe t128.o

          Aucun parametre pour le module.
          Auto detection de la carte, a beoin d'un BIOS installe.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..2244..  UUllttrraaSSttoorr 1144FF//3344FF ssuuppppoorrtt ((uu1144--3344ff..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe u14-34f.o

          Aucun parametre pour le module.
          Auto detection de la carte, mais pas le port 0x310.
          Le BIOS n'est demande.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  66..33..2255..  UUllttrraaSSttoorr SSCCSSII ssuuppppoorrtt ((uullttrraassttoorr..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ultrastor.o

          Aucun parametre pour le module.
          Parametres d'amorcage disponibles, voir BootPrompt-HOWTO.
  ______________________________________________________________________

  77..  GGeessttiioonn ddeess ppeerriipphheerriiqquueess rreesseeaauu

  77..11..  MMoodduulleess bbaass nniivveeaauu oobblliiggaattooiirreess oouu ooppttiioonnnneellss

  77..11..11..  OOppttiioonnaall BBSSDD ccoommpprreessssoorr ffoorr PPPPPP ((bbssdd__ccoommpp..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe bsd_comp.o

          Aucun parametre pour le module.

          Depend de ppp.o
  ______________________________________________________________________

  77..11..22..  SSLLHHCC ccoommpprreessssoorr ffoorr PPPPPP ((ssllhhcc..oo).

  Routines  de  compression et de decompression de paquets tcp (pour les
  transmissions sur des lignes series lentes).

  Necessaire pour les protocoles SLIP et PPP (egalement ISDN-PPP).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe slhc.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  77..11..33..  GGeessttiioonnnnaaiirree EEtthheerrnneett ggeenneerraall NNSS88339900((88339900..oo).

  Il s'agit du code specific pour bon nombre de cartes  Ethernet  basees
  sur la puce 8390. Il ne s'agit pas d'un gestionnaire complet mais doit
  etre combine avec d'autres gestionnaires plus specifiques comme  ne.o,
  wd.o, 3c503.o, etc.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe 8390.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  77..22..  DDuummmmyy nneett ddrriivveerr ssuuppppoorrtt ((dduummmmyy..oo).

  Il  s'agit  en  fait  d'un  peripherique sans fin (c'est a dire que le
  trafic envoye dans ce peripherique est oublie)  avec  une  adresse  IP
  configurable.  Il  est utilise pour rendre votre adresse SLIP inactive
  existante pour vos programmes locaux.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe dummy.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  77..33..  EEQQLL ((sseerriiaall lliinnee llooaadd bbaallaanncciinngg)) ssuuppppoorrtt ((eeqqll..oo).

  Si vous possedez deux connexions series  vers  des  ordinateurs  (cela
  necessite  donc  deux modems et deux lignes telephoniques) et que vous
  utilisez  SLIP (protocole pour envoyer des donnees  sur  Internet  via
  une  ligne  telephonique)  ou  PPP (meilleur protocole que SLIP), vous
  pouvez faire en sorte qu'elle se comporte  comme  une  connexion  deux
  fois plus rapide en utilisant ce gestionnaire.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe eql.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  77..44..  FFrraammee rreellaayy DDLLCCII ssuuppppoorrtt ((ddllccii..oo).

  Il  s'agit  du support pour le protocole de relai de trames.  Le relai
  de trame  est  une  maniere  de  se  connecter  a  faible  cout  a  un
  fournisseur  de  services  externe  ou  a  un  reseau prive.  La ligne
  physique de votre machine a votre "switch"  (c'est  a  dire  le  point
  d'entree  au  reseau)  peut gerer plusieurs connexions points a points
  vers d'autres ordinateurs connectees au relai. Pour  une  presentation
  generale     du     protocole,     consultez    l'URL    http://frame-
  relay.indiana.edu/4000/4000index.html.   Pour  utiliser  le  relai  de
  trames,  vous  avez  besoin  de  gerer  certains  materiels  (FRAD) et
  certains programmes livres dans le paquetage net-tools comme cela  est
  explique dans le fichier Documentation/networking/framerelay.txt.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe dlci.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  77..55..  SSaannggoommaa SS550022AA FFRRAADD ssuuppppoorrtt ((ssddllaa..oo).

  Il  s'agit  d'un gestionnaire pour les peripheriques FRAD (_F_r_a_m_e _R_e_l_a_y
  _A_c_c_e_s_s _D_e_v_i_c_e_s) Sangoma S502A, S502E et  S508.  Il  s'agit  de  cartes
  multi  protocoles,  mais  seul  le  relai  de trames est genere par ce
  gestionnaire                   actuellement.                     Lisez
  Documentation/networking/framerelay.txt.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe sdla.o

          Aucun parametre pour le module.

          Depend de dlci.o
  ______________________________________________________________________

  77..66..  PPLLIIPP ((ppaarraalllleell ppoorrtt)) ssuuppppoorrtt ((pplliipp..oo).

  PLIP  (Parallel Line Internet Protocol) est utilise pour creer un mini
  reseau consistant de deux (rarement plus) machines locales.  Les ports
  paralleles  (les  connecteurs  des  ordinateurs  a  25  broches)  sont
  connectes en utilisant des cables dits _n_u_l_l _p_r_i_n_t_e_r ou  _T_u_r_b_o  _L_a_p_l_i_n_k
  qui  peuvent  etre  transmettre  4  bits en meme temps ou utiliser des
  cables PLIP speciaux pour  etre  utilises  sur  des  ports  paralleles
  uniquement  bidirectionels  qui  peuvent  transmettre  8  bits au meme
  moment (vous pouvez trouver les specifications de ces cables  dans  le
  fichier  drivers/net/README?.plip). Les cables peuvent etre longs d'au
  maximum 15 metres. Cela fonctionne egalement  si  l'une  des  machines
  tourne  sous  DOS/Windows  et possede les logiciels PLIP correspondant
  comme          le          gestionnaire          Crynwr           PLIP
  http://sunsite.cnam.fr/packages/Telnet/PC/msdos/misc/pktdrvr.txt    et
  winsock ou le telnet NCSA.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe plip.o io=0x378 irq=7

          io = 0
          irq = 0         (par defaut, utilisez IRQ 5 pour le port 0x3bc,
                                            IRQ 7 pour le port 0x378,
                                        and IRQ 2 pour le port 0x278)
          (Scrute les ports: 0x278, 0x378, 0x3bc)
  ______________________________________________________________________

  77..77..  PPPPPP ((ppooiinntt--ttoo--ppooiinntt)) ssuuppppoorrtt ((pppppp..oo).

  Pour utiliser PPP, vous avez besoin d'un autre programme appelle  pppd
  comme cela est decrit dans le fichier Documentation/networking/ppp.txt
  et       dans        le        PPP-HOWTO,        disponible        sur
  sunsite.unc.edu:/pub/Linux/docs/HOWTO.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ppp.o

          Aucun parametre pour le module.

          Depend de slhc.o
          Depend egalement de serial.o, ce n'est pas detecte automatiquement,
          donc serial.o doit etre charge manuellement.
  ______________________________________________________________________

  77..88..  SSLLIIPP ((sseerriiaall lliinnee)) ssuuppppoorrtt ((sslliipp..oo).

  SLIP  (Serial  Line  Internet  Protocol)  est le protocle utilise pour
  acceder a Internet via des lignes  telephoniques  ou  via  des  cables
  serie (connu comme etant nullmodem).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe slip.o

          slip_maxdev = 256 (valeur par defaut SL_NRUNIT dans slip.h)

          Depend de slhc.o
          Depend egalement de serial.o, ce n'est pas detecte automatiquement,
          donc serial.o doit etre charge manuellement.
  ______________________________________________________________________

  77..99..  IInntteerrffaaccee RRaaddiioo AAmmaatteeuurr eett rreesseeaauu ssaannss--ffiill

  77..99..11..   ((bbaayyccoomm..oo).  BAYCOM ser12 and par96 kiss emulation driver for
  AX.25

  Il  s'agit  d'un  gestionnaire  pour de simples modems radios amateurs
  Baycom connectes a une interface serie ou a une  interface  parallele.
  Le  gestionnaire  gere les versions ser12 et par96. Pour configurer ce
  gestionnaire,   utilisez   les   programmes   disponibles   a    l'URL
  http://www.ife.ee.ethz.ch/~sailer/ham/ham.html#lnxbay.            Pour
  information sur les modems, consultez l'URL http://www.baycom.de et le
  fichier drivers/char/README.baycom.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe baycom.o modem=1 iobase=0x3f8 irq=4 options=1

          major   nombre majeur que le gestionnaire devrait utiliser; par defaut 60
          modem   type du modem du premier canal (mineur 0); 1=ser12,
                  2=par96/par97, toute autre valeur invalide
          iobase  adresse de base du port; valeur repandues pour ser12 : 0x3f8,
                  0x2f8, 0x3e8, 0x2e8 et pour par96/par97 : 0x378, 0x278, 0x3bc
          irq     ligne d'interruption du port; valeur repandues pour ser12 : 3,4
                  et pour par96/par97 : 7
          options 0=utilise le DCD materiel, 1=utilise le DCD logiciel
  ______________________________________________________________________

  77..99..22..  SSTTRRIIPP ((MMeettrriiccoomm ssttaarrmmooddee rraaddiioo IIPP)) ssttrriipp..oo).

  STRIP  est  un  protocole  radio  developpelors  du projet MosquitoNet
  (http://mosquitonet.stanford.edu/) pour acceder  a  Internet  via  des
  radios  Metricom.  Ces  radios  sont petites, alimentees par bateries,
  avec une vitesse de 100 kbit/sec, et environ de la taille et  du  poid
  d'un  telephone  cellulaire  (vous  pouvez  egalement en avoir entendu
  parle sous le nom de "Metricom modems" mais nous oublierons  le  terme
  "modem"  car il n'est pas bien employe ici. Cela pourrait faire penser
  que l'on peut connecter un modem Metricom a une ligne telephonique  et
  s'en  servir  comme d'un modem).  Vous pouvez utiliser STRIP sur toute
  machine Linux possedant un port serie, meme si  cela  est  quand  meme
  plus utile sur des portables.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe strip.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  77..99..33..  WWaavveeLLAANN ssuuppppoorrtt ((wwaavveellaann..oo).

  Il  s'agit de cartes pour des reseaux sans fil. Les cartes gerees sont
  les cartes GIS d'AT&T et WaveLAN de NCR.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe wavelan.o

          io = 0x390      (configurable mais ce n'est pas recommande)
          irq = 0         (hum... evitez de changer)
  ______________________________________________________________________

  77..99..44..  WWIICC RRaaddiioo IIPP bbrriiddggee ((wwiicc..oo).

  Gestion du systeme _W_I_C _p_a_r_a_l_l_e_l _p_o_r_t _r_a_d_i_o _b_r_i_d_g_e.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe wic.o

          Il s'avere que les peripheriques 'wic0', 'wic1' and 'wic2'
          ont des relations directes avec les ports correspondants
          'lpx'.
  ______________________________________________________________________

  77..99..55..  ZZ88553300 SSCCCC kkiissss eemmuullaattiioonn ddrriivveerr ffoorr AAXX..2255 ((sscccc..oo).

  Ces cartes sont utilisees pour  connecter  votre  Linux  a  une  radio
  amateur  pour communiquer avec d'autres ordinateurs. Si vous souhaitez
  utiliser          cela,          lisez          les          documents
  Documentation/networking/z8530drv.txt et le HAM-HOWTO.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe scc.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  77..1100..  CCaarrtteess EEtthheerrnneett 33CCOOMM..

  77..1100..11..  33cc550011 ssuuppppoorrtt ((33cc550011..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe 3c501.o

          io  = 0x280     Adresse de base
          irq = 5         IRQ
          (Scrute les ports :  0x280, 0x300)
  ______________________________________________________________________

  77..1100..22..  33cc550033 ssuuppppoorrtt ((33cc550033..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe 3c503.o

          io = 0          (des messages risquent apparaitre si vous n'utilisez
                           pas "io=0xNNN")
          irq = 0         (IRQ choisie par le gestionnaire utilisant autoIRQ)
          xcvr = 0        (Utilisez xcvr=1 pour choisir un transceiver externe.)
          (Scrute les ports : 0x300, 0x310, 0x330, 0x350, 0x250, 0x280, 0x2A0,0x2E0)

          Depend de 8390.o
  ______________________________________________________________________

  77..1100..33..  33cc550055 ssuuppppoorrtt ((33cc550055..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe 3c505.o

          io = 0x300
          irq = 0
          (Scrute les ports : 0x300, 0x280, 0x310)
  ______________________________________________________________________

  77..1100..44..  33cc550077 ssuuppppoorrtt ((33cc550077..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe 3c507.o

          io = 0x300
          irq = 0
          (Scrute les ports : 0x300, 0x320, 0x340, 0x280)
  ______________________________________________________________________

  77..1100..55..  33cc550099//33cc557799 ssuuppppoorrtt ((33cc550099..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe 3c509.o

          io = 0
          irq = 0
          (le systeme de probe ne fonctionne avec les modules qu'avec
           un bus EISA. Avec un bus ISA, cela ne fonctionne pas : dans
           ce cas, integrez d'une maniere statique votre gestionnaire si
           vous avez besoin d'un auto-probe.)
  ______________________________________________________________________

  77..1100..66..  33cc559900 sseerriieess ""VVoorrtteexx"" ssuuppppoorrtt ((33cc5599xx..oo).

  Gestionnaire des cartes suivantes :

  +o  3c590 Vortex 10Mbps.

  +o  3c595 Vortex 100baseTX.

  +o  3c595 Vortex 100baseT4.

  +o  3c595 Vortex 100base-MII.

  +o  EISA Vortex 3c597.

     ___________________________________________________________________
     Commande de chargement :
             /sbin/modprobe 3c59x.o debug=1 options=0,,12

             Cela fixe le niveau des messages de debogage, et
             egalement la premiere carte a un transceiver 10baseT,
             la seconde a un transceiver genre EEPROM et la troisieme
             en full-duplex 100baseTx.
             (Note : configuration fixee par le BIOS PCI.)

             Differents materiels configurables
                     0       10baseT
                     1       10 Mbs AUI
                     2       indefini
                     3       10base2 (BNC)
                     4       100base-TX
                     5       100base-FX
                     6       MII (pas vraiment utilisable)
                     7       <parametres par defaut>

                     8       Full-duplex
                     8       10baseT full-duplex
                     12      100baseTx full-duplex
                     16      Bus-master enable bit (utilisation experimentale !)

             Les details de l'implementation du gestionnaire se trouvent
             au debut du code source.
     ___________________________________________________________________

  77..1111..  CCaarrtteess EEtthheerrnneett WWeesstteerrnn DDiiggiittaall//SSMMCC..

  77..1111..11..  WWDD8800**33 ssuuppppoorrtt ((wwdd..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe wd.o

          io = 0          (Risque generer des messages d'erreur si vous ne
                           rajoutez pas un "io=0xNNN")
          irq = 0         (IRQ. Lue dans l'EEPROM, les vielles cartes utilisent
                           autoIRQ)
          mem = 0         (Force la memoire partagee a l'adresse 0xC8000, ou
                           ce qye vous voulez..)
          mem_end = 0     (Force la taille de la memoire en specifiant une valeur.)
                          (par exemple, pour une carte WD8003EBT 32Ko, utiliser
                          mem=0xd0000 mem_end=0xd8000)
          (Scrute les ports :  0x300, 0x280, 0x380, 0x240)

          Depend de 8390.o
  ______________________________________________________________________

  77..1111..22..  SSMMCC UUllttrraa//EEtthheerrEEZZ ssuuppppoorrtt ((ssmmcc--uullttrraa..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe smc-ultra.o

          io = 0          (Risque generer des messages d'erreur si vous ne
                           rajoutez pas un "io=0xNNN")
          irq = 0         (IRQ. Lecture de l'EEPROM)
          (Scrute les ports :  0x200, 0x220, 0x240, 0x280, 0x300, 0x340, 0x380)

          Depend de 8390.o
  ______________________________________________________________________

  77..1111..33..  SSMMCC 99119944 ssuuppppoorrtt ((ssmmcc99119944..oo).

  Il s'agit d'un gestionnaire pour les cartes Ethernet SMC 9000.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe smc9194.o

          io = 0          pour l'adresse de base
          irq = 0         pour l'IRQ
          ifport = 0      pour une audodetection, 1 pour TP, 2 pour AUI ( ou 10base2 )

          Scrute les ports : 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
                             0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0

          Niveau de debogage configurable dans le fichier smc9194.c.
  ______________________________________________________________________

  77..1122..  AAuuttrreess ccaarrtteess EEtthheerrnneett..

  77..1122..11..  AATT11770000 ssuuppppoorrtt ((aatt11770000..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe at1700.o

          io = 0x260
          irq = 0

          (Scrute les ports : 0x260, 0x280, 0x2A0, 0x240, 0x340, 0x320, 0x380, 0x300)
  ______________________________________________________________________

  77..1122..22..  CCaabblleettrroonn EE2211xxxx ssuuppppoorrtt ((ee22110000..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe e2100.o

          io = 0          (Risque generer des messages d'erreur si vous ne
                           rajoutez pas un "io=0xNNN")
          irq = 0         (IRQ logicielle detectee par le gestionnaire)
          mem = 0         (Redefini le debut de la memoire partagee 0xd0000)
          xcvr = 0        (Utilisez xcvr=1 pour choisir un transceiver externe.)
          (Scrute les ports : 0x300, 0x280, 0x380, 0x220)

          Depend de 8390.o
  ______________________________________________________________________

  77..1122..33..  DDEEPPCCAA,, DDEE1100xx,, DDEE220000,, DDEE220011,, DDEE220022,, DDEE442222 ssuuppppoorrtt ((ddeeppccaa..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe depca.o

          io = 0x200
          irq = 7
          (Scrute les ports :  ISA:  0x300, 0x200;
                               EISA: 0x0c00)
  ______________________________________________________________________

  77..1122..44..  EEtthheerrWWOORRKKSS 33 ((DDEE220033,, DDEE220044,, DDEE220055)) ssuuppppoorrtt ((eewwrrkk33..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ewrk3.o

          io = 0x300
          irq = 5
          (Avec un module, pas d'auto detection !
           Sur des bus EISA il effectue une detection EISA.
           Une inclusion statique permet une detection dur les
           ports ISA du bus :
                  0x100, 0x120, 0x140, 0x160, 0x180, 0x1A0, 0x1C0,
                  0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
                  0x300,        0x340, 0x360, 0x380, 0x3A0, 0x3C0)
  ______________________________________________________________________

  77..1122..55..  EEtthheerrEExxpprreessss 1166 ssuuppppoorrtt ((eeeexxpprreessss..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe eexpress.o

          io = 0x300
          irq = 0         (IRQ lue dans l'EEPROM)
          (Scrute les ports : 0x300, 0x270, 0x320, 0x340)
  ______________________________________________________________________

  77..1122..66..  EEtthheerrEExxpprreessssPPrroo ssuuppppoorrtt ((eeeepprroo..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe eepro.o

          io = 0x200
          irq = 0
          (Scrute les ports : 0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340, 0x360)
  ______________________________________________________________________

  77..1122..77..  FFuujjiittssuu FFMMVV--118811//118822//118833//118844 ssuuppppoorrtt ((ffmmvv1188xx..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe fmv18x.o

          io = 0x220      pour l'adresse de base
          irq = 0         pour l'IRQ

          (Scrute les ports : 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x300, 0x340)
  ______________________________________________________________________

  77..1122..88..  HHPP PPCCLLAANN++ ((2277224477BB aanndd 2277225522AA)) ssuuppppoorrtt ((hhpp--pplluuss..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe hp-plus.o

          io = 0          (Risque generer des messages d'erreur si vous ne
                           rajoutez pas un "io=0xNNN")
          irq = 0         (IRQ lue a partir de la configuration)
          (Scrute les ports : 0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340)

          Depend de 8390.o
  ______________________________________________________________________

  77..1122..99..  HHPP PPCCLLAANN ((2277224455 aanndd ootthheerr 2277xxxxxx sseerriieess)) ssuuppppoorrtt ((hhpp..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe hp.o

          io = 0          (Risque generer des messages d'erreur si vous ne
                           rajoutez pas un "io=0xNNN")
          irq = 0         (IRQ logicielle selectionnee par le gestionnaire
                           en utilisant autoIRQ)
          (Scrute les ports : 0x300, 0x320, 0x340, 0x280, 0x2C0, 0x200, 0x240)

          Depend de 8390.o
  ______________________________________________________________________

  77..1122..1100..  HHPP 1100//110000VVGG PPCCLLAANN ((IISSAA,, EEIISSAA,, PPCCII)) ssuuppppoorrtt ((hhpp110000..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe hp100.o

          hp100_port = 0 (adresse de base d'entree sortie)

          (Autodetection EISA, si connecte a un slot EISA;
          Sur des bus ISA, scute tous les ports de 0x100 a 0x3E0
          avec un pas de 0x020)
  ______________________________________________________________________

  77..1122..1111..  IICCLL EEtthheerrTTeeaamm 1166ii//3322 ssuuppppoorrtt ((eetthh1166ii..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe eth16i.o

          io = 0x2a0      (Risque generer des messages d'erreur si vous ne
                           rajoutez pas un "io=0xNNN")
          irq = 0         (IRQ logicielle selectionnee par le gestionnaire
                           en utilisant autoIRQ)

          Scrute les ports sur les cartes eth16i :
          0x260, 0x280, 0x2A0, 0x240, 0x340, 0x320, 0x380, 0x300

          Scrute les ports sur les cartes eth32i :
          0x1000, 0x2000, 0x3000, 0x4000, 0x5000, 0x6000, 0x7000, 0x8000,
          0x9000, 0xA000, 0xB000, 0xC000, 0xD000, 0xE000, 0xF000
  ______________________________________________________________________

  77..1122..1122..  NNEE22000000//NNEE11000000 ssuuppppoorrtt ((nnee..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ne.o

          io = 0          (Demande explicitement un io=0xNNN)
          irq = 0         (Essaye de demander une IRQ configuree
                           via autoIRQ)
          (Scrute les ports : 0x300, 0x280, 0x320, 0x340, 0x360)

          Depend de 8390.o
  ______________________________________________________________________

  77..1122..1133..  NNII55221100 ssuuppppoorrtt ((nnii5522..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ni52.o

          io=0x360
          irq=9
          memstart=0xd0000
          memend=0xd4000

          N'utilisez pas l'auto detection, io=0
  ______________________________________________________________________

  77..1133..  EEIISSAA,, VVLLBB,, PPCCII eett aauuttrreess ccoonnttrroolleeuurrss

  77..1133..11..  AAnnsseell CCoommmmuunniiccaattiioonnss EEIISSAA 33220000 ssuuppppoorrtt ((aacc33220000..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ac3200.o

          Comme il s'agit d'une carte EISA, l'autodetection devrait fonctionner.

          Depend de 8390.o
  ______________________________________________________________________

  77..1133..22..  AApprriiccoott XXeenn--IIII oonn bbooaarrdd eetthheerrnneett ((aapprriiccoott..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe apricot.o

          io = 0x300  (Ne peut etre changee !)
          irq = 10
  ______________________________________________________________________

  77..1133..33..  DDEE442255,, DDEE443344,, DDEE443355,, DDEE445500,, DDEE550000 ssuuppppoorrtt ((ddee44xx55..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe de4x5.o

          io = 0x000b
          irq = 10
          is_not_dec = 0
          Pour les cartes non DEC utilisant la puce
          DEC 21040/21041/21140, fixez cet parametre a 1
          (detection sur EISA et PCI)
  ______________________________________________________________________

  77..1133..44..  DDEECCcchhiipp TTuulliipp ((ddcc2211xx44xx)) PPCCII ssuuppppoorrtt ((ttuulliipp..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe tulip.o

          Lisez le fichier Documentation/networking/tulip.txt
  ______________________________________________________________________

  77..1133..55..  DDiiggii IInnttll.. RRiigghhttSSwwiittcchh SSEE--XX ssuuppppoorrtt ((ddggrrss..oo).

  Il  s'agit  d'un  gestionnaire  pour  les  cartes  PCI  et  EISA  Digi
  International  RightSwitch  SE-X.  Il  s'agit  de  4 (EISA) ou 6 (PCI)
  conneceurs Ethernet et d'un NIC reunis sur une meme carte.

  Il existe un outil pour configurer les filtres entrant et sortant  sur
  chaque port appelle dgrsfilt.

  L'outil   de   gestion  vous  permet  de  regarder  graphiquement  les
  performances, mais egalement les agents  SNMP,  IP  et  IPX,  le  _I_E_E_E
  _S_p_a_n_n_i_n_g _T_r_e_e, etc.  Cela peut egalement etre configure a partir de la
  ligne de commande lors du chargement du gestionnaire.

  Il existe egalement un autre outil de gestion, appelle xrightswitch.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe dgrs.o

          debug=NNN               Niveau de debogage
          dma=0/1                 Desactivation/Activation du DMA sur les cartes PCI
          spantree=0/1            Active ou desactive le "IEEE spanning tree"
          hashexpire=NNN          Change l'adresse du timeout (par defaut 300 secondes)
          ipaddr=A,B,C,D          Fixe l'adresse IP de l'agent SNMP par exemple 199,86,8,221
          ipxnet=NNN              Fixe l'adresse IPX de l'agent SNMP
  ______________________________________________________________________

  77..1144..  AAddaappttaatteeuurrss ppoorrttaabblleess eett ddee ppoocchhee

  77..1144..11..  DD--LLiinnkk DDEE660000 ppoocckkeett aaddaappttoorr ssuuppppoorrtt ((ddee660000..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe de600.o

          de600_debug = 0
          (Sur le port 0x378, irq 7 -- lpt1;  configurable lors de la compilation)
  ______________________________________________________________________

  77..1144..22..  DD--LLiinnkk DDEE662200 ppoocckkeett aaddaappttoorr ssuuppppoorrtt ((ddee662200..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe de620.o

          bnc = 0, utp = 0        <-- force une autre configuration materielle
          io = 0x378              (configurable lors de la compilation)
          irq = 7
  ______________________________________________________________________

  77..1155..  TTookkeenn RRiinngg ddrriivveerr ssuuppppoorrtt

  77..1155..11..  TTrrooppiicc cchhiippsseett bbaasseedd aaddaappttoorr ssuuppppoorrtt ((iibbmmttrr..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ibmtr.o io=0xa20 irq=0

          io = 0xa20      Ne pas utiliser l'auto detection avec insmod
          irq = 0
  ______________________________________________________________________

  77..1166..  AARRCCnneett ssuuppppoorrtt ((aarrccnneett..oo).

  Lisez    les    informations     contenues     dans     le     fichier
  /usr/src/linux/Documentation/networking/arcnet.txt.  De plus, certains
  informations sur les materiels Arcnet  se  trouvent  dans  le  fichier
  arcnet-hardware.txt situe dans le meme repertoire.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe arcnet.o io=0x300 irq=2 shmem=0xd0000

          Vous pouvez appeller le peripherique "device=arc1"
          (pour une seconde carte) ou "device=eth0" (pour des raisons
          evidentes) si vous voulez.

          (Lors de l'autodetection, les adresses suivantes sont regardees :
           Preferences :
                 0x300, 0x2E0, 0x2F0, 0x2D0
           Autres :
                  0x200, 0x210, 0x220, 0x230, 0x240, 0x250, 0x260, 0x270,
                  0x280, 0x290, 0x2A0, 0x2B0, 0x2C0,
                         0x310, 0x320, 0x330, 0x340, 0x350, 0x360, 0x370,
                  0x380, 0x390, 0x3A0,                      0x3E0, 0x3F0  )
  ______________________________________________________________________

  88..  SSoouuss--ssyysstteemmee IISSDDNN

  Configurer  un  reseau  ISDN est une tache un peu compliquee. Lisez la
  documentation        situee         dans         le         repertoire
  /usr/src/linux/Documentation/isdn.

  88..11..  IISSDDNN ssuuppppoorrtt ((iissddnn..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe isdn.o

          Aucun parametre pour le module.

          Depend de slhc.o
  ______________________________________________________________________

  88..22..  IICCNN 22BB aanndd 44BB ssuuppppoorrtt ((iiccnn..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe icn.o [parametres]

          portbase=p membase=m icn_id=idstring [icn_id2=idstring2]

          p = port de base                (par defaut : 0x320)
          m = memoire partagee    (par defaut : 0xd0000)

          Lorsque vous utilise la double carte ICN, vous DEVEZ
          definir deux chaines idstring. Chacune de ces chaines
          doit commencer par une lettre !

          Depend de isdn.o
  ______________________________________________________________________

  88..33..  PPCCBBIITT--DD ssuuppppoorrtt ((ppccbbiitt..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe pcbit.o

          mem = 0         par defaut = 0xd0000
          irq = 0         par defaut = 5

          Depend de isdn.o
  ______________________________________________________________________

  88..44..  TTeelleess//NNIICCCCYY11001166PPCC//CCrreeaattiixx ssuuppppoorrtt ((tteelleess..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe teles.o io=.....

          io=m0,i0,p0,d0[,m1,i1,p1,d1 ... ,mn,in,pn,dn] teles_id=idstring

       m0 = memoire partagee de la 1ere carte.    (par defaut : 0xd0000
       i0 = irq de la 1ere carte.         (par defaut : 15)
       p0 = port de la premere carte.             (par defaut : 0xd80)
       d0 = protocol D-channel de la 1ere carte. 1=1TR6, 2=EDSS1 (par defaut : 2)

       p1,i1,m1,d1 = Parametres de la deuxieme carte (par defaut : aucun)
       pn,in,mn,d1 = Parametres de la nieme carte (jusqu'a 16 cartes sont gerees)

       idstring = Identificateur du gestionnaire pour y acceder avec
        les outils ainsi que pour identification lorsque l'on utilise un
        moniteur de connexion (par defaut : aucun). Un idstring doit debutter
        par une lettre !

        Le type de la carte est determinee par le port, l'irq et
        la memoire partagee :

          port == 0, memoire partagee != 0 -> Teles S0-8
          port != 0, memoire partagee != 0 -> Teles S0-16.0
          port != 0, memoire partagee == 0 -> Teles S0-16.3

          Depend de isdn.o
  ______________________________________________________________________

  99..  CCDD--RROOMM ddrriivveerrss ((nnoott ffoorr SSCCSSII oorr IIDDEE//AATTAAPPII ddrriivveess))

  99..11..  AAzztteecchh//OOrrcchhiidd//OOkkaannoo//WWeeaarrnneess//TTXXCC//CCyyDDRROOMM ssuuppppoorrtt ((aazzttccdd..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe aztcd.o aztcd=[adresse de base]

          Lisez le fichier Documentation/cdrom/aztcd pour plus d'information.
  ______________________________________________________________________

  99..22..  GGoollddssttaarr RR442200 CCDDRROOMM ssuuppppoorrtt ((ggssccdd..oo).

  Pour tout type d'information sur le CDROM GoldStar R420 ainsi que  son
  gestionnaire   sous   Linux,  consultez  l'URL  :  http://linux.rz.fh-
  hannover.de/~raupach.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe gscd.o gscd=[adresse]

          Adresse par defaut 0x340.
          Cela fonctionnera avec la plupart des applications.
          La selection des adresses est realisee via les cavaliers
          PN801-1 a PN801-4 sur l'interface GoldStar.
          Les configurations appropriees sont :
          0x300, 0x310, 0x320, 0x330, 0x340, 0x350, 0x360, 0x370,
          0x380, 0x390, 0x3A0, 0x3B0, 0x3C0, 0x3D0, 0x3E0, 0x3F0
  ______________________________________________________________________

  99..33..    MMaattssuusshhiittaa//PPaannaassoonniicc//CCrreeaattiivvee,,   LLoonnggsshhiinnee,,    TTEEAACC    ssuuppppoorrtt
  ((ssbbppccdd..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe sbpcd.o sbpcd=[adresse], x

          adresse = adresse d'entree sortie
          x       = configuration SBPRO, lisez le fichier Documentation/cdrom/sbpcd
  ______________________________________________________________________

  99..44..  MMiittssuummii ((ssttaannddaarrdd)) nnoo XXAA//MMuullttiisseessssiioonn ssuuppppoorrtt ((mmccdd..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe mcd.o mcd=0x300,11,0x304,5

          Les parametres sont io et irq, par paire.
  ______________________________________________________________________

  99..55..  MMiittssuummii XXAA//MMuullttiiSSeessssiioonn ssuuppppoorrtt ((mmccddxx..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe mcdx.o mcdx=0x300,11,0x304,5

          Les parametres sont io et irq, par paire.
  ______________________________________________________________________

  99..66..  OOppttiiccss SSttoorraaggee DDOOLLPPHHIINN 88000000AATT CCDDRROOMM ssuuppppoorrtt ((ooppttccdd..oo).

  Il s'agit du gestionnaire pour le lecteur DOLPHIN avec  une  interface
  compativle  Sony  34  broches.   Pour le lecteur compatible IDE Optics
  Storage  8001,  vous  utiliserez  le  gestionnaire  CDROM  ATAPI.   Le
  gestionnaire semble egalement fonctionner avec le Lasermate CR328A.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe optcd.o optcd=0x340

          Le parametres correspond a l'adresse de base de la carte.
  ______________________________________________________________________

  99..77..  PPhhiilliippss//LLMMSS CCMM220066 CCDDRROOMM ssuuppppoorrtt ((ccmm220066..oo).

  Il  s'agit  du  gestionnaire  pour  le lecteur cdrom Philips/LMS cm206
  associe a la carte cm260.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe cm206.o cm206=0x300,11

          Les parametres correspondent au port de base et a l'IRQ de
          la carte. L'ordre port de base et irq importe peu.
          Vous ne devez en specifier qu'un seul, les autres auront
          la valeur par defaut.
  ______________________________________________________________________

  99..88..  SSaannyyoo CCDDRR--HH9944AA CCDDRROOMM ssuuppppoorrtt ((ssjjccdd..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe sjcd.o sjcd_base=0x340

          Le parametre correspond a l'adresse de base de votre carte.
          Adresse par defaut : 0x340,  aucune irq,  aucun dma.
  ______________________________________________________________________

  99..99..  IISSPP1166//MMAADD1166//MMoozzaarrtt ssoofftt  ccoonnffiigguurraabbllee  ccddrroomm  iinntteerrffaaccee  ssuuppppoorrtt
  ((iisspp1166..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe isp16.o [parametes]

          isp16_cdrom_base=<port>
          isp16_cdrom_irq=<irq>
          isp16_cdrom_dma=<dma>
          isp16_cdrom_type=<type de lecteur>

          Valeurs correcte :
            port=0x340,0x320,0x330,0x360
            irq=0,3,5,7,9,10,11
            dma=0,3,5,6,7
            drive_type=noisp16,Sanyo,Panasonic,Sony,Mitsumi.

            Ces options sont sensibles au fait que les lettres soient
            minuscules ou majuscules.
  ______________________________________________________________________

  99..1100..  SSoonnyy CCDDUU3311AA//CCDDUU3333AA CCDDRROOMM ssuuppppoorrtt ((ccdduu3311aa..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe cdu31a.o [parametres]

          cdu31a_port=<adresses I/O> - fixe les adresse de base.
          Cette option doit etre specifiee.

          cdu31a_irq=<interruption> - fixe le numero de l'interruption.
          Si cette option n'est pas specifiee, alors les interruptions
          sont desactivees.
  ______________________________________________________________________

  99..1111..  SSoonnyy CCDDUU553355 CCDDRROOMM ssuuppppoorrtt ((ssoonnyyccdd553355..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe sonycd535.o sonycd535=[adresse]

          Le parametres correspond a l'adresse de base de la carte.
  ______________________________________________________________________

  1100..  SSyysstteemmeess ddee ffiicchhiieerrss

  1100..11..  MMiinniixx ffss ssuuppppoorrtt((mmiinniixx..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe minix.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..22..  EExxtteennddeedd ffss ssuuppppoorrtt ((eexxtt..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ext.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..33..  SSeeccoonndd eexxtteennddeedd ffss ssuuppppoorrtt ((eexxtt22..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ext2.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..44..  xxiiaaffss ffiilleessyysstteemm ssuuppppoorrtt ((xxiiaaffss..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe xiafs.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..55..  DDOOSS FFAATT ffss ssuuppppoorrtt ((ffaatt..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe fat.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..66..  MMSSDDOOSS ffss ssuuppppoorrtt ((mmssddooss..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe msdos.o

          Aucun parametre pour le module.
          Depend de fat.o.
  ______________________________________________________________________

  1100..77..  VVFFAATT ((WWiinnddoowwss--9955)) ffss ssuuppppoorrtt ((vvffaatt..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe vfat.o

          Aucun parametre pour le module.
          Depend de fat.o.
  ______________________________________________________________________

  1100..88..  UUMMSSDDOOSS:: UUnniixx lliikkee ffss oonn ttoopp ooff ssttdd MMSSDDOOSS FFAATT ffss ((uummssddooss..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe vfat.o

          Aucun parametre pour le module.
          Depend de fat.o et de msdos.o.
  ______________________________________________________________________

  1100..99..  NNFFSS ffiilleessyysstteemm ssuuppppoorrtt ((nnffss..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe nfs.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..1100..  SSMMBB ffiilleessyysstteemm ssuuppppoorrtt ((ttoo mmoouunntt WWffWW sshhaarreess eettcc....))  ((ssmmbbffss..oo).

  smbfs  est  un systeme de fichier qui gere le protocole SMB. Il s'agit
  du protocole pour Windows for Workgroups, Windows NT et  Lan  Manager.
  smbfs  s'est  inspire de samba, le programme ecrit par Andrew Tridgell
  qui transforme une machine Unix en un serveur de fichiers pour Dos  ou
  Windows.    Regardez  l'URL  ftp://nimbus.anu.edu.au/pub/tridge/samba/
  pour plus d'explications  sur  les  programmes,  SMB  et  NetBIOS  sur
  TCP/IP.  Vous  pourrez  egalement  y  trouver des explications sur les
  concepts de nom netbios et des partages entre machines.

  Pour utiliser smbfs, vous devez utiliser un  programme  mount  special
  qui   peut   etre   trouve   dans  le  paquetage  ksmbfs,  situe  dans
  sunsite.unc.edu:/pub/Linux/system/Filesystems/smbfs.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe smbfs.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..1111..  NNCCPP ffiilleessyysstteemm ssuuppppoorrtt ((ttoo mmoouunntt NNeettWWaarree vvoolluummeess)) ((nnccppffss..oo).

  ncpfs  est un systeme de fichiers qui gere le protocole NCP, concu par
  Novell Corporation pour leurs produits NetWare(tm).  NCP  est  un  peu
  comme NFS dans la communaute TCP/IP. Pour monter un systeme de fichier
  Netware, vous devez utiliser un programme mount particulier, qui  peut
  etre trouve dans le paquetage ncpfs. La page principale pour ncpfs est
  ftp.gwdg.de/pub/linux/misc/ncpfs, mais sunsite ainsi que ses  nombreux
  miroirs en possedent egalement.

  Les   produits   linware   et   mars_nwe,   donneront   a   Linux  les
  fonctionnalites partielles d'un serveur NetWare.

  La      page       principale       de       _L_i_n_w_a_r_e       est       :
  klokan.sh.cvut.cz/pub/linux/linware,

  Celle       de      _M_a_r_s___n_w_e      se      trouve      a      l'adresse
  ftp.gwdg.de/pub/linux/misc/ncpfs.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ncpfs.o

          Aucun parametre pour le module.

          Depend de ipx.o
  ______________________________________________________________________

  1100..1122..  IISSOO99666600 ccddrroomm ffiilleessyysstteemm ssuuppppoorrtt ((iissooffss..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe isofs.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..1133..  OOSS//22 HHPPFFSS ffiilleessyysstteemm ssuuppppoorrtt ((rreeaadd oonnllyy)) ((hhppffss..oo)

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe hpfs.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..1144..  SSyysstteemm VV aanndd CCoohheerreenntt ffiilleessyysstteemm ssuuppppoorrtt ((ssyyssvv..oo).

  Il s'agit de l'implementation du systeme de fichiers  SystemV/Coherent
  pour Linux.

  Il implemente :

  +o  Xenix FS,

  +o  SystemV/386 FS,

  +o  Coherent FS.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe sysv.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..1155..  AAmmiiggaa FFFFSS ffiilleessyysstteemm ssuuppppoorrtt  ((aaffffss..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe affs.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1100..1166..  UUFFSS ffiilleessyysstteemm ssuuppppoorrtt ((rreeaadd oonnllyy)) ((uuffss..oo).

  C'est  sense  permettre  de monter des disques FreeBSD ou Sun.  Aucune
  documentation n'existe, si ce n'est les sources.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ufs.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1111..  PPeerriipphheerriiqquueess ccaarraacctteerreess

  1111..11..  SSuuppppoorrtt ffoorr uusseerr mmiisscc ddeevviiccee mmoodduulleess ((mmiisscc..oo).

  Ce  module  est  utilise  par  les   modules   atixlmouse,   busmouse,
  msbusmouse,  psaux,  wdt  et  softdog et il est automatiquement genere
  lorsqu'il est necessaire.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe misc.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1111..22..  SSttaannddaarrdd//ggeenneerriicc sseerriiaall ssuuppppoorrtt ((sseerriiaall..oo).

  NOTE : serial.o est necessaire par d'autres  modules  comme  ppp.o  et
  slip.o.  De  plus,  il  est necessaire par les souris series pour gpm.
  _T_o_u_t_e_f_o_i_s cette dependance n'est _p_a_s pour le moment detectee  pas  les
  outils et le module serial.o doit etre charge manuellement.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe serial.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1111..33..  CCyyccllaaddeess aassyynncc mmuuxx ssuuppppoorrtt ((ccyyccllaaddeess..oo)

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe cyclades.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1111..44..  SSttaalllliioonn mmuullttiippoorrtt sseerriiaall ssuuppppoorrtt

  Les  cartes  intelligentes  ont egalement besoin que du code leur soit
  "telecharge". Cela est fait par des application  en  mode  utilisateur
  fournies par le paquetage appelle sttload. Pour Compiler ce programme,
  lancez make a l'endroit ou  vous  avez  desarchive  les  sources.   La
  maniere la plus simple d'utilisation est de lancer

               ./stlload -i cdk.sys

  dans  ce  repertoire  et  cela  configurera  la  carte  0  (la carte 0
  correspond a une carte EasyConnection  8/64).   Pour  telecharger  les
  donnees vers une carte ONboard, Brumby ou Stallion faire :

               ./stlload -i 2681.sys

  Lisez      la     documentation     situee     dans     le     fichier
  /usr/src/linux/drivers/char/README.stallion.

  1111..44..11..  SSttaalllliioonn EEaassyyIIOO oorr EECC88//3322 ssuuppppoorrtt ((ssttaalllliioonn..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe stallion.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1111..44..22..  SSttaalllliioonn EECC88//6644,, OONNbbooaarrdd,, BBrruummbbyy ssuuppppoorrtt ((iissttaalllliioonn..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe istallion.o

          Aucun parametre pour le module.
  ______________________________________________________________________

  1111..55..  SSDDLL RRIISSCCoomm//88 ccaarrdd ssuuppppoorrtt ((rriissccoomm88..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe riscom8.o [options]

          Ce gestionnaire peut supporter jusqu'a 4 cartes en meme temps.
          Options : iobase=0xXXX iobase1=0xXXX iobase2=...

  ______________________________________________________________________

  1111..66..  PPaarraalllleell pprriinntteerr ssuuppppoorrtt ((llpp..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe lp.o io=0x378 irq=0

          io = 0
          irq = 0         irq=0 lancera en mode de poll

          (Scrute les ports : 0x278, 0x378, 0x3bc)
          Note : charger lp.o sans parametre scrutera tous les
          ports paralleles
  ______________________________________________________________________

  1111..77..  BBuuss MMoouussee SSuuppppoorrtt

  1111..77..11..  AATTIIXXLL bbuussmmoouussee ssuuppppoorrtt ((aattiixxllmmoouussee..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe atixlmouse.o

          Aucun parametre pour le module.
          Depend de misc.o
  ______________________________________________________________________

  1111..77..22..  LLooggiitteecchh bbuussmmoouussee ssuuppppoorrtt ((bbuussmmoouussee..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe busmouse.o

          Aucun parametre pour le module.
          Depend de misc.o
  ______________________________________________________________________

  1111..77..33..  MMiiccrroossoofftt bbuussmmoouussee ssuuppppoorrtt ((mmssbbuussmmoouussee..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe msbusmouse.o

          Aucun parametre pour le module.
          Depend de misc.o
  ______________________________________________________________________

  1111..77..44..  PPSS//22 mmoouussee ((aakkaa ""aauuxxiilliiaarryy ddeevviiccee"")) ssuuppppoorrtt ((ppssaauuxx..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe psaux.o

          Aucun parametre pour le module.
          Depend de misc.o
  ______________________________________________________________________

  1111..88..  GGeessttiioonn ddeess lleecctteeuurrss ddee bbaannddeess

  Pour la gestion de lecteurs de bandes SCSI, voir  la  section  sur  la
  _G_e_s_t_i_o_n _S_C_S_I. La gestion des lecteurs QIC-02 n'est pas modularisee.

  1111..88..11..  FFttaappee ((QQIICC--8800//TTrraavvaann)) ssuuppppoorrtt ((ffttaappee..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe ftape.o tracing=3

          Le parametre 'tracing' peut avoir les valeurs suivantes :

          valeur :     pour avoir :
            0             les bogues
            1             + erreurs
            2             + avertissements
            3             + information           ** par defaut **
            4             + plus d'information
            5             + flot des programmes
            6             + informations fdc/dma
            7             + flots de donnees
            8             + tout
  ______________________________________________________________________

  1111..99..  WWaattcchhddoogg TTiimmeerr SSuuppppoorrtt

  1111..99..11..  WWDDTT WWaattcchhddoogg ttiimmeerr ((wwddtt..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe wdt.o

          Aucun parametre pour le module.
          Par defaut, io=0x240 irq=14,
          faites toutes les modifications directement dans wdt.c
          Depend de misc.o
  ______________________________________________________________________

  1111..99..22..  SSooffttwwaarree WWaattcchhddoogg ((ssooffttddoogg..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe softdog.o

          Aucun parametre pour le module.
          Depend de misc.o
  ______________________________________________________________________

  1111..99..33..  BBeerrkksshhiirree PPrroodduuccttss PPCC WWaattcchhddoogg ((ppccwwdd..oo).

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe pcwd.o

          Aucun parametre pour le module.
          Depend de misc.o
  ______________________________________________________________________

  1122..  SSoouunndd ssuuppppoorrtt ((ssoouunndd..oo).

  Configurer  la  carte  son  est une tache assez complexe. Il existe un
  certain   nombre   de   fichiers    Readme    dans    le    repertoire
  /usr/src/linux/drivers/sound,     _l_i_s_e_z_-_l_e_s.

  ______________________________________________________________________
  Commande de chargement :
          /sbin/modprobe sound.o [option]

          Option: dma_buffsize=32768
  ______________________________________________________________________

  1133..  OOnn ffeerrmmee !!

  Si  vous avez trouve n'importe quelle erreur, ou bien des informations
  depassees dans ce document,  faites  le  moi  savoir.  Il  est  facile
  d'oublier des choses.

  _M_e_r_c_i _d_'_a_v_a_n_c_e_,

  Lauri Tischler, ltischler@efore.fi

  Linux NET-3-HOWTO, Rseau sous Linux.
  Terry Dawson (auteur principal), VK2KTJ, Alessandro Rubini
  (mainteneur), alessandro.rubini@linux.it (Traduction et
  trahison de Jacques.Chion@wanadoo.fr, un grand merci  Jean-
  Albert Ferrez et Bernard Choppy pour leur aide,ainsi qu'
  Olivier Tharan et Steeve Devergne)
  v1.4, Aot 1998.

  Le systme Linux possde un support rseau inclus dans le noyau et
  crit presque entirement  partir de zro.  Les performances de
  l'implmentation tcp/ip des derniers noyaux en font une alternative
  digne de respect mme vis  vis de ses meilleurs concurrents.  Le but
  de ce document est de dcrire comment installer et configurer le logi
  ciel de rseau sous Linux, ainsi que les outils ncessaires.
  ______________________________________________________________________

  Table des matires

















































  1. Changements depuis la version 1.3 (avril 1998)

  2. Introduction.

     2.1 Retour d'informations

  3. Comment utiliser ce document (NET-3-HOWTO-HOWTO ?).

     3.1 Les conventions utilises dans ce document

  4. Informations gnrales concernant le rseau  sous Linux.

     4.1 Brve histoire du dveloppement du noyau du rseau Linux.
     4.2 O obtenir d'autres informations sur la couche rseau de Linux.
     4.3 O obtenir des informations sur le rseau,  non spcifiques de Linux.

  5. Informations gnrales concernant la configuration rseau

     5.1 De quoi ai-je besoin pour dmarrer ?
        5.1.1 Sources du noyau rcentes
        5.1.2 Outils de rseau rcents
        5.1.3 Applications rseau
        5.1.4 Adresses
     5.2 O mettre les commandes de configuration ?
     5.3 Crer vos interfaces rseau
     5.4 Configurer une interface rseau
     5.5 Configurer votre solveur de noms
        5.5.1 Qu'y a-t-il dans un nom ?
        5.5.2 Les informations ncessaires
        5.5.3 /etc/resolv.conf
        5.5.4 /etc/hosts
        5.5.5 Faire tourner un serveur de noms
     5.6 Configurer votre interface loopback
     5.7 Routage
        5.7.1 Alors, que fait le programme
     5.8 Configurer vos serveurs rseau et les services.
        5.8.1 (TT
           5.8.1.1 Exemple de fichier
        5.8.2 (TT
           5.8.2.1 Exemple de fichier
     5.9 Autres fichiers de configuration ayant un rapport avec le rseau
        5.9.1 (TT
        5.9.2 (TT
     5.10 Scurit rseau et contrle d'accs
        5.10.1 /etc/ftpusers
        5.10.2 /etc/securetty
        5.10.3 Le mcanisme de contrle d'accs des htes
           5.10.3.1 /etc/hosts.allow
           5.10.3.2 /etc/hosts.deny
        5.10.4 /etc/hosts.equiv
        5.10.5 Configurer votre dmon
        5.10.6 Pare-feu (Firewall) sur le rseau
        5.10.7 Autres suggestions

  6. Informations sur IP et Ethernet

     6.1 Ethernet
     6.2 EQL - galiseur de charge  lignes multiples
     6.3 Enregistrement IP (IP Accounting) (pour Linux-2.0)
     6.4 Enregistrement IP (IP Accounting) (pour Linux-2.2)
     6.5 IP Aliasing
     6.6 IP Pare-feu (Firewall) (pour Linux-2.0)
     6.7 Pare-feu IP (pour Linux-2.2)
     6.8 Encapsulation IPIP
        6.8.1 Une configuration de rseau avec tunneling.
        6.8.2 Une configuration d'hte pour l'encapsulation IPIP.
     6.9 IP Masquerade (pour Linux-2.0)
     6.10 IP Transparent Proxy
     6.11 IPv6
     6.12 IP Mobile
     6.13 Multicast
     6.14 NAT - Network Address Translation (Traduction d'adresse rseau)
     6.15 Mise en forme du trafic - Changer la bande passante alloue
     6.16 Routage avec Linux-2.2

  7. Utilisation du matriel courant pour PC

     7.1 RNIS
     7.2 PLIP pour Linux-2.0
     7.3 PLIP pour Linux2.2
     7.4 PPP
        7.4.1 Maintenance d'une connexion permanente avec le rseau  l'aide de
     7.5 Client SLIP
        7.5.1 dip
        7.5.2 slattach
        7.5.3 Quand utiliser quoi ?
        7.5.4 Serveur SLIP statique avec une ligne tlphonique  et DIP
        7.5.5 Serveur SLIP dynamique avec une ligne tlphonique et DIP
        7.5.6 Utiliser DIP
        7.5.7 Connexion permanente SLIP utilisant une ligne et slattach
     7.6 Serveur SLIP
        7.6.1 Serveur SLIP utilisant
           7.6.1.1 O obtenir
           7.6.1.2 Configurer
           7.6.1.3 Configurer
           7.6.1.4 Configurer le fichier
           7.6.1.5 Configurer le fichier
           7.6.1.6 Configurer le fichier
        7.6.2 Serveur Slip utilisant
           7.6.2.1 Configurer
        7.6.3 Serveur SLIP utilisant l'ensemble

  8. Autres technologies rseau

     8.1 ARCNet
     8.2 Appletalk (
        8.2.1 Configurer le support Appletalk.
        8.2.2 Exporter un systme de fichiers Linux avec Appletalk.
        8.2.3 Tester Appletalk.
        8.2.4 Autres informations
     8.3 ATM
     8.4 AX25 (
     8.5 DECNet
     8.6 FDDI (Fiber Distributed Data Interface)
     8.7 Relais de trames (Frame Relay)
     8.8 IPX (
     8.9 NetRom (
     8.10 Protocole Rose (
     8.11 Support SAMBA - `NetBEUI', `NetBios'.
     8.12 Support STRIP (Starmode Radio IP)
     8.13 Token Ring
     8.14 X.25
     8.15 Carte WaveLan

  9. Cbles et cblages

     9.1 Cble srie NULL Modem
     9.2 Cble port parallle (cble PLIP)
     9.3 Cblage Ethernet 10base2 (coaxial fin)
     9.4 Cblage Ethernet  paires torsades

  10. Glossaire des termes utiliss dans ce document.
  11. Linux pour un fournisseur d'accs  l'Internet ?

  12. Remerciements

  13. Copyright.

  14. Note du traducteur



  ______________________________________________________________________

  11..  CChhaannggeemmeennttss ddeeppuuiiss llaa vveerrssiioonn 11..33 ((aavvrriill 11999988))


  Additions :
      Mise en forme du trafic.
      Plip pour les nouveaux noyaux.
  Corrections/Mises  jour :
      Adresse du mainteneur pour netkit.
      Rvision de la description des noms de domaine.
      Rorganisation gnrale des paragraphes.
      Les diffrences entre 2.0 et 2.2 sont marques, bien que des infos sur 2.2
      soient manquantes.
      Correction de nombreuses rfrences pointant sur des documents externes.
   faire :
      Dcrire le nouvel algorithme de routage
      Ajouter les options de compilation du noyau sur IPv6
      Dcrire les entres de /proc/sys/net/*
      Pilote de priphrique WanRouter
      Dcrire les nouvelles commandes de pare-feu pour la 2.2



  22..  IInnttrroodduuccttiioonn..

  Le premier document NET-FAQ fut crit par Matt Welsh et Terry Dawson
  en vue de rpondre aux questions qui taient souvent poses au sujet
  des rseaux sous Linux, ceci en un temps o le LPD (Linux
  Documentation Project) n'existait pas encore.  Il s'agissait alors des
  toutes premires versions de dveloppement du noyau rseau sous Linux.
  Le document NET-2-HOWTO, qui succda au NET-FAQ, fut l'un des premiers
  documents du LDP HOWTO et il traitait de ce qui fut appel version 2,
  et plus tard version 3, du logiciel rseau du noyau Linux.  Ce
  document prend la suite  son tour et ne traite que de la version 3 du
  noyau rseau Linux.

  Les versions prcdentes de ce document taient devenues plutt
  normes en raison du grand nombre de sujets abords. Pour rsoudre ce
  problme, un certain nombre de documents HOWTO ont t crs et
  traitent de sujets spcifiques.  Ce document fait rfrence  ceux qui
  sont pertinents et aborde les sujets qui ne sont pas encore couverts
  par d'autres documents.

  En avril 1998, Terry abandonna le maintien du NET-3 en raison de sa
  grande charge de travail. Alessandro Rubini est le nouveau mainteneur
  et s'efforcera de garder le document aussi bien qu'avant, bien qu'il
  soit novice dans ce domaine.


  22..11..  RReettoouurr dd''iinnffoorrmmaattiioonnss

  J' apprcie toujours les retours d'informations et tout
  particulirement les contributions utiles. S'il vous plait adressez
  tout retour d'informations ou contributions par courrier lectronique
   rubini@linux.it <mailto:rubini@linux.it>.
  33..  CCoommmmeenntt uuttiilliisseerr ccee ddooccuummeenntt ((NNEETT--33--HHOOWWTTOO--HHOOWWTTOO ??))..

  Ce document est organis de haut en bas. Les premires sections
  traitent d'informations sur le matriel et peuvent tre sautes si
  cela ne vous intresse pas ; ensuite il y a une discussion gnrale
  sur ce qui concerne les rseaux, et vous devez tre certains de
  l'avoir assimile avant de poursuivre vers les paragraphes plus
  spcifiques. Le restant, qui traite d'informations ``plus
  technologiques'', est regroup en trois parties principales :
  informations sur Ethernet et IP, les technologies qui concernent le
  matriel PC le plus courant, et les technologies moins rpandues.

  La dmarche que je suggre pour parcourir ce document est donc la
  suivante :



     LLiirree lleess sseeccttiioonnss ggnnrraalleess
        Ces paragraphes s'appliquent  chaque technologie, ou presque,
        dcrite plus tard, il est donc important que vous les ayez
        compris.  D'autre part, j'espre que beaucoup de lecteurs
        connaissent dj le sujet.

     RRffllcchhiisssseezz  vvoottrree rrsseeaauu
        Vous devez savoir comment votre rseau est, ou sera, conu et
        quels matriels et types de technologies vous utiliserez.

     LLiisseezz llaa sseeccttiioonn ````EEtthheerrnneett eett IIPP'''' ssii vvoouuss tteess ccoonnnneeccttss eenn
        ddiirreecctt
        sur un rseau local ou  l'Internet" Cette section traite de la
        configuration de base d'Ethernet et des diffrentes possibilits
        offertes par Linux, et qui concernent le rseau, telles que le
        pare-feu, le routage avanc, etc..

     LLiisseezz aapprrss ssii vvoouuss tteess iinnttrreessssss ppaarr lleess rrsseeaauuxx llooccaauuxx  bbaass
        ccoott oouu lleess ccoonnnneexxiioonnss ppaarr ttllpphhoonnee
        Cette section parle de PLIP, PPP, SLIP, et RNIS, les
        technologies utilises habituellement sur les stations
        personnelles.

     LLiisseezz llaa sseeccttiioonn ccoonncceerrnnaanntt llaa tteecchhnnoollooggiiee qquuii ccoorrrreessppoonndd
        plus particulirement  vos besoins."  Si vos besoins ne
        concernent pas IP et/ou un matriel courant, vous trouverez  la
        fin des dtails sur les protocoles non-IP et les matriels de
        communication particuliers.

     CCoonnffiigguurreezz vvoottrree rrsseeaauu
        Si vous allez rellement essayer de configurer votre rseau,
        prenez soigneusement note de tout problme ventuel.

     CChheerrcchheezz ddee ll''aaiiddee ssii nncceessssaaiirree
        Si vous rencontrez des problmes qui ne sont pas traits dans ce
        document, reportez-vous au paragraphe donnant les endroits o
        l'on peut en obtenir ou bien envoyer des reports de bogues.

     AAmmuusseezz--vvoouuss!!
        Le rseau est amusant, profitez-en.



  33..11..  LLeess ccoonnvveennttiioonnss uuttiilliisseess ddaannss ccee ddooccuummeenntt

  Il n'y a pas de conventions spciales utilises ici, mais vous devez
  faire attention  la faon de montrer les commandes. En regardant la
  documentation habituelle d'Unix, toute commande qui doit tre tape
  est prcde d'une invite du shell.  Ce document utilise "user%" comme
  invite pour les commandes ne ncessitant pas de privilges de
  superutilisateur, et "root#" pour les commandes que l'on doit excuter
  comme utilisateur root. J'ai prfr utiliser "root#"  la place du
  classique "#" pour viter toute confusion avec les extraits de scripts
  shell, ou le signe dise est utilis pour dfinir les lignes de
  commentaires.


  Lorsque les ``Options de Compilation du noyau'' sont mentionnes,
  elles le sont avec le format utilis par _m_e_n_u_c_o_n_f_i_g. Elles devraient
  donc tre comprhensibles mme si vous (comme moi) n'tes pas
  familiers avec _m_e_n_u_c_o_n_f_i_g. Si vous avez un doute sur la dclaration
  des options, faire tourner le programme une fois ne peut qu'apporter
  de l'aide.


  Notez que tous les liens avec les autres documents HOWTO sont locaux
  pour vous aider  naviguer avec vos documents LDP copis localement,
  au cas o vous utiliseriez la version html de ce document. Si vous ne
  possdez pas l'ensemble des documents, chaque HOWTO peut tre rcupr
  sur sunsite.unc.edu (rpertoire /pub/Linux/HOWTO) ou l'un de ses
  nombreux miroirs.


  44..  ssoouuss LLiinnuuxx..  IInnffoorrmmaattiioonnss ggnnrraalleess ccoonncceerrnnaanntt llee rrsseeaauu



  44..11..  BBrrvvee hhiissttooiirree dduu ddvveellooppppeemmeenntt dduu nnooyyaauu dduu rrsseeaauu LLiinnuuxx..

  Dvelopper une nouvelle implmentation noyau de l'ensemble du
  protocole tcp/ip, de qualit, et qui marcherait aussi bien que les
  produits existants, n'tait pas une tche facile.  La dcision de ne
  pas partir d'une implmentation existante fut prise  un moment o il
  y avait un doute sur d'ventuelles restrictions sur les droits de
  copie, en raison de dcisions de justice U.S., et  un moment o il y
  avait beaucoup d'enthousiasme pour faire diffremment et peut-tre
  mme mieux que ce qui avait t fait auparavant.

  Le premier volontaire pour diriger le dveloppement fut Ross Biro
  <biro@yggdrasil.com>. Ross produisit une implmentation de routines
  simple, incomplte, mais parfaitement utilisable,  laquelle fut
  ajout un pilote Ethernet pour la carte interface rseau WD-8003.  Ce
  fut suffisant pour que beaucoup de personnes essayent le logiciel et
  mme certains s'arrangrent pour se connecter, avec cette
  configuration, sur le rseau Internet en direct.  La pression de la
  communaut Linux qui s'occupait du dveloppement du support rseau
  augmenta, et pour finir, la convergence de cette pression injuste et
  de ses propres obligations l'emportrent sur les avantages que Ross en
  tirait; il arrta donc sa tche de coordinateur de dveloppement.  Les
  efforts de Ross pour faire dmarrer le projet, son acceptation de la
  responsabilit de faire vraiment quelque chose d'utile dans de telles
  circonstances mouvementes, furent le point de dpart de tout le
  travail ultrieur et donc un lment essentiel du succs du produit
  actuel.

  Orest Zborowski <obz@Kodak.COM> produisit la premire interface socket
  BSD pour le noyau Linux.  Ce fut un grand pas en avant et permit 
  beaucoup d'applications rseau existantes d'tre portes sous Linux
  sans grandes modifications.

   peu prs  cette poque Laurence Culhane <loz@holmes.demon.co.uk>
  dveloppa les premiers pilotes Linux pour supporter le protocole SLIP.
  Ceci permit  beaucoup de gens qui n'avaient pas accs  un rseau
  Ethernet d'essayer le logiciel rseau. Puis certains utilisrent ce
  pilote pour se connecter sur l'Internet.  Cela donna  encore plus de
  personnes un aperu de ce qui serait possible si Linux avait un
  support complet pour le rseau et augmenta le nombre d'utilisateurs
  utilisant et exprimentant ce logiciel rseau.

  L'une des personnes qui a aussi activement travaill sur la
  construction du support rseau fut Fred van Kempen
  <waltje@uwalt.nl.mugnet.org>.  Aprs la priode d'incertitude qui
  suivit le retrait de Ross, Fred offrit son temps et accepta le rle de
  conducteur du dveloppement sans rencontrer d'opposition.  Fred avait
  quelques projets ambitieux quant  la direction vers laquelle il
  voulait porter le logiciel rseau Linux, et il se mit  progresser
  dans ces directions.  Fred produisit une srie de code rseau appele
  le code noyau `NET-2' (le code `NET' tant celui de Ross), qui permit
   beaucoup de personnes de l'utiliser avec intrt.  Ensuite Fred mit
  nombre d'innovations dans la poursuite du dveloppement, telle que
  l'interface de priphrique dynamique, le support du protocole radio-
  amateur AX-25 et une implmentation rseau conue de manire plus
  modulaire.  Le code NET-2 de Fred fut utilis par un grand nombre
  d'enthousiastes, ce nombre augmentant au fur et  mesure de
  l'utilisation du logiciel dans le monde. Le logiciel rseau  ce
  moment tait constitu encore d'un grand nombre de patches qui
  devaient tre appliqus au code noyau et n'tait pas inclus dans la
  distribution normale.  Le document NET-FAQ et son successeur
  NET-2-HOWTO dcrivait la procdure assez complexe pour que tout cela
  fonctionne.  Fred se concentra sur le dveloppement d'innovations et
  cela prenait du temps. La communaut des utilisateurs s'impatientait,
  car elle voulait avoir quelque chose fonctionnant correctement et qui
  satisferait 80% des utilisateurs puis, comme avec Ross, la pression
  sur le responsable du dveloppement augmentait.

  Alan Cox <iialan@www.uk.linux.org> proposa une solution pour amliorer
  la situation.  Il proposa de prendre le code NET-2 de Fred, de le
  dboguer, de le rendre fiable et stable si bien qu'il satisferait
  l'utilisateur de base impatient, relchant ainsi la pression sur Fred
  qui pourrait continuer son oeuvre.  Alan se mit au travail avec un
  certain succs et sa premire version du code rseau Linux fut appele
  `Net-2D(ebugged;)'.  Le code fonctionnait de manire fiable avec
  plusieurs configurations typiques et l'utilisateur de base tait
  content. Alan avait vraiment des ides et une comptence  lui pour
  contribuer au projet et de nombreuses discussions concernant la
  direction que devait prendre le code NET-2 furent suivies d'effet.  Il
  se dveloppa alors deux coles distinctes dans la communaut Linux,
  l'une ayant pour principe `que a marche d'abord, puis on amliorera
  ensuite' et l'autre `amliorer d'abord'. Linus arbitra finalement et
  offrit son aide aux efforts de dveloppement d'Alan et inclut son code
  dans la distribution standard du noyau.  Cela plaait Fred dans une
  situation dlicate. Tout dveloppement de longue haleine souffrirait
  de l'absence d'utilisation et d'essais par l'utilisateur de base et
  cela signifierait que les progrs seraient longs et difficiles.  Fred
  continua  travailler encore quelque temps, puis se retira finalement,
  et Alan devint le nouveau pilote de dveloppement du code rseau dans
  le noyau Linux.

  Donald Becker <becker@cesdis.gsfc.nasa.gov> rvla rapidement ses
  talents dans les aspects de bas niveau du rseau et produisit une
  norme quantit de pilotes Ethernet, presque tous ceux inclus dans les
  noyaux actuels tant de lui. Il y a d'autres personnes qui ont apport
  une contribution significative, mais le travail de Donald est
  prolifique et mrite donc une mention spciale.

  Alan continua  affiner le code NET-2-D(ebugged) pendant un certain
  temps, tout en progressant sur certains des sujets qui restaient en
  suspens dans la liste des `TODO' (NdT : ` Faire').  Pendant que les
  sources du noyau Linux 1.3.* faisaient leurs premiers pas, le code
  rseau migra vers la distribution NET-3, sur laquelle les versions
  actuelles sont fondes.  Alan travailla sur de multiples aspects du
  code rseau et, avec l'assistance d'un grand nombre de personnes
  talentueuses venant de la communaut Linux, dveloppa le code dans
  toutes sortes de directions. Alan produisit des pilotes de
  priphriques rseau, le premier standard AX.25 et les implmentations
  IPX.  Alan continua  rafistoler le code, le restructurant petit 
  petit et l'amenant  son niveau d'aujourd'hui.

  Le support PPP fut ajout par Michael Callahan
  <callahan@maths.ox.ac.uk> et Al Longyear <longyear@netcom.com>, ce qui
  fut important pour accrotre le nombre de personnes utilisant Linux
  dsireuses d'aller sur le rseau.

  Jonathon Naylor <jsn@cs.nott.ac.uk> apporta sa contribution en
  amliorant le code AX.25 d'Alan et en y ajoutant les protocoles NetRom
  et Rose. Le support AX.25/NetRom lui-mme est tout  fait
  significatif, car aucun autre systme d'exploitation que Linux ne peut
  se vanter d'avoir un support natif pour ce protocole.

  Il y a eu bien sr des centaines d'autres personnes qui ont apport
  une contribution significative  la couche rseau de Linux.  Vous en
  retrouverez certains plus tard dans les paragraphes traitant de
  technologies spcifiques, d'autres ont collabor aux modules, pilotes,
  corrections de bogues, suggestions, rapports d'essais et support
  moral. Dans tous les cas chacun peut se prvaloir d'avoir jou un rle
  et offert ce qu'il pouvait. Le code rseau Linux est un excellent
  exemple de ce que l'on peut obtenir avec un style Linux de
  dveloppement anarchique, si cela ne vous a pas encore tonn, et on
  le voit encore, le dveloppement ne s'est pas arrt.


  44..22..  OO oobbtteenniirr dd''aauuttrreess iinnffoorrmmaattiioonnss ssuurr llaa ccoouucchhee rrsseeaauu ddee LLiinnuuxx..

  Il y a un grand nombre d'endroits o l'on peut trouver de bonnes
  informations sur le rseau Linux.

  Alan Cox, l'actuel mainteneur du code rseau Linux entretient une page
  web qui contient les points principaux du rseau actuel et les
  nouveaux dveloppements  l'adresse : www.uk.linux.org
  <http://www.uk.linux.org/NetNews.html>.

  Une autre bonne source est un livre crit par Olaf Kirch ayant pour
  titre Network Administrators Guide. C'est une oeuvre du Linux
  Documentation Project <http://sunsite.unc.edu/LDP/> et vous pouvez le
  lire de manire interactive sur Network Administrators Guide HTML
  version <http://sunsite.unc.edu/LDP/LDP/nag/nag.html> ou bien vous
  pouvez l'obtenir sous diffrents formats via ftp sur : sunsite.unc.edu
  LDP ftp archive <ftp://sunsite.unc.edu/pub/Linux/docs/LDP/network-
  guide/>. Le livre d'Olaf est trs comprhensible et fournit un point
  de vue de haut niveau sur la configuration rseau sous Linux.

  (NdT : ce livre a t traduit en franais de manire remarquable par
  le regrett Ren Cougnenc)

  Il existe un groupe de discussion ddi au rseau et, en ce qui le
  concerne dans la hirarchie Linux, c'est : comp.os.linux.networking
  <news:comp.os.linux.networking>

  Il existe une liste de diffusion  laquelle vous pouvez vous inscrire,
  et o vous pourrez poser des questions ayant trait au rseau Linux.
  Pour souscrire vous devez envoyer un message par courrier lectronique
  :





  To: majordomo@vger.rutgers.edu
  Subject: (rien du tout)
  Message:

  subscribe linux-net




  Sur les diffrents rseaux IRC, il y a souvent des canaux #linux sur
  lesquels des personnes sont en mesure de rpondre  vos questions au
  sujet du rseau Linux.

  Souvenez-vous lorsque vous faites part d'un problme d'y inclure le
  plus possible de dtails ncessaires. Plus spcialement indiquez les
  versions des logiciels que vous utilisez, en particulier la version du
  noyau, les versions des outils tels que _p_p_p_d ou _d_i_p, et la nature
  exacte des problmes que vous rencontrez. Cela veut dire prendre note
  de la syntaxe exacte des messages d'erreurs que vous recevez, et les
  commandes que vous avez excutes.

  44..33..  nnoonn ssppcciiffiiqquueess ddee LLiinnuuxx..  OO oobbtteenniirr ddeess iinnffoorrmmaattiioonnss ssuurr llee
  rrsseeaauu,,

  si vous dsirez des informations gnrales de base sur tcp/ip, alors
  je vous recommande de regarder les documents suivants :



     iinnttrroodduuccttiioonn  TTCCPP//IIPP
        ce document se trouve  la fois sur en version texte
        <ftp://athos.rutgers.edu/runet/tcp-ip-intro.doc> et en version
        postscript <ftp://athos.rutgers.edu/runet/tcp-ip-intro.ps>.


     aaddmmiinniissttrraattiioonn TTCCPP//IIPP
        ce document se trouve  la fois sur en version texte
        <ftp://athos.rutgers.edu/runet/tcp-ip-admin.doc> et en version
        postscript <ftp://athos.rutgers.edu/runet/tcp-ip-admin.ps>.


  Si vous recherchez des informations plus dtailles je vous recommande
  chaudement :


       _I_n_t_e_r_n_e_t_w_o_r_k_i_n_g _w_i_t_h _T_C_P_/_I_P_, _V_o_l_u_m_e _1 _: _p_r_i_n_c_i_p_e_s_, _p_r_o_t_o_
       _c_o_l_e_s _e_t _a_r_c_h_i_t_e_c_t_u_r_e_s, par Douglas E. Comer,ISBN
       0-13-227836-7, Prentice Hall publications, 3me dition,
       1995.



  Si vous voulez apprendre comment crire des applications rseau dans
  un environnement compatible Unix, je vous recommande galement chaude
  ment :


        _U_n_i_x _N_e_t_w_o_r_k _P_r_o_g_r_a_m_m_i_n_g par W. Richard Stevens ISBN
       0-13-949876-1, Prentice Hall publications, 1990.


  Une deuxime dition de ce livre va apparaitre sur les rayons : le
  nouveau livre comporte 3 volumes : voyez le site de Prentice Hall
  <http://www.phptr.com/> pour en savoir plus.


  Vous pouvez essayer aussi le groupe de discussions :
  comp.protocols.tcp-ip <news:comp.protocols.tcp-ip>.

  Une importante source d'informations techniques concernant l'Internet
  et la suite des protocoles TCP/IP sont les RFC. RFC est l'acronyme de
  `Request For Comment' et c'est le moyen habituel de soumettre et de
  s'informer des normes de protocoles Internet.  Il y a beauccoup
  d'endroits o sont stockes ces RFC. Beaucoup de ceux-ci sont des
  sites ftp, d'autres fournissent des accs WWW avec un moteur de
  recherche qui cherche les bases de donnes RFC avec des mots-cls
  particuliers.

  Une source possible de RFC est : la base de donnes RFC de Nexor
  <http://pubweb.nexor.co.uk/public/rfc/index/rfc.html>.


  55..  IInnffoorrmmaattiioonnss ggnnrraalleess ccoonncceerrnnaanntt llaa ccoonnffiigguurraattiioonn rrsseeaauu

  Vous devez connatre et bien comprendre les paragraphes suivants avant
  d'essayer de configurer votre rseau.  Ce sont des principes de base
  qui s'appliquent, indpendamment de la nature du rseau que vous
  voulez mettre en place.


  55..11..  DDee qquuooii aaii--jjee bbeessooiinn ppoouurr ddmmaarrrreerr ??

  Avant de commencer  construire ou configurer votre rseau, vous aurez
  besoin de certaines choses. Les plus importantes sont :


  55..11..11..  SSoouurrcceess dduu nnooyyaauu rrcceenntteess

  Si le noyau que vous utilisez actuellement ne supporte pas les types
  de rseau ou les cartes que vous voulez utiliser, vous aurez besoin
  des sources du noyau pour pouvoir le recompiler avec les options
  adquates.


  Vous pouvez toujours obtenir les sources du dernier noyau sur :
  ftp.funet.fi <ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/v2.0>.
  Souvenez-vous que ftp.kernel.org est particulirement surcharg : il
  vaut mieux obtenir les sources en cours en tlchargeant les patches
  au lieu des fichiers archives tar en entier ; de plus, essayez d'abord
  les miroirs du site principal, comme ftp.funet.fi
  <ftp://ftp.funet.fi//mirrors/ftp.kernel.org/pub/linux/kernel> (NdT :
  et bien sr ftp.lip6.fr
  <ftp://ftp.lip6.fr/pub/linux/kernel/sources/v2.0>) ; souvenez-vous
  aussi que tous les sites Linux possdent normalement des sources du
  noyau  jour.

  Normalement les sources du noyau doivent tre dsarchives dans le
  rpertoire /usr/src/linux.  Pour savoir comment appliquer les patches
  et compiler le noyau, lisez le Kernel-HOWTO <Kernel-HOWTO.html>.  Pour
  savoir comment configurer les modules du noyau, lisez le ``Modules-
  mini-HOWTO''. Enfin, le fichier README qui se trouve dans les sources
  du noyau ainsi que le rpertoire Documentation donnent beaucoup de
  renseignements au lecteur courageux.

  Sauf indication contraire, je vous recommande de vous en tenir  une
  version stable du noyau (celle avec un chiffre pair en seconde place
  dans le numro de version). Les versions de dveloppement (avec un
  chiffre impair en seconde place dans le numro de version) peuvent
  avoir une structure ou autre chose qui peut poser problme avec les
  logiciels de votre systme. Si vous n'tes pas certain de rsoudre ce
  type de problmes, avec en plus ceux qui existeraient sur d'autres
  logiciels, ne les utilisez pas.
  D'autre part, certaines caractristiques dcrites dans ce document ont
  t introduites lors du dveloppement des noyaux 2.1.x, vous devez
  donc choisir : soit vous restez avec la version 2.0 et attendez la
  version 2.2, avec une distribution mise  jour contenant tous les
  nouveaux outils, soit vous utilisez la version 2.1 et cherchez les
  divers programmes qui supportent les nouvelles fonctionnalits.
  Lorsque j'cris ce paragraphe, en aot 1998, la version de
  dveloppement en cours est la 2.1.115 et la 2.2 va apparatre
  prochainement.


  55..11..22..  OOuuttiillss ddee rrsseeaauu rrcceennttss

  Ces outils sont les programmes utiliss pour configurer les fichiers
  de priphriques rseau. Ils vous permettent d'assigner des adresses
  aux priphriques et de configurer des routes par exemple.

  La plupart des distributions Linux modernes sont fournies avec les
  outils de rseau, aussi si vous avez fait votre installation  partie
  d'une distribution et que vous n'avez pas encore install les outils
  de rseau, vous devez le faire.

  Si vous n'avez pas fait l'installation  partir d'une distribution,
  vous aurez alors besoin des sources pour les compiler vous-mme.  Ce
  n'est pas difficile.

  Les outils de rseau sont maintenus par Bernd Eckenfels et se trouvent
  sur : ftp.inka.de
  <ftp://ftp.inka.de/pub/comp/Linux/networking/NetTools/> et sont
  recopis sur : ftp.linux.uk.org
  <ftp://ftp.uk.linux.org/pub/linux/Networking/base/>.

  Soyez srs de choisir la version la mieux approprie  votre noyau et
  suivez les instructions incluses dans le paquetage.

  Pour installer et configurer la version actuelle (au moment o
  j'cris), vous devrez faire :


       user% tar xvfz net-tools-1.33.tar.gz
       user% cd net-tools-1.33
       user% make config
       user% make
       root# make install





  De plus, si vous voulez configurer une protection pare-feu ou utiliser
  le masquage IP vous aurez besoin de la commande _i_p_f_w_a_d_m. La dernire
  version peut-tre obtenue sur : ftp.xos.nl
  <ftp:/ftp.xos.nl/pub/linux/ipfwadm>.  Encore une fois, de nombreuses
  versions existent. Soyez srs de prendre celle qui s'adapte le mieux 
  votre noyau. Notez que les fonctionnalits pour pare-feu de Linux ont
  chang pendant le dveloppement de la version 2.1. Ceci ne s'applique
  donc qu'aux noyaux version 2.0.

  Pour installer et configurer la version qui a cours en ce moment, vous
  devrez faire :






  user% tar xvfz ipfwadm-2.3.0.tar.gz
  user% cd ipfwadm-2.3.0
  user% make
  root# make install




  Notez que si vous avez la version 2.2 (ou l'ancienne 2.1) du noyau,
  _i_p_f_w_a_d_m n'est pas le bon outil pour configurer le pare-feu. Cette
  version de NET-3-HOWTO n'est pas en accord avec les nouveaux rglages
  du pare-feu.


  55..11..33..  AApppplliiccaattiioonnss rrsseeaauu

  Les programmes d'application rseau sont des programmes tels que
  _t_e_l_n_e_t et _f_t_p et leurs serveurs respectifs. David Holland s'occupe
  maintenant d'une distribution trs rpandue, qui est maintenant
  maintenue par netbug@ftp.uk.linux.org.  Vous pouvez obtenir cette
  distribution sur : ftp.uk.linux.org
  <ftp://ftp.uk.linux.org/pub/linux/Networking/base>.

  En mars 1997 le paquetage a t scind en plusieurs paquetages plus
  petits, mais en mai 1997 la plupart des programmes de base ont t
  fusionns en un seul paquetage nomm netkit-base-0.10. Vous pourriez
  avoir besoin de rcuprer le paquetage de base et/ou les paquetages
  supplmentaires.

  Pour installer et configurer la version qui existe  l'heure actuelle
  vous devrez faire :




       user% tar xvfz netkit-base-0.10.tar.gz
       user% cd netkit-base-0.10
       user% more README
       user% vi MCONFIG
       user% make
       root# make install






  55..11..44..  AAddrreesssseess

  Les adresses de protocole Internet (IP) sont composes de quatre
  octets. La convention d'criture est appele `notation dcimale
  pointe'. Sous cette forme chaque octet est converti en un nombre
  dcimal (0-255), en omettant les zros de tte ( moins que ce nombre
  ne soit lui-mme un zro) et chaque octet est spar par le caractre
  `.'.  Par convention, chaque interface d'un hte ou routeur possde
  une adresse IP. Il est permis, dans certaines circonstances, que la
  mme adresse IP soit utilise sur diffrentes interfaces d'une mme
  machine, mais, en gnral, chaque interface possde sa propre adresse.

  Les rseaux IP (Protocole Internet) sont des squences contigus
  d'adresses IP. Toutes les adresses d'un mme rseau ont des chiffres
  en commun.  La partie d'adresse commune  toutes les adresses d'un
  rseau s'appelle la `partie rseau' de l'adresse. Les chiffres
  restants s'appellent `partie hte'. Le nombre de bits qui sont
  partags par toutes les adresses d'un mme rseau est appel masque de
  rseau (netmask) et c'est le rle du masque de rseau de dterminer
  quelles adresses appartiennent  `son' rseau et celles qui ne sont
  pas concernes.  Par exemple :



       ----------------------------------------     ----------------
       Adresse hte (host address)                  192.168.110.23
       Masque de rseau (network mask)              255.255.255.0
       Partie rseau (network portion)              192.168.110.
       Partie hte (host portion)                              .23
       ----------------------------------------     ----------------
       Adresse rseau (network address)             192.168.110.0
       Adresse de diffusion (broadcast address)     192.168.110.255
       ----------------------------------------     ----------------





  Toute adresse qui est `ANDE bit  bit' avec son masque de rseau
  rvlera l'adresse du rseau auquel elle appartient.  L'adresse du
  rseau est par consquent l'adresse de plus petit nombre dans
  l'ensemble des adresses et a toujours la partie hte code avec des
  zros.

  L'adresse de diffusion est une adresse spciale que chaque hte du
  rseau coute en mme temps que son adresse personnelle.  Cette
  adresse est celle  laquelle les datagrammes sont envoys si tous les
  htes du rseau sont en mesure de les recevoir.  Certains types de
  donnes telles que les informations de routage et les messages
  d'alerte sont transmis vers l'adresse de diffusion de telle sorte que
  tous les htes du rseau peuvent les recevoir en mme temps.  Il y a
  deux standards utiliss de manire courante pour dfinir ce que doit
  tre l'adresse de diffusion. Le plus largement utilis est de prendre
  l'adresse la plus haute possible du rseau comme adresse de diffusion.
  Dans l'exemple ci-dessus ce serait 192.168.110.255. Pour d'autres
  raisons, certains sites ont adopt la convention d'utiliser l'adresse
  de rseau comme adresse de diffusion. En pratique cela n'a pas
  beaucoup d'importance, mais vous devez tre srs que tous les htes du
  rseau sont configurs avec la mme adresse de diffusion.

  Pour des raisons d'administration, il y a quelque temps, lors du
  dveloppement du protocole IP, des ensembles d'adresses ont t
  organiss en rseaux et ces rseaux ont t regroups en ce que l'on a
  appell classes. Ces classes donnent un certain nombre de rseaux de
  tailles standards auxquels on peut assigner des adresses. Ces classes
  sont :



       ----------------------------------------------------------
       |Classe de |Masque de     | Adresses de rseau           |
       | rseau   |  rseau      |                              |
       ----------------------------------------------------------
       |    A    | 255.0.0.0     | 0.0.0.0    - 127.255.255.255 |
       |    B    | 255.255.0.0   | 128.0.0.0  - 191.255.255.255 |
       |    C    | 255.255.255.0 | 192.0.0.0  - 223.255.255.255 |
       |Multicast| 240.0.0.0     | 224.0.0.0  - 239.255.255.255 |
       ----------------------------------------------------------





  Le type d'adresse que vous devez utiliser dpend de ce que vous voulez
  faire exactement. Vous pouvez utiliser une combinaison des actions
  suivantes pour obtenir l'ensemble des adresses dont vous aurez besoin
  :



     IInnssttaalllleerr uunnee mmaacchhiinnee LLiinnuuxx ssuurr uunn rrsseeaauu IIPP eexxiissttaanntt
        Vous devez alors contacter un des administrateurs du rseau et
        lui demander les informations suivantes :

       Adresse hte;

       Adresse rseau;

       Adresse de diffusion;

       Masque de rseau;

       Adresse de routage;

       Adresse du serveur de noms de domaine (DNS).

        Vous configurerez alors votre rseau Linux  l'aide de ces
        donnes.  Vous ne pouvez pas les inventer vous-mme et esprer
        que votre configuration fonctionne.

     CCoonnssttrruuiirree uunn rrsseeaauu ttoouutt nneeuuff nnoonn ccoonnnneecctt  ll''IInntteerrnneett
        Si vous construisez un rseau priv et que vous n'ayez pas
        l'intention de vous connecter  l'Internet, vous pouvez alors
        choisir n'importe quelle adresse.  Cependant, pour des raisons
        de scurit et de fiabilit, il y a quelques adresses de rseau
        IP rserves  cet usage. Elles sont spcifies dans la RFC 1597
        et sont les suivantes :


        -----------------------------------------------------------
        |         ALLOCATIONS POUR RSEAUX PRIVS                 |
        -----------------------------------------------------------
        | Classe  | Masque de     | Adresses de rseau            |
        | rseau  |  rseau       |                               |
        -----------------------------------------------------------
        |    A    | 255.0.0.0     | 10.0.0.0    - 10.255.255.255  |
        |    B    | 255.255.0.0   | 172.16.0.0  - 172.31.255.255  |
        |    C    | 255.255.255.0 | 192.168.0.0 - 192.168.255.255 |
        -----------------------------------------------------------



     Vous devez d'abord dcider de la dimension de votre rseau et
     choisir ensuite les adresses dont vous avez besoin.



  55..22..  OO mmeettttrree lleess ccoommmmaannddeess ddee ccoonnffiigguurraattiioonn ??

  Il y a plusieurs possibilits de procdures de dmarrage d'un systme
  Linux. Aprs le dmarrage du noyau, celui-ci excute toujours un
  programme appel `_i_n_i_t'. Ce programme lit le fichier de configuration
  appel /etc/inittab et commence le processus de dmarrage. Il y a
  quelques variantes de _i_n_i_t, bien que maintenant tout le monde se
  dirige vers la variante System V (cinq), dveloppe par Miguel van
  Smoorenburg.

  Bien que que le programme _i_n_i_t soit toujours le mme, les rglages du
  processus de dmarrage se font diffremment suivant le type de
  distribution.  Habituellement le fichier /etc/inittab contient une
  entre telle que :
       si::sysinit:/etc/init.d/boot




  Cette ligne spcifie le nom du fichier script qui prend en charge
  rellement la squence de dmarrage. Ce fichier est en quelque sorte
  quivalent au fichier MS-DOS AUTOEXEC.BAT.

  Il y a aussi d'autres scripts appels par le script de dmarrage, et
  souvent le rseau est configur dans l'un de ceux-ci.

  Le tableau suivant peut tre utilis comme guide suivant le systme
  que vous avez :



       -------------------------------------------------------------------------------
       Distrib. |Interface Config/Routage           | Initialisation serveur
       -------------------------------------------------------------------------------
       Debian   | /etc/init.d/network               | /etc/rc2.d/*
       -------------------------------------------------------------------------------
       Slackware| /etc/rc.d/rc.inet1                | /etc/rc.d/rc.inet2
       -------------------------------------------------------------------------------
       RedHat   | /etc/rc.d/init.d/network          | /etc/rc.d/rc3.d/*
       -------------------------------------------------------------------------------





  Notez que les distributions Debian et RedHat utilisent tout un
  rpertoire pour les scripts qui mettent en route les services du
  systme (et habituellement l'information ne se situe pas dans ces
  fichiers, par exemple les systmes RedHat stockent l'ensemble de la
  configuration du systme sous /etc/sysconfig, o elle est rcupre
  par les scripts de dmarrage). Si vous voulez saisir les dtails du
  processus de dmarrage, je vous conseille de vrifier _/_e_t_c_/_i_n_i_t_t_a_b
  ainsi que la documentation accompagnant _i_n_i_t. Linux Journal va
  galement publier un article sur l'initialisation des systmes, et
  nous pointerons sur lui ds qu'il sera disponible sur le rseau.

  La plupart des distributions rcentes incluent un programme qui permet
  de configurer de nombreux types d'interfaces rseau. Si vous en
  possdez une, regardez si ce programme vous convient au lieu de tenter
  une configuration manuelle.




       -----------------------------------------
       Distrib   | Programme de configuration rseau
       -----------------------------------------
       RedHat    | /sbin/netcfg
       Slackware | /sbin/netconfig
       -----------------------------------------






  55..33..  CCrreerr vvooss iinntteerrffaacceess rrsseeaauu

  Sur beaucoup de systmes Unix les priphriques rseau apparaissent
  dans le rpertoire _/_d_e_v . Il n'en est pas de mme avec Linux. Les
  priphriques rseau  sont crs dynamiquement par les logiciels et ne
  ncessitent donc pas de fichiers de priphriques.

  Dans la majorit des cas, le priphrique rseau est cr
  automatiquement par le pilote de priphrique pendant son
  initialisation lorsqu'il dtecte votre matriel.  Par exemple le
  pilote Ethernet cre les interfaces eth[0..n] une  une quand il
  dtecte votre matriel Ethernet. La premire carte Ethernet trouve
  devient eth0, la deuxime eth1, etc.

  Cependant, dans certains cas, notamment avec _S_L_I_P et _P_P_P, les
  priphriques rseau sont crs par un programme utilisateur. Le mme
  mcanisme squentiel s'applique sur les priphriques, mais ce n'est
  pas au moment du dmarrage du systme. La raison en est que, 
  l'inverse des dispositifs Ethernet, le nombre de priphriques _S_L_I_P ou
  _P_P_P actifs peut varier dans le temps.  Nous y reviendrons plus tard.


  55..44..  CCoonnffiigguurreerr uunnee iinntteerrffaaccee rrsseeaauu

  Lorsque vous avez tous les programmes requis, votre adresse et les
  informations rseau, vous pouvez alors configurer vos interfaces.
  Lorsque nous parlons de la configuration d'interface, nous faisons
  allusion au processus d'assignation des adresses du priphrique
  rseau, et au processus de rglage des paramtres configurables.  Le
  programme le plus utilis pour ce faire est la commande _i_f_c_o_n_f_i_g
  (interface configure).

  Typiquement vous utilisez une commande comme ci-dessous :


       root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up




  Dans ce cas je configure l'interface Ethernet `eth0' avec l'adresse IP
  `192.168.0.1' et un masque de rseau `255.255.255.0'.  Le `_u_p' qui
  termine la commande enjoint  l'interface de devenir active, mais il
  peut tre omis, tant par dfaut. Pour clore une interface, vous
  faites juste ``ifconfig eth0 down''.

  Le noyau suppose certaines valeurs par dfaut lorsque l'on configure
  les interfaces. Par exemple, vous pouvez indiquer une adresse de
  rseau et une adresse de diffusion, mais si vous ne le faites pas
  comme nous venons de le faire dans l'exemple ci-dessus, alors le noyau
  fera certaines hypothses fondes sur le masque de rseau que vous
  avez fourni, et si vous ne l'avez pas donne, sur la classe de
  l'adresse IP configure.  Dans mon exemple, le noyau considrera que
  c'est un rseau de classe C et configurera une adresse rseau de
  `192.168.0.0' et une adresse de diffusion de `192.168.0.255'.

  Il y a de nombreuses autres options pour la commande _i_f_c_o_n_f_i_g . Les
  plus importantes sont :

     uupp active une interface (est fait par dfaut).

     ddoowwnn
        dsactive une interface.

     [[--]]aarrpp
        active ou dsactive le protocole de rsolution d'adresses sur
        cette interface.

     [[--]]aallllmmuullttii
        active ou dsactive la rception de tous les paquets multicast
        matriel (Ndt : Les adresses multicast sont un genre d'adresses
        de diffusion limites  un groupe de machine qui n'ont pas
        ncessairement besoin de se trouver sur le mme sous-rseau). Le
        multicast matriel permet  des groupes d'htes de recevoir des
        paquets adresss vers des destinations spciales. Ce peut tre
        important si vous utilisez des applications comme la
        vidoconfrence, mais la plupart du temps on ne l'utilise pas.

     mmttuu NN
        ce paramtre permet de rgler le _M_T_U (Maximum Transfert Unit)
        sur le priphrique.

     nneettmmaasskk <<aaddddrr>>
        ce paramtre permet de fixer le masque de rseau.

     iirrqq <<aaddddrr>>
        ce paramtre ne fonctionne qu'avec certains types de matriels,
        mais vous permet d'en fixer l'IRQ.

     [[--]]bbrrooaaddccaasstt [[aaddddrr]]
        permet d'activer ou de dsactiver l'acceptation de datagrammes
        destins  l'adresse de diffusion.

     ((--))ppooiinnttooppooiinntt [[aaddddrr]]
        permet de fixer l'adresse de la machine  l'extrmit d'un lien
        point--point comme pour _s_l_i_p ou _p_p_p.

     hhww <<ttyyppee>> <<aaddddrr>>
        permet de fixer l'adresse matrielle de certains priphriques
        rseau. Ce n'est pas souvent utilis pour Ethernet, mais utile
        pour d'autres types de rseau tels que AX.25.

  Vous pouvez utiliser la commande _i_f_c_o_n_f_i_g pour toutes les interfaces
  rseau. Quelques programmes utilisateurs comme _p_p_p_d et _d_i_p configurent
  automatiquement les priphriques en mme temps qu'ils les crent, ds
  lors l'utilisation manuelle de _i_f_c_o_n_f_i_g n'est pas ncessaire.


  55..55..  CCoonnffiigguurreerr vvoottrree ssoollvveeuurr ddee nnoommss

  Le `_S_o_l_v_e_u_r _d_e _N_o_m_s' (Name Resolver) fait partie de la bibliothque
  standard de Linux. Sa premire fonction est de convertir des noms
  d'htes comprhensibles par l'homme, comme `ftp.funet.fi' , en
  adresses IP comprhensibles par une machine, comme 128.214.248.6.

  55..55..11..  QQuu''yy aa--tt--iill ddaannss uunn nnoomm ??

  Vous tes probablement familiers avec l'aspect des noms d'htes
  Internet, mais vous ne savez pas comment ils sont composs ou
  dcomposs. Les noms de domaine Internet sont hirarchiss par nature,
  c'est--dire qu'ils ont une structure arborescente.  Un `_d_o_m_a_i_n_e' est
  une famille, ou un groupe de noms. Un `_d_o_m_a_i_n_e' peut tre subdivis en
  `_s_o_u_s_-_d_o_m_a_i_n_e_s'. Un `_d_o_m_a_i_n_e _d_e _p_r_e_m_i_e_r _n_i_v_e_a_u' est un domaine qui
  n'est pas un sous-domaine. Les Domaines de Premier Niveau sont
  spcifis dans la RFC-920. Quelques exemples :


     CCOOMM
        Organisations Commerciales

     EEDDUU
        Organisations ayant rapport avec l'ducation

     GGOOVV
        Organisations Gouvernementales (NdT: parfois GOUV en France!)

     MMIILL
        Organisations Militaires

     OORRGG
        Autres organisations

     NNEETT
        Organisations ayant un rapport avec l'internet

     NNoomm ddee PPaayyss
        il existe des codes de deux lettres qui reprsentent un pays
        donn.


  Pour des raisons historiques la plupart des domaines appartenant  des
  domaines qui ne sont pas bass sur des noms de pays sont pour les
  organisations situes aux tats-Unis, bien que les tats-Unis aient
  aussi le code de pays `.us'. Ce n'est plus vrai pour les domaines .com
  et .org, qui sont couramment utiliss par des socits hors des tats-
  Unis.


  Chacun de ces domaines de premier niveau possde des sous-domaines.
  Les domaines de premier niveau fonds sur les noms de pays sont
  diviss ensuite en sous-domaines bass sur les domaines com, edu, gov,
  mil et org . Ainsi par exemple, vous finissez par : com.au and gov.au
  pour des organisations commerciales ou gouvernementales situes en
  Australie ; notez que ce n'est pas une rgle absolue, car les poli
  tiques relles dpendant de l'autorit qui donne les noms pour chaque
  domaine.

  Le niveau de division suivant reprsente habituellement le nom de
  l'organisation. Ces sous-domaines sont variables, souvent ils sont
  fonds sur la structure en dpartements de l'organisation mais ils
  peuvent l'tre galement sur d'autres critres considrs comme
  rationnels et comprhensibles par les administrateurs rseau de
  l'organisation.

  La partie tout  fait  gauche du nom est toujours le nom unique
  assign  la machine hte et est appele le nom d'hte `_h_o_s_t_n_a_m_e', la
  partie de droite du nom est le nom de domaine `_d_o_m_a_i_n_n_a_m_e' et le nom
  complet s'appelle le nom de domaine compltement qualifi `_F_u_l_l_y
  _Q_u_a_l_i_f_i_e_d _D_o_m_a_i_n _N_a_m_e' (ou FQDN).

  Si l'on examine l'adresse de la machine de Terry par exemple, le nom
  pleinement qualifi est `perf.no.itg.telstra.com.au'. Cela veut dire
  que le nom d'hte est `perf' et le nom de domaine
  `no.itg.telstra.com.au'. Le nom de domaine est fond sur un domaine de
  premier niveau bas sur son pays, l'Australie et comme son adresse
  lectronique appartient  une organisation commerciale nous avons
  `.com' comme domaine de niveau adjacent. Le nom de la socit est
  (tait) `telstra' et notre structure interne de noms est bas sur la
  structure organisationnelle, dans mon cas, ma machine appartient 
  l'Information Technology Group, section Network Operations.

  Habituellement, les noms sont plutt plus courts ; par exemple, mon
  fournisseur d'accs  l'internet est ``systemy.it'' et mon
  organisation  but non lucratif est ``linux.it'', sans sous-domaine
  com ou org, aussi mon propre hte est simplement appel
  ``morgana.systemy.it'' et rubini@linux.it est une adresse lectronique
  valide. Notez que le propritaire d'un domaine a le droit
  d'enregistrer les noms d'htes aussi bien que les noms de sous-domaine
  ; par exemple le Groupe d'Utilisateur Linux auquel j'appartiens
  utilise le domaine pluto.linux.it, car les propritaires de linux.it
  taient d'accord pour crer un sous-domaine pour ce groupe.

  55..55..22..  LLeess iinnffoorrmmaattiioonnss nncceessssaaiirreess

  Vous devez connatre le domaine auquel votre nom d'hte appartient. Le
  solveur de nom effectue la traduction en faisant appel  un `_S_e_r_v_e_u_r
  _d_e _N_o_m_s _d_e _D_o_m_a_i_n_e', aussi vous devez connatre l'adresse IP d'un
  serveur de nom local que vous pouvez utiliser.

  Il y a trois fichiers que vous devez diter, nous en parlerons chacun
   leur tour.


  55..55..33..  //eettcc//rreessoollvv..ccoonnff

  Le fichier /etc/resolv.conf est le principal fichier de configuration
  pour le code de rsolution de nom. Son format est trs simple.  C'est
  un fichier texte avec un mot-cl par ligne. Il y a trois mots-cls
  typiquement utiliss, qui sont :

     ddoommaaiinn
        ce mot-cl indique le nom de domaine local.

     sseeaarrcchh
        ce mot-cl spcifie une liste d'autres noms de domaine pour
        rechercher un nom d'hte.

     nnaammeesseerrvveerr
        ce mot-cl, qui peut tre utilis plusieurs fois, spcifie
        l'adresse IP d'un serveur de nom de domaine pour la rsolution
        de noms.


  Un exemple de /etc/resolv.conf pourrait ressembler  ceci :


       domain maths.wu.edu.au
       search maths.wu.edu.au wu.edu.au
       nameserver 192.168.10.1
       nameserver 192.168.12.1




  Cet exemple spcifie que le nom de domaine par dfaut  ajouter aux
  noms non qualifis (c'est--dire sans domaine) est maths.wu.edu.au, et
  que si l'hte n'est pas trouv dans ce domaine on peut aussi essayer
  le domaine wu.edu.au directement. Deux entres de serveurs de noms
  sont fournies, chacune d'elles pouvant tre appele par le solveur de
  noms.


  55..55..44..  //eettcc//hhoossttss

  Le fichier /etc/hosts est l'endroit o vous mettez les noms et les
  adresses IP des htes locaux. Si vous mettez un hte dans ce fichier,
  alors vous n'avez pas  interroger le serveur de nom de domaine pour
  obtenir son adresse IP. L'inconvnient est que vous devez tenir votre
  fichier  jour si l'adresse de cet hte a chang.  Dans un systme
  bien administr les seuls noms d'htes qui apparaissent habituellement
  sont l'interface loopback, et le nom des htes locaux.



       # /etc/hosts
       127.0.0.1      localhost loopback
       192.168.0.1    ma.belle.machine

  Vous pouvez spcifier plus d'un nom d'hte, comme montr dans la
  premire entre (qui est standard pour l'interface loopback).


  55..55..55..  FFaaiirree ttoouurrnneerr uunn sseerrvveeuurr ddee nnoommss

  Si vous voulez faire tourner un serveur de nom local, vous pouvez le
  faire facilement. Voyez le DNS-HOWTO <DNS-HOWTO.html> et tous les
  documents inclus dans votre version de _B_I_N_D (Berkeley Internet Name
  Domain).


  55..66..  CCoonnffiigguurreerr vvoottrree iinntteerrffaaccee llooooppbbaacckk

  L'interface `loopback' est un type spcial d'interface qui permet de
  vous connecter  vous-mme. Il y a plusieurs raisons pour faire cela,
  par exemple si vous voulez faire des essais de logiciel rseau sans
  interfrer avec quelqu'un d'autre sur votre rseau. Par convention,
  l'adresse IP `127.0.0.1' lui a t assigne. Aussi quelle que soit la
  machine o vous tes, si vous ouvrez une connexion telnet vers
  127.0.0.1 vous atteindrez toujours l'hte local.

  Configurer l'interface loopback est simple et vous devez vous assurer
  de l'avoir fait (mais notez que cette tche est habituellement
  effectue par les scripts standards d'initialisation).



       root# ifconfig lo 127.0.0.1
       root# route add -host 127.0.0.1 lo





  Nous en dirons plus sur la commande _r_o_u_t_e dans le prochain paragraphe.


  55..77..  RRoouuttaaggee

  Le routage est un vaste sujet. On peut crire de grandes quantits de
  textes sur ce sujet. La plupart d'entre vous ont besoin d'un simple
  routage, et certains mme de rien du tout.  Je ne parlerai que des
  principes du routage. Si vous voulez plus d'informations je vous
  suggre de vous reporter aux rfrences fournies en dbut du document.

  Commenons par une dfinition. Qu'est-ce que le routage IP ?  Voici
  celle que j'utilise :


       Le routage IP est le processus par lequel un hte, ayant des
       connexions rseau multiples, dcide du chemin par lequel
       dlivrer les datagrammes IP qu'il a reus.


  Il peut tre utile d'illustrer cela par un exemple. Imaginez un
  routeur dans un bureau : il peut avoir un lien PPP sur l'Internet, un
  certain nombre de segments Ethernet alimentant les stations de travail
  et un second lien PPP vers un autre bureau.  Lorsque le routeur reoit
  un datagramme de l'une de ses connexions, le routage est le mcanisme
  utilis pour dterminer vers quelle interface il doit renvoyer ce
  datagramme. De simples htes ont besoin aussi de routage, tous les
  htes Internet ayant deux priphriques rseau, l'un tant l'interface
  loopback dcrite auparavant et l'autre est celui qui est utilis pour
  parler avec le reste du monde, soit un lien Ethernet, soit une
  interface srie PPP ou SLIP.
  Ok, alors comment marche le routage ? Chaque hte possde une liste
  spciale de rgles de routage, appele une table de routage. Cette
  table contient des colonnes qui contiennent au moins trois champs, le
  premier tant une adresse de destination, le deuxime tant le nom de
  l'interface vers lequel le datagramme doit tre rout et le troisime,
  qui est optionnel, l'adresse IP d'une autre machine qui transportera
  le datagramme vers sa prochaine destination sur le rseau passerelle.
  Sur Linux vous pouvez voir cette table en utilisant la commande
  suivante :


       user% cat /proc/net/route




  ou bien en utilisant l'une des commandes suivantes :


       user% /sbin/route -n
       user% /sbin/netstat -r




  Le processus de routage est plutt simple : un datagramme entrant est
  reu, l'adresse de destination est examine et compare avec chaque
  entre de la table. L'entre qui correspond le mieux  cette adresse
  est choisie, et le datagramme est renvoy vers l'interface spcifie.
  Si le champ passerelle est rempli, alors le datagramme est renvoy
  vers cet hte via l'interface spcifie, sinon l'adresse de
  destination est suppose comme tant sur le rseau support par
  l'interface.

  Pour manipuler ce tableau, une commande spciale est utilise.  Cette
  commande prend des arguments et les convertit en appels systme pour
  demander au noyau d'ajouter, supprimer ou modifier des entres dans la
  table de routage. Cette commande s'appelle `_r_o_u_t_e'.

  Un exemple simple. Imaginez que vous ayez un rseau Ethernet. On vous
  a dit que c'est un rseau classe C avec une adresse de 192.168.1.0. On
  vous fournit une adresse IP 192.168.1.10 pour votre usage et on vous a
  dit que 192.168.1.1 est un routeur connect  l'Internet.

  La premire tape est de configurer l'interface comme indiqu plus
  haut. Vous utiliserez la commande :


       root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up




  Maintenant vous avez besoin d'ajouter une entre dans la table de
  routage pour indiquer au noyau que les datagrammes destins aux htes
  dont les adresses correspondent  192.168.1.* doivent tre dirigs
  vers le priphrique Ethernet. Vous utiliserez une commande comme ceci
  :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0




  Notez l'utilisation de l'argument `-net' pour indiquer au programme
  route que cette entre est une route rseau.  Un autre choix peut tre
  `-host' qui est une route spcifique d'une adresse IP.

  Cette route vous permettra d'tablir des connexions IP avec tous les
  htes sur votre segment Ethernet. Mais qu'en est-il des htes IP qui
  n'y sont pas ?

  Ce serait compliqu d'ajouter des routes pour chaque rseau
  destinataire, aussi il y a une astuce utilise pour simplifier la
  tche.  L'astuce est appele route par `default'. La route par defaut
  s'adapte  toutes les destinations possibles, mais pas trs bien, de
  telle sorte que si il y a une entre qui correspond  l'adresse
  requise elle sera utilise  la place de la route par defaut. L'ide
  de la route par defaut est simplement de pouvoir dire `et tout le
  reste va ici'. Dans l'exemple que j'ai invent, on utilisera une
  entre telle que :


       root# route add default gw 192.168.1.1 eth0




  L'argument `gw' indique  la commande route que le prochain argument
  est l'adresse IP, ou le nom, d'une passerelle (gateway) ou d'une
  machine routeur vers qui tous les datagrammes correspondant  cette
  entre seront dirigs pour  routage ultrieur.

  Ainsi votre configuration complte sera :


       root# ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add default gw 192.168.1.1 eth0




  Si vous regardez bien vos fichiers `rc' concernant le rseau vous en
  trouverez au moins un trs semblable  celui-ci. C'est une configura
  tion courante.

  Examinons maintenant une configuration un peu plus complique.
  Imaginons que nous configurions le routeur examin auparavant, celui
  qui avait un lien PPP vers l'Internet et des segments LAN alimentant
  des stations de travail dans le bureau. Supposons que ce routeur ait 3
  segments Ethernet et un lien PPP. Notre configuration de routage
  ressemblerait  ceci :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add -net 192.168.2.0 netmask 255.255.255.0 eth1
       root# route add -net 192.168.3.0 netmask 255.255.255.0 eth2
       root# route add default ppp0




  Chacune des stations de travail utilisera le format plus simple dcrit
  ci-dessus, seul le routeur aura besoin d'indiquer les routes rseau
  sparment car pour les stations de travail le mcanisme de routage
  par defaut les capturera toutes, laissant au routeur le soin de les
  sparer de manire approprie. Vous pouvez vous demander pourquoi la
  route par dfaut n'utilise pas `gw'.  La raison en est trs simple :
  les protocoles de lien srie comme PPP et SLIP ont seulement deux
  htes sur leur rseau, un  chaque bout. Spcifier  l'hte que
  l'autre bout de la liaison est une passerelle est sans objet et redon
  dant, car il n'a pas d'autre choix, aussi vous n'avez pas  indiquer
  de passerelle pour ce type de connexions rseau. Les autres types
  comme Ethernet, arcnet ou token ring ont besoin que l'on indique une
  passerelle car ces rseaux supportent un grand nombre d'htes.


  55..77..11..  AAlloorrss,, qquuee ffaaiitt llee pprrooggrraammmmee rroouutteedd  ??

  La configuration de routage dcrite ci-dessus est bien adapte aux
  rseaux simples o il n'y a que des chemins uniques entre les
  destinations. Lorsque vous avez un rseau plus complexe les choses
  deviennent plus compliques.  Heureusement pour la plupart d'entre
  vous, ce ne sera pas le cas.

  Le gros problme est qu'avec le `routage manuel' ou `routage statique'
  comme dcrit ci-dessus, si une machine ou un lien tombe en panne dans
  le rseau, alors la seule faon de diriger vos datagrammes vers un
  autre chemin, s'il existe, est d'intervenir manuellement et d'excuter
  les commandes adquates. Naturellement c'est lourd, lent, peu pratique
  et source de risques. Des techniques varies ont t dveloppes pour
  rgler automatiquement les tables de routage dans le cas d'incidents
  sur un rseau o il y a plusieurs routes possibles, toutes ces
  techniques tant regroupes sous le nom de `protocoles de routage
  dynamique'.

  Vous avez peut-tre entendu parler des plus courants. Ce sont RIP
  (Routing Information Protocol) et OSPF (Open Shortest Path First
  Protocol). RIP est trs souvent utilis sur les petits ou moyens
  rseaux d'entreprise. L'OPSF est plus moderne et plus apte  grer de
  grands rseaux et mieux adapt dans le cas o il y a un grand nombre
  de chemins possibles  travers le rseau.  Les implmentations
  usuelles de ces protocoles sont : `_r_o_u_t_e_d' - RIP, et `_g_a_t_e_d' - RIP,
  OSPF et autres.  Le programme `_r_o_u_t_e_d' est normalement fourni avec
  votre distribution Linux ou est inclus dans la paquetage `NetKit'
  dcrit auparavant.

  Un exemple pour vous montrer comment et o vous pouvez utiliser un
  protocole de routage dynamique ressemblerait  ceci :



























      192.168.1.0 /                         192.168.2.0 /
         255.255.255.0                         255.255.255.0
       -                                     -
       |                                     |
       |   /-----\                 /-----\   |
       |   |     |ppp0   //    ppp0|     |   |
  eth0 |---|  A  |------//---------|  B  |---| eth0
       |   |     |     //          |     |   |
       |   \-----/                 \-----/   |
       |      \ ppp1             ppp1 /      |
       -       \                     /       -
                \                   /
                 \                 /
                  \               /
                   \             /
                    \           /
                     \         /
                      \       /
                       \     /
                    ppp0\   /ppp1
                       /-----\
                       |     |
                       |  C  |
                       |     |
                       \-----/
                          |eth0
                          |
                     |---------|
                     192.168.3.0 /
                        255.255.255.0




  Nous avons trois routeurs A, B et C. Chacun supporte un segment Ether
  net avec un rseau IP de classe C (masque de rseau 255.255.255.0).
  Chaque routeur a galement une liaison PPP vers chacun des autres rou
  teurs. Ce rseau forme un triangle.

  Il est vident que la table de routage sur le routeur A ressemble 
  ceci :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# route add -net 192.168.2.0 netmask 255.255.255.0 ppp0
       root# route add -net 192.168.3.0 netmask 255.255.255.0 ppp1




  Cela fonctionnera bien jusqu' ce que le lien entre A et B tombe en
  panne. Si cette liaison est dfaillante, alors l'entre de routage
  montre que les htes sur le segment A ne peuvent pas atteindre les
  htes sur le segment B car leurs datagrammes seront dirigs sur le
  lien ppp0 du routeur A qui est rompu.  Ils pourront encore continuer 
  parler aux htes du segment C, et les htes du segment C pourront tou
  jours parler  ceux du segment B car la liaison reste intacte.

  Mais.., si A peut parler  C et si C peut toujours parler  B,
  pourquoi A ne routerait-il pas ses datagrammes pour B via C, et
  laisser ensuite C les envoyer  B ? C'est exactement le type de
  problmes que les protocoles de routage dynamique comme RIP sont en
  mesure de rsoudre.  Si chacun des routeurs A, B et C utilisent un
  dmon de routage (NdT: dmon est une francisation familire du vocable
  informatique anglais daemon, qui signifie Disk And Extension MONitor,
  c'est  dire qui n'est pas invoqu manuellement mais attend en tche
  de fond que quelque chose se passe, que quelque condition se produise.
  Ce terme fut introduit au dpart sous CTSS (Compatible Time Sharing
  System), un anctre du systme MULTICS, lui-mme parent d'UNIX (voir
  la traduction de Ren Cougnenc de `Le systme Linux' de M. Welsh et L.
  Kaufman chez O'Reilly International Thomson), alors leurs tables de
  routage seront automatiquement rgles pour reflter le nouvel tat du
  rseau mme si l'une des liaisons est dfectueuse. Configurer un tel
  rseau est simple, sur chaque routeur vous devez seulement faire deux
  choses. Dans ce cas, pour le routeur A :


       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       root# /usr/sbin/routed




  Le dmon de routage `_r_o_u_t_e_d' trouve automatiquement tous les ports
  actifs vers le rseau quand il dmarre et coute tous les messages sur
  chacun des priphriques rseau ce qui lui permet de dterminer et de
  mettre  jour sa table de routage.

  C'tait une trs brve explication du routage dynamique et de son
  utilisation. Si vous voulez d'avantage d'explications reportez-vous
  aux rfrences listes en dbut de document.

  Les points importants relatifs au routage dynamique sont :

  1. Vous n'avez besoin d'utiliser un dmon de routage dynamique que
     quand votre machine Linux peut choisir entre plusieurs routes pour
     une destination donne.

  2. Le dmon de routage dynamique modifiera automatiquement votre table
     de routage pour tenir compte des changements survenus dans votre
     rseau.

  3. RIP est adapt aux rseaux de petite et moyenne taille.



  55..88..  CCoonnffiigguurreerr vvooss sseerrvveeuurrss rrsseeaauu eett lleess sseerrvviicceess..

  Les serveurs de rseau et les services sont des programmes qui
  permettent  un utilisateur distant de devenir utilisateur de votre
  machine Linux. Les programmes serveurs sont  l'coute des ports
  rseau.  Les ports rseau permettent die demander un service
  particulier  un hte particulier  et de faire la diffrence entre une
  connexion telnet entrante et une connexion ftp entrante. L'utilisateur
  distant tablit une connexion rseau avec votre machine puis le
  programme serveur, ou dmon de rseau,  l'coute du port, accepte la
  connexion et s'excute. Il y a deux faons d'oprer pour les dmons de
  rseau.  Les deux sont couramment utiliss en pratique. Ce sont :

     aauuttoonnoommee
        le programme dmon coute le port rseau dsign et lorsqu'il y
        a une connexion, il prend lui-mme la connexion en charge pour
        fournir le service.

     eessccllaavvee dduu sseerrvveeuurr _i_n_e_t_d
        le serveur _i_n_e_t_d est un programme dmon spcial spcialis dans
        la conduite des connexions rseau. Il possde un fichier de
        configuration qui indique quel programme doit tre utilis
        lorsqu'une connexion entrante est reue. Chacun des ports
        service doit tre configur soit avec le protocole tcp, soit
        avec le protocole udp.  Les ports sont dcrits dans un autre
        fichier dont nous parlerons plus tard.
  Il y deux fichiers importants que vous devez configurer. Ce sont
  /etc/services qui assigne des noms aux numros de port et
  /etc/inetd.conf qui sert pour la configuration du dmon de rseau
  _i_n_e_t_d .


  55..88..11..  //eettcc//sseerrvviicceess

  Le fichier /etc/services est une simple base de donnes qui associe
  des noms comprhensibles par l'homme  des ports service
  comprhensibles par la machine. Son format est tout  fait simple. Le
  fichier est un fichier texte dont chaque ligne reprsente une entre
  de la base de donnes. Chaque entre comprend trois champs spars par
  des caractres espace ou tabulation. Ces champs sont :

  nom      port/protocole        alias     # commentaire



     nnoomm
        un simple mot qui reprsente le service dcrit.

     ppoorrtt//pprroottooccoollee
        ce champ est divis en deux.

        ppoorrtt
           un nombre qui spcifie le numro de port o le service
           dsign sera disponible. La plupart des services ont des
           numros assigns. Ils sont dcrits dans la RFC-1340.

        pprroottooccoollee
           c'est soit tcp soit udp.

        Il est important de noter qu'une entre comme 18/tcp est trs
        diffrente de 18/udp et qu'il n'y a pas de raisons techniques
        que le mme service existe sur les deux. Normalement le bon sens
        prvaut et c'est vraiment pour un service particulier disponible
         la fois sur tcp et udp que vous verrez une entre pour les
        deux..

     aalliiaass
        autre nom qui peut tre utilis pour  dsigner ce service.

  Tout texte apparaissant aprs le caractre `#' est ignor et trait
  comme commentaire.


  55..88..11..11..  EExxeemmppllee ddee ffiicchhiieerr //eettcc//sseerrvviicceess ..

  Toutes les distributions rcentes de Linux fournissent un bon fichier
  /etc/services.  Juste au cas o vous construiriez tout depuis le
  dpart, voici une copie du fichier /etc/services fourni avec
  l'ancienne distribution Debian <http://www.debian.org/> .













  # /etc/services:
  # $Id: services,v 1.3 1996/05/06 21:42:37 tobias Exp $
  #
  # Network services, Internet style
  #
  # Notez que c'est la politique actuelle de l'IANA d'assigner un seul numro
  # de port  la fois pour TCP et UDP; ainsi, la plupart des ports ont deux
  #entres mme si le protocole ne supporte pas UDP.
  # Mis  jour d'aprs la RFC 1340, ``Assigned Numbers'' (Juillet 1992).
  # Il n'y a pas tous les ports, seulement les plus courants.

  tcpmux          1/tcp                           # TCP port service multiplexer
  echo            7/tcp
  echo            7/udp
  discard         9/tcp           sink null
  discard         9/udp           sink null
  systat          11/tcp          users
  daytime         13/tcp
  daytime         13/udp
  netstat         15/tcp
  qotd            17/tcp          quote
  msp             18/tcp                          # message send protocol
  msp             18/udp                          # message send protocol
  chargen         19/tcp          ttytst source
  chargen         19/udp          ttytst source
  ftp-data        20/tcp
  ftp             21/tcp
  ssh             22/tcp                          # SSH Remote Login Protocol
  ssh             22/udp                          # SSH Remote Login Protocol
  telnet          23/tcp
  # 24 - private
  smtp            25/tcp          mail
  # 26 - non assign
  time            37/tcp          timserver
  time            37/udp          timserver
  rlp             39/udp          resource        # resource location
  nameserver      42/tcp          name            # IEN 116
  whois           43/tcp          nicname
  re-mail-ck      50/tcp                          # Remote Mail Checking Protocol
  re-mail-ck      50/udp                          # Remote Mail Checking Protocol
  domain          53/tcp          nameserver      # name-domain server
  domain          53/udp          nameserver
  mtp             57/tcp                          # deprecated
  bootps          67/tcp                          # BOOTP server
  bootps          67/udp
  bootpc          68/tcp                          # BOOTP client
  bootpc          68/udp
  tftp            69/udp
  gopher          70/tcp                          # Internet Gopher
  gopher          70/udp
  rje             77/tcp          netrjs
  finger          79/tcp
  www             80/tcp          http            # WorldWideWeb HTTP
  www             80/udp                          # HyperText Transfer Protocol
  link            87/tcp          ttylink
  kerberos        88/tcp          kerberos5 krb5  # Kerberos v5
  kerberos        88/udp          kerberos5 krb5  # Kerberos v5
  supdup          95/tcp
  # 100 - reserve
  hostnames       101/tcp         hostname        # usually from sri-nic
  iso-tsap        102/tcp         tsap            # part of ISODE.
  csnet-ns        105/tcp         cso-ns          # also used by CSO name server
  csnet-ns        105/udp         cso-ns
  rtelnet         107/tcp                         # Remote Telnet
  rtelnet         107/udp
  pop-2           109/tcp         postoffice      # POP version 2
  pop-2           109/udp
  pop-3           110/tcp                         # POP version 3
  pop-3           110/udp
  sunrpc          111/tcp         portmapper      # RPC 4.0 portmapper TCP
  sunrpc          111/udp         portmapper      # RPC 4.0 portmapper UDP
  auth            113/tcp         authentication tap ident
  sftp            115/tcp
  uucp-path       117/tcp
  nntp            119/tcp         readnews untp   # USENET News Transfer Protocol
  ntp             123/tcp
  ntp             123/udp                         # Network Time Protocol
  netbios-ns      137/tcp                         # NETBIOS Name Service
  netbios-ns      137/udp
  netbios-dgm     138/tcp                         # NETBIOS Datagram Service
  netbios-dgm     138/udp
  netbios-ssn     139/tcp                         # NETBIOS session service
  netbios-ssn     139/udp
  imap2           143/tcp                         # Interim Mail Access Proto v2
  imap2           143/udp
  snmp            161/udp                         # Simple Net Mgmt Proto
  snmp-trap       162/udp         snmptrap        # Traps for SNMP
  cmip-man        163/tcp                         # ISO mgmt over IP (CMOT)
  cmip-man        163/udp
  cmip-agent      164/tcp
  cmip-agent      164/udp
  xdmcp           177/tcp                         # X Display Mgr. Control Proto
  xdmcp           177/udp
  nextstep        178/tcp         NeXTStep NextStep       # NeXTStep window
  nextstep        178/udp         NeXTStep NextStep       # server
  bgp             179/tcp                         # Border Gateway Proto.
  bgp             179/udp
  prospero        191/tcp                         # Cliff Neuman's Prospero
  prospero        191/udp
  irc             194/tcp                         # Internet Relay Chat
  irc             194/udp
  smux            199/tcp                         # SNMP Unix Multiplexer
  smux            199/udp
  at-rtmp         201/tcp                         # AppleTalk routing
  at-rtmp         201/udp
  at-nbp          202/tcp                         # AppleTalk name binding
  at-nbp          202/udp
  at-echo         204/tcp                         # AppleTalk echo
  at-echo         204/udp
  at-zis          206/tcp                         # AppleTalk zone information
  at-zis          206/udp
  z3950           210/tcp         wais            # NISO Z39.50 database
  z3950           210/udp         wais
  ipx             213/tcp                         # IPX
  ipx             213/udp
  imap3           220/tcp                         # Interactive Mail Access
  imap3           220/udp                         # Protocol v3
  ulistserv       372/tcp                         # UNIX Listserv
  ulistserv       372/udp
  #
  # services spcifiques  UNIX
  #
  exec            512/tcp
  biff            512/udp         comsat
  login           513/tcp
  who             513/udp         whod
  shell           514/tcp         cmd             # no passwords used
  syslog          514/udp
  printer         515/tcp         spooler         # line printer spooler
  talk            517/udp
  ntalk           518/udp
  route           520/udp         router routed   # RIP
  timed           525/udp         timeserver
  tempo           526/tcp         newdate
  courier         530/tcp         rpc
  conference      531/tcp         chat
  netnews         532/tcp         readnews
  netwall         533/udp                         # -for emergency broadcasts
  uucp            540/tcp         uucpd           # uucp daemon
  remotefs        556/tcp         rfs_server rfs  # Brunhoff remote filesystem
  klogin          543/tcp                         # Kerberized `rlogin' (v5)
  kshell          544/tcp         krcmd           # Kerberized `rsh' (v5)
  kerberos-adm    749/tcp                         # Kerberos `kadmin' (v5)
  #
  webster         765/tcp                         # Network dictionary
  webster         765/udp
  #
  # D'aprs ``Assigned Numbers'' :
  #
  #> Les Ports Enregistrs ne sont pas contrls par l'IANA et peuvent tre
  #> utiliss sur la plupart des systmes par des processus ordinaires
  #> ou des programmes excuts par des utilisateurs ordinaires.
  #
  #> Les ports sont utiliss dans le TCP [45,106] pour nommer les extrmits
  #> des connexions logiques qui transportent les conversations de longue
  #> dure. Pour offrir des services  des utilisateurs non connus, un port
  #> de service pour contact a t dfini. Cette liste spcifie le port utilis
  #> par le processus serveur ainsi que son port de contact. Comme l'IANA ne peut
  #> contrler l'usage de ces ports, on donne ici une liste d'utilisation
  #> de ces ports pour tre agrable  la communaut.
  #
  ingreslock      1524/tcp
  ingreslock      1524/udp
  prospero-np     1525/tcp                # Prospero non-privileged
  prospero-np     1525/udp
  rfe             5002/tcp                # Radio Free Ethernet
  rfe             5002/udp                # Actually uses UDP only
  bbs             7000/tcp                # BBS service
  #
  #
  # services Kerberos (Project Athena/MIT)
  # Notez que ceux-ci sont pour Kerberos v4, et ne sont pas officiels. Les sites
  # tournant sous v4 doivent utiliser ceux-ci et annuler les entres v5 ci-dessus.
  #
  kerberos4       750/udp         kdc     # Kerberos (server) udp
  kerberos4       750/tcp         kdc     # Kerberos (server) tcp
  kerberos_master 751/udp                 # Kerberos authentication
  kerberos_master 751/tcp                 # Kerberos authentication
  passwd_server   752/udp                 # Kerberos passwd server
  krb_prop        754/tcp                 # Kerberos slave propagation
  krbupdate       760/tcp         kreg    # Kerberos registration
  kpasswd         761/tcp         kpwd    # Kerberos "passwd"
  kpop            1109/tcp                # Pop with Kerberos
  knetd           2053/tcp                # Kerberos de-multiplexor
  zephyr-srv      2102/udp                # Zephyr server
  zephyr-clt      2103/udp                # Zephyr serv-hm connection
  zephyr-hm       2104/udp                # Zephyr hostmanager
  eklogin         2105/tcp                # Kerberos encrypted rlogin
  #
  # Services non officiels mais ncessaires (pour NetBSD)
  #
  supfilesrv      871/tcp                 # SUP server
  supfiledbg      1127/tcp                # SUP debugging
  #
  # Services protocole de dlivrance de datagrammes
  #
  rtmp            1/ddp                   # Routing Table Maintenance Protocol
  nbp             2/ddp                   # Name Binding Protocol
  echo            4/ddp                   # AppleTalk Echo Protocol
  zip             6/ddp                   # Zone Information Protocol
  #
  # Services Debian GNU/Linux
  rmtcfg          1236/tcp                # Gracilis Packeten remote config server
  xtel            1313/tcp                # french minitel
  cfinger         2003/tcp                # GNU Finger
  postgres        4321/tcp                # POSTGRES
  mandelspawn     9359/udp        mandelbrot      # network mandelbrot

  # Services locaux




  Dans la ralit, le fichier augmente toujours en taille au fur et 
  mesure que de nouveaux services apparaissent. Si vous craignez que
  votre copie soit incomplte, je vous suggre de copier un nouveau
  fichier /etc/services provenant d'une distribution rcente.


  55..88..22..  //eettcc//iinneettdd..ccoonnff

  Le fichier /etc/inetd.conf est le fichier de configuration du serveur
  dmon _i_n_e_t_d . Il sert  dire  _i_n_e_t_d ce qu'il doit faire lorsqu'il
  reoit une demande de connexion pour un service particulier.  Pour les
  services o vous acceptez une connexion vous devez dire  _i_n_e_t_d quel
  dmon serveur de rseau doit tourner, et comment.

  Son format est aussi trs simple. C'est un fichier texte dont chaque
  ligne dcrit un service que vous voulez fournir. Tout texte suivant un
  `#' est ignor et considr comme commentaire. Chaque ligne contient
  sept champs spars par un nombre quelconque d'espaces (espace ou
  tabulation). Le format gnral est comme suit :


       service  type_de_socket  protocole  drapeaux  utilisateur  chemin  arguments





     sseerrvviiccee
        est le nom de service applicable  cette configuration, pris
        dans le fichier /etc/services.

     ttyyppee__ddee__ssoocckkeett
        ce champ dcrit le type de socket que cette entre considre
        comme pertinent, les valeurs permises sont : stream, dgram, raw,
        rdm, ou seqpacket.  C'est un peu technique par nature, mais par
        exprience, presque tous les services bass sur tcp utilisent
        stream et presque tous les services bass sur udp  utilisent
        dgram.  Il n'y a que quelques types de serveurs dmons spciaux
        utilisant d'autres valeurs.

     pprroottooccoollee
        le protocole considr comme valide pour cette entre. Il doit
        correspondre  l'entre approprie dans le fichier /etc/services
        et sera donc soit tcp soit udp.  Les serveurs bass sur Sun RPC
        (Remote Procedure Call) utilisent rpc/tcp ou rpc/udp.

     ddrraappeeaauuxx
        il n'y a en fait que deux valeurs pour ce champ. Celles-ci
        disent  _i_n_e_t_d si le programme serveur rseau libre le socket
        aprs dmarrage, et donc si _i_n_e_t_d peut prendre en compte une des
        prochaines demandes de connexion, ou bien si _i_n_e_t_d doit attendre
        qu'un autre dmon serveur tournant dj prenne en charge la
        nouvelle demande de connexion.  C'est encore compliqu, mais en
        pratique tous les serveurs tcp doivent avoir cette entre
        positionne sur nowait et la plupart des serveurs udp ont cette
        entre positionne sur wait.  Attention il y a quelques
        exceptions notables, laissez vous guider par l'exemple suivant
        si vous n'tes pas srs.

     uuttiilliissaatteeuurr
        ce champ dcrit quel compte utilisateur extrait de /etc/passwd
        sera considr comme propritaire du dmon rseau lorsqu'il est
        lanc.  C'est trs utile lorsque vous voulez vous protger
        contre les trous de scurit. Vous pouvez mettre nobody comme
        utilisateur pour une entre si bien que dans le cas o le rseau
        comporte une brche, les dommages ventuels seront minimiss.
        Cependant habituellement ce champ est rgl sur root, car
        beaucoup de serveurs ont besoin des privilges de root pour
        tourner correctement.

     cchheemmiinn__ddee__sseerrvveeuurr
        ce champ est le chemin rel du programme  excuter pour cette
        entre.

     aarrgguummeennttss
        ce champ correspond au reste de la ligne et est optionnel.  Il
        sert  indiquer les arguments de commande que vous voulez passer
        au programme serveur au lancement.



  55..88..22..11..  EExxeemmppllee ddee ffiicchhiieerr //eettcc//iinneettdd..ccoonnff

  Comme pour le fichier /etc/services, toutes les distributions modernes
  incluent un bon fichier /etc/inetd.conf pour pouvoir travailler. Ici,
  pour tre complet , vous trouverez le fichier /etc/inetd.conf de la
  distribution Debian <http://www.debian.org/>.






























  # /etc/inetd.conf:  voir inetd(8) pour d'autres informations.
  #
  # Base de donnes pour la configuration d'un serveur Internet
  #
  #
  # Modifi pour Debian par Peter Tobias <tobias@et-inf.fho-emden.de>
  #
  # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
  #
  # Services internes
  #
  #echo           stream  tcp     nowait  root    internal
  #echo           dgram   udp     wait    root    internal
  discard         stream  tcp     nowait  root    internal
  discard         dgram   udp     wait    root    internal
  daytime         stream  tcp     nowait  root    internal
  daytime         dgram   udp     wait    root    internal
  #chargen        stream  tcp     nowait  root    internal
  #chargen        dgram   udp     wait    root    internal
  time            stream  tcp     nowait  root    internal
  time            dgram   udp     wait    root    internal
  #
  # Services standards.
  #
  telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.telnetd
  ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.ftpd
  #fsp    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.fspd
  #
  # Shell, login, exec et talk sont des protocoles BSD.
  #
  shell   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd
  login   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind
  #exec   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rexecd
  talk    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.talkd
  ntalk   dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.ntalkd
  #
  # Services Mail, news et uucp.
  #
  smtp    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.smtpd
  #nntp   stream  tcp     nowait  news    /usr/sbin/tcpd  /usr/sbin/in.nntpd
  #uucp   stream  tcp     nowait  uucp    /usr/sbin/tcpd  /usr/lib/uucp/uucico
  #comsat dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.comsat
  #
  # Pop et autres
  #
  #pop-2  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop2d
  #pop-3  stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.pop3d
  #
  # `cfinger' est le serveur finger GNU de Debian.  (NOTE : L'implmentation
  # habituelle du dmon `finger' permet de le faire tourner avec `root'.)
  #
  #cfinger stream tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.cfingerd
  #finger stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.fingerd
  #netstat        stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/netstat
  #systat stream  tcp     nowait  nobody  /usr/sbin/tcpd  /bin/ps -auwwx
  #
  # Le service tftp est fourni principalement pour dmarrer. La plupart des sites
  # l'utilisent seulement sur les machines servant de `serveurs de boot'.
  #
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd
  #tftp   dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /boot
  #bootps dgram   udp     wait    root    /usr/sbin/bootpd        bootpd -i -t 120
  #
  # Services Kerberos (ils doivent probablement tre corrigs)
  #
  #klogin         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k
  #eklogin        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind -k -x
  #kshell         stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd -k
  #
  # Services tournant UNIQUEMENT sur Kerberos (doivent tre probablement corrigs)
  #
  #krbupdate      stream tcp      nowait  root    /usr/sbin/tcpd  /usr/sbin/registerd
  #kpasswd        stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/kpasswdd
  #
  # Services RPC
  #
  #mountd/1       dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.mountd
  #rstatd/1-3     dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rstatd
  #rusersd/2-3    dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rusersd
  #walld/1        dgram   rpc/udp wait    root    /usr/sbin/tcpd  /usr/sbin/rpc.rwalld
  #
  # Fin de inetd.conf.
  ident           stream  tcp     nowait  nobody  /usr/sbin/identd       identd -i






  55..99..  AAuuttrreess ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn aayyaanntt uunn rraappppoorrtt aavveecc llee rrsseeaauu

  Il y a beaucoup de fichiers relatifs  la configuration rseau sous
  Linux susceptibles de vous intresser. Vous n'aurez jamais  modifier
  ces fichiers, mais il est utile de les dcrire pour que vous sachiez
  ce qu'ils contiennent et quelle est leur utilit.


  55..99..11..  //eettcc//pprroottooccoollss

  Le fichier /etc/protocols est une base de donnes qui donne la
  relation des numros id de protocole avec leurs noms.  Il est utilis
  par les programmeurs pour leur permettre de spcifier les protocoles
  par leur nom dans les programmes et aussi par quelques programmes tels
  que _t_c_p_d_u_m_p pour pouvoir afficher en sortie des noms au lieu de
  chiffres. La syntaxe gnrale de ce fichier est :


       nom du protocole     numro    alias




  Le fichier /etc/protocols fourni avec la distribution Debian
  <http://www.debian.org/> est le suivant :


















  # /etc/protocols:
  # $Id: protocols,v 1.1 1995/02/24 01:09:41 imurdock Exp $
  #
  # Protocoles Internet (IP)
  #
  #       d'aprs: @(#)protocols  5.1 (Berkeley) 4/17/89
  #
  # Mise  jour pour NetBSD basee sur la RFC 1340, Assigned Numbers (July 1992).

  ip      0       IP              # internet protocol, pseudo protocol number
  icmp    1       ICMP            # internet control message protocol
  igmp    2       IGMP            # Internet Group Management
  ggp     3       GGP             # gateway-gateway protocol
  ipencap 4       IP-ENCAP        # IP encapsulated in IP (officially ``IP'')
  st      5       ST              # ST datagram mode
  tcp     6       TCP             # transmission control protocol
  egp     8       EGP             # exterior gateway protocol
  pup     12      PUP             # PARC universal packet protocol
  udp     17      UDP             # user datagram protocol
  hmp     20      HMP             # host monitoring protocol
  xns-idp 22      XNS-IDP         # Xerox NS IDP
  rdp     27      RDP             # "reliable datagram" protocol
  iso-tp4 29      ISO-TP4         # ISO Transport Protocol class 4
  xtp     36      XTP             # Xpress Tranfer Protocol
  ddp     37      DDP             # Datagram Delivery Protocol
  idpr-cmtp       39      IDPR-CMTP       # IDPR Control Message Transport
  rspf    73      RSPF            # Radio Shortest Path First.
  vmtp    81      VMTP            # Versatile Message Transport
  ospf    89      OSPFIGP         # Open Shortest Path First IGP
  ipip    94      IPIP            # Yet Another IP encapsulation
  encap   98      ENCAP           # Yet Another IP encapsulation






  55..99..22..  //eettcc//nneettwwoorrkkss

  Le fichier /etc/networks a une fonction similaire au fichier
  /etc/hosts. Il fournit une simple base de donnes de noms de rseau
  avec des adresses. Son format diffre en ce qu'il n'y a que deux
  champs par ligne, et que ces champs sont cods comme ceci :



        Nom du rseau   adresse de rseau





  Un exemple :


       loopnet    127.0.0.0
       localnet   192.168.0.0
       amprnet    44.0.0.0





  Lorsque vous utilisez une commande comme _r_o_u_t_e, si une destination est
  un rseau, et que ce rseau a une entre dans le fichier /etc/networks
  la commande affichera alors le nom du rseau en lieu et place de son
  adresse.


  55..1100..  SSccuurriitt rrsseeaauu eett ccoonnttrrllee dd''aaccccss

  Laissez-moi dbuter ce paragraphe en vous mettant en garde que la
  scurisation de votre machine et du rseau contre les attaques
  pernicieuses est un art complexe. Je ne me considre pas du tout comme
  un expert dans ce domaine et bien que les mcanismes que je vais
  dcrire puissent vous aider, si vous tes proccups par la scurit,
  alors je vous recommande d'effectuer vous-mme des recherches sur le
  sujet. Il existe beaucoup de bonnes rfrences sur l'Internet qui
  traitent du sujet, y compris Security-HOWTO <Security-HOWTO.html>

  Une importante rgle pratique est : `NN''uuttiilliisseezz ppaass ddee sseerrvveeuurrss ddoonntt
  vvoouuss nn''aavveezz ppaass ll''uuttiilliitt'.  Beaucoup de distributions arrivent avec
  plein de services configurs et dmarrant automatiquement. Pour
  assurer quand mme un minimum de scurit vous devriez aller dans
  votre fichier /etc/inetd.conf et retirez (_p_l_a_c_e_z _u_n _`_#_' _a_u _d__b_u_t _d_e _l_a
  _l_i_g_n_e) toute entre que vous ne comptez pas utiliser.  De bons
  candidats sont :  shell, login, exec, uucp, ftp, et les services
  informatifs tels que finger, netstat and systat.

  Il y a plein de sortes de scurit et de mcanismes de contrle
  d'accs ; je vais dcrire les plus lmentaires.


  55..1100..11..  //eettcc//ffttppuusseerrss

  Le fichier /etc/ftpusers est un mcanisme simple qui vous permet
  d'interdire l'accs de votre machine  certains utilisateurs de ftp.
  Il est lu par le programme dmon (_f_t_p_d) lorsqu'une connexion ftp est
  reue. Le fichier est une simple liste d'utilisateurs qui ne peuvent
  pas se connecter. Il ressemble  :


       # /etc/ftpusers - utilisateurs ne pouvant pas se connecter par ftp
       root
       uucp
       bin
       mail






  55..1100..22..  //eettcc//sseeccuurreettttyy

  Le fichier /etc/securetty vous permet de spcifier sur quels fichiers
  de priphriques tty root a le droit de se connecter. Le fichier
  /etc/securetty est lu par le programme de connexion (habituellement
  _/_b_i_n_/_l_o_g_i_n). Son format est une liste de fichiers de priphriques tty
  autoriss (sur tous les autres root ne peut se connecter) :


       # /etc/securetty - consoles ou root peut se connecter
       tty1
       tty2
       tty3
       tty4





  55..1100..33..  LLee mmccaanniissmmee ddee ccoonnttrrllee dd''aaccccss ddeess hhtteess ttccppdd ..

  Le programme _t_c_p_d que vous avez vu dans le fichier /etc/inetd.conf
  fournit les mcanismes de contrle d'accs et de connexion aux
  services qu'il a pour but de protger.

  Lorsqu'il est invoqu par le programme _i_n_e_t_d, il lit deux fichiers
  contenant les rgles d'accs et il autorise ou interdit l'accs au
  serveur qu'il protge.

  Il cherche dans ces deux fichiers jusqu' ce qu'il trouve une
  correspondance. S'il n'en trouve pas il suppose que l'accs est
  autoris. Il recherche dans l'ordre suivant : /etc/hosts.allow,
  /etc/hosts.deny. Je dcrirai chacun d'eux plus tard. Pour une
  description complte rfrez-vous aux pages de manuel appropries
  (hosts_access(5) est un bon point de dpart).


  55..1100..33..11..  //eettcc//hhoossttss..aallllooww

  Le fichier /etc/hosts.allow est un fichier de configuration du
  programme _/_u_s_r_/_s_b_i_n_/_t_c_p_d. Il contient les htes dont l'accs est
  _a_u_t_o_r_i_s_ _(_a_l_l_o_w_e_d_) et qui peuvent donc utiliser un service de votre
  machine.

  Le format du fichier est trs simple :


       # /etc/hosts.allow
       #
       # <liste des services>: <liste des htes> [: commande]






     liste des services
        c'est une liste de serveurs, spars par des virgules, auxquels
        les rgles d'accs s'appliquent.  Exemples de serveur : ftpd,
        telnetd, et fingerd.

     liste des htes
        c'est une liste de noms d'htes, spars par des virgules (vous
        pouvez utiliser galement des adresses IP).  Vous pouvez en plus
        spcifier des noms d'htes ou des adresses IP avec des jokers
        pour obtenir des groupes d'htes.  Des exemples :
        gw.vk2ktj.ampr.org pour un hte spcifique, .uts.edu.au pour
        tous les htes se terminant par cette chane , 44. pour toutes
        les adresses IP commenant par ces chiffres.  Il y a quelques
        expressions pour simplifier la configuration, parmi lesquelles :
        ALL pour tous les htes, LOCAL pour tout hte dont le nom ne
        contient pas de `.' c'est  dire appartenant au mme domaine que
        votre machine, et PARANOID pour tout hte dont le nom ne
        correspond pas avec son adresse (tricherie dans le nom). Il y a
        enfin une expression qui peut tre utile.  Il s'agit de EXCEPT
        qui vous permet de fournir une liste avec des exceptions.  Nous
        verrons un exemple plus tard.

     commande
        c'est un paramtre optionnel. Ce paramtre est le nom complet
        d'une commande (avec son rpertoire) qui sera excute chaque
        fois qu'il y aura correspondance.  Ce peut tre par exemple une
        commande qui essaiera d'identifier qui se connecte, ou de
        gnrer un message par courrier ou tout message d'alerte pour
        l'administrateur systme avertissant que quelqu'un est en train
        de se connecter.  On peut y inclure des extensions, par exemple
        : %h donnera le nom de l'hte qui se connecte ou bien son
        adresse s'il n'a pas de nom , %d le programme dmon appel.

  Un exemple :


       # /etc/hosts.allow
       #
       # Permet a tout le monde d'utiliser le courrier
       in.smtpd: ALL
       # telnet et ftp pour les hotes de mon domaine et my.host.at.home.
       telnetd, ftpd: LOCAL, myhost.athome.org.au
       # finger pour tout le monde, mais garde une trace de l'identite.
       fingerd: ALL: (finger @%h | mail -s "finger from %h" root)






  55..1100..33..22..  //eettcc//hhoossttss..ddeennyy

  Le fichier /etc/hosts.deny est un fichier de configuration du
  programme _/_u_s_r_/_s_b_i_n_/_t_c_p_d. Ce fichier contient les htes qui _n_'_o_n_t _p_a_s
  _l_'_a_u_t_o_r_i_s_a_t_i_o_n  d'accder  l'un des services de votre machine.

  Un exemple simple ressemblerait  ceci :



       # /etc/hosts.deny
       #
       # Interdit l'acces aux hotes ayant des noms suspects
       ALL: PARANOID
       #
       # Interdit l'acces a tous les hotes
       ALL: ALL





  L'entre PARANOID est en fait redondante car l'autre entre interdit
  tous les cas.  L'une ou l'autre entre devrait convenir, en fonction
  de vos besoins particuliers.

  Mettre ALL: ALL par dfaut dans le fichier /etc/hosts.deny puis
  autoriser certains services, en liaison avec les htes que vous avez
  choisis, dans le fichier /etc/hosts.allow, est la configuration la
  plus sre.


  55..1100..44..  //eettcc//hhoossttss..eeqquuiivv

  Le fichier hosts.equiv est utilis pour concder  certains htes des
  droits d'accs leur permettant d'avoir un compte sur votre machine
  sans fournir de mot de passe. Cela est utile dans un environnement
  scuris o vous contrlez toutes les machines, sinon ce peut tre
  trs risqu. Votre machine est aussi sre que le moins sr de vos
  htes de confiance. Pour augmenter la scurit, n'utilisez pas cette
  possiblit et encouragez vos utilisateurs  ne pas utiliser le fichier
  .rhosts.



  55..1100..55..  CCoonnffiigguurreerr vvoottrree ddmmoonn ffttpp  ccoorrrreecctteemmeenntt

  Beaucoup de sites sont intresss  avoir un serveur _f_t_p anonyme pour
  permettre aux autres de transfrer et de rcuprer des fichiers sans
  avoir besoin d'une identification spciale.  Si vous dcidez d'offrir
  ce service soyez certains de configurer votre dmon _f_t_p de manire
  adquate pour les accs anonymes. La plupart des pages de manuel
  ddies  ftpd(8) dcrivent tous les dtails pour y arriver. Vous
  devez toujours vous assurer que vous avez bien suivi les instructions.
  Un rgle importante est de ne pas utiliser une copie de votre fichier
  /etc/passwd dans le rpertoire /etc du compte anonyme. Soyez srs
  d'avoir limin tous les dtails des comptes excepts ceux qui sont
  ncessaires, autrement vous serez vulnrables vis  vis de ceux qui
  matrisent les techniques de mise en pices des mots de passe.


  55..1100..66..  PPaarree--ffeeuu ((FFiirreewwaallll)) ssuurr llee rrsseeaauu

  Ne pas permettre aux datagrammes d'atteindre votre machine ou les
  serveurs est un excellent moyen de scurisation. Ceci est abord en
  profondeur dans Firewall-HOWTO <Firewall-HOWTO.html> et (de manire
  plus concise) plus loin dans ce document.


  55..1100..77..  AAuuttrreess ssuuggggeessttiioonnss

  Voici d'autres suggestions, potentiellement religieuses,  prendre en
  considration :

     sseennddmmaaiill
        en dpit de sa popularit, le dmon _s_e_n_d_m_a_i_l apparat avec une
        effrayante rgularit dans les mises en garde concernant la
        scurit. Faites comme vous voulez, mais j'ai choisi de ne pas
        l'utiliser.

     NNFFSS eett aauuttrreess sseerrvviicceess SSuunn RRPPCC
        soyez circonspects avec eux. Il y a toutes sortes d'exploits
        possibles avec ces services. Il est difficile de trouver une
        option pour les services tels que NFS, mais si vous les
        configurez, soyez prudents envers ceux  qui vous accordez des
        droits.




  66..  IInnffoorrmmaattiioonnss ssuurr IIPP eett EEtthheerrnneett

  Cette section traite d'informations spcifiques sur IP et Ethernet.
  Les sous-sections ont t rassembles car je pense que ce sont les
  plus intressantes de ce qui tait appel autrefois ``Technologies
  spcifiques''. Toute personne ayant un rseau local doit pouvoir tirer
  bnfice de ces bonnes choses.


  66..11..  EEtthheerrnneett

  Les noms de priphriques Ethernet sont `eth0', `eth1', `eth2' etc. La
  premire carte dtecte par le noyau devient `eth0' et le reste est
  nomm dans l'ordre de dtection.

  par dfaut, le noyau Linux ne dtecte qu'un seul dispositif Ethernet,
  vous devez donc donner des arguments sur la ligne de commande pour
  forcer le noyau  dtecter des autres cartes.

  Pour savoir comment faire marcher votre carte Ethernet sous Linux
  rfrez-vous au Ethernet-HOWTO <Ethernet-HOWTO.html>.
  Une fois que vous avez compil convenablement votre noyau pour
  supporter les cartes Ethernet, la configuration des cartes est aise.

  Typiquement vous faites ainsi (ce que la plupart des distributions
  font automatiquement pour vous, si vous les avez configures pour
  supporter votre carte ethernet) :


       root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
       root# route add -net 192.168.0.0 netmask 255.255.255.0 eth0




  La plupart des pilotes Ethernet ont t dvelopps par Donald Becker,
  becker@CESDIS.gsfc.nasa.gov.



  66..22..  EEQQLL -- ggaalliisseeuurr ddee cchhaarrggee  lliiggnneess mmuullttiipplleess

  Le nom du priphrique EQL est `eql'. Avec les sources standards du
  noyau vous ne pouvez avoir qu'un seul priphrique EQL par machine.
  EQL permet d'utiliser plusieurs lignes point  point telles que PPP,
  SLIP ou PLIP comme si c'tait un seul lien logique de transport
  tcp/ip. C'est souvent moins cher d'utiliser plusieurs lignes  faible
  dbit que d'avoir une ligne  haut dbit.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support --->
           [*] Network device support
           <*> EQL (serial line load balancing) support




  Pour supporter ce mcanisme la machine  l'autre bout de la ligne doit
  galement supporter EQL.  Linux, Livingstone Portmasters et de
  nouveaux serveurs de ligne supportent des systmes compatibles.

  Pour configurer EQL vous avez besoin des outils eql, disponibles sur :
  sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/linux/system/Serial/eql-1.2.tar.gz>.

  La configuration est plutt directe. Vous commencez par configurer
  l'interface eql. C'est exactement comme un autre priphrique rseau.
  Vous configurez l'adresse IP et le mtu en utilissant l'outil _i_f_c_o_n_f_i_g
  , comme ceci :


       root# ifconfig eql 192.168.10.1 mtu 1006




  Ensuite vous devez initialiser manuellement chacune des lignes que
  vous allez utiliser. Ce peut tre toute combinaison de priphriques
  rseau point  point. La faon d'initialiser les connexions dpend du
  type de lien, voyez les paragraphes appropris pour d'autres
  informations.

  Enfin vous devez associer le lien srie et le dispositif EQL, cela
  s'appelle `asservissement' (enslaving) et est ralis avec la commande
  _e_q_l___e_n_s_l_a_v_e comme suit :
       root# eql_enslave eql sl0 28800
       root# eql_enslave eql ppp0 14400




  Le paramtre `_e_s_t_i_m_a_t_e_d _s_p_e_e_d' que vous fournissez  _e_q_l___e_n_s_l_a_v_e ne
  fait rien directement. Il est utilis par le pilote EQL pour dter
  miner comment les datagrammes vont se rpartir sur ce priphrique,
  aussi vous pouvez rgler l'quilibrage des lignes en jouant avec cette
  valeur.

  Pour librer une ligne d'un priphrique EQL vous utilisez la commande
  _e_q_l___e_m_a_n_c_i_p_a_t_e comme ci-dessous :


       root# eql_emancipate eql sl0




  Vous ajoutez le routage comme vous le feriez pour tout lien point 
  point, sauf que vos routes doivent se rapporter au dispositif eql
  plutt qu'aux priphriques sries eux-mmes. Typiquement vous devriez
  utiliser :


       root# route add default eql




  Le pilote EQL fut dvelopp par Simon Janes, simon@ncm.com.


  66..33..  EEnnrreeggiissttrreemmeenntt IIPP ((IIPP AAccccoouunnttiinngg)) ((ppoouurr LLiinnuuxx--22..00))

  Les possibilits d'enregistrement IP du noyau Linux vous permettent de
  recueillir et d'analyser les donnes d'utilisation du rseau.  Les
  donnes collectes comprennent le nombre de paquets et le nombre
  d'octets en cumul depuis la dernire remise  zro.  Vous avez  votre
  disposition une grande varit de rglages pour obtenir les donnes
  que vous dsirez. Cette option a t enleve du 2.1.102, car l'ancien
  dispositif pare-feu bas sur ipfwadm a t remplac par
  ``ipfwchains''.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           [*] IP: accounting





  Aprs avoir compil et install le noyau vous devez utiliser la
  commande _i_p_f_w_a_d_m pour configurer l'enregistrement IP. Il y a
  diffrentes possibilits pour choisir les informations  enregistrer.
  J'ai pris un exemple simplifi qui pourrait vous tre utile; lisez
  plutt la page de manuel _i_p_f_w_a_d_m pour plus d'informations.

  Scenario : Vous avez un rseau Ethernet qui est reli  l'Internet via
  une liaison PPP.  Sur l'Ethernet vous avez une machine qui offre un
  grand nombre de services et vous voulez savoir quel trafic est
  engendr par le trafic ftp et ww, aussi bien que le trafic total tcp
  et udp.

  Vous pouvez utiliser une commande qui ressemble  ceci, qui se
  prsente comme un script shell :



               #!/bin/sh
               #
               # Donne les rglages d'enregistrement
               ipfwadm -A -f
               #
               # Met en place les raccourcis
               localnet=44.136.8.96/29
               any=0/0
               # Ajoute des rglages pour le segment Ethernet local
               ipfwadm -A in  -a -P tcp -D $localnet ftp-data
               ipfwadm -A out -a -P tcp -S $localnet ftp-data
               ipfwadm -A in  -a -P tcp -D $localnet www
               ipfwadm -A out -a -P tcp -S $localnet www
               ipfwadm -A in  -a -P tcp -D $localnet
               ipfwadm -A out -a -P tcp -S $localnet
               ipfwadm -A in  -a -P udp -D $localnet
               ipfwadm -A out -a -P udp -S $localnet
               #
               # Rglages par dfaut
               ipfwadm -A in  -a -P tcp -D $any ftp-data
               ipfwadm -A out -a -P tcp -S $any ftp-data
               ipfwadm -A in  -a -P tcp -D $any www
               ipfwadm -A out -a -P tcp -S $any www
               ipfwadm -A in  -a -P tcp -D $any
               ipfwadm -A out -a -P tcp -S $any
               ipfwadm -A in  -a -P udp -D $any
               ipfwadm -A out -a -P udp -S $any
               #
               # Liste les rglages
               ipfwadm -A -l -n
               #






  Les noms ``ftp-data'' et ``www'' se rfrent aux lignes du fichier
  /etc/services.  La dernire commande liste chacune des rgles
  d'enregistrement et affiche le total.

  Il est important de noter, lorsque l'on analyse les enregistrement IP,
  que lleess ttoottaauuxx ssoonntt iinnccrrmmeennttss  cchhaaqquuee ffooiiss, donc pour connaitre les
  diffrences vous devez excuter les oprations mathmatiques
  ncessaires.  Par exemple si je veux savoir combien de donnes ne
  venaient pas de ftp, telnet, rlogin ou www je dois soustraire les
  totaux individuels correspondant  chaque port.












  root# ipfwadm -A -l -n
  IP accounting rules
   pkts bytes dir prot source               destination          ports
      0     0 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 20
      0     0 out tcp  44.136.8.96/29       0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 80
     10   572 out tcp  44.136.8.96/29       0.0.0.0/0            80 -> *
    252 10943 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> *
    231 18831 out tcp  44.136.8.96/29       0.0.0.0/0            * -> *
      0     0 in  udp  0.0.0.0/0            44.136.8.96/29       * -> *
      0     0 out udp  44.136.8.96/29       0.0.0.0/0            * -> *
      0     0 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 20
      0     0 out tcp  0.0.0.0/0            0.0.0.0/0            20 -> *
     10  1166 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 80
     10   572 out tcp  0.0.0.0/0            0.0.0.0/0            80 -> *
    253 10983 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> *
    231 18831 out tcp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 in  udp  0.0.0.0/0            0.0.0.0/0            * -> *
      0     0 out udp  0.0.0.0/0            0.0.0.0/0            * -> *
  #






  66..44..  EEnnrreeggiissttrreemmeenntt IIPP ((IIPP AAccccoouunnttiinngg)) ((ppoouurr LLiinnuuxx--22..22))

  On accde au nouveau code d'enregistrement par des ``chanes IP pare-
  feu''.  Voir La page d'accueil des chanes IP
  <http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html> pour
  plus d'informations. Entre autres vous devrez utiliser _i_p_c_h_a_i_n_s au
  lieu de _i_p_f_w_a_d_m pour configurer vos filtres. (d'aprs
  Documentations/Changes dans les sources du dernier noyau).



  66..55..  IIPP AAlliiaassiinngg

  Il y a des applications o tre en mesure d'affecter plusieurs
  adresses IP  un seul priphrique rseau pourrait tre utile.
  Certains fournisseurs d'accs  l'Internet utilise souvent cette
  possibilit pour fournir des offres www et ftp ` la carte' pour leurs
  clients. Vous pouvez vous rfrer au mini-HOWTO IP-Aliasing pour plus
  d'informations.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           ....
           [*] Network aliasing
           ....
           <*> IP: aliasing support





  Aprs avoir compil et install le noyau avec le support IP_Alias, la
  configuration est trs simple. Les alias sont ajouts aux
  priphriques rseau virtuels  associs au priphrique rseau rel.
  Une simple convention de noms s'applique pour priphriques : <nom de
  priphrique> : <numro de priphrique virtuel>, par ex. eth0:0,
  ppp0:10 etc. Notez que le pilote de priphrique ifname:number ne peut
  tre configur _q_u_'_a_p_r__s le rglage de l'interface principale.
  Par exemple, supposons que vous ayez un rseau Ethernet avec
  simultanment deux sous-rseaux IP et que vous vouliez que votre
  machine ait un accs direct aux deux, vous pouvez faire quelque chose
  comme ceci :



               root# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
               root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0

               root# ifconfig eth0:0 192.168.10.1 netmask 255.255.255.0 up
               root# route add -net 192.168.10.0 netmask 255.255.255.0 eth0:0






  Pour supprimer un alias vous ajoutez simplement un `-' au bout de son
  nom et et vous faites aussi simplement que a :


              root# ifconfig eth0:0- 0





  Toutes les routes associes avec cet alias seront enleves automa
  tiquement.

  66..66..  IIPP PPaarree--ffeeuu ((FFiirreewwaallll)) ((ppoouurr LLiinnuuxx--22..00))

  Le pare-feu IP et les publications le concernant sont traits de
  manire plus appronfondies dans le document Firewall-HOWTO <Firewall-
  HOWTO.html>. Le pare-feu IP vous permet de scuriser votre machine
  contre les accs rseau non-autoriss en filtrant, ou acceptant, des
  datagrammes venant de, ou allant vers, des adresses IP de votre choix.
  Il y a diffrentes rgles : le filtrage en entre, le filtrage en
  sortie, et le filtrage en retransmission. Les rgles en entre
  s'appliquent aux datagrammes qui sont reus par un dispositif rseau.
  Les rgles en sortie s'appliquent aux datagrammes qui sont mis par un
  dispositif rseau. Les rgles en retransmission s'appliquent aux
  datagrammes qui ne sont pas pour cette machine, c'est  dire les
  datagrammes qui seront rerouts.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           [*] Network firewalls
           ....
           [*] IP: forwarding/gatewaying
           ....
           [*] IP: firewalling
           [ ] IP: firewall packet logging





  La configuration du pare-feu IP est ralise en utilisant la commande
  _i_p_f_w_a_d_m.  Comme mentionn plus haut, la scurit n'est pas ma
  spcialit, aussi, bien que je vous prsente un exemple utilisable par
  vous-mme, faites des recherches et mettez au point vos propres
  rglages si la scurit est importante pour vous.
  Vraisemblablement l'utilisation la plus courante du pare-feu IP est
  lorsque vous utilisez votre machine Linux comme routeur et passerelle
  pare-feu et que vous voulez protger votre rseau local contre les
  accs extrieurs non autoriss.

  La configuration suivante est due  Arnt Gulbrandsen,
  <agulbra@troll.no>.

  L'exemple dcrit une configuration de pare-feu pour une machine Linux
  /pare-feu/routeur illustre par ce diagramme :



       -                                   -
        \                                  | 172.16.37.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |  172.16.174.30 | Linux |      |
       NET =================|  f/w  |------|    ..37.19
           |    PPP         | router|      |  --------
          /                 ---------      |--| Mail |
         /                                 |  | /DNS |
        /                                  |  --------
       -                                   -





  Les commandes suivantes doivent tre normalement places dans un
  fichier rc de telle sorte qu'elles seront dmarres automatiquement 
  chaque redmarrage du systme. Pour une scurit maximum, elles
  devront tre effectues aprs la configuration des interfaces rseau,
  mais avant le montage de ces interfaces pour viter que quelqu'un
  puisse se connecter pendant que la machine pare-feu reboute.































          #!/bin/sh

          # Nettoie la table des rgles de 'Forwarding'
          # Change le rglage par dfaut en 'accept'
          #
          /sbin/ipfwadm -F -f
          /sbin/ipfwadm -F -p accept
          #
          # .. et pour 'Incoming'
          #
          /sbin/ipfwadm -I -f
          /sbin/ipfwadm -I -p accept

          # En premier, dvrouille l'interface PPP
          # J'aimerais bien utiliser '-a deny' au lieu de '-a reject -y' mais
          # il serait alors impossible d'tablir des connexions galement sur
          # cette interface. L'utilisation de -o fait en sorte que tous
          # les datagrammes rejets sont enregistrs. Cela occupe de l'espace
          # disque avec pour compensation la connaissance sur l'attaque due
          #  une erreur de configuration.
          #
          /sbin/ipfwadm -I -a reject -y -o -P tcp -S 0/0 -D 172.16.174.30

          # Rejette certains types de paquets visiblement faux:
          # Rien ne doit venir des adresses multicast/anycast/broadcast s
          #
          /sbin/ipfwadm -F -a deny -o -S 224.0/3 -D 172.16.37.0/24
          #
          # et aucune chose venant du rseau loopback ne doit tre vu sur l'air
          #
          /sbin/ipfwadm -F -a deny -o -S 127.0/8 -D 172.16.37.0/24

          # accepte les connexions entrantes SMTP et DNS, mais seules pour
          # le serveur  de courrier et le serveur de noms
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 0/0 -D 172.16.37.19 25 53
          #
          # DNS utilise UDP aussi bien que TCP, ce qui l'autorise donc quand
          # le serveur de noms est interrog
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 -D 172.16.37.19 53
          #
          # mais pas de "rponses" arrivant sur les ports dangereux tels que
          # NFS et l'extension NFS de Larry McVoy. Si vous utilisez squid
          # ajoutez son port ici.
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 53 \
                  -D 172.16.37.0/24 2049 2050

          # les rponses aux autres ports utilisateurs sont autorises
          #
          /sbin/ipfwadm -F -a accept -P udp -S 0/0 53 \
                  -D 172.16.37.0/24 53 1024:65535

          # Rejette les connexions entrantres vers identd
          # Nous utilisons 'reject' dans ce cas en sorte qu'il soit dit  l'hte
          # entrant de ne pas persvrer, sinon nous devrons attendre que
          # identd s'arrte.
          #
          /sbin/ipfwadm -F -a reject -o -P tcp -S 0/0 -D 172.16.37.0/24 113

          # Accepte des connexions sur des services en provenance des rseaux
          # 192.168.64 et 192.168.65, qui sont des amis de confiance.
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 192.168.64.0/23 \
                  -D 172.16.37.0/24 20:23
          # accepte et laisse passer tout ce qui vient de l'intrieur
          #
          /sbin/ipfwadm -F -a accept -P tcp -S 172.16.37.0/24 -D 0/0

          # rejette la plupart des autres connexions TCP entrantes et les
          # enregistre (ajoutez 1:1023 si ftp ne fonctionne pas)
          #
          /sbin/ipfwadm -F -a deny -o -y -P tcp -S 0/0 -D 172.16.37.0/24

          # ... pour UDP galement
          #
          /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 -D 172.16.37.0/24





  De bonnes configurations pare-feu sont difficiles  faire. Cet exemple
  peut tre un bon point de dpart pour vous. La page de manuel _i_p_f_w_a_d_m
  vous aidera pour savoir comment utiliser cet outil. Si vous voulez
  configurer un pare-feu, demandez autour de vous et recueillez des avis
  venant de sources de confiance et prenez contact avec quelqu'un qui
  est  l'extrieur pour tester votre configuration et en vrifier la
  fiabilit.


  66..77..  PPaarree--ffeeuu IIPP ((ppoouurr LLiinnuuxx--22..22))

  On accde au nouveau code d'enregistrement par des ``chanes pare-feu
  IP''.  Voir La page d'accueil des chanes IP
  <http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html> pour
  plus d'informations. Entre autres vous devrez utiliser _i_p_c_h_a_i_n_s au
  lieu de _i_p_f_w_a_d_m pour configurer vos filtres. (D'aprs
  Documentations/Changes dans les sources du dernier noyau).



  66..88..  EEnnccaappssuullaattiioonn IIPPIIPP

  Pourquoi vouloir encapsuler des paquets IP dans d'autres paquets IP?
  Cela semble bizarre si vous n'avez jamais vu d'applications
  auparavant.  Il y a deux endroits o c'est utilis : le Mobile-IP et
  l'IP-Multicast. C'est dans un environnement qui est peut-tre le plus
  largement utilis et qui est le moins connu : le radio-amateurisme.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] TCP/IP Networking
           [*] IP: forwarding/gatewaying
           ....
           <*> IP tunelling




  Les priphriques IP tunnel s'appellent `tunl0', `tunl1', etc..

  "Mais pourquoi ?" D'accord. D'accord. Les rgles de routage classiques
  spcifient qu'un rseau IP comprend une adresse IP et un masque de
  rseau. Ceci fournit un ensemble d'adresses contigus qui peuvent
  toutes tre routes par l'intermdiaire d'une seule entre de routage.
  Cela marche, mais signifie que vous ne pouvez utiliser une seule
  adresse uniquement lorsque vous tes connect  un point du rseau
  auquelle elle appartient.  Dans la plupart des cas, il n'y a pas de
  problmes, mais si vous tes en mouvement alors vous ne pouvez pas
  rester connect au mme endroit tout le temps. L'encapsulation  IP/IP
  ( IP tunneling) vous permet de passer outre cette contrainte en
  permettant aux paquets destins  votre adresse d'tre envelopps et
  redirigs vers une autre adresse. Si vous savez que vous allez oprer
  depuis un autre rseau IP pour quelques temps, vous pouvez rgler une
  machine qui est chez vous pour accepter des paquets destins  votre
  adresse IP et les rediriger vers l'adresse que vous allez utiliser
  provisoirement.


  66..88..11..  UUnnee ccoonnffiigguurraattiioonn ddee rrsseeaauu aavveecc ttuunnnneelliinngg..

  Comme toujours, je pense qu'un schma m'pargnera beaucoup de texte
  confus, aussi en voici un :



        192.168.1.24                         192.168.2.24

            -                                    -
            |      ppp0 =           ppp0 =       |
            |  aaa.bbb.ccc.ddd  fff.ggg.hhh.iii  |
            |                                    |
            |   /-----\                 /-----\  |
            |   |     |        //       |     |  |
            |---|  A  |------//---------|  B  |  |
            |   |     |    //           |     |  |
            |   \-----/                 \-----/  |
            |                                    |
            -                                    -







  Ce diagramme montre une autre raison possible d'utiliser l'encapsula
  tion IPIP : le rseau priv virtuel. Cet exemple prsuppose que vous
  ayez deux machines chacune avec une seule connexion Internet. Chaque
  hte a une seule adresse IP. Derrire chacune de ces machines se
  trouve des rseaux privs locaux configurs avec des adresses IP
  rserves. Supposez que vous vouliez permettre  chacun des htes du
  groupe A de se connecter  n'importe quel hte du groupe B, comme
  s'ils taient vraiment connects  l'Internet via un routage rseau.
  L'encapsulation IPIP vous permettra de le faire.  noter que l'encap
  sulation ne vous permettra pas de faire en sorte que chacun des htes
  des rseaux A et B puissent parler  n'importe qui sur l'Internet,
  vous aurez toujours besoin de choses comme le masquage IP pour pouvoir
  le faire.  L'encapsulation est normalement accomplie par une machine
  fonctionnant comme routeur.

  Le routeur Linux `A' sera configur comme suit :












          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=fff.ggg.hhh.iii
          #
          # configuration thernet
          ifconfig eth0 192.168.1.1 netmask $mask up
          route add -net 192.168.1.0 netmask $mask eth0
          #
          # ppp0 configuration (start ppp link, set default route)
          pppd
          route add default ppp0
          #
          # configuration du priphrique de tunneling
          ifconfig tunl0 192.168.1.1 up
          route add -net 192.168.2.0 netmask $mask gw $remotegw tunl0






  Le routeur Linux `B' sera configur comme suit :


               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=aaa.bbb.ccc.ddd
               #
               # configuration thernet
               ifconfig eth0 192.168.2.1 netmask $mask up
               route add -net 192.168.2.0 netmask $mask eth0
               #
               # ppp0 configuration (start ppp link, set default route)
               pppd
               route add default ppp0
               #
               # configuration du priphrique de tunneling
               ifconfig tunl0 192.168.2.1 up
               route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0





  La commande :


       root# route add -net 192.168.1.0 netmask $mask0 gw $remotegw tunl0




  dit : `Envoyer tous les datagrammes destins  192.168.1.0/24 dans un
  paquet d'encapsulation ayant pour adresses de destination
  aaa.bbb.ccc.ddd'.

  Notez que les configurations sont inverses  l'autre bout.  Le
  priphrique tunnel utilise `gw' dans la commande route comme
  _d_e_s_t_i_n_a_t_i_o_n du paquet IP o se trouve le datagramme qu'il doit router.
  Cette machine doit savoir comment `dsencapsuler' les paquets IPIP,
  c'est  dire qu'elle doit aussi tre configure comme priphrique
  tunnel.


  66..88..22..  UUnnee ccoonnffiigguurraattiioonn dd''hhttee ppoouurr ll''eennccaappssuullaattiioonn IIPPIIPP..

  Ce n'est pas tout un rseau que vous aurez  router. Vous pouvez par
  exemple ne router qu'une seule adresse IP. Dans ce cas vous devrez
  configurer le priphrique tunl sur la machine `distante' avec sa
  propre adresse IP et  l'extrmit A n'utiliser qu'une route hte
  (avec Proxy Arp) plutt qu'une route rseau via le priphrique
  tunnel. Refaisons et modifions notre configuration de manire
  approprie. Maintenant nous avons seulement l'hte `B' qui veut agir
  comme si il tait  la fois connect  l'Internet et galement au
  rseau distant support par l'hte `A' :



        192.168.1/24

            -
            |      ppp0 =                ppp0 =
            |  aaa.bbb.ccc.ddd      fff.ggg.hhh.iii
            |
            |   /-----\                 /-----\
            |   |     |       //        |     |
            |---|  A  |------//---------|  B  |
            |   |     |     //          |     |
            |   \-----/                 \-----/
            |                      aussi: 192.168.1.12
            -




  Le routeur Linux  `A' sera configur comme suit :


               #!/bin/sh
               PATH=/sbin:/usr/sbin
               mask=255.255.255.0
               remotegw=fff.ggg.hhh.iii
               #
               # configuration thernet
               ifconfig eth0 192.168.1.1 netmask $mask up
               route add -net 192.168.1.0 netmask $mask eth0
               #
               # configuration de ppp0 (dmarre le lien ppp link, rgle la route par
               # dfaut)
               pppd
               route add default ppp0
               #
               # configuration du priphrique de tunneling
               ifconfig tunl0 192.168.1.1 up
               route add -host 192.168.1.12 gw $remotegw tunl0
               #
               # Proxy ARP pour l'hte distant
               arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub




  L'hte Linux `B' sera configur comme suit :







          #!/bin/sh
          PATH=/sbin:/usr/sbin
          mask=255.255.255.0
          remotegw=aaa.bbb.ccc.ddd
          #
          # configuration de ppp0 (dmarre le lien ppp, rgle la route par dfaut)
          pppd
          route add default ppp0
          #
          # configuration du priphrique de tunelling
          ifconfig tunl0 192.168.1.12 up
          route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0





  Ce type de configuration est vraiment typique d'une application IP-
  Mobile, o un simple hte veut seulement se balader sur l'Internet et
  maintenir une adresse IP utilisable tout le temps. Rfrez-vous au
  paragraphe Mobile-IP pour avoir plus d'informations et savoir comment
  faire en pratique.


  66..99..  IIPP MMaassqquueerraaddee ((ppoouurr LLiinnuuxx--22..00))

  Beaucoup de gens ont une simple connexion par tlphone pour aller sur
  l'Internet. Presque tout le monde ne se voit offrir qu'une seule
  adresse IP par le founisseur d'accs avec ce type de configuration.
  Ceci est normalement suffisant pour permettre un accs complet au
  rseau. IP Masquerade est une astuce intelligente qui vous permet
  d'avoir plusieurs machines utilisant une seule adresse IP, en faisant
  croire aux autres htes qu'il n'y a que la machine supportant la
  connexion (NdT : d'o le terme masquerade=duperie, mascarade).  Il y a
  qu'une seule mise en garde, qui est que la fonction masquage ne
  travaille pratiquement que dans un seul sens : les htes masqus
  peuvent appeler mais ne peuvent accepter ou recevoir des connexions
  rseau de la part d'htes loigns. Cela signifie que certains
  services rseau comme _t_a_l_k ne peuvent fonctionner et que d'autres,
  comme _f_t_p doivent tre configurs pour fonctionner en mode passif
  (PASV). Heureusement la plupart des services rseau comme _t_e_l_n_e_t,
  World Wide Web et _i_r_c fonctionnent correctement.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Code maturity level options  --->
           [*] Prompt for development and/or incomplete code/drivers
       Networking options  --->
           [*] Network firewalls
           ....
           [*] TCP/IP networking
           [*] IP: forwarding/gatewaying
           ....
           [*] IP: masquerading (EXPERIMENTAL)





  Normalement votre machine Linux supportant un lien SLIP ou PPP se com
  portera comme si elle tait toute seule. De plus elle peut avoir un
  autre priphrique rseau configur, par exemple une carte Ethernet,
  avec des adresses rseau rserve. Les htes masqus seront ceux du
  second rseau. Chacun de ces htes aura l'adresse IP du port Ethernet
  rgle comme passerelle ou routeur par dfaut.
  Une configuration typique ressemble  ceci :


       -                                   -
        \                                  | 192.168.1.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |                | Linux | .1.1 |
       NET =================| masq  |------|
           |    PPP/slip    | router|      |  --------
          /                 ---------      |--| hte |
         /                                 |  |      |
        /                                  |  --------
       -                                   -





  Les commandes adquates pour cette configuration sont :


       # Routage rseau pour thernet
       route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       #
       # Route par dfaut pour le reste de l'internet.
       route add default ppp0
       #
       # Fait en sorte que tous les htes du rseau 192.168.1/24  soient masqus.
       ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0





  Si vous tes minimaliste ou un paresseux du clavier, comme moi, et que
  votre hte `masqu' n'a que deux interfaces ( en sorte que tout paquet
  devant tre transmis doit tre masqu), la commande ci-dessous devrait
  suffire :



       root# /sbin/ipfwadm -F -a accept -m





  Vous pouvez obtenir plus d'informations sur IP Masquerade avec IP Mas
  querade Resource Page <http://www.hwy401.com/achau/ipmasq/> Il existe
  galement un document _t_r__s dtaill qui est le ``IP-Masquerade-mini-
  HOWTO'' (qui donne en plus des renseignements pour configurer d'autres
  systmes d'exploitation pour fonctionner avec un serveur de masquage
  linux).


  66..1100..  IIPP TTrraannssppaarreenntt PPrrooxxyy

  IP transparent proxy est un procd qui vous permet de rediriger des
  serveurs ou des services destins  une autre machine vers les
  services de votre machine.  Typiquement c'est utile lorsque vous avez
  une machine Linux routeur et qui fournit aussi un serveur proxy. Vous
  redirigerez toutes les connexions  ce service distant vers le serveur
  proxy local.


  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Code maturity level options  --->
               [*] Prompt for development and/or incomplete code/drivers
       Networking options  --->
               [*] Network firewalls
               ....
               [*] TCP/IP networking
               ....
               [*] IP: firewalling
               ....
               [*] IP: transparent proxy support (EXPERIMENTAL)





  La configuration du dispositif transparent proxy est ralis en util
  isant la commande _i_p_f_w_a_d_m.

  Par exemple :


       ipfwadm -I -a accept -D 0/0 telnet -r 2323




  Cet exemple fera en sorte que toutes les tentatives de connexion vers
  le port telnet (23), de n'importe quel hte, seront rediriges vers le
  port 2323 de ce mme hte. Si vous utilisez un service sur ce port,
  vous pouvez rediriger des connexions telnet, les enregistrer ou
  excuter tout ce qui bon vous semble.

  Un exemple plus intressant est la redirection de tout le trafic http
  au travers d'un cache local. Cependant, le protocole utlis par les
  serveurs proxy diffre du protocole natif de http : quand un client se
  connecte  www.server.com:80 et demande chemin/page, quand il se
  connecte au cache local il contacte proxy.local.domain:8080 et
  recherche www.server.com/chemin/page.

  Pour filtrer une demande http au travers du proxy local, vous devez
  pouvoir adapter le protocole en insrant un petit serveur, appel
  transproxy (vous pouvez le trouver sur la toile). Vous pouvez choisir
  de faire tourner transproxy sur le port 8081, et excuter la commande
  :


       ipfwadm -I -a accept -D 0/0 80 -r 8081




  Alors le programme transproxy recevra toutes les connexions devant
  aller vers des serveurs externes et les passera au proxy local aprs
  avoir corrig les diffrences de protocole.


  66..1111..  IIPPvv66

   peine pensez-vous avoir commenc  comprendre comment fonctionne le
  rseau IP, que les rgles ont chang!  IPv6 est l'abbrviation de
  version 6 du `Protocole Internet' (version 6 de IP). Il fut dvelopp
  initialement pour calmer les inquitudes de la communaut Internet
  quant  la pnurie ventuelle d'adresses IP. Les adresses IPv6 ont 16
  octets de long (128 bits). IPv6 inclut un certain nombre d'autres
  changements, la plupart du temps des simplifications, qui rendront les
  rseaux IPv6 plus facilement grables que les rseaux IPv4.

  Linux a dj une implmentation IPv6 qui marche, mais pas encore
  compltement, dans la srie des noyaux 2.1.*.

  Si vous voulez essayer cette prochaine gnration de technologie
  Internet, ou si vous voulez un renseignement, lisez le document
  IPv6-FAQ qui se trouve sur www.terra.net <http://www.terra.net/ipv6/>.


  66..1122..  IIPP MMoobbiillee

  Le terme "mobilit IP" dcrit la possibilit qu'un hte a de
  transfrer sa connexion rseau d'un point de l'Internet vers un autre
  sans changer d'adresse IP ou sans perdre la connectivit. Normalement
  quand un hte IP change de point de connexion, il change aussi
  d'adresse IP.  La mobilit IP rsoud ce problme en allouant une
  adresse IP fixe  l'hte qui se dplace et en utilisant une
  encapsulation IP (tunneling) avec routage automatique pour s'assurer
  que les datagrammes qui lui sont destins seront routs vers l'adresse
  effectivement utilise  ce moment.

  Un projet est en cours en vue de fournir un paquetage complet d'outils
  Linux pour la mobilit IP. L'tat de ce projet et les outils peuvent
  tre obtenus sur : Linux Mobile IP Home Page
  <http://anchor.cs.binghamton.edu/~mobileip/>.


  66..1133..  MMuullttiiccaasstt

  L'IP Multicast permet de router simultanment des datagrammes IP vers
  un certain nombre d'htes se trouvant sur des rseaux diffrents.  Ce
  mcanisme est exploit pour fournir sur l'Internet des applications
  prenant de la bande passante, telles que les transmissions audio et
  video et autres nouvelles applications.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
               [*] TCP/IP networking
               ....
               [*] IP: multicasting




  Un ensemble d'outils et quelques modifications de la configuration
  rseau sont ncessaires.  Pour plus d'informations sur le support
  multicast pour Linux, voyez le Multicast-HOWTO.html <Multicast-
  HOWTO.html>


  66..1144..  NNAATT -- NNeettwwoorrkk AAddddrreessss TTrraannssllaattiioonn ((TTrraadduuccttiioonn dd''aaddrreessssee rrsseeaauu))

  Le systme de traduction d'adresse rseau IP ressemble plutt au grand
  frre standardis du systme de masquage IP de Linux. Il est dcrit en
  dtail dans la RFC-1631 sur votre archive RFC la plus proche. NET
  fournit des possibilits que IP Masquerade ne sait pas faire, ce qui
  le rend plus apte  une utilisation de routeur pare-feu pour un rseau
  d'entreprise et des installations de plus grandes dimensions.

  Une implmentation alpha de NAT pour le noyau 2.0.29 de Linux a t
  dveloppe par Michael.Hasenstein, Michael.Hasenstein@informatik.tu-
  chemnitz.de.  La documentaion et l'umplmentation de Michael se trouve
  sur :

  Linux IP Network Address Web Page <http://www.csn.tu-
  chemnitz.de/HyperNews/get/linux-ip-nat.html>

  Les noyaux 2.1.* rcents incluent galement quelques fonctions de NAT
  dans l'algorithme de routage.


  66..1155..  MMiissee eenn ffoorrmmee dduu ttrraaffiicc -- CChhaannggeerr llaa bbaannddee ppaassssaannttee aalllloouuee

  Le metteur en forme de trafic est un pilote de priphrique qui cre
  de nouvelles interfaces; celles-ci sont limites au point de vue
  trafic selon les rglages de l'utilisateur, et se connectent aux
  priphriques de rseau physiques pour la transmission relle, et
  peuvent donc tre utilises comme route vers l'extrieur en vue de
  trafic rseau.

  Le metteur en forme fut introduit sur Linux-2.1.15 et ensuite sur
  Linux-2.0.36 (il apparut dans le 2.0.36-pre-patch-2 distribut  par
  Alan Cox, l'auteur du dispositif de mise en forme et le mainteneur de
  Linux-2.0).

  Le metteur en forme de trafic ne peut tre compil qu'en tant que
  module, et se configure  l'aide du programme _s_h_a_p_e_c_f_g avec des
  commandes comme :



               shapecfg attach shaper0 eth1
               shapecfg speed shaper0 64000






  Ce metteur en forme de trafic ne peut contrler que la bande passante
  du trafic sortant, car les paquets sont transmis par le metteur en
  forme si l'on se rfre aux tables de routage; ainsi, le
  fonctionnement suivant ``un routage par adresse de dpart'' peut aider
   limiter la bande passante totale d'htes spcifiques utilsant un
  routeur Linux.

  Linux-2.1 possde dj le support pour un tel routage et si vous en
  avez besoin pour Linux-2.0, voyez le patch de Mike McLagan, sur
  ftp.invlogic.com. Lisez le fichier Documentationnetworking/shaper.txt
  pour plus d'informations.

  Si vous voulez faire (une tentative de) mise en forme pour les paquets
  entrants, essayez rshaper-1.01 (ou plus rcent), sur ftp.systemy.it
  <ftp://ftp.systemy.it/pub/develop>.


  66..1166..  RRoouuttaaggee aavveecc LLiinnuuxx--22..22

  La dernire version de Linux-2.1 permet un tas de rglages concernant
  le routage. Malheureusement, vous devez attendre la prochaine dition
  de cet HOWTO, ou bien lire les sources du noyau.


  77..  UUttiilliissaattiioonn dduu mmaattrriieell ccoouurraanntt ppoouurr PPCC



  77..11..  RRNNIISS

  Le Rseau Numrique  Intgration de Service (RNIS) (en anglais ISDN:
  Integrated Services Digital Network) est une srie de normes donnant
  les spcifications d'un rseau de donnes numriques  usage gnral.
  Un `appel' RNIS cre un service synchrone de donnes point  point
  vers la destination. RNIS est gnralement dlivr sur une ligne 
  haut dbit divise en un certain nombre de canaux discrets.  Il y a
  deux types de canaux, les `canaux B' qui transportent effectivement
  les donnes utilisateurs, et un canal unique appel `canal D' qui est
  utilis pour envoyer les informations de contrle pendant l'change
  RNIS en vue d'tablir des appels et autres fonctions. En Australie,
  par exemple, RNIS peut tre fourni sur une liaison 2 Mps qui est
  divise en 30 canaux B discrets de 64 kps et un canal D de 64 kps.
  N'importe quel nombre de canaux peuvent tre utiliss en mme temps et
  ceci dans toutes les combinaisons possibles.  Vous pouvez par exemple
  tablir 30 appels diffrents de 64 kps vers 30 destinations
  diffrentes, ou bien 15 appels de 128 kps chacun vers 15 destinations
  diffrentes (2 canaux utiliss par appel), ou seulement un petit
  nombre d'appels, le reste tant inactif.  Un canal peut tre utilis
  pour des appels entrant ou sortant.  Le but initial de RNIS tait de
  permettre aux socits de Tlcommunications de fournir un seul
  service de donnes pouvant dlivrer soit le tlphone (avec une voix
  numrise) ou bien des services de donnes vers votre domicile ou
  votre bureau sans avoir  effectuer de changements pour obtenir une
  configuration spciale.

  Il y a plusieurs faons de connecter votre ordinateur  un service
  RNIS. L'une consiste  utiliser un dispositif appel `Adaptateur de
  Terminal' qui se branche sur l'unit de terminal rseau que votre
  oprateur de tlcommunications a install au moment de l'obtention de
  votre service RNIS, et qui prsente des interfaces sries.  L'une de
  ces interfaces est utilise pour entrer les commandes pour tablir les
  appels et la configuration, et les autres sont relies aux
  priphriques rseau qui utiliseront les circuits de donnes quand la
  connexion sera faite. Linux peut travailler avec ce type de
  configuration sans modification, vous devez juste traiter le port de
  l'adaptateur de terminal comme vous traitez tout priphrique srie.
  Une autre faon, qui est la raison d'tre pour le support RNIS dans le
  noyau, vous permet d'installer une carte RNIS dans votre machine Linux
  et le logiciel Linux prend en charge les protocoles et fait les appels
  lui-mme.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       ISDN subsystem  --->
               <*> ISDN support
               [ ] Support synchronous PPP
               [ ] Support audio via ISDN
               < > ICN 2B and 4B support
               < > PCBIT-D support
               < > Teles/NICCY1016PC/Creatix support





  L'implmentation Linux de RNIS supporte diffrents types de cartes
  internes RNIS.  Il y a celles numres dans les options de configura
  tion noyau :

    ICN 2B and 4B

    Octal PCBIT-D

    Teles ISDN-cards et compatibles

     Certaines de ces cartes ont besoin de logiciels devant tre
     tlchargs pour les rendre oprationnelles. Il y a un utilitaire
     spar pour le faire.

  Tous les dtails pour configurer le support RNIS Linux se trouvent
  dans le rpertoire /usr/src/linux/Documentation/isdn/ et un document
  FAQ ddi  _i_s_d_n_4_l_i_n_u_x est disponible sur www.lrz-muenchen.de
  <http://www.lrz-muenchen.de/~ui161ab/www/isdn/> (vous pouvez cliquer
  sur le drapeau anglais pour obtenir la version anglaise).

  NNoottee aauu ssuujjeett ddee PPPPPP. L'ensemble des protocoles PPP peut travailler
  sur des lignes srie synchrone ou asynchrone. Le dmon PPP `_p_p_p_d'
  couramment distribu pour Linux ne supporte que le mode asynchrone. Si
  vous dsirez utiliser les protocoles PPP avec votre service RNIS vous
  aurez besoin d'une version spciale. Les dtails pour la trouver se
  trouvent dans la documentation mentionne ci-dessus.


  77..22..  PPLLIIPP ppoouurr LLiinnuuxx--22..00

  Les noms de priphriques PLIP sont `plip0', `plip1', `plip2'.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           <*> PLIP (parallel port) support





  _P_L_I_P (Parallel Line IP) est, comme SLIP, utilis pour fournir une
  connexion rseau _p_o_i_n_t _ _p_o_i_n_t entre deux machines, sauf qu'il est
  conu pour utiliser les ports parallles de votre machine au lieu des
  ports sries. Parce qu'il est possible de transmettre plus d'un bit en
  mme temps avec un port parallle, il est possible d'atteindre de plus
  hautes vitesses avec l'interface _P_L_I_P qu'avec une sortie srie
  standard (un schma de cblage est donn plus loin dans ce document).
  De plus, mme le plus simple des ports parallles, le port imprimante,
  peut tre utilis, au lieu d'acheter un UART 16550AFN relativement
  cher pour vos ports sries. PLIP utilise beaucoup de CPU en
  comparaison d'une liaison srie et ce n'est srement pas un bon choix
  si vous avez la possibilit d'avoir des cartes thernet pas chres,
  mais a fonctionne lorsque rien d'autre n'est disponible, et a
  fonctionne trs bien.

  Les pilotes PLIP entrent en comptition avec les autres pilotes du
  matriel branch sur le port parallle. Si vous voulez utiliser les
  deux, vous devez alors les compiler en tant que modules pour pouvoir
  choisir quel port vous voulez utiliser pour PLIP et quel port pour
  l'imprimante.  Voyez le document ``Modules-mini-HOWTO'' pour plus
  d'informations sur la configuration des modules noyau.

  Attention, notez que certains portables utilisent des circuits qui ne
  peuvent pas fonctionner avec PLIP car ils n'autorisent pas certaines
  combinaisons dont PLIP a besoin et que les imprimantes n'utilisent
  pas.

  L'interface Linux _P_L_I_P est compatible avec le _P_i_l_o_t_e _P_L_I_P _C_r_y_n_w_y_r
  _P_a_c_k_e_t et ceci signifie que vous pouvez connecter votre machine Linux
  avec une machine DOS tournant avec n'importe quel logiciel TCP/IP via
  _P_L_I_P.

  Dans la srie des noyaux 2.0.* les pilotes de priphrique PLIP sont
  affects aux ports e/s et IRQ comme suit :


       device  i/o addr    IRQ
       ------  --------    -----
       plip0   0x3BC           5
       plip1   0x378           7
       plip2   0x278           2




  Si vos ports parallles ne correspondent pas aux combinaisons
  prcdentes alors vous pouvez changer les IRQ en utilisant la commande
  _i_f_c_o_n_f_i_g avec le paramtre `irq'. N'oubliez pas de valider les IRQ
  pour vos ports imprimantes dans votre ROM BIOS s'il supporte cette
  option. Un autre moyen consiste  spcifier les options ``io='' et
  ``irq='' sur la ligne de commande de insmod, si vous utilisez les
  modules. Par exemple :



       root# insmod plip.o io=0x288 irq=5




  Le fonctionnement de PLIP est contrl par deux temporisations de
  dpassement de temps, dont les valeurs par dfaut devraient convenir
  la plupart du temps. Vous devrez peut-tre les augmenter si vous avez
  un ordinateur particulirement lent, auquel cas les valeurs devant
  tre augmentes se trouvent sur l'aauuttrree ordinateur. Il existe un
  programme appel _p_l_i_p_c_o_n_f_i_g qui permet d'effectuer ces rglages sans
  recompiler le noyau. Il est fourni avec de nombreuses distributions
  Linux.

  Pour configurer une interface _p_l_i_p, vous devez invoquer les commandes
  suivantes (ou les _a_j_o_u_t_e_r  vos scripts d'initialisation) :


        root# /sbin/ifconfig plip1 localplip pointopoint remoteplip
        root# /sbin/route add remoteplip plip1





  Dans ce cas, le port utilis est celui qui a l'adresse 0x378 ;
  _l_o_c_a_l_p_l_i_p et _r_e_m_o_t_e_p_l_i_p sont les adresses IP utilises sur le cble
  PLIP. Je les mets personnellement dans la base de donnes /etc/host :


        # entres plip
        192.168.3.1 localplip
        192.168.3.2 remoteplip






  Le paramtre _p_o_i_n_t_o_p_o_i_n_t a la mme signification que pour  SLIP,
  c'est--dire qu'il spcifie l'adresse de la machine  l'autre bout de
  la liaison.

  Dans la plupart des cas vous pouvez traiter l'interface _P_L_I_P comme si
  elle tait une interface _S_L_I_P, sauf que ni _d_i_p ni _s_l_a_t_t_a_c_h ne doivent,
  ou ne peuvent, tre utiliss.

  Plus d'information sur PLIP peut tre obtenu avec le document ``PLIP-
  mini-HOWTO''.


  77..33..  PPLLIIPP ppoouurr LLiinnuuxx22..22

  Durant le dveloppement des versions 2.1 du noyau, le support
  concernant les ports parallles s'est amlior.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       General setup --->
           [*] Parallel port support
       Network device support --->
           <*> PLIP (parallel port) support




  Le nouveau code concernant PLIP se comporte comme l'ancien ( on
  utilise les mmes commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e comme dans le paragraphe
  prcdent), mais l'initialisation du systme est diffrente en raison
  du support port parallle amlior.

  Le ``premier'' priphrique PLIP est toujours appel ``plip0'',
  premier signifiant celui qui est dtect en premier par le systme,
  comme pour les priphriques Ethernet. Le port parallle utilis de
  fait est l'un de ceux qui sont disponibles, comme indiqu dans
  /proc/parport.  Par exemple, si vous n'avez qu'un seul port parallle,
  vous n'aurez qu'un seul rpertoire appel /proc/parport/0.

  Si votre noyau ne dtecte pas l'IRQ utilise par votre port parallle,
  ``insmod plip'' chouera ; dans ce cas, vous crivez juste le chiffre
  adquat dans /proc/parport/0/irq et vous invoquez de nouveau _i_n_s_m_o_d.

  Une information complte sur la gestion des ports parallles est
  disponible dans le fichier Documentation/parport.txt, qui se trouve
  dans les sources du noyau.


  77..44..  PPPPPP

  Les noms de priphriques PPP sont `ppp0', `ppp1', etc.  Les noms sont
  attribus squentiellement, le premier priphrique tant `0'.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           <*> PPP (point-to-point) support




  La configuration de PPP est discute en dtail dans le PPP-HOWTO <PPP-
  HOWTO.html>.





  77..44..11..  MMaaiinntteennaannccee dd''uunnee ccoonnnneexxiioonn ppeerrmmaanneennttee aavveecc llee rrsseeaauu  ll''aaiiddee
  ddee ppppppdd

  Si vous tes suffisamment fortuns pour avoir une connexion semi-
  permanente avec le net et que vous vouliez que votre machine refasse
  la connexion PPP en cas de dconnexion, alors voici une astuce simple.

  Configurer PPP de sorte qu'il soit dmarr par l'utilisateur root en
  lanant la commande :


       # pppd




  SSooyyeezz cceerrttaaiinnss d'avoir l'option `-detach' dans le fichier
  /etc/ppp/options. Puis, insrez la ligne suivante dans votre fichier
  /etc/inittab, avec les dfinitions des _g_e_t_t_y :


       pd:23:respawn:/usr/sbin/pppd




  Cela permettra au programme _i_n_i_t de dmarrer et de surveiller le pro
  gramme _p_p_p_d , et de le redmarrer automatiquement s'il meurt.



  77..55..  CClliieenntt SSLLIIPP

  Les fichiers de priphriques SLIP sont nomms `sl0', `sl1', etc. Le
  premier configur tant `0' et les autres s'incrmentant au fur et 
  mesure de leur configuration.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
           [*] Network device support
           <*> SLIP (serial line) support
           [ ]  CSLIP compressed headers
           [ ]  Keepalive and linefill
           [ ]  Six bit SLIP encapsulation




  SLIP (Serial Line Internet Protocol) vous permet d'utiliser TCP/IP
  avec une ligne srie, ce peut tre un tlphone et un modem, ou tout
  autre ligne ddie.  Bien sr pour utiliser SLIP vous devez avoir
  accs  un _s_e_r_v_e_u_r _S_L_I_P dans votre entourage.  Beaucoup d'universits
  et de socits fournissent des accs SLIP de par le monde.

  SLIP utilise les ports sries de votre machine pour transporter les
  datagrammes IP. Pour cela il doit prendre le contrle du priphrique
  srie. Les noms de priphriques SLIP sont _s_l_0, _s_l_1, etc. Comment
  ceux-ci correspondent avec vos priphriques srie ? Le code rseau
  utilise ce que l'on nomme un appel _i_o_c_t_l (i/o control) pour
  transformer les priphriques srie en priphriques SLIP. Il y a deux
  programmes qui peuvent faire cela, ce sont _d_i_p et _s_l_a_t_t_a_c_h.



  77..55..11..  ddiipp

  _d_i_p (Dialup IP) est un programme lgant capable de rgler la vitesse
  du dispositif srie, de demander  votre modem d'appeler l'autre
  extrmit de la ligne, de vous connecter automatiquement au serveur
  distant, de chercher des messages qui vous ont t envoys par le
  serveur et d'en extraire des informations telles que votre adresse IP
  et de faire le _i_o_c_t_l ncessaire pour basculer votre port srie en mode
  SLIP.  _d_i_p est trs flexible quant  l'utilisation de scripts et grce
   ceci vous pouvez automatiser vos procdures de connexion.

  On peut le trouver sur : sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/system/Network/serial/dip/dip337o-
  uri.tgz>.

  Pour l'installer faites :


       user% tar xvfz dip337o-uri.tgz
       user% cd dip-3.3.7o
       user% vi Makefile
       root# make install





  Le fichier Makefile suppose l'existence d'un groupe nomm _u_u_c_p, mais
  vous pouvez le changer en _d_i_p ou _S_L_I_P, selon votre configuration.


  77..55..22..  ssllaattttaacchh

  _s_l_a_t_t_a_c_h au contraire de _d_i_p est un programme trs simple, trs facile
   utiliser, mais qui n'a pas la sophistication de _d_i_p.  Il n'a pas la
  possiblit d'accepter des scripts, tout ce qu'il fait tant de
  configurer votre priphrique srie en priphrique SLIP. Il suppose
  que vous avez toutes les informations ncessaires et que la liaison
  srie est tablie avant de l'invoquer.  _s_l_a_t_t_a_c_h est idal quand vous
  avez une liaison permanente avec votre serveur, comme un cble
  physique ou une ligne ddie.


  77..55..33..  QQuuaanndd uuttiilliisseerr qquuooii ??

  Vous devriez utiliser _d_i_p lorsque votre liaison vers la machine qui
  est votre serveur SLIP est un modem, ou tout autre lien intermittent.
  Vous devriez utiliser _s_l_a_t_t_a_c_h quand vous avez une ligne ddie,
  peut-tre un cble, entre votre machine et le serveur et qu'il n'y a
  pas d'action spciale ncessaire pour garder la ligne en activit.
  Voir la section `Connexion SLIP permanente' pour plus de dtails.

  Configurer SLIP est analogue  la configuration d'une interface
  Ethernet (voir la section `Configurer un priphrique Ethernet' ci-
  dessus).  Cependant, il existe quelques diffrences.

  Tout d'abord, les liens SLIP ne sont pas des rseaux Ethernet en ce
  sens qu'il n'y a que deux htes sur le rseau, un  chaque extrmit
  de la liaison.  la diffrence de l'Ethernet qui est disponible ds
  que vous tes cbl, avec SLIP, en fonction du type de lien que vous
  avez, vous serez amen  initialiser votre connexion rseau d'une
  manire spciale.

  Si vous utilisez _d_i_p, alors cela ne sera pas fait au moment du
  dmarrage de la machine, mais plus tard, quand vous serez prt 
  utiliser la liaison.  Il est possible d'automatiser la procdure. Si
  vous utilisez _s_l_a_t_t_a_c_h vous voudrez probablement ajouter une section
  dans votre fichier _r_c_._i_n_e_t_1.  Ceci sera dcrit bientt.

  Il y a deux types principaux de serveurs SLIP : serveurs avec
  adressage IP dynamique et serveurs avec adressage IP statique. Presque
  tous les serveurs SLIP vous demanderont  la connexion d'utiliser un
  nom d'utilisateur et un mot de passe quand vous composez le numro.
  _d_i_p peut prendre en charge la connexion automatiquement.


  77..55..44..  eett DDIIPP SSeerrvveeuurr SSLLIIPP ssttaattiiqquuee aavveecc uunnee lliiggnnee ttllpphhoonniiqquuee

  Le serveur SLIP statique est celui qui vous fournit une adresse IP qui
  reste exclusivement la vtre.  chaque fois que vous vous connectez 
  ce serveur, vous configurez votre port SLIP avec cette adresse. Le
  serveur SLIP statique rpond  votre appel par modem, vous demande
  probablement un nom d'utilisateur et un mot de passe, et ensuite
  dirige tous les datagrammes destins  votre adresse au travers de
  cette connexion. Si vous avez un serveur statique, alors vous mettez
  des entres pour votre nom d'hte et votre adresse IP (puisque vous
  savez ce qu'elle sera) dans votre fichier /etc/hosts. Vous devez aussi
  configurer d'autres fichiers comme : rc.inet2, host.conf, resolv.conf,
  /etc/HOSTNAME et rc.local. N'oubliez pas qu'en configurant rc.inet1,
  vous n'avez pas besoin d'ajouter de commandes spciales pendant la
  connexion SLIP puisque c'est _d_i_p qui fait tout le dur labeur  votre
  place en configurant votre interface. Vous avez besoin de donner  _d_i_p
  les informations adquates et il configure l'interface pour vous aprs
  avoir demand au modem d'tablir l'appel et de vous connecter au
  serveur.

  Si votre serveur SLIP fonctionne comme cela alors vous pouvez
  directement aller  la section `Utiliser Dip' pour apprendre 
  configurer _d_i_p convenablement.


  77..55..55..  SSeerrvveeuurr SSLLIIPP ddyynnaammiiqquuee aavveecc uunnee lliiggnnee ttllpphhoonniiqquuee eett DDIIPP

  Le serveur SLIP _d_y_n_a_m_i_q_u_e vous alloue une adresse IP de manire
  alatoire,  partir d'un groupe d'adresses,  chaque fois que vous
  vous connectez. Cela signifie qu'il n'y a aucune garantie d'avoir la
  mme adresse  chaque fois, et que celle-ci peut tre utilise par
  quelqu'un d'autre aprs la dconnexion. L'administrateur rseau qui a
  configur le serveur SLIP a assign un groupe d'adresses que le
  serveur SLIP peut utiliser quand il reoit un appel entrant. Il prend
  alors la premire adresse inutilise, guide l'appelant au travers du
  processus de connexion et envoie un message de bienvenue contenant
  l'adresse IP qu'il a alloue et continue d'utiliser cette adresse tout
  le temps de l'appel.

  Configurer ce type de serveur revient  configurer un serveur
  statique, sauf que vous devez ajouter une tape pour obtenir l'adresse
  IP alloue par le serveur puis configurer le priphrique SLIP avec
  celle-ci.

  Encore une fois, _d_i_p fait le sale boulot et les nouvelles versions
  sont suffisamment lgantes pour non seulement tablir la connexion,
  mais aussi pour lire l'adresse IP inscrite dans le message de
  bienvenue et la stocker de telle sorte que vous puissiez configurer
  votre priphrique SLIP avec.

  Si votre serveur SLIP fonctionne ainsi, alors vous pouvez aller  la
  section `Utiliser DIP' pour savoir comment configurer _d_i_p de manire
  adquate.



  77..55..66..  UUttiilliisseerr DDIIPP

  Comme expliqu plus haut, _d_i_p est un programme puissant qui simplifie
  et automatise le processus de composition d'un numro vers un serveur
  SLIP, se connecte dessus, dmarre la connexion et configure les
  priphriques SLIP  l'aide des commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e
  appropries.

  Essentiellement, pour utiliser _d_i_p vous crivez un `script dip' qui
  est tout simplement une liste de commandes que _d_i_p comprend et qui lui
  dit comment raliser chacune des actions que vous voulez qu'il fasse.
  Voyez le fichier sample.dip fourni avec _d_i_p pour avoir une ide de la
  manire dont il travaille.  _d_i_p est vraiment un programme puissant,
  avec beaucoup d'options.  Au lieu de regarder chacune d'elles, il vaut
  mieux jeter un coup d'oeil dans la page de manuel, le fichier README
  et les fichiers d'exemple qui sont fournis avec votre version de _d_i_p.

  Vous pouvez noter que le script sample.dip suppose que vous utilisez
  un serveur SLIP statique, aussi vous connaissez votre adresse IP 
  l'avance. Pour les serveurs SLIP dynamiques, les nouvelles versions de
  _d_i_p incluent une commande que vous pouvez utiliser pour lire et
  configurer automatiquement votre priphrique SLIP avec l'adresse IP
  donne par le serveur dynamique. L'exemple suivant est une version
  modifie du fichier sample.dip fourni avec _d_i_p_3_3_7_j_-_u_r_i_._t_g_z et qui est
  probablement un bon point de dpart pour vous. Vous pouvez le
  sauvegarder sous le nom de /etc/dipscript et l'diter pour l'adapter 
  votre configuration :







































  #
  # sample.dip    Programme de support pour connexion IP.
  #
  #       Ce programme (devrait montrer) montre comment utiliser DIP
  #       Il devrait fonctionner avec des serveurs dynamiques de type Annex,
  #       et si vous utilsez un serveur avec adresse statique utilsez alors le
  #       fichier sample.dip livr avec le paquetage dip337-uri.tgz.
  #
  #
  # Version:      @(#)sample.dip  1.40    07/20/93
  #
  # Auteur:       Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  #

  main:
  # Aprs, postionner l'adresse et le nom de l'hte distant.
  # Ma machine s'appelle 'xs4all.hacktic.nl' (== 193.78.33.42)
  get $remote xs4all.hacktic.nl
  # Positionne le masque de rseau sur sl0  255.255.255.0
  netmask 255.255.255.0
  # Rgle le port srie et la vitesse.
  port cua02
  speed 38400

  # Reset le modem et la ligne de terminal.
  # Cela semble poser problme  certains!
  reset

  # Notez! Valeurs "standards" prdfinies de "errlevel":
  #  0 - OK
  #  1 - CONNECT
  #  2 - ERROR
  #
  # Vous pouvez les changer en faisant un grep dans *.c avec "addchat()"...

  # On se prpare pour numroter.
  send ATQ0V1E1X4\r
  wait OK 2
  if $errlvl != 0 goto modem_trouble
  dial 555-1234567
  if $errlvl != 1 goto modem_trouble

  # Nous sommes connects. Nous nous enregistrons sur le systme.
  login:
  sleep 2
  wait ogin: 20
  if $errlvl != 0 goto login_trouble
  send MYLOGIN\n
  wait ord: 20
  if $errlvl != 0 goto password_error
  send MYPASSWD\n
  loggedin:

  # Maintenant nous sommes enregistrs.
  wait SOMEPROMPT 30
  if $errlvl != 0 goto prompt_error

  # Demande au serveur de basculer en mode SLIP
  send SLIP\n
  wait SLIP 30
  if $errlvl != 0 goto prompt_error

  # Obtenir et ajuster notre adresse IP grce au serveur.
  # Ici nous supposons qu'aprs le basculement du serveur en mode SLIP, celui-ci
  # nous donne l'adresse IP
  #   mode that it prints your IP address
  get $locip remote 30
  if $errlvl != 0 goto prompt_error

  # rglage des paramtres SLIP.
  get $mtu 296
  # S'assurer que "route add -net default xs4all.hacktic.nl" sera fait
  default

  # Dire bonjour, et en avant!
  done:
  print CONNECTED $locip ---> $rmtip
  mode CSLIP
  goto exit

  prompt_error:
  print TIME-OUT waiting for sliplogin to fire up...
  goto error

  login_trouble:
  print Trouble waiting for the Login: prompt...
  goto error

  password:error:
  print Trouble waiting for the Password: prompt...
  goto error

  modem_trouble:
  print Trouble occurred with the modem...
  error:
  print CONNECT FAILED to $remote
  quit

  exit:
  exit





  L'exemple prcdent suppose que vous appeliez un serveur SLIP
  _d_y_n_a_m_i_q_u_e ; si vous appelez un serveur SLIP _s_t_a_t_i_q_u_e,  alors le
  fichier sample.dip founi avec _d_i_p_3_3_7_j_-_u_r_i_._t_g_z devrait vous convenir.

  Quand on donne  _d_i_p la commande _g_e_t _$_l_o_c_a_l, il cherche dans le texte
  venant de l'extrmit de la ligne une chane de caractres ressemblant
   une adresse IP, c'est  dire des ensembles de nombres spars par
  des caractres `.'. Cette modification fut mise en place plus
  spcialement pour les serveurs SLIP _d_y_n_a_m_i_q_u_e_s, afin que le processus
  de lecture de l'adresse IP fournie par le serveur soit automatis.

  L'exemple ci-dessus cre automatiquement une route par dfaut via
  votre liaison SLIP, et si ce n'est pas ce que vous voulez, car vous
  avez une connexion Ethernet qui devrait tre votre route par dfaut,
  alors enlevez la commande _d_e_f_a_u_l_t du script.  Aprs que le script ait
  fini de tourner, tapez la commande _i_f_c_o_n_f_i_g, et vous verrez que vous
  avez un priphrique _s_l_0. C'est votre priphrique SLIP. Si le besoin
  s'en fait sentir, vous pouvez modifier manuellement sa configuration,
  aprs que la commande _d_i_p soit finie, en utilisant les commandes
  _i_f_c_o_n_f_i_g et _r_o_u_t_e.

  Notez que _d_i_p vous permet de choisir parmi diffrents protocoles en
  utilisant la commande mode, l'exemple le plus courant tant _c_S_L_I_P pour
  utiliser SLIP avec compression.  Notez encore que les deux extrmits
  de la liaison doivent tre d'accord, aussi assurez-vous que ce que
  vous avez choisi est en accord avec les rglages du serveur.

  L'exemple montr ci-dessus est plutt robuste et devrait faire face 
  la plupart des erreurs. Rfrez-vous  la page de manuel de _d_i_p pour
  plus d'informations.  Naturellement, vous pouvez, par exemple,
  modifier le script pour raliser des choses comme recomposer le numro
  vers le serveur si la connexion n'a pas t faite au bout d'un certain
  temps, ou mme essayer une srie de serveurs si vous avez accs  plus
  d'un d'entre eux.


  77..55..77..  CCoonnnneexxiioonn ppeerrmmaanneennttee SSLLIIPP uuttiilliissaanntt uunnee lliiggnnee eett ssllaattttaacchh

  Si vous avez deux machines relies par un cble, ou si vous tes
  suffisamment riche pour avoir une ligne ddie, ou un autre type de
  connexion permanente entre votre machine et une autre, alors vous
  n'avez pas besoin de vous casser la tte avec _d_i_p pour rgler votre
  liaison srie.  _s_l_a_t_t_a_c_h est un utilitaire trs simple  utiliser et
  vous permet d'avoir les fonctionnalits juste ncessaires pour
  configurer votre connexion.

  Puisque votre connexion est permanente, vous ajoutez quelques
  commandes dans votre fichier rc.inet1. Tout ce dont vous avez besoin
  pour une connexion permanente est de vous assurer que vous avez
  configur votre priphrique srie  la bonne vitesse et basculer
  votre priphrique srie en mode SLIP.  _s_l_a_t_t_a_c_h vous permet de faire
  ceci avec une seule commande.  Ajoutez ce qui suit  votre fichier
  rc.inet1 :



       #
       # Attache une connexion SLIP statique sur une ligne ddie
       #
       #  configure /dev/cua0  la vitesse de 19.2kbps et cslip
       /sbin/slattach -p cslip -s 19200 /dev/cua0 &
       /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
       #
       # Fin de SLIP statique.





  O :

     IIPPAA..IIPPAA..IIPPAA..IIPPAA
        reprsente votre adresse IP.

     IIPPRR..IIPPRR..IIPPRR..IIPPRR
        reprsente l'adresse IP de l'hte distant.


  _s_l_a_t_t_a_c_h alloue le premier priphrique SLIP disponible au
  priphrique srie spcifi.  _s_l_a_t_t_a_c_h dmarre avec _s_l_0. Par
  consquent la premire commande _s_l_a_t_t_a_c_h relie le priphrique _s_l_0 au
  priphrique spcif, puis _s_l_1 la fois suivante, etc.

  _s_l_a_t_t_a_c_h vous permet de configurer un certain nombre de protocoles
  grce  l'argument -p. Dans votre cas vous utilisez soit _S_L_I_P soit
  _c_S_L_I_P suivant que vous voulez utiliser la compression ou non.  Note :
  les deux extrmits doivent tre d'accord sur l'utilisation de la
  compression.





  77..66..  SSeerrvveeuurr SSLLIIPP

  Vous avez peut-tre une machine connecte au rseau et vous aimeriez
  que d'autres personnes puissent s'y connecter pour y chercher des
  services de rseau, alors vous devez configurer votre machine comme
  serveur. Si vous voulez utiliser SLIP comme protocole de ligne srie,
  vous avez trois possiblits pour configurer votre machine Linux comme
  serveur SLIP. Ma prfrence est la premire prsente, _s_l_i_p_l_o_g_i_n, car
  elle semble la plus facile  configurer et  comprendre, mais je
  prsenterai un rsum pour chacune, ainsi vous pourrez dcider par
  vous-mme.


  77..66..11..  SSeerrvveeuurr SSLLIIPP uuttiilliissaanntt sslliippllooggiinn

  _s_l_i_p_l_o_g_i_n est un programme que vous pouvez utiliser  la place du
  shell normal de connexion pour les utilisateurs SLIP, et qui convertit
  la ligne terminal en ligne SLIP. Il vous permet de configurer votre
  machine Linux soit en _s_e_r_v_e_u_r _ _a_d_r_e_s_s_e _s_t_a_t_i_q_u_e (les utilisateurs
  obtiennent toujours la mme adresse  chaque connexion), soit en
  _s_e_r_v_e_u_r _ _a_d_r_e_s_s_e _d_y_n_a_m_i_q_u_e (les utilisateurs obtiennent une adresse
  qui n'est pas forcment la mme que lors de la connexion prcdente).

  L'appelant se connecte comme sur un terminal standard, en donnant son
  nom d'utilisateur et son mot de passe, mais au lieu d'avoir une invite
  de shell aprs la connexion, _s_l_i_p_l_o_g_i_n est excut et cherche dans son
  fichier de configuration une entre dont le nom correspond  celui de
  l'appelant. S'il en dtecte une, il configure la ligne avec 8 bits de
  donnes, et utilise un appel _i_o_c_t_l pour basculer celle-ci en ligne
  SLIP.  Quand ce processus est fini, la dernire tape de la
  configuration prend place, _s_l_i_p_l_o_g_i_n invoquant un script qui configure
  l'interface SLIP avec l'adresse IP adquate, ainsi que le masque de
  rseau et positionne le routage appropri. Ce script est appel
  habituellement /etc/slip.login, mais tout comme _g_e_t_t_y, si certains
  appelants ncessitent une initialisation spciale, alors vous pouvez
  crer des scripts de configuration appels /etc/slip.login.loginname
  qui seront utiliss  la place du script par dfaut.

  Il y a quelques fichiers que vous devez configurer pour que _s_l_i_p_l_o_g_i_n
  travaille pour vous. Je dcrirai comment et o obtenir les logiciels
  et comment chacun est configur. Ces fichiers sont :


    /etc/passwd, pour l'acceptation des utilisateurs entrants;

    /etc/slip.hosts, qui contient une information spcifique de chaque
     utilisateur entrant;

    /etc/slip.login, qui s'occupe de la configuration du routage;

    /etc/slip.tty, requis uniquement si vous configurez votre serveur
     avec _a_l_l_o_c_a_t_i_o_n _d_'_a_d_r_e_s_s_e _d_y_n_a_m_i_q_u_e : il contient une table des
     adresses  allouer.

    /etc/slip.logout, qui contient les commandes de `nettoyage' aprs
     une dconnexion volontaire ou intempestive.



  77..66..11..11..  OO oobbtteenniirr sslliippllooggiinn

  Votre distribution contient peut-tre dj le paquetage; si ce n'est
  pas le cas alors _s_l_i_p_l_o_g_i_n peut tre obtenu sur sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/linux/system/Network/serial/sliplogin-2.1.1.tar.gz>.
  Le fichier tar contient  la fois les sources, les binaires
  prcompils et une page de manuel.
  Pour s'assurer que seuls les utilisateurs autoriss pourront faire
  tourner le programme _s_l_i_p_l_o_g_i_n, vous devez ajouter une entre dans
  votre fichier /etc/group similaire  la suivante :



        ..
       slip::13:radio,fred
        ..





  Lorsque vous installez le paquetage _s_l_i_p_l_o_g_i_n, Makefile change le
  groupe du programme _s_l_i_p_l_o_g_i_n en slip, et cela signifie que seuls les
  utilisateurs qui appartiennent  ce groupe pourront l'excuter.
  L'exemple donn ci-dessus ne permet qu'aux utilisateurs radio et fred
  de pouvoir faire tourner le programme _s_l_i_p_l_o_g_i_n.

  Pour installer les binaires dans le rpertoire /sbin et les pages de
  manuel dans la section 8, faites :



       root# cd /usr/src
       root# gzip -dc .../sliplogin-2.1.1.tar.gz | tar xvf -
       root# cd sliplogin-2.1.1
       root# <..editez le Makefile si vous n'utilisez pas les shadow passwords..>
       root# make install





  Si vous voulez recompiler les binaires avant de les installer, faites
  make clean avant de faire make install. Si vous voulez installer les
  binaires autre part, vous devez diter le fichier Makefile et le modi
  fier en consquence.

  Lisez les fichiers README qui sont inclus dans le paquetage pour plus
  d'informations.


  77..66..11..22..  CCoonnffiigguurreerr //eettcc//ppaasssswwdd  ppoouurr uuttiilliisseerr SSLLIIPP

  Normalement vous devez crer des noms d'utilisateurs spciaux, pour
  ceux qui appellent avec SLIP, dans votre fichier /etc/passwd.  Une
  convention souvent suivie est d'utiliser le _n_o_m _d_'_u_t_i_l_i_s_a_t_e_u_r de
  l'appelant prfixe avec la lettre capitale `S'.  Ainsi, par exemple,
  si l'appelant s'appelle radio alors vous pouvez crer une entre dans
  le fichier /etc/passwd ressemblant  ceci :



       Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin





  Le nom du compte n'a pas rellement d'importance, du moment qu'il ait
  une signification pour vous.

  Note : l'appelant n'a pas besoin de rpertoire home spcial car il
  n'utilisera pas de shell sur la machine, ds lors /tmp est un bon
  choix. Notez bien que _s_l_i_p_l_o_g_i_n est utilis  la place du shell de
  connexion normal.


  77..66..11..33..  CCoonnffiigguurreerr //eettcc//sslliipp..hhoossttss

  Le fichier /etc/slip.hosts  est le fichier o _s_l_i_p_l_o_g_i_n cherche les
  entres correspondant au nom de connexion pour obtenir les dtails de
  configuration. C'est le fichier o sont indiqus l'adresse IP et le
  masque de rseau qui seront assigns  l'appelant et configurs pour
  leur usage. Des exemples d'entres pour deux utilisateurs, une
  statique pour  radio et l'autre dynamique pour albert ressemblent 
  ceci :



       #
       Sradio   44.136.8.99   44.136.8.100  255.255.255.0  normal      -1
       Salbert  44.136.8.99   DYNAMIC       255.255.255.0  compressed  60
       #





  Les entres du fichier /etc/slip.hosts sont :


  1. Le nom de connexion de l'appelant.

  2. L'adesse IP de la machine serveur, donc de la machine contenant ce
     fichier.

  3. L'adresse IP qui sera attribue  l'appelant. Si le champ vaut
     DYNAMIC alors l'adresse IP sera alloue suivant les informations
     contenues dans le fichier /etc/slip.tty dcrit plus loin. NNoottee ::
     vous devez utiliser au moins la version 1.3 de sliplogin pour que
     cela fonctionne.

  4. Le masque de rseau assign  la machine appelante, en notation
     dcimale, par exemple 255.255.255.0 pour un masque de rseau de
     classe C.

  5. Un rglage du mode SLIP qui active/dsactive la compression. Les
     valeurs autorises sont "normal" et "compressed".

  6. Un paramtre de dlai qui spcifie combien de temps la ligne peut
     rester inactive (aucun datagramme reu) avant une dconnexion
     automatique. Une valeur ngative dsactive cette possiblit.

  7. arguments optionnels.


     Note : Vous pouvez mettre soit les noms d'htes soit les adresses
     IP en notation dcimale pointe pour les champs 2 et3.  Si vous
     utilisez les noms d'htes, alors ces htes doivent tre rsolubles,
     c'est  dire que votre machine est capable de dterminer une
     adresse IP pour ces noms d'htes, autrement le script chouera
     pendant l'appel. Vous pouvez le tester en faisant telnet vers un
     nom d'hte : si vous obtenez le message `_T_r_y_i_n_g _n_n_n_._n_n_n_._n_n_n_._._.'
     alors votre machine est capable de trouver une adresse ip pour ce
     nom d'hte. Si vous obtenez le message `_U_n_k_n_o_w_n _h_o_s_t', alors il
     n'en a pas. Dans ce cas essayez d'utiliser l'adress IP en notation
     dcimale pointe ; ou bien voyez du ct de votre configuration de
     solveur de noms (voir la section Rsolution de noms).

  Les modes les plus courants de SLIP sont :

     nnoorrmmaall
        mode SLIP normal non compress.

     ccoommpprreesssseedd
        mode avec compression van Jacobsen des en-ttes (cSLIP)


  Bien sr ils sont mutuellement exclusifs, vous devez utiliser l'un ou
  l'autre. Pour plus d'informations sur les options disponibles, voir
  les pages de manuels.


  77..66..11..44..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..llooggiinn ..

  Aprs que _s_l_i_p_l_o_g_i_n ait explor le fichier /etc/slip.hosts et ait
  trouv une entre qui convient, il essaye d'excuter le fichier
  /etc/slip.login pour effectivement configurer l'interface SLIP avec
  son adresse IP et son masque de rseau.

  L'exemple de fichier /etc/slip.login fourni avec le paquetage
  _s_l_i_p_l_o_g_i_n ressemble  ceci :



       #!/bin/sh -
       #
       #       @(#)slip.login  5.1 (Berkeley) 7/1/90
       #
       # fichier gnrique de connexion pour une ligne SLIP. Invoqu par sliplogin
       # avec les paramtres:
       #     $1       $2       $3    $4, $5, $6 ...
       # unit SLIP vitesse    pid   arguments tirs de slip.host
       #
       /sbin/ifconfig $1 $5 pointopoint $6 mtu 1500 -trailers up
       /sbin/route add $6
       arp -s $6 <hw_addr> pub
       exit 0
       #





  Notez que ce script utilise seulement les commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e
  pour configurer le priphrique SLIP avec sa propre adresse IP,
  l'adresse IP de l'hte distant , le masque de rseau puis cre une
  route vers l'adresse distante via le priphrique SLIP. C'est--dire
  la mme chose que si vous utilisiez la commande _s_l_a_t_t_a_c_h.

  Notez aussi l'utilisation de _P_r_o_x_y _A_R_P pour s'assurer que les htes
  placs sur le mme segment thernet que la machine serveur sauront
  comment atteindre l'hte qui s'est connect.  Le champ <hw_addr> doit
  tre l'adresse matrielle de la carte Ethernet de la machine. Si votre
  machine serveur n'est pas sur un rseau Ethernet, vous pouvez ignorer
  cette ligne.


  77..66..11..55..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..llooggoouutt

  Quand la connexion s'est arrte, assurez-vous que le priphrique
  srie soit revenu  son tat normal de telle sorte que les appelants
  suivants puissent se connecter correctement. Ceci est accompli en
  utilisant le fichier /etc/slip.logout. Il est de format trs simple et
  est appel avec le mme argument que le fichier /etc/slip.login.
       #!/bin/sh -
       #
       #               slip.logout
       #
       /sbin/ifconfig $1 down
       arp -d $6
       exit 0
       #





  Tout ce qu'il fait est de `mettre  zro' l'interface qui supprimera
  la route prcdemment cre.  Il utilise aussi la commande _a_r_p pour
  supprimer tout arp proxy en place, encore une fois vous n'avez pas
  besoin de la commande _a_r_p dans le script si votre machine serveur ne
  possde pas de port Ethernet.


  77..66..11..66..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..ttttyy

  Si vous utilisez une allocation d'adresse ip dynamique (tous les htes
  configurs avec le mot-cl DYNAMIC dans le fichier /etc/slip.hosts)
  alors vous devez configurer le fichier /etc/slip.tty pour lister les
  adresses qui seront assignes aux ports. Vous n'aurez besoin de ce
  fichier que si vous voulez que votre serveur alloue des adresses aux
  utilisateurs de manire dynamique.

  Ce fichier est un tableau qui liste les priphriques _t_t_y supportant
  les connexions SLIP entrantes et l'adresse ip qui sera assigne aux
  utilisateurs se connectant  ceux-ci.

  Son format est le suivant :


       # slip.tty    mappage d'adresses tty -> IP pour SLIP dynamique
       # format: /dev/tty?? xxx.xxx.xxx.xxx
       #
       /dev/ttyS0      192.168.0.100
       /dev/ttyS1      192.168.0.101
       #





  Ce que dit ce tableau est que les appelants qui se connectent sur le
  port /dev/ttyS0 et dont le champ adresse dans le fichier
  /etc/slip.hosts vaut sur DYNAMIC auront l'adresse 192.168.0.100.

  De cette manire vous n'avez besoin d'allouer qu'une seule adresse par
  port pour tous les utilisateurs n'ayant pas besoin d'adresse fixe.
  Ceci vous permet d'avoir le nombre minimum d'adresses ncessaires pour
  viter du gaspillage.


  77..66..22..  SSeerrvveeuurr SSlliipp uuttiilliissaanntt ddiipp

  Tout d'abord laissez-moi dire que certaines informations ci-dessous
  proviennent des pages de manuel de _d_i_p, o la manire de faire tourner
  Linux comme serveur SLIP est brivement dcrite. Faites attention
  aussi que ce qui suit est fond sur le paquetage _d_i_p_3_3_7_o_-_u_r_i_._t_g_z et ne
  s'applique vraisemblablement pas  d'autres versions de _d_i_p.

  _d_i_p possde un mode de traitement des donnes d'entre qui permet de
  localiser automatiquement un utilisateur entrant et qui configure la
  ligne srie comme lien SLIP suivant les informations trouves dans le
  fichier /etc/diphosts.  Ce mode est activ en invoquant _d_i_p avec
  _d_i_p_l_o_g_i_n. Voil donc comment utiliser _d_i_p comme serveur SLIP, en
  crant des comptes spciaux o _d_i_p_l_o_g_i_n est utilis comme shell de
  connexion.

  La premire chose  faire est de crer un lien symbolique comme suit :



       # ln -sf /usr/sbin/dip /usr/sbin/diplogin





  Ensuite vous devez ajouter des entres  la fois dans vos fichiers
  /etc/passwd et /etc/diphosts. Les entres que vous devez y mettre sont
  formates comme suit :

  Pour configurer Linux comme serveur SLIP avec _d_i_p, vous devez crer
  quelques comptes SLIP spciaux pour les utilisateurs, o _d_i_p (en mode
  d'entre) est utilis comme shell de connexion. Une convention
  suggre est d'avoir tous les comptes SLIP commenant avec la lettre
  `S' majuscule, par exemple `Sfredm'.

  Un exemple d'entre dans /etc/passwd pour un utilisateur SLIP ressem
  ble  ceci :



       Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
       ^^         ^^        ^^  ^^   ^^   ^^   ^^
       |          |         |   |    |    |    \__ diplogin comme shell de connexion
       |          |         |   |    |    \_______ Rpertoire personnel
       |          |         |   |    \____________ Nom complet d'utilisateur
       |          |         |   \_________________ GID
       |          |         \_____________________ UID
       |          \_______________________________ Mot de passe chiffr
       \__________________________________________ Nom de connexion Slip





  Aprs la connexion de l'utilisateur, le programme _l_o_g_i_n (s'il trouve
  et accepte l'utilisateur) excute la commande _d_i_p_l_o_g_i_n. _d_i_p, lorsqu'il
  est invoqu en tant que _d_i_p_l_o_g_i_n sait qu'il sera automatiquement
  utilis comme shell de connexion.  Quand il est dmarr comme _d_i_p_l_o_g_i_n
  la premire chose qu'il fait est d'utiliser l'appel de la fonction
  _g_e_t_u_i_d_(_) pour obtenir l'identificateur de l'utilisateur appelant. Il
  regarde ensuite dans le fichier /etc/diphosts pour trouver la premire
  entre qui corresponde soit  l'utilisateur soit au priphrique _t_t_y
  o l'appel est entr et se configure lui-mme de manire approprie.
  Par un choix judicieux : soit de donner  l'utilisateur une entre
  dans le fichier diphosts, soit de laisser  l'utilisateur la
  configuration par dfaut, vous pouvez construire votre serveur de
  telle manire que vous puissiez faire cohabiter des utilisateurs ayant
  des adresses alloues statiquement ou dynamiquement.

  _d_i_p ajoutera automatiquement une entre `Proxy-ARP' si elle est
  invoque en mode d'entre, aussi vous n'avez pas  vous soucier
  d'ajouter de telles entres manuellement.


  77..66..22..11..  CCoonnffiigguurreerr //eettcc//ddiipphhoossttss

  /etc/diphosts est utilis par _d_i_p pour examiner des configurations
  prtablies concernant des htes loigns. Ceux-ci peuvent tre des
  htes se connectant sur votre machine, ou bien des machines sur
  lesquelles vous vous connectez.

  Le format gnral de /etc/diphosts est :



        ..
       Suwalt::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
       ttyS1::145.71.34.3:145.71.34.2:255.255.255.0:Dynamic ttyS1:CSLIP,296
        ..





  Les champs sont :

  1. nom de connexion : comme retourn par getpwuid(getuid()) ou bien le
     nom de tty.

  2. inutilis : pour compatibilit avec passwd

  3. Adresse distante : adresse IP de l'appelant, soit numrique soit
     nominative

  4. Adresse locale : adresse IP de cette machine, soit numrique soit
     nominative.

  5. Masque de rseau : en notation dcimale pointe

  6. Commentaires : vous y mettez ce que vous voulez.

  7. protocole : Slip, CSlip, etc.

  8. MTU : nombre dcimal


     Un exemple d'entre /etc/net/diphosts pour un hte distant peut
     tre :



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296





  qui spcifie une liaison SLIP avec une adresse distante de 145.71.34.1
  et un MTU de 296, ou :



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006





  qui spcifie une liaison compatible cSLIP avec une adresse distante de
  145.71.34.1 et un MTU de 1006.
  Ds lors, tous les utilisateurs  qui vous permettez d'avoir une
  connexion avec allocation d'adresse IP statique auront une entre dans
  /etc/diphosts. Si vous voulez que des utilisateurs qui appellent sur
  un port particulier aient leur adresse alloue dynamiquement, vous
  devez avoir une entre pour le priphrique tty, mais pas d'entre
  pour l'utilisateur lui-mme. Vous devez vous souvenir de configurer au
  moins une entre pour chaque priphrique tty que vos utilisateurs
  entrants utiliseront pour tre srs qu'une configuration adquate soit
  disponible, indpendamment du modem sur lequel ils se connectent.

  Quand un utilisateur se connecte, il recevra une invite normal de
  login et une demande de mot de passe, pour lesquels il devra entrer
  son identificateur SLIP et son mot de passe. Si tout est correct,
  l'utilisateur ne verra pas de message spcial, il devra juste basculer
  en mode SLIP chez lui et ensuite il sera connect et configur avec
  les paramtres contenus dans le fichier diphosts.


  77..66..33..  SSeerrvveeuurr SSLLIIPP uuttiilliissaanntt ll''eennsseemmbbllee ddSSLLIIPP

  Matt Dillon <dillon@apollo.west.oic.com> a crit un paquetage qui
  permet des liaisons SLIP non seulement entrantes mais aussi sortantes.
  Le paquetage de Matt est une combinaison de petits programmes et de
  scripts qui prennent en charge les connexions  votre place.  Vous
  aurez besoin de _t_c_s_h car au moins l'un des scripts en a besoin. Matt
  fournit une copie binaire de l'utilitaire _e_x_p_e_c_t car il est aussi
  ncessaire pour l'un des scripts.  Il serait prfrable d'avoir une
  certaine exprience de _e_x_p_e_c_t pour que ce paquetage soit utile pour
  vous, mais que cela ne vous dcourage pas.

  Matt a crit une bonne procdure d'installation dans le fichier
  README, aussi je ne me fatiguerai pas  la rpter.

  Vous pouvez rcuprer le paquetage _d_S_L_I_P sur son site d'origine :

  aappoolllloo..wweesstt..ooiicc..ccoomm


       /pub/linux/dillon_src/dSLIP203.tgz





  ou bien sur :

  ssuunnssiittee..uunncc..eedduu


       /pub/Linux/system/Network/serial/dSLIP203.tgz





  Lisez le fichier README et crez les entres /etc/passwd et /etc/group
  aavvaanntt de faire make install.


  88..  AAuuttrreess tteecchhnnoollooggiieess rrsseeaauu

  Les paragraphes suivants traitent de sujets spcifiques concernant des
  technologies lies au rseau. Les informations qui y sont contenues ne
  s'appliquent pas forcment aux autres types de technologies rseau.
  Les sujets sont traits par ordre alphabtique.

  88..11..  AARRCCNNeett

  Les noms de fichier priphriques de ARCNet sont `arc0e', `arc1e',
  `arc2e' ... ou bien `arc0s', `arc1s', `arc2s', etc. La premire carte
  dtecte par le noyau devient `arc0e' ou `arc0s' et les autres sont
  nommes en suivant dans l'ordre de leur dtection.  La lettre finale
  dpend de votre choix : soit un format d'encapsulation de paquets
  Ethernet, soit un format de paquets suivant RFC1051.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
           [*] Network device support
           <*> ARCnet support
           [ ]   Enable arc0e (ARCnet "Ether-Encap" packet format)
           [ ]   Enable arc0s (ARCnet RFC1051 packet format)




  Si vous avez construit convenablement votre noyau pour supporter votre
  carte Ethernet, alors la configuration de la carte est facile.

  Typiquement vous devriez utiliser quelque chose comme ceci :


       root# ifconfig arc0e 192.168.0.1 netmask 255.255.255.0 up
       root# route add -net 192.168.0.0 netmask 255.255.255.0 arc0e




  Merci de vous rfrer aux documents /usr/src/linux/Documentation/net
  working/arcnet.txt et /usr/src/linux/Documentation/networking/arcnet-
  hardware.txt pour d'autres informations.

  Le support ARCNet fut dvelopp par Avery Pennarun,
  apenwarr@foxnet.net.


  88..22..  AApppplleettaallkk (( AAFF__AAPPPPLLEETTAALLKK ))

  Le support Appletalk ne possde pas de noms de priphriques
  spcifiques car il utilise les priphriques rseau existants.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           <*> Appletalk DDP




  Le support Appletalk permet  votre machine Linux de dialoguer avec
  les rseaux Apple.  Son utilisation principale est de pouvoir partager
  des ressources, comme les imprimantes et les disques, entre vos ordi
  nateurs Linux et Apple. Un logiciel supplmentaire est requis, il
  s'appelle _n_e_t_a_t_a_l_k. Wesley Craig netatalk@umich.edu reprsente une
  quipe appele le `Research Systems Unix Group'  l'universit du
  Michigan.  Celle-ci a labor le paquetage _n_e_t_a_t_a_l_k, qui fournit un
  logiciel implmentant la pile protocole Appletalk et quelques utili
  taires.  Soit ce paquetage _n_e_t_a_t_a_l_k vous a t fourni avec votre dis
  tribution Linux, soit vous pouvez le rcuprer par ftp depuis le site
  University of Michigan
  <ftp://terminator.rs.itd.umich.edu/unix/netatalk/>

  Pour construire et installer le paquetage, vous faites :


       user% cd /usr/src
       user% tar xvfz .../netatalk-1.4b2.tar.Z
       - Vous pouvez diter le fichier `Makefile'  ce stade, plus
       prcisment pour changer la valeur de la variable
        DESTDIR qui dfinit l'endroit o les fichiers seront
       installs plus tard.
        Le rpertoire par dfaut, /usr/local/atalk, semble
        trs raisonnable.
       user% make
       - puis, en temps que root :
       root# make install






  88..22..11..  CCoonnffiigguurreerr llee ssuuppppoorrtt AApppplleettaallkk..

  La premire chose  faire pour que tout fonctionne est de vrifier que
  les entres adquates sont prsentes dans le fichier /etc/services.
  Ces entres sont :


       rtmp    1/ddp   # Routing Table Maintenance Protocol
       nbp     2/ddp   # Name Binding Protocol
       echo    4/ddp   # AppleTalk Echo Protocol
       zip     6/ddp   # Zone Information Protocol





  L'tape suivante consiste  crer les fichiers de configuration
  Appletalk dans le rpertoire /usr/local/atalk/etc (ou bien  l'endroit
  o vous avez install le paquetage).

  Le premier fichier  crer est /usr/local/atalk/etc/atalkd.conf.
  Initialement ce fichier ne ncessite qu'une ligne qui indique le
  priphrique supportant le rseau sur lequel sont vos machines Apple :



       eth0





  Le programme dmon Appletalk ajoutera d'autres dtails quand il tourn
  era.


  88..22..22..  EExxppoorrtteerr uunn ssyyssttmmee ddee ffiicchhiieerrss LLiinnuuxx aavveecc AApppplleettaallkk..

  Vous pouvez exporter des systmes de fichiers depuis votre machine
  Linux vers le rseau en sorte qu'une machine Apple puisse les
  partager.

  Pour cela vous devez configurer le fichier
  /usr/local/atalk/etc/AppleVolumes.system. Il y a une autre fichier de
  configuration appel /usr/local/atalk/etc/AppleVolumes.default qui a
  exactement le mme format et qui dcrit quels systmes de fichiers les
  utilisateurs connects pourront recevoir avec des privilges
  d'invits.

  Tous les dtails, qui vous diront comment configurer ces fichiers et
  avec quelles options, peuvent tre trouvs dans la page de manuel de
  _a_f_p_d.

  Un simple exemple :


       /tmp Scratch
       /home/ftp/pub "Public Area"





  Ce qui exportera votre systme de fichiers /tmp comme volume Apple
  Share `Scratch' et votre rpertoire public ftp comme volume AppleShare
  `Public Area'.  Les noms de volume ne sont pas obligatoires, le pro
  gramme dmon pouvant les choisir pour vous, mais a ne cote rien de
  les spcifier quand mme.


  88..22..33..  TTeesstteerr AApppplleettaallkk..

  Pour tester si le programme fonctionne correctement, allez sur une des
  machines Apple, droulez le menu Pomme, cliquez sur AppleShare, et
  votre bote Linux devrait apparatre.


  88..22..44..  AAuuttrreess iinnffoorrmmaattiioonnss

  Pour en savoir plus sur la configuration de Appletalk pour Linux,
  rfrez vous  la page de Anders Brownworth _L_i_n_u_x _N_e_t_a_t_a_l_k_-_H_O_W_T_O sur
  thehamptons.com <http://thehamptons.com/anders/netatalk/>.


  88..33..  AATTMM

  Werner Almesberger <werner.almesberger@lrc.di.epfl.ch> dirige un
  projet en vue de fournir un support Mode de Transfert Asynchrone
  (Asynchronous Transfer Mode) pour Linux.  Les informations sur l'tat
  du projet se trouvent sur : lrcwww.epfl.ch
  <http://lrcwww.epfl.ch/linux-atm/>.


  88..44..  AAXX2255 (( AAFF__AAXX2255 ))

  Les noms de priphriques AX.25 sont `sl0', `sl1', etc. avec les
  noyaux 2.0.* ou `ax0', `ax1', etc. avec les noyaux 2.1.*.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2




  Les protocoles AX25, Netrom et Rose sont couverts par le document
  AX25-HOWTO <AX25-HOWTO.html>.  Ces protocoles sont utiliss par les
  radio-amateurs du monde entier pour l'exprimentation packet-radio.
  L'essentiel du travail d'implmentation de ces protocoles a t
  ralis par Jonathon Naylor, jsn@cs.nott.ac.uk.


  88..55..  DDEECCNNeett

  Le support pour DECNet est en cours d'laboration. Vous devriez le
  voir apparaitre dans l'un des prochains noyaux 2.1.*.


  88..66..  FFDDDDII ((FFiibbeerr DDiissttrriibbuutteedd DDaattaa IInntteerrffaaccee))

  Les noms de priphriques FDDI sont `fddi0', `fddi1', `fddi2' etc. La
  premire carte dtecte par le noyau s'appelle `fddi0' et le reste est
  nomm dans l'ordre de dtection.

  Larry Stefani, lstefani@ultranet.com, a dvelopp un pilote pour les
  cartes Digital Equipment Corporation FDDI EISA et PCI.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Network device support  --->
           [*] FDDI driver support
           [*] Digital DEFEA and DEFPA adapter support





  Lorsque vous avez construit et install votre noyau pour supporter le
  pilote FDDI, la configuration de l'interface FDDI est presque iden
  tique  celle d'une interface Ethernet. Vous devez spcifier le nom de
  l'interface FDDI approprie dans les commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e.


  88..77..  RReellaaiiss ddee ttrraammeess ((FFrraammee RReellaayy))

  Les noms de priphriques de `relais de trames' sont `dlci00',
  `dlci01' etc pour les systmes d'encapsulation DLCI et  `sdla0',
  `sdla1' etc pour les FRAD(s) (Frame Relay Access Device).

  Le relais de trames est une nouvelle technologie rseau conue pour
  s'adapter au trafic de transmission de donnes `par  coups' ou de
  nature intermittente.  Vous vous connectez  un rseau de ce type en
  utilisant un dispositif d'accs par relais de trames (FRAD).  Les
  supports Linux relais de trames supportent IP par-dessus celui-ci
  comme dcrit dans la RFC-1490.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Network device support  --->
           <*> Frame relay DLCI support (EXPERIMENTAL)
           (24)   Max open DLCI
           (8)   Max DLCI per device
           <*>   SDLA (Sangoma S502/S508) support




  Mike McLagan, mike.mclagan@linux.org, a dvelopp le support Frame
  Relay et les outils de configuration.

   l'heure actuelle le seul FRAD support est Sangoma Technologies
  <http://www.sangoma.com/> S502A, S502E et S508.
  Pour configurer les systmes FRAD et DLCI aprs avoir reconstruit
  votre noyau, vous aurez besoin des outils de configuration. Ils sont
  disponibles sur ftp.invlogic.com
  <ftp://ftp.invlogic.com/pub/linux/fr/frad-0.15.tgz>.  Compiler et
  installer les outils est trs facile, mais le manque de fichier
  Makefile au premier niveau oblige  le faire  la main :


       user% tar xvfz .../frad-0.15.tgz
       user% cd frad-0.15
       user% for i in common dlci frad; make -C $i clean; make -C $i; done
       root# mkdir /etc/frad
       root# install -m 644 -o root -g root bin/*.sfm /etc/frad
       root# install -m 700 -o root -g root frad/fradcfg /sbin
       root# install -m 700 -o root -g root dlci/dlcicfg /sbin




  Notez que ces commandes utilisent la syntaxe du shell _s_h, et si vous
  utilisez _c_s_h (comme _t_c_s_h), la boucle _f_o_r sera diffrente.

  Aprs l'installation vous devez crer un fichier /etc/frad/router.conf
  Vous pouvez utiliser cet exemple, qui est une version modifie de l'un
  des fichiers donn en exemple :









































  # /etc/frad/router.conf
  # C'est un modle de configuration pour relais de trames.
  # Tout y est inclus. Les valeurs par dfaut sont fondes sur le code
  # fourni avec les pilotes DOS de la carte Sangoma S502A.
  #
  # Une ligne avec '#' est un commentaire
  # Les blancs sont ignors (vous pouvez utiliser des tabulations aussi).
  # Les sections [] inconnues et les entres inconnues sont ignores.
  #

  [Devices]
  Count=1                 # nombre de priphriques  configurer
  Dev_1=sdla0             # nom d'un priphrique
  #Dev_2=sdla1            # nom d'un priphrique

  # Ce qui est spcifie ici s'applique  tous les priphriques, et peut tre
  # mis  jour pour chaque carte individuelle.
  #
  Access=CPE
  Clock=Internal
  KBaud=64
  Flags=TX
  #
  # MTU=1500              # Taille maximum de l'unit de transfert 4096 par dfaut
  # T391=10               # valeur de T391  5 - 30, 10 par dfaut
  # T392=15               # valeur de T392  5 - 30, 15 par dfaut
  # N391=6                # valeur de N391  1 - 255, 6 par dfaut
  # N392=3                # valeur de N392  1 - 10,  3 par dfaut
  # N393=4                # valeur de N393  1 - 10,  4 par dfaut

  # On spcifie ici les valeurs par dfaut pour toutes les cartes
  # CIRfwd=16             # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511


  #
  #
  # Configurations spcifiques
  #
  #

  #
  #  Sangoma S502E
  #
  [sdla0]
  Type=Sangoma            # Type de priphrique  configurer, actuellement seul
                          # SANGOMA est reconnu
  #
  # Spcifique des types 'Sangoma'
  #
  # cartes S502A, S502E, S508
  Board=S502E
  #
  # Le nom du logiciel de carte en essai pour Sangoma
  # Testware=/usr/src/frad-0.10/bin/sdla_tst.502
  #
  # Le nom du logiciel de carte FR
  # Firmware=/usr/src/frad-0.10/bin/frm_rel.502
  #
  Port=360                # Port pour cette carte particulire
  Mem=C8                  # Adresse de fentre mmoire, A0-EE, dpend de la carte
  IRQ=5                   # numro d'IRQ, pas ncessaire pour S502A
  DLCIs=1                 # Nombre de DLCI attachs  ce priphrique
  DLCI_1=16               # numro du premier DLCI, de 16  991
  # DLCI_2=17
  # DLCI_3=18
  # DLCI_4=19
  # DLCI_5=20
  #
  # Ce qui est spcifie ici s'applique au priphrique seulement,
  # et remplace les valeurs par dfaut
  #
  # Access=CPE            # CPE ou NODE,  CPE par dfaut
  # Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
  # Clock=Internal        # Externe ou Interne, Interne par dfaut
  # Baud=128              # Dbit spcifi du CSU/DSU attach
  # MTU=2048              # Taille maximum de l'unit de transfert 4096 par dfaut
  # T391=10               # valeur de T391   5 - 30, 10 par dfaut
  # T392=15               # valeur de T392   5 - 30, 15 par dfaut
  # N391=6                # valeur de N391   1 - 255, 6 par dfaut
  # N392=3                # valeur de N392   1 - 10,  3 par dfaut
  # N393=4                # valeur de N393   1 - 10,  4 par dfaut

  #
  # Le second periphrique est une autre carte
  #
  # [sdla1]
  # Type=FancyCard        # Type de priphrique  configurer.
  # Board=                # Type de carte Sangoma
  # Key=Value             # valeurs spcifiques pour ce type de priphrique


  #
  # Paramtres de configuration DLCI par dfaut.
  # Peuvent tre crass par des configurations spcifiques
  #
  CIRfwd=64               # CIR forward   1 - 64
  # Bc_fwd=16             # Bc forward    1 - 512
  # Be_fwd=0              # Be forward    0 - 511
  # CIRbak=16             # CIR backward  1 - 64
  # Bc_bak=16             # Bc backward   1 - 512
  # Be_bak=0              # Be backward   0 - 511

  #
  # Configuration DLCI
  # Optionnel. La convention d'appellation est
  # [DLCI_D<devicenum>_<DLCI_Num>]
  #

  [DLCI_D1_16]
  # IP=
  # Net=
  # Mask=
  # Drapeaux dfinis par Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=64
  # Bc_fwd=512
  # Be_fwd=0
  # CIRbak=64
  # Bc_bak=512
  # Be_bak=0

  [DLCI_D2_16]
  # IP=
  # Net=
  # Mask=
  # Drapeaux dfinis par Sangoma: TXIgnore,RXIgnore,BufferFrames
  # DLCIFlags=TXIgnore,RXIgnore,BufferFrames
  # CIRfwd=16
  # Bc_fwd=16
  # Be_fwd=0
  # CIRbak=16
  # Bc_bak=16
  # Be_bak=0





  Lorsque vous avez construit votre fichier /etc/frad/router.conf, la
  seule tape restante est de configurer les priphriques eux-mmes.
  C'est un tout petit peu plus compliqu que la configuration normale
  d'un priphrique rseau; vous devez vous souvenir de monter le
  priphrique FRAD avant les priphriques d'encapsulation DLCI.



       #!/bin/sh
       # Configure le materiel frad et les parametres DLCI
       /sbin/fradcfg /etc/frad/router.conf || exit 1
       /sbin/dlcicfg file /etc/frad/router.conf
       #
       # Montage du dispositif FRAD
       ifconfig sdla0 up
       #
       # Configure les interfaces d'encapsulation DLCI et le routage
       ifconfig dlci00 192.168.10.1 pointopoint 192.168.10.2 up
       route add -net 192.168.10.0 netmask 255.255.255.0 dlci00
       #
       ifconfig dlci01 192.168.11.1 pointopoint 192.168.11.2 up
       route add -net 192.168.11.0 netmask 255.255.255.0 dlci00
       #
       route add default dev dlci00
       #






  88..88..  IIPPXX (( AAFF__IIPPXX ))

  Le protocole IPX est la plupart du temps utilis dans les
  environnements rseaux locaux Novell NetWare(tm).  Linux offre un
  support pour ce protocole, et peut tre configur pour agir comme
  extrmit rseau, ou comme routeur pour les environnements rseaux
  IPX.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] The IPX protocol
           [ ] Full internal IPX network





  Le protocole IPX et le NCPFS sont traits en dtail dans le document
  IPX-HOWTO <IPX-HOWTO.html>.



  88..99..  NNeettRRoomm (( AAFF__NNEETTRROOMM ))

  Les noms de priphriques NetRom sont `nr0', `nr1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2
           [*] Amateur Radio NET/ROM




  Les protocoles AX25, Netrom et Rose sont dcrits dans le document
  AX25-HOWTO <AX25-HOWTO.html>.  Ces protocoles sont utiliss par les
  radio-amateurs dans le monde entier pour l'exprimentation du packet-
  radio.

  L'essentiel du travail d'implmentation a t fait par Jonathon
  Naylor, jsn@cs.not.ac.uk.

  88..1100..  PPrroottooccoollee RRoossee (( AAFF__RROOSSEE ))

  Les noms de priphriques Rose sont `rs0', `rs1', etc.  .  Rose est
  disponible dans la srie des noyaux 2.1.*.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2
           <*> Amateur Radio X.25 PLP (Rose)




  Les protocoles AX25, Netrom et Rose sont expliqus dans le AX25-HOWTO
  <AX25-HOWTO.html>.  Ces protocoles sont utiliss par les oprateurs
  radio-amateur du monde entier pour l'exprimentation du packet-radio.

  L'essentiel du travail d'implmentation de ces protocoles a t
  ralis par Jonathon Naylor, jsn@cs.not.ac.uk.


  88..1111..  SSuuppppoorrtt SSAAMMBBAA -- ``NNeettBBEEUUII'',, ``NNeettBBiiooss''..

  SAMBA est une implmentation du protocole Session Management Block.
  Samba permet aux Systmes Microsoft et autres de monter et d'utiliser
  vos disques et imprimantes.

  SAMBA et sa configuration sont dcrits en dtail dans le SMB-HOWTO
  <SMB-HOWTO.html>.


  88..1122..  SSuuppppoorrtt SSTTRRIIPP ((SSttaarrmmooddee RRaaddiioo IIPP))

  Les noms de priphriques STRIP sont `st0', `st1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :






  Network device support  --->
          [*] Network device support
          ....
          [*] Radio network interfaces
          < > STRIP (Metricom starmode radio IP)





  STRIP est un protocole conu spcialement pour un certain type de
  modems radio Metricom dans le cadre d'un projet de recherche conduit
  par l'Universit de Stanford appel MosquitoNet Project
  <http://mosquitonet.Stanford.EDU/mosquitonet.html>.  Il y a un tas de
  choses intressantes  lire, mme si vous n'tes pas directement con
  cern par le projet.

  Les radios Metricom se connectent sur un port srie et emploient la
  technologie  large bande spectrale et peuvent aller jusqu' 100kbps.
  Des informations sur ceux-ci sont disponibles sur : Le serveur web de
  Metricom <http://www.metricom.com/>.

   l'heure actuelle, les outils rseau habituels ne supportent pas le
  pilote STRIP, vous devez donc tlcharger des outils personnaliss 
  partir du serveur web MosquitoNet. Pour avoir des dtails sur les
  logiciels  utiliser allez voir : MosquitoNet STRIP Page
  <http://mosquitonet.Stanford.EDU/strip.html>.

  En rsum la configuration consiste  utiliser un programme _s_l_a_t_t_a_c_h
  modifi pour rgler la discipline de ligne d'un priphrique srie
  pour SLIP, puis  configurer le priphrique `st[0-9]' rsultant comme
  vous le feriez pour Ethernet avec une exception importante : pour des
  raisons techniques STRIP ne supporte pas le protocole ARP , vous devez
  alors configurer manuellement les entres ARP pour chacun des htes de
  votre sous-rseau. Cela ne devrait pas tre trop contraignant.


  88..1133..  TTookkeenn RRiinngg

  Le noms de priphriques Token ring sont `tr0', `tr1' etc. Token Ring
  est un protocole LAN standard IBM en vue d'viter les collisions en
  fournissant un mcanisme qui n'autorise qu'une seule station du LAN 
  transmettre  un moment donn.  Un `jeton' est dtenu par une station
   un moment donn, et celle-ci est la seule autorise  mettre.
  Lorque c'est fait, elle passe le jeton  la station suivante. Le jeton
  fait le tour de toutes les stations actives, d'o le nom de `Token
  Ring' (anneau  jeton).

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
               [*] Network device support
               ....
               [*] Token Ring driver support
               < > IBM Tropic chipset based adaptor support





  La configuration de token ring est identique  celle de l'Ethernet 
  l'exception du nom de priphrique rseau  configurer.



  88..1144..  XX..2255

  X.25 est un protocole de circuit bas sur la commutation de paquets
  dfini par le C.C.I.T.T. (un groupe de normalisation reconnu par les
  compagnies de tlcommunications dans la plupart du monde). Une
  implmentation de X.25 et LAPB est en cours dans les noyaux rcents
  2.1.*.

  Jonathon Naylor jsn@cs.nott.ac.uk dirige le dveloppement et une liste
  de diffusion a t cre pour discuter des affaires relatives  X.25
  pour Linux. Pour y souscrire, envoyez un message  :
  majordomo@vger.rutgers.edu avec le texte "subscribe linux-x25" dans le
  corps du message.

  Les dernires versions des outils de configuration peuvent tre
  obtenues sur le site ftp de Jonathon  ftp.cs.nott.ac.uk
  <ftp://ftp.cs.nott.ac.uk/jsn/>.


  88..1155..  CCaarrttee WWaavveeLLaann

  Les noms de priphriques Wavelan sont `eth0', `eth1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support  --->
               [*] Network device support
               ....
               [*] Radio network interfaces
               ....
               <*> WaveLAN support





  La carte WaveLAN est une carte LAN sans-fil  large bande. Elle
  ressemble beaucoup en pratique  une carte Ethernet et se configure
  presque de la mme manire.

  Vous pouvez avoir des informations sur la carte Wavelan sur
  Wavelan.com <http://www.wavelan.com/>.


  99..  CCbblleess eett ccbbllaaggeess

  Ceux qui sont habiles du fer  souder peuvent vouloir fabriquer leurs
  propres cbles pour relier deux machines Linux. Les schmas de cblage
  suivants pourront les y aider.

  99..11..  CCbbllee ssrriiee NNUULLLL MMooddeemm

  Tous les cbles NULL modem ne se ressemblent pas. Beaucoup ne font que
  faire croire  votre ordinateur que tous les signaux appropris sont
  prsents et changent les donnes de transmission et de rception.
  C'est bien, mais cela signifie que vous devez utiliser le contrle de
  flux logiciel (XON/XOFF) qui est moins efficace que le contrle de
  flux matriel. Le cble suivant donne la meilleure transmission de
  signal entre les deux machines et vous permet d'utiliser le contrle
  de flux matriel (RTS/CTS).





  Pin Name  Pin                               Pin
  Tx Data    2  -----------------------------  3
  Rx Data    3  -----------------------------  2
  RTS        4  -----------------------------  5
  CTS        5  -----------------------------  4
  Ground     7  -----------------------------  7
  DTR        20 -\---------------------------  8
  DSR        6  -/
  RLSD/DCD   8  ---------------------------/-  20
                                           \-  6





  99..22..  CCbbllee ppoorrtt ppaarraallllllee ((ccbbllee PPLLIIPP))

  Si vous avez l'intention d'utiliser le protocole PLIP entre deux
  machines alors ce cble vous conviendra indpendamment du type de port
  parallle install.


       Pin Name    pin            pin
       STROBE      1*
       D0->ERROR   2  ----------- 15
       D1->SLCT    3  ----------- 13
       D2->PAPOUT  4  ----------- 12
       D3->ACK     5  ----------- 10
       D4->BUSY    6  ----------- 11
       D5          7*
       D6          8*
       D7          9*
       ACK->D3     10 ----------- 5
       BUSY->D4    11 ----------- 6
       PAPOUT->D2  12 ----------- 4
       SLCT->D1    13 ----------- 3
       FEED        14*
       ERROR->D0   15 ----------- 2
       INIT        16*
       SLCTIN      17*
       GROUND      25 ----------- 25





  Notes :

    Ne pas connecter les broches marques avec un astrisque `*'.

    Les masses supplmentaires sont 18,19,20,21,22,23 et 24.

    Si le cble que vous utilisez possde un blindage, il doit tre
     connect  une des prises DB-25 et uunnee sseeuullee.

     AAtttteennttiioonn :: uunn ccbbllee PPLLIIPP mmaall bbrraanncchh ppeeuutt ddttrruuiirree vvoottrree ccaarrttee
     ccoonnttrrlleeuurr. Soyez attentifs et vrifiez chaque connexion deux fois
     pour tre sr de ne pas vous crer de travail inutile ou de gros
     ennuis.  Bien que l'on puisse utiliser des cbles PLIP sur des
     longues distances, vitez-le si possible. Les spcifications du
     cble permettent d'avoir une longueur d'environ 1 mtre. Faites
     attention si vous utilisez de grandes longueurs, car les sources de
     champs magntiques levs comme la foudre, les lignes de puissance
     et les metteurs radio peuvent interfrer et parfois endommager
     votre carte contrleur. Si vous voulez vraiment connecter deux de
     vos ordinateurs sur une grande distance, utilisez plutt des cartes
     Ethernet et un cble coaxial.

  99..33..  CCbbllaaggee EEtthheerrnneett 1100bbaassee22 ((ccooaaxxiiaall ffiinn))

  10base2 est un standard de cblage Ethernet spcifiant l'utilisation
  d'un cble coaxial 52 ohms avec un diamtre d'environ 5 mm. Il faut se
  souvenir d'un nombre important de rgles quand on relie deux machines
  avec un cblage 10base2.  La premire est que vous devez utiliser des
  terminaisons  cchhaaqquuee eexxttrrmmiitt du cble. Un terminateur est une
  rsistance de 52 ohms qui sert  s'assurer que le signal est absorb
  et non rflchi  l'extrmit du cble. Sans terminaison  chaque
  extrmit vous pourriez trouver que l'Ethernet n'est pas fiable ou ne
  marche pas du tout. Normalement vous utilisez des `T' pour
  interconnecter les machines, en sorte que vous finirez par avoir
  quelque chose qui ressemble  ceci :


        |==========T=============T=============T==========T==========|
                   |             |             |          |
                   |             |             |          |
                 -----         -----         -----      -----
                 |   |         |   |         |   |      |   |
                 -----         -----         -----      -----




  Les `|'  chaque extrmit reprsentent une terminaison, les `======'
  reprsentent une longueur de cble coaxial avec des prises BNC en bout
  et les `T' reprsentent un connecteur en `T'. Gardez la longueur de
  cble entre les connecteurs en `T' et les cartes Ethernet aussi courte
  que possible, l'idal tant que ces connecteurs soient branchs
  directement sur la carte Ethernet.


  99..44..  CCbbllaaggee EEtthheerrnneett  ppaaiirreess ttoorrssaaddeess

  Si vous n'avez que deux cartes Ethernet avec paires torsades et que
  vous voulez les relier, vous n'avez pas besoin de rpartiteur.  Vous
  pouvez cbler les deux cartes directement ensemble.  Un schma
  montrant comment faire est inclus dans le document Ethernet-HOWTO
  <Ethernet-HOWTO.html>


  1100..  GGlloossssaaiirree ddeess tteerrmmeess uuttiilliissss ddaannss ccee ddooccuummeenntt..

  Ci-dessous une liste des termes les plus importants utiliss dans ce
  document.

     AARRPP
        C'est l'acronyme de _A_d_d_r_e_s_s _R_e_s_o_l_u_t_i_o_n _P_r_o_t_o_c_o_l (protocole de
        rsolution d'adresses), permettant  une machine du rseau
        d'associer une adresse IP  une adresse matrielle.

     AATTMM
        C'est l'acronyme de _A_s_y_n_c_h_r_o_n_o_u_s _T_r_a_n_s_f_e_r _M_o_d_e (mode de
        transfert asynchrone). Un rseau ATM enveloppe les donnes en
        blocs de taille standard pour pouvoir les convoyer efficacement
        d'un point  un autre. ATM est une technologie rseau 
        commutation de paquets.

     cclliieenntt
        C'est habituellement le morceau de logiciel d'un systme du ct
        o se trouve l'utilisateur.  Il y a des exceptions, par exemple,
        dans le systme de fentres X11 c'est en fait le serveur qui est
        avec l'utilisateur et le client qui est sur la machine distante.
        Le client est le programme ou l'extrmit d'un systme qui
        utilise le service fourni par un serveur. Dans le cas de
        systmes _d_'__g_a_l _ __g_a_l tels que _s_l_i_p ou _p_p_p le client se trouve
         l'extrmit qui a initialis la connexion, l'autre extrmit,
        tant considre comme le serveur.

     ddaattaaggrraammmmee
        Un datagramme est un paquet discret de donnes qui contient les
        adresses, et qui est l'unit de base de transmission sur un
        rseau IP. On peut aussi l'appeler `paquet'.

     DDLLCCII
        DLCI veut dire `Data Link Connection Identifier'(identifieur de
        connexion de liaison de donnes), et est utilis pour identifier
        une liaison virtuelle unique point  point via un rseau 
        relais de trames (Frame Relay). Les DLCI sont normalement
        assigns par le fournisseur de rseau  relais de trames.

     RReellaaiiss ddee ttrraammeess
        Frame Relay (Relais de trames) est une technologie rseau idale
        lorsque l'on a un trafic de nature cahotique ou sporadique. Les
        cots peuvent tre rduits quand on a de nombreux clients
        partageant la mme capacit rseau et on compte sur le fait que
        les clients utilisent le rseau  des instants diifrents.

     AAddrreessssee mmaattrriieellllee
        C'est un nombre qui identifie de manire unique un hte sur un
        rseau physique au niveau de la couche accs. Par exemple :
        _A_d_r_e_s_s_e_s _E_t_h_e_r_n_e_t et _A_d_r_e_s_s_e_s _A_X_._2_5.

     IISSDDNN
        C'est l'acronyme de _I_n_t_e_g_r_a_t_e_d _S_e_r_v_i_c_e_s _D_i_g_i_t_a_l _N_e_t_w_o_r_k(Rseau
        Numrique  Intgration de Services=RNIS). Il fournit des moyens
        standardiss avec lesquels les compagnies de tlcommunications
        peuvent dlivrer soit de la voix soit des informations vers des
        clients.  Techniquement c'est un rseau de donnes  commutation
        de paquets.

     IISSPP
        C'est l'acronyme de `Internet Service Provider' (fournisseur
        d'accs  l'Internet=FAI). Ce sont des organisations ou des
        socits qui fournissent une connexion rseau  l'Internet au
        public.

     AAddrreessssee IIPP
        C'est un nombre qui identifie de manire unique un hte TCP/IP
        sur le rseau. Cette adresse est code sur 4 octets et se
        prsente habituellement sous la forme appele "notation dcimale
        pointe", o chaque octet est sous forme dcimale, avec un point
        `.' entre chaque.

     MMSSSS
        Le Maximum Segment Size (_M_S_S) (Taille Maximum de Segment) est la
        plus grande quantit de donnes qui peut tre transmise en une
        seule fois. Si vous voulez viter des fragmentations MSS doit
        tre gal  l'en-tte MTU-IP.

     MMTTUU
        Le Maximum Transmission Unit (_M_T_U) (taille maximum de l'unit de
        transfert) est un paramtre qui dtermine le plus long
        datagramme pouvant tre transmis par une interface IP sans avoir
        besoin d'tre fragment en units plus petites.  Le MTU doit
        tre plus grand que le datagramme le plus grand que vous voulez
        transmettre sans tre fragment. Note : ceci protge de la
        fragmentation uniquement de manire locale, d'autres liens sur
        le chemin peuvent avoir un MTU plus petit et les datagrammes
        seront fragments  cet endroit. Les valeurs typiques sont de
        1500 octets pour une interface Ethernet, ou de 576 octets pour
        une interface SLIP.

     rroouuttee
        La _r_o_u_t_e est le chemin que les datagrammes suivent  travers le
        rseau pour atteindre leur destination.

     sseerrvveeuurr
        C'est habituellement le morceau de logiciel ou l'extrmit d'un
        systme loign de l'utilisateur. Le serveur fournit un service
        vers un ou plusieurs clients.  Des exemples de serveurs sont
        _f_t_p, _N_e_t_w_o_r_k_e_d _F_i_l_e _S_y_s_t_e_m (NFS), ou _D_o_m_a_i_n _N_a_m_e _S_e_r_v_e_r (DNS).
        Dans le cas de systmes __g_a_l _ __g_a_l comme _S_L_I_P ou _P_P_P le serveur
        est considr comme tant l'extrmit de la liaison qui est
        appele et l'extrmit appeleante est le client.

     ffeennttrree
        La _f_e_n__t_r_e (window) est la plus grande quantit de donnes que
        l'extrmit rceptrice peut accepter  un certain moment.



  1111..  LLiinnuuxx ppoouurr uunn ffoouurrnniisssseeuurr dd''aaccccss  ll''IInntteerrnneett ??

  Si vous tes intresss par l'utilisation de Linux  des fins de
  fourniture d'accs Internet, je vous recommande de consulter la page
  ISP Linux <http://www.anime.net/linuxisp/> pour une bonne liste de
  pointeurs vers les informations dont vous pourriez avoir besoin.


  1122..  RReemmeerrcciieemmeennttss

  Je voudrais remercier les personnes suivantes pour leur contribution 
  ce document (sans ordre particulier) : Terry Dawson, Axel Boldt, Arnt
  Gulbrandsen, Gary Allpike, Cees de Groot, Alan Cox, Jonathon Naylor,
  Claes Ensson, Ron Nessim, John Minack, Jean-Pierre Cocatrix, Erez
  Strauss.


  1133..  CCooppyyrriigghhtt..

  Le document NET-3-HOWTO donne des informations concernant
  l'installation et la configuration du support rseau pour Linux.
  Copyright (c) 1997 Terry Dawson, 1998 Alessandro Rubini

  Celui-ci est libre ; vous pouvez le redistribuer et/ou le modifier
  selon les termes de la GNU General Public License telle que publie
  par la Free Software Foundation ; soit avec la version 2 de la
  license, soit ( votre guise) avec une version ultrieure.

  Ce document est distribu avec l'espoir qu'il sera utile, mais SANS
  AUCUNE GARANTIE ; ni mme la garantie implicite de COMMERCIALISATION
  ou D'ADAPTATION DANS UN BUT PARTICULIER. Voir la GNU General Public
  License pour plus de dtails.

  Vous devriez recevoir une copie de la GNU General Public License avec
  ce document ; si ce n'est pas le cas, crivez  :

  Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.

  1144..  NNoottee dduu ttrraadduucctteeuurr

  Voir les autres HOWTO traduits en franais.  Lire galement le livre
  Administration rseau sous Linux, ditions O'Reilly.  Enfin voyez le
  site www.linux-france.com <http://www.linux-france.com> o vous
  trouverez de trs bons articles dcrivant en dtail diffrents points
  voqus dans ce document.































































  News-Howto
  Vince Shakan, vince@halcyon.com;
  Version Franaise par Arnaud Launay, zoro@multimania.com
  v1.4, 29 Novembre 1995

  Ce document dcrit la mise en place, la maintenance et l'entretien de
  News USENET sous Linux. Vous devez le lire si vous projetez de lire ou
  de poster des News USENET, soit localement sur votre site, soit entre
  votre site et d'autres sites. Vous n'aurez probablement ppaass  lire ce
  document si vous ne pensez pas distribuer les News USENET sur votre
  systme.
  ______________________________________________________________________

  Table des matires


  1. Introduction

     1.1 Nouvelles Versions de ce Document
     1.2 Echos, Ractions
     1.3 Informations sur le Copyright
     1.4 Responsabilit standard
     1.5 Autres sources d'informations
        1.5.1 USENET
        1.5.2 Livres
     1.6 O ne PAS chercher de l'aide

  2. Matriel ncessaire

  3. Obtenir les logiciels de News USENET

  4. Logiciels de transport de News

     4.1 Cnews Cleanup Release
        4.1.1 Installer Cnews
        4.1.2 Configurer Cnews
        4.1.3 Maintenir un site Cnews
     4.2 InterNetNews (INN)
        4.2.1 Installer INN
        4.2.2 Configurer INN
        4.2.3 Maintenir un site INN
     4.3 Autres outils de transport de News

  5. Lecteurs de News

     5.1 Tin
     5.2 Trn/Mthreads
     5.3 NN
     5.4 Autres lecteurs de news

  6. Remerciements

  7. FAQ sur USENET (du moins sur c.o.l.* )

     7.1 Pourquoi ne puis-je pas poster dans les groupes modrs ?
     7.2 Pourquoi semble-t-il y avoir des problmes de permissions ?
     7.3 Pourquoi puis-je poster des articles localement, mais qu'ils  n'apparaissent pas ou disparaissent dans les flux ?
     7.4 Pourquoi ma distribution binaire ne dispose pas de nntp ?
     7.5 Pourquoi doexpire (ou relaynews ou..) me dit "severe space shortage"  alors qu'il y a beaucoup de place ?
     7.6 Pourquoi, alors que tout semble normal, l'envoi ne se fait pas ?
     7.7 Puis-je utiliser le New News Overview (NOV) de tin/trn/nn pour remplacer les diverses bases ?
     7.8 Pourquoi ne peut-on avoir de distribution binaire de NNTP ?


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  L'intention de ce document est de rpondre  quelques unes des
  questions et commentaires qui semblent correspondre  la dfinition de
  "Frequently Asked Questions"  propos des logiciels de News sous Linux
  en gnral, et la version de la distribution SlackWare en particulier.

  Ce document et les documents correspondant Mail et UUCP HOWTO
  remplacent collectivement la FAQ UUCP-NEWS-MAIL qui a t prcdemment
  poste  comp.os.linux.announce .


  11..11..  NNoouuvveelllleess VVeerrssiioonnss ddee ccee DDooccuummeenntt

  Les nouvelles versions de ce document seront rgulirement postes sur
  comp.os.linux.announce, comp.answers, et news.answers .  Elles seront
  galement ajoutes sur divers sites ftp anonymes qui archivent de
  telles informations, comme sunsite.unc.edu:/pub/Linux/docs/HOWTO (NdT:
  ou ftp.ibp.fr:/pub/linux/french/HOWTO pour la version franaise.)

  De plus, vous devriez gnralement trouver ce document sur la "Linux
  WorldWideWeb home page"  http://sunsite.unc.edu/mdw/linux.html.


  11..22..  EEcchhooss,, RRaaccttiioonnss

  Je suis interess par tout commentaire, positif ou ngatif,  propos
  du contenu de ce document via e-mail. Contactez moi prcisment si
  vous trouvez des erreurs ou des omissions.

  Je lis, mais ne rpond pas ncessairement,  tous les e-mails que je
  reois. Les demandes d'ajouts seront considres et effectues
  uniquement lorsque la combinaison journalire du temps libre, du
  mrite de la demande, et de la pression sanguine du jour seront
  runies :-)

  Les flames iront tranquillement dans /dev/null, donc ne vous en
  inquitez pas.

  En particulier, le systme de fichiers standard de Linux pour les
  pathnames est en volution. Ce qu'il y a dans ce document est
  uniquement  titre d'illustration, bas simplement sur le standard
  actuel  l'poque de l'criture des parties de ce document, et dans
  les chemins utiliss dans les distributions ou distribution de Linux
  pour connatre les diffrents chemins utiliss.

  Les ractions concernant le format actuel de ce document doivent tre
  adresses au coordinateur des HOWTOs - Greg Hankins
  (greg@sunsite.unc.edu).


  11..33..  IInnffoorrmmaattiioonnss ssuurr llee CCooppyyrriigghhtt

  Le News-HOWTO est (c) 1994, Vince Shakan.

  Une copie exacte peut tre reproduite ou distribue sur tout media
  physique ou lectronique sans accord de l'auteur. Les traductions sont
  galement permises sans permission expresse si une notice sur le
  traducteur est incluse (NdT: ben heu, faut voir :) ).
  De courtes citations peuvent tre utilises sans le consentement
  pralable de l'auteur.
  Les travaux drivs et les distributions partielles du News-HOWTO
  doivent tre accompagnes soit d'une copie texto de ce fichier, soit
  d'un pointeur vers une copie identique.


  Les redistributions commerciales sont autorises et encourages;
  cependant, l'auteur (NdT: et le traducteur s'il s'agit de la
  traduction) apprcierait d'tre prvenu d'une telle distribution (en
  tant que courtoisie).

  En bref, nous dsirons promouvoir la dissmination de ces informations
  sur le maximum de canaux. Cependant, nous dsirons conserver le
  Copyright des documents HOWTO.

  Nous esprons que TOUTES les informations prsentes dans les HOWTOs
  seront diffuses. Si vous avez des questions, contactez Greg Hankins,
  le coordinateur des Linux Howtos,  gregh@sunsite.unc.edu.


  11..44..  RReessppoonnssaabbiilliitt ssttaannddaarrdd

  Bien entendu, je dsavoue tout risque potentiel du contenu du
  document. L'utilisation des concepts, exemples, et/ou du reste du
  document est  votre entire responsabilit.


  11..55..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonnss

  11..55..11..  UUSSEENNEETT


    news.admin.misc : Questions gnrales sur l'administration d'un
     rseau de news

    news.admin.policy : Politique d'USENET

    news.admin.technical : Maintenance d'un rseau de news (modr)

    news.software.b : Discussion sur les logiciels compatibles B-news

    news.software.nn : Discussion sur le paquetage de lecture de news
     'nn'

    news.software.nntp : Protocole: Network News Transfer Protocol

    news.software.readers : Logiciels utiliss pour lire les news

    news.sysadmin : Commentaires orients vers les administrateurs
     systmes

    news.announce.newusers : Messages d'explications pour les nouveaux
     utilisateurs (modr)

    news.newusers.questions : Questions et rponses pour les nouveaux
     utilisateurs d'Usenet


  11..55..22..  LLiivvrreess

  Ce qui suit est un ensemble non-exclusif de livres pouvant aider:

    "Managing UUCP and USENET" publi par O'Reilly+Associates est  mon
     avis le meilleur livre existant pour comprendre les programmes et
     les protocoles utiliss par un site USENET;

    "Unix Communications" publi par The Waite Group contient une
     description sympathique de tous les outils (et bien plus) et
     comment ils s'accordent entre eux;

    "Practical Unix Security" publi par O'Reilly+Associates comporte
     une discussion agrable sur la scurisation d'UUCP en gnral;
    "The Internet Complete Reference" d'Osborne est une rfrence
     prcieuse qui explique les divers services disponibles sur
     l'Internet et est une grosse source d'informations sur les news, le
     mail et diverses autres ressources de l'Internet;

    "The Linux Networking Administrators' Guide" d'Olaf Kirch du Linux
     DOC Project est disponible sur le net et est galement publi (au
     moins) par O'Reilly et SSC. Il constitue un achat utile pour
     apprendre tout ce que vous n'avez jamais imagin  propos du
     travail en rseau sous Unix.


  11..66..  OO nnee PPAASS cchheerrcchheerr ddee ll''aaiiddee

  Il n'y a rien de trs spcial sur la configuration et le lancement de
  news USENET sous Linux (pas plus). Par consquence, vous n'aurez
  certainement *PAS*  poster des questions gnriques relatives aux
  news sur les newsgroups comp.os.linux.* .

  A moins que votre envoi ne soit vraiment spcifique  Linux (cd "svp
  dites moi quels patches sont ncessaires pour utiliser INN avec bash
  1.12 sous SLS v1.03"), vous devrez poster vos questions dans les
  newsgroups mentionns ci-dessus.

  Laissez moi rpter cela.

  Il n'y a virtuellement aucune raison de poster quoi que ce soit de
  relatif aux news dans la hirarchie comp.os.linux. Il existe des
  newsgroups dans la hirarchie news.* pour rpondre  *TOUTES* vos
  questions.

  SI VOUS POSTEZ DES QUESTIONS NON SPECIFIQUES A LINUX DANS
  COMP.OS.LINUX.*, VOUS CHERCHEZ DE L'AIDE AU MAUVAIS ENDROIT. LES
  EXPERTS DES NEWS USENET REPONDENT DANS LES GROUPES INDIQUES CI-DESSUS
  ET NE TOURNENT GENERALEMENT PAS SOUS LINUX.

  POSTER DANS LA HIERARCHIE LINUX DES QUESTIONS NON SPECIFIQUES A LINUX
  VOUS FAIT PERDRE VOTRE TEMPS ET CELUI D'AUTRES PERSONNES, ET AUGMENTE
  FREQUEMMENT LES DELAIS POUR OBTENIR UNE REPONSE.


  22..  MMaattrriieell nncceessssaaiirree

  Il n'y a pas de matriel spcifiquement ncessaire pour les News
  USENET sous Linux. La seule condition requise est d'avoir suffisamment
  de place sur le disque dur pour installer les logiciels, les banques
  de donnes de discussion, et la quantit de news que vous dsirez
  conserver sur le serveur. Il faut un minimum de 10 Mga pour le dbut.


  33..  OObbtteenniirr lleess llooggiicciieellss ddee NNeewwss UUSSEENNEETT

  Tous les logiciels rfrencs dans ce "HOWTO" sont disponibles sur les
  sites ftp anonymes classiques.

  Regarder dans /networking/news sur ftp.uu.net est gnralement un bon
  moyen de dbuter.

  La distribution newspak-2.4.tar.z contient les fichiers de
  configuration et de documentation relatifs  la construction de
  logiciels uucp, mail et news sous Linux  partir des sources gratuites
  disponibles. Il peut gnralement tre trouv sur sunsite.unc.edu,
  dans le rpertoire /pub/Linux/system/Mail/news . Si vous ne pouvez le
  trouver sur sunsite, envoyez moi un mail et je m'assurerai que vous en
  obtiendrez une copie.

  44..  LLooggiicciieellss ddee ttrraannssppoorrtt ddee NNeewwss

  Il y a deux principaux jeux de logiciels de "transport" de News de nos
  jours, Cnews et INN. Les anciennes "BNews" ont t officiellement
  dclares abandonnes et non supportes par leurs auteurs.

  Le "transport" de News est dfini ici comme tant le logiciel qui
  travail en sous-main pour poster et propager les articles des news
  tout en rendant ces mmes articles disponibles  l'accs par les
  lecteurs de news.

  Vous pouvez dfinir n'importe quoi comme chemin, tant que UUCP a le
  chemin gnral vers rnews dans le fichier des Permissions et tant que
  vos lecteurs de news sont configurs de faon  pouvoir trouver
  "inews" et "mail".

  Important - vous aurez des ennuis si vous utilisez  la fois Cnews et
  INN. Prenez l'un ou l'autre. Il est toutefois possible d'ajouter le
  "NNTP Reference Release" dans Cnews depuis qu'ils sont prvus d'tre
  utiliss de concert.


  44..11..  CCnneewwss CClleeaannuupp RReelleeaassee

  Le standard courant en tant que logiciel de News est Cnews. Il existe
  depuis un certain nombre d'annes, je l'ai vu pour la premire fois en
  1988. La version courante lors de l'criture de ce Howto est appelle
  "Cnews CleanUp Release, avec le patch CR.G".

  Le point fort de Cnews est sa maturit. Il tourne sur tout systme
  *nix que vous pouvez trouver et il y a littralement des milliers de
  systme tournant dessous de par le monde.

  Son principal dsavantage est qu'il semble tre conu pour des
  connexions uucp-par-modem entre sites, et comme tel il requiert
  l'ajout d'une couche NNTP pour permettre la lecture et l'criture dans
  les news directement sur l'Internet.

  Nanmoins, l'administrateur Usenet dbutant devra probablement
  commencer par lancer Cnews car il est trs stable, bien document, et
  dispose de plusieurs milliers d'administrateurs expriments qui
  peuvent rpondre aux questions.

  La 'CleanUp Release' dclare que "le support de vue globale a t
  pleinement intgr et est plus rapide qu'il ne l'tait autrefois". Le
  rsultat est que vous pouvez par exemple utiliser le support Cnews NOV
  plutt que de lancer des gnrateurs de listes pour lecteurs de News
  tels nn, tin, et trn.

  Je n'ai pas encore cherch comment implmenter cette partie, car j'ai
  depuis longtemps opt pour INN  la maison. Si quelqu'un attend de moi
  de complter ce document, envoyez-moi un mot par e-mail.

  La distribution newspak sur sunsite contient des fichiers de
  configuration utilisables par la Cnews Cleanup Release sous Linux
  ainsi que quelques patchs ncessaires pour faire un "doexplode" pour
  se jouer de certains problmes sous bash 1.12.

  Basiquement, vous lancerez le nouveau script "quiz" et utiliserez les
  dfauts. Vous devrez vous rfrez  votre arbre /usr/include pour
  rpondre  un certain nombre de questions, mais ceci est plutt
  contraignant.




  44..11..11..  IInnssttaalllleerr CCnneewwss

  L'installation de la Cleanup Release de Cnews est absolument un projet
  "rtfm". Prenez simplement les sources, dcompactez les et suivez les
  instructions.

  Le quiz.def du newspak est gnr en lanant "quiz" la premire fois,
  et pour rpondre aux questions vous n'aurez qu' regarder les fichiers
  du /usr/include.

  Vous devrez avoir une version rcente de bash pour que Cnews passe ses
  tests. Essayez 'bash -version' pour savoir quelle version vous avez.
  La version 1.14.2 est dfinitivement hors du coup. La version courante
  (lors de l'criture de ce howto) est la 1.14.5, qui semble meilleure.

  Steve Robbins a galement dtermin que la rcente 'cleanup release'
  de Cnews a trouv un bug dans le join du shellutils 1.9 de GNU. Il y a
  quelques patchs ncessaires pour que "join" puisse nanmoins
  fonctionner. Si je me rappelle bien, Steve les a plac sur sunsite.


  44..11..22..  CCoonnffiigguurreerr CCnneewwss

  Tout d'abord, vous devrez diter ou tout au moins jeter un oeil aux
  fichiers suivants qui doivent tous tre dans /usr/local/lib/news:


       ______________________________________________________________________
         active             - le fichier actif
         batchparms         - les paramtres de lancement
         explist            - contrle de l'expiration des articles
         mailname           - nom dans l'entte pour les retours par mail
         mailpaths          - path o envoyer les articles pour groupes modrs
         organization       - votre "org"
         sys                - controlez ce que vous prenez et enregistrez
         whoami             - votre hostname pour la ligne Path:
       ______________________________________________________________________





  44..11..33..  MMaaiinntteenniirr uunn ssiittee CCnneewwss

  Tout d'abord, il ne faut pas modifier  la main les fichiers qui
  possdent des utilitaires permettant de les configurer. En particulier
  ne cherchez pas  configurer newsfeed manuellement (lancez "addfeed")
  et le fichier "active" (lancez addgroup). Si vous avez un doute, lisez
  et relisez les docs des sources.

  Tout peut tre fait par cron. Mon crontab pour les "news" ressemble au
  suivant:














  ______________________________________________________________________
            # Rcupre les batchs compresss provenant d'autres systmes
            # aussi, poste localement les articles
            20 *       * * * /usenet/sw/news/bin/input/newsrun

            # Automatise l'envoi
            0 *        * * * /usenet/sw/news/bin/batch/sendbatches myfeedsite

            # expire C-news
            59 0       * * * /usenet/sw/news/bin/expire/doexpire

            # Rapports si ncessaire
            10 5       * * * /usenet/sw/news/bin/newsdaily
            00 5       * * * /usenet/sw/new/bin/newswatch

            # Arrte l'arrive des news de 6:30AM  4:00 PM
            30 6       * * * /usenet/sw/news/bin/input/newsrunning off
            00 16      * * * /usenet/sw/news/bin/input/newsrunning on
  ______________________________________________________________________





  44..22..  IInntteerrNNeettNNeewwss ((IINNNN))

  INN est le nouveau-venu de la scne, mais il gagne en popularit en
  mrissant. Son principal intrt est sa rapidit et le fait qu'il
  contient un paquage nntp intgr. Son principal dfaut est qu'il est
  nouveau et son installation et excution sur l'un des nombreux "*nix
  standard" peut tre prilleuse. De plus, il opre par un daemon (innd)
  toujours prsent et un daemon supplmentaire pour raliser
  l'indentation. Le march semble donc tre la mmoire contre la
  vitesse.

  J'ai fait tourner l'arrive de news jusqu' 5 Mb par nuit avec INN au
  travers d'UUCP sur un 386  33 MHz avec 8 Mb de RAM (normalement sans
  XWindows) avec un modem 14.4 sans aucun problme.

  Les nouveaux administrateurs Usenet ne devraient probablement pas
  essayer INN jusqu' ce qu'ils aient de l'exprience avec B-News ou
  Cnews. Puisqu'il est rapide et sr sous Linux, il est sous-document
  pour l'administrateur news dbutant (cependant en pratique il est
  simple  faire tourner ds que vous avez compris).

  INN est trs particulier avec les permissions. Ne vous en inquitez
  pas.

  INN est galement trs particulier sur la "qualit" du TCP/IP avec
  lequel il doit marcher. Linux n'est pas forcment prsent  ce moment
  l, il est donc recommand que vous preniez une distribution
  spcifique  Linux  partir de l'un des sites archive Linux classique.


  44..22..11..  IInnssttaalllleerr IINNNN

  ( par Arjan de Vet - devet@info.win.tue.nl )

  J'ai crit un patch et un kit de configuration pour avoir INN 1.4
  tournant sous Linux. Ils peuvent tre trouvs sur:
  ftp.win.tue.nl:/pub/linux/ports/inn-1.4-linux.tar.gz.

  INN dpend fortement d'un bon substitut pour /bin/sh . J'utilise une
  version bta de bash 1.13 qui est dornavant accessible pour Linux
  dans les sites classiques. bash 1.12 a quelques problmes avec les
  newsgroups qui ne sont pas proprement rcuprs (il y a peut-tre
  d'autres problmes, je ne me rappelle plus).


  44..22..22..  CCoonnffiigguurreerr IINNNN

  Suivez les indications d'Arjan et vous devriez russir. Voici le
  rsum de ce qu'il y a  faire:

    Dans le fichier config.data, vrifiez que vous avez
     "HAVE_UNIX_DOMAIN DONT";

    Ajoutez le hostname du systme sur lequel tourne innd  hosts.nntp
     . Pour un site bas uniquement sur uucp, il s'agit du nom de votre
     site;

    Vrifiez que vous n'avez PAS de ligne pour nntp dans
     /etc/inetd.conf;

    Vrifiez que vous avez une variable pour le shell de inn qui donne
     "HAVE_UUSTAT DO" plutt que le "DONT" de cet exemple, si vous avez
     install uustat du paquetage Taylor UUCP. Si vous avez mal dfini
     cela, il en rsultera que les news ne seront pas envoyes
     automatiquement;

    Si vous utilisez INN, dfinissez dfinitivement le syslogd
     recommand car c'est trs, trs utile !

  Il y a une FAQ spectaculaire (!!!!) sur INN qui est poste
  mensuellement. Regardez sur rtfm.mit.edu:/pub/usenet-by-
  hierarchy/news. Vous en serez heureux.

  44..22..33..  MMaaiinntteenniirr uunn ssiittee IINNNN

  J'ai trouv qu'il n'y avait rien d'autre  faire pour maintenir un
  site INN sous Linux qu'avoir un cron fonctionnel. Vous devez
  simplement avoir une crontab qui ressemble  la suivante:


       ______________________________________________________________________
                 # maintenance quotidienne, fait galement expirer les donnes
                 # et les articles du .overview
                 1 0 * * * /usenet/sw/inn/bin/news.daily expireover delayrm < /dev/null

                 # pour envoyer en dehors
                 5 * * * * /usenet/sw/inn/lib/send-uucp
       ______________________________________________________________________




  (si vous changez pour batch 1.13, le "< /dev/null" n'est pas
  ncessaire)


  44..33..  AAuuttrreess oouuttiillss ddee ttrraannssppoorrtt ddee NNeewwss

  Ce qui suit est une liste non-exclusive des autres logiciels de
  transport de news connus pour tourner sous linux:

    dynafeed

    nntp1.5.11

    slurp1.05


  55..  LLeecctteeuurrss ddee NNeewwss

  Il n'y a pas de "vrai lecteur de news". En consquence, il y a de
  nombreux lecteurs de news trs connus qui peuvent tre facilement
  ports sous Linux. Au moment o j'cris ces lignes, "tin", "trn", et
  "nn" sont les plus communs disponibles dans les distributions de Linux
  et le newspak.

  Lorsque vous choisissez un lecteur de news, vous dsirez
  principalement quelque chose de facile  utiliser, trs configurable
  par l'utilisateur, avec indentation et fichiers de suppression (pour
  slectionner les articles intressants et faire disparatre ceux qui
  ne le sont pas).

  Vous pouvez configurer vos chemins pour ce que vous voulez, tant que
  le lecteur de news peut trouver "inews" de votre installation de Cnews
  ou INN et un programme "mail" pour envoyer des rponses aux articles.

  Cette section traitera brivement de quelques uns des plus populaires.
  Avant que vous ne posiez la question, j'utilise "nn" pour beaucoup de
  raisons :-)


  55..11..  TTiinn

  Tin est un lecteur de news indent gnralement dcrit comme facile
  d'utilisation pour les nouveaux utilisateurs. Il supporte les fichiers
  de suppression et l'indentation NOV. Si vous utilisez INN, il lira par
  dfaut les fichiers NOV .overview et n'crira pas de fichiers d'index.

  Pour compiler tin sous linux, vous devrez juste diter le makefile
  pour configurer l'emplacement des logiciels (principalement celle de
  inews) et taper"make linux". Tin ne requiert pas de patch pour tourner
  sous linux.

  Pour l'indentation, vous devrez juste mettre "tin -u" pour mettre 
  jour les fichiers d'index.

  Pour activer la possibilit de lecture via NNTP, compilez le avec
  "NNTP_ABLE" dfini. Il en rsultera un fichier nomm "tin" pour la
  lecture locale et un fichier nomm "rtin" pour la lecture via NNTP.
  "tin -r" donnera aussi le mme effet que "rtin".

  Iain Lea recommande l'entre suivante dans la crontab et ajoute que
  vous devrez faire un "make daemon" pour compiler "tind".


       ______________________________________________________________________
                 # indexe la base de donnes
                 35 * * * * /usenet/bin/tind -u
       ______________________________________________________________________




  J'ai lanc tin au travers d'une liaison SLIP comme lecteur de news par
  NNTP. Si vous tes connect  un systme comprenant tous les
  newsgroups, vous deviendrez extrmement vieux en attendant le
  chargement du fichier "active".


  55..22..  TTrrnn//MMtthhrreeaaddss

  "Trn" est un driv en index du lecteur "rn". Trn 3.2 et plus rcents
  ont la sympathique capacit de choisir entre les indexations
  "mthreads" (le paquetage d'indexation de trn) ou "NOV" (indexation par
  INN).

  Pour le compiler, lancez juste le script Configure et prenez les
  options par dfaut. Vous devrez avoir au moins la libc 4.4.1 et bash
  1.1.13 pour lancer sans problmes Configure.

  La distribution newspak sur sunsite contient des fichiers de
  configuration effectifs pour trn sous linux.

  Il est probablement indsirable d'essayer d'diter le script de
  configuration  la main  moins que ce ne soit pour changer quelque
  chose de *TRES* simple, comme changer les chemins pour indiquer vos
  prfrences. Si vous faites cela, vous devrez lancer un "Configure -S"
  avant de faire "make depend", "make" et "make install".

  Alors que "Configure" plante avec Linux sous bash 1.12, "Configure -S"
  marche correctement, donc si vous prenez le config.sh de newspak comme
  point de dpart, vous serez trs tranquille.

  Pour compiler pour une lecture par NNTP, il suffit de rpondre "yes"
  lorsque Configure vous demande si vous dsirez cette option (en
  supposant que Configure tourne sur votre systme). Une prochaine mise
   jour du newspak devrait inclure un config.sh pour la lecture NNTP
  comme celui pour la lecture locale, pour tous ceux d'entre nous qui
  sont encore avec un "bash impair" :-)

  J'ai lanc trn au travers d'une liaison SLIP comme lecteur de news par
  NNTP. Si vous tes connect  un systme comprenant tous les
  newsgroups, vous deviendrez extrmement vieux en attendant le
  chargement du fichier "active" et pour l'indexation des articles.

  Il y a des douzaines d'options en lignes pour obtenir toutes sortes de
  contextes. Lisez la man page "trn" pour plus de dtails. J'utilise un
  truc sympa pour configurer toutes les options facilement:

    Crer un fichier  /.trnrc

    ajouter export TRNINIT=" /.trnrc"

  La version actuelle de newspak contient une copie de mon .trnrc 
  titre d'exemple.

  trn 3.2 et suivants ont le support pour l'indexation NOV ou mthreads
  slectionnable par l'utilisateur. Ainsi, je recommande de compiler le
  logiciel avec les deux sortes d'indentation (c'est une question dans
  Configure). Pour en slectionner un au lancement, essayez "trn -Zo"
  pour NOV et "trn -Zt" pour mthreads.

  Pour construire la base de donnes mthreads, essayez quelque chose
  comme ceci dans le "news" crontab:


       ______________________________________________________________________
                 # indexe la base de donnees trn
                 35 * * * * /usenet/bin/mthreads all
       ______________________________________________________________________





  55..33..  NNNN

  La distribution newspak de sunsite contient des fichiers de
  configuration valables pour linux pour nn 6.4.18, vous pouvez donc les
  mettre en place et taper "make". Ils fonctionnent aussi pour la beta
  6.5b3 de la prochaine nn 6.5.

  La compilation termine, vous devrez faire ceci:

    lancer le programme "inst" pour tout installer

    initialiser la base de donnes

    rendre actif nnmaster

  Voyez la doc de nn pour les dtails. Compiler, configurer, et faire
  tourner nn sous Linux n'est pas diffrent de le lancer sous un autre
  *nix, avec l'exception que vous devrez lancer nnmaster en tant
  qu'entre cron plutt qu'en tant que daemon. Si vous le lancez en tant
  que daemon sous linux, il peut agir imparfaitement (l'effet rseau est
  de toutes faons le mme en le lanant par cron).

  Le support de nnnn se fait par l'entre suivante dans la crontab:


       ______________________________________________________________________
                 # lance nnmaster pour rcuprer le travail d'nn
                 # (inutile si vous utilisez NOV d'INN de nn-6.5beta3)
                 25 * * * * /usenet/sw/nn/lib/nnmaster

                 # Rend obsolte la base de donnes de nn
                 # (inutile si vous utilisez NOV d'INN de nn-6.5beta3)
                 0  4       * * * /usenet/sw/nn/bin/nnadmin =EYW

                 # prpare une copie du fichier active pour "nngoback" et
                 # conserve les 7 derniers
                 0 3 * * * /usenet/sw/nn/lib/back_act 7
       ______________________________________________________________________




  J'ai quelque peu essay de lancer nn en tant que lecteur de news NNTP
  au travers d'une connexion SLIP. Dans ce cas, vous devrez diter
  prcisment le fichier config.h . Voyez les commentaires dans le
  fichier pour avoir des dtails. Lorsque vous lancez nn en tant que
  lecteur NNTP, celui-ci lance une copie locale de nnmaster pour
  conserver l'index sur le systme local, en sorte que la slection des
  articles est trs rapide (vous devrez cependant videmment attendre un
  peu pour recevoir le texte de l'article si vous utilisez SLIP par
  modem).

  La nouvelle version (6.5.x) de nn a le support des bases de donnes
  NOV d'INN qui rendent inutile le lancement d'nnmaster pour vous. Cette
  configuration est trs recommande, puisqu'en rsultat vous n'aurez
  pas  utiliser de temps processeur pour lancer nnmaster, et vous
  n'aurez pas de base de donne et d'articles news hors d'atteinte.


  55..44..  AAuuttrreess lleecctteeuurrss ddee nneewwss

  Ce qui suit est une liste incomplte de lecteurs de news dit pouvoir
  tre installs et lancs sous Linux:

    tass

    xrn

    gnus


    (NdT: on peut rajouter Netscape)


  66..  RReemmeerrcciieemmeennttss

  Les personnes suivantes m'ont aid  rassembler les informations (et
  l'exprience) qui ont rendu possible l'existence de ce document:

  Ed Carp, Steve Robbins, Ian Taylor, Greg Naber, Matt Welsh, Iain Lea,
  Arjan de Vet.

  Si j'ai oubli quelqu'un, je m'en excuse.


  77..  FFAAQQ ssuurr UUSSEENNEETT ((dduu mmooiinnss ssuurr cc..oo..ll..** ))

  77..11..  PPoouurrqquuooii nnee ppuuiiss--jjee ppaass ppoosstteerr ddaannss lleess ggrroouuppeess mmooddrrss ??

  Probablement parce que le lecteur de news essaye d'appeler /bin/mail
  pour envoyer le mail et il n'apprcie pas. Remplacez le /bin/mail des
  vieilles versions de SLS avec le port de mailx-5.5 d'une slackware
  rcente et utilisez l'outil pkgtool pour installer le kit et tout sera
  configur.

  Une autre possibilit est que vous auriez un groupe modr configur
  comme un groupe non-modr et quelque chose supprime tranquillement
  l'article du flux. Vrifiez en lanant un cchheecckkggrroouuppss ds maintenant
  et que les articles des news passent en news.admin pour quelques
  semaines.


  77..22..  PPoouurrqquuooii sseemmbbllee--tt--iill yy aavvooiirr ddeess pprroobbllmmeess ddee ppeerrmmiissssiioonnss ??

  Parce qu'il y en a :-)

  Vrifiez que vous avez les bonnes permissions et que vous avez un
  utilisateur et un groupe news dans /etc/passwd et /etc/group qui
  correspondent  la distribution binaire que vous avez prise. Il
  semblerait ne pas y avoir de standard pour les comptes couramment
  disponibles sous Linux.

  Tout ce qui se trouve dans /usr/local/lib/news doit tre plac
  news.news sauf /usr/local/lib/news/setnewsids qui doit tre indiqu
  root.

  Vous pouvez utiliser ce que vous voulez comme UID et GID pour news.


  77..33..  nn''aappppaarraaiisssseenntt ppaass oouu ddiissppaarraaiisssseenntt ddaannss lleess fflluuxx ??  PPoouurrqquuooii
  ppuuiiss--jjee ppoosstteerr ddeess aarrttiicclleess llooccaalleemmeenntt,, mmaaiiss qquu''iillss

  Probablement parce que vous n'appelez pas newsrun par cron.  Peut-tre
  parce que vous avez mal dit le fichier systme. Peut-tre parce que
  vous n'avez pas d'arbre /usr/spool/news/out.going ou approchant.
  Peut-tre parce que vous avez pris les distributions 'Performance' ou
  'Cleanup' de Cnews, qui automatisent certaines tches et ncessitent
  'newsrun' lanc par la crontab pour rcuprer les news d'autres sites
  et pour les voir localement.

  Ne crez pas de newsgroups en ditant les fichiers active ou sys.
  Utilisez les outils de /usr/local/lib/news/bin/maint pour le faire.





  77..44..  PPoouurrqquuooii mmaa ddiissttrriibbuuttiioonn bbiinnaaiirree nnee ddiissppoossee ppaass ddee nnnnttpp ??

  Parce que ceci est suppos tre plug-and-play sous Linux et parce que
  je ne veux pas rendre la distribution SLS deux fois plus grosse
  qu'elle n'est dj en ayant  maintenir les versions nntp et non-nntp
  des programmes de lecture et de transport des news.  Egalement, parce
  qu'il est compil avec des informations localises qui ne sont pas
  rouvrables au lancement via un fichier de config.


  77..55..  aalloorrss qquu''iill yy aa bbeeaauuccoouupp ddee ppllaaccee ??  PPoouurrqquuooii ddooeexxppiirree ((oouu
  rreellaayynneewwss oouu....)) mmee ddiitt ""sseevveerree ssppaaccee sshhoorrttaaggee""

  Parce qu'il ne peut lire /etc/mtab. Mettez le en mode 644. Ceci arrive
  quand vous 'umount'-ez un systme de fichiers mont par
  l'administrateur avec un umask ne permettant pas la lecture par toute
  personne de fichiers possds par l'administrateur.


  77..66..  PPoouurrqquuooii,, aalloorrss qquuee ttoouutt sseemmbbllee nnoorrmmaall,, ll''eennvvooii nnee ssee ffaaiitt ppaass ??

  Les vieilles versions de Linux ont un sed "cass" qui rendait Cnews
  trange. En particulier, si vous avez install une vieille SLS,
  vrifiez dans /bin et /usr/bin que vous avez seulement une copie de
  sed et que celle-ci est rcente.

  A cause de la 'Performance Release' aux alentours de fvrier 1993,
  vous devrez avoir newsrun lanc priodiquement par cron pour que les
  choses se droulent normalement. C'est un tat qui surprend
  apparemment beaucoup de monde.


  77..77..  PPuuiiss--jjee uuttiilliisseerr llee NNeeww NNeewwss OOvveerrvviieeww ((NNOOVV)) ddee ttiinn//ttrrnn//nnnn ppoouurr
  rreemmppllaacceerr lleess ddiivveerrsseess bbaasseess ??

  Oui. trn , tin, et la bta de nn le supportent maintenant.

  Vous pouvez utiliser celle des Releases 'CleanUp' et 'Performance' de
  Cnews, ainsi que celle d'autres lecteurs.


  77..88..  PPoouurrqquuooii nnee ppeeuutt--oonn aavvooiirr ddee ddiissttrriibbuuttiioonn bbiinnaaiirree ddee NNNNTTPP ??

  Car certaines informations sont uniquement locales et sont inclues
  dans la compilation, et ne peuvent tre dtermines "magiquement" au
  lancement.




















F DATABASE.;1                       	Database-HOWTO
F ELF-HOWT.;1                       	ELF-HOWTO
F HAM-HOWT.;1                       	HAM-HOWTO
F JAVA-HOW.;1                       	Java-HOWTO
F MODULE-H.;1                       	Module-HOWTO
F NET-3-HO.;1                       	NET-3-HOWTO
F NEWS-HOW.;1                       	News-HOWTO
F TERM-HOW.;1                       	Term-HOWTO
F VIDEO-HO.;1                       	Video-HOWTO
  Linux Term HOWTO v1.1, version francaise.
  par Patrick Reijnen, patrickr@cs.kun.nl
  12 Mai 1995

  Ce document expose les bases de l'installation et du fonctionnement de
  term, programme grace auquel il est possible de multiplexer une  liai-
  son serie entre deux machines dont l'une est connectee a un reseau. On
  peut ainsi mettre en place une connexion  au  reseau  sur  la  seconde
  machine.

  11..  IInnffoorrmmaattiioonnss lleeggaalleess

  11..11..  VVeerrssiioonn ffrraannccaaiissee

  11..11..11..  CCooppyyrriigghhtt

  Ce  document  peut etre librement distribue, sous quelque forme que ce
  soit, s'il l'est gratuitement et dans son  integralite.  Des  extraits
  peuvent  en etre diffuses, sous reserve que les presentes informations
  de _c_o_p_y_r_i_g_h_t soient incluses et que le lecteur soit  informe  du  fait
  qu'il ne s'agit pas de la version integrale, dont on indiquera comment
  se la procurer. Ce document pourra etre inclus dans des  distributions
  commerciales  sans consentement explicite prealable. L'auteur souhaite
  cependant etre averti de telles utilisations.

  Ce HOWTO pourra etre traduit dans toute langue, a  condition  que  les
  informations de _c_o_p_y_r_i_g_h_t et de limitation de garantie soient fournies
  sous leur forme  originelle  et  que  l'identite  du  traducteur  soit
  indiquee  dans  la  traduction  (--   Le traducteur est en l'occurence
  Arnaud Ruch (ruch@labri.u-bordeaux.fr).--) . Le traducteur souhaite de
  plus  etre  informe  de  toute  utilisation  de  ce  document dans une
  distribution commerciale.

  11..11..22..  LLiimmiittaattiioonn ddee ggaarraannttiiee

  Bien que l'auteur ait essaye de  fournir  les  informations  les  plus
  exactes  et  recentes possibles, il ne peut garantir que l'utilisation
  de ce document ne provoquera pas la perte de donnees.  Il  ne  fournit
  donc  AAUUCCUUNNEE  GGAARRAANNTTIIEE sur les informations contenues dans ce HOWTO et
  ne pourra en aucun cas  etre  tenu  pour  responsable  de  quelconques
  dommages  resultant  de  son utilisation (--  Il en va bien entendu de
  meme du traducteur.--)

  11..22..  VVeerrssiioonn oorriiggiinnaallee

  11..22..11..  CCooppyyrriigghhtt ssttaatteemmeenntt

  This document may be distributed freely as a whole  in  any  form  and
  free  of  charge.  Parts of this document may be distributed, provided
  that this copyright message is included and  the  reader  is  informed
  that this is not the full HOWTO document.  Furthermore, there is to be
  a pointer as to where the full document can be obtained. Specifically,
  it may be included in commercial distributions, without prior consent.
  However, I would like to be informed of such usage.

  This HOWTO may be translated into any language,  whatsoever,  provided
  that you leave this copyright statement and the disclaimer intact, and
  that a notice is appended stating who translated the document.

  11..22..22..  DDIISSCCLLAAIIMMEERR

  While I  have  tried  to  include  the  most  correct  and  up-to-date
  information   available,   I   cannot  guarantee  that  usage  of  the
  information in this document does  not  result  in  loss  of  data.  I
  provide  NNOO  WWAARRRRAANNTTYY about the information in this HOWTO and I cannot
  be made liable for any consequences  for  any  damage  resulting  from
  using information in this HOWTO.

  22..  IInnttrroodduuccttiioonn

  22..11..  AA pprrooppooss ddee ccee ddooccuummeenntt

  Ce   HOWTO   tente   de  dissiper  la  confusion  que  peut  engendrer
  l'utilisation de term, remarquable programme de Michael O'Reilly grace
  auquel  il  est  possible  de  multiplexer  une liaison serie, afin de
  mettre en place une connexion a un reseau.  La  documentation  fournie
  avec  term etant de relativement bonne qualite, ce document ne vise en
  aucun cas a la remplacer. Son intention est  d'expliquer  sur  quelles
  bases fonctionne term et de detailler les etapes necessaires a la mise
  en place de  quelques-uns  des  services  reseau  les  plus  courants.
  L'auteur  insiste sur le fait que ce document ne couvre pas l'ensemble
  de ce qu'il  y  a  a  connaitre  sur  term.  Apres  l'avoir  parcouru,
  reportez-vous  aux  pages  du  manuel  qui  contiennent  de nombreuses
  informations complementaires.

  22..22..  QQuu''eesstt--ccee qquuee tteerrmm ?

  term    est    un    programme    ecrit    par    Michael     O'Reilly
  (michael@iinet.com.au)     et     maintenu     par     Bill    Riemers
  (bcr@physics.purdue.edu), qui permet a plusieurs  connexions  d'operer
  simultanement  sur une meme liaison serie. Il est par exemple possible
  de telecharger un fichier tout en  travaillant  sur  un  site  distant
  different,  et ce grace a la meme liaison modem. term permet egalement
  de lancer des clients X Windows  par  l'intermediaire  de  cette  meme
  liaison. Grace aux utilitaires tredir et tudpredir, term est en mesure
  de  fournir  la  plupart   des   services   reseau   TCP/IP   et   UDP
  traditionnels  :  _m_a_i_l,  _n_e_w_s, ftp, telnet, xarchie, etc. D'un certain
  point de vue, term est tres semblable aux autres protocoles serie  tel
  que  SLIP  et  PPP, mais son avantage est d'etre execute integralement
  depuis l'espace utilisateur. Il ne requiert donc  aucune  intervention
  d'administrateurs systeme ou reseau.

  Contrairement  a  SLIP  ou PPP, votre machine ne possede pas sa propre
  adresse IP. Tout le trafic a destination de votre  machine  doit  donc
  etre  adresse  a  une  machine distante, qui se charge de le rediriger
  vers elle par l'intermediaire de term.

  33..  CCoommmmeenntt tteerrmm fonctionne-t-il ?

  Avant de vous lancer dans l'experimentation de term, il  est  vivement
  recommande de lire ce chapitre dans son integralite et de parcourir le
  fichier 'INSTALLATION' fourni avec term. Examinez egalement les  pages
  de  manuel  de  linecheck,  (term)test  et  term.  Vous  pourrez alors
  travailler plus facilement et plus rapidement.

  33..11..  NNoommeennccllaattuurree

  Supposons que  vous  appelez  une  machine  par  l'intermediaire  d'un
  quelconque  serveur  de  terminal.  Les  termes  _l_o_c_a_l  et  _d_i_s_t_a_n_t se
  referent respectivement au systeme local et a la machine distante, qui
  est connectee au reseau.

  La  machine  locale  n'est  pas directement reliee au reseau. term est
  cependant capable, en utilisant la connexion au reseau dont dispose la
  machine   distante,   de   lui   fournir   des  services  reseau,  par
  l'intermediaire de la liasion serie.  Examinons  comment  une  machine
  dotee d'une connexion reseau traditionnelle fournit ces services. Dans
  un premier temps, l'utilisateur lance un  programme  tel  que  ftp  ou
  telnet.  Ce  programme demande un service reseau par un appel systeme.
  Le systeme d'exploitation obtient alors ce service  de  son  interface
  reseau  (par  exemple, il envoie et recoit des paquets _e_t_h_e_r_n_e_t). SLIP
  et PPP procedent exactement de  la  meme  facon,  en  transformant  en
  interface  reseau  votre  liaison  modem.  En  pratique  en effet, une
  liaison  serie  n'est  guere  differente   d'une   liaison   _e_t_h_e_r_n_e_t.
  L'inconvenient  majeur de ces protocoles est qu'ils font de la machine
  connectee par modem une part integrante du reseau, avec les nombreuses
  charges  d'administration  qui en decoulent (plus, en fait, puisque la
  liaison modem doit egalement etre administree).

  En l'absence d'une connexion reseau telle que SLIP ou PPP, que fait-on
  habituellement  ? Et bien, on appelle une machine connectee au reseau,
  on lit son courrier, ses _n_e_w_s, etc. Lorsqu'on a besoin  d'un  fichier,
  on  commence  par  le  transferer  sur la machine distante, puis on le
  rapatrie sur la machine locale grace a kermit ou un autre programme de
  communication.  Tout  ceci  est quelque peu astreignant, d'autant plus
  que vous ne pouvez utiliser votre liaison modem que pour une operation
  a  la  fois.  L'idee  a  la  base  de  term  est  d'automatiser  et de
  multiplexer ces operations. term est lance a la fois  sur  la  machine
  locale et sur la machine distante, les deux processus communiquant par
  la liaison modem. Lorsque vous avez besoin d'un service  reseau,  vous
  adressez  une  requete au demon term local, qui la retransmet au demon
  term qui s'execute sur la machine connectee au reseau. Le resultat est
  alors renvoye par l'intermediaire de la liaison modem.

  Pour etre plus concret, disons que vous souhaitez recuperer un fichier
  grace a ftp.  Tout d'abord, il vous faut une version de ftp capable de
  dialoguer  avec  term.  Vous lancez ce termftp comme un ftp classique,
  par la commande termftp nethost.gov, par exemple.  La  difference  est
  que cette version particuliere de ftp adresse sa requete au demon term
  local plutot qu'au noyau. Le demon term local retransmet cette requete
  au  term  distant par l'intermediaire de la liaison modem, celui-ci se
  chargeant alors d'ouvrir une connexion  ftp  avec  nethost.gov  et  de
  renvoyer  les  donnees.  term  est  suffisament  astucieux  pour  vous
  permettre de gerer de nombreuses actions a, la  fois  de  telle  sorte
  qu'il   vous   est   possible   d'avoir  plusieurs  sessions  ouvertes
  simultanement sur la meme liaison modem (par exemple, vous pouvez etre
  connecte  a  une  machine  distante  par  termtelnet  pendant  que  le
  transfert termftp se poursuit).

  Ne vous inquietez pas si tout ceci vous semble trop abstrait (ou  bien
  confus)  :  ce qu'il faut ici retenir est qu'il y a _d_e_u_x occurences de
  term qui s'executent, chacune a une extremite de la liaison modem.

  44..  MMiissee eenn ppllaaccee

  44..11..  CCee ddoonntt vvoouuss ddeevveezz ddiissppoosseerr

  Avant de commencer a construire term, il vous faut etre sur que  votre
  noyau  a ete compile avec l'option TCP/IP. L'interface TCP/IP loopback
  doit egalement avoir ete activee. Une fois que  ceci  est  fait,  vous
  pouvez parcourir le reste de ce paragraphe.

  44..22..  EExxpplliiccaattiioonn ddeess ccoonncceeppttss

  Dans  les  dernieres versions de term, deux nouveaux concepts ont fait
  leur apparition. Les deux paragraphes suivants y sont consacres.

  44..22..11..  LLee ppaarrttaaggee

  Depuis la version 1.16 de term, le concept de _p_a_r_t_a_g_e de la  connexion
  term  avec  d'autres  utilisateurs  est  apparu. Si, par exemple, vous
  travaillez sur la machine distante via votre connexion term (vous avez
  utilise  trsh  pour  vous  connecter  depuis votre machine locale), un
  autre utilisateur peut utiliser la meme connexion pour transferer  par
  ftp  un  fichier  sur son compte sur la machine locale, depuis un site
  ftp distant.

  Lorsque vous desactivez les possibilites de partage (c'est-a-dire  que
  vous  utilisez  term  en  mode  _p_r_i_v_e), vous seul (en plus de _r_o_o_t :-)
  pouvez utiliser la connexion term.

  Bien  sur,  vous  n'avez  besoin  d'installer  le  term  partage  qu'a
  l'extremite  a  laquelle vous voulez permettre a d'autres utilisateurs
  de profiter de la meme connexion term que  vous.  Ainsi,  si  d'autres
  utilisateurs  ont  un  compte  sur  votre machine locale et souhaitent
  l'utiliser depuis une autre machine du reseau distant,  il  vous  faut
  activer  le  partage  a  l'extremite distante de la connexion term. De
  cette facon, ces personnes peuvent se connecter a votre machine locale
  en  utilisant  la  meme  connexion  term  que vous. (NOTE : le premier
  exemple supposait que le partage soit active a l'extremite  locale  de
  la connexion).

  NNOOTTEE ssuurr ll''iinnssttaallllaattiioonn eenn ttaanntt qquuee rroooott :: Lorsque vous installez term
  en tant que _r_o_o_t, il vous faut  au  prealable  creer  un  groupe  _t_e_r_m
  (avant  la  compilation)  ne contenant aucun utilisateur. Ceci se fait
  par l'ajout de la ligne suivante au fichier '/etc/group' :

    term::16:root

  ou tout _G_I_D inutilise autre que 16, si 16 est deja attribue.

  Apres la compilation et l'installation, rendez  term  et  ses  clients
  _S_U_I_D, grace aux commandes :

    chgrp term <client_term>
    chmod g+s <client_term>

  Procedez de meme avec tout autre programme utilisant term.

  44..22..22..  RReesseeaauu tteerrmm integral

  On  utilise  l'expression  de  _r_e_s_e_a_u  _t_e_r_m _i_n_t_e_g_r_a_l depuis la version
  2.0.0 de term. Lorsque votre seule connexion au  monde  exterieur  est
  une  connexion  term, vous disposez d'un _r_e_s_e_a_u _t_e_r_m _i_n_t_e_g_r_a_l. Il vous
  faut alors compiler term avec cette option. Dans ce  cas,  un  fichier
  'termnet' est place dans votre repertoire partage. Ceci indique a term
  qu'il assure votre unique connexion avec le monde exterieur.

  Si vous  avez  egalement  un  autre  type  de  connexion  reseau  vers
  l'exterieur, les programmes qui savent utiliser term tenteront dans un
  premier temps d'utiliser cette connexion. Si cela  echoue,  term  sera
  lance  et  une  nouvelle  tentative  sera effectuee, avec la connexion
  term. Pour etre plus clair, voici un exemple qui  utilise  la  version
  term de telnet, laquelle peut fonctionner avec ou sans term.

    telnet localhost

  n'utilise pas term pour realiser la connexion alors que :

    telnet zeus.cs.kun.nl

  utlisera term si vous n'avez pas d'autre type de connexion reseau.

  Un  _r_e_s_e_a_u  _t_e_r_m _i_n_t_e_g_r_a_l suppose que l'on mente a propos du nom de la
  machine locale, en pretendant qu'il s'agit de la machine distante.  De
  plus,  cela  implique  que  bind(0)  agisse  toujours  sur  la machine
  distante. Sommairement,  cela  signifie  que  de  nombreux  programmes
  n'utilisant  pas term deviennent inutilisables lorsque term est actif.
  Malheureusement, c'est le cas de la plupart des programmes  et  demons
  UDP.

  44..33..  CCoommppiillaattiioonn ddee tteerrmm

  Si  vous  avez  de  la  chance, un simple make devrait suffire. Il est
  cependant probable que vous aurez un peu plus de travail. Du fait  des
  nouvelles  possibilites  des version recentes de term, la construction
  de l'executable est desormais un peu compliquee. On peut  proceder  de
  plusieurs facons.

  Afin  de  detailler  toutes  ces  manieres  de  construire term, cette
  section est divisee en trois parties  :

  1. Compilation de term, versions 2.0.0 et ulterieures.

  2. Compilation de term, versions 1.16 a 1.19.

  3. Compilation de term, versions 1.15 et anterieures.

  44..33..11..  CCoommppiillaattiioonn ddee tteerrmm, versions 2.0.0 et ulterieures

  Tout d'abord, assurez-vous d'avoir bien  lu  la  partie  '_r_e_s_e_a_u  _t_e_r_m
  _i_n_t_e_g_r_a_l' ci-dessus.

  Il  existe  plusieurs  facons  de compiler l'executable et les clients
  term des versions 2.0.0 et ulterieures. Toutes peuvent etre  utilisees
  par _r_o_o_t ou par un utilisateur normal :

  1. Compilation de term en mode prive sans _r_e_s_e_a_u _t_e_r_m _i_n_t_e_g_r_a_l.

  2. Compilation de term en mode prive avec _r_e_s_e_a_u _t_e_r_m _i_n_t_e_g_r_a_l.

  3. Compilation de term en mode partage sans _r_e_s_e_a_u _t_e_r_m _i_n_t_e_g_r_a_l.

  4. Compilation de term en mode partage avec _r_e_s_e_a_u _t_e_r_m _i_n_t_e_g_r_a_l.

  Dans  ces  versions de term, une nouvelle procedure de compilation est
  apparue, grace au _s_c_r_i_p_t configure. Lorsque configure  est  lance,  il
  determine  le  systeme  d'exploitation,  si  le  repertoire source est
  accessible ou non et si des options d'execution ont ete  choisies.  En
  fonction  de ce qu'il a trouve, il cree un fichier 'Makefile' a partir
  du 'Makefile.in' fourni avec term.

  Deux des plus importantes options a configurer sont --root  et  --user
  qui  determinent  si  term  doit  etre  installe  par  _r_o_o_t  ou par un
  utilisateur classique. D'autres options peuvent  etre  utilisees  pour
  installer  term  a votre gout (dans une arborescence non standard, par
  exemple).

  1. Compilation de term en mode prive sans _r_e_s_e_a_u _t_e_r_m _i_n_t_e_g_r_a_l.

     Pour installer term de cette facon, vous devez lancer les commandes
     (que   ce   soit  en  tant  que  _r_o_o_t  ou  en  tant  qu'utilisateur
     ordinaire) :

       ./configure --root OU --user
       make install installman

  Ceci construit les executables, les installe et installe les pages  de
  manuel.

  2. Compilation de term en mode prive avec _r_e_s_e_a_u _t_e_r_m _i_n_t_e_g_r_a_l.

     Pour installer term de cette facon, vous devez lancer les commandes
     (que  ce  soit  en  tant  que  _r_o_o_t  ou  en   tant   qu'utilisateur
     ordinaire) :

       ./configure --root OU --user
       make installnet installman

  Ceci  construit les executables, les installe et installe les pages de
  manuel.

  3. Compilation de term en mode partage sans _r_e_s_e_a_u _t_e_r_m _i_n_t_e_g_r_a_l.

     Pour installer term de cette facon, vous devez lancer les commandes
     (que   ce   soit  en  tant  que  _r_o_o_t  ou  en  tant  qu'utilisateur
     ordinaire) :

       ./configure --root OU --user
       make share installman

  Ceci construit les executables, les installe et installe les pages  de
  manuel.

  4. Compilation de term en mode partage avec _r_e_s_e_a_u _t_e_r_m _i_n_t_e_g_r_a_l.

     Pour installer term de cette facon, vous devez lancer les commandes
     (que  ce  soit  en  tant  que  _r_o_o_t  ou  en   tant   qu'utilisateur
     ordinaire) :

       ./configure --root OU --user
       make share installnet installman

  Ceci  construit les executables, les installe et installe les pages de
  manuel.

  44..33..22..  CCoommppiillaattiioonn ddee tteerrmm, versions 1.16 a 1.19

  Pour installer ces versions de term  vous  pouvez  choisir  l'une  des
  procedures suivantes :

  1. Compilation   de   term  en  mode  prive,  en  tant  qu'utilisateur
     ordinaire.

  2. Compilation  de  term  en  mode  partage,  en  tant  qu'utilisateur
     ordinaire.

  3. Compilation de term en mode prive, en tant que _r_o_o_t.

  4. Compilation de term en mode partage, en tant que _r_o_o_t.

  Comment  activer/desactiver  les  fonctionnalites  de  partage de term
  durant la compilation est explique ci-apres.

  1. Vous etes un utilisateur ordinaire (pas de compte _r_o_o_t) et vous  ne
     souhaitez   PAS   partager   votre  connexion  term  avec  d'autres
     utilisateurs.

     Installez term de la facon suivante :

       make DO=install OS-type
       make installman

  Ceci compile puis installe term, ses clients et les pages de manuel.

  Il vous faut de plus  creer  un  repertoire  '$HOME/.term'.  C'est  le
  repertoire dans lequel term recherchera son fichier 'termrc'.

  2. Vous  etes  un  utilisateur  ordinaire (pas de compte _r_o_o_t) et vous
     souhaitez partager votre connexion term avec d'autres utilisateurs.

     Installez term de la facon suivante :
       make DO=installshare USERSHARE=$HOME/term OS-type
       make installman

  Ceci compile puis installe term, ses clients et les pages de manuel.

  Il  vous  faut  de  plus  creer  un  repertoire '$HOME/.term' (nom par
  defaut) avec les droits drwxrwxr-x. Dans ce repertoire, vous trouverez
  au  moins  la  _s_o_c_k_e_t  utilisee  par term pour sa connexion ('tmp/pri-
  vate/socket=').

  3. Vous etes _r_o_o_t et vous ne souhaitez PAS  partager  votre  connexion
     term avec d'autres utilisateurs.

     Installez term de la facon suivante :

       make DO=install OS-type
       make installman

  Ceci compile puis installe term, ses clients et les pages de manuel.

  Il  vous  faut  de plus creer un repertoire '/usr/local/lib/term' (nom
  par defaut) avec les droits drwxrwxr-x. Dans ce repertoire, vous trou-
  verez  au  moins  la  _s_o_c_k_e_t  utilisee  par  term  pour  sa  connexion
  ('tmp/private/socket=').

  4. Vous etes _r_o_o_t et vous souhaitez partager votre connexion term avec
     d'autres utilisateurs.

     Tout  d'abord,  assurez-vous  d'avoir  lu  la  partie concernant le
     partage.

     Installez term de la facon suivante :

       make DO=installshare OS-type
       make installman

  Ceci compile puis installe term, ses clients et les pages de manuel.

  Il vous faut de plus creer un  repertoire  '/usr/local/lib/term'  (nom
  par  defaut)  dont le proprietaire est le groupe _t_e_r_m, avec les droits
  drwxrwxr-x. Dans ce repertoire, vous  trouverez  au  moins  la  _s_o_c_k_e_t
  utilisee par term pour sa connexion ('tmp/private/socket=').

  44..33..33..  CCoommppiillaattiioonn ddee tteerrmm, versions 1.15 et anterieures

  La  compilation  de  ces  versions  de  term  ne  devrait pas requerir
  d'autres commandes que :

    make DO=install OS-type
    make installman

  Ceci compile puis installe term, ses clients et les pages  de  manuel.
  Tout est alors pret a l'emploi.
  Il  vous  faut  de  plus  creer  un repertoire '$HOME/.term'. C'est le
  repertoire dans lequel term recherchera son fichier 'termrc'.

  Les seules choses que vous pourrez souhaiter  modifier  sont  certains
  des chemins du 'Makefile' et certaines options du compilateur.

  44..44..  cclliieenntt..aa,, lliibbtteerrmmnneett..aa,, lliibbtteerrmmnneett..ssaa,, lliibbtteerrmmnneett..ssoo

  Une  bibliotheque  est  fournie  avec term. Elle propose des fonctions
  pour les clients term.

  Jusqu'a la version 1.16, cette  bibliotheque  etait  nommee  client.a.
  Elles  etait  batie lors de la compilation de term, puis utilisee lors
  de celle des clients. Elle n'etait installee dans aucun repertoire.

  Depuis la version 1.16,  cette  bibliotheque  s'appelle  libtermnet.a.
  Jusqu'a  la version 1.19, elle est creee dans le repertoire term, puis
  utilisee pour la compilation des clients term.  Elle  n'est  installee
  nulle part ailleurs.

  A   partir   de  la  version  2.0.0,  libtermnet.so  et  libtermnet.sa
  (bibliotheque partagee et donnees exportees et  initialisees  pour  la
  bibliotheque)  sont  egalement  creees lors de la compilation de term.
  Lors de l'installation de l'ensemble des composantes du paquetage, ces
  trois  bibliotheques  (libtermnet.a,  libtermnet.so  et libtermnet.sa)
  sont installees dans le repertoire '/usr/local/lib' (par  defaut).  Un
  lien  est  ensuite  cree  de libtermnet.so.2.x.x vers libtermnet.so.2.
  Finalement, ldconfig est lance  pour  creer  les  liens  et  le  cache
  necessaires  (pour  le  _l_i_n_k_a_g_e a l'execution, par ld.so). ld.so tient
  compte des versions les plus recentes des bibliotheques trouvees  dans
  les  repertoires  precises  dans la ligne de commande, dans le fichier
  '/etc/ld.so.conf' et dans les repertoires  alors  etre  utilisees  par
  tous  les  clients  term  qui  sont  construits avec des bibliotheques
  dynamiques plutot que statiques. Ces bibliotheques  peuvent  egalement
  etre  utilisees pour le portage de vos propres programmes afin de leur
  permettre d'utiliser les fonctionnalites de term (voir plus loin).

  44..55..  VVaarriiaabblleess dd''eennvviirroonnnneemmeenntt

  term reconnait un certain  nombre  de  variables  d'environnement  qui
  peuvent  etre positionnees par les utilisateurs. Les trois premieres a
  etre detaillees sont :

  +o  termDIR

  +o  termSHARE

  +o  termMODE

  Grace a ces variables, il vous est possible de controler la facon dont
  term s'execute.

  Pour  les  versions  de  term  1.15  et anterieures, seule la variable
  termDIR  est  importante  (ces  versions  ne  proposent  pas  le  mode
  partage).   Pour   ces  versions,  positionnez  termDIR  de  la  facon
  suivante :

    setenv termDIR $HOME     (csh ou tcsh)
    export termDIR=$HOME     (ksh ou bash)

  A partir de la version 1.16, term reconnait  egalement  les  variables
  termSHARE et termMODE.  Grace a ces variables, on peut indiquer a term
  s'il doit fonctionner en mode prive ou  partage.  Comment  positionner
  ces variales pour les modes prive et partage est explique ci-apres.

  termMODE peut avoir l'une des trois valeurs suivantes :

  +o  0 = prive

  +o  1 = partage (systeme)

  +o  2 = partage (utilisateur)

  1. On  peut  utiliser term en mode prive en positionnant les variables
     termDIR et termMODE de la facon suivante :

     En csh ou tcsh :

       setenv termDIR $HOME
       setenv termMODE 0

  En ksh ou bash :

    export termDIR=$HOME
    export termMODE=0

  2. Il y a deux manieres de positionner  les  variables  pour  utiliser
     term en mode partage :

     a. Lorsque  term  est  installe  comme  un  programme  _S_U_I_D,  seule
        termMODE doit etre positionnee.

          setenv termMODE 2    (csh ou tcsh)
          export termMODE=2    (ksh ou bash)

     b. Lorsque term est installe  comme  un  programme  _S_G_I_D,  il  faut
        positionner les variables comme suit :

        En csh ou tcsh :

          setenv termMODE 1
          setenv termDIR /usr/local/lib/term
          setenv termSHARE $termDIR

     En ksh ou bash :

       export termMODE=1
       export termDIR=/usr/local/lib/term
       export termSHARE=$termDIR

     Positionner  les  variables  de cette maniere permet d'utiliser les
     anciens clients (_l_i_n_k_e_s avec une ancienne version de  client.a)  en
     mode partage.

  A  partir  de  la  version 2.0.0, term reconnait egalement la variable
  termSERVER. Celle-ci doit etre positionnee si vous possedez  plusieurs
  modems  et  utilisez  plus  d'une  connexion  a la fois. Pour preciser
  quelle connexion utiliser, il  faut  lancer  term  avec  le  nom  d'un
  serveur.

    nohup term -v /dev/modem1 Connection1 &
    nohup term -v /dev/modem2 Connection2 &

  Les  utilisateurs doivent alors positionner la variable termSERVER sur
  le nom de la connexion qu'ils souhaitent utiliser :

    setenv termSERVER Connection1   (csh ou tcsh)
    export termSERVER=Connection2   (ksh ou bash)

  44..66..  TTeesstt ddee tteerrmm

  Tapez make test (ou make termtest pour les versions recentes de  term)
  afin  de  compiler  le demon de test de term. (term)test fonctionne en
  executant deux  occurences  de  term  sur  votre  systeme,  une  copie
  'locale'  et une copie 'distante'. Chacune d'elles lira votre 'termrc'
  de facon a ce que vous puissiez en  ajuster  le  comportement.  Lancez
  (term)test  maintenant.  Vous devriez etre en mesure de lancer un trsh
  et un tupload. Essayez :

    tupload ./term /usr/tmp

  ceci devrait placer une copie de l'executable term dans le  repertoire
  '/usr/tmp'.   La  sortie  du  term  local  apparait  dans  le  fichier
  'local.log', celle du term distant  dans  'remote.log'.   Vous  pouvez
  lancer  term avec l'option -d255 de facon a ce que des informations de
  deboguage soient incluses dans ces fichiers ou pour vous permettre  de
  deboguer votre 'termrc'.

  NOTE  : lancez test par la commande ./test de facon a ne pas lancer le
  test du systeme.

  44..77..  tteerrmm et les programmes de communication

  Avant de pouvoir utiliser term, il faut avoir etabli une connexion par
  modem,  par  l'intermediaire  d'un  programme de communication tel que
  kermit ou seyon. La documentation de votre programme de  communication
  vous  fournira  les  informations  dont  vous  aurez  besoin pour vous
  connecter a une machine distante.

  Lorsque vous avez etabli la connexion avec  la  machine  distante,  il
  vous faut interrompre ou quitter votre programme de communication pour
  pouvoir utiliser  term,  mais  sans  couper  la  connexion.  Ceci  est
  necessaire pour eviter que le programme de communication subtilise des
  caracteres a linecheck ou term.
  Comment s'assurer que la connexion reste active et que le programme de
  communication  ne s'approprie pas certains caracteres est explique ci-
  apres, pour quelques exemples.

  44..77..11..  kkeerrmmiitt

  Il est facile de lancer term lorsque vous utilisez kermit : a l'invite
  de  kermit, tapez la commande suspend. Vous voila de retour a l'invite
  de Linux. A partir de la, vous pouvez etablir votre connexion term.

  44..77..22..  sseeyyoonn

  Un moyen facile de lancer linecheck ou term a partir de seyon  est  de
  les   placer   dans   le   menu  _T_r_a_n_s_f_e_r  (controle  par  le  fichier
  '$HOME/.seyon/protocols').

  Dans le fichier '$HOME/.seyon/protocols', ajoutez :

    "linecheck" "$cd /tmp; linecheck"
    "term" "$term -c off -w 10 -t 150 -s 38400 -l $HOME/tlog"

  Ainsi, lorsque vous voulez lancer linecheck ou  term  sur  la  machine
  locale,  vous  pouvez  selectionner le menu _T_r_a_n_s_f_e_r, choisir l'option
  _l_i_n_e_c_h_e_c_k ou _t_e_r_m, puis _G_o.

  Bien entendu, il est toujours  possible  d'utiliser  le  bouton  _s_h_e_l_l
  _c_o_m_m_a_n_d  et  de  taper 'linecheck' ou 'term' dans la boite de dialogue
  _p_o_p_-_u_p. Ceci redirige automatiquement l'entree et la sortie.

  44..88..  RReennddoonnss llaa lliiaaiissoonn ttrraannssppaarreennttee

  Supposons que  vous  savez  etablir  une  connexion  modem  entre  vos
  machines  locale et distante. De facon typique, vous numerotez grace a
  un serveur de terminal quelconque pour vous  connecter  a  la  machine
  distante.  Vous  utilisez  egalement  quelque  logiciel d'emulation de
  terminal, tel que kermit ou seyon pour dialoguer avec votre modem (les
  exemples  fournis  dans ce document utilisent kermit, puisque c'est ce
  dont l'auteur se sert). Si vous avez des problemes avec votre modem ou
  avec  votre  logiciel  de  terminal, reportez-vous au Serial-HOWTO, il
  devrait vous permettre de les regler.

  Une fois votre liaison etablie, il faut la rendre  aussi  transparente
  que possible. Etudiez les commandes de votre serveur de terminal (_h_e_l_p
  ou _? sont en general un bon debut).  Choisissez  les  options  8  bits
  chaque fois que cela est possible. Il est possible que cela influe sur
  la facon de vous connecter a un systeme. Si le serveur utilise rlogin,
  par  exemple,  il  faudra  peut-etre  utiliser  l'option -8 afin de le
  rendre  transparent.  Faites  particulierement  attention  a  ne   pas
  utiliser  le  controle  de flux XON/XOFF. Essayez plutot d'utiliser le
  controle de flux RTS/CTS (_h_a_r_d_w_a_r_e). L'etude de  la  documentation  de
  votre modem vous apprendra certainement comment le configurer pour des
  communications RTS/CTS 8 bits.

  44..99..  LLaannccoonnss lliinneecchheecckk

  AATTTTEENNTTIIOONN :: dans certains documents, les  options  de  linecheck  sont
  donnees  dans  un  ordre  incorrect.   L'auteur les a controlees et en
  donne ici l'ordre correct.

  NNOOTTEE :: a partir de la version  2.3.0,  il  n'est  plus  necessaire  de
  fournir  a linecheck le nom d'un fichier de _l_o_g. La sortie sera ecrite
  dans le fichier 'linecheck.log', dans le repertoire d'ou  linecheck  a
  ete lance.

  linecheck   est   un   programme  fourni  avec  term  qui  verifie  la
  transparence d'une liaison et fournit des informations utiles pour une
  configuration  correcte  de  term.  linecheck  envoie  chacun  des 256
  caracteres 8 bits possibles sur la liaison et verifie que tous ont ete
  transmis  correctement.  Il  faut  indiquer a term quels caracteres ne
  peuvent pas etre transmis sur la liaison, ce que linecheck  permet  de
  reperer. linecheck doit etre utilise une fois que la liaison modem est
  aussi transparente que possible. Pour lancer linecheck, procedez comme
  suit :

  1. Sur le systeme distant, lancez :

       linecheck linecheck.log

  2. Revenez  a  votre  systeme  local et interrompez votre programme de
     communication (voir au-dessus).

  3. Sur le systeme local, lancez :

       linecheck linecheck.log > /dev/modem < /dev/modem

  Lorsque  linecheck   est   termine,   les   fichiers   'linecheck.log'
  contiennent  un  ensemble  de  nombres,  places  a la fin. Ce sont les
  caracteres qui doivent etre _e_v_i_t_e_s dans le exemple, le 'linecheck.log'
  local  ne disait rien et le 'linecheck.log' distant indiquait d'_e_v_i_t_e_r
  29 et 157. C'est pourquoi son 'termrc'  local  _e_v_i_t_e  ces  caracteres,
  alors  que  son  'termrc'  distant n'en _e_v_i_t_e aucun. Si l'on _e_v_i_t_e des
  caracteres d'un cote, il faut les _i_g_n_o_r_e_r de l'autre. C'est  pourquoi,
  l'auteur doit _i_g_n_o_r_e_r 29 et 157 sur son systeme distant.

  Si linecheck se plante, essayez :

    linecheck linecheck.log 17 19

  sur le systeme distant et :

    linecheck linecheck.log 17 19 > /dev/modem < /dev/modem

  sur  le  systeme  local.  Ceci  a  pour  effet  de  ne pas envoyer les
  caracteres de controle de flux XON/XOFF qui plantent  votre  ligne  si
  vous  utilisez  un  controle  de  flux  logiciel.  Si  cela  resoud le
  probleme, _e_v_i_t_e_z_/_i_g_n_o_r_e_z 17 et 19 dans les  deux  'termrc'.  Si  votre
  serveur  de  terminal  est sensible a d'autres caracteres, procedez de
  meme.  Il  est  possible  d'identifier  de  tels  caracteres   lorsque
  linecheck  se  plante : tuez-le puis examinez les fichiers de _l_o_g. Les
  derniers caracteres  transmsis  sont  de  bons  coupables  potentiels.
  Essayez a nouveau en _e_v_i_t_a_n_t ces caracteres.

  En resume, le 'termrc' local de l'auteur se presente ainsi :

    escape 29
    escape 157

  et son 'termrc' distant ainsi :

    ignore 29
    ignore 157

  puisque le 'linecheck.log' _d_i_s_t_a_n_t indiquait _d_'_e_v_i_t_e_r 29 et 157.

  44..1100..  EEssssaayyoonnss ddee llaanncceerr tteerrmm

  Connectez-vous   au   systeme  distant  et  rendez  la  liaison  aussi
  transparente que possible (si ca n'est deja fait). Lancez-y term,  par
  exemple de la facon suivante :

    exec term -r -l $HOME/tlog -s 38400 -c off -w 10 -t 150

  Examinons  une  a une les options de cette ligne de commande (que nous
  aurions tout aussi bien pu inclure dans le

  exec signifie que le programme  (term,  en  l'occurence)  remplace  le
  _s_h_e_l_l  a  partir duquel il est lance. On utilise exec lorsque l'on n'a
  plus l'intention de se servir du _s_h_e_l_l concerne; on economise ainsi la
  memoire.  Cependant,  lors  de la mise au point de la liaison, il peut
  etre prudent de ne pas faire un exec, de facon a pouvoir tuer le  term
  distant.

  L'option  -r doit etre utilisee a une et une seule extremite. Celle-ci
  sera alors vue par term comme l'extremite distante de la liaison  (qui
  peut  donc  etre  votre  machine  locale).  Si  cette option n'est pas
  utilisee d'un cote ou de l'autre, term se plantera spontanement.

  -l $HOME/tlog permet de consigner toutes les erreurs dans  le  fichier
  'tlog',  place dans votre repertoire  utilisateur. Celui-ci etant tres
  utile pour les mises au point, il n'y  a  pas  de  raison  de  ne  pas
  utiliser cette option.

  -s  38400  :  l'auteur dispose d'un modem 14400 _b_p_s, avec compression.
  Afin d'obtenir des taux de compression optimaux, il faut  envoyer  les
  bits  aussi  vite  que  possible.  Pour  un  modem  plus lent, il faut
  utiliser une valeur plus  faible.  Notez  que  si  vous  possedez  une
  machine  "lente"  dotee  de  ports  series disposant d'UART 16450, des
  valeurs de _b_p_s trop importantes risquent de provoquer  des  pertes  de
  donnees  en  surchargeant le port serie.  term est capable de corriger
  ceci, mais si les fichiers de  _l_o_g  comportent  de  nombreux  messages
  d'erreur  (ou  si  vous  recevez de nombreux _w_a_r_n_i_n_g_s des noyaux linux
  0.99pl15 ou plus recents), il  serait  plus  sage  de  diminuer  cette
  valeur.

  -c  off  : cette option desactive la compression. Lorsque l'on dispose
  d'un modem qui assure deja la compression des donnees,  il  n'est  nul
  besoin de les compresser une seconde fois.

  -w 10 -t 150 : ici encore, cette option permet d'optimiser une liaison
  modem rapide. La valeur de la fenetre est 10 et celle du _t_i_m_e_o_u_t  150,
  selon les recommendations de la page de manuel de term_setup.

  Revenez  sur  votre  machine  locale et interrompez votre programme de
  communication (voir ci-dessus). Il est preferable qu'il ne tourne  pas
  en  meme temps que term, car il risque d'entrer en conflit avec lui au
  niveau du port serie. Si vous parvenez a convaincre votre programme de
  communication  de  ne  pas raccrocher la ligne lorsque vous en sortez,
  vous pouvez le quitter.

  Il faut maintenant lancer le term local :

    term -c off -l $HOME/tlog -s 38400 -w 10 -t 150 < /dev/modem > /dev/modem &

  Il faut indiquer a term ou se trouve le modem.  C'est  pourquoi  a  la
  fois l'entree et la sortie standards sont redirigees vers '/dev/modem'
  (c'est le role de < et >). Enfin, la commande est lancee  en  arriere-
  plan,  de  facon a pouvoir continuer a utiliser le terminal pour autre
  chose, si on le souhaite.

  term devrait maintenant fonctionner :-). Essayez un trsh  et  regardez
  ce  qui  se  produit.  Si  cela  plante  ou  si  votre  liaison semble
  excessivement lente, jetez un coup d'oeil aux fichiers 'tlog' places a
  chaque   extremite.  Contiennent-ils  des  _t_i_m_e_o_u_t_s  ou  des  messages
  d'erreur ? Si c'est le  cas,  quelque  chose  ne  va  pas  dans  votre
  configuration.  Essayez a nouveau (apres avoir fini de lire ceci :-)).
  Notez qu'il est normal que la connexion ne  semble  pas  rapide  comme
  l'eclair,  surtout  si  vous  utilisez  la compression. Les meilleures
  performances sont obtenues lors d'echanges tels que  le  transfert  de
  fichiers.

  44..1111..  MMeettttrree ffiinn aa uunnee ccoonnnneexxiioonn tteerrmm

  Il  est probable qu'apres avoir effectue un certain nombre de travaux,
  vous souhaiterez mettre fin a votre connexion  term.  Ceci  peut  etre
  fait de quatre facons :

  1. Tuer les programmes term a chaque extremite de la liaison. C'est la
     methode la moins recommandee.

  2. Une methode un peu plus elegante est de taper la commande  suivante
     sur la machine locale :

       echo '00000' > /dev/modem

  Ceci devrait mettre fin a votre connexion term proprement. Cette meth-
  ode fonctionne avec toutes les versions de term. Assurez vous  que  la
  suite de zeros en contient bien au moins _c_i_n_q.

  3. Dans  le  'termrc'  des versions de term 2.0.0 et ulterieures, vous
     pouvez ajouter une entree terminate '<une chaine  de  caracteres>'.
     Ceci   indique  la  chaine  qu'utilisera  term  pour  s'interrompre
     ('00000' par  defaut).  Elle  doit  etre  longue  d'au  moins  cinq
     caracteres afin d'eviter toute terminaison intempestive.

  4. A  partir de la version 1.14, un programme tshutdown est fourni (en
     fait, il s'agit d'un _p_a_t_c_h pour la version  1.14  et  est  dans  le
     paquetage  pour  les  versions  plus recentes). tshutdown permet de
     mettre fin proprement a votre connexion term.

  44..1122..  EEffffaacceerr tteerrmm

  Bien, vous l'aurez voulu ! Puisque certains d'entre  vous  veulent  se
  debarasser de term, nous indiquons ici les etapes a suivre.

  +o  Effacez les repertoires et leur contenu. Suivant la facon dont vous
     avez installe term, un ou plusieurs des  repertoires  suivants  est
     present sur votre machine :

       $HOME/.term/termrc
       $HOME/.term/termrc.<server>
       $HOME/term/termrc
       $HOME/term/termrc.<server>
       /usr/local/lib/term/termrc
       /usr/local/lib/term/termrc.<server>
       /etc/termrc
       /etc/termrc.<server>

  Vous  pouvez  effacer  simultanement  ces repertoires et leur contenu.
  Pour ce faire, utilisez la commande rm -rf.

  +o  Dans  certains  cas,  vous  avez  cree  un  groupe  _t_e_r_m  lors   de
     l'installation. Verifiez le fichier

  +o  Il  faut  maintenant  effacer  le paquetage term ainsi que tous les
     executables modifies pour term. C'est la partie la  plus  delicate.
     Les executables du paquetage de term doivent normalement se trouver
     dans le repertoire '/usr/local/bin' ou le repertoire '$HOME/bin'.

     En ce qui concerne les executables que vous avez modifies vous-meme
     pour  une  utilisation  avec  term,  c'est  a vous de voir, nous ne
     pouvons pas vous aider. Pensez egalement a effacer les fichiers  de
     configuration ou autres qui correspondent a ces programmes.

  +o  Pour effacer les bibliotheques, lancez les commandes suivantes :

       cd /
       find . -name 'libtermnet*' -exec /bin/rm {}

  Ceci localisera et effacera les bibliotheques.

  +o  Pour effacer le fichier 'termnet.h', le plus simple est de taper :

       cd /
       find . -name termnet.h -exec /bin/rm {}

  +o  Si vous avez installe les pages de manuel de term, elles doivent se
     trouver dans l'un des repertoires suivants :

       /usr/local/man/man1
       /usr/local/man/cat1
       $HOME/man/man1
       $HOME/man/cat1

  Il vous faut au minimum controler la  presence  des  pages  de  manuel
  suivantes  :  term,  term_clients,  term_setup,  tdownload, linecheck,
  trdate, trdated, termrc,  termtest,  tmon,  tredir,  trsh,  tshutdown,
  tudpredir, tupload, txconn et finalement tiptest.

  +o  Effacez  le  repertoire  utilisateur  temporaire et son contenu. Il
     s'agit du repertoire

  Une fois ce petit exercice termine, vous pouvez etre quasiment certain
  d'avoir efface tout ce qui concerne term.

  44..1133..  OOppttiimmiissaattiioonn ddee llaa lliiaaiissoonn

  Une  fois  que  vous avez reussi a faire fonctionner term, pourquoi ne
  pas essayer d'optimiser un peu les choses ? Un bon moyen de mesurer la
  vitesse  de  transmission de votre liaison est de lancer tmon dans une
  fenetre tout en telechargeant un fichier dans une autre. Essayez  avec
  de  gros  fichiers  de  texte  et  avec  des  fichiers compresses. Les
  fichiers textes devraient etre transferes environ deux fois plus  vite
  que  les  fichiers compresses. Les parametres sur lesquels vous pouvez
  jouer sont les _b_p_s (-- (N.D.T.) Le document original  parle  de  _b_a_u_d,
  mais  il s'agit d'une erreur commune :-)--) (-s), la compression (-c),
  la taille de fenetre (-w), les _t_i_m_e_o_u_t_s (-t) et le recyclage (-A).

  Attention au parametre de recyclage. Avec term version 1.19,  l'auteur
  a  obtenu  une  perte  de  80% a 90% lorsqu'il a utilise ce parametre.
  Peut-etre est-ce une bogue de la version 1.19 et n'est-ce valable  que
  pour cette version.

  bps  :  il s'agit du nombre maximal de bits que term tentera d'envoyer
  sur la liaison serie.  term  evitera  d'envoyer  des  caracteres  plus
  rapidement.  Par  defaut, utilisez la vitesse des ports serie de votre
  ordinateur, mais soyez conscient que cela risque d'etre trop rapide si
  votre  modem  fonctionne  a  une  vitesse  plus  faible  sur  la ligne
  telephonique. Cette option est prevue pour les  systemes  qui  placent
  les  donnees  dans  un tampon. Lors de l'installation et de la mise au
  point, il est conseille d'utiliser des valeurs faibles plutot que  des
  valeurs trop importantes. Pour des liaisons a haute vitesse (> 38400),
  il peut etre avantageux de ne pas imposer de limite  en  utilisant  la
  valeur 'off'. term ne s'appuiera alors que sur le noyau pour effectuer
  le controle de flux.

  Compression : a utiliser si votre modem  n'effectue  pas  lui-meme  la
  compression.  S'il  la fournit, desactivez cette option afin de ne pas
  compresser deux fois les memes donnees, ce qui _a_u_g_m_e_n_t_e a coup sur  le
  volume  de  donnees  transmis. Les modems assurant la compression sont
  ceux qui utilisent les  protocoles  MNP-5  ou  V42.bis.  Consultez  la
  documentation  de  votre modem et les messages qu'il envoie lors d'une
  connexion.

  Fenetre : c'est le nombre de  paquets  de  donnees  que  term  accepte
  d'envoyer  sur la liaison avant de recevoir un acquittement de la part
  du term distant.  Avec  un  modem  rapide,  il  peut  etre  avantageux
  d'augmenter  ce  parametre. Pour les liaisons plus lentes, cela risque
  de surcharger l'extremite distante.

  Timeout : il s'agit de  la  duree  pendant  laquelle  term  attend  un
  acquittement. Si vous avez augmente la taille de la fenetre et obtenez
  de nombreux _t_i_m_e_o_u_t_s dans vos fichiers de _l_o_g, essayez d'augmenter  ce
  parametre.

  Pour  un  modem 14400/V42.bis, l'auteur utilise -c off -w 10 -t 150 et
  obtient environ 1700 _c_p_s pour les fichiers compresses et 3500 _c_p_s pour
  les fichiers texte, les transfert etant effectues avec tupload.

  44..1144..  PPrroobblleemmeess ccllaassssiiqquueess

  Dans cette partie sont exposees quelques demarches classiques a suivre
  lorsque l'utilisation de term ou de l'un  de  ses  clients  vous  pose
  probleme.

  +o  Avez-vous  bien  nettoye  l'arborescence  de term ? L'apparition de
     nouvelles versions de term est allee de  pair  avec  de  nombreuses
     modifications  de  l'arborescence  '/usr/local/lib/term'.  Si  vous
     n'etes pas conscient de cela, vous risquez de  voir  apparaitre  de
     nombreux  messages  d'erreur.  Le  mieux  dans ce cas est d'effacer
     l'arborescence   '/usr/local/lib/term'   (en   prenant   soin    de
     sauvegarder  votre  'termrc') et d'installer ensuite votre nouvelle
     version de term. Ainsi, vous  devriez  eviter  de  vous  creer  des
     problemes avec une arborescence inadequate.

  +o  Avez-vous  efface  les vieilles _s_o_c_k_e_t_s ? Lors de la mise a jour de
     term, effacez toutes les _s_o_c_k_e_t_s (appelees  'socket=')  creees  par
     term.  Ne  pas le faire vous expose a d'etranges problemes. Afin de
     determiner a l'ecoute de quelle _s_o_c_k_e_t se trouve term, vous  pouvez
     utiliser le programme netstat.

  +o  term  ne  se  compile  pas corectement sous SunOS 4.1.3 ? C'est que
     vous avez probablement configure term avec ./configure --user. Lors
     de  la compilation, vous voyez apparaitre une erreur d'assembleur a
     propos d'une option '-k'. La cause de cette erreur est inconnue. La
     solution  est  de configurer term avec des bibliotheques statiques.
     Il vous faut donc utiliser ./configure --user --static et continuer
     la  compilation  de  facon  normale. Tout devrait alors se derouler
     normalement.

  +o  termtest vous donne une erreur : 'term: failed to connect  to  term
     socket  '/root/.term/sockettest''  ?  Lorsqu'il est lance, termtest
     s'attend a trouver l'executable term dans le repertoire ou  il  est
     lui-meme.  Lorsque  vous  faites  un  make  install avant de lancer
     termtest, l'executable term est deplace dans  '/usr/local/bin'  (ou
     dans un autre repertoire d'executables).

     La  solution  consiste  a  creer  un lien vers l'executable dans le
     repertoire source :

       ln -s /usr/local/bin/term /usr/src/term-<numero_version>/term

  +o  Lancez-vous bien le bon executable ? term a ete mis  a  jour  a  de
     nombreuses   reprises  et  bon  nombre  de  systemes  en  possedent
     differentes versions. Assurez-vous  d'utiliser  la  bonne  version.
     Notez  que  cela  s'applique  egalement  a  linecheck.  Vous pouvez
     utiliser la commande type -a de bash ou bien  la  commande  whereis
     pour  determiner  quel  est  le  programme  qui  est  execute.  Les
     versions de term posterieures a la 1.11 affichent normalement  leur
     numero  de  version  au demarrage (bien que la 1.14 pretende n'etre
     que la 1.12. Et oui !).

  +o  Avez-vous mis le bon 'termrc' au bon endroit ? Suivant les versions
     de term que vous utilisez et la facon dont vous l'avez installe (en
     tant que _r_o_o_t ou  en  tant  qu'utilisateur),  ce  fichier  peut  se
     trouver dans l'un des repertoires suivants :

       $HOME/.term/termrc
       $HOME/.term/termrc.<server>
       $HOME/term/termrc
       $HOME/term/termrc.<server>
       /usr/local/lib/term/termrc
       /usr/local/lib/term/termrc.<server>
       /etc/termrc
       /etc/termrc.<server>

  Certains  systemes  sont  fournis  avec  des  fichiers  'termrc'  pre-
  installes. Assurez-vous de les  avoir  detruit  avant  de  proceder  a
  l'installation.  Si vous faites l'installation en tant que _r_o_o_t, veri-
  fiez '/.term'. Lors de son execution, term cree des fichiers (qui sont
  en  fait des _s_o_c_k_e_t_s). C'est pourquoi il possede son propre repertoire
  '$HOME/.term' dans lequel est place le fichier 'termrc'  (notez  qu'il
  n'y a PAS de . devant 'termrc' !).

  +o  term  trouve-t-il  son  fichier 'termrc' ? Lorsque vous lancez term
     des deux cotes, vous devriez voir des messages tels que :

       term version: 2.2.9
       Reading file:  /usr/local/lib/term/termrc
       Using shared mode.

  Si la seconde ligne n'apparait pas, c'est que term ne  trouve  pas  le
  fichier  'termrc'  et  vous pouvez etre sur que quelque chose ne s'est
  pas  deroule  normalement  lors  de  l'installation  (sauf   si   vous
  n'utilisez  pas de fichier 'termrc' et entrez tous les parametres dans
  la ligne de commande :-)).  Verifier la localisation et les droits  du
  fichier 'termrc' sur le systeme ou term ne le trouve pas.

  +o  term  ou votre repertoire '.term' est-il monte par NFS ? Si tel est
     le cas, il faut utiliser  l'option  -Dterm_NFS_DIR  dans  la  ligne
     CFLAGS du 'Makefile'. Malheureusement, en ce qui concerne l'auteur,
     ce parametre provoque une erreur de compilation lorsque  term  1.19
     est compile sur une machine sous SunOS 4.*.

  +o  Tous  les fichiers et repertoires ont-ils les bons proprietaires et
     des droits adequats ? Cela ne devrait pas etre un probleme dans  la
     mesure  ou  les proprietaires et les droits sont determines lors de
     l'installation. Neanmoins, soyez  conscient  de  ce  fait  si  vous
     effectuez  le  portage pour term de vos propres applications. Si de
     plus vous modifier le mode d'execution  de  term  (c'est-a-dire  du
     mode  _p_r_i_v_e  vers  le mode _p_a_r_t_a_g_e), il faut changer en consequence
     les proprietaires et les droits des fichiers.
  +o  Si  vous  obtenez  une  erreur  gethostbyname:   <hostname>:   Non-
     authoritative  `host  not  found',  ou  server failed, il vous faut
     verifier les points suivants :

     1. Le fichier  '/etc/hosts'  est-il  configure  correctement  ?  Si
        <hostname>  n'est  pas  le  nom  de  votre machine (les vieilles
        distributions _S_L_S et les distributions _S_l_a_c_k_w_a_r_e  sont  fournies
        avec telle que :

          # Local Hosts Format:
          #  IP_NUMBER            HOSTNAME        ALIASES
          #
          # Here is the name of your host, first, followed by any aliases
          127.0.0.1       localhost       linuxpc.domain  linuxpc

     2. Vos  fichiers '/etc/rc*' et '/etc/resolv.conf' sont-ils lisibles
        (chmod ugo+r) ?

     3. Verifez enfin que vous avez installe l'interface TCP/IP loopback
        sur votre machine.

  +o  Les fichiers de _l_o_g de term sont remplis de messages 'timed out' de
     tous types ? Cela signifie que votre connexion n'est pas optimisee.
     Quelques  messages  de ce type de temps en temps ne posent guere de
     probleme. Ils sont sans doute dus a des facteurs temporels influant
     sur  la  qualite de la connexion physique entre vos machines locale
     et distante.

     Si, en revanche, le nombre de ces messages est  tres  eleve,  votre
     connexion sera fortement ralentie. Il vous faut alors jouer sur les
     parametres presentes dans la partie '_O_p_t_i_m_i_s_a_t_i_o_n _d_e  _l_a  _l_i_a_i_s_o_n'.
     C'est   malheureusement   la   partie   la  plus  experimentale  de
     l'installation. Aucune regle definitive concernant les valeurs  des
     parametres  ne  peut  etre  donnee,  tant les facteurs susceptibles
     d'influencer la qualite de la connexion sont nombreux. Ces facteurs
     varient  d'une  connexion  a  l'autre et meme d'un moment a l'autre
     pour une meme connexion.

  +o  Un ftp normal avec des  ports  rediriges  ne  fonctionne  pas  chez
     vous  ?  C'est  un probleme connu : la redirection des ports requis
     par ftp (les ports 20 et 21) ne permet pas a ftp de fonctionner. La
     seule  solution  est  de  recuperer un ftp modifie pour fonctionner
     avec term. Malheureusement, meme de telles versions de ftp semblent
     ne pas fonctionner.

  55..  LLeess cclliieennttss tteerrmm

  Un  certain  nombre d'utilitaires sont fournis dans le paquetage term,
  en particulier : trsh, tmon, tupload,  tredir,  txconn  et,  dans  les
  versions  les  plus  recentes,  trdate  et trdated. De plus, depuis la
  version 2.1.0, tdownload s'est ajoute  a  cette  liste.  Cette  partie
  traite  de  trsh,  tmon,  tupload,  tdownload,  trdate et trdated. Les
  autres clients sont decrits dans des parties qui  leur  sont  propres.
  Aucun  client term ne peut fonctionner tant que vous n'avez pas mis en
  route une liaison term.

  tmon est un utilitaire  simple  qui  vous  permet  de  surveiller  les
  performances   de   votre  liaison.  Il  imprime  un  histogramme  des
  caracteres envoyes et recus. On le lance par la simple commande  tmon.
  Attention,  les  versions 1.11 et ulterieures comportent une bogue qui
  tronque certaines donnees.

  trsh est similaire a rsh. Sans argument, il lance un _s_h_e_l_l  interactif
  sur  le  systeme  distant (autrement dit, il vous y loge). trsh est un
  des moyens de base pour acceder a l'extremite distante de  la  liaison
  term.  Si  un  argument est passe, celui-ci est execute comme commande
  sur le systeme distant. Par exemple :

    trsh ls

  renvoie la liste des fichiers de votre repertoire utilisateur  ($HOME)
  sur le systeme distant.

  tupload  transfere  un fichier dont le nom est passe en argument d'une
  extremite a l'autre de la liaison. Par defaut, ce  fichier  est  place
  dans  le  repertoire  d'ou vous avez lance term (de l'autre cote de la
  liaison). Pour placer les fichiers dans un  autre  repertoire,  donnez
  son  nom  comme second argument. Par exemple, si vous souhaitez copier
  le fichier 'term114.tar.gz' dans le repertoire

    tupload term114.tar.gz /usr/tmp

  Lorsque vous utilisez tupload,  vous  avez  a  votre  disposition  des
  _j_o_k_e_r_s comme, par exemple, dans la commande 'tupload a.*'. Le _s_h_e_l_l se
  charge d'effectuer les correspondances et  la  commande  effectivement
  executee est 'tupload a.1 a.2 ......'.

  tdownload  permet  le  transfert d'un fichier dont le nom est passe en
  argument de la machine distante vers la machine  locale.  Par  defaut,
  les  fichiers  seront places dans le repertoire duquel vous avez lance
  term sur la machine locale. Pour placer les  fichiers  dans  un  autre
  repertoire,  passez  son  nom  comme  second argument a tdownload. Par
  exemple, si vous souhaitez copier  le  fichier  'term114.tar.gz'  dans
  '/usr/tmp' sur la machine locale, tapez :

    tdownload term114.tar.gz /usr/tmp

  Il  n'est  PAS  possible  d'utiliser les _j_o_k_e_r_s avec tdownload pour la
  simple raison que le repertoire distant n'est pas accessible au  _s_h_e_l_l
  et  que  toute expansion de _j_o_k_e_r_s se refere au repertoire courant sur
  la machine locale (ou est execute le _s_h_e_l_l).

  trdate est un utilitaire qui lit l'heure sur la machine distante et la
  modifie  en consequence sur la machine locale. Il doit etre execute en
  tant que _r_o_o_t.

  trdated est la version demon  de  trdate.  Lorsqu'il  est  lance  dans
  'rc.local',  il est execute comme un demon et met l'heure a jour toues
  les  5  minutes  (par  defaut).  trdated  fonctionne  meme  si  aucune
  connexion term n'est active; il commence a modifier l'heure des que la
  connexion est effectivement etablie.

  66..  XX eett tteerrmm

  term permet a plusieurs utilisateurs d'ouvrir des fenetres  _X  _w_i_n_d_o_w_s
  sur la machine locale, a partir de clients s'executant sur une machine
  du reseau. C'est le role de txconn,  qui  est  lance  sur  le  systeme
  distant  par la simple commande txconn. Il se place en arriere-plan et
  renvoie un nombre sur la sortie standard. Ce nombre est le  numero  de
  _d_i_s_p_l_a_y  que doivent utiliser les clients pour acceder au serveur X de
  la machine locale. Voici un exemple qui devrait clarifier les  choses.
  Nous  sommes connectes via trsh a l'hote term distant, nomme toto. Sur
  toto, nous lancons les commandes suivantes :

  toto$ txconn
  Xconn bound to screen 10
  :10
  toto$

  Desormais, sur chaque hote dont nous voulons qu'il execute un client X
  et envoie l'affichage sur la machine locale, il suffit de faire :

    setenv DISPLAY toto:10

  (en  bash utiliser export DISPLAY=toto:10). Dans certains cas, il sera
  de plus necessaire de faire un :

    xhost + toto

  ou meme un :

    xhost +

  sur la machine locale.

  Maintenant, a chaque fois que nous demarrons un client, il tente de se
  connecter  au  _d_i_s_p_l_a_y  10  de  la  machine  toto.  Comme txconn est a
  l'ecoute de ce _d_i_s_p_l_a_y et retransmet tous les paquets du  protocole  X
  vers le serveur X de la machine locale, via term, la fenetre s'ouvrira
  sur la machine locale.

  Il est egalement possible de faire le contraire, a savoir de lancer un
  client  sur  la machine locale et d'envoyer l'affichage sur la machine
  distante. Nous ne  detaillerons  cependant  cette  procedure  qu'apres
  avoir presente tredir.

  Le  protocole  X  n'est  pas particulierement efficace et gaspille une
  grande largeur de bande. C'est rarement un probleme dans le  cas  d'un
  reseau  _e_t_h_e_r_n_e_t,  mais  cela  devient desastreux pour une liaison par
  modem. Il parait que X11R6 met en place une version a  faible  largeur
  de  bande  du  protocole,  LBX. Si cependant vous utilisez X11R5, vous
  pouvez avoir recours a un utilitaire  appele  sxpc  qui  compresse  le
  protocole   X   et  ameliore  ainsi  les  temps  de  reponse  lors  de
  l'utilisation de  liaisons  series.  Le  paquetage  sxpc  contient  un
  article  sur  son  fonctionnement  avec  term  et en est d'autant plus
  recommande.

  77..  ttrreeddiirr

  tredir est l'un des utilitaires les plus puissants parmi ceux  fournis
  avec term. Il permet d'utiliser avec term les plus importants services
  reseau. Avant d'en expliquer l'usage,  il  est  necessaire  de  donner
  quelques  bases  sur le fonctionnement de ces services. Nous les avons
  deja evoques, mais sans expliquer precisement en quoi ils  consistent.
  Comme leur nom l'indique, ce sont des services qui sont fournis par le
  reseau. Des exemples de tels services sont : telnet qui permet  de  se
  _l_o_g_e_r  sur une machine a partir d'une autre, le protocole de transfert
  de fichiers ftp qui permet l'envoi de fichiers entre machines et  smtp
  (_S_i_m_p_l_e  _M_a_i_l  _T_r_a_n_s_f_e_r  _P_r_o_t_o_c_o_l) qui est sollicite a chaque fois que
  vous envoyez du  courrier  electronique.  Chaque  service  reseau  est
  associe  a  un  numero de port. L'affectation des numeros de ports aux
  differents services est donnee par le fichier '/etc/services' qui doit
  etre identique sur toutes les machines reliees a un meme reseau.

  Comment  ces  services sont-ils appeles ? Sur chaque machine du reseau
  tourne un demon nomme inetd qui  est  a  l'ecoute  des  tentatives  de
  connexion  sur  les  ports  reseau. Ces tentatives proviennent soit du
  reseau, soit de la machine locale. On obtient un service reseau  donne
  en  se connectant au port inetd adequat. Lorsqu'une requete de service
  reseau est envoyee, inetd sait exactement  quel  service  est  demande
  grace au numero du port sollicite. S'il est configure pour, il fournit
  alors  le  service  adapte  a  la  connexion  qui   le   demande.   La
  configuration  d'inetd est donnee par le fichier '/etc/inetd.conf' qui
  contient la liste des  services  fournis.  Pour  plus  d'informations,
  reportez-vous aux pages de manuel d'inetd et inetd.conf.

  Il est possible de communiquer directement avec les services reseau en
  utilisant telnet (et non termtelnet ).  Par  exemple,  pour  dialoguer
  avec  le  demon  sendmail (smtp) de la machine nom_de_la_machine, vous
  pouvez  utiliser  telnet  nom_de_la_machine  smtp   ou   bien   telnet
  nom_de_la_machine  25 (puisque 25 est le numero de port affecte a smtp
  dans '/etc/services'). Vous devriez alors recevoir un  gentil  message
  de  bienvenue  de  la  part du demon de la machine distante. C'est une
  astuce tres utile pour resoudre les problemes reseau et controler  les
  ports rediriges par tredir (voir ci-apres).

  tredir  fonctionne  de  facon  tres similaire a inetd. Il s'execute en
  arriere-plan comme un demon et est a l'ecoute  des  differents  ports,
  dans  l'attente  d'une  requete.  Lors  qu'une  demande de service est
  faite, plutot que de fournir ce service comme le  fait  inetd,  tredir
  retransmet  la  requete  au  term  distant  qui transmet la requete au
  reseau et renvoie le resultat a la machine locale. tredir peut envoyer
  la  requete  a  n'importe quelle machine du reseau, mais la dirige par
  defaut vers la machine placee a l'autre extremite de la liaison  term.
  tredir   REDIRige   les  services  reseau  TCP  (_T_r_a_n_s_i_m_s_s_i_o_n  _C_o_n_t_r_o_l
  _P_r_o_t_o_c_o_l).

  La syntaxe classique de tredir est la suivante :

    tredir [cet_ordinateur_ci:]port [cet_ordinateur_la:] port

  Un exemple devrait clarifier tout ceci. Redirigeons un port local  sur
  le port telnet de la machine distante. Pour ce faire, nous utilisons :

    tredir 2023 23

  Maintenant, quiconque se connecte au port 2023 de  la  machine  locale
  sera  redirige  vers le port 23 (telnet) de la machine distante. Voici
  un exemple de session ou la machine locale est ma_machine.modem.maison
  et la machine distante se nomme netsun.

  $ tredir 2023 23
  Redirecting 2023 to 23
  $ telnet localhost 2023
  Trying 127.0.0.1...
  Connected to ma_machine.modem.maison
  Escape character is '^]'.

  SunOS UNIX (netsun)
  login:

  Cet  exemple est particulierement utile. Si nous avions fait le tredir
  sur netsun, nous pourrions  alors  faire  un  telnet  vers  ma_machine
  depuis  le  reseau,  simplement en nous connectant au port redirige de
  netsun, _i_._e_. telnet netsun 2023.

  Le principe general de l'utilisation de tredir  est  de  rediriger  le
  service  souhaite  vers  une machine du reseau. L'exemple suivant nous
  permet de lire les _n_e_w_s sur la machine locale a partir d'un serveur de
  _n_e_w_s  du  reseau, en utilisant la liaison term. Les _n_e_w_s sont fournies
  par le service nntp dont le numero de port est le 119. Tout lecteur de
  _n_e_w_s  digne  de  ce  nom  vous permet de specifier le numero de port a
  utiliser,  grace  a  un  fichier  de  configuration  ou  une  variable
  d'environnement.  Donnons  a ce port local le numero 2119 et supposons
  maintenant que notre serveur de _n_e_w_s est news.domain.org. Nous  allons
  rediriger  le port 2119 vers le port 119 de news.domain.org, puis nous
  indiquerons a notre lecteur de _n_e_w_s que le serveur nntp se trouve  sur
  le  port  2119  de  la  machine locale. Etant donne que cela depend du
  lecteur de _n_e_w_s utilise, nous allons  juste  tester  la  liaison  avec
  telnet plutot que de vraiment lancer un tel programme.

  $ tredir 2119 news.domain.org:119
  Redirecting 2199 to news.domain.org:119
  $ telnet localhost 2119
  Trying 127.0.0.1...
  Connected to ma_machine.modem.maison.
  Escape character is '^]'.
  200 news.domain.org InterNetNews NNRP Server INN 1.4 07-Dec-41 ready
  (posting ok).

  Si  vous  parvenez  jusqu'ici, tout ce qu'il vous reste a faire est de
  configurer votre lecteur de _n_e_w_s pour etre capable de  lire  les  _n_e_w_s
  via  term. N.B. : si vous lisez les _n_e_w_s de cette facon, soyez certain
  que dans tous vos envois,  vous  specifiez  dans  la  ligne  d'en-tete
  Reply-To: une adresse _e_m_a_i_l du reseau a laquelle on peut vous joindre,
  sinon les gens qui voudront vous contacter enverront leur  courrier  a
  l'adresse  (fantaisiste)  constituee des donnees quelconques que votre
  lecteur de _n_e_w_s placera dans la ligne d'en-tete From:.

  77..11..  ttrreeddiirr : Attention, chien mechant !

  Le lecteur astucieux, apres avoir lu le dernier exemple, se  demandera
  certainement  pourquoi  le  port 2119 a ete redirige vers le port 119.
  Etant donne que les programmes de lecture de _n_e_w_s utilisent par defaut
  le  port  119, pourquoi ne pas faire un tredir 119 news.domain.org:119
  et eviter la configuration du lecteur ? La reponse est  que  tous  les
  ports  de  numero inferieur a 1024 sont des ports _r_e_s_e_r_v_e_s, a l'ecoute
  desquels seuls un super-utilisateur peut se mettre. Si vous prenez  le
  risque  de  _s_u_i_d_e_r  tredir ou si vous le lancez en tant que _r_o_o_t, vous
  pourrez alors rediriger les ports reserves et eviter  de  vous  casser
  les pieds avec les services restants.

  Un autre inconvenient de l'utilisation des ports reserves est qu'inetd
  les ecoute frequemment et qu'un port ne peut etre ecoute  que  par  un
  seul  programme  a  la fois. Afin d'utiliser un tel port, il vous faut
  modifier le fichier inetd.conf  de  facon  qu'inetd  ne  soit  plus  a
  l'ecoute  du  port  que  vous  souhaitez  rediriger.  Pour  ce  faire,
  commentez la ligne du service incrimine, en placant un # au  debut  de
  cette  ligne.  Le super-utilisateur doit alors envoyer un signal HUP a
  inetd pour qu'il relise son fichier de configuration.

  77..22..  QQuueellqquueess aassttuucceess ttrreeddiirr

  Dans  cette  partie,   nous   allons   presenter   quelques-unes   des
  utilisations  les  plus  courantes  de tredir. Nous avons deja indique
  comment rediriger les services nntp et  telnet  et  allons  maintenant
  passer a des exemples un peu plus compliques.

  77..22..11..  XX WWiinnddoowwss

  Dans une precedente partie, nous avons explique comment permettre a un
  client s'executant sur le reseau d'ouvrir une fenetre sur  la  machine
  locale, grace a txconn. La meme technique peut etre utilisee sur votre
  machine locale pour qu'un client envoie  son  affichage  vers  l'autre
  extremite  de  la  liaison term. Mais comment afficher un client X sur
  une machine qui n'est pas l'autre bout de  la  liaison  ?  La  reponse
  reside  dans  la  connaissance  du fait qu'X utilise un service reseau
  particulier, a l'instar des autres programmes que nous avons  evoques.
  Un  serveur  X  est  a l'ecoute de requetes reseau sur un port dont le
  numero est donne par la formule : port = 6000 + numero de display. Par
  exemple,  un serveur X gerant le _d_i_s_p_l_a_y 0 sur une machine donnee sera
  a l'ecoute du port 6000. S'il gere le _d_i_s_p_l_a_y 2, il ecoutera  le  port
  6002.  Lorsque vous positionnez votre variable d'environnement DISPLAY
  sur machine:n, vos clients X tenteront de se connecter au port 6000  +
  n de machine.

  Nous  pouvons  utiliser cette astuce pour permettre a des clients X de
  votre machine locale d'ouvrir des fenetres sur des _d_i_s_p_l_a_y_s  distants.
  Supposons  que  nous  voulons  lancer un xterm tournant sur la machine
  locale avec l'affichage sur le _d_i_s_p_l_a_y 0 de la machine  xmachine,  qui
  est quelque part sur le reseau. Premierement, choisissons un numero de
  display : 2, par exemple (n'utilisez pas  0,  c'est  celui  que  votre
  serveur  X  local  utilise).  Faisons-en  le _d_i_s_p_l_a_y 0 de xmachine. En
  termes de ports, cela signifie qu'il nous faut rediriger le port local
  6002 vers le port distant 6000. Les commandes sont les suivantes :

  $ tredir 6002 xmachine:6000
  $ setenv DISPLAY localhost:2
  $ xterm

  Ceci  devrait  ouvrir un xterm sur la machine xmachine. Notez que nous
  avons positionne DISPLAY sur localhost:2. La justification en est  que
  les clients X utilisent parfois des _s_o_c_k_e_t_s _u_n_i_x _d_o_m_a_i_n plutot que des
  _s_o_c_k_e_t_s _i_n_t_e_r_n_e_t _d_o_m_a_i_n lorsqu'ils se connectent a  un  _d_i_s_p_l_a_y  local
  (lorsque  DISPLAY  contient  :2,  par  exemple).  localhost:2  demande
  l'utilisation d'une connexion TCP.

  En ce qui concerne xmachine, la  requete  X  provient  de  la  machine
  placee  a  l'extremite distante de votre liaison term (remotemachine).
  C'est pourquoi, si vous voulez  autoriser  la  connexion,  vous  devez
  utiliser  soit  xhost  +  remotemachine  sur xmachine, soit xauth pour
  mettre a jour le fichier .Xauthority de votre machine locale  pour  le
  _d_i_s_p_l_a_y 2, en utilisant la cle de xmachine.

  Une fois encore, pour accelerer les connexions X, vous pouvez utiliser
  le  programme  sxpc  pour  etablir  la  liaison.  sxpc  contient   des
  explications  sur  la  facon  d'utiliser  tredir et de l'autoriser, en
  utilisant xauth.

  77..22..22..  tteerrmm et le mail

  Bien, vous l'aurez voulu ! Le courrier electronique  a  la  reputation
  justifiee  d'etre  l'un  des  services les plus difficiles a mettre en
  place sur les machines UNIX. Faire fonctionner term avec  le  courrier
  electronique  implique  une  bonne  comprehension des mecanismes de ce
  dernier, ce qui deborde largement le cadre de  ce  document.  Pour  en
  savoir plus sur le courrier electronique, procurez-vous un ouvrage sur
  l'administration de systemes  UNIX  et/ou  le  FAQ  (_f_r_e_q_u_e_n_t_l_y  _a_s_k_e_d
  _q_u_e_s_t_i_o_n_s) du _n_e_w_s_g_r_o_u_p comp.mail.misc, disponible par ftp anonyme sur
  rtfm.mit.edu, dans le repertoire electronique  avec  term.  Tous  deux
  sont  accessibles  par  ftp  anonyme sur sunsite.unc.edu. Il s'agit de
  term.mailerd+mail de Byron A. Jeff et de BCRMailHandlerXXX de Bill  C.
  Riemers.

  Ceci  etant  dit,  voici  une description succinte de la facon dont le
  courrier electronique fonctionne. Deux parties  sont  a  considerer  :
  l'envoi  et  la  reception  de  messages.  Commencons  par envoyer des
  messages de votre machine locale vers le reseau.

  Il y a  deux  sortes  de  programmes  de  courrier  electronique.  Les
  premiers  sont  appeles  MUA  (_m_a_i_l _u_s_e_r _a_g_e_n_t) et permettent de lire,
  composer et envoyer des messages. Parmi les MUA les  plus  connus,  on
  trouve  elm  ,  pine,  Mail  et  vm.  Les MUA ne font aucun travail de
  reseau, ils se contentent d'assembler les messages.  Le  vrai  travail
  d'envoi  des  messages est realise par le second type de programmes, a
  savoir les MTA (_m_a_i_l _t_r_a_n_s_f_e_r _a_g_e_n_t_s) qui sont appeles  par  les  MUA.
  Ils  prennent  les  messages,  decident  de  l'endroit  ou il faut les
  envoyer  (en  fonction  de  l'adresse   fournie)   et   les   envoient
  effectivement sur le reseau.

  Les deux MTA les plus courants sur les systemes Linux sont sendmail et
  smail.  L'idee de base et de faire se connecter votre MTA a  un  autre
  MTA  tournant  sur une machine du reseau, laquelle saura quoi faire de
  vos messages. Pour cela, il faut rediriger un port local sur  le  port
  smtp de la machine placee sur le reseau. Ensuite, indiquez a votre MTA
  qu'il doit envoyer a celui du reseau tout message qu'il  ne  sait  pas
  traiter.  Celui-ci  saura  alors  comment  envoyer  le message vers sa
  destination.

  Comment cela se passe-t-il avec smail ? Tout d'abord, on  redirige  un
  port vers le port smtp de la machine du reseau (mailhost) :

    tredir XXXX mailhost:25

  ou  XXXX  est  le  numero  du  port local auquel smail va se connecter
  (notez qu'il est necessaire de donner un nom a ce port dans le fichier
  '/etc/services'   pour   que  smail  le  reconnaisse).  smail  possede
  plusieurs  fichiers  de   configuration   generalement   places   dans
  '/usr/local/lib/smail'.   Ceux  qui  nous  interessent  sont 'config',
  'routers' et 'transports'. Notez bien que nous supposons que vous avez
  deja   configure  smail correctement pour traiter vos messages locaux.
  Une fois de plus, consultez la documentation si ca n'est pas le cas.

  Dans le fichier 'config', il faut placer la definition suivante :

    smart_path=localhost

  localhost etant la machine a laquelle smail se connecte  lorsqu'il  ne
  sait pas quoi faire d'un message.

  Dans le fichier 'routers', ajoutez :

    smart_host:
    driver=smarthost,
    transport=termsmtp;
    path = localhost

  Enfin, ajoutez dans 'transports' :

    termsmtp: driver=tcpsmtp,
              inet,
              return_path,
              remove_header="From",
              append_header="From: VOTRE_ADRESSE_RESEAU",
              -received,
              -max_addrs, -max_chars;
              service=VOTRE_SERVICE_SMTP,

  Dans  les  quelques  lignes  ci-dessus,  les lignes d'en-tete (_h_e_a_d_e_r)
  changent tous les en-tetes des messages qui partent de  chez  vous  en
  l'adresse  VOTRE_ADRESSE_RESEAU,  qui est l'adresse reseau a partir de
  laquelle vous voulez  que  les  messages  semblent  etre  envoyes.  Si
  plusieurs  utilisateurs  utilisent  votre liaison term, il vous faudra
  avoir recours a quelque chose de plus acrobatique, comme maintenir une
  base  de  donnees  des  adresses reseau des utilisateurs locaux et les
  inserer dans les en-tetes From:.

  La ligne service est le nom du port local que vous avez redirige  vers
  le  port  smtp  de  la machine connectee au reseau. Avec la version de
  smail qu'utilise l'auteur,  il  est  impossible  d'utiliser  juste  un
  nombre.  Il  est  necessaire  de  mettre  un  nom tel que "toto" et de
  definir "toto" dans le fichier _s_u_i_d_e et ne  faites  que  rediriger  le
  port smtp (25), il n'est nul besoin de definir ce "toto".

  Cela  devrait  suffire  pour  vous mettre sur la voie. Si vous decidez
  d'utiliser sendmail, les  principes  sont  les  memes,  bien  que  les
  details  different.  Ronald  Florence  (ron@mlfarm.com)  a  affirme  a
  l'auteur que le sendmail de SUN ne peut envoyer une file de  plusieurs
  messages  vers  le  port  redirige,  mais  que  le  sendmail BSD 8.6.9
  fonctionne  correctement.   Ronald   a   applique   a   sendmail   les
  modifications  suivantes  de  facon  a le faire fonctionner avec term.
  Dans son cas, le port sendmail par defaut (25)  est  utilise  pour  le
  trafic local d'un reseau _e_t_h_e_r_n_e_t et le courrier electronique _I_n_t_e_r_n_e_t
  est donc transmis a un port TCP redirige.

  #
  # Creation du mailer termsmtp qui envoie le courrier via un port TCP redirige
  #
  Mtermsmtp,P=[TCP], F=mDFMuCXe, S=22, R=22, A=TCP $h PORTNUMBER

  Ici, PORTNUMBER est le numero du port redirige de la  machine  locale.
  Cela  doit  etre un port inutilise de numero superieur a 2000. Il faut
  ensuite indiquer a sendmail a quelle machine se connecter et faire  de
  termsmtp le _m_a_i_l_e_r par defaut.

  #
  # Principal mailer de relai
  #
  DMtermsmtp
  #
  # Principal hote de relai : utilise le mailer $M pour envoyer
  # le courrier vers d'autres domaines
  #
  DR HOSTNAME
  CR HOSTNAME

  Ou  HOSTNAME  est le nom de votre machine locale (est-ce que localhost
  fonctionne ?). La derniere ligne suit la regle 0 pour retransmettre le
  courrier _I_n_t_e_r_n_e_t.

  # Envoyer les autres noms valides au forwarder
  R$*<@$*.$+>$*   $#$M    $@$R    $:$1<@$2.$3>$4  user@any.domain

  Lorsque la connexion term avec l'hote _I_n_t_e_r_n_e_t est etablie, lancez les
  commandes suivantes sur la machine locale.

  tredir PORTNUMBER internet.host:25
  /usr/lib/sendmail -q

  Nous  allons  maintenant  nous  preoccuper  de  recevoir  du  courrier
  electronique  a  l'aide  de term. Nous supposerons que le courrier est
  envoye a votre compte sur la machine mailhost connectee au reseau.  La
  solution  la  plus  simple  est  d'utiliser trsh ou termtelnet pour se
  connecter a mailhost et d'y lire  votre  courrier.  Il  est  cependant
  possible  de telecharger automatiquement votre courrier sur la machine
  locale, grace a POP (_p_o_s_t _o_f_f_i_c_e  _p_r_o_t_o_c_o_l).  POP  a  ete  precisement
  concu  dans  ce  but : envoyer le courrier electronique a des machines
  n'ayant que des acces intermittents au reseau. Pour utiliser  POP,  il
  faut  qu'il  y ait un serveur POP installe sur mailhost. Si tel est le
  cas, vous  pouvez  utiliser  un  client  POP  pour  telecharger  votre
  courrier  regulierement. Comme on pouvait s'y attendre, tredir joue un
  role dans la procedure. Le port utilise par le service POP est le  110
  (_n_._b_.  il  existe  un  ancien protocole POP-2 qui utilise le port 109.
  Nous parlons ici de  POP-3  qui  est  la  derniere  version  de  POP).
  Plusieurs  clients  POP sont disponibles. L'un d'eux, ecrit en langage
  perl par William Perry et maintenu par l'auteur, est pop-perl-1.X.  On
  peut le trouver sur sunsite dans /pub/Linux/system/Mail.

  Pour utiliser POP, il faut rediriger un port local vers le port 110 de
  mailhost et configurer le client de  facon  a  ce  qu'il  recupere  le
  courrier  sur  localhost  en  utilisant  le  port local. Supposons par
  exemple qu'il y a  un  serveur  POP  qui  tourne  sur  mailhost.  Nous
  redirigeons le port local 2110 et lancons le client pop-perl.

  $ tredir 2110 mailhost:110
  Redirecting 2110 to mailhost:110
  $ pop
  Username: bill
  Password: <votre mot de passe pour mailhost>
  Pop Host: localhost
  Pop Port: 2110
  Starting popmail daemon for bill

  Si  vous  n'avez  pas de serveur POP a votre disposition, le paquetage
  BCRMailHandler contient un  programme  permettant  de  telecharger  le
  courrier electronique vers votre machine locale grace a term. L'auteur
  ne l'a jamais utilise, mais quiconque le possede est  encourage  a  le
  commenter.     Vous    pouvez    egalement   utiliser   le   paquetage
  term.mailerd+smail. Malheureusement, aucun de ces deux  paquetages  ne
  fonctionne avec les versions 2.0.0 et ulterieures de term.

  88..  ttuuddpprreeddiirr

  tudpredir  est  tres  semblable a tredir dans ce qu'il fait et dans la
  facon dont il  est  execute.  La  grosse  difference  entre  les  deux
  programmes  est  que  l'un (tredir) sert a rediriger vers la connexion
  term les services reseau TCP, alors que l'autre (tudpredir) permet  de
  rediriger  les services reseau UDP (_U_s_e_r _D_a_t_a_g_r_a_m _P_r_o_t_o_c_o_l). Une autre
  difference importante est  que  tredir  se  place  automatiquement  en
  arriere-plan  une  fois  qu'il  a etabli la communication avec le port
  local, alors que tudpredir doit etre mis en arriere-plan manuellement.

  La syntaxe classique de la commande tudpredir est :

    tudpredir [cette_machine_ci:]port [cette_machine_la:]port

  99..  AAuuttoommaattiissaattiioonnss

  Maitenant  que  vous  savez  comment obtenir de term tous vos services
  reseau, il peut etre agreable de mettre en place une initialisation et
  une  configuration  automatiques de votre connexion. Il y a a peu pres
  une  infinite  de  facons  d'y  parvenir,  selon   le   programme   de
  communication  que  vous utilisez et la facon dont vous vous connectez
  au systeme distant.

  Il existe un programme que l'auteur n'a pas utilise, mais  dont  il  a
  entendu  dire  le  plus  grand bien. Il s'agit de fet, un frontal pour
  term. Il est concu pour vous connecter a un systeme distant et  lancer
  term et tous vos tredir. Tout commentaire sur fet est le bienvenu.

  Voici  maintenant  un  exemple  d'un ensemble de commandes qui utilise
  kermit pour se connecter au systeme distant et  effectuer  toutes  les
  initialisations  de  term. Il est clair qu'il vous faudra modifier ces
  exemples pour les adapter a votre procedure de connexion.

  La commande qui est effectivement lancee est le script shell 'knet' :

    #!/bin/sh
    /usr/bin/kermit -y $HOME/.kerm_term > $HOME/klog < /dev/null 2>& 1
    exec $HOME/bin/tstart >> $HOME/klog 2>& 1

  Le script '.kerm_term' est le suivant :

    pause 2
    # Le numero a composer
    output atdtXXXXXXX \13
    # Connexion au serveur de terminal
    input 145 {name: }
    output MYNAME \13
    input 3 {word: }
    output MYPASSWORD \13
    input 5 {xyplex>}
    # Rendre la ligne transparente
    output term telnet-t \13
    output term stopb 1 \13
    # Connexion au systeme distant.
    output telnet hotedistant.domainequelconque.org \13
    input 10 {ogin: }
    output MYOTHERNAME \13
    input 3 word:
    output MYOTHERPASSWORD \13
    pause 5
    # On lance le term distant
    output exec term -s 38400 -l $HOME/tlog -w 10 -t 150  \13
    ! /usr/bin/term -r -l $HOME/tlog -s 38400 -c off -w 10 -t 150 < /dev/modem > /dev/modem &
    # Lancer les autres clients ici si necessaire
    suspend
    !killall -KILL term

  Finalement, le script 'tsart'  qui  lance  les  clients  term  est  le
  suivant :

    #!/bin/sh
    #
    # Ceci permet au courrier electronique de sortir.
    # On peut lire les news ici et recuperer le courrier .
    #
    /usr/local/bin/tredir 2025 25 2119 newshost:119 2110 pophost:110
    #
    # On peut lancer X windows ici
    #
    /usr/local/bin/trsh -s txconn
    #
    # Pour recevoir le courrier electronique...
    #
    /usr/local/bin/pop
    #
    # On vide la queue...
    #
    /usr/bin/runq
    #
    # La, c'est fini.
    #
    echo ^G^G > /dev/console

  Lorsqu'enfin vous souhaitez terminer la connexion, revenez a kermit et
  quittez-le. La derniere ligne du _s_c_r_i_p_t tue le term local  et  replace
  le systeme dans son etat initial.

  (  Note  de  l'auteur  : plutot que de faire '!killall -KILL term', il
  devrait  etre  possible  de  faire  un  '!tshutdown'.   Cela   devrait
  egalement marcher, non ?)

  Comme  nous  l'avons  deja  dit,  il  y  a  des  zillions de facons de
  proceder. Ces exemples ne sont fournis que pour vous aider a demarrer.
  D'autres exemples peuvent etre trouves dans les paquetages autoterm et
  JoeltermStuff.

  1100..  PPoorrttaaggee ddee llooggiicciieellss ppoouurr uunnee uuttiilliissaattiioonn aavveecc tteerrmm

  En principe, tout programme pouvant etre utilise avec un  reseau  peut
  egalement  l'etre avec term. Certains d'entre eux peuvent etre obtenus
  avec un support term integre. En  font  partie    :  telnet,  (nc)ftp,
  Mosaic  et  nombre  d'autres.  La  plupart  de  ces programmes ont ete
  compiles pour les versions de term 1.17 et anterieures; ils  devraient
  cependant  continuer  a  fonctionner  avec  les  versions de term plus
  recentes.

  Une autre facon de faire fonctionner des programmes avec term est d'en
  assurer vous-meme le portage. C'est le sujet dont traite cette partie.

  Le dernier moyen de modifier vos  programmes  pour  term  est  de  les
  termifier.

  1100..11..  PPoorrttaaggee eett ccoommppiillaattiioonn ddeess ssoouurrcceess

  Le   portage   pour   term  peut  etre  realise  selon  une  procedure
  relativement simple :

  Si le programme doit etre installe dans '/usr/local' par _r_o_o_t :

  1. Ajoutez     le     parametre      de      compilation      -include
     /usr/local/include/termnet.h

  2. et ajoutez -ltermnet a la liste de bibliotheques.

  S'il doit etre installe dans votre repertoire utilisateur :

  1. Ajoutez le parametre de compilation -include $HOME/term/termnet.h

  2. et ajoutez -L$HOME/term -ltermnet a la liste de bibliotheques.

  Compilez  maintenant le logiciel comme l'indique le document 'INSTALL'
  ou 'README' fourni avec. Cela devrait suffire !

  Les commandes devraient alors fonctionner a la fois avec et sans term.

    telnet localhost

  n'utilise pas term pour effectuer la connexion, mais :

    telnet bohr.physics.purdue.edu

  utilisera  term,  uniquement  si  vous  n'avez  pas  d'autre  type  de
  connexion reseau.

  Certaines commandes telles que rlogin ne peuvent etre lancees que  par
  _r_o_o_t  et  par  le  proprietaire  de  la  connexion  term (utilisateurs
  privilegies).

  Certaines commandes term seront transparentes  et  n'utiliseront  term
  que s'il n'y a pas d'autre possibilite. C'est en particulier le cas de
  telnet et ftp.

  D'autres ont besoin d'un parametre qui leur indique  qu'elles  peuvent
  utiliser term. C'est le cas de xarchie, fsp et ytalk.

  Vous  pouvez  parametrer  ces programmes pour qu'ils utilisent term en
  positionnant  la   variable   d'environnement   termMODE   selon   les
  indications  du  fichier  'README.security', ou bien en utilisant make
  installnet. En fin de compte, le fichier 'termnet' cree contiendra des
  instructions  speciales  pour  le  reseau.   Pour l'instant, seule son
  existence est controlee.

  Si vous ajoutez une connexion _e_t_h_e_r_n_e_t a vote systeme, il vous  suffit
  d'effacer le fichier

  NOTE  :  Les  programmes  dont  le portage a ete realise a l'epoque de
  client.a peuvent etre recompiles pour etre utilises avec des  versions
  plus  recentes de term en changeant simplement la reference a client.a
  en libtermnet.a.

  1100..22..  tteerrmmiiffyy

  Ce paquetage permet de  convertir  des  executables  _l_i_n_k_e_s  de  facon
  dynamique, en vue d'une utilisation avec term.

  Avant  de  pouvoir utiliser termify il vous faut vous assurer que vous
  avez bien a votre disposition la  version  2.2i  de  term  (est-ce  la
  version  2.2.8  ?)  ou  une version plus recente, ainsi que la version
  4.5.26 ou une version plus recente de  libc.so.  Il  vous  faut  alors
  creer le fichier 'libt.so.4' dans le repertoire

  A l'heure actuelle, il vous faut reconstruire le fichier 'libt.so.4' a
  chaque fois que vous changez de version de term.

  Une fois cette bibliotheque creee, vous pouvez laisser termify digerer
  le  programme  que vous voulez rendre utilisable avec term, grace a la
  commande :

    termify <nom du programme>

  Si le resultat ne vous plait pas, l'operation inverse est possible :

    termify -u <nom du programme>

  Le paquetage contient egalement  un  _s_c_r_i_p_t  permettant  de  _t_e_r_m_i_f_i_e_r
  completement  smail,  de telle facon qu'aucune definition de transport
  particuliere ne soit necessaire. La seule modification que vous  aurez
  eventuellement a apporter est le champ 'From: '.

  1111..  CClliieennttss tteerrmm

  1111..11..  CClliieennttss tteerrmm disponibles sur les sites ftp

  Voici  une  liste  des applications capables de fonctionner avec term.
  Elle  n'est  pas  certainement  pas  exhaustive;   toute   information
  complementaire  est donc la bienvenue. Autant que possible, le site et
  le repertoire dans lequel l'application peut etre trouvee (autant  que
  le   sache  l'auteur)  sont  fournis.  Lorsque  le  site  indique  est
  sunsite.unc.edu,  l'application  peut  etre  trouvee  dans  l'un   des
  repertoires suivants :

  1. /pub/Linux/apps/comm/term/apps

  2. /pub/Linux/apps/comm/term/extra

  LLee ppaaqquueettaaggee tteerrmm :

       tupload
       tdownload           (versions 2.1.0 et plus recentes)
       trsh
       tmon
       tredir
       tudpredir           (versions 2.0.0 et plus recentes)
       txconn
       trdate(d)
       tshutdown
       libtermnet

  TTrraannssffeerrtt ddee ffiicchhiieerrss ::

       ftpd                sunsite.unc.edu
       termncftp           sunsite.unc.edu
       ncftp185            sunsite.unc.edu:/pub/Linux/system/Network/file-transfer
       fsp                 sunsite.unc.edu:/pub/Linux/system/Network/file-transfer

  SSyysstteemmeess dd''iinnffoorrmmaattiioonn ::

       lynx
       Mosaic              sunsite.unc.edu:/pub/Linux/system/Network/info-systems/Mosaic
       chimera
       netscape            sunsite.unc.edu:/pub/Linux/system/Network/info-systems
       httpd
       xgopher
       gopher              sunsite.unc.edu

  CCoonnnneexxiioonn aa ddiissttaannccee ::

       termtelnet          sunsite.unc.edu
       rlogin              physics.purdue.edu:/pub/bcr/term/extra
       rsh                 physics.purdue.edu:/pub/bcr/term/extra

  NNeettnneewwss ::

       tin 1.3             sunsite.unc.edu:/pub/Linux/system/Mail/news
       news2               sunsite.unc.edu

  CCoouurrrriieerr eelleeccttrroonniiqquuee ::

       slurp               sunsite.unc.edu
       smail               sunsite.unc.edu
       term.mailerd+smail  sunsite.unc.edu
       BCRMailHandlerXXX   physics.purdue.edu:/pub/bcr/term

  SSccrriippttss dd''aauuttoommaattiissaattiioonn ::

  JoeltermStuff       sunsite.unc.edu
  autoterm            sunsite.unc.edu
  fet                 sunsite.unc.edu

  AAuuttrreess pprrooggrraammmmeess ::

       inetd               sunsite.unc.edu
       rdate               sunsite.unc.edu
       xgospel             sunsite.unc.edu:/pub/Linux/games/x11/networked
       termify             physics.purdue.edu:/pub/bcr/term/extra
       xboard              sunsite.unc.edu
       ircII               sunsite.unc.edu:/pub/Linux/system/Network/chat
       whois
       xwebster            sunsite.unc.edu
       sxpc                ftp.x.org:/R5contrib
       xztalk              sunsite.unc.edu:/pub/Linux/apps/sound/talk

  1111..22..  LLee ppaaqquueettaaggee tteerrmmnneett

  Le               paquetage              termnet-2.0.4-Linux-bin.tar.gz
  (sunsite.unc.edu:/pub/Linux/apps/comm/term) contient  un  ensemble  de
  clients  term precompiles ainsi qu'un ensemble de _s_c_r_i_p_t_s, de pages de
  manuel et libtermnet 2.00.04. Les clients ont ete compiles avec  cette
  version de libtermnet.so. Le paquetage contient les clients suivants :

       fet         perl        sperl4.036  tmon        tshutdown   xgopher
       finger      perl4.036   suidperl    trdate      tudpredir   ytalk
       ftp         rcp         taintperl   trdated     tupload
       fwhois      rlogin      telnet      tredir      txconn
       ncftp       rsh         term        trsh        xarchie

  ATTENTION : Le paquetage contient l'ensemble  precompile  complet  des
  clients  de  term  2.0.4,  ainsi que term lui-meme. N'installez pas ce
  paquetage avant d'etre  sur  de  ce  que  vous  faites.  Lorsque  vous
  commencerez a deplacer les executables, vous allez detruire les autres
  versions de term et de ses clients.

  1111..33..  AApppplliiccaattiioonnss nnee ffoonnccttiioonnnnaanntt ppaass eennccoorree aavveecc tteerrmm

  1. DOOM : Le probleme avec ce jeu semble etre le fait qu'il utilise le
     port 5039 a la fois en tant que client et en tant que serveur.

  2. NFS  : Le serveur NFS est suppose n'accepter des requetes que si la
     socket demandant la connexion est attachee a un  port  inferieur  a
     1024.  Ceci  semble poser probleme. Cepedant, certains serveurs NFS
     possedent une option  'insecure'.  Dans  ce  cas,  il  se  pourrait
     finalement  que NFS fonctionne, si la gestion des RPC est ajoutee a
     term.
  1122..  tteerrmm eett llaa sseeccuurriittee

  Dans cette partie sont evoques certains des aspects de la securite  de
  term.  Les  problemes  y  sont  evoques  et  des moyens d'accroitre la
  securite sont donnes.

  1122..11..  ttrrsshh

  trsh pose des problemes de securite lorsqu'il est utilise pour acceder
  a  la  machine  locale depuis le systeme distant. Le probleme pose par
  term de ses clients est qu'en plus du  proprietaire  de  la  connexion
  term,  _r_o_o_t  peut  lancer,  par  l'intermediaire  de  la connexion des
  programmes modifies pour term.

  Ceci implique en particulier que  le  _r_o_o_t  du  systeme  distant  peut
  lancer  trsh  et  donc  se  faire  passer  pour  le proprietaire de la
  connexion term assez facilement. Si cet  utilisateur  sur  la  machine
  locale est _r_o_o_t, les risques encourus sont considerables.

  La  solution  a  ce  probleme est simple : il vous suffit d'ajouter la
  ligne suivante dans le fichier

    denyrsh on

  Cette ligne indique que personne ne peut  lancer  de  trsh  sur  votre
  machine  depuis  le  systeme  distant.  L'acces  a  votre  machine est
  cependant encore possible par l'intermediaire de la connexion term, en
  utilisant telnet et les ports rediriges.

  1122..22..  ttxxccoonnnn et xauth

  txconn n'est pas particulierement sur. N'importe qui peut se connecter
  a votre serveur local par l'intermediaire  de  term  et  se  livrer  a
  toutes  sortes d'exactions. Si ce genre de problemes vous inquiete, il
  est conseille d'utiliser  xauth  pour  autoriser  vos  connexions.  Un
  exemple  de  l'utilisation  de xauth pour securiser vos connexions est
  donne dans la partie suivante.

  1122..33..  ssxxppcc, xhost et xauth

  L'utilisation de xauth est tres importante pour  assurer  la  securite
  lorsque   vous   utilisez  sxpc.  Si  vous  n'utilisez  pas  xauth  en
  conjonction avec sxpc, tous les risques  d'un  xhost  +  s'appliquent.
  Entre autres, ils sont les suivants :

  +o  Quelqu'un peut regarder ce qui est affiche a votre ecran.

  +o  Quelqu'un peut savoir ce que vous tapez.

  +o  Quelqu'un  peut entrer des commandes dans vos fenetres (par exemple
     une commande pour effacer tous vos fichiers :().

  xauth est fourni avec X depuis la R4. Nous decrivons  ici  comment  en
  mettre   en   place   une   utilisation   de  base.  Attention,  cette
  configuration est vulnerable au _s_n_o_o_p_i_n_g.
  NNOOTTEE :: lorsque vous utilisez  xauth,  votre  variable  d'environnement
  $DISPLAY   ne   doit   PAS   etre   positionnee   sur   localhost  (ou
  localhost:quelquechose). Si votre  variable  d'environnement  $DISPLAY
  utilise  localhost,  les  clients  seront  incapables  de  trouver les
  informations d'autorisation adequates. La solution est  d'utiliser  le
  nom reel de la machine. Si vous suivez les instructions de compilation
  contenues  dans  le  fichier  'README'  et  compilez   sans   l'option
  -DNOGETHOSTNAME, tout devrait fonctionner correctement.

  Appelons  C la machine sur laquelle vous allez lancer les clients et D
  celle sur laquelle ils seront affiches.

  Tout d'abord, choisissez une _c_l_e composee  d'au  plus  16  couples  de
  chiffres  hexadecimaux  (c'est-a-dire  un  nombre  pair  de caracteres
  compris entre 0 et 9 et a et f). Dans  l'exemple  qui  suit,  il  vous
  faudra remplacer <cle> par sa valeur.

  Sur C :

    % xauth
    xauth:  creating new authority file $HOME/.Xauthority
    Using authority file $HOME/.Xauthority
    xauth> add Chostname:8 MIT-MAGIC-COOKIE-1 <cle>
    xauth> exit

  Sur D :

    % xauth
    xauth:  creating new authority file $HOME/.Xauthority
    Using authority file $HOME/.Xauthority
    xauth> add Dhostname/unix:0 MIT-MAGIC-COOKIE-1 <cle>
    xauth> add Dhostname:0 MIT-MAGIC-COOKIE-1 <cle>
    xauth> exit

  Lorsque  vous  lancez  le serveur X sur D, il faut alors lui passer le
  parametre -auth $HOME/.Xauthority. Peut-etre vous faudra-t-il creer ou
  modifier le fichier exemple :

    #!/bin/sh
    exec X -auth $HOME/.Xauthority $*

  Assurez-vous  que  votre  fichier  '.Xauthority'  n'est  accessible en
  lecture que par vous, a la fois sur C et sur D.

  1133..  SSoouurrcceess dd''iinnffoorrmmaattiioonn

  Dans cette partie sont indiquees un certain nombres d'adresses ftp  et
  d'URL   utiles   auxquelles   vous  trouverez  des  logiciels  et  des
  informations sur term.

  ffttpp ::

  sunsite.unc.edu:/pub/Linux/apps/comm/term/<toute l'arborescence>
  sunsite.unc.edu:/pub/Linux/docs/HOWTO
  physics.purdue.edu:/pub/bcr/term/<toute l'arborescence>

  UURRLL ::

  http://sunsite.unc.edu/mdw/HOWTO/term-HOWTO.html
  http://zeus.cs.kun.nl:4080/term-howto/term-HOWTO.html
  http://physics.purdue.edu/~bcr/homepage.html

  nneettnneewwss ::

  comp.os.linux.announce           annonces des nouvelles versions de term et du term-HOWTO
  comp.os.linux.help               voici ou poser vos questions sur term
  comp.os.linux.misc               un autre endroit pour les questions
  comp.protocols.misc              on peut trouver ici des reponses aux questions sur term

  Lorsque vous posez  des  questions  dans  les  _n_e_w_s,  assurez-vous  de
  fournir  toutes  les  informations  utiles pour y repondre (version de
  term, comment vous avez installe votre connexion, etc.). Actuellement,
  de  nombreuses versions de term sont utilisees et elles ont toutes des
  problemes  specifiques  ou  communs.  Ainsi,  si  vous  souhaitez  des
  reponses  utiles,  precisez  au  moins  la  version  de  term que vous
  utilisez. Dans le cas contraire,  certaines  suppositions  hasardeuses
  devront etre faites pour vous aider a resoudre votre probleme.

  1144..  SSttaabbiilliittee ddeess vveerrssiioonnss ddee tteerrmm

  A  l'heure actuelle, de nombreuses versions de term ont ete repandues.
  Bill Riemers, qui s'occupe de la maintenance de term, nous  confie  la
  liste  suivante,  qui  indique quelles en sont les versions stables et
  celles qu'il est plus prudent d'eviter.

               term110          --> stabilite inconnue
               term111          --> stabilite inconnue
               term112          --> stabilite inconnue
               term113          --> stabilite inconnue
               term114          --> version BETA relativement stable
               term115          --> version BETA instable
               term116          --> version BETA instable
               term117          --> version BETA instable
               term118          --> version BETA moyennement stable
               term119          --> version GAMMA stable
               term-2.0.X       --> versions BETA relativement stables
               term-2.1.X       --> versions BETA plus stables
               term-2.2.X       --> nouvelles versions BETA
               term-2.3.X       -->

  1155..  PPeerrffoorrmmaanncceess ddee tteerrmm

  Grace a Bill McCarthy, nous avons maintenant a  notre  disposition  un
  tableau  indiquant  les  performances de term obtenues avec differents
  modems et differents types de connexions. Son but est  de  donner  aux
  utilisateurs  debutants comme experimentes une idee des configurations
  utilisees par leurs collegues et des resultats qu'ils obtiennent.

                                  LINUX term CHART 8/14/94

       |__type/vitesse modem__|_vitesse_ligne_|_cps moyen_|__maxi__|__version__|
       | 1)  USR SP 14.4      |   9600        |  950      |  963   | 1.17      |
       | 2)  USR SP 14.4      |  14400        | 1376      |  n/a   | 1.18p06   |
       | 3)  Zoom 2400        |   2400        |  220      |  230   | 1.19      |
       | 4)  Boca V.32bis 14  |  57600        | 1400      |  n/a   | 1.01/09?  |
       | 5)  Viva 14.4        |  14400        | 1300      |  n/a   | 1.16      |
       | 6)  USR SP 14.4      |  14400+       | 1550      | 1680   | 1.19      |
       | 7)  Intel 14.4 Fax   |  14400        | 1400      | 1650   | 2.0.4     |
       | 8)  cable tv hookup  |  57600        | 1500      | 1800   | 1.18p06   |
       | 9)  Twincom 144/DFi  |  57600        | 1500      | 4000?  | 2.0.4     |
       | 10) USR SP 14.4      |  14400        | 1200      | 1500   | 1.08      |
       | 11) cable tv hookup  |  19200        | 1300      | 1800   | 1.19      |
       |-----------------------------------------------------------------------|

       + options/parametres du termrc :

       1) default escapes   2) window 5       3) baudrate 2400    4) n/a
          baudrate 9600        timeout 200       window 3
          window 10                              noise on
          timeout 150

       5) compress off      6) baudrate 19200  7) ignore 19+17    8) compress off
          window 10            compress on        window 4           escape 0, 13,
          timeout 150                             timeout 90         16-19, 255
          baudrate 38400                                             baudrate 0
                                                                     shift 224
                                                                     flowcrtl 500
                                                                     window 10
                                                                     timeout 70
                                                                     retrain on
                                                                     breakout 24
       9) compress off     10) compress off      11) baudrate 19200
          baudrate 57600       baudrate 38400        compress on
          window 10            escape 17, 19         shift 224
          timeout 200          remote                escape 0, 13 16-17
          noise on                                   19, 255
          share on                                   window 10
          remote                                     timeout 40

       Eviter des caracteres a une extremite implique qu'il faut les ignorer a l'autre.

  1166..  TTrruuccss eett aassttuucceess ttrroouuvveess ssuurr llee NNeett

  Dans les _n_e_w_s_g_r_o_u_p_s traitant de Linux,  de  nombreuses  questions  sur
  term  reviennent  reguliement,  suivies  de  leurs   reponses. Afin de
  reduire l'encombrement des _n_e_w_s_g_r_o_u_p_s, certaines  sont  traitees  ici,
  que  l'auteur  ait  ou  non  personnellement experimente les solutions
  proposees.

  +o  Nombreux sont ceux qui se plaignent d'ennuis avec vi, lequel refuse
     d'afficher 24 lignes dans une fenetre qui en comporte pourtant bien
     24. C'est en particulier le cas  des  utilisateurs  d'Ultrix.  Pour
     resoudre ce probleme, trois methodes sont envisageables :

     1. Se connecter au systeme distant par la commande :

          trsh -s telnet <hostname>

     2. Ajouter resize; clear dans votre fichier '.login'.

     3. La  meilleure  solution  semble  etre  d'entrer  sur  le systeme
        distant :

          stty 38400

  +o  Nombreux sont ceux qui ont des problemes avec  des  connexion  term
     qui   s'interrompent,  quelles  qu'en  soient  les  raisons.  C'est
     pourquoi ils souhaitent connaitre l'etat de la connexion  avant  de
     lancer  des  applications.  Cet  etat peut etre determine grace aux
     petits _s_c_r_i_p_t_s _s_h_e_l_l donnes en exemple ici :

     Pour ceux qui utilisent tcsh :

       if ( { trsh -s true } ) then
         ...
       endif

  et pour ceux qui utilisent bash :

    if trsh -s true; then
      ...
    fi

  +o  Netscape, le nouveau client WWW semble poser des problemes  a  ceux
     qui  souhaitent  le  faire  fonctionner  avec term. Voici comment y
     parvenir :

             1. Termifiez netscape.
             2. Lancez termnetscape.
                   Dans le menu Options | Preferences | Mail/Proxys,
                   laissez vides _toutes_ les boites 'proxy'.
                   Mettez 'remotehost' et 80 dans les boites SOCKS.
             3. Ne tenez pas compte de l'erreur qui survient lorsque vous
                   quittez le menu Options.
             4. Si termnetscape ne fonctionne pas correctement :
                   dans le menu Options | Preferences | Mail/Proxys,
                   laissez vides _toutes_ les boites 'proxy'.
                   Mettez 'none' et 80 dans les boites SOCKS.
             5. Ne tenez pas compte de l'erreur qui survient lorsque vous
                   quittez le menu Options.

  1177..  DDiivveerrss

  Complements souhaitables a ce document :

  +o  Detailler le traitement des problemes.

  +o  Detailler les considerations de securite.

  +o  termwrap.

  +o  Suggestions.

  En tout etat de cause, si vous avez des suggestions, des critiques  ou
  quelque  remarque  que ce soit a propos de ce document, n'hesitez pas.
  Patrick Reijnen est l'auteur actuel du term-HOWTO et peut  etre  joint
  aux adresses suivantes : patrickr@cs.kun.nl ou patrickr@sci.kun.nl.

  Cette  remarque  s'applique  egalement  au  traducteur, dont l'adresse
  est : ruch@labri.u-bordeaux.fr.

  1188..  RReemmeerrcciieemmeennttss

  Nombreux sont ceux a qui l'auteur souhaite adresser ses remerciements.
  Avant  tout, merci a Michael O'Reilly et a l'ensemble des developpeurs
  de term, qui ont mis a notre disposition un  si  bel  outil.  L'auteur
  remercie egalement tout ceux qui ont fait part de leurs experiences et
  ont contribue  a  ce  document.  En  font  partie  Bill  Reynolds,  le
  precedent  auteur  de  ce HOWTO, Ronald Florence, Tom Payerle, Bill C.
  Riemers, Hugh Secker-Walker, Matt Welsh, Bill McCarthy, Sergio, Weyman
  Martin et bien d'autres dont il oublie de mentionner les noms.

  Le  traducteur  tient  a  adresser  a  Xavier  Cazin  (xc@itp.itp.fr),
  coordinateur des traductions francaises de la documentation Linux, ses
  plus vifs remerciements pour le travail qu'il accomplit et reste a son
  entiere disposition. Il tient egalement a remercier  Olivier  Belhomme
  (le  premier  cyber-S.D.F.,  sans domaine fixe :)) pour son travail de
  relecture, qui a permis a ce document de ne pas arriver  jusqu'a  vous
  truffe d'erreurs.

  Video HOWTO
  Jean-Michel          VANSTEENE,     <vansteen@frcl.bull.fr>,
  <vanstee@worldnet.net>
  v1.1, 13 Octobre 1995

  Ce document  souhaite apporter une aide a  la configuration  de  votre
  environnement   graphique   sous Linux, plus specifiquement concernant
  votre sous-systeme  video.   La   premiere  partie   sera  entierement
  consacree aux  serveurs XFree86 et au  fichier de configuration corre-
  spondant.   La   deuxieme decrira quelques programmes     qui     met-
  tent       en    oeuvre       les      methodes  etudiees.  Toutes vos
  remarques   concernant  la   forme  ou   le  fond   sont   les  bienv-
  enues.   Elles permettront    de  faire  de   ce document    une  aide
  precieuse pour tirer le meilleur de votre materiel.  Vous  pouvez  les
  envoyer aux adresses ci-dessus.  Bonne lecture.

  11..  IInnttrroodduuccttiioonn

  L'environnement  X  permet aux systemes fonctionnant sous Unix d'avoir
  un environnement graphique  de qualite.  C'est un systeme  de  gestion
  de      fenetres base   sur    un   fonctionnement  en reseau.    Bien
  entendu il    est   utilisable   sur une   machine isolee,  mais  cela
  signifie  qu'il prend naturellement en compte votre reseau si vous  en
  avez un. Les programmes  peuvent tourner  sur des machines  distantes,
  la visualisation  se faisant sur  la station de travail locale.

  Sous   Linux,  l'environnement X  est  le systeme X-Window du MIT.

  11..11..  GGeenneerraalliitteess ssuurr XX

  L'environnement  X  est relativement complexe  mais nous en degagerons
  les   grands points. Il  existe une   litterature  importante  sur  ce
  sujet.

  11..11..11..  AAffffiicchhaaggeess eett eeccrraannss

  L'environnement X est un  systeme de multi-fenetrage graphique en mode
  point (_b_i_t_m_a_p).  Il  supporte la couleur,  les niveaux de gris  et  le
  monochrome.   Un  systeme     d'affichage  sous  X   (appele  _d_i_s_p_l_a_y)
  correspond a un  ensemble comprenant uunn  ccllaavviieerr,  uunn   ssyysstteemmee     ddee
  ppooiinnttaaggee    et     uunn     oouu   pplluussiieeuurrss eeccrraannss. Ceci  est fondamental
  et  lors de la configuration  de cet  environnement,  notamment   sous
  Linux,   c'est  cet ensemble  complet  qu'il faudra configurer.   Nous
  n'etudierons   en   detail  que    la  configuration  du  sous-systeme
  video.  Pour les  deux autres sous-systemes       il     existe    des
  documents  fort   bien realises   dont une liste  est     fournie   au
  chapitre   ``Les documents a consulter''.

  11..11..22..  LLee mmooddeellee cclliieenntt--sseerrvveeuurr

  X   est  donc  un  systeme    de  gestion de fenetres oriente reseaux.
  La      visualisation       est      completement   independante    de
  l'execution  des   applications.    Alors  que  plusieurs applications
  tournent    sur votre  machine,   plusieurs  autres  pourront  tourner
  sur   des   machines  distantes,  envoyer des   requetes a travers  le
  reseau vers  votre affichage  (_d_i_s_p_l_a_y)  et  recevoir  des  evenements
  provenant  du clavier  ou   de  la souris. Bien entendu la pile TCP/IP
  est utilisee.

  Le programme qui controle  chaque  affichage  est  un  _s_e_r_v_e_u_r.  Votre
  station    est   serveur  des que    votre  affichage  est  accessible
  (eventuellement  via   le  reseau)    aux  clients   que    sont   les
  applications.

  11..22..  EEtt LLiinnuuxx ddaannss ttoouutt cceellaa

  XFree86  est   le  nom  generique  du   serveur  X  sous  Linux.  Nous
  traiterons ici de XFree versions 3 et suivantes (X11R6).

  Sa configuration   est un  point  important   et   parfois  difficile.
  Il est fortement conseille d'y apporter un soin particulier.

  Une  bonne     configuration   permettra  d'obtenir   le  meilleur  de
  votre  sous-systeme    video,     mais     une     tres       mauvaise
  configuration pourra l'endommager.

  Si  vous   suivez  les conseils  donnes  dans  la suite, vous  devriez
  reussir  assez    rapidement   a   obtenir    un   systeme  pleinement
  operationnel.   Bien   entendu,   devant   la  diversite  du  materiel
  existant,    nous    ne    pourrons    indiquer      l'ensemble    des
  configurations   possibles,   mais seulement un   methode.  Il  existe
  beaucoup de     documents  plus   specifiques     a    chaque materiel
  (_/_u_s_r_/_l_i_b_/_X_1_1_/_d_o_c_/_R_E_A_D_M_E_._*).    A    utiliser   avec  la  connaissance
  necessaire !

  22..  VVuuee dd''eennsseemmbbllee ddee llaa mmeetthhooddee ddee ccoonnffiigguurraattiioonn

  La  methode  decrite dans   ce  document    s'applique  a  toutes  les
  versions  de  XFree86.   Elle s'appuiera neanmoins, pour les exemples,
  sur   la  distribution  _X_F_r_e_e_8_6_-_3_._1_._1.

  Il    y  a  deux   etapes    majeures   pour   installer  le   systeme
  graphique  et    le  rendre  operationnel.   La   premiere  consiste a
  selectionner    le  serveur approprie.    La seconde  etape   consiste
  a   le  configurer,   c'est-a-dire rediger  un    fichier   XXFF8866CCoonnffiigg
  correct.     Ce     fichier  decrira      les      trois    principaux
  elements   d'un  systeme    d'affichage  (_d_i_s_p_l_a_y) :   le ccllaavviieerr,  la
  ssoouurriiss et l'eeccrraann.

  Le  fichier XF86Config contient  plusieurs  sections ; les paragraphes
  suivants  vous  aideront a remplir  chacune d'elles. Vous trouverez en
  general dans toute distribution de Linux un fichier d'exemple tel  que
  _/_u_s_r_/_l_i_b_/_X_1_1_/_X_F_8_6_C_o_n_f_i_g_._e_g ou similaire.

  Pour  ne    pas partir  de  rien,  vous   pouvez copier   ce   fichier
  dans _/_u_s_r_/_l_i_b_/_X_1_1 et le nommer  _X_F_8_6_C_o_n_f_i_g.   C'est  l'endroit  ou  le
  serveur  (quel qu'il soit) ira le chercher.  Plusieurs pages de manuel
  en ligne sont livrees  avec XFree86  concernant  XF86Config(4/5).   Il
  est    vivement           conseille        de        les     parcourir
  (fichier _X_F_r_e_e_8_6_-_3_._1_._1_/_X_3_1_1_d_o_c_._t_g_z).

  Les sections du fichier XF86Config sont les suivantes :

     FFiilleess
        Decrit les chemins d'acces  aux fontes et  fichiers  RGB  (Rouge
        Vert Bleu)

     SSeerrvveerr  FFllaaggss
        Decrit   les   options   generales du serveur.  Reportez-vous au
        manuel en ligne pour connaitre les options possibles.

     KKeeyybbooaarrdd
        Configure le clavier, et quelques parametres optionnels.

     PPooiinntteerr
        Decrit   le  peripherique      de   pointage,   et      quelques
        parametres optionnels

     MMoonniittoorr
        Decrit votre moniteur.

     GGrraapphhiiccss DDeevviiccee
        Decrit votre carte video.

     SSccrreeeenn
        Decrit  comment   le   moniteur    et la carte     video doivent
        etre utilises.

  22..11..  CChhooiissiirr llee sseerrvveeuurr XX aaddeeqquuaatt

  Plusieurs serveurs  peuvent  se trouver  sur   votre machine  en  tant
  que fichiers executables.   Un seul  doit etre defini comme le serveur
  X de votre systeme. Vous devez donc choisir le bon.

  Les   serveurs    sont  generalement    localises dans _/_u_s_r_/_X_1_1_R_6_/_b_i_n.
  Le  nom   "officiel"   du   serveur qui   sera execute        est "X".
  Il           est generalement commode de  creer un lien symbolique  de
  X vers le serveur que vous aurez choisi.

  Les differents serveurs sont :

     XXFF8866__MMoonnoo
        (S)VGA       monochrome,         pour        les       materiels
        monochromes, par exemple Hercules.

     XXFF8866__VVGGAA1166
        Serveur couleur VGA 16 couleurs.

     XXFF8866__SSVVGGAA
        Serveur   Super   VGA. Il     peut  etre utilise     pour   tout
        materiel    SVGA.       Il    supporte  les     caracteristiques
        acceleratrices des    cartes  Cirrus  542{0,2,4,6,8,9},  Western
        Digital  90C3{1,3},  Oak  Technologies  Inc. OTIO87. Les  autres
        cartes ne sont pas accelerees.

     XXFF8866__SS33
        Serveur accelerateur pour cartes a base de circuit S3.

     XXFF8866__MMaacchh88
        Serveur accelerateur pour cartes ATI Mach8.

     XXFF8866__MMaacchh3322
        Serveur accelerateur pour cartes ATI Mach32.

     XXFF8866__MMaacchh6644
        Serveur accelerateur pour cartes ATI Mach64.

     XXFF8866__88551144
        Serveur accelerateur pour cartes 8514/A.

     XXFF8866__PP99000000
        Serveur accelerateur pour cartes P9000.

     XXFF8866__AAGGXX
        Serveur accelerateur pour cartes AGX

     XXFF8866__WW3322
        Serveur accelerateur pour cartes ET4000/W32.

  Il existe un manuel en ligne pour chacun  de ces serveurs.  Il est bon
  d'en  prendre  connaissance, notamment pour les particularites liees a
  celui qui vous interesse.

  Il  est   a noter qu'il   est   possible  de  modifier   les   pilotes
  configures  dans  un  serveur   via le _L_i_n_k_K_i_t ; Il  existe un fichier
  README a   ce propos.  Le  binaire  du serveur peut ne   pas  contenir
  tous  les  pilotes  possibles,    selon    la  distribution  que  vous
  utilisez.       Lancez       /usr/X11R6/bin/X   -showconfig       pour
  visualiser  les  pilotes configures.  Si vous  avez besoin de modifier
  votre serveur, referez vous au fichier README.

  33..  LLaa ppaarrttiiee ffaacciillee dduu ffiicchhiieerr XXFF8866CCoonnffiigg

  Comme le titre l'indique, cette partie ne pose que tres  rarement  des
  problemes. Pour ne pas depasser le cadre que nous nous sommes fixes et
  ne  pas  faire   d'ombre  aux    documents   existants,    nous   nous
  contenterons  de  vous  aiguiller  vers  quelques-uns  d'entre eux qui
  devraient vous permettre de vous en sortir.

  33..11..  LLeess ddooccuummeennttss aa ccoonnssuulltteerr

  Vous pourrez utilement consulter :

  +o  Les fichiers README du repertoire _/_u_s_r_/_l_i_b_/_X_1_1_/_d_o_c.

  +o  Les page de manuel en ligne XF86Config(4/5).

  +o  Le XFree86-HOWTO en francais ou anglais.

  +o  Le  chapitre concernant _X _W_i_n_d_o_w  du meeeer-veil-leux ;-) livre "Le
     systeme  Linux" de MMaatttt WWeellsshh et LLaarr KKaauuffmmaann et traduit en francais
     par le meeeer-veil-leux Rene Cougnenc.

  +o  Les  groupes  _U_s_e_n_e_t ccoommpp..ooss..lliinnuuxx..xx   et  ffrr..ccoommpp..ooss..lliinnuuxx.  Avant
     de   poser  des  questions,  prenez  bien  soin  de verifier que la
     reponse ne se  trouve pas dans  un de  ces documents  ou   dans  ce
     qui  suit.  Rappelons que le site ffttpp..iibbpp..ffrr  tient a jour la liste
     et le contenu de tous les   messages  emis  dans  ffrr..ccoommpp..ooss..lliinnuuxx.
     Ils se trouvent dans _/_p_u_b_/_l_i_n_u_x_/_f_r_e_n_c_h_/_f_r_._c_o_m_p_._o_s_._l_i_n_u_x

  44..  LLaa ppaarrttiiee ddiiffffiicciillee dduu ffiicchhiieerr XXFF8866CCoonnffiigg

  44..11..  LLaa sseeccttiioonn MMoonniittoorr

  C'est  de   loin  la  plus difficile a  configurer.    Cette partie va
  etre   tres detaillee  afin   que  vous puissiez  comprendre   comment
  decrire  tous   les  timings  correspondant  a  votre materiel. Il est
  important de faire tres attention lors de la  configuration  de  cette
  section.  Certaines erreurs peuvent etre fatales pour  le moniteur  ou
  la carte video.   Meme si   la methode que nous   allons voir  devrait
  permettre  d'aboutir   a  une  configuration correcte du premier coup,
  nous ne saurions (l'auteur et tous ceux qui lui ont  permis   d'ecrire
  ce  document) etre tenus pour responsables  de pannes  resultant d'une
  mauvaise configuration (Rassurez-vous, ce n'est quand meme pas courant
  ;-)).

  44..11..11..  CCoommmmeenntt ffoonnccttiioonnnnee vvoottrree eeccrraann ??

  Cette  connaissance  est essentielle  pour comprendre les  calculs que
  vous allez  devoir effectuer.  Les  valeurs obtenues seront  utilisees
  par le serveur pour controler l'affichage au plus bas niveau.

  L'ecran   genere  une   image  a   partir  d'une succession de points.
  Les points sont arranges de  la gauche vers la droite pour former  une
  ligne.  Les lignes sont arrangees du haut vers le bas  pour former une
  image.  Un point est  lumineux lorsque  le faisceau  electronique  est
  actif   et   qu'il   rencontre  la  couche  phosphorescente  du   tube
  cathodique. Le  faisceau   balaie l'ecran  de facon reguliere.

  LLeess  ppaarraaggrraapphheess   ssuuiivvaannttss ssoonntt  rreepprriiss   dd''uunn  oorriiggiinnaall     ddee  CChhiinn
  FFaanngg <<ffaannggcchhiinn@@lleellaanndd..ssttaannffoorrdd..eedduu>>  eett   ddee ppoorrttiioonnss dd''uunn   hhoowwttoo  ddee
  BBoobb CCrroossssoonn <<ccrroossssoonn@@ccaamm..nniisstt..ggoovv>>

  Le    faisceau  electronique demarre  sa   course  en haut et a gauche
  de   l'ecran.   Il parcourt l'ecran en  lignes droites successives  de
  gauche  a droite.  A  l'extreme droite d'une     ligne,   il  s'arrete
  momentanement  pour   etre  devie rapidement  vers la gauche et  d'une
  ligne vers le bas, et   ainsi  de  suite.    Ce  schema   est   repete
  jusqu'a     la  derniere  ligne.     Le  faisceau    est alors deplace
  du   coin  inferieur   droit   vers  le   coin  superieur  gauche   de
  l'ecran, et un  nouveau  balayage peut etre commence.

  Le  demarrage   du    faisceau  en  haut  et   a   gauche   est appele
  le debut d'une trame.   La  trame   se  termine  lorsque  le  faisceau
  atteint     a    nouveau    l'angle     superieur   gauche,  provenant
  directement de l'angle inferieur droit.

  Une trame est faite de toutes les  lignes que le faisceau  a  tracees.
  Si  le  faisceau   electronique etait allume durant  tout le parcours,
  tous les points seraient illumines.   Il n'y aurait  pas  de  bordures
  noires  de  chaque   cote  de   l'ecran.   Aux  coins,  l'image serait
  deformee en  raison  de  la  diffculte a controler le  faisceau en ces
  endroits.   Pour  reduire  la  distorsion,  les  points  aux angles et
  sur  les bords  ne sont   pas illumines, meme  si  le  faisceau   peut
  passer dessus.  La zone visible de l'ecran est donc reduite.
  Il  est  egalement important de comprendre  ce que devient le faisceau
  lorsqu'il     n'est    pas   en  train     d'illuminer    une   partie
  visible  de  l'ecran. Le temps que le faisceau utiliserait a illuminer
  les bords gauche et droit hors de la  zone visible, sert  au retour de
  balayage de ligne, consistant a le faire passer rapidement au debut de
  la  ligne  suivante.  Le  temps  que  le   faisceau  utiliserait  pour
  illuminer  les  bords  hauts et bas hors de  la zone visible,  sert au
  retour de balayage de trame,  faisant  passer  le  faisceau   du  coin
  inferieur droit au  coin superieur gauche.

  La   carte   video   genere  les  signaux   permettant  au moniteur de
  controler le faisceau  electronique afin de rendre une image  correcte
  dans  la  zone  visible.    La  carte  controle aussi le retour     de
  balayage de  ligne    en   generant un signal appele   synchronisation
  horizontale    (hhssyynncc)  et   le   retour  de  balayage  de   trame  en
  generant un signal  de synchronisation verticale (vvssyynncc).    Un signal
  _h_s_y_n_c  est   emis  a chaque fin de ligne.  Un signal _v_s_y_n_c  est emis a
  la fin de chaque trame.

  La technique des   signaux video necessite  qu'un temps court mais non
  nul  soit  insere  avant  et  apres  les  signaux  de  synchronisation
  horizontale et  verticale  de  facon  que  la  position   du  faisceau
  electronique  puisse   se stabiliser.  Sans cela l'image ne serait pas
  tres stable.

  44..11..22..  LLeess cchhoosseess aa  ccoonnnnaaiittrree ccoonncceerrnnaanntt vvoottrree ccaarrttee vviiddeeoo eett  vvoottrree
  mmoonniitteeuurr

  Avant  de bidouiller votre fichier  de configuration, plusieurs choses
  sont a connaitre :

  1.   Les  plages  de  frequences  de  synchronisation  horizontale  et
     verticale  de  votre moniteur.  Ces  valeurs seront  indiquees dans
     les  parties HHoorriizzSSyynncc et VVeerrttRReeffrreesshh.

  2.  La  plage de frequences  d'horloge  de  votre   carte,  ou  "  dot
     clock " (horloge point ou pixel).

  3.   La  largeur  de  bande  passante de votre  moniteur. Cette valeur
     alimentera la partie BBaannddwwiiddtthh.

  LLeess ffrreeqquueenncceess ddee ssyynncchhrroonniissaattiioonn ddee vvoottrree mmoonniitteeuurr ::

  La frequence de synchronisation  horizontale correspond au  nombre  de
  lignes   horizontales   que le moniteur  peut  ecrire  en une seconde.
  C'est  la  valeur  la  plus  importante  concernant  votre   moniteur.
  La   frequence  de   synchronisation  verticale   est  le  nombre   de
  balayages verticaux que le moniteur peut effectuer en une seconde.

  Les  frequences de  synchronisation sont   generalement  donnees  dans
  les  pages  des  specifications  techniques  de  votre  moniteur.   La
  frequence   de  synchro   verticale est  un     nombre exprime  en  Hz
  (cycles  par  secondes), la frequence horizontale etant donnee  en kHz
  (milliers  de  cycles par seconde).  Les valeurs courantes  sont    de
  l'ordre  de   50 a 80 Hz  pour  les premieres et 31 a 135 kHz pour les
  secondes.

  Si vous possedez un   moniteur multi-synchro, ces   frequences  seront
  donnees    sous  forme   d'intervalle(s). Certains moniteurs possedent
  plusieurs   frequences fixes.   Elles  peuvent etre utilisees,    mais
  vos   options  seront   limitees  en raisons   des    caracteristiques
  intrinseques     de  votre moniteur. Choisissez le  couple de  valeurs
  les   plus    elevees  possibles    pour  une   meilleure  resolution.
  Attention, piloter un moniteur  a frequences  fixes a  des  frequences
  trop elevees peut l'endommager.

  LLeess ffrreeqquueenncceess dd''hhoorrllooggee ddee vvoottrree ccaarrttee ::

  Votre   manuel   de specifications      de votre carte    video decrit
  generalement     la ou   les   frequences  d'horloge  auxquelles  elle
  peut  travailler,    autrement dit, le  nombre total de points qu'elle
  peut ecrire par seconde.  Si vous n'avez  pas  cette  information,  le
  serveur  X les  obtiendra pour vous.  Meme si ce dernier ne fonctionne
  pas bien, il inscrira  sur la sortie  standard d'une  console  une  ou
  plusieurs   lignes   de   valeurs    d'horloges   ainsi  que  d'autres
  informations.    Si vous  redirigez  le tout    dans un  fichier,   ce
  sera  sauvegarde,   meme  si    vous  avez  a  relancer  votre systeme
  pour retrouver votre affichage.

  Voici un exemple des valeurs  obtenues pour   un   adaptateur  S3  (le
  serveur SGCS est utilise) :

       WGA: 86C911 (mem: 1024k clocks 25 28 40 3 50 77 36 45 0 0 79 31 94 65 75 71)

     WWGGAA ::
        type de serveur

     8866CC991111 ::
        processeur video

     11002244kk ::
        taille de la memoire video

  Les valeurs indiquees sont des frequences en Mhz.

  Les   frequences  dont nous   disposons maintenant  serviront  dans la
  section    DDeevviiccee  et dans    la      section  MMoonniittoorr.   Nous    nous
  interesserons  a  cette  derniere   dans  ce  chapitre.    Le  suivant
  decrira rapidement la  configuration de ces valeurs  dans  la  section
  Device.

  LLaa bbaannddee ppaassssaannttee ddee vvoottrree mmoonniitteeuurr ::

  Enfin,   il     est   important  et   utile  de  connaitre   la  bande
  passante video    de   votre   moniteur.      Vous  deduirez     ainsi
  approximativement la plus grande valeur possible pour l'_h_o_r_l_o_g_e _p_o_i_n_t.
  Il y a pas mal de donnees  possibles, sachant que  certains  moniteurs
  sont   capables  de    fonctionner   30 %  au  dessus  de   leur bande
  passante nominale !

  La   connaissance   de  la  bande    passante    va   vous   permettre
  d'effectuer    des   choix    plus    intelligents   parmi   plusieurs
  configurations possibles.  Cela peut  affecter  la   qualite  visuelle
  de   l'affichage  (finesse des details, scintillement, ...).

  La  bande passante de votre moniteur doit etre indiquee dans le manuel
  qui  l'accompagne.  Si ce n'est pas  le cas, regardez la  plus  grande
  resolution   qu'il    supporte.     Voici  des  correspondances   tres
  courantes entre  resolution  et bande  passante (et donc   les  valeur
  maximales pour l'_h_o_r_l_o_g_e _p_o_i_n_t utilisable) :

               640 x 480               25
               800 x 600               36
               1024 x 768              65
               1024 x 768 entrelace    45
               1280 x 1024             110

  De  toute   facon,  il  n'y  a  rien   de magique dans tout cela ; ces
  valeurs   sont  les plus petites    frequences d'horloge  pour  chaque
  resolution  dans  la   base   de donnees des  modes  video standard de
  XFree86.   La  bande  passante  de   votre  moniteur  peut  etre  plus
  elevee  que   le   minimum   necessaire pour   sa resolution maximale,
  ne   soyez   dont   pas  affole   de   pouvoir  utiliser  une   valeur
  legerement superieure.

  Notez     egalement    que la    bande     passante est  rarement   un
  probleme  pour les frequences   d'horloge  en  dessous   de   65  Mhz.
  Avec    un  moniteur    SVGA     ou   haute   resolution,   vous    ne
  frolerez pas la limite de la bande passante de votre moniteur.   Voici
  quelques exemples :

                       Marque                  Bande passante video
                       ------                  --------------------

                       NEC 4D                          75 Mhz
                       Nano 907a                       50 Mhz
                       Nano 9080i                      60 Mhz
                       Mitsubishi HL6615               110 Mhz
                       Mitsubishi Diamond Scan         100 Mhz
                       IDEK MF-5117                    65 Mhz
                       IOCOMM Thinksync-17 CM-7126     136 Mhz
                       HP D1188A                       100 Mhz
                       Philips SC-17AS                 110 Mhz
                       Swan SW617                      85 Mhz

  Meme   les   moniteurs   bas   de  gamme  ne  sont   generalement  pas
  terriblement  limites   par   la    largeur   de  bande   pour    leur
  resolution.   L'ecran   NEC  Multisync   II en   est  un  bon exemple.
  D'apres ses  specifications, il ne peut afficher  800  x  600  points,
  mais seulement 800 x 560.  Pour de telles resolutions, vous n'avez pas
  besoin d'horloge tres rapide ni d'une bande passante tres large  ;  il
  est  probable que  le meilleur que vous puissiez obtenir   corresponde
  a  des   frequences de   l'ordre de 32 a  36  Mhz,  les  deux  n'etant
  pas tres loin de la bande passante du moniteur qui est de 30 Mhz.

  A  ces  frequences, votre image ne sera peut etre pas aussi fine qu'il
  le    faudrait      mais     certainement   d'une   qualite tolerable.
  Bien    sur,   il    serait   preferable  d'avoir  une  bande passante
  superieure,  disons  au   moins  36  Mhz.   Ce  n'est  toutefois   pas
  critique  pour    la   plupart   des applications   comme l'edition de
  texte, du   moment qu'il  n'y   a  pas   de   distorsion  severe  dans
  l'image (vos yeux vous le diraient).

  LLeess ccoonnttrroolleess ::

  La   gamme  de frequences     de synchronisation de   votre  moniteur,
  associee a   la  frequence    de   l'horloge   de    votre  adaptateur
  video,  determine  la  resolution  maximale  que vous pourrez obtenir.
  Mais il appartient  au  pilote  de  pouvoir  gerer  au    mieux  votre
  materiel.   Un    materiel  de  plus  haut  niveau  sans  un pilote de
  peripherique apte  a en tirer partie est un  gachis   !    D'un  autre
  cote,  avec   un  tres  bon pilote et un materiel peu performant, vous
  pourrez pousser votre materiel a son maximum. C'est la philosophie  de
  XFree86.

  44..11..33..  IInntteerrpprreetteerr lleess ssppeecciiffiiccaattiioonnss ddee bbaassee

  Cette  section  explique en detail les specifications dont nous venons
  de  parler,  ainsi     que  d'autres   choses  dont    nous     aurons
  besoin.      D'abord,  quelques  definitions.   Entre parentheses sont
  indiques    les    noms  symboliques    que    nous  utiliserons  pour
  effectuer les calculs.

     FFrreeqquueennccee ddee ssyynncchhrroonniissaattiioonn hhoorriizzoonnttaallee ((HHSSFF))
        Nombre de parcours horizontaux par seconde (voir ci-dessus)

     FFrreeqquueennccee ddee ssyynncchhrroonniissaattiioonn vveerrttiiccaallee ((VVSSFF))
        Nombre  de  parcours  verticaux  par  seconde  (voir ci-dessus).
        Importante car  elle  correspond  au  taux  de  rafraichissement
        maximal.

     FFrreeqquueennccee dd''hhoorrllooggee  ppooiinntt ((DDCCFF))
        Plus           formellement       "  frequence    d'horloge   de
        pilotage " ;   quelquefois appelee a tort  bande  passante.   La
        frequence    de   l'oscillateur   (VCO)   de  votre  adaptateur,
        correspondant  au   nombre maximum   de  points   par    seconde
        qu'il  puisse emettre.

     LLaarrggeeuurr ddee bbaannddee ppaassssaannttee vviiddeeoo ((VVBB))
        La  plus  haute   frequence  que  le  signal de votre   moniteur
        puisse atteindre.  Cela limite l'horloge point que  vous  pouvez
        utiliser et donc la finesse de votre image.

     LLoonngguueeuurrss ddee ttrraammee ((HHFFLL,, VVFFLL))
        La  longueur     de  trame  horizontale  (HFL)    correspond  au
        nombre  de tops d'horloge  necessaire   pour   que  le  faisceau
        electronique   de  votre moniteur  parcoure  une ligne (incluant
        les   bords gauche et  droit inactifs).  La  longueur  de  trame
        verticale  (VFL)   correspond au nombre de lignes  balayees pour
        une  image entiere (y compris les bords superieur  et  inferieur
        inactifs).

     TTaauuxx ddee rraaffrraaiicchhiisssseemmeenntt ((RRRR))
        C'est  le  nombre   d'images  par  seconde.    Les  plus  hautes
        frequences  sont  les  meilleures,  puisqu'elles  reduisent   le
        scintillement.   60  Hz est  correct, mais   la valeur  standard
        VESA  est  de  72  Hz. Le  calcul donne :

          RR = DCF / (HFL * VFL)

     A noter que le produit au  denominateur  ne  correspond  pas  a  la
     resolution  visible du moniteur, mais bien  a quelque chose de plus
     grand. Nous verrons les details apres.

  AA pprrooppooss ddee llaa llaarrggeeuurr ddee bbaannddee

  Les  fabricants  de  moniteurs  aiment   annoncer   de  larges  bandes
  passantes,  parce     que  cela  determine   directement la  precision
  des changements    de   l'intensite       et   des     couleurs     de
  votre  ecran. Une   plus grande bande passante   signifie souvent  une
  plus grande finesse des details.

  Votre  moniteur   utilise     des    signaux    electroniques     pour
  presenter   une   image   a    vos  yeux.    De   tels  signaux   sont
  convertis sous  forme analogique a  partir d'un signal  digital.   Ils
  peuvent  etre  consideres   comme  une   combinaison  d'ondes simples,
  chacune ayant une  frequence fixe,  la  plupart  d'entre  elles  etant
  dans   la  gamme  du  megahertz,  disons  de l'ordre de 20 a  70  MHz.
  La largeur   de bande  de  votre moniteur  correspond effectivement  a
  la  plus  haute  frequence de signal analogique qu'il puisse supporter
  sans distorsion.

  Dans notre cas,  la largeur de bande   est  surtout  importante  comme
  point  de  coupure approximatif pour la plus  grande  valeur d'horloge
  point que  nous pourrons utiliser.

  FFrreeqquueenncceess ddee ssyynncchhrroonniissaattiioonn eett ttaauuxx ddee rraaffrraaiicchhiisssseemmeenntt

  Le  trace  d'une   ligne   horizontale    a  l'ecran    ne  correspond
  qu'a   la    portion  visible de     la trame horizontale entiere.  Il
  n'y a a un moment  donne qu'un seul point reellement actif.   Le  taux
  de   rafraichissement  est suffisant pour que, grace  a la persistence
  retinienne, vous ayez une image complete.

  Souvenez-vous que  le parcours du faisceau est  un  zig-zag ; il va de
  gauche a droite et revient rapidement a gauche en descendant.

  Maintenant,    nous   pouvons evoquer   les relations  entre   taux de
  rafraichissement,    horloge  point et     taille   de  trame.     Par
  definition, un hertz (Hz) est  une unite de  frequence correspondant a
  un cycle par seconde. Donc  si la longueur de  trame  horizontale  est
  HFL,   et   la   longueur  de  trame verticale    est VFL, l'ecran est
  entierement couvert en (HFL * VFL) tops d'horloge.     Puisque   votre
  carte    emet     DCF tops par   seconde, manifestement   le  faisceau
  electronique   de  votre moniteur peut balayer  l'ecran  de  gauche  a
  droite   et    de  haut   en  bas DCF / (HFL * VFL) fois  par seconde.
  C'est  le taux de rafraichissement (RR)  de votre ecran,  c'est-a-dire
  le nombre de fois par seconde que votre image sera redessinee.

  Vous    devez    bien  assimiler  ce  concept    pour   effectuer  une
  configuration correcte     avec   le    meilleur     compromis   entre
  resolution  et scintillement.

  44..11..44..  CCoommpprroommiiss ddaannss llaa ccoonnffiigguurraattiioonn ddee vvoottrree ssyysstteemmee

  La      formule    suivante    est   obtenue      a  partir   de    la
  precedente :

       DCF = RR * HFL * VFL

  Votre _h_o_r_l_o_g_e _p_o_i_n_t  est fixee  par  les   caracteristiques  de  votre
  carte  video.   Vous  pouvez utiliser ce capital de points par seconde
  pour  acheter   soit  du  taux    de  rafraichissement,  soit  de   la
  resolution   horizontale   ou verticale. Si   l'un augmente, un ou les
  deux autres doivent diminuer.

  Notez cependant que  le   taux   de  rafraichissement  ne   peut  etre
  superieur  a  la   frequence  maximum  de  synchro verticale de  votre
  moniteur.  Pour un   moniteur donne  et une horloge  point donnee,  il
  y  a  un minimum  dans les longueurs  de trames en dessous duquel vous
  ne pouvez pas descendre.

  En  choisissant vos parametres,  n'oubliez pas : si RR est trop petit,
  vous serez gene par le scintillement.

  Vous  ne souhaiterez donc pas descendre votre taux de rafraichissement
  en dessous de 60 Hz.  C'est le minimum acceptable  en  dessous  duquel
  l'oeil  fatigue  vite ; si vous  etes tres sensible, choisissez 72 Hz,
  valeur standard VESA.

  La  sensibilite  au scintillement est   tres personnelle  mais  depend
  aussi   de  l'environnement  de   travail.  Si vous travaillez sur des
  fonds noirs   et   des   couleurs   tres  contrastees,   vous  pourrez
  descendre a 45 Hz.

  Faites  un essai :   ouvrez une fenetre  xterm -bg  white -fg black et
  agrandissez-la au maximum.  Reglez  votre moniteur aux trois quarts de
  son  intensite  et  ne regardez pas l'ecran.  Jetez ensuite des  coups
  d'oeil sur  votre  ecran, sans le   regarder  droit  devant   mais  en
  utilisant  la vision peripherique ; ce sont les cellules visuelles qui
  sont le plus sensibles au  scintillement.   Si  vous  estimez  que  la
  vision est  confortable ou tolerable, le taux de rafraichissement vous
  convient, sinon augmentez-le de facon a ne pas vous exposer a des maux
  de tete !

  Disons   qu'a   ce stade   vous   disposez d'une   valeur de taux   de
  rafraichissement.  Avec le choix de HFL et VFL, nous avons encore  pas
  mal de marge de manoeuvre.

  44..11..55..  TTaaiillllee mmeemmooiirree nneecceessssaaiirree

  La  quantite  de memoire video dont vous disposez limite la resolution
  que vous pouvez atteindre pour un affichage couleur ou  a  niveaux  de
  gris.  Ce  n'est   probablement pas un critere pour les ecrans noir et
  blanc.

  Pour  les affichages  a  256 couleurs,  un  octet  de   memoire  video
  permet   de  coder  un  point.    Cet   octet  contient  l'information
  determinant  le  melange  de  Rouge,  Vert  et  Bleu  necessaire  pour
  l'obtention     de   la  couleur.        Pour   une  resolution     de
  800 x 600  points  avec  un  octet    par    point,  il     faut  donc
  800 * 600 = 480.000 octets de memoire sur votre carte video.

  Plus     generalement,    les   besoins    en    memoire   seront   de
  (HR * VR) / 1024 kilo-octets   de RAM     (DRAM      ou  VRAM).   Dans
  le  cas  d'une   resolution de 936 x 702 points, nous aurons besoin de
  (936 * 702) / 1024, soit 642 ko.  Si  vous  disposez  d'un  megaoctet,
  c'est parfait.

  Si  vous   n'avez que 512 ko,  il  vous faudra choisir  une resolution
  inferieure.   Meme  avec  un  moniteur  tres  performant,  une  taille
  memoire  insuffisante    ne permet pas  de   tirer pleinement avantage
  de celui-ci.  D'autre part, si vous disposez d'un  megaoctet  et   que
  votre  ecran  ne   supporte que 800  x  600,  vous ne pourrez depasser
  cette resolution.

  La  memoire  en  supplement   n'est  jamais  perdue.   XFree86   saura
  l'utiliser   pour  gerer  un   ecran   virtuel   plus  grand  que   la
  resolution utilisee (voir la configuration  de la  taille  d'un  ecran
  virtuel   dans   XF86Config).   Souvenez-vous   qu'une  taille memoire
  de  512  ko correspond a  512 * 1024 = 524288 octets.

  Si vous vous contentez  de  16  couleurs,  vous  pouvez   indiquer  au
  serveur  que  vous    n'utiliserez     que  4 bits     par   point  et
  ainsi doubler   la resolution que votre  carte  peut  supporter.   Les
  cartes    S3,  par  exemple,  savent    gerer  1024 x 768 x 256.  Vous
  pouvez passer a 1280 x 1024 x 16 avec 4 bits par point (Depth 4,  voir
  ce parametre dans XF86Config).

  44..11..66..  CCaallccuulleerr lleess ttaaiilllleess ddee ttrraammeess

  Attention  :         cette   methode     a      ete developpee    pour
  les    moniteurs     multi-synchro.    Elle  fonctionnera  sans  doute
  pour  les  moniteurs  a frequence fixe, sachant  que   vous ne  devrez
  pas  vous  permettre de  depasser les frequences imposees  par  celui-
  ci.

  Commencons  par   diviser DCF par  la plus  grande valeur  de HSF pour
  obtenir le nombre minimum de points par ligne disponibles.

  Par exemple, supposons  que vous ayez une  carte   SVGA  Sigma  Legend
  avec une horloge a    65  MHz et   un  moniteur avec    une  frequence
  horizontale de 55 kHz.   La valeur (DCF / HSF)  est donc 1181.

  Maintenant, un peu de magie ;-).  Arrondissez cette valeur a  la  plus
  proche  valeur  multiple  de  8.   La  plupart  des  cartes SVGA et S3
  utilisent en effet des registres 8 bits decales de   3  bits  vers  la
  gauche,  ce  qui  fait reellement 11 bits.  De toute facon, ca ne fait
  pas de mal. Donc, nous obtenons 1176.

  Ceci  correspond a la valeur  de HFL minimum utilisable.   Une  valeur
  superieure  de  HFL  (donc  une meilleure resolution horizontale) peut
  etre  obtenue,  en  diminuant    la  valeur    de   HSF.   Mais     le
  scintillement   sera   superieur.   Au  debut  une  petit  gymnastique
  intellectuelle    est   necessaire.     Dites-vous   bien     que   la
  frequence   d'horloge  de votre  carte  video donne  un nombre maximal
  de points par seconde.  Evidemment, plus vous  mettez  de  points  par
  ligne,  plus  vous  mettez de temps a la  parcourir, et moins vous  en
  parcourerez.

  Continuons !    De  maniere       un    peu    brutale   (cela      se
  demontre,    mais  l'on   tomberait  dans des    calculs  certes  plus
  precis, mais rebarbatifs), disons   que 8800 %% de   la  longueur  de  la
  trame  horizontale  est disponible pour  la partie visible de la ligne
  balayee. Cela laisse  la  marge necessaire pour les bords et le retour
  de balayage. Nous obtenons donc la valeur de 944.

  Maintenant,  pour  obtenir  une  image au  format 4:3, definissons  la
  resolution  verticale  aux  33//44 de   la   resolution horizontale.   Ce
  qui  nous  donne  708.  Enfin, la valeur reelle de VFL est obtenue  en
  mmuullttiipplliiaanntt cette  valeur par  1.05 (toujours pour  les  bords  et  le
  retour de balayage).  Nous obtenons 743.

  La  encore,  cela   semble  tres empirique, mais nous considerons pour
  cette  methode  que vous  connaissez le  minimum de choses  sur  votre
  materiel.    Nous  verrons    plus loin  dans   les exemples reels que
  si les donnees de depart sont nombreuses, il est possible  d'effectuer
  des calculs rigoureux.

  A  propos  de  4:3, ce rapport nous  rapproche du celebre nombre d'or,
  (1 + sqrt(5))/2.  Il  semble assez plaisant d'avoir  un tel  format  ;
  les      resolutions     classiques    (640  x  480,  800  x  600   et
  1024 x  768)  l'approchent   toutes.   C'est  plus  psychologique  que
  technique ; rien    ne vous empeche    de modifier ce rapport.
  Nous avons donc : HFL=1176 et VFL=743.  Divisons 65 Mhz par le produit
  des deux, ce qui nous  donne un taux  de rafraichissement de 74.4  Hz.
  Excellent  !     Mieux   que  le  standard  VESA !    Et vous avez une
  resolution  de  944 x 708,   ce  qui   est   meilleur  que 800 x  600.
  Pas mal !

  Vous   pouvez   meme   ameliorer  le  taux  de   rafraichissement  aux
  alentours  de 76  Hz,  en sachant que  les   moniteurs ont souvent une
  synchro  horizontale  de 2 kHz superieure a la valeur nominale, et  en
  diminuant   VFL.    Mais laissons ces   manipulations   a  plus  tard.
  Assurez-vous  que  votre moniteur supportera les 76 Hz (Le NEC 4D, par
  exemple ne peut aller qu'a 75 Hz).

  Avouez   que      jusque-la   cela     n'a      pas  ete  completement
  magique !

  44..11..77..  MMaaggiiee nnooiirree eett ttooppss ddee ssyynncchhrroo

  Nous  avons   calcule  les  valeurs   HFL  et VFL pour la frequence de
  l'_h_o_r_l_o_g_e _p_o_i_n_t que nous avons choisie. Nous avons trouve un  taux  de
  rafraichissement acceptable et verifie que nous disposions d'assez  de
  memoire.  Maintenant il est necessaire de savoir quand  et  ou  placer
  les tops de synchro.

  Les  tops  de   synchro controlent les frequences  reelles de balayage
  horizontale et verticale de votre moniteur.  Les valeurs  HSF  et  VSF
  que   vous   avez  extraites  de    votre  manuel sont des  frequences
  nominales, et correspondent a des maxima approximatifs.  Les  tops  de
  synchro   injectes  dans    le  signal  video   par  votre  adaptateur
  permettent au moniteur de fonctionner correctement.

  Vous souvenez-vous  que seule   une partie  du  temps  necessaire   au
  balayage  d'une trame est   utilisee pour l'image a  afficher (i.e. la
  resolution) ?

  SSyynncchhrroo hhoorriizzoonnttaallee ::

  Selon  les  definitions precedentes,  il faut HFL  tops  d'horloge  de
  votre   carte  pour tracer une  ligne complete.  Appelons HR le nombre
  de tops correspondant seulement a la  partie  visible  (la  resolution
  horizontale).        Donc     HR < HFL  par definition.  Concretement,
  considerons   que  le  signal  video   demarre  a  l'instant   0,   et
  schematisons les deux valeurs comme figure ci-dessous :

       +----------------------------------------------------------------+
       |_____________________________________                           |
       |                                    |                           | unite : top
       +------------------------------------+---------------------------+
       0                                   HR                          HFL
                                            |        |         |        |
                                            |<-HGT1->| <-HSP-> |<-HGT2->|

  Maintenant,  nous  devons  placer  un  top de synchro  de longueur HSP
  entre la fin du  signal video correspondant a la  partie visible et la
  fin  de  la   trame    entiere.   Pourquoi  cela  ?  Parce   que  nous
  souhaitons  centrer  l'image au mieux et   nous avons  deja  vu  qu'il
  fallait  laisser  un temps  non negligeable, d'une part pour les bords
  non  visibles,  d'autre part pour   le retour du  faisceau.  Si   nous
  reussissons cela, nous obtiendrons une image correcte.
  De    chaque cote de HSP   doivent etre prevus des temps  "de  garde",
  et    de    stabilisation.     Environ     30    tops   en    premiere
  approximation.    Ce      sont     HGT1    et     HGT2.     En realite
  HGT1 est different de  HGT2, mais vous pourrez les prendre  egaux   si
  vous  partez  de  rien.   Vous   ajusterez apres.

  Si  vous  avez  de  la  chance,  ou  un  bon manuel accompagnant votre
  moniteur (ou les deux), les valeurs ci-dessus sont  indiquees, le plus
  souvent  en  duree, mais il est tres facile  d'en deduire le nombre de
  points  (ou  de tops  d'horloge)   correspondant.  Par   exemple,  mon
  manuel (moniteur HYUNDAI HL7682P) indique les valeurs suivantes :

                                       HGT1            HSP             HGT2            Frequences
                                       ----            ---             ----            ----------
               640x480:  H(u)          0.636           3.813           1.907           31,5 kHz
               VGA       V(ms)         0.318           0.064           1.048           60.0 Hz

               800x600   H(us)         1.119           2.399           1.279           48,1 kHz
               VESA      V(ms)         0.772           0.124           0.479           72,0 Hz

               1024x768  H(us)         0.615           1.723           2.338           48,9 kHz
               SVGA/NI   V(ms)         0.204           0.306           0.327           60,5 Hz

               1024x768  H(us)         0.320           1.813           1.920           56,48 kHz
               VESA      V(ms)         0.053           0.106           0.513           70,1 Hz

               1280x1024 H(us)         0.296           0.593           2.815           64,3 kHz
               Standard  V(ms)         0.124           0.078           0.498           60,1 Hz

  Ce  sont   des valeurs  assez courantes,  certaines  etant au standard
  VESA.  Il y  a  fort a  parier que   beaucoup de moniteurs    ont  des
  valeurs       semblables.   Vous    pouvez     utiliser  ces   valeurs
  comme reference, selon votre resolution.

  Pour  nos  calculs, prenons     par  exemple  une  valeur   de   HSP =
  3,8  us  (VGA).  Utilisant l'horloge  a 65 MHz decrite, nous    savons
  que           HSP          est          equivalent          a        :
  65  * (10 ^ 6) * 3.8 * (10 ^ (-6)) soit 247 tops d'horloge (^ signifie
  puissance).

  Retour sur  le schema  precedent.  Comment devons nous placer nos  247
  tops d'horloge ?

  En   utilisant   notre exemple,  nous   avions   HR=944  et  HFL=1176.
  La difference  est  donc  de  1176 - 944 = 232   qui est  inferieur  a
  247  !  Nous devons  donc effectuer quelques ajustements. Que pouvons-
  nous faire ?

  En augmentant  HFL  de  8  et    en  diminuant  VFL   d'autant,   nous
  obtenons une difference de 1184 - 936 = 248. On y est presque.

  Ensuite,  au   lieu  d'utiliser la valeur  de 3,8 us, nous utiliserons
  3,5 us  pour HSP.   Nous obtenons alors  65 * 3,5 = 227.  Cela  semble
  mieux,  bien  que   248  ne  soit   pas  beaucoup  plus grand que 227.
  Rappelons qu'il faut reserver du temps pout HGT1  et HGT2.  Or il faut
  au  moins 30 tops  pour  chacun.  De plus  ils  doivent etre multiples
  de 8, donc disons 32. Sommes-nous coinces ?

  Non, heureusement. Nous allons en fait calculer la  longueur de  trame
  qu'il  va nous falloir, en nous rappelant que la valeur de  HFL = 1176
  est un minimum. On peut l'augmenter,  en  diminuant  la   valeur  HSF,
  donc le taux de rafraichissement.

  Continuons  a  chercher  les bonnes valeurs. 936  est bien multiple de
  8.   Ajoutons   HGT1,   936  +  32  =  968.   Ajoutons   ensuite  HSP,
  968   +   227   =          1195.            Ajoutons    enfin    HGT2,
  1195 + 32 = 1227.   Cela ne semble  pas  trop mal, mais  1232  est  la
  plus proche valeur multiple de 8.

  Utilisons  encore  la  calculatrice pour trouver la longueur du top de
  synchro reellement utilise.   1232  -  32  =  1200  qui  est  multiple
  de    8.   1232  - 32 - 968 =      232, correspondant a une synchro de
  3,57 us qui est raisonnable.

  De plus  936 / 1232 = 0.76 qui  est assez  proche  des  80%  que  nous
  donnions.   Nous  solliciterons  donc   le  moniteur  a  52,7  kHz (65
  MHz / 1232) qui est dans ses possibilites.

  SSyynncchhrroo vveerrttiiccaallee ::

  En   utilisant  la  regle   des  trois-quarts,  nous  donnerons  a  la
  resolution  verticale  la  valeur 702. La  longueur de trame verticale
  sera de 702 * 1,05 = 737.

  Le  taux de  rafraichissement   de  l'ecran   est  donc  egal  a    65
  Mhz / (737 * 1232) = 71,6 Hz.  C'est excellent !

  Le schema de synchro verticale est similaire :

       +----------------------------------------------------------------+
       |_____________________________________                           |
       |                                    |                           | unite : top
       +------------------------------------+---------------------------+
       0                                   VR                          VFL
                                            |         |         |
                                            |<--VGT-->|<--VSP-->|

  La  synchro  demarre   apres   l'affichage de la  derniere ligne.  VGT
  correspond  au  temps  "de  garde"  vertical   (compte  en  nombre  de
  lignes)  necessaire  avant  le top  de synchro.  Certains moniteurs se
  satisfont d'une   valeur  VGT = 0,  ce   que   nous  utiliserons  dans
  l'exemple.   Certains necessitent 2  ou 3 lignes de stabilisation,  et
  si   un  doute      existe, il    vaut     mieux  les  inserer.  Aucun
  probleme ne pourra venir de la.

  Revenons   a    notre    exemple : a    partir    de  la definition de
  la longueur de trame, l'unite de temps vertical correspond   au  temps
  necessaire    pour tracer une  ligne horizontale complete,   ce    qui
  donne ici    (1232 / 65 Mhz) = 18,95 us.

  L'experience  montre  que  la valeur  de top    de  synchro  verticale
  devrait  se   trouver  dans  l'intervalle   50  a 300 us.  Prenons par
  exemple  150 us, qui   correspond a  8  temps   de  trame  horizontale
  (150 / 18.95).

  44..11..88..  RRaasssseemmbblloonnss nnooss iiddeeeess

  Nous  pouvons  deja  construire    le  debut  de  la  section MMoonniittoorr.
  Nous  ne  nous     etendrons  pas   sur   les   rubriques  _I_d_e_n_t_i_f_i_e_r,
  _V_e_n_d_o_r_N_a_m_e et _M_o_d_e_l_N_a_m_e. Tres facile.
  La  rubrique _B_a_n_d_w_i_d_t_h doit indiquer la  largeur  de bande passante de
  votre moniteur. Exemple :

       # Bandwidth est en MHz sauf si unites specifiees

           Bandwidth   75.0

  La rubrique  _H_o_r_i_z_S_y_n_c  indique  la  ou  les  frequences  horizontales
  supportees   par  votre  moniteur.    On  peut y indiquer  une   seule
  frequence,   plusieurs    valeurs   discretes   ou   bien    un     ou
  plusieurs intervalles. Exemple :

       #    HorizSync   31.5              # typique pour un moniteur a frequence fixe unique
            HorizSync   30-82             # multisync
       #    HorizSync   31.5, 35.2, 37.5  # frequences de synchro multiples
       #    HorizSync  15-25, 30-50       # plusieurs intervalles de frequences

  On   agira  de   meme     pour   la   rubrique _V_e_r_t_R_e_f_r_e_s_h  avec   les
  frequences verticales.

  Dans  la suite de     cette section se    trouvent   des  tables   des
  modes  video.  Pour chaque mode, cinq rubriques sont definies : le nnoomm
  dduu  mmooddee,  la  ffrreeqquueennccee  dd''hhoorrllooggee,  les   ttiimmiinnggss  hhoorriizzoonnttaauuxx    et
  vveerrttiiccaauuxx,    enfin     les    ooppttiioonnss.     Deux presentations    sont
  possibles  :   l'ancienne    (celle   qui  etait  en   vigueur    pour
  XFree-2.1) se  presente  sous forme de lignes de  valeurs  numeriques,
  chaque   ligne specifiant  au serveur    un mode :

       ModeLine        < nom >   <horloge>    HR  SH1  SH2  HFL      VR  SV1  SV2  VFL

  La nouvelle presentation,  plus claire,  fait preceder chaque rubrique
  d'un mot-cle :

       Mode "nom"
               DotClock  <horloge>
               HTimings  HR  SH1  SH2  HFL
               VTimings  VR  SV1  SV2  VFL
               Flags     <options>
       EndMode

  Pour   des  raisons   de  simplicite,  nous  utiliserons  la  premiere
  presentation.

  Le nom du  mode  video est generalement   donne  entre  guillemets  et
  est utilise  comme reference dans la  section SSccrreeeenn  apres le mot-cle
  MMooddeess. Le nom peut etre  omis si la ligne  decrite  appartient au meme
  mode video que la precedente.

  La    valeur    <_h_o_r_l_o_g_e>   represente  la  frequence d'horloge   (_d_o_t
  _c_l_o_c_k, que nous avons    appelee DCF) qui est  utilisee  pour  generer
  les  timings des  deux rubriques suivantes.

  La  rubrique   _H_T_i_m_i_n_g_s contient  quatre champs decrivant comment doit
  etre   generee    chaque ligne  a l'ecran.  Ces champs sont   exprimes
  en  nombre   de  pixels.   La  premiere    valeur    correspond  a  llaa
  rreessoolluuttiioonn  hhoorriizzoonnttaallee   vviissiibbllee,  c'est-a-dire     le   nombre    de
  points  illumines   (que nous avons  appele  HR).   La deuxieme valeur
  indique   a    quel  pixel   le   top   de  synchro  horizontal   doit
  commencer  (HR + HGT1).    Le  troisieme    champ  indique a      quel
  pixel    le         top         de      synchro       doit       finir
  (HR  +  HGT1+ HSP).    Le   quatrieme  champ  donne la longueur totale
  de la trame (HFL).

  La   rubrique  _V_T_i_m_i_n_g_s   contient    egalement  quatre  champs.    La
  premiere     valeur      correspond     a   llaa   rreessoolluuttiioonn  vveerrttiiccaallee
  vviissiibbllee,   c'est-a-dire le     nombre de  lignes illuminees  (que nous
  avons   appelee  VR).  La deuxieme valeur  indique a quelle   ligne le
  top  de  synchro  vertical doit commencer (VR +  VGT).   Le  troisieme
  champ   indique  a  quelle  ligne  le   top  de  synchro   doit  finir
  (VR + VGT+ VSP).  Le  quatrieme champ donne la longueur   totale de la
  trame verticale (VFL).

  Exemple :

               #Nom_de_mode    Horloge Timings horizontaux     Timings verticaux

               "752x564        40      752 784  944 1088       564 567 569 611
                               44.5    752 792  976 1240       564 567 570 600

  Note  :  X11R5  ne     supporte    que  les   valeurs  entieres   pour
  l'horloge.

  Rappel : Toutes les valeurs horizontales HR,  HGT1, HGT2, HFL (et donc
  les cumuls) sont ddiivviissiibblleess  ppaarr 88.   Cela n'est  pas requis  pour les
  timings verticaux.

  Autre exemple :

               valeurs de timings horizontaux : 800 864 1024 1088

  Cette ligne  definit le nombre  de points illumines (800),  le  numero
  du   point   a   partir duquel    le  top  de   synchro demarre (864),
  le numero du point  a partir  duquel  le  top  de   synchro   s'arrete
  (1024),  suivi   du   numero  du dernier point de la ligne horizontale
  (1088).

  Le  nombre   de lignes  depuis  le haut    de  l'ecran   jusqu'en  bas
  correspond  a  une trame. Le signal de base d'une trame est une ligne.
  Un certain nombre   de lignes correspond a  l'image  affichee.   Apres
  la  derniere  ligne  affichee, un delai d'un certain  nombre        de
  lignes    est    genere, precedant le   top  de    synchro  verticale.
  Celui-ci   dure l'equivalent de   quelques " temps lignes ".  Enfin un
  nouveau  delai     de  quelques lignes    est    necessaire  apres  la
  synchro.  On   retrouve  de la  meme   maniere quatre valeurs :

               valeurs de timings verticaux : 600 603 609 630

  Cet  exemple indique qu'il y a  600 lignes visibles a l'ecran, que  la
  synchro   verticale  demarre  a    la  603e  ligne, s'arrete a la 609e
  ligne et qu'il y a au total 630 lignes.

  Ces valeurs ne sont ppaass ffoorrcceemmeenntt ddiivviissiibblleess ppaarr 88.

  Revenons    a   notre  exemple.   Il  ne  nous   reste plus maintenant
  qu'a  ecrire  toutes  ces   valeurs  correctement  dans  la    section
  appropriee, comme suit :

       ModeLine        < nom >    DCF      HR  SH1  SH2  HFL      VR  SV1  SV2  VFL

  ou  SH1    et    SH2  correspondent respectivement  au   debut et a la
  fin de la  synchro horizontale, SV1   et SV2 respectivement  au  debut
  et a la fin de la synchro verticale.

                       #nom       horloge  timings horizontaux    timings verticaux   options
       ModeLine        936x702    65       936 968 1200 1232      702 702  710  737

  Aucune option n'est necessaire ici. Nous avons fini.

  Selon  le  materiel  dont vous  disposez, certaines options   pourront
  etre necessaires. Decrivons-les rapidement :

     IInntteerrllaaccee
        indique que le mode est entrelace

     DDoouubblleeSSccaann
        indique un mode ou chaque ligne est parcourue deux fois.

     ++HHSSyynncc eett --HHSSyynncc
        permettent de   selectionner   la  polarite   du   signal     de
        synchronisation horizontale

     ++VVSSyynncc eett --VVSSyynncc
        permettent  de   selectionner    la   polarite du    signal   de
        synchronisation verticale

     CCoommppoossiittee
        permet de specifier l'utilisation   d'une synchro composite  sur
        les materiels qui le supportent.

     ++CCSSyynncc eett --CCSSyynncc
        permettent    de  selectionner    la   polarite   du  signal  de
        synchronisation composite

  44..11..99..  FFooiirree AAuuxx QQuueessttiioonnss

  1.   LL''eexxeemmppllee   qquuee  vvoouuss  aavveezz  ddoonnnnee   nnee  ccoorrrreessppoonndd   ppaass  aa  uunnee
     rreessoolluuttiioonn ssttaannddaarrdd.. PPuuiiss--jjee ll''uuttiilliisseerr  ??

     Pourquoi  pas  ?  Il n'y a aucune raison pour que vous soyez limite
     aux resolutions    de    640 x 480,    800 x 600  ou  1024  x  768.
     Le  serveur  X  vous  autorise a configurer votre systeme avec  une
     tres grande  liberte.    Cela  prend  relativement  peu   de  temps
     d'obtenir  une   configuration  correcte.  La chose importante    a
     prendre        en     compte      est          le     taux       de
     rafraichissement.    Ne    choisissez   pas   une   resolution trop
     grande au prix d'un scintillement desagreable.

  2.  EEsstt--ccee llaa sseeuullee  rreessoolluuttiioonn ppoossssiibbllee aavveecc lleess   vvaalleeuurrss  dd''hhoorrllooggee
     ddee   6655 MMHHzz eett uunnee   HHSSFF ddee  5555 kkHHzz ??

     Absolument     pas  !     Nous    vous   invitons  a     suivre  la
     procedure  pour faire des  essais  differents  jusqu'a obtenir  une
     configuration  qui  vous  convienne.   Cette  experience  peut vous
     amuser.  La   plupart   des  configurations    vous  donneront  des
     effets  etranges,   mais   rien  ne   peut  vraiment   abimer votre
     moniteur multi-synchro (sauf si vous demandez  a votre carte  video
     une  cadence    hors    de   ses  limites  ;   de    meme, si  vous
     restez relativement  pres des  resolutions   conseillees pour votre
     moniteur,    tout   ira     bien).     Pour    les    moniteurs   a
     frequences  fixes,    attention !      Ce   genre   d'essais    par
     tatonnement peut les endommager.

  3.   VVoouuss aavveezz mmeennttiioonnnnee ddeeuuxx  rreessoolluuttiioonnss ssttaannddaarrdd..  DDaannss  llee ffiicchhiieerr
     XXFF8866CCoonnffiigg,, iill  yy   aa  pplleeiinn ddee  rreessoolluuttiioonnss  ddiissppoonniibblleess,,  ppoouuvveezz--
     vvoouuss  mmee      ddiirree  ss''iill    eesstt  ppoossssiibbllee  dd''eenn   pprreennddrree  eett    ddee
     lleess bbrriiccoolleerr ??

     Absolument !   Prenez  par exemple    la   resolution  standard  de
     640  x 480.  Elle est  decrite avec une frequence de pilotage de 25
     MHz, les  longueurs de trames sont  respectivement de 800  et  525.
     Le   taux   de  rafraichissement  est   donc de 59,5 Hz.   Pas trop
     mauvais.  Mais la  frequence  de  28   MHz  est  une  valeur  assez
     courante  sur  les   cartes  video SVGA.  Si  nous l'utilisons pour
     piloter cette resolution,  en    suivant   la  procedure   decrite,
     nous  obtenons    des   longueurs   de    trames de    812 et  505.
     Le   taux   de  rafraichissement       passe   alors      a      68
     Hz.   Nette amelioration par rapport a la valeur standard !

  4.   CCoommmmeenntt   ffaaiirree       aavveecc     lleess   mmooddeess      eennttrreellaaccee       //
     nnoonn--eennttrreellaaccee ??

     A   une frequence    donnee, un   affichage  entrelace  scintillera
     plus  qu'un   non-entrelace,   ce qui explique que  ce mode soit de
     plus en plus   abandonne. Avec un scintillement accru,  vous gagnez
     en  resolution   avec   une  horloge   point  plus  faible.   Si la
     valeur  DCF etait  assez    grande   (90  Mhz     ou  plus),     le
     mode entrelace      n'engendrerait  plus   de   scintillement, mais
     aux frequences    courantes,  les     moniteurs   fonctionnant   en
     mode entrelace sont assez mauvais sous X.

  5.   PPoouuvveezz--vvoouuss   rreessuummeerr     rraappiiddeemmeenntt  ccee  ddoonntt  vvoouuss    vveenneezz  ddee
     ppaarrlleerr ??

  +o   Pour toute frequence de  pilotage  donnee,  l'augmentation  de  la
     resolution       implique       une    diminution      du      taux
     de rafraichissement, et donc introduit plus de scintillement ;

  +o   Si une haute  resolution est souhaitable  et  que votre   moniteur
     la  supporte,  essayez  de  vous  procurer   une  carte  video SVGA
     fournissant une   horloge (DCF)  suffisante.   Plus   grande   sera
     cette frequence, meilleure sera votre image.

  44..11..1100..  DDeeuuxx eexxeemmpplleess ssuupppplleemmeennttaaiirreess ddee ccaallccuullss

  Prenons une autre hypothese :

  Soit  une   carte   video  ayant   une    horloge  a  40   MHz,  et un
  afficheur  ayant  une frequence horizontale    pouvant varier de  30 a
  37 kHz. Nous souhaitons  faire fonctionner l'ensemble a une resolution
  d'environ  800 x 600.   Le  nombre  minimum de points par  ligne   est
  donc  de 40000000 / 37000 =  1081,081, soit 1081 points par ligne.

  Nous  choisirons cette valeur dans les calculs qui vont suivre. Chaque
  ligne de   notre affichage aura au  moins  1081 points.  Arrondissons-
  le a 1088 pour le rendre divisible par 8.  Maintenant, considerons que
  le top de synchro horizontale  doit    durer 3,8 us.    Calculons    a
  combien  de  points cela correspond, sachant que la "duree" d'un point
  est de 1 / 40000000 de seconde, soit 0.025 us par point.

  Le nombre de points correspondant a 3,8 us est  :

       3,8 us = P points * (0,025 us / point)

  soit

       P points = 3,8 us / (0,025 us / point) = 152 points

  152 est divisible par 8. S'il  ne l'etait pas, nous  devrions  choisir
  le   multiple   de  8  le  plus  proche.  Nous avons  1088  points par
  ligne au total.  La resolution visible sera de  800  points.  Il  nous
  reste  donc  a   determiner  les   temps    qui   se trouveront  avant
  et apres la synchronisation necessaire pour l'affichage.

  La regle  veut  que  l'on   mette   environ 30   points   de    chaque
  cote. Dans ce cas, choisissons la valeur  de 32, divisible par 8.

  Or il nous reste :

       (1088 - 800 - 152) = 136 points

  que   nous    devons   repartir   de    chaque   cote   de la synchro.
  Divisons le nombre en   deux parts egales,  soit 68  points  avant  la
  synchro et 68 points apres.

  Les quatre valeurs du fichier XF86Config seront donc

       800     (800 + 68)      (800 + 68 + 152)        (800 + 68 + 152 + 68)

  ou

       800  868  1020  1088

  Maintenant,   calculons    les   nombres   verticaux.   Tout  d'abord,
  souvenez-vous que les  nombres verticaux  ne  sont   pas  exprimes  en
  termes  de  points mais   de lignes.  Donc, nous avons   a calculer le
  temps que prend l'affichage d'une  ligne.  Ce calcul  est   simple   a
  faire,   car  nous  savons  que  chaque ligne   fait 1088  points   et
  que chaque   point dure 0,025 us, ce qui donne :

       (1088 points / ligne) * (0,25 us / point) = 27,2 us / ligne

  Puisque nous  avons choisi une  definition de  800 points  par  ligne,
  choisissons  le   nombre  de lignes selon   le  rapport de 4/3.    800
  valant 4 x 200, nous aurons 600  lignes visibles.   La resolution sera
  bien de 800 x 600.

  Nous  savons  qu'un  top  de  synchro  vertical  doit  se trouver dans
  l'intervalle 50 a 300 us. Si nous  choisissons  150  us  comme  valeur
  courante,   nous    trouverons      a  combien   de      lignes   cela
  correspond  en divisant :

       (150 us / top) / (27,2 us / ligne) = 5,51 lignes par top

  En arrondissant  a  la  valeur    entiere   immediatement  superieure,
  nous obtenons 6 lignes par top de synchro.

  Pour  obtenir  le nombre total  de lignes par trame (lignes illuminees
  plus lignes  non-illuminees sur  les bords), nous considerons que   le
  nombre   total   de  lignes est de  5%  superieur au nombre  de lignes
  visibles. Le nombre total de lignes est de :

       (600 lignes) * 1,05 = 630 lignes par trame

  Nous devons placer le top de synchro dans  les  lignes  non  visibles,
  entre la fin des lignes  visibles et la fin de  la trame. Puisque nous
  disposons  de 630  lignes,  dont  600 illuminees,   6  correspondant a
  la duree du top, il nous reste :

       (630 - 600) - 6 = 24 lignes

  Certains  moniteurs  acceptent  que le top demarre immediatement apres
  les lignes  visibles, d'autres en  revanche necessitent  une  ou  deux
  lignes  d'attente  avant  le top de  synchro.  De facon a etre surs de
  notre coup, inserons  trois lignes entre la fin des lignes  illuminees
  et le top de synchro.  Le reste des lignes sera  ajoute apres la   fin
  de la   synchro.  Les nombres des timings verticaux sont donc :

  600   (600 + 3)   (600 + 3 + 6)   (600 + 3 + 6 + 21)

  ou

       600  603  609  630

  Avant  de faire quoi que  ce soit d'autre, nous  devons  nous  assurer
  que  le moniteur pourra  supporter 630  lignes par trame  a raison  de
  27,2 us  par   ligne.    Calculons    le   nombre   de   trames    par
  seconde  que  generera  notre  configuration, et comparons la valeur a
  celle donnee dans  le manuel.  Pour  630  lignes par trame   a  raison
  de   27,2  us   par    ligne,  nous  avons  630 * 27,2  = 17136 us par
  trame,  soit  0,017136 seconde par trame,   ou  encore  1  /  0,017136
  trame par seconde :

       1 / (0,017136 seconde / trame) = 58,4 trames / seconde

  Si   la    valeur  58,4 Hz   est   dans   l'intervalle    des  valeurs
  acceptees par votre moniteur, tout va  bien. Si celui-ci  ne  supporte
  pas     une  telle    vitesse       de      synchro  verticale   (taux
  de rafraichissement), nous devons modifier le  nombre  de  lignes  par
  trame en ajustant tous les timings proportionnellement.

  Combinons  maintenant  les   valeurs  horizontales et verticales  pour
  obtenir une ligne que l'on peut mettre dans le fichier XF86Config :

       ModeLine "800x600"       40      800 868 1020 1088       600 603 609 630

  Nous pouvons maintenant  tester la configuration.  Il  se peut   qu'il
  y  ait  des  problemes,  en  raison  des  suppositions que nous  avons
  faites, mais dans  la grande majorite   des   cas,  cela   devrait  au
  moins  vous  donner     un    affichage        stable.     Il     faut
  encore     quelques  experimentations      pour    obtenir     quelque
  chose  de   vraiment satisfaisant.

  DDeess ccaallccuullss rreeeellss

  Ma  carte  video   a  un oscillateur battant  a  40 MHz,  je pars donc
  avec  cette     valeur    d'horloge.   La   frequence    de    synchro
  horizontale  de  mon  moniteur est de 37 kHz, donc le nombre de points
  minimum par  ligne      est de     40000000 / 37000 =      1081.    La
  frequence de synchronisation verticale peut varier de 50 a 90 Hz.

  Le  manuel  de mon moniteur  explique que la  duree du top de  synchro
  horizontal ne peut  depasser 3,92 us. Avezc une duree de 0,025 us  par
  point, le top dure :

       (3,92 us) / (0,025 us / point) = 156,8 points

  Arrondissons  cette  valeur a l'entier le plus proche divisible par 8,
  soit  160.  Le manuel dit egalement  que le temps separant le  dernier
  point illumine du debut de la synchro doit etre d'au moins 0,67 us, ce
  qui, a une frequence d'horloge de 40 MHz  - souvenez-vous que  40  MHz
  = 1 / 40000000 = 0,025 us par point - correspond a :

       P points = (0,67 us) / (0,025 us / point) = 26,8 points.

  que nous arrondissons a 32 (divisible par 8).

  Mon   manuel dit  encore  que  le  temps  suivant le  top   de synchro
  doit etre d'au moins 3,56 us.  En nombre de points cela correspond a :

       P points = (3,56 us) / 0,025 us / point) = 142,4 points.

  que nous arrondissons a 144.

  Maintenant,    pour   une     ligne   horizontale  nous     avons  800
  points illumines, 32 points avant la synchro, 160 points de  duree  de
  synchro et 144 points apres la synchro.

       800 + 32 + 160 + 144 = 1136

  Une  ligne   fait  maintenant   1136  points   au  lieu des 1088 (1081
  arrondis) precedemment  calcules,   mais   souvenez  vous   que  cette
  valeur  etait   le minimum  de points  que nous  pouvions avoir.  Donc
  1136 points sont corrects pour demarrer.

  Nous avons deja une partie de notre configuration :

       800  (800+32)  (800+32+160)  (800+32+160+144)

  Une  ligne  de 1136  points represente 1136 * 0,025 = 28,4 us.

  La   regle des   4 / 3   nous  mene   a  une resolution  verticale  de
  600 points visibles.

  Le  manuel  de  mon   moniteur  indique que la synchro  verticale doit
  durer au moins 64 us. En nombre de lignes, cela correspond a :

       (64 us / synchro) / (28,4 us / ligne) = 2,25 lignes / synchro.

  arrondi a 3 lignes.

  Le  manuel    indique   egalement que    le    temps apres la derniere
  ligne  affichee  et le debut de la synchro doit etre d'au moins 318 us
  et que le delai apres  la  synchro   doit  etre  d'au  moins  630  us.
  Calculons le nombre de lignes que cela represente :

       (318 us) / (28,4 us / ligne) = 11,20 lignes

       (630 us) / (28,4 us / ligne) = 22,18 lignes

  que nous arrondissons respectivement a 12 et 23 lignes.

  La deuxieme partie de la configuration correspond aux valeurs :

       600  (600+12)  (600+12+3)  (600+12+3+23)

  Nous  voila   prets.  La  ligne  du  fichier   XF86Config  est donc la
  suivante :

       ModeLine "800x600"       40      800 832 992 1136        600 612 615 638

  C'est  le premier   mode  video  que  j'ai  essaye.   Il  m'a semble a
  premiere   vue    qu'il  y   avait   un   peu   de scintillement, j'ai
  essaye de modifier  les   timings  et  j'ai  obtenu  une       qualite
  correcte  pour       une   resolution  de 784 x 614.

  44..11..1111..  CCoorrrriiggeerr ddeess pprroobblleemmeess dd''iimmaaggee

  Votre  fichier de configuration est pret. Vous  lancez le serveur X et
  l'image ne semble pas correcte. Que faire ? Voici quelques  solutions.

  Vous  ddeeppllaacceezz  l'image  en  changeant  les   timings de synchro. Vous
  ddiimmeennssiioonnnneezz  l'image en  changeant  la   longueur   de  trame   (vous
  devez  modifier  aussi  les  tops  de    synchro pour garder une image
  centree, sinon, le dimensionnement  deplace l'image).

  Encore  quelques   petites choses :  les   positions   horizontale  et
  verticale   sont independantes.   Le deplacement horizontal de l'image
  n'affecte  pas   sa     position   verticalement,  et  reciproquement.
  Cependant,   ce  n'est pas tout  a fait  vrai pour le dimensionnement.
  Alors que la modification de la largeur de l'image  n'affecte  pas  sa
  hauteur et vice-versa, la modification des deux  peut etre limitee. En
  particulier, si votre  image est trop large  dans les deux dimensions,
  vous   resoudrez    le   probleme    avec   une   frequence  d'horloge
  superieure, cela augmentant la resolution disponible.

     LL''iimmaaggee eesstt ddeeppllaacceeee aa ggaauucchhee oouu aa ddrrooiittee
        Pour corriger cela,  deplacez la synchro  horizontale.  C'est-a-
        dire

        augmentez   ou  diminuez  (par  saut  de   8)  les  deux valeurs
        centrales des timings horizontaux  qui   definissent  les  temps
        avant et apres la synchro horizontale.

        Si    l'image  est  deplacee vers la   gauche (le bord droit est
        trop large),  et que vous   souhaitez la  deplacer   a   droite,
        diminuez   ces  deux  valeurs. Si  l'image est  deplacee vers la
        droite  (le  bord  gauche est  trop    large),   et    que  vous
        souhaitez  la deplacer a gauche, augmentez ces deux valeurs.

     LL''iimmaaggee eesstt  ddeeppllaacceeee vveerrss llee  hhaauutt oouu vveerrss llee bbaass
        Pour  corriger    ce    probleme,  vous     devez  deplacer   la
        synchro verticale, c'est-a-dire   augmenter    ou  diminuer  les
        deux    valeurs  centrales     des   timings  verticaux,    dans
        le    fichier  XF86Config, definissant les temps avant et  apres
        la synchro.

        Si  l'image   est  deplacee  vers   le haut (bord inferieur trop
        large),  et  que  vous souhaitez   la  descendre, diminuez   les
        deux  valeurs.  Si    l'image     est  deplacee  vers  le    bas
        (bord superieur  trop large), et que  vous souhaitez  la monter,
        augmentez les deux valeurs.

     LL''iimmaaggee eesstt ttrroopp llaarrggee  ((rreesspp..  ttrroopp eettrrooiittee))
        Diminuez   (resp.  augmentez) la longueur de trame  horizontale.
        C'est-a-dire, modifiez les   quatre  nombres   de   la  rubrique
        horizontale.   Pour eviter  de deplacer l'image, deplacez  aussi
        la synchro (2eme  et 3eme valeurs)  de moitie moins.

     LL''iimmaaggee eesstt  ttrroopp  ggrraannddee ((rreesspp..   ttrroopp rreedduuiittee)) vveerrttiiccaalleemmeenntt
        Diminuez   (resp.    augmentez)    la    longueur  de      trame
        verticale.   C'est-a-dire,  modifiez  les   quatre nombres de la
        rubrique  verticale.   Pour  eviter     de   deplacer   l'image,
        deplacez   aussi  la  synchro  (2eme et  3eme valeurs) de moitie
        moins.

  Toute distorsion qui ne puisse    etre  maitrisee  par   ces  methodes
  correspond   certainement   a   une  erreur   plus fondamentale, comme
  une erreur de calcul ou une horloge trop rapide pour le moniteur.

  Finalement,  souvenez-vous que le  fait  d'augmenter  la  longueur  de
  trame, diminuera la frequence de rafraichissement, et vice-versa.

  44..11..1122..  QQuueellqquueess eexxeemmpplleess rreeeellss ddee MMooddeess vviiddeeoo

    #
    # 640x480@60Hz Mode non-entrelace
    # Synchronisation horizontale = 31.5kHz
    # Timing: H=(0.95us, 3.81us, 1.59us), V=(0.35ms, 0.064ms, 1.02ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "640x480"     25.175  640  664  760  800    480  491  493  525

    #
    # Alternate 640x480@60Hz Mode non-entrelace
    # Synchronisation horizontale = 31.5kHz
    # Timing: H=(1.27us, 3.81us, 1.27us) V=(0.32ms, 0.06ms, 1.05ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "640x480"     25.175  640  672  768  800    480  490  492  525

    #
    # 640x480@63Hz Mode non-entrelace (non-standard)
    # Synchronisation horizontale = 32.8kHz
    # Timing: H=(1.41us, 1.41us, 5.08us) V=(0.24ms, 0.092ms, 0.92ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "640x480"     28.322  640  680  720  864    480  488  491  521

    #
    # 640x480@70Hz Mode non-entrelace (non-standard)
    # Synchronisation horizontale = 36.5kHz
    # Timing: H=(1.27us, 1.27us, 4.57us) V=(0.22ms, 0.082ms, 0.82ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "640x480"     31.5    640  680  720  864    480  488  491  521

    #
    # VESA 640x480@72Hz Mode non-entrelace
    # Synchronisation horizontale = 37.9kHz
    # Timing: H=(0.76us, 1.27us, 4.06us) V=(0.24ms, 0.079ms, 0.74ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "640x480"     31.5    640  664  704  832    480  489  492  520

    #
    # VESA 800x600@56Hz Mode non-entrelace
    # Synchronisation horizontale = 35.1kHz
    # Timing: H=(0.67us, 2.00us, 3.56us) V=(0.03ms, 0.063ms, 0.70ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "800x600"     36      800  824  896 1024    600  601  603  625

    #
    # Alternate 800x600@56Hz Mode non-entrelace
    # Synchronisation horizontale = 35.4kHz
    # Timing: H=(0.89us, 4.00us, 1.11us) V=(0.11ms, 0.057ms, 0.79ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "800x600"     36      800  832  976 1016    600  604  606  634

    #
    # VESA 800x600@60Hz Mode non-entrelace
    # Synchronisation horizontale = 37.9kHz
    # Timing: H=(1.00us, 3.20us, 2.20us) V=(0.03ms, 0.106ms, 0.61ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "800x600"     40      800  840  968 1056    600  601  605  628 +hsync +vsync

    #
    # Alternate 800x600@60Hz Mode non-entrelace
    # Synchronisation horizontale = 37.9kHz
    # Timing: H=(1.20us, 3.80us, 1.40us) V=(0.13ms, 0.053ms, 0.69ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "800x600"     40      800 848 1000 1056     600  605  607  633

    #
    # VESA 800x600@72Hz Mode non-entrelace
    # Synchronisation horizontale = 48kHz
    # Timing: H=(1.12us, 2.40us, 1.28us) V=(0.77ms, 0.13ms, 0.48ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "800x600"     50      800  856  976 1040    600  637  643  666  +hsync +vsync

    #
    # 1024x768@43.5Hz, mode entrelace (standard 8514/A)
    # Synchronisation horizontale = 35.5kHz
    # Timing: H=(0.54us, 1.34us, 1.25us) V=(0.23ms, 0.23ms, 0.93ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1024x768i"   44.9   1024 1048 1208 1264    768  776  784  817  Interlace

    #
    # VESA 1024x768@60Hz Mode non-entrelace
    # Synchronisation horizontale = 48.4kHz
    # Timing: H=(0.12us, 2.22us, 2.58us) V=(0.06ms, 0.12ms, 0.60ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1024x768"    65     1024 1032 1176 1344    768  771  777  806 -hsync -vsync

    #
    # 1024x768@60Hz Mode non-entrelace (horloge point non-standard)
    # Synchronisation horizontale = 48.4kHz
    # Timing: H=(0.65us, 2.84us, 0.65us) V=(0.12ms, 0.041ms, 0.66ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1024x768"    62     1024 1064 1240 1280   768  774  776  808

    #
    # VESA 1024x768@70Hz Mode non-entrelace
    # Synchronisation horizontale = 56.5kHz
    # Timing: H=(0.32us, 1.81us, 1.92us) V=(0.05ms, 0.14ms, 0.51ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1024x768"    75     1024 1048 1184 1328    768  771  777  806 -hsync -vsync

    #
    # 1024x768@70Hz Mode non-entrelace (horloge point non-standard)
    # Synchronisation horizontale = 56.25kHz
    # Timing: H=(0.44us, 1.89us, 1.22us) V=(0.036ms, 0.11ms, 0.53ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1024x768"    72     1024 1056 1192 1280    768  770  776 806   -hsync -vsync

    #
    # 1024x768@76Hz Mode non-entrelace
    # Synchronisation horizontale = 62.5kHz
    # Timing: H=(0.09us, 1.41us, 2.45us) V=(0.09ms, 0.048ms, 0.62ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1024x768"    85     1024 1032 1152 1360    768  784  787  823

    #
    # 1280x1024@44Hz, Mode entrelace
    # Synchronisation horizontale = 51kHz
    # Timing: H=(0.02us, 2.7us, 0.70us) V=(0.02ms, 0.24ms, 2.51ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1280x1024i"  80     1280 1296 1512 1568   1024 1025 1037 1165  Interlace

    #
    # Alternate 1280x1024@44Hz, Mode entrelace (horloge point non-standard)
    # Synchronisation horizontale = 47.6kHz
    # Timing: H=(0.42us, 2.88us, 0.64us) V=(0.08ms, 0.12ms, 0.96ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1280x1024i"  75     1280 1312 1528 1576   1024 1028 1034 1080  Interlace

    #
    # 1280x1024@59Hz Mode non-entrelace (non-standard)
    # Synchronisation horizontale = 63.6kHz
    # Timing: H=(0.36us, 1.45us, 2.25us) V=(0.08ms, 0.11ms, 0.65ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1280x1024"  110     1280 1320 1480 1728   1024 1029 1036 1077

    #
    # 1280x1024@61Hz, Mode non-entrelace
    # Synchronisation horizontale = 64.25kHz
    # Timing: H=(0.44us, 1.67us, 1.82us) V=(0.02ms, 0.05ms, 0.41ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1280x1024"  110     1280 1328 1512 1712   1024 1025 1028 1054

    #
    # 1280x1024@74Hz, Mode non-entrelace
    # Synchronisation horizontale = 78.85kHz
    # Timing: H=(0.24us, 1.07us, 1.90us) V=(0.04ms, 0.04ms, 0.43ms)
    #
    # name        clock   horizontal timing     vertical timing      flags
     "1280x1024"  135     1280 1312 1456 1712   1024 1027 1030 1064

  44..22..  LLaa sseeccttiioonn DDeevviiccee

  Cette section  n'est pas particulierement  compliquee mais il convient
  d'y  preter  attention.  Pour  la raison  deja  indiquee  au  chapitre
  ``La  partie facile du fichier  XF86Config'',  nous ne nous  etendrons
  pas  trop  sur cette section.   Nous passerons  bien  evidemment   sur
  les rubriques  _I_d_e_n_t_i_f_i_e_r, _V_e_n_d_o_r_N_a_m_e et _B_o_a_r_d_N_a_m_e.

  Les  rubriques _C_h_i_p_s_e_t, _R_a_m_d_a_c et _V_i_d_e_o_r_a_m peuvent etre obtenues grace
  a  l'utilitaire SuperProbe.  Lancez-le  sur  une    console     texte.
  Voir  le  chapitre    ``SuperProbe''

  La       rubrique     _C_l_o_c_k_s  correspond      a       l'ensemble   des
  frequences  utilisables par votre   carte  video.   Pout  obtenir  ces
  valeurs vous pouvez au choix :

  +o    Consulter   la        documentation     et     notamment       le
     fichier _/_u_s_r_/_l_i_b_/_X_1_1_/_d_o_c_/_m_o_d_e_D_B_._t_x_t.  Vous  y  trouverez  peut-etre
     les valeurs pour votre carte video.

  +o   Lancer  la   commande :  X -probeonly.  Les   details sont fournis
     dans le   livre "Le  systeme   Linux"   decrit  au  chapitre  ``Les
     documents  a consulter'', ou

     dans le XFree86-HOWTO.

  +o   Lancer X normalement.  Si aucune rubrique CClloocckkss n'est definie, le
     serveur calculera les valeurs.  Avec un peu  de chance  et  surtout
     le  bon  serveur,  vous obtiendrez un   affichage correct.  Appuyez
     sur  les  touches Ctrl+Alt+F<n> (ou n correspond  a  la  console  a
     partir  de laquelle  vous   avez  lance X).     Notez les   valeurs
     que X    a calculees et mettez-les dans le fichier XXFF8866CCoonnffiigg.

  NNoottee :  Si  vous   faites     un   test  (avec   ou   sans      option
  -probeonly)    sur   votre   machine,  faites-le   avec     le minimum
  d'applications  en   cours.  Le   serveur  X  etant   une  application
  egalement,      les       boucles  de       timings    peuvent    etre
  perturbees  par  des  activities  du  disque  et  rendre  les  valeurs
  imprecises.     Effectuez   le     test  plusieurs    fois   afin   de
  verifier que les valeurs sont stables ;  sinon, tuez des processus  en
  activite    jusqu'a  ce  qu'elles    le  soient.   Utilisateurs SVR4 :
  le  processus     _m_o_u_s_e_m_g_r  est connu   pour  etre perturbant.

  Afin d'eviter que la  recherche  des timings soit effectuee a   chaque
  lancement  de  X    et  risquer   que  ceux-ci soient imprecis, il est
  preferable de les figer en les indiquant dans le  fichier  XF86Config.
  Cela   supprime la recherche et donne au serveur  une liste exacte des
  valeurs qu'il doit  utiliser. En utilisant les  donnees  du paragraphe
  ``Les   choses   a  connaitre   sur   votre  carte  video    et  votre
  moniteur'' on obtiendrait :

       wga
               Clocks 25 28 40 3 50 77 36 45 0 0 79 31 94 65 75 71

  Sur    des  systemes     deja   charges,   vous  eviterez  ainsi   des
  demarrages  variables   de X, ou meme des echecs.  Il est tout a  fait
  possible que X echoue parce que les  timings  qu'il  a   trouves  sont
  faux     et   qu'ils  ne  correspondent   a    aucune  valeur   connue
  d'_h_o_r_l_o_g_e _p_o_i_n_t (dot clock).

  55..  LLeess aapppplliiccaattiioonnss dd''aaiiddee aa llaa ccoonnffiigguurraattiioonn

  Pour vous aider dans vos calculs  nombreux et fastidieux,  un  certain
  nombre  de  petits programmes ont  ete ecrits. Ils ne prennent que peu
  de   place et il est  conseille  de les installer  sur votre disque.

  55..11..  VVggaasseett

  Un petit programme pour vous aider a configurer votre serveur  X.  Son
  role  est  de  faciliter  la   recherche de la meilleure resolution de
  votre ecran.  Il tourne dans une fenetre  _x_t_e_r_m  (X  doit  donc   deja
  tourner),   et  affiche  la  geometrie actuelle   de votre ecran, sous
  une  forme similaire a celle decrite dans   le   fichier   XF86Config.
  Vous  pouvez    modifier cette geometrie en temps reel,  a l'aide d'un
  certain nombre de commandes decrites ci-apres.

  Vous pouvez    ainsi determiner   la   configuration qui  correspond a
  votre  souhait,   ou   revenir   a   tout   moment a  la configuration
  initiale.

  AAtttteennttiioonn

  L'auteur et  moi-meme (-- Le traducteur--) vous  mettons en garde  sur
  l'utilisation     de     ce    programme.     Vgaset     possede   les
  caracteristiques   necessaires    pour    vous    eviter  d'endommager
  votre moniteur.  Cependant, si vous specifiez une plage de  frequences
  que  votre moniteur  ne  supporte  pas,  ou bien une mauvaise horloge,
  _v_g_a_s_e_t  peut causer des dommages irreversibles a  votre materiel.   Si
  vous   ne  connaissez pas toutes  les valeurs,  lancez   _v_g_a_s_e_t   sans
  option.    Ne  laissez    en  aucun  cas  votre  moniteur  fonctionner
  longtemps avec de mauvaises valeurs.  Si quelque  chose  ne   va  pas,
  eteignez-le !    Utilisez _v_g_a_s_e_t a  vos risques et perils.

  RReemmaarrqquuee

  Je    vous  sens  fievreux tout   a coup ! N'ayez pas peur, ceci n'est
  pas frequent. Allez-y en faisant attention.

  55..11..11..  LLeess ooppttiioonnss ddee vvggaasseett

  Les options de la ligne de commande sont les suivantes :

     --VV Rend _v_g_a_s_e_t verbeux.  En particulier, il affiche  les  registres
        CRTC.

     --dd _h_o_r_l_o_g_e
        Definit  la  valeur de  l'horloge  point.   Ceci permet a _v_g_a_s_e_t
        de donner  des  informations  sur  les  timings   et  de     les
        utiliser     pour     determiner       des      intervalles   de
        frequences.        _h_o_r_l_o_g_e  peut    etre   specife   en   hheerrttzz,
        kkiilloohheerrttzz  ou   mmeeggaahheerrttzz.    Faites bien  attention a donner la
        bonne valeur.

     --xx  _f_r_e_q_u_e_n_c_e
        specifie    la       frequence horizontale minimale (en hheerrttzz ou
        kkiilloohheerrttzz)  supportee  par  votre  moniteur.   Par   defaut   la
        valeur  prise est la       valeur  courante.  Cette  option  est
        ignoree  si l'option -d _h_o_r_l_o_g_e est absente, sauf pour -x0.

     --XX      _f_r_e_q_u_e_n_c_e
        specifie      la   frequence  horizontale  maximale (en hheerrttzz ou
        kkiilloohheerrttzz) supportee par  votre   moniteur.    Par   defaut   la
        valeur    prise  est  la     valeur  courante.  Cette option est
        ignoree  si l'option -d _h_o_r_l_o_g_e est absente.

     --yy _f_r_e_q_u_e_n_c_e
        specifie la frequence verticale  minimale  supportee  par  votre
        moniteur.   Par  defaut  la valeur prise est la valeur courante.
        Cette option  est ignoree si l'option -d  _h_o_r_l_o_g_e  est  absente,
        sauf pour -y0.

     --YY _f_r_e_q_u_e_n_c_e
        specifie  la  frequence  verticale maximale supportee par  votre
        moniteur.  Par defaut la valeur prise est  la  valeur  courante.
        Cette option  est ignoree si l'option -d _h_o_r_l_o_g_e est absente.

     --ss  _c_o_n_f_i_g
        donne    les valeurs horizontales  de   debut de synchro, de fin
        de synchro et du nombre   total  de   points,  et  les   valeurs
        verticales  de  debut de synchro, de fin de synchro et du nombre
        total de lignes. Ces valeurs correspondent  aux trois  dernieres
        valeurs de chaque rubrique d'un mode video :

          "640x480"       28      640 680 728 776         480 480 482 494
                                      --- --- ---             --- --- ---

     --vv    _r_e_s_o_l_u_t_i_o_n
        specifie      la    valeur   de      la  resolution   virtuelle.
        Ceci    vous   permet    d'augmenter    la resolution  affichee,
        au   mieux     jusqu'a   ces valeurs.   Celles-ci   ne   doivent
        pas  depasser     les  valeurs donnees a la ligne _V_i_r_t_u_a_l de  la
        section _S_c_r_e_e_n.

        Exemple :

          vgaset -d80 -x30 -X64 -y50 -Y100 -v 1152 910

                  --> correspond a un ecran Crystal Scan 1572 FS a 80 MHz

  55..11..22..  LLeess ccoommmmaannddeess ddee vvggaasseett

  Elles  sont   activees  en  appuyant  simplement sur une   des touches
  decrites ci-apres, colonne de gauche :

       l       diminue la marge gauche
       L       augmente la marge gauche
       r       diminue la marge droite
       R       augmente la marge droite
       h       diminue la duree de synchro horizontale
       H       augmente la duree de synchro horizontale
       t       diminue la marge du haut
       T       augmente la marge du haut
       b       diminue la marge du bas
       B       augmente la marge du bas
       v       diminue la duree de synchro verticale
       V       augmente la duree de synchro verticale
       x       diminue la resolution horizontale
       X       augmente la resolution horizontale
       y       diminue la resolution verticale
       Y       augmente la resolution verticale
       ?       reprend les valeurs initiales
       RC      retour-chariot : reaffiche la configuration
       q       quitte
       EOT     quitte

  Apres chaque commande, _v_g_a_s_e_t reaffiche  la  configuration  selon  une
  presentation   compatible  avec  la  rubrique  _M_o_d_e_L_i_n_e  du fichier de
  configuration.

  55..11..33..  LLeess bbuuggss ddee vvggaasseett

  Un certain nombre !  Non, pas trop quand meme,  mais  ce  programme  a
  ete   teste    seulement    sur    certaines   cartes  video  (_E_T_4_0_0_0,
  _D_i_a_m_o_n_d     _S_p_e_e_d_S_t_a_r,   _A_T_I       _G_r_a_p_h_i_c_s    _U_l_t_r_a_P_r_o).       Suivez
  l'actualite         pour   decouvrir  d'eventuelles  mises  a  jour ou
  savoir si des problemes ont ete detectes.

  Le   serveur est   perturbe  lorsque  vous   modifiez le   nombre   de
  pixels.   Si  vous diminuez  la valeur,  le  serveur ne deroulera plus
  l'ecran  virtuel  entier   (scrolling).   Si vous    l'augmentez,   il
  n'utilisera   pas  les   nouveaux   pixels  (seulement  avec  _v_g_a_s_e_t).
  Cependant     c'est   utile   pour       determiner   la     meilleure
  resolution.

  Il  n'est  pour  l'instant   pas   possible de modifier  la valeur  de
  l'horloge point (_d_o_t _c_l_o_c_k) avec _v_g_a_s_e_t.

  55..22..  xxccllkk

  _x_c_l_k est un autre petit  utilitaire  qui  vous  aide  a  calculer  les
  valeurs   pour  votre configuration. Il  est base sur les heuristiques
  et regles que nous avons fixes dans ce document.

  Pour utiliser _x_c_l_k, vous  devez connaitre les   frequences  supportees
  par    votre  carte   video   et votre  moniteur (Un moniteur   multi-
  synchro est  d'ailleurs   conseille).  Les  valeurs d'horloge  peuvent
  etre   determinees  notamment  avec le programme cclloocckk..eexxee  disponible
  dans les  archives Linux,  ou  encore  en  utilisant  les  utilitaires
  fournis   avec votre carte video (Ex : les  cartes ET4000 sont livrees
  avec les utilitaires DMODE et VMODE sous DOS).  Il y  a  trois  facons
  d'utiliser _x_c_l_k :

       xclk       <Frequence_horloge>  <frequences_horiz>
       xclk    -h <Frequence_horloge>  <Pixels_horiz>
       xclk    -r <Frequence_horloge>  <taux_rafraichissement>

  Les   frequences horloge    sont en  MMHHzz, les  frequences horizontales
  en kkHHzz (ne donnez que les valeurs).

  La premiere   syntaxe   utilise la frequence      d'horloge  de  votre
  carte et la frequence horizontale de votre moniteur.

  Exemple : Ma carte  a une horloge de 64  MHz et mon moniteur  supporte
  une frequence horizontale de 56 kHz. J'utilise la commande :

       xclk 64 56              # premiere syntaxe

  Ceci  genere    deux  lignes  compatibles   avec  la rubrique MMooddeeLLiinnee
  du   fichier  de  configuration  (ajoutez  eventuellement  le  mot-cle
  _M_o_d_e_L_i_n_e  si vous souhaitez  utiliser  la ligne dans le fichier) :

       "896x672"       64      896  928  1160  1192    672  672  683  706
       # Tx de rafraichissement = 76.05Hz ; Frequence horizontale = 53.69 kHz

  Il   se  peut que  _x_c_l_k   donne    des  valeurs  ridicules.    Exemple
  xclk 65 40 genere :

       "1296x972"      65      1296  1328  1600  1632  972  972  980  1021
       # Tx de rafraichissement = 39.01Hz ; Frequence horizontale = 39.83 kHz

  Avec  un tel taux de rafraichissement, on croirait regarder un film du
  debut du siecle. N'utilisez pas cette resolution.  Les meilleurs  taux
  de  rafraichissement   sont   autour  de   70  Hz. Plus  la valeur est
  elevee,  mieux c'est (selon  ce que peut supporter votre    moniteur).
  Un    MAG    15H     peut  supporter  une   valeur  allant jusqu'a 120
  Hz. Beaucoup vont jusqu'a 75 Hz.

  Utilisons alors la troisieme syntaxe, qui permet de specifier le  taux
  de rafraichissement,   par  exemple   xclk  -r 64  70 genere :

       "944x708"       64      944  976  1208  1240    708  708  718  743
       # Tx de rafraichissement = 69.47Hz ; Frequence horizontale = 51.61Khz

  Une  troisieme  facon  d'utiliser _x_c_l_k permet d'obtenir une resolution
  particuliere.    Exemple   xclk -h   64   944 genere :

       "944x708"       64      944  976  1216  1248    708  708  718  743
       # Refresh rate = 69.47Hz ; Horizontal Frequency = 51.61Khz

  Comme vous pouvez le  noter, certaines valeurs ont legerement  change,
  malgre  des  donnees   equivalentes.  En fait rien de   bien important
  puisque la difference  n'excede pas 16 unites, ce qui est supporte par
  les moniteurs.

  Si  les  valeurs  donnees par _x_c_l_k ne fonctionnent pas, recalculez les
  valeurs. Surtout  n'essayez  pas  des  valeurs  farfelues  avec  votre
  serveur X.

  55..33..  SSuuppeerrPPrroobbee

  55..33..11..  DDeessccrriippttiioonn

  _S_u_p_e_r_P_r_o_b_e   est    un    utilitaire    dont    le   role    est    de
  determiner la configuration materielle video dont vous  disposez,  que
  ce  soit sur un bus ISA/EISA/VLB ou PCI (sous reserve).  Il  recherche
  de  differentes   manieres  et  parmi  les  registres  connus     (les
  machines    MicroChannel     et      PCI   peuvent    poser probleme ;
  _S_u_p_e_r_P_r_o_b_e   fonctionne  avec  la  plupart    en  utilisant   l'option
  -no_bios).      _S_u_p_e_r_P_r_o_b_e  est  un  programme particulierement expose
  aux erreurs, notamment sous Unix pour lequel  le  materiel  est   plus
  esoterique  que  sous DOS.  Il aura donc probablement besoin d'aide de
  la part de l'utilisateur.

  _S_u_p_e_r_P_r_o_b_e tourne   sous SVR3,  SVR4,   Linux,  386BSD/FreeBSD/NetBSD,
  Minix-386  et    Mach.     Il   pourrait   etre   tres     facile   de
  l'etendre aux   autres systemes Unix,  voire   aux systemes  non-Unix.

  Actuellement,     _S_u_p_e_r_P_r_o_b_e    sait    detecter    les   cartes  MDA,
  Hercules, CGA, MCGA, EGA, VGA et tous les _c_h_i_p_s_e_t_s SVGA (voir l'option
  _-_i_n_f_o,   ci-dessous).  Il sait    aussi identifier de  nombreux RAMDAC
  (-- DAC=Digital-Analog            Converter             (Convertisseur
  Digital-Analogique)--)

  HiColor/TrueColor utilises sur   les cartes    SVGA,   ainsi    que la
  quantite  de   memoire installee (pour beaucoup de  _c_h_i_p_s_e_t_s). Il peut
  detecter les  cartes 8514/A et   derivees,  mais pas  les  XGA ni  PGC
  (l'auteur a l'intention  de  le  faire).  Il   n'est   pas   non  plus
  capable   actuellement  de  reconnaitre  les  cartes  Targa,  TIGA  ni
  MicroField.

  55..33..22..  LLeess ooppttiioonnss

  Les options supportees par _S_u_p_e_r_P_r_o_b_e sont les suivantes :

     --vveerrbboossee
        Rend _S_u_p_e_r_P_r_o_b_e verbeux. Il  fournit bon  nombre  d'informations
        pendant son execution.

     --nnoo1166
        _S_u_p_e_r_P_r_o_b_e  ne tentera  pas d'utiliser les ports necessitant  un
        decodage   d'adresse  d'E/S (-- Entree/Sortie--)

        sur 16  bits.  Les premiers bus  ISA  specifiaient  un  decodage
        sur  10 bits.  Par consequent  certaines anciennes  cartes (dont
        pas mal  de cartes  8 bits) decoderont  mal les  references  aux
        ports utilisant les 6 bits supplementaires  et peuvent se mettre
        dans   des   etats    bizarres,  pensant   avoir   ete adressees
        alors    qu'elles  ne l'etaient     pas.   Il est recommande  de
        mettre cette  option si votre systeme comporte une ou  plusieurs
        cartes 8 bits.

     --eexxccll _l_i_s_t_e
        _S_u_p_e_r_P_r_o_b_e    ne  tentera    pas   d'acceder  aux  ports   d'E/S
        donnes dans la liste.  Certaines  cartes  video  utilisent   des
        ports   d'E/S  non  standard   pouvant  entrer en   conflit avec
        d'autres cartes installees.  En donnant a _S_u_p_e_r_P_r_o_b_e  une  liste
        de  ports deja  utilises, il saura  qu'aucune carte video ne les
        utilise et par consequent ne les testera pas  (ce  qui  pourrait
        perturber  votre   systeme).   La  liste d'exclusion  est donnee
        sous forme de liste de numeros  (ou d'intervalles de numeros) de
        ports  d'E/S separes par  des virgules.  Un intervalle est donne
        sous la  forme "inf-sup", bornes incluses.  Les valeurs  peuvent
        etre   donnees  en  decimal, en  octal  (nombres commencant  par
        '0'),     ou    en    hexadecimal      (nombres  commencant  par
        '0x').

     --mmaasskk1100
        Cette    option  est  utilisee    conjointement  avec  la  liste
        d'exclusion (_-_e_x_c_l).  Elle indique a  _S_u_p_e_r_P_r_o_b_e   que  lors  du
        test d'un port d'E/S hors de la liste d'exclusion,  l'adresse du
        port doit etre masquee sur  10 bits.  C'est important avec   les
        anciennes  cartes  8  bits ne pouvant decoder que 10 bits, ainsi
        que pour certaines cartes 16  bits bon   marche.   Cette  option
        est   moins restrictive  que _-_n_o_1_6.

     --oorrddeerr _l_i_s_t_e
        Cette    option   donne   a   _S_u_p_e_r_P_r_o_b_e  une  liste  de _C_h_i_p_s a
        tester, et lui  indique l'ordre dans lequel il  doit  le  faire.
        La  liste     est   formee      de    noms   separes    par  des
        virgules. Celle-ci  a priorite  sur  la  liste  predefinie  dans
        _S_u_p_e_r_P_r_o_b_e.     Pour     connaitre   la     liste     des   noms
        supportes,    utilisez      l'option     _-_i_n_f_o      decrite  ci-
        apres.  Notez   que  les valeurs affichees comme "Standard Video
        hardware" ne sont pas utilisables avec l'option _-_o_r_d_e_r.

     --nnoopprroobbee _l_i_s_t_e
        Cette option  definit  les Chips  que  _S_u_p_e_r_P_r_o_b_e ne   doit  ppaass
        tester.  L'ordre  de  tests    est  soit celui par defaut,  soit
        celui impose par l'option _-_o_r_d_e_r. La liste contient des noms  de
        chips  separes  par  des  virgules.  Pour connaitre la liste des
        noms supportes,  utilisez   l'option  _-_i_n_f_o   decrite  ci-apres.
        Notez  que les valeurs affichees comme "Standard Video hardware"
        ne sont pas utilisables avec l'option _-_n_o_p_r_o_b_e.

     --bbiiooss _b_a_s_e
        Cette option indique l'adresse  de base du   BIOS  de  la  carte
        graphique.  Par  defaut,  _S_u_p_e_r_P_r_o_b_e    essaiera  de   localiser
        celle-ci   de lui-meme (l'adresse normale etant  0xC0000).  S'il
        echoue  (un  message  d'erreur  sera   affiche  si cela arrive),
        utilisez l'option _-_b_i_o_s pour lui indiquer la base.

     --nnoo__bbiiooss
        Invalide la lecture  du BIOS Video  et    suppose  qu'une  carte
        EGA  ou  plus  recente  (VGA, SVGA)  est presente comme premiere
        carte video.

     --nnoo__ddaacc
        Supprime  la recherche  du type   de RAMDAC    lorsqu'une  carte
        (S)VGA   est identifiee.

     --nnoo__mmeemm
        Supprime la recherche de la taille memoire de la carte video.

     --iinnffoo
        _S_u_p_e_r_P_r_o_b_e   imprimera    une   liste de   tous  les   materiels
        video qu'il sait identifier.

  55..33..33..  LLeess bbuuggss

  Il y en  a  surement ! Si  vous  en    trouvez,  veuillez,  svp,   les
  rapporter a l'auteur.

  IIll   eesstt  ppoossssiibbllee   qquuee  SSuuppeerrPPrroobbee  bbllooqquuee  vvoottrree  mmaacchhiinnee.. DDaannss  ccee
  ccaass,, eeffffeeccttuueezz ll''eessssaaii aavveecc lleess ooppttiioonnss  _-_n_o_1_6_, _-_e_x_c_l eett _-_m_a_s_k_1_0
    ddee  ffaaccoonn  aa eevviitteerr  lleess ccoonnfflliittss  aavveecc dd''aauuttrreess ccaarrtteess  iinnssttaalllleeeess..

  66..  IInnffoorrmmaattiioonnss ccoonncceerrnnaanntt ccee ddooccuummeenntt

  Les   documents   HOWTO Linux  sont places   sous copyright par  leurs
  auteurs respectifs.    Les   documents  Linux  HOWTO   peuvent    etre
  reproduits   et   distribues  en tout  ou partie,    par quelque moyen
  physique  que  ce  soit,  sans  l'autorisation   de   l'auteur.    Les
  traductions  et travaux     derives   sont    egalement permis    sans
  autorisation  expresse.   La  distribution a   titre   commercial  est
  permise et   meme   encouragee ; cependant,      l'auteur souhaiterait
  en etre averti.

  En bref, nous souhaitons que l'information contenue dans ces documents
  soit   repandue    le  plus   largement   possible.   Cependant,  nous
  souhaitons maintenir le copyright sur ce  document,  et  souhaiterions
  etre avertis de  toute re-distribution.  Si vous avez  des questions a
  ce propos, contactez Greg Hankins, coordinateur  des  documents  Linux
  HOWTO  a l'adresse <gregh@sunsite.unc.edu>.

  The 3 Button Serial Mouse mini-HOWTO
  Geoff Short, geoff@kipper.york.ac.uk
  v1.33, 31 maggio 1998

  Come far funzionare un mouse seriale a tre tasti con Linux.
  Traduzione di Fabrizio Stefani, 29 ottobre 1999.

  1.  Liberatoria

  Il seguente documento  offerto in buona fede comprendendo solo
  programmi e procedure sicure. L'autore non accetta nessuna
  responsabilit per qualsiasi perdita o danno causato in qualunque
  modo, a qualsiasi persona o cosa, come conseguenza diretta o indiretta
  del seguire le istruzioni date.


  2.  Introduzione

  La versione pi recente di questo documento pu sempre essere trovata
  presso http://kipper.york.ac.uk/mouse.html.

  C' una traduzione in giapponese presso http://jf.gee.kyoto-
  u.ac.jp/JF/JF-ftp/euc/3-Button-Mouse.euc; e una in francese presso
  http://www.freenix.fr/linux/HOWTO/mini/3-Button-Mouse.html.
  Potrebbero essere disponibili altre traduzioni - controllate i mirror
  dell'LDP nella vostra zona.

  N.d.T.: L'ultima versione della traduzione italiana pu essere trovata
  presso http://www.pluto.linux.it/ildp/HOWTO/HOWTO-INDEX-3.html


  La maggior parte delle applicazioni X vengono scritte assumendo che
  l'utente lavorer con un mouse a tre tasti. I mouse seriali sono usati
  comunemente coi computer e sono economici. Parecchi di tali mouse
  hanno 3 tasti e dichiarano di usare il protocollo Microsoft, che in
  teoria significa che sono l'ideale per X Windows (attualmente il
  record per il pi economico mouse a 3 tasti, funzionante,  di
  1,14$!).


  La maggior parte dei mouse a doppio protocollo funzionano in due modi:

    modo Microsoft a 2 tasti,

    modo MouseSystems a 3 tasti.

  Questo documento vi guider attraverso i vari passi necessari per
  configurare e far funzionare il vostro mouse nei due suddetti modi,
  specialmente quelli che servono per usare il pi utile modo a 3 tasti.


  Man mano che le distribuzioni diventano pi facili da installare
  alcuni problemi dovrebbero sparire. Per esempio, RedHat ha il
  programma mouseconfig per sistemare le cose al posto vostro. Tuttavia
  alcune versioni della RH 5.0 hanno un baco in mouseconfig, quindi
  controllate di avere le patch.


  3.  Porte seriali

  La prima cosa da fare  di accertarsi che il software possa trovare il
  mouse. Scoprite a quale porta  connesso il mouse - di solito 
  /dev/ttyS0 (COM1 sotto DOS) o /dev/ttyS1 (COM2) (ttyS0 di solito  il
  connettore a 9 contatti, ttyS1  il connettore a 25 contatti, ma
  ovviamente non c' una regola fissa a tal riguardo). C' anche un
  analogo numero di device /dev/cua, che sono quasi la stessa cosa dei
  ttyS, ma il loro uso  sconsigliato. Per prudenza create un nuovo link
  /dev/mouse che punta a tale porta. Per esempio la ttyS0:


       ln -s /dev/ttyS0 /dev/mouse



  4.  Mouse con interruttore

  Alcuni mouse, di solito non quelli pi economici, hanno un
  interruttore sul fondo contrassegnato con `2/3'. A volte potrebbe
  essere `PC/MS'. In tal caso la posizione `2'  per il modo Microsoft a
  2 tasti e la posizione `3' per quello MouseSystems a 3 tasti.
  L'interruttore `PC/MS'  leggermente pi complicato.  Probabilmente
  scoprirete che la posizione `MS' indica Microsoft e `PC' MouseSystems.
  Potreste trovare la posizione `PC' descritta come modo ps/2, ma
  dovrebbe funzionare lo stesso per MouseSystems. Se avete un tale mouse
  potete mettere l'interruttore su `3' o `PC', mettere le impostazioni
  per MouseSystems nel vostro XConfig (vedere pi avanti) e il mouse
  dovrebbe funzionare perfettamente nel modo a 3 tasti.



  5.  Mouse normali

  Se non avete nessun interruttore e nessuna istruzione, allora 
  necessario fare un po' di esperimenti. La prima cosa da provare  di
  assumere che il costruttore stia dicendo la verit e il mouse 
  pienamente Microsoft. Impostate il vostro Xconfigs in modo che si
  aspetti un mouse Microsoft (vedere la ``Sezione Xconfig'') e
  provatelo.


  Se il mouse non funziona affatto allora il vostro non  un mouse
  Microsoft, oppure c' qualche altro problema. Provate gli altri
  protocolli nei file di configurazione, la pagina di manuale del file
  di configurazione  il miglior posto dove incominciare a guardare.
  Guardate anche nella sezione ``Problemi vari'' pi avanti.


  Probabilmente ci che otterrete sar che sotto X il mouse funziona
  bene ma solo i due pulsanti esterni fanno qualcosa. Ovviamente potete
  accettare questa situazione ed emulare il terzo pulsante (premete
  entrambi i pulsanti contemporaneamente per fare clic col terzo) come
  fareste con un mouse a due tasti. Per fare ci cambiate il vostro file
  Xconfig come mostrato nella successiva sezione ``Esempio di Xconfig''.
  Questo potrebbe significare che avete comprato un mouse a 3 tasti
  senza un buon motivo e certamente non avete fatto passi avanti. Quindi
  adesso dovete controllare il vostro hardware.




  6.  Far funzionare un mouse nel modo a 3 tasti

  Anche i mouse economici possono lavorare col protocollo Mouse Systems,
  con tutti e tre i pulsanti funzionanti. Il trucco  di indurre il
  mouse a pensare di essere un Mouse Systems, qualcosa che vedrete
  raramente nelle istruzioni.


    Prima di accendere il computer premete il pulsante sinistro del
     mouse (e tenetelo premuto fino a che l'avvio del sistema non 
     terminato).

  Quando il mouse riceve l'alimentazione, se il pulsante sinistro 
  premuto, esso commuta nel modo Mouse Systems. Una cosa semplice, ma
  non sempre documentata. Osservate che un reset software del computer
  potrebbe non togliere l'alimentazione al mouse, e quindi potrebbe non
  funzionare.  Per commutare il modo di funzionamento ci sono altre
  maniere che, con il vostro particolare mouse, potrebbero funzionare
  oppure no. Alcune di esse sono meno drastiche del riavvio del
  computer, un paio invece lo sono di pi!


    Se il vostro computer lo consente potete scollegare il mouse e
     reinserirlo col pulsante premuto (sebbene di solito non si dovrebbe
     inserire qualcosa a computer acceso, le specifiche della RS232
     dicono che si pu fare).

    Potrebbe essere possibile reinizializzare il mouse battendo echo
     "*n" > /dev/mouse, che dovrebbe avere lo stesso effetto dello
     scollegarlo. Per il modo Mouse Systems, non per quello Microsoft,
     tenete premuto il pulsante sinistro. Potete mettere tale comando
     nello script che usate per far partire X.

    Bob Nichols (rnichols@interaccess.com), per ottenere lo stesso
     effetto, ha scritto un programmino C che potrebbe funzionare nei
     casi in cui echo "*n" non funziona (e vice versa). Potete trovare
     una copia del suo codice sorgente presso
     http://kipper.york.ac.uk/src/fix-mouse.c

    Qualcuno ha riferito che la riga `ClearDTR' nell'Xconfig 
     sufficiente per far commutare il suo mouse nel modo Mouse Systems.

    Se ne avete il coraggio, aprite il mouse (ricordate che cos
     annullerete la garanzia) e guardateci dentro. In alcuni casi il
     mouse ha un interruttore al suo interno che, per qualche strano
     motivo,  noto solo al produttore. Nei mouse economici pi
     probabilmente sar un ponticello che potete spostare.
     L'interruttore, o il ponticello, dovrebbe avere lo stesso effetto
     dell'interruttore `MS/PC' descritto nella precedente sezione
     ``Mouse con interruttore''. Potreste scoprire che la piastrina col
     circuito stampato  progettata per avere un interruttore per 2/3
     pulsanti, ma esso non  stato messo. Si vedr qualcosa tipo:


                -----------
               | o | o | o |  SW1
                -----------
                 1   2   3




  Provate a collegare i pin 1-2 o 2-3 e vedete se il comportamento del
  mouse  cambiato. Se s, potete inserirci un microinterruttore, oppure
  potete rendere permanente il collegamento con una saldatura.

    Ecco un'altra soluzione, da Peter Benie
     (pjb1008@chiark.chu.cam.ac.uk), che fa ricorso alle saldature e che
     dovrebbe essere usata come ultima risorsa per quei mouse che
     proprio non capiscono il protocollo MouseSystems. Se l'interruttore
     del pulsante centrale  a due poli, collegatene uno
     all'interruttore del pulsante sinistro e l'altro all'interruttore
     del pulsante destro. Se invece non  a due poli allora usate dei
     diodi al posto dei collegamenti diretti.  Ora il pulsante centrale
     schiaccia contemporaneamente i pulsanti sinistro e destro.
     Impostate ChordMiddle nell'XF86Config ed avrete un pulsante
     centrale funzionante.

    L'ultimo metodo che fa uso delle saldature mi  stato descritto da
     Brian Craft (bcboy@pyramid.bio.brandeis.edu). Due integrati diffusi
     per la costruzione dei mouse sono lo Z8350 a 16 pin e l'HM8350A a
     18 pin. Su ognuno di tali integrati un pin controlla il modo di
     funzionamento dell'integrato stesso, nel seguente modo:


       Pin 3        Modo
       ----------   ---------
       Scollegato   Microsoft per default. Mouse Systems se all'accensione
                    viene tenuto premuto un pulsante.
       GND          Sempre Mouse Systems.
       Vdd          Sempre Microsoft.




  (I pin sono numerati come segue:)


               ____
       pin1  -| \/ |-
       pin2  -|    |-
       pin3  -|    |-
             -|    |-
             -|    |-
             -|    |-
             -|    |-
       pin8  -|____|-




  (Questa informazione  qui per cortesia di Hans-Christoph Wirth, e
  Juergen Exner, che l'hanno pubblicata su de.comp.os.linux.hardware).
  Potete saldare un collegamento fra il pin 3 e la massa per bloccare il
  funzionamento del mouse in modo MouseSystems.



    Peter Fredriksson (peterf@lysator.liu.se) ha provato l'integrato
     SYSGRATION SYS2005 ed ha scoperto che collegando il pin 3 alla
     massa (Gnd) si forza il funzionamento nel modo Mouse System.

    Uli Drescher (ud@digi.ruhr.de) conferma che funziona col chip
     HN8348A; Ben Ketcham (bketcham@anvilite.murkworks.net) conferma per
     l'HM8348A (la massa  il pin 9).

    Urban Widmark (ubbe@ts.umu.se) dice che la stessa cosa funziona per
     il chip EC3567A1, in cui il pin 8  la massa. L'ho provato anch'io
     e funziona bene.

    Timo T Metsala (metsala@cc.helsinki.fi) ha scoperto che
     sull'integrato HT6510A il pin 3  quello per la selezione del modo,
     il pin 9  la massa (Gnd). Lo stesso vale per l'integrato HT6513A.
     Holtek ha provato anche gli integrati HT6513B e HT6513F - su questi
     la massa  il pin 8.

    Robert Romanowski (robin@cs.tu-berlin.de) dice che pin 3 - pin 8
     (Gnd) funziona anche sull'integrato EM83701BP.

    Robert Kaiser (rkaiser@sysgo.de) conferma che pin 3 - Gnd funziona
     anche per l'integrato EC3576A1.

    Sean Cross (secross@whidbey.com) ha scoperto che sull'integrato
     HM8370GP serve pin 2 - pin 7 (Gnd).
    Peter Fox (fox@roestock.demon.co.uk) ha usato pin 3 - pin 8 con
     l'integrato HM8348A.

    Jon Klein (jbklein@mindspring.com) ha trovato che il trucco da
     usare per l'integrato UA5212S  pin 3 - pin 9.


    Alternativamente ai suddetti metodi di saldatura, potete fare in
     modo che il mouse tenga premuto il suo pulsante all'avvio; il
     seguente circuito  dato da Mathias Katzer.


                -----
             ---  R  ---------O------ + Alimentazione
            |   -----   |        |                         C = 100 nF condensatore
            |           | E      |                         R = 100 kOhm
            |       __ /         |                         T = BC557 transistor
            |      /  \          O
            |   B | #V | T         /
            |-----|-#  |          /   Interruttore del pulsante sinistro del mouse
            |     | #\ |         O
            |      \__/          |
           ---         \  C      |
           --- C        ------O----------> (da qualche parte all'interno del mouse)
            |
           ###  Massa (Gnd)




  Il mouse su cui  stato provato  un MUS2S senza marca - se ci fun
  zioni anche per altri mouse dipende dal circuito del mouse in causa.
  Se l'interruttore  collegato a massa invece che all'alimentazione
  positiva, allora dovrebbe andar bene un transistor npn come il BC547;
  in tal caso vanno scambiate anche R e C.

  Questo  quanto, la scelta sta a voi. Restarvene col modo predefinito
  Microsoft a due tasti, oppure lavorarci su e trovare il sistema per
  cambiare il modo e configurare X per avvantaggiarsene.


  7.  Mouse con rotella

  I mouse con le rotelle sono apparsi negli ultimi anni, a partire dal
  Microsoft Intellimouse e poi per opera degli altri costruttori. La
  rotella pu essere premuta come un pulsante, oppure rotolata su e gi.
  http://www.inria.fr/koala/colas/mouse-wheel-scroll/  di gran lunga la
  miglior fonte di informazioni, descrive come far riconoscere l'azione
  di scorrimento a parecchie applicazioni X.


  In generale vi servir un Xserver abbastanza nuovo per usare l'azione
  di scorrimento, ma alcuni vecchi server riconosceranno la pressione
  della rotella. Per esempio, l'Intellimouse  supportato da XFree 3.3.1
  e successivi.


  8.  Usare gpm per commutare il modo del mouse

  gpm  il programma che permette di usare il mouse nel modo console. Di
  solito  incluso nelle distribuzioni di Linux e pu essere lanciato
  dalla riga di comando o nello script di avvio /etc/rc.d/rc.local.
  Osservate che le distribuzioni non contengono sempre la versione pi
  recente (la 1.13 nel momento in cui scrivo), che pu essere trovata
  sui mirror di sunsite.unc.edu.

  Sotto gpm, i modi fondamentali per i mouse seriali sono:


       gpm -t ms
       gpm -t msc
       gpm -t help




  per i modi Microsoft, MouseSystems, o per sondare il mouse al posto
  vostro e dirvi cosa ha trovato. Per lanciare gpm nel modo MouseSystems
  potrebbe servirvi l'opzione -3, e forse l'opzione DTR (usando -o dtr):

       gpm -3 -o dtr -t msc


  gpm  spesso in grado di riconoscere tutti e tre i pulsanti del mouse
  anche nel modo Microsoft. Le versioni pi nuove (1.0 e successive (?))
  possono poi rendere disponibile tale informazione agli altri
  programmi. Perch ci funzioni dovete lanciare gpm con l'opzione -R,
  in questo modo:

       gpm -R -t ms


  Cos facendo gpm esporter i dati del mouse su un nuovo device, chiam
  ato /dev/gpmdata, che agli altri programmi apparir come un mouse.
  Osservate che tale device usa sempre il protocollo MouseSystems.
  Potete quindi dire a Xconfig di usare tale device (come mostrato
  sotto) al posto di /dev/mouse ma, ovviamente, dovrete assicurarvi che
  gpm sia in esecuzione quando volete usare X.  Qualcuno ha riferito
  che, usando questa tecnica, alcune azioni del pulsante centrale non
  vengono interpretate correttamente, ci potrebbe essere dovuto ad una
  particolare impostazione del mouse.


  Cambiare la mappatura dei tasti per gpm e X (gustafso@math.utah.edu)



  Potreste accorgervi che gpm usa una diversa mappatura predefinita dei
  tasti rispetto a X e quindi usare entrambi i sistemi sulla stessa
  macchina potrebbe generare confusione. Per fare in modo che X usi gli
  stessi pulsanti di gpm per le operazioni di "seleziona" e "incolla",
  bisogna usare il comando:


       xmodmap -e "pointer = 1 3 2"


  che associa il pulsante sinistro a "seleziona" e il destro a
  "incolla", sia per i mouse a 2 tasti che a tre tasti.  Per forzare gpm
  ad usare la mappatura dei tasti predefinita di X, lanciatelo con il
  comando -B, cio:

       gpm -t msc -B 132




  9.  Usare due mouse

  In alcuni casi, per esempio un laptop con dispositivo di puntamento
  integrato, potreste voler usare un mouse seriale come secondo
  dispositivo di puntamento.  Nella maggior parte dei casi il
  dispositivo integrato user il protocollo PS/2 e potete ignorarlo, se
  non avete intenzione di usarlo.  Semplicemente configurate gpm o X per
  usare /dev/ttyS0 (o quel che ), come al solito.


  Per usarli entrambi contemporaneamente potete usare gpm -M per
  riesportare i device. Maggiori dettagli sulla pagina di manuale di
  gpm.  Inoltre, XFree 3.3.1 e successivi supportano dispositivi
  d'ingresso multipli usando il meccanismo XInput. I file XF86Config
  autogenerati dovrebbero avere al loro interno i commenti necessari.



  10.  Esempi di file XF86Config e Xconfig

  La collocazione dei vostri file di configurazione di X dipende dalla
  vostra particolare versione e distribuzione. Probabilmente sar
  /etc/Xconfig, /etc/XF86Config oppure /usr/X11/lib/X11/XF86Config.
  Dovreste poter vedere qual  all'avvio di X - verr mostrato sullo
  schermo prima di tutte le opzioni. La sintassi dei file XF86Config e
  Xconfig  leggermente diversa, quindi vengono riportate entrambe.


  Mouse seriale Microsoft


    XF86config:


       Section "Pointer"
           Protocol "microsoft"
           Device "/dev/mouse"
       EndSection




    Xconfig:


       #
       # Mouse definition and related parameters
       #
       Microsoft      "/dev/mouse"





  Mouse seriale Microsoft con emulazione dei tre tasti


    XF86config:


       Section "Pointer"
           Protocol "microsoft"
           Device "/dev/mouse"
           Emulate3Buttons
       EndSection




    Xconfig:

  #
  # Mouse definition and related parameters
  #
  Microsoft      "/dev/mouse"
  Emulate3Buttons





  Mouse seriale MouseSystems a tre tasti


    XF86config:


       Section "Pointer"
           Protocol "mousesystems"
           Device "/dev/mouse"
           ClearDTR            # Queste due righe probabilmente non servono,
           ClearRTS            # provare senza la prima e poi solo quella con DTR
       EndSection




    Xconfig:


       #
       # Mouse definition and related parameters
       #
       MouseSystems    "/dev/mouse"
       ClearDTR                # Queste due righe probabilmente non servono,
       ClearRTS                # provare senza la prima e poi solo quella con DTR





  Mouse seriale Microsoft con gpm -R


    XF86config:


       Section "Pointer"
           Protocol "MouseSystems"
           Device "/dev/gpmdata"
       EndSection




    Xconfig:


       #
       # Mouse definition and related parameters
       #
       MouseSystems      "/dev/gpmdata"





  11.  Fili, prolunghe e adattatori

  Gli unici tre fili necessari nel cavetto di un mouse sono: TxD e RxD
  per il trasferimento dati, RTS e/o DTR per l'alimentazione e la massa.
  Tradotto in numeri di pin:


                   porta a 9 pin  porta a 25 pin
               TxD     3                2
               RxD     2                3
               RTS     7                4
               DTR     4               20
               Gnd     5                7




  La tabella precedente pu essere utile se volete realizzare degli
  adattatori per i connettori a 9 e 25 pin, oppure delle prolunghe.



  12.  Problemi e configurazioni varie


    Se avete dei problemi col mouse sotto X o in modo console,
     accertatevi di non stare eseguendo un getty, o di non avere
     qualunque cosa attiva, tipo un modem, sulla linea seriale.
     Controllate anche che non ci siano dei conflitti di IRQ.

     possibile che dobbiate tenere premuto il pulsante sinistro del
     mouse durante l'avvio di X Windows. Alcuni sistemi potrebbero
     mandare un qualche tipo di segnale, o un impulso, al mouse quando
     si avvia X.

    I problemi con i dispositivi seriali potrebbero essere dovuti ad
     una non corretta inizializzazione della porta seriale all'avvio del
     sistema. Ci viene fatto dal comando setserial, che viene lanciato
     dallo script di avvio /etc/rc.d/rc.serial.  Per maggiori dettagli
     vedere la pagina di manuale di setserial e il Serial-HOWTO.
     Potrebbe valere la pena di fare un po' di esperimenti coi tipi, per
     esempio provare setserial /dev/mouse uart 16550 o 16550a
     indipendentemente da quale porta ci sia in realt (per esempio, ai
     mouse non piace la 16c550AF).

    L'opzione ClearDTR potrebbe non funzionare come si deve su alcuni
     sistemi, a meno che non disabilitate l'handshaking fra RTS e CTS
     col comando:

       stty -crtscts < /dev/mouse


  (provato da Vladimir Geogjaev geogjaev@wave.sio.rssi.ru su un Pentium
  con UART 16450).

    Per far funzionare il pulsante centrale dei mouse Logitech,
     potrebbe essere necessaria la riga ChordMiddle. Tale riga, nel file
     di configurazione, rimpiazza Emulate3Buttons oppure va dopo la riga
     /dev/mouse. Nel vostro Xconfig potrebbero servirvi le righe
     ClearDTR e ClearRTS. Alcuni mouse Logitech fortunatamente non hanno
     bisogno della riga ChordMiddle - un sintomo di tale problema  che
     i menu sembrano muoversi col mouse invece di scorrere in basso (da:
     chang@platform.com).

    Scambiare i pulsanti: usare il comando xmodmap per cambiare
     l'associazione fra un pulsante fisico e un clic del mouse.  Ad
     esempio:  xmodmap -e "pointer = 3 2 1"  rigirer i pulsanti per la
     mano sinistra. Se avete un mouse con solo due pulsanti, saranno
     numerati 1 e 2.

    Accelerazione: usate il comando xset m per cambiare i parametri del
     mouse. Ad es. xset m 2  imposta l'accelerazione a 2. Per i dettagli
     completi vedere la pagina di manuale.

    Sfasamento del puntatore: se l'azione di un click sembra avvenire a
     sinistra o a destra rispetto alla posizione del cursore, potrebbe
     essere dovuto ad un mancato allineamento del vostro schermo. Questo
      un problema che si verifica col driver S3 e dovreste poterlo
     correggere usando xvidtune. Provate con Invert_VCLK/InvertVCLK,
     oppure EarlySC.  Questa informazione viene da Bill Lavender
     (lavender@MCS.COM) e Simon Hargrave.  Nell'XF86Config potrebbe
     somigliare a:



       Subsection "Display"
           Modes       "1024x768" "800x600" "640x480" "1280x1024"
           Invert_VCLK "*" 1
           ...




    Se avete dei `rimbalzi' dei pulsanti del mouse, cio due click
     quando invece ne volevate uno solo, potrebbe esserci qualcosa che
     non funziona nel mouse. Tale problema  stato risolto, per i mouse
     Logitech, da Bob Nichols (rnichols@interaccess.com). La soluzione
     consiste nel saldare alcuni resistori ed un integrato all'interno
     del mouse, in modo da eliminare il rimbalzo dei microinterruttori.

    Se alcuni utenti non riescono a far funzionare il mouse, ma altri
     (es. root) ci riescono, allora  possibile che gli utenti non
     stiano facendo girare esattamente la stessa cosa - per esempio una
     diversa versione di X, oppure un diverso Xconfig. Controllate
     attentamente il messaggio di avvio di X per accertarvene.

    Se vi accorgete che il puntatore del mouse cancella delle cose
     dallo schermo, allora avete un problema di configurazione del
     server.  Provate ad aggiungere l'opzione linear, o forse nolinear,
     nella sezione della scheda grafica, oppure le opzioni
     tgui_pci_write_off e tgui_pci_read_off, se  una piastra PCI
     (questo problema sembra essere relativo alla scheda Trident).

    Se il cursore del mouse non appare sullo schermo, ma per il resto
     sembra funzionare, provate con l'opzione "sw_cursor" nella sezione
     Device del file di configurazione.

    Se il vostro mouse smette di funzionare quando c' il sole, o
     quando accendete una luce, forse succede che i sensori vengono
     `accecati' dalla luce che filtra attraverso il guscio. Potreste
     provare a dipingere di nero l'interno del guscio, o a mettere della
     carta nella parte superiore interna.

    I mouse marcati Microsoft sono spesso fonte di problemi.  stato
     riferito che il nuovissimo ``Microsoft Serial Mouse 2.1A'' non
     funziona su molti sistemi, sebbene sconnetterlo e poi reinserirlo
     possa aiutare.  gpm, nelle versioni 1.13 e superiori, dovrebbe
     supportare anche i mouse 2.1A tramite il tipo di mouse pnp (vedere
     la ``sezione gpm'' per come riesportarlo).  Anche il ``Microsoft
     Intellimouse'' causa dei problemi, sebbene ora dovrebbe essere
     supportato da XFree versione 3.3 e successive.

  13.  Modelli provati

  Ci sono un sacco di mouse diversi in giro ed io onestamente non posso
  consigliarvi di comprarne uno piuttosto che un altro. Quello che posso
  fare  di fornirvi una lista, basata sull'esperienza e sul sentito
  dire, di come penso che tali mouse si comportino. Anche con tali
  informazioni dovete stare attenti - nel nostro ufficio abbiamo due
  mouse identici su due computer, certe cose funzionano su uno ma non
  sull'altro!   gradita qualsiasi aggiunta a questa lista.


  Mouse ottici Mouse System, nella versione seriale
  Funzionano bene (come ci si aspetta dal nome!) senza ClearDTR o
  ClearRTS nella configurazione.
  WiN mouse, quelli venduti per otto sterline da Office World
  Sono del tipo standard a doppio modo Microsoft/MouseSystems.
  Mouse Agiler 2900
  Sono del tipo standard a doppio modo Microsoft/MouseSystems.
  L'integrato SYSGRATION SYS2005  saldabile.
  Mouse Sicos
  Funziona bene, servono ClearDTR e Clear RTS nella configurazione.
  Index vende un mouse per 10 sterline
  Non funziona nel modo a tre tasti, ma ha delle belle istruzioni :-)
  Mouse Artec
  Solito mouse a doppio protocollo, serve l'impostazione di `ClearDTR'
  nella configurazione (ma NON quella di `ClearRTS').
  Mouse seriale DynaPoint a 3 tasti.
  Solito mouse a doppio protocollo, serve l'impostazione di `ClearDTR' e
  di `ClearRTS' nell'Xconfig.
  Genius Easymouse a 3 tasti
  Funziona bene col protocollo Mouseman, senza l'impostazione del
  parametro ChordMiddle. Da Roderick Johnstone (rmj@ast.cam.ac.uk).
  Truemouse, made in Taiwan
  Funziona bene, serve `ClearDTR' nella configurazione (da Tim
  MacEachern).
  Mouse marcato Champ
  Bisogna mettere l'interruttore sul modo PC, che abilita anche il
  protocollo MouseSystems (da tnugent@gucis.cit.gu.edu.au).
  Mouse MicroSpeed
  Solito mouse a doppio protocollo.
  Marcato Venus (7$)
  Ha un ponticello all'interno per commutare fra i modi a 2 e 3 tasti
  (da mhoward@mth.com).
  Saturn
  Mouse con interruttore, funziona bene come MouseSystems nella
  posizione a 3 tasti (da grant@oj.rsmas.miami.edu).
  Mouse Manhattan.
  Interruttore per i modi `MS AM' / `PC AT', il modo MS funziona bene
  con il metodo gpm -R (da komanec@umel.fee.vutbr.cz).
  Mouse Inland.
  Interruttore per i modi `PC/MS', funziona bene (da
  http://ptsg.eecs.berkeley.edu/~venkates).
  qMouse (3 tasti), FCC ID E6qmouse X31.
  Venduto in USA per circa 10$. Funziona con `gpm -t msc -r 20'.  Nessun
  ponticello o microinterruttore per il modo MouseSystems a 3 tasti.
  Inaffidabile sotto X. Non risponde a echo "*n" > /dev/mouse.
  Mouse Mitsumi (2 tasti), FCC ID EW4ECM-S3101.
  Venduto in USA per circa 12$. Affidabile sotto X e sotto gpm, morbido
  doppio tasto (questi due da gustafso@math.utah.edu).
  Mouse PC Accessories, che ho comprato da CompUSA per meno di 10$.
  Ha un interruttore PC/MS sul fondo. Funziona bene (da
  steveb@communique.net).
  First Mouse - davvero economico, 7,79 sterline da Tempo.
  Doppio modo Microsoft/MouseSystems, il modo  impostato dalla
  pressione del pulsante all'accensione. Nessun interruttore, nessun
  ponticello. Connessione a quattro cavi, echo '*n' non funziona.  `gpm
  -R' funziona a meraviglia (da peterk@henhouse.demon.co.uk).
  Mouse a 3 tasti Trust.
  Doppio modo con interruttore, funziona bene come MouseSystems nel modo
  `PC'.  A gpm non piace il modo Microsoft.
  Chic 410
  Funziona perfettamente se tenuto in modo ms e usato con il comando gpm
  -R.  Da Stephen M. Weiss (steve@esc.ie.lehigh.edu).
  Mouse KeyMouse a 3 tasti.
  Funziona bene con ClearDTR e ClearRTS nell'Xconfig; con gpm serve `-o
  dtr' (da EZ4PHIL@aol.com).
  Tastiera Qtronix `Scorpio 60'
  Tutti e tre i pulsanti funzionano col protocollo MouseSystems (da
  hwe@uebemc.siemens.de).
  Laptop Tecra 720
  Il glidepoint  su /dev/cua0; la leva  su /dev/psaux (da
  apollo@anl.gov).
  Mouse Anubis
  Funziona bene, bisogna tenere premuto il pulsante sinistro quando si
  commuta nella console virtuale di X (da Joel Crisp).
  Mouse Yakumo No.1900
  Funziona con gpm -R -t ms esportato in X (da Oliver Schwank).
  Trackball Genius `Easy Trak'
  Non  compatibile Microsoft, usando Mouseman nell'Xconfig funzioner
  bene (da VTanger@aol.com).
  Highscreen Mouse Pro
  `Funziona bene' dice alfonso@univaq.it.
  Serie Logitech CA
  Funzionano in X usando il protocollo MMseries a 2400 Baud e 150 di
  velocit di campionamento (SampleRate) (dovrebbe valere anche per i
  mouse Logitech CC, CE, C7 e C9) (da vkochend@nyx.net).
  A4-Tech mouse
  Funzionano bene, serve la riga DTR sia sotto X che sotto gpm (da
  deane@gooroos.com).
  Mouse Vertech
  Normale comportamento Microsoft/Mousesystems, pu essere aggiustato in
  modo definitivo con una saldatura (da duncan@fs3.ph.man.ac.uk).
  Boeder M-7 ``Bit Star'' (e altre serie M tranne la M13)
  Commuta al protocollo Mousesystems tenendo premuto un qualsiasi
  pulsante all'accensione (da sjt@tappin.force9.co.uk).
  Mouse Systems ``Scroll'' (quattro pulsanti e un pulsante/rotella)
  Ha un interruttore 2/3 - nel modo 3 funziona come un mouse
  MouseSystems a 3 tasti, ignorando il pulsante in pi e la rotella. Non
  serve ClearRTS/DTR (da parker1@airmail.net).
  Mouse seriale a 3 tasti Radio Shack
  Modello 26-8432, disponibile col Tandy per circa 20 sterline. Funziona
  come Mousesystems con ClearDTR (da Sherilyn@sidaway.demon.co.uk).
  Mouse seriale Dexxa
  Funziona bene col protocollo Microsoft nell'Xconfig, non serve
  ChordMiddle n nient'altro (da slevy@ncsa.uiuc.edu).
  Mouse 3 tasti Belkin
  Comprato da Sears (per 10$), in modo PC sotto gpm ha bisogno di -o rts
  (e probabilmente di ClearRTS sotto X) (da mmicek@csz.com).

  14.  Ulteriori informazioni


    Mouse Systems ha un sito web presso http://www.mousesystems.com/.
     Hanno un driver per Windows, se vi serve.

    Il Linux Serial HOWTO  disponibile nei mirror di sunsite sparsi
     attorno al mondo. Se non sapete qual  il mirror pi vicino
     incominciate da http://sunsite.unc.edu/mdw/linux.html

    C' un'ottima spiegazione del funzionamento dei mouse su
     http://www.4QD.co.uk/faq/meece.html.

    Dettagli completi sui file Xconfig e XF86Config si possono trovare
     sulle relative pagine di manuale e nella documentazione relativa
     all'installazione di X Windows, come l'Xfree86 HOWTO. Vedere anche
     l'XFree86 FAQ su un mirror di http://www.XFree86.org/.

    Informazioni su gpm possono essere trovate sulla relativa pagina di
     manuale, provare anche sulla pagina web di Darin Ernst presso
     http://www.castle.net/X-notebook/mouse.txt.

    Un sacco di informazioni sul software e l'hardware dei mouse
     possono essere trovate presso
     http://www.hut.fi/Misc/Electronics/pc/interface.html#mouse


  15.  La coda del mouse

  Molte delle informazioni in questo documento sono state pescate dai
  vari newsgroup su Linux. Non ho tenuto traccia di tutti quelli che
  hanno indirettamente contribuito per questa via, me ne scuso, grazie
  tante a tutti.


  Quindi, riassumendo:


     possibile far funzionare anche gli economici mouse Microsoft a 3
     tasti.

    Configurate la vostra copia di X in modo che si aspetti un mouse
     Mouse Systems.

    All'accensione tenete premuto il pulsante sinistro del mouse per
     commutarne il funzionamento nel modo MouseSystems.

    All'avvio di X potreste dover tenere premuto il pulsante sinistro.

    I mouse sono pi intelligenti di quanto crediate.





























  ADSL HOWTO per sistemi Linux
  David Fannin, dfannin@dnai.com
  v0.92, 10 aprile 1999

  Come configurare un sistema Linux per lavorare con la tecnologia Asym
  metric Digital Subscriber Loop (ADSL), un nuovo tipo di accesso digi
  tale ad alta velocit disponibile presso il fornitore di accesso tele
  fonico. ADSL  una delle componenti della famiglia delle tecnologie
  Digital Subscriber Line (DSL) disponibili per l'utenza domestica e
  affari sui normali doppini telefonici in rame, in grado di fornire
  velocit da 384 kbps a 1,5 Mbps.  Questo documento fornisce un'intro
  duzione all'ADSL, informazioni sull'installazione, la configurazione e
  il funzionamento del servizio.  Traduzione a cura di Lorenzo Pulici
  snowdog@tiscalinet.it

  1.  Note legali

  ADSL HOWTO per sistemi Linux

  Copyright (C)1998 David Fannin.

  Vengono riportate le note originali, alle quali fa seguito una
  traduzione che ha valore puramente indicativo.

  This document  is free; you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free
  Software Foundation; either version 2 of the License, or (at your
  option) any later version.

  This document is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You can get a copy of the GNU GPL at at
  <http://www.gnu.org/copyleft/gpl.html>.


  Questo documento  software libero; potete ridistribuirlo e/o
  modificarlo secondo i termini della GNU General Public License cos
  come pubblicata dalla Free Software Foundation, riferendovi alla
  versione 2 o a vostra scelta ad una pi recente della licenza stessa.

  Questo documento viene distribuito nella speranza sia di utilit, ma
  SENZA ALCUNA GARANZIA;  esclusa altres qualsiasi garanzia di
  RIVENDITA o ADATTAMENTO A PARTICOLARI SCOPI. Riferirsi alla GNU
  General Public License per maggiori dettagli.

  Una copia della GNU GPL pu essere scaricata presso
  <http://www.gnu.org/copyleft/gpl.html>.



  2.  Introduzione

  Questo documento indirizza l'ordinazione, l'installazione e la
  configurazione del servizio ADSL per l'uso su un sistema Linux.


  ADSL o Asymmetric Digital Subscriber Loop  una tecnologia di accesso
  ad Internet ad alta velocit che utilizza i comuni doppini telefonici
  in rame (gli stessi fili del vostro servizio telefonico).  Concepita
  per poter essere utilizzata in oltre l'80% delle installazioni
  telefoniche negli Stati Uniti, e utilizzando la modulazione adaptive-
  line, ADSL consente velocit tra i 384 kbps e 1,5 Mbps, normalmente
  utilizzando differenti velocit per i canali di trasmissione e
  ricezione (da cui il nome "Asymmetric"). ADSL fornisce un accesso
  diretto e dedicato all'ISP.


  ADSL  stata concepita per applicazioni SOHO, come piccoli uffici con
  5-30 sistemi, o per grandi utenti Linux che vogliono larghezza di
  banda e hanno somme da investirvi.  Le applicazioni spaziano da
  interconnessioni tra server a larghezza di banda ridotta ad
  applicazioni in streaming video.  ADSL  concepita e collocata a
  livello di costo tra i servizi ISDN e T1, fornendo velocit molto
  vicine a quelle delle linee T1 senza i loro problemi di costi,
  complessit e disponibilit.  Dato che ADSL  un servizio dedicato,
  permette di evitare i ritardi e i carichi tipici del servizio ISDN.

  Questo HOWTO inizia con una descrizione dei servizi ADSL e le sue
  molte varianti, e con un diagramma di blocco dei componenti necessari
  per il servizio. Dopodich viene stilata una lista di cose necessarie
  per ordinare ADSL.  inoltre acclusa una guida al cablaggio ADSL e
  alla configurazione del vostro sistema Linux. Nell'appendice ho
  incluso una FAQ, una lista di link interessanti e un glossario.


  Qualsiasi commento su questo documento  il benvenuto: pu essere
  inviato a dfannin@dnai.com .

  L'ultima versione di questo documento  disponibile presso
  <http://www.sushisoft.com/adsl/>.


  3.  Panoramica ADSL


  3.1.  Cos' ADSL?

  Asymmetric Digital Subscriber Line (ADSL) :

    Una tecnologia telefonica in Loop che usa le esistenti linee

    Fornisce elevata velocit di trasferimento dati contemporaneamente
     alla voce (dati su voce)

    Linea dedicata digitale per una connessione IP

    Combinazioni di flussi di dati (Nord America):
     Trasmissione/Ricezione
     256 kbps/256 kbps
     384 kbps/128 kbps
     384 kbps/384 kbps
     384 kbps/1.5 Mbps
     e molti altri

    Ampia gamma di opzioni dal lato utente (CPE), inclusa l'interfaccia
     Ethernet 10baseT.

    Connessione dedicata all'ISP (indirizzi dinamici o statici)

    Pu supportare una sottorete IP (da 1 a 254 indirizzi IP, dipende
     dall'ISP)

    Fascia di costo inferiore alle linee private dedicate (T1)






  3.2.  Applicazioni ADSL

  ADSL  stata progettata per fornire una connessione dati dedicata ad
  alta velocit per l'accesso Internet/Intranet, utilizzando le linee
  telefoniche esistenti con doppino in rame. Ci permette di funzionare
  su oltre il 60-80%  delle linee telefoniche esistenti negli Stati
  Uniti senza modifiche.  Inoltre, ADSL fornisce velocit vicine a T1
  (1,5 Mbps), molto pi elevate dei modem analogici (56 kbps) o ISDN
  (128 kbps) utilizzabili sulle stesse linee.  Normalmente ADSL  ad un
  livello di costo notevolmente inferiore rispetto agli altri servizi
  digitali dedicati, e dovrebbe essere collocata ad un livello
  intermedio tra i servizi T1 e ISDN (considerando anche l'addebito per
  il traffico ISDN).

  Le Compagnie Telefoniche vedono ADSL come una offerta competitiva nei
  confronti delle compagnie di installazione cavi e fornitura di cable
  modem, per cui da loro ci si aspetta un costo e una configurazione
  favorevole.  Anche se i cable modem sono pubblicizzati con una
  larghezza di banda pari a 10-30 Mbps, essi usano un mezzo di
  comunicazione condiviso con altri utenti sulla stessa linea, per cui
  le prestazioni variano, anche in misura notevole, in funzione del
  carico di traffico e degli altri utenti.


  ADSL  posizionata per le applicazioni per piccoli uffici e casa
  (SOHO) che richiedono accesso ad Internet con elevata velocit.  Pu
  essere usata per interconnettere ad Internet server a larghezza di
  banda ridotta e fornisce un'ottima soluzione per l'accesso per 5-20 PC
  in ufficio.   anche una ottima soluzione per gli utenti Linux che
  vogliono Internet ad alta velocit da casa :-).



  3.3.  Cos' xDSL/DSL?

  Digital Subscriber Line (DSL) fornisce un circuito digitale dedicato
  tra casa vostra e la centrale della compagnia telefonica, utilizzando
  linee telefoniche analogiche. DSL inoltre fornisce un canale separato
  per la conversazione vocale, vale a dire per le chiamate analogiche
  (voce, fax, eccetera) che possono essere effettuate contemporaneamente
  al trasferimento di dati ad alta velocit.  DSL utilizza lo spettro di
  frequenze tra 0 e 4 Khz per la banda analogica, e da 4 Khz a 2,2 Mhz
  per i dati.  xDSL  un acronimo generico per definire una famiglia di
  servizi dedicati, la cui lettera "x" sta a significare:

    ADSL Asymmetric Digital Subscriber Line:     1,5 Mbps-384
     kbps/384-128 kbps

    HDSL High-bit-rate Digital Subscriber Line:  1.5 Mbps/1.5 Mbps  (4
     fili)

    SDSL Single-line Digital Subscriber Line:    1.5 Mbps/1.5 Mbps  (2
     fili)

    VDSL Very high Digital Subscriber Line:      13 Mbps-52 Mbps/1.5
     Mbps- 2.3 Mbps.

    IDSL ISDN Digital Subscriber Line:   128 Kbps/128 Kbps.

    RADSL Rate Adaptive Digital Subscriber Line:  384 Kbps/128 Kbps

    UDSL Universal Digital Subscriber Line:   1.0 Mbps-384 Kbps/384
     Kbps-128 Kbps
     chiamata anche "splitterless" DSL o DSL-Lite, dato che non richiede
     alcun separatore di segnale (splitter).

  dove Xbps/Ybps equivale a X=velocit in ricezione, Y=velocit in
  trasmissione.


  3.4.  Perch cos tante velocit?

  ADSL deve lavorare su linee telefoniche esistenti, progettate 100 anni
  fa e mai pensate per servizi digitali (vedi le risposte alle FAQ per
  maggiori informazioni). Inoltre, ADSL  un servizio nuovo e tutti i
  fornitori cercano il giusto rapporto prezzo/caratteristiche per
  collocarlo adeguatamente sul mercato.

  Per l'utente medio, il modo migliore di pensare la situazione  di
  suddividere le opzioni in tre categorie:

    Residenziale a basse prestazioni

       Gamma di velocit tra 384 Kbps-128 Kbps, asimmetrico


    Residenziale ad elevate prestazioni o utilizzatore finale affari

       Gamma di velcit tra 1.5 Mbps-384 Kbps, asimmetrico


    Server ad elevate prestazioni

       Gamma di velocit tra +2.0 Mbps-1.1 Kbps, simmetrico



  4.  Come funziona

  ADSL  composta da diverse parti (mostrate dalle figure 1 e 2):


    Terminazione di Rete ADSL (ANT) e Scheda Interfaccia di Rete (NIC)

    Configurazione con Splitter o Splitterless

    DSLAM e connessione all'operatore telefonico

    connessione all'ISP



  Figura 1: Diagramma a blocchi ADSL (Splitter POTS)


  <-------Casa/Ufficio--------------->             <---Centrale Telefonica--->
                                 NID
                                -----               -----
  Linea      X-----------Voce--=| S |               | D |
  telefonica                    | P |               | S |=---- Commutatore voce
  a 2 fili                      | L |   Connessione | L |
                                | I |=-------------=| A |
                                | T |   Locale a 2  | M |=---- ISP
  10baseT       ---------- Dati | T |      fili     |   |
  Ethernet  X--=|        |=----=| E |               -----
    o           ----------      | R |
  ATMF            ADSL          -----
  NIC             ANT




  4.1.  CPE: ADSL ANT e NIC

  L'equipaggiamento dal lato utente (Customer Premises Equipment (CPE))
  per ADSL consiste nell'ANT e o la scheda NIC.  La Terminazione di Rete
  ADSL (ANT), mostrata in figura 1,  situata a casa o in ufficio e
  fornisce la connessione IP.  Le ANT sono disponibili in diversi tipi:

    Router ANT con interfaccia 10/100baseT

    Bridge ANT con interfaccia 10/100baseT

    ANT con interfaccia ATMF

    ANT con interfaccia USB

    Scheda integrata ANT/NIC

  In ognuno dei casi, l'ANT/NIC fornisce l'indirizzamento al provider
  Internet.  Ogni Compagnia Telefonica specifica le configurazioni
  consentite.  La configurazione pi desiderabile per un utente Linux 
  l'ANT con interfaccia 10baseT, la pi favorevole nel rapporto
  costo/configurazione. Le altre opzioni richiedono driver speciali che
  attualmente non sono disponibili per Linux.  La brutta notizia  che
  alcuni fornitori consentono l'uso di sole schede ANT/NIC PCI integrate
  che non hanno driver per Linux.

  Attenzione!  Assicuratevi che qualsiasi ANT/NIC di terze parti che
  doveste acquistare sia compatibile con la vostra Compagnia Telefonica.
  Ci sono due codifiche di linea principali per ADSL (CAP, DMT) e
  parecchie opzioni per l'incapsulamento IP. La vostra Compagnia
  Telefonica deve fornirvi una lista di opzioni consentite.

  L'ANT  collegato alla vostra presa telefonica (2 fili), ad uno
  splitter POTS o, nel caso di versione splitterless, direttamente al
  cavo verso la centrale.  La figura 1 illustra il cablaggio con
  splitter POTS, e la figura 2 invece un tipo splitterless.

  Nel mio caso ho ricevuto un ANT Alcatel, che supporta un jack RJ45
  10baseT (cablato come crossover). Prima o poi credo che una scheda NIC
  da alloggiare direttamente nel PC venga resa disponibile.



  Figura 2: diagramma a blocchi ADSL (splitterless)


  <-------Casa/Ufficio-------------->           <-----Centrale telefonica----->
                               SNI
              Filtro            -               -----
  Linea     X-[RJ11]---Voce-----|               | D |
  telefonica                    |               | S |=----- Commutatore voce
  a 2 fili                      |  Connessione  | L |
                                |=-------------=| A |
                                |   Locale a 2  | M |=----- ISP
  10baseT       ---------- Dati |     fili      |   |
  Ethernet  X--=|        |=-----|               -----
    o           ----------
  ATMF            ADSL
  NIC             ANT



  4.2.  Splitter o splitterless

  In un qualche modo, i segnali digitale ed analogico debbono essere
  separati in modo da far funzionare il tutto. Perci  necessario
  piazzare un filtro in un punto del percorso del segnale. Ci sono due
  metodi per fare questo: utilizzare uno splitter POTS o un filtro
  telefonico a jack RJ11.

  Nel metodo con splitter POTS, il filtro viene  posto sul "lato casa"
  dove la linea telefonica  connessa. Lo splitter ha due funzioni. La
  prima  quella di fare da punto di demarcazione che separa l'impianto
  della Compagnia Telefonica da quello di casa. La seconda  quella di
  separare fisicamente il segnale DSL proveniente dalla centrale
  telefonica in un canale dati separato da quello voce. Il canale voce 
  una normale linea telefonica analogica (2 fili), mentre il canale dati
  viene inviato all'ANT. Lo splitter  passivo, non  alimentato da
  corrente, in modo da permettere il funzionamento del canale voce anche
  nel caso di assenza di alimentazione elettrica. Il segnale proveniente
  dalla compagnia telefonica  inviato allo splitter sulla normale linea
  a 2 fili di casa. Lo splitter  ospitato nell'Interfaccia di Rete
  (NID) presente all'esterno dell'edificio.

  Nella configurazione splitterless, mostrata in figura 2, il cavo
  locale esterno  connesso direttamente all'interfaccia di rete
  Subscriber (SNI), la stessa scatola usata oggi a casa vostra.  Ad ogni
  presa della vostra abitazione dove avete collegato un telefono, va
  inserito una speciale presa passante che contiene un filtro avente lo
  scopo di rimuovere il segnale digitale. Questo  chiamato filtro RJ11
  (RJ11  il termine ufficiale per il jack telefonico a 4/6 contatti).
  L'estensione usata per la vostra ANT NON usa un filtro (altrimenti non
  funzionerebbe). Ecco tutto! Va osservato anche che alcuni tipi di ADSL
  a bassa velocit non richiedono filtri RJ11.

  La configurazione splitterless  auspicabile da un punto di vista
  della Compagnia Telefonica, in quanto non devono spostare alcun camion
  per effettuare l'installazione, e permette di offrire ADSL ad un
  prezzo inferiore. Per molti utenti non fa alcuna differenza, infatti
  la grande maggioranza dei telefoni continueranno a funzionare anche
  senza il filtro RJ11. Si sentir soltanto un p di fischi ad alta
  frequenza quando si telefona.  Comunque una simile soluzione non 
  raccomandata perch alcune delle ultime versioni potrebbero
  danneggiare il telefono o avere altri effetti deleteri.


  4.3.  DSLAM

  DSLAM  l'equipaggiamento della centrale telefonica che separa il
  segnale e connette l'utente al commutatore voce e all'ISP. Questo 
  quanto serve conoscere dalla prospettiva dell'utente.

  4.4.  La connessione all'ISP

  Un ISP si connette al DSLAM tramite una connessione ad elevata
  velocit, solitamente ATM su linea T3 (45 Mbps) o OC-3 (155 Mbps).  La
  cosa importante  che un ISP deve "abbonarsi" con la Compagnia
  telefonica per poter fornire questa connessione.


  5.  Richiedere il servizio

  La procedura base  la seguente:

    Controllare se si possiedono i requisiti necessari per ADSL.

    Selezionare una Compagnia Telefonica e un ISP, e verificare i
     servizi offerti.

    Chiamare la Compagnia Telefonica e richiedere il servizio.


  Una volta richiesto il servizio, la Compagnia Telefonica vi dar una
  data limite. Io ho potuto trasmettere l'intero ordine alla Compagnia
  Telefonica con una sola chiamata, e loro si sono poi coordinati con
  l'ISP. Mi  stata fornita una data limite per una settimana dopo, e
  tutto  stato fatto in tempo, senza alcun problema.


  5.1.  Requisiti


    Una scheda di rete NIC appropriata

     Il sistema (PC, stazione di lavoro, router o hub) che verr
     direttamente connesso all'ANT ADSL.


    Connessioni interne

      necessario un cavo interno a 2 o 4 fili dal punto di demarcazione
     (l'impianto di casa vostra) fino al vostro PC. La linea telefonica
     esistente pu essere usata. Comunque questo cavo pu essere
     connesso unicamente all'ANT e non ad altri telefoni o apparecchi. 
     anche possibile incaricare la Compagnia Telefonica o altri per
     farvi installare un nuovo cavo.


    Installazione


     Chi far le connessioni in casa vostra?  Potete connettere lo
     splitter da soli (la mia Compagnia Telefonica fornisce una scatola
     di montaggio con istruzioni per eseguire il tutto) o potete
     incaricarli dietro pagamento di una somma ulteriore.  Potete
     risparmiare circa $ 150-250 facendolo da soli, come ho fatto io,
     oppure pararvi il fondoschiena e farlo fare da loro.  Potete
     decidere il da farsi dopo aver letto la procedura che ho incluso in
     questo documento. La discriminante pu essere che se sapete
     trafficare con i procedimenti di connessione delle linee
     telefoniche e/o delle reti LAN sentendovi a vostro agio, potete
     tranquillamente considerare di farlo. Se non avete queste
     competenze e la vostra compagnia pagher per farlo, lasciateglielo
     fare.



  5.2.  Opzioni della Compagnia Telefonica


    Doppino in rame qualificato

     La Compagnia Telefonica normalmente collauder la vostra linea
     prima dell'ordine del servizio per controllare se  in grado di
     essere percorsa dal segnale ADSL. Dovete trovarvi entro 2-3 miglia
     (11-16 mila piedi, pari a 4-5 km N.d.T.) dalla centrale telefonica
     ed avere un doppino che non presenti avvolgimenti, bridge tap, DAML
     o altri impedimenti.  Molti dei doppini in grado di supportare ISDN
     possono utilizzare anche ADSL, ma dato che ADSL stessa  pi
     restrittiva non vi  garanzia di successo. La vostra Compagnia
     Telefonica vi aiuter in questo.


    ADSL disponibile dalla vostra Compagnia Telefonica

     La centrale telefonica  provvista delle attrezzature ADSL/DSLAM?
     Sar la vostra Compagnia Telefonica ad accertarsene se disponibile
     nella vostra zona.  Tutte le maggiori Compagnie Telefoniche degli
     USA, e molti nuovi fornitori di accesso ADSL, hanno annunciato
     pianificazioni per ADSL. Mi aspetto un ampio sviluppo per il 1999.


    Banda disponibile

     Il costo di ADSL  in funzione della banda disponibile -
     Controllate presso la vostra Compagnia Telefonica. Solitamente 
     possibile ordinare una combinazione di velocit 128 k, 256 k, 384 k
     o 1.5 M.  Il vostro doppino pu limitare la banda disponibile. La
     mia Compagnia Telefonica inoltre ha canoni diversi a seconda che si
     sia un cliente residenziale o affari.


    Servizio tradizionale (POTS)

     Alcuni fornitori (solitamente le grandi Compagnie Telefoniche)
     offrono il servizio tradizionale insieme ad ADSL. Se scegliete
     questa opzione dovrete specificare a quale numero di telefono
     (nuovo o vecchio) vorrete assegnarla.  Dovrete decidere se volete
     ADSL su una linea tradizionale gi esistente o se volete un nuovo
     numero per la linea analogica. Se avete una linea ISDN e volete
     utilizzarla ugualmente, dovrete prima disconnettere il servizio
     ISDN. Notate che alcune Compagnie Telefoniche (solitamente
     fornitori del solo servizio DSL) non offrono questa possibilit.



  5.3.  Opzioni dell'ISP


    Preabbonamento dell'ISP

     Il vostro ISP deve gi essere collegato alla vostra Compagnia
     Telefonica. Controllate presso di loro che sia effettivamente cos.
     Se non sono collegati dovrete cercare di convincerli a farlo, di
     cambiare provider oppure di rinunciare ad ADSL.


    Sottorete IP ed indirizzi.

     Prima di tutto dovete sapere che tipo di indirizzamento IP vi verr
     fornito, se dinamico o statico. L'indirizzamento dinamico viene
     ottenuto tramite DHCP.

     Inoltre, per l'indirizzamento statico, gli ISP permetteranno di
     assegnare ad una linea ADSL da 1 a 254 indirizzi IP, con la
     corrispondente maschera di sottorete a lunghezza variabile (VLSM).


     Il mio ISP addebita una cifra maggiore se si richiedono pi host.
     Sospetto che la maggior parte delle applicazioni useranno o 1 host
     (maschera a 32 bit) o 6 (maschera a 29 bit).  Se ci vi confonde
     leggete IP-Subnetting HOWTO.  Inoltre ricordate che le sottoreti
     multi-host richiedono che uno degli host sia l'indirizzo di routing
     dell'ISP (vale a dire che della sottorete di 6 host solo 5 sono
     realmente vostri) e che voi possiate usare la mascheratura degli IP
     o la traduzione degli indirizzi di rete (NAT) per poter supportare
     un maggior numero di indirizzi sulla vostra LAN. Se richiedete pi
     di 30 host preparatevi a compilare un modulo di specifica richiesta
     con le motivazioni per il vostro ISP.


    Indirizzo del gateway

     L'indirizzo del gateway di default. Normalmente  il primo
     indirizzo di host della vostra sottorete (per esempio se le vostre
     sottorete e maschera comprendono gli IP 192.168.1.240/29, la vostra
     gamma di host  dal .241 al .246, con il gateway di default
     assegnato al .241.


    Numero di indirizzi MAC

     L'ANT pu supportare un determinato numero di indirizzi MAC per il
     bridging. Per esempio, l'ANT ADSL che uso  limitata a 16
     indirizzi. Ci sar comunque sufficiente per la maggior parte delle
     applicazioni.  Comunque, se dovete supportare direttamente un gran
     numero di macchine dall'hub collegato all'ANT  necessario
     verificare questo limite.


    I server DNS

     L'ISP deve fornirvene uno o anche pi.  I server DNS indirizzano
     per supportare la ricerca dei nomi di dominio.  Alcuni ISP inoltre
     forniscono l'hosting per i Domain Name Server per voi, siano essi
     primari o secondari, come parte integrante del pacchetto di servizi
     dedicati. Consultate il vostro ISP per maggiori dettagli.


    Identificativo utente e password

     L'ISP vi fornir normalmente una combinazione di nome
     utente/password per l'accesso alla shell, alla posta, eccetera.  Il
     mio ISP fornisce inoltre spazio web, server di posta ed altri
     servizi.



  6.  Le connessioni

  Se avete richiesto alla vostra Compagnia di occuparsene potete saltare
  questa sezione ed andare direttamente alla configurazione di Linux.
  Le procedure seguenti hanno lo scopo di illustrare le fasi della
  connessione dei cavi. Tenete conto che nel vostro specifico caso
  potrebbero essere diverse. Assicuratevi di seguire scrupolosamente
  ogni avvertenza o istruzioni di sicurezza fornite e di essere
  familiari con le procedure di connessione di apparati telefonici.

  Il primo passo  quello di connettere i fili che arrivano dalla
  Compagnia Telefonica. Identificate la linea sulla quale il servizio
  andr installato e l'ubicazione del vostro splitter e delle prese DSL.

  6.1.  Connettere lo splitter/NID (allo SNI)

  Se la vostra configurazione  del tipo splitterless potete saltare
  questa sezione.

  Lo splitter consiste di due parti, lo splitter vero e proprio e una
  piccola scatola esterna, chiamata NID, dispositivo di interfaccia di
  rete. Montate lo splitter e il NID seguendo le istruzioni fornite
  dalla compagnia allo SNI, solitamente il punto a cui accedete alla
  linea telefonica. Dato che per la manutenzione da parte della
  compagnia  necessario che sia facilmente accessibile, montatelo
  all'esterno.  Connettete la linea a due fili in entrata al lato dello
  splitter contrassegnato con "LINE". Indi collegate il vostro telefono
  a "VOICE" e il cavo che andr all'ANT a "DATA".

  Controllo A questo punto dovreste essere in grado di sentire il tono
  di centrale dal telefono collegato allo splitter. Se non  cos avete
  collegato il tutto in maniera sbagliata oppure la vostra Compagnia non
  vi ha ancora abilitato al servizio ADSL.


  6.2.  Collegare la presa ADSL (al computer)

  Collegate lo spinotto RJ11 dal lato computer (connettere al lato DATA
  dello splitter). Le specifiche variano anche di molto in funzione
  della situazione particolare, ma normalmente dovreste avere una coppia
  di 2 fili che vi far collegare allo spinotto ADSL. Assicuratevi di
  leggere le istruzioni, dato che lo spinotto DSL RJ11  differente tra
  quello normale telefonico e quello ADSL. Nel mio caso, ho dovuto
  collegare la coppia di fili verde/rosso (i fili centrali dello
  spinotto RJ11) dal lato telefono, mentre dal lato ADSL la coppia
  giallo/nero (i fili esterni dello spinotto).


  6.3.  Installare l'ANT

  Collegate il cavo di alimentazione dell'ANT e la linea telefonica (con
  cavo di categoria 3) tra lo spinotto DSL e l'ANT. Normalmente il cavo
   fornito a corredo.


  Controllo A questo punto, verificate la sincronizzazione dell'ANT con
  il segnale della Compagnia Telefonica.  La maggioranza degli ANT hanno
  un led verde che resta acceso quando il segnale  buono. Se non
  avviene la sincronizzazione, controllate il cablaggio, o assicuratevi
  che il segnale proveniente dalla Compagnia telefonica sia presente
  (per farlo chiamatela e verificate che vi abbiano attivato il
  servizio. La presenza del tono di centrale NON conferma la
  funzionalit del segnale dati ADSL).

  Se avete completato con successo i passi precedenti, siete ora pronti
  per collegare il vostro sistema Linux.


  7.  Configurare Linux

  Dopo aver collegato l'ANT ed avere ricevuto il segnale di sincronismo,
  siete pronti per configurare il vostro sistema Linux e verificare la
  connessione con il vostro ISP. Anche se mi riferisco ad un sistema
  Linux ben preciso, voi potete collegare qualsiasi tipo di dispositivo
  10baseT all'ANT. Ci comprende router, hub, pc o qualsiasi altro tipo
  di sistema vogliate usare.

  Attenzione! prima di connettervi al vostro ISP assicuratevi di avere
  capito tutte le problematiche relative alla sicurezza di una
  connessione diretta ad Internet via ADSL.  In funzione al vostro ISP,
  la maggioranza degli utenti esterni potranno accedere al vostro
  sistema, per cui dovrete installare un firewall, disattivare
  porte/servizi e installare password prima di connettere la vostra
  macchina al mondo esterno. Leggete il Security-HOWTO se avete bisogno
  di una buona panoramica sul tema.


  7.1.  Installare e collegare la scheda interfaccia di rete (NIC)

  Installare la scheda NIC nella vostra macchina Linux, configurare il
  kernel, eccetera. Consultate la documentazione Linux disponibile sul
  tema e in particolare l'Ethernet-HOWTO per maggiori informazioni.

  Collegate il cavo RJ45 tra la scheda NIC e l'ANT.  Nota Alcuni ANT
  sono gi cablati come crossover 10baseT e richiedono un cavo diretto
  di categoria 5 per essere collegati alla scheda, invece di un cavo
  crossover. Ci ho impiegato circa 12 ore per capirlo... non fate lo
  stesso errore, leggete prima le istruzioni.
  7.2.  Configurare l'interfaccia Ethernet

  Configurate l'indirizzo IP, la maschera di sottorete, il gateway di
  default e il server DNS. ogni distribuzione Linux (RH, Debian,
  Slackware, S.U.S.E.) ha modalit differenti per farlo, per cui
  consultatene le relative procedure.  Potete fare il tutto anche
  manualmente tramite i comandi ifconfig e route. Consultate il
  NET3-HOWTO per maggiori informazioni.

  Una volta configurato il vostro sistema, provate a vedere se riuscite
  a fare un ping al vostro indirizzo gateway di default fornito dal
  vostro ISP. Se vedete un ritardo di circa 20 ms allora ci significa
  che  tutto a posto. Congratulazioni, siete sulla Rete!


  7.3.  Configurazione di un router

  A seconda della vostra configurazione locale, bisogna considerare
  altri aspetti.  In questi c' la configurazione del firewall ed ogni
  altra configurazione associata. La mia  in figura 3.  Io uso una
  vecchia macchina i486 configurata come firewall/router tra la
  connessione ADSL e il resto delle mie macchine. Uso indirizzi IP
  privati sulla mia sottorete LAN ed ho configurato il mio router per
  fornire IP Masquerading e firewalling tra la LAN e Internet.
  Consultate l'IP_Masquerading-HOWTO e il Firewall-HOWTO  per maggiori
  dettagli.  La mia esperienza mi fa pensare che Linux fornisce migliori
  prestazioni in termini di routing e firewalling ed  pi economico di
  un router commerciale, specie se riuscite a trovare un vecchio 386/486
  da usare a tale scopo.



  Figura 3: La mia rete di casa



  <-Sottorete privata->      <Sottorete Pubblica>  <-Linea ADSL-------->
                                       |
                                  X----|
                                       |
       X------|                   X----|     |----|
              |      |--------|        |     |ADSL|            Router
              |      | Sistema|        |-----|ANT |----------> Fornitore
       X------|------| Linux  |--------|     |    |            Accesso
              |    E1|(Router)|E0      |     |----|            Internet
              |      |--------|        |
       X------|        IP_Masq       Hub
                     IP_Firewall    10TaseT




  Quel che ho fatto  stato di installare un router (Linux RH 5.0 su un
  i486) con due interfacce Ethernet.  Un'interfaccia si connette al
  gateway/sottorete dell'ISP, mentre l'altra supporta un'indirizzo di
  rete di classe privata (p. es. 192.168.2.x). Usare gli indirizzi di
  rete privati dietro il vostro router consente una maggior sicurezza in
  quanto non direttamente indirizzabili dal di fuori.  Dovete
  esplicitamente mascherare i vostri indirizzi privati di rete per
  potervi connettere ad Internet.

  Attenzione Assicuratevi che il vostro kernel sia compilato con l'IP
  forwarding  che questo sia attivato. Potete controllarlo digitando

  cat /proc/sys/net/ipv4/ip_forward

  Il valore  "1" se attivo, "0" se disattivato.  Potete modificarlo
  semplicemente inviando con echo il valore desiderato a questo file

  (es.) echo 1 > /proc/sys/net/ipv4/ip_forward


  per attivarlo.


  7.4.  Installare un firewall

  Se avete una connessione diretta ad Internet dovrete abilitare anche
  l'amministrazione del firewall e il masquerading.  La figura 4 mostra
  come fare.

  Attenzione!   Mi vedo costretto a puntualizzare che questa
  configurazione  solo una parte delle operazioni necessarie per creare
  un ambiente sicuro. Va considerato anche di chiudere servizi come ftp,
  telnet e altri sul router, ed assicurarsi che le configurazioni di
  password, login, eccetera siano correttamente effettuate sul vostro
  sistema.  Leggete il Security-HOWTO.

  Figura 4: Firewall/Masquerading per ADSL

         |-------|       |-------|     |-X
  ======X| ADSL  |=------| Linux |-----|
  Linea  |  ANT  |     E0|       |E1   |-X   Rete privata
  ADSL   |-------|       |-------|     |     (es. 192.168.2.x)
                 <------->             |...
               Sottorete ISP o host
          (indirizzi di rete pubblici)



  Il kernel del router Linux viene compilato per l'IP
  forwarding/masquerading e ha "ipfwadm" (software per il firewall IP)
  installato con le seguenti opzioni:

  file: /etc/rc.d/rc.firewall  (chiamato da rc.sysinit in RH5.0)



























  echo "Setting up the firewall"
  #
  # Dal "Firewall-HOWTO"
  #
  # azzera la configurazione attuale
  #
  ipfwadm -F -f
  #
  #
  # configura il firewall
  #
  ipfwadm -F -p deny
  #
  # consenti di mascherare ogni macchina con indirizzo 192.168.2.x
  #
  ipfwadm -F -a accept -m -S 192.168.2.0/24 -D 0.0.0.0/0
  #
  # consenti di far funzionare il domain name server (udp 53)
  #
  ipfwadm -F -a accept -b -P udp -S 0.0.0.0/0 53 -D 192.168.2.0/24
  ipfwadm -F -p masquerade
  #
  # il resto lista solo le opzioni per il vostro divertimento
  #
  ipfwadm -F -l
  ipfwadm -O -l
  ipfwadm -I -l


   necessario prestare attenzione in quanto alcune applicazioni non
  funzioneranno ancora se non provviste di moduli speciali (per esempio
  ftp, real audio e alcune altre). Controllate la documentazione di
  ipfwadm per maggiori dettagli. Io l'ho trovato molto facile da config
  urare.

  Inoltre, utilizzare lo schema di rete privata di indirizzamento 
  molto economico e d all'amministratore di sistema una completa
  flessibilit nella configurazione della LAN. Lo svantaggio  che il
  masquerading ha un limite nel numero degli host privati che pu
  ragionevolmente supportare, e che alcune applicazioni IP che passano
  l'indirizzo di host nel loro campo dati non funzioneranno, ma queste
  ultime tendono ad essere ormai un numero limitato.



  8.  Appendice

  8.1.  FAQ

  Questa  la sezione dedicata alle Frequently Asked Question (FAQ,
  domande frequentemente poste) su ADSL.


  1. D: Ci sono standard per ADSL?

     A: Una specie. Le compagnie statunitensi Bell si sono
     standardizzate su ANT Discrete Multi-Tono (DMT, ANSI T1.413). La
     maggioranza delle altre seguiranno il loro esempio. Ci sono altri
     tipi di ANT, i pi notevoli quelli a Carrier-less Amplitude Phase
     Modulation (CAP), che sono chiaramente incompatibili a vicenda.

     Una comparazione bilanciata a tale proposito redatta da un
     venditore di apparati DMT pu essere rintracciata all'url Aware
     <http://www.aware.com>.  Essa fornisce ancora i migliori  dettagli
     sull'argomento che abbia mai trovato.

     Una copia, piuttosto costosa, dello standard ANSI pu essere
     ordinata presso: American National Standards Institute ANSI Home
     Page <http://www.ansi.org>
     Asymmetric Digital Subscriber Line (ADSL) Metallic Interface
     ANSI TI.413-1995
     Nota: l'edizione 2 della normativa ANSI TI.413  uscita il 26
     settembre, 1997


  2. D: Posso usare ATM per connettermi all'ANT ADSL?

     R: Certo che si pu! Alcuni ANT ADSL (quantomeno la versione
     Alcatel) hanno un'interfaccia ATM Forum 25 Mbps, per poter essere
     collegata ad una scheda NIC PCI. Tuttavia non ho ancora avuto
     conoscenza di qualsiasi tipo di driver Linux per queste schede.


  3. D: Perch ADSL ha tutte queste velocit diverse
     (384/1.5/8M/20M/ecc.)?

     R: Il problema che sta alla base  il disegno centenario del
     doppino di rame. Funziona egregiamente per il telefono analogico,
     ma  una autentica sfida per il segnale digitale. Ricordate che la
     lunghezza di un doppino  inversamente proporzionale alla velocit
     di trasmissione dati che pu supportare.  Le tecnologie rate-
     adaptive sono eccellenti per avere un segnale digitale in molte
     situazioni, ma non possono fornire una banda passante consistente
     in tutte le situazioni, specialmente per doppini molto lunghi
     (oltre 35 km). Le diverse larghezze di banda che vedete
     pubblicizzate riflettono le molteplici guerre di mercato dei
     fabbricanti di attrezzatura, e la lotta tra le compagnie di
     telecomunicazione per finalizzare uno standard di velocit.  Penso
     che 384k/1.5Mbps diverr lo standard attuale.  Le velocit elevate
     saranno disponibili solo per situazioni e/o applicazioni
     particolari dato che potranno essere fornite solo su una piccola
     percentuale dei doppini disponibili.

     Inoltre controllate la seguente domanda sugli intaccamenti dei
     doppini che causano questi inconvenienti.


  4. D:  Cosa sono tutti questi intaccamenti dei doppini (bridged taps,
     bobine di carico) che possono impedire l'utilizzo di ADSL con la
     mia linea (grazie a Bruce Ediger)?

     Bobine di carico:  induttanze sulla linea che modificano le
     caratteristiche trasmissive voce-frequenza di un circuito
     telefonico. Essenzialmente una bobina ruba energia alle frequenze
     pi elevate e la d alle frequenze pi basse. Tipicamente usato
     solo su lunghe (oltre 18 km) linee telefoniche.

     Nelle vecchie abitazioni, gli allacciamenti telefonici venivano
     spesso usati da pi di una utenza (duplex, N.d.T.). Spesso inoltre
     ogni utenza aveva un indirizzo diverso (anche se vicini). La parte
     non connessa dell'allacciamento viene definita "bridged tab" sul
     circuito al momento connesso.

     Trasporti su doppini digitali: ci sono diversi sistemi per
     trasportare pi di una trasmissione voce su un singolo doppino. Si
     possono spostare in su o in gi le frequenze, o digitalizzare la
     trasmissione voce e dividere il circuito telefonico per tempo o
     codie o qualcosa di simile. Il termine generale  "pair gain".

     Tutto questo pu causare diversi problemi per le trasmissioni ad
     alta frequenza.

     Le bobine di carico possono completamente confondere le cose
     filtrando le frequenze elevate e lasciando passare quelle basse.
     Inoltre potrebbero indurre una specie di ritardo del segnale,
     facendo arrivare alcune frequenze prima di altre. I toni di un byte
     interferirebbero col byte successivo.

     II bridged tap agiscono come capacit di shunt se sono lunghi in
     relazione alla lunghezza d'onda del segnale, e come filtro di banda
     se ne sono invece circa 1/4. Vale a dire che fanno passare
     liberamente particolari frequenze. Toni particolari propri di un
     modem DMT possono essere rispediti indietro invece di essere
     trasmessi verso il modem ricevente, riducendo l'ampiezza di banda
     passante disponibile per questa linea.

     Il Pair gain, digitale o analogico, limita l'ampiezza di banda
     passante disponibile per una trasmissione multiplexandone diverse
     su un cavo solo. I toni alti e bassi di un modem DMT vengono
     filtrati dall'apparato.

     Il libro "Subscriber Loop Signaling and Transmission Handbook", di
     Whitham D. Reeve, IEEE Press 1992, ISBN 0-87942-274-2 illustra
     queste caratteristiche di una linea telefonica. Tuttavia 
     piuttosto costoso.


  5. D: Hai esempi di ANT ADSL?

     R: In breve: S. Risposta reale: L'evoluzione di questa tecnologia
      troppo rapida per poter essere mantenuta aggiornata in un HOWTO.
     Un'ottima fonte degli ANT ADSL  ADSL Forum Home Page
     <http://www.adsl.com>.  Andate a vedere la pagina dei Rivenditori
     per sapere ci che succede.

     Tuttavia, ecco una lista di alcune delle tecnologie attuali al
     giugno 1998.


    Router ANT con interfaccia 10/100baseT

     Esempi: Flowpoint 2000 DSL (CAP), Netspeed Speedrunner 202 (CAP),
     Speedrunner 204 (CAP), 3COM Viper-DSL (CAP), StarNet Ezlink 500/100
     (DMT), Westell ATU-R-Flexcap (CAP), Aware x200


    Bridge ANT con interfaccia 10/100baseT

     Esempi: Alcatel A1000 (DMT),  Westell ATU-R-Flexcap2 (CAP)


    ANT con interfaccia ATMF

     Esempi: Alcatel A1000 (DMT), Netspeed Speedrunner 203 (CAP), Ariel
     Horizon II


    Bridge ANT con interfaccia seriale V.35 (T1, Router seriale)

     Esempi: Westell ATU-R


    ANT con interfaccia USB

     Voci di un possibile prodotto di Intel.



    Schede integrate ANT/NIC

     Esempi: Netspeed PCI Runner (CAP), Efficient Networks Speedstream
     3020 (DMT)

     Queste NON sono  approvazioni per i prodotti suindicati, ma sono
     solo forniti per esemplificazione. ;-)



  8.2.  Link


    ADSL Forum Home Page <http://www.adsl.com> Pacific Bell  la
     compagnia telefonica locale e il mio fornitore del servizio ADSL


    Jeremie's Unofficial Ameritech ADSL FAQ
     <http://www.rc.lsa.umich.edu/~jeremie/adsl/>


    Telechoice xDSL News Page
     <http://www.telechoice.com/xdslnewz/indexDSL.cgi>


    ADSL Deployment 'round the World
     <http://www.geocities.com/Paris/Metro/5013/adsl.html> Si propone
     come lista completa - sembra accurata per la mia zona - fornisce
     provider, prezzi, velocit, eccetera.


    Bell Atlantic ADSL Home Page <http://www.bell-atl.com/adsl>


    comp.dcom.xdsl FAQ <http://homepage.interaccess.com/~jkristof/xdsl-
     faq.txt>



  8.3.  Ringraziamenti

  Grazie a tutti coloro hanno fornito informazioni per questo HOWTO.  Ho
  protetto il loro indirizzo con un antispam per la loro (e mia!)
  sicurezza. Rimuovere la X dal loro indirizzo


    B Ediger (Xbediger@csn.net) Ottima descrizione dei problemi dei
     doppini.

    C Wiesner (Xcraig@wkmn.com)  Elenchi di molti URL su ADSL.

    J Leeuw (Xjacco2@dds.nl) Molti consigli su ADSL, specialmente in
     Europa.

    J Kass (Xjeremie@umich.edu) Unofficial Ameritech ASDL FAQ

    N Silberstein ( Xnick@tpdinc.com) Informazioni su Netrunner e la
     sua esperienza con US Worst.




  8.4.  Glossario

  Un dizionario di parte del gergo utilizzato in questa FAQ.

     Connessione a 2 fili di rame
        Il doppino telefonico che parte dalla centrale telefonica e
        arriva in casa del cliente.


     ADSL
        Asymmetric Digital Subscriber Line

     ANT
        Terminazione di rete ADSL Network Termination (vale a dire il
        modem ADSL)


     ATM
        Asynchronous Transfer Mode - fornisce una commutazione a
        pacchetto ad alta velocit da 155 Mbps a (attualmente) 2 Gbps.
        Impiegata per la commutazione dei backbone per Internet.


     ATMF-25Mbps
        Interfaccia ATM Forum - Velocit 25Mbps, fornita da una Scheda
        di Interfaccia di Rete PCI. Una delle interfacce presenti tra
        ANT e PC.


     Centrale
        Solitamente si riferisce ad una di questi due significati: 1)
        l'edificio della compagnia telefonica che alloggia gli apparati
        telefonici 2) il commutatore voce della compagnia telefonica che
        d il tono di centrale.


     CPE
        Customer Premises Equipment - termine tecnico per definire
        l'apparecchiatura dal lato utente (vale a dire il materiale la
        cui installazione  di vostra competenza).  Ad esempio CSU/DSU,
        modem, ANT e il vostro telefono.


     DHCP
        Dynamic Host Configuration Protocol - Il protocollo IP
        utilizzato per assegnare dinamicamente un indirizzo IP.


     DS0
        Il circuito digitale base delle compagnie telefoniche, offerto a
        56 o 64 Kbps. Supporta un solo canale vocale analogico.


     DSLAM
        Digital Subscriber Line Access Multiplexer - L'equipaggiamento
        della compagnia telefonica che concentra e fa funzionare in
        multiplexing le linee DSL.


     xDSL
        Digital Subscriber Line - Termine che descrive una famiglia di
        servizi DSL, comprendente ADSL, SDSL, VDSL, ecc.


     HDC
        vedi Sezione 2


     ISDN
        Innovations Subscribers Don't Need; I Still Don't Know o forse
        Integrated Services Digital Network, un servizio telefonico
        digitale che utilizza una singola coppia di fili di rame per 2
        canali B (64 Kbps) + 1 D (16 Kbps) per voce commutata o dati.


     ISP
        Internet Service Provider


     NID
        Network Interface Device -  Dispositivo di Interfaccia di rete -
        L'alloggiamento che protegge lo splitter ADSL dagli elementi.


     NIC
        Network Interface Card - Scheda di Interfaccia di Rete - Una
        scheda PC (PCI/ISA) che supporta l'interfaccia di rete
        richiesta.  Solitamente una scheda Ethernet 10baseT o ATMF-25
        Mbps.


     POTS
        Plain Old Telephone Service - Il servizio che fornisce una linea
        singola voce analogica (la vostra linea telefonica).


     SNI
        Subscriber Network Interface - Il termine utilizzato dalle
        compagnie telefoniche per descrivere la cablatura dei telefoni a
        in casa vostra. Designa il punto tra l'impianto della compagnia
        e la cablatura interna. Chiamato anche Punto di Demarcazione.


     Splitter
        Dispositivo passivo (filtro a bassa banda passante) connesso al
        Punto di Demarcazione (SNI) per separare dal segnale ADSL i
        canali voce e dati.


     Splitterless
        Installazione ADSL che non richiede uno splitter. Per le
        velocit pi elevate, un filtro RJ11 viene posto su ogni presa
        telefonica installata, filtrando il segnale sul jack piuttosto
        che all'Interfaccia di rete.  Non serve alcun filtro per le
        velocit pi basse.


     SOHO
        Small Office HOme  - Piccoli uffici/Casa


     T1 a.k.a DS1 - Linea digitale dedicata a 1.544 Mbps, utilizzata sia
        per le comunicazioni voce (24 DS0) sia per i dati.


     T3 a.k.a DS3 - Linea digitale dedicata a 44.736 Mbps, utilizzata
        sia per le comunicazioni voce (672 DS0 o 28 DS1) sia per i dati.









  Linux ADSM Mini-Howto
  di Thomas Knig, Thomas.Koenig@ciw.uni-karlsruhe.de
  $Date: 1997/01/15 20:36:34 $

  Questo documento descrive l'installazione e l'uso di un client per il
  sistema di backup commerciale ADSM per Linux/i386.

  1.  Introduzione

  ADSM  un sistema di baskup basato sulla rete, venduto dalla IBM ed
  usato in molte organizzazioni. Esistono client per una grande variet
  di sistemi (vari tipi di UNIX, Windows, Novell, Mac, Windows NT).
  Sofrtunatamente, nel momento in cui sto scrivendo, non esiste una
  versione nativa per Linux.

  Per usare ADSM dovrete usare il binario SCO, ed installare l'emulatore
  iBCS2. La descrizione che segue  valida per ADSM v2r1.

  Nel momento in cui sto scrivendo, che io sappia esiste solo una
  versione che funziona con la versione i386 di Linux.

  2.  Installazione del modulo iBCS2

  Il modulo iBCS2  disponibile su
  ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2.  Se usate il kernel 1.2.13,
  scaricate ibcs-1.2-950721.tar.gz, spacchettatelo ed applicate le patch
  ibcs-1.2-950808.patch1 e ibcs-1.2-950828.patch2.  Potete poi digitare
  "make" ed installare il modulo iBCS2 con "insmod".

  Per i kernel 2.0, scaricate ibcs-2.0-960610.tar.gz, spacchettatelo in
  una directory adatta, fate chdir in quella directory ed applicate
  questa patch:


  --- iBCSemul/ipc.c.orig Wed Jan 15 21:32:15 1997
  +++ iBCSemul/ipc.c      Wed Jan 15 21:32:31 1997
  @@ -212,7 +212,7 @@
          switch (command) {
                  case U_SEMCTL:
                          cmd = ibcs_sem_trans(arg3);
  -                       arg4 = (union semun *)get_syscall_parameter (regs, 4);
  +                       arg4 = (union semun *)(((unsigned long *) regs->esp) + (5));
                          is_p = (struct ibcs_semid_ds *)get_fs_long(arg4->buf);
   #ifdef IBCS_TRACE
                          if ((ibcs_trace & TRACE_API) || ibcs_func_p->trace)


  Poi, copiate CONFIG.i386 in CONFIG, e digitate make.

  Se non li avete ancora, create i file di device necessari eseguendo

  # cd /dev
  # ln -s null XOR
  # ln -s null X0R
  # mknod socksys c 30 0
  # mknod spx c 30 1



  3.  Installazione del client ADSM

  Il file binario SCO  distribuito sotto forma di tre file tar o tre
  dischi. Spostatevi nella directory di root, impostate gli umask a
  seconda delle vostre preferenze e spacchettatele da l (come root).
  Nella directory /tmp troverete uno script di installazione;
  eseguitelo.
  Dovrete quindi modificare a mano /usr/adsm/dsm.sys and
  /usr/adsm/dsm.opt.  In dsm.sys, le linee importanti da specificare
  sono:

     Servername
        Il nome del server

     TCPServeraddress
        L'hostname del server completo di dominio

     NODename
        Il vostro hostname

  In dsm.opt, dovrete specificare

     Server
        Come sopra

     Followsymbolic
        Se seguire o no i link simbolici (in generale non  una buona
        idea)

     SUbdir
        Se fare o no il backup delle sottodirectory (in genere vorrete
        farlo)

     domain
        I filesystem di cui fare il backup

  Dovrete poi creare un /etc/mnttab SCO-compatibile. Per farlo potete
  usare il seguente script Perl, fstab2mntab.


       ______________________________________________________________________
       #!/usr/bin/perl

       $mnttab_struct = "a32 a32 I L";

       open(MTAB, "/etc/mtab") || die "Non posso aprire /etc/mtab: $!\n";
       open(MNTTAB, ">/etc/mnttab") || die "Non posso aprire /etc/mnttab: $!\n";

       while(<MTAB>) {
           next if /pid/;
           chop;
           /^(\S*)\s(\S*)\s(\S*)\s.*$/;
           $device = $1;
           $mountpt = $2;
           $fstype = $3;
           if($fstype ne "nfs" && $fstype ne "proc") {
               $mnttab_rec =
                   pack($mnttab_struct, $device, $mountpt, 0x9d2f, time());
               syswrite(MNTTAB, $mnttab_rec, 72);
               print "Made entry for: $device $mountpt $fstype\n";
           }
       }

       close(MNTTAB);
       exit 0;
       ______________________________________________________________________




  Per usare questi client non avete bisogno di installare librerie con
  divise; sono linkate tutte staticamente.

  4.  Far girare il client

  Esistono due client, dsm, che ha un'interfaccia X11, e dsmc, che
  lavora da linea di comando. Il vostro centro di computer vi dir come
  farlo girare. Ci sar probabilmente bisogno di qualche script
  all'avvio, come ad esempio

  dsmc schedule -quiet 2>&1 >/dev/null &



  5.  Problemi noti

  Sfortunatamente, SCO pu trattare solo hostname non pi lunghi di otto
  caratteri. Se il vostro hostname  pi lungo, o se specificate il
  dominio completo, dovrete specificare l'hostname nella linea NODename
  line in /usr/adsm/dsm.sys.

  Se usate la variabile DISPLAY, dovrete dare l'hostname completo (ad
  esempio DISPLAY=host.full.do.main:0 invece di DISPLAY=host:0).














































  Linux Advocacy mini-HOWTO
  Paul L. Rogers, Paul.L.Rogers@li.org

  v0.5, 7 Maggio 1998

  Questo documento fornisce suggerimenti su come promuovere efficace
  mente l'uso e la diffusione di Linux.


  1.

  A proposito di questo documento

  Questo  il Linux Advocacy mini-HOWTO ed  un documento volto a
  fornire delle linee guida e delle idee per assistere il vostro
  supporto a Linux.

  Questo mini-HOWTO  stato suggerito da Jon ``maddog'' Hall rispondendo
  alla richiesta di un parere per una guida di riferimento per
  pubblicizzare Linux durante i lavori di NetDay
  <http://www.netday.com>.  Egli valut positivamente la guida e osserv
  che le norme che conteneva erano alla base di "canoni di
  comportamento" che certamente serebbe andati a beneficio della
  comunit di Linux.

  Questo documento  disponibile in formato HTML a
  http://www.datasync.com/~rogerspl/Advocacy-HOWTO.html.

  Nat Makarevitch <nat@nataa.fr.eu.org> ha tradotto questo documento in
  Francese <http://www.linux-france.com/article/advocacy/Advocacy-
  HOWTO_fr.html>.

  Chie Nakatani <jeanne@mbox.kyoto-inet.or.jp> ha tradotto questo
  documento in Giapponese <http://jf.gee.kyoto-u.ac.jp/JF/JF-
  ftp/euc/Advocacy.euc>.

  Janusz Batko <janus@krakow.linux.org.pl> ha tradotto questo documento
  in Polacco <http://www.jtz.org.pl/Html/mini/Advocacy.pl.html>.

  Bruno H. Collovini <buick@microlink.com.br> ha tradotto questo
  documento in Portoghese
  <http://www.microlink.com.br/~buick/dragons/op1/minihowtos/br-
  advocacy.html>.

  Mauricio Rivera Pineda <rmrivera@hotmail.com> ha tradotto questo
  documento in Spagnolo
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/es/mini/Advocacy-
  Mini-Como.gz>.

  L'autore e maintainer di questo Linux Advocacy mini-HOWTO  Paul L.
  Rogers <Paul.L.Rogers@li.org>.

  Osservazioni e proposte sono le benvenute.

  Se volete saperne di pi a proposito del Linux Documentation Project o
  a proposito dei Linux HOWTO, contattate liberamente il supervisore del
  progetto Tim Bynum <linux-howto@sunsite.unc.edu>.  Tim Bynum invier
  mensilmente questo documento a molti newsgroup nazionali ed
  internazionali.

  Nota personale dell'autore: A causa di varie circostanze, non ho
  pututo dedicare tempo sufficiente al mantenimento di questo mini-HOWTO
  e ad interagire con la comunit Linux quanto avrei voluto. Chiedo
  scusa per questo e per la mia scarsa disponibilit e lentezza a
  rispondere a chi ha cercato di contattarmi. Anche se tuttora ho molti
  altri impegni, anticipo per che questi cominceranno a mi richiederemi
  molto meno tempo in futuro e mi permetteranno di ridare spazio ad
  altre attivit.

  Apprezzo la vostra pazienza e vorrei ringraziare particolarmente chi
  ha speso tempo per suggerirmi aggiunte e correzioni.


  2.

  Informazioni sul Copyright

  This mini-HOWTO is Copyright  1996-1998 by Paul L. Rogers.  All
  rights reserved.

  A verbatim copy may be reproduced or distributed in any medium
  physical or electronic without permission of the author.  Translations
  are similarly permitted without express permission if it includes a
  notice on who translated it.

  Short quotes may be used without prior consent by the author.
  Derivative work and partial distributions of the Advocacy mini-HOWTO
  must be accompanied with either a verbatim copy of this file or a
  pointer to the verbatim copy.

  Commercial redistribution is allowed and encouraged; however, the
  author would like to be notified of any such distributions.

  In short, we wish to promote dissemination of this information through
  as many channels as possible.  However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  We further want that all information provided in the HOWTOs is
  disseminated.  If you have questions, please contact Tim Bynum, the
  Linux HOWTO coordinator, at linux-howto@sunsite.unc.edu.

  Ovvero (N.B: la sola nota di copyright valida  quella in lingua
  originale):

  Questo mini-HOWTO  Copyright  1996-1998 by Paul L. Rogers.  Tutti i
  diritti sono riservati.


  Pu essere riprodotta o distribuita una copia esatta su ogni mezzo
  fisico o elettronico senza il permesso dell'autore. Allo stesso modo
  anche le traduzioni sono permesse senza espresso permesso se viene
  apposta una nota su chi lo ha tradotto.


  Brevi citazioni possono essere usate senza previo consenso
  dell'autore.  Lavoro derivato o una riproduzione parziale
  dell'advocacy mini-HowTo deve essere accompagnata al file della sua
  copia esatta o da un riferimento ad una copia esatta.


  Una ridistribuzione commerciale  consentita e incoraggiata. Comunque
  l'autore vorrebbe essere informato di ogni singola distribuzione.


  In breve, vorremmo promuovere la diffusione di queste informazioni
  attraverso quanti pi canali possibile. Ad ogni modo proferiamo
  mantenere il copyright su questo HowTo e ci piacerebbe essere
  informati di ogni intento di distribuzione dello stesso.



  Pi in generale teniamo a dare diffusione a tutte le informazioni
  fornite negli HOWTO.  Se avete domande, contattate Tim Bynum, il
  coordinatore degli HOWTO a linux-howto@sunsite.unc.edu.



  3.

  Introduzione

  La comunit degli utenti Linux ha sperimentato da tempo che Linux  un
  prodotto stabile, fidato, robusto (anche se non perfetto) per molte
  applicazioni.  Purtroppo, sono ancora in molti, incluso persone chiave
  da un punto di vista decisionale, che non sono a conoscienza
  dell'esistenza di Linux e delle sue possibilit.

  Perch Linux e gli altri elementi che compongono una distribuzione di
  Linux possano arrivare alla loro completa potenzialit,  fondamentale
  raggiungere i potenziali ``clienti'' e promuovere (evitando di fare
  promesse che non possone essere mantenute) l'uso di Linux per
  applicazioni a cui  adatto.

  La ragione per cui molti prodotti commerciali hanno avuto successo sul
  mercato non  sempre dovuta alla superiorit technica del prodotto ma
  spesso alle capacit di marketing dell'azienda.

  Se usate Linux, ne siete soddisfatti e volete dare un contributo alla
  comunit Linux, prendete in considerazione di mettere in pratica una o
  pi di una delle idee proposte in questo mini-HOWTO e aiutate gli
  altri ad imparare ad usare Linux.


  4.

  Informazioni collegate


  Anche Lars Wirzenius, ex moderatore di comp.os.linux.announce e
  attivista di Linux, ha alcune osservazioni
  <http://www.iki.fi/liw/texts/advocating-linux.html> a proproposito di
  Linux Advocacy.

  Eric S. Raymond fornisce un'analisi
  <http://www.earthspace.net/~esr/writings/cathedral-bazaar/> di come
  mai il modello di sviluppo usato dalla comunit Linux ha avuto cos
  successo.

  La comunit del free software ha riconosciuto che i termini "free
  software" e "freely available software" non sono appropriati in ogni
  contesto. Per maggiori informazioni sull'uso del termine "open-source
  software" per la commercializzione del "free software", visitate il
  sito Open Source <http://www.opensource.org/>

  Se avete bisogno di suggerimenti sulle vostre tecniche di vendita date
  un'occhiata a Linuxmanship
  <http://electriclichen.com/people/dmarti/linuxmanship.html> scritto da
  Donald B. Marti, Jr.

  Il sito Linux PR <http://www.cse.unsw.edu.au/~conradp/linux/pr/>
  discute l'importanza dei press releases per la comunit degli utenti
  Linux.  Un altro modo di raggiungere una buona esperienza in questa
  area  di organizzare un NetDay in qualche scuola usando come
  riferimento i suggerimenti presentati in NetDay How-To Guide
  <http://www.netday.org/how-to/>.


  L'obiettivo di Linux International <http://www.li.org/>  di
  promuovere lo sviluppo e l'uso di Linux.

  Il Linux Documentation Project <http://sunsite.unc.edu/mdw/linux.html>
   una inestimabile risorsa per promuovere Linux.

  Il Linux Center Project <http://www.linux-center.org/> fornisce un
  indice tematico delle risorse su Linux e sul free software.

  Il sito Linux Business Applications <http://www.m-tech.ab.ca/linux-
  biz/> fornisce un forum per le organizazioni che usano linux ogni
  giorno a fini commerciali per condividere le loro esperienze.

  Linux Enterprise Computing <http://linas.org/linux/> e Freely
  Redistributable Software in Business
  <http://www.cyber.com.au/misc/frsbiz/> trattano argomenti e forniscono
  informazioni interessanti per tutti coloro che impiegano Linux in
  ambiente commerciale e imprenditoriale.

  L'obiettivo di Linux Advocacy Project <http://www.10mb.com/linux/> 
  di incoraggiare gli sviluppatori di applicazioni commerciali a
  realizzare versioni native Linux del loro software.

  Il programma di Linux CD and Support Giveaway
  <http://visar.csustan.edu:8000/giveaway.html>  quello di aiutare a
  rendere Linux largamente disponibile incoraggiando il riutilizzo dei
  CD-ROM Linux.

  Specialized Systems Consultants, Inc. (SSC) ospita il sito Linux
  Resources <http://www.linuxresources.com/> e pubblica il Linux Journal
  <http://www.ssc.com/lj/>.

  La mailing list linux-biz <http://www.lege.com/linux-biz.html>  un
  forum creato per discutere l'utilizzo di Linux in ambiente
  commerciale.

  I risultati <http://free.rmnet.it/linux/results.html> di Linux Mission
  Critical Systems documentano sistemi esitenti, attivi 24 ore al
  giorno, che sopportano con successo grandi carichi di lavoro.

  Esistono oggi un certo numero di pubblicazioni elettroniche sono
  dedicate a Linux.  Queste sono:


    LinuxFocus <http://mercury.chem.pitt.edu/~angel/LinuxFocus/>

    Linuxove noviny <ftp://ftp.inet.cz/pub/People/Pavel.Janik/noviny>

    Linux Gazette <http://www.ssc.com/lg/>


    PLUTO Journal <http://www.pluto.linux.it/journal/index.html>.

  Altri link a pubblicazioni online si possono trovare a Linux
  Documentation Project <http://sunsite.unc.edu/LDP/links.html#misc> ed
  anche su Linux Center Project <http://www.linux-
  center.org/fr/informations/journals/index.html>.


  5.

  Promuovere Linux


    Condividete le vostre esperienze personali con Linux (sia buone che
     cattive). Tutti sanno che il software pu avere difetti e
     limitazioni e se prendessimo in considerazione soltanto commenti
     entusiastici su Linux, non saremmo onesti. Io adoro raccontare di
     aver avuto in tre anni soltanto quattro reboot (di cui tre
     intenzionali).

    Se qualcuno ha dei problemi che Linux potrebbe risolvere, offritevi
     di indicare luoghi dove trovare informazioni appropriate (pagine
     Web, articoli su riviste, libri, consulenti, ...). Se non avete
     esperienza sulla soluzione che proponete ditelo chiaramente.

    Se siete disponibili a fare delle presentazioni di Linux, allora
     registatevi al Linux Speakers Bureau
     <http://www.ssc.com/linux/lsb.html>.

    Offritevi di aiutate chi comincia ad usare Linux. Siate sicuri che
     siano capaci di usare efficacemente il loro sistema.

    Alcuni continuano a credere che Linux e sistemi simili possano
     operare soltano in modalit testo.. Accertatevi che siano al
     corrente della disponibilit di applicazioni grafiche come Gimp
     <http://www.gimp.org/>.

    Tentate di rispondere alle richieste di aiuto dei principianti sui
     gruppi di discussione almeno una volta alla settimana.  Individuate
     le domande pi difficili, potreste essere gli unici a rispondere e
     potreste imparare qualcosa di nuovo allo stesso tempo.  Se invece
     non siete sicuri di poter rispondere in modo corretto cercate
     qualcuno che possa farlo.

    Individuate piccole imprese di sviluppo software e offritegli di
     fare una presentazione di Linux.

    Se se ne presenta la possibilit, fate una presentazione nel vostro
     ambiente di lavoro ai responsabili dei sistemi informatici

    Partecipate agli eventi della comunit come NetDay
     <http://www.netday.org/>.  Sebbene il vostro principale obiettivo
     debba essere quello di contribuire alla riuscita dell'iniziativa,
     sfruttate anche l'opportunit per far conoscere ad altri come Linux
     pu essegli utile.

    Considerate sempre il punto di vista delle persone a cui state
     ``vendendo'' Linux. Supporto, affidabilit, flessibilit e costo
     sono tutti fattori che ogni responsabile di ufficio o di azienda
     deve considerare. Incidentalmente, il costo si rivela spesso il
     fattore meno importante di questa equazione.

    La disponibilit di supporto costituisce spesso una preoccupazione
     per chi considera di adottare Linux. Aziende come Caldera
     <http://www.caldera.com/>, Cygnus Solutions
     <http://www.cygnus.com/>, Red Hat <http://www.redhat.com/>, e
     S.u.S.E. <http://www.suse.com/> offrono supporto per alcune o tutte
     le componenti di una normale distribuzione Linux. Inoltre Linux
     Consultants HOWTO <http://sunsite.unc.edu/LDP/HOWTO/Consultants-
     HOWTO.html> mantiene una lista di aziende che offrono supporto
     commerciale a Linux.  Naturalmente, il miglior supporto lo si trova
     in comp.os.linux e nelle gerarchie dei newsgroup linux.

    Evidenziate che lo sviluppo di software open-source
     <http://www.opensource.org/> avviene in un ambiente di
     collaborazione aperta tra progettisti di sistema, programmatori,
     alpha/beta tester ed utenti finali che spesso produce prodotti
     solidi e ben documentati come Apache <http://www.apache.org/>, GNU
     Emacs <http://www.gnu.org/>, Perl <http://www.perl.com/> ed il
     Linux kernel <http://www.linuxhq.com/>.

    Fatevi avanti e contiamoci! Registratevi al Linux Counter
     <http://counter.li.org/>.

    Riporta le tue esperienze positive di promozione di Linux a Linux
     International (li@li.org) o comunque ad organizzazioni simili.

    Cercate una nuova casa per i CD-ROM ed i libri di Linux di cui non
     avete pi bisogno. Dateli a qualcuno che  interessato a Linux, una
     biblioteca pubblica, una scuola od una associazione di appassionati
     di computer. Un libro ed il suo CD-ROM sarebbero adatti per una
     biblioteca. Comunque assicuratevi che rendere disponibile il CD-ROM
     non violi l'accettazione di una licenza oppure un copyright.
     Inoltre informate i bibliotecari che il materiale nel CD-ROM 
     ditribuibile gratuitamente.  Infine assicuratevi che siano resi
     disponibili sugli scaffali.

    Quando comprate libri su del software distribuito con Linux,
     preferite libri scritti dall'autore del software.  I diritti che
     l'autore riceve dalle vendite del libro possono essere l'unico
     compenso economico ricevuto per il suo lavoro.

    Incoraggiate i siti basati su sistemi Linux a registrare il loro
     nome alla pagina Powered by Linux
     <http://sunsite.unc.edu/LDP/powered.html> e suggeritegli di esporre
     i banner Linux <http://www.cse.unsw.edu.au/~conradp/banners/>,
     Apache <http://www.apache.org/>, GNU <http://www.gnu.org/>, Perl
     <http://www.perl.com/> ... sul loro sito.

    Contribuite! Se avete beneficiato del software open-source
     <http://www.opensource.org/>, prendete in considerazione la
     possibilit di aiutare la comunit del free software

    fornendo dettagliati bug report

    scrivendo documentazione

    creando artwork

    mettendo a disposizione capacit organizzativa

    suggerendo miglioramenti

    fornendo supporto tecnico

    contribuendo con software

    donando strumentazione

    fornendo supporto economico.

     Il Linux Documentation Project
     <http://sunsite.unc.edu/mdw/linux.html> fornisce una lista
     <http://sunsite.unc.edu/LDP/devel.html> di progetti basati o
     correlati a Linux.

    Infine, tenete sempre ben presente che ci sono una infinit di
     questioni da affrontare che la scelta di un sistema operativo.


  6.

  Canoni di Condotta


    Un rappresentante della comunit Linux, partecipa ad una
     discussione in una mailing list o in un newsgroup in maniera
     professionale. Evitate le offese e l'uso di linguaggio volgare.
     Consideratevi un membro di una corporazione virtuale con il signor
     Torvalds come amministratore delegato (Chief Executive Officer).
     Le vostre parole possono influire migliorando o peggiorando
     sull'immagine che il lettore ha della comunit Linux.

    Evitate di fare esagerazioni e affermazioni infondate. Non 
     professionale e produce discussioni infruttuose.

    Una risposta meditata e ben soppesata ad un posting non soltanto
     facilita la comprensione a chi legge, ma fa anche aumentare la
     considerazione per le vostre conoscienze e abilit.

    Non accanitevi negli scontri. Troppe discussioni degenerano in
     argomenti del tipo ``Il mio O/S  meglio del tuo''. Limitatevi a
     descrivere le possibilit di Linux in modo accurato.

    Tenete sempre presente che se insultate o disprezzate qualcuno egli
     pu condividere la sua cattiva esperienza con molti altri. Se
     offendete qualcuno cercate di scusarvi.

    Focalizzatevi su quello che Linux ha da offrire. Non c' bisogno di
     entrare in competizione. Linux  un prodotto buono e solido che pu
     essere apprezzato cos$igrave; com'.

    Rispettate l'utilizzo di altri sistemi operativi.  Anche se Linux 
     una stupenda piattaforma, non  detto che sia adatto alle necessit
     di tutti.

    Citate gli altri prodotti con il loro vero nome.  Non c' niente da
     guadagnare cercando di ridicolizzare una compagnia o i suoi
     prodotti usando nomignoli ``creativi''.  Se pretendiamo rispetto
     per Linux, dobbiamo rispettare gli altri prodotti allo stesso modo.

    Riconoscete i meriti a chi sono dovuti. Linux  soltanto il kernel.
     Senza gli sforzi del progetto GNU <http://www.gnu.org/gnu/linux-
     and-gnu.html>, MIT, Berkeley e molti altri troppo numerosi per
     essere menzionati, il kernel Linux non sarebbe granch utile per
     molte persone.

    Non insistete nel dire che Linux  l'unica soluzione per una data
     applicazione. Cos come la comunit Linux tiene alla propria
     libert, un monopolio di Linux priverebbe gli utenti degli altri OS
     della stessa libert.

    Possono presentarsi delle situazioni in cui Linux non  la risposta
     pi adatta. Cercate di essere i primi a riconoscerlo e proponete
     altre soluzioni.



  7.

  Gruppi di Utenti


    Partecipate ad un gruppo di utenti (User Group) Linux locale. Un
     elenco <http://sunsite.unc.edu/LDP/linux.html#general> di Linux
     user group registrati  presente al Linux Documentation Project
     <http://sunsite.unc.edu/LDP/>.  Se ancora non ne esistono nella tua
     citt fondane uno.

    Il Linux User Group HOWTO <http://sunsite.unc.edu/LDP/HOWTO/User-
     Group-HOWTO.html> copre la maggior parte delle problematiche
     inerenti la fondazione di un gruppo di utenti e discute
     l'importanza della sponsorizzazione di Linux come obiettivo
     fondamentale del gruppo.

    Formate delle persone capaci di propagandare Linux ad
     organizzazioni che possono essere interessate.

    Pubblicate articoli <http://www.cse.unsw.edu.au/~conradp/linux/pr/>
     inerenti la vostra attivit sui vostri organi di informazione
     locale.

    Prestate opera di volontariato per configurare sistemi Linux per
     soddisfare le necessit di organizzazioni locali. Ovviamente,
     nell'installazione deve essere previsto l'addestramento degli
     utenti ad usare il sistema e la fornitura della relativa
     documentazione.

    Discutete il Linux Advocacy mini-HOWTO nei ritrovi e nelle
     riunioni. Rifletteteci e proponete nuove idee.



  8.

  Relazioni con i venditori


    Quando pensate di comprare del nuovo hardware, domandate al
     commerciante se il suo prodotto supporta Linux e se  a conoscenza
     delle esperienze fatte da altri clienti con il suo prodotto sulla
     piattaforma Linux.

    Valutate l'idea di sostenere venditori che vendono prodotti e
     servizi basati su Linux. Incoraggiateli ad inserire i loro prodotti
     in Linux Commercial HOWTO
     <http://sunsite.unc.edu/LDP/HOWTO/Commercial-HOWTO.html>.


    Preferite produttori che donano parte dei loro proventi a sostegno
     di organizzazioni come la Free Software Foundation
     <http://www.gnu.org/help/help.html>, il Linux Development Grant
     Fund <http://www.li.org/About/Fund/Welcome.html>, l'XFree86 Project
     <http://www.xfree86.org/donations.html> o Software in the Public
     Interest <http://www.debian.org/donations.html>.  Se possibile,
     fate una donazione personale a queste organizzazioni o ad altre che
     sostengono open-source software <http://www.opensource.org/>.  Non
     dimenticate che alcuni datori di lavoro organizzano scambi di
     regali.

    Se avete bisogno di un'applicazione che non  disponibile per
     Linux, contattate il produttore e richiedetene una versione nativa
     per Linux.



  9.

  Relazioni con i Media


    Linux International sta raccogliendo ritagli di articoli
     <http://www.li.org/Resources/Articles/Welcome.html> che rigiuardano
     Linux, GNU ed altro software liberamente distribuibile.  Quando
     vedete uno di questi articoli, mandate le seguenti informazioni a
     clippings@li.org:

    Nome della pubblicazione

    Indirizzo per contattare la rivista

    Nome dell'autore

    L'indirizzo per contattare l'autore

    Titolo dell'articolo

    La pigina in cui l'articolo inizia

    La URL se il documento  disponibile online

    Un riassunto dell'articolo, compresa la tua opinione


    Se credete che Linux non sia stato trattato bene in un articolo,
     recensione o notizia, mandate i dettagli, comprese le informazioni
     sopracitate, a li@li.org di modo che posso essere mandata una
     risposta adeguata all'editore. Se contattate direttamente la
     rivista siate professionali e sicuri di ci che dite.

    Se partecipate ad un progetto collegato a Linux, fornite articoli
     informativi <http://www.cse.unsw.edu.au/~conradp/linux/pr/> a
     appropriati servizi di informazioni regolarmente.



  10.

  Ringraziamenti

  Un grato riconoscimento a tutti coloro che hanno contribuito,
  compresi:


                   Kendall G. Clark          <kclark@cmpu.net>
                   Bruno H. Collovini        <buick@microlink.com.br>
                   Allan "Norm" Crain        <allanc@idea-inc.com>
                   Jon "maddog" Hall         <maddog@zk3.digital.com>
                   Greg Hankins              <gregh@cc.gatech.edu>
                   Eric Ladner               <eladner@goldinc.com>
                   Chie Nakatani             <jeanne@mbox.kyoto-inet.or.jp>
                   Daniel P. Kionka          <dkionka@worldtalk.com>
                   Nat Makarevitch           <nat@nataa.fr.eu.org>
                   Martin Michlmayr          <tbm@cyrius.com>
                   Rafael Caetano dos Santos <rcaetano@dijkstra.ime.usp.br>
                   Idan Shoham               <idan@m-tech.ab.ca>
                   Adam Spiers               <adam.spiers@new.ox.ac.uk>
                   C. J. Suire               <suire@datasync.com>
                   Juhapekka Tolvanen        <juhtolv@silmu.cc.jyu.fi>
                   Lars Wirzenius            <liw@iki.fi>
                   Sean Woolcock             <sbwoolco@eos.ncsu.edu>














  Alsa-sound-mini-HOWTO
  Valentijn Sessink valentyn@alsa-project.org
  v1.7, 29 luglio 1999

  Descrive l'installazione del driver audio ALSA per Linux.  Questo
  driver audio pu essere utilizzato al posto dei normali driver sonori
  vista la sua completa compatibilit. Suggerimenti e critiche alla
  traduzione italiana di questo documento possono essere inviati al suo
  curatore: Marco Meloni (tonno at stud.unipg.it).

  1.  Introduzione

  Questo  l'ALSA Sound driver mini-HOWTO. Vi fornisce informazioni
  sull'installazione e l'utilizzo dei driver audio ALSA per la vostra
  scheda audio.  I driver ALSA sono driver audio completamente modulari
  che supportano kerneld o kmod. Sono compatibili con le API OSS e ne
  superano le possibilit. In altre parole: compatibili, ma migliori.


  1.1.  Riconoscimenti

  Questo documento contiene delle informazioni che ho preso dalle pagine
  del driver ALSA. La struttura  stata presa dal SB-mini-HOWTO,
  semplicemente perch assomigliava molto a quella che stavo cercando.
  Grazie al pacchetto SGML Tools, questo HOWTO  disponibile in diversi
  formati, tutti generati da un solo file sorgente. Grazie a Erik
  Warmelink per la rilettura, grazie a Alfred Munnikes per le sue
  domande ed i suoi suggerimenti sempre d'aiuto.  Grazie a Yamahata
  Isaku per la traduzione Giapponese, Miodrag Vallat per la traduzione
  in Francese. Steve Crowder ha fatto un ottimo lavoro nella lettura e
  nella composizione dell'intero testo. Grazie a Marc-Aurele Darche,
  Piotr Ingling, Juergen Kahrs, Tim Pearce Patrick Stoddard, Rutger de
  Graaf, Shuly Wintner, Jyrki Saarela, Jonas Lofwander, Kumar Sankaran
  per i loro suggerimenti ed i loro contributi.


  1.2.  Storia delle Revisioni

  Versione 1.7 - Luglio 29, 1999. Qualche correzione.

  Versione 1.6 - Luglio 26, 1999. Aggiunta una sezione sulle versioni di
  ALSA.

  Versione 1.5 - Maggio 21, 1999. Modificata la sezione sul mixer,
  aggiunta una sezione di installazione rapida.

  Versione 1.4 - Maggio 18, 1999. Inclusa la URL della versione
  Francese, cambiate altre URL.

  Versione 1.3 - Maggio 16, 1999. Grazie a Jaroslav questo HOWTO ha
  trovato casa nel sito web del progetto ALSA. A causa di questo
  avvenimento sono stati modificati indirizzi web e di email.

  Versione 1.2 - Maggio 11, 1999. Diversi aggiornamenti.

  Versione 1.1 - Marzo 11, 1999. Aggiunte molte schede audio della nuova
  versione 0.3 dei driver, scritto qualcosa sul kernel versione 2.2.

  Versione 1.0 - Febbraio 8, 1999. Aggiunte diverse cosa alla sezione di
  risoluzione dei problemi, ma sembra quasi completo.

  Versione 0.3 beta - Gennaio 20, 1999. Link sulla homepage ALSA. Ah,
  siamo ufficiali!

  Versione 0.2 alfa - Met Gennaio 1999, prima versione .sgml.

  Versione 0.1 alfa - Gennaio 1999, prima versione, pi che altro HTML.

  Ancora: vi prego di inviare qualsiasi patch in Inglese, you native
  speakers!


  1.3.  Nuove versioni di questo documento

  L'ultima versione pu essere trovata su http://www.alsa-
  project.org./~valentyn

  Altri formati (html, sgml, txt) sono nella directory other-formats.
  Sfortunatamente non sono riuscito a compilare una versione Postscript
  poich lo script sgml2latex esce con un sacco di errori.

  Yamahata Isaku ha tradotto in Giapponese questo documento che sar
  disponibile sul sito giapponese del progetto ALSA
  http://plaza21.mbn.or.jp/~momokuri/alsa/index.html

  Miodrag Vallat ha tradotto in Francese questo documento, traduzione
  che  disponibile su
  http://www.freenix.fr/unix/linux/HOWTO/mini/Alsa.html.

  Se effettuate una traduzione di questo documento fatemelo sapere e
  includer qui un riferimento alla traduzione.

  1.4.  Commenti e critiche

  Mi affido a te, lettore, per rendere utile questo HOWTO. Se avete
  suggerimenti, correzioni o commenti inviatemeli (alsa-howto@alsa-
  project.org), e cercher di inglobarli nella prossima revisione.

  Nota bene: non ricevo molte mail riguardo i driver ALSA e quindi ogni
  cosa  benvenuta. anche un ``grazie per'' sar apprezzato - magari non
  vi sar di troppa fatica aggiungere una sezione ``mi  piaciuto di
  pi'' o ``questo o quello non erano molto chiari''.

  Se pubblicate questo documento su un CDROM o su altro supporto, una
  copia di cortesia sarebbe apprezzata. Scrivetemi per l'indirizzo
  postale. Considerate anche l'opportunit di effettuare una donazione
  per il Linux Documentation Project per aiutare la documentazione
  libera per Linux. Contattare il coordinatore dei Linux HOWTO, Tim
  Bynum linux-howto@metalab.unc.edu, per maggiori informazioni.


  1.5.  Regole di distribuzione

  Copyright 1998/1999 Valentijn Sessink

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This document is distributed in the hope that it will be useful, but
  without any warranty; without even the implied warranty of
  merchantability or fitness for a particular purpose. See the GNU
  General Public License for more details.

  You can obtain a copy of the GNU General Public License by writing to
  the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  USA.




  2.  NOWTO - guida all'installazione rapida

  Se volete l'audio e lo volete ADESSO! e non dopo aver letto questo
  HOWTO, questa piccola panoramica dei driver ALSA potrebbe esservi di
  aiuto.

  2.1.  Installazione

  Le versioni 0.3.0, 0.3.1 e 0.3.2 dei driver ALSA hanno diversi
  problemi dovuti alla ristrutturazione dell'interfaccia mixer.
  Utilizzatene una versione differente (leggete la nota sulle versioni).
  Probabilmente vorrete utilizzare la versione 0.3.0-pre4.

   la solita roba ``./configure - make - make install''. Ripeterla per
  driver, librerie e programmi di utilit. Avrete bisogno di tutte e tre
  le cose, poich le utilit vi aiuteranno a togliere il muting alla
  vostra scheda audio. I kernel 2.2.x devono avere compilato il supporto
  generico per il suono (senza specificare per quale scheda audio),
  mentre i kernel 2.0.x devono avere il supporto per il suono
  disabilitato.

  I driver ALSA utilizzano i loro dispositivi, potete crearli con lo
  script ./snddevices.

  Dovrete caricare il modulo per la vostra scheda audio (o utilizzare
  kmod) e se volete che il supporto per l'audio sia compatibile con i
  driver audio del kernel di Linux (s che lo volete) avrete bisogno di
  un altro modulo che si chiama snd-pcm1-oss. Si veda la sezione ``Quale
  modulo per quale scheda'' per sapere quale modulo caricare. Dopo il
  caricamento potete dare un'occhiata in /proc/asound per avere diverse
  informazioni sui driver ALSA.


  2.2.  Riprodurre e registrare audio

  Qualche nota: ALSA utilizza i suoi dispositivi in /dev/snd, per
  esempio /dev/snd/pcmC0D1  la scheda 0, dispositivo 1. Potrete usare i
  vecchi dispositivi /dev/pcmXY solo se avete caricato il modulo di
  compatibilit snd-pcm1-oss. Prima di poter riprodurre qualsiasi suono
  dovrete togliere il "mute" alla scheda con "amixer". Digitate
  "amixer", quindi provate qualcosa tipo:

  amixer pcm 100 unmute

  Generalmente potete utilizzare le opzioni ``mute'' o ``unmute'',
  ``rec'' o ``norec'', valori numerici o left:right.

  Ecco fatto! Adesso, se funziona, bene. Altrimenti avrete veramente
  bisogno di leggere questo HOWTO...


  3.  Prima di cominciare



  3.1.  Introduzione


  Lo scopo di questo documento  quello di rendere pi semplice
  l'installazione dei driver audio ALSA nel vostro sistema Linux. Il
  sistema di riferimento  quello formato dalla distribuzione Slackware
  4.0 di Linux su un computer AMD/K6 (compatibile x86), ma dovrebbe
  funzionare con qualsiasi altra distribuzione di Linux. Non so se i
  driver ALSA funzionano anche su altre piattaforme ma, come dice la
  documentazione, sono stati testati con successo su Alpha. Io qui
  dispongo solo di PC x86, quindi ogni altra informazione aggiuntiva 
  bene accetta.

  Potrebbe tornare utile la lettura del Linux Sound HOWTO (si veda la
  sezione Altri HOWTO), sebbene questo HOWTO si focalizzato sui driver
  sonori distribuiti assieme al kernel.


  3.2.  Informazioni generali sui driver ALSA.


  Il driver audio ALSA  stato originariamente scritto come sostituzione
  del driver audio del kernel per le schede audio Gravis Ultrasound
  (GUS). Visto che questo driver di sostituzione per la GUS si 
  rivelato un successo, l'autore ha cominciato il progetto ALSA per un
  driver generico per diversi chip audio, con impostazione completamente
  modulare.

   compatibile con i driver audio OSS/Free e OSS/Linux (i driver del
  kernel), ma ha la sua propria interfaccia che  anche migliore di
  quella dei driver OSS. Un elenco delle funzioni presenti  disponibile
  su http://www.alsa-project.org/intro.html

  Si noti che i driver ALSA sono ancora in fase di sviluppo. Le cose
  potrebbero cambiare nel tempo i programmi che si affidano ai driver
  ALSA funzionano solo con specifiche versioni dei driver. Al di l di
  questo, io credo che siano grandi! Li sto utilizzando da circa 10 mesi
  e non torner all'oscurantismo dei driver audio "closed source"
  (suggerimento) ;)

  La pagina principale del progetto ALSA  http://www.alsa-project.org/


  3.3.  Hardware supportato

  I driver ALSA supportano solo un sottoinsieme delle schede audio
  esistenti.  Al momento in cui scrivo le schede audio seguenti sono
  supportate: (si noti che qualcuna fra queste pu non essere
  disponibile nella versione 0.3.0-pre4, in questo caso dovrete usarel a
  0.3.2 o successive).

    Schede con chipset Trident 4D Wave DX/NX chipset, grazie alla
     Trident Microsystems che ha offerto i driver ALSA di ``prima mano''
     sotto GPL (solo dispositivi MIXER e PCM) e la documentazione per il
     chipset 4D Wave PCI audio.  Si veda
     http://www.tridentmicro.com/HTML/products%20folder/audio.htm per
     maggiori informazioni. I driver sono adesso nel cvs, e saranno
     inclusi nella versione ALSA 0.3.0-pre5.

    Gravis Ultrasound (GUS): "PnP",  Extreme, Classic/ACE, MAX

    Schede con un chipset GUS: Dynasonic 3-D, STB Sound Rage 32,
     UltraSound 32-Pro (STB), ExpertColor MED3201 e le altre basate sul
     chip AMD InterWave(TM)

    Soundblaster: 1.0, 2.0, Pro, 16, AWE32/64, PCI64

    ESS AudioDrive ESx688

    ESS ES18xx (chipset). Si noti che ho avuto molti problemi con il
     ESS1888.  Lo sviluppatore del driver di questa scheda audio ha
     fatto il suo meglio, ma non  bastato.

    ESS Solo-1 ES1938. Uno solo dei canali  funzionante. Questo
     significa che la registrazione non  possibile. L'autore del codice
     per la ES1938  "al corrente del problema e lo sta analizzando".

    Yamaha: OPL3-SA2, OPL3-SA3 (chipsets)

    OAK Mozart

    Schubert 32 PCI (PINE, S3 SonicVibes PCI chipset)

    Schede audio Ensoniq AudioPCI ES1370/1371 PCI (Soundblaster PCI64)

    Schede audio SonicVibes PCI (PINE Schubert 32 PCI)

     Sono supportate un gran numero di schede audio basate su Crystal
     Semiconductors. Questo chip lo si pu trovare su diverso hardware,
     su schede (qualche scheda serie PCA Philips) e sulle schede madri
     (ad es. IBM Aptiva, Dell computers). Sono supportate le schede
     basate sui seguenti chipset:

    4231

    4232

    4232A

    4235

    4236B

    4237B

    4238B

    4239

    4610 (nella 0.3.2)

    4612 (nella 0.3.2)

    4615 (nella 0.3.2)

    4680 (nella 0.3.2)

     Una lista pi aggiornata pu essere consultata nel pacchetto dello
     stesso driver, in doc/SOUNDCARDS

  3.4.  Altri HOWTO

  Questo ALSA-sound-mini-HOWTO  solo un mini. Vi sono altri HOWTO che
  possono aiutarvi nel caso che questo sia troppo blando. Vi sono
  diversi aspetti che potreste incontrare durante l'installazione dei
  driver ALSA. Gli HOWTO possono generalmente essere trovati sui mirror
  di Metalab (il vecchio Sunsite). Date un'occhiata su
  http://metalab.unc.edu/LDP/mirrors.html e cercate il sito mirror a voi
  pi vicino. Potrete trovare gli HOWTO nella directory LDP/HOWTO/.
  Nota bene: i collegamenti in questo documento saranno tutti relativi a
  /LDP/HOWTO/mini. Se avete trovato questo documento in un discreto sito
  mirror vi troverete anche gli HOWTO.

  Adesso una nota per i kernel della serie 2.2.x. Per i kernel 2.2.x il
  supporto dell'audio  uguale ad ogni altro tipo di supporto: funziona,
  ma  differente da ci che eravate abituati a fare. Questo HOWTO (come
  ogni altro HOWTO) si concentrer sui kernel della serie 2.0, anche se
  cercher di rimarcare le differenze. Sar felice di aggiungere
  qualsiasi cosa posso aiutare questo HOWTO ad essere aggiornato con i
  kernel della serie 2.2.



  3.4.1.  Schede audio

  Forse avete gi comprato una scheda audio o forse  da tempo
  installata nel vostro computer. E adesso state per utilizzarla! Date
  un'occhiata al Sound-HOWTO per vedere se avrete dei problemi (potreste
  prima volere comprare la nuova Mega-Rumble-Blaster, poi provare i
  driver ALSA).


  3.4.2.  Schede Plug and Play

  Molte moderne schede audio per la piattaforma Intel sono schede ISA
  PnP, che  l'abbreviazione di ''Plug and Play''. Questo significa che
  la scheda deve essere configurata dal sistema operativo. Ci deve
  essere fatto attraverso una routine di inizializzazione al boot.
  Probabilmente avrete bisogno di configurare le vostre schede con il
  pacchetto PnP-utils. Ogni distribuzione di Linux recente include
  questi tool. Per l'utilizzo date un'occhiata al Plug-and-Play-HOWTO

  Sembra che i driver ALSA abbiano un loro supporto interno per diverse
  schede ISA-PnP. Sfortunatamente non avendo trovato documentazione su
  questo aspetto, non posso dirvi come funziona. Se qualcuno vuole
  provare ad usare ALSA senza il tool ISA-PnP me lo faccia sapere.


  3.4.3.  Moduli caricabili

  I driver ALSA sono compilati come moduli. Qui potrete trovare maggiori
  informazioni sui moduli: Kernel-HOWTO.  Vi  anche un Module-HOWTO ma
  al momento  senza un curatore; date un'occhiata alla sezione
  'unmaintained' del Howto-HOWTO. Vi  un Modules-mini-HOWTO che
  comunque potrebbe essere utile.


  3.4.4.  Kerneld

  Un altro HOWTO che potrebbe essere utile a qualcuno  il Kerneld-mini-
  HOWTO. Kerneld  un demone che installa e rimuove i moduli del kernel
  a seconda delle necessit. (Ho zero esperienza con questa cosa quindi
  ogni informazione aggiuntiva al riguardo  la benvenuta. La
  documentazione del driver ALSA contiene qualche informazione sulla
  configurazione di kerneld, queste sono state incluse nel presente
  mini-HOWTO.)


  4.  Come installare i driver audio ALSA



  4.1.  Cosa vi serve



    un sistema Linux funzionante (ad es. la distribuzione Slackware),
     con i pacchetti "Development" ("di sviluppo", ndt) installati (ad
     es. gcc, make ecc.)

    una scheda audio supportata

    una qualche conoscenza di Linux (che significa saper usare "ls",
     "cd", "tar" ecc.)

    un account come utente root

  Se avete una scheda PnP, avrete anche bisogno di:

    pacchetto software isapnptools.

     Il file INSTALL nella directory dei driver suggerisce che, per
     alcune schede, il supporto PnP  implementato in maniera nativa.
     Anche Jaroslav mi ha detto la stessa cosa. Quando avr maggiori
     informazioni su questa faccenda le aggiunger a questo mini-HOWTO.

  Si noti che non devono esserci driver audio attivi se volete usare i
  driver ALSA. Se avete un kernel che ha i driver audio compilati
  monoliticamente, dovrete ricompilarlo. Se avete il vecchio modulo
  "sound.o" attivo, dovrete disattivarlo. Se utilizzate kerneld, questo
  significa cancellare sound.o dalla directory
  /lib/modules/<kernel_version>/misc. I nuovi sistemi RedHat hanno un
  approccio al suono differente, che comporta l'attivit contemporanea
  di diversi moduli audio. Dovrete disattivarli tutti.

  I kernel della serie 2.2 hanno un nuovo approccio all'audio. Dovrete
  compilarli includendo il supporto sonoro! S,  cos: aggiungete il
  supporto per l'audio al kernel ma non aggiungete supporto per alcuna
  scheda audio.  Quindi compilate ed installate il kernel e, fatto
  questo, compilate i driver ALSA.


  4.2.  Come ottenere i driver

  I driver ALSA sono disponibili su  ftp://ftp.alsa-project.org/pub/ e
  sul sito mirror ftp://linux.a2000.nl/alsa. Per una installazione di
  ALSA completa avrete bisogno del driver, delle librerie e dei
  programmi di utilit; ad es. se scegliete il sito mirror dovrete
  prendere ftp://linux.a2000.nl/alsa/driver/alsa-
  driver-0.3.0-pre4.tar.gz, ftp://linux.a2000.nl/alsa/lib/alsa-
  lib-0.3.0pre4.tar.gz e ftp://linux.a2000.nl/alsa/utils/alsa-
  utils-0.3.0-pre4.tar.gz (NO, questi collegamenti non sono assoluti,
  meglio che diate un'occhiata sul sito principale per sapere quali
  versioni sono disponibili. Leggete la prossima sezione).


  4.3.  Versioni di ALSA

  I driver ALSA hanno percorso un lungo cammino. Lo sviluppo 
  cominciato durante la versione 2.0 del kernel, poi sono arrivati i
  kernel 2.2 (con il loro kernel audio).

  La versione attuale di ALSA sta subendo una ampia riscrittura
  dell'interfaccia mixer. Il vecchio mixer era la solita roba volume-in,
  bass/treble, volume-out mentre la nuova interfaccia consente di
  controllare l'entrata e l'uscita di ogni singolo elemento. In altre
  parole un programma dispone di un metodo per sapere se "l'uscita del
  CD  collegata all'entrata di registrazione". Il mixer  pronto, ma i
  vari programmi che lo supportano sono ancora in fase di costruzione.

  Se volete utilizzare subito ALSA probabilmente vi conviene scegliere
  alsa-driver-0.3.0-pre4, alsa-lib-0.3.0-pre4 ed alsa-utils-0.3.0-pre3.

  Le vecchie versioni, 0.2.0-pre10p3 e precedenti funzionano sotto
  2.0.x, ma non sono riuscito a farle funzionare sotto 2.2.x
  (probabilmente a causa della mancanza di interfacciamento con il
  modulo soundcore del kernel).

  La nuova versione (3.2.0) funziona e si compila sotto 2.0.x e 2.2.x.
  Si noti che questa sar l'ultima versione che includer il supporto
  per la serie 2.0 del kernel, quindi se vorrete usare una prossima
  versione dovrete fare il salto verso il 2.2.

  Potete utilizzare la 0.3.2 se volete l'ultima e la pi aggiornata ma
  potrebbe non essere la scelta migliore a causa della riscrittura
  dell'interfaccia mixer. Ho ravvisato dei problemi con il mixer OSS ed
  amixer ha una interfaccia completamente nuova che lo rende difficile
  da utilizzare.


  4.4.  Decompattazione

  I driver possono essere decompattati con comandi standard, tipo il
  solito tar -zxf <file>. Per i novellini e per chi soffre di amnesia:


       cd /usr/src






       tar -zxf ~/alsa-driver-0.3.0-pre4.tar.gz




  (se questo comando ha funzionato siete collegati come utente root, che
  non  cosa buona, fermatevi qui e leggete il DOS/Win95-to-Linux-HOWTO,
  o avrete gi pensato che questa  una cosa di amministrazione per la
  quale avrete bisogno dei privilegi di root. Quindi: vi servono i
  privilegi di root, date "su" e la password).


       tar -zxf ~/alsa-lib-0.3.0pre4.tar.gz






       tar -zxf ~/alsa-utils-0.3.0-pre4.tar.gz




  Ugualmente funzionante e pi divertente: find ~ -name alsa* -exec tar
  -zxf {} \; (bambini, non fate questo a casa,  solo un esempio). Si
  noti che se si sono scaricati i driver con Netscape, avreste potuto
  accidentalmente avere il file dei driver decompressi con l'estensione
  ".tgz". Se tar si lamenta del formato del file, forse avrete maggior
  fortuna togliendo la "z" dalle opzioni di tar.

  4.5.  Compilazione

  Avrete bisogno dei driver prima di poter compilare ed utilizzare le
  librerie.  Avrete bisogno delle librerie prima che possiate compilare
  o usare i programmi di utilit. Quindi andiamo a cominciare:


       cd alsa-driver-0.3.0-pre4




  (e per coloro senza molta esperienza: provate a premere <tab> (il
  tasto "tab") dopo "alsa-d".  la cosa chiamata command line
  completion). ("completamento della riga di comando", ndt.).  Se volete
  utilizzare l'interfaccia PnP interna dovrete dare il comando

  ./configure --with-isapnp=yes







       ./configure






       make




  Adesso dovete essere 'root' per installare il tutto (probabilmente
  siete gi "root")


       make install




  Se questo comando vi dice qualcosa del tipo ``version.h'' cannot be
  found, probabilmente i sorgenti del vostro kernel non sono del tutto a
  posto.  Avrete bisogno di diversi file sorgenti del kernel per compi
  lare i driver ALSA. Decompattate il vostro linux-2.x.y.tar.gz prefer
  ito in /usr/src e date il comando make menuconfig (in effetti potrebbe
  bastare make symlinks). Adesso compilate le librerie:


       cd ../alsa-lib-0.3.0-pre4






       ./configure






       make






       make install




  OK, adesso passiamo ai programmi di utilit:


  cd ../alsa-utils-0.3.0-pre4






       ./configure






       make






       make install




  Nota: potete anche non dare "make install" per i programmi di utilit
  dapprima. Potreste anche tralasciare l'intero processo di compilazione
  per le librerie e per i programmi di utilit per controllare se i
  driver funzionano.

  4.6.  Preparazione dei dispositivi

  Vi  uno script nella directory dei driver che installer i
  dispositivi sonori ALSA nella vostra directory /dev. Si dia il comando


       ./snddevices




  nella directory dei driver. Vi dovrebbe essere una sottodirectory
  /dev/snd adesso (si controlli se esiste. Se non avete familiarit nem
  meno con il comando "ls", prima prendete in considerazione la lettura
  degli altri HOWTO. Dovreste avere una qualche conoscenza di Linux per
  installare questi driver).

  Adesso siete pronti a caricare il driver, quindi passate pure al
  prossimo paragrafo.

  5.  Caricamento del driver

  Vi sono due metodi per utilizzare i moduli sonori ALSA. Io
  personalmente preferisco adottare la soluzione manuale, nel senso che
  carico i moduli all'avvio. I driver ALSA sono stati progettati come
  moduli caricabili/scaricabili - non effettuano un reset del mixer dopo
  essere stati caricati - quindi si pu facilmente utilizzare un
  approccio basato su kerneld.

  Si legga la sezione ``Compatibilit all'indietro''. Ne avrete bisogno
  per avere il supporto sonoro ``alla vecchia maniera''.




  5.1.  Caricamento con modprobe

  Nota: se avete una scheda audio PnP, dovrete prima impostarla sui
  giusti (o almeno conosciuti) IO/IRQ/DMA. Si consulti il Plug-and-Play-
  HOWTO. Avete configurato la vostra scheda audio Plug-and-Play ? Ok,
  allora continuate a leggere. La cosa principale  dare il comando
  "modprobe snd-<soundcard>".  Questo dovrebbe mettere le cose a posto.
  Si noti che non tutte le distribuzioni includono /sbin nel vostro
  path. Se il comando restituisce "bash: modprobe: command not found",
  questo molto probabilmente significa che modprobe non  nel vostro
  path. Provate "/sbin/modprobe snd-sb16", o provate a cercare modprobe
  da qualche altra parte.

  Le maggiori difficolt risiedono nella configurazione dei chipset
  Crystal, per i quali i driver ALSA non prevedono l'impostazione
  automatica. Informazioni pi attuali possono essere trovate nel file
  INSTALL nella directory dei driver. Due esempi ed una lista: Gravis
  UltraSound (GUS) e compatibili:


       /sbin/modprobe snd-gusclassic




  Per tutte le schede audio SoundBlaster a 16 bit (SoundBlaster 16
  (PnP), SoundBlaster AWE 32 (PnP), SoundBlaster AWE 64 (PnP):


       /sbin/modprobe snd-sb16





  5.2.  Quale modulo per quale scheda?


  5.2.1.  Gravis UltraSound Extreme


  modprobe snd-gusextreme

  5.2.2.  Gravis UltraSound MAX


  modprobe snd-gusmax


  5.2.3.  ESS AudioDrive

  Schede audio ESS AudioDrive ES-1688 e ES-688

  modprobe snd-audiodrive1688


  5.2.4.  ESS AudioDrive 18xx

  ESS AudioDrive ES-18xx

  modprobe snd-audiodrive18xx





  5.2.5.  Gravis UltraSound PnP

  Gravis UltraSound PnP, Dynasonic 3-D/Pro, STB Sound Rage 32,
  ExpertColor MED3201 altre schede audio basate sul chip AMD InterWave
  (R)

  modprobe snd-interwave

  5.2.6.  UltraSound 32-Pro

  UltraSound 32-Pro (scheda audio della  STB usata da Compaq) ed altre
  schede basate sul chip AMD InterWave (tm) con il circuito TEA6330T per
  il controllo dei bassi, alti e del volume.

  modprobe snd-interwave-stb

  5.2.7.  Soundblaster

  Schede Soundblaster a 8 bit (SoundBlaster 1.0, SoundBlaster 2.0,
  SoundBlaster Pro)

  modprobe snd-sb8

  5.2.8.  Soundblaster 16

  Schede SoundBlaster a 16 bit (SoundBlaster 16 (PnP), SoundBlaster AWE
  32 (PnP), SoundBlaster AWE 64 (PnP). Nota bene: questo modulo non
  supporta la scheda audio SoundBlaster VibraX16.

  modprobe snd-sb16

  5.2.9.  OAK Mozart


  modprobe snd-mozart

  5.2.10.  OPTi 82C9xx

  Diverse schede che utilizzano il chipset OPTi 82C9xx.

  modprobe snd-opti9xx

  5.2.11.  AD1847/48 e CS4248


  modprobe snd-card-ad1848

  5.2.12.  Schede audio Yamaha OPL3-SA2/SA3

  Il solo "modprobe snd-opl3sa" non funzioner, questo driver non
  effettua impostazioni automatiche. Si guardi pi avanti.

  5.2.13.  S3 SonicVibes

  Schede audio PCI S3 SonicVibes. (PINE Schubert 32 PCI)

  modprobe snd-sonicvibes


  5.2.14.  Ensoniq/Soundblaster PCI64

  Schede audio PCI Ensoniq AudioPCI ES1370/1371. (SoundBlaster PCI 64)

  modprobe snd-audiopci


  5.2.15.  CS4231

  Il solo ``modprobe snd-card-cs4231'' non funzioner, questo driver non
  effettua impostazioni automatiche. Si guardi pi avanti.


  5.2.16.  CS4232/4232A

  Tutte le schede audio basate sui chip CS4232/CS4232A.  Il solo
  "modprobe snd-card-cs4232" non funzioner, a causa della mancanza
  dell'impostazione automatica. Si guardi pi avanti.


  5.2.17.  4235 e successive

  Tutte le schede audio basate sui chip
  CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239. Il solo "modprobe snd-
  card-cs4236" non funzioner, a causa della mancanza dell'impostazione
  automatica. Si guardi pi avanti.


  5.2.18.  4610/4612/4615 e 4680


  modprobe snd-card-cs461x

  5.2.19.  ESS Solo 1

  Scheda ESS Solo-1, 128iPCI  (es1938, ESS-SOLO-1). Questa non  nel
  file INSTALL presente nella directory dei driver. Jonas Lofwander mi
  ha inviato la locazione di un documento che vi aiuter ad installare
  questa scheda che , alla fine, nulla pi di una modprobe snd-
  esssolo1... ma http://195.163.39.4/~dice/alsa-solo1.txt potr essere
  di aiuto nell'utilizzo della versione 0.3.2 di amixer. Se avete un
  Thinkpad della IBM potete anche consultare
  http://www.geocities.com/SiliconValley/Peaks/3649/1412.html, grazie a
  Kumar Sankaran.

  5.2.20.  Trident 4DWave DX/NX

  Best Union  Miss Melody 4DWave PCI, HIS  4DWave PCI, Warpspeed
  ONSpeed 4DWave PCI, AzTech  PCI 64-Q3D, Addonics  SV 750, CHIC  True
  Sound 4Dwave, Shark  Predator4D-PCI, Jaton SonicWave 4D. Questa scheda
   supportata nella versione 0.3.2.

  modprobe snd-trid4dwave

  5.2.21.  ForteMedia FM801

  Queste sono le scheda audio basate sul chip FM801.

  modprobe snd-card-fm801

  5.3.  modprobe e driver senza impostazione automatica

  Se utilizzate un driver senza impostazione automatica, dovrete fornire
  delle indicazioni aggiuntive al lancio del driver per permettergli di
  funzionare.  Altre informazioni possono essere trovate nel file
  INSTALL presente nella directory dei driver.


  5.3.1.  OPL3-SA2 e OPL3-SA3

  Come dice il file INSTALL dovrete fornire tutte le indicazioni per
  permettere a questo driver di funzionare. Se la scheda  stata
  inizializzata con i tool isapnp, probabilmente potrete ottenere dal
  file /etc/isanp.conf maggiori informazioni sui seguenti valori:


       snd_port - porta di controllo per il chip OPL3-SA
       snd_wss_port - porta WSS per il chip OPL3-SA
       (0x530,0xe80,0xf40,0x604)
       snd_midi_port - porta per MPU-401 UART (0x300,0x330), -1 =
       disabilitata
       snd_fm_port -porta FM del chip OPL3-SA (0x388),-1 = disabilitata
       snd_irq - IRQ del chip OPL3-SA (5,7,9,10)
       snd_dma1 - primo DMA del chip Yamaha OPL3-SA (0,1,3)
       snd_dma1_size - dimensione max primo DMA in kB (4-64kB)
       snd_dma2 - secondo DMA del chip Yamaha OPL3-SA (0,1,3), -1
       =disabilitato snd_dma2_size - dimensione max secondo DMA in
       kB(4-64kB)



  Potreste dare il comando "modprobe snd-opl3sa snd_port=0xNNN
  snd_wss_port=0x530 snd_midi_port=-1 snd_fm_port=0x388 snd_irq=5
  snd_dma1=0 snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" per caricare
  questo driver (senza supporto per il midi. Sono ancora convinto del
  fatto che il supporto per il midi vi serva solo quando avete dei sin
  tetizzatori e altra roba e li volete collegare al vostro sistema
  Linux. Non mi  mai servito il supporto per il midi neanche quando
  riproduco dei file midi).

  Si noti che il valore "NN" deve essere fornito, solo che non so quale
  potrebbe essere un valore ragionevole. Non so se il valore della
  dimensione del DMA sia assolutamente richiesto.

  Se possedete un Thinkpad della IBM con questo chipset allora
  http://www.cirs.org/patrick/index.html potrebbe esservi di aiuto.



  5.3.2.  Chip CS4231

  In accordo con il file INSTALL avrete bisogno di inserire la porta
  principale per questa scheda. Si noti che con il driver per le schede
  3235/6/7/8/9, quello descritto qui sotto, ho finito con il fornire
  tutte le informazioni (tranne la dimensione del DMA), altrimenti il
  driver non avrebbe funzionato.  Quindi potreste provare ad utilizzare
  l'intera linea di comando per caricare il driver. Se avete
  inizializzato la scheda con il tool isapnp probabilmente potrete avere
  maggiori informazioni dal file /etc/isapnp.conf sui valori delle
  seguenti impostazioni:


       snd_port - porta del chip CS4232 (PnP setup - 0x534)
       snd_mpu_port - porta dell'UART MPU-401  (PnP setup - 0x300),
       -1 = disable snd_irq - IRQ del chip CS4232 (5,7,9,11,12,15)
       snd_mpu_irq - IRQ dell'UART MPU-401 (9,11,12,15)
       snd_dma1 - primo DMA del chip CS4232 (0,1,3)
       snd_dma1_size - dimensione max. primo DMA in kB (4-64kB)
       snd_dma2 - secondo DMA per chip Yamaha CS4232 (0,1,3), -1 = disabilita
       snd_dma2_size - dimensione max.  secondo DMA in kB (4-64kB)



  Potete dare il comando "modprobe snd-card-cs4231 snd_port=0x534
  snd_mpu_port=-1 snd_irq=5 snd_dma1=0 snd_dma1_size=NN snd_dma2=1
  snd_dma2_size=NN"  per caricare il driver in configurazione standard.
  (Senza supporto per il MIDI, si veda la nota al chip Yamaha OPL-3).
  Se avete utilizzato valori differenti in /etc/isapnp.conf dovrete
  usarli anche qui) Nota:  saggio comunque usare il proprio cervello ;)
  Si noti che il valore NN deve essere impostato, solamente che non so
  quali possano essere dei valori ragionevoli. Non so se serve
  specificare la dimensione del dma.


  5.3.3.  Chip CS4232/CS4232A

  Secondo quello che dice il file INSTALL dovrete indicare la porta
  principale usata da questa scheda per farla funzionare. Si noti che
  con il driver per le schede 3235/6/7/8/9, quello sotto, ho finito con
  il fornire tutte le impostazioni (tranne il DMA-size), altrimenti il
  driver non ne voleva sapere di funzionare. Perci si pu usare
  l'intera linea di comando per caricare il driver. Se la scheda  stata
  inizializzata con il tool isapnp, potrete probabilmente ottenere
  maggiori informazioni dal file /etc/isapnp.conf sui seguenti valori:


       snd_port - porta del chip CS4232  (PnP setup - 0x534)
       snd_cport - porta di controllo del chip CS4232 (PnP setup - 0x120)
       snd_mpu_port - porta UART MPU-401 (PnP setup - 0x300),-1 =
       disabilitata
       snd_fm_port - porta FM del chip CS4232 (PnP setup - 0x388), -1
       = disabilitata
       snd_jport - porta joystick del chip CS4232 (PnP setup - 0x200), -1 =
       disabilitata
       snd_irq - IRQ chip CS4232 (5,7,9,11,12,15)
       snd_mpu_irq - IRQ MPU-401 UART (9,11,12,15)
       snd_dma1 - primo DMA chip CS4232 (0,1,3)
       snd_dma1_size - dim. max primo DMA in kB (4-64kB)
       snd_dma2 - secondo DMA chip Yamaha CS4232  (0,1,3), -1 =
       disable snd_dma2_size - dim. max secondo DMA in kB(4-64kB)



  Potreste dare il comando "modprobe snd-card-cs4232 snd_port=0x534
  snd_cport=0x120 snd_mpu_port=-1 snd_fm_port=0x388 snd_jport=-1
  snd_irq=5 snd_dma1=0 snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" per
  caricare il driver per una scheda audio in "configurazione standard"
  (senza supporto per il MIDI, si veda la nota al driver Yamaha OPL-3 e
  senza supporto per il joystick).  Se avete utilizzato valori differ
  enti nel file /etc/isapnp.conf, potreste anche utilizzare queste
  impostazioni (nota: la cosa pi saggia da fare  utilizzare il
  cervello ;).

  Si noti che il valore "NN" deve essere specificato, solo che non so
  quali valori possono essere ragionevoli. Non so se  obbligatorio
  specificare la dimensione del dma.

  5.3.4.  Chip CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239

  In accordo con quanto asserisce il file INSTALL dovrete impostare il
  valore della porta principale e di quella di controllo di questa
  scheda. Si noti che con una scheda CS4237B ho finito con il fornire
  tutte le impostazioni necessarie (tranne la dimensione del DMA),
  altrimenti il driver si rifiutava di funzionare. Perci dovreste
  utilizzare l'intera linea di comando per caricare il driver, e non
  specificare solamente la porta principale e quella di controllo. Se la
  scheda  stata inizializzata con i tool isapnp probabilmente si
  possono ottenere maggiori informazioni dal file /etc/isapnp.conf
  riguardo le seguenti impostazioni:






  snd_port - porta del chip CS4232 (PnP setup - 0x534)
  snd_cport - porta di controllo del chip CS4232 (PnP setup - 0x120)
  snd_mpu_port - porta; della UART MPU-401 (PnP setup - 0x300),
  -1 = disabilitata
  snd_fm_port - porta FM del chip CS4232 (PnP setup - 0x388),
  -1 = disabilitata
  snd_jport - porta joystick del chip CS4232 (PnP setup - 0x200),
  -1 = disabilitata
  snd_irq - IRQ chip CS4232 (5,7,9,11,12,15)
  snd_mpu_irq - IRQ della UART MPU-401 (9,11,12,15)
  snd_dma1 - primo DMA del chip CS4232 (0,1,3)
  snd_dma1_size - dim. max primo DMA in kB (4-64kB)
  snd_dma2 - secondo DMA del chip Yamaha CS4232 (0,1,3),
  -1 = disabilitato
  snd_dma2_size - dim. max secondo DMA in kB (4-64kB)




  Potreste usare il comando "modprobe snd-card-cs4236 snd_port=0x534
  snd_cport=0x120 snd_mpu_port=-1 snd_fm_port=0x388 snd_jport=-1
  snd_irq=5 snd_dma1=0 snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN" per
  caricare il driver (senza supporto per il MIDI, se vedano le note al
  driver per Yamaha OPL-3, e senza supporto per il joystick). Note:

    Il valore "NN" deve essere specificato, solamente che non so quali
     valori possano essere ragionevoli.

    la mia CS4237B funziona bene senza specificare la dimensione del
     DMA



  5.4.  Utilizzo con kerneld

  kerneld  un demone (daemon) che provvede al caricamento dei moduli su
  richiesta, e al loro scaricamento dalla memoria quando essi non
  vengono utilizzati. Poich non ho alcuna esperienza sull'uso di
  kerneld, non so se le informazioni che riporto sono accurate. Le
  informazioni provengono dal file INSTALL del pacchetto ALSA-drivers.
  Informazioni eccellenti sul kerneld possono essere trovate nel
  kerneld-mini-HOWTO.

  Seguite questi passi:

    Modificate il vostro file /etc/conf.modules (si vedano pi avanti
     gli esempi)

    Si esegua 'modprobe snd-card' dove card  il nome della vostra
     scheda [Cosa che trovo abbastanza strana, non era kerneld che se ne
     occupava di caricarli? VS]

  Esempio di file /etc/conf.modules per una scheda audio Gravis
  UltraSound PnP:












  alias char-major-14 snd
  alias snd-minor-oss-0 snd-interwave
  alias snd-minor-oss-3 snd-pcm1-oss
  alias snd-minor-oss-4 snd-pcm1-oss
  alias snd-minor-oss-5 snd-pcm1-oss
  alias snd-minor-oss-12 snd-pcm1-oss
  alias snd-card-0 snd-interwave
  options snd snd_major=14 snd_cards_limit=1
  options snd-interwave snd_index=1 snd_id="guspnp" snd_port=0x220 snd_irq=5
  snd_dma1=5 snd_dma2=6




  Esempio per l'utilizzo di pi schede audio nella stessa macchina (la
  configurazione che segue  pensata per una Sound Blaster 16 e per una
  Gravis Ultrasound Classic):


       alias char-major-14 snd
       alias snd-minor-oss-0 snd-mixer
       alias snd-minor-oss-3 snd-pcm1-oss
       alias snd-minor-oss-4 snd-pcm1-oss
       alias snd-minor-oss-5 snd-pcm1-oss
       alias snd-minor-oss-12 snd-pcm1-oss
       alias snd-card-0 snd-sb16
       alias snd-card-1 snd-gusclassic
       options snd snd_major=14 snd_cards_limit=2
       options snd-sb16 snd_index=1 snd_port=0x220 snd_irq=5 snd_dma8=1 snd_dma16=5
       options snd-gusclassic snd_index=2 snd_irq=11 snd_dma1=6 snd_dma2=7




  Esempio per l'utilizzo di due schede Gravis UltraSound Classic:


       alias char-major-14 snd
       alias snd-minor-oss-0 snd-mixer
       alias snd-minor-oss-3 snd-pcm1-oss
       alias snd-minor-oss-4 snd-pcm1-oss
       alias snd-minor-oss-5 snd-pcm1-oss
       alias snd-minor-oss-12 snd-pcm1-oss
       alias snd-card-0 snd-gusclassic
       alias snd-card-1 snd-gusclassic
       options snd snd_major=14 snd_cards_limit=2
       options snd-gusclassic snd_index=1,2 snd_port=0x220,0x260 snd_irq=5,11
       snd_dma1=5,6 snd_dma2=7,3





  5.5.  Compatibilit all'indietro

  Se volete assicurarvi la compatibilit con OSS/Free e OSS/Linux
  dovrete caricare un ulteriore driver: il driver snd-pcm1-oss per la
  compatibilit con OSS.  Date il comando


       modprobe snd-pcm1-oss




  Questo vi dar /dev/audio e /dev/dsp-support, come i driver OSS/Free
  (kernel) e OSS/Linux (quello da $25). Si noti che questa  solo
  un'emulazione.


  6.  Test ed utilizzo

  Adesso dovrete verificare su il driver audio  stato realmente
  caricato e quindi provare ad utilizzarlo.

  6.1.  Il filesystem /proc

  Potete trovare molte informazioni utili sul vostro sistema nella
  sottodirectory /proc. /proc  un filesystem "virtuale", ci significa
  che non esiste veramente, ma si riferisce solo ai vari processi e task
  del vostro computer. Affinch /proc funzioni dovrete aver compilato il
  supporto per esso nel kernel. Molte distribuzioni di Linux lo fanno in
  maniera predefinita, ma se avete compilato un kernel e lasciato fuori
  il supporto per /proc, ovviamente non vi sar nulla in /proc.

  /proc/modules vi fornisce informazioni su moduli in memoria. Una volta
  che i driver audio ALSA sono stati caricati, se date il comando cat
  /proc/modules dovreste vedere qualcosa tipo questo:


       snd-pcm1-oss      4            0
       snd-sb16          1            1
       snd-sb-dsp        4    [snd-sb16]      0
       snd-pcm1          4    [snd-pcm1-oss snd-sb-dsp]      0
       snd-pcm           3    [snd-pcm1-oss snd-sb16 snd-sb-dsp snd-pcm1]    0
       snd-mixer         3    [snd-pcm1-oss snd-sb16 snd-sb-dsp]      1
       snd-mpu401-uart   1    [snd-sb16]      0
       snd-midi          4    [snd-sb16 snd-sb-dsp snd-mpu401-uart]   0
       snd-opl3          1    [snd-sb16]      0
       snd-synth         1    [snd-sb16 snd-opl3]     0
       snd-timer         1    [snd-opl3]      0
       snd               8    [snd-pcm1-oss snd-sb16 snd-sb-dsp snd-pcm1 snd-pcm snd-mixer snd-mpu401-uart snd-midi snd-opl3 snd-synth snd-timer]    0




  Se qualcosa  andata male durante l'installazione del driver, vedrete
  un sacco di dispositivi "snd", ma il supporto per l'audio non sar
  attivo.

  Per esempio (Nota: non dovrete dare questo comando cos come viene
  posto adesso, il driver cs4236 abbisogna delle opzioni):


       win3:~# modprobe
       snd-card-cs4236 /lib/modules/2.0.35/misc/snd-card-cs4236.o:
       init_module: Device or resource busy snd-mixer: Device or resource busy
       win3:~# cat /proc/modules
       snd-cs4236        2           0
       snd-cs4231        3    [snd-cs4236]    0
       snd-timer         1    [snd-cs4231]    0
       snd-pcm1          4    [snd-cs4236 snd-cs4231] 0
       snd-mixer         3    [snd-cs4236 snd-cs4231] 0
       snd-pcm           3    [snd-cs4236 snd-cs4231 snd-pcm1]       0
       snd-mpu401-uart   1           0
       snd-midi          4    [snd-mpu401-uart]       0
       snd-opl3          1           0
       snd-synth         1    [snd-opl3]      0
       snd-timer         1    [snd-cs4231 snd-opl3]   0
       snd               8    [snd-cs4231 snd-timer snd-pcm1 snd-mixer snd-pcm]     0


  Potrete assicurarvi dell'esistenza di una scheda audio controllando
  /proc/asound/cards. Per esempio:


       bash$ cat /proc/asound/cards
       0 [card1          : SB16 - Sound Blaster 16
                           Sound Blaster 16 at 0x220, irq 5, dma 1&5




  Nell'esempio precedente (dove ho dimenticato le opzioni) l'output
  sarebbe dovuto essere:


       win3:~# cat /proc/asound/cards
       --- no soundcards ---




  Una scheda CS4236 funzionante produrrebbe


       0 [card1         ]: CS4236 - CS4237B
                           CS4237B at 0x534, irq 7, dma 1&0




  Se avete controllato e ricontrollato le vostre impostazioni ed ancora
  non vedete nessuna scheda, date un'occhiata alla sezione Risoluzione
  dei problemi.

  La directory virtuale /proc/asound fornisce molte altre informazioni
  sul driver. Si noti che /proc/asound esiste solo dopo aver caricato il
  primo modulo ALSA. Se non vi  una /proc/asound questo significa
  semplicemente che il modulo "snd" non  stato correttamente caricato.
  Potrete identificare le schede installate in /proc/asound/cards, e
  trovare le informazioni sulla scheda0 in /proc/asound/0,
  /proc/asound/1 per la scheda1 ecc.

  Se cat /proc/asound/card1/pcm0 mostra qualcosa del tipo


             ES1370 DAC2/ADC
             Playback isn't active.
             Record isn't active.



  questo significa che il vostro driver  pronto a funzionare, ma in
  questo momento non sta facendo nulla (quindi  andato tutto bene).

  Per coloro che usano un kernel 2.0 vi  un terzo metodo per
  raccogliere informazioni sui dispositivi audio, pi precisamente se
  avete caricato il driver OSS compatibile vi sar un dispositivo
  /dev/sndstat. Il driver ALSA vi chiede gentilmente di non fare
  affidamento su queste informazioni poich il dispositivo  presente
  solo per compatibilit con i driver OSS e informazioni pi attendibili
  possono essere ottenute da /proc/asound/. Nei kernel 2.2.x ALSA
  utilizza il soundcore del kernel e quindi non pu emulare il
  /dev/sndstat, poich potrebbe interferire con i driver OSS.



  6.2.  Il mixer

  Una volta che i driver per la vostra scheda audio sono stati
  installati e il vostro filesystem /proc vi assicura che tutto  andato
  a buon fine, potete provare a produrre qualche suono. Prima di tutto
  si installi il pacchetto dei programmi di utilit, o almeno si metta
  il comando "amixer" in qualche posto accettabile (tipo
  /usr/local/bin). Si dia un'occhiata alle impostazioni del mixer
  digitando "amixer". Questo comando mostra le impostazioni del mixer o,
  come vengono normalmente chiamate, i livelli di volume delle diverse
  parti della scheda audio.  Per la mia Soundblaster 16 dice:


       Master         0  % (-14.00dB) : 0  % (-14.00dB)
       Bass           0  % (-14.00dB) : 0  % (-14.00dB)
       Treble         0  % (-14.00dB) : 0  % (-14.00dB)
       Synth          0  % (-62.00dB) : 0  % (-62.00dB)
       PCM            0  % (-62.00dB) : 0  % (-62.00dB)
       Line-In        0  % (-62.00dB) : 0  % (-62.00dB) Mute
       MIC            0  % (-62.00dB) : 0  % (-62.00dB) Mute
       CD             0  % (-62.00dB) : 0  % (-62.00dB) Mute
       In-Gain        0  % (-18.00dB) : 0  % (-18.00dB)
       Out-Gain       0  % (-18.00dB) : 0  % (-18.00dB)
       PC Speaker     0  % (-18.00dB) : 0  % (-18.00dB)




  La mia scheda basata sul Crystal 4237B ha molte altre opzioni:


       Master D       0  % (-22.00dB) : 0  %
       (-22.00dB) Mute 3D Center      0  % (-22.50dB) : 0  % (-22.50dB)
       3D Space       0  % (-22.50dB) : 0  % (-22.50dB) Mute
       Synth          0  % (-94.50dB) : 0  % (-94.50dB) Mute
       FM             0  % (-94.50dB) : 0  % (-94.50dB) Mute
       DSP            0  % (-94.50dB) : 0  % (-94.50dB) Mute
       PCM            0  % (-94.50dB) : 0  % (-94.50dB) Mute
       Line-In        0  % (-34.50dB) : 0  % (-34.50dB) Mute
       MIC            0  % (-22.50dB) : 0  % (-22.50dB) Mute
       CD             0  % (-34.50dB) : 0  % (-34.50dB) Mute
       Record-Gain    0  % (  0.00dB) : 0  % (  0.00dB)
       In-Gain        0  % (-18.00dB) : 0  % (-18.00dB)
       Loopback       0  % (-94.50dB) : 0  % (-94.50dB) Mute
       Mono           0  % (-45.00dB) : 0  % (-45.00dB) Mute
       Aux A          0  % (-34.50dB) : 0  % (-34.50dB) Mute




  Se tutto ci che vedete  un messaggio del tipo ``amixer: Specify
  command...''  state utilizzando i nuovi programmi di utilit di ALSA
  3.2. Vi serve questa versione per le versioni 0.3.0+ dei driver ma la
  loro documentazione  incompleta e l'interfaccia del mixer  ancora
  pesantemente beta; il mio suggerimento  di ritornare ad utilizzare la
  versione 0.3.0-pre4. Il nuovo amixer non ha ancora una pagina di
  manuale da consultare, quindi dovrete continuare da soli.


  6.2.1.  Impostazioni del mixer per la riproduzione


  Avrete notato la voce "Mute" su qualche dispositivo. Questa significa
  che quel particolare dispositivo sar escluso, qualunque sia il suo
  livello di volume.  Il CS4237B la mette anche sul canale principale.
  Nel caso del CS4237B dovrei digitare
  amixer "master d" unmute

  per riuscire anche solo ad udire qualche suono. La Soundblaster non ha
  il mute sul canale di output ma

  amixer master 100 unmute

  porter al 100% il volume e toglier il "mute" dal canale principale.
  Potete utilizzare un numero o una parola come "mute" o "unmute" o
  tutti e due.  Digitate

  amixer "master d" 100; amixer pcm 100 unmute

  per impostare il volume della scheda CS4237B  al massimo volume del
  canale principale ed attivare il canale PCM e portarlo al massimo
  volume. Per separare le impostazioni L/R (Left/Right, Destra/Sinistra.
  ndt) utilizzate i due punti, per esempio

   amixer CD 25:50

  (No, non so quale dei due numeri corrisponda a destra e quale a
  sinistra ma lasciatemi dire che questo dipende pesantemente anche
  dalla posizione dei vostri speaker).


  6.2.2.  Componenti del mixer


  I vari componenti del mixer possono confondervi se non avete grosse
  conoscenze sulla produzione di audio digitale. Il Sound-HOWTO potrebbe
  aiutarvi e qui troverete una introduzione veramente minima.

  Probabilmente avrete bisogno di pochi elementi del mixer: uno di
  questi  ``CD'' (regola il suono analogico proveniente dal vostro
  lettore di CD, diversi lettori di CD sono connessi con un cavo
  rosso/bianco/nero a 3 o 4 fili).

  ``PCM''  utilizzato per molte applicazioni. I programmi come mpg123,
  xmms, speakfreely, realplayer ed altri utilizzano il canale PCM.

  ``MIC'' sta per microfono e ``line-in''  un entrata (opzionale) extra
  della vostra scheda audio.

  I vari ``gain'' ("guadagno" ndt) permettono di avere una ulteriore
  amplificazione per diversi utilizzi e si capiscono facilmente.
  (record-gain  una amplificazione extra del canale di registrazione,
  che pu tornare utile se si utilizza un microfono).


  6.2.3.  Impostazioni del mixer per la registrazione

  Potete impostare il canale CD per la registrazione digitando

  amixer cd rec

  e toglierli questa opzione con

  amixer cd norec.

  Se volete registrare qualcosa dal microfono potrete probabilmente
  digitare

  amixer record-gain 100; amixer mic 100 rec mute

  (l'utilizzo dell'input microfonico potrebbe generare del rumore ad
  alta frequenze se il suono rientrasse dagli speaker). Molti microfoni
  dispongono di una regolazione di ``gain'' per amplificarne il volume;
  probabilmente dovrete agire su questa per riuscire ad udire i suoni
  provenienti dal microfono.


  6.2.4.  Altre impostazioni del mixer

  Sfortunatamente non sono riuscito a modificare il volume delle
  impostazioni "3d center" e "3d space" con amixer. Se qualcuno ci
  riuscisse  pregato di farmelo sapere. A questo scopo pu essere
  utilizzato alsamixer.

  Le FAQ di ALSA dicono che  possibile ristabilire le impostazioni del
  mixer con cat <file> > /proc/asound/#/mixerC0D0, dove <file> 
  l'output di /proc/asound/#/mixerC0D0. Non sono riuscito a far
  funzionare questo metodo perch il mio sistema si lamenta riguardo a
  dei dispositivi inesistenti.


  6.3.  I dispositivi /dev/snd/

  I driver alsa dispongono di specifici dispositivi nella directory
  /dev/snd. Se disponete di una scheda potrete vedere seguenti
  dispositivi:


       /dev/snd/pcmC0D0 - il dispositivo raw audio della scheda
       /dev/snd/mixerC0D0 - il mixer della scheda 0
       /dev/snd/controlC0D0 - il dispositivo di controllo della scheda 0




  Il primo numero indica il numero della scheda audio, il secondo numero
  (se c')  il numero del dispositivo. Una scheda audio con due dispos
  itivi PCM dovrebbe avere un dispositivo pcmC0D0 e pcmC0D1. Nota bene:
  i dispositivi ALSA sono cambiati dalle precedenti versioni. I vecchi
  dispositivi ALSA utilizzavano /dev/snd/pcm00 (il primo numero  la
  scheda, il secondo il dispositivo). Se questo HOWTO usa la vecchia
  notazione, scrivetemi, cos posso correggerlo.

  Adesso siete pronti a mettere un file audio nel dispositivo PCM della
  prima scheda. Provate quindi a fare un cat di un qualsiasi file di
  testo (un file qualunque) in /dev/snd/pcmC0D0, tipo: cat <nomefile> >
  /dev/snd/pcmC0D0.  <nomefile> pu essere un file qualsiasi, purch sia
  abbastanza lungo. Se avete un file audio da qualche parte potete
  provare con quello. Potete anche prendere il file che trovate su
  http://www.ldp.org/sounds/english.au,  Linus Torvalds che dice come
  si pronuncia Linux.

  L'impostazione predefinita del vostro dispositivo audio  8000 Hz, 8
  bit.  Questo significa che il file "english.au" di cui sopra
  riprodurr il parlato e gli altri file di testo semplicemente del
  rumore. Se non riuscite a sentire nulla controllate i vostri speaker,
  provate di nuovo con "amixer" o consultate un medico (pi avanti
  potrete facilmente utilizzare la vostra scheda a 48 Khz e 16 bit con
  il vostro player preferito, tipo sox o mpg123).

  Se avete caricato il modulo "snd-pcm1-oss" potete anche usare la
  compatibilit con OSS per accedere alla vostra scheda. Sono utilizzati
  i seguenti mapping:





  /dev/snd/pcmC0D0 -> /dev/audio0 (/dev/audio) -> minor 4
  /dev/snd/pcmC0D0 -> /dev/dsp0 (/dev/dsp) -> minor 3
  /dev/snd/pcmC0D1 -> /dev/adsp0 (/dev/adsp) -> minor 12
  /dev/snd/pcmC1D0 -> /dev/audio1 -> minor 4+16 = 20
  /dev/snd/pcmC1D0 -> /dev/dsp1 -> minor 3+16 = 19
  /dev/snd/pcmC1D1 -> /dev/adsp1 -> minor 12+16 = 28
  /dev/snd/pcmC2D0 -> /dev/audio2 -> minor 4+32 = 36
  /dev/snd/pcmC2D0 -> /dev/dsp2 -> minor 3+32 = 35
  /dev/snd/pcmC2D1 -> /dev/adsp2 -> minor 12+32 = 44





  6.4.  Informazioni aggiuntive

  Il file INSTALL nella directory del driver ALSA contiene alcuni
  accorgimenti per far capire le impostazioni al driver. L'avere o meno
  bisogno di questi comandi dipender dall'applicazione che userete per
  riprodurre l'audio. Le normali applicazioni di riproduzione audio,
  come mpg123, sox (frequentemente associato al comando ``play''), o le
  applicazioni per X11 come RealPlayer probabilmente funzioneranno
  correttamente comunque. In ogni caso io non li ho mai utilizzati.

  6.4.1.  /proc/asound/#/pcm#0




       "Playback erase" - cancella tutte le informazioni aggiuntive
       sulle applicazioni OSS
       "Playback <app_name> <fragments> <fragment_size> [<options>]"
       "Record erase" - cancella tutte le informazioni aggiuntive sulle applicazioni OSS
       "Record <app_name> <fragments> <fragment_size> [<options>]"




  <app_name> - nome dell'applicazione con (a priorit pi alta) o senza
  percorso

  <fragments> - numero dei frammenti o zero per modalit automatica

  <fragment_size> - dimensione dei frammenti in byte o zero per modalit
  automatica <options> - parametri opzionali

  WR_ONLY - se l'applicazione prova ad accedere al dispositivo pcm con
  O_RDWR il driver lo cambia in O_WRONLY (riproduzione) ottimo per Quake
  ecc.

  Esempi:


       echo "Playback x11amp 128 16384" > /proc/asound/0/pcm0o
       echo "Playback squake 0 0 WR_ONLY" > /proc/asound/0/pcm0o




  6.4.2.  /proc/asound/#card#/sb16






  "Playback 8" -> il driver utilizzer sempre il canale DMA a
  8-bit per la riproduzione.
  "Playback 16" -> il driver utilizzer sempre il canale DMA a 16 bit per la
  riproduzione.
  "Playback auto" (predefinito) -> il driver utilizzer l'impostazione
  automatica (il primo canale aperto utilizzer il canale DMA a 16 bit).
  "Record 8" -> il driver utilizzer sempre il canale DMA a 8 bit per la
  registrazione.
  "Record 16" -> il driver utilizzer sempre il canale DMA a 16 bit per la
  registrazione.
  "Record auto" (predefinito) -> il driver utilizzer l'impostazione automatica
  (il primo canale aperto utilizzer il canale DMA a 16 bit).




  Esempio: echo "Record 16" > /proc/asound/0/sb16

  Per altre informazioni si consulti il file INSTALL.


  7.  Trucchi e risoluzione dei problemi

  Si dia un'occhiata al file FAQ nella directory del driver audio.
  Questa sezione  ancora in lavorazione.

  7.1.  Compilazione del driver


  7.1.1.  Sorgenti del kernel Linux

  Se i vostri driver ALSA non si compilano correttamente e vi dicono
  delle cose su ``version.h'' o altri file header che non riescono a
  trovare questo potrebbe significare che non disponete dei file header
  del kernel. Date un'occhiata al Kernel HOWTO, scompattate un kernel
  recente in /usr/src e date il comando make config.


  7.2.  Caricamento del driver

  Si controllino le seguenti cose..


  7.2.1.  Compatibilit della scheda audio

  Siete sicuri al 100% che la vostra scheda audio SIA supportata?
  Controllate di nuovo. A volte una X123 non  uguale ad una X123b e voi
  potreste solo perdere del tempo. D'altra parte anche una scheda
  supportata pu darvi problemi - mi sono servite due ore per
  immaginarmi l'installazione di una CS4237B che, dopo tutto, si 
  dimostrata solo un esempio di RTFM (Acronimo di "Read The Fine Manual"
  (leggi il bel manuale) ndt).



  7.2.2.  ``Device busy'' o ``unresolved symbols''

  Potreste avere un kernel 2.0.x con supporto per l'audio compilato nel
  kernel, o il driver OSS/Lite (del kernel) potrebbero essere caricati
  (controllate con il comando cat /proc/modules). Rimuovete i driver o
  ricompilate il kernel (date un'occhiata al Kernel-HOWTO).

  Il modulo audio nella serie 2.0 del kernel si chiama ``sound.o'' e non
  dovrebbe essere attivo (il driver ALSA ``snd.o''  comunque OK).


  Se avete un kernel della serie 2.2.x senza driver audio compilato nel
  kernel, il driver ALSA comunque non funzioner.


  7.2.2.1.  Kernel 2.0

  So che non  molto chiaro, quindi permettetemi di spiegarlo una volta
  ancora.  Se avete un kernel della serie 2.0.x (il comando ``uname -a''
  vi dice qualcosa del tipo ``Linux penguin 2.0.35 #6 Wed Sep 23
  10:19:16 CEST 1998 i686 unknown'') dovete lasciare fuori i driver dal
  kernel.


  7.2.2.2.  Kernel 2.2

  Se avete un kernel della serie 2.2.x avrete bisogno dei driver audio.
  Un kernel della serie 2.2 dovr essere compilato con il supporto per
  il suono ma senza il driver della scheda audio. Quindi selezionate il
  supporto per l'audio ma assicuratevi che nessuno specifico driver di
  scheda audio sar compilato.



  7.2.3.  Riferimenti ad altri driver

  Un'altra ragione per la quale i driver potrebbero lamentarsi del fatto
  che il dispositivo sia occupato  che il file /etc/conf.modules
  contenga ancora dei riferimenti ai driver della scheda audio. Dovrete
  cancellarli e lasciare solo tutto ci che si riferisce ai driver ALSA
  (sarebbe bene lasciare come sono i riferimenti a driver che non siano
  di dispositivi audio).


  7.2.4.  Unresolved symbols rivisitato

  Un'altra sorgente di messaggi ``unresolved symbols'' potrebbe essere
  un nuovo kernel con i vecchi driver. Siete pregati di ricompilare i
  driver ALSA dopo aver ricompilato un nuovo kernel. Questo assicurer
  la compatibilit tra i driver ed il nuovo kernel.


  7.2.5.  Controllare le impostazioni PnP

  Siete sicuri che la vostra scheda audio sia attiva? Date un'ulteriore
  occhiata al PnP-HOWTO e controllate di aver attivato correttamente la
  vostra scheda audio.


  7.2.6.  Sono corretti i vostri parametri ?

  Controllate e ricontrollate i parametri della vostra scheda audio.
  Nota bene: 534 non  come 543 e neppure 0x534  uguale a 534.

  Oltretutto qualche scheda audio potrebbe richiedere un driver diverso
  da quello che vi aspettereste. Fate una pausa, prendetevi una birra o
  qualchecos'altro e date ancora un'occhiata al comando ``modprobe''.
  Per esempio il driver per la Crystal 4232 dovrebbe essere caricato da
  modprobe snd-card-cs4232, e non ``snd-cs4231'', e la SoundBlaster PCI
  64 deve essere caricata con ``snd-audiopci'', non con snd-es1370 (
  tutto scritto nella documentazione ed anche se io ho scritto un HOWTO,
  mi  successo una volta di perdere un intero pomeriggio cercando di
  persuadere snd-cs4231 a produrre del suono).




  7.3.  Driver caricato... ma nessun suono (o quasi)



  7.3.1.  Togliere il muting

  I driver ALSA possono sfruttare la funzione di ``muting'' di cui molte
  schede audio dispongono. Se avete caricato i driver audio e tutto 
  andato bene ma non sentite altro che silenzio, probabilmente avete
  dimenticato di togliere il mute alla scheda. Avrete bisogno di
  ``amixer'' o ``alsamixer'' per farlo, potete trovarli tutti e due nel
  pacchetto ALSA-utilities.  Digitate solamente


       amixer -c 1 master 70:70 unmute
       amixer -c 1 pcm 70:70 unmute
       amixer -c 1 cd 70:70 unmute




  dovrebbe funzionare per la maggior parte delle applicazioni.


  7.3.2.  Guadagno

  Molte schede audio dispongono di un componente del mixer a parte per
  l'amplificazione delle entrate/uscite aggiuntive. Questo componente 
  spesso chiamato ``gain'', ``in-gain'' per le entrate ed ``out-gain''
  per le uscite.  L'impostazione di questo componente ad un livello
  adeguato vi permetter di ottenere il massimo dai vostri speaker
  (pensate comunque ai vostri genitori/vicini/orecchie). Quindi un
  comando come


       amixer out-gain 100 unmute




  probabilmente vi sar di aiuto.


  7.3.3.  Compatibilit con OSS/Linux

  Se questa  la prima volta che utilizzate i driver ALSA e prima
  usavate i driver audio del kernel, probabilmente vorrete avere un
  driver audio che sia compatibile con quello precedente (ad es. che
  utilizzi i dispositivi /dev/pcmX). Dovrete caricare il ``driver di
  compatibilit OSS'' per ottenere questo risultato. Date il comando
  modprobe snd-pcm1-oss (date un'occhiata alla sezione dove si parla di
  caricare il driver). Nota bene: snd-pcm1-oss non  la stessa cosa di
  snd-pcm1, avete bisogno di snd-pcm1-oss per avere un supporto audio
  vecchio stile.


  7.3.4.  Cannot open mixer

  Se avete provato ad installare diverse versioni differenti di ALSA a
  volte il mixer resta inaccessibile. Questo accade se avete provato la
  0.3.2 e volete ritornare alla 0.3.0-pre4 (IIRC). Dovrete cancellare
  tutti i file libasound ed i link ad essi da /usr/lib e quindi
  ricompilare librerie e programmi di utilit:



  rm /usr/lib/libasound.*




  Solo per stare sicuri, cancellate tutti i driver ALSA quindi ricompi
  late, installate e caricare i driver.

  7.4.  Suggerimenti generici



  7.4.1.  Provate con ``insmod''

   sempre utile partire con il comando "insmod" invece che con kerneld.
  Avrete cos modo di vedere i possibili errori sullo schermo.


  7.4.2.  Leggete il file INSTALL.

  Un sacco di informazioni potete trovarle nel file INSTALL presente
  nella directory dei driver. Se il vostro driver si rifiuta di
  funzionare dateci un'occhiata per vedere se ci sono informazioni
  aggiuntive.


  7.4.3.  Messaggi di debug

  Come ultima spiaggia potete ricompilare il driver impostandolo in modo
  tale da inviare le informazioni di debug su /var/log/messages. Andate
  nella directory del driver con cd /usr/src/alsa-driver-.... e
  digitate:



       ./configure --with-debug=detect; make clean; make




  Rimuovete il driver (se esso  attivo si cerchi pi avanti un comando
  per la rimozione). Si usi il comando di "modprobe" che avete dato
  prima per caricare il driver appena compilato. Date un'occhiata in
  /var/log/messages per vedere se vi sono messaggi.


  7.4.4.  Se ancora non funziona...

  Se questi messaggi non vi sono di aiuto, mandate un messaggio alla
  mailing list degli utenti di ALSA, alsa-user@alsa-project.org.

  Accludete le seguenti informazioni:

    nome della scheda audio + chip presenti sulla scheda audio

    sezioni del file isapnp.conf attinenti se avete una scheda ISA PnP

    il vostro conf.modules o la linea che usate per attivare i driver
     ALSA

    tutti i messaggi di /var/log/messages che dovrebbero riguardare il
     driver ALSA




  7.5.  Segnalazioni di bug

  Se trovate un bug gli sviluppatori di ALSA vorrebbero sapere (minimo)
  le seguenti cose:

  1. versioni driver + kernel : 'cat /proc/asound/version'

  2. informazioni sulla scheda audio

    nome con il quale la scheda viene chiamata dal fabbricante

    lista dei chip che compongono la scheda

    contenuto di 'cat /proc/asound/cards'

  3. tutti i messaggi di /var/log/messages che sono attinenti al driver
     ALSA

  4. descrizione del problema


  7.6.  Trucco: riprodurre CD

  Se utilizzare kmod/kerneld ed i driver ALSA per riprodurre i CD,
  probabilmente kmod/kerneld non carica i driver come dovrebbe. Questo 
  dovuto al fatto che un player di CD dice solo al CD di cominciare a
  riprodurre senza utilizzare alcuno dei dispositivi che avvisano
  kmod/kerneld della necessit del suono.  L'utilizzo di modprobe
  potrebbe essere l'unica soluzione al vostro problema.


  7.7.  Trucco: installazione del driver seriale MIDI

  Normalmente la porta di IO del dispositivo seriale  di propriet del
  driver del dispositivo seriale. Quindi prima di dare il comando
  ``modprobe snd-serial'' dovremmo dire al driver di rilasciare il
  dispositivo seriale.

  Ecco la procedura.



       setserial /dev/ttyS0 uart none
       modprobe snd-serial




  (Sostituire /dev/ttyS0 con il giusto dispositivo /dev/ttySx se il
  vostro MIDI utilizza un diverso dispositivo seriale).


  7.8.  Trucco: nuovo kernel? Nuovi moduli!

  Dopo aver aggiornato il vostro kernel probabilmente avrete bisogno di
  ricompilare il driver ALSA. Se sono ancora nella directory originaria
  /usr/src, non dimenticatevi di dare un make clean prima di
  ./configure, make, make install.

  Ah, vi  una anomalia nella numerazione dei kernel: lo script di
  configurazione dicd che un kernel ``2.2.0ac1''  un ``not a number''
  (non un numero, ndt). Penso che questo sia stato risolto nei nuovi
  script di configurazione altrimenti dovreste cambiare la versione del
  kernel nei sorgenti.


  7.9.  Trucco: KDE ed i driver ALSA

  Supponete di avere KDE funzionante e di non riuscire per a far
  funzionare i suoni di sistema, come aprire le finestre, cambiare
  desktop ecc. L'audio funziona in generale. Se il vostro player cd e
  mp3 ed il mixer funzionano normalmente probabilmente quello che non
  funziona  solo "kwmsound".

  Quindi: assicuratevi che "kwmsound" sia nello script di avvio
  ($KDEDIR/bin/startkde)


  7.10.  Trucco: utilizzo dei dispositivi ALSA

  Se avevate gi precedentemente il supporto per il suono nel vostro
  sistema Linux  probabile che tutte le vostre applicazioni puntino a
  /dev/pcm0, /dev/audio e /dev/mixer. Questo va bene, se utilizzate il
  modulo di compatibilit con OSS, snd-pcm1-oss. Potrebbe essere meglio
  utilizzare i dispositivi ALSA veri, quelli che trovate in /dev/snd/.


  7.11.  Trucco: rimuovere tutti i moduli

  La rimozione di 10 o pi moduli uno ad uno non  cosa buona.
  Fortunatamente tutti i moduli iniziano con il prefisso "snd-", quindi
  un po' di programmazione da riga di comando potrebbe fare al nostro
  caso. Potete facilmente rimuovere i driver ALSA con un comando di
  questo tipo:



       cat /proc/modules|gawk '/^snd-/{print $1}|xargs -i rmmod {}




  Juergen Kahrs scritto: ``Ho uno script che rimuove anche soundcore,
  soundlow e sound se sono presenti e se non sono utilizzati. Lo script
  processa /proc/modules tre volte quindi non dovrebbero esserci troppi
  moduli dopo la sua esecuzione''. Ecco la sua soluzione:



       awk '/^snd/||/^sound/&&($3==0){system("rmmod " $1)}' /proc/modules /proc/modules /proc/modules




  Nota bene: se qualche modulo dipende da qualche altro modulo non si
  pu semplicemente rimuovere il modulo pi "in alto". Questo significa
  che potreste aver bisogno di una seconda esecuzione del comando di
  rimozione (comunque non ho mai incontrato questa situazione, sembra
  quindi che i moduli ALSA possano essere rimossi nell'ordine in cui
  appaiono nel file /proc/modules).












  Linux Apache SSL PHP/FI frontpage mini-HOWTO
  Marcus Faure, marcus@faure.de
  v1.1, Luglio 1998

  Questo documento tratta la costruzione di un server web multiesten
  sione che supporti contenuti web dinamici tramite il linguaggio di
  script PHP/FI, la trasmissione di dati sicuri basata sulle SSL di
  Netscape, l'esecuzione sicura dei CGI e le estensioni per un server
  Frontpage Microsoft. Traduzione di Marina Sturino (mcras
  tell@mbox.queen.it).

  1.  Introduzione

  Prima che iniziate a leggere: non sono madrelingua, cosicch  in
  questo documento ci saranno probabilmente errori di ortografia o
  grammaticali.  Sentitevi incoraggiati a informarmi degli errori.


  1.1.  Descrizione dei componenti

  Il server web che voi sperate di avere dopo aver letto questo HOWTO 
  composto da pi parti, il sorgente originale Apache con alcune (o
  meglio molte) patch ed alcuni eseguibili esterni.  Raccomando di usare
  le versioni del software che ho provato, le quali probabilmente si
  compileranno senza grandi problemi e dando come risultato un demone
  abbastanza stabile.  Se siete coraggiosi potete cercare di compilare
  tutte le ultime novit proposte, ma non biasimatemi se qualcosa va
  male ;-) Tuttavia potete riferirmi altre configurazioni di lavoro per
  includerle nelle versioni future di questo documento.  Tutti questi
  passi sono stati testati su una versione Linux 2.0.35, cosicch questo
  HOWTO  piuttosto specifico per Linux, ma potrete usarlo altrettanto
  bene per altri sistemi Unix.

  Non  necessario che compiliate tutti gli elementi. Ho cercato di
  strutturare questo HOWTO in modo che possiate saltare le parti che non
  vi interessano.

  Questo documento non  un manuale dell'utente n per Apache, n per
  SSL o PHP/FI n tantomeno per Frontpage.  Il suo scopo primario  di
  salvaguardare i fornitori di servizi web da molti mal di testa quando
  installano i loro server e di dare il mio piccolo contributo alla
  comunit Linux.

  PHP  un linguaggio di scripting che supporta pagine in HTML dinamico.
  Esso  strutturato come le SSI di Apache ma di gran lunga pi
  complesso ed ha dei moduli database per molti db popolari. Per il PHP
  sono necessarie le librerie GD.

  SSL  un'implementazione del Secure Socket Layer di Netscape che
  permette connessioni sicure su reti insicure, per esempio per
  trasmettere numeri di carte di credito tramite form sul web.

  Frontpage  uno strumento WYSIWYG per fare pagine web che usa alcune
  specifiche estensioni per il server chiamate webbot. Molte persone
  pensano che Frontpage sia "cool" perch permette di creare form e web
  di discussione senza avere conoscenze sull'HTML e su CGI. Tramite uno
  strumento di pubblicazione guidata sul web, evita all'autore di dover
  aggiornare il suo sito via ftp.  Se volete supportare Frontpage ma non
  volete installare un server windows, le estensioni per il server
  Apache sono la vostra soluzione.


  1.2.  Configurazioni di lavoro

  Penso che questo documento sia stato scaricato pi di 100 volte da
  quando l'ho pubblicato ma ho ricevuto solo piccoli commenti. In
  particolare, nessuno mi ha indicato altre configurazioni di lavoro.
  Per me le configurazioni di lavoro sono:

    Linux 2.0.31, Apache 1.2.4, PHP 2.0.0, SSL 0.8.0, fp 98 3.0.3 (*)

    Linux 2.0.33, Apache 1.2.5, PHP 2.0.1, SSL 0.8.0, fp 98 3.0.3 (*)

    Linux 2.0.35, Apache 1.2.6, PHP 3, SSL 0.8.0, fp 98 3.0.4

     (*) la versione 3.03 ``non  consigliata''.


  1.3.  Storia


  v0.0 Aprile '98: Anteprima

  v1.0 Giugno '98: Ora usando Apache 1.2.6, aggiornata la sezione
  frontpage, correzioni minori

  v1.1 Giugno '98: Versione ristrutturata in SGML

  Potete trovare l'ultima versione di questo documento sul sito:
  <http://www.faure.de>


  2.  Installazione dei componenti

  2.1.  Preparazione

  Voi avete bisogno di:

    Apache 1.2.6  <http://www.apache.org/dist/apache_1_2_6.tar.gz>

    Estensioni PHP/FI
     <http://php.iquest.net/files/download.phtml?/files/php-2.01.tar.gz>

    Libreria GD  <http://siva.cshl.org/gd/gd.html>

    SSL 0.8.0 <ftp://ftp.ox.ac.uk/pub/crypto/SSL/SSLeay-0.8.0.tar.gz>

    Patch SSL per Apache 1.2.6
     <ftp://ftp.ox.ac.uk/pub/crypto/SSL/apache_1.2.6+ssl_1.17.tar.gz>

    Estensoni server per frontpage 98 e script di installazione
     <http://www.rtr.com/fpsupport/download.htm>

  Potete prelevare i sorgenti che volete.  Decomprimete Apache, PHP, GD,
  e SSL in /usr/src. Decomprimete la patch SSL in /usr/src/apache_1.2.6.


  2.2.  Aggiungere PHP

  Fate cd in /usr/src/gd1.2 e scrivete make. Ci costruir la libreria
  GD libgd.ache dovr essere copiata in /usr/lib. Ora fate cd in
  php_2.0.1 e avviate ./install.  Le domande importanti sono:

  Would you like to compile PHP/FI as an Apache module? [yN] y
  Are you compiling for an Apache 1.1 or later server? [Yn] y
  Are you using Apache-Stronghold? [yN] y
  Does your Apache server support ELF dynamic loading? [yN] y
  Apache include directory (which has httpd.h)? [/usr/local/include/apache] /usr/src/apache_1.2.6/src
  Would you like to build an ELF shared library? [yN] y
  Additional directories to search for .h files []: /usr/src/gd1.2
  Would you like the bundled regex library? [yN] n

  Come le estensioni frontpage, phtml introduce un problema di sicurezza
  perch gira con lo uid del server web. Assicuratevi di attivare il
  modo sicuro (safe mode) in src/php.h e restringete il percorso di
  ricerca a un valore di sicurezza. Ci sono alcune altre opzioni in
  php.h che potreste voler modificare. Se siete molto preoccupati
  riguardo il problema della sicurezza, compilate php come un CGI.
  Tuttavia ci causer una diminuzione delle prestazioni e non sar cos
  forte come la versione a moduli.

  Digitate make per compilare il file. Quando la compilazione 
  terminata, copiare mod_php.* e lib_php.a in /usr/src/apache_1.2.6/src.
  Aggiungete la riga:

  Module php_module mod_php.o


  alla fine di /usr/src/apache_1.2.6/src/Configuration, aggiungete

  -lphp -lm -lgdbm -lgd


  alla EXTRA_LIBS nello stesso file,

  application/x-httpd-php phtml


  nell'Apache mime.types e

  AddType  application/x-httpd-php .phtml


  nell'Apache srm.conf.

  Potete anche voler aggiungere index.phtml alla DirectoryIndex in
  questo file, cosicch il file index.phtml sia caricato automaticamente
  quando si richiama la sua directory.


  2.3.  Aggiungere SSL

  Fate cd /usr/src/SSL-0.8.0; ./Configure linux-elf; make; make rehash.
  Questo creer le librerie richieste da Apache. Potete digitare make
  test per verificare la compilazione. Ora dovete applicare la patch ad
  Apache.  importante che la applichiate prima della patch per
  frontpage, altrimenti frontpage non funzioner.  Fate poi cd in
  /usr/src/apache_1.2.6/src e digitate patch <
  /usr/src/apache_1.2.6/SSLpatch.  Impostate
  SSL_BASE=/usr/src/SSLeay-0.8.0 in Configuration. Assicuratevi che
  Module proxy_module sia disabilitato altrimenti Apache non compiler.
  Se avete la necessit di avere un proxy, optate per Squid
  <squid.nlanr.net>

  Ora date make certificate per generare SSLconf/conf/httpsd.pem.


  2.4.  Aggiungere frontpage

  Rinominate il file fp30.linux.tar.Z come fp30.linux.tar.gz altrimenti
  lo script di installazione non lo trover. Fate partire ./fp_install
  per copiare i file delle estensioni in /usr/local/frontpage. zcat 
  solitamente invocato come /usr/bin/zcat Ora potete applicare la patch
  per frontpage. Fate cd in /usr/src/apache_3.2.6/src e digitate patch <
  /usr/src/frontpage/version3.0/apache-fp/fp-patch-apache_1.2.5.  Questo
  creer i file mod_frontpage.*, apporter delle modifiche in
  Configuration, ecc. La patch 1.2.5 funzioner sia con Apache 1.2.5 che
  1.2.6. Saltate la parte riguardo l'installazione del web, potrete
  farlo successivamente.


  3.  Mettere tutto assieme

  3.1.  Moduli Apache da cercare

  I moduli che io uso in aggiunta a SSL, PHP e frontpage sono:

  Module env_module          mod_env.o
  Module config_log_module   mod_log_config.o
  Module mime_module         mod_mime.o
  Module negotiation_module  mod_negotiation.o
  Module dir_module          mod_dir.o
  Module cgi_module          mod_cgi.o
  Module asis_module         mod_asis.o
  Module imap_module         mod_imap.o
  Module action_module       mod_actions.o
  Module alias_module        mod_alias.o
  Module rewrite_module      mod_rewrite.o
  Module access_module       mod_access.o
  Module auth_module         mod_auth.o
  Module anon_auth_module    mod_auth_anon.o
  Module digest_module       mod_digest.o
  Module expires_module      mod_expires.o
  Module headers_module      mod_headers.o
  Module browser_module      mod_browser.o




  3.2.  Rendere pi sicuri i CGI

  Se siete un ISP (internet service provider) (probabilmente lo siete se
  leggete questo) vorrete migliorare la sicurezza. Le utility suexec vi
  permetteranno di farlo; eseguiranno i CGI sotto lo UID del webowner
  invece di eseguirli con l'UID del server web. Andate in
  /usr/src/apache_1.2.6/support e date make suexec. Poi date chmod 4711
  suexec e copiatelo nella locazione specificata in ../src/httpd.h che
  solitamente  /usr/local/etc/httpd/sbin/suexec.  Se questo percorso vi
  sembra un po' criptico - come  parso a me - editate httpd.h e
  impostate il percorso a un valore per voi pi comodo.


  3.3.  Compilare ed installare il demone del server

  Entrate in /usr/src/apache_1.2.6/src ed editate Configuration per
  impostare tutti i moduli che volete includere nel vostro demone
  apache. Quando l'avete fatto, avviate ./Configure e make. Questo 
  l'ultimo (ed il pi complicato) passo per la configurazione che vi
  passer per le mani. Se ha successo, copiate httpsd in /usr/sbin. Il
  demone  piuttosto grande, tenetelo in considerazione quando
  assemblate il vostro server web. Create la directory /var/httpd con le
  sottodirectory cgi-bin, conf, htdocs, icons, virt1, virt2 e logs. In
  /usr/src/apache_1.2.6/conf editate access.conf-dist, mime.types e
  srm.conf-dist per adattarli alle vostre necessit e copiateli in
  var/httpd/conf/access.conf.  Copiate il file httpsd.pem che avete
  creato con make certificate in /var/httpd/conf. Usate il seguente
  httpd.conf:







  ServerType standalone
  Port 80
  Listen 80
  Listen 443
  User wwwrun
  Group wwwrun
  ServerAdmin webmaster@yourhost.com
  ServerRoot /var/httpd
  ErrorLog logs/error_log
  TransferLog logs/access_log
  PidFile logs/httpd.pid
  ServerName www.yourhost.com
  MinSpareServers 3
  MaxSpareServers 20
  StartServers 3

  SSLCACertificatePath /var/httpd/conf
  SSLCACertificateFile /var/httpd/conf/httpsd.pem
  SSLCertificateFile /var/httpd/conf/httpsd.pem
  SSLLogFile /var/httpd/logs/ssl.log

  <VirtualHost www.virt1.com>
  SSLDisable
  ServerAdmin webmaster@virt1.com
  DocumentRoot /var/httpd/virt1
  ScriptAlias /cgi-bin/ /var/httpd/virt1/cgi-bin/
  ServerName www.virt1.com
  ErrorLog logs/virt1-error.log
  TransferLog logs/virt1-access.log
  User virt1admin
  Group users
  </VirtualHost>

  <VirtualHost www.virt1.com:443>
  ServerAdmin webmaster@virt1.com
  DocumentRoot /var/httpd/virt1
  ScriptAlias /cgi-bin/ /var/httpd/virt1/cgi-bin/
  ServerName www.virt1.com
  ErrorLog logs/virt1-ssl-error.log
  TransferLog logs/virt1-ssl-access.log
  User virt1admin
  Group users
  SSLCACertificatePath /var/httpd/conf
  SSLCACertificateFile /var/httpd/conf/httpsd.pem
  SSLCertificateFile /var/httpd/conf/httpsd.pem
  SSLLogFile /var/httpd/logs/virt1-ssl.log
  SSLVerifyClient 0
  SSLFakeBasicAuth
  </VirtualHost>

  <VirtualHost www.virt2.com>
  SSLDisable
  ServerAdmin webmaster@virt2.com
  DocumentRoot /var/httpd/virt2
  ScriptAlias /cgi-bin/ /var/httpd/virt2/cgi-bin/
  ServerName www.virt2.com
  ErrorLog logs/virt2-error.log
  TransferLog logs/virt2-access.log
  </VirtualHost>



  A seconda dei moduli compilati in esso, non tutte le direttive sono
  disponibili. Potete ottenere una lista delle direttive disponibili
  digitando httpsd -h.

  3.4.  Aggiungere al web il supporto frontpage

  Entrate in /usr/local/frontpage/version3.0/bin e caricate ./fpsrvadm.
  Scegliete install e apache-fp.  Rispondete alle domande che seguono
  nel seguente modo:

  Enter server config filename: /var/httpd/conf/httpd.conf
  Enter host name for multi-hosting []: www.virt2.com
  Starting install, port: www.virt2.com:80, web: ""
  Enter user's name []: virt2admin
  Enter user's password:
  Confirm password:
  Creating root web
  Recalculate links for root web
  Install completed.



  Lo username deve essere quello di login unix del webowner, la password
  non deve necessariamente corrispondere alla password del sistema.
  Dovete aggiungere manualmente sendmailcommand:/usr/sbin/sendmail %r
  in /usr/local/frontpage/www.virt2.com:80.conf, altrimenti i vostri
  utenti non saranno in grado di inviare email generate dal web.  Ora
  date kill -HUP al vostro httpsd per far rileggere a fp la sua
  configurazione. Ora potete accedere a www.virt2.com con il vostro
  client frontpage.

  In alcune circostanze fpsrvadm protesta se non  stata installata
  prima una directory root per il web. Ci  praticamente inutile, ma
  dovrete farlo cos da far tacere fpsrvadm.


  3.5.  Avviare il demone

  Avviare apache con httpsd -f /var/httpd/conf/httpd.conf. Ora potete
  accedere a www.virt1.com sia attraverso http che https e ci 
  veramente "cool". Naturalmente dovete pagare per ottenere un
  certificato reale se volete offrire servizi SSL via web o gli utenti
  potrebbero deridervi.

  Copiate uno dei file demo della directory degli esempi php in virt1
  per testare phtml.


  3.6.  Alcune altre considerazioni

  Non usate le estensioni di frontpage '97. Non girano sotto Linux.
  Quando si installano le versioni specifiche delle librerie C++,
  sembrano funzionare correttamente, ma i vostri logs saranno presto
  riempiti di premature end of script headers e la vostra casella
  postale sar si riempir di proteste. Non usate le estensioni
  frontpage '98 antecedenti la versione 3.0.2.1330. Non confondetevi, i
  numeri di versione sono a volte non eterogenei. Facendo un telnet alla
  porta 80, scrivendo "get/http/1.0" (e premendo due volte invio),
  otterrete la versione numero 3.0.4 per frontpage.

  Potete trovare un numero di versione pi specifico eseguendo
  /usr/local/frontpage/currentversion/exes/_vti_bin/shtml.exe -version.
  Versioni pi vecchie hanno dei bug "cattivi" che richiedono che
  httpd.conf sia scrivibile dal GID del server web. Ci potrebbe farvi
  strillare se siete particolarmente preoccupati per la sicurezza.  Le
  versioni a partire dalla 3.0.2.1330 sono pi usabili.




  3.7.  Bug conosciuti

  Quando si utilizza Recalculate Links nel client frontpage, il server
  inizializza un processo che consuma il 99% dei cicli della CPU e pi
  di 10 Mb di memoria. Ma anche per i web di medie dimensioni e per
  macchine veloci, i client spesso ricevono un messaggio di timeout
  prima che l'elaborazione sia finita correttamente. Informate gli
  utilizzatori di frontpage di essere pazienti e di non utilizzare
  Recalculate Links molte volte. Equipaggiate il server con almeno 64 Mb
  di memoria.

  A questo punto notate che funzionano sia le SSL sia frontpage, ma non
  contemporaneamente, questo significa che non potete n pubblicare il
  vostro web usando SSL, n, far uso dei webbots tramite https. Potete
  pubblicare il vostro web sulla porta 80 ed accedere ad esso crittati
  sulla porta 443, ma i vostri contatori, ecc si interromperanno. Io
  considero questo un bug. Il problema verr corretto in SSL 0.9.0.


  3.8.  Considerazioni finali

  Per coloro che pensano che il titolo di questo howto sia quasi lungo
  quanto il documento: avete mai sentito Meat Loaf?

  O.K. lettori, per oggi avete finito. Sentitevi liberi di inviarmi le
  vostre critiche, la vostra gratitudine eterna, fiori, moneta
  elettronica, automobili, profumi, ecc.







































  Automount mini-Howto
  don@sabotage.org
  v0.3, 22 ottobre 1998

  Questo file descrive il programma autofs, una utility che esegue il
  mount automaticamente. Viene descritto come configurare questa utility
  e come risolvere i problemi pi comuni.  Traduzione di Zaxa Zaxu <bez
  zolone@yahoo.it>

  1.  Introduzione

  1.1.  Automount - come e perch

  L'automount  il processo che permette il mount e l'unmount di alcuni
  filesystem in maniera automatica. Questa operazione viene eseguita da
  un demone. Se il filesystem si trova in stato unmounted e l'utente
  cerca di accedervi, viene automaticamente eseguito il mount.  Questo
  tipo di funzionalit  utile in particolar modo in ambienti di rete
  molto estesi, oppure quando si ha la necessit di avere numerosi mount
  incrociati anche tra poche macchine (specialmente se alcune non sono
  sempre attive). Altri casi in cui  molto utile avere l'automount
  sono:

    la presenza di unit rimuovibili

    la necessit di avere il mount di filesystem dos in modalit
     conversione ascii attivata e disattivata contemporaneamente.

  1.2.  Tipi di automount

  Ci sono due diversi tipi di automounter in linux; AMD e autofs. AMD 
  il demone automount che funziona in maniera analoga al demone AMD del
  SunOS.  implementato nello spazio utente e non fa parte del kernel.
  Non  necessario per il kernel avere la funzionalit di automount
  integrata se viene eseguito il mount NFS utilizzando il demone AMD, in
  quanto il traffico diretto ai filesystem automontati vengono passati
  attraverso il sistema NFS.  Autofs  un sitema pi recente ed
  innovativo ed  assistito dal kernel. Questo significa che il codice
  del kernel che gestisce i filesystem conosce quali sono i punti di
  mount dei filesystem automontati. Il programma che esegue l'automount
  si rivolge al kernel per conoscerli. In questo mini-howto verr
  descritta solo l'utility autofs.


  2.  Installazione

  L'utility autofs si basa su funzionalit del kernel, perci il kernel
  deve essere compilato abilitandone il supporto. Nelle versioni del
  kernel 2.0.xx questa opzione si presenta come sperimentale, anche se
  si  dimostrata sufficientemente stabile. Nelle versioni del kernel
  2.1.xx (e 2.2.xx) non  pi sperimentale.


  Per il corretto funzionamento sono necessari anche il programma
  automount e i file di configurazione. Utilizzando la distribuzione
  RedHat (in cui il package RPM fa parte della installazione) non
  dovrebbero sorgere problemi. Il programma automount dovrebbe essere
  inizializzato da uno script rc che si trova in /etc/rc.d/init.d.  La
  corretta installazione del package RPM installa anche questo script,
  ma bisognerebbe assicurarsi che questo script venga eseguito al boot,
  creando un link in una delle directory rc?.d, utilizzando il pannello
  di controllo fornito con RedHat, oppure, se si utilizzano altre
  distribuzioni, utilizzando un qualunque altro metodo.  Non  comunque
  necessario comprendere a fondo quali operazioni esegue lo script di
  avvio. Se si sta leggendo questo howto, non dovrebbe comunque
  interessare.
  3.  Configurazione

  L'installazione del package RPM dovrebbe essere abbastanza agevole, ma
  ci sono alcuni particolari che  meglio controllare, soprattutto se
  non lo si  mai fatto prima.


  Ci sono due file in /etc, che si chiamano auto.master e auto.misc.  Il
  contenuto del mio auto.master  il seguente:

  /auto   /etc/auto.misc  --timeout 60



  Il primo parametro non  il mount point, ma il percorso base del set
  di mount point.  Il secondo parametro indica dove trovare i mount
  point.  Il terzo parametro indica che i filesystem di cui si 
  eseguito l'automount possono cominciare a tentare l'unmount 60 secondi
  dopo l'utilizzo. Non viene ovviamente effettuato l'unmount se i
  filesystem sono in uso.

  Auto.misc  il "map file" predefinito. Possono essere definiti diversi
  "map file" in auto.master.  Questo  il contenuto del mio auto.misc:

  kernel          -ro,soft,intr           ftp.kernel.org:/pub/linux
  cd              -fstype=iso9660,ro      :/dev/cdrom
  zip             -fstype=auto            :/dev/hdd4
  floppy          -fstype=vfat            :/dev/fd0



  La prima colonna ("chiave") indica il mount point. In base all'esempio
  che stiamo considerando diventa /auto/kernel, /auto/cd, /auto/zip ecc.
  La seconda colonna indica le opzioni di mount. Per l'elenco i opzioni
  leggere la pagina di manuale relativa a mount (man mount).  L'ultima
  colonna indica la provenienza del filesystem. La prima voce ("kernel")
   un mount NFS. Il simbolo : sulle altre righe indica un device
  locale.


  4.  Aspettando l'unmount

  Qualche lettore avr dato un'occhiata ai 60 secondi necessari per
  l'unmount automatico e avr pensato: Forse  un po' troppo per
  attendere l'unmount di un dischetto... Forse  sufficiente eseguire un
  sync e tirar fuori il dischetto, cos nessuno se ne accorge!  Vorrei
  suggerire una strategia pi sicura.  Innanzitutto  possibile
  modificare il timeout. Ma questo potrebbe non bastare, o diventare
  poco efficiente in termini di prestazioni. Un'altra possibilit 
  quella di mandare il segnale SIGUSR1 al processo automount
  (utilizzando kill). Ma prima che si inizi a creare bottoni sul desktop
  per eseguire unmount,  bene chiarire una serie di problemi che
  potrebbero insorgere.

  Il processo automount lanciato dall'utente root e accetta segnali
  solamente da root. Una delle ragioni che potrebbero spingere l'utente
  ad utilizzare automunt  al contrario la possibilit di eseguire
  queste operazioni SENZA essere root. Sarebbe semplice creare un
  programma C che esegue il "lavoro brutale" come suid-root.  Comunque 
  possibile utilizzare sudo per permettere agli utenti di mandare
  l'opportuno segnale di kill. L'unico problema  che sudo non permette
  di utilizzare gli apici (') per processare le opzioni che permettono
  di individuare il PID corretto del processo a cui mandare il segnale.
  Si dovrebbe invece disporre del programma killall, che permette di
  esegure questo (ringrazio per i suggerimenti ricevuti):

  ALL     ALL=NOPASSWD:/usr/bin/killall -USR1 automount


  In alternativa si dovrebbe permettere agli utenti di mandare il seg
  nale -SIGUSR1 a tutti i processi. Questo per potrebbe avere effetti
  collaterali su altri programmi: costringe il riciclo di alcuni window
  manager e forza la chiusura di xemacs.


  5.  Domande e risposte



  5.1.  Non riesco a vedere /auto/floppy, o altri mount point che sto
  cercando.

  Se automount  configurato correttamente, qualunque mount point che si
  sta ricercando sar disponibile al momento dell'utilizzo, anche se non
  lo si vede nel momento in cui non viene utilizzato. Se si sta
  eseguendo il browse delle directory con un programma grafico potrebbe
  essere necessario digitare manualmente il percorso. Sicuramente il
  peggior difetto di autofs  appunto il fatto che non si possa scorrere
  e scegliere tra i vari mount point (che al momento risultano non
  utilizzati e quindi invisibili. Se questa particolarit risulta
  inaccettabile, modificare la configurazione del sistema (per inciso i
  file che terminano in .c come "configurazione").


  5.2.  Come faccio a vedere che cosa  in stato di mount?

  Usare il comando df. mount senza opzioni mostra anche le opzioni
  utilizzate per eseguire il mount.


  5.3.  Ho inserito ("vfat") che  stato riconosciuto automaticamente
  come in semplice disco FAT.

  Questo non  un problema di automount.  Se si specifica, al momento
  corrente, il paramentro "auto" come tipo di filesystem, non viene
  testato il mount del filesytem vfat, per cui viene eseguito il mount
  come msdos. In effetti VFAT  solamente una variante del filesystem
  FAT/MSDOS, che permette l'utilizzo dei nomi di file lunghi.

  Stando alle osservazioni di uno degli autori di mount (??) il
  programma mount  soltanto una interfaccia ad una chiamata di sistema,
  ed  comunque responsabilit dell'utente la specifica del tipo di
  filesystem. Attualmente viene tentato il mount seguendo un ordine ben
  preciso nell'elenco dei file system disponibili, piuttosto che un
  metodo pi "euristico", attualmente in via di sviluppo. Nel frattempo
   impossibile eseguire il mount di un filesystem vfat a meno che non
  se ne specifichi esplicitamente il tipo. Molto probabilemnte questo
  inconveniente verr risolto a breve.


  5.4.  Il mio filesystem /cicciopippo   in stato di mount e non riesco
  a fare l'unmount con kill -SIGUSR1 .

   sicuramente in uso da parte di qualcuno o qualcosa. Probabilmente 
  impossibile eseguire anche l'unmount manuale. Controllare la presenza
  di qualche shell posizionata sulla directory, oppure qualche
  applicazione, directory browser o altro che ha lasciato per cos dire
  la "porta aperta". Se non si riesce ad individuare chi o cosa sta
  effettuando il blocco, provare ad utilizzare il programma fuser.



  5.5.  Chi devo ringraziare per la disponibilit di autofs?

  Non ringraziatemi. Non ho niente a che fare con questa utility. Ho
  soltanto voluto evidenziare il grande lavoro che  stato fatto con
  autofs, e mostrare la sua facilit di utilizzo. Confrontato con il
  precorsore AMD (che viene tra l'altro venduto ad un prezzo maggiorato
  perch corredato di una serie di utility a dir poco preistoriche),
  autofs  molto ben documentato e i suoi sviluppatori hanno tutti i
  miei ringraziamenti. Il copyright indicato  Transmeta, per cui non ho
  a disposizione una lista di nomi.


  5.6.  Dove posso trovare maggiori informazioni sull'automount?

  E possibile trovare un tutorial su autofs qui
  <http://www.linuxhq.com/lg/issue24/nielsen.html>.  Provare inoltre le
  am-utils qui  <http://www.cs.columbia.edu/~ezk/am-utils>.

  (Ringrazio per questi URL)















































  BTTV Mini-HOWTO
  di Eric Sandeen, eric_sandeen@bigfoot.com
  v0.3, Febbraio 2000

  Questo documento descrive l'hardware, il software e le procedure nec
  essarie per utilizzare sotto Linux una scheda di cattura video o una
  scheda TV basata su chipset bt8x8.  Traduzione di Andrea Nicolini,
  andrea@teamsw.it, Aprile 2000

  1.  Introduzione


  La capacit di catturare e visualizzare sorgenti video  una delle pi
  interessanti caratteristiche multimediali di Linux. Sono supportati
  molti tipi di dispositivi attraverso le API video4linux (
  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>), incluse diverse
  schede TV basate sui chipset Conexant bt848 e bt878.  Questo documento
  spiega come utilizzare tali schede su di un sistema Linux.


  1.1.  Copyright di questo documento (in inglese).


  This HOWTO is copyrighted 1999 Eric Sandeen.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO co-ordinator at the address given below.  In short, we wish to
  promote dissemination of this information through as many channels as
  possible. However, we do wish to retain copyright on the HOWTO
  documents, and would like to be notified of any plans to redistribute
  the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at linux-howto@metalab.unc.edu via email.


  1.2.  Dove trovare questo documento


  La versione ufficiale pi recente di questo documento pu essere
  scaricata dal sito del Linux Documentation Project
  <http://metalab.unc.edu/LDP/>.


  1.3.  Riconoscimenti


  Grazie a Ralph Metzler e Marcus Metzler per aver scritto il driver
  originale bttv. Grazie anche ad Alan Cox per aver creato le API
  Video4Linux, Gerd Knorr per il suo lavoro sulle schede radio, per le
  versioni successive bttv e per xawtv. Grazie a chiunque abbia
  contribuito al supporto Linux per queste schede. Grazie a William
  Burrow che scrisse un HOWTO su BTTV, che ho utilizzato per migliorare
  questa guida.

  Nello scrivere questo HOWTO ho utilizzato pesantemente la
  documentazione su bttv e xawtv.


  1.4.  Liberatoria


  Usate le informazioni in questo documento a vostro rischio e pericolo.
  Mi dissocio da qualsiasi problema legale che nasca dal contenuto di
  questo documento. Usate i concetti, esempi, e/o gli altri contenuti di
  questo documento a vostro rischio.

  Tutti i diritti d'autore sono, se non diversamente specificato,
  detenuti dai rispettivi autori. L'uso di un termine in questo
  documento non deve essere considerato come violazione di un marchio
  depositato.

  Nominare prodotti particolari o marche non deve essere visto come una
  forma pubblicit. Vi raccomando fortemente di fare i backup del vostro
  sistema prima dell'installazione e di continuare a farne ad intervalli
  regolari.



  2.  Requisiti hardware


  Dal README del pacchetto bttv:

  Bttv  un driver per schede di acquisizione video basate su chip della
  famiglia Bt848 di Conexant ( <http://www.conexant.com>).  Questa
  famiglia comprende Bt484, Bt484A, Bt849 e Bt879.  Le uniche differenze
  che esistono fra le varie schede dei vari produttori consistono nei
  sintonizzatori e nei componenti aggiuntivi adottati.  Per esempio,
  alcune schede della Hauppauge hanno dei chip addizionali per il
  televideo e per la decodifica del suono. Solo alcuni di questi
  componenti sono supportati da bttv. Anche il tipo ed il numero degli
  ingressi pu variare.

  Sono supportate le seguenti schede:


    AverMedia TV98

    <http://www.aver.com/products.html>



    AVerMedia TV-Phone

    <http://www.aver.com/lite/products/avertvphone.html>



    Diamond DTV2000

    <http://www.diamondmm.com/products/current/dtv-2000.cfm>



    Hauppauge Win/TV pci (e altre schede Hauppauge)

    <http://www.hauppauge.com/>



    IDS Imaging FALCON

    <http://www.ids-imaging.de/>



    Lifeview Flyvideo II

    <http://www.lifeview.de/lifeview/html/produkte.htm#karte>



    Matrix Vision MV-Delta

    <http://www.matrix-vision.de/>



    miroVIDEO PCTV

    <http://www.pinnaclesys.com/>



    Osprey-100

    <http://www.mmac.com/products/osprey/osprey100.html>



    STB TV PCI

    <http://www.stb.com/products/multimedia/tvpci/tvpci.html>



    Terratec TERRA TV+

    <http://www.terratec.de/produkte/terratv/terratv_info.htm>



    Videologic Captivator PCI

    <http://www.videologic.com/Productinfo/capt_pci.htm>



  Se conoscete altre schede che funzionano, scrivetemi cosicch io possa
  aggiungerle nella prossima revisione di questo documento.


  3.  Requisiti Software


  Per utilizzare queste schede TV sotto Linux, avrete bisogno
  dell'appropriato driver. I driver bttv sono parte del kernel dalla
  versione 2.2.0.


  In alternativa, potete utilizzare l'ultima versione del pacchetto bttv
  insieme ad un kernel 2.0.35 o superiori. Questa soluzione per non
  sempre funziona correttamente. Le versioni pi aggiornate di questo
  pacchetto sono rese disponibili da Gerd Knorr  <http://www.in-
  berlin.de/User/kraxel/xawtv.html>, il quale ha aggiunto anche il
  supporto per diversi chip audio tra cui il TEA6300, TDA8425 e il
  DPL3518.

  Se siete nuovi nel mondo dei driver bttv, vi suggerisco di cominciare
  ad utilizzare i driver compresi nell'ultimo kernel. Se avete problemi,
  oppure se la vostra scheda non  supportata, provate con la
  distribuzione di bttv versione 0.6 oppure con la versione 0.7 di Gerd
  Knorr.


  Questo documento si basa principalmente sui driver del kernel versione
  2.2.14, con qualche cenno alle caratteristiche disponibili nel
  pacchetto bttv versione 0.6.  La versione 0.7 non  trattata siccome
  si trova attualmente in fase di sviluppo.


  4.  Configurazione di sistema


  4.1.  Installazione Hardware

  (Grazie a William Burrow per questa sezione.)


  Se non ve la sentite di aprire il vostro computer, assicuratevi di
  aver letto questo HOWTO per intero e di aver preso nota delle
  caratteristiche tecniche della vostra scheda, come il tipo di
  sintonizzatore ed il modello dei chip.  Successivamente potrete
  affidarvi ad una persona in grado di installare la vostra scheda per
  voi.


  Altrimenti aprite il vostro computer ed installate la scheda in uno
  slot libero. Possibilmente lo slot dovrebbe supportare il PCI bus
  transfer ed il PCI bus mastering. Consultate il manuale della scheda
  madre per ulteriori informazioni.


  Per quanto riguarda il suono, esistono diversi modi per collegare la
  vostra scheda di acquisizione video alla vostra scheda sonora.  Un
  metodo consiste nel collegare internamente i due dispositivi
  attraverso il cavetto audio del CD-ROM, che dovr essere inserito
  nell'ingresso della scheda video, la quale dovr essere a sua volta
  collegata alla scheda sonora o ad un sintonizzatore.  Un altro modo
  consiste nel connettere esternamente i due dispositivi, utilizzando un
  cavetto dotato di due jack da 1/8 di pollice.  Questo cavo andr
  inserito nell'uscita esterna della vostra scheda TV e nell'ingresso
  esterno della vostra scheda audio.  Se non vi interessano questi tipi
  di collegamento potrete sempre collegare delle casse all'uscita della
  vostra scheda TV.  Alcune schede basate su chip bt878 non sono dotate
  di connettori audio, in quanto utilizzano il bus PCI per trasferire i
  dati audio.  Attualmente non vi sono supporti per questa tecnologia.

  Per verificare se la scheda funziona correttamente sar necessaria una
  sorgente video. Molte schede supportano ingressi Composite Video, S-
  Video e RF. Normalmente esiste un connettore per ogni tipo di
  ingresso.



  4.2.  Configurazione del kernel



  Il vostro kernel deve essere configurato correttamente per supportare
  la vostra scheda. Molte distribuzioni recenti sono gi dotate di tutti
  i moduli necessari precompilati, cos se trovate i moduli videodev.o,
  bttv.o e tuner.o sotto /lib/modules/2.x.x/misc, dovreste essere pronti
  per provare.

  Se non li trovate, dovrete ricompilare il kernel con

  CONFIG_VIDEO_DEV


  e

  CONFIG_VIDEO_BT848



  abilitati, meglio se come moduli. Se avete dubbi per quanto riguarda
  la compilazione del kernel date un'occhiata al Linux Kernel HOWTO (
  <http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html>).



  4.3.  Come usare i pacchetti versione 0.6.x


  Se intendete utilizzare i pacchetti della serie 0.6.x, dovrete prima
  scaricare il file in formato tar da Internet.  Per scomprimerlo
  eseguite il seguente comando

  tar -xvzf bttv-0.6.x.tar.gz

  poi entrate nella directory appena creata. Se non siete root dovrete
  lanciare 'su' poi potrete digitare

  make

  nella directory principale per creare i driver. Dopo aver compilato i
  moduli potrete lanciare

  make install

  per installarli. In fine, digitate

  /sbin/depmod -a

  per aggiornare le dipendenze dei moduli.



  4.4.  File speciali sotto /dev


  La prossima cosa da verificare  l'esistenza dei file di dispositivo
  sotto /dev. Digitate ls /dev/video*; ls /dev/radio* per vedere se i
  file esistano gi. Se non  cos dovrete crearli.  Tutti i file di
  dispositivo di cui abbiamo bisogno hanno 81 come major number, mentre
  il minor number dipende dal dispositivo specifico (video, radio,
  ecc.). Per informazioni relative alla programmazione consultate le
  Video4Linux API (
  <http://roadrunner.swansea.uk.linux.org/v4lapi.shtml>).


  Nella directory dei driver del pacchetto bttv esiste uno script
  chiamato MAKEDEV che creer i dispositivi automaticamente.  Se
  possedete solo una scheda TV potrete creare i dispositivi anche a
  mano.  Entrate come root e digitate:


  mknod /dev/video0 c 81 0

  chmod 666 /dev/video0

  ln -s /dev/video0 /dev/video


  mknod /dev/radio0 c 81 64

  chmod 666 /dev/radio0

  ln -s /dev/radio0 /dev/radio


  Esistono anche dispositivi videotext e VBI che hanno bisogno di un
  device file (attualmente sono ancora molto pochi).  Digitate:

  mknod /dev/vtx0 c 81 192

  chmod 666 /dev/vtx0

  ln -s /dev/vtx0 /dev/vtx


  mknod /dev/vbi0 c 81 224

  chmod 666 /dev/vbi0

  ln -s /dev/vbi0 /dev/vbi


  4.5.  Caricare i moduli


  Il driver bttv offre molti moduli diversi, ognuno dei quali  dotato
  di molte opzioni differenti. Per far funzionare correttamente il
  driver sar quindi necessario provare i moduli con le relative opzioni
  finch tutto non funzioner a dovere.  Siccome esiste una remota
  possibilit di mandare in crash il vostro sistema vi consiglio di
  digitare

  sync; sleep 1; sync

  per scaricare i buffer sul disco prima di procedere. Successivamente
  potrete lanciare insmod come root per provare a caricare i moduli.  I
  primi due moduli solitamente non danno problemi, in quanto non
  necessitano di opzioni:

  insmod videodev

  insmod i2c

  Ora siete pronti per caricare il driver bttv:

  modprobe bttv

  Di default, il modulo bttv tenter di rilevare il modello della vostra
  scheda. Date un'occhiata a /var/log/messages per vedere se  stata
  rilevata.  Se il modulo non ha rilevato automaticamente la vostra
  scheda, potrete aggiungere l'opzione card=n all'ultimo comando, dove n
  sta per il tipo di scheda elencato di seguito (i tipi dal 0 al 19 sono
  quelli supportati dai driver del kernel, quelli dal 20 al 27
  appartengono invece al pacchetto bttv-0.6.4h). Se la vostra scheda 
  dotata di funzionalit radio potrete aggiungere l'opzione radio=1 per
  attivarle.

  ______________________________________________________________________
     card=n      tipo di scheda
                    0:  Auto-Detect
                    1:  Miro
                    2:  Hauppauge (old bt848 boards)
                    3:  STB
                    4:  Intel
                    5:  Diamond
                    6:  AVerMedia
                    7:  MATRIX Vision MV-Delta
                    8:  FlyVideo
                    9:  TurboTV
                    10: Hauppauge (new bt878 boards)
                    11: MIRO PCTV pro
                    12: Terratec/Vobis TV-Boostar
                    13: Newer Hauppauge WinCam (bt878)
                    14: MAXI TV Video PCI2
                    15: Terratec TerraTV+
                    16: Aimslab VHX
                    17: PXC200
                    18: AVermedia98
                    19: FlyVideo98 (newer FlyVideo cards)
                    20: Zoltrix TV-Max
                    21: iProTV
                    22: ADS Technologies Channel Surfer TV
                    23: Pixelview PlayTV (bt878)
                    24: Leadtek WinView 601
                    25: AVEC Intercapture
                    26: LifeView FlyKit w/o Tuner
                    27: Intel Create and Share PCI
  ______________________________________________________________________





  Poi caricate il modulo del sintonizzatore, con

  modprobe tuner type=n

  Probabilmente dovrete guardare direttamente sulla vostra scheda TV per
  scoprire il tipo di sintonizzatore di cui  dotata.  Alcune schede
  (Miro e Hauppauge) permettono il rilevamento automatico del
  sintonizzatore, ma a volte sar necessario specificarlo ugualmente.
  Il sintonizzatore dovrebbe riportare la marca, inoltre potrete
  osservare sui cristalli (piccoli cilindretti di alluminio) sei si
  tratta di un sintonizzatore PAL o NTSC. Per i PAL i cristalli sono
  marchiati 28.xxxMHz (dove xxx sono 3 numeri), gli NTSC invece
  riportano 35.xxxMHz.  Una volta identificato il sintonizzatore potrete
  scegliere il valore appropriato dalla seguente tabella (i tipi 8 e 9
  sono inclusi solo nel pacchetto bttv-0.6.4h):















  ______________________________________________________________________

    type=n          Tipi di sintonizzatore:
                    0: Temic PAL tuner
                    1: Philips PAL_I tuner
                    2: Philips NTSC tuner
                    3: Philips SECAM tuner
                    4: no tuner
                    5: Philips PAL tuner
                    6: Temic NTSC tuner
                    7: Temic PAL tuner
                    8: Alps TSBH1 NTSC tuner
                    9: Alps TSBE1 PAL tuner
  ______________________________________________________________________




  Infine, inserite i moduli per il sonoro. Probabilmente dovrete
  verificare nuovamente il tipo di chip sonoro della vostra scheda.
  Ricordate che i driver per TEA6300, TDA8425, TDA9855 e DPL3518 sono
  inclusi solo nel pacchetto 0.6.4h e mancano dalla distribuzione del
  kernel versione 2.2.14.


  modprobe msp3400 o tea3600 o tda8425 o tda9855 o dpl3518 (guardate
  l'appendice per i dettagli)

  Finalmente potrete lanciare la vostra applicazione preferita per
  vedere se tutto funziona correttamente. Se non riuscite a cambiare
  canale probabilmente non avete caricato il modulo del sintonizzatore
  (tuner).  Se invece non sentite alcun suono probabilmente ci sono dei
  problemi con il modulo audio, oppure avete il canale audio settato su
  mute.


  4.6.  Automatizzare il caricamentio dei moduli


  Una volta che avete imparato quali moduli e quali opzioni vi servono,
  potrete automatizzare il loro caricamento editando il file
  /etc/conf.modules.  Cos facendo i moduli verranno caricati
  automaticamente ogniqualvolta un programma ne abbia bisogno.  La mia
  configurazione  la seguente:


  ______________________________________________________________________
    # TV
    alias   char-major-81   bttv
    pre-install bttv        modprobe -k tuner; modprobe -k msp3400
    options bttv            radio=1 card=3
    options tuner           type=2
  ______________________________________________________________________




  Assicuratevi di modificare questa configurazione in base ai moduli e
  alle opzioni della vostra scheda (ricordate anche di rilanciare
  /sbin/depmod -a per aggiornare le dipendenze dei moduli).


  5.  Applicazioni



  Ora che il vostro kernel, i vostri dispositivi e i vostri moduli sono
  configurati, avrete bisogno di un'applicazione per visualizzare e
  catturare le immagini dalla vostra scheda.  Ce ne sono diverse
  disponibili:


    bttvgrab - Applicazione di cattura video

    <http://moes.pmnet.uni-oldenburg.de/bttvgrab/>



    Gnome-o-Vision - Visualizzatore per Gnome

    <http://cvs.gnome.org/lxr/source/gnomovision/>


    kwintv - Applicazione TV per KDE

    <http://www.mathematik.uni-kl.de/~wenk/kwintv/>



    wmtune - Sintonizzatore radio per Window Maker

    <http://home.pages.de/~fionn/archive/wmtune-1.0_bttv.tar.bz2>



    wmtv - Dock Application per Window Maker

    <http://www.student.uwa.edu.au/~wliang/>



    XawTV - Applicazione TV ed utilit varie

    <http://www.in-berlin.de/User/kraxel/xawtv.html>



    XtTV - Semplice programma TV/Video per Linux/X Windows

    <http://home.pages.de/~rasca/xttv/>



  Assicuratevi di leggere tutta la documentazione per ogni applicazione
  che intendete usare. Molte di queste, infatti, prima che possano
  funzionare necessitano di file di configurazione adeguatamente
  modificati!  A causa dei diversi tipi di schede presenti in commercio,
  dovrete trovare il tempo per leggere la documentazione. Molto spesso i
  valori di default di queste applicazioni non funzioneranno per le
  vostre schede.



  6.  Appendice - Argomenti per i moduli


  Gli elementi preceduti da "*" sono disponibili solo nel pacchetto
  0.6.4h




  ______________________________________________________________________


    videodev.o
            questo  il modulo base di video4linux, tutti
            i driver video si registrano qui.

    i2c.o
            questo  il modulo generico i2c. Serve per gestire
            il bus i2c, tutti i moduli a parte videodev.o lo usano.

            insmod args:
                    scan=1          ricerca dispositivi i2c sul bus
                    verbose=0       zittisce i2c
                    i2c_debug=1     serve per il debugging attraverso syslogd

    bttv.o
            il driver per bt848

            insmod args:
                    remap=adr       rimappa la memoria del Bt848 a adr<<20
                    vidmem=base     indirizzo del frame buffer >>20
                    triton1=0/1     per compatibilit con Triton1
                    pll=0/1/2       impostazione del pll
                                    0: non usa PLL
                                    1: cristalli a 28 MHz
                                    2: cristalli a 35 MHz
                    radio=0/1       supporto radio
                    card=n          tipo di scheda
                                    0:  Auto-Detect
                                    1:  Miro
                                    2:  Hauppauge (schede bt848 pi vecchie)
                                    3:  STB
                                    4:  Intel
                                    5:  Diamond
                                    6:  AVerMedia
                                    7:  MATRIX Vision MV-Delta
                                    8:  FlyVideo
                                    9:  TurboTV
                                    10: Hauppauge (schede bt878 pi nuove)
                                    11: MIRO PCTV pro
                                    12: Terratec/Vobis TV-Boostar
                                    13: Newer Hauppauge WinCam (bt878)
                                    14: MAXI TV Video PCI2
                                    15: Terratec TerraTV+
                                    16: Aimslab VHX
                                    17: PXC200
                                    18: AVermedia98
                                    19: FlyVideo98 (schede FlyVideo pi nuove)
                                    *20: Zoltrix TV-Max
                                    *21: iProTV
                                    *22: ADS Technologies Channel Surfer TV
                                    *23: Pixelview PlayTV (bt878)
                                    *24: Leadtek WinView 601
                                    *25: AVEC Intercapture
                                    *26: LifeView FlyKit w/o Tuner
                                    *27: Intel Create and Share PCI

            remap, card, radio e pll accettano fino a 4 argomenti separati da
            virgola (per schede multiple). I default della scheda e del pll
            sono definiti nel Makefile.

    msp3400.o
            Questo  il driver per il chip sonoro msp34xx. Se avete una scheda
            stereo probabilmente avrete bisogno di questo modulo.

            insmod args:
                    debug=1/2       server per il debugging tramite syslogd.


    *tea6300.o
            Questo  il driver per il chip tea6300. Se avete una scheda stereo
            ma il msp3400 non funziona, provate questo.

            insmod args:
                    debug=1         server per il debugging tramite syslogd.

    *tda8425.o
            Questo  il driver per il chip tda8425. Questo driver fa solitamente
            parte di bttv.o, quindi sei il vostro sonoro funzionava ma ora non
            funziona pi, provate a caricare questo modulo.

            insmod args:
                    debug=1         server per il debugging tramite syslogd.

    *tda9855.o
            Questo  il driver per il chip audio tda9855.

            insmod args:
                    debug=1         server per il debugging tramite syslogd.

    *dpl3518.o
            Questo  il driver per il chip dpl3518a per il Dolby processing.

            insmod args:
                    debug=1         server per il debugging tramite syslogd.

    tuner.o
            Questo  il driver per il sintonizzatore. Avrete bisogno di questo
            a meno che non utilizziate una telecamera o un sintonizzatore esterno.

            insmod args:
                    debug=1         server per il debugging tramite syslogd.
                    type=n          tipo di sintonizzatore:
                                    0: Temic PAL tuner
                                    1: Philips PAL_I tuner
                                    2: Philips NTSC tuner
                                    3: Philips SECAM tuner
                                    4: no tuner
                                    5: Philips PAL tuner
                                    6: Temic NTSC tuner
                                    7: Temic PAL tuner
                                    *8: Alps TSBH1 NTSC tuner
                                    *9: Alps TSBE1 PAL tuner

    i2c_chardev.o
            Definisce un device a caratteri per l'accesso al bus i2c.
            Funziona solo con i kernel 2.1.x, non  compilato di default.
  ______________________________________________________________________













  Battery Powered Linux Mini-HOWTO
  Hanno Mueller, hanno@lava.de http://www.lava.de/~hanno/
  Dec 21, 1997

  Questo documento spiega come ridurre il consumo di energia di un sis
  tema Linux modificando alcuni parametri della sua configurazione, il
  che sar utile a chiunque usi Linux su un computer portatile. Ci sono
  anche alcune informazioni generiche sulla manutenzione delle batterie
  del vostro portatile.  Se state usando Linux su un computer da tavolo,
  probabilmente non avete nessun bisogno di leggere questo HOWTO.

  1.  Introduzione


  ``Per bambini di 6 anni o pi. Batterie incluse.''



  1.1.  Prima che lo chiediate


  Questo documento non descrive l'installazione di Linux sui laptop, ma
  solo come ottimizzare per un laptop un sistema Linux gi ivi
  installato. Per informazioni sull'installazione di Linux leggete
  l'Installation-HOWTO o il manuale del vostro distributore di Linux.


  Questo documento non descrive nemmeno l'uso di un gruppo di continuit
  n del demone powerd , sebbene un UPS non sia altro che una grossa
  batteria. Tale argomento  trattato nell'UPS-HOWTO .



  1.2.  Di cosa parla questo documento


  Sempre pi persone ormai possiedono computer portatili e, di
  conseguenza, sempre pi persone installano Linux su tali computer.


  L'installazione e l'uso di Linux su di un laptop non  di solito un
  problema, perci potete benissimo provare. Diversamente da altri
  sistemi operativi, Linux gira bene anche su hardware molto vecchio,
  permettendovi di dare nuova vita ad un anziano portatile semplicemente
  installandovi Linux.


  Se vi serve aiuto con l'installazione di Linux su un computer
  portatile, o se avete domande sull'hardware dei portatili in genere,
  potete consultare l'ottima Linux Laptop webpage su
  http://www.cs.utexas.edu/users/kharker/linux-laptop/ dove troverete
  molte informazioni utili e un aiuto dettagliato.  La Linux Laptop Page
  descrive la configurazione dell'hardware per specifici modelli di
  portatili e di chipset.


  Questo HOWTO comunque si concentrer sul problema comune di tutti i
  portatili: Il Consumo di Energia.


  Non ho ancora trovato una distribuzione di Linux che comprenda una
  configurazione ottimizzata per i portatili. Cos, visto che non ho
  trovato questo tipo di informazioni da nessun'altra parte, ho iniziato
  a raccogliere qualche semplice ed efficace trucco che potr aiutarvi a
  risparmiare le batterie e quindi ad allungare l'autonomia del vostro
  sistema mentre  lontano da una presa di corrente.
  (Nota. Ho ricevuto la lamentela di un lettore, il quale diceva che
  questi trucchi non erano molto utili con il suo portatile. Ma allora
  funzionano o no? S, ma non aspettatevi miracoli. Io sono stato in
  grado di portare l'autonomia del mio portatile da 90 a pi di 120
  minuti.)



  1.3.  Indicazioni utili


  Se siete esperti di portatili potete probabilmente saltare la sezione
  ``Informazioni generiche''.  Se siete esperti di Linux, potrete
  trovare ci che vi interessa davvero nella sezione ``Variazione di
  alcuni parametri generali del sistema''.  Se siete un distributore di
  Linux, leggete ``Messaggio ai curatori di distribuzioni Linux''.



  1.4.  Suggerimenti


  Qualsiasi suggerimento  bene accetto. Mandate per favore i vostri
  commenti a hanno@lava.de.  I miei trucchi hanno funzionato sul vostro
  sistema? Avete nuovi consigli?  Ci sono link obsoleti in questo testo?


  Mi dispiace, ma non sar capace di rispondere a domande su specifici
  modelli di portatili. Non pretendo di essere un mago dei laptop,
  semplicemente ne ho uno e voglio condividere con voi le informazioni
  che ho raccolto. Prima di contattarmi visitate la Linux Laptop
  webpage, probabilmente qualcun altro ha gi scritto una pagina
  dedicata al vostro modello, oppure interrogate il supporto tecnico del
  produttore del portatile.  Oppure chiedete a qualcuno nel newsgroup
  comp.sys.laptops .



  1.5.  Disclaimer


  Tutti i metodi descritti qui sono stati testati da me ed hanno
  funzionato bene sul mio portatile, salvo avviso contrario. Comunque io
  non posso garantire che nessuno di essi bloccher o dannegger il
  vostro sistema. La vita  pericolosa, quindi fate copie di backup dei
  vostri file importanti prima di intervenire sulla configurazione di
  Linux. Se qualcosa va storto, io non mi assumo nessuna responsabilit
  per la vostra eventuale perdita di dati. In altre parole: non fatemi
  causa. Grazie.



  1.6.  Copyright


  Questo documento sar distribuito con l'avvertenza standard di
  copyright degli HOWTO, reperibile nella cartella HOWTO su
  http://sunsite.unc.edu/mdw/linux.html.



  2.  Informazioni generiche


  Questa sezione descrive alcuni dettagli tecnici sulle batterie dei
  portatili e alcuni generici consigli per il risparmio energetico.
  Tali informazioni non sono specifiche per Linux, e se siete pratici di
  computer portatili probabilmente le conoscete gi.



  2.1.  Siate gentili con le vostre batterie


  (Pregasi notare i ``ringraziamenti'' per questa sezione.)


  Attualmente ci sono tre tipi di batterie normalmente usate per i
  computer portatili:



    Le batterie NiCd sono state l'unica scelta per anni, ma oramai sono
     obsolete, e i nuovi modelli di portatili non le usano pi, perch
     pesanti e soggette all'``effetto memoria'': cio durante la
     ricarica, se una batteria NiCd era solo parzialmente scarica, essa
     ``ricorda'' il precedente livello di carica e si rifiuta di
     oltrepassarlo, anche se la capacit nominale della batteria  molto
     superiore.


     L'effetto memoria  provocato dalla cristallizzazione degli
     elettroliti della batteria e pu ridurne la durata in modo
     permanente, fino a renderla inutilizzabile. Per evitare che ci
     accada,  necessario scaricarla del tutto e poi ricaricarla
     completamente una volta ogni poche settimane.


     (Nota: James Youngman ha trovato un metodo piuttosto drastico per
     ``riparare'' le batterie esaurite: ``Se la vostra batteria NiCd
     soffre di effetto memoria, estraetela dal computer, tenetela a
     circa 30 cm di altezza dal pavimento o dal piano di una scrivania,
     e lasciatela cadere (ma assicuratevi che atterri di piatto).''
     Secondo lui, questo romper i cristalli che si erano formati nella
     batteria e che sono la causa dell'effetto memoria.  Aggiunge: ``Non
     so se funziona anche con altri tipi di batterie.'')

     Il cadmio  un veleno molto pericoloso, ma se la batteria esaurita
     viene riportata al venditore, pu essere riciclato quasi
     completamente.


     Nel caso vi interessi, ecco alcune specifiche per celle NiCd:



       Tensione di cella: 1,2 V
       Rapporto energia / massa: 40 Wh/kg
       Rapporto energia / volume: 100 Wh/l
       Energia massima: 20 Wh
       Temperatura di carica: da 10 a 35 C (da 50 a 95 F)
       Temperatura di scarica: da -20 a 50 C (da -5 a 120 F)
       Temperatura di stoccaggio: da 0 a 45 C (da 30 a 115 F)






    Le batterie NiMh sono lo standard in uso attualmente in molti
     portatili di basso costo: possono essere p piccole e sono meno
     soggette all'effetto memoria.
     Per danno dei problemi a temperature ambiente molto alte o molto
     basse, e anche se usano sostanze meno inquinanti e non tossiche,
     non possono ancora essere completamente riciclate (ma in futuro
     probabilmente s).


     Specifiche per celle NiMh:



       Tensione di cella: 1,2 V
       Rapporto energia / massa: 55 Wh/kg
       Rapporto energia / volume: 160 Wh/l
       Energia massima: 35 Wh
       Temperatura di carica: da 10 a 35 C (da 50 a 95 F)
       Temperatura di scarica: da 0 a 45 C (da 30 a 115 F)
       Temperatura di stoccaggio: da 0 a 30 C (da 30 a 85 F)






    Le nuove batterie ad alte prestazioni usano la tecnologia LiIon. In
     teoria tali batterie non dovrebbero avere nessun effetto memoria,
     ma in certe circostanze sembrano mostrare un comportamento simile.
     Le sostanze contenute in esse non sono inquinanti, ma dovrebbero
     ugualmente essere riconsegnate per essere riciclate.


     Specifiche per celle LiIon:



       Tensione di cella: 3,6 V
       Rapporto energia / massa: 100 Wh/kg
       Rapporto energia / volume: 230 Wh/l
       Energia massima: 60 Wh
       Temperatura di carica: da 0 a 45 C (da 30 a 115 F)
       Temperatura di scarica: da -20 a 60 C (da -5 a 140 F)
       Temperatura di stoccaggio: da -20 a 60 C (da -5 a 140 F)






  Anche se la forma delle batterie  la stessa, non  possibile
  sostituire semplicemente il vecchio tipo di batterie con le nuove: il
  processo di carica  diverso per ogni tipo di batteria.


  Certi costruttori integrano il circuito di ricarica nell'alimentatore
  esterno del portatile, rendendo possibile il passaggio ad un nuovo
  tipo di batterie semplicemente cambiando l'alimentatore. Se
  l'alimentatore del vostro portatile usa un connettore proprietario con
  molte linee di alimentazione, probabilmente  il vostro caso.


  Altri costruttori invece mettono l'unit di ricarica all'interno dello
  chassis, dove non  possibile sostituirlo in modo semplice con una
  unit pi avanzata. Se il cavo del vostro alimentatore ha solo due
  linee per connettersi al computer (come il mio), l'unit di ricarica 
  probabilmente all'interno del portatile.


  In caso di dubbio, chiedete al produttore se il vostro modello pu
  montare una batteria di tipo pi moderno.


  Una batteria che non viene usata per molto tempo si scaricher
  lentamente. E anche se le usate ogni riguardo, la vostra batteria
  dovr essere sostituita dopo 500 - 1000 ricariche.  Tuttavia non 
  consigliabile tenere acceso un portatile senza batteria collegato
  all'alimentazione di rete, perch la batteria - anche se vecchia o
  scarica - serve sempre come condensatore a elevata capacit, che
  protegge la macchina da sovratensioni o impulsi spuri provenienti
  dalla rete elettrica.


  Dal momento che i costruttori cambiano la forma delle loro batterie
  ogni pochi mesi, potreste avere problemi per trovare una nuova
  batteria per il vostro laptop da qui a pochi anni.  Comperate una
  batteria di riserva ora, prima che sparisca dagli scaffali dei negozi.



  2.2.  Risparmio energetico - Le cose ovvie


  Ci sono alcune ovvie misure da prendere per ridurre il consumo
  energetico del vostro computer. Beh, forse non sono tanto ovvie, visto
  che non molte persone le adottano...



    Diminuite o spegnete la retroilluminazione dello schermo quando non
     ne avete bisogno. A proposito, gli schermi tft consumano pi
     energia di quelli dstn (cos ora avete una buona scusa per aver
     comprato il modello pi economico...).


     (David Bateman mi dice che usare un monitor esterno e spegnere lo
     schermo del laptop allunga la durata delle batterie del 30%: ``Non
     che sia molto utile, se avete un monitor esterno collegato
     all'alimentazione di rete, tanto vale collegarvi anche il
     portatile.'')


    Di quanta potenza di calcolo avete veramente bisogno?  Non credo
     che farete molto pi di un po' di videoscrittura durante un viaggio
     (beh, io almeno non compilo i kernel di Linux).  Durante il
     funzionamento a batteria, il ridurre la velocit di clock della CPU
     diminuir anche il consumo di corrente. Qualche portatile ha un
     selettore di clock con cui scegliere fra la velocit normale e
     quella ridotta.



    Spegnete la ventolina della CPU (se c'). Molti portatili recenti
     hanno una opzione nel BIOS chiamata ``cooling control'' (controllo
     del raffreddamento). Se la CPU si riscalda troppo, questa opzione
     permette di scegliere se raffreddarla con la ventolina (settaggio
     ``performance'') o se abbassare la velocit di clock (settaggio
     ``silence''). Per allungare l'autonomia delle batterie, scegliete
     ``silence''.



    Evitate di usare periferiche esterne (stampanti, monitor, dischi
     zip, videocamere ecc.) durante il funzionamento a batteria. Se
     collegato ad una normale stampante a getto d'inchiostro,
     l'autonomia del mio portatile crolla da due ore a circa 20 minuti.




    Non usate alcun dispositivo interno che non sia indispensabile:
     drive floppy, hard disk, cd-rom. Soprattutto l'uso del cd-rom
     accorcer drasticamente l'autonomia.



    Anche le schede PCMCIA possono consumare molta energia, perci non
     lasciate inseriti il vostro modem o l'adattatore di rete se non li
     state usando. Ma questo dipende molto dal costruttore della scheda
     PCMCIA, quindi controllate le caratteristiche del prodotto prima
     dell'acquisto (p. es. alcune schede PCMCIA non si spengono mai,
     anche se nessuno le sta usando).


     (A proposito, ho letto di recente che le schede PCMCIA sono il
     problema pi grosso per i palmtop con Windows CE: consumano cos
     tanto da esaurire le piccole batterie dei palmtop nel giro di pochi
     minuti...).



    Usate programmi semplici. Una applicazione multimediale caricher
     molto di pi il sistema e creer molto pi traffico fra hard disk e
     cd-rom di un semplice piccolo word processor.



    Grant Taylor ha un consiglio per quelli di voi che vogliono
     aggiornare il loro sistema: ``Le versioni pi recenti di alcuni
     componenti aggiornabili consumano meno energia. Per esempio, l'hard
     disk IDE IBM Travelstar 2.5 pollici da 1.6 Gbyte consuma il 20% in
     meno dell'hard disk Toshiba da 500 Mbyte montato di serie sul mio
     portatile.''



    Se dovete ancora comperare un portatile, non comperate un portatile
     con una cache di secondo livello se tenete all'autonomia.  Un
     computer con cache di secondo livello  circa il 10% - 20% pi
     veloce in media, e si comporta molto meglio con applicazioni
     multimediali e macina-numeri (rendering, cad, giochi alla DOOM), ma
     consuma molta energia. Bjoern Kriews mi dice di avere due portatili
     quasi identici, e quello senza cache ha una autonomia di 4h30,
     contro le 2h30 di quello con cache.


     Se avete gi installata una cache di secondo livello, probabilmente
     disabilitarla non sar molto utile.  Provateci e fatemi sapere
     com' andata.



    Un altro consiglio per chi deve ancora comperare un portatile: non
     comperate il modello con l'ultimissima velocissima CPU. Di solito
     dopo qualche tempo i costruttori migliorano i modelli meno recenti
     senza darne alcuna comunicazione. Le nuove versioni delle vecchie
     CPU riscaldano meno e consumano meno energia delle prime versioni.


     Ci sono anche portatili ``Frankenstein'' che usano CPU non
     ottimizzate per l'uso su sistemi portatili. Nel momento in cui
     stesi questo documento (maggio '97), l'ultima generazione di
     portatili Pentium-200 aveva un'autonomia a batterie di 20 minuti, e
     scaldava tanto da cuocervi le ginocchia. Mentre scrivo questa
     seconda revisione (ottobre '97), i portatili Pentium-233 funzionano
     per oltre due ore senza vedere una presa di corrente.



  Bene, avete afferrato il concetto. Molte di queste restrizioni
  probabilmente vi porteranno a pensarci due volte prima di mettersi a
  lavorare sul serio con il vostro sistema Linux. (Il modo migliore di
  risparmiare energia durante l'uso a batterie ... di non fare
  assolutamente nulla. Questo allunga l'autonomia del mio portatile
  quasi del 100%).


  Ora passiamo a qualche altra e pi utile misura che risparmi energia
  senza disturbare il nostro lavoro.



  3.  L'Advanced Power Management


  Tutti i computer portatili, ma anche molti desktop sono equipaggiati
  per l'APM, la circuiteria per ``advanced power management''
  (``gestione avanzata della potenza''). Questo capitolo illustra come
  attivare il supporto APM nel vostro kernel di Linux.  Chi gi conosce
  bene Linux potrebbe trovarlo piuttosto noioso, quindi pu saltare
  direttamente al prossimo.



  3.1.  Cosa pu fare APM per voi


  Non lo descriver qui in dettaglio, per maggiori informazioni potete
  consultare la Linux APM drivers page su
  http://www.cs.utexas.edu/users/kharker/linux-laptop/apm.html.  Tutto
  ci che vi serve sapere  che con l'aiuto di APM la CPU pu segnalare
  al BIOS i periodi di inattivit, permettendogli di fare un po' di
  economia - p. es. riducendo il clock della CPU, spegnendo l'hard disk,
  la retroilluminazione dello schermo ecc,


  L'APM  anche responsabile del modo ``system suspend'' (o ``sleep'') e
  del modo ``suspend to disk'' (o ``hibernation'').  Un'altra buona
  caratteristica - ma non molto importante -  che con l'aiuto di APM,
  shutdown -h non fermer semplicemente il sistema, ma lo spegner
  anche.


  (A proposito, la maggior parte dei sistemi Linux mettono un comando
  shutdown -r nel loro /etc/inittab e lo eseguono come risposta ad un
  control-alt-delete. Io preferisco uno shutdown -h, in modo che alla
  pressione dei tre famosi tasti il mio portatile semplicemente si
  spegne).


  Non tutti i costruttori implementano correttamente le funzioni APM nel
  BIOS, perci alcuni portatili hanno dei problemi con i driver APM di
  Linux (se la vostra macchina ha dei problemi con l'APM, probabilmente
  si bloccher durante il boot di Linux o al ritorno dallo stato di
  sospensione). Se non sapete qual' il vostro caso, consultate la Linux
  laptop page per il vostro particolare modello.

  3.2.  Come abilitare il supporto APM in Linux


   facile, basta ricompilare il kernel di Linux.  Consultate il Kernel-
  HOWTO se non sapete come fare.



  Quando lo script di configurazione raggiunge la sezione ``character
  devices'', il valore di default per il pieno supporto dei BIOS APM nei
  kernel versione 2.0.30 o superiore :




       Advanced Power Management BIOS support: Yes
       Ignore USER SUSPEND: No
       Enable PM at boot time: Yes
       Make CPU Idle calls when idle: Yes
       Enable console blanking using APM: Yes
       Power off on shutdown: Yes





  Leggete bene i testi di aiuto forniti dallo script di configurazione:
  spiegano dettagliatamente il significato di ciascuna opzione, quindi
  non star a ripeterli qui.


  Se il BIOS del vostro sistema non supporta l'APM standard, alcune di
  quelle opzioni potrebbero bloccare il vostro sistema.  Controllate
  tutte le capacit PM con il nuovo kernel per accertarvi che tutto
  funzioni come dovrebbe.


  (Una nota sullo spegnimento della console: David Bateman mi dice che
  non dovrebbe essere abilitata perch pu dare problemi con l'attuale
  versione di Xfree, la 3.2: ``I sintomi sono lo schermo spento
  all'avvio di X, che si accende non appena viene premuto un tasto.  un
  problema piccolo ma seccante.  La prossima versione di Xfree avr un
  ottimo supporto DPMS per molti dei chipset usati nei laptop, e
  dovrebbe includere il codice per lo spegnimento dell'LCD. Consultate
  la pagina di manuale di xset in XFree 3.2A'. David fa anche notare che
  la vita della retroilluminazione del vostro schermo  data dal numero
  di volte che questo viene spento e riacceso: ``Perci  necessario un
  compromesso tra la vita delle batterie e quella del
  retroilluminatore.'')


  (Aggiornamento: Con XFree 3.3, il mio laptop ha ancora questo
  problema. Mi  stato detto che sar sistemato in una delle prossime
  versioni del kernel.)



  3.3.  Il supporto APM e i driver PCMCIA


  Dopo aver ricompilato il kernel, non dimenticate di ricompilare anche
  i driver PCMCIA per Linux.


  I driver PCMCIA precompilati forniti con la maggior parte delle
  distribuzioni Linux hanno il supporto per l'APM disabilitato, e il
  BIOS non pu dire alla vostra scheda di spegnersi.


  Dovreste inoltre ricompilare i driver ogni volta che passate ad una
  nuova versione del kernel e il vostro vecchio kernel aveva abilitata
  l'informazione sulle versioni dei moduli (questa opzione si trova
  nella sezione ``loadable module support'' della configurazione del
  kernel).


  Per istruzioni dettagliate su come compilare i driver, leggete il
  PCMCIA-HOWTO o la Linux PCMCIA drivers homepage su
  http://hyper.stanford.edu/HyperNews/get/PCMCIA/home.html.



  3.4.  Il pacchetto apmd


  Ora che avete installato il supporto APM, dovete procurarvi il
  pacchetto apmd dalla Linux APM drivers page. Non che sia assolutamente
  necessario, ma  una collezione di vari programmini molto utili.  Il
  demone apmd controlla il comportamento della vostra batteria e vi
  avvertir se siete a corto di energia. Il comando apm vi permetter di
  fermare il vostro sistema con un comando da shell, e xapm vi mostrer
  lo stato di carica della batteria.


  (A proposito, se avete problemi con le schede PCMCIA dopo il ritorno
  dallo stato di sospensione, potete provare un altro pacchetto apmd su
  http://www.cut.de/bkr/linux/apmd/apmd.html.  Questo scarica dalla
  memoria i moduli driver PCMCIA prima di andare in suspend e li
  ricarica quando il sistema riprende l'attivit.)


  Grant Taylor ha giocherellato un po' con il pacchetto apmd e ha
  scoperto diverse cosette utili.


  Ha scoperto per esempio che l'hard disk del suo laptop dimentica il
  periodo di standby hdparm -S al ritorno da un suspend: ``Ho modificato
  apmd perch reimposti il valore ad ogni ritorno. Questo pu essere una
  particolarit del mio sistema; ma  una cosa importante da fare...''


  (Nota: Sul mio laptop  il BIOS che si preoccupa di stabilire il
  periodo di standby dell'hard disk e di reimpostare il suo valore al
  ritorno, perci non ho potuto stabilire se questo piccolo problema sia
  generale o meno. Se anche a voi succede una cosa del genere, speditemi
  una email.)


  Grant ha anche trovato un buon trucco per spegnere lo schermo con
  ``XFree86'' e l'aiuto del pacchetto apmd: lo troverete l.



  3.5.  E se il mio portatile non supporta APM?


  Se il BIOS del vostro computer non supporta APM (ma anche i pi vecchi
  dovrebbero avere almeno dei timeout per lo spegnimento dell'hard disk
  e dello schermo), potete usare hdparm -S per definire il periodo
  massimo di inattivit dell'hard disk. Questo sar gi molto, perch
  l'hard disk consuma molta energia. Il vostro sistema dovrebbe avere
  installato hdparm, perci leggetevi la pagina di manuale di hdparm per
  conoscere la sintassi dei comandi.




  4.  Variazione di alcuni parametri generali del sistema


  Dopo aver installato e configurato Linux sul mio portatile, ho visto
  che accedeva all'hard disk ogni pochi secondi, anche se non c'erano
  utenti connessi al sistema, e l'hard disk non poteva mai entrare in
  standby. La diminuzione dell'attivit sull'hard disk pu aumentare
  molto la durata delle batterie, perci ho messo insieme i seguenti
  argomenti.


  Li ho testati tutti sotto RedHat 4.1, ma la collocazione di alcuni
  file di configurazione pu essere diversa nella vostra distribuzione.
  (Se  cos, fatemelo sapere.)



  4.1.  I demoni crond e atrun


  Controllate se il vostro file /etc/crontab per caso lancia un processo
  ogni minuto. Spesso ci troverete atrun.


  Con il comando at, potete impartire comandi da eseguire ad un certo
  istante nel futuro. Alcuni sistemi Linux usano un demone atd dedicato
  perch se ne occupi, altri (p. es. RedHat) fanno eseguire atrun dal
  demone crond ogni minuto.


  Sulla maggior parte dei sistemi questo non  veramente necessario
  perch  raro che i comandi at debbano essere eseguiti esattamente al
  momento stabilito. Cos se trovate una riga come questa nel vostro
  /etc/crontab:



       # Run any at jobs every minute
       * * * * * root [ -x /usr/sbin/atrun ] && /usr/sbin/atrun





  potete tranquillamente sostituirla con:



       # Run any at jobs every hour
       00 * * * * root [ -x /usr/sbin/atrun ] && /usr/sbin/atrun





  Per maggiori dettagli leggete man 5 crontab.  Alcune persone possono
  anche lavorare bene senza il demone crond, perci se sapete cosa state
  facendo potreste anche decidere di disabilitarlo del tutto.



  4.2.  Il demone update / bdflush


  In ogni momento Linux ha molti buffer di file aperti, cos il sistema
  deve assicurarsi che i cambiamenti ai file vengano salvati sull'hard
  disk il pi presto possibile. Altrimenti, quei dati potrebbero andare
  persi in caso di crash del sistema.



  Di questo si occupa il demone update / bdflush.  (Questi due nomi si
  riferiscono allo stesso programma, perci potete usarli entrambi per
  lanciare il demone). Per default questo demone chiamer flush ogni 5
  secondi e sync ogni 30.


  Con il mio hard disk Fujitsu questo causa un accesso ininterrotto.
  (Sembra che questo hard disk scriva su disco la sua cache RAM interna
  anche quando questa non  stata modificata. Ma questo dipende dal
  firmware del vostro hard disk: altri mi hanno detto che il loro hard
  disk va in standby anche senza le modifiche che seguono.)


  Dal momento che Linux non va quasi mai in crash, ho aumentato entrambi
  gli intervalli di tempo a 3600 secondi (un'ora). Questo ha risolto
  tutto e ha fermato i continui accessi al disco. (Ma se il mio sistema
  andasse in crash ora ci sarebbero molti pi file rovinati,
  naturalmente.)


  Per la RedHat 4.1: In /etc/inittab, modificate la chiamata per
  l'aggiornamento in questo modo:



       ud::once:/sbin/update -s 3600 -f 3600





  Per la Suse 4.4.1: update  chiamato in /sbin/init.d/boot.


  Per la Slackware: update  chiamato in /etc/rc.d/rc.S.


  Leggete la pagina di manuale di update per ulteriori dettagli.



  4.3.  Il demone syslogd


  Il demone syslogd si occupa dei vari log file del sistema Linux,
  situati nella directory /var/log. Per default syslogd scriver sui
  file di log ogni volta che riceve un messaggio di sistema.


   possibile evitare questo facendo precedere, nel file
  /etc/syslog.conf, il nome del file di log da un trattino.  Ecco un
  esempio dal syslog.conf del mio sistema:




  # Log anything (except mail) of level info or higher.
  # Don't log private authentication messages!
  *.info;mail.none;authpriv.none                  -/var/log/messages





  Ancora una volta questo significa che in caso di crash del sistema, il
  messaggio che spiegava l'errore incontrato non verr salvato su disco.



  4.4.  Il comando init


  Durante la partenza del sistema i processi e i demoni iniziali
  verranno lanciati usando il comando init. Questo comando (s, anche
  questo) chiama sync prima di creare ciascun processo.


  Per evitare ci bisogna rimuovere la chiamata a sync() nel codice
  sorgente e ricompilare il comando.


  Per evitare problemi con buffer di file persi, dovreste aggiungere una
  chiamata a sync nello script /etc/rc.d/init.d/halt del vostro sistema,
  proprio prima che lo script esegua l'umount dei file system.



  4.5.  La partizione di swap


  La partizione di swap di Linux  usata come memoria virtuale per
  aumentare lo spazio fisico di memoria: questa pu essere un'altra
  ragione per accedere al disco. Se il vostro laptop ha gi molta RAM o
  se le applicazioni che usate sono molto semplici (come vi), potrebbe
  essere una buona idea disabilitarla.


  Questo naturalmente dipende da cosa avete in mente di fare.  Con 4 o 8
  Mb non  possibile fare a meno della partizione di swap, con 8 o 16 Mb
  potete usare senza problemi i programmi che girano in modo testo, e se
  usate poco il multitasking potete tranquillamente disabilitare lo
  spazio di swap. L'ambiente X-Windows richiede molta RAM e non dovreste
  usarlo senza la partizione di swap, a meno che non abbiate installati
  molto pi di 16 Mb di RAM fisica.


  (Nota: il mio portatile con 16 Mb e senza partizione di swap riesce a
  far girare una sessione emacs, quattro shell bash e contemporaneamente
  compilare un kernel senza esaurire la memoria.  Per me  sufficiente.)


  Se avete gi installato una partizione di swap, potete disabilitarla
  facendo precedere al comando swapon nel file /etc/rc.d/rc.sysinit il
  carattere '#'. Se volete potete anche fare in modo che il sistema vi
  chieda durante la partenza se volete usare la partizione di swap. Per
  farlo, mettete le seguenti righe nel file /etc/rc.d/rc.sysinit (per la
  RedHat 4.1) o /sbin/init.d/boot (per la Suse 4.4.1):





  echo "Devo usare la partizione di swap?"
  echo "  0: No."
  echo "  1: S."
  /bin/echo "Scelta: \c"
  read SWAPCHOICE

  case "$SWAPCHOICE" in
      0)
          # Do nothing.
          echo "(Partizioni di swap disabilitate)"
          ;;
      *)
          # Start up swapping.
          echo "Attivazione delle partizioni di swap"
          swapon -a
  esac





  Cos potete usare la partizione di swap quando siete collegati ad una
  presa di corrente, e disabilitarla se state usando le batterie.



  4.6.  Il demone webserver apache httpd


  Sto usando il mio portatile per sviluppare e testare degli script cgi
  per siti web, perci ci sto facendo girare un webserver locale.  La
  configurazione standard  un po' troppo pesante, se tutto l'uso che ne
  fate  testare uno script o una pagina web ogni tanto.


  Nel file httpd.conf, cambiate i valori di MinSpareServers e
  StartServers a 1. Questo sar sufficiente per un piccolo sito locale
  di prova.


  Se volete disabilitare il logging del webserver, dovrete ricompilare
  il demone httpd. Leggete la documentazione relativa per i dettagli.


  Grant Taylor ha ricompilato il logging di apache e ha scoperto che
  questo ``non diminuiva affatto gli accessi al disco. Cos ho usato
  un'altra soluzione, secondo me migliore: ho configurato apache in modo
  tale da farlo girare da inetd anzich da solo''. Leggete man inetd per
  ulteriori dettagli.



  4.7.  Il pacchetto XFree86


  La configurazione di XFree86 per i portatili  una storia a s.  E
  ancora una volta devo raccomandarvi la Linux Laptop page, dove
  troverete molti consigli e aiuti.


  L'oscuramento dello schermo di X rende solo nero lo schermo, ma non lo
  spegne. Come gi detto nella ``nota sullo spegnimento della console'',
  potete usare l'opzione DPMS di xset per questo.  Comunque, questa
  caratteristica dipende dal bios e dal chip grafico del vostro
  portatile.

  Grant Taylor usa questo setup per mettere a nanna il suo portatile con
  l'aiuto di apmd e lo screensaver:




       # Run xscreensaver with APM program
       xscreensaver -timeout 5 \
                    -xrm xscreensaver.programs:apm_standby \
                    -xrm xscreensaver.colorPrograms:apm_standby &





  Nota: ``apm_standby  uno script suid in perl che permette solo a
  certe persone di dare il comando apm -S.''



  4.8.  L'editor emacs


  Ok, emacs non  un editor, ma un modo di vivere. Ecco un consiglio da
  Florent Chabaud: ``Se usate emacs, forse avrete notato che l'editor
  esegue alcuni salvataggi automatici. Questo naturalmente  utile e non
  dovrebbe essere disabilitato, ma i parametri di default possono essere
  ottimizzati per l'uso su di un portatile.


  Ho messo nel file /usr/share/emacs/site-lisp/site-start.el le due
  righe che seguono:




       (setq auto-save-interval 2500)
       (setq auto-save-timeout nil)





  Queste disabilitano il salvataggio automatico a tempo, e dicono a
  emacs di salvare automaticamente ogni 2500 azioni sulla tastiera.
  Naturalmente se state scrivendo un testo questo valore dovrebbe essere
  ridotto, ma per un programmatore  sufficiente. Siccome viene contato
  ogni tasto premuto (compresi i tasti cursore e i tasti funzione), il
  limite di 2500 azioni viene raggiunto molto rapidamente.




  4.9.  Come trovare altre ottimizzazioni


  Se il vostro sistema Linux accede ancora troppo spesso all'hard disk
  potete scoprire cosa sta succedendo con il comando ps ax.  Questo vi
  mostrer tutti i processi attivi e il loro nome completo: a volte
  riporta anche le opzioni con cui sono stati lanciati.


  Ora leggete la pagina man di ciascun processo per scoprire cosa fa e
  come cambiare il suo comportamento: con questo metodo troverete quasi
  certamente il processo responsabile. Potrebbe tornarvi utile anche il
  comando strace.
  Per favore, se trovate qualcosa di nuovo, mandatemi una email.



  5.  Appendice



  5.1.  Messaggio ai curatori di distribuzioni Linux


  Se per caso curate una distribuzione di Linux, grazie per aver letto
  tutto questo. I portatili stanno divenendo sempre pi popolari, ma la
  maggior parte delle distribuzioni Linux non sono ancora ben preparate
  per l'uso su tali macchine: vi prego di adattare questo documento alla
  vostra distribuzione.



    La routine di installazione dovrebbe comprendere una configurazione
     ottimizzata per i portatili: la ``installazione minima'' spesso non
     lo  abbastanza, ci sono molte cose di cui l'utente di un portatile
     non ha bisogno in viaggio. Qualche esempio: non servono tre
     versioni diverse di vi (come nella distribuzione Suse); la maggior
     parte dei sistemi portatili non ha bisogno del supporto per le
     stampanti, perch di solito i documenti vengono stampati sul
     desktop di casa; molti portatili non hanno bisogno del supporto di
     rete.



    Non dimenticate di descrivere i problemi di installazione
     riscontrati su alcuni portatili, p. es. come installare la vostra
     distribuzione senza un cd-rom o come configurare il driver di rete
     PLIP.



    Aggiungete un miglior supporto per la gestione delle batterie e
     integrate il supporto per le schede PCMCIA direttamente nella
     vostra distribuzione, con un kernel precompilato ed un insieme
     alternativo di driver PCMCIA con supporto apm installabili
     opzionalmente. Includete anche un pacchetto apmd precompilato nella
     vostra distribuzione.



    Aggiungete il supporto per la commutazione dinamica fra pi
     configurazioni di rete diverse: la maggior parte dei portatili
     Linux viaggiano fra luoghi con reti diverse (p. es. la rete a casa,
     la rete in ufficio e la rete all'universit) e devono cambiare il
     loro ID di rete molto spesso, il che  complicato con la maggior
     parte delle distribuzioni.



  Vi prego di farmi sapere se avete ottimizzato la vostra distribuzione
  per computer portatili e quali funzioni e pacchetto avete aggiunto a
  questo scopo: le future versioni di questo HOWTO comprenderanno una
  sezione in cui potrete reclamizzare le caratteristiche portatili della
  vostra distribuzione.





  5.2.  Ringraziamenti



    Le informazioni sulla tecnologia delle batterie  in gran parte
     basata sull'articolo ``Stromkonserve'' di Michael Reiter,
     pubblicato su ``c't Magazin fuer Computertechnik'' (Heise Verlag
     Hannover, Germany), edizione 10/96, pagina 204. Usato dietro
     consenso dell'autore.  Visitate il loro sito web su
     http://www.heise.de/.



    Hanno contribuito a questo documento le seguenti persone:




       Frithjof Anders <anders@goethe.ucdavis.edu>
       David Bateman <dbateman@ee.uts.edu.au>
       Florent Chabaud <chabaud@celar.fr>
       Markus Gutschke <gutschk@uni-muenster.de>
       Kenneth E. Harker <kharker@cs.utexas.edu>
       Bjoern Kriews <bkr@rrz.uni-hamburg.de>
       R. Manmatha <manmatha@bendigo.cs.umass.edu>
       Juergen Rink <jr@ct.heise.de>
       Grant Taylor <gtaylor@picante.com>
       James Youngman <JYoungman@vggas.com>






  5.3.  Su questo documento


  Questo testo nomina le batterie 53 volte.


  La corrente versione di questo e di molti altri HOWTO, la maggior
  parte molto pi utili di questo, pu essere reperita nel sito
  principale di documentazione per Linux
  http://sunsite.unc.edu/mdw/linux.html o in uno dei suoi molti mirror.


  La maggior parte di questo testo  stato scritto durante i miei viaggi
  fra Amburgo e Hannover sulle ferrovie tedesche.  (le nuove carrozze
  ice-2 hanno prese di corrente per i portatili... evviva!).


  E ora ripetete il mantra con me: ``...on the road again...''


  Traduzione a cura di: Massimo Soricetti <maxsoricetti@geocities.com>.











  BogoMips mini-Howto
  Wim van Dorst, baron@clifton.hobby.nl
  v0, 8 febbraio 1999

  Questo testo fornisce alcune informazioni circa i BogoMips, infor
  mazioni raccolte da varie fonti come newsgroups e e-mail. Questo testo
  pu essere ottenuto dai vari archivi Linux in
  .../HOWTO/mini/BogoMips.  Sono disponibili traduzioni (credo) in Giap
  ponese, Italiano, Tedesco, Polacco e Portoghese dagli archivi appro
  priati. La presente traduzione italiana  stata curata da Nicola Pero,
  n.pero@mi.flashnet.it. Un articolo informativo, intitolato `the
  Quintessential Linux Benchmark',  stato pubblicato nel Linux Journal,
  nel numero del Gennaio 1996.  Nuovi voci del mini-Howto per CPU che
  non compaiono nell'elenco saranno molto apprezzate. Possono essere
  mandate via e-mail all'autore.

  1.  Le pi basse e le pi alte stime di Bogomips

  Le seguenti sono le pi basse e le pi stime di Bogomips, mi sono
  state riferite personalmente, o pubblicate su Usenet.


  1.1.  Il pi basso valore di BogoMips durante una sequenza di boot di
  Linux


    Tim Van der Linden, timvdl@innet.be

    Intel 8088, a 4.77 MHz, ELKS

    0.02 BogoMips


  1.2.  Il pi alto valore di Bogomips durante una sequenza di boot di
  Linux con una singola CPU


    Ted E. Suter II, nexion@home.com

    AMD K6-2, a 450 MHz

    901.12 BogoMips


  1.3.  Il pi alto valore di Bogomips durante una sequenza di boot di
  Linux con CPU multiple


    Jeff White, jwhite@ghq.com

    Pentium MMX, 2 CPU, a 233 MHz

    927.33 BogoMips


  1.4.  Il pi alto valore di Bogomips non-Linux


    omega@sequent.com

    Sequent NUMA-Q, 32 CPU P6, a 180 MHz

    sistema operativo Dynix

    3776.00 BogoMips

  2.  Che cosa sono i Bogomips

  >Da una mail di Lars Wirzenius wirzeniu@kruuna.Helsinki.FI del 9
  Settembre 1993, in cui spiega che cosa siano i Bogomips, con
  informazioni dettagliate addizionali di Alessandro Rubini,
  rubini@norgana.systemy.it, e di Wim van Dorst:


       `MIPS  una abbreviazione per Milioni di Istruzioni Per Sec
       ondo.  una misura della velocit di calcolo di un pro
       gramma. Come la maggior parte delle misure di questo tipo, 
       pi spesso abusata che usata in modo appropriato ( molto
       difficile confrontare a ragione MIPS per diversi tipi di
       computer).

       I BogoMips sono una invenzione di Linus. Il kernel (o era un
       device driver?) ha bisogno di un loop di temporizzazione (il
       tempo  troppo breve e/o  necessaria troppa precisione
       rispetto a quanto possibile con un metodo di attesa senza
       busy loop), che deve essere calibrato per la velocit del
       processore della macchina. Perci, il kernel misura al
       momento del boot quanto veloce un certo tipo di busy loop va
       su un computer. "Bogo" viene da "bogus", ovvero, qualcosa
       che  fasullo. Per cui, il valore dei BogoMips d una
       qualche indicazione della velocit del processore, ma 
       davvero troppo poco scientifica per essere chiamata in modo
       diverso che BogoMips.

       Le ragioni (ce ne sono due) per cui  stampato durante il
       bootup  che a) aiuta un pochino il debugging e a
       controllare che la cache dei computer e il bottone del turbo
       funzionino, e b) Linus ama ridacchiare quando vede la gente
       confusa sulle news.'


  I BogoMips vengono determinati in /usr/src/linux/init/main.c (un
  semplice algoritmo in C), e la variabile del kernel pertinente
  loops_per_sec  usata in parecchi driver per ragioni pi serie. La
  effettiva funzione di delay udelay()  in assembler, e perci ciascun
  port ha la sua propria definizione in /include/asm/delay.h.  La
  variabile loops_per_sec e la funzione udelay() sono usate in numerosi
  drivers, vedi:

  cd /usr/src/linux     # o dovunque si trovino i sorgenti
  find . -name '*.[hcS]' -exec fgrep loops_per_sec {} /dev/null \;
  find . -name '*.[hcS]' -exec fgrep udelay {} /dev/null \;




  3.  Come stimare quale dovrebbe essere la giusta valutazione dei
  BogoMips

  >Da una iniziativa di Ian Jackson, ijackson@nyx.cs.du.edu, e Przemek
  Klosowski, molto aggiornata ed espansa da Wim van Dorst per i dati
  correnti, come listati sotto:

  Come guida molto approssimativa, i BogoMips posso essere calcolati da:








  Sistema                        BogoMips         Confronto
  Intel 8088                  clock * 0.004         0.02
  Intel/AMD 386SX             clock * 0.14          0.8
  Intel/AMD 386DX             clock * 0.18          1 (definizione)
  Motorola 68030              clock * 0.25          1.4
  Cyrix/IBM 486               clock * 0.34          1.8
  Intel Pentium               clock * 0.40          2.2
  Intel 486                   clock * 0.50          2.8
  AMD 5x86                    clock * 0.50          2.8
  Mips R4000/R4400            clock * 0.50          2.8
  Nexgen Nx586                clock * 0.75          4.2
  PowerPC 601                 clock * 0.84          4.7
  Alpha 21064/21064A          clock * 0.99          5.5
  Alpha 21066/21066A          clock * 0.99          5.5
  Alpha 21164/21164A          clock * 0.99          5.5
  Intel Pentium Pro           clock * 0.99          5.5
  Cyrix 5x86/6x86             clock * 1.00          5.6
  Intel Pentium II            clock * 1.00          5.6
  Intel Celeron               clock * 1.00          5.6
  Mips R4600                  clock * 1.00          5.6
  Alpha 21264                 clock * 1.99         11.1
  AMD K5/K6/K6-2              clock * 2.00         11.1
  UltraSparc II               clock * 2.00         11.1
  Pentium MMX                 clock * 2.00         11.1
  PowerPC 604                 clock * 2.00         11.1
  Motorola 68060              clock * 2.01         11.2




  Notare che il ciclo che calcola i BogoMips non sfrutta appieno il
  parallelismo dei vari processori, come ad esempio quello dell'Intel
  Pentium e dell'Alpha 21164.

  Notare che il ciclo che calcola i BogoMips per le CPU non-Intel 
  simile ma non  lo stesso.



  4.  Come determinare quale  la valutazione corrente dei BogoMips

  Ci sono tre metodi per determinare i BogoMips correnti, cio


  1. guardare in /proc/cpuinfo, per esempio con `cat /proc/cpuinfo`.

  2. guardare nell'output del syslog per vedere che cosa  stato
     stampato l durante il boot (se necessario recuperando
     l'informazione esplicitamente con dmesg o syslogk) o

  3. usando il programma a se stante bogomips.

  Un alternativa non-determinativa, che  applicabile anche per sistemi
  non-Linux come i Cray e simili, pu essere il programma a se stante
  BogoMips. Dal file readme di Jeff Tranter, jeff_tranter@mitel.com:


       `Stufo di fare un reboot del tuo sistema per poter vedere a
       quanti BogoMIPS sta correndo oggi? [...] "Bogomips"  un
       programma standalone che visualizza le prestazioni del tuo
       sistema usando uno dei benchmark pi riconosciuti del mondo.
       Usa lo stesso codice che  usato nel kernel di Linux durante
       il boot, ma funziona come un programma utente.  [...] La
       versione 1.3 di BogoMIPs  ora portabile e dovrebbe andare
       in ogni sistema che supporta un compilatore e una libreria
       ANSI C.'
  Notare che a causa del carico di sistema i valori calcolati con tale
  programma potrebbero essere pi bassi di quanto registrato nell'elenco
  qui sotto. Intrinsecamente il programma standalone non pu dare gli
  stessi risultati dei BogoMips della sequenza di boot, poich il carico
  di sistema sar in competizione con questo programma lanciato da un
  utente ordinario.  Dunque sotto sono elencati solo valutazioni di
  BogoMips da sequenze di boot.

  Attenzione che il file
  sunsite.unc.edu:/pub/Linux/system/status/bogo-1.2.tar.gz/ contiene
  l'ultima versione 1.3 (sic), che tuttavia  piuttosto sorpassata.



  5.  Variazioni nelle valutazioni dei BogoMips

  >Da Linus, torvalds@cc.helsinki.fi, la spiegazione delle variazioni
  che si possono avere nella valutazione dei BogoMips, in
  comp.os.linux.development, 28 Aprile 1994:


       `Il loop che calcola i BogoMips  "quantizzato", cos si
       trova quasi sempre esattamente lo stesso numero ogni volta.
       Di solito si ottengono numeri diversi solo se la velocit 
       proprio sul "limite", quando piccole variazioni (gli inter
       rupt arrivano a momenti diversi ecc) lo faranno saltare da
       un valore all'altro.'


  Se un kernel non  compilato specificamente per la CPU in questione,
  si possono anche avere delle variazioni (perfino grandi) della
  valutazione dei BogoMips, principalmente a causa di allineamenti non
  ottimali. Questo problema apparentemente pu aversi solo sulle varie
  CPU x86 (Intel e cloni).  Fortunatamente pu essere facilmente
  risolto: ricompilando il kernel specificamente per la propria CPU.

  Notare che l'algoritmo dei BogoMips, contrariamente alla credenza
  popolare, NON  cambiato significativamente attraverso le varie
  versioni del kernel.


  6.  BogoMips ... failed

  Sezione suggerita da varie domande sulla rete e per mail privata, ad
  esempio, da parte di Lily, lbliao@alumni.caltech.edu, e di Pierre
  Frenkiel, frenkiel@cdfap2.in2p3.fr.  Nel Marzo 1995 mi hanno chiesto:


       `Quando faccio il boot di Linux ricevo il messaggio:

             Calibrating delay loop.. ok - 23.96 BogoMips
             failed


       Dove/perch ha fallito il calibrating delay loop [loop di
       calibrazione del ritardo]?'


  Non ha fallito. Se avesse fallito il testo sarebbe stato


             Calibrating delay loop.. failed




  Ci che probabilmente ha davvero fallito  stato il driver per qualche
  gadget che uno potrebbe non avere nella propria macchina. Subito dopo
  aver calcolato la valutazione dei BogoMips vengono inizializzati i
  device driver. Prima i device SCSI, quindi i device di Rete, etc. Ogni
  fallimento [nell'inizializzazione] viene doverosamente riportato.
  Degno di nota  il driver per la AHA152x. Altri effetti del fallimento
  di driver (e non del fallimento del calcolo dei BogoMips) sono crash
  di sistema, lunghe attese, e paralisi completa del sistema.

  A partire dal Linux 1.2 molti messaggi di errore sono stati
  migliorati, per cui aggiornate il kernel almeno fino a quella versione
  per scoprire quale particolare driver  quello che fallisce.



  7.  A proposito delle CPU cloni (Cyrix, NexGen, AMD, etc)

  Le CPU Cyrix tipo 486 hanno bisogno di software che attivi la cache,
  talvolta chiamato anche software BogoBoost.  Le CPU Cyrix 5x86 e 6x86
  possono avere i BogoMips drasticamente migliorati dal branch-
  prediction (opzione BIOS). Notare che il miglioramento delle
  performance potrebbe essere irrisorio.  Ci sono parecchi pacchetti
  disponibili per calibrare le CPU Cyrix, come la patch bogoboost,
  cx5x86mod, e set6x86, tutti dagli archivi normali, in posti ovvi. 
  stato riferito che le CPU Cyrix 6x86 possono dare performance migliori
  quando il kernel  compilato con ottimizzazione per 486, invece che
  ottimizzato per Pentium.

  Le CPU NexGen 386-enhanced, marcate come Nx586, sono listate come di
  tipo 386, poich il fatto che abbiano performance simili a quelle
  delle macchine Pentium non  rilevante per i BogoMips.

  Gli AMD 5x86, indicati anche come AMD 486DX5, sono macchine 486/33
  quadruplicate. Sono del tutto in linea con le altre CPU 486. L'AMD K5
  e il K6 sono CPU di tipo Pentium, con i loro propri moltiplicatori
  BogoMips.


  8.  Perch fare attenzione ai BogoMips

  Lasciatemi aggiungere qua che ci sono solo due ragioni per prestare
  attenzione alla valutazione dei BogoMips che viene presentata al
  momento di fare il boot di Linux:


  1. Per vedere se  nel giusto range per il particolare processore, la
     sua frequenza di clock, e la cache potenzialmente presente. Molte
     CPU sono prone a setup errati di


    settaggio della memoria cache (write-back  sbagliato per i
     BogoMips, spesso riportati minori di 5; write-through  ok)


    buttoni del turbo (devono essere ON)


    cache fasulla emulata via software BIOS (cambiare in cache reale)


    cose simili riguardanti cache e clock, spesso anche riguardanti il
     software BIOS




  2. Per vedere se il tuo sistema  pi veloce del mio. Naturalmente
     questo  completamente sbagliato, inaffidabile, mal fondato, ed
     estremamente inutile, ma tutti i benchmark soffrono di questo
     stesso problema. Per cui perch non usarlo? Questa stupidit
     inerente non ha mai fermato la gente dall'usare i banchmark, non 
     vero? :-)

  Notare che usi pi seri per i veri benchmark sono indirizzati nel
  Linux Benchmarking Howto di Andr D. Balsa.



  9.  Compilation di valutazioni

  La tabella seguente d alcune valutazioni di BogoMips riportate per
  vari sistemi (approssimativamente 1000 voci da parte di circa 800
  persone diverse, pi o meno da 50 paesi differenti). Notare che queste
  valutazioni sono dalla sequenza di boot effettiva di Linux, eccetto
  naturalmente per la sezione sui Sistemi Non-Linux.


  9.1.  Sistemi 386 configurati in modo strano o sbagliato


     Sistema             BogoMips  Riferito da
     386DX/16 387 nocache   0.57   H. Peter Anvin <hpa@nwu.edu>
     386DX/25               0.82   P Wright <philip.wright@purplet.demon.co.uk>
     386DX/25 nocache       1.03   Mark A. Horton <mahmha@crl.com>
     386SX/16               1.5    Stefan Kromer <sk@galaxy.sunflower.sub.org>
     386SX/16               1.6    Bill Davidsen <davidsen@tmr.com>
     386SX/20               1.87   Paul C. Dulany <pcdulany@wam.umd.edu>
     386SX/20               2.45   Roger Harkess <roger@visi.com>
     386DX/25(?) 128c       6.03   Chuck Meo <meo@solbourne.com>
     386DX/20              13      Ed Runnion <erunnio@hubcap.clemson.edu>




  9.2.  Normali Sistemi 386: SX, DX, Nexgen



























     Sistema             BogoMips  Riferito da
     386SX/8 undercl        1.04   Andrew Costa <c_chaos@wahnapitae.on.ca>
     386SX/12               1.78   Klaus Kettner <kk@sesom.de>
     386SX/16               1.99   James Vahn <jvahn@short.circuit.com>
     386SX/16 Packard Bell  2.05   <root@Belvedere\%hip-hop.suvl.ca.us>
     386SX/16               2.09   David E. Fox <dfox@belvedere.sbay.org>
     386SX/16               2.15   W Stevens <wgsteven@math.uwaterloo.co>
     386SX/16               2.2    Lech Marcinkowski <puolalm@tekla.fi>
     386SX/16               2.23   Andrew Bulhak <acb@yoyo.cc.monash.edu.au>
     386SX/16               2.23   Steven M. Gallo <smgallo@cs.buffalo.edu>
     386SX/16               2.34   Kevin Burtch <kburtch@pts.mot.com>
     386SX/16 turbo         2.38   Andrew Haylett <ajh@gec-mrc.co.uk>
     386SX/16 0c            2.43   Adam Clarke <adamc@loose.apana.org.au>
     386SX/16               2.49   Waymon <waymon@pacifier.com>
     386SX/20               2.7    Alex Strasheim <astrashe@nyx.cs.du.edu>
     386SX/20               2.70   J.L. Brothers <brothers@halcyon.com>
     386SX/20               2.89   Anders Stenback <stenback@hehe.com>
     386SXL/25 AMD          2.9    Vaughan R. Pratt <pratt@sunburn.stanford.edu>
     386SX/25 AMD 0c        3.06   K.J. MacDonald <kenny@festival.ed.ac.uk>
     386SX/25 AMD           3.38   Hamish Coleman <hamish@zot.apana.org.au>
     386SX/25 0c            3.52   Rogier Wolff <r.e.wolff@et.tudelft.nl>
     386SL/25 Intel         3.57   S Harris <harris@teaching.physics.ox.ac.uk>
     386SX/25 AMD           3.62   S Harris <harris@teaching.physics.ox.ac.uk>
     386SXL/25 AMD 0c       3.71   David E.A. Wilson <david@cs.uow.edu.au>
     386SX/33 Intel         4.06   Kenneth J. Hoover <ken@psuedvax.psu.edu>
     386SX/33               4.71   Alexander Komlik <apkom@l.ukrcom.kherson.ua>
     386SX/40 Intel 0c      6.03   Michael Kenyon <u3g12@keele.ac.uk>

     386DX/16               2.49   Mike <mike@emgee.demon.co.uk>
     386DX/20 Intel         3.0    Malcolm Reeves <reeves@rocky1.usask.ca>
     386DX/20 Intel         3.08   Si. Harris <harris@teaching.physics.ox.ac.uk>
     386DX/20 Nec Powermate 3.22   David J Dawkins <davidd@isl.co.uk>
     386DX/20 Micronics     3.25   M Haardt <u31b3hs@informatik.rwth-aachen.de>
     386DX/20               3.67   Joost Helberg <jhelberg@nlsun8.oracle.nl>
     386DX/25               3.91   Ian McCloghrie <imcclogh@cs.ucsd.edu>
     386DX/25               3.95   Grant Edwards <grante@aquarius.rosemount.com>
     386DX/25 0cache        3.96   J.O. Williams <jow@techbase.com>
     386DX/25 32cache       4.53   J.M.A. Lahtinen <jmalahti@klaava.Helsinki.FI>
     386DX/33               5.86   Tim Lacy <timla@microsoft.com>
     386DX/33 64cache       5.99   Lars Wirzenius <wirzeniu@kruuna.Helsinki.FI>
     386DX/33 Intel         5.99   Harri Pasanen <hpasanen@cs.hut.fi>
     386DX/33 no387         6.03   Joel B.Levin <levin@bbn.com>
     386DX/33 387           6.03   Peter Bechtold <peter@fns.greenie.muc.de>
     386DX/40               6.21   J.L. Brothers <brothers@halcyon.com>
     386DX/33               6.46   Dennis Robinson <djrobins@uxa.cso.uiuc.edu>
     386DX/33               6.5    Dean Nelson <deannelson@aol.com>
     386DX/33 387 256cache  6.65   Wim van Dorst <baron@clifton.hobby.nl>
     386DX/33               6.65   Rick Lim <ricklim@opus.freenet.vancouver.bc.ca>
     386DX/33               6.7    Craig Hagan <hagan@cih.com>
     386DX/40               6.99   Ken Wilcox <wilcox@math.psu.edu>
     386DX/40 AMD           7.76   Joe Phillips <rchandra@letter.com>
     386DX/40 AMD           7.10   Kerry Person <kperson@plains.NoDak.edu>
     386DX/40               7.10   D. Bikram Singh <a336dhal@cdf.toronto.edu>
     386DX/40 128cache      7.23   Julian Francis Day <jfd0@aber.ac.uk>
     386DX/40 bogoboosted   7.23   Pat St Jean <stjean@math.enmu.edu>
     386DX/40 AMD 128cache  7.23   R.Bergs <rabe@akela.informatik.rwth-aachen.de>
     386DX/40 slow DRAM     7.26   John Lockwood <lockwood@pan.vlsi.uiuc.edu>
     386DX/40 128c          7.29   Karsten Friese <ftdkafr@ftd.ericsson.se>
     386DX/40               7.29   E.C. Garrison <ericg@nickel.ucs.indiana.edu>
     386DX/40               7.29   Darin Cowan <cowan@rubicon.org>
     386DX/40               7.29   Bonne van Dijk <bonne@cs.utwente.nl>
     386DX/40 AMD           7.76   Todd Lindner <tlindner@panix.com>
     386DX/40               7.76   Bear Giles <bear@indra.com>
     386DX/40 AMD 387 64c   7.91   <wires@gnu.ai.mit.edu>
     386DX/40               7.98   Frank Pilhofer <fp@informatik.uni-frankfurt.de>
     386DX/40 64c           7.98   Dean Junk <dpjunk@mm.com>
     386DX/40 AMD 32c       7.98   Tommy Olsen <tommyo@ifi.uio.no>
     386DX/40 AMD           7.98   James Reith <reith@racores.com>
     386DX/40               7.98   Aaron T. Baldie <atb@u.washington.edu>
     386DX/40 128c          7.98   John Pate <jpate@easynet.co.uk>
     386DX/40               7.98   Christian Nelson <cnelson@csugrad.cs.vt.edu>
     386DX/40               7.98   Alan Peckham <peckham@drei.enet.dec.com>
     386DX/40               8.06   Michael Guslick <michaelg@alpha2.csd.uwm.edu>
     386DX/40               8.06   Richard Brown <brown@midget.towson.edu>
     386DX/40               8.06   Bill G. Bohling <bs146@tali.uchsc.edu>

     Nx586/90 NexGen       67.44   <root@wgw.mnsinc.com>
     Nx586/90 NexGen       67.44   Robert Gehring <rag@cs.tu-berlin.de>
     Nx586/90 NexGen       67.48   David G. Eckard <dgeckard@eos.ncsu.edu>
     Nx586/100 NexGen      74.34   Cameron L. Spitzer <cls@truffala.sj.ca.us>
     Nx586/100 NexGen 256c 74.56   Marius Groenendijk <marius@cray-systems.lu>
     Nx586/110 NexGen 256c 81.51   Michael J. Micek <mmicek@muddcs.cs.hmc.edu>
     Nx586/110 NexGen      81.51   Ron Marsh <rmarsh@plains.nodak.edu>




  9.3.  Sistemi 486 configurati in modo strano o sbagliato












































     Sistema             BogoMips  Riferito da
     486DX/33 0c            1.45   Mark Gray <vatavian@gvu1.gatech.edu>
     486SL/25 0c            1.95   Paraskevas Evripidou <skevos@seas.smu.edu>
     486DLC/40 0c           2.45   S.Schendel <sschend@magnus.acs.ohio-state.edu>
     486DX/33 128c          2.94   P.J. Nefkens <p.nefkens@student.utwente.nl>
     486DX4/120 AMD         3.04   Andrew Steinbach <stei0113@maroon.tc.umn.edu>
     486DX5/133 AMD         3.05   Eric Hagen <ehagen@hawaii.edu>
     486DX4/100 Cyrix       3.06   Stuart Harvey <sharvey@primenet.com>
     486DX5/133 AMD         3.06   Charles Galpin <chg@severn.wash.inmet.com>
     486DX4/100             3.06   Bear Giles <bear@indra.com>
     486DX2/80              3.08   Gerald E. Butler <gbutler@phoenix.kent.edu>
     486DX4/120 AMD         3.08   Charles Hines <chuck_hines@vnet.ibm.com>
     486DX4/66 256c         3.10   Riccardo Capella <mc8508@mclink.it>
     486DX4/100 wb-cache    3.10   Paul Close <pdc@sgi.com>
     486DX4/120             3.13   Brian Perkins <bperkins@netspace.com>
     486DX4/120 AMD         3.15   <eruston@net2.intserv.com>
     486DX4/100             3.17   Thomas Sudbrak <sudbrak@borneo.gmd.de>
     486SLC2/50 Cyrix       3.30   Colin J. Wynne <cwynne@sage.wlu.edu>
     486DX/33               3.61   Marten van de Laan <marten@cs.rug.nl>
     486DX/33 noturbo       3.61   Dimitris Evmorfopoulos <devmorfo@mtu.edu>
     486DX4/120             3.74   Brian Wheeler <bdwheele@indiana.edu>
     486DX4/120 AMD         3.74   Frank Pilhofer <fp@informatik.uni-frankfurt.de>
     486DX4/100 Cyrix 256c  4      Joel Kelso <joel@cs.murdoch.edu.au>
     486DX/33 256c noturbo  4.25   Wouter Liefting <wlieftin@cs.vu.nl>
     486DX/33               4.66   Mark Gray <vatavian@gvu1.gatech.edu>
     486Rx2 Cyrix 25/50     4.85   <cosc19v2@menudo.uh.edu>
     486SX/33 noturbo       5.21   Scott D. Heavner <sdh@fishmonger.uucp>
     486DX2/66 overdrive    5.37   Jeremy Orr <jeremy@careercenter.sfsu.edu>
     486DX/33               5.66   Ryan Tucker <rtucker@ttgcitn.com>
     486DX2/66              5.88   P.J. Nefkens <p.nefkens@student.utwente.nl>
     486DX4/100             5.94   Howard Goldstein <hg@n2wx.ampr.org>
     486DX4/100 AMD         5.94   Mr Pink <vince@dallas.demon.co.uk>
     486DX4/100 notebook    6.55   Thomas <tom@dirac.physik.uni-konstanz.de>
     486DX4/100 notebook    6.55   Hugh McCurdy <hmccurdy@ix.netcom.com>
     486SLC Cyrix           7      Pieter Verhaeghe <pive@uia.ac.be>
     486SX/33               7.84   Paul Hedderly <prh6@unix.york.ac.uk>
     486DLC/40              7.98   Wil Cromer <nwc2@Ra.MsState.Edu>
     486DX/33 256c          8.27   Rohan Tronson <rohan@kihi.com.au>
     486DX4/100            11.11   NN <usenet@uxmail.ust.hk>
     486DX4/100            11.3    Earl Gooch <egooch@mc.com>
     486/66 Cyrix          13.02   Mike Baptiste <baptiste@bnr.ca>
     486SLC2/25            14.6    Vaughan R. Pratt <pratt@Sunburn.Stanford.EDU>
     486DX2/66 laptop      14.46   Robert Knop <rknop@netcom.com>
     486SLC2/66            18.94   <root@avalon.net>
     486DX/33 turbo        19.98   C Vetter <cbvetter@informatik.th-darmstadt.de>
     486DX4/75             21.5    Theo Scott <rkwtgs@pukrs3.puk.ac.za>
     486DX4/75             24.13   Sherman Hsieh <shieh@csua.berkeley.edu>
     486DX2/58             26.3    Vassili Leonov <leonov@iedv7.acd.com>
     486DX4/100 overclock  28.67   Theo Scott <rkwtgs@pukrs3.puk.ac.za>
     486DX2/80             36      Mark Lee <mlee@heartlab.rri.uwo.ca>
     486DX2/80             50.08   Mark Lee <mlee@heartlab.rri.uwo.ca>
     486DX4/100            60      Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
     486DX2/100 overclock  60.45   Tony D Shan <tdsst9+@pitt.edu>
     486DX5/133 AMD        75.40   Jeff Hyche <jwhyche@scott.net>
     486DX5/133 AMD        80.08   NN <guesta@slip-29-7.ots.utexas.edu>
     486DX5/133 AMD        87      John Wiggins <jwiggins@comp.uark.edu>




  9.4.  Normali Sistemi 486





     Sistema            BogoMips   Riferito da
     486SX/20 DECpc         9.98   Thomas Pfau <pfau@cnj.digex.com>
     486SX/25              12.24   M. Buchenrieder <mibu@scrum.greenie.muc.de>
     486SX/25              12.3    Darren McKay <e9bh@unb.ca>
     486SX/25              12.42   Mark R. Lindsey <mlindsey@nyx.cs.du.edu>
     486DX/25              12.5    Phillip Hardy <phillip@mserve.kiwi.gen.nz>
     486SX/25              12.52   Emmanual Emore <emor7672@elan.rowan.edu>
     486DX/33 256c         16.33   Eric Kemminan <ekemmina@pms709.ms.ford.com>
     486DX/33              16.35   Christopher L. Morrow <cm43@andrew.cmu.edu>
     486DX/33              16.43   Rob Janssen <pe1chl@amsat.org>
     486DX/33 64cache      16.44   H. Peter Anvin <hpa@nwu.edu>
     486DX/33 256c DIY     16.44   Wouter Liefting <wlieftin@cs.vu.nl>
     486DX/33 Intel 128c   16.44   Rafal Kustra <g1krakow@cdf.toronto.edu>
     486DX/33              16.5    Alex Freed <freed@europa.orion.adobe.com>
     486DX/33              16.6    Vaughan R. Pratt <pratt@Sunburn.Stanford.EDU>
     486DX/33 noturbo      16.61   C Vetter <cbvetter@informatik.th-darmstadt.de>
     486DX/33              16.61   Jeffrey L. Newbern <jnewbern@athena.mit.edu>
     486DX/33              16.61   Giuseppe De Marco <gdemarco@freenet.hut.fi>
     486DX/33              16.61   M Heuler <heuler@informatik.uni-wuerzburg.de>
     486DX/33              16.61   Frank Lofaro <ftlofaro@unlv.edu>
     486SX/33              16.64   Jacob Papenfuss <webmaster@the-corridor.com>
     486DX/33              16.77   Donald Lewis <dlewis@jackson.freenet.org>
     486DX/33              16.77   Stephan Boettcher <staphan@alzt.tau.ac.il>
     486DX/33 256c         16.77   David Manchester <mustang@tartarus.uwa.edu.au>
     486DX/40              19.8    Jose Calhariz <cal@minerva.inesc.pt>
     486DX/40              19.91   M Heuler <heuler@informatik.uni-wuerzburg.de>
     486DX/40              19.96   David A. Ranch <dranch@ecst.csuchico.edu>
     486DX/40 AMD          19.97   M Haardt <u31b3hs@informatik.RWTH-Aachen.DE>
     486DX/40 Intel        19.97   Paul van Spronsen <vspr@teppic.sun.ac.za>
     486DX/40              19.97   Ulf Tietz <ulf@rio70.bln.sni.de>
     486DX/40              19.97   <Eberhard_Moenkeberg@p27.rollo.central.de>
     486DX/40              19.97   Zoltan Lajber <lajbi@lajli.gau.hu>
     486DX/40              19.97   Wim van Dorst <baron@wiesje.hobby.nl>
     486DX/40 AMD          20      Chuck Munro <chuckm@canada.hp.com>
     486DX/40 AMD          20.09   Pieter Eendebak <peendebak@bbsw.idn.nl>
     486DX/50              24.48   Arnd Gehrmann <arnd@rea>
     486DX/50 AMD          24.85   Klaas Hemstra <hst@mh.nl>
     486DX/50 DTK          24.85   Randolph Christophers <randyc@lna.oz.au>
     486DX/50              24.85   Kevin Lentin <kevinl@bruce.cs.monash.edu.au>
     486DX2/50             24.85   Jason Matthew <jmatthew@kn.pacbell.com>
     486DX2/50             24.85   Gregory P. Smith <smithgr@cs.colorado.edu>
     486DX/50 VLB          24.97   Tom Miller <tvtom@en.com>
     486DX/50              24.99   Jeff <css@erols.com>
     486DX/50 Intel 256c   24.99   Mike <mike@emgee.demon.co.uk>
     486DX/50              25      Robert Herzog <rherzog@rc1.vub.ac.be>
     486DX2/50             25      M. Abrahamsson <swmike@uplift.df.lth.se>
     486DX2/50             25.0    Christian Holtje <choltje@ux1.cso.uiuc.edu>
     486DX2/50 DECpc       25.04   Thomas Pfau <pfau@cnj.digex.com>
     486DX2/50 Eisa        25.04   John Willing <willing@cimage.com>
     486DX2/50 256c        25.04   Zhou Yanmo <zhou@gauss.math.usf.edu>
     486DX/50              25.04   Michael Kress <kress@hal.saar.de>
     486DX2/50             25.04   Mats Wikholm <mwikholm@news.abo.fi>
     486DX2/50             25.04   Jean C Delepine <delepine@linux.u-picardia.fr>
     486DX/50              25.04   Jean C Delepine <delepine@linux.u-picardia.fr>
     486DX/50              25.04   Kevin Burtch <kburtch@pts.mot.com>
     486DX/50 notebook     25.04   Pierre Frenkiel <frenkiel@cdfap1.in2p3.fr>
     486DX/50              25.10   M Heuler <heuler@informatik.uni-wuerzburg.edu>
     486DX2/50             25.4    Brian Kennedy <bkenned@hubcap.clemson.edu>
     486DX2/66             32      Lee Sau Dan <h9210876@khuxa.hku.hk>
     486DX2/66             32.9    Frederick <niles@axp745.gsfc.nasa.gov>
     486DX2/66             33      Alec Muffett <alecm@uk-usenet.uk.sun.com>
     486DX2/66             33      NN <coolefa@pmifeg.com>
     486DX2/66             33      Steve Tinney <sjt@enlil.museum.upenn.edu>
     486DX2/66 Intel       33      Chuck Munro <chuckm@canada.hp.com>
     486DX2/66 VLB         33.0    Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
     486DX2/66 AMD         33.05   G. Skinner <gskinner@gwsunix1.crystalball.com>
     486DX2/66 VLB         33.18   Pablo Iranzo Gomez <iranzop@gong.ci.uv.es>
     486DX2/66 VLB         33.18   Dag Wieers <dag@digibel.be>
     486DX2/66             33.20   Arnd Gehrmann <arnd@rea.com>
     486DX2/66 Intel/PCI   33.22   C. Menke <carsten.menke@post.uni-bielefeld.de>
     486DX2/66             33.22   Brian Ricker <gt2327c@prism.gatech.edu>
     486DX2/66             33.22   Don Bennett < <don@engr.mun.ca>
     486DX2/66             33.22   Robert Heller <heller@cs.umass.edu>
     486DX2/66             33.22   Warwick Ward-Cox <wwar@lostlink.alt.za>
     486DX2/66             33.22   Chien-An Chen <giant@nwu.edu>
     486DX2/66 Eisa/VL     33.22   Serge <sviznyuk@magnus.acs.ohio-state.edu>
     486DX2/66 AMD         33.22   Wayne Robinson <wayner@renoir.cftnet.com>
     486DX2/66 Intel       33.22   Jim Barber <yeul@marsh.cs.martin.edu.au>
     486DX2/66             33.22   Tom Lowery <tlowery@mcs.kent.edu>
     486DX2/66             33.27   S Viznyuk <sviznyuk@magnus.acs.ohio-state.edu>
     486SX2/66             33.28   Jacob Papenfuss <root@the-corridor.com>
     486DX2/66             33.3    Devon Tuck <devon@netcom.com>
     486DX2/66 256cache    33.4    H. Peter Anvin <hpa@nwu.edu>
     486DX2/66             33.5    Jongyoon Lee <mr2@netcom.com>
     486DX2/66             33.5    Petrovsky Alexey <gong@cs.msu.su>
     486DX2/66             33.5    Sung Lee <slee2@umbc.edu>
     486DX2/66             33.55   Gene McCulley <mcculley@greatwall.cctt.com>
     486DX2/66             33.55   W. Zeilinger <wzeil@doradus.ast.univie.ac.at>
     486DX2/66             33.55   Donald Lewis <dlewis@jackson.freenet.org>
     486DX2/66             33.55   Eric Malkowski <malk@world.std.com>
     486DX2/66 0c          33.55   Chris Petit <mystere@ix.net.com>
     486DX2/66             33.55   <al-b@minster.york.ac.uk>
     486DX2/66             33.55   Jesper de Jong <jesper@cas.et.tudelft.nl>
     486DX2/66             33.55   John Paul Morrison <jmorriso@bogomips.com>
     486DX2/66             33.55   Arash <ei39594@ios.chalmers.se>
     486DX2/66             33.55   Ralph Lewis <rlewis@mail.wsu.edu>
     486DX2/66             33.55   Ulisses Alonso Camaro <alonso@bebe.uv.es>
     486DX2/66             33.55   Bussmann <bussmann@wolpi.infomatik.uni-bonn.de>
     486DX2/66 Intel/PCI   33.55   Louis J. LaBash <labash@lcjones.aclib.siue.edu>
     486DX2/66 Intel       33.55   Andrew Tubbiolo <enigma@seds.lpl.arizona.edu>
     486DX2/66             33.55   W Fink <werner.fink@physik.uni-stuttgart.de>
     486DX2/66 ICL         33.55   Mathias Koerber <mathias@solomon.technet.sg>
     486DX2/66             33.55   Bill Pogue <gwp@dithots.dithots.org>
     486DX2/66 256c        33.58   Theo Scott <rkwtgs@pukrs3.puk.ac.za>
     486DX2/66             33.7    C Triantafillou <triant@pegasus.montcleair.edu>
     486DX2/66 256c Intel  33.81   S Harris <harris@teaching.physics.ox.ac.uk>
     486DX2/66             33.9    Magnus Back <erambk@eraj.ericsson.se>
     486DX2/66 notebook    33.9    Robert A Knop <rknop@mop.caltech.edu>
     486DX2/66             34.06   Al Clark <aclark@netcom.com>
     486DX4/75             37.47   G Asmundarson <grettir@wordperfect.com>
     486DX2/80             39.93   Andrew Tubbiolo <enigma@seds.lpl.arizona.edu>
     486DX2/80 overcl/66   39.94   Mario L. Guttierez <mgutier@mentor.sdu.edu>
     486DX2/80 AMD         39.94   Corey D Brenner <brenner@umr.edu>
     486DX2/80             39.94   Dan Delaney <cgdela01@homer.louisville.edu>
     486DX2/80             39.94   D t Haar <danny@caution.cistron.nl.mugnet.org>
     486DX2/80 overcl      39.94   Peter Suetterlin <ps@kis.uni-freiburg.de>
     486DX2/80 AMD         39.94   JL Gomez <kitana!sysop@caprica.com>
     486DX2/80 AMD         39.94   Pete Krawczyk <pkrawczy@uiuc.edu>
     486DX2/80 AMD         40      Rene Baart <baart@simplex.nl>
     486DX2/80 AMD         40      Wolfgang Kalthoff <wo@rio70.bln.sni.de>
     486DX2/80             40.0    Rick Brown <ccastrb@prism.gatech.edu>
     486DX2/80 AMD         40.14   Jon Lewis <jlewis@inorganic5.chem.ufl.edu>
     486DX2/80 AMD         40.14   Richard S. Stone <rstone@edgp.com>
     486DX2/80             40.15   Oleg <oleg@hpcms.co.il>
     486DX2/80 AMD         40.18   Adri Verhoef <a3@a3.xs4all.nl>
     486DX2/80             40.18   Mats Andtbacka <mandtback@abo.fi>
     486DX2/100 AMD overcl 49.14   Jon Lewis <jlewis@inorganic5.chem.ufl.edu>
     5x86/100 AMD undercl  49.66   NN <root@tailor.aleim.net>
     486DX4/100            49.66   Pete Cervasio <cervasio@airmail.net>
     486DX4/100 256c       49.71   Lutz Pressler <lutz.pressler@med-stat.GWDG.de>
     486DX4/100            49.71   Brett Gersekowski <bgrerseko@powerup.com.au>
     486DX4/100 Intel 256c 49.77   Angelo Haritsis <ah@doc.ic.ac.uk>
     5x86/100 AMB undercl  49.77   Bernd Hentig <bernd.hentig@guug.de>
     486DX4/100            49.78   Aurel Balmosan <aurel@xylo.owl.de>
     486DX4/100            49.87   Chris Saia <minkie@concentric.net>
     486DX4/100            49.87   Aaron Brick <abrick@dcc.uchile.cl>
     486DX4/100            50      Donald Lewis <dlewis@jackson.freenet.org>
     486DX4/100            50.02   Peter Skov Knudsen <gogol@ask.diku.dk>
     486DX4/100            50.02   Shadow Weaver <djamison@students.wisc.edu>
     486DX4/100 AMD        50.3    Dave <shodan@shodan.clark.net>
     486DX4/100 AMD        50.04   Tony Smolar <asmolar@fast.net>
     486DX4/100            50.05   fredk <fredk@shadow.net>
     486DX4/100            50.06   Ronald Prague <ronp@fisnet.net>
     486DX4/100            50.08   Matt Gisher <matt@matt.fidalgo.net>
     486DX4/100            50.08   Steven A. Duchene <sduchene@cis.ysu.edu>
     486DX4/100            50.08   Miles O'Neal <meo@schoneal.com>
     486DX4/100            50.08   Will <zxmvg07@hp12.zdv.uni-tuebingen.de>
     486DX4/100            50.08   Piet de Bondt <bondt@dutiws.twi.tudelft.nl>
     486DX4/100 laptop     50.08   Karl Kleinpaste <karl_kleinpaste@cs.cmu.edu>
     486DX4/100 256c       50.08   Thomas Kanschik <y0000997@ws.rz.tu-bs.de>
     486DX4/100            50.08   Linas Vepstas <linas@fc.net>
     486DX4/100            50.08   Ed Daiga <daiga@engin.umich.edu>
     486DX4/100 notebook   50.08   Gerry Quejada <fd863@cleveland.freenet.edu>
     486DX4/100 AMD        50.08   B Schuller <schuller@ind136a.wi.leidenuniv.nl>
     486DX4/100            50.08   J.L. Brothers <brothers@halcyon.com>
     486DX4/100            50.08   David E.A. Wilson <david@cs.uow.edu.au>
     486DX4/100            50.08   Mark Lumsden <root@titan2.physics.mcmaster.ca>
     486DX4/100            50.08   Ashar <ashar@netcom12.netcom.com>
     486DX4/100            50.08   Jacob Waltz <waltz@pcjiw.lampf.lanl.gov>
     486DX4/100            50.08   Tom Sinclair <sinner@cafe.net>
     486DX4/100 AMD        50.08   G. Skinner <gskinner@gwsunix1.crystalball.com>
     486DX4/100 AMD        50.08   Nick Savoiu <nick@ritz.mordor.com>
     486DX4/100            50.08   Thomas J Fisher <twb5odt@nmia.com>
     486DX4/100            50.08   Pascal Pensa <pensa@aurora.unice.fr>
     486DX4/100            50.08   Julian Bradbury <julian@xabcs.demon.co.uk>
     486DX4/100            50.51   Frederic Potter <frederic@swing.ibp.fr>
     486DX4/100            50.66   Bill Stegers <bill_ste@zeelandnet.nl>
     486DX4/120 256c       59.1    Kevin <kalichwa@oakland.edu>
     486DX4/120 AMD        59.80   Mark Tranchant <mat92@ecs.soton.ac.uk>
     486DX4/120 AMD        59.80   Fred Broce <fbroce@atlanta.com>
     486DX4/120 AMD        59.90   Marko Ovaska <ovaska@cc.helsinki.fi>
     486DX4/120 AMD        59.80   Bob Purdon <bobp@mpx.com.au>
     486DX4/120 AMD        59.80   Pat Young <dice@netbsd.warped.com>
     486DX4/120            59.91   Will <zxmvg07@hp12.zdv.uni-tuebingen.de>
     486DX4/120 AMD 256c   60.01   Angelo Haritsis <ah@doc.ic.ac.uk>
     486DX4/120 overcl     60.45   Pascal Pensa <pensa@aurora.unice.fr>
     486DX4/120            60.45   Neal Howard <neal@metronet.com>
     486DX4/120 AMD        60.45   Oscar Belmar Madrid <obelmar@anakena.usach.cl>
     486DX4/120            60.45   Jason Buchanan <jsb@digistar.com>
     486DX4/120            60.45   Foersterling <dirk@informatik.uni-frankfurt.de>
     486DX4/120            60.45   Bernd Hentig <bernd@finow.snafu.de>
     5x86/133 AMD          66.15   NN <root@tailor.aleim.net>
     5x86/133 AMD          66.15   Brad Wilson <bwilson@deltanet.com>
     5x86/133 AMD          66.15   Paul S. Doyle <paul.doyle@mci.com>
     5x86/133 AMD          66.44   P Yli-Krekola <perttu@ntcmar01ba.ntc.nokia.com>
     5x86/133 AMD          66.44   V. Tailor <vtailor@ibm.net>
     5x86/133 AMD          66.55   Andrew B. Cramer <cramer@ripco.com>
     5x86/133 AMD          66.56   Bob Nielsen <nielsen@primenet.com>
     5x86/133 AMD          66.65   Geoff Raye <gtraye@igsrsparc2.er.usgs.gov>
     5x86/133 AMD          66.7    Klaas Hemstra <hst@mh.nl>
     5x86/133 AMD          66.80   N.N. <vp24njcb@ubvms.cc.buffalo.edu>
     5x86/133 AMD   256c   67.10   Vasily Lewis
     5x86/133 AMD          67.10   James Reith <reith@racores.com>
     5x86/133 AMD   256c   67.10   Yves Rougy <yrougy%siam@cal.fr>
     5x86/133 AMD   256c   67.10   Peter A. Koren <pkoren@lvdc20.dseg.ti.com>
     5x86/133 AMD   256c   67.10   Wim Joppe <joppe@xs4all.nl>
     5x86/133 AMD   256c   67.10   Gunnar Stefansson <gunnars@rhi.hi.is>
     5x86/133 AMD   256c   67.10   Vernard Martin <vernard.martin@cc.gatech.edu>
     5x86/150 AMD overcl   74.75   Sergio Riveros <riveros@musca.unm.edu>
     5x86/150 AMD overcl   74.75   Arthur K. Chan <artchan@cs.ucr.edu>
     5x86/160 AMD overcl   79.87   M.Suencksen <msuencks@techfak.uni-bielefeld.de>
     5x86/160 AMD overcl   79.87   J. Chris Hammond <cosmo@pcisys.net>
     5x86/160 AMD overcl   79.87   Bird Chen <luca@linux.taiwan.hp.com>
     5x86/160 AMD overcl   79.89   Geir Skaugen <geir.skaugen@energy.sintef.no>
     5x86/160 AMD overcl   79.89   Martin Vernon <martin@gw6hva.demon.co.uk>
     5x86/160 AMD overcl   79.92   T. Zerucha <zerucha@shell.portal.com>
     5x86/160 AMD overcl   80.36   Paul Colucci <pcolucci@acsu.buffalo.edu>
     5x86/160 AMD overcl   80.36   Steinar Haug <sthaug@nethelp.no>
     5x86/160 AMD overcl   80.36   James Daniel <triadmin@bga.com>
     5x86/160 AMD          80.36   David H.S. Oh <david@std.net>




  9.5.  Variazioni sui normali 486: Cyrix/IBM, UMC


     Sistema               BogoMips  Riferito da
     486DLC/33                 9.42  Dennis Robinson <djrobins@uxa.cso.uiuc.edu>
     486DLC/33 387DX/40        9.47  Denis Solaro <drzob@vectrex.login.qc.ca>
     486DLC/33 Cyrix wb        9.5   M. Asplund <matt@xenon.cchem.berkely.edu>
     486DLC/33 Cyrix 386      11.2   Alex Freed <freed@europa.orion.adobe.com>
     486DLC/40 256c           11.33  Schendel <sschend@magnus.acs.ohio-state.edu>
     486Dx/40 Cyrix           11.73  Malcolm Bremer <malcolm@strw.LeidenUniv.nl>
     486DRx2/40 Cyrix         13.10  Christopher Lau <clau@acs.ucalgary.ca>
     486DX/33 Cyrix           13.21  M Haardt <u31b3hs@informatik.RWTH-Aachen.DE>
     486DLC/40 bogoboost      13.21  Harry Pasanen <ps@tekla.fi>
     486DLC/40 487 Cyrix      13.21  Ian A. Verschuren <iav@po.CWRU.Edu>
     486DCL Cyrix             13.3   Tracer Bullet P.I. <ges@earth.baylor.edu>
     486DLC/40                13.31  Adam Frampton <frampton@access2.digex.net>
     486DLC/40                13.31  Rick Chow <crc@cacs.usl.edu>
     486SLC-S/33              13.51  Brad Pepers <pepersb@cuug.ab.ca>
     486DLC/40 no Cxpatch     15.47  Sergei O. Naoumov <serge@envy.astro.unc.edu>
     486DLC/40 TI 128c        15.97  Philip K. Roban <phil@seal.micro.umn.edu>
     486DLC/40 Cyrix          15.97  L.J. LaBash <labash@lcjones.aclib.siue.edu>
     486DRx2/40               15.99  Christopher Lau <lauc@fusion.cuc.ab.ca>
     486DX2/66 IBM no-FF      19     NN <coolefa@pmifeg.com>
     486SLC2/66 IBM 64c       18.95  Sujat Jamil <sujat@shasta.ee.umn.edu>
     486SLC2/66 IBM 128c      18.95  Sujat Jamil <sujat@shasta.ee.umn.edu>
     486SLC2/66               19.02  Harry Mangalam <mangalam@uci.edu>
     486SLC/50                19.28  Sion Arrowsmith <sion@bast.demon.co.uk>
     486BL3/75 IBM 256c       21.40  Anders Stenback <stenback@kuai.se>
     486BL3/75 IBM 256c       21.50  Ming S. Chan <ming.chan@canrem.com>
     486DX2/66 Cyrix 128c     26.63  Derek Kwan <dkwan@zeus.UWaterloo.ca>
     486DX2/66 Cyrix          26.63  Adrian Parker <adrian@willen.demon.co.uk>
     486DX2-S/66 256c         26.63  Jean-Marc Wislez <JeanMarc.Wislez@rug.ac.be>
     486DX2/66 Cyrix          26.63  Curran W. Fey <fey@biotech.washington.edu>
     486BL3/100 IBM 256c      28.36  Anders Stenback <stenback@kuai.se>

     486SX-S/33 UMC 0c        20.20  Hynek Med <xmedh02@manes.vse.cz>
     486SX-S/40 UMC 0c        26.52  Hynek Med <xmedh02@manes.vse.cz>
     486SX-U5/40 UMC 0c       26.63  Dusan Mihajlovic <zdule@herkules.co.yu>




  9.6.  Sistemi Pentium configurati in modo strano o sbagliato, o vari
  azioni






     Sistema               BogoMips  Riferito da
     Pentium/66                2.18  Bob Myers <root@shyguy.lonestar.org>
     Pentium/90 notebook       9.5   Mark Maybee <markm@cs.colorado.edu>
     6x86/120 Cyrix           52.32  Joel Boring <dwild@eskimo.com>
     Pentium/83 Overdrive     82.85  Brian Smith <smithb@laraby.tiac.net>
     Pentium/83 Overdrive     83.32  Scott Francis <mord@netcom.com>
     Pentium/83 Overdrive     82.94  G. Spiegelberg <greg@owens.ridgecrest.ca.us>
     Pentium/83 Overdrive     83.35  Jacek Polewczak <jacek.polewczak@csun.edu>
     6x86/120 P120+overcl    104.86  Howard Poe <falcor@kingsnet.com>
     Pentium MMX/263 overcl  392.40  John Appleby <jma24@cam.ac.uk>
     AMD K6-2/300            399.95  Chris Ebenezer <chriseb@nortelworks.com>
     Pentium MMX/231         419.43  Juan Domenech <domenech@mail.seric.es>
     Pentium MMX/263 overcl  435.87  Juan Domenech <domenech@mail.seric.es>
     SMP4 Pentium Pro/200    700.13  R. Carrico <robert_carrico@themoneystore.com>




  9.7.  Normali sistemi Pentium















































     Sistema               BogoMips  Riferito da
     Pentium/60               23     Chien-An Chen <giant@nwu.edu>
     Pentium/60               23.96  Joost Helberg <jhelberg@nlsun8.oracle.nl>
     Pentium/60               23.96  Ulf Tietz <ulf@rio70.bln.sni.de>
     Pentium/60 Gateway       23.96  Manoj Kasichainula <mvkasich@eos.ncsu.edu>
     Pentium/60               23.96  Pierre Frenkiel <frenkiel@cdfap1.in2p3.fr>
     Pentium/60               23.96  Tim Oosterbroek <tim@astro.uva.nl>
     Pentium/60 NCR 3455      24     Mathias Koerber <mathias@solomon.technet.sg>
     Pentium/60               24     Joe Sloan <jjs@engr.ucr.edu>
     Pentium/60               24.0   Mark H. Wood <mwood@indyvax.iupui.edu>
     Pentium/60               24.13  R.M. van Rijswijk <rijswijk@cs.utwente.nl>
     Pentium/66               25     Chuck Munro <chuckm@canada.hp.com>
     Pentium/66               26.63  Jason M. Naughton <jnaughto@ee.ryerson.ca>
     Pentium/66               26.84  Kelly Carmichael <kcarmich@cln.etc.bc.ca>
     Pentium/75 256c          29.5   Chris Dodd <cdodd@super.win.or.jp>
     Pentium/75               29.79  Scott M. Grim <sgrim@netwalk.com>
     Pentium/75               29.80  Torbjoern Kristoffersen <torbkris@online.no>
     Pentium/75               29.95  Steve Martin <smartin@mrg.uswest.com>
     Pentium/75               30.22  Zoran Marjanski <bagzor@enterprise.ca>
     Pentium/75               30.22  Andrew Buckby <c4ab1@dmu.ac.uk>
     Pentium/75               30.22  Stuart Nuttall <u9230106@sys.uea.ac.uk>
     Pentium/90 notebook      32.73  Rich Neves <neves@cs.colorado.edu>
     Pentium/90               34.07  A. Galbraith <ajgalb@postman.essex.ac.uk>
     Pentium/90 zappa 256c    35.6   Sebastien Dedieu <dedieu@emi.u-bordeaux.fr>
     Pentium/90               35.84  Jason Nunn <jsno@stormfront.com.au>
     Pentium/90               35.88  Joe Anderson <CPJJA@ttacs3.ttu.edu>
     Pentium/90               35.88  Warwick Allison <warwick@cs.uq.oz.au>
     Pentium/90               35.94  Erik Walthinsen <omega@teleport.com>
     Pentium/90               36     Joe Sloan <jjs@engr.ucr.edu>
     Pentium/90               36     Larry Auton <lda@nfa.research.att.com>
     Pentium/90               36     Richard Knipe <knipe@lobby.ti.com>
     Pentium/90               36.0   Werner Almesberger <almesber@lrc.epfl.ch>
     Pentium/90               36.06  Rob J. Nauta <rob@iaehv.nl>
     Pentium/90               36.08  Leung Hon Wa <cshwleun@cs.citu.edu.hk>
     Pentium/90 Zeos          36.08  Chris Laurel <claurel@mr.net>
     Pentium/90               36.08  Ronald Prague <ronp@fishnet.net>
     Pentium/90               36.08  Adrian Blues <adrian@hypereality.co.uk>
     Pentium/90               36.08  Pak Yin Tam "Fred" <ptam@eesun1.tamu.edu>
     Pentium/90               36.08  Jason Heiss <jheiss@cco.caltech.edu>
     Pentium/90               36.08  Tim Krantz <tek@dsinc.com>
     Pentium/90 Gateway       36.08  Pete Stewart <stewart@bae.bellcore.com>
     Pentium/90               36.08  Tom Manos <tmanos@infi.net>
     Pentium/90               36.08  Richard Mundell <R.Mundell@uea.ac.uk>
     Pentium/90               36.08  NN <usenet@uxmail.ust.hk>
     Pentium/90               36.08  Yavuz Batmaz <yavuzb@knidos.cc.metu.edu.tr>
     Pentium/90               36.08  Alan Skelley <askelley@gpu.srv.ualberta.ca>
     Pentium/90               36.08  Ralph Sims <ralphs@locus.halcyon.com>
     Pentium/90               36.08  Julian Bradbury <julian@xabcs.demon.co.uk>
     Pentium/90               36.08  Dan Langrill <langrlld@mussel.cig.mot.com>
     Pentium/90               36.08  Ravi Krishna Swamy <rkswamy@eos.ncsu.edu>
     Pentium/90               36.08  J.L. Brothers <brothers@halcyon.com>
     Pentium/90 Micronics     36.09  Andrew Brown <andrewbrown@acm.org>
     Pentium/90               36.27  Giao H. Phan <giao@concrete.resnet.upenn.edu>
     Pentium/90 Plato         36.4   Joe Valenzuela <smarm@ibm.net>
     Pentium/90               36.5   Mike Kelleher <mikejk@umfacad.maine.edu>
     Pentium/90               36.9   Ted Gaunt <tgaunt@pms701.pms.ford.com>
     Pentium/100 overcl       38.39  Stefan Onderka <stefan.onderka@metronet.de>
     Pentium/100              39.52  Adrian Blues <adrian@hypereality.co.uk>
     Pentium/100 overcl       39.73  Phil Howard <phil@clr.com>
     Pentium/100              39.73  <Peter.Weiss@informatik.uni-oldenburg.de>
     Pentium/100 0c           39.73  Jason Crawford <jasonc1@gramercy.ios.com>
     Pentium/100 overcl       39.83  Stefan Onderka <stefan.onderka@metronet.de>
     Pentium/100              39.93  Tom Miller <tvtom@en.com>
     Pentium/100 Cyrix        39.94  Mike Holland <myk@cygnus.uwa.edu.au>
     Pentium/100              39.94  KAZ Vorpal <kaz@upx.net>
     Pentium/100 overcl       39.94  Donar G.E. Alofs <donar@cs.vu.nl>
     Pentium/100              39.94  Larry Snyder <larry@trauma.iag.net>
     Pentium/100              39.94  Ian Hill <ian@hecate.phy.queensu.ca>
     Pentium/100              39.94  John Crawford <link@spu.edu>
     Pentium/100              39.94  Jered <jered@mit.edu>
     Pentium/100 overcl       39.94  Ian <irs2@tweedledum.amp.york.ac.uk>
     Pentium/100              39.94  Brian McGhee <brianm@iceonline.com>
     Pentium/100              39.94  M Skjelland <morten.skjelland@pvv.unit.no>
     Pentium/100              39.96  Dan Kha <dkha@yorku.ca>
     Pentium/100              39.98  Phillipe Charon <charron@ecoledoc.ibp.fr>
     Pentium/100              40.03  <bon@elektron.ikp.physik.th-darmstadt.de>
     Pentium/100              40.08  Ronny Spiegel <rspiegel@htwm.de>
     Pentium/100              40.18  David Baldwin <davidb@exis.net>
     Pentium/100              40.18  <habibie@catevr.fiu.edu>
     Pentium/120 Cyrix        47.8   Simon Ho <simon@epsilon.win-uk.net>
     Pentium/120              47.82  Jorge Juan-Chico <jjchico@imse.cnm.es>
     Pentium/120 Cyrix        47.92  Joel N. Squire <squire@colorado.edu>
     Pentium/120              47.93  Umberto d'Ortona <umberto@grenet.fr>
     Pentium/120 Cyrix        47.93  Jim T. Polk <jtpolk@cris.com>
     Pentium/120              47.93  Jon Trowbridge <trow@mcs.com>
     Pentium/120              47.98  Craig Bates <cbates@psu.edu>
     Pentium/120              47.92   Aaron Brick <abrick@dcc.uchile.cl>
     Pentium/120 Cyrix        48     Steve <horne@mhd2.pfc.mit.edu>
     Pentium/120              48.00  Michael Wazenski <mwazenski@dsrnet.com>
     Pentium/120 Intel        48.02  Scott M. Grim <sgrim@netwalk.com>
     Pentium/120 Cyrix        48.27  Glenn T. Jayaputera <gjt@budgie.apana.org.au>
     Pentium/120              48.27  Roman Mitnitski <mitnits@shany.net>
     Pentium/120              48.27  Peter Walsh <pwalsh@rain.org>
     Pentium/120 Cyrix        48.2   Viznyuk <sviznyuk@magnus.acs.ohio-state.edu>
     Pentium/120              49.27  Simon Hargrave <simon@revell.demon.co.uk>
     Pentium/133              53.04  Wayne Roberts <wroberts@aug.com>
     Pentium/133              53.04  Gregory Travis <greg@indiana.edu>
     Pentium/133 overcl       53.04  A. Kunigelis <algikun@santaka.sc-uni.ktu.lt>
     Pentium/133 Intel        53.04  Jimmie Farmer <calvin@malchick.com>
     Pentium/133              53.25  Chuck Mattern <cmattern@mindspring.com>
     Pentium/133              53.26  Glenn Holt <gholt@lsil.com>
     Pentium/133              53.26  Heikki Levanto <heikki@lsd.ping.dk>
     Pentium/133              53.26  Chaim Tarshish <chaim@ipl.med.nyu.edu>
     Pentium/133              53.26  Mitchell B. Hamm <hamm@one.net>
     Pentium/133              53.26  Donald Lewis <dlewis@jackson.freenet.org>
     Pentium/133              53.26  Jon Trowbridge <trow@kremlin.emccta.com>
     Pentium/133              53.26  Charny Peete Mitchell <cpmiche@eos.ncsu.edu>
     Pentium/133 256c         53.26  David Wuertele <dave@gctech.com>
     Pentium/133 256c         53.68  Giuseppe Miceli <ferdy@ccii.unipi.it>
     Pentium/133              53.68  Michael Kress <kress@hal.saar.de>
     Pentium/150 Intel        59.80  Joel D. Young <jdyoung@afit.af.mil>
     Pentium/150              60.01  Joost de Greef <joost@stack.nl>
     Pentium/150 overcl       60.21  Duarte Cordeiro <l38404@alfa.ist.utl.pt>
     Pentium/166              66.16  Pedro Soria-Rodriguez <sorrodp@wpi.edu>
     Pentium/166              66.35  K. Visweswaran <kviswesw@lehman.com>
     Pentium/166              66.36  T. Endo <enchan@trc.rwcp.or.jp>
     Pentium/166              66.44  Donald Lewis <dlewis@jackson.freenet.org>
     Pentium/166              66.76  F. Baitinger <baiti@herrenberg.netsurf.de>
     Pentium/166              67.10  Jon Trowbridge <trow@mcs.com>
     Pentium/166              67.10  Dylan <dylan@ert.com>
     Pentium/166 512c         67.10  Dirk Freese <freese@infra.de>
     C6/200 CenterHauls       79.46  James Rotenberry <rotenber@jmr.lasx.com>
     Pentium/200              79.66  Piete Brooks <Piete.Brooks@cl.cam.ac.uk>
     Pentium/200              79.69  Timm Gleason <timm@bess.net>
     Pentium/200              79.89  Dave S. Baker <dave@acedia.demon.co.uk>
     Pentium/200              78.87  Nick D'Apice <ndapice@erols.com>
     Pentium/200              80.08  Anders Stenback <stenback@hehe.com>
     Pentium/200              80.08  Steve Freeland <sfreel@cs.mcgill.ca>
     Pentium/200              81.92  Steve Baur <steve@xemacs.org>



  9.8.  Variazioni dei normali Pentium: MMX, Pro, II, Cyrix, AMD

































































     Sistema               BogoMips  Riferito da
     Pentium MMX/133         265.77  Ron Peters <rpeters@f15fast.al.intel.com>
     Pentium MMX/150         307.53  Sami Sihvonen <buggy@fix.no>
     Pentium MMX/166 notebk  331.75  n.n. <visionary@aura.title14.com>
     Pentium MMX/166         331.78  Rob Janssen <pe1chl@amsat.org>
     Pentium MMX/166         331.78  Dave Page <dave@vale-housing.co.uk>
     Pentium MMX/166         331.78  Matthew C. Sell <amtmcs@amsta.leeds.ac.uk>
     Pentium MMX/166         333.41  Sjoelie <patrick@sjoel.xs4all.nl>
     Pentium MMX/166         333.41  Viet Yen Nguyen <vt@multiweb.nl>
     Pentium MMX/166         333.41  Marcin Owsiany <porridge@lo4.ids.bielsko.pl>
     Pentium MMX/180         358.81  David Efflandt <efflandt@xnet.com>
     Pentium MMX/200         398.13  Andy Saunders <andi@numenor.oucs.ox.ac.uk>
     Pentium MMX/200         398.13  A. James Lewis <james@vrtx.net>
     Pentium MMX/200         398.13  Sean Horan <sean@psy.ed.asu.edu>
     Pentium MMX/200         398.19  Fabio Comolli <comolli@tin.it>
     Pentium MMX/200         398.95  Reinhold J. Gerharz <rgerharx@erols.com>
     Pentium MMX/200         398.95  Eric Beymer <beymer@soundex.com>
     Pentium MMX/200         398.95  Duane Steel <dsteele@direct.ca>
     Pentium MMX/200         398.95  <ndpilatz@undergrad.math.uwaterloo.ca>
     Pentium MMX/200         400     Rob Jokinen <rjokinen@rt66.com>
     Pentium MMX/200         400.59  Paul Black <paul@darwin.demon.co.uk>
     Pentium MMX/200         400.59  Juho Cederstrom <cederstrom@kolumbus.fi>
     Pentium MMX/200         400.59  Bart <bart@aceonline.com.au>
     Pentium MMX/210 overcl  416.97  John Saunders <john@nlc.net.au>
     Pentium MMX/225 overcl  448.92  Ingo Reimann <reimann@uni-muenster.de>
     Pentium MMX/225 overcl  448.92  Mattias Hembruch <mghembru@ece.uwaterloo.ca>
     Pentium MMX/225 overcl  448.92  Larry Lade <lade@btigate.com>
     Pentium MMX/230 overcl  461.85  Rene Stanneveld <edge@huizen.nhkanaal.nl>
     Pentium MMX/233         463.67  Rui M.B. Machado <rui@nifdl7.fd.ul.pt>
     Pentium MMX/233         463.67  Rob Janssen <pe1chl@amsat.org>
     Pentium MMX/233         465.31  Per Andersson <ppan@cntw.com>
     Pentium MMX/233         465.31  Jose Maria Perez Box <jmpbox@etsin.upm.es>
     Pentium MMX/233         466.94  Van Overbruggen <marcel@johannes.iconnect.nl>
     Pentium MMX/233         466.94  Erwin Lubbers <erwin@box.nl>
     Pentium MMX/250 overcl  498.07  Maarten van Rossum <m@vr.xs4all.nl>
     Pentium MMX/266 overcl  525.93  Frank <r2@xs4all.nl>

     Pentium Pro/133         132.88  John D. Sundberg <jdsundberg@mmm.com>
     Pentium Pro/150         149.50  Rogier Wolff <wolff@bitwizard.nl>
     Pentium Pro/180         179.61  Chuck Fee <fee@ch4549.org>
     Pentium Pro/200         197.42  Michael Griffith <grif@cs.ucr.edu>
     Pentium Pro/200         197.42  Curtis Varner <carner@cs.ucr.edu>
     Pentium Pro/200         198.84  Erik Max Francis <max@alcyone.com>
     Pentium Pro/200         198.84  Marc Winkler <marcus@healthchex.com>
     Pentium Pro/200         199.04  V. Bostrom <Vareck_Bostrom@ccm.jf.intel.com>
     Pentium Pro/200         199.06  Justin Clancy <justin@hippos.demon.co.uk>
     Pentium Pro/200         199.06  Glenn Lamb <mumford@netcom15.netcom.com>
     Pentium Pro/200         199.06  Laszlo Herczeg <las@light-house.com>
     Pentium Pro/200         199.07  Stefan <boresch@schuber.u-strasbg.fr>
     Pentium Pro/200         199.07  Greg Fausak <lgfausak@august.com>
     Pentium Pro/200         199.07  Chris Jones <chris@planetsymphone.com>
     Pentium Pro/200         199.07  Matthew S. Crocker <matthew@crocker.com>
     Pentium Pro/200         199.95  Reinhold J. Gerharz <rgerharx@erols.com>
     Pentium Pro/200         200.32  Gil Megidish <gmegidis@ort.org.il>
     Pentium Pro/200         200.32  Jose Navarro <jnavarro@aoc.nrao.edu>
     Pentium Pro/200         200.32  <Eric_Zucker@om.hp.com>
     Pentium Pro/200         200.32  Wayne Scott <wscott@ichips.intel.com>
     Pentium Pro/200         200.32  Adrian L. Hosey <ahosey@cs.indiana.edu>
     Pentium Pro/233 overcl  234.43  S. Curtarolo <auro@spiro.fisica.unipd.it>

     Pentium II/233          233.47  Torbjoern Kristoffersen <torbkris@online.no>
     Pentium II/233          233.47  Sorin Mitran <mitran@irs.fzk.de>
     Pentium II/266          265.42  Jon Trowbridge <trow@kremlin.emccta.com>
     Pentium II/266          265.42  A. Hochwimmer <a.hochwimmer@auckland.ac.nz>
     Pentium II/266          265.44  Nick Ullman <nick@avenza.com>
     Pentium II/266          266.24  Pieter Eendebak <p.t.eendebak@phys.uu.nl>
     Pentium II/266          267.06  James McKinnon <jmack@phys.ualberta.ca>
     Pentium II/266          267.06  Greg <gl2hughes@undergrad.math.uwaterloo.ca>
     Pentium II/266          267.06  Pros Robaer <pros@innet.be>
     Pentium II/266          272.79  Frank Hale <frankhale@worldnet.att.net>
     Pentium II/300 overcl   299.01  Martin Lathoud <nytral@endirect.qc.ca>
     Pentium II/448 overcl   447.28  Mathieu Bois <mathieu.bois@nomura.co.uk>
     Pentium II/450          447.28  Mathieu Bois <mathieu.bois@nomura.co.uk>
     Pentium II/466          462.03  Bjorn Lindgren <bjorn@chiba.cx>

     Intel Celeron/333       332.6   Florian <florian@egon-bbs.n-a-m.de>

     Cyrix 5x86/100          100.16  NN <root@anxa04.cc.ic.ac.uk>
     Cyrix 5x86/100          100.19  Valient Gough <vgough@teton.mines.edu>
     Cyrix 5x86/100          100.47  C.Chan <chan@alfrothul.uchicago.edu>
     Cyrix 5x86/120 P150+    119.60  Wynstan Tong <wynstan@eecg.toronto.ca>
     Cyrix 5x86/120 P150+    119.60  Joel N. Squire <squire@colorado.edu>
     Cyrix 5x86/120 P150+    119.83  Leland Olds <olds@eskimo.com>
     Cyrix 5x86/120 P150+    119.83  NN <root@anxa04.cc.ic.ac.uk>
     Cyrix 5x86/120 P150+    120.68  C.Chan <chan@alfrothul.uchicago.edu>
     Cyrix 5x86/120 P150+    122.01  Andre Coetzee <acoetzee@ctcc.gov.za>

     Cyrix 6x86/100           99.42  Stig M. Valstad <svalstad@sn.no>
     Cyrix 6x86/110 P133+    109.77  Matthew Flint <matthew@philtrum.demon.co.uk>
     Cyrix 6x86/110 P133+    109.77  John Merriam <suprnaut@esslink.com>
     Cyrix 6x86/110 P133+    109.77  Keith Smith <keith@ksmith.com>
     Cyrix 6x86/120 P150+    119     Jean-Claude Gouiran <jcg13@ibm.net>
     Cyrix 6x86/120 P150+    119.60  Taso Lyristis <taso@remus.rutgers.edu>
     Cyrix 6x86/120 P150+    119.60  Hrvoje Stipetic <stipe@zemris.fer.hr>
     Cyrix 6x86/120          119.60  Yakko J. Warner <yakko@wtower.com>
     Cyrix 6x86/120 P150+    119.60  B. James Philippe <bryan@terran.org>
     Cyrix 6x86/120 P150+    119.83  Roger Merchberger <zmerch@northernway.net>
     Cyrix 6x86/120          119.83  Daniel Wold <danw@panix.com>
     Cyrix 6x86/120          120     John C. Beasley <beaslej1@nevada.edu>
     Cyrix 6x86/120 P150+    120.01  Jay Thorne <jay@result.com>
     Cyrix 6x86/120 P150+    120.01  Jeawan Kim <jaewan@harc.edu>
     Cyrix 6x86/120 P150+    120.91  Cymen <cymen@ziplink.net>
     Cyrix 6x86/133 P166+    132.71  Holger Kemper <hok@balu.ping.de>
     Cyrix 6x86/133 P166+    132.71  Hrvoje Stipetic <stipe@zemris.fer.hr>
     Cyrix 6x86/133 P166+    132.82  Alex Liffers <aliffers@tartarus.uwa.edu.au>
     Cyrix 6x86/133 P166+    132.82  Brian C. Theobald <theobald@nortel.ca>
     Cyrix 6x86/133 P166+    132.88  Alvaro Lopes <alvieboy@utad.pt>
     Cyrix 6x86/133 P166+    132.88  Craig Andersen <andersen@fastlane.net>
     Cyrix 6x86/133 P166+    133.73  C. Drews <drews_c@informatik.fh-hamburg.de>
     Cyrix 6x86/133 P166+    133.12  Daniel Gritter <dgritt47@calvin.edu>
     Cyrix 6x86/150 P200+    149.50  Evan L. Schemm <elschemm@mtu.edu>
     Cyrix 6x86/150 P200+    149.50  Steven Rainwater <srainwater@ncc.com>
     Cyrix 6x86/150 P200+    149.91  Sid Boyce <szb50@amdahl.com>
     Cyrix 6x86/150 P200+    149.91  Eric Haas <haas@andrew.cmu.edu>
     IBM 6x86/150 P200       149.96  M.D. Guardia <mikedg@ghostbbs.pandora.it>
     Cyrix 6x86MX/166 A-Step 166.71  David Anderson <rovaughn@infoave.net>
     Cyrix 6x86MX/188 P233   186.78  Dominic Baines <rdab100@hermes.cam.ac.uk>
     Cyrix 6x86MX/188 P233   187.19  Dominic Baines <rdab100@hermes.cam.ac.uk>

     K5/75 AMD               149.91  Simon Karpen <slk@linux-shell.net>
     K5/90 AMD               179.40  <root@krabi.mbp.ee>
     K5/90 AMD               179.40  Ken Edwards <edwards@thor.xon.cuug.ab.ca>
     K5/90 AMD               179.40  Marcin Owsiany <porridge@lo4.ids.bielsko.pl>
     K5/90 AMD               179.81  Marcin Owsiany <porridge@lo4.ids.bielsko.pl>
     K5/90 AMD               180.22  Hector DC Gonzalez <turbo@linux.lsl.com.mx>
     K5/90 AMD               181.00  Drew Golden <golden@platinum.nb.net>
     K5/100 AMD PR133        198.66  Trond Solem <trond.solem@homemail.com>
     K5/100 AMD PR133        199.07  Henri Jamgotchian <hjamgot@planete.net>
     K5/100 AMD PR133        199.48  Dark Mind <root@dmh.ml.org>
     K5/100 AMD PR133        199.88  J. Grassel <grassel@heart.cas.und.nodak.edu>
     K5/100 AMD PR133        199.88  Berend Reitsma <berend@united-info.com>
     K5/100 AMD PR133        200.29  Tilman Sommer <sommer@vsun02.ag01.kodak.com>
     K5/100 AMD PR133        200.32  Carlo Politi <cpoliti@mare.gol.grosseto.it>
     K5/100 AMD PR133        199.07  Franco De Angelis <fda@ied.unipr.it>
     K5/100 AMD PR133        199.07  HaJo Simons <hajo@frodo.com>
     K5/116 AMD PR166        233.47  Hans-Joachim Baader <hans@grumber.ika.de>
     K5/116 AMD PR166        233.47  Sean Kelly <s.kelly@newcastle.ac.uk>
     K5/120 AMD PR133 overcl 239.21  Chris Harshman <harshman@paradigm.uor.edu>

     AMD K6/166              332.60  David Parsons <orc@pell.chi.il.us>
     AMD K6/166              331     Bill Petersen <brp@cuberramp.net>
     AMD K6/200              398.85  n.n. <uh886@freenet.victoria.bc.ca>
     AMD K6/200              398.89  Ian Hanschen <hanschen@uwyo.edu>
     AMD K6/200              398.98  Philip Lijnzaad <lijnzaad@columba.ebi.ac.uk>
     AMD K6/200              399.77  Murtaza Amiji <murti@wpi.edu>
     AMD K6/200              399.78  Dan Hetzel <dan@icor.fr>
     AMD K6/200              400.58  Paco Culebras Amigo <paco@hades.udg.es>
     AMD K6/200              400.59  Sverre H. Huseby <s.h.huseby@usit.uio.no>
     AMD K6/200              400.59  Steve Conley <sconley@muck.leonine.com>
     AMD K6/200              400.59  Mark Lehrer <edge@dux.raex.com>
     AMD K6/200              400.59  Chris Esser <ksqueak@erols.com>
     AMD K6/200              400.59  Federico Pellegrin <fede@triangolo.it>
     AMD K6/200              400.59  Howard Poe <falcor@kingsnet.com>
     AMD K6/200              400.64  Fabrizio Santini <sanfff@tin.it>
     AMD K6/208 overcl       416.15  Jani Halme <jaadha@utu.fi>
     AMD K6/208 overcl       416.15  Donnie Savage <dsavage@cris.com>
     AMD K6/208              417.97  J.F. Ursetto <ursetto@uiuc.edu>
     AMD K6/225              440     n.n. <uh886@freenet.victoria.bc.ca>
     AMD K6/225 overcl       448.92  Paco Culebras Amigo <paco@hades.udg.es>
     AMD K6/225 undercl      448.92  Henrik Storner <storner@image.dk>
     AMD K6/225 overcl       450.56  M. Cramer <mccramer@stuttgart.netscape.de>
     AMD K6/233              463.67  Aduanne Carter <drow@blazenet.net>
     AMD K6/233              465.31  Michael Haardt <haardt@gmd.de>
     AMD K6/233              466.5   R. Garcia <rgarciaitt@aol.com>
     AMD K6/233 overcl       466.84  Francesco <root@fly.cnuce.cnr.it>
     AMD K6/233 overcl       466.94  Paco Culebras Amigo <paco@hades.udg.es>
     AMD K6/233              466.94  Howard Poe <hpoe@nyx.net>
     AMD K6/233              466.94  Andreas Haumer <andreas@xss.co.at>
     AMD K6/233              466.94  Damien Castelltort <eznerald@mail.mnet.fr>
     AMD K6/233              466.94  G. Cantallops Ramis <gcantallopsr@jet.se>
     AMD K6/233              466.94  Juergen Hammelmann <juergen@neptun.stgt.de>
     AMD K6/233              466.94  Chris Gushue <seymour@iname.com>
     AMD K6/239              478.41  Torbjoern Kristoffersen <torbkris@online.no>
     AMD K6/239              478.41  Mark Neill <btech@styx.phy.vanderbilt.edu>
     AMD K6/239              478.41  Louis van Dompselaar <etaoin@xs4all.nl>
     AMD K6/266              534.12  Andreas Czerniak <cognac@toppoint.de>
     AMD K6-2/300            598.02  Pasa Guglielmo <gpasa@omedia.ch>
     AMD K6-2/300            599.65  Ivo Plana <ipv@tinet.fut.es>
     AMD K6-2/300            599.65  Juan Domenech <domenech@mail.seric.es>
     AMD K6-2/300            599.65  Ashley Penney <ashp@bastard.co.uk>
     AMD K6-2/300            599.65  Rob <im@home.com>
     AMD K6-2/300            599.65  Stephen Jenuth <jenuths@homacjen.ab.ca>
     AMD K6-2/308            614.40  Erv Walter <walter@chem.wisc.edu>
     AMD K6-2/333            663.55  <kuhn@ernie.lpr.e-technik.tu-muenchen.de>
     AMD K6-2/333            665.19  A. Bihlmaier <stormtank@gmx.net>
     AMD K6-2/338 overcl     675.02  Nicola Fabiano <mx8644@mclink.it>
     AMD K6-2/350            699.60  Juan Domenech <domenech@mail.seric.es>
     AMD K6-2/400 overcl     799.54  Ivo Plana <ipv@tinet.fut.es>
     AMD K6-2/400 overcl     801.18  Phillip Deackes <gsmh@gmx.net>
     AMD K6-2/400 overcl     801.18  Jon Riekenberg <jrr8208@ksu.edu>
     AMD K6-2/400 overcl     801.18  Ryan Bethke <immortal26@prodigy.net>
     AMD K6-2/400            801.18  Wolfgang Zekoll <wzk@um1.pce.de>
     AMD K6-2/400            801.18  Ted E. Suter <nexion@home.com>
     AMD K6-2/400            801.29  Birko Bergt <birko.bergt@cdc.com>
     AMD K6-2/440            878.18  Steve Bourland <sbourlan@ecn.purdue.edu>
     AMD K6-2/450 overcl     901.12  Ted E. Suter <nexion@home.com>


  9.9.  Normali Sistemi Alpha

































































     Sistema               BogoMips  Riferito da
     21064/150 Jensen        148.37  Linus Torvalds <torvalds@cc.helsinki.fi>
     21064/150 Jensen        149.49  J.L. Brothers <brothers@halcyon.com>
     21064/150 Jensen        148.89  Martin Osterman <ost@comnets.rwth-aachen.de>

     21064A/275 Cabriolet    271.58  <michal@ellpspace.math.ualberta.ca>
     21064A/275 Cabriolet    272     Linus Torvalds <torvalds@cc.helsinki.fi>
     21064A/275              272     Stephen Gaudet <sjg@tiac.net>
     21064A/275 Cabriolet    272.63  Jay Estabrook <jestabro@amt.tay1.dec.com>
     21064A/275 Cabriolet    273.37  David Mosberger-Tang <davidm@cs.arizona.edu>
     21064A/275              274.11  Kevin Jacobs <jacobs@eek.cwru.edu>
     21064A/300 Cabriolet    298     Jay Estabrook <jestabro@amt.tay1.dec.com>
     21064A/300              298     Stephen Gaudet <sjg@tiac.net>

     21066/166               162.53  Phil Bostley <pbostley@qualcomm.com>
     21066/166               163.05  Matthew Jacob <mjacob@feral.com>
     21066/166               163.05  Jon Spreha <jxs557@psu.edu>
     21066/166               164.59  David Mosberger-Tang <davidm@cs.arizona.edu>
     21066/166 Multia        164.63  Rudolf Gabler <rug@usm.uni-muenchen.de>
     21066/166               165     Gareth Bult <gareth@ftech.net>
     21066/166               165.04  Craig Ruff <cruff@ncar.ucar.edu>
     21066/200               196.9   Danny ter Haar <danny@cistron.nl>
     21066/200 UDB overcl    198     Kari Davidsson <d154402@cs.tut.fi>

     21066A/233 UDB          229.63  Toon van der Pas <toon@vdpas.hobby.nl>
     21066A/233 AS400        230.16  Ophir Ronen <ophir@connectsoft.com>
     21066A/233 AS200 Avanti 230.16  B. James Phillippe <bryan@terran.org>
     21066A/233 NoName       230.67  T. Bogendoerfer <tsbogend@bigbug.franken.de>
     21066A/233 UDB          230.68  Ted Schipper <ted@tedux.hobby.nl>
     21066A/233 NoName       230.76  Mikael Nykvist <viper@ludd.luth.se>
     21066A/233 UDB          231.21  Eric Smith <eric@goonsquad.spies.com>
     21066A/233 NoName       231.21  Jay Estabrook <jestabro@amt.tay1.dec.com>
     21066A/266 NoName ov.cl 261.62  Andreas Johansson <ajo@ludd.luth.se>
     21066A/266 UDB overcl   261.62  Michael Brennen <mbrennen@fni.net>
     21066A/266 NoName ov.cl 262.14  Wim van Dorst <baron@clifton.hobby.nl>
     21066A/266 Multia       264     Joshua Grubman <joshg@dn.net>
     21066A/284 NoName ov.cl 281.0   <imakino@gloria.cord.edu>
     21066A/297 NoName ov.cl 293.6   <imakino@gloria.cord.edu>
     21066A/300 UDB ov.cl    294.65  Topi Kanerva <tkanerva@nks.oulu.fi>

     21164/266 EB164         265.29  Jay Estabrook <jestabro@amt.tay1.dec.com>
     21164/300 EB164         297.79  Hilarius <maurice@ellpspace.math.ualberta.ca>
     21164/300 XLT Alcor     297.79  Dave Wreski <dave@nic.com>
     21164/300 AS1000        297.79  Salvador Pinto Abreu <spa@sc.uevora.pt>
     21164/333 Alcor         331.35  Linus Torvalds <torvalds@cs.helsinki.fi>
     21164/333 Alcor         331.35  David Mosberger-Tang <davidm@azstarnet.com>
     21164/366 PC164 Durango 363.85  Geerten Kuiper <geerten@bart.nl>
     21164/433 PC164         429.89  Paul D. Robertson <proberts@clark.net>
     21164/433 PC164         429.91  Bernd Meyer <bmeyer@cs.monash.edu.au>
     21164/433 Maita         429.91  Bill Broadley <bill@math.ucdavis.edu>
     21164/433 PC164         430.96  <rainer.landes@physik.uni-karlsruhe.de>
     21164/433 EB164         430.96  <Metod.Kozelj@rzs-hm.si>
     21164/433 PC164         430.96  H. Sumargo <habibie@robotic.eng.fiu.edu>
     21164/433 PC164         431.94  Timm Gleason <timm@bess.com>
     21164/466 PC164         464.51  Daryll Strauss <daryll@d2.com>
     21164/500               497     Alex Butcher <alex@asimov.annex.co.uk>
     21164/500 PC164         497.02  C.J. Grayce <cgrayce@wasatch.ps.uci.edu>
     21164/500               497.05  Heiner Kruener <hk@martian.ping.de>
     21164/500 AS500         497.03  Jim Nance <jlnance@avanticorp.com>
     21164/500 P7            497.03  Jan guldentops <jacko@ba.be>
     21164/500 EB164 Durango 497.43  Kevin Jacobs <jacobs@eek.cwru.edu>

     21164A/500  PWS         497.02  Robert Harley <robert.harley@inria.fr>
     21164A/500  PC164       497.02  Stephen Oberski <sfo@deterministic.com>
     21164A/533  PC164LX     529.53  Harvey J. Stein <hjstein@bfr.co.il>
     21164PC/533 PC164SX     529.53  Danny ter Haar <dth@cistron.nl>
     21164PC/533 PC164SX     529.53  Shane Sturrock <sss@holyrood.ed.ac.uk>
     21164PC/533 PC164SX     529.53  Wim van Dorst <baron@clifton.hobby.nl>
     21164A/533  PC164LX     530.57  Ronny Ranerup <ronny@axis.com>
     21164A/533  PC164LX     530.57  Bill Broadley <bill@math.ucdavis.edu>
     21164A/600  PC164LX     595.59  L.F. Donaldson <donaldlf@cs.rose-hulman.edu>
     21164A/600  PC164LX     595.59  <stepan@wesley.informatik.uni-freiburg.de>
     21164A/600  PC164       597.60  Fabrizio Santini <sanfff@tin.it>
     21164A/666  PC164LX     662.70  <stepan@wesley.informatik.uni-freiburg.de>

     21264/400 Pass-1        794.82  Jay Estabrook <jay.estabrook@digital.com>




  9.10.  Normali Sistemi Motorola


     Sistema               BogoMips  Riferito da
     68030/16 Atari Falcon     3.90  Jay T. Millar <jmillar@eaglequest.com>
     68030/16 Atari Falcon     3.95  J.L. Brothers <brothers@halcyon.com>
     68030/16 Atari Falcon     3.98  <Roman.Hodek@informatik.uni-erlangen.de>
     68030/20 MacII Si         4.88  Bill Maloy <maloy@goldinc.com>
     68030/20 0c               4.92  Chris Nadigh <chrnadig@iiic.ethz.ch>
     68030    Amiga 3000       6.08  Andy Wick <awick@vt.edu>
     68030/30 Amiga 4000       6.09  Karsten Merker <km@golf.dinet.com>
     68030/25 Amiga 3000       6.12  Glen Hewlett <hewlett@planeteer.com>
     68030/25 Amiga 3000       6.21  Hamish Macdonald <hamish@bnr.ca>
     68030/25 Amiga 3000       6.21  J.L. Brothers <brothers@halcyon.com>
     68030/32 Atari Falcon     7.91  Franz Korntner <fkorntne@bazis.nl>
     68030    Atari TT         7.96  <schwab@issan.informatik.uni-dortmund.de>
     68030/32 Atari MegaST     7.98  E.J. van den Bussche <busscheh@ksepl.nl>
     68030/33 Atari TT         7.98  <Roman.Hodek@informatik.uni-erlangen.de>
     68030    Atari TT         7.98  Wayne Booth <trek@ihgp114r.ih.att.com>
     68030/60                  8.06  Korey Budgen <kbudgen@st.nepean.uws.edu.au>
     68030/33 Amiga 2000       8.14  W. Haidinger <e9225662@stud1.tuwien.ac.at>
     68030/48 32c             11.89  Martin Rogge <Martin_Rogge@ki.maus.de>
     68030/50 Atari           12     <Roman.Hodek@informatik.uni-erlangen.de>
     68030/50 Amiga 1200      12.36  Chris Sumner <chris@ganymede.sonnet.co.uk>
     68030/50 Amiga 1200      12.4   Richard Jerome <etlrdje@tigger.ericsson.se>
     68030/50 32c             12.42  Michael Plonus <michi@pluto.ping.de>
     68030/50 Amiga 1200      12.33  Detrix <detrix@popd.ix.netcom.com>
     68030/50 Amiga 1200      12.36  E.J.M. Brocklesby <ejb@klamath.demon.co.uk>

     68040/24 Amiga 4000-40   16.6   Hamish Macdonald <hamish@bnr.ca>
     68040/24 Amiga 4000-20   16.60  J.L. Brothers <brothers@halcyon.com>
     68040/25 Amiga 4000-040  16.61  <Geert.Uytterhoeven@cs.ku-leuven.ac.be>
     68040/25 Amiga 4000      16.61  Lawrence <lawrenc@nextwork.rose-hulmand.edu>
     68040/60 Amiga 4000-40   18.99  Darren Enns <dmenns@surf.pangea.ca>
     68040/32 Medusa T40      21.25  <Hartmut.Koptein@et-inf.fho-emden.de>
     68040    Amiga 2000      21.86  Ron Flory <rjflory@feist.com>

     68060/50 Amiga 1200      99.53  baba <baba@pa.yokogawa.jp>
     68060/50 Amiga 4000      99.74  Stefan Tauche <otauche@uni-paderborn.de>
     68060/50 Amiga 4000     100.16  Jan Johansson <jj@mordor.it.kth.se>
     68060/66 Amiga CS MkII  132.71  Paul Hill <paul@lagernet.clara.co.uk>




  9.11.  Altri Sistemi: Sparc, PowerPC, Mips, Intel 8088/286 ELKS






     Sistema               BogoMips  Riferito da
     Sparc sun4c              17.94  J.L. Brothers <brothers@halcyon.com>
     Sparc SLC/20 S1          19.86  Simon Karpen <slk@linux-shell.net>
     Sparc sun4c/25           24.88  Paolo <paolo0@yahoo.com>
     Sparc IPX 4c             39.83  Paul D. Robertson <proberts@clark.net>
     Sparc SS10 super50 4m    39.93  Juan Cespedes <cespedes@etsit.upm.es>
     Sparc microS/50 SS-LX    49.76  Will Shaw <romulan@netwatch.clemson.edu>
     Sparc SS20               49.86  Gary A. Donahue <lordgad@webspan.net>
     Sparc hyperS Classic 4m  49.86  Juan Cespedes <cespedes@etsit.upm.es>
     Sparc Voyager portable   59.80  Edward Austin <eastin@shl.com>
     Sparc SS5 Netra          68     Craig Falconer <cf@papanui.school.nz>
     Sparc SS50               74.95  Kaz <kaz@latte.cafe.net>
     Sparc SS10 hyperS        99.73  Thomas B. Fox <tfox@oliverdesign.com>
     Sparc SS5/66            109.77  Lance S. Nehring <lnehrin@uswest.com>
     Sparc SS4/110           109.77  Chris Sylvain <csylvain@umms-itg.ab.umd.edu>
     Sparc hSparc/150 Sun4m  150.32  Tethys <tethys@ml.com>
     Sparc Ultra1 sun4u      284.05  Iban Cardona <icc@seric.es>

     Sparc UltraII/270       539.03  Pieter Krul <pieter@dare.demon.nl>
     Sparc UltraII/360       719.26  Bjoern Augustsson <d3august@dtek.chalmers.se>

     PowerPC 601/60 Mac6100   45.24  J.L. Brothers <brothers@halcyon.com>
     PowerPC 601/66 Mac       51.62  Fred Klein <klein@des3.u-strasbg.fr>
     PowerPC 601/60 Mac6100   59.38  Kent Radek <goo@itd.sterling.com>
     PowerPC 601/75 Mac7200   73.93  Dimitris Tsifakis <jimmy@typhoeus.dg.uoa.gr>
     PowerPC 601/100 Mac7500  98.91  Russ Hoffman <reh@fore.com>
     PowerPC 601/110 Mac8100 108     Charles Eicher <ceicher@inav.net>

     PowerPC 603/100          66.56  A. Costa <c_chaos@chaosnet.wahnapitae.on.ca>

     PowerPC 604/100 PPS6050  99.74  Evaldas Darcianovas <evaldas@isi.kvm.lt>
     PowerPC 604/100         199     Hamish Marson <hamish@aixrules.nz.ibm.com>
     PowerPC 604/100 PPS7248 199.48  Evaldas Darcianovas <evaldas@isi.kvm.lt>
     PowerPC 604/132 Mac7500 263.78  Patrick Murmann <murmann@mi.uni-erlangen.de>
     PowerPC 604/133 MOT PS  266.24  Christoper Harrel <cnh@eng.mindspring.net>
     PowerPC 604/150 Mac9500 297.73  Jean-Philippe Lord <jpl@binex.com>
     PowerPC 604e/195        359.63  Michael Potts <pottsjam@flyernet.udayton.edu>
     PowerPC 604/200 Mac8600 320     Julien Sebot <sebot@lri.fr>
     PowerPC 604e/200 SM4000 399.12  Roland Kuhn <kuhn@physik.uni-kassel.de>

     PowerPC 750/266 Mac     532.48  Fritz Anderson <fritza@tezcat.com>

     Mips R4000/100           48.30  J.L. Brothers <brothers@halcyon.com>
     Mips R4000/100 Magnum    50.03  Andreas Busse <andy@soft-n-hard.de>
     Mips R4400/134 Acer Pica 67.10  Andreas Busse <andy@soft-n-hard.de>
     Mips R4400/134 Acer Pica 67.10  Ralf Baechle <ralf@waldorf-gmbh.de>
     Mips R4600/133 Tyne     133.12  Ralf Baechle <ralf@waldorf-gmbh.de>
     Mips R4600/133 RM200    133.08  Ralf Baechle <ralf@julia.de>
     Mips R5000/150 Indy     154.83  Ralf Baechle <ralf@julie.de>

     Intel 8088/4.77           0.02  Tim Van der Linden <timvdl@innet.be>
     Intel 8088/10             0.05  Tim Van der Linden <timvdl@innet.be>
     Intel 8086                0.5   Kin Lau <gabe@zot.io.org>
     Intel 286 Tandy           0.75  Joey Hess <joey@kite.ml.org>
     Intel 286                 0.99  Anders Stenback <stenback@hehe.com>
     Intel 286/8 VAXMate       1.03  Andrew Costa <c_chaos@wahnapitae.on.ca>
     Intel 286/10 Commodore    1.30  Hans-Joachim Baader <hans@grumber.inka.de>
     Intel 286 PS2             2.32  Morillas C.H. Antonio <morilla@fie.us.es>
     Intel 286 PS2             2.34  Joey Hess <joey@kite.ml.org>







  9.12.  Normali Sistemi con molte CPU


     Sistema               BogoMips  Riferito da
     SMP2 Pentium/75          59.50  Michael Engel <engel@unix-ag.uni-siegen.de>
     SMP2 Pentium/90          71.68  Edwin Whitelaw <elw@ivc.com>
     SMP2 Pentium/90          71.98  Daniel Luhde-Thompson <dl10010@cam.ac.uk>
     SMP2 Pentium/90          72.08  Alan Cox <alan@cymru.net>
     SMP2 Pentium/100         79.46  Lam Dang <dangit@ix.netcom.com>
     SMP2 Pentium/100         80.08  Christian Tan <pigeon@xs4all.nl>
     SMP2 Pentium/100         80.08  McNalley <jmcnalle@attila.stevens-tech.edu>
     SMP2 Pentium/120         95.85  Maurice de Bijl <maurice.d.bijl@topic.nl>
     SMP2 Pentium/133        106.09  Maurice de Bijl <maurice.d.bijl@topic.nl>
     SMP2 Pentium/166        133.53  <Reinhard.Simkovics@jk.uni-linz.ac.at>
     SMP2 Pentium/200        158.72  Ed Hoppitt <edward@dcs.rhbnc.ac.uk>

     SMP2 Pentium MMX/200    794.62  Kristian Koehntopp <kris@koehntopp.de>
     SMP2 Pentium MMX/200    796.26  Eric Clark <eclark@opencominc.com>
     SMP2 Pentium MMX/233    927.33  Jeff White <jwhite@ghq.com>

     SMP2 Pentium Pro/150    299.00  Steven Gallo <smgallo@numenor.csgeeks.org>
     SMP2 Pentium Pro/150    299.01  Eric van Dijken <E.vanDijken@PTT-Telecom.nl>
     SMP2 Pentium Pro/166    331.78  Eric van Dijken <E.vanDijken@PTT-Telecom.nl>
     SMP2 Pentium Pro/180    358.81  Eric van Dijken <E.vanDijken@PTT-Telecom.nl>
     SMP2 Pentium Pro/180    358.81  Frankie East <fae2401@rit.edu>
     SMP2 Pentium Pro/180    358.81  James K. Wiggs <wiggs@wolfenet.com>
     SMP2 Pentium Pro/200    396.25  Will Shaw <shaww@dialup.dstm.com>
     SMP2 Pentium Pro/200    398.13  David Konerding <dek@cgl.ucsf.edu>
     SMP2 Pentium Pro/200    398.13  B. Heinen <benedikt.heinen@infrasys.ascom.ch>
     SMP2 Pentium Pro/200    398.13  Ramon Huerta <huerta@minerva.ii.uam.es>
     SMP2 Pentium Pro/200    398.14  C.-A. Possamai <camille@sugiton.cnrs-mrs.fr>
     SMP2 Pentium Pro/200    398.14  Leland <llucius@millcom.com>
     SMP2 Pentium Pro/200    398.14  John Lellis <lellis@dmccorp.com>
     SMP2 Pentium Pro/200    398.14  Jim Gifford <jim@mail.rath.peachnet.edu>
     SMP2 Pentium Pro/200    398.14  Manuel Galan <root@ulpgc.es>
     SMP2 Pentium Pro/200    398.6   Bill Davidsen <davidsen@tmr.com>
     SMP2 Pentium Pro/200    398.95  Fons Rademakers <f.rademakers@cern.ch>
     SMP2 Pentium Pro/200    398.98  Greg Fausak <glfausak@august.com>
     SMP2 Pentium Pro/200    400.18  Attila Karpati <karpati@cs.elte.hu>
     SMP2 Pentium Pro/233    464.49  F. Baitinger <baiti@zenon.toplink.net>
     SMP4 Pentium Pro/133    532.07  Erik Walthinsen <omega@sequent.com>
     SMP4 Pentium Pro/200    794.62  Kenneth Hedlund <c415khd@nll.se>
     SMP4 Pentium Pro/200    796.28  John Pelan <j.pelan@am.qub.ac.uk>

     SMP2 Pentium II/233     466.94  Eli Kane <eli@crl.nmsu.edu>
     SMP2 Pentium II/266     530.84  Shon Martin <cshoon@oberlin.edu>
     SMP2 Pentium II/266     534.12  n.n. <service@cprompt.sk.ca>
     SMP2 Pentium II/266     534.12  Emmanuel Tychon <manu@acm.org>
     SMP2 Pentium II/274     546.41  Richard Jellinek <rj@suse.de>
     SMP2 Pentium II/300     597.20  Paul Sheer <psheer@obsidian.co.za>
     SMP2 Pentium II/300     598.02  Hans Ameel <hans@pla.to>
     SMP2 Pentium II/300     599.76  S. Curtarolo <auro@spiro.fisica.unpd.it>
     SMP2 Pentium II/333 ov  665.73  S. Curtarolo <auro@spiro.fisica.unpd.it>
     SMP2 Pentium II/400     796.26  Michael Necaise <necaise@jlab.org>

     SMP2 Celeron/450        894.57  Stephan Eisler <stephan@lingo.gun.sub.org>





  9.13.  Sistemi Non-Linux (solo riferimento)




     Sistema                     OS      BogoMips Riferito da
     Z80 TRS80 model 4           TRSDOS     0.004 <cervasio@airmail.net>
     68000/8 Macintosh Classic   MacOS      0.53  <jimmy@typhoeus.dg.uoa.gr>
     68020/20 Sun 3              SUNOS      2.0   <korpela@ssl.berkeley.edu>
     68020/16 Macintosh LC       MacOS      3.09  <jimmy@typhoeus.dg.uoa.gr>
     68020/25 Sun 3-180          SUNOS      4.0   <korpela@ssl.berkeley.edu>
     Sparc Sun 3-60              SUNOS      4.00  <tranter@software.mitel.com>
     Sparc Sun 3-80              SUNOS      4.00  <tranter@software.mitel.com>
     68030/25 Macintosh IIci     NetBSD     5.62  <kirk-corey@uiowa.edu>
     68040/25 Macintosh LC475    MacOS     12.27  <jimmy@typhoeus.dg.uoa.gr>
     68040/33 HP9000-280         HP-UX     14     <niles@axp745.gsfc.nasa.gov>
     68040/25 Apollo 5500        DomainOS  14.00  <kirk-corey@uiowa.edu>
     Sparc Sun 4-280             SUNOS     16.0   <korpela@ssl.berkeley.edu>
     Sparc Sun IPC/40            Solaris   16.00  <gong@cs.msu.su>
     68040/25 HP9000-425         DomainOS  16.00  <kirk-corey@uiowa.edu>
     68040 NextStep              (?)       16.26  <petergun@coffeehaus.com>
     Sparc Sun SS1               SUNOS     18.00  <tranter@software.mitel.com>
     Sparc Sun SS1               SUNOS     18.00  <jimmy@typhoeus.dg.uoa.gr>
     IBM RS6000 320              AIX       18.00  <mg@svtpc3.fb12.tu-berlin.de>
     Sparc Sun SS1+              SUNOS     19     <swmike@uplift.df.lth.se>
     Sparc Sun SS1+              SUNOS     24.00  <tranter@software.mitel.com>
     Sparc Sun IPC               SUNOS     24.00  <tranter@software.mitel.com>
     IBM RS6000 320H             AIX       24.00  <mg@svtpc3.fb12.tu-berlin.de>
     Sparc Sun Sparcstation2     SUNOS     26.00  <gong@cs.msu.su>
     SparcClassic/50             Solaris   32.00  <gong@cs.msu.su>
     Sparc Sun ELC               SUNOS     32.00  <tranter@software.mitel.com>
     HP-PA 9000-720              HP-UX     32.00  <metod.kozelj@rzs-hm.si>
     Sparc Sun SS10              SUNOS     34.00  <tranter@software.mitel.com>
     Sparc Sun SS10              SUNOS     34.00  <makler@man.torun.pl>
     Pentium/100                 Win-NT    36.21  <marcus@healthchex.com>
     Sparc Sun Sparcstation2     SUNOS     38.0   <korpela@ssl.berkeley.edu>
     Mips R4000/100 Indy         (?)       48.00  <p.verwer@organon.akzonobel.nl>
     Mips R4000/100 SGI IndySC   Irix      48.00  <lziegler@csbsju.edu>
     HP-PA 9000-720              HP-UX     48.00  <metod.kozelj@rzs-hm.si>
     Sparc SS10                  SUNOS     48.00  <makler@man.torun.pl>
     IBM RS-6000-250/66          AIX       52.00  <gl23@e4.hrz.uni-giessen.de>
     Sparc Sun Sparcstation10d   SUNOS     54.0   <korpela@ssl.berkeley.edu>
     Sparc SS1000 2CPU           SUNOS     58.00  <gong@cs.msu.su>
     Sparc SS20                  SUNOS     60.00  <makler@man.torun.pl>
     IBM RS6000-250/80           AIX       62.00  <gl23@e4.hrz.uni-giessen.de>
     Alpha 21064/133 Decstation  OSF1      64     <niles@axp745.gsfc.nasa.gov>
     Alpha 21064/133 Dec3000     OSF1      66.00  <daniels@helplaxp1.harvard.edu>
     Sparc Sun SS5               SUNOS     68.00  <tranter@software.mitel.com>
     Sparc Sun SS20              SUNOS     72.00  <tranter@software.mitel.com>
     Sparc Sun SS20/712          Solaris   74     <spohr@qmos.com>
     Mips R4400/150 Challenge    (?)       74.00  <p.verwer@organon.akzonobel.nl>
     Mips R4400/150 Indigo2Extr  (?)       74.00  <p.verwer@organon.akzonobel.nl>
     HP-PA 9000-715              HP-UX     74.00  <metod.kozelj@rzs-hm.si>
     Sparc SS5 sun4m             SUNOS     84.00  <chrisv@allegria.com>
     Sparc SS1000E               SUNOS     84.00  <makler@man.torun.pl>
     Alpha                       OSF1      92.00  <petergun@coffeehaus.com>
     Mips R4400/200 Indigo2Extr  (?)       98.00  <p.verwer@organon.akzonobel.nl>
     HP-PA 9000-735/99           HP-UX     98.00  <lankhors@cs.rug.nl>
     Sparc SS5                   SUNOS    104.00  <makler@man.torun.pl>
     Sparc Sun SS4/110           Solaris  108     <spohr@qmos>
     Sparc Sun SS4               Solaris  108.00  <jimmy@typhoeus.dg.uoa.gr>
     Sparc Sun SS5               SUNOS    110     <swmike@uplift.df.lth.se>
     Alpha 21064A/233            OSF1     114     <niles@axp745.gsfc.nasa.gov>
     Alpha 3000 21064/300        OSF1     120.00  <gl23@e4.hrz.uni-giessen.de>
     HP-PA 700/125               HP-UX    122     <niles@axp745.gsfc.nasa.gov>
     HP-PA 9000-735/125          HP-UX    122.00  <lankhors@cs.rug.nl>
     Mips R4600/133 SGI Indy     Irix     132     <lziegler@csbsju.edu>
     MIPS R5000/150              Irix     148.00  <nachiket@indimax.hydroqual.com>
     IBM 6x86                    OS/2     149.13  <mikedg@ghostbbs.pandora.it>
     Alpha                       OSF1     180.0   <mauger@ensinfo.univ-nantes.fr>
     MIPS R10000/195             Irix     194.00  <nachiket@indimax.hydroqual.com>
     Alpha 21164/333 AS500       OSF1     222.00  <daniels@helplaxp1.harvard.edu>
     Sparc Ultra-1 sun4u         Solaris  254.00  <alternat@rwth-aachen.de>
     PPC604/133 IBM RS6000       AIX      254.00  <kirk-corey@uiowa.edu>
     IBM RS-6000 43P powerpc     AIX      260.00  <gl23@e4.hrz.uni-giessen.de>
     Sparc U-1 sun4u             SunOS    284.00  <gl23@e4.hrz.uni-giessen.de>
     Alpha 21164/433 DPW433au    OSF1     286.00  <daniels@helplaxp1.harvard.edu>
     HP9000-C160/160             HP-UX    316.00  <nicolai@prz.tu-berlin.de>
     Sparc Sun US1/170           Solaris  330     <spohr@qmos>
     Sparc Sun US1/167           Solaris  330     <jimmy@typhoeus.dg.uoa.gr>
     Sparc Ultra-1 sun4u         SUNOS    334.00  <chrisv@allegria.com>
     Alpha 3000-600S             VMS      348.61  <metod.kozelj@rzs-hm.si>
     Alpha server 1000-4/200     VMS      397.68  <metod.kozelj@rzs-hm.si>
     Sparc Sun-Ultra30/248       Solaris  482.00  <marc.Quinton@stna.dgac.fr>
     Sparc US2/296 2cpu          SUNOS    596.00  <manu@acm.org>
     Cray J90 Y-MP/100 16cpu     Unicos   912.00  <lankhors@cs.rug.nl>
     Sequent Symmetry 6xP5/166   Dynix    984.00  <omega@sequent.com>
     Sequent Symmetry 16xP5/66   Dynix   1056.00  <omega@sequent.com>
     HP9000-C160/160             HP-UX   1278.00  <nicolai@prz.tu-berlin.de>
     Sequent NUMA-Q 12x P6/180   Dynix   1416.00  <omega@sequent.com>
     Sequent NUMA-Q 32x P6/180   Dynix   3776.00  <omega@sequent.com>





  10.  Firma

  Mio figlio Roderick e sua sorella Isolde se la stanno cavando bene.
  Isolde, 4 anni, va a scuola, e sa gi scrivere il suo nome. Suo
  fratello Roderick, 2 anni, riconosce a voce alta di sapere gi anche
  lui le sue lettere: P di pap, R di Roderick!

  Met vriendelijke groeten, Wim van Dorst.

  ------------------------------------------------------------------------
  Wim van Dorst, Clifton Scientific Text Services, tel/fax +31 355 242 319
                     This sentence have three erors





























  Bridging mini-Howto
  Christopher Cole,  cole@lynkmedia.com. Tradotto da Alessan
  dro Rubini (rubini@linux.it).
  v1.10, 13 Novembre 1997. Tradotto il 30 Novembre 1997.

  Questo documento descrive come preparare un bridge per reti Ethernet.
  Ma cos' un bridge?  un dispositivo che controlla il flusso dei pac
  chetti in una sottorete cercando di ridurre l'ammontare di traffico.
  Un bridge di solito viene posizionato tra due gruppi di computer che
  parlano molto tra loro ma poco con i calcolatori dell'altro gruppo.
  Come esempio prendiamo un gruppo di Macintosh e un gruppo di macchine
  Unix: entrambi questi gruppi tendono a chiacchierare abbastanza al
  loro interno e il traffico che producono causa collisioni nelle comu
  nicazioni tra le altre macchine che tentano di parlare tra loro;
  questa  una situazione in cui occorrerebbe mettere un bridge tra i
  due gruppi di calcolatori. Il lavoro del bridge, allora, sta
  nell'esaminare il destinatario di ciascuno dei pacchetti e decidere se
  tale pacchetto deve essere ritrasmesso sull'altro segmento Ethernet
  oppure no. Il risultato di questo lavoro  una rete pi veloce perch
  si verificano meno collisioni.

  1.  Preparazione


  1. Ci si procuri il pacchetto ``Bridge Config'':

       <ftp://shadow.cabi.net/pub/Linux/BRCFG.tgz>



  2. Ci si procuri e si legga il ``Multiple Ethernet'' HOWTO:

       <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Multiple-Ethernet>



  3.

     Si abiliti la seconda interfaccia ethernet sulla propria macchina
     aggiungendo questo al proprio /etc/lilo.conf, e si reinvochi lilo:


       append = "ether=0,0,eth1"





  Se si hanno tre interfacce sul bridge, si usi questa riga al posto
  della precedete:


       append = "ether=0,0,eth1 ether=0,0,eth2"





  Si possono usare pi interfacce aggiungendo altre direttive ether.
  Normalmente il kernel di Linux cerca solo una scheda ethernet, e una
  volta che l'ha trovata smette di verificare l'hardware installato. Le
  direttive append mostrate sopra servono a dire al kernel di continuare
  a cercare schede ethernet anche dopo che ne ha trovata una.

  In alternativa, si pu usare il parametro di linea di comando al
  momento del boot:
       linux ether=0,0,eth1





  Oppure, se si hanno 3 interfacce:


       linux ether=0,0,eth1 ether=0,0,eth2






  4. Si ricompili il kernel attivando l'opzione ``bridging''.

  5. Un bridge non dovrebbe avere un indirizzo IP. Pu averne uno, ma un
     bridge che non svolga altri compiti non ne ha bisogno.  Per
     rimuovere l'indirizzo IP dal proprio bridge si vada a vedere
     /etc/sysconfig/network-scripts/ (l'esempio si riferisce a un
     sistema RedHat) e si copi ifcfg-lo0 sopra a ifcfg-eth0 e a ifcfg-
     eth1.  In questi due file ``eth'', si cambi la riga che contiene
     ``DEVICE=lo'' in ``DEVICE=eth0'' e ``DEVICE=eth1''.  Altre
     distribuzioni hanno diversi script di configurazione, e bisogna
     applicare modifiche equivalenti ai file appropriati.  Se il proprio
     bridge ha pi di due interfacce bisogna assicurarsi di configurare
     allo stesso modo anche le altre interfacce.


  6. Si riavvii il sistema in modo da far girare il  nuovo kernel,
     quello configurato per il bridging; bisogna anche assicurarsi che
     le interfacce di rete non abbiano un indirizzo IP assegnato.

  7. Una volta che il sistema  attivo, si mettano le schede ethernet in
     modo promiscuo, in modo che ricevano tutti i pacchetti che vedono
     transitare sulla rete:


       ifconfig promisc eth0 ; ifconfig promisc eth1





  Devono essere messe in modo promiscuo tutte le interfacce che sono
  connesse ai segmenti ethernet che si vuole collegare.

  8. Si attivi il ``bridging'' usando il programma brcfg:


       brcfg -ena






  9. Si verifiche che il traffico di rete  diverso su ciascuna
     interfaccia:





  tcpdump -i eth0      # in una finestra
  tcpdump -i eth1      # in un'altra finestra






  10.
     Si faccia girare uno ``sniffer'' o tcpdump su di un'altra macchina
     per verificare che il bridge sta partizionando correttamente la
     rete.

  2.  Problemi tipici


  1.

     Domanda
        Ricevo il messaggio


          ioctl(SIOCGIFBR) failed: Package not installed





     Cosa significa?

     Risposta
        Il proprio kernel non ha la capacit di funzionare da bridge. Ci
        si procuri un kernel versione 2.0 o maggiore e lo si ricompili
        attivando l'opzione bridging.


  2.

     Domanda
        Le macchina da una parte non riescono a raggiungere quelle
        dall'altra parte.

     Risposta

        stato abilitato il bridging invocando ``brcfg -ena''?  (brcfg
        dovrebbe dire ``bridging is ENABLED'')

       Le due interfacce sono state messe in modo promiscuo?  (si
        invochi ``ifconfig'': la modalit ``PROMISC'' dovrebbe risultare
        attiva per entrambe le interfacce).

       Se si usano delle schede di rete a funzionalit multipla
        (BNC/TP), ci si assicuri di avere abilitato quella corretta.
        Occorrer usare il programma di setup che viene fornito insieme
        con la scheda.


  3.

     Domanda
        Non posso fare telnet n ftp dal bridge. Perch?

     Risposta
        Questo perch il bridge non ha un indirizzo IP. Un bridge  un
        pezzo di rete che risulta trasparente al resto della rete.

  4.

     Domanda
        Cosa devo fare per predisporre l'instradamento?

     Risposta
        Nulla!  Tutte le problematiche di instradamento sono gestite dal
        codice del kernel che si occupa del ``bridging''.  Per vedere
        come il brisge impara l'instradamento dei vari indirizzi
        ethernet si usi il comando brcfg in modalit debug:


          brcfg -deb






  5.

     Domanda
        Sembra che il bridge funzioni, ma perch il comando
        ``traceroute'' non lo mostra come parte del cammino dei
        pacchetti?

     Risposta
        Per la natura del bridge, un ``traceroute'' NON dovrebbe
        mostrare il bridge stesso nel cammino dei pacchetti. Il bridge
        dovrebbe essere un componente trasparente della rete.


  6.

     Domanda
        Occorre abilitare IP_FORWARD quando si compila il kernel?

     Risposta
        No. Il codice del kernel che si occupa del bridging si occupa
        del trasporto dei pacchetti indipendentemente da IP_FORWARD.
        IP_FORWARD occorre per i gateway che hanno indirizzi IP validi
        associati alle loro interfacce.


  7.

     Domanda
        Perch secondo il programma ``brcfg'' gli indirizzi hardware
        delle due porte ethernet sono uguali? Non dovrebbero essere
        differenti?

     Risposta
        No. Per come funziona il bridging, tutte le porte di un bridge
        hanno lo stesso indirizzo ethernet fisico.


  8.

     Domanda
        Il bridging non appare tra le opzioni di compilazione del
        kernel, come faccio ad abilitarlo?

     Risposta
        Durante la configurazione del kernel, si risponda Y alla domanda
        ``Prompt for development and/or incomplete code/drivers
        (CONFIG_EXPERIMENTAL) [Y/n/?]''.
  9.

     Domanda
        So che avere troppi hub (4 o pi) in catena sulla stessa
        ethernet crea dei problemi di temporizzazione. Che effetto ha un
        bridge su una rete che contiene altri hub?

     Risposta
        Un bridge non  un hub, e la regola dei 4 hub va applicata a
        ciascun segmento ethernet collegato al bridge. Un bridge non
        contribuisce ai problemi di tempo nella trasmissione dei
        pacchetti.


  10.

     Domanda
         possibile interfacciare con un bridge segmenti ethernet da
        10Mb e da 100Mb? Una configurazione del genere non rallenta il
        resto del traffico sul lato ad alta velocit della rete?

     Risposta
        Si,  possibile collegare con un bridge un segmento da 10Mb con
        un segmento da 100Mb. Finch la scheda di rete del bridge
        collegata con la rete veloce  in grado di portare 100Mb, TCP si
        preoccuper del resto. Anche se  vero che la comunicazione tra
        un calcolatore collegato a 100Mb e uno collegato a 10Mb avverr
        solo a 10Mb, il resto del traffico sulla rete ad alta velocit
        non viene rallentato dalla presenza del bridge.





































  Bzip2 Howto
  David Fetter, dfetter@best.com <mailto:dfetter@best.com>
  v1.6, 10 marzo 1998

  Questo documento descrive come usare il nuovo programma di compres
  sione bzip2.  L'originale in sgml si trova presso
  <http://www.best.com/~dfetter/Bzip2-HOWTO/Bzip2-HOWTO.sgml>.

  1.  Introduzione

  Bzip2  un nuovo algoritmo per la compressione dei dati.  Generalmente
  crea file che sono il 60-70% della dimensione dei corrispondenti
  ottenuti usando gzip.


  Per mezzo di questo documento potrai utilizzare alcune applicazioni
  comuni con bzip2.


  Per traduzione in francese puoi far riferimeno a documento di Arnaud
  Launay. Una versione web si trova qui
  <http://www.freenix.fr/linux/HOWTO/mini/Bzip2.html>, oppure puoi usare
  ftp  qui <ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/mini/Bzip2.gz>
  Arnaud pu essere contattato via posta elettronica a questo indirizzo
  <mailto:zoro@mygale.org>



  Per traduzione in giapponese puoi far riferimento qui
  <http://jf.gee.kyoto-u.ac.jp/JF/JF.html> ai documenti di Tetsu Isaji.
  Isaji pu essere contattato tramite la sua home page
  <http://www2s.biglobe.ne.jp/~kaien/>, oppure via posta elettronica a
  questo indirizzo. <mailto:isaji@mxu.meshnet.or.jp>


  1.1.  Storia delle revisioni

  1.1.1.  v1.6 Aggiunto il Netscape enabler di TenThumbs.

  Modificato anche lesspipe.sh secondo i sui suggerimenti.  Adesso
  dovrebbe funzionare meglio.


  1.1.2.  v1.5 Aggiunta la traduzione francese di Arnaud Launay, e il
  suo wu-ftpd file.


  1.1.3.  v1.4 Aggiunta la traduzione giapponese di Tetsu Isaji.


  1.1.4.  v1.3 Aggiunto .emacs di Ulrik Dickow per 19.30 e superiori.

  (Su suo consiglio, corretta anche la patch jka-compr.el per emacs.
  Oops! Bzip2 non ha ancora(?) un'opzione "append".)


  1.1.5.  v1.2 Modificata la patch per emacs cos riconosce automatica
  mente i file .bz2.



  1.1.6.  v1.1 Aggiunta patch per emacs.




  1.1.7.  v1.0  Prima Versione.




  2.  Come ottenere bzip2

  L'home page di Bzip2 si trova presso l'home site UK
  <http://www.muraroa.demon.co.uk/>.  Il sito mirror negli STATI UNITI 
  qui <http://www.digistar.com/bzip2/index.html>.  Puoi anche trovarlo
  sul sito della Red Hat qui <ftp://ftp.redhat.com/pub/contrib>.


  2.1.  Ottenere bzip2 precompilato

  Vedi gli home site. I binari per Intel della Red Hat si trovano  qui
  <ftp://ftp.redhat.com/pub/contrib/i386/bzip2-0.1pl2-1.i386.rpm>.  Per
  la Debian sono qui <ftp://ftp.debian.org/debian/hamm/hamm/binary-
  i386/utils/bzip2_0.1pl2-4.deb>, e qui
  <http://www.cdrom.com/pub/linux/slackware-3.4/slakware/a9/bzip2.tgz>
  per la Slackware.  Puoi prenderlo negli analogi posti presso i vari
  siti mirror.


  2.2.  Ottenere i sorgenti di bzip2

  Sono reperibili dal sito ufficiale (vedi ``Ottenere Bzip2''), oppure
  qui <ftp://ftp.redhat.com/pub/contrib/SRPMS/bzip2-0.1pl2-1.src.rpm>
  presso Red Hat.


  2.3.  Compilare bzip2 per la tua macchina

  Se hai gcc 2.7.2.3, cambia la linea


       CFLAGS = -O3 -fomit-frame-pointer -funroll-loops




  in


       CFLAGS = -fomit-frame-pointer -funroll-loops




  ovvero, togli la parte -O3. Dopo di che semplicemente lancia make e
  installalo come spiegato nel README.


  3.  Usare bzip2 da solo

  Leggi la raffinata pagina del manuale :)


  4.  Usare  bzip2 con tar

  Di base, ci sono due modi di usarlo, chiamiamoli

  4.1.  Facile impostazione:

  questo metodo non richiede un setup generale. Per un-tarare un archivo
  tar bzip2, foo.tar.bz2, nella corrente directory, fai
       /percorso/per/bzip2 -cd foo.tar.bz2 | tar xf -




  Questo metodo funziona, ma pu essere un po' noioso da scrivere
  spesso.


  4.2.  Facile da usare:

  Applica la seguente patch a gnu tar 1.12, compilalo, ed installalo, e
  sei pronto per partire. Assicurati che tar and bzip2 si trovino nel
  tuo $PATH con "which tar" e "which bzip2". Per usarlo, semplicemente
  usa


        tar xyf foo.tar.bz2




  per decomprimere un file.


  Per creare un nuovo archivio, analogamnte:


        tar cyf foo.tar.bz2 file1 file2 file3...directory1 directory2...




  E questa  la patch :)
































  *** tar.c.orig  Sat Apr 26 05:09:49 1997
  --- tar.c       Feb  2 00:50:47 1998
  ***************
  *** 16,21 ****
  --- 16,24 ----
       with this program; if not, write to the Free Software Foundation, Inc.,
       59 Place - Suite 330, Boston, MA 02111-1307, USA.  */

  + /* Feb 2 98: patched by David Fetter to use bzip2 as a
  +              filter (option -y) */
  +
    #include "system.h"

    #include <getopt.h>
  ***************
  *** 196,201 ****
  --- 199,206 ----
      {"block-number", no_argument, NULL, 'R'},
      {"block-size", required_argument, NULL, OBSOLETE_BLOCKING_FACTOR},
      {"blocking-factor", required_argument, NULL, 'b'},
  +   {"bzip2", required_argument, NULL, 'y'},
  +   {"bunzip2", required_argument, NULL, 'y'},
      {"catenate", no_argument, NULL, 'A'},
      {"checkpoint", no_argument, &checkpoint_option, 1},
      {"compare", no_argument, NULL, 'd'},
  ***************
  *** 372,377 ****
  --- 377,383 ----
                  PATTERN                at list/extract time, a globbing PATTERN\n\
      -o, --old-archive, --portability   write a V7 format archive\n\
          --posix                        write a POSIX conformant archive\n\
  +   -y, --bzip2, --bunzip2             filter the archive through bzip2\n\
      -z, --gzip, --ungzip               filter the archive through gzip\n\
      -Z, --compress, --uncompress       filter the archive through compress\n\
          --use-compress-program=PROG    filter through PROG (must accept -d)\n"),
  ***************
  *** 448,454 ****
       Y  per-block gzip compression */

    #define OPTION_STRING \
  !   "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxz"

    static void
    set_subcommand_option (enum subcommand subcommand)
  --- 454,460 ----
       Y  per-block gzip compression */

    #define OPTION_STRING \
  !   "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxyz"

    static void
    set_subcommand_option (enum subcommand subcommand)
  ***************
  *** 805,810 ****
  --- 811,820 ----
          case 'X':
          exclude_option = 1;
          add_exclude_file (optarg);
  +       break;
  +
  +       case 'y':
  +       set_use_compress_program_option ("bzip2");
          break;

          case 'z':

  5.  Usare bzip2 con less

  Per decomprimere i file bzip2 al volo, ad esempio usare "less" senza
  prima bunziparli, tu puoi fare un lesspipe.sh (man less) simile a
  questo:

  #!/bin/sh
  # This is a preprocessor for 'less'.  It is used when this environment
  # variable is set:   LESSOPEN="|lesspipe.sh %s"

    case "$1" in
    *.tar) tar tvvf $1 2>/dev/null ;; # View contents of various tar'd files
    *.tgz) tar tzvvf $1 2>/dev/null ;;
  # This one work for the unmodified version of tar:
    *.tar.bz2) bzip2 -cd $1 $1 2>/dev/null | tar tzvvf - ;;
  #This one works with the patched version of tar:
  # *.tar.bz2) tyvvf $1 2>/dev/null ;;
    *.tar.gz) tar tzvvf $1 2>/dev/null ;;
    *.tar.Z) tar tzvvf $1 2>/dev/null ;;
    *.tar.z) tar tzvvf $1 2>/dev/null ;;
    *.bz2) bzip2 -dc $1  2>/dev/null ;; # View compressed files correctly
    *.Z) gzip -dc $1  2>/dev/null ;;
    *.z) gzip -dc $1  2>/dev/null ;;
    *.gz) gzip -dc $1  2>/dev/null ;;
    *.zip) unzip -l $1 2>/dev/null ;;
    *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.man) FILE=`file -L $1` ; # groff src
      FILE=`echo $FILE | cut -d ' ' -f 2`
      if [ "$FILE" = "troff" ]; then
        groff -s -p -t -e -Tascii -mandoc $1
      fi ;;
    *) cat $1 2>/dev/null ;;
  #  *) FILE=`file -L $1` ; # Check to see if binary, if so -- view with 'strings'
  #    FILE1=`echo $FILE | cut -d ' ' -f 2`
  #    FILE2=`echo $FILE | cut -d ' ' -f 3`
  #    if [ "$FILE1" = "Linux/i386" -o "$FILE2" = "Linux/i386" \
  #         -o "$FILE1" = "ELF" -o "$FILE2" = "ELF" ]; then
  #      strings $1
  #    fi ;;
    esac




  6.  Usare bzip2 con emacs

  6.1.  Cambiare emacs per tutti:

  Ho scritto la seguente patch per jka-compr.el la quale aggiunge bzip2
  ad auto-compression-mode.

  Disclaimer: Io l'ho solo testato con emacs-20.2, ma non c' nessuna
  ragione per credere che un simile approccio non funzioni con altre
  versioni.

  Come usarlo

  1. Vai nella directory dei sorgenti emacs-20.2/lisp (oppure dove li
     hai un-tarati)

  2. Metti la seguente patch in un file chiamato jka-compr.el.diff (deve
     essere l'unico file ;).

  3. Fai



   patch < jka-compr.el.diff




  4. Avvia emacs, e fai


        M-x byte-compile-file jka-compr.el




  5. Esci da emacs.

  6. Metti il tuo jka-compr.elc originale in un posto sicuro in caso di
     bachi.

  7. Sostituisci il nuovo jka-compr.elc.

  8. Hai fatto!


     --- jka-compr.el        Sat Jul 26 17:02:39 1997
     +++ jka-compr.el.new    Thu Feb  5 17:44:35 1998
     @@ -44,7 +44,7 @@
      ;; The variable, jka-compr-compression-info-list can be used to
      ;; customize jka-compr to work with other compression programs.
      ;; The default value of this variable allows jka-compr to work with
     -;; Unix compress and gzip.
     +;; Unix compress and gzip.  David Fetter added bzip2 support :)
      ;;
      ;; If you are concerned about the stderr output of gzip and other
      ;; compression/decompression programs showing up in your buffers, you
     @@ -121,7 +121,9 @@


      ;;; I have this defined so that .Z files are assumed to be in unix
     -;;; compress format; and .gz files, in gzip format.
     +;;; compress format; and .gz files, in gzip format, and .bz2 files,
     +;;; in the snappy new bzip2 format from http://www.muraroa.demon.co.uk.
     +;;; Keep up the good work, people!
      (defcustom jka-compr-compression-info-list
        ;;[regexp
        ;; compr-message  compr-prog  compr-args
     @@ -131,6 +133,10 @@
           "compressing"    "compress"     ("-c")
           "uncompressing"  "uncompress"   ("-c")
           nil t]
     +    ["\\.bz2\\'"
     +     "bzip2ing"        "bzip2"         ("")
     +     "bunzip2ing"      "bzip2"         ("-d")
     +     nil t]
          ["\\.tgz\\'"
           "zipping"        "gzip"         ("-c" "-q")
           "unzipping"      "gzip"         ("-c" "-q" "-d")




  6.2.  Modificare emacs per un solo utente:

  Un ringraziamento per questa cosa va a Ulrik Dickow, ukd@kampsax.dk
  <mailto:ukd@kampsax.dk>, Programmatore di Sistema presso Kampsax
  Technology:

  Per fare in modo di usare bzip2 autmaticamente, senza essere un
  sysadmin, aggiungi ci che segue nel tuo file .emacs.


  ;; Automatic (un)compression on loading/saving files (gzip(1) and similar)
  ;; We start it in the off state, so that bzip2(1) support can be added.
  ;; Code thrown together by Ulrik Dickow for ~/.emacs with Emacs 19.34.
  ;; Should work with many older and newer Emacsen too.  No warranty though.
  ;;
  (if (fboundp 'auto-compression-mode) ; Emacs 19.30+
      (auto-compression-mode 0)
    (require 'jka-compr)
    (toggle-auto-compression 0))
  ;; Now add bzip2 support and turn auto compression back on.
  (add-to-list 'jka-compr-compression-info-list
               ["\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'"
                "zipping"        "bzip2"         ()
                "unzipping"      "bzip2"         ("-d")
                nil t])
  (toggle-auto-compression 1 t)




  7.  Usare bzip2 con wu-ftpd

  Ringrazio Arnaud Launay per questo salva banda.  Ci che segue va in
  /etc/ftpconversions per comprimere e decomprimere con bzip2 al volo.
  Assicurati che i percorsi (simile a /bin/compress) siano giusti.


   :.Z:  :  :/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
   :   : :.Z:/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
   :.gz: :  :/bin/gzip -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:GUNZIP
   :   : :.gz:/bin/gzip -9 -c %s:T_REG:O_COMPRESS:GZIP
   :.bz2: :  :/bin/bzip2 -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:BUNZIP2
   :   : :.bz2:/bin/bzip2 -9 -c %s:T_REG:O_COMPRESS:BZIP2
   :   : :.tar:/bin/tar -c -f - %s:T_REG|T_DIR:O_TAR:TAR
   :   : :.tar.Z:/bin/tar -c -Z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
   :   : :.tar.gz:/bin/tar -c -z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP
   :   : :.tar.bz2:/bin/tar -c -I -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+BZIP2




  8.  Usare bzip2 con Netscape sotto XWindows

  tenthumbs@cybernex.net dice:


       Ho trovato un modo di far usare bzip2 al Netscape per Linux per Con
       tent-Encoding nello stesso modo con cui usa gzip. Aggiungi quanto
       segue a $HOME/.Xdefaults oppure $HOME/.Xresources

       Io uso l opzione -s poich preferisco sacrificare un po' di velocit
       di decompressione piuttosto che l'utilizzo di memoria RAM. Puoi
       togliere questa opzione se non ne hai bisogno.









  Netscape*encodingFilters:      \
          x-compress :  : .Z     : uncompress -c  \n\
          compress   :  : .Z     : uncompress -c  \n\
          x-gzip     :  : .z,.gz : gzip -cdq      \n\
          gzip       :  : .z,.gz : gzip -cdq      \n\
          x-bzip2    :  : .bz2   : bzip2 -ds \n




  9.  Usare bzip2 con xv

  Sto lavorando ad una patch, in modo tale che xv autodecomprima i file
  bzip2 nello stesso modo con cui pu decomprimere quelli di gzip.
  Nessuno vuole aiutarmi?



















































  The Clock Mini-HOWTO
  Ron Bean, rbean@execpc.com
  v, Dicembre 1996

  Come regolare e mantenere sincronizzato l'orologio del tuo computer.

  1.  Introduzione

  I chip RTC (NdT: Real-time-clock, orologio in tempo reale) usati sulle
  piastre madri dei PC (ed anche delle workstation pi costose) sono
  notoriamente imprecisi. Linux fornisce un mezzo semplice per rimediare
  a questo via software, rendendo l'orologio potenzialmente *molto*
  preciso anche senza bisogno di sincronizzarlo continuamente a una
  fonte esterna. Ma la maggior parte delle persone non sembrano saperlo,
  per molte ragioni:

  1. Non  menzionato nella maggior parte dei documenti su come
     impostare Linux, e sarebbe difficile (sebbene non impossibile in
     teoria, se hai un modem) regolare automaticamente tali impostazioni
     all'installazione.

  2. Se consulti ``man clock'' otterrai clock(3), che non  ci che ti
     serve (prova ``man 8 clock'').


  3. La maggior parte della gente non sembra essere interessata a che
     ora sia.


  4. Quei pochi cui interessa spesso usano il pacchetto xntpd da
     louie.udel.edu per sincronizzarsi ad una fonte esterna, come un
     network time server o un orologio radio.

  Questo mini-HOWTO descrive l'approccio low-tech.  Se sei maggiormente
  interessato a questi argomenti, ti raccomando caldamente di spendere
  un po' di tempo su  <http://www.eecis.udel.edu/~ntp/>, che comprende
  molte cose interessanti, incluse informazioni complete su xntpd e
  collegamenti a NIST and USNO (aggiunger un paio di commenti su xntpd
  alla fine).


     Note
        Se hai pi di un sistema operativo sulla tua macchina, dovresti
        permettere ad uno solo di modificare l'orario dell'orologio
        CMOS, cos che non si confondano l'un l'altro.  Se usi
        regolarmente sia Linux che Windows sullo stesso computer,
        potresti provare uno dei programmi shareware di gestione
        dell'orologio interno che sono disponibili per windows (segui i
        collegamenti dall'URL qui sopra).

  2.  Usare il programma `` clock ''

  Tutto ci che ti serve sapere  nella pagina del manuale clock(8), ma
  questo mini-HOWTO ti guider lungo la procedura.


     Note
        Devi avere i privilegi di root per lanciare ``clock'', o
        qualsiasi altro programma che intervenga sull'orario di sistema
        o sull'orologio CMOS.

  2.1.  Verificare la correttezza dell'installazione

  Cerca nei tuoi file di avvio del sistema un comando tipo ``clock -a''
  o ``clock -ua''. A seconda di quale distribuzione stai usando,
  potrebbe essere in /etc/rc.local, o /etc/rc.d/rc.sysinit, o qualche
  luogo simile.

  Se dice ``clock -s'' o ``clock -us'', cambia la ``s'' in una ``a'', e
  poi verifica se hai il file /etc/adjtime, che contiene una singola
  linea che sembra qualcosa del genere:


       0.000000 842214901 0.000000




  Questi numeri sono il fattore di correzione (in secondi al giorno), il
  momento in cui l'orologio  stato corretto per l'ultima volta (in
  secondi dal 1 Gennaio 1970) e il secondo parziale che  stato
  arrotondato quella volta.  Se non hai quel file, fai un login come
  root e crealo, con una singola linea che appaia cos (tutti zero):


       0.0 0 0.0




  Poi lancia ``clock -a'' o ``clock -ua'' manualmente dalla shell per
  aggiornare il secondo numero (usa ``u'' se il tuo orologio  regolato
  sul tempo universale invece che sul locale).

  2.2.  Misurare la deriva dell'orologio

  Per prima cosa, ti serve sapere che ora  :-).  Il tuo tempo locale
  pu essere accurato o no. Il mio metodo preferito  chiamare il
  servizio telefonico allo (303)499-7111 (NdT: per l'Italia  il 161 e
  costa due scatti). Se hai accesso a un network time server, puoi usare
  il programma ntpdate dal pacchetto xntpd (usa l'opzione -b per
  prevenire che il kernel faccia confusione nell'orologio CMOS).
  Altrimenti usa ``date -s hh:mm:ss'' per regolare manualmente l'orario
  del kernel, e poi ``clock -w'' per sincronizzare da esso l'orologio
  CMOS. Dovrai ricordarti quando hai regolato l'orologio per l'ultima
  volta, perci annotati l'informazione da qualche parte. Se hai usato
  ntpdate, dai ``date +%s'' e annotati il numero dei secondi dal 1
  Gennaio 1970

  Poi torna dopo un po' di tempo e controlla quanto ha deviato
  l'orologio. Se l'avevi regolato a mano, raccomando di aspettare almeno
  due settimane, e di limitarti a calcolare la deriva alla prima cifra
  decimale di secondo al giorno (alcuni pretendono maggiore accuratezza
  qui, ma io sono abbastanza conservatore). Se hai usato ntpdate non
  dovrai aspettare cos tanto, ma in ogni caso potrai regolare con
  maggiore precisione pi tardi.

  Puoi fare eseguire a cron il comando ``clock -a'' a intervalli
  regolari per tenere l'orologio di sistema sincronizzato con quello
  CMOS. Questo comando sar anche eseguito dal tuo file d'avvio ogni
  volta che fai il boot, quindi se lo fai spesso (come molti di noi),
  questo dovrebbe essere sufficiente.

  Nota che alcuni programmi potrebbero lamentarsi se l'orario salta di
  pi di un secondo, o se viene spostato all'indietro. Se hai di questi
  problemi, puoi usare xntpd o ntpdate per correggere l'orario con
  maggiore gradualit.

  2.3.  Un esempio



  2.3.1.  Regolare l'orario

  Fai il login come root.  Componi il 161, e ascolta la comunicazione.
  Poi scrivi:


       date -s hh:mm:ss




  ma non premere Invio finch non scatta il minuto (puoi usare ``ntp
  date'' qui, al posto di ``date'', e risparmiarti la telefonata).
  Questo regola il ``kernel time'' (orario del kernel). Poi scrivi:


       clock -w




  Questo regola l'orologio CMOS in modo che si sincronizzi all'orario
  del kernel. Poi scrivi:


       date +%j




  (o ``date +%s'' se hai usato ``ntpdate'' al posto di ``date'', qui
  sopra) e annotati il dato fornito, per la prossima volta.

  2.3.2.  Reimpostare l'orario e controllare la deriva

  Ritrova la data che ti eri annotato l'ultima volta.  Fai il login come
  root, e poi scrivi:


       clock -a




  Questo regola l'orario del kernel per sincronizzarlo a quello CMOS.
  Componi il 161 e ascolta l'annuncio; poi scrivi:


       date




  e premi Invio quando scatta il minuto, ma mentre aspetti scriviti
  l'orario annunciato, e non riappendere ancora.  Questo ti dice che ora
  la macchina pensava fosse, quando avrebbe dovuto scattare precisamente
  il minuto.  Adesso scrivi:


       date hh:mm:00




  usando il minuto *dopo* quello che  appena stato annunciato, e premi
  Invio quando senti di nuovo che il minuto scatta (adesso puoi
  riappendere).  Per hh usa l'ora locale.  Questo regola il ``kernel
  time''.  Poi digita:


       clock -w




  che scrive il nuovo (e corretto) orario nell'orologio CMOS.  Adesso
  immetti:


       date +%j




  (o ``date +%s'' se hai usato questo, pi sopra)

  Adesso hai tre numeri (due date e un orario) che ti permetteranno di
  calcolare la deriva.

  2.3.3.  Calcolare il fattore di correzione

  Quando hai avviato ``date'' sul cambio di minuto, la tua macchina era
  in ritardo o in anticipo?  Se era in anticipo, dovrai sottrarre alcuni
  secondi, quindi annotateli come un numero negativo.  Se era in
  ritardo, fai il contrario.

  Adesso sottrai le due date.  Se hai usato ``date +%j'', il numero
  rappresenta il giorno dell'anno (1-365, o 1-366 in quelli bisestili).
  Se hai operato a cavallo del 1 Gennaio, aggiungi 365 (o 366) al
  secondo numero.  Se hai usato ``date +%s'' allora il tuo numero  in
  secondi, e dovrai dividerlo per 86400 per avere i giorni.

  Se hai gi un fattore di correzione in /etc/adjtime, dovrai tenere
  conto dei secondi che saranno gi stati corretti. Se hai corretto in
  eccesso, questo numero avr segno opposto di quello che hai appena
  misurato; se hai corretto in difetto, avr lo stesso segno.
  Moltiplica  il vecchio fattore di correzione per il numero di giorni,
  e aggiungi il nuovo numero di secondi (addizione con segno: se i due
  numeri hanno lo stesso  segno, otterrai un numero pi grande,
  altrimenti pi piccolo).


  Poi dividi il numero totale di secondi per i giorni per ottenere il
  nuovo fattore di correzione, ed immettilo in /etc/adjtime al posto del
  vecchio. Annotati la nuova data (in secondi o giorni) per la prossima
  volta.

  Questo  come appare il mio /etc/adjtime:


       -9.600000 845082716 -0.250655




  (nota che 9.6 secondi al giorno sono quasi 5 minuti al mese!)


  3.  Alcune parole su xntpd

  Il tuo sistema ha effettivamente due orologi: il ``real time clock''
  (orologio in tempo reale) alimentato a batteria, che tiene il tempo
  quando il sistema  spento (conosciuto anche come ``CMOS clock'',
  ``Hardware clock'', o ``RTC'') ed il ``kernel time'' (orologio del
  kernel, qualche volta chiamato ``software clock'' o ``system clock''),
  che  basato sul timer interrupt ed  inizializzato dall'orologio CMOS
  al momento dell'avvio del sistema. Questi deviano con tassi diversi,
  quindi divergeranno gradualmente l'uno dall'altro, e anche dal tempo
  reale.

  Tutti i riferimenti all'``orologio'' (the clock) nella documentazione
  di xntpd si riferiscono a quello del kernel. Quando avvii xntpd o
  timed (o qualsiasi altro programma che usi la chiamata di sistema
  adjtimex), il kernel di Linux assume che il 'suo' orologio sia pi
  accurato di quello del CMOS, e reimposta quest'ultimo ogni 11 minuti
  da quel momento in poi (finch non si riavvia la macchina).  Questo
  significa che ``clock'' non sa pi quando l'orologio CMOS  stato
  regolato l'ultima volta, quindi non pu usare il fattore di correzione
  in /etc/adjtime.  Puoi usare ntpdate nel tuo file di avvio per
  regolare l'orologio da un timeserver prima di avviare xntpd.  Se non
  hai un accesso continuo a un'accurata fonte di orario quando avvii la
  macchina, questo pu essere un po' problematico: xntpd non 
  propriamente progettato per  essere usato in tali situazioni.

  xntpd include i driver per molti orologi radio, e pu anche essere
  impostato per chiamare il servizio telefonico di NIST a intervalli
  regolari (assicurati di calcolare l'effetto sulla bolletta telefonica
  quando decidi l'intervallo tra le chiamate) (NdT: soprattutto se
  chiami dall'Italia!).  Pu anche applicare un fattore di correzione
  all'orologio del kernel se questo perde contatto con le sue sorgenti
  esterne per un certo periodo di tempo.

  La maggior parte degli orologi radio costano $3-4000, ma puoi
  facilmente ottenere gli schemi di un poco costoso ``gadget box''
  (effettivamente un modem a 300 baud) che stia tra il tuo computer e
  una qualunque radio ad onde corte regolata sul segnale orario della
  stazione del CHU in Canada (vedi
  <ftp://ftp.udel.edu/pub/ntp/gadget.tar.Z>).  L'Heathkit WWV receiver
  (l'``Orologio pi accurato'')  pure ancora disponibile (NdT: si parla
  del 1996), sebbene non sia un kit, e costa attorno ai $4-500.  I
  segnali GPS contengono inoltre informazioni sull'orario, e alcuni
  ricevitori GPS possono essere collegati alla porta seriale. Questa
  potrebbe diventare la soluzione pi a basso costo nel futuro.

  In teoria, qualcuno potrebbe usare il segnale orario telefonico della
  NIST per calcolare automaticamente la deriva dell'orologio CMOS e di
  quello del kernel. Non conosco nessun programma singolo che lo faccia,
  ma probabilmente la maggior parte del codice potrebbe essere presa a
  prestito da xntpd.

  Tradotto da Germano Rizzo, germano@geocities.com

















  COFFEE-HOWTO
  di Georgatos Photis, <gef@ceid.upatras.gr>
  v0.5, 15 Gennaio 1998

  L'osservazione sul software pi noiosa che abbia mai sentito dire  se
  questa o quella cosa possano fare il caff. Linux FA il caff. Ed 
  anche buono!  Traduzione italiana a cura di Christopher Gabriel,
  cgabriel@pluto.linux.it

  Per molto tempo l'umanit si  chiesta come un computer possa fare il
  caff...  Le persone hanno bisogno di caff per restare sveglie e
  stare di fronte ad un computer per molto tempo.  Tutti sanno che 
  molto meglio scrivere codice durante la notte...


  Il problema principale  come poter controllare la macchine del caff
  con il computer, in modo da utilizzare il software per pilotarla.
  Queste generalmente significa un interruttore ACCESO/SPENTO
  implementato su un circuito che controlla l'alimentazione della
  macchina da caff.


  1.  Menu

  1.1.  Alla francese

  Caff molto popolare fra i programmatori poich non necessita di molta
  cura, come tutto il software commerciale. Il suo gusto eccitante ha
  ispirato migliaia di programmatori a scrivere software incredibile,
  ovviamente scritto sempre nelle prime ore del giorno. Windows per
  esempio  stato scritto alle cinque del mattino, grazie a questo
  caff! I risultati sono garantiti.


  1.2.  Nescaf

  Nescaf  un caff molto forte, fatto mescolando acqua calda con una
  mistura di caff e zucchero. Solitamente si prendono un cucchiaio di
  caff e uno di zucchero con pochissima acqua, per miscelarli. Nel
  frattempo la vostra acqua dovrebbe gi bollire. Non appena l'acqua 
  calda a sufficienza mescolare tutti assieme e possibilmente aggiungete
  del latte. Altrimenti potete usare qualcosa di pi semplice di una
  macchina per caff per scaldare l'acqua, l'ho visto fare tantissime
  volte...


  1.3.  frappe

  Variante popolare del caff appena menzionato. Attualmente non
  necessita di una macchina da caff, ma di un congelatore per avere
  acqua fredda e cubetti di ghiaccio.



  1.4.  freddo

  Questo  molto difficile da fare, leggete le Coffee FAQ ( trovate le
  istruzioni delle bibliografia )


  1.5.  cappuccino (ancora da scrivere)

  1.6.  (ancora da scrivere) espresso



  2.  Circuito Elettronico

  Il diagramma generale pu essere una cosa di questo tipo:



       --------- 0-5V  ---------- ~220V  ---------------------
       |  PC   |===>===|Circuito|========| Macchina da caff |
       ---------       ----------        ---------------------





  Il concetto  quello di prendere il voltaggio di controllo da
  computer, che guida un circuito elettronico isolato con un Rel o un
  Triac.


  Dovete optare per un circuito Rel se avete una grande macchina da
  caff ( con un consumo maggiore di 200 Watt ), altrimenti potete
  semplicemente usarne uno basato sul Triac.

  Tutti i circuiti presentati sono stati sperimentati almeno una volta,
  ma i risultati che otterrete saranno TUTTI DI VOSTRA RESPONSABILIT.
  Se non avete esperienze con l'elettronica NON DOVETE provare ad
  usarli, altrimenti potete ottenere dei risultati veramente dannosi.



  Dovete stare molto attenti mentre sperimentate utilizzando la corrente
  elettrica a 220V, e bisogna anche stare attenti a scegliere il
  fusibile giusto.


  2.1.  Pilotare il voltaggio 0-5V dal computer

  Ecco un piccolo esempio di come ottenere un voltaggio 0-5V dalla porta
  parallela del computer.




             Vista posteriore   -----    Pin 10 - ACK
             Connettore DB-25   |   |    Pin  9 - D7
             Maschio            |   |                           Pin 2 - D0
                                v   v                           v   Pin 1 -
       ~Strobe
              ____________________________________________________________
             /                                                            \
             \     13  12  11  10   9   8   7   6   5   4   3   2   1     /
              \                                                          /
               \     25  24  23  22  21  20  19  18  17  16  15  14     /
                \______________________________________________________/





  Pin 1  lo Strobe (logica inversa)

  Pins 2-9 portano i segnali del bus di dati, esattamente come  scritto
  nella documentazione della porta parallela

  Pin 10  il acknowledge signal (ACK), controllato da voi, in modo da
  poter produrre un interrupt nella CPU.
  Pins 18-25 sono corto-circuitati e rappresentano la massa (GND).


  In dettaglio:


       <= in   DB25    Cent    Name of         Reg
       => out  pin     pin     Signal          Bit     Function Notes
       ------  ----    ----    --------        ---     -----------------------------
       =>       1       1      -Strobe         C0-     Set Low pulse >0.5 us to send
       =>       2       2      Data 0          D0      Set to least significant data
       =>       3       3      Data 1          D1      ...
       =>       4       4      Data 2          D2      ...
       =>       5       5      Data 3          D3      ...
       =>       6       6      Data 4          D4      ...
       =>       7       7      Data 5          D5      ...
       =>       8       8      Data 6          D6      ...
       =>       9       9      Data 7          D7      Set to most significant data
       <=      10      10      -Ack            S6+ IRQ Low Pulse ~ 5 uS, after accept
       <=      11      11      +Busy           S7-     High for Busy/Offline/Error
       <=      12      12      +PaperEnd       S5+     High for out of paper
       <=      13      13      +SelectIn       S4+     High for printer selected
       =>      14      14      -AutoFd         C1-     Set Low to autofeed one line
       <=      15      32      -Error          S3+     Low for Error/Offline/PaperEnd
       =>      16      31      -Init           C2+     Set Low pulse > 50uS to init
       =>      17      36      -Select         C3-     Set Low to select printer
       ==      18-25   19-30,  Ground





  2.2.  Controllare attraverso un rel

  Il circuito pi semplice che qualcuno possa costruire :



                                    Vcc
                                     |
                                     +------+
                                     |    __|__
                                   Relay   /^\  Diode 1N4002
                                    Coil  /---\
                                     |      |
                                     +------+
                                     |
                                  | /
                        4.7K    B |/  C
       parallel port >-\/\/\/\/---|        NPN Transistor: BC547A or 2N2222A
       data pi                    |\  E
                                  | V
                                    |
       parallel port >--------------+
       ground pin                   |
                                 Ground




  Collegate il Vcc allo stesso voltaggio del tipo di rel ( solitamente
  5 o 12V). Ovviamente le specifiche del rel devono essere adatte alla
  vostra macchina da caff.

  I baristi, solitamente, hanno la tendenza di mettere il rel DOPO il
  transistor, al pin emettitore (E) invece che al collettore (C).
  Questa  praticamente un disastro poich il transistor pu generare un
  caff molto, ma molto cattivo.  Il diodo 1N4002  molto utile per
  proteggere il transistor dalla tensione del rel. Se non lo utilizzate
  il transistor diventer scuro e molto odoroso..



  2.3.  Controllo attraverso un TRIAC #1

  Se desiderate un circuito molto semplice, potete usare il driver triac
  MOC301[012] della Motorola, assieme ad un TRIAC multi-funzione come il
  SC141D.  Questo metodo porta il vantaggio che non necessita di
  alimentazione supplementare.


  Per un carico non-induttivo usate questa circuiteria



               270     1 +-------+ 6    180
         +5v -VAVAVA-----+       +----VAVAVA-----+-------------- Line Hot
                       2 |  MOC  |               |
         TTL in ---------+ 3012  +nc            VA  SC141D
                         |       | 4           / |
                       nc+       +------------/  |
                         +-------+               +----\/\/\/---- Line Neutral
                                                       LOAD




  Se state utilizzando una tensione di 220V,  preferibile un 3021.
  Carichi induttivi devono essere utilizzati assieme a dei condensatori
  di bypass.  Fate riferimento al documento Motorola Application Note
  AN-780.  Le macchine da caff usano per lo pi cariche resistive e non
  induttive (come un motore), ma chiss come  la vostra...


  2.4.  Controllo attraverso un TRIAC #2



























  +5VDC
  |    180                      180            2.2k
  +---/\/\/\----+-----+   +----/\/\/-+--/\/\/\---+-------> 120V
                |    1|   |6         |           |         Hot
                |    +=====+         |           | MT1
                |    | MC  | TRIAC   |          +-+
                |    | 3032| Driver  |        G | | TRIAC
                |    +=====+         |         /| |
                \    2|   |4         |        / +-+
         2N3904  |----+   |          |        |  | MT2
                /     |   +--------- | -------+  |
               V      \              |        |  |
               |      /              |        \  |
               |      \ 43    .01u  ---   10k /  |
               |      /       500V  ---       \  |
               |      |              |        /  |
               +------+              |        |  |            Neutral
               |                     +--------+--+---o    o--> 120V
               /                                      load
   >-/\/\--|  2N3904
               \
                V
                |
               ---
              ///
  Dovete cambiare le resistenza per utilizzare una tensione di 220V.




  Descrizione del circuito:

  Il MC3032  un driver TRIAC optoisolatore.  La resistenza di 180 Ohm
  imposta la corrente per il LED dentro l'optoisolatore.  Cambiate il
  valore di questa resistenza - se necessario - per ottenere una
  corrente accettabile (es. 15 mA).

  Da notare che non potete testare questo circuito senza un carico di
  tensione.  Il TRIAC non cambier a meno che non sia connesso con una
  sorgente di voltaggio AC, quindi non potete testarlo per un semplice
  switch senza applicare AC e un carico.


  3.  Software



  3.1.  Software

  Dovete create un file eseguibile che esegue queste operazioni:

    Ottiene i permessi di I/O chiamandoli dal kernel, con il comando
     ioperm: es. ioperm( BASE, range, 1);

    Esegue una istruzione di richiesta in uscita, per impostare il
     voltaggio 0.5V sulla porta parallela, es. outb(1, BASE );

    Aspetta il tempo necessario alla preparazione del caff. Sarebbe
     bello se questo intervallo di tempo fosse mostrato nella linea di
     comando.

    Quindi deve spegnere la macchina del caff : outb( 0, BASE );

    Prima di terminare deve restituire la porta parallela con una
     istruzione tipo ioperm( BASE, range, 0);

     Cambiate BASE = 0x3bc per /dev/lp0, 0x378 per /dev/lp1, e 0x278 per
     /dev/lp2, range=8.


  Sarebbe molto bello avere questo programma setuid, in modo che tutti
  possano bere il caff!


  3.2.  Driver di periferica


  Leggete qua: kernel hacker's guide, implementate un driver di
  periferica (pu restare in user space, credo).  Per favore compilatelo
  come un modulo, in modo che non dobbiate compilare il kernel ad ogni
  aggiornamento.  Quindi scrivete:


  echo cappuccino >/dev/coffee



  E avrete una calda tazza di caff pronta in 1 minuto.  Ricordatevi di
  assegnare i giusti permessi a /dev/coffee, a seconda se solo root pu
  bersi il caff o meno.


  Il vantaggio di questo metodo  che supporta il feedback dalla
  macchina da caff utilizzando l'ACK della porta parallela, quindi
  macchine da caff intelligenti possono produrre un interrupt.


  Ecco i compiti per casa.


  3.3.  Connessione via Internet.

  Se avete implementato il programma C ( leggete sopra ), dovete
  soltanto scrivere un semplice programma CGI che accende e spegne la
  macchina da caff.  Potete anche scrivere qualche pagina web carina,
  dove spiegate come fare il caff, e mettetela in un server web
  apache...


  4.  Sintomi da overdose


    eccitazione

    nervosismo

    insonnia

    tachicardia o aritmia cardiaca

    disturbi gastro-intestinali

    allucinazioni


  5.  Espansioni

  Queste sono le nostre idee:

    Tutto l'hardware e il software descritto in questo documento pu
     essere espanso fino a supportare il tostapane, la bistecchiera, il
     forno a microonde etc..
    Creare un Cluster con 8 macchine da caff. Questo vi permette di
     avere del caff anche se una macchina si spegne. Ovviamente ci
     sarano cambiamenti nelle performance

    La prossima release includer come mettere macchine da caff in
     parallelo.

    Se desiderate la massima automazione avete bisogno di molti altri
     circuiti e sensori, in modo da poter controllare il flusso
     dell'acqua, la temperatura, la quantit di caff etc..

    Verranno in futuro implementate feature per la gestione via SNMP.

    Macchina da caff seriale a 115Kbps.


  6.  Riferimenti


    http://daisy.uwaterloo.ca/~alopez-o/caffaq.html Questa  la Coffee-
     FAQ di Internet

    http://lonestar.texas.net/~andrew/f_pc_.htm Tantissimi circuiti in
     ASCII. Alcuni di questi sono per la porta parallela.

    http://shell.rmi.net/~hisys/parport.html Tutto quello che avreste
     voluto sapere sulla porta parallela e non avete mai osato chiedere.

    http://sunsite.unc.edu/LDP/HOWTO/mini/IO-Port-Programming
     Programmazione della porte di I/O per il popolare sistema operativo
     Linux.

    http://www.redhat.com:8080/HyperNews/get/khg.html Come scrivere
     driver per periferiche. Avanti, fatelo anche voi!

    http://www.hut.fi/Misc/Electronics/circuits/parallel_output.html La
     pagina web di Tomi Engdahl  un *must* per chiunque si interessi di
     elettronica.

    http://www.yahoo.com/Computers_and_Internet/Internet/
     Entertainment/Interesting_Devices_Connected_to_the_Net/Coffee_Machines/
     Macchine da caff online. Sfortunamente non ci sono prove.

    http://www.cs.su.oz.au/~bob/coffee.html Questa macchinad a caff
     offre solo cappuccino. E` da aggiornare!!

    http://einstein.et.tudelft.nl/~janssen/ Caff caldo dall'Olanda.

    http://circe.chinalake.navy.mil/cgi-bin/spion/snapit.cgi

    http://www.cl.cam.ac.uk/coffee/coffee.html

    http://www.menet.umn.edu/coffeecam/


  7.  etc

  7.1.  prefazione

  Questo documento  stato scritto inizialmente in Greco, risultato di
  un piccolo dibattito sulla mailing list linux-greek-users, sul fatto
  che Linux possa fare il caff o meno. C stato un articolo sul nostro
  bellissimo giornale online su Linux chiamato "magaz":
  http://www.linux.gr/magaz.  Ricordatevi, questo magaz  in greco.


  7.2.  Autore

  Il mio nome  Georgatos Photis, studente al dipartimento di Ingegneria
  Informatica di Patras. Solitamente, sono molto occupato con la
  documentazione in greco e la manutenzione di pagine web, ma posso
  accettare aggiornamenti per questo HOWTO.


  7.3.  Copyright

  Il mitico copyright che accompagna tutto ci che  con linux...  Per
  trovarlo, dovete leggerli tutti e contare quale  il pi utilizzato.
  Altrimenti.. No, non potete copiare questo documento.


  7.4.  Collaboratori


    Christofer Colombus. Il suo vero nome  Cristobal Colon. E' stato
     il primo a portare il caff dall'America, che lui scopr per primo
     ( tra gli Europei ) nel 1492.

    Kostas Lialiambis  colui che si  lamentato sul fatto che non pu
     fare caff con Linux.

    Panagiotis Vrionis, Yannakopoulos Haralambos hanno contribuito
     nelle note umoristiche.







































  I colori sui terminali Linux
  Thorbjrn Ravn Andersen, ravn@dit.ou.dk
  v1.4, 7 August 1997

  La maggior parte delle distribuzioni Linux hanno un comando 'ls' per
  elencare il contenuto di una directory, l'output del quale pu essere
  migliorato e reso pi chiaro usando colori diversi. Ma configurare
  questa possibilit secondo il proprio gusto pu risultare un compito
  non banale. Questo documento spiega i vari aspetti del problema, i
  metodi per modificare i colori cambiando la configurazione del soft
  ware esistente, ed indica del software alternativo non incluso nella
  Slackware o nella RedHat, che possa essere usato sulla maggior parte
  delle versioni di Unix.  La versione in HTML  disponibile anche su
  <http://www.mip.ou.dk/~ravn/colour-ls>.

  1.  Introduzione

  Negli ultimi anni i monitor a colori sono diventati molto comuni, e
  gli utenti stanno cominciando ad usare programmi che usano il colore
  per dare una risposta visiva veloce ad esempio delle parole riservate
  nei linguaggi di programmazione o per il controllo immediato delle
  parole con errori di ortografia.

  Dato che la console di testo di Linux permette l'uso dei colori, l'ls
  originale della GNU  stato prontamente modificato per restituire
  informazioni a colori, ed  stato incluso nella Slackware intorno alla
  versione 2.0. Nella distribuzione standard GNU sono state incluse
  queste modifiche migliorandole, e a questo punto dovrebbero fare parte
  di tutte le distribuzioni di Linux.

  Questa versione  stata modificata in modo sostanziale rispetto al
  documento iniziale, e comprende anche informazioni sugli xterm e su
  come apportare alcune modifiche al kernel.


  Le informazioni contenute qui sono state testate sulla RedHat 4.1, e
  in origine sono state compilate con la versione 2.0.2 della Slackware
  e il kernel 1.1.54. Le informazioni sulle modifiche del kernel sono
  state prese dalla slackware 2.2.0 con il kernel 1.2.13 e tcsh come
  shell di default, e testate in seguito con un kernel 2.0.27. Se le
  usate su un'altra configurazione, o un'altra versione di Unix, mi
  farebbe piacere che mi inviaste la vostra configurazione, il sistema
  operativo che usate e la sua versione, e se i colori sono disponibili
  come standard.



  2.  Inizio veloce per gli impazienti

  Se avete una distribuzione di Linux nuova, apportate queste modifiche
  ai file indicati nella vostra home directory. Hanno effetto dopo il
  login successivo.



        ~/.bashrc:
            alias ls="ls --color"

        ~/.cshrc:
            alias ls 'ls --color'




  Ecco fatto!

  Potete anche fare ``eval `dircolors $HOME/.colourrc`'', per avere i
  vostri colori personali. Questo file viene creato con dircolors -p
  >$HOME/.colourrc'' ed  ben commentato per poter essere modificato in
  seguito.


  3.  Ma ce l'ho?

  Per prima cosa dovete controllare se avete una versione di ls che sa
  come usare i colori in modo corretto. Provate questo comando su una
  console di testo di Linux (funziona anche un xterm):



        % ls --color





  (il %  il prompt della shell): Se vi d un messaggio di errore che
  dice che ls non capisce l'opzione dovete installare una versione pi
  recente del pacchetto fileutils della GNU.  Se non avete il pacchetto
  di aggiornamento per la vostra distribuzione, prendete i sorgenti dal
  mirror GNU pi vicino e installate direttamente da quelli.

  Se non vi d un messaggio di errore, avete una versione di ls che
  capisce il comando. Sfortunatamente, alcune delle versioni pi vecchie
  incluse nella Slackware (e forse altre) erano bacate. L'ls compreso
  nella Redhat 4.1  la versione 3.13 che  a posto.



        % ls --version
        ls - GNU fileutils-3.13





  Se date il comando ``ls -- color'' su una console di testo di Linux
  l'output dovrebbe venire colorato a seconda dei default del sistema, e
  potete decidere se volete cambiare qualcosa.  Se l'avete dato in un
  xterm potete avere visto un qualche cambiamento dei colori oppure no.
  Come lo stesso ls, il programma originale per gli xterm non permetteva
  l'uso dei colori dai programmi al suo interno, ma le versioni pi
  recenti lo fanno. Se la versione che avete non supporta i colori
  dovreste cercarne una pi recente come descritto alla fine di questo
  documento. Nel frattempo passate ad una console di testo e continuate
  da l.



  4.  Tra quali colori si pu scegliere

  Questo shell script (grazie a tutti quelli che mi hanno mandato
  versioni per bash) mostra tutte le combinazioni standard di colori
  sulla console corrente. Se non appare nessun colore, la console non
  permette l'uso della selezione di colori ANSI.







  #!/bin/bash
  # Mostra i colori ANSI
  #
  esc="\033["
  echo -n " _ _ _ _ _40 _ _ _ 41_ _ _ _42 _ _ _ 43"
  echo "_ _ _ 44_ _ _ _45 _ _ _ 46_ _ _ _47 _"
  for fore in 30 31 32 33 34 35 36 37; do
    line1="$fore  "
    line2="    "
    for back in 40 41 42 43 44 45 46 47; do
    line1="${line1}${esc}${back};${fore}m Normal
    ${esc}0m"
    line2="${line2}${esc}${back};${fore};1m Bold
    ${esc}0m"

    done
  echo -e "$line1\n$line2"
  done




  Il colore del primo piano viene elencato a sinistra, e il colore di
  sfondo nella casella. Se volete caratteri pi evidenti aggiungete un
  "1" ai parametri; ad esempio blu su bianco sar "37;44;1". La sequenza
  completa di selezione ANSI  cos

  ESC [ 3 7 ; 4 4 ; 1 m



  Nota: Allo stato attuale lo sfondo non pu essere del tipo evidente,
  quindi non potete avere il giallo (marrone evidente) tranne che per il
  primo piano. E' una limitazione dovuta all'hardware.


  5.  Configurazione dei colori su ls

  I colori sono:

        0 - nero     4 - blu            3#  foreground
        1 - rosso    5 - magenta        4#  background
        2 - verde    6 - ciano
        3 - giallo   7 - bianco         ;1  grassetto



  Se volete modificare le impostazioni standard di ls, vi serve una
  copia personale nella vostra home directory, che potete avere con il
  comando


        cd ; dircolors -p > .coloursrc




  Dopo aver modificato questo file, che  molto ben commentato, lo
  dovete inserire nella variabile d'ambiente LS_COLORS, che di solito si
  fa usando


       eval `dircolors .colourrc`



  Per avviare questo comando ad ogni login dovete metterlo nel vostro
  .bashrc/.cshrc/.tcshrc (a seconda della shell che usate). Consultate
  la pagina man di dircolors(1) per i dettagli.



  6.  Modifica della modalit di testo predefinita (bianco su sfondo
  nero).


  Dovrete dire al codice del driver del terminale che vi serve un altro
  default. Non c' un modo standard per farlo, ma nel caso di Linux
  potete usare il programma setterm.


  "setterm" usa le informazioni nel database del terminale per impostare
  gli attributi. Le selezioni vengono fatte cos:


       setterm -foreground black -background white -store




  dove lo "-store" oltre alla vera modifica pone come default anche per
  la console corrente la selezione fatta.  Questo metodo richiede che il
  terminale corrente (la variabile d'ambiente TERM) sia "abbastanza ben"
  descritta nel database di termcap. Se setterm per qualche ragione non
  funziona, ecco alcune alternative:


  6.1.  Xterm

  Almeno uno di questi xterm dovrebbe essere disponibile, ed almeno uno
  di essi permette l'uso dei colori.



       xterm -fg white -bg blue4
       color_xterm -fg white -bg blue4




  dove 'color_xterm' rende possibile l'uso di 'ls'. Questa particolare
  scelta somiglia ai colori usati su un SGI.


  6.2.  La console virtuale


  Potete modificare il kernel una volta per tutte, fornendo anche un
  default di avvio per le console virtuali con una sequenza di escape.
  Vi consiglio la patch per il kernel se ne avete compilato uno da soli.

  Il file di sorgente del kernel 
  /usr/src/linux/drivers/char/console.c; dovete modificare intorno alla
  linea 1940, cambiando



               def_color       = 0x07;   /* bianco */
               ulcolor         = 0x0f;   /* bianco evidente */
               halfcolor       = 0x08;   /* grigio */


  come pi appropriato. Io uso bianco su blu con


               def_color       = 0x17;   /* bianco */
               ulcolor         = 0x1f;   /* bianco evidente */
               halfcolor       = 0x18;   /* grigio */




  I numeri sono i codici di attributo usati dalla scheda video espressi
  in esadecimale: la cifra pi significativa (l' "1" nei colori di
  esempio qui sopra)  lo sfondo; la cifra meno significativa  il primo
  piano. 0 = nero, 1 = blu, 2 = verde, 3 = cyan, 4 = rosso, 5 = rosa, 6
  = marrone/giallo, 7 = bianco. Aggiungeteci 8 per avete colori pi
  luminosi. Notate che, nella maggior parte dei casi, uno sfondo
  luminoso == caratteri che lampeggiano e sfondo opaco. (Da
  sjlam1@mda023.cc.monash.edu.au).



  Potete anche fornire un nuovo default di avvio per una console
  virtuale, sulla base dello schermo con la sequenza ANSI non standard
  (che si trova ricercando nei sorgenti del kernel)



               ESC [ 8 ]




  che imposta come default i colori di sfondo e di primo piano correnti.
  Poi, la stringa degli Attributi di Reset (ESC [ m) imposta questi
  colori al posto del bianco su nero.

  In realt dovrete visualizzare questa stringa sulla console ogni volta
  che riavviate il sistema. A seconda di come usate la vostra macchina
  Linux, potete fare in diversi modi:


  6.2.1.  /etc/issue


  Qui  dove viene mostrato il "Benvenuti in Linux xx.yy" nella
  Slackware, ed  una buona scelta per macchine stand-alone (e
  probabilmente  da evitare come la peste per gli utenti che si
  collegano con telnet). Questo file viene creato all'avvio (su
  Slackware in /etc/rc.d/rc.S, su Redhat in /etc/rc.d/rc.local), e
  dovreste modificare le linee simili a questa:



         echo ""> /etc/issue
         echo Benvenuti su Linux `/bin/uname -a | /bin/cut -d\  -f3`. >>
       /etc/issue




  to





    ESCAPE="<sostituire con un singolo carattere di escape>"
    echo "${ESCAPE}[H${ESCAPE}[37;44m${ESCAPE}[8]${ESCAPE}[2J"> /etc/issue
    echo Welcome to Linux `/bin/uname -a | /bin/cut -d\  -f3`. >> /etc/issue




  Questo codice porter il cursore in alto a sinistra, imposter il
  colore (qui  bianco su blu), salver questa scelta e ripulir il
  resto dello schermo. Le modifiche hanno effetto dopo il riavviamento
  seguente.  Ricordate di inserire il carattere di escape _letterale_
  nel file con C-q in emacs o con control-v in vi, dato che
  apparentemente la sh usata per l'esecuzione di questo script non
  capisce la sintassi /033.



  6.2.2.  /etc/profile or .profile



         if [ "$TERM" = "console" ]; then
             echo "\033[37;44m\033[8]" #
       # or use setterm.
             setterm -foreground white -background blue -store
         fi





  6.2.3.  /etc/login or .login




         if ( "$TERM" == "console" ) then
           echo "\033[37;44m\033[8]"
       # or use setterm.
             setterm -foreground white -background blue -store
         endif





  6.3.  Login remoto


  Dovreste poter usare il programma setterm come  stato mostrato sopra.
  Di nuovo, questo richiede che la macchina remota sappia abbastanza
  cose sul vostro terminale, e che l'emulatore di terminale che fornisce
  il login supporti il colore.  Per la mia esperienza le migliori
  emulazioni di vt100 disponibili al momento per altri tipi di
  piattaforma sono:

    MS-DOS:         MS-Kermit (un prodotto free, non della Microsoft)

    Windows 95/NT:  Kermit/95 (shareware)

    OS/2:           Kermit/95 (shareware).  Notate per che il telnet
     standard riconosce i colori e pu essere configurato localmente.

  Per dettagli su Kermit vedere  <http://www.columbia.edu/kermit/>.


  Se trovate una combinazione che funziona, vorrei averla qui.


  7.  Software


  Tutte le informazioni che sono descritte qui assumono che abbiate
  un'installazione GNU/Linux.  Se avete qualcos'altro (come ad esempio
  una Sun con X o cose del genere) potete prendervi e compilarvi il
  software da soli.

  La versione a colori di 'xterm'  basata sul sorgente standard di
  xterm con una patch disponibile su qualsiasi sito X11R6. Si dice che
  l'xterm distribuito con la R6.3 abbia il supporto dei colori nativo,
  ma io non l'ho ancora provato.


       ftp://ftp.denet.dk/pub/X11/contrib/utilities/color-xterm-R6pl5-patch.gz




  Guardate la doumentazione se usate una versione di X pi vecchia.
  Nota: Io non ci ho provato!


  `ls'  nel pacchetto di utilit per file della GNU, disponibile da
  prep.mit.edu o da uno dei numerosi mirror. Avete bisogno del
  pacchetto; prendete almeno la versione 3.13.


       ftp://ftp.denet.dk/pub/gnu/fileutils-3.XX.tar.gz





  Io stesso ho compilato con successo color-ls su Solaris, SunOS e Irix.


  Apprezzerei del feedback su questo testo. Il mio indirizzo e-mail 
  ravn@dit.ou.dk

  --

  Thorbjrn Ravn Andersen


  Traduzione italiana di Eugenia Franzoni - eugenia@stud.unipg.it

















  Diskless Linux Mini Howto
  di Robert Nemkin buci@math.klte.hu. Tradotto da Salvatore
  Meschini  smeschini@ermes.it
  v0.0.3, 12 Settembre 1996. Tradotto il 30 agosto 1998.

  Questo documento descrive come impostare un sistema Linux privo di
  unit disco ed i diritti d'autore appartengono a Robert Nemkin. La
  polizza del copyright  GPL. L'autore ringrazia Bela Kis <bkis@car
  tan.math.klte.hu> per aver tradotto in inglese questo documento.

  1.  Modifiche


    v0.0.3 12 Settembre 1996: Correzione di alcuni errori


  2.  Come impostare un Linux box senza avere unit a disco

  Questo documento tratta l'impostazione di una stazione Linux priva di
  dischi ("diskless"). Ci pu essere necessario per eseguire Linux su
  PC che non ha n dischi rigidi n floppy drive. Se si opera in una
  rete con un altro sistema Unix fornito di bootp, tftp, un server NFS,
  ed  disponibile un programmatore di eprom allora  possibile
  configurare ed usare Linux senza avere drive.


  3.  Altra documentazione


    NFS-root Mini Howto

    Linux NET-2/3-HOWTO a cura di Terry Dawson,
     94004531@postoffice.csu.edu.au

    /usr/src/linux/README configurazione e compilazione di nuovi kernel


  4.  Hardware

  Tutto ci che  descritto nel documento  stato provato con la
  configurazione seguente:

    Sun-OS 4.1.3 come boot server

    Slackware 2.3 + Linux 1.2.8 + wd 8013 ethercard.

    Una LAN Ethernet funzionante


  5.  Idee basilari

  L'idea fondamentale  la seguente: il PC prender il suo indirizzo IP
  dal boot server attraverso il protocollo bootp.  necessario usare
  0.0.0.0 come indirizzo IP iniziale ed il kernel del server mediante il
  protocollo tftp. (-- La fase di avvio fatta attraverso dei segmenti
  (via router) non  cosa da poco, dunque conviene mettere sia il server
  che i terminali senza dischi nello stesso segmento LAN oppure
  configurare un indirizzo di sostegno UDP nel router verso l'indirizzo
  del server. Fate riferimento al manuale del vostro router per ottenere
  ulteriori informazioni.--)

  Seguite i passi indicati:




  5.1.  Impostazione del PC

  Prendete il pacchetto nfsboot (il pacchetto  disponibile su diversi
  mirror, nella directory /pub/Linux/system/Linux-boot.  Nfsboot
  contiene un'immagine booteprom della scheda wd8013 che pu essere
  programmata direttamente nella EPROM.

  Ci sono anche metodi alternativi per preparare il PC:

     Se la vostra macchina ha una qualche unit disco, allora 
     possibile usare un programmino DOS oppure

    l'immagine binaria per floppy contenuta nel pacchetto
     precedentemente indicato.

  Se preferite adottare la seconda soluzione allora dovete scrivere
  l'immagine su un floppy utilizzando il comando dd

  Queste immagini contengono un client bootp ed uno tftp. Dovete
  preparare un Linux kernel che supporti l'opzione nfs-root.

    Se state usando l'ultimo kernel stabile, linux-1.2.13, allora
     dovete applicare il patch al kernel sfruttando il file incluso nel
     pacchetto nfsboot  (-- Fate riferimento a patch(1)--)

    Se decidete di usare l'ultimo kernel della serie linux-1.3.x,
     allora sar necessario configurare l'opzione nfs-root.

  Potete scegliere se configurare o meno il supporto per il block device
  (floppy o hard disk), ma dovete configurare il supporto per tcp/ip,
  per le schede ethernet e per il filesystem nfs. Poi ricompilate il
  kernel come fate di solito.



  5.2.  Impostazione di bootpd sul server

  Bootpd pu essere reperito nel pacchetto bootpd-2.4.tar.gz
  (disponibile nella directory /pub/Linux/system/Network/boot.net del
  vostro Linux mirror preferito). Scaricate il pacchetto, compilatelo ed
  installatelo. Se il sistema Unix presente sul server  Slackware Linux
  allora potete saltare questo passo poich la distribuzione contiene un
  bootpd.  Il demone pu essere eseguito direttamente digitando il
  comando



       ______________________________________________________________________
               bootpd -s
       ______________________________________________________________________




  oppure usando inetd. In questo caso avete bisogno di editare:

    /etc/inetd.conf per rimuovere il simbolo hash (#) dall'inizio di
     queste righe:



       ______________________________________________________________________
       # tftp   dgram   udp     wait    root    /usr/sbin/in.tftpd     tftpd /export
       # bootps dgram   udp     wait    root    /usr/sbin/in.bootpd    bootpd
       ______________________________________________________________________

    inserite o decommentate le seguenti due linee in /etc/services:



       ______________________________________________________________________
       bootps          67/tcp          # BOOTP server
       tftp            69/udp          # TFTP server
       ______________________________________________________________________





    riavviate inetd con



       ______________________________________________________________________
               kill -HUP <id del processo inetd>.
       ______________________________________________________________________





  5.3.  Configurazione di bootpd sul server.

  Per prima cosa, bootpd ha un file di configurazione chiamato bootpdtab
  che di solito si trova in /etc. Bisogna modificarlo inserendo gli
  indirizzi IP del vostro gateway, del server dns e gli indirizzi
  ethernet della macchina sprovvista di unit a disco.  Un esempio del
  file /etc/bootptab:


       ______________________________________________________________________

       global.prof:\
               :sm=255.255.255.0:\
               :ds=192.168.1.5:\
               :gw=192.168.1.19:\
               :ht=ethernet:\
               :bf=linux:
       macchina1:hd=/export/root/machine1:tc=global.prof:ha=0000c0863d7a:ip=192.168.1.140:
       macchina2:hd=/export/root/machine2:tc=global.prof:ha=0800110244e1:ip=192.168.1.141:
       macchina3:hd=/export/root/machine3:tc=global.prof:ha=0800110244de:ip=192.168.1.142:
       ______________________________________________________________________




  global.prof  un modello generale per le entrate host, dove

    il campo sm contiene il subnet mask

    il campo ds contiene l'indirizzo del Domain Name Server

    il campo gw contiene l'indirizzo del gateway predefinito

    il campo ht contiene il tipo di hardware LAN

    il campo bf contiene il nome del file di avvio

  Inoltre ogni macchina deve avere una linea:

    il primo campo contiene il nome dell'host,

    il campo hd contiene la directory del file di avvio,

    il modello globale pu essere incluso con il campo tc,

    il campo ha contiene l'indirizzo hardware della scheda ethernet,

    il campo ip contiene l'indirizzo IP assegnato.



  5.4.  Capire tftp

  TFTP (Trivial File Transfer Protocol)  un protocollo per il
  trasferimento di file, come ftp, ma molto pi semplice da codificare
  nelle EPROM. TFTP pu essere usato in due modi:

    tftp ingenuo: significa che il client pu accedere all'intero file
     system della vostra macchina.  semplice ma rappresenta un enorme
     buco nella sicurezza del sistema (chiunque pu prelevare il vostro
     file delle password con tftp).

    tftp sicuro: il server tftp usa una chiamata di sistema di tipo
     chroot.2 per cambiare la propria directory root. Qualunque cosa
     all'esterno della nuova directory root sar completamente
     inaccessibile. Poich la directory chroot diventa la nuova
     directory root, il parametro hd presente nel file bootpdtab deve
     riflettere la nuova situazione. Per esempio: quando si usa il tftp
     ingenuo, il campo hd contiene il percorso completo alla directory
     di boot: /export/root/machine1.  Quando invece si usa il tftp
     sicuro con /export come directory di root, /export diviene / ed il
     campo hd deve essere /root/macchina1.

     Quasi tutte le implementazioni di Unix contengono il server tftp,
     probabilmente non ci sar bisogno di installarne uno.


  5.5.  Impostazione di una configurazione minimale di Linux su un
  server remoto.

  Una configurazione minimale dovrebbe contenere i pacchetti a, ap, n ed
  x della distribuzione Slackware. Installare altri pacchetti non  un
  errore, comunque i pacchetti appena menzionati sono sufficienti ai
  fini di creare un terminale X senza unit disco. Per l'installazione
  c' bisogno di un sistema Linux funzionante. Trovate dello spazio
  libero sul disco della macchina remota ed esportatelo come lettura-
  scrittura. Montate la directory esportata da qualche parte (es. /mnt)
  sul file system del terminale Linux. Avviate il setup di Linux e
  cambiate l'opzione root nel setup da / a /mnt. Poi installate i
  pacchetti che ritenete necessari come fate di solito. Se volete usare
  al massimo un terminale Linux allora non dovete apportare nessun altro
  cambiamento.  Se invece pensate di aver bisogno di pi macchine senza
  unit disco, allora il setup tradizionale non funzioner perch alcuni
  file e directory devono risultare private per la macchina. Il problema
  pu essere risolto spostando la directory /usr (non contiene dati
  privati) e creando una sotto-directory separata per ogni terminale.
  Per esempio, se /export/linux/macchina1 fosse montata su /mnt allora
  la struttura delle directory dopo il setup iniziale risulterebbe
  simile a questa:








  ______________________________________________________________________
  /export/linux/macchina1/bin
  /export/linux/macchina1/sbin
  /export/linux/macchina1/lib
  /export/linux/macchina1/etc
  /export/linux/macchina1/var
  /export/linux/macchina1/usr
  ______________________________________________________________________




  Dopo i cambiamenti la struttura diventer:


       ______________________________________________________________________
       /export/linux/macchina1/bin
       /export/linux/macchina1/sbin
       /export/linux/macchina1/lib
       /export/linux/macchina1/etc
       /export/linux/macchina1/var
       /export/linux/usr
       ______________________________________________________________________




  Ora dovete creare le sotto-directory per le altre macchine. Da adesso
  in poi si assuma che i sistemi senza dischi siano chiamati macchina1,
  macchina2, macchina3, ecc.; In seguito sar possibile usare il
  seguente script bash per impostare le altre directory


       ______________________________________________________________________

               cd /export/linux
               for x in macchina2 macchina3 ; do
                       mkdir $x; cd $x
                       (cd ../macchina1; tar cf - *) | tar xvf -
               done
       ______________________________________________________________________





  Poi create il seguente export:

    /export/linux/usr               sola lettura per tutti.

    /export/linux/macchina1         solo alla macchina1 con diritti
     rw,root.

    /export/linux/macchina2         solo alla macchina2 con diritti
     rw,root.

    /export/linux/macchina3         solo alla macchina3 con diritti
     rw,root.

     nel modo seguente (--  il formato di questo esempio  conforme alla
     sintassi del SunOs 4.1.3 per i file exports--) :





  ______________________________________________________________________

  # Questo file  /etc/export
  # per terminali remoti Linux X (by Buci)
  # questa linea va indicata una sola volta
  /export/root/usr             -access=linuxnet
  # queste linee vanno indicate una volta per ogni host
  /export/root/machine1       rw=machine1,root=machine1
  /export/root/machine2       rw=machine2,root=machine2
  /export/root/machine3       rw=machine3,root=machine3
  ______________________________________________________________________




  Non dimenticate di eseguire exportfs -a.


  5.6.  Configurazione del server tftp


   giunto il momento di configurare il server tftp. Se non avete
  bisogno del tftp sicuro allora tutto  abbastanza facile ed i vostri
  client possono essere avviati dalla directory /export.

  Se preferite usare il tftp sicuro allora dovete creare una struttura
  delle directory /export/linux completa sotto /tftpboot (con un solo
  kernel reale e links simbolici per le altre macchine), oppure lasciate
  che /export sia la directory di avvio del tftpd sicuro. Se avete una
  directory tftpboot separata allora ci sar bisogno solo della
  struttura delle directory originale con un solo kernel e links
  simbolici per gli altri terminali. Potete ottenere questo setup
  digitando i comandi seguenti:


       ______________________________________________________________________
             mkdir -p /tftpboot/export/linux/macchina1
             cd /tftpboot/export/linux/macchina1
             cp /export/linux/macchina1/<nome del kernel> .
       ______________________________________________________________________




  In seguito digitate:



       ______________________________________________________________________
             mkdir -p /tftpboot/export/linux/macchina2
             cd ../macchina2
             ln -s ../macchina2/<nome del kernel>
       ______________________________________________________________________





  5.7.  Parte finale


  Infine dovete inserire




  ______________________________________________________________________
     /sbin/mount nfs_server:/export/linux/usr /usr
  ______________________________________________________________________




  come prima linea di



       ______________________________________________________________________
          /export/linux/<macchinax>/etc/rc.d/rc.S
       ______________________________________________________________________




  dove <macchinax> sta per macchina1, macchina2, ecc.


  6.  Requisiti relativi alla memoria e allo spazio su disco; velocit


  Io ho provato questo metodo solo con la Slackware 2.3; per altre
  distribuzioni/versioni i numeri seguenti possono cambiare.

    Spazio su disco: 28MB + 6.5MB/per ogni macchina

    RAM: Io uso X con 8 MB. Per sistemi con solo 4MB suppongo sia
     necessario dello spazio swap, createlo -- separatamente per ogni
     macchina -- in /tmp.  Non dimenticate di lanciare il comando
     mkswap.

    Velocit: non ho avuto problemi con un 486 DX2/66 con 8 mega di
     RAM.


  7.  Problemi



    Mi sono imbattuto in uno strano errore: nella sotto-directory /dev
     SunOS ha rovinato i dispositivi, perci ho dovuto rieseguire
     MAKEDEV montando le sotto-directory su un sistema Linux dotato di
     unit disco (la causa del problema sta nelle differenze tra il nfs
     (network filesystem) di Linux e quello di SunOS: tutti e due usano
     32 bit per indicare il numero Major e Minor del dispositivo, ma
     Linux usa campi a 16 bit per entrambi, SunOs usa campi a 14 bit per
     la parte Major e a 18 bit per quella Minor.).

    Quando il sistema Linux senza unit disco viene avviato, esiste un
     unico instradamento incluso nella tabella di instradamento al
     server tftp, cos avete bisogno di impostare correttamente le
     tabelle di instradamento. Potete contare su due possibili scelte:

    configurare a mano ogni rc.S per ogni macchina

    usare un client bootp e scrivere uno script di configurazione
     generalizzato


  8.  Errori e possibili ulteriori espansioni di questo documento



    Elenco corretto degli altri documenti disponibili

    SunOs  basato su BSD. Inclusione della configurazione del server
     basato su SVR4 (cio Solaris)

    Nonostante Linux sia abbastanza simile a SunOs come server
     bootp/tftp, un esempio di server basato su Linux potrebbe essere
     utile.

    Aggiornamento di questo documento al pacchetto etherboot corrente.

    Elenco delle differenze tra il network filesystem del kernel 1.2.13
     e quello del pi recente 1.3.x che contiene il patch nfs-root.

    Necessit di provare altre schede ethernet oltre alla wd8013

    Aggiunta delle informazioni di configurazione per bootpc, un client
     bootp per Linux utile ad impostare le tabelle di instradamento
     corrette.

    Refusi ed altri errori: per favore segnalateli a buci@math.klte.hu.
     Grazie.












































  Linux Ext2fs Undeletion mini-HOWTO
  Aaron Crane, aaronc@pobox.com
  v1.3, 2 Febbraio 1999

  Immaginate: per gli ultimi tre giorni non avete dormito, non avete
  mangiato, non avete nemmeno fatto la doccia. La vostra foga di hacker
  vi ha finalmente ricompensato: avete finito il programma che vi
  porter fama mondiale. Tutto quello che dovete fare  farne un tar e
  metterlo su Metalab. Oh, e cancellare tutti quei file di backup di
  Emacs. Quindi date rm * ~.  E, troppo tardi, notate lo spazio di
  troppo in quel comando. Avete appena cancellato la vostra  magnum
  opus!  Ma ecco l'aiuto. Questo documento vi presenta una discussione
  su come recuperare i file cancellati da un filesystem Second Extended.
  Cos, forse, potrete fare uscire quel programma...

  1.  Introduzione

  Questo mini-howto  un tentativo di fornire suggerimenti su come
  recuperare file cancellati da un filesystem ext2. Contiene anche una
  breve discussione su come evitare a priori di cancellare dei file.


  La mia intenzione  che sia utile sicuramente per le persone che
  abbiano appena avuto, diciamo, un piccolo incidente con rm;, ma spero
  che venga letto comunque. Non si sa mai, un giorno queste informazioni
  vi potrebbero salvare la pelle.

  Il testo assume una conoscenza di base dei filesystem UNIX in
  generale, ma spero che sia accessibile alla maggior parte degli utenti
  Linux. Se siete dei veri principianti, ho paura che il recupero di
  file sotto Linux richieda una certa conoscenza tecnica, almeno al
  momento.

  Non potrete recuperare dei file cancellati da un filesystem ext2 senza
  avere almeno accesso in lettura al dispositivo fisico in cui il file
  si trovava. In generale, questo significa che dovete essere root, ma
  alcune distribuzioni (come la Debian GNU/Linux) hanno impostato un
  gruppo disk i cui membri hanno accesso a tali dispositivi. Vi serve
  anche debugfs dal pacchetto e2fsprogs, che dovrebbe essere stato
  installato dalla distribuzione che avete.

  Perch ho scritto questo documento? Pi che altro  nato dalla mia
  esperienza con un particolarmente stupido e disastroso comando rm -r
  da root. Ho cancellato circa 97 file JPEG che mi servivano e non avrei
  potuto quasi sicuramente recuperare da altre fonti. Usando alcuni
  suggerimenti utili (vedere la sezione ``Ringraziamenti e
  bibliografia'') e molta testardaggine, ho recuperato 91 file integri.
  Sono riuscito a recuperare almeno delle parti di 5 dei restanti
  (abbastanza per vedere quale era la figura). Solo uno  andato perso
  del tutto, e anche di questo sono quasi sicuro che non ne ho persi pi
  di 1024 byte (anche se sfortunatamente erano all'inizio del file: e
  non so niente del formato dei file JFIF e ho fatto tutto quello che
  potevo).

  Discuter pi avanti quale percentuale di recupero ci si pu aspettare
  per i file cancellati.



  1.1.  Revisioni

  Le varie revisioni pubbliche di questo documento (e le loro date di
  pubblicazione) sono le seguenti:



    v1.0 del 18 Gennaio 1997

    v1.1 del 23 Luglio 1997 (vedere la sezione ``Modifiche nella
     v1.1'')

    v1.2 del 4 Agosto 1997 (vedere la sezione ``Modifiche nella v1.2'')

    v1.3 del 2 Febbraio 1999 (vedere la sezione ``Modifiche nella
     v1.3'')


  1.1.1.  Modifiche nella versione 1.1

  Quali modifiche sono state fatte in questa versione? Prima di tutto,
  ho corretto il "thinko" nell'esempio del recupero file. Grazie a tutti
  quelli che mi hanno scritto: spero di avere imparato ad essere pi
  attento quando scrivo delle interazioni con i programmi.

  Seconda cosa, ho riscritto la discussione sullo schema del filesystem
  UNIX, in modo che sia, spero, pi comprensibile. Non ne ero molto
  contento all'inizio, e i commenti di alcune persone mi hanno indicato
  che non era chiaro.

  Terzo, ho rimosso il .tar.gz uuencodato di fsgrab che era nel mezzo
  del file. Il programma  adesso disponibile dal mio sito web
  <http://pobox.com/~aaronc/tech/fsgrab-1.2.tar.gz> e presto dovrebbe
  arrivare su Metalab <http://metalab.unc.edu/pub/Linux/utils/file/> (e
  sui mirror).

  Quarta cosa, il documento  stato tradotto nel linguaggio SGML usato
  dal Linux Documentation Project. Questo linguaggio pu essere
  facilmente convertito in molti altri linguaggi (compreso l'HTML e il
  LaTeX) per essere visualizzato e  stampato facilmente. Uno dei
  vantaggi di questa cosa  che  pi facile avere una bella versione
  cartacea, un'altro  che il documento ha i riferimenti interni e i
  link ipertestuali quando viene visualizzato sul web.



  1.1.2.  Modifiche nella versione 1.2

  Questa revisione ha solo delle modifiche incrementali. Consiste
  principalmente di modifiche suggerite dai lettori, una delle quali 
  particolarmente importante.

  La prima modifica  stata suggerita da Egil Kvaleberg
  egil@kvaleberg.no, che ha fatto notare il comando dump in debugfs.
  Grazie ancora, Egil.

  La seconda  quella di menzionare l'uso di chattr per evitare di
  cancellare i file importanti. Grazie ad Herman Sujis
  H.P.M.Suijs@kub.nl.

  L'abstract  stato rivisto. Sono stati aggiunti degli URL per le
  organizzazioni ed il software. Sono state apportate altre modifiche
  minori (compresi alcuni errori di battitura e cose del genere).


  1.1.3.  Modifiche nella versione 1.3

  Anche se questa  la prima versione dopo 17 mesi,  stato modificato
  molto poco. Questa versione corregge solo alcuni piccoli errori
  (refusi, URL modificati e cos via), ed aggiorna alcune parti che
  erano diventate datatissime. Ah, e ho cambiato `Sunsite' in `Metalab'.


  Questa versione sar l'ultima prima della 2.0, che si spera sar un
  Howto completo. Sto lavorando su delle modifiche sostanziali che
  giustificheranno un incremento nel numero della versione.


  1.2.  Dove si pu trovare questo documento

  L'ultima versione pubblica del documento dovrebbe essere sempre
  disponibile in formato testo nel sito del Linux Documentation Project
  <http://metalab.unc.edu/LDP/> (e nei suoi mirror).

  L'ultima versione viene anche tenuta sul mio sito web
  <http://pobox.com/~aaronc/> in diversi formati:


    sorgente SGML <http://pobox.com/~aaronc/tech/e2-undel/howto.sgml>.
     Il sorgente come l'ho scritto, usando il pacchetto SGML tools.

    HTML <http://pobox.com/~aaronc/tech/e2-undel/html/>.  HTML,
     generato automaticamente dal sorgente SGML.

    Testo puro <http://pobox.com/~aaronc/tech/e2-undel/howto.txt>.
     Testo puro, anch'esso generato automaticamente dal sorgente SGML.


  2.  Come fare a non cancellare i file

   vitale ricordare che linux non  come l'MS-DOS quando si parla di
  recuperare file cancellati. Per l'MS-DOS (e la sua progenie bastarda
  Windows 95) generalmente recuperare un file  una cosa piuttosto
  semplice - il `sistema operativo' (uso il termine in un'accezione
  molto ampia) comprende addirittura anche un programma che automatizza
  la maggior parte del processo.  Questo non  il caso di Linux.

  Quindi, regola numero uno (il primo comandamento, se volete):


       TENETE I BACKUP


  in qualsiasi caso. Pensate a tutti i vostri dati; forse, come me,
  avete vari anni di email, contatti, programmi, lavori che si sono
  accumulati sul vostro computer. Pensate a come vi sentireste se il
  vostro disco si rompesse, o se -- Signore salvaci! -- un cracker vi
  cancellasse tutto l'hard disk. Non  poi cos inconsueto: io sono
  stato in contatto come molte persone in situazioni del genere. Esorto
  tutti i Linuxisti di buona volont a uscire e comprare un buon mezzo
  di backup, pensare ad una buona policy di backup ed a usarla. Io
  personalmente uso un secondo disco su un'altra macchina, e faccio un
  mirror periodico della mia home directory su di esso via ethernet.
  Per altre informazioni su come fare una policy di backup, leggete il
  Frisch (1995) (vedere la sezione ``Bibliografia e Ringraziamenti'').

  In mancanza di backup, cosa fare? (o anche in presenza di backup: se
  avete dei dati importanti , meglio andarci coi piedi di piombo).

  Provate ad impostare i permessi dei file importanti a 440 (o meno):
  negarvi il permesso di cancellare dei file implica una conferma
  esplicita prima di cancellarli (io comunque trovo che, se sto
  cancellando ricorsivamente una directory con rm -r, interrompo il
  programma alla prima o seconda richiesta di cancellazione e lo rid
  come rm -rf).

  Un buon trucco per i file selezionati  crearne un hard link in una
  directory nascosta.  Ho sentito una storia di un amministratore di
  sistema che ha cancellato ripetutamente /etc/passwd per errore (quindi
  praticamente distruggendo met del sistema).  Una delle soluzioni
  sarebbe stata fare una cosa del genere (da root):



       # mkdir /.backup
       # ln /etc/passwd /.backup




  Cancellare tutto il contenuto richiede un po' di sforzo: se dite



       # rm /etc/passwd




  fare



       # ln /.backup/passwd /etc




  la recuperer. Certo, non aiuta nel caso in cui abbiate sovrascritto
  il file, quindi tenete comunque dei backup.

  Su un filesystem ext2  possibile usare degli attributi ext2 per
  proteggere i file. Questi attributi possono essere modificati con il
  comando chattr. Esiste un attributo `append-only' (sola aggiunta): un
  file con questo attributo non pu essere cancellato, ma possono essere
  solo aggiunti dei dati. Se una directory ha questo attributo,
  qualsiasi file o directory in essa contenuti pu essere modificato
  come il solito, ma non possono essere cancellati dei file. L'attributo
  `append-only' si imposta con il comando



       $ chattr +a FILE...




  C' anche un attributo `immutable' (non modificabile), che si pu
  impostare o togliere solo da root. Un file o una directory con questo
  attributo non pu essere modificato, cancellato, rinominato e non ci
  si possono fare hard link. Si imposta cos:



       # chattr +i FILE...




  L'ext2fs ha anche l'attributo `undeletable' (non cancellabile) (+u in
  chattr).  L'intenzione  che se un file con quell'attributo viene
  cancellato, invece di essere veramente riutilizzato, viene soltanto
  spostato in un "posto sicuro" per poter essere cancellato in un
  secondo tempo. Sfortunatamente questa caratteristica non  stata
  ancora implementata nei principali kernel; anche se in passato c'
  stato un qualche interesse nella sua implementazione, a quanto ne so
  non  disponibile per le versioni recenti del kernel.

  Alcuni suggeriscono di rendere rm un alias di shell o una funzione che
  stia per rm -i (che chiede conferma su qualsiasi file che cancellate).
  Addirittura la distribuzione Red Hat <http://www.redhat.com/> lo mette
  per default a tutti gli utenti, compreso root. Personalmente, non
  riesco a sopportare il software che non funziona da solo, quindi non
  faccio cos.  C' anche il problema che, prima o poi, userete la
  modalit a utente singolo, o una shell diversa o addirittura una
  macchina diversa, dove la funzione rm che avete definito non esiste.
  Se vi aspettate che vi venga chiesta conferma,  facile dimenticarsi
  dove vi trovate e specificare troppi file al comando di cancellazione.
  Ugualmente, i vari script e i programmi che sostituiscono rm sono,
  IMHO, molto pericolosi.

  Una soluzione leggermente migliore  cominciare ad usare un pacchetto
  che gestisca la "cancellazione riciclabile" fornendo un comando che
  non si chiami rm.  Per avere ulteriori dettagli su questo argomento,
  vedere Peek, et al (1993) (vedere la sezione ``Bibliografia e
  ringraziamenti''). Queste, per hanno il problema che tendono ad
  incoraggiare l'utente a non fare attenzione quando cancellano dei
  file, invece che starci molto attenti, come spesso  richiesto nei
  sistemi Unix.


  3.  Che percentuale di recupero mi posso aspettare?

  Dipende. Tra i problemi che insorgono nel recupero dei file su un
  sistema operativo di alta qualit, multitasking e multi-utente come
  Linux c' quello che non si sa mai quando qualcuno vuole scrivere su
  disco. Quindi, quando al sistema operativo viene detto di cancellare
  un file, assume che i blocchi usati da quel file sono disponibili per
  allocare spazio per un altro file ( un esempio specifico di un
  principio generale di Linux: il kernel e gli strumenti relativi
  assumono che gli utenti non siano idioti).  In generale, pi viene
  usata la macchina, meno  probabile che riusciate a recuperare con
  successo i vostri file.

  Inoltre, la frammentazione del disco pu influire sulla facilit di
  recupero dei file. Se la partizione che contiene i file cancellati 
  molto frammentata,  poco probabile che riusciate a leggere un file
  intero.

  Se la vostra macchina, come la mia,  effettivamente una workstation a
  utente singolo, e non stavate facendo nessuna attivit che scrivesse
  su disco al momento fatale della cancellazione dei file, potete
  aspettarvi una percentuale di recupero vicina a quella che ho indicato
  prima. Io ne ho recuperati all'incirca il 94% (ed erano file binari,
  notare).  Penso che possiate essere contenti con voi stessi se ne
  riuscite a  recuperare pi dell'80%.


  4.  E allora, come faccio a recuperare un file?

  La procedura consiste principalmente nel trovare i dati a basso
  livello nella partizione, e nel renderli di nuovo visibili al sistema
  operativo. Ci sono principalmente due modi per farlo: uno  modificare
  il filesystem esistente in modo da rimuovere l'indicazione di
  "cancellato" dagli inode dei file in questione, e sperare che i dati
  ritornino magicamente a posto. L'altro metodo, che  pi sicuro ma pi
  lento,  capire dove i dati si trovano nella partizione e scriverli in
  un nuovo file su un altro sistema.

  Ci sono alcuni passi necessari da fare prima di iniziare a cercare di
  recuperare i dati: per altri dettagli vedere le sezioni ``Smontare il
  filesystem'', ``Prepararsi alla modifica diretta degli inode'' e
  ``Prepararsi alla scrittura dei dati da qualche altra parte''.  Per
  sapere come fare in pratica a recuperare i file, vedere le sezioni
  ``Trovare gli inode cancellati'', ``Ottenere i dettagli degli inode'',
  ``Recuperare i blocchi di dati'' e ``Modificare gli inode
  direttamente''.


  5.  Smontare il filesystem

  Qualsiasi sia il metodo che avete scelto, il primo passo  smontare il
  filesystem che contiene i file cancellati. Vi sconsiglio fortemente di
  andare in qualsiasi modo a operare su un filesystem montato. Questo
  passo dovrebbe essere fatto al pi presto possibile dopo che vi siete
  accorti della cancellazione dei file: prima fate umount, minore  la
  probabilit che i vostri file vengano sovrascritti.

  Il metodo pi semplice  questo: assumendo che i file cancellati siano
  nel filesystem  /usr, fate



       # umount /usr




  Potete comunque voler mantenere disponibili alcune cose di /usr,
  quindi montatelo a sola lettura:



       # mount -o ro,remount /usr




  Se i file cancellati erano nella partizione di root, dovrete
  aggiungere l'opzione -n per evitare che mount cerchi di scrivere su
  /etc/mtab:



       # mount -n -o ro,remount /




  A parte questo,  possibile che ci sia un altro processo che stia
  usando il filesystem in questione (che far fallire l'umount con un
  errore di `Resource busy'). Esiste un programma che manda un segnale a
  qualsiasi processo che sta usando un dato file o punto di mount:
  fuser. Provatelo con la partizione /usr:



       # fuser -v -m /usr




  elencher i processi coinvolti. Assumendo che nessuno di essi sia
  vitale, potete dare



  # fuser -k -v -m /usr




  per mandare ad ogni processo un SIGKILL (che sicuramente lo uccider),
  o ad esempio



       # fuser -k -TERM -v -m /usr




  per mandargli un SIGTERM (che normalmente far uscire il processo in
  maniera pulita).


  6.  Prepararsi alla modifica diretta degli inode

  Il mio consiglio? Non fate cos. Non credo che sia una cosa saggia
  giocare con un filesystem a livello abbastanza basso da fare
  funzionare questo metodo. Questo metodo d anche dei problemi nel
  senso che si possono recuperare in modo affidabile solo i primi 12
  blocchi di ciascun file, quindi se avete dei file lunghi da recuperare
  dovrete usare l'altro metodo (leggete per la sezione ``Questo metodo
  diventer pi facile in futuro?'' per altre informazioni).

  Se pensate di dover usare questo metodo, il mio consiglio  di copiare
  la partizione raw su una partizione diversa, e poi montarla usando il
  loopback:



       # cp /dev/hda5 /root/working
       # mount -t ext2 -o loop /root/working /mnt




  (Notate che delle versioni obsolete di mount possono avere dei
  problemi con questo metodo. Se il vostro mount non funziona, il mio
  suggerimento  di aggiornarlo all'ultima versione, o almeno alla 2.7,
  dato che alcune versioni molto vecchie hanno dei gravi problemi di
  sicurezza.)

  Usare il loopback significa che se e quando distruggere completamente
  il filesystem, tutto quello che dovrete fare  copiare la partizione
  grezza al suo posto e ricominciare.


  7.  Prepararsi alla scrittura dei dati da qualche altra parte

  Se scegliete questo metodo, dovete assicurarvi di avere da qualche
  parte una partizione di recupero, cio un posto in cui scrivere nuove
  copie dei file che recuperate.  Magari, avete diverse partizioni sul
  vostro sistema: forse una di root, una per /usr, e una per /home.  Con
  tutte queste partizioni non dovreste avere problema: create
  semplicemente una nuova directory in una di esse.

  Se avete solo una partizione di root, ed immagazzinate tutto su
  quella, le cose sono leggermente pi strane. Forse avete una
  partizione MS-DOS o Windows da usare? O avete il driver per il ramdisk
  nel kernel, forse come modulo?  Per usare il ramdisk (assumendo che
  abbiate un kernel pi recente dell'1.3.48), fate cos:
       # dd if=/dev/zero of=/dev/ram0 bs=1k count=2048
       # mke2fs -v -m 0 /dev/ram0 2048
       # mount -t ext2 /dev/ram0 /mnt




  Questo crea un volume di ramdisk di 2MB, e lo monta su /mnt.

  Un breve avvertimento: se usate kerneld (o il suo sostituto kmod nei
  kernel 2.2.x e negli ultimi 2.1.x) per caricare e scaricare
  automaticamente i moduli del kernel, allora non montate il ramdisk
  finch non avete copiato tutti i file che vi si trovano su un supporto
  non volatile. Una volta smontato, kerneld assume che pu smontare il
  modulo (dopo il normale periodo di attesa), e una volta che ci
  accade, la memoria viene riutilizzata da altre parti del kernel,
  perdendo tutte le ore di fatica che avete fatto per recuperare i
  vostri dati.


  Se avete uno Zip, un Jaz, un LS-120 o una cosa simile, probabilmente
  sono una buona scelta per metterci una partizione di recupero.
  Altrimenti, dovrete solo usare i floppy.

  L'altra cosa di cui avrete bisogno  un programma che pu leggere i
  dati necessari dal mezzo del dispositivo della partizione. Per
  iniziare, dd adr bene, ma per leggere diciamo, dal 600esimo MB in una
  partizione da 800 MB, dd insiste a leggere ma ad ignorare i primi 600
  MB. Questo prende un tempo piuttosto lungo. La mia soluzione per
  questo problema  stata scrivere un programma che cercasse nel mezzo
  della partizione. Si chiama fsgrab; ne potete trovare il sorgente sul
  mio sito web <http://pobox.com/~aaronc/tech/fsgrab-1.2.tar.gz> e
  presto arriver su Metalab
  <http://metalab.unc.edu/pub/Linux/utils/file/> (e sui suoi mirror). Se
  volete usare questo metodo, il resto di questo mini-Howto assume che
  abbiate fsgrab.

  Se nessuno dei file che state provando a recuperare  pi lungo di 12
  blocchi (dove un blocco di solito  un kilobyte), allora non avrete
  bisogno di fsgrab.

  Se dovete usare fsgrab ma non volete scaricarlo e compilarlo, 
  piuttosto semplice tradurre una linea di comando di fsgrab in una di
  dd. Se avete


       fsgrab -c count -s skip device


  allora il comando di dd corrispondente (ma tipicamente molto pi
  lento) 


       dd bs=1k if=device count=count skip=skip


  Vi devo avvisare che, anche se fsgrab ha funzionato benissimo per me,
  non posso prendermi alcuna responsabilit per il suo uso.  stata una
  soluzione veramente veloce e improvvisata per fare funzionare le cose.
  Per altri dettagli sulla mancanza di garanzia, vedere la sezione
  `Nessuna garanzia' nel file COPYING incluso con il programma (la GNU
  General Public License).




  8.  Trovare gli inode cancellati

  Il prossimo passo  chiedere al filesystem quali inode sono stati
  liberati recentemente.  un compito che si pu portare a termine con
  debugfs; avviatelo con il nome del dispositivo in cui  immagazzinato
  il filesystem:



       # debugfs /dev/hda5




  Se volete modificare direttamente gli inode, aggiungete l'opzione -w
  per abilitare la scrittura sul filesystem:



       # debugfs -w /dev/hda5




  Il comando di debugfs per trovare gli inode cancellati  lsdel,
  quindi, digitate il comando al prompt:



       debugfs:  lsdel




  Dopo molti lamenti e stridore dei meccanismi del disco, un lungo
  elenco viene mandato in pipe nel vostro pager preferito (il valore di
  $PAGER). Ora vorrete salvarne una copia da qualche altra parte. Se
  avete less, potete digitare -o seguito dal nome di un file di output,
  altrimenti dovrete riuscire a mandare l'output da qualche altra parte.
  Provate cos:



       debugfs:  quit
       # echo lsdel | debugfs /dev/hda5 > lsdel.out




  Ora, basandovi solo sull'ora di cancellazione, la dimensione, il tipo
  e i permessi e l'owner espressi come numeri, dovrete riconoscere quali
  di questi inode cancellati sono quelli che vi servono. Con un po' di
  fortuna, potrete riconoscerli perch sono tutti quelli che avete
  cancellato circa cinque minuti fa. Altrimenti, cercate con attenzione
  su tutta la lista.

  Suggerisco che, se possibile, stampiate la lista degli inode che
  volete recuperare.  Vi render la vita molto pi semplice.


  9.  Ottenere i dettagli degli inode

  debugfs ha un comando stat che stampa i dettagli su un inode. Date
  questo comando per ciascun inode nella vostra lista. Ad esempio, se
  siete interessati all'inode numero 148003, provate questo:

       debugfs:  stat <148003>
       Inode: 148003   Type: regular    Mode:  0644   Flags: 0x0   Version: 1
       User:   503   Group:   100   Size: 6065
       File ACL: 0    Directory ACL: 0
       Links: 0   Blockcount: 12
       Fragment:  Address: 0    Number: 0    Size: 0
       ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996
       mtime: 0x313bf4d7 -- Tue Mar  5 08:01:27 1996
       dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       BLOCKS:
       594810 594811 594814 594815 594816 594817
       TOTAL: 6




  Se dovete recuperare moltissimi file, vorrete rendere questo passaggio
  automatico.  Assumendo che la lista degli inode da recuperare sia nel
  file lsdel.out, provate con questo:



       # cut -c1-6 lsdel.out | grep "[0-9]" | tr -d " " > inode




  Questo nuovo file, inode, contiene il numero degli inode da
  recuperare, uno per linea. Lo salviamo perch molto probabilmente
  torner comodo pi tardi. Date semplicemente:



       # sed 's/^.*$/stat <\0>/' inode | debugfs /dev/hda5 > stats




  e stats conterr l'output di tutti i comandi stat.


  10.  Recuperare i blocchi di dati

  Questa parte pu essere molto semplice o molto poco, a seconda che il
  file che state cercando di recuperare sia pi lungo di 12 blocchi.


  10.1.  File corti

  Se il file non era pi lungo di 12 blocchi, allora i numeri dei
  blocchi di tutti i suoi dati sono immagazzinati nell'inode: li potete
  leggere direttamente dall'output di stat per l'inode. Inoltre, debugfs
  ha un comando che fa questo compito automaticamente. Per continuare
  con l'esempio di prima, ripetuto qui:











  debugfs:  stat <148003>
  Inode: 148003   Type: regular    Mode:  0644   Flags: 0x0   Version: 1
  User:   503   Group:   100   Size: 6065
  File ACL: 0    Directory ACL: 0
  Links: 0   Blockcount: 12
  Fragment:  Address: 0    Number: 0    Size: 0
  ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996
  atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996
  mtime: 0x313bf4d7 -- Tue Mar  5 08:01:27 1996
  dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996
  BLOCKS:
  594810 594811 594814 594815 594816 594817
  TOTAL: 6




  Questo file ha sei blocchi. Dato che questo corrisponde a meno del
  limite di 12, usiamo debugfs per scrivere il file in una nuova
  posizione, come /mnt/recovered.000:



       debugfs:  dump <148003> /mnt/recovered.000




  Naturalmente, potete fare lo stesso con fsgrab; qui sotto presento un
  esempio del suo uso:



       # fsgrab -c 2 -s 594810 /dev/hda5 > /mnt/recovered.000
       # fsgrab -c 4 -s 594814 /dev/hda5 >> /mnt/recovered.000




  Sia con debugfs che con fsgrab, ci saranno dei caratteri inutili alla
  fine di /mnt/recovered.000, ma non  molto importante. Se volete
  sbarazzarvene, il metodo pi semplice  prendere il campo Size
  dall'inode, e metterlo nell'opzione bs della linea di comando di dd:



       # dd count=1 if=/mnt/recovered.000 of=/mnt/resized.000 bs=6065




  Naturalmente,  possibile che uno o pi dei blocchi che compongono il
  vostro file siano stati sovrascritti. Se  cos, siete sfortunati:
  quel blocco  perso per sempre (ma pensate se aveste smontato il
  filesystem prima!).


  10.2.  File pi lunghi

  I problemi compaiono quando il file  pi lungo di 12 blocchi di dati.
  Qui conviene sapere un po' come sono strutturati dei filesystem UNIX.
  I dati del file sono immagazzinati in unit chiamate `blocchi'. Questi
  blocchi possono essere numerati sequenzialmente. Un file ha anche un
  `inode', che  il posto in cui vengono immagazzinate informazioni come
  il proprietario, i permessi ed il tipo.  Come i blocchi, gli inode
  sono numerati sequenzialmente, anche se con una numerazione separata.
  Una voce di una directory consiste nel nome del file e nel numero di
  un inode.

  Ma con questo stato di cose  ancora impossibile per il kernel trovare
  i dati corrispondenti ad una voce di una directory, quindi nell'inode
  vengono anche registrati i numeri dei blocchi di dati del file, cos:


    I numeri di blocchi dei primi 12 blocchi vengono immagazzinati
     direttamente nell'inode; questi vengono a volte chiamati blocchi
     diretti.

    L'inode contiene il numero di blocco di un blocco indiretto.  Un
     blocco indiretto contiene i numeri di blocco di altri 256 blocchi
     di dati.

    L'inode contiene il numero di blocco di un blocco doppiamente
     indiretto.  Un blocco doppiamente indiretto contiene i numeri di
     blocco di altri 256 blocchi doppiamente indiretti.

    L'inode contiene il numero di blocco di un blocco triplamente
     indiretto.  Un blocco triplamente indiretto contiene i numeri di
     blocco di altri 256 blocchi triplamente indiretti.

  Leggetelo ancora: lo so che  complesso, ma  anche importante.

  Ora, l'implementazione del kernel per tutte le versioni fino alla
  2.0.36 compresa sfortunatamente azzera tutti i blocchi indiretti (e
  quelli doppiamente indiretti e cos via) quando cancella un file;
  quindi se il file in questione era pi lungo di 12 blocchi, non avete
  alcuna garanzia di riuscire a trovare nemmeno i numeri di tutti i
  blocchi componenti il file, pensate poi i loro contenuti.

  L'unico metodo che sono riuscito a trovare finora  di assumere che il
  file non era frammentato: se lo era, siete nei guai. Assumendo che il
  file non fosse frammentato, ci sono diversi schemi per i blocchi dei
  dati, a seconda di quanti blocchi dati il file usava:


     da 0 a 12
        I numeri di blocco sono registrati nell'inode, come sopra
        descritto.


     da 13 a 268
        Dopo i blocchi diretti, contatene uno per il blocco indiretto, e
        poi ci sono 256 blocchi di dati.


     da 269 a 65804
        Come prima, ci sono 12 blocchi diretti, uno indiretto (inutile),
        e 256 blocchi; questi sono seguiti da un blocco doppiamente
        indiretto (inutile), e 256 ripetizioni di un blocco indiretto
        (inutile) e 256 blocchi di dati.


     65805 o pi
        Lo schema dei primi 65804 blocchi sono come nel precedente
        esempio. Poi segue un blocco triplamente indiretto (inutile) e
        256 ripetizioni di una `sequenza doppiamente indiretta'. Ogni
        sequenza direttamente indiretta consiste di un blocco
        doppiamente indiretto (inutile), seguito da 256 ripetizioni di
        un blocco indiretto (inutile) e 256 blocchi di dati.

  Naturalmente, anche se questi numeri di blocchi di dati assunti sono
  corretti, non c' garanzia che i dati in essi contenuti siano intatti.
  Oltre a ci, pi lungo era il file, minore  la possibilit che sia
  stato scritto nel filesystem senza una frammentazione apprezzabile
  (eccetto in circostanze speciali).

  Da notare che ho sempre assunto che la dimensione dei blocchi sia di
  1024 byte, dato che  questo il valore standard. Se avete blocchi pi
  grandi, alcune delle cifre riportate qui sopra sono errate.  In
  particolare, dato che ciascun numero di blocco  lungo 4 byte,
  dimblocchi/4  il numero di blocchi che pu essere immagazzinato in
  ciascun blocco indiretto. Quindi, ogni volta che il numero 256 appare
  nella discussione qui sopra, sostituitelo con dimblocchi/4. Dovrete
  modificare anche i limiti sul `numero di blocchi richiesto'.

  Esaminiamo un esempio di recupero di un file lungo.



       debugfs:  stat <1387>
       Inode: 148004   Type: regular    Mode:  0644   Flags: 0x0   Version: 1
       User:   503   Group:   100   Size: 1851347
       File ACL: 0    Directory ACL: 0
       Links: 0   Blockcount: 3616
       Fragment:  Address: 0    Number: 0    Size: 0
       ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996
       mtime: 0x313bf4d7 -- Tue Mar  5 08:01:27 1996
       dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996
       BLOCKS:
       8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8583
       TOTAL: 14




  Sembra esserci una possibilit ragionevole che questo file non sia
  frammentato: di sicuro, i primi 12 blocchi elencati nell'inode (che
  sono tutti blocchi di dati) sono contigui; quindi possiamo cominciare
  a recuperare quelli:



       # fsgrab -c 12 -s 8314 /dev/hda5 > /mnt/recovered.001




  L'ultimo blocco elencato nell'inode  8583. Notate che stiamo ancora
  bene per quanto riguarda la contiguit del file: l'ultimo blocco di
  dati che abbiamo scritto era l'8582, che  8327 + 255. Questo blocco
  8583  un blocco doppiamente indiretto, e quindi possiamo ignorarlo. 
  seguito da 256 ripetizioni di un blocco indiretto (che possiamo
  ignorare) seguito da 256 blocchi di dati; quindi, facendo un rapido
  conto, diamo i seguenti comandi. Notate che saltiamo il blocco
  indiretto 8583, e il blocco indiretto 8584 immediatamente (speriamo)
  successivo, e cominciamo a cercare i dati dal blocco 8585.



       # fsgrab -c 256 -s 8585 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 8842 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9099 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9356 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9613 /dev/hda5 >> /mnt/recovered.001
       # fsgrab -c 256 -s 9870 /dev/hda5 >> /mnt/recovered.001


  Facendo le somme, vediamo che finora abbiamo scritto 12 + (7 * 256)
  blocchi, che fa 1804. I risultati di `stat' per l'inode ci avevano
  dato un conteggio di 3616; sfortunatamente questi blocchi sono lunghi
  512 byte (una conseguenza di UNIX), quindi in realt ci servono 3616/2
  = 1808 blocchi di 1024 byte. Ci significa che ci servono ancora
  quattro blocchi. L'ultimo blocco scritto era il numero 10125. Come
  abbiamo fatto finora, saltiamo un blocco indiretto (il numero 10126),
  e poi possiamo scrivere quegli ultimi quattro blocchi.



       # fsgrab -c 4 -s 10127 /dev/hda5 >> /mnt/recovered.001




  Ora, con un po' di fortuna avremo recuperato l'intero file.


  11.  Modificare gli inode direttamente

  Questo metodo , superficialmente, molto pi semplice; comunque, come
  gi detto, non pu gestire file pi lunghi di 12 blocchi.

  Per ogni inode che volete recuperare, dovete impostare lo usage count
  a uno, e il deletion time a zero: si fa con il comando mi (modify
  inode) di debugfs.  Un esempio di output, modificando l'inode 148003
  di cui sopra:



       debugfs:  mi <148003>
                                  Mode    [0100644]
                               User ID    [503]
                              Group ID    [100]
                                  Size    [6065]
                         Creation time    [833201524]
                     Modification time    [832708049]
                           Access time    [826012887]
                         Deletion time    [833201524] 0
                            Link count    [0] 1
                           Block count    [12]
                            File flags    [0x0]
                             Reserved1    [0]
                              File acl    [0]
                         Directory acl    [0]
                      Fragment address    [0]
                       Fragment number    [0]
                         Fragment size    [0]
                       Direct Block #0    [594810]
                       Direct Block #1    [594811]
                       Direct Block #2    [594814]
                       Direct Block #3    [594815]
                       Direct Block #4    [594816]
                       Direct Block #5    [594817]
                       Direct Block #6    [0]
                       Direct Block #7    [0]
                       Direct Block #8    [0]
                       Direct Block #9    [0]
                      Direct Block #10    [0]
                      Direct Block #11    [0]
                        Indirect Block    [0]
                 Double Indirect Block    [0]
                 Triple Indirect Block    [0]


  Cio imposto il deletion time a 0 e il link count a 1 e premete
  semplicemente invio per ciascuno degli altri campi.  garantito,  un
  po' noioso se avete molti file da recuperare, ma ci potete riuscire...
  altrimenti potete usare un `sistema operativo' grafico con un
  simpatico `Cestino'.


  Tra l'altro: l'output di mi si riferisce ad un campo `Creation time'
  nell'inode.  una bugia! O comunque, trae in inganno. Il fatto  che
  su un sistema UNIX non si pu dire quando  stato creato un file.  Il
  membro st_ctime di una struct stat si riferisce al `tempo di modifica
  dell'inode', cio il momento in cui sia stato modificato un dettaglio
  dell'inode.  Qui finisce la lezione di oggi.

  Notate che le versioni di debugfs pi recenti di quella che sto usando
  probabilmente non includono alcuni dei campi che ho elencato sopra (in
  particolare, Reserved1 e (alcuni) campi di fragment).

  Una volta modificati gli inode, potete uscire da debugfs e dire:



       # e2fsck -f /dev/hda5




  L'idea  che ciascuno dei file cancellati  stato recuperato, ma
  nessuno di essi compare in un elenco di directory. Il programma e2fsck
  pu accorgersene, ed aggiungere una voce di directory per ciascun file
  nella directory /lost+found del filesystem (quindi se la partizione 
  normalmente montata su /usr, i file ora saranno in /usr/lost+found
  quando la rimonterete).  Tutto quello che rimane da fare  scoprire il
  nome di ciascun file dai suoi countenuti, e rimetterlo al suo posto
  corretto nell'albero delle directory.

  Quando usate e2fsck avrete un output molto interessante, ed alcune
  domande su quale danno riparare. Rispondete `s' a tutto quello che si
  riferisce alle `summary information' o agli inode che avete
  modificato.  Tutto il resto viene lasciato a voi, anche se di solito 
  una buona idea rispondere affermativamente a tutte le domande. Quando
  e2fsck ha finito potete rimontare il filesystem.

  In realt c' un'alternativa a fare lasciare i file in /lost+found ad
  e2fsck: potete usare debugfs per creare un link all'inode nel
  filesystem.  Usate il comando link di debugfs dopo aver modificato
  l'inode:



       debugfs:  link <148003> pippo.txt




  Questo crea un file pippo.txt in quella che debugfs crede sia la
  directory corrente: pippo.txt sar il vostro file. Dovrete ancora
  usare e2fsck per aggiustare le informazioni di indice e i conteggi dei
  blocchi e cos via.


  12.  Diventer pi facile in futuro?

  S. In effetti, credo che sia gi cos. Mentre sto scrivendo, i kernel
  stabili (nella serie 2.0.x) azzerano i blocchi indiretti, cosa che non
  accade a quelli di sviluppo 2.1.x, n ai 2.2.x.  Il kernel 2.2.1 
  stato rilasciato da poco (siamo nel Febbraio 1999), ed i rivenditori
  di Linux probabilmente inizieranno a produrre distribuzioni di Linux
  che contengano i kernel 2.2.x tra un mese o due.  Una volta superata
  questa limitazione nel kernel di produzione, molte delle mie obiezioni
  alla tecnica della modifica manuale degli inode spariranno; allo
  stesso tempo sar anche possibile usare il comando dump nel debugfs
  sui file lunghi.


  13.  Ci sono strumenti per automatizzare questo processo?

  In realt esistono. Sfortunatamente credo che soffrano dello stesso
  problema della tecnica della modifica manuale degli inode: i blocchi
  indiretti non possono essere recuperati. Comunque, data la probabilit
  che questo non sar a breve un problema, conviene dare un'occhiata a
  questi programmi gi adesso.

  Io ho scritto un programma che si chiama e2recover, essenzialmente un
  wrapper Perl su fsgrab. Fa un ragionevole sforzo per gestire i blocchi
  indiretti azzerati, e sembra funzionare sufficientemente bene finch
  il filesystem non  frammentato. Imposta anche correttamente i
  permessi (e quando possibile l'owner) dei file recuperati, e si
  assicura che essi abbiano la lunghezza corretta.

  Originariamente ho scritto e2recover per il prossimo aggiornamento
  globale di questo howto; sfortunatamente ci significa che molta della
  documentazione utile per e2recover uscir con quel documento.
  Potrebbe essere per utile gi da adesso, quindi  disponibile sul mio
  sito web <http://pobox.com/~aaronc/tech/e2-undel/> e presto su
  Metalab.

  Scott D. Heavner  l'autore di lde, il Linux Disk Editor.  Pu essere
  usato sia come editor binario di dischi, sia come l'equivalente di
  debugfs per i filesystem ext2 e minix, ed anche per gli xia (anche se
  il supporto xia non  pi disponibile nei kernel 2.1.x e 2.2.x). Ha
  alcune caratteristiche per aiutare nel recupero dei file dalla
  cancellazione, sia per cercare un file nell'elenco dei blocchi sia per
  fare delle ricerche nel contenuto del disco. Ha anche della buona
  documentazione sui concetti base dei filesystem, oltre ad un documento
  su come usarlo per recuperare i file. La versione 2.4 di lde 
  disponibile su Metalab
  <http://metalab.unc.edu/pub/Linux/system/filesystems/lde-2.4.tar.gz> e
  sui suoi mirror, o sul sito web dell'autore
  <http://www.geocities.com/CapeCanaveral/Lab/7731/lde.html>.


  Un'altra possibilit  il GNU Midnight Commander, mc. Si tratta di uno
  strumento di gestione di file full-screen, basato per quanto ne so su
  un certo programma MS-DOS comunemente noto come `NC'. mc supporta il
  mouse sulla console di Linux e sugli xterm, e fornisce un filesystem
  virtuale che permette trucchi come fare cd dentro un file tar. Tra i
  suoi filesystem virtuali ce n' uno per il recupero di file su ext2.
  Sembra molto comodo, anche se ammetto che non l'ho mai usato
  personalmente -- preferisco i vecchi comandi di shell.

  Per usare la sua caratteristica di recupero dei file, si deve
  configurare il programma con l'opzione --with-ext2undel; avrete anche
  bisogno delle librerie di sviluppo e dei file include presenti nel
  pacchetto e2fsprog. La versione fornita nella Debian GNU/Linux
  <http://www.debian.org/>  gi configurata cos; la stessa cosa pu
  essere per le altre distribuzioni.  Una volta compilato il programma,
  potete dire di fare cd undel:dev/hda5/, ed avere un `elenco di
  directory' dei file cancellati. Come nella maggior parte degli
  strumenti di recupero dei file, non gestisce bene i blocchi indiretti
  azzerati, e tipicamente recupera solo i primi 12k dei file lunghi.

  Trovate l'ultima versione sul sito fto di Midnight Commander
  <ftp://ftp.nuclecu.unam.mx/Midnight/devel/>.

  L'ultima versione non di sviluppo  probabilmente la 4.0; come con il
  kernel stesso, le versioni di sviluppo non sono raccomandate ai non
  sviluppatori. La lista degli oltre 70 siti da cui scaricarlo 
  disponibile sul sito web di Midnight Commander 4
  <http://mc.blackdown.org/mc4/>, o provate il sito ftp ufficiale
  <ftp://ftp.nuclecu.unam.mx/linux/local/mc-4.0.tar.gz> (che se la
  memoria non mi inganna  piuttosto lento).



  14.  Colophon

  Intendo produrre aggiornamenti regolari a questo documento finch avr
  tempo per farlo e cose interessanti da dire. Ci significa che sono
  avido di conoscere i commenti dei lettori. Posso essere pi chiaro?
  Riuscite a pensare a qualcosa che possa rendere le cose pi facili?
  Esiste qualche nuovo strumento che lo fa in automatico?

  In ogni caso, se avete qualcosa da dire, su questo documento o su
  fsgrab o e2recover, mandatemi due righe a aaronc@pobox.com.


  15.  Crediti e ringraziamenti


       `If I have seen farther than others, it is because I was
       standing on the shoulders of giants.' (Isaac Newton)


  Questo mini-Howto deriva originariamente da un articolo su
  comp.os.linux.misc di Robin Glover swrglovr@met.rdg.ac.uk.  Vorrei
  ringraziare Robin per avermi gentilmente permesso di rielaborare le
  sue idee in questo mini-Howto. Vorrei inoltre sfruttare questa
  opportunit per ringraziare ancora tutti quelli che mi hanno scritto
  sull'Howto. Vale la pena di sforzarsi, se si ricevono commenti
  positivi.

  Alcuni riferimenti bibliografici:


    Frisch, leen (1995), Essential System Administration, seconda
     edizione, O'Reilly and Associates, Inc., ISBN: 1-56592-127-5.

    Garfinkel, Simson, Daniel Weise and Steven Strassmann (1994), The
     Unix-Haters Handbook, IDG Books, ISBN: 1-56884-203-1.  Gran parte
     di questo libro sono solo le lamentele adolescenziali di persone
     che pensano che il loro sistema operativo era molto meglio di Unix,
     e molto del resto non si applica se avete uno spazio utente ben
     scritto come quello GNU... ma c' del buono, ad esempio vale la
     pena leggere la discussione su come  facile cancellare i file
     sotto Unix.

    Glover, Robin (31 Jan 1996), HOW-TO : undelete linux files
     (ext2fs/debugfs),  Articolo di usenet su comp.os.linux.misc.

    Peek, Jerry, Tim O'Reilly, Mike Loukides et al (1993), UNIX Power
     Tools, O'Reilly and Associates, Inc./Random House, Inc., ISBN:
     0-679-79073-X, seconda edizione 1998.





  16.  Legalese

  Tutti i marchi registrati sono propriet dei rispettivi possessori.
  In particolare:


    MS-DOS e Windows sono marchi registrati della Microsoft
     <http://www.microsoft.com/>.

    UNIX  un marchio registrato di the Open Group
     <http://www.opengroup.org/>.

  

    Linux  un marchio registrato di Linus Torvalds negli USA ed in
     alcune altre nazioni.

  Questo documento  Copyright  1997, 1999 Aaron Crane
  aaronc@pobox.com.  Pu essere liberamente distribuito nella sua
  interezza, inclusa tutta questa nota di copyright, ma non pu essere
  modificato senza permesso dell'autore o del coordinatore degli HOWTO
  del Linux Documentation Project. Viene data una dispensa per la copia
  di piccole porzioni per recensioni o come citazione; in queste
  circostanze possono essere riprodotte delle sezioni in presenza di una
  citazione appropriata, anche senza questa nota di copyright.

  L'autore si augura ma non richiede che chi intenda vendere copie di
  questo documento, sia su un mezzo leggibile su computer o da persone,
  informi lui o il coordinatore dei Linux HOWTO delle sue intenzioni.

  Il coordinatore dei Linux HOWTO  al momento Tim Bynum linux-
  howto@sunsite.unc.edu.

  Traduzione di Eugenia Franzoni, eugenia@pluto.linux.it.
































  XFree86 Font Deuglification mini HOWTO
  Doug Holland, meldroc@frii.com
  v1.0, 23 novembre 1999

  Come correggere i brutti ed illeggibili font di X Window.  Traduzione
  a cura di Giovanni Bortolozzo, borto (at) pluto.linux.it.

  1.  Introduzione

  Uno dei problemi pi noiosi con i quali ho avuto a che fare sono gli
  abissabili font predefiniti e impostazioni dei font di X (sto parlando
  specificatamente a proposito di XFree86, altre versioni di X
  potrebbero essere migliori).  Molti programmi usano font predefiniti
  di dimensione (width) fissa mentre sarebbero pi appropriati font a
  dimensione variabile.  Altri programmi usano font che sono
  ridicolmente piccoli e illeggibili.  I font distribuiti con XFree86
  sono a mala pena adeguati per al loro compito: c' un font Courier
  quasi decente, ma i font Times e Helvetica sono semplici bitmap che
  pixelizzano (ndt: ovvero se ingranditi i loro contorni non sono pi
  continui, ma tutti a gradini) quando sono scalati.  Yuck!

  Questo HOWTO prova a mostrare come aggiustare le diverse impostazioni
  dei font, installare nuovi font e come fare altre cose che migliorano
  considerevolmente l'aspetto e la leggibilit dei font nel desktop di X
  Window.  Ci  fatto sistemando il FontPath nel file XF86Config,
  aggiungendo opzioni alla riga di comando dell'X server in startx o in
  xdm, aggiungendo nuovi font, installando il server per i font True
  Type xfstt e usando una funzionalit della versione 1.1 del K Desktop
  Environment che automagicamente sistemer le impostazioni dei font
  in molte applicazioni, incluse quelle non KDE, impostando i loro font
  e colori come quelli delle impostazioni di stile del KDE.

  Commenti, correzioni, aggiunte e critiche sono sempre benvenuti.  Mi
  si pu raggiungere a meldroc@frii.com.

  1.1.  Registro delle modifiche


    0.1:  21 feb. 1999: prima versione.

    0.11: 27 feb. 1999: aggiunte le informazioni di copyright per
     proteggermi il culo.

    0.12: 10 giu. 1999: aggiunta una Supplica d'Aiuto.

    0.20: 14 set. 1999: aggiunta una sezione su xfs per i Redhattiani.
     Molte grazie a Hal Burgiss per il suo contributo.

    1.0: 23 nov. 1999: conversione del documento in SGML, per
     includerlo nel Linux Documentation Project.  Rimossa la Supplica
     d'Aiuto.

  2.  Il file XF86Config

  Il primo posto dove guardare quando si cerca di curare i problemi dei
  font  il file XF86Config (/usr/X11/lib/X11/XF86Config o
  /etc/X11/XF86Config sono le posizioni usuali).  Se non lo si  gi
  indovinato, la parte pi importante di questo file relativamente ai
  font  il FontPath.  Prima di andare a modificarlo, sarebbe una buona
  idea dare una controllata alle altre parti della propria
  configurazione di X.  Impostazioni errate del monitor possono causare
  ben pi di un mal di testa a confronto di font brutti, quindi ci si
  assicuri che la velocit di refresh sia abbastanza alta rispetto alle
  possibilit del monitor (85 Hz  l'ottimo, 75 Hz vanno bene, 60 Hz 
  uno schifo).

  2.1.  Impostare il FontPath

  Si usi il proprio editor di testi favorito e si modifichi XF86Config.
  All'inizio del file, ci dovrebbe essere qualcosa di simile a questo:


  FontPath        "/usr/X11R6/lib/X11/fonts/misc/"
  FontPath        "/usr/X11R6/lib/X11/fonts/Type1/"
  FontPath        "/usr/X11R6/lib/X11/fonts/Speedo/"
  FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/"
  FontPath        "/usr/X11R6/lib/X11/fonts/100dpi/"



  Il FontPath dice a X dove trovare i font che usa per visualizzare il
  testo nella schermata.  L'ordine  importante -- quando un
  applicazione X chiede la visualizzazione di un testo, il server X
  solitamente ha un po' di libert nella scelta del font da usare.  Il
  server scorre i FontPath e prende il primo font che corrisponde ai
  criteri del client X e poi effettua la visualizzazione.

  Il FontPath predefinito tipicamente mette i font a 75dpi (Ndt: dpi =
  dot per inch ovvero punti per pollice) prima dei font a 100dpi.
  Se si ha un monitor ad alta risoluzione, questo implica font veramente
  piccoli.  Il primo trucco che si user sar di scambiare le righe
  FontPath dei font a 75dpi e 100dpi.


  FontPath        "/usr/X11R6/lib/X11/fonts/misc/"
  FontPath        "/usr/X11R6/lib/X11/fonts/Type1/"
  FontPath        "/usr/X11R6/lib/X11/fonts/Speedo/"
  FontPath        "/usr/X11R6/lib/X11/fonts/100dpi/"
  FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/"



  Poi, si specifichi che si preferisce utilizzare font bitmap non
  scalabili.  Se si  mai usato Netscape o qualsiasi altro programma che
  mostra i titoli utilizzando grossi font, si sar notato che questi
  font sono pixelizzati.  Questa cosa  molto brutta e deve essere
  corretta.  Quindi si aggiunga :unscaled alla fine delle righe dei font
  misc, 100dpi e 75dpi. Si possono pure usare sia i font non scalabili
  che scalabili, basta mettere per prime le righe FontPath dei font non
  scalabili per dire a X che si preferiscono, ove possibile, questi
  ultimi.


  FontPath        "/usr/X11R6/lib/X11/fonts/misc:unscaled"
  FontPath        "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
  FontPath        "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
  FontPath        "/usr/X11R6/lib/X11/fonts/Type1"
  FontPath        "/usr/X11R6/lib/X11/fonts/Speedo"
  FontPath        "/usr/X11R6/lib/X11/fonts/misc"
  FontPath        "/usr/X11R6/lib/X11/fonts/100dpi"
  FontPath        "/usr/X11R6/lib/X11/fonts/75dpi"



  Dopo aver fatto queste modifiche, si riavvii X.  Il proprio desktop
  non sembra gi meglio?

  3.  Opzioni in riga di comando del server X

  La prossima cosa che si deve sistemare sono le opzioni in riga di
  comando per il server X.  Si vorr usare l'opzione -dpi che specifica
  la risoluzione dello schermo in punti per pollice.  Poich un sacco di
  sistemi odierni utilizzano schermi ad alta risoluzione,  facile che
  funzionino a 100 dpi.

  Se si avvia X dal prompt dei comandi della console, si digiti


  startx -dpi 100.



  Se si usa xdm per i login in grafica, si dovr modificare il proprio
  file /usr/X11/lib/X11/xdm/Xservers, che contiene la riga di comando
  per il server X.  Il mio ha questa riga


  :0 local /usr/X11R6/bin/X -dpi 100 -gamma 1.6



  Maggiori informazioni nelle pagine man di X e Xserver.

  4.  Font TrueType (Una delle poche cose per le quali Windows  buono)

  Poich i ragazzi a Redmond  ci tengono molto all'aspetto del loro
  software (diversamente dal funzionamento interno ;) hanno costruito i
  supporto per i font TrueType dentro a Windows.  Windows 95 e
  praticamente qualsiasi altra variante di Windows viene distribuito con
  i font Arial, Times New Roman e Courier New, che sono praticamente
  equivalenti agli Helvetica, Times e Courier.  I font TrueType sono
  scalabili, quindi sono belli anche se usati a grandi dimensioni, e
  sono pure ben riducibili, quindi vanno benissimo anche piccoli.  Molte
  applicazioni Windows sono distribuite con dozzine di font TrueType.
  Quindi si aspetti ancora un po' prima di mettere nel micronde il
  proprio CD di Windows, prima si prendano i font.

  4.1.  xfstt

  Sfortunatamente, XFree86 non ha il supporto nativo per i font TrueType
  e quindi bisogna aggiungerlo per proprio conto.  Il modo pi semplice
  per farlo  con xfstt, un server per i font TrueType libero.

  4.1.1.  Installazione

  xfstt  molto facile da installare.  Per prima cosa si scarichi
  l'archivio tar dal web.  La versione pi aggiornata  a
  http://metalab.unc.edu/pub/Linux/X11/fonts/Xfstt-0.9.10.tgz

  Una volta scaricato, lo si decomprima.


  tar -zxvf Xfstt-0.9.10.tgz



  Poi lo si compili e lo si installi.  Si legga il file INSTALL per le
  istruzioni veloci, ma l'installazione non  una cosa cervellotica.
  Tutto quel che si deve fare  make; make install.  Una volta fatto, si
  copino i font TrueType in /usr/ttfonts e si  pronti a partire.  Si
  lanci xfstt digitando:


  xfstt --sync        # aggiorna la base di dati dei font di xfstt.
  xfstt &             # avvia xfstt in background.



  Poi si lanci


  xset +fp unix/:7100 # informa X su xfstt



  o si aggiunga


  FontPath "unix/:7100"



  al proprio XF86Config per informare X sul servizio font.

  4.1.2.  Sistemare la dimensione predefinita dei font

  Se i propri font TrueType appaiono molto piccoli, i seguenti comandi
  possono aiutare.

  Si aggiunga l'opzione -dpi alla riga di comando del proprio X server
  (si veda la sezione 3 per sapere come farlo).

  Si usi l'opzione --res per dire a xfstt di incrementare la risoluzione
  predefinita.  Si usi la seguente riga di comando:


  xfstt --res 120



  4.2.  xfs

  xfs  un font server alternativo che ora viene incluso nelle
  distribuzioni basate su RedHat.  xfs si basa sulla libreria FreeType
  Font e fornisce funzionalit simili a xfstt.   in grado di servire
  sia i font TrueType che Type 1, nonch tutti i vari font standard di
  X.

  4.2.1.  Installazione

  Il primo passo  l'aggiunta dei font TrueType al proprio sistema
  Linux.  Si faccia su root e si crei una directory per conservare i
  font:


  mkdir /usr/share/fonts/ttfonts



  Poi si aggiungano i font a questa directory, o copiandoli dal proprio
  sistema Windows:


  cp /mnt/win/path_to_fonts/*ttf  /usr/share/fonts/ttfonts/



  oppure scaricando quelli disponibili direttamente dalla Microsoft
  <http://www.microsoft.com/typography/fontpack/default.htm>.

  Questi font sono contenuti in un archivio zip autoscompattante.  Si
  pu comunque installare anche sotto Linux:


  unzip <TTFONT.EXE>



  Si noti che i nomi di file dei font devono essere in minuscolo.  Un
  modo semplice e veloce per convertirli  di copiarli in un filesystem
  DOS (FAT16) e poi ricopiarli dove prima.  DOS non conserva le
  maiuscole.  Se si vuole un metodo linuxiano, si vada nella directory
  contenente i font e si digiti quanto segue:


  ls *TTF | while read f
  do
   [ -f "$f" ] && mv -f "$f" "`echo \"$f\" | tr A-Z a-z`"
  done



  Mentre si scrive ciascuna riga si otterr il prompt > dopo aver
  premuto Invio al termine di ciascuna delle suddette righe.  Si noti
  la punteggiatura: quegli apici rovesciati sono importanti!  Una
  volta installati correttamente i font TrueType, come root:


  ttmkfdir -o fonts.scale
  mkfontdir



  Si riusino questi comandi ogni volta che cambia il contenuto della
  directory dei font.  Dopodich, si modifichi il file di configurazione
  di xfs, /etc/X11/fs/config, per aggiungere i font TrueType alla lista
  di font del server:


  catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
              /usr/X11R6/lib/X11/fonts/100dpi:unscaled,
              /usr/X11R6/lib/X11/fonts/75dpi:unscaled,
              /usr/X11R6/lib/X11/fonts/misc,
              /usr/X11R6/lib/X11/fonts/Type1,
              /usr/X11R6/lib/X11/fonts/Speedo,
              /usr/share/fonts/default/Type1,
              /usr/share/fonts/ttfonts,
              /usr/X11R6/lib/X11/fonts/100dpi,
              /usr/X11R6/lib/X11/fonts/75dpi



  In alternativa, per aggiungere font si pu usare il comando
  `chkfontpath --add <font>'.  Mentre lo si sta facendo si potrebbe
  cambiare anche la dimensione in punto predefinita.


  default-point-size = 140



  Questo la imposta a 14 punti, invece dei 12 predefiniti.  Alcune
  applicazioni X la usano, altre no.  Poi ci si assicuri che la riga
  FontPath in /etc/X11/XF86Config sia:


  FontPath "unix/:-1"



  Si noti che anche unix/:7100 potrebbe fare questo trucchetto, ma non
  funziona nella versione iniziale.  Si commenti con # qualsiasi altro
  FontPath gi esistente in quanto non se ne ha pi bisogno.  Il
  pacchetto xfs stesso dovrebbe essere gi stato installato assieme con
  gli altri pacchetti di XFree.  Per assicurarsi che giri come uno dei
  servizi predefiniti si usi 'ntsysv' oppure


  chkconfig --add xfs



  Ora xfs verr lanciato ogni volta che si riavvia.  Poi si riavvii X
  per forzare i nuovi FontPath e per far si che si accorgai della
  presenza di xfs che si pu lanciare/rilanciare con:


  /etc/rc.d/init.d/xfs restart



  Ora si dovrebbe avere un font server funzionante.  Si pu controllare
  quali sono i font serviti con:


  xlsfonts | less



  o controllarli utilizzando xfontsel o, ancora meglio, gfontsel!

  5.  KDE

  KDE  una delle cose migliori accadute a Linux e X da tanto tempo.
  Fornisce un'interfaccia utente uniforme che  un grosso passo avanti
  nel fornire un Linux accessibile a qualsiasi utente medio.  Maggiori
  informazioni su KDE possono essere trovate a http://www.kde.org/.
  Perch ne sto tessendo le lodi qui?  Perch KDE 1.1 ha una nuova
  funzionalit che far s che i font e i colori nei programmi, inclusi
  quelli non KDE, siano consistenti con lo stile corrente di KDE.

  5.1.  Applicare i font e i colori di KDE ad applicazioni non KDE

   molto facile.  Semplicemente si lanci il KDE Control Center, si vada
  sotto Desktop e da l in Style.  L ci dovrebbe essere un pulsante
  etichettato Apply fonts and colors to non-KDE apps.  Lo si abiliti,
  si clicchi su OK e tutto  fatto!  La prossima volta che si lancer
  applicazioni X, queste useranno gli stessi colori e font che usano le
  applicazioni KDE.  Ad alcuni questa possibilit piace pi che ad
  altri, e se non piace la si pu sempre disabilitare.

  6.  Aggiustare i font in applicazioni specifiche

  6.1.  Netscape Navigator/Communicator

  Netscape Communicator  particolarmente suscettibile a problemi di
  font.  Se si stanno usando i FontPath predefiniti, i propri font
  saranno molto piccoli e veramente brutti.  La prima cosa da fare  di
  correggere i FontPath del proprio XF86Config (si veda la sezione 2).
  L'uso di font a 100dpi migliora immensamente la leggibilit.  Si
  potrebbe anche controllare le impostazioni dei font andando in
  Edit/Preferences e da l sotto Appearance/Fonts.  Per venir a capo
  della pixelizzazione dei font bitmap, si disabiliti l'opzione Allow
  Scaling nella selezione dei font.


  Se si ha xfstt o xfs, Netscape  perfettamente in grado si usarli
  tranquillamente.  In Edit/Preferences, si possono specificare font
  TrueType sia per i font a larghezza fissa che variabile, ma comunque
  Netscape non si ricorder dopo averlo chiuso la dimensione che si era
  scelta.  Se non si  usata l'opzione -dpi quando si  lanciato l'X
  server o l'opzione --res di xfstt, si otteranno font veramente
  piccoli.  Una volta applicate queste due cose, i font TrueType
  funzionano alla grande.

  6.2.  WordPerfect

  Presto in arrivo.

  6.3.  StarOffice

  Presto in arrivo.

  7.  Crediti

  Creato da Doug Holland

  Email: meldroc@frii.com

  WWW: http://www.frii.com/~meldroc/

  Contributi aggiuntivi di:

    Hal Burgiss

  Ringraziamenti a:

    I ragazzi di comp.os.linux.x che mi hanno dato una mano a venire a
     capo di tutto.

    La comunit Linux in generale che ha reso possibile tutto questo.

    Microsoft e Apple: per aver fornito i font che adornano il mio
     desktop.


  8.  Copyright (in inglese)

  Copyright  1999 by Doug Holland.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors.  Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies.
  Commercial redistribution is allowed and encouraged; however, the
  author would like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator for more information.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would very much like to be notified of any
  plans to redistribute the HOWTOs, this one in particular!  Web page
  authors are free to link to this HOWTO without restriction, though the
  author would appreciate an email informing him of this, just so he can
  boost his ego by knowing who else reads and links to this document.

  Many of the terms mentioned in this document are trade names. Unless
  otherwise stated, all trademarks are property of their respective
  owners.































































  Fax Printer Server HOWTO per sistemi Linux
  Erez Strauss, <erez@newplaces.com>
  v1.0, 8 novembre 1997

  Nessuna garanzia. I commenti sono benvenuti.  Questo documento
  descrive in dettaglio uno dei modi pi semplici per impostare un
  server fax sul vostro sistema Linux. Il fax sar disponibile agli
  utenti del sistema locale e agli utenti della rete.  Traduzione a cura
  di Mauro Franceschini, <mauro.franceschini@inwind.it>.

  1.  Introduzione

  Per far funzionare una stampante/fax su una macchina linux, dovete
  dotarvi del software necessario e di un modem che supporti
  l'invio/ricezione dei fax.

  Il software di stampa utilizzer il software del fax come filtro di
  stampa. efax cercher il numero di fax all'interno del numero del
  lavoro di stampa e spedir il fax. Il software efax  stato scritto da
  Ed Casas <edc@cce.com>

  La parte restante di questo documento  scritta come una sezione di
  Domande e Risposte.

  2.  Domande e Risposte

  2.1.  Cos' un server di stampa fax?

  Un server di stampa fax  un insieme di alcuni programmi: efax ed il
  server di stampa, in modo tale che l'invio di un fax dal computer sia
  semplice come stampare un pagina sulla stampante.

  2.2.  Come impostarlo?

  Impostare efax come un server di stampa fax  una procedura che
  comporta alcuni problemi. Poich vi ho lavorato per un po' di tempo,
  ho deciso di mettere assieme la mia esperienza in questo piccolo mini-
  HOWTO, per il quale sono bene accetti commenti a <erez@newplaces.com>.
  Descriver qui i problemi e le soluzioni, assieme a tutte le
  istruzioni per attuarle in pochi passi.


  2.2.1.  Il software efax

  Siate sicuri di avere installato il pacchetto efax.

  In un sistema basato sui pacchetti RPM utilizzate il comando 'rpm -qv
  efax'.

  Potete ottenere i sorgenti di efax in formato tar.gz presso il sito:
  ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/efax08a.tar.gz
  oppure la versione RPM compilata:
  ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/efax-0.8a-3.i386.rpm

  2.2.2.  La voce del file printcap

  Nella documentazione di efax manca un : alla fine della voce nel file
  printcap.

  Soluzione: Aggiungere la seguente voce nel file /etc/printcap:

  fax:\
         :lp=/dev/null:\
         :sd=/var/spool/fax:\
         :if=/usr/bin/faxlpr:

  2.2.3.  Il comando fax

  Utilizzate un link fisico e non uno simbolico al comando fax.

  Eseguite il comando:

      ln /usr/bin/fax /usr/bin/faxlpr



  2.2.4.  Il file /usr/bin/fax

  Modificate il file /usr/bin/fax perch aderisca alle vostre
  preferenze: scegliete la giusta Classe del Fax del vostro modem:

      CLASS=2.0



  Impostate il campo FROM="il vostro numero di telefono con prefisso
  internazionale"

      NAME="Il vostro nome"



  Aggiungete la linea per la conversione del numero di telefono
  internazionale a quello locale; in Israele, ad esempio, dovreste
  usare:

      TELCVT='sed -e s/+972/0/ -e s/+/00/'     # Israele



  Vi  inoltre un problema nella linea 586 del file, nella quale dovete
  cambiare il testo cfile=... con le seguenti due linee:

      cfile=`/usr/bin/tail -1 lock`
      cfile=`cat $cfile`



  mentre nelle linee 586-7 non dovrebbe esserci un segno '-'; le linee
  sono:

      0) echo "$l" | mail -s "fax to $num succeeded" $user@$host ;;
      *) echo "$l" | mail -s "fax to $num failed   " $user@$host ;;



  2.2.5.  La directory /var/spool/fax

  Create la directory /var/spool/fax

      mkdir /var/spool/fax
      chmod 777 /var/spool/fax




  2.2.6.  Il file di lock

  Il file di lock (/var/spool/fax/lock) viene creato con i permessi
  sbagliati, utilizzate il seguente comando per impostarlo
  correttamente:

      touch /var/spool/fax/lock ; chmod 644 /var/spool/fax/lock



  2.2.7.  Il file speciale /dev/modem

  Il programma efax si aspetta un vero dispositivo in /dev/modem e non
  funzioner con un collegamento simbolico, cos dovete creare un file
  di dispositivo con gli stessi numeri primario e secondario del
  dispositivo /dev/cua? a cui  collegato il modem. Il file dovrebbe
  avere i permessi impostati a rw-rw-rw- per permettere a qualunque
  utente di utilizzare il software del fax.

      ls -lL /dev/modem
      rm /dev/modem
      mknod /dev/modem c Pr Se
      chmod 666 /dev/modem


  Pr vale 5 ed Se vale 64 per cua0, 65 per cua1 e cos via. Ad esempio
  (per cua1):

      mknod /dev/modem c 5 65



  2.2.8.  La directory /var/lock.

  Cambiate i permessi alla directory /var/lock

      chmod 1777 /var/lock



  2.2.9.  Come lo devo impostare, per usarlo come server?

  Dovreste utilizzare la stampante fax utilizzando l'opzione -P e quella
  -J con il numero di fax. Usate uno dei seguenti comandi lpr:

      lpr -Pfax -J <Numero di Fax> [nomi dei file]
      qualunque comando | lpr -Pfax -J <Numero di Fax>



  2.2.10.  Dove devo specificare il numero di Fax a cui inviare?

  Dopo l'opzione -J.

  2.2.11.  Come posso fare per utilizzarlo da altre macchine Unix nella
  rete?

  Aggiungete le seguenti linee al file /etc/printcap sui computer che lo
  utilizzeranno, create la directory di spool, e cos via...

  fax:\
          :sd=/var/spool/fax:\
          :mx#0:\
          :sh:\
          :rm=host.domain:\
          :rp=fax:


  Aggiungete quindi il nome del computer client nel file /etc/hosts.lpd
  sulla macchina server fax. Utilizzatela come descritto in precedenza.


  Note

  La stringa d'intestazione che efax aggiunge alle pagine di fax non 
  influenzata dal nome dell'utente che invia il fax.

  2.2.12.  Utenti di Caldera e LPRng

  Il software di gestione di stampa LPRng utilizza un metodo differente
  per il controllo dei file.

  Un grazie a Luca Montecchiani <m.luca@usa.net>, che ha scoperto il
  problema e la soluzione. Qui vi  un aggiornamento al file
  /usr/bin/fax. Le linee seguenti sostituiscono le due linee 586,587

  # Modified to work also with the LPRng package
  # Luca Montecchiani (08/11/97 m.luca@usa.net)
  if [ !-z "$CONTROL_FILE"
      then
          cfile=`cat tail -1 lock`
          cfile=`cat $cfile`
      else
          cfile=$CONTROL_FILE
  fi



  2.3.  Ultima versione, contattare l'autore.

  L'ultima versione di questo documento pu essere recuperata in rete ai
  seguenti URL

  http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.sgml
  http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.html
  http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.txt
  http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.info

  Potete contattarmi:

  Erez Strauss

  erez@newplaces.com

  http://www.newplaces.com/linux

  http://www.newplaces.com

  Telefono: +972 52 739737

  Fax: +972 9 954 3034

















  Firewall Piercing mini-HOWTO
  Franois-Ren Rideau, fare@tunes.org
  v0.3b, 27 novembre 1998

  Direttive per l'utilizzo del protocollo ppp usando telnet per operare
  in modo trasparente attraverso un firewall Internet.  Traduzione a
  cura di Stefano di Sandro <stedis@radiolink.net>, ultima revisione 24
  Gennaio 2000.

  1.  Varie



  1.1.  LIBERATORIA

  LEGGI QUESTA SEZIONE:  IMPORTANTE !!!

  Qui di seguito declino tutte le responsabilit per queste
  informazioni.  Qualunque sia il modo in cui il loro utilizzo possa
  ritorcersi contro di voi, non  colpa mia.  Se non siete in grado di
  comprendere i rischi cui vi accingete a sottoporvi facendo ci che qui
   scritto, non fatelo.  Se userete queste informazioni e ci
  permetter a balordi teppisti di penetrare le difese dei computer
  della vostra azienda compromettendo voi, il vostro impiego e i
  miliardi della vostra azienda, beh sono problemi vostri.  Non venite a
  piangere da me.

  1.2.  Copyright

  Copyright  1998 by Franois-Ren Rideau.

  This document is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at
  your option) any later version.

  Questo documento  da considerarsi software libero; ne  possibile la
  redistribuzione e/o la modifica nei termini della GNU General Public
  License cos come pubblicata dalla Free Software Foundation, sia nella
  versione 2 che (a vostra scelta) in una qualunque versione successiva.


  1.3.  Ringraziamenti

  Sebbene abbia riscritto quasi tutto tranne la liberatoria, sono in
  debito con Barak Pearlmutter  <mailto:bap@cs.unm.edu> per il suo Term-
  Firewall mini-HOWTO: penso che vi fosse la necessit di un mini-HOWTO
  sul "firewall piercing", e nonostante qualche difetto, il suo mini-
  HOWTO si  rivelato un modello e un incoraggiamento.


  2.  Introduzione

  2.1.  Premessa

  Dal momento che amministratori di sistema e semplici utenti hanno
  diversi diritti e doveri, pu accadere che un utente si trovi protetto
  dietro un firewall, che  in grado di attraversare, ma in maniera
  complicata.  Questo mini-HOWTO spiega un metodo generale e versatile
  per utilizzare gli strumenti di Internet, senza che apparentemente si
  debba attraversare alcun firewall, facendo uso di un emulatore IP
  all'interno di una sessione telnet.

  Tutto  liberamente inspirato al Term-Firewall mini_HOWTO di Barak
  Pearlmutter  <mailto:bap@cs.unm.edu>, che si affidava sia all'antico e
  abbandonato Term (a suo tempo un grande programma), che ai dettagli di
  una implementazione di telnet non proprio standard, fatta di codice
  obsoleto e non portabile.


  2.2.  Problemi di sicurezza

  Se l'amministratore del vostro sistema ha predisposto un firewall, 
  naturale che possa aver avuto le sue buone ragioni, cos come 
  probabile che voi abbiate sottoscritto l'accordo di non aggirarlo.
  D'altro canto, l'eventuale possibilit di utilizzare telnet verso
  l'esterno (che  un requisito affinch quanto ci accingiamo a spiegare
  funzioni) significa che vi  stato concesso di connettervi con sistemi
  remoti e, se potete effettuare il login su alcuni di questi sistemi,
  significa che qualcuno ve l'ha a sua volta permesso.

  Quindi l'utilizzo dei varchi "legali" in un firewall diventa
  estremamente conveniente per permettere a qualunque programma remoto
  di comunicare con la nostra macchina utilizzando i normali protocolli.
  Nel caso opposto avremmo bisogno di programmi speciali o modificati (e
  ricompilati) facenti uso di proxy dai compiti particolari, le cui
  configurazioni possono essere opera di amministratori sprovveduti o
  incompetenti.  Oppure potremmo dover installare un certo numero di
  convertitori per poter accedere a ciascuno dei normali servizi (come
  la posta elettronica) attraverso le strade consentite dal firewall
  (come il web).

  Inoltre l'uso di un emulatore IP che operi a livello utente come
  SLiRP, pu essere anche utile per prevenire attacchi dall'esterno in
  grado di perforare il firewall nuovamente in senso inverso, a meno che
  non siate voi a permetterlo esplicitamente (oppure che l'attacco sia
  condotto in modo abile e astuto o che l'intruso abbia acquisito i
  privilegi di root o, infine, che sia in grado di spiarvi sull'host
  remoto).

  Sia come sia, il metodo qui presente dovrebbe essere relativamente
  sicuro.  Tutto dipende dalle particolari circostanze nelle quali vi
  troverete quando lo metterete all'opera e io non posso darvi alcuna
  garanzia.  Molti sono gli aspetti intrinsecamente insicuri in una
  qualunque connessione internet e non dipendono esclusivamente dall'uso
  di questo metodo; non assumete a priori di essere al sicuro a meno che
  non ne abbiate delle valide ragioni e cercate di criptare sempre
  l'informazione.

  Per concludere: non usate questo metodologia se non sapete cosa state
  facendo.   meglio che rileggiate la liberatoria.




  2.3.  Altri requisiti

  Si d per scontato che sappiate cosa state facendo; che sappiate
  impostare una connessione di rete; che possediate un account di shell
  su entrambi i lati del firewall; che possiate usare telnet (o ssh, o
  equivalenti) da un account all'altro; che possiate far girare un
  emulatore IP su entrambi i lati della connessione; che possediate
  programmi in grado di lavorare su un'emulazione IP.  Si noti come
  qualunque programma possa usare la connnessione, in questo caso  il
  pppd l'emulatore locale che colloquia con il kernel di Linux; altri
  emulatori, come Term, necessitano di essere ricompilati e collegati a
  speciali librerie.

  Parlando di emulatori IP, il demone pppd si trova in qualunque buona
  distribuzione di Linux o sito ftp; e lo stesso vale per SLiRP.  Se
  l'account sulla shell remota vi consente di eseguire programmi
  soltanto a livello utente, SliRP  la soluzione da adottare per la
  connessione.


  2.4.  Scaricare il software

  La maggior parte del software descritto sar disponibile nella vostra
  distribuzione o enventualmente tra i contrib; tranne gli ultimi due
  tutti si possono trovare come pacchetti rpm.  Nel caso vogliate
  recuperare l'ultima versione dei sorgenti o degli eseguibili (dopo
  tutto non  detto che su entrambi i lati della connessione si trovi un
  sistema Linux) utilizzate gli indirizzi elencati di seguito:

    SLiRP si trova a <http://blitzen.canberra.edu.au/slirp> oppure
     <ftp://www.ibc.wustl.edu/pub/slirp_bin/>.

    zsh la trovate presso <http://www.peak.org/zsh/>.

    ppp  scaricabile da <ftp://cs.anu.edu.au/pub/software/ppp/>.

    fwprc e cotty sono invece a
     <http://www.tunes.org/~fare/files/fwprc/>.


  3.  Capire il problema

  Capire un problema  la prima met del percorso che porta alla sua
  soluzione.


  3.1.  Dare un nome alle cose

  Se volete che questo medoto funzioni,  obbligatorio che abbiate
  un'idea di come funziona, cos, nell'eventualit che qualcosa vada
  storto, saprete dove andare a mettere le mani.

  D'ora in avanti avranno aggettivo "locale" sia la macchina che inizia
  la connessione, sia i programmi e i file che si trovano in essa;
  dunque, tutto quello che si trova dall'altra parte sar "remoto".


  3.2.  Il problema

  Il nostro fine  collegare l'ingresso e l'uscita di un emulatore IP
  locale rispettivamente all'uscita e all'ingresso di un emulatore IP
  remoto.  I canali di comunicazione con i quali gli emulatori
  interagiscono sono device diretti (come nel caso usuale del pppd) o il
  "tty corrente".  Questo ovviamente non si verifica con una sessione
  telnet.  In quest'ultimo caso la situazione  complicata perch,
  quando lanciate l'emulatore locale da riga comando, il "tty corrente"
   collegato all'utente non a una sessione remota. Inoltre quando
  apriamo una nuova sessione, sia essa locale o remota, su un nuovo
  terminale, dobbiamo sincronizzare l'avvio e la connessione di entrambi
  gli emulatori IP altrimenti la spazzatura prodotta in uscita da una
  delle due sessioni rappresenter un comando per l'altra sessione con
  il risultato di produrre altra spazzatura.


  3.3.  Difficolt aggiuntive

  Per ottenenere la massima facilit d'uso, l'emulatore IP locale deve
  fornire un IP al kernel per le operazioni di rete, per tale ragione si
  usa il pppd.  Comunque, il pppd  limitato abbastanza da accettare
  dati attraverso una sola voce all'interno della directory /dev o
  attraverso il terminale corrente (tty); una coppia di pipe sarebbe
  stata molto pi naturale.  Tutto funziona correttamente per quanto
  riguarda il pppd remoto, visto che quest'ultimo pu usare il tty della
  sessione telnet; ma per il pppd locale  un problema perch non  in
  grado di lanciare la sessione telnet per effettuare la connessione e
  quindi dovremo provvedere ad aggiungergli attorno uno strato di
  software.

  Telnet si comporta quasi corretamente con una coppia di pipe, solo che
  si ostiner sempre a effettuare il controllo di I/O (ioctl) sul tty
  corrente, con il quale interagisce; usare telnet senza un tty  causa
  inoltre di corse critiche che faranno fallire la connessione su
  macchine "lente" (fwrpc 0.1 funziona perfettamente su un P/MMX 233,
  una volta su sei su un 6x86-P200+ e mai su un 486DX2/66).

  [Nota: se trovo quel bischero (probabilmente qualcuno del MULTICS,
  sebbene debba esserci stata gente UNIX stupida abbastanza da copiare
  l'idea) che ha inventato il principio dei dispositivi "tty" in base al
  quale si legge e si scrive dallo "stesso" pseudo-file, invece di poter
  disporre di una pulita coppia di pipe, lo strangolo!]


  4.  La soluzione



  4.1.  Il principio

  Il programma per il firewall-piercing, fwprc, far uso di un "proxy
  tty", cotty, che apre due dispositivi pseudo-tty, invoca alcuni
  comandi su ciascuno di questi slave e, senza pi smettere, copia ogni
  carattere che viene battuto, nel tty che serve da ingresso per l'altro
  comando.  Un comando sar la connessione telnet al sito remoto e
  l'altro sar il locale demone pppd.  Il pppd pu quindi aprire e
  controllare la sessione telnet con il pi classico degli script di
  chat.


  4.2.  fwprc

  Ho realizzato un script auto-documentato per "forare" i firewall,
  fwprc, disponibile al mio sito
  <http://www.tunes.org/~fare/files/fwprc/>, insieme a cotty (che 
  necessario nelle versioni fwprc 0.2 e successive).  Al momento di
  scrivere queste parole, le versioni pi recenti sono fwprc 0.3a e
  cotty 0.3a.

  Il nome "fwprc"  volutamente illeggibile e impronunciabile, al fine
  di confondere il paranoico amministratore di sistema che probabilmente
   la causa del firewall che vi rompe le scatole (naturalmente, possono
  esistere anche firewall opportuni, e talvolta indispensabili; la
  sicurezza  tutta una questione di corretta configurazione).  Se
  dovete pronunciare questa parola ad alta voce, fate in modo di dirla
  nel peggior modo possibile.

  SFIDA! SFIDA! Mandatemi un file audio in formato .au con la
  registrazione digitale della vostra pronuncia di "fwprc".  La peggiore
  vincer un aggiornamento gratuito e il suo nome nella pagina della
  versione 1.0 di fwprc.

  Ho verificato il programma con svariate impostazioni configurandolo
  attraverso dei file di risorse.  Ma naturalmente, per la legge di
  Murphy, a voi non funzioner.  Ritenetevi liberi di contribuire ai
  miglioramenti che potranno rendere la vita pi facile alle persone che
  faranno le cose dopo di voi.




  4.3.  .fwprcrc

  fwprc pu essere personalizato attraverso il file .fwprcrc che deve
  essere disponibile su entrambi i lati della connessione.   anche
  possibile predisporre configurazioni diverse da usare alternativamente
  (per esempio, io lo faccio), ed  lasciato come esercizio al lettore.

  Per cominciare, copiate la sezione appropriata di fwprc (la penultima)
  nel file .fwprcrc all'interno della vostra home directory.  Poi
  rimpiazzate i valori delle variabili con quelli adatti alla vostra
  configurazione.  Infine copiate il tutto anche sull'altro host e
  provate.

  Il metodo di base prevede di usare il pppd localmente e slirp sulla
  macchina remota.  Per modificarlo potreste ridefinire la appropriata
  funzione all'interno del vostro .fwprcrc con una linea del tipo:

       remote_IP_emu () { remote_pppd }


  Ricordate che SLiRP  pi sicuro di pppd, ed  pi facile accedervi,
  dal momento che non richiede privilegi di root sull'host remoto.
  Un'altra caratteristica di sicurezza consiste nel fatto che scarter
  tutti i pacchetti che non provengono direttamente dalla macchina a
  esso connessa (tale caratteristica diventa un difetto se tentate di
  sfruttare questo metodo per realizzare il routing di una sottorete
  usando il mascheramento dell'IP).  Le funzionalit di base di SLiRP
  sono piuttosto affidabili anche se l'ho trovato privo delle aggiunte
  promesse (quali la controllabilit a tempo di esecuzione), ma, dal
  momento che  un software libero, siete anche voi liberi di mettere le
  mani nel codice sorgente in modo da implementare tutte le funzionalit
  di cui possiate avere bisogno.




  5.  Piercing al contrario



  5.1.  Giustificazioni

  Talvolta, solo da un lato del firewall  possibile lanciare una
  sessione telnet; ci nonostante alcune forme di comunicazione restano
  possibili (tipicamante usando la posta elettronica).  Forare il
  firewall  ancora possibile, escogitando un qualunque modo di
  innescare una connessione telnet dalla parte "giusta" del firewall
  verso l'altra.

  fwprc include il codice per scatenare tali connessioni a partire da un
  messaggio di posta elettronica autenticato con PGP; tutto ci di cui
  abbisognate  aggiungere fwprc come filtro per procmail(1) ai messaggi
  che fanno uso di tale protocollo, (le istruzioni sono incluse in
  fwprc).  Notate comunque che per lanciare pppd con i privilegi
  appropriati dovrete creare da soli un "suid wrapper" per diventare
  root.  Istruzioni incluse in fwprc.

  La sola autenticazione di questa sorta di "scintilla" non significa
  aver predisposto una connessione sicura.  Diventa davvero opportuno,
  in questo caso, fare uso di una Secure Shell (anche sopra telnet) per
  rendere sicuro il collegamento.  E infine osservate attentamente ci
  che accade tra l'innesco della connessione telnet e la ssh che ha
  luogo su tale connessione.  Qualunque contributo in questa direzione 
  ben accetto.


  5.2.  Ricevere il messaggio di innesco

  Se un firewall vi circonda, il vostro messaggio potrebbe trovarsi in
  un server centrale che non consente il fitraggio con procmail o alcuna
  connessione telnet. Niente paura! Potete usare fetchmail(1) da
  eseguire in modalit "demone" per recuperare e trasferire la posta al
  vostro sistema linux che opera da clien, e/o aggiungere un job al
  servizio cron per automatizzare il recupero della posta ogni 1-5
  minuti.  Fetchmail inoltrer la posta verso l'indirizzo locale usando
  sendmail(8) che, a sua volta, deve essere configurato per usare
  procmail(1) per il recapito.  Se eseguite fetchmail(1) in background
  come demone, questi impedir qualunque altra esecuzione di fetchmail:
  come nel caso dell'apertura di un fwprc.  Naturalmente potreste far
  girare fetchmail come falso utente.  Recuperi troppo frequenti possono
  non essere opportuni nei confronti del server, cos come recuperi
  troppo sporadici possono obbligare a pesanti attese affinch il
  messaggio venga letto e la connessione inversa stabilita.  Io uso una
  frequenza di recupero di due minuti.


  6.  Note Finali



  6.1.  Altre impostazioni

  Ci sono altri tipi di firewall, come quelli che non consentono le
  connessioni telnet.  Dal momento che un continuo flusso di pacchetti
  attraversa un firewall e trasporta informazioni fuori e dentro di
  esso,  sempre possibile perforarlo; al solo prezzo di "usare il
  punteruolo pi in alto o pi in basso".

  In un caso estremamente semplice, potreste semplicemente lanciare ssh
  su un pty, e lavorare con il pppd nel tty slave.  cotty 0.3a dovrebbe
  essere in grado di farlo, ma ancora nessuno ha modificato fwprc per
  effettuare il login.  Potrebbe essere un buon esercizio per stanotte.
  Potreste voler applicare quanto visto con un firewall ostile, solo per
  costrure una ``VPN'' sicura (Virtual Private Network).  Leggete VPN
  mini-HOWTO a proposito di questo.

  Se dovete passare attraverso una linea a 7-bit, probabilmente userete
  SLIP al posto di PPP. Io non ho mai provato: le linee sono quasi tutte
  8 bit al giorno d'oggi, ma non dovrebbe essere complicato.

  Ora, se l'unica strada attraverso il firewall  un proxy WWW (di
  solito  il minimo per una rete connessa a internet) potreste scrivere
  un demone che registra il traffico di dati in ingresso e in uscita, e
  farlo girare durante le connessione HTTP, ottenendo una sorta di
  telnet-su-HTTP con il quale eseguire fwrpc.  Potrebbe rivelarsi una
  soluzione lenta e non molto efficace ma sufficiente da permettervi di
  usare fetchmail(1), suck(1) e altri programmi non interattivi.

  Se volete prestazioni maggiori o se le uniche cose che passano
  inalterate attraverso il firewall sono cosucce di basso livello
  (richieste DNS, pacchetti ICMP, ecc.) allora il gioco si fa duro dal
  momento che dovrete mettere le mani sul primitivo stack IP usando (per
  esempio) i Fox project's packet-protocol functors.  Otterrete una
  forma diretta di IP-su-HTTP, IP-su-DNS, IP-su-ICMP, o affini. Questi
  ultimi non richiedono soltanto un complesso protocollo, ma anche
  un'interfaccia al nucleo del sistema operativo ed entrambi sono
  costosi da implementare.

  Ancora una cosa, se usate un demone HTTP per il Firewall-piercing, non
  dimenticate di fare in modo che serva pagine fasulle, in questo modo
  ingannerete i sospettosi amministratori dei firewall "avversari".

  6.2.  Manutenzione dell'HOWTO

  Ho sentito il bisogno di scriverlo, ma non ho tutto il tempo da
  dedicargli, ecco perch questo HOWTO  cos scarno.  E cos rester, a
  meno che non riceva abbastanza commenti che mi permettano di
  individuare le sezioni che devono essere migliorate.  I commenti sono
  benvenuti. L'aiuto  benvenuto.  Il mantenimento del mini-HOWTO 
  benvenuto.

  A ogni modo, le sezioni che avete letto hanno messo in evidenza
  diversi problemi le soluzioni dei quali richiedono solo che qualcuno
  (voi?) vi dedichi un po' di tempo (oppure denaro, pagando altri che lo
  facciano in sua vece), sedendosi e scrivendole: nulla di davvero
  complicato, sebbene i dettagli possano apparire pesanti e difficili.

  Non esitate a contribuire con altri problemi e possibilmente con
  altrettante soluzioni, a questo mini-HOWTO.


  6.3.  Copia extra della IMPORTANTE LIBERATORIA --- CREDETEMI!!!


       Di seguito declino ogni responsabilit per questa metodolo
       gia.  Il fatto che possa ritorcersi contro di voi in un
       qualunque modo  un problema che non mi riguarda.  Se non
       riuscite a comprendere i rischi inerenti il suo utilizzo,
       non utilizzatelo.  Se, usando questa metodologia, permet
       terete a balordi vandali di penetrare nei computer della
       vostra azienda compromettendo voi, il vostro lavoro e i mil
       iardi della stessa, non venite a piangere da me.




































  Hard Disk Upgrade Mini HOWTO
  di Yves Bellefeuille (yan@storm.ca) e Konrad Hinsen (hin
  sen@cnrs-orleans.fr)
  Versione 2.1, 20 ottobre 1999

  Come copiare un sistema Linux da un disco fisso ad un altro.

  1.  Introduzione

  Questo documento spiega come trasferire o migrare, un intero sistema
  Linux, incluso LILO, da un disco fisso ad un altro.

  Nella spiegazione che segue "/dev/hda" (primo disco fisso IDE) indica
  il "vecchio" disco e "/dev/hdb" (secondo disco fisso IDE) indica il
  "nuovo" disco.

  Ci si riferisce alle partizioni specifiche nel "vecchio" disco come
  "/dev/hda1", "/dev/hda2", e cos via. Ci si riferisce alle partizioni
  specifiche del "nuovo" disco come "/dev/hdb1", "/dev/hdb2", e cos
  via.

  Le spiegazioni in questo documento sono basate su Red Hat 6.0. Sono
  state verificate anche con Debian 2.1 Slackware 3.5 e SuSE 6.2;
  indichiamo alcune differenze da notare se state usando quelle
  distribuzioni.


  Se i comandi non funzionano a dovere nel vostro sistema, per favore
  fateci sapere, dicendoci che distribuzione state usando.


  2.  Installare entrambi i dischi nel vostro sistema

  I sistemi moderni possono accettare quattro dispositivi "EIDE" nel
  controller del disco fisso, cos non ci dovrebbero essere problemi per
  installare entrambi i dischi nel vostro sistema allo stesso tempo,
  anche se avete gi altri dispositivi EIDE. I dischi fissi e le unit
  CD-ROM sono tipicamente dispositivi EIDE.  Le unit floppy e nastro
  sono di solito connesse al controller dell'unit floppy anzich al
  controller del disco rigido.

  Gli adattatori SCSI sono ancora pi flessibili e possono accettare
  sette dispositivi. Se siete abbastanza fortunati (e ricchi) da avere
  un adattatore SCSI, probabilmente gi lo sapete, e probabilmente
  sapete quale dei vostri dispositivi sono SCSI! Per maggiori
  informazioni consultate lo SCSI How-To.

  Anche i pi vecchi sistemi possono accettare due dispositivi nel
  controller del disco rigido, cos potete ancora installare entrambi i
  dischi fissi allo stesso tempo. Comunque, se avete gi un altro
  dispositivo installato in aggiunta al disco fisso (per esempio, se
  avete sia un disco fisso che un'unit CD-ROM), dovrete rimuovere
  l'altro dispositivo per essere in grado di installare il vecchio e il
  nuovo disco fisso contemporaneamente.

  Dovete configurare i dischi come "master" o "slave" installando i
  jumper in modo appropriato. Troverete spesso informazioni sulla
  configurazione sui dischi stessi, altrimenti consultate i manuali o i
  fabbricanti dei dischi.

  Dovete anche informare il BIOS della presenza dei dischi e della loro
  "geometria". Solitamente per eseguire questa operazione si accede al
  setup del BIOS premendo un tasto durante l'avvio del sistema. Ecco
  cosa fare per alcuni  BIOS comuni:


  Acer notebooks: tastoF2 durante il Power-On Self-Test (POST)

  American Megatrends (AMI): Tasto Canc durante il Power-On Self-Test

  Award: Del o Ctrl-Alt-Esc

  Compaq: Tasto F10 dopo che il quadrato appare nell'angolo in alto a
  destra dello schermo durante l'avvio.

  Dell: Ctrl-Alt-Invio

  DTK: Tasto Esc durante il Power-On Self-Test

  IBM Aptiva 535: F1 mentre il quadrato con le linee curve viene
  visualizzato nell'angolo in alto a destra durante l'accensione
  [Funziona anche con altri modelli Aptiva?]

  IBM PS/2: Ctrl-Alt-Canc, poi Ctrl-Alt-Ins quando il cursore 
  nell'angolo in alto a destra.

  Mr. BIOS: Ctrl-Alt-S durante il Power-On Self-Test

  Packard Bell: Per alcuni modelli, tasto F1 o F2 durante il Power-On
  Self-Test

  Phoenix: Ctrl-Alt-Esc, or Ctrl-Alt-S, o Ctrl-Alt-Enter

  (Siamo interessati a ricevere informazioni su altri BIOS per
  aggiungerli a questa lista.)

  Riavviate il sistema e loggatevi come root. Se usate il comando "su"
  per diventare superutente, usate "su -", con il trattino.


  3.  Smontare le partizioni non-Linux e le unit di rete

  Ad alcune persone piace montare partizioni da altri sistemi operativi
  (DOS, Windows, OS/2, ecc.)  cos le possono usare sotto Linux. Queste
  partizioni devono essere create e copiate sotto il loro sistema
  operativo, e dovreste smontarle prima di copiare la vostra partizione
  Linux. Per esempio, se avete una partizione DOS montata in /dos,
  dovete smontarla con questo comando:


       umount /dos




  Notate che il comando  "umount", senza la prima lettera "n" nella
  parola "unmount".

  Dovreste anche smontare le unit di rete.


  4.  Partizionare il nuovo disco

  Usate questo comando per partizionare il nuovo disco:



       fdisk /dev/hdb




  I dispositivi EIDE sono identificati come hda, hdb, hdc e hdd nella
  directory /dev. Le partizioni in questi dischi possono andare da 1 a
  16 e sono anch'esse nella directory /dev. Per esempio, /dev/hda4 si
  riferisce alla quarta partizione del primo disco fisso (hda - primo
  disco fisso della catena EIDE).

  I dispositivi SCSI sono identificati con sda, sdb, sdc, sdd, sde, sdf
  ed sdg nella directory /dev. Similmente, le partizioni in questi
  dischi possono variare da 1 a 16 e sono anch'esse nella directory
  /dev. Per esempio, /dev/sda3 si riferisce alla partizione 3 nel disco
  SCSI a (primo disco SCSI).

  Per le partizioni Linux con il file system ext2, usate l'ID di sistema
  83. Per partizioni di swap, usate l'ID di sistema 82.

  Per maggiori informazioni sul partizionamento, consultate
  l'Installation How-To e il Partitioning Mini How-To.

  Se il vostro nuovo disco ha pi di 1024 cilindri, consultate il Large
  Disk Mini How-To. In breve, dovreste installare tutti i file necessari
  per avviare Linux entro i primi 1024 cilindri.  Un modo di farlo  di
  creare una piccola partizione solo per la directory /boot all'inizio
  del disco.  (Solo per Slackware: Il kernel  in  /vmlinuz anzich in
  /boot/vmlinuz, perci dovreste mettere sia la directory / che la
  directory /boot in questa partizione)

  Le partizioni per altri sistemi dovrebbero essere create con il loro
  fdisk o con loro comando equivalente anzich con l'fdisk di Linux.


  5.  Formattare il nuovo disco

  Usate il seguente comando per formattare le partizioni Linux usando
  ext2fs sul nuovo disco:


       mkfs.ext2 /dev/hdb1




  Per controllare il disco per settori non validi (difetti fisici),
  aggiungete l'opzione -c giusto prima di "/dev/hdb1".

  Se il nuovo disco avr pi di una partizione Linux, formattate le
  altre partizioni con "mkfs.ext2 /dev/hdb2", "mkfs.ext2 /dev/hdb3", e
  cos via. Aggiungete l'opzione  -c se desiderate.

  (Nota: Con distribuzioni pi vecchie, il comando "mkfs -t ext2 -c
  /dev/hdb1" non controlla i settori non validi n in Red Hat, n in
  Debian e neppure nella Slackware, contrariamente a quanto stabiliva la
  pagina di manuale. Questo ora  stato corretto.)

  Per formattare una partizione di swap, usate questo comando:


       mkswap /dev/hdb1




  Ancora, potete aggiungere l'opzione -c prima di "/dev/hdb1" per con
  trollare i settori non validi.



  6.  Montare il nuovo disco

  Create una directory dove monterete il nuovo disco, per esempio /new-
  disk, e montatelo:


       mkdir /new-disk
       mount -t ext2 /dev/hdb1 /new-disk




  Se il nuovo disco avr pi di una partizione Linux, montatele tutte
  sotto /new-disk con la stessa organizzazione che avranno pi tardi.

  Esempio: Il nuovo disco avr quattro partizioni Linux, come segue:


       /dev/hdb1:              /
       /dev/hdb2:              /home
       /dev/hdb3:              /var
       /dev/hdb4:              /var/spool




  Montate le quattro partizioni sotto /new-disk come segue:


       /dev/hdb1:              /new-disk
       /dev/hdb2:              /new-disk/home
       /dev/hdb3:              /new-disk/var
       /dev/hdb4:              /new-disk/var/spool




  Dovete creare i mount-point per ogni "livello" prima di montare le
  partizioni a quel livello. Esempio:



       mkdir /new-disk                     [Primo livello]
       mount -t ext2 /dev/hdb1 /new-disk

       mkdir /new-disk/home                [Secondo livello]
       mount -t ext2 /dev/hdb2 /new-disk/home

       mkdir /new-disk/var                 [Ancora secondo livello]
       mount -t ext2 /dev/hdb3 /new-disk/var

       mkdir /new-disk/var/spool           [Terzo livello]
       mount -t ext2 /dev/hdb4 /new-disk/var/spool




  Se avete creato un mount point in /new-disk/tmp, avrete bisogno di
  corregere i permessi della directory per lasciare l'accesso a tutti
  gli utenti:



       chmod 1777 /new-disk/tmp


  7.  Copiare i file del vecchio disco in quello nuovo

  Dovete andare in modalit single-user prima di iniziare a copiare il
  disco, in modo da chiudere i demoni di sistema e preservare lo stato
  dei log, e per impedire agli utenti di loggarsi:



       /sbin/telinit 1




  Copiando il disco fisso, dovete copiare tutte le directory e i file,
  inclusi i link simbolici.

  In ogni caso *non* dovete copiare la directory  /new-disk, poich
  questo copierebbe il nuovo disco stesso!

  Inoltre, volete creare la directory /proc nel nuovo disco, ma non
  volete copiare il suo contenuto: /proc  un file system "virtuale" e
  non ha nessun file vero, ma piuttosto contiene informazioni sui
  processi che vengono eseguiti nel sistema.

  Ecco quattro modi differenti per copiare il vecchio disco in quello
  nuovo. Questo pu prendervi un po' di tempo, specialmente se avete un
  disco grande o poca memoria. Potete aspettarvi di essere in grado di
  copiare 10Mb al minuto, e possibilmente molto di pi.

  Potete seguire il progresso della copia usando il comando "df" da un
  altro terminale. Provate "watch df" o "watch ls -l /new-disk" per
  vedere un rapporto aggiornato ogni due secondi; premete Ctrl-C per
  terminare la visualizzazione. Siate consapevoli che eseguire il
  programma "watch" stesso rallenter la copia.


  1. cp -ax / /new-disk
     Questo  il metodo pi semplice, ma funzioner solo se il vostro
     sistema Linux originale  in un disco con una sola partizione.

     L'opzione -a conserva il file system il pi possibile. L'opzione -x
     limita cp a un solo file system; questo  necessario per evitare di
     copiare le directory /proc e /new-disk.

     (Solo per SuSE: Solo con questo metodo, dovete anche creare la
     directori /dev/pts nel nuovo disco. Usate il comando "mkdir /new-
     disk/dev/pts.)

     (Nota: Usando l'opzione -x, le versioni recenti di cp creeranno le
     directory /new-disk/new-disk e /new-disk/proc, sebbene le directory
     siano vuote. Se queste directory verranno create, dovreste
     cancellare /new-disk/new-disk ma tenere /new-disk/proc.)


  2. cd / && echo cp -a `/bin/ls -1Ab | egrep -v"^new-disk$|^proc$"`
     /new-disk | sh

     (sempre in una sola linea)

     Questo va alla directory root e poi copia tutti i file e le
     directory eccetto /new-disk e /proc in /new-disk. Notate che la
     prima opzione dopo ls  il numero 1, non la lettera L.

     Questo comando dovrebbe funzionare in ogni circostanza.


  3. (cd / && tar cpf - . --exclude new-disk --exclude proc) | (cd /new-
     disk && tar xpf -)

     (sempre in una sola linea)

     Questo comando si sposta sulla directory root, comprime tutto
     eccetto /new-disk e /proc, passa a /new-disk e decomprime tutto.
     Notate che non ci devono essere slash prima o dopo i nomi delle
     directory nell'opzione --exclude.

     (Nota: L'opzione -l non funziona qui, poich tar ricreer ancora le
     directory /new-disk e /proc anche se non copia il loro contenuto.
     Inoltre, l'opzione -l di tar non ha lo stesso comportamento
     dell'opzione -x di vecchie versioni di cp.)

     Questo metodo  parecchio pi lento degli altri.


  4. cp -a /bin /boot /dev /etc /home /lib /lost+found /mnt /root /sbin
     /tmp /usr /var /new-disk

     (sempre in una sola linea)

     L'ultima directory, /new-disk,  la destinazione per il comando cp.
     Tutte le altre directory sono la sorgente. Perci, stiamo copiando
     tutte le directory elencate in  /new-disk.

     Con questo metodo elencate semplicemente da soli le directory che
     volete copiare. Qui listiamo tutte le mie directory tranne /new-
     disk e /proc. Se non potete usare gli altri metodi per qualsiasi
     motivo, potete sempre usare questo comando per specificare
     manualmente le directory che volete copiare.

     Solo con questo metodo, se ci sono dei file nella directory root
     stessa, avete bisogno di un altro comando per copiarli. In
     particolare, questo  richiesto con Debian e Slackware, poich
     queste distribuzioni mettono file nella directory root:


       cp -dp /* /.* /new-disk




  Dopo aver usato uno di questi quattro metodi, dovete anche creare la
  directory /proc nel nuovo disco, se non esiste gi:


       mkdir /new-disk/proc




  A questo punto, potete verificare la struttura dei file nel nuovo
  disco, se desiderate:


       umount /new-disk
       fsck.ext2 -f /dev/hdb1
       mount -t ext2 /dev/hdb1 /new-disk




  Se il disco ha pi di una partizione, dovete smontarle da quella pi
  interna in s, prima di eseguire fsck.ext2: nell'esempio menzionato
  sopra, dovreste prima smontare le partizioni al terzo livello, poi
  quelle del secondo e infine quella del primo.

  Potete anche confrontare i due dischi, per assicurarvi che i file sono
  stati copiati a dovere:



       find / -path /proc -prune -o -path /new-disk -prune -o -xtype f \\
                       -exec cmp {} /new-disk{} \;




  (scrivete tutto questo in una sola linea)


  (Solo per Slackware: l'installazione basica di Slackware (solo la
  serie "A") non include il comando "cmp", perci non potrete eseguire
  questo comando se avete installato solo i file di base. Il comando
  "cmp"  nella serie "AP1".)

  Questo confronter solo i file regolari, non file "speciali" a
  caratteri o a blocci (nella directory /dev), socket, ecc., poich il
  comando "cmp" non funziona bene con questi. Sarebbe benvenuto
  qualsiasi suggerimento su come verificare questi file "speciali".


  8.  Modificare /new-disk/etc/fstab  in modo appropriato

  Se il vostro nuovo disco non ha le stesse partizioni o la stessa
  organizzazione del vecchio disco, modificate il file /new-
  disk/etc/fstab nel nuovo disco in modo appropriato.

  Assicuratevi che le partizioni del disco (prima colonna) corrispondono
  all'organizzazione che avrete con il nuovo disco, una volta che il
  vecchio disco  stato rimosso, e che state solo montando una
  partizione in "/" come  mostrato nella seconda colonna.

  Per maggiori informazioni sul formato del file /etc/fstab, consultate
  la "Linux System Administrator's Guide", sezione 4, sotto "Mounting
  and unmounting".

  Per partizioni di swap, usate una linea simile a questa:



       /dev/hda1       swap    swap    defaults        0       0





  9.  Preparare LILO per avviare il nuovo disco

  (Grazie a Rick Masters per averci aiutato con questa sezione.)

  Stiamo supponendo che LILO sia installato nel Master Boot Record del
  disco fisso (MBR); questa sembra essere la configurazione pi comune.
  Volete installare LILO in quello che  al presente il secondo disco
  fisso ma che diventer il primo disco fisso.

  Editate il file /new-disk/etc/lilo.conf come segue:



  disk=/dev/hdb bios=0x80         # Dice a LILO di trattare il secondo
                                  # disco come se fosse il primo
                                  # (BIOS ID 0x80).
  boot=/dev/hdb                   # Installa LILO sul secondo disco.
  map=/new-disk/boot/map          # Posizione del "map file".
  install=/new-disk/boot/boot.b   # File da copiare nel settore di avvio
                                  # del disco.
  prompt                          # Dice a LILO di mostrare "LILO boot:"
  timeout=50                      # Avvia il sistema di default dopo 5
                                  # secondi. (Il valore  in
                                  # decimi di secondo.)
  image=/new-disk/boot/vmlinuz    # Posizione del kernel. Il vero nome pu
                                  # includere un numero di versione, per
                                  # esempio "vmlinuz-2.0.35".
  label=linux                     # Etichetta per il sistema Linux
  root=/dev/hda1                  # Posizione della partizione di root nel
                                  # nuovo disco fisso. Modificarlo come
                                  # appropriato al vostro sistema. Notate
                                  # che dovete usare il nome della posizione
                                  # futura, una volta che il vecchio disco
                                  #  stato rimosso.
  read-only                       # Monta subito la partizione in sola
                                  # lettura, per eseguire fsck.




  (Solo per Slackware: Usate "image=/new-disk/vmlinuz".)

  Se state usando un disco fisso SCSI, potete aver bisogno di aggiungere
  una linea con "initrd". Consultate il vostro file esistente
  /etc/lilo.conf.

  Installate LILO sul nuovo disco:


       /sbin/lilo -C /new-disk/etc/lilo.conf




  L'opzione -C dice a LILO quale file di configurazione usare.


  10.  Fare un dischetto di avvio (facoltativo)

  Se desiderate, potete fare un dischetto di avvio, nel caso che vi
  imbattiate in qualche problema cercando di avviare il nuovo sistema.

  Inserite un dischetto vuoto, formattatelo, create un file system su di
  esso e montatelo:


       fdformat /dev/fd0H1440
       mkfs.ext2 /dev/fd0
       mount -t ext2 /dev/fd0 /mnt




  (Solo per Debian: Con Debian 2.x, usate "/dev/fd0u1440" invece di
  "/dev/fd0H1440". Con Debian 1.x, usate "/dev/fd0h1440", con una "h"
  minuscola.

  (Solo per Debian: Con Debian 2.x, usate "superformat" invece di
  "fdformat". Potete ignorare l'errore "mformat: command not found". Con
  Debian 1.x, se non avete il comando "fdformat", potete ometterlo se il
  floppy  gi formattato.  In questo caso, dovreste controllare il
  dischetto per settori non validi aggiungendo l'opzione "-c" dopo il
  comando "mkfs.ext2".)

  (Solo per Slackware: Usate "/dev/fd0u1440" invece di "/dev/fd0H1440".
  Con versioni pi vecchie, provate "/dev/fd0h1440", con una "h"
  minuscola.)


  (Solo per SuSE: Usate "/dev/fd0u1440" invece di "/dev/fd0H1440".)


  Copiate tutti i file in /boot nel dischetto:


       cp -dp /boot/* /mnt




  (Solo per Red Hat: Se la directory /boot contiene sia i file di
  vmlinux che di vmlinuz (notate la differenza poich l'ultimo 
  migliore), avete bisogno di copiare solo i file di vmlinuz nel
  dischetto di avvio. Solo gli stessi file di vmlinux, solo che sono
  compressi per salvare spazio.)

  (Solo per Slackware: Copiate il file /vmlinuz nel dischetto di avvio;
  usate il comando "cp /vmlinuz /mnt".)

  Create un nuovo file /mnt/lilo.conf come segue:


       boot=/dev/fd0            # Installa LILO nel disco floppy.
       map=/mnt/map             # Posizione del "map file".
       install=/mnt/boot.b      # File da copiare nel settore di avvio del
                                # dischetto
       prompt                   # Dice a LILO di mostrare "LILO boot:"
       timeout=50               # Avvia il sistema di default dopo 5 secondi.
                                # Il valore  in decimi di secondo.)
       image=/mnt/vmlinuz       # Posizione del kernel nel floppy. Il vero nome
                                # pu includere un numero di versione,
                                # esempio "vmlinuz-2.0.35".
       label=linux              # Etichetta per il sistema Linux
       root=/dev/hda1           # Posizione della partizione di root nel nuovo
                                # disco fisso. Modificarlo come appropriato
                                # al vostro sistema. Notate che dovete usare
                                # il nome della posizione futura, una volta
                                # che il vecchio disco  stato rimosso.
       read-only                # Monta subito la partizione in sola lettura,
                                # per eseguire fsck.




  Installate LILO nel dischetto di avvio:


       /sbin/lilo -C /mnt/lilo.conf




  L'opzione -C dice a LILO che file di configurazione usare.


  Smontate il dischetto:


       umount /mnt





  11.  Rimuovere il vecchio disco

  Spegnete il sistema e rimuovete il vecchio disco. Ricordate di
  modificare i jumper del disco e le informazioni del BIOS per
  riflettere i cambiamenti


  12.  Riavviare il sistema, modificare il file di configurazione di
  LILO

  Riavviate il sistema. Se avete problemi, potete usare il dischetto di
  avvio che avete appena fatto. Per farlo, potreste aver bisogno di
  modificare la sequenza di avvio del BIOS a "A:, C:". Dovreste
  modificare il file /etc/lilo.conf in caso vogliate pi tardi eseguire
  LILO di nuovo. Ecco un esempio di come il file potrebbe essere:


       boot=/dev/hda             # Installa LILO nel primo disco.
       map=/boot/map             # Posizione del "map file".
       install=/boot/boot.b      # File da copiare nel settore di avvio
                                 # del disco.
       prompt                    # Dice a LILO di mostrare "LILO boot:"
       timeout=50                # Avvia il sistema di default dopo 5
                                 # secondi. (Il valore  in decimi di
                                 # secondo.)
       image=/boot/vmlinuz       # Posizione del kernel. Il vero nome pu
                                 # includere un numero di versione, per esempio
                                 # "vmlinuz-2.0.35".
       label=linux               # Etichetta per il sistema Linux
       root=/dev/hda1            # Posizione della partizione di root nel nuovo
                                 # disco fisso. Modificarla come appropriato
                                 # al vostro sistema. Notate che dovete
                                 # usare il nome della posizione futura, una volta
                                 # che il vecchio disco  stato rimosso.
       read-only                 # Monta subito la partizione in sola lettura,
                                 # per eseguire fsck.




  (Solo per Slackware: Usate "image=/vmlinuz".)



  13.  Riconoscimenti

  Grazie a Scott Christensen, Frank Damgaard, Alexandre Fornieles, David
  Fullerton, Jerry Gaines, Chris Gillespie, Nicola Girardi, Per Gunnar
  Hansoe, Richard Hawes, Ralph Heimueller, Gerald Hermant, Andy
  Heynderickx, Paul Koning, Hannu Liljemark, Claes Maansson, Rick
  Masters, Jason Priebe, Josh Rabinowitz, Douglas Rhodes, Valentijn
  Sessink, Kragen Sitaker, Stephen Thomas e Gerald Willman.


  Questo documento pu essere tradotto in qualsiasi lingua. Se lo fate,
  per favore spedite una copia della traduzione a Konrad Hinsen
  <hinsen@cnrs-orleans.fr>.
  Traduzione in italiano a cura di Nicola Girardi <girardi@keycomm.it>

































































  Linux I/O port programming mini-HOWTO
  Autore: Riku Saikkonen <Riku.Saikkonen@hut.fi>
  v, 28 dicembre 1997

  Questo HOWTO descrive la programmazione delle porte I/O e come realiz
  zare delle brevi attese di tempo nei programmi che girano in modo
  utente, su macchine basate sugli Intel x86.  Traduzione di Fabrizio
  Stefani, 15 ottobre 1999.

  1.  Introduzione

  Questo HOWTO descrive la programmazione delle porte I/O e come
  realizzare delle brevi attese di tempo nei programmi che girano in
  modo utente, su macchine basate sugli Intel x86. Questo documento 
  derivato dal piccolissimo IO-Port mini-HOWTO dello stesso autore.

  Questo documento  Copyright 1995-1997 di Riku Saikkonen. Vedere il
  Linux HOWTO copyright
  <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/COPYRIGHT> per i
  dettagli.

  Se avete delle correzioni o qualcosa da aggiungere, contattatemi
  liberamente via e-mail (NdT: in inglese) presso
  (Riku.Saikkonen@hut.fi)...

  Cambiamenti rispetto alla versione precedente (30 Mar 1997):

    Chiarite le cose a proposito di inb_p/outb_p e la porta 0x80.

    Tolte le informazioni su udelay(), poich nanosleep() fornisce un
     modo pi pulito di usarlo.

    Convertito in Linuxdoc-SGML e riorganizzato.

    Numerose altre modifiche e aggiunte minori.



  2.  Usare le porte I/O nei programmi C

  2.1.  Il metodo normale

  Le routine per accedere alle porte I/O sono in /usr/include/asm/io.h
  (o linux/include/asm-i386/io.h nella distribuzione del sorgente del
  kernel). Tali routine sono delle macro inline, quindi  sufficiente
  usare #include <asm/io.h>; non vi serve nessuna libreria aggiuntiva.

  A causa di una limitazione in gcc (presente fino alla versione
  2.7.2.3) e in egcs (tutte le versioni), dovete compilare qualunque
  sorgente che usa tali routine con l'ottimizzazione abilitata (gcc -O1
  o maggiore), oppure #define extern deve essere vuoto prima di mettere
  #include <asm/io.h>.

  Per il debugging potete usare gcc -g -O (almeno con le ultime versioni
  di gcc), sebbene l'ottimizzazione possa causare, a volte, un
  comportamento un po' strano del debugger. Se ci vi d noia, mettete
  le routine che accedono alla porta I/O in un file sorgente separato e
  compilate con l'ottimizzazione abilitata solo quest'ultimo.

  Prima di accedere a qualunque porta, dovete dare al vostro programma
  il permesso per farlo. Ci si fa chiamando la funzione ioperm()
  (dichiarata in unistd.h e definita nel kernel) da qualche parte
  all'inizio del vostro programma (prima di qualunque accesso ad una
  porta I/O). La sintassi  ioperm(from, num, turn_on), dove from  il
  primo numero di porta e num il numero di porte consecutive a cui dare
  l'accesso. Per esempio, ioperm(0x300, 5, 1) d l'accesso alle porte da
  0x300 a 0x304 (per un totale di 5 porte). L'ultimo argomento  un
  valore booleano che specifica se dare (true (1)) o togliere (false
  (0)) al programma l'accesso alle porte. Potete chiamare pi volte
  ioperm() per abilitare pi porte non consecutive. Vedere la pagina di
  manuale di ioperm() per i dettagli sulla sintassi.

  La chiamata ioperm() necessita che il vostro programma abbia privilegi
  di root; quindi dovete o eseguirlo da root, oppure renderlo suid root.
  Dopo che avete effettuato la chiamata ioperm per abilitare le porte
  che volete usare, potete rinunciare ai privilegi di root. Alla fine
  del programma non  necessario abbandonare esplicitamente i privilegi
  di accesso alle porte con ioperm(..., 0), ci verr fatto
  automaticamente quando il processo esce.

  Un setuid() fatto ad un utente che non  root non disabilita l'accesso
  alla porta che gli era stato fornito da ioperm(), invece un fork() lo
  disabilita (il processo figlio non acquisisce l'accesso, mentre il
  padre lo mantiene).

  ioperm() pu fornire l'accesso solo alle porte da 0x000 a 0x3ff; per
  porte pi alte dovete usare iopl() (che, con una sola chiamata, vi
  fornisce l'accesso a tutte le porte). Per fornire al vostro programma
  l'accesso a tutte le porte usate 3 come argomento di livello (cio
  iopl(3)) (quindi state attenti --  accedere alle porte sbagliate pu
  provocare un sacco di sgradevoli cose al vostro computer). Di nuovo,
  per effettuare la chiamata a iopl() dovete avere i privilegi di root.
  Vedere le pagine di manuale di iopl(2) per maggiori dettagli.

  Poi, per accedere realmente alle porte... Per leggere (input) un byte
  (8 bit) da una porta, chiamare inb(port), che restituisce il byte
  presente all'ingresso. Per scrivere (output) un byte, chiamare
  outb(value, port) (osservate l'ordine dei parametri). Per leggere una
  word (16 bit) dalle porte x e x+1 (un byte da ognuna per formare una
  word con l'istruzione assembler inw) chiamare inw(x). Per scrivere una
  word sulle due porte si usa outw(value, x). Se non siete sicuri su
  quali istruzioni (byte o word) usare per le porte, probabilmente vi
  servono inb() e outb() --- la maggior parte dei dispositivi sono
  progettati per gestire l'accesso alle porte a livello di byte.
  Osservate che tutte le istruzioni per accedere alle porte richiedono,
  almeno, un microsecondo (circa) per essere eseguite.

  Le macro inb_p(), outb_p(), inw_p(), e outw_p() funzionano esattamente
  come le precedenti, ma esse introducono un ritardo, di circa un
  microsecondo, dopo l'accesso alla porta; potete allungare tale ritardo
  a circa quattro microsecondi mettendo #define REALLY_SLOW_IO prima di
  #include <asm/io.h>.  Queste macro, di solito (a meno che inserite
  #define SLOW_IO_BY_JUMPING, che  probabilmente meno preciso),
  effettuano una scrittura sulla porta 0x80 per ottenere il ritardo;
  quindi, prima di usarle, dovete dargli l'accesso alla porta 0x80 con
  ioperm() (le scritture fatte sulla porta 0x80 non hanno conseguenze su
  nessuna parte del sistema). Per ottenere dei ritardi con sistemi pi
  versatili, continuate a leggere.

  Nelle raccolte di pagine di manuale per Linux, nelle versioni
  ragionevolmente recenti, ci sono le pagine di manuale per ioperm(2),
  iopl(2) e per le suddette macro.



  2.2.  Un altro metodo: /dev/port

  Un altro modo per accedere alle porte I/O  quello di aprire, in
  lettura e/o scrittura, con open(), il dispositivo a caratteri
  /dev/port (numero primario 1, secondario 4) (le funzioni stdio f*()
  hanno un buffer interno, quindi evitatele). Poi posizionatevi con un
  lseek() sul byte appropriato nel file (posizione 0 del file = porta
  0x00, posizione 1 del file = porta 0x01 e cos via...) e leggete
  (read()), o scrivete (write()), un byte o una word da, o in, esso.

  Ovviamente, perch ci funzioni, il vostro programma avr bisogno
  dell'accesso in lettura/scrittura a /dev/port. Questo metodo 
  probabilmente pi lento del metodo normale precedentemente descritto,
  ma esso non necessita n di ottimizzazioni in compilazione n della
  funzione ioperm(). Non vi serve nemmeno di avere l'accesso da root, se
  impostate per /dev/port l'accesso per utenti, o gruppi, non root ---
  ma far questo  una pessima idea, in termini di sicurezza del sistema,
  poich  possibile danneggiare il sistema, forse anche ottenere
  l'accesso a root, usando /dev/port per accedere direttamente ai dischi
  rigidi, alle schede di rete, ecc.



  3.  Gli interrupt (IRQ) e l'accesso DMA

  Non  possibile usare gli IRQ o il DMA direttamente da un processo in
  modo utente. Dovete scrivere un driver di kernel; vedere The Linux
  Kernel Hacker's Guide
  <http://www.redhat.com:8080/HyperNews/get/khg.html> per i dettagli e
  il codice sorgente del kernel per gli esempi.

  Inoltre, non  possibile disabilitare gli interrupt da un programma
  che gira in modo utente.



  4.  Temporizzazione ad elevata precisione

  4.1.  Ritardi

  Innanzi tutto devo precisare che, a causa della natura multitasking di
  Linux, non  possibile garantire che un processo che gira in modo
  utente abbia un preciso controllo delle temporizzazioni. Il vostro
  processo potrebbe essere sospeso per un tempo che pu variare dai,
  circa, dieci millisecondi, fino ad alcuni secondi (in un sistema molto
  carico).  Comunque, per la maggior parte delle applicazioni che usano
  le porte I/O, ci non ha importanza. Per minimizzare tale tempo
  potreste assegnare al vostro processo un pi alto valore di priorit
  (vedere la pagina di manuale di nice(2)), oppure potreste usare uno
  scheduling in real time (vedere sotto).

  Se volete una temporizzazione pi precisa di quella disponibile per i
  processi che girano in modo utente, ci sono delle "forniture" per il
  supporto dell'elaborazione real time in modo utente. I kernel 2.x di
  Linux forniscono un supporto per il soft real time; vedere la pagina
  di manuale di sched_setscheduler(2) per i dettagli. C' un kernel
  speciale che supporta l'hard real time; per maggiori informazioni
  vedere <http://luz.cs.nmt.edu/~rtlinux/>.


  4.1.1.  Pause: sleep()  e usleep()

  Laciatemi incominciare con le pi semplici chiamate di funzioni di
  temporizzazione. Per ritardi di pi secondi la scelta migliore ,
  probabilmente, quella di usare sleep(). Per ritardi dell'ordine delle
  decine di millisecondi (il ritardo minimo sembra essere di circa 10
  ms) dovrebbe andar bene usleep(). Tali funzioni cedono la CPU agli
  altri processi (vanno a dormire: ``sleep''), in modo  che il tempo di
  CPU non venga sprecato. Per i dettagli vedere le pagine di manuale di
  sleep(3) e usleep(3).

  Per ritardi inferiori a, circa, 50 millisecondi (dipendentemente dal
  carico del sistema e dalla velocit del processore e della macchina)
  il rilascio della CPU richiede troppo tempo, ci perch (per
  l'architettura x86) lo scheduler generalmente lavora almeno dai 10 ai
  30 millisecondi prima di restituire il controllo al vostro processo.
  Per questo motivo, per i piccoli ritardi, usleep(3) in genere ritarda
  un po' pi della quantit specificatagli nei parametri, almeno 10 ms
  circa.


  4.1.2.  nanosleep()

  Nei kernel di Linux della serie 2.0.x, c' una nuova chiamata di
  sistema, nanosleep() (vedere la pagina di manuale di nanosleep(2)),
  che vi permette di dormire o ritardare per brevi periodi di tempo
  (pochi microsecondi o poco pi).

  Per ritardi fino a 2 ms, se (e solo se) il vostro processo  impostato
  per lo scheduling in soft real time, nanosleep() usa un ciclo di
  attesa, altrimenti dorme ("sleep"), proprio come usleep().

  Il ciclo di attesa usa udelay() (una funzione interna del kernel usata
  da parecchi driver del kernel) e la lunghezza del ciclo viene
  calcolata usando il valore di BogoMips (la velocit di questo tipo di
  cicli di attesa  una delle cose che BogoMips misura accuratamente).
  Per i dettagli sul funzionamento vedere /usr/include/asm/delay.h.


  4.1.3.  Ritardare tramite l'I/O sulle porte

  Un altro modo per realizzare un ritardo di pochi microsecondi  di
  effettuare delle operazioni di I/O su una porta. La lettura dalla, o
  la scrittura sulla (come si fa  stato descritto precedentemente),
  porta 0x80 di un qualsiasi byte impiega quasi esattamente un
  microsecondo, indipendentemente dal tipo e dalla velocit del
  processore. Potete ripetere tale operazione pi volte per ottenere
  un'attesa di pochi microsecondi. La scrittura sulla porta non dovrebbe
  avere controindicazioni su una qualsiasi macchina standard (e infatti
  qualche driver del kernel usa questa tecnica). Questo  il metodo
  normalmente usato da {in|out}[bw]_p() per realizzare il ritardo
  (vedere asm/io.h).

  In effetti una istruzione di I/O su una qualunque delle porte
  nell'intervallo 0-0x3ff impiega quasi esattamente un microsecondo;
  quindi se, per esempio, state accedendo direttamente alla porta
  parallela, potete semplicemente effettuare degli inb() in pi su essa
  per ottenere il ritardo.


  4.1.4.  Ritardare usando le istruzioni assembler

  Se conoscete il tipo e la velocit del processore della macchina su
  cui girer il programma, potete sfruttare un codice basato
  sull'hardware, che usa certe istruzioni assembler, per realizzare dei
  ritardi molto brevi (ma ricordate, lo scheduler pu sospendere il
  vostro processo in qualsiasi momento, quindi i ritardi potrebbero
  essere impredicibilmente pi lunghi del previsto). Nella tabella
  sotto, la velocit interna del processore determina il numero di cicli
  di clock richiesti; cio, per un processore a 50 MHz (tipo un 486DX-50
  o un 486DX2-50) un ciclo di clock dura 1/50.000.000 di secondo (pari a
  200 nanosecondi).







  Istruzione      cicli di clock      cicli di clock
                    su un i386          su un i486

  nop                   3                   1
  xchg %ax,%ax          3                   3
  or %ax,%ax            2                   1
  mov %ax,%ax           2                   1
  add %ax,0             2                   1




  (Mi dispiace ma non conosco quelli dei Pentium, probabilmente sono
  vicini a quelli del i486. Non ho trovato una istruzione che impieghi
  un ciclo di clock su un i386. Usate le istruzioni che impiegano un
  solo ciclo di clock, se possibile, altrimenti le tecniche di pipeling
  dei moderni processori potrebbero abbreviare i tempi.)

  Le istruzioni nop e xchg, indicate nella tabella, non dovrebbero avere
  effetti collaterali. Le altre potrebbero modificare i flag dei
  registri, ma ci non dovrebbe essere un problema poich gcc dovrebbe
  accorgersene. nop  una buona scelta.

  Per usarle nel vostro programma chiamate asm("istruzione").  La
  sintassi delle istruzioni  come nella tabella sopra. Se volete
  mettere pi istruzioni in un singolo statement asm() separatele con
  dei punti e virgola. Ad esempio asm("nop ; nop ; nop ; nop") esegue
  quattro istruzioni nop, generando un ritardo di quattro cicli di clock
  sui processori i486 o Pentium (o 12 cicli di clock su un i386).

  gcc traduce asm() in codice assembler inline, per cui si risparmiano i
  tempi per la chiamata di funzione.

  Ritardi pi brevi di un ciclo di clock sono impossibili con
  l'architettura Intel x86.


  4.1.5.  rdtsc  per i Pentium

  Per i Pentium, potete ottenere il numero di cicli di clock trascorsi
  dall'ultimo avvio del sistema con il seguente codice C:



       ______________________________________________________________________
          extern __inline__ unsigned long long int rdtsc()
          {
            unsigned long long int x;
            __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
            return x;
          }
       ______________________________________________________________________




  Potete sondare tale valore per ritardare di quanti cicli di clock vi
  pare.



  4.2.  Misurare il tempo

  Per tempi della precisione dell'ordine del secondo  probabilmente pi
  facile usare time(). Per tempi pi precisi, gettimeofday()  preciso
  fino a circa un microsecondo (ma vedete quanto gi detto riguardo lo
  scheduling). Con i Pentium, il frammento di codice sopra (rdtsc) ha
  una precisione pari a un ciclo di clock.

  Se volete che il vostro processo riceva un segnale dopo un certo
  quanto di tempo, usate setitimer() o alarm(). Per i dettagli vedere le
  pagine di manuale delle suddette funzioni.



  5.  Altri liguaggi di programmazione

  La descrizione precedente era relativa specificatamente al linguaggio
  C.  Dovrebbe valere inalterata per il C++ e l'Objective C. In
  assembler, dovete effettuare la chiamata a ioperm() o iopl() come in
  C, ma dopo di ci potete usare direttamente le istruzioni di
  lettura/scrittura per l'I/O nella porta.

  In altri linguaggi, a meno che possiate inserire nel programma codice
  assembler o C inline, oppure possiate usare le chiamate di sistema
  precedentemente menzionate,  probabilmente pi facile scrivere un
  semplice file sorgente C contenente le funzioni per l'accesso in I/O
  alle porte o i ritardi che vi servono, e compilarlo e linkarlo con il
  resto del programma. Oppure usare /dev/port come descritto
  precedentemente.



  6.  Alcune utili porte

  Vengono ora date delle informazioni per la programmazione delle porte
  pi comuni che possono essere usate per l'I/O delle logiche TTL (o
  CMOS) general purpose.

  Se volete usare queste o altre porte per il loro scopo originale (cio
  controllare una normale stampante o un modem), fareste meglio ad usare
  i driver esistenti (che, di solito, sono inclusi nel kernel) piuttosto
  che programmare direttamente le porte come descritto in questo HOWTO.
  Questa sezione  indirizzata a quelli che vogliono connettere alle
  porte standard di un PC degli schermi LCD, dei motori passo passo, o
  altri componenti specifici.

  Se volete controllare un dispositivo di largo uso, come uno scanner
  (che  sul mercato gi da un po'), cercate se c' gi un driver di
  Linux che lo riconosce. L'Hardware-HOWTO
  <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Hardware-HOWTO>  un buon
  posto da cui iniziare la ricerca.

  <http://www.hut.fi/Misc/Electronics/>  una buona fonte per
  informazioni sulla connessione di dispositivi ai computer (e sugli
  apparecchi elettronici in generale).



  6.1.  La porta parallela

  L'indirizzo base della porta parallela (detto ``BASE'' nel seguito) 
  0x3bc per /dev/lp0, 0x378 per /dev/lp1 e 0x278 per /dev/lp2. Se volete
  solo controllare un qualcosa che si comporta come una normale
  stampante, vedete il Printing-HOWTO
  <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/Printing-HOWTO>.

  Nella maggior parte delle porte parallele, oltre al modo standard di
  sola scrittura descritto qui sotto, esiste un modo bidirezionale
  `esteso'.  Per maggiori informazioni su tale argomento e sui nuovi
  modi ECP/EPP, vedere  <http://www.fapo.com/> e
  <http://www.senet.com.au/~cpeacock/parallel.htm>. Ricordate che poich
  non  possibile usare gli IRQ o il DMA in un programma che gira in
  modo utente, per usare ECP/EPP dovrete probabilmente scrivere un
  driver kernel. Credo che qualcuno stia gi scrivendo un tale driver,
  ma non conosco i dettagli della cosa.

  La porta BASE+0 (porta dati) controlla i segnali dei dati della porta
  (da D0 a D7 per i bit da 0 a 7, rispettivamente; stati: 0 = basso (0
  V), 1 = alto (5 V)). Una scrittura in tale porta fissa i dati sui pin.
  Una lettura restituisce i dati che sono stati scritti per ultimi, in
  modo standard (oppure esteso), oppure restituisce i dati provenienti
  dai pin di un altro dispositivo che lavora in modo reale esteso.

  La porta BASE+1 (porta di Stato)  di sola lettura e restituisce lo
  stato dei seguenti segnali d'ingresso:

    Bit 0 e 1, sono riservati.

    Bit 2 stato dell'IRQ (non  un pin, non so come funziona)

    Bit 3 ERROR (1 = alto)

    Bit 4 SLCT (1 = alto)

    Bit 5 PE (1 = alto)

    Bit 6 ACK (1 = alto)

    Bit 7 -BUSY (0 = alto)

     (Non sono sicuro degli stati alto e basso)

  La porta BASE+2 (porta di Controllo)  di sola scrittura (una lettura
  restituisce gli ultimi dati scritti) e controlla i seguenti segnali di
  stato:

    Bit 0 -STROBE (0 = alto)

    Bit 1 AUTO_FD_XT (1 = alto)

    Bit 2 -INIT (0 = alto)

    Bit 3 SLCT_IN (1 = alto)

    Bit 4, quando impostato ad 1, abilita l'IRQ della porta parallela
     (che si verifica nella transizione da basso ad alto di ACK)

    Bit 5 controlla la direzione del modo esteso (0 = scrittura, 1 =
     lettura) ed  assolutamente di sola scrittura (una lettura di
     questo bit non restituisce nulla di utile).

    Bit 6 e 7, sono riservati.

     (Di nuovo, non sono sicuro degli stati alto e basso)

  Configurazione dei pin (connettore a "D" femmina a 25-pin sulla porta)
  (i = input, ingresso; o = output, uscita):


       1io -STROBE, 2io D0, 3io D1, 4io D2, 5io D3, 6io D4, 7io D5, 8io D6,
       9io D7, 10i ACK, 11i -BUSY, 12i PE, 13i SLCT, 14o AUTO_FD_XT,
       15i ERROR, 16o -INIT, 17o SLCT_IN, 18-25 Ground (Massa)





  Le specifiche IBM dicono che i pin 1, 14, 16 e 17 (le uscite di
  controllo) hanno i driver dei collettori aperti connessi a 5 V
  attraverso resistori da 4,7 Kohm (pozzo 20 mA, fonte 0,55 mA, uscita a
  livello alto pari a 0,5 V meno il pullup). I rimanenti pin hanno il
  pozzo a 24 mA, la fonte a 15 mA, e la loro uscita a livello alto  di
  2,4 V (minimo). Per entrambi, lo stato basso  di 0,5 V (massimo). Le
  porte parallele non IBM probabilmente si discostano da questo
  standard. Per maggiori informazioni a tal riguardo vedere
  <http://www.hut.fi/Misc/Electronics/circuits/lptpower.html>.

  In ultimo un avvertimento: state attenti con i collegamenti a massa.
  Io ho rotto diverse porte parallele collegandoci qualcosa mentre il
  computer era acceso. Per giochetti del genere sarebbe buona cosa usare
  una porta parallela che non sia integrata sulla piastra madre. (Di
  solito  possibile ottenere una seconda porta parallela, per la
  propria macchina, tramite una economica e standard scheda `multi-I/O';
  semplicemente disabilitate le porte di cui non avete bisogno e
  impostate l'indirizzo I/O, della porta parallela sulla scheda, ad un
  indirizzo libero.  Non dovete preoccuparvi dell'IRQ della porta
  parallela visto che, normalmente, non viene usato.)



  6.2.  La porta giochi (joystick)

  La porta giochi  situata agli indirizzi 0x200-0x207. Per controllare
  i normali joystick c' un apposito driver a livello di kernel, vedere
  <ftp://sunsite.unc.edu/pub/Linux/kernel/patches/>, nome del file
  joystick-*.

  Configurazione dei pin (connettore a "D" femmina a 15 pin sulla
  porta):

    1, 8, 9, 15: +5 V (alimentazione)

    4, 5, 12: Massa

    2, 7, 10, 14: ingressi digitali BA1, BA2, BB1 e BB2,
     rispettivamente

    3, 6, 11, 13: ingressi ``analogici'' AX, AY, BX e BY,
     rispettivamente

  I pin +5 V sembra che siano spesso collegati direttamente alle linee
  di alimentazione sulla piastra madre, quindi dovrebbero poter fornire
  un bel po' di potenza, a seconda della piastra madre,
  dell'alimentatore e della porta giochi.

  Gli ingressi digitali sono usati per i pulsanti dei due joystick
  (joystick A e joystick B, con due pulsanti ciascuno) collegabili alla
  porta.  Dovrebbero usare i normali livelli d'ingresso TTL e potete
  leggerne lo stato direttamente dalla porta di stato (vedere sotto).
  Quando il pulsante  premuto, il joystick restituisce uno stato basso
  (0 V), altrimenti restituisce uno stato alto (i 5 V del pin
  dell'alimentazione attraverso un resistore di un Kohm).

  I cosdetti ingressi analogici in effetti misurano una resistenza.  La
  porta giochi ha un quadruplo multivibratore monostabile (un integrato
  558) collegato ai quattro ingressi. Ad ogni ingresso, fra il pin di
  ingresso e l'uscita del multivibratore, c' un resistore da 2,2 Kohm
  e, fra l'uscita del multivibratore e la massa, c' un condensatore di
  temporizzazione pari a 0,01 uF. Un joystick (in senso fisico) ha un
  potenziometro per ogni asse (X e Y), connesso fra +5 V e l'appropriato
  pin d'ingresso (AX o AY per il joystick A, oppure BX o BY per il
  joystick B).

  Il multivibratore, quando attivato, imposta alte (5 V) le sue linee di
  uscita ed aspetta che ogni condensatore di temporizzazione raggiunga i
  3,3 V prima di abbassare le rispettive linee di uscita. Cos facendo,
  la durata dello stato alto del multivibratore   proporzionale alla
  resistenza del potenziometro nel joystick (cio alla posizione della
  leva sull'asse corrispondente), secondo la relazione:

       R = (t - 24,2) / 0,011


  dove R  la resistenza (in ohm) del potenziometro e t la durata dello
  stato alto (in secondi).

  Quindi, per leggere gli ingressi analogici, dovete prima attivare il
  multivibratore (con una scrittura sulla porta; vedere sotto), poi
  controllare (con letture ripetute della porta) lo stato dei quattro
  assi finch non scendono dallo stato alto a quello basso e quindi
  misurare la durata del loro stato alto. Tale controllo richiede
  abbastanza tempo di CPU e, su di un sistema multitasking non in real
  time come Linux (in modo utente normale), il risultato non  molto
  preciso perch non potete controllare costantemente la porta (a meno
  che usiate un driver a livello di kernel e disabilitiate gli interrupt
  durante il controllo; ma cos si spreca ancor pi tempo di CPU). Se
  sapete che il segnale impiegher parecchio tempo (decine di ms) per
  tornare basso, potete chiamare usleep() prima di cominciare il
  controllo, dando cos quel tempo di CPU ad altri processi.

  La sola porta di I/O a cui vi serve di accedere  la porta 0x201 (le
  altre porte o si comportano identicamente, o non fanno nulla).
  Qualsiasi scrittura su questa porta (non importa cosa scrivete) attiva
  il multivibratore. Una lettura da questa porta restituisce lo stato
  dei segnali di ingresso:

    Bit 0: AX (stato dell'uscita del multivibratore (1 = alto))

    Bit 1: AY (stato dell'uscita del multivibratore (1 = alto))

    Bit 2: BX (stato dell'uscita del multivibratore (1 = alto))

    Bit 3: BY (stato dell'uscita del multivibratore (1 = alto))

    Bit 4: BA1 (ingresso digitale, 1 = alto)

    Bit 5: BA2 (ingresso digitale, 1 = alto)

    Bit 6: BB1 (ingresso digitale, 1 = alto)

    Bit 7: BB2 (ingresso digitale, 1 = alto)



  6.3.  La porta seriale

  Se il dispositivo che vi interessa supporta qualcosa che somiglia alla
  RS-232, allora dovreste poter usare la porta seriale per comunicare
  con esso. Il driver di Linux per le porte seriali dovrebbe andar bene
  per quasi tutte le applicazioni (non dovete programmare direttamente
  la porta seriale, per farlo, probabilmente, dovreste scrivere un
  driver kernel);  piuttosto versatile, quindi usando velocit di
  trasmissione (bps) non standard, o cose del genere, non dovrebbero
  esserci problemi.

  Per maggiori informazioni sulla programmazione delle porte seriali sui
  sistemi Unix, vedere la pagina di manuale di termios(3), il codice
  sorgente del driver per la porta seriale (linux/drivers/char/serial.c)
  e  <http://www.easysw.com/~mike/serial/index.html>.
  7.  Suggerimenti

  Se volete un buon I/O analogico, potete collegare dei chip ADC e/o DAC
  alla porta parallela (suggerimento: per l'alimentazione usate il
  connettore della porta giochi o un connettore di alimentazione per i
  dischi ancora libero che va cablato fino all'esterno del computer, a
  meno che non abbiate un dispositivo a basso consumo e possiate usare
  la porta parallela stessa per l'alimentazione, o una fonte di
  alimentazione esterna), o comprare una scheda AD/DA (la maggior parte
  di quelle pi vecchie, pi lente, vengono controllate dalle porte
  I/O). Oppure, se vi accontentate di 1 o 2 canali, non vi d fastidio
  l'imprecisione e (probabilmente) uno spostamento di fuori zero,
  dovrebbe bastarvi (ed  davvero veloce) una scheda audio economica che
  sia supportata dai driver audio di Linux.

  Con dispositivi analogici precisi, una cattiva messa a terra pu
  generare degli errori negli input o output analogici. Se vi capita
  qualcosa del genere, potreste provare ad isolare elettricamente il
  vostro dispositivo dal computer, usando degli accoppiatori ottici (su
  tutti i segnali tra il computer ed il dispositivo). Per ottenere un
  migliore isolamento provate a prendere l'alimentazione per gli
  accoppiatori dal computer (i segnali non usati sulla porta potrebbero
  fornire potenza sufficiente).

  Se state cercando un programma (per Linux) per il progetto di circuiti
  stampati, c' un'applicazione per X11, chiamata Pcb, che funziona
  piuttosto bene, almeno se non dovete fare niente di molto complesso.
   inclusa in parecchie distribuzioni di Linux ed  disponibile in
  <ftp://sunsite.unc.edu/pub/Linux/apps/circuits/> (nomefile pcb-*).



  8.  Risoluzione dei problemi


     D1.
        Quando accedo alle porte ottengo "segmentation faults" (errori
        di segmentazione).


     R1.
        Il tuo programma non ha i privilegi di root, oppure la chiamata
        ioperm()  fallita per qualche altro motivo. Controlla il valore
        restituito da ioperm(). Inoltre, assicurati di stare accedendo
        proprio alle porte che hai abilitato con ioperm() (vedi D3). Se
        stai usando le macro di ritardo (inb_p(), outb_p(), e via
        dicendo), ricordati di effettuare una chiamata a ioperm() per
        ottenere l'accesso anche alla porta 0x80.


     D2.
        Non riesco a trovare le funzioni in*() e out*() definite
        ovunque, e gcc si lamenta per dei riferimenti non definiti
        (undefined references).


     R2.
        Non hai compilato con l'ottimizzazione abilitata (-O) e quindi
        gcc non riesce a risolvere le macro contenute in asm/io.h.
        Oppure non hai messo affatto #include <asm/io.h>


     D3.
        out*() non fa nulla, o fa qualcosa di strano.


     R3.
        Controlla l'ordine dei parametri; deve essere outb(valore,
        porta) e non outportb(porta, valore) come  in MS-DOS.


     D4.
        Voglio controllare un dispositivo standard RS-232/una stampante
        parallela/un joystick...


     R4.
        Probabilmente ti conviene usare i driver esistenti (nel kernel
        di Linux, o in un server X, o da qualche altra parte). I driver
        generalmente sono abbastanza versatili, tanto che anche i
        dispositivi non standard di solito ci funzionano. Vedere le
        informazioni precedentemente date riguardo le porte standard per
        indicazioni sulle relative documentazioni.



  9.  Codice d'esempio

  Ecco un pezzo di un semplice codice d'esempio per l'accesso alla porta
  I/O:



       ______________________________________________________________________
       /*
        * example.c: un semplicissimo esempio di I/O su porta
        *
        * Questo codice non fa nulla di utile, solo una scrittura sulla
        * porta, una pausa e una lettura dalla porta. Compilatelo con
        * `gcc -O2 -o example example.c' ed eseguitelo da root con `./example'.
        */

       #include <stdio.h>
       #include <unistd.h>
       #include <asm/io.h>

       #define BASEPORT 0x378 /* lp1 */

       int main()
       {
         /* Richiede l'accesso alle porte */
         if (ioperm(BASEPORT, 3, 1)) {perror("ioperm"); exit(1);}

         /* Imposta bassi (0) i segnali di dati (D0-7) della porta */
         outb(0, BASEPORT);

         /* Va in pausa (dorme) per un po' (100 ms) */
         usleep(100000);

         /* Legge dalla porta lo stato (BASE+1) e mostra il risultato */
         printf("stato: %d\n", inb(BASEPORT + 1));

         /* La porta non ci serve piu' */
         if (ioperm(BASEPORT, 3, 0)) {perror("ioperm"); exit(1);}

         exit(0);
       }

       /* fine dell'esempio example.c */
       ______________________________________________________________________


  10.  Crediti

  Ha contribuito troppa gente perch io possa elencarla, ma grazie
  tante, a tutti. Non ho risposto a tutti i contributi che mi sono
  giunti; me ne scuso, e grazie ancora per l'aiuto.





























































  IP Sub-Networking Mini-Howto
  Robert Hart, hartr@interweft.com.au
  v1.0, 31 March 1997

  Questo documento descrive il perch e il come realizzare una sottorete
  in una rete IP, sia essa di Classe A, B o C, in modo tale che funzioni
  correttamente in presenza di un numero elevato di reti interconnesse.
  Traduzione a cura di Stefano di Sandro <stedis@radiolink.net>, ultima
  revisione 24 Gennaio 2000.

  1.  Copyright

  This document is distributed under the terms of the GNU Public License
  (GPL).

  This document is directly supported by InterWeft IT Consultants
  (Melbourne, Australia).

  Questo documento  distribuito secondo i termini della GNU Public
  License (GPL).

  Questo documento  direttamente supportato da InterWeft IT Consultants
  (Melbourne, Australia).

  La versione aggiornata di questo documento  disponibile presso il
  sito WWW di InterWeft all'indirizzo InterWeft IT Consultants
  <http://www.interweft.com.au/> e presso il The Linux Documentation
  Project <http://sunsite.unc.edu/LDP>.


  2.  Introduzione

  Con la progressiva evoluzione del numero degli indirizzi IP verso una
  specie protetta,  importante fare un uso efficiente di questa risorsa
  sempre pi scarsa.

  Questo documento spiega come suddividere un singolo indirizzo di rete
  IP in modo tale da poter essere usato per molte reti diverse.

  Questo documento tratta specificatamente degli indirizzi di rete di
  classe C, ma allo stesso modo i principi esposti possono essere
  applicati alle reti di classe A e B.


  2.1.  Altre risorse informative

  Vi  un buon numero di risorse informative di una certa rilevanza, sia
  specifica che di base, a proposito degli indirizzi IP.  Quelle che
  l'autore raccomanda sono:

    The Linux Network Administrators Guide
     <http://sunsite.unc.edu/LDP/LDP/nag/nag.html>.

    The Linux System Administration Guide
     <http://linuxwww.db.erau.edu/SAG/>.

    TCP/IP Network Administration di Craig Hunt, pubblicata da O'Reilly
     and Associates <http://www.ora.com/catalog/tcp/noframes.html>.


  3.  Anatomia di un indirizzo IP

  Prima di immergerci nelle delizie del "sub-networking", abbiamo
  bisogno di stabilire alcuni concetti base sugli indirizzi IP.


  3.1.  Gli indirizzi IP appartengono alle Interfacce - NON  agli host!

  Per prima cosa, eliminiamo la causa di un errore fondamentale - gli
  indirizzi IP non sono assegnati agli host, ma bens alle interfacce di
  rete presenti su un host.

  Come? - E cosa sono?

  Mentre molti (se non tutti) i computer di una rete IP avranno
  installata una singola interfaccia di rete (e avranno di conseguenza
  un singolo indirizzo IP), questo non accade sempre. Computer e altri
  dispositivi possono avere diverse (addirittura molte) interfacce di
  rete ciascuna delle quali con il proprio indirizzo IP.

  Quindi un dispositivo con 6 interfacce attive (come un router) avr 6
  indirizzi IP - uno per ogni interfaccia connessa a una diversa rete.
  La ragione di ci sar chiara non appena daremo un'occhiata a una rete
  IP.

  A dispetto di questo per, la gran parte della gente parla di
  indirizzo di questo host quando vuole riferirsi a un indirizzo IP.
  Ricordate soltanto che si tratta di un modo veloce per indicare
  l'indirizzo IP di questa interfaccia su questo host.  Molti (ma non la
  maggior parte) dei dispositivi in Internet hanno un'unica interfaccia
  e quindi un solo indirizzo IP.


  3.2.  Indirizzi IP come "Quartetti Puntati"

  Nella loro implementazione corrente (IPv4), gli indirizzi IP
  consistono di 4 byte - e forniscono un totale di 32 bit di
  informazione disponibile.  Sono numeri piuttosto grandi (anche se
  espressi in notazione decimale).  Cos per aumentare la leggibilit
  (ma anche per ragioni di organizzazione) gli indirizzi IP vengono
  normalmente scritti con la notazione puntata.  L'indirizzo


       192.168.1.24




  ne  un esempio - 4 numeri (decimali) separati con un punto (.) l'uno
  dall'altro.

  Dal momento che ciascuno dei quattro numeri  la rappresentazione
  decimale di un byte, ciascuno dei quattro numeri pu rappresentare i
  valori compresi tra 0 e 255 (per un totale di 256 valori diversi - si
  ricordi cha anche lo zero  un valore).

  Una parte dell'indirizzo indentifica la rete a cui un host appartiene,
  i restanti bit identificano l'host stesso (ehm - l'interfaccia di
  rete).  L'esatta suddivisione tra bit usati per indirizzare la rete e
  quelli disponibili per identificare gli host (interfacce) in quella
  rete sono determinati dalla 'classe' della rete.


  3.3.  Le Classi delle reti IP

  Esistono tre classi di indirizzi IP

    La classe A degli indirizzi IP utilizza gli 8 bit pi a sinistra
     (il numero pi a sinistra nella notazione puntata) per identificare
     la rete, lasciando gli altri 24 bit (o i restanti 3 decimali) per
     identificare gli host all'interno di essa.
     Negli indirizzi di classe A il bit pi a sinistra del byte pi a
     sinistra vale sempre zero - limitando l'intervallo dei valori del
     primo decimale della notazione puntata tra 0 e 127. Possono perci
     esistere al pi 128 reti di classe A, ciascuna delle quali in grado
     di ospitare 33544430 possibili interfacce.

     Gli indirizzi 0.0.0.0 (noto come "default route") e 127.0.0.1 (rete
     di "loop back") hanno un significato speciale e non sono
     utilizzabili per identificare una rete. In tal modo sono
     disponibili soltanto 126 indirizzi di classe A.

    La classe B degli indirizzi IP utilizza i 16 bit pi a sinistra (i
     due byte pi a sinistra) per identificare la rete, lasciando i
     restanti 16 bit (gli altri due byte) per identificare le
     interfacce.  Negli indirizzi di classe B la coppia di bit pi a
     sinistra vale 1 0. Questo lascia 14 bit per specificare l'indirizzo
     di rete con 32767 valori possibili.  Le reti di classe B hanno
     quindi il primo decimale il cui valore varia tra 128 e 191 e le
     possibili interfacce sono 32766.

    La classe C degli indirizzi IP utilizza i 24 bit pi a sinistra (i
     tre byte pi a sinistra) per identificare la rete, lasciando i
     restanti 8 bit (il byte pi a destra) a indirizzare le interfacce.
     I primi tre bit degli indirizzi di classe C sono sempre 110
     permettendo di rappresentare i valori da 192 a 255. Sono
     disponibili quindi 4194303 indirizzi di rete, ciascuna delle quali
     in grado di accogliere 254 interfacce (gli indirizzi di classe C
     con il primo byte maggiore di 223 sono comunque riservati e non
     utilizzabili).

  Riassumendo:


       Classe della rete         Intervallo di valori disponibili
                                 sul primo byte (decimale)
               A                     da 1 a 126
               B                     da 128 a 191
               C                     da 192 a 254




  Sono altres previsti indirizzi speciali riservati alle reti "non con
  nesse" - reti cio che usano IP, ma non sono collegate alla Internet.
  Questi indirizzi sono:

    Una Rete di Classe A
     10.0.0.0

    16 Reti di Classe B
     172.16.0.0 - 172.31.0.0

    256 Reti di Classe C 192.168.0.0 - 192.168.255.0

  S noter come questo documento utilizzi queste sequenze di valori per
  evitare di generare 'confusione' con le reti reali e i loro host.


  3.4.  Indirizzi di rete, di interfaccia e di broadcast

  Gli indirizzi IP possono avere tre differenti significati:

    rappresentare un rete IP (un gruppo di dispositivi IP che
     condividono l'accesso a un comune mezzo trasmissivo - come pu
     accadere se sono tutti collegati dallo stesso segmento Ethernet).
     Un indirizzo di rete avr sempre tutti i bit relativi allo spazio
     di indirizzamento delle sue interfacce impostati a 0 (a meno che la
     rete non sia in realt una sottorete - come vedremo);

    l'indirizzo di broadcast di una rete IP (l'indirizzo usato per
     'parlare' simultaneamente a tutti i dispositivi appartenenti alla
     rete).  Gli indirizzi di broadcast presentano sempre tutti 1 nei
     bit dello spazio di indirizzamento destinato alle interfacce (a
     meno che la rete non sia in realt una sottorete - come vedremo);


    l'indirizzo di una interfaccia (quale una scheda Ethernet o una
     interfaccia PPP su un host, su un router, su un server per la
     stampa ecc).  Questi indirizzi possono avere qualunque valore nei
     bit per gli host, con l'eccezione di tutti 0 o tutti 1 - perch con
     tutti i bit per host a 0 l'indirizzo diventa un indirizzo di rete,
     mentre con tutti 1 diventa un indirizzo di broadcast.


  Riassumendo per essere pi chiari:


       Per una rete di Classe A...
       (un byte nello spazio di indirizzamento di rete seguito da tre byte
       per lo spazio destinato agli host)

               10.0.0.0  un indirizzo di rete di classe A perch
                       tutti i bit dello spazio destinato agli host sono 0
               10.0.1.0  un host di quella rete
               10.255.255.255.255  l'indirizzo di broadcast di quella rete
                       perch tutti i bit dello spazio destinato agli host
                       sono 1

       Per una rete di Classe B...
       (due byte nello spazio di indirizzamento di rete seguito da due byte
       per lo spazio destinato agli host)

               172.17.0.0 indirizzo di classe B
               172.17.0.1 un host in questa rete
               172.17.255.255 indirizzo di broadcast

       Per una rete di Classe C...
       (tre byte nello spazio di indirizzamento di rete seguito da un byte
       per lo spazio destinato agli host)

               192.168.3.0 indirizzo di classe C
               192.168.3.42 un host in questa rete
               192.168.3.255 indirizzo di broacast




  Tutti gli indiriizi di rete IP ancora disponibili per essere utiliz
  zati oggi sono soltanto indirizzi di classe C.


  3.5.  La maschera di rete

  Una maschera di rete (netmask)  pi propriamente chiamata maschera di
  sottorete.  Comunque ci si pu generalmente riferire a essa come a una
  maschera di rete.

   sulla maschera di rete e sulle implicazioni che produrr nella
  interpretazione degli indirizzi locali di una rete, che ci
  concentreremo adesso, dal momento che essa determiner la
  realizzazione stessa della sottorete.


  La maschera di (sotto)rete standard  costituita da tutti '1' nei bit
  relativi alla rete e da tutti '0' nei bit relativi agli host.  Questo
  significa che le maschere standard per le tre classi di rete sono:

    Maschera di rete di Classe A: 255.0.0.0

    Maschera di rete di Classe B: 255.255.0.0

    Maschera di rete di Classe C: 255.255.255.0

  Vi sono due aspetti importanti da ricordare a questo proposito:

    Le maschere di rete hanno effetto sull'interpretazione locale degli
     indirizzi IP locali (dove con 'locale' si vuole indicare relativo a
     un particolare segmento della rete);

    La maschera non  un indirizzo di rete - viene usata soltanto per
     modificare le modalit con cui un indirizzo viene interpretato
     localmente.


  4.  Cosa sono le sottoreti?

  Una sottorete rappresenta un modo per prendere un singolo indirizzo di
  rete IP e suddividerlo localmente in maniera tale che questo stesso
  indirizzo possa essere utilizzato su diverse reti locali
  interconnesse.  Si ricordi che un singolo indirizzo di rete IP pu
  essere usato soltanto per una rete.

  La parola chiave  locale: per tutto quanto riguarda il mondo che sta
  all'esterno rispetto alla macchine e alle reti fisiche coinvolte
  nell'operazione di realizzazione delle sottoreti a partire da un'unica
  rete IP, nulla  cambiato - il tutto viene visto ancora come un'unica
  rete IP.  Questo concetto  importante - il "sub-networking"  una
  configurazione locale ed  invisibile al resto del mondo.


  5.  Perch usare le sottoreti?

  La ragione che sta dietro a questa soluzione risale alla prime
  caratteristiche di IP - quando una manciata di siti utilizzavano
  indirizzi di classe A permettendo a milioni di host di connettersi ad
  essi.

   evidente che si presenterebbero enormi problemi di traffico e di
  amministrazione se tutti i computer di un grande sito dovessero essere
  connessi alla stessa rete: provare a gestire un tale mostro sarebbe un
  incubo e la rete potrebbe (quasi certamente) collassare sotto il
  carico del suo stesso traffico (saturazione).

  Adottando il "sub-networking": la rete di Classe A pu essere
  suddivisa in diverse (anche molte) reti separate, l'amministrazione
  delle quali pu facilmente a sua volta essere ripartita.

  Questo consente di realizzare piccole reti, facilmente gestibili - in
  grado anche, in una certa misura, di utilizzare tecnologie differenti.
  Si ricordi che non si possono mescolare Ethernet, Token Ring, FDDI,
  ATM ecc sulla stessa rete fisica - ma possono sempre essere
  interconnesse.

  Altre ragioni per usare le sottoreti sono:

    La conformazione fisica di un sito pu aggiungere delle restrizioni
     (lunghezza dei cavi) in termini di possibilit di collegamento
     delle infrastrutture, richiedendo reti multiple.  Realizzando delle
     sottoreti l'eventuale suddivisione pu essere fatta avendo a
     disposizione un solo indirizzo di rete IP.
     Questa soluzione viene normalmente adottata da quegli ISP che
     desiderano fornire ai cliente un indirizzo IP statico per garantire
     una connessione permanente.

    Il traffico di rete  sufficientemente alto da causare
     significativi rallentamenti. Suddividendo la rete in sottoreti, il
     traffico locale a un segmento pu essere mantenuto locale -
     riducendo il traffico generale e aumentando la velocit senza
     necessariamente aumentare la banda effettiva.

    Ragioni di sicurezza possono imporre che a classi diverse di utenti
     non sia consentito condividere la stessa rete - dal momento che il
     traffico su una rete pu sempre essere intercettato da un utente
     riconoscibile sulla rete stessa. Il meccanismo delle sottoreti
     consente di impedire al dipartimento commerciale di ficcare il naso
     nel traffico del dipartimento Ricerca e Sviluppo (oppure consente
     di impedire agli studenti di fare lo stesso con la rete
     d'amministrazione dell'ateneo)!

    Possedete dispositivi che usano tecnologie di rete incompatibili
     tra loro, ma avete necessit di conneterle insieme (come gi
     detto).


  6.  Come predisporre una sottorete a partire da un indirizzo IP

  Avete deciso di suddividere il vostro indirizzo di rete IP per usarlo
  in tante sottoreti, come potete fare? Di seguito sono elencati i passi
  salienti da compiere, che verrano spiegati in dettaglio pi avanti:

    Impostate fisicamente la rete (la cablatura e le interconnessioni -
     come i router);

    Decidete quanto grande deve essere ciascuna sottorete in termini di
     dispositivi che dovranno essere connessi a essa - per esempio sulla
     base di quanti indirizzi IP potranno essere disponibili per ogni
     segmento;

    Calcolate la maschera di rete appropriata e gli indirizzi di rete;

    Fornite a ciascuna interfaccia il proprio indirizzo e la maschera
     di sottorete che le compete;

    Impostate le tabelle di instradamento (routing) sui router e i
     gateway opportuni, informate i vari dispositivi di rete
     dell'instradamento o dell'instradamento predefinito dove
     necessario;

    Verificate il sistema, risolvete i piccoli inconvenienti e
     rilassatevi!

  Per i propositi di questo esempio si assumer di disporre di una rete
  classe C, il cui unico indirizzo : 192.168.1.0

  Questa classe ci rende disponibili fino a un massimo di 254 interfacce
  (host), pi l'indirizzo di rete (192.168.1.0) e l'indirizzo di
  broadcast (192.168.1.255).


  6.1.  Impostare le connessioni fisiche

  Avrete bisogno di installare le corrette infrastrutture di cablaggio
  per interconnettere tutti i dispositivi previsti in modo compatibile
  con la struttura fisica del sito.

  Avrete bisogno di approntare dei meccanismi per connettere insieme i
  vari segmenti (router, convertitori per mezzi diversi ecc.)

  Una discussione dettagliata di questi aspetti  ovviamente impossibile
  in questa sede. Se doveste averne bisogno esistono consulenti che
  offrono proprio questo tipo di servizio di progettazione e
  installazione di reti.   anche disponibile dell'aiuto gratuito in un
  certo numero di newsgroup (si veda comp.os.linux.networking).


  6.2.  Determinare la grandezza della sottorete

  Il numero di possibili sottoreti che si possono creare si scontra con
  un certo numero di indirizzi IP 'sprecati' come conseguenza di questa
  operazione.

  Ogni rete IP possiede due indirizzi non assegnabili direttamente agli
  host - l'indirizzo di rete in s e l'indirizzo di broadcast.  Quando
  si creano delle sotoreti, ciascuna di esse ha bisogno che le venga
  riservata una coppia di questi indirizzi - essi devono essere numeri
  validi all'interno dell'intervallo di indirizzi relativo a ciascuna
  sottorete.

  Quindi, suddividendo un rete in due sottoreti separate troveremo due
  indirizzi di rete e due indirizzi di broadcast - con la conseguenza di
  aumentare il numero degli indirizzi 'inutilizzabili' per le interfacce
  (host); creando 4 sottoreti gli indirizzi che si "perdono" diventano
  otto, e cos via.

  Il limite minimo nelle dimensioni di una sottorete consta di 4
  indirizzi IP:

    Due indirizzi utilizzabili per le interfacce - uno per il router
     della rete e uno per l'unico host.

    Un indirizzo di rete.

    Un indirizzo di broadcast.

  Perch poi si voglia realizzare una rete tanto piccola  un'altra
  questione! Con un singolo host tutto il traffico deve dirigersi verso
  un'altra rete. In ogni caso l'esempio  utile per comprendere gli
  effetti della diminuzione degli indirizzi utili, nella creazione di
  sottoreti.

  Inizialmente l'indirizzo IP a disposizione pu essere suddiviso in 2^n
  (n rappresenta il numero di bit a disposizione degli host
  nell'indirizzo, diminuito di uno) indirizzi di sottorete di uguali
  dimensioni (una sottorete potr essere poi ulteriormente suddivisa).

  Si deve cercare di essere pragmatici durante la progettazione - 
  opportuno stimare il numero minimo di singole sottoreti che sia
  consistente con i vincoli fisici, di gestione, tecnologici e di
  sicurezza.


  6.3.  Calcolare la maschera di sottorete e l'indirizzo di rete

  La maschera di sottorete  l'oggetto magico che consente la
  suddivisione locale di una rete in sottoreti multiple.

  La maschera di rete, se non vi sono suddivisioni  semplicemente
  realizzata ponendo a '1' tutti i bit dello spazio di indirizzamento di
  rete e a '0' tutti i bit destinati agli host.


  Quindi, per le tre classi, avremo le seguenti maschere standard:

    Classe A (8 bit di rete) : 255.0.0.0

    Classe B (16 bit di rete): 255.255.0.0

    Classe C (24 bit di rete): 255.255.255.0

  Il modo con cui si realizza una sottorete  chiedere in prestito uno o
  pi bit allo spazio degli host e fare in modo che le interfacce
  interpretino localmente questi bit presi in prestito come parte dei
  bit relativi allo spazio di rete.  Allora, per ottenere due sottoreti
  chiederemo un bit allo spazio degli host mettendo a '1' il bit
  appropriato nella maschera di rete.

  Per un indirizzo di classe C, questa sar la maschera di rete:

    11111111.11111111.11111111.10000000

    o 255.255.255.128.

  Per la rete di classe C del nostro esempio (192.168.1.0), quelle di
  seguito sono alcune delle soluzioni possibili:

  ______________________________________________________________________
  No di
  sottoreti    Host        Rete                       Maschera
  ----------|--------|---------------|-------------------------------------
  2            126        255.255.255.128 (11111111.11111111.11111111.10000000)
  4             62        255.255.255.192 (11111111.11111111.11111111.11000000)
  8             30        255.255.255.224 (11111111.11111111.11111111.11100000)
  16            14        255.255.255.240 (11111111.11111111.11111111.11110000)
  32             6        255.255.255.248 (11111111.11111111.11111111.11111000)
  64             2        255.255.255.252 (11111111.11111111.11111111.11111100)
  ______________________________________________________________________



  Non vi  nessuna ragione di principio che obblighi a procedere secondo
  questa tecnica in cui i bit della maschera di rete sono aggiunti a
  partire dal bit pi significativo degli host procedendo verso il meno
  significativo.  Per se non si fa cos gli indirizzi che risulteranno
  saranno molto strani, rendendo a noi umani la vita difficile nel
  determinare a quale sottorete appartenga un particolare indirizzo,
  visto che non siamo abili a pensare in numeri binari (i computer
  invece trattano e tratteranno qualunque schema verr loro sottoposto
  con definita equanimit).

  Una volta decisa la maschera di rete, si deve lavorare sugli indirizzi
  di rete e di broadcast - e sugli intervalli di indirizzi resisi
  disponibili a questo punto, per ciascuna sottorete. Ancora,
  considerando solo una rete di Classe C, elenchiamo soltanto la parte
  finale dell'indirizzo:













  ______________________________________________________________________
  Netmask         Subnets Network B'cast  MinIP   MaxIP   Hosts  Total Hosts
  --------------------------------------------------------------------------
      128            2       0     127       1     126    126
                           128     255     129     254    126             252

      192            4       0      63       1      62     62
                                64         127      65     126     62
                                   128     191     129     190     62
                                   192     255     193     254     62             248

      224            8       0      31       1      30     30
                                32          63      33      62     30
                                    64      95      65      94     30
                                    96     127      97     126     30
                                   128     159     129     158     30
                                   160     191     161     190     30
                                   192     223     193     222     30
                                   224     255     225     254     30             240
  ______________________________________________________________________



  Come si pu vedere, c' una sequenza perfettamente definita in questi
  numeri che li rende piuttosto facili da verificare.  La parte
  'spiacevole' della realizzazione delle sottoreti  visibile nei
  termini di una riduzione del numero degli indirizzi disponibili per
  gli host, a mano a mano che si aumenta il numero delle sottoreti.

  Con le informazioni fino a qui accumulate si pu procedere ad
  assegnare host, indirizzi di rete e maschere di rete.


  7.  Instradamento

  Se utilizate Linux su un PC con due interfacce di rete come router tra
  due (o pi) sottoreti, dovrete verificare che il kernel supporti l'IP
  Forwarding.  Lanciate un comando di questo tipo:

  ______________________________________________________________________
          cat /proc/ksyms | grep ip_forward
  ______________________________________________________________________



  Dovreste ottenere qualcosa del genere...

  ______________________________________________________________________
  00141364 ip_forward_Rf71ac834
  ______________________________________________________________________



  Se non accade significa che il supporto per l'IP forwarding non 
  disponibile e dovrete ricompilare e reinstallare il kernel
  riconfigurato.

  Per il nostro esempio, facciamo l'ipotesi che si voglia suddividere
  l'indirizzo di classe C 192.168.1.0 in 4 sottoreti (ognuna dele quali
  disponga di 62 indirizzi liberi per le interfacce).  Poi due di queste
  sottoreti si vuole che siano riaccorpate a costituire un'unica rete
  pi grande, ottenendo cos fisicamente tre reti.

  Si avr:


  ______________________________________________________________________
  Rete            Broadcast               Maschera                        Hosts
  192.168.1.0     192.168.1.63    255.255.255.192         62
  192.168.1.64    192.168.1.127   255.255.255.192         62
  182.168.1.128   192.168.1.255   255.255.255.126         124 (see note)
  ______________________________________________________________________



  Nota: la ragione per la quale l'ultima rete ha soltanto 124 indirizzi
  utili (invece di 126 come ci si sarebbe aspettati) sta nel fatto che
  essa  una 'super rete' composta di due sottoreti. Gli host delle
  altre due reti interpreteranno 192.168.1.192 come indirizzo di rete
  della sottorete 'non esistente'. E 192.168.1.191 come indirizzo di
  broadcast della sottorete 'non esistente'.

  Quindi, se si utilizzasse 192.168.1.191 o 192 come indirizzi di host
  sulla terza rete, le macchine delle sottoreti pi piccole non
  sarebbero in grado di comunicare tra loro.

  Ci mette in evidenza un aspetto importante della questione - gli
  indirizzi utilizzabili sono determinati dalla sottorete PI PICCOLA in
  un determinato spazio di indirizzamento.


  7.1.  Le tabelle di instradamento

  Si assuma che un computer con un sistema Linux agisca come router per
  questa sottorete. Esso avr tre interfacce di rete per le LAN e, con
  ogni probabilit una quarta interfaccia verso Internet (che
  rappresenter il suo instradamento predefinito - dafault route).

  Facciamo l'ipotesi che la macchina Linux utilizzi il pi basso degli
  indirizzi IP disponibili in ciascuna sottorete per ognuna delle
  proprie interfacce.  La configurazione di rete sar del tipo seguente:

  ______________________________________________________________________
  Interfaccia     Indirizzo               Maschera
  eth0            192.168.1.1             255.255.255.192
  eth1            192.168.1.65    255.255.255.192
  eth2            192.168.1.129   255.255.255.128
  ______________________________________________________________________



  L'instradamento (routing) che Linux predisporr potr essere:

  ______________________________________________________________________
  Destinazione    Gateway         Maschera        Iface
  192.168.1.0     0.0.0.0         255.255.255.192         eth0
  192.168.1.64    0.0.0.0         255.255.255.192         eth1
  192.168.1.128   0.0.0.0         255.255.255.128         eth2
  ______________________________________________________________________



  Su ciascuna sottorete, gli host dovrebbero essere configurati con il
  proprio indirizzo IP e la maschera relativa alla rete cui
  appartengono.  In ciascun host verr dichiarato come suo
  gateway/router il PC Linux con l'indirizzo che esso ha nella sottorete
  in cui si trova l'host stesso.

  Robert Hart Melbourne, Australia March 1997.



  kerneld mini-HOWTO
  Henrik Storner, <storner@osiris.ping.dk>
  v1.7, 19 luglio 1997

  Questo documento spiega come puoi usare la funzione kerneld nei kernel
  di Linux.  L'ultima versione rilasciata di questo documento la puoi
  trovare all'indirizzo  <http://eolicom.olicom.dk/~storner/kerneld-
  mini-HOWTO.html>.  Dopo ogni pubblicazione di questo mini-HOWTO puoi
  trovare degli aggiornamenti nella mia lista disordinata dei cambia
  menti all'indirizzo  <http://eolicom.olicom.dk/~storner/kern.html>.
  Traduzione di Lorenzo Cappelletti, <L.Cappelletti@POBoxes.com>.

  1.  Ringraziamenti


  Se dovessi trovare delle cose sbagliate in questo documento, ti
  pregherei di farmelo sapere.

  Le seguenti persone hanno contribuito per questo mini-HOWTO in alcuni
  punti:

    Bjorn Ekwall <bj0rn@blox.se>

    Ben Galliart <bgallia@luc.edu>

    Cedric Tefft <cedric@earthling.net>

    Brian Miller <bmiller@netspace.net.au>

    James C. Tsiao <jtsiao@madoka.jpl.nasa.gov>

  Ho apprezzato molto gli incoraggiamenti ed i suggerimenti che mi hanno
  spedito i lettori di questo mini-HOWTO.




  2.  Preliminari



  2.1.  Cos' kerneld ?


  kerneld  una caratteristica introdotta durante lo sviluppo dei kernel
  1.3 da Bjorn Ekwall <mailto:bj0rn@blox.se>.  Viene acclusa con tutti i
  kernel delle versioni 2.0 e 2.1.  Permette ai moduli del kernel
  (cio driver di periferica, driver di rete, filesystem) di venir
  caricati automaticamente quando c' bisogno, invece di doverlo fare
  manualmente con modprobe o insmod.

  E per motivi pi divertenti, nonostante questi non siano (ancora?)
  integrati con il kernel standard:

    pu essere impostato per lanciare un programma, invece del solito
     schermo nero, permettendoti cos di usare ogni programma come uno
     screen-saver;

    similmente al supporto dell'oscuramento dello schermo, puoi anche
     cambiare il beep di console in qualche cosa di completamente
     differente...

  kerneld consiste di due entit separate:

    un supporto nel kernel di Linux che permette di inviare delle
     richieste ad un demone, affinch sappia che un modulo  necessario
     per una certa operazione;

    un demone a livello utente che capisca quali moduli devono essere
     caricati per soddisfare alle richieste del kernel.

  Entrambe le parti dovranno lavorare per far funzionare il supporto
  kerneld.  Non  sufficiente che ne sia configurata una sola.



  2.2.  Perch avrei bisogno di usarlo?


  Ci sono alcune buone ragioni per usare kerneld.  Quelle che menzioner
  sono le mie, gli altri potrebbero volerlo usare per altri motivi.


    Se devi compilare kernel per svariati sistemi che si distinguono di
     poco (differenti tipi di schede di rete, per esempio), puoi
     preparare un singolo kernel e alcuni moduli invece di essere
     costretto a compilare un kernel per ogni sistema.

    I moduli sono pi facili da provare per gli sviluppatori (non c'
     bisogno di ravviare il sistema per caricare e scaricare i driver).
     Questo vale per tutti i moduli, non solo per quelli caricati da
     kerneld.

    Limita l'utilizzo di memoria da parte del kernel, cio hai pi
     memoria disponibile per le applicazioni.  La memoria usata dal
     kernel non  mai trasferita alla memoria di swap, cos se ci sono
     100kB di driver inutilizzati compilati nel kernel, questi sono
     semplicemente RAM sprecata.

    Alcune delle cose che uso (il driver per l'unit a nastro, per
     esempio, o l'iBCS) sono solo disponibili come moduli.  Ma non
     voglio scocciarmi con il loro caricamento e scaricamento ogni volta
     che ne ho bisogno.

    Le persone che curano le distribuzioni Linux non devono compilare
     284 differenti immagini di boot: ogni utente carica i driver di cui
     ha bisogno per il suo hardware.  Questo  usato, per esempio, dalla
     RedHat 4.0 nella sua installazione.

  Certo, ci sono anche ragioni per le quali potresti non volerlo usare
  (potresti preferire un unico file d'immagine per il kernel con tutti i
  tuoi driver compilati staticamente).  In questo caso stai leggendo il
  documento sbagliato.



  2.3.  Dove posso prelevare i componenti necessari?


  Il supporto nel kernel di Linux fu introdotto con Linux 1.3.57.  Se
  hai una versione di kernel precedente, avrai bisogno di aggiornarla se
  vuoi il supporto per kerneld.  Tutti i maggiori siti ftp di Linux
  contengono i sorgenti del kernel.  Ti raccomando di aggiornarti
  all'ultima versione stabile, 2.0, ora a livello di patch 29:

    <ftp://sunsite.unc.edu/pub/Linux/kernel/v2.0/>linux-2.0.29.tar.gz

    <ftp://tsx-11.mit.edu/pub/linux/sources/system/v2.0/>linux-2.0.29.tar.gz

    <ftp://ftp.funet.fi/pub/OS/Linux/PEOPLE/Linus/v2.0/>linux-2.0.29.tar.gz


  Il demone a livello utente  incluso nel pacchetto modules-1.2.8 e con
  il pi aggiornato modules-2.0.  Questi sono normalmente disponibili
  dallo stesso sito in cui avete trovato i sorgenti del kernel, mentre i
  siti ufficiali includono:

    <ftp://sunsite.unc.edu/pub/Linux/kernel/>/modules-2.0.0.tar.gz

    <ftp://tsx-11.mit.edu/pub/linux/sources/sbin/>modules-2.0.0.tar.gz

    <ftp://ftp.funet.fi/pub/OS/Linux/tools/>modules-2.0.0.tar.gz

  NOTA: se vuoi provare a caricare i moduli con gli ultimi kernel 2.1 in
  fase di sviluppo, devi procurarti il pacchetto modutils- (NON
  modules-).  Comunque ``vedi pi avanti'' per i problemi che si possono
  avere con i moduli ed il kernel 2.1.




  3.  Cominciamo a fare sul serio



  3.1.  Come impostare il tutto?


  Primo procurarsi i componenti necessari: un kernel adatto e le ultime
  utility per i moduli.  Poi devi installarle.  Molto semplice:
  decomprimi i sorgenti e lancia make install.  Questo compila e
  installa in /sbin i seguenti programmi: genksysm, insmod, lsmod,
  modprobe, depmod, kerneld.  Ti raccomando di aggiungere le seguenti
  linee ai tuoi script di avvio che effettuano alcune impostazioni
  necessarie ogni volta che Linux viene avviato.  Aggiungi le seguenti
  linee al tuo file /etc/rc.d/rc.S (se utilizzi Slackware) o a
  /etc/rc.d/rc.sysinit (se utilizzi SysVinit, cio Debian, RedHat,
  Caldera):



       # Lancia kerneld - questo deve accadere molto presto nel processo
       # di boot, sicuramente PRIMA che venga avviato fsck sui filesystem,
       # in quanto potrebbe richiedere l'autocaricamento di qualche driver
       if [ -x /sbin/<tt/kerneld/ ]
       then
               /sbin/<tt/kerneld/
       fi

       # I comandi fsck standard vanno qui
       # assieme al comando mount per montare il fs in lettura-scrittura


       # Aggiornamento del file per le dipendenze kernel-moduli
       # Il fs root ora DEVE essere montato in lettura-scrittura
       if [ -x /sbin/depmod ]
       then
               /sbin/depmod -a
       fi




  La prima parte lancia kerneld.

  La seconda parte chiama depmod -a all'avvio.  Il programma depmod
  costruisce una lista di moduli disponibili e analizza le loro inter-
  dipendenze, cos si sa se, per un modulo che sta per essere caricato,
   necessario caricarne un altro prima.

  Nota: nelle recenti versioni di kerneld c' la possibilit di fare il
  link verso le librerie GNU dbm, libgdbm.  Se abiliti questa opzione
  quando compili le utility per i moduli, kerneld non partir se libgdbm
  non  disponibile, caso che potrebbe accadere se hai /usr su una
  partizione separata e fai partire kerneld prima che /usr sia montata.
  La soluzione consigliata  di spostare libgdbm da /usr/lib a /lib o
  linkarla staticamente a kerneld.

  Successivamente decomprimi i sorgenti del kernel, configuralo e
  compilane uno che ti soddisfi.  Se non lo hai mai fatto prima, devi
  definitivamente leggerti il file README che si trova al primo livello
  dei sorgenti di Linux.  Quando lanci make config per configurare il
  kernel, devi prestare attenzione ad alcune domande che appaiono verso
  l'inizio:



       Enable loadable module support (CONFIG_MODULES) [Y/n/?] Y




  Hai bisogno di selezionare il supporto per i moduli caricabili o non
  ci saranno moduli per kerneld da caricare! Rispondi con Yes.



       Kernel daemon support (CONFIG_KERNELD) [Y/n/?] Y




  Anche questo, ovviamente,  necessario. A questo punto molte delle
  cose nel kernel possono essere compilate come moduli. Vedrai domande
  come:


       Normal floppy disk support (CONFIG_BLK_DEV_FD) [M/n/y/?]




  dove puoi rispondere con una M che sta per Modulo. Generalmente
  solo i driver necessari per far partire il sistema (il driver per
  l'hard-disk, il driver per il filesystem principale) dovrebbero essere
  compilati nel kernel; gli altri possono essere compilati come moduli.

  Una volta finito con make config, lancia make dep, make clean, make
  zImage o make zlilo, make modules e make modules_install.

  Uff!

  Il comando make zImage mette la nuova immagine del kernel nel file
  /arch/i386/boot/zImage.  Avrai bisogno di copiarla dove tieni la tua
  immagine di boot o di configurare LILO in seguito.

  Per maggiori informazioni su come configurare, compilare e installare
  il tuo kernel, dai un'occhiata al Kernel-HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>, postato
  regolarmente in comp.os.linux.answers e disponibile su sunsite.unc.edu
  in /pub/Linux/docs/HOWTO.



  3.2.  Proviamo kerneld


  Ora fai il reboot con il nuovo kernel.  Quando il sistema  di nuovo
  pronto, puoi lanciare un ps -ax con il quale dovresti vedere una linea
  dedicata a kerneld:



       PID TTY STAT  TIME COMMAND
        59  ?  S     0:01 /sbin/kerneld




  Una delle cose carine con kerneld  che, una volta che hai installato
  il kernel e il demone, poche impostazioni sono ancora necessarie.  Per
  un inizio prova ad usare uno dei driver che hai compilato come modulo
  (in generale tutto funziona senza ulteriori configurazioni).  Io ho
  compilato il driver per il floppy come modulo, cos posso mettere un
  dischetto DOS nel drive e


       osiris:~ $ mdir a:
        Volume in drive A has no label
        Volume Serial Number is 2E2B-1102
        Directory for A:/

       binuti~1 gz       1942 02-14-1996  11:35a binutils-2.6.0.6-2.6.0.7.diff.gz
       libc-5~1 gz      24747 02-14-1996  11:35a libc-5.3.4-5.3.5.diff.gz
               2 file(s)        26689 bytes




  Cos il driver del floppy funziona: viene caricato automaticamente da
  kerneld quando provo ad usare il disco floppy.

  Per vedere, invece, che il modulo del floppy viene effettivamente
  caricato, puoi lanciare /sbin/lsmod che lista tutti i moduli
  attualmente caricati:


       osiris:~ $ /sbin/lsmod
       Module:        #pages:  Used by:
       floppy            11    0 (autoclean)




  L'autoclean sta ad indicare che il modulo verr automaticamente
  rimosso da kerneld dopo che questo non viene usato per pi di un min
  uto.  Cos le 11 pagine di memoria (=44kB, una pagina  4kB) verranno
  utilizzate solo quando accedo al drive del floppy (se non uso il
  floppy per pi di un minuto, verranno liberate).  Alquanto carino, se
  sei a corto di memoria per le tue applicazioni!


  4.  Come fa kerneld  a sapere quale modulo caricare?


  Nonostante kerneld ci venga fornito con informazioni gi pronte sui
  tipi pi comuni di moduli, ci sono situazioni in cui kerneld non sapr
  come trattare una richiesta del kernel.  Questo accade per moduli tipo
  il driver per il CD-ROM o i driver di rete, dove ci sono pi di un
  modulo da poter caricare.
  Le richieste che il demone kerneld riceve dal kernel possono
  appartenere ad uno dei seguenti tipi:

    ``driver di periferica a blocchi''

    ``driver di periferica a caratteri''

    ``formato binario''

    ``disciplinea di linea tty''

    ``filesystem''

    ``periferica di rete''

    servizio di rete (per esempio rarp)

    ``protocollo di rete'' (per esempio IPX)

  kerneld determina quale modulo dovrebbe essere caricato cercando nel
  file di configurazione /etc/conf.modules.  Ci sono due tipi di voci
  possibili in questo file: path (dove si trovano i file dei moduli) e
  alias (quale modulo dovrebbe essere caricato).  Se non hai gi questo
  file, dovresti crearlo con il comando:


       /sbin/modprobe -c | grep -v '^path' > /etc/conf.modules




  Se vuoi aggiungere un'altra direttiva path ai percorsi di default,
  devi anche includere tutti gli altri percorsi di default, in quanto
  una direttiva path in /etc/conf.modules rimpiazzer tutti quelli che
  modprobe conosce per default!

  Normalmente non avrai bisogno di aggiungere alcun percorso, in quanto
  l'insieme di quelli precompilati dovrebbe essere sufficiente per tutte
  le configurazioni normali (ed altre ancora...).  Promesso!

  Diversamente, se vuoi aggiungere un alias o una direttiva option,
  le nuove voci in /etc/conf.modules verranno aggiunte a quelle che
  modprobe gi conosce.  Se devi ridefinire un alias o options, le
  nuove voci in /etc/conf.modules sovrascriveranno quelle precompilate.



  4.1.  Periferiche a blocchi


  Se esegui /sbin/modprobe -c, otterrai una lista di moduli che kerneld
  conosce, e di richieste alle quali questi corrispondono.  Per esempio,
  la richiesta che termina con il caricamento del driver del floppy 
  (per una periferica a blocchi che ha un major number pari a 2):


       osiris:~ $ /sbin/modprobe -c | grep floppy
       alias block-major-2 floppy




  Perch block-major-2?  Perch le periferiche floppy /dev/fd* usano una
  periferica con major di 2 e sono periferiche a blocchi:


  osiris:~ $ ls -l /dev/fd0 /dev/fd1
  brw-rw-rw-   1 root     root       2,   0 Mar  3  1995 /dev/fd0
  brw-r--r--   1 root     root       2,   1 Mar  3  1995 /dev/fd1






  4.2.  Periferiche a caratteri


  Le periferiche a caratteri sono trattate in modo analogo.  Per esempio
  il driver per l'unit a nastro connessa come floppy ha un major di 27:


       osiris:~ $ ls -lL /dev/ftape
       crw-rw----   1 root     disk      27,   0 Jul 18  1994 /dev/ftape




  Per kerneld non conosce per default il driver dell'unit a nastro.
  Infatti non  presente nella lista ottenuta da /sbin/modprobe -c.

  Cos per impostare kerneld affinch carichi il driver per l'unit a
  nastro, si deve aggiungere una linea al file di configurazione di
  kerneld /etc/conf.modules:


       alias char-major-27 ftape






  4.3.  Periferiche di rete


  Puoi anche usare il nome della periferica al posto di impostazioni
  come char-major-xxx o block-major-yyy.  Questo  particolarmente
  utile per i driver di rete. Per esempio un driver per una scheda di
  rete tipo ne2000 abilitata come eth0 verrebbe caricato con


       alias eth0 ne




  Se hai la necessit di passare alcune opzioni al driver (per esempio
  per informare il modulo su quale IRQ la scheda di rete sta usando)
  aggiungi una linea options:


       options ne irq=5




  Questo far in modo che kerneld carichi il driver NE2000 con il
  comando:



  /sbin/modprobe ne irq=5




  Ovviamente le opzioni effettivamente disponibili sono specifiche al
  modulo che caricherai.



  4.4.  Formati degli eseguibili


  I formati binari sono trattati in modo simile. Ogni volta che provi a
  lanciare un programma che kerneld non sa come caricare, kerneld riceve
  una richiesta per binfmt-xxx, dove xxx  il numero determinato dai
  primi byte dell'eseguibile. Cos la configurazione di kerneld per
  supportare il modulo binfmt_aout per gli eseguibili ZMAGIC (a.out) :


       alias binfmt-267 binfmt_aout




  in quanto il magic number (vedi /etc/magic) per file ZMAGIC  267.
  (Se provi a controllare /etc/magic, vedrai il numero 0413, ma
  /etc/magic usa numeri ottali, mentre kerneld li usa decimali, e ottale
  413 = decimale 267).  In realt ci sono tre varianti leggermente
  diverse per gli eseguibili a.out (NMAGIC, QMAGIC and ZMAGIC), cos per
  un pieno supporto del modulo binfmt_aout abbiamo bisogno di:


       alias binfmt-264 binfmt_aout  # eseguibile puro (NMAGIC)
       alias binfmt-267 binfmt_aout  # eseguibile demand-paged (ZMAGIC)
       alias binfmt-204 binfmt_aout  # eseguibile demand-paged (QMAGIC)




  I formati binari a.out, Java e iBCS sono riconosciuti automaticamente
  da kerneld, senza alcuna configurazione.



  4.5.  Disciplinea di linea (slip, cslip e ppp)


  Le disciplinee di linea sono richieste con tty-ldisc-x, dove x
  assume solitamente i valori 1 (per SLIP) o 3 (per PPP).  Entrambi sono
  riconosciuti da kerneld automaticamente.

  A proposito di ppp, se vuoi che kerneld carichi il modulo bsd_comp per
  la compressione dei dati per il ppp, allora devi aggiungere le due
  linee seguenti al tuo /etc/conf.modules:


       alias tty-ldisc-3 bsd_comp
       alias ppp0 bsd_comp







  4.6.  Famiglie di protocolli di rete (IPX, AppleTalk, AX.25)


  Anche alcuni protocolli di rete possono essere caricati come moduli.
  Il kernel domanda a kerneld di una famiglia di protocolli (per esempio
  IPX) con una richiesta del tipo net-pf-x, dove x  un numero che sta
  ad indicare la famiglia voluta.  Per esempio net-pf-3  AX.25, net-
  pf-4  IPX e net-pf-5  AppleTalk (questi numeri sono determinati
  dalle definizioni AF_AX25, AF_IPX, etc. nel file sorgente di Linux
  include/linux/socket.h).


       alias net-pf-4 ipx




  Dai un'occhiata anche alla sezione riguardante i ``problemi comuni''
  per informazioni su come evitare alcuni noiosi messaggi all'avvio
  relativi a famiglie di protocolli indefiniti.



  4.7.  File system


  Le richieste di kerneld per i filesystem sono semplicemente i nomi dei
  filesystem.  Un tipico uso potrebbe essere quello di caricare il
  modulo isofs per i filesystem del CD-ROM, cio per filesystem di tipo
  iso9660:


       alias iso9660 isofs







  5.  Periferiche che richiedono una configurazione speciale


  Alcune periferiche richiedono una configurazione che va leggermente al
  di l del semplice uso di alias del tipo periferica-modulo.

    periferiche a caratteri con major number 10: ``Periferiche varie''

    ``periferiche SCSI''

    ``periferiche che richiedono inizializzazioni speciali''



  5.1.  char-major-10: mouse,watchdog e random


  Le periferiche hardware sono usualmente identificate con il loro major
  number, cos per l'unit a nastro si ha un char-major-27.  Ci
  nonostante, se scorri le voci presenti in /dev che contengono il char-
  major-10, vedrai che queste formano un bel gruppo di periferiche molto
  diverse fra loro:

    mouse di vari tipi (bus mouse, mouse PS/2)


    periferiche watchdog

    la periferica del kernel random

    interfaccia APM (Advanced Power Management)

  Ovviamente queste periferiche sono controllate da altrettanti moduli
  differenti, non da uno solo.  Perci la configurazione di kerneld per
  queste periferiche eterogenee fa uso del major number e del minor
  number:


       alias char-major-10-1 psaux     # per mouse PS/2
       alias char-major-10-130 wdt     # per il watchdog WDT




  Hai bisogno di una versione del kernel 1.3.82 o superiore per poter
  utilizzare questa caratteristica; le versioni precedenti non passano
  il minor number a kerneld, impedendogli di capire quale modulo di
  periferica caricare.



  5.2.  Caricamento di driver SCSI: la voce scsi_hostadapter


  I driver per le periferiche SCSI consistono in un driver per
  l'adattatore SCSI (per esempio un Adaptec 1542) e di un driver per il
  tipo di periferica SCSI che usi (per esempio un hard-disk, un CD-ROM o
  un'unit a nastro).  Tutti questi possono essere caricati come moduli.
  Perci, quando vuoi accedere, per esempio, al lettore di CD-ROM
  connesso alla scheda Adaptec, il kernel e kerneld sanno solo che c'
  bisogno di caricare il modulo sr_mod per supportare il CD-ROM SCSI, ma
  non sanno a quale controller il CD-ROM  connesso n, tanto meno,
  quale modulo caricare per supportare il controller SCSI.

  Per risolvere questo problema puoi aggiungere una voce per il driver
  SCSI al tuo /etc/conf.modules che dica a kerneld quale dei possibili
  moduli per controller SCSI deve caricare:


       alias scd0 sr_mod               # sr_mod per CD-ROM SCSI...
       alias scsi_hostadapter aha1542  # ...necessitano del driver Adaptec




  Questo funziona solo con versioni del kernel 1.3.82 o superiori.

  Il metodo va bene se hai un solo controller SCSI.  Se ne hai pi
  d'uno, le cose diventano un po' pi difficili.

  In generale non puoi lasciare che kerneld carichi un driver per un
  adattatore SCSI se un driver per un altro adattatore SCSI  gi
  installato.  Sei costretto a compilare entrambi i driver direttamente
  nel kernel (non come moduli) o caricare i moduli manualmente.

  Anche se un modo per caricare pi driver SCSI c'.  James Tsiao ha
  avuto questa idea:

       Puoi facilmente fare in modo che kerneld carichi il secondo
       driver scsi impostando le dipendenze in modules.dep a mano.
       Hai bisogno solo di una voce come:

  /lib/modules/2.0.30/scsi/st.o: /lib/modules/2.0.30/scsi/aha1542.o




  per far caricare a kerneld aha1542.o prima che carichi st.o.
  La mia macchina a casa  configurata praticamente come sopra
  e tutto funziona bene per le mie periferiche scsi secon
  darie, inclusa l'unit a nastro, il CD-ROM e periferiche
  scsi generiche. La controparte sta nel fatto che depmod -a
  non pu rilevare automaticamente queste dipendenze, cos
  l'utente ha bisogno di aggiungerle manualmente e non pu
  lanciare depmod -a all'avvio.  Ma, una volta che tutto 
  configurato, kerneld caricher in automatico l'aha1542.o
  senza problemi.


  Dovresti essere conscio che questa tecnica funziona solo se hai tipi
  diversi di periferiche SCSI collegate ai due controller (per esempio
  degli hard-disk su un controller e lettori CD-ROM, unit a nastro o
  periferiche SCSI generiche sull'altro).



  5.3.  Quando caricare un modulo non  abbastanza: la voce 'post-
  install'


  Qualche volta caricare solo il modulo non  abbastanza per far
  funzionare le cose.  Per esempio, se hai compilato la scheda sonora
  come modulo, spesso  conveniente impostare un certo livello per il
  volume.  L'unico problema  che l'impostazione svanisce quando viene
  caricato il modulo un'altra volta. Ecco, in breve, un trucco di Ben
  Galliart <mailto:bgallia@luc.edu>:

       La soluzione definitiva richiesta dall'installazione del
       pacchetto setmix-0.1 <ftp://sun
       site.unc.edu/pub/Linux/apps/sound/mixers/setmix-0.1.tar.gz>.
       E poi aggiungendo le seguenti linee al mio /etc/conf.mod
       ules:


       post-install sound /usr/local/bin/setmix -f /etc/volume.conf





  Questa linea fa in modo che kerneld, dopo che il modulo per l'audio 
  stato caricato, lanci il comando indicato dalla voce post-install
  sound.  Cos il modulo sonoro viene configurato con il comando
  /usr/local/bin/setmix -f /etc/volume.conf.

  Ci pu essere utile anche per altri moduli, per esempio il modulo lp
  pu essere configurato con il programma tunelp aggiungendo:


       post-install lp tunelp <options>




  Affinch kerneld recepisca queste opzioni, hai bisogno di una versione
  di kerneld che sia la 1.3.69f o superiore.


  Nota: una versione recente di questo mini-HOWTO parlava di un'opzione
  pre-remove, che si sarebbe potuta usare per eseguire un comando
  appena prima che kerneld rimuovesse un modulo.  Ci nonostante questa
  opzione non ha mai funzionato e il suo uso  perci scoraggiato (pi
  appropriatamente, questa opzione scomparir in una release futura di
  kerneld). L'intera struttura delle impostazioni per un modulo sta
  subendo alcuni cambiamenti in questo momento e potrebbe essere diversa
  sul tuo sistema quando leggerai questo documento.




  6.  Spiare kerneld


  Se hai provato qualsiasi cosa e non sei proprio capace di immaginare
  cosa il kernel stia chiedendo di fare a kerneld, c' un modo di vedere
  le richieste che kerneld riceve e, da questo, capire cosa deve andare
  in /etc/conf.modules: l'utility kdstat.

  Questo piccolo e grazioso programma fa parte del pacchetto dei moduli,
  ma non viene compilato n installato per default.  Per ottenerlo:


       cd /usr/src/modules-2.0.0/kerneld
       make kdstat




  Poi, per fare in modo che kerneld mostri informazioni su cosa sta
  facendo, lancia


       kdstat debug




  e kerneld comincer a vomitare messaggi sulla console dicendoti di
  cosa sta facendo.  Se poi provi ad eseguire il comando che vuoi uti
  lizzare, vedrai comparire le richieste di kerneld; queste possono
  essere messe in /etc/conf.modules utilizzando un sinonimo per il mod
  ulo necessario a completare il lavoro.

  Per fermare la fase di debug, lancia /sbin/kdstat nodebug.




  7.  Usi particolari di kerneld


  Lo sapevo che volevi chiedere come impostare il modulo per lo screen-
  saver...

  La directory kerneld/GOODIES nel pacchetto dei moduli ha un paio di
  patch per il supporto di kerneld di screen-saver e beep della console;
  queste non fanno ancora parte del kernel ufficiale.  Cos avrai
  bisogno di installarle e ricompilare il kernel.

  Per installare una patch si usa il comando patch:




  cd /usr/src/linux
  patch -s -p1 < /usr/src/modules-2.0.0/<tt/kerneld//GOODIES/blanker_patch




  Poi ricompila ed installa il nuovo kernel.

  Quando lo screen-saver viene attivato kerneld eseguir il comando
  /sbin/screen-blanker (questo pu essere uno script di shell che lancia
  il tuo screen-saver favorito).

  Quando il kernel vuole ripristinare lo schermo invia un segnale
  SIGQUIT al processo che sta eseguendo /sbin/screenblanker.  Lo script
  di shell deve poterlo catturare e terminare.  Ricordati di
  ripristinare lo schermo alla modalit testo originale!




  8.  Problemi comuni e cose di cui non capisci il motivo



  8.1.  Perch ottengo il messaggio ``Cannot locate module for net-pf- x
  '' (Non riesco a trovare il modulo per net-pf- x ) quando lancio
  ifconfig?


  Circa alla versione 1.3.80 del kernel, il codice per la gestione delle
  reti fu cambiato per permettere il caricamento di famiglie di
  protocolli (per esempio IPX, AX.25 e AppleTalk) come moduli.  Ci
  caus l'aggiunta di una nuova richiesta di kerneld: net-pf-X, dove X 
  un numero che identifica il protocollo (vedi
  /usr/src/linux/include/linux/socket.h per il significato dei vari
  numeri).  Sfortunatamente ifconfig provoca in modo accidentale questi
  messaggi, cosicch molte persone ottengono un paio di messaggi di log
  quando il sistema viene avviato e viene lanciato ifconfig per
  configurare la periferica loopback.  I messaggi non indicano nulla di
  pericoloso e puoi disabilitarli aggiungendo le linee:


       alias net-pf-3 off      # Dimenticati di AX.25
       alias net-pf-4 off      # Dimenticati di IPX
       alias net-pf-5 off      # Dimenticati di AppleTalk




  a /etc/conf.modules.  Ovviamente, se utilizzi IPX come modulo, non
  devi aggiungere la linea che lo disabiliti.



  8.2.  Dopo la partenza di kerneld  il mio sistema viene messo in
  ginocchio quando attivo una connessione ppp


  Ci sono stati un paio di casi di questo problema.  Sembra essere
  dovuto ad una sfortunata interazione fra kerneld e lo script tkPPP che
  viene usato su alcuni sistemi per impostare e configurare la
  connessione PPP (lo script, apparentemente, si morde la coda mentre
  esegue ifconfig). Questo richiama kerneld per cercare i moduli net-pf-
  x (vedi sopra), tenendo il sistema in sovraccarico e generando,
  eventualmente, un sacco si messaggi del tipo Cannot locate module for
  net-pf-x nel log di sistema.  Non si conosce alcun modo per aggirare
  il problema, se non quello di evitare tkPPP o di cambiarlo usando
  qualche altro modo per tenere sotto controllo la connessione.



  8.3.  kerneld  non carica il mio driver SCSI!


  Aggiungi una voce per il tuo adattatore SCSI al tuo /etc/conf.module.
  Vai a vedere la descrizione della voce ``scsi_hostadapter'' sopra.



  8.4.  modprobe si lamenta che gcc2_compiled non  definito


  Questo  un errore nelle utility dei moduli che si verifica solo con
  le binutils 2.6.0.9 e seguenti, e che  anche documentato nelle note
  per le binutils.  Dacci un'occhiata.  Oppure procurati un
  aggiornamento per le utility dei moduli che porgano rimedio, come per
  esempio modules-2.0.0.



  8.5.  Il driver della mia scheda sonora non si ricorda delle
  impostazioni per il volume, etc.


  Le impostazioni per un modulo sono salvate all'interno del modulo
  stesso quando viene caricato.  Cos, quando kerneld auto-scarica il
  modulo, ogni impostazione che hai fatto viene dimenticata e la volta
  successiva il modulo ritorna alle impostazioni di default.

  Puoi dire a kerneld di configurare un modulo, eseguendo un programma,
  dopo che il modulo  stato auto-caricato.  Vedere la ``sezione sopra''
  per la voce post-install.



  8.6.  Dosemu ha bisogno di alcuni moduli. Come posso fare affinch
  kerneld  li carichi?


  Non puoi.  Nessuna delle versioni di Dosemu (ufficiali o di sviluppo)
  supporta il caricamento dei moduli di Dosemu attraverso kerneld.
  Per, se stai utilizzando un kernel 2.0.26 o successivi, non hai pi
  bisogno di alcun modulo speciale Dosemu. Semplicemente aggiornati alla
  versione 0.66.1.



  8.7.  Perch ottengo un messaggio ``Ouch, kerneld timed out, message
  failed'' (Oops, tempo scaduto per kerneld, messaggio fallito)?


  Quando il kernel invia una richiesta a kerneld, si aspetta di ottenere
  un ricevuto entro un secondo.  Se kerneld non invia questo
  riscontro, il messaggio d'errore viene registrato nel log di sistema.
  La richiesta viene ritrasmessa e dovrebbe arrivare a destinazione.

  Questo di solito capita su sistemi con un carico elevato (poich
  kerneld  un processo eseguito in modalit utente, esso viene
  schedulato come ogni altro processo sul sistema).  In momenti di alto
  carico, pu non riuscire ad inviare per tempo il ricevuto, prima che
  scada il tempo per kernel.

  Se questo accade anche quando il carico  scarso, prova a far
  ripartire kerneld.  Uccidi il processo kerneld e fallo ripartire
  ancora con il comando /usr/sbin/kerneld.  Se il problema persiste,
  dovresti inviare un messaggio con l'errore a <linux-
  kernel@vger.rutgers.edu>, ma ti prego di assicurarti che la tua
  versione di kernel e kerneld sia aggiornata prima di spedire messaggi
  sul problema.



  8.8.  mount non aspetta che kerneld  carichi il modulo per il filesys
  tem


  Ci sono stati un certo numero di casi per i quali il comando mount(8)
  non aspettava che kerneld finisse di caricare il modulo del
  filesystem.  lsmod mostrava che kerneld aveva caricato il modulo e,
  ripetendo il comando mount subito dopo, questo in effetti veniva
  fatto.  Questo sembra fosse dovuto ad un errore nella versione 1.3.9f
  delle utility per i moduli che affliggeva alcuni utenti Debian (pu
  essere eliminato procurandosi una versione successiva delle utility
  per i moduli).



  8.9.  kerneld  fallisce nel caricare il modulo ncpfs


  Hai bisogno di compilare le utility per ncpfs con l'opzione
  -DHAVE_KERNELD.  Vedere il Makefile di ncpfs.



  8.10.  kerneld  fallisce nel caricare il modulo per smbfs


  Stai usando un versione delle utility per smbmount troppo vecchia.
  Procurati l'ultima versione (0.10 o successive) da
  <ftp://tsx-11.mit.edu/pub/linux/filesystems/smbfs/>



  8.11.  Ho compilato tutto come modulo e ora il mio sistema non si
  avvia pi


  8.12.  kerneld  fallisce nel caricare il filesystem principale


  Non puoi rendere modulare tutto: il kernel deve avere abbastanza
  driver compilati normalmente affinch sia capace di fare il mount del
  filesystem principale ed eseguire i programmi necessari ad avviare
  kerneld.  Cos non puoi rendere modulare:

    il driver per l'hard-disk sul quale risiede il filesystem
     principale;

    il driver del filesystem stesso;

    il caricatore del formato binario di init, kerneld e altri
     programmi.

  In effetti questo non  vero.  L'ultimo kernel 1.3.x e tutti i 2.x
  supportano l'uso di un ram-disk iniziale che viene caricato da LILO o
  LOADLIN, ed  possibile caricare moduli da questo disco molto presto
  all'interno del processo di avvio.  Il procedimento per farlo 
  descritto nel file Documentation/initrd.txt contenuto con i sorgenti
  del kernel.



  8.13.  kerneld  non viene caricato all'avvio - si lamenta di libgdbm


  Le versioni pi recenti di kerneld hanno bisogno delle librerie dbm di
  GNU, le libgdbm.so, per girare.  Molte installazione hanno questo file
  in /usr/lib, mentre tu stai probabilmente lanciando kerneld prima che
  il filesystem sia stato montato.  Un sintomo di questo  che kerneld
  non parte durante l'avvio (dai tuoi script rc), ma va bene se lo lanci
  manualmente dopo che il sistema  partito.  La soluzione consiste
  nello spostare l'avvio di kerneld dopo che di /usr ne sia stato fatto
  il mount oppure spostare la libreria gdbm sul filesystem principale,
  per esempio in /lib.



  8.14.  Ottengo un ``Cannot load module xxx '' (Non posso caricare il
  modulo xxx ), ma ho appena riconfigurato il kernel senza il supporto
  per xxx !


  L'installazione Slackware (possibilmente altre) crea un file
  /etc/rc.d/rc.modules che opera un esplicito modprobe su una variet di
  moduli.  Quali moduli esattamente vengano testati dipende dalla
  configurazione originale del kernel.  Hai probabilmente riconfigurato
  il tuo kernel escludendo uno o pi dei moduli che vengono testati in
  rc.modules, cos il messaggio/i di errore.  Aggiorna il tuo rc.modules
  commentando ogni modulo che non usi pi, o cancella rc.modules
  completamente e lascia che kerneld carichi i moduli quando ne ha
  bisogno.


  8.15.  Ho ricompilato il kernel e i moduli, e continuo ad ottenere
  messaggi di simboli non risolti all'avvio


  Probabilmente hai riconfigurato e ricompilato il tuo kernel escludendo
  alcuni moduli.  Hai ancora alcuni vecchi moduli che non utilizzi pi
  sparsi in giro per il directory /lib/modules.  La soluzione pi
  semplice  quella di cancellare la directory /lib/modules/x.y.z e dare
  un altro make modules_install dalla directory dei sorgenti del kernel.
  Nota che questo problema capita solo quando si riconfigura il kernel
  senza cambiamenti di versione.  Se vedi questo errore quando ti stai
  aggiornando ad una versione pi nuova, hai un altro tipo di problema.


  8.16.  Ho installato Linux 2.1 e ora non riesco pi a caricare alcun
  modulo


  Linux 2.1  il kernel attualmente in fase di sviluppo.  Come tale ci
  si pu aspettare che le cose cambino da un momento all'altro.  Una
  delle cose che  cambiata in maniera significativa  il modo con il
  quale vengono trattati i moduli e dove il kernel e i moduli vengono
  caricati in memoria.  Inoltre ora  Richard Henderson che si occupa
  dello sviluppo dei moduli del kernel.

  In breve, se vuoi utilizzare i moduli con un kernel 2.1, devi:

    leggere il file Documentation/Changes e vedere quali pacchetti
     hanno bisogno di essere aggiornati sul tuo sistema

    usare l'ultimo pacchetto modutils, disponibile da
     <ftp://ftp.redhat.com/pub/alphabits/> o dal sito mirror presso
     <ftp://tsx-11.mit.edu/pub/linux/packages/alphabits/>

  Ti raccomando di utilizzare almeno un kernel 2.1.29 se vuoi usare i
  moduli con un kernel 2.1.



  8.17.  E a proposito del collegamento alla rete su richiesta?


  kerneld originariamente aveva qualche supporto per stabilire una
  connessione di rete in dial-up su richiesta; provando a spedire
  pacchetti ad una rete senza essere connessi, faceva lanciare a kerneld
  lo script /sbin/request_route per istituire la connessione PPP o SLIP.

  Questo si rivel essere una cattiva idea. Alan Cox, uno dei famosi nel
  networking di Linux, scrisse sulla mailing list linux-kernel:

       Il materiale su request_route  obsoleto, inefficiente e
       inutile [...].  Inoltre  stato rimosso dalla struttura
       2.1.x.


  Invece di usare lo script request_route e kerneld, voglio vivamente
  consigliarti di installare il pacchetto diald
  <http://www.dna.lth.se/~erics/diald.html> di Eric Schenk.




  9.  Messaggio di copyright



  This document is Copyright (c) Henrik Storner, 1996, 1997.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.



  Questo HOWTO  di Henrik Storner (1996-97) ed  distribuito, come gli
  altri HOWTO di Linux, sotto i termini descritti qui di seguito.
  Finch non diversamente asserito, i documenti HOWTO di Linux sono
  propriet dei rispettivi autori. I documenti degli HOWTO di Linux
  possono essere riprodotti e distribuiti in tutto o in parte, con ogni
  mezzo fisico o elettronico, finch questo avviso di copyright 
  mantenuto su tutte le copie. La distribuzione commerciale  permessa e
  incoraggiata; comunque all'autore piacerebbe essere avvisato di ogni
  distribuzione di questo tipo.

  Ogni traduzione, lavoro derivato o comprendente ogni documento degli
  HOWTO di Linux deve essere coperto sotto questo avviso di copyright.
  Cio non potete produrre un lavoro derivato da un HOWTO e imporre
  restrizioni aggiuntive sulla sua distribuzione. Eccezioni a queste
  regole possono essere garantite sotto certe condizioni; contattate il
  coordinatore degli HOWTO di Linux all'indirizzo indicato sotto.

  In breve vogliamo promuovere la distribuzione di queste informazioni
  attraverso quanti pi canali possibile. Ci nonostante vogliamo che
  rimanga il copyright sui documenti HOWTO e vorremmo venir avvisati di
  ogni progetto per la ridistribuzione degli HOWTO.

  Se avete domande contattate Tim Bynum, il coordinatore degli HOWTO di
  Linux, all'indirizzo di posta elettronica <linux-
  howto@sunsite.unc.edu>.











































  Lilo mini-Howto
  Cameron Spitzer (cls@truffula.sj.ca.us), Alessandro Rubini
  (rubini@linux.it).
  v2.03, 19 Agosto 1998

  LILO  il Linux Loader pi utilizzato per la versione di Linux che
  gira su processori di famiglia x86; poich non apprezzo le maiuscole,
  in questo documento il programma sar chiamato Lilo invece che LILO.
  Questo documento descrive alcune tipiche installazioni di Lilo.  Il
  suo ruolo  quello di integrare la guida dell'utente di Lilo con
  informazioni pi pratiche; credo che questi esempi siano abbastanza
  informativi anche se la vostra situazione non  molto simile alla mia.
  Spero che questo documento vi eviti di avere problemi. Siccome la doc
  umentazione di Lilo  molto ben fatta, chi  interessato ai dettagli 
  invitato a leggere in /usr/doc/lilo*.  Questo documento  stato
  tradotto da Alessandro Rubini, nel marzo 1998.

  1.  Introduzione

  Nonostante la documentazione distribuita con i sorgenti di Lilo sia ad
  ampio spettro (mi riferisco qui ai file che trovate anche sotto
  /usr/doc/lilo-versione sulla vostra macchina Linux), la maggior parte
  degli utenti Linux trovano qualche difficolt durante la costruzione
  del proprio file /etc/lilo.conf.  Questo documento  volto ad aiutare
  queste persone fornendo l'informazione minimale che serve per scrivere
  un file di configurazione e fornendo cinque installazioni
  esemplificative:


    Il primo esempio  la classica installazione ``Linux e un altro
     sistema''.

    L'esempio seguente mostra come si possa installare Linux su un
     disco collegato come /dev/hdc facendo in modo che tutto funzioni
     correttamente quando il disco viene collegato come /dev/hda e viene
     usato per il boot. Questo tipo di configurazione  quella che serve
     usare quando si installa un nuovo sistema Linux dall'interno del
     proprio sistema gi funzionante.

    Il terzo caso presentato mostra come accendere un sistema Linux la
     cui partizione root non viene vista dal BIOS della macchina. Questa
     sezione spiega anche come avviare il sistema da un disco SCSI se il
     BIOS  abbastanza recente.

    Il successivo esempio viene usato per accedere a dischi molto
     grossi, che n il BIOS n il DOS possono vedere con facilit
     (questo esempio  ormai obsoleto, in quanto tutti i BIOS recenti
     riescono a gestire i dischi grossi).

    L'ultimo esempio mostra come recuperare un disco danneggiato, se il
     danno deriva dall'installazione di un altro sistema operativo.


  Gli ultimi tre esempi sono stati forniti da Cameron,
  cls@truffula.sj.ca.us, che ha scritto le prime versioni di questo
  documento. Alessandro rubini@linux.it, il manutentore attuale, usa
  solo Linux sulle sue macchine e non  quindi in grado di controllare
  n di aggiornare tali esempi esempi. Sentitevi liberi di mandare il
  vostro contributo a questo documento, preferibilmente mandandomi un
  messaggio di posta elettronica.


  2.  Informazione di base e installazione tipica



  Quando Lilo avvia il sistema, usa le chiamate del BIOS per caricare il
  kernel Linux dal disco (disco IDE, dischetto o altro). Per questo
  motivo, il kernel deve risiedere in un luogo che possa essere visto
  dal BIOS della macchina.

  All'accensione Lilo non  in grado di leggere i dati del filesystem
  per cui ogni pathname che appare in /etc/lilo.conf viene risolto
  durante l'installazione di Lilo (quando il superutente invoca il
  comando /sbin/lilo). Tale installazione  il momento in cui il
  programma costruisce le tabelle che elencano quali settori sono usati
  dai file coinvolti nel caricamento del sistema operativo.  Una
  conseguenza di ci  che tutti tali file devono risiedere in una
  partizione accessibile da parte del BIOS (siccome tali file di solito
  risiedono in /boot,  sufficente che il BIOS possa leggere la
  partizione root del vostro sistema).

  Un'altra conseguenza dell'appoggiarsi sul BIOS  che occorre
  reinstallare il programma (cio, occorre reinvocare /sbin/lilo), ogni
  volta che si modifica la configurazione del programma.  Ogni volta che
  si ricompila il kernel e si sovrascrive la precedente immagine,
  occorre reinstallare Lilo.


  2.1.  Dove devo installare Lilo?

  All'interno di /etc/lilo.conf, la direttiva boot= dice a Lilo dove
  installare il loader primario, quello che viene eseguito dal BIOS
  all'accensione della macchina. Come regola generale, questo codice pu
  essere installato nel ``master boot record'' (cio in /dev/hda) oppure
  nella partizione root dell'installazione Linux (di solito /dev/hda1 o
  /dev/hda2).

  Se il proprio disco contiene un altro sistema operativo oltre a Linux,
  conviene installare Lilo sulla partizione root invece che sul Master
  Boot Record. In questo caso occorre marcare la partizione come
  ``bootable'' (usando il comando ``a'' di fdisk o il comando ``b'' di
  cfdisk. Se il master boot sector non viene sovrascritto risulter pi
  facile la disinstallazione di Linux, se ne sorger il bisogno.


  2.2.  Come devo configurare i miei dischi IDE?

  Personalmente nel mio BIOS preferisco non specificare n LBA n LARGE
  per i miei dischi; ma ricorate che io uso solo Linux. Questi due modi
  di accesso sono degli accrocchi orribili, inventati solamente come
  pezza a fronte di alcune deficienze progettuali del primi PC.
  Specificare i propri dischi come NORMAL vuol dire che il proprio
  kernel deve stare all'interno dei primi 1024 cilindri del disco, ma
  questo non  un problema se il disco  correttamente partizionato e se
  la partizione di root  piccola (questa  una buona norma in ogni
  caso, indipendentemente da Lilo).

  Se il disco invece contiene gi un altro sistema operativo, non si
  potranno modificare i settaggi del BIOS o il vecchio sistema non
  funzioner pi. Tutte le distribuzioni recenti di Linux, comunque,
  sono in grado di gestire dischi configurati come LBA o LARGE.

  Se si ha pi di un disco rigido e alcuni di essi sono usati solo da
  Linux senza far parte del processo di avvio del sistema, si pu
  evitare di dire al BIOS che questi dischi esistono. Il sistema si
  avvier pi velocemente e Linux riconoscer automaticamente e
  velocemente tutti i dischi. A me capita spesso di aggiungere e
  togliere dischi dal mio sistema, ma non cambio mai la configurazione
  del BIOS.


  2.3.  Come posso interagire durante il boot?


  Quando appare il prompt di Lilo, premendo il tasto <Tab> si ottiene la
  lista di tutte le possibilit di boot offerte da Lilo.  Se Lilo non 
  configurato per interagire con l'utente si pu comunque renderlo
  interattivo premendo il tasto <Alt> o il tasto <Shift> prima che
  appaia il messaggio ``LILO'', e tenendo premuto tale tasto.

  Se al prompt di Lilo si sceglie un'immagine di kernel Linux 
  possibile passare dei parametri di linea di comando al kernel stesso.
  Il kernel Linux riconosce molti parametri, tutti descritti nel
  ``BootPrompt-HOWTO'' by Paul Gortmaker, documento che non val la pena
  di replicare in questa sede. Alcuni di questi parametri, d'altra
  parte, secondo me sono particolarmente importanti e meritano di essere
  descritti:


    root=: si pu dire al kernel di usare come partizione di root una
     partizione diversa da quella che appare nel file lilo.conf. Per
     esempio, io ho dedicato una piccola partizione a ospitare una
     installazione minimale di Linux; grazie a questa sono stato in
     grado di accendere il mio calcolatore anche dopo aver distrutto per
     sbaglio la partizione di root (questi danni comunque succedono solo
     se si smanetta con le strutture interne del kernel).

    init=: la versione 1.3.43 e tutte le successive possono ricevere
     dalla linea di comando il pathname di un programma da eseguire al
     posto di /sbin/init. Se il sistema si blocca durante il processo di
     boot a causa di un errore negli script di accensione  ancora
     possibile accedere al sistema specificando init=/bin/sh al prompt
     di Lilo. Dopo aver acceso il sistema in questo modo probabilmente
     occorrer accedere ai propri dischi, che saranno inaccessibili; per
     questo occorre invocare ``mount -w -n -o remount /; mount -a'', e
     ricordarsi di chiamare ``umount -a'' prima di spegnere il
     calcolatore.

    Un numero: se si specifica un numero sulla linea di comando, il
     programma init selezioner il ``runlevel'' specificato invece di
     quello predefinito (di solito il 3 o il 2, in base alla
     distribuzione che si usa). Per saperne di pi consiglio di
     riferirsi alla documentazione di init, al file /etc/inittab e ai
     vari file che si trovano in /etc/rc*.d.


  2.4.  Come posso disinstallare Lilo?

  Quando Lilo sovrascrive un settore di boot, una copia del settore
  viene salvata in /boot/boot.xxyy, dove xxyy sono i due numeri che
  rappresentano la periferica, scritti in esadecimale. Si possono vedere
  questi due numeri, chiamati ``major number'' e ``minor number''
  chiamando ``ls -l /dev/device''. Per esempio, il primo settore del
  disco /dev/hda (che ha 3 e 0 come numeri di periferica) verr salvato
  in /boot/boot.0300; se si installa lilo su /dev/fd0 il file si
  chiamer /boot/boot.0200, se si installa su /dev/sdb3 (con major
  number 8 e minor 19) il file si chiamer /boot/boot.0813.  Si noti che
  Lilo non salva il primo settore del disco se il file corrispondente
  esiste gi, quindi non occorre preoccuparsi quando si reinstalla Lilo
  (per esempio dopo aver ricompilato il kernel).

  Se per caso occorre disinstallare Lilo (per esempio nella malaugurata
  ipotesi che si cancelli Linux dal disco) occorre semplicemente
  rimettere al suo posto il settore di boot originale. Se Lilo 
  installato in /dev/hda, basta fare ``dd if=/boot/boot.0300 of=/dev/hda
  bs=446 count=1'' (personalmente preferisco fare ``cat /boot/boot.0300
  > /dev/hda'', ma questo comando non  sicuro, in quanto copia anche la
  tabella delle partizioni, che potrebbe essere stata modificata nel
  frattempo). Questo comando  molto pi facile che dover far partire il
  DOS per chiamare ``fdisk /mbr'': permette di togliere Linux da un
  disco senza mai avviare alcun altro sistema operativo.  Dopo aver
  rimosso Lilo dal disco occorre anche ricordarsi di far girare il
  comando fdisk di Linux per distruggere tutte le partizioni Linux, in
  quanto la versione DOS del comando non  in grado di cancellare
  partizioni non-dos.

  Se Lilo  stato installato sulla partizione root del sistema Linux,
  (per esempio /dev/hda2), invece, non occorre fare niente di
  particolare per disinstallare Lilo. In questo caso basta far andare il
  programma fdisk di Linux per rimuovere le partizioni Linux dalla
  tabella delle partizioni. Bisogna anche ricordarsi di marcare la
  partizione DOS come partizione ``bootable'' (``attiva'' in gergo DOS).


  3.  La configurazione pi semplice

  La maggior parte delle installazioni di Lilo utilizzano un file di
  configurazione come il seguente:


  boot = /dev/hda   # oppure la partizione root
  delay = 10        # attesa, in decimi di secondo, per poter interagire
  vga = 0           # opzionale. Si usi "vga=1" per un modo testo 80x50
  #linear           # si provi "linear" se ci sono problemi di geometria

  image = /boot/vmlinux  # il proprio file zImage
    root = /dev/hda1     # la partizione root
    label = Linux        # o un altro bel nome
    read-only            # root va montato in sola lettura

  other = /dev/hda4   # la partizione dos, se esiste
    table = /dev/hda  # la tabella delle partizioni attuale
    label = dos       # o un altro stupido nome



  Si possono specificare diverse sezioni ``image'' e ``other'' se serve.
   in effetti abbastanza comune configurare nel proprio lilo.conf
  diverse immagini del kernel, almeno per chi cerca di rimanere
  aggiornato con le versioni di sviluppo del sistema.


  3.1.  Come gestire kernel grossi

  Se la compilazione di una ``zImage'' genera un'immagine pi grande di
  mezzo megabyte (come capita spesso con i kernel 2.1), bisognerebbe
  creare una ``bzImage'' (big zImage). Si provi a tal fine ``make
  bzImage''. Per avviare un'immagine del kernel di questo tipo non serve
  far niente di speciale, ma serve avere la versione 18 di Lilo, o una
  successiva. Se la vostra installazione  molto datata, occorrer
  aggiornare il pacchetto Lilo.


  3.2.  Altre fonti di informazione

  Oltre ai documenti forniti con Lilo, ci sono un certo numero di mini-
  howto che possono essere utili per risolvere i proprio problemi. Si
  chiamano tutti ``Linux+pincoOS'', per vari valori di pincoOS; questi
  documenti trattano la coesistenaza di Linux e altri sistemi operativi.
  Inoltre, ``Multiboot-with-LILO'' descrive come le varie versioni di
  Windows possono coesistere con Linux.


  4.  Installare su hdc  per avviare come hda  e uso di bios=

  Lilo permette di creare la mappa dei settori da un disco e allo stesso
  tempo di dire al BIOS di leggere i settori da un altro disco.  Per
  esempio a me capita spesso di installare Linux su un disco collegato
  come hdc (disco principale del secondo cavo IDE), e usare poi tale
  disco come unico disco di un nuovo calcolatore (hda). Ho fatto una
  copia del dischetto di installazione  in una piccola partizione, in
  modo da installare su hdc facendo chroot da un terminale virtuale,
  senza dover smettere di usare il calcolatore.

  Il file lilo.conf che uso in questo caso  fatto cos:


  # Questo file deve essere usato da un sistema che giri su /dev/hdc
  boot = /dev/hdc   # sovrascrivi il settore di boot di hdc
  disk = /dev/hdc   # e specifica come accedere ad hdc:
     bios = 0x80    #  il BIOS lo vedra' come primo disco
  delay = 0
  vga = 0

  image = /boot/vmlinux      # all'interno di  /dev/hdc1
    root = /dev/hda1         # che all'accensione sara' hda1
    label = Linux
    read-only



  Questo file di configurazione deve venir usato da un Lilo che gira su
  /dev/hdc1. Le mappe di Lilo che vengono scritte nel settore di boot
  (/dev/hdc) devono riferirsi ai file che stanno in /boot (attualmente
  montato sotto /dev/hdc1); questi file verranno letti da hda nel
  momento in cui il disco sar avviato come sistema stand-alone.

  Personalmente chiamo questo file /mnt/etc/lilo.conf.hdc (poich /mnt 
  dove attacco il nuovo disco durante l'installazione).  L'installazione
  di Lilo avviene poi con questo comando: ``cd /mnt; chroot . sbin/lilo
  -C /etc/lilo.conf.hdc''. Si vedano la pagine del manuale di chroot se
  questo comando risulta di difficile comprensione.

  La direttiva ``bios='' nel file lilo.conf serve a dire a Lilo che idea
  ha il BIOS delle proprie periferiche. Le chiamate al BIOS identificano
  i dischetti e i dischi rigidi con un numero: 0x00 and 0x01 idenficano
  i floppy, 0x80 e numeri successivi identificano i dischi rigidi (e i
  vecchi BIOS possono solo accedere a due di essi). Il significato del
  parametro ``bios = 0x80 usato nell'esempio precedente significa
  quindi: ``usa 0x80 nelle chiamate al BIOS per il disco /dev/hdc''.

  Questa direttiva di Lilo pu essere utile anche in altre situazioni,
  per esempio quando il BIOS  in grado di avviare il sistema da un
  disco SCSI invece che da uno IDE. Quando il sistema contiene sia
  dischi IDE che SCSI, Lilo non pu sapere in partenza se il numero 0x80
  si riferir all'uno o all'altro, poich l'utente pu dire al BIOS come
  comportarsi (tramite i menu di configurazione), mentre il BIOS stesso
  non pu essere contattato durante il funzionamento di Linux.

  Per default, Lilo assume che i dischi IDE prendano i primi numeri a
  disposizione, ma questa assunzione pu essere modificata mettendo le
  seguenti linee nel proprio /etc/lilo.conf:


  disk = /dev/sda
    bios = 0x80



  5.  Utilizzo di Lilo quando il BIOS non pu accedere alla partizione
  di root.

  Ho due dischi IDE e un disco SCSI. Il disco SCSI non viene visto dal
  BIOS. Siccome Lilo usa le chiamate al BIOS non pu accedere ai dischi
  che non vengono visti dal BIOS. Il mio stupido AMI-BIOS pu solo
  avviare il sistema da ``A:'' o da ``C:'', e la mia partizione di root
  sta sul disco SCSI.

  La soluzione in questo caso consiste nel mettere il kernel, la mappa
  dei settori e il secondo stadio di caricamento di Lilo in una
  partizione Linux nel primo disco IDE. Si noti che non serve mettere il
  kernel nella partizione root.

  La seconda partizione del mio primo disco IDE (/dev/hda2, la
  partizione Linux usata per avviare il sistema)  montata in /u2.
  Questo  il file /etc/lilo.conf che ho usato.


  #  Installa LILO su settore di boot del primo disco IDE
  #
  boot = /dev/hda
  #  /sbin/lilo (l'installatore) copia il loader di Lilo da
  #  questo file sopra al settore di boot.
  install = /u2/etc/lilo/boot.b
  #  Ho scritto un messaggio prolisso in questo file.
  message = /u2/etc/lilo/message
  #  Il comando "lilo" scrive in questo file la mappa dei settori
  #  di disco occupati dal kernel
  map = /u2/etc/lilo/map
  compact
  prompt
  #  Aspetta diecisecondi, poi attiva 1.2.1 per default.
  timeout = 100
  #  Il kernel viene salvato dive il BIOS pu leggerlo in questo modo:
  #      cp -p /usr/src/linux/arch/i386/boot/zImage /u2/z1.2.1
  image = /u2/z1.2.1
          label = 1.2.1
  #  Lilo dice al kernel di montare la prima partizione SCSI come root.
  #  Non serve che il BIOS sia in grado di accedervi.
          root = /dev/sda1
  #  La partizione  montata in sola lettura
          read-only
  #  Ho tenuto un vecchio kernel Slackware da usare se quello appena
  #  ricompilato non funziona. In effetti una volta questo mi  servito
  image = /u2/z1.0.9
          label = 1.0.9
          root = /dev/sda1
          read-only
  #  La mia partizione DR-DOS 6
  other = /dev/hda1
          loader=/u2/etc/lilo/chain.b
          label = dos
          alias = m




  6.  Come accedere a dischi grossi che non sono visti dal BIOS

  Il sistema che ho in ufficio ha un disco IDE da 1GB. Il BIOS pu solo
  accedere ai primi 504MB del disco (con MB intendo 2^10 byte, non
  10^6). Perci ho messo il sistema DOS su una partizione da 350MB in
  /dev/hda1 e la partizione root di Linux in 120MB come /dev/hda2.


  Il DOS non  stato in grado di installarsi correttamente quando il
  disco era nuovo. La versione 7 del DOS Novell aveva lo stesso
  problema.  Fortunatamente il servizio ``opzioni di IBM'' ha
  dimenticato di mettere il dischetto ``OnTrack'' nella scatola del
  disco. Il disco sarebbe dovuto arrivare con un prodotto chiamato
  ``OnTrack Disk Manager''. Se avete solo il DOS immagino che lo abbiate
  usato.

  Allora ho fatto una partizione con il programma fdisk di Linux.  Il
  DOS 6.2 ha rifiutato di installarsi su /dev/hda1 dicendo qualcosa come
  ``questa versione di MS-DOS  per le nuove installazioni; questo
  computer ha gi il DOS installato quindi serve una versione
  `aggiornamento' al posto di questa''. In effetti, il disco era nuovo
  di zecca.

  Che schifo! Allora ho usato ancora fdisk di Linux e ho cancellato la
  partizione 1 dalla tabella. Questo ha reso felice il mio DOS 6.2 che
  ha ricreato la partizione da me rimossa per potersi installare.  MS-
  DOS 6.2 ha scritto il suo settore di boot sul disco ma non  riuscito
  ad avviarsi.

  Per fortuna avevo un kernel Slackware in un floppy creato dal
  programma di installazione della mia Slackware, per cui ho acceso
  Linux e installato Lilo sopra al settore di boot difettoso del DOS.
  Questo funziona. Ecco il file /etc/lilo.conf che ho usato:


  boot = /dev/hda
  map = /lilo-map
  delay = 100
  ramdisk = 0             # Disattiva il ram-disk
  timeout = 100
  prompt
  disk = /dev/hda         # Il BIOS vede solo 500MB di questo disco
     bios = 0x80          #   che  il primo disco IDE
     sectors = 63         #   e ha questi parametri (dalla
     heads = 16           #   documentazione del disco stesso)
     cylinders = 2100
  image = /vmlinuz
    append = "hd=2100,16,63"
    root = /dev/hda2
    label = linux
    read-only
    vga = extended
  other = /dev/hda1
    label = msdos
    table = /dev/hda
    loader = /boot/chain.b



  Dopo aver installato questi sistemi ho verificato che la partizione
  contenente i file zImage, boot.b, map, chain.b e message potesse usare
  un filesystem MSDOS, purch che non sia compresso con stacker o
  doublespace. In questo caso avrei potuto dare tutti i 500MB alla
  partizione DOS.

  Ho anche imparato successivamente che ``OnTrack'' avrebbe scritto la
  tabella delle partizioni spostata di alcune decine di byte all'interno
  del disco invece che all'inizio, e ho saputo che  possibile
  modificare il driver IDE di Linux per gestire questa situazione, ma
  l'installazione in questo caso sarebbe stata impossibile con il kernel
  slackware precompilato [NDT: ecco un altro caso in cui i produttori di
  hardware fanno delle porcate immonde per sistemare le mancanze di
  Microsoft]). Alla fine la IBM mi ha mandato il dischetto ``OnTrack'';
  ho contattato il loro supporto tecnico e mi hanno detto che Linux 
  bacato perch non usa il BIOS. Ho buttato via il dischetto.


  7.  Accensione da un dischetto di salvataggio

  Successivamente ho installato Windows 95 sul calcolatore in ufficio.
  Ovviamente ha bruciato il mio bel settore di boot di Lilo, ma non ha
  toccato la mia partizione Linux. Siccome il BIOS impiega molto tempo a
  caricare il kernel dal dischetto ho creato preventivamente un
  dischetto con Lilo installato in modo da poter caricare il kernel dal
  disco IDE. Il floppy  stato creato cos:

    fdformat /dev/fd0H1440      # scrivi le traccie su disco nuovo
    mkfs -t minix /dev/fd0 1440 # crea il filesystem di tipo minix
    mount /dev/fd0 /mnt         # aggancialo nella directory convenzionale
    cp -p /boot/chain.b /mnt    # copia il loader sul dischetto
    lilo -C /etc/lilo.flop      # installa lilo e la mappa sul floppy
    umount /mnt



  Si noti che il dischetto deve essere montato quando si invoca lilo, in
  modo che Lilo possa scrivere il file con la mappa dei settori del
  kernel.

  Questo  /etc/lilo.flop, ed  molto simile all'ultimo che vi ho fatto
  vedere:


  #  Crea un dischetto che legge i kernel dal disco fisso
  boot = /dev/fd0
  map = /mnt/lilo-map
  delay = 100
  ramdisk = 0
  timeout = 100
  prompt
  disk = /dev/hda     # 1 GB IDE, ma il BIOS vede solo i primi 500 MB.
     bios=0x80
     sectors = 63
     heads = 16
     cylinders = 2100
  image = /vmlinuz
    append = "hd=2100,16,63"
    root = /dev/hda2
    label = linux
    read-only
    vga = extended
  other = /dev/hda1
    label = msdos
    table = /dev/hda
    loader = /mnt/chain.b



  Infine, mi  successo di aver bisogno del DOS 6.2 in ufficio, ma non
  volevo toccare il primo disco IDE. Ho aggiunto un controller e un
  disco SCSI e ho creato un filesystem DOS su questo disco con il
  comando mkdosfs di Linux. Questo disco viene visto come ``D:'' da
  Windows 95. Naturalmente il DOS non vuole partire dal disco D, ma
  questo non  un problema quando si ha Lilo.  Ho aggiunto queste righe
  al file lilo.conf del penultimo esempio:





  other = /dev/sda1
    label = d6.2
    table = /dev/sda
    loader = /boot/any_d.b



  Con questa modifica il DOS 6.2 parte e crede di essere sul disco C
  mentre Windows 95 si trova su D  [NDT: demenziale!].

























































  The Linux ``Linux-DOS-Win95-OS2'' mini-HOWTO
  Mike Harlan, r3mdh@raex.com
  v1.3.1, 11 Novembre 1997

  Questo documento presenta una procedura per far coesistere 4 sistemi
  operativi su un singolo disco rigido.  Traduzione di Roberto Kaitsas
  (RobK at flashnet.it) Data traduzione: 12 Giugno 1999


     Disclaimer:
        Any damages inflicted on any machine by you as a result of your
        reading of this HOWTO is still YOUR FAULT. When you read about
        deleting partitions and formatting disks, be smart.  Realize
        that doing any of the above will result in loss of data.  So,
        BACKUP SOON, BACKUP OFTEN.  This is your second-to-the-last
        warning.



     Liberatoria:
        Ogni danno provocato da voi su ogni macchina risultante dalla
        lettura di questo HOWTO  un VOSTRO ERRORE. Quando leggete di
        cancellare partizioni e formattare dischi, siate svegli.
        Sappiate che facendo qualsiasi delle suddette cose ci saranno
        perdite di dati.  Quindi, FATE IL BACKUP SUBITO, FATE IL BACKUP
        SPESSO. Questo  il vostro secondo ed ultimo avviso.



     Stuff to make the lawyers happy:
        Unless otherwise stated, Linux HOWTO documents are copyrighted
        by their respective authors. Linux HOWTO documents may be
        reproduced and distributed in whole or in part, in any medium
        physical or electronic, as long as this copyright notice is
        retained on all copies.  Commercial redistribution is allowed
        and encouraged; however, the author would like to be notified of
        any such distributions.

        All translations, derivative works, or aggregate works
        incorporating Linux HOWTO documents must be covered under this
        copyright notice.  That is, you may not produce a derivative
        work from a HOWTO and impose additional restrictions on its
        distribution.  Exceptions to these rules may be granted under
        certain conditions; please contact the Linux HOWTO coordinator
        at the address given below.

        In short, we wish to promote dissemination of this information
        through as many channels as possible. However, we do wish to
        retain copyright on the HOWTO documents, and would like to be
        notified of any plans to redistribute the HOWTOs.



     Cose che fanno felici gli avvocati:
        Salvo che diversamente dichiarato, i documenti Linux HOWTO sono
        protetti con i diritti d'autore dei loro rispettivi autori. I
        documenti Linux HOWTO possono essere riprodotti e distribuiti
        interamente od in parte, con ogni supporto fisico od
        elettronico, fino a che questo avviso di protezione dei diritti
        d'autore venga conservato in tutte le copie.  La ridistribuzione
        commerciale  permessa e incoraggiata; l'autore comunque
        vorrebbe essere informato di ogni distribuzione.

        Tutte le traduzioni, lavori derivati o lavori globali che
        incorporino i documenti Linux HOWTO devono essere coperti da
        questo avviso sui diritti d'autore.  Cio, non potete produrre
        un lavoro derivato da un HOWTO ed imporre restrizioni
        addizionali sulla distribuzione.  Eccezioni a queste regole
        possono essere accordate sotto condizioni certe; contattare per
        favore il coordinatore dei Linux HOWTO all'indirizzo scritto
        sotto.

        In breve, desideriamo promuovere la divulgazione di questa
        informazione attraverso pi canali possibile. Comunque,
        desideriamo fortemente conservare i diritti d'autore sui
        documenti HOWTO, e ci piacerebbe essere avvertiti di ogni piano
        per ridistribuire gli HOWTO.  (Questa traduzione non ha nessun
        valore legale ed  stata inserita solamente per rendere pi
        chiara la comprensione del testo al lettore).

        Se avete qualche domanda, contattate Tim Bynum, il coordinatore
        dei Linux HOWTO, presso linux-howto@sunsite.unc.edu via email.



     Aggiornamenti dalla v1.3:

       Aggiornamento del mio indirizzo e-mail.  Il mio indirizzo 
        cambiato da r3mdh@imperium.net a r3mdh@raex.com.




     Aggiornamenti dalla v1.0:

       Aggiornamento del mio indirizzo e-mail.  Il mio indirizzo 
        cambiato da r3mdh@dax.cc.uakron.edu a r3mdh@imperium.net.


  Ed ora...........via con lo spettacolo!

  1.  Introduzione

  Dopo molti giorni di lotte e frustrazioni, ho finalmente trovato come
  realizzare ci che volevo.  Ho un PC con un disco rigido di 1.2 GB e
  16 MB RAM. Volevo avere 4 sistemi operativi sul mio sistema: MSDOS
  v6.22, Windows 95, OS/2, e Linux.  Fino ad ora, non ho trovato nessun
  Linux HOWTO che mi permettesse di mettere ognuno di questi sistemi
  operativi su di una macchina e di avere la possibilit di avviarli
  singolarmente ( possibile scrivere i SO in partizioni differenti, ma
  renderli avviabili e non fermarsi al messaggio ``Starting MSDOS'', per
  esempio,  qualcosa che ho dovuto realizzare io).  Cos, dopo molti
  tentativi ed errori, l'ho spuntata con la seguente formula:

  Prima che io cominci a spiegare la procedura passo-passo, lasciatemi
  dare qualche indizio su quello che voglio realizzare:


       <NOME>                   <DIMENSIONE> <ETICHETTA>   <NUMERO DELLA PARTIZIONE>
       -----------------------------------------------------------------------------
       MSDOS v6.22                   11MB        P1          Partizione Primaria 1
       -----------------------------------------------------------------------------
       Windows '95                  350MB        P2          Partizione Primaria 2
       -----------------------------------------------------------------------------
       OS/2 Boot Manager              2MB        P3          Partizione Primaria 3
       -----------------------------------------------------------------------------
       Dati DOS/Win                 511MB        E1          Partizione Primaria 4
       OS/2 Warp 3.0                127MB        E2          Estesa in 4 dischi
       Linux Slakware 3.2 Swap        XMB        E3          logici (sub-partizioni)
       Linux Slakware 3.2 Nativa  219-XMB        E4          etichettati E1-E4
       -----------------------------------------------------------------------------

  Cosa significa tutto ci? Allora, lasciatemi spiegare.  Per prima
  cosa, noi dobbiano consumare tutte le 4 partizioni sul nostro disco
  rigido.  Le partizioni 1 fino alla 3 sono partizioni PRIMARIE.  Met
  teremo rispettivamente su queste partizioni MSDOS, Win95 e l'OS/2 Boot
  Manager (che inefficientemente richiede la sua PROPRIA partizione).
  Ora abbiamo lasciato una partizione. Ma, vogliamo avere un disco solo
  per i dati DOS/Win95 (questo ci d un grosso spazio sia dove mettere
  tutte quei file ZIP che cos spesso scarichiamo da Internet sia un
  posto dove immagazzinare programmi e dati di Win95 per i quali non
  abbiamo abbastanza spazio sulla partizione Win 95), OS/2 e Linux
  (entrambe le partizioni Linux nativa e Linux swap).

  Mi sono procurato un sacco di grattacapi con l'e-mail ultimamente
  riguardo al perch io abbia una partizione separata per Win95 e una
  per DOS ed un'altra per i dati Win95/DOS. Ecco la mia risposta: avere
  partizioni separate Win95 e DOS non  per tutti. Forse voi non usate
  gi pi il DOS.  Forse Windows '95  la vostra risposta per ogni
  software scritto per una piattaforma Microsoft. Per, ci sono alcune
  persone fuori da l che usano ancora DOS e non possono vivere senza. O
  perch il DOS pu far girare le applicazioni a 16-bit pi velocemente
  ed efficientemente oppure perch certi programmi DOS che usate
  potrebbero non girare sotto un ambiente Windows (mi viene in mente il
  programma per l'impostazione della scheda sonora Gravis Ultrasound),
  oppure perch semplicemente DOVETE essere in grado di entrare in DOS
  qualche volta.  Questo HOWTO  scritto pensando a questa gente.  Se
  avete ancora difficolt ad ingoiare il fatto che la parola ``MSDOS''
  sia inclusa in questo HOWTO, allora sentitevi liberi di sedervi e
  scrivere un HOWTO Linux-Win95-OS/2-solamente. :)

  Ora, torniamo indietro al diagramma suddetto.  Come ho detto, noi
  abbiamo 1 partizione nella quale dobbiamo stipare 4 cose: Dati
  Dos/Win, OS/2, e Linux nativa & swap.  Questo pu essere fatto creando
  quelli che vengono chiamati dischi logici (o partizioni logiche,
  dipende su quale libro leggete) all'interno della partizione primaria
  1.  Dopo aver creato questi dischi logici nella partizione primaria,
  ci riferiamo a questa partizione primaria come una PARTIZIONE ESTESA
  (perch  estesa oltre la portata di una singola, partizione primaria
  e contiene oltre 3 subpartizioni (dischi logici)). Confusi? Se  cos,
  dovreste leggervi il manuale di OS/2 riguardo questo argomento. Vi
  spieger tutto meglio di quanto ho fatto io qui.

  Ora, potreste grattarvi la testa dicendo ``lui vuole ficcare 4 cose su
  questa partizione estesa, ma ci ha detto che possiamo avere solamente
  3 subpartizioni per metterli sopra!''  Questo  vero, per quanto
  riguarda il modo di ragionare di MS-DOS e OS/2.  Ma, ecco uno dei
  tanti potenti vantaggi di Linux che viene a salvarci la vita.  Linux
  pu creare pi di 3 subpartizioni su di un disco esteso.  Fino a
  quante, non lo so. Ma so che pu crearne almeno 4 (ci che ci serve).
  Quindi, quando andremo a vedere i passi della procedura di
  installazione, ricordatevi che quando creeremo partizioni usando
  programmi MSDOS o OS/2, potremmo creare solamente 2 dischi logici.
  Poi, quando andremo in Linux, potremmo spaccare una di queste in due.
  Essenzialmente, potete pensare a questo come ad una ``induzione'' con
  l'inganno di MSDOS e OS/2 a vedere solo 3 dischi logici, ma in realt
  (e per Linux), saranno 4.

  2.  La Procedura


     NOTA:
        I numeri tra parentesi indicano la quantit in megabytes che ho
        usato sul mio disco rigido di 1.2 GB.

  Ora, muoviamoci sulla procedura passo dopo passo:


  1. Avviate view.exe sul CD di Linux Slakware e create i dischetti
     Linux Boot e Linux Root.  Per varie ragioni, il programma di avvio
     di Linux chiama il disco Root disco Ramdisk. Mi riferir a tale
     disco da ora in poi come disco Ramdisk (Root).


  2. Fate il backup  di ogni informazione che volete tenere su nastro (o
     su qualsiasi supporto che avete disponibile).


  3. Avviate il vostro disco originale di installazione di MSDOS, disco
     1.


  4. Quando ``Starting MSDOS'' appare, premete F5 per evitare config.sys
     e autoexec.bat.


  5. Eseguite a:\fdisk.exe.


  6. Cancellate tutte le partizioni (Siete stati avvertiti: DELETING /
     MODIFYING OF ANY PARTITION WILL RESULT IN THE LOSS OF ALL DATA ON
     THE DISK!).  (LA CANCELLAZIONE / MODIFICA DELLE PARTIZIONI
     PROVOCER LA PERDITA DI TUTTI I DATI SUL DISCO!)


  7. Aggiungete una partizione primaria MSDOS. (11MB)


  8. Formattate (Format) la partizione.


  9. Eseguite a:\setup.exe per installare MSDOS su questa partizione.


  10.
     Avviate OS/2.


  11.
     Selezionate installazione Avanzata.


  12.
     Eseguite FDISK.  (questo vi appare anche se eseguite
     l'installazione di OS/2)


  13.
     Aggiungete 1 partizione primaria dopo quella MSDOS.  Questa
     diventer la vostra partizione di Windows 95. (349MB)


  14.
     Aggiungete il Boot Manager come prossima partizione primaria. (2MB)


  15.
     Aggiungete una partizione estesa.


  16.
     Aggiungete un disco logico nella partizione estesa.  Questo
     diventer la porzione di dati del vostro sistema MSDOS. (511MB)

  17.
     Aggiungete un altro disco logico nella partizione estesa.  Questo
     diventer la nostra partizione di OS/2 HPFS (``High Performance
     File System''). (127MB)


  18.
     Aggiungete l'ultimo disco logico nella partizione estesa usando lo
     spazio rimanente del disco.  Questo diventer pi tardi 2
     partizioni sotto Linux -- la nostra partizione swap e la nostra
     partizione Linux nativa.  Ma, da momento che OS/2 (e certamente
     DOS) possono solamente scrivere su 6 partizioni per disco (3
     primarie e 3 dischi logici all'interno di 1 partizione estesa),
     dobbiamo creare solo una in questo momento. E noi DOBBIAMO creare
     questa partizione.  Non lasciatela come spazio libero ed aspettare
     che Linux sia in grado di creare le due partizioni. A causa del
     modo con cui lavora l'FDISK di OS/2, l dove si aggiunge l'ultimo
     disco logico nella partizione estesa viene marcata la FINE della
     partizione estesa.  Voi non potete aggiungere partizioni oltre
     questo punto.  Quindi, in altre parole, creare quest'ultimo disco
     logico serve come un riempitivo di spazio per Linux. Pi tardi
     cancelleremo questa partizione e aggiungeremo 2 nuove nello spazio
     che una volta era occupato.


  19.
     Aggiungiamo le partizioni 1, 2 e 5 al Boot Manager.


  20.
     Rendiamo la partizione 5 installabile.

     Il vostro schema di FDISK dovrebbe ora apparire come questo (o
     all'incirca come questo):




       ______________________________________________________________________

                                      FDISK

       Disco 1
       _______________________________________________________________________

       Informazione sulla partizione
       Nome         Stato                Accesso        Tipo di FS      MByte
       _______________________________________________________________________

       MSDOS        Avviabile            C: Primaria    FAT              11
       WIN 95       Avviabile             : Primaria    FAT             350
                    Partente all'avvio
                    del sistema           : Primaria    BOOT MANAGER      2
                    Nessuno              D: Logica      Non Formattata  511
       OS/2         Installabile         E: Logica      FAT             127
                    Nessuno              F: Logica      Non Formattata  219

       ______________________________________________________________________








  21.
     Continuate con il processo di installazione di OS/2.


  22.
     Ripartite e selezionate la partizione 2 (Windows 95) dal Boot
     Manager.


  23.
     Quando l'errore della mancanza del sistema opertivo compare,
     avviate il vostro disco di installazione MSDOS.  Noi selezioniamo
     questa partizione allo scopo di ``nascondere'' la partizione MSDOS.
     Il Boot Manager di OS/2  un pochino strano. Per ogni partizione
     avviabile che avete (nel nostro caso, MSDOS e OS/2), potete avere
     visibile solo una di loro ogni volta. Ci significa che se avviate
     da dentro una partizione, MSDOS per esempio, l'altra partizione
     (Win95)  invisibile.  La partizione MSDOS e Win95 essenzialmente
     CONDIVIDE una lettera del disco. Questo  il motivo per cui sotto
     ``Accesso'', MSDOS ha la lettera del disco C mentre Win95 non ha
     lettera assegnata. In questo caso, MSDOS  visibile con la lettera
     C e Win95  invisibile con nessuna lettera di disco. Se avessimo
     avviato Win95, sarebbe stato vero l'opposto: MSDOS sarebbe stato
     invisibile con nessuna lettera del disco e Win95 sarebbe stato
     visibile con la lettera C.  Non si pu accedere ad un disco
     invisibile IN NESSUN CASO.  Se volete copiare file fra i due dischi
     nei quali solo uno  visibile in un tempo, dovete usare un disco
     comune (non-avviabile) per scambiare i file.  Nel nostro caso, il
     disco di dati DOS/Win95 (disco D 511MB oltre) funzioner come disco
     comune. Potreste domandare ``Non potremmo eventualmente avviare
     anche Linux?''.  La risposta  s, potremmo. Ma non siamo ancora
     arrivati a questo.


  24.
     Installate MSDOS sulla partizione 2 (avremo bisogno di questo per
     installare Windows 95).


  25.
     Avviate la partizione 2.


  26.
     Installate Windows 95 in questa partizione (se state usando la
     versione aggiornamento di Win95, avrete bisogno del vostro disco 1
     di installazione di Win3.1 pronto da inserire).


  27.
     Avviate la partizione 1.


  28.
     Formattate la Partizione 4.


  29.
     Ripristinate i dati DOS dal nastro (se c') nella partizione 1 e 4.


  30.
     Avviate il dischetto Boot di Linux.



  31.
     Seguite con il dischetto Ramdisk (Root) di Linux.


  32.
     Quando voi vi connettete come root ed entrate nel prompt #,
     digitate ``fdisk'' e premete enter.


  33.
     Cancellate l'ultima partizione (quella creata nel passo 18).


  34.
     Aggiungete 1 alla partizione di 16MB e contrassegnatela come
     filesystem Linux tipo Swap. (17MB)


  35.
     Aggiungete un'ultima partizione con gli ultimi cilindri del disco
     rimasti e contrassegnatela come filesystem Linux tipo nativo.
     (198MB)


  36.
     Scrivete le modifiche nel settore di avvio e riavviate.


  37.
     Quando ritornate di nuovo nel prompt #, eseguite setup.


  38.
     Installate Linux nell'ultima partizione.


  39.
     Quando installate LILO, siate sicuri di installarlo nella radice
     dell'ultima partizione (NON nel MBR, dato che se fate questo
     distruggereste tutto il vostro precedente lavoro di questo HOWTO).
     Aggiungete solo l'ultima partizione al LILO e fissate il contatore
     a zero. Facendo questo, quando selezionerete Linux dal Boot Manager
     di OS/2 , LILO si attiver e poi avvier Linux dal disco logico
     sulla partizione estesa.  Dato che Linux  l'unica partizione che
     vogliamo attivare da LILO non abbiamo bisogno di un contatore su
     questo (a meno che voi non abbiate pi di un Kernel che volete
     caricare.  In questo caso, potete fissare il contatore a qualcosa
     di pi di 0 secondi).


  40.
     Attivate la partizione Linux di swap (riferitevi al Linux
     Installation and Getting Started Manual di Matt Welsh per questo).


  41.
     Avviate OS/2.


  42.
     Eseguite FDISK.


  43.
     Aggiungete Linux al Boot Manager usando la partizione Linux NATIVA
     (digitate 83 non 82!).
     Il vostro schermo di FDISK dovrebbe ora apparire come questo (o
     qualcosa di simile):


       ______________________________________________________________________

                                      FDISK

       Disco 1
       ____________________________________________________________________

       Informazione sulla Partizione
       Nome         Stato               Accesso       Tipo di FS      MByte
       ____________________________________________________________________

       MSDOS        Avviabile           C: Primaria   FAT              11
       WIN 95       Avviabile            : Primaria   FAT             350
                    Partente all'avvio   : Primaria   BOOT MANAGER      2
                    del sistema
                    Nessuno             D: Logica     FAT             511
       OS/2         Avviabile           E: Logica     HPFS            127
                    Nessuno              : Logica     Tipo 82          17
       Linux        Avviabile            : Logica     Tipo 83         198
       ______________________________________________________________________




  ...E avete fatto!

  Mandate ogni commento/suggerimento/problema (come ultima risorsa, per
  favore!) a me a r3mdh@raex.com.

  Mike Harlan, 11 NOV 1997
































  The Linux+FreeBSD mini-HOWTO
  Niels Kristian Bech Jensen, nkbj@image.dk
  v1.10, 15 gennaio 1999

  Questo documento descrive come usare Linux e FreeBSD sullo stesso sis
  tema. Introduce FreeBSD e illustra come i due sistemi operativi pos
  sano cooperare, es. condividendo l'area di swap. Prima di leggere
  questo documento dovreste avere un po' di esperienza con Linux o
  FreeBSD e sul partizionamento di un disco (fdisk). I suggerimenti che
  trovate qui sono stati testati usando FreeBSD 2.2.2 ma dovrebbero
  essere validi anche per le nuove versioni. Non esitate a inviarmi un
  messaggio e-mail se avete commenti, domande o suggerimenti riguardo
  questo documento. Mi piacerebbe anche avere contatti con persone che
  hanno esperienza nell'uso di Linux insieme a NetBSD e OpenBSD.

  1.  Che cos' FreeBSD?

  FreeBSD <http://www.freebsd.org/>  un sistema operativo Unix-like
  libero simile a Linux. La differenza maggiore  che, mentre il kernel
  di Linux  stato scritto ex-novo, FreeBSD  basato sulle parti
  gratuite e ridistribuibili di 4.4BSD (Berkeley Software Distribution)
  conosciuto come 4.4BSD-lite. Questo fatto pu condurre certe persone a
  pensare che FreeBSD sia pi vicino ad essere un ``vero'' UNIX
  rispetto a Linux. FreeBSD gira solo su piattaforma Intel PC (i386 e
  superiori); i porting su piattaforma DEC Alpha e Sun Sparc sono
  attualmente in lavorazione. NetBSD <http://www.netbsd.org/> e OpenBSD
  <http://www.openbsd.org/> sono simili a FreeBSD, e ambedue girano su
  pi piattaforme. Le richieste hardware per tutti questi sistemi *BSD
  sono simili a quelle per Linux.

  Lo sviluppo di FreeBSD  gestito in modo diverso rispetto allo
  sviluppo di Linux. Un gruppo ristretto di sviluppatori serve come
  arbitrato e centro direzionale per il progetto. I grossi cambiamenti
  vengono prima discussi sulle mailing list. Il progetto FreeBSD ha due
  diramazioni di sviluppo (tipo Linux): ``-CURRENT'' e ``-STABLE''. La
  parte ``-CURRENT''  quella dove si sviluppano le novit. Lo sviluppo
  nella parte ``-STABLE''  ristretta alla correzione dei bug e ad
  alcuni test accurati di nuove funzionalit.

  FreeBSD pu essere usato e (ri-)distribuito liberamente come Linux. La
  maggior parte del sistema  realizzato sotto il copyright BSD; il
  resto  sotto la GNU GPL o altre license open-source
  <http://www.opensource.org/>.


  2.  Il modo di FreeBSD di etichettare i dischi

  Linux e FreeBSD etichettano dischi e partizioni in due schemi
  differenti. Questa sezione spiega le differenze principali fra i due
  schemi. Di fatto lo schema di etichettatura di FreeBSD  un
  adattamento del tradizionale stile di etichettatura BSD adattato a
  vivere dentro le partizioni di fdisk dei PC. Quindi  molto simile
  agli altri sistemi Unix BSD-based tipo NetBSD, OpenBSD, Ultrix,
  Digital Unix, SunOS e Solaris.


  2.1.  FreeBSD ``fette'' e ``partizioni''

  FreeBSD necessita di una delle quattro partizioni della tavola delle
  partizioni del vostro disco rigido. Questa partizione primaria 
  chiamata ``slice'' (fetta, porzione) nella terminologia FreeBSD.
  FreeBSD poi usa il programma di etichettatura disklabel per preparare
  fino a otto partizioni in questa partizione primaria. Queste
  partizioni logiche sono chiamate ``partitions'' (partizioni) nella
  terminologia FreeBSD. Questo concetto  simile al modo come Linux (e
  DOS) gestiscono le partizioni logiche in una partizione estesa. Non
  potete installare FreeBSD in una partizione estesa creata da Linux (o
  DOS). Notate che il programma fdisk di Linux non mostra le partizioni
  BSD in una slice FreeBSD dal men principale, ma pu mostrare
  informazioni sull'etichettatura del disco BSD se date il comando `b'.
  L'output  qualcosa di simile a questo (/dev/hda4  la slice FreeBSD):

  bash# fdisk /dev/hda

  Command (m for help): p

  Disk /dev/hda: 64 heads, 63 sectors, 621 cylinders
  Units = cylinders of 4032 * 512 bytes

     Device Boot   Begin    Start      End   Blocks   Id  System
  /dev/hda1   *        1        1       27    54400+  83  Linux native
  /dev/hda2           28       28       55    56448   83  Linux native
  /dev/hda3           56       56      403   701568   83  Linux native
  /dev/hda4          404      404      621   439488   a5  BSD/386

  Command (m for help): b
  Reading disklabel of /dev/hda4 at sector 1624897.

  BSD disklabel command (m for help): p

  8 partitions:
  #        size   offset    fstype   [fsize bsize   cpg]
    a:    64512  1624896    4.2BSD        0     0     0   # (Cyl.  404 - 419)
    b:   104832  1689408      swap                        # (Cyl.  420 - 445)
    c:   878976  1624896    unused        0     0         # (Cyl.  404 - 621)
    e:    64512  1794240    4.2BSD        0     0     0   # (Cyl.  446 - 461)
    f:   645120  1858752    4.2BSD        0     0     0   # (Cyl.  462 - 621)

  BSD disklabel command (m for help): q
  bash#



  Le lettere `a'...`f' nella prima colonna sono le stesse etichette
  mostrate sotto nell'esempio di una slice BSD. Ci sono tre partizioni
  speciali nel linguaggio BSD. La lettera `a' indica la partizione di
  root, `b' indica al partizione di swap, mentre `c' indica l'intera
  slice. Consultate la documentazione FreeBSD per ulteriori informazioni
  sul modo ``standard'' di assegnare queste lettere ai differenti tipi
  di partizione.


  2.2.  Etichettatura dei dischi e delle partizioni in Linux e FreeBSD

  I dischi rigidi sono etichettati nel modo seguente in Linux e FreeBSD:

                          Linux           FreeBSD
  Primo disco IDE         /dev/hda        /dev/wd0
  Secondo disco IDE       /dev/hdb        /dev/wd1
  Primo disco SCSI        /dev/sda        /dev/sd0
  Secondo disco SCSI      /dev/sdb        /dev/sd1



  Le partitizioni (FreeBSD slice) su un disco IDE sono etichettate nel
  modo seguente (viene usato /dev/hda come esempio):






                                          Linux           FreeBSD
  Prima partizione primaria               /dev/hda1       /dev/wd0s1
  Seconda partizione primaria             /dev/hda2       /dev/wd0s2
  Terza partizione primaria               /dev/hda3       /dev/wd0s3
  Quarta partizione primaria              /dev/hda4       /dev/wd0s4



  Le partizioni nel mio slice FreeBSD sono etichettate nel modo
  seguente. Questo  il modo di etichettatura predefinito.  possibile
  cambiare l'etichettatura se eseguite una installazione custom
  (personalizzata) di FreeBSD (/dev/hda4  la slice FreeBSD
  nell'esempio):

  Etichetta Linux         Etichetta FreeBSD       mount point FreeBSD
  /dev/hda5               /dev/wd0s4a             /
  /dev/hda6               /dev/wd0s4b             swap
  /dev/hda7               /dev/wd0s4e             /var
  /dev/hda8               /dev/wd0s4f             /usr



  Se lanciate dmesg in Linux vedrete questo (il kernel linux deve essere
  compilato con UFS filesystem support per ottenere questo. Vedere la
  sezione ``Installare e preparare Linux''):

  Partition check:
   hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >



  Se avete installato nella slice /dev/sd1s3 (/dev/sdb3 in terminologia
  Linux), e /dev/sdb2  una partizione estesa Linux contenente due
  partizioni logiche (/dev/sdb5 e /dev/sdb6), l'esempio precedente
  dovrebbe apparire cos:

  Etichetta Linux         Etichetta FreeBSD       mount point FreeBSD
  /dev/sdb7               /dev/sd1s3a             /
  /dev/sdb8               /dev/sd1s3b             swap
  /dev/sdb9               /dev/sd1s3e             /var
  /dev/sdb10              /dev/sd1s3f             /usr



  Questo sar  mostrato come:

  Partition check:
   sdb: sdb1 sdb2 < sdb5 sdb6 > sdb3 < sdb7 sdb8 sdb9 sdb10 >


  nell'output di dmesg.

  Se avete una partizione estesa Linux dopo la vostra slice FreeBSD
  avete dei problemi, perch la maggior parte dei floppy di
  installazione del kernel di Linux sono preparati senza il supporto
  UFS, i quali non riconosceranno le partizioni FreeBSD interne alla
  slice. Quello che avrebbe dovuto essere visto come (/dev/hda3  la
  slice FreeBSD e /dev/hda4  la partizione Linux estesa)

  Partition check:
   hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 > hda4 < hda9 hda10 >


   visto come:


  Partition check:
   hda: hda1 hda2 hda3 hda4 < hda5 hda6 >



  Questo pu  darvi una assegnazione sbagliata del disco e causare la
  perdita di dati. Il mio consiglio  di mettere sempre la vostra slice
  FreeBSD dopo qualsiasi partizione Linux estesa e non cambiare nessuna
  partizione logica nella vostra partizione Linux estesa dopo aver
  installato FreeBSD!


  3.  Condividere l'area di swap fra Linux e FreeBSD

  Questa sezione descrive come ho ottenuto che Linux e FreeBSD
  condividessero una partizione di swap. Ci possono essere altri modi di
  ottenere lo stesso risultato. Potete installare FreeBSD prima di Linux
  se volete prestare attenzione all'ordine delle partizioni nella slice
  FreeBSD.


  3.1.  Installare e preparare Linux

  Il primo passo  quello di installare Linux normalmente. Dovete
  lasciare spazio per la slice FreeBSD nel vostro disco. Non dovete
  creare una partizione Linux di swap, ma se ne volete una, mettetela
  nello spazio che volete allocare per FreeBSD. In questo modo potrete
  cancellare la partizione di swap Linux in seguito e usare lo spazio
  per FreeBSD.

  Quando avrete installato Linux dovrete compilare un nuovo kernel.
  Leggete The Linux Kernel HOWTO se questa  una cosa nuova per voi.
  Dovete includere sia UFS filesystem support (read only) sia BSD
  disklabel (il supporto per la tavola delle partizioni di FreeBSD):

  UFS filesystem support (read only) (CONFIG_UFS_FS) [N/y/m/?] y
  BSD disklabel (FreeBSD partition tables) support (CONFIG_BSD_DISKLABEL) [N/y/?] (NEW) y



  Installate il nuovo kernel e riavviate. Rimuovete qualsiasi riga che
  include la parola swap dal vostro file /etc/fstab se avete creato una
  partizione Linux di swap. Accertatevi di avere un floppy di boot di
  Linux funzionante con il kernel. Ora siete pronti per installare
  FreeBSD.


  3.2.  Installare FreeBSD

  Installate FreeBSD come descritto nella documentazione di FreeBSD.
  Rimuovete la partizione Linux di swap se ne avete creata una (potete
  usare il programma fdisk di FreeBSD). Prestate attenzione all'ordine
  delle partizioni nello slice FreeBSD. Se usate l'etichettatura
  predefinita la seconda partizione sar la partizione di swap.
  Completate l'installazione di FreeBSD e riavviate in Linux usando il
  nuovo floppy di boot di Linux.


  3.3.  Impostare la partizione di swap di FreeBSD in Linux

  Lanciate dmesg quando avete riavviato in Linux. Nell'output dovreste
  vedere qualcosa del genere:

  Partition check:
   hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >

  Questo significa che /dev/hda4  il vostro slice FreeBSD, mentre
  /dev/hda5, /dev/hda6, /dev/hda7 e /dev/hda8 sono le partizioni
  FreeBSD. Se la vostra partizione di swap  la seconda partizione nello
  slice, questa sar /dev/hda6.

  Dovete inserire le linee seguenti nel vostro file /etc/fstab di Linux
  per abilitare la partizione di swap:

  /dev/hda6       none            swap            sw              0       0



  Mentre FreeBSD pu usare qualsiasi tipo di partizione come area di
  swap, Linux necessita di un tipo di marcatura particolare per la
  partizione di swap. Questa marcatura si ottiene con mkswap. FreeBSD
  rovina questa marcatura quando usa la partizione di swap condivisa,
  quindi dovete lanciare mkswap ogni volta che avviate con Linux. Per
  fare questo automaticamente dovete trovare lo script che lancia swapon
  al momento del boot. In Red Hat Linux questo  /etc/rc.d/rc.sysinit.
  Inserite la riga seguente in questo file appena prima di swapon -a:

  awk -- '/swap/ && ($1 !~ /#/) { system("mkswap "$1"") }' /etc/fstab



  Questo lancer  mkswap su qualsiasi partizione di swap in /etc/fstab
  ogni volta che avviate eccetto se queste sono commentate (aventi ``#''
  come primo carattere della riga).

  Lanciate free per controllare le dimensioni della partizione di swap
  quando avrete riavviato in Linux. Dovreste anche riavviare in FreeBSD
  per accertarvi che tutto funzioni come ci si aspetta. Se non funziona,
  avete probabilmente usato una partizione sbagliata come partizione di
  swap. L'unica soluzione a questo problema  di reinstallare FreeBSD e
  riprovare ancora.  L'esperienza  una grande maestra. :-)


  4.  Avviare FreeBSD usando LILO

  Potete facilmente avviare FreeBSD con LILO. Non installate il boot
  selector di FreeBSD (Booteasy) se volete usare LILO. Aggiungete le
  seguenti righe al vostro file /etc/lilo.conf e lanciate lilo
  (assumendo che lo slice FreeBSD sia /dev/hda4):

  other=/dev/hda4
          table=/dev/hda
          label=FreeBSD



  Se avete installato FreeBSD sul secondo disco SCSI, usate qualcosa del
  genere (assumendo che lo slice FreeBSD sia /dev/sdb2):

  other=/dev/sdb2
          table=/dev/sdb
          loader=/boot/chain.b
          label=FreeBSD




  5.  Montare i filesystems




  5.1.  Montare il filesystem UFS sotto Linux

  Sfortunatamente il driver UFS nei kernel Linux 2.0.xx non includono il
  supporto per FreeBSD. Quando provate a montare un filesystem FreeBSD,
  ottenete solo dei messaggi di errore (il filesystem di fatto viene
  montato, ma non potete di fatto farci alcunch). Questo problema 
  stato risolto con i nuovi kernel Linux (versione 2.1.87 e successive.)

  C' un'altra versione del driver UFS per kernel Linux 2.0.xx (xx <=
  30) su metalab.unc.edu (in passato sunsite.unc.edu)
  <ftp://metalab.unc.edu/pub/Linux/ALPHA/ufs/>. Si chiama U2FS e la
  versione corrente  u2fs-0.4.3.tar.gz. Una versione di U2FS
  (ufs-0.4.4.tar.gz) per Linux 2.0.31 e successivi (2.0.xx; not 2.1.xx)
  si pu trovare in questo sito <http://www.mathi.uni-
  heidelberg.de/~flight/projects/u2fs/> insieme ad ulteriori
  informazioni riguardo U2FS (e UFS.)

  Ora dovete compilare un nuovo kernel con il supporto per U2FS
  filesystem e BSD disklabels. Vedere la sezione ``Installare e
  preparare Linux'' per maggiori informazioni in proposito. Potete
  lasciar perdere l'UFS filesystem support nel kernel quando usate U2FS.

  Quando avrete installato il nuovo kernel, potrete montare i filesystem
  UFS (tutte le partizioni nella slice FreeBSD eccetto la partizione di
  swap) con un comando tipo questo:

  mount -t u2fs /dev/hda8 /mnt



  Dovrete usare un comando tipo:

  mount -t ufs /dev/hda8 /mnt


  se usate un kernel Linux versione 2.1.87 o successivo. Dal kernel
  Linux versione 2.1.112 dovete aggiungere -o ufstype=44bsd ad un
  comando come questo:

  mount -t ufs -o ufstype=44bsd /dev/hda8 /mnt




  Il driver UFS (e U2FS)  di sola lettura (read-only). E cos; potete
  leggere da un filesystem UFS ma non potete scriverci sopra. Un driver
  sperimentale lettura-scrittura (read-write) UFS ha rimpiazzato il
  driver read-only nel kernel Linux versione 2.1.112 e superiori;
  scrivere su partizioni FreeBSD  supportato dalla versione 2.1.127.


  5.2.  Montare il filesystem ext2fs sotto FreeBSD

  Per montare un filesystem ext2fs sotto FreeBSD, dovete prima compilare
  un nuovo kernel con supporto di ext2fs. Leggete the FreeBSD handbook
  <http://www.freebsd.org/handbook/> per imparare come fare. Inserite la
  riga

  options         "EXT2FS"


  nel vostro file di configurazione del kernel per il nuovo kernel.

  Quando avrete riavviato con il nuovo kernel, potrete montare un
  filesystem ext2fs dando un comando come:

  mount -t ext2fs /dev/wd0s3 /mnt



  Notate che non potete montare filesystems ext2fs in partizioni estese
  da FreeBSD.

  Per colpa di un bug in FreeBSD 2.2.8 e precedenti dovrete smontare
  (unmount) tutti i filesystems ext2fs prima di chiudere FreeBSD se
  state usando queste versioni.  Se chiudete FreeBSD con un filesystem
  ext2fs montato, FreeBSD non potr sincronizzare (sync) i filesystem
  UFS. Questo risulter in fsck quando verr  lanciato al successivo
  avvio di FreeBSD. Potete aggirare questo bug inserendo la riga:

  umount -a -t ext2fs


  nel file /etc/rc.shutdown. Il bug dovrebbe essere stato corretto in
  FreeBSD-3.x (qulcuno pu confermare questo?)


  6.  Far girare programmi binari estranei

  6.1.  Far girare programmi binari di FreeBSD sotto Linux

  Il pacchetto iBCS supporta l'esecuzione di binari FreeBSD sotto Linux;
  ma  vecchio e non pi mantenuto. Io non sono riuscito a farlo
  funzionare. Per favore fatemi sapere se avete avuto migliore fortuna
  con questo pacchetto.


  6.2.  Far girare programmi binari di Linux sotto FreeBSD

  FreeBSD ha la possibilit di far girare binari Linux, sia nei formati
  a.out che ELF.  Per fare questo dovete seguire i seguenti tre
  passaggi:


  1. Dovete abilitare la compatibilit con Linux. Per fare questo (in
     FreeBSD 2.2.2 --- alcuni dettagli possono essere diversi in altre
     versioni) dovete editare il vostro file /etc/rc.conf e cambiare

     linux_enable="NO"


  in

  linux_enable="YES"


  e riavviare. Un altro modo per caricare il supporto binario con Linux
   quello di eseguire il comando /usr/bin/linux. In questo modo non
  dovete riavviare e non avete il supporto binario con Linux sempre car
  icato (es. salvate memoria).  Ricordate di aggiungere la riga

  options         COMPAT_LINUX


  nel file config del kernel FreeBSD se compilate un nuovo kernel
  FreeBSD.

  2. Dovete installare le librerie condivise di Linux se i vostri binari
     Linux sono linkati dinamicamente. Le librerie sono incluse in
     FreeBSD 2.2.{2,5,6} come pacchetto linux_lib-2.4.tgz (nuove
     versioni potrebbero essere disponibili). Lanciate il comando
     seguente per installare il pacchetto:
     pkg_add <path_del_package>/linux_lib-2.4.tgz


  <path_del_package>  la directory che contiene il pacchetto. Potete
  anche scaricare il pacchetto dalla rete con:

  pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/packages-stable/All/linux_lib-2.4.tgz


  o rilanciando /stand/sysinstall. Entrate in ``Configure'', ``Pack
  ages'' e usate i men. Dovrete eseguire i comandi seguenti se state
  lanciando binari Linux linkati staticamente:

  brandelf -t Linux <nome_del_binario_linux_linkato_staticamente>



  3. Installare i programmi Linux che volete lanciare. I programmi
     possono essere installati sia su filesystem UFS sia su filesystem
     ext2fs. Vedere la sezione ``Montare filesystems ext2fs sotto
     FreeBSD'' per maggiori informazioni riguardo l'uso di filesystems
     ext2fs sotto FreeBSD.

  Ho eseguito con successo le versioni Linux di Applixware 4.3 e
  Netscape 3.01 (ambedue in formato ELF) sotto FreeBSD 2.2.2 usando
  questo metodo (s, so che esiste una versione nativa di Netscape 4 per
  FreeBSD). Anche le versioni Linux di acroread e StarOffice 3 e 4
  lavorano bene sotto FreeBSD. StarOffice 5 dipende dai threads nativi
  di Linux e attualmente non funziona sotto FreeBSD.  Leggete la
  documentazione FreeBSD per maggiori informazioni a questo riguardo.


  7.  Fonti di informazione

  L'ultima versione di questo mini-HOWTO pu  essere scaricata da questo
  sito <http://www.image.dk/~nkbj/> in diversi formati (incluso SGML e
  PostScript.) Il documento  stato tradotto in giapponese da Mr.
  Teruyoshi Fujiwara come parte del the JF project
  <ftp://jf.linux.or.jp/pub/JF/other-formats/>.

  Gregor Hoffleit mantiene un sito <http://www.mathi.uni-
  heidelberg.de/~flight/projects/u2fs/> con informazioni relative allo
  sviluppo di U2FS e UFS.

  Annelise Anderson sta lavorando ad una Linux+FreeBSD FAQ
  <http://freebsd.stanford.edu/FreeBSD/linux.html>, la quale coprir
  gli stessi temi di questo mini-HOWTO (e altro). Le FAQ sono intese
  essere parte del freebsd-doc project.

  Potete trovare alcuni articoli sulle differenze fra Linux e FreeBSD
  qui <http://www.futuresouth.com/~fullermd/freebsd/bsdvlin.html>.

  Potete trovare altre informazioni riguardo FreeBSD (e scaricare
  l'intero sistema) in questo sito <http://www.freebsd.org/>. Potete
  anche comprare il sistema su CDROM da Walnut Creek CDROM
  <http://www.cdrom.com> (I loro server girano con FreeBSD).

  Il Linux Kernel HOWTO (e questo mini-HOWTO)  realizzato come parte
  del The Linux Documentation Project <http://metalab.unc.edu/LDP/>.


  8.  Crediti e affari legali

  Grazie ai membri del *BSD user group in Danimarca
  <http://hotel.prosa.dk/bsd-dk/> per aver risposto alle domande di un
  novizio (newbie) di FreeBSD, a Mr. Takeshi Okazaki per avermi fatto
  conoscere U2FS, e a Mr. David O'Brien per suggerimenti importanti.


  8.1.  Affari legali

  Trademarks are owned by their owners.

  Although the information given in this document is believed to be
  correct, the author will accept no liability for the content of this
  document. Use the tips and examples given herein at your own risk.

  Copyright  1997, 1998, 1999 by Niels Kristian Bech Jensen. This
  document may be distributed only subject to the terms and conditions
  set forth in the LDP license  <http://metalab.unc.edu/LDP/LDP-
  COPYRIGHT.html>.

  Ovvero:

  I marchi sono propriet dei loro possessori.

  Nonostante le informazioni date in questo documento si pensa siano
  corrette, l'autore non accetter responsabilit per il contenuto di
  questo documento. Usate i suggerimenti e gli esempi qui contenuti a
  vostro rischio.

  Copyright  1997, 1998, 1999 by Niels Kristian Bech Jensen. Questo
  documento potr  essere distribuito solo sotto i termini e le
  condizioni esposte in the LDP license <http://metalab.unc.edu/LDP/LDP-
  COPYRIGHT.html>.





































  NT OS Loader + Linux mini-HOWTO
  Bernd Reichert, <reichert@dial.eunet.ch>
  v1.11, 2 settembre 1997

  Questo documento descrive l'uso del boot Loader di Windows NT per
  avviare Linux. La procedura  stata provata con Windows NT 4.0 WS e
  Linux 2.0. Traduzione di Leonardo Boselli, <leo@dicea.unifi.it>

  1.  Come funziona il loader di NT

  Il loader di NT desidera avere il settore di boot degli altri sistemi
  operativi disponibile in un file. Legge questo file e fa partire il
  sistema operativo scelto che pu essere sia NT in una diversa
  partizione [NDT: nel testo originale era "in un diverso modo" : I
  diversi modi sono ottenuti in una maniera leggermente diversa, vedi il
  Windows NT resource kit] o un diverso sistema operativo.


  2.  Suggerimenti su come installare Windows NT e Linux nello stesso
  Sistema

  [aggiunta alla traduzione italiana]
  Se dovete installare anche Win95 questo DEVE essere il primo sistema
  ad essere installato oppure render NT inavviabile.


  2.1.  Installazione di Windows NT

  Provate a installare Windows NT per primo. Se volete usare NTFS
  (raccomandato) per la vostra partizione Windows NT, tenete conto che
  le versioni correnti di linux non possono accedere alla partizione
  NTFS.  Un driver in versione alfa che pu LEGGERE le partizioni NTFS 
  disponibile presso  <http://www.informatik.hu-berlin.de/~loewis/ntfs>.
  Potete creare una partizione FAT separata per scambiare dati oppure
  usare dischetti formattati DOS (il metodo consigliato  quello di
  creare una partizione FAT iniziale. In questo modo oltre a poter usare
  un sistema operativo DOS o simile potete avere un'area libera per lo
  scambio files. Inoltre, cosa pi importante, non avrete il limite dei
  1024 cilindri per la partizione di avvio).


  2.2.  Partizionamento del disco

  Un altro Mini-howto raccomanda di non usare il "Disk Administartor" di
  NT per creare le partizioni di swap e root.  sufficiente controllare
  tramite questo lo spazio libero e usare il fdisk di linux
  successivamente.



  2.3.  Installazione Linux

  Adesso fate il bopot di Linux dai dischetto (o dal CD), create le
  partizioni di swap e root.  fdisk assume che la partizione ntfs sia
  HPFS. Questo  normale.  Se l'installazione chiedesse di montare
  questa partizione ignorate la richiesta.  Ripartite nuovamente (se
  avete una versione di installer che lo richiede) e installate linux
  secondo le vostre esigenze.


  2.4.  Lilo

  Quando arrivate alla sezione Lilo, specificate che il device di boot,
  su cui scrivere il MBR  la partizione root di Linux, questo perch il
  MBR primario appartiene al loader di NT.  Questo significa che sia la
  voce root che boot nel file /etc/lilo.conf avranno lo stesso valore.
  Se ad esempio avete un disco IDE e la partizione Linux  la seconda
  partizione la voce boot in /etc/lilo.conf sar come:



           boot=/dev/hda2




  Se avete due dischi (montati sullo stesso controller) e Linux risiede
  sulla prima partizione del secondo disco la vostra voce boot in
  /etc/lilo.conf sar:



           boot=/dev/hdb1




  Eseguite lilo con un kernel che corrisponda al vostro sistema.
  Controllate il kernel facendo il boot dal dischetto se avete dei
  dubbi.

  Se adesso non riuscite a fare il boot di NT allore ci sono dei
  problemi.Spero che abbiate creato un disco di repair di recente (se
  avete appena installato lasciate correre e rifate la installazione da
  zero:  pi veloce !).


  3.  Bootpart

  Esiste un programma NT chiamato bootpart scritto da G. Vollant che pu
  fare per voi il lavoro descritto ai prossimi due punti. Bootpart 
  disponibile su
  <http://ourworld.compuserve.com/homepages/gvollant/bootpart.htm>.

  Se invece volete sapere come funzionano le cose che usate, si vedano
  invece le procedure descritte nei punti 4 e 5.


  4.  La parte Linux del lavoro (a parte la configurazione di lilo)

  Dovete fare il boot da dischetto finch la parte NT non  sistemata.

  Ora dovete estrarre il settore di boot dalla partizione root di Linux.
  Assumendo che /dev/hda2 sia la vostra partizione il comando  :



           # dd if=/dev/hda2 of=/bootsect.lnx bs=512 count=1




  C' qualcosa che non va se il file bootsect.lnx  pi di 512 byte.

  Adesso copiate il file bootsect.lnx su un dischetto formattato DOS, se
  questo  il vostro modo di trasferire file su Windows NT.

  Potete copiarlo col comando:




      # mcopy /bootsect.lnx a:




  oppure meglio con:



           # mount -t msdos /dev/fd0 /mnt
           # copy /bootsect.lnx /mnt
           # umount /mnt




  [il nome del file non  del tutto arbitrario: a meno che non abbiate
  pi partizioni linux da avviare in alternativa non cambiatelo (e
  nell'altro caso usate .lny .lnz)]


  5.  La parte NT del lavoro

  Copiate il file bootsect.lnx sulla radice del disco C:

  Ci che /etc/lilo.conf  per linux, c:\boot.ini lo  per Windows NT.
  Rimuovete gli attributi di sola lettura e sistema prima di modificare
  il file con il comando:



           C:\attrib -s -r c:\boot.ini




  [NDT: su alcune installazioni il flag di sistema non  settato, in
  questo caso non usate il -s ... in ogni caso se il comando suggerito
  NON da errori  tutto ok]

  Ora cambiate il file boot.ini con un text editor [sotto NT] quale ad
  esempio notepad o edit mel seguente modo:



           [boot loader]
           timeout=30
           default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
           [operating systems]
           multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
           multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
           C:\BOOTSECT.LNX="Linux"




  In questo esempio  stata agginta solo l'ultima riga.  Ripristinate
  gli attributi dopo che avete salvato boot.ini con:



           C:\attrib +s +r c:\boot.ini




  Dopo uno shutdown ordinato di NT al riavvio dovreste vedere il
  seguente messaggio [assumendo che abbiate modificato i file come
  indicato nell'esempio]:



           OS Loader V4.00

           Please select the operating system to start:

           Windows NT Workstation Version 4.0
           Windows NT Workstation Version 4.0 [VGA mode]
           Linux




  Selezionate Linux e vedrete:



           LILO loading zImage ....





  6.  Provaci ancora Sam

  Una nuova copia del bootsect.lnx dovrebbe essere trasferita ogni
  qualvolta il bootsector della vostra partizione linux viene
  modificato.  Questo accade per esempio quando installate un nuovo
  kernel con lilo.  Come potete vedere questo non  il sistema ideale
  per sperimentare nuovi kernel.



  7.  Risoluzione dei problemi

  Se le cose non vanno come avrebbero dovuto, provate a partire con un
  floppy.  Con /dev/hdb1 quale partizione Linux, il vostro
  /etc/lilo.conf dovrebbe avere:



           root=/dev/hdb1
           boot=/dev/fd0




  Lanciate lilo con un dischetto inserito. Ora provate a fare il boot
  dal dischetto.  Se il vostro Linux su /dev/hdb1 non pu essere avviato
  anche il loader di NT non sar in grado di farlo partire. Se vedete
  molti 01 01 01 01, il vostro disco root non  accessibile. Verificate
  che tutti i vostri dischi siano visibili dal bios.

  Se il floppy riesce a fare partire Linux prelevate il MBR dal floppy
  con:



           # dd if=/dev/fd0 of=/bootsect.lnx bs=512 count=1



  Potete conservare questo dischetto come avvio di emergenza qualora
  l'installazione di NT si guastasse.


  8.  Riferimenti


    The Linux+WindowsNT mini-HOWTO

    The FAQ for FreeBSD 2.X


  9.  Ringraziamenti


    Grazie a Xiaoming Yi <z3c20@ttacs.ttu.edu> per avermi suggerito che
     la procedura funziona anche per dischi diversi dal primo.

    Grazie a Frank Dennler <Frank.Dennler@zkb.ch> per il trucco del
     dischetto.


  10.  Retroazione

  Qualunque commento  benvenuto.









































  The Loadlin+Win95 mini-HOWTO
  Authored by: Chris Fischer, protek@brigadoon.com
  v1.4.6, 13 Marzo 1999

  Questo documento spiega come usare Loadlin con Windows 95 per lanciare
  Linux.  Traduzione di Gaetano Paolone (gaetano at poboxes.com).  Data
  traduzione: 03 Maggio 1999

  1.  Introduzione

  Questo documento descrive come usare facilmente una combinazione del
  Menu Avvio di Windows 95 e di Loadlin.exe per lanciare automaticamente
  Linux usando il tasto F4. Questa procedura dovrebbe funzionare con le
  seguenti versioni di Windows 95: 4.00.950, 4.00.950a e 4.00.95b con
  FAT16, e con tutte le versioni di Linux che supportano Loadlin. Se
  preferite usare il LILO boot manager, consultate il Linux+Win95 Mini-
  HOWTO.

  Ci sono anche 2 modi alternativi per il dual boot tra Linux e Windows
  95 utilizzando Loadlin per chi usa Windows 95 con FAT32 (versione
  4.00.950b).


  1.1.  Copyright

  The Loadlin+Win95 mini-HOWTO is copyright (C) 1997- 1998 by Protek
  Computer Solutions. This document may be reproduced and distributed in
  whole or in part, in any medium physical or electronic, as long as
  this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  Il Loadlin+Win95 mini-HOWTO  della Protek Computer Solutions (1997-
  1998).  Questo documento pu essere riprodotto e distribuito
  interamente o in parte, con ogni mezzo fisico o elettronico finch
  questo avviso di copyright  mantenuto su tutte le copie. La
  distribuzione commerciale  permessa e incoraggiata; comunque
  all'autore piacerebbe essere avvisato riguardo ogni distribuzione di
  questo tipo.


  1.2.  Nuove versioni di questo documento e di Windows 98

  Questo mini-HOWTO  postato principalmente nella The Linux+Windows 95
  Reference Page <http://www.eskimo.com/~praxis>, quindi controllate l
  per assicurarvi di possedere la versione pi recente di questo mini-
  HOWTO. Qui troverete anche un link per il dual boot con Windows 98. La
  prossima versione di questo mini-HOWTO sar principalmente una
  revisione ed includer informazioni sul dual booting con Windows 98.


  1.3.  Commenti e critiche

  Domande, commenti e suggerimenti sono i benvenuti. Cerco continuamente
  il modo di migliorare ed espandere questo mini-HOWTO. Confido
  moltissimo sul vostro aiuto per migliorare, e far del mio meglio per
  essere pronto con risposte di aiuto. Posso essere contattato presso
  protek@brigadoon.com.


  1.4.  Liberatoria

  Ogni tentativo  stato fatto per assicurare che le informazioni
  riportate in questo mini-HOWTO siano sicure ed accurate. In ogni caso
  queste informazioni sono date senza garanzia, sia espressa che
  implicita come per la sua convenienza per un uso particolare.
  Generalmente  Consigliato(TM) fare backup dei vosti file di sistema
  prima di cambiare la configurazione del sistema e/o i file. Suggerisco
  che prendiate questa precauzione "per ogni evenienza".


  2.  IMPORTANTE: Informazioni preliminari e Setup


  2.1.  ATTENZIONE! per gli utilizzatori di Windows95 OSR2 (version
  4.00.950b):

  NON provate il dual boot con Windows 95 senza aver prima consultato la
  Windows 95 OSR2 FAQ. La FAQ inoltre contiene una grande quantit di
  informazioni riguardanti la FAT32. Per riassumere, se avete OSR2 e
  state usando un file system con FAT16, potete ancora fare il dual boot
  usando il tasto F4.

  NOTA: Se avete Windows 95 OSR2, e state usando un file system con
  FAT32, allora il metodo di dual boot descritto in questo mini-HOWTO
  utilizzando il tasto F4 non funzioner e non dovrebbe essere provato.

  Comunque, ci sono un paio di modi alternativi per automatizzare il
  boot di Linux all'avvio e sono discussi nella ``Sezione 6''.


  2.2.  Queste cose si danno per scontate:


    Avete installato con successo Windows 95.


    Windows 95  installato sul Drive C.


    Avete installato con successo Linux.


    Sapete su quale partizione  installato Linux.


    LILO NON  installato sul vostro disco rigido.


    Se state usando Windows 95 OSR2 (version 4.00.950b), avete letto
     attentamente le Windows95 OSR2 FAQ.


  2.3.  Elementi di cui avete bisogno prima di cominciare:


    Un dischetto di boot con i file di sistema del DOS 5.0 o del DOS
     6.x (io.sys, msdos.sys, command.com) e il file config.sys. Se state
     usando un disco di boot del DOS 5.0, avrete bisogno anche del file
     autoexec.bat. Se state usando Windows 95 OSR2 (versione 4.00.950b),
     avrete bisogno anche di creare un file chiamato Winboot.sys con un
     editor di testi e dovrete posizionarlo nella directory radice del
     drive C. Winboot.sys pu essere un file vuoto, basta che il file ci
     sia.

  NOTA: Se il vostro disco rigido contiene gi i file autoexec.dos,
  config.dos, io.dos, msdos.dos e command.dos, allora non avrete bisogno
  del dischetto.  Potete controllare scrivendo: dir e dir /ah nella
  directory principale del disco C. Inoltre, se avete installato la
  versione aggiornamento di Windows 95, allora  molto probabile che voi
  li abbiate.

    Il file Loadlin.exe



    L' immagine del vostro kernel, generalmente zImage o vmlinuz.
     (Controllate le ``FAQ'' per informazioni).


    Un semplice editor di testi, tipo Blocco Note.


  3.  Inizio:


  3.1.  Determinate quale versione di Windows 95 avete.

  Avviate il vostro computer con Windows 95 e cliccate con il pulsante
  destro sull'icona "Risorse del Computer". Ora cliccate con il sinistro
  su Propriet. Nella linguetta Generale, guardate sotto la linea
  "Sistema:". L potete vedere il numero della versione.


  3.2.  Determinate se state usando il file system con FAT 32.

  NOTA: Se avete Windows 95 versione 4.00.950b, siate sicuri che non
  stiate usando il file system con FAT 32. Cliccate due volte su Risorse
  del Computer, poi cliccate con il pulsante destro sull'icona del drive
  C. Cliccate con il pulsante sinistro su Propriet sulla linguetta
  Generale, la linea "tipo:" indicher se avete o meno il file system
  con FAT32. Se usate il file system con FAT 32, andate direttamente
  alla ``Sezione  6''. Altrimenti continuate con la Sezione 3.3.


  3.3.  Assicuratevi che le estensioni dei file siano visibili in Ges
  tione Risorse.


    Lanciate Gestione Risorse.

    Sulla barra dei Menu, cliccate su Visualizza, poi cliccate su
     Opzioni.  Sulla linguetta Visualizza, assicuratevi che il bottone
     "tutti i file" sia contrassegnato. Inoltre, assicuratevi che la
     casella con "Non visualizzare le estensioni MS-DOS per i file
     registrati" non sia contrassegnata. Cliccate sul bottone OK.

  NOTA: Se il vostro disco rigido contiene gi i file *.dos menzionati
  nella ``NOTA: della Sezione 2.3'', allora saltate alla prossima
  ``NOTA:''. Altrimenti, continuate con Sezione 3.4.


  3.4.  Rinominate i vostri file di sistema.


    Inserite il disco di boot con il DOS 5.0 o il DOS 6.x nel Drive A.
     Cliccate sull'icona del Drive A cos potete vedere il contenuto del
     dischetto.

    Rinominate tutti i file conferendogli l'estensione .dos. Potete
     fare questo cliccando una volta su un file, premendo il tasto
     funzione F2 e scrivendo il nuovo nome. Non preoccupatevi se avete
     bisogno che il disco di boot funzioni correttamente, non dovete
     fare altro che rinominare i file con l'originale estensione dopo
     questa procedura.



  3.5.  Importante Avvertenza.


    ESTREMAMENTE IMPORTANTE Assicuratevi di rinominare i file sul
     floppy PRIMA di copiarli sul drive C. Altrimenti sovrascriverete i
     vostri file di sistema di Windows 95. Siete stati avvertiti. Ora,
     copiate tutti i file nella directory principale del drive C. Un
     metodo  di cliccare sull'icona del drive A, premere CTRL+A,
     premere CTRL+C, cliccare sull'icona del Drive C, e premere CTRL+V.

  NOTA: Se non avete Windows 95 OSR2 (versione 4.00.950b), saltate alla
  ``Sezione 3.6''.


    Se (e solamente se) avete Windows95 version 4.00.950b, assicuratevi
     di avere un file chiamato Winboot.sys nella directory principale
     del Drive C, come asserito sopra nella ``Sezione 2.3''.  Non avere
     Winboot.sys nella directory principale del Drive C risulterebbe in
     un blocco del sistema qualora vogliate fare il boot mediante la
     versione precedente del DOS.

  NOTA: Se state utilizzando un disco di boot con DOS 6.x saltate alla
  ``Sezione 4'', altrimenti continuate con il prossimo passaggio.


  3.6.  Editate i vostri file di sistema.


    Aprite il Blocco Note. Sulla barra dei Menu, cliccate su Apri.
     Cambiate "Tipo file:" in "Tutti i file (*.*)". Cambiate "Cerca in:"
     dal Desktop al Drive C. Ora aprite Config.dos cliccando due volte
     sul nome del file. Cancellate tutto il contenuto. Questo creer un
     file di 0K...  Spiegher pi tardi il perch.

    Usate il Blocco Note per aprire e modificare Autoexec.dos e
     scriveteci dentro il comando Loadlin. Il comando Loadlin deve avere
     la seguente sintassi:



       ______________________________________________________________________
        Loadlin LetteraDrive:\FileKernelLinux root=/dev/PartizioneBootLinux ro
       ______________________________________________________________________




  Ecco il mio Autoexec.dos come esempio:



       ______________________________________________________________________

        Loadlin f:\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________




  NOTA: Il kernel, come anche il file Loadlin.exe, pu essere dovunque
  sul vostro disco rigido basta che dichiarate il percorso corretto.
  Per esempio se il vostro kernel  nella directory e:\linux\kernels e
  il file Loadlin.exe  nella directory c:\utils, dovreste usare:



  ______________________________________________________________________

   c:\utils\loadlin e:\linux\kernels\vmlinuz root=/dev/hdc2 ro
  ______________________________________________________________________





    Salvate il file.


  4.  *** Usate questa sezione SOLO se state usando un disco di boot con
  il DOS 6.x.***


  4.1.  Editate e Rinominate i vostri file di sistema del DOS 6.x.


    Aprite il blocco Note. Sulla barra dei Menu, cliccate su Apri.
     Cambiate "Tipo file:" in "Tutti i file (*.*)". Cambiate "Cerca in:"
     dal Desktop al Drive C. Ora aprite Config.dos cliccando due volte
     sul nome del file.  Cancellate tutto il contenuto. Ora avrete
     bisogno di immettere il comando di shell mediante la seguente
     sintassi:



       ______________________________________________________________________

        shell=loadlin.exe FileKernelLinux root=/dev/PartizioneBootLinux ro
       ______________________________________________________________________




  Ecco il mio Config.dos come esempio:



       ______________________________________________________________________

        shell=f:\loadlin.exe f:\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________




  NOTA: Il kernel, come anche il file Loadlin.exe, pu essere dovunque
  sul vostro disco rigido basta che dichiarate il percorso corretto.
  Per esempio se il vostro kernel  nella directory e:\linux\kernels e
  il file Loadlin.exe  nella directory f:\utils, dovreste usare:


       ______________________________________________________________________

        shell=f:\utils\loadlin.exe e:\linux\kernels\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________





    Salvate il file.


  5.  Ultimi Passaggi


  5.1.  Avete praticamente finito


    l'ultimo file da editare e avete concluso. Usate il Blocco Note per
     aprire ed editare Msdos.sys. Andate nella sezione "Opzioni".
     Cercate una linea contenente BootMulti=. Se non ne trovate, allora
     aggiungetela ed impostate il valore ad 1. Dovrebbe apparire
     qualcosa come:



       ______________________________________________________________________

        [Options]
        BootMulti=1
       ______________________________________________________________________





    Ci potrebbero essere altre voci elencate. Lasciatele. Ora salvate
     il file.


  5.2.  Avete concluso!

  Ora tutto quello che dovete fare  fare ripartire il sistema (Non
  dimenticate di rimuovere il dischetto). Quando vedete "Avvio di
  Windows 95 in corso...", premete il tasto F4 e Linux dovrebbe subito
  partire.


  5.3.  Come funziona.

  Windows 95 ha un Menu di Boot costruito al suo interno. Normalmente
  non lo vedete all'avvio (sebbene lo possiate cambiare se volete), ma
  potete invocarlo premendo il tasto funzione F8 quando vedete "Avvio di
  Windows 95 in corso...". Nel menu, vedrete diverse opzioni. l'ultima
  opzione  "Versione precedente di MS-DOS". Invece di premere F8 e poi
  selezionare "Versione precedente di MS-DOS", potete usare la
  scorciatoia F4 premendo F4 quando "Avvio di Windows 95 in corso..."
  appare sullo schermo. Quando Windows 95 parte con la versione
  precedente di MS-DOS, usa i file che hanno estensione .dos . Ecco
  perch  importante lasciare che Config.dos sia 0K se fate partire
  Linux dal file Autoexec.dos. Se Windows 95 non trova i file con
  estensione .dos quando prova a far partire la versione precedente di
  MS-DOS, caricher i file di avvio di Windows 95. Perci, se non avete
  il file Config.dos, Windows 95 caricher tutti i driver presenti nel
  vostro file Config.sys. Se questo non impedir di   caricare Linux, ne
  aumenter per il tempo di caricamento. Avere un file Config.dos di 0k
  evita a Windows 95 di leggere il vostro Config.sys nel momento di
  avvio della versione precedente di MS-DOS.


  6.  Metodi Alternativi per l'Autoboot di Linux, Specialmente per
  Utenti con un File System con FAT 32.

  Questa sezione funzioner con tutte le versioni di Windows 95
  conosciute, indipendentemente dal fatto che voi abbiate o meno un file
  system con FAT 32.  Ci sono 2 metodi che discuter in questa sezione.
  Per primo comincer dal pi semplice.

  6.1.  Metodo 1.

  Questo metodo usa il file Autoexec.bat per chiamare (o eseguire) un
  altro file batch chiamato Linux.bat, durante l'avvio.


    Create il file Linux.bat usando un semplice editor di testi come
     EDIT o Blocco Note. Il contenuto dovrebbe essere simile al
     seguente:



       ______________________________________________________________________

        @echo off
        cls
        echo.
        echo.
        echo.
        echo.
        choice /t:y,5 "Volete lanciare Linux? "
        if errorlevel 2 goto End
        c:\loadlin c:\vmlinuz root=/dev/hdc2 ro
        :End
       ______________________________________________________________________




  Questo file batch pulisce lo schermo, aggiunge 4 linee vuote, mostra
  il testo tra virgolette + [Y,N], quindi aspetta 5 secondi che premiate
  un tasto. Se non premete un tasto entro 5 seconds, dar come valore
  predefinito Y e lancer Linux. Se selezionate Y or N, il file batch
  determiner l'opzione da voi selezionata, e la eseguir.  Ad esempio,
  se selezionate 'N' allora il file batch si interrompe e continua a
  eseguire il vostro Autoexec.bat, che carica il Windows 95. Se
  selezionate Y, allora chiaramente partir Linux.

  Se non volete 4 linee vuote prima del testo, modificate il numero di
  linee con echo. Se non volete pulire lo schermo, allora rimuovete la
  linea con cls.  l'opzione /t dice al comando choice di aspettare 5
  secondi e, qualora nessun tasto sia premuto, di inserire come
  predefinito il valore Y. Cambiate y con n se volete far partire
  Windows 95 dopo l'intervallo di 5 secondi: choice /t:n,5. Inoltre
  potete cambiare la quantit di tempo di attesa da 0 a 99 secondi.  Per
  maggiori informazioni sul comando choice, entrate nella directory
  c:\windows\command e scrivete choice /? al prompt dei comandi.

  NOTA: Dovrete modificare la linea che fa partire Linux per adattarla
  alla vostra configurazione. Controllate la ``Sezione 3.6'' per esempi
  su come configurare Loadlin per lanciare Linux.


    Poi, create il file Autoexec.bat (se non ne avete gi uno) con un
     semplice editor di testi. Poi, sulla prima linea, aggiungete quanto
     segue:



       ______________________________________________________________________

               call c:\linux
       ______________________________________________________________________



  Se Linux.bat si trova in un'altra directory dovrete inserire il
  percorso corretto.  Per esempio se Linux.bat  in una directory
  chiamata C:\batch, dovrete aggiungere:



       ______________________________________________________________________

               call c:\batch\linux
       ______________________________________________________________________




  alla prima linea del vostro file Autoexec.bat. Salvate e uscite
  dall'editor.  Ora tutto quello che dovete fare  riavviare il sistema.
  Vi dovrebbe essere chiesto se volete lanciare Linux.


  6.2.  Metodo 2.

  Questo metodo  un po' pi complesso, ma offre maggiore flessibilit.
  Quello che fa questo metodo  creare il vostro boot menu
  personalizzato, sebbene non rimpiazzi il boot menu di Windows 95.
  Avrete bisogno di un file Config.sys e di un Autoexec.bat.


    Prima di tutto dovrete definire un Menu di Avvio nel Config.sys (i
     miei commenti per voi sono tra parentesi):



       ______________________________________________________________________

        [menu]
        menuitem=Linux, Boot to Linux  (Questo definisce un blocco di Menu e gli da una descrizione).
        menuitem=Win95, Boot to Windows 95
        menucolor=15,1  (Questo restituisce uno sfondo blu con il testo in bianco chiaro)
        menudefault=Linux, 15  (Questo imposta il valore di menu predefinito e resta in attesa di comando per 15 secondi).

        [linux]
        shell=f:\loadlin.exe f:\vmlinuz root=/dev/hdc2 ro (Si veda la Sezione 4 per esempi e sintassi).
        [win95]
        (Includete il contenuto normale del vostro file config.sys . Se non avevate il file
        config.sys, allora lasciate vuota questa sezione).
       ______________________________________________________________________





    Salvate e uscite dal file Config.sys. Se volete potete usare questo
     template del Config.sys per iniziare.


    Successivamente, editate il vostro file Autoexec.bat (i miei
     commenti per voi sono tra parentesi):









  ______________________________________________________________________

   goto %config%

   :win95
   (Inserite il normale contenuto del vostro file autoexec.bat. Se non avevate il file
   autoexec.bat, allora lasciate vuota questa sezione).
  ______________________________________________________________________





    Salvate e uscite dal vostro file Autoexec.bat. Se volete, potete
     usare questo template dell'Autoexec.bat per iniziare. Questo
     dovrebbe funzionare.  La prossima volta che riavvierete il sistema,
     dovreste ottenere un men di Avvio con l'opzione di avviare Linux o
     Windows 95.


  7.  Filza di Assilli Quotidiani (Frequently Asked Questions):


  7.1.  Dove posso trovare pi informazioni sull'utilizzo di Loadlin?


    Le versioni di Slackware 3.2 e 3.5 contengono un file chiamato
     "loadlin.tgz" nella directory \slakware\A5, le versioni Slackware
     3.3 e 3.4 hanno loadlin.tgz nella directory \slakware\A4. La
     versione Slackware 3.6 ha loadlin.tgz nella directory
     \slackware\A8. Scompattate il file e controllate nella directory
     \docs per un file chiamato manual.txt. Non sono a conoscenza di
     versioni pi recenti di Slackware.


    Dalla versione 4.2 alla 5.2 la RedHat contiene un file chiamato
     "loadlin16.tgz" nella directory \dosutils . Scompattate il file e
     controllate nella directory \docs per un file chiamato manual.txt.
     La RedHat 4.1 non sembra avere questo file. Il file manual.txt 
     disponibile anche a:


       ftp://ftp.eskimo.com/u/p/praxis/manual.txt



    Informazioni addizionali sono disponibili a:


       http://metalab.unc.edu/LDP/HOWTO/BootPrompt-HOWTO-2.html#ss2.2



  7.2.  Non sono sicuro su quale partizione  installato Linux. Come
  faccio a capirlo?


    A prompt della shell di Linux, lanciate l'utility fdisk e premete
     "p". Da l dovreste essere in grado di dirlo. Se volete ulteriore
     aiuto sull'utilizzo di fdisk, consultate le pagine man.


  7.3.  Dove trovo l'immagine del kernel e come la copio nella mia par
  tizione MS-DOS?


    Per cercare il file del kernel digitate:



       ______________________________________________________________________

               find / -name vmlinuz
       ______________________________________________________________________





  ad un prompt di shell Linux. Questo cercher su tutte le partizioni
  Linux il file vmlinuz. Se avete pi di un file vmlinuz, assicuratevi
  che state usando quello corretto. Se non ne siete sicuri, la scommessa
  pi sicura sarebbe usare il pi recente.

  Per copiare il vostro file kernel nella nostra partizione DOS, dovrete
  rendere la vostra partizione DOS, visibile a Linux, poi montare la
  partizione se non lo  gi. In genere questo dovrebbe essere stato
  predisposto quando avete installato Linux.  Tutto quello che dovrete
  fare  entrare nella directory contenente il file vmlinuz e copiarlo
  nel DOS usando il comando cp.

  In ogni caso, se Linux non  stato impostato per riconoscere la
  partizione DOS, copiate vmlinuz in un floppy. Prendete qualsiasi
  floppy formattato DOS (con spazio sufficiente per contenere l'immagine
  del kernel) e inseritela nel drive. Digitate:



       ______________________________________________________________________

               mount /dev/fd0 /tmp
       ______________________________________________________________________




  ad un prompt di shell Linux. In seguito entrate nella directory
  contenente l'immagine del kernel e digitate:


       ______________________________________________________________________

               cp vmlinuz /tmp
       ______________________________________________________________________




  Questo copier vmlinuz sul vostro floppy disk e sar leggibile dal
  DOS. Uscite da Linux, lanciate il DOS, poi copiate vmlinuz in una
  directory qualsiasi. Se ricompilate il vostro kernel, non dimenticate
  di copiare la nuova immagine del kernel nella partizione DOS. Questo
  sovrascriver il vostro vecchio file, cos sarebbe una bella idea di
  rinominare il vecchio file nel caso il nuovo non funzionasse
  correttamente.


  7.4.  Importa se installo prima Linux o prima Windows 95?


    Tecnicamente no. In ogni caso, sarebbe molto pi semplice
     installare Win95 per primo. In questo modo  pi facile installare
     Linux per fargli riconoscere le vostre partizioni DOS come di
     solito fate durante l'installazione di Linux.


  7.5.  In questo momento ho LILO installato, ma voglio usare Loadlin
  invece. Come elimino LILO?


    Dovrete ripristinare l'MBR (Master Boot Record) di Windows 95 che
     LILO sovrascrisse quando lo avete installato. Al prompt del DOS
     digitate:




       ______________________________________________________________________

               fdisk /mbr
       ______________________________________________________________________





  7.6.  Che cosa fare se ho gi un dual boot con Windows 95 e Windows
  3.x, e voglio far partire Linux con questo metodo?


    Francamente, se volete farlo, raccomanderei usare LILO. Comunque,
     se veramente non volete usare LILO, dovrete far partire il Win 3.x
     per primo poi lanciare il Loadlin. (Assicuratevi che Windows 3.x
     non sia in esecuzione, ma che siate nel DOS 5.0 o 6.x).


  7.7.   possibile far partire Linux dal desktop di Windows 95?


    S. Dapprima create un file batch chiamato "linux.bat", per
     esempio.  Editate il file per inserire un comando Loadlin del tipo:



       ______________________________________________________________________

               loadlin f:\vmlinuz root=/dev/hdc2 ro
       ______________________________________________________________________




  Ora salvate il file nella directory \windows\desktop. Poi, cliccate
  con il pulsante destro sull'icona Linux.bat, poi cliccate su Propriet
  con il pulsante sinistro. Ora cliccate sulla linguetta Programma, poi
  cliccate sul bottone Avanzate.  Cliccate nella casellina vicino a
  "modalit MS-DOS" ed assicuratevi che la casellina "Avvisa prima di
  entrare in modalit MS-DOS" sia contrassegnata. Cliccate OK, poi di
  nuovo su OK. Ora quando cliccate su l'icona Linux, un messaggio di
  avviso apparir prima di andare nella modalit MS-DOS.  Se cliccate su
  "S" Windows entra in modalit MS-DOS ed esegue il file Linux.bat .

  NOTA: Dovete essere in modalit MS-DOS mode per usare Loadlin.
  Controllate il file manual.txt menzionato nella ``Sezione 7.1'' di
  questa ``FAQ'' per maggiori informazioni.



  7.8.  Dove posso trovare una versione in puro testo di questo docu
  mento?


    Potete scaricare una versione in puro testo di questo documento
     presso:

       ftp://ftp.eskimo.com/u/p/praxis/loadlin.txt



  8.  Crediti

  Un ringraziamento speciale a Norm Jacobowitz e Fred Harris per avermi
  aiutato ad ordinare le pubblicazioni di Windows 95 OSR2 e per avermi
  aiutato a migliorare questo mini-HOWTO.


















































  Linux Mail-Queue mini-HOWTO
  Leif Erlingsson, leif@lege.com, Jan P. Tietze, jpti
  etze@mail.hh.provi.de
  v2.02, 3 Settembre 1997, sendmail 8.8.7

  Queue Remote Mail + Deliver Local Mail. Le necessarie modifiche alla
  configurazione per far s che sendmail consegni la posta locale
  ***subito*** mentre accumula in coda la posta in uscita.  Traduzione a
  cura di Lorenzo Pulici lorenzo.pulici@usa.net.

  1.  Introduzione

  Questo documento  stato scritto da due autori. La parte pi vecchia,
  relativa alla posta NON dial-on-demand,  di Leif Erlingsson
  <leif@lege.com>, quella relativa alla soluzione dial-on-demand (pi
  recente)  a cura di Jan P. Tietze <jptietze@mail.hh.provi.de>.



  2.  La soluzione NON dial-on-demand

  Scritta da Leif Erlingsson <leif@lege.com>.

  La versione originale di questa parte conteneva parecchia roba non
  necessaria. Questo  ci che serve veramente...



  2.1.  Avviare sendmail

  Slackware e simili:     /etc/rc.d/rc.M:



       echo "Starting sendmail daemon (/usr/sbin/sendmail -bd -os) [modalit di solo accodamento]..."
       /usr/sbin/sendmail -bd -os      # NON  il flag standard "-bd -q 15m"!





  RedHat e simili:                /etc/rc.d/init.d/sendmail.init:



       echo -n "Starting sendmail: [modalit di solo accodamento]"
       daemon sendmail -bd -os         # NON  il demone sendmail -bd -q1h





  L'opzione -os non  necessaria, tutto quello che fa :



       SuperSafe [s] Esegue in modalit super-safe, vale a dire che
                     crea sempre il file di accodamento, anche nel caso
                     vogliate effettuare la consegna immediata.
                     Sendmail crea sempre in ogni circostanza il file di
                     accodamento prima di restituire il controllo al client.
                     Deve essere sempre selezionato.




  Ci dovrebbe comunque gi essere configurato nel sendmail.cf di
  default.


  2.2.  Configurare sendmail

  Gli utenti seri di sendmail usufruiscono del sorgente m4.  Raccomando
  questa soluzione se pensate di aggiornare sendmail o anche di
  effettuare banali modifiche al sendmail.cf

  Se non intendete mai configurare sendmail in modo che i return header
  dell'envelope e simili funzionino anche con una connessione dinamica
  IP o qualcosa del genere, potreste non aver bisogno del sorgente m4.


  2.2.1.  Configurare sendmail.cf direttamente, per configurazioni sem
  plici.

  Questa  una soluzione strettamente dipendente dalla vostra versione
  in funzione della versione di sendmail.cf. Il seguente esempio 
  valido *soltanto* per sendmail-8.8.x.

  Editate /etc/sendmail.cf:



       # avoid connecting to "expensive" mailers on initial submission?
       O HoldExpensive=True




  ... pi avanti ...



       #####  @(#)smtp.m4      8.33 (Berkeley) 7/9/96  #####

       Msmtp,          P=[IPC], F=mDFMuXe, S=11/31, R=21, E=\r\n, L=990,
                       T=DNS/RFC822/SMTP,
                       A=IPC $h
       Mesmtp,         P=[IPC], F=mDFMuXae, S=11/31, R=21, E=\r\n, L=990,
                       T=DNS/RFC822/SMTP,
                       A=IPC $h
       Msmtp8,         P=[IPC], F=mDFMuX8e, S=11/31, R=21, E=\r\n, L=990,
                       T=DNS/RFC822/SMTP,
                       A=IPC $h
       Mrelay,         P=[IPC], F=mDFMuXa8e, S=11/31, R=61, E=\r\n, L=2040,
                       T=DNS/RFC822/SMTP,
                       A=IPC $h




  Il flag importante qui sopra  ``e''.  Non importa affatto se gli
  altri flag sono diversi nel vostro file.  Teneteli cos come sono,
  aggiungete soltanto ``e'' come dall'esempio di sopra, a meno che ci
  sia gi.  ``e'' contrassegna il mailer come ``expensive''.


  2.2.2.  Configurare sendmail.cf usando il sorgente m4

  Qui di seguito, per semplicit considero che la versione di sendmail
  sia la 8.8.7. Se avete una versione differente, sostituite a 8.8.7 il
  numero della vostra versione! Inoltre queste istruzioni non
  funzioneranno per vecchie versioni di sendmail. Prendete l'ultima
  versione di sendmail!


  Scaricate il sorgente di sendmail.  Provate
  ``http://WWW.Sendmail.ORG'' o possibilmente ``ftp.sendmail.org''.


  Raccomando inoltre di ottenere la mia patch per permettere il reverse
  aliasing dell'envelope del mittente e altre belle cose che vi
  permetteranno di prendere il controllo del vostro ambiente della
  posta.


  Scrivete a ``Sendmail Patch <sendmail@lege.com>'', Soggetto:
  ``sendmail-8.8.7'', se 8.8.7  la vostra versione di sendmail.

   inoltre disponibile presso ``http://www.lege.com'', cos come il
  sorgente sgml di questo mini-HOWTO!

  Non  necessario applicare tutte le mie patch per avere un sistema di
  accodamento della posta remota e di consegna della posta locale che
  funzioni. Le mie patch risolvono altri problemi. Ma pensavo che questo
  fosse un buon posto per menzionarle, dato che molti utenti Linux le
  troveranno estremamente utili. Vi permetteranno inoltre di avere
  domini virtuali perfettamente funzionanti, se lo desiderate.  I domini
  virtuali non devono essere ``locali''. Vi permetteranno di usare gli
  ``xaliases'', o in altre parole il ``reverse aliasing''.

  Decomprimete i sorgenti di sendmail. Otterrete qualcosa di simile a
  /usr/src/sendmail-8.8.7/.

  cd /usr/src/sendmail-8.8.7/cf

  Ora, se volete applicate la mia patch, altrimenti saltate questo
  passo.  Se non volete usare procmail come Local Delivery Agent salvate
  in un posto sicuro il vostro
  /usr/src/sendmail-8.8.7/cf/ostype/linux.m4 prima di cominciare...

  Salvate la mia patch in ``/tmp/sendmail-8.8.7-cf-cpio-idcmu.gz'',
  indi...


       cd /usr/src/sendmail-8.8.7/cf
       gzip -dc < /tmp/sendmail-8.8.7-cf-cpio-idcmu.gz | cpio -idcmu




  Se non volete usare procmail, ricopiate al suo posto la copia salvata
  di /usr/src/sendmail-8.8.7/cf/ostype/linux.m4.

  Applicata o meno la mia patch, assicuratevi che queste righe o altre
  molto simili siano aggiunte a
  /usr/src/sendmail-8.8.7/cf/cf/yourhostname.smtp.mc (ma se avete
  applicato la patch potreste voler cercare i nomi dei file contenenti
  la parola ``elijah'', in /usr/src/sendmail-8.8.7/cf):










  dnl # Defer Delivery to "expensive" mailers until next time the
  dnl # queue is processed using "O HoldExpensive=True" and make
  dnl # sure smtp mailers are "expensive".
  dnl # (See original "sendmail" book Chapter 30: Options,
  dnl # "Oc - Don't connect to expensive mailers", or
  dnl # 2nd Edition "sendmail" book Chapter 34.8.29,
  dnl # "HoldExpensive (c), Queue for expensive mailers".)
  dnl #                           / Leif Erlingsson <leif@lege.com>
  define(`confCON_EXPENSIVE', `True')
  define(SMTP_MAILER_FLAGS, e)
  MAILER(local)dnl
  MAILER(smtp)dnl





  2.3.  Suggerimenti per il supporto al menu

  La versione 1.x di questo documento conteneva dei suggerimenti per il
  supporto al menu per /var/X11R6/lib/fvwm/system.fvwmrc.  Li ho
  eliminati nella versione corrente, ma sono disponibili su richiesta:


  Scrivete a: ``Menu support suggestions <fvwmrc@lege.com>'', Soggetto:
  ``Menu support suggestions''



  3.  La soluzione dial-on-demand

  Scritta da Jan P. Tietze <jptietze@mail.hh.provi.de>.

  Molti utenti Linux accedono a Internet tramite una linea telefonica, e
  molti hanno deciso di implementare sul loro sistema le caratteristiche
  dial-on-demand.  Ci significa che non appena un pacchetto IP  pronto
  per lasciare la rete o l'host locali, viene automaticamente stabilito
  il collegamento ad un fornitore di servizi Internet (ISP).  Il
  collegamento cadr dopo un certo periodo durante il quale nessun
  pacchetto sar transitato.

  Nonostante ci sia molto comodo ed economico, vi  un caso particolare
  nel quale non  n comodo (dato che il tempo necessario per iniziare
  un collegamento via modem  notevole) n economico, e questo  il caso
  dell'invio di e-mail.  L'e-mail viene normalmente spedita tramite
  SMTP, consegnata direttamente dal vostro sistema oppure tramite un
  host SMTP in Internet solitamente residente nella rete del vostro ISP.

  Con le linee telefoniche,  necessario stabilire un collegamento ogni
  qualvolta si voglia inviare un messaggio. La cosa pu andare se dovete
  spedire un solo messaggio, ma se dovesse capitarvi di inviare messaggi
  multipli, rendendo cos necessari ripetuti collegamenti, la cosa pu
  rivelarsi tediosa e monetariamente dispendiosa. Inoltre se il vostro
  ISP impone limiti di orario per il vostro accesso, ci vi costringer
  a posporre i vostri messaggi in determinate ore del giorno, ed
  inviarli manualmente.

  La sezione 1 di questo documento vi risolver la situazione nella
  quale una ricerca esterna di DNS provocher l'inizio del collegamento,
  anche se la vostra e-mail verr solo accodata. La ragione  dovuta al
  fatto che sendmail vuole "canonificare" i nomi degli host.

  La soluzione di questo problema consta di due passi: prima di tutto
  dobbiamo modificare moderatamente sendmail.cf. Dopodich dovremo
  definire il processo dell'attuale consegna della posta. Personalmente
  preferisco che sia cron ad occuparsi di questo lavoro e descriver qui
  sotto i passaggi da fare.



  3.1.  Configurare sendmail.cf

  Per le ragioni indicate al punto [1.2], raccomando la modifica del
  sorgente m4 invece di operare direttamente su sendmail.cf.  Vi salver
  da molti problemi e far s che il cambio della configurazione sia pi
  comprensibile.

  Prima di tutto operiamo le modifiche indicate nella prima parte di
  questo documento. In seguito andremo nello specifico della
  configurazione dial-on-demand.


  3.1.1.  Configurare direttamente sendmail.cf, per configurazioni sem
  plici

  La configurazione diretta  parecchio poco pratica e tutto tranne che
  descrittiva, ma ovviamente  una vostra scelta.

  Vicino alla parte finale del vostro sendmail.cf dovrebbe esserci una
  riga come questa:



       R$* < @ $* $~P > $*             $: $1 < @ $[ $2 $3 $] > $4




  Fate precedere questa riga da "#" in modo che divenga:



       #R$* < @ $* $~P > $*            $: $1 < @ $[ $2 $3 $] > $4





  3.1.2.  Configurare sendmail.cf con il sorgente m4.

  Aggiungete la seguente riga al vostro
  /usr/src/sendmail-8.8.7/cf/cf/vostronomehost.smtp.mc:



       FEATURE(nocanonify)dnl




  Il vostro sendmail.cf finale pu essere compilato dando i seguenti
  comandi. Ricordatevi sempre di fare una copia di riserva del vostro
  attuale /etc/sendmail.cf prima di installarne uno nuovo:



       cp /etc/sendmail.cf /etc/sendmail.cf.bak
       cd /usr/src/sendmail-8.8.7/cf/cf
       m4 vostronomehost.smtp.mc > /etc/sendmail.cf



  3.2.  Aggiungere il ritardo di chiamata

   spesso utile, specialmente su linee con modem, inserire un ritardo
  di chiamata. Ci significa che se sendmail inizia una connessione nel
  tentativo di inviare una e-mail (prendendo la linea telefonica) ma il
  collegamento richiede pi tempo per essere stabilito rispetto a ci
  che sendmail ritiene necessario, sendmail aspetter semplicemente
  alcuni secondi e ritenter.


  3.2.1.  Configurare sendmail.cf direttamente

  Da qualche parte nel vostro sendmail.cf dovrebbe esserci una riga come
  questa:



       #O DialDelay=10s




  (o molto simile). cancellate il ``#''. Se non c' alcun ``#''
  all'inizio della riga, allora dovete considerare che tutto  a posto
  (vuol dire che  gi stato abilitato precedentemente).

  Se non trovate questa riga nel vostro sendmail.cf, inseritela pure (la
  cosa migliore  quella di porla nella parte "options" del file):



       O DialDelay=10s




  Modificate il valore ``10s'' in quello che ritenete fare al caso
  vostro.


  3.2.2.  Configurare sendmail.cf col sorgente m4

  Aggiungete la linea seguente al file
  /usr/src/sendmail-8.8.7/cf/cf/vostronomehost.smtp.mc:



       define(`confDIAL_DELAY',`10s')




  Modificate il valore ``10s'' in quello che ritenete fare al caso
  vostro.

  Il vostro sendmail.cf finale pu essere compilato dando i seguenti
  comandi. Ricordatevi sempre di fare una copia di riserva del vostro
  attuale /etc/sendmail.cf prima di installarne uno nuovo:



       cp /etc/sendmail.cf /etc/sendmail.cf.bak
       cd /usr/src/sendmail-8.8.7/cf/cf
       m4 yourhostname.smtp.mc > /etc/sendmail.cf


  4.  Inviare la posta

  L'invio della posta pu essere effettuato invocando il comando
  "sendmail -q".  Per quelli interessati a sapere ci che sendmail sta
  facendo, "sendmail -q -v" vi dar una descrizione pi dettagliata del
  processo di invio.

   molto conveniente automatizzare il processo di invio dell'e-mail.
  Molto comunemente viene usato cron per questo processo.


  4.1.  Come inviare e-mail ad un determinato orario

  Editate il vostro crontab:



       crontab -e




  Aggiungete delle righe in questa forma:



       05 18-23,0-7    * * Mon,Tue,Wed,Thu,Fri /usr/sbin/sendmail -q
       05 *            * * Sat,Sun             /usr/sbin/sendmail -q




  Riferitevi alle pagine man di cron (disponibili con "man 5 crontab")
  per informazioni ulteriori.  Il formato mi sembra piuttosto ovvio.
  L'inserimento d'esempio di crontab mostra che la posta (soltanto e
  solamente se inserita in coda) verr inviata dopo 5 minuti di ogni ora
  nei giorni feriali, iniziando alle 18:05 e fermandosi alle 7:05 del
  mattino dopo. Nei fine settimana la posta verr spedita 5 minuto dopo
  l'ora, cominciando alle 0:05 di sabato e finendo alle 23:05 di
  domenica.

  Usando un sistema dial-on-demand,  talvolta desiderabile ricevere la
  vostra e-mail attraverso il protocollo POP3 a determinati orari del
  giorno.  Per questo compito  possibile inserire una riga simile a
  questa nel vostro crontab:



       0 21            * * * popclient -3 -u <nomeutentePOP3> -p <password> -o /var/spool/mail/<nomeutentelocale>
       <mailhost.somedomain.com>




  Naturalmente va tutto su una riga sola.

  salvate il file e uscite dall'editor. Il crontab  ora installato.









  Mail2News Mini-Howto
  Rick Dean <howto@fdd.com>
  v2.1, 1 settembre 1999

  Questo documento descrive come rifornire un news server con una mail
  ing-list.  Traduttore: Maurizio Mollicone, <mm551@jb.math.unifi.it>,
  23 Marzo 2000

  1.  Diritti e distribuzione

  1.1.  Che cos' questo documento

  Questo documento descrive come rifornire un news server con una
  mailing list utilizzando un sistema Linux.  un mini-HOWTO, pi
  specificatamente il Mail2News mini-HOWTO.


  1.2.  Copyright (in inglese)

  Copyright (c) 1999, Rick Dean.
  Copyright (c) 1996, Robert Hart.


  The authors retain their copyright of this document.  You are hereby
  granted permission to redistribute this document in whole or in part
  as long as it includes this copyright notice.  Commercial
  redistribution is allowed and encouraged.  All translations or
  derivative works of this document must be covered under this copyright
  notice, and without additional restrictions on distribution.  This
  arrangement is also known as a copyleft.

  This copyright notice, itself, is hereby placed in the public domain.
  You may copy it without atribution.


  1.3.  Dove posso trovare questo HOWTO?

  La versione pi recente di questo documento  disponibile
  all'indirizzo http://fdd.com/howto/.


  Molte distribuzioni includono questo HOWTO nella directory
  /usr/doc/HOWTO.


  Questo mini-HOWTO, come la maggior parte dei mini-HOWTO di Linux, 
  stato scritto inizialmente in SGML. Questo permette al testo di essere
  automaticamente tradotto in molti formati, tra cui testo, HTML,
  PostScript, ecc.  Questi formati sono disponibili da qualche parte.



  Altre informazioni sulla documentazione di Linux sono disponibili
  presso Linux Documentation Project, e in molti altri posti


  1.4.  Storia del documento


    La versione 1.0  stata scritta da Robert Hart <hartr@redhat.com>
     nel 1996

    Le versioni 2.x sono state modificate da Rick Dean <howto@fdd.com>
     a partire dal Luglio 1999.


  2.  Introduzione

  2.1.  Come, perch, pi alcune definizioni

  Questo documento descrive come rifornire (feed) un news server con una
  mailing-list utilizzando una macchina Linux.  un mini-HOWTO,
  specificatamente il Mail2News mini-HOWTO.




  Una mailing list (conosciuta anche col nome di remailer),  un
  indirizzo dove le e-mail vengono rispedite ad una lista di indirizzi.
   molto utile per la collaborazione di gruppi geograficamente
  dispersi.  Molte compagnie (ad esempio i gruppi di lavoro della IETF)
  utilizzano le mailing list.


  Sfortunatamente, se si  iscritti a pi mailing list, si ha la casella
  di posta regolarmente innondata di messaggi.  Inoltre, alcune
  compagnie (come 3Com) specificano quale applicazione di posta devono
  utilizzare i loro impiegati (ad esempio Lotus Notes).  Se le e-mail
  vengono reindirizzate ad un gruppo di discussione, le persone sono
  rese libere di scegliere il lettore di news che preferiscono,
  utilizzando delle funzioni progettate proprio per quello scopo (cio
  derivare un segnale dal rumore).


  I server di news sono apparsi su Internet molto tempo fa, diversi anni
  prima del World Wide Web.  I server di news e i lettori di news hanno
  carateristiche come...

    threading - le risposte sono raggruppate per argomento con le e-
     mail a cui si riferiscono

    indicazione della lettura - il computer tiene traccia di cosa si 
     letto, anche attraverso i gruppi di discussione

    Si possono marcare come letti i messaggi a seconda dell'argomento.

    archiviazione

    segregazione per newsgroup (i.e. mailing list)

    un metodo di sottoscrizione/cancellazione veloce e standardizzato

    e molto altro...


  Un grande obiettivo dei server di news  la condivisione di notizie
  tra server.  Il pi grande di questi gruppi venne conosciuto come
  USENET.  Questo mini HOWTO non  rivolto a questo. Si possono
  condividere i gruppi di discussione creati attraverso questo documento
  da soli, ma si vive bene anche senza.  Come per i web server,
  l'onnipresente connettivit ad Internet, ha reso accettabile i news
  server centralizzati.  Inoltre recenti prove hanno mostrato che un
  macchina Linux con un solo processore pu gestire pi di 1300
  richieste HTTP per secondo, quindi la scalabilit  un obiettivo
  secondario.


  Sebbene non ci sia bisogno di avere una mailing list per utilizzare
  questo documento,  una buona idea avere il news server.



  2.2.  Ambiente presupposto

  Questo documento presume che si stia utilizzando Linux, ma vanno bene
  anche altri Unix. Attualmente  descritto solo sendmail come agente di
  posta, ma non appena qmail diverr popolare (in parte per la facilit
  di configurazione) si spera che qualcuno scriva delle note di
  configurazione anche per lui. :-)


  Al momento della scrittura questo mini-HOWTO  stato testato solo su
  un distribuzione Redhat 6.0.  Da buoni informatici, non si dovrebbe
  credere che qualcosa funzioni finch non sia stato specificatamente
  testato.  Qualsiasi contributo o annotazione riguardo altre
  distribuzioni  benvenuto.


  Per la gran parte di questo documento si avr bisogno dell'accesso di
  root, a meno che non sia specificato il contrario.


  2.3.  Metodologia

  Questo mini-HOWTO  presentato al contrario, dato che  il modo pi
  semplice di costruire e debuggare il tutto.  Al contrario significa
  che si inizier con il lettore di news e si risalir fino al gestore
  della mailing list, cio la direzione opposta del normale flusso di
  dati. Questo sistema utilizza alcune parti (come sendmail e innd) che
  sono dei piccoli HOWTO.


  2.4.  Argomenti esclusi

  Questo mini-HOWTO non riguarda...


    la configurazione di una mailing list

    lo scambio di informazioni tra server di news

    una lista completa di argomenti non pertinenti.



  Per favore non scrivetemi e-mail su questi argomenti (o SPAM).


  3.  Il lettore di news

  3.1.  Netscape

  Netscape contiene un lettore di news integrato. Il modo pi semplice
  di sottoscrivere un gruppo di discussione  di scrivere o cliccare un
  link simile a


       news://news.sfour.com/ietf.confctrl






  Una volta iscritti, si deve solo andare al centro messaggi.  Questo si
  fa cliccando sulla icona a fumetto nell'angolo destro della finestra.


  3.2.  Free Agent

  Free Agent  un meraviglioso lettore di news di Forte per Windows.  Si
  guardi: http://www.forteinc.com/agent/freagent.htm



  3.3.  trn e altri

  I vecchi lettori di news come trn e tin sono una buona soluzione. Ci
  si assicuri di impostare prima la variabile d'ambiente NNTPSERVER.
  Per esempio...


       export NNTPSERVER=news.sfour.com
       trn





  4.  Il server di news

  4.1.  Installazione del server di news

  Si deve installare un server di news. Io utilizzo inn, ma ne sono
  disponibili anche altri.


  Preferiblmente si scelga l'opzione "News Server" durante
  l'installazione iniziale, ma se la distribuzione utilizza RPM (RedHat
  package manager), allora basta utilizzare un comando come


       rpm -i inn-2.2.9.i386.rpm





  4.2.  Far partire il news server

  Per far partire o fermare l'esecuzione del news server, si utilizza il
  comando


       /etc/rc.d/init.d/innd start




  o


       /etc/rc.d/init.d/innd stop




  o


       /etc/rc.d/init.d/innd restart



  Per far partire il news server all'avvio del sistema si pu aggiungere
  un comando, come quelli visti, alla fine di /etc/rc.d/rc.local, ma non
   la soluzione migliore.  Molte distribuzioni hanno della applicazioni
  grafiche che permettono di scegliere quali demoni attivare. Si provi a
  scrivere:



       setup




  or


       chkconfig --add innd





  4.3.  Creazione del newsgroup

  innd richiede poco riguardo a permessi e propriet Per la gran parte
  della configurazione baster essere utente news.  Per diventare questo
  utente quando si  root:



               su - news






  Utilizzando ctlinnd, si crea il gruppo di discussione sul server.  Da
  ricordare che il newsgroup sar locale, quindi si deve crearlo con un
  nome distintivo, in modo da poterlo filtrare dalla distribuzione delle
  news se si fa questo errore.  Con orgoglio ho chiamato il mio
  newsgroup ietf.confctrl.  Le parole da sinistra a destra vanno da meno
  a pi specifico.


  Inoltre si deve dire a innd che il gruppo  moderato (utilizzando
  ctlinnd). Questo si fa specificando m al comando newgroup. Per
  esempio:



               ctlinnd newgroup ietf.confctrl m confctrl@isi.edu






  Il gruppo di discussione deve essere creato come moderato, in modo da
  poter usufruire delle possibilit di innd.  Qualsiasi messaggio
  inviato ad un gruppo moderato non  immediatamente consegnato al
  gruppo, ma viene prima inviato al moderatore.  Nell'esempio
  confctrl@isi.edu  l'indirizzo a cui  rimandato il remailer.



  Se si stanno condividendo notizie con altri server, ci si deve
  ricordare di editare le proprie configurazioni in modo che il gruppo
  non sia distribuito, a meno che non si voglia specificatamente fare
  questo.



  4.4.  Ampliare l'accesso

  Di default, il news server non permette ad ogni client di leggere le
  notizie, quindi si deve disabilitare l'autenticazione dell'utente di
  innd. Questo va fatto nel file /etc/news/nnrp.access.  Si legga la
  pagina man di nnrp.access per apprendere la sintassi di questo file.
  Io ho cambiato la prima riga non di commento in:


       *:Read Post:::*




  Se si vuole un nome utente e una password, allora si devono riempire
  il terzo e il quarto campo. Per maggiori informazioni sulla sintassi
  si guardi il manuale...


       man nnrp.access





  4.5.  Cambiare i permessi di /usr/bin/rnews

  Si devono cambiare anche i permessi di /usr/bin/rnews. Non  leggibile
  e eseguibile da tutti, ma sendmail esegue script come nobody.



       chmod a+rx /usr/bin/rnews





  4.6.  Testare l'invio dell'articolo

  Se si copia il seguente articolo in un file di nome rick.article...


  ______________________________________________________________________
  Path: rick
  From: rick@fdd.com
  Message-ID: <199907120548.AAA05475@fdd.com>
  Subject: test
  Date: Mon, 12 Jul 1999 00:48:49 -0500 (CDT)
  Newsgroups: ietf.confctrl
  Approved: ietf-confctrl@kepler.hedland.edu.au
  NNTP-Posting-Host: localhost
  Organisation: (mail2news gateway)


  test
  ______________________________________________________________________


  Ora si dovrebbe essere in grado di inviare un file con...



       /usr/bin/rnews -r localhost <rick.article





  4.7.  Funziona?

  Non c' bisogno di aspettare che l'articolo sia mostrato come non
  letto, basta guardare nelle sottocartelle /var/spool/news/articles/ e
  vedere che file che sono stati creati.



  4.8.  Aumentare il tempo di vita

  Si pu volere incrementare il tempo di vita degli articoli del gruppo
  di discussione. Nel mio caso ho voluto che non decadessero mai, cos
  ho aggiunto la seguente linea...



       ietf*:A:never:never:never




  ...al file /etc/news/expire.ctl


  Per imparare di pi sulla sintassi di questo file:


       man expire.ctl





  5.  Lo script di invio e Perl

  5.1.  Che cos' Perl?

  Per sta per Practical Extension and Report Language.  molto popolare
  per piccoli script che manipolino testi, che  esattamente quello che
  si vuole.


  Perl, di default,  installato in molti sistemi Unix.


  5.2.  Locazione di perl

  Se perl  installato in una cartella inusuale (non in /usr/bin/),
  allora si deve modificare la prima linea dello script.  Se questa
  righa  sbagliata sul mio sistema con kernel 2.2 ottengo: "bash:
  /usr/local/bin/mail2news.pl: No such file or directory" Possiamo
  tranquillamente cambiarla in: "bash: /usr/local/bin/mail2news.pl:
  interprete non trovato. Controlla la prima linea dello script"?



  5.3.  Lo script mail2news.pl

































































  ______________________________________________________________________
  #!/usr/bin/perl

  ($program = $0) =~ s%.*/%%;

  #( $version  ) = $] =~ /(\d+\.\d+).*\nPatch level/;
  #die "$program: requires at least version 3 of perl\n"
  #        if $version < 3;

  # $news_poster_program = "/usr/bin/inews";
  # $news_poster_options = "-h -o \"mail2news gateway\"";
  $news_poster_program = "/usr/bin/rnews";
  $news_poster_options = "-r localhost";
  $postinghost = "localhost";

  if ($#ARGV < 0) {
      # $newsgroup = "test";
      # we'll expect the newsgroup line in the body
  } elsif ($#ARGV == 0) {
      $newsgroup = $ARGV[0];
  } else {
      die "usage: $program [newsgroup]\n";
  }

  # in case inews dumps core or something crazy
  $SIG{'PIPE'} = "plumber";
  sub plumber { die "$program: \"$news_poster_program\" died prematurely!\n"; }

  open (INEWS, "| $news_poster_program $news_poster_options") ||
      die "$program: can't run $news_poster_program\n";

  # header munging loop
  while (<STDIN>) {
     last if /^$/;

     # transform real from: line back to icky style
     s/^From:\s+(.*) <(.*)>/From: $2 ($1)/;

     s/Message-Id/Message-ID/;

     # transform from_ line to path header; also works locally
     s/^From\s+(\S+)@(\S+).*/Path: $2!$1/
       || s/^From\s+(\S+)[^@]*$/Path: $1\n/;

     print INEWS
  #       if /^(Date|From|Subject|Path|Newsgroups|Organization|Message-ID):/i;
     if /^(Date|From|Subject|Path|Newsgroups|Message-ID):/i;
     $saw_subject |= ( $+ eq 'Subject' );

     $saw_msgid |= ( $+ eq 'Message-ID' );

  #   $saw_newsgroup |= ( $+ eq 'Newsgroups' );
  }

  warn "$program: didn't expect newsgroup in both headers and ARGV\n"
      if $newsgroup && $saw_newsgroup;

  die "$program: didn't get newsgroup from either headers or ARGV\n"
      unless $newsgroup || $saw_newsgroup;

  $approved = $newsgroup;
  $approved =~ s/\./'-'/eg;

  ($sec,$min,$hour,$mday,$mon,$year)=localtime(time);
  $madeupid = "\<$year$mon$mday.$hour$min$sec.$$\@kepler.hedland.edu.au\>";

  printf INEWS "Newsgroups: %s\n", $newsgroup if $newsgroup;
  printf INEWS "Approved: %s\@kepler.hedland.edu.au\n", $approved;
  print  INEWS "Subject: Untitled\n" unless $saw_subject;
  printf INEWS "Message-ID: %s\n", $madeupid unless $saw_msgid;
  printf INEWS "NNTP-Posting-Host: %s\n", $postinghost;
  print  INEWS "Organisation: (mail2news gateway)\n";
  print  INEWS "\n";

  print INEWS while <STDIN>;   # gobble rest of message

  close INEWS;
  exit $?;
  ______________________________________________________________________




  Io ho salvato lo script in /usr/local/bin (e utilizzeremo questo
  percorso per tutto l'HOWTO).


  Ci si assicuri di rendere lo script eseguibile per tutti, ma senza
  permesso di scrittura per il gruppo e gli altri.



       chmod a+x /usr/local/bin/mail2news.pl
       chmod go-w /usr/local/bin/mail2news.pl




  o


       chmod 555 /usr/local/bin/mail2news.pl




  per brevit.


  5.4.  Come si fa a sapere se lo script  in esecuzione?

  Ho testato questo script cambiando il programma per inviare news da
  /usr/bin/rnews a /bin/cat. Quindi ho salvato una mail mandata a me
  stesso in un file.  Infine ho eseguito mail2news.pl sulla mail salvata
  e catturato l'output in un file.



       /usr/local/bin/mail2news.pl ietf.confctrl </tmp/savedMailFile >/tmp/article





  5.5.  Cosa c'entra l'Australia?

  S l'output dello script deve contener l'indirizzo di un australiano.
  Il mio consiglio  che l'indirizzo sia un indirizzo garantito nella
  propria configurazione (sebbene non possa trovarlo nella mia) per
  approvare l'invio moderato.


  5.6.  Cosa significa $PATH?

  Se lo script mail2news.pl non  nel percorso si ottiene l'errore bash:
  mail2news.pl: command not found.  Si deve aggiungere quindi questa
  direcory al percorso:



       PATH=$PATH:/usr/local/bin





  (che funziona solo per la sessione corrente) o dare un percorso
  assoluto quando si esegue lo script:



       /usr/local/bin/mail2news.pl




  Per veder l'attuale valore della variabile PATH:



       echo $PATH





  6.  Il demone di posta locale

  6.1.  Introduzione

  Si deve prima creare un indirizzo di posta locale a cui far spedire la
  mailing-list. Questo indirizzo sar configurato per eseguire un
  programma (spedire ad un gruppo di discussione) tutte le volte che
  arriva un mail.  Sfortunatamente (per noi), questa opzione non 
  abilitata usualmente per ragioni di sicurezza.




  Questo HOWTO descrive solo come configurare sendmail.  qmail 
  un'altra scelta eccellente, ma non  ancora trattato.



  6.2.  Creazione di un alias di posta

  Invece di creare un nuovo acconto per un utente, si creer solo un
  alias. Per sendmail questi sono contenuti in /etc/aliases.  La
  sintassi  definita nella pagina man...



       man aliases





  Nell'esempio, il nome utente dell'indirizzo di mail  confctrl che
  spedisce al gruppo di discussione locale ietf.confctrl, cos
  aggiungiamo una riga...



       confctrl:   "| /usr/local/bin/mail2news.pl ietf.confctrl "







  Il doppio apice  richiesto.  Non ci pu essere uno spazio tra la
  prima coppia di apici e il carattere | (pipe), o sendmail si
  lamenter: "User unknown".




  Quandunque si modifichi il file /etc/aliases, si dovr comunicarlo a
  sendmail.



       sendmail -bi





  6.3.  Funziona?

  Dopo aver mandato una e-mail, si controlli il file /var/log/maillog
  per controllare se ha funzionato. Il log pu contenere un utile
  messaggio di errore. Ho trovato conveniente aprire un'altro terminale
  per seguire il log con



       tail -f /var/log/maillog






  6.4.  Abilitare il "pipe al programma"

  Il "pipe al programma"  il CGI della posta elettronica.  Quando
  arriva una mail, invece di appenderla ad un file, sendmail esegue uno
  script o un programma e consegna la mail allo standard input.



  Attualmente, con Redhat 6.0, sendmail  distribuito con il "pipe al
  programma" abilitato, ma solo un numero limitato di programmi 
  eseguibile. La sicurezza degli utenti non era un bisogno sulla mia
  macchina, cos otrovato pi facile abilitare l'esecuzione di tutto.
  D'altra parte non c' una pagina di manuale per smrsh.



  Per rendere possibile il "pipe al programma" dobbiamo modificare
  sendmail.cf, modificando sendmail.mc, per non utilizziare la shell
  ristretta.  Stranamente, scommentando l'opzione, non funziona, quindi
  ho dovuto cambiare la shell da /usr/sbin/smrsh a /bin/bash.



  L'intestazione del file /etc/senmail.mc di Redhat 6 ha un errore.  La
  linea di comando giusta 



       m4 /etc/sendmail.mc >/etc/sendmail.cf






  Si deve fare questo quando si cambia sendmail.mc. Fortunatamente
  Redhat estender la magnifica idea del Makefile in /etc/mail in modo
  da dover solo scrivere make.  Si dovr prima installare sendmail-
  cf.qualcosa.rpm Ad esempio:



       rpm -i sendmail-cf-8.9.3-10.i386.rpm






  Ogni volta che si modifica il file sendmail.cf, si deve far ripartire
  sendmail...



       /etc/rc.d/init.d/sendmail restart







  6.5.  Documentazione

  La Redhat, di default, non installa la documentazione di sendmail.  
  distribuita in un pacchetto rpm separato con un nome come sendmail-
  doc-8.9.3-10.i386.rpm. Questo crea una cartella /usr/doc/sendmail


       rpm -i sendmail-doc-*





  http://www.sendmail.org/ ca/email/doc/op-sh-5.html descrive la
  sintassi del sendmail.cf. Spero che non dobbiate utilizzarla.



  Questa  descrizione delle caratteristiche che si stanno modificando
  in sendmail.mc http://www.sendmail.org/m4/features.html


  Sendmail ha un pagina di manuale...


       man sendmail






  6.6.  Senza privilegi

  Se si hanno dei problemi e si crea un alias di un indirizzo di posta
  con un script differente e pi semplice per testarlo, si ricordi che
  sendmail esegue il programma come utente non privilegiato, che
  probabilmente non avr il diritto di scrivere ovunque, eccetto che in
  cartelle come /tmp.



  7.  Il reindirizzatore della mailing list

  7.1.  Sottoscrizione

  Il metodo di sottoscrizione ad ognuna delle mailing list  differente,
  sebbene implichi l'invio di un certo tipo di messaggio di posta.  Per
  favore, si stia attenti a non mandare l'indirizzo di risposta al
  gruppo.   un metodo sicuro per annoiare i membri della lista.  Molte
  mailing list hanno indirizzi separati per le sottoscrizioni.  In
  confctrl, l'indirizzo di amministrazione  confctrl-request@isi.edu,
  come spiegato da http://www.ietf.org/html.charters/mmusic-
  charter.html.




  Quando ci si  iscritti con successo, si dovrebbe vedere un messaggio
  di benvenuto nel newsgroup.



  Alcune liste non permettono di iscriversi con un indirizzo diverso da
  quello con cui si sta inviando. In questo caso si dovr truccare
  l'indirizzo di ritorno di una e-mail.


  7.2.  Truccare la posta

  Questa  la cosa pi semplice da fare con un vecchio Netscape.
  Accetta qualsiasi cosa come indirizzo di ritorno.  Fortunatamente, i
  browser moderni, richiedono che si scarichi posta con successo per un
  indirizzo, prima di permettere l'invio.  Quindi si deve tornare al
  buon vecchio metodo...telnet.



  7.2.1.  Cercare macchine MX

  Quando si richiede un pagina web, il browser effettua una richiesta al
  DNS per convertire il nome del dominio in un indirizzo IP.  Questo
  equivale alla ricerca di un campo "A" (sono considerati anche i campi
  "CNAME").  Quando si invia un e-mail, si ricerca il campo "MX". Se non
   trovato allora si utilizza il campo "CNAME", o "A".  Quindi per
  truccare un'e-mail si deve cercare il campo MX.


       dig mx isi.edu




  dar...


       ; <<>> DiG 8.2 <<>> mx isi.edu
       ;; res options: init recurs defnam dnsrch
       ;; got answer:
       ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6
       ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 4
       ;; QUERY SECTION:
       ;;      isi.edu, type = MX, class = IN

       ;; ANSWER SECTION:
       isi.edu.                1D IN MX        0 tnt.isi.edu.
       isi.edu.                1D IN MX        10 venera.isi.edu.

       ;; AUTHORITY SECTION:
       isi.edu.                1D IN NS        venera.isi.edu.
       isi.edu.                1D IN NS        ns.isi.edu.
       isi.edu.                1D IN NS        east.isi.edu.

       ;; ADDITIONAL SECTION:
       tnt.isi.edu.            1D IN A         128.9.128.128
       venera.isi.edu.         1D IN A         128.9.176.32
       ns.isi.edu.             1D IN A         128.9.128.127
       east.isi.edu.           1D IN A         38.245.76.2

       ;; Total query time: 448 msec
       ;; FROM: fdd.com to SERVER: default -- 127.0.0.1
       ;; WHEN: Sun Jul 25 15:49:32 1999
       ;; MSG SIZE  sent: 25  rcvd: 182




  quindi si vorr usare tnt.isi.edu (se non si ha dig, anche ;; nslookup
  andr bene).


  7.2.2.  SMTP

  La posta  consegnata utilizzando il protocollo SMTP (Simple Mail
  Transfert Protocol). Come la maggior parte dei protocolli di Internet
   basato su ASCII per rendere lo sviluppo e la risoluzione dei
  problemi pi semplici.  Non spiegher tutto, ma semplicemente dar un
  esempio. Spero che sia abbastanza.




  Il protocollo  orientato alla linea. Ogni e-mail, come specificato
  nel documento RFC822,  composta da intestazioni e da un corpo, che
  sono separati dalla prima linea vuota (senza caratteri o spazi).  Il
  protocollo SMTP specifica che l'e-mail  terminata da una linea
  contenente solo un punto.







  halyard$ telnet tnt.isi.edu 25
  Trying 128.9.128.128...
  Connected to tnt.isi.edu.
  Escape character is '^]'.
  220 tnt.isi.edu ESMTP Sendmail 8.8.7/8.8.6; Sun, 25 Jul 1999 14:01:25 -0700 (PDT)
  helo isi.edu
  250 tnt.isi.edu Hello rick@node-d8e9822 [216.233.8.34] (may be forged), pleased to meet you
  mail from:<confctrl@news.sfour.com>
  250 <confctrl@news.sfour.com>... Sender ok
  rcpt to:<confctrl-request@isi.edu>
  250 <confctrl-request@isi.edu>... Recipient ok
  data
  354 Enter mail, end with "." on a line by itself
  From:<confctrl@news.sfour.com>
  Subject: help

  help
  .
  250 OAA26778 Message accepted for delivery
  quit
  221 tnt.isi.edu closing connection
  Connection closed by foreign host.
  halyard$





  7.3.  Pazienza.

  La mailing list  l'ultima in parte perch  la pi lenta. Quando la
  posta viene girata ad altri indirizzi, sipu aspettare un'ora prima di
  vedere la risposta.

































  Win95 + WinNT + Linux multiboot using LILO mini-HOWTO
  Renzo Zanelli, rzanelli@southeast.net
  v1.0, 26 marzo 1998

  Questo documento descrive come utilizzare il multiboot fra Windows 95,
  Windows NT e Linux.  Traduzione di Roberto Kaitsas (RobK at flash
  net.it) Data traduzione: 11 Maggio 1999

  1.  Introduzione

  Ci sono una quantit di documenti disponibili che descrivono in
  dettaglio come fare il multiboot di qualsiasi numero di SO usando l'OS
  loader di Windows NT. Quando ho finalmente acquistato Windows NT,
  avevo gi Windows 95 e Linux installati sul mio sistema e usavo LILO
  per fare il multiboot fra di loro. Ho deciso di aggiungere Windows NT
  al LILO invece di usare l'OS loader di Windows NT.

  Originariamente avevo Windows 95 sul mio primo disco IDE e Linux sul
  secondo disco. Linux  divenuto il mio terzo disco IDE ed ho
  installato un nuovo disco IDE per Windows NT come secondo disco.
  Bench non abbia provato questo in differenti configurazioni, credo
  che l'ordine con il quale ogni SO venga installato o in quale disco
  venga installato non sia importante.

  Ricordatevi solamente di creare i dischi di avvio d'emergenza quando
  ogni SO ve lo chiede!

  Dato che ho usato l'utility di Gilles Vollant BootPart e BootPart
  supporta solo dischi fino a 4GB di dimensioni, questa potrebbe non
  funzionare se avete dischi di capacit pi grande. Se avete bisogno di
  lavorare con dischi pi grandi di 4GB, contattate Gilles direttamente
  (guardate la documentazione di BootPart per indirizzo e-mail di
  Gilles).



  2.  Installazione dei Sistemi Operativi

  Quando installate i SO, siate sicuri che siano tutti installati su
  partizioni avviabili. Ho installato sia Windows 95 che Windows NT su
  partizioni Fat 16, dato che questa procedura funziona su dischi Fat
  16.  Se decidete di usare Fat32 per Windows 95 e NTFS per Windows NT,
  controllate che la vostra versione di Linux le supporti e, se  cos,
  fino a che punto.



  2.1.  Installare Windows 95

  Installate Windows 95 sul vostro primo disco. Questo sar il vostro
  disco C:. Ricordatevi di creare i dischi di partenza di Windows 95
  quando vi viene chiesto di farlo.

  Ho scoperto che sarebbe meglio se il disco Linux venisse rimosso dal
  sistema quando viene installato Windows 95, cosicch non viene mai
  scoperto e non esiste fintantoch Windows 95  interessato.

  A questo punto, se avete fatto tutto correttamente, dovreste essere in
  grado di avviare Windows 95.



  2.1.1.  Installare Windows NT 4.0

  Installate Windows NT 4.0 sul vostro secondo disco. Quando create la
  partizione su questo disco, rendete la partizione eseguibile. Non
  tutte le versioni di Linux supportano NTFS, cos io ho creato una
  partizione FAT 16, per mantenermi cauto e perch volevo scambiare dati
  fra i dischi Windows.

  Quando Windows NT si installa, rileva la presenza di Windows 95 e crea
  una voce per questo nell'OS loader di Windows NT e si potranno vedere
  3 voci nel men dell'OS loader di NT come segue:


       Windows NT Workstation Version 4.00
       Windows NT Workstation Version 4.00 [VGA mode]
       Microsoft Windows




  A questo punto, se avete fatto tutto correttamente, siete in grado di
  eseguire un avvio multiplo fra Windows NT e Windows 95.



  2.1.1.1.  Installare Linux

  Installate Linux sul vostro terzo disco. Quando ho installato Linux,
  avevo installato solo Windows 95 cos ho solamente aggiunto la
  partizione di Windows 95 a Lilo. Potete andare avanti e installare
  tutti i SO installando LILO, o modificare il file di configurazione di
  Lilo pi tardi. Comunque decidete di procedere, vi mostrer come il
  file /etc/lilo.conf dovrebbe essere modificato nella prossima sezione.
  Una volta che Linux  installato, dovreste essere in grado di avviare
  Linux.



  3.  La parte Linux

  Questo prevede la modifica del file /etc/lilo.conf e la
  reinstallazione di LILO. Ci che segue dovrebbe essere gi presente in
  /etc/lilo.conf:


       boot=/dev/hda




  Questa parte di codice dovrebbe gi essere presente:


       # Parte di codice Linux
       image=/vmlinuz
       root=/dev/hdc1
       label=Linux
       # Fine parte di codice Linux




  Ora aggiungiamo la parte di codice di Windows 95:







  # Parte di codice Windows 95
  other=/dev/hda1
  table=/dev/hda
  label=Windows95
  # Fine parte di codice Windows 95




  Ora aggiungiamo la parte di codice di Windows NT:


       # Parte di codice di Windows NT
       other=/dev/hdb1
       table=/dev/hda
       loader=/boot/any_d.b
       label=WindowsNT
       # Fine Parte di codice di Windows NT




  Ora eseguiamo LILO di nuovo. A questo punto, se tutto  andato bene,
  dovremmo avere Windows 95, Windows NT, e Linux come selezione da LILO.
  Dovreste essere in grado di avviare Linux e Windows 95 (che dovrebbe
  darvi l'OS loader di Windows NT). Per rendere operativa la voce di
  Windows NT, bisogna ancora fare qualche modifica sul lato Windows NT.



  4.  La parte Windows NT

  Prima di poter continuare, dovete fare due cose.

  La prima  di scaricarsi e scompattare l'utility di Gilles Vollant
  BootPart che potete trovare a  <http://www.winimage.com/bootpart.htm>
  con qualche informazione sul suo uso.

  La seconda cosa da fare  copiare (non cancellateli ancora!) i
  seguenti file nella directory madre del disco di Windows NT:


       Boot.ini
       Bootsect.dos
       Ntdetect.com
       Ntldr




  Questi files sono l'OS loader di Windows NT. Questi stanno nella
  directory madre del disco di Windows 95 e sono stati messi l da Win
  dows NT quando lo avete installato.

  Una volta che questo  stato fatto, avviate al DOS prompt di Windows
  95 (premete Shift+F5 quando Windows 95 si carica) e digitate il
  seguente comando:


       BOOTPART WINNT BOOT:D:




  Ora dovete modificare Boot.ini nella directory madre del vostro Win
  dows NT.  Voi dovete modificare 3 linee, 1 nella sezione [boot loader]
  e due nella sezione [operating systems].

  Questo  il Boot.ini originale:


       [boot loader]
       timeout=30
       default=multi(0)disk(0)rdisk(1)partition(1)\WINNT
       [operating systems]
       multi(0)disk(0)rdisk(1)partition(1)\WINNT="Windows NT Workstation Version 4.00"
       multi(0)disk(0)rdisk(1)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos
       C:\ = "Microsoft Windows"




  Questo  il nuovo Boot.ini:


       [boot loader]
       timeout=30
       default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
       [operating systems]
       multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00"
       multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos




  Notate che tutte le voci di rdisk(1) sono state cambiate in rdisk(0) e
  la linea che si riferisce a Windows 95  stata cancellata.

  Dopo aver salvato Boot.ini, se avete fatto tutto correttamente,
  dovreste essere in grado di avviare Windows NT da LILO.



  5.  La parte Windows 95

  Create un dischetto DOS avviabile dal prompt DOS di Windows 95
  (premete Shift+F5 quando Windows 95 si carica).  importante che
  questo disco sia creato dal prompt DOS, non da una finestra DOS
  all'interno di Windows 95! Non avviate Windows95 fino a che questo
  passo non  stato completato! Copiate il file
  C:\WINDOWS95\COMMAND\SYS.COM sul dischetto (sostituite il percorso del
  vostro Windows95 se  diverso).  Ora avviate dal dischetto e digitate
  il comando:


       SYS C:




  Questo dovrebbe rimuovere l'OS Loader di Windows NT e dovreste essere
  in grado di avviare direttamente in Windows 95 da LILO.

  Ora potete rimuovere i files dell'OS Loader di Windows NT:


       Boot.ini
       Bootsect.dos
       Ntdetect.com
       Ntldr


  6.  Riferimenti

  Un ringraziamento alle seguenti persone (in nessun ordine
  particolare):

  James C. Bevier & D. Michael McFarland.  In un messaggio scambiato
  sulla lista-reddhat mi hanno procurato alcune informazioni su come
  avviare NT da Linux.

  Gilles Vollant.  BootPart  una pratica utility e Gilles l'ha resa
  disponibile gratuitamente con una buona documentazione. Grazie Gilles.

  Mike Harlan.  La lettura del suo 'Linux-DOS-Win95-OS2' mini-HOWTO, mi
  ha aiutato a fare alcune considerazioni sul comportamento di LILO.




















































  LINUX PLIP MINI-HOWTO
  Andrea Controzzi, controzz@cli.di.unipi.it
  v2.1, 12 marzo 1998

  Questo HOWTO insegna a impostare ed usare il Protocollo di Interfaccia
  su Linea Parallela ("Parallel Line Interface Protocol").  Traduzione
  di Giovanni Bortolozzo (borto at pluto.linux.it).


     NOTA
        Questa  una nuova versione.  Ci sono molte modifiche e un sacco
        di miglioramenti, ma ci saranno ancora errori di grammatica e
        battitura (l'inglese non  la mia lingua madre) e, anche se non
        voluti,  possibile ci siano un po' di informazioni vecchiotte.
        INVITO ad informarmi su qualsiasi errore per aiutarmi a fornire
        a tutti le informazioni corrette.

        Le modifiche pi sostanziali in questa versione sono:


       formato SGML

       una risposta generale alla domanda molto ricorrente su "PLIP con
        win95" (la risposta  negativa, mi spiace)

       una sezione di FAQ pi grande e migliore (grazie ai report di un
        sacco di utenti: molti di loro, come promesso, troveranno qui i
        loro commenti!)

       rimozione dei file Quick PLIP Installation, che erano inutili e
        obsoleti.

       aggiornamento dell'addendum sulla connessione PLIP Dos-Linux

        Per qualsiasi domanda, correzione, commento e/o suggerimento, il
        mio indirizzo email: controzz@cli.di.unipi.it.

        Mi si scriva liberamente ogni qual volta si ha bisogno di aiuto.
        Qualche volta non risponder immediatamente, ma lo far.  Se
        capita che non si riceve niente da me passate due settimane,
        significa che il nostro sistema di posta ha qualche problema:
        non si esiti a scrivermi ancora: aiutare  il mio compito.  Non
        posso garantire che risolver tutti i problemi, ma ci prover.
        Se dopo molte mail non si riceve ancora risposta, si controlli
        il proprio indirizzo di ritorno.  Spesso le mie risposte non
        arrivano a causa di problemi di questo tipo, solitamente perch
        l'indirizzo di ritorno  impostato a root@myhost.

        Prima di scrivermi, si leggano le FAQ. La mia risposta alle
        domande gi l presenti non sar sicuramente la migliore
        rispetto alle risposte che si sono gi lette (probabilmente 
        peggiore e meno completa).

        Per domande a proposito di PLIP con DOS e Win95, invito a
        scrivere agli autori di quei capitoli: io non posso aiutarvi.

        Prima di tutto, un sacco di informazioni tecniche provengono dal
        NET-2 HOWTO di Terry Dawson.  Questo mini-HOWTO non si suppone
        copra altri aspetti e/o rimpiazzi il suddetto HOWTO: il mio
        scopo era di fornire una strada per installare in maniera veloce
        una connessione PLIP permanente, *SOLO* questo.  Tutte le altre
        informazioni provengono dalla mia esperienza personale e
        dall'aiuto di molti utenti che mi hanno inviato commenti e
        informazioni.

        Si legga il NET-2 HOWTO e altri documenti per informazioni
        generali sulla rete e sui file di configurazione che suggerisco
        di modificare.


  1.  Introduzione: cos' il PLIP e perch dovrei usarlo?

  Ci sono molti modi per creare una connessione tra diversi host.  PLIP,
  similmente a SLIP, permette una connessione locale tra due macchine,
  usando invece le porte parallele.

  Le porte parallele trasferiscono pi di un bit per volta e ci
  significa che  possibile raggiungere velocit pi elevate rispetto a
  quelle ottenibili con le interfacce seriali.

  La velocit raggiungibile dipende completamente dal proprio hardware
  (CPU e porta parallela) e dal carico del sistema, ed in generale pu
  variare da un minimo di 5 Kb/sec fino a 40 Kb/sec.

  L'interfaccia PLIP  abbastanza veloce da permettere alcune funzioni
  decenti di tcp/ip, come NFS.  Quindi si pu avere un computer con
  tutte le proprie cose di Linux e un altro con solamente un sistema
  minimo, nel quale si pu montare tutto il resto dalla macchina
  principale.

  Lo svantaggio  che la maggior parte degli utenti posseggono solamente
  una porta parallela, e ci implica che non si sar in grado di
  stampare e usare PLIP contemporaneamente.  Anche con due porte
  parallele  impossibile stampare e usare PLIP senza usare i moduli del
  kernel.

  Questo svantaggio pu anche essere eliminato se si hanno due o pi
  porte parallele, applicando una patch che si trova in questo mini-
  HOWTO.

  Finalmente sono in grado di dare un buon metodo per impostare una
  connessione PLIP tra DOS e Linux.

  Non mi stancher mai di ripeterlo: finora nessuno  riuscito ad
  instaurare un collegamento funzionante tra Linux e Windows95.


  2.  Hardware richiesto per usare PLIP.

  L'hardware richiesto per impostare una interfaccia PLIP  (ovviamente)
  una porta parallela libera in entrambe le macchine e un cavo.  Se 
  possibile configurare la parallela dal proprio BIOS, la si imposti
  almeno a "bidirezionale", ma se possibile meglio in modalit ECP o
  EPP.

  Per quanto riguarda il cavo, quanto segue  quello che  scritto nel
  file plip.c presente nei sorgenti del kernel 2.0.33:















    Il cavo usato di fatto  un cavo parallelo nullo ("parallel null
    cable") standard -- venduto in diversi posti come cavo "Laplink".
    Si avr bisogno di un cavo a 12 conduttori per farselo da soli.
    I collegamenti sono:
      SLCTIN      17 - 17
      GROUND      25 - 25
      D0->ERROR   2 - 15          15 - 2
      D1->SLCT    3 - 13          13 - 3
      D2->PAPOUT  4 - 12          12 - 4
      D3->ACK     5 - 10          10 - 5
      D4->BUSY    6 - 11          11 - 6
    Non si connettano gli altri piedini. Sono
      D5,D6,D7 sono 7,8,9
      STROBE  1, FEED  14, INIT  16
      le masse aggiuntive sono 18,19,20,21,22,23,24




  Ma consiglio caldamente di leggere i file
  /usr/src/linux/drivers/net/README1.PLIP e README2.PLIP per maggiori
  informazioni sul cavo.

  La mia opinione  che si dovrebbe evitare di costruirsi il proprio
  cavo parallelo nullo.  Un cavo fatto in casa pu far risparmiare
  davvero pochi soldi, ma pu provocare un sacco di mal di testa.  Se si
  vuole costruirsi il proprio cavo parallelo si ricordi che lo si sta
  facendo a proprio rischio: io ho riportato esattamente quanto scritto
  in plip.c ma non do garanzie.

  Alcune cose sulla lunghezza del cavo: cavi lunghi (i.e. pi di 10
  piedi o 3 metri) possono portare problemi dovuti a interferenze radio.
  Se si ha bisogno di un cavo lungo si dovrebbe usare un buon cavo ben
  schermato, ma comunque non sono raccomandati cavi troppo lunghi: penso
  che la massima lunghezza del cavo dovrebbe essere 15 metri (30 piedi).

  Ad ogni modo, qualcuno mi ha scritto che il suo cavo da 100 piedi (30
  metri) funziona bene; se qualcuno vuole veramente provare una
  connessione PLIP tra l'ufficio e casa sua (a 200 metri di distanza),
  ed ha abbastanza soldi da spendere, pu provarla, ma lo fa a suo
  rischio.


  3.  Riconfigurare il kernel.

  Si assume che si sia gi in grado di configurare e compilare il
  kernel, altrimenti conviene leggere qualcosa in proposito (Kernel
  HOWTO ed altre guide).  Grazie al lavoro dei ragazzi del kernel,
  ricompilarne uno degli ultimi  veramente un compito facile anche per
  la gente "comune", e quindi lo si faccia.  Comunque, per amor di
  completezza, ecco qui un breve sunto di quanto si deve fare:

  NOTA: assumo che si stia usando un kernel della serie 2.0.xx.  Ormai
  non  pi necessario tenersi i kernel 1.2.xx.  Non ci sono istruzioni
  sui kernel 2.1.xx in quanto sono per lo sviluppo.

  Assumer che si usi menuconfig per scegliere le opzioni del kernel, ma
  gli altri strumenti sono equivalenti.  Mostrer come farlo con
  menuconfig:



       #make menuconfig



  Suggerisco caldamente di selezionare



       Loadable module support  --->




  ed abilitare



       [*] Enable loadable module support




  e, se possibile (i.e. si ha modules.2.0.0)



       [*] Kernel daemon support (e.g. autoload of modules)




  Si torni indietro e si scelga



       Networking options  --->




  dove si deve scegliere almeno



       [*] Network firewalls
       [*] TCP/IP networking
       [*] IP: forwarding/gatewaying




  Si torni indietro e si scelga almeno



       [*] Network device support
       <M> PLIP (parallel port) support




  Se si usano i moduli consiglio di impostare il PLIP come modulo.  Se
  lo si fa e se si ha bisogno di usare una stampante, si pu andare
  anche in



       Character devices  --->


  e impostare come modulo il



       <M> Parallel printer support




  Ora si  abilitato il supporto per il PLIP nel kernel.  Se  la prima
  volta che si compila il kernel si dia un occhiata pure alle altre
  opzioni, poi si salvi e si esca.

  Alla fine si compili il tutto con



       #make dep ; make clean
       #make zlilo




  e se si usano i moduli



       # make modules
       # make modules_install




  Ora si riavvii il proprio sistema.


  4.  Messaggi del kernel sull'interfaccia PLIP.

  Dopo aver riconfigurato e compilato il kernel abilitando il supporto
  per il PLIP, quando si riavvia il sistema, se il kernel supporta
  direttamente il PLIP, o quando si carica il modulo del PLIP se si 
  compilato il supporto come modulo, si dovrebbe vedere qualcosa di
  simile (i numeri possono essere diversi):



       NET3 PLIP version 2.2 gniibe@mri.co.jp
       plip1: Parallel port at 0x378, using assigned IRQ 7.




  A seconda della configurazione di klogd e syslogd il messaggio sul
  plip pu essere stato salvato nei file di log del sistema: non ci si
  faccia prendere dal panico se non si vede il suddetto messaggio.  Se
  si  compilato il PLIP come modulo e lsmod mostra che il modulo plip 
  caricato, questo  sufficiente.

  Prego si prenda nota del nome dell'interfaccia.  Solitamente  plip1,
  ma potrebbe essere plip0 e anche plip2, plip3 e cos via.  Dipende
  dall'indirizzo IO.





  5.  Impostare i file di configurazione.

  NOTA: Alcune distribuzioni, come Debian, usano file di configurazione
  diversi.  Se si ha un'installazione standard e non si trovano i file
  rc.inet*, si cerchino i file di configurazione (diversi) nella
  directory /etc/init.d.

  Prima di tutti si ricordi di salvare una copia di tutti i file che si
  modificheranno,



       #cp rc.inet1 rc.inet1.BACKUP




  potrebbe essere una buona idea.

  Ora, se non lo si  gi fatto, si deve scegliere l'indirizzo IP delle
  due macchine.  Nel mio esempio user una coppia di IP d'esempio per
  gli IP che si andranno a scrivere, nel formato standard
  xxx.xxx.xxx.xxx.

  Nel file /etc/rc.d/inet1.rc di entrambe le macchine si aggiunga questa
  riga (meglio se verso la fine del file):


  ______________________________________________________________________
  /sbin/route add -net ${NETWORK} netmask ${NETMASK}
  ______________________________________________________________________



  Dove NETWORK e NETMASK dovrebbero essere state impostate
  precedentemente.  Se non si sa come, invito a leggere il NET-2 HOWTO.

  Se dopo questo comando route si ottiene un messaggio simile a questo:



       SIOCADDRT: network unreachable




  allora si usi questo:


  ______________________________________________________________________
  /sbin/route add -net ${NETWORK} netmask ${NETMASK} dev plip1
  ______________________________________________________________________



  dove, come al solito, si dovr usare il nome di interfaccia riportato
  dai messaggi del kernel (si veda sopra).

  Si possono tranquillamente ignorare queste variabili solo nei seguenti
  casi:

  Se si vuole solamente connettere due macchina in una rete isolata, si
  pu prendere qualsiasi coppia di indirizzi IP, ad esempio 200.0.0.1 e
  200.0.0.2 rispettivamente.  In questo caso si pu tranquillamente
  mettere NETWORK="200.0.0.0" e NETMASK="255.255.255.0".  Questi sono
  gli IP di esempio che uso nella mia Installazione PLIP Rapida (si veda
  pi sotto).


  NOTA: 200.0.0.1 e 200.0.0.2 sono solo IP di esempio, e vi avviso di
  non usare questi numeri perch potrebbero essere indirizzi di host
  reali su Internet!

  Invito caldamente a scegliere i proprio indirizzi negli intervalli di
  "indirizzi privati":



               10.0.0.0        -   10.255.255.255
               172.16.0.0      -   172.31.255.255
               192.168.0.0     -   192.168.255.255




  Nel file /etc/hosts di entrambe le macchine si dovrebbe aggiungere una
  voce con l'IP della macchina a cui ci si connette via PLIP.  Nel mio
  esempio le voci sono:


  ______________________________________________________________________
  200.0.0.1       uno             # questo  l'indirizzo IP di "uno"
  200.0.0.2       due             # questo  l'indirizzo IP di "due"
  ______________________________________________________________________



  Dove "uno" e "due" sono i nomi scelti per i due host.

  Se si vuole attivare l'NFS, a patto di aver risposto affermativamente
  durante la configurazione del kernel, si devono aggiungere in
  /etc/exports le voci che descrivono le directory che si vogliono
  esportare.  Nel mio esempio, per poter montare la directory /usr, si
  deve aggiungere questa voce:


  ______________________________________________________________________
   /usr                          due (ro)
  ______________________________________________________________________



  Per maggiori informazioni su NFS, si legga la documentazione
  specifica; non mi si segnalino problemi con NFS, non sar in grado di
  aiutare.

  Ora si riavvia il proprio sistema.


  6.  Attivare la connessione PLIP.

  E finalmente, questi sono i comandi, da eseguire con i privilegi di
  root, che attivano l'interfaccia PLIP (naturalmente il cavo deve
  essere gi collegato correttamente).

  NOTA: Se succede qualcosa di inaspettato, si ricontrolli il cavo ed
  eventuali errori di battitura nei comandi.  Se nonostante si seguano
  correttamente le istruzioni ci sono ancora errori, si legga il
  paragrafo delle FAQ, nel quale sono gi disponibili un sacco di
  risposte.


  Per prima cosa ci si assicuri che non sia presente il dispositivo lp:


       # cat /proc/devices




  Non ci deve essere nessun riferimento ad lp simile al seguente:



        6 lp




  Se c', si rimuova (temporaneamente) il dispositivo lp prima di
  continuare: se PLIP funziona allora lo si pu provare con lp pi
  tardi.  Per rimuovere il dispositivo lp si dovr usare rmmod se  un
  modulo; se invece  compilato staticamente nel kernel, si deve
  ricompilare il kernel con il supporto di lp come modulo (idea molto
  saggia).

  Negli esempi, uso ancora i nomi uno e due.  Su uno si dovranno fare le
  seguenti cose.

  Se non si ha il demone che monta automaticamente i moduli e si 
  compilato PLIP come modulo, lo si deve montare:



       # insmod plip




  NOTA: se la propria porta parallela non  sull'IRQ 7 e/o il suo
  Indirizzo IO  diverso da 0x378, allora lo si deve dire a insmod.  Si
  trovi quali sono l'IRQ e l'Indirizzo IO veri (potrebbe andare bene
  anche il comando DOS MSD, ma non ci si fidi troppo) e scrivere
  qualcosa del genere:



       # insmod plip io=0x278 irq=5




  Solitamente l'IRQ  il 7 o il 5, mentre l'Indirizzo IO  0x378, 0x278
  o 0x3bc.   importante verificare che gli indirizzi e gli IRQ
  corrispondano alle impostazioni hardware (tramite ponticelli nelle
  vecchie schede, nel BIOS nelle schede madri moderne).

  Se si  paranoici si verifichi che il modulo  caricato con:



         # lsmod

       Module:        #pages:  Used by:
       plip               3            0



  Ci si annoti il nome dell'interfaccia (plip0, plip1, e cos via; per
  maggiori dettagli si legga il precedente capitolo sui messaggi del
  kernel) e si imposti poi l'interfaccia PLIP:



       # ifconfig plip1 uno pointopoint due up




  NOTA: se la propria porta parallela non  sull'IRQ 7 e/o il suo
  Indirizzo IO  diverso da 0x378, allora lo si deve dire a ifconfig.
  Si usino gli stessi IRQ e Indirizzo IO riportati dai messaggi del
  kernel e si scriva qualcosa del genere:



       # ifconfig plip1 irq 7
       # ifconfig plip1 io_addr 0x3bc




  Solitamente IRQ  7 oppure 5, mentre l'Indirizzo IO  0x378, 0x278 o
  0x3bc.

  Ora si controlli che funziona...



       # ifconfig



        .....
        .....
        plip1     Link encap:10Mbps Ethernet  HWaddr FC:FC:C8:00:00:01
                  inet addr:200.0.0.1  P-t-P:200.0.0.2  Mask:255.255.255.0
                  UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
                  RX packets:0 errors:0 dropped:0 overruns:0
                  TX packets:0 errors:0 dropped:0 overruns:0
                  Interrupt:7 Base address:0x378




  Si aggiunga l'intradamento verso due...



       # route add due plip1




  E, se si vuole, si pu aggiungere anche l'NFS per due:



       # rpc.portmap
       # rpc.mountd
       # rpc.nfsd



  Su "due" i comandi sono gli stessi, ma si deve scrivere uno invece di
  due e viceversa.

  Una delle due macchine probabilmente avr solamente la connessione
  PLIP.  Se questo  vero e quella macchina  due, si pu anche
  scrivere:



       # route add default gw uno




  su quella macchina.  Nel mio esempio precedente, due  un portatile
  che ha solamente una connessione PLIP con uno, cos uso il comando
  suddetto su due.

  Alla fine si controlli se il tutto funziona con un



       # ping due




  da uno e un



       # ping uno




  da due.

  Naturalmente sarebbe meglio far s che tutti questi comandi siano
  lanciati da uno script all'avvio del sistema.  Si deve solamente
  creare uno script che esegua questi comandi: ora lo si pu lanciare
  come root quando serve, oppure si pu aggiungere un comando (in
  /etc/rc.d/rc.inet2) che lo chiami all'avvio.

  Per regolare il PLIP si pu usare anche in comando plipconfig.  Si
  veda la pagina man per maggiori informazioni.

  Per disabilitare il PLIP, si deve solamente far questo:



       # ifconfig plip1 down




  il quale rimuove contemporaneamente anche le voci di instradamento.
  Se non si ha il demone per il caricamento automatico dei moduli,
  allora si rimuova anche il modulo.



       # rmmod plip



  7.  FAQ (Filza di Assilli Quotidiani).

  Questa sezione dovrebbe (almeno spero) risolvere i vostri problemi.
  Se si ha qualsiasi altra domanda, me la si invii liberamente.


    Ricevo questo messaggio all'avvio del sistema (o quando carico il
     modulo del plip):


       SIOCSIFADDR: No such device
       SIOCADDRT: Network is unreachable




  e quando provo a instaurare la connessione come spiegato in precen
  denza ricevo ancora dei messaggi d'errore simili a:


       SIOCSIFADDR: No such device
       SIOCSIFDSTADDR: No such device
       SIOCADDRT: Network is unreachable
       mount clntudp_create: RPC: Port Mapper failure - RPC: Unable to send





    Il kernel, per qualche ragione, non  stato abilitato a supportare
     il PLIP.  Ci pu essere dovuto a:

    Non si  risposto affermativamente a "PLIP support? " durante la
     configurazione del kernel.

    Non si  risposto affermativamente a "Printer support? " durante la
     configurazione del kernel.

    Si  compilato il PLIP come modulo, e quindi si deve caricarlo.

    Si sta indirizzando la porta sbagliata, i.e. si  scritto plip1
     invece di plip0 per esempio.


    C' modo, a parte tramite i moduli, di supportare sia PLIP che LP?
     Forse con due porte parallele?

    S, a quanto ne so ci sono due modi, descritti in "Patches to make
     PLIP and LP live together":

    Si pu applicare una patch al kernel per far s che quest'ultimo
     supporti entrambi.

    Si pu applicare un'altra patch al kernel per far s che questo usi
     una porta parallela per il PLIP e l'altra per LP.


    Ho creato uno script che connette i miei 2 computer.  Imposto
     automaticamente la connessione nel mio rc.inet2, dove chiamo uno
     script che crea la connessione e abilita l'NFS.  La mia macchina
     "due" monta alcune directory di "uno"; ho aggiunto le voci corrette
     nel /etc/fstab di "due".  Se avvio "due" quando "uno"  gi, "due"
     di blocca per alcuni minuti durante il mount dei filesystem remoti.

    Ci avviene perch "due" aspetta per montare i filesystem di "uno",
     ma se "uno"  gi bisogna attendere finch "due" si  stancata di
     aspettare.  Per evitarlo, si pu:

    Commentare in rc.inet2 il comando che monta i filesystem remoti.

    Rimuovere le voci nel /etc/fstab di "due" e montare manualmente i
     filesystem remoti quando e se servono.

    Una soluzione migliore sarebbe se "due" fosse in grado di
     determinare all'avvio se "uno"  attiva, e se lo  montare i
     filesystem.  Questo pu essere ottenuto rimpiazzando il comando
     mount in rc.d e dove necessario con qualcosa di simile a questo:


     ___________________________________________________________________
          if ping -c 5 one ; then
            mount one:/.....
          fi
     ___________________________________________________________________



    La mia connessione  attiva, ma il ping fallisce.  Ricevo il
     seguente messaggio dal kernel:




       plip1: timed out (1, 89)





  o un messaggi simili.


    Ci significa che il "proprio lato della connessione" funziona, la
     propria macchina invia il segnale, ma "l'altra parte" non risponde
     o dalla propria parte non si aspetta su IRQ/Indirizzo IO giusti.
     Questo  il problema pi comune e, per quanto ne so, ha un sacco di
     motivi plausibili, solitamente problemi con il cavo oppure IRQ e/o
     Indirizzo IO sbagliati.  L'IRQ sbagliato  causa di oltre il 60%
     dei problemi, quindi  molto facile che cambiandolo si rimuova il
     problema.  Di seguito un elenco dettagliato di possibili motivi:

    Il cavo non  inserito correttamente, oppure  rotto o sbagliato.
     Lo si controlli, se possibile, usandolo con due macchine Linux che
     abbiano una connessione PLIP che gi funziona.  Se non  possibile,
     allora almeno si controlli il cavo con un tester.  Il fatto che il
     cavo funzioni o meno con DOS/win95  un buon/brutto presagio ma non
      una prova.

    La macchina "dall'altra parte" non ha il PLIP attivo.

    Si  connessi con un portatile che non ha una porta parallela
     adatta (si veda pi avanti).

    Si ha una porta parallela veramente economica che  semplicemente
     una porta "stampante", e quindi pu inviare ma non ricevere.

    La propria porta parallela non  impostata (almeno) come
     bidirezionale.  Lo si faccia nella configurazione del BIOS.  Vanno
     bene anche impostazioni avanzate della porta parallela come EPP e
     ECP.


    La porta parallela ha un IRQ diverso, cos si deve caricare il
     modulo plip (o il modulo lp con un diverso IRQ.  Si torni al
     capitolo ``Attivare la connessione PLIP'' e si scelga un IRQ
     diverso.

    Altri dispositivi, ad esempio una scheda aiudio, potrebbero
     condividere il proprio irq (che solitamente  l'irq 7).  Non ci si
     fidi dei programmi DOS come MSD, si provi invece a caricare il
     modulo plip con un diverso irq.


    Ho messo l'IRQ e l'Indirizzo IO corretti, ma ancora non funziona.
     L'indirizzo l'ho scoperto usando il comando MSD.

    Mi  stato segnalato che MSD restituisce indirizzi delle porte
     errati.  Si provi ad usare questo programma:
     <http://www.cs.caltech.edu/~huny/para13.zip>.


    La mia connessione  attiva e il ping funziona.  Qualche volta
     ricevo dal kernel il seguente messaggio:


       plip1: timed out (1, 89)




  e simile.

    Significa che l'altro capo della connessione non ha risposto prima
     del timeout.  Se tutto funziona, si possono ignorare questi
     messaggi: solitamente significano che l'altro capo  molto pi
     lento del proprio, a causa di hardware pi vecchio o di un carico
     maggiore.  Si pu provare a regolare il PLIP con il comando
     plipconfig.


    Ho installato la connessione PLIP ma se faccio ping ho il 100% di
     perdita dei dati.  Ho connesso il mio desktop ad un portatile.

    Alcune porte parallele dei portatili non vanno bene per il PLIP,
     poich sono semplicemente "porte stampante", i.e. possono solo
     trasmettere ma non ricevere dati.  Non ho idea se esista un modo
     per farle funzionare.  La sola speranza :

    Si controlli la configurazione del proprio notebook, forse c' un
     modo per configurare la porta parallela come porta parallela invece
     di porta stampante.  Solitamente  chiamato "modalit parallela
     avanzata" ("parallel enhanced mode").

    Si provi la modalit 0 del plip.  Non ho idea di come fare n se
     funziona o  ancora disponibile negli ultimi kernel.


    Quali velocit posso raggiungere con PLIP?

    Questa  una domanda di difficile risposta, poich ci sono MOLTI
     fattori che possono profondamente cambiare le prestazioni:

    La velocit della CPU ad entrambi i capi della connessione.

    Il tipo e l'impostazione delle porta parallela.

    Il carico del sistema.

    L'uso che si fa del PLIP.

     Solo per dare un'idea di massima, si dovrebbero raggiungere circa i
     40Kb/sec, molto pi veloce di quanto si possa fare con una
     qualsiasi connessione seriale e prossima alla velocit
     raggiungibile con una scheda ethernet di basso livello.


    Cosa succede se ho bisogno di fare ifconfig up e ifconfig porta gi
     un sacco di volte plip1?

    Sembrerebbe che sia necessario aggiungere -arp al comando ifconfig,
     tranne per la prima volta dopo l'avvio.  Io non ne ho bisogno, ma
     forse qualcun'altro s.


    Ho letto quali sono i numeri IP riservati per le reti private e i
     tuoi 200.0.0.1 e 200.0.0.2 non sono in questi intervalli.
     Dovrebbero essere cambiati?

    S, lo devono.  Ma, come ho sottolineato sin dall'inizio, li ho
     scelti solo per la loro semplicit, liberissimi di cambiarli a
     proprio piacimento.  Di seguito un estratto dal NET-2 HOWTO:




       L'RFC1597 ha specificatamente riservato alcuni indirizzi IP per le
       reti private.  Li si dovrebbe usare in quanto prevengono qualsiasi
       cosa di spiacevole possa succedere se ci si connette accidentalmente
       ad Internet.  Gli indirizzi riservati sono:

          10.0.0.0        -   10.255.255.255
          172.16.0.0      -   172.31.255.255
          192.168.0.0     -   192.168.255.255





    C' un modo per regolare i parametri del PLIP senza modificare il
     codice sorgente?

    S.  Si provi il comando /sbin/plipconfig. Si veda la pagina man
     per maggiori informazioni.


    Uso la Debian GNU/Linux, e sotto Debian i file /etc/rc.d/rc.inet1 e
     2 non esistono.  Dove devo scrivere il comando di configurazione
     del plip?

    Nella Debian GNU/Linux di deve modificare /etc/init.d/network, dove
     sui devono mettere tutti i comandi che dovrebbero stare in rc.inet1
     e 2.


    Ho alcuni problemi a connettere due macchine con il PLIP.  La prima
     ha l'ultimo kernel, mentre la seconda usa ancora la versione PLIP
     del 1.0.x.:  questo il problema?

    S,  molto meglio, quando possibile, avere la stessa versione del
     PLIP ad entrambi i capi.  In plip.c sta scritto che il PLIP attuale
     non pu funzionare con il PLIP del 1.0.x.



    Bene, il PLIP funziona con 4 bit, ma che ne  del PLIP a 8 bit di
     cui ho letto nei documenti del kernel?  Penso si chiami Modo 1.

    Questo mini HOWTO  per la configurazione, per le informazioni
     tecniche si leggano i file /usr/src/linux/drivers/net/README*.PLIP
     o si contatti l'autore.  Quello che so  solo questo: il PLIP
     standard usa i cavi "null printer" ed  il Modo 0 (da non
     confondere con plip0, che  il nome dell'interfaccia) ed usa 4 bit;
     il Modo 1 usa 8 bit e dovrebbe gi essere disponibile, ma necessita
     di un cavo fatto a mano e funziona solo tra due macchine Linux.
     Non so, una volta che ci si  procurati il cavo, come impostare una
     connessione PLIP Modo 1; se qualcuno lo sa me lo faccia sapere.


  8.  Patch per far convivere PLIP e LP.

  Il modo migliore per far convivere PLIP e LP  di usare i moduli del
  kernel: si pu caricare plip.o e scaricarlo quando serve la stampante
  o viceversa.  Se veramente si ha bisogno di usare sia PLIP che LP, si
  provino le patch che seguono.


  8.1.  PLIP e LP assieme sulla stessa porta.

  Se per qualche ragione si vuole avere PLIP e LP supportati
  direttamente dal kernel, si possono provare queste patch.

  Si deve modificare il seguente pezzo di codice, ma prima si faccia il
  backup dei file:


  ______________________________________________________________________
  ******** modifiche a linux/drivers/char/lp.c *************************
  struct lp_struct lp_table[] = {
          { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL,
  NULL, },
  /*      { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL,
  NULL, },
          { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL,
  NULL, },
  */
  };
  #define LP_NO 1

  ******** modifiche a linux/drivers/net/Space.c ***********************
  #if defined(PLIP) || defined(CONFIG_PLIP)
      extern int plip_init(struct device *);
      static struct device plip2_dev = {
          "plip2", 0, 0, 0, 0, 0x278, 2, 0, 0, 0, NEXT_DEV, plip_init, };
      static struct device plip1_dev = {
          "plip1", 0, 0, 0, 0, 0x378, 7, 0, 0, 0, &plip2_dev, plip_init, };
  /*    static struct device plip0_dev = {
          "plip0", 0, 0, 0, 0, 0x3BC, 5, 0, 0, 0, &plip1_dev, plip_init, };
  */
  #   undef NEXT_DEV
  #   define NEXT_DEV     (&plip1_dev)
  #endif  /* PLIP */
  ______________________________________________________________________



  Ovviamente c' una liberatoria standard: ho ricevuto queste patch e le
  rendo disponibili "cos come le ho ricevute". Ci significa che le si
  possono provare a proprio rischio e pericolo.  Ad ogni modo, il
  problema pi grosso dovrebbe essere solamente quello di ripristinare i
  file originali e ricompilare.
  8.2.  PLIP e LP su porte diverse.

  Se si posseggono almeno 2 porte parallele si possono provare queste
  patch, che dovrebbero permettere di usare PLIP su una porta e LP
  sull'altra.


  1. Si commenti una riga in un file sorgente del kernel,
     drivers/char/lp.c.


     ___________________________________________________________________
     struct lp_struct lp_table[] = {
     { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
     { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
     /* { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, }, */
     };
         3 -> 2
     ___________________________________________________________________



  2. Configurazione del kernel



       PLIP (parallel port) support (CONFIG_PLIP) [n] y

       Parallel Printer support [y] y





  3. Messaggi del kernel all'avvio



       lp1 at 0x0378, using polling driver
       .....
       NET3 PLIP version 2.0 gniibe@mri.co.jp
       plip2: Parallel port at 0x278, using assigned IRQ 5.





  Ancora si applica la liberatoria della sezione precendente.



  9.  Una connessione PLIP tra DOS e Linux.

  Dopo la prima versione di questo mini HOWTO molti mi hanno scritto per
  avere informazioni sulla connessione tra computer Linux e DOS (o
  Windows).  L'interesse generale mi ha portato ad aggiungere questo
  capitolo che spero sia d'aiuto a tutti.

  Questa sezione  tratta da un articolo di James McDuffie
  <mcduffie@scsn.net> che ho trovato nella Linux Gazzette.  Tratta
  l'installazione di base di una connessione PLIP tra Linux e DOS usando
  Windows e Trumpet WinSock e d l'indirizzo di un utile programma che
  permette di usare i programmi X-Window su Windows.

  L'ultima sezione  un addendum di James Vahn <jvahn@short.circuit.com>
  che descrive pi approfonditamente come impostare questa connessione e
  come risolvere molti problemi.

  Per qualsiasi domanda su questo capitolo vi invito a contattare lui e
  non me.


  9.1.  Connessione DOS-Linux.

  Si suppone che si sia gi impostato correttamente il supporto PLIP dal
  lato Linux e si abbia gi il cavo giusto, altrimenti si torni ai
  capitoli precedenti.

  Ora, per il lato DOS, per prima cosa si ha bisogno di un gestore dei
  pacchetti ("packet driver").  Pu essere trovato qui:

  ftp://ftp.crynwr.com/drivers/plip.zip

  Il programma funziona sotto DOS e si comporta come l'Ethernet Packet
  driver.  Se si vuole usare PLIP con Windows serve anche Trumpet
  Winsock.  Questo funziona come interfaccia TCP/IP.  Altrimenti, si
  deve trovare un qualche software di TCP/IP per DOS.

  Ora si torni alla macchina Linux e si aggiunga l'indirizzo del
  computer DOS ad /etc/hosts.  Se la macchina DOS non ha un indirizzo IP
  registrato, se ne pu scegliere uno qualsiasi (si ricordino gli
  avvertimenti del capitolo 3 sugli indirizzi IP).

  Si supponga ora di aver scelto il nome linux per la macchina Linux e
  dos per quella DOS.  Si deve scrivere:



       ifconfig plip1 linux pointopoint dos arp up
       route add dos




  Naturalmente se si vuole che questo sia fatto ogni volta che si avvia
  la macchina linux si possono aggiungere queste righe nel file
  /etc/rc.d/rc.inet1:


  ______________________________________________________________________
  /sbin/ifconfig plip1 linux pointopoint dos arp up
  /sbin/route add dos
  ______________________________________________________________________



  Ci imposta l'interfaccia e poi aggiunge l'instradamento. Naturalmente
  se si usa la seconda porta parallela si deve scrivere plip2.

  Si torni al computer con DOS/Windows e si modifichi autoexec.bat.  Si
  devono aggiungere le righe seguenti:


  ______________________________________________________________________
  c:\plip\plip.com 0x60
  c:\tcpip\winsock\winpkt.com 0x60
  ______________________________________________________________________



  Naturalmente si suppone di aver messo plip.com (il packet driver)
  nella directory c:/plip e winpkt.com in c:/tcpip, diversamente bisogna
  specificare i percorsi corretti.

  Ci imposta il programma plip.com sul vettore di pacchetti 0x60 e poi
  carica il programma winpkt.com distribuito con Trumpet Winsock sullo
  stesso vettore.  Se il cavo  in qualcosa di diverso da lpt1 si devono
  dire a plip.com il numero IRQ e l'Indirizzo IO.  Inoltre, winpkt.com
  dev'essere eseguito per rendere disponibile a Windows questo vettore
  di pacchetti.  D'ora in poi si vedr l'effettiva configurazione sotto
  Trumpet Winsock.  Tutto quel che si deve fare  di deselezionare SLIP
  o PPP ed inserire 60 nella casella etichettata Packet vector.  Poi
  specificare l'indirizzo IP che si  scelto, l'indirizzo IP della
  macchina Linux come gateway predefinito e il Name Server che pu
  essere la macchina stessa o l'indirizzo del name server del proprio
  provider se si ha intenzione di connetterla ad Internet (si veda pi
  avanti).  Si chiuda il setup e si riavvii Windows e tutto dovrebbe
  essere a posto!  Si metta winsock nel proprio gruppo Avvio e tutto
  sar impostato automaticamente!

  Se si vuole accedere ad Internet attraverso la macchina Linux dal
  computer Windows, si deve impostare il mascheramento IP.  Per
  informazioni si veda il NET-2 HOWTO.  Questo semplicemente maschera il
  computer Windows con l'indirizzo IP della propria macchina Linux.

  Ho trovato anche un programma che permette di eseguire programmi X-
  Window sotto Windows!  Lo si pu trovare a:

  http://www.tucows.com/

  Lo si installi come spiegato e poi tutto quel che resta da fare  fare
  telnet dal computer Windows e impostare il display sul computer
  Windows (`DISPLAY=dos:0.0` per esempio) e avviare il programma
  desiderato.  Non c' niente di meglio che eseguire xv sotto Windows!
  Spero che tutto ci aiuti.


  9.2.  Una esperienza di connessione PLIP tra DOS e Linux.

  NOTA: Ho ricevuto questo documento da James Vahn
  <jvahn@short.circuit.com>.  L'ho messo qui senza modifiche.  Ci
  significa che per qualsiasi domanda su questa sezione lui  molto pi
  qualificato di me, e quindi vi invito a scrivere a lui piuttosto che a
  me.  La sua esperienza con una connessione PLIP su un computer DOS con
  il solo dischetto e uno Linux  un perfetto esempio di come risolvere
  problemi comuni.

  Ultimo aggiornamento 11 luglio 1996

  La mia macchina DOS con solo dischetto  in rete attraverso il PLIP
  con la seconda porta parallela della macchina Linux.  Alla prima porta
  parallela della macchina Linux  connessa una stampante, entrambe sono
  permanentemente connesse e dalla macchina DOS  possibile fare telnet
  in Linux.  Questi sono i miei appunti su quanto ho fatto per ottenere
  questa configurazione.

  Quando il kernel tenta di rilevare le porte parallele, se le prende
  tutte a meno che non se ne rimuova qualcuna da tale rilevamento.  Se
  non si fa cos il PLIP non potrebbe avere niente.  Un metodo  di
  caricare i driver come moduli quando servono...

  <gniibe@mri.co.jp> scrive:

  Raccomando di usare PLIP/LP come moduli per il kernel, in quanto

    i moduli sono flessibili rispetto alle modifiche nella
     configurazione

    (ri)compilare il kernel non  facile per i nuovi utenti

    la coesistenza di PLIP e LP  possibile solamente con i moduli

  Usando PLIP/LP come moduli per il kernel, si pu specificare in quale
  porta  PLIP e in quale  LP.  Di seguito un esempio:



       # insmod lp.o io=0x378
       # insmod plip.o io=0x278 irq=2




  Si possono pure usare due porte parallele:



       # insmod plip.o io=0x278,0x3bc irq=2,5




  Nell'esempio qui sopra

  plip0  assegnato su 0x278 e il suo irq  il 2, e rispettivamente

  plip1  assegnato su 0x3bc e il suo irq  il 5.



  L'uso dei moduli sembra proprio la strada da seguire.  Il metodo
  seguente mostra come applicare una patch al kernel per permettere la
  coesistenza di sia una stampante che del PLIP su porte differenti,
  senza i moduli.  Se non si ha familiarit con il concetto dei moduli,
  si dovrebbe trovare questo metodo un po' pi veloce.

  Sar necessario modificare due file nell'albero dei sorgenti del
  kernel.  Io sto usando un kernel 1.2.13 e ho scoperto che per
  sistemare il mio sistema sono necessarie alcune modifiche in
  ../linux/drivers/net/Space.c.  Si veda attorno alla riga 205 per le
  definizioni del PLIP per assicurarsi che la propria porta e IRQ
  corrispondano, e si prenda nota di quale driver sar (plip0, plip1,
  plip2).  Nel mio caso la porta 0x278 usa l'IRQ 5 (la scheda ha i
  ponticelli messi in questo modo) ma in Space.c la definisce con l'IRQ
  2.  Ho fatto qui le modifiche piuttosto che aprire il computer e
  spostare i ponticelli.  L'alternativa  di specificare l'IRQ pi tardi
  tramite il comando ifconfig, ma il kernel partir con l'IRQ sbagliato
  per il PLIP e ci potrebbe alla fine risultare noioso.   una modifica
  semplice (un solo carattere).

  Il passo seguente e pi difficile :

  In .../drivers/char/lp.c si trover quello che segue attorno alla riga
  38:










  ______________________________________________________________________
  struct lp_struct lp_table[] = {
      { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
      { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
  /*  { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
   * 0x278 reserved for plip1
   *
   * };
   * #define LP_NO 3
   */
  };
  #define LP_NO 2
  ______________________________________________________________________



  Si notino le modifiche da fare: una porta  commentata, cos ora sono
  definite solo 2 porte.  La porta 0x3BC probabilmente non funzioner
  con il PLIP: in queste porte la linea IRQ  solitamente rotta, come
  nei vecchi adattatori monocromatici (MDA).

  Si  fatto un backup di questi file prima di modificarli, vero?  Ora
  si compili un nuovo kernel con il supporto per stampante, rete, dummy
  e plip.

  Si configuri il sistema.  Questo  il mio file /etc/rc.d/rc.inet1:


  ______________________________________________________________________
  #!/bin/bash
  #
  /sbin/ifconfig lo 127.0.0.1
  /sbin/route add -net 127.0.0.0

  /sbin/ifconfig dummy 200.0.0.1
  /sbin/route add -net 200.0.0.0 netmask 255.255.255.0
  /sbin/ifconfig plip1 arp 200.0.0.1 pointopoint 200.0.0.2 up
  /sbin/route add 200.0.0.2
  /sbin/ifconfig dummy down
  ______________________________________________________________________



  Si noti che arp  usato per la connessione DOS-Linux, ed
  apparentemente non usata nelle connessioni Linux-Linux.

  E in /etc/hosts si pu aggiungere quanto segue, solo per dare un nome
  alle due macchine:


  ______________________________________________________________________
  200.0.0.1       console1
  200.0.0.2       console2
  ______________________________________________________________________



  La macchina DOS  console2.  Si ricordi l'avvertimento di Andrea su
  questi... meglio usare gli schemi di numerazione standard.

  Si riavvii in modo che queste modifiche ed il nuovo kernel abbiano
  effetto.  Durante la sequenza di boot (o eseguendo dmesg), se si sono
  effettuate le modifiche, altrimenti quando si caricano i moduli:



  lp0 at 0x03bc, using polling driver
  lp1 at 0x0378, using polling driver
  [....]
  NET3 PLIP version 2.0 gniibe@mri.co.jp
  plip1: Parallel port at 0x278, using assigned IRQ 5.




  Il comando "route" mostra questo:



       Kernel routing table
       Destination     Gateway         Genmask         Flags MSS    Window Use Iface
       console2        *               255.255.255.255 UH    1436   0      136 plip1
       loopback        *               255.0.0.0       U     1936   0      109 lo




  E "ifconfig plip1" mostra:



       plip1     Link encap:10Mbps Ethernet  HWaddr FC:FC:C8:00:00:01
                 inet addr:200.0.0.1  P-t-P:200.0.0.2  Mask:255.255.255.0
                 UP POINTOPOINT RUNNING  MTU:1500  Metric:1
                 RX packets:132 errors:0 dropped:0 overruns:0
                 TX packets:136 errors:0 dropped:0 overruns:0
                 Interrupt:5 Base address:0x278




  Si veda in /etc/inetd.conf se il telnet  abilitato.   bene leggere
  la pagina man di tcpd e l'uso di /etc/hosts.allow (ALL: LOCAL) e
  /etc/hosts.deny (ALL: ALL).  Si dovrebbe essere in grado di fare
  "telnet localhost".

  La parte su Linux  fatta, ora viene quella DOS.  Ancora, non ci si
  fidi della porta 0x3BC se ne risulta una presente.

  Io uso il telnet della NCSA e il driver PLIP della Crynwr reperibili
  su questi siti:

  ftp://ftp.ncsa.uiuc.edu/Telnet/DOS/ncsa/tel2308b.zip

  ftp://ftp.crynwr.com/drivers/plip.zip

  Ci si assicuri di usare la versione 2.3.08 del telnet della NCSA e la
  versione 11.1 del driver PLIP della Crynwr.  Invito a trovare e
  leggere il file SUPPORT.DOC della Crynwr.

  Il file CONFIG.TEL.   La maggior parte di questo file sono cose
  predefinite e per risparmiare un po' di spazio ho provato a riportare
  qua solo le informazioni che servono (almeno spero).  La seconda porta
  su questa macchina  impostata come 0x278 sull'IRQ 5.








  ______________________________________________________________________
  myip=200.0.0.2
  netmask=255.255.255.0       # maschera della sottorete
  hardware=packet             # scheda di rete (packet driver interface)
  interrupt=5                 # IRQ sul quale  impostata la scheda
  ioaddr=60                   # vettore di interrupt software che usa il driver
  #
  #[...un sacco di cose non modificate...]
  #
  # e alla fine del file, si metta questa riga:
  name=console1 ; hostip=200.0.0.1 ; nameserver=1 ; gateway=1
  ______________________________________________________________________



  (console1  il nome della macchina Linux, si pu usare quello che si
  vuole)

  Ho fatto un cavo null da 12 piedi tra le due macchine, e (dopo aver
  scoperto subito che era mal connesso) non ci sono stati problemi.
  Dovrebbe funzionare anche un cavo null per stampante a 11 linee.  Il
  file sorgente plip.c mostra la connessione. Sebbene il mio cavo abbia
  la connessione 17-17, non penso sia usato per qualcos'altro e non era
  presente fra i cavi gi pronti.


  ______________________________________________________________________
  @echo off
  plip.com 0x60 5 0x278
  telbin -s console1
  ______________________________________________________________________



  Questo dovrebbe connettere alla macchina Linux su /dev/ttyp.  Il
  telnet della NCSA fornisce 8 schermi virtuali e funziona anche da
  server ftp.  L'interfaccia PLIP fornisce un discreto throughput, ed io
  ho raggiunto i 6.5K/s con le mie antichit.  Questo fa sperare che voi
  possiate fare meglio.  :-)


  10.  PLIP tra Linux e Windows 95.

  Questa sezione  vuota.  Non uso Windows 95 per niente di serio a
  parte i giochi, e quindi non ho provato e non mi interessa una
  connessione PLIP con Linux.  Le domande su questa connessione hanno
  vinto la gara sulla domanda posta pi spesso, e cos do qui
  (finalmente) la risposta definitiva.

  No, finora nessuno mi ha segnalato una connessione PLIP funzionante
  tra Linux e Windows 95.  Se qualcuno ha successo nell'instaurare
  questa connessione, me lo faccia sapere immediatamente: migliaia di
  utilizzatori del PLIP aspettano questa notizia!


  11.  Domande? Commenti? Inviatemeli.

  Per qualsiasi domanda e commento mi si pu contattare via e-mail
  all'indirizzo controzz@cli.di.unipi.it.

  Qualsiasi responso  benvenuto, qualsiasi segnalazione di errori 
  preziosa.  La release successiva avr una sezione di FAQ ancora pi
  grande se mi inviate domande e, naturalmente, anche le risposte se le
  trovate da soli.


  Vi invito a non porre domande gi presenti nella FAQ.

  Se mi si deve chiedere aiuto, ci si assicuri di farmi sapere tutte le
  informazioni che mi servono, tra cui, almeno, la versione del kernel,
  i comandi usati, i messaggi d'errore, il cavo che si usa e qualsiasi
  altro messaggio di sistema relativo al PLIP.

  Si ricordi di non inviarmi domande sul PLIP con DOS/Windows
  3.1/Windows 95, non posso aiutare.  Queste domande dovrebbero essere
  spedite a James Vahn jvahn@short.circuit.com, che mi ha spedito
  l'addendum sul DOS.  Ancora:  inutile chiedere a lui o a me a
  riguardo del PLIP con Windows 95.


  12.  Dove trovare le nuove versioni si questo mini HOWTO.

  Questo mini HOWTO  mantenuto dai coordinatori degli HOWTO ed 
  postato mensilmente su comp.os.linux.answers e pu essere trovato
  nella directory HOWTO a sunsite e nei suoi mirror.

  Un altro modo per trovarlo (e per contattarmi)  attraverso la mia
  Home Page,

  http://www.cli.di.unipi.it/~controzz/intro.html (in italiano)

  http://www.cli.di.unipi.it/~controzz/intro_e.html (in inglese).


  13.  Crediti.

  Molti ringraziamenti a:

    Rick Lim <ricklim@freenet.vancouver.bc.ca> per le patch per far
     convivere PLIP e LP.

    Takeshi Okazaki <GBA03552@niftyserve.or.jp> per le patch per usare
     PLIP e LP su due distinte porte parallele.

    Jim Van Zandt <jrv@vanzandt.mv.com> per alcuni avvisi sul
     "tutorial" di questo HOWTO.

    Fernando Molina <fmolina@nexo.es> per gli utili commenti su IRQ e
     Indirizzi IO.

    James Vahn <jvahn@short.circuit.com> per l'utile addendum al
     capitolo sull'uso del PLIP tra DOS e Linux.

    A tutti gli utenti che hanno postato articoli relativi al PLIP nei
     newsgroup di Linux e/o spediti a me.  L'elenco di quanti mi hanno
     aiutato con informazioni e commenti potrebbe essere lunga quanto il
     mini HOWTO stesso: grazie a tutti!


  14.  Messaggio di Copyright (in inglese).

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Greg Hankins, the Linux HOWTO
  coordinator, at linux-howto@sunsite.unc.edu via email.
























































  PPP-over-minicom mini-HOWTO
  Winfried Trmper (winni@xpilot.org)
  v0.2 01 Maggio 1998

  Desiderate controllare il PPP utilizzando una utility controllata da
  un men? Un database facile ma potente con i numeri di telefono del
  vostro ISP? Volete vedere cosa succede quando vi loggate? Allora
  questo mini-HOWTO  per voi!

  1.  Introduzione

  PPP  diventato il protocollo standard per collegarsi ad internet
  tramite connessione dialup. Il demone associato "pppd" comprende una
  utility molto primitiva per il collegamento, che gestisce bene
  solamente configurazioni molto semplici.

  Questo mini-HOWTO descrive una soluzione alternativa basata su
  "minicom".


  1.1.  Il programma terminale "minicom"

  "minicom"  un programma molto complicato per collegarsi ad altri
  computer (ISP o BBS). Ha un men colorato, un database delle
  connessioni dialup e un potente linguaggio di scripting. Cos viene
  idealmente adattato per l'uso in congiunzione con "pppd".


  1.2.  Commenti e critiche

  Sono solamente interessato a commenti e critiche che possano
  migliorare questo mini-HOWTO. Non risponder a domande generali su
  Linux, PPP, SLIP o networking.


  1.3.  Bug conosciuti

  Al tempo della scrittura, sembrava che ci fossero alcuni bug in
  "minicom", "runscript" e il metodo descritto sotto:

    "runscript" non aspetta che i programmi esterni finiscano


       print "blah"
       ! sleep 10
       print "blup"




  Questo script esce immediatamente (ma non quando lo si analizza
  tramite strace...)

    "pppd" si impossessa del dispositivo seriale negandolo a minicom
     (quando non alimentato da stdin)
     Sembra che Miquel van Smoorenburg (l'autore di minicom) sia troppo
     occupato per mettersi a lavorare sul problema di cui sopra. Indi
     per cui volontari sono benvenuti.


  2.  Effettuare una chiamata con minicom

  Molte guide su PPP raccomandano di lasciare minicom dopo che  stato
  usato per collegarsi. Ma non c' in realt alcuna ragione per lasciare
  questo confortevole programma...

  2.1.  Configurare minicom

  Eseguite "minicom -s" e scegliete dal men la voce "Serial port
  setup". La prima voce dovrebbe essere "Serial Device".  Questa 
  l'opzione pi importante: il dispositivo seriale a cui  collegato il
  vostro modem.  (Qualche volontario per fare in modo che minicom
  gestisca pi dispositivi seriali alla volta?)

  Per avere il nome del file del dispositivo, al quale  collegato il
  vostro modem, digitate i seguenti commandi:



       for i in 0 1 2 3
       do
         if (chat -v -t 5 "" ATZ "" \\d "" ATZ OK "" > /dev/ttyS$i < /dev/ttyS$i)
         then
            echo "Modem in /dev/ttyS$i (= COM$[$i+1] sotto DOS)"
         else
            echo "Nessun Modem trovato in ttyS$i."
         fi
       done




  Il codice sopra assicura che il modem sia configurato correttamente.
  Alcune persone hanno problemi con i modem plug-and-play, il che
  dimostra che "plug-and-play"  pi che una "lite" di mercato.

  Adesso provate a comporre un numero col comando "atdt5" (dt sta per
  "componi usando il metodo a toni"). Se non sentite un dialtone,
  controllate i cablaggi. Il vostro modem protester con il messaggio
  "no dialtone" e annuller il comando. Se il vostro sistema telefonico
  non ha un dialtone, potete voler dirlo al vostro modem con "x3",
  perci il comando da provare  "atx3dt5".

  Se ottenete il dialtone, ma la composizione non ha effetto, allora
  potete riprovare con il metodo "pulse dialing" (usate "dp" invece del
  "dt" di prima). In ogni caso, premete la barra spazio per interrompere
  l'ultimo comando.

  Prendete nota del comando che ha successo. Infine andate su "Modem and
  dialing parameter setup" in minicom e modificate "Dialing prefix" per
  adattarvi ai vostri bisogni. Potete inserire "l0m0" direttamente dopo
  AT per spegnere lo speaker prima di prendere la linea telefonica.


  2.2.  Far partire PPP manualmente

  Pu darsi che abbiate gi provato a comporre il numero telefonico del
  vostro ISP invece di "5". Avete visto caratteri divertenti sullo
  schermo dopo il login (altrimenti, digitate "ppp")?  Risultano dal
  "pppd" (o equivalente) fatto partire all'altra parte della linea. Se 
  cos, potete provare a far partire il pppd daemon sul vostro sistema e
  poi valutare i file di log.

  Per far partire "pppd" dentro minicom, potete definire un nuovo metodo
  di upload (capite da soli come) o ridefinire l'opzione "kermit
  program" dal men di configurazione "Filename and paths":






  A - Download directory :
  B -   Upload directory :
  C -   Script directory :
  D -     Script program : /usr/bin/runscript
  E -     Kermit program : /usr/sbin/pppd file /etc/ppp/mini_options




  Adesso se vedete quei caratteri divertenti la prossima volta che vi
  collegate al vostro ISP potete premere <Alt-K> per far partire "pppd".

  Il resto di questo mini-HOWTO si occupa di automatizzare il processo
  di login e di partenza di "pppd".


  2.3.  Valutare i file di log

  Sebbene io non voglia spiegare come PPP deve essere configurato, do un
  breve consiglio su come leggere il file di log. Per estrarre le
  informazioni essenziali dal file di log "/var/log/debug" (o
  l'altervativo "/var/log/daemon.log") eseguite i comandi


       tail -n 40  /var/log/debug |\
               grep -E " pppd\[[0-9]*\]:" |\
               sed -e "s/^.*pppd\[/[/"




  Dovreste vedere messaggi del tipo



       sent [LCP ConfReq id=0x1 <mru 296>]
       rcvd [LCP ConfRej id=0x1 <mru 296>]




  che indicano che abbiamo spedito una config-request per configurare la
  "maximum receive unit" a 296. L'altro lato rifiuta questa opzione
  ("configuration rejected"). In questo caso ho solamente rimosso
  l'opzione "mru" da "/etc/ppp/options" (vedete sotto).


  2.4.  Configurare un numero telefonico

  Se ci che abbiamo visto sopra ha avuto successo, potete voler
  immagazzinare un numero telefonico nel database di minicom. Premete
  <Alt-D> per vedere il men di composizione e usate i tasti cursore per
  selezionare "Edit":













  A -  Name                : Xeno
  B -  Number              : 022039697303
  C -  Dial string #       : 1
  D -  Local echo          : No
  E -  Script              : /etc/ppp/login.script
  F -  Username            : ppp-382
  G -  Password            : top-secret
  H -  Terminal Emulation  : VT102
  I -  Backspace key sends : Delete
  J -  Linewrap            : Off
  K -  Line Settings       : Curr 8N1




  Questa  una entry di esempio per collegarmi a uno dei miei ISP. Lo
  script "/etc/ppp/login.script" viene mostrato sotto. Due variabili
  speciali sono passate a questo script: $(LOGIN) e $(PASS) che sono
  impostate ai valori scelti per username (F) e password (G). Questa
  caratteristica rende minicom piuttosto flessibile perch avete bisogno
  di un solo script per automatizzare il vostro login a molti ISP.


  2.5.  Uno script di login

  "minicom" fa partire lo script di login dopo che riceve la stringa
  "CONNECT". Ad essere precisi, "minicom" non esegue lo script da solo
  ma chiama l'utility "runscript" come sottoprocesso.

  Sotto c' un esempio,  quello che uso per i miei ISP.




































  # v1.0, 20.08.96 Winfried Trmper <winni@xpilot.org>
  print ""
  print "Automatic login via /etc/ppp/login.script"

  ## uncomment if you need to press enter to get the prompt
  #send ""

  expect {
  "ogin:"
  "ogin>"
  "sername:"
  "sername>"
  "NO CARRIER" exit 1
  }
  send "$(LOGIN)"
  expect {
          "assword:"
          "assword>"
          timeout 20
  }
  send "$(PASS)"
  expect {
          "port"  send "ppp"
          "Start your PPP now"
          "}!}!}"
          timeout 10
  }
  print ""
  print "Now switching into ppp-mode ..."
  print ""

  ! /usr/sbin/pppd  file /etc/ppp/mini_options

  print ""
  print "the command   killall -TERM pppd   terminates pppd"




  La capacit di "runscript" di chiamare programmi esterni  usata per
  far partire "pppd". Copiate il vostro file di opzioni per ppp in
  "/etc/ppp/options.ttyS1" (dove dovete sostituire "ttyS1" col
  dispositivo a cui il vostro modem  connesso) e cancellate tutte le
  linee da /etc/ppp/options che sono specifiche per il vostro modem
  (come "connect", "crtscts" o "modem"). Mettete le opzioni che
  dovrebbero essere specifiche alla connessione ppp con minicom in
  "/etc/ppp/mini_options". Una di queste opzioni dovrebbe essere


       disconnect "chat '' '\d\d+++\d\dATH\r\c'"




  Questo  un must perch "pppd"  alimentato dallo standard input e non
  pu scollegare il modem con "crtscts". Ecco il mio
  /etc/ppp/mini_options:









  debug
  -detach
  defaultroute
  netmask 255.255.255.0
  mru 1500
  mtu 1500
  asyncmap 00000000
  disconnect "chat '' '\d\d+++\d\dATH\r\c'"





  2.6.  Connessione automatizzata alla partenza di minicom

  Usate l'opzione "-d" per comporre un certo numero telefonico all'avvio
  di minicom. Potete anche provare



       open -sl -- minicom -d 1




  Per mettere minicom su un'altra console (consultate il Consoles-Many
  mini-HOWTO per i dettagli).


  2.7.  Estensioni future

  Poich "pppd"  un demone non  stato designato per interagire con
  l'utente o essere osservato. In questo modo  ok. Dopo tutto, stiamo
  usando un sistema operativo unix-like...

  La soluzione canonica  un backend. C' qualche volontario per
  lavorare a questo per minicom? Delle estensioni carine potrebbero
  essere:


    generazione automatica della script di login guardando l'utente che
     si collega manualmente

    valutazione automatica del file di log con la correzione delle
     opzioni

    estrazione di messaggio come mostrato in 2.3.

  Fine del PPP-over-minicom mini-HOWTO

  Traduzione italiana a cura di Nicola Girardi (girardi@keycomm.it)















  Linux Partition HOWTO
  Kristan Koehntopp, kris@koehntopp.de
  v2.4, 3 November 1997

  Questo Mini-HOWTO spiega come pianificare e disporre lo spazio disco
  per il vostro sistema Linux. Parla di hardware, partizioni, dimensione
  dello spazio di swap e considerazioni di posizionamento, file system,
  tipi di file system e argomenti collegati. L'intenzione  quella di
  dare un po' di conoscenza generale, non delle procedure.  Traduzione
  di Andrea Manzini <linux@netbusiness.it>

  1.  Introduzione

  1.1.  Di che cosa si tratta?


  Questo  un testo Linux Mini-HOWTO. Un Mini-HOWTO  un piccolo testo
  che spiega qualcosa collegato all'installazione di Linux e alla sua
  manutenzione in forma esplicativa.  mini, perch o il testo o
  l'argomento che discute sono troppo brevi per un vero HOWTO o
  addirittura un libro. Un HOWTO non  una guida di riferimento: per
  questo esistono le pagine man.

  1.2.  Che cosa contiene? Altri documenti HOWTO collegati

  Questo particolare Mini-HOWTO spiega come pianificare e suddividere lo
  spazio disco per il vostro sistema Linux. Parla di hardware,
  partizioni, dimensione dello spazio di swap e considerazioni di
  posizionamento, file system, tipi di file system e argomenti
  collegati. L'intenzione  quella di dare un po' di conoscenza
  generale, cos in questo testo parleremo soprattutto di principi e non
  di strumenti.

  In teoria, questo documento dovrebbe essere letto prima
  dell'installazione, ma questo risulta difficile per molte persone; i
  principianti hanno ben altri problemi che non l'ottimizzazione del
  disco. Cos voi siete probabilmente tra quelli che hanno appena finito
  una installazione Linux e adesso starete pensando a come ottimizzare
  questa installazione o come evitare certe sviste nella prossima. Bene,
  preparatevi a cancellare e a rifare la vostra installazione quando
  avrete finito di leggere questo testo. :-)

  Questo Mini-HOWTO si limita alla pianificazione e alla disposizione
  dello spazio su disco nella maggior parte dei casi. Non discute
  dell'uso di fdisk, LILO, mke2fs o programmi di backup. Ci sono altri
  HOWTO che trattano questi problemi. Fate riferimento all'indice degli
  HOWTO per informazioni sugli HOWTO disponibili. Nell'indice ci sono
  anche le informazioni su come e dove procurarsi i documenti HOWTO.

  Per imparare a stimare le diverse dimensioni e velocit richieste
  dalle differenti parti del file system, vedere il mini-HOWTO ``Linux
  Multiple Disks Layout'', di Gjoen Stein <gjoen@nyx.net>.

  Per istruzioni e considerazioni su dischi con pi di 1024 cilindri,
  vedere il mini-HOWTO ``Linux Large Disk'', di Andries Brouwer
  <aeb@cwi.nl>.

  Per istruzioni sulla limitazione dell'uso di spazio su disco per
  utente (quotas), vedere il mini-HOWTO ``Linux Quota'', di Albert M.C.
  Tam <bertie@scn.org>

  Al momento, non ci sono documenti generici sul backup, ma ci sono vari
  documenti con riferimenti a soluzioni specifiche di backup. Vedere il
  mini-HOWTO ``Linux ADSM Backup'', di Thomas Koenig
  <Thomas.Koenig@ciw.uni-karlsruhe.de> per istruzioni su come integrare
  Linux in un ambiente di backup IBM ADSM.  Vedere il mini-HOWTO ``Linux
  Backup with MSDOS'', di Christopher Neufeld
  <neufeld@physics.utoronto.ca> per informazioni circa il backup di
  dischi Linux via MS-DOS.

  Per istruzioni sulla scrittura e l'invio di un documento HOWTO, vedere
  l'indice ``The Linux HOWTO Index'', di Tim Bynum <linux-
  howto@sunsite.unc.edu>.

  Anche scorrere nella directory /usr/src/linux/Documentation pu essere
  veramente istruttivo. Leggete i file ide.txt e scsi.txt per una
  informazione generale sulle caratteristiche dei driver e date
  un'occhiata alla sottodirectory filesystems/.


  2.  Che cos' una partizione?

  Poco dopo che dischi fissi furono inventati, la gente volle installare
  pi di un sistema operativo, anche se disponevano di un solo disco.
  Nacque cos la necessit di un meccanismo che dividesse un singolo
  disco fisico in tante unit logiche. Quindi ecco cos' una partizione:
  un insieme di blocchi contigui sul vostro hard disk che viene trattato
  dal sistema operativo come se fosse un disco completamente autonomo e
  separato.

   abbastanza evidente che le partizioni non devono sovrapporsi: un
  sistema operativo non sarebbe felice se un altro sistema operativo
  installato sulla stessa macchina gli sovrascrivesse informazioni
  importanti a causa della sovrapposizione delle due partizioni. Non ci
  dovrebbe neanche essere dello spazio vuoto tra una partizione e
  un'altra, in quanto anche se non comporterebbe alcun danno,
  significherebbe sprecare prezioso spazio su disco lasciandolo
  inutilizzato.

  Un disco non ha bisogno di essere completamente partizionato. Potete
  decidere di lasciare un po' di spazio alla fine senza assegnarlo ad
  alcun sistema operativo e, successivamente, quando sar chiaro quale
  userete per la maggior parte del tempo, potrete partizionare questo
  spazio vuoto rimanente e metterci sopra un file system.

  Le partizioni non possono essere spostate n ridimensionate senza
  distruggere il file system che contengono. Il ripartizionamento quindi
  comporta il backup e il ripristino di tutti i file system coinvolti
  nel ripartizionamento. In effetti,  molto facile fare dei pasticci
  durante il ripartizionamento, cos dovreste in ogni caso fare una
  copia di backup di tutto prima ancora di usare cose come fdisk.

  Beh, veramente alcuni tipi di partizione che contengono alcuni tipi di
  file system possono essere divisi in due senza alcuna perdita di dati
  (se siete fortunati). Per esempio, esiste un programma chiamato
  ``fips'' per dividere le partizioni MS-DOS in due per far spazio a una
  partizione Linux senza dover reinstallare MS-DOS. In ogni caso, non
  andreste a maneggiare queste cose senza aver prima fatto un accurato e
  completo backup, vero?


  2.1.  I backup sono importanti

  I nastri sono molto utili per fare i backup. Sono veloci, affidabili e
  facili da usare, quindi potrete effettuare il backup spesso,
  preferibilmente in modo automatico e senza disagi.

  Parlando di cassette: quello di cui sto parlando sono i veri nastri,
  non quelle porcherie pilotate dal controller dei dischetti. Tenete in
  considerazione SCSI: Linux lo supporta in modo nativo. Non occorre
  caricare driver ASPI, non sprecate preziosa HMA e una volta che
  l'adattatore SCSI  installato, potete attaccarci anche dischi,
  nastri, scanner e CD-ROM. Niente pi indirizzi I/O, acrobazie con IRQ
  n master/slave e livelli PIO da abbinare.

  In aggiunta: un buon adattatore SCSI fornisce alte prestazioni di I/O
  senza occupare troppo la CPU. Anche durante una pesante attivit di
  disco, avrete tempi di risposta molto buoni. Se intendete usare un
  sistema Linux come un server USENET o se volete entrare nel mercato
  degli ISP, non pensate nemmeno di impostare un sistema senza SCSI.




  2.2.  Numeri e nomi di device


  Il numero di partizioni di un sistema basato su Intel  stato limitato
  fin dall'inizio: la tabella delle partizioni era installata come parte
  del settore di boot e aveva spazio solo per 4 partizioni. Queste
  partizioni adesso sono chiamate partizioni primarie. Quando divenne
  chiaro che la gente voleva pi partizioni nei loro sistemi, sono state
  inventate le partizioni logiche. Il loro numero non  limitato: ogni
  partizione logica contiene un puntatore alla prossima, cos da avere
  una catena potenzialmente illimitata di partizioni.

  Per ragioni di compatibilit, lo spazio occupato da tutte le
  partizioni logiche deve essere tenuto in conto. Se state usando
  partizioni logiche, una partizione primaria viene marcata come
  ``partizione estesa'' e il suo blocco di inizio e di fine segnano
  l'area occupata dalle partizioni logiche in essa contenute. Questo
  implica che lo spazio assegnato a tutte le partizioni logiche deve
  essere contiguo. Ci pu essere solo una partizione estesa per disco:
  nessun programma fdisk pu creare pi di una partizione estesa.

  Linux non pu gestire pi di un limitato numero di partizioni per
  disco.  Cos in Linux potrete avere 4 partizioni primarie (3 delle
  quali usabili, se state usando partizioni logiche) e al massimo 15
  partizioni totali su un disco SCSI (63 in tutto su un disco IDE)

  In Linux, le partizioni sono rappresentate come file di device. Un
  file di device  un file con tipo c (che sta per ``carattere'', cio
  device che non usano un buffer di cache) oppure b (ossia device a
  ``blocchi'', che passano dal buffer di cache). In Linux, tutti i
  dischi sono rappresentati solo come device a blocchi. A differenza di
  altri unix, Linux non offre ``pure'' versioni a caratteri dei dischi e
  delle loro partizioni.

  La sola cosa importante con un file di device sono il suo numero
  primario e secondario, visualizzato invece delle dimensioni del file:



       ______________________________________________________________________
       $ ls -l /dev/hda
       brw-rw----   1 root     disk       3,   0 Jul 18  1994 /dev/hda
                                          ^    ^
                                          |    numero secondario di device
                                          numero primario di device
       ______________________________________________________________________




  Quando un file di device viene aperto, il numero primario indica quale
  driver viene usato per effettuare l'operazione di input/output. Alla
  chiamata viene passato il numero secondario come parametro e spetta al
  driver l'interpretazione del numero secondario. Di solito la
  documentazione del driver riporta come viene usato il numero
  secondario. Per i dischi IDE, questa documentazione  in
  /usr/src/linux/Documentation/ide.txt. Per i dischi SCSI, ci si
  aspetterebbe questa documentazione in
  /usr/src/linux/Documentation/scsi.txt, ma non c'. Per accertarsene,
  occorrerebbe leggere il sorgente del driver,
  (/usr/src/linux/driver/scsi/sd.c:184-196). Fortunatamente, c' la
  lista dei numeri e dei nomi di device curata da Peter Anvin in
  /usr/src/linux/Documentation/devices.txt; vedere le voci per i device
  a blocchi, primario 3, 22, 33, 34 per i dischi IDE e primario 8 per
  gli SCSI. Il numero primario e secondario sono un byte ognuno ed  per
  questo che il numero di partizioni per disco  limitato.

  Per convenzione, i file di device hanno determinati nomi e molti
  programmi di sistema riconoscono questi nomi essendo stati compilati
  nel loro codice.  Si aspettano che i vostri dischi IDE si chiamino
  /dev/hd* e i dischi SCSI /dev/sd*. I dischi sono numerati come a, b, c
  e cos via, quindi /dev/hda  il primo disco IDE e /dev/sda il primo
  disco SCSI. Entrambi rappresentano interi dischi, iniziando dal primo
  blocco. Scrivere su questi device con il programma sbagliato
  distrugger il master boot loader e la tabella delle partizioni dei
  dischi, rendendo cos tutti i dati inutilizzabili o facendo s che il
  sistema non possa pi eseguire il boot. Siate sicuri di quello che
  fate e, ripeto, copiate su backup prima di farlo.

  Le partizioni primarie su un disco sono numerate 1, 2, 3 e 4. Cos
  /dev/hda1  la prima partizione primaria del primo disco IDE eccetera.
  Le partizioni logiche hanno numeri che vanno da 5 in su, cos
  /dev/sdb5  la prima partizione logica del secondo disco SCSI.

  Ogni voce nella tabella delle partizioni  contrassegnata da un blocco
  di inizio, uno di fine, e un tipo. Il tipo  un codice numerico (a un
  byte) che indica l'appartenenza di quella partizione a un determinato
  sistema operativo. Per la gioia dei consulenti informatici i codici
  dei tipi di partizione non sono del tutto univoci, cio esiste la
  probabilit che due sistemi operativi usino lo stesso codice.

  Linux riserva per le sue partizioni di swap il codice 0x82, e lo 0x83
  per il filesystem ``nativo'' (che  ext2 per quasi tutti). L'oramai
  sorpassato e una volta famoso Linux/Minix filesystem usava il codice
  0x81. OS/2 segna le sue partizioni con il tipo 0x07, lo stesso del
  NTFS di Windows NT. MS-DOS usa diversi codici per i vari tipi di
  filesytem FAT: 0x01, 0x04 e 0x06. DR-DOS usava il codice 0x81 per
  indicare partizioni FAT protette, creando una ambiguit con
  Linux/Minix, ma ormai n Linux/Minix, n DR-DOS vengono largamente
  usati. Per finire, le partizioni estese che fungono da contenitori per
  le partizioni logiche hanno codice 0x05.

  Le partizioni vengono create e cancellate con il programma fdisk.
  Ogni sistema operativo che si rispetti viene fornito con una versione
  di fdisk e per tradizione si chiama proprio fdisk (oppure FDISK.EXE)
  in quasi tutti i sistemi operativi. Qualcuno di questi fdisk, come ad
  esempio quello del DOS, mostra qualche limitazione quando ha a che
  fare con partizioni di altri sistemi operativi. Queste limitazioni
  includono l'impossibilit di gestire altri tipi di codice,
  l'impossibilit di trattare numeri cilindro superiori a 1024, e
  l'impossibilit di creare o gestire partizioni che non terminano
  esattamente su un cilindro. Per esempio, fdisk di MS-DOS non pu
  cancellare le partizioni NTFS, quello di OS/2  conosciuto per
  ``correggere'' senza preavviso le partizioni create con fdisk di Linux
  che non terminano esattamente sul cilindro e entrambi, sia quello DOS
  sia quello OS/2, hanno problemi con i dischi che risultano avere pi
  di 1024 cilindri (vedere il Mini-HOWTO ``Large disk'' per i dettagli)



  3.  Di quali partizioni ho bisogno?

  3.1.  Di quante partizioni ho bisogno?


  Bene, allora quali partizioni vi servono? Tanto per cominciare alcuni
  sistemi operativi non riescono a fare il boot dalle partizioni
  logiche, per motivi che esulano dalla comprensione di un sano di
  mente. Cos probabilmente vorrete riservare le partizioni primarie
  come partizioni di boot per MS-DOS, OS/2 e Linux o cos'altro state
  usando. Ricordate anche che una partizione estesa non  altro che una
  partizione primaria, che funziona da contenitore per il resto del
  disco suddiviso in partizioni logiche.

  L'avvio (boot) di un sistema operativo  una operazione che si svolge
  in modalit reale, coinvolgendo cos il BIOS e la limitazione dei 1024
  cilindri. Probabilmente quindi piazzerete tutte le vostre partizioni
  bootabili nei primi 1024 cilindri del disco, giusto per evitare
  problemi.  Ripeto, leggete il Mini-HOWTO ``Large disk'' per i dettagli
  salienti.

  Per installare Linux, avrete bisogno di almeno una partizione. Se il
  kernel viene caricato da questa partizione (per esempio da LILO), essa
  deve essere leggibile dal BIOS. Se state usando altri sistemi per
  caricare il kernel (da un disco di boot o da MS-DOS con il programma
  LOADLIN.EXE) allora la partizione pu essere ovunque. In ogni caso
  questa partizione avr il tipo 0x83 ``Linux nativa''.

  Il vostro sistema avr bisogno di spazio di swap. A meno che vogliate
  paginare su file, avrete bisogno di una partizione di swap dedicata.
  Dal momento che solo il kernel di Linux accede a questa partizione, e
  il kernel non ha limitazioni legate al BIOS, la partizione di swap pu
  essere posizionata ovunque. Io consiglio di usare una partizione
  logica (/dev/?d?5 e superiori). Le partizioni dedicate allo swap hanno
  codice tipo 0x82 ``Linux Swap''.

  Questi sono i requisiti minimi. Pu essere utile creare altre
  partizioni per Linux. Continuate a leggere.


  3.2.  Quanto deve essere grande lo spazio di swap?

  Se avete deciso di usare una partizione di swap dedicata, il che 
  generalmente una Buona Idea [tm], seguite queste indicazioni per
  stimare la sua dimensione:


    In Linux la RAM e lo spazio di swap si sommano (questo anche in
     tutti gli altri Unix). Per esempio, se avete 8 MB di RAM e 12 MB di
     swap, in totale avete 20 MB di memoria virtuale.

    Quando dimensionate lo spazio di swap, tenete conto che dovreste
     avere almeno 16 MB di memoria virtuale totale. Cos con 4 MB di RAM
     considerate un minimo di 12 MB di swap, per 8 MB almeno altri 8 di
     swap.

    In Linux, una partizione di swap non pu essere pi grande di 128
     MB.  Cio, in effetti la partizione pu anche essere pi grande, ma
     lo spazio in pi non viene utilizzato. Se volete pi di 128 MB di
     swap, dovete creare pi di una partizione di swap.

    Quando dimensionate lo spazio di swap, ricordate che troppo swap
     pu essere del tutto inutile.

     Ogni processo ha uno ``spazio di lavoro''.  una serie di pagine in
     memoria a cui il processore acceder nell'immediato futuro. Linux
     tenta di anticipare questi accessi in memoria (assumendo che le
     pagine usate pi di recente saranno usate ancora prossimamente) e
     cerca di tenere queste pagine in RAM se possibile. Se il programma
     ha una buona ``localit'', questa assunzione risulter vera e
     l'algoritmo di predizione far il suo lavoro.

     Mantenere uno spazio di lavoro in memoria  possibile solo se c'
     abbastanza memoria. Se avete troppi processi attivi, il kernel 
     obbligato a spostare su disco alcune pagine che verranno ricaricate
     dopo poco tempo (forzando lo swap di alcune pagine di altri
     processi). Di solito questo comporta un pesante incremento
     nell'attivit di paginazione e una sostanziale perdita di
     prestazioni. Una macchina in questo stato va in ``trashing'',
     oppure si dice che si ``siede'', o ``swappa'' (per i lettori di
     lingua tedesca, ``dreschen'', ``schlagen'', ``haemmern'' e non
     ``muellen'').

     Su una macchina ``seduta'' i processi girano sostanzialmente da
     disco e non in RAM. Le prestazioni si abbasseranno nella misura
     approssimativa del rapporto che c' tra il tempo di accesso alla
     memoria e il tempo di accesso del disco.

     Una vecchia regola di massima ai tempi del PDP e del Vax era che la
     grandezza dello spazio di lavoro di un programma  circa il 25%
     della sua dimensione. Pertanto probabilmente  inutile avere uno
     spazio di swap superiore al triplo della RAM.

     Tenete a mente che questa  solo una regola di massima.  facile
     incontrare casi dove i programmi hanno bisogno di uno spazio di
     lavoro estremamente ampio o molto piccolo. Per esempio, un
     programma di simulazione che accede a un grosso numero di dati in
     maniera pseudocasuale, ha pochissima localit nel suo spazio di
     dati, pertanto lo spazio di lavoro sar molto ampio.

     D'altra parte, un xv con tanti JPEG aperti contemporaneamente,
     tutti iconizzati tranne uno, avrebbe un segmento dati molto grande.
     Ma le trasformazioni vengono eseguite su una singola immagine,
     infatti la maggior parte della memoria occupata da xv non viene mai
     toccata. Lo stesso per un editor con tante finestre aperte, ma solo
     una di loro viene modificata alla volta. Questi programmi hanno, se
     sono progettati correttamente, una localit molto alta e la maggior
     parte del loro spazio di lavoro pu essere paginata su disco senza
     un grosso impatto sulle prestazioni.

     Si potrebbe sospettare che quel 25%, derivato dall'era dei
     programmi a linea di comando non sia pi valido per i programmi GUI
     moderni che agiscono su documenti multipli, ma non conosco nessun
     documento pi recente che tenti di verificare questo indice.

  Cos per una configurazione con 16 MB di RAM, non serve swap per una
  configurazione minima e pi di 48 MB di swap sono probabilmente
  inutili. La quantit esatta dipende dalle applicazioni che fate girare
  sulla macchina (cosa vi aspettavate?).


  3.3.  Dove dovrei mettere lo spazio di swap?



    La meccanica  lenta, l'elettronica veloce.

     I dischi fissi moderni hanno molte testine. Il passaggio tra
     testine della stessa traccia  rapido, poich  elettronico.
     Passare da traccia a traccia  lento, perch significa far muovere
     fisicamente qualcosa.

     Cos se avete un disco con tante testine e uno con meno e per
     entrambi gli altri parametri sono identici, il disco con pi
     testine sar pi veloce.

     Separare lo swap in due e metterlo su entrambi i dischi sarebbe
     ancora meglio, penso.

    I vecchi dischi hanno lo stesso numero di settori su tutte le
     tracce. Con questi dischi sarebbe meglio mettere lo swap nel mezzo
     del disco, ottimizzando il caso che la testina si muova da una
     traccia casuale verso l'area di swap.

    I dischi pi recenti usano lo ZBR (zone bit recording). Hanno pi
     settori sulle tracce esterne. Con un numero costante di giri al
     minuto, questo comporta migliori prestazioni sulle tracce esterne
     che su quelle interne.  Meglio mettere lo swap sulle tracce pi
     veloci.

    Naturalmente la testina non si muove in maniera casuale. Se avete
     lo spazio di swap nel mezzo di un disco tra una partizione ``home''
     molto occupata e una partizione di archivio usata molto poco, sar
     meglio avere lo swap nel mezzo della partizione home per accorciare
     i movimenti della testina. Sarebbe ancora meglio spostare lo swap
     su un altro disco altrimenti inutilizzato.

  In breve: Mettete lo swap sul disco pi veloce con pi testine che non
  sia occupato per dell'altro. Se avete pi di un disco: dividete lo
  swap e spezzettatelo fra tutti i dischi e/o fra pi controller.

  Ancora meglio: Comprate altra RAM.


  3.4.  Alcune note sui file system e la frammentazione


  Lo spazio su disco  gestito dal sistema operativo in blocchi e
  frammenti di blocchi. In ext2, i frammenti e i blocchi devono avere la
  stessa dimensione, quindi possiamo restringere la nostra discussione
  ai blocchi.

  I file possono essere di qualsiasi dimensione, perci possono non
  terminare sul margine di un blocco. Cos per ogni file una parte
  dell'ultimo blocco viene sprecata. Assumendo che la dimensione dei
  file sia casuale, c' approssimativamente mezzo blocco sprecato per
  ogni file sul vostro disco.  Tanenbaum nel suo libro ``Operating
  Systems'' chiama questo evento ``frammentazione interna''.

  Potete intuire il numero di file sul disco dal numero di i-node
  allocati. Sul mio disco



       ______________________________________________________________________
       # df -i
       Filesystem           Inodes   IUsed   IFree  %IUsed Mounted on
       /dev/hda3              64256   12234   52022    19%  /
       /dev/hda5              96000   43058   52942    45%  /var
       ______________________________________________________________________




  Ci sono circa 12000 file su / e circa 44000 file su /var.  Con dei
  blocchi grandi 1 KB, circa 6 + 22 = 28 MB di spazio su disco sono
  sprecati nei blocchi di coda dei file. Se avessi scelto una dimensione
  del blocco di 4 KB, avrei sprecato uno spazio 4 volte superiore.
  Tuttavia il trasferimento dati  pi veloce per blocchi di dati grossi
  e contigui.  per questo che ext2 prova a riservare spazio in unit di
  8 blocchi contigui per i file in crescita. Lo spazio riservato e non
  utilizzato viene rilasciato quando il file viene chiuso, pertanto non
  c' spreco di spazio.

  Sistemare blocchi in modo non consecutivo  un male per le
  prestazioni, poich l'accesso ai file avviene in maniera sequenziale.
  Il sistema operativo viene forzato a ripetere l'accesso al disco, e il
  disco deve spostare la testina. Questo viene chiamato ``frammentazione
  esterna'' o semplicemente ``frammentazione'' ed  un problema comune
  con i filesystem DOS.

  Ext2 ha diverse strategie per evitare la frammentazione esterna.
  Normalmente la frammentazione non  un grosso problema per ext2,
  nemmeno sulle partizioni usate pesantemente come uno spool di news
  USENET. Anche se c' un programma di deframmentazione per il
  filesystem ext2, nessuno lo usa e non  aggiornato con la versione
  corrente di ext2. Usatelo se volete, ma fatelo a vostro rischio e
  pericolo.

  Il filesystem MS-DOS  ben conosciuto per la sua patologica gestione
  dello spazio disco. Insieme con l'irrisiorio buffer di cache usato da
  MS-DOS, gli effetti della frammentazione sulle prestazioni sono molto
  rilevanti. Gli utenti DOS sono abituati a deframmentare i dischi ogni
  poche settimane e qualcuno ha addirittura sviluppato alcune credenze
  rituali a riguardo della frammentazione. Nessuna di queste abitudini
  dovrebbe essere trasportata su Linux ed ext2. I file system nativi di
  Linux non hanno bisogno di deframmentazione durante il normale
  utilizzo, cio ogni situazione con almeno il 5% di spazio libero su
  disco.

  Il file system MS-DOS  famoso anche per sprecare grosse porzioni di
  disco a causa della frammentazione interna. Per partizioni pi grandi
  di 256 MB, la dimensione dei blocchi diventa tale che non sono pi
  efficaci (questo  stato corretto in qualche maniera con FAT32)

  ext2 non vi costringe a scegliere grossi blocchi per grossi file
  system, eccetto per file sistem enormi dagli 0.5 TB (1 TB equivale a
  1024 GB) in su, quando i blocchi piccoli diventano meno efficienti.
  Quindi a differenza del DOS non c' bisogno di dividere grossi dischi
  in molte partizioni per mantenere piccola la dimensione del blocco.
  Usate la dimensione di default di 1 KB se possibile. Potete
  sperimentare con una dimensione di 2 KB per alcune partizioni, ma
  aspettatevi di incontrare qualche raro bug: la maggior parte della
  gente usa il default.


  3.5.  Il ciclo di vita dei file e le sequenze di backup come criterio
  di partizionamento


  Con ext2, le decisioni di partizionamento dovrebbero essere governate
  da considerazioni di backup e dalla diversificazione dei tempi di vita
  dei differenti tipi di file per evitare la frammentazione esterna.

  I file hanno dei tempi di vita. Dopo che un file  stato creato,
  rimarr per un certo tempo nel sistema e poi verr rimosso. I cicli di
  vita dei file variano molto nel filesystem e sono parzialmente
  dipendenti dal percorso del file. Per esempio, i file in /bin, /sbin,
  /usr/sbin, /usr/bin e directory simili hanno tipicamente una vita
  molto lunga: molti mesi e oltre. I file in /home hanno una vita media:
  circa qualche settimana. I file in /var hanno vita breve: quasi
  nessuno in /var/spool/news rester per pi di qualche giorno, mentre
  in /var/spool/lpd i file durano pochi minuti.

  Per il backup  utile che la quantit di dati salvati nel backup
  giornaliero sia minore della capacit del singolo dispositivo di
  backup. Un backup giornaliero pu essere completo o incrementale.

  Potete decidere di tenere la dimensione delle partizioni abbastanza
  piccola da farle entrare completamente su un singolo backup (scegliete
  backup giornalieri completi). In ogni caso una partizione dovrebbe
  essere abbastanza breve che i cambiamenti da un giorno all'altro
  (tutti i file modificati) stiano su un solo backup (scegliete il
  backup incrementale e cambiate dispositivo di backup per il
  salvataggio totale settimanale o mensile - non  possibile una
  operazione automatica).

  La vostra strategia di backup dipende da quella decisione.

  Quando progettate di comprare spazio su disco, ricordate di mettere da
  parte dei soldi per il backup! I dati non salvati non valgono nulla! I
  costi per riprodurli sono molto maggiori di quelli per salvarli per
  chiunque!

  Per ragioni di prestazioni,  utile tenere i file con diversi tempi di
  vita su differenti partizioni. In questo modo i file con vita breve
  sulla partizione delle news possono anche essere molto frammentati, ma
  questo non avr impatto sulle prestazioni della partizione / o /home.



  4.  Un esempio

  4.1.  Un modello raccomandato per principianti ambiziosi


  Un modello comune crea le partizioni /, /home e /var come discusso in
  precedenza. Cos  semplice installare, mantenere e la distinzione 
  abbastanza buona da evitare effetti indesiderati a causa dei
  differenti tempi di vita. Si adatta bene a un modello di backup: quasi
  nessuno si preoccupa di salvare gli spool USENET, e solo qualche file
  in /var vale la pena di essere salvato (mi viene in mente
  /var/spool/mail). D'altra parte, / cambia raramente e pu venire
  salvata su richiesta (dopo cambiamenti di configurazione) ed 
  abbastanza piccola da stare nei moderni sistemi di backup come un
  backup completo (tipicamente dai 250 ai 500 MB, dipende dal software
  installato).  /home contiene importanti dati degli utenti e dovrebbe
  essere salvata in modo giornaliero. Qualche installazione ha delle
  partizioni /home molto grandi e si devono usare i backup incrementali.

  Alcuni sistemi mettono /tmp su una partizione separata, altri creano
  un link simbolico a /var/tmp per ottenere lo stesso effetto (notare
  che questo pu influire sul modo utente singolo, dove /var non sar
  disponibile e nel sistema non ci sar /tmp finch non ne creerete una
  o monterete /var manualmente) oppure la mettono su un disco RAM
  (Solaris, ad esempio, lo fa). Questo lascia /tmp separato da /, che 
  una buona idea.

  Questo modello  conveniente per aggiornamenti o reinstallazioni:
  salvate i vostri file di configurazione (o l'intero ramo /etc) in
  qualche directory /home, cancellate /, reinstallate e ripristinate le
  vecchie configurazioni dalla directory di salvataggio in /home.


  5.  Come ho fatto sulla mia macchina


  Avevo un vecchio 386/40 che giaceva sugli scaffali, l'avevo
  abbandonato due anni fa perch non potevo pi utilizzarlo. Pianificavo
  di trasformarlo un un piccolo server (senza X-Window) per la mia rete
  casalinga.

  Ecco come ho fatto: ho preso quel 386 e ci ho messo 16 MB di RAM, ho
  aggiunto un disco EIDE economico, il pi piccolo che ho trovato (800
  MB) e una scheda di rete Ethernet. Ho messo anche una vecchia
  Hercules, dato che avevo ancora un monitor. Ci ho installato Linux e i
  server NFS, SMB, HTTP, LDP/LPR, NNTP oltre che il mail router e il
  server POP3. Con l'aggiunta di una scheda ISDN la macchina divenne il
  mio router TCP/IP con firewall.

  La maggior parte dello spazio su disco andava nel ramo /var,
  /var/spool/mail, /var/spool/news e /var/httpd/html. Ho messo /var su
  una grossa partizione separata. Ci saranno pochi utenti su questa
  macchina, perci non ho creato partizioni home e monto /home da
  qualche altra workstation via NFS.

  Linux senza X pi qualche utility installata localmente sta comodo in
  250 MB di partizione /. La macchina ha 16 MB di RAM, ma fa girare
  molti server. Servono minimo altri 16 MB di swap, meglio 32 MB. Non
  abbiamo problemi di spazio, perci ne ho messi 32. Per motivi
  sentimentali ho lasciato 20 MB di partizione MS-DOS. Avendo deciso di
  importare /home da un'altra macchina, i rimanenti 500 e oltre MB
  andranno in /var. Sono pi che sufficienti per un utilizzo domestico
  di scarico dei newgroup USENET.

  Abbiamo



       ______________________________________________________________________
       Device     Montato su                      Dimensioni
       /dev/hda1  /dos_c                           25 MB
       /dev/hda2  - (Spazio swap)                  32 MB
       /dev/hda3  /                               250 MB
       /dev/hda4  - (Partizione Estesa)           500 MB
       /dev/hda5  /var                            500 MB

       homeserver:/home /home                     1.6 GB
       ______________________________________________________________________




  I salvataggi vengono effettuati via rete usando il nastro su
  homeserver. Poich  stato tutto installato da CD-ROM, devo salvare
  solo qualche file di configurazione in /etc, i miei *.tgz
  personalizzati installati localmente da /root/Source/Installed e
  /var/spool/mail, assieme a /var/httpd/html. Copio questi file in una
  directory dedicata /home/backmeup su homeserver ogni notte, per essere
  prelevati dalla procedura di backup ordinario di homeserver.
















  Linux Partition-Rescue mini-HOWTO
  Rolf Klausen, <rolfk@romsdal.vgs.no>
  Versione 1.1, 22 ottobre 1997. Tradotto 4 maggio 1999

  Questo mini-HOWTO descrive come recuperare la tua partizione Linux se
  M$-DOG te l'ha gentilmente cancellata.

  1.  Introduzione

  Sul mio computer ho installato Linux, l'ho usato per oltre un anno, e
  credo proprio sia il migliore sistema operativo mai creato. Nel mio
  computer ho pure installati M$-DOG e Windows NT 4.0. La ragione per
  cui uso M$-DOG  semplicemente perch, come una volta scrisse Lars
  Wirzenius: "MS-DOS - non puoi viverci assieme, non puoi vivere senza".
  Lo uso per giocare e eseguire demo e altra roba.

  Ok, basta parlare di questo. Ho due partizioni DOS, una partizione
  primaria e una logica (presumo sappiate cosa sia una partizione -
  altrimenti leggetevi il Partition mini-HOWTO. Lo trovate da qualche
  parte su sunsite.unc.edu e probabilmente in molti altri posti). Sono
  di circa 500 Mb ciascuna (ho un Hard Disk da 3.2 Gb e uno da 1.2 Gb:).
  La mia partizione Linux  da 1200 MB.  Ho 800 Mb di spazio libero, e
  per ora non so cosa farne; mi stavo chiedendo cosa avrei dovuto fare
  se avessi avuto bisogno di pi spazio per il DOS (un gioco grande o
  qualcos'altro...), perch non ero sicuro di quanti drive logici DOS
  possa usare / accedere.  Non so perch, ma per qualche motivo pensavo
  che DOS potesse usarne solo uno (in aggiunta alla partizione DOS
  primaria). Cos ho pensato che potevo controllare se DOS poteva
  accedere a pi drive logici. Ho avviato fdisk (in DOS), e ho usato i
  menu per creare un "logical DOS drive", e questo ha funzionato bene.
  Ne ho creato uno grande 100 Mb. Poi l'ho formattato e funzionava bene!
  Grandioso!  Ma non mi serviva quel drive allora, cos ho deciso di
  cancellarlo. Ho usato l'fdisk del DOS di nuovo, scegliendo "delete DOS
  primary partition or logical drive" (o qualcosa di simile) nel menu,
  ho selezionato il drive E per cancellarlo, scritto l'etichetta di
  volume per conferma (era vuota, quindi ho solo schiacciato Invio) e
  fdisk mi ha riferito che il disco era stato correttamente cancellato.
  Poi ho riavviato. Sul mio computer uso un programma che si chiama
  System Commander.  un programma grandioso che mostra un bel menu
  (sullo stile del Boot Manager di OS2) con icone e molte funzioni
  carine. Cerca e rimuove sistemi operativi nuovi/cancellati, ecc. Ma,
  quando ho riavviato, Linux non era pi sul menu! Ho avviato DOS,
  scritto e: e premuto invio, ed era ancora l!  Poi ho avviato fdisk, e
  ho scelto di visualizzare la tabella delle partizioni, e mi ha
  risposto che il drive E era ancora l, e dove c'era la mia partizione
  Linux, ora era rimasto solo uno spazio vuoto!  SHOCK! ORRORE! Ho
  cominciato a sudare e a tremare! Cosa dovevo fare adesso! Non potevo
  reinstallare tutto! Doveva esserci un modo per riportare il tutto
  indietro! E s, c'era! Grazie a Dio (anche se non ci credo), c'era!
  Avevo tonnellate di informazioni e programmi utili su quella
  partizione! Prima di cercare di capire come riportare indietro quella
  partizione, sperai che Bill Gates non fosse neppure nato! Hai
  sperimentato la stessa cosa di recente? Non preoccuparti, il soccorso
   qui! Leggi solo un po' oltre...!


  1.1.  Liberatoria

  Questo mini-HOWTO  Copyright (C) 1997 di Rolf Klausen. Tutti i
  diritti sono riservati. Puoi farne (quasi) tutto ci che vuoi.  Non
  m'interessa. Solo, accertati di mantenere intatto il mio nome. Spero
  solo sia utile per qualcuno nella comunit Linux. Ma per piacere leggi
  il paragrafo sottostante.

  IMPORTANTE!!!!
  Non sono responsabile di alcun danno su alcun computer come risultato
  della lettura di questo HOWTO da parte di alcuno. Se provochi qualche
  danno,  colpa TUA, NON MIA! Stai attento nel partizionare un disco, e
  non commettere errori, potrebbero essere fatali!  Esegui copie di
  backup di ogni dato importante e controlla che tutto ci che fai sia
  giusto! Quanto  descritto qui ha funzionato sul mio computer, e pu
  farlo o meno sul tuo. Anche se dovrebbe funzionare per tutti, non
  posso garantire nulla. Questo  l'ultimo avvertimento che avrai: FAI
  COPIE DI BACKUP DEI DATI IMPORTANTI! O, per farla breve: Usa a tuo
  rischio!


  1.2.  Roba legale

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors.  Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies.
  Commercial redistribution is allowed and encouraged; however, the
  author would like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution.  Exceptions to these
  rules may be granted under certain conditions; please contact the
  Linux HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  (NdT: La seguente traduzione non ha la pretesa di essere ufficiale n
  approvata dall'autore)

  A meno che non sia indicato il contrario, i documenti HOWTO di Linux
  sono sotto copyright dei rispettivi autori. Tali documenti possono
  essere riprodotti e distribuiti interamente o in parte, su ogni
  supporto, fisico o elettronico, finch questa nota di copyright 
  allegata a tutte le copie. Le ridistribuzioni commerciali sono
  permesse ed incoraggiate; comunque, l'autore vorrebbe averne
  comunicazione.

  Tutte le traduzioni, i lavori derivati o i lavori altrui contenenti
  documenti Linux HOWTO devono essere svolti sotto questa nota di
  copyright. Vale a dire, non si pu produrre un lavoro derivato da un
  HOWTO e imporre restrizioni addizionali alla sua distribuzione. Vi
  possono essere, sotto particolari condizioni, eccezioni a queste
  regole; prego contattare il coordinatore degli HOWTO di Linux
  all'indirizzo riportato sotto.

  In breve, vorremmo promuovere la diffusione di queste informazioni
  attraverso quanti pi canali possibili. Comunque, vogliamo mantenere
  il copyright dei documenti HOWTO, e vorremmo essere avvertiti di ogni
  progetto riguardante la loro ridistribuzione.

  Per ogni domanda, contatta Tim Bynum, il coordinatore dei Linux HOWTO
  a linux-howto@sunsite.unc.edu via email.


  2.  Alcuni preparativi e requisiti

  2.1.  Di cosa hai bisogno


  OK! Allora, MS-DOG ti ha cancellato la partizione Linux? Qui c'
  quello che ti serve per riportarla indietro dal regno dei morti!

    Una installazione DOS funzionante, preferibilmente su disco rigido;
     forse funziona anche con un floppy, non saprei.

    Un programma per DOS chiamato Partition Magic.  shareware, e
     dovresti essere in grado di rintracciarlo su Internet, in un modo o
     nell'altro. ;^)

    Un disco boot ed uno root di Linux. Io ho usato quelli della
     distribuzione Slackware. Devi avere l'fdisk di Linux nel floppy
     root.


  2.2.  Assumer che...


    ... M$-DOG ha cancellato la tua partizione (accidentalmente?)

    ... non hai cambiato nulla nella tabella delle partizioni da quando
      successo

    ... soddisfi i prerequisiti indicati nel paragrafo precedente.

  Se questo profilo ti si adatta, allora le speranze di recuperare la
  tua partizione sono ottime!


  3.  Andiamo! Rivoglio la mia partizione!

  OK! Andiamo al salvataggio...impugna una tazza di caff e rilassati.
  Tutto andr per il meglio :)

  Tra l'altro - Puoi immaginare come mi sono sentito quando MeSsy-DOS mi
  ha cancellato la partizione? Non sono (quasi) mai stato cos
  arrabbiato in tutta la mia vita. Ma ho trovato un modo di
  ripristinarla. Eccolo qui...:


  3.1.  Usare Partition Magic per ripristinare la tua partizione

  Procurati il Partition Magic da qualche parte in rete. Avvialo, e
  avrai una simpatica interfaccia utente in stile win95.  molto facile
  da usare e se hai mai usato Windoze 95 dovresti essere in grado di
  usare anche questo programma. Premi il bottone OK e  dovrebbe apparire
  sullo schermo una schermata riassuntiva del tuo disco. Le varie
  partizioni e i filesystem sono contraddistinti da colori diversi. Io
  ho una partizione DOS primaria; poniamo che voi abbiate lo stesso. Uno
  dei miei drive logici  la mia partizione Linux. Dove prima c'era lei,
  ora si trova una barra grigia di spazio vuoto. A destra e sinistra di
  essa dovresti avere un piccolo drive logico che  la partizione di
  swap. Ora fai clic col bottone destro sullo spazio vuoto e seleziona
  "create", o sceglilo dai menu. Dovresti essere in grado di immaginare
  come funziona. , come detto prima, un'interfaccia molto semplice da
  usare. Quando la casella di dialogo "create partition" appare,
  seleziona "Unformatted" (non formattato) dove dice "FAT". Se selezioni
  "FAT" o "HPFS" o un altro filesystem, il tuo vecchio filesystem Linux
  sar distrutto, per cui assicurati di avere selezionato il valore
  giusto. Ora seleziona OK, e la partizione verr creata. Ma sar
  marcata come FAT16... (nella tabella delle partizioni, ognuna ha un
  marchio (un numero esadecimale) che indica a quale sistema operativo
  appartiene). Cosa fare allora? Vai alla sezione successiva, ovviamente
  :)!



  3.2.  Cambiare il tipo di partizione in Linux Native

  Adesso ti servono il floppy boot e quello root, quindi spero tu li
  abbia.  anche possibile usare loadlin. Assicurati solo di poter
  avviare Linux e lanciare fdisk sotto di esso. La prima cosa da fare 
  il login ;). Lancia fdisk scrivendo 'fdisk' al prompt della shell. Se
  hai pi di un hard disk, assicurati che fdisk usi quello giusto.
  Scrivi 'p' (solo la lettera p) e schiaccia Invio. Dovresti adesso
  avere una lista della tabella delle partizioni. Dovrebbe esserci un
  "DOS 16-BIT >= 32M" pi del normale. Trova quale era la tua partizione
  Linux (guarda la dimensione, ecc.) e annotati il numero (ad es. il mio
   /dev/hda6, cos mi sono annotato il numero 6 :). Adesso scrivi 't' e
  Invio per cambiare il tipo di una partizione, o l'ID, com' chiamato
  nell'fdisk di Linux (non sono sicuro di quale dei due sia giusto, ma
  io uso 'tipo'). Adesso digita il numero che dovresti esserti annotato
  e premi Invio. Adesso devi digitare il codice esadecimale del tipo di
  partizione che ti serve. Digita 83 e premi Invio. 83 significa che la
  partizione sar Linux Native (nativa di Linux). Una partizione di Swap
  avr il tipo impostato a 82. Puoi digitare 'l' per avere una lista dei
  codici.

  Quando hai fatto tutto questo, e quando l'hai fatto giusto, la tua
  partizione dovrebbe essere OK!!! S!  proprio vero! Ha funzionato per
  me, e dovrebbe funzionare anche per te! Tutto quello che ti resta da
  fare  il passo finale:


  3.3.  I ritocchi finali

  Ci sono altri piccoli dettagli ancora da curare. Prima di tutto,
  riavvia e accedi a Linux come facevi di solito (LILO, ecc.) e
  controlla se tutto funziona. Altrimenti, hai fatto qualcosa di
  sbagliato o il mio metodo di ripristino non funziona per te :(. Ma se
  tutto funziona, allora congratulazioni! Hai fatto tutto correttamente!
  Ora, fsck controller una volta il tuo filesystem (a me l'ha fatto
  due, non so mica perch! ;), e poi tutto dovrebbe funzionare di nuovo!
  Altrimenti, non biasimarmi. Come ho detto, ha funzionato per me, ma
  forse non per te. Se ho salvato la tua partizione, un'e-mail sarebbe
  molto gradita... :)


  4.  Collaboratori

  Per la traduzione italiana:
  Germano Rizzo
  E-mail: germano@geocities.com
  WWW: http://members.xoom.com/germano/


  4.1.  Autori

  C' solo un autore, e sono io:
  Rolf Klausen
  E-mail: rolfk@romsdal.vgs.no
  WWW: http://www2.romsdal.vgs.no/~rolfk/
  Posta regolare:
  Rolf Klausen
  Neptunvn. 10
  6400 Molde
  NORWAY


  4.2.  Ringraziamenti vanno a:



    Eivind Stormyr (eivind@ardata.no) per avermi introdotto a Linux, il
     miglior sistema operativo mai creato :), e per avermi insegnato
     cos tanto sui computer.

    Bjorn Olav Stormyr (bjorn@ardata.no) per avermi concesso grandi
     sconti su tutte le parti del mio computer :). Senza di lui non
     avrei potuto permettermi il computer che ho :)

    Tutti gli altri membri della comunit di Linux e chiunque supporti
     Linux e scriva documentazione e programmi per Linux e a tutti gli
     autori del LDP e virtualmente ad ogni persona coinvolta in
     qualsiasi cosa abbia a che fare con Linux. Particolarmente Linus B.
     Torvalds -  Il Re !!!

  E, naturalmente:

    Tone B. Skjoelsvik - La pi bella ragazza del mondo :-)


  4.3.  Ringraziamenti NON vanno a:

  Bill Gates (bill.gates@microsoft.com (?)) per aver creato i peggiori
  "sistemi operativi" del mondo e per aver cancellato la mia partizione
  (S, lo biasimo. Se non fosse mai nato, la mia partizione sarebbe
  stata ancora l, e non avrei dovuto recuperarla e neppure scrivere
  questo piccolo HOWTO ;).








































  The Linux Public Web Browser mini-HOWTO
  Donald B. Marti Jr., dmarti@best.com
  v0.3, 5 Gennaio 1998

  L'idea di base  di dare un accesso web a persone di passaggio, limi
  tando nel frattempo la possibilit di manomissioni.  Traduzione di
  Andrea Manzini (linux@netbusiness.it)

  1.  Copyright e Disclaimer

  Copyright 1997 Donald B. Marti Jr.  This document may be redistributed
  under the terms of the Linux Documentation Project license.

  ovvero:

  Copyright 1997 Donald B. Marti Jr.  Questo documento pu essere
  ridistribuito sotto i termini di licenza del Linux Documentation
  Project.

  Attualmente questo documento contiene informazioni solo per Netscape
  Navigator, ma penso che aggiunger note per altri browser appena avr
  le necessarie informazioni. Se usate queste informazioni con altri
  browser, fatemelo sapere.

  2.  Introduzione

  L'idea di base  di dare accesso web a persone di passaggio, limitando
  le loro possibilit di creare danni e malfunzionamenti.

  Originalmente questa configurazione  stata pensata per mostre e
  fiere, ma potrebbe essere applicabile ad altri luoghi dove si vuole
  avere un browser operativo senza dover assistere di persona al
  computer.

  Seguire queste istruzioni non far diventare il vostro sistema
  inespugnabile n a prova di idiota.

  3.  Prima di iniziare

  3.1.  Serve un browser grafico

  Questo documento assume che nel vostro sistema ci sia un browser
  grafico funzionante, come Netscape Navigator.  Dovete avere i permessi
  per usare il browser grafico.  Se volete usare Netscape Navigator in
  un contesto commerciale, potete comprare una copia con licenza
  appropriata tramite Caldera.

  3.2.  Dovete avere la possibilit di aggiungere un account

  Se non avete i diritti per poter operare come root, chiedete
  all'amministratore di aggiungere un account ``guest'' e di darvi il
  possesso della directory home di questo utente.  Saltate alla sezione
  ``Create o modificate i seguenti file'' (``Create o modificate i
  seguenti file'') quando l'amministratore avr finito.

  3.3.  Serve httpd  per una postazione singola di consultazione

  Se state preparando una postazione di consultazione da far funzionare
  da sola, senza connessioni di rete, dovete avere httpd funzionante e i
  documenti web installati.  Per provare se questo  vero, battete:


       lynx -dump http://localhost/



  Dovreste vedere il testo della pagina iniziale del sistema.

  4.  Aggiungere l'utente guest

  Come root, eseguite adduser per aggiungere un utente chiamato guest.
  Poi battete


       passwd guest




  per impostare la password per l'account guest.  Questa dovrebbe essere
  facile da ricordare, tipo ``guest''.  Darete questa password ad altre
  persone, pertanto fate in modo che sia diversa da quella vostra per
  sonale.

  Adesso impostate la home directory di guest in modo da esserne i
  proprietari.  Battete


       chown io.miogruppo /home/guest




  Sostituite ``io'' con il vostro username e ``miogruppo'' con il nome
  del vostro gruppo (su Red Hat Linux, questi saranno gli stessi, dato
  che ogni utente ha il proprio gruppo).

  Adesso dovreste uscire e continuare le altre operazioni con il vostro
  account, non come root.

  5.  Create o modificate i seguenti file in /home/guest

  5.1.  Nome File: .bash_login



       ______________________________________________________________________
       exec startx
       ______________________________________________________________________




  Questo significa che quando guest si connette, la shell di login far
  partire subito il sistema a finestre X Window.

  5.2.  Nome File: .Xclients



       ______________________________________________________________________
       netscape
       ______________________________________________________________________




  Questo significa che alla partenza di X, guest vedr solo il browser,
  senza window manager. Se preferite un altro browser, agite altrimenti.

  Il file .Xclients deve essere eseguibile da guest.  Per far ci
  battete
       chmod 755 /home/guest/.Xclients




  5.3.  Nome File: .xsession



       ______________________________________________________________________
       #!/bin/sh
       netscape
       ______________________________________________________________________




  Se usate xdm(1) per fare il login, questo file fa in modo che guest
  abbia il web browser come se fosse entrato normalmente.  Il file
  .xsession deve essere exeguibile da guest.  Per far ci battete


       chmod 755 /home/guest/.xsession




  5.4.  Nome File: .Xdefaults






































  ______________________________________________________________________
  ! Disabilita la selezione per trascinamento.
  *hysteresis:                            3000

  ! Rendi i link visitati e non visitati dello stesso colore
  *linkForeground:                        #0000EE
  *vlinkForeground:                       #0000EE

  Netscape.Navigator.geometry: =NETSCAPE_GEOMETRY

  ! Disabilita alcuni comandi da tastiera.
  *globalTranslations:

  ! Fai in modo che tutti i tasti del mouse agiscano alla stessa maniera.
  *drawingArea.translations:              #replace                        \
  <Btn1Down>:                     ArmLink()                       \n\
  <Btn2Down>:                     ArmLink()                       \n\
  <Btn3Down>:                     ArmLink()                       \n\
  ~Shift<Btn1Up>:                 ActivateLink()                  \
                                  DisarmLink()                    \n\
  ~Shift<Btn2Up>:                 ActivateLink()                  \
                                  DisarmLink()                    \n\
  ~Shift<Btn3Up>:                 ActivateLink()                  \
                                  DisarmLink()                    \n\
  Shift<Btn1Up>:                  ActivateLink()                  \
                                  DisarmLink()                    \n\
  Shift<Btn2Up>:                  ActivateLink()                  \
                                  DisarmLink()                    \n\
  Shift<Btn3Up>:                  ActivateLink()                  \
                                  DisarmLink()                    \n\
  <Btn1Motion>:                   DisarmLinkIfMoved()             \n\
  <Btn2Motion>:                   DisarmLinkIfMoved()             \n\
  <Btn3Motion>:                   DisarmLinkIfMoved()             \n\
  <Motion>:                       DescribeLink()                  \n\
  ______________________________________________________________________




  Questo file disabilita i tag lampeggianti, la selezione con il mouse,
  e alcuni comandi da tastiera.  Fa anche in modo che tutti i pulsanti
  del mouse agiscano alla stessa maniera, nasconde la barra del menu, e
  imposta allo stesso colore i link visitati e non, cos ogni visitatore
  si trova tutti i link blu, e non quelli che altri hanno visitato e
  reso viola.

  Dovrete sostituire la voce NETSCAPE_GEOMETRY in questo file con una
  geometria del tipo: XxY+0-0, dove X  la larghezza in pixel dello
  schermo e Y  l'altezza + 32.  Questo posizioner la barra dei menu di
  Netscape fuori dal bordo superiore dello schermo, cos l'utente non ne
  sar distratto.  Per esempio, se lo schermo  800x600, la geometria
  dovrebbe essere 800x632+0-0.

  6.  Create una directory .netscape  per guest

  Battete


       mkdir /home/guest/.netscape
       chmod 777 /home/guest/.netscape




  Per creare la directory .netscape per guest e renderla accessibile a
  tutti.
  7.  Provate

  Uscite (logout), e rientrate come guest.

  8.  Cambiare le impostazioni

  Poich non sarete in grado di usare le barra dei menu come guest,
  dovrete modificare le impostazioni manualmente se ne avrete bisogno,
  oppure modificare le vostre impostazioni in modo da rispecchiare
  quelle di guest e poi copiare il file delle impostazioni
  (preferences).























































  The RCS MINI-HOWTO
  Robert Kiesling
  v1.4, 14 agosto 1997

  Questo documento riguarda l'installazione di base e l'uso di RCS, lo
  GNU Revision Control System (sistema di controllo delle revisioni di
  GNU), sotto Linux. Viene trattata anche l'installazione delle utilit
  diff(1) e diff3(1), che sono necessarie per il funzionamento di RCS.
  This document may be reproduced freely, in whole or in part, provided
  that any usage of this document conforms to the general copyright
  notice of the HOWTO series of the Linux Documentation Project (Questo
  documento pu essere riprodotto liberamente, in tutto o in parte, a
  patto che qualsiasi uso di questo documento sia conforme alla nota di
  copyright generale delle serie HOWTO del Linux Documentation Project).
  Vedere il file COPYRIGHT per i dattagli.  Mandate reclami, suggeri
  menti, errata e qualunque altra cosa a kiesling@terracom.net, affinch
  io possa mantenere questo documento il pi completo e aggiornato pos
  sibile.  Traduzione di Fabrizio Stefani (fabrizio_stefani@yahoo.it),
  22 luglio 1999.

  1.  Panoramica di RCS.

  RCS, il Sistema di Controllo delle Revisioni (revision control
  system),  una raccolta di programmi per tenere traccia dei
  cambiamenti nei file di testo e controllare gli accessi ai file
  condivisi in situazioni di lavoro di gruppo. Generalmente viene usato
  per mantenere i moduli di codice sorgente.  Si presta anche a tenere
  traccia delle revisioni dei file di documentazione.

  RCS  stato scritto da Walter F. Tichy e Paul Eggert. L'ultima
  versione di cui  stato fatto il porting per Linux  RCS Versione 5.7.
   disponibile anche una versione semi-ufficiale, che usa i thread.
  Gran parte delle informazioni contenute in questo HOWTO sono state
  prese dalle pagine di manuale di RCS.

  RCS include il programma rcs(1), che controlla gli attributi dei file
  archivio di RCS, ci(1) e co(1), che effettuano il check in ed il check
  out dei file dagli archivi RCS, ident(1), che effettua ricerche di
  identificatori chiave negli archivi RCS, rcsclean(1), un programma per
  cancellare i file su cui non si sta lavorando o che non sono cambiati,
  rcsdiff(1), che esegue diff(1) per confrontare le revisioni,
  rcsmerge(1), che fonde due rami (branch) RCS in un singolo file di
  lavoro, e rlog(1), che stampa i messaggi di log di RCS.

  I file archiviati con RCS possono essere testo in qualunque formato, o
  binari se il programma diff, usato per generare i file con i
  cambiamenti, gestisce dati ad 8 bit. I file possono opzionalmente
  includere stringhe di identificazione, per aiutare nel tracciamento
  con ident(1). RCS usa le utilit diff(1) e diff3(3) per generare i
  file con le modifiche tra pi revisioni. Un archivio RCS  formato
  dalla revisione iniziale di un file, che  la versione 1.1, e una
  serie di file con le modifiche, uno per ogni revisione.  Ogni volta
  che un file in un archivio viene estratto con co(1), editato e rimesso
  di nuovo nell'archivio con ci(1), il numero di versione viene
  incrementato, per esempio ad 1.2, 1.3, 1.4, e cos via per le
  revisioni successive.

  Gli archivi stessi di solito risiedono in una sottodirectory ./RCS,
  sebbene RCS abbia anche altre opzioni per immagazzinare gli archivi.

  Per una presentazione di RCS vedere la pagina di manuale rcsintro(1).





  2.  Requisiti di sistema.

  RCS ha bisogno di diff(1) e diff3(3) per generare i file con le
  differenze di contenuto fra le revisioni (i file diff). La suite di
  utilit diff deve essere installata nel vostro sistema e, quando
  installate RCS, il software ne controller la presenza.

  I binari precompilati delle diffutils sono disponibili presso:

  ftp://sunsite.unc.edu/pub/Linux/utils/text/diffutils-2.6.bin.ELF.tar.gz


  e sui suoi siti mirror. Se avete bisogno di compilare diff(1) (ed
  altri), dal sorgente, lo trovate presso:

  ftp://prep.ai.mit.edu/pub/gnu/diffutils-2.7.tar.gz


  e sui suoi siti mirror.

  Dovrete anche avere le librerie ELF installate sul vostro sistema, se
  volete installare i binari precompilati. Vedere l'ELF-HOWTO per
  ulteriori dettagli.



  3.  Compilare RCS dal Sorgente.

  Prendete la distribuzione sorgente di RCS Versione 5.7.  disponibile
  presso

  ftp://sunsite.unc.edu/pub/Linux/devel/vc/rcs-5.7.src.tar.gz


  e sui suoi mirror. Dopo che avete spacchettato l'archivio nel vostro
  albero dei sorgenti, dovrete configurare RCS per il vostro sistema.
  Ci viene fatto attraverso lo script configure nella directory sor
  gente, che dovete eseguire per primo. Cos facendo verranno generati
  un Makefile e l'appropriato conf.sh per il vostro sistema.  Potete poi
  battere

  make install


  che compiler i binari. Ad un certo punto potreste dover eseguire un
  su a root affinch i binari possano essere installati nelle giuste
  directory.



  4.  Creare e mantenere archivi.

  Il programma rcs(1) effettua il lavoro di creazione degli archivi e di
  modifica dei loro attributi. Un riassunto delle opzioni di rcs(1) pu
  essere trovato nella pagina di manuale di rcs(1).

  Il modo pi facile per creare un archivio  di effettuare innanzi
  tutto un mkdir RCS, nella directory corrente, e poi inizializzare
  l'archivio con il comando

  rcs -i nome_file_di_lavoro


  Ci crea un archivio di nome ./RCS/nome_file_di_lavoro,v e richiede un
  messaggio di testo per la descrizione dell'archivio, ma non mette nes
  suna revisione nell'archivio. Potete abilitare o disabilitare il
  bloccaggio rigoroso (strict locking) dell'archivio con i comandi

  rcs -L nome_file_di_lavoro


  e

  rcs -U nome_file_di_lavoro


  rispettivamente. Ci sono altre opzioni, trattate nella pagina di man
  uale di rcs(1), per controllare l'accesso all'archivio, impostarne il
  formato e impostare i numeri di revisione.



  5.  ci(1)  e co(1) .

  ci(1) e co(1) sono i comandi usati per effettuare il check in
  (controllo in inserimento) ed il check out (controllo in estrazione)
  dei file dai loro archivi RCS. Il comando ci(1) pu anche essere usato
  per effettuare sia il check in che il check out da un archivio.  Nella
  loro forma pi semplice, ci(1) e co(1) prendono solo il nome del file
  di lavoro.

  ci nome_file_di_lavoro


  e

  co nome_file_di_lavoro


  Il comando nella forma

  ci -l nome_file_di_lavoro


  effettua il check in del file abilitandone il blocco (lock enabled)
  mentre

  co -l nome_file_di_lavoro


   effettuato automaticamente. Cio, ci -l effettua di nuovo il check
  out del file, con il blocco abilitato.

  ci -u nome_file_di_lavoro


  effettua il check in del file nell'archivio ed effettua di nuovo il
  check out con il blocco disabilitato. In tutti i casi, all'utente
  viene chiesto un messaggio di log.

  ci(1) creer anche un archivio RCS se non ne esiste gi uno.

  Se non specificate una revisione, ci(1) incrementa il numero di
  versione dell'ultima revisione bloccata nell'archivio ed aggiunge allo
  stesso il file di lavoro appena rivisto. Se specificate una revisione
  su un ramo gi esistente, essa deve essere pi alta dei numeri di
  revisione esistenti.  ci(1) creer anche un nuovo ramo se specificate
  la revisione di un ramo che non esiste. Per i dettagli, vedere le
  pagine di manuale di ci(1) e co(1).

  ci(1) e co(1) riconoscono varie opzioni per usi interattivi e non. Di
  nuovo, vedere le pagine di manuale di ci(1) e co(1) per i dettagli.
  6.  Storia delle revisioni.

  Il programma rlog(1) fornisce informazioni sul file archivio e i log
  di ogni revisione in esso immagazzinata. Un comando come

  rlog nome_file_di_lavoro


  stamper la storia delle revisioni del file, per ogni revisione stam
  per la data di creazione e lo userids dell'autore, e la persona che
  ha bloccato il file. Potete specificare gli attributi dell'archivio ed
  i parametri di revisione da vedere.



  7.  Includere i dati RCS nei file di lavoro.

  co(1) mantiene una lista di parole chiave del database RCS che vengono
  espanse quando viene effettuato il check out nel file di lavoro.  La
  parola chiave $Id$ in un documento sar espansa in una stringa che
  contiene il nome del file, il numero di revisione, la data del chek
  out, l'autore, lo stato della revisione e chi  che lo ha bloccato, se
  c'. Includendo la parola chiave $Log$ essa verr espansa nel log
  della storia delle revisioni del documento.

  Questa ed altre parole chiave possono essere usate come criteri di
  ricerca negli archivi RCS. Vedere la pagina di manuale di ident(1) per
  ulteriori dettagli.


  8.  Il Controllo della Versione con RCS e emacs(1) .

  La capacit di controllo della versione di emacs(1) funziona come
  front end per RCS. Questa informazione  specifica per la versione
  19.34 dello GNU emacs, che  incluso con le principali distribuzioni
  di Linux. Quando si edita un file con un emacs(1) che  registrato con
  RCS, il comando vc-toggle-read-only (legato a C-x C-q per default)
  controller la versione di un file in emacs, e poi in RCS.  Emacs
  aprir un buffer in cui potrete scrivere un messaggio di log, premere
  C-c C-c per terminare l'input, e procedere con il processo di check
  in.

  Se avete selezionato il bloccaggio rigoroso per il file con RCS,
  dovete ribloccare il file per poterlo editare con emacs(1). Potete
  fare il chek out del file, per farne il controllo della versione con
  emacs, con il comando % nel modo buffer-menu.

  Per maggiori informazioni, vedere il Manuale dello GNU Emacs e le
  pagine info di Emacs.

















  RPM+Slackware Mini-Howto
  Dave Whitinger, dave@whitinger.net
  v1.3, 13 aprile 1998

  Questo documento descrive come procurarsi, installare e far funzionare
  correttamente RPM su una distribuzione Slackware.  Tuttavia le infor
  mazioni qui contenute dovrebbero essere applicabili a una qualsiasi
  distribuzione.

  1.  Introduzione


  RPM  il "Gestore di pacchetti di Red Hat" ed  il cuore della
  distribuzione Linux Red Hat.  La sua funzione pi basilare  di
  installare e disinstallare i pacchetti.

  Questo documento  rivolto verso l'installazione di RPM su un sistema
  slackware che usa un processore Intel, ma le informazioni qui
  contenute dovrebbero essere applicabili a una qualsiasi distribuzione.

  L'ultima versione di questo HOWTO  sempre disponidile su:
  <http://www.threepoint.com/HOWTO/RPM+Slackware.html>

  Per ulteriori letture, consultare l'RPM-HOWTO (disponibile sul mirror
  LDP pi vicino a te).  Prendete in considerazione anche l'ipotesi di
  acquistare un eccellente libro: Maximum RPM, di Ed Bailey della Red
  Hat Software, Inc.


  2.  Ottenere il software


  La versione pi recente di RPM  sempre disponibile su:



       ftp.rpm.org/pub/rpm/dist/latest




  Quando questo documento  stato scritto, l'ultima versione era



       rpm-2.4.12-1.i386.tar.gz




  Osservate la parte .i386.  Questo significa che  un pacchetto binario
  per un'architettura Intel, pronto per essere decompresso e per
  funzionare.  Assicuratevi che il file che scaricate abbia i386
  all'interno del nome, altrimenti le seguenti istruzioni non
  funzioneranno.


  3.  Installare il software


  La via pi facile per installare RPM consiste nell'usare il gestore di
  pacchetti nativo di Slackware.

  Per installare RPM dovete essere root.


               installpkg /home/dave/rpm-2.4.12-1.i386.tar.gz





  Naturalmente, sostituite /home/dave con il percorso corretto per il
  nome del file.

  (OSSERVAZIONE!) Se questo non funziona, scompattate semplicemente il
  file con questi comandi:



               cd / ; tar zxvpf /home/dave/rpm-2.4.12-1.i386.tar.gz





  Successivamente create una directory chiamata "rpm" sotto l'albero
  /var/lib.

  mkdir /var/lib/rpm

  Ora digitate 'rpm --initdb' per inizializzare il database rpm.

  A questo punto, se tutto ha funzionato correttamente, avete un sistema
  rpm compatibile!  Testatelo arraffando un qualunque file rpm e
  installandolo con il comando 'rpm -Uvh filename.rpm'


  4.  Bug (Importante!)

  Siate consapevoli che su diverse versioni di RPM, i file tar vengono
  creati usando permessi non corretti.  Appena installate RPM,
  controllate i permessi di alcune directory (/bin, /usr, etc).  Se i
  permessi sono impostati al valore 700 (drwx------), allora siete stati
  infettati dal bug.

  Per fissare questi problemi riguardo ai permessi, fate girare questo
  script della shell:


  ______________________________________________________________________
  #!/bin/sh

  chmod 755 /bin
  chmod 755 /usr
  chmod 755 /usr/bin
  chmod 755 /usr/doc
  chmod 755 /usr/lib
  chmod 755 /usr/man
  chmod 755 /usr/man/man8
  chmod 755 /usr/share
  chmod 755 /usr/share/locale
  chmod 755 /usr/share/locale/de
  chmod 755 /usr/share/locale/de/LC_MESSAGES
  chmod 755 /usr/share/locale/pt-br
  chmod 755 /usr/share/locale/pt-br/LC_MESSAGES
  chmod 755 /usr/share/locale/sv
  chmod 755 /usr/share/locale/sv/LC_MESSAGES
  chmod 755 /usr/src
  ______________________________________________________________________


  Sentitevi liberi di inviarmi una E-Mail se avete domande al riguardo.


  5.  Ringraziamenti

  Ringrazio Red Hat Software, Inc. e Patrick Volkerding per le loro
  eccellenti distribuzioni Linux.

  Un grazie a Milan Kopacka (mkop5230@ss1000.ms.mff.cuni.cz) per aver
  sottoposto alla mia attenzione una via migliore per installare RPM
  (installpkg).


  6.  Copyright


  Questo HOWTO  propriet letteraria riservata 1998 di Dave Whitinger,
  ed  un documento libero.  Potete ridistribuirlo e/o modificarlo sotto
  i termini della GNU General Public License come pubblicato dalla Free
  Software Foundation; versione 2 della Licenza o successiva.














































  Remote X Apps mini-HOWTO
  Vincent Zweije, zweije@xs4all.nl
  v, 14 luglio 1998

  Questo mini-HOWTO descrive come eseguire applicazioni X in remoto.
  Ovvero, come avere un programma X che scrive su un computer diverso da
  quello su cui sta girando. O viceversa: come far s che un programma X
  giri su un computer diverso da quello a cui uno  seduto. L'accento in
  questo mini-HOWTO  sulla sicurezza.

  1.  Introduzione

  Questo mini-HOWTO  una guida a come far andare le applicazioni X in
  remoto.  stato scritto per parecchie ragioni.

  1. Sono apparse su usenet molte domande su come far andare
     applicazioni X in remoto.

  2. Vedo molti, molti suggerimenti di ``usare xhost +hostname'' o
     perfino ``xhost +'' per permettere le connessioni X. Questo 
     ridicolmente insicuro, e ci sono metodi migliori.

  3. Non conosco un documento semplice che descriva le opzioni che uno
     davvero ha. Per favore informatemi zweije@xs4all.nl se ne sapete di
     pi.

  Questo documento  stato scritto avendo in mente sistemi di tipo unix.
  Se il vostro sistema locale o remoto  di un altro tipo, potrete
  trovare qua come vanno le cose.  Nonostante ci, dovrete tradurre da
  soli gli esempi per adattarli al vostro sistema/i.

  La versione [inglese] pi recente di questo documento  sempre
  disponibile sul WWW all'indirizzo
  http://www.xs4all.nl/~zweije/xauth.html.  anche disponibile come il
  Linux Remote X Apps mini-HOWTO all'indirizzo
  http://sunsite.unc.edu/LDP/HOWTO/mini/Remote-X-Apps. I Linux
  (mini-)HOWTO sono disponibili via http o ftp da sunsite.unc.edu. La
  traduzione italiana pu essere trovata sul sito http://pluto.linux.it
  e mirror.

  Questa  la versione 0.5.1. Non ci sono garanzie, solo buone
  intenzioni. Sono disponibile a suggerimenti, idee, aggiunte,
  indicazioni utili, correzioni tipografiche, ecc...  Tuttavia vorrei
  che questo rimanesse un documento semplice e leggibile, nello stile
  HOWTO inteso al meglio. I flame finiscono in /dev/null.

  Contenuto aggiornato l'ultima volta il 14 Luglio 1998 da Vincent
  Zweije.  Traduzione italiana a cura di Nicola Pero.


  2.  Letture Scelte

  Un documento correlato sul WWW  ``Che cosa fare quando Tk dice che il
  tuo display  insicuro'' [in inglese], http://ce-
  toolkit.crd.ge.com/tkxauth/.  stato scritto da Kevin Kenny.
  Suggerisce una soluzione all'autenticazione X simile a quella
  suggerita in questo documento (xauth). Tuttavia, Kevin ha pi come
  obiettivo di usare xdm per guidare xauth per voi.


  X System Window System Vol. 8, ``Guida dell'Amministratore di X Window
  System'' [in inglese] da O'Reilly and Associates  stato anche portato
  alla mia attenzione come una buona fonte di informazione.
  Sfortunatamente, non ho potuto provarla.


  Tuttavia un altro documento molto simile a quello che state leggendo,
  intitolato ``Rendere X Windows Sicuro'' [in inglese],  disponibile
  presso http://ciac.llnl.gov/ciac/documents/ciac2316.html.

  Potete anche provare usenet newsgroup, come comp.windows.x,
  comp.os.linux.x, e comp.os.linux.networking.


  3.  Lo Scenario

  State usando due computer. State usando l'X window system del primo
  per scrivere e guardare. State usando il secondo per fare qualche
  importante lavoro grafico. Volete far s che il secondo mostri il suo
  output sul display del primo. X window system lo rende possibile.

  Naturalmente, avete bisogno di una connessione di rete per fare ci.
  Preferibilmente una connessione veloce; il protocollo X mangia molte
  risorse di rete. Ma con un poco di pazienza e un protocollo di
  compressione adatto, potete eseguire applicazioni perfino attraverso
  un modem. Per la compressione del protocollo X, potreste voler provare
  dxpc http://ccwf.cc.utexas.edu/~zvonler/dxpc/ o LBX
  http://www.ultranet.com/~pauld/faqs/LBX-HOWTO.html
  <http://www.ultranet.com/~pauld/faqs/LBX-HOWTO.html> (anche noto come
  LBX mini-HOWTO).

  Dovete fare due cose per ottenere tutto ci


  1. Dire al display locale (il server) di accettare connessioni dal
     computer remoto.

  2. Dire all'applicazione (il client) di redirigere il suo output verso
     il display locale.


  4.  Un Poco di Teoria

  La parola magica  DISPLAY.  Nell'X window system, un display consiste
  (semplificando) di una tastiera, un mouse e uno schermo. Un display 
  gestito da un programma server, conosciuto come server X.  Il server
  mette a disposizione le capacit di visualizzazione agli altri
  programmi che si connettono a lui.

  Un display  indicato con un nome, per esempio:


    DISPLAY=light.uni.verse:0

    DISPLAY=localhost:4

    DISPLAY=:0

  Il display consiste di uno hostname (come light.uni.verse e
  localhost), due punti (:), e un numero di sequenza (come 0 e 4).
  L'hostname del display  il nome del computer dove gira il server X.
  Se l'hostname  omesso si intende il local host [computer locale]. Il
  numero di sequenza  solitamente 0 -- pu variare se ci sono pi di un
  display connessi ad un solo computer.

  Se mai vi capita di incontrare una indicazione di display con un .n in
  pi attaccato, si tratta del numero dello schermo. Un display pu in
  realt avere pi di uno schermo. Di solito tuttavia c' un solo
  schermo, che ha numero n=0, per cui questo  il default.

  Esistono altre forme di DISPLAY, ma le precedenti sono sufficienti per
  i nostri scopi.
  5.  Dirlo al Client

  Il programma client (per esempio, la vostra applicazione grafica) sa a
  quale display deve connettersi da un esame della variabile di ambiente
  DISPLAY. Tuttavia questo settaggio pu essere cambiato, dando al
  client l'argomento di linea di comando -display hostname:0 quando
  viene fatto partire. Alcuni esempi potrebbero rendere le cose pi
  chiare.

  Il nostro computer  noto al mondo esterno come light, e siamo nel
  dominio uni.verse. Se stiamo facendo andare un server X normale, il
  display  conosciuto come light.uni.verse:0. Vogliamo far partire il
  programma di disegno xfig su un computer remoto, chiamato
  dark.matt.er, e stampare il suo output qua su light.

  Supponete di avere gi fatto un telnet dentro al computer remoto,
  dark.matt.er.

  Se avete csh che sta andando sul computer remoto:



       dark% setenv DISPLAY light.uni.verse:0
       dark% xfig &




  o alternativamente:



       dark% xfig -display light.uni.verse:0 &




  Se avete sh che sta andando sul computer remoto:



       dark$ DISPLAY=light.uni.verse:0
       dark$ export DISPLAY
       dark$ xfig &




  o, alternativamente,



       dark$ DISPLAY=light.uni.verse:0 xfig &




  o, naturalmente, anche:



       dark$ xfig -display light.uni.verse:0 &




  Sembra che alcune versioni di telnet trasportino automaticamente la
  variabile DISPLAY all'host remoto. Se avete una di queste, siete
  fortunati, e non dovete settarlo a mano. Altrimenti, la maggior parte
  delle versioni di telnet trasportano la variabile d'ambiente TERM; con
  qualche hacking giudizioso  possibile "piggyback" [lett., portare
  indietro a maialino] la variabile DISPLAY sulla variabile TERM.

  La idea con il piggybacking  di prepare degli script per ottenere le
  cose seguenti: prima di fare il telnet, si attacca il valore di
  DISPLAY a TERM. Quindi si fa il telnet.  All'estremit remota, nel
  file .*shrc appropriato, si legge il valore di DISPLAY da TERM.


  6.  Dirlo al Server

  Il server non accetter connessioni da dovunque come niente fosse.
  Non volete che tutti possano visualizzare finestre sul vostro schermo.
  O leggere quello che state scrivendo -- ricordate che la tastiera 
  parte del vostro display!

  Troppa poca gente sembra realizzare che permette di accedere al
  proprio display pone a rischio la sicurezza. Qualcuno che ha accesso
  al vostro display pu leggere e scrivere sui vostri schermi, leggere
  che tasti premete, e leggere quello che fa il vostro mouse.

  La maggior parte dei server conosce due modi di autenticare le
  connessioni verso di lui: con la lista di host (xhost) e con i magic
  cookie (xauth). Infine c' ssh, la shell sicura, che pu trasportare
  le connessioni X.


  6.1.  Xhost

  Xhost permette l'accesso sulla base degli hostname. Il server mantiene
  una lista di host che hanno il permesso di connettersi a lui.  Pu
  anche disabilitare completamente il controllo degli host.  Attenzione:
  questo significa che non viene fatto nessun controllo, per cui
  qualunque host pu connettersi!

  Potete controllare la lista di host del server con il programma xhost.
  Per usare questo meccanismo nell'esempio precedente, fate:



       light$ xhost +dark.matt.er




  Questo permette tutte le connessioni dall'host dark.matt.er.  Non
  appena il vostro client X ha fatto la sua connessione e ha
  visualizzato una finestra, per sicurezza, revocate i permessi di altre
  connessioni con:



       light$ xhost -dark.matt.er




  Potete disabilitare il controllo degli host con:




  light$ xhost +




  Questo disabilita il controllo di accesso degli host e perci permette
  a chiunque di connettersi. Non dovete mai fare questo in una rete in
  cui non vi fidate di tutti gli utenti (come nel caso di Internet).
  Potete ri-abilitare il controllo degli host con:



       light$ xhost -




  xhost - da solo non rimuove tutti gli host dalla lista di accesso (il
  che sarebbe abbastanza inutile - non potreste connettervi da nessun
  host, nemmeno dal vostro host locale).

  Xhost  un meccanismo molto insicuro. Non distingue fra utenti diversi
  sull'host remoto. Ancora, gli hostname (in realt gli indirizzi)
  possono essere spoofati [=falsificati].  Questo  male se vi trovate
  in una rete di cui non fidarsi (per esempio gi con un accesso ad
  Internet con PPP, via rete telefonica).


  6.2.  Xauth

  Xauth permette l'accesso a chiunque conosca il segreto giusto.  Un
  tale segreto  chiamato codice di autorizzazione, o magic cookie
  [lett, biscottino magico]. Questo schema di autorizzazione 
  formalmente chiamato MIT-MAGIC-COOKIE-1.

  I cookie per display differenti sono memorizzati insieme nel file
  ~/.Xauthority.  Il vostro ~/.Xauthority deve essere inaccessibile al
  gruppo/ad altri utenti.  Il programma xauth amministra questi cookies,
  da cui il nomignolo xauth per questo schema di autorizzazione.

  Iniziando una sessione, il server legge un cookie dal file che 
  indicato dall'argomento -auth. Fatto questo, il server permette
  connessioni solo da client che conoscono questo stesso cookie. Quando
  il cookie in ~/.Xauthority cambia, il server non si accorger del
  cambiamento.

  Server pi recenti possono generare al volo cookies per i client che
  lo richiedono. Tuttavia i cookie sono ancora mantenuti dentro il
  server; non finiscono in ~/.Xauthority a meno che un client non li
  metta l. Secondo David Wiggins:


       Un ulteriore espediente che vi potrebbe interessare  stato
       aggiunto in X11R6.3. Attraverso la nuova estensione SECU
       RITY, il server X stesso pu generare e restituire nuovi
       cookie al volo. Per di pi, i cookie possono essere desig
       nati come ``untrusted'' [di cui non fidarsi] in modo che
       applicazioni che fanno connessioni con tali cookie avranno
       delle restrizioni nelle operazioni. Per esempio, non
       potranno rubare input di tastiera/mouse, o contenuti di
       finestre, da altri client di cui ci si fida.  C' ora un
       sottocomando ``genera'' di xauth per rendere questa funzion
       alit almeno possibile da usare, se non semplice.



  Xauth ha un chiaro vantaggio di sicurezza sopra xhost. Potete limitare
  l'accesso a utenti specifici su computer specifici. Non soffre per lo
  spoofing [falsificazione] di indirizzi come fa xhost. E se volete,
  potete ancora usare xhost insieme a xauth per permettere connessioni.


  6.2.1.  Costruire i Cookie

  Se volete usare xauth, dovete far partire il server X con l'argomento
  -auth authfile. Se usate lo script startx,  il posto giusto per
  farlo. Create una registrazione di autorizzazione, come mostrato
  sotto, nel vostro script startx.

  Passi scelti da /usr/X11R6/bin/startx:



       mcookie|sed -e 's/^/add :0 . /'|xauth -q
       xinit -- -auth "$HOME/.Xauthority"




  Mcookie  un programma minuscolo del pacchetto util-linux, sito
  primario ftp://ftp.math.uio.no/pub/linux/.  In alternativa, potete
  usare md5sum per rielaborare dei dati casuali (per esempio, presi da
  /dev/urandom o ps -axl) in formato cookie:



       dd if=/dev/urandom count=1|md5sum|sed -e 's/^/add :0 . /'|xauth -q
       xinit -- -auth "$HOME/.Xauthority"




  Se non potete editare il file startx (perch non siete root), fate
  sistemare per bene startx al vostro amministratore di sistema, o
  fategli invece mettere su xdm. Se non pu o non vuole, potete fare uno
  script ~/.xserverrc.  Se avete questo script, xinit lo esegue al posto
  del vero server X.  Poi potete far partire il vero server X da questo
  script con gli argomenti adeguati. Per fare questo, fate usare al
  vostro ~/.xserverrc la linea per i magic cookie vista prima per creare
  un cookie e quindi eseguire il vero server X:



       #!/bin/sh
       mcookie|sed -e 's/^/add :0 . /'|xauth -q
       exec /usr/X11R6/bin/X "$@" -auth "$HOME/.Xauthority"




  Se usate xdm per controllare le vostre sessioni X, potete usare xauth
  facilmente. Definite la risorsa .authDir del DisplayManager in
  /etc/X11/xdm/xdm-config.  Xdm passer l'argomento -auth al server X
  server quando parte.  Quando poi voi fate un log in sotto xdm, xdm
  mette il cookie nel vostro ~/.Xauthority per voi.  Si veda xdm(1) per
  maggiori informazioni. Per esempio, il mio /etc/X11/xdm/xdm-config
  contiene la seguente linea:



       DisplayManager.authDir: /var/lib/xdm

  6.2.2.  Transportare il Cookie

  Ora che avete incominciato la vostra sessione X sull'host server
  light.uni.verse e che avete il vostro cookie in ~/.Xauthority, dovrete
  trasferire il cookie all'host client, dark.matt.er.

  La cosa pi semplice  quando le vostre directory su light e dark sono
  condivise. I file ~/.Xauthority sono gli stessi, per cui il cookie 
  trasportato simultaneamente.  Tuttavia, c' un inganno: quando mettete
  un cookie per :0 in ~/.Xauthority, dark penser che sia un cookie per
  s stesso invece che per light.  Dovete usare un host name esplicito
  quando create un cookie; non potete tralasciarlo.  Potete installare
  lo stesso cookie sia per :0 che per light:0 con:



       #!/bin/sh
       cookie=`mcookie`
       xauth add :0 . $cookie
       xauth add "$HOST:0" . $cookie
       exec /usr/X11R6/bin/X "$@" -auth "$HOME/.Xauthority"




  Se le home directory non sono condivise, potete trasportare il cookie
  per mezzo di rsh, la shell remota:



       light$ xauth nlist :0 | rsh dark.matt.er xauth nmerge -





  1. Estrae il cookie dal vostro ~/.Xauthority locale (xauth nlist :0).

  2. Lo trasferisce a dark.matt.er (| rsh dark.matt.er).

  3. Lo mette nel ~/.Xauthority l (xauth nmerge -).

   possibile che rsh non vada bene per voi. A parte questo, rsh ha
  anche un incoveniente per quanto rigurda la sicurezza (host spoofati
  [falsificati] di nuovo, se non ricordo male). Se non potete o non
  volete usare rsh, potete anche trasferire il cookie manualmente, tipo:



       light$ echo $DISPLAY
       :0
       light$ xauth list $DISPLAY
       light/unix:0 MIT-MAGIC-COOKIE-1 076aaecfd370fd2af6bb9f5550b26926
       light$ rlogin dark.matt.er
       Password:
       dark% setenv DISPLAY light.uni.verse:0
       dark% xauth add $DISPLAY . 076aaecfd370fd2af6bb9f5550b26926
       dark% xfig &
       [15332]
       dark% logout
       light$





  Si vedano anche rsh(1) e xauth(1x) per maggiori informazioni.

  Potrebbe essere possibile fare un ``piggyback'' del cookie nella
  variabile TERM o DISPLAY quando fate un telnet all'host remoto.
  Questo funzionerebbe nello stesso modo in cui si fa il piggyback della
  variabile DISPLAY sulla variabile TERM.  Si veda la sezione 5: Dirlo
  al Client.  Dal mio punto di vista qua sono fatti vostri, ma sono
  interessato se qualcuno potesse confermarlo o negarlo.


  6.2.3.  Usare il Cookie

  Una applicazione X su dark.matt.er, come la xfig di prima, guarder
  automaticamente in ~/.Xauthority l per il cookie con cui
  autenticarsi.


  6.3.  Ssh

  Le registrazioni di autorit sono trasmesse senza crittografia.  Se
  siete anche solo impensieriti dall'idea che qualcuno possa snoopare
  [annusare] le vostre connessioni, usate ssh, la shell sicura.  Andr
  bene per trasportare X sopra connessioni crittate.  E inoltre, 
  grande anche per molti altri motivi.  un buon miglioramento
  strutturale del vostro sistema. Visitate semplicemente
  http://www.cs.hut.fi/ssh/, la home page di ssh.

  Chi conosce qualcosa d'altra sugli schemi di autenticazione o di
  crittografia delle connessioni X? Forse kerberos?


  7.  Risoluzione dei Problemi

  La prima volta che cercate di lanciare una applicazione X remota, di
  solito non funziona. Ecco qua qualche comune messaggio di errore, le
  sue probabili cause, e soluzioni per aiutarvi.



       xterm Xt error: Can't open display:




  Non c' una variabile DISPLAY nell'ambiente, e non avete neanche
  parlato all'applicazione con il flag -display. L'applicazione assume
  una stringa vuota, ma questa  sintatticamente invalida.  Per
  risolvere questo problema, assicuratevi di aver settato correttamente
  la variabile DISPLAY nell'ambiente (con setenv o export a seconda
  della vostra shell).



       _X11TransSocketINETConnect: Can't connect: errno = 101
       xterm Xt error: Can't open display: love.dial.xs4all.nl:0




  L'Errno 101  ``Network is unreachable'' [rete irraggiungibile].
  L'applicazione non ha potuto fare una connessione di rete al server.
  Controllate di avere settato correttamente DISPLAY, e che la macchina
  server sia raggiungibile dal vostro client (lo deve essere, dopotutto
  siete probabilmente loggati nel server e state facendo un telnet al
  client).

       _X11TransSocketINETConnect: Can't connect: errno = 111
       xterm Xt error: Can't open display: love.dial.xs4all.nl:0




  L'Errno 111  ``Connection refused'' [Connessione rifiutata].  La
  macchina server a cui state cercando di connettervi  raggiungibile,
  ma l il server indicato non esiste.  Controllate di stare usando
  l'host name giusto e il numero di display giusto.



       Xlib: connection to ":0.0" refused by server
       Xlib: Client is not authorized to connect to Server
       xterm Xt error: Can't open display: love.dial.xs4all.nl:0.0




  Il client ha potuto fare una connessione al server, ma il server non
  permette al client di usarlo (non  autorizzato).  Assicuratevi di
  avere trasportato il magic cookie corretto al client, e che non sia
  espirato (il server usa un nuovo cookie quando incomincia una nuova
  sessione).









































  Saving Space mini-HOWTO
  di Guido Gonzato,  <mailto:guido@ibogeo.df.unibo.it>
  v1.0.1, 7 aprile 1999

  Questo mini-HOWTO vuole dare dei consigli per far stare la tua instal
  lazione di Linux in uno spazio il pi piccolo possibile.  rivolto
  specialmente agli utilizzatori di notebook. Traduzione di Mariani
  Dario,  <darkpand@uni.net>

  1.  Introduzione


  Ho un notebook su cui ho installato Linux, insieme a Windows 95 che
  era pre-installato. Ho ristretto la partizione di Windows a 500 Mb,
  facendo cos spazio a una di tipo Linux da 240 Mb. Per quanto possa
  sembrare piccola, sono riuscito a installare un sistema Linux
  pressoch completo, basato sulla Red Hat 4.1 e su qualche trucco per
  liberare pi spazio possibile.

  Se hai bisogno di spazio, le indicazioni che troverai nella sezione
  seguente possono liberare una considerevole fetta del tuo hard disk.
  L'unico avvertimento che ti voglio dare  questo: non dare la colpa a
  me se qualcosa va storto! Utilizzeremo un paio di programmi che per me
  hanno funzionato bene, ma che sono pericolosi. Sei stato avvertito.


  2.  Requisiti di sistema


  Hai bisogno di:


    Un sistema Linux completamente funzionante (qualunque versione
     dovrebbe andare bene);

    la comune utility di compressione gzip, o alternativamente bzip2
     che puoi trovare all'indirizzo
     <ftp://sunsite.unc.edu:/pub/Linux/utils/compress>;  questo
     strumento comprime meglio dello gzip, ma  anche un poco pi lento
     e consuma pi memoria;

    il compressore di eseguibili upx, le cui home page sono
     all'indirizzo  <http://cdata.tvnet.hu/~ml/upx.html> e
     <http://wildsau.idv.uni-linz.ac.at/mfx/upx.html>;

    il pacchetto zlibc, disponibile all'indirizzo
     <ftp://sunsite.unc.edu:/pub/Linux/libs/compression>. Si chiama
     zlibc-X.X.tar.gz, dove X.X  l'ultima versione.

  Ci sono altri compressori di eseguibili. Uno  gzexe (dimenticalo),
  mentre tcx era probabilmente il migliore prima che upx fosse
  disponibile; ancora un altro  tzx, in teoria migliore di tcx. Il
  fatto  che ha rovinato tutto su un PC "di scorta", bench io non sia
  sicuro di aver fatto qualcosa di sbagliato.  Ti conviene utilizzare
  upx:  sicuro, efficiente, e molto utile. Vai sul sicuro.


  3.  La procedura




  3.1.  Rimuovere i sorgenti del kernel



  I sorgenti del kernel occupano pi di 20 Mb, e potresti volerli
  rimuovere.  Se  cos, ti suggerisco di compilare un nuovo kernel
  adattato alla tua macchina una volta per tutte, e poi cancellare i
  sorgenti. Comunque, fai attenzione.


  Non ti raccomando di rimuovere i sorgenti del kernel finch non sei
  sicuro che la tua macchina sia correttamente configurata. Inoltre, ti
  servono i #include del kernel per compilare i programmi in C. Pensaci
  due volte!

  Se decidi di farlo, non rimuovere l'albero include/linux a meno che
  non sia sicuro che non compilerai mai applicazioni sulla tua macchina.


  3.2.  Togliere applicazioni


  Ora, decidi di quali applicazioni hai veramente bisogno. Qualcuna pu
  dimostrarsi ridondante: per esempio, sei sicuro di non poter vivere
  senza emacs? Puoi utilizzare jed al suo posto.

  Sta a te decidere cosa vuoi tenere. Qualche consiglio generale:

    gcc  un pacchetto molto grande.  richiesto per ricompilare il
     kernel e tutte le applicazioni per cui non ci sono binari Linux
     pre-compilati.   necessario, ovviamente, se scrivi tuoi programmi
     in C o in Fortran (con f2c o g77); considera i tuoi bisogni prima
     di rimuoverlo.  Altri compilatori come lcc sono buoni, ma non al
     livello di gcc.  Ti suggerisco di tenerlo;

    X11  terribilmente grande, ma  una bella cosa da avere. Se decidi
     di non potervi rinunciare, almeno cerca di farlo con il minimo
     indispensabile: solo l'X server giusto, un semplice window manager,
     solo un xterm, nessun font a 100 dpi, e cos via;

    TeX e i pacchetti che lo accompagnano sono veramente molto grandi.
     Lasciar stare il LaTeX e utilizzare il TeX semplice fa risparmiare
     molto spazio; togliere i visualizzatori per X11 come xdvi e
     ghostview  possibile utilizzando dvitty, dvivga e simili.
     L'eliminazione del software dvi per X11 pu rendere anche X11
     ridondante;

    i giochi non sono mai ``necessari''.



  3.3.  Ridurre i binari


  Cominciamo riducendo l'ampiezza dei binari. Spostati in /usr/bin e
  digita il comando



       machine:/usr/bin# strip *




  che toglier i simboli contenuti nei binari. ripeti questo passo in
  /usr/X11R6/bin/ e altre directory che potresti avere che contenegono
  eseguibili (non dimenticare di trovare i binari di TeX e gcc), ma non
  eseguirlo in /sbin, /bin, o /usr/sbin/ se ti sta a cuore la tua
  installazione!

  3.4.  Comprimere con upx


  Prima di tutto, installa upx e leggi la sua documentazione. Poi
  spostati in /usr/bin e avvialo con il comando upx *; comprimer tutti
  gli eseguibili, includendo i suid (tcx non lo avrebbe fatto).  Ripeti
  questo passo nelle altre directory come visto sopra.

  Ricordati di comprimere gli eseguibili ogni volta che installi un
  nuovo pacchetto!



  3.5.  Gzippare


  Ci sono molti altri file che possono essere compressi una volta e per
  sempre.  Cominciamo con /usr/doc/; spostati in questa directory e
  digita il comando



       machine:/usr/doc# find . -type f -exec gzip -9 {} \; 2> /dev/null




  Ricorda di comprimere i documenti ogni volta che installi un nuovo
  pacchetto!

  Ripeti questo passo nella directory contenente la documentazione per
  il TeX (sul mio sistema, /usr/lib/texmf/texmf/doc/). Se sei veramente
  sicuro, cancella del tutto queste directory.

  Ora, installa zlibc e compilalo. Se il tuo sistema  come il mio, la
  compilazione fallir lamentando la mancanza di una libc statica.  Non
  ti preoccupare; troverai un file chiamato uncompress.o che  quello
  che ci serve. Spostalo in /usr/local/lib/ e aggiungi questa linea al
  tuo /etc/profile:



       export LD_ELF_PRELOAD=/usr/local/lib/uncompress.o




  Ora, puoi comprimere con gzip non solo la documentazione, ma anche i
  file di dati: le applicazioni che li usano potranno utilizzarli
  ugualmente.  In teoria, il trucco dovrebbe funzionare con la maggior
  parte delle applicazioni, ma in pratica il tuo grado di successo pu
  variare. Il mio  stato piuttosto basso.



  4.  Un esempio dalla vita reale


  Questo  il risultato ottenuto applicando i procedimenti di cui sopra
  ad una delle mie macchine.  Prima del trattamento, df riportava
  398.798 blocchi da 1024 byte utilizzati:


    non ho rimosso i sorgenti e gli header del kernel;


    ho disinstallato molte applicazioni e tutti i giochi, ma ho
     lasciato X11, sviluppo X11, sviluppo C e Fortran, Tcl/Tk, strumenti
     di rete, e poche altre applicazioni standard. df ha riportato
     244.668 blocchi usati;

    ho eseguito upx in /usr/bin, /usr/X11R6/bin,
     /usr/lib/texmf/bin/i586-linux, e /usr/lib/gcc-
     lib/i386-linux/2.7.2.1: 226.270 blocchi usati;

    ho compresso la documentazione in /usr/doc e
     /usr/lib/texmf/texmf/doc: 198.745 blocchi usati.

  Per riassumere, ho cominciato con 398.798 blocchi e ho finito con
  198.745.  Pensa alle cose che puoi mettere in questi 200.000 blocchi
  risparmiati!  Avrei potuto risparmiarne ancora di pi se avessi usato
  bzip2 invece di gzip.

  In media, se fai attenzione fin dall'inizio e installi solo le
  applicazioni necessarie, comprimere gli eseguibili e i documenti pu
  farti liberare alcune decine di Mb. Su un notebook, ci pu essere
  veramente utile..



  5.  La fine



  5.1.  Copyright (in inglese)

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors. Linux HOWTO documents may be reproduced and
  distributed in whole or in part, in any medium physical or electronic,
  as long as this copyright notice is retained on all copies. Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may not produce a derivative work from a HOWTO and impose
  additional restrictions on its distribution. Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO coordinator at the address given below.

  In short, we wish to promote dissemination of this information through
  as many channels as possible. However, we do wish to retain copyright
  on the HOWTO documents, and would like to be notified of any plans to
  redistribute the HOWTOs.

  If you have questions, please contact Tim Bynum, the Linux HOWTO
  coordinator, at tjbinum@sunsite.unc.edu via email.


  5.2.  Liberatoria


  ``Saving Space mini-HOWTO''  stato scritto da Guido Gonzato,
  <REMOVE_MEguido@ibogeo.df.unibo.it>.

  Questo documento  fornito ``cos com'''. Ho posto grandi sforzi
  nello scriverlo il pi accuratamente che mi fosse possibile, ma
  utilizzi le informazioni contenute in esso a tuo rischio. In nessun
  caso posso essere responsabile per qualsiasi danno dovuto all'uso di
  questa opera.


  I commenti sono i benvenuti. Per ogni richiesta, suggerimento,
  insulto, ecc., ritieniti libero di contattarmi.

  Goditi Linux e la vita,

  Guido   =8-)




























































  Sendmail address rewriting mini-HOWTO
  Thomas Roessler, roessler@guug.de
  v0.0, 6 maggio 1998

  Questo documento  una breve descrizione di come impostare il file di
  configurazione di sendmail per un uso casalingo con una connessione
  dial-up.  Traduzione a cura di Lorenzo Pulici, lorenzo.pulici@usa.net

  1.  Introduzione

  Si assume che abbiate il tipo di accesso ad Internet che sembra
  attualmente essere il pi comune alle universit e per i servizi
  online: utilizzate PPP con una connessione seriale per accedere alla
  rete del vostro provider. La vostra posta in arrivo viene presa dal
  server POP o IMAP del provider, mentre i messaggi in uscita verranno
  inviati tramite SMTP. Non disponete di un nome di dominio di vostra
  propriet, per cui tutto utilizza un indirizzo unico.


  Si assume che sia installata sul vostro sistema una versione
  sufficientemente aggiornata di sendmail di Eric Allman (la versione
  8.8.8  l'ultima al momento della stesura di questo documento e
  funziona correttamente).


  Questo documento si riferisce in parte a propriet specifiche dei
  sistemi Debian/GNU Linux; gli utenti di altre distribuzioni dovranno
  averne particolare cura.


  Accertatevi di avere a portata di mano le seguenti informazioni:


    il server di posta del vostro ISP

    il vostro indirizzo di posta Internet



  La configurazione che si sta progettando ha due obiettivi principali:


  1. Possibilit di inviare posta tra i vari utenti locali

  2. Il mondo esterno deve vedere gli indirizzi di posta dell'ISP e non
     quelli locali.


  Per raggiungerli, si usufruir della feature genericstable di
  sendmail.


  2.  Mappa dei file

  Tutti i file di configurazione di sendmail verranno messi in una
  directory separata, /etc: /etc/mail. Normalmente, sendmail si aspetta
  di trovare questi file direttamente in /etc.  Per evitare problemi
  /etc/sendmail.cf dovr essere un link simbolico a
  /etc/mail/sendmail.cf.


  Questi sono i file che affollano /etc/mail:

    aliases -contiene ulteriori indirizzi locali


    genericsdomain - contiene alcune informazioni sulla configurazione
     del vostro host locale

    genericstable - contiene le attuali regole di riscrittura

    sendmail.cf - file di configurazione di sendmail

    sendmail.mc - il sorgente di sendmail.cf.

  Alcuni di questi file saranno accompagnati da file .db.  Questi file
  contengono database hash per l'uso diretto da parte di sendmail.


  Si assume che la parte cf del tree dei sorgenti di sendmail risieda in
  una directory denominata /usr/lib/sendmail.cf.  Questo  il caso dei
  sistemi Debian GNU/Linux.  Altre distribuzioni potrebbero porre questi
  file in altre posizioni.  Consultate la documentazione della vostra
  distribuzione per maggiori informazioni.


  3.  Configurare sendmail

  3.1.  Il file principale di configurazione

  Sendmail usa un sistema di regole dall'elevata complessit per la sua
  configurazione. Anche se  possibile eseguire una gran quantit di
  trucchetti in questo modo, scrivere da zero un file sendmail.cf 
  piuttosto insolito e porta via molto tempo.  Se siete tuttavia
  interessati, allora smettete di leggere questo documento adesso per
  iniziare invece il "Bat Book" della O'Reilly.


  Invece di mettere a punto manualmente queste regole, ci si affider al
  processore di macro m4 per costruire la configurazione, partendo dalle
  parti gi pronte distribuite con sendmail.



  Si dia un'occhiata alle prime righe del file sendmail.mc:


  ______________________________________________________________________
  include(/usr/lib/sendmail.cf/m4/cf.m4)
  VERSIONID(`sendmail.mc - roessler@guug.de')
  OSTYPE(debian)
  define(`ALIAS_FILE',`/etc/mail/aliases')
  ______________________________________________________________________



  All'inizio viene incluso cf.m4.  Questo file macro di m4 contiene
  numerose definizioni macro per il resto del file. Ci si assicuri di
  inserire il percorso corretto - quello qui presente  tipico per una
  distribuzione Debian GNU/Linux.  La macro OSTYPE viene utilizzata per
  dare alcune opzioni di default utili per determinati valori di
  configurazione. Se non si utilizza un sistema Debian, sostituire la
  parola "debian" con "linux".  ALIAS_FILE dice a sendmail dove trovare
  la lista degli alias.


  Le righe seguenti indicano a sendmail di utilizzare la feature
  genericstable, e dove trovare i file di configurazione necessari per
  usufruirne:



  ______________________________________________________________________
  FEATURE(masquerade_envelope)
  FEATURE(genericstable, `hash -o /etc/mail/genericstable')
  GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')
  ______________________________________________________________________


  La feature masquerade_envelope indica a sendmail di applicare la
  riscrittura degli header al mittente dell'envelope di un messaggio.
  Questo  l'indirizzo di posta al quale i sottosistemi di consegna
  della posta indirizzeranno i loro rapporti di mancata consegna e i
  messaggi di avvertimento.  I file generics* verranno illustrati pi
  sotto.


   ora necessario definire un cosiddetto "smart host", vale a dire, una
  macchina che gestir la posta in uscita dal vostro sistema.  Questa
  macchina pu non essere lo stesso server POP o IMAP del vostro ISP. Se
  avete dubbi contattate l'assistenza.  Il codice del file principale di
  configurazione:

  ______________________________________________________________________
  define(`SMART_HOST',`postainuscita.mio.provider')
  ______________________________________________________________________


  Sostituire postainuscita.mio.provider con il nome qualificato (FQDN)
  del server del vostro ISP.


  Le due ultime righe includono la definizione "mailer", necessaria a
  sendmail per sapere in che modo gestire i diversi tipi di posta:

  ______________________________________________________________________
  MAILER(local)
  MAILER(smtp)
  ______________________________________________________________________




  Per generare il file sendmail.cf partendo da questo sendmail.mc,
  digitare da root i seguenti comandi:

  ______________________________________________________________________
  # m4 sendmail.mc > _sendmail.cf
  # mv -f _sendmail.cf sendmail.cf
  ______________________________________________________________________



  Si noti la tecnica di scrivere l'output di m4 su di un file temporaneo
  che verr successivamente spostato nella giusta locazione. Ci
  impedisce a sendmail di leggere file di configurazione scritti solo
  parzialmente.


  3.2.  Riscrittura degli indirizzi.

  Prima di tutto,  necessario far conoscere a sendmail quali sono da
  considerarsi locali (e perci soggetti a riscrittura). Operazione
  molto semplice:  sufficiente inserire il nome qualificato (FQDN)
  della vostra macchina nel file /etc/mail/genericsdomain.  Per
  conoscere il nome qualificato del vostro host, digitare il seguente
  comando:

  ______________________________________________________________________
   $ hostname -f
  ______________________________________________________________________




  Si arriva finalmente alla tabella di riscrittura:
  /etc/mail/genericstable.  Questo file consiste di due colonne,
  separate da spazi vuoti. La prima colonna contiene l'indirizzo locale,
  la seconda l'indirizzo e-mail che dovr sostituirlo.  Il file potrebbe
  assomigliare a questo:


  ______________________________________________________________________
  harry   harryx@your.isp
  maude   maudey@her.isp
  root    fredx@your.isp
  news    fredx@your.isp
  ______________________________________________________________________




  Deve esserci una riga per ogni account presente sulla macchina locale,
  cosicch la posta generata automaticamente diretta esternamente alla
  macchina riporter negli headers le informazioni corrette.


  Per motivi di prestazioni, sendmail non utilizza direttamente questo
  file di testo, ma si affida ad una versione "hashed". per generarla,
  digitare il seguente comando.



  ______________________________________________________________________
  # makemap -r hash genericstable.db < genericstable
  ______________________________________________________________________




  Si noti che le regole di riscrittura della genericstable non saranno
  applicate alla posta locale o a quella in arrivo dall'esterno - la
  mappatura viene usata unicamente se un messaggio lascia il vostro
  sistema verso lo smart host del vostro ISP.


  3.3.  Aliases

  Il file degli aliases contiene nomi locali addizionali validi
  unicamente per messaggi locali.  utile per account amministrativi
  quali root che ricevono posta generata  automaticamente dal vostro
  sistema.


  Un punto di partenza per il vostro /etc/mail/aliases potrebbe
  assomigliare a questo file:








  ______________________________________________________________________
  root: fred
  news: root
  postmaster: root
  mail: root
  www: root

  nobody: /dev/null
  MAILER-DAEMON: nobody
  ______________________________________________________________________



  In questo esempio, la posta locale per gli utenti root, news,
  postmaster, mail, e www verr inoltrata a  fred, mentre quella per
  nobody e MAILER-DAEMON verr rediretta a /dev/null.


  Come per genericstable, aliases potrebbe avere parecchie righe.  Per
  questo motivo, sarebbe ancora una volta inefficiente un uso del file
  di testo cos descritto da parte di sendmail. Viene allora applicato
  il medesimo meccanismo per genericstable anche con aliases: si genera
  un hashed database.  Invece di invocare direttamente makemap, 
  possibile digitare stavolta il comando newaliases, che si preoccuper
  da solo di fare il lavoro necessario.


  4.  Letture consigliate

  La distribuzione dei sorgenti di sendmail include una certa
  documentazione. Leggere soprattutto il file cf/README.


  Se il vostro interesse  di approfondire ancora di pi le opzioni di
  configurazione di sendmail, procuratevi il "Bat Book" della O'Reilly:
  Bryan Costales, Eric Allman, e Neil Rickert: "sendmail".  O'Reilly,
  1993.





























  Small Memory Mini-HOWTO v0.1
  di: Todd Burgesst, burgess@uoguelph.ca


  1.  Introduzione

  Lo scopo di questo mini HOWTO  descrivere come far funzionare Linux
  su un sistema dotato di una piccola quantit di memoria. Assumendo che
  comprare pi memoria sia fuori discussione, ci sono molti accorgimenti
  che si possono usare per ridurre la richiesta di memoria in Linux.


  Molte distribuzioni sono piuttosto esose dal punto di vista della
  richiesta di memoria. Lanciano servizi e offrono configurazioni che la
  maggior parte di noi non user mai. Rimuovendo molti di questi servizi
  si possono liberare alcuni megabyte di memoria.


  Il mio sistema  un 486DX2-66 con 12MB di memoria fisica e 12MB di
  swap. Ha fatto girare Linux negli ultimi 3 anni abbastanza bene e
  spero che continui a farlo per molti altri anni. :)


  2.  Il kernel di Linux

  Tutti i kernel che si trovano nelle distribuzioni sono piuttosto
  gonfiati e contengono caratteristiche di cui nessuno di noi avr
  bisogno o user. Se non avete ricompilato il kernel, siete fortemente
  raccomandati di farlo.  Come ricompilare il kernel  al di l degli
  scopi di questo documento ma ci sono molti ottimi libri di Linux e
  manuali che trattano questo argomento in profondo dettaglio.


  Se ricompilate il kernel ricordatevi di inserire solo le
  caratteristiche di cui avete realmente bisogno. Per esempio: quanti di
  voi hanno incluso il supporto per PLIP nel kernel? Quanti di coloro
  che lo hanno incluso lo utilizzano realmente? Un kernel pi ridotto
  richiede meno tempo per essere caricato, usa meno memoria e meno cicli
  di CPU.


  Un altro punto importante: i moduli. Personalmente non li uso perch
  li trovo scomodi. Se li usate e vi piacciono, possono aiutare a
  "sgonfiare il kernel".


  3.  Console virtuali (VC)

  Le VC sono un ottimo modo per liberare memoria. La maggior parte delle
  distribuzioni ne usa circa 6. In media, far girare 6 VC richiede circa
  4MB di memoria. Eliminarne un paio pu liberare un paio di MB di
  memoria.


  La maggior parte degli utenti se la cava anche con solo 3 o 4 VC.
  Quante rimuoverne dipende dalle proprie personali preferenze.
  Ricordatevi solo che meno ne girano, pi memoria sar a disposizione
  delle applicazioni.


  Il file che rivela quante VC vengono caricate  /etc/inittab. Per
  rimuovere VC:


  1. Aprite /etc/inittab con un editor di testo

  2. Cercate una linea simile a questa (la cosa importante  che inizi
     con c1): c1:12345:respawn:/sbin/getty tty1 38400 linux.  Iniziate
     dal numero pi alto (per esempio c6) e commentatelo inserendo un
     '#' nella prima colonna. Ripetete questo passo tante volte quante
     necessario. Ricordate che ogni linea che commentate  una VC in
     meno.

  3. Riavviate il sistema perch i cambiamenti abbiano effetto.


  4.  Demoni

  Molte distribuzioni attivano molti demoni che la maggior parte di noi
  non utilizzer mai. La maggior parte di questi demoni sono lanciati
  con degli script. Dove si trovano questi script e come vengono
  chiamati dipende dalla distribuzione. Gli script di inizializzazione
  di Slackware si trovano in /etc/rc.d/rc.*.


  Prima di procedere,  data per scontata una conoscenza della
  programmazione in shell di unix. Se per non siete pratici a scrivere
  shell script, ci che segue  probabilmente la pi veloce introduzione
  alla programmazione di shell script mai scritta.


  Considerate il seguente esempio



       ______________________________________________________________________
       #!/bin/sh
       echo "hello world"
       #echo "addio mondo crudele"
       ______________________________________________________________________





  Visualizzer la stringa "hello world". Gli shell script devono
  contenere "#!/bin/sh" nella prima linea. Dopo quella, ogni linea 
  eseguita come se l'aveste inserita da tastiera (potete pensare che gli
  shell script non siano niente di pi che delle macro un po' in
  grande).


  Le linee che iniziano con un '#' si dice che sono commentate perch
  non vengono eseguite dalla shell. La maggior parte degli script di
  inizializzazione quando caricano demoni assomigliano a



       ______________________________________________________________________
       if qualchecondizione
        do qualcosa
       fi
       ______________________________________________________________________





  Quello che dovete fare  commentare ogni linea che inizia con
  l'espressione if e finisce con fi


  Se volete capire dove viene caricato un demone, ci che dovete fare 
  cercare nello script di inizializzazione il nome del demone. Se
  volessi trovare dove  caricato inetd in Slackware, farei cos:


  1.


       ______________________________________________________________________
       cd /etc/rc.d
       ______________________________________________________________________




  2.


       ______________________________________________________________________
       grep -n inetd rc.*
       ______________________________________________________________________





  4.1.  inetd

  inetd permette di fare cose come telnet, ftp e inviare richieste di
  talk alle vostre macchine. Se non usate mai il vostro sistema come
  server o non avete bisogno di accedere ad alcuno di questi servizi
  remotamente, allora potete rimuovere inetd


  4.2.  lpd

  lpd  usato per stampare file sulla vostra stampante usando il comando
  lpr. Se non stampate mai sulla vostra macchina Linux potete rimuovere
  lpd. Se avete una stampante HP Deskjet e volete stampare, vi
  raccomando fortemente il pacchetto che ho creato, chiamato dj-
  printcap.  disponibile presso:
  ftp://sunsite.unc.edu/pub/Linux/system/Printing/dj-printcap.tar.gz


  4.3.  nfs e mountd

  Questi due demoni sono usati per far funzionare un server NFS. Se non
  usate mai la vostra macchina Linux come server NFS, potete
  tranquillamente rimuovere questi due demoni.


  4.4.  portmap

  Il demone portmap  usato per gestire i servizi RPC. Se non usate un
  server NFS o qualche altro programma RPC, potete rimuovere portmap.


  4.5.  sendmail

  sendmail  un altro demone che richiede abbastanza memoria. Se non
  usate mai la vostra macchina Linux come stazione per inviare e-mail o
  non ricevete posta sulla macchina Linux, potete probabilmente
  rimuovere sendmail. Se invece inviate e-mail dalla macchina Linux, la
  maggior parte dei client di posta possono essere configurati in modo
  tale da inviare le e-mail attraverso un altro server di posta.

  4.6.  altri

  Ci potrebbero essere altri demoni che il vostro sistema lancia e che
  voi non usate. Rimuovete quelli che pensate di dovere rimuovere. Due
  demoni che invece devono rimanere attivi sono syslogd e klogd.


  5.  Conclusioni

  Questo documento illustra i passi che ho intrapreso per ridurre la
  richiesta di memoria sulla mia macchina Linux. Spero di avervi dato
  qualche buona dritta su cosa potete fare con la vostra macchina Linux
  per conservarne la memoria.


  Buona fortuna e happy hacking!  Todd Burgess

  tburgess@uoguelph.ca http://eddie.cis.uoguelpg.ca/~tburgess

  Traduzione a cura di Marco Cova marcocova@infinito.it














































  Sound Blaster AWE 32/64 HOWTO
  di Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
  v1.2, 11 gennaio 1998, tradotto il 2 agosto 1998

  Questo documento descrive come installare e configurare una Sound
  blaster 32 (SB AWE 32, SB AWE 64) della Creative Labs inc. sotto Linux
  utilizzando l'Awe Sound Driver Extension scritto da Takashi Iwai.
  Viene trattato inoltre l'utilizzo di tools e player particolari per la
  serie AWE della SB. Il sistema operativo di riferimento utilizzato per
  questo HOWTO  Debian GNU/Linux System, ma dovrebbe funzionare su ogni
  altra distribuzione Linux. Traduzione di Samuele Tonon<Samuele Tonon>

  1.  Introduzione



  Questo  il Sound Blaster AWE HOWTO. D dettagliate informazioni per
  utilizzare al meglio la vostra SB 32 (o superiore), compresa la
  sintesi Wave Table. Questo documento copre tutte le SB da SB32 in su.

  La serie Soundblaster  molto conosciuta negli ambienti DOS e WINDOWS,
  e molti utenti Linux vogliono poterla utilizzare al meglio sotto
  Linux.  Sfortunatamente, la Creative Labs non supporta driver per
  Linux e quindi non risulta facile installarla e configurarla.  Questo
  documento prova a descrivere come utilizzare al meglio la vostra SB in
  ambiente Linux.


  1.1.  Ringraziamenti


  Questo documento  la traduzione del Sound Blaster AWE 32/64 HOWTO di
  Marcus.Brinkmann <mailto:Marcus.Brinkmann@ruhr-uni-bochum.de>

  Molto lavoro di questo HOWTO  stato fatto da  Hannu Savolainen
  <http://www.4front-tech.com/usslite> che ha sviluppato il sound driver
  del kernel di Linux.

  Vorrei ringraziare Nicola Bernardelli <mailto:n.bern@mail.protos.it>
  per aver testato questo HOWTO sulla AWE64; senza di lui molti errori
  non sarebbero emersi.


  1.2.  Nota per la versione italiana


  La versione italiana  stata liberamente tradotta il 2 Agosto 1998.
  Contiene alcune correzioni rispetto alla versione Inglese (approvate
  dall'autore) e alcune aggiunte per gli utenti Debian 2.0 (hamm) e
  Redhat 5.0.

  Desidero ringraziare l'autore per la gentilezza e l'aiuto offerto e il
  Pluto User Group per lo sforzo che sta facendo nel portare Linux anche
  a chi  l'Inglese non lo "mastica"  bene.

  Desidero anche ringraziare Giovanni Bortolozzo
  <mailto:borto@pluto.linux.> per l'aiuto e i consigli per la versione
  SGML di questo documento.


  1.3.  Politica di distribuzione



  Includo qui di seguito la versione inglese della politica di
  distribuzione degli HOWTO seguita da una traduzione in italiano.
  Copyright by Marcus Brinkmann.

  This HOWTO is free documentation; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This document is distributed in the hope that it will be useful, but
  without any warranty; without even the implied warranty of
  merchantability or fitness for a particular purpose.  See the GNU
  General Public License for more details.

  You can obtain a copy of the GNU General Public License by writing to
  the Free Software Foundation <http://www.fsf.org>, Inc., 675 Mass Ave,
  Cambridge, MA 02139, USA.


  Questo HOWTO  una documentazione gratuita;  possibile ridistribuirla
  e/o modificarla nei termini del GNU General Public License come
  pubblicato dalla Free Software Foundation; tale discorso vale per
  questa e future versioni.  Riferimenti al GNU General Public License
  per maggiori dettagli.

   possibile ottenere una copia della GNU General Public License
  scrivendo a Free Software Foundation <http://www.fsf.org>, Inc., 675
  Mass Ave, Cambridge, MA 02139, USA.



  2.  Prima di iniziare




  2.1.  Introduzione


  Questo documento spiega l'installazione di una SB 32AWE/64AWE sotto
  Linux come piattaforma si  utilizzato un Intel 586 con Debian
  GNU/Linux <http://www.debian.org> tuttavia dovrebbe funzionare su
  tutte le altre distribuzioni supportate dal Linux Sound driver (le
  differenze saranno menzionate dove necessario).

  Questo documento presuppone la conoscenza del Sound-HOWTO e viene
  considerato alla stregua di un'appendice di quest'ultimo.  possibile
  trovare versioni tradotte in italiano degli HOWTO e dei mini HOWTO nel
  database del pluto user group
  <http://www.pluto.linux.it/ildp/HOWTO/index.html>.


  2.2.  Note generali sulle schede SB AWE


  La scheda SB AWE32/64 fornisce supporto audio, sintetizzazione
  OPL-2/OPL-3, una porta MPU-401 MIDI e 32/64 voci EMU 8000 Wave Table
  Synthesis (per una delucidazione su questi e altri termini consultare
  il Linux Sound HOWTO).  Uno scopo di questo documento  aiutare
  l'utente a fare funzionare tutto questo "bagaglio" di roba :-).

  Il problema per un utente Linux utilizzando la SB 64 AWE  che le 32
  voci Addizionali - rispetto alla SB 32 AWE - sono generate via
  software e mandate in output via audio normale (cio alla stregua di
  un WAVE).  Poich la Creative Labs non vede mercato nel realizzare
  driver per Linux, le uniche guide per la Wave Synthesis sono
  disponibili solo per win 3.1 e 95.

  Questo vuol dire, dal punto di vista dell'utente Linux, che la SB32 e
  la SB64 sono formalmente identiche.  D'ora in poi si far riferimento
  alla SB AWE in generale e verranno menzionate le differenze dove (e
  se) sussisteranno.


  2.3.  Note sulle schede PnP (Plug and Play)


  Le moderne schede per piattaforma Intel sono ISA PnP. Questo
  significa, che la scheda deve essere configurata dal sistema
  operativo, e che questo deve essere fatto nella fase di boot, nelle
  routine d'inizializzazione.  In generale ci sono tre modi per fare
  ci:


  1. Si monta un BIOS PnP, il che vuol dire che pu configurarle
     direttamente lui. Se pensate di poter utilizzare tutte le
     prestazioni della SB AWE solo perch avete un PnP BIOS siete fuori
     strada. Anche se Il BIOS "dichiara" di supportare le schede PnP
     altro non fa che inizializzare le porte e gli indirizzi utilizzati
     dalla vostra scheda.  Sarete al massimo in grado di ascoltare file
     di tipo Wave ma non sarete in grado di ascoltare MIDI. Per questa
     ragione un BIOS PnP non  una garanzia.

  2.  Avete un sistema operativo che supporta il PnP. L'attuale kernel
     stabile di Linux (2.0.x) non lo supporta, quindi bisogner
     attendere successive release che lo supportino.

  3. Avete un'utility che inizializza le schede PnP e che viene caricata
     al boot: questo  il metodo che utilizzeremo in questo HOWTO.

  Il software pi utilizzato per inizializzare schede PnP in Linux sono
  gli Isapnptools. Sono un facile strumento per inizializzare tutte le
  vostre Schede PnP, non solo la vostra scheda sonora.


  2.4.  Note generali sul caricamento dei moduli del kernel


  Alcuni driver di periferica possono essere caricati nel kernel come
  moduli.   possibile trovare maggiori informazioni sui moduli nel
  Kernel HOWTO e nel Module HOWTO ( consigliabile leggerli per avere
  maggior chiarezza di ci che dovrete fare).

  Se avete una scheda sonora PnP, dovete installare il "sound support"
  come modulo.  Cio non potete compilare il supporto sonoro all'interno
  del kernel stesso ma dovete includerlo come modulo; il motivo 
  semplice: il kernel viene caricato prima che che la scheda possa
  essere configurata mentre essa deve essere configurata con i driver
  dopo che il kernel sia stato caricato e che quindi isapnp venga
  eseguito.

  Il sound kernel module pu essere caricato manualmente con il comando
  insmod sound oppure modprobe -a sound o nello script di boot del
  vostro Linux (in Debian  sufficiente aggiungere la linea sound in
  /etc/modules). Un altro modo  di lanciare kerneld un daemon che
  installa e rimuove i moduli (consultare i relativi HOWTO e le man
  pages per maggiori informazioni).

  PS: kerneld non  la migliore soluzione per il modulo AWE driver,
  perch il driver impiega molto tempo a caricarsi (in particolar modo
  se avete la Wave Table synthesis che carica molti "font" sonori).
  Kerneld rimuove automaticamente i moduli non usati, dopo un minuto di
  default ecco perch  forse meglio inserire il modulo sonoro
  manualmente o nella procedura di boot.  Inserire manualmente il modulo
  oppure metterlo nella procedura di boot previene kerneld dal
  rimuoverlo quando questo  ozioso (idle).  Comunque potete utilizzare
  tutti e due i metodi poich non creano conflitti l'uno con l'altro.

  Questo  particolarmente utile se le impostazioni del vostro mixer
  vengono disturbate dal rimuovere-installare il sound module. Una
  soluzione al problema verr data nella sezione ``MIXER'' (l verr
  descritto come far partire in automatico il mixer quando il sound
  module viene caricato).  Insomma  meglio utilizzare delle procedure
  anzich lasciar fare tutto a kerneld.


  2.5.  Note generali sui driver sonori del kernel


   possibile installare il supporto sonoro all'interno del kernel
  stesso oppure come modulo.  Se avete una scheda PnP dovete installarlo
  come modulo (come gi detto) perch isapnp deve configurare la scheda
  prima che il driver venga caricato.

  Come si pu immaginare bisogner ricompilare il kernel.  Il kernel
  corrente viene rilasciato senza supporto per il chip AWE ma con
  supporto per la sb16 normale.  In questo modo non  possibile
  ascoltare midi con la Wave Table Syntesys.

  Se volete utilizzare la Wave Table Syntesys, potete comprare un driver
  commerciale da 4Front Technologies <http://www.4front-tech.com> oppure
  aggiungere al vostro kernel l'AWE 32 Sound Driver Extension by Takashi
  Iwai.In questo documento si assume l'utilizzo di quest'ultimo.  L'AWE
  32 Sound Driver Extension  pubblicato con licenza GNU copyright e
  venduto con alcune applicazioni per l'utilizzo dell'AWE driver.  L'AWE
  driver (awedrv)  gi disponibile nei nuovi sorgenti del kernel
  (2.1.x).



  3.  Come installare il supporto SB AWE per il suono



  3.1.  Requisiti


  Questi sono i requisiti per supportare la SB AWE in Linux


    Linux deve essere gi operativo e funzionante

    Dovete avere una SB 32 o compatibile (esempio SB32 SB32PnP
     SBAWE64....)

    Dovete avere installati i sorgenti del kernel (per poter
     ricompilare il kernel)   inclusi i driver sonori OSS/Free (guardare
     /usr/src/linux/drivers/sound/Readme)

    Dovete avere le estensioni "AWE 32 sound driver" (disponibili
     attualmente sia per redhat 5.0 che per debian 2.0 e, presumo, anche
     per le altre distribuzioni).

  Se avete una scheda PnP avete inoltre bisogno:


    pacchetto isapnptool.

  Se avete un Linux Debian ci vuol dire che dovete aver installato i
  pacchetti:
    Kernel-source

    Awe-driver

    Isapnp


  3.2.  Iniziamo


  Presuppongo abbiate gi installato propriamente la SB nella scheda
  madre e, forse, che l'abbiate gi testata sotto Windows (con esito
  positivo).

  Il prossimo passo  quello d'inizializzare la scheda nella procedura
  di boot (ATTENZIONE QUESTO SE E SOLO SE LA SB  DI TIPO PnP!!!).
  Seguite la procedura d'installazione e compilazione del pacchetto
  isapnp e una volta installato, digitate, con i diritti di root:



       pnpdump >/etc/isapnp.conf





  Questo comando genera un file di configurazione per le schede PnP, da
  editare correttamente seguendo le man page (man isapnp.conf per
  maggiori informazioni).  Per la SB sono possibili varie
  configurazioni: cercate quella giusta (confrontate le impostazioni con
  quelle che avete sotto Windows oppure date un'occhiata all'isapnp.conf
  alla fine di questo HOWTO).


  ATTENZIONE!!!  Isapnp spesso fallisce nel trovare tutte e TRE le porte
  di I/O dei SB Wave Table Device. Controllate bene e se non sono state
  viste correttamente aggiungetele voi manualmente (magari dando
  un'occhiata all'isapnp.conf qui alla fine dell'HOWTO).

  ATTENZIONE!!! (ancora!) come spiegato nel isapnp-faq isapnp spesso
  sbaglia il numero delle periferiche logiche. Se vi appare un messaggio
  del tipo:



       Error occurred executing request 'LD 2' on or around line...




  allora provate aggiungendo (VERIFYLD N) all'inizio del isapnp.conf. 
  consigliabile usare la versione 1.10 di isapnp se non potete utiliz
  zare questa versione dovete editare gran parte del file manualmente
  (auguri! :-) ) in questo caso fate riferimento all'isapnp-faq.

  ATTENZIONE!!! (ultima) state attenti che nell'ultima riga
  dell'isapnp.conf compaia la scritta (WAITFORKEY) ogni tanto viene
  omessa per motivi mistici da vecchie versioni di pnpdump.

  Come gi detto un ``estratto'' dell'isapnp.conf (solo la parte
  riguardante la SB)  stato messo alla fine di questo HOWTO.

  Ora, se avete montato Debian non sono necessari altri aggiustamenti:
  isapnp sar caricato nella procedura di boot semplicemente aggiungendo
  a /etc/init.d/boot queste poche linee:
  ______________________________________________________________________
  # Configura la scheda isa plug and play prima del caricamento dei
  # moduli.
  #
  if [ -x /etc/init.d/isapnp ]
  then
    /etc/init.d/isapnp start
  fi
  ______________________________________________________________________


  dove /etc/init.d/isapnp 


  ______________________________________________________________________
  #! /bin/sh
  # /etc/init.d/isapnp: configure Plug and Play boards
  test -x /sbin/isapnp || exit 0
  /sbin/isapnp /etc/isapnp.conf
  exit 0
  ______________________________________________________________________



  NOTE: agli utenti Debian hamm e RedHat 5.0 o superiori dovrebbe
  bastare creare il file /etc/isapnp.conf.

  Se avete un'altra distribuzione Linux, beh siete soli, non so cosa
  bisogna fare (se qualcuno lo sa, me lo comunichi).  L'importante 
  essere sicuri che isapnp venga caricato in fase di avvio e che compaia
  (sempre in fase di avvio) una scritta del tipo :



       Board 1 has Identity 74 00 00 e3 10 48 00 8c 0e:  CTL0048 Serial No 58128





  3.3.  Compilare il kernel


  Prima di ricompilare il kernel dovete installare l'AWE driver
  Extension.  Normalmente se  stato gi "deppacchettizzato" lo trovate
  in /usr/src/awedrv e da l seguite le istruzioni nel file INSTALL.awe.
  Oppure direttamente digitate



       ./install.sh




  Per vedere se  gi installato nel kernel guardate in
  /usr/src/linux/drivers/sound/lowlevel se ci sono i file awe_*.

  Se volete fare un upgrade del driver AWE, vi conviene prima cancellare
  il vecchio drivers/sound/lowlevel/awe_wav.c, e quindi eseguire lo
  script d'installazione (questo perch l'installazione va a vedere se
  esiste quel file e se c' non fa niente).

  Ora finalmente potete lanciare l'amatissimo make config (o make
  menuconfig o make xconfig) nella directory /usr/src/linux.
  Configurate il resto come volete voi (ricordandovi di abilitare il
  supporto per i moduli se volete installare i driver sonori come
  moduli).

  Ad un certo punto vi verr chiesto se volete il sound card support.
  rispondete con Y o M se non avete una schesa PnP.  Se invece avete una
  SB PnP dovete rispondere M.

  Poi alle seguenti voci della sezione sound un bel Y  (alle altre un N
  e una pietra sopra).


  ______________________________________________________________________
  Sound Blaster (SB, SBPro, SB16, clones) support (CONFIG_SB) [Y/n/?]
  Generic OPL2/OPL3 FM synthesizer support (CONFIG_ADLIB) [Y/n/?]
  /dev/dsp and /dev/audio support (CONFIG_AUDIO) [Y/n/?]
  MIDI interface support (CONFIG_MIDI) [Y/n/?]
  FM synthesizer (YM3812/OPL-3) support (CONFIG_YM3812) [Y/n/?]
  lowlevel sound driver support [Y/n/?]
  AWE32 support (CONFIG_AWE32_SYNTH) [Y/n/?]
  ______________________________________________________________________



  ATTENZIONE SE L'ULTIMA NON APPARE ALLORA NON AVETE INSTALLATO L'AWE
  DRIVER EXTENSION!!!!!


  Quindi dovete configurare l'I/O della SB date un'occhiata
  all'isapnp.conf altrimenti provate questi valori di default (che sono
  andati bene a me, a marcus e ad altre persone).  Attenzione in
  particolar modo ai valori del SBC_IRQ e SB_MPU_BASE che normalemente
  sono sbagliati per molte SB.


  ______________________________________________________________________
  I/O base for SB Check from manual of the card (SBC_BASE) [220]
  Sound Blaster IRQ Check from manual of the card (SBC_IRQ) [5]
  Sound Blaster DMA 0, 1 or 3 (SBC_DMA) [1]
  Sound Blaster 16 bit DMA (_REQUIRED_for SB16, Jazz16, SMW) 5, 6 or 7
  (use 1 for 8 bit cards) (SB_DMA2) [5]
  MPU401 I/O base of SB16, Jazz16 and ES1688 Check from manual of the card
  (SB_MPU_BASE) [330]
  SB MPU401 IRQ (Jazz16, SM Wave and ES1688) Use -1 with SB16 (SB_MPU_IRQ) [-1]
  ______________________________________________________________________



  Ora ricompilate il kernel seguendo i suggerimenti del Module HOWTO:


       make dep
       make clean
       make modules
       make modules_install




  make zImage o make zlilo o make zdisk  a seconda delle vostre neces
  sit.

  Per gli utenti Debian + semplicemente




  make-kpkg clean
  make-kpkg -revision custom.1.0 kernel_image




  e quindi dpkg -i /usr/src/kernel-image-2.0.29_custom.1.0_i386.deb.



  3.4.  Riavvio


  Dopo l'installazione del nuovo kernel dovete riavviare il sistema
  (fatevi sempre un dischetto di boot in caso di errori irreversibili).
  Ora incrociate le dita, fate le macumbe, e riavviate (CTRL+ALT+CANC o
  per i maniaci shutdown -r now).

  Ora potete installare il sound driver se lo avete compilato come
  modulo.



       Modprobe -a sound
       AWE32 Sound Driver v0.3.3e (DRAM 2048k)




  Se la memoria non  stata rilevata correttamente provate a fare
  l'upgrade del AWE driver Extension o direttamente editate il file
  /usr/src/linux/drivers/sound/lowlevel/awe_config.h

  per esempio:



       #define AWE_DEFAULT_MEM_SIZE  4096   /* kbytes */




  quindi ricompilate il kernel di nuovo.

  Se non volete ricompilare tutto ex novo,  anche possibile fare
  soltanto make modules e make modules_install.  Io comunque, suggerisco
  di ricompilare tutto , male non fa n a voi n al Pc.

  Se invece  andato tutto, bene dovreste avere il sound module caricato
  automaticamente.

  Potete usare kerneld oppure aggiungere sound in /etc/modules (in
  Debian) o aggiungere /sbin/modprobe -a sound negli script di avvio del
  vostro Linux.


  4.  Testiamo il tutto



  4.1.  /proc/devices  /dev/sndstat


  Se avete installato il sound support come "built-in" gi nei messaggi
  di boot dovreste aver visto dei messaggi utili.  In ogni caso date
  un'occhiata a quello che appare con questi comandi:
       modprobe -r sound  (questo se lo avete caricato come modulo)
       modprobe -a sound trace_init=1
        Sound initialization started

       <Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
       <Sound Blaster 16> at 0x330 irq 5 dma 0
       <Yamaha OPL3 FM> at 0x388
       Sound initialization complete
       AWE32 Sound Driver v0.3.3e (DRAM 2048k)




  Se avete /proc come file system virtuale date un'occhiata ai devices



       cat /proc/devices
       ...Character devices:
          [...]
          14 sound
          [...]




  Date un'occhiata che in /dev i device siano installati correttamente
  (vedi SOUND-HOWTO su come fare) quindi diamo un'occhiata a
  /dev/sndstat



       # cat /dev/sndstat
              Sound Driver:3.5.4-960630 (Sat Oct 11 19:35:14 CEST 1997 root,
              Linux flora 2.0.29 #1 Sat Oct 11 19:12:56 CEST 1997 i586 unknown)
              Kernel: Linux flora 2.0.29 #1 Sat Oct 11 19:36:23 CEST 1997 i586
              Config options: 0

              Installed drivers:
              Type 1: OPL-2/OPL-3 FM
              Type 2: Sound Blaster
              Type 7: SB MPU-401

              Card config:
              Sound Blaster at 0x220 irq 5 drq 1,5
              SB MPU-401 at 0x330 irq 5 drq 0
              OPL-2/OPL-3 FM at 0x388 drq 0

              Audio devices:
              0: Sound Blaster 16 (4.13)

              Synth devices:
              0: Yamaha OPL-3
              1: AWE32 Driver v0.3.3e (DRAM 2048k)

              Midi devices:
              0: Sound Blaster 16

              Timers:
              0: System clock

              Mixers:
              0: Sound Blaster
              1: AWE32 Equalizer


  Se non vi esce un output come questo allora avete sbagliato qualcosa
  nella configurazione e dovete ritornare al punto ``Iniziamo'' (e senza
  passare per il via).


  4.2.  Output: Il Device Raw Audio



  Cercate un file di tipo .au (sun workstation) o .wav (ma non sempre
  funzionano). Io suggerisco sempre un bel find / -name *.au.

  E ora ...  magia di Linux ... digitate :



       cat file.au > /dev/audio





  oppure




       cat file.wav > /dev/dsp




  in questo modo dovreste sentire il file sonoro utilizzando il driver
  Audio Device 0: Sound Blaster 16 (4.3).


  4.3.  Output: Sintesi OPL-2/OPL-3


  Se volete usare la sintesi FM OPL-2/OPL-3 per ascoltare i MIDI provate
  il programma playmidi (appendice B)



       playmidi -f dance.mid





  oppure




       playmidi -4 dance.mid




  il primo vi da l'OPL-2 il secondo l'OPL-3.  Se il suono fa schifo non
  preoccupatevi  la sintesi FM che fa schifo, ma voi avete unia SB-AWE
  e potete usare ben altro!!



  4.4.  Output: Sintesi Wave Table


  L'AWE driver Extension ha alcuni splendidi comandi (awesfx) per fare
  uso dell'EMU 8000 Wave Table synthesis.

  Prima di tutto dovete caricare una sound font Bank sulla vostra scheda
  (anche se volete usare i ROM samples). Potete trovare i file dalla
  vostra partizione DOS/Windows - file con suffisso *.sfb o *.sf2.

  I ROM samples possono essere caricati con SYNTHGM.SBK, mentre i
  samples reali li trovate in SYNTHGS.SBK e SYNTHMT.SBK, oppure in
  SAMPLE.SBK. Potete trovare altri Sound Font Banks via ftp o www, per
  esempio l'EMU homepage, il sito della Creative, e cercate i CHAOS
  samples, che sono molto buoni.

  Provate a caricare l'insieme GM standard (ROM) con



       sfxload -i synthgm.sbk




  E poi ascoltatevi un MIDI con l'utility



       drvmidi dance.mid





  4.5.  Mixer


  Procuratevi il vostro programma di mixer favorito e caricatelo. Ora
  fate partire un wav e due midi nello stesso tempo per provate le
  impostazioni del vostro mixer. Qui di seguito c' la lista delle
  periferiche e di come sono chiamate


     Yamaha OPL-3
        Synth o FM

     AWE32 Driver
        Synth o FM (qualcuno conosce un mixer in cui queste due voci
        sono separate?)

     Sound Blaster 16 (4.13)
        PCM o DSP

     PC Speaker (ancora vivo)
        Spkr

  Altre periferiche sono il CDROM possibilmente collegato alla SB,
  MASTER VOLUME (volume generale), Bass (regolazione bassi), Treble
  (regolazione alti).


  4.6.  Input: Compionamenti con il Device Raw Audio



   possibile registrare da CDROM, microfono e qualsiasi cosa connessa
  al line-in. Configura il mixer nel modo pi appropriato.  Suona e poi
  registra una traccia ad esempio:



        cdplay
        dd bs=8k count=5 < /dev/dsp > music.au
        5+0 records in
        5+0 records out
        cat music.au >/dev/dsp




  prende 5 secondi di una traccia del cd e la registra nel file music.au
  che poi viene fatto partire.


  5.  Software per il driver AWE



  5.1.  sfxload


   possibile caricare dei sample nella DRAM della SB con il comando
  sfxload.

  NOTA:  possibile caricare solo un sample file per banco, con il banco
  0 come  default. Da ci consegue che dopo sfxload synthgs.sbk, l'unico
  sample caricato  il GS. Se vuoi caricare Sound Font Bank addizionali,
   necessario usare l'opzione -b.

  Ad esempio:



       sfxload synthgs.sbk
       sfxload -b1 sample.sbk
       drvmidi sfx.mid




  Inoltre  possibile caricare un Sound Font Bank di default; basta
  aggiungere la linea seguente



       post-install sound /usr/bin/sfxload synthgm.sbk




  in /etc/conf.modules.

  Guardate la documentazione relativa a sfxload per altre dritte.


  5.2.  drvmidi


  Con drivmidi,  possibile adoperare l'AWE driver per suonare i MIDI,
  basta specificare il file che si vuole sentire dopo il comando.

  Ad esempio:



       drvmidi waltz.mid




  Guardate la documentazione relativa a sfxload per altre dritte.


  6.  Appendici



  6.1.  Informazioni addizionali




     The Linux Sound HOWTO
        Autore: Jeff Tranter, <jeff_tranter@pobox.com>

        Ultima versione: v1.17, 4 Agosto 1997

         consigliabile leggere bene questo HOWTO !!!!!


     The Linux Sound Playing HOWTO
        Autore: Yoo C. Chung, <wacko@laplace.snu.ac.kr>

        Ultima versione: v1.4, 13 Maggio 1997

        Anche questo HOWTO  utile per conoscere i vari formati musicali
        e che applicazioni utilizzare per ascoltarli


     The AWE Driver FAQ
        Autore: Takashi Iwai  <iwai@dragon.mm.t.u-tokyo.ac.jp>

        Source:  <http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/awedrv-
        faq.html>

        La BIBBIA di noi poveri possessori di SB-AWE


      l'ISA PnP FAQ
        Autore: Peter Fox <fox@roestock.demon.co.uk>

        Source:
        <http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html>

        Se avete problemi mentre configurate la vostra scheda PnP,
        allora qui troverete molti aiuti.



  6.2.  6.2. Sorgenti




     isapnptools
        Autore: Peter Fox <fox@roestock.demon.co.uk>

        Ultima Versione: 1.11

        Source:
        <http://www.roestock.demon.co.uk/isapnptools/index.html>

        Per riportare bug, patches o commenti su isapnp:
        isapnp@roestock.demon.co.uk.  Includendo isapnp nel subject.



     awedrv
        Author: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>

        Ultima Versione: 0.4.2c

        Source:  <http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/>


     Linux kernel
        Autore: Linus Torvald & co.

        Ultima versione: al momento 2.0.33 Reperibile a: ovunque ci sia
        Linux


     OSS/Free
        Author: Hannu Savolainen (Si invita fare un giro a
        <http://www.4front-tech.com/usslite> prima di spedimi una mail).

        Ultima Versione: I ho 3.5.5-beta1

        Reperibile con il Linux Kernel Source Package

        Informazioni:   <http://www.4front-tech.com/usslite> or European
        mirror <http://personal.eunet.fi/pp/voxware>.



  6.3.  Esempio di isapnp.conf



  Nell'ISA PnP file di configurazione, creato da pnpdump, i singoli
  componenti della vostra scheda PnP compaiono come sezioni (SECTION).
  Nel file qui sotto riportato  stata rilevata la scheda sonora con 4
  componenti logici:


    LD 0: Audio Device

    LD 1: IDE Device

    LD 2: WaveTable Device

    LD 3: Gameport Device

   stato lasciato LD 1 non configurato perch il CDROM non era
  attaccato alla porta ide della SB. Se non avete una porta Ide sulla
  vostra SB allora LD 1 sar il Gameport Device e LD 3 non comparir.
  Per favore fate riferimento alla sezione ``Iniziamo'' per informazioni
  importanti su questo file.





  ______________________________________________________________________
    # $Id: pnpdump.c,v 1.9 1997/06/10 21:37:32 fox Exp $
    # This is free software, see the sources for details.
    # This software has NO WARRANTY, use at your OWN RISK
    #
    # For details of this file format, see isapnp.conf(5)
    #
    # For latest information on isapnp and pnpdump see:
    # http://www.roestock.demon.co.uk/isapnptools/
    #
    # Compiler flags: -DREALTIME -DNEEDSETSCHEDULER

    (READPORT 0x0203)
    (ISOLATE)
    (IDENTIFY *)

    # Try the following if you get error messages like
    # Error occurred executing request 'LD 2' on or around line...

    #(VERIFYLD N)

    # ANSI string -->Creative SB32 PnP<--

    (CONFIGURE CTL0048/58128 (LD 0
    #     ANSI string -->Audio<--

      (INT 0 (IRQ 5 (MODE +E)))
      (DMA 0 (CHANNEL 1))
      (DMA 1 (CHANNEL 5))
      (IO 0 (BASE 0x0220))
      (IO 1 (BASE 0x0330))
      (IO 2 (BASE 0x0388))

      (ACT Y)
    ))

    (CONFIGURE CTL0048/58128 (LD 1
    #     ANSI string -->IDE<--

    # (INT 0 (IRQ 10 (MODE +E)))
    # (IO 0 (BASE 0x0168))
    # (IO 1 (BASE 0x036e))

    # (ACT Y)
    ))

    (CONFIGURE CTL0048/58128 (LD 2
    #     ANSI string -->WaveTable<--

      (IO 0 (BASE 0x0620))
      (IO 1 (BASE 0x0A20))
      (IO 2 (BASE 0x0E20))

      (ACT Y)
    ))

    (CONFIGURE CTL0048/58128 (LD 3
    #     ANSI string -->Game<--

      (IO 0 (BASE 0x0200))
      (ACT Y)
    ))

    # Returns all cards to the "Wait for Key" state
    (WAITFORKEY)
  ______________________________________________________________________


































































  StarOffice 3.1 Mini-HOWTO
  Matthew Borowski (mkb@poboxes.com )
  v1.1, 28 Novembre 1999

  Informazioni sull'installazione di StarOffice 3.1 Office Suite della
  StarDivision. Suggerimenti e critiche alla traduzione italiana di
  questo documento possono essere inviati al suo curatore: Marco Meloni
  (tonno at stud.unipg.it).

  1.  Introduzione

  Questo documento tratta dell'installazione di StarOffice 3.1. La
  versione attuale di StarOffice  la 5.1. La versione 5.1  decisamente
  pi semplice da installare e contiene meno bug della versione 3.1. In
  effetti  mia opinione che non vi  bisogno di un HOWTO per installare
  la versione 5.1, poich la StarDivision ha scritto una guida
  all'installazione decisamente completa. Lo StarOffice mini-HOWTO 
  stato utile in precedenza e viene adesso archiviato solo per quei
  pochi che vogliono ancora installare StarOffice 3.1. Per informazioni
  su StarOffice 5.1 date un'occhiata al sito della StarDivision
  http://www.stardivision.com.



  La StarOffice Office Suite  un insieme di tool per l'ufficio per
  Linux, scritta in C usando il toolkit Motif.

  StarOffice include:

    StarWriter, un word processor

    StarCalc, un foglio di calcolo

    StarImage, un editor di immagini

    StarDraw, un programma di disegno simile a Corel DRAW

    StarChart, un programma per disegnare grafici

    StarMath, un editor matematico



  La StarOffice Office Suite per Linux  free per uso non commerciale.
  Un uso commerciale richiede l'acquisto di una licenza. Il costo dell'
  acquisto di una licenza commerciale separatamente dalla distribuzione
  OpenLinux di Caldera per il momento non  stato reso noto.


  1.1.  Informazioni su Motif

  StarOffice  stata scritta usando la GUI del toolkit Motif 2.0.  la
  versione linkata dinamicamente *non* funzioner con le librerie Motif
  1.2/Lesstif.

  La versione linkata staticamente (con le librerie Motif 2.0)
  funzioner anche se Motif non  installato sul vostro sistema.
  Ovviamente le prestazioni saranno inferiori.

  Ho fatto girare StarOffice su un Pentium 100 con 48 Mb di RAM, sotto
  Redhat 4.1 completa di Motif 2.0. La versione linkata dinamicamente
  viene caricata in circa un minuto.  comunque da notare il fatto che,
  una volta caricata, la versione linkata dinamicamente utilizza molte
  meno risorse di sistema della versione linkata staticamente.


  1.2.  Storia del documento


    Versione 1.1 991128 - aggiornate le URL e modificati i riferimenti
     da StarOffice 4.0 al nuovo 5.1

    Versione 1.0 980602 - aggiunte info su StarOffice 4.0 e sul perch
     questo documento  ormai vecchio

    Versione 0.8 971109 - aggiunti dei trucchi, installazione con
     upgrade delle libc, ecc.

    Versione 0.7 970707 - cambiata la sezione 3.1.1, cambiata la
     licenza

    Versione 0.6 970609 - aggiunto rimedio per problemi con la
     variabile LANG

    Versione 0.5 970608 - info modificate per la versione finale di
     StarOffice 3.1

    Versione 0.1 970505 - release iniziale.




  2.  Come ottenere la StarOffice Office Suite

  La versione corrente di StarOffice per Linux  la 3.1.   disponibile
  tramite FTP su

       ftp://ftp.gwdg.de/pub/linux/staroffice


  Il file README.StarOffice contiene informazioni sul download di
  StarOffice 3.1 versione finale. Vi serviranno tre file:


    StarOffice31-english.tar.gz (inglese) documenti di templates/demo o

    StarOffice31-german.tar.gz (tedesco) documenti di templates/demo

    StarOffice31-dynbin.tar.tgz(linkato dinamicamente) o

    StarOffice31-statbin.tar.gz (linkato staticamente) eseguibile

    StarOffice31-common.tar.gz



  Vi  anche una versione di StarOffice distribuita da Caldera.
  Guardate il loro sito web

       http://www.caldera.com

  per i dettagli.  Caldera vende anche i CDROM di StarOffice a $ 7.99
  US.


  3.  Installazione di StarOffice

  L'installazione di StarOffice consiste nel:

    Come root, decompattare i file della distribuzione in /usr/local


    lanciare il setup come utente

    effettuare un source dei comandi in .sd.sh o .sd.csh

    leggere la sezione 3.5!!! (fatelo)



  3.1.  Problemi con le Libc e loro rimedi

  StarOffice utilizza le libc 5.4.4.

  StarOffice 3.1 *funzioner* con le Libc 5.3.x. Sfortunatamente, il
  programma di setup richiede la versione 5.4.4 o superiore delle libc.
  Se avete le libc 5.3.x, potete porre rimedio a ci con una copia delle
  libc 5.4.4+ e impostando la variabile LD_LIBRARY_PATH prima di
  eseguire lo script di setup. Comunque non ho testato la cosa
  personalmente, per cui fate un po' voi.


  Se cercate di eseguire lo script di setup con delle libc pi vecchie
  delle 5.4.4, avrete il seguente messaggio di errore:


       line 1: Syntax error at token 'I' expected declarator; i.e. File ...





  Per aggiornare le libc, fate FTP su sunsite.unc.edu e cercate nella
  directory /pub/Linux/GCC il file libc-5.4.33.bin.tar.gz (o qualunque
  sia l'ultima versione).  Estraete il contenuto di questo file in una
  directory temporanea.  Vi sar adesso una directory lib/ . Da root
  copiate il file libc.so.5.4.33 da questa directory alla vostra
  directory /lib. Adesso fate un link simbolico da libc.so.5 a
  libc.5.4.33 con il comando:



       ln -sf /lib/libc.so.5.4.33 /lib/libc.so.5


  ed eseguite il comando ldconfig.



  Il Dr. Romano Giannetti (romano@iet.unipi.it ) dice che:



       ... vorrei solo aggiungere che si pu installare (come da te
       suggerito) StarWriter in un sistema con Redhat 4.2 che
       utilizza le libc5.3 senza effettuare l'upgrade.

       I passi da compiere sono:


       1. ottenere le libc.so.5.4.x. Se esse sono in un package rpm
       (come quelli che si trovano nella directory contrib), 
       possibile estrarre la libreria andando su una directory
       temporanea ed eseguendo il comando:

       rpm2cpio libc.so.5.4.x-y.rpm | cpio --extract --make-
       directories

  La libreria si trover nella subdirectory ./lib


  2. muovere il file libc.so.5.4.x nella propria home
  directory. Dopodich (assumendo che si usi una shell tipo
  sh):

  ln -s libc.so.5.4.x libc.so.5

  export LD_LIBRARY_PATH=$HOME:/lib:/usr/lib


  3. Adesso si pu lanciare il setup.





  3.2.  Installazione dei file tar

  Dopo aver scaricato StarOffice, da root mettere i file archivio in
  /usr/local/. Andare in  /usr/local/ ed estrarre i file
  dell'installazione. Un esempio di comando che estrae un file tar e
  compresso con gz pu essere:



       tar -xzvf nomefile.tar


  I sistemi pi vecchi potrebbero richiedere l'esecuzione del comando
  gzip -d per decomprimere il file,  poi sufficiente usare il comando
  tar -xvf per estrarre i file dall'archivio di tar.

  I file saranno estratti nelle loro posizioni sulla nuova directory
  usr/local/StarOffice-3.1.




  3.3.  Setup e configurazione

  Dopo aver estratto i file di StarOffice come root, si effettui il
  login con il proprio username. Andare sulla directory
  /usr/local/StarOffice-3.1 ed eseguire il programma di setup. Questo
  programma installer i file non condivisi ed effettuer i link
  simbolici che servono per ogni utente. La modalit di installazione
  raccomandata  quella standard. Ci *potrebbero* essere problemi se non
  si accetta il percorso predefinito di installazione.

  StarOffice usa per il suo funzionamento le variabili d'ambiente.  I
  file .sd.sh  (formattato per la Bourne Shell) e .sd.csh (formattato
  per la C Shell) forniscono i valori appropriati a StarOffice per le
  suddette variabili. Questi file sono collocati nella home directory
  dell'utente.


  Se si ritiene di usare bash, modificare il proprio .bashrc aggiungendo
  la linea:


       source  /.sd.sh


  Dopo questo, far ripartire la bash per rendere effettivo il
  cambiamento.
  Se si usa una shell differente dalla bash consultarne il manuale per
  sapere come effettuare l'operazione analoga.


  3.4.  Bug del Setup di COL (Caldera OpenLinux)

  Phil Reardon (pcr@busprod.com ) ha scritto:

       " Ho trovato un bug nello script di setup per StarOffice che
       era nella mia versione standard di Caldera OpenLinux. Lo
       script produce // in un percorso dove dovrebbe esserci solo
       un /.  Per rimediare basta rimuovere il primo slash da
       questa linea:

       exec ${pfad:='.'}/linux-x86/bin/$name;;


  Non ci dovrebbero essere / prima di linux-x86."






  3.5.  Come risolvere il problema con la variabile LANG

  I file .sd.sh e .sd.csh impostano la variabile LANG.  Questo causa dei
  problemi con perl e man. Man dar il seguente messaggio d'errore:

       " Failed to open the message catalog man on the path
       NLSPATH="

  Perl dar quest'altro errore:

       " warning: setlocale(LC_CTYPE, "")..."


  Il file .sd.sh contiene una linea dove la variabile LANG viene
  impostata a "us" ( LANG=us ) ed un'altra dove si effettua un export di
  una serie di variabili, LANG inclusa. Per rimediare basta rimuovere la
  linea LANG="us" e rimuovere LANG dalla lista delle variabili.

  Nel file .sd.csh (formattato per la c shell), baster rimuovere la
  linea dove appare "setenv LANG us".


  Un grazie ad Adam L. Klein (alklein@adelphia.net) per avermi informato
  di questo rimedio.





  4.  Come lanciare StarOffice

  I binari di StarOffice sono nella directory:
  /usr/local/StarOffice-3.1/linux-x86/bin/

  Le applicazioni sono: sdraw3, swriter3, scalc3, smath3, schart3,
  simage3

  Il programma svdaemon deve essere eseguito per poter usufruire
  dell'help in linea.  Il programma svportmap deve essere eseguito per
  abilitare la funzionalit di comunicazione tra le applicazioni
  StarWriter, StarCalc e StarDraw.

  5.  Alcuni accorgimenti

  A cura di Patrick D'Cruze (pdcruze@netpal.com.au)


  1.  Invece di effettuare un "source" di .sd.sh (o .sd.csh) nel mio
  .bash_profile, ho copiato .sd.sh,  lo ho rinominato come swriter e lo
  ho messo in /usr/local/bin.  Lo ho poi modificato aggiungendo:

       #! /bin/bash



  all'inizio dello script e:

       exec swriter3 $*


  alla fine dello script.  Adesso tutto quello che devo fare  lanciare
  swriter e lui automaticamente imposta le variabili d'ambiente
  appropriate e fa partire StarWriter. Questo evita che le variabili
  d'ambiente impostate da StarOffice inquinino altre
  applicazioni/ambienti.

  2.  Ho notato che per molta gente StarOffice ci mette un bel po' per
  partire (pi di 60 secondi).  risultato, dalle discussioni su usenet,
  che gran parte di questo tempo va perso nella rilocazione dei simboli
  (symbol relocation) che il linker dinamico deve effettuare. Per ogni
  nuovo simbolo il linker deve trovare la libreria adatta. StarOffice 
  linkato dinamicamente con poche librerie ma il linker spende gran
  parte del tempo nella ricerca in mezzo a molte altre librerie.

  A questa cosa si pu porre rimedio. Io faccio girare StarOffice in un
  ambiente chiuso (chroot'd jail).  sufficiente porre in questo
  ambiente i binari e le librerie che StarOffice usa (tutte quelle sotto
  /usr/X11R6/lib, libc/libm e libg++/libstdc++). In questa maniera
  StarWriter impiega 15 secondi per partire sul mio P133/32Mb. Questo 
  dovuto al fatto che le sole librerie presenti sono quelle che servono
  a StarOffice e quindi il linker dinamico impiega proporzionalmente un
  tempo inferiore nella ricerca fra le librerie del sistema (non cerca,
  ad esempio, fra tutte le librerie inutili in /usr/lib).





  6.  Ulteriori informazioni

  Altre informazioni su StarOffice per Linux sono disponibili
  direttamente dalla StarDivision. La StarDivision ha un sito web
  http://www.stardivision.com

  La StarDivision mantiene un news server con gruppi di discussione sul
  supporto e sull'uso di StarOffice per Linux. Questi gruppi di
  discussione sono il posto migliore dove cercare per le ultime
  informazioni riguardanti StarOffice ed anche un posto dove chiedere
  aiuto. Con un programma che consente di leggere i gruppi di
  discussione, collegarsi a news://starnews.stardivision.com o seguire
  il link della homepage della StarDivision riguardante l'assistenza.


  7.  Contributi

  Un grazie a Werner Klaus (wklaus@metronet.de ) per aver tradotto
  questo documento in sgml.

  Se avete informazioni addizionali per questo mini-HOWTO, contattatemi
  via email. Il mio indirizzo  all'inizio del documento. Potreste anche
  aver voglia di visitare la mia homepage all'indirizzo
  http://tarp.worldserve.net/ or http://tarp.linuxos.org/


  8.  Disclaimer e Copyright


  (Questa sezione viene lasciata anche in lingua originale. ndt)

  This document is (C) 1999 by Matthew Borowski.

  Redistribution of this document in electronic form is permitted under
  the condition that the document remains unchanged. If you wish to
  include this document in a CD-ROM or book, please obtain permission
  from me beforehand (I prefer requests to be sent via e-mail).


  The author claims no responsibility in anything that may occur
  directly or indirectly as a result of using this document. The author
  is not an employee of StarDivision, GmbH or Caldera, Inc.


  Questo documento  sotto copyright (C) 1999 da parte di Matthew
  Borowski.

  La ridistribuzione di questo documento in forma elettronica  permessa
  a patto che questo documento rimanga inalterato. Se si vuole includere
  questo documento in un CD-ROM o in un libro, si prega di ottenerne
  prima il mio permesso (preferisco che le richieste vengano spedite via
  email).

  L'autore non si assume responsabilit per qualsiasi conseguenza
  diretta o indiretta causata dall'uso di questo documento. L'autore non
   un impiegato della StarDivision, GmbH o della Caldera, Inc.


  Commenti e domande possono essere rivolti all'autore mkb@poboxes.com.



























F 3-BUTTON.;1                       	3-Button-Mouse
F ADSL.;1                           	ADSL
F ADSM-BAC.;1                       	ADSM-Backup
F ADVOCACY.;1                       	Advocacy
F ALSA-SOU.;1                       	Alsa-sound
F APACHE_S.;1                       	Apache+SSL+PHP+fp
F AUTOMOUN.;1                       	Automount
F BATTERY-.;1                       	Battery-Powered
F BOGOMIPS.;1                       	BogoMips
F BRIDGE.;1                         	Bridge
F BTTV-MIN.3;1                      	BTTV-Mini-HOWTO-0.3
F BZIP2.;1                          	Bzip2
F CLOCK.;1                          	Clock
F COFFEE.;1                         	Coffee
F COLOUR-L.;1                       	Colour-ls
F DISKLESS.;1                       	Diskless
F EXT2FS-U.;1                       	Ext2fs-Undeletion
F FAX-SERV.;1                       	Fax-Server
F FDU.;1                            	FDU
F FIREWALL.;1                       	Firewall-Piercing
F HARD-DIS.;1                       	Hard-Disk-Upgrade
F IO-PORT-.;1                       	IO-Port-Programming
F IP-SUBNE.;1                       	IP-Subnetworking
F KERNELD.;1                        	Kerneld
F LILO.;1                           	LILO
F LINUX_DO.;1                       	Linux+DOS+Win95+OS2
F LINUX_FR.;1                       	Linux+FreeBSD
F LINUX_NT.;1                       	Linux+NT-Loader
F LOADLIN_.;1                       	Loadlin+Win95
F MAIL-QUE.;1                       	Mail-Queue
F MAIL2NEW.;1                       	Mail2News
F MULTIBOO.;1                       	Multiboot-with-LILO
F PARTITIO.;1                       	Partition-Rescue
F PARTITIO.000;1                    	Partition
F PLIP.;1                           	PLIP
F PPP-OVER.;1                       	PPP-over-Minicom
F PUBLIC-W.;1                       	Public-Web-Browser
F RCS.;1                            	RCS
F REMOTE-X.;1                       	Remote-X-Apps
F RPM_SLAC.;1                       	RPM+Slackware
F SAVING-S.;1                       	Saving-Space
F SENDMAIL.;1                       	Sendmail-Address-Rewrite
F SMALL-ME.;1                       	Small-Memory
F SOUNDBLA.;1                       	Soundblaster-AWE
F STAROFFI.;1                       	StarOffice
F TT-DEBIA.;1                       	TT-Debian
F ULTRA-DM.;1                       	Ultra-DMA
F UPGRADE.;1                        	Upgrade
F VAIO.;1                           	VAIO
F ZIP-DRIV.;1                       	ZIP-Drive
  TrueType Fonts in Debian mini-HOWTO
  Bear Giles, bgiles@coyotesong.com
  v0.3, 10 gennaio 2000

  Questo documento descrive come configurare un sistema Debian per usare
  i font TrueType per la visualizzazione e la stampa.  La versione pi
  recente di questo documento pu essere ottenuta in formato HTML a
  http://www.dimensional.com/~bgiles/debian-tt.html.  Traduzione a cura
  di Giovanni Bortolozzo, borto (at) pluto.linux.it.

  1.  Introduzione

  Una installazione di Linux tipicamente contiene parecchi insiemi
  indipendenti di font e metriche di font.  Un'occhiata veloce al mio
  sistema rivela font e metriche di font sparse nelle seguenti
  directory:

    XFree86 conserva i suoi font in /usr/X11R6/lib/X11/fonts/;

    Ghostscript li conserva in /usr/lib/ghostscript/fonts/;

    TeX li tiene in /usr/lib/texmf/fonts/;

    Il pacchetto kbd di Debian mette i suoi font in
     /usr/share/consolefonts/;

    Groff conserva le sue metriche in /usr/share/font/devps/;

    Enscript (convertitore da ASCII a PostScript) tiene le sue metriche
     in /usr/share/enscript/*.afm.

  Neanche a dirlo, questi font non sono coordinati.

  I font TrueType sono stati progettati per eliminare questo problema
  permettendo che gli stessi file di font siano usati sia per la
  visualizzazione che per la stampa.  Questo Howto prova a mostrare come
  usare questi font TrueType per la visualizzazione, la stampa e la
  preparazione di documenti su sistemi Debian GNU/Linux.


  1.1.  Liberatoria

  Le informazioni in questo documento sono, al meglio delle mie
  conoscenze, corrette.  Comunque questo HOWTO  ancora in versione
  preliminare e quel che funziona per me potrebbe non funzionare per
  qualcun'altro.  Anche se funziona, non sono uno scrittore tecnico
  professionista e sono noto per sorvolare sui dettagli critici.

  Quindi divertitevi, ma giocando sicuri e facendo dei backup.


  1.2.  Crediti

  Creato da Bear Giles, <bgiles@coyotesong.com>

  I miei ringraziamenti vanno a:

    Brion Vibber, <brion@pobox.com>, che ha scritto il (preliminare)
     TrueType HOW-TO (http://pobox.com/~brion/linux/TrueType-HOWTO.html)

    Doug Holland, <meldroc@frii.com>, che ha scritto l'XFree86 Font
     Deuglification HOW-TO  (http://www.frii.com/~meldroc/Font-
     Deuglification.html)



  1.3.  Link addizionali

  Anche se questi link non discutono direttamente problematiche relative
  ai sistemi o ai pacchetti Debian, possono comunque risultare
  interessanti per i lettori di questo mini-HOWTO.

    Using TrueType Fonts with RedHat Linux
     (http://www.kegel.com/linux/tt.html)

    X Font Tools (http://www.hex.net/~cbbrowne/xfonts.html)

    Getting fonts to look pretty under GNU/Linux for applications like
     StarOffice (http://king.ccrc.wustl.edu/~zubin/fonts.html)

    How to use True Type  fonts for StarOffice Under Linux
     (http://www.mindspring.net/~john_mcl/adding_fonts.html)


  1.4.  Storia delle revisioni


    0.1. 16 set. 1999: prima versione.

    0.2. 16 set. 1999: aggiunta la sezione Link addizionali.

    0.3. 10 gen. 2000: commenti dei lettori!  Aggiunti chiarimenti su
     diversi dettagli.


  1.5.  Commenti

  Commenti, correzioni, aggiunte e critiche sono sempre benvenuti.  Mi
  si pu raggiungere a bgiles@coyotesong.com.


  1.6.  Progetti correlati


    FreeType http://www.freetype.org/ <http://www.freetype.org/>

     Il motore FreeType  un motore libero e portabile per il rendering
     TrueType.  Il codice  una buona implementazione totalmente
     indipendente da quelle di Apple o Microsoft (comunque recentemente
      sorto un problema riguardo un possibile brevetto della Apple).
     FreeType  una libreria non un server per i font o una libreria
     completa per il rendering del testo.


  1.7.  Distribuzione

  Questa  la prima stesura e mi aspetto di cambiarla significativamente
  dopo la sua pubblicazione.  Invito a fare riferimento all'ultima
  versione a http://www.dimensional.com/~bgiles/debian-tt.html.  La home
  permanente per questo documento alla fine sar a
  http://www.coyotesong.com/


  2.  Schermi (quel che non vi hanno mai detto)

  Prima di tuffarci nell'impostazione dei font TrueType sotto X,
  rivediamo la differenza tra punti e pixel... e perch ce ne
  preoccupiamo tanto.

  Tutti i font visualizzati sono misurati in punti.  Un pollice 
  esattamente 72 punti.  Perch 72?  In parte a causa delle limitazioni
  delle macchine tipografiche meccaniche e in parte perch  sempre
  divisibile per 2, 3, 4, 6, 8, 9, 12, 18 e 24.  Non  male notare che
  l'unit predefinita in PostScript  un punto.

  (Nota storica: Ho mentito.  Prima dell'introduzione di PostScript un
  pollice era esattamente 72,27 punti, ma tale dimensione del punto era
  stata impostata nell'epoca delle stampatrici meccaniche con stampi in
  metallo. Con gli schermi dei computer e le stampanti laser  semplice
  ottenere font di qualsiasi dimensione e quindi 72 ha molto pi senso
  per le ragioni suddette.)

  Come regola generale, la maggior parte del testo dovrebbe essere tra i
  7 e i 12 punti.  Qualsiasi cosa pi piccola di 6 punti  detto
  letteralmente fine print.  Le stampanti ad aghi usano caratteri a 9
  o 12 punti (rispettivamente per 8 o 6 righe/pollice).

  Viceversa, tutti i driver video devono misurare i font usando il pixel
  come unit fondamentale.  Per il proprio driver video, il proprio
  schermo  1024x800 pixel, non 10 per 8 pollici (o 720 per 576 punti).

  Per passare da punti (usati per specificare la dimensione dei font) a
  pixel (usati per i riferimenti nella memoria video) si deve conoscere
  la risoluzione del proprio schermo.  Questa  solitamente misurata in
  punti per pollice (dpi) (Ndt: point sono i punti usati per
  misurare i font, mentre questi punti sono dot), sebbene siano in
  realt pixel per pollice.  Questa  l'unit di misura utilizzata in
  due insiemi di font bitmap inclusi con XFree86: l'insieme fonts-75 
  pensato  per l'uso con schermi di fascia bassa con una risoluzione di
  circa 75 dpi, mentre fonts-100  pensato per schermi di fasci media
  con una risoluzione di circa 100 dpi.  Non ci sono font bitmap per
  l'uso con schermi di fascia elevata con risoluzione oltre i 120 dpi.

  Come esempio concreto, uno schermo di 13" di diagonale (11.1"
  utilizzabili) che visualizza un'immagine di 640x480 pixel ha una
  risoluzione di 72.0 dpi.  Questa Non  Una Coincidenza.  Infatti, la
  maggior parte delle pagine web (e applicazioni Microsoft) sono
  progettate attorno ad uno schermo canonico con una risoluzione di
  esattamente 72 dpi.  La configurazione predefinita di XFree86 assume
  uno schermo con una risoluzione di 75 dpi.

  Tornando al mondo reale, nessuno usa pi i video a 640x480, cos come
  nessuno usa pi schermi con 13" di diagonale.  Poich le schede video
  sono migliorate pi velocemente dei monitor non  strano avere una
  configurazione come la mia: schermo con 19" di diagonale (pi di 17"
  usabili), 1600x1200 pixel, risoluzione di 117 dpi.

  Se utilizzo una configurazione standard di X, tutti i miei font sono
  approssimativamente 2/3 delle dimensione voluta.  Non 
  un'esagerazione dire che tutti i font sembrano ridotti di un'ordine
  di grandezza: i font pi grandi (12 punti) sembrano quelli medi (9
  punti), mentre i font medi (9 punti) sembrano quelli piccoli (6
  punti).

  Si possono fare tre cose per correggere questo problema.  Per prima
  cosa si dovrebbe dire al server X la risoluzione reale del proprio
  schermo:

       /etc/X11/xdm/Xservers

       ______________________________________________________________________
       #:0 local /usr/X11R6/bin/X -bpp 16
       :0 local /usr/X11R6/bin/X -bpp 16 -dpi 120
       ______________________________________________________________________




  Poi, ci si deve assicurare di usare come font bitmap preferenziali
  quelli a 100 dpi piuttosto di quelli a 75 dpi:

       /etc/X11/XF86Config

       ______________________________________________________________________
       Section "Files"
           RgbPath    "/usr/X11R6/lib/X11/rgb"
           FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
           FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
           FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
           FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
           FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
       EndSection
       ______________________________________________________________________




  Per finire, se il server X non trova un font bitmap che corrisponde
  esattamente a quanto richiede, prover a scalare un font simile
  replicando i pixel (pixel replication).  Raramente i risultati sono
  piacevoli da usare.  Assumendo di possedere un sistema ragionevolmente
  potente, possiamo dire al server di usare come prima scelta i font
  scalati, poi i bitmap per le corrispondenze esatte e come ultima
  risorsa i bitmap scalati.


       /etc/X11/XF86Config

       ______________________________________________________________________
       Section "Files"
           RgbPath    "/usr/X11R6/lib/X11/rgb"
           FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
           FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
           FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
           FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
           FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
           FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
           FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
       EndSection
       ______________________________________________________________________





  2.1.  Uno sguardo al prossimo XFree86 4.0

  Sono appena venuto a sapare che XFree86 supporter le comunicazioni
  DDC, se sia il monitor che la scheda video le supportano.  Ci
  permetter al server X di interrogare il monitor sulle sue reali
  dimensioni fisiche, permettendogli cos di calcolare automaticamente
  le impostazioni DPI corrette.

  Si dovranno ancora fare le modifiche appropriate al proprio font path
  poich al server non dovrebbe essere permesso ignorare le impostazioni
  esplicite dell'utente in base a ci che ha scoperto.


  2.2.  Panoramica: Preparazione prima di modificare i file di configu
  razione di X

  Ogni volta che si fanno delle modifiche ai file di configurazione di
  X11,  un'idea eccellente disabilitare XDM mettendo exit 0 da qualche
  parte all'inizio del file.  Se non lo si fa e X per qualche ragione
  non riesce a partire, XDM metter il sistema in un brutto circolo
  vizioso dal quale  difficile uscire.  Uomo Avvisato, Mezzo Salvato.


  3.  Visualizzazione ( X  e i font server)

  A rigore, non  assolutamente necessario impostare dei font server per
  usare i font TrueType con i server X.  Se si vogliono usare file
  statici invece di un font server, si vedano le istruzioni per
  impostare i font TrueType per ghostscript.


  3.1.  Impostare il font server xfs

  A questo punto assumo si abbia un file /etc/X11/XF86Config funzionante
  che carica le directory specificate esplicitamente nel FontPath.  Lo
  si convertir per usare il font server xfs.

    Installare XFS

     Se non lo si  gi fatto, si installi main/binary-*/x11/xfs_*.deb.

    Configurare XFS

     Si editi /etc/X11/xfs/config e si cambi catalogue per contenere la
     propria FontList.  Pu essere utile anche cambiare il valore di
     default-resolutions (risoluzioni predefinite).

       /etc/X11/xfs/config

       ______________________________________________________________________
       # percorsi nei quali cercare i font
       catalogue =
           /usr/X11R6/lib/X11/fonts/100dpi/:unscaled,
           /usr/X11R6/lib/X11/fonts/75dpi/:unscaled,
           /usr/X11R6/lib/X11/fonts/misc/,
           /usr/X11R6/lib/X11/fonts/Speedo/,
           /usr/X11R6/lib/X11/fonts/Type1/,
           /usr/X11R6/lib/X11/fonts/100dpi/,
           /usr/X11R6/lib/X11/fonts/75dpi/
       # x1,y1,x2,y2,...
       default-resolutions = 100,100,75,75
       ______________________________________________________________________




    Riavviare XFS

     Riavviare XFS nel modo solito di Debian:

       shell di root

       ______________________________________________________________________
       # /etc/init.d/xfs restart
       ______________________________________________________________________




    Verificare che XFS stia funzionando

     Prima di modificare il file XF86Config, si dovrebbe verificare che
     il server xfs stia funzionando elencando i font tramite il font
     server:

       shell utente

       ______________________________________________________________________
       $ fslsfonts -server unix/:7100
       -adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1
       -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-1
       -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-1
       ....
       ______________________________________________________________________




    Modificare /etc/X11/XF86Config per usare xfs

     Ora si  pronti per dire al server X di usare il font server xfs.
     Si mantenga un font path statico come posizione di ripiego in caso
     di problemi con xfs (conviene mantenere misc poich contiene
     fixed, il font predefinito).

       /etc/X11/XF86Config

       ______________________________________________________________________
       Section "Files"
           FontPath   "unix/:7100"
           FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
       EndSection
       ______________________________________________________________________




    Riavviare X

     Riavviare X con startx, a meno che non si viva pericolosamente.  Se
     cos , mi si nomini beneficiario della propria polizza vita
     inusualmente grande e si riavvii xdm.

    Verificare che i font di XFS siano visibili

     Una volta stabilita una sessione X, si pu verificare che il
     proprio server veda tutti i font di xfs elencandoli attraverso il
     server X.

       shell utente

       ______________________________________________________________________
       $ xlsfonts
       -adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1
       -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-1
       -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-1
       ....
       ______________________________________________________________________





  3.2.  Impostare il font server xfstt  ed installare i font TrueType

  A questo punto assumo che si abbia un font server xfs funzionante e
  che si voglia aggiungere il supporto TrueType attraverso xfstt.

    Installare XFSTT

     Se non lo si  gi fatto, si installi
     main/binary-*/x11/xfstt_*.deb.

    Installare i font TrueType

     Si copino i propri font TrueType nella directory
     /usr/share/fonts/truetype.  Questi file solitamente hanno
     l'estensione .ttf e dovrebbero avere i permessi 0444.

    Riavviare il font server XFSTT

     Si riavvii il server xfstt con l'opzione force-reload

       shell di root

       ______________________________________________________________________
       # /etc/init.d/xfstt force-reload
       ______________________________________________________________________




    Verificare che XFSTT stia funzionando

     Prima di modificare il nostro file XF86Config, si dovrebbe
     verificare che il server xfstt stia funzionando.

     Importante: il server xfstt della Debian  in ascolto sulla porta
     7101 non sulla 7100.  Inoltre i permessi predefiniti richiedono che
     si esegua questa interrogazione come root.

       shell di un utente e di root

       ______________________________________________________________________
       $ fslsfonts -server unix/:7101
       _FSTransSocketUNIXConnect: Can't connect: errno = 111
       fslsfonts:  unable to open server "unix/:7101"

       # fslsfonts -server unix/:7101
       -ttf-arial black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
       -ttf-arial mt black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
       -ttf-arial narrow-bold-i-normal-bold italic-0-0-0-0-p-0-iso8859-1
       ______________________________________________________________________




    Modificare /etc/X11/XF86Config per usare xfstt

     Ora si  pronti per dire all'X server di usare il font server
     xfstt.  Vogliamo che preferibilmente usi i font TrueType piuttosto
     che tutti gli altri.

       /etc/X11/XF86Config

       ______________________________________________________________________
       Section "Files"
           FontPath   "unix/:7101"
           FontPath   "unix/:7100"
           FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
       EndSection
       ______________________________________________________________________





    Verificare che i font di XFSTT siano visibili

     Una volta stabilita una sessione X, possiamo verificare che il
     nostro server veda tutti i font TrueType elencandoli.


       ______________________________________________________________________
       $ xlsfonts | grep ttf
       -ttf-arial black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
       -ttf-arial mt black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
       -ttf-arial narrow-bold-i-normal-bold italic-0-0-0-0-p-0-iso8859-1
       ....
       ______________________________________________________________________




  3.3.  Usare i font TrueType

  A questo punto dovrebbe essere possibile usare un font TrueType in
  applicazioni come GIMP, Netscape o StarOffice.  Poich la maggior
  parte dei font TrueType non sono equispaziati (monospaced)
  probabilmente non conviene usarli con xterm.


  3.4.  Installare font TrueType addizionali

  Se si sta usando il font server xfstt,  banale installare font
  TrueType addizionali.

    Copiare i nuovi font in /usr/share/fonts/truetype/

    Riavviare xfs con /etc/init.d/xfs restart


  3.5.  Internazionalizzazione

  xfstt ha la capacit di generare diverse codifiche di font, a patto
  che i font TrueType contengano i glifi (glyph) necessari.  Per
  abilitare font diversi da iso8859-1/unicode-1, si deve modificare
  manualmente lo script /etc/init.d/xfstt:


       /etc/init.d/xfstt

       ______________________________________________________________________
       - start-stop-daemon --start --quiet --exec $XFSTT -- \
             --port $portno --daemon
       + start-stop-daemon --start --quiet --exec $XFSTT -- \
             --port $portno --encoding iso8859-1,koi8-r,windows-1252,symbol-0 \
             --daemon
       ______________________________________________________________________




  Le codifiche riconosciute in Debian 2.1 sono:


    iso8859-1     (Latin 1 - Europa occidentale)

    iso8859-2     (Latin 2 - Europa centrale e orientale)

    iso8859-3     (Latin 3 - esperanto e maltese)


    iso8859-4     (Latin 4 - rimpiazzata da Latin 6)

    iso8859-5     (cirillico)

    iso8859-6     (arabo)

    iso8859-7     (greco)

    iso8859-8     (ebraico)

    iso8859-9     (Latin 5 - Latin 1 con turco invece di islandese)

    iso8859-10    (Latin 6 - lingue nordiche, rimpiazza Latin 4)

    koi8-r        (cirillico)

    windows-1250  (Europa centrale)

    windows-1251  (cirillico)

    windows-1252

    windows-1253  (greco)

    windows-1254

    windows-1255

    windows-1256

    windows-1257

    symbol-0

    wingding-0

    wingreek-0

    cp-437        (varie pagine di codice IBM)

    cp-737

    cp-850

    cp-851

    cp-852

    cp-853

    cp-855

    cp-857

    cp-860

    cp-861

    cp-862

    cp-863

    cp-864

    cp-865

    cp-866

    cp-869

    cp-895

    atari-st

    unicode-2

  I primi 128 caratteri nelle codifiche iso8859-x sono sempre l'ASCII.
  I font windows- abbracciano e estendono gli iso8859-1 con caratteri
  addizionali come smart quotes (poich queste estensioni, come le
  smart quotes non sono definite in iso8859-1, sono solitamente rese
  con dei punti di domanda).

  Eccellenti fonti di informazioni aggiuntiva sulle codifiche dei set di
  caratteri si possono trovare a

    http://ppewww.ph.gla.ac.uk/%7Eflavell/iso8859/iso8859-pointers.html,

    http://anubis.dkuug.dk/i18n/ e

    http://czyborra.com/charsets/iso8859.html.



  3.6.  Questioni di sicurezza

  Qua sopra ho usato i socket Unix, ma i pacchetti Debian standard
  configurano anche xfs e xfstt per restare in ascolto sulle porte 7100
  e 7101, rispettivamente.  L'accesso a queste porte dovrebbe essere
  controllato dal campo trusted-clients in /etc/X11/xfs/config, ma
  questa opzione non  implementata in XFree86 3.3.2.3a.

  Ci significa che chiunque, da ovunque, pu connettersi al font
  server.  Poich xfs (e presumibilmente xfsts) si clonano per
  supportare pi utenti esiste un banale attacco tipo denial-of-service
  contro questi sistemi.  Probabilmente  sicuro utilizzare i font
  server su linee in dialup (poich si  presenti per gestire il
  problema), ma gli utenti di DSL e cable modem dovrebbero usare un
  firewall.


  4.  Stampa ( ghostscript )

  A partire dalla versione 4, ghostscript supporta i font TrueType con
  un'opzione in compilazione.  Due pacchetti Debian forniscono
  ghostscript:

    main/binary-*/text/gs_*.deb versione 5.10 conforme alle DFSG,

    non-free/binary-*/gs-aladdin_*.deb versione 5.50 non conforme alle
     DFSG.

     Entrambe le versioni supportano i font TrueType.


  4.1.  Configurare Ghostscript  per usare i font TrueType

  Se si ha un server xfstt funzionante,  facile configurare ghostscript
  per usare i font TrueType.  Si esegua semplicemente il comando
  seguente:



  ______________________________________________________________________
  # xfstt --gslist --sync >> /etc/gs.Fontmap
  ______________________________________________________________________




  Nella pratica ho scoperto che trae vantaggio da alcune piccole
  modifiche alle definizioni dei font generate da xfstt.  Per prima
  cosa, se un nome di font non contiene alcuno spazio, cambio il nome
  nella notazione usuale.  Se un nome di font contiene degli spazi,
  rimpiazzo tutti gli spazi con trattini e il nome originale viene
  aggiunto come alias per il nuovo nome.

  Per finire, antepongo TTF- (o MS-) a tutti i nomi dei font per
  minimizzare i problemi causati da font TrueType che hanno lo stesso
  nome di font preesistenti.

  Quindi


       ______________________________________________________________________
       (Arial)               (/usr/share/fonts/truetype/arial.ttf)   ;
       (Arial Bold Italic)   (/usr/share/fonts/truetype/arialbi.ttf) ;
       ______________________________________________________________________




  diventa


       ______________________________________________________________________
       /MS-Arial             (/usr/share/fonts/truetype/arial.ttf)   ;
       /MS-Arial-Bold-Italic (/usr/share/fonts/truetype/arialbi.ttf) ;
       (Arial Bold Italic)   /MS-Arial-Bold-Italic                   ;
       /Arial                /MS-Arial                               ;
       ______________________________________________________________________




  Gli alias assicurano che ghostscript e xfstt possano ancora
  specificare lo stesso font con un nome comune.

  Molto pi importante, con le modifiche ai nomi dei font  possibile
  istruire ghostscript ad usare il font TrueType invece dei font
  standard.  La documentazione afferma che questo  possibile anche con
  la notazione con le parentesi, ma io non sono riuscito a farlo
  funzionare.

  Per esempio, possiamo istruire ghostscript a rimpiazzare i font
  Helvetica con i font Arial gratuiti della Microsoft aggiungendo le
  righe seguenti al file /etc/gs.Fontmap:


       ______________________________________________________________________
       /Helvetica               /MS-Arial              ;
       /Helvetica-Oblique       /MS-Arial-Italic       ;
       /Helvetica-Bold          /MS-Arial-Bold         ;
       /Helvetica-BoldOblique   /MS-Arial-Bold-Italic  ;
       ______________________________________________________________________




  Alias simili possono essere definiti per gli altri font standard.
  Questi alias possono essere molto utili sulle stampanti samba che
  servono client Windows.


  4.2.  Stampare i campioni dei font TrueType

  Il modo migliore per verificare che ghostscript sia configurato
  propriamente per usare i font TrueType  di stampare le pagine
  campione dei font.  Assumendo di usare ghostscript 5.50 e che sia la
  propria coda di stampa predefinita, si possono stampare tutti i font
  TrueType con il seguente comando:


       ______________________________________________________________________
       # xfstt --gslist --sync | printfont
       ______________________________________________________________________




  dove printfont  il seguente script shell


       ______________________________________________________________________
       #!/bin/sh

       set -e
       IFS= ')'

       while read fontname rest
       do
           cat << EOM | lpr
       %!PS
       (/usr/lib/ghostscript/5.50/prfont.ps) run
       $fontname) DoFont
       EOM
       done
       ______________________________________________________________________




  Se si vogliono stampare solo alcuni font, lo script seguente sar pi
  facile da usare:


       ______________________________________________________________________
       #!/bin/sh

       set -e
       while read -p "Nome di font, o ^D per uscire: " fontname
       do
           cat << EOM | lpr
       %!PS
       (/usr/lib/ghostscript/5.50/prfont.ps) run
       $fontname DoFont
       EOM
       done
       ______________________________________________________________________






  5.  Generazione dei contenuti

  5.1.  Generare le metriche di font AFM

  I file di metrica AFM non sono necessari per visualizzare file gi
  esistenti con i font TrueType, ma sono necessari per creare nuovi
  file.  Per generare questi file di metrica potrebbe essere usato il
  programma di ghostscript /usr/lib/ghostscript/5.50/printafm.ps, ma io
  ho trovato che il programma ttf2afm del pacchetto tetex-bin  pi
  facile da usare.

  Lo script seguente generer un file afm per tutti i font TrueType in
  una directory:



       ______________________________________________________________________
       #!/bin/sh

       set -e

       for i in *.TTF
       do
           /usr/bin/ttf2afm $i > ${i%TTF}afm
       done

       for i in *.ttf
       do
           /usr/bin/ttf2afm $i > ${i%ttf}afm
       done
       ______________________________________________________________________




  Un problema minore con ttf2afm  che alcune applicazioni si aspettano
  che i file afm comincino con il tag StartFontMetrics, mentre i file
  creati da ttf2afm iniziano con un commento.  Questo problema 
  facilmente risolvibile modificando ciascun file con un editor di
  testo.


  5.2.  Generare i file font.map

  Una volta che si hanno i file afm, si deve dire al sistema come
  trovarli.  Questo spesso  fatto attraverso il file font.map.

  Non mi  stato possibile trovare documentazione sul formato di questo
  file, diversamente da fonts.dir, fonts.scale e fonts.alias, tutti
  creati dal programma mkfontdir.  Comunque il formato minimo sembra
  abbastanza semplice:


    Nome del font, senza spazi

    nome del file AFM, senza estensione

  Gli alias sembrano essere implementati tramite voci multiple e
  l'estensione dei file deve essere in caratteri minuscoli.


  5.3.  Manipolazione di immagini: GIMP

  GIMP  il programma di grafica e manipolazione di immagini della GNU.
  Non  servito fare modifiche ulteriori per usare i font TrueType con
  gimp.
  5.4.  Conversione da ASCII a PostScript: enscript

  Enscript  un programma che converte ASCII in PostScript.  Altri
  programmi che servono per scopi simili sono a2ps e mpage.  Non
  riformatta il testo e solitamente  usato per stampare listati di
  codice sorgente.

  Per usare i font TrueType con enscript, si devono fare due cose:

    Aggiungere /usr/share/fonts/truetype al proprio AFMPath.

    Specificare un font TrueType, esplicitamente o come alias di un
     font predefinito.

  Per i dettagli si veda la documentazione di enscript.

  Una volta fatte queste modifiche, non ho avuto problemi ad usare i
  font TrueType.


  5.5.  Formattazione e composizione di testi: groff

  Groff  l'interfaccia Gnu al sistema di formattazione di documenti
  groff/troff.   con le pagine man che si pu meglio apprezzare la
  potenza di Groff.

       shell utente

       ______________________________________________________________________
       $ zcat /usr/man/man1/groff.1.gz | groff -man | lpr
       ______________________________________________________________________




  A parte le pagine man, una quantit incredibile di documentazione Unix
  usa la formattazione troff con le macro ms (e qualche volta me).  Il
  pacchetto xbooks di Debian, per esempio, contiene 43 file che usano
  troff con le macro ms.  Con groff questo materiale pu essere stampato
  in maniera elegante.

  Groff  un sistema molto potente, ma  il nipote (o il pronipote) di
  un programma utilizzato per la composizione dei testi per le presse di
  stampa degli anni '60.  Il supporto dei font in groff riflette questo
  retaggio. Groff, diversamente dai suoi predecessori, usa PostScript
  come formato d'uscita predefinito e quindi il precedente lavoro fatto
  con ghostscript risolve met del problema: groff non si deve
  preoccupare della lettura dei file dei font TrueType.  Ha bisogno di
  avere a disposizione metriche di font accurate e questa sezione
  descrive come rigenerare i file di groff necessari:

       File di descrizione PostScript di Groff

       ______________________________________________________________________
       /usr/share/groff/font/devps/DESC
           File di descrizione del dispositivo
       /usr/share/groff/font/devps/text.enc
           Codifica usata per i font testo
       /usr/share/groff/font/devps/generate/textmap
           Mappa predefinita
       /usr/share/groff/font/devps/generate/Makefile
           Makefile standard
       ______________________________________________________________________



  Si deve modificare il Makefile,

       /usr/share/groff/font/devps/generate/Makefile

       ______________________________________________________________________
       - afmdir=/usr/local/afm
       + afmdir=/usr/share/fonts/truetype
       ______________________________________________________________________




  cambiando il nome dei font con il loro equivalente TrueType (e.g., se
  si usano i font TrueType gratuiti di Microsoft si rimpiazzer Hel
  vetica con Arial), e modificare TEXTFONTS e simile per includere solo
  questi font ridefiniti.

  Si deve pure modificare /usr/share/groff/font/devps/generate/afmname
  per usare i nomi dei font TrueType e i file afm e per rimuovere
  un'opzione "-e" da awk.

  Dopo tutto questo, si possono ricostruire le tabelle di groff con

       shell utente

       ______________________________________________________________________
       $ cd /usr/share/groff/font/devps
       $ make -f generate/Makefile
       ______________________________________________________________________




  Come al solito, il modo migliore per verificare le modifiche  usare
  font facilmente riconoscibili. E.g. se si stanno usando i font
  TrueType gratuiti della Microsoft si pu usare Mistral per TR.

  (Il 1 aprile prossimo mi aspetto delle royalty da chiunque
  riconfigurer il proprio sistema per stampare le pagine man con il
  font Old English!)


  5.6.  Formattazione e composizione di testi: TeX

  TeX  un altro insieme molto comune di programmi per la formattazione
  e composizione del testo presente sulla maggior parte dei sistemi
  GNU/Linux.

  I font di TeX possono essere creati con mktexmf, ma ho poche
  informazioni sull'esatto processo.  Maggiori dettagli saranno forniti
  al pi presto.


  6.  Domande non risposte


    Applicazioni

     La principale domanda senza risposta  perch se netscape
     communicator pu usare i font TrueType, e ghostscript pu usare gli
     stessi font TrueType, le pagine stampate da netscape non
     assomigliano a quelle sullo schermo.

     La risposta breve  che netscape genera l'output PostScript con i
     font standard (Helvetica e Times-Roman) invece di quelli
     specificati dall'utente o specificati nel file HTML.  La risposta
     lunga  che non ho assolutamente idea del perch forzi questo
     comportamento o se ci sia un modo per evitarlo.


  7.  Ottenere i font TrueType

  Se si cercano font TrueType ecco qui diversi posti dove si pu
  cominciare a guardare:

    c:\windows\fonts sul fermaporte che c' nell'angolo

    Microsoft's Free TrueType Fonts
      <http://www.microsoft.com/typography/fontpack/>

    Acid Fonts
      <http://www.acidcool.com/>

    The Font Ring
      <http://www.webring.org/cgi-bin/webring?ring=fontring&list>


  7.1.  Un commento sull'uso dei font TrueType gratuiti di Microsoft

  Nessun articolo sul supporto TrueType sotto Linux potrebbe essere
  completo senza un commento sui font TrueType gratuiti di Microsoft.
  Vediamo prima se sia legale utilizzare questi font gratuiti di
  Microsoft:

        <http://www.microsoft.com/typography/faq/faq8.htm>

       ____________________________________________________________
       Q. Cosa posso fare con questi font?
           Chiunque pu scaricare ed installare questi font per il
            proprio uso personale.
           I progettisti [di pagine web] possono specificare questi
            font all'interno delle loro pagine web
          ...
       ____________________________________________________________




  Chiaramente,  legale e ragionevole per gli utenti Linux scaricare e
  installare questi font e quindi vorrei ringraziare la Microsoft per
  averli resi disponibili.

  Poich un'altra clausola restringe la loro redistribuzione in
  qualsiasi forma che aggiunga valore a prodotti commerciali non mi
  aspetto di vedere molto presto dentro a main il pacchetto con questi
  font (potrebbero essere impacchettati dentro a non-free, forse
  utilizzando un pacchetto installatore...?).

  Ora che questo  stato chiarito, voglio dirigere la vostra attenzione
  sulla seconda clausola.  Microsoft incoraggia attivamente gli
  sviluppatori di pagine web a specificare i suoi font nelle pagine web
  e molti editor HTML chiamano esplicitamente questi font.

  Molti siti web, quando vengono visti con un Netscape/Linux standard,
  possono al pi essere descritti come... decifrabili.  Alcuni non lo
  sono nemmeno.  Non  una coincidenza che i siti che sono, diciamo,
  leggibili sono solitamente quelli che specificano esplicitamente tutte
  le informazioni sui font nelle loro pagine web.

  Dopo aver installato questi font ho notato che la maggior parte di
  questi siti problematici sono diventati significativamente pi
  attraenti.  Molti erano ancora altamente Windows-centrici, ma almeno
  non devo ritrarmi schifato ogni volta che carico le loro pagine.

  La mia raccomandazione  di installare i font TrueType gratuiti della
  Microsoft per il proprio browser.  Non  richiesto di creare pagine
  web usandoli e nemmeno di configurare ghostscript per usarli.



  8.  Copyright (in inglese)

  Copyright  1999 by Bear Giles.

  Unless otherwise stated, Linux HOWTO documents are copyrighted by
  their respective authors.  Linux HOWTO documents may be reproduced and
  distributed whole or in part, in any medium physical or electronic, as
  long as this copyright notice is retained in all copies.  Commercial
  redistribution is allowed and encouraged; however, the author would
  like to be notified of any such distributions.

  All translations, derivative works, or aggregate works incorporating
  any Linux HOWTO documents must be covered under this copyright notice.
  That is, you may produce a derivative work from a HOWTO and impose
  additional restrictions on distribution.  Exceptions to these rules
  may be granted under certain conditions; please contact the Linux
  HOWTO cordinator for more information.

  In short, we wish to promote dissemination of this information through
  as many channels as possible.  However, we do wish to retain copyright
  on the HOWTO documents, and would very much like to be notified of any
  plans to redistribute the HOWTOs, this one in particular!  Web page
  authors are free to link to this HOWTO without restriction, though the
  author would appreciate an email informing him of this, just so he can
  boost his ego by knowing who else reads and links to this document.

  Many of the terms mentioned in this document are trade names.  Unless
  otherwise stated, all trademarks are property of their respectve
  owners.





























  The Linux Ultra-DMA Mini-Howto
  Brion Vibber, brion@pobox.com
  v2.1, 27 Maggio 1999

  Questo documento  concepito per spiegare come usare i dischi e le
  interfacce Ultra-DMA alias Ultra-ATA alias Ultra33 e Ultra66 con
  Linux.  La versione pi recente di questo mini howto si pu prelevare,
  in formato HTML, su http://pobox.com/~brion/linux/Ultra-DMA.html.

  1.  Introduzione


  Questo documento  concepito per spiegare come usare i dischi e le
  interfacce Ultra-DMA alias Ultra-ATA alias Ultra33 e Ultra66 con
  Linux. In molti casi il loro utilizzo non presenta difficolt, ma dei
  piccoli accorgimenti possono aumentare le prestazioni.  In altri casi,
  avete bisogno di scavalcare ostacoli straordinari semplicemente per
  accedere ai vostri dischi rigidi.


  1.1.  Liberatoria


  L'informazione in questo documento  al meglio della mia conoscenza, 
  corretta e dovrebbe funzionare. Tuttavia potrebbero esserci errori
  tipografici, potrebbero esserci misteriosi errori di trasmissione,
  potrebbero esserci strane incompatibilit nel vostro sistema che
  ostacoleranno le tecniche descritte qui e non le faranno funzionare
  correttamente. Perci, prima di gingillarvi con il vostro disco rigido
  FATE UNA COPIA DI BACKUP DEI DATI CHE VOLETE CONSERVARE!  Se non avete
  ancora fatto dei backup regolarmente, iniziate subito a farli per il
  vostro bene.


  1.2.  Crediti

  Michel Aubry <mailto:giovanni@sudfr.com> - Patch per abilitare l'UDMA
  per i chipset correlati ai VIA per i kernel <=2.0.33 & altre
  informazioni, grand unified UDMA patch per 2.0.34+

  Andrew Balsa <mailto:andrebalsa@altern.org> - Fornito molte
  informazioni sull'UDMA in generale e sulla patch Udma-generic per
  Intel TX, SiS, e VP1 sui kernel <=2.0.33; e anche sulla grand unified
  UDMA patch per i kernel 2.0.34+

  Maxime Baudin - Traduzione in francese

  Bokonon - "Controller" vs. "interfaccia"

  John G. <mailto:prefect@ipass.net> - Patch per il chipset VIA VP2  per
  i kernel <=2.0.33 & informazioni

  Martin Gaitan - Rimedio per l'installazione sulla ide0/ide1 della
  Promise Ultra33

  Andre M. Hedrick <mailto:hedrick@Astro.Dyer.Vanderbilt.Edu> - Grand
  unified UDMA patch per i kernel 2.0.34+, Artop ATP850UF

  Norman Jacobowitz - (Bugged me) per aggiungere informazioni sulla VP3

  John Levon - Informazioni sulle schede madri TX Pro

  Peter Monta - Informazioni sull'utilizzo di due schede per l'Ultra33

  Masayoshi Nakano - Traduzione in giapponese

  Gadi Oxman <mailto:gadio@netvision.net.il> - La patch per la Promise
  Ultra33 per i kernel <=2.0.34 & scoperta dei "numeri segreti" per il
  rimedio.


  Andy Pearce - Proposte informazioni aggiuntive sui file di dispositivo
  supplementari per  hde-h

  Andrei Pitis <mailto:pink@roedu.net> - Patch per LILO

  Brion Vibber <mailto:brion@pobox.com> - Il documento stesso


  1.3.  Storia del documento


  v2.1, 27 Maggio 1999: Corrette alcune lacune ed errori minori della
  2.0 e aggiunto le informazioni sulla Promise Ultra66 e sui kernel
  2.2/2.3.

  v2.0, 7 Agosto 1998: Aggiornamenti pi importanti e quasi totale
  ristrutturazione del documento per quanto riguarda le interfacce a
  bordo (schede madri) e le interfacce non a bordo (schede aggiuntive);
  la Grand Unified UDMA patch (una parte della Patch Jumbo) per il
  kernel 2.0.35. Inseriti i crediti in ordine alfabetico a partire
  dall'ultimo nome. Sostituito "controller" con "interfaccia" dove
  sembrava tecnicamente pi corretto. Aggiunte informazioni su come
  abilitare/disabilitare l'UDMA, la lista nera e altro!


  v1.45, 6 Luglio 1998: Aggiornamenti minori - Patch per la Promise
  Ultra33 per la Red Hat 5.1 e il kernel 2.0.34, patch per LILO per
  avviare dalle interfacce PCI come la Promise Ultra33


  v1.41, 3 Maggio 1998: Sistemati un paio di errori tipografici,
  aggiunti i traduttori tra i crediti.

  v1.4, 28 Aprile 1998: Patch UDMA-Generic, altre informazioni pi
  generali. Aggiunta la sezione sui diritti di riproduzione.

  v1.3, 5 Marzo 1998: Informazioni sui VIA VP3, migliori istruzioni su
  come applicare la patch, suggerimento sulla pi recente patch per la
  Promise.

  v1.2, 27 Gennaio 1998: Informazioni aggiuntive sul rimedio per la
  Promise.

  v1.1, 21 Gennaio 1998: Nuove informazioni sui chipset VIA, installare
  con la Promise Ultra33, e abilitare i modi di trasferimento Bus Master
  & UDMA.

  v1.0, 19 Gennaio 1998: Pi o meno completa,  la prima versione fatta
  in SGML.


  1.4.  Diritti di riproduzione


  Questo documento pu essere liberamente copiato e distribuito a scopo
  informativo. Non pu essere modificato, tranne che per essere
  riformattato, senza il permesso dell'autore. Se volete tradurre questo
  documento in un'altra lingua, potete farlo, tuttavia dovete contattare
  prima l'autore, cosicch le versioni aggiornate di questo documento
  possano essere inviate immediatamente sia al traduttore sia al Linux
  Documentation Project.
  2.  Cos' l'Ultra-DMA e perch dovrei volerlo?

  Segue una breve panoramica sui dischi basati sulle tecnologie IDE:


  2.1.  IDE, EIDE & ATAPI


  Queste sono vecchie tecnologie per i dischi. Molti dischi rigidi e
  interfacce per i dischi non SCSI che potete comprare oggi o che
  probabilmente state usando sono EIDE, bench molti dei dischi pi
  grandi ora disponibili siano UDMA.


  2.2.  Bus Master DMA


  Il Bus Master DMA  una tecnologia per aumentare la velocit di
  trasferimento dei dati dei dischi rigidi che richiede il supporto
  della scheda madre e del BIOS, e almeno qualche supporto dal disco.
  Potete imparare di pi su
  http://developer.intel.com/design/pcisets/busmastr/FAQs.htm.


  2.3.  Ultra-DMA alias Ultra-ATA alias Ultra33 alias...

  L'Ultra-DMA ha molti nomi, ma qui lo chiameremo solo UDMA.

  UDMA  la tecnologia pi avanzata che fornisce un volume di traffico
  fino a 33.3 MB/s nell'UDMA mode 2 e fino a 66.7 MB/s nell'UDMA mode 4,
  da due a quattro volte maggiore rispetto l'EIDE, a un prezzo molto pi
  basso di quello dello SCSI. Molti nuovi computer funzionano con grandi
  dischi UDMA e con interfacce UDMA, ed  possibile aggiungere una
  scheda per l'interfaccia (come la Promise Ultra 33 o Ultra 66) ad un
  sistema esistente per aumentare la velocit anche dei vecchi dischi
  non UDMA. Potete apprendere maggiori dettagli sull'UDMA su
  http://www.quantum.com/src/whitepapers/ultraata/.  Notate che la
  lunghezza del cavo deve essere tenuta pi corta per l'UDMA, rispetto
  al DMA semplice, preferibilmente meno di 30 cm (12") di lunghezza
  massima. 66 MB/s richiedono un cavo speciale che deve essere tenuto
  anche pi corto.


  2.4.  Perch  sempre "Ultra"


  Prima di proseguire, lasciatemi chiarire un malinteso. Quello che 33 o
  66 MB/s rappresentano  il picco di velocit di trasferimento, e non 
  qualcosa che vedrete molto spesso. Per spiegarlo, riporto un estratto
  dall'UDMA.txt, preso dall'UDMA-generic (la prima patch sull'UDMA
  n.d.t.):















  I picchi di velocit di trasferimento istantanei sono supposti
  andare da 16.6MB/s (PIO mode 4) a 16.6MB/s (DMA mode 2) fino a 33MB/s
  (UDMA).  Nella sua patch al kernel 2.1.55, Kim-Hoe Pang attualmente
  controlla il picco di velocit di trasferimento per l'UDMA con
  un analizzatore logico: 60ns/parola, che trasferisce fino a 33MB/s.
  Notate che il picco di velocit di trasferimento riguarda solo
  il trasferimento dei dati dalla cache del disco EIDE (476kB per il
  disco IBM da 6.4GB ), ed IMHO (In inglese "In My Humble
  Opinion", "Secondo il mio modesto parere" n.d.t.) non
   particolarmente rilevante per la maggioranza degli utenti
  Linux.  Il kernel di Linux tiene nella RAM una cache degli accessi al
  disco pi grande possibile, quindi se un dato non 
  nella cache del kernel c' una piccola possibilit che
  essa possa trovarsi nella cache (molto pi piccola) del disco
  rigido.





  Molto pi rilevante  la velocit di trasferimento sostenuta, la
  velocit alla quale i dati possono essere trasferiti dal disco alla
  memoria principale dove possono essere usati. Un modo facile per
  misurare la velocit di trasferimento sostenuta  di usare hdparm, per
  esempio "hdparm -Tt /dev/hda" per misurare la velocit del primo
  dispositivo IDE.




       Seguono alcuni dati raccolti dopo test esaurienti usando l'utility
       hdparm (scritti anche da Mark Lord):

       velocit di trasferimento sotto Linux del PIO mode 4: +/- 5.2MB/s
       velocit di trasferimento sotto Linux del DMA mode 2: +/- 7.2MB/s
       velocit di trasferimento sotto Linux dell'UDMA mode 2: +/- 9.8MB/s





  Come potete vedere, l'UDMA  quasi due volte pi veloce del normale
  EIDE ed  significativamente pi veloce del normale bus mastering DMA.

  2.5.  Come confrontare l'UDMA con lo SCSI?


  Non ho molti numeri concreti da darvi, ma vi  consenso generale sul
  fatto che i migliori dispositivi SCSI possano dare prestazioni
  migliori dell'UDMA. Tuttavia se guardate recentemente i cartellini dei
  prezzi su alcuni dischi rigidi potete notare che i dischi UDMA tendono
  ad essere molto meno costosi. Il rapporto prestazioni/prezzo favorisce
  l'UDMA in molti casi.


  3.  Usare il vostro disco rigido UDMA con un'interfaccia EIDE


  Questo  facile da fare. Da quando tutti i dischi UDMA sono pienamente
  compatibili all'indietro, appena collegate il vostro disco rigido
  sulla vostra interfaccia EIDE come se fosse un qualsiasi vecchio disco
  rigido, Linux non dovrebbe avere problemi a rilevarlo e ad
  utilizzarlo.



  4.  Usare i vostri dischi rigidi con un'interfaccia UDMA

  Bene, ci sono buone notizie e cattive notizie. La buona notizia  che
  l'interfaccia UDMA pu essere usata sia con i dischi rigidi UDMA e con
  i vecchi dischi rigidi EIDE, e sar molto pi veloce di un'interfaccia
  EIDE.

  La cattiva notizia  che la vecchia serie di kernel (2.0.x)
  attualmente non supporta molto bene l'UDMA. Tuttavia i nuovi kernel
  2.2.x supportano l'UDMA33 e ci sono numerose patch disponibili per i
  kernel attualmente esistenti. Inoltre, alcune interfacce che sono
  incluse in schede piuttosto che incorporate nella scheda madre
  richiedono sia delle patch sia il ricorso ad alcune astuzie per essere
  utilizzate sui kernel pi vecchi. Questo  il motivo per cui esiste
  questo documento. Per spiegare come procurarsi le patch e lavorare
  d'astuzia.



  5.  Interfacce PCI UDMA non a bordo


  Ci sono delle interfacce UDMA su schede PCI che possono essere usate
  per aggiungere il supporto per l'UDMA a un computer esistente senza
  sostituire la scheda madre o per aggiungere il supporto per altri
  quattro dischi a una macchina che ha tutte le interfacce a bordo
  occupate. Pu essere trovata anche preinstallata in alcuni computer,
  specialmente sulle macchine Gateway 2000 e Dell.

  Molte di esse non erano supportate dai vecchi kernel stabili (2.0.x),
  ma dovrebbero funzionare con un kernel 2.2.x - le distribuzioni Red
  Hat 6.0 e SuSE 6.1 sono basate sui kernel 2.2.x, come lo sono le pi
  recenti versioni di molte altre distribuzioni.  Tuttavia alcune delle
  schede pi recenti (per esempio la Promise Ultra66) potrebbero non
  funzionare anche con gli attuali kernel 2.2.x, se voi la avete e non
  potete prendere una distribuzione tra le pi recenti allora dovete
  applicare una patch al kernel, oppure aggiornarlo ad una versione pi
  recente.  Se avete bisogno di installare Linux su un disco rigido
  collegato ad una di queste interfacce, in questo caso avrete bisogno
  di ricorrere a strani stratagemmi.



  5.1.  Promise Ultra33


  Questa  una scheda PCI che ha su di essa due canali UDMA e supporta
  un totale di quattro dischi. Potete vedere descrizioni
  particolareggiate e prezzi su http://www.promise.com.

  Questa scheda  montata a bordo nei pi recenti sistemi pentium II
  modello Gateway 2000 e pu o non pu esserci in modelli pi recenti.

  I kernel 2.0.35 e successivi e tutti i kernel 2.2.x supportano
  l'Ultra33 e non dovreste avere problemi installando una distribuzione
  basata su questi kernel. Tuttavia i pi vecchi kernel stabili (2.0.34
  e precedenti) non lo supportano, e poich molte distribuzioni pi
  vecchie di Linux includono questi vecchi kernel si possono incontrare
  piccole difficolt nell'installare Linux se non volete o non potete
  usare una versione pi recente (per esempio se avete reso standard una
  particolare distribuzione all'interno della vostra organizzazione).

  Installare Linux con l'Ultra33

  Sebbene vi sia una patch per l'interfaccia Ultra33, non  molto
  semplice applicare una patch e ricompilare il vostro kernel se non
  avete mai installato Linux prima d'ora! Cos qui c' un rimedio che vi
  permette di installarlo.  Grazie a Gady Oxman per le seguenti
  informazioni date su come impostare l'interfaccia:

  Ecco un trucchetto che vi consentir di effettuare l'installazione.



       Se possiamo avere accesso alla console con il disco di installazione,
       possiamo anche usare "cat /proc/pci" per visualizzare le impostazioni
       dell'interfaccia Promise:

           RAID bus interface: Promise Technology Unknown device (rev 1).
             Vendor id=105a. Device id=4d33.
             Medium devsel.  IRQ 12.  Master Capable.  Latency=32.
             I/O at 0xe000.   (a)
             I/O at 0xd804.   (b)
             I/O at 0xd400.   (c)
             I/O at 0xd004.   (d)
             I/O at 0xc800.   (e)

       e passare "ide2=a,b+2 ide3=c,d+2" come parametri al kernel dalla riga
       di comando.




  Notate che i numeri non sono gli stessi a seconda di quello che volete
  avere.  Proprio come esempio, i parametri da usare per il set di
  numeri riportato sopra possono essere: "ide2=0xe000,0xd806
  ide3=0xd400,0xd006".  Se voi state usando solo il primo canale
  sull'Ultra33 (per esempio se avete un solo disco, o due che sono uno
  master e l'altro slave sullo stesso canale), allora non avrete bisogno
  di specificare ide3.

  Red Hat 5.1: Fate il boot con il dischetto di avvio e premete invio al
  prompt quando vi viene suggerito. Verr caricato il kernel, poi vi
  domander una lingua, il tipo di tastiera e il metodo di
  installazione. Forse vi verr chiesto da quale supporto effettuare
  l'installazione; non ha importanza ora cosa vi chiede finch potete
  arrivare al passo successivo. In seguito dovreste vedere una schermata
  intitolata "Select Installation Path"; premete ALT+F2 per ottenere un
  prompt dei comandi.

  Avviate "cat /proc/pci", scrivete i numeri come sopra, e riavviate dal
  dischetto di avvio. Ora, digitate "linux ide2= (questo quando date i
  numeri come mostrato sopra) ide3=(altri numeri) ".

  Dovreste ora essere in grado di installarlo sul vostro disco rigido
  senza difficolt, tuttavia non sar probabilmente possibile installare
  LILO; in alternativa preparate un floppy d'avvio e avviatelo con gli
  stessi parametri fino a quando potrete mettere una patch a LILO e al
  kernel.

  Red Hat 5.0 e Slackware 3.4: Queste sono simili, ma con il trucco che
  il programma d'installazione ignora /dev/hde-h (i dischi sulla ide2 e
  sulla ide3).

  Allo scopo di installarlo su o da uno di questi dischi  necessario
  non tenere conto di uno o di entrambi i canali delle interfacce a
  bordo. Tuttavia controllate di non aver tenuto conto di un dispositivo
  di cui avete bisogno per installare; per esempio se state installando
  da un lettore CD-ROM su /dev/hdd (ide1 - interfaccia a bordo) su un
  disco rigido su /dev/hde (ide2 - l'Ultra33), dovrete non tener conto
  della non necessaria ide0 con la ide2 e lasciare intatta la ide1.
  Supponendo i numeri sopra potreste voler avviare con
  "ide0=0xe000,0xd806".  Red Hat 5.0 vi dar un prompt della shell se
  usate la possibilit del disco di rescue, e la Slackware include una
  shell nel regolare processo di installazione. Tuttavia Red Hat 5.0 
  difficile da riavviare dopo l'installazione; se avete problemi, potete
  provare scaricando un disco di avvio per la Slackware da
  ftp://ftp.cdrom.com/pub/linux/slackware-3.5/bootdsks.144/ e usarlo per
  fare il boot.

  Con altre distribuzioni, avrete un po' da improvvisare ma il processo
  dovrebbe essere lo stesso come sopra.

  IMPORTANTE: Senza la patch (discussa nella sezione ``UDMA-Generic''),
  il kernel necessita di questi parametri di boot per accedere al vostro
  disco rigido! Inoltre  molto importante che quando configurate LILO
  sia sul disco rigido che sul floppy d'avvio, diate esattamente gli
  stessi parametri che avete dato mentre stavate installando. Altrimenti
  il vostro sistema non si avvier! Sarebbe possibile darli a LILO
  quando avviate (cio, premere Shift, digitare in "linux ide2=....."
  ogni volta che avviate), ma solo se avete conservato i numeri! Si
  raccomanda di applicare la patch al kernel il pi presto possibile
  cos non avrete pi da preoccuparvi; una volta che state avviando con
  il kernel "rattoppato" potrete sbarazzarvi dei parametri di boot.
  Inoltre, per quel che mi consta non c' modo di far passare i
  parametri di boot ad un normale floppy di boot (fatto con "make
  zdisk"), dovete usare LILO o un altro loader (come LOADLIN) che vi
  permetta di passare i parametri di boot.

  Tuttavia, i kernel "non rattoppati" ed i programmi di installazione
  attualmente hanno spesso delle difficolt  usando la ide2 e la ide3,
  anche se i dischi vengono correttamente rilevati.  Cos se non potete
  prendere Linux per installarlo usando le tecniche descritte sopra,
  provate a specificare ide0 o ide1, anzich ide2 o ide3 (grazie a
  Martin Gaitan per questa tecnica).

  Questo essenzialmente sostituisce l'interfaccia a bordo con la Promise
  Ultra33 per quel che riguarda il kernel e potete seguire le istruzioni
  della prossima sezione come se vi foste fisicamente spostati li.

  Notate che, se state usando un lettore CD-ROM IDE connesso alla vostra
  interfaccia a bordo per l'installazione, vi dovrete assicurare di non
  interferire con l'interfaccia collegata al CD altrimenti
  l'installazione non potrebbe andare a buon fine!

  Se il CD  hda o hdb, usate ide1 per il vostro disco rigido e se esso
   hdc o hdd allora usate ide0.


  Installare Linux con l'Ultra33

  Se non riuscite a far funzionare il rimedio software potete provare un
  approccio molto pi brutale!  Qui c' un metodo alternativo di cui 
  virtualmente garantito il funzionamento, ma richiede che voi apriate
  il vostro computer e che vi diate da fare in esso.  NB: se non avete
  familiarit con i processi di connessione dei dischi IDE, leggete i
  manuali che vi sono stati dati con il computer, con il vostro disco
  rigido e/o con la vostra Promise Ultra33 prima di provare a fare
  questo! Se scollegate qualcosa e non sapete pi come rimetterlo a
  posto, sono spiacente ma potreste aver finito!  Quanto detto  tutto
  realmente proprio semplice. Molte schede madri oggi hanno
  un'interfaccia EIDE incorporata. Disconnettete il vostro disco rigido
  dalla Ultra33 e connettetelo all'interfaccia a bordo. Se avete altri
  dispositivi IDE quali CD Rom, unit a nastro o disco Zip, sulla vostra
  interfaccia a bordo,  pi semplice se aggiungete il disco rigido su
  un canale non usato (il secondario invece che il primario) o
  temporaneamente spostate un dispositivo di cui non avete bisogno
  immediatamente (come uno Zip o un'unit a nastro). Installate Linux.
  Scaricate e applicate la patch per la Promise Udma. (Vedere la
  prossima sezione).


  Ora siete pronti per riportare indietro il disco sulla Promise...
  quasi.  Per essere sicuri, fate un'immagine di boot del kernel su un
  floppy.  (cd /usr/src/linux ; make zdisk), che sar in grado di
  riavviare il vostro sistema. Eventualmente, per essere veramente
  sicuri, fatene due e per ora mettetene via uno.  Okay, ora  il tempo
  di pensare un poco... se avete solo un disco rigido e esso sta
  funzionando sulla Promise Ultra33, allora  pi probabile che esso sia
  /dev/hde (a e  b sono per le interfacce a bordo primarie, c e d per le
  interfacce a bordo secondarie).  Se state mettendo su essa un altro
  disco allora lo slave del primo canale sar /dev/hdf, il master del
  secondo canale sar /dev/hdg, e lo slave del secondo sar /dev/hdh.

  Modificate /etc/fstab, e cambiate tutte le partizioni dei dischi
  rigidi che state spostando dai "dischi" a bordo (/dev/hda, hdb, etc)
  alle loro posizioni sulla Promise (/dev/hde, hdf, etc). Se avete da
  disporre un qualsiasi dispositivo (come un CD Rom o un disco Zip) che
  volete lasciare sull'interfaccia a bordo, allora cambiateli pure alla
  loro nuova posizione. Per esempio, se il vostro CD Rom originariamente
  era master sul canale primario, (/dev/hda), ma mettete li il vostro
  disco rigido e avete soppiantato il CD come slave (/dev/hdb) o sul
  canale secondario (/dev/hdc), e ora volete rimetterlo indietro
  dov'era, allora cambiatelo in /dev/hda.  Se state usando LILO,
  riconfigurate LILO per usare la nuova posizione del disco (la
  configurazione di LILO  al di fuori dello scopo di questo documento,
  se non sapete come fare leggete il LILO mini-HOWTO), altrimenti
  probabilmente non sar in grado di avviarsi a meno che non usiate il
  floppy di avvio che avete fatto, che vorrete anche configurare per
  fare il boot dalla nuova partizione.

  Tutto ci viene fatto usando il comando rdev. Inserite il floppy nel
  drive e digitate "rdev /dev/fd0 /dev/hde1". Naturalmente si assume che
  la vostra partizione di root sia la prima sul primo disco UDMA. Se no
  (per esempio la mia  /dev/hde7), allora usate l'appropriato numero di
  partizione.  Riavviate. Il vostro sistema ora dovrebbe funzionare
  bene.

  Applicare le patch per l'Ultra33

  I kernel 2.0.35 e successivi supportano la Promise Ultra33 in maniera
  nativa, scaricate un aggiornamento dalla vostra distribuzione Linux o
  da http://www.kernel.org.  Per le istruzioni su come compilare il
  kernel, leggete il Kernel HOWTO.

  Usare 2 schede Ultra33 in una macchina

  Attualmente queste non funzionano bene, non fatelo subito, a meno che
  non vi stiate gingillando con il kernel per cercare di fare qualcosa
  per farle funzionare.


  5.2.  Promise Ultra66


  Questa  essenzialmente uguale alla Ultra33 con il supporto per il
  nuovo UDMA mode 4 con velocit di trasferimento di 66 Mb/sec.
  Sfortunatamente essa non  ancora supportata dai kernel 2.2.x.  C'
  una patch per i kernel 2.0.x e 2.2.x disponibile su
  http://www.dyer.vanderbilt.edu/server/udma/, e il supporto  incluso
  nella serie di kernel 2.3.x in via di sviluppo, almeno dal 2.3.3.
  Tuttavia per arrivare ad applicare patch o aggiornare il kernel avrete
  da tirare i medesimi sporchi trucchi come per l'Ultra33 nella sezione
  sopra.
  5.3.  Artop ATP850UF

  Questa scheda  supportata dall'Udma generic. L'installazione di Linux
  su un sistema con una di queste come interfaccia per il disco su cui
  effettuare l'installazione pu essere simile al metodo usato per la
  Promise Ultra33.


  5.4.  Aggiungere file di dispositivo


  Le interfacce IDE terziarie e quaternarie (ide2 e ide3) usano file di
  dispositivo della forma /dev/hde* sino a /dev/hdh*. Sui vecchi kernel
  questi dispositivi non erano creati automaticamente, cos avevate
  bisogno di aggiungerli manualmente per far s che funzionassero
  correttamente. Questo pu essere facilmente fatto se avete installato
  una copia aggiornata dei sorgenti del kernel di Linux, semplicemente
  avviate /usr/src/linux/scripts/MAKEDEV.ide che creer tutti i file di
  dispositivo importanti.


  6.  Interfacce UDMA a bordo.

  Queste sono delle interfacce per dischi UDMA compatibili, installate
  nella scheda madre. Usano le porte IDE I/O standard e perci sono
  interamente utilizzate alle velocit pi basse non-UDMA su un kernel
  2.0.x al quale non siano state applicate patch, come si  fatto quando
  si  installato Linux. Cos potrebbero non causare alcune difficolt
  durante l'installazione e applicare delle patch per la velocit UDMA 
  un lusso bene accetto, anzich un passo necessario. Qualche supporto
  UDMA  negli ultimi kernel 2.0.x, credo, ed  incluso negli attuali
  kernel 2.2.x per i chipset Intel.


  6.1.  Intel FX, HX, VX, TX, e LX


  Grazie ancora a Gadi per questa informazione:


       Il supporto per il bus mastering DMA per il chipset Intel TX 
       disponibile dal 2.0.31 e superiori.




  Nei kernel pi vecchi, (come ad esempio il 2.0.30 della Slackware 3.4)
  l'interfaccia sar usata nella pi lenta modalit EIDE. In entrambi i
  casi l'interfaccia sar rilevata automaticamente dal kernel e non
  dovreste avere problemi usandola. Il pieno supporto UDMA per questi
  chipset  incluso nella patch UDMA-generic, vedere ``UDMA-Generic''.


  6.2.  Il VIA VP2 e i chipset con esso compatibili


  Anche questa interfaccia pu essere rilevata automaticamente in
  modalit EIDE dal kernel senza patch, ma se avete una di queste,
  vorrete sicuramente applicare una patch cos potrete ottenere un
  volume di traffico pi veloce ed eliminare gli irritanti messaggi
  "dispositivo PCI sconosciuto". Una  disponibile su
  http://www.ipass.net/~prefect/; essa  progettata per il chipset VIA
  VP2/97, inserito sulle schede madri FIC's PA-2007 e PA-2011, ma
  potrebbe lavorare su chipset compatibili.  stato riferito che esso
  funziona sul pi nuovo chipset VIA VP3, ma il comportamento potrebbe
  essere differente. Notate che questa patch supporta solo il modo Bus
  mastering non il pieno modo UDMA, ma  sempre meglio del
  tranquillissimo modo EIDE. Seguite le istruzioni sul sito della patch
  per abilitare il modo BMDMA. C' un'altra patch che supporta il pieno
  modo UDMA su http://www.pyreneesweb.com/Udma/udma.html, disegnata per
  la VIA VT82C586B, ed essa dovrebbe funzionare sui chipset VP2, VP3,
  VPX, P6 e AGP Apollo. Seguono le istruzioni per l'installazione e per
  abilitare li l'UDMA, ma si raccomanda che facciate un backup di tutti
  i dati che volete conservare, e ci sono problemi potenziali con le
  schede madri incompatibili. Ma se esse funzioneranno, potrebbero
  funzionare senza problemi. Notate che il chipset VP1 non  in grado di
  funzionare con queste patch, ma  supportato dalla patch ``UDMA-
  Generic''.


  6.3.  TX Pro e altre schede 'Pro'


  L'UDMA non  attualmente supportato per schede madri TX Pro. Esse non
  sono uguali alle schede madri TX, e apparentemente riferiscono
  erratamente le loro capacit di DMA, da qui il problema. Ho sentito
  che qualcuno sta lavorando su questo problema, cos tra qualche tempo
  apparir una patch, ma non subito.


  7.  UDMA-Generic

  La patch UDMA generic, modificata da Andr Balsa
  <mailto:andrebalsa@altern.org>, Andre Hedrick
  <mailto:hedrick@Astro.Dyer.Vanderbilt.Edu>, e Michel Aubry
  <mailto:giovanni@sudfr.com> dal driver originale di Mark Lord per la
  TRITON DMA, fornisce il supporto UDMA per i seguenti chipset (dalla
  versione 0.3)

    Tutti i chipset Intel: FX, HX, VX, TX, LX

    Tutti i chipset SIS (testato solo il SiS5598, ma l'intera famiglia
     di chipset ha lo stesso dispositivo d'interfaccia 5513
     incorporato).

    Chipset VIA (testato solo il 82C586B, ma anche questa famiglia di
     chipset ha la stessa struttura per l'interfaccia). Un supporto
     speciale per la diagnostica  disponibile per le interfacce VIA.

    Supporto per le interfacce e schede Promise e Artop PCI UDMA. Le
     interfacce a scheda Triones PCI UDMA non sono ancora incluse.

     Essa  anche concepita perch sia facile estendere il supporto per
     altri chipset.

  L'Udma-generic, conosciuta anche come la Grand Unified UDMA Patch
  (GUUP - pronunciata "goop"),  stata inclusa nella patch Jumbo che
  include altre caratteristiche utili quali la rilevazione automatica
  della memoria oltre i 64 Mb e la rilevazione della velocit del clock
  della CPU.  Sfortunatamente questa patch  scomparsa e non sono
  completamente sicuro di dove trovare questa patch ora, cos invece uno
  potrebbe andare su http://www.dyer.vanderbilt.edu/server/udma/ dove si
  pu trovare una patch per l'IDE/UDMA per gli attuali kernel 2.0.x e
  2.2.x, che ora include il supporto per i chipset HPT343 e ALi15x3.
  Qui vi sono alcune note dell'autore:







  Le prestazioni con i dischi IBM UDMA su una buona scheda madre si
  avvicinano alla massima velocit di trasferimento: circa 10
  Mb/s (misurata con hdparm -t -T).
  Il chipset Intel TX ha una FIFO singola per i dati dei dischi rigidi
  ripartita tra le sue due interfacce IDE, cos usando due dischi
  UDMA non si hanno grossi miglioramenti rispetto ad un singolo
  disco. Tuttavia, il SiS5598 ha due interfacce separate, ognuna con la
  sua propria FIFO. Teoricamente, si potrebbe raggiungere la
  velocit di trasferimento di picco di 66Mb/s sulle schede madri
  con il chip SiS5598 usando il driver md ed il data striping sui due
  dischi. Il SiS5571 ha la stessa architettura d'interfaccia, credo. Non
  ho i datasheet (le specifiche tecniche - n.d.t.) per i chipset VIA,
  cos non posso dire niente su questi.
  Il driver per il kernel Linux IDE (U)DMA di Mark Lord 
  particolarmente veloce da installare (cio ritardo per il
  trasferimento dei dati). Questo  l'ideale per piccoli
  trasferimenti di dati (come quelli in un server delle news per Linux),
   pu essere in alcuni casi superiore alla sua
  controparte SCSI.





  8.  Attivare e disattivare l'UDMA


  Normalmente un kernel UDMA-consapevole abiliter automaticamente il
  supporto per l'UDMA per i dischi e le interfacce che lo supportano.
  Tuttavia a partire dal kernel 2.1.113 i trasferimenti dal disco in
  UDMA sono disabilitati come predefinizione, a meno che non abbiate
  specificatamente configurato il kernel per rilevarlo automaticamente.
  Questo pu sembrare un inconveniente, ma molti dischi e molte
  interfacce non funzionano correttamente con il DMA attivato; vedere la
  lista nera per l'UDMA sotto.


  8.1.  Usare i parametri di boot per il kernel

  Sui kernel 2.1.113 e superiori, potete abilitare il DMA per entrambi i
  dischi sull'interfaccia IDE data usando il parametro del kernel
  ideX=dma, dove X  il numero dell'interfaccia (la prima  0). I
  parametri di boot del kernel possono essere impostati usando LILO,
  LOADLIN, o molti altri boot loader per Linux. Per ulteriori
  informazioni vedere il Bootdisk HOWTO.


  8.2.  Usare hdparm

  hdparm  il programma usato per aggiustare i parametri dei dischi
  rigidi sotto Linux.

  Tra le altre cose potete usarlo per abilitare o disabilitare l'UDMA
  per un disco e testare la sua velocit di trasferimento sostenuta.

  La versione corrente di hdparm, 3.5i mentre sto scrivendo, 
  disponibile su http://www.dyer.vanderbilt.edu/server/udma/.

  Compilatelo e installatelo con qualcosa di simile:







  cd /usr/src
  tar zxvf /tmp/download/hdparm-3.5.tar.gz
  cd hdparm-3.3
  cat /tmp/download/hdparm-3.5i.patch | patch -p0
  make
  if [ -f /sbin/hdparm ]; then rm -f /sbin/hdparm ; fi
  make install
  cp /usr/local/sbin/hdparm /sbin/hdparm




  Per abilitare il DMA per un disco rigido: hdparm -d1 /dev/hda

  Per disabilitare il DMA per un disco rigido: hdparm -d0 /dev/hda

  Per misurare la velocit di trasferimento di un disco rigido: hdparm
  -Tt /dev/hda

  Per vedere quali opzioni sono abilitate per un disco rigido: hdparm
  /dev/hda

  Per vedere pi informazioni sul vostro disco rigido di quelle che
  volevate sapere: hdparm -i /dev/hda

  Per informazioni pi dettagliate (come per esempio per scegliere quale
  modo UDMA usare) leggete la pagina man ("man 8 hdparm").


  9.  Problemi

  9.1.  La lista nera per l'UDMA


  I seguenti dischi sono sulla lista nera. Non potrete usare l'UDMA con
  questi dischi poich forse potrebbe danneggiare i dati.


    Western Digital WDC AC22100H

  La porzione UDMA della patch Jumbo-2.0.35-9 disabiliter
  automaticamente il DMA per questo disco.


  9.2.  Avete overcloccato?


  Se l'avete fatto, state attenti! Segue una citazione dalla
  documentazione per l'Udma-generic:




       NON OVERCLOCCATE il bus PCI. 37.5MHz  la velocit
       massima supportata dal bus PCI. Alcuni (supposti compatibili) dischi
       UDMA non dovranno mai essere portati a 37.5MHz, ma potrebbero essere
       OK a 33.3MHz. In ogni caso, MAI, MAI impostare il bus PCI a 41.5MHz.
       L'impostazione di sicurezza RACCOMANDATA  di 33MHz.








  9.3.  Il vostro BIOS  aggiornato?


  Segue un altro estratto dalla documentazione dell'udma-generic:





       Il vero lavoro implicava che l'impostazione del chip per il
       trasferimento DMA venisse fatta principalmente dal BIOS di ogni scheda
       madre. Ora, invece si spera che il BIOS sia stato correttamente
       programmato...
       Per esempio, la scheda madre ASUS SP-97V con il suo BIOS originale
       (Rev. 1.03) poteva funzionare male con il driver Linux modificato in
       entrambi i modi UDMA e UDMA2; avrebbe lavorato meglio usando il PIO
       mode 4, o sotto windows 95 in tutti i modi. Ho scaricato l'ultima
       immagine del BIOS (Rev. 1.06) dal sito web della ASUS ed ho aggiornato
       il BIOS EPROM con l'ultima versione del BIOS. Da allora in poi ha
       funzionato perfettamente (con la velocit del bus a 66 MHz).
       Ci che questo ci dice  che il BIOS imposta il
       controller DMA con dei specifici parametri di sincronizzazione
       (impulsi attivi e ritorno dei cicli del clock). La mia revisione del
       BIOS iniziale probabilmente aveva una scorretta sincronizzazione. Da
       quando il driver per windows 95 ha impostato queste sincronizzazioni
       da solo (cio esso non dipende dal BIOS per impostare i
       parametri di sincronizzazione del controller del disco rigido)
       inizialmente ho avuto dei problemi solo con il driver per Linux,
       mentre windows 95 funzionava bene. Cos lasciatemi dichiarare
       ancora questo: questo driver UDMA per Linux dipende dal BIOS per una
       corretta impostazione del controller UDMA. Se avete dei problemi, per
       prima cosa controllate di avere l'ultima versione del BIOS per la
       vostra specifica scheda madre.
       ...
       Le nuove revisioni del BIOS possono essere scaricate dal sito web del
       costruttore della vostra scheda madre. Aggiornare una nuova immagine
       del BIOS  una operazione semplice ma si devono seguire
       rigorosamente passo per passo le istruzioni spiegate sul manuale della
       scheda madre. Le ultime revisioni dell'Award BIOS sembrano stabili
       rispetto all'UDMA. Qualsiasi cosa con la data del 1998 dovrebbe essere
       soddisfacente.






  9.4.  Se ancora non riesco a farlo funzionare!


  Se niente in questo documento vi  stato di aiuto, o almeno non vi ha
  aiutato abbastanza per far funzionare la vostra macchina, la vostra
  miglior scommessa  di scrivere un messaggio che descriva
  completamente le vostre difficolt, che tipo di interfaccia UDMA
  avete, sia che sia a bordo, sia che sia una scheda, se il vostro disco
   attualmente UDMA o un normale EIDE, esattamente che configurazione
  del disco avete, quale versione (se possibile distribuzione e versione
  del kernel) di Linux state usando e qualsiasi altra cosa che possa
  sembrare utile, e speditela al newsgroup comp.os.linux.hardware.
  Probabilmente otterrete presto alcuni suggerimenti che potranno
  esservi d'aiuto.





  10.  Se avete alcune informazioni sulle novit dell'UDMA che non sono
  incluse in questo mini howto...

  Grande! Se sapete qualcosa che non so, inviatemele con qualsiasi mezzo
  (brion@pobox.com) e la includer in questo documento aggiornandolo
  completamente al pi presto.




























































  mini-HOWTO su come fare l'upgrade di una distribuzione Linux
  Greg Louis, glouis@dynamicro.on.ca
  v1.11, 6 Giugno 1996

  Suggerimenti sull'upgrade da una distribuzione Linux ad un'altra.

  1.  IMPORTANTE!!! Disclaimer e Copyright

  The procedure to which this document attempts to be a guide is
  inherently dangerous to the programs and data stored in your computer.
  You carry out any such procedure entirely at your own risk.  The steps
  described in this document worked for the author; there is no
  guarantee that they will work for you, nor that you can attempt to
  follow them without serious damage to your computer's programs and/or
  data.  You are entirely on your own in any use you may make of the
  information presented herein, and the author shall not be liable in
  any way whatsoever for any damage or inconvenience of any kind that
  you may suffer in so doing.

  This document is copyright 1996, Dynamicro Consulting Limited, and is
  released under the terms of the GNU General Public License.  This
  basically means that you may copy and modify it at will, but may not
  prevent others from doing likewise.

  Comments and questions may be directed to the author.  Especially
  welcome, for use in future revisions, are accounts of successful
  upgrades of complex systems.


       L'unica licenza valida  quella originale in lingua inglese.
       Di seguito ne trovate una traduzione abbastanza fedele che
       per non ha alcun valore.


  La procedura su cui questo documento cerca di essere una guida 
  pericolosa per i programmi ed i dati immagazzinati nel computer.
  Portate avanti detta procedura a vostro rischio. I passi descritti in
  questo documento hanno funzionato per l'autore; non c' nessuna
  garanzia che funzionino per voi, n che possiate cercare di seguirle
  senza seri danni ai programmi ed ai dati contenuti nel vostro
  computer. Qualsiasi uso delle informazioni qui date  a vostro rischio
  e pericolo, e l'autore non pu essere considerato responsabile per
  qualsiasi danno o inconveniente di qualsiasi tipo che vi possa
  accadere nel farlo.

  La suddetta clausola  valida anche per quanto riguarda la traduzione
  italiana: il traduttore non potr essere considerato responsabile per
  qualsiasi errore o inesattezza della traduzione. Usate le informazioni
  contenute in questo documento completamente a vostro rischio e
  pericolo.

  Questo documento  copyright 1996 Dynamicro Consulting Limited, ed 
  distribuito sotto la licenza General Public License GNU; ci significa
  che potete copiarlo e modificarlo a vostro piacimento, ma non potete
  evitare che altri facciano lo stesso.

  La traduzione italiana  copyright 1997 Eugenia Franzoni
  (eugenia@pluto.linux.it).

  Potete rivolgere commenti e domande direttamente all'autore. Sono ben
  accette, per uso in versioni successive, relazioni su upgrade riusciti
  di sistemi complessi.




  2.  Cambiamenti dalla versione 1.1


    Aggiunta questa sezione

    Aggiunto il suggerimento di Zoltn Hidvgi su mtime e ctime.
     Grazie, Zoltn!

    Aggiunta la sezione Ringraziamenti


  3.  Introduzione


  3.1.  Come uccidere e resuscitare Linux

  Lo scopo di questo documento  di dare dei suggerimenti per aiutarvi
  nella distruzione e riinstallazione di un sistema Linux. Non  affatto
  un libro di "ricette" sicuro, ma spero che servir come indicazione su
  quello a cui si deve pensare, e sull'ordine in cui fare le cose. Mi
  sarebbe stato molto di aiuto se qualcun altro avesse scritto una cosa
  del genere prima del mio primo upgrade; quindi spero che sia di aiuto
  a voi, se dovete ricostruire una macchina Linux.

  Non prendetelo come vangelo! Alcune cose cambieranno quasi
  sicuramente.  Anche i nomi delle directory presenti nel documento
  possono essere diverse da quelle che dovete usare; alcuni hanno
  /usr/home invece di /home, ad esempio; altri la chiamano /u, ed altri
  (brivido :) mettono addirittura tutti gli utenti direttamente sotto
  /usr stessa! Non posso essere specifico per il vostro sistema, quindi
  ho semplicemente usato i nomi come sono nel mio.

  Noterete anche che uso la distribuzione Slackware, e che assumo
  abbiate abbastanza RAM e spazio disco per installare i sorgenti del
  kernel Linux e compilare il kernel. Se il vostro sistema  diverso,
  alcune delle mie raccomandazioni non saranno applicabili, ma spero che
  potrete comunque trovare lo schema generale che vi possa essere di
  aiuto nel progetto di ricostruzione.


  3.2.  Perch farlo?

  Buona domanda! Se si pu evitare, non fatelo! (E questa  la
  raccomandazione pi importante di tutta questa guida!!!) ...ma ci sono
  occasioni in cui non se ne pu fare a meno.

  Ad esempio, ho installato un hard disk da 4Gb e poi ho scoperto che
  Linux della Slackware 2.0 non sapeva che gli hard disk potessero
  essere pi grandi di 2Gb, e si confondeva orribilmente; quindi ho
  dovuto fare un upgrade all'allora ultima Slackware 2.3. Quell'upgrade
   stata un'esperienza estenuante, ed  parte della ragione per cui sto
  scrivendo queste note. Ho sbagliato praticamente tutto, e solo la
  fortuna ed il fatto che avessi un'altro Linux funzionante mi ha
  salvato dal disastro.

  Un altro esempio: ho scoperto che non potevo compilare un kernel linux
  a.out funzionante con la serie 1.3, usando un'installazione esterna
  della Slackware 2.3 (un'altra macchina, non quella con cui ho
  impasticciato). Ho preso la palla al balzo, ho comprato la Slackware
  3.0 su CDROM e ho convertito tutto a ELF. Stavolta la reinstallazione
   andata meglio, grazie in parte all'esperienza precedente, ed 
  servita come spunto per la maggior parte delle idee che vi sto
  offrendo qui.



  3.3.  Devo per forza ``distruggere e reinstallare''?

  Stranamente  pi sicuro. Se installate sopra un sistema Linux
  esistente,  probabile che abbiate una miscela di binari vecchi e
  nuovi, e in genere un vero problema per l'amministrazione. Ripulire il
  sistema del tutto, e poi rimettere solo quello di cui sapete avere
  bisogno  un modo drastico ma efficace di avere un risultato pulito.
  (Naturalmente stiamo parlando di installare una distribuzione per
  intero, non di aggiornare uno o due pacchetti! Il modo migliore per
  evitare una reinstallazione completa , precisamente, di tenere
  aggiornati i singoli componenti -- specialmente gcc e le sue librerie,
  e le binutils. Se quello che usate  ragionevolmente aggiornato, e
  potete tenercelo prendendo, e se necessario compilando, del nuovo
  codice di tanto in tanto, non c' bisogno di un aggiornamento di
  massa).

  Come nota Patrick Volkerding (anche lui raccomanda di togliere tutto
  per fare gli upgrade), installare ELF sopra un sistema funzionante
  a.out  il modo sicuro per provocare un disastro: almeno, se ne sapete
  abbastanza per provarci, non avete bisogno di questa guida!

  Anche senza questa complicazione, per, sarebbe meglio ricostruire
  tutto da zero.


  3.4.  Quanto tempo ci vuole?

  Naturalmente dipende dalla complessit del sistema, ma posso dire che,
  per l'aggiornamento andato bene (l'altro? -- non chiedetemelo! :) ci
  ho messo circa dieci ore per i backup, sei ore per ricostruire il
  sistema per poter riabilitare i login, e un'altra mezza giornata pi o
  meno per rimettere a posto le cose meno cruciali. Col passar del tempo
  mi accorgo che ci sono delle piccole cose che non sono come le vorrei
  -- le aggiusto mano a mano che le trovo -- ma in tutto dovrebbero
  bastare venti ore di lavoro per un progetto ragionevolmente complesso.
  Forse meno se state reinstallando da hard disk (io ho usato il CDROM)
  o pi se dovete installare da floppy.  Forse meno se avete un Pentium
  veloce, pi se avete un 386. Avete capito il concetto.

  E questo per quanto riguarda l'installazione. Ecco come impostarla,
  una volta deciso che deve essere fatta. Armatevi di forza d'animo, di
  caffeina o cose del genere, e:


  4.  Scrivete tutto quello che fate.

  E' estremamente prezioso avere un registro di quello che avete fatto
  nel processo di preparazione e di applicazione delle modifiche.  E'
  specialmente importante una lista dei backup che farete in
  preparazione della distruzione del sistema esistente.


  5.  Fate un backup completo del sistema esistente.

  Generalmente parlando, i backup tendono a venir scritti su mezzi ad
  accesso sequenziale. Posto questo, non vorrete usare il backup
  completo per reinstallare un numero significativo di file: ne ha
  troppi che non volete. E' meglio creare dei piccoli backup di segmenti
  individuali che sapete che dovrete reistallare del tutto. Far degli
  esempi pi avanti.

  Perch cominciare con un backup completo? Ci sono due ragioni
  principali: per prima cosa, nell'eventualit di una catastrofe
  nell'installazione del nuovo sistema, avrete modo di tornare indietro
  al punto di inizio con un minimo sforzo. Secondo, non importa quanto
  prepariate bene la nuova installazione, c' una probabilit molto alta
  che uno o due file importanti vengano dimenticati; in questo caso la
  scomodit di dover estrarre questi file dal backup completo sar
  preferibile a farne a meno.

  Per risparmiare tempo e spazio, se avete ancora il mezzo di
  distribuzione per la vecchia versione Linux, potete salvare solo i
  file che hanno l'mtime o il ctime pi recente della data
  dell'installazione originale.


  6.  floppy.  Fare il backup di /etc e delle sue sottodirectory su uno
  o pi

  Questo  l'estremo opposto: non reinstallerete questi file (per la
  maggior parte, almeno), ma li paragonerete con quelli nuovi che
  vengono creati durante l'installazione. Perch? Perch i file nuovi
  potrebbero contenere informazioni che i vecchi non hanno, o potrebbero
  esprimere le stesse cose in modo diverso. I cambiamenti nei
  protocolli, l'aggiunta di nuovi strumenti o l'implementazione di nuove
  caratteristiche in strumenti esistenti sono tutte cose che possono
  apportare dei cambiamenti nel formato dei file di configurazione e
  negli script di avvio contenuti nell'albero /etc, e molto
  probabilmente dovrete immettere i vostri vecchi dati nei nuovi file
  per mantenere i formati nuovi e sfruttare i miglioramenti.


  7.  Fate backup separati di ogni gruppo di file che volete conservare.

  Questa  la parte pi variabile del lavoro, e tutto quello che posso
  fare  descrivere quello che ho fatto io nel mio sistema, nella
  speranza che servir come guida. Sostanzialmente, dovete dare
  un'occhiata a tutte le directory che contengono:


    file che non fanno parte della vostra installazione linux standard,
     o

    file pi recenti di quelli che installerete  con la nuova
     installazione

  e separate solo quei file che volete mantenere.

  (Un'altra strategia possibile  di fare il backup di tutti i file con
  mtime o ctime pi recenti del giorno della precedente installazione di
  Linux, come detto sopra, e recuperarli da l. Se fate cos, dovrete
  tener conto che la nuova distribuzione di Linux potrebbe contenere dei
  file ancora pi recenti di quelli che avete salvato.)

  Nel mio caso, ho finito per fare un file .tgz sul mezzo di backup per
  ciascuna di queste directory:


    /usr/lib/rn

    /usr/lib/smail

    /usr/lib/trn (il resto di /usr/lib era da reinstallare)

    /usr/local/src

    /usr/local/bin

    /usr/local/lib

    /usr/local/lpfont

    /usr/local/man

    /usr/local/sbin

    /usr/local/thot (c'erano altri file in /usr/local che non mi
     servivano)

    /usr/openwin

    /usr/src/lilo-17 (perch la mia Slackware nuova aveva ancora la
     versione 16)

    /usr/src/linux-1.2.13 (perch l'avevo configurato)

    /usr/X11R6/lib/X11/app-defaults

    /usr/X11R6/lib/X11/initrc (il resto di Xfree86 era da reinstallare)

    /var/named

    /var/openwin

    /var/texfonts

  La mia macchina era relativamente semplice, dato che non c'erano file
  di spool di cui preoccuparsi. Non ho uno spool di news in quel
  sistema, e dato che ci sono solo due utenti  pi semplice leggere
  tutta la posta prima di fare lo shutdown. Negli altri casi bisogna
  fare il backup delle directory /var/spool all'ultimo momento, come
  naturalmente le directory delle librerie e dei siti delle news!


  8.  Preparate i dischi di root e boot per la nuova installazione.

  I dettagli di come farlo si possono trovare nella guida di
  installazione della distribuzione che usate.


  9.  compilazione finale.  Formattate i dischetti per il kernel tempo
  raneo e per la

  Ve ne serviranno due, un dischetto per ciascuno.

  Fatto tutto questo, siete pronti per l'Ora X. Il passo successivo
  rende il sistema non disponibile.


  10.  Inibite i login e fate il backup delle directory /root e /home.

  E' l'ultima cosa da fare sui vecchi sistemi prima di distruggerli, in
  modo da poter avere i dati di root e degli utenti il pi aggiornati
  possibile.


  11.  Avviate il sistema dai dischetti di boot e root.


  12.  Cancellate le partizioni Linux con fdisk e ricreatele.

  La guida di installazione vi spiegher come farlo; cos distruggerete
  il sistema. Da ora in poi dipendete dalla qualit dei backup che avete
  fatto nei passi precedenti! Siete stati avvisati!




  13.  Installate la nuova versione di Linux.

  Ci sono gi diversi buoni documenti che descrivono come portare avanti
  questo passo, quindi non scender nel dettaglio. Continuate da qui
  quando il nuovo sistema pu essere avviato dal'hard disk.

  Nel frattempo, assicuratevi di creare un dischetto da cui possiate
  avviare il sistema, dato che il kernel installato di default da Linux
  deve essere sostituito, e nel farlo possono accadere degli incidenti.
  Assicuratevi di installare i pacchetti di sviluppo e i sorgenti del
  kernel.


  14.  /etc/fstab Con il nuovo sistema linux avviato dall'hard disk,
  modificate

  ed aggiungete la partizione di swap. Poi date il comando "swapon -a".
  Non so perch, ma il programma di installazione della Slackware non si
  offre di farlo se la partizione di swap gi esiste. Poi, quando
  avviate il sistema nuovo e lo script rc.S prova ad abilitare lo swap,
  non trova la partizione nel file fstab e lo swap non funziona. Questo
  procedimento risolve il problema.


  15.  sottodirectory.  Recuperate le configurazioni nella directory
  /etc e nelle sue

  Coem descritto sopra, non potete semplicemente copiare i vecchi file
  in /etc ed aspettarvi che funzioni tutto; con alcuni file si pu fare,
  ad esempio /etc/XF86Config (sempre che stiate usando la stessa
  versione di Xfre86 -- e lo stesso hardware video -- dell'installazione
  precedente).  Per la maggior parte, per,  meglio usare diff per
  paragonare i file vecchi ai nuovi prima di copiarli. Controllate
  specialmente dei cambiamenti significativi nei file in /etc/rc.d, dove
  potreste dover modificare tutto a mano, invece di copiare i vecchi
  script dal backup. Una volta finito, riavviate il sistema.


  16.  Configurate e ricompilate il kernel di Linux.

  Anche se questo passo non  necessario per avere un kernel che
  supporta il vostro hardware, vale la pena farlo per evitare di avere
  nel kernel i driver di tutta quella roba che sulla macchina non c'.
  Per dettagli su questo, leggete il Kernel HOWTO. Installate prima il
  kernel ricompilato su un dischetto: quando vedete che da l l'avvio 
  a posto, installatelo sull'hard disk, avviate lilo se lo state usando,
  e riavviate il computer.


  17.  Recuperate quello che avevate salvato.

  Potrebbe essere necessario reinstallare alcuni dei binari dai
  sorgenti: io ho dovuto farlo con lilo, ad esempio, dato che la mia
  versione era pi recente di quella nell'installazione Slackware, e non
  avevo fatto il backup del file binario da /sbin. Dovreste controllare
  tutti i programmi che recuperate dai backup, e confermare l'esistenza
  e la correttezza dei file di configurazione, delle librerie e cos
  via. In alcuni casi potreste dover recuperare i programmi in un ordine
  specifico: avete annotato delle cose durante il backup, vero? ;-)


  18.  Controllate la sicurezza.

  Controllate i permessi dei file e delle directory in modo da essere
  sicuri che l'accesso non  n troppo ristretto n troppo facile. Io
  trovo che la Slackware tende ad essere un ambiente un po' aperto per i
  miei gusti, quindi vado in giro a cambiare i 755 in 711 per i binary
  nelle directory ../bin e cose del genere. O addirittura i 700 in
  quelli ../sbin.  Ci vuole un'attenzione particolare se state facendo
  girare un server ftp, ma probabilmente ci avete gi pensato ;-).


  19.  Abilitate i login.

  E' tutto a posto. Nel prossimo periodo, ci saranno probabilmente dei
  dettagli da chiarire, ma il grosso del lavoro  fatto. Buon
  divertimento!


  20.  Mi dispiace, ma ancora una volta:

  USATE QUESTE INFORMAZIONI A VOSTRO RISCHIO E PERICOLO!

  (Vedere il disclaimer all'inizio di questo documento.)


  21.  Ringraziamenti

  Grazie a Zoltn Hidvgi per aver contribuito al contenuto di questo
  mini-HOWTO.










































  Linux sul Sony VAIO mini-HOWTO
  Hideki Saito hideki@chatlink.com
  v1.1, 16 settembre 1998

  Questo documento espone l'installazione di un sistema GNU/Linux su
  computer Sony VAIO. Traduzione italiana a cura di Christopher R.
  Gabriel, <cgabriel@pluto.linux.it>.

  1.  Introduzione

  1.1.  Note

  Questo documento  apparso per la prima volta sulla homepage di Hideki
  Saito a


       http://ryoohki.anime.net/~hideki/



  Questa versione  stata riscritta per i nuovi aggiornamenti disponi
  bili. La versione HTML  disponibile a
  http://ryoohki.anime.net/ hideki/VAIO+Linux.html.  possibile ridis
  tribuire questo documento liberamente. Quando questo viene pubblicato,
  inviate una notifica all'autore. Solo per sapere quanto viene utiliz
  zato :)


  1.2.  Note sui differenti sistemi disponibili

  Ho recentemente ricevuto alcuni messaggi che mostravano come il
  contenuto di questo documento si rilevava, talvolta, non corretto.
  Questo perch, per ragioni diverse, l'hardware installato sui computer
  pi recenti  molto diverso da quelli pi datati. Inizier ad inserire
  queste informazioni. Ma dato che, ovviamente, non ho ha disposizione
  tutti i sistemi VAIO attualmente sul mercato, dovr chiedere ai
  possessori di questi sistemi di informarmi riguardo all'installazione
  di Linux.  Mi sar di grande aiuto se inserite la stringa [VAIO
  Information] nell'oggetto del messaggio di posta elettronica, in modo
  da poterci dedicare maggior attenzione. Inoltre, per cortesia allegate
  il modello del vostro sistema. Se si tratta di un computer portatile,
  indicatelo nel corpo del messaggio, oppure nel soggetto. Mi voglio
  scusare profondamente con chi, leggendo questo documento, si  trovato
  confuso piuttosto che aiutato.


  1.3.  Elenco delle revisioni

  12/29/98 Inseriti molti aggiornamenti


  1.4.  Liberatoria

  Per tutte le procedure di prova elencate in questo documento, non mi
  ritengo assolutamente responsabile dei possibili problemi causati
  dalle informazioni presenti in questo documento. Come per la licenza
  GPL, tutto ci che fate  a vostro rischio e pericolo. Non sono di
  madre lingua inglese e troverete molti errori in queste pagine. Vi
  prego di scusarmi per questi. Qualunque correzione o chiarimento sono
  benvenuti, inviateli pure a hideki@chatlink.com.


  1.5.  Ma questo documento cosa tratta?

  In questo HOWTO mostrer l'installazione e l'utilizzo di Linux sui
  computer Sony VAIO. I computer VAIO sono molto ben fatti, anche se non
  molto amichevoli nei confronti di Linux. Ma, ovviamente, questo non
  significa che non  possibile utilizzarlo, anzi!  Attraverso questo
  documento si assumer che siete possesori o di un PCV 70 oppure un PCV
  90. Dato che la maggior parte dei modelli di VAIO sono molto simili
  nella loro architettura (anche se i modelli pi recenti hanno dischi
  pi grandi, nuove schede video, maggior quantit di memoria RAM), il
  contenuto di queste pagine  sfruttabile sulla maggior parte di questi
  sistemi.


  2.  Riguardo la compatibilit hardware


  2.1.  Hardware che non  compatibile con Linux

  La maggior parte dell'hardware installato sul sistema  compatibile
  con Linux. Ad ogni modo, fanno eccezione il modem, la porta USB e il
  decoder MPEG. Fate bene attenzione: non  possibile utilizzare il
  modem, cosa che, per alcuni di voi, si potr rivelare un problema non
  indifferente. I modem installati sui VAIO vengono chiamati DVSD modem,
  che  una variante del cosiddetto "Winmodem".


  2.2.  Hardware parzialmente compatibile

  La scheda sonora e video installati sono parzialmente compatibili.


  2.2.1.  Scheda sonora

  La scheda sonora  compatibile con Linux utilizzando il supporto per
  il Microsoft Sound System + Sound Blaster, mentre se desiderate
  utilizzare il MIDI sotto Linux dovrete scendere a compromessi con le
  capacit di ingresso dell'audio. In questo caso, eliminate il supporto
  Sound Blaster. Se necessitate di utilizzare il MIDI e l'ingresso
  audio, l'unica scelta sembra essere l'acquisto di OSS/Linux, tramite
  il quale  possibile sfruttare a pieno sotto Linux le possibilit
  della scheda sonora. La scheda fornita con il VAIO  una Yamaha OPL3SA
  e OSS/Linux fornisce un completo supporto per questa. Sembra che il
  sintetizzatore wave indicato nelle specifica sia implementato via
  software. Al momento della stesura di questo documento, esiste
  OSS/Free 3.8, che supporta questa scheda sonora utilizzando il
  controller Yamaha OPL3-SA1. Notare che questo supporto non viene
  fornito con il kernel 2.0.x.  necessario prelevarlo dal sito di OSS.
  Il kernel 2.1.x fornisce una versione aggiornata di OSS/Free, ma non
  ho ancora testato la compatibilit con questa scheda. Se riuscite ad
  utilizzarlo, per cortesia fatemelo sapere.


  2.2.2.  Scheda video

  La scheda video  parzialmente supportata da Linux. Non incontrerete
  nessun problema ad utilizzare Linux in console. Se desiderate
  utilizzare X Window, prelevate la versione 3.3.1 oppure pi recenti di
  XFree86, che supporta la scheda ATI Rage. Altri server X commerciali
  possono supportare questa scheda. Ad ogni modo, l'accelerazione 3D di
  questa scheda video non possono essere sfruttati con Linux, dato che
  non esiste il driver.


  3.  Come installare Linux?

  Installare Linux sul sistema non  un grosso problema. Ad ogni modo, 
  necessario sapere fin dall'inizio che esiste una partizione non-DOS
  sul sistema. Non ho alcuna idea di cosa sia questa partizione. Questa,
  di 400 Megabytes di dimensione,  visibile con fdisk. Ho semplicemente
  eliminato questa partizione e sfruttato lo spazio per Linux. E non ho
  avuto nessun problema, quindi deve trattarsi di uno spazio relativo
  all'installazione del software. Aggiornamento 12/29/98: questa
  partizione  presente solo sui modelli pi datati. Doveva essere una
  partizione DOS, ma  stato un errore da parte della Sony stessa.  Il
  VAIO ha un comodo supporto di boot dal lettore CD-ROM, se questo 
  stato reso avviabile. Dato che il BIOS lo supporta,  un mezzo che 
  possibile utilizzare per installare molte distribuzioni di GNU/Linux.
  Questa caratteristica  molto comoda perch permette di installare il
  sistema senza l'utilizzo di dischetti floppy. In particolare, RedHat
  pu essere avviata e installata da CD-ROM. Altre distribuzioni come
  SuSE dichiarano di poter essere avviate da CD-ROM, ma non ho ancora
  avuto modo di provare, quindi non posso esserne sicuro. Se questa
  procedura di avvio nel vostro caso si rivela fallimentare, provate a
  scorrere le possibilit che vi sono offerte dal BIOS. La
  configurazione del kernel non  un grosso problema se non per quanto
  riguarda la scheda audio. Ma di questo abbiamo gi parlato. I computer
  VAIO forniscono un BIOS APM, o Advanced Power Management BIOS, e vi
  raccomando vivamente di non utilizzare questa caratteristica nel
  kernel. Ho avuto problemi quando questo  stato attivato sul mio
  sistema. Aggiornamento 12/29/98 Ho ricevuto una notifica che per il
  modello 505 l'installazione da CD-ROM risulta molto difficile mentre
  quella via rete  molto pi semplice.


  4.  E con questo...

   tutto andato per il meglio? Lo spero vivamente. Adesso il vostro
  computer VAIO  una delle migliori stazioni di lavoro Linux sulla
  piazza.  Se avete incontrato problemi, posso aiutarvi nel risolverli.
  Inviate le vostre richieste a hideki@chatlink.com in qualunque
  momento. Cercher di rispondere non appena possibile.


  5.  Informazioni Legali

  VAIO  un marchio registrato di Sony.  Tutti gli altri marchi
  registrati che appaiono in questo documento sono dei rispetti
  proprietari.  Il copyright di questo documento  riservato a Hideki
  Saito.


  6.  Ringraziamenti

  Vorrei ringraziare le seguenti persone, elencati senza un ordine
  particolare: Daniel Nunes. Se credete di dover essere menzionati in
  questa sezione, fatemelo sapere per posta elettronica.



















  Zip Drive Mini-HOWTO
  Kyle Dansie, dansie@ibm.net
  v2.4, 10 gennaio 1999

  Questo documento fornisce una veloce guida di riferimento alla config
  urazione e all'utilizzo di un lettore ZIP sotto Linux.  Traduzione di
  Giovanni Bortolozzo (borto at pluto.linux.it).

  1.  Introduzione

  Il lettore Iomega ZIP  un dispositivo a dischi rimovibili piuttosto
  popolare.   disponibile in diverse versioni:

    Parallel Port

    SCSI

    IDE - ATAPI

    Plus

  La pi popolare sembra essere la versione per porta parallela.   in
  giro da diverso tempo e costa abbastanza poco.  Anche la versione SCSI
   disponibile da un po', ma poich necessita di una scheda SCSI che
  molti non hanno a disposizione, non  cos popolare come la
  precedente.  In questo momento, la versione ATAPI sembra essere quella
  pi facilmente reperibile.  La Plus  la versione pi recente del
  lettore ZIP: ha la capacit di rilevare automaticamente a quale porta
  (parallela o scsi che sia)  connesso.  Questo documento  incentrato
  sulla versione per porta parallela, ma offre anche alcune dritte per
  le altre versioni.


  Questo documento incorpora informazioni collezionate e pubblicate da
  altri, in particolare:

    Grant Guenther, grant@torque.net

    Scot Wilcoxon, sewilco@fielday.mn.org

    Joe Mack, mack@ncifcrf.gov

    Byron Jeff, byron@cc.gatech.edu


  Li ringrazio per i loro importanti contributi, ed accetto la
  responsabilit per qualsiasi errore io abbia introdotto.

  Un ringraziamento particolare a Grant Guenther che scrisse la versione
  0.26 del programma ppa oltre alla versione originale di questo HOWTO.
  Se si trova un errore qualsiasi o inesattezze in questo documento, mi
  si informi. dansie@ibm.net


  1.1.  Dove reperire questo documento

  La versione pi aggiornata di questo documento risiede a
  <http://www.njtcom.com/dansie/zip-drive.html>

  Per la traduzione italiana si faccia riferimento alla home page
  dell'Italian Linux Documentation Project
  <http://wwww.pluto.linux.it/ildp/>.




  2.  Partenza a Razzo

  OK, si  comprato un nuovo lettore ZIP ed ora si vuole usarlo.  Alcune
  distribuzioni dispongono del modulo gi compilato.  Si pu provare a
  dare insmod ppa per cominciare (ci si assicuri di averlo collegato e
  di aver inserito un disco).  Se non c' il programma ppa, allora
  bisogna configurare il kernel.  La mia macchina ha due porte
  parallele, una per lo ZIP e l'altra per la stampante.  Ci rende le
  cose semplici, senza bisogno di scambiare i cavi.

  Configurazione del kernel:

    cd /usr/src/linux

    make xconfig

    supporto per scsi = Y

    supporto per scsi disk = Y

    supporto per Iomega zip come modulo

    supporto per la stampante anche questo come modulo

    salvare ed uscire

    make dep

    make clean

    make zImage oppure zlilo o zdisk

    make modules

    make modules_install

  Ora per usare il lettore:

    caricare il modulo: insmod ppa

    creare un mount point: mkdir /zip

    inserire un dischetto preformattato per win$ozz nel lettore.

    montare il disco: mount -t vfat /dev/sda4 /zip

    usare qualsiasi comando per i file : l /zip, ls /zip, df, cp,

    quando si ha finito:  umount /zip

  Se si hanno problemi con uno qualsiasi dei passi precedenti, si vedano
  le sezioni che seguono per istruzioni pi dettagliate.


  3.  Configurare il kernel per il lettore ZIP

  Per usare il lettore ZIP con Linux, si deve possedere un kernel
  configurato con il supporto per il sistema SCSI, il supporto per i
  dischi SCSI e il supporto per l'adattatore host utilizzato.  Se non si
  ha familiarit con la compilazione del kernel, per maggiori
  informazioni si dovrebbe leggere il Linux Kernel HOWTO
  <http://metalab.unc.edu/mdw/HOWTO/Kernel-HOWTO.html>.

  Si deve iniziare il processo di costruzione di un kernel con il passo
  di configurazione.  Qui, si identificano i componenti specifici del
  kernel di cui si ha bisogno.  Il primo passo   cd /usr/src/linux.
  Esistono diversi modi per operare la reale configurazione.  Sotto X io
  uso make xconfig.  Ci sono pure make menuconfig o make config per il
  prompt a linea di comando.  Il metodo pi facile  con xconfig.

  Nella sezione SCSI Support (Supporto SCSI) si imposti SCSI support =
  Y.  Si imposti anche SCSI disk support = Y (Supporto per dischi SCSI).

  Nella sezione SCSI low-level drivers (Driver SCSI a basso livello) si
  imposti IOMEGA Parallel Port ZIP drive SCSI support = M (Supporto SCSI
  per il lettore IOMEGA ZIP su porta parallela).  La M sta per moduli.

  Nella sezione Character Devices (Device a caratteri) si trovi ed
  imposti Parallell Printer support = M (Supporto per la stampante su
  porta parallela).

  Se non si  molto sicuri di queste cose, si usi zdisk per il passo di
  make.  Questo compiler e installer il kernel nel dischetto.  Se si
  fa qualche casino, si avr ancora un buon sistema avviabile sul disco
  fisso.

  Ora di compili il kernel con questi passi.

    make dep

    make clean

    make zImage o zlilo o zdisk

    make modules

    make modules_install

  Suggerimento se si vuole creare un registro dell'output del passo make
  zImage si pu usare


       make zImage 2>&1 | tee zImage.out




  Questa  veramente un buona cosa da fare, se si hanno degli errori di
  compilazione o altri conflitti nella configurazione, ora si ha un file
  con i messaggi d'errore o gli errori di compilazione.  Questo rende le
  richieste d'aiuto molto pi facili.

  Da qualche parte  necessario anche caricare i moduli.  Sul mio
  sistema ho aggiunto un paio di righe al file boot.local.

    insmod ppa

    insmod lp

     Il mio sistema  una Suse 5.3 e questo file  in /etc/rc.d.  La
     posizione di questo file varier da distribuzione a distribuzione,
     ma da qualche parte ci sar un file per le modifiche locali da fare
     all'avvio.  Si dovrebbe usare il file adeguato per la propria
     distribuzione.

  Ora si faccia shutdown e il reboot.

  Si pu anche compilare tutto o parte del sistema SCSI come modulo.  Se
  lo si fa, ci si assicuri di caricare scsi.o, poi sd.o e alla fine il
  driver per il proprio adattatore host, prima di provare ad accedere al
  lettore ZIP.

  3.1.  Versione SCSI

  Si gi si ha un disco SCSI nel proprio sistema e si sta connettendo il
  lettore ZIP allo stesso controller, non  necessaria alcuna
  configurazione aggiuntiva del kernel.  Altrimenti, molto probabilmente
  si dovr compilare un nuovo kernel.

  Se si sta compilando un kernel per supportare la versione SCSI del
  lettore ZIP, si dovrebbe selezionare il supporto SCSI e il supporto
  per i dischi SCSI.  Si deve anche selezionare un driver per la scheda
  di interfaccia che si user.  Se si ha uno ZIP Zoom, si selezioni il
  driver aha152x.

  Ci si assicuri di leggere la documentazione per il proprio adattatore
  nello SCSI HOWTO e qualsiasi file README nella sottodirectory
  driver/scsi dell'albero dei sorgenti di Linux.  Si faccia attenzione
  ai parametri in linea di comando che si dovranno usare per aiutare il
  kernel ad inizializzare l'adattatore.

  Per esempio, se si sta usando una scheda ZIP Zoom, si dovr aggiungere
  qualcosa di simile a



                 aha152x=0x340,11,7,1




  al comando di avvio (o includerlo nel proprio file /etc/lilo.conf in
  un comando append).  Questa dice al driver l'indirizzo della porta e
  l'IRQ della propria scheda ZIP Zoom - ci si assicuri che questi numeri
  corrispondano al modo in cui sono impostati i ponticelli sulla scheda.

  Si dovrebbe leggere anche il BOOTPROMPT HOWTO
  <http://metalab.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html> di Paul
  Gortmaker per informazioni sulla configurazione del proprio kernel con
  LILO e LOADLIN.


  4.  Il lettore ZIP

  Ci sono almeno cinque o sei versioni del lettore Iomega ZIP 100.  La
  pagina della Iomega per questi lettori  a
  <http://www.iomega.com/product/zip/>. Tutte accettano speciali
  cartucce simili ai dischetti da 3.5" che possono contenere 100
  megabyte di dati.  Il realt il disco contiene 96 cilindri di 2048
  settori ognuno da 512 byte di capacit, ovvero un totale di 96
  Megabyte.

  Il lettore esterno  disponibile in tre varianti:

    Parallel port

    SCSI

    Plus

  mentre il lettore interno  disponile nelle seguenti varianti:

    SCSI

    IDE

    ATAPI

  Le versioni interne possono essere installate in uno slot per i
  lettori da 3.5" o da 5.25". Le versioni esterne sono racchiuse in un
  piccolo case di plastica blue, ed alimentate con un alimentatore
  esterno.

  Tutti i lettori hanno un grosso bottone sul pannello anteriore, che
  serve per espellere il disco.  Linux blocca la porta mentre sta usando
  il drive, ma se viene premuto il bottone mentre questa  bloccata, il
  lettore ZIP se ne ricorder ed espeller il disco non appena il
  software la sblocca.


  4.1.  La versione per porta parallela Zip100

  Questo lettore  descritto a
  <http://www.iomega.com/product/zip/zippp.html>.

  Il driver per Linux  disponibile in un paio di versioni diverse. La
  versione 0.26 del programma pppa.c  distribuita assieme ai kernel
  2.0.x.  Se il proprio kernel  pi vecchio del 2.0.35 allora si ha il
  programma VECCHIO.  Si veda la homepage di David Campbell
  <http://www.torque.net/~campbell/> per maggiori informazioni su questo
  programma.  Durante la stesura di questo documento, l'ultima la
  versioni disponibile  la 1.42.

  Le caratteristiche di auto configurazione del programma 1.4x sono
  molto carine.  NON si deve dire al programma qual' l'indirizzo base
  della porta parallela.  Il programma cercher la porta parallela negli
  indirizzi standard e connette l il lettore quando lo trova.

  Il problema pi comune  il caricare il modulo per la stampante lp
  prima del programma ppa.  Il programma ppa deve essere caricare prima
  del modulo lp.  Il modulo lp si riserver la porta di cui ha bisogno
  il lettore ZIP ed  per questo che deve essere caricato prima il
  programma ppa.

  Ci si assicuri inoltre che i cavi siano attaccati bene.

  Se si  fatto tutto bene :) si vedr un messaggio come questo
  all'avvio.


  VFS: Mounted root (ext2 filesystem) readonly.
  Adding Swap: 102528k swap-space (priority -1)
  ppa: Version 1.42
  ppa: Probing port 03bc
  ppa: Probing port 0378
  ppa:     SPP port present
  ppa:     EPP 1.9 with hardware direction protocol
  ppa: Found device at ID 6, Attempting to use EPP 32 bit
  ppa: Communication established with ID 6 using EPP 32 bit
  ppa: Probing port 0278
  ppa:     SPP port present
  scsi0 : Iomega parport ZIP drive
  scsi : 1 host.
    Vendor: IOMEGA    Model: ZIP 100           Rev: D.09
    Type:   Direct-Access                      ANSI SCSI revision: 02
  Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
  SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
  sda: Write Protect is off
    sda: sda4
  lp2 at 0x0278, (polling)




  Si possono vedere questi messaggi con dmesg | more.  Si possono
  salvare i messaggi in un file con dmesg > dmesg.txt.  Questa cosa 
  spesso utile se si sta provando a fare il debug di un'installazione.

  Si veda inoltre la sezione ``Ottenere maggioni informazioni''.


  4.2.  La versione SCSI esterna

  Questo lettore  descritta a
  <http://www.iomega.com/product/zip/zipscsi.html>.

  La versione SCSI esterna del lettore ZIP ha due connettori DB25F, e
  due switch di configurazione.  Uno switch seleziona l'indirizzo di
  destinazione del lettore.  La scelta  limitata agli indirizzi 5 o 6.
  L'altro abilita un terminatore interno, nel caso il lettore sia
  l'ultimo di una catena.  I connettori SCSI a 25 pin usano l'ormai
  familiare collegamento in stile Macintosh.  Il lettore  venduto con
  un cavo di tipo Macintosh, ma cavi standard e convertitori sono
  facilmente reperibili nel caso si usi un controller SCSI con
  connettore Centronics o ad alta densit.

  Non ho visto un lettore SCSI interno, ma mi aspetto abbia un
  connettore SCSI di tipo DIP a 50 pin con gli stessi due switch.

  Ci si assicuri che l'indirizzo di destinazione scelto non sia in
  conflitto con altri dispositivi SCSI presenti nello stesso bus.  Ci si
  assicuri inoltre che l'ultimo drive fisico della catena abbia la
  terminazione attivata o di installare un terminatore esterno.

  Se si ha un disco SCSI interno o un CD-Rom, e si connette il proprio
  ZIP ad un controller gi a disposizione, si dovrebbe controllare che
  non ci siano altri terminatori nella scheda che debbano essere
  rimossi.  Solo le due terminazioni estreme del bus SCSI devono essere
  terminate.  Se il proprio bus  parzialmente interno e parzialmente
  esterno, ci dovrebbe essere essere un terminatore nell'ultimo
  dispositivo esterno ed uno nell'ultimo dispositivo interno, ma non ci
  dovrebbero essere terminatori nella scheda stessa.

  Assicurarsi che tutti i cavi siano ben fissati.

  La configurazione del kernel  praticamente la stessa di quella per la
  versione interna.  Si veda la prossima sezione sulla versione SCSI
  interna per un esempio di configurazione.


  4.2.1.  Il controller ZIP ZOOM

  Iomega produce un controller SCSI chiamtato ZIP Zoom.  Questo si basa
  in pratica sulla famiglia di adattatori Adaptec AHA1520.  Ha un
  connettore esterno DB25F di tipo Macintosh, compatibile con il cavo
  venduto assieme al lettore ZIP.

  Linux supporta questo adattatore con il driver aha152x.


  4.3.  La versione SCSI interna


  Si installi l'hardware come descritto nella "Installation and
  Reference Guide", annotando quale SCSI ID, IRQ e indirizzo di porta
  I/O sono stati usati (queste informazioni saranno usate pi tardi).
  Le cose andranno subito lisce se il lettore ed il controller usano
  diversi ID SCSI.


  Attenzione La scheda zip zoom  impostata in hardware per l'ID SCSI
  numero 7.  L'ID SCSI nella riga di comando qui sotto  per la scheda
  non per il lettore.  La scheda ed il lettore devono usare numeri di ID
  SCSI diversi.  Per esempio se la scheda usa il 7 allora si usi 5 o
  qualche altro numero per il lettore.

  Si ricompili il kernel dopo aver configurato ed incluso il supporto
  per 'SCSI', 'SCSI disk' e 'AHA152X/2825'.  INSTALLARE IL NUOVO KERNEL
  :-(

  Si dermini qual  la riga di comando da passare al kernel:

   aha152x=[I/O Port][,IRQ][,SCSI ID][,RECONNECT][,PARITY]

  Per esempio:

    aha152x=0x140,10,7,1

  Se si usa LILO si aggiunga la riga di comando per il kernel al proprio
  file lilo.conf, usando il comando append.

  (ie. append = "aha152x=0x140,10,7,1")

  Se si usa LOADLIN si aggiunga la riga di comando per il kernel al
  comando usato per inizializzare loadlin.


    (ie. loadlin c:\vmlinuz root=/dev/hda3 aha152x=0x140,10,5,1 ro)




  4.4.  Lo ZIP Plus - il driver IMM

  Questo lettore  descritto a
  <http://www.iomega.com/product/zip/zipplus.html>.

  Questa  una nuovissima versione del lettore ZIP esterno.  Lo Zip Plus
  non usa il driver ppa: usa invece il driver imm. Philippe Andersson ha
  inviato questa eccellente sezione sul driver imm per lo Zip Plus.
  Grazie Philippe.

  Per prima cosa si ricompili il proprio kernel per includere le
  seguenti cose:


    supporto per i moduli

    supporto SCSI

    supporto per dischi SCSI

    lp come modulo (se serve)

  Si noter che non si  selezionato alcun driver SCSI a basso livello.
  Ok, va tutto bene...lo si compiler separatamente pi tardi.

  Adesso, bisogna procurarsi il codice sorgente del driver dalla home
  page di Dave Campbell (http://www.torque.net/~campbell/imm.tar.gz).
  La versione 0.18  quella corrente mentre sto scrivendo questo
  documento (agosto 98).  Si faccia l'unzip e l'untar di questo da
  qualche parte (ad esempio sotto /usr/src).   Poi semplicemente, si
  lanci make.  Si otterr il modulo di cui si ha bisogno (imm.o).  Lo si
  copi in


  /lib/modules/$(uname
  -r)/scsi



  Se  caricato il modulo lp (si controlli con lsmod(1)), lo si scarichi
  (rmmod lp), e poi si carichi imm.o (insmod imm), e tutto dovrebbe
  essere a posto.

  Se il lettore ZIP non  connesso e alimentato quando si fa questa
  operazione, si ricever il messaggio "init_module: Device or resource
  busy", e il modulo non sar caricato (si potrebbe pensare che a questo
  punto sia necessario spegnere il PC e connettore lo ZIP, in realt
  basta assicurarsi che il modulo non sia caricato e il lettore sia
  spento, poi basta collegarlo, accenderlo e caricare il modulo).

  Se lo ZIP  connesso ed acceso, ma non c' un disco al suo interno, il
  modulo si caricher e si otterr un messaggio che dice che non  in
  grado di leggere la tavola delle partizioni del disco.  Nessun
  problema, in quanto la tavola delle partizioni sar letta
  automaticamente quando si inserisce uno ZIP.

  Se c'era uno ZIP, verr mostrata una serie completa di informazioni,
  compreso un elenco delle partitizioni definite nel disco ed il loro
  stato di protezione dalla scrittura.  Ecco qui un esempio del
  messaggio che si ottiene quando viene caricato il modulo:


  vger:~# insmod imm
  imm: Version 0.18
  imm: Probing port 03bc
  imm: Probing port 0378
  imm:     SPP port present
  imm:     ECP with a 16 byte FIFO present
  imm:     PS/2 bidirectional port present
  imm:     Passed Intel bug check.
  imm: Probing port 0278
  scsi0 : Iomega ZIP Plus drive
  scsi : 1 host.
    Vendor: IOMEGA    Model: ZIP 100 PLUS      Rev: J.66
    Type:   Direct-Access                      ANSI SCSI revision: 02
  Detected scsi removable disk sda at scsi0, channel 0, id 6, lun 0
  SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
  sda: Write Protect is off
   sda: sda1
  vger:~#



  Un ultimo punto da sottolineare  che questa versione del driver
  blocca anche la porta del lettore quando  montato il disco.  Se viene
  premuto il tasto di eject in questa situazione non succede niente, ma
  il lettore se ne "ricorder" ed espeller il disco non appena viene
  smontato.


  4.5.  La versione ATAPI

  Questo lettore  descritto a
  <http://www.iomega.com/product/zip/zipatapi.html>.

  Per un certo periodo  stata in produzione una versione IDE del
  lettore.  Penso che adesso sia stata rimpiazzata dalla versione ATAPI.

  Donald Stidwell mi ha spedito questi commenti sulla versione ATAPI.
  Grazie Don.
  Uso il lettore Zip ATAPI e funziona sia con il kernel 2.0.32 che con
  il 2.0.33.  L'ho usato sia sotto RH 5.0 che sotto OpenLinux 1.2 (la
  distribuzione che uso attualmente).  Per farlo funzionare sotto
  OpenLinux, ho semplicemente abilitato ATAPI floppy support (Supporto
  per floppy ATAPI) nel kernel.  OpenLinux non ha questo supporto
  compilato di default.

  Non  necessario nessun altro driver.  Sar montato come una
  partizione estesa sulla partizione 4, i.e. il mio si monta su hdb4.
  Lo monto sotto /mnt/zip con l'opzione noauto, sebbene sono sicuro che
  non ci siano problemi reali con l'automount.  Una piccola nota
  sull'espulsione dei dischi: io smonto sempre il disco prima di
  espellerlo.

  Ci sono istruzioni pi dettagliate per l'installazione della versione
  ATAPI nel numero di maggio 1998 della Linux Gazette.  Si veda la
  sezione "2 cent tip".


       <url url="http://www.linuxgazette.com/issue28/lg_tips28.html#atapi">





  4.6.  La versione IDE


  Non ho usato la versione IDE.  Eric Backus mi ha spedito questi
  commenti.  Grazie Eric.

  Io ne ho uno.  Mi  stato dato assieme al mio computer Getaway 2000
  circa un anno fa.  Penso che la maggior parte di questi lettori siano
  stati venduti da grosse compagnie OEM come questa, prima che fosse
  disponibile la versione ATAPI del lettore ZIP.

  Le buone nuove su questo lettore: per supportarlo non  necessario
  alcun modulo o modifica del kernel.  Appare al kernel come un normale
  disco fisso IDE.  Io l'ho usato senza problemi con i kernel 2.0.31 e
  2.0.32.

  Le cattiva notizie su questo lettore: poich non usa ATAPI, non pu
  usare la "SCSI-to-ATAPI translation", il che implica che non 
  possibile usare gli mtools per proteggere in scrittura i dischi (o per
  espellerli, per quanto possa importare).


  4.7.  La versione USB

  Questo lettore  descritto a
  <http://www.iomega.com/product/zip/imac.html>.

  Questi lettori sembrano molto cool e anche l'interfaccia USB sembra
  buona.  Il solo problema  che in questo momento l'interfaccia USB per
  Linux  ancora in sviluppo.  Quindi per ora questo lettore non 
  utilizzabile sotto Linux.  Si veda a questo indirizzo per le novit:

  <http://peloncho.fis.ucm.es/~inaky/USB/news.html>


  4.8.  La versione ZIP250

  Questo lettore  descritto a
  <http://www.iomega.com/product/zip/zip250.html>.


  A gennaio 1999 questo lettore  una novit.  Ne ho appena coprato uno
  e funziona molto bene sotto Linux.  Si usi semplicemente il driver IMM
  scaricabile da  <http://www.torque.net/~campbell/imm.tar.gz>.  Si
  imposti il driver in maniera analoga che con lo zip plus.  In pratica,
  semplicemente si scarichi il driver, lo si scompatti e si esegua make.
  Poi si copi l'eseguibile imm.o nella directory dei moduli.  Per
  esempio /lib/modules/2.0.35/scsi (se 2.0.35  la versione del proprio
  kernel).  Se non si  sicuri della versione si usi uname -r.


  5.  Usare il lettore ZIP

  Se si sono creati tutti i componenti richiesti, il kernel dovrebbe
  riconoscere il proprio adattatore ed il lettore al boot.  Se si sta
  usando un modulo caricabile per il proprio lettore, la discussione che
  segue  applicabile una volta che sia stato caricato il modulo.

  In linea di massima la versione SCSI e parallela del lettore si
  comportano nello stesso modo, tranne per il fatto che la versione
  parallela  in qualche modo pi lenta.


  5.1.  Fdisk, mke2fs, mount, ecc.

  Una volta noto il nome del device per il proprio lettore ZIP, si  a
  posto.  Si pu manipolare il disco con i normali comandi di gestione
  dei dischi di Linux.  fdisk (o anche cfdisk)  usato per manipolare le
  tavole delle partizioni sul disco.  mke2fs pu essere usato per
  formattare una partizione con il filesystem ext2, il pi comunemente
  usato in Linux.  mount  usato per connettere una partizione
  formattata nella propria gerarchia di directory.

  Se non si ha familiarit con questi strumenti, si dovrebbero studiare
  le relative pagine di manuale.  Si faccia attenzione poich adesso
  come adesso esistono diverse versione del programma fdisk.

  Descriver due scenari comuni.


  5.2.  Un disco DOS preformattato

  Se si ha un disco ZIP con una struttura DOS dei file originariamente
  creata dagli strumenti della Iomega, l'analisi delle partizioni
  dovrebbe dire che il disco ha una sola partizione, /dev/sda4.

  Si deve creare un posto dove montare il disco, diciamo /zip, e poi
  montarlo come un filesystem MS-DOS:



              mkdir /zip
              mount -t vfat /dev/sda4 /zip




  Si potrebbe usare msdos invece di vfat.  vfat supporta i nomi lunghi
  per i file mentre msdos no.  Ora, i file nel disco dovrebbero apparire
  in /zip.  Mentre il disco  montato, non si sar in grado di
  rimuoverlo.  Quando si ha finito con il disco si pu smontarlo per
  rilasciarlo e staccarlo dalla propria gerarchia di directory.



              umount /zip

  Una volta creato il mount point /zip, non  necessario ricrearlo
  ancora, e quindi si pu riutilizzare pi tardi per montarci
  qualcos'altro.


  5.3.  Riformattazione come un disco Linux nativo

  Se si vuole cancellare un disco ZIP e creare un file system nativo di
  Linux, di deve usare fdisk sull'intero disco:



              fdisk /dev/sda




  e cancellare qualsiasi partizione esistente (con il comando d).  Poi
  si crei una nuova partizione con il comando n. La si crei primaria e
  con numero di partizione 1, poi si usi w per scrivere la tavola delle
  partizioni sul disco e si esca con q.

  Si formatti la partizione con



              mke2fs /dev/sda1




  (L'1  il numero che si  dato a questa partizione con fdisk).  Ora si
  pu montare il disco:



              mount -t ext2 /dev/sda1 /zip




  (riusando il mount point creato in precedenza).


  5.4.  Le voci in fstab

  Il file /etc/fstab permette di configurare il comando mount.  Mi piace
  poter montare e scrivere nel disco zip da qualsiasi account nel
  sistema.  Ho aggiunto queste due righe alla fine del file fstab:


  /dev/sda1    /zip            ext2            noauto,rw,user,nosuid,sync
  /dev/sda4    /zipdos         vfat            noauto,rw,user,nosuid,sync,mode=0777



  Queste voci assumono che ci siano le directory /zip e /zipdod.  Se si
  vuole che tutti gli utenti possono leggere e scrivere, ci si assicuri
  di impostare i permessi.  Per esempio chmod 666 /zip.  Si deve
  eseguire chmod come root.  Le voci in fstab assumono inoltre che i
  propri dischi dos siano partizionato come 4 (sda4 nel mio caso) e che
  i propri dischi ext2 siano partizionati come 1 (sda1).  Si pu sapere
  di pi sulle opzioni di fstab con man mount.

  Con le suddette voci di fstab si pu montare un disco dos con mount
  /zipdos.  Se si sta usando un disco ext2 si usi invece mount /zip.
  5.5.  Il disco ZIP Tools

  C' un altro po' di lavoro da fare se si vuole usare il disco che
  viene venduto con il lettore ZIP.  Prima della distribuzione viene
  abilitata la protezione software dalla scrittura.  Molti hanno per
  prima cosa sbloccato il disco sotto DOS prima di provare ad usarlo con
  Linux.  Linux non pu accedere a un disco bloccato, e questo
  dev'essere sbloccato con gli strumenti della Iomega.

  Un programma nativo per Linux per gestire la caratteristica di
  protezione dalla scrittura ed altre cose, si pensa sar presto
  disponibile.



  6.  Prestazioni

  Con la versione standard dei kernel 2.0.x si riceve la versione 0.26
  del programma ppa.c.  Questo  un programma semplice ma molto
  affidabile.   stato sottoposto ad un uso intenso ed ora funziona
  piuttosto bene.  La sola cosa brutta di questo programma  che non 
  molto veloce.  Sulla mia macchina ho la versione 2.0.30 del kernel e
  due porte parallele.  pure una macchina da pochi soldi con un pentium
  133, 16 mega di memoria e un disco eide della maxtor da 5 giga.  La
  macchina mi  costata 500 dollari americani mentre il disco ne costa
  250.  Sono tirchio ma non troppo.

  Ho messo il lettore ZIP nella seconda porta e la stampante nella
  prima.  La seconda era una vecchia scheda senza la modalit epp.  Ci
  fa s che il lettore funzioni in modalit a 4 bit.

  Per verificare le prestazioni ho copiato il file tar del netscape dal
  disco fisso allo ZIP.  Questo file  circa 10.6 mega.  Per terminare
  l'operazione ci sono voluti 7 minuti e 15 secondi. Per trasferire
  dallo ZIP al disco fisso ci sono voluti 7 minuti.  Non proprio
  esaltaltante, vero?

  Allora ho fatto 2 modifiche.  Per prima cosa ho passato il lettore ZIP
  nella prima porta e sono andato nel BIOS ed ho impostato la modalit
  EPP per la prima porta.  Allo stesso tempo ho collegato la stampante
  nella seconda porta.

  La seconda modifica che ho fatto  stato di scaricarmi la nuova
  versione del programma dalla pagina di David Campbells
  <http://www.torque.net/~campbell/>.  Poi l'ho installato.  Si dia
  un'occhiata al readme incluso.

  Poi ho eseguito ancora lo stesso test copiando il file tar di Netscape
  nel e dal lettore ZIP.  La copia nel disco fisso ha durato 1:55
  minuti.  Dal disco fisso allo ZIP invece c'ha messo 1 minuto giusto.
  Si confrontino questi valori con i 7:15 minuti e 7:00 minuti del
  vecchio programma.  Si noti il notevole incremento di prestazioni
  rispetto alla versione 0.26 del programma.  Tutto ci inoltre  stato
  fatto usando il disco ZIP con un file system vfat.

  Poi ho formattato un disco ZIP con il formato ext2.  Ho eseguito
  ancora lo stesso test.  La copia verso il disco fisso ha durato solo
  50 secondi, mentre la copia dal disco fisso al disco ZIP solo 40.

  Sommario delle Prestazioni

  Per questo test ho spostato un file da 10.6 mega. La modalit standard
  a 4 bit della porta e la versione 0.26 del programma  risultata la
  combinazione pi lenta con tempi di 7:00 e 7:15 minuti.


  Il nuovo programma (1.41) e la modalit EPP con un filesystem ext2 
  la combinazione pi veloce con tempi di 50 e 40 secondi.



  7.  Filza di Assilli Quoditiani (aka Frequently Asked Questions)

  Queste sono alcune delle domande che sono state fatte un sacco di
  volte.  Invito a leggere le risposte prima di rifarle un'altra volta!


  7.1.  Posso collegare una stampante nel lettore ZIP per porta paral
  lela?


  S, ma: attualmente non  possibile avere contemporaneamente i driver
  lp e ppa attivi sulla stessa porta parallela.  Durante lo sviluppo
  iniziale del gestore  stato progettato un protocollo di condivisione
  delle risorse, ma non sar dispobile prima del rilascio di Linux 2.2.

  Se si ama vivere sul filo del rasoio, si prenda il kernel 2.1.x e si
  pu cos avere la condivisione della porta.  Si veda
  <http://www.cyberelk.demon.co.uk/parport.html>.

  Il modo pi semplice per fare questa cosa con un kernel 2.0.x  di
  avere due porte parallele.  Ho comprato la mia seconda per circa 15
  dollari e funziona alla grande.  Si pu usarne una per stampare e
  l'altra per lo ZIP.  Semplicemente si compili un kernel con sia il
  driver ppa che il driver lp come moduli.  Uso la versione pi nuova
  (1.41) di ppa, quindi semplicemente carico ppa per primo (insmod ppa).
  Questo trova il lettore zip nella prima porta.  Poi carico lp (insmod
  lp) e questo assegna la stampante alla seconda porta.

  Se si usa la versione 0.26 del programma allora si aggiorni alla
  versione 1.41 o successiva.  La sola risposta che si otterr per
  domande su questo driver  di aggiornare il programma.


  7.2.  C' l'intenzione di supportare le porte EPP/ECP in PPA?


  La versione 0.26 del programma non supporta EPP.  La versione 1.41
  supporta EPP.  Questo programma  molto pi veloce.  Si veda la
  sezione sulle prestazioni per maggiori dettagli.


  7.3.  Possono eseguire Linux da un lettore ZIP?

  C' gente che l'ha fatto.  Questo sembra una gran cosa per fare un
  ottimo disco di ripristino o per testare un'installazione.

  <http://metalab.unc.edu/LDP/HOWTO/mini/ZIP-Install.html>


  7.4.  Posso fare il boot da un lettore ZIP?

  Dipende da cosa si usa come controller.  Se il proprio controller ha
  una ROM BIOS con il codice per fare il boot dai target 5 o 6, allora
  s, si pu fare il boot da uno ZIP SCSI.  Non  possibile fare il boot
  da uno ZIP su porta parallela.

  Se si ha DOS nel proprio disco principale e si vuole avviare Linux da
  un disco ZIP, lo si pu fare usando LOADLIN.  L'immagine del proprio
  kernel deve essere da qualche parte nel disco DOS, ma il resto del
  proprio sistema Linux pu essere nello ZIP.  Ci si assicuri che il
  kernel che si usa abbia i giusti driver compilati al suo interno.
  Per quel che ne so, non c' nessun floppy di avvio dell'installazione
  per una qualsiasi delle distribuzioni pi popolari che contenga il
  driver per lo ZIP su parallela.


  7.5.  Perch Iomega usa 4 come numero della partizione?

  Questa  una delle domande pi popolari, ma non penso che nessuno
  abbia la risposta definitiva. Probabilmente non c' una vera ragione.


  7.6.  Posso fare in modo che il disco sia montato all'avvio?

  Tutto quello che c' da fare  aggiungere una riga al proprio file
  /etc/fstab.  Per esempio, se si ha sempre un disco DOS nel lettore
  quando si fa il boot, si pu mettere



              /dev/sda4   /zip  vfat  defaults  0 0




  in fstab.  A seconda di come  fatta la propria distribuzione, gli
  script di inizializzazione potrebbero provare ad eseguire fsck sulle
  partizioni elencate nel proprio fstab.  Si rammenti che ci potrebbe
  creare problemi se si dimentica di mettere il disco nel lettore quando
  si avvia, oppure se si mette il disco sbagliato.


  7.7.  Cosa succende se non c' nessun disco quando faccio il boot?

  Il kernel prover a leggere la tavola delle partizioni, ma
  l'operazione andr in time out.  Non  niente di cui preoccuparsi.
  Una volta inserito un disco e provato a farci qualcosa il kernel si
  accorger che adesso c' e rilegger la tavola delle partizioni.

  SUGGERIMENTO: quando si cambiano i dischi,  sempre una buona idea
  usare fdisk per verificare la struttura delle partizioni nel nuovo
  disco.

  Il BIOS in alcuni controller SCSI prover a leggere la tavola delle
  partizioni del proprio disco durante il boot del sistema.  Se non si
  pu disabilitare questo controllo, si sar costretti ad effettuare
  sempre il boot con un disco nel lettore.


  7.8.  Posso usare il lettore su porta parallela con un effettivo disco
  SCSI?

  L'adattatore da parallela a SCSI PPP-3  implementato come un unico
  chip ASIC che Iomega chiama VPIO.   inserito nella scheda di
  controllo del lettore ZIP.   effettivamente presente un bus SCSI, ma
  non in una forma utilizzabile.

  Sebbene non abbia provato a confrontare le due schede, sembra logico
  che il VPIO rimpiazzi il circuito convenzionale di buffering elettrico
  che sarebbe richiesto se il bus SCSI fosse esteso al di fuori
  dell'involucro.






  7.9.  Posso usare PPA con i lettori di nastri paralleli della Iomega?

  No.  Questi sono lettori floppy-tape.  Non c'entra lo SCSI.

  Diversi hanno manifestato interesse nell'applicare il miei metodi per
  provare a determinare il protocollo e sviluppare il driver per questi
  tape.  Il primo passo  riuscire ad avere il driver per DOS che
  funzioni sotto DOSemu.  Non ho ancora notizia di qualcuno che abbia
  avuto successo nel farlo.


  7.10.  Il PPA funzioner con il SyQuest EZ135 su porta parallela?

  No.  Il EZ135  un disco IDE con un convertitore da parallela ad IDE
  ShuttlePort al suo interno.

  Comunque  stato fatto un po' di lavoro su questo driver.  Si veda

  <http://www.torque.net/linux-pp.html>



  8.  Dove trovare ulteriori informazioni

  Le versioni pi recenti del programma di gestione per lo zip su porta
  parallela (ppa.c) e le informazioni tecniche correnti su tale driver
  possono essere trovare a

  <http://www.torque.net/~campbell/>

  Le informazioni su molti driver per dispositivi esterni su porta
  parallela possono essere trovate a

  <http://www.torque.net/linux-pp.html>

  Informazioni sulla condivisione della porta parallela e sulla porta
  parallela passante si trovano a

  <http://www.cyberelk.demon.co.uk/parport.html>

  Installazione di Linux da un lettore zip (per macchine senza un CD)

  <http://metalab.unc.edu/mdw/HOWTO/mini/Install-From-ZIP.html>

  Un'interfaccia X per il programma ziptool pu essere trovata a

  <http://www.scripps.edu/~jsmith/jazip/>

  Informazioni sulla configurazione di Lilo le si pu trovare a

  <http://metalab.unc.edu/mdw/HOWTO/mini/LILO.html>

  Informazioni sull'uso dei bootprompt le si pu trovare a

  <http://metalab.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html>

  Se si vuole installare Linux sullo Zip ed eseguire il sistema dallo
  Zip

  <http://metalab.unc.edu/LDP/HOWTO/mini/ZIP-Install.html>

  Le pagine web della Iomega sono a

  <http://www.iomega.com/>.


  Se si cercano informazioni generiche sulla programmazione della porta
  parallela del proprio PC, non  male visitare

  <http://www.lvr.com/parport.htm>






























































